Current File : /home/mmdealscpanel/yummmdeals.com/share.tar
doc/pycurl/RELEASE-NOTES.rst000064400000021262150335352040011332 0ustar00Release Notes
=============

PycURL 7.45.6 - 2025-03-06
--------------------------

The previous release was accidentally built without CA bundle autodetection in
Linux wheels - this restores that behavior (no changes to macOS or Linux).

PycURL 7.45.5 - 2025-03-06
--------------------------

This release is mainly to update the wheels to incorporate libcurl 8.12.1 for
security fixes, as well as enable some additional libraries in wheel builds.

PycURL 7.45.4 - 2024-12-12
--------------------------

This release fixes several minor issues and adds support for several libcurl
options.  Additionally, it fixes several issues with the wheels on
Linux/macOS/Windows.

PycURL 7.45.3 - 2024-02-17
--------------------------

This release fixes several minor issues and adds support for several libcurl
options.  Additionally, we are now building wheels for Linux/macOS/Windows.

PycURL 7.45.2 - 2022-12-16
--------------------------

This release fixes several minor issues and adds support for several libcurl
options.

PycURL 7.45.1 - 2022-03-13
--------------------------

This release fixes build when libcurl < 7.64.1 is used.

PycURL 7.45.0 - 2022-03-09
--------------------------

This release adds support for SecureTransport SSL backend (MacOS), adds
ability to unset a number of multi options, adds ability to duplicate easy
handles and permits pycurl classes to be subclassed.

PycURL 7.44.1 - 2021-08-15
--------------------------

This release repairs incorrect Python thread initialization logic which
caused operations to hang.

PycURL 7.44.0 - 2021-08-08
--------------------------

This release reinstates best effort Python 2 support, adds Python 3.9 and
Python 3.10 alpha support and implements support for several libcurl options.

Official Windows builds are currently not being produced.

PycURL 7.43.0.6 - 2020-09-02
----------------------------

This release improves SSL backend detection on various systems, adds support
for libcurl's multiple SSL backend functionality and adds support for several
libcurl options.

PycURL 7.43.0.5 - 2020-01-29
----------------------------

This release fixes a build issue on recent Pythons on CentOS/RHEL distributions.

It also brings back Windows binaries. Special thank you to Gisle Vanem for
contributing the nghttp2 makefile.


PycURL 7.43.0.4 - 2020-01-15
----------------------------

This release improves compatibility with Python 3.8 and removes support for
Python 2 and Python 3.4. It also adds wolfSSL support and thread safety of
the multi interface.


PycURL 7.43.0.3 - 2019-06-17
----------------------------

This release primarily fixes an OpenSSL-related installation issue, and
repairs the ability to use PycURL with newer libcurls compiled without FTP
support. Also, mbedTLS support has been contributed by Josef Schlehofer.


PycURL 7.43.0.2 - 2018-06-02
----------------------------

Highlights of this release:

1. Experimental perform_rs and perform_rb methods have been added to Curl
   objects. They return response body as a string and a byte string,
   respectively. The goal of these methods is to improve PycURL's usability
   for typical use cases, specifically removing the need to set up
   StringIO/BytesIO objects to store the response body.

2. getinfo_raw and errstr_raw methods have been added to Curl objects to
   return transfer information as byte strings, permitting applications to
   retrieve transfer information that is not decodable using Python's
   default encoding.

3. errstr and "fail or error" exceptions now replace undecodable bytes
   so as to provide usable strings; use errstr_raw to retrieve original
   byte strings.

4. There is no longer a need to keep references to Curl objects when they
   are used in CurlMulti objects - PycURL now maintains such references
   internally.

5. Official Windows builds now include HTTP/2 and international domain
   name support.

6. PycURL now officially supports BoringSSL.

7. A number of smaller improvements have been made and bugs fixed.


PycURL 7.43.0.1 - 2017-12-07
----------------------------

This release collects fixes and improvements made over the past two years,
notably updating Windows dependencies to address DNS resolution and
TLS connection issues.


PycURL 7.43.0 - 2016-02-02
--------------------------

Highlights of this release:

1. Binary wheels are now built for Windows systems.

2. setopt_string method added to Curl objects to permit setting string libcurl
   options that PycURL does not know about.

3. curl module can now be imported on Windows again.

4. OPENSOCKETFUNCTION callback is now invoked with the address as bytes on
   Python 3 as was documented.

5. Support for many libcurl options and constants was added.


PycURL 7.21.5 - 2016-01-05
--------------------------

Highlights of this release:

1. Socket callbacks are now fully implemented (``CURLOPT_OPENSOCKETFUNCTION``,
   ``CURLOPT_SOCKOPTFUNCTION``, ``CURLOPT_CLOSESOCKETFUNCTION``). Unfortunately
   this required changing ``OPENSOCKETFUNCTION`` API once again in a
   backwards-incompatible manner. Support for ``SOCKOPTFUNCTION`` and
   ``CLOSESOCKETFUNCTION`` was added in this release. ``OPENSOCKETFUNCTION``
   now supports Unix sockets.

2. Many other libcurl options and constants have been added to PycURL.

3. When ``pycurl`` module initialization fails, ``ImportError`` is raised
   instead of a fatal error terminating the process.

4. Usability of official Windows builds has been greatly improved:

   * Dependencies are linked statically, eliminating possible DLL conflicts.
   * OpenSSL is used instead of WinSSL.
   * libcurl is linked against C-Ares and libssh2.


PycURL 7.19.5.3 - 2015-11-03
----------------------------

PycURL 7.19.5.2 release did not include some of the test suite files in
its manifest, leading to inability to run the test suite from the sdist
tarball. This is now fixed thanks to Kamil Dudka.


PycURL 7.19.5.2 - 2015-11-02
----------------------------

Breaking change: DEBUGFUNCTION now takes bytes rather than (Unicode) string
as its argument on Python 3.

Breaking change: CURLMOPT_* option constants moved from Easy to Multi
class. They remain available in pycurl module.

SSL library detection improved again, --libcurl-dll option to setup.py added.

Options that required tuples now also accept lists, and vice versa.

This release fixes several memory leaks and one use after free issue.

Support for several new libcurl options and constants has been added.


PycURL 7.19.5.1 - 2015-01-06
----------------------------

This release primarily fixes build breakage against libcurl 7.19.4 through
7.21.1, such as versions shipped with CentOS.


PycURL 7.19.5 - 2014-07-12
--------------------------

PycURL C code has been significantly reorganized. Curl, CurlMulti and
CurlShare classes are now properly exported, instead of factory functions for
the respective objects. PycURL API has not changed.

Documentation has been transitioned to Sphinx and reorganized as well.
Both docstrings and standalone documentation are now more informative.

Documentation is no longer included in released distributions. It can be
generated from source by running `make docs`.

Tests are no longer included in released distributions. Instead the
documentation and quickstart examples should be consulted for sample code.

Official Windows builds now are linked against zlib.


PycURL 7.19.3.1 - 2014-02-05
----------------------------

This release restores PycURL's ability to automatically detect SSL library
in use in most circumstances, thanks to Andjelko Horvat.


PycURL 7.19.3 - 2014-01-09
--------------------------

This release brings official Python 3 support to PycURL.
Several GNU/Linux distributions provided Python 3 packages of PycURL
previously; these packages were based on patches that were incomplete and
in some places incorrect. Behavior of PycURL 7.19.3 and later may therefore
differ from behavior of unofficial Python 3 packages of previous PycURL
versions.

To summarize the behavior under Python 3, PycURL will accept ``bytes`` where
it accepted strings under Python 2, and will also accept Unicode strings
containing ASCII codepoints only for convenience. Please refer to
`Unicode`_ and `file`_ documentation for further details.

In the interests of compatibility, PycURL will also accept Unicode data on
Python 2 given the same constraints as under Python 3.

While Unicode and file handling rules are expected to be sensible for
all use cases, and retain backwards compatibility with previous PycURL
versions, please treat behavior of this versions under Python 3 as experimental
and subject to change.

Another potentially disruptive change in PycURL is the requirement for
compile time and runtime SSL backends to match. Please see the readme for
how to indicate the SSL backend to setup.py.

.. _Unicode: doc/unicode.html
.. _file: doc/files.html
doc/pycurl/INSTALL.rst000064400000027662150335352040010504 0ustar00.. _install:

PycURL Installation
===================

NOTE: You need Python and libcurl installed on your system to use or
build pycurl.  Some RPM distributions of curl/libcurl do not include
everything necessary to build pycurl, in which case you need to
install the developer specific RPM which is usually called curl-dev.


Distutils
---------

Build and install pycurl with the following commands::

    (if necessary, become root)
    tar -zxvf pycurl-$VER.tar.gz
    cd pycurl-$VER
    python setup.py install

$VER should be substituted with the pycurl version number, e.g. 7.10.5.

Note that the installation script assumes that 'curl-config' can be
located in your path setting.  If curl-config is installed outside
your path or you want to force installation to use a particular
version of curl-config, use the '--curl-config' command line option to
specify the location of curl-config.  Example::

    python setup.py install --curl-config=/usr/local/bin/curl-config

If libcurl is linked dynamically with pycurl, you may have to alter the
LD_LIBRARY_PATH environment variable accordingly.  This normally
applies only if there is more than one version of libcurl installed,
e.g. one in /usr/lib and one in /usr/local/lib.


SSL
^^^

PycURL requires that the SSL library that it is built against is the same
one libcurl, and therefore PycURL, uses at runtime. PycURL's ``setup.py``
uses ``curl-config`` to attempt to figure out which SSL library libcurl
was compiled against, however this does not always work. If PycURL is unable
to determine the SSL library in use it will print a warning similar to
the following::

    src/pycurl.c:137:4: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which " "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests" [-Wcpp]

It will then fail at runtime as follows::

    ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)

To fix this, you need to tell ``setup.py`` what SSL backend is used::

    python setup.py --with-[openssl|gnutls|nss|mbedtls|wolfssl|sectransp|schannel] install

Note: as of PycURL 7.21.5, setup.py accepts ``--with-openssl`` option to
indicate that libcurl is built against OpenSSL/LibreSSL/BoringSSL.
``--with-ssl`` is an alias
for ``--with-openssl`` and continues to be accepted for backwards compatibility.

You can also ask ``setup.py`` to obtain SSL backend information from installed
libcurl shared library, as follows:

    python setup.py --libcurl-dll=libcurl.so

An unqualified ``libcurl.so`` would use the system libcurl, or you can
specify a full path.


easy_install / pip
------------------

::

    easy_install pycurl
    pip install pycurl

If you need to specify an alternate curl-config, it can be done via an
environment variable::

    export PYCURL_CURL_CONFIG=/usr/local/bin/curl-config
    easy_install pycurl

The same applies to the SSL backend, if you need to specify it (see the SSL
note above)::

    export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss|mbedtls|sectransp|schannel]
    easy_install pycurl


pip and cached pycurl package
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you have already installed pycurl and are trying to reinstall it via
pip with different SSL options for example, pip may reinstall the package it
has previously compiled instead of recompiling pycurl with newly specified
options. More details are given in `this Stack Overflow post`_.

To force pip to recompile pycurl, run::

    # upgrade pip if necessary
    pip install --upgrade pip

    # remove current pycurl
    pip uninstall pycurl

    # set PYCURL_SSL_LIBRARY
    export PYCURL_SSL_LIBRARY=nss

    # recompile and install pycurl
    pip install --compile pycurl

.. _this Stack Overflow post: http://stackoverflow.com/questions/21487278/ssl-error-installing-pycurl-after-ssl-is-set


Windows
-------

There are currently no official binary Windows packages. You can build PycURL
from source or use third-party binary packages.


Building From Source
^^^^^^^^^^^^^^^^^^^^

Building PycURL from source is not for the faint of heart due to the multitude
of possible dependencies and each of these dependencies having its own
directory structure, configuration style, parameters and quirks.
Additionally different dependencies have different
settings for MSVCRT usage, and an application must have all of its parts
agreeing on a single setting. If you decide to build PycURL from source
it is advisable to look through the ``winbuild.py``
script - it is used to build the official binaries and contains a wealth
of information for compiling PycURL's dependencies on Windows.

If you are compiling PycURL from source it is recommended to compile all of its
dependencies from source as well. Using precompiled libraries may lead to
multiple MSVCRT versions mixed in the resulting PycURL binary, which will
not be good.

If PycURL is to be linked statically against its dependencies, OpenSSL must
be patched to link to the DLL version of MSVCRT. There is a patch for this in
``winbuild`` directory of PycURL source.

For a minimum build you will just need libcurl source. Follow its Windows
build instructions to build either a static or a DLL version of the library,
then configure PycURL as follows to use it::

    python setup.py --curl-dir=c:\dev\curl-7.33.0\builds\libcurl-vc-x86-release-dll-ipv6-sspi-spnego-winssl --use-libcurl-dll

Note that ``--curl-dir`` must point not to libcurl source but rather to headers
and compiled libraries.

If libcurl and Python are not linked against the same exact C runtime
(version number, static/dll, single-threaded/multi-threaded) you must use
``--avoid-stdio`` option (see below).

Additional Windows setup.py options:

- ``--use-libcurl-dll``: build against libcurl DLL, if not given PycURL will
  be built against libcurl statically.
- ``--libcurl-lib-name=libcurl_imp.lib``: specify a different name for libcurl
  import library. The default is ``libcurl.lib`` which is appropriate for
  static linking and is sometimes the correct choice for dynamic linking as
  well. The other possibility for dynamic linking is ``libcurl_imp.lib``.
- ``--with-openssl``: use OpenSSL/LibreSSL/BoringSSL crypto locks when libcurl
  was built against these SSL backends.
- ``--with-ssl``: legacy alias for ``--with-openssl``.
- ``--openssl-lib-name=""``: specify a different name for OpenSSL import
  library containing CRYPTO_num_locks. For OpenSSL 1.1.0+ this should be set
  to an empty string as given here.
- ``--avoid-stdio``: on Windows, a process and each library it is using
  may be linked to its own version of the C runtime (MSVCRT).
  FILE pointers from one C runtime may not be passed to another C runtime.
  This option prevents direct passing of FILE pointers from Python to libcurl,
  thus permitting Python and libcurl to be linked against different C runtimes.
  This option may carry a performance penalty when Python file objects are
  given directly to PycURL in CURLOPT_READDATA, CURLOPT_WRITEDATA or
  CURLOPT_WRITEHEADER options. This option applies only on Python 2; on
  Python 3, file objects no longer expose C library FILE pointers and the
  C runtime issue does not exist. On Python 3, this option is recognized but
  does nothing. You can also give ``--avoid-stdio`` option in
  PYCURL_SETUP_OPTIONS environment variable as follows::

    PYCURL_SETUP_OPTIONS=--avoid-stdio pip install pycurl

A good ``setup.py`` target to use is ``bdist_wininst`` which produces an
executable installer that you can run to install PycURL.

You may find the following mailing list posts helpful:

- https://curl.haxx.se/mail/curlpython-2009-11/0010.html
- https://curl.haxx.se/mail/curlpython-2013-11/0002.html


winbuild.py
^^^^^^^^^^^

This script is used to build official PycURL Windows packages. You can
use it to build a full complement of packages with your own options or modify
it to build a single package you need.

Prerequisites:

- `Git for Windows`_.
- Appropriate `Python versions`_ installed.
- MS Visual C++ 9/2008 for Python <= 3.2, MS Visual C++ 10/2010 for
  Python 3.3 or 3.4, MS Visual C++ 14/2015 for Python 3.5 through 3.8.
  Express versions of Visual Studio work fine for this,
  although getting 64 bit compilers to wok in some Express versions involves
  jumping through several hoops.
- NASM if building libcurl against OpenSSL.
- ActivePerl if building libcurl against OpenSSL. The perl shipping with
  Git for Windows handles forward and backslashes in paths in a way that is
  incompatible with OpenSSL's build scripts.

.. _Git for Windows: https://git-for-windows.github.io/
.. _Python versions: http://python.org/download/

``winbuild.py`` assumes all programs are installed in their default locations,
if this is not the case edit it as needed. ``winbuild.py`` itself can be run
with any Python it supports.


Using PycURL With Custom Python Builds
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As of version 7.21.5, the official binary packages of PycURL are linked
statically against all of its dependencies except MSVCRT. This means that
as long as your custom Python build uses the same version of MSVC as the
corresponding official Python build as well as the same MSVCRT linking setting
(/MD et. al.), an official PycURL package should work.

If your Python build uses different MSVCRT settings or a different MSVC
version from the official Python builds, you will need to compile PycURL
from source.

If the C runtime library (MSVCRT.DLL) versions used by PycURL and Python
do not match, you will receive a message
like the following one when trying to import ``pycurl`` module::

    ImportError: DLL load failed: The specified procedure could not be found.

To identify which MSVCRT version your Python uses use the
`application profiling feature`_ of
`Dependency Walker`_ and look for `msvcrt.dll variants`_ being loaded.
You may find `the entire thread starting here`_ helpful.

.. _application profiling feature: https://curl.haxx.se/mail/curlpython-2014-05/0007.html
.. _Dependency Walker: http://www.dependencywalker.com/
.. _msvcrt.dll variants: https://curl.haxx.se/mail/curlpython-2014-05/0010.html
.. _the entire thread starting here: https://curl.haxx.se/mail/curlpython-2014-05/0000.html


Git Checkout
------------

In order to build PycURL from a Git checkout, some files need to be
generated. On Unix systems it is easiest to build PycURL with ``make``::

    make

To specify which curl or SSL backend to compile against, use the same
environment variables as easy_install/pip, namely ``PYCURL_CURL_CONFIG``
and ``PYCURL_SSL_LIBRARY``.

To generate generated files only you may run::

    make gen

This might be handy if you are on Windows. Remember to run ``make gen``
whenever you change sources.

To generate documentation, run::

    make docs

Generating documentation requires `Sphinx`_ to be installed.

.. _Sphinx: http://sphinx-doc.org/


A Note Regarding SSL Backends
-----------------------------

libcurl's functionality varies depending on which SSL backend it is compiled
against. For example, users have `reported`_ `problems`_ with GnuTLS backend.
As of this writing, generally speaking, OpenSSL backend has the most
functionality as well as the best compatibility with other software.

If you experience SSL issues, especially if you are not using OpenSSL
backend, you can try rebuilding libcurl and PycURL against another SSL backend.

.. _reported: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515200
.. _problems: https://bugs.launchpad.net/ubuntu/+source/pycurl/+bug/1111673


SSL Certificate Bundle
----------------------

libcurl, and PycURL, by default verify validity of HTTPS servers' SSL
certificates. Doing so requires a CA certificate bundle, which libcurl
and most SSL libraries do not provide.

Here_ is a good resource on how to build your own certificate bundle.
certifie.com also has a `prebuilt certificate bundle`_.
To use the certificate bundle, use ``CAINFO`` or ``CAPATH`` PycURL
options.

.. _Here: http://certifie.com/ca-bundle/
.. _prebuilt certificate bundle: http://certifie.com/ca-bundle/ca-bundle.crt.txt
doc/pycurl/ChangeLog000064400000174560150335352040010416 0ustar00Version 7.45.6 [requires libcurl-7.19.0 or better] - 2025-03-06
---------------------------------------------------------------

        * Re-enable building Linux wheels with CA bundle autodetection

Version 7.45.5 [requires libcurl-7.19.0 or better] - 2025-03-06
---------------------------------------------------------------

        * Enable GSS-API and brotli support in wheels (patch by Scott Talbert).
        * Add support for calling getinfo with CURLOPT_*_T arguments
          (patch by Scott Talbert)
        * Change wheels to build using shared libraries (vice static libraries)
          (patch by Scott Talbert)
        * Build wheels with curl 8.12.1 (mainly for security fixes)

Version 7.45.4 [requires libcurl-7.19.0 or better] - 2024-12-12
---------------------------------------------------------------

        * Add support for CURLOPT_HAPROXY_CLIENT_IP (patch by Scott Talbert).
        * Port tests from bottle to flask (patch by Miro Hrončok).
        * Add constant for CURL_HTTP_VERSION_3ONLY (patch by Pavel Horáček).
        * Add EFFECTIVE_METHOD info option (patch by Pavel Horáček).
        * Don't use `-flat_namespace` on macOS (patch by Michael Cho).
        * Add some missing GIL checks to callback functions
          (patch by Scott Talbert).
        * Fix assorted bugs in pycurl tests, including a segfault
          (patch by Scott Talbert).  All tests should now pass on Linux and
          macOS.
        * Fix minor bug in examples/multi-socket_action-select.py
          (patch by Oleg Broytman).
        * Build all wheels using the latest version of libcurl and its
          dependencies (patch by Scott Talbert).  All wheels should now have
          openssl, HTTP2, and SSH support.
        * Implement Certificate Authority path autodetection when building
          Linux wheels (patch by Scott Talbert).

Version 7.45.3 [requires libcurl-7.19.0 or better] - 2024-02-17
---------------------------------------------------------------

        * Add CURLOPT_REQUEST_TARGET option (patch by Marcel Brouwers).
        * Add missing 2nd parameters to METH_NOARGS functions
          (patch by Scott Talbert).
        * Add CURLOPT_AWS_SIGV4 option (patch by Scott Talbert).
        * Add consistent names for newer Curl version constants
          (patch by Scott Talbert).
        * Only run HTTP version 3 option constant test if curl supported
          (patch by Scott Talbert).
        * Expose COMPILE_SSL_LIB in Python and use for test filtering
          (patch by Scott Talbert).
        * Filter tests based on *compile* libcurl version not runtime version
          (patch by Scott Talbert).
        * Use print function in callbacks documentation
          (patch by Scott Talbert).
        * Add missing shebang to tests/ext/test-suite.sh
          (patch by Scott Talbert).
        * Officially declare support for Python 3.12
          (patch by Scott Talbert).
        * Fix curl_multi_info_read flow that loses messages
          (patch by Dom Sekotill).
        * Support using environment variables for setup on Windows
          (patch by Scott Talbert).
        * Add support for Schannel SSL backend (patch by Scott Talbert)
        * Skip HTTP2 tests based on a curl support check
          (patch by Scott Talbert).
        * Fix fake-curl tests so they work when run out of tree
          (patch by Scott Talbert).
        * xfail test_easy_pause_unpause unconditionally
          (patch by Scott Talbert).
        * Provide generic error strings in pycurl.error objects
          (patch by Scott Talbert).
        * Change URLs to new curl mailing list (patch by Michael C).
        * Add missing HTTPS proxy options (patch by Jean Hominal).
        * Add support for setting CURLOPT_SSLCERT_BLOB
          (patch by Vesa Jääskeläinen).
        * Add support for setting rest of CURLOPTTYPE_BLOB fields
          (patch by Vesa Jääskeläinen).
        * Build wheels on Linux/macOS/Windows (patch by Scott Talbert).

Version 7.45.2 [requires libcurl-7.19.0 or better] - 2022-12-16
---------------------------------------------------------------

        * Python 3.9 compatibility for Py_TRASHCAN_SAFE_BEGIN
          (patch by Scott Talbert).
        * Add support for CURL_HTTP_VERSION_3 (patch by Scott Talbert).
        * Add CURLOPT_TLS13_CIPHERS and CURLOPT_PROXY_TLS13_CIPHERS options
          (patch by Scott Talbert).
        * Added HTTP09_ALLOWED option (patch by Scott Talbert).
        * Removed use of distutils (patch by Scott Talbert).


Version 7.45.1 [requires libcurl-7.19.0 or better] - 2022-03-13
---------------------------------------------------------------

        * Fixed build against libcurl < 7.64.1 (patch by Scott Talbert).


Version 7.45.0 [requires libcurl-7.64.1 or better] - 2022-03-09
---------------------------------------------------------------

        * Add CURLOPT_MAXLIFETIME_CONN (patch by fsbs).

        * Easy handle duplication support (patch by fsbs).

        * Support for unsetting a number of multi options (patch by fsbs).

        * pycurl classes can now be subclassed (patch by fsbs).

        * Multi callbacks' thread state management fixed (patch by fsbs).

        * Add CURL_LOCK_DATA_PSL (patch by fsbs).

        * Add support for SecureTransport SSL backend (MacOS)
          (patch by Scott Talbert).


Version 7.44.1 [requires libcurl-7.19.0 or better] - 2021-08-15
---------------------------------------------------------------

        * Fixed Python thread initialization causing hangs on operations
          (patch by Scott Talbert).


Version 7.44.0 [requires libcurl-7.19.0 or better] - 2021-08-08
---------------------------------------------------------------

        * getinfo(CURLINFO_FTP_ENTRY_PATH) now handles NULL return from
          libcurl, returning None in this case.
        
        * Python 3.9 is now officially supported (patch by Bill Collins).
        
        * Added CURLOPT_DOH_URL (patch by resokou).
        
        * Best effort Python 2 support has been reinstated.
        
        * Added missing fields to curl_version_info struct (patch by Hasan).
        
        * Added CURLINFO_CONDITION_UNMET (patch by Dima Tisnek).
        
        * Exposed MAX_CONCURRENT_STREAMS in CurlMulti (patch by Alexandre Pion).
        
        * Compilation fixed against Python 3.10 alpha (patch by Kamil Dudka).


Version 7.43.0.6 [requires libcurl-7.19.0 or better] - 2020-09-02
-----------------------------------------------------------------

        * Fixed offset parameter usage in seek callback (patch by Scott Talbert).

        * Added support for libcurl SSL backend detection via
          `curl-config --ssl-backends` (patch by Scott Talbert).

        * Added support for libcurl MultiSSL (patch by Bo Anderson).

        * Added ability to unset CURLOPT_PROXY.

        * Added support for CURLOPT_UPLOAD_BUFFERSIZE (patch by Artur Sobierak).

        * Added support for CURLOPT_MAXAGE_CONN (patch by Artur Sobierak).

        * Added support for sharing connection cache in libcurl (patch by
          Artur Sobierak).

        * Added support for CURLOPT_HAPROXYPROTOCOL (patch by
          Russell McConnachie).

        * CC and CFLAGS environment variables are now respected when building
          (patch by Michał Górny).

        * Fixed OpenSSL detection on CentOS 7 and 8 (patch by Nicolas Pauss).

        * surrogateescape error handler is used in multi_info_read to handle
          invalid UTF-8.


Version 7.43.0.5 [requires libcurl-7.19.0 or better] - 2020-01-29
-----------------------------------------------------------------

        * Fixed build with recent Pythons on RHEL/CentOS.


Version 7.43.0.4 [requires libcurl-7.19.0 or better] - 2020-01-15
-----------------------------------------------------------------

        * Minimum supported Python 3 version is now 3.5.

        * Python 2 is no longer officially supported.
        
        * Improved thread safety of multi code.
        
        * Added Python 3.8 support (patch by Michael Treanor).
        
        * Fixed link order when linking statically against OpenSSL (patch by
          Ashley Whetter).
        
        * Fixed Darwin detection.
        
        * Added support for wolfSSL (patch by Eneas U de Queiroz).
        
        * Added PROXY_SSL_VERIFYHOST (patch by Amir Rossert).


Version 7.43.0.3 [requires libcurl-7.19.0 or better] - 2019-06-17
-----------------------------------------------------------------

        * Fixed use with libcurl 7.65+ when FTP support is disabled.

        * Added support for mbedTLS (patch by Josef Schlehofer).

        * Fixed string processing on Python 3 (patch by Dmitriy Taychenachev).

        * Added CURLOPT_TCP_FASTOPEN and CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
          (patch by Khavish Anshudass Bhundoo).

        * Repaired inability to install PycURL when libcurl is using an SSL
          backend other than the ones PycURL explicitly recognizes and
          handles (OpenSSL, LibreSSL, BoringSSL, GnuTLS, NSS).
          The requirement for setup.py to detect an SSL backend if libcurl
          is configured to use SSL, added in 7.43.0.2, has been changed
          to a warning to allow this.


Version 7.43.0.2 [requires libcurl-7.19.0 or better] - 2018-06-02
-----------------------------------------------------------------

        * Official Windows builds now include HTTP 2 support via
          libnghttp2 and international domain name support via WINIDN.

        * Added perform_rb and perform_rs methods to Curl objects to
          return response body as byte string and string, respectively.

        * Added OPT_COOKIELIST constant for consistency with other
          option constants.

        * PycURL is now able to report errors triggered by libcurl
          via CURLOPT_FAILONERROR mechanism when the error messages are
          not decodable in Python's default encoding (GitHub issue #259).

        * Added getinfo_raw method to Curl objects to return byte strings
          as is from libcurl without attempting to decode them
          (GitHub issue #493).

        * When adding a Curl easy object to CurlMulti via add_handle,
          the easy objects now have their reference counts increased so that
          the application is no longer required to keep references to them
          to keep them from being garbage collected (GitHub issue #171).

        * PycURL easy, multi and share objects can now be weak referenced.

        * Python 3.2 and 3.3 support officially dropped as those versions
          are end of lifed.

        * set_ca_certs now accepts byte strings as it should have been
          all along.

        * PycURL now skips automatic SSL backend detection if curl-config
          indicates that libcurl is not built with SSL support, and will warn
          if an SSL backend is explicitly specified in this case.

        * PycURL now requires that SSL backend is determined by setup.py
          to provide earlier failure compared to the existing warning
          during compilation and failing during module import on mismatched
          SSL backends.

        * Use OpenSSL 1.1 and 1.0 specific APIs for controlling thread locks
          depending on OpenSSL version (patch by Vitaly Murashev).

        * Fixed a crash when closesocket callback failed (patch by
          Gisle Vanem and toddrme2178).

        * Added CURLOPT_PROXY_SSLCERT, CURLOPT_PROXY_SSLCERTTYPE,
          CURLOPT_PROXY_SSLKEY, CURLOPT_PROXY_SSLKEYTYPE,
          CURLOPT_PROXY_SSL_VERIFYPEER (libcurl 7.52.0+,
          patch by Casey Miller).

        * Added CURLOPT_PRE_PROXY (libcurl 7.52.0+, patch by ziggy).

        * Support for Python 2.6 officially dropped.

        * Added SOCKET_BAD constant and it is now recognized as a valid
          return value from OPENSOCKET callback.

        * BoringSSL is now recognized as equivalent to OpenSSL backend
          (patch by Gisle Vanem).


Version 7.43.0.1 [requires libcurl-7.19.0 or better] - 2017-12-07
-----------------------------------------------------------------

        * WRITEHEADER/WRITEFUNCTION and WRITEDATA/WRITEFUNCTION can now
          be set on the same handle. The last call will take precedence over
          previous calls. Previously some combinations were not allowed.

        * Fixed a crash when using WRITEDATA with a file-like object followed
          by WRITEDATA with a real file object (patch by Léo El Amri).

        * Fixed a theoretical memory leak in module initialization (patch by
          ideal).

        * Added support for CURL_SSLVERSION_MAX_* constants (libcurl 7.52.0+,
          patch by Jozef Melicher).

        * Added support for CURLSSH_AUTH_AGENT (libcurl 7.28.0+,
          patch by kxrd).

        * Added support for CURLOPT_CONNECT_TO (patch by Iain R. Learmonth).

        * Added support for CURLINFO_HTTP_VERSION (patch by Iain R. Learmonth).

        * Fixed build against OpenSSL l.1 on Windows.

        * Added set_ca_certs method to the Easy object to set CA certificates
          from a string (OpenSSL only, patch by Lipin Dmitriy).

        * Python 3.6 is now officially supported (patch by Samuel
          Dion-Girardeau).

        * Added support for CURLOPT_PROXY_CAPATH (libcurl 7.52.0+,
          patch by Jan Kryl).

        * C-Ares updated to 1.12.0 in Windows builds, fixing DNS resolution
          issues on Windows (patch by Wei C).

        * Added --openssl-lib-name="" option to support building against
          OpenSSL 1.1.0 on Windows.

        * Fixed a possible double free situation in all Curl objects
          due to a misuse of the trashcan API (patch by Benjamin Peterson).

        * High level Curl objects can now be reused.

        * LARGE options fixed under Windows and Python 3 (INFILESIZE,
          MAX_RECV_SPEED_LARGE, MAX_SEND_SPEED_LARGE, MAXFILESIZE,
          POSTFILESIZE, RESUME_FROM).

        * Fixed compilation on Solaris (patch by Yiteng Zhang).

        * ENCODING option can now be unset (patch by Yves Bastide).


Version 7.43.0 [requires libcurl-7.19.0 or better] - 2016-02-02
---------------------------------------------------------------

        * Added CURLINFO_RTSP_* constants (libcurl 7.20.0+).

        * Added CURLOPT_XOAUTH2_BEARER (libcurl 7.33.0+).

        * Added CURLOPT_SASL_IR (libcurl 7.31.0+).

        * Added CURLOPT_LOGIN_OPTIONS (libcurl 7.34.0+).

        * Added CURLOPT_FTP_USE_PRET (libcurl 7.20.0+).

        * Added setopt_string method to Curl objects to set arbitrary
          string options.

        * Switched to Bintray for hosting release distributions.

        * Added CURLOPT_DEFAULT_PROTOCOL (libcurl 7.45.0+).

        * Added CURLOPT_TLSAUTH_* options (libcurl 7.21.4+).

        * Added CURLPROTO_SMB and CURLPROTO_SMBS constants (libcurl 7.40.0+).

        * Added CURL_SOCKOPT_* constants (libcurl 7.21.5+).

        * Added CURL_HTTP_VERSION_2_0, CURL_HTTP_VERSION_2 and
          CURL_HTTP_VERSION_2TLS constants for CURLOPT_HTTP_VERSION
          (various libcurl versions required for these).

        * winbuild.py can now build binary wheels on Windows.

        * Added failed memory allocation handling during SSL lock initialization.

        * CURLOPT_IOCTLDATA option support has been removed.
          This option is used internally by PycURL and is not settable by
          applications.

        * HTTPHEADER and PROXYHEADER options can now be unset.

        * Added CURLPIPE_* constants (libcurl 7.43.0+).

        * Added CURLOPT_PIPEWAIT (libcurl 7.43.0+).

        * Added CURLOPT_PATH_AS_IS (libcurl 7.42.0+).

        * Added CURLOPT_PROXYHEADER and CURLOPT_HEADEROPT as well as
          CURLHEADER_UNIFIED and CURLHEADER_SEPARATE (libcurl 7.37.0+).

        * Added CURLOPT_EXPECT_100_TIMEOUT_MS (libcurl 7.36.0+).

        * Added CURLOPT_XFERINFOFUNCTION (libcurl 7.32.0+).

        * Added CURLM_ADDED_ALREADY error constant (libcurl 7.32.1+).

        * Added remaining CURLE_* constants through libcurl 7.46.0.

        * Unbroken `curl' module import on Windows - apparently Windows now
          has a `signal' Python module but no `SIGPIPE' (patch by Gabi Davar).

        * Added CURLMOPT_PIPELINING_SITE_BL and CURLMOPT_PIPELINING_SERVER_BL
          options (libcurl 7.30.0+).

        * Added CURLOPT_TCP_KEEPALIVE, CURLOPT_TCP_KEEPIDLE and
          CURLOPT_TCP_KEEPINTVL options (libcurl 7.25.0+).

        * Added CURLOPT_ACCEPTTIMEOUT_MS (libcurl 7.24.0+).

        * Added CURLOPT_ACCEPT_ENCODING and CURLOPT_TRANSFER_ENCODING
          options (libcurl 7.21.6+).

        * OPENSOCKETFUNCTION callback for AF_UNIX sockets was mistakenly
          invoked with the address as a `string' rather than `bytes' on
          Python 3. The callback now receives a `bytes' instance as was
          documented.


Version 7.21.5 [requires libcurl-7.19.0 or better] - 2016-01-05
---------------------------------------------------------------

        * --with-openssl and its --win-ssl alias setup.py options are now
          accepted under Windows in order to use OpenSSL's crypto locks
          when building against OpenSSL.

        * --with-openssl added as an alias for --with-ssl option to setup.py.

        * Official Windows builds are now linked against C-Ares and libssh2.

        * Official Windows builds are now linked against OpenSSL instead of
          WinSSL.

        * Official Windows builds are now statically linked against
          their dependencies (libcurl and zlib).

        * Added CURLOPT_USE_SSL and CURLUSESSL_* constants.

        * Added CURLOPT_APPEND, CURLOPT_COOKIESESSION, CURLOPT_DIRLISTONLY,
          CURLOPT_KEYPASSWD, CURLOPT_TELNETOPTIONS.

        * Several CURLE_* and CURLM_* constants added.

        * Add VERSION_* constants, corresponding to CURL_VERSION_*.

        * Breaking change: OPENSOCKETFUNCTION callback API now mirrors that
          of libcurl:
          1. The callback now takes two arguments, `purpose' and `address`.
             Previously the callback took `family', `socktype', `protocol`
             and `addr' arguments.
          2. The second argument to the callback, `address', is a
             `namedtuple' with `family', `socktype', `protocol' and
             `addr' fields.
          3. `addr' field on `address' for AF_INET6 family addresses is a
             4-tuple of (address, port, flow info, scope id) which matches
             Python's `socket.getaddrinfo' API.

          It seems that libcurl may mishandle error return from an
          opensocket callback, as would happen when code written for
          pre-PycURL 7.21.5 API is run with PycURL 7.21.5 or newer,
          resulting in the application hanging.

        * OPENSOCKETFUNCTION callback can now be unset.

        * Added CURLOPT_CLOSESOCKETFUNCTION (libcurl 7.21.7+).
          CURLOPT_CLOSESOCKETDATA is used internally by PycURL.

        * Added CURLOPT_SOCKOPTFUNCTION. CURLOPT_SOCKOPTDATA is used
          internally by PycURL.

        * Added CURLOPT_SSH_KEYFUNCTION (libcurl 7.19.6+).
          CURLOPT_SSH_KEYDATA is used internally by PycURL.

        * Added CURLOPT_SSL_OPTIONS (libcurl 7.25.0+).

        * Added CURLOPT_KRBLEVEL.

        * Added CURLOPT_SSL_FALSESTART (libcurl 7.42.0+).

        * Added CURLOPT_SSL_ENABLE_NPN (libcurl 7.36.0+).

        * Added CURLOPT_SSL_ENABLE_ALPN (libcurl 7.36.0+).

        * Added CURLOPT_UNIX_SOCKET_PATH (libcurl 7.40.0+).

        * Added CURLOPT_WILDCARDMATCH (libcurl 7.21.0+).

        * C module initialization changed to raise exceptions on failure
          rather than trigger a fatal error and abort the Python interpreter.

        * Added CURLOPT_PINNEDPUBLICKEY (libcurl 7.39.0-7.44.0+
          depending on SSL backend and encoding algorithm).

        * Fixed incorrect detection of libcurl 7.19.5 and 7.19.6
          (thanks to bataniya).


Version 7.19.5.3 [requires libcurl-7.19.0 or better] - 2015-11-03
-----------------------------------------------------------------

        * python and nosetests binaries can now be overridden when running
          the test suite (patch by Kamil Dudka).

        * Files needed to run the test suite are distributed in sdist
          (patch by Kamil Dudka).


Version 7.19.5.2 [requires libcurl-7.19.0 or better] - 2015-11-02
-----------------------------------------------------------------

        * C sources made 64-bit clean on Windows.

        * Support for building against Python 3.5 added to winbuild.py.

        * Fixed build on Windows when using MS SDK 8.1+ or MSVC 14/2015
          (patch by Gisle Vanem).

        * Added automatic SSL library detection on CentOS 6 by loading
          libcurl shared library in setup.py. This automatic detection is
          meant to permit installing pycurl seamlessly via `pip install pycurl`
          on CentOS; as such, it is only employed when no other configuration
          options or configuration environment variables are given to setup.py
          (original patch by Francisco Alves).

        * Added --libcurl-dll option to setup.py to take SSL library
          information out of libcurl shared library (original patch by
          Francisco Alves). This option is only usable
          with Python 2.5 or higher.

        * --with-ssl, --with-gnutls and --with-nss options to setup.py now
          result in PycURL explicitly linking against the respective SSL
          library. Previously setup.py relied on curl-config to supply the
          needed libraries in this case.

        * List and tuples are now accepted in all positions of HTTPPOST
          option values.

        * Tuples are now accepted for options taking list values (e.g.
          HTTPHEADER).

        * Fixed a use after free in HTTPPOST when using FORM_BUFFERPTR with
          a Unicode string (patch by Clint Clayton).

        * Fixed a memory leak in HTTPPOST for multiple FORM_BUFFERPTR
          (patch by Clint Clayton).

        * CURLMOPT_* option constants were mistakenly defined on Curl
          instances but not on CurlMulti instances. These option constants
          are now defined on CurlMulti instances and on pycurl module,
          but not on Curl instances.

        * Fixed several memory leaks when setting string options to
          Unicode values failed.

        * Fixed a memory leak when using POSTFIELDS with unicode objects
          on Python 2 (patch by Clint Clayton).

        * Official support for Python 2.4 and 2.5 dropped. PycURL is no
          longer tested against these Python versions on Travis.

        * Added CURLAUTH_NEGOTIATE (libcurl 7.38.0+), CURLAUTH_NTLM_WB
          (libcurl 7.22.0+), CURLAUTH_ONLY (libcurl 7.21.3+),

        * Added CURLOPT_SERVICE_NAME (libcurl 7.43.0+).

        * Added CURLOPT_PROXY_SERVICE_NAME (libcurl 7.43.0+).

        * Added CURLE_SSL_CRL_BADFILE, CURLE_SSL_INVALIDCERTSTATUS
          (libcurl 7.41.0+), CURLE_SSL_ISSUER_ERROR and
          CURLE_SSL_PINNEDPUBKEYNOTMATCH (libcurl 7.39.0+).

        * Added CURLOPT_SSL_VERIFYSTATUS (libcurl 7.41.0+).

        * Added CURL_SSLVERSION_TLSv1_0, CURL_SSLVERSION_TLSv1_1
          and CURL_SSLVERSION_TLSv1_2 (libcurl 7.34.0+).

        * The second argument of DEBUGFUNCTION callback is now of type bytes on
          Python 3. When response body contains non-ASCII data and
          DEBUGFUNCTION is enabled, this argument would receive non-ASCII data.
          Which encoding this data is in is unknown by PycURL, and e.g. in
          the case of HTTP requires parsing response headers. GitHub issue
          #210, patch by Barry Warsaw with help from Gregory Petukhov.

        * Fixed build on GCC 4.4.5 (patch by Travis Jensen).

        * Added CURLOPT_GSSAPI_DELEGATION, CURLGSSAPI_DELEGATION_FLAG,
          CURLGSSAPI_DELEGATION_NONE and CURLGSSAPI_DELEGATION_POLICY_FLAG
          (libcurl 7.22.0+, patch by Dmitry Ketov).


Version 7.19.5.1 [requires libcurl-7.19.0 or better] - 2015-01-06
-----------------------------------------------------------------

        * Added CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5_HOSTNAME.

        * setup.py now prints PycURL-specific option help when -h is used.

        * LibreSSL is now supported (patch by JiCiT).

        * Fixed an oversight that broke PycURL building against libcurl 7.19.4
          through 7.21.1. The bug was introduced in PycURL 7.19.5.

        * Tests are now included in source distributions again, thanks to
          Kamil Dudka and Johan Bergstroem.

        * Added CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT (libcurl 7.20.0+)
          and CURLOPT_MAIL_AUTH (libcurl 7.25.0+).


Version 7.19.5 [requires libcurl-7.21.2 or better] - 2014-07-12
---------------------------------------------------------------

        * Tests removed from source and binary distributions.

        * Documentation greatly improved. Quickstart guide added.

        * pycurl.Curl, pycurl.CurlMulti and pycurl.CurlShare are now classes
          rather than factory functions. Previously, the classes were "hidden"
          (they were accessible as e.g. type(pycurl.Curl()), but could not be
          instantiated, nor could class methods be obtained from the classes.
          Please see this mailing list post for further information:
          https://curl.haxx.se/mail/curlpython-2014-06/0004.html

        * When passing a file-like object to READDATA option, PycURL was
          mistakenly looking for write method on this object. Now read method
          is looked up, as would be expected.

        * Python 3.4 is now officially supported.

        * Windows packages now build libcurl against zlib.

        * CherryPy is no longer required for the test suite, ssl module from
          the Python standard library is used instead.

        * Fixed a reference leak of SOCKET and TIMER callbacks on
          CurlMulti instances, thanks to Ben Darnell.

        * Fixed build against openssl on cygwin, where pycurl needs to link
          against libcrypto rather than libssl.

        * Added CURLOPT_SSH_KNOWNHOSTS (libcurl 7.19.6+).

        * Added CURLE_FTP_ACCEPT_FAILED (libcurl 7.24.0+).

        * Added CURLE_NOT_BUILT_IN and CURLE_UNKNOWN_OPTION (libcurl 7.21.5+).

        * Added CURL_SEEKFUNC_OK, CURL_SEEKFUNC_FAIL and
          CURL_SEEKFUNC_CANTSEEK. All constants require libcurl 7.19.5+;
          numeric values of CURL_SEEKFUNC_OK and CURL_SEEKFUNC_FAIL were
          understood earlier but constants only exist as of libcurl 7.19.5.

        * Added CURLINFO_CONDITION_UNMET (libcurl 7.19.4+).

        * Added CURLPROXY_HTTP_1_0 (libcurl 7.19.4+).

        * Added CURLOPT_SOCKS5_GSSAPI_SERVICE and
          CURLOPT_SOCKS5_GSSAPI_NEC (libcurl 7.19.4+).

        * Added CURLOPT_TFTP_BLKSIZE (libcurl 7.19.4+).

        * Added CURLOPT_PROTOCOLS, CURLOPT_REDIR_PROTOCOLS and associated
          CURLPROTO_* constants, which require libcurl 7.19.4+.

        * Fixed a reference leak of OPENSOCKET and SEEK callbacks, thanks to
          Ben Darnell.

        * C source is now split into several files.

        * Documentation is now processed by sphinx.


Version 7.19.3.1 [requires libcurl-7.19.0 or better] - 2014-02-05
-----------------------------------------------------------------

        * Added --avoid-stdio setup.py option to avoid passing FILE
          pointers from Python to libcurl. Applies to Python 2 only.

        * Added CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE,
          CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, CURLMOPT_MAX_HOST_CONNECTIONS
          CURLMOPT_MAX_PIPELINE_LENGTH, CURLMOPT_MAX_TOTAL_CONNECTIONS
          multi options (patch by Jakob Truelsen).

        * SSL detection logic changed to consult `curl-config --static-libs`
          even if `curl-config --libs` succeeded. This should achieve
          pre-7.19.3 behavior with respect to automatic SSL detection
          (patch by Andjelko Horvat).


Version 7.19.3 [requires libcurl-7.19.0 or better] - 2014-01-09
---------------------------------------------------------------

        * Added CURLOPT_NOPROXY.

        * Added CURLINFO_LOCAL_PORT, CURLINFO_PRIMARY_PORT and
          CURLINFO_LOCAL_IP (patch by Adam Jacob Muller).

        * When running on Python 2.x, for compatibility with Python 3.x,
          Unicode strings containing ASCII code points only are now accepted
          in setopt() calls.

        * PycURL now requires that compile time SSL backend used by libcurl
          is the same as the one used at runtime. setup.py supports
          --with-ssl, --with-gnutls and --with-nss options like libcurl does,
          to specify which backend libcurl uses. On some systems PycURL can
          automatically figure out libcurl's backend.
          If the backend is not one for which PycURL provides crypto locks
          (i.e., any of the other backends supported by libcurl),
          no runtime SSL backend check is performed.

        * Default PycURL user agent string is now built at runtime, and will
          include the user agent string of libcurl loaded at runtime rather
          than the one present at compile time.

        * PycURL will now use WSAduplicateSocket rather than dup on Windows
          to duplicate sockets obtained from OPENSOCKETFUNCTION.
          Using dup may have caused crashes, OPENSOCKETFUNCTION should
          now be usable on Windows.

        * A new script, winbuild.py, was added to build PycURL on Windows
          against Python 2.6, 2.7, 3.2 and 3.3.

        * Added CURL_LOCK_DATA_SSL_SESSION (patch by Tom Pierce).

        * Added E_OPERATION_TIMEDOUT (patch by Romuald Brunet).

        * setup.py now handles --help argument and will print PycURL-specific
          configuration options in addition to distutils help.

        * Windows build configuration has been redone:
          PYCURL_USE_LIBCURL_DLL #define is gone, use --use-libcurl-dll
          argument to setup.py to build against a libcurl DLL.
          CURL_STATICLIB is now #defined only when --use-libcurl-dll is not
          given to setup.py, and PycURL is built against libcurl statically.
          --libcurl-lib-name option can be used to override libcurl import
          library name.

        * Added CURLAUTH_DIGEST_IE as pycurl.HTTPAUTH_DIGEST_IE.

        * Added CURLOPT_POSTREDIR option and CURL_REDIR_POST_301,
          CURL_REDIR_POST_302, CURL_REDIR_POST_303 and CURL_REDIR_POST_ALL
          constants. CURL_REDIR_POST_303 requires libcurl 7.26.0 or higher,
          all others require libcurl 7.19.1 or higher.

        * As part of Python 3 support, WRITEDATA option now accepts
          any object with a write method on Python 2 and Python 3.
          For non-file objects, c.setopt(c.WRITEDATA, buf) is equivalent to
          c.setopt(c.WRITEFUNCTION, buf.write).

        * PycURL now supports Python 3.1 through 3.3. Python 3.0 might
          work but it appears to ship with broken distutils, making virtualenv
          not function on it.

        * PycURL multi objects now have the multi constants defined on them.
          Previously the constants were only available on pycurl module.
          The new behavior matches that of curl and share objects.

        * PycURL share objects can now be closed via the close() method.

        * PycURL will no longer call `curl-config --static-libs` if
          `curl-config --libs` succeeds and returns output.
          Systems on which neither `curl-config --libs` nor
          `curl-config --static-libs` do the right thing should provide
          a `curl-config` wrapper that is sane.

        * Added CURLFORM_BUFFER and CURLFORM_BUFFERPTR.

        * pycurl.version and user agent string now include both
          PycURL version and libcurl version as separate items.

        * Added CURLOPT_DNS_SERVERS.

        * PycURL can now be dynamically linked against libcurl on Windows
          if PYCURL_USE_LIBCURL_DLL is #defined during compilation.

        * Breaking change: opensocket callback now takes an additional
          (address, port) tuple argument. Existing callbacks will need to
          be modified to accept this new argument.
          https://github.com/pycurl/pycurl/pull/18


Version 7.19.0.3 [requires libcurl-7.19.0 or better] - 2013-12-24
-----------------------------------------------------------------

        * Re-release of 7.19.0.2 with minor changes to build Windows packages
          due to botched 7.19.0.2 files on PyPi.
          https://curl.haxx.se/mail/curlpython-2013-12/0021.html


Version 7.19.0.2 [requires libcurl-7.19.0 or better] - 2013-10-08
-----------------------------------------------------------------

        * Fixed a bug in a commit made in 2008 but not released until 7.19.0.1
          which caused CURLOPT_POSTFIELDS to not correctly increment reference
          count of the object being given as its argument, despite libcurl not
          copying the data provided by said object.

        * Added support for libcurl pause/unpause functionality,
          via curl_easy_pause call and returning READFUNC_PAUSE from
          read callback function.


Version 7.19.0.1 [requires libcurl-7.19.0 or better] - 2013-09-23
-----------------------------------------------------------------

        * Test matrix tool added to test against all supported Python and
          libcurl versions.

        * Python 2.4 is now the minimum required version.

        * Source code, bugs and patches are now kept on GitHub.

        * Added CURLINFO_CERTINFO and CURLOPT_CERTINFO.

        * Added CURLOPT_RESOLVE.

        * PycURL can now be used with Python binaries without thread
          support.

        * gcrypt is no longer initialized when a newer version of gnutls
          is used.

        * Marked NSS as supported.

        * Fixed relative URL request logic.

        * Fixed a memory leak in util_curl_init.

        * Added CURLOPT_USERNAME and CURLOPT_PASSWORD.

        * Fixed handling of big timeout values.

        * Added GLOBAL_ACK_EINTR.

        * setopt(..., None) can be used as unsetopt().

        * CURLOPT_RANGE can now be unset.

        * Write callback can return -1 to signal user abort.

        * Reorganized tests into an automated test suite.

        * Added CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA.

        * Cleaned up website.

        * Fix pycurl.reset() (patch by <johansen at sun.com>).

        * Fix install routine in setup.py where
          certain platforms (Solaris, Mac OSX, etc)
          would search for a static copy of libcurl (dbp).

        * Fixed build on OpenSolaris 0906 and other platforms on which
          curl-config does not have a --static-libs option.

        * No longer keep string options copies in the
          Curl Python objects, since string options are
          now managed by libcurl.


Version 7.19.0 [requires libcurl-7.19.0 or better]
--------------------------------------------------

        * Added CURLFILE, ADDRESS_SCOPE and ISSUERCERT options,
          as well as the APPCONNECT_TIME info.

        * Added PRIMARY_IP info (patch by
          Yuhui H <eyecat at gmail.com>).

        * Added support for curl_easy_reset through a
          new 'reset' method on curl objects
          (patch by Nick Pilon <npilon at oreilly.com>).

        * Added support for OPENSOCKET callbacks.
          See 'tests/test_opensocket.py' for example
          usage (patch by Thomas Hunger <teh at camvine.com>).


Version 7.18.2
--------------

        * Added REDIRECT_URL info and M_MAXCONNECTS option
          (patch by Yuhui H <eyecat at gmail.com>).

        * Added socket_action() method to CurlMulti objects.
          See 'tests/test_multi_socket_select.py' for example
          usage (patch by Yuhui H <eyecat at gmail.com>).

        * Added AUTOREFERER option.

        * Allow resetting some list operations (HTTPHEADER,
          QUOTE, POSTQUOTE, PREQUOTE) by passing an empty
          list to setopt (patch by Jim Patterson).


Version 7.18.1
--------------

        * Added POST301, SSH_HOST_PUBLIC_KEY_MD5,
          COPYPOSTFIELDS and PROXY_TRANSFER_MODE options.

        * Check for static libs in setup.py to better detect
          whether libcurl was linked with OpenSSL or GNUTLS.

        * PycURL is now dual licensed under the LGPL and
          a license similar to the cURL license (an MIT/X
          derivative).


Version 7.16.4
--------------

        * Allow any callable object as the callback function.
          This change comes handy when you would like to use objects
          which are callable but are not functions or methods, for
          example those objects created by the functions in the functools
          module (patch by Daniel Pena Arteaga <dpena at ph.tum.de>).

        * Added NEW_DIRECTORY_PERMS and NEW_FILE_PERMS options.


Version 7.16.2.1
----------------

        * Added IOCMD_NOP and IOCMD_RESTARTREAD for ioctl callback
          handling (patch by Mark Eichin).

        * Use Py_ssize_t where appropriate for Python 2.5 and 64-bit
          compatibility.  This fixes the problem reported by Aaron
          Hill, where the exception "pycurl.error: (2, '')" is thrown
          when calling setopt(pycurl.POSTFIELDS,...) on 64-bit
          platforms.


Version 7.16.2
--------------

        * Added options HTTP_TRANSFER_DECODING, HTTP_CONTENT_DECODING,
          TIMEOUT_MS, CONNECTTIMEOUT_MS from libcurl 7.16.2.

        * Right-strip URLs read from files in the test scripts
          to avoid sending requests with '\n' at the end.


Version 7.16.1
--------------

        * Added constants for all libcurl (error) return codes.  They
          are named the same as the macro constants in curl.h but prefixed
          with E_ instead of CURLE.  Return codes for the multi API are
          prefixed with M_ instead of CURLM.

        * Added CURLOPT_FTP_SSL_CCC, CURLOPT_SSH_PUBLIC_KEYFILE,
          CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPT_SSH_AUTH_TYPES.

        * Removed CLOSEPOLICY and friends since this option is now
          deprecated in libcurl.

        * Set the _use_datetime attribute on the CURLTransport class
          to unbreak xmlrpc_curl.py on Python 2.5.


Version 7.16.0 [no public release]
--------------

        * Added CURLOPT_SSL_SESSIONID_CACHE.

        * Removed SOURCE_* options since they are no longer
          supported by libcurl.


Version 7.15.5.1
----------------

        * Added test for basic ftp usage (tests/test_ftp.py).

        * Fix broken ssl mutex lock function when using
          GNU TLS (Debian bug #380156, fix by Bastian Kleineidam)


Version 7.15.5
--------------

        * Added CURLOPT_FTP_ALTERNATIVE_TO_USER,
          CURLOPT_MAX_SEND_SPEED_LARGE,
          and CURLOPT_MAX_RECV_SPEED_LARGE.


Version 7.15.4.2
----------------

        * Use SSL locking callbacks, fixes random
          crashes for multithreaded SSL connections
          (patch by Jayne <corvine at gmail.com>).


Version 7.15.4.1
----------------

        * Fixed compilation problem with C compilers
          not allowing declarations in the middle of
          code blocks (patch by
          K.S.Sreeram <sreeram at tachyontech.net>).

        * Fixed bug in curl_multi_fdset wrapping,
          max_fd < 0 is not an error (patch by
          K.S.Sreeram <sreeram at tachyontech.net>).


Version 7.15.4
--------------

        * Added support for libcurl shares, patch from
        Victor Lascurain <bittor at eleka.net>.  See the
        file tests/test_share.py for example usage.

        * Added support for CURLINFO_FTP_ENTRY_PATH.


Version 7.15.2
--------------

        * Added CURLOPT_CONNECT_ONLY, CURLINFO_LASTSOCKET,
          CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE.


Version 7.15.1
--------------

2006-01-31 Kjetil Jacobsen <kjetilja>

        * Fixed memory leak for getinfo calls that return a
          list as result.  Patch by Paul Pacheco.


Version 7.15.0
--------------

2005-10-18  Kjetil Jacobsen  <kjetilja>

        * Added CURLOPT_FTP_SKIP_PASV_IP.


Version 7.14.1
--------------

2005-09-05  Kjetil Jacobsen  <kjetilja>

        * Added CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPT_COOKIELIST as
          COOKIELIST and CURLINFO_COOKIELIST as INFO_COOKIELIST.


Version 7.14.0
--------------

2005-05-18  Kjetil Jacobsen  <kjetilja>

        * Added missing information returned from the info() method
          in the high-level interface.

        * Added the FORM_FILENAME option to the CURLFORM API
          with HTTPPOST.


Version 7.13.2
--------------

2005-03-30  Kjetil Jacobsen  <kjetilja>

        * Unbreak tests/test_gtk.py and require pygtk >= 2.0.

2005-03-15  Kjetil Jacobsen  <kjetilja>

        * Cleaned up several of the examples.

2005-03-11  Kjetil Jacobsen  <kjetilja>

        * WARNING: multi.select() now requires the previously optional
          timeout parameter.  Updated the tests and examples to reflect
          this change.  If the timeout is not set, select could block
          infinitely and cause problems for the internal timeout handling
          in the multi stack.  The problem was identified by
          <unknownsoldier93 at yahoo.com>.


Version 7.13.1
--------------

2005-03-04  Kjetil Jacobsen  <kjetilja>

        * Use METH_NOARGS where appropriate.

2005-03-03  Kjetil Jacobsen  <kjetilja>

        * Added support for CURLFORM API with HTTPPOST: Supports a
          a tuple with pairs of options and values instead of just
          supporting string contents.  See tests/test_post2.py
          for example usage.  Options are FORM_CONTENTS, FORM_FILE and
          FORM_CONTENTTYPE, corresponding to the CURLFORM_* options,
          and values are strings.

2005-02-13  Markus F.X.J. Oberhumer <mfx>

        * Read callbacks (pycurl.READFUNCTION) can now return
          pycurl.READFUNC_ABORT to immediately abort the current transfer.

        * The INFILESIZE, MAXFILESIZE, POSTFIELDSIZE and RESUME_FROM
          options now automatically use the largefile version to handle
          files > 2GB.

        * Added missing pycurl.PORT constant.


Version 7.13.0
--------------

2005-02-10  Kjetil Jacobsen  <kjetilja>

        * Added file_upload.py to examples, shows how to upload
          a file.

        * Added CURLOPT_IOCTLFUNCTION/DATA.

        * Added options from libcurl 7.13.0: FTP_ACCOUNT, SOURCE_URL,
          SOURCE_QUOTE.

        * Obsoleted options: SOURCE_HOST, SOURCE_PATH, SOURCE_PORT,
          PASV_HOST.


Version 7.12.3
--------------

2004-12-22  Markus F.X.J. Oberhumer <mfx>

        * Added CURLINFO_NUM_CONNECTS and CURLINFO_SSL_ENGINES.

        * Added some other missing constants.

        * Updated pycurl.version_info() to return a 12-tuple
          instead of a 9-tuple.


Version 7.12.2
--------------

2004-10-15  Kjetil Jacobsen  <kjetilja>

        * Added CURLOPT_FTPSSLAUTH (and CURLFTPAUTH_*).

        * Added CURLINFO_OS_ERRNO.

2004-08-17 Kjetil Jacobsen <kjetilja>

        * Use LONG_LONG instead of PY_LONG_LONG to make pycurl compile
          on Python versions < 2.3 (fix from Domenico Andreoli
          <cavok at libero.it>).


Version 7.12.1
--------------

2004-08-02  Kjetil Jacobsen  <kjetilja>

        * Added INFOTYPE_SSL_DATA_IN/OUT.

2004-07-16  Markus F.X.J. Oberhumer <mfx>

        * WARNING: removed deprecated PROXY_, TIMECOND_ and non-prefixed
          INFOTYPE constant names. See ChangeLog entry 2003-06-10.

2004-06-21  Kjetil Jacobsen  <kjetilja>

        * Added test program for HTTP post using the read callback (see
          tests/test_post3.py for details).

        * Use the new CURL_READFUNC_ABORT return code where appropriate
          to avoid hanging in perform() when read callbacks are used.

        * Added support for libcurl 7.12.1 CURLOPT features:
          SOURCE_HOST, SOURCE_USERPWD, SOURCE_PATH, SOURCE_PORT,
          PASV_HOST, SOURCE_PREQUOTE, SOURCE_POSTQUOTE.

2004-06-08  Markus F.X.J. Oberhumer <mfx>

        * Setting CURLOPT_POSTFIELDS now allows binary data and
          automatically sets CURLOPT_POSTFIELDSIZE for you. If you really
          want a different size you have to manually set POSTFIELDSIZE
          after setting POSTFIELDS.
          (Based on a patch by Martin Muenstermann).

2004-06-05  Markus F.X.J. Oberhumer <mfx>

        * Added stricter checks within the callback handlers.

        * Unify the behaviour of int and long parameters where appropriate.


Version 7.12
------------

2004-05-18  Kjetil Jacobsen  <kjetilja>

        * WARNING: To simplify code maintenance pycurl now requires
          libcurl 7.11.2 and Python 2.2 or newer to work.

        * GC support is now always enabled.


Version 7.11.3
--------------

2004-04-30  Kjetil Jacobsen  <kjetilja>

        * Do not use the deprecated curl_formparse function.
          API CHANGE: HTTPPOST now takes a list of tuples where each
          tuple contains a form name and a form value, both strings
          (see test/test_post2.py for example usage).

        * Found a possible reference count bug in the multithreading
          code which may have contributed to the long-standing GC
          segfault which has haunted pycurl.  Fingers crossed.


Version 7.11.2
--------------

2004-04-21  Kjetil Jacobsen  <kjetilja>

        * Added support for libcurl 7.11.2 CURLOPT features:
          CURLOPT_TCP_NODELAY.

2004-03-25 Kjetil Jacobsen   <kjetilja>

        * Store Python longs in off_t with PyLong_AsLongLong instead
          of PyLong_AsLong.  Should make the options which deal
          with large files behave a little better.  Note that this
          requires the long long support in Python 2.2 or newer to
          work properly.


Version 7.11.1
--------------

2004-03-16  Kjetil Jacobsen  <kjetilja>

        * WARNING: Removed support for the PASSWDFUNCTION callback, which
          is no longer supported by libcurl.

2004-03-15  Kjetil Jacobsen  <kjetilja>

        * Added support for libcurl 7.11.1 CURLOPT features:
          CURLOPT_POSTFIELDSIZE_LARGE.


Version 7.11.0
--------------

2004-02-11  Kjetil Jacobsen  <kjetilja>

        * Added support for libcurl 7.11.0 CURLOPT features:
          INFILESIZE_LARGE, RESUME_FROM_LARGE, MAXFILESIZE_LARGE
          and FTP_SSL.

        * Circular garbage collection support can now be enabled or
          disabled by passing the '--use-gc=[1|0]' parameter to setup.py
          when building pycurl.

        * HTTP_VERSION options are known as CURL_HTTP_VERSION_NONE,
          CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1 and
          CURL_HTTP_VERSION_LAST.

2003-11-16  Markus F.X.J. Oberhumer <mfx>

        * Added support for these new libcurl 7.11.0 features:
          CURLOPT_NETRC_FILE.


Version 7.10.8
--------------

2003-11-04  Markus F.X.J. Oberhumer <mfx>

        * Added support for these new libcurl 7.10.8 features:
          CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_IPRESOLVE,
          CURLOPT_MAXFILESIZE,
          CURLINFO_HTTPAUTH_AVAIL, CURLINFO_PROXYAUTH_AVAIL,
          CURL_IPRESOLVE_* constants.

        * Added support for these new libcurl 7.10.7 features:
          CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPT_PROXYAUTH,
          CURLINFO_HTTP_CONNECTCODE.


2003-10-28  Kjetil Jacobsen  <kjetilja>

        * Added missing CURLOPT_ENCODING option (patch by Martijn
          Boerwinkel <xim at xs4all.nl>)


Version 7.10.6
--------------

2003-07-29  Markus F.X.J. Oberhumer <mfx>

        * Started working on support for CURLOPT_SSL_CTX_FUNCTION and
          CURLOPT_SSL_CTX_DATA (libcurl-7.10.6) - not yet finished.

2003-06-10  Markus F.X.J. Oberhumer <mfx>

        * Added support for CURLOPT_HTTPAUTH (libcurl-7.10.6), including
          the new HTTPAUTH_BASIC, HTTPAUTH_DIGEST, HTTPAUTH_GSSNEGOTIATE
          and HTTPAUTH_NTML constants.

        * Some constants were renamed for consistency:

          All curl_infotype constants are now prefixed with "INFOTYPE_",
          all curl_proxytype constants are prefixed with "PROXYTYPE_" instead
          of "PROXY_", and all curl_TimeCond constants are now prefixed
          with "TIMECONDITION_" instead of "TIMECOND_".

          (The old names are still available but will get removed
          in a future release.)

        * WARNING: Removed the deprecated pycurl.init() and pycurl.multi_init()
          names - use pycurl.Curl() and pycurl.CurlMulti() instead.

        * WARNING: Removed the deprecated Curl.cleanup() and
          CurlMulti.cleanup() methods - use Curl.close() and
          CurlMulti.close() instead.


Version 7.10.5
--------------

2003-05-15  Markus F.X.J. Oberhumer <mfx>

        * Added support for CURLOPT_FTP_USE_EPRT (libcurl-7.10.5).

        * Documentation updates.

2003-05-07  Eric S. Raymond  <esr>

        * Lifted all HTML docs to clean XHTML, verified by tidy.

2003-05-02  Markus F.X.J. Oberhumer <mfx>

        * Fixed some `int' vs. `long' mismatches that affected 64-bit systems.

        * Fixed wrong pycurl.CAPATH constant.

2003-05-01  Markus F.X.J. Oberhumer <mfx>

        * Added new method Curl.errstr() which returns the internal
        libcurl error buffer string of the handle.


Version 7.10.4.2
----------------

2003-04-15  Markus F.X.J. Oberhumer <mfx>

        * Allow compilation against the libcurl-7.10.3 release - some
        recent Linux distributions (e.g. Mandrake 9.1) ship with 7.10.3,
        and apart from the new CURLOPT_UNRESTRICTED_AUTH option there is
        no need that we require libcurl-7.10.4.


Version 7.10.4
--------------

2003-04-01  Kjetil Jacobsen  <kjetilja>

        * Markus added CURLOPT_UNRESTRICTED_AUTH (libcurl-7.10.4).

2003-02-25  Kjetil Jacobsen  <kjetilja>

        * Fixed some broken test code and removed the fileupload test
        since it didn't work properly.

2003-01-28  Kjetil Jacobsen  <kjetilja>

        * Some documentation updates by Markus and me.

2003-01-22  Kjetil Jacobsen  <kjetilja>

        * API CHANGE: the CurlMulti.info_read() method now returns
        a separate array with handles that failed.  Each entry in this array
        is a tuple with (curl object, error number, error message).
        This addition makes it simpler to do error checking of individual
        curl objects when using the multi interface.


Version 7.10.3
--------------

2003-01-13  Kjetil Jacobsen  <kjetilja>

        * PycURL memory usage has been reduced.

2003-01-10  Kjetil Jacobsen  <kjetilja>

        * Added 'examples/retriever-multi.py' which shows how to retrieve
        a set of URLs concurrently using the multi interface.

2003-01-09  Kjetil Jacobsen  <kjetilja>

        * Added support for CURLOPT_HTTP200ALIASES.

2002-11-22  Kjetil Jacobsen  <kjetilja>

        * Updated pycurl documentation in the 'doc' directory.

2002-11-21  Kjetil Jacobsen  <kjetilja>

        * Updated and improved 'examples/curl.py'.

        * Added 'tests/test_multi6.py' which shows how to use the
        info_read method with CurlMulti.

2002-11-19  Kjetil Jacobsen  <kjetilja>

        * Added new method CurlMulti.info_read().


Version 7.10.2
--------------

2002-11-14  Kjetil Jacobsen <kjetilja>

        * Free options set with setopt after cleanup is called, as cleanup
        assumes that options are still valid when invoked.  This fixes the
        bug with COOKIEJAR reported by Bastiaan Naber
        <bastiaan at ricardis.tudelft.nl>.

2002-11-06  Markus F.X.J. Oberhumer <mfx>

        * Install documentation under /usr/share/doc instead of /usr/doc.
        Also, start shipping the (unfinished) HTML docs and some
        basic test scripts.

2002-10-30  Markus F.X.J. Oberhumer <mfx>

        * API CHANGE: For integral values, Curl.getinfo() now returns a
        Python-int instead of a Python-long.


Version 7.10.1
--------------

2002-10-03  Markus F.X.J. Oberhumer <mfx>

        * Added new module-level function version_info() from
        libcurl-7.10.


Version 7.10
------------

2002-09-13  Kjetil Jacobsen  <kjetilja>

        * Added commandline options to setup.py for specifying the path to
        'curl-config' (non-windows) and the curl installation directory
        (windows).  See the 'INSTALL' file for details.

        * Added CURLOPT_ENCODING, CURLOPT_NOSIGNAL and CURLOPT_BUFFERSIZE
        from libcurl-7.10 (by Markus Oberhumer).


Version 7.9.8.4
---------------

2002-08-28  Kjetil Jacobsen  <kjetilja>

        * Added a simple web-browser example based on gtkhtml and pycurl.
        See the file 'examples/gtkhtml_demo.py' for details.  The example
        requires a working installation of gnome-python with gtkhtml
        bindings enabled (pass --with-gtkhtml to gnome-python configure).

2002-08-14  Kjetil Jacobsen  <kjetilja>

        * Added new method 'select' on CurlMulti objects.  Example usage
        in 'tests/test_multi5.py'.  This method is just an optimization of
        the combined use of fdset and select.

2002-08-12  Kjetil Jacobsen  <kjetilja>

        * Added support for curl_multi_fdset.  See the file
        'tests/test_multi4.py' for example usage.  Contributed by Conrad
        Steenberg <conrad at hep.caltech.edu>.

        * perform() on multi objects now returns a tuple (result, number
        of handles) like the libcurl interface does.

2002-08-08  Kjetil Jacobsen  <kjetilja>

        * Added the 'sfquery' script which retrieves a SourceForge XML
        export object for a given project.  See the file 'examples/sfquery.py'
        for details and usage.  'sfquery' was contributed by Eric
        S. Raymond <esr at thyrsus.com>.

2002-07-20  Markus F.X.J. Oberhumer <mfx>

        * API enhancements: added Curl() and CurlMulti() as aliases for
        init() and multi_init(), and added close() methods as aliases
        for the cleanup() methods. The new names much better match
        the actual intended use of the objects, and they also nicely
        correspond to Python's file object.

        * Also, all constants for Curl.setopt() and Curl.getinfo() are now
        visible from within Curl objects.

        All changes are fully backward-compatible.


Version 7.9.8.3
---------------

2002-07-16  Markus F.X.J. Oberhumer <mfx>

        * Under Python 2.2 or better, Curl and CurlMulti objects now
        automatically participate in cyclic garbage collection
        (using the gc module).


Version 7.9.8.2
---------------

2002-07-05  Markus F.X.J. Oberhumer <mfx>

        * Curl and CurlMulti objects now support standard Python attributes.
        See tests/test_multi2.py for an example.

2002-07-02  Kjetil Jacobsen  <kjetilja>

        * Added support for the multi-interface.


Version 7.9.8.1
---------------

2002-06-25  Markus F.X.J. Oberhumer <mfx>

        * Fixed a couple of `int' vs. `size_t' mismatches in callbacks
        and Py_BuildValue() calls.

2002-06-25  Kjetil Jacobsen  <kjetilja>

        * Use 'double' type instead of 'size_t' for progress callbacks
        (by Conrad Steenberg <conrad at hep.caltech.edu>).  Also cleaned up
        some other type mismatches in the callback interfaces.

2002-06-24  Kjetil Jacobsen  <kjetilja>

        * Added example code on how to upload a file using HTTPPOST in
        pycurl (code by Amit Mongia <amit_mongia at hotmail.com>).  See the
        file 'test_fileupload.py' for details.


Version 7.9.8
-------------

2002-06-24  Kjetil Jacobsen  <kjetilja>

        * Resolved some build problems on Windows (by Markus Oberhumer).

2002-06-19  Kjetil Jacobsen  <kjetilja>

        * Added CURLOPT_CAPATH.

        * Added option constants for CURLOPT_NETRC: CURL_NETRC_OPTIONAL,
        CURL_NETRC_IGNORED and CURL_NETRC_REQUIRED.

        * Added option constants for CURLOPT_TIMECONDITION:
        TIMECOND_IFMODSINCE and TIMECOND_IFUNMODSINCE.

        * Added an simple example crawler, which downloads documents
        listed in a file with a configurable number of worker threads.
        See the file 'crawler.py' in the 'tests' directory for details.

        * Removed the redundant 'test_xmlrpc2.py' test script.

        * Disallow recursive callback invocations (by Markus Oberhumer).

2002-06-18  Kjetil Jacobsen  <kjetilja>

        * Made some changes to setup.py which should fix the build
        problems on RedHat 7.3 (suggested by Benji <benji at kioza.net>).

        * Use CURLOPT_READDATA instead of CURLOPT_INFILE, and
        CURLOPT_WRITEDATA instead of CURLOPT_FILE.  Also fixed some
        reference counting bugs with file objects.

        * CURLOPT_FILETIME and CURLINFO_FILETIME had a namespace clash
        which caused them not to work.  Use OPT_FILETIME for setopt() and
        INFO_FILETIME for getinfo().  See example usage in
        'test_getinfo.py' for details.


Version 7.9.7
-------------

2002-05-20  Kjetil Jacobsen  <kjetilja>

        * New versioning scheme.  Pycurl now has the same version number
        as the libcurl version it was built with.  The pycurl version
        number thus indicates which version of libcurl is required to run.

2002-05-17  Kjetil Jacobsen  <kjetilja>

        * Added CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT.

2002-04-27  Kjetil Jacobsen  <kjetilja>

        * Fixed potential memory leak and thread race (by Markus
        Oberhumer).


Version 0.4.9
-------------

2002-04-15  Kjetil Jacobsen  <kjetilja>

        * Added CURLOPT_DEBUGFUNCTION to allow debug callbacks to be
        specified (see the file 'test_debug.py' for details on how to use
        debug callbacks).

        * Added CURLOPT_DNS_USE_GLOBAL_CACHE and
        CURLOPT_DNS_CACHE_TIMEOUT.

        * Fixed a segfault when finalizing curl objects in Python 1.5.2.

        * Now requires libcurl 7.9.6 or greater.

2002-04-12  Kjetil Jacobsen  <kjetilja>

        * Added 'test_post2.py' file which is another example on how to
        issue POST requests.

2002-04-11  Markus F.X.J. Oberhumer <mfx>

        * Added the 'test_post.py' file which demonstrates the use of
        POST requests.


Version 0.4.8
-------------

2002-03-07  Kjetil Jacobsen  <kjetilja>

        * Added CURLOPT_PREQUOTE.

        * Now requires libcurl 7.9.5 or greater.

        * Other minor code cleanups and bugfixes.

2002-03-05  Kjetil Jacobsen  <kjetilja>

        * Do not allow WRITEFUNCTION and WRITEHEADER on the same handle.


Version 0.4.7
-------------

2002-02-27  Kjetil Jacobsen  <kjetilja>

        * Abort callback if the thread state of the calling thread cannot
        be determined.

        * Check that the installed version of libcurl matches the
        requirements of pycurl.

2002-02-26  Kjetil Jacobsen  <kjetilja>

        * Clarence Garnder <clarence at silcom.com> found a bug where string
        arguments to setopt sometimes were prematurely deallocated, this
        should now be fixed.

2002-02-21  Kjetil Jacobsen  <kjetilja>

        * Added the 'xmlrpc_curl.py' file which implements a transport
        for xmlrpclib (xmlrpclib is part of Python 2.2).

        * Added CURLINFO_CONTENT_TYPE.

        * Added CURLOPT_SSLCERTTYPE, CURLOPT_SSLKEY, CURLOPT_SSLKEYTYPE,
        CURLOPT_SSLKEYPASSWD, CURLOPT_SSLENGINE and
        CURLOPT_SSLENGINE_DEFAULT.

        * When thrown, the pycurl.error exception is now a tuple consisting
        of the curl error code and the error message.

        * Now requires libcurl 7.9.4 or greater.

2002-02-19  Kjetil Jacobsen  <kjetilja>

        * Fixed docstring for getopt() function.

2001-12-18  Kjetil Jacobsen  <kjetilja>

        * Updated the INSTALL information for Win32.

2001-12-12  Kjetil Jacobsen  <kjetilja>

        * Added missing link flag to make pycurl build on MacOS X (by Matt
        King <matt at gnik.com>).

2001-12-06  Kjetil Jacobsen  <kjetilja>

        * Added CURLINFO_STARTTRANSFER_TIME and CURLOPT_FTP_USE_EPSV from
        libcurl 7.9.2.

2001-12-01  Markus F.X.J. Oberhumer <mfx>

        * Added the 'test_stringio.py' file which demonstrates the use of
        StringIO objects as callback.

2001-12-01  Markus F.X.J. Oberhumer <mfx>

        * setup.py: Do not remove entries from a list while iterating
        over it.

2001-11-29  Kjetil Jacobsen  <kjetilja>

        * Added code in setup.py to install on Windows.  Requires some
        manual configuration (by Tino Lange <Tino.Lange at gmx.de>).

2001-11-27  Kjetil Jacobsen  <kjetilja>

        * Improved detection of where libcurl is installed in setup.py.
        Should make it easier to install pycurl when libcurl is not
        located in regular lib/include paths.

2001-11-05  Kjetil Jacobsen  <kjetilja>

        * Some of the newer options to setopt were missing, this should
        now be fixed.

2001-11-04  Kjetil Jacobsen  <kjetilja>

        * Exception handling has been improved and should no longer throw
        spurious exceptions (by Markus F.X.J. Oberhumer
        <markus at oberhumer.com>).

2001-10-15  Kjetil Jacobsen  <kjetilja>

        * Refactored the test_gtk.py script to avoid global variables.

2001-10-12  Kjetil Jacobsen  <kjetilja>

        * Added module docstrings, terse perhaps, but better than nothing.

        * Added the 'basicfirst.py' file which is a Python version of the
        corresponding Perl script by Daniel.

        * PycURL now works properly under Python 1.5 and 1.6 (by Markus
        F.X.J. Oberhumer <markus at oberhumer.com>).

        * Allow C-functions and Python methods as callbacks (by Markus
        F.X.J. Oberhumer <markus at oberhumer.com>).

        * Allow None as success result of write, header and progress
        callback invocations (by Markus F.X.J. Oberhumer
        <markus at oberhumer.com>).

        * Added the 'basicfirst2.py' file which demonstrates the use of a
        class method as callback instead of just a function.

2001-08-21  Kjetil Jacobsen  <kjetilja>

        * Cleaned up the script with GNOME/PycURL integration.

2001-08-20  Kjetil Jacobsen  <kjetilja>

        * Added another test script for shipping XML-RPC requests which
        uses py-xmlrpc to encode the arguments (tests/test_xmlrpc2.py).

2001-08-20  Kjetil Jacobsen  <kjetilja>

        * Added test script for using PycURL and GNOME (tests/test_gtk.py).

2001-08-20  Kjetil Jacobsen  <kjetilja>

        * Added test script for using XML-RPC (tests/test_xmlrpc.py).

        * Added more comments to the test sources.

2001-08-06  Kjetil Jacobsen  <kjetilja>

        * Renamed module namespace to pycurl instead of curl.

2001-08-06  Kjetil Jacobsen  <kjetilja>

        * Set CURLOPT_VERBOSE to 0 by default.

2001-06-29  Kjetil Jacobsen  <kjetilja>

        * Updated INSTALL, curl version 7.8 or greater is now mandatory to
        use pycurl.

2001-06-13  Kjetil Jacobsen  <kjetilja>

        * Set NOPROGRESS to 1 by default.

2001-06-07  Kjetil Jacobsen  <kjetilja>

        * Added global_init/cleanup.

2001-06-06  Kjetil Jacobsen  <kjetilja>

        * Added HEADER/PROGRESSFUNCTION callbacks (see files in tests/).

        * Added PASSWDFUNCTION callback (untested).

        * Added READFUNCTION callback (untested).

2001-06-05  Kjetil Jacobsen  <kjetilja>

        * WRITEFUNCTION callbacks now work (see tests/test_cb.py for details).

        * Preliminary distutils installation.

        * Added CLOSEPOLICY constants to module namespace.

2001-06-04  Kjetil Jacobsen  <kjetilja>

        * Return -1 on error from Python callback in WRITEFUNCTION callback.

2001-06-01  Kjetil Jacobsen  <kjetilja>

        * Moved source to src and tests to tests directory.

2001-05-31  Kjetil Jacobsen  <kjetilja>

        * Added better type checking for setopt.

2001-05-30  Kjetil Jacobsen  <kjetilja>

        * Moved code to sourceforge.

        * Added getinfo support.


# vi:ts=8:et
doc/pycurl/COPYING-LGPL000064400000063642150335352040010431 0ustar00                  GNU LESSER GENERAL PUBLIC LICENSE
                       Version 2.1, February 1999

 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

  When we speak of free software, we are referring to freedom of use,
not price.  Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.

  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.

  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.

  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.

  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

                  GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)

  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.

  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) The modified work must itself be a software library.

    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.

    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.

    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.

    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.

  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:

    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)

    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.

    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.

    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.

    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.

  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.

    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.

  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.

  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.

  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

                            NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

                     END OF TERMS AND CONDITIONS

           How to Apply These Terms to Your New Libraries

  If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

  To apply these terms, attach the following notices to the library.  It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the library's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!
doc/pycurl/examples/linksys.py000064400000052413150335352040012520 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et
#
# linksys.py -- program settings on a Linkys router
#
# This tool is designed to help you recover from the occasional episodes
# of catatonia that afflict Linksys boxes. It allows you to batch-program
# them rather than manually entering values to the Web interface.  Commands
# are taken from the command line first, then standard input.
#
# The somewhat spotty coverage of status queries is because I only did the
# ones that were either (a) easy, or (b) necessary.  If you want to know the
# status of the box, look at the web interface.
#
# This code has been tested against the following hardware:
#
#   Hardware    Firmware
#   ----------  ---------------------
#   BEFW11S4v2  1.44.2.1, Dec 20 2002
#
# The code is, of course, sensitive to changes in the names of CGI pages
# and field names.
#
# Note: to make the no-arguments form work, you'll need to have the following
# entry in your ~/.netrc file.  If you have changed the router IP address or
# name/password, modify accordingly.
#
# machine 192.168.1.1
#   login ""
#   password admin
#
# By Eric S. Raymond, August April 2003.  All rites reversed.

import sys, re, curl, exceptions

def print_stderr(arg):
    sys.stderr.write(arg)
    sys.stderr.write("\n")

class LinksysError(exceptions.Exception):
    def __init__(self, *args):
        self.args = args

class LinksysSession:
    months = 'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec'

    WAN_CONNECT_AUTO = '1'
    WAN_CONNECT_STATIC = '2'
    WAN_CONNECT_PPOE = '3'
    WAN_CONNECT_RAS = '4'
    WAN_CONNECT_PPTP = '5'
    WAN_CONNECT_HEARTBEAT = '6'

    # Substrings to check for on each page load.
    # This may enable us to detect when a firmware change has hosed us.
    check_strings = {
        "":           "basic setup functions",
        "Passwd.htm": "For security reasons,",
        "DHCP.html":  "You can configure the router to act as a DHCP",
        "Log.html":   "There are some log settings and lists in this page.",
        "Forward.htm":"Port forwarding can be used to set up public services",
        }

    def __init__(self):
        self.actions = []
        self.host = "http://192.168.1.1"
        self.verbosity = False
        self.pagecache = {}

    def set_verbosity(self, flag):
        self.verbosity = flag

    # This is not a performance hack -- we need the page cache to do
    # sanity checks at configure time.
    def cache_load(self, page):
        if page not in self.pagecache:
            fetch = curl.Curl(self.host)
            fetch.set_verbosity(self.verbosity)
            fetch.get(page)
            self.pagecache[page] = fetch.body()
            if fetch.answered("401"):
                raise LinksysError("authorization failure.", True)
            elif not fetch.answered(LinksysSession.check_strings[page]):
                del self.pagecache[page]
                raise LinksysError("check string for page %s missing!" % os.path.join(self.host, page), False)
            fetch.close()
    def cache_flush(self):
        self.pagecache = {}

    # Primitives
    def screen_scrape(self, page, template):
        self.cache_load(page)
        match = re.compile(template).search(self.pagecache[page])
        if match:
            result = match.group(1)
        else:
            result = None
        return result
    def get_MAC_address(self, page, prefix):
        return self.screen_scrape("", prefix+r":[^M]*\(MAC Address: *([^)]*)")
    def set_flag(self, page, flag, value):
        if value:
            self.actions.append(page, flag, "1")
        else:
            self.actions.append(page, flag, "0")
    def set_IP_address(self, page, cgi, role, ip):
        ind = 0
        for octet in ip.split("."):
            self.actions.append(("", "F1", role + repr(ind+1), octet))
            ind += 1

    # Scrape configuration data off the main page
    def get_firmware_version(self):
        # This is fragile.  There is no distinguishing tag before the firmware
        # version, so we have to key off the pattern of the version number.
        # Our model is ">1.44.2.1, Dec 20 2002<"
        return self.screen_scrape("", ">([0-9.v]*, (" + \
                                  LinksysSession.months + ")[^<]*)<", )
    def get_LAN_MAC(self):
        return self.get_MAC_address("", r"LAN IP Address")
    def get_Wireless_MAC(self):
        return self.get_MAC_address("", r"Wireless")
    def get_WAN_MAC(self):
        return self.get_MAC_address("", r"WAN Connection Type")

    # Set configuration data on the main page
    def set_host_name(self, name):
        self.actions.append(("", "hostName", name))
    def set_domain_name(self, name):
        self.actions.append(("", "DomainName", name))
    def set_LAN_IP(self, ip):
        self.set_IP_address("", "ipAddr", ip)
    def set_LAN_netmask(self, ip):
        if not ip.startswith("255.255.255."):
            raise ValueError
        lastquad = ip.split(".")[-1]
        if lastquad not in ("0", "128", "192", "240", "252"):
            raise ValueError
        self.actions.append("", "netMask", lastquad)
    def set_wireless(self, flag):
        self.set_flag("", "wirelessStatus")
    def set_SSID(self, ssid):
        self.actions.append(("", "wirelessESSID", ssid))
    def set_SSID_broadcast(self, flag):
        self.set_flag("", "broadcastSSID")
    def set_channel(self, channel):
        self.actions.append(("", "wirelessChannel", channel))
    def set_WEP(self, flag):
        self.set_flag("", "WepType")
    # FIXME: Add support for setting WEP keys
    def set_connection_type(self, type):
        self.actions.append(("", "WANConnectionType", type))
    def set_WAN_IP(self, ip):
        self.set_IP_address("", "aliasIP", ip)
    def set_WAN_netmask(self, ip):
        self.set_IP_address("", "aliasMaskIP", ip)
    def set_WAN_gateway_address(self, ip):
        self.set_IP_address("", "routerIP", ip)
    def set_DNS_server(self, index, ip):
        self.set_IP_address("", "dns" + "ABC"[index], ip)

    # Set configuration data on the password page
    def set_password(self, str):
        self.actions.append("Passwd.htm","sysPasswd", str)
        self.actions.append("Passwd.htm","sysPasswdConfirm", str)
    def set_UPnP(self, flag):
        self.set_flag("Passwd.htm", "UPnP_Work")
    def reset(self):
        self.actions.append("Passwd.htm", "FactoryDefaults")

    # DHCP features
    def set_DHCP(self, flag):
        if flag:
            self.actions.append("DHCP.htm","dhcpStatus","Enable")
        else:
            self.actions.append("DHCP.htm","dhcpStatus","Disable")
    def set_DHCP_starting_IP(self, val):
        self.actions.append("DHCP.htm","dhcpS4", str(val))
    def set_DHCP_users(self, val):
        self.actions.append("DHCP.htm","dhcpLen", str(val))
    def set_DHCP_lease_time(self, val):
        self.actions.append("DHCP.htm","leaseTime", str(val))
    def set_DHCP_DNS_server(self, index, ip):
        self.set_IP_address("DHCP.htm", "dns" + "ABC"[index], ip)
    # FIXME: add support for setting WINS key

    # Logging features
    def set_logging(self, flag):
        if flag:
            self.actions.append("Log.htm", "rLog", "Enable")
        else:
            self.actions.append("Log.htm", "rLog", "Disable")
    def set_log_address(self, val):
        self.actions.append("DHCP.htm","trapAddr3", str(val))

    # The AOL parental control flag is not supported by design.

    # FIXME: add Filters and other advanced features

    def configure(self):
        "Write configuration changes to the Linksys."
        if self.actions:
            fields = []
            self.cache_flush()
            for (page, field, value) in self.actions:
                self.cache_load(page)
                if self.pagecache[page].find(field) == -1:
                    print_stderr("linksys: field %s not found where expected in page %s!" % (field, os.path.join(self.host, page)))
                    continue
                else:
                    fields.append((field, value))
            # Clearing the action list before fieldsping is deliberate.
            # Otherwise we could get permanently wedged by a 401.
            self.actions = []
            transaction = curl.Curl(self.host)
            transaction.set_verbosity(self.verbosity)
            transaction.get("Gozila.cgi", tuple(fields))
            transaction.close()

if __name__ == "__main__":
    import os, cmd

    class LinksysInterpreter(cmd.Cmd):
        """Interpret commands to perform LinkSys programming actions."""
        def __init__(self):
            cmd.Cmd.__init__(self)
            self.session = LinksysSession()
            if os.isatty(0):
                print("Type ? or `help' for help.")
                self.prompt = self.session.host + ": "
            else:
                self.prompt = ""
                print("Bar1")

        def flag_command(self, func, line):
            if line.strip() in ("on", "enable", "yes"):
                func(True)
            elif line.strip() in ("off", "disable", "no"):
                func(False)
            else:
                print_stderr("linksys: unknown switch value")
            return 0

        def do_connect(self, line):
            newhost = line.strip()
            if newhost:
                self.session.host = newhost
                self.session.cache_flush()
                self.prompt = self.session.host + ": "
            else:
                print(self.session.host)
            return 0
        def help_connect(self):
            print("Usage: connect [<hostname-or-IP>]")
            print("Connect to a Linksys by name or IP address.")
            print("If no argument is given, print the current host.")

        def do_status(self, line):
            self.session.cache_load("")
            if "" in self.session.pagecache:
                print("Firmware:", self.session.get_firmware_version())
                print("LAN MAC:", self.session.get_LAN_MAC())
                print("Wireless MAC:", self.session.get_Wireless_MAC())
                print("WAN MAC:", self.session.get_WAN_MAC())
                print(".")
            return 0
        def help_status(self):
            print("Usage: status")
            print("The status command shows the status of the Linksys.")
            print("It is mainly useful as a sanity check to make sure")
            print("the box is responding correctly.")

        def do_verbose(self, line):
            self.flag_command(self.session.set_verbosity, line)
        def help_verbose(self):
            print("Usage: verbose {on|off|enable|disable|yes|no}")
            print("Enables display of HTTP requests.")

        def do_host(self, line):
            self.session.set_host_name(line)
            return 0
        def help_host(self):
            print("Usage: host <hostname>")
            print("Sets the Host field to be queried by the ISP.")

        def do_domain(self, line):
            print("Usage: host <domainname>")
            self.session.set_domain_name(line)
            return 0
        def help_domain(self):
            print("Sets the Domain field to be queried by the ISP.")

        def do_lan_address(self, line):
            self.session.set_LAN_IP(line)
            return 0
        def help_lan_address(self):
            print("Usage: lan_address <ip-address>")
            print("Sets the LAN IP address.")

        def do_lan_netmask(self, line):
            self.session.set_LAN_netmask(line)
            return 0
        def help_lan_netmask(self):
            print("Usage: lan_netmask <ip-mask>")
            print("Sets the LAN subnetwork mask.")

        def do_wireless(self, line):
            self.flag_command(self.session.set_wireless, line)
            return 0
        def help_wireless(self):
            print("Usage: wireless {on|off|enable|disable|yes|no}")
            print("Switch to enable or disable wireless features.")

        def do_ssid(self, line):
            self.session.set_SSID(line)
            return 0
        def help_ssid(self):
            print("Usage: ssid <string>")
            print("Sets the SSID used to control wireless access.")

        def do_ssid_broadcast(self, line):
            self.flag_command(self.session.set_SSID_broadcast, line)
            return 0
        def help_ssid_broadcast(self):
            print("Usage: ssid_broadcast {on|off|enable|disable|yes|no}")
            print("Switch to enable or disable SSID broadcast.")

        def do_channel(self, line):
            self.session.set_channel(line)
            return 0
        def help_channel(self):
            print("Usage: channel <number>")
            print("Sets the wireless channel.")

        def do_wep(self, line):
            self.flag_command(self.session.set_WEP, line)
            return 0
        def help_wep(self):
            print("Usage: wep {on|off|enable|disable|yes|no}")
            print("Switch to enable or disable WEP security.")

        def do_wan_type(self, line):
            try:
                type=eval("LinksysSession.WAN_CONNECT_"+line.strip().upper())
                self.session.set_connection_type(type)
            except ValueError:
                print_stderr("linksys: unknown connection type.")
            return 0
        def help_wan_type(self):
            print("Usage: wan_type {auto|static|ppoe|ras|pptp|heartbeat}")
            print("Set the WAN connection type.")

        def do_wan_address(self, line):
            self.session.set_WAN_IP(line)
            return 0
        def help_wan_address(self):
            print("Usage: wan_address <ip-address>")
            print("Sets the WAN IP address.")

        def do_wan_netmask(self, line):
            self.session.set_WAN_netmask(line)
            return 0
        def help_wan_netmask(self):
            print("Usage: wan_netmask <ip-mask>")
            print("Sets the WAN subnetwork mask.")

        def do_wan_gateway(self, line):
            self.session.set_WAN_gateway(line)
            return 0
        def help_wan_gateway(self):
            print("Usage: wan_gateway <ip-address>")
            print("Sets the LAN subnetwork mask.")

        def do_dns(self, line):
            (index, address) = line.split()
            if index in ("1", "2", "3"):
                self.session.set_DNS_server(eval(index), address)
            else:
                print_stderr("linksys: server index out of bounds.")
            return 0
        def help_dns(self):
            print("Usage: dns {1|2|3} <ip-mask>")
            print("Sets a primary, secondary, or tertiary DNS server address.")

        def do_password(self, line):
            self.session.set_password(line)
            return 0
        def help_password(self):
            print("Usage: password <string>")
            print("Sets the router password.")

        def do_upnp(self, line):
            self.flag_command(self.session.set_UPnP, line)
            return 0
        def help_upnp(self):
            print("Usage: upnp {on|off|enable|disable|yes|no}")
            print("Switch to enable or disable Universal Plug and Play.")

        def do_reset(self, line):
            self.session.reset()
        def help_reset(self):
            print("Usage: reset")
            print("Reset Linksys settings to factory defaults.")

        def do_dhcp(self, line):
            self.flag_command(self.session.set_DHCP, line)
        def help_dhcp(self):
            print("Usage: dhcp {on|off|enable|disable|yes|no}")
            print("Switch to enable or disable DHCP features.")

        def do_dhcp_start(self, line):
            self.session.set_DHCP_starting_IP(line)
        def help_dhcp_start(self):
            print("Usage: dhcp_start <number>")
            print("Set the start address of the DHCP pool.")

        def do_dhcp_users(self, line):
            self.session.set_DHCP_users(line)
        def help_dhcp_users(self):
            print("Usage: dhcp_users <number>")
            print("Set number of address slots to allocate in the DHCP pool.")

        def do_dhcp_lease(self, line):
            self.session.set_DHCP_lease(line)
        def help_dhcp_lease(self):
            print("Usage: dhcp_lease <number>")
            print("Set number of address slots to allocate in the DHCP pool.")

        def do_dhcp_dns(self, line):
            (index, address) = line.split()
            if index in ("1", "2", "3"):
                self.session.set_DHCP_DNS_server(eval(index), address)
            else:
                print_stderr("linksys: server index out of bounds.")
            return 0
        def help_dhcp_dns(self):
            print("Usage: dhcp_dns {1|2|3} <ip-mask>")
            print("Sets primary, secondary, or tertiary DNS server address.")

        def do_logging(self, line):
            self.flag_command(self.session.set_logging, line)
        def help_logging(self):
            print("Usage: logging {on|off|enable|disable|yes|no}")
            print("Switch to enable or disable session logging.")

        def do_log_address(self, line):
            self.session.set_Log_address(line)
        def help_log_address(self):
            print("Usage: log_address <number>")
            print("Set the last quad of the address to which to log.")

        def do_configure(self, line):
            self.session.configure()
            return 0
        def help_configure(self):
            print("Usage: configure")
            print("Writes the configuration to the Linksys.")

        def do_cache(self, line):
            print(self.session.pagecache)
        def help_cache(self):
            print("Usage: cache")
            print("Display the page cache.")

        def do_quit(self, line):
            return 1
        def help_quit(self, line):
            print("The quit command ends your linksys session without")
            print("writing configuration changes to the Linksys.")
        def do_EOF(self, line):
            print("")
            self.session.configure()
            return 1
        def help_EOF(self):
            print("The EOF command writes the configuration to the linksys")
            print("and ends your session.")

        def default(self, line):
            """Pass the command through to be executed by the shell."""
            os.system(line)
            return 0

        def help_help(self):
            print("On-line help is available through this command.")
            print("? is a convenience alias for help.")

        def help_introduction(self):
            print("""\

This program supports changing the settings on Linksys blue-box routers.  This
capability may come in handy when they freeze up and have to be reset.  Though
it can be used interactively (and will command-prompt when standard input is a
terminal) it is really designed to be used in batch mode. Commands are taken
from the command line first, then standard input.

By default, it is assumed that the Linksys is at http://192.168.1.1, the
default LAN address.  You can connect to a different address or IP with the
'connect' command.  Note that your .netrc must contain correct user/password
credentials for the router.  The entry corresponding to the defaults is:

machine 192.168.1.1
    login ""
    password admin

Most commands queue up changes but don't actually send them to the Linksys.
You can force pending changes to be written with 'configure'.  Otherwise, they
will be shipped to the Linksys at the end of session (e.g.  when the program
running in batch mode encounters end-of-file or you type a control-D).  If you
end the session with `quit', pending changes will be discarded.

For more help, read the topics 'wan', 'lan', and 'wireless'.""")

        def help_lan(self):
            print("""\
The `lan_address' and `lan_netmask' commands let you set the IP location of
the Linksys on your LAN, or inside.  Normally you'll want to leave these
untouched.""")

        def help_wan(self):
            print("""\
The WAN commands become significant if you are using the BEFSR41 or any of
the other Linksys boxes designed as DSL or cable-modem gateways.  You will
need to use `wan_type' to declare how you expect to get your address.

If your ISP has issued you a static address, you'll need to use the
`wan_address', `wan_netmask', and `wan_gateway' commands to set the address
of the router as seen from the WAN, the outside. In this case you will also
need to use the `dns' command to declare which remote servers your DNS
requests should be forwarded to.

Some ISPs may require you to set host and domain for use with dynamic-address
allocation.""")

        def help_wireless_desc(self):
            print("""\
The channel, ssid, ssid_broadcast, wep, and wireless commands control
wireless routing.""")

        def help_switches(self):
            print("Switches may be turned on with 'on', 'enable', or 'yes'.")
            print("Switches may be turned off with 'off', 'disable', or 'no'.")
            print("Switch commands include: wireless, ssid_broadcast.")

        def help_addresses(self):
            print("An address argument must be a valid IP address;")
            print("four decimal numbers separated by dots, each ")
            print("between 0 and 255.")

        def emptyline(self):
            pass

    interpreter = LinksysInterpreter()
    for arg in sys.argv[1:]:
        interpreter.onecmd(arg)
    fatal = False
    while not fatal:
        try:
            interpreter.cmdloop()
            fatal = True
        except LinksysError:
            message, fatal = sys.exc_info()[1].args
            print("linksys: " + message)

# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:python
# End:
doc/pycurl/examples/__pycache__/retriever-multi.cpython-312.pyc000064400000011031150335352040020513 0ustar00�

Б�g
�	�	�ddlZddlZ	ddlZddlmZmZejee�dZ	ejddk(rejj�Z
n#eejd�j�Z
eej�dk\re
ejd�ZgZe
D]>Zej%�Zeredd	k(r�d
ee�dzzZej)eef��@esJd��ee�Zeee�ZdecxkrdksJd
��Jd
��edej.ej0fz�ededed�ej2�Zge_ee�D]�Zej<�Zde_ ejCejDd�ejCejFd�ejCejHd�ejCejJd�ejCejLd�ej6j)e���ej6ddZ'dZ(e(ek�r�er�e'r�ejSd�\ZZe'jS�Zeed�e_ ejCejTe�ejCejVej@�ejYe�ee_ee_ere'r��	ej[�\Z.Z/e.ej`k7rn�$	ejc�\Z2Z3Z4e3D]}Zej@jk�de_ ejme�edej&ej"ejoejp��e'j)e��e4D]i\ZZ9Z:ej@jk�de_ ejme�edej&ej"e9e:�e'j)e��ke(ee3�zee4�zZ(e2dk(rn�� ejwd�e(ekr���ej6D]?Zej@�!ej@jk�de_ ejk��Aejk�y#e$rY��wxYw#edejdz�e�xYw)�N)�SIGPIPE�SIG_IGN�
��-��zCUsage: %s <file with URLs to fetch> [<# of concurrent connections>]�#zdoc_%03d.datz
no URLs giveni'z(invalid number of concurrent connectionsz!PycURL %s (compiled against 0x%x)z
----- Gettingz
URLs usingzconnections -----��i,�wbzSuccess:zFailed: g�?)<�sys�pycurl�signalrr�ImportError�num_conn�argv�stdin�	readlines�urls�open�len�int�print�
SystemExit�queue�url�strip�filename�append�num_urls�min�version�COMPILE_LIBCURL_VERSION_NUM�	CurlMulti�m�handles�range�i�Curl�c�fp�setopt�FOLLOWLOCATION�	MAXREDIRS�CONNECTTIMEOUT�TIMEOUT�NOSIGNAL�freelist�
num_processed�pop�URL�	WRITEDATA�
add_handle�perform�ret�num_handles�E_CALL_MULTI_PERFORM�	info_read�num_q�ok_list�err_list�close�
remove_handle�getinfo�
EFFECTIVE_URL�errno�errmsg�select���c/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/retriever-multi.py�<module>rKsO���
�$��'��F�M�M�'�7�#�
��	�
�x�x��{�c���y�y�"�"�$���C�H�H�Q�K� �*�*�,��
�3�8�8�}����s�x�x��{�#��	���C�

�)�)�+�C��#�a�&�C�-����U��a��0�H�	�L�L�#�x��!��
��o��u��u�:���x��"���H����I�I�I��I�I�I���)�V�^�^�V�=_�=_�,`�`�a��o�x��x�9L�M��F�������	�	�x��A�����
�A��A�D��H�H�V�
"�
"�A�&��H�H�V�
�
�q�!��H�H�V�
"�
"�B�'��H�H�V�^�^�S�!��H�H�V�_�_�a� ��I�I���Q��
�
�9�9�Q�<���
��h��
�H��	�	�!��
��X��L�L�N���H�d�#���	������S�!�	����!�!�1�4�4�(�	���Q����
�����H���9�9�;���[��&�-�-�-���
�#$�;�;�=� ��w���A�
�D�D�J�J�L��A�D�
�O�O�A���*�a�j�j�!�%�%����6�;O�;O�1P�Q��O�O�A���!)��A�u�f�
�D�D�J�J�L��A�D�
�O�O�A���*�a�j�j�!�%�%���?��O�O�A��!)�&��G��4�s�8�}�D�
��A�:��!�(�H�H�S�M�M�h��T
���A��t�t��	���
�
������G�G�I�	
�
���	��Q�	��	�� �	�
O�RU�RZ�RZ�[\�R]�
]�^�
��s�R �A:R,� R)�(R)�,Sdoc/pycurl/examples/__pycache__/sfquery.cpython-312.pyc000064400000006017150335352040017062 0ustar00�

Б�g�	���ddlZddlZddlZGd�dej�Zedk(�r�eej�dk(rdZnejdZ	ej�jd�Z
e
\ZZZ
ed�Zej#d�ej%ee
�ej'd
�rEej(j+deej-��z�ej.d�yej'dez�r]ej1e�ej2j+ej-��ej5�ej.d�yej(j+deej-��z�ej.d�yy#eej�dkred	ejdz�e�ejd
ZejdZ
Y���xYw)�Nc��eZdZd�Zd�Zd�Zy)�SourceForgeUserSessionc�:�|jdd|fd|fdddf�y)zEstablish a login session.zaccount/login.php�form_loginname�form_pw)�	return_to�)�stay_in_ssl�1)�loginzLogin With SSLN)�post)�self�name�passwords   �[/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/sfquery.pyrzSourceForgeUserSession.logins1���	�	�%�)9�4�(@�)2�H�(=�(9�(<�(C�	(E�	F�c�&�|jd�y)zLog out of SourceForge.zaccount/logout.phpN��get)rs r�logoutzSourceForgeUserSession.logouts�����%�&rc�,�|jd|z�y)Nz!export/xml_export.php?group_id=%sr)r�numids  r�	fetch_xmlz SourceForgeUserSession.fetch_xmls�����4�u�<�=rN)�__name__�
__module__�__qualname__rrr�rrrrs��F�'�>rr�__main__��28236zsourceforge.net�z,Usage: %s <project id> <username> <password>��zhttps://sourceforge.net/zInvalid Password or User Namez'Login/password not accepted (%d bytes)
zPersonal Page For: zUnexpected page (%d bytes)
)�sys�netrc�curl�Curlrr�len�argv�
project_id�authenticators�authr�accountr�print�
SystemExit�session�
set_verbosityr�answered�stderr�write�body�exitr�stdoutrrrr�<module>r8s�����
>�T�Y�Y�
>��z��
�3�8�8�}����
��X�X�a�[�
���u�{�{�}�+�+�,=�>��"&���g�x�%�%?�@�G����!���M�M�$��!����7�8��
�
���C�c�'�,�,�.�FY�Y�Z�������	�	�	�/�$�6�	7����*�%��
�
�������(�����������	�
�
���7��G�L�L�N�8K�K�L�������A����s�x�x�=�1���@�3�8�8�A�;�N�O����x�x��{���8�8�A�;��s
�&F.�.AHdoc/pycurl/examples/__pycache__/opensocketexception.cpython-312.pyc000064400000003673150335352040021462 0ustar00�

Б�g]����ddlZddlZddlZGd�de�Zd�Zej�Zejejd�de_
ejejd��	ej�y#ej$rRZejdej k(rejreej�n
ee�YdZ[yYdZ[ydZ[wwxYw)�Nc��eZdZy)�ConnectionRejectedN)�__name__�
__module__�__qualname__���g/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/opensocketexception.pyrrs��r	rc��tj�dkr td�|_tjS|\}}}}tj
|||�}|j
t
jt
jd�|S)Ng�?z3Rejecting connection attempt in opensocket callback�)	�randomr�	exception�pycurl�
SOCKET_BAD�socket�
setsockopt�
SOL_SOCKET�SO_KEEPALIVE)�curl�purpose�curl_address�family�socktype�protocol�address�ss        r
�
opensocketrsj��
�}�}����+�,a�b���� � � �*6�'�F�H�h���
�
�f�h��1�A��L�L��"�"�F�$7�$7��;��Hr	zhttp://pycurl.ioc�$�tt||�S)N)r�c)rrs  r
�<lambda>r s
��Z��7�G�<r	)rr
r�	Exceptionrr�Curlr�setopt�URLr�OPENSOCKETFUNCTION�perform�error�e�args�E_COULDNT_CONNECT�printrr	r
�<module>r,s�����	��	�
��F�K�K�M��������"�#��������	�	�<�>���I�I�K��
�|�|���v�v�a�y�F�,�,�,����
�a�k�k��
�a���	���s�-A>�>C�
AC�Cdoc/pycurl/examples/__pycache__/ssh_keyfunction.cpython-312.pyc000064400000001644150335352040020600 0ustar00�

Б�g.��8�ddlZdZej�Zej	ej
e�ej	ejd�d�Zej	ejd�ej	eje�ej�y)�Nzsftp://web.sourceforge.netTc�"�tjS)N)�c�KHSTAT_FINE)�	known_key�	found_key�matchs   �c/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/ssh_keyfunction.py�keyfunctionr
	s���=�=��z.known_hosts)�pycurl�sftp_server�Curlr�setopt�URL�VERBOSEr
�SSH_KNOWNHOSTS�SSH_KEYFUNCTION�perform�rr	�<module>rsv��
�*���F�K�K�M����������������D�������	�	�>�*�����	�	�K�(��	�	�rdoc/pycurl/examples/__pycache__/linksys.cpython-312.pyc000064400000105676150335352040017073 0ustar00�

Б�gU���ddlZddlZddlZddlZd�ZGd�dej
�ZGd�d�Zedk(reddl	Z	ddl
Z
Gd�d	e
j�Ze�Z
ejd
dD]Ze
j!e��dZes	e
j%�dZes�yyy#e$r/ej&�d
j(\ZZed
ez�Y�9wxYw)�Nc��tjj|�tjjd�y)N�
)�sys�stderr�write)�args �[/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/linksys.py�print_stderrr
%s&���J�J���S���J�J���T��c��eZdZd�Zy)�LinksysErrorc��||_y�N)�args)�selfrs  r	�__init__zLinksysError.__init__*s	����	rN)�__name__�
__module__�__qualname__r�rr	r
r
)s��rr
c��eZdZdZdZdZdZdZdZdZ	dd	d
ddd
�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Zd"�Zd#�Z d$�Z!d%�Z"d&�Z#d'�Z$d(�Z%d)�Z&d*�Z'd+�Z(d,�Z)d-�Z*d.�Z+d/�Z,d0�Z-d1�Z.d2�Z/y3)4�LinksysSessionz/Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec�1�2�3�4�5�6zbasic setup functionszFor security reasons,z-You can configure the router to act as a DHCPz3There are some log settings and lists in this page.z5Port forwarding can be used to set up public services)��
Passwd.htmz	DHCP.htmlzLog.htmlzForward.htmc�<�g|_d|_d|_i|_y)Nzhttp://192.168.1.1F)�actions�host�	verbosity�	pagecache�rs r	rzLinksysSession.__init__As�����(��	������rc��||_yr)r$�r�flags  r	�
set_verbosityzLinksysSession.set_verbosityGs	����rc��||jvr�tj|j�}|j	|j
�|j
|�|j�|j|<|jd�rtdd��|jtj|�sD|j|=tdtjj|j|�zd��|j�yy)N�401zauthorization failure.Tz!check string for page %s missing!F)r%�curl�Curlr#r*r$�get�body�answeredr
r�
check_strings�os�path�join�close)r�page�fetchs   r	�
cache_loadzLinksysSession.cache_loadLs����t�~�~�%��I�I�d�i�i�(�E�������/��I�I�d�O�#(�:�:�<�D�N�N�4� ��~�~�e�$�"�#;�T�B�B��^�^�N�$@�$@��$F�G��N�N�4�(�"�#F������VZ�V_�V_�ae�If�#f�hm�n�n��K�K�M�&rc��i|_yr)r%r&s r	�cache_flushzLinksysSession.cache_flushXs	����rc��|j|�tj|�j|j|�}|r|jd�}|Sd}|S�N�)r9�re�compile�searchr%�group)rr7�template�match�results     r	�
screen_scrapezLinksysSession.screen_scrape\sS��������
�
�8�$�+�+�D�N�N�4�,@�A����[�[��^�F��
��F��
rc�,�|jd|dz�S)Nrz:[^M]*\(MAC Address: *([^)]*))rF)rr7�prefixs   r	�get_MAC_addresszLinksysSession.get_MAC_addressds���!�!�"�f�-M�&M�N�Nrc�~�|r|jj||d�y|jj||d�y)Nr�0�r"�append)rr7r)�values    r	�set_flagzLinksysSession.set_flagfs1����L�L����d�C�0��L�L����d�C�0rc
��d}|jd�D]5}|jjdd|t|dz�z|f�|dz
}�7y)Nr�.r�F1r>)�splitr"rM�repr)rr7�cgi�role�ip�ind�octets       r	�set_IP_addresszLinksysSession.set_IP_addressksJ�����X�X�c�]�E��L�L����T�4�$�s�1�u�+�+=�u� E�F��1�H�C�#rc�N�|jddtjzdz�S)Nrz
>([0-9.v]*, (z)[^<]*)<)rFr�monthsr&s r	�get_firmware_versionz#LinksysSession.get_firmware_versionrs4���!�!�"�o�"0�"7�"7�'8�:D�'E�H�	Hrc�&�|jdd�S)NrzLAN IP Address�rIr&s r	�get_LAN_MACzLinksysSession.get_LAN_MACxs���#�#�B�(9�:�:rc�&�|jdd�S)Nr�Wirelessr_r&s r	�get_Wireless_MACzLinksysSession.get_Wireless_MACzs���#�#�B��4�4rc�&�|jdd�S)NrzWAN Connection Typer_r&s r	�get_WAN_MACzLinksysSession.get_WAN_MAC|s���#�#�B�(>�?�?rc�@�|jjdd|f�y)Nr�hostNamerL�r�names  r	�
set_host_namezLinksysSession.set_host_name�s�������R��T�2�3rc�@�|jjdd|f�y)Nr�
DomainNamerLrhs  r	�set_domain_namezLinksysSession.set_domain_name�s�������R��t�4�5rc�*�|jdd|�y)Nr�ipAddr�rZ�rrWs  r	�
set_LAN_IPzLinksysSession.set_LAN_IP�s�����B��"�-rc��|jd�st�|jd�d}|dvrt�|jj	dd|�y)Nz255.255.255.rQ���)rK�128�192�240�252r�netMask)�
startswith�
ValueErrorrSr"rM)rrW�lastquads   r	�set_LAN_netmaskzLinksysSession.set_LAN_netmask�sK���}�}�^�,����8�8�C�=��$���<�<��������B�	�8�4rc�(�|jdd�y)Nr�wirelessStatus�rOr(s  r	�set_wirelesszLinksysSession.set_wireless�s���
�
�b�*�+rc�@�|jjdd|f�y)Nr�
wirelessESSIDrL)r�ssids  r	�set_SSIDzLinksysSession.set_SSID�s�������R��$�7�8rc�(�|jdd�y)Nr�
broadcastSSIDr�r(s  r	�set_SSID_broadcastz!LinksysSession.set_SSID_broadcast�s���
�
�b�/�*rc�@�|jjdd|f�y)Nr�wirelessChannelrL)r�channels  r	�set_channelzLinksysSession.set_channel�s�������R�!2�G�<�=rc�(�|jdd�y)Nr�WepTyper�r(s  r	�set_WEPzLinksysSession.set_WEP�s���
�
�b�)�$rc�@�|jjdd|f�y)Nr�WANConnectionTyperL)r�types  r	�set_connection_typez"LinksysSession.set_connection_type�s�������R�!4�d�;�<rc�*�|jdd|�y)Nr�aliasIPrprqs  r	�
set_WAN_IPzLinksysSession.set_WAN_IP�s�����B�	�2�.rc�*�|jdd|�y)Nr�aliasMaskIPrprqs  r	�set_WAN_netmaskzLinksysSession.set_WAN_netmask�s�����B�
�r�2rc�*�|jdd|�y)Nr�routerIPrprqs  r	�set_WAN_gateway_addressz&LinksysSession.set_WAN_gateway_address�s�����B�
�B�/rc�6�|jddd|z|�y)Nr�dns�ABCrp�r�indexrWs   r	�set_DNS_serverzLinksysSession.set_DNS_server�s�����B���e�� 4�b�9rc�x�|jjdd|�|jjdd|�y)Nr �	sysPasswd�sysPasswdConfirmrL)r�strs  r	�set_passwordzLinksysSession.set_password�s/�������L��c�:������L�);�S�Arc�(�|jdd�y)Nr �	UPnP_Workr�r(s  r	�set_UPnPzLinksysSession.set_UPnP�s���
�
�l�K�0rc�<�|jjdd�y)Nr �FactoryDefaultsrLr&s r	�resetzLinksysSession.reset�s�������L�*;�<rc�~�|r|jjddd�y|jjddd�y)N�DHCP.htm�
dhcpStatus�Enable�DisablerLr(s  r	�set_DHCPzLinksysSession.set_DHCP�s1����L�L���
�<��A��L�L���
�<�	�Brc�P�|jjddt|��y)Nr��dhcpS4�r"rMr��r�vals  r	�set_DHCP_starting_IPz#LinksysSession.set_DHCP_starting_IP�s�������J�x��S��:rc�P�|jjddt|��y)Nr��dhcpLenr�r�s  r	�set_DHCP_userszLinksysSession.set_DHCP_users�s�������J�y�#�c�(�;rc�P�|jjddt|��y)Nr��	leaseTimer�r�s  r	�set_DHCP_lease_timez"LinksysSession.set_DHCP_lease_time���������J�{�C��H�=rc�6�|jddd|z|�y)Nr�r�r�rpr�s   r	�set_DHCP_DNS_serverz"LinksysSession.set_DHCP_DNS_server�s�����J���e��(<�b�Arc�~�|r|jjddd�y|jjddd�y)NzLog.htm�rLogr�r�rLr(s  r	�set_loggingzLinksysSession.set_logging�s1����L�L���	�6�8�<��L�L���	�6�9�=rc�P�|jjddt|��y)Nr��	trapAddr3r�r�s  r	�set_log_addresszLinksysSession.set_log_address�r�rc
�F�|j�rg}|j�|jD]�\}}}|j|�|j|j	|�dk(r;td|�dtjj|j|��d���t|j||f���g|_tj|j�}|j|j�|jdt!|��|j#�yy)z+Write configuration changes to the Linksys.rtzlinksys: field z" not found where expected in page �!z
Gozila.cgiN)r"r;r9r%�findr
r3r4r5r#rMr-r.r*r$r/�tupler6)r�fieldsr7�fieldrN�transactions      r	�	configurezLinksysSession.configure�s����<�<��F�����(,���$��u�e�����%��>�>�$�'�,�,�U�3�r�9� �]b�df�dk�dk�dp�dp�qu�qz�qz�}A�eB�"C�D���M�M�5�%�.�1�
)5��D�L��)�)�D�I�I�.�K��%�%�d�n�n�5��O�O�L�%��-�8�����!rN)0rrrr\�WAN_CONNECT_AUTO�WAN_CONNECT_STATIC�WAN_CONNECT_PPOE�WAN_CONNECT_RAS�WAN_CONNECT_PPTP�WAN_CONNECT_HEARTBEATr2rr*r9r;rFrIrOrZr]r`rcrerjrmrrr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr	rr-s��
>�F��������O�����
.�-�E�K�M�
�M���
���O�1�
�H�;�5�@�4�6�.�5�,�9�+�>�%�=�/�3�0�:�B�1�=�C�
;�<�>�B�
>�
>� rr�__main__c���eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdD�ZFdE�ZGdF�ZHdG�ZIdH�ZJdI�ZKdJ�ZLyK)L�LinksysInterpreterz:Interpret commands to perform LinkSys programming actions.c��tjj|�t�|_tjd�r*td�|jjdz|_	yd|_	td�y)NrzType ? or `help' for help.�: r�Bar1)
�cmd�Cmdrr�sessionr3�isatty�printr#�promptr&s r	rzLinksysInterpreter.__init__�sV���G�G���T�"�)�+�D�L��y�y��|��2�3�"�l�l�/�/�$�6��� ����f�
rc��|j�dvr	|d�y|j�dvr	|d�ytd�y)N)�on�enable�yesT)�off�disable�noFzlinksys: unknown switch valuer)�stripr
)r�func�lines   r	�flag_commandzLinksysInterpreter.flag_command�sH���z�z�|�6�6��T�
�
�	����!9�9��U����<�=�rc��|j�}|rJ||j_|jj�|jjdz|_yt|jj�y)Nr�r)r�r�r#r;r�r�)rr��newhosts   r	�
do_connectzLinksysInterpreter.do_connect�s^���j�j�l�G��$+����!����(�(�*�"�l�l�/�/�$�6�����d�l�l�'�'�(�rc�F�td�td�td�y)Nz!Usage: connect [<hostname-or-IP>]z+Connect to a Linksys by name or IP address.z0If no argument is given, print the current host.�r�r&s r	�help_connectzLinksysInterpreter.help_connect�s���5�6��?�@��D�Erc��|jjd�d|jjvr�td|jj	��td|jj��td|jj
��td|jj��td�y)Nrz	Firmware:zLAN MAC:z
Wireless MAC:zWAN MAC:rQr)r�r9r%r�r]r`rcre�rr�s  r	�	do_statuszLinksysInterpreter.do_statuss����L�L�#�#�B�'��T�\�\�+�+�+��k�4�<�<�#D�#D�#F�G��j�$�,�,�":�":�"<�=��o�t�|�|�'D�'D�'F�G��j�$�,�,�":�":�"<�=��c�
�rc�\�td�td�td�td�y)Nz
Usage: statusz3The status command shows the status of the Linksys.z2It is mainly useful as a sanity check to make surez the box is responding correctly.r�r&s r	�help_statuszLinksysInterpreter.help_statuss%���/�"��G�H��F�G��4�5rc�P�|j|jj|�yr)r�r�r*r�s  r	�
do_verbosezLinksysInterpreter.do_verboses�����d�l�l�8�8�$�?rc�0�td�td�y)Nz-Usage: verbose {on|off|enable|disable|yes|no}z!Enables display of HTTP requests.r�r&s r	�help_verbosezLinksysInterpreter.help_verboses���A�B��5�6rc�:�|jj|�y�Nr)r�rjr�s  r	�do_hostzLinksysInterpreter.do_hosts���L�L�&�&�t�,�rc�0�td�td�y)NzUsage: host <hostname>z-Sets the Host field to be queried by the ISP.r�r&s r	�	help_hostzLinksysInterpreter.help_hosts���*�+��A�Brc�P�td�|jj|�y)NzUsage: host <domainname>r)r�r�rmr�s  r	�	do_domainzLinksysInterpreter.do_domains ���,�-��L�L�(�(��.�rc��td�y)Nz/Sets the Domain field to be queried by the ISP.r�r&s r	�help_domainzLinksysInterpreter.help_domain#s���C�Drc�:�|jj|�yr�)r�rrr�s  r	�do_lan_addressz!LinksysInterpreter.do_lan_address&����L�L�#�#�D�)�rc�0�td�td�y)NzUsage: lan_address <ip-address>zSets the LAN IP address.r�r&s r	�help_lan_addressz#LinksysInterpreter.help_lan_address)����3�4��,�-rc�:�|jj|�yr�)r�r}r�s  r	�do_lan_netmaskz!LinksysInterpreter.do_lan_netmask-����L�L�(�(��.�rc�0�td�td�y)NzUsage: lan_netmask <ip-mask>�Sets the LAN subnetwork mask.r�r&s r	�help_lan_netmaskz#LinksysInterpreter.help_lan_netmask0����0�1��1�2rc�P�|j|jj|�yr�)r�r�r�r�s  r	�do_wirelesszLinksysInterpreter.do_wireless4s�����d�l�l�7�7��>�rc�0�td�td�y)Nz.Usage: wireless {on|off|enable|disable|yes|no}z.Switch to enable or disable wireless features.r�r&s r	�
help_wirelessz LinksysInterpreter.help_wireless7s���B�C��B�Crc�:�|jj|�yr�)r�r�r�s  r	�do_ssidzLinksysInterpreter.do_ssid;s���L�L�!�!�$�'�rc�0�td�td�y)NzUsage: ssid <string>z.Sets the SSID used to control wireless access.r�r&s r	�	help_ssidzLinksysInterpreter.help_ssid>s���(�)��B�Crc�P�|j|jj|�yr�)r�r�r�r�s  r	�do_ssid_broadcastz$LinksysInterpreter.do_ssid_broadcastBs�����d�l�l�=�=�t�D�rc�0�td�td�y)Nz4Usage: ssid_broadcast {on|off|enable|disable|yes|no}z+Switch to enable or disable SSID broadcast.r�r&s r	�help_ssid_broadcastz&LinksysInterpreter.help_ssid_broadcastEs���H�I��?�@rc�:�|jj|�yr�)r�r�r�s  r	�
do_channelzLinksysInterpreter.do_channelIs���L�L�$�$�T�*�rc�0�td�td�y)NzUsage: channel <number>zSets the wireless channel.r�r&s r	�help_channelzLinksysInterpreter.help_channelLs���+�,��.�/rc�P�|j|jj|�yr�)r�r�r�r�s  r	�do_wepzLinksysInterpreter.do_wepPs�����d�l�l�2�2�D�9�rc�0�td�td�y)Nz)Usage: wep {on|off|enable|disable|yes|no}z)Switch to enable or disable WEP security.r�r&s r	�help_wepzLinksysInterpreter.help_wepSs���=�>��=�>rc���	td|j�j�z�}|jj	|�y#t
$rt
d�YywxYw)NzLinksysSession.WAN_CONNECT_z!linksys: unknown connection type.r)�evalr��upperr�r�r{r
)rr�r�s   r	�do_wan_typezLinksysInterpreter.do_wan_typeWs]��
B��7��
�
��8J�8J�8L�L�M�����0�0��6����
B��@�A��
B�s�AA�A�Ac�0�td�td�y)Nz5Usage: wan_type {auto|static|ppoe|ras|pptp|heartbeat}zSet the WAN connection type.r�r&s r	�
help_wan_typez LinksysInterpreter.help_wan_type^s���I�J��0�1rc�:�|jj|�yr�)r�r�r�s  r	�do_wan_addressz!LinksysInterpreter.do_wan_addressbrrc�0�td�td�y)NzUsage: wan_address <ip-address>zSets the WAN IP address.r�r&s r	�help_wan_addressz#LinksysInterpreter.help_wan_addresserrc�:�|jj|�yr�)r�r�r�s  r	�do_wan_netmaskz!LinksysInterpreter.do_wan_netmaskirrc�0�td�td�y)NzUsage: wan_netmask <ip-mask>zSets the WAN subnetwork mask.r�r&s r	�help_wan_netmaskz#LinksysInterpreter.help_wan_netmasklrrc�:�|jj|�yr�)r��set_WAN_gatewayr�s  r	�do_wan_gatewayz!LinksysInterpreter.do_wan_gatewayprrc�0�td�td�y)NzUsage: wan_gateway <ip-address>rr�r&s r	�help_wan_gatewayz#LinksysInterpreter.help_wan_gatewayss���3�4��1�2rc��|j�\}}|dvr&|jjt|�|�yt	d�y�N)rrrz$linksys: server index out of bounds.r)rSr�r�r(r
�rr�r��addresss    r	�do_dnszLinksysInterpreter.do_dnswsE��#�z�z�|��U�G���'����+�+�D��K��A���C�D�rc�0�td�td�y)NzUsage: dns {1|2|3} <ip-mask>z:Sets a primary, secondary, or tertiary DNS server address.r�r&s r	�help_dnszLinksysInterpreter.help_dns~s���0�1��N�Orc�:�|jj|�yr�)r�r�r�s  r	�do_passwordzLinksysInterpreter.do_password�s���L�L�%�%�d�+�rc�0�td�td�y)NzUsage: password <string>zSets the router password.r�r&s r	�
help_passwordz LinksysInterpreter.help_password�s���,�-��-�.rc�P�|j|jj|�yr�)r�r�r�r�s  r	�do_upnpzLinksysInterpreter.do_upnp�s�����d�l�l�3�3�T�:�rc�0�td�td�y)Nz*Usage: upnp {on|off|enable|disable|yes|no}z4Switch to enable or disable Universal Plug and Play.r�r&s r	�	help_upnpzLinksysInterpreter.help_upnp�s���>�?��H�Irc�8�|jj�yr)r�r�r�s  r	�do_resetzLinksysInterpreter.do_reset�s���L�L��� rc�0�td�td�y)NzUsage: resetz+Reset Linksys settings to factory defaults.r�r&s r	�
help_resetzLinksysInterpreter.help_reset�s���.�!��?�@rc�P�|j|jj|�yr)r�r�r�r�s  r	�do_dhcpzLinksysInterpreter.do_dhcp�s�����d�l�l�3�3�T�:rc�0�td�td�y)Nz*Usage: dhcp {on|off|enable|disable|yes|no}z*Switch to enable or disable DHCP features.r�r&s r	�	help_dhcpzLinksysInterpreter.help_dhcp�s���>�?��>�?rc�:�|jj|�yr)r�r�r�s  r	�
do_dhcp_startz LinksysInterpreter.do_dhcp_start�s���L�L�-�-�d�3rc�0�td�td�y)NzUsage: dhcp_start <number>z'Set the start address of the DHCP pool.r�r&s r	�help_dhcp_startz"LinksysInterpreter.help_dhcp_start�s���.�/��;�<rc�:�|jj|�yr)r�r�r�s  r	�
do_dhcp_usersz LinksysInterpreter.do_dhcp_users�����L�L�'�'��-rc�0�td�td�y)NzUsage: dhcp_users <number>�9Set number of address slots to allocate in the DHCP pool.r�r&s r	�help_dhcp_usersz"LinksysInterpreter.help_dhcp_users�����.�/��M�Nrc�:�|jj|�yr)r��set_DHCP_leaser�s  r	�
do_dhcp_leasez LinksysInterpreter.do_dhcp_lease�rWrc�0�td�td�y)NzUsage: dhcp_lease <number>rYr�r&s r	�help_dhcp_leasez"LinksysInterpreter.help_dhcp_lease�r[rc��|j�\}}|dvr&|jjt|�|�yt	d�yr;)rSr�r�r(r
r<s    r	�do_dhcp_dnszLinksysInterpreter.do_dhcp_dns�sE��#�z�z�|��U�G���'����0�0��e��g�F���C�D�rc�0�td�td�y)Nz!Usage: dhcp_dns {1|2|3} <ip-mask>z8Sets primary, secondary, or tertiary DNS server address.r�r&s r	�
help_dhcp_dnsz LinksysInterpreter.help_dhcp_dns�s���5�6��L�Mrc�P�|j|jj|�yr)r�r�r�r�s  r	�
do_loggingzLinksysInterpreter.do_logging�s�����d�l�l�6�6��=rc�0�td�td�y)Nz-Usage: logging {on|off|enable|disable|yes|no}z,Switch to enable or disable session logging.r�r&s r	�help_loggingzLinksysInterpreter.help_logging�s���A�B��@�Arc�:�|jj|�yr)r��set_Log_addressr�s  r	�do_log_addressz!LinksysInterpreter.do_log_address�s���L�L�(�(��.rc�0�td�td�y)NzUsage: log_address <number>z1Set the last quad of the address to which to log.r�r&s r	�help_log_addressz#LinksysInterpreter.help_log_address�s���/�0��E�Frc�8�|jj�yr�)r�r�r�s  r	�do_configurezLinksysInterpreter.do_configure�s���L�L�"�"�$�rc�0�td�td�y)NzUsage: configurez(Writes the configuration to the Linksys.r�r&s r	�help_configurez!LinksysInterpreter.help_configure�s���$�%��<�=rc�B�t|jj�yr)r�r�r%r�s  r	�do_cachezLinksysInterpreter.do_cache�s���$�,�,�(�(�)rc�0�td�td�y)NzUsage: cachezDisplay the page cache.r�r&s r	�
help_cachezLinksysInterpreter.help_cache�s���.�!��+�,rc��yr=rr�s  r	�do_quitzLinksysInterpreter.do_quit�s��rc�0�td�td�y)Nz2The quit command ends your linksys session withoutz-writing configuration changes to the Linksys.r�r�s  r	�	help_quitzLinksysInterpreter.help_quit�s���F�G��A�Brc�N�td�|jj�y)Nrr>)r�r�r�r�s  r	�do_EOFzLinksysInterpreter.do_EOF�s���"�I��L�L�"�"�$�rc�0�td�td�y)Nz7The EOF command writes the configuration to the linksyszand ends your session.r�r&s r	�help_EOFzLinksysInterpreter.help_EOF�s���K�L��*�+rc�.�tj|�y)z5Pass the command through to be executed by the shell.r)r3�systemr�s  r	�defaultzLinksysInterpreter.default�s���I�I�d�O�rc�0�td�td�y)Nz/On-line help is available through this command.z"? is a convenience alias for help.r�r&s r	�	help_helpzLinksysInterpreter.help_help�s���C�D��6�7rc��td�y)Na�
This program supports changing the settings on Linksys blue-box routers.  This
capability may come in handy when they freeze up and have to be reset.  Though
it can be used interactively (and will command-prompt when standard input is a
terminal) it is really designed to be used in batch mode. Commands are taken
from the command line first, then standard input.

By default, it is assumed that the Linksys is at http://192.168.1.1, the
default LAN address.  You can connect to a different address or IP with the
'connect' command.  Note that your .netrc must contain correct user/password
credentials for the router.  The entry corresponding to the defaults is:

machine 192.168.1.1
    login ""
    password admin

Most commands queue up changes but don't actually send them to the Linksys.
You can force pending changes to be written with 'configure'.  Otherwise, they
will be shipped to the Linksys at the end of session (e.g.  when the program
running in batch mode encounters end-of-file or you type a control-D).  If you
end the session with `quit', pending changes will be discarded.

For more help, read the topics 'wan', 'lan', and 'wireless'.r�r&s r	�help_introductionz$LinksysInterpreter.help_introduction�s���@�
Arc��td�y)Nz�The `lan_address' and `lan_netmask' commands let you set the IP location of
the Linksys on your LAN, or inside.  Normally you'll want to leave these
untouched.r�r&s r	�help_lanzLinksysInterpreter.help_lans����
rc��td�y)Na{The WAN commands become significant if you are using the BEFSR41 or any of
the other Linksys boxes designed as DSL or cable-modem gateways.  You will
need to use `wan_type' to declare how you expect to get your address.

If your ISP has issued you a static address, you'll need to use the
`wan_address', `wan_netmask', and `wan_gateway' commands to set the address
of the router as seen from the WAN, the outside. In this case you will also
need to use the `dns' command to declare which remote servers your DNS
requests should be forwarded to.

Some ISPs may require you to set host and domain for use with dynamic-address
allocation.r�r&s r	�help_wanzLinksysInterpreter.help_wans����
rc��td�y)NzWThe channel, ssid, ssid_broadcast, wep, and wireless commands control
wireless routing.r�r&s r	�help_wireless_descz%LinksysInterpreter.help_wireless_descs����
rc�F�td�td�td�y)Nz8Switches may be turned on with 'on', 'enable', or 'yes'.z:Switches may be turned off with 'off', 'disable', or 'no'.z2Switch commands include: wireless, ssid_broadcast.r�r&s r	�
help_switchesz LinksysInterpreter.help_switchess���L�M��N�O��F�Grc�F�td�td�td�y)Nz/An address argument must be a valid IP address;z-four decimal numbers separated by dots, each zbetween 0 and 255.r�r&s r	�help_addressesz!LinksysInterpreter.help_addresses!s���C�D��A�B��&�'rc��yrrr&s r	�	emptylinezLinksysInterpreter.emptyline&s��rN)Mrrr�__doc__rr�r�r�r�r�r�r�r�rrrrr
r
rrrrrrrr r"r$r&r*r,r.r0r2r4r7r9r>r@rBrDrFrHrJrLrNrPrRrTrVrZr^r`rbrdrfrhrkrmrorqrsrurwryr{r}r�r�r�r�r�r�r�r�r�rrr	r�r��s���H�	�	�	�	F�
	�	6�	@�	7�	�	C�	�	E�	�	.�	�	3�	�	D�	�	D�	�	A�	�	0�	�	?�	�	2�	�	.�	�	3�	�	3�	�	P�	�	/�	�	J�	!�	A�	;�	@�	4�	=�	.�	O�	.�	O�	�	N�	>�	B�	/�	G�	�	>�	*�	-�	�	C�	�	,�	�
	8�	A�4	�
	�	�
	H�
	(�
	rr�r>FTz	linksys: )rr?r-�
exceptionsr
�	Exceptionr
rrr3r�r�r��interpreter�argvr�onecmd�fatal�cmdloop�exc_infor�messager�rrr	�<module>r�s���F!� ���:�'�'��n �n �`�z���G�S�W�W�G�R
%�&�K��x�x���|�����3����E��	)����!��E��a
��h
�	)�)�S�\�\�^�A�.�3�3�N�G�U��+��'�(�	)�s�B�1C�Cdoc/pycurl/examples/__pycache__/retriever.cpython-312.pyc000064400000010730150335352040017370 0ustar00�

Б�gi
��D�ddlZddlZ	ddlZddlZ	ddlZddlmZmZejee�dZ		ejddk(rejj�Z
n#eejd�j�Z
eej�dk\reejd�Z	ej�Ze
D]HZej)�Zeredd	k(r�d
eej�dzzZej-eef��JejsJd��eej�Zee	e�Z	de	cxkrdksJd
��Jd
��edej2ej4fz�edede	d�Gd�dej6�ZgZee	�D]+Zee�Z e jC�ejEe ��-eD]Z#e#jI��y#e$rddlZY���wxYw#e$rY���wxYw#edejdz�e�xYw)�N)�SIGPIPE�SIG_IGN�
��-��zCUsage: %s <file with URLs to fetch> [<# of concurrent connections>]�#zdoc_%03d.datz
no URLs giveni'z(invalid number of concurrent connectionsz!PycURL %s (compiled against 0x%x)z
----- Gettingz
URLs usingzconnections -----c��eZdZd�Zd�Zy)�WorkerThreadc�P�tjj|�||_y)N)�	threading�Thread�__init__�queue)�selfrs  �]/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/retriever.pyrzWorkerThread.__init__>s�����!�!�$�'���
�c���		|jj�\}}t|d�}t
j�}|jtj|�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtj|�	|j!�|j-�|j-�t&j.j1d�t&j.j+����#tj$rt�wxYw#ddl}|j%t&j(��t&j(j+�Y��xYw)	Nr�wb��i,r)�file�.)r�
get_nowait�Queue�Empty�
SystemExit�open�pycurl�Curl�setopt�URL�FOLLOWLOCATION�	MAXREDIRS�CONNECTTIMEOUT�TIMEOUT�NOSIGNAL�	WRITEDATA�perform�	traceback�	print_exc�sys�stderr�flush�close�stdout�write)r�url�filename�fp�curlr+s      r�runzWorkerThread.runBsQ���
!� $�
�
� 5� 5� 7�
��X��h��%�B��;�;�=�D��K�K��
�
�C�(��K�K��-�-�q�1��K�K��(�(�!�,��K�K��-�-�r�2��K�K�����,��K�K�����+��K�K��(�(�"�-�
#�����

�J�J�L��H�H�J��J�J���S�!��J�J����/���;�;�
!� � �
!��
#� ��#�#����#�4��
�
� � �"�s�F�!F-�F*�-AG3N)�__name__�
__module__�__qualname__rr7�rrrr=s���rr)%r-rr�ImportErrorrr �signalrr�num_conn�argv�stdin�	readlines�urlsr�len�int�printrr3�stripr4�put�num_urls�min�version�COMPILE_LIBCURL_VERSION_NUMrr�threads�range�dummy�t�start�append�thread�joinr;rr�<module>rTs&������$��'��F�M�M�'�7�#���	�
�x�x��{�c���y�y�"�"�$���C�H�H�Q�K� �*�*�,��
�3�8�8�}����s�x�x��{�#��	����
���C�

�)�)�+�C��#�a�&�C�-����U�[�[�!1�A�!5�6�H�	�I�I�s�H�o���
�{�{�#�O�#�{��u�{�{����x��"���H����I�I�I��I�I�I���)�V�^�^�V�=_�=_�,`�`�a��o�x��x�9L�M��9�#�#��B
��
�8�_�E��U��A��G�G�I��N�N�1����F�
�K�K�M���s������	��	���	�
O�RU�RZ�RZ�[\�R]�
]�^�
��s.�G'�G7�A:H�'	G4�3G4�7H�?H�Hdoc/pycurl/examples/__pycache__/file_upload.cpython-312.pyc000064400000003750150335352040017650 0ustar00�

Б�g��	���ddlZddlZddlZGd�d�Zeej
�dkredej
dz�e�ej
dZej
dZ	ejje	�s
ede	z�e�ej�Z
e
jeje�e
jej d�	e
jej"eee	d	��j&�ejj+e	�Ze
jej.e�ed
e	�de���e
j1�e
j3�y)�Nc��eZdZd�Zd�Zy)�
FileReaderc��||_y�N)�fp)�selfrs  �_/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/file_upload.py�__init__zFileReader.__init__
s	�����c�8�|jj|�Sr)r�read)r�sizes  r	�
read_callbackzFileReader.read_callbacks���w�w�|�|�D�!�!rN)�__name__�
__module__�__qualname__r
r�rr	rr	s���"rr�z Usage: %s <url> <file to upload>��z#Error: the file '%s' does not exist�rbzUploading file z to url )�os�sys�pycurlr�len�argv�print�
SystemExit�url�filename�path�exists�Curl�c�setopt�URL�UPLOAD�READFUNCTION�openrr
�getsize�filesize�
INFILESIZE�perform�closerrr	�<module>r/s*��
�
�"�"��s�x�x�=�1��	�
,�s�x�x��{�
:�;�
��	�h�h�q�k���8�8�A�;��	�w�w�~�~�h��	�
/�(�
:�;�
���F�K�K�M��������S������������H�H�V�
 �
 �*�T�(�D�-A�"B�"P�"P�Q�
�7�7�?�?�8�$������	�	�H�%��x��5�6��	�	�����	rdoc/pycurl/examples/__pycache__/smtp.cpython-312.pyc000064400000002657150335352040016355 0ustar00�

Б�gK��d�ddlmZddlZ	ddlmZddlZejddkDZ	dezZ
dZd	Zej�Zejej e
�ejej"e�ejej$eg�d
e�de�d�Ze	rej)d
�Zee�Zejej*e�ejej,d�ejej.d�ej1�y#e$r
ddlmZY��wxYw)�)�	localhost�N)�BytesIO)�StringIO�z	smtp://%szsender@example.orgzaddressee@example.netzFrom: z
To: z7
Subject: PycURL SMTP example

SMTP example via PycURL
�asciiT)�r�pycurl�ior�ImportErrorr�sys�version_info�PY3�mail_server�	mail_from�mail_to�Curl�c�setopt�URL�	MAIL_FROM�	MAIL_RCPT�message�encode�READDATA�UPLOAD�VERBOSE�perform���X/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/smtp.py�<module>r"s��
�
�-���	���q��A����I�%�� �	�
!���F�K�K�M����������������i� �������w�i� ��'�
����n�n�W�%�G�
�W���������R��������4��������D���	�	���K�-�,�,�-�s�D � D/�.D/doc/pycurl/examples/__pycache__/xmlrpc_curl.cpython-312.pyc000064400000007650150335352040017722 0ustar00�

Б�g���0�	ddlZddlmZmZejee�	ddlmZ	ddlZddl
Z
ddlZejddkDZ
Gd�dej�Zedk(rDej"de��	�Zee�	eej(j+d
��yy#e$rY��wxYw#e$r	ddlmZn#e$r	ddlmZYnwxYwY��wxYw#e$r	ddlm	ZY��wxYw#ej,$r ej.�dZede�YywxYw)
�N)�SIGPIPE�SIG_IGN)�StringIO�c�&�eZdZdZdgZdd�Zdd�Zy)�
CURLTransportz5Handles a cURL HTTP transaction to an XML-RPC server.zContent-Type: text/xmlNc��tj�|_|jjtjd�|jjtj
d�|jjtjd�|jjtj|j�|dk7r4|dk7r/|jjtj|�d|���d|_
y)N���:F)�pycurl�Curl�c�setopt�POST�NOSIGNAL�CONNECTTIMEOUT�
HTTPHEADER�xmlrpc_h�USERPWD�
_use_datetime)�self�username�passwords   �_/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/xmlrpc_curl.py�__init__zCURLTransport.__init__%s������������
�
�f�k�k�1�%����
�
�f�o�o�q�)����
�
�f�+�+�R�0����
�
�f�'�'����7��t���D� 0��F�F�M�M�&�.�.�X�x�*H�I�"���c���t�}|jjtjd|�|���|jjtj
|�|jjtj|j�|jjtj|�||_		|jj�|j%d�|j'|�S#tj$rKtj�d}tr|j}t!j"||z|d|dd��wxYw)Nzhttp://r
r)rrrr
�URL�
POSTFIELDS�
WRITEFUNCTION�write�VERBOSE�verbose�perform�error�sys�exc_info�PY3�args�	xmlrpclib�
ProtocolError�seek�parse_response)r�host�handler�request_bodyr$�b�vs       r�requestzCURLTransport.request/s���J�����
�
�f�j�j�4��"A�B����
�
�f�'�'��6����
�
�f�*�*�A�G�G�4����
�
�f�n�n�g�.����		��6�6�>�>��	
���q�	��"�"�1�%�%���|�|�	�����q�!�A���F�F���)�)��w���!��a��d�D��
�		�s
�
D�AE$)NN)r)�__name__�
__module__�__qualname__�__doc__rrr4�rrrr s��?�)�+�H�#�&rr�__main__zhttp://betty.userland.com)�	transport�)r
�ERROR)�signalrr�ImportError�	cStringIOr�ior+�
xmlrpc.client�clientr
r'�version_infor)�	Transportrr5�ServerProxy�server�print�examples�getStateName�Errorr(r3r9rr�<module>rLs1��$��'��F�M�M�'�7�#� �"�&���
�	���q��A���!&�I�'�'�!&�H�z��
"�Y�
"�
"�#>�-:�_�>�F�	�&�M��
�f�o�o�*�*�2�.�/�
��u�	��	��� � �%��� �� �� ���&�%�&��f�?�?���C�L�L�N�1���
�g�q���si�B&�B1�C�!C&�&B.�-B.�1C�7B>�=C�>C�	C�C�C�C�C#�"C#�&,D�Ddoc/pycurl/examples/__pycache__/multi-socket_action-select.cpython-312.pyc000064400000011645150335352040022621 0ustar00�

Б�g?���ddlZddlZddlZddlmZeej�dkDrejdZndZggdddddd�Zd�Z	d�Z
d�Zej�Z
e
jeje	�e
jej e�ej"�Zejej&e�ejej(d	�ejej*d	�ejej,d�e�Zejej0e�e
j3e�e
j5ej6d�Z	ed
dk(rnedZe�ed��e
e��!e
j?e�ejA�e
jA�ed
�ed��ed
r e!deejE��z�ye!dededfz�y)�N)�BytesIO�zhttps://www.python.org)�rlist�wlist�running�timeout�result�code�msgc���|tjk(s|tjk(rtdj	|�y|tj
k(s|tjk(rtdj	|�y|tjk(rH|tdvrtdj|�|tdvrtdj|�yytd|z��)NrrzUnknown value of what: %s)	�pycurl�POLL_IN�
POLL_INOUT�state�append�POLL_OUT�POLL_REMOVE�remove�	Exception)�what�sock_fd�multi�socketps    �n/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/multi-socket_action-select.py�	socket_fnrOs����v�~�~����):�):�!:�
�g����g�&�	
����	 �D�F�,=�,=�$=�
�g����g�&�	
��#�#�	#��e�G�n�$��'�N�!�!�'�*��e�G�n�$��'�N�!�!�'�*�%��3�d�:�;�;�c	��tjtdtdttd�ttd�z|�\}}}t|�dk(rDt|�dk(r6t|�dk(r(tjtjd�\}}n�|D])}tj|tj�\}}�+|D])}tj|tj�\}}�+|D])}tj|tj�\}}�+td��tdk7r�tj�\}}}	|dk(sJ�t|�dk(rt|	�dk(st|�dk(rt|	�dk(sJ�|r	dtd<|	r dtd<|	d\}
td	<td
<td<y)NrrrrrTr	Fr
r)�selectr�set�lenr�
socket_actionr
�SOCKET_TIMEOUT�
CSELECT_IN�CSELECT_OUT�CSELECT_ERR�	info_read)r�rready�wready�xready�_rr�qmsg�	successes�failures�_easys           r�workr/\s���#�]�]�
�g���g���E�'�N�(;�c�%��.�>Q�(Q�SZ�\��F�F�F��6�{�a��C��K�1�,��V���1A�
�(�(��)>�)>��B�
��7��G��,�,�W�f�6G�6G�H�J�A�w���G��,�,�W�f�6H�6H�I�J�A�w���G��,�,�W�f�6H�6H�I�J�A�w��
�Y��#��5��3C�(C�%*�O�O�$5�!��i���q�y��y��9�~��"�s�8�}��'9��	�N�a��C��M�Q�$6�	7�7��"�E�(�O��#�E�(�O�2:�!��.�E�5��=�%��,��E�)�rc�:�|dkr
dtd<y|dztd<y)Nrrg@�@)r)�
timeout_mss r�timer_fnr2�s$���A�~� ��i��%��.��i�r�rrz0Need to poll for I/O but the timeout is not set!r	z!Script finished without a result!z'Transfer successful, retrieved %d bytesz Transfer failed with code %d: %sr
r)#�sysrr
�iorr �argv�urlrrr/r2�	CurlMultir�setopt�M_SOCKETFUNCTION�M_TIMERFUNCTION�Curl�easy�URL�CONNECTTIMEOUT�LOW_SPEED_TIME�LOW_SPEED_LIMIT�_io�	WRITEDATA�
add_handler!r"�handlesrr�
remove_handle�close�print�getvalue�rr�<module>rKs���v�
���s�x�x�=�1��

�(�(�1�+�C�
"�C��
������		��<�4�l/�	���������V�
$�
$�i�0����V�
#�
#�X�.��v�{�{�}�����F�J�J������F�!�!�1�%����F�!�!�1�%����F�"�"�A�&�
�i�����F���c�"������
�
�
�f�3�3�Q�
7����Y��1��
��	�"���?��N�O�O��W�
�����D���
�
�����
�
	��?��
�7�
8�8���?�	�
3�c�#�,�,�.�6I�
I�J�	�
,��f�
�u�U�|�/L�
L�Mrdoc/pycurl/examples/__pycache__/basicfirst.cpython-312.pyc000064400000003021150335352040017505 0ustar00�

Б�g!���ddlZddlZejddkDZGd�d�Zej
j
dejz�e�Zej�Z
e
je
jd�e
je
jej�e
j�e
j!�eej$�y)�N�c��eZdZd�Zd�Zy)�Testc�`�d|_tr!|jjd�|_yy)N��ascii)�contents�PY3�encode)�selfs �^/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/basicfirst.py�__init__z
Test.__init__s'����
�� �M�M�0�0��9�D�M��c�,�|j|z|_y)N)r	)r�bufs  r
�
body_callbackzTest.body_callbacks���
�
��+��
rN)�__name__�
__module__�__qualname__rr�rr
rr
s��:�
,rrzTesting %s
zhttps://curl.haxx.se/dev/)�sys�pycurl�version_infor
r�stderr�write�version�t�Curl�c�setopt�URL�
WRITEFUNCTIONr�perform�close�printr	rrr
�<module>r&s����
�	���q��A���,�,��
�
����&�.�.�0�1��F���F�K�K�M��������+�,�������!�/�/�*��	�	�����	��a�j�j�rdoc/pycurl/examples/xmlrpc_curl.py000064400000004203150335352040013350 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

# We should ignore SIGPIPE when using pycurl.NOSIGNAL - see
# the libcurl tutorial for more info.
try:
    import signal
    from signal import SIGPIPE, SIG_IGN
except ImportError:
    pass
else:
    signal.signal(SIGPIPE, SIG_IGN)

try:
    from cStringIO import StringIO
except ImportError:
    try:
        from StringIO import StringIO
    except ImportError:
        from io import StringIO
try:
    import xmlrpclib
except ImportError:
    import xmlrpc.client as xmlrpclib
import pycurl
import sys

PY3 = sys.version_info[0] > 2


class CURLTransport(xmlrpclib.Transport):
    """Handles a cURL HTTP transaction to an XML-RPC server."""

    xmlrpc_h = [ "Content-Type: text/xml" ]

    def __init__(self, username=None, password=None):
        self.c = pycurl.Curl()
        self.c.setopt(pycurl.POST, 1)
        self.c.setopt(pycurl.NOSIGNAL, 1)
        self.c.setopt(pycurl.CONNECTTIMEOUT, 30)
        self.c.setopt(pycurl.HTTPHEADER, self.xmlrpc_h)
        if username != None and password != None:
            self.c.setopt(pycurl.USERPWD, '%s:%s' % (username, password))
        self._use_datetime = False

    def request(self, host, handler, request_body, verbose=0):
        b = StringIO()
        self.c.setopt(pycurl.URL, 'http://%s%s' % (host, handler))
        self.c.setopt(pycurl.POSTFIELDS, request_body)
        self.c.setopt(pycurl.WRITEFUNCTION, b.write)
        self.c.setopt(pycurl.VERBOSE, verbose)
        self.verbose = verbose
        try:
           self.c.perform()
        except pycurl.error:
            v = sys.exc_info()[1]
            if PY3:
                v = v.args
            raise xmlrpclib.ProtocolError(
                host + handler,
                v[0], v[1], None
                )
        b.seek(0)
        return self.parse_response(b)


if __name__ == "__main__":
    ## Test
    server = xmlrpclib.ServerProxy("http://betty.userland.com",
                                   transport=CURLTransport())
    print(server)
    try:
        print(server.examples.getStateName(41))
    except xmlrpclib.Error:
        v = sys.exc_info()[1]
        print("ERROR", v)
doc/pycurl/examples/file_upload.py000064400000002233150335352040013302 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import os, sys
import pycurl

# Class which holds a file reference and the read callback
class FileReader:
    def __init__(self, fp):
        self.fp = fp
    def read_callback(self, size):
        return self.fp.read(size)

# Check commandline arguments
if len(sys.argv) < 3:
    print("Usage: %s <url> <file to upload>" % sys.argv[0])
    raise SystemExit
url = sys.argv[1]
filename = sys.argv[2]

if not os.path.exists(filename):
    print("Error: the file '%s' does not exist" % filename)
    raise SystemExit

# Initialize pycurl
c = pycurl.Curl()
c.setopt(pycurl.URL, url)
c.setopt(pycurl.UPLOAD, 1)

# Two versions with the same semantics here, but the filereader version
# is useful when you have to process the data which is read before returning
if 1:
    c.setopt(pycurl.READFUNCTION, FileReader(open(filename, 'rb')).read_callback)
else:
    c.setopt(pycurl.READFUNCTION, open(filename, 'rb').read)

# Set size of file to be uploaded.
filesize = os.path.getsize(filename)
c.setopt(pycurl.INFILESIZE, filesize)

# Start transfer
print('Uploading file %s to url %s' % (filename, url))
c.perform()
c.close()
doc/pycurl/examples/retriever.py000064400000005151150335352040013030 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

#
# Usage: python retriever.py <file with URLs to fetch> [<# of
#          concurrent connections>]
#

import sys, threading
try:
    import Queue
except ImportError:
    import queue as Queue
import pycurl

# We should ignore SIGPIPE when using pycurl.NOSIGNAL - see
# the libcurl tutorial for more info.
try:
    import signal
    from signal import SIGPIPE, SIG_IGN
except ImportError:
    pass
else:
    signal.signal(SIGPIPE, SIG_IGN)


# Get args
num_conn = 10
try:
    if sys.argv[1] == "-":
        urls = sys.stdin.readlines()
    else:
        urls = open(sys.argv[1]).readlines()
    if len(sys.argv) >= 3:
        num_conn = int(sys.argv[2])
except:
    print("Usage: %s <file with URLs to fetch> [<# of concurrent connections>]" % sys.argv[0])
    raise SystemExit


# Make a queue with (url, filename) tuples
queue = Queue.Queue()
for url in urls:
    url = url.strip()
    if not url or url[0] == "#":
        continue
    filename = "doc_%03d.dat" % (len(queue.queue) + 1)
    queue.put((url, filename))


# Check args
assert queue.queue, "no URLs given"
num_urls = len(queue.queue)
num_conn = min(num_conn, num_urls)
assert 1 <= num_conn <= 10000, "invalid number of concurrent connections"
print("PycURL %s (compiled against 0x%x)" % (pycurl.version, pycurl.COMPILE_LIBCURL_VERSION_NUM))
print("----- Getting", num_urls, "URLs using", num_conn, "connections -----")


class WorkerThread(threading.Thread):
    def __init__(self, queue):
        threading.Thread.__init__(self)
        self.queue = queue

    def run(self):
        while 1:
            try:
                url, filename = self.queue.get_nowait()
            except Queue.Empty:
                raise SystemExit
            fp = open(filename, "wb")
            curl = pycurl.Curl()
            curl.setopt(pycurl.URL, url)
            curl.setopt(pycurl.FOLLOWLOCATION, 1)
            curl.setopt(pycurl.MAXREDIRS, 5)
            curl.setopt(pycurl.CONNECTTIMEOUT, 30)
            curl.setopt(pycurl.TIMEOUT, 300)
            curl.setopt(pycurl.NOSIGNAL, 1)
            curl.setopt(pycurl.WRITEDATA, fp)
            try:
                curl.perform()
            except:
                import traceback
                traceback.print_exc(file=sys.stderr)
                sys.stderr.flush()
            curl.close()
            fp.close()
            sys.stdout.write(".")
            sys.stdout.flush()


# Start a bunch of threads
threads = []
for dummy in range(num_conn):
    t = WorkerThread(queue)
    t.start()
    threads.append(t)


# Wait for all threads to finish
for thread in threads:
    thread.join()
doc/pycurl/examples/opensocketexception.py000064400000001535150335352040015114 0ustar00# Exposing rich exception information from callbacks example

import pycurl, random, socket

class ConnectionRejected(Exception):
    pass

def opensocket(curl, purpose, curl_address):
    if random.random() < 0.5:
        curl.exception = ConnectionRejected('Rejecting connection attempt in opensocket callback')
        return pycurl.SOCKET_BAD
    
    family, socktype, protocol, address = curl_address
    s = socket.socket(family, socktype, protocol)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
    return s

c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io')
c.exception = None
c.setopt(c.OPENSOCKETFUNCTION,
    lambda purpose, address: opensocket(c, purpose, address))

try:
    c.perform()
except pycurl.error as e:
    if e.args[0] == pycurl.E_COULDNT_CONNECT and c.exception:
        print(c.exception)
    else:
        print(e)
doc/pycurl/examples/retriever-multi.py000064400000006437150335352040014170 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

#
# Usage: python retriever-multi.py <file with URLs to fetch> [<# of
#          concurrent connections>]
#

import sys
import pycurl

# We should ignore SIGPIPE when using pycurl.NOSIGNAL - see
# the libcurl tutorial for more info.
try:
    import signal
    from signal import SIGPIPE, SIG_IGN
except ImportError:
    pass
else:
    signal.signal(SIGPIPE, SIG_IGN)



# Get args
num_conn = 10
try:
    if sys.argv[1] == "-":
        urls = sys.stdin.readlines()
    else:
        urls = open(sys.argv[1]).readlines()
    if len(sys.argv) >= 3:
        num_conn = int(sys.argv[2])
except:
    print("Usage: %s <file with URLs to fetch> [<# of concurrent connections>]" % sys.argv[0])
    raise SystemExit


# Make a queue with (url, filename) tuples
queue = []
for url in urls:
    url = url.strip()
    if not url or url[0] == "#":
        continue
    filename = "doc_%03d.dat" % (len(queue) + 1)
    queue.append((url, filename))


# Check args
assert queue, "no URLs given"
num_urls = len(queue)
num_conn = min(num_conn, num_urls)
assert 1 <= num_conn <= 10000, "invalid number of concurrent connections"
print("PycURL %s (compiled against 0x%x)" % (pycurl.version, pycurl.COMPILE_LIBCURL_VERSION_NUM))
print("----- Getting", num_urls, "URLs using", num_conn, "connections -----")


# Pre-allocate a list of curl objects
m = pycurl.CurlMulti()
m.handles = []
for i in range(num_conn):
    c = pycurl.Curl()
    c.fp = None
    c.setopt(pycurl.FOLLOWLOCATION, 1)
    c.setopt(pycurl.MAXREDIRS, 5)
    c.setopt(pycurl.CONNECTTIMEOUT, 30)
    c.setopt(pycurl.TIMEOUT, 300)
    c.setopt(pycurl.NOSIGNAL, 1)
    m.handles.append(c)


# Main loop
freelist = m.handles[:]
num_processed = 0
while num_processed < num_urls:
    # If there is an url to process and a free curl object, add to multi stack
    while queue and freelist:
        url, filename = queue.pop(0)
        c = freelist.pop()
        c.fp = open(filename, "wb")
        c.setopt(pycurl.URL, url)
        c.setopt(pycurl.WRITEDATA, c.fp)
        m.add_handle(c)
        # store some info
        c.filename = filename
        c.url = url
    # Run the internal curl state machine for the multi stack
    while 1:
        ret, num_handles = m.perform()
        if ret != pycurl.E_CALL_MULTI_PERFORM:
            break
    # Check for curl objects which have terminated, and add them to the freelist
    while 1:
        num_q, ok_list, err_list = m.info_read()
        for c in ok_list:
            c.fp.close()
            c.fp = None
            m.remove_handle(c)
            print("Success:", c.filename, c.url, c.getinfo(pycurl.EFFECTIVE_URL))
            freelist.append(c)
        for c, errno, errmsg in err_list:
            c.fp.close()
            c.fp = None
            m.remove_handle(c)
            print("Failed: ", c.filename, c.url, errno, errmsg)
            freelist.append(c)
        num_processed = num_processed + len(ok_list) + len(err_list)
        if num_q == 0:
            break
    # Currently no more I/O is pending, could do something in the meantime
    # (display a progress bar, etc.).
    # We just call select() to sleep until some more data is available.
    m.select(1.0)


# Cleanup
for c in m.handles:
    if c.fp is not None:
        c.fp.close()
        c.fp = None
    c.close()
m.close()

doc/pycurl/examples/sfquery.py000064400000004631150335352040012521 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et
#
# sfquery -- Source Forge query script using the ClientCGI high-level interface
#
# Retrieves a SourceForge XML export object for a given project.
# Specify the *numeric* project ID. the user name, and the password,
# as arguments. If you have a valid ~/.netrc entry for sourceforge.net,
# you can just give the project ID.
#
# By Eric S. Raymond, August 2002.  All rites reversed.

import sys, netrc
import curl

class SourceForgeUserSession(curl.Curl):
    # SourceForge-specific methods.  Sensitive to changes in site design.
    def login(self, name, password):
        "Establish a login session."
        self.post("account/login.php", (("form_loginname", name),
                                        ("form_pw", password),
                                        ("return_to", ""),
                                        ("stay_in_ssl", "1"),
                                        ("login", "Login With SSL")))
    def logout(self):
        "Log out of SourceForge."
        self.get("account/logout.php")
    def fetch_xml(self, numid):
        self.get("export/xml_export.php?group_id=%s" % numid)

if __name__ == "__main__":
    if len(sys.argv) == 1:
        project_id = '28236'    # PyCurl project ID
    else:
        project_id = sys.argv[1]
    # Try to grab authenticators out of your .netrc
    try:
        auth = netrc.netrc().authenticators("sourceforge.net")
        name, account, password = auth
    except:
        if len(sys.argv) < 4:
            print("Usage: %s <project id> <username> <password>" % sys.argv[0])
            raise SystemExit
        name = sys.argv[2]
        password = sys.argv[3]
    session = SourceForgeUserSession("https://sourceforge.net/")
    session.set_verbosity(0)
    session.login(name, password)
    # Login could fail.
    if session.answered("Invalid Password or User Name"):
        sys.stderr.write("Login/password not accepted (%d bytes)\n" % len(session.body()))
        sys.exit(1)
    # We'll see this if we get the right thing.
    elif session.answered("Personal Page For: " + name):
        session.fetch_xml(project_id)
        sys.stdout.write(session.body())
        session.logout()
        sys.exit(0)
    # Or maybe SourceForge has changed its site design so our check strings
    # are no longer valid.
    else:
        sys.stderr.write("Unexpected page (%d bytes)\n"%len(session.body()))
        sys.exit(1)

doc/pycurl/examples/smtp.py000064400000002113150335352040011777 0ustar00# Based on the simple libcurl SMTP example:
# https://github.com/bagder/curl/blob/master/docs/examples/smtp-mail.c
# There are other SMTP examples in that directory that you may find helpful.

from . import localhost
import pycurl
try:
    from io import BytesIO
except ImportError:
    from StringIO import StringIO as BytesIO
import sys

PY3 = sys.version_info[0] > 2

mail_server = 'smtp://%s' % localhost
mail_from = 'sender@example.org'
mail_to = 'addressee@example.net'

c = pycurl.Curl()
c.setopt(c.URL, mail_server)
c.setopt(c.MAIL_FROM, mail_from)
c.setopt(c.MAIL_RCPT, [mail_to])

message = '''\
From: %s
To: %s
Subject: PycURL SMTP example

SMTP example via PycURL
''' % (mail_from, mail_to)

if PY3:
    message = message.encode('ascii')

# libcurl does not perform buffering, therefore
# we need to wrap the message string into a BytesIO or StringIO.
io = BytesIO(message)
c.setopt(c.READDATA, io)

# If UPLOAD is not set, libcurl performs SMTP VRFY.
# Setting UPLOAD to True sends a message.
c.setopt(c.UPLOAD, True)

# Observe SMTP conversation.
c.setopt(c.VERBOSE, True)
c.perform()
doc/pycurl/examples/quickstart/get_python3_https.py000064400000000706150335352040016701 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
import certifi
from io import BytesIO

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.setopt(c.CAINFO, certifi.where())
c.perform()
c.close()

body = buffer.getvalue()
# Body is a byte string.
# We have to know the encoding in order to print it to a text file
# such as standard output.
print(body.decode('iso-8859-1'))
doc/pycurl/examples/quickstart/get_python2.py000064400000000677150335352040015465 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
from StringIO import StringIO

buffer = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
# For older PycURL versions:
#c.setopt(c.WRITEFUNCTION, buffer.write)
c.perform()
c.close()

body = buffer.getvalue()
# Body is a string in some encoding.
# In Python 2, we can print it without knowing what the encoding is.
print(body)
doc/pycurl/examples/quickstart/put_file.py000064400000000454150335352040015023 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'https://httpbin.org/put')

c.setopt(c.UPLOAD, 1)
file = open(__file__)
c.setopt(c.READDATA, file)

c.perform()
c.close()
# File must be kept open while Curl object is using it
file.close()
doc/pycurl/examples/quickstart/__pycache__/get_python3_https.cpython-312.pyc000064400000001655150335352040023246 0ustar00�

Б�g����ddlZddlZddlmZe�Zej
�Zejejd�ejeje�ejejej��ej�ej�ej�Zeej#d��y)�N)�BytesIOzhttp://pycurl.io/z
iso-8859-1)�pycurl�certifi�ior�buffer�Curl�c�setopt�URL�	WRITEDATA�CAINFO�where�perform�close�getvalue�body�print�decode���p/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/get_python3_https.py�<module>rs���
���	����F�K�K�M��������#�$�������f��������=�7�=�=�?�#��	�	�����	�
������d�k�k�,�� rdoc/pycurl/examples/quickstart/__pycache__/form_post.cpython-312.pyc000064400000001451150335352040021563 0ustar00�

Б�g4��&�ddlZ	ddlmZej
�Zejejd�ddiZ	ee	�Z
ejeje
�ej�ej�y#e$r	ddlmZY��wxYw)�N)�	urlencodezhttps://httpbin.org/post�field�value)�pycurl�urllib.parser�ImportError�urllib�Curl�c�setopt�URL�	post_data�
postfields�
POSTFIELDS�perform�close���h/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/form_post.py�<module>rs���
�!�&�
�F�K�K�M��������*�+�
�g��	�
�y�
!�
�������z�"��	�	�����	��!�!� �!�s�B�B�Bdoc/pycurl/examples/quickstart/__pycache__/get.cpython-312.pyc000064400000001574150335352040020340 0ustar00�

Б�gG��j�ddlZ	ddlmZe�Zej�Zejejd�ejeje�ej�ej�ej�Zeej!d��y#e$r	ddlmZY��wxYw)�N)�BytesIO)�StringIOzhttp://pycurl.io/z
iso-8859-1)�pycurl�ior�ImportErrorr�buffer�Curl�c�setopt�URL�	WRITEDATA�perform�close�getvalue�body�print�decode���b/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/get.py�<module>rs���
�-��
����F�K�K�M��������#�$�������f���	�	�����	�
������d�k�k�,�� ��!�-�,�-�s�B$�$B2�1B2doc/pycurl/examples/quickstart/__pycache__/put_buffer.cpython-312.pyc000064400000001640150335352040021714 0ustar00�

Б�g���x�ddlZ	ddlmZej
�Zejejd�ejejd�dZ
ee
jd��Zejeje�ej�ej�y#e$r	ddlmZY��wxYw)�N)�BytesIO)�StringIOzhttps://httpbin.org/put�z
{"json":true}zutf-8)�pycurl�ior�ImportErrorr�Curl�c�setopt�URL�UPLOAD�data�encode�buffer�READDATA�perform�close���i/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/put_buffer.py�<module>rs���
�-���F�K�K�M��������)�*�������1����
����W�%�	&��������V���	�	�����	���-�,�-�s�B+�+B9�8B9doc/pycurl/examples/quickstart/__pycache__/get_python2.cpython-312.pyc000064400000001327150335352040022017 0ustar00�

Б�g���(�ddlZddlmZe�Zej�Zejejd�ejeje�ej�ej�ej�Zee�y)�N)�StringIOzhttp://pycurl.io/)
�pycurlr�buffer�Curl�c�setopt�URL�	WRITEDATA�perform�close�getvalue�body�print���j/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/get_python2.py�<module>rso��
��	����F�K�K�M��������#�$�������f���	�	�����	�
������d�rdoc/pycurl/examples/quickstart/__pycache__/get_python2_https.cpython-312.pyc000064400000001560150335352040023240 0ustar00�

Б�g����ddlZddlZddlmZe�Zej�Zej
ejd�ej
eje�ej
ejej��ej�ej�ej�Zee�y)�N)�StringIOzhttp://pycurl.io/)�pycurl�certifir�buffer�Curl�c�setopt�URL�	WRITEDATA�CAINFO�where�perform�close�getvalue�body�print���p/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/get_python2_https.py�<module>rs���
���	����F�K�K�M��������#�$�������f��������=�7�=�=�?�#��	�	�����	�
������d�rdoc/pycurl/examples/quickstart/__pycache__/response_info.cpython-312.pyc000064400000001765150335352040022434 0ustar00�

Б�g����ddlZ	ddlmZe�Zej�Zejejd�ejeje�ej�edejej�z�edejej�z�ej!�y#e$r	ddlmZY��wxYw)�N)�BytesIO)�StringIOzhttp://pycurl.io/z
Status: %dzTime: %f)�pycurl�ior�ImportErrorr�buffer�Curl�c�setopt�URL�	WRITEDATA�perform�print�getinfo�
RESPONSE_CODE�
TOTAL_TIME�close���l/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/response_info.py�<module>rs���
�-��
����F�K�K�M��������#�$�������f���	�	���l�Q�Y�Y�q���/�/�0��j�1�9�9�Q�\�\�*�*�+����	���-�,�-�s�C�C�Cdoc/pycurl/examples/quickstart/__pycache__/follow_redirect.cpython-312.pyc000064400000001115150335352040022733 0ustar00�

Б�g�����ddlZej�Zejejd�ejej
d�ej
�ej�y)�Nzhttp://www.python.org/T)�pycurl�Curl�c�setopt�URL�FOLLOWLOCATION�perform�close���n/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/follow_redirect.py�<module>rsP��
��F�K�K�M��������(�)�����	�	�4� ��	�	�����	rdoc/pycurl/examples/quickstart/__pycache__/get_python3.cpython-312.pyc000064400000001424150335352040022016 0ustar00�

Б�g���F�ddlZddlmZe�Zej�Zej
ejd�ej
eje�ej�ej�ej�Ze
ejd��y)�N)�BytesIOzhttp://pycurl.io/z
iso-8859-1)�pycurl�ior�buffer�Curl�c�setopt�URL�	WRITEDATA�perform�close�getvalue�body�print�decode���j/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/get_python3.py�<module>rsw��
��	����F�K�K�M��������#�$�������f���	�	�����	�
������d�k�k�,�� rdoc/pycurl/examples/quickstart/__pycache__/file_upload_real.cpython-312.pyc000064400000001243150335352040023040 0ustar00�

Б�g#���ddlZej�Zejejd�ejej
dejeffg�ej�ej�y)�Nzhttps://httpbin.org/post�
fileupload)
�pycurl�Curl�c�setopt�URL�HTTPPOST�	FORM_FILE�__file__�perform�close���o/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/file_upload_real.py�<module>rsk��
��F�K�K�M��������*�+��������	���X������	�	�����	rdoc/pycurl/examples/quickstart/__pycache__/write_file.cpython-312.pyc000064400000001264150335352040021706 0ustar00�

Б�ge���ddlZedd�5Zej�Zejejd�ejeje�ej�ej�ddd�y#1swYyxYw)�Nzout.html�wbzhttp://pycurl.io/)
�pycurl�open�f�Curl�c�setopt�URL�	WRITEDATA�perform�close���i/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/write_file.py�<module>rsh��
�
�*�d��q�����
�A��H�H�Q�U�U�'�(��H�H�Q�[�[�!���I�I�K��G�G�I����s�A*B�B
doc/pycurl/examples/quickstart/__pycache__/response_headers.cpython-312.pyc000064400000003651150335352040023110 0ustar00�

Б�g1��|�ddlZddlZ	ddlmZiZd�Ze�Zej�Z
e
je
jd�e
je
jej�e
je
je�e
j!�e
j#�dZdevrDedj'�Zej*de�Zerej/d�Zed	ez�e�
d
Zedez�ej3�Zeej7e��y#e$r
ddlmZY��*wxYw)�N)�BytesIO)�StringIOc���|jd�}d|vry|jdd�\}}|j�}|j�}|j�}|t|<y)N�
iso-8859-1�:�)�decode�split�strip�lower�headers)�header_line�name�values   �o/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/response_headers.py�header_functionr
si���$�$�\�2�K�
�+����#�#�C��+�K�D�%�
�:�:�<�D��K�K�M�E��:�:�<�D��G�D�M�zhttp://pycurl.iozcontent-typez
charset=(\S+)rzDecoding using %srzAssuming encoding is %s)�pycurl�re�ior�ImportErrorrr
r�buffer�Curl�c�setopt�URL�
WRITEFUNCTION�write�HEADERFUNCTION�perform�close�encodingr�content_type�search�match�group�print�getvalue�bodyr	�rr�<module>r+s(��
�	�-��
���8
����F�K�K�M��������"�#�������&�,�,�'�����	�	�?�+��	�	�����	����W���>�*�0�0�2�L��B�I�I�o�|�4�E���;�;�q�>��
�!�H�,�-����H�	�
#�h�
.�/�
������d�k�k�(����w�-�,�,�-�s�D,�,D;�:D;doc/pycurl/examples/quickstart/__pycache__/file_upload_real_fancy.cpython-312.pyc000064400000001464150335352040024225 0ustar00�

Б�g��
�,�ddlZej�Zejejd�ejej
dejeejdejdffg�ej�ej�y)�Nzhttps://httpbin.org/post�
fileuploadz
helloworld.pyzapplication/x-python)�pycurl�Curl�c�setopt�URL�HTTPPOST�	FORM_FILE�__file__�
FORM_FILENAME�FORM_CONTENTTYPE�perform�close���u/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/file_upload_real_fancy.py�<module>rs���
��F�K�K�M��������*�+��������	���X�	����	���2�
��	�	��	�	�����	rdoc/pycurl/examples/quickstart/__pycache__/file_upload_buffer.cpython-312.pyc000064400000001372150335352040023371 0ustar00�

Б�g7���ddlZej�Zejejd�ejej
dejdejdffg�ej�ej�y)�Nzhttps://httpbin.org/post�
fileuploadz
readme.txtzThis is a fancy readme file)
�pycurl�Curl�c�setopt�URL�HTTPPOST�FORM_BUFFER�FORM_BUFFERPTR�perform�close���q/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/file_upload_buffer.py�<module>rsw��
��F�K�K�M��������*�+��������	�
�
�|�	���7������	�	�����	rdoc/pycurl/examples/quickstart/__pycache__/put_file.cpython-312.pyc000064400000001355150335352040021365 0ustar00�

Б�g,��F�ddlZej�Zejejd�ejej
d�ee�Zejeje�ej�ej�ej�y)�Nzhttps://httpbin.org/put�)�pycurl�Curl�c�setopt�URL�UPLOAD�open�__file__�file�READDATA�perform�close���g/opt/hc_python/lib64/python3.12/site-packages/../../../share/doc/pycurl/examples/quickstart/put_file.py�<module>rsr��
��F�K�K�M��������)�*�������1���H�~��������T���	�	�����	��
�
�rdoc/pycurl/examples/quickstart/file_upload_buffer.py000064400000000467150335352040017034 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'https://httpbin.org/post')

c.setopt(c.HTTPPOST, [
    ('fileupload', (
        c.FORM_BUFFER, 'readme.txt',
        c.FORM_BUFFERPTR, 'This is a fancy readme file',
    )),
])

c.perform()
c.close()
doc/pycurl/examples/quickstart/response_headers.py000064400000004061150335352040016543 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
import re
try:
    from io import BytesIO
except ImportError:
    from StringIO import StringIO as BytesIO

headers = {}
def header_function(header_line):
    # HTTP standard specifies that headers are encoded in iso-8859-1.
    # On Python 2, decoding step can be skipped.
    # On Python 3, decoding step is required.
    header_line = header_line.decode('iso-8859-1')

    # Header lines include the first status line (HTTP/1.x ...).
    # We are going to ignore all lines that don't have a colon in them.
    # This will botch headers that are split on multiple lines...
    if ':' not in header_line:
        return

    # Break the header line into header name and value.
    name, value = header_line.split(':', 1)

    # Remove whitespace that may be present.
    # Header lines include the trailing newline, and there may be whitespace
    # around the colon.
    name = name.strip()
    value = value.strip()

    # Header names are case insensitive.
    # Lowercase name here.
    name = name.lower()

    # Now we can actually record the header name and value.
    headers[name] = value

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io')
c.setopt(c.WRITEFUNCTION, buffer.write)
# Set our header function.
c.setopt(c.HEADERFUNCTION, header_function)
c.perform()
c.close()

# Figure out what encoding was sent with the response, if any.
# Check against lowercased header name.
encoding = None
if 'content-type' in headers:
    content_type = headers['content-type'].lower()
    match = re.search('charset=(\S+)', content_type)
    if match:
        encoding = match.group(1)
        print('Decoding using %s' % encoding)
if encoding is None:
    # Default encoding for HTML is iso-8859-1.
    # Other content types may have different default encoding,
    # or in case of binary data, may have no encoding at all.
    encoding = 'iso-8859-1'
    print('Assuming encoding is %s' % encoding)

body = buffer.getvalue()
# Decode using the encoding we figured out.
print(body.decode(encoding))
doc/pycurl/examples/quickstart/response_info.py000064400000000762150335352040016067 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
try:
    from io import BytesIO
except ImportError:
    from StringIO import StringIO as BytesIO

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.perform()

# HTTP response code, e.g. 200.
print('Status: %d' % c.getinfo(c.RESPONSE_CODE))
# Elapsed time for the transfer.
print('Time: %f' % c.getinfo(c.TOTAL_TIME))

# getinfo must be called before close.
c.close()
doc/pycurl/examples/quickstart/get_python2_https.py000064400000000762150335352040016702 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
import certifi
from StringIO import StringIO

buffer = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
# For older PycURL versions:
#c.setopt(c.WRITEFUNCTION, buffer.write)
c.setopt(c.CAINFO, certifi.where())
c.perform()
c.close()

body = buffer.getvalue()
# Body is a string in some encoding.
# In Python 2, we can print it without knowing what the encoding is.
print(body)
doc/pycurl/examples/quickstart/get.py000064400000001107150335352040013767 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
try:
    from io import BytesIO
except ImportError:
    from StringIO import StringIO as BytesIO

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
# For older PycURL versions:
#c.setopt(c.WRITEFUNCTION, buffer.write)
c.perform()
c.close()

body = buffer.getvalue()
# Body is a string on Python 2 and a byte string on Python 3.
# If we know the encoding, we can always decode the body and
# end up with a Unicode string.
print(body.decode('iso-8859-1'))
doc/pycurl/examples/quickstart/form_post.py000064400000001064150335352040015222 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
try:
    # python 3
    from urllib.parse import urlencode
except ImportError:
    # python 2
    from urllib import urlencode

c = pycurl.Curl()
c.setopt(c.URL, 'https://httpbin.org/post')

post_data = {'field': 'value'}
# Form data must be provided already urlencoded.
postfields = urlencode(post_data)
# Sets request method to POST,
# Content-Type header to application/x-www-form-urlencoded
# and data to send in request body.
c.setopt(c.POSTFIELDS, postfields)

c.perform()
c.close()
doc/pycurl/examples/quickstart/get_python3.py000064400000000623150335352040015455 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
from io import BytesIO

buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.close()

body = buffer.getvalue()
# Body is a byte string.
# We have to know the encoding in order to print it to a text file
# such as standard output.
print(body.decode('iso-8859-1'))
doc/pycurl/examples/quickstart/put_buffer.py000064400000000730150335352040015352 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
try:
    from io import BytesIO
except ImportError:
    from StringIO import StringIO as BytesIO

c = pycurl.Curl()
c.setopt(c.URL, 'https://httpbin.org/put')

c.setopt(c.UPLOAD, 1)
data = '{"json":true}'
# READDATA requires an IO-like object; a string is not accepted
# encode() is necessary for Python 3
buffer = BytesIO(data.encode('utf-8'))
c.setopt(c.READDATA, buffer)

c.perform()
c.close()
doc/pycurl/examples/quickstart/file_upload_real_fancy.py000064400000000743150335352040017663 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'https://httpbin.org/post')

c.setopt(c.HTTPPOST, [
    ('fileupload', (
        # upload the contents of this file
        c.FORM_FILE, __file__,
        # specify a different file name for the upload
        c.FORM_FILENAME, 'helloworld.py',
        # specify a different content type
        c.FORM_CONTENTTYPE, 'application/x-python',
    )),
])

c.perform()
c.close()
doc/pycurl/examples/quickstart/write_file.py000064400000000545150335352040015346 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

# As long as the file is opened in binary mode, both Python 2 and Python 3
# can write response body to it without decoding.
with open('out.html', 'wb') as f:
    c = pycurl.Curl()
    c.setopt(c.URL, 'http://pycurl.io/')
    c.setopt(c.WRITEDATA, f)
    c.perform()
    c.close()
doc/pycurl/examples/quickstart/follow_redirect.py000064400000000372150335352040016376 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

c = pycurl.Curl()
# Redirects to https://www.python.org/.
c.setopt(c.URL, 'http://www.python.org/')
# Follow redirect.
c.setopt(c.FOLLOWLOCATION, True)
c.perform()
c.close()
doc/pycurl/examples/quickstart/file_upload_real.py000064400000000443150335352040016500 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl

c = pycurl.Curl()
c.setopt(c.URL, 'https://httpbin.org/post')

c.setopt(c.HTTPPOST, [
    ('fileupload', (
        # upload the contents of this file
        c.FORM_FILE, __file__,
    )),
])

c.perform()
c.close()
doc/pycurl/examples/multi-socket_action-select.py000064400000017477150335352040016271 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

# Retrieves a single URL using the CurlMulti.socket_action calls, using
# select as the I/O polling mechanism:
#
# First, create a Multi object, and set socket and timer callbacks on it.
# Observed side effect: this causes the timer callback to be immediately
# invoked with the zero value for the timeout.
#
# The timer callback is very simple - it stores the timeout value passed
# into it in the global state for future use by the select calls that
# we will be making.
#
# The socket callback is more complicated. Its job is to add and remove
# socket handles to/from the data structure that we use for waiting for
# activity on them. The callback is invoked with a socket handle and the
# needed action (add for reading, add for writing or remove).
# Since this script utilizes the select call for waiting for activity,
# the socket callback updates the list of sockets which we should be
# polling for readability and the list that we should be polling for
# writability, which are then passed to the select call (and both of the
# sets are passed as the sockets to wait for errors/exceptions on).
#
# Next, create a Curl object (mapping to a libcurl easy handle), set the URL
# we are going to retrieve as well as any transfer options. This script sets
# the timeout to 5 seconds to be able to test failing transfers easily.
#
# Add the Curl object to the Multi object.
#
# Invoke Multi.socket_action to start the retrieval operation.
# Observed side effect: this causes the timer callback to be invoked
# with a greater than zero value for the timeout.
#
# By now we should have initialized our own state, which this script does
# prior to invoking any libcurl functions. Importantly, the state includes
# the timeout value that was communicated to us by libcurl.
#
# Run a loop which waits for activity on any of the sockets used by libcurl.
# The sockets are set that the socket callback has produced as of the
# present moment; the timeout is the most recent timeout value received by
# the timer callback.
#
# Importantly, the loop should not simply sleep for the entire
# timeout interval, as that would cause the transfer to take a very long time.
# It is *required* to use something like a select call to wait for activity
# on any of the sockets currently active for *up to* the timeout value.
#
# The loop terminates when the number of active transfers (handles in libcurl
# parlance) reaches zero. This number is provided by each socket_action
# call, which is why each call (even the ones that are called due to
# timeout being reached, as opposed to any socket activity) must update
# the number of running handles.
#
# After the loop terminates, clean up everything: remove the easy object from
# the multi object, close the easy object, close the multi object.

import sys, select
import pycurl
from io import BytesIO

if len(sys.argv) > 1:
    url = sys.argv[1]
else:
    url = 'https://www.python.org'

state = {
    'rlist': [],
    'wlist': [],
    'running': None,
    'timeout': None,
    'result': None,
    # If the transfer failed, code and msg will be filled in.
    'code': None,
    'msg': None,
}

def socket_fn(what, sock_fd, multi, socketp):
    if what == pycurl.POLL_IN or what == pycurl.POLL_INOUT:
        state['rlist'].append(sock_fd)
    elif what == pycurl.POLL_OUT or what == pycurl.POLL_INOUT:
        state['wlist'].append(sock_fd)
    elif what == pycurl.POLL_REMOVE:
        if sock_fd in state['rlist']:
            state['rlist'].remove(sock_fd)
        if sock_fd in state['wlist']:
            state['wlist'].remove(sock_fd)
    else:
        raise Exception("Unknown value of what: %s" % what)

def work(timeout):
    rready, wready, xready = select.select(
        state['rlist'], state['wlist'], set(state['rlist']) | set(state['wlist']), timeout)
    
    if len(rready) == 0 and len(wready) == 0 and len(xready) == 0:
        # The number of running handles must be updated after each
        # call to socket_action, which includes those with the SOCKET_TIMEOUT
        # argument (otherwise e.g. a transfer which failed due to
        # exceeding the connection timeout would hang).
        _, running = multi.socket_action(pycurl.SOCKET_TIMEOUT, 0)
    else:
        for sock_fd in rready:
            # socket_action returns a tuple whose first element is always the
            # CURLE_OK value (0), ignore it and use the second element only.
            _, running = multi.socket_action(sock_fd, pycurl.CSELECT_IN)
        for sock_fd in wready:
            _, running = multi.socket_action(sock_fd, pycurl.CSELECT_OUT)
        for sock_fd in xready:
            _, running = multi.socket_action(sock_fd, pycurl.CSELECT_ERR)
    
    # Since we are only performing a single transfer, we could call
    # Multi.info_read after the I/O loop terminates.
    # In practice, you would probably use socket_action with multiple
    # transfers, and you may want to be notified about transfer completion
    # as soon as the result is available.
    if state['running'] is not None and running != state['running']:
        # Some handle has completed.
        #
        # Note that socket_action was potentially called multiple times
        # in this function (e.g. if both a read handle became ready and a
        # different write handle became ready), therefore it is possible
        # that multiple handles have completed. In this particular script
        # we are only performing a single transfer (one
        # Curl object / easy handle), therefore only one transfer can ever
        # possibly complete.
        qmsg, successes, failures = multi.info_read()
        # We should have retrieved all of the available statuses, leaving
        # none in the queue.
        assert qmsg == 0
        
        # We have only one transfer.
        assert len(successes) == 1 and len(failures) == 0 or \
            len(successes) == 0 and len(failures) == 1
        
        if successes:
            state['result'] = True
        if failures:
            state['result'] = False
            # The failures array contains tuples of
            # (easy object, CURLE code, error message).
            _easy, state['code'], state['msg'] = failures[0]
    
    state['running'] = running

def timer_fn(timeout_ms):
    if timeout_ms < 0:
        # libcurl passes a negative timeout value when no further
        # calls should be made.
        state['timeout'] = None
    else:
        state['timeout'] = timeout_ms / 1000.0

multi = pycurl.CurlMulti()
multi.setopt(pycurl.M_SOCKETFUNCTION, socket_fn)
multi.setopt(pycurl.M_TIMERFUNCTION, timer_fn)

easy = pycurl.Curl()
easy.setopt(pycurl.URL, url)
# Uncomment to see what libcurl is doing throughout the transfer.
#easy.setopt(pycurl.VERBOSE, 1)
easy.setopt(pycurl.CONNECTTIMEOUT, 5)
easy.setopt(pycurl.LOW_SPEED_TIME, 5)
easy.setopt(pycurl.LOW_SPEED_LIMIT, 1)
_io = BytesIO()
easy.setopt(pycurl.WRITEDATA, _io)

multi.add_handle(easy)

handles = multi.socket_action(pycurl.SOCKET_TIMEOUT, 0)
# This should invoke the timer function with a timeout value.

while True:
    if state['running'] == 0:
        break
    else:
        # By the time we get here, timer function should have been already
        # invoked at least once so that we have a libcurl-supplied
        # timeout value. But in case this hasn't happened, default the timeout
        # to 1 second.
        timeout = state['timeout']
        if timeout is None:
            raise Exception('Need to poll for I/O but the timeout is not set!')
        work(timeout)

multi.remove_handle(easy)
easy.close()
multi.close()

# Uncomment to print the retrieved contents.
#print(_io.getvalue().decode())

if state['result'] is None:
    raise Exception('Script finished without a result!')
if state['result']:
    print('Transfer successful, retrieved %d bytes' % len(_io.getvalue()))
else:
    print('Transfer failed with code %d: %s' % (state['code'], state['msg']))
doc/pycurl/examples/ssh_keyfunction.py000064400000000456150335352040014237 0ustar00import pycurl

sftp_server = 'sftp://web.sourceforge.net'

c = pycurl.Curl()
c.setopt(c.URL, sftp_server)
c.setopt(c.VERBOSE, True)

def keyfunction(known_key, found_key, match):
    return c.KHSTAT_FINE

c.setopt(c.SSH_KNOWNHOSTS, '.known_hosts')
c.setopt(c.SSH_KEYFUNCTION, keyfunction)

c.perform()
doc/pycurl/examples/basicfirst.py000064400000001041150335352040013144 0ustar00#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et
import sys
import pycurl

PY3 = sys.version_info[0] > 2


class Test:
    def __init__(self):
        self.contents = ''
        if PY3:
            self.contents = self.contents.encode('ascii')

    def body_callback(self, buf):
        self.contents = self.contents + buf


sys.stderr.write("Testing %s\n" % pycurl.version)

t = Test()
c = pycurl.Curl()
c.setopt(c.URL, 'https://curl.haxx.se/dev/')
c.setopt(c.WRITEFUNCTION, t.body_callback)
c.perform()
c.close()

print(t.contents)
doc/pycurl/AUTHORS000064400000011762150335352040007706 0ustar00Copyright (C) 2001-2008 by Kjetil Jacobsen <kjetilja at gmail.com>
Copyright (C) 2001-2008 by Markus F.X.J. Oberhumer <markus at oberhumer.com>
Copyright (C) 2013-2022 by Oleg Pudeyev <code at olegp.name>

Please see README, COPYING-LGPL and COPYING-MIT for license information.

The following individuals contributed code to PycURL:

Aaron Hill <visine19 at hotmail.com>
Adam Guthrie <therigu at users.sourceforge.net>
Adam Jacob Muller <adam at isprime.com>
Akiomi Kamakura <akiomik at gmail.com>
Alexandre Pion <pion at afnic.fr>
Amir Rossert <amir.rossert at safebreach.com>
Amit Mongia <amit_mongia at hotmail.com>
Andjelko Horvat <comel at vingd.com>
Arshad Khan <khan.m.arshad at gmail.com>
Artur Sobierak <asobierak at gmail.com>
Ashley Whetter <ashleyw at activestate.com>
Barry Warsaw <barry at python.org>
Bastian Kleineidam
Benjamin Peterson <benjamin at python.org>
Bill Collins <bill.collins at hp.com>
Bo Anderson <mail at boanderson.me>
Casey Miller <camiller at linkedin.com>
Chih-Hsuan Yen <yan12125 at gmail.com>
Christian Clauss <cclauss at me.com>
Christopher Warner <cwarner at kernelcode.com>
Clint Clayton <clintclayton at me.com>
Conrad Steenberg <conrad at hep.caltech.edu>
Daniel Pena Arteaga <dpena at ph.tum.de>
Daniel Stenberg <daniel at haxx.se>
decitre <decitre at gmail.com>
Dima Tisnek <dimaqq at gmail.com>
Dmitriy Taychenachev <dmitriy.taychenachev at skypicker.com>
Dmitry Ketov <dketov at gmail.com>
Dom Sekotill <dom.sekotill at kodo.org.uk>
Domenico Andreoli <cavok at libero.it>
Dominique <curl-and-python at d242.net>
Eneas U de Queiroz <cotequeiroz at gmail.com>
Eric S. Raymond <esr at thyrsus.com>
Felix Yan <felixonmars at archlinux.org>
Francisco Alves <chico at corp.globo.com>
Gabi Davar <grizzly.nyo at gmail.com>
Gisle Vanem <gvanem at yahoo.no>
Gregory Petukhov <lorien at lorien.name>
Hasan <aliyevH at hotmail.com>
Hugo <hugovk at users.noreply.github.com>
Iain R. Learmonth <irl at fsfe.org>
ideal <idealities at gmail.com>
Jakob Truelsen <jakob at scalgo.com>
Jakub Wilk <jwilk at jwilk.net>
James Deucker <bitwisecook at users.noreply.github.com>
Jan Kryl <jan.kryl at nexenta.com>
Jayne <corvine at gmail.com>
James Deucker <bitwisecook at users.noreply.github.com>
Jean Hominal <jhominal at gmail.com>
JiCiT <jason at infinitebubble.com>
Jim Patterson
Josef Schlehofer <pepe.schlehofer at gmail.com>
Jozef Melicher <jozef.melicher at eset.sk>
K.S.Sreeram <sreeram at tachyontech.net>
Kamil Dudka <kdudka at redhat.com>
Kevin Ko <kevin.s.ko at gmail.com>
Kevin Schlosser <drschlosser at hotmail.com>
Khavish Anshudass Bhundoo <khavishbhundoo at users.noreply.github.com>
Kian-Meng Ang <kianmeng at cpan.org>
kxrd <onyeabor at riseup.net>
Lipin Dmitriy <blackwithwhite666 at gmail.com>
Léo El Amri <leo at superlel.me>
Marc Labranche <mlabranche at developertown.com>
Marcel Brouwers <marcel at marcelbrouwers.nl>
Marcelo Jorge Vieira <metal at alucinados.com>
Marien Zwart <marienz at users.sourceforge.net>
Mark Eichin
Markus <nepenthesdev at gmail.com>
Martin Muenstermann <mamuema at sourceforge.net>
Matt King <matt at gnik.com>
Michael C <michael at mchang.name>
Michael Cho <michael at michaelcho.dev>
Michael Coughlin <michael.w.coughlin at gmail.com>
Michael Treanor <26148512+skeptycal at users.noreply.github.com>
Michał Górny <mgorny at gentoo.org>
Miro Hrončok <miro at hroncok.cz>
Nelson Chen <crazysim at gmail.com>
Nick Pilon <npilon at oreilly.com>
Nicolas Pauss <nicolas.pauss at intersec.com>
Oleg Broytman <phd at phdru.name>
Oren <orenyomtov at users.noreply.github.com>
Orion Poplawski <orion at cora.nwra.com>
Oskari Saarenmaa <os at ohmu.fi>
Paul Pacheco
Pavel Horáček <horacek.pavel at protonmail.com>
Pierre Grimaud <grimaud.pierre at gmail.com>
René Dudfield <renesd at gmail.com>
resokou <resokou at gmail.com>
Roland Sommer <rol at ndsommer.de>
Romuald Brunet <romuald at gandi.net>
Romulo A. Ceccon <romuloceccon at gmail.com>
Russell McConnachie <okanaganrusty at mcconnachie.ca>
Russell McConnachie <pmcconna at cisco.com>
Samuel Dion-Girardeau <samuel.diongirardeau at gmail.com>
Samuel Henrique <samueloph at debian.org>
Scott Talbert <swt at techie.net>
Simon Legner <Simon.Legner at gmail.com>
Srinivas <spg349 at nyu.edu>
Steve Kowalik <steven at wedontsleep.org>
Subin <eourm20 at gmail.com>
Tal Einat <tal.einat at socialcodeinc.com>
Thomas Hunger <teh at camvine.org>
Tino Lange <Tino.Lange at gmx.de>
toddrme2178 <toddrme2178 at gmail.com>
Tom Pierce <tom.pierce0 at gmail.com>
Vesa Jääskeläinen <vesa.jaaskelainen at vaisala.com>
Victor Lascurain <bittor at eleka.net>
Vincent Philippon <Vincent.Philippon at ubisoft.com>
Vitaly Murashev <vitaly.murashev at gmail.com>
Vitezslav Cizek <vcizek at suse.com>
vmurashev <vitaly.murashev at gmail.com>
Wei C <gitsouler at users.noreply.github.com>
Whitney Sorenson <wsorenson at gmail.com>
Wim Lewis <wiml at users.sourceforge.net>
Yiteng Zhang <yiteng.zhang at oracle.com>
Yuhui H <eyecat at gmail.com>
Yuri Ushakov <yuri.ushakov at gmail.com>
Yves Bastide <yves at botify.com>
Zdenek Pavlas <zpavlas at redhat.com>
ziggy <ziggy at elephant-bird.net>
doc/pycurl/README.rst000064400000014546150335352040010330 0ustar00PycURL -- A Python Interface To The cURL library
================================================

.. image:: https://github.com/pycurl/pycurl/workflows/CI/badge.svg
	   :target: https://github.com/pycurl/pycurl/actions

PycURL is a Python interface to `libcurl`_, the multiprotocol file
transfer library. Similarly to the urllib_ Python module,
PycURL can be used to fetch objects identified by a URL from a Python program.
Beyond simple fetches however PycURL exposes most of the functionality of
libcurl, including:

- Speed - libcurl is very fast and PycURL, being a thin wrapper above
  libcurl, is very fast as well. PycURL `was benchmarked`_ to be several
  times faster than requests_.
- Features including multiple protocol support, SSL, authentication and
  proxy options. PycURL supports most of libcurl's callbacks.
- Multi_ and share_ interfaces.
- Sockets used for network operations, permitting integration of PycURL
  into the application's I/O loop (e.g., using Tornado_).

.. _was benchmarked: http://stackoverflow.com/questions/15461995/python-requests-vs-pycurl-performance
.. _requests: http://python-requests.org/
.. _Multi: https://curl.haxx.se/libcurl/c/libcurl-multi.html
.. _share: https://curl.haxx.se/libcurl/c/libcurl-share.html
.. _Tornado: http://www.tornadoweb.org/


Requirements
------------

- Python 3.5-3.10.
- libcurl 7.19.0 or better.


Installation
------------

Download source and binary distributions from `PyPI`_.
Binary wheels are now available for 32 and 64 bit Windows versions.

Please see `INSTALL.rst`_ for installation instructions. If installing from
a Git checkout, please follow instruction in the `Git Checkout`_ section
of INSTALL.rst.

.. _PyPI: https://pypi.python.org/pypi/pycurl
.. _INSTALL.rst: http://pycurl.io/docs/latest/install.html
.. _Git Checkout: http://pycurl.io/docs/latest/install.html#git-checkout


Documentation
-------------

Documentation for the most recent PycURL release is available on
`PycURL website <http://pycurl.io/docs/latest/>`_.

Documentation for the development version of PycURL
is available `here <http://pycurl.io/docs/dev/>`_.

To build documentation from source, run ``make docs``.
Building documentation requires `Sphinx <http://sphinx-doc.org/>`_ to
be installed, as well as pycurl extension module built as docstrings are
extracted from it. Built documentation is stored in ``build/doc``
subdirectory.


Support
-------

For support questions please use `curl-and-python mailing list`_.
`Mailing list archives`_ are available for your perusal as well.

Although not an official support venue, `Stack Overflow`_ has been
popular with some PycURL users.

Bugs can be reported `via GitHub`_. Please use GitHub only for bug
reports and direct questions to our mailing list instead.

.. _curl-and-python mailing list: https://lists.haxx.se/listinfo/curl-and-python
.. _Stack Overflow: http://stackoverflow.com/questions/tagged/pycurl
.. _Mailing list archives: https://curl.haxx.se/mail/list.cgi?list=curl-and-python
.. _via GitHub: https://github.com/pycurl/pycurl/issues


Automated Tests
---------------

PycURL comes with an automated test suite. To run the tests, execute::

    make test

The suite depends on packages `pytest`_ and `flask`_, as well as `vsftpd`_.

Some tests use vsftpd configured to accept anonymous uploads. These tests
are not run by default. As configured, vsftpd will allow reads and writes to
anything the user running the tests has read and write access. To run
vsftpd tests you must explicitly set PYCURL_VSFTPD_PATH variable like so::

    # use vsftpd in PATH
    export PYCURL_VSFTPD_PATH=vsftpd

    # specify full path to vsftpd
    export PYCURL_VSFTPD_PATH=/usr/local/libexec/vsftpd

.. _pytest: https://pytest.org/
.. _flask: https://flask.palletsprojects.com/
.. _vsftpd: http://vsftpd.beasts.org/


Test Matrix
-----------

The test matrix is a separate framework that runs tests on more esoteric
configurations. It supports:

- Testing against Python 2.4, which bottle does not support.
- Testing against Python compiled without threads, which requires an out of
  process test server.
- Testing against locally compiled libcurl with arbitrary options.

To use the test matrix, first start the test server from Python 2.5+ by
running::

    python -m tests.appmanager

Then in a different shell, and preferably in a separate user account,
run the test matrix::

    # run ftp tests, etc.
    export PYCURL_VSFTPD_PATH=vsftpd
    # create a new work directory, preferably not under pycurl tree
    mkdir testmatrix
    cd testmatrix
    # run the matrix specifying absolute path
    python /path/to/pycurl/tests/matrix.py

The test matrix will download, build and install supported Python versions
and supported libcurl versions, then run pycurl tests against each combination.
To see what the combinations are, look in
`tests/matrix.py <tests/matrix.py>`_.


Contribute
----------

For smaller changes:

#. Fork `the repository`_ on Github.
#. Create a branch off **master**.
#. Make your changes.
#. Write a test which shows that the bug was fixed or that the feature
   works as expected.
#. Send a pull request.
#. Check back after 10-15 minutes to see if tests passed on Travis CI.
   PycURL supports old Python and libcurl releases and their support is tested
   on Travis.

For larger changes:

#. Join the `mailing list`_.
#. Discuss your proposal on the mailing list.
#. When consensus is reached, implement it as described above.

Please contribute binary distributions for your system to the
`downloads repository`_.


License
-------

::

    Copyright (C) 2001-2008 by Kjetil Jacobsen <kjetilja at gmail.com>
    Copyright (C) 2001-2008 by Markus F.X.J. Oberhumer <markus at oberhumer.com>
    Copyright (C) 2013-2022 by Oleg Pudeyev <code at olegp.name>

    All rights reserved.

    PycURL is dual licensed under the LGPL and an MIT/X derivative license
    based on the cURL license.  A full copy of the LGPL license is included
    in the file COPYING-LGPL.  A full copy of the MIT/X derivative license is
    included in the file COPYING-MIT.  You can redistribute and/or modify PycURL
    according to the terms of either license.

.. _PycURL: http://pycurl.io/
.. _libcurl: https://curl.haxx.se/libcurl/
.. _urllib: http://docs.python.org/library/urllib.html
.. _`the repository`: https://github.com/pycurl/pycurl
.. _`mailing list`: https://lists.haxx.se/listinfo/curl-and-python
.. _`downloads repository`: https://github.com/pycurl/downloads
doc/pycurl/COPYING-MIT000064400000002243150335352040010312 0ustar00COPYRIGHT AND PERMISSION NOTICE

Copyright (C) 2001-2008 by Kjetil Jacobsen <kjetilja at gmail.com>
Copyright (C) 2001-2008 by Markus F.X.J. Oberhumer <markus at oberhumer.com>
Copyright (C) 2013-2022 by Oleg Pudeyev <code at olegp.name>

All rights reserved.

Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.

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 OF THIRD PARTY RIGHTS. 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.

Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
man/man1/nghttp.1000064400000015460150340274550007554 0ustar00.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "NGHTTP" "1" "Jan 12, 2025" "1.65.0-DEV" "nghttp2"
.SH NAME
nghttp \- HTTP/2 client
.SH SYNOPSIS
.sp
\fBnghttp\fP [OPTIONS]... <URI>...
.SH DESCRIPTION
.sp
HTTP/2 client
.INDENT 0.0
.TP
.B <URI>
Specify URI to access.
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
.B \-v, \-\-verbose
Print   debug   information   such  as   reception   and
transmission of frames and name/value pairs.  Specifying
this option multiple times increases verbosity.
.UNINDENT
.INDENT 0.0
.TP
.B \-n, \-\-null\-out
Discard downloaded data.
.UNINDENT
.INDENT 0.0
.TP
.B \-O, \-\-remote\-name
Save  download  data  in  the  current  directory.   The
filename is  derived from  URI.  If  URI ends  with \(aq\fI/\fP\(aq,
\(aqindex.html\(aq  is used  as a  filename.  Not  implemented
yet.
.UNINDENT
.INDENT 0.0
.TP
.B \-t, \-\-timeout=<DURATION>
Timeout each request after <DURATION>.  Set 0 to disable
timeout.
.UNINDENT
.INDENT 0.0
.TP
.B \-w, \-\-window\-bits=<N>
Sets the stream level initial window size to 2**<N>\-1.
.UNINDENT
.INDENT 0.0
.TP
.B \-W, \-\-connection\-window\-bits=<N>
Sets  the  connection  level   initial  window  size  to
2**<N>\-1.
.UNINDENT
.INDENT 0.0
.TP
.B \-a, \-\-get\-assets
Download assets  such as stylesheets, images  and script
files linked  from the downloaded resource.   Only links
whose  origins are  the same  with the  linking resource
will be downloaded.   nghttp prioritizes resources using
HTTP/2 dependency  based priority.  The  priority order,
from highest to lowest,  is html itself, css, javascript
and images.
.UNINDENT
.INDENT 0.0
.TP
.B \-s, \-\-stat
Print statistics.
.UNINDENT
.INDENT 0.0
.TP
.B \-H, \-\-header=<HEADER>
Add a header to the requests.  Example: \fI\%\-H\fP\(aq:method: PUT\(aq
.UNINDENT
.INDENT 0.0
.TP
.B \-\-trailer=<HEADER>
Add a trailer header to the requests.  <HEADER> must not
include pseudo header field  (header field name starting
with \(aq:\(aq).  To  send trailer, one must use  \fI\%\-d\fP option to
send request body.  Example: \fI\%\-\-trailer\fP \(aqfoo: bar\(aq.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-cert=<CERT>
Use  the specified  client certificate  file.  The  file
must be in PEM format.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-key=<KEY>
Use the  client private key  file.  The file must  be in
PEM format.
.UNINDENT
.INDENT 0.0
.TP
.B \-d, \-\-data=<PATH>
Post FILE to server. If \(aq\-\(aq  is given, data will be read
from stdin.
.UNINDENT
.INDENT 0.0
.TP
.B \-m, \-\-multiply=<N>
Request each URI <N> times.  By default, same URI is not
requested twice.  This option disables it too.
.UNINDENT
.INDENT 0.0
.TP
.B \-u, \-\-upgrade
Perform HTTP Upgrade for HTTP/2.  This option is ignored
if the request URI has https scheme.  If \fI\%\-d\fP is used, the
HTTP upgrade request is performed with OPTIONS method.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-extpri=<PRI>
Sets RFC 9218 priority of  given URI.  <PRI> must be the
wire format  of priority  header field  (e.g., \(dqu=3,i\(dq).
This  option  can  be  used  multiple  times,  and  N\-th
\fI\%\-\-extpri\fP option sets priority of N\-th URI in the command
line.  If  the number  of this option  is less  than the
number of  URI, the last  option value is  repeated.  If
there  is   no  \fI\%\-\-extpri\fP  option,  urgency   is  3,  and
incremental is false.
.UNINDENT
.INDENT 0.0
.TP
.B \-M, \-\-peer\-max\-concurrent\-streams=<N>
Use  <N>  as  SETTINGS_MAX_CONCURRENT_STREAMS  value  of
remote endpoint as if it  is received in SETTINGS frame.
.sp
Default: \fB100\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-c, \-\-header\-table\-size=<SIZE>
Specify decoder  header table  size.  If this  option is
used  multiple times,  and the  minimum value  among the
given values except  for last one is  strictly less than
the last  value, that minimum  value is set  in SETTINGS
frame  payload  before  the   last  value,  to  simulate
multiple header table size change.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-encoder\-header\-table\-size=<SIZE>
Specify encoder header table size.  The decoder (server)
specifies  the maximum  dynamic table  size it  accepts.
Then the negotiated dynamic table size is the minimum of
this option value and the value which server specified.
.UNINDENT
.INDENT 0.0
.TP
.B \-b, \-\-padding=<N>
Add at  most <N>  bytes to a  frame payload  as padding.
Specify 0 to disable padding.
.UNINDENT
.INDENT 0.0
.TP
.B \-r, \-\-har=<PATH>
Output HTTP  transactions <PATH> in HAR  format.  If \(aq\-\(aq
is given, data is written to stdout.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-color
Force colored log output.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-continuation
Send large header to test CONTINUATION.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-content\-length
Don\(aqt send content\-length header field.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-hexdump
Display the  incoming traffic in  hexadecimal (Canonical
hex+ASCII display).  If SSL/TLS  is used, decrypted data
are used.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-push
Disable server push.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-max\-concurrent\-streams=<N>
The  number of  concurrent  pushed  streams this  client
accepts.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-expect\-continue
Perform an Expect/Continue handshake:  wait to send DATA
(up to  a short  timeout)  until the server sends  a 100
Continue interim response. This option is ignored unless
combined with the \fI\%\-d\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-y, \-\-no\-verify\-peer
Suppress  warning  on  server  certificate  verification
failure.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ktls
Enable ktls.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-rfc7540\-pri
Disable RFC7540 priorities.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Display version information and exit.
.UNINDENT
.INDENT 0.0
.TP
.B \-h, \-\-help
Display this help and exit.
.UNINDENT
.sp
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024).  Units are K, M and G (powers of 1024).
.sp
The <DURATION> argument is an integer and an optional unit (e.g., 1s
is 1 second and 500ms is 500 milliseconds).  Units are h, m, s or ms
(hours, minutes, seconds and milliseconds, respectively).  If a unit
is omitted, a second is used as unit.
.SH SEE ALSO
.sp
\fBnghttpd(1)\fP, \fBnghttpx(1)\fP, \fBh2load(1)\fP
.SH AUTHOR
Tatsuhiro Tsujikawa
.SH COPYRIGHT
2012, 2015, 2016, Tatsuhiro Tsujikawa
.\" Generated by docutils manpage writer.
.
man/man1/nghttpx.1000064400000272034150340274550007746 0ustar00.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "NGHTTPX" "1" "Jan 12, 2025" "1.65.0-DEV" "nghttp2"
.SH NAME
nghttpx \- HTTP/2 proxy
.SH SYNOPSIS
.sp
\fBnghttpx\fP [OPTIONS]... [<PRIVATE_KEY> <CERT>]
.SH DESCRIPTION
.sp
A reverse proxy for HTTP/3, HTTP/2, and HTTP/1.
.INDENT 0.0
.TP
.B <PRIVATE_KEY>
Set  path  to  server\(aqs private  key.   Required  unless
\(dqno\-tls\(dq parameter is used in \fI\%\-\-frontend\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B <CERT>
Set  path  to  server\(aqs  certificate.   Required  unless
\(dqno\-tls\(dq  parameter is  used in  \fI\%\-\-frontend\fP option.   To
make OCSP stapling work, this must be an absolute path.
.UNINDENT
.SH OPTIONS
.sp
The options are categorized into several groups.
.SS Connections
.INDENT 0.0
.TP
.B \-b, \-\-backend=(<HOST>,<PORT>|unix:<PATH>)[;[<PATTERN>[:...]][[;<PARAM>]...]
Set  backend  host  and   port.   The  multiple  backend
addresses are  accepted by repeating this  option.  UNIX
domain socket  can be  specified by prefixing  path name
with \(dqunix:\(dq (e.g., unix:/var/run/backend.sock).
.sp
Optionally, if <PATTERN>s are given, the backend address
is  only  used  if  request matches  the  pattern.   The
pattern  matching is  closely  designed  to ServeMux  in
net/http package of  Go programming language.  <PATTERN>
consists of  path, host +  path or just host.   The path
must start  with \(dq\fI/\fP\(dq.  If  it ends with \(dq\fI/\fP\(dq,  it matches
all  request path  in  its subtree.   To  deal with  the
request  to the  directory without  trailing slash,  the
path which ends  with \(dq\fI/\fP\(dq also matches  the request path
which  only  lacks  trailing  \(aq\fI/\fP\(aq  (e.g.,  path  \(dq\fI/foo/\fP\(dq
matches request path  \(dq\fI/foo\fP\(dq).  If it does  not end with
\(dq\fI/\fP\(dq, it  performs exact match against  the request path.
If  host  is given,  it  performs  a match  against  the
request host.   For a  request received on  the frontend
listener with  \(dqsni\-fwd\(dq parameter enabled, SNI  host is
used instead of a request host.  If host alone is given,
\(dq\fI/\fP\(dq is  appended to it,  so that it matches  all request
paths  under the  host  (e.g., specifying  \(dqnghttp2.org\(dq
equals  to \(dqnghttp2.org/\(dq).   CONNECT method  is treated
specially.  It  does not have  path, and we  don\(aqt allow
empty path.  To workaround  this, we assume that CONNECT
method has \(dq\fI/\fP\(dq as path.
.sp
Patterns with  host take  precedence over  patterns with
just path.   Then, longer patterns take  precedence over
shorter ones.
.sp
Host  can  include \(dq*\(dq  in  the  left most  position  to
indicate  wildcard match  (only suffix  match is  done).
The \(dq*\(dq must match at least one character.  For example,
host    pattern    \(dq*.nghttp2.org\(dq    matches    against
\(dqwww.nghttp2.org\(dq  and  \(dqgit.ngttp2.org\(dq, but  does  not
match  against  \(dqnghttp2.org\(dq.   The exact  hosts  match
takes precedence over the wildcard hosts match.
.sp
If path  part ends with  \(dq*\(dq, it is treated  as wildcard
path.  The  wildcard path  behaves differently  from the
normal path.  For normal path,  match is made around the
boundary of path component  separator,\(dq\fI/\fP\(dq.  On the other
hand, the wildcard  path does not take  into account the
path component  separator.  All paths which  include the
wildcard  path  without  last  \(dq*\(dq as  prefix,  and  are
strictly longer than wildcard  path without last \(dq*\(dq are
matched.  \(dq*\(dq  must match  at least one  character.  For
example,  the   pattern  \(dq\fI/foo*\fP\(dq  matches   \(dq\fI/foo/\fP\(dq  and
\(dq\fI/foobar\fP\(dq.  But it does not match \(dq\fI/foo\fP\(dq, or \(dq\fI/fo\fP\(dq.
.sp
If <PATTERN> is omitted or  empty string, \(dq\fI/\fP\(dq is used as
pattern,  which  matches  all request  paths  (catch\-all
pattern).  The catch\-all backend must be given.
.sp
When doing  a match, nghttpx made  some normalization to
pattern, request host and path.  For host part, they are
converted to lower case.  For path part, percent\-encoded
unreserved characters  defined in RFC 3986  are decoded,
and any  dot\-segments (\(dq..\(dq  and \(dq.\(dq)   are resolved and
removed.
.sp
For   example,   \fI\%\-b\fP\(aq127.0.0.1,8080;nghttp2.org/httpbin/\(aq
matches the  request host \(dqnghttp2.org\(dq and  the request
path \(dq\fI/httpbin/get\fP\(dq, but does not match the request host
\(dqnghttp2.org\(dq and the request path \(dq\fI/index.html\fP\(dq.
.sp
The  multiple <PATTERN>s  can  be specified,  delimiting
them            by           \(dq:\(dq.             Specifying
\fI\%\-b\fP\(aq127.0.0.1,8080;nghttp2.org:www.nghttp2.org\(aq  has  the
same  effect  to specify  \fI\%\-b\fP\(aq127.0.0.1,8080;nghttp2.org\(aq
and \fI\%\-b\fP\(aq127.0.0.1,8080;www.nghttp2.org\(aq.
.sp
The backend addresses sharing same <PATTERN> are grouped
together forming  load balancing  group.
.sp
Several parameters <PARAM> are accepted after <PATTERN>.
The  parameters are  delimited  by  \(dq;\(dq.  The  available
parameters       are:      \(dqproto=<PROTO>\(dq,       \(dqtls\(dq,
\(dqsni=<SNI_HOST>\(dq,         \(dqfall=<N>\(dq,        \(dqrise=<N>\(dq,
\(dqaffinity=<METHOD>\(dq,    \(dqdns\(dq,    \(dqredirect\-if\-not\-tls\(dq,
\(dqupgrade\-scheme\(dq,                        \(dqmruby=<PATH>\(dq,
\(dqread\-timeout=<DURATION>\(dq,   \(dqwrite\-timeout=<DURATION>\(dq,
\(dqgroup=<GROUP>\(dq,  \(dqgroup\-weight=<N>\(dq, \(dqweight=<N>\(dq,  and
\(dqdnf\(dq.    The  parameter   consists   of  keyword,   and
optionally followed by \(dq=\(dq  and value.  For example, the
parameter \(dqproto=h2\(dq consists of the keyword \(dqproto\(dq and
value \(dqh2\(dq.  The parameter \(dqtls\(dq consists of the keyword
\(dqtls\(dq  without value.   Each parameter  is described  as
follows.
.sp
The backend application protocol  can be specified using
optional  \(dqproto\(dq   parameter,  and   in  the   form  of
\(dqproto=<PROTO>\(dq.  <PROTO> should be one of the following
list  without  quotes:  \(dqh2\(dq, \(dqhttp/1.1\(dq.   The  default
value of <PROTO> is  \(dqhttp/1.1\(dq.  Note that usually \(dqh2\(dq
refers to HTTP/2  over TLS.  But in this  option, it may
mean HTTP/2  over cleartext TCP unless  \(dqtls\(dq keyword is
used (see below).
.sp
TLS  can   be  enabled  by  specifying   optional  \(dqtls\(dq
parameter.  TLS is not enabled by default.
.sp
With \(dqsni=<SNI_HOST>\(dq parameter, it can override the TLS
SNI  field  value  with  given  <SNI_HOST>.   This  will
default to the backend <HOST> name
.sp
The  feature  to detect  whether  backend  is online  or
offline can be enabled  using optional \(dqfall\(dq and \(dqrise\(dq
parameters.   Using  \(dqfall=<N>\(dq  parameter,  if  nghttpx
cannot connect  to a  this backend <N>  times in  a row,
this  backend  is  assumed  to be  offline,  and  it  is
excluded from load balancing.  If <N> is 0, this backend
never  be excluded  from load  balancing whatever  times
nghttpx cannot connect  to it, and this  is the default.
There is  also \(dqrise=<N>\(dq parameter.  After  backend was
excluded from load balancing group, nghttpx periodically
attempts to make a connection to the failed backend, and
if the  connection is made  successfully <N> times  in a
row, the backend is assumed to  be online, and it is now
eligible  for load  balancing target.   If <N>  is 0,  a
backend  is permanently  offline, once  it goes  in that
state, and this is the default behaviour.
.sp
The     session     affinity    is     enabled     using
\(dqaffinity=<METHOD>\(dq  parameter.   If  \(dqip\(dq is  given  in
<METHOD>, client  IP based session affinity  is enabled.
If \(dqcookie\(dq  is given in <METHOD>,  cookie based session
affinity is  enabled.  If  \(dqnone\(dq is given  in <METHOD>,
session affinity  is disabled, and this  is the default.
The session  affinity is  enabled per <PATTERN>.   If at
least  one backend  has  \(dqaffinity\(dq  parameter, and  its
<METHOD> is not \(dqnone\(dq,  session affinity is enabled for
all backend  servers sharing the same  <PATTERN>.  It is
advised  to  set  \(dqaffinity\(dq parameter  to  all  backend
explicitly if session affinity  is desired.  The session
affinity  may   break  if   one  of  the   backend  gets
unreachable,  or   backend  settings  are   reloaded  or
replaced by API.
.sp
If   \(dqaffinity=cookie\(dq    is   used,    the   additional
configuration                is                required.
\(dqaffinity\-cookie\-name=<NAME>\(dq must be  used to specify a
name     of     cookie      to     use.      Optionally,
\(dqaffinity\-cookie\-path=<PATH>\(dq can  be used to  specify a
path   which   cookie    is   applied.    The   optional
\(dqaffinity\-cookie\-secure=<SECURE>\(dq  controls  the  Secure
attribute of a cookie.  The default value is \(dqauto\(dq, and
the Secure attribute is  determined by a request scheme.
If a request scheme is \(dqhttps\(dq, then Secure attribute is
set.  Otherwise, it  is not set.  If  <SECURE> is \(dqyes\(dq,
the  Secure attribute  is  always set.   If <SECURE>  is
\(dqno\(dq,   the   Secure   attribute  is   always   omitted.
\(dqaffinity\-cookie\-stickiness=<STICKINESS>\(dq       controls
stickiness  of   this  affinity.   If   <STICKINESS>  is
\(dqloose\(dq, removing or adding a backend server might break
the affinity  and the  request might  be forwarded  to a
different backend server.   If <STICKINESS> is \(dqstrict\(dq,
removing the designated  backend server breaks affinity,
but adding  new backend server does  not cause breakage.
If  the designated  backend server  becomes unavailable,
new backend server is chosen  as if the request does not
have  an  affinity  cookie.   <STICKINESS>  defaults  to
\(dqloose\(dq.
.sp
By default, name resolution of backend host name is done
at  start  up,  or reloading  configuration.   If  \(dqdns\(dq
parameter   is  given,   name  resolution   takes  place
dynamically.  This is useful  if backend address changes
frequently.   If  \(dqdns\(dq  is given,  name  resolution  of
backend   host   name   at  start   up,   or   reloading
configuration is skipped.
.sp
If \(dqredirect\-if\-not\-tls\(dq parameter  is used, the matched
backend  requires   that  frontend  connection   is  TLS
encrypted.  If it isn\(aqt, nghttpx responds to the request
with 308  status code, and  https URI the  client should
use instead  is included in Location  header field.  The
port number in  redirect URI is 443 by  default, and can
be  changed using  \fI\%\-\-redirect\-https\-port\fP option.   If at
least one  backend has  \(dqredirect\-if\-not\-tls\(dq parameter,
this feature is enabled  for all backend servers sharing
the   same   <PATTERN>.    It    is   advised   to   set
\(dqredirect\-if\-no\-tls\(dq    parameter   to    all   backends
explicitly if this feature is desired.
.sp
If \(dqupgrade\-scheme\(dq  parameter is used along  with \(dqtls\(dq
parameter, HTTP/2 :scheme pseudo header field is changed
to \(dqhttps\(dq from \(dqhttp\(dq when forwarding a request to this
particular backend.  This is  a workaround for a backend
server  which  requires  \(dqhttps\(dq :scheme  pseudo  header
field on TLS encrypted connection.
.sp
\(dqmruby=<PATH>\(dq  parameter  specifies  a  path  to  mruby
script  file  which  is  invoked when  this  pattern  is
matched.  All backends which share the same pattern must
have the same mruby path.
.sp
\(dqread\-timeout=<DURATION>\(dq and \(dqwrite\-timeout=<DURATION>\(dq
parameters  specify the  read and  write timeout  of the
backend connection  when this  pattern is  matched.  All
backends which share the same pattern must have the same
timeouts.  If these timeouts  are entirely omitted for a
pattern,            \fI\%\-\-backend\-read\-timeout\fP           and
\fI\%\-\-backend\-write\-timeout\fP are used.
.sp
\(dqgroup=<GROUP>\(dq  parameter specifies  the name  of group
this backend address belongs to.  By default, it belongs
to  the unnamed  default group.   The name  of group  is
unique   per   pattern.   \(dqgroup\-weight=<N>\(dq   parameter
specifies the  weight of  the group.  The  higher weight
gets  more frequently  selected  by  the load  balancing
algorithm.  <N> must be  [1, 256] inclusive.  The weight
8 has 4 times more weight  than 2.  <N> must be the same
for  all addresses  which  share the  same <GROUP>.   If
\(dqgroup\-weight\(dq is  omitted in an address,  but the other
address  which  belongs  to  the  same  group  specifies
\(dqgroup\-weight\(dq,   its    weight   is   used.     If   no
\(dqgroup\-weight\(dq  is  specified  for  all  addresses,  the
weight of a group becomes 1.  \(dqgroup\(dq and \(dqgroup\-weight\(dq
are ignored if session affinity is enabled.
.sp
\(dqweight=<N>\(dq  parameter  specifies  the  weight  of  the
backend  address  inside  a  group  which  this  address
belongs  to.  The  higher  weight  gets more  frequently
selected by  the load balancing algorithm.   <N> must be
[1,  256] inclusive.   The  weight 8  has  4 times  more
weight  than weight  2.  If  this parameter  is omitted,
weight  becomes  1.   \(dqweight\(dq  is  ignored  if  session
affinity is enabled.
.sp
If \(dqdnf\(dq parameter is  specified, an incoming request is
not forwarded to a backend  and just consumed along with
the  request body  (actually a  backend server  never be
contacted).  It  is expected  that the HTTP  response is
generated by mruby  script (see \(dqmruby=<PATH>\(dq parameter
above).  \(dqdnf\(dq is an abbreviation of \(dqdo not forward\(dq.
.sp
Since \(dq;\(dq and \(dq:\(dq are  used as delimiter, <PATTERN> must
not contain  these characters.  In order  to include \(dq:\(dq
in  <PATTERN>,  one  has  to  specify  \(dq%3A\(dq  (which  is
percent\-encoded  from of  \(dq:\(dq) instead.   Since \(dq;\(dq  has
special  meaning  in shell,  the  option  value must  be
quoted.
.sp
Default: \fB127.0.0.1,80\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-f, \-\-frontend=(<HOST>,<PORT>|unix:<PATH>)[[;<PARAM>]...]
Set  frontend  host and  port.   If  <HOST> is  \(aq*\(aq,  it
assumes  all addresses  including  both  IPv4 and  IPv6.
UNIX domain  socket can  be specified by  prefixing path
name  with  \(dqunix:\(dq (e.g.,  unix:/var/run/nghttpx.sock).
This  option can  be used  multiple times  to listen  to
multiple addresses.
.sp
This option  can take  0 or  more parameters,  which are
described  below.   Note   that  \(dqapi\(dq  and  \(dqhealthmon\(dq
parameters are mutually exclusive.
.sp
Optionally, TLS  can be disabled by  specifying \(dqno\-tls\(dq
parameter.  TLS is enabled by default.
.sp
If \(dqsni\-fwd\(dq parameter is  used, when performing a match
to select a backend server,  SNI host name received from
the client  is used  instead of  the request  host.  See
\fI\%\-\-backend\fP option about the pattern match.
.sp
To  make this  frontend as  API endpoint,  specify \(dqapi\(dq
parameter.   This   is  disabled  by  default.    It  is
important  to  limit the  access  to  the API  frontend.
Otherwise, someone  may change  the backend  server, and
break your services,  or expose confidential information
to the outside the world.
.sp
To  make  this  frontend  as  health  monitor  endpoint,
specify  \(dqhealthmon\(dq  parameter.   This is  disabled  by
default.  Any  requests which come through  this address
are replied with 200 HTTP status, without no body.
.sp
To accept  PROXY protocol  version 1  and 2  on frontend
connection,  specify  \(dqproxyproto\(dq parameter.   This  is
disabled by default.
.sp
To  receive   HTTP/3  (QUIC)  traffic,   specify  \(dqquic\(dq
parameter.  It  makes nghttpx listen on  UDP port rather
than  TCP   port.   UNIX   domain  socket,   \(dqapi\(dq,  and
\(dqhealthmon\(dq  parameters  cannot   be  used  with  \(dqquic\(dq
parameter.
.sp
Default: \fB*,3000\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backlog=<N>
Set listen backlog size.
.sp
Default: \fB65536\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-address\-family=(auto|IPv4|IPv6)
Specify  address  family  of  backend  connections.   If
\(dqauto\(dq is given, both IPv4  and IPv6 are considered.  If
\(dqIPv4\(dq is  given, only  IPv4 address is  considered.  If
\(dqIPv6\(dq is given, only IPv6 address is considered.
.sp
Default: \fBauto\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-http\-proxy\-uri=<URI>
Specify      proxy       URI      in       the      form
\X'tty: link http:/'\fI\%http:/\fP\X'tty: link'/[<USER>:<PASS>@]<PROXY>:<PORT>.    If   a   proxy
requires  authentication,  specify  <USER>  and  <PASS>.
Note that  they must be properly  percent\-encoded.  This
proxy  is used  when the  backend connection  is HTTP/2.
First,  make  a CONNECT  request  to  the proxy  and  it
connects  to the  backend  on behalf  of nghttpx.   This
forms  tunnel.   After  that, nghttpx  performs  SSL/TLS
handshake with  the downstream through the  tunnel.  The
timeouts when connecting and  making CONNECT request can
be     specified    by     \fI\%\-\-backend\-read\-timeout\fP    and
\fI\%\-\-backend\-write\-timeout\fP options.
.UNINDENT
.SS Performance
.INDENT 0.0
.TP
.B \-n, \-\-workers=<N>
Set the number of worker threads.
.sp
Default: \fB1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-single\-thread
Run everything in one  thread inside the worker process.
This   feature   is   provided  for   better   debugging
experience,  or  for  the platforms  which  lack  thread
support.   If  threading  is disabled,  this  option  is
always enabled.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-read\-rate=<SIZE>
Set maximum  average read  rate on  frontend connection.
Setting 0 to this option means read rate is unlimited.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-read\-burst=<SIZE>
Set  maximum read  burst  size  on frontend  connection.
Setting  0  to this  option  means  read burst  size  is
unlimited.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-write\-rate=<SIZE>
Set maximum  average write rate on  frontend connection.
Setting 0 to this option means write rate is unlimited.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-write\-burst=<SIZE>
Set  maximum write  burst size  on frontend  connection.
Setting  0 to  this  option means  write  burst size  is
unlimited.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-worker\-read\-rate=<SIZE>
Set maximum average read rate on frontend connection per
worker.  Setting  0 to  this option  means read  rate is
unlimited.  Not implemented yet.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-worker\-read\-burst=<SIZE>
Set maximum  read burst size on  frontend connection per
worker.  Setting 0 to this  option means read burst size
is unlimited.  Not implemented yet.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-worker\-write\-rate=<SIZE>
Set maximum  average write  rate on  frontend connection
per worker.  Setting  0 to this option  means write rate
is unlimited.  Not implemented yet.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-worker\-write\-burst=<SIZE>
Set maximum write burst  size on frontend connection per
worker.  Setting 0 to this option means write burst size
is unlimited.  Not implemented yet.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-worker\-frontend\-connections=<N>
Set maximum number  of simultaneous connections frontend
accepts.  Setting 0 means unlimited.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-connections\-per\-host=<N>
Set  maximum number  of  backend concurrent  connections
(and/or  streams in  case  of HTTP/2)  per origin  host.
This option  is meaningful when \fI\%\-\-http2\-proxy\fP  option is
used.   The  origin  host  is  determined  by  authority
portion of  request URI (or :authority  header field for
HTTP/2).   To  limit  the   number  of  connections  per
frontend        for       default        mode,       use
\fI\%\-\-backend\-connections\-per\-frontend\fP\&.
.sp
Default: \fB8\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-connections\-per\-frontend=<N>
Set  maximum number  of  backend concurrent  connections
(and/or streams  in case of HTTP/2)  per frontend.  This
option  is   only  used  for  default   mode.   0  means
unlimited.  To limit the  number of connections per host
with          \fI\%\-\-http2\-proxy\fP         option,          use
\fI\%\-\-backend\-connections\-per\-host\fP\&.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rlimit\-nofile=<N>
Set maximum number of open files (RLIMIT_NOFILE) to <N>.
If 0 is given, nghttpx does not set the limit.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rlimit\-memlock=<N>
Set maximum number of bytes of memory that may be locked
into  RAM.  If  0 is  given,  nghttpx does  not set  the
limit.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-request\-buffer=<SIZE>
Set buffer size used to store backend request.
.sp
Default: \fB16K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-response\-buffer=<SIZE>
Set buffer size used to store backend response.
.sp
Default: \fB128K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-fastopen=<N>
Enables  \(dqTCP Fast  Open\(dq for  the listening  socket and
limits the  maximum length for the  queue of connections
that have not yet completed the three\-way handshake.  If
value is 0 then fast open is disabled.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-kqueue
Don\(aqt use  kqueue.  This  option is only  applicable for
the platforms  which have kqueue.  For  other platforms,
this option will be simply ignored.
.UNINDENT
.SS Timeout
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-idle\-timeout=<DURATION>
Specify idle timeout for HTTP/2 frontend connection.  If
no active streams exist for this duration, connection is
closed.
.sp
Default: \fB3m\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http3\-idle\-timeout=<DURATION>
Specify idle timeout for HTTP/3 frontend connection.  If
no active streams exist for this duration, connection is
closed.
.sp
Default: \fB3m\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-write\-timeout=<DURATION>
Specify write timeout for all frontend connections.
.sp
Default: \fB30s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-keep\-alive\-timeout=<DURATION>
Specify   keep\-alive   timeout   for   frontend   HTTP/1
connection.
.sp
Default: \fB1m\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-header\-timeout=<DURATION>
Specify  duration  that the  server  waits  for an  HTTP
request  header fields  to be  received completely.   On
timeout, HTTP/1 and HTTP/2  connections are closed.  For
HTTP/3,  the  stream  is shutdown,  and  the  connection
itself is left intact.
.sp
Default: \fB1m\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-stream\-read\-timeout=<DURATION>
Specify  read timeout  for HTTP/2  streams.  0  means no
timeout.
.sp
Default: \fB0\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-stream\-write\-timeout=<DURATION>
Specify write  timeout for  HTTP/2 streams.  0  means no
timeout.
.sp
Default: \fB1m\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-read\-timeout=<DURATION>
Specify read timeout for backend connection.
.sp
Default: \fB1m\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-write\-timeout=<DURATION>
Specify write timeout for backend connection.
.sp
Default: \fB30s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-connect\-timeout=<DURATION>
Specify  timeout before  establishing TCP  connection to
backend.
.sp
Default: \fB30s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-keep\-alive\-timeout=<DURATION>
Specify   keep\-alive   timeout    for   backend   HTTP/1
connection.
.sp
Default: \fB2s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-listener\-disable\-timeout=<DURATION>
After accepting  connection failed,  connection listener
is disabled  for a given  amount of time.   Specifying 0
disables this feature.
.sp
Default: \fB30s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-setting\-timeout=<DURATION>
Specify  timeout before  SETTINGS ACK  is received  from
client.
.sp
Default: \fB10s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-http2\-settings\-timeout=<DURATION>
Specify  timeout before  SETTINGS ACK  is received  from
backend server.
.sp
Default: \fB10s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-max\-backoff=<DURATION>
Specify  maximum backoff  interval.  This  is used  when
doing health  check against offline backend  (see \(dqfail\(dq
parameter  in \fI\%\-\-backend\fP  option).   It is  also used  to
limit  the  maximum   interval  to  temporarily  disable
backend  when nghttpx  failed to  connect to  it.  These
intervals are calculated  using exponential backoff, and
consecutive failed attempts increase the interval.  This
option caps its maximum value.
.sp
Default: \fB2m\fP
.UNINDENT
.SS SSL/TLS
.INDENT 0.0
.TP
.B \-\-ciphers=<SUITE>
Set allowed  cipher list  for frontend  connection.  The
format of the string is described in OpenSSL ciphers(1).
This option  sets cipher suites for  TLSv1.2 or earlier.
Use \fI\%\-\-tls13\-ciphers\fP for TLSv1.3.
.sp
Default: \fBECDHE\-ECDSA\-AES128\-GCM\-SHA256:ECDHE\-RSA\-AES128\-GCM\-SHA256:ECDHE\-ECDSA\-AES256\-GCM\-SHA384:ECDHE\-RSA\-AES256\-GCM\-SHA384:ECDHE\-ECDSA\-CHACHA20\-POLY1305:ECDHE\-RSA\-CHACHA20\-POLY1305:DHE\-RSA\-AES128\-GCM\-SHA256:DHE\-RSA\-AES256\-GCM\-SHA384\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls13\-ciphers=<SUITE>
Set allowed  cipher list  for frontend  connection.  The
format of the string is described in OpenSSL ciphers(1).
This  option  sets  cipher   suites  for  TLSv1.3.   Use
\fI\%\-\-ciphers\fP for TLSv1.2 or earlier.
.sp
Default: \fBTLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-client\-ciphers=<SUITE>
Set  allowed cipher  list for  backend connection.   The
format of the string is described in OpenSSL ciphers(1).
This option  sets cipher suites for  TLSv1.2 or earlier.
Use \fI\%\-\-tls13\-client\-ciphers\fP for TLSv1.3.
.sp
Default: \fBECDHE\-ECDSA\-AES128\-GCM\-SHA256:ECDHE\-RSA\-AES128\-GCM\-SHA256:ECDHE\-ECDSA\-AES256\-GCM\-SHA384:ECDHE\-RSA\-AES256\-GCM\-SHA384:ECDHE\-ECDSA\-CHACHA20\-POLY1305:ECDHE\-RSA\-CHACHA20\-POLY1305:DHE\-RSA\-AES128\-GCM\-SHA256:DHE\-RSA\-AES256\-GCM\-SHA384\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls13\-client\-ciphers=<SUITE>
Set  allowed cipher  list for  backend connection.   The
format of the string is described in OpenSSL ciphers(1).
This  option  sets  cipher   suites  for  TLSv1.3.   Use
\fI\%\-\-tls13\-client\-ciphers\fP for TLSv1.2 or earlier.
.sp
Default: \fBTLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ecdh\-curves=<LIST>
Set  supported  curve  list  for  frontend  connections.
<LIST> is a  colon separated list of curve  NID or names
in the preference order.  The supported curves depend on
the  linked  OpenSSL  library.  This  function  requires
OpenSSL >= 1.0.2.
.sp
Default: \fBX25519:P\-256:P\-384:P\-521\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-k, \-\-insecure
Don\(aqt  verify backend  server\(aqs  certificate  if TLS  is
enabled for backend connections.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-cacert=<PATH>
Set path to trusted CA  certificate file.  It is used in
backend  TLS connections  to verify  peer\(aqs certificate.
It is also used to  verify OCSP response from the script
set by \fI\%\-\-fetch\-ocsp\-response\-file\fP\&.  The  file must be in
PEM format.   It can contain multiple  certificates.  If
the  linked OpenSSL  is configured  to load  system wide
certificates, they  are loaded at startup  regardless of
this option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-private\-key\-passwd\-file=<PATH>
Path  to file  that contains  password for  the server\(aqs
private key.   If none is  given and the private  key is
password protected it\(aqll be requested interactively.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-subcert=<KEYPATH>:<CERTPATH>[[;<PARAM>]...]
Specify  additional certificate  and  private key  file.
nghttpx will  choose certificates based on  the hostname
indicated by client using TLS SNI extension.  If nghttpx
is  built with  OpenSSL  >= 1.0.2,  the shared  elliptic
curves (e.g., P\-256) between  client and server are also
taken into  consideration.  This allows nghttpx  to send
ECDSA certificate  to modern clients, while  sending RSA
based certificate to older  clients.  This option can be
used  multiple  times.   To  make  OCSP  stapling  work,
<CERTPATH> must be absolute path.
.sp
Additional parameter  can be specified in  <PARAM>.  The
available <PARAM> is \(dqsct\-dir=<DIR>\(dq.
.sp
\(dqsct\-dir=<DIR>\(dq  specifies the  path to  directory which
contains        *.sct        files        for        TLS
signed_certificate_timestamp extension (RFC 6962).  This
feature   requires   OpenSSL   >=   1.0.2.    See   also
\fI\%\-\-tls\-sct\-dir\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dh\-param\-file=<PATH>
Path to file that contains  DH parameters in PEM format.
Without  this   option,  DHE   cipher  suites   are  not
available.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-alpn\-list=<LIST>
Comma delimited list of  ALPN protocol identifier sorted
in the  order of preference.  That  means most desirable
protocol comes  first.  The parameter must  be delimited
by a single comma only  and any white spaces are treated
as a part of protocol string.
.sp
Default: \fBh2,h2\-16,h2\-14,http/1.1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verify\-client
Require and verify client certificate.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verify\-client\-cacert=<PATH>
Path  to file  that contains  CA certificates  to verify
client certificate.  The file must be in PEM format.  It
can contain multiple certificates.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-verify\-client\-tolerate\-expired
Accept  expired  client  certificate.   Operator  should
handle  the expired  client  certificate  by some  means
(e.g.,  mruby  script).   Otherwise, this  option  might
cause a security risk.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-client\-private\-key\-file=<PATH>
Path to  file that contains  client private key  used in
backend client authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-client\-cert\-file=<PATH>
Path to  file that  contains client certificate  used in
backend client authentication.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-min\-proto\-version=<VER>
Specify minimum SSL/TLS protocol.   The name matching is
done in  case\-insensitive manner.  The  versions between
\fI\%\-\-tls\-min\-proto\-version\fP and  \fI\%\-\-tls\-max\-proto\-version\fP are
enabled.  If the protocol list advertised by client does
not  overlap  this range,  you  will  receive the  error
message \(dqunknown protocol\(dq.  If a protocol version lower
than TLSv1.2 is specified, make sure that the compatible
ciphers are  included in \fI\%\-\-ciphers\fP option.   The default
cipher  list  only   includes  ciphers  compatible  with
TLSv1.2 or above.  The available versions are:
TLSv1.3, TLSv1.2, TLSv1.1, and TLSv1.0
.sp
Default: \fBTLSv1.2\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-max\-proto\-version=<VER>
Specify maximum SSL/TLS protocol.   The name matching is
done in  case\-insensitive manner.  The  versions between
\fI\%\-\-tls\-min\-proto\-version\fP and  \fI\%\-\-tls\-max\-proto\-version\fP are
enabled.  If the protocol list advertised by client does
not  overlap  this range,  you  will  receive the  error
message \(dqunknown protocol\(dq.  The available versions are:
TLSv1.3, TLSv1.2, TLSv1.1, and TLSv1.0
.sp
Default: \fBTLSv1.3\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-file=<PATH>
Path to file that contains  random data to construct TLS
session ticket  parameters.  If aes\-128\-cbc is  given in
\fI\%\-\-tls\-ticket\-key\-cipher\fP, the  file must  contain exactly
48    bytes.     If     aes\-256\-cbc    is    given    in
\fI\%\-\-tls\-ticket\-key\-cipher\fP, the  file must  contain exactly
80  bytes.   This  options  can be  used  repeatedly  to
specify  multiple ticket  parameters.  If  several files
are given,  only the  first key is  used to  encrypt TLS
session  tickets.  Other  keys are  accepted but  server
will  issue new  session  ticket with  first key.   This
allows  session  key  rotation.  Please  note  that  key
rotation  does  not  occur automatically.   User  should
rearrange  files or  change options  values and  restart
nghttpx gracefully.   If opening  or reading  given file
fails, all loaded  keys are discarded and  it is treated
as if none  of this option is given.  If  this option is
not given or an error  occurred while opening or reading
a file,  key is  generated every  1 hour  internally and
they are  valid for  12 hours.   This is  recommended if
ticket  key sharing  between  nghttpx  instances is  not
required.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-memcached=<HOST>,<PORT>[;tls]
Specify address  of memcached  server to get  TLS ticket
keys for  session resumption.   This enables  shared TLS
ticket key between  multiple nghttpx instances.  nghttpx
does not set TLS ticket  key to memcached.  The external
ticket key generator is required.  nghttpx just gets TLS
ticket  keys  from  memcached, and  use  them,  possibly
replacing current set  of keys.  It is up  to extern TLS
ticket  key generator  to rotate  keys frequently.   See
\(dqTLS SESSION  TICKET RESUMPTION\(dq section in  manual page
to know the data format in memcached entry.  Optionally,
memcached  connection  can  be  encrypted  with  TLS  by
specifying \(dqtls\(dq parameter.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-memcached\-address\-family=(auto|IPv4|IPv6)
Specify address  family of memcached connections  to get
TLS ticket keys.  If \(dqauto\(dq is given, both IPv4 and IPv6
are considered.   If \(dqIPv4\(dq is given,  only IPv4 address
is considered.  If \(dqIPv6\(dq is given, only IPv6 address is
considered.
.sp
Default: \fBauto\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-memcached\-interval=<DURATION>
Set interval to get TLS ticket keys from memcached.
.sp
Default: \fB10m\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-memcached\-max\-retry=<N>
Set  maximum   number  of  consecutive   retries  before
abandoning TLS ticket key  retrieval.  If this number is
reached,  the  attempt  is considered  as  failure,  and
\(dqfailure\(dq count  is incremented by 1,  which contributed
to            the            value            controlled
\fI\%\-\-tls\-ticket\-key\-memcached\-max\-fail\fP option.
.sp
Default: \fB3\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-memcached\-max\-fail=<N>
Set  maximum   number  of  consecutive   failure  before
disabling TLS ticket until next scheduled key retrieval.
.sp
Default: \fB2\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-cipher=<CIPHER>
Specify cipher  to encrypt TLS session  ticket.  Specify
either   aes\-128\-cbc   or  aes\-256\-cbc.    By   default,
aes\-128\-cbc is used.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-memcached\-cert\-file=<PATH>
Path to client certificate  for memcached connections to
get TLS ticket keys.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ticket\-key\-memcached\-private\-key\-file=<PATH>
Path to client private  key for memcached connections to
get TLS ticket keys.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-fetch\-ocsp\-response\-file=<PATH>
Path to  fetch\-ocsp\-response script file.  It  should be
absolute path.
.sp
Default: \fB/usr/local/share/nghttp2/fetch\-ocsp\-response\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ocsp\-update\-interval=<DURATION>
Set interval to update OCSP response cache.
.sp
Default: \fB4h\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ocsp\-startup
Start  accepting connections  after initial  attempts to
get OCSP responses  finish.  It does not  matter some of
the  attempts  fail.  This  feature  is  useful if  OCSP
responses   must    be   available    before   accepting
connections.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-verify\-ocsp
nghttpx does not verify OCSP response.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-ocsp
Disable OCSP stapling.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-session\-cache\-memcached=<HOST>,<PORT>[;tls]
Specify  address of  memcached server  to store  session
cache.   This  enables   shared  session  cache  between
multiple   nghttpx  instances.    Optionally,  memcached
connection can be encrypted with TLS by specifying \(dqtls\(dq
parameter.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-session\-cache\-memcached\-address\-family=(auto|IPv4|IPv6)
Specify address family of memcached connections to store
session cache.  If  \(dqauto\(dq is given, both  IPv4 and IPv6
are considered.   If \(dqIPv4\(dq is given,  only IPv4 address
is considered.  If \(dqIPv6\(dq is given, only IPv6 address is
considered.
.sp
Default: \fBauto\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-session\-cache\-memcached\-cert\-file=<PATH>
Path to client certificate  for memcached connections to
store session cache.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-session\-cache\-memcached\-private\-key\-file=<PATH>
Path to client private  key for memcached connections to
store session cache.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-dyn\-rec\-warmup\-threshold=<SIZE>
Specify the  threshold size for TLS  dynamic record size
behaviour.  During  a TLS  session, after  the threshold
number of bytes  have been written, the  TLS record size
will be increased to the maximum allowed (16K).  The max
record size will  continue to be used on  the active TLS
session.  After  \fI\%\-\-tls\-dyn\-rec\-idle\-timeout\fP has elapsed,
the record size is reduced  to 1300 bytes.  Specify 0 to
always use  the maximum record size,  regardless of idle
period.   This  behaviour  applies   to  all  TLS  based
frontends, and TLS HTTP/2 backends.
.sp
Default: \fB1M\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-dyn\-rec\-idle\-timeout=<DURATION>
Specify TLS dynamic record  size behaviour timeout.  See
\fI\%\-\-tls\-dyn\-rec\-warmup\-threshold\fP  for   more  information.
This behaviour  applies to all TLS  based frontends, and
TLS HTTP/2 backends.
.sp
Default: \fB1s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-http2\-cipher\-block\-list
Allow  block  listed  cipher suite  on  frontend  HTTP/2
connection.                                          See
\X'tty: link https://tools.ietf.org/html/rfc7540#appendix-A'\fI\%https://tools.ietf.org/html/rfc7540#appendix\-A\fP\X'tty: link'  for  the
complete HTTP/2 cipher suites block list.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-client\-no\-http2\-cipher\-block\-list
Allow  block  listed  cipher  suite  on  backend  HTTP/2
connection.                                          See
\X'tty: link https://tools.ietf.org/html/rfc7540#appendix-A'\fI\%https://tools.ietf.org/html/rfc7540#appendix\-A\fP\X'tty: link'  for  the
complete HTTP/2 cipher suites block list.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-sct\-dir=<DIR>
Specifies the  directory where  *.sct files  exist.  All
*.sct   files   in  <DIR>   are   read,   and  sent   as
extension_data of  TLS signed_certificate_timestamp (RFC
6962)  to  client.   These   *.sct  files  are  for  the
certificate   specified   in   positional   command\-line
argument <CERT>, or  certificate option in configuration
file.   For   additional  certificates,   use  \fI\%\-\-subcert\fP
option.  This option requires OpenSSL >= 1.0.2.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-psk\-secrets=<PATH>
Read list of PSK identity and secrets from <PATH>.  This
is used for frontend connection.  The each line of input
file  is  formatted  as  <identity>:<hex\-secret>,  where
<identity> is  PSK identity, and <hex\-secret>  is secret
in hex.  An  empty line, and line which  starts with \(aq#\(aq
are skipped.  The default  enabled cipher list might not
contain any PSK cipher suite.  In that case, desired PSK
cipher suites  must be  enabled using  \fI\%\-\-ciphers\fP option.
The  desired PSK  cipher suite  may be  block listed  by
HTTP/2.   To  use  those   cipher  suites  with  HTTP/2,
consider  to  use  \fI\%\-\-no\-http2\-cipher\-block\-list\fP  option.
But be aware its implications.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-client\-psk\-secrets=<PATH>
Read PSK identity and secrets from <PATH>.  This is used
for backend connection.  The each  line of input file is
formatted  as <identity>:<hex\-secret>,  where <identity>
is PSK identity, and <hex\-secret>  is secret in hex.  An
empty line, and line which  starts with \(aq#\(aq are skipped.
The first identity and  secret pair encountered is used.
The default  enabled cipher  list might not  contain any
PSK  cipher suite.   In  that case,  desired PSK  cipher
suites  must be  enabled using  \fI\%\-\-client\-ciphers\fP option.
The  desired PSK  cipher suite  may be  block listed  by
HTTP/2.   To  use  those   cipher  suites  with  HTTP/2,
consider   to  use   \fI\%\-\-client\-no\-http2\-cipher\-block\-list\fP
option.  But be aware its implications.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-no\-postpone\-early\-data
By  default,   except  for  QUIC   connections,  nghttpx
postpones forwarding  HTTP requests sent in  early data,
including  those  sent in  partially  in  it, until  TLS
handshake  finishes.  If  all backend  server recognizes
\(dqEarly\-Data\(dq  header  field,  using  this  option  makes
nghttpx  not postpone  forwarding request  and get  full
potential of 0\-RTT data.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-max\-early\-data=<SIZE>
Sets  the  maximum  amount  of 0\-RTT  data  that  server
accepts.
.sp
Default: \fB16K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls\-ktls
Enable   ktls.    For   server,  ktls   is   enable   if
\fI\%\-\-tls\-session\-cache\-memcached\fP is not configured.
.UNINDENT
.SS HTTP/2
.INDENT 0.0
.TP
.B \-c, \-\-frontend\-http2\-max\-concurrent\-streams=<N>
Set the maximum number of  the concurrent streams in one
frontend HTTP/2 session.
.sp
Default: \fB100\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-http2\-max\-concurrent\-streams=<N>
Set the maximum number of  the concurrent streams in one
backend  HTTP/2 session.   This sets  maximum number  of
concurrent opened pushed streams.  The maximum number of
concurrent requests are set by a remote server.
.sp
Default: \fB100\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-window\-size=<SIZE>
Sets  the  per\-stream  initial  window  size  of  HTTP/2
frontend connection.
.sp
Default: \fB65535\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-connection\-window\-size=<SIZE>
Sets the  per\-connection window size of  HTTP/2 frontend
connection.
.sp
Default: \fB65535\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-http2\-window\-size=<SIZE>
Sets  the   initial  window   size  of   HTTP/2  backend
connection.
.sp
Default: \fB65535\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-http2\-connection\-window\-size=<SIZE>
Sets the  per\-connection window  size of  HTTP/2 backend
connection.
.sp
Default: \fB2147483647\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-http2\-no\-cookie\-crumbling
Don\(aqt crumble cookie header field.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-padding=<N>
Add  at most  <N> bytes  to  a HTTP/2  frame payload  as
padding.  Specify 0 to  disable padding.  This option is
meant for debugging purpose  and not intended to enhance
protocol security.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-server\-push
Disable HTTP/2 server push.  Server push is supported by
default mode and HTTP/2  frontend via Link header field.
It is  also supported if  both frontend and  backend are
HTTP/2 in default mode.  In  this case, server push from
backend session is relayed  to frontend, and server push
via Link header field is also supported.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-optimize\-write\-buffer\-size
(Experimental) Enable write  buffer size optimization in
frontend HTTP/2 TLS  connection.  This optimization aims
to reduce  write buffer  size so  that it  only contains
bytes  which can  send immediately.   This makes  server
more responsive to prioritized HTTP/2 stream because the
buffering  of lower  priority stream  is reduced.   This
option is only effective on recent Linux platform.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-optimize\-window\-size
(Experimental)   Automatically  tune   connection  level
window size of frontend  HTTP/2 TLS connection.  If this
feature is  enabled, connection window size  starts with
the   default  window   size,   65535  bytes.    nghttpx
automatically  adjusts connection  window size  based on
TCP receiving  window size.  The maximum  window size is
capped      by      the     value      specified      by
\fI\%\-\-frontend\-http2\-connection\-window\-size\fP\&.     Since   the
stream is subject to stream level window size, it should
be adjusted using \fI\%\-\-frontend\-http2\-window\-size\fP option as
well.   This option  is only  effective on  recent Linux
platform.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-encoder\-dynamic\-table\-size=<SIZE>
Specify the maximum dynamic  table size of HPACK encoder
in the frontend HTTP/2 connection.  The decoder (client)
specifies  the maximum  dynamic table  size it  accepts.
Then the negotiated dynamic table size is the minimum of
this option value and the value which client specified.
.sp
Default: \fB4K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-decoder\-dynamic\-table\-size=<SIZE>
Specify the maximum dynamic  table size of HPACK decoder
in the frontend HTTP/2 connection.
.sp
Default: \fB4K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-http2\-encoder\-dynamic\-table\-size=<SIZE>
Specify the maximum dynamic  table size of HPACK encoder
in the backend HTTP/2 connection.  The decoder (backend)
specifies  the maximum  dynamic table  size it  accepts.
Then the negotiated dynamic table size is the minimum of
this option value and the value which backend specified.
.sp
Default: \fB4K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-backend\-http2\-decoder\-dynamic\-table\-size=<SIZE>
Specify the maximum dynamic  table size of HPACK decoder
in the backend HTTP/2 connection.
.sp
Default: \fB4K\fP
.UNINDENT
.SS Mode
.INDENT 0.0
.TP
.B (default mode)
Accept  HTTP/2,  and  HTTP/1.1 over  SSL/TLS.   \(dqno\-tls\(dq
parameter is  used in  \fI\%\-\-frontend\fP option,  accept HTTP/2
and HTTP/1.1 over cleartext  TCP.  The incoming HTTP/1.1
connection  can  be  upgraded  to  HTTP/2  through  HTTP
Upgrade.
.UNINDENT
.INDENT 0.0
.TP
.B \-s, \-\-http2\-proxy
Like default mode, but enable forward proxy.  This is so
called HTTP/2 proxy mode.
.UNINDENT
.SS Logging
.INDENT 0.0
.TP
.B \-L, \-\-log\-level=<LEVEL>
Set the severity  level of log output.   <LEVEL> must be
one of INFO, NOTICE, WARN, ERROR and FATAL.
.sp
Default: \fBNOTICE\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-accesslog\-file=<PATH>
Set path to write access log.  To reopen file, send USR1
signal to nghttpx.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-accesslog\-syslog
Send  access log  to syslog.   If this  option is  used,
\fI\%\-\-accesslog\-file\fP option is ignored.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-accesslog\-format=<FORMAT>
Specify  format  string  for access  log.   The  default
format is combined format.   The following variables are
available:
.INDENT 7.0
.IP \(bu 2
$remote_addr: client IP address.
.IP \(bu 2
$time_local: local time in Common Log format.
.IP \(bu 2
$time_iso8601: local time in ISO 8601 format.
.IP \(bu 2
$request: HTTP request line.
.IP \(bu 2
$status: HTTP response status code.
.IP \(bu 2
$body_bytes_sent: the  number of bytes sent  to client
as response body.
.IP \(bu 2
$http_<VAR>: value of HTTP  request header <VAR> where
\(aq_\(aq in <VAR> is replaced with \(aq\-\(aq.
.IP \(bu 2
$remote_port: client  port.
.IP \(bu 2
$server_port: server port.
.IP \(bu 2
$request_time: request processing time in seconds with
milliseconds resolution.
.IP \(bu 2
$pid: PID of the running process.
.IP \(bu 2
$alpn: ALPN identifier of the protocol which generates
the response.   For HTTP/1,  ALPN is  always http/1.1,
regardless of minor version.
.IP \(bu 2
$tls_cipher: cipher used for SSL/TLS connection.
.IP \(bu 2
$tls_client_fingerprint_sha256: SHA\-256 fingerprint of
client certificate.
.IP \(bu 2
$tls_client_fingerprint_sha1:  SHA\-1   fingerprint  of
client certificate.
.IP \(bu 2
$tls_client_subject_name:   subject  name   in  client
certificate.
.IP \(bu 2
$tls_client_issuer_name:   issuer   name   in   client
certificate.
.IP \(bu 2
$tls_client_serial:    serial    number   in    client
certificate.
.IP \(bu 2
$tls_protocol: protocol for SSL/TLS connection.
.IP \(bu 2
$tls_session_id: session ID for SSL/TLS connection.
.IP \(bu 2
$tls_session_reused:  \(dqr\(dq   if  SSL/TLS   session  was
reused.  Otherwise, \(dq.\(dq
.IP \(bu 2
$tls_sni: SNI server name for SSL/TLS connection.
.IP \(bu 2
$backend_host:  backend  host   used  to  fulfill  the
request.  \(dq\-\(dq if backend host is not available.
.IP \(bu 2
$backend_port:  backend  port   used  to  fulfill  the
request.  \(dq\-\(dq if backend host is not available.
.IP \(bu 2
$method: HTTP method
.IP \(bu 2
$path:  Request  path  including query.   For  CONNECT
request, authority is recorded.
.IP \(bu 2
$path_without_query:  $path   up  to  the   first  \(aq?\(aq
character.    For   CONNECT  request,   authority   is
recorded.
.IP \(bu 2
$protocol_version:   HTTP  version   (e.g.,  HTTP/1.1,
HTTP/2)
.UNINDENT
.sp
The  variable  can  be  enclosed  by  \(dq{\(dq  and  \(dq}\(dq  for
disambiguation (e.g., ${remote_addr}).
.sp
Default: \fB$remote_addr \- \- [$time_local] \(dq$request\(dq $status $body_bytes_sent \(dq$http_referer\(dq \(dq$http_user_agent\(dq\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-accesslog\-write\-early
Write  access  log  when   response  header  fields  are
received   from  backend   rather   than  when   request
transaction finishes.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-errorlog\-file=<PATH>
Set path to write error  log.  To reopen file, send USR1
signal  to nghttpx.   stderr will  be redirected  to the
error log file unless \fI\%\-\-errorlog\-syslog\fP is used.
.sp
Default: \fB/dev/stderr\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-errorlog\-syslog
Send  error log  to  syslog.  If  this  option is  used,
\fI\%\-\-errorlog\-file\fP option is ignored.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-syslog\-facility=<FACILITY>
Set syslog facility to <FACILITY>.
.sp
Default: \fBdaemon\fP
.UNINDENT
.SS HTTP
.INDENT 0.0
.TP
.B \-\-add\-x\-forwarded\-for
Append  X\-Forwarded\-For header  field to  the downstream
request.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-incoming\-x\-forwarded\-for
Strip X\-Forwarded\-For  header field from  inbound client
requests.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-add\-x\-forwarded\-proto
Don\(aqt append  additional X\-Forwarded\-Proto  header field
to  the   backend  request.   If  inbound   client  sets
X\-Forwarded\-Proto,                                   and
\fI\%\-\-no\-strip\-incoming\-x\-forwarded\-proto\fP  option  is  used,
they are passed to the backend.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-strip\-incoming\-x\-forwarded\-proto
Don\(aqt strip X\-Forwarded\-Proto  header field from inbound
client requests.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-add\-forwarded=<LIST>
Append RFC  7239 Forwarded header field  with parameters
specified in comma delimited list <LIST>.  The supported
parameters  are \(dqby\(dq,  \(dqfor\(dq, \(dqhost\(dq,  and \(dqproto\(dq.   By
default,  the value  of  \(dqby\(dq and  \(dqfor\(dq parameters  are
obfuscated     string.     See     \fI\%\-\-forwarded\-by\fP    and
\fI\%\-\-forwarded\-for\fP options respectively.  Note that nghttpx
does  not  translate non\-standard  X\-Forwarded\-*  header
fields into Forwarded header field, and vice versa.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-incoming\-forwarded
Strip  Forwarded   header  field  from   inbound  client
requests.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-forwarded\-by=(obfuscated|ip|<VALUE>)
Specify the parameter value sent out with \(dqby\(dq parameter
of Forwarded  header field.   If \(dqobfuscated\(dq  is given,
the string is randomly generated at startup.  If \(dqip\(dq is
given,   the  interface   address  of   the  connection,
including port number, is  sent with \(dqby\(dq parameter.  In
case of UNIX domain  socket, \(dqlocalhost\(dq is used instead
of address and  port.  User can also  specify the static
obfuscated string.  The limitation is that it must start
with   \(dq_\(dq,  and   only   consists   of  character   set
[A\-Za\-z0\-9._\-], as described in RFC 7239.
.sp
Default: \fBobfuscated\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-forwarded\-for=(obfuscated|ip)
Specify  the   parameter  value  sent  out   with  \(dqfor\(dq
parameter of Forwarded header field.  If \(dqobfuscated\(dq is
given, the string is  randomly generated for each client
connection.  If \(dqip\(dq is given, the remote client address
of  the connection,  without port  number, is  sent with
\(dqfor\(dq  parameter.   In  case   of  UNIX  domain  socket,
\(dqlocalhost\(dq is used instead of address.
.sp
Default: \fBobfuscated\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-via
Don\(aqt append to  Via header field.  If  Via header field
is received, it is left unaltered.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-strip\-incoming\-early\-data
Don\(aqt strip Early\-Data header  field from inbound client
requests.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-location\-rewrite
Don\(aqt  rewrite location  header field  in default  mode.
When \fI\%\-\-http2\-proxy\fP  is used, location header  field will
not be altered regardless of this option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-host\-rewrite
Rewrite  host and  :authority header  fields in  default
mode.  When  \fI\%\-\-http2\-proxy\fP is  used, these  headers will
not be altered regardless of this option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-altsvc=<PROTOID,PORT[,HOST,[ORIGIN[,PARAMS]]]>
Specify   protocol  ID,   port,  host   and  origin   of
alternative service.  <HOST>,  <ORIGIN> and <PARAMS> are
optional.   Empty <HOST>  and <ORIGIN>  are allowed  and
they  are treated  as  nothing is  specified.  They  are
advertised  in alt\-svc  header  field  only in  HTTP/1.1
frontend.   This option  can be  used multiple  times to
specify multiple alternative services.
Example: \fI\%\-\-altsvc\fP=\(dqh2,443,,,ma=3600; persist=1\(dq
.UNINDENT
.INDENT 0.0
.TP
.B \-\-http2\-altsvc=<PROTOID,PORT[,HOST,[ORIGIN[,PARAMS]]]>
Just like \fI\%\-\-altsvc\fP option, but  this altsvc is only sent
in HTTP/2 frontend.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-add\-request\-header=<HEADER>
Specify additional header field to add to request header
set.   The field  name must  be lowercase.   This option
just  appends header  field and  won\(aqt replace  anything
already set.  This  option can be used  several times to
specify multiple header fields.
Example: \fI\%\-\-add\-request\-header\fP=\(dqfoo: bar\(dq
.UNINDENT
.INDENT 0.0
.TP
.B \-\-add\-response\-header=<HEADER>
Specify  additional  header  field to  add  to  response
header  set.  The  field name  must be  lowercase.  This
option  just  appends  header field  and  won\(aqt  replace
anything already  set.  This option can  be used several
times to specify multiple header fields.
Example: \fI\%\-\-add\-response\-header\fP=\(dqfoo: bar\(dq
.UNINDENT
.INDENT 0.0
.TP
.B \-\-request\-header\-field\-buffer=<SIZE>
Set maximum buffer size for incoming HTTP request header
field list.  This is the sum of header name and value in
bytes.   If  trailer  fields  exist,  they  are  counted
towards this number.
.sp
Default: \fB64K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-max\-request\-header\-fields=<N>
Set  maximum  number  of incoming  HTTP  request  header
fields.   If  trailer  fields exist,  they  are  counted
towards this number.
.sp
Default: \fB100\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-response\-header\-field\-buffer=<SIZE>
Set  maximum  buffer  size for  incoming  HTTP  response
header field list.   This is the sum of  header name and
value  in  bytes.  If  trailer  fields  exist, they  are
counted towards this number.
.sp
Default: \fB64K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-max\-response\-header\-fields=<N>
Set  maximum number  of  incoming  HTTP response  header
fields.   If  trailer  fields exist,  they  are  counted
towards this number.
.sp
Default: \fB500\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-error\-page=(<CODE>|*)=<PATH>
Set file path  to custom error page  served when nghttpx
originally  generates  HTTP  error status  code  <CODE>.
<CODE> must be greater than or equal to 400, and at most
599.  If \(dq*\(dq  is used instead of <CODE>,  it matches all
HTTP  status  code.  If  error  status  code comes  from
backend server, the custom error pages are not used.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-server\-name=<NAME>
Change server response header field value to <NAME>.
.sp
Default: \fBnghttpx\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-server\-rewrite
Don\(aqt rewrite server header field in default mode.  When
\fI\%\-\-http2\-proxy\fP is used, these headers will not be altered
regardless of this option.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-redirect\-https\-port=<PORT>
Specify the port number which appears in Location header
field  when  redirect  to  HTTPS  URI  is  made  due  to
\(dqredirect\-if\-not\-tls\(dq parameter in \fI\%\-\-backend\fP option.
.sp
Default: \fB443\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-require\-http\-scheme
Always require http or https scheme in HTTP request.  It
also  requires that  https scheme  must be  used for  an
encrypted  connection.  Otherwise,  http scheme  must be
used.   This   option  is   recommended  for   a  server
deployment which directly faces clients and the services
it provides only require http or https scheme.
.UNINDENT
.SS API
.INDENT 0.0
.TP
.B \-\-api\-max\-request\-body=<SIZE>
Set the maximum size of request body for API request.
.sp
Default: \fB32M\fP
.UNINDENT
.SS DNS
.INDENT 0.0
.TP
.B \-\-dns\-cache\-timeout=<DURATION>
Set duration that cached DNS results remain valid.  Note
that nghttpx caches the unsuccessful results as well.
.sp
Default: \fB10s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dns\-lookup\-timeout=<DURATION>
Set timeout that  DNS server is given to  respond to the
initial  DNS  query.  For  the  2nd  and later  queries,
server is  given time based  on this timeout, and  it is
scaled linearly.
.sp
Default: \fB5s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dns\-max\-try=<N>
Set the number of DNS query before nghttpx gives up name
lookup.
.sp
Default: \fB2\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-max\-requests=<N>
The number  of requests that single  frontend connection
can process.  For HTTP/2, this  is the number of streams
in  one  HTTP/2 connection.   For  HTTP/1,  this is  the
number of keep alive requests.  This is hint to nghttpx,
and it  may allow additional few  requests.  The default
value is unlimited.
.UNINDENT
.SS Debug
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-dump\-request\-header=<PATH>
Dumps request headers received by HTTP/2 frontend to the
file denoted  in <PATH>.  The  output is done  in HTTP/1
header field format and each header block is followed by
an empty line.  This option  is not thread safe and MUST
NOT be used with option \fI\%\-n\fP<N>, where <N> >= 2.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http2\-dump\-response\-header=<PATH>
Dumps response headers sent  from HTTP/2 frontend to the
file denoted  in <PATH>.  The  output is done  in HTTP/1
header field format and each header block is followed by
an empty line.  This option  is not thread safe and MUST
NOT be used with option \fI\%\-n\fP<N>, where <N> >= 2.
.UNINDENT
.INDENT 0.0
.TP
.B \-o, \-\-frontend\-frame\-debug
Print HTTP/2 frames in  frontend to stderr.  This option
is  not thread  safe and  MUST NOT  be used  with option
\fI\%\-n\fP=N, where N >= 2.
.UNINDENT
.SS Process
.INDENT 0.0
.TP
.B \-D, \-\-daemon
Run in a background.  If \fI\%\-D\fP is used, the current working
directory is changed to \(aq\fI/\fP\(aq.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-pid\-file=<PATH>
Set path to save PID of this program.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-user=<USER>
Run this program as <USER>.   This option is intended to
be used to drop root privileges.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-single\-process
Run this program in a  single process mode for debugging
purpose.  Without this option,  nghttpx creates at least
2 processes: main and  worker processes.  If this option
is  used, main  and  worker are  unified  into a  single
process.   nghttpx still  spawns  additional process  if
neverbleed  is used.   In the  single process  mode, the
signal handling feature is disabled.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-max\-worker\-processes=<N>
The maximum number of  worker processes.  nghttpx spawns
new worker  process when  it reloads  its configuration.
The previous worker  process enters graceful termination
period and will terminate  when it finishes handling the
existing    connections.     However,    if    reloading
configurations  happen   very  frequently,   the  worker
processes might be piled up if they take a bit long time
to finish  the existing connections.  With  this option,
if  the number  of  worker processes  exceeds the  given
value,   the  oldest   worker   process  is   terminated
immediately.  Specifying 0 means no  limit and it is the
default behaviour.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-worker\-process\-grace\-shutdown\-period=<DURATION>
Maximum  period  for  a   worker  process  to  terminate
gracefully.  When  a worker  process enters  in graceful
shutdown   period  (e.g.,   when  nghttpx   reloads  its
configuration)  and  it  does not  finish  handling  the
existing connections in the given  period of time, it is
immediately terminated.  Specifying 0 means no limit and
it is the default behaviour.
.UNINDENT
.SS Scripting
.INDENT 0.0
.TP
.B \-\-mruby\-file=<PATH>
Set mruby script file
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ignore\-per\-pattern\-mruby\-error
Ignore mruby compile error  for per\-pattern mruby script
file.  If error  occurred, it is treated as  if no mruby
file were specified for the pattern.
.UNINDENT
.SS HTTP/3 and QUIC
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-idle\-timeout=<DURATION>
Specify an idle timeout for QUIC connection.
.sp
Default: \fB30s\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-debug\-log
Output QUIC debug log to \fI/dev/stderr.\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quic\-bpf\-program\-file=<PATH>
Specify a path to  eBPF program file reuseport_kern.o to
direct  an  incoming  QUIC  UDP datagram  to  a  correct
socket.
.sp
Default: \fB/usr/local/lib/nghttp2/reuseport_kern.o\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-early\-data
Enable early data on frontend QUIC connections.  nghttpx
sends \(dqEarly\-Data\(dq header field to a backend server if a
request is received in early  data and handshake has not
finished.  All backend servers should deal with possibly
replayed requests.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-qlog\-dir=<DIR>
Specify a  directory where  a qlog  file is  written for
frontend QUIC  connections.  A qlog file  is created per
each QUIC  connection.  The  file name is  ISO8601 basic
format, followed by \(dq\-\(dq, server Source Connection ID and
\(dq.sqlog\(dq.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-require\-token
Require an address validation  token for a frontend QUIC
connection.   Server sends  a token  in Retry  packet or
NEW_TOKEN frame in the previous connection.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-congestion\-controller=<CC>
Specify a congestion controller algorithm for a frontend
QUIC  connection.   <CC>  should be  either  \(dqcubic\(dq  or
\(dqbbr\(dq.
.sp
Default: \fBcubic\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-secret\-file=<PATH>
Path to file that contains secure random data to be used
as QUIC keying materials.  It is used to derive keys for
encrypting tokens and Connection IDs.  It is not used to
encrypt  QUIC  packets.  Each  line  of  this file  must
contain  exactly  136  bytes  hex\-encoded  string  (when
decoded the byte string is  68 bytes long).  The first 3
bits of  decoded byte  string are  used to  identify the
keying material.  An  empty line or a  line which starts
\(aq#\(aq  is ignored.   The file  can contain  more than  one
keying materials.  Because the  identifier is 3 bits, at
most 8 keying materials are  read and the remaining data
is discarded.  The first keying  material in the file is
primarily  used for  encryption and  decryption for  new
connection.  The other ones are used to decrypt data for
the  existing connections.   Specifying multiple  keying
materials enables  key rotation.   Please note  that key
rotation  does  not  occur automatically.   User  should
update  files  or  change  options  values  and  restart
nghttpx gracefully.   If opening  or reading  given file
fails, all loaded keying  materials are discarded and it
is treated as if none of  this option is given.  If this
option is not  given or an error  occurred while opening
or  reading  a  file,  a keying  material  is  generated
internally on startup and reload.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-quic\-server\-id=<HEXSTRING>
Specify server  ID encoded in Connection  ID to identify
this  particular  server  instance.   Connection  ID  is
encrypted and  this part is  not visible in  public.  It
must be 4  bytes long and must be encoded  in hex string
(which is 8  bytes long).  If this option  is omitted, a
random   server  ID   is   generated   on  startup   and
configuration reload.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-quic\-initial\-rtt=<DURATION>
Specify the initial RTT of the frontend QUIC connection.
.sp
Default: \fB333ms\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-quic\-bpf
Disable eBPF.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http3\-window\-size=<SIZE>
Sets  the  per\-stream  initial  window  size  of  HTTP/3
frontend connection.
.sp
Default: \fB256K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http3\-connection\-window\-size=<SIZE>
Sets the  per\-connection window size of  HTTP/3 frontend
connection.
.sp
Default: \fB1M\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http3\-max\-window\-size=<SIZE>
Sets  the  maximum  per\-stream  window  size  of  HTTP/3
frontend connection.  The window  size is adjusted based
on the receiving rate of stream data.  The initial value
is the  value specified  by \fI\%\-\-frontend\-http3\-window\-size\fP
and the window size grows up to <SIZE> bytes.
.sp
Default: \fB6M\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http3\-max\-connection\-window\-size=<SIZE>
Sets the  maximum per\-connection  window size  of HTTP/3
frontend connection.  The window  size is adjusted based
on the receiving rate of stream data.  The initial value
is         the         value        specified         by
\fI\%\-\-frontend\-http3\-connection\-window\-size\fP  and the  window
size grows up to <SIZE> bytes.
.sp
Default: \fB8M\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-frontend\-http3\-max\-concurrent\-streams=<N>
Set the maximum number of  the concurrent streams in one
frontend HTTP/3 connection.
.sp
Default: \fB100\fP
.UNINDENT
.SS Misc
.INDENT 0.0
.TP
.B \-\-conf=<PATH>
Load  configuration  from   <PATH>.   Please  note  that
nghttpx always  tries to read the  default configuration
file if \fI\%\-\-conf\fP is not given.
.sp
Default: \fB/etc/nghttpx/nghttpx.conf\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-include=<PATH>
Load additional configurations from <PATH>.  File <PATH>
is  read  when  configuration  parser  encountered  this
option.  This option can be used multiple times, or even
recursively.
.UNINDENT
.INDENT 0.0
.TP
.B \-v, \-\-version
Print version and exit.
.UNINDENT
.INDENT 0.0
.TP
.B \-h, \-\-help
Print this help and exit.
.UNINDENT
.sp
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024).  Units are K, M and G (powers of 1024).
.sp
The <DURATION> argument is an integer and an optional unit (e.g., 1s
is 1 second and 500ms is 500 milliseconds).  Units are h, m, s or ms
(hours, minutes, seconds and milliseconds, respectively).  If a unit
is omitted, a second is used as unit.
.SH FILES
.INDENT 0.0
.TP
.B \fI/etc/nghttpx/nghttpx.conf\fP
The default configuration file path nghttpx searches at startup.
The configuration file path can be changed using \fI\%\-\-conf\fP
option.
.sp
Those lines which are staring \fB#\fP are treated as comment.
.sp
The option name in the configuration file is the long command\-line
option name with leading \fB\-\-\fP stripped (e.g., \fBfrontend\fP).  Put
\fB=\fP between option name and value.  Don\(aqt put extra leading or
trailing spaces.
.sp
When specifying arguments including characters which have special
meaning to a shell, we usually use quotes so that shell does not
interpret them.  When writing this configuration file, quotes for
this purpose must not be used.  For example, specify additional
request header field, do this:
.INDENT 7.0
.INDENT 3.5
.sp
.EX
add\-request\-header=foo: bar
.EE
.UNINDENT
.UNINDENT
.sp
instead of:
.INDENT 7.0
.INDENT 3.5
.sp
.EX
add\-request\-header=\(dqfoo: bar\(dq
.EE
.UNINDENT
.UNINDENT
.sp
The options which do not take argument in the command\-line \fItake\fP
argument in the configuration file.  Specify \fByes\fP as an argument
(e.g., \fBhttp2\-proxy=yes\fP).  If other string is given, it is
ignored.
.sp
To specify private key and certificate file which are given as
positional arguments in command\-line, use \fBprivate\-key\-file\fP and
\fBcertificate\-file\fP\&.
.sp
\fI\%\-\-conf\fP option cannot be used in the configuration file and
will be ignored if specified.
.TP
.B Error log
Error log is written to stderr by default.  It can be configured
using \fI\%\-\-errorlog\-file\fP\&.  The format of log message is as
follows:
.sp
<datetime> <main\-pid> <current\-pid> <thread\-id> <level> (<filename>:<line>) <msg>
.INDENT 7.0
.TP
.B <datetime>
It is a combination of date and time when the log is written.  It
is in ISO 8601 format.
.TP
.B <main\-pid>
It is a main process ID.
.TP
.B <current\-pid>
It is a process ID which writes this log.
.TP
.B <thread\-id>
It is a thread ID which writes this log.  It would be unique
within <current\-pid>.
.TP
.B <filename> and <line>
They are source file name, and line number which produce this log.
.TP
.B <msg>
It is a log message body.
.UNINDENT
.UNINDENT
.SH SIGNALS
.INDENT 0.0
.TP
.B SIGQUIT
Shutdown gracefully.  First accept pending connections and stop
accepting connection.  After all connections are handled, nghttpx
exits.
.TP
.B SIGHUP
Reload configuration file given in \fI\%\-\-conf\fP\&.
.TP
.B SIGUSR1
Reopen log files.
.UNINDENT
.sp
SIGUSR2
.INDENT 0.0
.INDENT 3.5
Fork and execute nghttpx.  It will execute the binary in the same
path with same command\-line arguments and environment variables.  As
of nghttpx version 1.20.0, the new main process sends SIGQUIT to the
original main process when it is ready to serve requests.  For the
earlier versions of nghttpx, user has to send SIGQUIT to the
original main process.
.sp
The difference between SIGUSR2 (+ SIGQUIT) and SIGHUP is that former
is usually used to execute new binary, and the main process is newly
spawned.  On the other hand, the latter just reloads configuration
file, and the same main process continues to exist.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
nghttpx consists of multiple processes: one process for processing
these signals, and another one for processing requests.  The former
spawns the latter.  The former is called main process, and the
latter is called worker process.  If neverbleed is enabled, the
worker process spawns neverbleed daemon process which does RSA key
processing.  The above signal must be sent to the main process.  If
the other processes received one of them, it is ignored.  This
behaviour of these processes may change in the future release.  In
other words, in the future release, the processes other than main
process may terminate upon the reception of these signals.
Therefore these signals should not be sent to the processes other
than main process.
.UNINDENT
.UNINDENT
.SH SERVER PUSH
.sp
nghttpx supports HTTP/2 server push in default mode with Link header
field.  nghttpx looks for Link header field (\X'tty: link http://tools.ietf.org/html/rfc5988'\fI\%RFC 5988\fP\X'tty: link') in response headers from
backend server and extracts URI\-reference with parameter
\fBrel=preload\fP (see \X'tty: link http://w3c.github.io/preload/#interoperability-with-http-link-header'\fI\%preload\fP\X'tty: link')
and pushes those URIs to the frontend client. Here is a sample Link
header field to initiate server push:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
Link: </fonts/font.woff>; rel=preload
Link: </css/theme.css>; rel=preload
.EE
.UNINDENT
.UNINDENT
.sp
Currently, the following restriction is applied for server push:
.INDENT 0.0
.IP 1. 3
The associated stream must have method \(dqGET\(dq or \(dqPOST\(dq.  The
associated stream\(aqs status code must be 200.
.UNINDENT
.sp
This limitation may be loosened in the future release.
.sp
nghttpx also supports server push if both frontend and backend are
HTTP/2 in default mode.  In this case, in addition to server push via
Link header field, server push from backend is forwarded to frontend
HTTP/2 session.
.sp
HTTP/2 server push will be disabled if \fI\%\-\-http2\-proxy\fP is
used.
.SH UNIX DOMAIN SOCKET
.sp
nghttpx supports UNIX domain socket with a filename for both frontend
and backend connections.
.sp
Please note that current nghttpx implementation does not delete a
socket with a filename.  And on start up, if nghttpx detects that the
specified socket already exists in the file system, nghttpx first
deletes it.  However, if SIGUSR2 is used to execute new binary and
both old and new configurations use same filename, new binary does not
delete the socket and continues to use it.
.SH OCSP STAPLING
.sp
OCSP query is done using external Python script
\fBfetch\-ocsp\-response\fP, which has been originally developed in Perl
as part of h2o project (\X'tty: link https://github.com/h2o/h2o'\fI\%https://github.com/h2o/h2o\fP\X'tty: link'), and was
translated into Python.
.sp
The script file is usually installed under
\fB$(prefix)/share/nghttp2/\fP directory.  The actual path to script can
be customized using \fI\%\-\-fetch\-ocsp\-response\-file\fP option.
.sp
If OCSP query is failed, previous OCSP response, if any, is continued
to be used.
.sp
\fI\%\-\-fetch\-ocsp\-response\-file\fP option provides wide range of
possibility to manage OCSP response.  It can take an arbitrary script
or executable.  The requirement is that it supports the command\-line
interface of \fBfetch\-ocsp\-response\fP script, and it must return a
valid DER encoded OCSP response on success.  It must return exit code
0 on success, and 75 for temporary error, and the other error code for
generic failure.  For large cluster of servers, it is not efficient
for each server to perform OCSP query using \fBfetch\-ocsp\-response\fP\&.
Instead, you can retrieve OCSP response in some way, and store it in a
disk or a shared database.  Then specify a program in
\fI\%\-\-fetch\-ocsp\-response\-file\fP to fetch it from those stores.
This could provide a way to share the OCSP response between fleet of
servers, and also any OCSP query strategy can be applied which may be
beyond the ability of nghttpx itself or \fBfetch\-ocsp\-response\fP
script.
.SH TLS SESSION RESUMPTION
.sp
nghttpx supports TLS session resumption through both session ID and
session ticket.
.SS SESSION ID RESUMPTION
.sp
By default, session ID is shared by all worker threads.
.sp
If \fI\%\-\-tls\-session\-cache\-memcached\fP is given, nghttpx will
insert serialized session data to memcached with
\fBnghttpx:tls\-session\-cache:\fP + lowercase hex string of session ID
as a memcached entry key, with expiry time 12 hours.  Session timeout
is set to 12 hours.
.sp
By default, connections to memcached server are not encrypted.  To
enable encryption, use \fBtls\fP keyword in
\fI\%\-\-tls\-session\-cache\-memcached\fP option.
.SS TLS SESSION TICKET RESUMPTION
.sp
By default, session ticket is shared by all worker threads.  The
automatic key rotation is also enabled by default.  Every an hour, new
encryption key is generated, and previous encryption key becomes
decryption only key.  We set session timeout to 12 hours, and thus we
keep at most 12 keys.
.sp
If \fI\%\-\-tls\-ticket\-key\-memcached\fP is given, encryption keys are
retrieved from memcached.  nghttpx just reads keys from memcached; one
has to deploy key generator program to update keys frequently (e.g.,
every 1 hour).  The example key generator tlsticketupdate.go is
available under contrib directory in nghttp2 archive.  The memcached
entry key is \fBnghttpx:tls\-ticket\-key\fP\&.  The data format stored in
memcached is the binary format described below:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| VERSION (4)  |LEN (2)|KEY(48 or 80) ...
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
               ^                        |
               |                        |
               +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
               (LEN, KEY) pair can be repeated
.EE
.UNINDENT
.UNINDENT
.sp
All numbers in the above figure is bytes.  All integer fields are
network byte order.
.sp
First 4 bytes integer VERSION field, which must be 1.  The 2 bytes
integer LEN field gives the length of following KEY field, which
contains key.  If \fI\%\-\-tls\-ticket\-key\-cipher\fP=aes\-128\-cbc is
used, LEN must be 48.  If
\fI\%\-\-tls\-ticket\-key\-cipher\fP=aes\-256\-cbc is used, LEN must be
80.  LEN and KEY pair can be repeated multiple times to store multiple
keys.  The key appeared first is used as encryption key.  All the
remaining keys are used as decryption only.
.sp
By default, connections to memcached server are not encrypted.  To
enable encryption, use \fBtls\fP keyword in
\fI\%\-\-tls\-ticket\-key\-memcached\fP option.
.sp
If \fI\%\-\-tls\-ticket\-key\-file\fP is given, encryption key is read
from the given file.  In this case, nghttpx does not rotate key
automatically.  To rotate key, one has to restart nghttpx (see
SIGNALS).
.SH CERTIFICATE TRANSPARENCY
.sp
nghttpx supports TLS \fBsigned_certificate_timestamp\fP extension (\X'tty: link https://tools.ietf.org/html/rfc6962'\fI\%RFC
6962\fP\X'tty: link').  The relevant options
are \fI\%\-\-tls\-sct\-dir\fP and \fBsct\-dir\fP parameter in
\fI\%\-\-subcert\fP\&.  They takes a directory, and nghttpx reads all
files whose extension is \fB\&.sct\fP under the directory.  The \fB*.sct\fP
files are encoded as \fBSignedCertificateTimestamp\fP struct described
in \X'tty: link https://tools.ietf.org/html/rfc6962#section-3.2'\fI\%section 3.2 of RFC 69662\fP\X'tty: link'\&.  This format is
the same one used by \X'tty: link https://github.com/grahamedgecombe/nginx-ct'\fI\%nginx\-ct\fP\X'tty: link' and \X'tty: link https://httpd.apache.org/docs/trunk/mod/mod_ssl_ct.html'\fI\%mod_ssl_ct\fP\X'tty: link'\&.
\X'tty: link https://github.com/grahamedgecombe/ct-submit'\fI\%ct\-submit\fP\X'tty: link' can be
used to submit certificates to log servers, and obtain the
\fBSignedCertificateTimestamp\fP struct which can be used with nghttpx.
.SH MRUBY SCRIPTING
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
The current mruby extension API is experimental and not frozen.  The
API is subject to change in the future release.
.UNINDENT
.UNINDENT
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
Almost all string value returned from method, or attribute is a
fresh new mruby string, which involves memory allocation, and
copies.  Therefore, it is strongly recommended to store a return
value in a local variable, and use it, instead of calling method or
accessing attribute repeatedly.
.UNINDENT
.UNINDENT
.sp
nghttpx allows users to extend its capability using mruby scripts.
nghttpx has 2 hook points to execute mruby script: request phase and
response phase.  The request phase hook is invoked after all request
header fields are received from client.  The response phase hook is
invoked after all response header fields are received from backend
server.  These hooks allows users to modify header fields, or common
HTTP variables, like authority or request path, and even return custom
response without forwarding request to backend servers.
.sp
There are 2 levels of mruby script invocations: global and
per\-pattern.  The global mruby script is set by \fI\%\-\-mruby\-file\fP
option and is called for all requests.  The per\-pattern mruby script
is set by \(dqmruby\(dq parameter in \fI\%\-b\fP option.  It is invoked for
a request which matches the particular pattern.  The order of hook
invocation is: global request phase hook, per\-pattern request phase
hook, per\-pattern response phase hook, and finally global response
phase hook.  If a hook returns a response, any later hooks are not
invoked.  The global request hook is invoked before the pattern
matching is made and changing request path may affect the pattern
matching.
.sp
Please note that request and response hooks of per\-pattern mruby
script for a single request might not come from the same script.  This
might happen after a request hook is executed, backend failed for some
reason, and at the same time, backend configuration is replaced by API
request, and then the request uses new configuration on retry.  The
response hook from new configuration, if it is specified, will be
invoked.
.sp
The all mruby script will be evaluated once per thread on startup, and
it must instantiate object and evaluate it as the return value (e.g.,
\fBApp.new\fP).  This object is called app object.  If app object
defines \fBon_req\fP method, it is called with \fI\%Nghttpx::Env\fP
object on request hook.  Similarly, if app object defines \fBon_resp\fP
method, it is called with \fI\%Nghttpx::Env\fP object on response
hook.  For each method invocation, user can can access
\fI\%Nghttpx::Request\fP and \fI\%Nghttpx::Response\fP objects
via \fI\%Nghttpx::Env#req\fP and \fI\%Nghttpx::Env#resp\fP
respectively.
.INDENT 0.0
.TP
.B Nghttpx::REQUEST_PHASE
Constant to represent request phase.
.UNINDENT
.INDENT 0.0
.TP
.B Nghttpx::RESPONSE_PHASE
Constant to represent response phase.
.UNINDENT
.INDENT 0.0
.TP
.B class Nghttpx::Env
Object to represent current request specific context.
.INDENT 7.0
.TP
.B attribute [R] req
Return \fI\%Request\fP object.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] resp
Return \fI\%Response\fP object.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] ctx
Return Ruby hash object.  It persists until request finishes.
So values set in request phase hook can be retrieved in
response phase hook.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] phase
Return the current phase.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] remote_addr
Return IP address of a remote client.  If connection is made
via UNIX domain socket, this returns the string \(dqlocalhost\(dq.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] server_addr
Return address of server that accepted the connection.  This
is a string which specified in \fI\%\-\-frontend\fP option,
excluding port number, and not a resolved IP address.  For
UNIX domain socket, this is a path to UNIX domain socket.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] server_port
Return port number of the server frontend which accepted the
connection from client.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_used
Return true if TLS is used on the connection.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_sni
Return the TLS SNI value which client sent in this connection.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_client_fingerprint_sha256
Return the SHA\-256 fingerprint of a client certificate.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_client_fingerprint_sha1
Return the SHA\-1 fingerprint of a client certificate.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_client_issuer_name
Return the issuer name of a client certificate.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_client_subject_name
Return the subject name of a client certificate.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_client_serial
Return the serial number of a client certificate.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_client_not_before
Return the start date of a client certificate in seconds since
the epoch.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_client_not_after
Return the end date of a client certificate in seconds since
the epoch.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_cipher
Return a TLS cipher negotiated in this connection.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_protocol
Return a TLS protocol version negotiated in this connection.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_session_id
Return a session ID for this connection in hex string.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_session_reused
Return true if, and only if a SSL/TLS session is reused.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] alpn
Return ALPN identifier negotiated in this connection.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] tls_handshake_finished
Return true if SSL/TLS handshake has finished.  If it returns
false in the request phase hook, the request is received in
TLSv1.3 early data (0\-RTT) and might be vulnerable to the
replay attack.  nghttpx will send Early\-Data header field to
backend servers to indicate this.
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B class Nghttpx::Request
Object to represent request from client.  The modification to
Request object is allowed only in request phase hook.
.INDENT 7.0
.TP
.B attribute [R] http_version_major
Return HTTP major version.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] http_version_minor
Return HTTP minor version.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R/W] method
HTTP method.  On assignment, copy of given value is assigned.
We don\(aqt accept arbitrary method name.  We will document them
later, but well known methods, like GET, PUT and POST, are all
supported.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R/W] authority
Authority (i.e., example.org), including optional port
component .  On assignment, copy of given value is assigned.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R/W] scheme
Scheme (i.e., http, https).  On assignment, copy of given
value is assigned.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R/W] path
Request path, including query component (i.e., /index.html).
On assignment, copy of given value is assigned.  The path does
not include authority component of URI.  This may include
query component.  nghttpx makes certain normalization for
path.  It decodes percent\-encoding for unreserved characters
(see \X'tty: link https://tools.ietf.org/html/rfc3986#section-2.3'\fI\%https://tools.ietf.org/html/rfc3986#section\-2.3\fP\X'tty: link'), and
resolves \(dq..\(dq and \(dq.\(dq.  But it may leave characters which
should be percent\-encoded as is. So be careful when comparing
path against desired string.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] headers
Return Ruby hash containing copy of request header fields.
Changing values in returned hash does not change request
header fields actually used in request processing.  Use
\fI\%Nghttpx::Request#add_header\fP or
\fI\%Nghttpx::Request#set_header\fP to change request
header fields.
.UNINDENT
.INDENT 7.0
.TP
.B add_header(key, value)
Add header entry associated with key.  The value can be single
string or array of string.  It does not replace any existing
values associated with key.
.UNINDENT
.INDENT 7.0
.TP
.B set_header(key, value)
Set header entry associated with key.  The value can be single
string or array of string.  It replaces any existing values
associated with key.
.UNINDENT
.INDENT 7.0
.TP
.B clear_headers()
Clear all existing request header fields.
.UNINDENT
.INDENT 7.0
.TP
.B push(uri)
Initiate to push resource identified by \fIuri\fP\&.  Only HTTP/2
protocol supports this feature.  For the other protocols, this
method is noop.  \fIuri\fP can be absolute URI, absolute path or
relative path to the current request.  For absolute or
relative path, scheme and authority are inherited from the
current request.  Currently, method is always GET.  nghttpx
will issue request to backend servers to fulfill this request.
The request and response phase hooks will be called for pushed
resource as well.
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B class Nghttpx::Response
Object to represent response from backend server.
.INDENT 7.0
.TP
.B attribute [R] http_version_major
Return HTTP major version.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] http_version_minor
Return HTTP minor version.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R/W] status
HTTP status code.  It must be in the range [200, 999],
inclusive.  The non\-final status code is not supported in
mruby scripting at the moment.
.UNINDENT
.INDENT 7.0
.TP
.B attribute [R] headers
Return Ruby hash containing copy of response header fields.
Changing values in returned hash does not change response
header fields actually used in response processing.  Use
\fI\%Nghttpx::Response#add_header\fP or
\fI\%Nghttpx::Response#set_header\fP to change response
header fields.
.UNINDENT
.INDENT 7.0
.TP
.B add_header(key, value)
Add header entry associated with key.  The value can be single
string or array of string.  It does not replace any existing
values associated with key.
.UNINDENT
.INDENT 7.0
.TP
.B set_header(key, value)
Set header entry associated with key.  The value can be single
string or array of string.  It replaces any existing values
associated with key.
.UNINDENT
.INDENT 7.0
.TP
.B clear_headers()
Clear all existing response header fields.
.UNINDENT
.INDENT 7.0
.TP
.B return(body)
Return custom response \fIbody\fP to a client.  When this method
is called in request phase hook, the request is not forwarded
to the backend, and response phase hook for this request will
not be invoked.  When this method is called in response phase
hook, response from backend server is canceled and discarded.
The status code and response header fields should be set
before using this method.  To set status code, use
\fI\%Nghttpx::Response#status\fP\&.  If status code is not
set, 200 is used.  To set response header fields,
\fI\%Nghttpx::Response#add_header\fP and
\fI\%Nghttpx::Response#set_header\fP\&.  When this method is
invoked in response phase hook, the response headers are
filled with the ones received from backend server.  To send
completely custom header fields, first call
\fI\%Nghttpx::Response#clear_headers\fP to erase all
existing header fields, and then add required header fields.
It is an error to call this method twice for a given request.
.UNINDENT
.INDENT 7.0
.TP
.B send_info(status, headers)
Send non\-final (informational) response to a client.  \fIstatus\fP
must be in the range [100, 199], inclusive.  \fIheaders\fP is a
hash containing response header fields.  Its key must be a
string, and the associated value must be either string or
array of strings.  Since this is not a final response, even if
this method is invoked, request is still forwarded to a
backend unless \fI\%Nghttpx::Response#return\fP is called.
This method can be called multiple times.  It cannot be called
after \fI\%Nghttpx::Response#return\fP is called.
.UNINDENT
.UNINDENT
.SS MRUBY EXAMPLES
.sp
Modify request path:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
class App
  def on_req(env)
    env.req.path = \(dq/apps#{env.req.path}\(dq
  end
end

App.new
.EE
.UNINDENT
.UNINDENT
.sp
Don\(aqt forget to instantiate and evaluate object at the last line.
.sp
Restrict permission of viewing a content to a specific client
addresses:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
class App
  def on_req(env)
    allowed_clients = [\(dq127.0.0.1\(dq, \(dq::1\(dq]

    if env.req.path.start_with?(\(dq/log/\(dq) &&
       !allowed_clients.include?(env.remote_addr) then
      env.resp.status = 404
      env.resp.return \(dqpermission denied\(dq
    end
  end
end

App.new
.EE
.UNINDENT
.UNINDENT
.SH API ENDPOINTS
.sp
nghttpx exposes API endpoints to manipulate it via HTTP based API.  By
default, API endpoint is disabled.  To enable it, add a dedicated
frontend for API using \fI\%\-\-frontend\fP option with \(dqapi\(dq
parameter.  All requests which come from this frontend address, will
be treated as API request.
.sp
The response is normally JSON dictionary, and at least includes the
following keys:
.INDENT 0.0
.TP
.B status
The status of the request processing.  The following values are
defined:
.INDENT 7.0
.TP
.B Success
The request was successful.
.TP
.B Failure
The request was failed.  No change has been made.
.UNINDENT
.TP
.B code
HTTP status code
.UNINDENT
.sp
Additionally, depending on the API endpoint, \fBdata\fP key may be
present, and its value contains the API endpoint specific data.
.sp
We wrote \(dqnormally\(dq, since nghttpx may return ordinal HTML response in
some cases where the error has occurred before reaching API endpoint
(e.g., header field is too large).
.sp
The following section describes available API endpoints.
.SS POST /api/v1beta1/backendconfig
.sp
This API replaces the current backend server settings with the
requested ones.  The request method should be POST, but PUT is also
acceptable.  The request body must be nghttpx configuration file
format.  For configuration file format, see \fI\%FILES\fP section.  The
line separator inside the request body must be single LF (0x0A).
Currently, only \fI\%backend\fP option is parsed, the
others are simply ignored.  The semantics of this API is replace the
current backend with the backend options in request body.  Describe
the desired set of backend severs, and nghttpx makes it happen.  If
there is no \fI\%backend\fP option is found in request
body, the current set of backend is replaced with the \fI\%backend\fP option\(aqs default value, which is \fB127.0.0.1,80\fP\&.
.sp
The replacement is done instantly without breaking existing
connections or requests.  It also avoids any process creation as is
the case with hot swapping with signals.
.sp
The one limitation is that only numeric IP address is allowed in
\fI\%backend\fP in request body unless \(dqdns\(dq parameter
is used while non numeric hostname is allowed in command\-line or
configuration file is read using \fI\%\-\-conf\fP\&.
.SS GET /api/v1beta1/configrevision
.sp
This API returns configuration revision of the current nghttpx.  The
configuration revision is opaque string, and it changes after each
reloading by SIGHUP.  With this API, an external application knows
that whether nghttpx has finished reloading its configuration by
comparing the configuration revisions between before and after
reloading.  It is recommended to disable persistent (keep\-alive)
connection for this purpose in order to avoid to send a request using
the reused connection which may bound to an old process.
.sp
This API returns response including \fBdata\fP key.  Its value is JSON
object, and it contains at least the following key:
.INDENT 0.0
.TP
.B configRevision
The configuration revision of the current nghttpx
.UNINDENT
.SH SEE ALSO
.sp
\fBnghttp(1)\fP, \fBnghttpd(1)\fP, \fBh2load(1)\fP
.SH AUTHOR
Tatsuhiro Tsujikawa
.SH COPYRIGHT
2012, 2015, 2016, Tatsuhiro Tsujikawa
.\" Generated by docutils manpage writer.
.
man/man1/h2load.1000064400000036662150340274550007430 0ustar00.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "H2LOAD" "1" "Jan 12, 2025" "1.65.0-DEV" "nghttp2"
.SH NAME
h2load \- HTTP/2 benchmarking tool
.SH SYNOPSIS
.sp
\fBh2load\fP [OPTIONS]... [URI]...
.SH DESCRIPTION
.sp
benchmarking tool for HTTP/2 server
.INDENT 0.0
.TP
.B <URI>
Specify URI to access.   Multiple URIs can be specified.
URIs are used  in this order for each  client.  All URIs
are used, then  first URI is used and then  2nd URI, and
so  on.  The  scheme, host  and port  in the  subsequent
URIs, if present,  are ignored.  Those in  the first URI
are used solely.  Definition of a base URI overrides all
scheme, host or port values.
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
.B \-n, \-\-requests=<N>
Number of  requests across all  clients.  If it  is used
with \fI\%\-\-timing\-script\-file\fP option,  this option specifies
the number of requests  each client performs rather than
the number of requests  across all clients.  This option
is ignored if timing\-based  benchmarking is enabled (see
\fI\%\-\-duration\fP option).
.sp
Default: \fB1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-c, \-\-clients=<N>
Number  of concurrent  clients.   With  \fI\%\-r\fP option,  this
specifies the maximum number of connections to be made.
.sp
Default: \fB1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-t, \-\-threads=<N>
Number of native threads.
.sp
Default: \fB1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-i, \-\-input\-file=<PATH>
Path of a file with multiple URIs are separated by EOLs.
This option will disable URIs getting from command\-line.
If \(aq\-\(aq is given as <PATH>, URIs will be read from stdin.
URIs are used  in this order for each  client.  All URIs
are used, then  first URI is used and then  2nd URI, and
so  on.  The  scheme, host  and port  in the  subsequent
URIs, if present,  are ignored.  Those in  the first URI
are used solely.  Definition of a base URI overrides all
scheme, host or port values.
.UNINDENT
.INDENT 0.0
.TP
.B \-m, \-\-max\-concurrent\-streams=<N>
Max  concurrent  streams  to issue  per  session.   When
http/1.1  is used,  this  specifies the  number of  HTTP
pipelining requests in\-flight.
.sp
Default: \fB1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-f, \-\-max\-frame\-size=<SIZE>
Maximum frame size that the local endpoint is willing to
receive.
.sp
Default: \fB16K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-w, \-\-window\-bits=<N>
Sets the stream level initial window size to (2**<N>)\-1.
For QUIC, <N> is capped to 26 (roughly 64MiB).
.sp
Default: \fB30\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-W, \-\-connection\-window\-bits=<N>
Sets  the  connection  level   initial  window  size  to
(2**<N>)\-1.
.sp
Default: \fB30\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-H, \-\-header=<HEADER>
Add/Override a header to the requests.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ciphers=<SUITE>
Set  allowed cipher  list  for TLSv1.2  or earlier.   The
format of the string is described in OpenSSL ciphers(1).
.sp
Default: \fBECDHE\-ECDSA\-AES128\-GCM\-SHA256:ECDHE\-RSA\-AES128\-GCM\-SHA256:ECDHE\-ECDSA\-AES256\-GCM\-SHA384:ECDHE\-RSA\-AES256\-GCM\-SHA384:ECDHE\-ECDSA\-CHACHA20\-POLY1305:ECDHE\-RSA\-CHACHA20\-POLY1305:DHE\-RSA\-AES128\-GCM\-SHA256:DHE\-RSA\-AES256\-GCM\-SHA384\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tls13\-ciphers=<SUITE>
Set allowed cipher list for  TLSv1.3.  The format of the
string is described in OpenSSL ciphers(1).
.sp
Default: \fBTLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_CCM_SHA256\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-p, \-\-no\-tls\-proto=<PROTOID>
Specify ALPN identifier of the  protocol to be used when
accessing http URI without SSL/TLS.
Available protocols: h2c and http/1.1
.sp
Default: \fBh2c\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-d, \-\-data=<PATH>
Post FILE to  server.  The request method  is changed to
POST.   For  http/1.1 connection,  if  \fI\%\-d\fP  is used,  the
maximum number of in\-flight pipelined requests is set to
1.
.UNINDENT
.INDENT 0.0
.TP
.B \-r, \-\-rate=<N>
Specifies  the  fixed  rate  at  which  connections  are
created.   The   rate  must   be  a   positive  integer,
representing the  number of  connections to be  made per
rate period.   The maximum  number of connections  to be
made  is  given  in  \fI\%\-c\fP   option.   This  rate  will  be
distributed among  threads as  evenly as  possible.  For
example,  with   \fI\%\-t\fP2  and   \fI\%\-r\fP4,  each  thread   gets  2
connections per period.  When the rate is 0, the program
will run  as it  normally does, creating  connections at
whatever variable rate it  wants.  The default value for
this option is 0.  \fI\%\-r\fP and \fI\%\-D\fP are mutually exclusive.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rate\-period=<DURATION>
Specifies the time  period between creating connections.
The period  must be a positive  number, representing the
length of the period in time.  This option is ignored if
the rate option is not used.  The default value for this
option is 1s.
.UNINDENT
.INDENT 0.0
.TP
.B \-D, \-\-duration=<DURATION>
Specifies the main duration for the measurements in case
of timing\-based  benchmarking.  \fI\%\-D\fP  and \fI\%\-r\fP  are mutually
exclusive.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-warm\-up\-time=<DURATION>
Specifies the  time  period  before  starting the actual
measurements, in  case  of  timing\-based benchmarking.
Needs to provided along with \fI\%\-D\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-T, \-\-connection\-active\-timeout=<DURATION>
Specifies  the maximum  time that  h2load is  willing to
keep a  connection open,  regardless of the  activity on
said connection.  <DURATION> must be a positive integer,
specifying the amount of time  to wait.  When no timeout
value is  set (either  active or inactive),  h2load will
keep  a  connection  open indefinitely,  waiting  for  a
response.
.UNINDENT
.INDENT 0.0
.TP
.B \-N, \-\-connection\-inactivity\-timeout=<DURATION>
Specifies the amount  of time that h2load  is willing to
wait to see activity  on a given connection.  <DURATION>
must  be a  positive integer,  specifying the  amount of
time  to wait.   When no  timeout value  is set  (either
active or inactive), h2load  will keep a connection open
indefinitely, waiting for a response.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-timing\-script\-file=<PATH>
Path of a file containing one or more lines separated by
EOLs.  Each script line is composed of two tab\-separated
fields.  The first field represents the time offset from
the start of execution, expressed as a positive value of
milliseconds  with microsecond  resolution.  The  second
field represents the URI.  This option will disable URIs
getting from  command\-line.  If \(aq\-\(aq is  given as <PATH>,
script lines will be read  from stdin.  Script lines are
used in order for each client.   If \fI\%\-n\fP is given, it must
be less  than or  equal to the  number of  script lines,
larger values are clamped to the number of script lines.
If \fI\%\-n\fP is not given,  the number of requests will default
to the  number of  script lines.   The scheme,  host and
port defined in  the first URI are  used solely.  Values
contained  in  other  URIs,  if  present,  are  ignored.
Definition of a  base URI overrides all  scheme, host or
port   values.   \fI\%\-\-timing\-script\-file\fP   and  \fI\%\-\-rps\fP   are
mutually exclusive.
.UNINDENT
.INDENT 0.0
.TP
.B \-B, \-\-base\-uri=(<URI>|unix:<PATH>)
Specify URI from which the scheme, host and port will be
used  for  all requests.   The  base  URI overrides  all
values  defined either  at  the command  line or  inside
input files.  If argument  starts with \(dqunix:\(dq, then the
rest  of the  argument will  be treated  as UNIX  domain
socket path.   The connection is made  through that path
instead of TCP.   In this case, scheme  is inferred from
the first  URI appeared  in the  command line  or inside
input files as usual.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-alpn\-list=<LIST>
Comma delimited list of  ALPN protocol identifier sorted
in the  order of preference.  That  means most desirable
protocol comes  first.  The parameter must  be delimited
by a single comma only  and any white spaces are treated
as a part of protocol string.
.sp
Default: \fBh2,h2\-16,h2\-14,http/1.1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-h1
Short        hand        for        \fI\%\-\-alpn\-list\fP=http/1.1
\fI\%\-\-no\-tls\-proto\fP=http/1.1,    which   effectively    force
http/1.1 for both http and https URI.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-header\-table\-size=<SIZE>
Specify decoder header table size.
.sp
Default: \fB4K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-encoder\-header\-table\-size=<SIZE>
Specify encoder header table size.  The decoder (server)
specifies  the maximum  dynamic table  size it  accepts.
Then the negotiated dynamic table size is the minimum of
this option value and the value which server specified.
.sp
Default: \fB4K\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-log\-file=<PATH>
Write per\-request information to a file as tab\-separated
columns: start  time as  microseconds since  epoch; HTTP
status code;  microseconds until end of  response.  More
columns may be added later.  Rows are ordered by end\-of\-
response  time when  using  one worker  thread, but  may
appear slightly  out of order with  multiple threads due
to buffering.  Status code is \-1 for failed streams.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-qlog\-file\-base=<PATH>
Enable qlog output and specify base file name for qlogs.
Qlog is emitted  for each connection.  For  a given base
name   \(dqbase\(dq,    each   output   file    name   becomes
\(dqbase.M.N.sqlog\(dq where M is worker ID and N is client ID
(e.g. \(dqbase.0.3.sqlog\(dq).  Only effective in QUIC runs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-connect\-to=<HOST>[:<PORT>]
Host and port to connect  instead of using the authority
in <URI>.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rps=<N>
Specify request  per second for each  client.  \fI\%\-\-rps\fP and
\fI\%\-\-timing\-script\-file\fP are mutually exclusive.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-groups=<GROUPS>
Specify the supported groups.
.sp
Default: \fBX25519:P\-256:P\-384:P\-521\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-udp\-gso
Disable UDP GSO.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-max\-udp\-payload\-size=<SIZE>
Specify the maximum outgoing UDP datagram payload size.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ktls
Enable ktls.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sni=<DNSNAME>
Send  <DNSNAME> in  TLS  SNI, overriding  the host  name
specified in URI.
.UNINDENT
.INDENT 0.0
.TP
.B \-v, \-\-verbose
Output debug information.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Display version information and exit.
.UNINDENT
.INDENT 0.0
.TP
.B \-h, \-\-help
Display this help and exit.
.UNINDENT
.sp
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024).  Units are K, M and G (powers of 1024).
.sp
The <DURATION> argument is an integer and an optional unit (e.g., 1s
is 1 second and 500ms is 500 milliseconds).  Units are h, m, s or ms
(hours, minutes, seconds and milliseconds, respectively).  If a unit
is omitted, a second is used as unit.
.SH OUTPUT
.INDENT 0.0
.TP
.B requests
.INDENT 7.0
.TP
.B total
The number of requests h2load was instructed to make.
.TP
.B started
The number of requests h2load has started.
.TP
.B done
The number of requests completed.
.TP
.B succeeded
The number of requests completed successfully.  Only HTTP status
code 2xx or3xx are considered as success.
.TP
.B failed
The number of requests failed, including HTTP level failures
(non\-successful HTTP status code).
.TP
.B errored
The number of requests failed, except for HTTP level failures.
This is the subset of the number reported in \fBfailed\fP and most
likely the network level failures or stream was reset by
RST_STREAM.
.TP
.B timeout
The number of requests whose connection timed out before they were
completed.   This  is  the  subset   of  the  number  reported  in
\fBerrored\fP\&.
.UNINDENT
.TP
.B status codes
The number of status code h2load received.
.TP
.B traffic
.INDENT 7.0
.TP
.B total
The number of bytes received from the server \(dqon the wire\(dq.  If
requests were made via TLS, this value is the number of decrypted
bytes.
.TP
.B headers
The  number  of response  header  bytes  from the  server  without
decompression.  The  \fBspace savings\fP shows efficiency  of header
compression.  Let \fBdecompressed(headers)\fP to the number of bytes
used for header fields after decompression.  The \fBspace savings\fP
is calculated  by (1 \- \fBheaders\fP  / \fBdecompressed(headers)\fP) *
100.  For HTTP/1.1, this is usually  0.00%, since it does not have
header compression.  For HTTP/2, it shows some insightful numbers.
.TP
.B data
The number of response body bytes received from the server.
.UNINDENT
.TP
.B time for request
.INDENT 7.0
.TP
.B min
The minimum time taken for request and response.
.TP
.B max
The maximum time taken for request and response.
.TP
.B mean
The mean time taken for request and response.
.TP
.B sd
The standard deviation of the time taken for request and response.
.TP
.B +/\- sd
The fraction of the number of requests within standard deviation
range (mean +/\- sd) against total number of successful requests.
.UNINDENT
.TP
.B time for connect
.INDENT 7.0
.TP
.B min
The minimum time taken to connect to a server including TLS
handshake.
.TP
.B max
The maximum time taken to connect to a server including TLS
handshake.
.TP
.B mean
The mean time taken to connect to a server including TLS
handshake.
.TP
.B sd
The standard deviation of the time taken to connect to a server.
.TP
.B +/\- sd
The  fraction  of  the   number  of  connections  within  standard
deviation range (mean  +/\- sd) against total  number of successful
connections.
.UNINDENT
.TP
.B time for 1st byte (of (decrypted in case of TLS) application data)
.INDENT 7.0
.TP
.B min
The minimum time taken to get 1st byte from a server.
.TP
.B max
The maximum time taken to get 1st byte from a server.
.TP
.B mean
The mean time taken to get 1st byte from a server.
.TP
.B sd
The standard deviation of the time taken to get 1st byte from a
server.
.TP
.B +/\- sd
The fraction of the number of connections within standard
deviation range (mean +/\- sd) against total number of successful
connections.
.UNINDENT
.TP
.B req/s
.INDENT 7.0
.TP
.B min
The minimum request per second among all clients.
.TP
.B max
The maximum request per second among all clients.
.TP
.B mean
The mean request per second among all clients.
.TP
.B sd
The standard deviation of request per second among all clients.
server.
.TP
.B +/\- sd
The fraction of the number of connections within standard
deviation range (mean +/\- sd) against total number of successful
connections.
.UNINDENT
.UNINDENT
.SH FLOW CONTROL
.sp
h2load sets large flow control window by default, and effectively
disables flow control to avoid under utilization of server
performance.  To set smaller flow control window, use \fI\%\-w\fP and
\fI\%\-W\fP options.  For example, use \fB\-w16 \-W16\fP to set default
window size described in HTTP/2 protocol specification.
.SH SEE ALSO
.sp
\fBnghttp(1)\fP, \fBnghttpd(1)\fP, \fBnghttpx(1)\fP
.SH AUTHOR
Tatsuhiro Tsujikawa
.SH COPYRIGHT
2012, 2015, 2016, Tatsuhiro Tsujikawa
.\" Generated by docutils manpage writer.
.
man/man1/nghttpd.1000064400000012515150340274550007716 0ustar00.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "NGHTTPD" "1" "Jan 12, 2025" "1.65.0-DEV" "nghttp2"
.SH NAME
nghttpd \- HTTP/2 server
.SH SYNOPSIS
.sp
\fBnghttpd\fP [OPTION]... <PORT> [<PRIVATE_KEY> <CERT>]
.SH DESCRIPTION
.sp
HTTP/2 server
.INDENT 0.0
.TP
.B <PORT>
Specify listening port number.
.UNINDENT
.INDENT 0.0
.TP
.B <PRIVATE_KEY>
Set  path  to  server\(aqs private  key.   Required  unless
\fI\%\-\-no\-tls\fP is specified.
.UNINDENT
.INDENT 0.0
.TP
.B <CERT>
Set  path  to  server\(aqs  certificate.   Required  unless
\fI\%\-\-no\-tls\fP is specified.
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
.B \-a, \-\-address=<ADDR>
The address to bind to.  If not specified the default IP
address determined by getaddrinfo is used.
.UNINDENT
.INDENT 0.0
.TP
.B \-D, \-\-daemon
Run in a background.  If \fI\%\-D\fP is used, the current working
directory is  changed to \(aq\fI/\fP\(aq.  Therefore  if this option
is used, \fI\%\-d\fP option must be specified.
.UNINDENT
.INDENT 0.0
.TP
.B \-V, \-\-verify\-client
The server  sends a client certificate  request.  If the
client did  not return  a certificate, the  handshake is
terminated.   Currently,  this  option just  requests  a
client certificate and does not verify it.
.UNINDENT
.INDENT 0.0
.TP
.B \-d, \-\-htdocs=<PATH>
Specify document root.  If this option is not specified,
the document root is the current working directory.
.UNINDENT
.INDENT 0.0
.TP
.B \-v, \-\-verbose
Print debug information  such as reception/ transmission
of frames and name/value pairs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-tls
Disable SSL/TLS.
.UNINDENT
.INDENT 0.0
.TP
.B \-c, \-\-header\-table\-size=<SIZE>
Specify decoder header table size.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-encoder\-header\-table\-size=<SIZE>
Specify encoder header table size.  The decoder (client)
specifies  the maximum  dynamic table  size it  accepts.
Then the negotiated dynamic table size is the minimum of
this option value and the value which client specified.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-color
Force colored log output.
.UNINDENT
.INDENT 0.0
.TP
.B \-p, \-\-push=<PATH>=<PUSH_PATH,...>
Push  resources <PUSH_PATH>s  when <PATH>  is requested.
This option  can be used repeatedly  to specify multiple
push  configurations.    <PATH>  and   <PUSH_PATH>s  are
relative  to   document  root.   See   \fI\%\-\-htdocs\fP  option.
Example: \fI\%\-p\fP/=/foo.png \fI\%\-p\fP/doc=/bar.css
.UNINDENT
.INDENT 0.0
.TP
.B \-b, \-\-padding=<N>
Add at  most <N>  bytes to a  frame payload  as padding.
Specify 0 to disable padding.
.UNINDENT
.INDENT 0.0
.TP
.B \-m, \-\-max\-concurrent\-streams=<N>
Set the maximum number of  the concurrent streams in one
HTTP/2 session.
.sp
Default: \fB100\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-n, \-\-workers=<N>
Set the number of worker threads.
.sp
Default: \fB1\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-e, \-\-error\-gzip
Make error response gzipped.
.UNINDENT
.INDENT 0.0
.TP
.B \-w, \-\-window\-bits=<N>
Sets the stream level initial window size to 2**<N>\-1.
.UNINDENT
.INDENT 0.0
.TP
.B \-W, \-\-connection\-window\-bits=<N>
Sets  the  connection  level   initial  window  size  to
2**<N>\-1.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dh\-param\-file=<PATH>
Path to file that contains  DH parameters in PEM format.
Without  this   option,  DHE   cipher  suites   are  not
available.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-early\-response
Start sending response when request HEADERS is received,
rather than complete request is received.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-trailer=<HEADER>
Add a trailer  header to a response.   <HEADER> must not
include pseudo header field  (header field name starting
with \(aq:\(aq).  The  trailer is sent only if  a response has
body part.  Example: \fI\%\-\-trailer\fP \(aqfoo: bar\(aq.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-hexdump
Display the  incoming traffic in  hexadecimal (Canonical
hex+ASCII display).  If SSL/TLS  is used, decrypted data
are used.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-echo\-upload
Send back uploaded content if method is POST or PUT.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-mime\-types\-file=<PATH>
Path  to file  that contains  MIME media  types and  the
extensions that represent them.
.sp
Default: \fB/etc/mime.types\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-content\-length
Don\(aqt send content\-length header field.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ktls
Enable ktls.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
Display version information and exit.
.UNINDENT
.INDENT 0.0
.TP
.B \-h, \-\-help
Display this help and exit.
.UNINDENT
.sp
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024).  Units are K, M and G (powers of 1024).
.SH SEE ALSO
.sp
\fBnghttp(1)\fP, \fBnghttpx(1)\fP, \fBh2load(1)\fP
.SH AUTHOR
Tatsuhiro Tsujikawa
.SH COPYRIGHT
2012, 2015, 2016, Tatsuhiro Tsujikawa
.\" Generated by docutils manpage writer.
.
nghttp2/fetch-ocsp-response000075500000021443150340274550011760 0ustar00#!/usr/libexec/platform-python
# -*- coding: utf-8 -*-

# nghttp2 - HTTP/2 C Library

# Copyright (c) 2015 Tatsuhiro Tsujikawa

# 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:

# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.

# 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.

# This program was translated from the program originally developed by
# h2o project (https://github.com/h2o/h2o), written in Perl.  It had
# the following copyright notice:

# Copyright (c) 2015 DeNA Co., Ltd.
#
# 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:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# 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.

from __future__ import unicode_literals
import argparse
import io
import os
import os.path
import re
import shutil
import subprocess
import sys
import tempfile

# make this program work for both Python 3 and Python 2.
try:
    from urllib.parse import urlparse
    stdout_bwrite = sys.stdout.buffer.write
except ImportError:
    from urlparse import urlparse
    stdout_bwrite = sys.stdout.write


def die(msg):
    sys.stderr.write(msg)
    sys.stderr.write('\n')
    sys.exit(255)


def tempfail(msg):
    sys.stderr.write(msg)
    sys.stderr.write('\n')
    sys.exit(os.EX_TEMPFAIL)


def run_openssl(args, allow_tempfail=False):
    buf = io.BytesIO()
    try:
        p = subprocess.Popen(args, stdout=subprocess.PIPE)
    except Exception as e:
        die('failed to invoke {}:{}'.format(args, e))
    try:
        while True:
            data = p.stdout.read()
            if len(data) == 0:
                break
            buf.write(data)
        if p.wait() != 0:
            raise Exception('nonzero return code {}'.format(p.returncode))
        return buf.getvalue()
    except Exception as e:
        msg = 'OpenSSL exited abnormally: {}:{}'.format(args, e)
        tempfail(msg) if allow_tempfail else die(msg)


def read_file(path):
    with open(path, 'rb') as f:
        return f.read()


def write_file(path, data):
    with open(path, 'wb') as f:
        f.write(data)


def detect_openssl_version(cmd):
    return run_openssl([cmd, 'version']).decode('utf-8').strip()


def extract_ocsp_uri(cmd, cert_fn):
    # obtain ocsp uri
    ocsp_uri = run_openssl(
        [cmd, 'x509', '-in', cert_fn, '-noout',
         '-ocsp_uri']).decode('utf-8').strip()

    if not re.match(r'^https?://', ocsp_uri):
        die('failed to extract ocsp URI from {}'.format(cert_fn))

    return ocsp_uri


def save_issuer_certificate(issuer_fn, cert_fn):
    # save issuer certificate
    chain = read_file(cert_fn).decode('utf-8')
    m = re.match(
        r'.*?-----END CERTIFICATE-----.*?(-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----)',
        chain, re.DOTALL)
    if not m:
        die('--issuer option was not used, and failed to extract issuer certificate from the certificate')
    write_file(issuer_fn, (m.group(1) + '\n').encode('utf-8'))


def send_and_receive_ocsp(respder_fn, cmd, cert_fn, issuer_fn, ocsp_uri,
                          ocsp_host, openssl_version):
    # obtain response (without verification)
    sys.stderr.write('sending OCSP request to {}\n'.format(ocsp_uri))
    args = [
        cmd, 'ocsp', '-issuer', issuer_fn, '-cert', cert_fn, '-url', ocsp_uri,
        '-noverify', '-respout', respder_fn
    ]
    ver = openssl_version.lower()
    if ver.startswith('openssl 1.0.') or ver.startswith('libressl '):
        args.extend(['-header', 'Host', ocsp_host])
    resp = run_openssl(args, allow_tempfail=True)
    return resp.decode('utf-8')


def verify_response(cmd, tempdir, issuer_fn, respder_fn):
    # verify the response
    sys.stderr.write('verifying the response signature\n')

    verify_fn = os.path.join(tempdir, 'verify.out')

    # try from exotic options
    allextra = [
        # for comodo
        ['-VAfile', issuer_fn],
        # these options are only available in OpenSSL >= 1.0.2
        ['-partial_chain', '-trusted_first', '-CAfile', issuer_fn],
        # for OpenSSL <= 1.0.1
        ['-CAfile', issuer_fn],
    ]

    for extra in allextra:
        with open(verify_fn, 'w+b') as f:
            args = [cmd, 'ocsp', '-respin', respder_fn]
            args.extend(extra)
            p = subprocess.Popen(args, stdout=f, stderr=f)
            if p.wait() == 0:
                # OpenSSL <= 1.0.1, openssl ocsp still returns exit
                # code 0 even if verification was failed.  So check
                # the error message in stderr output.
                f.seek(0)
                if f.read().decode('utf-8').find(
                        'Response Verify Failure') != -1:
                    continue
                sys.stderr.write('verify OK (used: {})\n'.format(extra))
                return True

    sys.stderr.write(read_file(verify_fn).decode('utf-8'))
    return False


def fetch_ocsp_response(cmd, cert_fn, tempdir, issuer_fn=None):
    openssl_version = detect_openssl_version(cmd)

    sys.stderr.write(
        'fetch-ocsp-response (using {})\n'.format(openssl_version))

    ocsp_uri = extract_ocsp_uri(cmd, cert_fn)
    ocsp_host = urlparse(ocsp_uri).netloc

    if not issuer_fn:
        issuer_fn = os.path.join(tempdir, 'issuer.crt')
        save_issuer_certificate(issuer_fn, cert_fn)

    respder_fn = os.path.join(tempdir, 'resp.der')
    resp = send_and_receive_ocsp(
        respder_fn, cmd, cert_fn, issuer_fn, ocsp_uri, ocsp_host,
        openssl_version)

    sys.stderr.write('{}\n'.format(resp))

    # OpenSSL 1.0.2 still returns exit code 0 even if ocsp responder
    # returned error status (e.g., trylater(3))
    if resp.find('Responder Error:') != -1:
        raise Exception('responder returned error')

    if not verify_response(cmd, tempdir, issuer_fn, respder_fn):
        tempfail('failed to verify the response')

    # success
    res = read_file(respder_fn)
    stdout_bwrite(res)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description=
        '''The command issues an OCSP request for given server certificate, verifies the response and prints the resulting DER.''',
        epilog=
        '''The command exits 0 if successful, or 75 (EX_TEMPFAIL) on temporary error.  Other exit codes may be returned in case of hard errors.''')
    parser.add_argument(
        '--issuer',
        metavar='FILE',
        help=
        'issuer certificate (if omitted, is extracted from the certificate chain)')
    parser.add_argument('--openssl',
                        metavar='CMD',
                        help='openssl command to use (default: "openssl")',
                        default='openssl')
    parser.add_argument('certificate',
                        help='path to certificate file to validate')
    args = parser.parse_args()

    tempdir = None
    try:
        # Python3.2 has tempfile.TemporaryDirectory, which has nice
        # feature to delete its tree by cleanup() function.  We have
        # to support Python2.7, so we have to do this manually.
        tempdir = tempfile.mkdtemp()
        fetch_ocsp_response(args.openssl, args.certificate, tempdir,
                            args.issuer)
    finally:
        if tempdir:
            shutil.rmtree(tempdir)
doc/nghttp2/README.rst000064400000140676150340274550010411 0ustar00nghttp2 - HTTP/2 C Library
==========================

This is an implementation of the Hypertext Transfer Protocol version 2
in C.

The framing layer of HTTP/2 is implemented as a reusable C library.
On top of that, we have implemented an HTTP/2 client, server and
proxy.  We have also developed load test and benchmarking tools for
HTTP/2.

An HPACK encoder and decoder are available as a public API.

Development Status
------------------

nghttp2 was originally developed based on `RFC 7540
<https://tools.ietf.org/html/rfc7540>`_ HTTP/2 and `RFC 7541
<https://tools.ietf.org/html/rfc7541>`_ HPACK - Header Compression for
HTTP/2.  Now we are updating our code to implement `RFC 9113
<https://datatracker.ietf.org/doc/html/rfc9113>`_.

The nghttp2 code base was forked from the spdylay
(https://github.com/tatsuhiro-t/spdylay) project.

Public Test Server
------------------

The following endpoints are available to try out our nghttp2
implementation.

* https://nghttp2.org/ (TLS + ALPN and HTTP/3)

  This endpoint supports ``h2``, ``h2-16``, ``h2-14``, and
  ``http/1.1`` via ALPN and requires TLSv1.2 for HTTP/2
  connection.

  It also supports HTTP/3.

* http://nghttp2.org/ (HTTP Upgrade and HTTP/2 Direct)

  ``h2c`` and ``http/1.1``.

Requirements
------------

The following package is required to build the libnghttp2 library:

* pkg-config >= 0.20

To build the documentation, you need to install:

* sphinx (http://sphinx-doc.org/)

If you need libnghttp2 (C library) only, then the above packages are
all you need.  Use ``--enable-lib-only`` to ensure that only
libnghttp2 is built.  This avoids potential build error related to
building bundled applications.

To build and run the application programs (``nghttp``, ``nghttpd``,
``nghttpx`` and ``h2load``) in the ``src`` directory, the following packages
are required:

* OpenSSL >= 1.1.1; or wolfSSL >= 5.7.0; or LibreSSL >= 3.8.1; or
  aws-lc >= 1.19.0; or BoringSSL
* libev >= 4.11
* zlib >= 1.2.3
* libc-ares >= 1.7.5

To enable ``-a`` option (getting linked assets from the downloaded
resource) in ``nghttp``, the following package is required:

* libxml2 >= 2.6.26

To enable systemd support in nghttpx, the following package is
required:

* libsystemd-dev >= 209

The HPACK tools require the following package:

* jansson >= 2.5

To build sources under the examples directory, libevent is required:

* libevent-openssl >= 2.0.8

To mitigate heap fragmentation in long running server programs
(``nghttpd`` and ``nghttpx``), jemalloc is recommended:

* jemalloc

  .. note::

     Alpine Linux currently does not support malloc replacement
     due to musl limitations. See details in issue `#762 <https://github.com/nghttp2/nghttp2/issues/762>`_.

For BoringSSL or aws-lc build, to enable :rfc:`8879` TLS Certificate
Compression in applications, the following library is required:

* libbrotli-dev >= 1.0.9

To enable mruby support for nghttpx, `mruby
<https://github.com/mruby/mruby>`_ is required.  We need to build
mruby with C++ ABI explicitly turned on, and probably need other
mrgems, mruby is managed by git submodule under third-party/mruby
directory.  Currently, mruby support for nghttpx is disabled by
default.  To enable mruby support, use ``--with-mruby`` configure
option.  Note that at the time of this writing, libmruby-dev and mruby
packages in Debian/Ubuntu are not usable for nghttp2, since they do
not enable C++ ABI.  To build mruby, the following packages are
required:

* ruby
* bison

nghttpx supports `neverbleed <https://github.com/h2o/neverbleed>`_,
privilege separation engine for OpenSSL.  In short, it minimizes the
risk of private key leakage when serious bug like Heartbleed is
exploited.  The neverbleed is disabled by default.  To enable it, use
``--with-neverbleed`` configure option.

To enable the experimental HTTP/3 support for h2load and nghttpx, the
following libraries are required:

* `OpenSSL with QUIC support
  <https://github.com/quictls/openssl/tree/OpenSSL_1_1_1w+quic>`_; or
  wolfSSL; or LibreSSL (does not support 0RTT); or aws-lc; or
  `BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit
  294ab9730c570213b496cfc2fc14b3c0bfcd4bcc)
* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 1.4.0
* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 1.1.0

Use ``--enable-http3`` configure option to enable HTTP/3 feature for
h2load and nghttpx.

In order to build optional eBPF program to direct an incoming QUIC UDP
datagram to a correct socket for nghttpx, the following libraries are
required:

* libbpf-dev >= 0.7.0

Use ``--with-libbpf`` configure option to build eBPF program.
libelf-dev is needed to build libbpf.

For Ubuntu 20.04, you can build libbpf from `the source code
<https://github.com/libbpf/libbpf/releases>`_.  nghttpx requires eBPF
program for reloading its configuration and hot swapping its
executable.

Compiling libnghttp2 C source code requires a C99 compiler.  gcc 4.8
is known to be adequate.  In order to compile the C++ source code,
C++20 compliant compiler is required.  At least g++ >= 12 and
clang++ >= 15 are known to work.

.. note::

   To enable mruby support in nghttpx, and use ``--with-mruby``
   configure option.

.. note::

   Mac OS X users may need the ``--disable-threads`` configure option to
   disable multi-threading in nghttpd, nghttpx and h2load to prevent
   them from crashing. A patch is welcome to make multi threading work
   on Mac OS X platform.

.. note::

   To compile the associated applications (nghttp, nghttpd, nghttpx
   and h2load), you must use the ``--enable-app`` configure option and
   ensure that the specified requirements above are met.  Normally,
   configure script checks required dependencies to build these
   applications, and enable ``--enable-app`` automatically, so you
   don't have to use it explicitly.  But if you found that
   applications were not built, then using ``--enable-app`` may find
   that cause, such as the missing dependency.

.. note::

   In order to detect third party libraries, pkg-config is used
   (however we don't use pkg-config for some libraries (e.g., libev)).
   By default, pkg-config searches ``*.pc`` file in the standard
   locations (e.g., /usr/lib/pkgconfig).  If it is necessary to use
   ``*.pc`` file in the custom location, specify paths to
   ``PKG_CONFIG_PATH`` environment variable, and pass it to configure
   script, like so:

   .. code-block:: text

       $ ./configure PKG_CONFIG_PATH=/path/to/pkgconfig

   For pkg-config managed libraries, ``*_CFLAG`` and ``*_LIBS``
   environment variables are defined (e.g., ``OPENSSL_CFLAGS``,
   ``OPENSSL_LIBS``).  Specifying non-empty string to these variables
   completely overrides pkg-config.  In other words, if they are
   specified, pkg-config is not used for detection, and user is
   responsible to specify the correct values to these variables.  For
   complete list of these variables, run ``./configure -h``.

If you are using Ubuntu 22.04 LTS, run the following to install the
required packages:

.. code-block:: text

    sudo apt-get install g++ clang make binutils autoconf automake \
      autotools-dev libtool pkg-config \
      zlib1g-dev libssl-dev libxml2-dev libev-dev \
      libevent-dev libjansson-dev \
      libc-ares-dev libjemalloc-dev libsystemd-dev \
      ruby-dev bison libelf-dev

Building nghttp2 from release tar archive
-----------------------------------------

The nghttp2 project regularly releases tar archives which includes
nghttp2 source code, and generated build files.  They can be
downloaded from `Releases
<https://github.com/nghttp2/nghttp2/releases>`_ page.

Building nghttp2 from git requires autotools development packages.
Building from tar archives does not require them, and thus it is much
easier.  The usual build step is as follows:

.. code-block:: text

    $ tar xf nghttp2-X.Y.Z.tar.bz2
    $ cd nghttp2-X.Y.Z
    $ ./configure
    $ make

Building from git
-----------------

Building from git is easy, but please be sure that at least autoconf 2.68 is
used:

.. code-block:: text

    $ git submodule update --init
    $ autoreconf -i
    $ automake
    $ autoconf
    $ ./configure
    $ make

Notes for building on Windows (MSVC)
------------------------------------

The easiest way to build native Windows nghttp2 dll is use `cmake
<https://cmake.org/>`_.  The free version of `Visual C++ Build Tools
<http://landinghub.visualstudio.com/visual-cpp-build-tools>`_ works
fine.

1. Install cmake for windows
2. Open "Visual C++ ... Native Build Tool Command Prompt", and inside
   nghttp2 directly, run ``cmake``.
3. Then run ``cmake --build`` to build library.
4. nghttp2.dll, nghttp2.lib, nghttp2.exp are placed under lib directory.

Note that the above steps most likely produce nghttp2 library only.
No bundled applications are compiled.

Notes for building on Windows (Mingw/Cygwin)
--------------------------------------------

Under Mingw environment, you can only compile the library, it's
``libnghttp2-X.dll`` and ``libnghttp2.a``.

If you want to compile the applications(``h2load``, ``nghttp``,
``nghttpx``, ``nghttpd``), you need to use the Cygwin environment.

Under Cygwin environment, to compile the applications you need to
compile and install the libev first.

Secondly, you need to undefine the macro ``__STRICT_ANSI__``, if you
not, the functions ``fdopen``, ``fileno`` and ``strptime`` will not
available.

the sample command like this:

.. code-block:: text

    $ export CFLAGS="-U__STRICT_ANSI__ -I$libev_PREFIX/include -L$libev_PREFIX/lib"
    $ export CXXFLAGS=$CFLAGS
    $ ./configure
    $ make

If you want to compile the applications under ``examples/``, you need
to remove or rename the ``event.h`` from libev's installation, because
it conflicts with libevent's installation.

Notes for installation on Linux systems
--------------------------------------------
After installing nghttp2 tool suite with ``make install`` one might experience a similar error:

.. code-block:: text

    nghttpx: error while loading shared libraries: libnghttp2.so.14: cannot open shared object file: No such file or directory

This means that the tool is unable to locate the ``libnghttp2.so`` shared library.

To update the shared library cache run ``sudo ldconfig``.

Building the documentation
--------------------------

.. note::

   Documentation is still incomplete.

To build the documentation, run:

.. code-block:: text

    $ make html

The documents will be generated under ``doc/manual/html/``.

The generated documents will not be installed with ``make install``.

The online documentation is available at
https://nghttp2.org/documentation/

Build HTTP/3 enabled h2load and nghttpx
---------------------------------------

To build h2load and nghttpx with HTTP/3 feature enabled, run the
configure script with ``--enable-http3``.

For nghttpx to reload configurations and swapping its executable while
gracefully terminating old worker processes, eBPF is required.  Run
the configure script with ``--enable-http3 --with-libbpf`` to build
eBPF program.  The QUIC keying material must be set with
``--frontend-quic-secret-file`` in order to keep the existing
connections alive during reload.

The detailed steps to build HTTP/3 enabled h2load and nghttpx follow.

Build aws-lc:

.. code-block:: text

   $ git clone --depth 1 -b v1.46.1 https://github.com/aws/aws-lc
   $ cd aws-lc
   $ cmake -B build -DDISABLE_GO=ON --install-prefix=$PWD/opt
   $ make -j$(nproc) -C build
   $ cmake --install build
   $ cd ..

Build nghttp3:

.. code-block:: text

   $ git clone --depth 1 -b v1.8.0 https://github.com/ngtcp2/nghttp3
   $ cd nghttp3
   $ git submodule update --init --depth 1
   $ autoreconf -i
   $ ./configure --prefix=$PWD/build --enable-lib-only
   $ make -j$(nproc)
   $ make install
   $ cd ..

Build ngtcp2:

.. code-block:: text

   $ git clone --depth 1 -b v1.11.0 https://github.com/ngtcp2/ngtcp2
   $ cd ngtcp2
   $ git submodule update --init --depth 1
   $ autoreconf -i
   $ ./configure --prefix=$PWD/build --enable-lib-only --with-boringssl \
         BORINGSSL_CFLAGS="-I$PWD/../aws-lc/opt/include" \
         BORINGSSL_LIBS="-L$PWD/../aws-lc/opt/lib -lssl -lcrypto"
   $ make -j$(nproc)
   $ make install
   $ cd ..

If your Linux distribution does not have libbpf-dev >= 0.7.0, build
from source:

.. code-block:: text

   $ git clone --depth 1 -b v1.5.0 https://github.com/libbpf/libbpf
   $ cd libbpf
   $ PREFIX=$PWD/build make -C src install
   $ cd ..

Build nghttp2:

.. code-block:: text

   $ git clone https://github.com/nghttp2/nghttp2
   $ cd nghttp2
   $ git submodule update --init
   $ autoreconf -i
   $ ./configure --with-mruby --enable-http3 --with-libbpf \
         CC=clang-15 CXX=clang++-15 \
         PKG_CONFIG_PATH="$PWD/../aws-lc/opt/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig:$PWD/../ngtcp2/build/lib/pkgconfig:$PWD/../libbpf/build/lib64/pkgconfig" \
         LDFLAGS="$LDFLAGS -Wl,-rpath,$PWD/../aws-lc/opt/lib -Wl,-rpath,$PWD/../libbpf/build/lib64"
   $ make -j$(nproc)

The eBPF program ``reuseport_kern.o`` should be found under bpf
directory.  Pass ``--quic-bpf-program-file=bpf/reuseport_kern.o``
option to nghttpx to load it.  See also `HTTP/3 section in nghttpx -
HTTP/2 proxy - HOW-TO
<https://nghttp2.org/documentation/nghttpx-howto.html#http-3>`_.

Unit tests
----------

Unit tests are done by simply running ``make check``.

Integration tests
-----------------

We have the integration tests for the nghttpx proxy server.  The tests are
written in the `Go programming language <http://golang.org/>`_ and uses
its testing framework.  We depend on the following libraries:

* golang.org/x/net/http2
* golang.org/x/net/websocket
* https://github.com/tatsuhiro-t/go-nghttp2

Go modules will download these dependencies automatically.

To run the tests, run the following command under
``integration-tests`` directory:

.. code-block:: text

    $ make it

Inside the tests, we use port 3009 to run the test subject server.

Migration from v0.7.15 or earlier
---------------------------------

nghttp2 v1.0.0 introduced several backward incompatible changes.  In
this section, we describe these changes and how to migrate to v1.0.0.

ALPN protocol ID is now ``h2`` and ``h2c``
++++++++++++++++++++++++++++++++++++++++++

Previously we announced ``h2-14`` and ``h2c-14``.  v1.0.0 implements
final protocol version, and we changed ALPN ID to ``h2`` and ``h2c``.
The macros ``NGHTTP2_PROTO_VERSION_ID``,
``NGHTTP2_PROTO_VERSION_ID_LEN``,
``NGHTTP2_CLEARTEXT_PROTO_VERSION_ID``, and
``NGHTTP2_CLEARTEXT_PROTO_VERSION_ID_LEN`` have been updated to
reflect this change.

Basically, existing applications do not have to do anything, just
recompiling is enough for this change.

Use word "client magic" where we use "client connection preface"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

We use "client connection preface" to mean first 24 bytes of client
connection preface.  This is technically not correct, since client
connection preface is composed of 24 bytes client magic byte string
followed by SETTINGS frame.  For clarification, we call "client magic"
for this 24 bytes byte string and updated API.

* ``NGHTTP2_CLIENT_CONNECTION_PREFACE`` was replaced with
  ``NGHTTP2_CLIENT_MAGIC``.
* ``NGHTTP2_CLIENT_CONNECTION_PREFACE_LEN`` was replaced with
  ``NGHTTP2_CLIENT_MAGIC_LEN``.
* ``NGHTTP2_BAD_PREFACE`` was renamed as ``NGHTTP2_BAD_CLIENT_MAGIC``

The already deprecated ``NGHTTP2_CLIENT_CONNECTION_HEADER`` and
``NGHTTP2_CLIENT_CONNECTION_HEADER_LEN`` were removed.

If application uses these macros, just replace old ones with new ones.
Since v1.0.0, client magic is sent by library (see next subsection),
so client application may just remove these macro use.

Client magic is sent by library
+++++++++++++++++++++++++++++++

Previously nghttp2 library did not send client magic, which is first
24 bytes byte string of client connection preface, and client
applications have to send it by themselves.  Since v1.0.0, client
magic is sent by library via first call of ``nghttp2_session_send()``
or ``nghttp2_session_mem_send2()``.

The client applications which send client magic must remove the
relevant code.

Remove HTTP Alternative Services (Alt-Svc) related code
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Alt-Svc specification is not finalized yet.  To make our API stable,
we have decided to remove all Alt-Svc related API from nghttp2.

* ``NGHTTP2_EXT_ALTSVC`` was removed.
* ``nghttp2_ext_altsvc`` was removed.

We have already removed the functionality of Alt-Svc in v0.7 series
and they have been essentially noop.  The application using these
macro and struct, remove those lines.

Use nghttp2_error in nghttp2_on_invalid_frame_recv_callback
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Previously ``nghttp2_on_invalid_frame_recv_cb_called`` took the
``error_code``, defined in ``nghttp2_error_code``, as parameter.  But
they are not detailed enough to debug.  Therefore, we decided to use
more detailed ``nghttp2_error`` values instead.

The application using this callback should update the callback
signature.  If it treats ``error_code`` as HTTP/2 error code, update
the code so that it is treated as ``nghttp2_error``.

Receive client magic by default
+++++++++++++++++++++++++++++++

Previously nghttp2 did not process client magic (24 bytes byte
string).  To make it deal with it, we had to use
``nghttp2_option_set_recv_client_preface()``.  Since v1.0.0, nghttp2
processes client magic by default and
``nghttp2_option_set_recv_client_preface()`` was removed.

Some application may want to disable this behaviour, so we added
``nghttp2_option_set_no_recv_client_magic()`` to achieve this.

The application using ``nghttp2_option_set_recv_client_preface()``
with nonzero value, just remove it.

The application using ``nghttp2_option_set_recv_client_preface()``
with zero value or not using it must use
``nghttp2_option_set_no_recv_client_magic()`` with nonzero value.

Client, Server and Proxy programs
---------------------------------

The ``src`` directory contains the HTTP/2 client, server and proxy programs.

nghttp - client
+++++++++++++++

``nghttp`` is a HTTP/2 client.  It can connect to the HTTP/2 server
with prior knowledge, HTTP Upgrade and ALPN TLS extension.

It has verbose output mode for framing information.  Here is sample
output from ``nghttp`` client:

.. code-block:: text

    $ nghttp -nv https://nghttp2.org
    [  0.190] Connected
    The negotiated protocol: h2
    [  0.212] recv SETTINGS frame <length=12, flags=0x00, stream_id=0>
	      (niv=2)
	      [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
	      [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535]
    [  0.212] send SETTINGS frame <length=12, flags=0x00, stream_id=0>
	      (niv=2)
	      [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
	      [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535]
    [  0.212] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
	      ; ACK
	      (niv=0)
    [  0.212] send PRIORITY frame <length=5, flags=0x00, stream_id=3>
	      (dep_stream_id=0, weight=201, exclusive=0)
    [  0.212] send PRIORITY frame <length=5, flags=0x00, stream_id=5>
	      (dep_stream_id=0, weight=101, exclusive=0)
    [  0.212] send PRIORITY frame <length=5, flags=0x00, stream_id=7>
	      (dep_stream_id=0, weight=1, exclusive=0)
    [  0.212] send PRIORITY frame <length=5, flags=0x00, stream_id=9>
	      (dep_stream_id=7, weight=1, exclusive=0)
    [  0.212] send PRIORITY frame <length=5, flags=0x00, stream_id=11>
	      (dep_stream_id=3, weight=1, exclusive=0)
    [  0.212] send HEADERS frame <length=39, flags=0x25, stream_id=13>
	      ; END_STREAM | END_HEADERS | PRIORITY
	      (padlen=0, dep_stream_id=11, weight=16, exclusive=0)
	      ; Open new stream
	      :method: GET
	      :path: /
	      :scheme: https
	      :authority: nghttp2.org
	      accept: */*
	      accept-encoding: gzip, deflate
	      user-agent: nghttp2/1.0.1-DEV
    [  0.221] recv SETTINGS frame <length=0, flags=0x01, stream_id=0>
	      ; ACK
	      (niv=0)
    [  0.221] recv (stream_id=13) :method: GET
    [  0.221] recv (stream_id=13) :scheme: https
    [  0.221] recv (stream_id=13) :path: /stylesheets/screen.css
    [  0.221] recv (stream_id=13) :authority: nghttp2.org
    [  0.221] recv (stream_id=13) accept-encoding: gzip, deflate
    [  0.222] recv (stream_id=13) user-agent: nghttp2/1.0.1-DEV
    [  0.222] recv PUSH_PROMISE frame <length=50, flags=0x04, stream_id=13>
	      ; END_HEADERS
	      (padlen=0, promised_stream_id=2)
    [  0.222] recv (stream_id=13) :status: 200
    [  0.222] recv (stream_id=13) date: Thu, 21 May 2015 16:38:14 GMT
    [  0.222] recv (stream_id=13) content-type: text/html
    [  0.222] recv (stream_id=13) last-modified: Fri, 15 May 2015 15:38:06 GMT
    [  0.222] recv (stream_id=13) etag: W/"555612de-19f6"
    [  0.222] recv (stream_id=13) link: </stylesheets/screen.css>; rel=preload; as=stylesheet
    [  0.222] recv (stream_id=13) content-encoding: gzip
    [  0.222] recv (stream_id=13) server: nghttpx nghttp2/1.0.1-DEV
    [  0.222] recv (stream_id=13) via: 1.1 nghttpx
    [  0.222] recv (stream_id=13) strict-transport-security: max-age=31536000
    [  0.222] recv HEADERS frame <length=166, flags=0x04, stream_id=13>
	      ; END_HEADERS
	      (padlen=0)
	      ; First response header
    [  0.222] recv DATA frame <length=2601, flags=0x01, stream_id=13>
	      ; END_STREAM
    [  0.222] recv (stream_id=2) :status: 200
    [  0.222] recv (stream_id=2) date: Thu, 21 May 2015 16:38:14 GMT
    [  0.222] recv (stream_id=2) content-type: text/css
    [  0.222] recv (stream_id=2) last-modified: Fri, 15 May 2015 15:38:06 GMT
    [  0.222] recv (stream_id=2) etag: W/"555612de-9845"
    [  0.222] recv (stream_id=2) content-encoding: gzip
    [  0.222] recv (stream_id=2) server: nghttpx nghttp2/1.0.1-DEV
    [  0.222] recv (stream_id=2) via: 1.1 nghttpx
    [  0.222] recv (stream_id=2) strict-transport-security: max-age=31536000
    [  0.222] recv HEADERS frame <length=32, flags=0x04, stream_id=2>
	      ; END_HEADERS
	      (padlen=0)
	      ; First push response header
    [  0.228] recv DATA frame <length=8715, flags=0x01, stream_id=2>
	      ; END_STREAM
    [  0.228] send GOAWAY frame <length=8, flags=0x00, stream_id=0>
	      (last_stream_id=2, error_code=NO_ERROR(0x00), opaque_data(0)=[])

The HTTP Upgrade is performed like so:

.. code-block:: text

    $ nghttp -nvu http://nghttp2.org
    [  0.011] Connected
    [  0.011] HTTP Upgrade request
    GET / HTTP/1.1
    Host: nghttp2.org
    Connection: Upgrade, HTTP2-Settings
    Upgrade: h2c
    HTTP2-Settings: AAMAAABkAAQAAP__
    Accept: */*
    User-Agent: nghttp2/1.0.1-DEV


    [  0.018] HTTP Upgrade response
    HTTP/1.1 101 Switching Protocols
    Connection: Upgrade
    Upgrade: h2c


    [  0.018] HTTP Upgrade success
    [  0.018] recv SETTINGS frame <length=12, flags=0x00, stream_id=0>
	      (niv=2)
	      [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
	      [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535]
    [  0.018] send SETTINGS frame <length=12, flags=0x00, stream_id=0>
	      (niv=2)
	      [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
	      [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535]
    [  0.018] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
	      ; ACK
	      (niv=0)
    [  0.018] send PRIORITY frame <length=5, flags=0x00, stream_id=3>
	      (dep_stream_id=0, weight=201, exclusive=0)
    [  0.018] send PRIORITY frame <length=5, flags=0x00, stream_id=5>
	      (dep_stream_id=0, weight=101, exclusive=0)
    [  0.018] send PRIORITY frame <length=5, flags=0x00, stream_id=7>
	      (dep_stream_id=0, weight=1, exclusive=0)
    [  0.018] send PRIORITY frame <length=5, flags=0x00, stream_id=9>
	      (dep_stream_id=7, weight=1, exclusive=0)
    [  0.018] send PRIORITY frame <length=5, flags=0x00, stream_id=11>
	      (dep_stream_id=3, weight=1, exclusive=0)
    [  0.018] send PRIORITY frame <length=5, flags=0x00, stream_id=1>
	      (dep_stream_id=11, weight=16, exclusive=0)
    [  0.019] recv (stream_id=1) :method: GET
    [  0.019] recv (stream_id=1) :scheme: http
    [  0.019] recv (stream_id=1) :path: /stylesheets/screen.css
    [  0.019] recv (stream_id=1) host: nghttp2.org
    [  0.019] recv (stream_id=1) user-agent: nghttp2/1.0.1-DEV
    [  0.019] recv PUSH_PROMISE frame <length=49, flags=0x04, stream_id=1>
	      ; END_HEADERS
	      (padlen=0, promised_stream_id=2)
    [  0.019] recv (stream_id=1) :status: 200
    [  0.019] recv (stream_id=1) date: Thu, 21 May 2015 16:39:16 GMT
    [  0.019] recv (stream_id=1) content-type: text/html
    [  0.019] recv (stream_id=1) content-length: 6646
    [  0.019] recv (stream_id=1) last-modified: Fri, 15 May 2015 15:38:06 GMT
    [  0.019] recv (stream_id=1) etag: "555612de-19f6"
    [  0.019] recv (stream_id=1) link: </stylesheets/screen.css>; rel=preload; as=stylesheet
    [  0.019] recv (stream_id=1) accept-ranges: bytes
    [  0.019] recv (stream_id=1) server: nghttpx nghttp2/1.0.1-DEV
    [  0.019] recv (stream_id=1) via: 1.1 nghttpx
    [  0.019] recv HEADERS frame <length=157, flags=0x04, stream_id=1>
	      ; END_HEADERS
	      (padlen=0)
	      ; First response header
    [  0.019] recv DATA frame <length=6646, flags=0x01, stream_id=1>
	      ; END_STREAM
    [  0.019] recv (stream_id=2) :status: 200
    [  0.019] recv (stream_id=2) date: Thu, 21 May 2015 16:39:16 GMT
    [  0.019] recv (stream_id=2) content-type: text/css
    [  0.019] recv (stream_id=2) content-length: 38981
    [  0.019] recv (stream_id=2) last-modified: Fri, 15 May 2015 15:38:06 GMT
    [  0.019] recv (stream_id=2) etag: "555612de-9845"
    [  0.019] recv (stream_id=2) accept-ranges: bytes
    [  0.019] recv (stream_id=2) server: nghttpx nghttp2/1.0.1-DEV
    [  0.019] recv (stream_id=2) via: 1.1 nghttpx
    [  0.019] recv HEADERS frame <length=36, flags=0x04, stream_id=2>
	      ; END_HEADERS
	      (padlen=0)
	      ; First push response header
    [  0.026] recv DATA frame <length=16384, flags=0x00, stream_id=2>
    [  0.027] recv DATA frame <length=7952, flags=0x00, stream_id=2>
    [  0.027] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
	      (window_size_increment=33343)
    [  0.032] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=2>
	      (window_size_increment=33707)
    [  0.032] recv DATA frame <length=14645, flags=0x01, stream_id=2>
	      ; END_STREAM
    [  0.032] recv SETTINGS frame <length=0, flags=0x01, stream_id=0>
	      ; ACK
	      (niv=0)
    [  0.032] send GOAWAY frame <length=8, flags=0x00, stream_id=0>
	      (last_stream_id=2, error_code=NO_ERROR(0x00), opaque_data(0)=[])

Using the ``-s`` option, ``nghttp`` prints out some timing information for
requests, sorted by completion time:

.. code-block:: text

    $ nghttp -nas https://nghttp2.org/
    ***** Statistics *****

    Request timing:
      responseEnd: the  time  when  last  byte of  response  was  received
                   relative to connectEnd
     requestStart: the time  just before  first byte  of request  was sent
                   relative  to connectEnd.   If  '*' is  shown, this  was
                   pushed by server.
          process: responseEnd - requestStart
             code: HTTP status code
             size: number  of  bytes  received as  response  body  without
                   inflation.
              URI: request URI

    see http://www.w3.org/TR/resource-timing/#processing-model

    sorted by 'complete'

    id  responseEnd requestStart  process code size request path
     13    +37.19ms       +280us  36.91ms  200   2K /
      2    +72.65ms *   +36.38ms  36.26ms  200   8K /stylesheets/screen.css
     17    +77.43ms     +38.67ms  38.75ms  200   3K /javascripts/octopress.js
     15    +78.12ms     +38.66ms  39.46ms  200   3K /javascripts/modernizr-2.0.js

Using the ``-r`` option, ``nghttp`` writes more detailed timing data to
the given file in HAR format.

nghttpd - server
++++++++++++++++

``nghttpd`` is a multi-threaded static web server.

By default, it uses SSL/TLS connection.  Use ``--no-tls`` option to
disable it.

``nghttpd`` only accepts HTTP/2 connections via ALPN or direct HTTP/2
connections.  No HTTP Upgrade is supported.

The ``-p`` option allows users to configure server push.

Just like ``nghttp``, it has a verbose output mode for framing
information.  Here is sample output from ``nghttpd``:

.. code-block:: text

    $ nghttpd --no-tls -v 8080
    IPv4: listen 0.0.0.0:8080
    IPv6: listen :::8080
    [id=1] [  1.521] send SETTINGS frame <length=6, flags=0x00, stream_id=0>
              (niv=1)
              [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
    [id=1] [  1.521] recv SETTINGS frame <length=12, flags=0x00, stream_id=0>
              (niv=2)
              [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
              [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535]
    [id=1] [  1.521] recv SETTINGS frame <length=0, flags=0x01, stream_id=0>
              ; ACK
              (niv=0)
    [id=1] [  1.521] recv PRIORITY frame <length=5, flags=0x00, stream_id=3>
              (dep_stream_id=0, weight=201, exclusive=0)
    [id=1] [  1.521] recv PRIORITY frame <length=5, flags=0x00, stream_id=5>
              (dep_stream_id=0, weight=101, exclusive=0)
    [id=1] [  1.521] recv PRIORITY frame <length=5, flags=0x00, stream_id=7>
              (dep_stream_id=0, weight=1, exclusive=0)
    [id=1] [  1.521] recv PRIORITY frame <length=5, flags=0x00, stream_id=9>
              (dep_stream_id=7, weight=1, exclusive=0)
    [id=1] [  1.521] recv PRIORITY frame <length=5, flags=0x00, stream_id=11>
              (dep_stream_id=3, weight=1, exclusive=0)
    [id=1] [  1.521] recv (stream_id=13) :method: GET
    [id=1] [  1.521] recv (stream_id=13) :path: /
    [id=1] [  1.521] recv (stream_id=13) :scheme: http
    [id=1] [  1.521] recv (stream_id=13) :authority: localhost:8080
    [id=1] [  1.521] recv (stream_id=13) accept: */*
    [id=1] [  1.521] recv (stream_id=13) accept-encoding: gzip, deflate
    [id=1] [  1.521] recv (stream_id=13) user-agent: nghttp2/1.0.0-DEV
    [id=1] [  1.521] recv HEADERS frame <length=41, flags=0x25, stream_id=13>
              ; END_STREAM | END_HEADERS | PRIORITY
              (padlen=0, dep_stream_id=11, weight=16, exclusive=0)
              ; Open new stream
    [id=1] [  1.521] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
              ; ACK
              (niv=0)
    [id=1] [  1.521] send HEADERS frame <length=86, flags=0x04, stream_id=13>
              ; END_HEADERS
              (padlen=0)
              ; First response header
              :status: 200
              server: nghttpd nghttp2/1.0.0-DEV
              content-length: 10
              cache-control: max-age=3600
              date: Fri, 15 May 2015 14:49:04 GMT
              last-modified: Tue, 30 Sep 2014 12:40:52 GMT
    [id=1] [  1.522] send DATA frame <length=10, flags=0x01, stream_id=13>
              ; END_STREAM
    [id=1] [  1.522] stream_id=13 closed
    [id=1] [  1.522] recv GOAWAY frame <length=8, flags=0x00, stream_id=0>
              (last_stream_id=0, error_code=NO_ERROR(0x00), opaque_data(0)=[])
    [id=1] [  1.522] closed

nghttpx - proxy
+++++++++++++++

``nghttpx`` is a multi-threaded reverse proxy for HTTP/3, HTTP/2, and
HTTP/1.1, and powers http://nghttp2.org and supports HTTP/2 server
push.

We reworked ``nghttpx`` command-line interface, and as a result, there
are several incompatibles from 1.8.0 or earlier.  This is necessary to
extend its capability, and secure the further feature enhancements in
the future release.  Please read `Migration from nghttpx v1.8.0 or
earlier
<https://nghttp2.org/documentation/nghttpx-howto.html#migration-from-nghttpx-v1-8-0-or-earlier>`_
to know how to migrate from earlier releases.

``nghttpx`` implements `important performance-oriented features
<https://istlsfastyet.com/#server-performance>`_ in TLS, such as
session IDs, session tickets (with automatic key rotation), OCSP
stapling, dynamic record sizing, ALPN, forward secrecy and HTTP/2.
``nghttpx`` also offers the functionality to share session cache and
ticket keys among multiple ``nghttpx`` instances via memcached.

``nghttpx`` has 2 operation modes:

================== ======================== ================ =============
Mode option        Frontend                 Backend          Note
================== ======================== ================ =============
default mode       HTTP/3, HTTP/2, HTTP/1.1 HTTP/1.1, HTTP/2 Reverse proxy
``--http2-proxy``  HTTP/3, HTTP/2, HTTP/1.1 HTTP/1.1, HTTP/2 Forward proxy
================== ======================== ================ =============

The interesting mode at the moment is the default mode.  It works like
a reverse proxy and listens for HTTP/3, HTTP/2, and HTTP/1.1 and can
be deployed as a SSL/TLS terminator for existing web server.

In all modes, the frontend connections are encrypted by SSL/TLS by
default.  To disable encryption, use the ``no-tls`` keyword in
``--frontend`` option.  If encryption is disabled, incoming HTTP/1.1
connections can be upgraded to HTTP/2 through HTTP Upgrade.  On the
other hard, backend connections are not encrypted by default.  To
encrypt backend connections, use ``tls`` keyword in ``--backend``
option.

``nghttpx`` supports a configuration file.  See the ``--conf`` option and
sample configuration file ``nghttpx.conf.sample``.

In the default mode, ``nghttpx`` works as reverse proxy to the backend
server:

.. code-block:: text

    Client <-- (HTTP/3, HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1, HTTP/2) --> Web Server
                                            [reverse proxy]

With the ``--http2-proxy`` option, it works as forward proxy, and it
is so called secure HTTP/2 proxy:

.. code-block:: text

    Client <-- (HTTP/3, HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1) --> Proxy
                                             [secure proxy]          (e.g., Squid, ATS)

The ``Client`` in the above example needs to be configured to use
``nghttpx`` as secure proxy.

At the time of this writing, both Chrome and Firefox support secure
HTTP/2 proxy.  One way to configure Chrome to use a secure proxy is to
create a proxy.pac script like this:

.. code-block:: javascript

    function FindProxyForURL(url, host) {
        return "HTTPS SERVERADDR:PORT";
    }

``SERVERADDR`` and ``PORT`` is the hostname/address and port of the
machine nghttpx is running on.  Please note that Chrome requires a valid
certificate for secure proxy.

Then run Chrome with the following arguments:

.. code-block:: text

    $ google-chrome --proxy-pac-url=file:///path/to/proxy.pac --use-npn

The backend HTTP/2 connections can be tunneled through an HTTP proxy.
The proxy is specified using ``--backend-http-proxy-uri``.  The
following figure illustrates how nghttpx talks to the outside HTTP/2
proxy through an HTTP proxy:

.. code-block:: text

    Client <-- (HTTP/3, HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/2) --

            --===================---> HTTP/2 Proxy
              (HTTP proxy tunnel)     (e.g., nghttpx -s)

Benchmarking tool
-----------------

The ``h2load`` program is a benchmarking tool for HTTP/3, HTTP/2, and
HTTP/1.1.  The UI of ``h2load`` is heavily inspired by ``weighttp``
(https://github.com/lighttpd/weighttp).  The typical usage is as
follows:

.. code-block:: text

    $ h2load -n100000 -c100 -m100 https://localhost:8443/
    starting benchmark...
    spawning thread #0: 100 concurrent clients, 100000 total requests
    Protocol: TLSv1.2
    Cipher: ECDHE-RSA-AES128-GCM-SHA256
    Server Temp Key: ECDH P-256 256 bits
    progress: 10% done
    progress: 20% done
    progress: 30% done
    progress: 40% done
    progress: 50% done
    progress: 60% done
    progress: 70% done
    progress: 80% done
    progress: 90% done
    progress: 100% done

    finished in 771.26ms, 129658 req/s, 4.71MB/s
    requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
    status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
    traffic: 3812300 bytes total, 1009900 bytes headers, 1000000 bytes data
                         min         max         mean         sd        +/- sd
    time for request:    25.12ms    124.55ms     51.07ms     15.36ms    84.87%
    time for connect:   208.94ms    254.67ms    241.38ms      7.95ms    63.00%
    time to 1st byte:   209.11ms    254.80ms    241.51ms      7.94ms    63.00%

The above example issued total 100,000 requests, using 100 concurrent
clients (in other words, 100 HTTP/2 sessions), and a maximum of 100 streams
per client.  With the ``-t`` option, ``h2load`` will use multiple native
threads to avoid saturating a single core on client side.

.. warning::

   **Don't use this tool against publicly available servers.** That is
   considered a DOS attack.  Please only use it against your private
   servers.

If the experimental HTTP/3 is enabled, h2load can send requests to
HTTP/3 server.  To do this, specify ``h3`` to ``--alpn-list`` option
like so:

.. code-block:: text

    $ h2load --alpn-list h3 https://127.0.0.1:4433

For nghttp2 v1.58 or earlier, use ``--npn-list`` instead of
``--alpn-list``.

HPACK tools
-----------

The ``src`` directory contains the HPACK tools.  The ``deflatehd`` program is a
command-line header compression tool.  The ``inflatehd`` program is a
command-line header decompression tool.  Both tools read input from
stdin and write output to stdout.  Errors are written to stderr.
They take JSON as input and output.  We  (mostly) use the same JSON data
format described at https://github.com/http2jp/hpack-test-case.

deflatehd - header compressor
+++++++++++++++++++++++++++++

The ``deflatehd`` program reads JSON data or HTTP/1-style header fields from
stdin and outputs compressed header block in JSON.

For the JSON input, the root JSON object must include a ``cases`` key.
Its value has to include the sequence of input header set.  They share
the same compression context and are processed in the order they
appear.  Each item in the sequence is a JSON object and it must
include a ``headers`` key.  Its value is an array of JSON objects,
which includes exactly one name/value pair.

Example:

.. code-block:: json

    {
      "cases":
      [
        {
          "headers": [
            { ":method": "GET" },
            { ":path": "/" }
          ]
        },
        {
          "headers": [
            { ":method": "POST" },
            { ":path": "/" }
          ]
        }
      ]
    }


With the ``-t`` option, the program can accept more familiar HTTP/1 style
header field blocks.  Each header set is delimited by an empty line:

Example:

.. code-block:: text

    :method: GET
    :scheme: https
    :path: /

    :method: POST
    user-agent: nghttp2

The output is in JSON object.  It should include a ``cases`` key and its
value is an array of JSON objects, which has at least the following keys:

seq
    The index of header set in the input.

input_length
    The sum of the length of the name/value pairs in the input.

output_length
    The length of the compressed header block.

percentage_of_original_size
    ``output_length`` / ``input_length`` * 100

wire
    The compressed header block as a hex string.

headers
    The input header set.

header_table_size
    The header table size adjusted before deflating the header set.

Examples:

.. code-block:: json

    {
      "cases":
      [
        {
          "seq": 0,
          "input_length": 66,
          "output_length": 20,
          "percentage_of_original_size": 30.303030303030305,
          "wire": "01881f3468e5891afcbf83868a3d856659c62e3f",
          "headers": [
            {
              ":authority": "example.org"
            },
            {
              ":method": "GET"
            },
            {
              ":path": "/"
            },
            {
              ":scheme": "https"
            },
            {
              "user-agent": "nghttp2"
            }
          ],
          "header_table_size": 4096
        }
        ,
        {
          "seq": 1,
          "input_length": 74,
          "output_length": 10,
          "percentage_of_original_size": 13.513513513513514,
          "wire": "88448504252dd5918485",
          "headers": [
            {
              ":authority": "example.org"
            },
            {
              ":method": "POST"
            },
            {
              ":path": "/account"
            },
            {
              ":scheme": "https"
            },
            {
              "user-agent": "nghttp2"
            }
          ],
          "header_table_size": 4096
        }
      ]
    }


The output can be used as the input for ``inflatehd`` and
``deflatehd``.

With the ``-d`` option, the extra ``header_table`` key is added and its
associated value includes the state of dynamic header table after the
corresponding header set was processed.  The value includes at least
the following keys:

entries
    The entry in the header table.  If ``referenced`` is ``true``, it
    is in the reference set.  The ``size`` includes the overhead (32
    bytes).  The ``index`` corresponds to the index of header table.
    The ``name`` is the header field name and the ``value`` is the
    header field value.

size
    The sum of the spaces entries occupied, this includes the
    entry overhead.

max_size
    The maximum header table size.

deflate_size
    The sum of the spaces entries occupied within
    ``max_deflate_size``.

max_deflate_size
    The maximum header table size the encoder uses.  This can be smaller
    than ``max_size``.  In this case, the encoder only uses up to first
    ``max_deflate_size`` buffer.  Since the header table size is still
    ``max_size``, the encoder has to keep track of entries outside the
    ``max_deflate_size`` but inside the ``max_size`` and make sure
    that they are no longer referenced.

Example:

.. code-block:: json

    {
      "cases":
      [
        {
          "seq": 0,
          "input_length": 66,
          "output_length": 20,
          "percentage_of_original_size": 30.303030303030305,
          "wire": "01881f3468e5891afcbf83868a3d856659c62e3f",
          "headers": [
            {
              ":authority": "example.org"
            },
            {
              ":method": "GET"
            },
            {
              ":path": "/"
            },
            {
              ":scheme": "https"
            },
            {
              "user-agent": "nghttp2"
            }
          ],
          "header_table_size": 4096,
          "header_table": {
            "entries": [
              {
                "index": 1,
                "name": "user-agent",
                "value": "nghttp2",
                "referenced": true,
                "size": 49
              },
              {
                "index": 2,
                "name": ":scheme",
                "value": "https",
                "referenced": true,
                "size": 44
              },
              {
                "index": 3,
                "name": ":path",
                "value": "/",
                "referenced": true,
                "size": 38
              },
              {
                "index": 4,
                "name": ":method",
                "value": "GET",
                "referenced": true,
                "size": 42
              },
              {
                "index": 5,
                "name": ":authority",
                "value": "example.org",
                "referenced": true,
                "size": 53
              }
            ],
            "size": 226,
            "max_size": 4096,
            "deflate_size": 226,
            "max_deflate_size": 4096
          }
        }
        ,
        {
          "seq": 1,
          "input_length": 74,
          "output_length": 10,
          "percentage_of_original_size": 13.513513513513514,
          "wire": "88448504252dd5918485",
          "headers": [
            {
              ":authority": "example.org"
            },
            {
              ":method": "POST"
            },
            {
              ":path": "/account"
            },
            {
              ":scheme": "https"
            },
            {
              "user-agent": "nghttp2"
            }
          ],
          "header_table_size": 4096,
          "header_table": {
            "entries": [
              {
                "index": 1,
                "name": ":method",
                "value": "POST",
                "referenced": true,
                "size": 43
              },
              {
                "index": 2,
                "name": "user-agent",
                "value": "nghttp2",
                "referenced": true,
                "size": 49
              },
              {
                "index": 3,
                "name": ":scheme",
                "value": "https",
                "referenced": true,
                "size": 44
              },
              {
                "index": 4,
                "name": ":path",
                "value": "/",
                "referenced": false,
                "size": 38
              },
              {
                "index": 5,
                "name": ":method",
                "value": "GET",
                "referenced": false,
                "size": 42
              },
              {
                "index": 6,
                "name": ":authority",
                "value": "example.org",
                "referenced": true,
                "size": 53
              }
            ],
            "size": 269,
            "max_size": 4096,
            "deflate_size": 269,
            "max_deflate_size": 4096
          }
        }
      ]
    }

inflatehd - header decompressor
+++++++++++++++++++++++++++++++

The ``inflatehd`` program reads JSON data from stdin and outputs decompressed
name/value pairs in JSON.

The root JSON object must include the ``cases`` key.  Its value has to
include the sequence of compressed header blocks.  They share the same
compression context and are processed in the order they appear.  Each
item in the sequence is a JSON object and it must have at least a
``wire`` key.  Its value is a compressed header block as a hex string.

Example:

.. code-block:: json

    {
      "cases":
      [
        { "wire": "8285" },
        { "wire": "8583" }
      ]
    }

The output is a JSON object.  It should include a ``cases`` key and its
value is an array of JSON objects, which has at least following keys:

seq
    The index of the header set in the input.

headers
    A JSON array that includes decompressed name/value pairs.

wire
    The compressed header block as a hex string.

header_table_size
    The header table size adjusted before inflating compressed header
    block.

Example:

.. code-block:: json

    {
      "cases":
      [
        {
          "seq": 0,
          "wire": "01881f3468e5891afcbf83868a3d856659c62e3f",
          "headers": [
            {
              ":authority": "example.org"
            },
            {
              ":method": "GET"
            },
            {
              ":path": "/"
            },
            {
              ":scheme": "https"
            },
            {
              "user-agent": "nghttp2"
            }
          ],
          "header_table_size": 4096
        }
        ,
        {
          "seq": 1,
          "wire": "88448504252dd5918485",
          "headers": [
            {
              ":method": "POST"
            },
            {
              ":path": "/account"
            },
            {
              "user-agent": "nghttp2"
            },
            {
              ":scheme": "https"
            },
            {
              ":authority": "example.org"
            }
          ],
          "header_table_size": 4096
        }
      ]
    }

The output can be used as the input for ``deflatehd`` and
``inflatehd``.

With the ``-d`` option, the extra ``header_table`` key is added and its
associated value includes the state of the dynamic header table after the
corresponding header set was processed.  The format is the same as
``deflatehd``.

Contribution
------------

[This text was composed based on 1.2. License section of curl/libcurl
project.]

When contributing with code, you agree to put your changes and new
code under the same license nghttp2 is already using unless stated and
agreed otherwise.

When changing existing source code, do not alter the copyright of
the original file(s).  The copyright will still be owned by the
original creator(s) or those who have been assigned copyright by the
original author(s).

By submitting a patch to the nghttp2 project, you (or your employer, as
the case may be) agree to assign the copyright of your submission to us.
.. the above really needs to be reworded to pass legal muster.
We will credit you for your
changes as far as possible, to give credit but also to keep a trace
back to who made what changes.  Please always provide us with your
full real name when contributing!

See `Contribution Guidelines
<https://nghttp2.org/documentation/contribute.html>`_ for more
details.

Versioning
----------

In general, we follow `Semantic Versioning <http://semver.org/>`_.

We may release PATCH releases between the regular releases, mainly for
severe security bug fixes.

We have no plan to break API compatibility changes involving soname
bump, so MAJOR version will stay 1 for the foreseeable future.

License
-------

The MIT License
man/man1/bundle-gem.1000064400000012304150403121720010247 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-GEM" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
.SH "SYNOPSIS"
\fBbundle gem\fR \fIGEM_NAME\fR \fIOPTIONS\fR
.SH "DESCRIPTION"
Generates a directory named \fBGEM_NAME\fR with a \fBRakefile\fR, \fBGEM_NAME\.gemspec\fR, and other supporting files and directories that can be used to develop a rubygem with that name\.
.P
Run \fBrake \-T\fR in the resulting project for a list of Rake tasks that can be used to test and publish the gem to rubygems\.org\.
.P
The generated project skeleton can be customized with OPTIONS, as explained below\. Note that these options can also be specified via Bundler's global configuration file using the following names:
.IP "\(bu" 4
\fBgem\.coc\fR
.IP "\(bu" 4
\fBgem\.mit\fR
.IP "\(bu" 4
\fBgem\.test\fR
.IP "" 0
.SH "OPTIONS"
.IP "\(bu" 4
\fB\-\-exe\fR, \fB\-\-bin\fR, \fB\-b\fR: Specify that Bundler should create a binary executable (as \fBexe/GEM_NAME\fR) in the generated rubygem project\. This binary will also be added to the \fBGEM_NAME\.gemspec\fR manifest\. This behavior is disabled by default\.
.IP "\(bu" 4
\fB\-\-no\-exe\fR: Do not create a binary (overrides \fB\-\-exe\fR specified in the global config)\.
.IP "\(bu" 4
\fB\-\-coc\fR: Add a \fBCODE_OF_CONDUCT\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
.IP "\(bu" 4
\fB\-\-no\-coc\fR: Do not create a \fBCODE_OF_CONDUCT\.md\fR (overrides \fB\-\-coc\fR specified in the global config)\.
.IP "\(bu" 4
\fB\-\-changelog\fR Add a \fBCHANGELOG\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
.IP "\(bu" 4
\fB\-\-no\-changelog\fR: Do not create a \fBCHANGELOG\.md\fR (overrides \fB\-\-changelog\fR specified in the global config)\.
.IP "\(bu" 4
\fB\-\-ext=c\fR, \fB\-\-ext=rust\fR: Add boilerplate for C or Rust (currently magnus \fIhttps://docs\.rs/magnus\fR based) extension code to the generated project\. This behavior is disabled by default\.
.IP "\(bu" 4
\fB\-\-no\-ext\fR: Do not add extension code (overrides \fB\-\-ext\fR specified in the global config)\.
.IP "\(bu" 4
\fB\-\-git\fR: Initialize a git repo inside your library\.
.IP "\(bu" 4
\fB\-\-github\-username=GITHUB_USERNAME\fR: Fill in GitHub username on README so that you don't have to do it manually\. Set a default with \fBbundle config set \-\-global gem\.github_username <your_username>\fR\.
.IP "\(bu" 4
\fB\-\-mit\fR: Add an MIT license to a \fBLICENSE\.txt\fR file in the root of the generated project\. Your name from the global git config is used for the copyright statement\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
.IP "\(bu" 4
\fB\-\-no\-mit\fR: Do not create a \fBLICENSE\.txt\fR (overrides \fB\-\-mit\fR specified in the global config)\.
.IP "\(bu" 4
\fB\-t\fR, \fB\-\-test=minitest\fR, \fB\-\-test=rspec\fR, \fB\-\-test=test\-unit\fR: Specify the test framework that Bundler should use when generating the project\. Acceptable values are \fBminitest\fR, \fBrspec\fR and \fBtest\-unit\fR\. The \fBGEM_NAME\.gemspec\fR will be configured and a skeleton test/spec directory will be created based on this option\. Given no option is specified:
.IP
When Bundler is configured to generate tests, this defaults to Bundler's global config setting \fBgem\.test\fR\.
.IP
When Bundler is configured to not generate tests, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
.IP
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
.IP "\(bu" 4
\fB\-\-no\-test\fR: Do not use a test framework (overrides \fB\-\-test\fR specified in the global config)\.
.IP "\(bu" 4
\fB\-\-changelog\fR: Generate changelog file\. Set a default with \fBbundle config set \-\-global gem\.changelog true\fR\.
.IP "\(bu" 4
\fB\-\-ci\fR, \fB\-\-ci=circle\fR, \fB\-\-ci=github\fR, \fB\-\-ci=gitlab\fR: Specify the continuous integration service that Bundler should use when generating the project\. Acceptable values are \fBgithub\fR, \fBgitlab\fR and \fBcircle\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
.IP
When Bundler is configured to generate CI files, this defaults to Bundler's global config setting \fBgem\.ci\fR\.
.IP
When Bundler is configured to not generate CI files, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
.IP
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
.IP "\(bu" 4
\fB\-\-no\-ci\fR: Do not use a continuous integration service (overrides \fB\-\-ci\fR specified in the global config)\.
.IP "\(bu" 4
\fB\-\-linter\fR, \fB\-\-linter=rubocop\fR, \fB\-\-linter=sman/man1/bundle-list.1000064400000001703150403121720010453 0ustar00\(bu" 4
\fB\-\-rubocop\fR: Add rubocop to the generated Rakefile and gemspec\. Set a default with \fBbundle config set \-\-global gem\.rubocop true\fR\.
.IP "\(bu" 4
\fB\-\-edit=EDIT\fR, \fB\-e=EDIT\fR: Open the resulting GEM_NAME\.gemspec in EDIT, or the default editor if not specified\. The default is \fB$BUNDLER_EDITOR\fR, \fB$VISUAL\fR, or \fB$EDITOR\fR\.
.IP "" 0
.SH "SEE ALSO"
.IP "\(bu" 4
bundle config(1) \fIbundle\-config\.1\.html\fR
.IP "" 0

man/man1/bundle-list.1000064400000001664150403121720010461 0ustar00man/man1/bundle-platform.1000064400000002664150403121720011333 0ustar00\-\-without\-group test
.P
bundle list \-\-only\-group dev
.P
bundle list \-\-only\-group dev test \-\-paths
.SH "OPTIONS"
.TP
\fB\-\-name\-only\fR
Print only the name of each gem\.
.TP
\fB\-\-paths\fR
Print the path to each gem in the bundle\.
.TP
\fB\-\-without\-group=<list>\fR
A space\-separated list of groups of gems to skip during printing\.
.TP
\fB\-\-only\-group=<list>\fR
A space\-separated list of groups of gems to print\.

man/man1/bundle-platform.1000064400000002613150403121720011325 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-PLATFORM" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information
.SH "SYNOPSIS"
\fBbundle platform\fR [\-\-ruby]
.SH "DESCRIPTION"
\fBplatform\fR displays information from your Gemfile, Gemfile\.lock, and Ruby VM about your platform\.
.P
For instance, using this Gemfile(5):
.IP "" 4
.nf
sourman/man1/bundle-open.1000064400000001503150403121730010440 0ustar00file(5)\. It also lets you know if the \fBruby\fR directive requirement has been met\. If \fBruby\fR directive doesn't match the running Ruby VM, it tells you what part does not\.
.SH "OPTIONS"
.TP
\fB\-\-ruby\fR
It will display the ruby directive information, so you don't have to parse it from the Gemfile(5)\.
.SH "SEE ALSO"
.IP "\(bu" 4
bundle\-lock(1) \fIbundle\-lock\.1\.html\fR
.IP "" 0

man/man1/bundle-open.1000064400000001435150403121730010444 0ustar00man/man1/bundle-inject.1000064400000001514150403121730010755 0ustar00n the source directory for the 'rack' gem in your bundle\.
.IP "" 4
.nf
bundle open 'rack' \-\-path 'README\.md'
.fi
.IP "" 0
.P
Will open the README\.md file of the 'rack' gem source in your bundle\.
.SH "OPTIONS"
.TP
\fB\-\-path[=PATH]\fR
Specify GEM source relative path to open\.

man/man1/bundle-inject.1000064400000001741150403121730010757 0ustar00man/man1/ruby.1000064400000043631150403121730007221 0ustar00e\.lock if it isn't listed yet\.
.P
Example:
.IP "" 4
.nf
bundle install
bundle inject 'rack' '> 0'
.fi
.IP "" 0
.P
This will inject the 'rack' gem with a version greater than 0 in your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock\.
.P
The \fBbundle inject\fR command was deprecated in Bundler 2\.1 and will be removed in Bundler 3\.0\.
.SH "OPTIONS"
.TP
\fB\-\-source=SOURCE\fR
Install gem from the given source\.
.TP
\fB\-\-group=GROUP\fR
Install gem into a bundler group\.

man/man1/ruby.1000064400000056433150403121730007225 0ustar00.\"Ruby is copyrighted by Yukihiro Matsumoto <matz@netlab.jp>.
.Dd April 14, 2018
.Dt RUBY \&1 "Ruby Programmer's Reference Guide"
.Os UNIX
.Sh NAME
.Nm ruby
.Nd Interpreted object-oriented scripting language
.Sh SYNOPSIS
.Nm
.Op Fl -copyright
.Op Fl -version
.Op Fl SUacdlnpswvy
.Op Fl 0 Ns Op Ar octal
.Op Fl C Ar directory
.Op Fl E Ar external Ns Op : Ns Ar internal
.Op Fl F Ns Op Ar pattern
.Op Fl I Ar directory
.Op Fl K Ns Op Ar c
.Op Fl T Ns Op Ar level
.Op Fl W Ns Op Ar level
.Op Fl e Ar command
.Op Fl i Ns Op Ar extension
.Op Fl r Ar library
.Op Fl x Ns Op Ar directory
.Op Fl - Ns Bro Cm enable Ns | Ns Cm disable Brc Ns - Ns Ar FEATURE
.Op Fl -dump Ns = Ns Ar target
.Op Fl -verbose
.Op Fl -crash-report Ns = Ns Ar template
.Op Fl -
.Op Ar program_file
.Op Ar argument ...
.Sh DESCRIPTION
Ruby is an interpreted scripting language for quick and easy
object-oriented programming.  It has many features to process text
files and to do system management tasks (like in Perl).  It is simple,
straight-forward, and extensible.
.Pp
If you want a language for easy object-oriented programming, or you
don't like the Perl ugliness, or you do like the concept of LISP, but
don't like too many parentheses, Ruby might be your language of
choice.
.Sh FEATURES
Ruby's features are as follows:
.Bl -tag -width 6n
.It Sy "Interpretive"
Ruby is an interpreted language, so you don't have to recompile
programs written in Ruby to execute them.
.Pp
.It Sy "Variables have no type (dynamic typing)"
Variables in Ruby can contain data of any type.  You don't have to
worry about variable typing.  Consequently, it has a weaker compile
time check.
.Pp
.It Sy "No declaration needed"
You can use variables in your Ruby programs without any declarations.
Variable names denote their scope - global, class, instance, or local.
.Pp
.It Sy "Simple syntax"
Ruby has a simple syntax influenced slightly from Eiffel.
.Pp
.It Sy "No user-level memory management"
Ruby has automatic memory management.  Objects no longer referenced
from anywhere are automatically collected by the garbage collector
built into the interpreter.
.Pp
.It Sy "Everything is an object"
Ruby is a purely object-oriented language, and was so since its
creation.  Even such basic data as integers are seen as objects.
.Pp
.It Sy "Class, inheritance, and methods"
Being an object-oriented language, Ruby naturally has basic
features like classes, inheritance, and methods.
.Pp
.It Sy "Singleton methods"
Ruby has the ability to define methods for certain objects.  For
example, you can define a press-button action for certain widget by
defining a singleton method for the button.  Or, you can make up your
own prototype based object system using singleton methods, if you want
to.
.Pp
.It Sy "Mix-in by modules"
Ruby intentionally does not have the multiple inheritance as it is a
source of confusion.  Instead, Ruby has the ability to share
implementations across the inheritance tree.  This is often called a
.Sq Mix-in .
.Pp
.It Sy "Iterators"
Ruby has iterators for loop abstraction.
.Pp
.It Sy "Closures"
In Ruby, you can objectify the procedure.
.Pp
.It Sy "Text processing and regular expressions"
Ruby has a bunch of text processing features like in Perl.
.Pp
.It Sy "M17N, character set independent"
Ruby supports multilingualized programming. Easy to process texts
written in many different natural languages and encoded in many
different character encodings, without dependence on Unicode.
.Pp
.It Sy "Bignums"
With built-in bignums, you can for example calculate factorial(400).
.Pp
.It Sy "Reflection and domain-specific languages"
Class is also an instance of the Class class. Definition of classes and methods
is an expression just as 1+1 is. So your programs can even write and modify programs.
Thus, you can write your application in your own programming language on top of Ruby.
.Pp
.It Sy "Exception handling"
As in Java(tm).
.Pp
.It Sy "Direct access to the OS"
Ruby can use most
.Ux
system calls, often used in system programming.
.Pp
.It Sy "Dynamic loading"
On most
.Ux
systems, you can load object files into the Ruby interpreter
on-the-fly.
.It Sy "Rich libraries"
In addition to the
.Dq builtin libraries
and
.Dq standard libraries
that are bundled with Ruby, a vast amount of third-party libraries
.Pq Dq gems
are available via the package management system called
.Sq RubyGems ,
namely the
.Xr gem 1
command.  Visit RubyGems.org
.Pq Lk https://rubygems.org/
to find the gems you need, and explore GitHub
.Pq Lk https://github.com/
to see how they are being developed and used.
.El
.Pp
.Sh OPTIONS
The Ruby interpreter accepts the following command-line options (switches).
They are quite similar to those of
.Xr perl 1 .
.Bl -tag -width "1234567890123" -compact
.Pp
.It Fl -copyright
Prints the copyright notice, and quits immediately without running any
script.
.Pp
.It Fl -version
Prints the version of the Ruby interpreter, and quits immediately without
running any script.
.Pp
.It Fl 0 Ns Op Ar octal
(The digit
.Dq zero . )
Specifies the input record separator
.Pf ( Li "$/" )
as an octal number. If no digit is given, the null character is taken
as the separator.  Other switches may follow the digits.
.Fl 00
turns Ruby into paragraph mode.
.Fl 0777
makes Ruby read whole file at once as a single string since there is
no legal character with that value.
.Pp
.It Fl C Ar directory
.It Fl X Ar directory
Causes Ruby to switch to the directory.
.Pp
.It Fl E Ar external Ns Op : Ns Ar internal
.It Fl -encoding Ar external Ns Op : Ns Ar internal
Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:).
.Pp
You can omit the one for internal encodings, then the value
.Pf ( Li "Encoding.default_internal" ) will be nil.
.Pp
.It Fl -external-encoding Ns = Ns Ar encoding
.It Fl -internal-encoding Ns = Ns Ar encoding
Specify the default external or internal character encoding
.Pp
.It Fl F Ar pattern
Specifies input field separator
.Pf ( Li "$;" ) .
.Pp
.It Fl I Ar directory
Used to tell Ruby where to load the library scripts.  Directory path
will be added to the load-path variable
.Pf ( Li "$:" ) .
.Pp
.It Fl K Ar kcode
Specifies KANJI (Japanese) encoding. The default value for script encodings
.Pf ( Li "__ENCODING__" ) and external encodings ( Li "Encoding.default_external" ) will be the specified one.
.Ar kcode
can be one of
.Bl -hang -offset indent
.It Sy e
EUC-JP
.Pp
.It Sy s
Windows-31J (CP932)
.Pp
.It Sy u
UTF-8
.Pp
.It Sy n
ASCII-8BIT (BINARY)
.El
.Pp
.It Fl S
Makes Ruby use the
.Ev PATH
environment variable to search for script, unless its name begins
with a slash.  This is used to emulate
.Li #!
on machines that don't support it, in the following manner:
.Bd -literal -offset indent
#! /usr/local/bin/ruby
# This line makes the next one a comment in Ruby \e
  exec /usr/local/bin/ruby -S $0 $*
.Ed
.Pp
On some systems
.Li "$0"
does not always contain the full pathname, so you need the
.Fl S
switch to tell Ruby to search for the script if necessary (to handle embedded
spaces and such).  A better construct than
.Li "$*"
would be
.Li ${1+"$@"} ,
but it does not work if the script is being interpreted by
.Xr csh 1 .
.Pp
.It Fl T Ns Op Ar level=1
Turns on taint checks at the specified level (default 1).
.Pp
.It Fl U
Sets the default value for internal encodings
.Pf ( Li "Encoding.default_internal" ) to UTF-8.
.Pp
.It Fl W Ns Op Ar level=2
Turns on verbose mode at the specified level without printing the version
message at the beginning. The level can be;
.Bl -hang -offset indent
.It Sy 0
Verbose mode is "silence". It sets the
.Li "$VERBOSE"
to nil.
.Pp
.It Sy 1
Verbose mode is "medium". It sets the
.Li "$VERBOSE"
to false.
.Pp
.It Sy 2 (default)
Verbose mode is "verbose". It sets the
.Li "$VERBOSE"
to true.
.Fl W Ns
2 is the same as
.Fl w
.
.El
.Pp
.It Fl a
Turns on auto-split mode when used with
.Fl n
or
.Fl p .
In auto-split mode, Ruby executes
.Dl $F = $_.split
at beginning of each loop.
.Pp
.It Fl -backtrace-limit Ns = Ns Ar num
Limits the maximum length of backtraces to
.Ar num
lines (default -1, meaning no limit).
.Pp
.It Fl c
Causes Ruby to check the syntax of the script and exit without
executing. If there are no syntax errors, Ruby will print
.Dq Syntax OK
to the standard output.
.Pp
.It Fl d
.It Fl -debug
Turns on debug mode.
.Li "$DEBUG"
will be set to true.
.Pp
.It Fl e Ar command
Specifies script from command-line while telling Ruby not to search
the rest of the arguments for a script file name.
.Pp
.It Fl h
.It Fl -help
Prints a summary of the options.
.Pp
.It Fl i Ar extension
Specifies in-place-edit mode.  The extension, if specified, is added
to old file name to make a backup copy.  For example:
.Bd -literal -offset indent
% echo matz > /tmp/junk
% cat /tmp/junk
matz
% ruby -p -i.bak -e '$_.upcase!' /tmp/junk
% cat /tmp/junk
MATZ
% cat /tmp/junk.bak
matz
.Ed
.Pp
.It Fl l
(The lowercase letter
.Dq ell . )
Enables automatic line-ending processing, which means to firstly set
.Li "$\e"
to the value of
.Li "$/" ,
and secondly chops every line read using
.Li chomp! .
.Pp
.It Fl n
Causes Ruby to assume the following loop around your script, which
makes it iterate over file name arguments somewhat like
.Nm sed
.Fl n
or
.Nm awk .
.Bd -literal -offset indent
while gets
  ...
end
.Ed
.Pp
.It Fl p
Acts mostly same as -n switch, but print the value of variable
.Li "$_"
at the each end of the loop.  For example:
.Bd -literal -offset indent
% echo matz | ruby -p -e '$_.tr! "a-z", "A-Z"'
MATZ
.Ed
.Pp
.It Fl r Ar library
Causes Ruby to load the library using require.  It is useful when using
.Fl n
or
.Fl p .
.Pp
.It Fl s
Enables some switch parsing for switches after script name but before
any file name arguments (or before a
.Fl - ) .
Any switches found there are removed from
.Li ARGV
and set the corresponding variable in the script.  For example:
.Bd -literal -offset indent
#! /usr/local/bin/ruby -s
# prints "true" if invoked with `-xyz' switch.
print "true\en" if $xyz
.Ed
.Pp
.It Fl v
Enables verbose mode.  Ruby will print its version at the beginning
and set the variable
.Li "$VERBOSE"
to true.  Some methods print extra messages if this variable is true.
If this switch is given, and no other switches are present, Ruby quits
after printing its version.
.Pp
.It Fl w
Enables verbose mode without printing version message at the
beginning.  It sets the
.Li "$VERBOSE"
variable to true.
.Pp
.It Fl x Ns Op Ar directory
Tells Ruby that the script is embedded in a message.  Leading garbage
will be discarded until the first line that starts with
.Dq #!
and contains the string,
.Dq ruby .
Any meaningful switches on that line will be applied.  The end of the script
must be specified with either
.Li EOF ,
.Li "^D" ( Li "control-D" ) ,
.Li "^Z" ( Li "control-Z" ) ,
or the reserved word
.Li __END__ .
If the directory name is specified, Ruby will switch to that directory
before executing script.
.Pp
.It Fl y
.It Fl -yydebug
This option is not guaranteed to be compatible.
.Pp
Turns on compiler debug mode.  Ruby will print a bunch of internal
state messages during compilation.  Only specify this switch you are going to
debug the Ruby interpreter.
.Pp
.It Fl -disable- Ns Ar FEATURE
.It Fl -enable- Ns Ar FEATURE
Disables (or enables) the specified
.Ar FEATURE .
.Bl -tag -width "--disable-rubyopt" -compact
.It Fl -disable-gems
.It Fl -enable-gems
Disables (or enables) RubyGems libraries.  By default, Ruby will load the latest
version of each installed gem. The
.Li Gem
constant is true if RubyGems is enabled, false if otherwise.
.Pp
.It Fl -disable-rubyopt
.It Fl -enable-rubyopt
Ignores (or considers) the
.Ev RUBYOPT
environment variable. By default, Ruby considers the variable.
.Pp
.It Fl -disable-all
.It Fl -enable-all
Disables (or enables) all features.
.Pp
.El
.Pp
.It Fl -dump Ns = Ns Ar target
Dump some information.
.Pp
Prints the specified target.
.Ar target
can be one of:
.Bl -hang -offset indent -width "version"
.It Sy version
Print version description (same as
.Fl -version).
.It Sy usage
Print a brief usage message (same as
.Fl h).
.It Sy help
Show long help message (same as
.Fl -help).
.It Sy syntax
Check syntax (same as
.Fl c
.Fl -yydebug).
.Pp
.El
.Pp
Or one of the following, which are intended for debugging the interpreter:
.Bl -hang -offset indent -width "parsetree"
.It Sy yydebug
Enable compiler debug mode (same as
.Fl -yydebug).
.It Sy parsetree
Print a textual representation of the Ruby AST for the program.
.It Sy insns
Print a list of disassembled bytecode instructions.
.It Sy -optimize
Disable various optimizations to print a list disassembled bytecode instructions.
.It Sy +error-tolerant
Enable error-tolerant parsing, when yydebug or parsetree.
.It Sy +comment
Annotate a textual representation of the Ruby AST for the program with the associated Ruby source code.
.El
.Pp
.It Fl -verbose
Enables verbose mode without printing version message at the
beginning.  It sets the
.Li "$VERBOSE"
variable to true.
If this switch is given, and no script arguments (script file or
.Fl e
options) are present, Ruby quits immediately.
.Pp
.It Fl -crash-report Ns = Ns Ar template
Sets the template of path name to save crash report.
See
.Ev RUBY_CRASH_REPORT
environment variable for details.
.El
.Pp
.Sh ENVIRONMENT
.Bl -tag -width "RUBYSHELL" -compact
.It Ev RUBYLIB
A colon-separated list of directories that are added to Ruby's
library load path
.Pf ( Li "$:" ) . Directories from this environment variable are searched
before the standard load path is searched.
.Pp
e.g.:
.Dl RUBYLIB="$HOME/lib/ruby:$HOME/lib/rubyext"
.Pp
.It Ev RUBYOPT
Additional Ruby options.
.Pp
e.g.
.Dl RUBYOPT="-w -Ke"
.Pp
Note that RUBYOPT can contain only
.Fl d , Fl E , Fl I , Fl K , Fl r , Fl T , Fl U , Fl v , Fl w , Fl W, Fl -debug ,
.Fl -disable- Ns Ar FEATURE
and
.Fl -enable- Ns Ar FEATURE .
.Pp
.It Ev RUBYPATH
A colon-separated list of directories that Ruby searches for
Ruby programs when the
.Fl S
flag is specified.  This variable precedes the
.Ev PATH
environment variable.
.Pp
.It Ev RUBYSHELL
The path to the system shell command.  This environment variable is
enabled for only mswin32, mingw32, and OS/2 platforms.  If this
variable is not defined, Ruby refers to
.Ev COMSPEC .
.Pp
.It Ev RUBY_FREE_AT_EXIT
If set, Ruby tries to free all dynamically allocated memories.
Introduced in Ruby 3.3, default: unset.
.Pp
.It Ev RUBY_IO_BUFFER_DEFAULT_SIZE
The custom default buffer size of
.Li IO::Buffer .
.Pp
.It Ev RUBY_MAX_CPU
The maximum number of native threads used by M:N Threads scheduler
Introduced in Ruby 3.3, default: 8.
.Pp
.It Ev RUBY_MN_THREADS
If set to
.Li 1 ,
M:N Thread scheduler is enabled on the main Ractor.
Introduced in Ruby 3.3, default: unset.
.Pp
.It Ev RUBY_PAGER
The pager command that will be used for
.Pp
.It Ev RUBY_THREAD_TIMESLICE
Sets the default thread time slice (thread quantum) in milliseconds.
Introduced in Ruby 3.4, default: 100ms.
.Fl -help
option.
Introduced in Ruby 3.0, default:
.Ev PAGER
environment variable.
.Pp
.It Ev PATH
Ruby refers to the
.Ev PATH
environment variable on calling Kernel#system.
.El
.Pp
And Ruby depends on some RubyGems related environment variables unless RubyGems is disabled.
See the help of
.Xr gem 1
as below.
.Bd -literal -offset indent
% gem help
.Ed
.Pp
.Sh GC ENVIRONMENT
The Ruby garbage collector (GC) tracks objects in fixed-sized slots,
but each object may have auxiliary memory allocations handled by the
malloc family of C standard library calls (
.Xr malloc 3 ,
.Xr calloc 3 ,
and
.Xr realloc 3 ) .
In this documentation, the "heap" refers to the Ruby object heap
of fixed-sized slots, while "malloc" refers to auxiliary
allocations commonly referred to as the "process heap".
Thus there are at least two possible ways to trigger GC:
.Bl -hang -offset indent
.It Sy 1
Reaching the object limit.
.It Sy 2
Reaching the malloc limit.
.Pp
.El
In Ruby 2.1, the generational GC was introduced and the limits are divided
into young and old generations, providing two additional ways to trigger
a GC:
.Bl -hang -offset indent
.It Sy 3
Reaching the old object limit.
.It Sy 4
Reaching the old malloc limit.
.El
.Pp
There are currently 4 possible areas where the GC may be tuned by
the following environment variables:
.Bl -hang -compact -width "RUBY_GC_HEAP_n_INIT_SLOTS"
.Pp
.It Ev RUBY_GC_HEAP_ Ns Ar n Ns Ev _INIT_SLOTS
Initial allocation of slots in a specific heap.
The available heaps can be found in the keys of
.Li GC.stat_heap .
.Ar n
is a decimal number between 0 and 4.
Introduced in Ruby 3.3.
.Pp
.It Ev RUBY_GC_HEAP_FREE_SLOTS
Prepare at least this amount of slots after GC.
Allocate this number slots if there are not enough slots.
Introduced in Ruby 2.1, default: 4096
.Pp
.It Ev RUBY_GC_HEAP_GROWTH_FACTOR
Increase allocation rate of heap slots by this factor.
Introduced in Ruby 2.1, default: 1.8, minimum: 1.0 (no growth)
.Pp
.It Ev RUBY_GC_HEAP_GROWTH_MAX_SLOTS
Allocation rate is limited to this number of slots,
preventing excessive allocation due to RUBY_GC_HEAP_GROWTH_FACTOR.
Introduced in Ruby 2.1, default: 0 (no limit)
.Pp
.It Ev RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR
Perform a full GC when the number of old objects is more than R * N,
where R is this factor and N is the number of old objects after the
last full GC.
Introduced in Rubman/man1/bundle-pristine.1000064400000003214150403121730011335 0ustar00 default: 32MB.
.Pp
.It Ev RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR
Increases the limit of young generation malloc calls, reducing
GC frequency but increasing malloc growth until RUBY_GC_MALLOC_LIMIT_MAX
is reached.
Introduced in Ruby 2.1, default: 1.4, minimum: 1.0 (no growth)
.Pp
.It Ev RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO
Allocate additional pages when the number of free slots is
lower than the value
.Li (total_slots * (this ratio)) .
Introduced in Ruby 2.4, default: 0.2, minimum: 0.0, maximum: 1.0
.Pp
.It Ev RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO
Allow to free pages when the number of free slots is greater than the value
.Li (total_slots * (this ratio)) .
Introduced in Ruby 2.4, default: 0.4, minimum:
.Li RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO,
maximum: 1.0
.Pp
.It Ev RUBY_GC_HEAP_FREE_SLOTS_GOAL_RATIO
Allocate slots to satisfy this formula:
.Li free_slots = total_slots * goal_ratio
In other words, prepare
.Li (total_slots * goal_ratio)
free slots.
if this value is 0.0, then use RUBY_GC_HEAP_GROWTH_FACTOR directly.
Introduced in Ruby 2.4, default: 0.65, minimum:
.Li RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO,
maximum:
.Li RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO
.Pp
.It Ev RUBY_GC_OLDMALLOC_LIMIT
The initial limit of old generation allocation from malloc,
a full GC will start when this limit is reached.
Introduced in Ruby 2.1, default: 16MB
.Pp
.It Ev RUBY_GC_OLDMALLOC_LIMIT_MAX
The maximum limit of old generation allocation from malloc before a
full GC starts.
Prevents excessive malloc growth due to RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR.
Introduced in Ruby 2.1, default: 128MB
.Pp
.It Ev RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
Increases the limit of old generation malloc allocatioman/man1/bundle-lock.1000064400000006165150403121730010440 0ustar00ironment variables are available since Ruby 2.0.0.
All values are specified in bytes.
.Pp
.Bl -hang -compact -width "RUBY_THREAD_MACHINE_STACK_SIZE"
.It Ev RUBY_THREAD_VM_STACK_SIZE
VM stack size used at thread creation.
default: 524288 (32-bit CPU) or 1048575 (64-bit)
.Pp
.It Ev RUBY_THREAD_MACHINE_STACK_SIZE
Machine stack size used at thread creation.
default: 524288 or 1048575
.Pp
.It Ev RUBY_FIBER_VM_STACK_SIZE
VM stack size used at fiber creation.
default: 65536 or 131072
.Pp
.It Ev RUBY_FIBER_MACHINE_STACK_SIZE
Machine stack size used at fiber creation.
default: 262144 or 524288
.Pp
.El
.Sh CRASH REPORT ENVIRONMENT
.Pp
.Bl -tag -compact -width "RUBY_CRASH_REPORT"
.It Ev RUBY_CRASH_REPORT
The template of path name to save crash report.
default: none
.El
.Ss Naming crash report files
The template can contain
.Li \fB%\fP
specifiers which are substituted by the following values when a crash
report file is created:
.Pp
.Bl -hang -compact -width "%NNN"
.It Li \fB%%\fP
A single
.Li \fB%\fP
character.
.It Li \fB%e\fP
Basename of executable.
.It Li \fB%E\fP
Pathname of executable,
with slashes (\fB/\fP) replaced by exclamation marks (\fB!\fP).
.It Li \fB%f\fP
Basename of the program name,
.Li "$0" .
.It Li \fB%F\fP
Pathname of the program name,
.Li "$0",
with slashes (\fB/\fP) replaced by exclamation marks (\fB!\fP).
.It Li \fB%p\fP
PID of dumped process.
.It Li \fB%t\fP
Time of dump, expressed as seconds since the
Epoch, 1970-01-01 00:00:00 +0000 (UTC).
.It Li \fB%NNN\fP
A character code in octal.
.El
.Pp
A single
.Li \fB%\fP
at the end of the template is dropped from the core filename, as is
the combination of a
.Li \fB%\fP
followed by any character other than those listed above.  All other
characters in the template become a literal part of the core filename.
The template may include \(aq/\(aq characters, which are interpreted
as delimiters for directory names.
.Ss Piping crash reports to a program
If the first character of this file is a pipe symbol (\fB|\fP),
then the remainder of the line is interpreted as the command-line for
a program (or script) that is to be executed.
.Pp
The pipe template is split on spaces into an argument list before the
template parameters are expanded.
.Sh MISC ENVIRONMENT
.Pp
.Bl -hang -compact -width "RUBY_TCP_NO_FAST_FALLBACK"
.It Ev RUBY_TCP_NO_FAST_FALLBACK
If set to
.Li 1 ,
disables the fast fallback feature by default in TCPSocket.new and Socket.tcp.
When set to
.Li 0
or left unset, the fast fallback feature is enabled.
Introduced in Ruby 3.4, default: unset.
.Sh SEE ALSO
.Bl -hang -compact -width "https://www.ruby-toolbox.com/"
.It Lk https://www.ruby-lang.org/
The official web site.
.It Lk https://www.ruby-toolbox.com/
Comprehensive catalog of Ruby libraries.
.El
.Pp
.Sh REPORTING BUGS
.Bl -bullet
.It
Security vulnerabilities should be reported via an email to
.Mt security@ruby-lang.org .
Reported problems will be published after being fixed.
.Pp
.It
Other bugs and feature requests can be reported via the
Ruby Issue Tracking System
.Pq Lk https://bugs.ruby-lang.org/ .
Do not report security vulnerabilities
via this system because it publishes the vulnerabilities immediately.
.El
.Sh AUTHORS
Rubman/man1/bundle-install.1000064400000041153150403121730011152 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-PRISTINE" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
.SH "SYNOPSIS"
\fBbundle pristine\fR
.SH "DESCRIPTION"
\fBpristine\fR restores the installed gems in the bundle to their pristine condition using the local gem cache from RubyGems\. For git gems, a forced checkout will be performed\.
.P
For further explanation, \fBbundle pristine\fR ignores unpacked files on disk\. In other words, this command utilizes the local \fB\.gem\fR cache or the gem's git repository as if one were installing from scratch\.
.P
Note: the Bundler gem cannot be restored to its original state with \fBpristine\fR\. One also cannot use \fBbundle pristine\fR on gems with a 'path' option in the Gemfile, because bundler has no original copy it can restore from\.
.P
When is it practical to use \fBbundle pristine\fR?
.P
It comes in handy when a developer is debugging a gem\. \fBbundle pristine\fR is a great way to get rid of experimental changes to a gem that one may not want\.
.P
Why use \fBbundle pristine\fR over \fBgem pristine \-\-all\fR?
.P
Both commands are very similar\. For context: \fBbundle pristine\fR, without arguments, cleans all gems from the lockfile\. Meanwhile, \fBgem pristine \-\-all\fR cleans all installed gems for that Ruby version\.
.P
If a developer forgets which gems in their project they might have been debugging, the Rubygems \fBgem pristine [GEMNAME]\fR command may be inconvenient\. One can avoid waiting for \fBgem pristine \-\-all\fR, and instead run \fBbundle pristine\fR\.
man/man1/bundle-lock.1000064400000007227150403121730010440 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-LOCK" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
.SH "SYNOPSIS"
\fBbundle lock\fR [\-\-update] [\-\-bundler[=BUNDLER]] [\-\-local] [\-\-print] [\-\-lockfile=PATH] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-add\-checksums] [\-\-add\-platform] [\-\-remove\-platform] [\-\-normalize\-platforms] [\-\-patch] [\-\-minor] [\-\-major] [\-\-pre] [\-\-strict] [\-\-conservative]
.SH "DESCRIPTION"
Lock the gems specified in Gemfile\.
.SH "OPTIONS"
.TP
\fB\-\-update[=<list>]\fR
Ignores the existing lockfile\. Resolve then updates lockfile\. Taking a list of gems or updating all gems if no list is given\.
.TP
\fB\-\-bundler[=BUNDLER]\fR
Update the locked version of bundler to the given version or the latest version if no version is given\.
.TP
\fB\-\-local\fR
Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems' cache or in \fBvendor/cache\fR\. Note that if a appropriate platform\-specific gem exists on \fBrubygems\.org\fR it will not be found\.
.TP
\fB\-\-print\fR
Prints the lockfile to STDOUT instead of writing to the file system\.
.TP
\fB\-\-lockfile=LOCKFILE\fR
The path where the lockfile should be written to\.
.TP
\fB\-\-full\-index\fR
Fall back to using the single\-file index of all gems\.
.TP
\fB\-\-gemfile=GEMFILE\fR
Use the specified gemfile instead of [\fBGemfile(5)\fR][Gemfile(5)]\.
.TP
\fB\-\-add\-checksums\fR
Add checksums to the lockfile\.
.TP
\fB\-\-add\-platform=<list>\fR
Add a new platform to the lockfile, re\-resolving for the addition of that platform\.
.TP
\fB\-\-remove\-platform=<list>\fR
Remove a platform from the lockfile\.
.TP
\fB\-\-normalize\-platforms\fR
Normalize lockfile platforms\.
.TP
\fB\-\-patch\fR
If updating, prefer updating only to next patch version\.
.TP
\fB\-\-minor\fR
If updating, prefer updating only to next minor version\.
.TP
\fB\-\-major\fR
If updating, prefer updating to next major version (default)\.
.TP
\fB\-\-pre\fR
If updating, always choose the highest allowed version, regardless of prerelease status\.
.TP
\fB\-\-strict\fR
If updating, do not allow any gem to be updated past latest \-\-patch | \-\-minor | \-\-major\.
.TP
\fB\-\-conservative\fR
If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated\.
.SH "UPDATING ALL GEMS"
If you run \fBbundle lock\fR with \fB\-\-update\fR option without list of gems, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
.SH "UPDATING A LIST OF GEMS"
Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
.P
For instance, you only want to update \fBnokogiri\fR, run \fBbundle lock \-\-update nokogiri\fR\.
.P
Bundler will update \fBnokogiri\fR and any of its dependencies, but leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
.SH "SUPPORTING OTHER PLATFORMS"
If you want your bundle to support platforms other than the one you're running locally, you can run \fBbundle lock \-\-add\-platform PLATFORM\fR to add PLATFORM to the lockfile, force bundler to re\-resolve and consider the new platform when picking gems, all without needing to have a machine that matches PLATFORM handy to install those platform\-specific gems on\.
.P
For a full explanation of gem platforms, see \fBgem help platform\fR\.
.SH "PATCH LEVEL OPTIONS"
See bundle update(1) \fIbundle\-update\.1\.html\fR for details\.
man/man1/bundle-install.1000064400000041171150403121730011152 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-INSTALL" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
.SH "SYNOPSIS"
\fBbundle install\fR [\-\-binstubs[=DIRECTORY]] [\-\-clean] [\-\-deployment] [\-\-frozen] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-local] [\-\-no\-cache] [\-\-no\-prune] [\-\-path PATH] [\-\-prefer\-local] [\-\-quiet] [\-\-redownload] [\-\-retry=NUMBER] [\-\-shebang=SHEBANG] [\-\-standalone[=GROUP[ GROUP\|\.\|\.\|\.]]] [\-\-system] [\-\-trust\-policy=TRUST\-POLICY] [\-\-target\-rbconfig=TARGET\-RBCONFIG] [\-\-with=GROUP[ GROUP\|\.\|\.\|\.]] [\-\-without=GROUP[ GROUP\|\.\|\.\|\.]]
.SH "DESCRIPTION"
Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), Bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
.P
If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), Bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
.P
If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), Bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
.SH "OPTIONS"
The \fB\-\-clean\fR, \fB\-\-deployment\fR, \fB\-\-frozen\fR, \fB\-\-no\-prune\fR, \fB\-\-path\fR, \fB\-\-shebang\fR, \fB\-\-system\fR, \fB\-\-without\fR and \fB\-\-with\fR options are deprecated because they only make sense if they are applied to every subsequent \fBbundle install\fR run automatically and that requires \fBbundler\fR to silently remember them\. Since \fBbundler\fR will no longer remember CLI flags in future versions, \fBbundle config\fR (see bundle\-config(1)) should be used to apply them permanently\.
.TP
\fB\-\-binstubs[=BINSTUBS]\fR
Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it in \fBbin/\fR\. This lets you link the binstub inside of an application to the exact gem version the application needs\.
.IP
Creates a directory (defaults to \fB~/bin\fR when the option is used without a value, or to the given \fB<BINSTUBS>\fR directory otherwise) and places any executables from the gem there\. These executables run in Bundler's context\. If used, you might add this directory to your environment's \fBPATH\fR variable\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all referred dependencies will be resolved using the bundled gems\.
.TP
\fB\-\-clean\fR
On finishing the installation Bundler is going to remove any gems not present in the current Gemfile(5)\. Don't worry, gems currently in use will not be removed\.
.IP
This option is deprecated in favor of the \fBclean\fR setting\.
.TP
\fB\-\-deployment\fR
In \fIdeployment mode\fR, Bundler will 'roll\-out' the bundle for production or CI use\. Please check carefully if you want to have this option enabled in your development environment\.
.IP
This option is deprecated in favor of the \fBdeployment\fR setting\.
.TP
\fB\-\-redownload\fR, \fB\-\-force\fR
Force download every gem, even if the required versions are already available locally\.
.TP
\fB\-\-frozen\fR
Do not allow the Gemfile\.lock to be updated after this install\. Exits non\-zero if there are going to be changes to the Gemfile\.lock\.
.IP
This option is deprecated in favor of the \fBfrozen\fR setting\.
.TP
\fB\-\-full\-index\fR
Bundler will not call Rubygems' API endpoint (default) but download and cache a (currently big) index file of all gems\. Performance can be improved for large bundles that seldom change by enabling this option\.
.TP
\fB\-\-gemfile=GEMFILE\fR
The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project's root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
.TP
\fB\-\-jobs=<number>\fR, \fB\-j=<number>\fR
The maximum number of parallel download and install jobs\. The default is the number of available processors\.
.TP
\fB\-\-local\fR
Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems' cache or in \fBvendor/cache\fR\. Note that if an appropriate platform\-specific gem exists on \fBrubygems\.org\fR it will not be found\.
.TP
\fB\-\-prefer\-local\fR
Force using locally installed gems, or gems already present in Rubygems' cache or in \fBvendor/cache\fR, when resolving, even if newer versions are available remotely\. Only attempt to connect to \fBrubygems\.org\fR for gems that are not present locally\.
.TP
\fB\-\-no\-cache\fR
Do not update the cache in \fBvendor/cache\fR with the newly bundled gems\. This does not remove any gems in the cache but keeps the newly bundled gems from being cached during the install\.
.TP
\fB\-\-no\-prune\fR
Don't remove stale gems from the cache when the installation finishes\.
.IP
This option is deprecated in favor of the \fBno_prune\fR setting\.
.TP
\fB\-\-path=PATH\fR
The location to install the specified gems to\. This defaults to Rubygems' setting\. Bundler shares this location with Rubygems, \fBgem install \|\.\|\.\|\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \|\.\|\.\|\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
.IP
This option is deprecated in favor of the \fBpath\fR setting\.
.TP
\fB\-\-quiet\fR
Do not print progress information to the standard output\.
.TP
\fB\-\-retry=[<number>]\fR
Retry failed network or git requests for \fInumber\fR times\.
.TP
\fB\-\-shebang=SHEBANG\fR
Uses the specified ruby executable (usually \fBruby\fR) to execute the scripts created with \fB\-\-binstubs\fR\. In addition, if you use \fB\-\-binstubs\fR together with \fB\-\-shebang jruby\fR these executables will be changed to execute \fBjruby\fR instead\.
.IP
This option is deprecated in favor of the \fBshebang\fR setting\.
.TP
\fB\-\-standalone[=<list>]\fR
Makes a bundle that can work without depending on Rubygems or Bundler at runtime\. A space separated list of groups to install can be specified\. Bundler creates a directory named \fBbundle\fR and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler's own setup in the manner required\. Using this option implicitly sets \fBpath\fR, which is a [remembered option][REMEMBERED OPTIONS]\.
.TP
\fB\-\-system\fR
Installs the gems specified in the bundle to the system's Rubygems location\. This overrides any previous configuration of \fB\-\-path\fR\.
.IP
This option is deprecated in favor of the \fBsystem\fR setting\.
.TP
\fB\-\-trust\-policy=TRUST\-POLICY\fR
Apply the Rubygems security policy \fIpolicy\fR, where policy is one of \fBHighSecurity\fR, \fBMediumSecurity\fR, \fBLowSecurity\fR, \fBAlmostNoSecurity\fR, or \fBNoSecurity\fR\. For more details, please see the Rubygems signing documentation linked below in \fISEE ALSO\fR\.
.TP
\fB\-\-target\-rbconfig=TARGET\-RBCONFIG\fR
Path to rbconfig\.rb for the deployment target platform\.
.TP
\fB\-\-with=<list>\fR
A space\-separated list of groups referencing gems to install\. If an optional group is given it is installed\. If a group is given that is in the remembered list of groups given to \-\-without, it is removed from that list\.
.IP
This option is deprecated in favor of the \fBwith\fR setting\.
.TP
\fB\-\-without=<list>\fR
A space\-separated list of groups referencing gems to skip during installation\. If a group is given that is in the remembered list of groups given to \-\-with, it is removed from that list\.
.IP
This option is deprecated in favor of the \fBwithout\fR setting\.
.SH "DEPLOYMENT MODE"
Bundler's defaults are optimized for development\. To switch to defaults optimized for deployment and for CI, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause an error when the Gemfile(5) is modified\.
.IP "1." 4
A \fBGemfile\.lock\fR is required\.
.IP
To ensure that the same versions of the gems you developed with and tested with are also used in deployments, a \fBGemfile\.lock\fR is required\.
.IP
This is mainly to ensure that you remember to check your \fBGemfile\.lock\fR into version control\.
.IP "2." 4
The \fBGemfile\.lock\fR must be up to date
.IP
In development, you can modify your Gemfile(5) and re\-run \fBbundle install\fR to \fIconservatively update\fR your \fBGemfile\.lock\fR snapshot\.
.IP
In deployment, your \fBGemfile\.lock\fR should be up\-to\-date with changes made in your Gemfile(5)\.
.IP "3." 4
Gems are installed to \fBvendor/bundle\fR not your default system location
.IP
In development, it's convenient to share the gems used in your application with other applications and other scripts that run on the system\.
.IP
In deployment, isolation is a more important default\. In addition, the user deploying the application may not have permission to install gems to the system, or the web server may not have permission to read them\.
.IP
As a result, \fBbundle install \-\-deployment\fR installs gems to the \fBvendor/bundle\fR directory in the application\. This may be overridden using the \fB\-\-path\fR option\.
.IP "" 0
.SH "INSTALLING GROUPS"
By default, \fBbundle install\fR will install allman/man1/bundle-clean.1000064400000001341150403121730010561 0ustar00t you will never be caught flat\-footed by different versions of third\-party code being used in different environments\.\fR
.P
For a simple illustration, consider the following Gemfile(5):
.IP "" 4
.nf
source 'https://rubygems\.org'

gem 'sinatra'

group :production do
  gem 'rack\-perftools\-profiler'
end
.fi
.IP "" 0
.P
In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR), while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
.P
When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, onlman/man1/bundle-outdated.1000064400000006425150403121730011320 0ustar00you used (including dependencies of the gems specified in the Gemfile(5)) into a file called \fBGemfile\.lock\fR\.
.P
Bundler uses this file in all subsequent calls to \fBbundle install\fR, which guarantees that you always use the same exact code, even as your application moves across machines\.
.P
Because of the way dependency resolution works, even a seemingly small change (for instance, an update to a point\-release of a dependency of a gem in your Gemfile(5)) can result in radically different gems being needed to satisfy all dependencies\.
.P
As a result, you \fBSHOULD\fR check your \fBGemfile\.lock\fR into version control, in both applications and gems\. If you do not, every machine that checks out your repository (including your production server) will resolve all dependencies again, which will result in different versions of third\-party code being used if \fBany\fR of the gems in the Gemfile(5) or any of their dependencies have been updated\.
.P
When Bundler first shipped, the \fBGemfile\.lock\fR was included in the \fB\.gitignore\fR file included with generated gems\. Over time, however, it became clear that this practice forces the pain of broken dependencies onto new contributors, while leaving existing contributors potentially unaware of the problem\. Since \fBbundle install\fR is usually the first step towards a contribution, the pain of broken dependencies would discourage new contributors from contributing\. As a result, we have revised our guidance for gem authors to now recommend checking in the lock for gems\.
.SH "CONSERVATIVE UPDATING"
When you make a change to the Gemfile(5) and then run \fBbundle install\fR, Bundler will update only the gems that you modified\.
.P
In other words, if a gem that you \fBdid not modify\fR worked before you called \fBbundle install\fR, it will continue to use the exact same versions of all dependencies as it used before the update\.
.P
Let's take a look at an example\. Here's your original Gemfile(5):
.IP "" 4
.nf
source 'https://rubygems\.org'

gem 'actionpack', '2\.3\.8'
gem 'activemerchant'
.fi
.IP "" 0
.P
In this case, both \fBactionpack\fR and \fBactivemerchant\fR depend on \fBactivesupport\fR\. The \fBactionpack\fR gem depends on \fBactivesupport 2\.3\.8\fR and \fBrack ~> 1\.1\.0\fR, while the \fBactivemerchant\fR gem depends on \fBactivesupport >= 2\.3\.2\fR, \fBbraintree >= 2\.0\.0\fR, and \fBbuilder >= 2\.0\.0\fR\.
.P
When the dependencies are first resolved, Bundler will select \fBactivesupport 2\.3\.8\fR, which satisfies the requirements of both gems in your Gemfile(5)\.
.P
Next, you modify your Gemfile(5) to:
.IP "" 4
.nf
source 'https://rubygems\.org'

gem 'actionpack', '3\.0\.0\.rc'
gem 'activemerchant'
.fi
.IP "" 0
.P
The \fBactionpack 3\.0\.0\.rc\fR gem has a number of new dependencies, and updates the \fBactivesupport\fR dependency to \fB= 3\.0\.0\.rc\fR and the \fBrack\fR dependency to \fB~> 1\.2\.1\fR\.
.P
When you run \fBbundle install\fR, Bundler notices that you changed the \fBactionpack\fR gem, but not the \fBactivemerchant\fR gem\. It evaluates the gems currently being used to satisfy its requirements:
.TP
\fBactivesupport 2\.3\.8\fR
also used to satisfy a dependency in \fBactivemerchant\fR, which is not being updated
.TP
\fBrack ~> 1\.1\.0\fR
not currently being used to satisfy another dependency
.P
Because you diman/man1/bundle-add.1000064400000003460150403121730010233 0ustar00cluding its dependencies which other gems in the Gemfile(5) still depend on, run \fBbundle update actionpack\fR (see \fBbundle update(1)\fR)\.
.P
\fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gem in the Gemfile(5) is impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.
.SH "SEE ALSO"
.IP "\(bu" 4
Gem install docs \fIhttps://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
.IP "\(bu" 4
Rubygems signing docs \fIhttps://guides\.rubygems\.org/security/\fR
.IP "" 0

man/man1/bundle-clean.1000064400000001326150403121730010564 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CLEAN" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
.SH "SYNOPSIS"
\fBbundle clean\fR [\-\-dry\-run] [\-\-force]
.SH "DESCRIPTION"
This command will man/man1/erb.1000064400000006367150403121730007015 0ustar00man/man1/bundle-outdated.1000064400000006626150403121730011323 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-OUTDATED" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available
.SH "SYNOPSIS"
\fBbundle outdated\fR [GEM] [\-\-local] [\-\-pre] [\-\-source] [\-\-filter\-strict | \-\-strict] [\-\-update\-strict] [\-\-parseable | \-\-porcelain] [\-\-group=GROUP] [\-\-groups] [\-\-patch|\-\-minor|\-\-major] [\-\-filter\-major] [\-\-filter\-minor] [\-\-filter\-patch] [\-\-only\-explicit]
.SH "DESCRIPTION"
Outdated lists the names and versions of gems that have a newer version available in the given source\. Calling outdated with [GEM [GEM]] will only check for newer versions of the given gems\. Prerelease gems are ignored by default\. If your gems are up to date, Bundler will exit with a status of 0\. Otherwise, it will exit 1\.
.SH "OPTIONS"
.TP
\fB\-\-local\fR
Do not attempt to fetch gems remotely and use the gem cache instead\.
.TP
\fB\-\-pre\fR
Check for newer pre\-release gems\.
.TP
\fB\-\-source=<list>\fR
Check against a specific source\.
.TP
\fB\-\-filter\-strict\fR, \fB\-\-strict\fR
Only list newer versions allowed by your Gemfile requirements, also respecting conservative update flags (\-\-patch, \-\-minor, \-\-major)\.
.TP
\fB\-\-update\-strict\fR
Strict conservative resolution, do not allow any gem to be updated past latest \-\-patch | \-\-minor | \-\-major\.
.TP
\fB\-\-parseable\fR, \fB\-\-porcelain\fR
Use minimal formatting for more parseable output\.
.TP
\fB\-\-group=GROUP\fR
List gems from a specific group\.
.TP
\fB\-\-groups\fR
List gems organized by groups\.
.TP
\fB\-\-minor\fR
Prefer updating only to next minor version\.
.TP
\fB\-\-major\fR
Prefer updating to next major version (default)\.
.TP
\fB\-\-patch\fR
Prefer updating only to next patch version\.
.TP
\fB\-\-filter\-major\fR
Only list major newer versions\.
.TP
\fB\-\-filter\-minor\fR
Only list minor newer versions\.
.TP
\fB\-\-filter\-patch\fR
Only list patch newer versions\.
.TP
\fB\-\-only\-explicit\fR
Only list gems specified in your Gemfile, not their dependencies\.
.SH "PATCH LEVEL OPTIONS"
See bundle update(1) \fIbundle\-update\.1\.html\fR for details\.
.SH "FILTERING OUTPUT"
The 3 filtering options do not affect the resolution of versions, merely what versions are shown in the output\.
.P
If the regular output shows the following:
.IP "" 4
.nf
* Gem       Current  Latest  Requested  Groups
* faker     1\.6\.5    1\.6\.6   ~> 1\.4     development, test
* hashie    1\.2\.0    3\.4\.6   = 1\.2\.0    default
* headless  2\.2\.3    2\.3\.1   = 2\.2\.3    test
.fi
.IP "" 0
.P
\fB\-\-filter\-major\fR would only show:
.IP "" 4
.nf
* Gem       Current  Latest  Requested  Groups
* hashie    1\.2\.0    3\.4\.6   = 1\.2\.0    default
.fi
.IP "" 0
.P
\fB\-\-man/man1/irb.1000064400000006677150403121730007025 0ustar00man/man1/bundle-add.1000064400000005450150403121730010234 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-ADD" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
.SH "SYNOPSIS"
\fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT|\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-quiet] [\-\-skip\-install] [\-\-strict|\-\-optimistic]
.SH "DESCRIPTION"
Adds the named gem to the [\fBGemfile(5)\fR][Gemfile(5)] and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
.SH "OPTIONS"
.TP
\fB\-\-version=VERSION\fR, \fB\-v=VERSION\fR
Specify version requirements(s) for the added gem\.
.TP
\fB\-\-group=GROUP\fR, \fB\-g=GROUP\fR
Specify the group(s) for the added gem\. Multiple groups should be separated by commas\.
.TP
\fB\-\-source=SOURCE\fR, \fB\-s=SOURCE\fR
Specify the source for the added gem\.
.TP
\fB\-\-require=REQUIRE\fR, \fB\-r=REQUIRE\fR
Adds require path to gem\. Provide false, or a path as a string\.
.TP
\fB\-\-path=PATH\fR
Specify the file system path for the added gem\.
.TP
\fB\-\-git=GIT\fR
Specify the git source for the added gem\.
.TP
\fB\-\-github=GITHUB\fR
Specify the github source for the added gem\.
.TP
\fB\-\-branch=BRANCH\fR
Specify the git branch for the added gem\.
.TP
\fB\-\-ref=REF\fR
Specify the git ref for the added gem\.
.TP
\fB\-\-glob=GLOB\fR
Specify the location of a dependency's \.gemspec, expanded within Ruby (single quotes recommended)\.
.TP
\fB\-\-quiet\fR
Do not print progress information to the standard output\.
.TP
\fB\-\-skip\-install\fR
Adds the gem to the Gemfile but does not install it\.
.TP
\fB\-\-optimistic\fR
Adds optimistic declaration of version\.
.TP
\fB\-\-strict\fR
Adds strict declaration of version\.
.SH "EXAMPLES"
.IP "1." 4
You can add the \fBrails\fR gem to the Gemfile without any version restriction\. The source of the gem will be the global source\.
.IP
\fBbundle add rails\fR
.IP "2." 4
You can add the \fBrails\fR gem with version greater than 1\.1 (not including 1\.1) and less than 3\.0\.
.IP
\fBbundle add rails \-\-version "> 1\.1, < 3\.0"\fR
.IP "3." 4
You can use the \fBhttps://gems\.example\.com\fR custom source and assign the gem to a group\.
.IP
\fBbundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"\fR
.IP "4." 4
The following adds the \fBgem\fR entry to the Gemfile without installing the gem\. You can install gems later via \fBbundle install\fR\.
.IP
\fBbundle add rails \-\-skip\-install\fR
.IP "5." 4
You can assign the gem to more than one group\.
.IP
\fBbundle add rails \-\-group "development, test"\fR
.IP "" 0
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR, bundle\-remove(1) \fIbundle\-remove\.1\.html\fR
man/man1/bundle-exec.1000064400000015160150403121730010427 0ustar00.\"Ruby is copyrighted by Yukihiro Matsumoto <matz@netlab.jp>.
.Dd December 16, 2018
.Dt ERB \&1 "Ruby Programmer's Reference Guide"
.Os UNIX
.Sh NAME
.Nm erb
.Nd Ruby Templating
.Sh SYNOPSIS
.Nm
.Op Fl -version
.Op Fl UPdnvx
.Op Fl E Ar ext Ns Op Ns : Ns int
.Op Fl S Ar level
.Op Fl T Ar mode
.Op Fl r Ar library
.Op Fl -
.Op file ...
.Pp
.Sh DESCRIPTION
.Nm
is a command line front-end for
.Li "ERB"
library, which is an implementation of eRuby.
.Pp
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.
.Pp
.Nm
is a part of
.Nm Ruby .
.Pp
.Sh OPTIONS
.Bl -tag -width "1234567890123" -compact
.Pp
.It Fl -version
Prints the version of
.Nm .
.Pp
.It Fl E Ar external Ns Op : Ns Ar internal
.It Fl -encoding Ar external Ns Op : Ns Ar internal
Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:).
.Pp
You can omit the one for internal encodings, then the value
.Pf ( Li "Encoding.default_internal" ) will be nil.
.Pp
.It Fl P
Disables ruby code evaluation for lines beginning with
.Li "%" .
.Pp
.It Fl S Ar level
Specifies the safe level in which eRuby script will run.
.Pp
.It Fl T Ar mode
Specifies trim mode (default 0).
.Ar mode
can be one of
.Bl -hang -offset indent
.It Sy 0
EOL remains after the embedded ruby script is evaluated.
.Pp
.It Sy 1
EOL is removed if the line ends with
.Li "%>" .
.Pp
.It Sy 2
EOL is removed if the line starts with
.Li "<%"
and ends with
.Li "%>" .
.Pp
.It Sy -
EOL is removed if the line ends with
.Li "-%>" .
And leading whitespaces are removed if the erb directive starts with
.Li "<%-" .
.Pp
.El
.It Fl r
Load a library
.Pp
.It Fl U
can be one of
Sets the default value for internal encodings
.Pf ( Li "Encoding.default_internal" ) to UTF-8.
.Pp
.It Fl d
.It Fl -debug
Turns on debug mode.
.Li "$DEBUG"
will be set to true.
.Pp
.It Fl h
.It Fl -help
Prints a summary of the options.
.Pp
.It Fl n
Used with
.Fl x .
Prepends the line number to each line in the output.
.Pp
.It Fl v
Enables verbose mode.
.Li "$VERBOSE"
will be set to true.
.Pp
.It Fl x
Converts the eRuby script into Ruby script and prints it without line numbers.
.Pp
.El
.Pp
.Sh EXAMPLES
Here is an eRuby script
.Bd -literal -offset indent
<?xml version="1.0" ?>
<% require 'prime' -%>
<erb-example>
  <calc><%= 1+1 %></calc>
  <var><%= __FILE__ %></var>
  <library><%= Prime.each(10).to_a.join(", ") %></library>
</erb-example>
.Ed
.Pp
Command
.Dl "% erb -T - example.erb"
prints
.Bd -literal -offset indent
<?xml version="1.0" ?>
<erb-example>
  <calc>2</calc>
  <var>example.erb</var>
  <library>2, 3, 5, 7</library>
</erb-example>
.Ed
.Pp
.Sh SEE ALSO
.Xr ruby 1 .
.Pp
And see
.Xr ri 1
documentation for
.Li "ERB"
class.
.Pp
.Sh REPORTING BUGS
.Bl -bullet
.It
Security vulnerabilities should be reported via an email to
.Mt security@ruby-lang.org .
Reported problems will be published after being fixed.
.Pp
.It
Other bugs and feature requests can be reported via the
Ruby Issue Tracking System
.Pq Lk https://bugs.ruby-lang.org/ .
Do not report security vulnerabilities
via this system because it publishes the vulnerabilities immediately.
.El
.Sh AUTHORS
Written by Masatoshi SEKI.
man/man1/irb.1000064400000006677150403121730007025 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-EXEC" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
.
.SH "SYNOPSIS"
\fBbundle exec\fR [\-\-keep\-file\-descriptors] \fIcommand\fR
.
.SH "DESCRIPTION"
This command executes the command, making all gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] available to \fBrequire\fR in Ruby programs\.
.
.P
Essentially, if you would normally have run something like \fBrspec spec/my_spec\.rb\fR, and you want to use the gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] and installed via bundle install(1) \fIbundle\-install\.1\.html\fR, you should run \fBbundle exec rspec spec/my_spec\.rb\fR\.
.
.P
Note that \fBbundle exec\fR does not require that an executable is available on your shell\'s \fB$PATH\fR\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-keep\-file\-descriptors\fR
Exec in Ruby 2\.0 began discarding non\-standard file descriptors\. When this flag is passed, exec will revert to the 1\.9 behaviour of passing all file descriptors to the new process\.
.
.SH "BUNDLE INSTALL \-\-BINSTUBS"
If you use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR, Bundler will automatically create a directory (which defaults to \fBapp_root/bin\fR) containing all of the executables available from gems in the bundle\.
.
.P
After using \fB\-\-binstubs\fR, \fBbin/rspec spec/my_spec\.rb\fR is identical to \fBbundle exec rspec spec/my_spec\.rb\fR\.
.
.SH "ENVIRONMENT MODIFICATIONS"
\fBbundle exec\fR makes a number of changes to the shell environment, then executes the command you specify in full\.
.
.IP "\(bu" 4
make sure that it\'s still possible to shell out to \fBbundle\fR from inside a command invoked by \fBbundle exec\fR (using \fB$BUNDLE_BIN_PATH\fR)
.
.IP "\(bu" 4
put the directory containing executables (like \fBrails\fR, \fBrspec\fR, \fBrackup\fR) for your bundle on \fB$PATH\fR
.
.IP "\(bu" 4
make sure that if bundler is invoked in the subshell, it uses the same \fBGemfile\fR (by setting \fBBUNDLE_GEMFILE\fR)
.
.IP "\(bu" 4
add \fB\-rbundler/setup\fR to \fB$RUBYOPT\fR, which makes sure that Ruby programs invoked in the subshell can see the gems in the bundle
.
.IP "" 0
.
.P
It also modifies Rubygems:
.
.IP "\(bu" 4
disallow loading additional gems not in the bundle
.
.IP "\(bu" 4
modify the \fBgem\fR method to be a no\-op if a gem matching the requirements is in the bundle, and to raise a \fBGem::LoadError\fR if it\'s not
.
.IP "\(bu" 4
Define \fBGem\.refresh\fR to be a no\-op, since the source index is always frozen when using bundler, and to prevent gems from the system leakman/man1/bundle-check.1000064400000001704150403121730010557 0ustar00man/man1/bundle-exec.1000064400000015104150403121730010425 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-EXEC" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
.SH "SYNOPSIS"
\fBbundle exec\fR [\-\-keep\-file\-descriptors] [\-\-gemfile=GEMFILE] \fIcommand\fR
.SH "DESCRIPTION"
This command executes the command, making all gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] available to \fBrequire\fR in Ruman/man1/bundle.1000064400000007375150403121730007516 0ustar00tting it to false is now deprecated\.
.TP
\fB\-\-gemfile=GEMFILE\fR
Use the specified gemfile instead of [\fBGemfile(5)\fR][Gemfile(5)]\.
.SH "BUNDLE INSTALL \-\-BINSTUBS"
If you use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR, Bundler will automatically create a directory (which defaults to \fBapp_root/bin\fR) containing all of the executables available from gems in the bundle\.
.P
After using \fB\-\-binstubs\fR, \fBbin/rspec spec/my_spec\.rb\fR is identical to \fBbundle exec rspec spec/my_spec\.rb\fR\.
.SH "ENVIRONMENT MODIFICATIONS"
\fBbundle exec\fR makes a number of changes to the shell environment, then executes the command you specify in full\.
.IP "\(bu" 4
make sure that it's still possible to shell out to \fBbundle\fR from inside a command invoked by \fBbundle exec\fR (using \fB$BUNDLE_BIN_PATH\fR)
.IP "\(bu" 4
put the directory containing executables (like \fBrails\fR, \fBrspec\fR, \fBrackup\fR) for your bundle on \fB$PATH\fR
.IP "\(bu" 4
make sure that if bundler is invoked in the subshell, it uses the same \fBGemfile\fR (by setting \fBBUNDLE_GEMFILE\fR)
.IP "\(bu" 4
add \fB\-rbundler/setup\fR to \fB$RUBYOPT\fR, which makes sure that Ruby programs invoked in the subshell can see the gems in the bundle
.IP "" 0
.P
It also modifies Rubygems:
.IP "\(bu" 4
disallow loading additional gems not in the bundle
.IP "\(bu" 4
modify the \fBgem\fR method to be a no\-op if a gem matching the requirements is in the bundle, and to raise a \fBGem::LoadError\fR if it's not
.IP "\(bu" 4
Define \fBGem\.refresh\fR to be a no\-op, since the source index is always frozen when using bundler, and to prevent gems from the system leaking into the environment
.IP "\(bu" 4
Override \fBGem\.bin_path\fR to use the gems in the bundle, making system executables work
.IP "\(bu" 4
Add all gems in the bundle into Gem\.loaded_specs
.IP "" 0
.P
Finally, \fBbundle exec\fR also implicitly modifies \fBGemfile\.lock\fR if the lockfile and the Gemfile do not match\. Bundler needs the Gemfile to determine things such as a gem's groups, \fBautorequire\fR, and platforms, etc\., and that information isn't stored in the lockfile\. The Gemfile and lockfile must be synced in order to \fBbundle exec\fR successfully, so \fBbundle exec\fR updates the lockfile beforehand\.
.SS "Loading"
By default, when attempting to \fBbundle exec\fR to a file with a ruby shebang, Bundler will \fBKernel\.load\fR that file instead of using \fBKernel\.exec\fR\. For the vast majority of cases, this is a performance improvement\. In a rare few cases, this could cause some subtle side\-effects (such as dependence on the exact contents of \fB$0\fR or \fB__FILE__\fR) and the optimization can be disabled by enabling the \fBdisable_exec_load\fR setting\.
.SS "Shelling out"
Any Ruby code that opens a subshell (like \fBsystem\fR, backticks, or \fB%x{}\fR) will automatically use the current Bundler environment\. If you need to shell out to a Ruby command that is not part of your current bundle, use the \fBwith_unbundled_env\fR method with a block\. Any subshells created inside the block will be given the environment present before Bundler was activated\. For example, Homebrew commands run Ruby, but don't work inside a bundle:
.IP "" 4
.nf
Bundler\.with_unbundled_env do
  `brew install wget`
end
.fi
.IP "" 0
.P
Using \fBwith_unbundled_env\fR is also necessary if you are shelling out to a different bundle\. Any Bundler commands run in a subshell will inherit the current Gemfile, so commands that need to run in the context of a different bundle also need to use \fBwith_unbundled_env\fR\.
.IP "" 4
.nf
Bundler\.with_unbundled_env do
  Dir\.chdir "/other/bundler/project" do
    `bundle exec \./script`
  end
end
.fi
.IP "" 0
.P
Bundler provides convenience helpers that wrap \fBsystem\fR and \fBexec\fR, and man/man1/bundle-init.1000064400000002215150403121740010444 0ustar00Rubygems would activate \fBgemcutter 0\.5\fR and \fBjson_pure <latest>\fR\.
.P
If your Gemfile(5) also contained \fBjson_pure\fR (or a gem with a dependency on \fBjson_pure\fR), the latest version on your system might conflict with the version in your Gemfile(5), or the snapshot version in your \fBGemfile\.lock\fR\.
.P
If this happens, bundler will say:
.IP "" 4
.nf
You have already activated json_pure 1\.4\.6 but your Gemfile
requires json_pure 1\.4\.3\. Consider using bundle exec\.
.fi
.IP "" 0
.P
In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin\. In general, the authors of these plugins (in this case, the \fBgemcutter\fR gem) have released newer versions that are more careful in their plugins\.
.P
You can find a list of all the gems containing gem plugins by running
.IP "" 4
.nf
ruby \-e "puts Gem\.find_files('rubygems_plugin\.rb')"
.fi
.IP "" 0
.P
At the very least, you should remove all but the newest version of each gem plugin, and also remove all gem plugins that you aren't using (\fBgem uninstall gem_name\fR)\.
man/man1/bundle-info.1000064400000000737150403121740010443 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CHECK" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
.SH "SYNOPSIS"
\fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE] [\-\-path=PATH]
.SH "DESCRIPTION"
\fBcheck\fR searches the local machine for each of the gems requested in the Gemfile\. If all gems are found, Bundler prints a success message and exits with a sman/man1/bundle-remove.1000064400000001517150403121740011002 0ustar00_HOME\fR)\. Bundler will remember this value for future installs on this machine\.

man/man1/bundle.1000064400000007260150403121730007507 0ustar00man/man1/bundle-show.1000064400000001260150403121740010460 0ustar00tion on the \fBGemfile\fR format\.
.SH "OPTIONS"
.TP
\fB\-\-no\-color\fR
Print all output without color
.TP
\fB\-\-retry\fR, \fB\-r\fR
Specify the number of times you wish to attempt network commands
.TP
\fB\-\-verbose\fR, \fB\-V\fR
Print out additional logging information
.SH "BUNDLE COMMANDS"
We divide \fBbundle\fR subcommands into primary commands and utilities:
.SH "PRIMARY COMMANDS"
.TP
\fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR
Install the gems specified by the \fBGemfile\fR or \fBGemfile\.lock\fR
.TP
\fBbundle update(1)\fR \fIbundle\-update\.1\.html\fR
Update dependencies to their latest versions
.TP
\fBbundle cache(1)\fR \fIbundle\-cache\.1\.html\fR
Package thman/man1/bundle-binstubs.1000064400000003116150403121740011333 0ustar00ow\.1\.html\fR
Show the source location of a particular gem in the bundle
.TP
\fBbundle outdated(1)\fR \fIbundle\-outdated\.1\.html\fR
Show all of the outdated gems in the current bundle
.TP
\fBbundle console(1)\fR (deprecated)
Start an IRB session in the current bundle
.TP
\fBbundle open(1)\fR \fIbundle\-open\.1\.html\fR
Open an installed gem in the editor
.TP
\fBbundle lock(1)\fR \fIbundle\-lock\.1\.html\fR
Generate a lockfile for your dependencies
.TP
\fBbundle viz(1)\fR \fIbundle\-viz\.1\.html\fR (deprecated)
Generate a visual representation of your dependencies
.TP
\fBbundle init(1)\fR \fIbundle\-init\.1\.html\fR
Generate a simple \fBGemfile\fR, placed in the current directory
.TP
\fBbundle gem(1)\fR \fIbundle\-gem\.1\.html\fR
Create a simple gem, suitable for development with Bundler
.TP
\fBbundle platform(1)\fR \fIbundle\-platform\.1\.html\fR
Display platform compatibility information
.TP
\fBbundle clean(1)\fR \fIbundle\-clean\.1\.html\fR
Clean up unused gems in your Bundler directory
.TP
\fBbundle doctor(1)\fR \fIbundle\-doctor\.1\.html\fR
Display warnings about common problems
.TP
\fBbundle remove(1)\fR \fIbundle\-remove\.1\.html\fR
Removes gems from the Gemfile
.TP
\fBbundle plugin(1)\fR \fIbundle\-plugin\.1\.html\fR
Manage Bundler plugins
.TP
\fBbundle version(1)\fR \fIbundle\-version\.1\.html\fR
Prints Bundler version information
.SH "PLUGINS"
When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES, Bundler will try to find an executable on your path named \fBbundler\-<command>\fR and execute it, passing down any extra arguments to it\.
.SH "OBSOLETE"
These man/man1/ri.1000064400000010203150403121740006640 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-INIT" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
.SH "SYNOPSIS"
\fBbundle init\fR [\-\-gemspec=FILE]
.SH "DESCRIPTION"
Init generates a default [\fBGemfile(5)\fR][Gemfile(5)] in the current working directory\. When adding a [\fBGemfile(5)\fR][Gemfile(5)] to a gem with a gemspec, the \fB\-\-gemspec\fR option will automatically add each dependency listed in the gemspec file to the newly created [\fBGemfile(5)\fR][Gemfile(5)]\.
.SH "OPTIONS"
.TP
\fB\-\-gemspec=GEMSPEC\fR
Use the specified \.gemspec to create the [\fBGemfile(5)\fR][Gemfile(5)]
.TP
\fB\-\-gemfile=GEMFILE\fR
Use the specified name for the gemfile instead of \fBGemfile\fR
.SH "FILES"
Included in the default [\fBGemfile(5)\fR][Gemfile(5)] generated is the line \fB# frozen_string_literal: true\fR\. This is a magic comment supported for the first time in Ruby 2\.3\. The presence of this line results in all string literals in the file being implicitly frozen\.
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR
man/man1/bundle-info.1000064400000001014150403121740010430 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-INFO" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle
.SH "SYNOPSIS"
\fBbundle info\fR [GEM_NAME] [\-\-path] [\-\-version]
.SH "DESCRIPTION"
Given a gem name present in your bundle, print the basic information about it such as homepage, version, path and summary\.
.SH "OPTIONS"
.TP
\fB\-\-path\fR
Print the path of the given gem
.TP
\fB\-\-version\fR
Print gem version

man/man1/bundle-remove.1000064400000001504150403121740010776 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-REMOVE" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile
.SH "SYNOPSIS"
\fBbundle remove [GEM [GEM \|\.\|\.\|\.]] [\-\-install]\fR
.SH "DESCRIPTION"
Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid\. If a gem cannot be removed, a warning is printed\. If a gem is already absent from the Gemfile, and error is raised\.
.SH "OPTIONS"
.TP
\fB\-\-install\fR
Runs \fBbundle install\fR after the given gems have been removed from the Gemfile, which ensures that both man/man1/bundle-viz.1000064400000002335150403121740010314 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-SHOW" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
.SH "SYNOPSIS"
\fBbundle show\fR [GEM] [\-\-paths] [\-\-outdated]
.SH "DESCRIPTION"
Without the [GEM] option, \fBshow\fR will print a list of the names and versions of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by name\.
.P
Calling show with [GEM] will list the exact location of that gem on your machine\.
.SH "OPTIONS"
.TP
\fB\-\-paths\fR
List the paths of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by gem name\.
.TP
\fB\-\-outdated\fR
Show verbose output including whether gems are outdated\.

man/man1/bundle-binstubs.1000064400000003235150403121740011335 0man/man1/bundle-doctor.1000064400000002213150403121740010771 0ustar00ubs are a shortcut\-or alternative\- to always using \fBbundle exec\fR\. This gives you a file that can be run directly, and one that will always run the correct gem version used by the application\.
.P
For example, if you run \fBbundle binstubs rspec\-core\fR, Bundler will create the file \fBbin/rspec\fR\. That file will contain enough code to load Bundler, tell it to load the bundled gems, and then run rspec\.
.P
This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are put into \fBbin\fR, or the \fB\-\-path\fR directory if one has been set\. Calling binstubs with [GEM [GEM]] will create binstubs for all given gems\.
.SH "OPTIONS"
.TP
\fB\-\-force\fR
Overwrite existing binstubs if they exist\.
.TP
\fB\-\-path[=PATH]\fR
The location to install the specified binstubs to\. This defaults to \fBbin\fR\.
.TP
\fB\-\-standalone\fR
Makes binstubs that can work without depending on Rubygems or Bundler at runtime\.
.TP
\fB\-\-shebang=SHEBANG\fR
Specify a different shebang executable name than the default (default 'ruby')
.TP
\fB\-\-all\fR
Create binstubs for all gems in the bundle\.
.TP
\fB\-\-all\-platforms\fR
Install binstubs forman/man1/bundle-config.1000064400000052432150403121740010754 0ustar00.\"Ruby is copyrighted by Yukihiro Matsumoto <matz@netlab.jp>.
.Dd April 20, 2017
.Dt RI \&1 "Ruby Programmer's Reference Guide"
.Os UNIX
.Sh NAME
.Nm ri
.Nd Ruby API reference front end
.Sh SYNOPSIS
.Nm
.Op Fl ahilTv
.Op Fl d Ar DIRNAME
.Op Fl f Ar FORMAT
.Op Fl w Ar WIDTH
.Op Fl - Ns Oo Cm no- Oc Ns Cm pager
.Op Fl -server Ns Oo = Ns Ar PORT Oc
.Op Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs
.Op Fl -no-standard-docs
.Op Fl - Ns Oo Cm no- Oc Ns Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc
.Op Fl - Ns Oo Cm no- Oc Ns Cm profile
.Op Fl -dump Ns = Ns Ar CACHE
.Op Ar name ...
.Sh DESCRIPTION
.Nm
is a command-line front end for the Ruby API reference.
You can search and read the API reference for classes and methods with
.Nm .
.Pp
.Nm
is a part of Ruby.
.Pp
.Ar name
can be:
.Bl -diag -offset indent
.It Class | Module | Module::Class
.Pp
.It Class::method | Class#method | Class.method | method
.Pp
.It gem_name: | gem_name:README | gem_name:History
.El
.Pp
All class names may be abbreviated to their minimum unambiguous form.
If a name is ambiguous, all valid options will be listed.
.Pp
A
.Ql \&.
matches either class or instance methods, while #method
matches only instance and ::method matches only class methods.
.Pp
README and other files may be displayed by prefixing them with the gem name
they're contained in.  If the gem name is followed by a
.Ql \&:
all files in the gem will be shown.
The file name extension may be omitted where it is unambiguous.
.Pp
For example:
.Bd -literal -offset indent
ri Fil
ri File
ri File.new
ri zip
ri rdoc:README
.Ed
.Pp
Note that shell quoting or escaping may be required for method names
containing punctuation:
.Bd -literal -offset indent
ri 'Array.[]'
ri compact\e!
.Ed
.Pp
To see the default directories
.Nm
will search, run:
.Bd -literal -offset indent
ri --list-doc-dirs
.Ed
.Pp
Specifying the
.Fl -system , Fl -site , Fl -home , Fl -gems ,
or
.Fl -doc-dir
options will limit
.Nm
to searching only the specified directories.
.Pp
.Nm
options may be set in the
.Ev RI
environment variable.
.Pp
The
.Nm
pager can be set with the
.Ev RI_PAGER
environment variable or the
.Ev PAGER
environment variable.
.Pp
.Sh OPTIONS
.Bl -tag -width "1234567890123" -compact
.Pp
.It Fl i
.It Fl - Ns Oo Cm no- Oc Ns Cm interactive
In interactive mode you can repeatedly
look up methods with autocomplete.
.Pp
.It Fl a
.It Fl - Ns Oo Cm no- Oc Ns Cm all
Show all documentation for a class or module.
.Pp
.It Fl l
.It Fl - Ns Oo Cm no- Oc Ns Cm list
List classes
.Nm
knows about.
.Pp
.It Fl - Ns Oo Cm no- Oc Ns Cm pager
Send output to a pager,
rather than directly to stdout.
.Pp
.It Fl T
Synonym for
.Fl -no-pager .
.Pp
.It Fl w Ar WIDTH
.It Fl -width Ns = Ns Ar WIDTH
Set the width of the output.
.Pp
.It Fl -server Ns Oo = Ns Ar PORT Oc
Run RDoc server on the given port.
The default port is\~8214.
.Pp
.It Fl f Ar FORMAT
.It Fl -format Ns = Ns Ar FORMAT
Use the selected formatter.
The default formatter is
.Li bs
for paged output and
.Li ansi
otherwise.
Valid formatters are:
.Li ansi , Li bs , Li markdown , Li rdoc .
.Pp
.It Fl h
.It Fl -help
Show help and exit.
.Pp
.It Fl v
.It Fl -version
Output version information and exit.
.El
.Pp
Data source options:
.Bl -tag -width "1234567890123" -compact
.Pp
.It Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs
List the directories from which
.Nm
will source documentation on stdout and exit.
.Pp
.It Fl d Ar DIRNAME
.It Fl -doc-dir Ns = Ns Ar DIRNAME
List of directories from which to source
documentation in addition to the standard
directories.  May be repeated.
.Pp
.It Fl -no-standard-docs
Do not include documentation from the Ruby standard library,
.Pa site_lib ,
installed gems, or
.Pa ~/.rdoc .
Use with
.Fl -doc-dir .
.Pp
.It Fl - Ns Oo Cm no- Oc Ns Cm system
Include documentation from Ruby's standard library.  Defaults to true.
.Pp
.It Fl - Ns Oo Cm no- Oc Ns Cm site
Include documentation from libraries installed in
.Pa site_lib .
Defaults to true.
.Pp
.It Fl - Ns Oo Cm no- Oc Ns Cm gems
Include documentation from RubyGems.  Defaults to true.
.Pp
.It Fl - Ns Oo Cm no- Oc Ns Cm home
Include documentation stored in
.Pa ~/.rdoc .
Defaults to true.
.El
.Pp
Debug options:
.Bl -tag -width "1234567890123" -compact
.Pp
.It Fl - Ns Oo Cm no- Oc Ns Cm profile
Run with the Ruby profiler.
.Pp
.It Fl -dump Ns = Ns Ar CACHE
Dump data from an ri cache or data file.
.El
.Pp
.Sh ENVIRONMENT
.Bl -tag -width "USERPROFILE" -compact
.Pp
.It Ev RI
Options to prepend to those specified on the command-line.
.Pp
.It Ev RI_PAGER
.It Ev PAGER
Pager program to use for displaying.
.Pp
.It Ev HOME
.It Ev USERPROFILE
.It Ev HOMEPATH
Path to the user's home directory.
.El
.Pp
.Sh FILES
.Bl -tag -width "USERPROFILE" -compact
.Pp
.It Pa ~/.rdoc
Path for ri data in the user's home directory.
.Pp
.El
.Pp
.Sh SEE ALSO
.Xr ruby 1 ,
.Xr rdoc 1 ,
.Xr gem 1
.Pp
.Sh REPORTING BUGS
.Bl -bullet
.It
Security vulnerabilities should be reported via an email to
.Mt security@ruby-lang.org .
Reported problems will be published after being fixed.
.Pp
.It
Other bugs and feature requests can be reported via the
Ruby Issue Tracking System
.Pq Lk https://bugs.ruby-lang.org/ .
Do not report security vulnerabilities
via this system because it publishes the vulnerabilities immediately.
.El
.Sh AUTHORS
Written by
.An Dave Thomas Aq dave@pragmaticprogrammer.com .
man/man1/bundle-viz.1000064400000002364150403121740010316 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-VIZ" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
.SH "SYNOPSIS"
\fBbundle viz\fR [\-\-file=FILE] [\-\-format=FORMAT] [\-\-requirements] [\-\-version] [\-\-without=GROUP GROUP]
.SH "DESCRIPTION"
\fBviz\fR generates a PNG file of the current \fBGemfile(5)\fR as a dependency graph\. \fBviz\fR requires the ruby\-graphviz gem (and its dependencies)\.
.P
The associated gems must also be installed via \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR\.
.P
\fBviz\fR command was deprecated in Bundler 2\.2\. Use bundler\-graph plugin \fIhttps://github\.com/rubygems/bundler\-graph\fR instead\.
.SH "OPTIONS"
.TP
\fB\-\-file=FILE\fR, \fB\-f=FILE\fR
The name to use for the generated file\. See \fB\-\-format\fR option
.TP
\fB\-\-format=FORMAT\fR, \fB\-F=FORMAT\fR
This is output format option\. Supported format is png, jpg, svg, dot \|\.\|\.\|\.
.TP
\fB\-\-requirements\fR, \fB\-R\fR
Set to show the version of each required dependency\.
.TP
\fB\-\-version\fR, \fB\-v\fR
Set to show each gem version\.
.TP
\fB\-\-without=<list>\fR, \fB\-W=<list>\fR
Exclude gems that are part of the specified named group\.

man/man1/bundle-doctor.1000064400000002157150403121740011000 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-DOCTOR" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems
.SH "SYNOPSIS"
\fBbundle doctor\fR [\-\-quiet] [\-\-gemfile=GEMFILE]
.SH "DESCRIPTION"
Checks your Gemfile and gem environment for common problems\. If issues are detected, Bundler prints them and exits status 1\. Otherwise, Bundler prints a success message and exits status 0\.
.P
Examples of common problems caught by bundle\-doctor include:
.IP "\(bu" 4
Invalid Bundler settings
.IP "\(bu" 4
Mismatched Ruby versions
.IP "\(bu" 4
Mismatched platforms
.IP "\(bu" 4
Uninstalled gems
.IP "\(bu" 4
Missing dependencies
.IP "" 0
.SH "OPTIONS"
.TP
\fB\-\-quiet\fR
Only output warnings and errors\.
.TP
\fB\-\-gemfile=GEMFILE\fR
The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project's root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.

man/man1/bundle-config.1000064400000052131150403121740010750 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CONFIG" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options
.SH "SYNOPSIS"
\fBbundle config\fR list
.br
\fBbundle config\fR [get] NAME
.br
\fBbundle config\fR [set] NAME VALUE
.br
\fBbundle config\fR unset NAME
.SH "DESCRIPTION"
This command allows you to interact with Bundler's configuration system\.
.P
Bundler loads configuration settings in this order:
.IP "1." 4
Local config (\fB<project_root>/\.bundle/config\fR or \fB$BUNDLE_APP_CONFIG/config\fR)
.IP "2." 4
Environmental variables (\fBENV\fR)
.IP "3." 4
Global config (\fB~/\.bundle/config\fR)
.IP "4." 4
Bundler default config
.IP "" 0
.P
Executing \fBbundle config list\fR will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
.P
Executing \fBbundle config get <name>\fR will print the value of that configuration setting, and where it was set\.
.P
Executing \fBbundle config set <name> <value>\fR defaults to setting \fBlocal\fR configuration if executing from within a local application, otherwise it will set \fBglobal\fR configuration\. See \fB\-\-local\fR and \fB\-\-global\fR options below\.
.P
Executing \fBbundle config set \-\-local <name> <value>\fR will set that configuration in the directory for the local application\. The configuration will be stored in \fB<project_root>/\.bundle/config\fR\. If \fBBUNDLE_APP_CONFIG\fR is set, the configuration will be stored in \fB$BUNDLE_APP_CONFIG/config\fR\.
.P
Executing \fBbundle config set \-\-global <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\. If \fIname\fR already is set, \fIname\fR will be overridden and user will be warned\.
.P
Executing \fBbundle config unset <name>\fR will delete the configuration in both local and global sources\.
.P
Executing \fBbundle config unset \-\-global <name>\fR will delete the configuration only from the user configuration\.
.P
Executing \fBbundle config unset \-\-local <name>\fR will delete the configuration only from the local application\.
.P
Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
.SH "REMEMBERING OPTIONS"
Flags passed to \fBbundle install\fR or the Bundler runtime, such as \fB\-\-path foo\fR or \fB\-\-without production\fR, are remembered between commands and saved to your local application's configuration (normally, \fB\./\.bundle/config\fR)\.
.P
However, this will be changed in bundler 3, so it's better not to rely on this behavior\. If these options must be remembered, it's better to set them using \fBbundle config\fR (e\.g\., \fBbundle config set \-\-local path foo\fR)\.
.P
The options that can be configured are:
.TP
\fBbin\fR
Creates a directory (defaults to \fB~/bin\fR) and place any executables from the gem there\. These executables run in Bundler's context\. If used, you might add this directory to your environment's \fBPATH\fR variable\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all referred dependencies will be resolved using the bundled gems\.
.TP
\fBdeployment\fR
In deployment mode, Bundler will 'roll\-out' the bundle for \fBproduction\fR use\. Please check carefully if you want to have this option enabled in \fBdevelopment\fR or \fBtest\fR environments\.
.TP
\fBonly\fR
A space\-separated list of groups to install only gems of the specified groups\. Please check carefully if you want to install also gems without a group, cause they get put inside \fBdefault\fR group\. For example \fBonly test:default\fR will install all gems specified in test group and without one\.
.TP
\fBpath\fR
The location to install the specified gems to\. This defaults to Rubygems' setting\. Bundler shares this location with Rubygems, \fBgem install \|\.\|\.\|\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \|\.\|\.\|\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
.TP
\fBwithout\fR
A space\-separated or \fB:\fR\-separated list of groups referencing gems to skip during installation\.
.TP
\fBwith\fR
A space\-separated or \fB:\fR\-separated list of \fBoptional\fR groups referencing gems to include during installation\.
.SH "BUILD OPTIONS"
You can use \fBbundle config\fR to give Bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
.P
A very common example, the \fBmysql\fR gem, requires Snow Leopard users to pass configuration flags to \fBgem install\fR to specify where to find the \fBmysql_config\fR executable\.
.IP "" 4
.nf
gem install mysql \-\- \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
.fi
.IP "" 0
.P
Since the specific location of that executable can change from machine to machine, you can specify these flags on a per\-machine basis\.
.IP "" 4
.nf
bundle config set \-\-global build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
.fi
.IP "" 0
.P
After running this command, every time bundler needs to install the \fBmysql\fR gem, it will pass along the flags you specified\.
.SH "CONFIGURATION KEYS"
Configuration keys in bundler have two forms: the canonical form and the environment variable form\.
.P
For instance, passing the \fB\-\-without\fR flag to bundle install(1) \fIbundle\-install\.1\.html\fR prevents Bundler from installing certain groups specified in the Gemfile(5)\. Bundler persists this value in \fBapp/\.bundle/config\fR so that calls to \fBBundler\.setup\fR do not try to find gems from the \fBGemfile\fR that you didn't install\. Additionally, subsequent calls to bundle install(1) \fIbundle\-install\.1\.html\fR remember this setting and skip those groups\.
.P
The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
.P
Any periods in the configuration keys must be replaced with two underscores when setting it via environment variables\. The configuration key \fBlocal\.rack\fR becomes the environment variable \fBBUNDLE_LOCAL__RACK\fR\.
.SH "LIST OF AVAILABLE KEYS"
The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
.IP "\(bu" 4
\fBallow_offline_install\fR (\fBBUNDLE_ALLOW_OFFLINE_INSTALL\fR): Allow Bundler to use cached data when installing without network access\.
.IP "\(bu" 4
\fBauto_clean_without_path\fR (\fBBUNDLE_AUTO_CLEAN_WITHOUT_PATH\fR): Automatically run \fBbundle clean\fR after installing when an explicit \fBpath\fR has not been set and Bundler is not installing into the system gems\.
.IP "\(bu" 4
\fBauto_install\fR (\fBBUNDLE_AUTO_INSTALL\fR): Automatically run \fBbundle install\fR when gems are missing\.
.IP "\(bu" 4
\fBbin\fR (\fBBUNDLE_BIN\fR): Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
.IP "\(bu" 4
\fBcache_all\fR (\fBBUNDLE_CACHE_ALL\fR): Cache all gems, including path and git gems\. This needs to be explicitly configured on bundler 1 and bundler 2, but will be the default on bundler 3\.
.IP "\(bu" 4
\fBcache_all_platforms\fR (\fBBUNDLE_CACHE_ALL_PLATFORMS\fR): Cache gems for all platforms\.
.IP "\(bu" 4
\fBcache_path\fR (\fBBUNDLE_CACHE_PATH\fR): The directory that bundler will place cached gems in when running \fBbundle package\fR, and that bundler will look in when installing gems\. Defaults to \fBvendor/cache\fR\.
.IP "\(bu" 4
\fBclean\fR (\fBBUNDLE_CLEAN\fR): Whether Bundler should run \fBbundle clean\fR automatically after \fBbundle install\fR\.
.IP "\(bu" 4
\fBconsole\fR (\fBBUNDLE_CONSOLE\fR): The console that \fBbundle console\fR starts\. Defaults to \fBirb\fR\.
.IP "\(bu" 4
\fBdefault_install_uses_path\fR (\fBBUNDLE_DEFAULT_INSTALL_USES_PATH\fR): Whether a \fBbundle install\fR without an explicit \fB\-\-path\fR argument defaults to installing gems in \fB\.bundle\fR\.
.IP "\(bu" 4
\fBdeployment\fR (\fBBUNDLE_DEPLOYMENT\fR): Disallow changes to the \fBGemfile\fR\. When the \fBGemfile\fR is changed and the lockfile has not been updated, running Bundler commands will be blocked\.
.IP "\(bu" 4
\fBdisable_checksum_validation\fR (\fBBUNDLE_DISABLE_CHECKSUM_VALIDATION\fR): Allow installing gems even if they do not match the checksum provided by RubyGems\.
.IP "\(bu" 4
\fBdisable_exec_load\fR (\fBBUNDLE_DISABLE_EXEC_LOAD\fR): Stop Bundler from using \fBload\fR to launch an executable in\-process in \fBbundle exec\fR\.
.IP "\(bu" 4
\fBdisable_local_branch_check\fR (\fBBUNDLE_DISABLE_LOCAL_BRANCH_CHECK\fR): Allow Bundler to use a local git override without a branch specified in the Gemfile\.
.IP "\(bu" 4
\fBdisable_local_revision_check\fR (\fBBUNDLE_DISABLE_LOCAL_REVISION_CHECK\fR): Allow Bundler to use a local git override without checking if the revision present in the lockfile is present in the repository\.
.IP "\(bu" 4
\fBdisable_shared_gems\fR (\fBBUNDLE_DISABLE_SHARED_GEMS\fR): Stop Bundler from accessing gems installed to RubyGems' normal location\.
.IP "\(bu" 4
\fBdisable_version_check\fR (\fBBUNDLE_DISABLE_VERSION_CHECK\fR): Stop Bundler from checking if a newer Bundler version is available on rubygems\.org\.
.IP "\(bu" 4
\fBforce_ruby_platform\fR (\fBBUNDLE_FORCE_RUBY_PLATFORM\fR): Ignore the current machine's platform and install only \fBruby\fR platform gems\. As a result, gems with native extensions will be compiled from source\.
.IP "\(bu" 4
\fBfrozen\fR (\fBBUNDLE_FROZEN\fR): Disallow changes to the \fBGemfile\fR\. When the \fBGemfile\fR is changed and the lockfile has not been updated, running Bundler commands will be blocked\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
.IP "\(bu" 4
\fBgem\.github_username\fR (\fBBUNDLE_GEM__GITHUB_USERNAME\fR): Sets a GitHub username or organization to be used in \fBREADME\fR file when you create a new gem via \fBbundle gem\fR command\. It can be overridden by passing an explicit \fB\-\-github\-username\fR flag to \fBbundle gem\fR\.
.IP "\(bu" 4
\fBgem\.push_key\fR (\fBBUNDLE_GEM__PUSH_KEY\fR): Sets the \fB\-\-key\fR parameter for \fBgem push\fR when using the \fBrake release\fR command with a private gemstash server\.
.IP "\(bu" 4
\fBgemfile\fR (\fBBUNDLE_GEMFILE\fR): The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
.IP "\(bu" 4
\fBglobal_gem_cache\fR (\fBBUNDLE_GLOBAL_GEM_CACHE\fR): Whether Bundler should cache all gems globally, rather than locally to the installing Ruby installation\.
.IP "\(bu" 4
\fBignore_funding_requests\fR (\fBBUNDLE_IGNORE_FUNDING_REQUESTS\fR): When set, no funding requests will be printed\.
.IP "\(bu" 4
\fBignore_messages\fR (\fBBUNDLE_IGNORE_MESSAGES\fR): When set, no post install messages will be printed\. To silence a single gem, use dot notation like \fBignore_messages\.httparty true\fR\.
.IP "\(bu" 4
\fBinit_gems_rb\fR (\fBBUNDLE_INIT_GEMS_RB\fR): Generate a \fBgems\.rb\fR instead ofman/man1/bundle-package.1000064400000006376150403121740011110 0ustar00
.IP "\(bu" 4
\fBpath\fR (\fBBUNDLE_PATH\fR): The location on disk where all gems in your bundle will be located regardless of \fB$GEM_HOME\fR or \fB$GEM_PATH\fR values\. Bundle gems not found in this location will be installed by \fBbundle install\fR\. Defaults to \fBGem\.dir\fR\. When \-\-deployment is used, defaults to vendor/bundle\.
.IP "\(bu" 4
\fBpath\.system\fR (\fBBUNDLE_PATH__SYSTEM\fR): Whether Bundler will install gems into the default system path (\fBGem\.dir\fR)\.
.IP "\(bu" 4
\fBpath_relative_to_cwd\fR (\fBBUNDLE_PATH_RELATIVE_TO_CWD\fR) Makes \fB\-\-path\fR relative to the CWD instead of the \fBGemfile\fR\.
.IP "\(bu" 4
\fBplugins\fR (\fBBUNDLE_PLUGINS\fR): Enable Bundler's experimental plugin system\.
.IP "\(bu" 4
\fBprefer_patch\fR (BUNDLE_PREFER_PATCH): Prefer updating only to next patch version during updates\. Makes \fBbundle update\fR calls equivalent to \fBbundler update \-\-patch\fR\.
.IP "\(bu" 4
\fBprint_only_version_number\fR (\fBBUNDLE_PRINT_ONLY_VERSION_NUMBER\fR): Print only version number from \fBbundler \-\-version\fR\.
.IP "\(bu" 4
\fBredirect\fR (\fBBUNDLE_REDIRECT\fR): The number of redirects allowed for network requests\. Defaults to \fB5\fR\.
.IP "\(bu" 4
\fBretry\fR (\fBBUNDLE_RETRY\fR): The number of times to retry failed network requests\. Defaults to \fB3\fR\.
.IP "\(bu" 4
\fBsetup_makes_kernel_gem_public\fR (\fBBUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC\fR): Have \fBBundler\.setup\fR make the \fBKernel#gem\fR method public, even though RubyGems declares it as private\.
.IP "\(bu" 4
\fBshebang\fR (\fBBUNDLE_SHEBANG\fR): The program name that should be invoked for generated binstubs\. Defaults to the ruby install name used to generate the binstub\.
.IP "\(bu" 4
\fBsilence_deprecations\fR (\fBBUNDLE_SILENCE_DEPRECATIONS\fR): Whether Bundler should silence deprecation warnings for behavior that will be changed in the next major version\.
.IP "\(bu" 4
\fBsilence_root_warning\fR (\fBBUNDLE_SILENCE_ROOT_WARNING\fR): Silence the warning Bundler prints when installing gems as root\.
.IP "\(bu" 4
\fBssl_ca_cert\fR (\fBBUNDLE_SSL_CA_CERT\fR): Path to a designated CA certificate file or folder containing multiple certificates for trusted CAs in PEM format\.
.IP "\(bu" 4
\fBssl_client_cert\fR (\fBBUNDLE_SSL_CLIENT_CERT\fR): Path to a designated file containing a X\.509 client certificate and key in PEM format\.
.IP "\(bu" 4
\fBssl_verify_mode\fR (\fBBUNDLE_SSL_VERIFY_MODE\fR): The SSL verification mode Bundler uses when making HTTPS requests\. Defaults to verify peer\.
.IP "\(bu" 4
\fBsystem_bindir\fR (\fBBUNDLE_SYSTEM_BINDIR\fR): The location where RubyGems installs binstubs\. Defaults to \fBGem\.bindir\fR\.
.IP "\(bu" 4
\fBtimeout\fR (\fBBUNDLE_TIMEOUT\fR): The seconds allowed before timing out for network requests\. Defaults to \fB10\fR\.
.IP "\(bu" 4
\fBupdate_requires_all_flag\fR (\fBBUNDLE_UPDATE_REQUIRES_ALL_FLAG\fR): Require passing \fB\-\-all\fR to \fBbundle update\fR when everything should be updated, and disallow passing no options to \fBbundle update\fR\.
.IP "\(bu" 4
\fBuser_agent\fR (\fBBUNDLE_USER_AGENT\fR): The custom user agent fragment Bundler includes in API requests\.
.IP "\(bu" 4
\fBversion\fR (\fBBUNDLE_VERSION\fR): The version of Bundler to use when running under Bundler environment\. Defaults to \fBlockfile\fR\. You canman/man1/bundle-update.1000064400000033124150403121750010767 0ustar00 /path/to/local/git/repository
.fi
.IP "" 0
.P
For example, in order to use a local Rack repository, a developer could call:
.IP "" 4
.nf
bundle config set \-\-local local\.rack ~/Work/git/rack
.fi
.IP "" 0
.P
Now instead of checking out the remote git repository, the local override will be used\. Similar to a path source, every time the local git repository change, changes will be automatically picked up by Bundler\. This means a commit in the local git repo will update the revision in the \fBGemfile\.lock\fR to the local git repo revision\. This requires the same attention as git submodules\. Before pushing to the remote, you need to ensure the local override was pushed, otherwise you may point to a commit that only exists in your local machine\. You'll also need to CGI escape your usernames and passwords as well\.
.P
Bundler does many checks to ensure a developer won't work with invalid references\. Particularly, we force a developer to specify a branch in the \fBGemfile\fR in order to use this feature\. If the branch specified in the \fBGemfile\fR and the current branch in the local git repository do not match, Bundler will abort\. This ensures that a developer is always working against the correct branches, and prevents accidental locking to a different branch\.
.P
Finally, Bundler also ensures that the current revision in the \fBGemfile\.lock\fR exists in the local git repository\. By doing this, Bundler forces you to fetch the latest changes in the remotes\.
.SH "MIRRORS OF GEM SOURCES"
Bundler supports overriding gem sources with mirrors\. This allows you to configure rubygems\.org as the gem source in your Gemfile while still using your mirror to fetch gems\.
.IP "" 4
.nf
bundle config set \-\-global mirror\.SOURCE_URL MIRROR_URL
.fi
.IP "" 0
.P
For example, to use a mirror of https://rubygems\.org hosted at https://example\.org:
.IP "" 4
.nf
bundle config set \-\-global mirror\.https://rubygems\.org https://example\.org
.fi
.IP "" 0
.P
Each mirror also provides a fallback timeout setting\. If the mirror does not respond within the fallback timeout, Bundler will try to use the original server instead of the mirror\.
.IP "" 4
.nf
bundle config set \-\-global mirror\.SOURCE_URL\.fallback_timeout TIMEOUT
.fi
.IP "" 0
.P
For example, to fall back to rubygems\.org after 3 seconds:
.IP "" 4
.nf
bundle config set \-\-global mirror\.https://rubygems\.org\.fallback_timeout 3
.fi
.IP "" 0
.P
The default fallback timeout is 0\.1 seconds, but the setting can currently only accept whole seconds (for example, 1, 15, or 30)\.
.SH "CREDENTIALS FOR GEM SOURCES"
Bundler allows you to configure credentials for any gem source, which allows you to avoid putting secrets into your Gemfile\.
.IP "" 4
.nf
bundle config set \-\-global SOURCE_HOSTNAME USERNAME:PASSWORD
.fi
.IP "" 0
.P
For example, to save the credentials of user \fBclaudette\fR for the gem source at \fBgems\.longerous\.com\fR, you would run:
.IP "" 4
.nf
bundle config set \-\-global gems\.longerous\.com claudette:s00pers3krit
.fi
.IP "" 0
.P
Or you can set the credentials as an environment variable like this:
.IP "" 4
.nf
export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
.fi
.IP "" 0
.P
For gems with a git source with HTTP(S) URL you can specify credentials like so:
.IP "" 4
.nf
bundle config set \-\-global https://github\.com/rubygems/rubygems\.git username:password
.fi
.IP "" 0
.P
Or you can set the credentials as an environment variable like so:
.IP "" 4
.nf
export BUNDLE_GITHUB__COM=username:password
.fi
.IP "" 0
.P
This is especially useful for private repositories on hosts such as GitHub, where you can use personal OAuth tokens:
.IP "" 4
.nf
export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x\-oauth\-basic
.fi
.IP "" 0
.P
Note that any configured credentials will be redacted by informative commands such as \fBbundle config list\fR or \fBbundle config get\fR, unless you use the \fB\-\-parseable\fR flag\. This is to avoid unintentionally leaking credentials when copy\-pasting bundler output\.
.P
Also note that to guarantee a sane mapping between valid environment variable names and valid host names, bundler makes the following transformations:
.IP "\(bu" 4
Any \fB\-\fR characters in a host name are mapped to a triple underscore (\fB___\fR) in the corresponding environment variable\.
.IP "\(bu" 4
Any \fB\.\fR characters in a host name are mapped to a double underscore (\fB__\fR) in the corresponding environment variable\.
.IP "" 0
.P
This means that if you have a gem server named \fBmy\.gem\-host\.com\fR, you'll need to use the \fBBUNDLE_MY__GEM___HOST__COM\fR variable to configure credentials for it through ENV\.
.SH "CONFIGURE BUNDLER DIRECTORIES"
Bundler's home, cache and plugin directories and config file can be configured through environment variables\. The default location for Bundler's home directory is \fB~/\.bundle\fR, which all directories inherit from by default\. The following outlines the available environment variables and their default values
.IP "" 4
.nf
BUNDLE_USER_HOME : $HOME/\.bundle
BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache
BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config
BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin
.fi
.IP "" 0

man/man1/bundle-package.1000064400000006376150403121740011110 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-UPDATE" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions
.
.SH "SYNOPSIS"
\fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-jobs=JOBS] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-redownload] [\-\-strict] [\-\-conservative]
.
.SH "DESCRIPTION"
Update the gems specified (all gems, if \fB\-\-all\fR flag is used), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
.
.P
You would use \fBbundle update\fR to explicitly update the version of a gem\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-all\fR
Update all gems specified in Gemfile\.
.
.TP
\fB\-\-group=<name>\fR, \fB\-g=[<name>]\fR
Only update the gems in the specified group\. For instance, you can update all gems in the development group with \fBbundle update \-\-group development\fR\. You can also call \fBbundle update rails \-\-group test\fR to update the rails gem and all gems in the test group, for example\.
.
.TP
\fB\-\-source=<name>\fR
The name of a \fB:git\fR or \fB:path\fR source used in the Gemfile(5)\. For instance, with a \fB:git\fR source of \fBhttp://github\.com/rails/rails\.git\fR, you would call \fBbundle update \-\-source rails\fR
.
.TP
\fB\-\-local\fR
Do not attempt to fetch gems remotely and use the gem cache instead\.
.
.TP
\fB\-\-ruby\fR
Update the locked version of Ruby to the current version of Ruby\.
.
.TP
\fB\-\-bundler\fR
Update the locked version of bundler to the invoked bundler version\.
.
.TP
\fB\-\-full\-index\fR
Fall back to using the single\-file index of all gems\.
.
.TP
\fB\-\-jobs=[<number>]\fR, \fB\-j[<number>]\fR
Specify the number of jobs to run in parallel\. The default is the number of available processors\.
.
.TP
\fB\-\-retry=[<number>]\fR
Retry failed network or git requests for \fInumber\fR times\.
.
.TP
\fB\-\-quiet\fR
Only output warnings and errors\.
.
.TP
\fB\-\-redownload\fR
Force downloading every gem\.
.
.TP
\fB\-\-patch\fR
Prefer updating only to next patch version\.
.
.TP
\fB\-\-minor\fR
Prefer updating only to next minor version\.
.
.TP
\fB\-\-major\fR
Prefer updating to next major version (default)\.
.
.TP
\fB\-\-strict\fR
Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
.
.TP
\fB\-\-conservative\fR
Use bundle install conservative update behavior and do not allow indirect dependencies to be updated\.
.
.SH "UPDATING ALL GEMS"
If you run \fBbundle update \-\-all\fR, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
.
.P
Consider the following Gemfile(5):
.
.IP "" 4
.
.nf

source "https://rubygems\.org"

gem "rails", "3\.0\.0\.rc"
gem "nokogiri"
.
.fi
.
.IP "" 0
.
.P
When you run bundle install(1) \fIbundle\-install\.1\.html\fR the first time, bundler will resolve all of the dependencies, all the way down, and install what you need:
.
.IP "" 4
.
.nf

Fetching gem metadata from https://rubygems\.org/\.\.\.\.\.\.\.\.\.man/man1/bundle-update.1000064400000033144150403121750010771 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-UPDATE" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions
.SH "SYNOPSIS"
\fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-pre] [\-\-redownload] [\-\-strict] [\-\-conservative]
.SH "DESCRIPTION"
Update the gems specified (all gems, if \fB\-\-all\fR flag is used), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
.P
You would use \fBbundle update\fR to explicitly update the version of a gem\.
.SH "OPTIONS"
.TP
\fB\-\-all\fR
Update all gems specified in Gemfile\.
.TP
\fB\-\-group=<list>\fR, \fB\-g=<list>\fR
Only update the gems in the specified group\. For instance, you can update all gems in the development group with \fBbundle update \-\-group development\fR\. You can also call \fBbundle update rails \-\-group test\fR to update the rails gem and all gems in the test group, for example\.
.TP
\fB\-\-source=<list>\fR
The name of a \fB:git\fR or \fB:path\fR source used in the Gemfile(5)\. For instance, with a \fB:git\fR source of \fBhttp://github\.com/rails/rails\.git\fR, you would call \fBbundle update \-\-source rails\fR
.TP
\fB\-\-local\fR
Do not attempt to fetch gems remotely and use the gem cache instead\.
.TP
\fB\-\-ruby\fR
Update the locked version of Ruby to the current version of Ruby\.
.TP
\fB\-\-bundler[=BUNDLER]\fR
Update the locked version of bundler to the invoked bundler version\.
.TP
\fB\-\-full\-index\fR
Fall back to using the single\-file index of all gems\.
.TP
\fB\-\-gemfile=GEMFILE\fR
Use the specified gemfile instead of [\fBGemfile(5)\fR][Gemfile(5)]\.
.TP
\fB\-\-jobs=<number>\fR, \fB\-j=<number>\fR
Specify the number of jobs to run in parallel\. The default is the number of available processors\.
.TP
\fB\-\-retry=[<number>]\fR
Retry failed network or git requests for \fInumber\fR times\.
.TP
\fB\-\-quiet\fR
Only output warnings and errors\.
.TP
\fB\-\-redownload\fR, \fB\-\-force\fR
Force downloading every gem\.
.TP
\fB\-\-patch\fR
Prefer updating only to next patch version\.
.TP
\fB\-\-minor\fR
Prefer updating only to next minor version\.
.TP
\fB\-\-major\fR
Prefer updating to next major version (default)\.
.TP
\fB\-\-pre\fR
Always choose the highest allowed version, regardless of prerelease status\.
.TP
\fB\-\-strict\fR
Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
.TP
\fB\-\-conservative\fR
Use bundle install conservative update behavior and do not allow indirect dependencies to be updated\.
.SH "UPDATING ALL GEMS"
If you run \fBbundle update \-\-all\fR, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
.P
Consider the following Gemfile(5):
.IP "" 4
.nf
source "https://rubygems\.org"

gem "rails", "3\.0\.0\.rc"
gem "nokogiri"
.fi
.IP "" 0
.P
When you run bundle install(1) \fIbundle\-install\.1\.html\fR the first time, bundler will resolve all of the dependencies, all the way down, and install what you need:
.IP "" 4
.nf
Fetching gem metadata from https://rubygems\.org/\|\.\|\.\|\.\|\.\|\.\|\.\|\.\|\.\|\.
Resolving dependencies\|\.\|\.\|\.
Installing builder 2\.1\.2
Installing abstract 1\.0\.0
Installing rack 1\.2\.8
Using bundler 1\.7\man/man5/gemfile.5000064400000055321150403121750007661 0ustar00r remembers the exact versions it installed in \fBGemfile\.lock\fR\. The next time you run bundle install(1) \fIbundle\-install\.1\.html\fR, bundler skips the dependency resolution and installs the same gems as it installed last time\.
.P
After checking in the \fBGemfile\.lock\fR into version control and cloning it on another machine, running bundle install(1) \fIbundle\-install\.1\.html\fR will \fIstill\fR install the gems that you installed last time\. You don't need to worry that a new release of \fBerubis\fR or \fBmail\fR changes the gems you use\.
.P
However, from time to time, you might want to update the gems you are using to the newest versions that still match the gems in your Gemfile(5)\.
.P
To do this, run \fBbundle update \-\-all\fR, which will ignore the \fBGemfile\.lock\fR, and resolve all the dependencies again\. Keep in mind that this process can result in a significantly different set of the 25 gems, based on the requirements of new gems that the gem authors released since the last time you ran \fBbundle update \-\-all\fR\.
.SH "UPDATING A LIST OF GEMS"
Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
.P
For instance, in the scenario above, imagine that \fBnokogiri\fR releases version \fB1\.4\.4\fR, and you want to update it \fIwithout\fR updating Rails and all of its dependencies\. To do this, run \fBbundle update nokogiri\fR\.
.P
Bundler will update \fBnokogiri\fR and any of its dependencies, but leave alone Rails and its dependencies\.
.SH "OVERLAPPING DEPENDENCIES"
Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same second\-level dependency\. For instance, consider the case of \fBthin\fR and \fBrack\-perftools\-profiler\fR\.
.IP "" 4
.nf
source "https://rubygems\.org"

gem "thin"
gem "rack\-perftools\-profiler"
.fi
.IP "" 0
.P
The \fBthin\fR gem depends on \fBrack >= 1\.0\fR, while \fBrack\-perftools\-profiler\fR depends on \fBrack ~> 1\.0\fR\. If you run bundle install, you get:
.IP "" 4
.nf
Fetching source index for https://rubygems\.org/
Installing daemons (1\.1\.0)
Installing eventmachine (0\.12\.10) with native extensions
Installing open4 (1\.0\.1)
Installing perftools\.rb (0\.4\.7) with native extensions
Installing rack (1\.2\.1)
Installing rack\-perftools_profiler (0\.0\.2)
Installing thin (1\.2\.7) with native extensions
Using bundler (1\.0\.0\.rc\.3)
.fi
.IP "" 0
.P
In this case, the two gems have their own set of dependencies, but they share \fBrack\fR in common\. If you run \fBbundle update thin\fR, bundler will update \fBdaemons\fR, \fBeventmachine\fR and \fBrack\fR, which are dependencies of \fBthin\fR, but not \fBopen4\fR or \fBperftools\.rb\fR, which are dependencies of \fBrack\-perftools_profiler\fR\. Note that \fBbundle update thin\fR will update \fBrack\fR even though it's \fIalso\fR a dependency of \fBrack\-perftools_profiler\fR\.
.P
In short, by default, when you update a gem using \fBbundle update\fR, bundler will update all dependencies of that gem, including those that are also dependencies of another gem\.
.P
To prevent updating indirect dependencies, prior to version 1\.14 the only option was the \fBCONSERVATIVE UPDATING\fR behavior in bundle install(1) \fIbundle\-install\.1\.html\fR:
.P
In this scenario, updating the \fBthin\fR version manually in the Gemfile(5), and then running bundle install(1) \fIbundle\-install\.1\.html\fR will only update \fBdaemons\fR and \fBeventmachine\fR, but not \fBrack\fR\. For more information, see the \fBCONSERVATIVE UPDATING\fR section of bundle install(1) \fIbundle\-install\.1\.html\fR\.
.P
Starting with 1\.14, specifying the \fB\-\-conservative\fR option will also prevent indirect dependencies from being updated\.
.SH "PATCH LEVEL OPTIONS"
Version 1\.14 introduced 4 patch\-level options that will influence how gem versions are resolved\. One of the following options can be used: \fB\-\-patch\fR, \fB\-\-minor\fR or \fB\-\-major\fR\. \fB\-\-strict\fR can be added to further influence resolution\.
.TP
\fB\-\-patch\fR
Prefer updating only to next patch version\.
.TP
\fB\-\-minor\fR
Prefer updating only to next minor version\.
.TP
\fB\-\-major\fR
Prefer updating to next major version (default)\.
.TP
\fB\-\-strict\fR
Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
.P
When Bundler is resolving what versions to use to satisfy declared requirements in the Gemfile or in parent gems, it looks up all available versions, filters out any versions that don't satisfy the requirement, and then, by default, sorts them from newest to oldest, considering them in that order\.
.P
Providing one of the patch level options (e\.g\. \fB\-\-patch\fR) changes the sort order of the satisfying versions, causing Bundler to consider the latest \fB\-\-patch\fR or \fB\-\-minor\fR version available before other versions\. Note that versions outside the stated patch level could still be resolved to if necessary to find a suitable dependency graph\.
.P
For example, if gem 'foo' is locked at 1\.0\.2, with no gem requirement defined in the Gemfile, and versions 1\.0\.3, 1\.0\.4, 1\.1\.0, 1\.1\.1, 2\.0\.0 all exist, the default order of preference by default (\fB\-\-major\fR) will be "2\.0\.0, 1\.1\.1, 1\.1\.0, 1\.0\.4, 1\.0\.3, 1\.0\.2"\.
.P
If the \fB\-\-patch\fR option is used, the order of preference will change to "1\.0\.4, 1\.0\.3, 1\.0\.2, 1\.1\.1, 1\.1\.0, 2\.0\.0"\.
.P
If the \fB\-\-minor\fR option is used, the order of preference will change to "1\.1\.1, 1\.1\.0, 1\.0\.4, 1\.0\.3, 1\.0\.2, 2\.0\.0"\.
.P
Combining the \fB\-\-strict\fR option with any of the patch level options will remove any versions beyond the scope of the patch level option, to ensure that no gem is updated that far\.
.P
To continue the previous example, if both \fB\-\-patch\fR and \fB\-\-strict\fR options are used, the available versions for resolution would be "1\.0\.4, 1\.0\.3, 1\.0\.2"\. If \fB\-\-minor\fR and \fB\-\-strict\fR are used, it would be "1\.1\.1, 1\.1\.0, 1\.0\.4, 1\.0\.3, 1\.0\.2"\.
.P
Gem requirements as defined in the Gemfile will still be the first determining factor for what versions are available\. If the gem requirement for \fBfoo\fR in the Gemfile is '~> 1\.0', that will accomplish the same thing as providing the \fB\-\-minor\fR and \fB\-\-strict\fR options\.
.SH "PATCH LEVEL EXAMPLES"
Given the following gem specifications:
.IP "" 4
.nf
foo 1\.4\.3, requires: ~> bar 2\.0
foo 1\.4\.4, requires: ~> bar 2\.0
foo 1\.4\.5, requires: ~> bar 2\.1
foo 1\.5\.0, requires: ~> bar 2\.1
foo 1\.5\.1, requires: ~> bar 3\.0
bar with versions 2\.0\.3, 2\.0\.4, 2\.1\.0, 2\.1\.1, 3\.0\.0
.fi
.IP "" 0
.P
Gemfile:
.IP "" 4
.nf
gem 'foo'
.fi
.IP "" 0
.P
Gemfile\.lock:
.IP "" 4
.nf
foo (1\.4\.3)
  bar (~> 2\.0)
bar (2\.0\.3)
.fi
.IP "" 0
.P
Cases:
.IP "" 4
.nf
#  Command Line                     Result
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
1  bundle update \-\-patch            'foo 1\.4\.5', 'bar 2\.1\.1'
2  bundle update \-\-patch foo        'foo 1\.4\.5', 'bar 2\.1\.1'
3  bundle update \-\-minor            'foo 1\.5\.1', 'bar 3\.0\.0'
4  bundle update \-\-minor \-\-strict   'foo 1\.5\.0', 'bar 2\.1\.1'
5  bundle update \-\-patch \-\-strict   'foo 1\.4\.4', 'bar 2\.0\.4'
.fi
.IP "" 0
.P
In case 1, bar is upgraded to 2\.1\.1, a minor version increase, because the dependency from foo 1\.4\.5 required it\.
.P
In case 2, only foo is requested to be unlocked, but bar is also allowed to move because it's not a declared dependency in the Gemfile\.
.P
In case 3, bar goes up a whole major release, because a minor increase is preferred now for foo, and when it goes to 1\.5\.1, it requires 3\.0\.0 of bar\.
.P
In case 4, foo is preferred up to a minor version, but 1\.5\.1 won't work because the \-\-strict flag removes bar 3\.0\.0 from consideration since it's a major increment\.
.P
In case 5, both foo and bar have any minor or major increments removed from consideration because of the \-\-strict flag, so the most they can move is up to 1\.4\.4 and 2\.0\.4\.
.SH "RECOMMENDED WORKFLOW"
In general, when working with an application managed with bundler, you should use the following workflow:
.IP "\(bu" 4
After you create your Gemfile(5) for the first time, run
.IP
$ bundle install
.IP "\(bu" 4
Check the resulting \fBGemfile\.lock\fR into version control
.IP
$ git add Gemfile\.lock
.IP "\(bu" 4
When checking out this repository on another development machine, run
.IP
$ bundle install
.IP "\(bu" 4
When checking out this repository on a deployment machine, run
.IP
$ bundle install \-\-deployment
.IP "\(bu" 4
After changing the Gemfile(5) to reflect a new or update dependency, run
.IP
$ bundle install
.IP "\(bu" 4
Make sure to check the updated \fBGemfile\.lock\fR into version control
.IP
$ git add Gemfile\.lock
.IP "\(bu" 4
If bundle install(1) \fIbundle\-install\.1\.html\fR reports a conflict, manually update the specific gems that you changed in the Gemfile(5)
.IP
$ bundle update rails thin
.IP "\(bu" 4
If you want to update all the gems to the latest possible versions that still match the gems listed in the Gemfile(5), run
.IP
$ bundle update \-\-all
.IP "" 0

man/man5/gemfile.5000064400000056000150403121750007654 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "GEMFILE" "5" "March 2025" ""
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
.SH "SYNOPSIS"
A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
.P
Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
.SH "SYNTAX"
A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
.SH "GLOBAL SOURCE"
At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
.IP "" 4
.nf
source "https://rubygems\.org"
.fi
.IP "" 0
.P
You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
.P
To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
.P
A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
.P
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
.SS "CREDENTIALS"
Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
.IP "" 4
.nf
bundle config gems\.example\.com user:password
.fi
.IP "" 0
.P
For some sources, like a company Gemfury account, it may be easier to include the credentials in the Gemfile as part of the source URL\.
.IP "" 4
.nf
source "https://user:password@gems\.example\.com"
.fi
.IP "" 0
.P
Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
.SH "RUBY"
If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
.SS "VERSION (required)"
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
.IP "" 4
.nf
ruby "3\.1\.2"
.fi
.IP "" 0
.P
If you wish to derive your Ruby version from a version file (ie \.ruby\-version), you can use the \fBfile\fR option instead\.
.IP "" 4
.nf
ruby file: "\.ruby\-version"
.fi
.IP "" 0
.P
The version file should conform to any of the following formats:
.IP "\(bu" 4
\fB3\.1\.2\fR (\.ruby\-version)
.IP "\(bu" 4
\fBruby 3\.1\.2\fR (\.tool\-versions, read: https://asdf\-vm\.com/manage/configuration\.html#tool\-versions)
.IP "" 0
.SS "ENGINE"
Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
.P
What exactly is an Engine?
.IP "\(bu" 4
A Ruby engine is an implementation of the Ruby language\.
.IP "\(bu" 4
For background: the reference or original implementation of the Ruby programming language is called Matz's Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
.IP "\(bu" 4
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttps://www\.jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
.IP "" 0
.SS "ENGINE VERSION"
Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
.IP "" 4
.nf
ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
.fi
.IP "" 0
.SS "PATCHLEVEL"
Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
.P
This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
.IP "" 4
.nf
ruby "3\.1\.2", patchlevel: "20"
.fi
.IP "" 0
.SH "GEMS"
Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
.SS "NAME (required)"
For each gem requirement, list a single \fIgem\fR line\.
.IP "" 4
.nf
gem "nokogiri"
.fi
.IP "" 0
.SS "VERSION"
Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
.IP "" 4
.nf
gem "nokogiri", ">= 1\.4\.2"
gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
.fi
.IP "" 0
.SS "REQUIRE AS"
Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
.IP "" 4
.nf
gem "redis", require: ["redis/connection/hiredis", "redis"]
gem "webmock", require: false
gem "byebug", require: true
.fi
.IP "" 0
.P
The argument defaults to the name of the gem\. For example, these are identical:
.IP "" 4
.nf
gem "nokogiri"
gem "nokogiri", require: "nokogiri"
gem "nokogiri", require: true
.fi
.IP "" 0
.SS "GROUPS"
Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
.IP "" 4
.nf
gem "rspec", group: :test
gem "wirble", groups: [:development, :test]
.fi
.IP "" 0
.P
The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
.IP "" 4
.nf
# setup adds gems to Ruby's load path
Bundler\.setup                    # defaults to all groups
require "bundler/setup"          # same as Bundler\.setup
Bundler\.setup(:default)          # only set up the _default_ group
Bundler\.setup(:test)             # only set up the _test_ group (but `not` _default_)
Bundler\.setup(:default, :test)   # set up the _default_ and _test_ groups, but no others

# require requires all of the gems in the specified groups
Bundler\.require                  # defaults to the _default_ group
Bundler\.require(:default)        # identical
Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
Bundler\.require(:test)           # requires the _test_ group
.fi
.IP "" 0
.P
The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fBwithout\fR configuration\.
.P
To specify multiple groups to ignore, specify a list of groups separated by spaces\.
.IP "" 4
.nf
bundle config set \-\-local without test
bundle config set \-\-local without development test
.fi
.IP "" 0
.P
Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
.P
Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttps://bundler\.io/rationale\.html\fR\.
.SS "PLATFORMS"
If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
.P
There are a number of \fBGemfile\fR platforms:
.TP
\fBruby\fR
C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
.TP
\fBmri\fR
C Ruby (MRI) only, but not Windows
.TP
\fBwindows\fR
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
.TP
\fBmswin\fR
Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
.TP
\fBmswin64\fR
Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
.TP
\fBrbx\fR
Rubinius
.TP
\fBjruby\fR
JRuby
.TP
\fBtruffleruby\fR
TruffleRuby
.P
On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
.IP "" 4
.nf
ruby_31
.fi
.IP "" 0
.P
As with groups (above), you may specify one or more platforms:
.IP "" 4
.nf
gem "weakling",   platforms: :jruby
gem "ruby\-debug", platforms: :mri_31
gem "nokogiri",   platforms: [:windows_31, :jruby]
.fi
.IP "" 0
.P
All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
.P
The following platform values are deprecated and should be replaced with \fBwindows\fR:
.IP "\(bu" 4
\fBmswin\fR, \fBmswin64\fR, \fBmingw32\fR, \fBx64_mingw\fR
.IP "" 0
.P
Note that, while unfortunately using the same terminology, the values of this option are different from the values that \fBbundle lock \-\-add\-platform\fR can take\. The values of this option are more closer to "Ruby Implementation" while the values that \fBbundle lock \-\-add\-platform\fR understands are more related to OS and architecture of the different systems where your lockfile will be used\.
.SS "FORCE_RUBY_PLATFORM"
If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
.IP "" 4
.nf
gem "ffi", force_ruby_platform: true
.fi
.IP "" 0
.P
This can be handy (assuming the pure ruby variant works fine) when:
.IP "\(bu" 4
You're having issues with the platform specific variant\.
.IP "\(bu" 4
The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
.IP "" 0
.SS "SOURCE"
You can select an alternate RubyGems repository for a gem using the ':source' option\.
.IP "" 4
.nf
gem "some_internal_gem", source: "https://gems\.example\.com"
.fi
.IP "" 0
.P
This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
.P
Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
.P
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
.P
Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
.SS "GIT"
If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
.TP
\fBHTTP(S)\fR
gem "rails", git: "https://github\.com/rails/rails\.git"
.TP
\fBSSH\fR
gem "rails", git: "git@github\.com:rails/rails\.git"
.TP
\fBgit\fR
gem "rails", git: "git://github\.com/rails/rails\.git"
.P
If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
.P
\fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
.P
The \fBgroup\fR, \fBplatforms\doc/alt-ruby26/README.md000064400000014053150403121750010500 0ustar00tching the version specifier\. If not, bundler will print a warning\.
.IP "" 4
.nf
gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
# bundle install will fail, because the \.gemspec in the rails
# repository's master branch specifies version 3\.0\.0
.fi
.IP "" 0
.P
If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
.P
Git repositories support a number of additional options\.
.TP
\fBbranch\fR, \fBtag\fR, and \fBref\fR
You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
.IP
gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
.IP
gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
.IP
gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
.TP
\fBsubmodules\fR
For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
.P
If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
.IP "" 4
.nf
|~rails                   [git root]
| |\-rails\.gemspec         [rails gem located here]
|~actionpack
| |\-actionpack\.gemspec    [actionpack gem located here]
|~activesupport
| |\-activesupport\.gemspec [activesupport gem located here]
|\|\.\|\.\|\.
.fi
.IP "" 0
.P
To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
.SS "GIT SOURCE"
A custom git source can be defined via the \fBgit_source\fR method\. Provide the source's name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
.IP "" 4
.nf
git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
gem 'rails', stash: 'forks/rails'
.fi
.IP "" 0
.P
In addition, if you wish to choose a specific branch:
.IP "" 4
.nf
gem "rails", stash: "forks/rails", branch: "branch_name"
.fi
.IP "" 0
.SS "GITHUB"
\fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
.P
If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
.IP "" 4
.nf
gem "rails", github: "rails/rails"
gem "rails", github: "rails"
.fi
.IP "" 0
.P
Are both equivalent to
.IP "" 4
.nf
gem "rails", git: "https://github\.com/rails/rails\.git"
.fi
.IP "" 0
.P
Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
.P
You can also directly pass a pull request URL:
.IP "" 4
.nf
gem "rails", github: "https://github\.com/rails/rails/pull/43753"
.fi
.IP "" 0
.P
Which is equivalent to:
.IP "" 4
.nf
gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
.fi
.IP "" 0
.SS "GIST"
If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
.IP "" 4
.nf
gem "the_hatch", gist: "4815162342"
.fi
.IP "" 0
.P
Is equivalent to:
.IP "" 4
.nf
gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
.fi
.IP "" 0
.P
Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
.SS "BITBUCKET"
If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
.IP "" 4
.nf
gem "rails", bitbucket: "rails/rails"
gem "rails", bitbucket: "rails"
.fi
.IP "" 0
.P
Are both equivalent to
.IP "" 4
.nf
gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
.fi
.IP "" 0
.P
Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
.SS "PATH"
You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
.P
Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
.P
Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
.IP "" 4
.nf
gem "rails", path: "vendor/rails"
.fi
.IP "" 0
.P
If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem's files\. This will automatically load gemspec files from subdirectories\.
.IP "" 4
.nf
path 'components' do
  gem 'admin_ui'
  gem 'public_ui'
end
.fi
.IP "" 0
.SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
The \fB:source\fR, \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
.IP "" 4
.nf
source "https://gems\.example\.com" do
  gem "some_internal_gem"
  gem "another_internal_gem"
end

git "https://github\.com/rails/rails\.git" do
  gem "activesupport"
  gem "actionpack"
end

platforms :ruby do
  gem "ruby\-debug"
  gem "sqlite3"
end

group :development, optional: true do
  gem "wirble"
  gem "faker"
end
.fi
.IP "" 0
.P
In the case of thedoc/alt-ruby26/ChangeLog000064400006240156150403121750011006 0ustar00r conditions are met\.
.IP "" 4
.nf
install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
  gem "pasteboard"
end
.fi
.IP "" 0
.SH "GEMSPEC"
The \fB\.gemspec\fR \fIhttps://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
.P
If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
.P
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: '\.'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
.P
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
.P
When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
.SH "SOURCE PRIORITY"
When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
.IP "1." 4
The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
.IP "2." 4
For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
.IP "3." 4
If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
.IP "" 0

doc/alt-ruby26/README.md000064400000014053150403121750010500 0ustar00NOR}.${TEENY}/${PLATFORM}`
    *   `${DESTDIR}${prefix}/lib`
    *   `${DESTDIR}${prefix}/lib/ruby`
    *   `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby`
    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby`
    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
    *   `${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/share/man/man1`
    *   `${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system`


    If Ruby's API version is '*x.y.z*', the `${MAJOR}` is '*x*', the
    `${MINOR}` is '*y*', and the `${TEENY}` is '*z*'.

    **NOTE**: teeny of the API version may be different from one of Ruby's
    program version

    You may have to be a super user to install Ruby.


If you fail to compile Ruby, please send the detailed error report with the
error log and machine/OS type, to help others.

Some extension libraries may not get compiled because of lack of necessary
external libraries and/or headers, then you will need to run '`make distclean-ext`'
to remove old configuration after installing them in such case.

## Copying

See the file [COPYING](COPYING).

## Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list
(https://www.ruby-lang.org/en/community/mailing-lists) or on websites like
(https://stackoverflow.com).

Bug reports should be filed at https://bugs.ruby-lang.org. Read [HowToReport] for more information.

[HowToReport]: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToReport

## Contributing

See the file [CONTRIBUTING.md](CONTRIBUTING.md)


## The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in
1995.

<matz@ruby-lang.org>
doc/alt-ruby26/ChangeLog000064400006240156150403121750011006 0ustar00------------------------------------------------------------------------
r67958 | usa | 2022-04-12 20:50:11 +0900 (Tue, 12 Apr 2022) | 1 line

add tag v2_6_10
------------------------------------------------------------------------
r67957 | usa | 2022-04-12 20:49:45 +0900 (Tue, 12 Apr 2022) | 2 lines

Fix dtoa buffer overrun

------------------------------------------------------------------------
r67956 | usa | 2022-04-12 20:03:11 +0900 (Tue, 12 Apr 2022) | 2 lines

Backport date-2.0.3 for Reiwa Support [Backport #18514]

------------------------------------------------------------------------
r67955 | usa | 2022-04-12 19:52:41 +0900 (Tue, 12 Apr 2022) | 2 lines

fix for #16798 to Ruby 2.6 introduced C99 syntax [Backport #18387]

------------------------------------------------------------------------
r67953 | usa | 2021-11-24 20:41:55 +0900 (Wed, 24 Nov 2021) | 1 line

When parsing cookies, only decode the values
------------------------------------------------------------------------
r67952 | usa | 2021-11-24 18:07:47 +0900 (Wed, 24 Nov 2021) | 1 line

Merge date-2.0.2
------------------------------------------------------------------------
r67950 | usa | 2021-07-07 19:38:10 +0900 (Wed, 07 Jul 2021) | 6 lines

Fix StartTLS stripping vulnerability

Reported by Alexandr Savca in https://hackerone.com/reports/1178562

Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>

------------------------------------------------------------------------
r67949 | usa | 2021-07-07 19:34:08 +0900 (Wed, 07 Jul 2021) | 7 lines

Ignore IP addresses in PASV responses by default, and add new option use_pasv_ip

This fixes CVE-2021-31810.
Reported by Alexandr Savca.

Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>

------------------------------------------------------------------------
r67948 | usa | 2021-07-04 02:10:56 +0900 (Sun, 04 Jul 2021) | 2 lines

patchlevel for previous commit

------------------------------------------------------------------------
r67947 | usa | 2021-07-04 02:10:28 +0900 (Sun, 04 Jul 2021) | 8 lines

merge revision(s) b1c73f23,c9ab8fe2: [Backport #17877]

	[ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799
	
	https://github.com/ruby/rdoc/commit/a7f5d6ab88

	The test for command injection on Unix platforms should be omitted on Windows

------------------------------------------------------------------------
r67946 | usa | 2021-07-04 01:56:34 +0900 (Sun, 04 Jul 2021) | 23 lines

merge revision(s) 9edc1625: [Backport #17781]

	[ruby/resolv] Fix confusion of received response message

	This is a follow up for commit 33fb966197f1 ("Remove sender/message_id
	pair after response received in resolv", 2020-09-11).

	As the @senders instance variable is also used for tracking transaction
	ID allocation, simply removing an entry without releasing the ID would
	eventually deplete the ID space and cause
	Resolv::DNS.allocate_request_id to hang.

	It seems the intention of the code was to check that the received DNS
	message is actually the response for the question made within the method
	earlier. Let's have it actually do sodoc/alt-ruby26/ChangeLog000064400006240156150403121750011006 0ustar00 17aeff3e77e6fe0d37a9943dd93bcb16c4bb9f66,1616dcb16ef34ebf4ffc2167292f9a779f3e121e,1616dcb16ef34ebf4ffc2167292f9a779f3e121e:

	make-snapshot: get rid of circular dependency

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 5 ++---
	 1 file changed, 2 insertions(+), 3 deletions(-)

	make-snapshot: try downloading Unicode files

	[Bug #15593]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 7 +------
	 1 file changed, 1 insertion(+), 6 deletions(-)

	make-snapshot: try downloading Unicode files

	[Bug #15593]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 7 +------
	 1 file changed, 1 insertion(+), 6 deletions(-)

	these patches are not for security issue, but are needed to resolv a
	packaging problem.

------------------------------------------------------------------------
r67943 | usa | 2021-05-10 12:24:37 +0900 (Mon, 10 May 2021) | 1 line

fix previous commit
------------------------------------------------------------------------
r67942 | usa | 2021-05-10 01:11:52 +0900 (Mon, 10 May 2021) | 5 lines

fix macos build

note that this is not a security fix, but recognized as critical build problem.
[Backport #17777]

------------------------------------------------------------------------
r67940 | usa | 2021-04-05 20:48:23 +0900 (Mon, 05 Apr 2021) | 2 lines

REXML 3.1.9.1

------------------------------------------------------------------------
r67936 | usa | 2021-04-05 10:22:11 +0900 (Mon, 05 Apr 2021) | 11 lines

merge revision(s) 254bed302752a401b5fcc3b6c65a9c93711d91d6,fad3023e94c45e7f03478732f7641b6f39ba9d12,3156fb0f2c3ebf8229f392c8502c08fe165ab181: [Backport #17218]

	Renamed `nurat_sub` compliant with `rb_rational_plus`


	Fix ArithmeticSequence#last and ArithmeticSequence#each for
	non-integer sequences (#3870)

	[Bug #17218]
	[ruby-core:100312]

------------------------------------------------------------------------
r67935 | usa | 2021-04-05 09:19:04 +0900 (Mon, 05 Apr 2021) | 33 lines

merge revision(s) ebb96fa8808317ad53a4977bff26cf755d68077e: [Backport #17321]

	Fix singleton class cloning

	Before this commit, `clone` gave different results depending on whether the original object
	had an attached singleton class or not.

	Consider the following setup:
	```
	class Foo; end
	Foo.singleton_class.define_method(:foo) {}

	obj = Foo.new

	obj.singleton_class if $call_singleton

	clone = obj.clone
	```

	When `$call_singleton = false`, neither `obj.singleton_class.singleton_class` nor
	`clone.singleton_class.singleton_class` own any methods.

	However, when `$call_singleton = true`, `clone.singleton_class.singleton_class` would own a copy of
	`foo` from `Foo.singleton_class`, even though `obj.singleton_class.singleton_class` does not.

	The latter case is unexpected and results in a visibly different clone, depending on if the original object
	had an attached class or not.

	Co-authored-by: Ufuk Kayserilioglu <ufuk.kayserilioglu@shopify.com>
	---
	 class.c                 | 31 ++++++++++++++++++++++---------
	 test/ruby/test_class.rb | 47 +++++++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 69 insertions(+), 9 deletions(-)
------------------------------------------------------------------------
r67934 | usa | 2021-04-05 09:17:28 +0900 (Mon, 05 Apr 2021) | 16 lines

merge revision(s) 276f6a225d18561cbe5282b798cb4e416c66079f,95bef7b69a6fb42687a6200b338060be307259f5: [Backport #17352]

	Don't double fractional seconds when passing timezone object to Time.new

	I found that fractional seconds were doubled when using the timezone
	feature of Time in Sequel's named_timezones extension (which uses
	TZInfo for the timezone object), and traced the problem to this code.

	There is no subsecx being modified in the utc_to_local call below
	this, and I'm not sure why you would want to add in the fractional
	seconds unless you assumed the timezone conversion would drop the
	existing fractional seconds (TZInfo doesn't drop fractional seconds).


	Subsecond of Time::tm should be 0

------------------------------------------------------------------------
r67933 | usa | 2021-04-05 09:12:27 +0900 (Mon, 05 Apr 2021) | 27 lines

merge revision(s) c60aaed1856b2b6f90de0992c34771830019e021: [Backport #17130]

	Fix Method#super_method for aliased methods

	Previously, Method#super_method looked at the called_id to
	determine the method id to use, but that isn't correct for
	aliased methods, because the super target depends on the
	original method id, not the called_id.

	Additionally, aliases can reference methods defined in other
	classes and modules, and super lookup needs to start in the
	super of the defined class in such cases.

	This adds tests for Method#super_method for both types of
	aliases, one that uses VM_METHOD_TYPE_ALIAS and another that
	does not. Both check that the results for calling super
	methods return the expected values.

	To find the defined class for alias methods, add an rb_ prefix
	to find_defined_class_by_owner in vm_insnhelper.c and make it
	non-static, so that it can be called from method_super_method
	in proc.c.

	This bug was original discovered while researching [Bug #11189].

	Fixes [Bug #17130]

------------------------------------------------------------------------
r67932 | usa | 2021-04-05 09:05:42 +0900 (Mon, 05 Apr 2021) | 13 lines

merge revision(s) abe2e7de4d1f2d5861d7c9ab9c7e778f2ee1dcd2: [Backport #16774]

	Don't require sub-word atomics

	On some architectures (like RISC-V) sub-word atomics are only available
	when linking against -latomic, but the configure script doesn't do that,
	causing the atomic checks to fail and the resulting ruby binary is
	non-functional.  Ruby does not use sub-word atomic operations, rb_atomic_t
	is defined to unsigned int, so use unsigned int when checking for atomic
	operations.
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67931 | usa | 2021-04-05 09:04:41 +0900 (Mon, 05 Apr 2021) | 39 lines

merge revision(s) c15cddd1d515c5bd8dfe8fb2725e3f723aec63b8: [Backport #16787]

	Allow Dir.home to work for non-login procs when $HOME not set

	Allow the 'Dir.home' method to reliably locate the user's home directory when
	all three of the following are true at the same time:

	1. Ruby is running on a Unix-like OS
	2. The $HOME environment variable is not set
	3. The process is not a descendant of login(1) (or a work-alike)

	The prior behavior was that the lookup could only work for login-descended
	processes.

	This is accomplished by looking up the user's record in the password database
	by uid (getpwuid_r(3)) as a fallback to the lookup by name (getpwname_r(3))
	which is still attempted first (based on the name, if any, returned by
	getlogin_r(3)).

	If getlogin_r(3), getpwnam_r(3), and/or getpwuid_r(3) is not available at
	compile time, will fallback on using their respective non-*_r() variants:
	getlogin(3), getpwnam(3), and/or getpwuid(3).

	The rationale for attempting to do the lookup by name prior to doing it by uid
	is to accommodate the possibility of multiple login names (each with its own
	record in the password database, so each with a potentially different home
	directory) being mapped to the same uid (as is explicitly allowed for by
	POSIX; see getlogin(3posix)).

	Preserves the existing behavior for login-descended processes, and adds the
	new capability of having Dir.home being able to find the user's home directory
	for non-login-descended processes.

	Fixes [Bug #16787]

	Related discussion:
	https://bugs.ruby-lang.org/issues/16787
	https://github.com/ruby/ruby/pull/3034

------------------------------------------------------------------------
r67930 | usa | 2021-04-05 08:50:56 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 2a83650b0fd25719fb6c03bfec7bd895734d3ceb: [Backport #15852]

	Destroy VM-wise locks before freeing [Bug #15852]

------------------------------------------------------------------------
r67929 | usa | 2021-04-05 08:47:58 +0900 (Mon, 05 Apr 2021) | 14 lines

merge revision(s) 9682db065158da5fa4ec8a3bc267da45b429b92c: [Backport #17658]

	Remove sender/message_id pair after response received in resolv

	Once a response for a given DNS request has been received (which
	requires a matching message id), the [sender, message_id] pair
	should be removed from the list of valid senders.  This makes it
	so duplicate responses from the same sender are ignored.

	Fixes [Bug #12838]
	---
	 lib/resolv.rb           |   2 +-
	 test/resolv/test_dns.rb | 113 ++++++++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 114 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67928 | usa | 2021-04-05 08:45:25 +0900 (Mon, 05 Apr 2021) | 14 lines

merge revision(s) f4be7a510eebbe6507ba41d138d7d252f4a68e90,9441f3f97087a4325ee80911859d37da41fa5050: [Backport #17504]

	Added tests for Time#getlocal with UTC offset

	---
	 test/ruby/test_time.rb | 8 ++++++++
	 1 file changed, 8 insertions(+)

	Allow UTC offset without colons per ISO-8601 [Bug #17504]

	---
	 test/ruby/test_time.rb |  6 ++++++
	 time.c                 | 44 +++++++++++++++++++++++++++++---------------
	 2 files changed, 35 insertions(+), 15 deletions(-)
------------------------------------------------------------------------
r67927 | usa | 2021-04-05 08:43:53 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 0036648a420f945624898568bb82bc5f83195d12: [Backport #17533]

	Capture to reserved name variables if already defined [Bug #17533]

------------------------------------------------------------------------
r67926 | usa | 2021-04-05 08:40:30 +0900 (Mon, 05 Apr 2021) | 8 lines

merge revision(s) a55eb9a2af7950d180d9d31ffde2bce66710f44f: [Backport #17572]

	Make reciprocal properly of non-integral rational [Bug #17572]

	---
	 rational.c                 | 2 +-
	 test/ruby/test_rational.rb | 7 +++++++
	 2 files changed, 8 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67925 | usa | 2021-04-05 08:36:51 +0900 (Mon, 05 Apr 2021) | 7 lines

merge revision(s) ce7a053475cbebfb2f3e5ed6614e0ba631541917,1cbb1f1720127b0b34b38c77e27b51b182008699: [Backport #16695]

    Adjust sp for `x = false; y = (return until x unless x)` [Bug #16695]

    test/ruby/test_syntax.rb: avoid "warning: assigned but unused
     variable"

------------------------------------------------------------------------
r67924 | usa | 2021-04-05 08:31:49 +0900 (Mon, 05 Apr 2021) | 43 lines

merge revision(s) 8b0dc77a621ded75f72486c33f55404ce73f00d7: [Backport #17275]

	configure.ac: Bump the size of sigaltstack

	The RubyVM uses C macro defines to feature detect whether
	`backtrace(2)` support is available, and if so it includes C level backtraces
	when the RubyVM itself crashes.

	But on my machine, C level backtraces from `vm_dump.c` didn't work when
	using a version of Ruby buillt on the machine, but worked fine when using a
	version of Ruby built on another machine and copied to my machine.

	The default autoconf test for backtraces uses a sigaltstack size that is
	too small, so the SIGSEGV signal handler itself causes a SIGSEGV).
	I noticed that signal.c uses a larger sigaltstack size:

	https://github.com/ruby/ruby/blob/v2_6_5/signal.c#L568

	The specific variables it looks at:

	- `HAVE_BACKTRACE`

	  this is a macro defined by autoconf because there is a line in the
	  configure script like `AC_CHECK_FUNCS(backtrace)` (see the autoconf
	  docs for more).

	- `BROKEN_BACKTRACE`

	  this comes from a custom program that Ruby's configure script runs to
	  attempt to figure out whether actually using backtrace(2) in a real
	  program works. You can see the autoconf program here.

	  <https://github.com/ruby/ruby/blob/v2_6_5/configure.ac#L2817-L2863>

	It uses sigaltstack and SA_ONSTACK to create a seperate stack for
	handling signals.

	The problem was: SIGSTKSZ (which comes from a system header!) was not
	suggesting a large enough stack size. When checking on an Ubuntu 16.04
	box, we found that SIGSTKSZ was 8192 and MINSIGSTKSZ was 2048.
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67923 | usa | 2021-04-05 08:30:49 +0900 (Mon, 05 Apr 2021) | 14 lines

merge revision(s) be9dbe1c3eb4bb4cab0bdc42a91ef425bb1eaddd: [Backport #15178]

	Fix pthread_setname_np arguments on NetBSD

	The previous attempt to fix this in
	b87df1bf243074edb2e6cc8a24bc00df81cebf3c reversed the argument
	order instead of just fixing the quote escaping.

	From Takahiro Kambe.

	Fixes [Bug #15178]
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67922 | usa | 2021-04-05 08:28:16 +0900 (Mon, 05 Apr 2021) | 4 lines

backported a part of a569bc09e25a2ba813d0bec1228d9ff65330a3db

picked up by Jeremy Evans [Backport #17305]

------------------------------------------------------------------------
r67921 | usa | 2021-04-05 08:07:45 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 8e189df32cacef4b21e357a590d349330532baf5: [Backport #17013]

	Add operator info to OP_ASGN2 of RubyVM::AbstractSyntaxTree.

------------------------------------------------------------------------
r67920 | usa | 2021-04-05 08:03:14 +0900 (Mon, 05 Apr 2021) | 35 lines

merge revision(s) de9d6a7a8cb0929e0b4cf0a3120971c7b8ee8927,da5bd0047d6c961105da210c69d4c88421324b70,ce91c5615ca96f357519043181fb5b76b57ee223,c53aebb1d2eb5afbb18f9b3db9f9c956a463a4e1,d05f04d27dd86c67e4a8dfff4392f806cf577bdf: [Backport #16931]

	Split test_defined

	---
	 test/ruby/test_defined.rb | 18 ++++++++++++++++--
	 1 file changed, 16 insertions(+), 2 deletions(-)

	Test for [Bug #16669]

	---
	 test/ruby/test_defined.rb | 8 ++++++++
	 1 file changed, 8 insertions(+)

	Fix typo in test name

	---
	 test/ruby/test_defined.rb | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	Split test_defined_method

	---
	 test/ruby/test_defined.rb | 23 ++++++++++++++++++++++-
	 1 file changed, 22 insertions(+), 1 deletion(-)

	Fixed `defined?` against protected method call

	Protected methods are restricted to be called according to the
	class/module in where it is defined, not the actual receiver's
	class.  [Bug #16931]
	---
	 test/ruby/test_defined.rb | 1 +
	 vm_insnhelper.c           | 2 +-
	 2 files changed, 2 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67919 | usa | 2021-04-05 07:58:46 +0900 (Mon, 05 Apr 2021) | 44 lines

merge revision(s) a0bc3f2a1c2c98f225612101cb4e1ea1a6813546,75a0447c15a7ab017bd4240c2a9cc69b134b80b9,f1699314147bad2cf5550cc582693424fdbc2510: [Backport #16846]

	Suppress C4267 "possible loss of data" warnings

	---
	 ext/win32ole/win32ole.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	Suppress C4267 "possible loss of data" warnings

	Just cast down explicitly.
	---
	 ext/win32ole/win32ole.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	win32ole: separate global variable declarations and definitions

	https://gcc.gnu.org/gcc-10/changes.html#c

	> * GCC now defaults to `-fno-common`.  As a result, global
	>   variable accesses are more efficient on various targets.  In
	>   C, global variables with multiple tentative definitions now
	>   result in linker errors.  With `-fcommon` such definitions are
	>   silently merged during linking.
	---
	 ext/win32ole/win32ole.c           | 1 +
	 ext/win32ole/win32ole.h           | 4 ++--
	 ext/win32ole/win32ole_error.c     | 3 +++
	 ext/win32ole/win32ole_error.h     | 4 ++--
	 ext/win32ole/win32ole_method.c    | 2 ++
	 ext/win32ole/win32ole_method.h    | 2 +-
	 ext/win32ole/win32ole_record.c    | 2 ++
	 ext/win32ole/win32ole_record.h    | 2 +-
	 ext/win32ole/win32ole_type.c      | 2 ++
	 ext/win32ole/win32ole_type.h      | 2 +-
	 ext/win32ole/win32ole_typelib.c   | 2 ++
	 ext/win32ole/win32ole_typelib.h   | 2 +-
	 ext/win32ole/win32ole_variable.c  | 2 ++
	 ext/win32ole/win32ole_variable.h  | 2 +-
	 ext/win32ole/win32ole_variant.c   | 2 ++
	 ext/win32ole/win32ole_variant.h   | 2 +-
	 ext/win32ole/win32ole_variant_m.c | 2 ++
	 ext/win32ole/win32ole_variant_m.h | 2 +-
	 18 files changed, 29 insertions(+), 11 deletions(-)
------------------------------------------------------------------------
r67918 | usa | 2021-04-05 07:50:22 +0900 (Mon, 05 Apr 2021) | 15 lines

merge revision(s) 12391cdbe11f3fbeb3b04c30b944139e5bbd9ea6: [Backport #16834]

	merge revision(s) cbe4f75ef802f13d05f94e42274b65a062bd3666: [Backport
	 #16834]

		Fix rb_profile_frame_classpath to handle module singletons

		Right now `SomeClass.method` is properly named, but `SomeModule.method`
		is displayed as `#<Module:0x000055eb5d95adc8>.method` which makes
		profiling annoying.
	---
	 test/-ext-/debug/test_profile_frames.rb | 40 ++++++++++++++++++++++++++++-----
	 version.h                               |  2 +-
	 vm_backtrace.c                          |  2 +-
	 3 files changed, 36 insertions(+), 8 deletions(-)
------------------------------------------------------------------------
r67917 | usa | 2021-04-05 07:48:27 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 08529a61153e5c40f57a65272211357511d6e6db: [Backport #16798]

	Compare environment variable names in those manor [Bug #16798]

------------------------------------------------------------------------
r67916 | usa | 2021-04-05 07:44:23 +0900 (Mon, 05 Apr 2021) | 8 lines

merge revision(s) 2f1895fa: [Backport #16767]

	Fixed formatted substring expansion [Bug #16767]

	---
	 strftime.c             | 2 ++
	 test/ruby/test_time.rb | 7 +++++++
	 2 files changed, 9 insertions(+)
------------------------------------------------------------------------
r67915 | usa | 2021-04-05 07:41:01 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 2f1895fa15386fb3cdc91c5604171290828b9da8: [Backport #16767]

	Fix source location of autoloaded constant [Bug #16764]

------------------------------------------------------------------------
r67914 | usa | 2021-04-05 07:27:35 +0900 (Mon, 05 Apr 2021) | 11 lines

merge revision(s) e04418bb16cd99b4a4402e7457d3bdc967284f98: [Backport #16830]

	[ruby/uri] Check if DN exists

	https://bugs.ruby-lang.org/issues/16830

	https://github.com/ruby/uri/commit/b4bf8c1217
	---
	 lib/uri/ldap.rb       | 1 +
	 test/uri/test_ldap.rb | 4 ++++
	 2 files changed, 5 insertions(+)
------------------------------------------------------------------------
r67913 | usa | 2021-04-05 07:24:29 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 579645d9: [Backport #17033]

Fixed infinite loop at error in printing cause [Bug #17033]

------------------------------------------------------------------------
r67912 | usa | 2021-03-02 21:00:29 +0900 (Tue, 02 Mar 2021) | 13 lines

merge revision(s) e39f7e64: [Backport #16760]

	parse.y: fix segv with Ripper#yydebug

	* parse.y (parser_token_value_print): in ripper, ID values are
	  wrapped in NODE_RIPPER at set_yylval_name(), so print the Symbol
	  wrapped together.

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 parse.y                    | 2 +-
	 test/ripper/test_ripper.rb | 9 +++++++++
	 2 files changed, 10 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67911 | usa | 2021-03-02 20:44:02 +0900 (Tue, 02 Mar 2021) | 4 lines

merge revision(s) 99a9c3fe: [Backport #17024]

	Fixed yday and wday with timezone [Bug #17024]

------------------------------------------------------------------------
r67910 | usa | 2021-03-02 20:37:36 +0900 (Tue, 02 Mar 2021) | 9 lines

merge revision(s) 2ecfb88e: [Backport #16918]

	Correctly remove temporary directory if path yielded is mutated
	
	Another approach would be to freeze the string, but that could
	cause backwards compatibility issues.
	
	Fixes [Bug #16918]

------------------------------------------------------------------------
r67909 | usa | 2021-03-02 20:26:58 +0900 (Tue, 02 Mar 2021) | 15 lines

merge revision(s) 5a79d8e0,160511d8: [Backport #16925]

	Fix error raised by Net::HTTPResponse#inflater if the block raises

	* See https://bugs.ruby-lang.org/issues/13882#note-6
	---
	 lib/net/http/response.rb                    |  5 ++-
	 spec/ruby/library/net/http/http/get_spec.rb | 67 +++++++++++++++++++++++++++++
	 2 files changed, 70 insertions(+), 2 deletions(-)

	Quarantine specs which fail frequently with CHECK_LEAKS=true

	---
	 spec/ruby/library/net/http/http/get_spec.rb | 2 ++
	 1 file changed, 2 insertions(+)
------------------------------------------------------------------------
r67908 | usa | 2021-03-02 20:25:18 +0900 (Tue, 02 Mar 2021) | 11 lines

merge revision(s) 0ba27259: [Backport #16940]

	Fix crashes in the peephole optimizer on OpenBSD/sparc64

	These crashes are due to alignment issues, casting ADJUST to INSN
	and then accessing after the end of the ADJUST.  These patches
	come from Stefan Sperling <stsp@apache.org>, who reported the
	issue.
	---
	 compile.c | 5 +++--
	 1 file changed, 3 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67907 | usa | 2021-03-02 20:23:42 +0900 (Tue, 02 Mar 2021) | 13 lines

merge revision(s) a19228f8: [Backport #16979]

	brace the fact that lchmod(2) can EOPNOTSUPP

	Musl libc has this function as a tiny wrapper of fchmodat(3posix).  On
	the other hand Linux kernel does not support changing modes of a symlink.
	The operation always fails with EOPNOTSUPP.  This fchmodat behaviour is
	defined in POSIX.  We have to take care of such exceptions.
	---
	 lib/fileutils.rb               |  3 ++-
	 test/pathname/test_pathname.rb |  2 +-
	 test/ruby/test_notimp.rb       | 19 ++++++++++++-------
	 3 files changed, 15 insertions(+), 9 deletions(-)
------------------------------------------------------------------------
r67906 | usa | 2021-03-02 20:21:10 +0900 (Tue, 02 Mar 2021) | 7 lines

merge revision(s) 263b9413: [Backport #16981]

	[ripper] fix mismatched indentations warning [Bug #16981]
	
	The scanner location has to be set from lex.ptok before it is
	flushed by dispatching the scanner event.

------------------------------------------------------------------------
r67905 | usa | 2021-03-01 22:23:20 +0900 (Mon, 01 Mar 2021) | 24 lines

merge revision(s) e9bb30d4,a064e467,4d753461: [Backport #16998]

	Expect no conflict in the parser

	---
	 parse.y | 1 +
	 1 file changed, 1 insertion(+)

	Support Bison 3

	---
	 common.mk           |  1 +
	 parse.y             |  2 +-
	 tool/pure_parser.rb | 15 +++++++++++++++
	 3 files changed, 17 insertions(+), 1 deletion(-)
	 create mode 100755 tool/pure_parser.rb

	Refine error message

	Highlight failed command and suggest installing the command.
	[Bug #16042]
	---
	 tool/pure_parser.rb | 7 ++++++-
	 1 file changed, 6 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67904 | usa | 2021-03-01 00:06:26 +0900 (Mon, 01 Mar 2021) | 13 lines

merge revision(s) ac2106ac,cf90df22: [Backport #16813]

	[DOC] Fixed explanation for Method#>> [Bug #16813] [ci skip]

	---
	 proc.c | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)

	[DOC] Separated Method#[] from Method#call [Bug #16813] [ci skip]

	---
	 proc.c | 14 +++++++++++++-
	 1 file changed, 13 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67903 | usa | 2021-03-01 00:04:13 +0900 (Mon, 01 Mar 2021) | 6 lines

merge revision(s) 01b3a380: [Backport #11143][Backport #15932]

	Fix wrong "void value expression" error

	* parse.y (value_expr_check): if either of then or else statements is not a void value expression, the whole if is not also a void value expression. [Bug #15932]

------------------------------------------------------------------------
r67902 | usa | 2021-02-28 23:53:21 +0900 (Sun, 28 Feb 2021) | 14 lines

merge revision(s) e02bd0e7: [Backport #15608]

	Don't display singleton class in Method#inspect unless method defined there
	
	Previously, if an object has a singleton class, and you call
	Object#method on the object, the resulting string would include
	the object's singleton class, even though the method was not
	defined in the singleton class.
	
	Change this so the we only show the singleton class if the method
	is defined in the singleton class.
	
	Fixes [Bug #15608]

------------------------------------------------------------------------
r67901 | usa | 2021-02-28 23:44:22 +0900 (Sun, 28 Feb 2021) | 7 lines

merge revision(s) 8b6e2685: [Backport #16649]

	Fixed symbol misused as ID
	
	rb_funcallv_public and rb_respond_to require an ID, not a
	Symbol. [Bug #16649]

------------------------------------------------------------------------
r67900 | usa | 2021-02-28 23:37:37 +0900 (Sun, 28 Feb 2021) | 8 lines

merge revision(s) 3c93ed59: [Backport #16514]

	Update documentation for Array/Hash Argument section of methods.rdoc

	[Bug #16514]
	---
	 doc/syntax/methods.rdoc | 15 +++++++++++++--
	 1 file changed, 13 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67899 | usa | 2021-02-28 23:31:52 +0900 (Sun, 28 Feb 2021) | 4 lines

	* vm_args.c (setup_parameters_complex): no longer need to warn splat
	  hash in a pattern.
	[Backport #16632][Bacport #16950]

------------------------------------------------------------------------
r67898 | usa | 2021-02-28 23:16:37 +0900 (Sun, 28 Feb 2021) | 24 lines

merge revision(s) f9e5c74c: [Backport #15980]

	compile.c: stop wrong peephole optimization when covearge is enabled

	jump-jump optimization ignores the event flags of the jump instruction
	being skipped, which leads to overlook of line events.

	This changeset stops the wrong optimization when coverage measurement is
	neabled and when the jump instruction has any event flag.

	Note that this issue is not only for coverage but also for TracePoint,
	and this change does not fix TracePoint.
	However, fixing it fundamentally is tough (which requires revamp of
	the compiler).  This issue is critical in terms of coverage measurement,
	but minor for TracePoint (ko1 said), so we here choose a stopgap
	measurement.

	[Bug #15980] [Bug #16397]

	Note for backporters: this changeset can be viewed by `git diff -w`.
	---
	 compile.c                      | 232 +++++++++++++++++++++++------------------
	 test/coverage/test_coverage.rb |  12 +++
	 2 files changed, 141 insertions(+), 103 deletions(-)
------------------------------------------------------------------------
r67897 | usa | 2021-02-28 23:14:25 +0900 (Sun, 28 Feb 2021) | 1 line

merge revision(s) a7b9f085ff952fcb18f82de39b3bf9ab7e5ba3e7,9165fcdfa309052a2adc3c6100ab24204de6c2d1,e42d9d8df87f58b9bfa65647249822df25851375: [Backport #16401]
------------------------------------------------------------------------
r67896 | usa | 2021-02-28 23:01:55 +0900 (Sun, 28 Feb 2021) | 8 lines

merge revision(s) f72dc407: [Backport #16297]

	Prohibit calling undefined allocator [Bug #16297]

	---
	 object.c                | 31 +++++++++++++++++++++++++++++--
	 test/ruby/test_class.rb |  8 ++++++++
	 2 files changed, 37 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67895 | usa | 2021-02-28 22:56:46 +0900 (Sun, 28 Feb 2021) | 14 lines

merge revision(s) 74b19e330adbdae2d8e53b58f1a2a7b725e69c8d: [Backport #16268]

	fix imemo entry description.

	* ext/objspace/objspace.c (count_imemo_objects): `imemo_type_ids`
	  should be match with `enum imemo_type` in internal.h and this
	  patch fix mismatch.


	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 ext/objspace/objspace.c        | 5 +++--
	 test/objspace/test_objspace.rb | 2 ++
	 2 files changed, 5 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67894 | usa | 2021-02-28 22:47:29 +0900 (Sun, 28 Feb 2021) | 10 lines

merge revision(s) f364564e66d1db1de8e80d669287386595c8bc46: [Backport #16269]

	bignum.c (estimate_initial_sqrt): prevent integer overflow

	`Integer.sqrt(0xffff_ffff_ffff_ffff ** 2)` caused assertion failure
	because of integer overflow.  [ruby-core:95453] [Bug #16269]
	---
	 bignum.c                  | 10 +++++++++-
	 test/ruby/test_integer.rb |  3 +++
	 2 files changed, 12 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67892 | usa | 2021-01-31 18:56:27 +0900 (Sun, 31 Jan 2021) | 4 lines

Backport webrick patch for CVE-2020-25613

[Backport #17201]

------------------------------------------------------------------------
r67891 | usa | 2021-01-31 18:52:51 +0900 (Sun, 31 Jan 2021) | 7 lines

merge revision(s) 7cb8904a12c850ee30dcd67817fa2f9dc3fee813: [Backport #17567]

	Extract correct processor name for ARM64 Macs

	---
	 tool/m4/ruby_universal_arch.m4 | 3 +++
	 1 file changed, 3 insertions(+)
------------------------------------------------------------------------
r67890 | usa | 2021-01-31 18:45:23 +0900 (Sun, 31 Jan 2021) | 4 lines

change the order of of SERVER_CERT and CA_CERT for OpenSSL 1.1.1

[backport #17501]

------------------------------------------------------------------------
r67888 | usa | 2020-12-09 22:53:56 +0900 (Wed, 09 Dec 2020) | 2 lines

[Backport #17381] replace the old certs in RubyGems

------------------------------------------------------------------------
r67886 | usa | 2020-10-27 23:25:35 +0900 (Tue, 27 Oct 2020) | 31 lines

merge revision(s): 07786ed

	test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h

	On some environments that uses OpenSSL 1.1.1h, the two tests now fail.

	http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz
	https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true

	```
	  1) Failure:
	TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]:
	<"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was
	<"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">.
	```

	Not sure why, but verify_callback now seems to receive only SERVER_CERT
	but not CA_CERT.
	It would be good to investigate the issue furthermore, but tentatively,
	I want to stop the failures.

	test/net/http/test_https.rb: the order of verify_callback seems to
	 vary

	... depending upon the environment.

	test/net/http/test_https.rb: The test logic was buggy

	The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and
	`[SERVER_CERT]` after 1.1.1h.

------------------------------------------------------------------------
r67884 | usa | 2020-06-14 00:52:54 +0900 (Sun, 14 Jun 2020) | 10 lines

merge revision(s) 7e289cdf3fed588b2d5a6973e29f9ff95cb8d76c: [Backport #16949]

	[ruby/psych] Fixing compatibility with libyaml 0.2.5

	The main issue is that commas aren't allowed in local tags.  libyaml
	was updated to follow the spec, and our tests were out of date.

	See: https://github.com/yaml/libyaml/issues/196

	https://github.com/ruby/psych/commit/3f5e520fd3
------------------------------------------------------------------------
r67883 | nagachika | 2020-03-31 22:46:22 +0900 (Tue, 31 Mar 2020) | 1 line

bump teeny version to 2.6.7.
------------------------------------------------------------------------
r67875 | nagachika | 2020-03-31 20:21:22 +0900 (Tue, 31 Mar 2020) | 10 lines

merge revision: 61b7f86248bd121be2e83768be71ef289e8e5b90

ext/socket/init.c: do not return uninitialized buffer

Resize string buffer only if some data is received in
BasicSocket#read_nonblock and some methods.

Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz>


------------------------------------------------------------------------
r67859 | nagachika | 2020-03-30 13:47:36 +0900 (Mon, 30 Mar 2020) | 6 lines

merge revision(s) 4adb2d655dcd54b28366b4d17e86b21e2b622cd1: [Backport #16738]

	Make RbConfig::CONFIG values mutable [Bug #16738]

	As `RbConfig.expand` modifies the argument and involved `CONFIG`
	values, its values should be mutable.
------------------------------------------------------------------------
r67858 | nagachika | 2020-03-30 11:22:51 +0900 (Mon, 30 Mar 2020) | 13 lines

merge revision(s) 4c019f5a626523e99e2827ed917802e3097c380d,c3584dfacce4d0f2058d8403de6fdce4fd4d686b: [Backport #16676]

	check ar_table after `#hash` call

	ar_table can be converted to st_table just after `ar_do_hash()`
	function which calls `#hash` method. We need to check
	the representation to detect this mutation.
	[Bug #16676]

	check ar_table first.

	RHASH_AR_TABLE_SIZE() has assertion that it is a ar_talbe.
	The last commit breaks this assumption so check ar_table first.
------------------------------------------------------------------------
r67857 | nagachika | 2020-03-20 23:31:10 +0900 (Fri, 20 Mar 2020) | 20 lines

merge revision(s) c6633f21a49c90ab7c37076d79c286bbf3438c1f:

	Update some syslog tests to absurb the format change of FreeBSD
	 syslog

	FreeBSD

	```
	$ ruby -rsyslog -e 'Syslog.open("rubyspec", Syslog::LOG_PERROR) {|s| s.log(Syslog::LOG_ALERT, "Hello") }'
	rubyspec 78462 - - Hello
	```

	Linux

	```
	$ ruby -rsyslog -e 'Syslog.open("rubyspec", Syslog::LOG_PERROR) {|s| s.log(Syslog::LOG_ALERT, "Hello") }'
	rubyspec: Hello
	```

	https://github.com/freebsd/freebsd/commit/591ef7c8076109cff3c41f9bb50da996a34121e9
------------------------------------------------------------------------
r67856 | nagachika | 2020-03-20 17:12:05 +0900 (Fri, 20 Mar 2020) | 2 lines

backport 80b5a0ff2a7709367178f29d4ebe1c54122b1c27 partially as a securify fix for CVE-2020-10663.
The patch was provided by Jeremy Evans.
------------------------------------------------------------------------
r67855 | nagachika | 2020-03-20 17:07:34 +0900 (Fri, 20 Mar 2020) | 1 line

Add svn:ignore properties.
------------------------------------------------------------------------
r67854 | nagachika | 2020-03-20 16:01:35 +0900 (Fri, 20 Mar 2020) | 7 lines

merge revision(s) 87ad5ea729735ff6b8f1ac0bb3aad2aedd6f716e,9745e90197f129708986803e8913fb151862478a:

	Skip jit_test on some new RubyCI envs for now


	Propagate JIT skip to all tests

------------------------------------------------------------------------
r67853 | nagachika | 2020-03-20 15:47:10 +0900 (Fri, 20 Mar 2020) | 18 lines

merge revision(s) b3ea0980db87404c2b7763a3fdbe898c3812843d,5fbb4555b427909aed4fe2376c4c583849c1d51c,6477d98e49dbe04deb03caee1a58a34c3b79d4e4,16415fefc14e1419d5587288fb6a69fe5ccf94ba:

	Check MJIT support in one place

	to fix test failure on trunk-no-mjit
	https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123

	Prefer using MJIT_CC for JIT support check

	because Solaris might have CC=cc and we'd like to check full path
	MJIT_CC=/opt/developerstudio12.5/bin/cc instead.

	test/lib/jit_support.rb: Update the regexp for icc

	MJIT_CC is always an absolute path.

	test/lib/jit_support.rb: The path to icc was changed

------------------------------------------------------------------------
r67852 | nagachika | 2020-03-20 15:43:59 +0900 (Fri, 20 Mar 2020) | 14 lines

merge revision(s) 66590,66615,66781:

	jit_support.rb: skip testing MJIT on oracle developer studio

	jit_support.rb: deal with -std=c99 flag

	CC is changed from "icc" to "icc -std=c99" by r66605.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181228T130003Z.fail.html.gz

	test_jit.rb: change format of test error output

	to avoid breaking redmine quote like
	https://bugs.ruby-lang.org/issues/15522
------------------------------------------------------------------------
r67851 | nagachika | 2020-03-20 15:36:58 +0900 (Fri, 20 Mar 2020) | 1 line

Add svn:ignore properties.
------------------------------------------------------------------------
r67850 | nagachika | 2020-03-20 15:12:36 +0900 (Fri, 20 Mar 2020) | 9 lines

merge revision(s) adcf0316d1ecedae2a9157ad941550e0c0fb510b: [Backport #16664]

	Prevent unloading methods used in root_fiber while calling another
	 Fiber (#2939)

	Fixing SEGVs like:
	http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744905
	http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744420
	http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2741400
------------------------------------------------------------------------
r67849 | nagachika | 2020-03-20 12:09:27 +0900 (Fri, 20 Mar 2020) | 4 lines

merge revision(s) a8dcab723316997d9e01c89d6df969edce75bdca:

	Avoid infinite loop on --jit-wait

------------------------------------------------------------------------
r67848 | nagachika | 2020-03-20 11:54:46 +0900 (Fri, 20 Mar 2020) | 6 lines

merge revision(s) 67325:

	Show retry's stdout as well

	because stderr did not have sufficient information
	https://ci.appveyor.com/project/ruby/ruby/builds/23242505/job/dirugxujk70nnhp6
------------------------------------------------------------------------
r67847 | nagachika | 2020-03-20 11:45:26 +0900 (Fri, 20 Mar 2020) | 7 lines

merge revision(s) 67322,67323:

	Insert --jit-verbose=2 logs for mswin debugging

	Explain why cl.exe needs --jit-verbose=2 [ci skip]

	I forgot to explain it in the previous commit
------------------------------------------------------------------------
r67846 | nagachika | 2020-03-19 21:55:36 +0900 (Thu, 19 Mar 2020) | 43 lines

merge revision(s) c14b67b2a8cf60b37cfb221d8b97c6eb91833522: [Backport #16139]

	Check frozen flag on MJIT setinstancevariable

	It does not seem to have a significant performance impact, hopefully?

	```
	$ benchmark-driver -v benchmark.yml --rbenv 'before --jit;after --jit' --repeat-count=24 --output=all
	before --jit: ruby 2.7.0dev (2019-09-03T21:02:24Z master 77596fb7a9) +JIT [x86_64-linux]
	after --jit: ruby 2.7.0dev (2019-09-04T01:54:44Z master 7363e22d79) +JIT [x86_64-linux]
	Calculating -------------------------------------
	                                 before --jit           after --jit
	Optcarrot Lan_Master.nes    48.44054595799523     71.67010255902900 fps
	                            71.32797692837639     71.97846863769546
	                            72.51921961607691     78.87360980544105
	                            73.54082925611047     79.80408132389941
	                            74.03503843709451     79.85739528572826
	                            74.04863857926493     79.89850834901381
	                            75.30266276129467     80.34607233076015
	                            75.69063990896244     80.88474397425360
	                            75.70458132587405     81.09234267781642
	                            77.39842764662852     82.13766823612643
	                            77.76922944068329     82.20398304840373
	                            81.17984044023393     82.26722630628272
	                            82.85235776076533     82.71375902781254
	                            83.04906099135320     82.75893420702198
	                            83.10214168136230     82.79668965325972
	                            83.71456007558125     82.85131667916379
	                            84.06658306760725     82.95676565411722
	                            84.25690684305728     83.19972846225775
	                            84.27938663923503     83.28510503845854
	                            84.45467716218090     83.41003730434703
	                            84.51563186125925     83.67773614721280
	                            84.56139892968321     84.02082201151110
	                            84.69819452180658     84.10495346787033
	                            84.78125989622576     84.47867803506055
	```

	Note for backporter:
	test_jit's `success_count` would be 1 in Ruby 2.6, since 2.7 introduced
	"MJIT recompile" on JIT-ed code cancel.

	[Bug #16139]
------------------------------------------------------------------------
r67845 | nagachika | 2020-03-18 20:59:35 +0900 (Wed, 18 Mar 2020) | 4 lines

merge revision(s) ee1334189b95cb5e7785e3415b332a7a76879ac3:

	Fix uplevel

------------------------------------------------------------------------
r67844 | nagachika | 2020-03-18 20:24:21 +0900 (Wed, 18 Mar 2020) | 4 lines

merge revision(s) 8a6ba10f9dd456cf54de800203cf04bbe42271fb: [Backport #12392]

	Do not make disabled directories at installation  [Bug #12392]

------------------------------------------------------------------------
r67843 | nagachika | 2020-03-10 20:41:32 +0900 (Tue, 10 Mar 2020) | 1 line

r66845 introduced mixed declarations and code.
------------------------------------------------------------------------
r67842 | nagachika | 2020-03-08 10:48:27 +0900 (Sun, 08 Mar 2020) | 9 lines

merge revision(s) 86022167461dc90b70164e2bb23316959bbfd6ba,47a1872cd8b901b8aab6dedce7fa3807c97d290d: [Backport #16681]

	Switch to download libffi source package to github releases from
	 sourceware.org


	Use osuosl instead of GitHub releases

	  Because the package provided by GitHub releases is different from sourceware.
------------------------------------------------------------------------
r67841 | nagachika | 2020-03-07 19:03:51 +0900 (Sat, 07 Mar 2020) | 10 lines

merge revision(s) 77596fb7a91cc119b25ac9e19b3c8682709765b4: [Backport #16138]

	Do not turn on keyword_init for Struct subclass if keyword hash is
	 empty

	This was accidentally turned on because there was no checking for
	Qundef.

	Also, since only a single keyword is currently supported, simplify
	the rb_get_kwargs call.
------------------------------------------------------------------------
r67840 | nagachika | 2020-03-07 18:57:02 +0900 (Sat, 07 Mar 2020) | 5 lines

merge revision(s) c4794ed73ad348a61a7cfbe3da0a7eb49ba46eb9: [Backport #16641]

	Avoid jumping to a wrong destination

	when the next insn is already compiled by former branches.
------------------------------------------------------------------------
r67839 | nagachika | 2020-03-07 18:44:38 +0900 (Sat, 07 Mar 2020) | 6 lines

merge revision(s) 6e6844320de989cb88a154e2ac75066ccea1bba2: [Backport #16619]

	Fixed duplicated warning

	As `command_rhs` is always a "value expression", `command_asgn`
	does not need the same check.
------------------------------------------------------------------------
r67838 | nagachika | 2020-03-07 18:38:30 +0900 (Sat, 07 Mar 2020) | 8 lines

merge revision(s) 4f19666e8b144600e959e4673f79d63f98bd637d: [Backport #16508]

	`Regexp` in `MatchData` can be `nil`

	`String#sub` with a string pattern defers creating a `Regexp`
	until `MatchData#regexp` creates a `Regexp` from the matched
	string.  `Regexp#last_match(group_name)` accessed its content
	without creating the `Regexp` though.  [Bug #16508]
------------------------------------------------------------------------
r67837 | nagachika | 2020-02-15 18:12:47 +0900 (Sat, 15 Feb 2020) | 6 lines

merge revision(s) 95ab9cd8f453099d7649dc0e0eec55ea891340f5: [Backport #16624]

	Restart timer thread even after preparation failed

	If the timer thread is left stopped, memory crash or segfault can
	happen. [Bug #16624]
------------------------------------------------------------------------
r67836 | nagachika | 2019-12-18 22:41:48 +0900 (Wed, 18 Dec 2019) | 28 lines

merge revision(s) d6a2bce64a7fa1099e507e1d36b5f1533f42f60f,c687be4bc01c9ce52ea990945d9304d6fe59fe9b: [Backport #16159]

	time.c (find_time_t): fix round-to-zero bug

	`find_time_t` did not work correctly for year older than the Epoch
	because it used C's integer division (which rounds negative to zero).

	For example, `TIme.new(1933)` returned a wrong time whose year is 1922
	in Asia/Kuala_Lumpur because there is no 00:00:00 1st Jan. 1933 in the
	time zone.

	```
	$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
	1932-12-31 00:00:00 +0700
	```

	This change fixes the issue by using `DIV` macro instead of `/`.
	Now `Time.new(1933)` returns a time in 1933.

	```
	$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
	1933-01-01 00:20:00 +0720
	```

	[Bug #16159]

	Added a test for [Bug #16159]

------------------------------------------------------------------------
r67835 | nagachika | 2019-12-15 17:28:52 +0900 (Sun, 15 Dec 2019) | 5 lines

merge revision(s) ff41663403d3eb76d95f465cb94e14d2faaa04d1: [Backport #16354]

	Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867]
	 [Bug #16354]

------------------------------------------------------------------------
r67834 | nagachika | 2019-12-15 17:12:17 +0900 (Sun, 15 Dec 2019) | 21 lines

merge revision(s) 203b7fa1ae8cc40d41c38d684f70b3fea7fae813,0131fab749fb76800de09e49a6abf910201c5b58,9c0cd5c569ba22bc68d1a77ad6580a275cd99639,c144d7215b3444fa36d28d540b60170a5b30743d: [Backport #16196]

	Guard static variable first

	* ext/openssl/ossl_asn1.c (Init_ossl_asn1): register the static
	  variable to grab an internal object, before creating the object.
	  otherwise the just-created object could get collected during the
	  global variable list allocation.  [Bug #16196]

	Slimed down test runtime by stressing openssl.so only [Bug #16196]


	Prefer rb_gc_register_mark_object

	* ext/openssl/ossl_asn1.c (Init_ossl_asn1): prefer
	  `rb_gc_register_mark_object`, which is better for constant
	  objects, over `rb_gc_register_address` for global/static
	  variables which can be re-assigned at runtime.  [Bug #16196]

	Skip very time consuming test [Bug #16196]

------------------------------------------------------------------------
r67833 | nagachika | 2019-12-15 16:20:58 +0900 (Sun, 15 Dec 2019) | 4 lines

merge revision(s) 463092b84da7933f307cc8747f948f68ef19f5fd: [Backport #16279]

	Update rake-12.3.3.

------------------------------------------------------------------------
r67832 | nagachika | 2019-12-15 16:14:45 +0900 (Sun, 15 Dec 2019) | 14 lines

merge revision(s) c9423b016cfeab852bc5a829e55e0a11f80b3ab7,0b1e26398e018116180bf41cb63887f77d5d1b82,78ee2c245331e353e218b8fac9ca722a2bcd8fea: [Backport #15968]

	marshal.c: check instance variable count

	* marshal.c (w_obj_each): ensure that no instance variable was
	  added while dumping other instance variables.  [Bug #15968]

	Hoisted out w_ivar_each


	marshal.c: check instance variable count

	* marshal.c (w_ivar_each): ensure that no instance variable was
	  removed while dumping other instance variables.  [Bug #15968]
------------------------------------------------------------------------
r67831 | nagachika | 2019-12-09 21:25:34 +0900 (Mon, 09 Dec 2019) | 5 lines

merge revision(s) 7d805e67f3275aef066d77aa9c32bef715c362ed: [Backport #15780]

	Avoid triggering autoload in Module#const_defined?(String)

	[Bug #15780]
------------------------------------------------------------------------
r67830 | nagachika | 2019-12-09 21:06:38 +0900 (Mon, 09 Dec 2019) | 16 lines

merge revision(s) e1b592b508c72a56ae012869d97fe1580ff87246,d10451f3fd51f577e704db770de48d05044eb45c: [Backport #15758]

	test_module.rb: fix a typo

	* test/ruby/test_module.rb (TestModule#test_nested_get): fix a
	  typo.  nested module's name is a qualified path.

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

	object.c: fix searching nested const paths

	* object.c (rb_mod_const_get, rb_mod_const_defined): nested const
	  paths should not search from toplevel constants.
	  [ruby-core:92202] [Bug #15758]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67828 | nagachika | 2019-11-09 07:51:51 +0900 (Sat, 09 Nov 2019) | 14 lines

merge revision(s) 6333020fc924d3ae63775c032bbe8f57364cd42e:

	atime may not updated unless strictatime is set on macOS Catalina

	Cited from mount(8):

	```
	strictatime
	        Always update the file access time when reading from a
	        file. Without this option the filesystem may default to a
	        less strict update mode, where some access time updates
	        are skipped for performance reasons. This option could be
	        ignored if it is not supported by the filesystem.
	```
------------------------------------------------------------------------
r67825 | nagachika | 2019-10-02 20:18:43 +0900 (Wed, 02 Oct 2019) | 10 lines

merge revision(s) 63ab7046a1a5c374a52dfa79406fe52d92d80344:

	Skip POINTOPOINT of IPv4 too instead of IPv6 only

	Fix following error on `utun*`:
	```
	  1) Error:
	TestSocket#test_udp_server:
	Errno::ECONNREFUSED: Connection refused - recvmsg(2)
	```
------------------------------------------------------------------------
r67822 | nagachika | 2019-10-02 07:38:59 +0900 (Wed, 02 Oct 2019) | 1 line

bump up teeny version to 2.6.6.
------------------------------------------------------------------------
r67810 | nagachika | 2019-10-01 19:59:35 +0900 (Tue, 01 Oct 2019) | 4 lines

lib/shell/command-processor.rb (Shell#[]): prevent unknown command

`FileTest.send(command, ...)` allows to call not only FileTest-related
methods but also any method that belongs to Kernel, Object, etc.
------------------------------------------------------------------------
r67808 | nagachika | 2019-10-01 19:57:43 +0900 (Tue, 01 Oct 2019) | 9 lines

merge revision(s) 3ce238b5f9795581eb84114dcfbdf4aa086bfecc:

	WEBrick: prevent response splitting and header injection

	This is a follow up to d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16.
	The commit prevented CRLR, but did not address an isolated CR or an
	isolated LF.

	Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
------------------------------------------------------------------------
r67807 | nagachika | 2019-10-01 19:56:49 +0900 (Tue, 01 Oct 2019) | 6 lines

merge revision(s) 36e057e26ef2104bc2349799d6c52d22bb1c7d03:

	Loop with String#scan without creating substrings

	Create the substrings necessary parts only, instead of cutting the
	rest of the buffer.  Also removed a useless, probable typo, regexp.
------------------------------------------------------------------------
r67806 | nagachika | 2019-10-01 19:56:11 +0900 (Tue, 01 Oct 2019) | 6 lines

merge revision(s) a0a2640b398cffd351f87d3f6243103add66575b:

	Fix for wrong fnmatch patttern

	* dir.c (file_s_fnmatch): ensure that pattern does not contain a
	  NUL character.  https://hackerone.com/reports/449617
------------------------------------------------------------------------
r67805 | nagachika | 2019-09-28 13:32:46 +0900 (Sat, 28 Sep 2019) | 8 lines

merge revision(s) 8b3774be3dd9f472bddd99e84e3c9fe2ff99d7ac: [Backport #15935]

	Fix memory leak

	* string.c (str_make_independent_expand): free independent buffer.
	  [Bug# 15935]

	Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com>
------------------------------------------------------------------------
r67804 | nagachika | 2019-09-27 20:23:18 +0900 (Fri, 27 Sep 2019) | 15 lines

merge revision(s) 93faa011d393bb4b5cf31a0cbb46922f0a5e7cdc: [Backport #16151]

	Tag string shared roots to fix use-after-free

	The buffer deduplication codepath in rb_fstring can be used to free the buffer
	of shared string roots, which leads to use-after-free.

	Introudce a new flag to tag strings that at one point have been a shared root.
	Check for it in rb_fstring to avoid freeing buffers that are shared by
	multiple strings. This change is based on nobu's idea in [ruby-core:94838].

	The included test case test for the sequence of calls to internal functions
	that lead to this bug. See attached ticket for Ruby level repros.

	[Bug #16151]
------------------------------------------------------------------------
r67803 | nagachika | 2019-09-14 11:24:58 +0900 (Sat, 14 Sep 2019) | 15 lines

merge revision(s) ade1283ca276f7d589ffd3539fbc7b9817f682d5: [Backport #16136]

	Fix a use-after-free bug by avoiding rb_str_new_frozen

	`str2 = rb_str_new_frozen(str1)` seems to make str1 a shared string that
	refers to str2, but str2 is not marked as STR_IS_SHARED_M nor
	STR_NOFREE.
	`rb_fstring(str2)` frees str2's ptr because it is not marked, and the
	free'ed pointer is the same as str1's ptr.
	After that, accessing str1 may cause use-after-free memory corruption.

	I guess this is a bug of rb_str_new_frozen, but I'm completely unsure
	what it should be; the string states and flags are not documented.
	So, this is a workaround for [Bug #16136].  I confirmed that rspec of
	activeadmin runs gracefully.
------------------------------------------------------------------------
r67802 | nagachika | 2019-09-13 20:21:17 +0900 (Fri, 13 Sep 2019) | 15 lines

merge revision(s) 547887138f19959f649b1c0dbcde5659ae3878ed:

	test/ruby/test_fiber.rb: reduce the count of object creation to cause
	 GC

	The test consistently fails on OpenBSD.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20190903T010009Z.fail.html.gz
	```
	  1) Failure:
	TestFiber#test_fork_from_fiber [/home/chkbuild/chkbuild/tmp/build/20190903T010009Z/ruby/test/ruby/test_fiber.rb:327]:
	[ruby-core:41456].
	<0> expected but was
	<1>.
	```
------------------------------------------------------------------------
r67801 | nagachika | 2019-09-13 20:17:07 +0900 (Fri, 13 Sep 2019) | 8 lines

merge revision(s) b0b0ded5aa2cf7c4574b057d8326ed4e1c172c12:

	webrick/test_utils.rb: loosen timeout severity

	to stabilize CI failure like:
	https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1013/ruby-trunk/log/20181228T114501Z.fail.html.gz

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67799 | nagachika | 2019-08-29 20:50:49 +0900 (Thu, 29 Aug 2019) | 1 line

bump up teeny version to 2.6.5.
------------------------------------------------------------------------
r67797 | nagachika | 2019-08-28 16:36:31 +0900 (Wed, 28 Aug 2019) | 7 lines

merge revision(s) f308ab2131ee675000926540cbb8c13c91dc3be5,989e8ad322afdfa3aa06e74b89fc42aef42895d0:

	Remove jquery.js


	Remove debug print [ci skip]

------------------------------------------------------------------------
r67792 | nagachika | 2019-08-28 14:41:10 +0900 (Wed, 28 Aug 2019) | 7 lines

merge revision(s) 4e038a7e64a9d52eed59b8f05647d4e58d265ec3: [Backport #5400]

	Revert "parse.y: Deprecate flip-flops"

	This reverts commit bae638ad5b782c44c80efe33834cb9039279af46.

	[Feature #5400]
------------------------------------------------------------------------
r67782 | nagachika | 2019-08-27 22:00:48 +0900 (Tue, 27 Aug 2019) | 1 line

bump up teeny version to 2.6.4.
------------------------------------------------------------------------
r67780 | nagachika | 2019-08-27 21:54:19 +0900 (Tue, 27 Aug 2019) | 1 line

Update rdoc version from 6.1.0 to 6.1.2.
------------------------------------------------------------------------
r67750 | nagachika | 2019-08-22 20:39:49 +0900 (Thu, 22 Aug 2019) | 6 lines

merge revision(s) fd0e3bd2497d4e796b719c7b7154dc3c945f87b1: [Backport #14834]

	fix VC 2013 compile error

	It seems the compiler does not support VLAs.
	See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1
------------------------------------------------------------------------
r67749 | nagachika | 2019-08-22 20:28:30 +0900 (Thu, 22 Aug 2019) | 4 lines

merge revision(s) 9557069299ac3b96691040a541afa65761a724ad: [Backport #15992]

	Avoid creating Hash objects per each mon_synchronize call (#2393)

------------------------------------------------------------------------
r67747 | nagachika | 2019-08-18 16:22:19 +0900 (Sun, 18 Aug 2019) | 7 lines

merge revision(s) d5c33364e3c0efb15e11df417c925afee2cdb9c9: [Backport #16105]

	Fixed heap-use-after-free

	* string.c (rb_str_sub_bang): retrieves a pointer to the
	  replacement string buffer just before using it, for the case of
	  replacement with the receiver string itself.  [Bug #16105]
------------------------------------------------------------------------
r67746 | nagachika | 2019-08-18 15:53:02 +0900 (Sun, 18 Aug 2019) | 6 lines

merge revision(s) 5b1bf8dd2d08ae7371ecf025967376bb794ed651: [Backport #16099]

	UTF LE is fixed at least the first 2 bytes

	* io.c (io_strip_bom): if the first 2 bytes are 0xFF0xFE, it
	should be a little-endian UTF, 16 or 32.  [Bug #16099]
------------------------------------------------------------------------
r67745 | nagachika | 2019-08-18 15:10:46 +0900 (Sun, 18 Aug 2019) | 18 lines

merge revision(s) 5d33f787169bcc3594d2264726695d58c4a06899,8b162ce9d1003e4e469d8f48cb9a2076fd45b47c: [Backport #14834]

	fix tracepoint + backtrace SEGV

	PC modification in gc_event_hook_body was careless.  There are (so
	to say) abnormal iseqs stored in the cfp.  We have to check sanity
	before we touch the PC.

	This has not been fixed because there was no way to (ab)use the
	setup from pure-Ruby.  However by using our official C APIs it is
	possible to touch such frame(s), resulting in SEGV.

	Fixes [Bug #14834].

	Fix assertion failure when VM_CHECK_MODE

	Some VM frames (dummy and top pushed by `rb_vm_call_cfunc`) has
	iseq but has no pc.
------------------------------------------------------------------------
r67744 | nagachika | 2019-08-18 14:21:34 +0900 (Sun, 18 Aug 2019) | 12 lines

merge revision(s) df317151a5b4e0c5a30fcc321a9dc6abad63f7ed: [Backport #16019]

	should not free local hook_list here.

	exec_hooks_postcheck() clean executed hook_list if it is needed.
	list_exec is freed if there are no events and this list is local
	event (connected to specific iseq). However, iseq keeps to point
	this local hook_list, freed list. To prevent this situation,
	do not free hook_list here even if it has no events.

	This issue is reported by @joker1007.
	https://twitter.com/joker1007/status/1153649170797830144
------------------------------------------------------------------------
r67743 | nagachika | 2019-08-18 14:07:50 +0900 (Sun, 18 Aug 2019) | 10 lines

merge revision(s) f1b76ea63ce40670071a857f408a4747c571f1e9,1d1f98d49c9908f4e3928e582d31fd2e9f252f92: [Backport #16024]

	Occupy match data

	* string.c (rb_str_split_m): occupy match data not to be modified
	  during yielding the block.  [Bug #16024]

	Reuse match data

	* string.c (rb_str_split_m): reuse occupied match data.  [Bug #16024]
------------------------------------------------------------------------
r67742 | nagachika | 2019-08-18 13:32:59 +0900 (Sun, 18 Aug 2019) | 8 lines

merge revision(s) f91879a7b548284c93743168acfd11e3d2aeefac: [Backport #15992]

	handle_interrupt to defend monitor state [Bug #15992]

	If an exception is raised from another thread for example Timeout
	and this thread is just after `mon_exit`'s `@mon_owner = nil`,
	the exception breaks the state of MonitorMixin. To prevent that situation,
	it need to block interruption in mon_enter and mon_exit.
------------------------------------------------------------------------
r67741 | nagachika | 2019-08-11 21:17:58 +0900 (Sun, 11 Aug 2019) | 12 lines

merge revision(s) 8aecc90974ab1ac87056f77e2cb3406c5c041504,2f6cc15cdb3d64135b29cfd5ee376a5a03ebbee7: [Backport #15965]

	Hoisted out WIDE_ENCODINGS


	Fixed String#grapheme_clusters with wide encodings

	* string.c (get_reg_grapheme_cluster): make regexp from properly
	  encoded sources fro wide-char encodings.  [Bug #15965]

	* regparse.c (node_extended_grapheme_cluster): suppress false
	  duplicated range warning for the time being.
------------------------------------------------------------------------
r67740 | nagachika | 2019-08-09 23:28:00 +0900 (Fri, 09 Aug 2019) | 13 lines

merge revision(s) ec8e5f5aa64e2a54cf1e303f2b012c98e8d521ba,5a187e26adc8aa32367f294c1496935c7356d386: [Backport #15952]

	array.c: always check frozenness in Array#unshift. Fixes [Bug #15952]

	Closes: https://github.com/ruby/ruby/pull/2251

	array.c add back shared array optimization to
	 ary_ensure_room_for_unshift

	Bug fix in commit ec8e5f5aa64e2a [Bug #15952] disabled an
	optimization in this function.

	Closes: https://github.com/ruby/ruby/pull/2252
------------------------------------------------------------------------
r67739 | nagachika | 2019-08-09 22:42:26 +0900 (Fri, 09 Aug 2019) | 6 lines

merge revision(s) 8f51da5d41f0642d5a971e4223d1ba14643c6398: [Backport #15946]

	Get rid of undefined behavior

	* string.c (rb_str_sub_bang): str and repl can be same.
	  [Bug #15946]
------------------------------------------------------------------------
r67738 | nagachika | 2019-08-09 22:41:04 +0900 (Fri, 09 Aug 2019) | 11 lines

merge revision(s) 28678997e40869f5591eae60edd9757334426ffb,8797f48373dcfa3ff8e748667732dea8aea4347e: [Backport #15937]

	Preserve the string content at self-copying

	* string.c (rb_str_init): preserve the embedded content when
	  self-copying with a capacity.  [Bug #15937]

	New buffer for shared string

	* string.c (rb_str_init): allocate new buffer if the string is
	  shared.  [Bug #15937]
------------------------------------------------------------------------
r67737 | nagachika | 2019-08-08 01:30:37 +0900 (Thu, 08 Aug 2019) | 21 lines

merge revision(s) ae2a904ce9bffedee7d110dc60fd51c0a2879a5b,165ddfda20f6db8a3149d14c4f431fc242ddab70,fa7a768fdfe5223a29db4fa71b3e6101fb02ad51: [Backport #16051]

	Update the certificate files to make the test pass on Debian 10

	The old certificate files (for example, test/rubygems/ca_cert.pem) were
	signed by SHA1.  This message digest is considered too weak and rejected
	by OpenSSL 1.1.1 or later.  Because of this, the test suite does not
	pass on Debian 10.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T123003Z.fail.html.gz#test%2Frubygems

	This change regenerates the files.
	A shell script for the regeneration (util/create_certs.sh) is also
	added.

	* remove trailing spaces.


	Removed inconsistency file from upstream repository of rubygems.

	  followed up ae2a904ce9bffedee7d110dc60fd51c0a2879a5b
------------------------------------------------------------------------
r67736 | nagachika | 2019-08-07 22:05:00 +0900 (Wed, 07 Aug 2019) | 15 lines

merge revision(s) 5931857281ce45c1c277aa86d1588119ab00a955,76e2370f132f83c16c9de39a0a9356579f364527: [Backport #16041]

	Fix dangling path name from fstring

	* parse.y (yycompile): make sure in advance that the `__FILE__`
	  object shares a fstring, to get rid of dangling path name.
	  Fixed up 53e9908d8afc7f03109b0aafd1698ab35f512b05.  [Bug #16041]

	* vm_eval.c (eval_make_iseq): ditto.

	Fix dangling path name from fstring

	* load.c (rb_require_internal): make sure in advance that the path
	  to be loaded shares a fstring, to get rid of dangling path name.
	  Fixed up 5931857281ce45c1c277aa86d1588119ab00a955.  [Bug #16041]
------------------------------------------------------------------------
r67735 | nagachika | 2019-08-07 21:38:15 +0900 (Wed, 07 Aug 2019) | 12 lines

merge revision(s) 1e54903684aa3c9ea3fe54520157846a1b1f07be: [Backport #16051]

	test/openssl: Support OpenSSL 1.1.1

	OpenSSL 1.1.1 rejects some shorter keys, which caused some failures of
	`make test-all TESTS=openssl`.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190606T003005Z.fail.html.gz

	This change merges 6bbc31ddd1 and 63fb3a36d1 in
	https://github.com/ruby/openssl.
	Reference: https://github.com/ruby/openssl/pull/217
------------------------------------------------------------------------
r67734 | nagachika | 2019-08-07 21:25:24 +0900 (Wed, 07 Aug 2019) | 6 lines

merge revision(s) 43730256e800dd8e0c5cc482e9861868590ae037:

	open-uri: Regenerate server certificates for tests

	OpenSSL 1.1.1 requires 2048 bits or more.  This change will fix:
	https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T003004Z.fail.html.gz#test%2Fopen-uri
------------------------------------------------------------------------
r67733 | nagachika | 2019-08-07 21:23:48 +0900 (Wed, 07 Aug 2019) | 25 lines

merge revision(s) 9dec4e8fc3a6018261834b5ac9b9877f787b97ca: [Backport #15934]

	String#b: Don't depend on dependent string

	Registering a string that depend on a dependent string as fstring
	can lead to use-after-free. See c06ddfe and 3f95620 for details.

	The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
	and 2.6.3. Credits to @wanabe for using eval as a cross-version way
	of registering a fstring.

	```ruby
	a = ('j' * 24).b.b
	eval('', binding, a)

	p a
	4.times { GC.start }
	p a
	```

	 - string.c (str_replace_shared_without_enc): when given a
	   dependent string, depend on the root of the dependent
	   string.

	[Bug #15934]
------------------------------------------------------------------------
r67732 | nagachika | 2019-08-07 21:03:52 +0900 (Wed, 07 Aug 2019) | 15 lines

merge revision(s) 53e9908d8afc7f03109b0aafd1698ab35f512b05: [Backport #15916]

	Fix memory leak

	* string.c (str_replace_shared_without_enc): free previous buffer
	  before replaced.

	* parse.y (gettable): make sure in advance that the `__FILE__`
	  object shares a fstring, to get rid of replacement with the
	  fstring later.
	  TODO: this hack may be needed in other places.

	[Bug #15916]

	Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com>
------------------------------------------------------------------------
r67731 | nagachika | 2019-08-07 20:45:24 +0900 (Wed, 07 Aug 2019) | 80 lines

merge revision(s) 3f9562015e651735bfc2fdd14e8f6963b673e22a,c06ddfee878524168e4af07443217ed2f8d0954b,3b3b4a44e57dfe03ce3913009d69a33d6f6100be: [Backport #15792]

	Get rid of indirect sharing

	* string.c (str_duplicate): share the root shared string if the
	  original string is already sharing, so that all shared strings
	  refer the root shared string directly.  indirect sharing can
	  cause a dangling pointer.

	[Bug #15792]

	str_duplicate: Don't share with a frozen shared string

	This is a follow up for 3f9562015e651735bfc2fdd14e8f6963b673e22a.
	Before this commit, it was possible to create a shared string which
	shares with another shared string by passing a frozen shared string
	to `str_duplicate`.

	Such string looks like:

	```
	 --------                    -----------------
	 | root | ------ owns -----> | root's buffer |
	 --------                    -----------------
	     ^                             ^   ^
	 -----------                       |   |
	 | shared1 | ------ references -----   |
	 -----------                           |
	     ^                                 |
	 -----------                           |
	 | shared2 | ------ references ---------
	 -----------
	```

	This is bad news because `rb_fstring(shared2)` can make `shared1`
	independent, which severs the reference from `shared1` to `root`:

	```c
	/* from fstr_update_callback() */
	str = str_new_frozen(rb_cString, shared2);  /* can return shared1 */
	if (STR_SHARED_P(str)) { /* shared1 is also a shared string */
	    str_make_independent(str);  /* no frozen check */
	}
	```

	If `shared1` was the only reference to `root`, then `root` can be
	reclaimed by the GC, leaving `shared2` in a corrupted state:

	```
	 -----------                         --------------------
	 | shared1 | -------- owns --------> | shared1's buffer |
	 -----------                         --------------------
	      ^
	      |
	 -----------                         -------------------------
	 | shared2 | ------ references ----> | root's buffer (freed) |
	 -----------                         -------------------------
	```

	Here is a reproduction script for the situation this commit fixes.

	```ruby
	a = ('a' * 24).strip.freeze.strip
	-a
	p a
	4.times { GC.start }
	p a
	```

	 - string.c (str_duplicate): always share with the root string when
	   the original is a shared string.
	 - test_rb_str_dup.rb: specifically test `rb_str_dup` to make
	   sure it does not try to share with a shared string.

	[Bug #15792]

	Closes: https://github.com/ruby/ruby/pull/2159

	Update dependencies

------------------------------------------------------------------------
r67730 | nagachika | 2019-08-07 19:52:38 +0900 (Wed, 07 Aug 2019) | 1 line

Update Xcode or Homebrew (apply https://github.com/nobu/ruby/commit/c86b74dc431d4cbdeb7d3c3fe5ac0693dc731bb1) [Bug #16032]
------------------------------------------------------------------------
r67729 | nagachika | 2019-08-05 23:05:59 +0900 (Mon, 05 Aug 2019) | 5 lines

merge revision(s) 5e018214e7435030727a97ac49db038d96438e74: [Backport #15720]

	Fix SystemStackError when calling a method in an unused refinement

	Fixes [Bug #15720]
------------------------------------------------------------------------
r67728 | nagachika | 2019-08-05 22:53:03 +0900 (Mon, 05 Aug 2019) | 5 lines

merge revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf: [Backport #15360]

	do_mutex_lock: release mutex before checking for interrupts (fixes
	 issue 15360)

------------------------------------------------------------------------
r67727 | nagachika | 2019-08-05 22:39:48 +0900 (Mon, 05 Aug 2019) | 6 lines

merge revision(s) 2403f9ac3af170ce0107a709a9cb510fe0501648:

	Expand the timeout of
	 `test_pstore_files_are_accessed_as_binary_files`

	Sometimes causes timeout error on mswin CI
------------------------------------------------------------------------
r67726 | nagachika | 2019-08-04 23:29:17 +0900 (Sun, 04 Aug 2019) | 10 lines

merge revision(s) 66977: [Backport #15578]

	Revert r63383, r63248 "compile.c: copy a short insn with leave"

	When copying `leave` insn, TRACE also should be copied if it is
	present, but this optimization is trivial and not worth the
	complexity.  [ruby-core:91366] [Bug #15578]

	4cae5353c03009beb1e0a1619422072773580609
	5afd479de63b6609ddcd1510da94d2c1ac384f7f
------------------------------------------------------------------------
r67725 | nagachika | 2019-08-03 21:27:02 +0900 (Sat, 03 Aug 2019) | 22 lines

merge revision(s) 1ef39d8d099f145222b9352423af16a2bab6e05b: [Backport #15798]

	Fix process not waking up on signals on OpenBSD

	When using UBF_TIMER_PTHREAD (the UBF handler on OpenBSD), the
	timer_pthread_fn function will not signal the main thread with
	SIGVTALRM in cases where timer_pthread is armed before
	consume_communication_pipe is called.  This is because
	consume_communication_pipe will unarm the timer.

	Fix this by checking the return value of consume_communication_pipe.
	If it returns TRUE and the timer_pthread is disarmed, then signal
	the main thread with SIGVTALRM.

	On OpenBSD, this fixes TestThread#test_thread_timer_and_interrupt, and
	fixes hangs in TestProcess#test_execopts_redirect_open_fifo_interrupt_raise
	and TestProcess#test_execopts_redirect_open_fifo_interrupt_print.
	It also fixes the use of Ctrl+C/SIGINT in irb on OpenBSD. It does not
	cause any test failures on Linux when UBF_TIMER_PTHREAD is forced as
	the UBF handler.

	Fixes [Bug #15798]
------------------------------------------------------------------------
r67724 | nagachika | 2019-08-01 22:56:16 +0900 (Thu, 01 Aug 2019) | 14 lines

merge revision(s) 6375c68f8851e1e0fee8a95afba91c4555097127,c05eaa93258ddc01e685b6cc3a0da82998a2af48: [Backport #15839]

	parse.y: function parser_mixed_error & parser_mixed_escape

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

	Fix mixed encoding in heredoc

	Heredocs are parsed line-by-line, so we need to keep track of the
	temporary encoding of the string.  Previously, a heredoc would
	only detect mixed encoding errors if they were on the same line,
	this changes things so they will be caught on different lines.

	Fixes [Bug #15839]
------------------------------------------------------------------------
r67723 | nagachika | 2019-08-01 22:18:27 +0900 (Thu, 01 Aug 2019) | 7 lines

merge revision(s) 5bab1304af25a843728dbcd2f3594913740aecb0: [Backport #15847]

	fix visibility of SecureRandom.gen_random

	Aliasing a method preserves its visibility.  These aliases turn
	formerly-public methods into private.  Should make them public
	again.  [Bug #15847]
------------------------------------------------------------------------
r67721 | nagachika | 2019-07-31 23:47:34 +0900 (Wed, 31 Jul 2019) | 9 lines

merge revision(s) ea42423908ed055f9039b1dce6e9a232a3b2dd90: [Backport #15887]

	Keep vm->orig_progname alive

	`vm->orig_progname` can be different from `vm->progname` when user
	code assigns to `$0`. While `vm->progname` is kept alive by the
	global table, nothing marked `vm->orig_progname`.

	[Bug #15887]
------------------------------------------------------------------------
r67720 | nagachika | 2019-07-31 23:32:43 +0900 (Wed, 31 Jul 2019) | 10 lines

merge revision(s) b165bedcbd41d791a85fc1ce90b57a0d0525f319,ac00bdc8a8ac2c62a94dd36a7784d15bbcb7df19: [Backport #15821]

	skip a test to pass CIs.

	I'm debugging [Bug #15821] but my patch introduces another issue.
	So I simply skip this test and re-enable it later.

	Do not modify shared array

	[Bug #15821]
------------------------------------------------------------------------
r67719 | nagachika | 2019-07-31 23:14:59 +0900 (Wed, 31 Jul 2019) | 5 lines

merge revision(s) 374c8f4ebab1a740990330c732b9de965c5e8d10: [Backport #15823]

	Fixed about ARGF.lineno

	[Bug #15823]
------------------------------------------------------------------------
r67718 | nagachika | 2019-07-31 23:10:09 +0900 (Wed, 31 Jul 2019) | 12 lines

merge revision(s) d0ba4abf1a00339ebbb5d405db3240a8bdb7b68b,54eac83b2ad77ddea84fa6d66c09e0bb014cf61e: [Backport #15786]

	Add RB_ID_SERIAL_MAX


	Hide internal IDs

	* parse.y (internal_id): number the ID serial for internal use by
	  counting down from the neary maximum value, not to accidentally
	  match permanent IDs.

	[Bug #15768]
------------------------------------------------------------------------
r67716 | nagachika | 2019-07-28 23:16:53 +0900 (Sun, 28 Jul 2019) | 5 lines

merge revision(s) a6a26e42b15c46f117f4fce07a2050e9d727355d: [Backport #15906]

	compile.c: Partially revert r63870 which caused wrong optimization

	[Bug #15906]
------------------------------------------------------------------------
r67715 | nagachika | 2019-07-28 23:02:10 +0900 (Sun, 28 Jul 2019) | 4 lines

merge revision(s) dcb6a6ae3e2b8a3e298e7f0d4a3e7f8ff102a30e: [Backport #15845]

	Windows simply causes an error to open invalid path

------------------------------------------------------------------------
r67714 | nagachika | 2019-07-26 08:17:08 +0900 (Fri, 26 Jul 2019) | 5 lines

merge revision(s) b72623012d74abdb06210153ed48c9e2fa075bbd: [Backport #15775]

	Update broken URL in Float documentation.

	  [Misc #15775][ruby-core:92332]
------------------------------------------------------------------------
r67713 | nagachika | 2019-07-26 08:11:57 +0900 (Fri, 26 Jul 2019) | 18 lines

merge revision(s) a15f7dd1fb1148c3d586238ee6907875f2e40379: [Backport #15803]

	Always mark the string returned by File.realpath as tainted

	This string can include elements that were not in either string
	passed to File.realpath, even if one of the strings is an
	absolute path, due to symlinks:

	```ruby
	Dir.mkdir('b') unless File.directory?('b')
	File.write('b/a', '') unless File.file?('b/a')
	File.symlink('b', 'c') unless File.symlink?('c')
	path = File.realpath('c/a'.untaint, Dir.pwd.untaint)
	path # "/home/testr/ruby/b/a"
	path.tainted? # should be true, as 'b' comes from file system
	```

	[Bug #15803]
------------------------------------------------------------------------
r67712 | nagachika | 2019-06-22 10:56:07 +0900 (Sat, 22 Jun 2019) | 4 lines

merge revision(s) 5e23b1138f16af0defb184d7deeffadfd2ce3c04: [Backport #15820]

	Fix potential memory leak

------------------------------------------------------------------------
r67711 | nagachika | 2019-06-16 12:20:55 +0900 (Sun, 16 Jun 2019) | 7 lines

merge revision(s) af1e487e9bb763b939dc6704c9a343c9eafa1637,6f8ac2cb28f99a4b2588c59ec44eff6ed38c4d3b: [Backport #15801]

	Updated marked commits for ChangeLog


	Include the beginning commit in ChangeLog

------------------------------------------------------------------------
r67710 | nagachika | 2019-06-13 21:23:01 +0900 (Thu, 13 Jun 2019) | 119 lines

merge revision(s) 7b7043e5da8589e01b94575d4ed647e909e5c875: [Backport #15793]

	eliminate use of freed memory

	rb_io_fptr_finalize_internal frees the memory region.

	=================================================================
	==85264==ERROR: AddressSanitizer: heap-use-after-free on address 0x610000000d8c at pc 0x5608e38077f7 bp 0x7ffee12d5440 sp 0x7ffee12d5438
	READ of size 4 at 0x610000000d8c thread T0
	    #0 0x5608e38077f6 in rb_io_memsize io.c:4749:24
	    #1 0x5608e37a0481 in obj_memsize_of gc.c:3547:14
	    #2 0x5608e37a4f30 in check_rvalue_consistency gc.c:1107:2
	    #3 0x5608e37a2624 in RVALUE_OLD_P gc.c:1218:5
	    #4 0x5608e37a5bae in rb_gc_force_recycle gc.c:6652:18
	    #5 0x5608e38191f9 in rb_f_backquote io.c:9021:5
	    #6 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
	    #7 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
	    #8 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
	    #9 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
	    #10 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
	    #11 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
	    #12 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
	    #13 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
	    #14 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
	    #15 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
	    #16 0x5608e37620ca in ruby_exec_internal eval.c:262:2
	    #17 0x5608e376198b in ruby_exec_node eval.c:326:12
	    #18 0x5608e37617d0 in ruby_run_node eval.c:318:25
	    #19 0x5608e35c9486 in main main.c:42:9
	    #20 0x7f62e9421b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
	    #21 0x5608e3522289 in _start (miniruby+0x15f289)

	0x610000000d8c is located 76 bytes inside of 192-byte region [0x610000000d40,0x610000000e00)
	freed by thread T0 here:
	    #0 0x5608e359a2ed in free (miniruby+0x1d72ed)
	    #1 0x5608e37af421 in objspace_xfree gc.c:9591:5
	    #2 0x5608e37af3da in ruby_sized_xfree gc.c:9687:2
	    #3 0x5608e3799ac8 in ruby_xfree gc.c:9694:5
	    #4 0x5608e380746d in rb_io_fptr_finalize_internal io.c:4728:5
	    #5 0x5608e38191ed in rb_f_backquote io.c:9020:5
	    #6 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
	    #7 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
	    #8 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
	    #9 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
	    #10 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
	    #11 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
	    #12 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
	    #13 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
	    #14 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
	    #15 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
	    #16 0x5608e37620ca in ruby_exec_internal eval.c:262:2
	    #17 0x5608e376198b in ruby_exec_node eval.c:326:12
	    #18 0x5608e37617d0 in ruby_run_node eval.c:318:25
	    #19 0x5608e35c9486 in main main.c:42:9
	    #20 0x7f62e9421b96 in __libc_start_main
	/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

	previously allocated by thread T0 here:
	    #0 0x5608e359a56d in malloc (miniruby+0x1d756d)
	    #1 0x5608e37aed12 in objspace_xmalloc0 gc.c:9416:5
	    #2 0x5608e37aebe7 in ruby_xmalloc0 gc.c:9600:12
	    #3 0x5608e37aea8b in ruby_xmalloc_body gc.c:9609:12
	    #4 0x5608e37a6d64 in ruby_xmalloc gc.c:11469:12
	    #5 0x5608e380e4b4 in rb_io_fptr_new io.c:8040:19
	    #6 0x5608e380e446 in rb_io_make_open_file io.c:8077:10
	    #7 0x5608e3850ea0 in pipe_open io.c:6707:5
	    #8 0x5608e384edb4 in pipe_open_s io.c:6772:12
	    #9 0x5608e381910b in rb_f_backquote io.c:9014:12
	    #10 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
	    #11 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
	    #12 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
	    #13 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
	    #14 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
	    #15 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
	    #16 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
	    #17 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
	    #18 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
	    #19 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
	    #20 0x5608e37620ca in ruby_exec_internal eval.c:262:2
	    #21 0x5608e376198b in ruby_exec_node eval.c:326:12
	    #22 0x5608e37617d0 in ruby_run_node eval.c:318:25
	    #23 0x5608e35c9486 in main main.c:42:9
	    #24 0x7f62e9421b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

	SUMMARY: AddressSanitizer: heap-use-after-free io.c:4749:24 in
	rb_io_memsize
	Shadow bytes around the buggy address:
	  0x0c207fff8160: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
	  0x0c207fff8170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	  0x0c207fff8180: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
	  0x0c207fff8190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	  0x0c207fff81a0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
	=>0x0c207fff81b0: fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd
	  0x0c207fff81c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff81d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff81e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff81f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff8200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	Shadow byte legend (one shadow byte represents 8 application bytes):
	  Addressable:           00
	  Partially addressable: 01 02 03 04 05 06 07
	  Heap left redzone:       fa
	  Freed heap region:       fd
	  Stack left redzone:      f1
	  Stack mid redzone:       f2
	  Stack right redzone:     f3
	  Stack after return:      f5
	  Stack use after scope:   f8
	  Global redzone:          f9
	  Global init order:       f6
	  Poisoned by user:        f7
	  Container overflow:      fc
	  Array cookie:            ac
	  Intra object redzone:    bb
	  ASan internal:           fe
	  Left alloca redzone:     ca
	  Right alloca redzone:    cb
	  Shadow gap:              cc
	==85264==ABORTING
------------------------------------------------------------------------
r67571 | svn | 2019-04-16 09:02:01 +0900 (Tue, 16 Apr 2019) | 1 line

* 2019-04-16
------------------------------------------------------------------------
r67570 | knu | 2019-04-16 09:02:00 +0900 (Tue, 16 Apr 2019) | 1 line

Mention SNI support in Net::IMAP
------------------------------------------------------------------------
r67567 | naruse | 2019-04-15 23:42:35 +0900 (Mon, 15 Apr 2019) | 6 lines

merge revision(s) 67561:

	Import CSV 3.0.9

	This fixes test failures on Windows.

------------------------------------------------------------------------
r67565 | naruse | 2019-04-15 22:36:58 +0900 (Mon, 15 Apr 2019) | 14 lines

merge revision(s) 67560,67561:

        Import CSV 3.0.8

        This includes performance improvements and backward incompatibility
        fixes.


        Import CSV 3.0.9

        This fixes test failures on Windows.

Note that r67562's commit message is wrong.

------------------------------------------------------------------------
r67564 | naruse | 2019-04-15 22:27:53 +0900 (Mon, 15 Apr 2019) | 9 lines

merge revision(s) 67563:

	Support SNI (Reapplying r67488)

	This fixes connecting using TLS 1.3 to imap.gmail.com

	[Fix GH-2077] [Feature #15594]

	From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
------------------------------------------------------------------------
r67562 | naruse | 2019-04-15 18:22:11 +0900 (Mon, 15 Apr 2019) | 8 lines

merge revision(s) 66720:

        separate downloading of Unicode property files and auxiliary files

        Separate downloading of Unicode property files in ucd and in ucd/auxiliary.
        This is needed because we need information from separate index.html files
        to discover the exact file names of property files during a beta period.

------------------------------------------------------------------------
r67529 | naruse | 2019-04-14 07:18:20 +0900 (Sun, 14 Apr 2019) | 7 lines

merge revision(s) 66720:

	separate downloading of Unicode property files and auxiliary files

	Separate downloading of Unicode property files in ucd and in ucd/auxiliary.
	This is needed because we need information from separate index.html files
	to discover the exact file names of property files during a beta period.
------------------------------------------------------------------------
r67528 | naruse | 2019-04-14 07:04:51 +0900 (Sun, 14 Apr 2019) | 45 lines

merge revision(s) 66737,66738,67413,67445,67446,67447,67448,67450,67451,67454:

	add logic to handle Unicode beta period file names

	In downloader.rb, add logic to handle file names of the form
	UnicodeData-12.0.0d6.txt. To find the right file, we download
	the index of the directory. Then we download the files by finding
	the file names from the index. Files are always checked for changes,
	because changes might be frequent during the beta period.
	We also check whether any index.html files are left when we are not
	in the beta period. This would indicate that we might have stale
	data from the beta period rather than the actual release data.

	simplify filename-related code

	(Thanks to Nobuyoshi Nakada for the hint!)

	downloader.rb: keep linked file newer than cached file

	* tool/downloader.rb (Downloader.save_cache): keep linked file
	  newer than cached file, so that GNU make triggers when the
	  content is updated.  it uses the timestamp of symlink itself
	  instead of the target.

	add puts statements to debug Unicode file download (temporary)

	Unicode file download doesn't work with Visual Studio, see e.g.
	https://ci.appveyor.com/project/ruby/ruby/builds/23614399/job/f8vya2l7fjdfcye4
	We temporarily produce more output for debugging.

	* remove trailing spaces.

	output more debug information in downloader.rb (temporary)

	Unicode file download doesn't work with Visual Studio, we need more debug output.

	downloader.rb: quote base name

	downloader.rb: fix typo, extra %

	revert r67445, (r67446,) r67447

	Debugging output is no longer needed because the problem has been fixed with r67449.

	appveyor.yml: Use pre-generated headers and tables
------------------------------------------------------------------------
r67527 | naruse | 2019-04-14 00:14:02 +0900 (Sun, 14 Apr 2019) | 31 lines

merge revision(s) 66745,67397,67398,67399,67400,67409,67410,67411,67412,67425,67426,67473,67474: [Backport #15742]

	Bump version to date-2.0.0.

	  I forgot to change it when Ruby 2.6.0 was released.

	date_parse.c: extract Japanese era initials

	* expand tabs.

	date_parse.c: removed 'r' which is not in JIS X 0301 yet

	Added tests for end of Heisei

	date: use del_hash to extract an element destructively

	* expand tabs.

	date_parse.c: renamed JAPANESE prefix as JISX0301

	date_parse.c: name JISX0301_DEFAULT_ERA

	date: make zone a substring to copy encoding and taintedness

	* expand tabs.

	date_core.c: [DOC] Heisei will be assumed if no-era [ci skip]

	date: support for Reiwa, new Japanese era

	[Feature #15742]
------------------------------------------------------------------------
r67526 | svn | 2019-04-14 00:01:42 +0900 (Sun, 14 Apr 2019) | 1 line

* 2019-04-14
------------------------------------------------------------------------
r67525 | naruse | 2019-04-14 00:01:39 +0900 (Sun, 14 Apr 2019) | 32 lines

merge revision(s) 67439,67441,67453,67476: [Backport #15740]

        change lib/unicode_normalize/tables.rb to single item per line to make diffs shorter

        * template/unicode_norm_gen.tmpl: Change formatting of output to produce only a
          single item (or range) for each line to make future diffs shorter and easier
          to understand and check.

        * lib/unicode_normalize/tables.rb: output of the above

        update to Unicode Version 12.1.0 (beta)

        Unicode Version 12.1.0 adds one single character, U+32FF SQUARE ERA NAME REIWA,
        for the new Japanese era starting on May 1st. 12.1.0 will be finalized only on
        May 7th, so we go with the beta version because further changes in the data we
        need are highly unlikely, and we want to make sure Ruby is ready for the new era.

        * common.mk: change UNICODE_VERSION to 12.1.0, UNICODE_BETA to YES

        * enc/unicode/12.1.0, enc/unicode/12.1.0/casefold.h, enc/unicode/12.1.0/name2ctype.h:
          add directory and generated data files for new version

        * lib/unicode_normalize/tables.rb: update for new character

        * test/ruby/test_regexp.rb: add test for character property age=12.1

        * test/test_unicode_normalize.rb: add test for NFKC decomposition of new character

        This (mostly) completes issue #15195.

        remove Unicode 12.0.0 related directory and generated files

------------------------------------------------------------------------
r67524 | naruse | 2019-04-13 16:33:10 +0900 (Sat, 13 Apr 2019) | 9 lines

merge revision(s) 67497,67498: [Backport #15760]

	ext/openssl/ossl_bn.c (ossl_bn_initialize): get rid of SEGV

	OpenSSL::BN.new(nil, 2) dumped core.

	[ruby-core:92231] [Bug #15760]

	* expand tabs.
------------------------------------------------------------------------
r67516 | naruse | 2019-04-11 21:09:34 +0900 (Thu, 11 Apr 2019) | 6 lines

merge revision(s) 67466: [Backport #15755]

	enumerator.c: force hash values fixable

	* enumerator.c (arith_seq_hash): force hash values fixable on
	  LLP64 environment.  [ruby-core:92190] [Bug #15755]
------------------------------------------------------------------------
r67515 | naruse | 2019-04-11 21:09:16 +0900 (Thu, 11 Apr 2019) | 6 lines

merge revision(s) 67467: [Backport #15756]

	range.c: force hash values fixable

	* range.c (method_hash): force hash values fixable on LLP64
	  environment.  [ruby-core:92191] [Bug #15756]
------------------------------------------------------------------------
r67514 | naruse | 2019-04-11 21:08:55 +0900 (Thu, 11 Apr 2019) | 6 lines

merge revision(s) 67468: [Backport #15757]

	range.c: force hash values fixable

	* range.c (range_hash): force hash values fixable on LLP64
	  environment.  [ruby-core:92194] [Bug #15757]
------------------------------------------------------------------------
r67353 | naruse | 2019-03-28 12:28:38 +0900 (Thu, 28 Mar 2019) | 7 lines

merge revision(s) 67332: [Backport #15649]

	dir.c: fix Dir.glob starts with brace

	* dir.c (ruby_glob0): expand braces if a glob pattern starts with
	  brace.
	  [ruby-core:91728] [Bug #15649]
------------------------------------------------------------------------
r67352 | naruse | 2019-03-28 12:26:50 +0900 (Thu, 28 Mar 2019) | 3 lines

merge revision(s) 67270: [Backport #15670]

	dsym should be treated as string [ruby-core:91852] [Bug #15670]
------------------------------------------------------------------------
r67351 | naruse | 2019-03-28 12:24:57 +0900 (Thu, 28 Mar 2019) | 3 lines

merge revision(s) 67247: [Backport #15666]

	Guard out the test when it is run under root permission
------------------------------------------------------------------------
r67246 | naruse | 2019-03-14 06:55:03 +0900 (Thu, 14 Mar 2019) | 2 lines

bump up teeny version to 2.6.3

------------------------------------------------------------------------
r67231 | naruse | 2019-03-13 05:22:33 +0900 (Wed, 13 Mar 2019) | 2 lines

bump up teeny version to 2.6.2

------------------------------------------------------------------------
r67223 | naruse | 2019-03-11 23:33:45 +0900 (Mon, 11 Mar 2019) | 5 lines

fix merge conflict

Reported by Krzysztof Rybka
https://github.com/ruby/ruby/commit/dca69588f4a46e1ecc94eeb9e01efc8cd7cb82e4#r32684541

------------------------------------------------------------------------
r67222 | naruse | 2019-03-11 22:49:09 +0900 (Mon, 11 Mar 2019) | 7 lines

merge revision(s) 67203: [Backport #15651]

	numeric.c: fix infinite loop

	* numeric.c (int_pow): fix infinite loop in the case of y equal 1
	  and power of x does not overflow.
	  [ruby-core:91734] [Bug #15651]
------------------------------------------------------------------------
r67220 | naruse | 2019-03-11 21:57:34 +0900 (Mon, 11 Mar 2019) | 5 lines

merge revision(s) 67217: [Backport #15658]

	The combination of non-Symbol keys and Symbol keys is now allowed again

	Revert r64358.  [Bug #15658]
------------------------------------------------------------------------
r67210 | naruse | 2019-03-11 16:18:45 +0900 (Mon, 11 Mar 2019) | 3 lines

merge revision(s) 66973: [Backport #15577]

	Run r66972 assertion only when a sticky-bit makes sense
------------------------------------------------------------------------
r67209 | naruse | 2019-03-11 16:01:19 +0900 (Mon, 11 Mar 2019) | 6 lines

merge revision(s) 67201: [Backport #15650]

	eval.c: clear internal errinfo

	* eval.c (ruby_cleanup): clear internal error info when invoking
	  end procs.  [ruby-core:91731] [Bug #15650]
------------------------------------------------------------------------
r67208 | naruse | 2019-03-11 15:52:01 +0900 (Mon, 11 Mar 2019) | 7 lines

merge revision(s) 67200: [Backport #15648]

	Add ignored_sp event

	* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): add ignored_sp
	  event which will be fired from Ripper::Lexer#on_heredoc_dedent
	  method.  [ruby-core:91727] [Bug #15648]
------------------------------------------------------------------------
r67207 | naruse | 2019-03-11 15:45:29 +0900 (Mon, 11 Mar 2019) | 6 lines

merge revision(s) 67188: [Backport #15642]

	io.c: chomp CR at the end of read buffer

	* io.c (rb_io_getline_fast): chomp CR followed by LF but separated
	  by the read buffer boundary.  [ruby-core:91707] [Bug #15642]
------------------------------------------------------------------------
r67184 | naruse | 2019-03-06 18:49:16 +0900 (Wed, 06 Mar 2019) | 5 lines

merge revision(s) 67183: [Backport #15607]

	Fix PTY.open on OpenBSD [Bug #15607]

	From: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r67182 | naruse | 2019-03-06 18:01:48 +0900 (Wed, 06 Mar 2019) | 12 lines

Backport RubyGems 3.0.3: [Backport #15637]

	* Fixed following vulnerabilities:
	  * CVE-2019-8320: Delete directory using symlink when decompressing tar
	  * CVE-2019-8321: Escape sequence injection vulnerability in verbose
	  * CVE-2019-8322: Escape sequence injection vulnerability in gem owner
	  * CVE-2019-8323: Escape sequence injection vulnerability in API response handling
	  * CVE-2019-8324: Installing a malicious gem may lead to arbitrary code execution
	  * CVE-2019-8325: Escape sequence injection vulnerability in errors

	* see also https://blog.rubygems.org/2019/03/05/3.0.3-released.html

------------------------------------------------------------------------
r67181 | naruse | 2019-03-06 17:53:51 +0900 (Wed, 06 Mar 2019) | 7 lines

merge revision(s) 67167: [Backport #15635]

	string.c: respect the actual encoding

	* string.c (rb_enc_str_coderange): respect the actual encoding of
	  if a BOM presents, and scan for the actual code range.
	  [ruby-core:91662] [Bug #15635]
------------------------------------------------------------------------
r67180 | naruse | 2019-03-06 17:48:50 +0900 (Wed, 06 Mar 2019) | 10 lines

merge revision(s) 66984: [Backport #15582]

	Fixed gemspec location of bundler.

	  FileCollector of rbinstall.rb requires location of gemspec under
	  the sub-direcotry with the same name as default gems.

	  I forgot to fix it with r66867.

	  [Bug #15582][ruby-core:91374]
------------------------------------------------------------------------
r67179 | naruse | 2019-03-06 16:47:53 +0900 (Wed, 06 Mar 2019) | 5 lines

merge revision(s) 67006: [Backport #15469]

	Ignore to add bundler lib direcotry if it is same as rubylibdir.

	  [Bug #15469][ruby-core:90742]
------------------------------------------------------------------------
r67178 | naruse | 2019-03-06 16:31:29 +0900 (Wed, 06 Mar 2019) | 6 lines

merge revision(s) 67172:

	Remove deprecated `sudo: false` in .travis.yml

	- https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
	- https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments
------------------------------------------------------------------------
r67177 | naruse | 2019-03-06 16:14:13 +0900 (Wed, 06 Mar 2019) | 8 lines

merge revision(s) 66972: [Backport #15577]

	Fix exception namespace

	* lib/fileutils.rb (remove_entry_secure): EISDIR is under the
	  Errno namespace.  [ruby-core:91362] [Bug #15577]

	From: Tietew (Toru Iwase) <tietew@tietew.net>
------------------------------------------------------------------------
r67176 | naruse | 2019-03-06 15:58:04 +0900 (Wed, 06 Mar 2019) | 2 lines

Drop pedantic matrix from .travis.yml

------------------------------------------------------------------------
r67175 | naruse | 2019-03-06 15:36:32 +0900 (Wed, 06 Mar 2019) | 18 lines

merge revision(s) 67169,67173,67174: [Backport #15641]

	update Unicode version (and Emoji version) to 12.0.0

	- common.mk: set UNICODE_VERSION and UNICODE_EMOJI_VERSION to 12.0.0

	- lib/unicode_normalize/tables.rb: update table data to Unicode version 12.0.0

	- enc/unicode/12.0.0/casefold.h, enc/unicode/12.0.0/name2ctype.h: add generated
	  files for Unicode version 12.0.0

	This is the main commit for #15321.

	add news about Unicode version update (issue #15321) to NEWS [ci skip]

	delete directory and files related to Unicode version 11.0.0

	this completes and closes feature #15321
------------------------------------------------------------------------
r66953 | naruse | 2019-01-30 23:41:42 +0900 (Wed, 30 Jan 2019) | 2 lines

Ruby 2.6 is still C90

------------------------------------------------------------------------
r66952 | naruse | 2019-01-30 22:09:26 +0900 (Wed, 30 Jan 2019) | 6 lines

merge revision(s) 66888: [Backport #15460]

* Fix rubyspec to follow IO#ungetbyte's fix
  Merge CRuby r66824
  With fixing actual spec and the version the change applied.

------------------------------------------------------------------------
r66949 | naruse | 2019-01-30 15:20:10 +0900 (Wed, 30 Jan 2019) | 13 lines

merge revision(s) 66947: [Backport #15518]

	enumerator.c: fix arith_seq_first for Infinity

	* enumerator.c (arith_seq_first): fix for Float::INFINITY.

	* test/ruby/test_arithmetic_sequence.rb: add tests.

	* numeric.c (ruby_float_step_size): export for internal use.

	* internal.h: add prototype declaration of ruby_float_step_size.

	[ruby-core:90937][Bug #15518]
------------------------------------------------------------------------
r66941 | naruse | 2019-01-29 18:19:52 +0900 (Tue, 29 Jan 2019) | 9 lines

merge revision(s) 66909: [Backport #15555]

	tmpdir.rb: permission of user given directory

	* lib/tmpdir.rb (Dir.mktmpdir): check if the permission of the
	  parent directory only when using the default temporary
	  directory, and no check against user given directory.  the
	  security is the user's responsibility in that case.
	  [ruby-core:91216] [Bug #15555]
------------------------------------------------------------------------
r66940 | naruse | 2019-01-29 14:31:00 +0900 (Tue, 29 Jan 2019) | 10 lines

merge revision(s) 66708: [Backport #15499]

	thread.c (call_without_gvl): spawn thread for UBF iff single-threaded

	We need another native thread to call some unblocking functions
	which aren't RUBY_UBF_IO or RUBY_UBF_PROCESS.  Instead of a
	permanent thread in <= 2.5, we can now rely on the thread cache
	feature to perform interrupts.

	[ruby-core:90865] [Bug #15499]
------------------------------------------------------------------------
r66939 | naruse | 2019-01-29 13:39:32 +0900 (Tue, 29 Jan 2019) | 7 lines

merge revision(s) 66938: [Backport #15488]

	Fix `Module#const_defined?` on inherited constants

	[Fix GH-2061]

	From: manga_osyo <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66926 | naruse | 2019-01-26 17:02:47 +0900 (Sat, 26 Jan 2019) | 4 lines

merge revision(s) 66922: [Backport #15521]

	Upgrade CSV to 3.0.4

------------------------------------------------------------------------
r66925 | naruse | 2019-01-26 16:59:54 +0900 (Sat, 26 Jan 2019) | 7 lines

merge revision(s) 66658: [Backport #15489]

	vm_args.c: search symbol proc in super classes

	* vm_args.c (refine_sym_proc_call): traverse ancestors to search
	  inherited methods for symbol proc.
	  [ruby-dev:50741] [Bug #15489]
------------------------------------------------------------------------
r66924 | naruse | 2019-01-26 16:59:11 +0900 (Sat, 26 Jan 2019) | 16 lines

merge revision(s) 66823,66869: [Backport #15548]

	Revert "mjit_worker.c: try passing -nostdlib to AIX"

	This reverts commit b32fb23083912c37a2601c66531ed786a7c9f3e5.

	This didn't work on AIX.

	mjit_worker.c: do not use GCC_NOSTDLIB_FLAGS for OpenBSD

	OpenBSD's GCC compiler has local extensions that break when
	`-nostartfiles -nodefaultlibs -nostdlib` is used.

	From: Jeremy Evans <merch-redmine@jeremyevans.net>

	[Bug #15548]
------------------------------------------------------------------------
r66913 | naruse | 2019-01-24 10:00:07 +0900 (Thu, 24 Jan 2019) | 13 lines

merge revision(s) 66867: [Backport #15500]

	Revert r58345 and r58371.

	  These changes break the behavior of default gems. Bug #13428 says
	  r58345 is reasonable because gemspec file is installed by `to_ruby_for_cache`
	  method. But I revert `to_ruby_for_cache` in rbinstall.rb at r58403.
	  There is no reason that we apply r58345 now.

	  But I'm not sure about gemspec of default gems affects standalone gems.
	  I'm going to investigate it on rubygems/rubygems.

	  [Bug #15500][ruby-core:90867]
------------------------------------------------------------------------
r66862 | naruse | 2019-01-18 13:19:32 +0900 (Fri, 18 Jan 2019) | 9 lines

merge revision(s) 66796,66797: [Backport #15525]

	No TypeError at nil if exception: false

	[ruby-core:91021] [Bug #15525]

	No FloatDomainError at non-finitive number if exception: false

	[ruby-core:91021] [Bug #15525]
------------------------------------------------------------------------
r66855 | naruse | 2019-01-18 08:09:52 +0900 (Fri, 18 Jan 2019) | 2 lines

bump up teeny version to 2.6.1

------------------------------------------------------------------------
r66854 | naruse | 2019-01-18 08:08:10 +0900 (Fri, 18 Jan 2019) | 117 lines

merge revision(s) 66681,66682,66684,66688,66697,66751,66693,66694: [Backport #15491]

	complex.c: Optimize Complex#+ for some conditions

	Optimize f_add defined in complex.c for some specific conditions.
	It makes Complex#+ about 1.4x faster than r66678.

	Compared to r66678:

	```
	mrkn-mbp15-late2016:complex-optim-o3 mrkn$ make benchmark ITEM=complex_float_ COMPARE_RUBY=/Users/mrkn/.rbenv/versions/trunk-o3/bin/ruby
	/Users/mrkn/src/github.com/ruby/ruby/revision.h unchanged
	/Users/mrkn/.rbenv/shims/ruby --disable=gems -rrubygems -I/Users/mrkn/src/github.com/ruby/ruby/benchmark/lib /Users/mrkn/src/github.com/ruby/ruby/benchmark/benchmark-driver/exe/benchmark-driver \
	                    --executables="compare-ruby::/Users/mrkn/.rbenv/versions/trunk-o3/bin/ruby -I.ext/common --disable-gem" \
	                    --executables="built-ruby::./miniruby -I/Users/mrkn/src/github.com/ruby/ruby/lib -I. -I.ext/common  -r/Users/mrkn/src/github.com/ruby/ruby/prelude --disable-gem" \
	                    $(find /Users/mrkn/src/github.com/ruby/ruby/benchmark -maxdepth 1 -name '*complex_float_*.yml' -o -name '*complex_float_*.rb' | sort)
	Calculating -------------------------------------
	                     compare-ruby  built-ruby
	   complex_float_add       9.132M     12.864M i/s -      1.000M times in 0.109511s 0.077734s
	   complex_float_div     600.723k    627.878k i/s -      1.000M times in 1.664662s 1.592666s
	   complex_float_mul       2.320M      2.347M i/s -      1.000M times in 0.431039s 0.426113s
	   complex_float_new       1.473M      1.489M i/s -      1.000M times in 0.678791s 0.671750s
	 complex_float_power       1.690M      1.722M i/s -      1.000M times in 0.591863s 0.580775s
	   complex_float_sub       8.870M      9.516M i/s -      1.000M times in 0.112740s 0.105091s

	Comparison:
	                complex_float_add
	          built-ruby:  12864383.7 i/s
	        compare-ruby:   9131502.8 i/s - 1.41x  slower

	                complex_float_div
	          built-ruby:    627878.0 i/s
	        compare-ruby:    600722.5 i/s - 1.05x  slower

	                complex_float_mul
	          built-ruby:   2346795.3 i/s
	        compare-ruby:   2319975.7 i/s - 1.01x  slower

	                complex_float_new
	          built-ruby:   1488649.1 i/s
	        compare-ruby:   1473207.5 i/s - 1.01x  slower

	              complex_float_power
	          built-ruby:   1721837.2 i/s
	        compare-ruby:   1689580.2 i/s - 1.02x  slower

	                complex_float_sub
	          built-ruby:   9515562.7 i/s
	        compare-ruby:   8869966.3 i/s - 1.07x  slower
	```

	suppress warning: method redefined; discarding old + introduced at r66681

	complex.c: fix indentation

	complex.c: fix against redefining component methods

	This fixes the incompatibility (maybe unintentionally) introduced by
	removal of `#ifndef PRESERVE_SIGNEDZERO` guards in f_add, f_mul, and
	f_sub functions in r62701.  [Bug #15491] [ruby-core:90843]

	complex.c: Optimize Complex#* and Complex#**

	Optimize f_mul for the core numeric class components.
	This change improves the computation time of Complex#* and Complex#**.

	```
	$ make benchmark ITEM=complex_float_ COMPARE_RUBY=/Users/mrkn/.rbenv/versions/2.6.0/bin/ruby
	generating known_errors.inc
	known_errors.inc unchanged
	/Users/mrkn/src/github.com/ruby/ruby/revision.h unchanged
	/Users/mrkn/.rbenv/shims/ruby --disable=gems -rrubygems -I/Users/mrkn/src/github.com/ruby/ruby/benchmark/lib /Users/mrkn/src/github.com/ruby/ruby/benchmark/benchmark-driver/exe/benchmark-driver \
	                    --executables="compare-ruby::/Users/mrkn/.rbenv/versions/2.6.0/bin/ruby -I.ext/common --disable-gem" \
	                    --executables="built-ruby::./miniruby -I/Users/mrkn/src/github.com/ruby/ruby/lib -I. -I.ext/common  -r/Users/mrkn/src/github.com/ruby/ruby/prelude --disable-gem" \
	                    $(find /Users/mrkn/src/github.com/ruby/ruby/benchmark -maxdepth 1 -name '*complex_float_*.yml' -o -name '*complex_float_*.rb' | sort)
	Calculating -------------------------------------
	                     compare-ruby  built-ruby
	   complex_float_add       6.558M     13.012M i/s -      1.000M times in 0.152480s 0.076850s
	   complex_float_div     576.821k    567.969k i/s -      1.000M times in 1.733640s 1.760660s
	   complex_float_mul       1.690M      2.628M i/s -      1.000M times in 0.591786s 0.380579s
	   complex_float_new       1.350M      1.268M i/s -      1.000M times in 0.740669s 0.788762s
	 complex_float_power       1.571M      1.835M i/s -      1.000M times in 0.636507s 0.544909s
	   complex_float_sub       8.635M      8.779M i/s -      1.000M times in 0.115814s 0.113906s

	Comparison:
	                complex_float_add
	          built-ruby:  13012361.7 i/s
	        compare-ruby:   6558237.1 i/s - 1.98x  slower

	                complex_float_div
	        compare-ruby:    576821.0 i/s
	          built-ruby:    567968.8 i/s - 1.02x  slower

	                complex_float_mul
	          built-ruby:   2627575.4 i/s
	        compare-ruby:   1689800.0 i/s - 1.55x  slower

	                complex_float_new
	        compare-ruby:   1350130.8 i/s
	          built-ruby:   1267809.6 i/s - 1.06x  slower

	              complex_float_power
	          built-ruby:   1835168.8 i/s
	        compare-ruby:   1571074.6 i/s - 1.17x  slower

	                complex_float_sub
	          built-ruby:   8779168.8 i/s
	        compare-ruby:   8634534.7 i/s - 1.02x  slower
	```

	complex.c: replace misused UNLIKELY with LIKELY

	test_complex.rb: fix tests for RUBYOPT="-w"

	test_complex.rb: use the same approach to fix failures

	as r66682.
------------------------------------------------------------------------
r66853 | naruse | 2019-01-18 07:08:56 +0900 (Fri, 18 Jan 2019) | 13 lines

merge revision(s) 66832: [Backport #15536]

	st.c (rb_hash_bulk_insert_into_st_table): avoid out-of-bounds write

	"hash_bulk_insert" first expands the table, but the target size was
	wrong: it was calculated by "num_entries + (size to buld insert)", but
	it was wrong when "num_entries < entries_bound", i.e., it has a deleted
	entry.  "hash_bulk_insert" adds the given entries from entries_bound,
	which led to out-of-bounds write access.  [Bug #15536]

	As a simple fix, this commit changes the calculation to "entries_bound +
	size".  I'm afraid if this might be inefficient, but I think it is safe
	anyway.
------------------------------------------------------------------------
r66852 | naruse | 2019-01-18 07:07:55 +0900 (Fri, 18 Jan 2019) | 7 lines

merge revision(s) 66779: [Backport #15520]

	configure: refuse to build with jemalloc when header is missing

	[ruby-core:90964] [Bug #15520]

	Freom: Misty De Meo <mistydemeo@github.com>
------------------------------------------------------------------------
r66851 | naruse | 2019-01-18 07:03:14 +0900 (Fri, 18 Jan 2019) | 3 lines

merge revision(s) 66819: [Backport #15532]

	ast.c: fix missing head part in dynamic literal
------------------------------------------------------------------------
r66850 | naruse | 2019-01-18 06:55:11 +0900 (Fri, 18 Jan 2019) | 5 lines

merge revision(s) 66817: [Backport #15513]

	mjit_worker.c: pass -nostdlib when making pch as well

	[Bug #15513]
------------------------------------------------------------------------
r66849 | naruse | 2019-01-18 06:54:24 +0900 (Fri, 18 Jan 2019) | 36 lines

merge revision(s) 66811,66812,66816: [Backport #15522]

	mjit_worker.c: untangle CC_LIBS nesting

	This should have no impact.
	The CC_LIBS was too hard to read for human.

	I don't remember whether the order of -lmsvcrt and -lgcc matters or not,
	but I kept that for the best safety.

	mjit_worker.c: pass -lgcc to GCC platforms

	using `-nodefaultlibs -nostdlib`.

	I assume libgcc is needed when we use -nostdlib, and it's linked on some
	platforms but not linked on some platforms (like aarch64, and possibly
	AIX as well) as said in https://wiki.osdev.org/Libgcc :

	> You can link with libgcc by passing -lgcc when linking your kernel
	with your compiler. You don't need to do this unless you pass the
	-nodefaultlibs option (implied by -nostdlib)

	Also note that -nostdlib is not strictly needed (rather implied
	-nodefaultlibs is problematic for Gentoo like Bug#15513, which will be
	approached later) but helpful for performance. So I want to keep it for
	now.

	[Bug #15522]

	I'm not trying to add `-nodefaultlibs -nostdlib` for AIX in this commit
	because AIX RubyCI is dead right now, but I'll try to add them again
	once RubyCI is fixed.

	mjit_worker.c: try passing -nostdlib to AIX

	r66812 might have allowed this. Testing.
------------------------------------------------------------------------
r66848 | naruse | 2019-01-18 06:46:40 +0900 (Fri, 18 Jan 2019) | 10 lines

merge revision(s) 66838: [Backport #15540]

	dir.c: fix Dir.glob with braces and matching dir

	* dir.c (join_path_from_pattern): add the last slash for directory
	  matching.

	* test/ruby/test_dir.rb (test_glob_recursive_directory): add a test
	  for above.
	  [ruby-core:91110] [Bug #15540]
------------------------------------------------------------------------
r66847 | naruse | 2019-01-18 06:39:14 +0900 (Fri, 18 Jan 2019) | 10 lines

merge revision(s) 66756: [Backport #15479]

	Mark array as "going to be modified" in `Array#reject!`

	Before this patch, if `reject!` is called on a shared array it can
	mutate the shared array rather than a copy.  This patch marks the array
	as "going to be modified" so that the shared source array isn't
	mutated.

	[Bug #15479] [ruby-core:90781]
------------------------------------------------------------------------
r66846 | svn | 2019-01-18 06:36:20 +0900 (Fri, 18 Jan 2019) | 1 line

* 2019-01-18
------------------------------------------------------------------------
r66845 | naruse | 2019-01-18 06:36:17 +0900 (Fri, 18 Jan 2019) | 17 lines

merge revision(s) 66760,66761,66824: [Backport #15460]

	Follow behaviour of IO#ungetbyte

	see r65802 and [Bug #14359]

	* expand tabs.

	setbyte / ungetbyte allow out-of-range integers

	* string.c: String#setbyte to accept arbitrary integers [Bug #15460]

	* io.c: ditto for IO#ungetbyte

	* ext/strringio/stringio.c: ditto for StringIO#ungetbyte


------------------------------------------------------------------------
r66829 | naruse | 2019-01-15 18:06:51 +0900 (Tue, 15 Jan 2019) | 8 lines

merge revision(s) 66767: [Backport #15399]

	insns.def (duparray, duphash): add dtrace hooks

	They are considered Array and Hash creation events, so
	allow dtrace (and systemtap) to track those creations.

	Co-Authored-By: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r66828 | naruse | 2019-01-15 18:00:14 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66788: [Backport #15498]

	Update refinements docs

	Co-Authored-By: Vladimir Dementyev <dementiev.vm@gmail.com>
------------------------------------------------------------------------
r66827 | naruse | 2019-01-15 17:55:56 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66736: [Backport #15511]

	ast.c: argument must be a string

	[ruby-core:90904] [Bug #15511]
------------------------------------------------------------------------
r66826 | naruse | 2019-01-15 17:55:11 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66745: [Backport #15512]

	Bump version to date-2.0.0.

	  I forgot to change it when Ruby 2.6.0 was released.
------------------------------------------------------------------------
r66825 | naruse | 2019-01-15 17:53:40 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66735: [Backport #15506]

	Fix mday overflow

	[ruby-core:90897] [Bug #15506]
------------------------------------------------------------------------
r66815 | naruse | 2019-01-14 15:38:34 +0900 (Mon, 14 Jan 2019) | 13 lines

merge revision(s) 66595: [Backport #15471]

	fix missed script_compiled events. [Bug #15471]

	* ruby.c (process_options): script_compiled events are missed on
	  command line -e or specified file. this commit fix it.
	  [Bug #15471]

	  This patch should be backport to Ruby 2.6 branch.

	* vm_core.h (rb_exec_event_hook_script_compiled): introduce utility
	  function to invoke a script_compiled event.

------------------------------------------------------------------------
r66814 | svn | 2019-01-14 15:34:03 +0900 (Mon, 14 Jan 2019) | 1 line

* 2019-01-14
------------------------------------------------------------------------
r66813 | naruse | 2019-01-14 15:34:02 +0900 (Mon, 14 Jan 2019) | 13 lines

merge revision(s) 66670,66676: [Backport #15476]

	compile.c: support branch coverage for `a&.foo = 1`

	[Bug #15476]

	compile.c (iseq_set_sequence): fix branch coverage table

	Not only TRACE_ELEMENT but also INSN_ELEMENT may have events.
	The old pc2branchindex was created using only events of TRACE_ELEMENTs.
	This change uses events of INSN_ELEMENTs too for pc2branchindex table.

	[Bug #15476]
------------------------------------------------------------------------
r66800 | naruse | 2019-01-13 06:04:31 +0900 (Sun, 13 Jan 2019) | 3 lines

merge revision(s) 66768: [Backport #15519]

	Get rid of C99 feature for now [ruby-core:90949] [Bug #15519]
------------------------------------------------------------------------
r66799 | naruse | 2019-01-13 06:02:26 +0900 (Sun, 13 Jan 2019) | 37 lines

merge revision(s) 66582: [Backport #15468][Backport #15472]

	Fix Net::Protocol::BufferedIO#write when sending large multi-byte string

	This commit should fix Net::Protocol::BufferedIO#write when sending
	large multi-byte string like following example.

	```
	$ ruby -rnet/http -rjson -v -e "Net::HTTP.post(URI('http://httpbin.org/post'), { text: '?'*100_000 }.to_json, 'Content-Type' => 'application/json')"
	ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
	Traceback (most recent call last):
	        19: from -e:1:in `<main>'
	        18: from lib/ruby/2.6.0/net/http.rb:500:in `post'
	        17: from lib/ruby/2.6.0/net/http.rb:605:in `start'
	        16: from lib/ruby/2.6.0/net/http.rb:920:in `start'
	        15: from lib/ruby/2.6.0/net/http.rb:502:in `block in post'
	        14: from lib/ruby/2.6.0/net/http.rb:1281:in `post'
	        13: from lib/ruby/2.6.0/net/http.rb:1493:in `send_entity'
	        12: from lib/ruby/2.6.0/net/http.rb:1479:in `request'
	        11: from lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'
	        10: from lib/ruby/2.6.0/net/http.rb:1506:in `catch'
	         9: from lib/ruby/2.6.0/net/http.rb:1507:in `block in transport_request'
	         8: from lib/ruby/2.6.0/net/http/generic_request.rb:123:in `exec'
	         7: from lib/ruby/2.6.0/net/http/generic_request.rb:189:in `send_request_with_body'
	         6: from lib/ruby/2.6.0/net/protocol.rb:247:in `write'
	         5: from lib/ruby/2.6.0/net/protocol.rb:265:in `writing'
	         4: from lib/ruby/2.6.0/net/protocol.rb:248:in `block in write'
	         3: from lib/ruby/2.6.0/net/protocol.rb:275:in `write0'
	         2: from lib/ruby/2.6.0/net/protocol.rb:275:in `each_with_index'
	         1: from lib/ruby/2.6.0/net/protocol.rb:275:in `each'
	lib/ruby/2.6.0/net/protocol.rb:280:in `block in write0': undefined method `bytesize' for nil:NilClass (NoMethodError)
	```

	[Fix GH-2058]

	From: Eito Katagiri <eitoball@gmail.com>

------------------------------------------------------------------------
r66729 | naruse | 2019-01-06 06:33:26 +0900 (Sun, 06 Jan 2019) | 7 lines

merge revision(s) 66699: [Backport #15494]

	Fix Random.urandom in a chroot on OpenBSD

	[ruby-core:90850] [Bug #15494]

	From: jeremyevans0 (Jeremy Evans) <merch-redmine@jeremyevans.net>
------------------------------------------------------------------------
r66728 | naruse | 2019-01-06 06:25:49 +0900 (Sun, 06 Jan 2019) | 5 lines

merge revision(s) 66685,66686: [Backport #15502]

	Try to update cert

	Try to update cert (2nd try)
------------------------------------------------------------------------
r66563 | naruse | 2018-12-26 02:05:20 +0900 (Wed, 26 Dec 2018) | 3 lines

merge revision(s) 66533:

	Add ruby_2_6 branch to .travis.yml
------------------------------------------------------------------------
r66562 | naruse | 2018-12-26 02:03:10 +0900 (Wed, 26 Dec 2018) | 3 lines

merge revision(s) 66553:

	Set typeflag [Bug #15461]
------------------------------------------------------------------------
r66549 | naruse | 2018-12-25 17:50:27 +0900 (Tue, 25 Dec 2018) | 7 lines

merge revision(s) 66548:

	fix a test by restoring value checking.

	* test/ruby/test_literal.rb (test_hash_literal_frozen): restore value
	  checking code which is removed accidentaly at r66466.

------------------------------------------------------------------------
r66546 | naruse | 2018-12-25 15:17:00 +0900 (Tue, 25 Dec 2018) | 2 lines

v2.6.0p0

------------------------------------------------------------------------
r66545 | naruse | 2018-12-25 15:00:37 +0900 (Tue, 25 Dec 2018) | 3 lines

merge revision(s) 66539:

	io-console: bump to 0.4.7
------------------------------------------------------------------------
r66544 | naruse | 2018-12-25 15:00:14 +0900 (Tue, 25 Dec 2018) | 7 lines

merge revision(s) 66538:

	vm_insnhelper.c: use COLDFUNC

	COLDFUNC is introduced in r66228.  Use it for pre-existing
	__attribute__((__cold__)) usages.

------------------------------------------------------------------------
r66543 | naruse | 2018-12-25 14:58:52 +0900 (Tue, 25 Dec 2018) | 3 lines

merge revision(s) 66537:

	[DOC] Fix typos [ci skip]
------------------------------------------------------------------------
r66542 | naruse | 2018-12-25 14:57:55 +0900 (Tue, 25 Dec 2018) | 7 lines

merge revision(s) 66536:

	Import REXML 3.1.9

	It restores removed REXML::Parsers::BaseParser::UNQME_STR.
	Because it's used by kramdown.

------------------------------------------------------------------------
r66541 | naruse | 2018-12-25 14:57:13 +0900 (Tue, 25 Dec 2018) | 5 lines

merge revision(s) 66535:

	Import bigdecimal 1.4.1

	* https://github.com/ruby/bigdecimal/compare/v1.4.0..v1.4.1
------------------------------------------------------------------------
r66540 | naruse | 2018-12-25 14:56:17 +0900 (Tue, 25 Dec 2018) | 5 lines

merge revision(s) 66534:

	Mention rb_gc_register_mark_object [ci skip]

	[Feature #9894]
------------------------------------------------------------------------
r66532 | naruse | 2018-12-25 07:13:36 +0900 (Tue, 25 Dec 2018) | 1 line

Release branch of Ruby 2.6
------------------------------------------------------------------------
r66531 | naruse | 2018-12-25 07:09:40 +0900 (Tue, 25 Dec 2018) | 1 line

exception bactrace in reverse order is Ruby 2.5 feature
------------------------------------------------------------------------
r66530 | stomar | 2018-12-25 06:14:38 +0900 (Tue, 25 Dec 2018) | 4 lines

Small improvement in refinements docs

Move general statement about refinements of modules
from example to the top of the document.
------------------------------------------------------------------------
r66529 | svn | 2018-12-25 05:41:19 +0900 (Tue, 25 Dec 2018) | 1 line

* 2018-12-25
------------------------------------------------------------------------
r66528 | stomar | 2018-12-25 05:41:15 +0900 (Tue, 25 Dec 2018) | 1 line

complex.c, object.c: [DOC] improve "exception: false" docs
------------------------------------------------------------------------
r66527 | hsbt | 2018-12-24 20:03:52 +0900 (Mon, 24 Dec 2018) | 1 line

Added entry for RubyGems 3.0.1 to NEWS.
------------------------------------------------------------------------
r66526 | stomar | 2018-12-24 19:52:44 +0900 (Mon, 24 Dec 2018) | 1 line

NEWS: various improvements
------------------------------------------------------------------------
r66525 | knu | 2018-12-24 17:11:49 +0900 (Mon, 24 Dec 2018) | 1 line

Document the "cause" keyword argument for raise
------------------------------------------------------------------------
r66524 | k0kubun | 2018-12-24 12:50:39 +0900 (Mon, 24 Dec 2018) | 5 lines

test_win32ole_event.rb: use better retry strategy

because
https://ci.appveyor.com/project/ruby/ruby/builds/21208728/job/lm5k0lxnn51pcljl
seems to fail with just sleeping
------------------------------------------------------------------------
r66523 | k0kubun | 2018-12-24 12:48:32 +0900 (Mon, 24 Dec 2018) | 1 line

test_win32ole_event.rb: avoid unlimited retries
------------------------------------------------------------------------
r66522 | ko1 | 2018-12-24 11:02:47 +0900 (Mon, 24 Dec 2018) | 9 lines

remove "deprecated" for rb_frame_method_id_and_class [Bug #15300]

* include/ruby/backward.h (rb_frame_method_id_and_class): we had labeled
  `rb_frame_method_id_and_class()` as deprecated because MRI internal
  doesn't use it, but we found there are user of this API in external
  C-extensions. Now we don't have proper alternative API and no time
  to make alternative API, so I remove "deprecated" label.
  [Bug #15300]

------------------------------------------------------------------------
r66521 | nobu | 2018-12-24 10:56:21 +0900 (Mon, 24 Dec 2018) | 1 line

Compact AST::Node#inspect
------------------------------------------------------------------------
r66520 | nobu | 2018-12-24 10:46:48 +0900 (Mon, 24 Dec 2018) | 6 lines

time.c: zone in fixoff mode

* time.c (time_set_utc_offset): reset zone when setting to fixoff
  mode.  while previously TZMODE_SET_FIXOFF has reset it always,
  the zone is kept for loaded zone since r65025.
  [ruby-core:90627] [Bug #15439]
------------------------------------------------------------------------
r66519 | nobu | 2018-12-24 09:48:15 +0900 (Mon, 24 Dec 2018) | 3 lines

enumerator.c: fix inspect with the last empty hash

[ruby-core:90685] [Bug #15455]
------------------------------------------------------------------------
r66518 | mrkn | 2018-12-24 03:54:51 +0900 (Mon, 24 Dec 2018) | 1 line

Add test case of ArithmeticSequence#sum
------------------------------------------------------------------------
r66517 | mrkn | 2018-12-24 03:32:03 +0900 (Mon, 24 Dec 2018) | 3 lines

NEWS: Update for bigdecimal future plan

[ci skip]
------------------------------------------------------------------------
r66516 | mrkn | 2018-12-24 03:32:01 +0900 (Mon, 24 Dec 2018) | 3 lines

Import bigdecimal-1.4.0

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181220a..v1.4.0
------------------------------------------------------------------------
r66515 | svn | 2018-12-24 00:02:23 +0900 (Mon, 24 Dec 2018) | 1 line

* 2018-12-24
------------------------------------------------------------------------
r66514 | ko1 | 2018-12-24 00:02:17 +0900 (Mon, 24 Dec 2018) | 9 lines

move checking code.

* gc.c (gc_mark_ptr): this check was introduced by accidentaly
  (this is why message is "...", crazy simple) for debugging.
  However, this check is useful because if there is T_NONE
  object here, we can't know which object points to it.
  For debugging reason, I remain this checking code and
  set reasonable error message.

------------------------------------------------------------------------
r66513 | ko1 | 2018-12-23 23:58:41 +0900 (Sun, 23 Dec 2018) | 8 lines

fix marking T_NONE object bug.

* array.c (rb_ary_splice): do not use RARRAY_PTR() here because it can cause
  GC because of rb_ary_detransient(). Here ary can contain T_NONE object
  because of increasing capacity and not initialized yet.

  error log: http://ci.rvm.jp/results/trunk-test@ruby-sky1/1557174

------------------------------------------------------------------------
r66512 | aycabta | 2018-12-23 22:15:17 +0900 (Sun, 23 Dec 2018) | 1 line

Add RDoc section to NEWS
------------------------------------------------------------------------
r66511 | aycabta | 2018-12-23 22:14:28 +0900 (Sun, 23 Dec 2018) | 1 line

Merge RDoc 6.1.0 from upstream
------------------------------------------------------------------------
r66510 | nobu | 2018-12-23 20:11:36 +0900 (Sun, 23 Dec 2018) | 1 line

Prohibit circular causes [Bug #15447]
------------------------------------------------------------------------
r66509 | nobu | 2018-12-23 20:11:35 +0900 (Sun, 23 Dec 2018) | 1 line

remove trailing spaces [ci skip]
------------------------------------------------------------------------
r66508 | normal | 2018-12-23 17:42:44 +0900 (Sun, 23 Dec 2018) | 6 lines

test/ruby/test_thread.rb (test_fork_while_parent_locked): rewrite to avoid OOM

Instead of using a torture test, trigger the condition for the old
segfault in [Bug #15383] exactly.

[ruby-core:90676] [Bug #15430]
------------------------------------------------------------------------
r66507 | kou | 2018-12-23 16:00:35 +0900 (Sun, 23 Dec 2018) | 5 lines

Import CSV 3.0.2

This includes performance improvement especially writing. Writing is
about 2 times faster.

------------------------------------------------------------------------
r66506 | nobu | 2018-12-23 14:49:43 +0900 (Sun, 23 Dec 2018) | 1 line

Restrict cause to an exception object [Bug #15447]
------------------------------------------------------------------------
r66505 | marcandre | 2018-12-23 12:43:45 +0900 (Sun, 23 Dec 2018) | 3 lines

Struct#to_h: Add doc for block form.

Patch by Shuji Kobayashi [doc] [ci skip] [#15454]
------------------------------------------------------------------------
r66504 | k0kubun | 2018-12-23 10:58:33 +0900 (Sun, 23 Dec 2018) | 4 lines

.travis.yml: refine explanation of no -j3 on osx [ci skip]

With travis_wait, we may not need -j3 for test-all anymore, but still we
need to avoid hanging on building Ruby somehow.
------------------------------------------------------------------------
r66503 | k0kubun | 2018-12-23 10:40:33 +0900 (Sun, 23 Dec 2018) | 5 lines

test/fiddle/test_function.rb: loosen timeout

We're hitting `Expected |200 - 351| (151) to be <= 150.` in several places:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1012/ruby-trunk/log/20181215T094505Z.fail.html.gz
https://travis-ci.org/ruby/ruby/jobs/471483171
------------------------------------------------------------------------
r66502 | k0kubun | 2018-12-23 10:35:14 +0900 (Sun, 23 Dec 2018) | 3 lines

.travis.yml: wrap setarch with travis_wait

because travis_wait is not found via setarch
------------------------------------------------------------------------
r66501 | k0kubun | 2018-12-23 10:10:06 +0900 (Sun, 23 Dec 2018) | 4 lines

.travis.yml: try travis_wait instead of -v

Using -v somehow makes test-all on osx stable. Let me check if travis_wait
solves the issue or not.
------------------------------------------------------------------------
r66500 | k0kubun | 2018-12-23 09:45:11 +0900 (Sun, 23 Dec 2018) | 3 lines

iseq.c: avoid Null pointer dereference

detected by coverity scan
------------------------------------------------------------------------
r66499 | hsbt | 2018-12-23 09:20:49 +0900 (Sun, 23 Dec 2018) | 4 lines

Merge RubyGems 3.0.1 from rubygems/rubygems.

  It fixed the issues of RubyGems 3.0.0.
  https://blog.rubygems.org/2018/12/23/3.0.1-released.html
------------------------------------------------------------------------
r66498 | normal | 2018-12-23 07:39:31 +0900 (Sun, 23 Dec 2018) | 5 lines

{complex,object,rational}.c: document exception: false

From: Victor Shepelev <zverok.offline@gmail.com>

[ruby-core:90673] [Bug #15452]
------------------------------------------------------------------------
r66497 | svn | 2018-12-23 02:05:05 +0900 (Sun, 23 Dec 2018) | 1 line

* 2018-12-23
------------------------------------------------------------------------
r66496 | marcandre | 2018-12-23 02:05:03 +0900 (Sun, 23 Dec 2018) | 3 lines

ostruct.rb: Accept block for to_h [#15451].

Patch by Shuji Kobayashi.
------------------------------------------------------------------------
r66495 | nobu | 2018-12-22 19:23:06 +0900 (Sat, 22 Dec 2018) | 1 line

Use idException
------------------------------------------------------------------------
r66494 | normal | 2018-12-22 17:08:03 +0900 (Sat, 22 Dec 2018) | 7 lines

test/ruby/test_thread.rb (test_fork_while_parent_locked): reduce threads

Reduce thread counts unconditionally for some CI systems with
low limits..  And Solaris apparently lacks RLIMIT_NPROC, so we
can't detect resource limits and scale the test appropriately.

[ruby-core:90670] [Bug #15430]
------------------------------------------------------------------------
r66493 | nobu | 2018-12-22 16:14:14 +0900 (Sat, 22 Dec 2018) | 4 lines

Fix for circular causes

* eval_error.c (show_cause): get rid of infinite recursion on
  circular causes.  [Bug #15447]
------------------------------------------------------------------------
r66492 | nobu | 2018-12-22 16:14:13 +0900 (Sat, 22 Dec 2018) | 1 line

Removed garbage output
------------------------------------------------------------------------
r66491 | nobu | 2018-12-22 16:14:12 +0900 (Sat, 22 Dec 2018) | 1 line

Moved regexps not to confuse ruby-mode.el
------------------------------------------------------------------------
r66490 | k0kubun | 2018-12-22 10:43:45 +0900 (Sat, 22 Dec 2018) | 3 lines

benchmark/app_erb.yml: remove unused variable

https://github.com/ruby/ruby/commit/3efcb74036af32cbcc889d06d8c6c546289e89f4#r31762996
------------------------------------------------------------------------
r66489 | normal | 2018-12-22 10:41:18 +0900 (Sat, 22 Dec 2018) | 15 lines

thread_sync.c (rb_mutex_t): eliminate fork_gen

The true bug fork_gen was hiding was rb_mutex_abandon_locking_mutex
failing to unconditionally clear the waitq of mutexes it was
waiting on.  So we fix rb_mutex_abandon_locking_mutex, instead,
and eliminate rb_mutex_cleanup_keeping_mutexes.

This commit was tested heavily on a single-core Pentium-M which
was my most reliable reproducer of the "crash.rb" script from
[Bug #15383]

[Bug #14578] [Bug #15383]

Note: [Bug #15430] turned out to be an entirely different
problem: RLIMIT_NPROC limit was hit on the CI VMs.
------------------------------------------------------------------------
r66488 | normal | 2018-12-22 08:32:36 +0900 (Sat, 22 Dec 2018) | 7 lines

test/ruby/test_thread.rb: reduce thread count to avoid SIGKILL

Perhaps this error report is down to resource limits on a VM:

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181221T230003Z.fail.html.gz

But rb_mutex_t.fork_gen is still redundant, I think.
------------------------------------------------------------------------
r66487 | normal | 2018-12-22 06:44:09 +0900 (Sat, 22 Dec 2018) | 6 lines

test/ruby/test_thread.rb: add diagnosis code for [Bug #15430]

I can't find stderr in the test-all output of the CI machine,
so maybe the assertion will show what's going on.

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181221T170003Z.log.html.gz#test-all
------------------------------------------------------------------------
r66486 | k0kubun | 2018-12-22 01:36:37 +0900 (Sat, 22 Dec 2018) | 1 line

.travis.yml: use -v for osx to find a blocking test
------------------------------------------------------------------------
r66485 | k0kubun | 2018-12-22 01:19:31 +0900 (Sat, 22 Dec 2018) | 1 line

../arith_seq/../extract.c: remove unused variable
------------------------------------------------------------------------
r66484 | k0kubun | 2018-12-22 01:07:41 +0900 (Sat, 22 Dec 2018) | 6 lines

.travis.yml: give up parallel build for osx

Even building ruby seems to hang for unknown reasons.
https://travis-ci.org/ruby/ruby/jobs/471021727

Travis's osx environment is too fragile. Avoid anything dangerous.
------------------------------------------------------------------------
r66483 | svn | 2018-12-22 00:07:19 +0900 (Sat, 22 Dec 2018) | 1 line

* 2018-12-22
------------------------------------------------------------------------
r66482 | k0kubun | 2018-12-22 00:07:18 +0900 (Sat, 22 Dec 2018) | 14 lines

.travis.yml: avoid using -j3 for osx

osx build has failed too often. we don't know why.

To know which test hangs forever, we might want to have hard timeout for
all test case (like 9min, slightly less than no-output timeout) in test-all.
But it's a little hard to implement and I would workaround an unknown
cause somehow.

It's known that -j is harmful for some tests in test-all. Let's try to
remove it first, and if it doesn't work, I'll resurrect -v option to
easily know which test is the culprit.

Slow correctness is much better than fast false-positive.
------------------------------------------------------------------------
r66481 | svn | 2018-12-21 23:33:26 +0900 (Fri, 21 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66480 | k0kubun | 2018-12-21 23:33:25 +0900 (Fri, 21 Dec 2018) | 4 lines

test/excludes/_wercker: give up testing TestGemRemoteFetcher

The tests are really fragile with --jit-wait and it doesn't have interface
to modify this timeout at all.
------------------------------------------------------------------------
r66479 | k0kubun | 2018-12-21 23:01:49 +0900 (Fri, 21 Dec 2018) | 4 lines

test_jit.rb: show debug info for success_count test

to investigate
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181221T092505Z.fail.html.gz
------------------------------------------------------------------------
r66478 | mrkn | 2018-12-21 22:05:16 +0900 (Fri, 21 Dec 2018) | 4 lines

range.c: reject ArithmeticSequence in rb_range_values

Reject ArithmeticSequence in rb_range_values so that methods like
Array#[] raises TypeError for ArithmeticSequence as an index.
------------------------------------------------------------------------
r66477 | normal | 2018-12-21 21:32:52 +0900 (Fri, 21 Dec 2018) | 8 lines

thread_sync.c (rb_mutex_cleanup_keeping_mutexes): update fork_gen

... when clearing waitq. Otherwise, we risk redundantly clearing
valid waiters in future calls to `mutex_ptr`.

Note: I am not sure if this fixes [Bug #15430], and even if it
did, fork_gen is a belt-and-suspenders redundancy for [Bug #15383]
which wastes one word for every Mutex object.
------------------------------------------------------------------------
r66476 | normal | 2018-12-21 21:32:48 +0900 (Fri, 21 Dec 2018) | 5 lines

thread_sync.c (rb_mutex_abandon_keeping_mutexes): remove unnecessary check

rb_mutex_abandon_all functions fine when passed a NULL value,
so let the compiler deal with the complexity of the branch
instead of the person reading the code.
------------------------------------------------------------------------
r66475 | mame | 2018-12-21 20:44:21 +0900 (Fri, 21 Dec 2018) | 3 lines

eval_error.c (show_cause): check if cause is an Exception or not

Fixes [Bug #15447]
------------------------------------------------------------------------
r66474 | mrkn | 2018-12-21 09:03:39 +0900 (Fri, 21 Dec 2018) | 5 lines

enumerator.c: Fix airth_seq_each for Rational

Fix the wrong uses of rb_int_ge in arith_seq_each.

[ruby-core:90648] [Bug #15444]
------------------------------------------------------------------------
r66473 | mrkn | 2018-12-21 08:29:49 +0900 (Fri, 21 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre.20181220a

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181214a..v1.4.0.pre.20181220a
------------------------------------------------------------------------
r66472 | nobu | 2018-12-21 08:21:50 +0900 (Fri, 21 Dec 2018) | 1 line

iseq.c: resurrect literal hash operands
------------------------------------------------------------------------
r66471 | stomar | 2018-12-21 07:54:36 +0900 (Fri, 21 Dec 2018) | 1 line

NEWS: small improvements
------------------------------------------------------------------------
r66470 | svn | 2018-12-21 06:17:15 +0900 (Fri, 21 Dec 2018) | 1 line

* 2018-12-21
------------------------------------------------------------------------
r66469 | nobu | 2018-12-21 06:17:11 +0900 (Fri, 21 Dec 2018) | 5 lines

A couple of small English fixes [ci skip]

[Fix GH-2052]

From: Jon Burgess <jkburges@gmail.com>
------------------------------------------------------------------------
r66468 | mame | 2018-12-20 19:17:37 +0900 (Thu, 20 Dec 2018) | 5 lines

ext/coverage/lib/coverage.rb (Coverage.line_stub): use only line events

It wrongly used all linenos of ISeq#trace_points which includes not only
line events but also call, return, and other events.  So, the result
included some linenos that can not be covered at all by line coverage.
------------------------------------------------------------------------
r66467 | kazu | 2018-12-20 18:55:05 +0900 (Thu, 20 Dec 2018) | 3 lines

[DOC] Update CI build status badges [ci skip]

copy from README.md
------------------------------------------------------------------------
r66466 | ko1 | 2018-12-20 16:17:55 +0900 (Thu, 20 Dec 2018) | 7 lines

hide iseq operand object for duphash. [Bug #15440]

* compile.c (compile_array): hide source Hash object.

* hash.c (rb_hash_resurrect): introduced to dup Hash object
  using rb_cHash.

------------------------------------------------------------------------
r66465 | nobu | 2018-12-20 15:59:27 +0900 (Thu, 20 Dec 2018) | 1 line

Test separately to get rid of risk to modify unrelated hash
------------------------------------------------------------------------
r66464 | nobu | 2018-12-20 15:44:50 +0900 (Thu, 20 Dec 2018) | 23 lines

Freeze hash literals embedded in duphash instructions

Previously, these hash literals were not frozen, and thus could be
modified by ObjectSpace, resulting in undesired behavior.  Example:

```ruby
require 'objspace'

def a(b={0=>1,1=>4,2=>17})
  b
end

p a
ObjectSpace.each_object(Hash) do |a|
  a[3] = 8 if a.class == Hash && a[0] == 1 && a[1] == 4 && a[2] == 17
end
p a
```

It may be desirable to hide such hashes from ObjectSpace, since
they are internal, but I'm not sure how to do that.

From: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r66463 | nobu | 2018-12-20 14:43:15 +0900 (Thu, 20 Dec 2018) | 5 lines

parse.y: ignore constant name captures

* parse.y (reg_named_capture_assign_iter): ignore non-local name
  captures, including non-ASCII constant names.
  [ruby-dev:50719] [Bug #15437]
------------------------------------------------------------------------
r66462 | kou | 2018-12-20 13:03:10 +0900 (Thu, 20 Dec 2018) | 2 lines

Really ensure loading REXML in tests

------------------------------------------------------------------------
r66461 | nobu | 2018-12-20 13:03:07 +0900 (Thu, 20 Dec 2018) | 3 lines

rbinstall.rb: purge %x[git ls-files] too

[Bug #13423]
------------------------------------------------------------------------
r66460 | nobu | 2018-12-20 12:51:15 +0900 (Thu, 20 Dec 2018) | 4 lines

rbinstall.rb: syntax error in gemspec

* tool/rbinstall.rb (load_gemspec): do not hide syntax errors in
  a gemspec file.  check if the result instead.
------------------------------------------------------------------------
r66459 | kou | 2018-12-20 12:08:57 +0900 (Thu, 20 Dec 2018) | 3 lines

Ensure loading REXML


------------------------------------------------------------------------
r66458 | kou | 2018-12-20 11:49:10 +0900 (Thu, 20 Dec 2018) | 6 lines

rexml: upgrade to 3.1.8

See https://github.com/ruby/rexml/blob/master/NEWS.md for change summary.

Changes for spec/ has been reported: https://github.com/ruby/spec/pull/639

------------------------------------------------------------------------
r66457 | normal | 2018-12-20 09:07:19 +0900 (Thu, 20 Dec 2018) | 18 lines

thread_pthread.c (ubf_timer_disarm): ignore EINVAL iff timer is dead

The following race may happen if ubf_timer_destroy calls
timer_delete before ubf_timer_disarm gets called from
a different thread.  Consider the following timelines:

  ubf_timer_destroy                    | ubf_timer_disarm
  -------------------------------------+-----------------------------
                                       | CAS(ARM => DISARM)
  CAS(DISARM => DEAD)                  |
  timer_delete                         |
                                       | timer_settime(disarm)

Another option may be to add an intermediate "RTIMER_DISARMING"
state to the transition, but I figure the EINVAL check is
simpler and less intrusive code-wise.

cf. http://ci.rvm.jp/results/trunk-iseq_binary@silicon-docker/1545794
------------------------------------------------------------------------
r66456 | svn | 2018-12-20 04:01:04 +0900 (Thu, 20 Dec 2018) | 1 line

* 2018-12-20
------------------------------------------------------------------------
r66455 | yuki | 2018-12-20 04:01:02 +0900 (Thu, 20 Dec 2018) | 1 line

* gems/bundled_gems: Upgrade the did_you_mean gem to 1.3.0
------------------------------------------------------------------------
r66454 | hsbt | 2018-12-19 21:57:19 +0900 (Wed, 19 Dec 2018) | 1 line

Update entry of Psych on NEWS file.
------------------------------------------------------------------------
r66453 | hsbt | 2018-12-19 21:46:29 +0900 (Wed, 19 Dec 2018) | 1 line

Update entry of RubyGems on NEWS file.
------------------------------------------------------------------------
r66452 | normal | 2018-12-19 20:08:05 +0900 (Wed, 19 Dec 2018) | 22 lines

webrick: add the ability to override res, req creation

So that a customized HTTPServer subclass can use it's own
Request/Response classes.

To apply the override, make a subclass of WEBrick::HTTPServer
and override the
`create_request_and_response(with_webrick_config)` method. The
method should return an Array of [request, response].

To check whether the Server supports this method (i.e. when
using older versions of WEBrick when needing this
functionality), you can ask the server if it responds to the
method

    server.respond_to?(:create_request_and_response)

This is backportable.

[ruby-core:69604] [Feature #11266]

From: Julik Tarkhanov <me@julik.nl>
------------------------------------------------------------------------
r66451 | hsbt | 2018-12-19 16:20:17 +0900 (Wed, 19 Dec 2018) | 3 lines

Merge RubyGems 3.0.0 from upstream.

  https://blog.rubygems.org/2018/12/19/3.0.0-released.html
------------------------------------------------------------------------
r66450 | hsbt | 2018-12-19 16:02:57 +0900 (Wed, 19 Dec 2018) | 1 line

Update metadata of Bundler 1.17.2
------------------------------------------------------------------------
r66449 | duerst | 2018-12-19 13:08:46 +0900 (Wed, 19 Dec 2018) | 6 lines

avoid passing unnecessary options to download method

The option --unicode-beta for tool/downloader.rb introduced in
r66448 must not be passed as an option to actual download machinery.
Thanks to MSP-Greg (Greg L.) for bug report and patch.
This closes issue #15434.
------------------------------------------------------------------------
r66448 | duerst | 2018-12-19 09:26:31 +0900 (Wed, 19 Dec 2018) | 16 lines

add option to deal with Unicode beta data files

Unicode uses file names with explicit versions for beta publication.
This commit introduces a variable on the makefile level to distinguish
between beta and regular versions of file names.
 
common.mk: Define new variable UNICODE_BETA, usually set to NO,
but would be YES during tests with beta data files. Pass the value
of this variable to tool/downloader.rb with option --unicode-beta.

tool/downloader.rb: Receive and store value of --unicode-beta.
Raise an exception if value is YES, because we don't yet actually
deal with this case. Continue as usual if value is not YES.

This completes the changes needed in the makefile. Upcomming changes
will only affect tool/downloader.rb.
------------------------------------------------------------------------
r66447 | kazu | 2018-12-19 08:36:47 +0900 (Wed, 19 Dec 2018) | 1 line

sample/fib.py: Fix syntax error in Python 3 [ci skip]
------------------------------------------------------------------------
r66446 | normal | 2018-12-19 03:25:54 +0900 (Wed, 19 Dec 2018) | 6 lines

thread_pthread.c (ubf_timer_destroy): more careful state transition

We must not call timer_destroy while another thread is
calling timer_settime to arm the timer.

cf. http://ci.rvm.jp/results/trunk-iseq_binary@silicon-docker/1541578
------------------------------------------------------------------------
r66445 | nobu | 2018-12-19 01:11:07 +0900 (Wed, 19 Dec 2018) | 1 line

Constified to fix warning at r66442
------------------------------------------------------------------------
r66444 | nobu | 2018-12-19 01:01:58 +0900 (Wed, 19 Dec 2018) | 1 line

CHDIR to follow symlink [ci skip]
------------------------------------------------------------------------
r66443 | svn | 2018-12-19 00:11:18 +0900 (Wed, 19 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66442 | nobu | 2018-12-19 00:11:17 +0900 (Wed, 19 Dec 2018) | 1 line

Expand cross-recursion to a loop
------------------------------------------------------------------------
r66441 | svn | 2018-12-19 00:06:21 +0900 (Wed, 19 Dec 2018) | 1 line

* 2018-12-19
------------------------------------------------------------------------
r66440 | nobu | 2018-12-19 00:06:20 +0900 (Wed, 19 Dec 2018) | 1 line

Freeze and hide callback arguments holder
------------------------------------------------------------------------
r66439 | nobu | 2018-12-18 22:59:46 +0900 (Tue, 18 Dec 2018) | 11 lines

Enable refinements on symbol-proc in ruby-level methods

* vm_args.c (refine_sym_proc_call): resolve refinements when the
  proc is invoked, instead of resolving at making the proc, to
  enable refinements on symbol-proc in ruby-level methods

* vm.c (vm_cref_dup): clear cached symbol-procs when duplicating.

[Bug #15114] [Fix GH-2039]

From: manga_osyo <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66438 | normal | 2018-12-18 18:21:05 +0900 (Tue, 18 Dec 2018) | 12 lines

thread_sync.c (mutex_ptr): only reinitalize waitqueue at fork

Mutexes need to remain locked after forking.

This fixes "[BUG] invalid keeping_mutexes: Attempt to unlock a
mutex which is locked by another thread" and should
fix test_fork_while_parent_locked failures in CI

[ruby-core:90581] [Bug #15424]
[ruby-core:90595] [Bug #15430]

Fixes: r66230 ("handle mutexes held by parent threads in children")
------------------------------------------------------------------------
r66437 | svn | 2018-12-18 17:33:23 +0900 (Tue, 18 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66436 | ko1 | 2018-12-18 17:33:20 +0900 (Tue, 18 Dec 2018) | 6 lines

should use defined_class.

* vm_insnhelper.c (vm_call_method_each_type): we should use me->defined_class
  instead of me->owner because me->owner doesn't has correct ancestors list.
  [Bug #15427]

------------------------------------------------------------------------
r66435 | svn | 2018-12-18 17:11:57 +0900 (Tue, 18 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66434 | ko1 | 2018-12-18 17:11:52 +0900 (Tue, 18 Dec 2018) | 2 lines

rb_raw_obj_info() support T_MODULE and T_ICLASS.

------------------------------------------------------------------------
r66433 | hsbt | 2018-12-18 15:49:12 +0900 (Tue, 18 Dec 2018) | 1 line

Bump version to 1.0.0.
------------------------------------------------------------------------
r66432 | knu | 2018-12-18 14:09:08 +0900 (Tue, 18 Dec 2018) | 4 lines

Import ipaddr 1.2.2

- Enable frozen_string_literal and do a bit of code cleanup

------------------------------------------------------------------------
r66431 | akr | 2018-12-18 12:09:54 +0900 (Tue, 18 Dec 2018) | 4 lines

Pathname#relative_path_from uses is_a?

I reconsidered because simpler code would have better maintainablity.

------------------------------------------------------------------------
r66430 | hsbt | 2018-12-18 11:01:39 +0900 (Tue, 18 Dec 2018) | 1 line

Bump version to psych 3.1.0.
------------------------------------------------------------------------
r66429 | svn | 2018-12-18 07:49:01 +0900 (Tue, 18 Dec 2018) | 1 line

* 2018-12-18
------------------------------------------------------------------------
r66428 | normal | 2018-12-18 07:48:57 +0900 (Tue, 18 Dec 2018) | 7 lines

Fix test failure if ENV["USER"] doesn't match Process.euid

When dropping privileges to run tests, ENV["USER"] could be set
to a user that doesn't match Process.euid, which causes this
test to fail with Errno::EPERM.  Try to get the name for the
current euid, and only fallback to ENV["USER"] if that doesn't
work.
------------------------------------------------------------------------
r66427 | nobu | 2018-12-17 14:57:15 +0900 (Mon, 17 Dec 2018) | 1 line

Split test_fnmatch
------------------------------------------------------------------------
r66426 | nobu | 2018-12-17 13:58:50 +0900 (Mon, 17 Dec 2018) | 1 line

Already nlink is properly set on Windows
------------------------------------------------------------------------
r66425 | nobu | 2018-12-17 13:58:49 +0900 (Mon, 17 Dec 2018) | 1 line

Split test_expand_path, test_basename, test_dirname
------------------------------------------------------------------------
r66424 | mrkn | 2018-12-17 12:08:46 +0900 (Mon, 17 Dec 2018) | 5 lines

NEWS: Note for the bigdecimal versions

The differences between bigdecimal 1.3.5, 1.4.0, and 1.5.0 are explained.

[ci skip]
------------------------------------------------------------------------
r66423 | nobu | 2018-12-17 10:36:34 +0900 (Mon, 17 Dec 2018) | 6 lines

Workaround for OpenBSD make

* common.mk: read from node.h in the source directly, without
  VPATH.  [ruby-core:89151] [Bug #15154]

From: kernigh (George Koehler) <xkernigh@netscape.net>
------------------------------------------------------------------------
r66422 | svn | 2018-12-17 09:43:45 +0900 (Mon, 17 Dec 2018) | 1 line

* 2018-12-17
------------------------------------------------------------------------
r66421 | nobu | 2018-12-17 09:43:40 +0900 (Mon, 17 Dec 2018) | 4 lines

Range check is only for interaval

* time.c (time_timespec): range check is only for time interval
  value if time_t is signed.
------------------------------------------------------------------------
r66420 | kazu | 2018-12-16 23:54:05 +0900 (Sun, 16 Dec 2018) | 3 lines

[DOC] Update Object#=~ [ci skip]

see r65989
------------------------------------------------------------------------
r66419 | k0kubun | 2018-12-16 23:24:20 +0900 (Sun, 16 Dec 2018) | 5 lines

bin/erb: improve documentation of -P flag

man/erb.1: ditto

[Bug #15421]
------------------------------------------------------------------------
r66418 | nobu | 2018-12-16 21:55:59 +0900 (Sun, 16 Dec 2018) | 6 lines

Refine error message for time interval

* time.c (time_timespec): Time interval value can be zero, not
  only positive.  [ruby-dev:50709] [Bug #15420]

From: shuujii (Shuji KOBAYASHI) <shuujii@gmail.com>
------------------------------------------------------------------------
r66417 | normal | 2018-12-16 21:33:44 +0900 (Sun, 16 Dec 2018) | 3 lines

thread_pthread (ubf_timer_destroy): use VM_ASSERT

Don't need the overhead at runtime
------------------------------------------------------------------------
r66416 | akr | 2018-12-16 21:26:52 +0900 (Sun, 16 Dec 2018) | 4 lines

Pathname#relative_path_from compatible with mock.

[Fix GH-2049]

------------------------------------------------------------------------
r66415 | nobu | 2018-12-16 21:09:08 +0900 (Sun, 16 Dec 2018) | 5 lines

Enhance Tempfile docs [ci skip]

[ruby-core:90525] [Bug #15411]

From: zverok (Victor Shepelev) <zverok.offline@gmail.com>
------------------------------------------------------------------------
r66414 | svn | 2018-12-16 16:51:11 +0900 (Sun, 16 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66413 | normal | 2018-12-16 16:51:09 +0900 (Sun, 16 Dec 2018) | 15 lines

thread_pthread.c: fix memory leak from fork loop leapfrog (v3)

Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.  This fixes the leak for
GNU/Linux systems running glibc.

v2: disarm before timer_delete
v3: ubf_timer_arm prevents double-arming

This unreverts r66291 / commit ab73ef6b7037039a05edcbf2a0c1b1108197e036
Example Linux-only reproduction may be found in:

  r66290 / commit 043047a8fd5315d98eac38ddbd04ebe8db361817

Note: FreeBSD 11.2 still leaks, I'm not sure why, yet.
------------------------------------------------------------------------
r66412 | k0kubun | 2018-12-16 09:55:56 +0900 (Sun, 16 Dec 2018) | 3 lines

spec/../initialize_spec.rb: skip fd-specific spec

https://gist.github.com/ko1/72c03695e81a54d40649f29d0c421f26
------------------------------------------------------------------------
r66411 | svn | 2018-12-16 06:28:37 +0900 (Sun, 16 Dec 2018) | 1 line

* 2018-12-16
------------------------------------------------------------------------
r66410 | stomar | 2018-12-16 06:28:34 +0900 (Sun, 16 Dec 2018) | 1 line

time.c: [DOC] improve docs for tz argument of Time.new
------------------------------------------------------------------------
r66409 | k0kubun | 2018-12-15 23:45:36 +0900 (Sat, 15 Dec 2018) | 6 lines

Revert "* expand tabs."

This reverts commit 298180f0450df6e975057cc7e90b3ae3248586fc.

It looks like we should not expand ext/nkf:
https://git.ruby-lang.org/ruby-commit-hook.git/commit/?id=91fd9708b7cf04a4dcddd9614c24e27ddef5d43b
------------------------------------------------------------------------
r66407 | svn | 2018-12-15 18:55:26 +0900 (Sat, 15 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66406 | naruse | 2018-12-15 18:55:24 +0900 (Sat, 15 Dec 2018) | 1 line

Merge nkf v2.1.5
------------------------------------------------------------------------
r66405 | suke | 2018-12-15 14:04:40 +0900 (Sat, 15 Dec 2018) | 4 lines

use System Monitor Control for spec of Win32OLE.

* spec/ruby/library/win32ole/win32ole_method/event_interface_spec.rb:
  use System Monitor Control instead of Microsoft Internet Control
------------------------------------------------------------------------
r66404 | normal | 2018-12-15 13:40:14 +0900 (Sat, 15 Dec 2018) | 12 lines

test/lib/test/unit.rb: do not propagate MAKEFLAGS to children

Propagating MAKEFLAGS to children running test/unit caused stuck
tests with GNU make when "-jN" is passed in both the make(1)
command-line and the "TESTS=" variable; because the forked child
process would see MAKEFLAGS and try to use jobserver on its own.

This is regression caused by r64399
(commit b53fadfd5f200dbd6fe9f4b2a91ebb68618e59bb,
"process.c: defaults to close_others false");
but that change also fixed a regression when close-on-exec
became the default in 2.0 :<
------------------------------------------------------------------------
r66403 | svn | 2018-12-15 00:18:16 +0900 (Sat, 15 Dec 2018) | 1 line

* 2018-12-15
------------------------------------------------------------------------
r66402 | stomar | 2018-12-15 00:18:14 +0900 (Sat, 15 Dec 2018) | 1 line

proc.c: [DOC] fix typos
------------------------------------------------------------------------
r66401 | naruse | 2018-12-14 18:44:20 +0900 (Fri, 14 Dec 2018) | 4 lines

Move autoload to toplevel

So that classes which uses Net::HTTP with https can use OpenSSL
namespace for example exception classes like OpenSSL::SSL::SSLError.
------------------------------------------------------------------------
r66400 | naruse | 2018-12-14 17:01:40 +0900 (Fri, 14 Dec 2018) | 3 lines

fix r66163

OpenSSL maybe aren't loaded in rubygems.
------------------------------------------------------------------------
r66399 | svn | 2018-12-14 14:44:43 +0900 (Fri, 14 Dec 2018) | 1 line

* remove trailing spaces. [ci skip]
------------------------------------------------------------------------
r66398 | duerst | 2018-12-14 14:44:41 +0900 (Fri, 14 Dec 2018) | 1 line

tweak syntax of Proc documentation [ci skip]
------------------------------------------------------------------------
r66397 | nobu | 2018-12-14 13:10:42 +0900 (Fri, 14 Dec 2018) | 1 line

Suppress deprecation warnings
------------------------------------------------------------------------
r66396 | mrkn | 2018-12-14 12:45:32 +0900 (Fri, 14 Dec 2018) | 3 lines

NEWS: Fix description of BigDecimal.new [ci skip]

BigDecimal.new is restored, and will be removed on bigdecimal 1.5
------------------------------------------------------------------------
r66395 | nobu | 2018-12-14 12:36:13 +0900 (Fri, 14 Dec 2018) | 1 line

No document of Tempfile::Remover [ci skip]
------------------------------------------------------------------------
r66394 | svn | 2018-12-14 12:33:54 +0900 (Fri, 14 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66393 | mrkn | 2018-12-14 12:33:53 +0900 (Fri, 14 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre.20181214a

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181205a..v1.4.0.pre.20181214a
------------------------------------------------------------------------
r66392 | ko1 | 2018-12-14 11:27:23 +0900 (Fri, 14 Dec 2018) | 9 lines

separte NULL and EMPTY check.

* hash.c: separate NULL and EMPTY check functions.
  `RHASH_TABLE_EMPTY` function checks NULL table or not,
  but it should be named "NULL_P".
  Introduce `RHASH_TABLE_EMPTY_P` function to check size == 0.
  There are cases that hash has table data even if data is not NULL
  (in case removed after inserted elements).

------------------------------------------------------------------------
r66391 | nobu | 2018-12-14 10:29:23 +0900 (Fri, 14 Dec 2018) | 1 line

Suppress uninitialized instance variable warnings
------------------------------------------------------------------------
r66390 | ko1 | 2018-12-14 10:10:15 +0900 (Fri, 14 Dec 2018) | 16 lines

rename li_table->ar_table (and related names).

* internal.h: rename the following names:
  * li_table -> ar_table. "li" means linear (from linear search),
    but we use the word "array" (from data layout).
  * RHASH_ARRAY -> RHASH_AR_TABLE. AR_TABLE is more clear.
  * rb_hash_array_* -> rb_hash_ar_table_*.
  * RHASH_TABLE_P() -> RHASH_ST_TABLE_P(). more clear.
  * RHASH_CLEAR() -> RHASH_ST_CLEAR().

* hash.c: rename "linear_" prefix functions to "ar_" prefix.

* hash.c (linear_init_table): rename to ar_alloc_table.

* debug_counter.h: rename obj_hash_array to obj_hash_ar.

------------------------------------------------------------------------
r66389 | stomar | 2018-12-14 07:41:44 +0900 (Fri, 14 Dec 2018) | 4 lines

time.c: improve docs for Time

* time.c: [DOC] fix typos, drop unnecessary `p' from code examples,
  add missing `#' for return values, other small improvements.
------------------------------------------------------------------------
r66388 | stomar | 2018-12-14 05:35:02 +0900 (Fri, 14 Dec 2018) | 4 lines

NEWS: various fixes

Fix some typos; fix syntax in a code example; fix unintentional
description list for ticket numbers; other fixes.
------------------------------------------------------------------------
r66387 | stomar | 2018-12-14 05:25:36 +0900 (Fri, 14 Dec 2018) | 1 line

re.c: [DOC] fix typos
------------------------------------------------------------------------
r66386 | svn | 2018-12-14 05:24:25 +0900 (Fri, 14 Dec 2018) | 1 line

* 2018-12-14
------------------------------------------------------------------------
r66385 | stomar | 2018-12-14 05:24:23 +0900 (Fri, 14 Dec 2018) | 1 line

proc.c: [DOC] fix typos
------------------------------------------------------------------------
r66384 | usa | 2018-12-13 19:51:59 +0900 (Thu, 13 Dec 2018) | 2 lines

Install script of default gems as is to its libexec dir

------------------------------------------------------------------------
r66383 | kazu | 2018-12-13 18:51:05 +0900 (Thu, 13 Dec 2018) | 1 line

[DOC] Fix typos [ci skip]
------------------------------------------------------------------------
r66382 | normal | 2018-12-13 18:41:17 +0900 (Thu, 13 Dec 2018) | 5 lines

thread_pthread.c (native_ppoll_sleep): drop ubf_select references

We don't use ubf_select after r65495 / 5de7b3b4f27df747899c243adbb10c9799ad1399
("thread_pthread.c (native_ppoll_sleep): new eventfd (or pipe) for ubf"),
so we don't need to unregister the thread from the ubf list.
------------------------------------------------------------------------
r66381 | normal | 2018-12-13 18:25:46 +0900 (Thu, 13 Dec 2018) | 12 lines

thread_pthread.c (native_sleep): sched_yield if GVL uncontended

Uncontended GVL waitqueue could mean a single CPU setup where
threads are starved and can't even insert themselves into our
waitqueue.  So we force other threads to run upon releasing
the GVL in an uncontended state, in the hope that we can
avoid entering the slow path of ppoll and similar syscalls.

This should prevent test/ruby/test_thread.rb::test_signal_at_join
timeout problems on our single CPU FreeBSD CI machine.

[ruby-core:90417] [Bug #15398]
------------------------------------------------------------------------
r66380 | akr | 2018-12-13 17:53:15 +0900 (Thu, 13 Dec 2018) | 2 lines

use :chdir option to avoid fd 3 to work with Windows.

------------------------------------------------------------------------
r66379 | normal | 2018-12-13 17:44:15 +0900 (Thu, 13 Dec 2018) | 3 lines

thread_pthread.c (gvl_release_common): constify return value

No need for it to be mutable
------------------------------------------------------------------------
r66378 | k0kubun | 2018-12-13 14:59:14 +0900 (Thu, 13 Dec 2018) | 1 line

test_win32ole_event.rb: retry random failure
------------------------------------------------------------------------
r66377 | nobu | 2018-12-13 14:09:58 +0900 (Thu, 13 Dec 2018) | 4 lines

Separate RSTRING_PTR from a function call

Do not apply RSTRING_PTR, a macro which evaluats its argument
multiple times, on a function call.
------------------------------------------------------------------------
r66376 | tenderlove | 2018-12-13 12:01:18 +0900 (Thu, 13 Dec 2018) | 6 lines

Don't increment `code_index`

`code_index` doesn't need to be incremented since the mark array has
been removed.  Thanks for the patch ko1!

[ruby-core:90456] [Bug #15406]
------------------------------------------------------------------------
r66375 | stomar | 2018-12-13 07:04:48 +0900 (Thu, 13 Dec 2018) | 1 line

string.c: [DOC] fix typos
------------------------------------------------------------------------
r66374 | stomar | 2018-12-13 07:03:11 +0900 (Thu, 13 Dec 2018) | 1 line

range.c: [DOC] fix typo
------------------------------------------------------------------------
r66373 | marcandre | 2018-12-13 06:45:17 +0900 (Thu, 13 Dec 2018) | 1 line

range.c: Typo fix [DOC] [ci skip] [#15405]
------------------------------------------------------------------------
r66372 | svn | 2018-12-13 06:17:05 +0900 (Thu, 13 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66371 | mrkn | 2018-12-13 06:17:04 +0900 (Thu, 13 Dec 2018) | 1 line

Add test cases of rb_arithmetic_sequence_extract
------------------------------------------------------------------------
r66370 | marcandre | 2018-12-13 04:51:50 +0900 (Thu, 13 Dec 2018) | 1 line

NEWS: Mention (1...) in addition to (1..) [DOC]
------------------------------------------------------------------------
r66369 | marcandre | 2018-12-13 04:49:22 +0900 (Thu, 13 Dec 2018) | 3 lines

range.c: Documentation on endless ranges.

Based on patch by Victor Shepelev [DOC] [#7552]
------------------------------------------------------------------------
r66368 | ko1 | 2018-12-13 02:16:02 +0900 (Thu, 13 Dec 2018) | 6 lines

skip a test.

* test/ruby/test_literal.rb (test_debug_frozen_string_in_array_literal):
  skip last test if `RUBY_ISEQ_DUMP_DEBUG` is specified because round-trip
  (iseq <-> binary/array) doesn't support this feature.

------------------------------------------------------------------------
r66367 | ko1 | 2018-12-13 02:12:08 +0900 (Thu, 13 Dec 2018) | 7 lines

param.flags.has_kw flag should be FALSE before setting param.keyword.

* compile.c (ibf_load_iseq_each): iseq_mark assumes that if
  param.flags.has_kw is TRUE, then param.keyword is not NULL.
  To confirm this assumption, make it FALSE before param.keyword
  is initialized.

------------------------------------------------------------------------
r66366 | ko1 | 2018-12-13 00:59:49 +0900 (Thu, 13 Dec 2018) | 5 lines

restore `catch_except_p` flag.

* compile.c: we need to restore `catch_except_p` flag at
  `load_from_binary`. [Bug #15395]

------------------------------------------------------------------------
r66365 | svn | 2018-12-13 00:45:09 +0900 (Thu, 13 Dec 2018) | 1 line

* 2018-12-13
------------------------------------------------------------------------
r66364 | ko1 | 2018-12-13 00:45:06 +0900 (Thu, 13 Dec 2018) | 7 lines

remove `compiled_` prefix. [Feature #15287]

* vm_trace.c: remove `compiled_` prefix from the following methods:
  * `compiled_eval_script`
  * `compiled_instruction_sequence`
  [Feature #15287]

------------------------------------------------------------------------
r66363 | hsbt | 2018-12-12 22:25:29 +0900 (Wed, 12 Dec 2018) | 1 line

Added entry of Psych.
------------------------------------------------------------------------
r66362 | nobu | 2018-12-12 20:43:14 +0900 (Wed, 12 Dec 2018) | 3 lines

Revise Date#hour, #min, #sec

For ActiveSupport.  [ruby-core:90443] [Bug #15403]
------------------------------------------------------------------------
r66361 | mame | 2018-12-12 20:24:15 +0900 (Wed, 12 Dec 2018) | 1 line

test/test_open3.rb: skip a fd redirection test on windows
------------------------------------------------------------------------
r66360 | nobu | 2018-12-12 20:06:48 +0900 (Wed, 12 Dec 2018) | 3 lines

complex.c: new APIs for Complex

[Feature #15066]
------------------------------------------------------------------------
r66359 | nobu | 2018-12-12 20:06:47 +0900 (Wed, 12 Dec 2018) | 6 lines

complex.c: rb_complex_new_polar

* complex.c (rb_complex_new_polar): renamed with _new to clarify
  that it creates a new instance, but is not an instance method.

* complex.c (rb_complex_polar): deprecated.
------------------------------------------------------------------------
r66358 | hsbt | 2018-12-12 18:40:06 +0900 (Wed, 12 Dec 2018) | 1 line

Bump version to 1.3.0 same as the latest version of rubygems.org.
------------------------------------------------------------------------
r66357 | hsbt | 2018-12-12 16:57:42 +0900 (Wed, 12 Dec 2018) | 1 line

Bump library version same as released version of rubygems.org
------------------------------------------------------------------------
r66356 | hsbt | 2018-12-12 16:41:10 +0900 (Wed, 12 Dec 2018) | 3 lines

Backport https://github.com/ruby/irb/pull/2

  Fix and improve version string by @stomar
------------------------------------------------------------------------
r66355 | duerst | 2018-12-12 16:37:16 +0900 (Wed, 12 Dec 2018) | 4 lines

Enhance Proc docs [Misc #14610]

From: Victor Shepelev <zverok.offline@gmail.com>

------------------------------------------------------------------------
r66354 | hsbt | 2018-12-12 16:34:16 +0900 (Wed, 12 Dec 2018) | 1 line

Backport https://github.com/ruby/shell/pull/1
------------------------------------------------------------------------
r66353 | mrkn | 2018-12-12 16:16:07 +0900 (Wed, 12 Dec 2018) | 4 lines

enumerator.c: Add rb_arithmetic_sequence_components_t

Add rb_arithmetic_sequence_components_t struct for encapsulating
the components of ArithmeticSequence.
------------------------------------------------------------------------
r66352 | akr | 2018-12-12 15:48:46 +0900 (Wed, 12 Dec 2018) | 14 lines

open3.rb don't use keyword splat (**).

revert r43582, r49173 and r49177.

open3 arguments uses spawn-like keyword arguments.
Both symbol and integer keys are used.
```
Open3.capture2(*command, :in => IO::NULL, 3 => IO::NULL)
``

This style cannot be supported with keyword splat (**) since Ruby 2.6.
Because Ruby 2.6 prohibits symbol/non-symbol key hash separation.


------------------------------------------------------------------------
r66351 | mrkn | 2018-12-12 15:39:58 +0900 (Wed, 12 Dec 2018) | 4 lines

enumerator.c: rb_arithmetic_sequence_extract

New public C-API for extracting components of Enumerator::ArithmeticSequence
or Range.
------------------------------------------------------------------------
r66350 | naruse | 2018-12-12 15:10:29 +0900 (Wed, 12 Dec 2018) | 3 lines

Enchance MatchData docs [Bug #14450]

From: Victor Shepelev <zverok.offline@gmail.com>
------------------------------------------------------------------------
r66349 | nobu | 2018-12-12 14:46:13 +0900 (Wed, 12 Dec 2018) | 1 line

Disable tailcall optimization [Bug #15303]
------------------------------------------------------------------------
r66348 | akr | 2018-12-12 14:38:59 +0900 (Wed, 12 Dec 2018) | 2 lines

mention Pathname change.

------------------------------------------------------------------------
r66347 | hsbt | 2018-12-12 14:07:50 +0900 (Wed, 12 Dec 2018) | 4 lines

Merge rubygems@21f12a8 from upstream.

  * [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions https://github.com/rubygems/rubygems/pull/2515
  * Fix broken symlink that points to ../* https://github.com/rubygems/rubygems/pull/2516
------------------------------------------------------------------------
r66346 | akr | 2018-12-12 14:07:49 +0900 (Wed, 12 Dec 2018) | 18 lines

Use File class methods to avoid pipe execution


Following methods use corresponding File class methods
instead of IO class methods.

- Pathname#each_line
- Pathname#read
- Pathname#binread
- Pathname#write
- Pathname#binwrite
- Pathname#readlines

Reported by ooooooo_q.




------------------------------------------------------------------------
r66345 | samuel | 2018-12-12 11:31:26 +0900 (Wed, 12 Dec 2018) | 1 line

Fix location of NEWS for native coroutine.
------------------------------------------------------------------------
r66344 | k0kubun | 2018-12-12 09:38:49 +0900 (Wed, 12 Dec 2018) | 7 lines

bootstraptest/runner.rb: increase timeout for --jit-wait

because test_io.rb:33 randomly fails
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1519055

checking MJIT.enabled? on driver might not make sense for target, but as
long as the CI is -DMJIT_FORCE_ENABLE, I believe it works for now.
------------------------------------------------------------------------
r66343 | hsbt | 2018-12-12 09:17:59 +0900 (Wed, 12 Dec 2018) | 1 line

Update version number on Bundler section.
------------------------------------------------------------------------
r66342 | samuel | 2018-12-12 08:56:26 +0900 (Wed, 12 Dec 2018) | 1 line

Explain which architectures are supported in NEWS.
------------------------------------------------------------------------
r66341 | samuel | 2018-12-12 08:49:33 +0900 (Wed, 12 Dec 2018) | 1 line

Ensure x86 stack is fortified, fixed #15335.
------------------------------------------------------------------------
r66340 | svn | 2018-12-12 08:49:32 +0900 (Wed, 12 Dec 2018) | 1 line

* 2018-12-12
------------------------------------------------------------------------
r66339 | samuel | 2018-12-12 08:49:29 +0900 (Wed, 12 Dec 2018) | 1 line

Add NEWS about coroutine implementation.
------------------------------------------------------------------------
r66338 | hsbt | 2018-12-11 20:02:41 +0900 (Tue, 11 Dec 2018) | 1 line

Merge Bundler 1.17.2 from upstream.
------------------------------------------------------------------------
r66337 | naruse | 2018-12-11 19:55:07 +0900 (Tue, 11 Dec 2018) | 1 line

Same as r66334 add Errno::EISDIR
------------------------------------------------------------------------
r66336 | normal | 2018-12-11 18:49:31 +0900 (Tue, 11 Dec 2018) | 6 lines

test/dtrace: use TracePoint.__enable

"TracePoint.enable" is implemented in prelude.rb since
r66003 / commit 96990203b71184003cf8a9bad5cc177645820fd4
and not available in miniruby.  I tried using regular "ruby"
for testing, but it proved noisy and caused test failures.
------------------------------------------------------------------------
r66335 | normal | 2018-12-11 18:49:26 +0900 (Tue, 11 Dec 2018) | 4 lines

test/dtrace: improve diagnostics

These will help us track down test failures more easily
(on FreeBSD 11.2)
------------------------------------------------------------------------
r66334 | naruse | 2018-12-11 17:44:00 +0900 (Tue, 11 Dec 2018) | 3 lines

CentOS-7 (1810)'s header has O_TMPFILE but kernel doesn't support it

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181206T080003Z.diff.html.gz
------------------------------------------------------------------------
r66333 | ko1 | 2018-12-11 16:31:23 +0900 (Tue, 11 Dec 2018) | 1 line

remove unused (redundant) chapter names
------------------------------------------------------------------------
r66332 | mame | 2018-12-11 15:35:40 +0900 (Tue, 11 Dec 2018) | 3 lines

doc/contributing.rdoc: remove IA-64 from active platform list

Now takano32-san has no IA-64 machine for test.
------------------------------------------------------------------------
r66331 | nobu | 2018-12-11 14:09:35 +0900 (Tue, 11 Dec 2018) | 1 line

test/date: removed unnecessaruy `__send__`
------------------------------------------------------------------------
r66330 | nobu | 2018-12-11 14:09:34 +0900 (Tue, 11 Dec 2018) | 1 line

ext/date: Fix !NDEBUG code
------------------------------------------------------------------------
r66329 | nobu | 2018-12-11 13:35:13 +0900 (Tue, 11 Dec 2018) | 5 lines

date_core.c: moved some methods to DateTime

* ext/date/date_core.c (Init_date_core): moved methods which make
  sense only for DateTime to that class, instead of defining
  private methods in Date and making them public in DateTime.
------------------------------------------------------------------------
r66328 | nobu | 2018-12-11 13:30:31 +0900 (Tue, 11 Dec 2018) | 4 lines

date_core.c: reorder ComplexDateData

* ext/date/date_core.c (ComplexDateData): reordered to adjust
  common part with SimpleDateData.
------------------------------------------------------------------------
r66327 | mame | 2018-12-11 13:26:04 +0900 (Tue, 11 Dec 2018) | 1 line

NEWS: add a ticket number
------------------------------------------------------------------------
r66326 | nobu | 2018-12-11 13:14:31 +0900 (Tue, 11 Dec 2018) | 5 lines

Fix infinite loop by ensure

* compile.c (iseq_insert_nop_between_end_and_cont): insert nop so
  that the end of rescue and continuing points are not same, to
  get rid of infinite loop.  [Bug #15385]
------------------------------------------------------------------------
r66325 | svn | 2018-12-11 13:13:13 +0900 (Tue, 11 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66324 | nobu | 2018-12-11 13:13:09 +0900 (Tue, 11 Dec 2018) | 1 line

Modify insn list only when compiling
------------------------------------------------------------------------
r66323 | hsbt | 2018-12-11 12:07:37 +0900 (Tue, 11 Dec 2018) | 5 lines

Downgrade Bundler 1.17.x from 2.0.0.

  We have the platform issue on heroku:
    * https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305
    * https://github.com/heroku/heroku-buildpack-ruby/issues/833
------------------------------------------------------------------------
r66322 | duerst | 2018-12-11 09:44:24 +0900 (Tue, 11 Dec 2018) | 1 line

add clarification about details of update to Unicode 11.0.0 [ci skip]
------------------------------------------------------------------------
r66321 | nobu | 2018-12-11 09:36:46 +0900 (Tue, 11 Dec 2018) | 4 lines

ReFix r663197

Stringify after downcase, to restrict arguments.
[Bug#15394]
------------------------------------------------------------------------
r66320 | nobu | 2018-12-11 09:05:53 +0900 (Tue, 11 Dec 2018) | 1 line

Fix r663197
------------------------------------------------------------------------
r66319 | naruse | 2018-12-11 08:54:14 +0900 (Tue, 11 Dec 2018) | 5 lines

Preserve HTTP header key as string [Bug #15394]

to prevent send Host header twice accidentally.

From: Sangyong Sim <sangyong-sim@cookpad.com>
------------------------------------------------------------------------
r66318 | kazu | 2018-12-11 08:52:59 +0900 (Tue, 11 Dec 2018) | 1 line

Sort [ci skip]
------------------------------------------------------------------------
r66317 | nobu | 2018-12-11 08:40:14 +0900 (Tue, 11 Dec 2018) | 5 lines

Add the deprecation of flip-flops to NEWS page [ci skip]

[Fix GH-2047]

From: Junichi Ito <jit@sonicgarden.jp>
------------------------------------------------------------------------
r66316 | svn | 2018-12-11 08:23:00 +0900 (Tue, 11 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66315 | odaira | 2018-12-11 08:22:56 +0900 (Tue, 11 Dec 2018) | 7 lines

Native coroutine implementation for ppc64le Linux

* configure.ac: enable fiber coroutine for powerpc64le-linux

* coroutine/ppc64le/Context.S: coroutine_transfer implementation

* coroutine/ppc64le/Context.h: coroutine implementation
------------------------------------------------------------------------
r66314 | duerst | 2018-12-11 08:12:12 +0900 (Tue, 11 Dec 2018) | 9 lines

add a test to make sure some unassigned codepoints do not get converted

In test/ruby/enc/test_case_mapping.rb, add a test to make sure the
unassigned codepoints in the Georgian MTAVRULI range (U+1CBB, U+1CBC)
do not get converted to unrelated codepoints by String#capitalize.
(It turns out that this test was not strictly necessary, because
unassigned codepoints are already excluded by the fact that they are
not found in the onigenc_unicode_fold_lookup table. So this test only
serves to check against future regressions.)
------------------------------------------------------------------------
r66313 | svn | 2018-12-11 00:48:49 +0900 (Tue, 11 Dec 2018) | 1 line

* 2018-12-11
------------------------------------------------------------------------
r66312 | naruse | 2018-12-11 00:48:45 +0900 (Tue, 11 Dec 2018) | 1 line

fix r66311
------------------------------------------------------------------------
r66311 | naruse | 2018-12-10 22:58:36 +0900 (Mon, 10 Dec 2018) | 1 line

Define HAVE_STMT_AND_DECL_IN_EXPR and use it [Bug #15293]
------------------------------------------------------------------------
r66310 | nobu | 2018-12-10 21:43:16 +0900 (Mon, 10 Dec 2018) | 1 line

LEGAL: gathered util.c [ci skip]
------------------------------------------------------------------------
r66308 | usa | 2018-12-10 16:11:18 +0900 (Mon, 10 Dec 2018) | 5 lines

Net::ReadTimeout and Net::WriteTimeout should tell the cause socket

* lib/net/protocol.rb (ReadTimeout, WriteTimeout): Net::ReadTimeout and Net::WriteTimeout should tell the cause socket
  [Feature #14832] [ruby-core:87440]

------------------------------------------------------------------------
r66307 | nobu | 2018-12-10 11:58:01 +0900 (Mon, 10 Dec 2018) | 1 line

win32/Makefile.sub: missing dependency of mjit_config.h
------------------------------------------------------------------------
r66306 | nobu | 2018-12-10 11:01:21 +0900 (Mon, 10 Dec 2018) | 4 lines

Initialize bin

* hash.c (linear_update): initialize `bin` just to silence false
  warnings by old gcc 4.8.  [Bug #15299]
------------------------------------------------------------------------
r66305 | nobu | 2018-12-10 10:58:28 +0900 (Mon, 10 Dec 2018) | 5 lines

Limit uplevel travarsing

* tool/vcs.rb (VCS.detect): limit level of travarsing parent
  directories, 0 by the default.  curretly always detecting at the
  source directory itself.
------------------------------------------------------------------------
r66304 | nobu | 2018-12-10 10:58:27 +0900 (Mon, 10 Dec 2018) | 4 lines

Detection order

* tool/vcs.rb (VCS.detect): detect each VCS while travarsing
  parent directories.
------------------------------------------------------------------------
r66303 | nobu | 2018-12-10 10:57:48 +0900 (Mon, 10 Dec 2018) | 1 line

Updated dates in man pages
------------------------------------------------------------------------
r66302 | svn | 2018-12-10 09:05:44 +0900 (Mon, 10 Dec 2018) | 1 line

* 2018-12-10
------------------------------------------------------------------------
r66301 | nobu | 2018-12-10 09:05:43 +0900 (Mon, 10 Dec 2018) | 32 lines

Remove unnecessary require of fileutils

Today I updated my ruby core clone, and I run the usual steps to compile
ruby. When running "make", I run into the following error:

```
(... stuff ...)
encdb.h unchanged
Traceback (most recent call last):
	5: from ./tool/mkconfig.rb:19:in `<main>'
	4: from ./tool/mkconfig.rb:19:in `require'
	3: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `<top (required)>'
	2: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `require'
	1: from /home/deivid/Code/ruby/rbconfig.rb:11:in `<top (required)>'
/home/deivid/Code/ruby/rbconfig.rb:13:in `<module:RbConfig>': ruby lib version (2.5.0) doesn't match executable version (2.6.0) (RuntimeError)
uncommon.mk:780: recipe for target '.rbconfig.time' failed
make: *** [.rbconfig.time] Error 1
```

Apparently, the script that generates the root `rbconfig.rb` file requires
`fileutils`, which in turn requires 'rbconfig' (for mjit-headers it says in a
comment), which uses the `rbconfig.rb` config file in the root folder if it
exists. In my case, this file existed but had been generated on 2.5.0, thus
causing the error.

I think we can avoid this sort of circular dependency by not requiring
`fileutils`, since it does not seem to be used anywhere in the
`tool/mkconfig.rb` script since r55338.

[Fix GH-2045]

From: David Rodriguez <deivid.rodriguez@riseup.net>
------------------------------------------------------------------------
r66300 | duerst | 2018-12-10 08:14:29 +0900 (Mon, 10 Dec 2018) | 31 lines

implement special behavior for Georgian for String#capitalize

The modern Georgian script is special in that it has an 'uppercase'
variant called MTAVRULI which can be used for emphasis of whole words,
for screamy headlines, and so on. However, in contrast to all other
bicameral scripts, there is no usage of capitalizing the first letter
in a word or a sentence. Words with mixed capitalization are not used
at all.

We therefore implement special behavior for String#capitalize. Formally,
we define String#capitalize as first applying String#downcase for the
whole string, then using titlecase on the first letter. Because Georgian
defines titlecase as the identity function both for MTAVRULI ('uppercase')
and Mkhedruli (lowercase), this results in String#capitalize being
equivalent to String#downcase for Georgian. This avoids undesirable
mixed case.

* enc/unicode.c: Actual implementation

* string.c: Add mention of this special case for documentation

* test/ruby/enc/test_case_mapping.rb: Add two tests, a general one
  that uses String#capitalize on some (including nonsensical)
  combinations of MTAVRULI and Mkhedruli, and a canary test to
  detect the potential assignment of characters to the currently
  open slots (holes) at U+1CBB and U+1CBC.

* test/ruby/enc/test_case_comprehensive.rb: Tweak generation of
  expectation data.

Together with r65933, this closes issue #14839.
------------------------------------------------------------------------
r66299 | k0kubun | 2018-12-09 21:35:13 +0900 (Sun, 09 Dec 2018) | 3 lines

test/rdoc/minitest_helper.rb: partially revert r66286

to resurrect r65613
------------------------------------------------------------------------
r66296 | nobu | 2018-12-09 11:08:56 +0900 (Sun, 09 Dec 2018) | 1 line

Break lines in LEGAL texts [ci skip]
------------------------------------------------------------------------
r66295 | duerst | 2018-12-09 11:02:45 +0900 (Sun, 09 Dec 2018) | 5 lines

delete Unicode 10.0.0 related files, no longer needed [#14802]
This line, and those below, will be ignored--

D    enc/unicode/10.0.0

------------------------------------------------------------------------
r66294 | nobu | 2018-12-09 10:53:14 +0900 (Sun, 09 Dec 2018) | 1 line

Blockquote LEGAL [ci skip]
------------------------------------------------------------------------
r66293 | nobu | 2018-12-09 10:34:23 +0900 (Sun, 09 Dec 2018) | 1 line

raise instead of rb_bug
------------------------------------------------------------------------
r66292 | nobu | 2018-12-09 10:22:16 +0900 (Sun, 09 Dec 2018) | 4 lines

Removed never-happening case

get_uniq_filename never returns NULL but raises an exception on
failure.
------------------------------------------------------------------------
r66291 | normal | 2018-12-09 07:04:43 +0900 (Sun, 09 Dec 2018) | 6 lines

Revert "thread_pthread.c: fix memory leak from fork loop leapfrog (v2)"

This reverts r66290 / commit 043047a8fd5315d98eac38ddbd04ebe8db361817.

Still fails on CI, and I'm not able to reproduce the failure, either :<
http://ci.rvm.jp/results/trunk-test@ruby-sky1/1508228
------------------------------------------------------------------------
r66290 | normal | 2018-12-09 06:45:50 +0900 (Sun, 09 Dec 2018) | 26 lines

thread_pthread.c: fix memory leak from fork loop leapfrog (v2)

Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.

v2: disarm before timer_delete

==> fork_leapfrog.rb <==
require 'io/wait'
Dir.chdir '/proc'
prev = 0
loop do
  pid = fork
  exit!(0) if pid

  # show the number of 4K pages used (Linux-only)
  n = File.read("#$$/statm").split(-' ')[1].to_i
  if n > prev
    puts "#{prev} => #{n}"
    prev = n
  end

  # since Ctrl-C from a terminal can't stop this loop,
  # allow the user to just hit any key to stop
  break if STDIN.wait(0)
end
------------------------------------------------------------------------
r66289 | normal | 2018-12-09 05:36:32 +0900 (Sun, 09 Dec 2018) | 5 lines

Revert "thread_pthread.c: fix memory leak from fork loop leapfrog"

Oops, CI failures...

This reverts r66288 / commit 2b1dcc1dd1eb260fd20ff1e6e0dfb0e5624a3cc6.
------------------------------------------------------------------------
r66288 | normal | 2018-12-09 04:25:37 +0900 (Sun, 09 Dec 2018) | 24 lines

thread_pthread.c: fix memory leak from fork loop leapfrog

Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.

==> fork_leapfrog.rb <==
require 'io/wait'
Dir.chdir '/proc'
prev = 0
loop do
  pid = fork
  exit!(0) if pid

  # show the number of 4K pages used (Linux-only)
  n = File.read("#$$/statm").split(-' ')[1].to_i
  if n > prev
    puts "#{prev} => #{n}"
    prev = n
  end

  # since Ctrl-C from a terminal can't stop this loop,
  # allow the user to just hit any key to stop
  break if STDIN.wait(0)
end
------------------------------------------------------------------------
r66287 | svn | 2018-12-09 02:39:54 +0900 (Sun, 09 Dec 2018) | 1 line

* 2018-12-09
------------------------------------------------------------------------
r66286 | aycabta | 2018-12-09 02:39:52 +0900 (Sun, 09 Dec 2018) | 1 line

Merge RDoc 6.1.0.beta3 from upstream
------------------------------------------------------------------------
r66284 | nobu | 2018-12-08 15:52:21 +0900 (Sat, 08 Dec 2018) | 1 line

Duplicate header name only if found
------------------------------------------------------------------------
r66283 | nobu | 2018-12-08 12:32:39 +0900 (Sat, 08 Dec 2018) | 1 line

Fix compile error at r66280
------------------------------------------------------------------------
r66282 | nobu | 2018-12-08 11:20:14 +0900 (Sat, 08 Dec 2018) | 3 lines

Honor configured ruby header locations as the MJIT header path

[Bug #15391]
------------------------------------------------------------------------
r66281 | nobu | 2018-12-08 11:05:06 +0900 (Sat, 08 Dec 2018) | 4 lines

Removed unnecessary dependency on mjit_config.h

MJIT_MIN_HEADER is passed via a command line option for
mjit_build_dir.so.
------------------------------------------------------------------------
r66280 | nobu | 2018-12-08 10:50:39 +0900 (Sat, 08 Dec 2018) | 5 lines

Give the MJIT header path name

Give the whole MJIT header path name by preloaded shared library
mjit_build_dir.so, than building the path from a given directory
name and the embedded base name.
------------------------------------------------------------------------
r66279 | nobu | 2018-12-08 10:49:02 +0900 (Sat, 08 Dec 2018) | 1 line

Use BUILDDIR in ruby-runner.h from config.status
------------------------------------------------------------------------
r66278 | svn | 2018-12-08 01:48:23 +0900 (Sat, 08 Dec 2018) | 1 line

* 2018-12-08
------------------------------------------------------------------------
r66277 | nobu | 2018-12-08 01:48:21 +0900 (Sat, 08 Dec 2018) | 1 line

Fix memory leak when failed to build pch path
------------------------------------------------------------------------
r66276 | nobu | 2018-12-07 23:37:28 +0900 (Fri, 07 Dec 2018) | 1 line

Array#any? just returns true/false
------------------------------------------------------------------------
r66275 | suke | 2018-12-07 21:12:45 +0900 (Fri, 07 Dec 2018) | 8 lines

should not use Internet Explorer

* spec/ruby/library/win32ole/fixtures/classes.rb: add
  SYSTEM_MONITOR_CONTROL_AVAILABLE.

* spec/ruby/library/win32ole/win32ole_method/event_spec.rb: Internet
  Explorer is not available in some environment. Instead, try to use
  System Monitor Control.
------------------------------------------------------------------------
r66274 | nobu | 2018-12-07 21:03:16 +0900 (Fri, 07 Dec 2018) | 4 lines

Adjust reserved hash values

The reserved hash values in hash.c must be consistend with st.c.
[ruby-core:90356] [Bug #15389]
------------------------------------------------------------------------
r66273 | nobu | 2018-12-07 20:45:03 +0900 (Fri, 07 Dec 2018) | 1 line

Should use the proper constant
------------------------------------------------------------------------
r66272 | hsbt | 2018-12-07 19:00:21 +0900 (Fri, 07 Dec 2018) | 1 line

Bump rake-12.3.2 on bundled gems.
------------------------------------------------------------------------
r66271 | duerst | 2018-12-07 18:01:13 +0900 (Fri, 07 Dec 2018) | 1 line

replace hardcoded emoji version by RbConfig::CONFIG['UNICODE_EMOJI_VERSION']
------------------------------------------------------------------------
r66270 | nobu | 2018-12-07 17:51:26 +0900 (Fri, 07 Dec 2018) | 1 line

Add UNICODE_EMOJI_VERSION to RbConfig [Feature #15341]
------------------------------------------------------------------------
r66269 | duerst | 2018-12-07 16:20:26 +0900 (Fri, 07 Dec 2018) | 7 lines

convert check for array length to assertion and comment out

In regparse.c, in function node_extended_grapheme_cluster,
we used a raw if() with exit(1) as a cross-check for our
length calculations for the common node array. Convert this
to an assertion and comment it out because it is not needed
for active code.
------------------------------------------------------------------------
r66268 | normal | 2018-12-07 16:09:31 +0900 (Fri, 07 Dec 2018) | 19 lines

zlib (gzfile_write_raw): do not resize string after .write call

Apparently, a component of Rails implements a buffering .write
method which keeps the String buffer around and makes it unsafe
for us to clear it after calling .write.

This caused Rack::Deflater to give empty results when enabled.

Fortunately, per r61631 / a55abcc0ca6f628fc05304f81e5a044d65ab4a68,
this misguided optimization was only worth a small (0.5MB) savings
and we still benefit from the majority of the memory savings in
that change.

Thanks to zunda for the bug report.

[ruby-core:90133] [Bug #15356]

Fixes: r61631 (commit a55abcc0ca6f628fc05304f81e5a044d65ab4a68)
       ("zlib: reduce garbage on gzip writes (deflate)")
------------------------------------------------------------------------
r66267 | duerst | 2018-12-07 16:04:00 +0900 (Fri, 07 Dec 2018) | 9 lines

remove code duplication and put everything into forward order

In file regparse.c, in function node_extended_grapheme_cluster(),
eliminate code duplication of CRLF and '.' (any character). This
uses the fact that both for Unicode encodings and for non-Unicode
encodings, the first alternative is CRLF, and the last alternative
is '.' (any character). This puts all of the pieces into forward
order (the order of the code follows the order of the syntax
definition).
------------------------------------------------------------------------
r66266 | nobu | 2018-12-07 10:42:03 +0900 (Fri, 07 Dec 2018) | 1 line

Dump the tested timestamp itself
------------------------------------------------------------------------
r66265 | nobu | 2018-12-07 08:51:45 +0900 (Fri, 07 Dec 2018) | 1 line

Dump more timestamps
------------------------------------------------------------------------
r66264 | k0kubun | 2018-12-07 08:26:53 +0900 (Fri, 07 Dec 2018) | 1 line

accept_loop_spec.rb: avoid random hang
------------------------------------------------------------------------
r66263 | k0kubun | 2018-12-07 08:16:01 +0900 (Fri, 07 Dec 2018) | 5 lines

test_gem_package_task.rb: suppress random failure

by Bundler.

http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/1500762
------------------------------------------------------------------------
r66262 | nobu | 2018-12-07 08:06:13 +0900 (Fri, 07 Dec 2018) | 3 lines

Warn redefinitions of some methods on Object

[Bug #5473] [Bug #14670] [Bug #15382]
------------------------------------------------------------------------
r66261 | nobu | 2018-12-07 08:03:54 +0900 (Fri, 07 Dec 2018) | 1 line

Show the class of the receiver [Feature #15231]
------------------------------------------------------------------------
r66260 | suke | 2018-12-07 06:56:55 +0900 (Fri, 07 Dec 2018) | 5 lines

should not use Microsoft Internet Controller

* spec/ruby/library/win32ole/win32ole_method/helpcontext_spec.rb:
  Use FileSystemObject. Microsoft Internet Explorer is not available
  in some environment.
------------------------------------------------------------------------
r66259 | svn | 2018-12-07 03:28:26 +0900 (Fri, 07 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66258 | tenderlove | 2018-12-07 03:28:21 +0900 (Fri, 07 Dec 2018) | 111 lines

Speed up hash literals by duping

This commit replaces the `newhashfromarray` instruction with a `duphash`
instruction.  Instead of allocating a new hash from an array stored in
the Instruction Sequences, store a hash directly in the instruction
sequences and dup it on execution.

== Instruction sequence changes ==

```ruby
code = <<-eorby
  { "foo" => "bar", "baz" => "lol" }
eorby

insns = RubyVM::InstructionSequence.compile(code, __FILE__, nil, 0, frozen_string_literal: true)
puts insns.disasm
```

On Ruby 2.5:

```
== disasm: #<ISeq:<compiled>@test.rb:0 (0,0)-(0,36)>====================
0000 putobject        "foo"
0002 putobject        "bar"
0004 putobject        "baz"
0006 putobject        "lol"
0008 newhash          4
0010 leave
```

Ruby 2.6@r66174 3b6321083a2e3525da3b34d08a0b68bac094bd7f:

```
$ ./ruby test.rb
== disasm: #<ISeq:<compiled>@test.rb:0 (0,0)-(0,36)> (catch: FALSE)
0000 newhashfromarray             2, ["foo", "bar", "baz", "lol"]
0003 leave
```

Ruby 2.6 + This commit:

```
$ ./ruby test.rb
== disasm: #<ISeq:<compiled>@test.rb:0 (0,0)-(0,36)> (catch: FALSE)
0000 duphash                      {"foo"=>"bar", "baz"=>"lol"}
0002 leave
```

== Benchmark Results ==

Compared to 2.5.3:

```
$ make benchmark ITEM=hash_literal_small COMPARE_RUBY=/Users/aaron/.rbenv/versions/2.5.3/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
./revision.h unchanged
/Users/aaron/.rbenv/shims/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
	            --executables="compare-ruby::/Users/aaron/.rbenv/versions/2.5.3/bin/ruby -I.ext/common --disable-gem" \
	            --executables="built-ruby::./miniruby -I./lib -I. -I.ext/common  -r./prelude --disable-gem" \
	            $(find ./benchmark -maxdepth 1 -name '*hash_literal_small*.yml' -o -name '*hash_literal_small*.rb' | sort)
Calculating -------------------------------------
                     compare-ruby  built-ruby
 hash_literal_small2        1.498       1.877 i/s -       1.000 times in 0.667581s 0.532656s
 hash_literal_small4        1.197       1.642 i/s -       1.000 times in 0.835375s 0.609160s
 hash_literal_small8        0.620       1.215 i/s -       1.000 times in 1.611638s 0.823090s

Comparison:
              hash_literal_small2
          built-ruby:         1.9 i/s
        compare-ruby:         1.5 i/s - 1.25x  slower

              hash_literal_small4
          built-ruby:         1.6 i/s
        compare-ruby:         1.2 i/s - 1.37x  slower

              hash_literal_small8
          built-ruby:         1.2 i/s
        compare-ruby:         0.6 i/s - 1.96x  slower
```

Compared to r66255

```
$ make benchmark ITEM=hash_literal_small COMPARE_RUBY=/Users/aaron/.rbenv/versions/ruby-trunk/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
./revision.h unchanged
/Users/aaron/.rbenv/shims/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
	            --executables="compare-ruby::/Users/aaron/.rbenv/versions/ruby-trunk/bin/ruby -I.ext/common --disable-gem" \
	            --executables="built-ruby::./miniruby -I./lib -I. -I.ext/common  -r./prelude --disable-gem" \
	            $(find ./benchmark -maxdepth 1 -name '*hash_literal_small*.yml' -o -name '*hash_literal_small*.rb' | sort)
Calculating -------------------------------------
                     compare-ruby  built-ruby
 hash_literal_small2        1.567       1.831 i/s -       1.000 times in 0.638056s 0.546039s
 hash_literal_small4        1.298       1.652 i/s -       1.000 times in 0.770214s 0.605182s
 hash_literal_small8        0.873       1.216 i/s -       1.000 times in 1.145304s 0.822047s

Comparison:
              hash_literal_small2
          built-ruby:         1.8 i/s
        compare-ruby:         1.6 i/s - 1.17x  slower

              hash_literal_small4
          built-ruby:         1.7 i/s
        compare-ruby:         1.3 i/s - 1.27x  slower

              hash_literal_small8
          built-ruby:         1.2 i/s
        compare-ruby:         0.9 i/s - 1.39x  slower
```
------------------------------------------------------------------------
r66257 | svn | 2018-12-07 03:20:12 +0900 (Fri, 07 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66256 | tenderlove | 2018-12-07 03:20:11 +0900 (Fri, 07 Dec 2018) | 3 lines

Add benchmark for hash small literals

Co-Authored-By: Krzysztof Rybka <krzysztof.rybka@gmail.com>
------------------------------------------------------------------------
r66255 | svn | 2018-12-07 00:33:56 +0900 (Fri, 07 Dec 2018) | 1 line

* 2018-12-07
------------------------------------------------------------------------
r66254 | naruse | 2018-12-07 00:33:54 +0900 (Fri, 07 Dec 2018) | 4 lines

Add missing declaration to export

Additional fix for r66200:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181206T130002Z.fail.html.gz
------------------------------------------------------------------------
r66252 | ko1 | 2018-12-06 22:56:36 +0900 (Thu, 06 Dec 2018) | 1 line

add NEWS entries about script_compiled event
------------------------------------------------------------------------
r66251 | ko1 | 2018-12-06 22:53:48 +0900 (Thu, 06 Dec 2018) | 1 line

add tests for script_compiled TP event.
------------------------------------------------------------------------
r66250 | svn | 2018-12-06 22:42:35 +0900 (Thu, 06 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66249 | ko1 | 2018-12-06 22:42:32 +0900 (Thu, 06 Dec 2018) | 14 lines

`script_compiled` TracePoint event [Feature #15287]

* vm_trace.c: add `script_compiled` event. This event invoked
  after script compiling and before evaluating compiled script.
  Also the following methods are added:

  `TracePoint#compiled_instruction_sequence` method to get compiled
  `RubyVM::InstructionSequence` instance.

  `TracePoint#compiled_eval_script` method to get compiled script (String)
  by *eval methods (return nil if compiling by file).

* vm_trace.c (tracepoint_attr_raised_exception):

------------------------------------------------------------------------
r66248 | hsbt | 2018-12-06 22:19:06 +0900 (Thu, 06 Dec 2018) | 1 line

Added News entries about RubyGems and Bundler.
------------------------------------------------------------------------
r66247 | naruse | 2018-12-06 21:35:00 +0900 (Thu, 06 Dec 2018) | 1 line

Should be true fix for r66200
------------------------------------------------------------------------
r66246 | ko1 | 2018-12-06 19:52:27 +0900 (Thu, 06 Dec 2018) | 18 lines

Return same ISeq object for one src.

* iseq.c: before this patch, RubyVM::InstructionSequence.of(src) (ISeq in
  short) returns different ISeq (wrapper) objects point to one ISeq internal
  object. This patch changes this behavior to cache created ISeq (wrapper)
  objects and return same ISeq object for an internal ISeq object.

* iseq.h (ISEQ_EXECUTABLE_P): introduced to check executable ISeq objects.

* iseq.h (ISEQ_COMPILE_DATA_ALLOC): reordr setting flag line to avoid
  ISEQ_USE_COMPILE_DATA but compiled_data == NULL case.

* vm_core.h (rb_iseq_t): introduce `rb_iseq_t::wrapper` and
  `rb_iseq_t::aux::exec`.  Move `rb_iseq_t::local_hooks` to
  `rb_iseq_t::aux::exec::local_hooks`.

* test/ruby/test_iseq.rb: add ISeq.of() tests.

------------------------------------------------------------------------
r66245 | naruse | 2018-12-06 19:42:35 +0900 (Thu, 06 Dec 2018) | 1 line

suppress warning: unused variable 'vbits'
------------------------------------------------------------------------
r66244 | normal | 2018-12-06 19:41:07 +0900 (Thu, 06 Dec 2018) | 4 lines

io.c (io_fflush): eliminate redundant rb_io_check_closed

There is no need to call this function twice in a row since
thread switching won't happen in-between calls to it.
------------------------------------------------------------------------
r66243 | normal | 2018-12-06 19:09:35 +0900 (Thu, 06 Dec 2018) | 1 line

NEWS: fix typo (maesured => measured) [ci skip]
------------------------------------------------------------------------
r66242 | normal | 2018-12-06 19:09:30 +0900 (Thu, 06 Dec 2018) | 5 lines

io.c (io_write_nonblock): add RB_GC_GUARD, io_fflush may switch threads

Since io_fflush may block on mutex or rb_io_wait_readable and
switch threads, we need to ensure the `str' VALUE returned by
`rb_obj_as_string` is visible to GC.
------------------------------------------------------------------------
r66241 | naruse | 2018-12-06 19:02:04 +0900 (Thu, 06 Dec 2018) | 4 lines

refix of r66200

Though internal.h has the prototype, it still shows symbol lookup error...
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181206T050002Z.fail.html.gz
------------------------------------------------------------------------
r66240 | duerst | 2018-12-06 18:54:09 +0900 (Thu, 06 Dec 2018) | 1 line

remove an unused variable
------------------------------------------------------------------------
r66239 | duerst | 2018-12-06 18:16:43 +0900 (Thu, 06 Dec 2018) | 6 lines

make sure all nodes are freed on error in node_extended_grapheme_cluster()

regparse.c: In function node_extended_grapheme_cluster(), use function-global
array node_common and use it for list and alternate construction. This is done
so that in case of error, all nodes that have already been constructed can be
correctly freed in a single for loop. Document the layout structure.
------------------------------------------------------------------------
r66238 | nobu | 2018-12-06 16:49:24 +0900 (Thu, 06 Dec 2018) | 4 lines

Prefer rb_check_arity when 0 or 1 arguments

Especially over checking argc then calling rb_scan_args just to
raise an ArgumentError.
------------------------------------------------------------------------
r66237 | mame | 2018-12-06 15:40:54 +0900 (Thu, 06 Dec 2018) | 1 line

load.c (RubyVM.resolve_feature_path): New method.  [Feature #15230]
------------------------------------------------------------------------
r66236 | nobu | 2018-12-06 14:29:07 +0900 (Thu, 06 Dec 2018) | 1 line

Show diff in failure messages
------------------------------------------------------------------------
r66235 | nobu | 2018-12-06 14:29:04 +0900 (Thu, 06 Dec 2018) | 1 line

Add separator for test/-ext-
------------------------------------------------------------------------
r66234 | duerst | 2018-12-06 13:46:57 +0900 (Thu, 06 Dec 2018) | 13 lines

remove code duplication and streamline identifiers

In regparse.c:

* Reduce coode duplication by merging the almost identical functions
  create_sequence_node and create_alternate_node into a new function
  create_node_from_array, adding a parameter that distinguishes  between
  creating a list and creating an alternative.

* Streamline variable/function naming. Unicode UAX #29 uses 'sequence', but
  the regular expression library uses 'list' for the same concept. Keep
  'sequence' in the ccmments that are taken from UAX #29, but use 'list'
  in variable names.
------------------------------------------------------------------------
r66233 | naruse | 2018-12-06 11:57:04 +0900 (Thu, 06 Dec 2018) | 1 line

fix r66200 again
------------------------------------------------------------------------
r66232 | duerst | 2018-12-06 09:05:08 +0900 (Thu, 06 Dec 2018) | 7 lines

remove obsolete data from unicode.c

* unicode.c: Remove the arrays onigenc_unicode_GCB_ranges_GAZ,
  onigenc_unicode_GCB_ranges_E_Base, and onigenc_unicode_GCB_ranges_Emoji,
  because they are not needed anymore for Unicode 11.0.0.

* regparse.c: Remove external declarations for above arrays.
------------------------------------------------------------------------
r66231 | normal | 2018-12-06 04:01:29 +0900 (Thu, 06 Dec 2018) | 6 lines

Revert "fix typoe of r66200"

This reverts r66229 (commit e941daa6dd114b52356a63d3c3db5684e6c66717)

Many CI failures on this:
http://ci.rvm.jp/results/trunk-jemalloc@silicon-docker/1497858
------------------------------------------------------------------------
r66230 | normal | 2018-12-06 03:58:45 +0900 (Thu, 06 Dec 2018) | 9 lines

thread_sync.c (mutex_ptr): handle mutexes held by parent threads in children

Mutexes may be held by threads which only exist in the parent
process, so their waitqueues may be populated with references
to other dead threads.  We must reset them at fork.

I am a moron for introducing this bug :<

[ruby-core:90312] [Bug #15383]
------------------------------------------------------------------------
r66229 | naruse | 2018-12-06 03:37:47 +0900 (Thu, 06 Dec 2018) | 1 line

fix typoe of r66200
------------------------------------------------------------------------
r66228 | ko1 | 2018-12-06 02:23:32 +0900 (Thu, 06 Dec 2018) | 8 lines

Introduce "COLDFUNC" function attribute.

* include/ruby/defines.h: introduce "COLDFUNC" function attribute
  on several compilers for called unlikely functions.
  Apply to rb_memerror, rb_warn and rb_bug.

  A patch form  methodmissing <lourens@bearmetal.eu>.

------------------------------------------------------------------------
r66227 | svn | 2018-12-06 01:15:13 +0900 (Thu, 06 Dec 2018) | 1 line

* 2018-12-06
------------------------------------------------------------------------
r66226 | ko1 | 2018-12-06 01:15:09 +0900 (Thu, 06 Dec 2018) | 5 lines

fix C90 error.

* configure.ac (check broken_backtrace code): fix decl. position
  error because of `-Werror=declaration-after-statement`.

------------------------------------------------------------------------
r66224 | mrkn | 2018-12-05 20:30:26 +0900 (Wed, 05 Dec 2018) | 1 line

NEWS: update about bigdecimal [ci skip]
------------------------------------------------------------------------
r66223 | svn | 2018-12-05 20:30:26 +0900 (Wed, 05 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66222 | mrkn | 2018-12-05 20:30:24 +0900 (Wed, 05 Dec 2018) | 3 lines

Import bigdecimal 1.4.0.pre.20181205a

* https://github.com/ruby/bigdecimal/compare/74d25ef..v1.4.0.pre.20181205a
------------------------------------------------------------------------
r66221 | svn | 2018-12-05 20:29:57 +0900 (Wed, 05 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66220 | hsbt | 2018-12-05 20:29:56 +0900 (Wed, 05 Dec 2018) | 3 lines

Revert "Remove `libexec/bundle_ruby`"

This reverts commit 3f708604920f2fd7a105d5f092240737add15ef1.
------------------------------------------------------------------------
r66219 | kazu | 2018-12-05 20:20:29 +0900 (Wed, 05 Dec 2018) | 4 lines

Remove `libexec/bundle_ruby`

see r65979
[Bug #15291][ruby-dev:50663]
------------------------------------------------------------------------
r66218 | duerst | 2018-12-05 19:40:17 +0900 (Wed, 05 Dec 2018) | 1 line

remove unused variables in node_extended_grapheme_cluster()
------------------------------------------------------------------------
r66217 | duerst | 2018-12-05 19:11:57 +0900 (Wed, 05 Dec 2018) | 1 line

tweak/remove comments [ci skip]
------------------------------------------------------------------------
r66216 | duerst | 2018-12-05 19:06:47 +0900 (Wed, 05 Dec 2018) | 1 line

add update to Unicode 11.0.0 to NEWS [ci skip]
------------------------------------------------------------------------
r66215 | kazu | 2018-12-05 18:07:54 +0900 (Wed, 05 Dec 2018) | 5 lines

lib/monitor.rb: prevent to initialize MonitorMixin twice

and allow to initialize again when obj.dup.

Suggested by Benoit Daloze.  [ruby-core:88504] [Feature #15000]
------------------------------------------------------------------------
r66214 | duerst | 2018-12-05 18:00:40 +0900 (Wed, 05 Dec 2018) | 1 line

adjust some comments in node_extended_grapheme_cluster() [ci skip]
------------------------------------------------------------------------
r66213 | duerst | 2018-12-05 17:10:24 +0900 (Wed, 05 Dec 2018) | 11 lines

update to Unicode 11.0.0 (main step, not complete yet)

- common.mk: Change Unicode version to 11.0.0, and Emoji version to 11.0
- test/ruby/enc/test_emoji_breaks.rb: update hard-coded Emoji version
- enc/unicode/11.0.0, enc/unicode/11.0.0/casefold.h, enc/unicode/name2ctype.h:
  Add generated files. Files for Unicode 10.0.0 will be removed once we are
  sure 11.0.0 works.
- lib/unicode_normalize/tables.rb: Updated table.
- regparse.c: Almost completely reimplement grapheme cluster detection in
  function node_extended_grapheme_cluster().

------------------------------------------------------------------------
r66212 | nobu | 2018-12-05 13:25:44 +0900 (Wed, 05 Dec 2018) | 12 lines

implement Array-specific #all?, #none?, #one?

Before this patch Array#all? was not implemented in Array class
and alternatively Enumerable#all? was used, while #any? has its
own method entry in Array class.  Similarly, Array#none? and #one?
also lacks its own implementation.
This patch provides Array-specific implementations for above three
methods to enable faster method lookup.

[Fix GH-2041]

From: Koji Onishi <fursich0@gmail.com>
------------------------------------------------------------------------
r66211 | svn | 2018-12-05 13:01:55 +0900 (Wed, 05 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66210 | mrkn | 2018-12-05 13:01:53 +0900 (Wed, 05 Dec 2018) | 45 lines

Revert bigdecimal 1.4.0 related commits

* Revert "Remove unnecessary linker flags"

  This reverts commit 49efa01579272d52d28bd361c498d96ca92e986e.

* Revert "Move dependency on gemspec"

  This reverts commit bfb64d476578eadd61a738149726da37840f068d.

* Revert "Remove unnecessary directory listing"

  This reverts commit 86661b5c60b8da6e5641c9c772b57857a1f988f4.

* Revert "* expand tabs."

  This reverts commit 35ada33f8386b56611f10b1a0a4e5667e9b08071.

* Revert "Import bigdecimal-1.4.0.pre-20181204a"

  This reverts commit 8891bb3bd602bdbabd24260cf1e431475dc027c8.

* Revert "ext/bigdecimal/bigdecimal.c: drop unused function"

  This reverts commit 5ceeea4da1179193c2c7ddcebfd67019128473e3.

* Revert "* expand tabs."

  This reverts commit e021386e905b6d6799a84dfbc2f0592e42626366.

* Revert "Import bigdecimal-1.4.0.pre-20181130a"

  This reverts commit a0e438cd3c28d2eaf4efa18243d5b6edafa14d88.

* Revert "NEWS: write about bigdecimal updates"

  This reverts commit 89455ff2ba973f2a9ee7b79657e0e6f1f31501f9.

* Revert "Fix rubyspec of bigdecimal for ruby <2.6"

  This reverts commit 4bcdeeb65e57de4da306d347652898c767162e74.

* Revert "Fix rubyspec against bigdecimal updates"

  This reverts commit c8fb30fc9e0ee14e87be1e231869a12aaef1eedf.
------------------------------------------------------------------------
r66209 | hsbt | 2018-12-05 10:41:53 +0900 (Wed, 05 Dec 2018) | 3 lines

Update the latest bundled gems.

  test-unit-3.2.8 to 3.2.9
------------------------------------------------------------------------
r66208 | nobu | 2018-12-05 10:19:23 +0900 (Wed, 05 Dec 2018) | 6 lines

Fix documentation for Warning.warn [ci skip]

Warning.warn does not add any newlines to the message argument.
[Bug #15379]

From: Olle Jonsson <olle.jonsson@gmail.com>
------------------------------------------------------------------------
r66207 | nobu | 2018-12-05 10:11:32 +0900 (Wed, 05 Dec 2018) | 3 lines

Build error method name at failure

So `struct nmin_data` size is reduced.
------------------------------------------------------------------------
r66206 | nobu | 2018-12-05 10:11:31 +0900 (Wed, 05 Dec 2018) | 1 line

Adjust indent [ci skip]
------------------------------------------------------------------------
r66205 | nobu | 2018-12-05 10:09:44 +0900 (Wed, 05 Dec 2018) | 1 line

Prefer rb_check_arity when 0 or 1 arguments
------------------------------------------------------------------------
r66204 | hsbt | 2018-12-05 08:33:29 +0900 (Wed, 05 Dec 2018) | 3 lines

Merge 2-0-stable branch from bundler/bundler.

  It's release version of Bundler 2
------------------------------------------------------------------------
r66203 | normal | 2018-12-05 08:10:17 +0900 (Wed, 05 Dec 2018) | 4 lines

mjit.c: remove init_list

It is not needed since we have LIST_HEAD_INIT initializer in
mjit_worker.c
------------------------------------------------------------------------
r66202 | odaira | 2018-12-05 07:19:09 +0900 (Wed, 05 Dec 2018) | 11 lines

Enable MJIT on AIX

* configure.ac: disable using __builtin_setjmp to avoid errors when execution
  globally jumps out of JITted code. Specify -std=gnu99 to JIT compilation
  to avoid errors regarding the "restrict" keyword in the precompiled header.
  Specify -shared in addition to -Wl,-G when building shared libraries
  to make mjit_build_dir.so expose the MJIT_BUILD_DIR symbol.  Use LDR_PRELOAD
  to load mjit_build_dir.so.

* mjit_worker.c: do not specify -nodefaultlibs or -nostdlibs because on AIX
  JITted code internally refers to the memcpy function.
------------------------------------------------------------------------
r66201 | svn | 2018-12-05 03:48:47 +0900 (Wed, 05 Dec 2018) | 1 line

* 2018-12-05
------------------------------------------------------------------------
r66200 | naruse | 2018-12-05 03:48:44 +0900 (Wed, 05 Dec 2018) | 4 lines

Add prototype of rb_ary_ptr_use_start()

Without this icc fails to run.
http://rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181203T130002Z.diff.html.gz
------------------------------------------------------------------------
r66199 | k0kubun | 2018-12-04 22:15:24 +0900 (Tue, 04 Dec 2018) | 3 lines

.travis.yml: config_2nd may not exist in ~/

https://travis-ci.org/ruby/ruby/jobs/463317607
------------------------------------------------------------------------
r66198 | hsbt | 2018-12-04 21:24:12 +0900 (Tue, 04 Dec 2018) | 3 lines

Merge upstream from ruby/psych

  * https://github.com/ruby/psych/pull/379
------------------------------------------------------------------------
r66197 | k0kubun | 2018-12-04 20:45:05 +0900 (Tue, 04 Dec 2018) | 5 lines

Re-commit r65722

which was accidentally reverted by r65904

158562dabb197d6efc53cabe6662177c6ec3f43e
------------------------------------------------------------------------
r66196 | nobu | 2018-12-04 20:16:15 +0900 (Tue, 04 Dec 2018) | 4 lines

Remove unnecessary linker flags

Cygwin/mingw linker should be able to link against shared library
itself.  Mswin build sets -def:$(DEFFILE) option by the default.
------------------------------------------------------------------------
r66195 | nobu | 2018-12-04 20:16:14 +0900 (Tue, 04 Dec 2018) | 1 line

Move dependency on gemspec
------------------------------------------------------------------------
r66194 | nobu | 2018-12-04 20:16:11 +0900 (Tue, 04 Dec 2018) | 1 line

Remove unnecessary directory listing
------------------------------------------------------------------------
r66193 | duerst | 2018-12-04 19:51:57 +0900 (Tue, 04 Dec 2018) | 1 line

commit miss
------------------------------------------------------------------------
r66192 | duerst | 2018-12-04 19:49:55 +0900 (Tue, 04 Dec 2018) | 7 lines

change diaeresis from above to below for better visibility

In test/ruby/test_regexp.rb and test/ruby/test_string.rb, change
some instances of COMBINING DIAERESIS (U+0308, above) to
COMBINING DIAERESIS BELOW (U+0324) to make it more easily visible
in test output, particularly in the context of double quotes
surrounding strings.
------------------------------------------------------------------------
r66191 | k0kubun | 2018-12-04 18:37:23 +0900 (Tue, 04 Dec 2018) | 3 lines

test/excludes/_appveyor: exclude memory-inefficient

test which AppVeyor sometimes can't run.
------------------------------------------------------------------------
r66190 | nobu | 2018-12-04 18:16:49 +0900 (Tue, 04 Dec 2018) | 3 lines

Fix error message

* array.c (ary_take_first_or_last): expected optional argument.
------------------------------------------------------------------------
r66189 | kazu | 2018-12-04 17:22:10 +0900 (Tue, 04 Dec 2018) | 1 line

Use delete_prefix instead of `sub(/\Afixed-pattern/, '')`
------------------------------------------------------------------------
r66188 | hsbt | 2018-12-04 17:00:57 +0900 (Tue, 04 Dec 2018) | 3 lines

Merge rubygems master@221bdea

  * Fixed https://github.com/rubygems/rubygems/pull/2506
------------------------------------------------------------------------
r66187 | naruse | 2018-12-04 16:52:08 +0900 (Tue, 04 Dec 2018) | 1 line

fix typo of r66177
------------------------------------------------------------------------
r66186 | usa | 2018-12-04 15:53:05 +0900 (Tue, 04 Dec 2018) | 2 lines

unconstify cast to get rid of VC++ warnings

------------------------------------------------------------------------
r66185 | duerst | 2018-12-04 15:31:40 +0900 (Tue, 04 Dec 2018) | 1 line

exclude skin tones as second component in TestEmojiBreaks#test_mixed_emoji
------------------------------------------------------------------------
r66184 | svn | 2018-12-04 13:22:12 +0900 (Tue, 04 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66183 | mrkn | 2018-12-04 13:22:09 +0900 (Tue, 04 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre-20181204a

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181130a..v1.4.0.pre.20181204a
------------------------------------------------------------------------
r66182 | mrkn | 2018-12-04 13:22:08 +0900 (Tue, 04 Dec 2018) | 3 lines

Revert "Symbol refinements"

Due to assertion failures when VM_CHECK_MODE >= 2.
------------------------------------------------------------------------
r66181 | mrkn | 2018-12-04 13:22:06 +0900 (Tue, 04 Dec 2018) | 6 lines

Symbol refinements

* vm_args.c (refine_sym_proc_call): enalbe accidentally disabled
  refinements in Symbol#to_proc.   [Bug #15114]

From: osyo (manga osyo) <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66180 | duerst | 2018-12-04 13:11:51 +0900 (Tue, 04 Dec 2018) | 5 lines

change embedding character in TestEmojiBreaks#test_embedded_emoji

In test/ruby/enc/test_emoji_breaks.rb, in method
TestEmojiBreaks#test_embedded_emoji, change the surrounding characters
from A/Z to the more neutral \t in preparation for upgrade to Unicode 11.0.0.
------------------------------------------------------------------------
r66179 | nobu | 2018-12-04 11:24:15 +0900 (Tue, 04 Dec 2018) | 1 line

Prefer rb_check_arity when 0 or 1 arguments
------------------------------------------------------------------------
r66178 | nobu | 2018-12-04 10:41:55 +0900 (Tue, 04 Dec 2018) | 1 line

process.c (retry_fork_async_signal_safe): fix -Wclobbered
------------------------------------------------------------------------
r66177 | naruse | 2018-12-04 09:40:49 +0900 (Tue, 04 Dec 2018) | 1 line

Use getent and cut on Solaris to get home directory
------------------------------------------------------------------------
r66176 | naruse | 2018-12-04 09:40:48 +0900 (Tue, 04 Dec 2018) | 3 lines

Use Dir.home to avoid platform dependency

On Solaris 10, `echo ~#{ENV['USER']}` As expected
------------------------------------------------------------------------
r66175 | svn | 2018-12-04 08:53:16 +0900 (Tue, 04 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66174 | tenderlove | 2018-12-04 08:53:11 +0900 (Tue, 04 Dec 2018) | 28 lines

Collapse putobject, putobject, newarray

This collapses:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 putobject                    "a"                                 (   4)[LiCa]
0002 putobject                    "b"
0004 putobject                    "c"
0006 putobject                    "d"
0008 putobject                    "e"
0010 putobject                    "f"
0012 putobject                    "g"
0014 putobject                    "h"
0016 putobject                    "i"
0018 putobject                    "j"
0020 putobject                    "k"
0022 newarray                     11
0024 leave                                                            (   5)[Re]
```

In to this:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 duparray                     ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"](   4)[LiCa]
0002 leave                                                            (   5)[Re]
```
------------------------------------------------------------------------
r66173 | normal | 2018-12-04 06:00:32 +0900 (Tue, 04 Dec 2018) | 1 line

process.c (retry_fork_async_signal_safe): fix -Wclobbered on i686
------------------------------------------------------------------------
r66172 | svn | 2018-12-04 04:49:56 +0900 (Tue, 04 Dec 2018) | 1 line

* 2018-12-04
------------------------------------------------------------------------
r66171 | normal | 2018-12-04 04:49:54 +0900 (Tue, 04 Dec 2018) | 26 lines

process.c: fix ETXTBUSY from MJIT compiler process

This affects test/ruby/test_process.rb (test_execopt_env_path).

Since MJIT uses vfork+execve in a separate thread, there can be
small window in-between vfork and execve where tmp_script.cmd is
held open by the vforked child.  vfork only pauses the MJIT
thread, not any Ruby Threads, so our call to Process.spawn will
hit ETXTBUSY in that window unless we fork.

main thread                       | MJIT thread
----------------------------------------------------
fd = open(tmp)                    |                |
                                  | vfork for CC   |   CC running
write                             |                | ---------------
fchmod                            |                |  sees "fd" here
close(fd)                         |                |
    Process.spawn called          |                |
vfork  (spawn)|    (new process)  |                |
              | execve => TXTBUSY |                |
              |                   |                | execve (FD_CLOEXEC on fd)
              |                   | vfork returns  |

Holding the waitpid_lock whenever we intend to spawn a process
prevents the MJIT thread from spawning a process while we are
spawning in Ruby-land.
------------------------------------------------------------------------
r66170 | ko1 | 2018-12-03 22:39:42 +0900 (Mon, 03 Dec 2018) | 1 line

add a NEWS entry of TracePoint#enable
------------------------------------------------------------------------
r66169 | nobu | 2018-12-03 22:12:34 +0900 (Mon, 03 Dec 2018) | 1 line

update-deps: support coroutine dependencies
------------------------------------------------------------------------
r66168 | nobu | 2018-12-03 22:12:29 +0900 (Mon, 03 Dec 2018) | 1 line

Ignore goruby wrapper
------------------------------------------------------------------------
r66167 | k0kubun | 2018-12-03 21:39:11 +0900 (Mon, 03 Dec 2018) | 5 lines

ext/bigdecimal/bigdecimal.c: drop unused function

This has been unused since r66124.

cc: @mrkn
------------------------------------------------------------------------
r66166 | svn | 2018-12-03 21:36:47 +0900 (Mon, 03 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66165 | ko1 | 2018-12-03 21:36:39 +0900 (Mon, 03 Dec 2018) | 16 lines

make `RARRAY_PTR_USE` more conservertive.

* include/ruby/ruby.h: de-transient at
  `RARRAY_PTR_USE` and `RARRAY_PTR_USE_START`.
  Introduce `RARRAY_PTR_USE_TRANSIENT` and
  `RARRAY_PTR_USE_START_TRANSIENT` if you don't want to
  de-transient an array. Generally, it is difficult
  so C-extension writers should not use them.

* array.c: use `RARRAY_PTR_USE_TRANSIENT` if possible.

* hash.c: ditto.

* enum.c (enum_sort_by): remove `rb_ary_transient_heap_evacuate()`
  because `RARRAY_PTR_USE` do de-transient.

------------------------------------------------------------------------
r66164 | k0kubun | 2018-12-03 21:32:01 +0900 (Mon, 03 Dec 2018) | 11 lines

mjit.c: eliminate -save-temps flag

in a new variable cc_common_args.

`cflags=-save-temps=obj` makes MJIT fail like:
https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20181203T095000Z.log.html.gz

This rubyci specifies -save-temps=obj in CFLAGS to use update-deps, and
the flag is harmful when we want to use -pipe flag.

mjit_worker.c: prefer cc_common_args over CC_COMMON_ARGS
------------------------------------------------------------------------
r66163 | hsbt | 2018-12-03 21:01:26 +0900 (Mon, 03 Dec 2018) | 4 lines

Fixed test fails against OpenSSL 1.1.1.

  * https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20181203T093003Z.fail.html.gz
  * https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20181203T090002Z.fail.html.gz
------------------------------------------------------------------------
r66162 | k0kubun | 2018-12-03 21:00:27 +0900 (Mon, 03 Dec 2018) | 6 lines

mjit_worker.c: undefine CC_PATH

because we mostly use cc_path now and the comment is obsolete (CC_PATH
is now absolute path and the TODO is already resolved).

mjit.c: use CC_COMMON_ARGS[0] directly
------------------------------------------------------------------------
r66161 | mame | 2018-12-03 19:35:13 +0900 (Mon, 03 Dec 2018) | 5 lines

Fix typo in trick2018/README [ci skip]

s/dimentional/dimensional

From: "yuuji.yaginuma" <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r66160 | naruse | 2018-12-03 18:55:05 +0900 (Mon, 03 Dec 2018) | 4 lines

Use /bin/echo instead of shell builtin echo

builtin echo of Solaris 10's sh doesn't expand `~`.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181203T061807Z.fail.html.gz
------------------------------------------------------------------------
r66159 | normal | 2018-12-03 18:34:49 +0900 (Mon, 03 Dec 2018) | 10 lines

spec/ruby/core/io/*_spec.rb: explain MJIT failures

These random failures happen because FD number allocation
is not predictable when multiple threads are running (since
MJIT thread is opening/closing files all the time).

Real-world code practically never relies on predictable FD
number allocation (because much real-world code is
multi-threaded); so it's highly unlikely there'll be any
breakage to the user.
------------------------------------------------------------------------
r66158 | mrkn | 2018-12-03 18:21:39 +0900 (Mon, 03 Dec 2018) | 3 lines

NEWS: write about bigdecimal updates

[ci skip]
------------------------------------------------------------------------
r66157 | normal | 2018-12-03 18:15:16 +0900 (Mon, 03 Dec 2018) | 4 lines

process.c (rb_execarg_init): mark as static

io.c has not used it since r36229, and we can re-export
it if we need it at another time.
------------------------------------------------------------------------
r66156 | normal | 2018-12-03 17:57:15 +0900 (Mon, 03 Dec 2018) | 4 lines

process.c (rb_f_system): cleanup to use rb_execarg_get

TypedData_* macros hide assignments and are confusing and too
long for users of giant fonts.
------------------------------------------------------------------------
r66155 | nobu | 2018-12-03 17:51:29 +0900 (Mon, 03 Dec 2018) | 3 lines

Revert "Symbol refinements"

Due to assertion failures when VM_CHECK_MODE >= 2.
------------------------------------------------------------------------
r66154 | shyouhei | 2018-12-03 14:46:46 +0900 (Mon, 03 Dec 2018) | 2 lines

string.c: [DOC] deprecate String#crypt [ci skip] [Feature #14915]

------------------------------------------------------------------------
r66153 | normal | 2018-12-03 13:51:13 +0900 (Mon, 03 Dec 2018) | 4 lines

drb: fix tests on Debian sid/unstable with OpenSSL 1.1.1a

OpenSSL complains abour our keys being small and weak :<
Make them big and strong with 2048-bit RSA keys and SHA256 digests
------------------------------------------------------------------------
r66152 | normal | 2018-12-03 13:51:08 +0900 (Mon, 03 Dec 2018) | 4 lines

webrick: fix tests on Debian sid/unstable with OpenSSL 1.1.1a

OpenSSL complains abour our keys being small and weak :<
Make them big and strong with 2048-bit RSA keys and SHA256 digests
------------------------------------------------------------------------
r66151 | nobu | 2018-12-03 13:44:34 +0900 (Mon, 03 Dec 2018) | 6 lines

Symbol refinements

* vm_args.c (refine_sym_proc_call): enalbe accidentally disabled
  refinements in Symbol#to_proc.   [Bug #15114]

From: osyo (manga osyo) <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66150 | nobu | 2018-12-03 13:44:33 +0900 (Mon, 03 Dec 2018) | 1 line

Revert "Symbol refinements [Bug #15114]"
------------------------------------------------------------------------
r66149 | nobu | 2018-12-03 13:34:27 +0900 (Mon, 03 Dec 2018) | 1 line

Symbol refinements [Bug #15114]
------------------------------------------------------------------------
r66148 | ko1 | 2018-12-03 12:51:55 +0900 (Mon, 03 Dec 2018) | 10 lines

use RARRAY_AREF instead of RARRAY_PTR_USE.

* enumerator.c (enum_chain_total_size): use RARRAY_AREF
  instead of RARRAY_PTR_USE because we don't need non-const
  ptr.

* enumerator.c (enum_chain_each): ditto.

* enumerator.c (enum_chain_rewind): ditto.

------------------------------------------------------------------------
r66147 | nobu | 2018-12-03 12:15:42 +0900 (Mon, 03 Dec 2018) | 3 lines

Cherry-picked spec/mspec/lib/mspec/helpers/fs.rb

From https://github.com/MSP-Greg/ruby/commit/316f60e3befa312320b2cc600d7b59ba64f12329
------------------------------------------------------------------------
r66146 | kazu | 2018-12-03 11:53:57 +0900 (Mon, 03 Dec 2018) | 3 lines

Remove `(nanosecond)` too [ci skip]

[Bug #15322]
------------------------------------------------------------------------
r66145 | okkez | 2018-12-03 11:34:23 +0900 (Mon, 03 Dec 2018) | 7 lines

time.rb: remove the unsupported formatting options from the document [ci skip]

Time.strptime does not support %3N, %6N, and %9N.

close [Bug #15322]


------------------------------------------------------------------------
r66144 | mame | 2018-12-03 10:59:29 +0900 (Mon, 03 Dec 2018) | 3 lines

sample/trick2013/mame/music-box.mp4: removed

The tarball will be reduced by about 568 kB.
------------------------------------------------------------------------
r66143 | mame | 2018-12-03 10:39:45 +0900 (Mon, 03 Dec 2018) | 3 lines

lib/pp.rb (Range#pretty_print): support endless range

`pp(1..)` should print `"(1..)"` instead of `"(1..nil)"`.
------------------------------------------------------------------------
r66142 | nobu | 2018-12-03 10:06:34 +0900 (Mon, 03 Dec 2018) | 4 lines

Refine RubyVM::AbstractSyntaxTree::Node#type

* ast.c (rb_ast_node_type): simplified to return a Symbol without
  "NODE_" prefix.
------------------------------------------------------------------------
r66141 | nobu | 2018-12-03 09:57:06 +0900 (Mon, 03 Dec 2018) | 1 line

test_pp.rb: show the node when failed
------------------------------------------------------------------------
r66140 | nobu | 2018-12-03 09:24:38 +0900 (Mon, 03 Dec 2018) | 1 line

Add RubyVM::AST#pretty_print
------------------------------------------------------------------------
r66139 | duerst | 2018-12-03 08:28:42 +0900 (Mon, 03 Dec 2018) | 9 lines

remove unnecessary settings with NULL_NODE in \X implementation

Remove unnecessary settings of node_array elements to NULL_NODE.
We can do this because we initialize the whole array to NULL_NODEs
and set everything again to NULL_NODEs when creating a sequence or
alternative node.

Also, fix an index error in the initialization of node_array.
(issue #15343)
------------------------------------------------------------------------
r66138 | duerst | 2018-12-03 07:05:36 +0900 (Mon, 03 Dec 2018) | 1 line

fix order of declarations and code at start of node_extended_grapheme_cluster()
------------------------------------------------------------------------
r66137 | ko1 | 2018-12-03 07:01:29 +0900 (Mon, 03 Dec 2018) | 1 line

fix last commit (r66135)
------------------------------------------------------------------------
r66136 | svn | 2018-12-03 06:41:51 +0900 (Mon, 03 Dec 2018) | 1 line

* 2018-12-03
------------------------------------------------------------------------
r66135 | duerst | 2018-12-03 06:41:50 +0900 (Mon, 03 Dec 2018) | 6 lines

make sure all nodes are freed on error in node_extended_grapheme_cluster()

regparse.c: In function node_extended_grapheme_cluster(), introduce function-global
array node_array and use it for sequence and alternate construction. This is done
so that in case of error, all nodes that have already been constructed can be
correctly freed. (issue #15343)
------------------------------------------------------------------------
r66134 | nobu | 2018-12-02 21:50:19 +0900 (Sun, 02 Dec 2018) | 3 lines

optarse.rb: mention multiple descriptions [ci skip]

[ruby-list:50718]
------------------------------------------------------------------------
r66133 | duerst | 2018-12-02 19:07:42 +0900 (Sun, 02 Dec 2018) | 7 lines

solve the genie/zombie/wrestlers bug

enc/unicode.c: - Add U+1F93C (WRESTLERS), U+1F9DE (GENIE), and U+1F9DF
                 to onigenc_unicode_GCB_ranges_E_Base.
               - Add comments with character names.
test/ruby/enc/test_emoji_breaks.rb: Activate tests for genie/zombie/wrestlers.
This closes issue #15343.
------------------------------------------------------------------------
r66132 | duerst | 2018-12-02 19:00:35 +0900 (Sun, 02 Dec 2018) | 1 line

expand a small comment [ci skip]
------------------------------------------------------------------------
r66129 | mrkn | 2018-12-02 15:43:15 +0900 (Sun, 02 Dec 2018) | 1 line

Fix rubyspec of bigdecimal for ruby <2.6
------------------------------------------------------------------------
r66128 | svn | 2018-12-02 14:21:57 +0900 (Sun, 02 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66127 | mrkn | 2018-12-02 14:21:57 +0900 (Sun, 02 Dec 2018) | 1 line

Fix JSON::Parser against bigdecimal updates
------------------------------------------------------------------------
r66126 | svn | 2018-12-02 14:21:57 +0900 (Sun, 02 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66125 | mrkn | 2018-12-02 14:21:55 +0900 (Sun, 02 Dec 2018) | 1 line

Fix rubyspec against bigdecimal updates
------------------------------------------------------------------------
r66124 | mrkn | 2018-12-02 14:21:54 +0900 (Sun, 02 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre-20181130a

* https://github.com/ruby/bigdecimal/compare/74d25ef..v1.4.0.pre.20181130a
------------------------------------------------------------------------
r66123 | duerst | 2018-12-02 10:33:24 +0900 (Sun, 02 Dec 2018) | 1 line

add/change some comments in node_extended_grapheme_cluster() [ci skip]
------------------------------------------------------------------------
r66122 | duerst | 2018-12-02 10:06:28 +0900 (Sun, 02 Dec 2018) | 1 line

reformat code [ci skip]
------------------------------------------------------------------------
r66121 | svn | 2018-12-02 08:28:17 +0900 (Sun, 02 Dec 2018) | 1 line

* 2018-12-02
------------------------------------------------------------------------
r66120 | nobu | 2018-12-02 08:28:16 +0900 (Sun, 02 Dec 2018) | 4 lines

LEGAL: update [ci skip]

* LEGAL: update configure, tool/config.guess, tool/config.sub and
  parse.c, to the latest versions.
------------------------------------------------------------------------
r66119 | nobu | 2018-12-01 21:05:37 +0900 (Sat, 01 Dec 2018) | 1 line

Include LEGAL in .document [ci skip]
------------------------------------------------------------------------
r66118 | hsbt | 2018-12-01 20:01:00 +0900 (Sat, 01 Dec 2018) | 3 lines

Merge rubygems-3.0.0.beta3.

  * [GSoC] Multi-factor feature for RubyGems https://github.com/rubygems/rubygems/pull/2369
------------------------------------------------------------------------
r66117 | mrkn | 2018-12-01 18:29:14 +0900 (Sat, 01 Dec 2018) | 5 lines

Let sub-directory exts depend on their parent ext

* ext/extmk.rb: Let sub-directory exts depend on their parent ext.

* template/exts.mk.tmpl: ditto.
------------------------------------------------------------------------
r66116 | duerst | 2018-12-01 17:26:39 +0900 (Sat, 01 Dec 2018) | 5 lines

remove unnecessary code removing CR/LF from range

Remove code that tries to remove CR and LF from Grapheme_Cluster_Break=Control.
This code is unnecessary because Grapheme_Cluster_Break=Control already excludes
CR and LF.
------------------------------------------------------------------------
r66115 | svn | 2018-12-01 16:31:35 +0900 (Sat, 01 Dec 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66114 | duerst | 2018-12-01 16:31:34 +0900 (Sat, 01 Dec 2018) | 4 lines

introduce and use create_alternate_node()

Introduce new function create_alternate_node() to create an alternative node
from a list of nodes in one go. Use it once (two more uses expected).
------------------------------------------------------------------------
r66113 | duerst | 2018-12-01 15:07:53 +0900 (Sat, 01 Dec 2018) | 1 line

eliminate a list with only one element
------------------------------------------------------------------------
r66111 | samuel | 2018-12-01 12:49:52 +0900 (Sat, 01 Dec 2018) | 4 lines

Avoid GCing dead stack after switching away from a fiber

Fixes <https://bugs.ruby-lang.org/issues/14561> and discussed
<https://bugs.ruby-lang.org/issues/15362>.
------------------------------------------------------------------------
r66110 | k0kubun | 2018-12-01 09:37:54 +0900 (Sat, 01 Dec 2018) | 4 lines

tool/downloader.rb: retry Net::OpenTimeout

to prevent random failure
https://travis-ci.org/ruby/ruby/jobs/461667474
------------------------------------------------------------------------
r66109 | tenderlove | 2018-12-01 09:08:36 +0900 (Sat, 01 Dec 2018) | 3 lines

Revert "Collapse putobject, putobject, newarray"

This reverts commit cbdf5a1842cda89347a2c840d23c35f041aead68.
------------------------------------------------------------------------
r66108 | svn | 2018-12-01 08:58:17 +0900 (Sat, 01 Dec 2018) | 1 line

* 2018-12-01
------------------------------------------------------------------------
r66107 | svn | 2018-12-01 08:58:17 +0900 (Sat, 01 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66106 | tenderlove | 2018-12-01 08:58:13 +0900 (Sat, 01 Dec 2018) | 28 lines

Collapse putobject, putobject, newarray

This collapses:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 putobject                    "a"                                 (   4)[LiCa]
0002 putobject                    "b"
0004 putobject                    "c"
0006 putobject                    "d"
0008 putobject                    "e"
0010 putobject                    "f"
0012 putobject                    "g"
0014 putobject                    "h"
0016 putobject                    "i"
0018 putobject                    "j"
0020 putobject                    "k"
0022 newarray                     11
0024 leave                                                            (   5)[Re]
```

In to this:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 duparray                     ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"](   4)[LiCa]
0002 leave                                                            (   5)[Re]
```
------------------------------------------------------------------------
r66104 | normal | 2018-11-30 20:44:21 +0900 (Fri, 30 Nov 2018) | 6 lines

test/ruby/test_io.rb (test_recycled_fd_close): remove hacks

I think I finally fixed the underlying bug in r65937
("io.c (fptr_finalize_flush): close race leading to EBADF")

I've run this test over 100000 times on a multicore system, now.
------------------------------------------------------------------------
r66103 | nobu | 2018-11-30 16:19:49 +0900 (Fri, 30 Nov 2018) | 1 line

Added words in the comment at r65088 [ci skip]
------------------------------------------------------------------------
r66102 | nobu | 2018-11-30 16:04:00 +0900 (Fri, 30 Nov 2018) | 1 line

Update source code URI in bundled_gems [ci skip]
------------------------------------------------------------------------
r66101 | normal | 2018-11-30 12:56:34 +0900 (Fri, 30 Nov 2018) | 3 lines

test/testunit/test_parallel.rb: respect subprocess timeout scale

MJIT tests take longer than 100s on my VM :<
------------------------------------------------------------------------
r66100 | normal | 2018-11-30 12:56:29 +0900 (Fri, 30 Nov 2018) | 7 lines

vm_trace.c: workqueue as thread-safe version of postponed_job

postponed_job is safe to use in signal handlers, but is not
thread-safe for MJIT.  Implement a workqueue for MJIT
thread-safety.

[Bug #15316]
------------------------------------------------------------------------
r66099 | normal | 2018-11-30 08:30:28 +0900 (Fri, 30 Nov 2018) | 1 line

io.c: fix clang -Werror,-Wshorten-64-to-32 on Linux sendfile
------------------------------------------------------------------------
r66098 | normal | 2018-11-30 08:28:15 +0900 (Fri, 30 Nov 2018) | 1 line

io.c: fix clang -Werror,-Wshorten-64-to-32 errors
------------------------------------------------------------------------
r66097 | svn | 2018-11-30 07:37:35 +0900 (Fri, 30 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66096 | normal | 2018-11-30 07:37:29 +0900 (Fri, 30 Nov 2018) | 7 lines

io.c: favor comparisons against zero rather than -1

On my 32-bit x86 userspace, I get the following .text savings:

    text	   data	    bss	    dec	    hex	filename
  152971	     56	    252	 153279	  256bf	io.o.before
  152863	     56	    252	 153171	  25653	io.o.after
------------------------------------------------------------------------
r66095 | tenderlove | 2018-11-30 05:39:51 +0900 (Fri, 30 Nov 2018) | 31 lines

Use a shared array for the `duparray` instruction

In this example code:

```ruby
def foo
  [1, 2, 3, 4]
end
```

The array literal uses a `duparray` instruction. Before this patch,
`rb_ary_resurrect` would malloc and memcpy a new array buffer.  This
patch changes `rb_ary_resurrect` to use `ary_make_partial` so that the
new array object shares the underlying buffer with the array stored in
the instruction sequences.

Before this patch, the new array object is not shared:

```
$ ruby -r objspace -e'p ObjectSpace.dump([1, 2, 3, 4])'
"{\"address\":\"0x7fa2718372d0\", \"type\":\"ARRAY\", \"class\":\"0x7fa26f8b0010\", \"length\":4, \"memsize\":72, \"flags\":{\"wb_protected\":true}}\n"
```

After this patch:

```
$ ./ruby -r objspace -e'p ObjectSpace.dump([1, 2, 3, 4])'
"{\"address\":\"0x7f9a76883638\", \"type\":\"ARRAY\", \"class\":\"0x7f9a758af900\", \"length\":4, \"shared\":true, \"references\":[\"0x7f9a768837c8\"], \"memsize\":40, \"flags\":{\"wb_protected\":true}}\n"
```

[Feature #15289] [ruby-core:90097]
------------------------------------------------------------------------
r66094 | svn | 2018-11-30 05:00:18 +0900 (Fri, 30 Nov 2018) | 1 line

* 2018-11-30
------------------------------------------------------------------------
r66093 | normal | 2018-11-30 05:00:00 +0900 (Fri, 30 Nov 2018) | 9 lines

disable non-blocking pipes and sockets by default

There seems to be a compatibility problems with Rails +
Rack::Deflater; so we revert this incompatibility.

This effectively reverts r65922; but keeps the bugfixes to
better support non-blocking sockets and pipes for future use.

[Bug #15356] [Bug #14968]
------------------------------------------------------------------------
r66092 | kazu | 2018-11-29 18:22:13 +0900 (Thu, 29 Nov 2018) | 1 line

Remove unused variable in example code [ci skip]
------------------------------------------------------------------------
r66091 | ko1 | 2018-11-29 17:03:55 +0900 (Thu, 29 Nov 2018) | 9 lines

clear dst Hash on Hash#replace. [Bug #15358]

* hash.c (linear_copy): solve two issues on `Hash#replace`.
  (1) fix memory leak
      (1-1) don't allocate memory if destination already
            has a memory area.
      (1-2) free destination memory if src is NULL.
  (2) clear transient heap flag if src is NULL. [Bug #15358]

------------------------------------------------------------------------
r66090 | nobu | 2018-11-29 16:45:54 +0900 (Thu, 29 Nov 2018) | 1 line

Create empty revision.h when srcdir is write-only [ci skip]
------------------------------------------------------------------------
r66089 | nobu | 2018-11-29 16:07:40 +0900 (Thu, 29 Nov 2018) | 1 line

Always try to update revision.h with GNU make
------------------------------------------------------------------------
r66088 | k0kubun | 2018-11-29 15:51:08 +0900 (Thu, 29 Nov 2018) | 5 lines

Revert "using_spec.rb: skip broken test for MinGW for now"

This reverts commit 110273c53461a9a7ecdcca705346be21f25f50c6.

Try this with r66087
------------------------------------------------------------------------
r66087 | ko1 | 2018-11-29 15:37:01 +0900 (Thu, 29 Nov 2018) | 2 lines

use __builtin_setjmp on mingw64 [Bug #15348].

------------------------------------------------------------------------
r66086 | shyouhei | 2018-11-29 15:16:31 +0900 (Thu, 29 Nov 2018) | 13 lines

Remove HEAP_ALIGN_LOG setting in configure.ac for OpenBSD/MirOS

The ruby setting was renamed to HEAP_PAGE_ALIGN_LOG, but the
configure.in (now configure.ac) file was not updated, so the
setting had no effect.  The configure setting is unnecessary
after OpenBSD 5.2 and MirOS has been discontinued (with the last
release being over 10 years ago), so it is better to just remove
the related configure setting.

Fix [Bug #13438]
From: Jeremy Evans <code@jeremyevans.net>


------------------------------------------------------------------------
r66085 | shyouhei | 2018-11-29 14:26:05 +0900 (Thu, 29 Nov 2018) | 10 lines

.travis.yml: cache unicode.org files

Before this changeset (since r58071) we did not download files
from unicode.org but just touch some files.  This is a kind of
hack that people normally don't do at home.

We are caching other files between builds now.  Why not also save
those files downloaded from elsewhere.  This covers more
realistic workload, I guess.

------------------------------------------------------------------------
r66084 | shyouhei | 2018-11-29 11:47:36 +0900 (Thu, 29 Nov 2018) | 5 lines

.travis.yml: fix YAML parse error

`[` is a meta character in YAML.  `- [` starts an array,
so it should end with `]`; but it was not.

------------------------------------------------------------------------
r66083 | svn | 2018-11-29 10:09:49 +0900 (Thu, 29 Nov 2018) | 1 line

* 2018-11-29
------------------------------------------------------------------------
r66082 | nobu | 2018-11-29 10:09:47 +0900 (Thu, 29 Nov 2018) | 6 lines

time.rb: Move documents and stop others

* lib/time.rb: Move method documents to each methods.  And stop
  documentation of the abstract and others, which were confusingly
  placed at the top of generated documents prior to the abstract
  in time.c.
------------------------------------------------------------------------
r66081 | nobu | 2018-11-28 23:56:19 +0900 (Wed, 28 Nov 2018) | 1 line

Executable scripts have been moved to libexec [ci skip]
------------------------------------------------------------------------
r66080 | nobu | 2018-11-28 23:08:35 +0900 (Wed, 28 Nov 2018) | 1 line

time.c: rescue find_timezone when loading
------------------------------------------------------------------------
r66079 | nobu | 2018-11-28 23:08:34 +0900 (Wed, 28 Nov 2018) | 1 line

Try with TZInfo and Timezone gems
------------------------------------------------------------------------
r66078 | nobu | 2018-11-28 23:08:33 +0900 (Wed, 28 Nov 2018) | 1 line

Time.at in: tz
------------------------------------------------------------------------
r66077 | nobu | 2018-11-28 23:08:32 +0900 (Wed, 28 Nov 2018) | 1 line

Timezone at Time.at
------------------------------------------------------------------------
r66076 | nobu | 2018-11-28 23:08:31 +0900 (Wed, 28 Nov 2018) | 1 line

Try Time.find_timezone to convert name to timezone
------------------------------------------------------------------------
r66075 | nobu | 2018-11-28 23:08:30 +0900 (Wed, 28 Nov 2018) | 1 line

Try Time.find_timezone to load
------------------------------------------------------------------------
r66072 | duerst | 2018-11-28 16:07:59 +0900 (Wed, 28 Nov 2018) | 1 line

remove two unnecessary variables (np2 and np3)
------------------------------------------------------------------------
r66071 | duerst | 2018-11-28 15:43:57 +0900 (Wed, 28 Nov 2018) | 1 line

eliminate intermediate variable in very short block (3 times)
------------------------------------------------------------------------
r66070 | duerst | 2018-11-28 15:21:52 +0900 (Wed, 28 Nov 2018) | 4 lines

use create_sequence_node() four more times

Four more use of create_sequence_node() in node_extended_grapheme_cluster
(a few more to come).
------------------------------------------------------------------------
r66069 | nobu | 2018-11-28 15:12:58 +0900 (Wed, 28 Nov 2018) | 4 lines

Get rid of block-less Proc.new

* lib/optparse.rb (OptionParser::Switch#initialize): get rid of
  `Proc.new` without a block, which may be deprecated in the future.
------------------------------------------------------------------------
r66068 | nobu | 2018-11-28 15:12:57 +0900 (Wed, 28 Nov 2018) | 4 lines

Remove useless backslash

* lib/optparse.rb (OptionParser::Switch#compsys): remove useless
  backslash which just confuse ruby-mode.el.
------------------------------------------------------------------------
r66067 | normal | 2018-11-28 13:31:42 +0900 (Wed, 28 Nov 2018) | 4 lines

test_settracefunc (test_tracepoint_enable_with_target_line): less fragile

Allow us to make other changes to the file and move the method
around without affecting this test.
------------------------------------------------------------------------
r66066 | hsbt | 2018-11-28 12:10:09 +0900 (Wed, 28 Nov 2018) | 1 line

Regenerated binstubs of bundler, rdoc and irb.
------------------------------------------------------------------------
r66065 | hsbt | 2018-11-28 12:08:14 +0900 (Wed, 28 Nov 2018) | 3 lines

Merge rubygems upstream from https://github.com/rubygems/rubygems/commit/2c499655f29070c809dfea9f5fda6fac6850e62e

  https://github.com/rubygems/rubygems/pull/2493
------------------------------------------------------------------------
r66064 | hsbt | 2018-11-28 11:38:29 +0900 (Wed, 28 Nov 2018) | 3 lines

Merge stringio.gemspec from github repository.

  Temporary ignored configuration of certificate sign.
------------------------------------------------------------------------
r66063 | duerst | 2018-11-28 10:58:35 +0900 (Wed, 28 Nov 2018) | 4 lines

use create_sequence_node() once more

One more use of create_sequence_node() in node_extended_grapheme_cluster
(several more to come).
------------------------------------------------------------------------
r66062 | k0kubun | 2018-11-28 10:53:46 +0900 (Wed, 28 Nov 2018) | 3 lines

using_spec.rb: skip broken test for MinGW for now

ko1 is fixing this and he suggested to skip it for now
------------------------------------------------------------------------
r66061 | shugo | 2018-11-28 10:51:44 +0900 (Wed, 28 Nov 2018) | 3 lines

lib/monitor.rb: avoid race conditions by Thread.handle_interrupt

Suggested by Benoit Daloze.  [ruby-core:88502] [Bug #14998]
------------------------------------------------------------------------
r66060 | normal | 2018-11-28 10:10:40 +0900 (Wed, 28 Nov 2018) | 9 lines

io.c (rb_update_max_fd): use F_GETFL if possible

On 64-bit Linux, fstat() needs to fill out a 144 byte struct
while F_GETFL only needs to return 8 bytes.

Fwiw, F_GETFD requires an additional rcu_read_lock and bitmap
check; so it's obviously more expensive than F_GETFL on Linux.

Reduce stack usage of rb_update_max_fd from 184 to 24 bytes.
------------------------------------------------------------------------
r66059 | nobu | 2018-11-28 10:04:39 +0900 (Wed, 28 Nov 2018) | 8 lines

Fix for coroutine/win32/Context.obj

* coroutine/win32/Context.asm: old ml version 9 needs CPU
  directive before `.model` directive.

* win32/Makefile.sub: specify object directories to separate Win32
  and Win64 targets.  Win32 rule was overridden by Win64 rule and
  just ignored.
------------------------------------------------------------------------
r66058 | nobu | 2018-11-28 10:04:38 +0900 (Wed, 28 Nov 2018) | 1 line

win32/Makefile.sub: add flags for AS
------------------------------------------------------------------------
r66057 | duerst | 2018-11-28 09:53:35 +0900 (Wed, 28 Nov 2018) | 5 lines

introduce macro R_ERR to reduce repetitive code

Introduce a new preprocessor macro R_ERR to visually reduce repetitive code
checking for return values and going to the err: label at the end of the
function node_extended_grapheme_cluster().
------------------------------------------------------------------------
r66056 | shyouhei | 2018-11-28 09:49:24 +0900 (Wed, 28 Nov 2018) | 9 lines

.travis.yaml: unquote

It was probably me, 7 years ago, in r33844, who started overly
quoting YAML strings.  But now, this file grown up 50+ times from
6 lines to more than 300.  It is more annoying than convenient to
quote everything to add backslashes here and there.

Just use quotes only when necessary.

------------------------------------------------------------------------
r66055 | hsbt | 2018-11-28 09:48:21 +0900 (Wed, 28 Nov 2018) | 1 line

Removed redundant empty line.
------------------------------------------------------------------------
r66054 | svn | 2018-11-28 09:35:27 +0900 (Wed, 28 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66053 | normal | 2018-11-28 09:35:22 +0900 (Wed, 28 Nov 2018) | 13 lines

io.c: reduce IO.copy_stream stack usage on Linux

nogvl_copy_file_range and nogvl_copy_stream_sendfile each
used 344 bytes of stack before this change.  Now, they are
inlined into nogvl_copy_stream_func which only uses 200 bytes
of stack.

"struct stat" is 144 bytes on my 64-bit Linux.

Note: this doesn't affect GC (yet) since GVL is released;
but increases safety if called from deep machine stacks.

It will affect GC if Thread::Light is merged.
------------------------------------------------------------------------
r66052 | duerst | 2018-11-28 09:28:52 +0900 (Wed, 28 Nov 2018) | 6 lines

reduce number of arguments on quantify_property_node()

There are only four patterns of the last two arguments to quantify_property_node().
By replacing the lower/upper arguments with a single char, we get more expressive
calls, the last argument directly corresponding to the quantifier that we want to
use (except for '2', which means exactly two).
------------------------------------------------------------------------
r66051 | kazu | 2018-11-28 08:57:55 +0900 (Wed, 28 Nov 2018) | 1 line

Add Float::INFINITY or nil to call-seq of Enumerator::Chain#size [ci skip]
------------------------------------------------------------------------
r66050 | normal | 2018-11-28 07:48:07 +0900 (Wed, 28 Nov 2018) | 3 lines

enumerator.c (enum_chain_yield_block): use predefined ID

No point in having rb_intern lookup and cache a predefined ID
------------------------------------------------------------------------
r66049 | normal | 2018-11-28 07:20:45 +0900 (Wed, 28 Nov 2018) | 4 lines

io.c (struct copy_stream_struct): packing

Reduce the struct to 80 bytes (from 88) on amd64 to reduce
stack use.
------------------------------------------------------------------------
r66048 | duerst | 2018-11-28 06:50:27 +0900 (Wed, 28 Nov 2018) | 1 line

fix order of subexpressions for Hangul
------------------------------------------------------------------------
r66047 | svn | 2018-11-28 06:38:55 +0900 (Wed, 28 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66046 | duerst | 2018-11-28 06:38:53 +0900 (Wed, 28 Nov 2018) | 1 line

introduce two more uses of create_sequence_node in node_extended_grapheme_cluster
------------------------------------------------------------------------
r66045 | duerst | 2018-11-28 06:23:11 +0900 (Wed, 28 Nov 2018) | 4 lines

correctly handle return value from create_sequence_node()

In function node_extended_grapheme_cluster(), store and test
return value from create_sequence_node(). Never forget this!
------------------------------------------------------------------------
r66044 | svn | 2018-11-28 06:12:31 +0900 (Wed, 28 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66043 | duerst | 2018-11-28 06:12:29 +0900 (Wed, 28 Nov 2018) | 7 lines

declare array for sequence at start of code creating sequence

In function node_extended_grapheme_cluster(),
move declaration up so that block encompasses all of the regular expression
creation that finally makes up the sequence. Having blocks like this will
be great because it directly shows the extent of code belonging to each
subexpression of the regular expression being created.
------------------------------------------------------------------------
r66042 | duerst | 2018-11-28 06:00:06 +0900 (Wed, 28 Nov 2018) | 4 lines

make sure all nodes are correctly freed in create_property_node()

We make sure that the newly created tree and all remaining nodes passed in
in the node_array are freed.
------------------------------------------------------------------------
r66041 | eregon | 2018-11-28 05:38:57 +0900 (Wed, 28 Nov 2018) | 1 line

Update to ruby/spec@cdd6ff7
------------------------------------------------------------------------
r66040 | svn | 2018-11-28 05:38:21 +0900 (Wed, 28 Nov 2018) | 1 line

* 2018-11-28
------------------------------------------------------------------------
r66039 | eregon | 2018-11-28 05:38:20 +0900 (Wed, 28 Nov 2018) | 1 line

Update to ruby/mspec@820486a
------------------------------------------------------------------------
r66038 | nobu | 2018-11-27 22:47:49 +0900 (Tue, 27 Nov 2018) | 4 lines

ruby-style.el: ruby-style-c-mode by VCS [ci skip]

* misc/ruby-style.el (ruby-style-c-mode): set ruby-style if the
  remote repository is ruby.
------------------------------------------------------------------------
r66037 | svn | 2018-11-27 21:08:21 +0900 (Tue, 27 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66036 | hsbt | 2018-11-27 21:08:19 +0900 (Tue, 27 Nov 2018) | 1 line

Merge bundler-2.0.0.pre.2 from upstream.
------------------------------------------------------------------------
r66035 | k0kubun | 2018-11-27 21:00:51 +0900 (Tue, 27 Nov 2018) | 15 lines

mjit_worker.c: promote mjit_copy_job from function

-local variable to global variable.

Consider this case:
1. MJIT worker: dequeue ISeq (stop_worker_p was still FALSE)
2. Ruby thread: call Kernel#exec, which calls mjit_finish(FALSE),
                sets `stop_worker_p = TRUE`, and fires RUBY_VM_CHECK_INTS() once
3. MJIT worker: register copy job, but found stop_worker_p is TRUE.
                set `worker_stopped = TRUE` and the thread stops.
4. Function-local job variable expires by the thread stop (this is eliminated by this commit)
5. Ruby thread: find `worker_stopped` becamse TRUE, start Kernel#exec.
                Kernel#exec fails but exception is rescued.
6. Ruby thread: call RUBY_VM_CHECK_INTS. copy job is dispatched but job variable
                is already expired.
------------------------------------------------------------------------
r66034 | k0kubun | 2018-11-27 20:24:19 +0900 (Tue, 27 Nov 2018) | 7 lines

regparse.c: conform C90

../regparse.c:5908:28: error: initializer for aggregate is not a compile-time constant [-Werror,-Wc99-extensions]
      Node* sequence[] = { np1, np2, np3, ((Node* )0) };
                           ^~~

https://travis-ci.org/ruby/ruby/jobs/460197620
------------------------------------------------------------------------
r66033 | duerst | 2018-11-27 20:04:02 +0900 (Tue, 27 Nov 2018) | 5 lines

introduce helper function create_sequence_node()

The new function create_sequence_node() uses its second argument
(an array of Node*, from left to right, ending with NULL_NODE)
to create a sequence of expressions using node_new_list().
------------------------------------------------------------------------
r66032 | svn | 2018-11-27 19:15:46 +0900 (Tue, 27 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66031 | duerst | 2018-11-27 19:15:45 +0900 (Tue, 27 Nov 2018) | 4 lines

introduce helper function quantify_property_node()

The new function quantify_property_node() combines the functions
create_property_node() and quantify_node(), which frequently appear together.
------------------------------------------------------------------------
r66030 | duerst | 2018-11-27 18:44:35 +0900 (Tue, 27 Nov 2018) | 1 line

introduce helper function quantify_node() to wrap function node_new_quantifier
------------------------------------------------------------------------
r66029 | nobu | 2018-11-27 17:39:40 +0900 (Tue, 27 Nov 2018) | 5 lines

.travis.yml: avoid bashism

GCC_FLAGS is not an array and CC is finally passed to configure as
single string.  Pass CC via the environment variable, so it does
not need to be quoted anymore.
------------------------------------------------------------------------
r66028 | nobu | 2018-11-27 17:39:39 +0900 (Tue, 27 Nov 2018) | 1 line

.travis.yml: discard config.cache if CC changed
------------------------------------------------------------------------
r66027 | nobu | 2018-11-27 17:39:38 +0900 (Tue, 27 Nov 2018) | 1 line

.travis.yml: split commands
------------------------------------------------------------------------
r66026 | svn | 2018-11-27 16:34:25 +0900 (Tue, 27 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66025 | mame | 2018-11-27 16:34:21 +0900 (Tue, 27 Nov 2018) | 5 lines

compile.c: prevent out-of-bound initialization of coverage counters

The coverage counters is initialized with `counter[lineno - 1] = 0`,
but lineno may be 0, which led to write access for index -1.
[ruby-core:90085] [Bug#15346]
------------------------------------------------------------------------
r66024 | aycabta | 2018-11-27 16:02:36 +0900 (Tue, 27 Nov 2018) | 1 line

Merge rdoc-6.1.0.bata2
------------------------------------------------------------------------
r66023 | nobu | 2018-11-27 15:44:02 +0900 (Tue, 27 Nov 2018) | 1 line

Embed the Emoji version
------------------------------------------------------------------------
r66022 | ko1 | 2018-11-27 14:42:33 +0900 (Tue, 27 Nov 2018) | 1 line

restore using_spec.rb
------------------------------------------------------------------------
r66021 | duerst | 2018-11-27 13:13:21 +0900 (Tue, 27 Nov 2018) | 1 line

use explicit property name when creating nodes for "Grapheme_Cluster_Break=Extend"
------------------------------------------------------------------------
r66020 | duerst | 2018-11-27 12:56:19 +0900 (Tue, 27 Nov 2018) | 1 line

use 'Regional_Indicator' script property instead of fixed constants
------------------------------------------------------------------------
r66019 | nobu | 2018-11-27 12:19:06 +0900 (Tue, 27 Nov 2018) | 4 lines

Add rb_typeddata_is_instance_of

Similar to rb_typeddata_is_kind_of, except for that inherited type
is not an instance.
------------------------------------------------------------------------
r66018 | ko1 | 2018-11-27 12:12:58 +0900 (Tue, 27 Nov 2018) | 1 line

enable another assertion
------------------------------------------------------------------------
r66017 | ko1 | 2018-11-27 12:02:41 +0900 (Tue, 27 Nov 2018) | 4 lines

fix for ISeq.of(method).

* iseq.c (iseqw_s_of): `rb_method_iseq(method)` can return NULL.

------------------------------------------------------------------------
r66016 | svn | 2018-11-27 11:45:26 +0900 (Tue, 27 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66015 | ko1 | 2018-11-27 11:45:25 +0900 (Tue, 27 Nov 2018) | 6 lines

`RubyVM::ISeq.of` accept ISeq.

* iseq.c (iseqw_s_of): return given object if the given object is
  a `RubyVM::InstructionSequence`. We can specify ISeq for
  `TracePoint#enable(target:)`.

------------------------------------------------------------------------
r66014 | duerst | 2018-11-27 11:18:29 +0900 (Tue, 27 Nov 2018) | 1 line

add some comments in function node_extended_grapheme_cluster() [ci skip]
------------------------------------------------------------------------
r66013 | nobu | 2018-11-27 10:25:16 +0900 (Tue, 27 Nov 2018) | 1 line

ALWAYS_INLINE implies inline always
------------------------------------------------------------------------
r66012 | ko1 | 2018-11-27 09:44:14 +0900 (Tue, 27 Nov 2018) | 1 line

enable at least one behavior
------------------------------------------------------------------------
r66011 | ko1 | 2018-11-27 09:39:46 +0900 (Tue, 27 Nov 2018) | 1 line

to debug https://ci.appveyor.com/project/ruby/ruby/builds/20566898/job/hda29416yal9h6hn use binary search
------------------------------------------------------------------------
r66010 | duerst | 2018-11-27 08:30:43 +0900 (Tue, 27 Nov 2018) | 1 line

improve messages for test failures
------------------------------------------------------------------------
r66009 | svn | 2018-11-27 05:16:16 +0900 (Tue, 27 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66008 | ko1 | 2018-11-27 05:16:14 +0900 (Tue, 27 Nov 2018) | 6 lines

`TracePoint#enable(target_line:)` is supported. [Feature #15289]

* vm_trace.c: `TracePoint#enable(target_line:)` is supported.
  This option enables a hook only at specified target_line.
  target_line should be combination with target and :line event.

------------------------------------------------------------------------
r66007 | ko1 | 2018-11-27 04:59:08 +0900 (Tue, 27 Nov 2018) | 4 lines

Give up support for cross-callcc set_trace_func.

* cont.c (cont_restore_thread): cause error if trace-status is changed.

------------------------------------------------------------------------
r66006 | ko1 | 2018-11-27 03:48:48 +0900 (Tue, 27 Nov 2018) | 7 lines

fix for ansi-pedantic compile option.

* iseq.c (iseq_add_local_tracepoint_i): extract aggregate initialization.
  See https://travis-ci.org/ruby/ruby/jobs/459881277

* iseq.c (iseq_remove_local_tracepoint_i): ditto.

------------------------------------------------------------------------
r66005 | ko1 | 2018-11-27 03:27:02 +0900 (Tue, 27 Nov 2018) | 4 lines

fix type error.

* iseq.c (iseq_iterate_children): should use cast to `int`.

------------------------------------------------------------------------
r66004 | svn | 2018-11-27 03:16:54 +0900 (Tue, 27 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66003 | ko1 | 2018-11-27 03:16:39 +0900 (Tue, 27 Nov 2018) | 57 lines

Support targetting TracePoint [Feature #15289]

* vm_trace.c (rb_tracepoint_enable_for_target): support targetting
  TracePoint. [Feature #15289]

  Tragetting TracePoint is only enabled on specified method, proc
  and so on, example: `tp.enable(target: code)`.

  `code` should be consisted of InstructionSeuqnece (iseq)
  (RubyVM::InstructionSeuqnece.of(code) should not return nil)
  If code is a tree of iseq, TracePoint is enabled on all of
  iseqs in a tree.

  Enabled tragetting TracePoints can not enabled again with
  and without target.

* vm_core.h (rb_iseq_t): introduce `rb_iseq_t::local_hooks`
  to store local hooks.
  `rb_iseq_t::aux::trace_events` is renamed to
  `global_trace_events` to contrast with `local_hooks`.

* vm_core.h (rb_hook_list_t): add `rb_hook_list_t::running`
  to represent how many Threads/Fibers are used this list.
  If this field is 0, nobody using this hooks and we can
  delete it.

  This is why we can remove code from cont.c.

* vm_core.h (rb_vm_t): because of above change, we can eliminate
  `rb_vm_t::trace_running` field.
  Also renamed from `rb_vm_t::event_hooks` to `global_hooks`.

* vm_core.h, vm.c (ruby_vm_event_enabled_global_flags): renamed
  from `ruby_vm_event_enabled_flags.

* vm_core.h, vm.c (ruby_vm_event_local_num): added to count
  enabled targetting TracePoints.

* vm_core.h, vm_trace.c (rb_exec_event_hooks): accepts
  hook list.

* vm_core.h (rb_vm_global_hooks): added for convinience.

* method.h (rb_method_bmethod_t): added to maintain Proc
  and `rb_hook_list_t` for bmethod (defined by define_method).

* prelude.rb (TracePoint#enable): extracet a keyword parameter
  (because it is easy than writing in C).
  It calls `TracePoint#__enable` internal method written in C.

* vm_insnhelper.c (vm_trace): check also iseq->local_hooks.

* vm.c (invoke_bmethod): check def->body.bmethod.hooks.

* vm.c (hook_before_rewind): check iseq->local_hooks
  and def->body.bmethod.hooks before rewind by exception.

------------------------------------------------------------------------
r66002 | k0kubun | 2018-11-27 01:13:56 +0900 (Tue, 27 Nov 2018) | 5 lines

test_jit.rb: skip a test for Windows for now

https://ci.appveyor.com/project/ruby/ruby/builds/20558412

removing CloseHandle disallows us to remove the DLL.
------------------------------------------------------------------------
r66001 | k0kubun | 2018-11-27 00:47:20 +0900 (Tue, 27 Nov 2018) | 3 lines

vm_trace.c: MJIT-limited thread-safety for postponed_job

[Bug #15316]
------------------------------------------------------------------------
r66000 | svn | 2018-11-27 00:12:34 +0900 (Tue, 27 Nov 2018) | 1 line

* 2018-11-27
------------------------------------------------------------------------
r65999 | k0kubun | 2018-11-27 00:12:31 +0900 (Tue, 27 Nov 2018) | 7 lines

process.c: avoid dlclose before exec

because JIT-ed code may still be on stack at this time, unlike
in ruby_cleanup().

This hopes to fix: (take 2)
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1480207
------------------------------------------------------------------------
r65998 | k0kubun | 2018-11-27 00:12:30 +0900 (Tue, 27 Nov 2018) | 6 lines

Revert "process.c: try to workaroun SEGV by r65994"

This reverts commit 0e6aba22c6b876a36adc39cac5314ce6e626954c.

because it didn't help, at all.
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1480207
------------------------------------------------------------------------
r65997 | k0kubun | 2018-11-26 23:45:39 +0900 (Mon, 26 Nov 2018) | 12 lines

process.c: try to workaroun SEGV by r65994

http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1480173

It tries to print C backtrace but fails. And core file on the server
seems to be stopping on the irrelevant place due to its own signal
handler for the dump.

And I failed to reproduce this SEGV on my machine.

I don't know why it's broken, so let me try this change to investigate
the reason of SEGV.
------------------------------------------------------------------------
r65996 | svn | 2018-11-26 23:03:00 +0900 (Mon, 26 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65995 | nobu | 2018-11-26 23:02:59 +0900 (Mon, 26 Nov 2018) | 1 line

Do not load rubygems when disabled
------------------------------------------------------------------------
r65994 | k0kubun | 2018-11-26 22:39:53 +0900 (Mon, 26 Nov 2018) | 5 lines

process.c: finish MJIT prior to #exec

to prevent ruby from leaving MJIT-related files.

test_jit.rb: add a test to prevent that
------------------------------------------------------------------------
r65993 | k0kubun | 2018-11-26 21:50:42 +0900 (Mon, 26 Nov 2018) | 6 lines

mjit_worker.c: disable running copy job

after MJIT worker stop.

r65928 didn't fix the SEGV. This commit hopes to fix
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1478576
------------------------------------------------------------------------
r65992 | k0kubun | 2018-11-26 21:36:45 +0900 (Mon, 26 Nov 2018) | 6 lines

lib/rubygems/indexer.rb: suppress random test-all error

by Bundler integration, like:
http://ci.rvm.jp/results/trunk-no-mjit@silicon-docker/1479769

This resurrects r65629 which was accidentally reverted by r65904.
------------------------------------------------------------------------
r65991 | hsbt | 2018-11-26 21:23:45 +0900 (Mon, 26 Nov 2018) | 1 line

Sync the executables of rdoc from upstream repository.
------------------------------------------------------------------------
r65990 | duerst | 2018-11-26 18:03:11 +0900 (Mon, 26 Nov 2018) | 7 lines

add tests for grapheme clusters using Unicode Emoji test data

Add file test/ruby/enc/test_emoji_breaks.rb to test String#each_grapheme_cluster
test data provided by Unicode (at https://www.unicode.org/Public/emoji/#{EMOJI_VERSION}/).

Lines containing emoji for genies, zombies, and wrestling are ignored
because there seems to be a bug (#15343) in the implementation.
------------------------------------------------------------------------
r65989 | mame | 2018-11-26 16:55:07 +0900 (Mon, 26 Nov 2018) | 7 lines

object.c: Deprecate Object#=~ and add NilClass#=~`

Object#=~ always returns nil.  This behavior is not only unuseful but
also troublesome because it may hide a type error.

This change deprecates Object#=~.  For compatibility, NilClass#=~ is
newly introduced.  [Feature #15231]
------------------------------------------------------------------------
r65988 | mame | 2018-11-26 16:13:53 +0900 (Mon, 26 Nov 2018) | 4 lines

lib/rubygems: explicitly clarify the type for =~ matching

RubyGems is very indifferent for type.
This change is needed for removal of `Object#=~`.  [Feature #15231]
------------------------------------------------------------------------
r65987 | mame | 2018-11-26 14:46:24 +0900 (Mon, 26 Nov 2018) | 1 line

lib/rubygems/command.rb: remove meaningless code
------------------------------------------------------------------------
r65986 | mame | 2018-11-26 14:46:02 +0900 (Mon, 26 Nov 2018) | 9 lines

test/rdoc/test_rdoc_rdoc.rb: add dummy finish

RDoc::Options#@exclude is initialized as an empty array.
Then, #finish converts it to a regexp or nil and reassign it to @exclude.
Some methods of RDoc assumes that #finish has been already called.
So, this change forces to assign nil to @exclude.

This type confusion was found during work for removal of `Object#=~`.
[Feature #15231]
------------------------------------------------------------------------
r65985 | mame | 2018-11-26 14:32:50 +0900 (Mon, 26 Nov 2018) | 9 lines

lib/rdoc/markup/: Remove wrong call to `=~` against Array

`@res` is an Array, so `@res =~ /\n\z/` calls `Object#=~` which always
returns nil.
I guess it should be `@res.last =~ /\n\z/`, but the change causes test
failures.

This bug was found during work for removal of `Object#=~`.
[Feature #15231]
------------------------------------------------------------------------
r65984 | mame | 2018-11-26 14:29:45 +0900 (Mon, 26 Nov 2018) | 11 lines

lib/webrick: explicitly convert header values to a string

The values of @header are expected to be all strings;
WEBrick::HTTPResponse::[]=(key, val) explicitly converts the second
argument to a string and assigns it to @header hash.
However, there were some points in WEBrick internal code that assigns
non-String to @header.  This change fixes the issues.

The values are checked by `header_value =~ /\r\n/` in check_header.
The type confusion caused conflict with removal of `Object#=~`
[Feature #15231].
------------------------------------------------------------------------
r65983 | nobu | 2018-11-26 12:47:47 +0900 (Mon, 26 Nov 2018) | 5 lines

common.mk: simplify for ruby.imp

* common.mk (ruby.imp): extract the first word on the next lines
  of MJIT_FUNC_EXPORTED, regardless the prefix.  duplicate symbols
  will be removed by `sort -u`.
------------------------------------------------------------------------
r65982 | shyouhei | 2018-11-26 11:46:50 +0900 (Mon, 26 Nov 2018) | 4 lines

.travis.yml: avoid bashism

We can set environment variables to avoid before_script.

------------------------------------------------------------------------
r65981 | kazu | 2018-11-26 11:31:46 +0900 (Mon, 26 Nov 2018) | 3 lines

un.rb: add more options for httpd to help message [ci skip]

see r65965
------------------------------------------------------------------------
r65980 | shyouhei | 2018-11-26 11:21:25 +0900 (Mon, 26 Nov 2018) | 5 lines

.travis.yml: update MSAN setups [ci skip]

Exclude OpenSSL because we don't plan to debug libssl,
also track origins of uninitialized bits.

------------------------------------------------------------------------
r65979 | hsbt | 2018-11-26 10:54:53 +0900 (Mon, 26 Nov 2018) | 3 lines

Removed `bundle_ruby` command. Because It's no longer shipped from Bundler 1.0.2.

  [Bug #15291][ruby-dev:50663]
------------------------------------------------------------------------
r65978 | hsbt | 2018-11-26 10:43:02 +0900 (Mon, 26 Nov 2018) | 1 line

Use libexec for distination directory.
------------------------------------------------------------------------
r65977 | hsbt | 2018-11-26 10:23:06 +0900 (Mon, 26 Nov 2018) | 1 line

Followed up r65963. Use libexec directory with sync tool.
------------------------------------------------------------------------
r65976 | duerst | 2018-11-26 08:16:18 +0900 (Mon, 26 Nov 2018) | 6 lines

add several emoji data files to UNICODE_EMOJI_DOWNLOAD for download

In common.mk, add the files emoji-sequences.txt, emoji-test.txt,
emoji-variation-sequences.txt, and emoji-zwj-sequences.txt to
UNICODE_EMOJI_DOWNLOAD for download with `make update-unicode-property-files`.
These files will be used for automated tests for /\X/.
------------------------------------------------------------------------
r65975 | svn | 2018-11-26 01:23:20 +0900 (Mon, 26 Nov 2018) | 1 line

* 2018-11-26
------------------------------------------------------------------------
r65974 | naruse | 2018-11-26 01:23:18 +0900 (Mon, 26 Nov 2018) | 4 lines

Normalize month-mday before finding epoch

Especially over the year 2038, 30 Feb and so on may cause odd behavior
on validating found epoch with given year-month-day [Bug #15340]
------------------------------------------------------------------------
r65973 | yui-knk | 2018-11-25 21:31:35 +0900 (Sun, 25 Nov 2018) | 21 lines

Fix locations of NODE_UNDEF in undef with multiple args

* parse.y: Fix the beginning position of trailing NODE_UNDEF.

  e.g. The location of the NODE_UNDEF for `b` is fixed:

  ```
  undef a, b
  ```

  * Before

  ```
  NODE_UNDEF (line: 1, location: (1,6)-(1,10))
  ```

  * After

  ```
  NODE_UNDEF (line: 1, location: (1,9)-(1,10))
  ```
------------------------------------------------------------------------
r65972 | duerst | 2018-11-25 20:02:41 +0900 (Sun, 25 Nov 2018) | 5 lines

create function create_property_node to extract recurring functionality

Refactoring: In regparse.c, extract creation of a new CClass node and
initialization using a property into a new function create_property_node().

------------------------------------------------------------------------
r65971 | duerst | 2018-11-25 19:12:45 +0900 (Sun, 25 Nov 2018) | 6 lines

deal with ONIGENC_CASE_IS_TITLECASE flag on lowercase characters

In the function onigenc_unicode_case_map() in enc/unicode.c, deal
with the case that the ONIGENC_CASE_IS_TITLECASE flag is set on
lowercase characters. This is in preparation for Georgian Mtavruli,
which are uppercase but not titlecase, in Unicode 11.0.0.
------------------------------------------------------------------------
r65970 | nobu | 2018-11-25 17:32:52 +0900 (Sun, 25 Nov 2018) | 22 lines

ChangeLog compatibility [ci skip]

* tool/vcs.rb (VCS::GIT#export_changelog): improve the
  compatibility with svn-log.
  remained differences are:

  - in svn-log

    - accented characters, left/right single quotation marks, and
      non-break spaces are translated to ASCII characters

    - other non-ASCII characters are excoded as `{U+XXXX}`

  - in git-log

    - tabs are expanded

  - in git-log (intentional)

    - lines looking too indented are unindented

    - empty lines between headers and bodies are squeezed
------------------------------------------------------------------------
r65969 | nobu | 2018-11-25 17:31:40 +0900 (Sun, 25 Nov 2018) | 5 lines

parser: improve error messages

[Fix GH-2011]

From: Akim Demaille <akim.demaille@gmail.com>
------------------------------------------------------------------------
r65968 | nobu | 2018-11-25 15:07:28 +0900 (Sun, 25 Nov 2018) | 1 line

NEWS: fix markup [ci skip]
------------------------------------------------------------------------
r65967 | nobu | 2018-11-25 13:05:09 +0900 (Sun, 25 Nov 2018) | 1 line

No new entry when getting undefined global variable
------------------------------------------------------------------------
r65966 | nobu | 2018-11-25 12:36:10 +0900 (Sun, 25 Nov 2018) | 1 line

Prefer ALLOCV over ALLOCA
------------------------------------------------------------------------
r65965 | nobu | 2018-11-25 12:36:09 +0900 (Sun, 25 Nov 2018) | 1 line

un.rb: more options for httpd
------------------------------------------------------------------------
r65964 | svn | 2018-11-25 10:20:06 +0900 (Sun, 25 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65963 | hsbt | 2018-11-25 10:20:00 +0900 (Sun, 25 Nov 2018) | 8 lines

Use stub executables generated by RubyGems istead of original executables.
It resolved the conflict issues when invoking `gem i rdoc` and the binstub
issues with Bundler and Rails.

  [Bug #5060][ruby-core:38257][Fix GH-2023]

  * https://github.com/rubygems/rubygems/pull/2338
  * https://github.com/heroku/heroku-buildpack-ruby/issues/829
------------------------------------------------------------------------
r65962 | normal | 2018-11-25 04:59:51 +0900 (Sun, 25 Nov 2018) | 6 lines

io.c: disable nonblocking-by-default on win32 pipes

Lets admit Windows will always be too different from POSIX-like
platforms and non-blocking may never work as well or consistently.

[ruby-core:90042] [ruby-core:90044] [Bug #14968]
------------------------------------------------------------------------
r65961 | svn | 2018-11-25 04:54:35 +0900 (Sun, 25 Nov 2018) | 1 line

* 2018-11-25
------------------------------------------------------------------------
r65960 | odaira | 2018-11-25 04:54:32 +0900 (Sun, 25 Nov 2018) | 1 line

* common.mk: revise r65767 because AIX's grep does not support -A
------------------------------------------------------------------------
r65959 | nobu | 2018-11-24 21:48:56 +0900 (Sat, 24 Nov 2018) | 1 line

assertions for r65956
------------------------------------------------------------------------
r65958 | duerst | 2018-11-24 21:33:10 +0900 (Sat, 24 Nov 2018) | 1 line

remove guard against bug #15337, because it is fixed
------------------------------------------------------------------------
r65957 | svn | 2018-11-24 21:26:11 +0900 (Sat, 24 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65956 | naruse | 2018-11-24 21:26:07 +0900 (Sat, 24 Nov 2018) | 1 line

fix r65954; Keep tainty
------------------------------------------------------------------------
r65955 | duerst | 2018-11-24 21:10:25 +0900 (Sat, 24 Nov 2018) | 9 lines

add tests using Unicode test data for grapheme clusters

Add file test/ruby/enc/test_grapheme_breaks.rb to test String#each_grapheme_cluster
and \X extended grapheme cluster matcher in regular expressions against test data
provided by Unicode (ucd/auxiliary/GraphemeBreakTest.txt).

Some lines in the data file are ignored, as follows:
- Lines with a surrogate, because Ruby doesn't handle these
- The case of "\r\n", because there is a bug (#15337) in the implementation
------------------------------------------------------------------------
r65954 | naruse | 2018-11-24 20:53:19 +0900 (Sat, 24 Nov 2018) | 3 lines

Don't use single byte optimization on grapheme clusters

Unicode Text Segmentation considers CRLF as a character. [Bug #15337]
------------------------------------------------------------------------
r65953 | samuel | 2018-11-24 20:35:34 +0900 (Sat, 24 Nov 2018) | 3 lines

Ensure stack is correctly protected

See https://bugs.ruby-lang.org/issues/15335 for more details.
------------------------------------------------------------------------
r65952 | samuel | 2018-11-24 20:35:29 +0900 (Sat, 24 Nov 2018) | 4 lines

Change Makefile rule for assembly to use .S rather than .s

It is more conventional to use compiler to pre-process and
assemble the `.S` file rather than forcing Makefile to use `.s`.
------------------------------------------------------------------------
r65951 | nobu | 2018-11-24 19:29:23 +0900 (Sat, 24 Nov 2018) | 8 lines

Makefile.in: use ASMEXT in implicit rules

Use $(ASMEXT) instead of `.s` directly, as well as `.SUFFIXES:`
line.

Also, use the same suffix at compiling from `.c`.  These are
different things traditionally, but we won't mix same name files
with `.c` and `.s`.
------------------------------------------------------------------------
r65950 | knu | 2018-11-24 17:38:36 +0900 (Sat, 24 Nov 2018) | 1 line

Add entries regarding Enumerator::Chain to NEWS
------------------------------------------------------------------------
r65949 | knu | 2018-11-24 17:38:35 +0900 (Sat, 24 Nov 2018) | 13 lines

Implement Enumerator#+ and Enumerable#chain [Feature #15144]

They return an Enumerator::Chain object which is a subclass of
Enumerator, which represents a chain of enumerables that works as a
single enumerator.

```ruby
e = (1..3).chain([4, 5])
e.to_a #=> [1, 2, 3, 4, 5]

e = (1..3).each + [4, 5]
e.to_a #=> [1, 2, 3, 4, 5]
```
------------------------------------------------------------------------
r65948 | normal | 2018-11-24 17:23:26 +0900 (Sat, 24 Nov 2018) | 9 lines

io.c: wait on FD readability w/o GVL reacquisition

Since non-blocking I/O is the default after [Bug #14968],
we will hit it more often and cause more acquisition/release
of GVL to wait on single FD.

This also lets us avoid touching the temporal string locking
as much and lets us clean up some test changes made for
[Bug #14968]
------------------------------------------------------------------------
r65947 | nobu | 2018-11-24 13:34:00 +0900 (Sat, 24 Nov 2018) | 7 lines

Add clean-srcs

Add `clean-srcs` target to clean sources in the build directory,
and `realclean-srcs` target to clean autogenerated sources in the
source directory.  Also `realclean-srcs-extra` target to clean
sources which are generatable but need to install extra commands,
in addition.
------------------------------------------------------------------------
r65946 | nobu | 2018-11-24 13:33:59 +0900 (Sat, 24 Nov 2018) | 4 lines

Make ext/etc/constdefs.h by srcs-ext

Make platform independent header, ext/etc/constdefs.h, by `make
srcs-ext`.
------------------------------------------------------------------------
r65945 | samuel | 2018-11-24 11:31:11 +0900 (Sat, 24 Nov 2018) | 1 line

Fix argument order.
------------------------------------------------------------------------
r65944 | samuel | 2018-11-24 11:31:06 +0900 (Sat, 24 Nov 2018) | 1 line

Enable msys2 to check build status.
------------------------------------------------------------------------
r65943 | k0kubun | 2018-11-24 09:55:26 +0900 (Sat, 24 Nov 2018) | 5 lines

Fix r65926 test_dir.rb for windows (tilde)

[Fix GH-2022]

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r65942 | duerst | 2018-11-24 08:18:47 +0900 (Sat, 24 Nov 2018) | 5 lines

add GraphemeBreakeTests.txt file to UNICODE_PROPERTY_FILES for download

In common.mk, add the file GraphemeBreakeTests.txt to UNICODE_PROPERTY_FILES
to be downloaded. This will be used for automatic tests for /\X/ and
String#each_grapheme_cluster.
------------------------------------------------------------------------
r65941 | svn | 2018-11-24 07:01:38 +0900 (Sat, 24 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65940 | normal | 2018-11-24 07:01:35 +0900 (Sat, 24 Nov 2018) | 9 lines

thread.c (rb_wait_for_single_fd): do not miss IO#close notifications

RUBY_VM_CHECK_INTS_BLOCKING may switch threads and cause `fd'
to be closed.  So we must ensure we register the waiting_fd
before checking for interrupts.

This only affects the ppoll/poll-using implementation of
rb_wait_for_single_fd, as the select-based implementation
already register waiting_fd before checking for interrupts.
------------------------------------------------------------------------
r65939 | normal | 2018-11-24 06:38:41 +0900 (Sat, 24 Nov 2018) | 6 lines

io.c (io_fd_check_closed): prioritize cross-thread "stream closed"

This may fix failures from TestIO#test_recycled_fd_close because
interrupts may be missed due to TOCTOU in other places.

cf. http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1475034
------------------------------------------------------------------------
r65938 | svn | 2018-11-24 03:19:13 +0900 (Sat, 24 Nov 2018) | 1 line

* 2018-11-24
------------------------------------------------------------------------
r65937 | normal | 2018-11-24 03:19:07 +0900 (Sat, 24 Nov 2018) | 22 lines

io.c (fptr_finalize_flush): close race leading to EBADF

The previous ordering was:

a) notify waiting_fd threads of impending close
b) waiting on busy list from a)
c) invalidate fptr->fd
d) calling close()

However, it was possible for a new thread to enter
the waiting_fd list while scheduling on b), leading
to EBADF from those threads when we hit d).

Instead, we now avoid triggering EBADF in other threads by
reordering b) and c)

a) notify waiting_fd threads of impending close
c) invalidate fptr->fd
b) waiting on busy list from a)
d) calling close()

cf. http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1474526
------------------------------------------------------------------------
r65936 | nobu | 2018-11-23 21:12:10 +0900 (Fri, 23 Nov 2018) | 1 line

Ignore more DLEXT files [ci skip]
------------------------------------------------------------------------
r65935 | nobu | 2018-11-23 20:42:50 +0900 (Fri, 23 Nov 2018) | 4 lines

proc.c: [DOC] refine proc-compistion examples [ci skip]

* proc.c: [DOC] refine proc-compistion examples by using same
  Proc/Method and different composition orders.
------------------------------------------------------------------------
r65934 | kazu | 2018-11-23 19:59:59 +0900 (Fri, 23 Nov 2018) | 1 line

test/ruby/test_thread.rb: use safe navigation operator.
------------------------------------------------------------------------
r65933 | duerst | 2018-11-23 15:45:26 +0900 (Fri, 23 Nov 2018) | 6 lines

prepare for Unicode 11.0.0 update

- enc/unicode/case-folding.rb:
  - Convert unpredicted case to actual flag setting
  - Eliminate an unused variable
  - Change a variable name to avoid a warning
------------------------------------------------------------------------
r65932 | nobu | 2018-11-23 10:57:26 +0900 (Fri, 23 Nov 2018) | 1 line

split each assert_nothing_raised
------------------------------------------------------------------------
r65931 | normal | 2018-11-23 07:44:06 +0900 (Fri, 23 Nov 2018) | 10 lines

io.c: revalidate fptr->fd after rb_io_wait_readable

fptr->fd may become -1 while GVL is released in
rb_wait_for_single_fd, so we must check it after reacquiring
GVL.  This should avoid EBADF errors exposed by making pipes
non-blocking by default:

http://ci.rvm.jp/results/trunk-test@ruby-sky3/1473710

[Bug #14968]
------------------------------------------------------------------------
r65930 | svn | 2018-11-23 05:02:39 +0900 (Fri, 23 Nov 2018) | 1 line

* 2018-11-23
------------------------------------------------------------------------
r65929 | normal | 2018-11-23 05:02:36 +0900 (Fri, 23 Nov 2018) | 9 lines

socket: disable nonblocking-by-default on win32

Perhaps this fixes test failures reported by Greg and k0kubun.

However, the failure of certain tests to handle non-blocking I/O
seems to indicate pre-existing problems on win32 platforms.
Somebody knowledgeable about win32 should be able to fix it.

[ruby-core:89973] [ruby-core:89976] [ruby-core:89977] [Bug #14968]
------------------------------------------------------------------------
r65928 | k0kubun | 2018-11-22 22:29:44 +0900 (Thu, 22 Nov 2018) | 3 lines

mjit.c: avoid running copy job handler after ISeq GC

like this http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1471633
------------------------------------------------------------------------
r65927 | naruse | 2018-11-22 20:03:19 +0900 (Thu, 22 Nov 2018) | 3 lines

Wait accept is ready also on Solaris

https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181121T212405Z.diff.html.gz
------------------------------------------------------------------------
r65926 | naruse | 2018-11-22 19:43:42 +0900 (Thu, 22 Nov 2018) | 6 lines

Use File.expand_path("~username") instead of ENV["HOME"]

File.expand_path("~username") uses getpwnam() independently from
Dir.home. [Bug #15324]

From: Chris Seaton <chris@chrisseaton.com>
------------------------------------------------------------------------
r65925 | normal | 2018-11-22 19:13:21 +0900 (Thu, 22 Nov 2018) | 6 lines

ext/socket/init.c (rsock_socket0): non-blocking for non-SOCK_NONBLOCK

We need to make sockets non-blocking for systems without
SOCK_CLOEXEC/SOCK_NONBLOCK macros at all.

[ruby-core:89965] [Bug #14968]
------------------------------------------------------------------------
r65924 | svn | 2018-11-22 18:18:43 +0900 (Thu, 22 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65923 | nobu | 2018-11-22 18:18:40 +0900 (Thu, 22 Nov 2018) | 4 lines

Revert r63030

* array.c (rb_ary_collect): no longer splat sole array for lambda.
  [ruby-core:89734] [Bug #15285]
------------------------------------------------------------------------
r65922 | normal | 2018-11-22 17:46:51 +0900 (Thu, 22 Nov 2018) | 26 lines

io + socket: make pipes and sockets nonblocking by default

All normal Ruby IO methods (IO#read, IO#gets, IO#write, ...) are
all capable of appearing to be "blocking" when presented with a
file description with the O_NONBLOCK flag set; so there is
little risk of incompatibility within Ruby-using programs.

The biggest compatibility risk is when spawning external
programs.  As a result, stdin, stdout, and stderr are now always
made blocking before exec-family calls.

This change will make an event-oriented MJIT usable if it is
waiting on pipes on POSIX_like platforms.

It is ALSO necessary to take advantage of (proposed lightweight
concurrency (aka "auto-Fiber") or any similar proposal for
network concurrency: https://bugs.ruby-lang.org/issues/13618

Named-pipe (FIFO) are NOT yet non-blocking by default since
they are rarely-used and may introduce compatibility problems
and extra syscall overhead for a common path.

Please revert this commit if there are problems and if I am afk
since I am afk a lot, lately.

[ruby-core:89950] [Bug #14968]
------------------------------------------------------------------------
r65921 | normal | 2018-11-22 17:46:44 +0900 (Thu, 22 Nov 2018) | 3 lines

configure.ac: support 32-bit builds on x86-64 systems

Because RAM is still expensive :<
------------------------------------------------------------------------
r65920 | nobu | 2018-11-22 17:29:02 +0900 (Thu, 22 Nov 2018) | 5 lines

Enable refinements at Object#respond_to?

[Feature #15327] [Fix GH-2020]

From: osyo-manga <manga.osyo@gmail.com>
------------------------------------------------------------------------
r65919 | nobu | 2018-11-22 16:53:07 +0900 (Thu, 22 Nov 2018) | 5 lines

Enable refinements to public_send.

[Feature #15326] [Fix GH-2019]

From: manga_osyo <manga.osyo@gmail.com>
------------------------------------------------------------------------
r65918 | nobu | 2018-11-22 15:09:07 +0900 (Thu, 22 Nov 2018) | 3 lines

mjit_archflag.sh: fix bare word in the header

[ruby-dev:50674] [Bug #15319]
------------------------------------------------------------------------
r65917 | kazu | 2018-11-22 15:08:50 +0900 (Thu, 22 Nov 2018) | 1 line

.gitignore: add mjit_build_dir.c [ci skip]
------------------------------------------------------------------------
r65916 | kazu | 2018-11-22 15:08:49 +0900 (Thu, 22 Nov 2018) | 1 line

.gitignore: add .time under coroutine [ci skip]
------------------------------------------------------------------------
r65915 | kazu | 2018-11-22 15:08:47 +0900 (Thu, 22 Nov 2018) | 3 lines

.gitignore: revert r65834 partially [ci skip]

and exclude under coroutine only.
------------------------------------------------------------------------
r65914 | nobu | 2018-11-22 14:51:43 +0900 (Thu, 22 Nov 2018) | 3 lines

Proc#<< and Proc#>>

[Feature #6284]
------------------------------------------------------------------------
r65913 | nobu | 2018-11-22 14:51:42 +0900 (Thu, 22 Nov 2018) | 15 lines

proc.c: Support any callable when composing Procs

* proc.c (proc_compose): support any object with a call method rather
  than supporting only procs. [Feature #6284]

* proc.c (compose): use the function call on the given object rather
  than rb_proc_call_with_block in order to support any object.

* test/ruby/test_proc.rb: Add test cases for composing Procs with
  callable objects.

* test/ruby/test_method.rb: Add test cases for composing Methods with
  callable objects.

From: Paul Mucur <paul@altmetric.com>
------------------------------------------------------------------------
r65912 | nobu | 2018-11-22 14:51:41 +0900 (Thu, 22 Nov 2018) | 8 lines

proc.c: Implement Method#* for Method composition

* proc.c (rb_method_compose): Implement Method#* for Method composition,
  which delegates to Proc#*.

* test/ruby/test_method.rb: Add test cases for Method composition.

From: Paul Mucur <mudge@mudge.name>
------------------------------------------------------------------------
r65911 | nobu | 2018-11-22 14:51:40 +0900 (Thu, 22 Nov 2018) | 8 lines

proc.c: Implement Proc#* for Proc composition

* proc.c (proc_compose): Implement Proc#* for Proc composition, enabling
  composition of Procs and Methods. [Feature #6284]

* test/ruby/test_proc.rb: Add test cases for Proc composition.

From: Paul Mucur <mudge@mudge.name>
------------------------------------------------------------------------
r65910 | k0kubun | 2018-11-22 12:39:07 +0900 (Thu, 22 Nov 2018) | 5 lines

Revert "test_gem_remote_fetcher.rb: give up testing MJIT here"

This reverts commit d12bcfc186f2aea5e83f2f59716958ea12b5c937.

pause on --jit-wait looks not working... I'll fix that first.
------------------------------------------------------------------------
r65909 | samuel | 2018-11-22 11:17:44 +0900 (Thu, 22 Nov 2018) | 1 line

Use VirtualAlloc/VirtualProtect/VirtualFree for windows stack allocation.
------------------------------------------------------------------------
r65908 | odaira | 2018-11-22 07:44:24 +0900 (Thu, 22 Nov 2018) | 3 lines

* configure.ac: On AIX, LDFLAGS must be after -L../.. in TRY_LINK,
  not to refer to a system-installed libruby-static.a
  when configuring the ext libraries
------------------------------------------------------------------------
r65907 | svn | 2018-11-22 05:39:12 +0900 (Thu, 22 Nov 2018) | 1 line

* 2018-11-22
------------------------------------------------------------------------
r65906 | odaira | 2018-11-22 05:39:09 +0900 (Thu, 22 Nov 2018) | 7 lines

errno.h must be included after config.h because config.h might define
_REENTRANT, _THREAD_SAFE, etc., which affect how errno is defined
on some architectures

* ext/openssl/ossl.h: include errno.h after ruby.h

* include/ruby/io.h: include errno.h after ruby/config.h
------------------------------------------------------------------------
r65905 | k0kubun | 2018-11-21 20:33:25 +0900 (Wed, 21 Nov 2018) | 7 lines

test_gem_remote_fetcher.rb: give up testing MJIT here

because we can't configure timeout for remote fetcher.

We've sometimes hit timeout.
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5bf5213c183106002857d355?step=5bf530de63e94600071b0785
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5be3d719567ae90007681ed6?step=5be43b3887436a0006d00d21
------------------------------------------------------------------------
r65904 | hsbt | 2018-11-21 19:20:47 +0900 (Wed, 21 Nov 2018) | 10 lines

Merge master branch from rubygems/rubygems upstream.

  * Enable Style/MethodDefParentheses in Rubocop
    https://github.com/rubygems/rubygems/pull/2478
  * Enable Style/MultilineIfThen in Rubocop
    https://github.com/rubygems/rubygems/pull/2479
  * Fix required_ruby_version with prereleases and improve error message
    https://github.com/rubygems/rubygems/pull/2344
  * Fix bundler rubygems binstub not properly looking for bundler
    https://github.com/rubygems/rubygems/pull/2426
------------------------------------------------------------------------
r65903 | nobu | 2018-11-21 19:09:21 +0900 (Wed, 21 Nov 2018) | 1 line

Get rid of variable modifiers of BSD make
------------------------------------------------------------------------
r65902 | nobu | 2018-11-21 18:27:47 +0900 (Wed, 21 Nov 2018) | 3 lines

Makefile.in: get rid of `local` for Solaris sh

[ruby-dev:50673] [Bug #15319]
------------------------------------------------------------------------
r65901 | nobu | 2018-11-21 18:11:06 +0900 (Wed, 21 Nov 2018) | 1 line

configure.ac: silence `command -v` outpout
------------------------------------------------------------------------
r65900 | shyouhei | 2018-11-21 17:51:39 +0900 (Wed, 21 Nov 2018) | 7 lines

char is not unsigned

It seems that decades ago, ruby was written under assumption that
char is unsigned.  Which is of course a false assumption.  We
need to explicitly store a numeric value into an unsigned char
variable to tell we expect 0..255 value.

------------------------------------------------------------------------
r65899 | nobu | 2018-11-21 12:26:59 +0900 (Wed, 21 Nov 2018) | 4 lines

configure.ac: add --disable-fiber-coroutine option

* configure.ac: add --disable-fiber-coroutine option, and disable
  it on x86-mingw32 for now.
------------------------------------------------------------------------
r65898 | nobu | 2018-11-21 12:26:58 +0900 (Wed, 21 Nov 2018) | 1 line

configure.ac: gather preset variables on mingw
------------------------------------------------------------------------
r65897 | naruse | 2018-11-21 07:40:21 +0900 (Wed, 21 Nov 2018) | 4 lines

Show function name based on dladdr

If there's no dwarf and symbol table, this will be a last resort.
(mainly on macOS)
------------------------------------------------------------------------
r65896 | naruse | 2018-11-21 07:40:20 +0900 (Wed, 21 Nov 2018) | 1 line

Support Universal Binary for macOS
------------------------------------------------------------------------
r65895 | samuel | 2018-11-21 05:09:38 +0900 (Wed, 21 Nov 2018) | 1 line

Fix indentation.
------------------------------------------------------------------------
r65894 | svn | 2018-11-21 00:46:11 +0900 (Wed, 21 Nov 2018) | 1 line

* 2018-11-21
------------------------------------------------------------------------
r65893 | k0kubun | 2018-11-21 00:46:09 +0900 (Wed, 21 Nov 2018) | 4 lines

Skip known MJIT random test failures

Let me silence this until I have time to work on them, and make the CI
usable for testing other features.
------------------------------------------------------------------------
r65892 | k0kubun | 2018-11-20 23:40:55 +0900 (Tue, 20 Nov 2018) | 13 lines

configure.ac: disable native-fiber for MinGW

because it had already been SEGV-ed in pull request'S CI
https://ci.appveyor.com/project/ruby/ruby/builds/20427065/job/32oahrcd58b8ubb1
and has never worked on trunk either.

Please make sure it does not SEGVs on your MinGW environment or pull
request before enabling native fiber on MinGW.

appveyor.yml: reverted commits to make CI green with native fiber
test/excludes/_appveyor/msys2/TestArray.rb: ditto
test/excludes/_appveyor/msys2/TestEnumerable.rb: ditto
test/excludes/_appveyor/vs/TestArray.rb: ditto
------------------------------------------------------------------------
r65891 | k0kubun | 2018-11-20 23:13:12 +0900 (Tue, 20 Nov 2018) | 5 lines

appveyor.yml: do not undefine everything [ci skip]

https://ci.appveyor.com/project/ruby/ruby/builds/20432223/job/yhwbku8dg2s40e9e
C:/projects/ruby/test/lib/test/unit.rb:1004: warning: undefining `object_id' may cause serious problems
C:/projects/ruby/test/lib/test/unit.rb:1004: warning: undefining `__send__' may cause serious problems
------------------------------------------------------------------------
r65890 | svn | 2018-11-20 22:39:51 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65889 | k0kubun | 2018-11-20 22:39:50 +0900 (Tue, 20 Nov 2018) | 4 lines

appveyor.yml: exclude TestEnumerable.rb on msys2

because it SEGVs on setup like:
https://ci.appveyor.com/project/ruby/ruby/builds/20431217/job/97no5h1gqv50k1vf
------------------------------------------------------------------------
r65888 | k0kubun | 2018-11-20 21:59:32 +0900 (Tue, 20 Nov 2018) | 7 lines

appveyor.yml: native-fiber crashes Enumerator

test on MinGW.
https://ci.appveyor.com/project/ruby/ruby/builds/20427662/job/tnnw50opqtj6x0xq
https://ci.appveyor.com/project/ruby/ruby/builds/20429129/job/dpgbx5atkxjiwh7q

To investigate issues, let's try running this without -j.
------------------------------------------------------------------------
r65887 | nobu | 2018-11-20 21:02:29 +0900 (Tue, 20 Nov 2018) | 1 line

Make coroutine object directory for each arch
------------------------------------------------------------------------
r65886 | k0kubun | 2018-11-20 21:01:18 +0900 (Tue, 20 Nov 2018) | 1 line

test/excludes/_appveyor: exclude AppVeyor killer
------------------------------------------------------------------------
r65885 | nobu | 2018-11-20 20:45:13 +0900 (Tue, 20 Nov 2018) | 4 lines

Change ASMEXT to s

By the default of GNU make, .S is used to be compiled with CC, but
we have already used .s as ia64.s, and now coroutine/*/Context.s.
------------------------------------------------------------------------
r65884 | k0kubun | 2018-11-20 20:24:30 +0900 (Tue, 20 Nov 2018) | 5 lines

Makefile.in: fix Travis i686 build

by r65880

https://travis-ci.org/ruby/ruby/jobs/457384539
------------------------------------------------------------------------
r65883 | k0kubun | 2018-11-20 20:18:59 +0900 (Tue, 20 Nov 2018) | 4 lines

mjit_worker.c: avoid GC when modifying ISeq

This is hoped to fix the SEGV:
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf392cf183106002856c1f0?step=5bf3bddc87436a0006292535
------------------------------------------------------------------------
r65882 | nobu | 2018-11-20 19:51:27 +0900 (Tue, 20 Nov 2018) | 4 lines

Fix condition

FIBER_USE_NATIVE is always defined as 0 or 1, use `#if` instead of
`#ifdef`.
------------------------------------------------------------------------
r65881 | nobu | 2018-11-20 19:43:41 +0900 (Tue, 20 Nov 2018) | 1 line

Make fiber_entry static
------------------------------------------------------------------------
r65880 | nobu | 2018-11-20 19:29:03 +0900 (Tue, 20 Nov 2018) | 6 lines

Fix typo and make directory

* common.mk (coroutine/amd64/Context.$(OBJEXT)): fix a typo,
  $(OBJECT).

* common.mk (coroutine/amd64): recipe to make object directory.
------------------------------------------------------------------------
r65879 | samuel | 2018-11-20 19:18:25 +0900 (Tue, 20 Nov 2018) | 1 line

Support Visual C++ (mswin)
------------------------------------------------------------------------
r65878 | samuel | 2018-11-20 19:18:21 +0900 (Tue, 20 Nov 2018) | 1 line

Fix windows builds.
------------------------------------------------------------------------
r65877 | svn | 2018-11-20 19:18:17 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65876 | samuel | 2018-11-20 19:18:16 +0900 (Tue, 20 Nov 2018) | 1 line

GAS style assembly for win64 (mingw).
------------------------------------------------------------------------
r65875 | samuel | 2018-11-20 19:18:12 +0900 (Tue, 20 Nov 2018) | 1 line

Expose stack functions to coroutine and non-windows implementations.
------------------------------------------------------------------------
r65874 | samuel | 2018-11-20 19:18:08 +0900 (Tue, 20 Nov 2018) | 1 line

Fix exposure of stack allocations.
------------------------------------------------------------------------
r65873 | samuel | 2018-11-20 19:18:04 +0900 (Tue, 20 Nov 2018) | 1 line

Use malloc/free for windows stack allocation.
------------------------------------------------------------------------
r65872 | samuel | 2018-11-20 19:18:01 +0900 (Tue, 20 Nov 2018) | 1 line

Fix struct usage.
------------------------------------------------------------------------
r65871 | samuel | 2018-11-20 19:17:56 +0900 (Tue, 20 Nov 2018) | 1 line

Fix message result.
------------------------------------------------------------------------
r65870 | samuel | 2018-11-20 19:17:52 +0900 (Tue, 20 Nov 2018) | 1 line

Fix configure.ac typo.
------------------------------------------------------------------------
r65869 | samuel | 2018-11-20 19:17:49 +0900 (Tue, 20 Nov 2018) | 1 line

Fix line endings.
------------------------------------------------------------------------
r65868 | samuel | 2018-11-20 19:17:44 +0900 (Tue, 20 Nov 2018) | 1 line

Initial support for x64-mingw32
------------------------------------------------------------------------
r65867 | samuel | 2018-11-20 19:17:39 +0900 (Tue, 20 Nov 2018) | 1 line

Better (?) support for Windows TIB.
------------------------------------------------------------------------
r65866 | samuel | 2018-11-20 19:17:35 +0900 (Tue, 20 Nov 2018) | 1 line

Be even more specific, for some reason it was selecting amd64 on x64-mingw32.
------------------------------------------------------------------------
r65865 | samuel | 2018-11-20 19:17:31 +0900 (Tue, 20 Nov 2018) | 1 line

Limit coroutine implementations to Linux.
------------------------------------------------------------------------
r65864 | samuel | 2018-11-20 19:17:27 +0900 (Tue, 20 Nov 2018) | 1 line

Tidy up assembly make rule.
------------------------------------------------------------------------
r65863 | samuel | 2018-11-20 19:17:24 +0900 (Tue, 20 Nov 2018) | 1 line

Expose dependency between cont.c and coroutine implementation.
------------------------------------------------------------------------
r65862 | svn | 2018-11-20 19:17:19 +0900 (Tue, 20 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65861 | samuel | 2018-11-20 19:17:17 +0900 (Tue, 20 Nov 2018) | 1 line

Prefer "static inline" to avoid duplicate symbols.
------------------------------------------------------------------------
r65860 | samuel | 2018-11-20 19:17:12 +0900 (Tue, 20 Nov 2018) | 1 line

Remove trailing whitespace.
------------------------------------------------------------------------
r65859 | samuel | 2018-11-20 19:17:08 +0900 (Tue, 20 Nov 2018) | 1 line

Rename fiber chain benchmark.
------------------------------------------------------------------------
r65858 | samuel | 2018-11-20 19:17:04 +0900 (Tue, 20 Nov 2018) | 1 line

Restore native non-coroutine code path.
------------------------------------------------------------------------
r65857 | samuel | 2018-11-20 19:17:00 +0900 (Tue, 20 Nov 2018) | 1 line

Formatting changes.
------------------------------------------------------------------------
r65856 | samuel | 2018-11-20 19:16:54 +0900 (Tue, 20 Nov 2018) | 1 line

Ensure start function has correct declaration.
------------------------------------------------------------------------
r65855 | samuel | 2018-11-20 19:16:49 +0900 (Tue, 20 Nov 2018) | 1 line

Try using compiler for assembling.
------------------------------------------------------------------------
r65854 | samuel | 2018-11-20 19:16:45 +0900 (Tue, 20 Nov 2018) | 1 line

Print out what the assembler is doing to figure out why it's not working.
------------------------------------------------------------------------
r65853 | samuel | 2018-11-20 19:16:41 +0900 (Tue, 20 Nov 2018) | 1 line

Mark COROUTINE as noreturn.
------------------------------------------------------------------------
r65852 | svn | 2018-11-20 19:16:35 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65851 | samuel | 2018-11-20 19:16:34 +0900 (Tue, 20 Nov 2018) | 1 line

Remove `Benchmark` times.
------------------------------------------------------------------------
r65850 | samuel | 2018-11-20 19:16:29 +0900 (Tue, 20 Nov 2018) | 1 line

Tidy up comments.
------------------------------------------------------------------------
r65849 | svn | 2018-11-20 19:14:03 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65848 | svn | 2018-11-20 19:14:03 +0900 (Tue, 20 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65847 | samuel | 2018-11-20 19:13:59 +0900 (Tue, 20 Nov 2018) | 1 line

Initial effort to support 32-bit Linux.
------------------------------------------------------------------------
r65846 | samuel | 2018-11-20 19:13:55 +0900 (Tue, 20 Nov 2018) | 1 line

It cannot be const because it is being passed to destructive operation (destroy).
------------------------------------------------------------------------
r65845 | samuel | 2018-11-20 19:13:51 +0900 (Tue, 20 Nov 2018) | 1 line

Better benchmark name.
------------------------------------------------------------------------
r65844 | svn | 2018-11-20 19:09:55 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65843 | samuel | 2018-11-20 19:09:53 +0900 (Tue, 20 Nov 2018) | 1 line

Fix broken benchmark
------------------------------------------------------------------------
r65842 | svn | 2018-11-20 19:06:59 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65841 | samuel | 2018-11-20 19:06:58 +0900 (Tue, 20 Nov 2018) | 1 line

Fix code climate cognitive complexity issue
------------------------------------------------------------------------
r65840 | samuel | 2018-11-20 19:06:54 +0900 (Tue, 20 Nov 2018) | 1 line

Create output directory when assembling file
------------------------------------------------------------------------
r65839 | samuel | 2018-11-20 18:59:23 +0900 (Tue, 20 Nov 2018) | 1 line

Restore return value assignment
------------------------------------------------------------------------
r65838 | svn | 2018-11-20 18:59:20 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65837 | svn | 2018-11-20 18:59:19 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65836 | samuel | 2018-11-20 18:59:18 +0900 (Tue, 20 Nov 2018) | 1 line

Rewrite fiber benchmark
------------------------------------------------------------------------
r65835 | samuel | 2018-11-20 18:59:14 +0900 (Tue, 20 Nov 2018) | 1 line

Better support for amd64 platforms
------------------------------------------------------------------------
r65834 | samuel | 2018-11-20 18:59:10 +0900 (Tue, 20 Nov 2018) | 1 line

Native implementation of coroutines to improve performance of fibers
------------------------------------------------------------------------
r65833 | nobu | 2018-11-20 18:29:37 +0900 (Tue, 20 Nov 2018) | 1 line

common.mk: BTESTS to direct tests by btest
------------------------------------------------------------------------
r65832 | normal | 2018-11-20 16:27:28 +0900 (Tue, 20 Nov 2018) | 6 lines

thread_pthread.c (rb_reserved_fd_p): false-positive on negative FD

Negative-numbered FDs are never valid FDs on POSIX-like
platforms, and we initialize our self-pipes/eventfd values
to "-1", so stop treating -1 as a reserved FD if our system
is too low on resources to allocate FDs at startup.
------------------------------------------------------------------------
r65831 | nobu | 2018-11-20 15:13:42 +0900 (Tue, 20 Nov 2018) | 1 line

run single test [ci skip]
------------------------------------------------------------------------
r65830 | shyouhei | 2018-11-20 14:58:12 +0900 (Tue, 20 Nov 2018) | 2 lines

vm_insnhelper.c: fix indent [ci skip]

------------------------------------------------------------------------
r65829 | usa | 2018-11-20 14:18:28 +0900 (Tue, 20 Nov 2018) | 2 lines

Simply treat IO::WaitReadable just like Errno::EAGAIN

------------------------------------------------------------------------
r65828 | shyouhei | 2018-11-20 13:51:09 +0900 (Tue, 20 Nov 2018) | 14 lines

vm_insnhelper.c: recv -1 + 3 overflows

Here, recv can be INT2FIX(-1), which is 0xFFFF_FFFFul.
INT2FIX(1) is 3ul.  So `recv - 1 + INT2FIX(1)` is:

recv              0xFFFF_FFFFul
recv-1            0xFFFF_FFFEul (note: unsigned)
recv-1+INT2FIX(1) 0x0000_0001ul Here is the overflow.

Given recv is a Fixnum, it can never be 0xFFFF_FFFD.  0xFFFF_FFFF is
the only value that can overflow this way, so special-casing this
value should just suffice.


------------------------------------------------------------------------
r65827 | shugo | 2018-11-20 12:56:51 +0900 (Tue, 20 Nov 2018) | 15 lines

revert r65822

Because mon_initialized may be used to re-initialize copied objects intentionally.

mon_initialize_spec.rb fails:

1)
MonitorMixin#mon_initialize can be called in initialize_copy to get a new Mutex and used with synchronize ERROR
ThreadError: already initialized
/home/shugo/src/ruby/lib/monitor.rb:255:in `mon_initialize'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:19:in `initialize_copy'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `initialize_dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `block (2 levels) in <top (required)>'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:4:in `<top (required)>'
------------------------------------------------------------------------
r65826 | nobu | 2018-11-20 12:07:46 +0900 (Tue, 20 Nov 2018) | 1 line

rdoc query
------------------------------------------------------------------------
r65825 | kazu | 2018-11-20 12:03:02 +0900 (Tue, 20 Nov 2018) | 1 line

mjit.c: fix typos [ci skip]
------------------------------------------------------------------------
r65824 | kazu | 2018-11-20 12:03:01 +0900 (Tue, 20 Nov 2018) | 1 line

Remove unnecessary space
------------------------------------------------------------------------
r65823 | svn | 2018-11-20 12:01:57 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65822 | shugo | 2018-11-20 12:01:55 +0900 (Tue, 20 Nov 2018) | 3 lines

lib/monitor.rb: prevent to initialize MonitorMixin twice

Suggested by Benoit Daloze.  [ruby-core:88504] [Feature #15000]
------------------------------------------------------------------------
r65821 | k0kubun | 2018-11-20 11:16:30 +0900 (Tue, 20 Nov 2018) | 5 lines

revert r65820 and retry assert_finish

From: MSP-Greg <greg.mpls@gmail.com>

https://github.com/ruby/ruby/commit/5187ea768f57315e61486122d688f1992d4cb21f
------------------------------------------------------------------------
r65820 | k0kubun | 2018-11-20 10:28:43 +0900 (Tue, 20 Nov 2018) | 7 lines

test_thread.rb: skip test_thread.rb broken for Windows

msys2.

https://ci.appveyor.com/project/ruby/ruby/builds/20419607/job/fuvrfcmrhxr1r1cr
https://ci.appveyor.com/project/ruby/ruby/builds/20395349/job/2nqewb06b5eanwea
https://ci.appveyor.com/project/ruby/ruby/builds/20382452/job/658pvl1cqolyrixm
------------------------------------------------------------------------
r65819 | nobu | 2018-11-20 09:39:07 +0900 (Tue, 20 Nov 2018) | 4 lines

Check -fcf-protection

* configure.ac: Check if CFLAGS actually includes -fcf-protection
  instead of checking if the flag is valid by RUBY_TRY_CFLAGS.
------------------------------------------------------------------------
r65818 | k0kubun | 2018-11-20 09:07:36 +0900 (Tue, 20 Nov 2018) | 1 line

thread.c: fix obsoleted comment [ci skip]
------------------------------------------------------------------------
r65817 | k0kubun | 2018-11-20 09:04:19 +0900 (Tue, 20 Nov 2018) | 5 lines

process.c: do not try to pause MJIT

while child handler is disabled.

trying to fix [Bug #15320]
------------------------------------------------------------------------
r65816 | k0kubun | 2018-11-20 08:28:30 +0900 (Tue, 20 Nov 2018) | 4 lines

test_process.rb: Process.daemon seems irrelevant [ci skip]

in the backtrace:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468677
------------------------------------------------------------------------
r65815 | k0kubun | 2018-11-20 08:05:11 +0900 (Tue, 20 Nov 2018) | 5 lines

configure.ac: avoid crashing MJIT with -fcf-protection

by avoiding using __builtin_longjmp, like r64983.

[Bug #15307]
------------------------------------------------------------------------
r65814 | k0kubun | 2018-11-20 07:10:12 +0900 (Tue, 20 Nov 2018) | 6 lines

revert r65807

it didn't work.
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468677

and skips broken tests for now. But this issue should be fixed soon.
------------------------------------------------------------------------
r65813 | svn | 2018-11-20 00:00:37 +0900 (Tue, 20 Nov 2018) | 1 line

* 2018-11-20
------------------------------------------------------------------------
r65812 | nobu | 2018-11-20 00:00:35 +0900 (Tue, 20 Nov 2018) | 4 lines

ruby/ruby.h: void rb_scan_args_verify

* include/ruby/ruby.h (rb_scan_args_verify): void the never used
  result.
------------------------------------------------------------------------
r65811 | k0kubun | 2018-11-19 23:21:55 +0900 (Mon, 19 Nov 2018) | 4 lines

appveyor.yml: separately execute test_bignum

because that may crash worker with -j.
https://ci.appveyor.com/project/ruby/ruby/builds/20403179/job/mkdcb6uy8qn2djgl
------------------------------------------------------------------------
r65810 | k0kubun | 2018-11-19 23:00:49 +0900 (Mon, 19 Nov 2018) | 8 lines

ruby.c: do not surface MJIT to user

In some places, both JIT and MJIT are being used, but it could be
confusing for new comers. We're not explaining MJIT on NEWS file or release
notes as well. So we consider MJIT as an internal term of implementation
like YARV.

configure.ac: ditto
------------------------------------------------------------------------
r65809 | k0kubun | 2018-11-19 22:48:07 +0900 (Mon, 19 Nov 2018) | 1 line

internal.h: resurrect --disable-mjit-support
------------------------------------------------------------------------
r65808 | nobu | 2018-11-19 22:43:44 +0900 (Mon, 19 Nov 2018) | 6 lines

fix for Solaris sh

* Makefile.in (mjit_config.h): removed unnecessary assignment.

* tool/mjit_archflag.sh (define_arch_flags): need to quote on
  Solaris.  [ruby-dev:50669] [Bug #15319]
------------------------------------------------------------------------
r65807 | k0kubun | 2018-11-19 22:33:07 +0900 (Mon, 19 Nov 2018) | 7 lines

process.c: do not run signal handler before fork

to prevent from proceeding one for MJIT while it's not safe yet.
By that situation, MJIT worker could be waiting for compiler process forever
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468033

[Bug #15320]
------------------------------------------------------------------------
r65806 | nobu | 2018-11-19 22:21:48 +0900 (Mon, 19 Nov 2018) | 4 lines

configure.ac: rename extra_warning as extra_warnflags

Adjusted to warnflags variable.  This variable will have flags for
warnings, but not a warning itself.
------------------------------------------------------------------------
r65805 | nobu | 2018-11-19 19:15:20 +0900 (Mon, 19 Nov 2018) | 1 line

configure.ac: respect extra_warnflags if given
------------------------------------------------------------------------
r65804 | shyouhei | 2018-11-19 18:52:46 +0900 (Mon, 19 Nov 2018) | 5 lines

string.c: setbyte silently ignores upper bits

The behaviour of String#setbyte has been depending on the width
of int, which is not portable.  Must check explicitly.

------------------------------------------------------------------------
r65803 | nobu | 2018-11-19 18:42:10 +0900 (Mon, 19 Nov 2018) | 1 line

.travis.yml: do not pass unnecessary warnflags
------------------------------------------------------------------------
r65802 | shyouhei | 2018-11-19 17:10:48 +0900 (Mon, 19 Nov 2018) | 6 lines

io.c: ungetbyte silently ignores upper bits

The behaviour of IO#ungetbyte has been depending on the width of
Fixnums.  Fixnums should be invisible nowadays.  It must be a
bug. Fix [Bug #14359]

------------------------------------------------------------------------
r65801 | nobu | 2018-11-19 16:00:12 +0900 (Mon, 19 Nov 2018) | 5 lines

_colorize_result_prepare.m4: do not save CONFIGURE_TTY

redirection to a tty, file or pipe is not a permanent status.
`rb_cv_` prefix means that it should be saved/restored across
re-configurations.
------------------------------------------------------------------------
r65800 | nobu | 2018-11-19 15:52:55 +0900 (Mon, 19 Nov 2018) | 1 line

Makefile.in: reconfig with the original warnflags
------------------------------------------------------------------------
r65799 | nobu | 2018-11-19 15:52:54 +0900 (Mon, 19 Nov 2018) | 4 lines

.travis.yml: use dedicated flags

* .travis.yml: use dedicated flags, cflags and others, not to
  override optflags, warnflags and debugflags.
------------------------------------------------------------------------
r65798 | shyouhei | 2018-11-19 15:48:09 +0900 (Mon, 19 Nov 2018) | 7 lines

array.c: avoid (VALUE)--

This args[1]-- overflows when it is zero.  Should do that only
when we can say it is nonzero.



------------------------------------------------------------------------
r65797 | shyouhei | 2018-11-19 14:04:02 +0900 (Mon, 19 Nov 2018) | 2 lines

.travis.yml: -Wno-unknown-warning-option is needed, too.

------------------------------------------------------------------------
r65796 | shyouhei | 2018-11-19 12:08:32 +0900 (Mon, 19 Nov 2018) | 5 lines

.travis.yml: extra CFLAGS to suppress warnings

When CFLAGS is passed on travis, warnflags seems not working.
Let's add them directly to prevent clang form messing up the logs.

------------------------------------------------------------------------
r65795 | shyouhei | 2018-11-19 12:01:55 +0900 (Mon, 19 Nov 2018) | 5 lines

-Wno-unused-value [ci skip]

Without this option clang outputs tons of warnings, which
are annoying. See https://travis-ci.org/ruby/ruby/jobs/456553420#L1817

------------------------------------------------------------------------
r65794 | shyouhei | 2018-11-19 11:58:51 +0900 (Mon, 19 Nov 2018) | 4 lines

sort lines [ci skip]

... for aethetic reasons.

------------------------------------------------------------------------
r65793 | svn | 2018-11-19 08:29:42 +0900 (Mon, 19 Nov 2018) | 1 line

* 2018-11-19
------------------------------------------------------------------------
r65792 | nobu | 2018-11-19 08:29:41 +0900 (Mon, 19 Nov 2018) | 1 line

Also clean ruby-runner.o and ruby.imp [ci skip]
------------------------------------------------------------------------
r65791 | nobu | 2018-11-19 08:29:40 +0900 (Mon, 19 Nov 2018) | 3 lines

update-deps: fix runtime error [ci skip]

* tool/update-deps (init_global): environment strings are frozen.
------------------------------------------------------------------------
r65790 | k0kubun | 2018-11-18 22:32:49 +0900 (Sun, 18 Nov 2018) | 14 lines

mjit.c: fix deadlock introduced by r65785

in mjit_pause() fired by before_fork_ruby(). When calling
RUBY_VM_CHECK_INTS() in mjit_pause()'s loop, other threads may call
start_worker() which sets `stop_worker_p = FALSE` and it could wait for
MJIT worker stop forever even while `stop_worker_p` is FALSE.

http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1466333
https://gist.github.com/ko1/a57ef1a03e1c7cfd22f1495e0864b63d

http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1466335
https://gist.github.com/ko1/96e867e36e6b75559b3d926f8c0bdaeb

https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf1221c183106002855989c?step=5bf1225987436a0006192c31
------------------------------------------------------------------------
r65789 | k0kubun | 2018-11-18 18:32:29 +0900 (Sun, 18 Nov 2018) | 4 lines

wercker.yml: debug problematic test on test-all

Some test seems to hang
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf1221c183106002855989c?step=5bf1225987436a0006192c31
------------------------------------------------------------------------
r65788 | k0kubun | 2018-11-18 18:22:48 +0900 (Sun, 18 Nov 2018) | 4 lines

test_jit.rb: loosen output check

for interleaving between processes
https://gist.github.com/ko1/ace0374825377b41628d4590b7377601
------------------------------------------------------------------------
r65787 | k0kubun | 2018-11-18 17:44:16 +0900 (Sun, 18 Nov 2018) | 4 lines

test_jit.rb: dump information to debug test failure

debugging
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/1466123
------------------------------------------------------------------------
r65786 | svn | 2018-11-18 17:25:54 +0900 (Sun, 18 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65785 | k0kubun | 2018-11-18 17:25:48 +0900 (Sun, 18 Nov 2018) | 5 lines

mjit_worker.c: support MJIT in forked Ruby process

by launching MJIT worker thread in child Ruby process.

See the comment before `mjit_child_after_fork` for details.
------------------------------------------------------------------------
r65784 | k0kubun | 2018-11-18 17:23:05 +0900 (Sun, 18 Nov 2018) | 1 line

thread.c: rb_fiber_atfork has nothing to do with mjit.c [ci skip]
------------------------------------------------------------------------
r65783 | k0kubun | 2018-11-18 17:22:46 +0900 (Sun, 18 Nov 2018) | 1 line

mjit_worker.c: fix typo [ci skip]
------------------------------------------------------------------------
r65782 | k0kubun | 2018-11-18 17:22:30 +0900 (Sun, 18 Nov 2018) | 3 lines

test_jit.rb: fix typo [ci skip]

we don't have such VM register
------------------------------------------------------------------------
r65781 | normal | 2018-11-18 13:34:52 +0900 (Sun, 18 Nov 2018) | 5 lines

vm_trace.c (rb_postponed_job_flush): use rb_atomic_t for mask

ec->interrupt_mask will remain rb_atomic_t and is 32-bit on some
64-bit systems while "unsigned long" is 64-bits.  So avoid
mismatching lengths and stick to rb_atomic_t.
------------------------------------------------------------------------
r65780 | nobu | 2018-11-18 13:21:52 +0900 (Sun, 18 Nov 2018) | 1 line

common.mk: dependency of io.c for r65779
------------------------------------------------------------------------
r65779 | normal | 2018-11-18 12:37:04 +0900 (Sun, 18 Nov 2018) | 3 lines

io.c: include vm_core.h for VM_UNREACHABLE

Thanks to Greg L <greg.mpls@gmail.com> for the report
------------------------------------------------------------------------
r65778 | svn | 2018-11-18 10:37:46 +0900 (Sun, 18 Nov 2018) | 1 line

* 2018-11-18
------------------------------------------------------------------------
r65777 | normal | 2018-11-18 10:37:46 +0900 (Sun, 18 Nov 2018) | 4 lines

io.c (novl_wait_for_single_fd): VM_UNREACHABLE instead of assert

This respects VM_CHECK_MODE and is more consistent with
the rest of our code.
------------------------------------------------------------------------
r65776 | svn | 2018-11-18 10:37:45 +0900 (Sun, 18 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65775 | normal | 2018-11-18 10:37:41 +0900 (Sun, 18 Nov 2018) | 6 lines

vm_core.h (rb_thread_set_current*): convert to static inline

We already use "static inline" heavily and there should be no
penalty for modern compilers; this adds type-checking, too.

This will make future changes easier-to-review.
------------------------------------------------------------------------
r65774 | nobu | 2018-11-17 10:42:30 +0900 (Sat, 17 Nov 2018) | 1 line

test/mkmf/base.rb: use CC_WRAPPER same as the toplevel
------------------------------------------------------------------------
r65773 | nobu | 2018-11-17 10:21:18 +0900 (Sat, 17 Nov 2018) | 1 line

[DOC] rational and imaginary literals [ci skip]
------------------------------------------------------------------------
r65772 | svn | 2018-11-17 08:27:38 +0900 (Sat, 17 Nov 2018) | 1 line

* 2018-11-17
------------------------------------------------------------------------
r65771 | svn | 2018-11-17 08:27:38 +0900 (Sat, 17 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65770 | hsbt | 2018-11-17 08:27:37 +0900 (Sat, 17 Nov 2018) | 3 lines

Switch to 2-0-stable branch of bundler/bundler repository from our fork repository.

  https://github.com/bundler/bundler/tree/2-0-stable
------------------------------------------------------------------------
r65769 | nobu | 2018-11-16 21:11:23 +0900 (Fri, 16 Nov 2018) | 3 lines

Makefile.in: test-almost also needs mjit_build_dir.so

[ruby-core:89830] [Bug #15311]
------------------------------------------------------------------------
r65768 | shyouhei | 2018-11-16 18:04:34 +0900 (Fri, 16 Nov 2018) | 13 lines

pack.c: cast from double to float can be undefined

Generally speaking, a value of double is not always representable
when demoted to a float. ISO C defines what to do when such
conversion loses precision, but leaves it undefined when the
value is completely out of range. (cf: ISO/IEC 9899:1990 section
6.2.1.4).

Because ruby do not have half-precision floating-point types this
is not a frequent headache but for pack / unpack, there are
specifiers that has something to do with C float types.  We have
to explicitly care these situations.

------------------------------------------------------------------------
r65767 | nobu | 2018-11-16 16:08:58 +0900 (Fri, 16 Nov 2018) | 1 line

common.mk: hack to export symbols for MJIT in ruby.imp
------------------------------------------------------------------------
r65766 | k0kubun | 2018-11-16 15:52:12 +0900 (Fri, 16 Nov 2018) | 6 lines

test/excludes/_wercker: remove obsoleted pipeline name

from excludes directory names. test-mjit-wait / test-mjit are combined
and distributed as mjit-test1 and mjit-test2 now.

So the subdirectory names are changed to option names, --jit and --jit-wait.
------------------------------------------------------------------------
r65765 | nobu | 2018-11-16 15:52:01 +0900 (Fri, 16 Nov 2018) | 4 lines

common.mk: fix the pattern to be hidden

* common.mk (ruby.imp): consider symbol prefix, remove InitVM, and
  fix internal symbols start with a dot.
------------------------------------------------------------------------
r65764 | nobu | 2018-11-16 15:52:00 +0900 (Fri, 16 Nov 2018) | 1 line

Make some internal functions static
------------------------------------------------------------------------
r65763 | nobu | 2018-11-16 15:51:57 +0900 (Fri, 16 Nov 2018) | 1 line

Prefix rb_ec_set_vm_stack
------------------------------------------------------------------------
r65762 | k0kubun | 2018-11-16 15:47:37 +0900 (Fri, 16 Nov 2018) | 3 lines

appveyor.yml: skip reverting comment improvement [ci skip]

This part was not intended in r65760
------------------------------------------------------------------------
r65761 | svn | 2018-11-16 15:45:17 +0900 (Fri, 16 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65760 | k0kubun | 2018-11-16 15:45:16 +0900 (Fri, 16 Nov 2018) | 6 lines

appveyor.yml: give up running test_push_over_ary_max

because separately running it without -j didn't work.

Revert "appveyor.yml: run memory-exchausting test separately"
This reverts commit r65703.
------------------------------------------------------------------------
r65759 | nobu | 2018-11-16 13:32:48 +0900 (Fri, 16 Nov 2018) | 4 lines

[DOC] mention class method `new` [ci skip]

* NEWS: mention `new` class methods, instead of `initialize`
  insetance methods whic are not called by users directly.
------------------------------------------------------------------------
r65758 | k0kubun | 2018-11-16 13:25:07 +0900 (Fri, 16 Nov 2018) | 5 lines

[doc] Fix grammar typo in Pty_init() docstring [ci skip]

[Fix GH-2014]

From: Olle Jonsson <olle.jonsson@gmail.com>
------------------------------------------------------------------------
r65757 | k0kubun | 2018-11-16 13:21:57 +0900 (Fri, 16 Nov 2018) | 6 lines

Test for undef'ed method in class hierachy

This probably should have been `#bar` on the instance of class `Undef2` all along
[Fix GH-2015]

From: Alex Snaps <alex.snaps@gmail.com>
------------------------------------------------------------------------
r65756 | shyouhei | 2018-11-16 13:05:53 +0900 (Fri, 16 Nov 2018) | 4 lines

numeric.c: avoid division by zero

Forgot to add in r65751.

------------------------------------------------------------------------
r65755 | shyouhei | 2018-11-16 12:34:53 +0900 (Fri, 16 Nov 2018) | 4 lines

bignum.c: fix bug in big2dbl()

I was wrong at r65753.

------------------------------------------------------------------------
r65754 | shyouhei | 2018-11-16 12:09:00 +0900 (Fri, 16 Nov 2018) | 2 lines

bignum.c: avoid (size_t)--

------------------------------------------------------------------------
r65753 | shyouhei | 2018-11-16 11:59:30 +0900 (Fri, 16 Nov 2018) | 7 lines

bignum.c: BDIGIT might or might not integer-promote

BDIGIT can be unsigned int or unsigned short, depending on BDIGIT_DBL.
Given that, unsigned int and unsigned short are different in how
integer promotion works.  BOGLO assumes its argument is wider than
BDIGIT, which is not always true.  We have to force that explicitly.

------------------------------------------------------------------------
r65752 | shyouhei | 2018-11-16 11:34:00 +0900 (Fri, 16 Nov 2018) | 18 lines

enc/unicode.c: 'a' is bigger than 'A'

In ASCII, 'a' is bigger than 'A'. Which means 'A' - 'a' is a negative
number (-32, to be precise). In C, the type of 'a' and 'A' are signed
int (cf: ISO/IEC 9899:1990 section 6.1.3.4). So 'A' - 'a' is also a
signed int. It is `(signed int)-32`.

The problem is, OnigCodePoint is unsigned int. Adding a negative
number to a variable of OnigCodepoint (`code` here) introduces an
unintentional cast of `(unsigned)(signed)-32`, which is
4,294,967,264. Adding this value to code then overflows, and the
result eventually becomes normal codepoint.

The series of operations are not a serious problem but because
`code >= 'a'` holds, we can `(code - 'a') + 'A'` to reroute this.

See also: https://github.com/k-takata/Onigmo/pull/107

------------------------------------------------------------------------
r65751 | shyouhei | 2018-11-16 10:52:39 +0900 (Fri, 16 Nov 2018) | 11 lines

avoid division by zero

* cvt(): use signbit() instead of 1/d < 0
* w_float(): ditto
* ruby_float_step_size(): unit==0 check shall be prior to divisions
* arith_seq_float_step_size(): ditto
* rb_big_divide(): same as r65642
* fix_divide(): ditto
* rb_big_fdiv_double(): ditto
* fix_fdiv_double(): ditto

------------------------------------------------------------------------
r65750 | nobu | 2018-11-16 09:37:48 +0900 (Fri, 16 Nov 2018) | 1 line

rbinstall.rb: do not install rdoc flag files [ci skip]
------------------------------------------------------------------------
r65749 | nobu | 2018-11-16 09:28:43 +0900 (Fri, 16 Nov 2018) | 1 line

bignum.c: suppress unused variable warning
------------------------------------------------------------------------
r65748 | nobu | 2018-11-16 09:25:54 +0900 (Fri, 16 Nov 2018) | 4 lines

pack.c: refine warning

* pack.c (unknown_directive): refine warning message at unknown
  directive in unpack too, and quote unprintable characters.
------------------------------------------------------------------------
r65747 | nobu | 2018-11-16 09:25:53 +0900 (Fri, 16 Nov 2018) | 1 line

pack.c: adjust indent [ci skip]
------------------------------------------------------------------------
r65746 | svn | 2018-11-16 07:28:07 +0900 (Fri, 16 Nov 2018) | 1 line

* 2018-11-16
------------------------------------------------------------------------
r65745 | svn | 2018-11-16 07:28:06 +0900 (Fri, 16 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65744 | normal | 2018-11-16 07:28:03 +0900 (Fri, 16 Nov 2018) | 5 lines

include/ruby/ruby.h (RB_ALLOCV*): remove unnecessary GC guard

    text	   data	    bss	    dec	    hex	filename
 3535061	  21232	  72944	3629237	 3760b5	ruby.before
 3534141	  21232	  72944	3628317	 375d1d	ruby.after
------------------------------------------------------------------------
r65743 | shyouhei | 2018-11-15 18:03:03 +0900 (Thu, 15 Nov 2018) | 7 lines

eval_error.c: log10(0) is ERANGE

By definition, the logarithm of 0 is negative infinity.  This is a
pole error (cf: cf: ISO/IEC 9899:1999 section 7.12.1 paragraph 3) and
of course, cannot fit into an `int` value.  We have to resort to
INT_MIN.

------------------------------------------------------------------------
r65742 | shyouhei | 2018-11-15 17:33:38 +0900 (Thu, 15 Nov 2018) | 6 lines

.travis.yml: give up mac universal binary [ci skip]

OK, nobody is actively willing to maintain this configuration.  Just
stop annoying people by build failures.  See:
https://travis-ci.org/ruby/ruby/jobs/455377387

------------------------------------------------------------------------
r65741 | shyouhei | 2018-11-15 16:37:05 +0900 (Thu, 15 Nov 2018) | 10 lines

.travis.yml: -j3 [ci skip]

Now that ccache is enabled.  Compilations are made IO heavy, not CPU
bound.  This means parallel jobs beyond CPU count could gain more
speed.  From my experiment, I can conclude the good old "number of
cores plus one" tactics works the best.

The experiment: https://travis-ci.org/shyouhei/ruby/builds/454891855


------------------------------------------------------------------------
r65740 | svn | 2018-11-15 16:34:06 +0900 (Thu, 15 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65739 | shyouhei | 2018-11-15 16:34:01 +0900 (Thu, 15 Nov 2018) | 6 lines

suppress integer overflow warnings

* util.c: annotate as NO_SANITIZE
* bignum.c: avoid (size_t)--
* marshal.c: ditto.

------------------------------------------------------------------------
r65738 | nobu | 2018-11-15 15:22:17 +0900 (Thu, 15 Nov 2018) | 1 line

. command in some sh cannot take arguments
------------------------------------------------------------------------
r65737 | shyouhei | 2018-11-15 15:17:53 +0900 (Thu, 15 Nov 2018) | 17 lines

hash.c: cast from double to unsigned is undefined

When a negative double is casted into an unsigned type, that operation
is undefined (cf: ISO/IEC 9899:1990 section 6.2.9.3).  Recent versions
of C kindly footnotes that "The remaindering operation performed when
a value of integer type is converted to unsigned type need not be
performed when a value of real floating type is converted to unsigned
type" (cf: ISO/IEC 9899:1999 section 6.3.1.4 footnote 50).

So it is a wrong idea to just cast a double to st_data_t.

The intention of the code is commented as "mix the actual float value
in".  It seems we should do a reinterpret_cast and rule out
static_cast.

Confirmed this changeset does not affect `make benchmark`.

------------------------------------------------------------------------
r65736 | svn | 2018-11-15 14:22:45 +0900 (Thu, 15 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65735 | nobu | 2018-11-15 14:22:44 +0900 (Thu, 15 Nov 2018) | 1 line

tool/mjit_archflag.sh: separated, too many escapes
------------------------------------------------------------------------
r65734 | shyouhei | 2018-11-15 14:10:40 +0900 (Thu, 15 Nov 2018) | 6 lines

bignum.c: ee should be signed

In C, signed + unsigned of the same size results in unsigned (cf:
ISO/IEC 9899:1990 section 6.2.1.5). However `num` is signed here.
Which means the addition must be done in signed.

------------------------------------------------------------------------
r65733 | kazu | 2018-11-15 12:45:34 +0900 (Thu, 15 Nov 2018) | 3 lines

Revert "Use CC without ccache as MJIT_CC"

because CI failed: https://travis-ci.org/ruby/ruby/builds/455313917
------------------------------------------------------------------------
r65732 | kazu | 2018-11-15 12:01:20 +0900 (Thu, 15 Nov 2018) | 1 line

Use CC without ccache as MJIT_CC
------------------------------------------------------------------------
r65731 | shyouhei | 2018-11-15 11:25:25 +0900 (Thu, 15 Nov 2018) | 22 lines

.travis.yml: enable ccache

Travis has `cache: ccache` feature so let us enable it.  Also, because
`config.cache` is generated during the compilation why not cache that
file for a later use.  [fix GH-2013]

Caveats:

- When something went wrong, cache entries can be deleted from
  https://travis-ci.org/ruby/ruby/caches (requires login).

- See `ccache(1)` manual page for the new environment variables.

- `ccache` thinks two compilations are not identical if they produce
  different diagnostics.  The -fno-diagnostics-color option is to
  prevent such cache missihts only because TTY is present / absent at
  the compilation time.

- In this changeset two "ccache --show-stats" invocations are inserted
  before and after the compilation to measure cache hit rates etc.
  Will revisit their outputs once the cache is warmed up.

------------------------------------------------------------------------
r65730 | svn | 2018-11-15 06:04:59 +0900 (Thu, 15 Nov 2018) | 1 line

* 2018-11-15
------------------------------------------------------------------------
r65729 | k0kubun | 2018-11-15 06:04:57 +0900 (Thu, 15 Nov 2018) | 8 lines

Fix syntax on Binding.irb documentation [ci skip]

There was incorrect backticks (`) instead of plus signs to denote method
references, and a typo.

[Fix GH-2016]

From: Olivier Lacan <hi@olivierlacan.com>
------------------------------------------------------------------------
r65727 | nobu | 2018-11-14 23:12:30 +0900 (Wed, 14 Nov 2018) | 1 line

rational.c (nurat_div): use the dedicated function nurat_to_f
------------------------------------------------------------------------
r65726 | svn | 2018-11-14 18:53:13 +0900 (Wed, 14 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65725 | shyouhei | 2018-11-14 18:53:11 +0900 (Wed, 14 Nov 2018) | 4 lines

numeric.c: avoid division by zero

same as r65642.

------------------------------------------------------------------------
r65724 | k0kubun | 2018-11-14 17:21:05 +0900 (Wed, 14 Nov 2018) | 4 lines

test_ftp.rb: loosen another timeout requirement

for Travis osx.
https://travis-ci.org/ruby/ruby/jobs/454864155
------------------------------------------------------------------------
r65723 | k0kubun | 2018-11-14 16:44:30 +0900 (Wed, 14 Nov 2018) | 3 lines

test_ftp.rb: loosen timeout for Travis osx

https://travis-ci.org/ruby/ruby/jobs/454798071
------------------------------------------------------------------------
r65722 | k0kubun | 2018-11-14 16:38:05 +0900 (Wed, 14 Nov 2018) | 3 lines

test_gem_stream_ui.rb: loosen timeout for --jit-wait

https://app.wercker.com/ruby/ruby/runs/mjit-test2/5beba9be183106002852f8a6?step=5bebc1a087436a0006f94a22
------------------------------------------------------------------------
r65721 | shyouhei | 2018-11-14 13:50:59 +0900 (Wed, 14 Nov 2018) | 4 lines

.travis.yml: specify git -q

We are not interested in git(1) output.

------------------------------------------------------------------------
r65720 | nobu | 2018-11-14 13:42:14 +0900 (Wed, 14 Nov 2018) | 1 line

Add RbConfig.fire_update!
------------------------------------------------------------------------
r65719 | svn | 2018-11-14 12:52:31 +0900 (Wed, 14 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65718 | normal | 2018-11-14 12:52:28 +0900 (Wed, 14 Nov 2018) | 4 lines

thread.c (rb_thread_fd_select): favor rb_thread_* when no FDs

select() is a crap API for even sleeping on sigwait_fd, so favor
the native_sleep-based functions when there are no FDs, instead.
------------------------------------------------------------------------
r65717 | nobu | 2018-11-14 11:27:17 +0900 (Wed, 14 Nov 2018) | 1 line

defs/known_errors.def: update on macOS Mojave Xcode 10.1
------------------------------------------------------------------------
r65716 | nobu | 2018-11-14 11:27:16 +0900 (Wed, 14 Nov 2018) | 6 lines

Makefile.in: update-known-errors

* Makefile.in (update-known-errors): update defs/known_errors.def
  by using errno(1).

* defs/known_errors.def: sort alphabetically for merger.
------------------------------------------------------------------------
r65715 | shyouhei | 2018-11-14 09:43:45 +0900 (Wed, 14 Nov 2018) | 2 lines

.travis.yml: add empty lines for readability [ci skip]

------------------------------------------------------------------------
r65714 | svn | 2018-11-14 08:06:51 +0900 (Wed, 14 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65713 | k0kubun | 2018-11-14 08:06:49 +0900 (Wed, 14 Nov 2018) | 6 lines

test/excludes/../TestWEBrickUtils.rb: exclude unstable test

for now. This seems to get unstable after r65691.

test/excludes/_travis/osx: renamed from test/excludes/_travis because
it's only for osx builds.
------------------------------------------------------------------------
r65712 | svn | 2018-11-14 06:36:59 +0900 (Wed, 14 Nov 2018) | 1 line

* 2018-11-14
------------------------------------------------------------------------
r65711 | k0kubun | 2018-11-14 06:36:58 +0900 (Wed, 14 Nov 2018) | 3 lines

.travis.yml: stop allowing osx failure

it seems to be more stable than the timing we upgraded travis image.
------------------------------------------------------------------------
r65710 | nobu | 2018-11-13 23:56:49 +0900 (Tue, 13 Nov 2018) | 1 line

Makefile.in: `$` for shell needs to be escaped in Makefile
------------------------------------------------------------------------
r65709 | kazu | 2018-11-13 23:35:19 +0900 (Tue, 13 Nov 2018) | 1 line

Remove duplicated assignment
------------------------------------------------------------------------
r65708 | shyouhei | 2018-11-13 16:19:12 +0900 (Tue, 13 Nov 2018) | 7 lines

.travis.tml: reintroduce exclusions for osx

Sorry, seen the failures again.  Was a wrong idea to delete
the --exclude.

See https://travis-ci.org/ruby/ruby/jobs/454329443#L2233

------------------------------------------------------------------------
r65707 | shyouhei | 2018-11-13 16:17:02 +0900 (Tue, 13 Nov 2018) | 2 lines

.travis.yml: eliminate remaining --color=never [ci skip]

------------------------------------------------------------------------
r65706 | marcandre | 2018-11-13 15:20:06 +0900 (Tue, 13 Nov 2018) | 3 lines

Pathname: Have #relative_path_from accept String argument.

[Fix GH-1975]
------------------------------------------------------------------------
r65705 | k0kubun | 2018-11-13 15:17:57 +0900 (Tue, 13 Nov 2018) | 15 lines

test_function.rb: loosen delta boundary

On osx build https://travis-ci.org/ruby/ruby/jobs/454309945,

```
1) Failure:
Fiddle::TestFunction#test_nogvl_poll [/Users/travis/build/ruby/ruby/test/fiddle/test_function.rb:95]:
slept amount of time.
Expected |200 - 322| (122) to be <= 100.
```

but it succeeds on my macOS machine as is. So it seems that the boundary is
just too strict and prone to random failure by overload.

To make osx Travis build usable, let me loosen the delta requirement.
------------------------------------------------------------------------
r65704 | nobu | 2018-11-13 15:16:56 +0900 (Tue, 13 Nov 2018) | 1 line

Moved REVISION_FORCE before uncommon.mk
------------------------------------------------------------------------
r65703 | k0kubun | 2018-11-13 14:46:41 +0900 (Tue, 13 Nov 2018) | 5 lines

appveyor.yml: run memory-exchausting test separately

r65690 had no impact
https://ci.appveyor.com/project/ruby/ruby/builds/20253561/job/p5u235m8xx85t9o5.
Gave up to solve the issue inside the test.
------------------------------------------------------------------------
r65702 | shyouhei | 2018-11-13 13:55:43 +0900 (Tue, 13 Nov 2018) | 8 lines

.travis.yml: specify --tty=no

To reduce the amount of output, prefer --tty=no instead of
--color=never.  This option not only disables color output but also
kill some tty-related features, like spinners.  Travis limits its
output by the physical size of the log, not by the number of lines.
This change should make more room for new logs.

------------------------------------------------------------------------
r65701 | nobu | 2018-11-13 13:51:46 +0900 (Tue, 13 Nov 2018) | 1 line

date_core.c: use static ID variables
------------------------------------------------------------------------
r65700 | shyouhei | 2018-11-13 13:33:10 +0900 (Tue, 13 Nov 2018) | 6 lines

.travis.yml: delete test-all options for osx

While we are experiencing build failures, no hangs had been
seen for a while.  Also it seems the excluded tests now pass.
I think it's time to delete this line.

------------------------------------------------------------------------
r65699 | nobu | 2018-11-13 13:29:32 +0900 (Tue, 13 Nov 2018) | 6 lines

date_core.c: obey to the allocation framework

* ext/date/date_core.c (date_initialize): separate from
  date_s_civil and obey the allocation framework.

* ext/date/date_core.c (datetime_initialize): ditto.
------------------------------------------------------------------------
r65698 | nobu | 2018-11-13 13:29:31 +0900 (Tue, 13 Nov 2018) | 4 lines

date_core.c: respect COMPLEX_DAT bit

* ext/date/date_core.c (d_lite_marshal_load): respect COMPLEX_DAT
  bit in the pre-allocated structure.
------------------------------------------------------------------------
r65697 | nobu | 2018-11-13 13:29:30 +0900 (Tue, 13 Nov 2018) | 5 lines

date_core.c: keep COMPLEX_DAT bit

* ext/date/date_core.c (d_lite_initialize_copy): do not change
  COMPLEX_DAT bit, as the structure does not change.  initialize
  member-wise instead.
------------------------------------------------------------------------
r65696 | nobu | 2018-11-13 13:29:29 +0900 (Tue, 13 Nov 2018) | 5 lines

date_core.c: set/reset COMPLEX_DAT

* ext/date/date_core.c (set_to_simple, set_to_complex): always
  set/reset COMPLEX_DAT bit, which is very tightly bound to the
  structure.
------------------------------------------------------------------------
r65695 | nobu | 2018-11-13 12:24:18 +0900 (Tue, 13 Nov 2018) | 8 lines

gmake.mk: force updating revision.h

Since `.revision.time` recipe needs `$(BASERUBY)`, it should not
try to get updated unconditionally, or tarballs fail to build on
environments where BASERUBY is not available.

All developers who build frequently use GNU make anyway, don't
you?
------------------------------------------------------------------------
r65694 | shyouhei | 2018-11-13 11:58:41 +0900 (Tue, 13 Nov 2018) | 4 lines

.travis.yml: allow osx failures [experimental]

Tests are failing due to network timeouts.  Temporary allow failrues for them.

------------------------------------------------------------------------
r65693 | shyouhei | 2018-11-13 11:19:49 +0900 (Tue, 13 Nov 2018) | 4 lines

addr2line.c: more on suppressing warnings

See also: https://travis-ci.org/ruby/ruby/jobs/454269559#L1898

------------------------------------------------------------------------
r65692 | k0kubun | 2018-11-13 11:06:51 +0900 (Tue, 13 Nov 2018) | 10 lines

common.mk: force updating revision.h on each commit

by making .revision.time PHONY. Prior to this commit, RUBY_DESCRIPTION
has been updated only when version.h (or tool/file2lastrev.rb) is updated.

.revision.time (REVISION_H) target internally has IFCHANGE to update
revision.h. So it doesn't touch revision.h when it's not updated,
and thus it's safe to run every time.

defs/gmake.mk: drop obsoleted reference to REVISION_FORCE
------------------------------------------------------------------------
r65691 | shyouhei | 2018-11-13 11:03:33 +0900 (Tue, 13 Nov 2018) | 5 lines

.travis.yml: update VM images

xeinal for Linux and xcode 10.1 for osx.  Also deleted few outdated
lines that are no longer necessary.

------------------------------------------------------------------------
r65690 | k0kubun | 2018-11-13 10:35:09 +0900 (Tue, 13 Nov 2018) | 7 lines

test_array.rb: try to avoid NoMemoryError on AppVeyor

We somehow hit NoMemoryError twice on that place.
https://ci.appveyor.com/project/ruby/ruby/builds/20224556/job/hlgt963e0cgjbj3c
https://ci.appveyor.com/project/ruby/ruby/builds/20250696/job/gm559bu2jbd6youm

Let me try firing GC here.
------------------------------------------------------------------------
r65689 | svn | 2018-11-13 09:40:57 +0900 (Tue, 13 Nov 2018) | 1 line

* 2018-11-13
------------------------------------------------------------------------
r65688 | shyouhei | 2018-11-13 09:40:52 +0900 (Tue, 13 Nov 2018) | 10 lines

suppress integer overflow warnings

* random.c: annotate rb_hash_start with NO_SANITIZE (seed.key.hash + h
  overflows and that seems intentional)
* bignum.c: avoid (size_t)--
* cont.c: ditto
* util.c: ditto
* vm_insnhelper.c: ditto


------------------------------------------------------------------------
r65687 | nobu | 2018-11-12 19:19:04 +0900 (Mon, 12 Nov 2018) | 1 line

Revert r65681 which had a race condition issue
------------------------------------------------------------------------
r65686 | shyouhei | 2018-11-12 17:18:35 +0900 (Mon, 12 Nov 2018) | 5 lines

.travis.yml: resurrect -j on mac

The "osx build randomly fails with `-j`" happens on make -j test-all.
Should be safe to do make -j all.

------------------------------------------------------------------------
r65685 | shyouhei | 2018-11-12 17:14:09 +0900 (Mon, 12 Nov 2018) | 12 lines

vm_insnhelper.c: avoid nevative sp

space_size can be zero here, under the following script.  We would
better bail out before bptr calculation.

% ./miniruby --dump=i -e '* = nil'
== disasm: #<ISeq:<main>@-e:1 (1,0)-(1,7)> (catch: FALSE)
0000 putnil                                                           (   1)[Li]
0001 dup
0002 expandarray                  0, 0
0005 leave

------------------------------------------------------------------------
r65684 | k0kubun | 2018-11-12 16:58:29 +0900 (Mon, 12 Nov 2018) | 1 line

erb/new_spec.rb: fix spec failure by other specs
------------------------------------------------------------------------
r65683 | nobu | 2018-11-12 16:32:21 +0900 (Mon, 12 Nov 2018) | 1 line

Adopt [Misc #15294]
------------------------------------------------------------------------
r65682 | nobu | 2018-11-12 16:14:43 +0900 (Mon, 12 Nov 2018) | 1 line

Export rb_flo_div_flo for MJIT
------------------------------------------------------------------------
r65681 | nobu | 2018-11-12 15:56:52 +0900 (Mon, 12 Nov 2018) | 1 line

srcs-ext should update ext/ripper/eventids2table.c
------------------------------------------------------------------------
r65680 | shyouhei | 2018-11-12 13:09:24 +0900 (Mon, 12 Nov 2018) | 2 lines

numeric.c: fix typo

------------------------------------------------------------------------
r65679 | svn | 2018-11-12 12:26:44 +0900 (Mon, 12 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65678 | shyouhei | 2018-11-12 12:26:39 +0900 (Mon, 12 Nov 2018) | 4 lines

vm_insnhelper.c: avoid division by zero

same as r65642.

------------------------------------------------------------------------
r65677 | shyouhei | 2018-11-12 11:39:24 +0900 (Mon, 12 Nov 2018) | 7 lines

char is neither signed nor unsigned

read_escaped_byte() returns values of range -1...256. -1 indicates
error.  So the function basically expects char to be 0..255 range.
There is no such guarantee. `char` is not always unsigned.  We
need to explicitly declare chbuf to be unsigned char.

------------------------------------------------------------------------
r65676 | kazu | 2018-11-12 11:00:08 +0900 (Mon, 12 Nov 2018) | 1 line

lib/irb.rb: fix up r65674
------------------------------------------------------------------------
r65675 | shyouhei | 2018-11-12 10:08:35 +0900 (Mon, 12 Nov 2018) | 21 lines

~(unsigned char) is not unsigned char

The unary ~ operator excercises integer promotion of the operand
_before_ actually applying bitwise complement (cf: ISO/IEC 9899:1990
section 6.3.3.3).  Which means `~buf[i]` is in fact
`(int)~(int)buf[i]`.

The problem is, when buf[i] is 0xFF:

      buf[i]        0xFF
 (int)buf[i] 0x0000_00FF
~(int)buf[i] 0xFFFF_FF00 This is -256, out of unsigned char range.

The proposed fix is to change the char signed.  By doing so,

                   buf[i]        0xFF
      (signed char)buf[i]        0xFF
 (int)(signed char)buf[i] 0xFFFF_FFFF
~(int)(signed char)buf[i] 0x0000_0000 This is 0, does not overflow.


------------------------------------------------------------------------
r65674 | k0kubun | 2018-11-12 09:55:34 +0900 (Mon, 12 Nov 2018) | 13 lines

Document binding.irb on Binding [ci skip]

For some reason this very useful method was undocumented since it was added in
493e48897421d176a8faf0f0820323d79ecdf94a which makes finding it in the docs
impossible before this change.

I've added a detailed example with sample code because it's one of the most
powerful tools to debug Ruby code and I believe very few people are aware of it
due to the lack of documentation.

[Fix GH-2010]

From: Olivier Lacan <hi@olivierlacan.com>
------------------------------------------------------------------------
r65673 | svn | 2018-11-12 09:53:17 +0900 (Mon, 12 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65672 | hsbt | 2018-11-12 09:53:15 +0900 (Mon, 12 Nov 2018) | 1 line

Merge Bundler-2.0.0.pre1 from upstream.
------------------------------------------------------------------------
r65671 | k0kubun | 2018-11-12 09:37:15 +0900 (Mon, 12 Nov 2018) | 3 lines

erb.rb: warn invalid trim_mode [Misc #15294]

From: Justin Collins <justin@presidentbeef.com>
------------------------------------------------------------------------
r65670 | svn | 2018-11-12 08:22:55 +0900 (Mon, 12 Nov 2018) | 1 line

* 2018-11-12
------------------------------------------------------------------------
r65669 | nobu | 2018-11-12 08:22:54 +0900 (Mon, 12 Nov 2018) | 1 line

win32/setup.mak: Substitute slashes in `MJIT_CC`
------------------------------------------------------------------------
r65668 | nobu | 2018-11-12 08:22:53 +0900 (Mon, 12 Nov 2018) | 3 lines

`MJIT_BUILD_DIR` is not used on Windows

Because `LOAD_RELATIVE` is always enabled on Windows.
------------------------------------------------------------------------
r65667 | nobu | 2018-11-11 21:40:40 +0900 (Sun, 11 Nov 2018) | 1 line

Fix for bison 3.2 [Bug #15284]
------------------------------------------------------------------------
r65666 | yui-knk | 2018-11-11 21:15:15 +0900 (Sun, 11 Nov 2018) | 1 line

Add docs to RubyVM::AbstractSyntaxTree.of
------------------------------------------------------------------------
r65665 | nobu | 2018-11-11 20:58:38 +0900 (Sun, 11 Nov 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r65664 | nobu | 2018-11-11 10:25:33 +0900 (Sun, 11 Nov 2018) | 5 lines

Use friendlier terminology in leaf helpers

[Fix GH-2009]

From: Juanito Fatas <juanito.fatas@shopify.com>
------------------------------------------------------------------------
r65663 | yui-knk | 2018-11-11 09:55:19 +0900 (Sun, 11 Nov 2018) | 3 lines

Make some functions to be static

These functions are used only in ast.c.
------------------------------------------------------------------------
r65662 | nobu | 2018-11-11 09:46:31 +0900 (Sun, 11 Nov 2018) | 5 lines

Use friendlier terminology in rubysocket.h comment

[Fix GH-2008]

From: Juanito Fatas <juanito.fatas@shopify.com>
------------------------------------------------------------------------
r65661 | nobu | 2018-11-11 09:46:30 +0900 (Sun, 11 Nov 2018) | 3 lines

Revert "Use friendlier terminology in rubysocket.h comment"

This reverts commit dcd41bbbdb021b5e0e74f8a33c2c58cecf595f29.
------------------------------------------------------------------------
r65660 | nobu | 2018-11-11 09:40:25 +0900 (Sun, 11 Nov 2018) | 1 line

Use friendlier terminology in rubysocket.h comment
------------------------------------------------------------------------
r65659 | nobu | 2018-11-11 09:20:27 +0900 (Sun, 11 Nov 2018) | 3 lines

Make rubygems follow the upstream of psych

And merge psych again.
------------------------------------------------------------------------
r65658 | mame | 2018-11-11 07:26:37 +0900 (Sun, 11 Nov 2018) | 5 lines

Revert "Merge psych from upstream."

This reverts commit db3101ff301b8e6f52170df0891f4fc35579354f.

This caused build error: http://ci.rvm.jp/results/trunk-test@ruby-sky3/1452708
------------------------------------------------------------------------
r65657 | svn | 2018-11-11 03:06:54 +0900 (Sun, 11 Nov 2018) | 1 line

* 2018-11-11
------------------------------------------------------------------------
r65656 | hsbt | 2018-11-11 03:06:51 +0900 (Sun, 11 Nov 2018) | 3 lines

Merge psych from upstream.

  * https://github.com/ruby/psych/pull/378
------------------------------------------------------------------------
r65655 | nobu | 2018-11-10 21:04:18 +0900 (Sat, 10 Nov 2018) | 4 lines

Constified ruby_sourcefile

which usually refers ruby_sourcefile_string and is not freed
directly.
------------------------------------------------------------------------
r65654 | nobu | 2018-11-10 20:43:02 +0900 (Sat, 10 Nov 2018) | 1 line

AST.of -e script
------------------------------------------------------------------------
r65653 | nobu | 2018-11-10 20:40:33 +0900 (Sat, 10 Nov 2018) | 1 line

Parse the source in SCRIPT_LINES__ as array
------------------------------------------------------------------------
r65652 | nobu | 2018-11-10 20:16:36 +0900 (Sat, 10 Nov 2018) | 1 line

Check the argument before creating a parser
------------------------------------------------------------------------
r65651 | nobu | 2018-11-10 19:39:58 +0900 (Sat, 10 Nov 2018) | 1 line

Parse the source in SCRIPT_LINES__ if possible
------------------------------------------------------------------------
r65650 | nobu | 2018-11-10 18:29:00 +0900 (Sat, 10 Nov 2018) | 1 line

Fix potential NULL pointer access [ci skip]
------------------------------------------------------------------------
r65649 | svn | 2018-11-10 08:24:17 +0900 (Sat, 10 Nov 2018) | 1 line

* 2018-11-10
------------------------------------------------------------------------
r65648 | normal | 2018-11-10 08:24:14 +0900 (Sat, 10 Nov 2018) | 4 lines

thread_pthread.c (rb_sigwait_sleep): add note about spurious wakeup

I already forgot why we needed to jump through such hoops :x
[ruby-core:88102]
------------------------------------------------------------------------
r65647 | nobu | 2018-11-09 22:39:36 +0900 (Fri, 09 Nov 2018) | 1 line

Get rid of setting SCRIPT_LINES__ by AST.parse
------------------------------------------------------------------------
r65646 | nobu | 2018-11-09 22:39:35 +0900 (Fri, 09 Nov 2018) | 1 line

Hoisted out rb_ast_parse_str and rb_ast_parse_file
------------------------------------------------------------------------
r65645 | kazu | 2018-11-09 22:00:03 +0900 (Fri, 09 Nov 2018) | 3 lines

Remove unused default value of MJIT_CC [ci skip]

because always set `MJIT_CC` at `: ${MJIT_CC=$CC}`
------------------------------------------------------------------------
r65644 | nobu | 2018-11-09 20:19:23 +0900 (Fri, 09 Nov 2018) | 1 line

addr2line.c: fix compilation for i386-darwin
------------------------------------------------------------------------
r65643 | shyouhei | 2018-11-09 18:44:49 +0900 (Fri, 09 Nov 2018) | 5 lines

util.c: suppress warnings

These functions handle overflows correctly.


------------------------------------------------------------------------
r65642 | shyouhei | 2018-11-09 18:14:23 +0900 (Fri, 09 Nov 2018) | 16 lines

numeric.c: avoid division by zero

In C, division by zero is undefined, even if the expression is double
(cf: ISO/IEC 9899:1990 section 6.3.5).  OTOH we have tests about such
operations and results, means we expect no exceptional situation shall
occur.  We need to carefully reroute the situation, and generate what
is needed.

See also: https://travis-ci.org/ruby/ruby/jobs/452680646#L2943

PS: Recently (last two decades), C have Annex. F document. It
normatively specifies that the division operator is IEEE 754's
division operator (cf: ISO/IEC 9899:1999 section F.3).  If we could
move to such newer version this could be no problem.  But that is not
possible today.

------------------------------------------------------------------------
r65641 | yui-knk | 2018-11-09 10:37:41 +0900 (Fri, 09 Nov 2018) | 3 lines

Rename `AST` module to `AbstractSyntaxTree`

Follow the same naming convention of `InstructionSequence` class.
------------------------------------------------------------------------
r65640 | svn | 2018-11-09 10:13:22 +0900 (Fri, 09 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65639 | ko1 | 2018-11-09 10:13:20 +0900 (Fri, 09 Nov 2018) | 5 lines

There is a path to use bmethod with ifunc.

* vm_insnhelper.c (vm_yield_with_cfunc): use passed me as bmethod.
  We also need to set `VM_FRAME_FLAG_BMETHOD` if needed.

------------------------------------------------------------------------
r65638 | svn | 2018-11-09 10:02:20 +0900 (Fri, 09 Nov 2018) | 1 line

* 2018-11-09
------------------------------------------------------------------------
r65637 | svn | 2018-11-09 10:02:20 +0900 (Fri, 09 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65636 | ko1 | 2018-11-09 10:02:13 +0900 (Fri, 09 Nov 2018) | 31 lines

fix passing wrong `passed_bmethod_me`.

* vm_core.h: remove `rb_execution_context_t::passed_bmethod_me`
  and fix functions to pass the `me` directly.
  `passed_bmethod_me` was used to make bmethod (methods defined by
  `defined_method`). `rb_vm_invoke_bmethod` invoke `Proc` with `me`
  information as method frame (`lambda` frame, actually).
  If the proc call is not bmethod call, `passed_bmethod_me` should
  be NULL. However, there is a bug which passes wrong `me` for
  normal block call.

  http://ci.rvm.jp/results/trunk-asserts@silicon-docker/1449470

  This is because wrong `me` was remained in `passed_bmethod_me`
  (and used incorrectly it after collected by GC).

  We need to clear `passed_bmethod_me` just after bmethod call,
  but clearing is not enough.

  To solve this issue, I removed `passed_bmethod_me` and pass `me`
  information as a function parameter of `rb_vm_invoke_bmethod`,
  `invoke_block_from_c_proc` and `invoke_iseq_block_from_c` in vm.c.

* vm.c (invoke_iseq_block_from_c): the number of parameters is too
  long so that I try to specify `ALWAYS_INLINE`.

* vm.c (invoke_block_from_c_proc): ditto.

* vm_insnhelper.c (vm_yield_with_cfunc): now there are no pathes
  to use bmethod here.

------------------------------------------------------------------------
r65635 | shyouhei | 2018-11-08 18:52:14 +0900 (Thu, 08 Nov 2018) | 6 lines

st.c: bin might be zero

When EMPTY_OR_DELETED_BIN_P(bin) is true, it is a wrong idea to
subtract ENTRY_BASE from it.  Delay doing so until we are sure to be
safe.

------------------------------------------------------------------------
r65634 | svn | 2018-11-08 18:46:15 +0900 (Thu, 08 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65633 | shyouhei | 2018-11-08 18:46:09 +0900 (Thu, 08 Nov 2018) | 34 lines

gc.c: avoid integer overflow at process exit

This is rather nitpicking but at the moment the process terminates,
heap_pages_final_slots overflows.

(lldb) bt
* thread #1: tid = 0xc0903, 0x00000001002b3bf7 miniruby`finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00000001002b3bf7 miniruby`finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946
    frame #1: 0x000000010026a69e miniruby`rb_objspace_call_finalizer(objspace=0x0000000101c09240) + 7118 at gc.c:3092
    frame #2: 0x0000000100268ac5 miniruby`rb_gc_call_finalizer_at_exit + 149 at gc.c:3015
    frame #3: 0x00000001002272bc miniruby`ruby_finalize_1 + 156 at eval.c:146
    frame #4: 0x00000001002282b6 miniruby`ruby_cleanup(ex=0) + 4070 at eval.c:238
    frame #5: 0x0000000100228785 miniruby`ruby_run_node(n=0x0000000102060ad8) + 85 at eval.c:317
    frame #6: 0x0000000100000b9c miniruby`main(argc=2, argv=0x00007fff5fbfdc38) + 124 at main.c:42
    frame #7: 0x00007fff9966a5ad libdyld.dylib`start + 1
    frame #8: 0x00007fff9966a5ad libdyld.dylib`start + 1
(lldb) p objspace->heap_pages
(rb_objspace::(anonymous struct)) $0 = {
  sorted = 0x0000000101c070b0
  allocated_pages = 24
  allocatable_pages = 0
  sorted_length = 24
  range = {
    [0] = 0x0000000102020028
    [1] = 0x00000001020dbfd0
  }
  freeable_pages = 0
  final_slots = 0
  deferred_final = 4329149840
}
(lldb)



------------------------------------------------------------------------
r65632 | shyouhei | 2018-11-08 16:41:24 +0900 (Thu, 08 Nov 2018) | 10 lines

hash.c: +(-1) is a wrong idea

Before this changeset RHASH_ARRAY_SIZE_DEC() was expaneded to include
an expression like `RHASH_ARRAY_SIZE+(-1)`.  RHASH_ARRAY_SIZE is by
definition unsigned int.  -1 is signed, of course.  Adding a signed
and an unsigned value requires the "usual arithmetic conversions" (cf:
ISO/IEC 9899:1990 section 6.2.1.5).  -1 is converted to 0xFFFF by that.

This patch prevents that conversion.

------------------------------------------------------------------------
r65631 | k0kubun | 2018-11-08 15:26:21 +0900 (Thu, 08 Nov 2018) | 3 lines

vm_core.h: conform C90

https://travis-ci.org/ruby/ruby/jobs/452230859
------------------------------------------------------------------------
r65630 | shyouhei | 2018-11-08 15:22:57 +0900 (Thu, 08 Nov 2018) | 8 lines

avoid (size_t)-- (2nd try)

The decrements overflow and these variables remain ~0 when leaving the
while loops.  They are not fatal by accident, but better replace with
ordinal for loops.

See also: https://travis-ci.org/ruby/ruby/jobs/452218871#L3246

------------------------------------------------------------------------
r65629 | k0kubun | 2018-11-08 15:19:36 +0900 (Thu, 08 Nov 2018) | 5 lines

lib/rubygems/indexer.rb: suppress random test-all error

by bundler. Similar to r65613, but fixing this more carefully
because here is not just inside tests but inside rubygems code.
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1448239
------------------------------------------------------------------------
r65628 | ko1 | 2018-11-08 14:35:46 +0900 (Thu, 08 Nov 2018) | 5 lines

initialize VM postponed_job first. [Bug #15288]

* inits.c: call `Init_vm_postponed_job` first because
  postponed_job is used by transient heap.

------------------------------------------------------------------------
r65627 | shyouhei | 2018-11-08 14:34:58 +0900 (Thu, 08 Nov 2018) | 4 lines

svn merge -r 65625:65623 .

Was breaking make test-all

------------------------------------------------------------------------
r65626 | k0kubun | 2018-11-08 14:34:36 +0900 (Thu, 08 Nov 2018) | 1 line

.travis.yml: simplify travis matrix description
------------------------------------------------------------------------
r65625 | shyouhei | 2018-11-08 14:24:07 +0900 (Thu, 08 Nov 2018) | 2 lines

st.c: fix comparison between signed and unsigned

------------------------------------------------------------------------
r65624 | shyouhei | 2018-11-08 14:06:52 +0900 (Thu, 08 Nov 2018) | 8 lines

avoid (size_t)--

The decrements overflow and these variables remain ~0 when leaving the
while loops.  They are not fatal by accident, but better replace with
ordinal for loops.

See also: https://travis-ci.org/ruby/ruby/jobs/452218871#L3246

------------------------------------------------------------------------
r65623 | svn | 2018-11-08 14:01:30 +0900 (Thu, 08 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65622 | ko1 | 2018-11-08 14:01:23 +0900 (Thu, 08 Nov 2018) | 22 lines

separate Thread type (func or proc) explicitly.

* vm_core.h (rb_thread_struct): introduce new fields `invoke_type`
  and `invoke_arg`.
  There are two types threads: invoking proc (normal Ruby thread
  created by `Thread.new do ... end`) and invoking func, created
  by C-API. `invoke_type` shows the types.

* thread.c (thread_do_start): copy `invoke_arg.proc.args` contents
  from Array to ALLOCA stack memory if args length is enough small (<8).
  We don't need to keep Array and don't need to cancel using transient heap.

* vm.c (thread_mark): For func invoking threads, they can pass (void *)
  parameter (rb_thread_t::invoke_arg::func::arg). However, a rubyspec test
  (thread_spec.c) passes an Array object and it expect to mark it.
  Clealy it is out of scope (misuse of `rb_thread_create` C-API). However,
  I'm not sure someone else has such kind of misunderstanding.
  So now we mark conservatively this (void *) arg with rb_gc_mark_maybe.

  This misuse is found by this error log.
  http://ci.rvm.jp/results/trunk-theap-asserts@silicon-docker/1448164

------------------------------------------------------------------------
r65621 | shyouhei | 2018-11-08 13:24:26 +0900 (Thu, 08 Nov 2018) | 8 lines

st.c: straight-forward comparison of characters

These functions are used in strcasehash, which is used to store encoding
names.  Encoding names often include hyphens (e.g. "UTF-8"), and
` '-' - 'A' ` is negative (cannot express in unsigned int).

Don't be tricky, just do what to do.

------------------------------------------------------------------------
r65620 | k0kubun | 2018-11-08 13:06:15 +0900 (Thu, 08 Nov 2018) | 4 lines

test_ftp.rb: extend timeout for --jit-wait testing

to avoid random failures like
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5be394b818310600284f2b50?step=5be394f1591ca800079b1329
------------------------------------------------------------------------
r65619 | normal | 2018-11-08 12:27:16 +0900 (Thu, 08 Nov 2018) | 5 lines

ext/socket/init.c (wait_connectable): bail out early on some errors

This becomes necesary if sockets become non-blocking by
default <https://bugs.ruby-lang.org/issues/14968>; but it's
always been possible to make sockets non-blocking anyways.
------------------------------------------------------------------------
r65618 | nobu | 2018-11-08 11:25:44 +0900 (Thu, 08 Nov 2018) | 7 lines

refine parse_rat

* rational.c (read_num): return the exponent instead of the
  divisor, to get rid of huge bignums.

* rational.c (parse_rat): subtract exponents instead of reduction
  of powers.
------------------------------------------------------------------------
r65617 | nobu | 2018-11-08 10:57:03 +0900 (Thu, 08 Nov 2018) | 7 lines

compile.c: compile error than rb_bug [ci skip]

* compile.c (get_local_var_idx, get_dyna_var_idx): raise a compile
  error which is useful than rb_bug, when ID is not found.

* compile.c (iseq_set_sequence): ditto when IC index overflow,
  with dumping generated code.
------------------------------------------------------------------------
r65616 | shyouhei | 2018-11-08 10:43:07 +0900 (Thu, 08 Nov 2018) | 5 lines

st.c: suppress integer overlow warnings

This `i += h;` overflows.  Don't know the intention of the
operation, so just suppress UBSAN.

------------------------------------------------------------------------
r65615 | yui-knk | 2018-11-08 09:36:35 +0900 (Thu, 08 Nov 2018) | 1 line

NEWS: Add `RubyVM::AST.of` to NEWS [ci skip]
------------------------------------------------------------------------
r65614 | nobu | 2018-11-08 09:12:53 +0900 (Thu, 08 Nov 2018) | 4 lines

compile.c: unreachable than rb_bug [ci skip]

* compile.c (iseq_calc_param_size): use UNREACHABLE than rb_bug,
  at where never reachable.
------------------------------------------------------------------------
r65613 | k0kubun | 2018-11-08 09:06:38 +0900 (Thu, 08 Nov 2018) | 8 lines

test/rdoc/minitest_helper.rb: suppress bundler error

maybe after bundler introduction to this repository, we randomly hit
errors like:
http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1447918

As we would require minitest in this repository anyway, it should be
fine to suppress the error there.
------------------------------------------------------------------------
r65612 | hsbt | 2018-11-08 02:18:14 +0900 (Thu, 08 Nov 2018) | 1 line

Following up r65583. Removed VCR files when retrieving code from upstream.
------------------------------------------------------------------------
r65611 | nobu | 2018-11-08 01:51:19 +0900 (Thu, 08 Nov 2018) | 1 line

Clear CC_WRAPPER in other than the toplevel
------------------------------------------------------------------------
r65610 | hsbt | 2018-11-08 00:55:14 +0900 (Thu, 08 Nov 2018) | 22 lines

Dir.children is available since Feature #11302. FileUtils uses
Dir.each on an internal method encapsulated on a private class
`Entry_#entry`, having no '.' neither '..' entries would make
now superfluous a chained reject filtering.

This change can improve the performance of these FileUtils
methods when the provided path covers thousands of files or
directories:

- chmod_R
- chown_R
- remove_entry
- remove_entry_secure
- rm_r
- remove_dir
- copy_entry

Related: Feature #13896 https://bugs.ruby-lang.org/issues/13896

[Feature #14109][Fix GH-1754]

Co-Authored-By: esparta <esparta@gmail.com>
------------------------------------------------------------------------
r65609 | svn | 2018-11-08 00:47:23 +0900 (Thu, 08 Nov 2018) | 1 line

* 2018-11-08
------------------------------------------------------------------------
r65608 | nobu | 2018-11-08 00:47:21 +0900 (Thu, 08 Nov 2018) | 1 line

Expand MJIT_CC on mswin too
------------------------------------------------------------------------
r65607 | nobu | 2018-11-07 23:27:27 +0900 (Wed, 07 Nov 2018) | 1 line

Convert MJIT_CC to Windows path on msys too
------------------------------------------------------------------------
r65606 | svn | 2018-11-07 21:48:39 +0900 (Wed, 07 Nov 2018) | 1 line

* expand tabs. [ci skip]
------------------------------------------------------------------------
r65605 | nobu | 2018-11-07 21:48:36 +0900 (Wed, 07 Nov 2018) | 1 line

Add cast to suppress warnings on Solaris [ci skip]
------------------------------------------------------------------------
r65604 | nobu | 2018-11-07 20:38:08 +0900 (Wed, 07 Nov 2018) | 1 line

`+` sign in the path of ruby needs to be escaped
------------------------------------------------------------------------
r65603 | nobu | 2018-11-07 19:55:24 +0900 (Wed, 07 Nov 2018) | 1 line

Generalize r65594
------------------------------------------------------------------------
r65602 | nobu | 2018-11-07 19:55:23 +0900 (Wed, 07 Nov 2018) | 1 line

clean mjit_build_dir.dylib.dSYM directory on macOS
------------------------------------------------------------------------
r65601 | svn | 2018-11-07 17:13:24 +0900 (Wed, 07 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65600 | mame | 2018-11-07 17:13:20 +0900 (Wed, 07 Nov 2018) | 4 lines

Rename get/setinlinecache to opt_get/opt_setinlinecache

The instructions are just for optimization.  To clarity the intention,
this change adds the prefix "opt_", like "opt_case_dispatch".
------------------------------------------------------------------------
r65599 | k0kubun | 2018-11-07 17:04:39 +0900 (Wed, 07 Nov 2018) | 7 lines

mjit_worker.c: stop expanding already-absolute MJIT_CC

r65577 seems to have made MJIT_CC (MJIT_CC_COMMONA) become an absolute
path. So start_process doesn't need to find that from PATH by dln_find_exe_r.

This commit is motivated by the msys2 AppVeyor CI failure:
https://ci.appveyor.com/project/ruby/ruby/builds/20084104/job/1pg15os4dtttyl0q
------------------------------------------------------------------------
r65598 | shyouhei | 2018-11-07 17:04:33 +0900 (Wed, 07 Nov 2018) | 28 lines

vm_backtrace.c: pos can be zero

(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args  "-e0"
(lldb) run
Process 97005 launched: './miniruby' (x86_64)
./miniruby(rb_print_backtrace+0x15) [0x10024f7d5] vm_dump.c:715
./miniruby(rb_vm_get_sourceline+0x85) [0x10024c4f5] vm_backtrace.c:43
./miniruby(rb_vm_make_binding+0x146) [0x100236976] vm.c:941
./miniruby(Init_VM+0x592) [0x100249f02] vm.c:3091
./miniruby(rb_call_inits+0xc2) [0x1000c5a72] inits.c:58
./miniruby(ruby_setup+0xcb) [0x100098c6b] eval.c:74
./miniruby(ruby_init+0x9) [0x100098c99] eval.c:91
./miniruby(main+0x4d) [0x10025ddbd] addr2line.c:246
Process 97005 stopped
* thread #1: tid = 0x639bb, 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44
   41       else {
   42           /* SDR() is not possible; that causes infinite loop. */
   43           rb_print_backtrace();
-> 44           __builtin_trap();
   45       }
   46   #endif
   47       return rb_iseq_line_no(iseq, pos);
(lldb)


------------------------------------------------------------------------
r65597 | shyouhei | 2018-11-07 17:03:10 +0900 (Wed, 07 Nov 2018) | 4 lines

insns.def: forgot add cast [ci skip]

See r65595

------------------------------------------------------------------------
r65596 | nobu | 2018-11-07 16:21:00 +0900 (Wed, 07 Nov 2018) | 1 line

ruby-runner.c: enable MJIT_SEARCH_BUILD_DIR only if no relative loading
------------------------------------------------------------------------
r65595 | shyouhei | 2018-11-07 16:16:50 +0900 (Wed, 07 Nov 2018) | 24 lines

insns.def: avoid integer overflow

In these expressions `1` is of type `signed int` (cf: ISO/IEC
9899:1990 section 6.1.3.2). The variable (e.g. `num`) is of type
`rb_num_t`, which is in fact `unsigned long`.  These two expressions
then exercises the "usual arithmetic conversions" (cf: ISO/IEC
9899:1990 section 6.2.1.5) and both eventually become `unsigned long`.
The two unsigned expressions are then subtracted to generate another
unsigned integer expression (cf: ISO/IEC 9899:1990 section 6.3.6).
This is where integer overflows can occur.  OTOH the left hand side of
the assignments are `rb_snum_t` which is `signed long`.  The
assignments exercise the "implicit conversion" of "an unsigned integer
is converted to its corresponding signed integer" case (cf: ISO/IEC
9899:1990 section 6.2.1.2), which is "implementation-defined" (read:
not portable).

Casts are the proper way to avoid this problem.  Because all
expressions are converted to some integer types before any binary
operations are performed, the assignments now have fully defined
behaviour.  These values can never exceed LONG_MAX so the casts must
not lose any information.

See also: https://travis-ci.org/ruby/ruby/jobs/451726874#L4357

------------------------------------------------------------------------
r65594 | k0kubun | 2018-11-07 16:15:33 +0900 (Wed, 07 Nov 2018) | 4 lines

test_process.rb: avoid test failure by r65588

on macOS.
https://travis-ci.org/ruby/ruby/jobs/451709313
------------------------------------------------------------------------
r65593 | shyouhei | 2018-11-07 14:26:11 +0900 (Wed, 07 Nov 2018) | 5 lines

.travis.yml: UNALIGNED_WORD_ACCESS=0 for UBSAN

Unaligned word access warnings generated by UBSAN are often
treated well already, depending on this macro.

------------------------------------------------------------------------
r65592 | shyouhei | 2018-11-07 14:23:03 +0900 (Wed, 07 Nov 2018) | 9 lines

string.c: this assumption is false [ci skip]

Looking at the lines right above, it is clear than a blue sky
that we cannot assume `p` to be aligned at all when
UNALIGNED_WORD_ACCESS is true.  It is a wrong idea to use
__builtin_assume_aligned for that situation.

See also: https://travis-ci.org/ruby/ruby/jobs/451710732#L2007

------------------------------------------------------------------------
r65591 | kazu | 2018-11-07 14:07:56 +0900 (Wed, 07 Nov 2018) | 1 line

Fix call-seq [ci skip]
------------------------------------------------------------------------
r65590 | shyouhei | 2018-11-07 13:56:24 +0900 (Wed, 07 Nov 2018) | 4 lines

suppress GCC warning about unknown sanitizers

See also: https://travis-ci.org/ruby/ruby/jobs/451710726#L1941

------------------------------------------------------------------------
r65589 | shyouhei | 2018-11-07 13:09:05 +0900 (Wed, 07 Nov 2018) | 9 lines

blacklist UBSAN's unsigned integer overflow

Integer overflow for unsigned types are fully defined in C. They
are not always problematic (but not always OK).  These functions
in this changeset intentionally utilizes that behaviour.
Blacklist from UBSAN checks for better output.

See also: https://travis-ci.org/ruby/ruby/jobs/451624829

------------------------------------------------------------------------
r65588 | nobu | 2018-11-07 13:02:14 +0900 (Wed, 07 Nov 2018) | 1 line

ruby-runner.c: enable MJIT_SEARCH_BUILD_DIR
------------------------------------------------------------------------
r65587 | nobu | 2018-11-07 11:49:26 +0900 (Wed, 07 Nov 2018) | 4 lines

mjit_build_dir: separate MJIT_BUILD_DIR

* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to
  eliminate the feature for test-all after installation.
------------------------------------------------------------------------
r65586 | nobu | 2018-11-07 08:50:50 +0900 (Wed, 07 Nov 2018) | 1 line

Fix build_os:host_os pair
------------------------------------------------------------------------
r65585 | svn | 2018-11-07 07:56:00 +0900 (Wed, 07 Nov 2018) | 1 line

* 2018-11-07
------------------------------------------------------------------------
r65584 | mame | 2018-11-07 07:55:57 +0900 (Wed, 07 Nov 2018) | 6 lines

Revert "thread.c (rb_wait_for_single_fd): no point initializing pollfd.revents"

It may cause an access to uninitialized variables.
The call to ppoll will set the `revents` field, but ppoll is not always
called because it is in the guard `!RUBY_VM_INTERRUPTED(th->ec)`.
This issue was found by Coverity Scan.
------------------------------------------------------------------------
r65583 | hsbt | 2018-11-07 05:47:09 +0900 (Wed, 07 Nov 2018) | 3 lines

Removed VCR cassettes files for reducing package size.

  [Bug #14219]
------------------------------------------------------------------------
r65577 | nobu | 2018-11-06 21:08:54 +0900 (Tue, 06 Nov 2018) | 1 line

Expand MJIT_CC in configure
------------------------------------------------------------------------
r65576 | shyouhei | 2018-11-06 20:53:01 +0900 (Tue, 06 Nov 2018) | 4 lines

workaround C++ism in ASAN header 

See also: https://travis-ci.org/ruby/ruby/jobs/451299690

------------------------------------------------------------------------
r65575 | svn | 2018-11-06 19:19:59 +0900 (Tue, 06 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65574 | shyouhei | 2018-11-06 19:19:55 +0900 (Tue, 06 Nov 2018) | 8 lines

cont.c: direct use of rb_thread_t

The only usage of rb_fiber_reset_root_local_storage() is from
ruby_vm_destruct(), where the object space is already terminated.
This `th->self` is not alive.  Why not just use `th` itself.

See also: https://travis-ci.org/ruby/ruby/jobs/451294954

------------------------------------------------------------------------
r65573 | shyouhei | 2018-11-06 19:06:07 +0900 (Tue, 06 Nov 2018) | 5 lines

adopt sanitizer API

These APIs are much like <valgrind/memcheck.h>. Use them to
fine-grain annotate the usage of our memory.

------------------------------------------------------------------------
r65572 | k0kubun | 2018-11-06 17:01:28 +0900 (Tue, 06 Nov 2018) | 1 line

mjit.c: don't use mutex before checking availability
------------------------------------------------------------------------
r65571 | k0kubun | 2018-11-06 16:30:37 +0900 (Tue, 06 Nov 2018) | 7 lines

mjit_worker.c: don't use _one for now

I'm planning to use _one later, but it may be doubly registered by
switching `stop_worker_p` now and so we should not use _one for now.

Otherwise stale job may reject new job registration and
copy_cache_from_main_thread may wait forever.
------------------------------------------------------------------------
r65570 | nobu | 2018-11-06 16:28:11 +0900 (Tue, 06 Nov 2018) | 4 lines

Makefile.in: do not expand MJIT_CC if cross compiling

* Makefile.in (mjit_config.h): expand MJIT_CC only if native
  build, the path on cross compiling host is useless.
------------------------------------------------------------------------
r65569 | k0kubun | 2018-11-06 16:22:25 +0900 (Tue, 06 Nov 2018) | 9 lines

mjit_worker.c: strictly control MJIT copy job

-available region. reducing risk of SEGV in mjit_copy_job_handler() like
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1446117

I'm not sure which exact part is causing "[BUG] Segmentation fault at 0x0000000000000008"
on `(mjit_copy_job_handler+0x12) [0x564a6c4ce632] /home/ko1/ruby/src/trunk-mjit/mjit.c:26`...

mjit.c: ditto
------------------------------------------------------------------------
r65568 | nobu | 2018-11-06 16:03:24 +0900 (Tue, 06 Nov 2018) | 4 lines

Makefile.in: convert MJIT_CC to Windows path

* Makefile.in (mjit_config.h): convert MJIT_CC to Windows path on
  mingw.
------------------------------------------------------------------------
r65567 | ko1 | 2018-11-06 15:36:51 +0900 (Tue, 06 Nov 2018) | 16 lines

Fix TracePoint for nested iseq loaded from binary [Bug#14702]

When loading iseq from binary while a TracePoint is on, we need to
recompile instructions to their "trace_" variant. Before this commit
we only recompiled instructions in the top level iseq, which meant
that TracePoint was malfunctioning for code inside module/class/method
definitions.

* compile.c: Move rb_iseq_init_trace to rb_ibf_load_iseq_complete.
  It is called on all iseqs during loading.

* test_iseq.rb: Test that tracepoints fire within children iseq when
  using load_from_binary.

This patch is from: Alan Wu <XrXr@users.noreply.github.com>

------------------------------------------------------------------------
r65566 | nobu | 2018-11-06 14:14:36 +0900 (Tue, 06 Nov 2018) | 1 line

Revert "mjit_build_dir: separate MJIT_BUILD_DIR"
------------------------------------------------------------------------
r65565 | shyouhei | 2018-11-06 14:07:54 +0900 (Tue, 06 Nov 2018) | 2 lines

do not delete function declarations in case of non-sanitizing builds

------------------------------------------------------------------------
r65564 | shyouhei | 2018-11-06 14:06:20 +0900 (Tue, 06 Nov 2018) | 9 lines

annotate functions to blacklist MSAN

In these functions we are intentionally reading memory address
not owned by us.  These reads should not be diagnosed.

See also [Bug #8680]
See also https://travis-ci.org/ruby/ruby/jobs/451202718


------------------------------------------------------------------------
r65563 | nobu | 2018-11-06 13:13:48 +0900 (Tue, 06 Nov 2018) | 4 lines

mjit_build_dir: separate MJIT_BUILD_DIR

* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to
  eliminate the feature for test-all after installation.
------------------------------------------------------------------------
r65562 | nobu | 2018-11-06 13:13:47 +0900 (Tue, 06 Nov 2018) | 4 lines

Makefile.in: make MJIT_CC_COMMON an absolute path

* Makefile.in (mjit_config.h): expand MJIT_CC_COMMON path to
  mitigate potential security risks.
------------------------------------------------------------------------
r65561 | nobu | 2018-11-06 12:32:57 +0900 (Tue, 06 Nov 2018) | 5 lines

configure.ac: insert DLDSHARED

* configure.ac (DLDSHARED): `.dylib` (created by `-dynamiclib`)
  and `.bundle` (created by `-dynamic -bundle`) on macOS are
  different.  `LIBRUBY_LDSHARED` should be the former always.
------------------------------------------------------------------------
r65560 | usa | 2018-11-06 12:18:23 +0900 (Tue, 06 Nov 2018) | 5 lines

Fixed compile error introduced at r65558

* internal.h (ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS): of course, parens around
  function signature in its definition is syntax error.

------------------------------------------------------------------------
r65559 | shyouhei | 2018-11-06 12:06:33 +0900 (Tue, 06 Nov 2018) | 5 lines

.travis.yml: FIBER_USE_NATIVE=0

I remember this configuration unveiled several bugs before.
Better check it occasionally.

------------------------------------------------------------------------
r65558 | shyouhei | 2018-11-06 11:57:28 +0900 (Tue, 06 Nov 2018) | 11 lines

gc.c: move ASAN check to configure

Availability of attributes are checked in configure these days,
rather than compiler macros.  Also
__attribute__((no_address_safety_analysis)) is considered
deprecated in both GCC and Clang.  Use the current best practice
if available.  See also:

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
https://clang.llvm.org/docs/AddressSanitizer.html

------------------------------------------------------------------------
r65557 | shyouhei | 2018-11-06 10:45:09 +0900 (Tue, 06 Nov 2018) | 4 lines

.travis.yml: allow UBSAN to fail

Forgot this line, sorry! 

------------------------------------------------------------------------
r65556 | shyouhei | 2018-11-06 10:36:20 +0900 (Tue, 06 Nov 2018) | 7 lines

.travis.yml: add cron-only builds

Inspired by [GH-1984], let us add some tests that run only
once a day.  These configurations are either slow to compile
or slow to run.  But I think they are worth done occasionally.


------------------------------------------------------------------------
r65555 | svn | 2018-11-06 08:06:58 +0900 (Tue, 06 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65554 | naruse | 2018-11-06 08:06:50 +0900 (Tue, 06 Nov 2018) | 1 line

Don't set throw data as cause [Bug #15282]
------------------------------------------------------------------------
r65553 | normal | 2018-11-06 07:56:57 +0900 (Tue, 06 Nov 2018) | 6 lines

thread.c (rb_wait_for_single_fd): no point initializing pollfd.revents

poll(2) and ppoll(2) implementations need to check and write to
.revents on the initial scan, anyways.  So any poll/ppoll call
which returns a positive result can be expected to have an
initialized .revents value.
------------------------------------------------------------------------
r65552 | svn | 2018-11-06 02:27:12 +0900 (Tue, 06 Nov 2018) | 1 line

* 2018-11-06
------------------------------------------------------------------------
r65551 | nobu | 2018-11-06 02:27:10 +0900 (Tue, 06 Nov 2018) | 4 lines

Relax MJIT_BUILD_DIR restriction

* mjit.c (init_header_filename): sticky-mode directory probably
  would be less unsafe even if it is not owned.
------------------------------------------------------------------------
r65550 | svn | 2018-11-05 17:02:31 +0900 (Mon, 05 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65549 | ko1 | 2018-11-05 17:02:29 +0900 (Mon, 05 Nov 2018) | 6 lines

use `RSTRUCT_CONST_PTR` carefully.

* struct.c: should not use `RSTRUCT_CONST_PTR` with method dispatch
  because pointers can be obsolete after method dispatch. `rb_equal()`
  and so on can dispatch Ruby's methods.

------------------------------------------------------------------------
r65548 | kazu | 2018-11-05 16:01:49 +0900 (Mon, 05 Nov 2018) | 1 line

Fix up r65505 [ci skip]
------------------------------------------------------------------------
r65547 | kazu | 2018-11-05 16:01:47 +0900 (Mon, 05 Nov 2018) | 1 line

Sort in alphabetical order [ci skip]
------------------------------------------------------------------------
r65546 | kazu | 2018-11-05 15:02:42 +0900 (Mon, 05 Nov 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r65545 | nobu | 2018-11-05 11:57:06 +0900 (Mon, 05 Nov 2018) | 1 line

Respect explicitly given MJIT_CC
------------------------------------------------------------------------
r65544 | nobu | 2018-11-05 11:25:46 +0900 (Mon, 05 Nov 2018) | 1 line

Create MJIT header with strict permission
------------------------------------------------------------------------
r65543 | svn | 2018-11-05 11:14:00 +0900 (Mon, 05 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65542 | yui-knk | 2018-11-05 11:13:45 +0900 (Mon, 05 Nov 2018) | 1 line

Implement `RubyVM::AST.of` [Feature #14836]
------------------------------------------------------------------------
r65541 | nobu | 2018-11-05 11:05:12 +0900 (Mon, 05 Nov 2018) | 1 line

More verbose message at unsafe header
------------------------------------------------------------------------
r65540 | naruse | 2018-11-05 07:36:05 +0900 (Mon, 05 Nov 2018) | 3 lines

addr2line.c uses c99ism

https://travis-ci.org/ruby/ruby/jobs/450505006
------------------------------------------------------------------------
r65539 | sorah | 2018-11-05 00:39:00 +0900 (Mon, 05 Nov 2018) | 6 lines

Fix RubyGems extension build failure after r65470

Port of upstream patch https://github.com/rubygems/rubygems/pull/2457

Since r65470 (Upstream: https://github.com/rubygems/rubygems/pull/2441),
builds of extension gem had always failed under really_verbose mode.
------------------------------------------------------------------------
r65538 | svn | 2018-11-05 00:14:44 +0900 (Mon, 05 Nov 2018) | 1 line

* 2018-11-05
------------------------------------------------------------------------
r65537 | naruse | 2018-11-05 00:14:42 +0900 (Mon, 05 Nov 2018) | 1 line

Use symtab if there's no .dSYM file
------------------------------------------------------------------------
r65536 | nobu | 2018-11-04 21:46:50 +0900 (Sun, 04 Nov 2018) | 1 line

Check MJIT_BUILD_DIR strictly
------------------------------------------------------------------------
r65535 | nobu | 2018-11-04 21:24:03 +0900 (Sun, 04 Nov 2018) | 1 line

MJIT_CC should not use CC_WRAPPER
------------------------------------------------------------------------
r65534 | stomar | 2018-11-04 20:46:49 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] add docs for ENV.{filter,filter!}
------------------------------------------------------------------------
r65533 | stomar | 2018-11-04 20:45:59 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] fix wrong cross-references
------------------------------------------------------------------------
r65532 | stomar | 2018-11-04 20:45:11 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] add missing `block' in call-seq's
------------------------------------------------------------------------
r65531 | stomar | 2018-11-04 20:44:13 +0900 (Sun, 04 Nov 2018) | 1 line

struct.c: [DOC] add docs for Struct#filter
------------------------------------------------------------------------
r65530 | stomar | 2018-11-04 20:43:09 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] add docs for Hash#{filter,filter!}
------------------------------------------------------------------------
r65529 | stomar | 2018-11-04 20:41:52 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] improve Hash#{select!,keep_if} docs
------------------------------------------------------------------------
r65528 | stomar | 2018-11-04 20:40:32 +0900 (Sun, 04 Nov 2018) | 1 line

array.c: [DOC] add docs for Array#{filter,filter!}
------------------------------------------------------------------------
r65527 | stomar | 2018-11-04 20:39:28 +0900 (Sun, 04 Nov 2018) | 1 line

array.c: [DOC] improve Array#{select,select!,keep_if} docs
------------------------------------------------------------------------
r65526 | nobu | 2018-11-04 11:09:01 +0900 (Sun, 04 Nov 2018) | 1 line

Hide Time::TM as Time::tm
------------------------------------------------------------------------
r65525 | nobu | 2018-11-04 11:02:28 +0900 (Sun, 04 Nov 2018) | 1 line

Refine Timezone class in test-spec
------------------------------------------------------------------------
r65524 | svn | 2018-11-04 10:14:52 +0900 (Sun, 04 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65523 | hsbt | 2018-11-04 10:14:48 +0900 (Sun, 04 Nov 2018) | 3 lines

Merge upstream changes from 2-0-stable branch of bundler/bundler.

  * It update bundler 2 mode to bundler 3.
------------------------------------------------------------------------
r65522 | nobu | 2018-11-04 09:22:13 +0900 (Sun, 04 Nov 2018) | 4 lines

complex.c: rb_dbl_complex_polar_pi

* complex.c (rb_dbl_complex_polar_pi): suffixed with _pi to
  clarify that `ang` is not radian, but multiplied by PI.
------------------------------------------------------------------------
r65521 | nobu | 2018-11-04 08:43:17 +0900 (Sun, 04 Nov 2018) | 7 lines

Makefile.in: use CC_WRAPPER

* Makefile.in (CC_WRAPPER): use the wrapper to suppress warnings
  by Apple's broken packages when linking in the toplevel
  directory.

* configure.ac (CC_WRAPPER): separate from CC.
------------------------------------------------------------------------
r65520 | nobu | 2018-11-04 08:10:57 +0900 (Sun, 04 Nov 2018) | 1 line

configure.ac: set CC_WRAPPER by checking message
------------------------------------------------------------------------
r65519 | svn | 2018-11-04 08:08:10 +0900 (Sun, 04 Nov 2018) | 1 line

* 2018-11-04
------------------------------------------------------------------------
r65518 | naruse | 2018-11-04 08:08:08 +0900 (Sun, 04 Nov 2018) | 4 lines

Just skip on armv7l-linux

it seems ssl.close doesn't cause EOFError on client side, but just skip
because it breaks test-all.
------------------------------------------------------------------------
r65517 | hsbt | 2018-11-03 21:31:51 +0900 (Sat, 03 Nov 2018) | 3 lines

Merge rubygems-3.0.0.beta2.

  * It enabled `USE_BUNDLER_FOR_GEMDEPS` for using gemdeps of rubygems.
------------------------------------------------------------------------
r65516 | k0kubun | 2018-11-03 21:24:49 +0900 (Sat, 03 Nov 2018) | 7 lines

Always inline rb_to_integer to prevent a method call penalty

for integer types

Close https://github.com/ruby/ruby/pull/2001

Co-Authored-By: methodmissing <lourens@methodmissing.com>
------------------------------------------------------------------------
r65515 | ko1 | 2018-11-03 20:20:54 +0900 (Sat, 03 Nov 2018) | 5 lines

expose `rb_ary_detransient`.

* internal.h: expose `rb_ary_detransient`. I'm not sure why there are
  no many troubles without this patch...

------------------------------------------------------------------------
r65514 | stomar | 2018-11-03 17:43:19 +0900 (Sat, 03 Nov 2018) | 5 lines

lib/racc/parser.rb: use require for racc/cparse

* lib/racc/parser.rb: reverted r65505.  require_relative does
  not work for racc/cparse.so, as extension libraries are placed
  in other directories than Ruby libraries.
------------------------------------------------------------------------
r65513 | nobu | 2018-11-03 16:58:56 +0900 (Sat, 03 Nov 2018) | 7 lines

hash.c: fix types

* hash.c (RHASH_ARRAY_BOUND_RAW): should be unsigned as well as
  RHASH_ARRAY_SIZE_RAW.

* hash.c (find_entry): return unsigned for the consistency with
  RHASH_ARRAY_SIZE and RHASH_ARRAY_BOUND.
------------------------------------------------------------------------
r65512 | nobu | 2018-11-03 15:55:57 +0900 (Sat, 03 Nov 2018) | 3 lines

internal.h: RHASH_ARRAY_SIZE_RAW value is unsigned

and get rid of warnings.  [ruby-core:89688] [Bug #15279]
------------------------------------------------------------------------
r65511 | nobu | 2018-11-03 14:29:02 +0900 (Sat, 03 Nov 2018) | 5 lines

lib/cgi/util.rb: use require

* lib/cgi/util.rb: reverted r65505.  require_relative does not
  work for cgi/escape.so, as extension libraries are placed in
  other directories than ruby libraries.  [Bug #15206]
------------------------------------------------------------------------
r65510 | k0kubun | 2018-11-03 09:44:04 +0900 (Sat, 03 Nov 2018) | 1 line

wercker.yml: use pipeline name for notification [ci skip]
------------------------------------------------------------------------
r65509 | hsbt | 2018-11-03 08:07:56 +0900 (Sat, 03 Nov 2018) | 8 lines

Added bundler as default gems. Revisit [Feature #12733]

  * bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*:
    Merge from latest stable branch of bundler/bundler repository and
    added workaround patches. I will backport them into upstream.
  * common.mk, defs/gmake.mk: Added `test-bundler` task for test suite
    of bundler.
  * tool/sync_default_gems.rb: Added sync task for bundler.
------------------------------------------------------------------------
r65508 | ktsj | 2018-11-03 07:28:21 +0900 (Sat, 03 Nov 2018) | 1 line

common.mk: --no-ri and --no-rdoc options were removed
------------------------------------------------------------------------
r65507 | marcandre | 2018-11-03 02:52:51 +0900 (Sat, 03 Nov 2018) | 3 lines

lib/matrix.rb: Make Matrix & Vector mutable. Add #[]=, #map!.

Adapted from patch by Grzegorz Jakubiak. [#14151] [Fix GH-1769] [Fix GH-1905]
------------------------------------------------------------------------
r65506 | marcandre | 2018-11-03 02:52:43 +0900 (Sat, 03 Nov 2018) | 3 lines

lib/*: Prefer require_relative over require, remove explicit extension

[#15206] [Fix GH-1976]
------------------------------------------------------------------------
r65505 | marcandre | 2018-11-03 02:52:33 +0900 (Sat, 03 Nov 2018) | 3 lines

lib/*: Prefer require_relative over require.

[#15206] [Fix GH-1976]
------------------------------------------------------------------------
r65504 | marcandre | 2018-11-03 02:52:20 +0900 (Sat, 03 Nov 2018) | 1 line

lib/matrix: Use consistent style
------------------------------------------------------------------------
r65503 | marcandre | 2018-11-03 02:52:12 +0900 (Sat, 03 Nov 2018) | 1 line

lib/matrix: use consistent style
------------------------------------------------------------------------
r65502 | marcandre | 2018-11-03 02:52:05 +0900 (Sat, 03 Nov 2018) | 1 line

lib/matrix.rb: Alias antisymmetric? with skew_symmetric?
------------------------------------------------------------------------
r65501 | svn | 2018-11-03 02:51:57 +0900 (Sat, 03 Nov 2018) | 1 line

* 2018-11-03
------------------------------------------------------------------------
r65500 | marcandre | 2018-11-03 02:51:56 +0900 (Sat, 03 Nov 2018) | 3 lines

Revert "Matrix: Add #reflexive? method. [Fix GH-1730]"

This reverts commit 19fe6552c456e41c0b85816806399ca1609255c0.
------------------------------------------------------------------------
r65499 | naruse | 2018-11-02 22:30:48 +0900 (Fri, 02 Nov 2018) | 3 lines

Add timeout

it breaks armv7 CI.
------------------------------------------------------------------------
r65498 | k0kubun | 2018-11-02 21:21:59 +0900 (Fri, 02 Nov 2018) | 3 lines

README.md: add wercker status badge [ci skip]

and show trunk branch's build status for travis as well
------------------------------------------------------------------------
r65497 | svn | 2018-11-02 20:40:46 +0900 (Fri, 02 Nov 2018) | 1 line

* 2018-11-02
------------------------------------------------------------------------
r65496 | k0kubun | 2018-11-02 20:40:43 +0900 (Fri, 02 Nov 2018) | 4 lines

mjit_worker.c: do no access pointer after free

When we return there, `unit` is already freed.
This is detected by coverity scan.
------------------------------------------------------------------------
r65495 | normal | 2018-11-01 23:10:47 +0900 (Thu, 01 Nov 2018) | 17 lines

thread_pthread.c (native_ppoll_sleep): new eventfd (or pipe) for ubf

Relying on ubf_select + ubf_list for main thread is not
guaranteed to wake a process up as it does not acquire
sigwait_fd and all other threads may be sleeping.
native_cond_sleep and the sigwait_fd path are immune to TOCTOU
issues, but native_ppoll_sleep may have its wakeup stolen
by sigwait_fd sleeper and the RUBY_VM_INTERRUPTED check is
insufficient.

Note: for pthreads platforms without POSIX timers, this becomes
more expensive than Ruby 2.5, as six pipe FDs come into use.
Linux is best off with only two descriptors for eventfd.

[ruby-core:89655]
cf. http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1437559
    http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1437673
------------------------------------------------------------------------
r65494 | k0kubun | 2018-11-01 22:49:33 +0900 (Thu, 01 Nov 2018) | 6 lines

wercker.yml: stop allowing webrick failure

Failure seems no longer reproductive recently...

Also I wrote a comment about this complicated test matrix and improved
parallelism a little more again.
------------------------------------------------------------------------
r65493 | svn | 2018-11-01 17:53:53 +0900 (Thu, 01 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65492 | ko1 | 2018-11-01 17:53:44 +0900 (Thu, 01 Nov 2018) | 5 lines

introduce USE_TRANSIENT_HEAP to enable/disable theap.

* include/ruby/ruby.h: intrdocue `USE_TRANSIENT_HEAP` macro
  to enable/disable transient heap.

------------------------------------------------------------------------
r65491 | ko1 | 2018-11-01 17:15:42 +0900 (Thu, 01 Nov 2018) | 2 lines

add dependencies to transient_heap.h.

------------------------------------------------------------------------
r65490 | svn | 2018-11-01 16:49:07 +0900 (Thu, 01 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65489 | k0kubun | 2018-11-01 16:49:06 +0900 (Thu, 01 Nov 2018) | 6 lines

TestDelegateClass.rb: skip test_frozen for --jit-wait

for now. Investigating.
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5bda979a191eda000655a8d2?step=5bda9fe4591ca80007653f64

wercker.yml: improve parallelism again.
------------------------------------------------------------------------
r65488 | kazu | 2018-11-01 16:25:50 +0900 (Thu, 01 Nov 2018) | 1 line

Fix call-seq of OpenSSL.fips_mode and WIN32OLE_METHOD#name [ci skip]
------------------------------------------------------------------------
r65487 | kazu | 2018-11-01 15:36:04 +0900 (Thu, 01 Nov 2018) | 5 lines

Fix call-seq of Encoding::Converter#putback [ci skip]

[Fix GH-1999]

From: Takayuki Matsubara <takayuki.1229@gmail.com>
------------------------------------------------------------------------
r65486 | k0kubun | 2018-11-01 15:03:29 +0900 (Thu, 01 Nov 2018) | 3 lines

wercker.yml: improve parallelism more

mjit-test2 is taking more time now.
------------------------------------------------------------------------
r65485 | usa | 2018-11-01 14:19:16 +0900 (Thu, 01 Nov 2018) | 4 lines

Remove wrong spec.

[Bug#15067] [ruby-core:88828]

------------------------------------------------------------------------
r65484 | k0kubun | 2018-11-01 14:17:08 +0900 (Thu, 01 Nov 2018) | 1 line

wercker.yml: improve CI step message [ci skip]
------------------------------------------------------------------------
r65483 | k0kubun | 2018-11-01 14:03:59 +0900 (Thu, 01 Nov 2018) | 3 lines

wercker.yml: change pipeline names

because the name "-wait" is no longer distinguishing these pipelines
------------------------------------------------------------------------
r65482 | k0kubun | 2018-11-01 13:46:46 +0900 (Thu, 01 Nov 2018) | 1 line

wercker.yml: delete obsoleted test definition
------------------------------------------------------------------------
r65481 | k0kubun | 2018-11-01 13:43:40 +0900 (Thu, 01 Nov 2018) | 1 line

wercker.yml: improve parallelism of test-mjit and test-mjit-wait
------------------------------------------------------------------------
r65480 | k0kubun | 2018-11-01 13:20:26 +0900 (Thu, 01 Nov 2018) | 4 lines

test_win32ole_event.rb: retry #test_s_new_loop with sleep

It seems to fail randomly:
https://ci.appveyor.com/project/ruby/ruby/builds/19963142/job/8gaxepksa0i3b998
------------------------------------------------------------------------
r65479 | ko1 | 2018-11-01 11:50:35 +0900 (Thu, 01 Nov 2018) | 4 lines

fix WB miss.

* hash.c (linear_copy): remember a hash object to mark pointing objects.

------------------------------------------------------------------------
r65478 | k0kubun | 2018-11-01 11:50:10 +0900 (Thu, 01 Nov 2018) | 4 lines

wercker.yml: harder test-mjit-wait testing

Currently TracePoint enablement may cancel all JITs. So for now,
separating test executions would reveal more failures.
------------------------------------------------------------------------
r65477 | k0kubun | 2018-11-01 10:47:26 +0900 (Thu, 01 Nov 2018) | 4 lines

mjit_worker.c: emphasize free_list of compact_units [ci skip]

In https://bugs.ruby-lang.org/issues/14867#note-98, it's considered
useless at once. So I emphasized the necessity of it in the comment.
------------------------------------------------------------------------
r65476 | svn | 2018-11-01 08:55:24 +0900 (Thu, 01 Nov 2018) | 1 line

* 2018-11-01
------------------------------------------------------------------------
r65475 | normal | 2018-11-01 08:55:22 +0900 (Thu, 01 Nov 2018) | 10 lines

mjit: get rid of rb_mjit_unit_node and use ccan/list

rb_mjit_unit can either exist in unit_queue or active_units, but
not both.  This will make state transitions for event-based MJIT
process management easier.

v2: recheck unit->iseq after GC wakeup

The iseq may be GC-ed while we were waiting for it since we
delete the unit from unit_queue during get_from_list
------------------------------------------------------------------------
r65474 | k0kubun | 2018-10-31 22:12:39 +0900 (Wed, 31 Oct 2018) | 5 lines

Revert "revert r65471 and include Eric's patch as well"

This reverts commit ff5dc2cbbf9e7b67c8579ef166bf6a4755507304.

Deadlock: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1438883
------------------------------------------------------------------------
r65473 | k0kubun | 2018-10-31 21:21:55 +0900 (Wed, 31 Oct 2018) | 6 lines

revert r65471 and include Eric's patch as well

https://bugs.ruby-lang.org/issues/14867#note-112

I wanna touch similar places. To avoid our conflict, let me merge Eric's patch earlier.
Let's watch trunk-mjit / trunk-mjit-wait CIs.
------------------------------------------------------------------------
r65472 | naruse | 2018-10-31 20:08:07 +0900 (Wed, 31 Oct 2018) | 1 line

Use C90 comments
------------------------------------------------------------------------
r65471 | normal | 2018-10-31 15:44:42 +0900 (Wed, 31 Oct 2018) | 6 lines

Revert "mjit: get rid of rb_mjit_unit_node and use ccan/list"

This reverts commit c5177fa8464ac304547e384583f9c287e124d34a. r65468

Many CI failures like:
 http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1438415
------------------------------------------------------------------------
r65470 | hsbt | 2018-10-31 12:23:30 +0900 (Wed, 31 Oct 2018) | 1 line

Merge upstream from rubygems/rubygems master branch.
------------------------------------------------------------------------
r65469 | shyouhei | 2018-10-31 12:19:37 +0900 (Wed, 31 Oct 2018) | 6 lines

explicit cast to void* required for %p

No automatic type promotion is expected for variadic arguments.
You have to do it by hand.


------------------------------------------------------------------------
r65468 | normal | 2018-10-31 12:02:01 +0900 (Wed, 31 Oct 2018) | 7 lines

mjit: get rid of rb_mjit_unit_node and use ccan/list

rb_mjit_unit can either exist in unit_queue or active_units, but
not both.  This will make state transitions for event-based MJIT
process management easier.

[ruby-core:89654]
------------------------------------------------------------------------
r65467 | nobu | 2018-10-31 11:57:30 +0900 (Wed, 31 Oct 2018) | 5 lines

parse.y: last node of NODE_ARRAY

* parse.y (heredoc_dedent): manage the last node of NODE_ARRAY,
  when concatenating dedented literals.
  [ruby-core:89649] [Bug #15272]
------------------------------------------------------------------------
r65466 | ko1 | 2018-10-31 11:39:08 +0900 (Wed, 31 Oct 2018) | 5 lines

remove '//' style comments.

* variable.c (obj_ivar_set): remove '//' style comments pointed out by the
  following build log: https://travis-ci.org/ruby/ruby/jobs/448551951

------------------------------------------------------------------------
r65465 | normal | 2018-10-31 11:31:15 +0900 (Wed, 31 Oct 2018) | 8 lines

thread_pthread.c (ubf_select): avoid deadlock on contention

vm->gvl.lock can be held by another thread, we must not wait
on it when called by the MJIT worker thread when it migrates
work to another thread.  ubf_select is designed to do retrying
anyways, so it has no obligation to wake up a timer thread.

cf.  http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1437880
------------------------------------------------------------------------
r65464 | ko1 | 2018-10-31 11:06:33 +0900 (Wed, 31 Oct 2018) | 5 lines

remove '//' style comments.

* hash.c: remove '//' style comments pointed out by the following
  build log: https://travis-ci.org/ruby/ruby/jobs/448551951

------------------------------------------------------------------------
r65463 | ko1 | 2018-10-31 10:36:39 +0900 (Wed, 31 Oct 2018) | 5 lines

add casts.

* gc.c (rb_raw_obj_info): fix type mismatch specified by the following
  build log: https://travis-ci.org/ruby/ruby/jobs/448634481

------------------------------------------------------------------------
r65462 | shyouhei | 2018-10-31 09:53:43 +0900 (Wed, 31 Oct 2018) | 7 lines

.travis.yml: mandate -ansi check

Seems it is failing to compile right now; make it mandatory
so that other devs can be aware of it.

Will revert this change once the source code gets stable.

------------------------------------------------------------------------
r65461 | hsbt | 2018-10-31 09:13:56 +0900 (Wed, 31 Oct 2018) | 1 line

Removed control characters from gemspec.
------------------------------------------------------------------------
r65460 | nobu | 2018-10-31 08:43:13 +0900 (Wed, 31 Oct 2018) | 5 lines

parse.y: last location from bison

* parse.y (command): set the last location from the location
  managed by bison, so that other nodes are not needed.
  [ruby-core:89648] [Bug #15271]
------------------------------------------------------------------------
r65459 | k0kubun | 2018-10-31 08:16:16 +0900 (Wed, 31 Oct 2018) | 7 lines

revert r65441

I could collect 2 test failure information:
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bd8a253191eda0006545d47?step=5bd8a29387436a0006842ef0
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bd8c6e0191eda0006547273?step=5bd8c71a591ca8000756f4a3

I'll skip this again to make it functional as CI
------------------------------------------------------------------------
r65458 | ko1 | 2018-10-31 07:55:31 +0900 (Wed, 31 Oct 2018) | 13 lines

fix type.

* internal.h (RHASH_ARRAY_SIZE_RAW): should be `int` because
  it returns n<=8.

* hash.c (RHASH_ARRAY_BOUND_RAW): ditto.

* hash.c (RHASH_ARRAY_SIZE_RAW): remove a duplicated definition.

* hash.c (linear_keys, linear_values): return `long`.

* hash.c (linear_keys): fix initialize expression of `key_end`.

------------------------------------------------------------------------
r65457 | ko1 | 2018-10-31 07:24:35 +0900 (Wed, 31 Oct 2018) | 1 line

update NEWS about theap
------------------------------------------------------------------------
r65456 | ko1 | 2018-10-31 07:16:26 +0900 (Wed, 31 Oct 2018) | 4 lines

fix type.

* string.c (rb_str_format_m): should pass `int`.

------------------------------------------------------------------------
r65455 | svn | 2018-10-31 07:12:12 +0900 (Wed, 31 Oct 2018) | 1 line

* remove trailing spaces, expand tabs.
------------------------------------------------------------------------
r65454 | ko1 | 2018-10-31 07:11:51 +0900 (Wed, 31 Oct 2018) | 14 lines

support theap for T_HASH. [Feature #14989]

* hash.c, internal.h: support theap for small Hash.
  Introduce RHASH_ARRAY (li_table) besides st_table and small Hash
  (<=8 entries) are managed by an array data structure.
  This array data can be managed by theap.
  If st_table is needed, then converting array data to st_table data.

  For st_table using code, we prepare "stlike" APIs which accepts hash value
  and are very similar to st_ APIs.

  This work is based on the GSoC achievement
  by tacinight <tacingiht@gmail.com> and refined by ko1.

------------------------------------------------------------------------
r65453 | svn | 2018-10-31 07:03:48 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65452 | ko1 | 2018-10-31 07:03:42 +0900 (Wed, 31 Oct 2018) | 4 lines

support theap for T_STRUCT.

* struct.c: members memory can use theap.

------------------------------------------------------------------------
r65451 | ko1 | 2018-10-31 07:01:17 +0900 (Wed, 31 Oct 2018) | 7 lines

support theap for T_OBJECT.

* variable.c: now instance variable space has theap supports.
  obj_ivar_heap_alloc() tries to acquire memory from theap.

* debug_counter.h: add some counters for theap.

------------------------------------------------------------------------
r65450 | svn | 2018-10-31 06:54:13 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65449 | ko1 | 2018-10-31 06:53:56 +0900 (Wed, 31 Oct 2018) | 28 lines

introduce TransientHeap. [Bug #14858]

* transient_heap.c, transient_heap.h: implement TransientHeap (theap).
  theap is designed for Ruby's object system. theap is like Eden heap
  on generational GC terminology. theap allocation is very fast because
  it only needs to bump up pointer and deallocation is also fast because
  we don't do anything. However we need to evacuate (Copy GC terminology)
  if theap memory is long-lived. Evacuation logic is needed for each type.

  See [Bug #14858] for details.

* array.c: Now, theap for T_ARRAY is supported.

  ary_heap_alloc() tries to allocate memory area from theap. If this trial
  sccesses, this array has theap ptr and RARRAY_TRANSIENT_FLAG is turned on.
  We don't need to free theap ptr.

* ruby.h: RARRAY_CONST_PTR() returns malloc'ed memory area. It menas that
  if ary is allocated at theap, force evacuation to malloc'ed memory.
  It makes programs slow, but very compatible with current code because
  theap memory can be evacuated (theap memory will be recycled).

  If you want to get transient heap ptr, use RARRAY_CONST_PTR_TRANSIENT()
  instead of RARRAY_CONST_PTR(). If you can't understand when evacuation
  will occur, use RARRAY_CONST_PTR().

(re-commit of r65444)

------------------------------------------------------------------------
r65448 | svn | 2018-10-31 06:02:12 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65447 | ko1 | 2018-10-31 06:01:55 +0900 (Wed, 31 Oct 2018) | 1 line

revert r65444 and r65446 because of commit miss
------------------------------------------------------------------------
r65446 | ko1 | 2018-10-31 05:49:35 +0900 (Wed, 31 Oct 2018) | 7 lines

support theap for T_OBJECT.

* variable.c: now instance variable space has theap supports.
  obj_ivar_heap_alloc() tries to acquire memory from theap.

* debug_counter.h: add some counters for theap.

------------------------------------------------------------------------
r65445 | svn | 2018-10-31 05:46:47 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65444 | ko1 | 2018-10-31 05:46:24 +0900 (Wed, 31 Oct 2018) | 26 lines

introduce TransientHeap. [Bug #14858]

* transient_heap.c, transient_heap.h: implement TransientHeap (theap).
  theap is designed for Ruby's object system. theap is like Eden heap
  on generational GC terminology. theap allocation is very fast because
  it only needs to bump up pointer and deallocation is also fast because
  we don't do anything. However we need to evacuate (Copy GC terminology)
  if theap memory is long-lived. Evacuation logic is needed for each type.

  See [Bug #14858] for details.

* array.c: Now, theap for T_ARRAY is supported.

  ary_heap_alloc() tries to allocate memory area from theap. If this trial
  sccesses, this array has theap ptr and RARRAY_TRANSIENT_FLAG is turned on.
  We don't need to free theap ptr.

* ruby.h: RARRAY_CONST_PTR() returns malloc'ed memory area. It menas that
  if ary is allocated at theap, force evacuation to malloc'ed memory.
  It makes programs slow, but very compatible with current code because
  theap memory can be evacuated (theap memory will be recycled).

  If you want to get transient heap ptr, use RARRAY_CONST_PTR_TRANSIENT()
  instead of RARRAY_CONST_PTR(). If you can't understand when evacuation
  will occur, use RARRAY_CONST_PTR().

------------------------------------------------------------------------
r65443 | normal | 2018-10-31 03:26:12 +0900 (Wed, 31 Oct 2018) | 6 lines

mjit.c (free_list): clear .length

For robustness against future changes. There should be no impact
at the moment,here, but we may call mjit_finish more than once
in a process lifetime in the future (implementing "stop"
instead of just "pause")
------------------------------------------------------------------------
r65442 | svn | 2018-10-31 00:39:19 +0900 (Wed, 31 Oct 2018) | 1 line

* 2018-10-31
------------------------------------------------------------------------
r65441 | k0kubun | 2018-10-31 00:39:18 +0900 (Wed, 31 Oct 2018) | 5 lines

wercker.yml: try testing wercker again

I don't think we fixed that, but if so, I would like to see more test
failures. Previous failures didn't keep enough C-backtrace information
about the failure and it's hard to debug for now.
------------------------------------------------------------------------
r65440 | k0kubun | 2018-10-30 23:57:03 +0900 (Tue, 30 Oct 2018) | 8 lines

_mjit_compile_send.erb: do not inline tailcall ISeq

because it's not supported by this file. Also, shared `def_iseq_ptr`
instead of copying the main definition of it.

vm_core.h: moved `def_iseq_ptr` to this place. added `inline` to avoid
compiler warnings since it's not used in some files including vm_core.h.
vm_insnhelper.c: moved `def_iseq_ptr` to vm_core.h.
------------------------------------------------------------------------
r65439 | svn | 2018-10-30 12:22:09 +0900 (Tue, 30 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65438 | ko1 | 2018-10-30 12:21:56 +0900 (Tue, 30 Oct 2018) | 2 lines

use RARRAY_AREF() instead of RARRAY_CONST_PTR().

------------------------------------------------------------------------
r65437 | normal | 2018-10-30 10:34:48 +0900 (Tue, 30 Oct 2018) | 16 lines

process.c: implement rb_f_system without toggling ruby_nocldwait

Following how mjit_worker.c currently works, rb_f_system
now ensures the VM-wide waitpid lists is locked before
creating a new process via fork/vfork.

This ensures other rb_waitpid callers cannot steal work and
there are no possible race conditions from toggling
ruby_nocldwait without the use of atomics.

This sets us up for implementing MJIT process management
logic using normal Ruby APIs prepares us for VM-wide
asynchronous/event-base waitpid which can allow MJIT to
work without worker threads.

Take 2: set waitpid_state.pid on platforms w/o fork.
------------------------------------------------------------------------
r65436 | normal | 2018-10-30 10:12:38 +0900 (Tue, 30 Oct 2018) | 4 lines

revert r65434

http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20181030T003541Z.fail.html.gz
I have no chance of getting anything to work on proprietary platforms :<
------------------------------------------------------------------------
r65435 | svn | 2018-10-30 08:52:45 +0900 (Tue, 30 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65434 | normal | 2018-10-30 08:52:39 +0900 (Tue, 30 Oct 2018) | 14 lines

process.c: implement rb_f_system without toggling ruby_nocldwait

Following how mjit_worker.c currently works, rb_f_system
now ensures the VM-wide waitpid lists is locked before
creating a new process via fork/vfork.

This ensures other rb_waitpid callers cannot steal work and
there are no possible race conditions from toggling
ruby_nocldwait without the use of atomics.

This sets us up for implementing MJIT process management
logic using normal Ruby APIs prepares us for VM-wide
asynchronous/event-base waitpid which can allow MJIT to
work without worker threads.
------------------------------------------------------------------------
r65433 | ko1 | 2018-10-30 03:03:13 +0900 (Tue, 30 Oct 2018) | 5 lines

use `rb_hash_new_compare_by_id()`.

* vm_eval.c (local_var_list_init): use `rb_hash_new_compare_by_id()`
  directly instead of manipulating st_table.

------------------------------------------------------------------------
r65432 | svn | 2018-10-30 03:00:15 +0900 (Tue, 30 Oct 2018) | 1 line

* 2018-10-30
------------------------------------------------------------------------
r65431 | svn | 2018-10-30 03:00:14 +0900 (Tue, 30 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65430 | ko1 | 2018-10-30 03:00:02 +0900 (Tue, 30 Oct 2018) | 6 lines

use RARRAY_AREF() instead of RARRAY_CONST_PTR().

* class.c (rb_keyword_error_new): use RARRAY_AREF() because
  RARRAY_CONST_PTR() can introduce additional overhead in a futre.
  Same fixes for other files.

------------------------------------------------------------------------
r65429 | kazu | 2018-10-29 22:30:01 +0900 (Mon, 29 Oct 2018) | 1 line

compile.c: fix up r65411
------------------------------------------------------------------------
r65428 | nobu | 2018-10-29 17:11:25 +0900 (Mon, 29 Oct 2018) | 1 line

time.c: [DOC] fix method names to refer class methods [ci skip]
------------------------------------------------------------------------
r65427 | nobu | 2018-10-29 15:23:21 +0900 (Mon, 29 Oct 2018) | 3 lines

Mark up code inside link text as <code>

Merged https://github.com/ruby/rdoc/pull/660
------------------------------------------------------------------------
r65426 | shyouhei | 2018-10-29 12:21:22 +0900 (Mon, 29 Oct 2018) | 7 lines

less verbose code by sharing attribute definitions

The idea behind this commit is that handles_sp and leaf are two
concepts that are not mutually independent.  By making one explicitly
depend another, we can reduces the number of lines of codes written,
thus making things concise.

------------------------------------------------------------------------
r65425 | shyouhei | 2018-10-29 11:07:52 +0900 (Mon, 29 Oct 2018) | 6 lines

bare_instructions.rb: sort attributes [ci skip]

This enhances stability of the generated source code (namely
insns_info.inc) across attribute insertion / deletion.  It does
not change the compiled binary at all; just a bit of readability.

------------------------------------------------------------------------
r65424 | naruse | 2018-10-29 02:03:36 +0900 (Mon, 29 Oct 2018) | 3 lines

Revert "Add test for cause on pty"

This reverts commit r65422.
------------------------------------------------------------------------
r65423 | svn | 2018-10-29 01:06:57 +0900 (Mon, 29 Oct 2018) | 1 line

* 2018-10-29
------------------------------------------------------------------------
r65422 | naruse | 2018-10-29 01:06:56 +0900 (Mon, 29 Oct 2018) | 1 line

Add test for cause on pty
------------------------------------------------------------------------
r65421 | nobu | 2018-10-28 21:05:19 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: added Time::TM#+ and Time::TM#-
------------------------------------------------------------------------
r65420 | nobu | 2018-10-28 21:05:18 +0900 (Sun, 28 Oct 2018) | 4 lines

time.c: ignore 7th arg

* time.c (tm_initialize): allow 7th argument as well as
  Time#initialize, but just ignore.
------------------------------------------------------------------------
r65419 | nobu | 2018-10-28 21:05:17 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: [DOC] add description and fix markups [ci skip]
------------------------------------------------------------------------
r65418 | k0kubun | 2018-10-28 18:06:54 +0900 (Sun, 28 Oct 2018) | 1 line

appveyor.yml: fix wrong path to test directory
------------------------------------------------------------------------
r65417 | k0kubun | 2018-10-28 16:44:59 +0900 (Sun, 28 Oct 2018) | 4 lines

appveyor.yml: run test_open-uri separately

on msys2 because it sometimes crashes worker like
https://ci.appveyor.com/project/ruby/ruby/builds/19853558/job/8v1ehnv40bggiode
------------------------------------------------------------------------
r65416 | suke | 2018-10-28 15:37:33 +0900 (Sun, 28 Oct 2018) | 17 lines

require fixtures/classes only when platform is windows.

* spec/ruby/library/win32ole/fixtures/classes.rb: remove rescue block
  because this file is required when platform is Windows.
* spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb:
  fixtures/classes is required when platform is Windows
* spec/ruby/library/win32ole/win32ole/_invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/codepage_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/connect_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/const_load_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/constants_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/create_guid_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/locale_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/new_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb: ditto.
------------------------------------------------------------------------
r65415 | suke | 2018-10-28 15:16:18 +0900 (Sun, 28 Oct 2018) | 4 lines

Refactoring. remove Internet Explorer.

* spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb: refactoring.
  remove Internet Explorer.
------------------------------------------------------------------------
r65414 | suke | 2018-10-28 15:11:30 +0900 (Sun, 28 Oct 2018) | 6 lines

use MSXML.DOMDocument instead of InternetExplorer.Application

* spec/ruby/library/win32ole/fixtures/event.xml use MSXML.DOMDocument
  instead of InternetExplorer.Application. InternetExplorer.Application
  is not available on some environments. Thanks to MSP-Greg (Greg L).
* spec/ruby/library/win32ole/win32ole_event/on_event_spec.rb: ditto.
------------------------------------------------------------------------
r65413 | nobu | 2018-10-28 14:53:57 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: [DOC] fix rdoc-ref [ci skip]
------------------------------------------------------------------------
r65412 | suke | 2018-10-28 14:40:41 +0900 (Sun, 28 Oct 2018) | 5 lines

use MSXML.DOMDocument instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole_event/new_spec.rb: use
  MSXML.DOMDocument. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65411 | ko1 | 2018-10-28 14:09:58 +0900 (Sun, 28 Oct 2018) | 5 lines

use a rb_ function instead of st_ directly.

* compile.c (ibf_dump_object_hash): use `rb_hash_foreach()`
  instead of using `st_foreach()`.

------------------------------------------------------------------------
r65410 | suke | 2018-10-28 14:08:37 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole/shared/setproperty.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65409 | suke | 2018-10-28 13:38:49 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole/ole_put_methods_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some enviroments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65408 | suke | 2018-10-28 13:25:55 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb: use Scripting
  Dictionary. InternetExplorer.Application is not available on some
  environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65407 | suke | 2018-10-28 13:18:53 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application

* spec/ruby/library/win32ole/win32ole/ole_obj_help_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65406 | nobu | 2018-10-28 13:00:26 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: [DOC] about timezone arguemnt [ci skip]
------------------------------------------------------------------------
r65405 | suke | 2018-10-28 12:48:17 +0900 (Sun, 28 Oct 2018) | 8 lines

use Scripting.Dictionary instead of InternetExplorer.Application

* spec/ruby/library/win32ole/win32ole/ole_method_spec.rb: recuire in
  platform_is block.
* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/shared/ole_method.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65404 | nobu | 2018-10-28 10:58:27 +0900 (Sun, 28 Oct 2018) | 1 line

NEWS: codify keywords and callback methods [ci skip]
------------------------------------------------------------------------
r65403 | nobu | 2018-10-28 10:56:28 +0900 (Sun, 28 Oct 2018) | 6 lines

rdoc/parser/c.rb: ignore dynamically added methods

* lib/rdoc/parser/c.rb (RDoc::Parser::C#deduplicate_call_seq):
  skip dynamically added methods at runtime, because the class
  name is unknown and the defined methods are not accessible from
  that class.
------------------------------------------------------------------------
r65402 | k0kubun | 2018-10-28 10:19:30 +0900 (Sun, 28 Oct 2018) | 4 lines

revert r65401

Because it does break Linux CI like:
https://gist.github.com/ko1/2c561f9185492f339cf7a763ea219e79
------------------------------------------------------------------------
r65401 | suke | 2018-10-28 10:08:42 +0900 (Sun, 28 Oct 2018) | 4 lines

remove rescue block when win32ole is required

* spec/ruby/library/win32ole/fixtures/classes.rb: remove rescue block
  because this file is required on Windows only.
------------------------------------------------------------------------
r65400 | suke | 2018-10-28 10:03:49 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application

* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environment. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65399 | suke | 2018-10-28 08:37:58 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/invoke_spec.rb: use Scripting.Dictionary
  instead of InternetExplorer.Application. InternetExplorer.Application
  is not available on some environment. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65398 | suke | 2018-10-28 08:21:29 +0900 (Sun, 28 Oct 2018) | 6 lines

use Scripting.Dictionary instead of InternetExplorer.Application for
_getproperty spec.

* spec/ruby/library/win32ole/_getproperty_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environment. (Thanks to MSP-Greg (Greg L))
------------------------------------------------------------------------
r65397 | naruse | 2018-10-28 08:15:43 +0900 (Sun, 28 Oct 2018) | 1 line

fix test
------------------------------------------------------------------------
r65396 | naruse | 2018-10-28 08:13:34 +0900 (Sun, 28 Oct 2018) | 1 line

fix error message and backtrace order
------------------------------------------------------------------------
r65395 | suke | 2018-10-28 07:50:08 +0900 (Sun, 28 Oct 2018) | 4 lines

add WIN32OLESpecs::MSXML_AVAILABLE

* spec/ruby/library/win32ole/fixtures/classes.rb: add
WIN32OLESpecs::MSXML_AVAILABLE
------------------------------------------------------------------------
r65394 | svn | 2018-10-28 06:45:32 +0900 (Sun, 28 Oct 2018) | 1 line

* 2018-10-28
------------------------------------------------------------------------
r65393 | naruse | 2018-10-28 06:45:30 +0900 (Sun, 28 Oct 2018) | 4 lines

Print exception's cause like Java

Print `cause` of the exception if the exception is not caught and printed
its backtraces and error message [Feature #8257]
------------------------------------------------------------------------
r65392 | k0kubun | 2018-10-27 23:06:44 +0900 (Sat, 27 Oct 2018) | 6 lines

spec/../shared/exit.rb: move the mingw guard to here

from terminate_spec.rb, as suggested here:
https://github.com/ruby/ruby/commit/c7220bd3dea0a113b81f267cc3b656da7d7d7abb#commitcomment-31068714

to guard other inclusions.
------------------------------------------------------------------------
r65391 | k0kubun | 2018-10-27 22:57:23 +0900 (Sat, 27 Oct 2018) | 3 lines

revert r65389 and r64993

and move retry logic to internal method
------------------------------------------------------------------------
r65390 | eregon | 2018-10-27 20:42:21 +0900 (Sat, 27 Oct 2018) | 3 lines

Run specs on latest Ruby 2.3, which includes taint fixes

* The 2.3 alias in RVM seems to resolve to 2.3.7.
------------------------------------------------------------------------
r65389 | k0kubun | 2018-10-27 19:49:56 +0900 (Sat, 27 Oct 2018) | 4 lines

ole_func_methods_spec.rb: apply r64993 retry

to this spec as well, since the same issue was reproduced here
https://ci.appveyor.com/project/ruby/ruby/builds/19842006/job/y35ae6bquf4t3x30
------------------------------------------------------------------------
r65388 | eregon | 2018-10-27 19:48:40 +0900 (Sat, 27 Oct 2018) | 1 line

Update to ruby/spec@8b743a3
------------------------------------------------------------------------
r65387 | eregon | 2018-10-27 19:48:09 +0900 (Sat, 27 Oct 2018) | 1 line

Update to ruby/mspec@4729971
------------------------------------------------------------------------
r65386 | k0kubun | 2018-10-27 18:57:30 +0900 (Sat, 27 Oct 2018) | 6 lines

.travis.yml: investigate silent death of mspec

It looks like mspec worker may immediately die on Linux as well.
https://travis-ci.org/ruby/ruby/jobs/447018758

Dropping -j and add -fs to know which test dies.
------------------------------------------------------------------------
r65385 | kazu | 2018-10-27 17:17:01 +0900 (Sat, 27 Oct 2018) | 1 line

bootstraptest/test_insns.rb: test newhashfromarray
------------------------------------------------------------------------
r65384 | knu | 2018-10-27 16:22:38 +0900 (Sat, 27 Oct 2018) | 4 lines

Update the example of local variable shadowing

I came up with this snippet when we were trying to convince Matz.

------------------------------------------------------------------------
r65383 | k0kubun | 2018-10-27 14:14:46 +0900 (Sat, 27 Oct 2018) | 4 lines

test_io.rb: skip busy wait test again

which I tried to avoid skipping this in r65311, but the test seems not
working under some high load of ci.rvm.jp.
------------------------------------------------------------------------
r65382 | stomar | 2018-10-27 05:30:09 +0900 (Sat, 27 Oct 2018) | 6 lines

string.c: improve docs for String#strip and related

* string.c: [DOC] improve docs for String#{strip,lstrip,rstrip}{,!}:
  small clarification, avoid referring to the receiver as `str'
  (does not appear in the call-seq of the generated HTML docs),
  enable links for cross-references, simplify rdoc.
------------------------------------------------------------------------
r65381 | svn | 2018-10-27 02:08:33 +0900 (Sat, 27 Oct 2018) | 1 line

* 2018-10-27
------------------------------------------------------------------------
r65380 | nobu | 2018-10-27 02:08:30 +0900 (Sat, 27 Oct 2018) | 5 lines

Do not :stopdoc: entire classes/modules

It disables cross-references to the classes/modules, even if those
are defined in other places.  I suspect this is not an intentional
behavior, however make a workaround for the time being.
------------------------------------------------------------------------
r65379 | stomar | 2018-10-26 21:23:25 +0900 (Fri, 26 Oct 2018) | 1 line

proc.c: [DOC] improve docs for {Method,Proc}#===
------------------------------------------------------------------------
r65378 | stomar | 2018-10-26 21:21:22 +0900 (Fri, 26 Oct 2018) | 1 line

proc.c: [DOC] fix grammar in doc for Method#to_s
------------------------------------------------------------------------
r65377 | stomar | 2018-10-26 21:19:04 +0900 (Fri, 26 Oct 2018) | 1 line

object.c: [DOC] fix typos in doc for yield_self
------------------------------------------------------------------------
r65376 | stomar | 2018-10-26 21:16:25 +0900 (Fri, 26 Oct 2018) | 1 line

NEWS: fix typos
------------------------------------------------------------------------
r65375 | k0kubun | 2018-10-26 17:34:42 +0900 (Fri, 26 Oct 2018) | 5 lines

appveyor.yml: run second half of vs with -v

because it may silently die like
https://ci.appveyor.com/project/ruby/ruby/builds/19813015/job/a99c4hrs69g4iorg
and we can't know which test was bad.
------------------------------------------------------------------------
r65374 | nobu | 2018-10-26 15:41:34 +0900 (Fri, 26 Oct 2018) | 1 line

Fix a condition and just call rb_fstring [Feature #15251]
------------------------------------------------------------------------
r65373 | svn | 2018-10-26 15:18:30 +0900 (Fri, 26 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65372 | nobu | 2018-10-26 15:18:28 +0900 (Fri, 26 Oct 2018) | 1 line

Simplify conditions [Feature #15251]
------------------------------------------------------------------------
r65371 | normal | 2018-10-26 14:32:47 +0900 (Fri, 26 Oct 2018) | 9 lines

hash.c: aset deduplicates un-tainted string

We revisit [Bug #9188] since st.c is much improved since then,
and benchmarks against so_k_nucleotide seem to indicate little
or no performance change compared to before.

[ruby-core:89555] [Feature #15251]

From: Anmol Chopra <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r65370 | nobu | 2018-10-26 13:46:24 +0900 (Fri, 26 Oct 2018) | 1 line

Indent as a code block [ci skip]
------------------------------------------------------------------------
r65369 | mame | 2018-10-26 12:10:02 +0900 (Fri, 26 Oct 2018) | 8 lines

parse.y: remove "shadowing outer local variable" warning

You can now write the following without warning.

    user = User.all.find {|user| cond(user) }

Fixes [Feature #12490].
A patch from Soutaro Matsumoto <matsumoto@soutaro.com>.
------------------------------------------------------------------------
r65368 | mame | 2018-10-26 12:08:10 +0900 (Fri, 26 Oct 2018) | 3 lines

Revert "parse.y: remove "shadowing outer local variable" warning"

I forgot to add the copyright of the patch...
------------------------------------------------------------------------
r65367 | mame | 2018-10-26 11:54:01 +0900 (Fri, 26 Oct 2018) | 7 lines

parse.y: remove "shadowing outer local variable" warning

You can now write the following without warning.

  user = User.all.find {|user| cond(user) }

Fixes [Feature #12490].
------------------------------------------------------------------------
r65366 | svn | 2018-10-26 10:47:14 +0900 (Fri, 26 Oct 2018) | 1 line

* 2018-10-26
------------------------------------------------------------------------
r65365 | nobu | 2018-10-26 10:47:09 +0900 (Fri, 26 Oct 2018) | 1 line

Update for tzdata-2018f
------------------------------------------------------------------------
r65364 | hsbt | 2018-10-25 19:16:28 +0900 (Thu, 25 Oct 2018) | 1 line

Added initialization task for default gems.
------------------------------------------------------------------------
r65363 | k0kubun | 2018-10-25 12:25:19 +0900 (Thu, 25 Oct 2018) | 5 lines

wercker.yml: skip webrick for test-mjit-wait for now

as failing
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bd092a89b1e440006d5780d?step=5bd092e3591ca80007258400
now and it needs some fix.
------------------------------------------------------------------------
r65362 | ko1 | 2018-10-25 11:23:58 +0900 (Thu, 25 Oct 2018) | 4 lines

add new counter about GC.

* debug_counter.h: add `gc_major_oldmalloc`.

------------------------------------------------------------------------
r65361 | kazu | 2018-10-25 11:07:47 +0900 (Thu, 25 Oct 2018) | 1 line

Fix a typo
------------------------------------------------------------------------
r65360 | nobu | 2018-10-25 09:36:23 +0900 (Thu, 25 Oct 2018) | 7 lines

time.c: benchmark recovery

* time.c (time_localtime): check if `vtm.zone` is a simple zone
  name string before trying to call the conversion method.  since
  r64952, `Time.getlocal` on UTC time has lost the performance
  about 45%, due to this call.  the performance is about 90% of
  r64951 by avoiding it.
------------------------------------------------------------------------
r65359 | ko1 | 2018-10-25 07:17:03 +0900 (Thu, 25 Oct 2018) | 4 lines

add new debug_counters for GC.

* debug_counter.h: add new debug counters to count GC.

------------------------------------------------------------------------
r65358 | k0kubun | 2018-10-25 00:49:03 +0900 (Thu, 25 Oct 2018) | 3 lines

wercker.yml: rearrange test split times

test-all2 is taking much longer time than test-all1 now.
------------------------------------------------------------------------
r65357 | svn | 2018-10-25 00:41:15 +0900 (Thu, 25 Oct 2018) | 1 line

* 2018-10-25
------------------------------------------------------------------------
r65356 | k0kubun | 2018-10-25 00:41:14 +0900 (Thu, 25 Oct 2018) | 24 lines

_mjit_compile_ivar.erb: cancel on undefined ivar

I assumed somehow this check was not needed, but it did need.
By canceling this instead of just warning here, we didn't lose the
current performance so much.

test_jit.rb: test the case that reproduces SEGV by that.

TestGemStreamUI.rb: delete. This test on --jit-wait is fixed.

=== Optcarrot Benchmark ===

$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-24 trunk 65355) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-24 trunk 65355) +JIT [x86_64-linux]
last_commit=_mjit_compile_ivar.erb: cancel on undefined ivar
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.344      84.849 fps

Comparison:
             Optcarrot Lan_Master.nes
                  before:        85.3 fps
                   after:        84.8 fps - 1.01x  slower
------------------------------------------------------------------------
r65355 | k0kubun | 2018-10-24 23:24:34 +0900 (Wed, 24 Oct 2018) | 1 line

test_jit.rb: test newhashfromarray
------------------------------------------------------------------------
r65354 | k0kubun | 2018-10-24 21:19:39 +0900 (Wed, 24 Oct 2018) | 5 lines

revert r65353 [ci skip]

As Wercker is managing workflow by GUI, the commit had no impact for
behavior... I already fixed the workflow on GUI. Let revert that to
change it back to natural order.
------------------------------------------------------------------------
r65353 | k0kubun | 2018-10-24 21:14:26 +0900 (Wed, 24 Oct 2018) | 3 lines

wercker.yml: run slower job first

to reduce time taken for finishing all jobs.
------------------------------------------------------------------------
r65352 | svn | 2018-10-24 21:13:29 +0900 (Wed, 24 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65351 | k0kubun | 2018-10-24 21:13:28 +0900 (Wed, 24 Oct 2018) | 4 lines

test/excludes/_wercker: skip tests

which are under investigation. I'm debugging it right now, but let's
make it green to stop bothering other development.
------------------------------------------------------------------------
r65350 | nobu | 2018-10-24 19:38:39 +0900 (Wed, 24 Oct 2018) | 5 lines

compile.c: fix peephole optimization

* compile.c (iseq_peephole_optimize): should `pop` before jump
  instruction which succeeds to `newarray` of a literal object,
  not after.  [ruby-core:89536] [Bug #15245]
------------------------------------------------------------------------
r65349 | svn | 2018-10-24 19:29:40 +0900 (Wed, 24 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65348 | k0kubun | 2018-10-24 19:29:39 +0900 (Wed, 24 Oct 2018) | 3 lines

wercker.yml: skip TestParallel::TestParallel#test_separate

for now. It's randomly failing on test-mjit-wait.
------------------------------------------------------------------------
r65347 | k0kubun | 2018-10-24 18:52:01 +0900 (Wed, 24 Oct 2018) | 4 lines

wercker.yml: try to split test-all again

TestParallel in test/testunit/... seems to be slow. Let's see if this
contributes to loosen timeout or not.
------------------------------------------------------------------------
r65346 | k0kubun | 2018-10-24 12:05:43 +0900 (Wed, 24 Oct 2018) | 4 lines

wercker.yml: skip test_queue_with_trap on -wait as well

It randomly failed.
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bcfd19aa9806e000655c598?step=5bcfd1d5acc4510006e00f77
------------------------------------------------------------------------
r65345 | ko1 | 2018-10-24 11:40:13 +0900 (Wed, 24 Oct 2018) | 5 lines

newhashfromarray should be a leaf insn.

* insns.def (newhashfromarray): `rb_hash_bulk_insert()` can call
  Ruby methods like #hash so that it should not be a leaf insn.

------------------------------------------------------------------------
r65344 | ko1 | 2018-10-24 11:12:35 +0900 (Wed, 24 Oct 2018) | 1 line

need a cast
------------------------------------------------------------------------
r65343 | ko1 | 2018-10-24 10:57:27 +0900 (Wed, 24 Oct 2018) | 31 lines

introduce new YARV insn newhashfromarray.

* insns.def (newhashfromarray): added to replace `core_hash_from_ary`
  method to eliminate method call overhead.

  On my environment, I got the following benchmark results:

  x = {x: 1}

                    modified:   7864988.6 i/s
                       trunk:   6004098.1 i/s - 1.31x  slower


  x = {x: 1, y: 2}

                       trunk:   6127338.4 i/s
                    modified:   5232380.0 i/s - 1.17x  slower


  x = {x: 1, y: 2, z: 3}

                    modified:   6089553.1 i/s
                       trunk:   5249333.5 i/s - 1.16x  slower

  This trivial improvement should be reconsider because of usage of
  this instruction.

* compile.c: ditto.

* defs/id.def, vm.c: remove unused functions.

------------------------------------------------------------------------
r65341 | svn | 2018-10-24 07:51:30 +0900 (Wed, 24 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65340 | k0kubun | 2018-10-24 07:51:28 +0900 (Wed, 24 Oct 2018) | 3 lines

wercker.yml: skip #test_queue_with_trap for now

only on --jit CI. This test doesn't work on AppVeyor mswin either.
------------------------------------------------------------------------
r65339 | k0kubun | 2018-10-24 01:49:55 +0900 (Wed, 24 Oct 2018) | 6 lines

wercker.yml: increase timeout scale

mainly for test-mjit.

TestThreadQueue#test_queue_with_trap timed out with 10s.
https://app.wercker.com/ruby/ruby/runs/test-mjit/5bcf4b5c9065740006f790ca?step=5bcf4b9787436a000648fbb7
------------------------------------------------------------------------
r65338 | k0kubun | 2018-10-24 01:23:55 +0900 (Wed, 24 Oct 2018) | 1 line

wercker.yml: run both --jit and --jit-wait
------------------------------------------------------------------------
r65337 | k0kubun | 2018-10-24 00:54:11 +0900 (Wed, 24 Oct 2018) | 1 line

wercker.yml: stop using my personal Docker container
------------------------------------------------------------------------
r65336 | nobu | 2018-10-24 00:29:01 +0900 (Wed, 24 Oct 2018) | 1 line

getifaddrs_spec.rb: `should` returned `nil` on success
------------------------------------------------------------------------
r65335 | k0kubun | 2018-10-24 00:09:49 +0900 (Wed, 24 Oct 2018) | 4 lines

wercker.yml: stop splitting test-all

since it actually doesn't contribute to CI build time so much, rather it
seems making it worse.
------------------------------------------------------------------------
r65334 | svn | 2018-10-24 00:05:10 +0900 (Wed, 24 Oct 2018) | 1 line

* 2018-10-24
------------------------------------------------------------------------
r65333 | kazu | 2018-10-24 00:05:09 +0900 (Wed, 24 Oct 2018) | 1 line

Skip BUGs on Solaris
------------------------------------------------------------------------
r65332 | nobu | 2018-10-23 23:58:08 +0900 (Tue, 23 Oct 2018) | 6 lines

getifaddrs_spec.rb: allow no address

* spec/ruby/library/socket/socket/getifaddrs_spec.rb: allow no
  address for platform dependent failures.

  https://travis-ci.org/ruby/ruby/jobs/445126982#L2234-L2244
------------------------------------------------------------------------
r65331 | k0kubun | 2018-10-23 23:43:19 +0900 (Tue, 23 Oct 2018) | 4 lines

appveyor.yml: give up using mspec -j

for all Windows environments. It also hanged on msys2 build
https://ci.appveyor.com/project/ruby/ruby/builds/19719943/job/cxg00jgvt1ifml97
------------------------------------------------------------------------
r65330 | nobu | 2018-10-23 23:26:23 +0900 (Tue, 23 Oct 2018) | 13 lines

test/unit.rb: glob w/o prefix/suffix

* test/lib/test/unit.rb (Test::Unit::GlobOption#non_options): glob
  the given pattern as-is under the TESTSDIR without the prefix
  nor the suffix, when it has separator(s) but does not end with a
  separator nor is not a directory.  e.g.:

      make test-all TESTS='ruby/test_time*'

  runs `ruby/test_time.rb` and `ruby/test_time_tz.rb` only, like
  as the following:

      make test-all TESTS='$(TESTSDIR)/ruby/test_time*'
------------------------------------------------------------------------
r65329 | nobu | 2018-10-23 23:17:16 +0900 (Tue, 23 Oct 2018) | 8 lines

test/unit.rb: fixed wrong method name

* test/lib/test/unit.rb (Test::Unit::Parallel#deal): fixed wrong
  method name at r36388.

* test/testunit/test_parallel.rb (TestParallel::TestParallel#test_separate):
  refine the pattern to process IDs but not backtrace lines, and
  add a better message.
------------------------------------------------------------------------
r65328 | k0kubun | 2018-10-23 23:10:12 +0900 (Tue, 23 Oct 2018) | 5 lines

.travis.yml: run the slowest jobs first

to shorten time taken for finishing overall builds.

appveyor.yml: comment the same intention in AppVeyor as well
------------------------------------------------------------------------
r65327 | k0kubun | 2018-10-23 23:06:36 +0900 (Tue, 23 Oct 2018) | 1 line

wercker.yml: profile slow tests
------------------------------------------------------------------------
r65326 | k0kubun | 2018-10-23 22:58:01 +0900 (Tue, 23 Oct 2018) | 4 lines

.travis.yml: let osx build print verbose output

because it may hang with no output like this:
https://travis-ci.org/ruby/ruby/jobs/445101860
------------------------------------------------------------------------
r65325 | k0kubun | 2018-10-23 22:34:50 +0900 (Tue, 23 Oct 2018) | 6 lines

wercker.yml: explain the usage of Wercker

at ruby repository. I also added a woraround to loosen timeout for
test-all. I resolved the issue that lets --jit-wait CI timeout, so this
workaround is not strictly needed, but this might make it easier to
debug when things go wrong.
------------------------------------------------------------------------
r65324 | k0kubun | 2018-10-23 22:22:07 +0900 (Tue, 23 Oct 2018) | 1 line

wercker.yml: setup MJIT wait CI
------------------------------------------------------------------------
r65323 | k0kubun | 2018-10-23 22:05:29 +0900 (Tue, 23 Oct 2018) | 4 lines

mjit_worker.c: don't ask MJIT copy job to main thread

when main thread is waiting for MJIT worker forever without executing
RUBY_VM_CHECK_INTS due to --jit-wait.
------------------------------------------------------------------------
r65322 | k0kubun | 2018-10-23 21:48:21 +0900 (Tue, 23 Oct 2018) | 4 lines

appveyor.yml: separately execute problematic test case

that may crash worker like:
https://ci.appveyor.com/project/ruby/ruby/builds/19706703/job/5dmi22mgua9r2qfu
------------------------------------------------------------------------
r65321 | nobu | 2018-10-23 21:43:07 +0900 (Tue, 23 Oct 2018) | 1 line

Let Time::TM share the implementation with Time
------------------------------------------------------------------------
r65320 | mame | 2018-10-23 21:38:48 +0900 (Tue, 23 Oct 2018) | 3 lines

addr2line.c: add explicit casts for clang on 32bit environment

Assigning uint64_t to size_t or uintptr_t caused a build error.
------------------------------------------------------------------------
r65319 | mame | 2018-10-23 21:23:04 +0900 (Tue, 23 Oct 2018) | 4 lines

file.c: use correct integer-conversion function

The return value of major() and minor() is unsigned int, not dev_t.
So, UINT2NUM() is a better choice than DEVT2NUM().
------------------------------------------------------------------------
r65318 | k0kubun | 2018-10-23 21:01:34 +0900 (Tue, 23 Oct 2018) | 1 line

_mjit_compile_send.erb: fix wrong cc usages
------------------------------------------------------------------------
r65317 | svn | 2018-10-23 12:47:48 +0900 (Tue, 23 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65316 | normal | 2018-10-23 12:47:45 +0900 (Tue, 23 Oct 2018) | 6 lines

Revert "vm_trace: implement postponed_jobs as st_table"

This reverts commit 5a1dfb04bc2b09fcf8f3427cac72d0ce52a45eb2 (r63451)

And mark the functions as async-signal-safe while we're at it to
prevent future developers from making the same mistake as I did :x
------------------------------------------------------------------------
r65315 | k0kubun | 2018-10-23 10:13:38 +0900 (Tue, 23 Oct 2018) | 7 lines

test/lib/test/unit/assertions.rb: skip memory leak check

for all test cases on MJIT. In addition to those 2 tests,
TestAutoload#test_no_leak newly failed and most of assert_no_memory_leak
usages are likely to randomly fail.

Let me just skip all of them but let's revisit this to check it properly later.
------------------------------------------------------------------------
r65314 | k0kubun | 2018-10-23 09:27:08 +0900 (Tue, 23 Oct 2018) | 6 lines

wercker.yml: pending for now

As the Wercker integration is already enabled, I added wercker.yml but
it's not working due to migration to this repository and I don't have
enough time to fix it immediately. I'll make it work in this evening.
Let me show green status on GitHub commit logs.
------------------------------------------------------------------------
r65313 | k0kubun | 2018-10-23 09:19:53 +0900 (Tue, 23 Oct 2018) | 3 lines

wercker.yml: run --jit-wait test on Wercker

New. This was formerly https://github.com/k0kubun/mjit-test.
------------------------------------------------------------------------
r65312 | k0kubun | 2018-10-23 09:09:10 +0900 (Tue, 23 Oct 2018) | 8 lines

mjit.c: prevent from accessing expired job

Given that `copy_cache_from_main_thread()` breaks the loop when `stop_worker_p`
is TRUE, memory of `job` allocated by `alloca` may be invalid if `stop_worker_p`
is already TRUE.

mjit_worker.c: explain why `copy_cache_from_main_thread()` should not
stop checking `stop_worker_p`.
------------------------------------------------------------------------
r65311 | k0kubun | 2018-10-23 00:49:22 +0900 (Tue, 23 Oct 2018) | 13 lines

revisit more MJIT test skips

r65308 passed both trunk-mjit and trunk-mjit-wait CIs. MJIT copy job
looks working fine. Then this commit skips 5 more tests. Some of them
were skipped in a very early stage and may still need to be skipped, but
I want to confirm them since they haven't been changed for a long time.

And this prefers having inline information on `RubyVM::MJIT.enabled?`.
This commit makes it easier to confirm whether there's suspicious test
skip by RubyVM::MJIT.enabled? or not.

After this commit, tentatively we're not skipping tests for MJIT other
than `assert_no_memory_leak` ones.
------------------------------------------------------------------------
r65310 | svn | 2018-10-23 00:19:36 +0900 (Tue, 23 Oct 2018) | 1 line

* 2018-10-23
------------------------------------------------------------------------
r65309 | k0kubun | 2018-10-23 00:19:34 +0900 (Tue, 23 Oct 2018) | 6 lines

test/ruby/test_string.rb: skip test_crypt for MJIT again

Partially reverting r65285. Actually this one is failing due to memory
consumption on MJIT, so this seems not catching the bug of MJIT.

test/ruby/test_io.rb: unify the skip message with it
------------------------------------------------------------------------
r65308 | k0kubun | 2018-10-22 23:26:47 +0900 (Mon, 22 Oct 2018) | 4 lines

revert r65292 and r65297

now mjit CIs are stable. Let me try this to confirm if it's fixed or
not.
------------------------------------------------------------------------
r65307 | nobu | 2018-10-22 23:02:59 +0900 (Mon, 22 Oct 2018) | 1 line

No longer subsec and isdst members
------------------------------------------------------------------------
r65306 | nobu | 2018-10-22 22:56:41 +0900 (Mon, 22 Oct 2018) | 1 line

Revert TM_IS_TIME to 1
------------------------------------------------------------------------
r65305 | nobu | 2018-10-22 22:53:20 +0900 (Mon, 22 Oct 2018) | 1 line

Return fixed values at subsec, utc_offset, and isdst
------------------------------------------------------------------------
r65304 | kazu | 2018-10-22 21:21:19 +0900 (Mon, 22 Oct 2018) | 8 lines

Add debug option to check ci failures on solaris

failed to start extserv?:
- https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181020T132506Z.fail.html.gz

BUG in sysread of OpenSSL:
- https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181020T132408Z.fail.html.gz
- https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181020T131807Z.fail.html.gz
------------------------------------------------------------------------
r65303 | svn | 2018-10-22 20:23:57 +0900 (Mon, 22 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65302 | knu | 2018-10-22 20:23:56 +0900 (Mon, 22 Oct 2018) | 6 lines

Set the size of a new enumerator created by Enumerator#each with arguments to nil

When each() takes arguments, it is never safe to assume that the iteration
would repeat the same number of times as with each() without any
argument.  Actually, there is no way to get the exact number, so the
size should be set to nil to denote that.
------------------------------------------------------------------------
r65301 | k0kubun | 2018-10-22 18:53:00 +0900 (Mon, 22 Oct 2018) | 4 lines

mjit_worker.c: return more appropriate result

of copy job. When job is being stopped but job is actually finished,
returning FALSE could be a little confusing from the function name.
------------------------------------------------------------------------
r65300 | k0kubun | 2018-10-22 18:48:35 +0900 (Mon, 22 Oct 2018) | 3 lines

mjit_worker.c: check appropriate flag to stop

This was not intentional in r65299.
------------------------------------------------------------------------
r65299 | k0kubun | 2018-10-22 18:40:44 +0900 (Mon, 22 Oct 2018) | 4 lines

mjit_worker.c: make sure copy job wait is unblocked

by stop_worker(). Previously copy_cache_from_main_thread() might loop forever
even with stop_worker() is being called from ruby_cleanup().
------------------------------------------------------------------------
r65298 | shyouhei | 2018-10-22 12:59:48 +0900 (Mon, 22 Oct 2018) | 7 lines

.travis.yml: give up -O0

This configuration timed out.
https://travis-ci.org/ruby/ruby/jobs/444523912

Try speed things up.

------------------------------------------------------------------------
r65297 | k0kubun | 2018-10-22 12:31:13 +0900 (Mon, 22 Oct 2018) | 4 lines

test_thread.rb: another temporary skip for MJIT

to make trunk-mjit-wait CI green for now. I'll take a look at this
later.
------------------------------------------------------------------------
r65296 | nobu | 2018-10-22 10:25:29 +0900 (Mon, 22 Oct 2018) | 4 lines

time.c: optional arguments of Time::TM#initialize

* time.c (tm_initialize): arguments other than year are optional
  now as Time.new.
------------------------------------------------------------------------
r65295 | hsbt | 2018-10-22 09:32:16 +0900 (Mon, 22 Oct 2018) | 3 lines

Merge stringio.gemspec from github repository.

  It fixed the wrong paths of libraries.
------------------------------------------------------------------------
r65294 | hsbt | 2018-10-22 09:27:02 +0900 (Mon, 22 Oct 2018) | 1 line

Merge rubygems master branch from github.com/rubygems/rubygems.
------------------------------------------------------------------------
r65293 | nobu | 2018-10-22 08:53:39 +0900 (Mon, 22 Oct 2018) | 1 line

test_time_tz.rb: refactor dummy TZ tests and add another timezone
------------------------------------------------------------------------
r65292 | k0kubun | 2018-10-22 08:53:24 +0900 (Mon, 22 Oct 2018) | 4 lines

skip 2 tests for MJIT for now

These tests seem to be broken by r65275.
Let me skip this to confirm if other things are fine or not.
------------------------------------------------------------------------
r65291 | k0kubun | 2018-10-22 08:20:32 +0900 (Mon, 22 Oct 2018) | 3 lines

revert revert of r65285

because CI was actually hitting another one.
------------------------------------------------------------------------
r65290 | k0kubun | 2018-10-22 08:07:18 +0900 (Mon, 22 Oct 2018) | 3 lines

revert r65285

because it didn't work. Partially leaving "sometimes fail" tests.
------------------------------------------------------------------------
r65289 | naruse | 2018-10-22 05:01:22 +0900 (Mon, 22 Oct 2018) | 4 lines

check VLIW case

If maximum_operations_per_instruction != 1, it is VLIW.
But there seems no need to support such architecture now.
------------------------------------------------------------------------
r65288 | stomar | 2018-10-22 05:00:46 +0900 (Mon, 22 Oct 2018) | 1 line

lib/net/http.rb: [DOC] fix typos
------------------------------------------------------------------------
r65287 | naruse | 2018-10-22 01:42:23 +0900 (Mon, 22 Oct 2018) | 1 line

initialize is_stmt with default_is_stmt
------------------------------------------------------------------------
r65286 | naruse | 2018-10-22 01:37:24 +0900 (Mon, 22 Oct 2018) | 1 line

Use inline function with stable code instead of macro
------------------------------------------------------------------------
r65285 | k0kubun | 2018-10-22 00:54:50 +0900 (Mon, 22 Oct 2018) | 6 lines

try to remove some test skips for MJIT

Eric Wong made some effort to keep compatibility around fd with MJIT.
Also I'm hoping r65279 (and r65280) eliminates major MJIT bugs, so I
want to start solely testing MJIT. Other test skips branched by MJIT
enablement seemed reasonable to me.
------------------------------------------------------------------------
r65284 | k0kubun | 2018-10-22 00:41:00 +0900 (Mon, 22 Oct 2018) | 1 line

NEWS: note about --disable-mjit-support [ci skip]
------------------------------------------------------------------------
r65283 | aycabta | 2018-10-22 00:33:30 +0900 (Mon, 22 Oct 2018) | 5 lines

Improve docs of Proc / Method

* proc.c: Add descriptions and code examples.

[ruby-core:85600] [Bug #14483]
------------------------------------------------------------------------
r65282 | svn | 2018-10-22 00:29:02 +0900 (Mon, 22 Oct 2018) | 1 line

* 2018-10-22
------------------------------------------------------------------------
r65281 | k0kubun | 2018-10-22 00:29:01 +0900 (Mon, 22 Oct 2018) | 15 lines

NEWS: prefer advertising --jit option [ci skip]

In addition to `--enable=jit` and `--enable-jit`, we're going to ship
`--jit` as a short hand of it in Ruby 2.6.0.

That's because both --enable=jit and --enable-jit are super hard to
type everytime on command line, and I want make it easier to use so
that many people use it. First of all, `--enable=jit` is accidentally
added for consistency with `--disable=jit` and it's not added for human.

As it's a short hand, once JIT became enabled by default, the `--jit`
option would be removed after some deprecation warning period and only
`--enable=jit`/`--disable=jit` will survive. That being said, I still
think having `--jit` as a temporary short hand is valuable for the above
reasons.
------------------------------------------------------------------------
r65280 | k0kubun | 2018-10-21 23:30:18 +0900 (Sun, 21 Oct 2018) | 17 lines

mjit.c: remove wrongly-committed debug code

mistake in r65279.

=== Optcarrot Benchmark ===
$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-21 trunk 65279) +JIT [x86_64-linux]
last_commit=mjit.c: remove wrongly-committed debug code
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.008      86.078 fps

Comparison:
             Optcarrot Lan_Master.nes
                   after:        86.1 fps
                  before:        85.0 fps - 1.01x  slower
------------------------------------------------------------------------
r65279 | k0kubun | 2018-10-21 23:23:24 +0900 (Sun, 21 Oct 2018) | 17 lines

mjit.c: copy call cache values to MJIT worker

same as r65275 but for call cache.

=== Optcarrot Benchmark ===
$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux]
last_commit=mjit.c: copy call cache values to MJIT worker
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.372      85.359 fps

Comparison:
             Optcarrot Lan_Master.nes
                  before:        85.4 fps
                   after:        85.4 fps - 1.00x  slower
------------------------------------------------------------------------
r65278 | stomar | 2018-10-21 23:02:00 +0900 (Sun, 21 Oct 2018) | 4 lines

lib/mutex_m.rb: fix example code in documentation

* lib/mutex_m.rb: [DOC] fix invalid example code to make it
  syntax highlighted.
------------------------------------------------------------------------
r65277 | k0kubun | 2018-10-21 22:45:36 +0900 (Sun, 21 Oct 2018) | 5 lines

vm_core.h: fix typo [ci skip]

The comment didn't make sense. As it's allocated with
`ZALLOC_N(struct rb_call_cache, body->ci_size + body->ci_kw_size)`,
it's very likely to be forgotten to press shift key on US keyboard.
------------------------------------------------------------------------
r65276 | k0kubun | 2018-10-21 22:37:13 +0900 (Sun, 21 Oct 2018) | 6 lines

_mjit_compile_send.erb: don't split send_guard

to another file, because it's no longer shared. It was created when
attr_reader was inlined but it's no longer included.

common.mk: ditto
------------------------------------------------------------------------
r65275 | k0kubun | 2018-10-21 22:21:28 +0900 (Sun, 21 Oct 2018) | 28 lines

mjit.c: copy inline cache values to MJIT worker

on VM_CHECK_INTS. Letting MJIT worker directly see inline cache which
may be being updated could result in inconsistent IC index and serial.

mjit_worker.c: request the copy job after dequeue, and receive the
result synchronously.

tool/ruby_vm/views/_mjit_compile_ivar.erb: use the copied IC

mjit_compile.c: change the interface to pass is_entries
mjit.h: ditto

=== Optcarrot Benchmark ===
Thankfully this didn't have major performance regression.

$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-21 trunk 65263) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-21 trunk 65263) +JIT [x86_64-linux]
last_commit=mjit.c: copy inline cache values to MJIT worker
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.421      85.454 fps

Comparison:
             Optcarrot Lan_Master.nes
                   after:        85.5 fps
                  before:        85.4 fps - 1.00x  slower
------------------------------------------------------------------------
r65272 | naruse | 2018-10-21 19:46:56 +0900 (Sun, 21 Oct 2018) | 1 line

fix sign of integer variable
------------------------------------------------------------------------
r65271 | aycabta | 2018-10-21 16:15:44 +0900 (Sun, 21 Oct 2018) | 3 lines

Improve doc of yield_self

* object.c: Add code samples for yield_self.
------------------------------------------------------------------------
r65270 | aycabta | 2018-10-21 16:04:20 +0900 (Sun, 21 Oct 2018) | 4 lines

Add missing info for Mutex_m to the doc [Bug #13598]

* lib/mutex_m.rb: The #initialize method in a class that includes
  Mutex_m needs calling #super.
------------------------------------------------------------------------
r65269 | aycabta | 2018-10-21 15:42:53 +0900 (Sun, 21 Oct 2018) | 3 lines

Improve doc of Regexp about "ignore case" behavior [Misc #10836]

* doc/regexp.rdoc: RDoc for "ignore case" behavior
------------------------------------------------------------------------
r65268 | nobu | 2018-10-21 12:52:20 +0900 (Sun, 21 Oct 2018) | 1 line

`--excludes` option must be in TEST_ALL_TESTOPTS
------------------------------------------------------------------------
r65267 | nobu | 2018-10-21 12:42:46 +0900 (Sun, 21 Oct 2018) | 1 line

Quote `$(TESTSDIR)`
------------------------------------------------------------------------
r65266 | svn | 2018-10-21 12:38:53 +0900 (Sun, 21 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65265 | nobu | 2018-10-21 12:38:52 +0900 (Sun, 21 Oct 2018) | 1 line

Exclude CI platform specific failures by --excludes option
------------------------------------------------------------------------
r65264 | ko1 | 2018-10-21 11:38:26 +0900 (Sun, 21 Oct 2018) | 2 lines

fix a warning message.

------------------------------------------------------------------------
r65263 | k0kubun | 2018-10-21 11:28:43 +0900 (Sun, 21 Oct 2018) | 1 line

skip tests broken with OpenSSL 1.1.1 on Travis osx
------------------------------------------------------------------------
r65262 | k0kubun | 2018-10-21 11:18:39 +0900 (Sun, 21 Oct 2018) | 7 lines

appveyor.yml: workaround wrong command line escape

backslash in %APPVEYOR_BUILD_FOLDER% is somehow dropped somewhere
when being passed to test runner via mingw32-make.

Anyway we know the relative path to the project directory, so we can
specify that with slash.
------------------------------------------------------------------------
r65261 | k0kubun | 2018-10-21 10:27:43 +0900 (Sun, 21 Oct 2018) | 5 lines

.travis.yml: mspec -j is unstable

https://travis-ci.org/ruby/ruby/jobs/444232677

Instead of that, add -fs to know problematic test case when failed.
------------------------------------------------------------------------
r65260 | k0kubun | 2018-10-21 10:25:20 +0900 (Sun, 21 Oct 2018) | 4 lines

.travis.yml: use --job-status=replace

-v is too long, and "--color=never --job-status=normal" is too verbose.
Trying --job-status=replace to make Travis log easier to read.
------------------------------------------------------------------------
r65259 | k0kubun | 2018-10-21 09:31:46 +0900 (Sun, 21 Oct 2018) | 1 line

appveyor.yml: fix wrong spec directory
------------------------------------------------------------------------
r65258 | k0kubun | 2018-10-21 09:18:32 +0900 (Sun, 21 Oct 2018) | 4 lines

.travis.yml: debug problematic test case on osx

osx build is stucking somewhere. We want to debug that.
https://travis-ci.org/ruby/ruby/jobs/444059226
------------------------------------------------------------------------
r65257 | naruse | 2018-10-21 09:08:02 +0900 (Sun, 21 Oct 2018) | 3 lines

check version of .debug_info

and refactor related code.
------------------------------------------------------------------------
r65256 | naruse | 2018-10-21 09:07:53 +0900 (Sun, 21 Oct 2018) | 1 line

Skip dwarf if its version is not supported
------------------------------------------------------------------------
r65255 | k0kubun | 2018-10-21 08:58:02 +0900 (Sun, 21 Oct 2018) | 4 lines

appveyor.yml: don't run win32ole with -j

since it lets worker crash
https://ci.appveyor.com/project/ruby/ruby/builds/19659321/job/swnu2b5yj960t9gr
------------------------------------------------------------------------
r65254 | nobu | 2018-10-21 02:19:37 +0900 (Sun, 21 Oct 2018) | 1 line

lldb_cruby.py: T_COMPLEX support [ci skip]
------------------------------------------------------------------------
r65253 | kazu | 2018-10-21 00:00:02 +0900 (Sun, 21 Oct 2018) | 1 line

NEWS: Fix keywords [ci skip]
------------------------------------------------------------------------
r65252 | svn | 2018-10-21 00:00:01 +0900 (Sun, 21 Oct 2018) | 1 line

* 2018-10-21
------------------------------------------------------------------------
r65251 | kazu | 2018-10-21 00:00:00 +0900 (Sun, 21 Oct 2018) | 1 line

NEWS: Fix `,`s [ci skip]
------------------------------------------------------------------------
r65250 | suke | 2018-10-20 23:34:30 +0900 (Sat, 20 Oct 2018) | 1 line

Merge branch 'modify_test_win32ole' into trunk
------------------------------------------------------------------------
r65249 | ko1 | 2018-10-20 23:07:59 +0900 (Sat, 20 Oct 2018) | 11 lines

support --disable-mjit-support on mswin32/64.

* win32/configure.bat: add --enable/disable-mjit-support
  configure.bat options.

* win32/setup.mak: ditto.

* win32/Makefile.sub: ditto.

* win32/Makefile.sub: fix typo for congig.status file.

------------------------------------------------------------------------
r65248 | suke | 2018-10-20 22:16:25 +0900 (Sat, 20 Oct 2018) | 3 lines

refactoring. suppress warning.

* test/win32ole/test_win32ole_record.rb: refactoring. suppress warning.
------------------------------------------------------------------------
r65247 | kazu | 2018-10-20 22:14:02 +0900 (Sat, 20 Oct 2018) | 4 lines

Run background threads while testing drb

Do not start background thread on load test/drb/drbtest.rb,
and stop threads on each test.
------------------------------------------------------------------------
r65246 | kazu | 2018-10-20 22:14:00 +0900 (Sat, 20 Oct 2018) | 5 lines

Revert "Revert "Reset primary_server when remove_server"" [ci skip]

This reverts commit d2671c96f32e6fbbd39162a2c9042dcaf3bf2d68.

previous reverting is commit miss
------------------------------------------------------------------------
r65245 | stomar | 2018-10-20 22:02:02 +0900 (Sat, 20 Oct 2018) | 1 line

NEWS: fix language
------------------------------------------------------------------------
r65244 | nobu | 2018-10-20 21:48:07 +0900 (Sat, 20 Oct 2018) | 1 line

lldb_cruby.py: T_RATIONAL support [ci skip]
------------------------------------------------------------------------
r65243 | kazu | 2018-10-20 21:28:52 +0900 (Sat, 20 Oct 2018) | 1 line

Allow to stop by push(nil) for test
------------------------------------------------------------------------
r65242 | kazu | 2018-10-20 21:28:45 +0900 (Sat, 20 Oct 2018) | 3 lines

Revert "Reset primary_server when remove_server"

This reverts commit 2948d3bd2e78b5b9110454a7135a81c3fecb2575.
------------------------------------------------------------------------
r65241 | suke | 2018-10-20 21:21:30 +0900 (Sat, 20 Oct 2018) | 4 lines

use System Monitor Control to test win32ole

* test/win32ole/test_win32ole_method_event.rb: use System Monitor
  Control to test.
------------------------------------------------------------------------
r65240 | hsbt | 2018-10-20 21:17:18 +0900 (Sat, 20 Oct 2018) | 1 line

Added entry about new default gems.
------------------------------------------------------------------------
r65239 | k0kubun | 2018-10-20 21:08:48 +0900 (Sat, 20 Oct 2018) | 6 lines

NEWS: update about MJIT [ci skip]

Rails performance is somewhat improved by compaction. Still not great
though.

MinGW support is much stable now, and mswin support is added.
------------------------------------------------------------------------
r65238 | mame | 2018-10-20 21:01:41 +0900 (Sat, 20 Oct 2018) | 1 line

Add the oneshot coverage feature to NEWS
------------------------------------------------------------------------
r65237 | svn | 2018-10-20 20:54:10 +0900 (Sat, 20 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65236 | suke | 2018-10-20 20:54:09 +0900 (Sat, 20 Oct 2018) | 6 lines

refactoring define AvailableOLE.sysmon_available?

* test/win32ole/test_win32ole_type_event.rb: refactoring. use
  AvailableOLE.sysmon_available?

* test/win32ole/available_ole.rb: define AvailableOLE.sysmon_available?
------------------------------------------------------------------------
r65235 | aycabta | 2018-10-20 20:47:45 +0900 (Sat, 20 Oct 2018) | 8 lines

Document File.{setuid?,setgid?,sticky?} support for IO objects [Bug #13972]

* file.c (rb_file_setuid_p): rdoc for IO object support
  (rb_file_sgid_p): ditto (rb_file_sticky_p): ditto
* NEWS: inform users of new feature
* test/file/test_file_exhaustive.rb (io_open): wrapper for bare IO
  object (test_suid): test for bare IO support (test_sgid): ditto
  (test_sticky): ditto
------------------------------------------------------------------------
r65234 | ko1 | 2018-10-20 20:35:11 +0900 (Sat, 20 Oct 2018) | 4 lines

fix macro-name.

* win32/Makefile.sub: Not MJIT_SUPPORT, but USE_MJIT.

------------------------------------------------------------------------
r65233 | naruse | 2018-10-20 20:29:38 +0900 (Sat, 20 Oct 2018) | 4 lines

Add negotiated SSL protocol and cipher to Net::HTTP debug output

From: Bart de Water <bartdewater@gmail.com>
https://github.com/ruby/ruby/pull/1877 [Feature #15009]
------------------------------------------------------------------------
r65232 | ko1 | 2018-10-20 20:27:48 +0900 (Sat, 20 Oct 2018) | 5 lines

fix MJIT_SUPPORT on win32.

* win32/Makefile.sub: add MJIT_SUPPORT macro for C codes
  and variable for Makefile.

------------------------------------------------------------------------
r65231 | k0kubun | 2018-10-20 20:21:07 +0900 (Sat, 20 Oct 2018) | 3 lines

mjit_worker.c: don't refer to freed value

remove_from_list() frees node, but after that node->next could be used
------------------------------------------------------------------------
r65230 | aycabta | 2018-10-20 20:09:34 +0900 (Sat, 20 Oct 2018) | 5 lines

Improve doc of multipart/form-data [Bug #15019]

* lib/net/http.rb: Documentation for Net::HTTP claims that
  multipart/form-data is not supported, but Net::HTTPHeader#set_form
  supports it since 1.9.3.
------------------------------------------------------------------------
r65229 | yui-knk | 2018-10-20 20:06:05 +0900 (Sat, 20 Oct 2018) | 3 lines

parse.y: Fix the compile error

* parse.y: Fix "error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]"
------------------------------------------------------------------------
r65228 | aycabta | 2018-10-20 19:57:33 +0900 (Sat, 20 Oct 2018) | 3 lines

Improve safe navigation operator's docs [Misc #15109]

* doc/syntax/calling_methods.rdoc: Add Safe navigation operator section.
------------------------------------------------------------------------
r65227 | yui-knk | 2018-10-20 19:53:31 +0900 (Sat, 20 Oct 2018) | 21 lines

Fix locations of NODE_SCOPE in lambda.

* parse.y: Fix to start with the argument.

  e.g. The locations of the NODE_SCOPE is fixed:

  ```
  -> x { 1 + 2 }
  ```

  * Before

  ```
  NODE_SCOPE (line: 1, location: (1,2)-(1,14))
  ```

  * After

  ```
  NODE_SCOPE (line: 1, location: (1,3)-(1,14))
  ```
------------------------------------------------------------------------
r65226 | svn | 2018-10-20 19:45:55 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65225 | mame | 2018-10-20 19:45:48 +0900 (Sat, 20 Oct 2018) | 4 lines

Remove tracecoverage instructions

The instructions were used only for branch coverage.
Instead, it now uses a trace framework [Feature #14104].
------------------------------------------------------------------------
r65224 | hsbt | 2018-10-20 19:30:42 +0900 (Sat, 20 Oct 2018) | 3 lines

Retry r65211.

  * Maybe, RbConfig.ruby only provides after Ruby installation.
------------------------------------------------------------------------
r65223 | svn | 2018-10-20 19:20:53 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65222 | k0kubun | 2018-10-20 19:20:49 +0900 (Sat, 20 Oct 2018) | 3 lines

revert r65213 and r65215

as we didn't agree on the actual implementation yet
------------------------------------------------------------------------
r65221 | yui-knk | 2018-10-20 19:10:46 +0900 (Sat, 20 Oct 2018) | 23 lines

Fix locations of NODE_LAMBDA.

* node.h: Add `nd_first_loc` and `nd_set_first_loc`

* parse.y: Fix to start with the beginning of `->` .

  e.g. The locations of the NODE_LAMBDA is fixed:

  ```
  -> x { 1 + 2 }
  ```

  * Before

  ```
  NODE_LAMBDA (line: 1, location: (1,2)-(1,14))
  ```

  * After

  ```
  NODE_LAMBDA (line: 1, location: (1,0)-(1,14))
  ```
------------------------------------------------------------------------
r65220 | hsbt | 2018-10-20 19:05:05 +0900 (Sat, 20 Oct 2018) | 3 lines

Revert "Mergr etc from github repository."

This reverts commit a85200277921dbefc1dfc9edd9ed26e9cea009f8.
------------------------------------------------------------------------
r65219 | ko1 | 2018-10-20 17:47:26 +0900 (Sat, 20 Oct 2018) | 6 lines

require 'rbconifg' earlier.

* test/lib/jit_support.rb: require rbconfig here.

* test/ruby/test_jit.rb: rbconfig should be required before.

------------------------------------------------------------------------
r65218 | ko1 | 2018-10-20 17:06:50 +0900 (Sat, 20 Oct 2018) | 7 lines

skip tests if --disable-mjit-support.

* test/ruby/test_rubyoptions.rb: skip MJIT related test
  if an interpreter is built with --disable-mjit-support.

* test/ruby/test_rubyvm_mjit.rb: ditto.

------------------------------------------------------------------------
r65217 | ko1 | 2018-10-20 17:00:42 +0900 (Sat, 20 Oct 2018) | 17 lines

rename configure option `--disable-mjit` to `--disable-mjit-support`

* configure.ac: rename configure option `--disable-mjit` to
  `--disable-mjit-support` because `--disable-mjit` is ambiguous that
  runtime MJIT default enable option or supporting MJIT features.
  `ENABLE_MJIT` is also renamed to `MJIT_SUPPORT`

* Makefile.in: catch up this fix.

* common.mk: ditto.

* test/ruby/test_jit.rb: ditto.

* win32/Makefile.sub: catch up this fix on mswin.

* tool/mkconfig.rb: fix to pass `MJIT_SUPPORT` key.

------------------------------------------------------------------------
r65216 | hsbt | 2018-10-20 16:54:58 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge irb from github repository.

  * IRB::VERSION is available on irb session.
------------------------------------------------------------------------
r65215 | k0kubun | 2018-10-20 16:54:34 +0900 (Sat, 20 Oct 2018) | 3 lines

vm_insnhelper.c: never cache setinstancevariable twice

same as r65213
------------------------------------------------------------------------
r65214 | kazu | 2018-10-20 16:49:34 +0900 (Sat, 20 Oct 2018) | 1 line

Reset primary_server when remove_server
------------------------------------------------------------------------
r65213 | k0kubun | 2018-10-20 16:43:50 +0900 (Sat, 20 Oct 2018) | 14 lines

vm_insnhelper.c: never cache getinstancevariable twice

We have several options to ensure there's no race condition between main
thread and MJIT thead about IC reference:

1) Give up caching ivar for multiple classes (or multiple versions of the
   same class) in the same getinstancevariable (This commit's approach)
2) Allocate new inline cache every time

Other ideas we could think of couldn't eliminate possibilities of race
condition.
In 2, it's memory allocation would be slow and it may trigger JIT
cancellation frequently. So 1 would be fast for both VM and JIT
situations.
------------------------------------------------------------------------
r65212 | tadd | 2018-10-20 16:40:45 +0900 (Sat, 20 Oct 2018) | 1 line

fix typo.
------------------------------------------------------------------------
r65211 | hsbt | 2018-10-20 16:38:19 +0900 (Sat, 20 Oct 2018) | 4 lines

Mergr etc from github repository.

  * ext/etc/extconf.rb: It supports to generate dependency header
    on standalone gem with github repository.
------------------------------------------------------------------------
r65210 | hsbt | 2018-10-20 16:27:18 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge fiddle from github repository.

  * ext/fiddle/extconf.rb: It supports to build libffi with standalone gem.
------------------------------------------------------------------------
r65209 | hsbt | 2018-10-20 16:21:14 +0900 (Sat, 20 Oct 2018) | 1 line

Cleanup fiddle extenstion when sync them from github repo.
------------------------------------------------------------------------
r65208 | svn | 2018-10-20 16:03:56 +0900 (Sat, 20 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65207 | hsbt | 2018-10-20 16:03:55 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge fileutils from ruby/fileutils on GitHub.

  * It was separated version file for gemspec.
------------------------------------------------------------------------
r65206 | naruse | 2018-10-20 15:56:51 +0900 (Sat, 20 Oct 2018) | 1 line

fix header_length's type to unsigned long
------------------------------------------------------------------------
r65205 | svn | 2018-10-20 15:53:11 +0900 (Sat, 20 Oct 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r65204 | ko1 | 2018-10-20 15:53:00 +0900 (Sat, 20 Oct 2018) | 17 lines

add disabling MJIT features option.

* configure.ac: introduce new configure option `--enable-mjit` and
  `--disable-mjit`. Default is "enable".
  `--disable-mjit` disables all of MJIT features so that `ruby --jit`
  can't enable MJIT.
  This option affect a macro `USE_MJIT`.
  This change remove `--enable/disable-install-mjit-header` option.

* Makefile.in: introduce the `ENABLE_MJIT` variable.

* common.mk: use `ENABLE_MJIT` option.

* internal.h: respect `USE_MJIT`. Same as other *.c, *.h.

* test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb.

------------------------------------------------------------------------
r65203 | naruse | 2018-10-20 15:45:51 +0900 (Sat, 20 Oct 2018) | 1 line

fix r65202 on ELF environment
------------------------------------------------------------------------
r65202 | naruse | 2018-10-20 15:35:25 +0900 (Sat, 20 Oct 2018) | 1 line

Support Mach-O on backtrace with DWARF
------------------------------------------------------------------------
r65201 | naruse | 2018-10-20 15:18:41 +0900 (Sat, 20 Oct 2018) | 4 lines

Support DWARF4's .debug_line

ICC uses DWARF4 for .debug_line which adds
maximum_operations_per_instruction in its header.
------------------------------------------------------------------------
r65200 | mame | 2018-10-20 14:44:14 +0900 (Sat, 20 Oct 2018) | 4 lines

thread.c (rb_clear_coverages): defined out of #ifdef

It failed to build on windows.
https://ci.appveyor.com/project/ruby/ruby/builds/19655876
------------------------------------------------------------------------
r65199 | mame | 2018-10-20 14:44:12 +0900 (Sat, 20 Oct 2018) | 3 lines

iseq.c (rb_iseq_trace_flag_cleared): Accept size_t for type consistency

It caused "implicit conversion loses integer precision" on clang.
------------------------------------------------------------------------
r65198 | yui-knk | 2018-10-20 14:33:37 +0900 (Sat, 20 Oct 2018) | 1 line

parse.y (struct ripper_args): Remove not used struct definition
------------------------------------------------------------------------
r65197 | svn | 2018-10-20 14:33:13 +0900 (Sat, 20 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65196 | svn | 2018-10-20 14:33:13 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65195 | mame | 2018-10-20 14:33:04 +0900 (Sat, 20 Oct 2018) | 9 lines

ext/coverage/: add the oneshot mode

This patch introduces "oneshot_lines" mode for `Coverage.start`, which
checks "whether each line was executed at least once or not", instead of
"how many times each line was executed".  A hook for each line is fired
at most once, and after it is fired, the hook flag was removed; it runs
with zero overhead.

See [Feature #15022] in detail.
------------------------------------------------------------------------
r65194 | yui-knk | 2018-10-20 13:41:19 +0900 (Sat, 20 Oct 2018) | 4 lines

ast.c: Fix the documents of `RubyVM::AST.parse` and `RubyVM::AST.parse_file`

* ast.c: r63602 fixed to raise `SyntaxError` when `RubyVM::AST.parse`
  or `RubyVM::AST.parse_file` fail to parse input.
------------------------------------------------------------------------
r65193 | hsbt | 2018-10-20 13:25:04 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge Pysch-3.1.0.pre2 from ruby/psych.

  * Added deprecated warnings for the new interface of keyword argument.
------------------------------------------------------------------------
r65192 | hsbt | 2018-10-20 11:51:09 +0900 (Sat, 20 Oct 2018) | 1 line

Support keyword arguments with Pysch.safe_load provided by after Psych 3.1.0.pre1.
------------------------------------------------------------------------
r65191 | svn | 2018-10-20 11:49:23 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65190 | nobu | 2018-10-20 11:49:18 +0900 (Sat, 20 Oct 2018) | 5 lines

complex.c: small optimization of Complex#**

* complex.c (rb_complex_pow): calculate power of a Fixnum without
  allocating intermediate Complex objects, and avoid unexpected
  NaNs.
------------------------------------------------------------------------
r65189 | suke | 2018-10-20 11:24:21 +0900 (Sat, 20 Oct 2018) | 4 lines

try to use System Monitor Control

* test/win32ole/test_win32ole_type_event.rb: try to use System Monitor
  Control to test. ADO is not available in AppVeyor(Mingw only?)
------------------------------------------------------------------------
r65188 | k0kubun | 2018-10-20 10:10:09 +0900 (Sat, 20 Oct 2018) | 5 lines

test_win32ole_event.rb: fire message_loop on retry

because it's failing even after sleeping 31s in total.
https://ci.appveyor.com/project/ruby/ruby/builds/19642619/job/pkaj5svr8glk8twt
https://ci.appveyor.com/project/ruby/ruby/builds/19641381/job/spdvrptpaq1d5778
------------------------------------------------------------------------
r65187 | k0kubun | 2018-10-20 10:00:37 +0900 (Sat, 20 Oct 2018) | 5 lines

appveyor.yml: increase timeout for mswin

because
https://ci.appveyor.com/project/ruby/ruby/builds/19643041/job/jlqs65wsvoqdguj0
failed with timeout on vs140
------------------------------------------------------------------------
r65186 | stomar | 2018-10-20 06:37:04 +0900 (Sat, 20 Oct 2018) | 1 line

NEWS: small fixes
------------------------------------------------------------------------
r65185 | stomar | 2018-10-20 06:35:51 +0900 (Sat, 20 Oct 2018) | 1 line

array.c, file.c, string.c: [DOC] fix typos
------------------------------------------------------------------------
r65184 | stomar | 2018-10-20 06:26:15 +0900 (Sat, 20 Oct 2018) | 3 lines

array.c: improve docs for Array#difference

* array.c: [DOC] small doc fixes for Array#difference and Array#-.
------------------------------------------------------------------------
r65183 | normal | 2018-10-20 05:56:10 +0900 (Sat, 20 Oct 2018) | 3 lines

rb_execution_context_t: pack bits, 256 -> 252 bytes (on 32-bit)

Maybe execution contexts will become more common.
------------------------------------------------------------------------
r65182 | normal | 2018-10-20 05:14:41 +0900 (Sat, 20 Oct 2018) | 4 lines

rb_sigwait_sleep: change internal API to use rb_hrtime_t

rb_hrtime_t is a more pleasant type to use and this can make
future changes around sleeping/scheduling easier.
------------------------------------------------------------------------
r65181 | nobu | 2018-10-20 00:24:42 +0900 (Sat, 20 Oct 2018) | 1 line

.travis.yml: separate apt addons for i686-linux
------------------------------------------------------------------------
r65180 | svn | 2018-10-20 00:08:57 +0900 (Sat, 20 Oct 2018) | 1 line

* 2018-10-20
------------------------------------------------------------------------
r65179 | k0kubun | 2018-10-20 00:08:55 +0900 (Sat, 20 Oct 2018) | 5 lines

mjit.c: don't let MJIT.pause hang on full active units

test/ruby/test_rubyvm_mjit.rb: add reproductive test

[Bug #15071]
------------------------------------------------------------------------
r65178 | k0kubun | 2018-10-19 23:26:29 +0900 (Fri, 19 Oct 2018) | 5 lines

test/lib/jit_support.rb: continue to skip test_jit

for icc since it's not supported yet but running on rubyci.

This reverts some part of r65175, r65176 and r65177.
------------------------------------------------------------------------
r65177 | k0kubun | 2018-10-19 23:19:19 +0900 (Fri, 19 Oct 2018) | 3 lines

test_rubyoptions.rb: don't use obsoleted method

It was removed on r65175.
------------------------------------------------------------------------
r65176 | k0kubun | 2018-10-19 23:08:45 +0900 (Fri, 19 Oct 2018) | 3 lines

test_rubyvm_mjit.rb: don't use obsoleted method

It was removed on r65175.
------------------------------------------------------------------------
r65175 | k0kubun | 2018-10-19 23:03:37 +0900 (Fri, 19 Oct 2018) | 5 lines

test/lib/jit_support.rb: fire test_jit everywhere

That was a workaround to make rubyci green for a short term after the
MJIT merge. As we've done many portability fixes for MJIT, let's try
running test_jit on all rubyci platforms.
------------------------------------------------------------------------
r65174 | k0kubun | 2018-10-19 22:47:02 +0900 (Fri, 19 Oct 2018) | 3 lines

mjit_worker.c: don't compile more than max_cache_size

Prior to this commit, max_cache_size + 1 methods could be active.
------------------------------------------------------------------------
r65173 | nobu | 2018-10-19 22:11:33 +0900 (Fri, 19 Oct 2018) | 1 line

transform_mjit_header.rb: fix up r65169
------------------------------------------------------------------------
r65172 | k0kubun | 2018-10-19 22:05:05 +0900 (Fri, 19 Oct 2018) | 5 lines

appveyor.yml: use -fs for test-spec

to debug silent death on vs120 builds
https://ci.appveyor.com/project/ruby/ruby/builds/19630104/job/tm8at8kfnvwxwe58
https://ci.appveyor.com/project/ruby/ruby/builds/19631779/job/qpjanaho1lc1e5a0
------------------------------------------------------------------------
r65171 | k0kubun | 2018-10-19 21:31:02 +0900 (Fri, 19 Oct 2018) | 8 lines

configure.ac: add --disable-install-mjit-header

and substitute INSTALL_MJIT_HEADER. This would be convenient as a workaround
for user if we found a platform that can't compile Ruby after Ruby 2.6.0 release.

common.mk: Install MJIT header only when INSTALL_MJIT_HEADER
Makefile.in: ditto
win32/Makefile.sub: ditto
------------------------------------------------------------------------
r65170 | nobu | 2018-10-19 21:29:47 +0900 (Fri, 19 Oct 2018) | 1 line

transform_mjit_header.rb: `inline` may be a macro
------------------------------------------------------------------------
r65169 | nobu | 2018-10-19 21:29:46 +0900 (Fri, 19 Oct 2018) | 5 lines

transform_mjit_header.rb: add system_header pragma

* tool/transform_mjit_header.rb: insert GCC system_header pragma
  to get rid of errors caused by the contents included from system
  headers.
------------------------------------------------------------------------
r65168 | k0kubun | 2018-10-19 20:30:32 +0900 (Fri, 19 Oct 2018) | 7 lines

.travis.yml: try promoting osx to non-allow_failures

somehow it gets stable there days...

Later, we may be able to add wrapper to apply timeout appropriately
and dump threads, in case that it stucks. It's not super easy to write
it, so this commit just tries to enable osx for now.
------------------------------------------------------------------------
r65167 | shyouhei | 2018-10-19 17:46:41 +0900 (Fri, 19 Oct 2018) | 8 lines

compile.c: default_len is positive

Recent GCC warns that default_len can be negative (thus can
overflow PTRDIFF_MAX), which is a false assert.  Suppresses
warnings by adding __builtin_unreachable.

See also: https://travis-ci.org/ruby/ruby/jobs/443568193#L2227

------------------------------------------------------------------------
r65166 | shyouhei | 2018-10-19 16:48:45 +0900 (Fri, 19 Oct 2018) | 5 lines

_mjit_compile_ivar.rb: use PRIuSIZE

`ic->ic_value.index` is size_t, not always unsigned long.
See also: https://travis-ci.org/ruby/ruby/jobs/443560810#L2263

------------------------------------------------------------------------
r65165 | shyouhei | 2018-10-19 16:36:31 +0900 (Fri, 19 Oct 2018) | 5 lines

.travis.yml: delete duplicated --disable-install-doc [ci skip]

The flag was already specified inside of before_script


------------------------------------------------------------------------
r65164 | shyouhei | 2018-10-19 16:32:28 +0900 (Fri, 19 Oct 2018) | 4 lines

.travis.yml: name each builds [ci-skip]

Just cosmetic update.

------------------------------------------------------------------------
r65163 | shyouhei | 2018-10-19 16:26:48 +0900 (Fri, 19 Oct 2018) | 8 lines

.travis.yml: add i686-linux tests

This is a better-than-nothing compilation check that compiles
32bit binary on a 64bit VM.

Commented out are universal.i386-darwin17 biulds, which I think
are in very low priority.

------------------------------------------------------------------------
r65162 | ko1 | 2018-10-19 14:26:35 +0900 (Fri, 19 Oct 2018) | 5 lines

check before access.

* vm_insnhelper.c (vm_push_frame): validate prev_frame because
  prev_frame can be the end of frame.

------------------------------------------------------------------------
r65161 | shyouhei | 2018-10-19 12:33:48 +0900 (Fri, 19 Oct 2018) | 12 lines

vm_core.h: NSIG is a BSDism.

Surprisingly, this constant (been there since around 1983) has
never been a part of any standards until now.  We have to find
out the appropriate value.

NSIG_MAX is expected to become a part of forthcoming POSIX.
See: http://austingroupbugs.net/view.php?id=741

_SIG_MAXSIG is here because that is greater than NSIG. See
Python's relevant discussion: https://bugs.python.org/issue20584

------------------------------------------------------------------------
r65160 | shyouhei | 2018-10-19 11:01:46 +0900 (Fri, 19 Oct 2018) | 4 lines

addr2line.c: minimal workaround to prevent parse error

"//*" is super dangerous for non-C++ compiler.

------------------------------------------------------------------------
r65159 | shyouhei | 2018-10-19 09:35:42 +0900 (Fri, 19 Oct 2018) | 5 lines

addr2line.c: this file has no portability

It seems nobody on earth is interested in such thing for it.
Ignore compiler warnings.

------------------------------------------------------------------------
r65158 | svn | 2018-10-19 08:58:23 +0900 (Fri, 19 Oct 2018) | 1 line

* 2018-10-19
------------------------------------------------------------------------
r65157 | nobu | 2018-10-19 08:58:21 +0900 (Fri, 19 Oct 2018) | 1 line

tool/insns2vm.rb: get rid of expanding paths
------------------------------------------------------------------------
r65154 | shyouhei | 2018-10-18 18:21:05 +0900 (Thu, 18 Oct 2018) | 6 lines

configure.ac: do not overwrite -std=

Set -std=gnu99 only when no such compiler flag(s) are set in any
compiler-related environment variables.  This enables users to
specify something more modern, say, -std=c11.

------------------------------------------------------------------------
r65153 | shyouhei | 2018-10-18 17:58:18 +0900 (Thu, 18 Oct 2018) | 7 lines

.travis.yml: add -pedantic build (2nd try)

Now that we have allow_failures, why not add configurations
that are prone to fail.  The first thing I want to add is
$CC -ansi -pedantic, which spots lots of bugs on my local
machine.

------------------------------------------------------------------------
r65152 | shyouhei | 2018-10-18 17:39:15 +0900 (Thu, 18 Oct 2018) | 2 lines

revert r65151, because the other tests were broken.

------------------------------------------------------------------------
r65151 | shyouhei | 2018-10-18 17:33:52 +0900 (Thu, 18 Oct 2018) | 7 lines

.travis.yml: add -pedantic build

Now that we have allow_failures, why not add configurations
that are prone to fail.  The first thing I want to add is
$CC -ansi -pedantic, which spots lots of bugs on my local
machine.

------------------------------------------------------------------------
r65150 | nobu | 2018-10-18 15:36:30 +0900 (Thu, 18 Oct 2018) | 1 line

make-snapshot: package with TarHeader
------------------------------------------------------------------------
r65149 | svn | 2018-10-18 14:51:35 +0900 (Thu, 18 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65148 | shyouhei | 2018-10-18 14:51:29 +0900 (Thu, 18 Oct 2018) | 37 lines

fix SEGV in rb_raw_obj_info()

This funcion can be called from inside of rb_ast_new().
Should add appropriate case branches.

(lldb) run
Process 9135 launched: './miniruby' (x86_64)
Process 9135 stopped
* thread #1: tid = 0xdf36b, 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617
   9614                 IMEMO_NAME(iseq);
   9615                 IMEMO_NAME(tmpbuf);
   9616 #undef IMEMO_NAME
-> 9617               default: UNREACHABLE;
   9618             }
   9619             snprintf(buff, buff_size, "%s %s", buff, imemo_name);
   9620
(lldb) bt
* thread #1: tid = 0xdf36b, 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617
    frame #1: 0x00000001000c433f miniruby`obj_info(obj=4328903000) + 95 at gc.c:9671
    frame #2: 0x00000001000ce2ac miniruby`newobj_init(klass=4302478608, flags=36890, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x0000000101800410, obj=4328903000) + 444 at gc.c:1882
    frame #3: 0x00000001000c0a49 miniruby`newobj_of(klass=4302478608, flags=36890, v1=0, v2=0, v3=0, wb_protected=1) + 217 at gc.c:1968
    frame #4: 0x00000001000c0bcb miniruby`rb_imemo_new(type=imemo_ast, v1=0, v2=0, v3=0, v0=4302478608) + 75 at gc.c:2017
    frame #5: 0x0000000100148f2a miniruby`rb_ast_new + 58 at node.c:1118
    frame #6: 0x000000010018d9e2 miniruby`yycompile(vparser=4328903720, p=0x0000000100729670, fname=4328903160, line=1) + 98 at parse.y:4925
    frame #7: 0x000000010018d66f miniruby`parser_compile_string(vparser=4328903720, fname=4328903160, s=4328904440, line=1) + 143 at parse.y:4995
    frame #8: 0x000000010018d768 miniruby`rb_parser_compile_string_path(vparser=4328903720, f=4328903160, s=4328904440, line=1) + 56 at parse.y:5015
    frame #9: 0x000000010018d71e miniruby`rb_parser_compile_string(vparser=4328903720, f="-e", s=4328904440, line=1) + 62 at parse.y:5008
    frame #10: 0x00000001002130d5 miniruby`process_options(argc=0, argv=0x00007fff5fbfdc08, opt=0x00007fff5fbfd9e8) + 3477 at ruby.c:1754
    frame #11: 0x00000001002122dd miniruby`ruby_process_options(argc=2, argv=0x00007fff5fbfdbf8) + 285 at ruby.c:2332
    frame #12: 0x00000001000aa966 miniruby`ruby_options(argc=2, argv=0x00007fff5fbfdbf8) + 262 at eval.c:118
    frame #13: 0x0000000100000ed4 miniruby`main(argc=2, argv=0x00007fff5fbfdbf8) + 116 at main.c:42
    frame #14: 0x00007fff933845ad libdyld.dylib`start + 1
    frame #15: 0x00007fff933845ad libdyld.dylib`start + 1
(lldb)

------------------------------------------------------------------------
r65147 | nobu | 2018-10-18 11:32:25 +0900 (Thu, 18 Oct 2018) | 1 line

.travis.yml: no additional apt packages for spec/ruby [ci skip]
------------------------------------------------------------------------
r65146 | shyouhei | 2018-10-18 11:22:26 +0900 (Thu, 18 Oct 2018) | 4 lines

.travis.yml: should escape spaces

workarounds for https://github.com/travis-ci/travis-ci/issues/1444

------------------------------------------------------------------------
r65145 | shyouhei | 2018-10-18 10:56:30 +0900 (Thu, 18 Oct 2018) | 6 lines

.travis.yml: just use env

You don't have to use `before_install` to introduce
new environment variables; that is to be done using
`env` command.

------------------------------------------------------------------------
r65144 | nobu | 2018-10-18 10:52:50 +0900 (Thu, 18 Oct 2018) | 4 lines

.travis.yml: no PR in spec/ruby [ci skip]

* .travis.yml (before_script): spec/ruby has been incorporated
  already, no pull-requests to merge.
------------------------------------------------------------------------
r65143 | shyouhei | 2018-10-18 10:34:45 +0900 (Thu, 18 Oct 2018) | 2 lines

.travis.yml: fix typo in configure arguments

------------------------------------------------------------------------
r65142 | nobu | 2018-10-18 10:10:56 +0900 (Thu, 18 Oct 2018) | 5 lines

.travis.yml: split before_install into the matrix

* .travis.yml (before_install): split shell commands into the
  matrix per OSs, so that the commands will appear in the logs
  separately.
------------------------------------------------------------------------
r65141 | nobu | 2018-10-18 09:55:05 +0900 (Thu, 18 Oct 2018) | 1 line

zlib: fix Zlib::VERSION
------------------------------------------------------------------------
r65140 | usa | 2018-10-18 09:54:32 +0900 (Thu, 18 Oct 2018) | 2 lines

remove message already unnecesary

------------------------------------------------------------------------
r65139 | rhe | 2018-10-18 09:24:49 +0900 (Thu, 18 Oct 2018) | 13 lines

openssl: sync with upstream repository

Import current master (01b23fa8eee2) of ruby/openssl.git.

----------------------------------------------------------------
Kazuki Yamaguchi (3):
      x509name: fix OpenSSL::X509::Name#{cmp,<=>}
      Ruby/OpenSSL 2.0.9
      Ruby/OpenSSL 2.1.2

nobu (2):
      needs openssl/opensslv.h
      Remove -Wno-parentheses flag.
------------------------------------------------------------------------
r65138 | k0kubun | 2018-10-18 00:42:34 +0900 (Thu, 18 Oct 2018) | 7 lines

.travis.yml: revert r65131 too

because it succeeded https://travis-ci.org/ruby/ruby/jobs/442733840.

It looks that it randomly succeeds. Let's just leave it and see how
stable it is, starting from `allow_failures` because it hasn't hanged
only once so far.
------------------------------------------------------------------------
r65131 | k0kubun | 2018-10-18 00:13:36 +0900 (Thu, 18 Oct 2018) | 7 lines

revert r65124 and try non-parallel test-all on osx

OpenSSL error was fixed but r65124 hanged too
https://travis-ci.org/ruby/ruby/jobs/442727035.

So it seems to be an independent issue.
Let me try removing -j.
------------------------------------------------------------------------
r65127 | svn | 2018-10-18 00:03:12 +0900 (Thu, 18 Oct 2018) | 1 line

* 2018-10-18
------------------------------------------------------------------------
r65126 | svn | 2018-10-18 00:03:11 +0900 (Thu, 18 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65125 | nagachika | 2018-10-18 00:03:10 +0900 (Thu, 18 Oct 2018) | 6 lines

infect taint flag on Array#pack and String#unpack
with the directives "B", "b", "H" and "h".

	* pack.c (pack_pack, pack_unpack_internal): infect taint flag.

	* test/ruby/test_pack.rb: add test for above.
------------------------------------------------------------------------
r65124 | k0kubun | 2018-10-17 23:50:35 +0900 (Wed, 17 Oct 2018) | 5 lines

.travis.yml: try openssl stable version

macOS build is handing on OpenSSL::SSL::SSLError https://travis-ci.org/ruby/ruby/jobs/442706479
Now 1.0.2p is stable version https://formulae.brew.sh/formula/openssl,
so let me try that version to make CI green
------------------------------------------------------------------------
r65123 | mame | 2018-10-17 23:35:02 +0900 (Wed, 17 Oct 2018) | 7 lines

sample/trick2018/03-tompng: merge upstream fixes

* Remove `ruby '2.5.0'`
* Add `source 'https://rubygems.org'`
* Avoid `Kernel#Integer`

Thanks to tompng.  Fixes #14930.
------------------------------------------------------------------------
r65122 | shyouhei | 2018-10-17 23:09:24 +0900 (Wed, 17 Oct 2018) | 5 lines

.travis.yml: enhance build matrix

add OS=osx compiler=clang build matrix so that we can make sure
things are built smoothly on that platform.

------------------------------------------------------------------------
r65121 | nobu | 2018-10-17 20:35:28 +0900 (Wed, 17 Oct 2018) | 4 lines

NEWS in rdoc mode [ci skip]

* NEWS: reverted to rdoc mode.  markdown mode does not make
  class/module/method references in HTML.
------------------------------------------------------------------------
r65120 | nobu | 2018-10-17 20:35:27 +0900 (Wed, 17 Oct 2018) | 5 lines

Fix NEWS format [ci skip]

* doc/NEWS-2.5.0: append bracketed tags to the previous lines, not
  to be parsed as description lists, and expand braces for method
  references.
------------------------------------------------------------------------
r65108 | svn | 2018-10-17 16:16:58 +0900 (Wed, 17 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65107 | mame | 2018-10-17 16:16:50 +0900 (Wed, 17 Oct 2018) | 3 lines

Remove the level information from throw instruction

It is no longer used.
------------------------------------------------------------------------
r65106 | aycabta | 2018-10-17 15:28:20 +0900 (Wed, 17 Oct 2018) | 1 line

Merge rdoc-6.1.0.beta2
------------------------------------------------------------------------
r65105 | naruse | 2018-10-17 10:29:49 +0900 (Wed, 17 Oct 2018) | 1 line

Check the end of Compilation Unit by unit length instead of level of tree
------------------------------------------------------------------------
r65104 | naruse | 2018-10-17 08:57:47 +0900 (Wed, 17 Oct 2018) | 1 line

Support base address selection entry
------------------------------------------------------------------------
r65103 | naruse | 2018-10-17 08:52:28 +0900 (Wed, 17 Oct 2018) | 4 lines

Correct the handling of .debug_ranges

Though DWARF specifies "the applicable base address defaults to the base
address of the compilation unit", but GCC seems to use zero as default.
------------------------------------------------------------------------
r65102 | naruse | 2018-10-17 08:52:28 +0900 (Wed, 17 Oct 2018) | 1 line

The value of .debug_ranges are uintptr_t
------------------------------------------------------------------------
r65101 | naruse | 2018-10-17 08:52:26 +0900 (Wed, 17 Oct 2018) | 1 line

If high_pc uses DW_FORM_addr, it's not size but address
------------------------------------------------------------------------
r65099 | svn | 2018-10-17 07:42:39 +0900 (Wed, 17 Oct 2018) | 1 line

* 2018-10-17
------------------------------------------------------------------------
r65098 | marcandre | 2018-10-17 07:42:37 +0900 (Wed, 17 Oct 2018) | 2 lines

Spec: Fix spec/ruby/core/array/reject_spec.rb & misc
Patch by @MSP-Greg.
------------------------------------------------------------------------
r65097 | k0kubun | 2018-10-16 18:29:23 +0900 (Tue, 16 Oct 2018) | 4 lines

tool/downloader.rb: retry Net::ReadTimeout

as failed in
https://ci.appveyor.com/project/ruby/ruby/builds/19540849/job/9p9pq0b7hfrb2r8q
------------------------------------------------------------------------
r65096 | nobu | 2018-10-16 18:11:12 +0900 (Tue, 16 Oct 2018) | 4 lines

string.c: grapheme cluster regexp failure

* string.c (get_reg_grapheme_cluster): show error info and relax
  to rb_fatal from rb_bug.
------------------------------------------------------------------------
r65095 | nobu | 2018-10-16 18:10:56 +0900 (Tue, 16 Oct 2018) | 1 line

regerror.c: lenghten MAX_ERROR_PAR_LEN to contain old property names
------------------------------------------------------------------------
r65094 | nobu | 2018-10-16 17:13:58 +0900 (Tue, 16 Oct 2018) | 1 line

regparse.c: check the result of propname2ctype
------------------------------------------------------------------------
r65093 | duerst | 2018-10-16 16:53:37 +0900 (Tue, 16 Oct 2018) | 2 lines

revert r65091, r65090 because ci fails

------------------------------------------------------------------------
r65092 | naruse | 2018-10-16 16:12:26 +0900 (Tue, 16 Oct 2018) | 1 line

check dwarf version and skip non Dwarf v4
------------------------------------------------------------------------
r65091 | duerst | 2018-10-16 16:01:55 +0900 (Tue, 16 Oct 2018) | 12 lines

update to Unicode 11.0.0 (basic step, not complete yet)

- common.mk: Change Unicode version to 11.0.0
- enc/unicode/case-folding.rb, enc/unicode.c: Initial changes to deal with
  Gregorian Mtavruli. This should bring us up to the same level as e.g.
  Python 3.7, by following the Unicode tables exactly. But it will
  produce undesirable (mixed-case) results for String#capitalize.
  This will be addressed in a later commit.
- enc/unicode/11.0.0, enc/unicode/11.0.0/casefold.h, enc/unicode/name2ctype.h:
  Add generated files.
- lib/unicode_normalize/tables.rb: Updated table.

------------------------------------------------------------------------
r65090 | duerst | 2018-10-16 15:41:47 +0900 (Tue, 16 Oct 2018) | 2 lines

add some comments to enc/unicode/case-folding.rb [ci skip]

------------------------------------------------------------------------
r65089 | svn | 2018-10-16 14:15:01 +0900 (Tue, 16 Oct 2018) | 1 line

* 2018-10-16
------------------------------------------------------------------------
r65088 | nobu | 2018-10-16 14:14:59 +0900 (Tue, 16 Oct 2018) | 1 line

Removed data for old Unicode [ci skip]
------------------------------------------------------------------------
r65087 | nobu | 2018-10-15 22:48:20 +0900 (Mon, 15 Oct 2018) | 4 lines

unicode.c: moved addtional GCB ranges

* enc/unicode.c: moved additional Grapheme Cluster Break ranges
  which depend on the Unicode version.
------------------------------------------------------------------------
r65086 | nobu | 2018-10-15 21:31:25 +0900 (Mon, 15 Oct 2018) | 5 lines

regparse.c: Suppress duplicated range warning by mere \X

* regparse.c (node_extended_grapheme_cluster): as Unicode 10 has
  added Grapheme_Cluster_Break properties to some characters,
  remove duplicated ranges for Unicode 9.
------------------------------------------------------------------------
r65085 | nobu | 2018-10-15 21:31:22 +0900 (Mon, 15 Oct 2018) | 1 line

regparse.c: warn all duplicated ranges when debugging
------------------------------------------------------------------------
r65084 | k0kubun | 2018-10-15 19:03:57 +0900 (Mon, 15 Oct 2018) | 4 lines

.travis.yml: try `addons.apt.config.retries: true` as well

This is suggested by Travis
https://github.com/travis-ci/travis-ci/issues/9112#issuecomment-376305909
------------------------------------------------------------------------
r65083 | k0kubun | 2018-10-15 18:51:32 +0900 (Mon, 15 Oct 2018) | 4 lines

.travis.yml: try `addons.apt.update: true` for gcc-8

because gcc-8 setup is super unstable like this
https://travis-ci.org/ruby/ruby/jobs/441528813
------------------------------------------------------------------------
r65082 | shyouhei | 2018-10-15 13:05:32 +0900 (Mon, 15 Oct 2018) | 5 lines

detect clang++

Given $CC is clang-* in this case branch the sed should
match against clang, not gcc.

------------------------------------------------------------------------
r65081 | nobu | 2018-10-15 09:11:45 +0900 (Mon, 15 Oct 2018) | 1 line

Pass cflags given to configure to mjit
------------------------------------------------------------------------
r65080 | nobu | 2018-10-15 08:45:33 +0900 (Mon, 15 Oct 2018) | 1 line

Moved hexdump macro before used
------------------------------------------------------------------------
r65079 | nobu | 2018-10-15 08:40:27 +0900 (Mon, 15 Oct 2018) | 1 line

Make local functions static
------------------------------------------------------------------------
r65078 | svn | 2018-10-15 01:59:16 +0900 (Mon, 15 Oct 2018) | 1 line

* 2018-10-15
------------------------------------------------------------------------
r65077 | naruse | 2018-10-15 01:59:15 +0900 (Mon, 15 Oct 2018) | 1 line

Read debug_info to show inline functions in backtrace
------------------------------------------------------------------------
r65076 | k0kubun | 2018-10-14 22:25:21 +0900 (Sun, 14 Oct 2018) | 25 lines

_mjit_compile_ivar.erb: optimize setivar as well

mjit_compile.inc.erb: ditto
common.mk: update dependency for the rename from getivar.erb

=== Optcarrot benchmark ===
```
$ benchmark-driver benchmark.yml --rbenv '2.0.0::2.0.0-p648 --disable-gems;before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24
2.0.0: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
before: ruby 2.6.0dev (2018-10-14 trunk 65074) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-10-14 trunk 65074) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-14 trunk 65074) [x86_64-linux]
after+JIT: ruby 2.6.0dev (2018-10-14 trunk 65074) +JIT [x86_64-linux]
Calculating -------------------------------------
                              2.0.0      before  before+JIT       after   after+JIT
Optcarrot Lan_Master.nes     34.434      53.125      84.782      53.321      86.812 fps

Comparison:
             Optcarrot Lan_Master.nes
               after+JIT:        86.8 fps
              before+JIT:        84.8 fps - 1.02x  slower
                   after:        53.3 fps - 1.63x  slower
                  before:        53.1 fps - 1.63x  slower
                   2.0.0:        34.4 fps - 2.52x  slower
```
------------------------------------------------------------------------
r65075 | k0kubun | 2018-10-14 20:50:52 +0900 (Sun, 14 Oct 2018) | 3 lines

_mjit_compile_getivar.erb: we may not say receiver [ci skip]

for instance variable access, unlike method call.
------------------------------------------------------------------------
r65074 | k0kubun | 2018-10-14 20:25:36 +0900 (Sun, 14 Oct 2018) | 7 lines

vm_opts.h: share USE_IC_FOR_IVAR as OPT_IC_FOR_IVAR

with mjit_compile.c (tool/ruby_vm/views/_mjit_compile_getivar.erb).

mjit_compile.c: ditto
tool/ruby_vm/views/_mjit_compile_getivar.erb: ditto
vm_opts.h: ditto
------------------------------------------------------------------------
r65073 | k0kubun | 2018-10-14 18:24:43 +0900 (Sun, 14 Oct 2018) | 34 lines

_mjit_compile_getivar.erb: optimize IC-hit getivar

by inlining index (and serial to invalidate that) and simplifying the
branch by using JIT cancellation.

mjit_compile.inc.erb: use the above file
mjit_compile.c: copy USE_IC_FOR_IVAR definition. will move this to
another shared file later.
common.mk: add new dependency
test/ruby/test_jit.rb: cover this case

=== Optcarrot benchmark ===
```
$ benchmark-driver benchmark.yml --rbenv '2.0.0::2.0.0-p648;before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24
2.0.0: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
before: ruby 2.6.0dev (2018-10-14 trunk 65072) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-10-14 trunk 65072) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-14 trunk 65072) [x86_64-linux]
last_commit=_mjit_compile_getivar.erb: optimize IC-hit getivar
after+JIT: ruby 2.6.0dev (2018-10-14 trunk 65072) +JIT [x86_64-linux]
last_commit=_mjit_compile_getivar.erb: optimize IC-hit getivar
Calculating -------------------------------------
                              2.0.0      before  before+JIT       after   after+JIT
Optcarrot Lan_Master.nes     36.065      53.896      71.565      53.856      84.747 fps

Comparison:
             Optcarrot Lan_Master.nes
               after+JIT:        84.7 fps
              before+JIT:        71.6 fps - 1.18x  slower
                  before:        53.9 fps - 1.57x  slower
                   after:        53.9 fps - 1.57x  slower
                   2.0.0:        36.1 fps - 2.35x  slower

```
------------------------------------------------------------------------
r65072 | k0kubun | 2018-10-14 14:50:06 +0900 (Sun, 14 Oct 2018) | 3 lines

vm_insnhelper.c: remove obsoleted comment [ci skip]

see also: r65061
------------------------------------------------------------------------
r65071 | k0kubun | 2018-10-14 10:24:21 +0900 (Sun, 14 Oct 2018) | 5 lines

appveyor.yml: test open-uri separately

This randomly crashes test worker
https://ci.appveyor.com/project/ruby/ruby/builds/19488746/job/pf1c78dlh8lqcj06
and running it without -j is suggested.
------------------------------------------------------------------------
r65070 | stomar | 2018-10-14 05:53:56 +0900 (Sun, 14 Oct 2018) | 1 line

NEWS: Hash#update! does not exist
------------------------------------------------------------------------
r65069 | stomar | 2018-10-14 05:36:03 +0900 (Sun, 14 Oct 2018) | 7 lines

hash.c: improve docs for Hash#{merge,merge!,update}

* hash.c: [DOC] improve docs for Hash#{merge,merge!,update}:
  various rewordings, avoid referring to the receiver as `hsh'
  (does not appear in the call-seq of the generated HTML docs),
  mention that Hash#update is an alias for Hash#merge!,
  use more distinct example values, fix spacing in code.
------------------------------------------------------------------------
r65068 | stomar | 2018-10-14 04:04:02 +0900 (Sun, 14 Oct 2018) | 1 line

string.c: [DOC] add example code for String#strip!
------------------------------------------------------------------------
r65067 | stomar | 2018-10-14 04:02:51 +0900 (Sun, 14 Oct 2018) | 4 lines

string.c: small doc improvement

* string.c: [DOC] move unaltered case for String#strip to the end,
  similar to other strip methods.
------------------------------------------------------------------------
r65066 | stomar | 2018-10-14 04:01:22 +0900 (Sun, 14 Oct 2018) | 4 lines

array.c: fix rdoc syntax

* array.c: [DOC] use `<code>other_ary</code>s' instead of `+other_ary+s',
  which is not rendered correctly.
------------------------------------------------------------------------
r65065 | svn | 2018-10-14 01:21:10 +0900 (Sun, 14 Oct 2018) | 1 line

* 2018-10-14
------------------------------------------------------------------------
r65064 | nobu | 2018-10-14 01:21:07 +0900 (Sun, 14 Oct 2018) | 1 line

Define PRIdPTR etc
------------------------------------------------------------------------
r65063 | nobu | 2018-10-14 01:21:06 +0900 (Sun, 14 Oct 2018) | 1 line

Remove compile-time dependencies on ruby/version.h
------------------------------------------------------------------------
r65062 | k0kubun | 2018-10-13 23:49:41 +0900 (Sat, 13 Oct 2018) | 4 lines

vm_insinhelper.c: prefer using inlinable function

No major performance impact, but just in case for some platform
that matters.
------------------------------------------------------------------------
r65061 | k0kubun | 2018-10-13 23:03:48 +0900 (Sat, 13 Oct 2018) | 4 lines

vm_insnhelper.c: finish reverting r63333

That optimization is already reverted and we're not retrying the
optimization soon. Let me simplify the code of vm_getivar.
------------------------------------------------------------------------
r65060 | nobu | 2018-10-13 18:59:23 +0900 (Sat, 13 Oct 2018) | 1 line

Add missing require
------------------------------------------------------------------------
r65059 | nobu | 2018-10-13 18:59:22 +0900 (Sat, 13 Oct 2018) | 4 lines

Prefer `rb_fstring_lit` over `rb_fstring_cstr`

The former states explicitly that the argument must be a literal,
and can optimize away `strlen` on all compilers.
------------------------------------------------------------------------
r65058 | nobu | 2018-10-13 18:23:56 +0900 (Sat, 13 Oct 2018) | 5 lines

Added comments to rb_setup_fake_str and rb_fstring_new [ci skip]

`ptr` for these functions must refer constant string literals.
Otherwise, the result string's content can be modified/discarded
unexpectedly.
------------------------------------------------------------------------
r65057 | svn | 2018-10-13 14:36:51 +0900 (Sat, 13 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65056 | normal | 2018-10-13 14:36:50 +0900 (Sat, 13 Oct 2018) | 3 lines

addr2line.c: fix *printf type warnings on 32-bit

Yup, back to using an ancient 32-bit system...
------------------------------------------------------------------------
r65055 | normal | 2018-10-13 14:18:49 +0900 (Sat, 13 Oct 2018) | 4 lines

tests: support Linux kernels with CONFIG_IPV6=n

Detecting the presence of constants in C headers is insufficient,
as a Linux kernel can be built with CONFIG_IPV6=n
------------------------------------------------------------------------
r65054 | svn | 2018-10-13 12:18:44 +0900 (Sat, 13 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65053 | suke | 2018-10-13 12:18:42 +0900 (Sat, 13 Oct 2018) | 7 lines

use ADODB.Connection instead of Microsoft Internet Controls.

  * test/win32ole/test_win32ole_type.rb: remove test using Microsoft
    Internet Controls.

  * test/win32ole/test_win32ole_type_event.rb: some test uses
    ADODB.Connection.
------------------------------------------------------------------------
r65052 | k0kubun | 2018-10-13 10:47:55 +0900 (Sat, 13 Oct 2018) | 6 lines

appveyor.yml: reorder jobs

to reduce time to get all green. As we have 3 parallelism on AppVeyor,
running the slow msys2 job first doesn't have significant impact on
job priorities, but at the same time this would reduce the time that
only msys2 is running alone at last.
------------------------------------------------------------------------
r65051 | k0kubun | 2018-10-13 10:32:20 +0900 (Sat, 13 Oct 2018) | 1 line

win32/win32.c: fix typo in comment [ci skip]
------------------------------------------------------------------------
r65050 | k0kubun | 2018-10-13 09:38:15 +0900 (Sat, 13 Oct 2018) | 7 lines

kill_spec.rb: exclude spec unstable on MinGW

like r64991, until we get helpful error logs on worker death or the
unstability is fixed.

Since mspec worker randomly dies on MinGW, maybe it should have an
option to retry worker death.
------------------------------------------------------------------------
r65049 | k0kubun | 2018-10-13 09:25:58 +0900 (Sat, 13 Oct 2018) | 3 lines

win32/win32.c: I meant FindFreeChildSlot [ci skip]

which was formerly used in CreateChild.
------------------------------------------------------------------------
r65048 | k0kubun | 2018-10-13 09:22:18 +0900 (Sat, 13 Oct 2018) | 4 lines

win32/win32.c: don't call FindChildSlot in MJIT

worker. It's very likely to be thread-unsafe and so it's better to avoid
using in MJIT worker to prevent surprises by race condition.
------------------------------------------------------------------------
r65047 | svn | 2018-10-13 09:22:00 +0900 (Sat, 13 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65046 | suke | 2018-10-13 09:21:59 +0900 (Sat, 13 Oct 2018) | 5 lines

remove Microsoft Internet Control

* test/win32ole/test_win32ole_param: remove Microsoft Internet Control.
* test/win32ole/test_win32ole_param_event: use ADODB instead of
  Microsoft Internet Control for test_input?, test_output?
------------------------------------------------------------------------
r65045 | svn | 2018-10-13 08:57:44 +0900 (Sat, 13 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65044 | k0kubun | 2018-10-13 08:57:42 +0900 (Sat, 13 Oct 2018) | 7 lines

win32/win32.c: drop always-NULL psa parameter

I'm simplifying the interface of ChildRecord as I'm going to complicate
it a little next.

I didn't drop hInput since leaving it would be more natural as its
interface.
------------------------------------------------------------------------
r65043 | suke | 2018-10-13 08:07:48 +0900 (Sat, 13 Oct 2018) | 4 lines

use assert_equal instead of assert

* test/win32ole/test_win32ole_param.rb (test_input?, test_output,
  test_optional, test_retval?): use assert_equal instead of assert.
------------------------------------------------------------------------
r65042 | stomar | 2018-10-13 06:55:49 +0900 (Sat, 13 Oct 2018) | 1 line

enumerator.c: [DOC] small fix
------------------------------------------------------------------------
r65041 | stomar | 2018-10-13 06:11:54 +0900 (Sat, 13 Oct 2018) | 1 line

range.c: [DOC] improve docs for Range#cover?
------------------------------------------------------------------------
r65040 | stomar | 2018-10-13 05:37:30 +0900 (Sat, 13 Oct 2018) | 4 lines

readline.c: improve docs

* ext/readline/readline.c: [DOC] fix typo in docs for
  Readline.completion_quote_character; enable link to method.
------------------------------------------------------------------------
r65039 | stomar | 2018-10-13 05:01:52 +0900 (Sat, 13 Oct 2018) | 1 line

process.c: [DOC] improve docs for Process.groups
------------------------------------------------------------------------
r65038 | stomar | 2018-10-13 05:00:13 +0900 (Sat, 13 Oct 2018) | 1 line

vm.c: [DOC] small improvements
------------------------------------------------------------------------
r65037 | stomar | 2018-10-13 04:58:11 +0900 (Sat, 13 Oct 2018) | 10 lines

default gems: add missing comment in gemspec

* lib/csv/csv.gemspec: [DOC] add comment for require fallback
  in Ruby repository.

* lib/logger.gemspec: ditto.
* lib/prime.gemspec: ditto.
* lib/rexml/rexml.gemspec: ditto.
* lib/rss/rss.gemspec: ditto.
* lib/webrick/webrick.gemspec: ditto.
------------------------------------------------------------------------
r65036 | stomar | 2018-10-13 04:56:53 +0900 (Sat, 13 Oct 2018) | 4 lines

hash.c: improve docs for Hash#{size,length}

* hash.c: [DOC] shorten example code for Hash#{size,length}
  and mention aliases at the end; also enable links.
------------------------------------------------------------------------
r65035 | nobu | 2018-10-13 00:48:06 +0900 (Sat, 13 Oct 2018) | 8 lines

Fix overwritten zone string

* time.c (zone_str): while rb_fstring_usascii and the family
  require that the argument string is never modified, tzname may
  point areas which will be discarded by calling tzset().
  make a String then call rb_fstring to copy the zone name.
  when an ID equals TZ environment variable, its name string also
  has modified by changing tzname.
------------------------------------------------------------------------
r65034 | svn | 2018-10-13 00:14:55 +0900 (Sat, 13 Oct 2018) | 1 line

* 2018-10-13
------------------------------------------------------------------------
r65033 | k0kubun | 2018-10-13 00:14:51 +0900 (Sat, 13 Oct 2018) | 15 lines

mjit_worker.c: suppress child process's output properly

Prior to this commit, some of parent process's output was unintentionally
suppressed. We couldn't suppress only child process's output with spawnvp.

Instead of that, this commit uses CreateProcess directly to redirect stdout
and stderr only for child process.

As it's dealing with HANDLE returned from CreateProcess, now waitpid macro
needs to CloseHandle it.

win32/win32.c: Introduce rb_w32_start_process which is designed for MJIT
worker. Other similar functions can't be used since they are using ALLOCV
that may trigger GC, which should be avoided on MJIT worker.

------------------------------------------------------------------------
r65032 | suke | 2018-10-12 22:51:21 +0900 (Fri, 12 Oct 2018) | 1 line

remove duplicate assertion
------------------------------------------------------------------------
r65031 | nobu | 2018-10-12 21:54:21 +0900 (Fri, 12 Oct 2018) | 4 lines

Removed unreachable code

* node.c (rb_ast_dispose): since `ast->node_buffer` is freed in
  `rb_ast_free()`, it should be always NULL.
------------------------------------------------------------------------
r65030 | k0kubun | 2018-10-12 18:19:49 +0900 (Fri, 12 Oct 2018) | 10 lines

test/win32ole/test_win32ole_event.rb: wait longer

for unstable spec. I added r64963 but it couldn't rescue:
https://ci.appveyor.com/project/ruby/ruby/builds/19451743/job/hg0tyoxbacrrlnsr

Since #test_on_event is especially unstable,
https://ci.appveyor.com/project/ruby/ruby/builds/19337514/job/0wp2oe9dkr9gt1bi
https://ci.appveyor.com/project/ruby/ruby/builds/19451743/job/hg0tyoxbacrrlnsr
this commit lets it sleep longer as needed.

------------------------------------------------------------------------
r65029 | naruse | 2018-10-12 17:45:05 +0900 (Fri, 12 Oct 2018) | 1 line

Disable fast_finish
------------------------------------------------------------------------
r65028 | svn | 2018-10-12 12:55:22 +0900 (Fri, 12 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65027 | suke | 2018-10-12 12:55:21 +0900 (Fri, 12 Oct 2018) | 7 lines

use ADODB.connection instead of Microsoft Internet Controls

  * test/win32ole/test_win32ole_method.rb: remove test using Microsoft
    Internet Controls.

  * test/win32ole/test_win32ole_method_event.rb: add test using
    ADODB.connection.
------------------------------------------------------------------------
r65026 | nobu | 2018-10-12 11:49:39 +0900 (Fri, 12 Oct 2018) | 1 line

Initialize zone
------------------------------------------------------------------------
r65025 | nobu | 2018-10-12 11:25:38 +0900 (Fri, 12 Oct 2018) | 1 line

Load as FIXOFF mode if zone is present
------------------------------------------------------------------------
r65024 | nobu | 2018-10-12 11:25:37 +0900 (Fri, 12 Oct 2018) | 1 line

Just copy tzmode
------------------------------------------------------------------------
r65023 | nobu | 2018-10-12 11:22:55 +0900 (Fri, 12 Oct 2018) | 3 lines

Missing write-barrier

Fix up r64507.
------------------------------------------------------------------------
r65022 | naruse | 2018-10-12 10:21:45 +0900 (Fri, 12 Oct 2018) | 1 line

Remove debug print
------------------------------------------------------------------------
r65021 | naruse | 2018-10-12 09:45:07 +0900 (Fri, 12 Oct 2018) | 1 line

use APPVEYOR_BUILD_WORKER_IMAGE
------------------------------------------------------------------------
r65020 | naruse | 2018-10-12 09:31:24 +0900 (Fri, 12 Oct 2018) | 1 line

escape
------------------------------------------------------------------------
r65019 | naruse | 2018-10-12 09:25:41 +0900 (Fri, 12 Oct 2018) | 1 line

Quote path
------------------------------------------------------------------------
r65018 | naruse | 2018-10-12 09:20:14 +0900 (Fri, 12 Oct 2018) | 1 line

debug print
------------------------------------------------------------------------
r65017 | naruse | 2018-10-12 09:09:19 +0900 (Fri, 12 Oct 2018) | 1 line

Define VS140COMNTOOLS by itself
------------------------------------------------------------------------
r65016 | naruse | 2018-10-12 08:59:09 +0900 (Fri, 12 Oct 2018) | 1 line

Specify vm image on appveyor.yml
------------------------------------------------------------------------
r65015 | svn | 2018-10-12 08:58:21 +0900 (Fri, 12 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65014 | naruse | 2018-10-12 08:58:20 +0900 (Fri, 12 Oct 2018) | 1 line

Revert wrongly commit debug_info feature
------------------------------------------------------------------------
r65013 | naruse | 2018-10-12 08:55:47 +0900 (Fri, 12 Oct 2018) | 1 line

Support FreeBSD
------------------------------------------------------------------------
r65012 | naruse | 2018-10-12 08:55:47 +0900 (Fri, 12 Oct 2018) | 1 line

Support compressed debug_info
------------------------------------------------------------------------
r65011 | naruse | 2018-10-12 08:55:46 +0900 (Fri, 12 Oct 2018) | 1 line

free line info leaves
------------------------------------------------------------------------
r65010 | naruse | 2018-10-12 08:55:45 +0900 (Fri, 12 Oct 2018) | 1 line

close dlopen-ed handle
------------------------------------------------------------------------
r65009 | naruse | 2018-10-12 08:55:45 +0900 (Fri, 12 Oct 2018) | 1 line

fix
------------------------------------------------------------------------
r65008 | naruse | 2018-10-12 08:55:44 +0900 (Fri, 12 Oct 2018) | 1 line

Support additional forms
------------------------------------------------------------------------
r65007 | naruse | 2018-10-12 08:55:44 +0900 (Fri, 12 Oct 2018) | 1 line

Show backtrace with .debug_info
------------------------------------------------------------------------
r65006 | naruse | 2018-10-12 08:55:43 +0900 (Fri, 12 Oct 2018) | 1 line

Read .debug_info
------------------------------------------------------------------------
r65005 | naruse | 2018-10-12 08:23:16 +0900 (Fri, 12 Oct 2018) | 1 line

show envvars before use it
------------------------------------------------------------------------
r65004 | naruse | 2018-10-12 08:21:11 +0900 (Fri, 12 Oct 2018) | 1 line

Show VS*COMNTOOLS environment variable on appveyor
------------------------------------------------------------------------
r65003 | k0kubun | 2018-10-12 01:28:04 +0900 (Fri, 12 Oct 2018) | 8 lines

win32/Makefile.sub: generate MJIT header pdb

in the MJIT-header-specific path, not default path like vc140.pdb.

mjit_worker.c: specify the MJIT-header-specific pdb path.

tool/rbinstall.rb: install MJIT header pdb as well.

------------------------------------------------------------------------
r65001 | svn | 2018-10-12 00:02:00 +0900 (Fri, 12 Oct 2018) | 1 line

* 2018-10-12
------------------------------------------------------------------------
r65000 | k0kubun | 2018-10-12 00:01:56 +0900 (Fri, 12 Oct 2018) | 8 lines

win32/Makefile.sub: install MJIT header and object

to prefix. This is a retry of r64947. So this doesn't still make mswin MJIT
on install directory succeed. One more step required.

tool/rbinstall.rb: This change is needed to install headers correctly since
the extensions are .obj and .pch, not .h

------------------------------------------------------------------------
r64995 | svn | 2018-10-11 10:03:07 +0900 (Thu, 11 Oct 2018) | 1 line

* 2018-10-11
------------------------------------------------------------------------
r64994 | mame | 2018-10-11 10:03:05 +0900 (Thu, 11 Oct 2018) | 3 lines

prelude.rb (Kernel#pp): make it private

It was a bug.
------------------------------------------------------------------------
r64993 | k0kubun | 2018-10-10 20:58:40 +0900 (Wed, 10 Oct 2018) | 6 lines

spec/.../ole_method.rb: retry WIN32OLERuntimeError

This part sometimes causes random failure like:
https://ci.appveyor.com/project/ruby/ruby/builds/19382723/job/bedc33p4nolcqkp6

Let me retry this to make CI stable.
------------------------------------------------------------------------
r64992 | k0kubun | 2018-10-10 20:39:46 +0900 (Wed, 10 Oct 2018) | 3 lines

spec: add comments to re-enable specs for MinGW [ci skip]

r64918 and r64988 should not be kept forever.
------------------------------------------------------------------------
r64991 | k0kubun | 2018-10-10 20:35:58 +0900 (Wed, 10 Oct 2018) | 7 lines

terminate_spec.rb: exclude unstable spec for MinGW

This spec seems to randomly kill mspec worker.
https://ci.appveyor.com/project/ruby/ruby/builds/19390874/job/wv1bsm8skd4e1pxl

To make CI stable, let me exclude this for MinGW until we get some logs
that help debugging or resolve that.
------------------------------------------------------------------------
r64990 | svn | 2018-10-10 13:24:11 +0900 (Wed, 10 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64989 | ko1 | 2018-10-10 13:24:10 +0900 (Wed, 10 Oct 2018) | 5 lines

revisit `RARRAY_PTR()`.

* ext/fiddle/function.c (initialize): use RARRAY_AREF() instead of
  using RARRAY_PTR().

------------------------------------------------------------------------
r64988 | svn | 2018-10-10 13:20:21 +0900 (Wed, 10 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64987 | ko1 | 2018-10-10 13:20:17 +0900 (Wed, 10 Oct 2018) | 5 lines

revisit `RARRAY_PTR()`.

* process.c (check_exec_redirect): use RARRAY_AREF() instead of
  using RARRAY_PTR().

------------------------------------------------------------------------
r64986 | ko1 | 2018-10-10 13:17:01 +0900 (Wed, 10 Oct 2018) | 12 lines

revisit `RARRAY_PTR()`.

* array.c (yield_indexed_values): use RARRAY_AREF/ASET instead of
  using RARRAY_PTR().

* enum.c (nmin_filter): ditto.

* proc.c (rb_sym_to_proc): ditto.

* enum.c (rb_nmin_run): use RARRAY_PTR_USE() instead of RARRAY_PTR().
  It is safe because they don't make new referecen from an array.

------------------------------------------------------------------------
r64985 | ko1 | 2018-10-10 12:52:20 +0900 (Wed, 10 Oct 2018) | 10 lines

revisit `RARRAY_PTR()`.

* array.c (ary_memcpy0): remove traditional `RARRAY_PTR()` code.
  It's enough stable.

* array.c (rb_ary_splice): add comment about wb-unprotect.

* array.c (rotate_count): use `RARRAY_PTR_USE()` instead of
  `RARRAY_PTR()` to avoid wb-unprotect.

------------------------------------------------------------------------
r64984 | svn | 2018-10-10 05:06:42 +0900 (Wed, 10 Oct 2018) | 1 line

* 2018-10-10
------------------------------------------------------------------------
r64983 | odaira | 2018-10-10 05:06:36 +0900 (Wed, 10 Oct 2018) | 2 lines

* configure.ac: do not use __builtin_longjmp on ppc64* Linux
  because it causes a segmentation fault with MJIT
------------------------------------------------------------------------
r64977 | nobu | 2018-10-09 15:56:38 +0900 (Tue, 09 Oct 2018) | 1 line

Add tests for another timezone
------------------------------------------------------------------------
r64976 | ko1 | 2018-10-09 15:18:28 +0900 (Tue, 09 Oct 2018) | 2 lines

use `should include`.

------------------------------------------------------------------------
r64975 | nobu | 2018-10-09 14:55:29 +0900 (Tue, 09 Oct 2018) | 9 lines

Time.parse based from non-Time object

* lib/time.rb (Time.make_time): as the document states, the second
  argument of `Time.parse` may be a non-`Time` object which does not
  have `getlocal` method, assume it is in the local time in the case.
  based on the patch by nkmrya (Yasuhiro Nakamura) at
  [ruby-core:68775].  [ruby-core:68775] [Bug #11037]

Co-authored-by: nkmrya (Yasuhiro Nakamura) <yasuhiro6194@gmail.com>
------------------------------------------------------------------------
r64974 | nobu | 2018-10-09 12:21:57 +0900 (Tue, 09 Oct 2018) | 10 lines

ext/objspace/objspace_dump.c: print addresses consistently

The format addresses are printed in are different if you use
`ObjectSpace.dump_all(output: :stdout)` vs.
`ObjectSpace.dump_all(output: :string)` (or `ObjectSpace.dump`) due to
differences in the underlying `vfprintf` implementation.

Use `"%#"PRIxVALUE` to format `VALUE`.

Co-authored-by: Ashe Connor <ashe@kivikakk.ee>
------------------------------------------------------------------------
r64973 | svn | 2018-10-09 11:01:56 +0900 (Tue, 09 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64972 | naruse | 2018-10-09 11:01:54 +0900 (Tue, 09 Oct 2018) | 8 lines

Revert "ext/objspace/objspace_dump.c: print addresses consistently"

This reverts commit r64970.

Visual C++ 12.0 doesn't have PRIxPTR.
Anyway we have our own vfprintf implementation BSD_vfprintf().
If you want to have portable vfprintf, replace it with BSD_vfprintf like
vsnprintf or just use BSD_vfprintf.
------------------------------------------------------------------------
r64971 | svn | 2018-10-09 08:43:48 +0900 (Tue, 09 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64970 | tenderlove | 2018-10-09 08:43:45 +0900 (Tue, 09 Oct 2018) | 10 lines

ext/objspace/objspace_dump.c: print addresses consistently

The format addresses are printed in are different if you use
`ObjectSpace.dump_all(output: :stdout)` vs.
`ObjectSpace.dump_all(output: :string)` (or `ObjectSpace.dump`) due to
differences in the underlying `vfprintf` implementation.

Use %"PRIxPTR" instead to be consistent across both.

Co-authored-by: Ashe Connor <ashe@kivikakk.ee>
------------------------------------------------------------------------
r64969 | kazu | 2018-10-09 00:47:21 +0900 (Tue, 09 Oct 2018) | 5 lines

Revert "NEWS: Fix indent [ci skip]"

This reverts commit a43d71159fdf208f5ad29fe8f4169e193056caaa.

already fixed at r64958
------------------------------------------------------------------------
r64968 | svn | 2018-10-09 00:12:57 +0900 (Tue, 09 Oct 2018) | 1 line

* 2018-10-09
------------------------------------------------------------------------
r64967 | kazu | 2018-10-09 00:12:56 +0900 (Tue, 09 Oct 2018) | 1 line

NEWS: Fix indent [ci skip]
------------------------------------------------------------------------
r64966 | svn | 2018-10-08 22:57:38 +0900 (Mon, 08 Oct 2018) | 1 line

* remove trailing space. [ci skip]
------------------------------------------------------------------------
r64965 | k0kubun | 2018-10-08 22:57:36 +0900 (Mon, 08 Oct 2018) | 2 lines

include/ruby/ruby.h: comment about mswin RUBY_EXTERN [ci skip]

------------------------------------------------------------------------
r64964 | k0kubun | 2018-10-08 22:46:42 +0900 (Mon, 08 Oct 2018) | 6 lines

include/ruby/ruby.h: import external symbols

properly on MinGW MJIT.

test_jit.rb: all MJIT tests are now passing on MinGW.

------------------------------------------------------------------------
r64963 | k0kubun | 2018-10-08 20:59:22 +0900 (Mon, 08 Oct 2018) | 5 lines

test_win32ole_event.rb: sleep longer

to increase the possibility of TestWIN32OLE_EVENT_SWbemSink#test_on_event success.
It seems to randomly fail
https://ci.appveyor.com/project/ruby/ruby/builds/19337514/job/0wp2oe9dkr9gt1bi
------------------------------------------------------------------------
r64962 | k0kubun | 2018-10-08 19:46:36 +0900 (Mon, 08 Oct 2018) | 7 lines

appveyor.yml: execute test_syntax separately

because NoMemoryError tends to be caused by
TestSyntax#assert_syntax_files.
https://ci.appveyor.com/project/ruby/ruby/build/1.0.8525
https://ci.appveyor.com/project/ruby/ruby/build/1.0.8795
https://ci.appveyor.com/project/ruby/ruby/builds/19334828/job/s1960qssxnk1lpoi
------------------------------------------------------------------------
r64961 | nobu | 2018-10-08 17:54:35 +0900 (Mon, 08 Oct 2018) | 1 line

Add test for marshal
------------------------------------------------------------------------
r64960 | nobu | 2018-10-08 17:46:50 +0900 (Mon, 08 Oct 2018) | 1 line

Removed redundant suffix `_with_timezone`
------------------------------------------------------------------------
r64959 | k0kubun | 2018-10-08 13:30:07 +0900 (Mon, 08 Oct 2018) | 10 lines

revert r64957 [ci skip]

r64956 didn't work either...
This means that svn.ruby-lang.org/ruby is not executing the latest git
hook on git.ruby-lang.org/ruby-commit-hook.

Tentatively I backported the changes of auto-style.rb in
git.ruby-lang.org/ruby-commit-hook to git.ruby-lang.org/scripts.

I hope this commit won't be rolled back by svn bot...
------------------------------------------------------------------------
r64958 | nobu | 2018-10-08 13:03:32 +0900 (Mon, 08 Oct 2018) | 3 lines

Timezone at Time#+ and Time#-

* time.c (time_add): support for Timezone.
------------------------------------------------------------------------
r64957 | svn | 2018-10-08 12:11:37 +0900 (Mon, 08 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64956 | k0kubun | 2018-10-08 12:11:36 +0900 (Mon, 08 Oct 2018) | 8 lines

revert r64955

r64954 didn't work...

In this commit, I'm experimenting
https://git.ruby-lang.org/ruby-commit-hook.git/commit/svn-utils/bin/auto-style.rb?id=2a1a17da1c163e8fc4321759d95057441ddf2c0a

We can distinguish possible 2 issues by this commit.
------------------------------------------------------------------------
r64955 | svn | 2018-10-08 11:55:07 +0900 (Mon, 08 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64954 | k0kubun | 2018-10-08 11:55:06 +0900 (Mon, 08 Oct 2018) | 11 lines

partially revert r64953

"expand tabs" is not intended to be applied to strftime.c, because its
c-file-style is "linux", not "ruby".

It's explicitly excluded to expand tabs
https://git.ruby-lang.org/ruby-commit-hook.git/tree/svn-utils/bin/auto-style.rb#n195
but it didn't work.
I fixed the issue in
https://git.ruby-lang.org/ruby-commit-hook.git/commit/svn-utils/bin/auto-style.rb?id=844e0d42de11ad4c549bfbdd752a21df2823c18c
so let me try to revert the strftime.c change to keep the tabs.
------------------------------------------------------------------------
r64953 | svn | 2018-10-08 11:35:33 +0900 (Mon, 08 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64952 | nobu | 2018-10-08 11:35:31 +0900 (Mon, 08 Oct 2018) | 6 lines

Timezone support by Time [Feature #14850]

* strftime.c (rb_strftime): support timezone object by `%z`.

* time.c (time_init_1, time_new_timew, time_getlocaltime): accept
  timezone object as `off`.
------------------------------------------------------------------------
r64951 | k0kubun | 2018-10-08 10:08:37 +0900 (Mon, 08 Oct 2018) | 7 lines

test_jit.rb: skip to test tempdir emptiness

on AppVeyor mswin. It's somehow failing and not reproductive on my
environment.

We're suspecting maybe somebody is still holding module handle, even
while FreeLibrary is finished successfully.
------------------------------------------------------------------------
r64950 | k0kubun | 2018-10-08 09:12:21 +0900 (Mon, 08 Oct 2018) | 9 lines

revert r64947 and r64949

Both didn't work well on mswin. Reverting.
https://ci.appveyor.com/project/ruby/ruby/builds/19322867/job/28fgwiq8j7hdmeu6
https://ci.appveyor.com/project/ruby/ruby/builds/19323721/job/1s73mrgu8n8wpa5f

We need to revisit this to have MJIT header in a correct place, but
having both in the place didn't make JIT on install directory functional
either anyway...
------------------------------------------------------------------------
r64949 | k0kubun | 2018-10-08 01:52:21 +0900 (Mon, 08 Oct 2018) | 1 line

win32/Makefile.sub: create header install dir first
------------------------------------------------------------------------
r64948 | k0kubun | 2018-10-08 01:45:16 +0900 (Mon, 08 Oct 2018) | 7 lines

appveyor.yml: completely separate win32ole tests

because r64938 was not enough and another win32ole test file
(`test_win32ole_type.rb`) crashed worker.
https://ci.appveyor.com/project/ruby/ruby/builds/19321161/job/ue1qrphi5j1xxgu6

Let's run whole win32ole test suite separately.
------------------------------------------------------------------------
r64947 | k0kubun | 2018-10-08 00:38:06 +0900 (Mon, 08 Oct 2018) | 13 lines

win32/Makefile.sub: install precompiled header to prefix

This is needed to run JIT from the installed ruby binary.

Even after this, we're hitting another error though.

start compilation: a@-e:1 -> C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c
Starting process: cl cl -nologo -LD -DMJIT_HEADER -MD -Zi -W2 -wd4100 -wd4127 -wd4210 -wd4214 -wd4255 -wd4574 -wd4668 -wd4710 -wd4711 -wd4820 -wd4996 -we4028 -we4142 -O2sy- -Zm600 -DRUBY_EXPORT -I. -I.ext/include/x64-mswin64_140 -I../ruby/include -I../ruby -I../ruby/enc/unicode/10.0.0 -DRUBY_DEVEL=1 -DCANONICALIZATION_FOR_MATHN -D_WIN32_WINNT=0x0600 -FeC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.so -FoC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.obj -YuC:/usr/include/ruby-2.6.0/x64-mswin64_140/rb_mjit_header-2.6.0.pch C:/usr/include/ruby-2.6.0/x64-mswin64_140/rb_mjit_header-2.6.0.obj -TcC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c -link -LIBPATH:C:/usr/lib x64-vcruntime140-ruby260.lib -incremental:no -debug -opt:ref -opt:icf -dll
_ruby_mjit_p9712u0.c
C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c(1): error C2859: C:\usr\bin\vc140.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.
compile_c_to_so: compile error: 2
Failed to generate so: C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.so

------------------------------------------------------------------------
r64946 | svn | 2018-10-08 00:10:00 +0900 (Mon, 08 Oct 2018) | 1 line

* 2018-10-08
------------------------------------------------------------------------
r64945 | k0kubun | 2018-10-08 00:09:58 +0900 (Mon, 08 Oct 2018) | 4 lines

mjit_worker.c: clean up all unnecessary files on mswin

test_jit.rb: passed all MJIT tests.

------------------------------------------------------------------------
r64944 | k0kubun | 2018-10-07 23:51:53 +0900 (Sun, 07 Oct 2018) | 4 lines

mjit_worker.c: don't suppress cl.exe logs

on --jit-verbose=2+.

------------------------------------------------------------------------
r64943 | k0kubun | 2018-10-07 23:05:56 +0900 (Sun, 07 Oct 2018) | 5 lines

appveyor.yml: give up running TestThreadQueue#test_queue_with_trap

for mswin. We tried to increase timeout and execute separately but both
didn't work. Let me skip this until somebody starts to work on fixing
this behavior, since this makes AppVeyor almost impossible to be used as CI.
------------------------------------------------------------------------
r64942 | k0kubun | 2018-10-07 23:00:04 +0900 (Sun, 07 Oct 2018) | 13 lines

include/ruby/intern.h: don't modify MJIT_FUNC_EXPORTED

on most of platforms except mswin.

Changing it to static was needed for mswin because it doesn't use
transform_mjit_header, but for platforms that use it, it causes link
error like:

/usr/bin/ld: /tmp/_ruby_mjit_p21652u0.o: relocation R_X86_64_PC32 against undefined symbol `rb_vm_search_method_slowpath' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

include/ruby/defines.h: MJIT_FUNC_EXPORTED moved to intern.h
------------------------------------------------------------------------
r64941 | k0kubun | 2018-10-07 22:34:59 +0900 (Sun, 07 Oct 2018) | 12 lines

vm_core.h: fix inconsistent prototype declarations

like "error: static declaration of 'xxx' follows non-static declaration".
r64940 is successfully built on mswin but not built on almost all other environments.

internal.h: ditto

include/ruby/intern.h: MJIT_STATIC is moved to this file since this file
also needs to use this.

mjit.h: MJIT_STATIC is moved from this.

------------------------------------------------------------------------
r64940 | k0kubun | 2018-10-07 22:11:27 +0900 (Sun, 07 Oct 2018) | 14 lines

mjit.h: introduce MJIT_STATIC for full mswin JIT support

This change resolves most of major remaining MJIT bugs on mswin.
Since Visual Studio doesn't support generating pre-processed code
preserving macros, we can't use transform_mjit_header approach for mswin.
So we need to transform MJIT header using macro like this.

vm.c: use MJIT_STATIC for non-static functions that exist on MJIT header
and cause conflict on link.
vm_insnhelper.c: ditto

test_jit.rb: remove many skips for mswin.


------------------------------------------------------------------------
r64939 | k0kubun | 2018-10-07 21:28:46 +0900 (Sun, 07 Oct 2018) | 4 lines

mjit_worker.c: print warning if FreeLibrary fails

because somehow AppVeyor fails to remove so file by Permission Deined.

------------------------------------------------------------------------
r64938 | k0kubun | 2018-10-07 21:03:49 +0900 (Sun, 07 Oct 2018) | 11 lines

appveyor.yml: separately execute unstable tests

without -j option. Those 2 tests are too unstable on AppVeyor.

test/excludes/TestThreadQueue.rb: The most unstable test ever. That even fails on my
machine too. This may be possibly because recent SIGCHLD-related changes.
https://ci.appveyor.com/project/ruby/ruby/build/9795/job/l9t4w9ks7arsldb1

test/excludes/TestWin32OLE.rb: I saw that win32ole crashes test-all several times.
https://ci.appveyor.com/project/ruby/ruby/build/9811/job/ra5uxf2cg6v7ohag

------------------------------------------------------------------------
r64937 | k0kubun | 2018-10-07 20:46:26 +0900 (Sun, 07 Oct 2018) | 3 lines

revert r64935

that didn't work at all. So the so file should be open at the time.
------------------------------------------------------------------------
r64936 | nobu | 2018-10-07 18:17:59 +0900 (Sun, 07 Oct 2018) | 1 line

Added missing declarations in readline.h bundled with macOS 10.14
------------------------------------------------------------------------
r64935 | k0kubun | 2018-10-07 17:15:48 +0900 (Sun, 07 Oct 2018) | 12 lines

appveyor.yml: use ./tmp as TMPDIR for test-all

on VS.

On AppVeyor, we seem to fail to remove so file due to permission error.
C:/projects/ruby/test/ruby/test_jit.rb:419: warning: MJIT warning: failed to remove
"C:\Users\appveyor\AppData\Local\Temp\1/_ruby_mjit_p3580u0.so": Permission denied
https://ci.appveyor.com/project/ruby/ruby/builds/19317520/job/sh8s6tw6ayxvtl33

But this is not reproductive on my local mswin environment at all.
To identify the cause, let me try changing the TMPDIR.

------------------------------------------------------------------------
r64934 | k0kubun | 2018-10-07 17:03:36 +0900 (Sun, 07 Oct 2018) | 6 lines

mjit_worker.c: clean up .obj file on mswin

prior to this commit, .obj file is generated on current directory and nobody deletes that.
This changes it to make sure it's generated to temporary directory and removes that.


------------------------------------------------------------------------
r64933 | k0kubun | 2018-10-07 15:08:54 +0900 (Sun, 07 Oct 2018) | 8 lines

add_spec.rb: skip unstable spec on mingw

This sometimes crashes mspec worker like
https://ci.appveyor.com/project/ruby/ruby/build/9806/job/37tx2atojy96227m

and it doesn't generate helpful output and it seems hard to fix it soon.
As AppVeyor is too unstable by too many factors, let me skip this
at least for a short term. until AppVeyor gets stable.
------------------------------------------------------------------------
r64932 | k0kubun | 2018-10-07 14:54:04 +0900 (Sun, 07 Oct 2018) | 3 lines

test_jit.rb: skip some tests

that don't succeed on MinGW after r64929
------------------------------------------------------------------------
r64931 | k0kubun | 2018-10-07 13:29:00 +0900 (Sun, 07 Oct 2018) | 1 line

mjit.c: fix obsoleted comment [ci skip]
------------------------------------------------------------------------
r64930 | kazu | 2018-10-07 13:21:32 +0900 (Sun, 07 Oct 2018) | 1 line

Fix indent of output in doc [ci skip]
------------------------------------------------------------------------
r64929 | k0kubun | 2018-10-07 13:17:59 +0900 (Sun, 07 Oct 2018) | 16 lines

mjit.h: call compiled code immediately

after the first compilation on --jit-wait.

Previously the assignment to `func` didn't have meaning for the behavior,
and the compiled code wasn't called immediately after the synchronous
compilation. It wasn't intentional.

Fixing this issue without impacting performance without --jit-wait is
not so obvious. Adding branch or goto to call func in mjit_exec spoiled
the performance without --jit-wait. Instead of that, I called the func
inside mjit_wait_call() (former mjit_get_iseq_func()) which is never
inlined to mjit_exec(). Thanks to that, this commit has no impact for
normal performance.

mjit.c: ditto
------------------------------------------------------------------------
r64928 | svn | 2018-10-07 00:14:20 +0900 (Sun, 07 Oct 2018) | 1 line

* 2018-10-07
------------------------------------------------------------------------
r64927 | nobu | 2018-10-07 00:14:19 +0900 (Sun, 07 Oct 2018) | 1 line

revert r64925
------------------------------------------------------------------------
r64926 | svn | 2018-10-06 12:11:49 +0900 (Sat, 06 Oct 2018) | 1 line

* 2018-10-06
------------------------------------------------------------------------
r64925 | nobu | 2018-10-06 12:11:46 +0900 (Sat, 06 Oct 2018) | 5 lines

order-only-prerequisites

* defs/gmake.mk: use order-only-prerequisites to run build and test
  targets sequentially.
  https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
------------------------------------------------------------------------
r64924 | naruse | 2018-10-05 19:36:24 +0900 (Fri, 05 Oct 2018) | 3 lines

Use binread because webrick also uses binread

Reported-by: MSP-Greg [Bug #15203]
------------------------------------------------------------------------
r64923 | hsbt | 2018-10-05 19:28:38 +0900 (Fri, 05 Oct 2018) | 1 line

Added news entry of r64741.
------------------------------------------------------------------------
r64922 | svn | 2018-10-05 15:23:37 +0900 (Fri, 05 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64921 | nobu | 2018-10-05 15:23:34 +0900 (Fri, 05 Oct 2018) | 13 lines

Add difference method to Array

I introduce a `difference` method equivalent to the `-` operator, but
which accept more than array as argument. This improved readability, and
it is also coherent with the `+` operator, which has a similar `concat`
method. The method doesn't modify the original object and return a new
object instead. I plan to introduce a `difference!` method as well.

Tests and documentation are included.

It solves partially https://bugs.ruby-lang.org/issues/14097

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64920 | nobu | 2018-10-05 12:25:33 +0900 (Fri, 05 Oct 2018) | 1 line

Update aclocal to 1.16.1 [ci skip]
------------------------------------------------------------------------
r64919 | nobu | 2018-10-05 09:37:40 +0900 (Fri, 05 Oct 2018) | 4 lines

Remove wrong conversion

* rational.c (nurat_to_double): should return `double`, not `Float`.
  fix r64897.  [Bug #15189]
------------------------------------------------------------------------
r64918 | svn | 2018-10-05 08:33:05 +0900 (Fri, 05 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64917 | ko1 | 2018-10-05 08:33:03 +0900 (Fri, 05 Oct 2018) | 4 lines

use RARRAY_AREF().

* struct.c (setup_struct): no need to use Array raw ptr here.

------------------------------------------------------------------------
r64916 | svn | 2018-10-05 00:22:55 +0900 (Fri, 05 Oct 2018) | 1 line

* 2018-10-05
------------------------------------------------------------------------
r64915 | ko1 | 2018-10-05 00:22:53 +0900 (Fri, 05 Oct 2018) | 5 lines

check argument type.

* iseq.c (iseqw_s_compile): check argument type (T_STRING) to
  avoid SEGV.

------------------------------------------------------------------------
r64914 | nobu | 2018-10-04 23:00:39 +0900 (Thu, 04 Oct 2018) | 1 line

lldb_rp: support Symbol [ci skip]
------------------------------------------------------------------------
r64913 | usa | 2018-10-04 15:29:31 +0900 (Thu, 04 Oct 2018) | 4 lines

Support ubasecrt.dll 10.0.17763.1 included in Windows 10 October 2018 Update



------------------------------------------------------------------------
r64912 | svn | 2018-10-04 04:19:36 +0900 (Thu, 04 Oct 2018) | 1 line

* 2018-10-04
------------------------------------------------------------------------
r64911 | stomar | 2018-10-04 04:19:33 +0900 (Thu, 04 Oct 2018) | 4 lines

fileutils.rb: restore documentation for FileUtils

* lib/fileutils.rb: [DOC] restore documentation for FileUtils module
  which became undocumented with r63430.
------------------------------------------------------------------------
r64910 | stomar | 2018-10-03 21:57:45 +0900 (Wed, 03 Oct 2018) | 5 lines

Improve docs for RubyVM::AST and RubyVM::AST::Node

* ast.c: [DOC] fix error in code example for RubyVM::AST::Node#type
  (r63604 changed the return value of RubyVM::AST::Node#children);
  enable link to RubyVM::AST.parse method; other minor improvements.
------------------------------------------------------------------------
r64909 | nobu | 2018-10-03 18:54:25 +0900 (Wed, 03 Oct 2018) | 1 line

lldb_rp: support T_CLASS,T_MODULE,T_ICLASS [ci skip]
------------------------------------------------------------------------
r64908 | nobu | 2018-10-03 18:54:21 +0900 (Wed, 03 Oct 2018) | 1 line

lldb_rp: use append_command_output [ci skip]
------------------------------------------------------------------------
r64907 | kazu | 2018-10-03 16:43:13 +0900 (Wed, 03 Oct 2018) | 1 line

Set indent_size of reg*.[ch] to 2 [ci skip]
------------------------------------------------------------------------
r64906 | nobu | 2018-10-03 15:48:35 +0900 (Wed, 03 Oct 2018) | 4 lines

Use cd -P

Setting PWD in the process does not let `cd` traverse symlinks in
/bin/sh on macOS.
------------------------------------------------------------------------
r64905 | shyouhei | 2018-10-03 13:49:34 +0900 (Wed, 03 Oct 2018) | 10 lines

support --with-arch=x86_64h

Recent apple machines describe themselves being x86_64h.  That
architecture is somehow supported by their C compiler and at least
by recent clang.  However config.sub does not know that fact so
making universal binary targeting it is rejected by the program.

Why not skip the check by config.sub.  [fix GH-1971]


------------------------------------------------------------------------
r64904 | nobu | 2018-10-03 13:37:43 +0900 (Wed, 03 Oct 2018) | 6 lines

Fix wrong use of BIGNUM_EMBED_LEN_NUMBITS

* internal.h (BIGNUM_EMBED_LEN_SHIFT): BIGNUM_EMBED_LEN_NUMBITS is the
  bit width of embedded bignum length, and BIGNUM_EMBED_LEN_SHIFT is
  the bit offset of it.  These two values happened to equal by chance,
  however they are different things.
------------------------------------------------------------------------
r64903 | nobu | 2018-10-03 13:27:19 +0900 (Wed, 03 Oct 2018) | 1 line

lldb_rp: support more types [ci skip]
------------------------------------------------------------------------
r64902 | nobu | 2018-10-03 13:07:16 +0900 (Wed, 03 Oct 2018) | 4 lines

lldb_rp: fix the order of results [ci skip]

The outputs from HandleCommand are printed immediately before print
statements.  Fix the order in `result` by capturing the outputs.
------------------------------------------------------------------------
r64901 | nobu | 2018-10-03 04:14:24 +0900 (Wed, 03 Oct 2018) | 4 lines

lldb_rp: reload debug info if not loaded yet [ci skip]

As debug infos in shared libraries are not accessible until loaded,
retry loading the infos when needed.
------------------------------------------------------------------------
r64900 | nobu | 2018-10-03 03:51:21 +0900 (Wed, 03 Oct 2018) | 3 lines

Just a shebang is valid code

[ruby-core:89240] [Bug #15190]
------------------------------------------------------------------------
r64899 | nobu | 2018-10-03 03:03:43 +0900 (Wed, 03 Oct 2018) | 3 lines

Get rid of calling to_f in rat2dbl_without_to_f

[Bug #15189]
------------------------------------------------------------------------
r64898 | svn | 2018-10-03 01:42:29 +0900 (Wed, 03 Oct 2018) | 1 line

* 2018-10-03
------------------------------------------------------------------------
r64897 | nobu | 2018-10-03 01:42:21 +0900 (Wed, 03 Oct 2018) | 3 lines

Fix Rational of Float

[ruby-core:89239] [Bug #15189]
------------------------------------------------------------------------
r64896 | svn | 2018-10-02 10:56:44 +0900 (Tue, 02 Oct 2018) | 1 line

* 2018-10-02
------------------------------------------------------------------------
r64895 | nobu | 2018-10-02 10:56:43 +0900 (Tue, 02 Oct 2018) | 1 line

Install HTML docs if produced
------------------------------------------------------------------------
r64894 | nobu | 2018-10-01 23:48:54 +0900 (Mon, 01 Oct 2018) | 1 line

lldb_cruby.py: T_DATA support [ci skip]
------------------------------------------------------------------------
r64892 | nobu | 2018-10-01 16:50:08 +0900 (Mon, 01 Oct 2018) | 3 lines

Removed Windows version condition

Seems all MSVC runtimes fails with EINVAL, regardless Windows version.
------------------------------------------------------------------------
r64891 | svn | 2018-10-01 15:22:27 +0900 (Mon, 01 Oct 2018) | 1 line

* 2018-10-01
------------------------------------------------------------------------
r64890 | ko1 | 2018-10-01 15:22:20 +0900 (Mon, 01 Oct 2018) | 5 lines

remove old VM profile counters.

* vm_insnhelper.c: remove `vm_profile_counter` because
  it is replaced with debug_counters.

------------------------------------------------------------------------
r64889 | svn | 2018-09-30 11:22:01 +0900 (Sun, 30 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64888 | k0kubun | 2018-09-30 11:22:00 +0900 (Sun, 30 Sep 2018) | 6 lines

mjit_compile.c: improve assertion message

intentionally inserting tab to this line to test svn bot.

Also expanding the all tabs in this file, since this file does not exist
in old versions and so there's no risk of conflict on backport.
------------------------------------------------------------------------
r64887 | naruse | 2018-09-30 02:49:33 +0900 (Sun, 30 Sep 2018) | 1 line

no-op if it is T_STRING
------------------------------------------------------------------------
r64886 | svn | 2018-09-30 02:49:07 +0900 (Sun, 30 Sep 2018) | 1 line

* 2018-09-30
------------------------------------------------------------------------
r64885 | svn | 2018-09-30 02:49:06 +0900 (Sun, 30 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64884 | naruse | 2018-09-30 02:49:03 +0900 (Sun, 30 Sep 2018) | 1 line

Remove unnecessary use of function pointer
------------------------------------------------------------------------
r64883 | k0kubun | 2018-09-29 16:21:30 +0900 (Sat, 29 Sep 2018) | 4 lines

common.mk: upgrade benchmark_driver

since maybe r64870 implicitly depends on
https://github.com/benchmark-driver/benchmark-driver/pull/47 too.
------------------------------------------------------------------------
r64882 | nobu | 2018-09-29 16:04:29 +0900 (Sat, 29 Sep 2018) | 4 lines

Expand gemspec path to the real path

`make install` has loaded forwardable.rb twice, from
forwardable.gemspec and prime.gemspec.
------------------------------------------------------------------------
r64881 | svn | 2018-09-29 15:47:34 +0900 (Sat, 29 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64880 | shirosaki | 2018-09-29 15:47:32 +0900 (Sat, 29 Sep 2018) | 4 lines

Revert search_convpath spec

Remove .name since SEGV on MinGW is fixed.
[ruby-core:89200]
------------------------------------------------------------------------
r64879 | shirosaki | 2018-09-29 15:47:30 +0900 (Sat, 29 Sep 2018) | 5 lines

transcode.c: add GC guard on raise

* transcode.c (econv_s_search_convpath): add GC guard to fix SEGV
  on raise.
  [Bug #15162] [ruby-core:89172]
------------------------------------------------------------------------
r64878 | svn | 2018-09-29 09:45:44 +0900 (Sat, 29 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64877 | nobu | 2018-09-29 09:45:41 +0900 (Sat, 29 Sep 2018) | 4 lines

rational.c: may be float

* rational.c (f_muldiv): Integer#** can return Rational with Float
  right now.  [ruby-core:89212] [Bug #15175]
------------------------------------------------------------------------
r64876 | svn | 2018-09-29 09:43:32 +0900 (Sat, 29 Sep 2018) | 1 line

* 2018-09-29
------------------------------------------------------------------------
r64875 | nobu | 2018-09-29 09:43:29 +0900 (Sat, 29 Sep 2018) | 1 line

Split assertion expressions
------------------------------------------------------------------------
r64874 | nobu | 2018-09-28 18:23:35 +0900 (Fri, 28 Sep 2018) | 1 line

Adjust indent [ci skip]
------------------------------------------------------------------------
r64873 | kazu | 2018-09-28 15:25:24 +0900 (Fri, 28 Sep 2018) | 1 line

Add Range#% to call-seq [ci skip]
------------------------------------------------------------------------
r64872 | ko1 | 2018-09-28 14:28:12 +0900 (Fri, 28 Sep 2018) | 5 lines

don't use GC::Profiler on default.

* benchmark/gc/gcbench.rb: disable GC::Profiler on default.
  add -p option instead.

------------------------------------------------------------------------
r64871 | ko1 | 2018-09-28 12:35:15 +0900 (Fri, 28 Sep 2018) | 10 lines

add debug counters more.

* debug_counter.h: add debug counters to count frame state transitions:
  * frame_R2R: Ruby frame to Ruby frame
  * frame_R2C: Ruby frame to C frame
  * frame_C2C: C frame to C frame
  * frame_C2R: C frame to Ruby frame

* vm_insnhelper.c (vm_push_frame): ditto.

------------------------------------------------------------------------
r64870 | ko1 | 2018-09-28 12:32:49 +0900 (Fri, 28 Sep 2018) | 7 lines

add small utility for benchmarking.

* benchmark/lib/load.rb: add small utility which requires
  benchmark-driver.rb. You can load this file and can
  use benchmark-driver.


------------------------------------------------------------------------
r64869 | mrkn | 2018-09-28 11:18:58 +0900 (Fri, 28 Sep 2018) | 3 lines

range.c: Add Range#%

[Feature #14697] [ruby-core:86588]
------------------------------------------------------------------------
r64868 | svn | 2018-09-28 10:10:53 +0900 (Fri, 28 Sep 2018) | 1 line

* 2018-09-28
------------------------------------------------------------------------
r64867 | ko1 | 2018-09-28 10:10:43 +0900 (Fri, 28 Sep 2018) | 14 lines

add debug counters more.

* debug_counter.h: add the following counters.
  * frame_push: control frame counts (total counts).
  * frame_push_*: control frame counts per every frame type.
  * obj_*: add free'ed counts for each type.

* gc.c: ditto.

* vm_insnhelper.c (vm_push_frame): ditto.

* debug_counter.c (rb_debug_counter_show_results): widen counts field
  to show >10G numbers.

------------------------------------------------------------------------
r64866 | nobu | 2018-09-27 19:22:08 +0900 (Thu, 27 Sep 2018) | 1 line

Fix messages for too small year
------------------------------------------------------------------------
r64865 | nobu | 2018-09-27 19:22:07 +0900 (Thu, 27 Sep 2018) | 1 line

Sort in alphabetical order [ci skip]
------------------------------------------------------------------------
r64864 | kazu | 2018-09-27 19:15:05 +0900 (Thu, 27 Sep 2018) | 3 lines

NEWS: Replace tab with spaces

[ci skip]
------------------------------------------------------------------------
r64863 | mrkn | 2018-09-27 18:29:51 +0900 (Thu, 27 Sep 2018) | 3 lines

NEWS: Add ArithmeticSequence related things

[ci skip]
------------------------------------------------------------------------
r64862 | shyouhei | 2018-09-27 13:33:11 +0900 (Thu, 27 Sep 2018) | 4 lines

move GCC version check from marshal.c to configure.ac

I think it should be done in configure

------------------------------------------------------------------------
r64861 | svn | 2018-09-27 02:24:02 +0900 (Thu, 27 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64860 | nobu | 2018-09-27 02:24:00 +0900 (Thu, 27 Sep 2018) | 6 lines

fallback env encoding to ASCII-8BIT

* hash.c (env_enc_str_new): as no locale/filesystem encoding is
  available in miniruby on Windows, fallback the encoding to
  ASCII-8BIT so it is valid encoding when the conversion failed.
  [ruby-core:89177] [Bug #15164]
------------------------------------------------------------------------
r64859 | svn | 2018-09-27 01:51:14 +0900 (Thu, 27 Sep 2018) | 1 line

* 2018-09-27
------------------------------------------------------------------------
r64858 | svn | 2018-09-27 01:51:13 +0900 (Thu, 27 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64857 | ko1 | 2018-09-27 01:51:09 +0900 (Thu, 27 Sep 2018) | 9 lines

fix use-after-free in obj_free.

* gc.c (obj_free): a table can be accessed for debug counters.
  [Bug #15165] [Fix GH-1964]

  A patch from Joe Truba <jtruba@meraki.com>

  Also check USE_DEBUG_COUNTER macro.

------------------------------------------------------------------------
r64856 | suke | 2018-09-26 18:33:46 +0900 (Wed, 26 Sep 2018) | 4 lines

* ext/win32ole/lib/win32ole.rb (methods): COM method elements should be
  symbol in return value of methods.

* test/win32ole/test_win32ole.rb ditto.
------------------------------------------------------------------------
r64855 | eregon | 2018-09-26 18:32:09 +0900 (Wed, 26 Sep 2018) | 4 lines

Use String arguments for #search_convpath

* Otherwise it seems to SEGV on Windows, see
  https://github.com/ruby/ruby/commit/f00bf242724d40d59a242c6bf9e567d18c9e1872#commitcomment-30650955
------------------------------------------------------------------------
r64854 | ko1 | 2018-09-26 17:11:05 +0900 (Wed, 26 Sep 2018) | 9 lines

fix OPT_CALL_THREADED_CODE issue.

* insns.def (opt_send_without_block): reorder insn position because
  `opt_str_freeze` insn refer this insn (function) when
  OPT_CALL_THREADED_CODE is true.

* vm_opts.h (OPT_THREADED_CODE): introduce new macro to select
  threaded code implementation with a compile option (-D...).

------------------------------------------------------------------------
r64853 | ko1 | 2018-09-26 16:28:04 +0900 (Wed, 26 Sep 2018) | 7 lines

add some debug counters.

* debug_counter.h: new debug counters obj_promote, obj_wb_unprotect
  and obj_struct_(ptr|embed) are added.

* gc.c: ditto.

------------------------------------------------------------------------
r64852 | shyouhei | 2018-09-26 15:16:32 +0900 (Wed, 26 Sep 2018) | 2 lines

use configure-defined macro instead of __GNUC__

------------------------------------------------------------------------
r64851 | svn | 2018-09-26 11:38:51 +0900 (Wed, 26 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64850 | k0kubun | 2018-09-26 11:38:45 +0900 (Wed, 26 Sep 2018) | 3 lines

revert r64847, r64846 and r64839

because r64849 seems to fix issues which we were confused about.
------------------------------------------------------------------------
r64849 | ko1 | 2018-09-26 11:23:21 +0900 (Wed, 26 Sep 2018) | 5 lines

fix "initialize miss".

* dir.c (glob_helper): initialize `args.pathtype`.
  missed at r64810.

------------------------------------------------------------------------
r64848 | shyouhei | 2018-09-26 11:02:09 +0900 (Wed, 26 Sep 2018) | 2 lines

yet another -Wparentheses tweak

------------------------------------------------------------------------
r64847 | svn | 2018-09-26 10:11:26 +0900 (Wed, 26 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64846 | k0kubun | 2018-09-26 10:11:20 +0900 (Wed, 26 Sep 2018) | 3 lines

revert r64838 and r64839

because some build failures persisted
------------------------------------------------------------------------
r64845 | nobu | 2018-09-26 08:31:22 +0900 (Wed, 26 Sep 2018) | 7 lines

Expand spec files to realpaths

* spec/mspec/lib/mspec/utils/script.rb (MSpecScript#entries): expand
  the given spec path to the realpath, not to require a library by
  realpath and symbolic link path from the spec file.

  reapply r64749 and r64751 overridden by r64830.
------------------------------------------------------------------------
r64844 | svn | 2018-09-26 03:47:18 +0900 (Wed, 26 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64843 | eregon | 2018-09-26 03:47:17 +0900 (Wed, 26 Sep 2018) | 1 line

Update to ruby/mspec@2bca8cb
------------------------------------------------------------------------
r64842 | svn | 2018-09-26 03:13:35 +0900 (Wed, 26 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64841 | ko1 | 2018-09-26 03:13:29 +0900 (Wed, 26 Sep 2018) | 25 lines

refactoring debug_counter.

* debug_counter.h: add comments for each counters.

* debug_counter.h: add some counters (see added comments for details).
  * obj_newobj
  * obj_newobj_slowpath
  * obj_newobj_wb_unprotected
  * obj_hash_empty
  * obj_hash_under4
  * obj_hash_ge4
  * obj_hash_ge8
  * heap_xmalloc
  * heap_xrealloc
  * heap_xfree

* gc.c: add some debug counters (see the above list).

* debug_counter.c (rb_debug_counter_show_results): accept
  a header message.

* signal.c (ruby_default_signal): show debug counter results
  and malloc info (rb_malloc_info_show_results()) before
  SIGNAL exit.

------------------------------------------------------------------------
r64840 | k0kubun | 2018-09-26 02:26:34 +0900 (Wed, 26 Sep 2018) | 8 lines

appveyor.yml: increase timeout for vs

because `TestThreadQueue#test_queue_with_trap` is too unstable
especially on vs140.
https://ci.appveyor.com/project/ruby/ruby/build/9731/job/sevjm9lrmssg4dub

Increasing timeout may not fix the issue, but let me test this first to
check if it's true or not.
------------------------------------------------------------------------
r64839 | k0kubun | 2018-09-26 02:20:02 +0900 (Wed, 26 Sep 2018) | 34 lines

insns.def: drop bitblt insn

as a workaround to fix the build pipeline broken by r64824,
because optimizing Ruby should be prioritized higher than supporting unused jokes.

In the current build system, exceeding 200 insns somehow crashes C
extension build on some of MinGW environments like "mingw32-make[1]:
*** No rule to make target 'note'.  Stop."
https://ci.appveyor.com/project/ruby/ruby/build/9725/job/co4nu9jugm8qwdrp
and on some of Linux environments like "cannot load such file -- stringio (LoadError)"

```
build_install        /home/ko1/ruby/src/trunk_gcc5/lib/rubygems/specification.rb:18:in `require': cannot load such file -- stringio (LoadError)
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems/specification.rb:18:in `<top (required)>'
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems.rb:1365:in `require'
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems.rb:1365:in `<module:Gem>'
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems.rb:116:in `<top (required)>'
	from /home/ko1/ruby/src/trunk_gcc5/tool/rbinstall.rb:24:in `require'
	from /home/ko1/ruby/src/trunk_gcc5/tool/rbinstall.rb:24:in `<main>'
make: *** [do-install-nodoc] Error 1
```

http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1353447

This commit removes "bitblt" and "trace_bitblt" insns, which reduces the
number of insns from 202 to 200 and fixes at least the latter build
failure. I hope this fixes the MinGW build failure as well. Let me
confirm the situation on AppVeyor CI.

Note that this is hard to fix because some MinGW environments (MSP-Greg's
MinGW CI on AppVeyor) don't reproduce this and some Linux environments
(including my local machine) don't reproduce it either. Make sure you
have the reproductive environment and confirm it's fixed when reverting
this commit.
------------------------------------------------------------------------
r64838 | k0kubun | 2018-09-26 02:19:51 +0900 (Wed, 26 Sep 2018) | 4 lines

Revert "Revert r64824 to fix build failure on AppVeyor"

This reverts commit r64829. I'll prepare another temporary fix, but I'll
separately commit that to make it easier to revert that later.
------------------------------------------------------------------------
r64837 | svn | 2018-09-26 00:31:03 +0900 (Wed, 26 Sep 2018) | 1 line

* 2018-09-26
------------------------------------------------------------------------
r64836 | shirosaki | 2018-09-26 00:31:02 +0900 (Wed, 26 Sep 2018) | 5 lines

dir.c: fix glob with recursive and brace

Fixed bug that glob with recursive and braces (**/{a,b}) pattern
fails.
[Feature #13167]
------------------------------------------------------------------------
r64835 | shirosaki | 2018-09-26 00:31:01 +0900 (Wed, 26 Sep 2018) | 4 lines

dir.c: fix memory leak of glob with braces

join_path uses malloc. So free is required.
[Feature #13167]
------------------------------------------------------------------------
r64834 | svn | 2018-09-25 22:42:05 +0900 (Tue, 25 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64833 | nobu | 2018-09-25 22:42:02 +0900 (Tue, 25 Sep 2018) | 1 line

Moved `struct vtm` stuff from internal.h to timev.h
------------------------------------------------------------------------
r64832 | svn | 2018-09-25 19:41:19 +0900 (Tue, 25 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64831 | eregon | 2018-09-25 19:41:16 +0900 (Tue, 25 Sep 2018) | 1 line

Update to ruby/spec@241f9e7
------------------------------------------------------------------------
r64830 | eregon | 2018-09-25 19:40:39 +0900 (Tue, 25 Sep 2018) | 1 line

Update to ruby/mspec@3fb5112
------------------------------------------------------------------------
r64829 | k0kubun | 2018-09-25 13:03:35 +0900 (Tue, 25 Sep 2018) | 6 lines

Revert r64824 to fix build failure on AppVeyor

AppVeyor msys2/MinGW build started to fail like:
https://ci.appveyor.com/project/ruby/ruby/build/9722/job/b94kixi004klmye3

Until I can investigate that, I revert this for now.
------------------------------------------------------------------------
r64828 | svn | 2018-09-25 08:23:16 +0900 (Tue, 25 Sep 2018) | 1 line

* 2018-09-25
------------------------------------------------------------------------
r64827 | nobu | 2018-09-25 08:23:14 +0900 (Tue, 25 Sep 2018) | 5 lines

test/unit.rb: fix --subprocess-timeout-scale

* test/lib/test/unit.rb (Test::Unit::SubprocessOption#non_options):
  set timeout scale after parsing options.  the option value will be
  set after returning from setup_options.
------------------------------------------------------------------------
r64826 | nobu | 2018-09-24 23:26:00 +0900 (Mon, 24 Sep 2018) | 1 line

Check whether to skip every frame
------------------------------------------------------------------------
r64825 | nobu | 2018-09-24 22:04:40 +0900 (Mon, 24 Sep 2018) | 1 line

Kernel#warn accepts multiple messages
------------------------------------------------------------------------
r64824 | k0kubun | 2018-09-24 21:40:28 +0900 (Mon, 24 Sep 2018) | 45 lines

insns.def: optimize & and | of Integer [experimental]

not optimizing Array#& and Array#| because vm_insnhelper.c can't easily
inline it (large amount of array.c code would be needed in vm_insnhelper.c)
and the method body is a little complicated compared to Integer's ones.
So I thought only Integer#& and Integer#| have a significant impact,
and eliminating unnecessary branches would contribute to JIT's performance.

vm_insnhelper.c: ditto

tool/transform_mjit_header.rb: make sure these instructions are inlined
on JIT.

compile.c: compile vm_opt_and and vm_opt_or.
id.def: define id for them to be used in compile.c and vm*.c
vm.c: track redefinition of Integer#& and Integer#|
vm_core.h: allow detecting redefinition of & and |

test/ruby/test_jit.rb: test new insns
test/ruby/test_optimization.rb: ditto

* Optcarrot benchmark

This is a kind of experimental thing but I'm committing this since the
performance impact is significant especially on Optcarrot with JIT.

$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-09-24 trunk 64821) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-09-24 trunk 64821) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-09-24 opt_and 64821) [x86_64-linux]
last_commit=opt_or
after+JIT: ruby 2.6.0dev (2018-09-24 opt_and 64821) +JIT [x86_64-linux]
last_commit=opt_or
Calculating -------------------------------------
                             before  before+JIT       after   after+JIT
Optcarrot Lan_Master.nes     51.460      66.315      53.023      71.173 fps

Comparison:
             Optcarrot Lan_Master.nes
               after+JIT:        71.2 fps
              before+JIT:        66.3 fps - 1.07x  slower
                   after:        53.0 fps - 1.34x  slower
                  before:        51.5 fps - 1.38x  slower

[close https://github.com/ruby/ruby/pull/1963]
------------------------------------------------------------------------
r64823 | normal | 2018-09-24 16:48:33 +0900 (Mon, 24 Sep 2018) | 5 lines

webrick: raise EOFError in parse when read line is nil

[Bug #15146]

From: Justin Li <git@justinli.net>
------------------------------------------------------------------------
r64822 | nobu | 2018-09-24 16:46:07 +0900 (Mon, 24 Sep 2018) | 1 line

revert r64817: kernel_warn.rb: skip kernel_require.rb
------------------------------------------------------------------------
r64821 | k0kubun | 2018-09-24 15:21:19 +0900 (Mon, 24 Sep 2018) | 3 lines

_mjit_compile_send.erb: remove TODO comment solved [ci skip]

which was solved by r64820
------------------------------------------------------------------------
r64820 | k0kubun | 2018-09-24 15:09:55 +0900 (Mon, 24 Sep 2018) | 10 lines

_mjit_compile_send.erb: refactor code to setup iseq

by sharing vm_call_iseq_setup_normal. This is a retry of r64280.

vm_insnhelper.c: Remove unused argument `ci` and pass `me` instead of
`cc` to share this with JIT. Declare this with ALWAYS_INLINE to make
sure this function is inlined in JIT.

tool/mk_call_iseq_optimized.rb: deal with the interface change of
vm_call_iseq_setup_normal.
------------------------------------------------------------------------
r64819 | svn | 2018-09-24 12:14:46 +0900 (Mon, 24 Sep 2018) | 1 line

* 2018-09-24
------------------------------------------------------------------------
r64818 | svn | 2018-09-24 12:14:46 +0900 (Mon, 24 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64817 | nobu | 2018-09-24 12:14:43 +0900 (Mon, 24 Sep 2018) | 4 lines

kernel_warn.rb: skip kernel_require.rb

* lib/rubygems/core_ext/kernel_warn.rb (Kernel#warn): skip
  kernel_require.rb's frames when `uplevel` option is given.
------------------------------------------------------------------------
r64816 | nobu | 2018-09-23 21:40:46 +0900 (Sun, 23 Sep 2018) | 4 lines

test_win32api.rb: suppress a warning

* test/test_win32api.rb: suppress a warning, which we know already
  well.
------------------------------------------------------------------------
r64815 | nobu | 2018-09-23 08:52:58 +0900 (Sun, 23 Sep 2018) | 4 lines

Skip a cleanup if new_ole failed

On Appveyor, WIN32OLE sometimes fails due to a system shutdown, and
`@ie` is not assigned.
------------------------------------------------------------------------
r64814 | nobu | 2018-09-23 05:39:35 +0900 (Sun, 23 Sep 2018) | 1 line

tool/enc-unicode.rb: rewrote without flip-flop
------------------------------------------------------------------------
r64813 | svn | 2018-09-23 05:13:09 +0900 (Sun, 23 Sep 2018) | 1 line

* 2018-09-23
------------------------------------------------------------------------
r64812 | nobu | 2018-09-23 05:13:08 +0900 (Sun, 23 Sep 2018) | 3 lines

Fix for old names of mcontext registers

c.f. https://github.com/mistydemeo/tigerbrew/issues/473
------------------------------------------------------------------------
r64811 | svn | 2018-09-22 10:11:41 +0900 (Sat, 22 Sep 2018) | 1 line

* 2018-09-22
------------------------------------------------------------------------
r64810 | shirosaki | 2018-09-22 10:11:40 +0900 (Sat, 22 Sep 2018) | 8 lines

dir.c: performance fix with braces

Braces were expended before ruby_glob0(). This caused to call
replace_real_basename() for same plain patterns repeatedly.
Move blace expansion into glob_helper() in ruby_glob0() to reduce
replace_real_basename() call.
This fix changes the order of glob results.
[Feature #13167] [Fix GH-1864]
------------------------------------------------------------------------
r64809 | nobu | 2018-09-21 22:52:03 +0900 (Fri, 21 Sep 2018) | 1 line

configure.ac: prepend the wrapper after CPP is set
------------------------------------------------------------------------
r64808 | nobu | 2018-09-21 19:31:11 +0900 (Fri, 21 Sep 2018) | 3 lines

Suppress more -Wparentheses warnings

[Fix GH-1958]
------------------------------------------------------------------------
r64807 | svn | 2018-09-21 19:19:14 +0900 (Fri, 21 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64806 | nobu | 2018-09-21 19:19:10 +0900 (Fri, 21 Sep 2018) | 5 lines

Remove -Wno-parentheses flag.

[Fix GH-1958]

From: Jun Aruga <jaruga@redhat.com>
------------------------------------------------------------------------
r64805 | kazu | 2018-09-21 17:53:11 +0900 (Fri, 21 Sep 2018) | 1 line

Fix sample code [ci skip]
------------------------------------------------------------------------
r64804 | kazu | 2018-09-21 17:34:25 +0900 (Fri, 21 Sep 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64803 | svn | 2018-09-21 16:19:14 +0900 (Fri, 21 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64802 | nobu | 2018-09-21 16:19:13 +0900 (Fri, 21 Sep 2018) | 6 lines

darwin-cc: hide ld warnings

* tool/darwin-cc: ld in Apple's recent Xcode warns text-based stub
  files, which are probably caused by Apple's broken package.
  hide such (and architecture deprecation) warnings during
  configuration to pass TRY_LDFLAGS.
------------------------------------------------------------------------
r64801 | svn | 2018-09-21 15:41:09 +0900 (Fri, 21 Sep 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64800 | ko1 | 2018-09-21 15:41:07 +0900 (Fri, 21 Sep 2018) | 15 lines

escape all env properly.

* vm_backtrace.c (rb_debug_inspector_open): escape all env using
  `rb_vm_stack_to_heap()` before making bindings.
  [Bug #15105]

  There is a complicated story of this issue:
  Without this patch, IFUNC frame does not escaped. A IFUNC frame
  points to CFUNC ep as previous ep. However, CFUNC ep can be escaped
  because of making bindings of Ruby level frames.
  IFUNC's ep can points to invalidated ep and `rb_iter_break()` will
  fail. This is why `any?` fails.

* test/-ext-/debug/test_debug.rb: add a test.

------------------------------------------------------------------------
r64799 | ko1 | 2018-09-21 15:30:54 +0900 (Fri, 21 Sep 2018) | 5 lines

fix typo.

* vm_exec.h (DEBUG_END_INSN()): use `ec` instead of `th`.
  This macro is used when `VMDEBUG > 0`.

------------------------------------------------------------------------
r64798 | kazu | 2018-09-21 11:14:33 +0900 (Fri, 21 Sep 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64797 | svn | 2018-09-21 03:24:17 +0900 (Fri, 21 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64796 | marcandre | 2018-09-21 03:24:16 +0900 (Fri, 21 Sep 2018) | 3 lines

Matrix: Add #reflexive? method. [Fix GH-1730]

Adapted from a patch by Yilo
------------------------------------------------------------------------
r64795 | svn | 2018-09-21 00:06:57 +0900 (Fri, 21 Sep 2018) | 1 line

* 2018-09-21
------------------------------------------------------------------------
r64794 | nobu | 2018-09-21 00:06:56 +0900 (Fri, 21 Sep 2018) | 3 lines

Enumerable#to_h with block and so on

[Feature #15143]
------------------------------------------------------------------------
r64793 | nobu | 2018-09-20 23:30:21 +0900 (Thu, 20 Sep 2018) | 1 line

Ignore Xcode linker warnings
------------------------------------------------------------------------
r64792 | mame | 2018-09-20 16:36:10 +0900 (Thu, 20 Sep 2018) | 1 line

* compile.c (compile_case): emit opt_case_dispatch only on optimized mode
------------------------------------------------------------------------
r64791 | shyouhei | 2018-09-20 14:31:51 +0900 (Thu, 20 Sep 2018) | 5 lines

fix typo [ci skip]

This error does not happen right now so this typo is
not serious, unless you locally edit insns.def.

------------------------------------------------------------------------
r64790 | nobu | 2018-09-20 12:18:54 +0900 (Thu, 20 Sep 2018) | 8 lines

Introduce rb_ary_union_hash method in Array

Avoid repeating code and improve readability in `rb_ary_or` and
`rb_ary_union_multi`. Similaty as done with `rb_ary_union`.

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64789 | nobu | 2018-09-20 12:18:54 +0900 (Thu, 20 Sep 2018) | 8 lines

Link Array#union from | method

`Array#uniq` is not really related with `Array#|`, so I replaced it by
`Array#union`.

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64788 | nobu | 2018-09-20 12:18:53 +0900 (Thu, 20 Sep 2018) | 8 lines

Introduce rb_ary_union method in Array

Avoid repeating code and improve readability in `rb_ary_or` and
`rb_ary_union_multi`.

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64787 | nobu | 2018-09-20 12:18:52 +0900 (Thu, 20 Sep 2018) | 15 lines

Add union method to Array

I introduce a `union` method equivalent to the `|` operator, but which
accept more than array as argument. This improved readability, and it
is also coherent with the `+` operator, which has a similar `concat`
method. The method doesn't modify the original object and return a new
object instead. It is plan to introduce a `union!` method as well.

Tests and documentation are included.

It solves partially https://bugs.ruby-lang.org/issues/14097

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64786 | nobu | 2018-09-20 10:43:35 +0900 (Thu, 20 Sep 2018) | 5 lines

parse.y: fix block passing with empty kwargs

* parse.y (arg_blk_pass): preceeding arguments node may be NULL when
  an empty keyword argument hash splat is optimized away.
  [ruby-core:88890] [Bug #15087]
------------------------------------------------------------------------
r64785 | svn | 2018-09-20 02:12:05 +0900 (Thu, 20 Sep 2018) | 1 line

* 2018-09-20
------------------------------------------------------------------------
r64784 | marcandre | 2018-09-20 02:12:04 +0900 (Thu, 20 Sep 2018) | 3 lines

net/http: Improve net/http header error message.

Patch by Matt Larraz. [Fix GH-1849].
------------------------------------------------------------------------
r64783 | kazu | 2018-09-19 21:39:44 +0900 (Wed, 19 Sep 2018) | 4 lines

ruby_2_2 branch has ended

https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/
[ci skip]
------------------------------------------------------------------------
r64782 | normal | 2018-09-19 17:23:19 +0900 (Wed, 19 Sep 2018) | 6 lines

process.c (waitpid_cleanup): unconditionally remove from waiters

This is the safer option, as there seems to be cases where checking
waitpid_state.ret is insufficient in ensure.  I'm not 100% sure
why this is, but this change was required for my work-in-progress
Thread::Light patch series, too...
------------------------------------------------------------------------
r64781 | mame | 2018-09-19 11:10:58 +0900 (Wed, 19 Sep 2018) | 1 line

* hash.c (rb_hash_update): fix indent
------------------------------------------------------------------------
r64780 | marcandre | 2018-09-19 11:10:05 +0900 (Wed, 19 Sep 2018) | 1 line

[DOC] Add changes to Hash#merge in NEWS [#15111]
------------------------------------------------------------------------
r64779 | mame | 2018-09-19 11:07:33 +0900 (Wed, 19 Sep 2018) | 3 lines

* hash.c (rb_hash_update): remove a meticulous explanation

As per Marc-Andre's comment.  [Refs GH-1951]
------------------------------------------------------------------------
r64778 | svn | 2018-09-19 10:59:27 +0900 (Wed, 19 Sep 2018) | 1 line

* 2018-09-19
------------------------------------------------------------------------
r64777 | mame | 2018-09-19 10:59:26 +0900 (Wed, 19 Sep 2018) | 9 lines

* hash.c (rb_hash_merge): Accepts zero or more hashes as arguments

Hash#merge, merge!, and update could merge exactly two hashes.
Now, they accepts zero or more hashes as arguments so that it can merge
hashes more than two.

This patch was created by Koki Ryu <liukoki@gmail.com> at Ruby Hack
Challenge #5.  Thank you!
[ruby-core:88970] [Feature #15111] [Fix GH-1951]
------------------------------------------------------------------------
r64776 | svn | 2018-09-18 22:52:08 +0900 (Tue, 18 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64775 | k0kubun | 2018-09-18 22:52:06 +0900 (Tue, 18 Sep 2018) | 4 lines

vm_insnhelper.c: always use bool-ish value

for CC_SET_FASTPATH condition. Just a cosmetic change to unify the
styling with other lines.
------------------------------------------------------------------------
r64774 | nobu | 2018-09-18 21:55:05 +0900 (Tue, 18 Sep 2018) | 1 line

Skip EHOSTUNREACH by host issues
------------------------------------------------------------------------
r64773 | svn | 2018-09-18 21:48:31 +0900 (Tue, 18 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64772 | k0kubun | 2018-09-18 21:48:28 +0900 (Tue, 18 Sep 2018) | 7 lines

vm_insnhelper.h: rename CI_SET_FASTPATH to CC_SET_FASTPATH

because it's actually setting fastpath to cc instead of ci since r51903.

vm_insnhelper.c: ditto
mjit_compile.c: ditto
tool/ruby_vm/views/_mjit_compile_send.erb: ditto
------------------------------------------------------------------------
r64771 | nobu | 2018-09-18 18:15:46 +0900 (Tue, 18 Sep 2018) | 4 lines

pty.c: typo

* ext/pty/pty.c (chfunc): fix a typo of an operator.  pointed out by
  jaruga (Jun Aruga) at [ruby-core:89058].  [Bug #15116]
------------------------------------------------------------------------
r64770 | nobu | 2018-09-18 17:49:40 +0900 (Tue, 18 Sep 2018) | 5 lines

Lazy Enumerator reduce intermediate array creation

[ruby-core:87907] [Bug #14908] [Fix GH-1912]

From: Anmol Chopra <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64769 | hsbt | 2018-09-18 17:37:18 +0900 (Tue, 18 Sep 2018) | 5 lines

Merge upstream revision of rubygems/rubygems.

  This commits includes tiny bugfix and new features listed here:
    * Add --re-sign flag to cert command by bronzdoc: https://github.com/rubygems/rubygems/pull/2391
    * Download gems with threads. by indirect: https://github.com/rubygems/rubygems/pull/1898
------------------------------------------------------------------------
r64768 | nobu | 2018-09-18 17:30:24 +0900 (Tue, 18 Sep 2018) | 1 line

Tests of Enumerator::Yielder#yield with multiple arguments
------------------------------------------------------------------------
r64767 | svn | 2018-09-18 09:22:06 +0900 (Tue, 18 Sep 2018) | 1 line

* 2018-09-18
------------------------------------------------------------------------
r64766 | nobu | 2018-09-18 09:22:04 +0900 (Tue, 18 Sep 2018) | 4 lines

pty.c: more difensive

* ext/pty/pty.c (chfunc): should not close the slave fd if it is 0..2.
  [ruby-core:89043] [Bug #15116]
------------------------------------------------------------------------
r64765 | svn | 2018-09-17 10:31:08 +0900 (Mon, 17 Sep 2018) | 1 line

* 2018-09-17
------------------------------------------------------------------------
r64764 | k0kubun | 2018-09-17 10:31:06 +0900 (Mon, 17 Sep 2018) | 5 lines

common.mk: ruby tool/update-deps --fix

tool/update-deps: tweak the comment to make sure it should be built in
the source directory, because building ruby outside source directory
failed on my trial.
------------------------------------------------------------------------
r64763 | nobu | 2018-09-16 23:32:30 +0900 (Sun, 16 Sep 2018) | 1 line

Propagate subprocess timeout scale option to worker processes
------------------------------------------------------------------------
r64762 | k0kubun | 2018-09-16 22:22:00 +0900 (Sun, 16 Sep 2018) | 9 lines

addr2line.c: fix -Wmaybe-uninitialized

../addr2line.c: In function 'fill_lines':
../addr2line.c:709:8: warning: 'file' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (file != NULL) {
        ^
../addr2line.c:535:11: warning: 'filesize' may be used uninitialized in this function [-Wmaybe-uninitialized]
     off_t filesize;
           ^~~~~~~~
------------------------------------------------------------------------
r64761 | marcandre | 2018-09-16 13:18:50 +0900 (Sun, 16 Sep 2018) | 4 lines

lib/matrix: Fix potential bug of Vector#angle_with

Could happen for some linearly dependent vectors.
Patch by Vasiliy Petrov. [Fix GH-1803]
------------------------------------------------------------------------
r64760 | svn | 2018-09-16 13:00:16 +0900 (Sun, 16 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64759 | marcandre | 2018-09-16 13:00:14 +0900 (Sun, 16 Sep 2018) | 3 lines

Alias Struct#select as Struct#filter. Patch by Kenichi Kamiya.

[Fix GH-#1862] [#1784]
------------------------------------------------------------------------
r64758 | marcandre | 2018-09-16 12:24:15 +0900 (Sun, 16 Sep 2018) | 1 line

node.c: Typo fix. Patch by Shuichi Tamayose. [ci skip] [Fix GH-1880]
------------------------------------------------------------------------
r64757 | marcandre | 2018-09-16 11:49:44 +0900 (Sun, 16 Sep 2018) | 3 lines

[DOC] Improve String#strip documentation.

Patch by Josh Goldberg. [Fix GH-1933] [ci skip]
------------------------------------------------------------------------
r64756 | marcandre | 2018-09-16 11:45:16 +0900 (Sun, 16 Sep 2018) | 5 lines

Add some missing documentation to Queue#{close|deq} [ci skip]

Patch by Lars Kanis. [Fix GH-1949]

*  Describe the impact of Queue#close to Queue#deq .
------------------------------------------------------------------------
r64755 | marcandre | 2018-09-16 11:42:26 +0900 (Sun, 16 Sep 2018) | 1 line

array.c: Optimize rb_ary_and. Patch by Stefan Schu{U+00DF}ler. [Fix GH-1938]
------------------------------------------------------------------------
r64754 | svn | 2018-09-16 01:27:07 +0900 (Sun, 16 Sep 2018) | 1 line

* 2018-09-16
------------------------------------------------------------------------
r64753 | nobu | 2018-09-16 01:27:06 +0900 (Sun, 16 Sep 2018) | 4 lines

encoding.c: check external encoding

* encoding.c (rb_enc_get_index): external encoding may not be Data
  object.  [ruby-core:89016] [Bug #15122]
------------------------------------------------------------------------
r64752 | nobu | 2018-09-15 21:45:46 +0900 (Sat, 15 Sep 2018) | 5 lines

Work on Benchmark::Tms documentation [ci skip]

[ruby-core:88874] [Bug #15080]

From: Richard Wardin <shalmezad@gmail.com>
------------------------------------------------------------------------
r64751 | nobu | 2018-09-15 20:45:31 +0900 (Sat, 15 Sep 2018) | 1 line

get rid of newer syntax for old versions
------------------------------------------------------------------------
r64750 | nobu | 2018-09-15 18:59:14 +0900 (Sat, 15 Sep 2018) | 8 lines

Fix issues detected by code analysis tool (mainly Coverity).

* Fix leaked storage in addr2line.c.
* Fix for "top_root" leaking the resource.

[Fix GH-1956]

From: Jun Aruga <jaruga@redhat.com>
------------------------------------------------------------------------
r64749 | nobu | 2018-09-15 18:48:42 +0900 (Sat, 15 Sep 2018) | 5 lines

Expand spec files to realpaths

* spec/mspec/lib/mspec/utils/script.rb (MSpecScript#entries): expand
  the given spec path to the realpath, not to require a library by
  realpath and symbolic link path from the spec file.
------------------------------------------------------------------------
r64748 | nobu | 2018-09-15 18:25:31 +0900 (Sat, 15 Sep 2018) | 1 line

rid of warnings [Fix GH-1953]
------------------------------------------------------------------------
r64747 | nobu | 2018-09-15 17:39:07 +0900 (Sat, 15 Sep 2018) | 1 line

test_sprintf.rb: test for %p
------------------------------------------------------------------------
r64746 | svn | 2018-09-15 11:20:48 +0900 (Sat, 15 Sep 2018) | 1 line

* 2018-09-15
------------------------------------------------------------------------
r64745 | nobu | 2018-09-15 11:20:47 +0900 (Sat, 15 Sep 2018) | 9 lines

Use opt_{aref,aset} over opt_{aref,aset}_with

* compile.c (iseq_compile_each0): Use `opt_aref`/`opt_aset` over
  `opt_aref_with`/`opt_aset_with` when frozen_string_literal: true,
  not to resurrect the index string on non-Hash receiver.

[Fix GH-1957]

From: chopraanmol1 <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64744 | svn | 2018-09-14 22:19:46 +0900 (Fri, 14 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64743 | hsbt | 2018-09-14 22:19:45 +0900 (Fri, 14 Sep 2018) | 5 lines

Partly reverted for ruby-style.el.

  Revert "Removed old elisp files. New upstream repository was moved https://github.com/ruby/elisp."

  This reverts commit 7eedd308b841e7b8eb4bc36211d28faf3521ee92.
------------------------------------------------------------------------
r64742 | hsbt | 2018-09-14 21:37:51 +0900 (Fri, 14 Sep 2018) | 1 line

Added entries for lldb files in misc directory.
------------------------------------------------------------------------
r64741 | hsbt | 2018-09-14 21:34:50 +0900 (Fri, 14 Sep 2018) | 1 line

Removed old elisp files. New upstream repository was moved https://github.com/ruby/elisp.
------------------------------------------------------------------------
r64740 | shyouhei | 2018-09-14 17:27:44 +0900 (Fri, 14 Sep 2018) | 6 lines

PRI_64_PREFIX "u" is called PRIu64

See also ISO9899:1999 section 7.8.1 paragraph 3.

The #ifndef is for C compilers older than C99.

------------------------------------------------------------------------
r64739 | shyouhei | 2018-09-14 16:57:19 +0900 (Fri, 14 Sep 2018) | 2 lines

forgot to expand tabs [ci skip]

------------------------------------------------------------------------
r64738 | svn | 2018-09-14 16:44:45 +0900 (Fri, 14 Sep 2018) | 1 line

* 2018-09-14
------------------------------------------------------------------------
r64737 | shyouhei | 2018-09-14 16:44:44 +0900 (Fri, 14 Sep 2018) | 43 lines

move ADD_PC around (take 2)

Now that we can say for sure if an instruction calls a method or
not internally, it is now possible to reroute the bugs that
forced us to revert the "move PC around" optimization.

First try: r62051
Reverted:  r63763
See also:  r63999

----

trunk: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15]
last_commit=move ADD_PC around (take 2)
Calculating -------------------------------------
                           trunk        ours
         so_ackermann      1.884       2.278 i/s -       1.000 times in 0.530926s 0.438935s
             so_array      1.178       1.157 i/s -       1.000 times in 0.848786s 0.864467s
      so_binary_trees      0.176       0.177 i/s -       1.000 times in 5.683895s 5.657707s
       so_concatenate      0.220       0.221 i/s -       1.000 times in 4.546896s 4.518949s
       so_count_words      6.729       6.470 i/s -       1.000 times in 0.148602s 0.154561s
         so_exception      3.324       3.688 i/s -       1.000 times in 0.300872s 0.271147s
          so_fannkuch      0.546       0.968 i/s -       1.000 times in 1.831328s 1.033376s
             so_fasta      0.541       0.547 i/s -       1.000 times in 1.849923s 1.827091s
      so_k_nucleotide      0.800       0.777 i/s -       1.000 times in 1.250635s 1.286295s
             so_lists      2.101       1.848 i/s -       1.000 times in 0.475954s 0.541095s
        so_mandelbrot      0.435       0.408 i/s -       1.000 times in 2.299328s 2.450535s
            so_matrix      1.946       1.912 i/s -       1.000 times in 0.513872s 0.523076s
    so_meteor_contest      0.311       0.317 i/s -       1.000 times in 3.219297s 3.152052s
             so_nbody      0.746       0.703 i/s -       1.000 times in 1.339815s 1.423441s
       so_nested_loop      0.899       0.901 i/s -       1.000 times in 1.111767s 1.109555s
            so_nsieve      0.559       0.579 i/s -       1.000 times in 1.787763s 1.726552s
       so_nsieve_bits      0.435       0.428 i/s -       1.000 times in 2.296282s 2.333852s
            so_object      1.368       1.442 i/s -       1.000 times in 0.731237s 0.693684s
      so_partial_sums      0.616       0.546 i/s -       1.000 times in 1.623592s 1.833097s
          so_pidigits      0.831       0.832 i/s -       1.000 times in 1.203117s 1.202334s
            so_random      2.934       2.724 i/s -       1.000 times in 0.340791s 0.367150s
so_reverse_complement      0.583       0.866 i/s -       1.000 times in 1.714144s 1.154615s
             so_sieve      1.829       2.081 i/s -       1.000 times in 0.546607s 0.480562s
      so_spectralnorm      0.524       0.558 i/s -       1.000 times in 1.908716s 1.792382s


------------------------------------------------------------------------
r64736 | k0kubun | 2018-09-13 22:59:25 +0900 (Thu, 13 Sep 2018) | 7 lines

iseq.c: prefix rb_ to non-static iseq functions

I assume we always prefix rb_ to non-static functions to avoid conflict.
These functions are not exported and safe to be renamed.

iseq.h: ditto
compile.c: ditto
------------------------------------------------------------------------
r64735 | k0kubun | 2018-09-13 21:29:57 +0900 (Thu, 13 Sep 2018) | 8 lines

vm_insnhelper.h: drop OPT_CALL_FASTPATH macro support

because cc->call is NULL by default and it is not overridden by
vm_search_super_method if OPT_CALL_FASTPATH is 0. So this macro is not
just a switch for optimization but now it's mandatory.

vm_insnhelper.c: cosmetic change. Use boolean-ish `TRUE` instead of 1 to
specify `enabled` flag.
------------------------------------------------------------------------
r64734 | kazu | 2018-09-13 21:06:18 +0900 (Thu, 13 Sep 2018) | 5 lines

Remove old ruby-mode.el

Use emacs bundled ruby-mode.el instead.
[Feature #6823] [ci skip]

------------------------------------------------------------------------
r64733 | nobu | 2018-09-13 20:10:24 +0900 (Thu, 13 Sep 2018) | 5 lines

warn unused blocks with Enumerable#all? any? one? none?

[Fix GH-1953]

From: Koji Onishi <fursich0@gmail.com>
------------------------------------------------------------------------
r64732 | nobu | 2018-09-13 20:00:55 +0900 (Thu, 13 Sep 2018) | 15 lines

Make qsort_r() flavor detecting work if qsort_r() is a macro

On FreeBSD we're going to switch to the GNU-ish version of qsort_r().
POSIX is also considering standardizing that one. To prevent faulty
calls, we have a macro in place to throw a compiler error if a BSD-style
qsort_r() call is performed on a patched system. Such an approach tends
to be permitted by POSIX.

The configure check we have in Ruby would fail if qsort_r() is a
function macro. Add parentheses around it to prevent macro expansion and
force the declaration of a prototype.

[Fix GH-1954]

From: Ed Schouten <ed@nuxi.nl>
------------------------------------------------------------------------
r64731 | nobu | 2018-09-13 19:59:12 +0900 (Thu, 13 Sep 2018) | 1 line

thread.c: fix -Wformat warning where uint64_t is not unsigned long
------------------------------------------------------------------------
r64730 | k0kubun | 2018-09-13 16:12:07 +0900 (Thu, 13 Sep 2018) | 4 lines

Revert "vm_insnhelper.h: simplify EXEC_EC_CFP implementation"

This reverts commit r64711, because EXEC_EC_CFP on JIT-ed code does not
call jit_func with the patch when catch_except_p is true. It wasn't intentional.
------------------------------------------------------------------------
r64712 | k0kubun | 2018-09-13 15:49:49 +0900 (Thu, 13 Sep 2018) | 10 lines

thread.c: fix -Wformat warning

../thread.c:1219:18: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
      (aka 'unsigned long long') [-Wformat]
                 end, now);
                 ^~~
../thread.c:1219:23: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
      (aka 'unsigned long long') [-Wformat]
                 end, now);
                      ^~~
------------------------------------------------------------------------
r64711 | k0kubun | 2018-09-13 15:39:40 +0900 (Thu, 13 Sep 2018) | 31 lines

vm_insnhelper.h: simplify EXEC_EC_CFP implementation

and possibly memory access for iseq->body may be reduced.

No significant impact for performance on Optcarrot.

* before
fps: 55.03865935187656
fps: 57.16854675983188
fps: 57.672458407661765
fps: 58.28989837869383
fps: 58.80503815099268
fps: 59.068054176528534
fps: 59.55736806358244
fps: 61.01018920533034
fps: 63.34167049232186
fps: 65.20575018321766
fps: 65.46758316561318

* after
fps: 55.21860411005677
fps: 55.34840351179166
fps: 58.23666596747484
fps: 59.71987124578901
fps: 61.131485120234935
fps: 61.279905164649485
fps: 61.66060774175459
fps: 64.11215576508765
fps: 64.63699742853154
fps: 65.28260058920769
fps: 65.85447796482678
------------------------------------------------------------------------
r64710 | nobu | 2018-09-13 13:53:52 +0900 (Thu, 13 Sep 2018) | 4 lines

node.h: removed unused macros

* node.h (enum node_type): removed unused macros which redefine the
  same name enum values, and probably had ended the historical role.
------------------------------------------------------------------------
r64709 | shyouhei | 2018-09-13 12:46:46 +0900 (Thu, 13 Sep 2018) | 5 lines

move canary-related statements into macros

This is mostly cosmetic.  Should generate a slightly readable
vm.inc output.

------------------------------------------------------------------------
r64708 | k0kubun | 2018-09-13 10:45:38 +0900 (Thu, 13 Sep 2018) | 5 lines

appveyor.yml: increase timeout for vs

vs140 tends to die with 10s timeout on TestThreadQueue#test_queue_with_trap
https://ci.appveyor.com/project/ruby/ruby/build/9610/job/di9durc5rv0dwhor
https://ci.appveyor.com/project/ruby/ruby/build/9598/job/t7wugyn1sm57lbw3
------------------------------------------------------------------------
r64707 | normal | 2018-09-13 10:43:03 +0900 (Thu, 13 Sep 2018) | 9 lines

thread.c (rb_thread_atfork): reinitialize current th->interrupt_lock

Another thread may be holding th->interrupt_lock while our
current thread calls fork.  Therefore we must reinitialize our
own th->interrupt_lock in the child process because the owner
of the lock is only in the parent.  The original parent process
is unaffected.  We cannot destroy the lock while it has an unknown
state, either, so some implementations can leak a small amount
of memory, here (NPTL won't).
------------------------------------------------------------------------
r64706 | normal | 2018-09-13 05:49:24 +0900 (Thu, 13 Sep 2018) | 15 lines

fiber: fix crash on GC after forking

Remove the remainder of ROOT_FIBER_CONTEXT use and unnecessary
differences between the root and non-root fiber.  This makes
it easier to follow new root fiber at fork time.

Multiple sources of truth often leads to bugs, as in this case.
We can determinte root fiber by checking a fiber against the root_fiber
of its owner thread.  The new `fiber_is_root_p' function
supports that.

Now, we can care only about free-ing/recycling/munmap-ing stacks
as appropriate.

[Bug #15050]
------------------------------------------------------------------------
r64705 | normal | 2018-09-13 05:49:19 +0900 (Thu, 13 Sep 2018) | 11 lines

cont.c (fiber_memsize): do not rely on ROOT_FIBER_CONTEXT

We can check if the fiber we're interested in is the
th->root_fiber for the owner thread, so there is no need to use
ROOT_FIBER_CONTEXT.

Note: there is no guarantee th->ec points to
&th->root_fiber->cont.saved_ec, thus vm::thread_memsize may not
account for root fiber correctly (pre-existing bug).

[Bug #15050]
------------------------------------------------------------------------
r64704 | normal | 2018-09-13 05:49:14 +0900 (Thu, 13 Sep 2018) | 6 lines

cont.c (ec_set_vm_stack): avoid needless casting

Am I missing something, here?  Casting was totally unnecessary
and ugly...

[ruby-core:88929]
------------------------------------------------------------------------
r64703 | normal | 2018-09-13 05:49:10 +0900 (Thu, 13 Sep 2018) | 10 lines

share VM stack between threads and fibers if identical in size

ec->vm_stack is always allocated with malloc, so stack cache for
root fiber (thread stack) and non-root fibers can be shared as
long as the size is the same.  The purpose of this change is to
reduce dependencies on ROOT_FIBER_CONTEXT.

[Feature #15095] [Bug #15050]

v2: vm.c: fix build with USE_THREAD_DATA_RECYCLE==0
------------------------------------------------------------------------
r64702 | svn | 2018-09-13 01:05:08 +0900 (Thu, 13 Sep 2018) | 1 line

* 2018-09-13
------------------------------------------------------------------------
r64701 | kazu | 2018-09-13 01:05:07 +0900 (Thu, 13 Sep 2018) | 1 line

[DOC] aseq.each always return self [ci skip]
------------------------------------------------------------------------
r64700 | nobu | 2018-09-12 23:37:51 +0900 (Wed, 12 Sep 2018) | 4 lines

time.c split time_utc_or_local

* time.c (time_utc_or_local): split into time_s_mkutc and
  time_s_mktime without utc flag.
------------------------------------------------------------------------
r64699 | k0kubun | 2018-09-12 22:32:11 +0900 (Wed, 12 Sep 2018) | 32 lines

_mjit_compile_pc_and_sp.erb: forget about memcpy [ci skip]

because using memcpy here actually made performance worse.
In Optcarrot,

* for loop
fps: 55.90428960597268
fps: 57.21690379342434
fps: 58.41751168279789
fps: 58.7317470613203
fps: 62.81371000202459
fps: 63.02541045417479
fps: 63.77324026366317
fps: 65.48067818347447
fps: 66.02324323831398
fps: 66.3816048847424
fps: 66.54526488660156

* memcpy
fps: 54.98389812126847
fps: 57.96524857391357
fps: 57.974918725327946
fps: 58.285987089087364
fps: 58.639003211333225
fps: 59.03244214601948
fps: 59.89964772199603
fps: 60.809490242786175
fps: 62.462070790624146
fps: 62.534599002918306
fps: 63.787312566163756

That's probably because the copied size is very small.
------------------------------------------------------------------------
r64698 | nobu | 2018-09-12 21:14:45 +0900 (Wed, 12 Sep 2018) | 1 line

.travis.yml: run ruby/spec version guards check in parallel
------------------------------------------------------------------------
r64697 | mrkn | 2018-09-12 17:51:34 +0900 (Wed, 12 Sep 2018) | 3 lines

[DOC] Modify descriptions for ArithmeticSequence

[ci-skip]
------------------------------------------------------------------------
r64696 | mrkn | 2018-09-12 17:36:48 +0900 (Wed, 12 Sep 2018) | 3 lines

[DOC] Add the documentation of ArithmeticSequence

[ci-skip]
------------------------------------------------------------------------
r64695 | mrkn | 2018-09-12 16:35:42 +0900 (Wed, 12 Sep 2018) | 6 lines

enumerator.c: Fix ArithmeticSequence for complex step

Make sure Enumerator::ArithmeticSequence#each to work well
for a complex step value.

This reverts commit ca47fb329a1d48af3e1009620bdb18e931c9f188.
------------------------------------------------------------------------
r64694 | nobu | 2018-09-12 16:01:59 +0900 (Wed, 12 Sep 2018) | 1 line

deduce versioned tools from CC
------------------------------------------------------------------------
r64693 | mrkn | 2018-09-12 14:52:27 +0900 (Wed, 12 Sep 2018) | 3 lines

Revert "enumerator.c: Fix ArithmeticSequence for complex step"

This reverts commit 0a0f8238d02a2dfff4cd2892408e14cb826cec7e.
------------------------------------------------------------------------
r64692 | mrkn | 2018-09-12 14:35:46 +0900 (Wed, 12 Sep 2018) | 4 lines

enumerator.c: Fix ArithmeticSequence for complex step

Make sure Enumerator::ArithmeticSequence#each to work well
for a complex step value.
------------------------------------------------------------------------
r64691 | shyouhei | 2018-09-12 13:04:31 +0900 (Wed, 12 Sep 2018) | 6 lines

resurrect the string to expect modifications

String#freeze can be redefined to be destructive.  While such
redefinition is definitely weird, it should be possible.  Resurrect
the string to prepare for that sort of things.

------------------------------------------------------------------------
r64690 | shyouhei | 2018-09-12 12:39:36 +0900 (Wed, 12 Sep 2018) | 21 lines

make opt_str_freeze leaf

Simply use DISPATCH_ORIGINAL_INSN instead of rb_funcall.  This is,
when possible, overall performant because method dispatch results are
cached inside of CALL_CACHE.  Should also be good for JIT.

----

trunk: ruby 2.6.0dev (2018-09-12 trunk 64689) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15]
last_commit=make opt_str_freeze leaf
Calculating -------------------------------------
                          trunk        ours
    vm2_freezestring     5.440M     31.411M i/s -      6.000M times in 1.102968s 0.191017s

Comparison:
                 vm2_freezestring
                ours:  31410864.5 i/s
               trunk:   5439865.4 i/s - 5.77x  slower


------------------------------------------------------------------------
r64689 | shyouhei | 2018-09-12 10:55:00 +0900 (Wed, 12 Sep 2018) | 22 lines

make opt_case_dispatch leaf

This instruction can be written without rb_funcall. It not only boosts
performance of case statements, but also makes room of future JIT
improvements.  Because opt_case_dispatch is about optimization this
should not be a bad thing to have.

----

trunk: ruby 2.6.0dev (2018-09-05 trunk 64634) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15]
last_commit=make opt_case_dispatch leaf
Calculating -------------------------------------
                          trunk        ours
        vm2_case_lit      1.366       2.012 i/s -       1.000 times in 0.731839s 0.497008s

Comparison:
                     vm2_case_lit
                ours:         2.0 i/s
               trunk:         1.4 i/s - 1.47x  slower


------------------------------------------------------------------------
r64688 | svn | 2018-09-12 00:14:57 +0900 (Wed, 12 Sep 2018) | 1 line

* 2018-09-12
------------------------------------------------------------------------
r64687 | k0kubun | 2018-09-12 00:14:56 +0900 (Wed, 12 Sep 2018) | 5 lines

_mjit_compile_insn.erb: move pc on JIT cancel

if and only if it's not moved yet, to avoid potential bugs in the future.

_mjit_compile_send.erb: ditto
------------------------------------------------------------------------
r64686 | k0kubun | 2018-09-11 23:38:05 +0900 (Tue, 11 Sep 2018) | 11 lines

mjit_worker.c: atomically print main message and \n

To attempt to fix CI failure on rubyci freebsd:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180911T123001Z.fail.html.gz

```
JIT success (68.7ms): mjit9@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u9.c
JIT compaction (25.1ms): Compacted 10 methods -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u10.soToo many JIT code -- 1 units unloaded

JIT success (68.2ms): mjit10@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u11.c
```
------------------------------------------------------------------------
r64685 | k0kubun | 2018-09-11 23:10:00 +0900 (Tue, 11 Sep 2018) | 4 lines

bare_instructions.rb: use Hash#fetch to read attr

to raise descriptive KeyError instead of NoMethodError in case these
attrs are accidentally removed.
------------------------------------------------------------------------
r64684 | k0kubun | 2018-09-11 22:48:00 +0900 (Tue, 11 Sep 2018) | 32 lines

_mjit_compile_insn.erb: prefer insn.always_leaf?

rather than `trace_enablable_insns` which is hard to maintain.

This would make performance bad because new branches for tracepoint will
be added.

Optcarrot before:
fps: 56.885371547337655
fps: 60.02493636060194
fps: 63.051028327122076
fps: 63.78463316242535
fps: 64.20391937940403
fps: 64.55990344731123
fps: 64.56771099162921
fps: 64.95991277629723
fps: 65.15120708973232
fps: 65.90558702393933
fps: 66.29579283026303

Optcarrot after:
fps: 52.7647027470875
fps: 53.67404855529564
fps: 58.40514319229468
fps: 60.90736996487708
fps: 62.83487236283472
fps: 63.01386139447994
fps: 63.42395443471596
fps: 63.78328559878602
fps: 64.58432081229746
fps: 64.78720429848532
fps: 65.48720618907552
------------------------------------------------------------------------
r64683 | k0kubun | 2018-09-11 21:53:52 +0900 (Tue, 11 Sep 2018) | 12 lines

_mjit_compile_pc_and_sp.erb: skip moving pc

when catch_except_p is false and insn.always_leaf? is true (never makes
arbitrary method call in the insn).

On Optcarrot, unfortunately this didn't have measureable performance impact.
But still this is a good direction since it becomes much faster when
marking all insns as always leaf.

bare_instructions.rb: add `#always_leaf?` that indicates the insn can
always be considered as leaf. Using dynamic leaf for JIT would be hard
since it requires to discard outdated code somehow.
------------------------------------------------------------------------
r64682 | k0kubun | 2018-09-11 20:26:15 +0900 (Tue, 11 Sep 2018) | 8 lines

transform_mjit_header.rb: add static to Init_*

as well, to make CI succeed with VM_CHECK_MODE > 1.

vm_insnhelper.c: drop unnecessary MJIT_HEADER ifdef. This is intended to
be ignored by having `static inline`. Removing that by macro would be
helpful for minimizing compilation time, but the impact is not so big
and having many MJIT_HEADER check would be bad for maintainability.
------------------------------------------------------------------------
r64681 | k0kubun | 2018-09-11 20:09:59 +0900 (Tue, 11 Sep 2018) | 3 lines

test_jit.rb: show extra debug info for #test_unload_units

failure
------------------------------------------------------------------------
r64680 | nobu | 2018-09-11 20:05:20 +0900 (Tue, 11 Sep 2018) | 1 line

random.c: prefixed fill_random_bytes
------------------------------------------------------------------------
r64679 | k0kubun | 2018-09-11 20:01:18 +0900 (Tue, 11 Sep 2018) | 1 line

vm_insnhelper.c: stop unnecessarily using rb_sprintf
------------------------------------------------------------------------
r64678 | k0kubun | 2018-09-11 19:58:33 +0900 (Tue, 11 Sep 2018) | 1 line

vm_insnhelper.c: fix -Wformat-security on rb_bug
------------------------------------------------------------------------
r64677 | shyouhei | 2018-09-11 18:48:58 +0900 (Tue, 11 Sep 2018) | 8 lines

add new instruction attribute called leaf

An instruction is leaf if it has no rb_funcall inside.  In order to
check this property, we introduce stack canary which is a random
number collected at runtime.  Stack top is always filled with this
number and checked for stack smashing operations, when VM_CHECK_MODE.
[GH-1947]

------------------------------------------------------------------------
r64676 | svn | 2018-09-11 18:46:50 +0900 (Tue, 11 Sep 2018) | 1 line

* 2018-09-11
------------------------------------------------------------------------
r64675 | kazu | 2018-09-11 18:46:49 +0900 (Tue, 11 Sep 2018) | 1 line

Use https instead of http
------------------------------------------------------------------------
r64674 | nobu | 2018-09-10 22:05:34 +0900 (Mon, 10 Sep 2018) | 1 line

appveyor.yml: try VS140
------------------------------------------------------------------------
r64673 | nobu | 2018-09-10 18:35:03 +0900 (Mon, 10 Sep 2018) | 1 line

signal.c: consider non-sigaltstack platforms
------------------------------------------------------------------------
r64672 | nobu | 2018-09-10 13:23:24 +0900 (Mon, 10 Sep 2018) | 1 line

util.c: removed extra #endif [Bug #15091]
------------------------------------------------------------------------
r64671 | nobu | 2018-09-10 13:21:39 +0900 (Mon, 10 Sep 2018) | 5 lines

util.c: fix ruby_qsort with qsort_s

* util.c (ruby_qsort): __STDC_VERSION__ may not be defined even if it
  is available.  fixed duplicate definitions when qsort_s is available
  on non-Windows platforms.  [ruby-core:88921] [Bug #15091]
------------------------------------------------------------------------
r64670 | usa | 2018-09-10 10:43:10 +0900 (Mon, 10 Sep 2018) | 2 lines

there is no such predefined macro.  check build before commit!

------------------------------------------------------------------------
r64669 | svn | 2018-09-10 00:46:53 +0900 (Mon, 10 Sep 2018) | 1 line

* 2018-09-10
------------------------------------------------------------------------
r64668 | nobu | 2018-09-10 00:46:51 +0900 (Mon, 10 Sep 2018) | 1 line

.travis.yml: separate ruby/spec on old version
------------------------------------------------------------------------
r64667 | nobu | 2018-09-09 21:48:33 +0900 (Sun, 09 Sep 2018) | 5 lines

Add latest version gcc-8 case to Travis CI

[Fix GH-1937]

Co-authored-by: Jun Aruga <jaruga@redhat.com>
------------------------------------------------------------------------
r64666 | nobu | 2018-09-09 21:48:32 +0900 (Sun, 09 Sep 2018) | 1 line

.travis.yml: branches only for travis-ci
------------------------------------------------------------------------
r64665 | nobu | 2018-09-09 21:42:48 +0900 (Sun, 09 Sep 2018) | 1 line

thread.c: get rid of false warnings by gcc-8
------------------------------------------------------------------------
r64664 | kazu | 2018-09-09 19:51:48 +0900 (Sun, 09 Sep 2018) | 1 line

Fix a typo
------------------------------------------------------------------------
r64663 | normal | 2018-09-09 17:50:53 +0900 (Sun, 09 Sep 2018) | 4 lines

spec/ruby/library/socket/addrinfo: require for SocketSpecs

Otherwise, I get NameError when running these IPv6 tests individually
or in parallel.
------------------------------------------------------------------------
r64662 | svn | 2018-09-09 16:49:05 +0900 (Sun, 09 Sep 2018) | 1 line

* 2018-09-09
------------------------------------------------------------------------
r64661 | nobu | 2018-09-09 16:49:04 +0900 (Sun, 09 Sep 2018) | 10 lines

util.c: qsort_s in C11

* configure.ac: macro for C11 to use qsort_s.

* util.c (ruby_qsort): fix for C11 qsort_s.  the comparison function
  for MSVCRT qsort_s is compatible with BSD qsort_r, but not with C11
  qsort_s, in spite of its name.
  note that mingw defines __STDC_VERSION__ but uses qsort_s in MSVCRT,
  so the MSVCRT block needs to preced the C11 block.
  [ruby-core:88899] [Bug #15091]
------------------------------------------------------------------------
r64660 | kazu | 2018-09-08 11:44:24 +0900 (Sat, 08 Sep 2018) | 1 line

Use `&.` after `&.`
------------------------------------------------------------------------
r64659 | svn | 2018-09-08 10:09:45 +0900 (Sat, 08 Sep 2018) | 1 line

* 2018-09-08
------------------------------------------------------------------------
r64658 | normal | 2018-09-08 10:09:44 +0900 (Sat, 08 Sep 2018) | 3 lines

test/ruby/test_thread.rb: join threads in each test

Leaky thread detection doesn't happen frequently, enough
------------------------------------------------------------------------
r64657 | nobu | 2018-09-07 23:37:19 +0900 (Fri, 07 Sep 2018) | 1 line

ext/objspace/object_tracing.c (freeobj_i): fix missing assignment
------------------------------------------------------------------------
r64656 | nobu | 2018-09-07 22:43:01 +0900 (Fri, 07 Sep 2018) | 1 line

tool/node_name.rb: rewrote without flip-flop
------------------------------------------------------------------------
r64655 | nobu | 2018-09-07 17:28:57 +0900 (Fri, 07 Sep 2018) | 9 lines

object_tracing.c: register TracePoint objects

* ext/objspace/object_tracing.c (trace_object_allocations_start): to
  prevent TracePoint objects from GC, register them in the VM, since
  they are unique per VM.
  http://ci.rvm.jp/results/trunk-test@ruby-sky3/1291901

* ext/objspace/object_tracing.c (trace_object_allocations_stop): reuse
  TracePoint objects.
------------------------------------------------------------------------
r64654 | nobu | 2018-09-07 12:42:51 +0900 (Fri, 07 Sep 2018) | 1 line

test/ruby/test_ast.rb: assert error messages too
------------------------------------------------------------------------
r64653 | nobu | 2018-09-07 12:39:30 +0900 (Fri, 07 Sep 2018) | 5 lines

Refactor test

[Fix GH-1946]

From: Josh Cheek <josh.cheek@gmail.com>
------------------------------------------------------------------------
r64652 | nobu | 2018-09-07 12:23:25 +0900 (Fri, 07 Sep 2018) | 1 line

ext/objspace/object_tracing.c (freeobj_i): no lookup before delete
------------------------------------------------------------------------
r64651 | svn | 2018-09-07 12:16:13 +0900 (Fri, 07 Sep 2018) | 1 line

* 2018-09-07
------------------------------------------------------------------------
r64650 | nobu | 2018-09-07 12:16:12 +0900 (Fri, 07 Sep 2018) | 1 line

ext/objspace/object_tracing.c: get rid of aliasing pointers
------------------------------------------------------------------------
r64648 | hsbt | 2018-09-06 12:02:06 +0900 (Thu, 06 Sep 2018) | 1 line

Extracted file list for csv.gemspec.
------------------------------------------------------------------------
r64647 | kazu | 2018-09-06 08:15:02 +0900 (Thu, 06 Sep 2018) | 3 lines

[DOC] Remove link to dead project

[Bug #14885] [ci skip]
------------------------------------------------------------------------
r64646 | nobu | 2018-09-06 06:34:44 +0900 (Thu, 06 Sep 2018) | 1 line

fix a typo [ci skip]
------------------------------------------------------------------------
r64645 | nobu | 2018-09-06 05:40:49 +0900 (Thu, 06 Sep 2018) | 4 lines

enumerator.c: [DOC] Enumerator::Lazy#force [ci skip]

added documentation of Enumerator::Lazy#force, just to clarify that it
is an alias of an inherited method.  [ruby-core:88872] [Bug #15079]
------------------------------------------------------------------------
r64644 | eregon | 2018-09-06 05:39:19 +0900 (Thu, 06 Sep 2018) | 4 lines

Add platform guards for AIX

* Most of these seem OS bugs.
* See https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180905T103302Z.fail.html.gz
------------------------------------------------------------------------
r64643 | eregon | 2018-09-06 05:39:02 +0900 (Thu, 06 Sep 2018) | 1 line

Guard a few specs which ipv6_available?
------------------------------------------------------------------------
r64642 | nobu | 2018-09-06 05:02:32 +0900 (Thu, 06 Sep 2018) | 5 lines

backward.h: removed stale declarations

* include/ruby/backward.h (rb_complex_set_real, rb_complex_set_imag):
  removed useless declarations which have been deprecated from the
  beginning.
------------------------------------------------------------------------
r64641 | svn | 2018-09-06 04:06:09 +0900 (Thu, 06 Sep 2018) | 1 line

* 2018-09-06
------------------------------------------------------------------------
r64640 | tarui | 2018-09-06 04:06:08 +0900 (Thu, 06 Sep 2018) | 11 lines

range.c: Range#cover? accepts Range object. [Feature #14473]

	* range.c (range_cover): add code for range argument.
          If the argument is a Range, check it is or is not 
	  covered by the reciver. If it can be treated as a
	  sequence, this method treats it that way. 
	* test/ruby/test_range.rb (class TestRange): add tests
	  for this feature.
	  
	  This patch is written by Owen Stephens. thank you!

------------------------------------------------------------------------
r64639 | svn | 2018-09-05 22:33:22 +0900 (Wed, 05 Sep 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64638 | hsbt | 2018-09-05 22:33:21 +0900 (Wed, 05 Sep 2018) | 1 line

Merge csv-3.0.0 from ruby/csv repository.
------------------------------------------------------------------------
r64637 | naruse | 2018-09-05 22:16:03 +0900 (Wed, 05 Sep 2018) | 1 line

fix typo
------------------------------------------------------------------------
r64636 | naruse | 2018-09-05 22:15:41 +0900 (Wed, 05 Sep 2018) | 4 lines

AIX doesn't set OptionLength for boolean options

https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180904T103302Z.fail.html.gz
https://www.ibm.com/support/knowledgecenter/ja/ssw_aix_72/com.ibm.aix.commtrf2/getsockopt.htm
------------------------------------------------------------------------
r64635 | duerst | 2018-09-05 15:04:02 +0900 (Wed, 05 Sep 2018) | 1 line

define ubf_list_atfork() as empty on cygwin
------------------------------------------------------------------------
r64634 | svn | 2018-09-05 08:10:18 +0900 (Wed, 05 Sep 2018) | 1 line

* 2018-09-05
------------------------------------------------------------------------
r64633 | nobu | 2018-09-05 08:10:17 +0900 (Wed, 05 Sep 2018) | 4 lines

random.c: fix up r64596

* random.c (fill_random_bytes_syscall): check if the version macro is
  defined, for very old Mac OS X development tools.
------------------------------------------------------------------------
r64632 | nobu | 2018-09-04 21:41:14 +0900 (Tue, 04 Sep 2018) | 4 lines

rational.c: remove duplicate macros

* rational.c (RRATIONAL_SET_{NUM,DEN}): also defined in internal.h
  since r53887.
------------------------------------------------------------------------
r64631 | nobu | 2018-09-04 21:30:34 +0900 (Tue, 04 Sep 2018) | 4 lines

ruby.h: removed internal macros

* include/ruby/ruby.h (RCOMPLEX_SET_REAL, RCOMPLEX_SET_IMAG): removed
  macros for internal use, which have been exposed by accident.
------------------------------------------------------------------------
r64630 | nobu | 2018-09-04 17:39:14 +0900 (Tue, 04 Sep 2018) | 3 lines

use mingw ANSI stdio

[Bug #13496]
------------------------------------------------------------------------
r64629 | nobu | 2018-09-04 14:28:38 +0900 (Tue, 04 Sep 2018) | 3 lines

bootstraptest update test_io.rb [Bug #15060] [Fix GH-1495]

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64628 | nobu | 2018-09-04 12:41:44 +0900 (Tue, 04 Sep 2018) | 3 lines

Spec updates [Bug #15060] [Fix GH-1495]

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64627 | nobu | 2018-09-04 11:19:39 +0900 (Tue, 04 Sep 2018) | 5 lines

appveyor.yml: fix PATH and env for msys2

based on the patch by MSP-Greg at #1945.

Co-authored-by: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64626 | nobu | 2018-09-04 11:18:51 +0900 (Tue, 04 Sep 2018) | 6 lines

appveyor.yml: reduce matrix factors

* appveyor.yml (environment): separate matrix factors by `build` (`vs`
  or `msys2`), and `build` (and `vs` version if VS build).
  now `MSYS2_ARCH` and `MSYSTEM` are derived from `Platform` if msys2
  build.
------------------------------------------------------------------------
r64625 | shyouhei | 2018-09-04 10:42:37 +0900 (Tue, 04 Sep 2018) | 8 lines

avoid fork-unsafe arc4random implementations

Some old implementaions of arc4random_buf(3) were ARC4 based, or
unsafe when forked, or both.  Resort to /dev/urandom for those
known problematic cases.  Fix [Bug #15039]

Patch from Thomas Hurst <tom@hur.st>

------------------------------------------------------------------------
r64624 | svn | 2018-09-04 09:12:50 +0900 (Tue, 04 Sep 2018) | 1 line

* 2018-09-04
------------------------------------------------------------------------
r64623 | nobu | 2018-09-04 09:12:49 +0900 (Tue, 04 Sep 2018) | 3 lines

RubyGems installer.rb - fix up my mistakes in r64582

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64622 | kazu | 2018-09-03 22:52:09 +0900 (Mon, 03 Sep 2018) | 1 line

Use unpack1 instead of unpack and `[0]`
------------------------------------------------------------------------
r64620 | nobu | 2018-09-03 17:20:41 +0900 (Mon, 03 Sep 2018) | 5 lines

Declare as gnu_printf on mingw

[Bug #13496]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r64619 | svn | 2018-09-03 08:27:09 +0900 (Mon, 03 Sep 2018) | 1 line

* 2018-09-03
------------------------------------------------------------------------
r64618 | nobu | 2018-09-03 08:27:08 +0900 (Mon, 03 Sep 2018) | 5 lines

Readline: expose rl_completion_quote_character variable

[Feature #13050]

From: georgebrock (George Brocklehurst) <ruby@georgebrock.com>
------------------------------------------------------------------------
r64615 | svn | 2018-09-02 12:49:32 +0900 (Sun, 02 Sep 2018) | 1 line

* 2018-09-02
------------------------------------------------------------------------
r64614 | nobu | 2018-09-02 12:49:31 +0900 (Sun, 02 Sep 2018) | 4 lines

configure.ac: -fstack-protector-strong

* configure.ac: use -fstack-protector-strong if available instead of
  -fstack-protector conditionally.  [ruby-core:88788] [Misc #15053]
------------------------------------------------------------------------
r64610 | nobu | 2018-09-01 16:34:31 +0900 (Sat, 01 Sep 2018) | 4 lines

complex.c: simplify division result

* complex.c (f_divide): canonicalize rationals to simplify integer
  complex results.
------------------------------------------------------------------------
r64609 | kazu | 2018-09-01 15:59:36 +0900 (Sat, 01 Sep 2018) | 6 lines

Re-try to add workaround for warnings

```
.../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION
.../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here
```
------------------------------------------------------------------------
r64608 | nobu | 2018-09-01 15:19:05 +0900 (Sat, 01 Sep 2018) | 1 line

RSTRING_PTR may not be terminated in the future
------------------------------------------------------------------------
r64607 | nobu | 2018-09-01 15:14:07 +0900 (Sat, 01 Sep 2018) | 1 line

10**3 is always 1000
------------------------------------------------------------------------
r64606 | nobu | 2018-09-01 15:14:06 +0900 (Sat, 01 Sep 2018) | 1 line

adjust indent
------------------------------------------------------------------------
r64604 | nobu | 2018-09-01 13:09:02 +0900 (Sat, 01 Sep 2018) | 1 line

surround macro block with do/while
------------------------------------------------------------------------
r64601 | kazu | 2018-09-01 10:37:12 +0900 (Sat, 01 Sep 2018) | 1 line

[DOC] Add %Q and %+ to strptime [ci skip]
------------------------------------------------------------------------
r64600 | kazu | 2018-09-01 00:29:06 +0900 (Sat, 01 Sep 2018) | 3 lines

Revert "Try to add workaround for warnings"

This reverts commit a5e5cfa3f650d4e78fb50e2df15c102ab56fca3c.
------------------------------------------------------------------------
r64599 | kazu | 2018-09-01 00:25:52 +0900 (Sat, 01 Sep 2018) | 6 lines

Try to add workaround for warnings

```
.../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION
.../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here
```
------------------------------------------------------------------------
r64598 | svn | 2018-09-01 00:05:32 +0900 (Sat, 01 Sep 2018) | 1 line

* 2018-09-01
------------------------------------------------------------------------
r64597 | kazu | 2018-09-01 00:05:29 +0900 (Sat, 01 Sep 2018) | 1 line

[DOC] leap seconds [ci skip]
------------------------------------------------------------------------
r64596 | nobu | 2018-08-31 18:56:24 +0900 (Fri, 31 Aug 2018) | 4 lines

random.c: SecRandomCopyBytes

* random.c (fill_random_bytes_syscall): use SecRandomCopyBytes in
  Security framework on macOS 10.7 or later.
------------------------------------------------------------------------
r64595 | mame | 2018-08-31 13:31:45 +0900 (Fri, 31 Aug 2018) | 1 line

test/lib/test/unit/assertions.rb: explicit delegation of keyword arguments
------------------------------------------------------------------------
r64594 | svn | 2018-08-31 04:14:38 +0900 (Fri, 31 Aug 2018) | 1 line

* 2018-08-31
------------------------------------------------------------------------
r64593 | normal | 2018-08-31 04:14:37 +0900 (Fri, 31 Aug 2018) | 7 lines

cont.c (rb_fiber_atfork): th->root_fiber may not exist

Otherwise, bootstraptest/test_fork.rb fails with -DVM_CHECK_MODE=2

[Bug #15041]

Fixes: r64589 "cont.c: set th->root_fiber to current fiber at fork"
------------------------------------------------------------------------
r64592 | normal | 2018-08-30 12:24:55 +0900 (Thu, 30 Aug 2018) | 1 line

hrtime.h: fix typo in non-builtin overflow check
------------------------------------------------------------------------
r64591 | svn | 2018-08-30 04:47:15 +0900 (Thu, 30 Aug 2018) | 1 line

* 2018-08-30
------------------------------------------------------------------------
r64590 | normal | 2018-08-30 04:47:14 +0900 (Thu, 30 Aug 2018) | 6 lines

test/ruby/test_io.rb (test_select_leak): use handle_interrupt

Interrupt timing is tricky and it's possible the target
thread is still stopped from the previous loop iteration.

[ruby-core:88732] [Bug #15043]
------------------------------------------------------------------------
r64589 | normal | 2018-08-29 17:04:09 +0900 (Wed, 29 Aug 2018) | 7 lines

cont.c: set th->root_fiber to current fiber at fork

Otherwise, th->root_fiber can point to an invalid Fiber,
because Fibers do not live across fork.  So consider
whatever Fiber is running the root fiber.

[ruby-core:88723] [Bug #15041]
------------------------------------------------------------------------
r64588 | svn | 2018-08-29 11:23:15 +0900 (Wed, 29 Aug 2018) | 1 line

* 2018-08-29
------------------------------------------------------------------------
r64587 | normal | 2018-08-29 11:23:14 +0900 (Wed, 29 Aug 2018) | 3 lines

cont.c (rb_context_t): remove ensure_list

It is unused (we use rb_execution_context_t.ensure_list instead)
------------------------------------------------------------------------
r64586 | eregon | 2018-08-28 23:55:33 +0900 (Tue, 28 Aug 2018) | 4 lines

Tag a couple specs failing on AIX

* The rest seems OS bugs, MRI bugs or incomplete IPv6 implementation:
  https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180828T103302Z.fail.html.gz
------------------------------------------------------------------------
r64585 | hsbt | 2018-08-28 22:42:39 +0900 (Tue, 28 Aug 2018) | 4 lines

Fixed installation failure with mswin environment.

  [ruby-core:88699][Bug #15035]
  This patch was provided by MSP-Greg.
------------------------------------------------------------------------
r64584 | eregon | 2018-08-28 18:41:26 +0900 (Tue, 28 Aug 2018) | 1 line

Update to ruby/spec@6fd9472
------------------------------------------------------------------------
r64583 | ko1 | 2018-08-28 16:06:06 +0900 (Tue, 28 Aug 2018) | 8 lines

rest parameter optimization [Feature #15010]

* vm_args.c: rb_ary_dup(args->rest) to be used at most once during
  parameter setup. [Feature #15010]
  A patch by chopraanmol1 (Anmol Chopra) <chopraanmol1@gmail.com>.

* array.c (rb_ary_behead): added to remove first n elements.

------------------------------------------------------------------------
r64582 | hsbt | 2018-08-28 11:39:22 +0900 (Tue, 28 Aug 2018) | 4 lines

Fixed test failures in mswin environment at r64555.

  [ruby-core:88699][Bug #15035]
  This patch was provided by MSP-Greg.
------------------------------------------------------------------------
r64581 | normal | 2018-08-28 09:24:08 +0900 (Tue, 28 Aug 2018) | 6 lines

thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document

`acquired' was an old boolean variable, but nowadays it is a
rb_thread_t pointer;  "gvl.owner" seems like a more appropriate
name.  And document the contended path including waitq, timer,
and timer_err.
------------------------------------------------------------------------
r64580 | normal | 2018-08-28 08:39:58 +0900 (Tue, 28 Aug 2018) | 3 lines

thread_pthread.c: document sigwait_th and sigwait_fd [ci skip]

This is an important concept to document, I think.
------------------------------------------------------------------------
r64579 | normal | 2018-08-28 08:29:44 +0900 (Tue, 28 Aug 2018) | 3 lines

thread_pthread.c: fix deadlock on test_thread.rb::test_signal_at_join

Fixes: r64575 ("avoid lock ping-pong in do_gvl_timer & ubf_select")
------------------------------------------------------------------------
r64578 | eregon | 2018-08-28 04:08:38 +0900 (Tue, 28 Aug 2018) | 1 line

Rewrite Etc.sysconf spec to allow nil or Integer for all variables
------------------------------------------------------------------------
r64577 | normal | 2018-08-28 03:37:04 +0900 (Tue, 28 Aug 2018) | 7 lines

process.c: fix potential missed wakeups in r64576

Oddly, all existing test cases passed multiple times
before this patch (even with --jit-wait), so this seems
like a difficult failure to prove.

Fixes: r64576 ("process.c: simplify SIGCHLD-based waitpid")
------------------------------------------------------------------------
r64576 | normal | 2018-08-28 02:17:13 +0900 (Tue, 28 Aug 2018) | 11 lines

process.c: simplify SIGCHLD-based waitpid

Introduce a new rb_thread_sleep_interruptible that does not
execute interrupts before sleeping.  Skipping the interrupt
check before sleep is required for out-of-GVL ruby_waitpid_all
to function properly when setting waitpid_state.ret

Now that ubf_select can be called by the gvl.timer thread
without recursive locking gvl.lock, we can safely use
rb_threadptr_interrupt to deal with waking up sleeping
processes,
------------------------------------------------------------------------
r64575 | normal | 2018-08-28 02:17:08 +0900 (Tue, 28 Aug 2018) | 10 lines

thread_pthread.c: avoid lock ping-pong in do_gvl_timer & ubf_select

This simplifies the locking logic somewhat.

While we're at it, designate_timer_thread is worthless in
ubf_select because gvl_acquire_common already guarantees there
is a gvl.timer if gvl->waitq is populated.

In the future (for auto-fiber), this will allow using
th->unblock.func for rb_waitpid callers (via rb_sigchld_handler).
------------------------------------------------------------------------
r64574 | svn | 2018-08-28 01:38:38 +0900 (Tue, 28 Aug 2018) | 1 line

* 2018-08-28
------------------------------------------------------------------------
r64573 | eregon | 2018-08-28 01:38:37 +0900 (Tue, 28 Aug 2018) | 1 line

SC_TZNAME_MAX can also be infinite
------------------------------------------------------------------------
r64572 | svn | 2018-08-28 01:22:22 +0900 (Tue, 28 Aug 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64571 | eregon | 2018-08-28 01:22:21 +0900 (Tue, 28 Aug 2018) | 1 line

Update to ruby/spec@007e908
------------------------------------------------------------------------
r64570 | svn | 2018-08-27 23:49:57 +0900 (Mon, 27 Aug 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64569 | eregon | 2018-08-27 23:49:56 +0900 (Mon, 27 Aug 2018) | 1 line

Update to ruby/spec@a89819d
------------------------------------------------------------------------
r64568 | eregon | 2018-08-27 23:33:10 +0900 (Mon, 27 Aug 2018) | 1 line

Fix template/fake.rb.in if ENV["RUBYOPT"] is nil
------------------------------------------------------------------------
r64567 | eregon | 2018-08-27 23:25:14 +0900 (Mon, 27 Aug 2018) | 4 lines

Fix template/fake.rb.in when external and internal encodings are set

* To be able to run spec/ruby/command_line/dash_encoding_spec.rb
  with the in-repo build.
------------------------------------------------------------------------
r64566 | svn | 2018-08-27 23:25:02 +0900 (Mon, 27 Aug 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64565 | eregon | 2018-08-27 23:25:00 +0900 (Mon, 27 Aug 2018) | 1 line

Update to ruby/spec@09fa86c
------------------------------------------------------------------------
r64557 | eregon | 2018-08-27 19:12:41 +0900 (Mon, 27 Aug 2018) | 1 line

Simplify guards, the behavior seems Linux-specific
------------------------------------------------------------------------
r64556 | svn | 2018-08-27 19:05:06 +0900 (Mon, 27 Aug 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64555 | hsbt | 2018-08-27 19:05:04 +0900 (Mon, 27 Aug 2018) | 5 lines

Merge master branch from rubygems upstream.

  * It's preparation to release RubyGems 3.0.0.beta2 and Ruby 2.6.0
    preview 3.
  * https://github.com/rubygems/rubygems/compare/v3.0.0.beta1...fad2eb15a282b19dfcb4b48bc95b8b39ebb4511f
------------------------------------------------------------------------
r64554 | normal | 2018-08-27 17:48:49 +0900 (Mon, 27 Aug 2018) | 3 lines

hrtime.h: add note explaining current use of uint64_t [ci skip]

[ruby-core:88678]
------------------------------------------------------------------------
r64553 | nobu | 2018-08-27 14:49:41 +0900 (Mon, 27 Aug 2018) | 1 line

hrtime.h: missing paren
------------------------------------------------------------------------
r64552 | nobu | 2018-08-27 14:48:41 +0900 (Mon, 27 Aug 2018) | 1 line

hrtime.h: explicit casts to time_t
------------------------------------------------------------------------
r64551 | nobu | 2018-08-27 14:39:09 +0900 (Mon, 27 Aug 2018) | 1 line

configure.ac: printf prifix for int64_t
------------------------------------------------------------------------
r64550 | normal | 2018-08-27 14:32:18 +0900 (Mon, 27 Aug 2018) | 9 lines

thread.c: check interrupts explicitly in select/ppoll blocking regions

The logic around blocking_region_begin is confusing to me,
but the goal of this patch is to ensure rb_sigwait_fd_get
and rb_sigwait_fd_put are matched.

In other words, we don't want a thread to hold sigwait_fd
forever if an exception is raised while calling select()
or ppoll().
------------------------------------------------------------------------
r64549 | svn | 2018-08-27 10:30:21 +0900 (Mon, 27 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64548 | svn | 2018-08-27 10:30:20 +0900 (Mon, 27 Aug 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64547 | hsbt | 2018-08-27 10:30:18 +0900 (Mon, 27 Aug 2018) | 3 lines

Merge rdoc-6.1.0.beta1.

  * https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1
------------------------------------------------------------------------
r64546 | svn | 2018-08-27 09:44:06 +0900 (Mon, 27 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64545 | svn | 2018-08-27 09:44:05 +0900 (Mon, 27 Aug 2018) | 1 line

* 2018-08-27
------------------------------------------------------------------------
r64544 | hsbt | 2018-08-27 09:44:04 +0900 (Mon, 27 Aug 2018) | 6 lines

Merge psych-3.1.0.pre1.

  * Update bundled libyaml-0.2.1 from 0.1.7.
    https://github.com/ruby/psych/pull/368
  * Unify Psych's API: To use keyword arguments with method call.
    https://github.com/ruby/psych/pull/358
------------------------------------------------------------------------
r64543 | normal | 2018-08-26 21:41:21 +0900 (Sun, 26 Aug 2018) | 10 lines

test/ruby/test_io.rb (test_recycled_fd_close): Linux workaround

Arch Linux CI still seems to timeout on this test...

Note, I can't reproduce the failures in these tests on a
FreeBSD 11.1 VM while infinite-looping, even without the
"th.join(0.001)".  It doesn't seem related to the use of
rb_wait_for_single_fd (r64529).

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20180826T090003Z.fail.html.gz
------------------------------------------------------------------------
r64542 | normal | 2018-08-26 21:41:16 +0900 (Sun, 26 Aug 2018) | 12 lines

thread_sync.c: common wakeup_{one,all} implementation

This let us avoid looping in rb_szqueue_max_set, saves us
some lines of code and reduces binary size slightly
(numbers from 32-bit x86):

         text      data     bss     dec     hex filename
before: 91272       392     156   91820   166ac thread.o
 after: 91200       392     156   91748   16664 thread.o

Inspiration from this taken from the FUTEX_WAKE op
of the Linux futex(2) syscall.
------------------------------------------------------------------------
r64541 | normal | 2018-08-26 13:29:11 +0900 (Sun, 26 Aug 2018) | 5 lines

process.c: remove worthless waitpid_sys macro

It is identical to do_waitpid, and the win32 version will not
be needed for MJIT (since win32 does not suffer from the
waitpid(-1, ...) conflict where waits can get stolen.
------------------------------------------------------------------------
r64540 | normal | 2018-08-26 07:32:35 +0900 (Sun, 26 Aug 2018) | 7 lines

test/io/wait/test_io_wait_uncommon.rb: relax /dev/random check

Too many machines lack entropy to have a usable /dev/random.  I
had similar problems on my system until I started using
haveged(8), but we can't require that for CI.

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-trunk/log/20180825T213003Z.fail.html.gz
------------------------------------------------------------------------
r64539 | normal | 2018-08-26 07:14:14 +0900 (Sun, 26 Aug 2018) | 1 line

thread_pthread.c (ubf_wakeup_thread): `th' is never NULL
------------------------------------------------------------------------
r64538 | normal | 2018-08-26 06:59:30 +0900 (Sun, 26 Aug 2018) | 28 lines

thread_pthread.c: main thread always gets hit by signals

We need to ensure Signal.trap handlers can function if the main
thread is sleeping after a subthread has grabbed sigwait_fd,
but later exited.

Consider the following timeline:

main_thread             sub-thread
-----------------------------------------
Signal.trap() { ... }
                        get sigwait_fd
                        ppoll on sigwait_fd
native_cond_sleep
(via pthread_cond_wait)
                        ppoll times-out
			put sigwait_fd
                        sub-thread exits

only thread alive
SIGNAL HITS

The problem is pthread_cond_wait cannot return EINTR,
so we can never run the Signal.trap handler.  So we
will avoid using native_cond_sleep in the main thread
and always use ppoll to sleep when in the main thread.
This can guarantee the main thread remains aware of
signals; even if it cannot safely read off sigwait_fd
------------------------------------------------------------------------
r64537 | svn | 2018-08-26 06:33:55 +0900 (Sun, 26 Aug 2018) | 1 line

* 2018-08-26
------------------------------------------------------------------------
r64536 | normal | 2018-08-26 06:33:55 +0900 (Sun, 26 Aug 2018) | 3 lines

thread.c: quiet down -Wmaybe-uninitialized on gcc 7.[2-3]

Haven't tested gcc 8, yet; but gcc 6 seems fine....
------------------------------------------------------------------------
r64535 | normal | 2018-08-25 18:02:50 +0900 (Sat, 25 Aug 2018) | 6 lines

hrtime.h: add documentation

I updated the patch with documentation but forgot about it,
earlier :x

[ruby-core:88616] [Misc #15014]
------------------------------------------------------------------------
r64534 | svn | 2018-08-25 15:58:36 +0900 (Sat, 25 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64533 | normal | 2018-08-25 15:58:35 +0900 (Sat, 25 Aug 2018) | 18 lines

thread.c: use rb_hrtime_t scalar for high-resolution time operations

Relying on "struct timespec" was too annoying API-wise and
used more stack space.  "double" was a bit wacky w.r.t rounding
in the past, so now we'll switch to using a 64-bit type.

Unsigned 64-bit integer is able to give us over nearly 585
years of range with nanoseconds.  This range is good enough
for the Linux kernel internal time representation, so it
ought to be good enough for us.

This reduces the stack usage of functions while GVL is held
(and thus subject to marking) on x86-64 Linux (with ppoll):

	rb_wait_for_single_fd    120 => 104
	do_select                120 => 88

[ruby-core:88582] [Misc #15014]
------------------------------------------------------------------------
r64532 | normal | 2018-08-25 11:32:15 +0900 (Sat, 25 Aug 2018) | 6 lines

drb: close graceful shutdown pipe before socket

Closing a listen socket while entering select(2) may
trigger IOError or even deadlock because another thread
may give the file descriptor to another file description;
meaning the kernel can wait on the wrong description.
------------------------------------------------------------------------
r64531 | normal | 2018-08-25 11:32:10 +0900 (Sat, 25 Aug 2018) | 4 lines

drb: simplify shutdown pipe close logic

IO#close is idempotent, so we don't need to waste bytecode
to check or nil it at shutdown time.
------------------------------------------------------------------------
r64530 | naruse | 2018-08-25 07:32:07 +0900 (Sat, 25 Aug 2018) | 1 line

Add AIX guards
------------------------------------------------------------------------
r64529 | normal | 2018-08-25 05:28:08 +0900 (Sat, 25 Aug 2018) | 5 lines

test/ruby/test_io.rb (test_recycled_fd_close): use IO#read to avoid ppoll call

IO#sysread calls rb_wait_for_single_fd for compatibility, and
perhaps something is amiss with that (unrelated to timer-thread
elimination)
------------------------------------------------------------------------
r64528 | svn | 2018-08-25 04:19:02 +0900 (Sat, 25 Aug 2018) | 1 line

* 2018-08-25
------------------------------------------------------------------------
r64527 | normal | 2018-08-25 04:19:01 +0900 (Sat, 25 Aug 2018) | 8 lines

thread_pthread.c: use eventfd instead of pipe on Linux

Based on r64478, any regular user creating more than 1024 pipes
on Linux will end up with tiny pipes with only a single page
capacity.  So avoid wasting user resources and use lighter
eventfd on Linux.

[ruby-core:88563] [Misc #15011]
------------------------------------------------------------------------
r64526 | k0kubun | 2018-08-24 19:25:51 +0900 (Fri, 24 Aug 2018) | 7 lines

ext/readline/extconf.rb: try using more readline APIs

on MinGW.

[Bug #15020]

From: MSP-Greg <Greg.mpls@gmail.com>
------------------------------------------------------------------------
r64525 | k0kubun | 2018-08-24 08:50:48 +0900 (Fri, 24 Aug 2018) | 10 lines

test/readline/test_readline.rb: fix readline test

for mingw.

test/lib/minitest/unit.rb: Add 'guards' for mingw.
Removed still-unused method `mswin?` from original patch.

[Fix GH-1941]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r64524 | normal | 2018-08-24 04:49:35 +0900 (Fri, 24 Aug 2018) | 4 lines

thread_pthread.c (ubf_timer_destroy): remove redundant getpid check

TIMER_THREAD_CREATED_P already checks that pid, and glibc 2.25+
no longer caches getpid(2).
------------------------------------------------------------------------
r64523 | svn | 2018-08-24 04:13:02 +0900 (Fri, 24 Aug 2018) | 1 line

* 2018-08-24
------------------------------------------------------------------------
r64522 | normal | 2018-08-24 04:13:01 +0900 (Fri, 24 Aug 2018) | 5 lines

NEWS: add entries for rb_waitpid and timer-thread [ci skip]

Some of these changes may affect debugging and tracing tools

[Bug #14867] [ruby-core:88199] [Misc #14937]
------------------------------------------------------------------------
r64521 | mame | 2018-08-23 17:49:23 +0900 (Thu, 23 Aug 2018) | 1 line

iseq.c (rb_vm_encoded_insn_data_table_init): add a cast to build on clang
------------------------------------------------------------------------
r64520 | kazu | 2018-08-23 17:33:54 +0900 (Thu, 23 Aug 2018) | 4 lines

Mention `--enable=jit` instead of `--jit`

"--jit" flag usage may be deprecated at r63995 [Feature #14878]
[ci skip]
------------------------------------------------------------------------
r64519 | mame | 2018-08-23 17:32:31 +0900 (Thu, 23 Aug 2018) | 3 lines

iseq.c (rb_iseq_trace_set): refactoring by using encoded_insn_data

Now it uses encoded_insn_data to identify and replace each encoded insn.
------------------------------------------------------------------------
r64518 | mame | 2018-08-23 17:32:30 +0900 (Thu, 23 Aug 2018) | 7 lines

iseq.c: add a map from encoded insn to insn data

This enhances rb_vm_insn_addr2insn which retrieves a decoded insn number
from encoded insn.
The insn data table include not only decoded insn number, but also its
len, trace and non-trace version of encoded insn.
This table can be used to simplify trace instrumentation.
------------------------------------------------------------------------
r64517 | nobu | 2018-08-23 16:45:39 +0900 (Thu, 23 Aug 2018) | 4 lines

compile.c: drop unused array

* compile.c (iseq_peephole_optimize): drop unused dynamic array
  literal, without concatenation.
------------------------------------------------------------------------
r64516 | nobu | 2018-08-23 16:22:27 +0900 (Thu, 23 Aug 2018) | 4 lines

compile.c: drop unused string

* compile.c (iseq_peephole_optimize): drop unused dynamic string
  literal, without concatenation.
------------------------------------------------------------------------
r64515 | ko1 | 2018-08-23 14:54:38 +0900 (Thu, 23 Aug 2018) | 5 lines

remove `const` warning.

* compile.c (iseq_ibf_load): remove `const` to pass iseq as no `const`
  parameter.

------------------------------------------------------------------------
r64514 | ko1 | 2018-08-23 13:12:14 +0900 (Thu, 23 Aug 2018) | 9 lines

check trace flags at loading [Bug #14702]

* iseq.c (iseq_init_trace): at ISeq loading time, we need to check
  `ruby_vm_event_enabled_flags` to turn on trace instructions.
  Seprate this checking code from `finish_iseq_build()` and make
  new function. `iseq_ibf_load()` calls this funcation after loading.

* test/ruby/test_iseq.rb: add a test for this fix.

------------------------------------------------------------------------
r64513 | naruse | 2018-08-23 04:18:22 +0900 (Thu, 23 Aug 2018) | 1 line

Also skip on AIX
------------------------------------------------------------------------
r64512 | nobu | 2018-08-23 01:02:03 +0900 (Thu, 23 Aug 2018) | 4 lines

compile.c: pop literal object in condition

* compile.c (compile_branch_condition): pop dynamic literal
  object, which is never nil/false, as the branch condition.
------------------------------------------------------------------------
r64511 | svn | 2018-08-23 00:04:06 +0900 (Thu, 23 Aug 2018) | 1 line

* 2018-08-23
------------------------------------------------------------------------
r64510 | mame | 2018-08-23 00:04:05 +0900 (Thu, 23 Aug 2018) | 7 lines

parse.y (arg_append): support NODE_ARGSCAT case

Because of the lack of this case, `[*ary,1,2,3,4,5,6]` was parsed into
an inefficient AST like `ary + [1,2] + [3,4] + [5,6]`.

A patch from Anmol Chopra <anmolchopra@rocketbox.in>.
Fixes [Bug #15018].
------------------------------------------------------------------------
r64509 | mame | 2018-08-22 20:09:47 +0900 (Wed, 22 Aug 2018) | 4 lines

compile.c: remove tracecoverage instruction for line coverage

Line coverage was based on special instruction "tracecoverage".
Now, instead, it uses the mechanism of trace hook [Feature #14104].
------------------------------------------------------------------------
r64508 | mame | 2018-08-22 19:38:56 +0900 (Wed, 22 Aug 2018) | 10 lines

parse.y: remove coverage-related code fragments

The code fragments that initializes coverage data were scattered into
both parse.y and compile.c.  parse.y allocated a coverage data, and
compile.c initialize the data.

To remove this cross-cutting concern, this change moves the allocation
from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c.
For the sake, parse.y just counts the line number of the original source
code, and the number is passed via rb_ast_body_t.
------------------------------------------------------------------------
r64507 | mame | 2018-08-22 19:38:55 +0900 (Wed, 22 Aug 2018) | 4 lines

node.h (rb_ast_t): move its field mark_ary to node_buffer_t

I want to add a new field to rb_ast_t whose size is restricted because
it is an imemo.  This change makes one room in rb_ast_t.
------------------------------------------------------------------------
r64506 | nobu | 2018-08-22 19:22:02 +0900 (Wed, 22 Aug 2018) | 1 line

prototized
------------------------------------------------------------------------
r64505 | mame | 2018-08-22 14:24:51 +0900 (Wed, 22 Aug 2018) | 1 line

common.mk: update "make help" so that "make check" now runs test-spec
------------------------------------------------------------------------
r64504 | mame | 2018-08-22 14:24:50 +0900 (Wed, 22 Aug 2018) | 10 lines

thread.c (rb_reset_coverages): remove coverage counters from all ISeqs

When coverage measurement is enabled, the compiler makes each iseq have
a reference to the counter array of coverage.
Even after coverage measurement is disabled, the reference is kept.
And, if coverage measurement is restarted, a coverage hook will increase
the counter.  This is completely meaningless; it brings just overhead.

To remove this meaninglessness, this change removes all the reference
when coverage measuement is stopped.
------------------------------------------------------------------------
r64503 | kazu | 2018-08-22 13:04:06 +0900 (Wed, 22 Aug 2018) | 3 lines

Avoid compiler depend error

ref r64492
------------------------------------------------------------------------
r64502 | eregon | 2018-08-22 07:17:37 +0900 (Wed, 22 Aug 2018) | 3 lines

Run specs against 2.3.7 to ensure version guards are correctly added

* See [Feature #15004].
------------------------------------------------------------------------
r64501 | eregon | 2018-08-22 07:01:34 +0900 (Wed, 22 Aug 2018) | 1 line

Update to ruby/spec@dd828d6
------------------------------------------------------------------------
r64500 | eregon | 2018-08-22 07:01:18 +0900 (Wed, 22 Aug 2018) | 1 line

Update to ruby/mspec@269f9cd
------------------------------------------------------------------------
r64499 | eregon | 2018-08-22 05:28:45 +0900 (Wed, 22 Aug 2018) | 3 lines

Only run the spec on Linux

* Other platforms seem to behave differently.
------------------------------------------------------------------------
r64498 | eregon | 2018-08-22 05:28:29 +0900 (Wed, 22 Aug 2018) | 5 lines

Revert r64483

* This reverts commit 12f624b673fd1bd1782f4c52e3b6c78d033e7b84:
 "Try 4 times for WIN32OLE specs"
* It was a machine problem, it needed to be rebooted.
------------------------------------------------------------------------
r64497 | svn | 2018-08-22 00:57:24 +0900 (Wed, 22 Aug 2018) | 1 line

* 2018-08-22
------------------------------------------------------------------------
r64496 | naruse | 2018-08-22 00:57:23 +0900 (Wed, 22 Aug 2018) | 1 line

AIX also timeouts the spec
------------------------------------------------------------------------
r64495 | kazu | 2018-08-21 23:57:56 +0900 (Tue, 21 Aug 2018) | 1 line

Add more assertions for NotImplementedError of instance method
------------------------------------------------------------------------
r64494 | akr | 2018-08-21 23:40:18 +0900 (Tue, 21 Aug 2018) | 2 lines

rename an argument of calc_wday.

------------------------------------------------------------------------
r64493 | naruse | 2018-08-21 22:39:24 +0900 (Tue, 21 Aug 2018) | 4 lines

Re-Revert "Temporary revert "process.c: dead code when no SIGCHLD""

This re-reverts commit r64447.
The issue was machine side problem.
------------------------------------------------------------------------
r64492 | nobu | 2018-08-21 11:11:39 +0900 (Tue, 21 Aug 2018) | 4 lines

cont.c: fix syntax error

* cont.c (struct rb_fiber_struct): fix wrong usage of BITFIELD in
  r64487, which caused syntax error on pre-C99 compilers.
------------------------------------------------------------------------
r64491 | nobu | 2018-08-21 11:02:54 +0900 (Tue, 21 Aug 2018) | 4 lines

common.mk: timestamp directory

* common.mk: timestamp files need the timestamp directory.
  [Bug #15015] [ruby-core:88584]
------------------------------------------------------------------------
r64490 | normal | 2018-08-21 10:01:42 +0900 (Tue, 21 Aug 2018) | 4 lines

thread*.c: replace GetMutexPtr with mutex_ptr

Following ko1's lead in r59192, this gets rid of non-obvious
assignments which happen inside macros.
------------------------------------------------------------------------
r64489 | normal | 2018-08-21 10:01:37 +0900 (Tue, 21 Aug 2018) | 4 lines

cont.c: replace "GetFooPtr" macros with "foo_ptr" functions

Following ko1's lead in r59192, this gets rid of non-obvious
assignments which happen inside macros.
------------------------------------------------------------------------
r64488 | normal | 2018-08-21 09:16:45 +0900 (Tue, 21 Aug 2018) | 3 lines

internal.h: remove prototype for non-existent rb_divert_reserved_fd

I forgot to remove it 3 years ago in r51576
------------------------------------------------------------------------
r64487 | normal | 2018-08-21 08:48:03 +0900 (Tue, 21 Aug 2018) | 4 lines

cont.c (struct rb_fiber_struct): bitfields for trasnferred and status

On 32-bit x86, this reduces the struct from 836 to 832 bytes and
brings us down to 13 (64-byte) cachelines (from 14).
------------------------------------------------------------------------
r64486 | normal | 2018-08-21 06:34:44 +0900 (Tue, 21 Aug 2018) | 4 lines

thread*.c: avoid unnecessary initialization for list_for_each_safe

According to r52446, it is only necessary for the current item (@i),
not the `@nxt` parameter for list_for_each_safe.
------------------------------------------------------------------------
r64485 | normal | 2018-08-21 06:34:39 +0900 (Tue, 21 Aug 2018) | 10 lines

thread_pthread.c: reinitialize ubf_list at fork

It's possible for the ubf_list_head to be populated with dead
threads at fork or the ubf_list_lock to be held, so reinitialize
both at startup.

And while we're at it, use a static initializer at startup
to save a library call and kill some ifdef.

[ruby-core:88578] [Bug #15013]
------------------------------------------------------------------------
r64484 | normal | 2018-08-21 05:45:40 +0900 (Tue, 21 Aug 2018) | 6 lines

test/socket/test_socket.rb (timestamp_retry_rw): IO.select before recvmsg

CI failures are still happening from these tests, but try
to break out of it earlier instead of holding up the job.

[Bug #14898]
------------------------------------------------------------------------
r64483 | eregon | 2018-08-21 00:48:27 +0900 (Tue, 21 Aug 2018) | 4 lines

Try 4 times for WIN32OLE specs

* They seem to fail a lot on:
  http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html
------------------------------------------------------------------------
r64482 | eregon | 2018-08-21 00:41:00 +0900 (Tue, 21 Aug 2018) | 6 lines

Revert r64471

* This reverts commit 9ab04897bd06767f773b35c6958a0551981093aa:
  "don't run specs add at r64409 on Windows"
* It doesn't seem to help:
  http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html
------------------------------------------------------------------------
r64481 | svn | 2018-08-21 00:34:00 +0900 (Tue, 21 Aug 2018) | 1 line

* 2018-08-21
------------------------------------------------------------------------
r64480 | kazu | 2018-08-21 00:33:59 +0900 (Tue, 21 Aug 2018) | 1 line

Remove extra semicolon
------------------------------------------------------------------------
r64479 | kazu | 2018-08-20 17:24:55 +0900 (Mon, 20 Aug 2018) | 6 lines

Update link to Email address specification

The current link leads to 404, I updated to the actual one.

[Fix GH-1929] [ci skip]
Author:    Nikolay Belov <travelerspb@gmail.com>
------------------------------------------------------------------------
r64478 | normal | 2018-08-20 10:43:10 +0900 (Mon, 20 Aug 2018) | 27 lines

spec/ruby/core/io/select_spec.rb: workaround stuck IO.select

Under pipe page memory pressure on Linux, a pipe may only be
created with a single buffer[1].  And as of Linux v4.18, the
fs/pipe.c::pipe_poll callback does not account for merging
done in fs/pipe::pipe_write; only the number of usable buffers
in the pipe.  Thus it is possible for a pipe to be writable
(if only by a small amount) despite IO.select saying it is not.

With the default 16384 /proc/sys/fs/pipe-user-pages-soft value
and the pipe having 16 pages of buffers, this issue is trivially
reproducible by creating 1024 pipes in a background process
before running the spec:

  $ ulimit -n 2053 # or something higher
  $ ./miniruby -e '1024.times.map { IO.pipe }; sleep' &
  $ make test-spec MSPECOPT=spec/ruby/core/io/select_spec.rb

So, we create a new pipe we never write to for testing
writability of IO.select.  This may cause the test to fail with
ENFILE on an overloaded system, but at least that's an obvious
failure (unlike having a test get stuck).  This should reduce
failures on our overloaded CI machines:

   http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1239426

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pipe.c?h=v4.18#n642
------------------------------------------------------------------------
r64477 | normal | 2018-08-20 08:36:23 +0900 (Mon, 20 Aug 2018) | 3 lines

thread_sync.c (rb_condvar_initialize): remove extra semicolon

Oops :x
------------------------------------------------------------------------
r64476 | normal | 2018-08-20 07:20:22 +0900 (Mon, 20 Aug 2018) | 13 lines

thread_sync.c (rb_mutex_sleep): disable interrupt checking in ensure

This is needed to reliably fix ConditionVariable#wait on Thread#kill
[Bug #14999] because there is still a chance an interrupt could fire
and prevent lock acquisition after an ensure statement.

Arguably, rb_mutex_lock itself should be uninterruptible, but that
already prevents bootstraptest/test_thread.rb from completing and
probably breaks existing use cases.

For reference, POSIX expressly forbids EINTR from pthread_mutex_lock.

[ruby-core:88556] [Bug #14999]
------------------------------------------------------------------------
r64475 | normal | 2018-08-20 05:40:42 +0900 (Mon, 20 Aug 2018) | 4 lines

thread.c (rb_thread_fd_select): fix off-by-one with sigwait_fd

select(2) needs the nfds argument to be one higher than the
largest FD in the sets :x
------------------------------------------------------------------------
r64474 | normal | 2018-08-20 05:16:15 +0900 (Mon, 20 Aug 2018) | 4 lines

thread_sync.rb (rb_condvar_wait): golf out unnecessary variables

GCC is smart enough to optimize these away, but my attention
span is too short :{
------------------------------------------------------------------------
r64473 | svn | 2018-08-20 05:16:10 +0900 (Mon, 20 Aug 2018) | 1 line

* 2018-08-20
------------------------------------------------------------------------
r64472 | normal | 2018-08-20 05:16:09 +0900 (Mon, 20 Aug 2018) | 1 line

test/ruby/test_io.rb (test_select_leak): quiet unused variable warning
------------------------------------------------------------------------
r64471 | naruse | 2018-08-19 22:25:11 +0900 (Sun, 19 Aug 2018) | 3 lines

don't run specs add at r64409 on Windows

Maybe it breaks http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180817T095734Z.fail.html.gz
------------------------------------------------------------------------
r64470 | eregon | 2018-08-19 22:23:49 +0900 (Sun, 19 Aug 2018) | 4 lines

select() on all platforms for Socket#recvmsg_nonblock spec

* The specs above already do that, and Solaris needs it too:
  https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180819T111806Z.fail.html.gz
------------------------------------------------------------------------
r64469 | nobu | 2018-08-19 10:55:27 +0900 (Sun, 19 Aug 2018) | 1 line

NEWS: categorized new entries all
------------------------------------------------------------------------
r64468 | kazu | 2018-08-19 10:33:33 +0900 (Sun, 19 Aug 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64467 | normal | 2018-08-19 09:01:08 +0900 (Sun, 19 Aug 2018) | 13 lines

thread_pthread.c: reset timeslice delay when uncontended

This matches the behavior of old timer thread more closely
and seems to fix [Bug #14999] when limited to a single CPU.
I cannot reproduce the error on a multi-core system unless
I use schedtool to force affinity to a single CPU:

schedtool -a 0x01 -e make test-spec \
	MSPECOPT='-R1000 spec/ruby/library/conditionvariable/wait_spec.rb'

While it may be good enough to pass the spec, I don't have
huge degree of confidence in the interrupt handling robustness
under extremely heavy load (these may be ancient bugs, though).
------------------------------------------------------------------------
r64466 | normal | 2018-08-19 09:01:03 +0900 (Sun, 19 Aug 2018) | 3 lines

Revert "thread_sync.c (rb_mutex_sleep): skip interrupt check before sleep"

This reverts commit 2e420b8b99db4a5b81e2deda1ca386d59ad6bcba (r64464)
------------------------------------------------------------------------
r64465 | eregon | 2018-08-19 08:49:34 +0900 (Sun, 19 Aug 2018) | 1 line

Guard spec which only works on Linux
------------------------------------------------------------------------
r64464 | normal | 2018-08-19 05:04:07 +0900 (Sun, 19 Aug 2018) | 5 lines

thread_sync.c (rb_mutex_sleep): skip interrupt check before sleep

We do not want to risk switching threads before going to sleep
because it can cause unexpected wakeups and put us in an
unexpected state when used with ConditionVariable.
------------------------------------------------------------------------
r64463 | eregon | 2018-08-19 04:37:46 +0900 (Sun, 19 Aug 2018) | 3 lines

Special case for Solaris 11x on RubyCI

* Where localhost is an alias but not the primary name of 127.0.0.1.
------------------------------------------------------------------------
r64462 | eregon | 2018-08-19 04:37:29 +0900 (Sun, 19 Aug 2018) | 4 lines

Be more flexible in the protocol value returned by getaddrinfo()

* Only Solaris 2.10 i386 and Windows seem to return 0 it and other
  Solaris seem to fill the value.
------------------------------------------------------------------------
r64461 | eregon | 2018-08-19 04:37:12 +0900 (Sun, 19 Aug 2018) | 1 line

Adapt pack_sockaddr_in specs for Solaris
------------------------------------------------------------------------
r64460 | eregon | 2018-08-19 04:36:57 +0900 (Sun, 19 Aug 2018) | 3 lines

Use ftp for the service in getaddrinfo/getnameinfo/getservbyname specs

* Solaris cannot resolve 'http' but can resolve 'ftp'.
------------------------------------------------------------------------
r64459 | eregon | 2018-08-19 04:36:41 +0900 (Sun, 19 Aug 2018) | 1 line

Simplify to a more standardized Socket SCM constant in specs
------------------------------------------------------------------------
r64458 | eregon | 2018-08-19 04:36:26 +0900 (Sun, 19 Aug 2018) | 1 line

Add guards for Solaris for socket specs
------------------------------------------------------------------------
r64457 | eregon | 2018-08-19 04:36:10 +0900 (Sun, 19 Aug 2018) | 1 line

Adapt spec to consider Solaris
------------------------------------------------------------------------
r64456 | eregon | 2018-08-19 04:35:54 +0900 (Sun, 19 Aug 2018) | 4 lines

Use 127.0.0.1 instead of localhost in Addrinfo specs

* Solaries doesn't support Addrinfo.getaddrinfo('localhost', 80),
  but supports Addrinfo.getaddrinfo('127.0.0.1', 80).
------------------------------------------------------------------------
r64455 | eregon | 2018-08-19 04:35:37 +0900 (Sun, 19 Aug 2018) | 4 lines

Accept TypeError for Socket#getnameinfo

* Happens when VALIDATE_SOCKLEN() actually checks the length such as on
  FreeBSD.
------------------------------------------------------------------------
r64454 | eregon | 2018-08-19 04:35:20 +0900 (Sun, 19 Aug 2018) | 4 lines

Always set autoclose=false for IO.for_fd fds

* I believe this should be default behavior, see [Feature #2250].
* Now make test-spec MSPECOPT='-R100 spec/ruby/library/socket' works fine.
------------------------------------------------------------------------
r64453 | svn | 2018-08-19 04:35:03 +0900 (Sun, 19 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64452 | eregon | 2018-08-19 04:35:02 +0900 (Sun, 19 Aug 2018) | 5 lines

Re-add socket specs

* This reverts commit df9521fd043df1fb862e46f9b1af83223f16eb2d:
  "Remove failing spec files"
* Platform guards follow in the next commits.
------------------------------------------------------------------------
r64451 | normal | 2018-08-19 04:03:44 +0900 (Sun, 19 Aug 2018) | 6 lines

Revert "thread.c (sleep_*): check interrupt before changing th->status"

This reverts commit 9e59487a38d914275bedcde723923f22b3779e59 (r64449)

More (but different) CI failures I can't reproduce locally...
http://ci.rvm.jp/results/trunk-test@ruby-sky3/1235951
------------------------------------------------------------------------
r64450 | svn | 2018-08-19 03:29:29 +0900 (Sun, 19 Aug 2018) | 1 line

* 2018-08-19
------------------------------------------------------------------------
r64449 | normal | 2018-08-19 03:29:28 +0900 (Sun, 19 Aug 2018) | 8 lines

thread.c (sleep_*): check interrupt before changing th->status

Having threads switch before we sleep can cause applications
to misread the state of the thread.  Now, we are consistent
with blocking_region_begin behavior and change th->status
AFTER checking interrupts.

Maybe this can fix [Bug #15002]
------------------------------------------------------------------------
r64448 | eregon | 2018-08-18 22:52:53 +0900 (Sat, 18 Aug 2018) | 7 lines

Revert r64441

* This reverts commit 647fc1227a4146ecbfeb0d59358abc8d99cd8ae6:
  "thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex"
* Let's try to preserve the semantics of always being locked inside
  Mutex#synchronize, even if an exception interrupts ConditionVariable#wait.
* As discussed on [Bug #14999].
------------------------------------------------------------------------
r64447 | naruse | 2018-08-18 21:35:28 +0900 (Sat, 18 Aug 2018) | 4 lines

Temporary revert "process.c: dead code when no SIGCHLD"

This reverts commit r64407.
Maybe it breaks http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180817T095734Z.fail.html.gz
------------------------------------------------------------------------
r64446 | nobu | 2018-08-18 18:56:43 +0900 (Sat, 18 Aug 2018) | 1 line

NEWS: quote false [ci skip]
------------------------------------------------------------------------
r64445 | nobu | 2018-08-18 18:53:11 +0900 (Sat, 18 Aug 2018) | 4 lines

NEWS: converted to Markdown [ci skip]

* NEWS: Converted to Markdown format, from (wrongly) Markdown-mixed
  RDoc format.
------------------------------------------------------------------------
r64444 | normal | 2018-08-18 18:07:36 +0900 (Sat, 18 Aug 2018) | 10 lines

thread.c (sleep_*): reduce the effect of spurious interrupts

Spurious interrupts from SIGCHLD cause Mutex#sleep (via
ConditionVariable#wait) to return early and breaks some use
cases.  Since these are outside the programs's control with
MJIT, we will only consider pending interrupts (e.g. those
from Thread#run) and signals which cause a Ruby-level Signal.trap
handler to fire as "spurious" wakeups.

[ruby-core:88537] [Feature #15002]
------------------------------------------------------------------------
r64442 | kazu | 2018-08-18 16:26:23 +0900 (Sat, 18 Aug 2018) | 1 line

[DOC] Fix indent [ci skip]
------------------------------------------------------------------------
r64441 | normal | 2018-08-18 15:33:49 +0900 (Sat, 18 Aug 2018) | 14 lines

thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex

If an exception is raised inside Mutex#sleep (via ConditionVariable#wait),
we cannot guarantee we can own the mutex in the ensure callback.

However, who owns the mutex at that point does not matter.  What
matters is the Mutex is usable after an exception occurs.

* thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex

* spec/ruby/library/conditionvariable/wait_spec.rb: only test lock
  usability after thread kill.  Who owns the lock at any
  particular moment is an implementation detail which we cannot
  easily guarantee.
------------------------------------------------------------------------
r64440 | normal | 2018-08-18 15:05:17 +0900 (Sat, 18 Aug 2018) | 5 lines

Revert "thread_sync.c (do_sleep): avoid thread-switch/interrupt check"

This reverts commit d7ddbff2954ba22b71bdfeba4b94e1c4fb91efb0 (r64436)

Seems worthless at preventing CI failures
------------------------------------------------------------------------
r64436 | normal | 2018-08-18 13:24:31 +0900 (Sat, 18 Aug 2018) | 13 lines

thread_sync.c (do_sleep): avoid thread-switch/interrupt check

Calling rb_mutex_sleep directly should avoid
thread-switching/interrupt checking which can lead to occasional
failures.

Unfortunately, this means overriding Mutex#sleep is no longer
supported.  Will let this commit run for a bit see if CI failures
from ConditionVariable specs continue...

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20180817T213003Z.fail.html.gz

[ruby-core:88524] [Bug #14999]
------------------------------------------------------------------------
r64433 | kazu | 2018-08-18 13:09:48 +0900 (Sat, 18 Aug 2018) | 1 line

Suppress read of ~/.irbrc
------------------------------------------------------------------------
r64429 | nobu | 2018-08-18 11:44:35 +0900 (Sat, 18 Aug 2018) | 1 line

test/ruby/test_system.rb: suppress prompt and echo on Windows
------------------------------------------------------------------------
r64427 | k0kubun | 2018-08-18 11:20:46 +0900 (Sat, 18 Aug 2018) | 3 lines

test/lib/zombie_hunter.rb: enable zombie hunter for MJIT

I think this issue is solved by Eric Wong.
------------------------------------------------------------------------
r64426 | k0kubun | 2018-08-18 11:15:41 +0900 (Sat, 18 Aug 2018) | 6 lines

test_function.rb: try running test_nogvl_poll again

According to some runs in mjit-test (make test-all RUN_OPTS="--jit-wait"),
this test might not be the cause of its failure.

So, let me try running this again.
------------------------------------------------------------------------
r64425 | k0kubun | 2018-08-18 11:04:44 +0900 (Sat, 18 Aug 2018) | 4 lines

tool/downloader.rb: retry 500 from GitHub

Unfortunately, GitHub may return 500 for temporary failure:
https://travis-ci.org/ruby/ruby/builds/417246523
------------------------------------------------------------------------
r64424 | k0kubun | 2018-08-18 10:10:03 +0900 (Sat, 18 Aug 2018) | 9 lines

mjit_worker.c: revert r64322 and r64323

I gave up to introduce the optimization that skips pc motion by checking
C code's line number. The same code can often be shared by multiple
program counters and it's so hard to achieve the optimization in MJIT's
architecture.

Reverting to improve performance by removing -g1 and to remove so file
when it becomes not necessary.
------------------------------------------------------------------------
r64423 | svn | 2018-08-18 08:51:48 +0900 (Sat, 18 Aug 2018) | 1 line

* 2018-08-18
------------------------------------------------------------------------
r64422 | eregon | 2018-08-18 08:51:47 +0900 (Sat, 18 Aug 2018) | 3 lines

Guard spec failing on Solaris

* https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180817T182406Z.fail.html.gz
------------------------------------------------------------------------
r64417 | eregon | 2018-08-17 23:52:18 +0900 (Fri, 17 Aug 2018) | 1 line

Add guard for Solaris in Socket#connect_nonblock spec
------------------------------------------------------------------------
r64416 | eregon | 2018-08-17 22:07:37 +0900 (Fri, 17 Aug 2018) | 1 line

Guard connect_nonblock spec on FreeBSD
------------------------------------------------------------------------
r64415 | eregon | 2018-08-17 22:07:24 +0900 (Fri, 17 Aug 2018) | 1 line

Guard with a :pktinfo feature specs relying on PKTINFO
------------------------------------------------------------------------
r64414 | eregon | 2018-08-17 22:07:11 +0900 (Fri, 17 Aug 2018) | 4 lines

Re-add specs

* This reverts commit 325fd389018897bd156837639675517ef3b7dea5.
* Platform guards in the next commit.
------------------------------------------------------------------------
r64413 | eregon | 2018-08-17 20:22:55 +0900 (Fri, 17 Aug 2018) | 1 line

Add a note how to run specs under older Ruby versions
------------------------------------------------------------------------
r64412 | eregon | 2018-08-17 20:22:43 +0900 (Fri, 17 Aug 2018) | 1 line

Fix typo in version guard
------------------------------------------------------------------------
r64411 | eregon | 2018-08-17 20:22:30 +0900 (Fri, 17 Aug 2018) | 3 lines

Add version guards for Enumerator::ArithmeticSequence

* And keep specs for older versions.
------------------------------------------------------------------------
r64410 | eregon | 2018-08-17 19:14:01 +0900 (Fri, 17 Aug 2018) | 1 line

spec/README.md: add a note about version guards
------------------------------------------------------------------------
r64409 | eregon | 2018-08-17 18:51:26 +0900 (Fri, 17 Aug 2018) | 3 lines

Integrate new specs for ConditionVariable#wait to prevent regressions

* See [Bug #14999].
------------------------------------------------------------------------
r64408 | normal | 2018-08-17 16:47:26 +0900 (Fri, 17 Aug 2018) | 3 lines

NEWS: clarify that we still use FD_CLOEXEC [ci skip]

[Misc #14907]
------------------------------------------------------------------------
r64407 | nobu | 2018-08-17 14:59:45 +0900 (Fri, 17 Aug 2018) | 6 lines

process.c: dead code when no SIGCHLD

* process.c (ruby_waitpid_all): nothing to do unless SIGCHLD is
  available.

* signal.c (ruby_nocldwait): used only if SIGCHLD is available.
------------------------------------------------------------------------
r64406 | kazu | 2018-08-17 13:01:12 +0900 (Fri, 17 Aug 2018) | 1 line

[DOC] Add ticket number [ci skip]
------------------------------------------------------------------------
r64405 | kazu | 2018-08-17 13:00:09 +0900 (Fri, 17 Aug 2018) | 1 line

[DOC] Update NEWS about close_others [ci skip]
------------------------------------------------------------------------
r64404 | mame | 2018-08-17 12:36:01 +0900 (Fri, 17 Aug 2018) | 1 line

vm.c: add a simple rdoc for RubyVM
------------------------------------------------------------------------
r64403 | normal | 2018-08-17 11:06:54 +0900 (Fri, 17 Aug 2018) | 5 lines

thread_pthread.c (rb_sigwait_fd_get): skip getpid check

This is not called in signal handlers, so there's no reason for
it.  glibc 2.25+ no longer caches getpid(), so it will cost a
syscall for those users.
------------------------------------------------------------------------
r64402 | nobu | 2018-08-17 10:39:49 +0900 (Fri, 17 Aug 2018) | 4 lines

signal.c: no SIGCHLD, no sigchld_hit

* signal.c (sigchld_hit): if SIGCHLD is not available, this variable
  never sets.
------------------------------------------------------------------------
r64401 | nobu | 2018-08-17 10:37:58 +0900 (Fri, 17 Aug 2018) | 1 line

ast.c (rb_ast_node_type): return frozen strings
------------------------------------------------------------------------
r64400 | nobu | 2018-08-17 10:14:37 +0900 (Fri, 17 Aug 2018) | 1 line

passing non-stdio fds is not supported on Windows
------------------------------------------------------------------------
r64399 | normal | 2018-08-17 08:56:08 +0900 (Fri, 17 Aug 2018) | 15 lines

process.c: defaults to close_others false

Arbitrarily closing file descriptors on exec breaks use cases
where a Ruby process sets up a descriptor for non-Ruby children
to use.  For example, the "rake foo" target may spawn any number
of subprocesses (Ruby or not) which depends on parsing the "FOO"
environment variable for out_fd:99 and writing to foo.out

    FOO=out_fd:99 rake foo 99>>foo.out

Unfortunately, this introduced one incompatibility in
test/lib/test/unit.rb and it now requires explicitly setting
IO#close_on_exec=true

[ruby-core:88007] [Misc #14907]
------------------------------------------------------------------------
r64398 | normal | 2018-08-17 04:59:21 +0900 (Fri, 17 Aug 2018) | 15 lines

thread_sync.c (rb_mutex_lock): acquire lock before being killed

We (the thread acquiring the mutex) need to acquire the mutex
before being killed to work with ConditionVariable#wait.

Thus we reinstate the acquire-immediately-after-sleeping logic
from pre-r63711 while still retaining the
acquire-after-checking-for-interrupts logic from r63711.

This regression was introduced in
commit 501069b8a4013f2e3fdde35c50e9527ef0061963 (r63711)
("thread_sync.c (rb_mutex_lock): fix deadlock") for
[Bug #14841]

[ruby-core:88503] [Bug #14999] [Bug #14841]
------------------------------------------------------------------------
r64397 | nobu | 2018-08-17 01:11:55 +0900 (Fri, 17 Aug 2018) | 1 line

Makefile.sub: remove -DRUBY_EXPORT overridden by -U option
------------------------------------------------------------------------
r64396 | svn | 2018-08-17 01:11:55 +0900 (Fri, 17 Aug 2018) | 1 line

* 2018-08-17
------------------------------------------------------------------------
r64395 | nobu | 2018-08-17 01:11:54 +0900 (Fri, 17 Aug 2018) | 1 line

appveyor.yml: run on all branches
------------------------------------------------------------------------
r64394 | kazu | 2018-08-16 21:14:11 +0900 (Thu, 16 Aug 2018) | 1 line

Remove outdated comment [ci skip]
------------------------------------------------------------------------
r64393 | naruse | 2018-08-16 19:50:53 +0900 (Thu, 16 Aug 2018) | 1 line

skip examples failing on solaris
------------------------------------------------------------------------
r64392 | nobu | 2018-08-16 18:46:20 +0900 (Thu, 16 Aug 2018) | 5 lines

configure.ac: LIBPATHENV on macOS

* configure.ac (LIBPATHENV): use DYLD_FALLBACK_LIBRARY_PATH instead of
  DYLD_LIBRARY_PATH on macOS, to honor runtime paths embedded in the
  binaries.  [ruby-core:88487] [Bug #14992]
------------------------------------------------------------------------
r64391 | nobu | 2018-08-16 18:27:53 +0900 (Thu, 16 Aug 2018) | 4 lines

Makefile.in: dependencies to config.status

* Makefile.in (ruby.pc, ruby-runner.h): fix missing dependencies.
  config.status is needed to be up to date, to run it.
------------------------------------------------------------------------
r64390 | normal | 2018-08-16 18:16:11 +0900 (Thu, 16 Aug 2018) | 5 lines

thread.c (consume_communication_pipe): disarm UBF_TIMER before consume

Same reasoning as the disarm in rb_sigwait_fd_get, the current
thread is already processing signals, so we do not need
UBF_TIMER to continually kick the process, anymore.
------------------------------------------------------------------------
r64389 | normal | 2018-08-16 17:26:56 +0900 (Thu, 16 Aug 2018) | 5 lines

thread_pthread.c: reduce ubf_timer arming for non-signal wakeups

We do not need to rely on SIGVTALRM for non-sighandler wakeups.
This will reduce spurious wakeups in cases where sigwait_fd
is not grabbed again, soon.
------------------------------------------------------------------------
r64388 | normal | 2018-08-16 17:26:51 +0900 (Thu, 16 Aug 2018) | 8 lines

thread_pthread.c: check signals from gvl.timer

For (rare) blocking functions which are not affected by signals,
we need to call the appropriate unblocking function via
`threadptr_trap_interrupt'

While we're at it, handling waitpid/SIGCHLD from gvl.timer isn't
harmful, here.
------------------------------------------------------------------------
r64387 | normal | 2018-08-16 12:37:14 +0900 (Thu, 16 Aug 2018) | 13 lines

test/net/imap/test_imap.rb (test_exception_during_idle): kill infinite looper

It is possible for Mutex#sleep (via ConditionVariable#wait)
to prematurely wake up under MJIT (because Mutex#sleep can't
handle spurious wakeups).  This affects @idle_done_cond in
Net::IMAP#idle and means the response handler may never
set `in_idle' to `true`.

In any case, ensure the infinite looping `raiser' thread
stops running when the test is done.

Will work on reducing the effect of spurious wakeups from
MJIT...
------------------------------------------------------------------------
r64386 | svn | 2018-08-16 09:58:22 +0900 (Thu, 16 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64385 | nobu | 2018-08-16 09:58:21 +0900 (Thu, 16 Aug 2018) | 7 lines

Adding Enumerator::Lazy#uniq and Enumerator::Lazy#grep_v to proc chaining

[Feature #14994]

[Fix GH-1930]

From: Anmol Chopra <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64384 | nobu | 2018-08-16 09:13:47 +0900 (Thu, 16 Aug 2018) | 1 line

enumerator.c: id_lazy is no longer used since r38923
------------------------------------------------------------------------
r64383 | nobu | 2018-08-16 09:05:08 +0900 (Thu, 16 Aug 2018) | 1 line

apply r64239 to macOS too
------------------------------------------------------------------------
r64382 | svn | 2018-08-16 03:56:35 +0900 (Thu, 16 Aug 2018) | 1 line

* 2018-08-16
------------------------------------------------------------------------
r64381 | normal | 2018-08-16 03:56:34 +0900 (Thu, 16 Aug 2018) | 3 lines

test/ripper/test_parser_events.rb (test_block_variables): bump RLIMIT_AS again

I still seem to need more memory for parallel tests with MJIT...
------------------------------------------------------------------------
r64380 | akr | 2018-08-15 23:24:44 +0900 (Wed, 15 Aug 2018) | 2 lines

gmtimew_noleapsecond uses tables for mon and mday.

------------------------------------------------------------------------
r64379 | nobu | 2018-08-15 21:53:45 +0900 (Wed, 15 Aug 2018) | 1 line

spec/ruby/optional/capi/ext/io_spec.c: guard unreachable code
------------------------------------------------------------------------
r64378 | nobu | 2018-08-15 20:01:30 +0900 (Wed, 15 Aug 2018) | 1 line

spec/ruby/optional/capi/ext/io_spec.c: guard unreachable code
------------------------------------------------------------------------
r64377 | normal | 2018-08-15 16:16:55 +0900 (Wed, 15 Aug 2018) | 5 lines

thread_pthread.c: hoist out do_gvl_timer and improve documentation

This hopefully clarifies the roles of UBF_TIMER and vm->gvl.timer

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64376 | normal | 2018-08-15 14:54:41 +0900 (Wed, 15 Aug 2018) | 6 lines

vm_core.h (rb_thread_t): pack small fields together

On a 64-bit system, this reduces rb_thread_t from 536 to 520 bytes.
Depending on the allocation, this can reduce cacheline access
for checking the abort_on_exception, report_on_exception and
pending_interrupt_queue_checked flags.
------------------------------------------------------------------------
r64375 | normal | 2018-08-15 14:31:31 +0900 (Wed, 15 Aug 2018) | 6 lines

thread_pthread.h (native_thread_data): split list_node between ubf and gvl

Do not waste extra memory for each thread, but make
thread_pthread.c easier-to-follow as a result.

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64374 | k0kubun | 2018-08-15 13:51:10 +0900 (Wed, 15 Aug 2018) | 11 lines

test_function.rb: skip running test

that times out with test-all w/ --jit-wait.

I'm running the following command on Wecker CI everyday:
```
make test-all TESTOPTS="--color=never --job-status=normal" RUN_OPTS="--disable-gems --jit-wait --jit-warnings" RUBY_FORCE_TEST_JIT=1
```

By running yesterday's all commits, r64354 ran successfully but r64355
didn't. So the test should be fixed to run with --jit-wait at first.
------------------------------------------------------------------------
r64373 | normal | 2018-08-15 13:32:46 +0900 (Wed, 15 Aug 2018) | 7 lines

thread_pthread.c: rename rb_timer_* to ubf_timer_*

These functions will not be exported outside of thread_pthread.c
and we need to clarify the timer here is used for ubf and not
timeslice.

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64372 | normal | 2018-08-15 13:32:41 +0900 (Wed, 15 Aug 2018) | 5 lines

thread_pthread.c: rename timer_thread_pipe to signal_self_pipe

This data structure has nothing to do with timers or threads.

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64371 | normal | 2018-08-15 13:32:36 +0900 (Wed, 15 Aug 2018) | 5 lines

thread_pthread.c: additional UBF_TIMER == UBF_TIMER_PTHREAD guards

Hopefully this makes the code easier-to-follow

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64370 | nobu | 2018-08-15 13:10:19 +0900 (Wed, 15 Aug 2018) | 1 line

appveyor.yml: no MSYS path conversion
------------------------------------------------------------------------
r64369 | k0kubun | 2018-08-15 12:03:18 +0900 (Wed, 15 Aug 2018) | 5 lines

test_readline.rb: skip teardown failure

https://ci.appveyor.com/project/ruby/ruby/build/9271/job/e88212s136mr0dgr

I'll take a look at MSP-Greg's patch on readline later.
------------------------------------------------------------------------
r64368 | nobu | 2018-08-15 11:15:13 +0900 (Wed, 15 Aug 2018) | 1 line

appveyor.yml: get rid of msys sh as possible
------------------------------------------------------------------------
r64367 | nobu | 2018-08-15 11:05:20 +0900 (Wed, 15 Aug 2018) | 1 line

-Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readable
------------------------------------------------------------------------
r64366 | k0kubun | 2018-08-15 10:55:09 +0900 (Wed, 15 Aug 2018) | 5 lines

test_env.rb: change mingw branch

https://github.com/MSP-Greg/ruby-loco/blob/e287cb739113da289271a017a1e7fa46cbfe47d9/patches/gte20600/test-ruby-test_env.rb_test_huge_value.patch

From: MSP-Greg (Greg L) <Greg.mpls@gmail.com>
------------------------------------------------------------------------
r64365 | k0kubun | 2018-08-15 10:40:57 +0900 (Wed, 15 Aug 2018) | 3 lines

skip tests failing on AppVeyor MinGW

Let me skip this to make CI green first and take a look later...
------------------------------------------------------------------------
r64364 | k0kubun | 2018-08-15 08:23:44 +0900 (Wed, 15 Aug 2018) | 4 lines

appveyor.yml: remove broken --name option

Currently all tests are skipped by the --name option.
V=1 is for debugging this issue.
------------------------------------------------------------------------
r64363 | normal | 2018-08-15 08:00:02 +0900 (Wed, 15 Aug 2018) | 7 lines

webrick/httpauth/htgroup.rb (flush): avoid unnecessary unlink

Based on patch by akr [ruby-core:88477], use Tempfile.create
to avoid unnecessary unlink call.  Unlike akr's original patch,
this does not change the return value of flush.

Thanks-to: Tanaka Akira <akr@fsij.org>
------------------------------------------------------------------------
r64362 | normal | 2018-08-15 07:59:57 +0900 (Wed, 15 Aug 2018) | 6 lines

Revert "test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files"

This reverts commit 52102f6ff50eebf8c16667c9b49cef579d2057c1 (r64238).

It is no longer necessary if we use Tempfile.create in
WEBrick::HTTPAuth::Htgroup#flush (see next commit)
------------------------------------------------------------------------
r64361 | normal | 2018-08-15 07:06:40 +0900 (Wed, 15 Aug 2018) | 6 lines

Revert "thread_pthread.c: use UBF_TIMER_PTHREAD on Solaris"

This reverts commit 31bfe0fe86433beddfec2b2bdba69dfda1775f8d (r64357)

commit 17ed23bb6dfc942a8c51658b01135c3e2807ccf0 (r64359,
"fix fragile spec from unpredictable errno") is the correct fix
------------------------------------------------------------------------
r64360 | svn | 2018-08-15 02:07:37 +0900 (Wed, 15 Aug 2018) | 1 line

* 2018-08-15
------------------------------------------------------------------------
r64359 | normal | 2018-08-15 02:07:36 +0900 (Wed, 15 Aug 2018) | 12 lines

spec/ruby/optional/capi/io_spec.rb: fix fragile spec from unpredictable errno

rb_io_wait_readable and rb_io_wait_writable depend on the TSD
errno value.  Due to the recent changes in r64352-r64353 to
restructure GVL, errno could be set to EAGAIN from the signal
self-pipe and cause the rb_io_wait_readable spec to block
unexpectedly.  This should fix rubyspec timeouts on Solaris:

  http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz

* spec/ruby/optional/capi/ext/io_spec.c: add errno= setter method
* spec/ruby/optional/capi/io_spec.rb: set errno to appropriate values for tests
------------------------------------------------------------------------
r64358 | nobu | 2018-08-14 20:58:17 +0900 (Tue, 14 Aug 2018) | 5 lines

non-symbol keys in kwargs

* class.c (separate_symbol): [EXPERIMENTAL] non-symbol key in keyword
  arguments hash causes an exception now.
  c.f. https://twitter.com/yukihiro_matz/status/1022287578995646464
------------------------------------------------------------------------
r64357 | normal | 2018-08-14 15:49:25 +0900 (Tue, 14 Aug 2018) | 8 lines

thread_pthread.c: use UBF_TIMER_PTHREAD on Solaris

I'm not sure what's causing this failure in Solaris and only
on rubyspec, since rb_io_wait_readable is a well-exercised
code path in other places.  But maybe using a pthread for
timing (similar to old timer-thread) can solve the issue.

cf. http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz
------------------------------------------------------------------------
r64356 | normal | 2018-08-14 11:24:37 +0900 (Tue, 14 Aug 2018) | 10 lines

thread_pthread.c: use CLOCK_REALTIME on SunOS (Solaris)

timer_create does not seem to support CLOCK_MONOTONIC on Solaris,
and CLOCK_HIRES seems like it could fail with insufficient permissions:

https://docs.oracle.com/cd/E86824_01/html/E54766/timer-create-3c.html

(Only tested on Linux and FreeBSD)

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64355 | normal | 2018-08-14 09:31:31 +0900 (Tue, 14 Aug 2018) | 11 lines

test/fiddle/test_function.rb (test_nogvl_poll): stop timer hack

EINTR seems unavoidable in real programs (or MJIT), so maybe
it's not worth dealing with.  r64353 relies on POSIX timers
to signal.

Switching pipes and sockets to non-blocking by default would let
us get rid of POSIX timers, timer pthread and this hack:
https://bugs.ruby-lang.org/issues/14968

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64354 | normal | 2018-08-14 07:19:54 +0900 (Tue, 14 Aug 2018) | 6 lines

thread_pthread (rb_timer_arm): ignore UBF_TIMER_POSIX state 2

It looks like I forgot to account for a situation involving 3
threads.

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64353 | normal | 2018-08-14 06:34:24 +0900 (Tue, 14 Aug 2018) | 19 lines

thread_pthread: use POSIX timer or thread to get rid of races

This closes race condition where GVL is uncontended and a thread
receives a signal immediately before calling the blocking
function when releasing GVL:

	1) check interrupts
	2) release GVL
	3) blocking function

If signal fires after 1) but before 3), that thread may never
wake up if GVL is uncontended

We also need to wakeup the ubf_list unconditionally on
gvl_yield; because two threads can be yielding to each other
while waiting on IO#close while waiting on threads in IO#read or
IO#gets.

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64352 | normal | 2018-08-14 06:34:20 +0900 (Tue, 14 Aug 2018) | 8 lines

thread_pthread.c: eliminate timer thread by restructuring GVL

This reverts commit 194a6a2c68e9c8a3536b24db18ceac87535a6051 (r64203).

Race conditions which caused the original reversion will be fixed
in the subsequent commit.

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64351 | naruse | 2018-08-14 04:12:23 +0900 (Tue, 14 Aug 2018) | 9 lines

FreeBSD 11.0 lacks ELFCOMPRESS_ZLIB

FreeBSD 11.0 unfortunately lacks ELF compression definitions in their
elf.h (sys/elf_common.h), and 11.1 introduced them.
https://github.com/freebsd/freebsd/commit/b9167d33a12b8a6c279be9cd1005874728e808c9

Though we can add workaround, we simply drop support because
FreeBSD 11.0 is already EOL at November 30, 2017.
https://www.freebsd.org/security/unsupported.html
------------------------------------------------------------------------
r64350 | k0kubun | 2018-08-14 01:03:47 +0900 (Tue, 14 Aug 2018) | 5 lines

appveyor.yml: install gdbm

which is missing on AppVeyor environment

https://github.com/ruby/ruby/commit/6a1e323ae88101cfed3fc4591d6e6a3bd8c05f02#commitcomment-30056791
------------------------------------------------------------------------
r64349 | svn | 2018-08-14 00:29:41 +0900 (Tue, 14 Aug 2018) | 1 line

* 2018-08-14
------------------------------------------------------------------------
r64348 | k0kubun | 2018-08-14 00:29:40 +0900 (Tue, 14 Aug 2018) | 1 line

appveyor.yml: add MinGW build
------------------------------------------------------------------------
r64347 | kazu | 2018-08-13 23:54:32 +0900 (Mon, 13 Aug 2018) | 1 line

fix typos [ci skip]
------------------------------------------------------------------------
r64346 | usa | 2018-08-13 23:33:06 +0900 (Mon, 13 Aug 2018) | 2 lines

mention about r64337

------------------------------------------------------------------------
r64345 | usa | 2018-08-13 23:29:21 +0900 (Mon, 13 Aug 2018) | 2 lines

Add some tests for *method_defined?

------------------------------------------------------------------------
r64344 | kazu | 2018-08-13 22:50:48 +0900 (Mon, 13 Aug 2018) | 1 line

Fix test bug
------------------------------------------------------------------------
r64343 | usa | 2018-08-13 22:48:27 +0900 (Mon, 13 Aug 2018) | 4 lines

Fix problem about notimplemented case

Re-revert r64340, and take care about notimplemented case.

------------------------------------------------------------------------
r64342 | k0kubun | 2018-08-13 22:46:06 +0900 (Mon, 13 Aug 2018) | 7 lines

appveyor.yml: drop unnecessary 1.0. prefix

from version.

Also I fixed the wrong way of using `for:`.
Specifying `for` without `matrix.only` was just useless.
This fix is for adding MinGW matrix in the future.
------------------------------------------------------------------------
r64341 | kazu | 2018-08-13 22:27:49 +0900 (Mon, 13 Aug 2018) | 1 line

Add test for method_defined?(notimplement)
------------------------------------------------------------------------
r64340 | kazu | 2018-08-13 22:27:47 +0900 (Mon, 13 Aug 2018) | 1 line

Revert "Support optional inherit argument for Module#method_defined?"
------------------------------------------------------------------------
r64339 | usa | 2018-08-13 21:42:55 +0900 (Mon, 13 Aug 2018) | 2 lines

get rid of an encode noncompatible error

------------------------------------------------------------------------
r64338 | svn | 2018-08-13 21:42:04 +0900 (Mon, 13 Aug 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64337 | usa | 2018-08-13 21:42:03 +0900 (Mon, 13 Aug 2018) | 51 lines

Support optional inherit argument for Module#method_defined?

Module has many introspection methods for methods and constants that
either return an array or return true or false for whether the method
or constant is defined. Most of these methods support an optional
argument that controls whether to consider inheritance.  Currently,
the following Module methods support such a argument:

* const_defined?
* constants
* instance_methods
* private_instance_methods
* protected_instance_methods
* public_instance_methods

and the following methods do not:

* method_defined?
* private_method_defined?
* protected_method_defined?
* public_method_defined?

This patch supports such an argument for the *method_defined?
methods.

While you can currently work around the lack of support via:

  mod.instance_methods(false).include?(:method_name)

This patch allows the simpler and more efficient:

  mod.method_defined?(:method_name, false)

One case where you want to exclude inheritance when checking
for a method definition is when you want to replace a method
that may already exist.  To avoid a verbose warning, you want
to remove the method only if it is already defined:

  remove_method(:foo) if method_defined?(:foo, false)
  define_method(:foo){}

You can't call remove_method without checking for the method
definition, as that can raise a NameError, and you don't want
to include inheritance because remove_method will still raise
a NameError if the method is defined by an ancestor and not
by the module itself.

[ruby-core:88140] [Feature #14944]

From: Jeremy Evans <code@jeremyevans.net>

------------------------------------------------------------------------
r64336 | kazu | 2018-08-13 21:22:43 +0900 (Mon, 13 Aug 2018) | 3 lines

test/rinda/test_rinda.rb: Start keeper only on used tests

to reduce sleeping threads on unrelated tests
------------------------------------------------------------------------
r64335 | k0kubun | 2018-08-13 20:02:37 +0900 (Mon, 13 Aug 2018) | 3 lines

Makefile.in: drop MJIT_DLDFLAGS_NOCOMPRESS

which is obsoleted by r64331
------------------------------------------------------------------------
r64334 | naruse | 2018-08-13 17:48:30 +0900 (Mon, 13 Aug 2018) | 1 line

Don't free allocated uncompressed_debug_line until backtrace is printed
------------------------------------------------------------------------
r64333 | naruse | 2018-08-13 16:55:43 +0900 (Mon, 13 Aug 2018) | 1 line

Re-apply wrongly reverted r64330
------------------------------------------------------------------------
r64332 | naruse | 2018-08-13 15:31:37 +0900 (Mon, 13 Aug 2018) | 1 line

Define parse_compressed_debug_line() only ifdef SUPPORT_COMPRESSED_DEBUG_LINE
------------------------------------------------------------------------
r64331 | naruse | 2018-08-13 15:20:12 +0900 (Mon, 13 Aug 2018) | 5 lines

support compressed debug_line

re-commit r64328
https://blogs.oracle.com/solaris/elf_section_compression-v2
https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/
------------------------------------------------------------------------
r64330 | nobu | 2018-08-13 15:09:57 +0900 (Mon, 13 Aug 2018) | 7 lines

configure.ac: use linker_flag to LIBRUBY_DLDFLAGS

* configure.ac: use a feature flag `linker_flag`, than checking if the
  compiler is `GCC`.

* configure.ac: append to LIBRUBY_DLDFLAGS once after initialized with
  DLDFLAGS.
------------------------------------------------------------------------
r64329 | naruse | 2018-08-13 15:05:39 +0900 (Mon, 13 Aug 2018) | 3 lines

Revert "support compressed debug_line"

This reverts commit r64328
------------------------------------------------------------------------
r64328 | naruse | 2018-08-13 11:56:06 +0900 (Mon, 13 Aug 2018) | 4 lines

support compressed debug_line

https://blogs.oracle.com/solaris/elf_section_compression-v2
https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/
------------------------------------------------------------------------
r64327 | akr | 2018-08-13 01:45:02 +0900 (Mon, 13 Aug 2018) | 2 lines

timegm_noleapsecond uses calc_tm_yday.

------------------------------------------------------------------------
r64326 | k0kubun | 2018-08-13 00:16:00 +0900 (Mon, 13 Aug 2018) | 9 lines

configure.ac: use the correct argument

for --compress-debug-sections. I thought "no" is the correct one because
configure.ac has `AS_IF([test "x$compress_debug_sections" != xno]`, but
it wasn't the case.

This commit is needed to resolve errors like:
/usr/bin/x86_64-linux-gnu-ld: invalid --compress-debug-sections option: `no'
collect2: error: ld returned 1 exit status
------------------------------------------------------------------------
r64325 | k0kubun | 2018-08-13 00:13:06 +0900 (Mon, 13 Aug 2018) | 11 lines

configure.ac: MJIT_DLDFLAGS_NOCOMPRESS

is configured now, to force -Wl,--compress-debug-sections=no
for MJIT only when the option is used in MJIT_DLDFLAGS.

This needs to be done in configure.ac to resolve build failure like
https://travis-ci.org/ruby/ruby/builds/415120662.

Makefile.in: define it in mjit_config.h

mjit_worker.c: replace hard-coded flag to MJIT_DLDFLAGS_NOCOMPRESS
------------------------------------------------------------------------
r64324 | svn | 2018-08-13 00:00:05 +0900 (Mon, 13 Aug 2018) | 1 line

* 2018-08-13
------------------------------------------------------------------------
r64323 | k0kubun | 2018-08-13 00:00:03 +0900 (Mon, 13 Aug 2018) | 6 lines

mjit_worker.c: lazily delete so file

on ELF.

I need symbol name and line number to lazily create program counter for
optimization on ELF binary.
------------------------------------------------------------------------
r64322 | k0kubun | 2018-08-12 23:42:25 +0900 (Sun, 12 Aug 2018) | 6 lines

mjit_worker.c: allow showing line number

on addr2line.c, if --jit-save-temps is specified.

I'm going to use the line number to lazily create program counter to
improve the performance degraded in r64283.
------------------------------------------------------------------------
r64321 | k0kubun | 2018-08-12 21:59:47 +0900 (Sun, 12 Aug 2018) | 3 lines

mjit.c: reduce the number of variables

in mark_ec_units() to simplify code.
------------------------------------------------------------------------
r64318 | nobu | 2018-08-12 17:10:53 +0900 (Sun, 12 Aug 2018) | 5 lines

Optimization for case when with splat operator

[Fix GH-1928] [Feature #14984]

From: chopraanmol1 <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64317 | k0kubun | 2018-08-12 15:00:31 +0900 (Sun, 12 Aug 2018) | 8 lines

tool/downloader.rb: increase retries

GitHub download failed on 13:50:36
https://ci.appveyor.com/project/ruby/ruby/build/1.0.9221 and it also
failed on 13:51:35 (all builds between them failed too).

It means that we need to expect GitHub 502 that continues 1 minute.
So I configured 6 retries, that will sleep at most 91s in total.
------------------------------------------------------------------------
r64316 | nobu | 2018-08-12 13:50:48 +0900 (Sun, 12 Aug 2018) | 1 line

compile.c: use EXPECT_NODE macro
------------------------------------------------------------------------
r64315 | nobu | 2018-08-12 13:50:14 +0900 (Sun, 12 Aug 2018) | 5 lines

compile.c: check error in when_vals

* compile.c (when_vals): return a negative value on error.

* compile.c (compile_case): check error in when_vals().
------------------------------------------------------------------------
r64314 | k0kubun | 2018-08-12 09:30:04 +0900 (Sun, 12 Aug 2018) | 4 lines

vm_insnhelper.c: revert r64280

This commit caused test-all failure with --jit-wait.
I don't know the reason yet, but let me revert it to normalize CI.
------------------------------------------------------------------------
r64313 | nobu | 2018-08-12 09:28:26 +0900 (Sun, 12 Aug 2018) | 4 lines

skip non-IP interfaces

* spec/ruby/library/socket/socket/getifaddrs_spec.rb: VirtualBox host
  only adapter seems something different than ordinary interfaces.
------------------------------------------------------------------------
r64312 | k0kubun | 2018-08-12 08:40:12 +0900 (Sun, 12 Aug 2018) | 4 lines

vm_insnhelper.c: drop duplicated inline

to resolve warning:
c:\projects\ruby\vm_insnhelper.c(1661) : warning C4141: 'inline' : used more than once
------------------------------------------------------------------------
r64311 | k0kubun | 2018-08-12 08:33:36 +0900 (Sun, 12 Aug 2018) | 4 lines

appveyor.yml: customize icon_url

We're using "x" sign as an icon for incoming webhook, but the success
notification by `on_build_status_changed` should not be an "x" asign.
------------------------------------------------------------------------
r64310 | svn | 2018-08-12 01:25:22 +0900 (Sun, 12 Aug 2018) | 1 line

* 2018-08-12
------------------------------------------------------------------------
r64309 | naruse | 2018-08-12 01:25:21 +0900 (Sun, 12 Aug 2018) | 1 line

fix r64296
------------------------------------------------------------------------
r64308 | k0kubun | 2018-08-11 23:50:21 +0900 (Sat, 11 Aug 2018) | 1 line

test_rubyvm_mjit.rb: skip testing MJIT if not supported
------------------------------------------------------------------------
r64307 | k0kubun | 2018-08-11 23:48:10 +0900 (Sat, 11 Aug 2018) | 1 line

mjit.c: stop defining alias for a very limited use
------------------------------------------------------------------------
r64306 | k0kubun | 2018-08-11 23:44:31 +0900 (Sat, 11 Aug 2018) | 4 lines

mjit.c: drop obsoleted duplicated declaration

of mjit_worker(). It was needed when mjit_worker.c is separated from
mjit.c, but it's now just included.
------------------------------------------------------------------------
r64305 | k0kubun | 2018-08-11 23:36:14 +0900 (Sat, 11 Aug 2018) | 1 line

mjit_worker.c: remove redundant cast for calloc/alloca
------------------------------------------------------------------------
r64304 | k0kubun | 2018-08-11 23:34:05 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: handle calloc failure

Unlike ZALLOC, it's not automatically handled.

mjit.c: ditto
------------------------------------------------------------------------
r64303 | nobu | 2018-08-11 23:32:15 +0900 (Sat, 11 Aug 2018) | 4 lines

test_env.rb: a failure on appveyor

* test/ruby/test_env.rb (test_huge_value): Windows 8 seems having a
  limit on single environment variable.
------------------------------------------------------------------------
r64302 | k0kubun | 2018-08-11 23:27:53 +0900 (Sat, 11 Aug 2018) | 1 line

mjit_worker.c: never trigger GC on MJIT worker
------------------------------------------------------------------------
r64301 | k0kubun | 2018-08-11 23:18:55 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: don't use ruby_strdup

on MJIT worker. That may trigger GC. And handled strdup failure instead.

mjit_compile.c: update comment about GC
------------------------------------------------------------------------
r64300 | nobu | 2018-08-11 23:15:58 +0900 (Sat, 11 Aug 2018) | 1 line

appveyor.yml: show the OS version
------------------------------------------------------------------------
r64299 | k0kubun | 2018-08-11 23:09:26 +0900 (Sat, 11 Aug 2018) | 4 lines

test_rubyvm_mjit.rb: dump output on test_pause

failure. It's failing on mswinci but it's hard to know the cause without
out/err.
------------------------------------------------------------------------
r64298 | k0kubun | 2018-08-11 23:05:34 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: share MJIT warning logic

as mjit_warning().

mjit.c: ditto
------------------------------------------------------------------------
r64297 | naruse | 2018-08-11 22:43:31 +0900 (Sat, 11 Aug 2018) | 1 line

Solaris 10 doesn't have getifaddrs
------------------------------------------------------------------------
r64296 | naruse | 2018-08-11 22:31:43 +0900 (Sat, 11 Aug 2018) | 1 line

Solaris raises EAI_SERVICE if hints.ai_socktype=0
------------------------------------------------------------------------
r64295 | k0kubun | 2018-08-11 22:31:10 +0900 (Sat, 11 Aug 2018) | 4 lines

test_iseq_load.rb: reduce timeout of test_stressful_roundtrip

We should increase RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE for slow
environments, and we configured some CI machines.
------------------------------------------------------------------------
r64294 | nobu | 2018-08-11 22:28:40 +0900 (Sat, 11 Aug 2018) | 5 lines

upgrade the default WINNT version

* configure.ac: set the default target Windows NT version to 0x0600,
  as well as mswin version since r50051.  Windows XP has ended years
  ago.
------------------------------------------------------------------------
r64293 | nobu | 2018-08-11 22:18:55 +0900 (Sat, 11 Aug 2018) | 7 lines

hash.c: env block size limit on Windows

* hash.c (ruby_setenv): do not check environment block size.
  c.f. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx
  Starting with Windows Vista and Windows Server 2008, there is no
  technical limitation on the size of the environment block.
  [ruby-core:88400] [Bug #14979]
------------------------------------------------------------------------
r64292 | k0kubun | 2018-08-11 19:05:56 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: resurrect more static declarations

and remove old mjit_ prefixes again.

mjit.c: ditto
------------------------------------------------------------------------
r64291 | k0kubun | 2018-08-11 18:58:20 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: reorder functions and variables

so that related things are placed closely.

Sorry for mixing them in previous commits...
------------------------------------------------------------------------
r64290 | k0kubun | 2018-08-11 18:48:07 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit.c: make some variables static again

and remove redundant mjit_ prefixes.

mjit_worker.c: ditto
------------------------------------------------------------------------
r64289 | k0kubun | 2018-08-11 18:37:14 +0900 (Sat, 11 Aug 2018) | 12 lines

mjit.c: include mjit_worker.c

instead of linking functions with mjit_worker.o.

In the r64285's structure, we needed to publish some variables with
mjit_ prefix. But ideally those variables should be completely private
in mjit.o (or old mjit_worker.o), and it was hard.

So I chose an approach similar to vm*.c for mjit.c and mjit_worker.c.
I believe mjit_compile.c is still nice to be separated.

After this commit, I'll remove the mjit_ prefix again...
------------------------------------------------------------------------
r64288 | k0kubun | 2018-08-11 17:34:25 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit.c: exclude mjit_valid_class_serial_p

from mjit.c because it's executed only on MJIT worker thread.

Instead of that, `valid_class_serials` is shared with mjit_ prefix.
------------------------------------------------------------------------
r64287 | k0kubun | 2018-08-11 17:07:13 +0900 (Sat, 11 Aug 2018) | 7 lines

mjit_worker.c: prefix mjit_ to pch_status

which was just forgotten.

mjit.c: ditto

mjit_internal.h: moved some macros only used by mjit_worker.c to it.
------------------------------------------------------------------------
r64286 | svn | 2018-08-11 16:57:59 +0900 (Sat, 11 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64285 | k0kubun | 2018-08-11 16:57:58 +0900 (Sat, 11 Aug 2018) | 11 lines

mjit_worker.c: carve out worker-related code

The motivation of this change is to make sure rb_funcall or GC-related
functions are not called on worker-related code. Currently such
functions are used in some places and I believe it's partly because it's
hard to identify which part is called on MJIT worker thread.

Now, mjit.c is safe to use them but we know we need to safely deal with
mjit_compile.c, mjit_worker.c and mjit_internal.h.

mjit_compile.c: update the comment about it
------------------------------------------------------------------------
r64284 | k0kubun | 2018-08-11 14:37:17 +0900 (Sat, 11 Aug 2018) | 3 lines

_mjit_compile_pc_and_sp.erb: update the comment

about the pc motion reason
------------------------------------------------------------------------
r64283 | k0kubun | 2018-08-11 14:33:15 +0900 (Sat, 11 Aug 2018) | 15 lines

_mjit_compile_pc_and_sp.erb: always move pc

to fix the wrong line number on #caller_locations or rb_profile_frames.

Actually we would be able to move it only when method call (of
caller_locations) or C extension invocation (calling rb_profile_frames)
can happen.

This degrades performance. Optcarrot fps becomes...
before: 71.78976052783555
after: 67.65429356624131

I think I can lazily move it and fix the performance issue, even
improving the performance for the situation catch table exists.
But let me fix this bug first...
------------------------------------------------------------------------
r64282 | k0kubun | 2018-08-11 13:22:14 +0900 (Sat, 11 Aug 2018) | 4 lines

tool/downloader.rb: retry on 502 and 503 error

rubyci was failed by download 503
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180811T021706Z.fail.html.gz
------------------------------------------------------------------------
r64281 | k0kubun | 2018-08-11 12:50:42 +0900 (Sat, 11 Aug 2018) | 5 lines

vm_args.c: stop requiring `calling` in vm_caller_setup_arg_block

_mjit_compile_send.erb: simplify code using the change

insns.def: adapt to the interface change
------------------------------------------------------------------------
r64280 | k0kubun | 2018-08-11 12:38:38 +0900 (Sat, 11 Aug 2018) | 8 lines

_mjit_compile_send.erb: refactor to share vm_call_iseq_setup_normal

implementation. This had no major performance impact by effort to keep
them inlined.

vm_insnhelper.c: ditto

mjit_compile.c: just update the comment about opt_pc=0 assumption
------------------------------------------------------------------------
r64279 | svn | 2018-08-11 08:32:33 +0900 (Sat, 11 Aug 2018) | 1 line

* 2018-08-11
------------------------------------------------------------------------
r64278 | k0kubun | 2018-08-11 08:32:32 +0900 (Sat, 11 Aug 2018) | 8 lines

test_iseq_load.rb: increase timeout

It's timed out on CI like this
https://gist.github.com/ko1/33df53d78fbec9e4156c017eeae023bb.

I'm not sure how long it would take (it finishes immediately on my machine),
so I chose 600s because r64271 says it took 635s on mswinci. (probably
it's improved by the commit, though.)
------------------------------------------------------------------------
r64277 | naruse | 2018-08-11 06:31:25 +0900 (Sat, 11 Aug 2018) | 3 lines

Remove failing specs

https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T183001Z.fail.html.gz
------------------------------------------------------------------------
r64276 | k0kubun | 2018-08-10 21:55:18 +0900 (Fri, 10 Aug 2018) | 1 line

appveyor.yml: don't notify PR failure to Slack
------------------------------------------------------------------------
r64275 | kazu | 2018-08-10 21:36:31 +0900 (Fri, 10 Aug 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64274 | kazu | 2018-08-10 21:36:30 +0900 (Fri, 10 Aug 2018) | 1 line

Remove needless comment [ci skip]
------------------------------------------------------------------------
r64273 | nobu | 2018-08-10 21:04:24 +0900 (Fri, 10 Aug 2018) | 6 lines

Pathname: Simplified Pathname#mountpoint?

Removed unnecessary comparison in mountpoint?
[Fix GH-1927]

From: John Whitson <john.whitson@gmail.com>
------------------------------------------------------------------------
r64272 | nobu | 2018-08-10 20:55:19 +0900 (Fri, 10 Aug 2018) | 1 line

fixup r64270
------------------------------------------------------------------------
r64271 | naruse | 2018-08-10 18:22:13 +0900 (Fri, 10 Aug 2018) | 4 lines

Use assert_separately in TestIseqLoad#test_stressful_roundtrip

It takes 635 seconds on mswinci
http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180810T061315Z.log.html.gz
------------------------------------------------------------------------
r64270 | mame | 2018-08-10 17:42:45 +0900 (Fri, 10 Aug 2018) | 13 lines

common.mk: "make check" now runs test-spec

Currently there are many "make" targets for testing: test, test-all,
check, exam, etc.
To make it simple, this change makes "make check" run all tests.
"make exam" is just an alias to "make check".
If a new test suite is added in future, "make check" should include it
(unless it takes too much time...)
[Feature #14187]

Also, this introduces "make test-short" as an alias to "make test".
I believe "make test" should equal to "make check", but there is
objection against this.  So now I commit only things that we agreed.
------------------------------------------------------------------------
r64269 | naruse | 2018-08-10 17:31:17 +0900 (Fri, 10 Aug 2018) | 8 lines

Remove failing spec files

Re-commit after specs are fixed.
http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T063001Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180809T191808Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180809T192406Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180809T151911Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180809T192507Z.log.html.gz
------------------------------------------------------------------------
r64268 | mame | 2018-08-10 16:45:16 +0900 (Fri, 10 Aug 2018) | 12 lines

insns.def (invokesuper): remove a dummy receiever flag hack for ZSUPER

This is just a refactoring.

The receiver of "invokesuper" was a boolean to represent if it is ZSUPER
or not.  This was used in vm_search_super_method to prohibit ZSUPER call
in define_method. (It is currently prohibited because of the limitation
of the implementation.)

This change removes the hack by introducing an explicit flag,
VM_CALL_SUPER, to signal the information.  Now, the implementation of
"invokesuper" is consistent with "send" instruction.
------------------------------------------------------------------------
r64267 | hsbt | 2018-08-10 15:06:32 +0900 (Fri, 10 Aug 2018) | 1 line

Move IPAddr to deafult gems category.
------------------------------------------------------------------------
r64266 | nobu | 2018-08-10 14:20:46 +0900 (Fri, 10 Aug 2018) | 4 lines

version.c: MKSTR for fake.rb

* version.c (Init_ruby_description): fake.rb needs MKSTR to extract
  constant names.
------------------------------------------------------------------------
r64265 | mrkn | 2018-08-10 14:18:03 +0900 (Fri, 10 Aug 2018) | 12 lines

process.c: fix rubyspec of Process.groups

getgroups(2) may return a GID list that includes duplicated GIDs.
The behavior is totaly depends on what OS is used.

This commit fixes the example of Process.groups so that the example
is independent of this OS-dependent features.

Additonaly, this commit adds the description of such system-dependent
characteristics of Process.groups.

[ruby-dev:50603] [Bug #14969]
------------------------------------------------------------------------
r64264 | nobu | 2018-08-10 14:02:35 +0900 (Fri, 10 Aug 2018) | 4 lines

version.c: separate Init_ruby_description

* version.c (Init_ruby_description): separate to initialize
  RUBY_DESCRIPTION constant according to mjit.
------------------------------------------------------------------------
r64263 | nobu | 2018-08-10 13:52:24 +0900 (Fri, 10 Aug 2018) | 1 line

common.mk: merge dependencies to wait miniruby to get built
------------------------------------------------------------------------
r64262 | mrkn | 2018-08-10 13:49:44 +0900 (Fri, 10 Aug 2018) | 4 lines

enumerator.c: fix for non-integral argument for ArithmeticSequence#last

This fixes a bug of Enumerator::ArithmeticSequence#last in the case that
a non-integral argument is passed.
------------------------------------------------------------------------
r64261 | nobu | 2018-08-10 13:33:11 +0900 (Fri, 10 Aug 2018) | 1 line

mjit.c: ruby_version is no longer used since r63279
------------------------------------------------------------------------
r64260 | nobu | 2018-08-10 13:26:54 +0900 (Fri, 10 Aug 2018) | 1 line

.gdbinit: startup without shell for macOS Sierra and later
------------------------------------------------------------------------
r64259 | svn | 2018-08-10 09:53:50 +0900 (Fri, 10 Aug 2018) | 1 line

* 2018-08-10
------------------------------------------------------------------------
r64258 | nobu | 2018-08-10 09:53:49 +0900 (Fri, 10 Aug 2018) | 1 line

another test needs IO.select
------------------------------------------------------------------------
r64257 | nobu | 2018-08-09 22:32:49 +0900 (Thu, 09 Aug 2018) | 6 lines

gmake.mk: fix commit dependency

* defs/gmake.mk (commit): pass CONFIGURE and fix dependency of
  `reconfig` target, not to try to make config.status newer than
  the source directory.  and remove configure_args in common.mk,
  which is a garbage argument.
------------------------------------------------------------------------
r64256 | mrkn | 2018-08-09 22:18:08 +0900 (Thu, 09 Aug 2018) | 5 lines

enumerator.c: undef new and allocate of ArithmeticSequence

Undefine new and allocate methods of Enumerator::ArithmeticSequence.

[ruby-core:82816] [Feature #13904]
------------------------------------------------------------------------
r64255 | naruse | 2018-08-09 21:45:02 +0900 (Thu, 09 Aug 2018) | 1 line

Don't run the spec on Solaris
------------------------------------------------------------------------
r64254 | k0kubun | 2018-08-09 20:39:07 +0900 (Thu, 09 Aug 2018) | 3 lines

process.c: don't wait JIT queue flush on rb_f_exec

This wasn't intended in r64253.
------------------------------------------------------------------------
r64253 | k0kubun | 2018-08-09 20:31:41 +0900 (Thu, 09 Aug 2018) | 9 lines

process.c: fix outdated mjit_pause declaration

by sharing it with vm.c in internal.h.

vm.c: ditto
internal.h: ditto
mjit.h: share more.

mjit.c: make sure the third arguemnt is not used
------------------------------------------------------------------------
r64252 | rhe | 2018-08-09 19:00:19 +0900 (Thu, 09 Aug 2018) | 15 lines

net/http, net/ftp: skip SSL/TLS session resumption tests

Due to a bug in OpenSSL 1.1.0h[1] (it's only in this specific version;
it was introduced just before the release and is already fixed in their
stable branch), the callback set by SSLContext#session_new_cb= does not
get called for clients, making net/http and net/ftp not attempt session
resumption.

Let's disable the affected test cases for now. Another option would be
to fallback to using SSLSocket#session as we did before r64234. But
since only a single version is affected and hopefully a new stable
version containing the fix will be released in near future, I chose not
to add such workaround code to lib/.

[1] https://github.com/openssl/openssl/pull/5967
------------------------------------------------------------------------
r64251 | svn | 2018-08-09 18:58:08 +0900 (Thu, 09 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64250 | k0kubun | 2018-08-09 18:58:07 +0900 (Thu, 09 Aug 2018) | 11 lines

mjit.c: add :wait option to RubyVM::MJIT.pause

and wait until JIT queue is flushed when wait option is not passed or
`wait: true` is passed.

vm.c: ditto

test/ruby/test_rubyvm_mjit.rb: added test for pause/resume

test/lib/jit_support.rb: allow retrying MJIT on JITSupport level
test/ruby/test_jit.rb: ditto
------------------------------------------------------------------------
r64249 | kazu | 2018-08-09 18:36:03 +0900 (Thu, 09 Aug 2018) | 8 lines

Fix error when Encoding.default_external is Encoding::IBM437

https://ci.appveyor.com/project/ruby/ruby/build/1.0.9151#L4601
```
  1) Error:
TestArgf#test_inplace_nonascii:
Encoding::UndefinedConversionError: U+3042 from UTF-8 to IBM437
```
------------------------------------------------------------------------
r64248 | normal | 2018-08-09 18:02:32 +0900 (Thu, 09 Aug 2018) | 5 lines

test/io/console/test_io_console.rb: fix short read failures

Running with TESTS=--no-retry, I sometimes get short reads
leading to failures due to the use of IO#readpartial instead of
IO#gets.
------------------------------------------------------------------------
r64247 | normal | 2018-08-09 17:51:22 +0900 (Thu, 09 Aug 2018) | 4 lines

test/io/wait/test_io_wait_uncommon.rb (test_tty_wait): increase timeout

Apparently my tty can't keep up when I run test-all with
TESTS='-v --no-retry'
------------------------------------------------------------------------
r64246 | kazu | 2018-08-09 17:49:10 +0900 (Thu, 09 Aug 2018) | 1 line

Skip test_inplace_nonascii if external encoding is us-ascii
------------------------------------------------------------------------
r64245 | kazu | 2018-08-09 17:49:09 +0900 (Thu, 09 Aug 2018) | 4 lines

add 'x' mode character for O_EXCL

[Feature #11258]
Patch by cremno (cremno phobia)
------------------------------------------------------------------------
r64244 | knu | 2018-08-09 17:40:54 +0900 (Thu, 09 Aug 2018) | 3 lines

Include the input in the message when raising InvalidAddressError

[Feature #5987]
------------------------------------------------------------------------
r64243 | nobu | 2018-08-09 17:29:38 +0900 (Thu, 09 Aug 2018) | 4 lines

io.c: fix non-ascii filename inplace edit

* io.c (argf_next_argv): convert filename to the OS encoding to be
  dealt with by system calls.  [ruby-dev:50607] [Bug #14970]
------------------------------------------------------------------------
r64242 | nobu | 2018-08-09 16:04:45 +0900 (Thu, 09 Aug 2018) | 1 line

apply r64239 to macOS too
------------------------------------------------------------------------
r64241 | nobu | 2018-08-09 16:01:09 +0900 (Thu, 09 Aug 2018) | 1 line

apply r64239 to macOS too
------------------------------------------------------------------------
r64240 | naruse | 2018-08-09 14:28:33 +0900 (Thu, 09 Aug 2018) | 1 line

Don't run specs on Solaris
------------------------------------------------------------------------
r64239 | normal | 2018-08-09 12:32:51 +0900 (Thu, 09 Aug 2018) | 18 lines

spec/ruby/library/socket/*: more FreeBSD fixes

FreeBSD portability notes:

Loopback connections are not instantaneous (unlike Linux), so
non-blocking read-after-write MUST check for readability via
IO.select or IO#wait_readable before attempting non-blocking
recv/read operations.

IPv6 seems favored, so we'll get "::" instead of "0.0.0.0"

Some constants are different or obsolete, so that should be
self-explanatory.

There are still other failures I or somebody else needs to get
to when we have time and feel like dealing with spec DSL:

      http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html
------------------------------------------------------------------------
r64238 | normal | 2018-08-09 11:14:27 +0900 (Thu, 09 Aug 2018) | 3 lines

test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files

Quiet a false-positive warning from TestHtgroup#test_htgroup
------------------------------------------------------------------------
r64237 | svn | 2018-08-09 00:36:29 +0900 (Thu, 09 Aug 2018) | 1 line

* 2018-08-09
------------------------------------------------------------------------
r64236 | nobu | 2018-08-09 00:36:28 +0900 (Thu, 09 Aug 2018) | 4 lines

needs openssl/opensslv.h

* ext/openssl/extconf.rb: LIBRESSL_VERSION_NUMBER is defined in
  openssl/opensslv.h.  fix up r64101.
------------------------------------------------------------------------
r64235 | nobu | 2018-08-08 23:34:24 +0900 (Wed, 08 Aug 2018) | 4 lines

fix mjit_min_header for universal binary

* common.mk: rules using MJIT_HEADER_SUFFIX, which to be overriden
  in defs/universal.mk, must be in common.mk, not Makefile.in.
------------------------------------------------------------------------
r64234 | rhe | 2018-08-08 23:13:55 +0900 (Wed, 08 Aug 2018) | 8 lines

net/http, net/ftp: fix session resumption with TLS 1.3

When TLS 1.3 is in use, the session ticket may not have been sent yet
even though a handshake has finished. Also, the ticket could change if
multiple session ticket messages are sent by the server. Use
SSLContext#session_new_cb instead of calling SSLSocket#session
immediately after a handshake. This way also works with earlier protocol
versions.
------------------------------------------------------------------------
r64233 | rhe | 2018-08-08 23:13:53 +0900 (Wed, 08 Aug 2018) | 36 lines

openssl: sync with upstream repository

Sync with the current tip of master branch, 62436385306c of
ruby/openssl.git. Changes can be found at:

	https://github.com/ruby/openssl/compare/v2.1.1...62436385306c

----------------------------------------------------------------
Brian Cunnie (1):
      Correctly verify abbreviated IPv6 SANs

Janko Marohnic (1):
      Reduce memory allocation when writing to SSLSocket

Jeremy Evans (1):
      Move rb_global_variable call to directly after assignment

Kazuki Yamaguchi (7):
      pkcs7: allow recipient's certificate to be omitted for PKCS7#decrypt
      pkey: resume key generation after interrupt
      tool/ruby-openssl-docker: update to latest versions
      test/test_ssl: fix test failure with TLS 1.3
      test/test_x509name: change script encoding to ASCII-8BIT
      x509name: refactor OpenSSL::X509::Name#to_s
      x509name: fix handling of X509_NAME_{oneline,print_ex}() return value

ahadc (1):
      Update CONTRIBUTING.md

nobu (6):
      no ID cache in Init functions
      search winsock libraries explicitly
      openssl: search winsock
      openssl_missing.h: constified
      reduce LibreSSL warnings
      openssl/buffering.rb: no RS when output
------------------------------------------------------------------------
r64232 | naruse | 2018-08-08 22:50:25 +0900 (Wed, 08 Aug 2018) | 6 lines

fix MSG_OOB spec

* OOBINLINE should be set for accepted socket
* When OOBINLINE is set, MSG_OOB shouldn't be passed to recv

Merge spec/ruby's commit 5b418374f8006318434ee9a2366382d004f585df
------------------------------------------------------------------------
r64231 | naruse | 2018-08-08 22:44:25 +0900 (Wed, 08 Aug 2018) | 5 lines

Add colon to avoid chkbuild's alert

https://github.com/ruby/chkbuild/blob/c0448670a9a5cb85f283bc639806ba09b294557f/chkbuild/ruby.rb#L847

Merge ruby/spec's commit 5a6ac7dbef3d59fe279303bf3346d92f1e620f12
------------------------------------------------------------------------
r64230 | akr | 2018-08-08 21:48:58 +0900 (Wed, 08 Aug 2018) | 11 lines

rename several internal macros in time.c

TIME_UTC_P -> TZMODE_UTC_P
TIME_SET_UTC -> TZMODE_SET_UTC
TIME_LOCALTIME_P -> TZMODE_LOCALTIME_P
TIME_SET_LOCALTIME -> TZMODE_SET_LOCALTIME
TIME_FIXOFF_P -> TZMODE_FIXOFF_P
TIME_SET_FIXOFF -> TZMODE_SET_FIXOFF
TIME_COPY_GMT -> TZMODE_COPY


------------------------------------------------------------------------
r64229 | kazu | 2018-08-08 20:50:39 +0900 (Wed, 08 Aug 2018) | 1 line

Update comment of tzmode [ci skip]
------------------------------------------------------------------------
r64228 | akr | 2018-08-08 19:39:31 +0900 (Wed, 08 Aug 2018) | 2 lines

Rename gmt field to tzmode in struct time_object.

------------------------------------------------------------------------
r64227 | akr | 2018-08-08 19:00:43 +0900 (Wed, 08 Aug 2018) | 4 lines

Store String as zone in struct vtm.

This removes zone_table and use fstring instead.

------------------------------------------------------------------------
r64226 | kazu | 2018-08-08 17:00:45 +0900 (Wed, 08 Aug 2018) | 1 line

Some environments do not have IPv6 address of localhost in /etc/hosts
------------------------------------------------------------------------
r64225 | normal | 2018-08-08 16:26:14 +0900 (Wed, 08 Aug 2018) | 4 lines

mjit.c: remove old comment about WNOHANG and SIGCHLD [ci skip]

[Bug #14867] implemented exactly what was needed (for POSIX
platforms, at least).
------------------------------------------------------------------------
r64224 | nobu | 2018-08-08 11:56:04 +0900 (Wed, 08 Aug 2018) | 1 line

skip hanging-up tests on macOS
------------------------------------------------------------------------
r64223 | normal | 2018-08-08 10:16:37 +0900 (Wed, 08 Aug 2018) | 6 lines

spec/ruby/library/socket/*: fix hanging on FreeBSD 11.1

There are still other test failures which need fixing on FreeBSD.
Keep an eye on:

  http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html
------------------------------------------------------------------------
r64222 | k0kubun | 2018-08-08 01:49:34 +0900 (Wed, 08 Aug 2018) | 1 line

appveyor.yml: make sure MJIT is tested on AppVeyor
------------------------------------------------------------------------
r64221 | k0kubun | 2018-08-08 01:27:45 +0900 (Wed, 08 Aug 2018) | 13 lines

mjit.c: initial support for mswin MJIT

By this commit's changes in other files, now MJIT started to work on VC++.
Unfortunately some features are still broken and they'll be fixed later.

This also suppresses cl.exe's default output to stdout because there
seems to be no option to do it. Tweaking some log messages as well.

vm_core.h: declare `__declspec(dllimport)` to export them correctly on mswin.
vm_insnhelper.h: ditto
mjit.h: ditto

test_jit.rb: skipped some pending tests.
------------------------------------------------------------------------
r64220 | svn | 2018-08-08 00:14:49 +0900 (Wed, 08 Aug 2018) | 1 line

* 2018-08-08
------------------------------------------------------------------------
r64219 | k0kubun | 2018-08-08 00:14:48 +0900 (Wed, 08 Aug 2018) | 18 lines

win32/Makefile.sub: escape `=` in MJIT cflags

Since `=` is considered as delimiter in `()` of `for`, having
`-DRUBY_DEVEL=1` in CPPFLAGS had resulted in:

 #define MJIT_OPTFLAGS "-DMJIT_HEADER", \
   "-DRUBY_DEVEL", \
   "1", \

Even escaped `for %I in (... -DRUBY_DEVEL^=1)` does not yield an
expected result. This commit is a workaround for this issue.

After this commit, mjit_config.h will have:

 #define MJIT_OPTFLAGS "-DMJIT_HEADER", \
   "-DRUBY_DEVEL" MJIT_CONFIG_ESCAPED_EQ "1", \

And C macro resolves MJIT_CONFIG_ESCAPED_EQ to "=".
------------------------------------------------------------------------
r64218 | hsbt | 2018-08-07 22:08:53 +0900 (Tue, 07 Aug 2018) | 5 lines

Silence Net::HTTP warning in test.

  https://github.com/ruby/webrick/pull/8

  Co-authored-by: Espartaco Palma <>
------------------------------------------------------------------------
r64217 | svn | 2018-08-07 21:56:49 +0900 (Tue, 07 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64216 | hsbt | 2018-08-07 21:56:48 +0900 (Tue, 07 Aug 2018) | 7 lines

Add missing test for WEBrick::HTTPAuth::Htgroup.

  [Bug #14866][ruby-core:87602]

  https://github.com/ruby/webrick/pull/10

  Co-authored-by: TSUYUSATO Kitsune <make.just.on@gmail.com>
------------------------------------------------------------------------
r64215 | hsbt | 2018-08-07 21:47:11 +0900 (Tue, 07 Aug 2018) | 3 lines

Support old versions of Ruby with FrozenError.

  They should work separatedly from Ruby core repository.
------------------------------------------------------------------------
r64214 | hsbt | 2018-08-07 21:32:29 +0900 (Tue, 07 Aug 2018) | 1 line

Fallback to load version constant for ruby core repository.
------------------------------------------------------------------------
r64213 | hsbt | 2018-08-07 21:02:10 +0900 (Tue, 07 Aug 2018) | 3 lines

Removed needless date attribute from gemspec of default gems.

  They are assigned automatically when pushing gem file to rubygems.org.
------------------------------------------------------------------------
r64212 | kazu | 2018-08-07 21:00:54 +0900 (Tue, 07 Aug 2018) | 1 line

Remove unnecessary assignment
------------------------------------------------------------------------
r64211 | hsbt | 2018-08-07 20:36:09 +0900 (Tue, 07 Aug 2018) | 1 line

Removed needless file from gemspec.
------------------------------------------------------------------------
r64210 | hsbt | 2018-08-07 20:18:40 +0900 (Tue, 07 Aug 2018) | 5 lines

Add support of Berkeley DB 6.x.

  https://github.com/ruby/dbm/pull/3

  Co-authored-by: Yasuhiro KIMURA <>
------------------------------------------------------------------------
r64209 | hsbt | 2018-08-07 18:52:53 +0900 (Tue, 07 Aug 2018) | 5 lines

Add test for coverage.

  https://github.com/ruby/cmath/pull/2

  Co-authored-by: MATSUBARA Nobutada
------------------------------------------------------------------------
r64208 | svn | 2018-08-07 10:17:40 +0900 (Tue, 07 Aug 2018) | 1 line

* 2018-08-07
------------------------------------------------------------------------
r64207 | k0kubun | 2018-08-07 10:17:39 +0900 (Tue, 07 Aug 2018) | 21 lines

win32/Makefile.sub: remove RUBY_EXPORT macro

defined in XCFLAGS.

This change resolves following link errors in MJIT:

```
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cObject
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFalseClass
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFloat
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cInteger
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cNilClass
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cProc
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cString
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cSymbol
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cTrueClass
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eArgError
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNoMethodError
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNameError
_ruby_mjit_p41476u0.obj : error LNK2001: unresolved external symbol rb_eFatal
```
------------------------------------------------------------------------
r64206 | svn | 2018-08-06 18:08:30 +0900 (Mon, 06 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64205 | mrkn | 2018-08-06 18:08:28 +0900 (Mon, 06 Aug 2018) | 16 lines

enumerator.c: Introduce Enumerator::ArithmeticSequence

This commit introduces new core class Enumerator::ArithmeticSequence.
Enumerator::ArithmeticSequence is a subclass of Enumerator, and
represents a number generator of an arithmetic sequence.

After this commit, Numeric#step and Range#step without blocks
returned an ArithmeticSequence object instead of an Enumerator.

This class introduces the following incompatibilities:

- You can create a zero-step ArithmeticSequence,
  and its size is not ArgumentError, but Infinity.
- You can create a negative-step ArithmeticSequence from a range.

[ruby-core:82816] [Feature #13904]
------------------------------------------------------------------------
r64204 | normal | 2018-08-06 17:42:04 +0900 (Mon, 06 Aug 2018) | 4 lines

test/ripper/test_parser_events.rb (test_block_variables): increase RLIMIT_AS

Unfortunately, MJIT goes over the 100M RLIMIT_AS for this test
on x86-64 (Debian 9)
------------------------------------------------------------------------
r64203 | normal | 2018-08-06 14:22:00 +0900 (Mon, 06 Aug 2018) | 87 lines

thread_pthread.c: restore timer-thread for now :<

[ruby-core:88306]

Revert "process.c: ensure th->interrupt lock is held when migrating"

This reverts commit 5ca416bdf6b6785cb20f139c2c514eda005fe42f (r64201)

Revert "process.c (rb_waitpid): reduce sigwait_fd bouncing"

This reverts commit 217bdd776fbeea3bfd0b9324eefbfcec3b1ccb3e (r64200).

Revert "test/ruby/test_thread.rb (test_thread_timer_and_interrupt): add timeouts"

This reverts commit 9f395f11202fc3c7edbd76f5aa6ce1f8a1e752a9 (r64199).

Revert "thread_pthread.c (native_sleep): reduce ppoll sleeps"

This reverts commit b3aa256c4d43d3d7e9975ec18eb127f45f623c9b (r64193).

Revert "thread.c (consume_communication_pipe): do not retry after short read"

This reverts commit 291a82f748de56e65fac10edefc51ec7a54a82d4 (r64185).

Revert "test/ruby/test_io.rb (test_race_gets_and_close): timeout each thread"

This reverts commit 3dbd8d1f66537f968f0461ed8547460b3b1241b3 (r64184).

Revert "thread_pthread.c (gvl_acquire_common): persist timeout across calls"

This reverts commit 8c2ae6e3ed072b06fc3cbc34fa8a14b2acbb49d5 (r64165).

Revert "test/ruby/test_io.rb (test_race_gets_and_close): use SIGABRT on timeout"

This reverts commit 931cda4db8afd6b544a8d85a6815765a9c417213 (r64135).

Revert "thread_pthread.c (gvl_yield): do ubf wakeups when uncontended"

This reverts commit 508f00314f46c08b6e9b0141c01355d24954260c (r64133).

Revert "thread_pthread.h (native_thread_data): split condvars on some platforms"

This reverts commit a038bf238bd9a24bf1e1622f618a27db261fc91b (r64124).

Revert "process.c (waitpid_nogvl): prevent conflicting use of sleep_cond"

This reverts commit 7018acc946882f21d519af7c42ccf84b22a46b27 (r64117).

Revert "thread_pthread.c (rb_sigwait_sleep): th may be 0 from MJIT"

This reverts commit 56491afc7916fb24f5c4dc2c632fb93fa7063992 (r64116).

Revert "thread*.c: waiting on sigwait_fd performs periodic ubf wakeups"

This reverts commit ab47a57a46e70634d049e4da20a5441c7a14cdec (r64115).

Revert "thread_pthread.c (gvl_destroy): make no-op on GVL bits"

This reverts commit 95cae748171f4754b97f4ba54da2ae62a8d484fd (r64114).

Revert "thread_pthread.c (rb_sigwait_sleep): fix uninitialized poll set in UBF case"

This reverts commit 4514362948fdb914c6138b12d961d92e9c0fee6c (r64113).

Revert "thread_pthread.c (rb_sigwait_sleep): re-fix [Bug #5343] harder"

This reverts commit 26b8a70bb309c7a367b9134045508b5b5a580a77 (r64111).

Revert "thread.c: move ppoll wrapper into thread_pthread.c"

This reverts commit 3dc7727d22fecbc355597edda25d2a245bf55ba1 (r64110).

Revert "thread.c: move ppoll wrapper before thread_pthread.c"

This reverts commit 2fa1e2e3c3c5c4b3ce84730dee4bcbe9d81b8e35 (r64109).

Revert "thread_pthread.c (ubf_select): refix [Bug #5343]"

This reverts commit 4c1ab82f0623eca91a95d2a44053be22bbce48ad (r64108).

Revert "thread_win32.c: suppress warnings by -Wsuggest-attribute"

This reverts commit 6a9b63e39075c53870933fbac5c1065f7d22047c (r64159).

Revert "thread_pthread: remove timer-thread by restructuring GVL"

This reverts commit 708bfd21156828526fe72de2cedecfaca6647dc1 (r64107).
------------------------------------------------------------------------
r64202 | hsbt | 2018-08-06 14:01:08 +0900 (Mon, 06 Aug 2018) | 1 line

Ignore native extension of Date library when syncing gemification files.
------------------------------------------------------------------------
r64201 | normal | 2018-08-06 10:06:21 +0900 (Mon, 06 Aug 2018) | 4 lines

process.c: ensure th->interrupt lock is held when migrating

w->cond may be changed without our knowledge in waitpid_nogvl
without th->interrupt_lock
------------------------------------------------------------------------
r64200 | normal | 2018-08-06 06:27:14 +0900 (Mon, 06 Aug 2018) | 5 lines

process.c (rb_waitpid): reduce sigwait_fd bouncing

Once a thread has acquired sigwait_fd, hold onto it until
waitpid is complete.  This prevents unnecessary migration
and atomic operations.
------------------------------------------------------------------------
r64199 | normal | 2018-08-06 05:06:55 +0900 (Mon, 06 Aug 2018) | 9 lines

test/ruby/test_thread.rb (test_thread_timer_and_interrupt): add timeouts

Trying to diagnose CI failures from i686-linux on Debian 7.

This also fixes a potential GC problem with Thread.start or
IO#read potentially closing the write-end of the pipe due
to allocation.

cf. http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180805T080500Z.fail.html.gz
------------------------------------------------------------------------
r64198 | svn | 2018-08-06 05:06:50 +0900 (Mon, 06 Aug 2018) | 1 line

* 2018-08-06
------------------------------------------------------------------------
r64197 | normal | 2018-08-06 05:06:49 +0900 (Mon, 06 Aug 2018) | 10 lines

thread_pthread: stop trying to deal with cancellation

We don't use pthreads cancellation ourselves and it's painful to
use correctly.  Any cancelled threads would break
vm->living_threads, GVL, thread_sync.c, autoload, etc...

So don't bother caring; because we can't stop rogue extensions
from completely breaking the VM in other ways, either.

[ruby-core:88282] [Misc #14962]
------------------------------------------------------------------------
r64196 | k0kubun | 2018-08-05 23:33:40 +0900 (Sun, 05 Aug 2018) | 5 lines

mjit.c: use -Tc flag explicitly

This option makes sure that the argument is C source file.
Probably this is not needed, but since I'm debugging it, I want to
exclude any failure possibility for now.
------------------------------------------------------------------------
r64194 | normal | 2018-08-05 17:56:57 +0900 (Sun, 05 Aug 2018) | 11 lines

test/ruby/test_process.rb (test_wait_and_sigchld): allow extra SIGCHLD

MJIT way generate an extra SIGCHLD, so we'll have to deal with it.

Any realistic Ruby program may hit unexpected SIGCHLD, too,
since any spawned subprocess could have extra grandchildren
which get reaped by the main Ruby process, and SIGCHLD may
be sent spuriously by an external process using kill(2) syscall
(via kill(1) or Process.kill).

cf. http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1194620
------------------------------------------------------------------------
r64193 | normal | 2018-08-05 17:56:52 +0900 (Sun, 05 Aug 2018) | 12 lines

thread_pthread.c (native_sleep): reduce ppoll sleeps

By holding into sigwait_fd until after we acquire GVL, we can
hit the faster native_cond_sleep path instead of ppoll when
another thread wants to start sleeping.  ppoll-ing on sigwait_fd
isn't really useful in program where GVL is contended

This also allows reducing vm->gvl.lock mutex contention on
waitpid sleep migrations.

                         r64170        this patch
vm_thread_condvar1        0.921        1.356
------------------------------------------------------------------------
r64192 | k0kubun | 2018-08-05 14:34:37 +0900 (Sun, 05 Aug 2018) | 9 lines

mjit.c: link precompiled object

This is needed to resolve:
"error LNK2011: precompiled object not linked in; image may not run"

win32/Makefile.sub: Use the same flags as ones for precompiled header.

This is needed to resolve:
"error C2855: command-line option '/Z7' inconsistent with precompiled header"
------------------------------------------------------------------------
r64191 | k0kubun | 2018-08-05 13:48:18 +0900 (Sun, 05 Aug 2018) | 3 lines

mjit.c: reorder functions to reduce #ifdef branches

Just moved make_pch into `#else` of `#ifdef _MSC_VER`.
------------------------------------------------------------------------
r64190 | k0kubun | 2018-08-05 13:37:59 +0900 (Sun, 05 Aug 2018) | 5 lines

mjit.c: include prebuilt precompiled header

on mswin properly.

Deleted code to attempt make_pch for mswin, since it won't be needed.
------------------------------------------------------------------------
r64189 | k0kubun | 2018-08-05 12:12:09 +0900 (Sun, 05 Aug 2018) | 6 lines

mjit.c: initialize prebuilt precompiled header

file name correctly. This allows to use the header installed by r64188.

win32/Makefile.sub: define prebuilt precompiled header path instead of
unused min header path
------------------------------------------------------------------------
r64188 | k0kubun | 2018-08-05 08:53:41 +0900 (Sun, 05 Aug 2018) | 6 lines

win32/Makefile.sub: build precompiled header

See the comment in win32/Makefile.sub.
Not only .pch, but also .obj needs to be installed and used on runtime.

.gitignore: ignore .pch that will be built by this.
------------------------------------------------------------------------
r64187 | normal | 2018-08-05 08:33:38 +0900 (Sun, 05 Aug 2018) | 9 lines

test/ruby/test_io.rb (test_select_leak): speedup and reduce memory use

We can reuse the sub-thread and exception with Thread#raise to
reproduce the old memory leak with less overhead.  This allows
us to to run more iterations and improve reliability of the
actual test, particularly on platforms without USE_THREAD_CACHE.

For glibc and jemalloc, also limit arena count to avoid
inadvertant growth.
------------------------------------------------------------------------
r64186 | normal | 2018-08-05 07:58:08 +0900 (Sun, 05 Aug 2018) | 21 lines

test/ruby/test_thread.rb (test_thread_interrupt_for_killed_thread): conserve resources

Use Thread.pass to let the sub-thread finish.  This should avoid
running out of memory on resource-constrained systems.
(We don't want to use Thread#join to hit the exception)

This results in a significant memory usage reduction in this test:

  make test-all TESTS='../test/ruby/test_thread.rb -v -n test_thread_interrupt_for_killed_thread'

Before:

  3.46user 2.02system 0:05.29elapsed 103%CPU (0avgtext+0avgdata 88672maxresident)k
  0inputs+0outputs (0major+143071minor)pagefaults 0swaps

After:

  3.40user 1.83system 0:05.20elapsed 100%CPU (0avgtext+0avgdata 9368maxresident)k
  0inputs+0outputs (0major+3059minor)pagefaults 0swaps

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180803T231706Z.fail.html.gz
------------------------------------------------------------------------
r64185 | normal | 2018-08-05 05:38:48 +0900 (Sun, 05 Aug 2018) | 7 lines

thread.c (consume_communication_pipe): do not retry after short read

Saves a syscall and slightly improves vm_thread_condvar1
benchmark slightly (more improvements on the way):

                         r64170        this patch
vm_thread_condvar1        0.917        1.065
------------------------------------------------------------------------
r64184 | normal | 2018-08-05 05:34:19 +0900 (Sun, 05 Aug 2018) | 7 lines

test/ruby/test_io.rb (test_race_gets_and_close): timeout each thread

Still looking into CI failures on P895 (and seemingly no other boxes):

   http://ci.rvm.jp/results/trunk@P895/1190369

:<
------------------------------------------------------------------------
r64183 | svn | 2018-08-05 00:12:31 +0900 (Sun, 05 Aug 2018) | 1 line

* 2018-08-05
------------------------------------------------------------------------
r64182 | k0kubun | 2018-08-05 00:12:30 +0900 (Sun, 05 Aug 2018) | 16 lines

common.mk: stop building MJIT min header for mswin

Since it's impossible to leave macro when preprocessing C source file
with cl.exe, I decided to create precompiled header on Ruby's build time
instead.

We're not doing it for non-mswin environment for 2 reasons:
1) Precompiled header may not be able to be used when CC is upgraded.
2) We need to create as many precompiled headers as the patterns of
   compile options. (Probably only 2, for with and without --jit-debug)

I'll ignore them for mswin for now, and solve it later by including CC
version and --jit-debug information in precompiled header filename.
After that, non-mswin environment may follow it to simplify build system.

Makefile.in: ditto
------------------------------------------------------------------------
r64181 | normal | 2018-08-04 06:53:21 +0900 (Sat, 04 Aug 2018) | 8 lines

spec/ruby/library/socket/socket/getaddrinfo_spec.rb: avoid nonsensical lookup

"http" is a TCP service, so /etc/services on typical GNU/Linux systems
only specify a TCP port for it.  Use "discard" since it seems
used for other specs and is specified as both TCP and UDP.

This caused many CI failures like the following:
  git clone https://gist.github.com/812a9b747e4c4cb2e844d4be7991cd2d
------------------------------------------------------------------------
r64180 | eregon | 2018-08-04 01:19:40 +0900 (Sat, 04 Aug 2018) | 1 line

Update to ruby/spec@9be7c7e
------------------------------------------------------------------------
r64179 | eregon | 2018-08-04 01:19:10 +0900 (Sat, 04 Aug 2018) | 1 line

Update to ruby/mspec@072849e
------------------------------------------------------------------------
r64178 | eregon | 2018-08-04 00:11:49 +0900 (Sat, 04 Aug 2018) | 4 lines

encoding.c (rb_enc_get_index): return -1 for non-encoding capable objects

* Clarify logic and add spec.
* Now passes test-all with the JSON fix.
------------------------------------------------------------------------
r64177 | eregon | 2018-08-04 00:11:36 +0900 (Sat, 04 Aug 2018) | 3 lines

ext/json/parser/parser.c: do not call rb_str_resize() on Time object

* See https://github.com/flori/json/issues/342
------------------------------------------------------------------------
r64176 | svn | 2018-08-04 00:11:23 +0900 (Sat, 04 Aug 2018) | 1 line

* 2018-08-04
------------------------------------------------------------------------
r64175 | eregon | 2018-08-04 00:11:22 +0900 (Sat, 04 Aug 2018) | 1 line

Fix missed update of parser source in r62429
------------------------------------------------------------------------
r64174 | eregon | 2018-08-03 23:31:39 +0900 (Fri, 03 Aug 2018) | 4 lines

Revert "encoding.c (rb_enc_get_index): return -1 for non-encoding capable objects"

* This reverts commit fb253d2032e51f333e6577aa4fcf0c03f9c6fc02.
* The CI is failing, this seems a bug in the JSON C extension.
------------------------------------------------------------------------
r64173 | eregon | 2018-08-03 22:52:26 +0900 (Fri, 03 Aug 2018) | 3 lines

encoding.c (rb_enc_get_index): return -1 for non-encoding capable objects

* Clarify logic and add spec.
------------------------------------------------------------------------
r64172 | eregon | 2018-08-03 22:52:13 +0900 (Fri, 03 Aug 2018) | 3 lines

encoding.c (enc_set_index): raise instead of rb_bug() for non-encoding capable objects

* Add spec.
------------------------------------------------------------------------
r64171 | nobu | 2018-08-03 20:13:15 +0900 (Fri, 03 Aug 2018) | 1 line

random.c: fix fallback value
------------------------------------------------------------------------
r64170 | nobu | 2018-08-03 16:24:33 +0900 (Fri, 03 Aug 2018) | 1 line

random.c: use rb_check_funcall
------------------------------------------------------------------------
r64169 | nobu | 2018-08-03 16:17:20 +0900 (Fri, 03 Aug 2018) | 4 lines

random.c: moved domain error

* random.c (rand_range): moved call of domain_error(), not to
  raise an exception in range_values().
------------------------------------------------------------------------
r64168 | nobu | 2018-08-03 15:53:14 +0900 (Fri, 03 Aug 2018) | 4 lines

ast.c: allocator of Node

* ast.c (Init_ast): undefine allocator of Node, as a method call
  on an uninitialized Node causes segfault.
------------------------------------------------------------------------
r64167 | nobu | 2018-08-03 15:31:22 +0900 (Fri, 03 Aug 2018) | 4 lines

random.c: endless range random

* random.c (range_values): cannot determine the domain of an endless
  range.  [ruby-core:88261] [Bug #14958]
------------------------------------------------------------------------
r64166 | mame | 2018-08-03 14:11:20 +0900 (Fri, 03 Aug 2018) | 3 lines

thread_pthread.c: add a macro guard for PTHREAD_CANCEL_ENABLE

It seems to be unavailable on some platforms including my Android phone.
------------------------------------------------------------------------
r64165 | normal | 2018-08-03 06:13:50 +0900 (Fri, 03 Aug 2018) | 9 lines

thread_pthread.c (gvl_acquire_common): persist timeout across calls

Reuse old expiration time if the previous native_cond_timedwait
did not return ETIMEDOUT.  This should improve timeslice
accuracy for Timeout.timeout rubyspec without causing excessive
wakeups on uncontended GVL acquisition.

cf. http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1180486
    http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1184623
------------------------------------------------------------------------
r64164 | svn | 2018-08-03 00:35:06 +0900 (Fri, 03 Aug 2018) | 1 line

* 2018-08-03
------------------------------------------------------------------------
r64163 | k0kubun | 2018-08-03 00:35:05 +0900 (Fri, 03 Aug 2018) | 4 lines

test_jit.rb: split the test concern

Actually unload_units is working on MinGW, but putiseq is behaving
badly.
------------------------------------------------------------------------
r64162 | k0kubun | 2018-08-02 23:40:36 +0900 (Thu, 02 Aug 2018) | 4 lines

mjit.c: skip compaction on MinGW

because linking multiple .o files is problematic without having `static`
to the same function definitions.
------------------------------------------------------------------------
r64161 | k0kubun | 2018-08-02 22:41:27 +0900 (Thu, 02 Aug 2018) | 9 lines

mjit.c: don't apply workaround if --enable-load-relative

is specified.

This is needed for MinGW because MJIT_BUILD_DIR doesn't prefix path
like "C:\msys64", so it can't be read without msys2's conversion.

The workaround is not needed for Windows (LOAD_RELATIVE looks defined by
default) anyway. So removed it for such environment.
------------------------------------------------------------------------
r64160 | k0kubun | 2018-08-02 22:03:34 +0900 (Thu, 02 Aug 2018) | 9 lines

mjit.c: suppress warnings by -Wunused-value

on MinGW with __atomic_exchange_n(). It returns the previous pointer value but
obviously it's not needed in MJIT's usage.

mjit.c: In function 'compact_all_jit_code':
ruby_atomic.h:11:36: warning: value computed is not used [-Wunused-value]
 # define ATOMIC_EXCHANGE(var, val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------------------------------------
r64159 | k0kubun | 2018-08-02 20:39:11 +0900 (Thu, 02 Aug 2018) | 1 line

thread_win32.c: suppress warnings by -Wsuggest-attribute
------------------------------------------------------------------------
r64158 | svn | 2018-08-02 15:09:39 +0900 (Thu, 02 Aug 2018) | 1 line

* 2018-08-02
------------------------------------------------------------------------
r64157 | normal | 2018-08-02 15:09:38 +0900 (Thu, 02 Aug 2018) | 7 lines

test/socket/test_socket.rb (test_timestampns): retry send

It looks like we need to retry test_timestampns in addition
to test_timestamp; so share some code while we're at it.

cf. http://ci.rvm.jp/results/trunk-test@frontier/1153126
[ruby-core:88104] [Bug #14898]
------------------------------------------------------------------------
r64156 | shyouhei | 2018-08-01 12:40:37 +0900 (Wed, 01 Aug 2018) | 4 lines

move atomic logic from mjit.c from ruby_atomic.h

This macro shall be shared among other files, not just for mjit.c.

------------------------------------------------------------------------
r64155 | shyouhei | 2018-08-01 11:55:11 +0900 (Wed, 01 Aug 2018) | 2 lines

(cosmetic) add blank lines for better readability

------------------------------------------------------------------------
r64154 | nobu | 2018-08-01 02:11:00 +0900 (Wed, 01 Aug 2018) | 5 lines

[DOC] Added CI build status for Japanese docs

[Fix GH-1923]

From: Andrea Gomez <crypto.andrea@protonmail.ch>
------------------------------------------------------------------------
r64153 | kazu | 2018-08-01 00:20:55 +0900 (Wed, 01 Aug 2018) | 3 lines

Add same comment to thwait.gemspec like other gemspec at r64145

[ci skip]
------------------------------------------------------------------------
r64152 | kazu | 2018-08-01 00:20:54 +0900 (Wed, 01 Aug 2018) | 1 line

Add PRINTF_ARGS to kprintf
------------------------------------------------------------------------
r64151 | svn | 2018-08-01 00:02:32 +0900 (Wed, 01 Aug 2018) | 1 line

* 2018-08-01
------------------------------------------------------------------------
r64150 | nobu | 2018-08-01 00:02:31 +0900 (Wed, 01 Aug 2018) | 1 line

Makefile.in: remove GNU-make dependency
------------------------------------------------------------------------
r64145 | hsbt | 2018-07-31 21:56:17 +0900 (Tue, 31 Jul 2018) | 1 line

Try to load version file of github repository at first.
------------------------------------------------------------------------
r64144 | k0kubun | 2018-07-31 21:55:28 +0900 (Tue, 31 Jul 2018) | 3 lines

transform_mjit_header.rb: more strict FUNC_HEADER_REGEXP

to reduce "SKIPPED" logs on MJIT header build.
------------------------------------------------------------------------
r64143 | k0kubun | 2018-07-31 21:43:06 +0900 (Tue, 31 Jul 2018) | 13 lines

mjit.c: allow using MJIT header in build directory

when $MJIT_SEARCH_BUILD_DIR is set.

If prefix path is owned by root, `make install` needs to be run by root.
But in general we don't want to run `make test-all`, and also running
`make test-all` currently fails due to permission tests of rdoc and rubygems.
Thus, prior to this commit, specifying a prefix like "/usr/local" could
mean there was no way to pass test-all.

So we should not depend on `make install` for `make test-all`. Thus I
reverted r64104 and r64103, and applied this workaround to pass `make
test-all` without `make install`.
------------------------------------------------------------------------
r64142 | hsbt | 2018-07-31 21:25:24 +0900 (Tue, 31 Jul 2018) | 1 line

Follow up r64141 with sync tool.
------------------------------------------------------------------------
r64141 | hsbt | 2018-07-31 21:12:33 +0900 (Tue, 31 Jul 2018) | 1 line

Fixed inconsistency gemspec location.
------------------------------------------------------------------------
r64140 | hsbt | 2018-07-31 21:05:24 +0900 (Tue, 31 Jul 2018) | 1 line

Fixed unexpected direction deletion with irb sync.
------------------------------------------------------------------------
r64139 | hsbt | 2018-07-31 20:48:09 +0900 (Tue, 31 Jul 2018) | 1 line

Support Sync module same as other default gems.
------------------------------------------------------------------------
r64138 | k0kubun | 2018-07-31 20:18:59 +0900 (Tue, 31 Jul 2018) | 13 lines

transform_mjit_header.rb: accept having attribute

between a type of return value and function identifier. Like:

```
rb_control_frame_t *
__attribute__ ((__fastcall__)) rb_vm_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
{
    ...
}
```

[Bug #14949]
------------------------------------------------------------------------
r64137 | hsbt | 2018-07-31 12:49:38 +0900 (Tue, 31 Jul 2018) | 6 lines

Move obsoleted test/thread/test_*.rb with the current implementation.

  * test/ruby/test_thread_{cv,queue}.rb: Move under the test/ruby directory.
    and rename TestThread* from Test*.
  * test/test_sync.rb: Move toplevel of test diretory because sync is still
    standard library.
------------------------------------------------------------------------
r64136 | hsbt | 2018-07-31 10:35:16 +0900 (Tue, 31 Jul 2018) | 1 line

Fixed inconsistency file structure for gemspec.
------------------------------------------------------------------------
r64135 | normal | 2018-07-31 10:33:39 +0900 (Tue, 31 Jul 2018) | 5 lines

test/ruby/test_io.rb (test_race_gets_and_close): use SIGABRT on timeout

I can't reproduce the test failure and I'm still not sure what's
wrong, but maybe we can get a core dump from P895:
http://ci.rvm.jp/results/trunk@P895/1174672
------------------------------------------------------------------------
r64134 | normal | 2018-07-31 06:48:32 +0900 (Tue, 31 Jul 2018) | 6 lines

thread_pthread.c (unregister_ubf_list): assert unblock.func is unset

We must not allow reentry into ubf_list_head once we delete
ourselves, otherwise we could hang in there forever.

[ruby-core:88218] [Bug #14945]
------------------------------------------------------------------------
r64133 | normal | 2018-07-31 03:53:46 +0900 (Tue, 31 Jul 2018) | 8 lines

thread_pthread.c (gvl_yield): do ubf wakeups when uncontended

Not having contention for GVL could mean everybody else is stuck
in blocking region without GVL, so we kick the ubf list in that
case.

I expect this to fix test_thread_fd_close timeout:
http://ci.rvm.jp/results/trunk-test@ruby-sky3/1173398
------------------------------------------------------------------------
r64132 | svn | 2018-07-31 00:21:02 +0900 (Tue, 31 Jul 2018) | 1 line

* 2018-07-31
------------------------------------------------------------------------
r64131 | nobu | 2018-07-31 00:21:01 +0900 (Tue, 31 Jul 2018) | 4 lines

thread_pthread.c: revert r64123

* thread_pthread.c (USE_NATIVE_SLEEP_COND): revised wrongly removed
  line with the ifndef guard.
------------------------------------------------------------------------
r64124 | normal | 2018-07-30 18:54:41 +0900 (Mon, 30 Jul 2018) | 7 lines

thread_pthread.h (native_thread_data): split condvars on some platforms

Maybe some platforms have strange condition variable implementations
which have a "memory" of which mutexes they're associated with.

In any case, it makes documentation easier even on GNU/Linux and
FreeBSD.
------------------------------------------------------------------------
r64123 | nobu | 2018-07-30 17:45:19 +0900 (Mon, 30 Jul 2018) | 1 line

thread_pthread.c: remove duplicate define
------------------------------------------------------------------------
r64122 | shyouhei | 2018-07-30 17:22:50 +0900 (Mon, 30 Jul 2018) | 2 lines

fix typo(#2), sorry!

------------------------------------------------------------------------
r64121 | shyouhei | 2018-07-30 17:21:01 +0900 (Mon, 30 Jul 2018) | 2 lines

fix typo; sorry!

------------------------------------------------------------------------
r64120 | normal | 2018-07-30 17:05:22 +0900 (Mon, 30 Jul 2018) | 4 lines

bootstraptest/runner.rb: speed up assert_finish with IO.select (take #2)

Resurrect r63754 in a 1.8-compatible way.  While we're at it,
add a note to maintain 1.8 compatibility (cf. r63757).
------------------------------------------------------------------------
r64119 | shyouhei | 2018-07-30 16:53:24 +0900 (Mon, 30 Jul 2018) | 5 lines

move #pragma out of functions

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) reportedly fails to compile
cf: https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20180726T093003Z.fail.html.gz

------------------------------------------------------------------------
r64118 | shyouhei | 2018-07-30 16:07:48 +0900 (Mon, 30 Jul 2018) | 8 lines

reduce copy & paste

We see several occurrence of "diagnostic push/pop" so why not
make them macros.  Tested on GCC8 / Clang 6.

Note that ruby.h is intentionally left untouched because we don't
want to introduce new public macros.

------------------------------------------------------------------------
r64117 | normal | 2018-07-30 15:35:08 +0900 (Mon, 30 Jul 2018) | 7 lines

process.c (waitpid_nogvl): prevent conflicting use of sleep_cond

We reuse sleep_cond for waitpid notifications as well as GVL
waiting.  So we must take care to not hold onto sleep_cond
when we try to reacquire GVL.

[ruby-core:88183]
------------------------------------------------------------------------
r64116 | normal | 2018-07-30 15:02:22 +0900 (Mon, 30 Jul 2018) | 1 line

thread_pthread.c (rb_sigwait_sleep): th may be 0 from MJIT
------------------------------------------------------------------------
r64115 | normal | 2018-07-30 14:51:06 +0900 (Mon, 30 Jul 2018) | 6 lines

thread*.c: waiting on sigwait_fd performs periodic ubf wakeups

We need to be able to perform periodic ubf_list wakeups when a
thread is sleeping and waiting on signals.

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64114 | normal | 2018-07-30 14:51:01 +0900 (Mon, 30 Jul 2018) | 5 lines

thread_pthread.c (gvl_destroy): make no-op on GVL bits

It's possible for another thread to take vm->gvl.lock
during gvl_release at the end of thread_start_func_2
during VM shutdown, at least.
------------------------------------------------------------------------
r64113 | normal | 2018-07-30 13:28:28 +0900 (Mon, 30 Jul 2018) | 3 lines

thread_pthread.c (rb_sigwait_sleep): fix uninitialized poll set in UBF case

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64112 | shyouhei | 2018-07-30 12:23:32 +0900 (Mon, 30 Jul 2018) | 2 lines

non-constant aggregate initializer is a C99ism

------------------------------------------------------------------------
r64111 | normal | 2018-07-30 11:28:00 +0900 (Mon, 30 Jul 2018) | 7 lines

thread_pthread.c (rb_sigwait_sleep): re-fix [Bug #5343] harder

We can't always designate a timer thread, so any sleepers must
also perform ubf wakeups.  Note: a similar change needs to be
made for rb_thread_fd_select and rb_wait_for_single_fd.

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64110 | normal | 2018-07-30 09:31:08 +0900 (Mon, 30 Jul 2018) | 9 lines

thread.c: move ppoll wrapper into thread_pthread.c

thread_pthread.c relies on ppoll for rb_sigwait_sleep, so ensure
the compatibility wrapper is available for it.

[Bug #14950]

Reported-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
Reported-by: Greg L <Greg.mpls@gmail.com>
------------------------------------------------------------------------
r64109 | normal | 2018-07-30 07:54:44 +0900 (Mon, 30 Jul 2018) | 6 lines

thread.c: move ppoll wrapper before thread_pthread.c

thread_pthread.c relies on ppoll for rb_sigwait_sleep, so ensure
the compatibility wrapper is available for it.

Reported-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r64108 | normal | 2018-07-30 07:19:15 +0900 (Mon, 30 Jul 2018) | 12 lines

thread_pthread.c (ubf_select): refix [Bug #5343]

We still need to to designate a timer thread after registering target
thread for the ubf list.

Oops :x

Note: I was never able to reproduce
test/thread/test_queue.rb::test_thr_kill failures on my on
Debian machines.

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64107 | normal | 2018-07-30 05:47:33 +0900 (Mon, 30 Jul 2018) | 57 lines

thread_pthread: remove timer-thread by restructuring GVL

To reduce resource use and reduce CI failure; remove
timer-thread.  Single-threaded Ruby processes (including forked
children) will never see extra thread overhead.  This prevents
glibc and jemalloc from going into multi-threaded mode and
initializing locks or causing fragmentation via arena explosion.

The GVL is implements its own wait-queue as a ccan/list to
permit controlling wakeup order.  Timeslice under contention is
handled by a designated timer thread (similar to choosing a
"patrol_thread" for current deadlock checking).

There is only one self-pipe, now, as wakeups for timeslice are
done independently using condition variables.  This reduces FD
pressure slightly.

Signal handling is handled directly by a Ruby Thread (instead
of timer-thread) by exposing signal self-pipe to callers of
rb_thread_fd_select, native_sleep, rb_wait_for_single_fd, etc...
Acquiring, using, and releasing the self-pipe is exposed via 4
new internal functions:

1) rb_sigwait_fd_get - exclusively acquire timer_thread_pipe.normal[0]

2) rb_sigwait_fd_sleep - sleep and wait for signal (and no other FDs)

3) rb_sigwait_fd_put - release acquired result from rb_sigwait_fd_get

4) rb_sigwait_fd_migrate - migrate signal handling to another thread
                           after calling rb_sigwait_fd_put.

rb_sigwait_fd_migrate is necessary for waitpid callers because
only one thread can wait on self-pipe at a time, otherwise a
deadlock will occur if threads fight over the self-pipe.

TRAP_INTERRUPT_MASK is now set for the main thread directly in
signal handler via rb_thread_wakeup_timer_thread.

Originally, I wanted to use POSIX timers
(timer_create/timer_settime) for this.  Unfortunately, this
proved unfeasible as Mutex#sleep resumes on spurious wakeups and
test/thread/test_cv.rb::test_condvar_timed_wait failed.  Using
pthread_sigmask to mask out SIGVTALRM fixed that test,  but
test/fiddle/test_function.rb::test_nogvl_poll proved there'd be
some unavoidable (and frequent) incompatibilities from that
approach.

Finally, this allows us to drop thread_destruct_lock and
interrupt current ec directly.

We don't need to rely on vm->thread_destruct_lock or a coherent
vm->running_thread on any platform.  Separate timer-thread for
time slice and signal handling is relegated to thread_win32.c,
now.

[ruby-core:88088] [Misc #14937]
------------------------------------------------------------------------
r64106 | svn | 2018-07-30 05:28:57 +0900 (Mon, 30 Jul 2018) | 1 line

* 2018-07-30
------------------------------------------------------------------------
r64105 | normal | 2018-07-30 05:28:56 +0900 (Mon, 30 Jul 2018) | 5 lines

test/ruby/test_process.rb (test_wait_and_sigchld): improve reliability

This should fix CI failure under MJIT, 100ms wait may not be
enough for signal handler to fire:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1169472
------------------------------------------------------------------------
r64104 | nobu | 2018-07-29 20:00:02 +0900 (Sun, 29 Jul 2018) | 1 line

common.mk: install for test-all iff load-relative is disabled
------------------------------------------------------------------------
r64103 | k0kubun | 2018-07-29 19:31:57 +0900 (Sun, 29 Jul 2018) | 1 line

common.mk: test-all requires install for now
------------------------------------------------------------------------
r64102 | normal | 2018-07-29 19:15:11 +0900 (Sun, 29 Jul 2018) | 6 lines

thread_pthread.c: clear altstacks in thread cache at GVL destruction

Otherwise, an altstack may live past ObjectSpace destruction
and xfree-ing the altstack will segfault.

[ruby-core:85621] [Feature #14487]
------------------------------------------------------------------------
r64101 | nobu | 2018-07-29 17:13:05 +0900 (Sun, 29 Jul 2018) | 6 lines

reduce LibreSSL warnings

* ext/openssl/extconf.rb: LibreSSL headers emit "overriding WinCrypt
  defines" warnings if wincrypt.h has been included (except for
  x509.h) on Windows.  get rid of including the header by defining
  NOCRYPT macro.
------------------------------------------------------------------------
r64100 | k0kubun | 2018-07-29 17:04:45 +0900 (Sun, 29 Jul 2018) | 6 lines

mjit.c: keep unit->o_file on --jit-save-temps

to use compaction with --jit-save-temps.

Prior to this commit, JIT compaction didn't work with --jit-save-temps
but it wasn't intentional.
------------------------------------------------------------------------
r64099 | k0kubun | 2018-07-29 12:22:07 +0900 (Sun, 29 Jul 2018) | 4 lines

test_jit.rb: skip known test failure on MinGW

for the ease of MSP-Greg's CI. I'll track this failure as Bug#14948 and
fix it later.
------------------------------------------------------------------------
r64098 | k0kubun | 2018-07-29 11:36:35 +0900 (Sun, 29 Jul 2018) | 3 lines

test_jit.rb: use the appropiate name

for better C-level backtrace
------------------------------------------------------------------------
r64097 | k0kubun | 2018-07-29 11:05:08 +0900 (Sun, 29 Jul 2018) | 4 lines

mjit.c: disable compaction on empty queue w/ --jit-wait

When --jit-wait is specified, `unit_queue.length` is always 0 and it's
not a good metric.
------------------------------------------------------------------------
r64096 | nobu | 2018-07-29 10:32:37 +0900 (Sun, 29 Jul 2018) | 13 lines

repack structs

Repack rb_thread_struct, rb_execution_context_struct, args_info and
iseq_compile_data to save 1 word per struct.

re_pattern_buffer remains unpacked due to the possible binary
compatibility.

[Fix GH-1907]

Based on the patch

From: Lourens Naude <lourens@bearmetal.eu>
------------------------------------------------------------------------
r64095 | nobu | 2018-07-29 09:09:08 +0900 (Sun, 29 Jul 2018) | 4 lines

mkexports.rb: flip-flop

* win32/mkexports.rb (Exports::Mswin#each_export): get rid of
  flip-flop warning.  [ruby-core:88147] [Bug #14946]
------------------------------------------------------------------------
r64094 | k0kubun | 2018-07-29 01:14:56 +0900 (Sun, 29 Jul 2018) | 100 lines

mjit.c: introduce JIT compaction [experimental]

When all compilation finishes or the number of JIT-ed code reaches
--jit-max-cache, this compacts all generated code to a single .so file
and re-loads all methods from it.

In the future, it may trigger compaction more frequently and/or limit
the maximum times of compaction to prevent unlimited memory usage.
So the current behavior is experimental, but at least the performance
improvement in this commit won't be removed.

=== Benchmark ===
In this benchmark, I'll compare following four conditions:

* trunk: r64082
* trunk JIT: r64082 w/ --jit
* single-so JIT: This commit w/ --jit
* objfcn JIT: This branch https://github.com/k0kubun/ruby/tree/objfcn w/ --jit,
  which is shinh's objfcn https://github.com/shinh/ruby/tree/objfcn rebased from this commit

```
$ uname -a
Linux bionic 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
```

* Micro benchmark
Using this script https://gist.github.com/k0kubun/10e6d3387c9ab1b134622b2c9d76ef51,
calls some amount of different methods that just return `nil`. The following tables
are its average duration seconds of 3 measurements.

Smaller is better.

** 1 method (seconds)
|       | trunk             | trunk JIT         | single-so JIT     | objfcn JIT        |
|:------|:------------------|:------------------|:------------------|:------------------|
| Time  | 5.576067774333296 | 5.915551971666446 | 5.833641665666619 | 5.845915191666639 |
| Ratio | 1.00x             | 1.06x             | 1.05x             | 1.05x             |

** 50 methods (seconds)
|       | trunk             | trunk JIT         | single-so JIT     | objfcn JIT        |
|:------|:------------------|:------------------|:------------------|:------------------|
| Time  | 3.1661167996666677| 6.125825928333342 | 4.135432743666665 | 3.750358728333348 |
| Ratio | 1.00x             | 1.93x             | 1.31x             | 1.18x             |

** 1500 methods (seconds)
|       | trunk             | trunk JIT         | single-so JIT     | objfcn JIT        |
|:------|:------------------|:------------------|:------------------|:------------------|
| Time  | 5.971650823666664 | 19.579182102999994| 10.511108153999961| 10.854653588999932|
| Ratio | 1.00x             | 3.28x             | 1.76x             | 1.82x             |

* Discourse
Using the same benchmark strategy as https://bugs.ruby-lang.org/issues/14490 with
this branch https://github.com/k0kubun/discourse/commits/benchmark2 forked from discourse
v1.8.11 to support running trunk.

1. Run ruby script/bench.rb to warm up profiling database
2. Run RUBYOPT='--jit-verbose=1 --jit-max-cache=10000' RAILS_ENV=profile bin/puma -e production
3. WAIT 5-15 or so minutes for all jitting to stop so we have no cross talk
4. Run ab -n 100 http://localhost:9292/
5. Wait for all new jitting to finish
6. Run ab -n 100 http://localhost:9292/

** Response time (ms)
Here is the response time milliseconds for each percentile.
Skipping 99%ile because it's the same as 100%ile in 100 calls.

|     | trunk| trunk|single|objfcn|
|     |      |   JIT|so JIT|   JIT|
|:----|:-----|:-----|:-----|:-----|
| 50% |   38 |   45 |   41 |   43 |
| 66% |   39 |   50 |   44 |   44 |
| 75% |   47 |   51 |   46 |   45 |
| 80% |   49 |   52 |   47 |   47 |
| 90% |   50 |   63 |   50 |   52 |
| 95% |   60 |   79 |   52 |   55 |
| 98% |   91 |  114 |   91 |   91 |
|100% |   97 |  133 |   96 |   99 |

** Ratio (smaller is better)
Here is the response time increase ratio against no-JIT trunk's one.

|     | trunk| trunk|single|objfcn|
|     |      |   JIT|so JIT|   JIT|
|:----|:-----|:-----|:-----|:-----|
| 50% | 1.00x| 1.18x| 1.08x| 1.13x|
| 66% | 1.00x| 1.28x| 1.13x| 1.13x|
| 75% | 1.00x| 1.09x| 0.98x| 0.96x|
| 80% | 1.00x| 1.06x| 0.96x| 0.96x|
| 90% | 1.00x| 1.26x| 1.00x| 1.04x|
| 95% | 1.00x| 1.32x| 0.87x| 0.92x|
| 98% | 1.00x| 1.25x| 1.00x| 1.00x|
|100% | 1.00x| 1.37x| 0.99x| 1.02x|

While 50 and 60 %ile are still worse than no-JIT trunk, 75, 80, 90, 95,
98 and 100% are not slower than that.

So now it's a little harder to say "MJIT slows down Rails applications".
Probably I can close [Bug #14490] now. Let's start improving it.

Close https://github.com/ruby/ruby/pull/1921
------------------------------------------------------------------------
r64093 | svn | 2018-07-29 00:29:15 +0900 (Sun, 29 Jul 2018) | 1 line

* 2018-07-29
------------------------------------------------------------------------
r64092 | nobu | 2018-07-29 00:29:14 +0900 (Sun, 29 Jul 2018) | 5 lines

win32.c: limit write size on console

* win32/win32.c (constat_parse): split long buffer and limit write
  size on a console, as well as rb_w32_write.
  [ruby-dev:50597] [Bug #14942]
------------------------------------------------------------------------
r64091 | nobu | 2018-07-28 22:06:43 +0900 (Sat, 28 Jul 2018) | 4 lines

test_function.rb: fix messages

* test/fiddle/test_function.rb (test_nogvl_poll): fix messages as
  failed conditions, with errno description.
------------------------------------------------------------------------
r64090 | nobu | 2018-07-28 21:47:36 +0900 (Sat, 28 Jul 2018) | 1 line

make-snapshot: fetch from the official git site
------------------------------------------------------------------------
r64089 | kazu | 2018-07-28 19:00:29 +0900 (Sat, 28 Jul 2018) | 1 line

Fix filename in comment [ci skip]
------------------------------------------------------------------------
r64088 | kazu | 2018-07-28 19:00:27 +0900 (Sat, 28 Jul 2018) | 3 lines

use https:// instead of http://

[ci skip]
------------------------------------------------------------------------
r64087 | duerst | 2018-07-28 18:44:33 +0900 (Sat, 28 Jul 2018) | 16 lines

fix range check for Hangul jamo trailers in Unicode normalization

* lib/unicode_normalize/normalize.rb: Fix the range check for trailing
  Hangul jamo characters in Unicode normalization. Different from
  leading or vowel jamos, where LBASE and VBASE are actual characters,
  a value equal to TBASE expresses the absence of a trailing jamo.
  This fix is technically correct, but there was no bug because
  the regular expressions in lib/unicode_normalize/tables.rb
  eliminate jamos equal to TBASE from normalization processing.

* test/test_unicode_normalize.rb: Add preventive test
  test_no_trailing_jamo based on
  https://github.com/python/cpython/commit/d134809cd3764c6a634eab7bb8995e3e2eff14d5
  just for the case we ever get a regression.

This closes issue #14934, thanks to MaLin (Lin Ma) for reporting.
------------------------------------------------------------------------
r64086 | duerst | 2018-07-28 18:11:13 +0900 (Sat, 28 Jul 2018) | 6 lines

always run unicode normalization that do not depend on data file

* test/test_unicode_normalize.rb: extract tests that do not depend
  on NormalizationTest.txt data file from conditionally constructed
  part of TestUnicodeNormalize class, to always run them even if
  the data file isn't found.
------------------------------------------------------------------------
r64085 | duerst | 2018-07-28 17:56:59 +0900 (Sat, 28 Jul 2018) | 4 lines

update unicode data files directory for normalization tests

* test/test_unicode_normalize.rb: search ucd directory
  first if it exists. This change follows r61415.
------------------------------------------------------------------------
r64084 | normal | 2018-07-28 12:34:30 +0900 (Sat, 28 Jul 2018) | 3 lines

use https:// instead of git:// when possible

Avoid MitM when downloading from insecure networks.
------------------------------------------------------------------------
r64083 | normal | 2018-07-28 12:10:10 +0900 (Sat, 28 Jul 2018) | 13 lines

thread.c (blocking_region_end): clear ubf before unregister_ubf_list

If we keep ubf set after unregistering, there is a window for
other threads (including timer thread) to put this thread back
on the ubf_list right away.  Entering ubf_list unexpectedly
after GVL acquisition may cause spurious wakeup and trigger
unexpected behavior.

Finally, clear ubf before acquiring GVL, to since ubf is useless
during GVL acquisition anyways and we don't want to waste cycles
in other threads calling ubf for useless work.

[ruby-core:88141] [Bug #14945]
------------------------------------------------------------------------
r64082 | k0kubun | 2018-07-28 07:27:04 +0900 (Sat, 28 Jul 2018) | 1 line

mjit.c: clean up unit link from iseq
------------------------------------------------------------------------
r64081 | tenderlove | 2018-07-28 02:28:41 +0900 (Sat, 28 Jul 2018) | 9 lines

Include Hash#size in the examples

Both methods Hash#length and Hash#size share the same source code in
Ruby, but they also share the same documentation. Now when you look at
the documentation of Hash#size you only see examples for Hash#length,
which is confusing. This commit includes Hash#size in the examples and
also remarks that both methods are equivalent to each other.

Co-authored-by: Alberto Almagro <alberto.almagro@rakuten.com>
------------------------------------------------------------------------
r64080 | svn | 2018-07-28 02:19:44 +0900 (Sat, 28 Jul 2018) | 1 line

* 2018-07-28
------------------------------------------------------------------------
r64079 | tenderlove | 2018-07-28 02:19:43 +0900 (Sat, 28 Jul 2018) | 3 lines

Escape debug output in InvalidURIError exceptions.

Co-authored-by: Brad Landers <brad@bradlanders.com>
------------------------------------------------------------------------
r64078 | mame | 2018-07-27 22:57:14 +0900 (Fri, 27 Jul 2018) | 7 lines

eval.c: rename "rb_frozen_class_p" to "rb_class_modify_check"

Just refactoring.  Despite its name, the function does NOT return a
boolean but raises an exception when the class given is frozen.
I don't think the new name "rb_class_modify_check" is the best, but
it follows the precedeint "rb_ary_modify_check", and is definitely
better than "*_p".
------------------------------------------------------------------------
r64077 | k0kubun | 2018-07-27 18:27:58 +0900 (Fri, 27 Jul 2018) | 7 lines

mjit.c: keep all .o files

and lazily delete them on termination.

This will be needed to create a large so file later.
The large number of .o files will be probably compacted before the large so
file is created.
------------------------------------------------------------------------
r64076 | k0kubun | 2018-07-27 17:51:56 +0900 (Fri, 27 Jul 2018) | 10 lines

mjit.c: use NOT_COMPILED_JIT_ISEQ_FUNC for unloaded

units, renaming it from NOT_COMPILABLE_JIT_ISEQ_FUNC.

NOT_READY_JIT_ISEQ_FUNC is for ones being compiled, so
mjit_get_iseq_func treats it specially and it shouldn't be used for the
purpose.

I renamed it instead of adding a new one because I'm not sure about the
impact for the performance by increasing the switch branches in mjit_exec.
------------------------------------------------------------------------
r64075 | k0kubun | 2018-07-27 17:24:10 +0900 (Fri, 27 Jul 2018) | 3 lines

mjit.c: release memory for unloaded unit

`xfree(unit)` was missing.
------------------------------------------------------------------------
r64074 | mame | 2018-07-27 15:28:14 +0900 (Fri, 27 Jul 2018) | 1 line

insns.def: remove old wrong explanation for get/setconstant
------------------------------------------------------------------------
r64073 | k0kubun | 2018-07-27 15:01:46 +0900 (Fri, 27 Jul 2018) | 3 lines

mjit.c: clarify the intention of setting 0

which was originally NULL before r62221
------------------------------------------------------------------------
r64072 | k0kubun | 2018-07-27 14:52:01 +0900 (Fri, 27 Jul 2018) | 1 line

test_jit.rb: test unload_units
------------------------------------------------------------------------
r64071 | nobu | 2018-07-27 14:42:56 +0900 (Fri, 27 Jul 2018) | 4 lines

ruby.c: taint ARGV on Windows

* ruby.c (external_str_new_cstr): strings come from the external
  should be tainted.  [ruby-dev:50596] [Bug #14941]
------------------------------------------------------------------------
r64070 | svn | 2018-07-27 03:46:11 +0900 (Fri, 27 Jul 2018) | 1 line

* 2018-07-27
------------------------------------------------------------------------
r64069 | marcandre | 2018-07-27 03:46:10 +0900 (Fri, 27 Jul 2018) | 6 lines

lib/ostruct: Remove unnecessary `__send__`

Patch by yuuji.yaginuma [Fix GH-1890]

Since `remove_method` is public.
Ref: https://bugs.ruby-lang.org/issues/14133
------------------------------------------------------------------------
r64068 | k0kubun | 2018-07-26 22:05:47 +0900 (Thu, 26 Jul 2018) | 1 line

mjit.c: o -> so is not compilation
------------------------------------------------------------------------
r64067 | nobu | 2018-07-26 21:48:02 +0900 (Thu, 26 Jul 2018) | 7 lines

dir.c: fix glob with base when no DT_UNKNOWN

* dir.c (do_stat, do_lstat, do_opendir): need the length of the base
  path for fstatat() when fd is valid.

* dir.c (glob_helper): fix for platforms where DT_UNKNOWN is not
  available, e.g. Solaris.
------------------------------------------------------------------------
r64066 | kazu | 2018-07-26 21:47:01 +0900 (Thu, 26 Jul 2018) | 1 line

Add missing escape
------------------------------------------------------------------------
r64065 | nobu | 2018-07-26 21:04:32 +0900 (Thu, 26 Jul 2018) | 4 lines

process.c: conditionally used functions

* process.c (before_fork_ruby, after_fork_ruby): used only if fork()
  or daemon() is available.
------------------------------------------------------------------------
r64064 | nobu | 2018-07-26 18:34:30 +0900 (Thu, 26 Jul 2018) | 1 line

dladdr() is declared with non-const pointer on Solaris
------------------------------------------------------------------------
r64063 | nobu | 2018-07-26 18:32:42 +0900 (Thu, 26 Jul 2018) | 1 line

fork() is deprecated on Solaris
------------------------------------------------------------------------
r64062 | normal | 2018-07-26 17:30:10 +0900 (Thu, 26 Jul 2018) | 18 lines

cont.c (ec_switch): prevent delayed/missed trap interrupt race

timer-thread may set trap interrupt with rb_threadptr_check_signal
at any time independent of GVL.  This means timer-thread may set
the trap interrupt flag on the previous execution context; causing
the flag to be unnoticed until a future ec switch (or lost
completely if the ec is done).

Note: I avoid relying on th->interrupt_lock here and use
atomics because we won't be able to rely on it for proposed lazy
timer-thread [Misc #14937].

This regression affects Ruby 2.5 as it was introduced by moving
interrupt_flag to `ec' which is an unstable pointer.  Ruby <= 2.4
was unaffected because vm->main_thread->interrupt_flag never
changed.

[ruby-core:88119] [Bug #14939]
------------------------------------------------------------------------
r64061 | nobu | 2018-07-26 16:23:14 +0900 (Thu, 26 Jul 2018) | 1 line

ignore built files
------------------------------------------------------------------------
r64060 | normal | 2018-07-26 12:21:52 +0900 (Thu, 26 Jul 2018) | 34 lines

webrick: Support bcrypt password hashing

This adds a password_hash keyword argument to
WEBrick::HTTPAuth::Htpasswd#initialize.  If set to :bcrypt, it
will create bcrypt hashes instead of crypt hashes, and will
raise an exception if the .htpasswd file uses crypt hashes.

If :bcrypt is used, then instead of calling
BasicAuth.make_passwd (which uses crypt),
WEBrick::HTTPAuth::Htpasswd#set_passwd will set the bcrypt
password directly.  It isn't possible to change the
make_passwd API to accept the password hash format, as that
would break configurations who use Htpasswd#auth_type= to set
a custom auth_type.

This modifies WEBrick::HTTPAuth::BasicAuth to handle checking
both crypt and bcrypt hashes.

There are commented out requires for 'string/crypt', to handle
when String#crypt is deprecated and the undeprecated version is
moved to a gem.

There is also a commented out warning for the case when
the password_hash keyword is not specified and 'string/crypt'
cannot be required.  I think the warning makes sense to nudge
users to using bcrypt.

I've updated the tests to test nil, :crypt, and :bcrypt values
for the password_hash keyword, skipping the bcrypt tests if the
bcrypt library cannot be required.

[ruby-core:88111] [Feature #14940]

From: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r64059 | normal | 2018-07-26 07:32:54 +0900 (Thu, 26 Jul 2018) | 3 lines

test/ruby/test_io.rb (test_select_leak): skip with MJIT

We need better ways to test for leaks :<
------------------------------------------------------------------------
r64058 | tenderlove | 2018-07-26 03:09:02 +0900 (Thu, 26 Jul 2018) | 68 lines

[Doc] Recover example about Queue

`trunk@42862` dropped example's last line.

https://github.com/ruby/ruby/commit/e334bb2ce5d8876b020ab681f21595e2e1c9d601#diff-8783a9b452e430bcf0d7b0c6e34f1db0L144
https://github.com/ruby/ruby/commit/e334bb2ce5d8876b020ab681f21595e2e1c9d601#diff-38e7b9d781319cfbc49445f8f6625b8aR195

This brings no output.

```queue_example1.rb
queue = Queue.new

producer = Thread.new do
  5.times do |i|
    sleep rand(i) # simulate expense
    queue << i
    puts "#{i} produced"
  end
end

consumer = Thread.new do
  5.times do |i|
    value = queue.pop
    sleep rand(i/2) # simulate expense
    puts "consumed #{value}"
  end
end
```

```queue_example2.rb
queue = Queue.new

producer = Thread.new do
  5.times do |i|
    sleep rand(i) # simulate expense
    queue << i
    puts "#{i} produced"
  end
end

consumer = Thread.new do
  5.times do |i|
    value = queue.pop
    sleep rand(i/2) # simulate expense
    puts "consumed #{value}"
  end
end

consumer.join
```

$ ruby queue_example1.rb
$

$ ruby queue_example2.rb
0 produced
1 produced
consumed 0
consumed 1
2 produced
consumed 2
3 produced
consumed 3
4 produced
consumed 4
$

Co-Authored-By: Sanemat <o.gata.ken@gmail.com>
------------------------------------------------------------------------
r64057 | tenderlove | 2018-07-26 03:06:29 +0900 (Thu, 26 Jul 2018) | 5 lines

Remove obsolete comment from Module#define_method documentation

Since 2.5, Module#define_method is public. (feature #14133)

Co-Authored-By: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r64056 | tenderlove | 2018-07-26 03:04:16 +0900 (Thu, 26 Jul 2018) | 3 lines

Fixes the File::CREAT logger documentation

Co-Authored-By: Matias Korhonen <matias@kiskolabs.com>
------------------------------------------------------------------------
r64055 | svn | 2018-07-26 03:00:12 +0900 (Thu, 26 Jul 2018) | 1 line

* 2018-07-26
------------------------------------------------------------------------
r64054 | tenderlove | 2018-07-26 03:00:09 +0900 (Thu, 26 Jul 2018) | 3 lines

Add docs to RubyVM::AST

Co-Authored-By: Robert Mosolgo <rdmosolgo@gmail.com>
------------------------------------------------------------------------
r64053 | k0kubun | 2018-07-25 23:55:43 +0900 (Wed, 25 Jul 2018) | 8 lines

insns.def: s/handles_frame/handles_sp/

because it's more suitable to describe the current behavior now.

tool/ruby_vm/models/bare_instructions.rb: ditto.
tool/ruby_vm/views/_insn_entry.erb: ditto.
tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto.
tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb: ditto.
------------------------------------------------------------------------
r64052 | k0kubun | 2018-07-25 23:36:08 +0900 (Wed, 25 Jul 2018) | 56 lines

mjit.c: split build stages for unix

I'm going to build a large .so file that combines multiple .o files.
For that change, I want to confirm the impact to performance by this
change. So far, I haven't seen the significant change on the max
performance.

* before
$ for i in 1 2 3 4 5 6 7 8 9 1 2; do ruby --jit ../../mame/optcarrot/bin/optcarrot --benchmark ../../mame/optcarrot/examples/Lan_Master.nes; done
fps: 67.66058054621772
checksum: 59662
fps: 67.53138656233348
checksum: 59662
fps: 67.44109425628592
checksum: 59662
fps: 70.29423063961576
checksum: 59662
fps: 72.0147653358158
checksum: 59662
fps: 69.40157398157892
checksum: 59662
fps: 72.3984212467565
checksum: 59662
fps: 67.15473484463604
checksum: 59662
fps: 70.14142014098444
checksum: 59662
fps: 72.51761974327023
checksum: 59662
fps: 72.41086970333218
checksum: 59662

* after
$ for i in 1 2 3 4 5 6 7 8 9 1 2; do ruby --jit ../../mame/optcarrot/bin/optcarrot --benchmark ../../mame/optcarrot/examples/Lan_Master.nes; done
fps: 69.53134628999938
checksum: 59662
fps: 66.13157649232654
checksum: 59662
fps: 70.17474368971281
checksum: 59662
fps: 61.88316323809907
checksum: 59662
fps: 72.48731307319704
checksum: 59662
fps: 65.1180687907147
checksum: 59662
fps: 68.89553415996615
checksum: 59662
fps: 65.77342314036225
checksum: 59662
fps: 64.33337015048106
checksum: 59662
fps: 64.98152672793444
checksum: 59662
fps: 72.225729092625
checksum: 59662
------------------------------------------------------------------------
r64051 | k0kubun | 2018-07-25 22:54:00 +0900 (Wed, 25 Jul 2018) | 8 lines

mjit.c: completely separate compile_c_to_so

by whether on mswin or not.

This is needed because I'm going to renew the compilation process for
unix, keeping mswin builds as it is, at first.

This commit is not changing the behavior at all.
------------------------------------------------------------------------
r64050 | k0kubun | 2018-07-25 21:33:38 +0900 (Wed, 25 Jul 2018) | 1 line

mjit.c: prevent memory leak on realloc failure
------------------------------------------------------------------------
r64049 | hsbt | 2018-07-25 21:31:58 +0900 (Wed, 25 Jul 2018) | 1 line

Update latest default gems on maintainers.rdoc and standard_library.rdoc.
------------------------------------------------------------------------
r64048 | hsbt | 2018-07-25 21:28:17 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote Mutex_m to Default gems.

  * lib/mutex_m.gemspec: Added initial gemspec.
  * lib/mutex_m.rb: Added Mutex_m::VERSION for gemspec.
  * tool/sync_default_gems.rb: Support Mutex_m.
------------------------------------------------------------------------
r64047 | svn | 2018-07-25 21:26:42 +0900 (Wed, 25 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64046 | hsbt | 2018-07-25 21:26:41 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote Exception2MessageMapper to Default gems.

  * lib/e2mmap.gemspec: Added initial gemspec.
  * lib/e2mmap/version.rb: Added Exception2MessageMapper::VERSION for gemspec.
  * tool/sync_default_gems.rb: Support Exception2MessageMapper.
------------------------------------------------------------------------
r64045 | svn | 2018-07-25 21:15:46 +0900 (Wed, 25 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64044 | hsbt | 2018-07-25 21:15:45 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote ThWait to Default gems.

  * lib/thwait.gemspec: Added initial gemspec.
  * lib/thwait/version.rb: Added ThWait::VERSION for gemspec.
  * tool/sync_default_gems.rb: Support ThWait.
------------------------------------------------------------------------
r64043 | hsbt | 2018-07-25 20:59:21 +0900 (Wed, 25 Jul 2018) | 1 line

Removed duplicate task in default gems that used single test file
------------------------------------------------------------------------
r64042 | hsbt | 2018-07-25 20:53:57 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote Forwardable to default gems.

  * lib/forwardable.rb: Added Forwardable::VERSION and re-use it.
  * lib/forwardable/forwardable.gemspec: Added initial gemspec.
  * tool/sync_default_gems.rb: Support forwaradable repository.
------------------------------------------------------------------------
r64041 | hsbt | 2018-07-25 20:51:43 +0900 (Wed, 25 Jul 2018) | 1 line

Removed duplicate task in default gems
------------------------------------------------------------------------
r64040 | hsbt | 2018-07-25 20:47:04 +0900 (Wed, 25 Jul 2018) | 1 line

Support logger.gemspec
------------------------------------------------------------------------
r64039 | hsbt | 2018-07-25 20:34:35 +0900 (Wed, 25 Jul 2018) | 4 lines

Update latest versions of bundled gems.

  * net-telnet-0.2.0
  * power_assert-1.1.3
------------------------------------------------------------------------
r64038 | naruse | 2018-07-25 05:24:27 +0900 (Wed, 25 Jul 2018) | 4 lines

Revert "dir.c: fix glob with base when no DT_UNKNOWN"

This reverts commit r63982.
It breaks build on Solaris 11.
------------------------------------------------------------------------
r64037 | k0kubun | 2018-07-25 00:40:05 +0900 (Wed, 25 Jul 2018) | 10 lines

mjit.c: handle memory allocation failure

which was missing in r64033.

Prior to r64033, memory allocation failure had been checked by
TRY_WITH_GC and handled by rb_memerror. But calling rb_memerror on MJIT
worker is problematic since it does EC_JUMP_TAG in the end. Threads
except Ruby's main thread must not use it.

mjit_compile.c: ditto
------------------------------------------------------------------------
r64036 | svn | 2018-07-25 00:17:09 +0900 (Wed, 25 Jul 2018) | 1 line

* 2018-07-25
------------------------------------------------------------------------
r64035 | k0kubun | 2018-07-25 00:17:08 +0900 (Wed, 25 Jul 2018) | 10 lines

vm.c: simplify the implementation of r64031

because such inconsistency may result in the regression fixed in r64034.

vm_exec is not touched since renaming it may be controversial...

vm_args.c: ditto.
vm_eval.c: ditto.
vm_insnhelper.c: ditto.
vm_method.c: ditto.
------------------------------------------------------------------------
r64034 | k0kubun | 2018-07-24 23:43:40 +0900 (Tue, 24 Jul 2018) | 3 lines

transform_mjit_header.rb: fix performance regression

on r64031. Compiling vm_search_method_slowpath is very slow.
------------------------------------------------------------------------
r64033 | k0kubun | 2018-07-24 23:36:10 +0900 (Tue, 24 Jul 2018) | 7 lines

mjit.c: prevent GC on MJIT worker

mjit_compile.c: ditto.

REALLOC_N, ALLOC_N and xmalloc trigger GC but it's not expected.
Other allocation calls in mjit.c are executed on Ruby's main thread and
thus fine.
------------------------------------------------------------------------
r64032 | k0kubun | 2018-07-24 21:19:47 +0900 (Tue, 24 Jul 2018) | 5 lines

test_jit.rb: give up debugging cc1 issue

in a short term, and add retries to prevent random CI failures by it.

I remember this and will address it later for sure.
------------------------------------------------------------------------
r64031 | nobu | 2018-07-24 21:12:59 +0900 (Tue, 24 Jul 2018) | 1 line

prefix symbols exported for mjit
------------------------------------------------------------------------
r64030 | k0kubun | 2018-07-24 20:54:15 +0900 (Tue, 24 Jul 2018) | 1 line

test_jit.rb: suppress unused variable warning
------------------------------------------------------------------------
r64029 | kazu | 2018-07-24 18:15:58 +0900 (Tue, 24 Jul 2018) | 11 lines

Try to suppress warning on some CI

http://ci.rvm.jp/results/trunk-asserts-nopara@silicon-docker/1149270
```
/home/ko1/ruby/src/trunk-asserts-nopara/process.c: In function 'assert_close_on_exec':
/home/ko1/ruby/src/trunk-asserts-nopara/process.c:298:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
         (void)write(2, m, sizeof(m) - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

workaround from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425#c34
------------------------------------------------------------------------
r64028 | nobu | 2018-07-24 16:47:01 +0900 (Tue, 24 Jul 2018) | 4 lines

time.rb: yday support

* lib/time.rb (Time.make_time): added yday support.
  [ruby-core:87545] [Bug #14860]
------------------------------------------------------------------------
r64027 | nobu | 2018-07-24 15:03:02 +0900 (Tue, 24 Jul 2018) | 1 line

dsymutil needs the object files
------------------------------------------------------------------------
r64026 | svn | 2018-07-24 14:38:09 +0900 (Tue, 24 Jul 2018) | 1 line

* 2018-07-24
------------------------------------------------------------------------
r64025 | nobu | 2018-07-24 14:38:07 +0900 (Tue, 24 Jul 2018) | 4 lines

UNREACHABLE_RETURN

* include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end
  of non-void functions.
------------------------------------------------------------------------
r64024 | svn | 2018-07-23 18:56:50 +0900 (Mon, 23 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64023 | kazu | 2018-07-23 18:56:49 +0900 (Mon, 23 Jul 2018) | 1 line

Revert previous commit and split lib/tracer/version.rb
------------------------------------------------------------------------
r64022 | kazu | 2018-07-23 18:49:46 +0900 (Mon, 23 Jul 2018) | 1 line

Revert partially to avoid test error temporarily
------------------------------------------------------------------------
r64021 | kazu | 2018-07-23 18:49:45 +0900 (Mon, 23 Jul 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64020 | usa | 2018-07-23 15:22:25 +0900 (Mon, 23 Jul 2018) | 2 lines

60 sec is not enough at all

------------------------------------------------------------------------
r64019 | ko1 | 2018-07-23 15:08:02 +0900 (Mon, 23 Jul 2018) | 4 lines

increase timeout seconds.
* test/ruby/test_io.rb (test_select_leak): increase timeout seconds
  to pass this test on a high-load machine.

------------------------------------------------------------------------
r64018 | normal | 2018-07-23 10:07:41 +0900 (Mon, 23 Jul 2018) | 6 lines

Revert "thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls"

This reverts commit r64017
(git commit 2ff85621690f4f5b0dff9226ac68418a950a6919).

Nevermind, haven't had enough coffee, yet :x
------------------------------------------------------------------------
r64017 | normal | 2018-07-23 09:51:51 +0900 (Mon, 23 Jul 2018) | 5 lines

thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls

There's no need to resize each rb_fdset_t to match the size of
the biggest one.  This can allow some small memory savings if
watching several sets of FDs simultaneously.
------------------------------------------------------------------------
r64016 | svn | 2018-07-23 01:03:59 +0900 (Mon, 23 Jul 2018) | 1 line

* 2018-07-23
------------------------------------------------------------------------
r64015 | nobu | 2018-07-23 01:03:58 +0900 (Mon, 23 Jul 2018) | 5 lines

object.c: prefer base optarg

* object.c (rb_f_integer): prefer `base` optional argument over
  keyword arguments.  this issue should be resolved more generally
  by separating keyword arguments from hashes in the future.
------------------------------------------------------------------------
r64014 | nobu | 2018-07-22 19:47:33 +0900 (Sun, 22 Jul 2018) | 6 lines

fix sum on infinity

* array.c (rb_ary_sum): consider non-finite floats.
  [ruby-core:88024] [Bug #14926]

* enum.c (sum_iter): ditto.
------------------------------------------------------------------------
r64013 | kazu | 2018-07-22 19:02:54 +0900 (Sun, 22 Jul 2018) | 7 lines

Remove needless `nacl` check

`nacl` support already removed by https://github.com/ruby/ruby/pull/1726.

[Fix GH-1920]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r64012 | svn | 2018-07-22 11:53:39 +0900 (Sun, 22 Jul 2018) | 1 line

* 2018-07-22
------------------------------------------------------------------------
r64011 | k0kubun | 2018-07-22 11:53:38 +0900 (Sun, 22 Jul 2018) | 13 lines

test_rubyoptions.rb: allow passing test_verbose

with --jit.

`./ruby --jit -Itest/lib test/ruby/test_rubyoptions.rb -n "TestRubyOptions#test_verbose"`
has failed without -DMJIT_FORCE_ENABLE like:

  1) Failure:
TestRubyOptions#test_verbose [/home/travis/build/k0kubun/mjit-test/test/ruby/test_rubyoptions.rb:118]:
<"ruby 2.6.0dev (2018-07-21 trunk 64010) +JIT [x86_64-linux]"> expected but was
<"ruby 2.6.0dev (2018-07-21 trunk 64010) [x86_64-linux]">.

but the test should pass even without -DMJIT_FORCE_ENABLE.
------------------------------------------------------------------------
r64010 | svn | 2018-07-21 22:07:52 +0900 (Sat, 21 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64009 | svn | 2018-07-21 22:07:52 +0900 (Sat, 21 Jul 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64008 | mame | 2018-07-21 22:07:50 +0900 (Sat, 21 Jul 2018) | 4 lines

sample/trick2018/: adds the top-five entries of TRICK 2018

See https://github.com/tric/trick2018 for TRICK 2018.
Fixes #14930.
------------------------------------------------------------------------
r64007 | normal | 2018-07-21 12:26:38 +0900 (Sat, 21 Jul 2018) | 11 lines

thread.c (do_select): fix leak on exception

When do_select is interrupted and raise happens from
RUBY_VM_CHECK_INTS_BLOCKING, the original FD sets we copied
do not get freed, leading to a memory leak.  Wrap up all the
FD sets into a Ruby object to ensure the GC can release an
allocations made for rb_fdset_t.

This leak existed since Ruby 2.0.0 (r36430)

[Bug #14929]
------------------------------------------------------------------------
r64006 | svn | 2018-07-21 07:30:40 +0900 (Sat, 21 Jul 2018) | 1 line

* 2018-07-21
------------------------------------------------------------------------
r64005 | normal | 2018-07-21 07:30:39 +0900 (Sat, 21 Jul 2018) | 6 lines

test/-ext-/gvl/test_last_thread.rb: skip under MJIT

Spurious wakeup is unavoidable with MJIT; and any real
code must be able to deal with spurious wakeup anyways.

[ruby-core:87882] https://bugs.ruby-lang.org/issues/14901
------------------------------------------------------------------------
r64004 | hsbt | 2018-07-20 11:24:59 +0900 (Fri, 20 Jul 2018) | 7 lines

Promote Shell library to default gems.

  * doc/*: Move entry to default gems category from standard library.
  * lib/shell/*: Added `Shell::VERSION` and re-used it with @RELEASE_VERSION.
  * test/shell/test_command_processor.rb: added missing require for test library.
  * tool/sync_default_gems.rb: Support shell library. We need to ignore shellwords.rb when
    syncing shell* files.
------------------------------------------------------------------------
r64003 | hsbt | 2018-07-20 10:48:11 +0900 (Fri, 20 Jul 2018) | 1 line

Fixed wrong library patFixed wrong library pathh
------------------------------------------------------------------------
r64002 | kazu | 2018-07-20 10:40:36 +0900 (Fri, 20 Jul 2018) | 1 line

Do not use `git ls-files` for file listing.
------------------------------------------------------------------------
r64001 | svn | 2018-07-20 10:26:00 +0900 (Fri, 20 Jul 2018) | 1 line

* 2018-07-20
------------------------------------------------------------------------
r64000 | hsbt | 2018-07-20 10:25:59 +0900 (Fri, 20 Jul 2018) | 1 line

Promote Tracer to default gems.
------------------------------------------------------------------------
r63999 | k0kubun | 2018-07-19 22:25:22 +0900 (Thu, 19 Jul 2018) | 38 lines

mjit_compile.c: reduce sp motion on JIT

This retries r62655, which was reverted at r63863 for r63763.

tool/ruby_vm/views/_mjit_compile_insn.erb: revert the revert.
tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto.
tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb: ditto.
tool/ruby_vm/views/_mjit_compile_send.erb: ditto.
tool/ruby_vm/views/mjit_compile.inc.erb: ditto.

tool/ruby_vm/views/_insn_entry.erb: revert half of r63763. The commit
  was originally reverted since changing pc motion was bad for tracing,
  but changing sp motion was totally fine. For JIT, I wanna resurrect
  the sp motion change in r62051.
tool/ruby_vm/models/bare_instructions.rb: ditto.
insns.def: ditto.
vm_insnhelper.c: ditto.
vm_insnhelper.h: ditto.

* benchmark

$ benchmark-driver benchmark.yml --rbenv 'before;after;before --jit;after --jit' --repeat-count 12 -v
before: ruby 2.6.0dev (2018-07-19 trunk 63998) [x86_64-linux]
after: ruby 2.6.0dev (2018-07-19 add-sp 63998) [x86_64-linux]
last_commit=mjit_compile.c: reduce sp motion on JIT
before --jit: ruby 2.6.0dev (2018-07-19 trunk 63998) +JIT [x86_64-linux]
after --jit: ruby 2.6.0dev (2018-07-19 add-sp 63998) +JIT [x86_64-linux]
last_commit=mjit_compile.c: reduce sp motion on JIT
Calculating -------------------------------------
                             before       after  before --jit  after --jit
Optcarrot Lan_Master.nes     51.354      50.238        70.010       72.139 fps

Comparison:
             Optcarrot Lan_Master.nes
             after --jit:        72.1 fps
            before --jit:        70.0 fps - 1.03x  slower
                  before:        51.4 fps - 1.40x  slower
                   after:        50.2 fps - 1.44x  slower
------------------------------------------------------------------------
r63998 | svn | 2018-07-19 20:22:05 +0900 (Thu, 19 Jul 2018) | 1 line

* 2018-07-19
------------------------------------------------------------------------
r63997 | nobu | 2018-07-19 20:22:03 +0900 (Thu, 19 Jul 2018) | 1 line

renamed ruby_tz_update as ruby_tz_uptodate_p
------------------------------------------------------------------------
r63996 | k0kubun | 2018-07-18 22:11:03 +0900 (Wed, 18 Jul 2018) | 1 line

test_rubyoptions.rb: skip testing JIT on mswin
------------------------------------------------------------------------
r63995 | k0kubun | 2018-07-18 21:45:54 +0900 (Wed, 18 Jul 2018) | 11 lines

ruby.c: accept --disable-jit option

by promoting jit to feature flag.

mjit.h: update comment about mjit_opts.on

test_rubyoptions.rb: add test for switching JIT enablement

"--jit" flag usage may be deprecated later, but not discussed yet.

[Feature #14878]
------------------------------------------------------------------------
r63994 | nobu | 2018-07-18 19:30:41 +0900 (Wed, 18 Jul 2018) | 4 lines

reduce tzset

* time.c (rb_localtime_r): call tzset() only after TZ environment
  variable is changed.
------------------------------------------------------------------------
r63993 | normal | 2018-07-18 17:16:18 +0900 (Wed, 18 Jul 2018) | 9 lines

zlib (rb_gzreader_getc): localize and return cbuf directly

No point in having a long-lived cbuf in "struct gzfile"
since GZFILE_CBUF_CAPA is smaller than RSTRING_EMBED_LEN_MAX
(even on 32-bit).  We can also have rb_econv_convert write
directly to the return value instead of an intermediate buffer.

This brings "struct gzfile" from 264 to 256 bytes on 64-bit
systems to avoid taking an additional cache line.
------------------------------------------------------------------------
r63992 | tenderlove | 2018-07-18 07:27:52 +0900 (Wed, 18 Jul 2018) | 22 lines

Include the alternative malloc header instead of malloc.h

This commit fixes a build error on systems that have
`malloc_usable_size` but also enable jemalloc via `--with-jemalloc`.
For example, Ubuntu Precise defines `malloc_usable_size` in malloc.h, so
gc.c will include malloc.h.  This definition conflicts with jemalloc's
definition, so the following error occurs:

```
compiling gc.c
compiling hash.c
In file included from gc.c:50:0:
/usr/include/malloc.h:152:15: error: conflicting types for 'malloc_usable_size'
/usr/include/jemalloc/jemalloc.h:45:8: note: previous declaration of 'malloc_usable_size' was here
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
```

Since jemalloc always defines `malloc_usable_size`, this patch just
includes the jemalloc header instead of malloc.h if it's available.
------------------------------------------------------------------------
r63991 | k0kubun | 2018-07-18 01:20:15 +0900 (Wed, 18 Jul 2018) | 5 lines

revert r63988

Due to trunk-mjit CI failures:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130097
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130196
------------------------------------------------------------------------
r63990 | k0kubun | 2018-07-18 00:15:31 +0900 (Wed, 18 Jul 2018) | 6 lines

insns.def: remove redundant ifndef in r63988

By the way, the original patch of r63988 was provided by wanabe:
https://github.com/wanabe/ruby/tree/local-stack

but I forgot to add his credit in the previous commit message.
------------------------------------------------------------------------
r63989 | svn | 2018-07-18 00:09:42 +0900 (Wed, 18 Jul 2018) | 1 line

* 2018-07-18
------------------------------------------------------------------------
r63988 | k0kubun | 2018-07-18 00:09:41 +0900 (Wed, 18 Jul 2018) | 29 lines

mjit_compile.c: resurrect local variable stack

This optimization was reverted on r63863, but this commit resurrects the
optimization to skip some sp motions on JIT execution.

tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto
tool/ruby_vm/views/_mjit_compile_insn.erb: ditto

insns.def: resurrect handles_frame as handles_stack, which was deleted
on r63763.
tool/ruby_vm/models/bare_instructions.rb: ditto

vm_insnhelper.c: prevent moving sp outside insns.def to allow modifying
it by JIT.

* Optcarrot benchmark

$ benchmark-driver benchmark.yml --rbenv 'before --jit;after --jit' --repeat-count 12 -v
before --jit: ruby 2.6.0dev (2018-07-17 trunk 63987) +JIT [x86_64-linux]
after --jit: ruby 2.6.0dev (2018-07-17 local-stack 63987) +JIT [x86_64-linux]
last_commit=mjit_compile.c: resurrect local variable stack
Calculating -------------------------------------
                         before --jit  after --jit
Optcarrot Lan_Master.nes       70.518       72.144 fps

Comparison:
             Optcarrot Lan_Master.nes
             after --jit:        72.1 fps
            before --jit:        70.5 fps - 1.02x  slower
------------------------------------------------------------------------
r63987 | hsbt | 2018-07-17 21:21:29 +0900 (Tue, 17 Jul 2018) | 1 line

Promote Synchronizer to default gems.
------------------------------------------------------------------------
r63986 | hsbt | 2018-07-17 20:39:16 +0900 (Tue, 17 Jul 2018) | 1 line

Unified common workflow for default gems.
------------------------------------------------------------------------
r63985 | nobu | 2018-07-17 10:26:22 +0900 (Tue, 17 Jul 2018) | 1 line

test for wrong order: option
------------------------------------------------------------------------
r63984 | nobu | 2018-07-17 10:22:32 +0900 (Tue, 17 Jul 2018) | 8 lines

Fix message when `order` was an invalid value

The symbol that can be used is `:bottom`, not `:down`.
Ref: https://github.com/ruby/ruby/blob/e39b2cff8ac2dc93b35bd43ffcce3ded8e3b4c25/error.c#L1061

[Fix GH-1916]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r63983 | nobu | 2018-07-17 10:00:05 +0900 (Tue, 17 Jul 2018) | 1 line

ruby-runner.c: show the failed path
------------------------------------------------------------------------
r63982 | nobu | 2018-07-17 09:47:19 +0900 (Tue, 17 Jul 2018) | 7 lines

dir.c: fix glob with base when no DT_UNKNOWN

* dir.c (do_stat, do_lstat): need the length of the base path for
  fstatat() when fd is valid.

* dir.c (glob_helper): fix for platforms where DT_UNKNOWN is not
  available, e.g. Solaris.
------------------------------------------------------------------------
r63981 | svn | 2018-07-17 00:06:15 +0900 (Tue, 17 Jul 2018) | 1 line

* 2018-07-17
------------------------------------------------------------------------
r63980 | kazu | 2018-07-17 00:06:14 +0900 (Tue, 17 Jul 2018) | 1 line

[DOC] Update doc of NameError.new [ci skip]
------------------------------------------------------------------------
r63979 | naruse | 2018-07-16 23:43:38 +0900 (Mon, 16 Jul 2018) | 3 lines

No one knows how many leap seconds in year 2100

Just check whether leep seconds are considered or not.
------------------------------------------------------------------------
r63978 | duerst | 2018-07-16 19:20:24 +0900 (Mon, 16 Jul 2018) | 6 lines

tool/downloader.rb:

* remove initial "./" from destdir to make downloading
  ./enc/unicode/data/11.0.0/ucd/auxiliary/GraphemeBreakProperty.txt
  work properly
* tweak a comment
------------------------------------------------------------------------
r63977 | nobu | 2018-07-16 14:05:27 +0900 (Mon, 16 Jul 2018) | 4 lines

ruby.c: disable DidYouMean as gem

* ruby.c (process_options): as DidYouMean requires Rubygems, disable
  the former when the latter is disabled too.
------------------------------------------------------------------------
r63976 | yui-knk | 2018-07-16 11:07:44 +0900 (Mon, 16 Jul 2018) | 1 line

parse.y (heredoc_identifier): Update comment for term_len
------------------------------------------------------------------------
r63975 | svn | 2018-07-16 10:26:26 +0900 (Mon, 16 Jul 2018) | 1 line

* 2018-07-16
------------------------------------------------------------------------
r63974 | yui-knk | 2018-07-16 10:26:25 +0900 (Mon, 16 Jul 2018) | 1 line

parse.y: Add comment for `rb_strterm_heredoc_struct.sourceline`
------------------------------------------------------------------------
r63973 | ktsj | 2018-07-15 20:45:59 +0900 (Sun, 15 Jul 2018) | 3 lines

node.h: remove unused macro nd_compile_option

Follow up of r61610
------------------------------------------------------------------------
r63972 | ktsj | 2018-07-15 20:42:15 +0900 (Sun, 15 Jul 2018) | 3 lines

vm_core.h, vm_dump.c: fix cast

Revert r63968 and cast at caller side to prevent unintentional casting.
------------------------------------------------------------------------
r63971 | nobu | 2018-07-15 18:57:27 +0900 (Sun, 15 Jul 2018) | 1 line

process.c: adjust indent [ci skip]
------------------------------------------------------------------------
r63970 | ktsj | 2018-07-15 18:48:09 +0900 (Sun, 15 Jul 2018) | 1 line

insns.def: fix typo in comment
------------------------------------------------------------------------
r63969 | ktsj | 2018-07-15 18:47:12 +0900 (Sun, 15 Jul 2018) | 1 line

vm_dump.c: fix warning about constness
------------------------------------------------------------------------
r63968 | ktsj | 2018-07-15 18:45:31 +0900 (Sun, 15 Jul 2018) | 1 line

vm_core.h: add missing cast
------------------------------------------------------------------------
r63967 | svn | 2018-07-15 02:04:57 +0900 (Sun, 15 Jul 2018) | 1 line

* 2018-07-15
------------------------------------------------------------------------
r63966 | watson1978 | 2018-07-15 02:04:56 +0900 (Sun, 15 Jul 2018) | 3 lines

Fix documentation in Object#remove_instance_variable

It should be described that the string argument will be accept like Object#instance_variable_get.
------------------------------------------------------------------------
r63965 | svn | 2018-07-14 11:59:41 +0900 (Sat, 14 Jul 2018) | 1 line

* 2018-07-14
------------------------------------------------------------------------
r63964 | normal | 2018-07-14 11:59:39 +0900 (Sat, 14 Jul 2018) | 5 lines

webrick/httpresponse: set_redirect requires a valid URI

Prevents response splitting and HTML injection attacks in
poorly-written applications which blindly pass along user input
in redirects.
------------------------------------------------------------------------
r63963 | normal | 2018-07-13 15:05:43 +0900 (Fri, 13 Jul 2018) | 3 lines

process.c (assert_close_on_exec): quiet warning about unused result

Not much we can do if writing to STDERR_FILENO fails.
------------------------------------------------------------------------
r63962 | normal | 2018-07-13 12:15:04 +0900 (Fri, 13 Jul 2018) | 4 lines

test/ruby/test_signal.rb (test_sigchld_ignore): increase timeout

I suspect CI test machine was overloaded at the time,
or swapping at the time due to parallel build with mjit.
------------------------------------------------------------------------
r63961 | svn | 2018-07-13 08:23:26 +0900 (Fri, 13 Jul 2018) | 1 line

* 2018-07-13
------------------------------------------------------------------------
r63960 | normal | 2018-07-13 08:23:25 +0900 (Fri, 13 Jul 2018) | 16 lines

timer_thread: do not close pipes around fork

There's actually no need to close the pipes used by the
sleepy timer thread before forking, only to stop the timer
thread itself.

Instead, we only close the parent pipes in the child process,
either via close-on-exec flag or when reinitializing the timer
thread.

This change will be necessary when we allow
rb_wait_for_single_fd and rb_thread_fd_select to wait on the
timer_thread_pipe.normal[0] directly and eliminate timer thread.

I don't anticipate compatibility problems with this change
alone.
------------------------------------------------------------------------
r63959 | nobu | 2018-07-12 14:01:04 +0900 (Thu, 12 Jul 2018) | 8 lines

Improve branch misses

Improve branch misses on frozen object predicate checks negatively
affecting performance of most setters as most objects are not frozen.

[Fix GH-1913]

From: Lourens Naude <lourens@bearmetal.eu>
------------------------------------------------------------------------
r63958 | kazu | 2018-07-12 12:59:13 +0900 (Thu, 12 Jul 2018) | 9 lines

Fix compile error on debian8 and gentoo

https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20180711T213004Z.log.html.gz#miniruby
https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20180711T213003Z.log.html.gz#miniruby
```
./include/ruby/ruby.h:2213:49: error: missing binary operator before token "("
 # if defined(__has_attribute) && __has_attribute(diagnose_if)
                                                 ^
```
------------------------------------------------------------------------
r63957 | nobu | 2018-07-12 11:29:57 +0900 (Thu, 12 Jul 2018) | 7 lines

removed unusecd constants

* ruby-runner.c (ruby_libm_func): removed as the following test
  actually doesn't need the path of libm.

* test/fiddle/test_pointer.rb (Fiddle::TestPointer#test_free=):
  removed never used constants and instance variables.
------------------------------------------------------------------------
r63956 | nobu | 2018-07-12 11:14:00 +0900 (Thu, 12 Jul 2018) | 7 lines

exe/ruby: link libm for fiddle test

* common.mk (exe/ruby): $(LIBS) should come after the source file
  due to the ld spec.

* ruby-runner.c (ruby_libm_func): force to link libm for fiddle
  test.
------------------------------------------------------------------------
r63955 | svn | 2018-07-12 07:49:50 +0900 (Thu, 12 Jul 2018) | 1 line

* 2018-07-12
------------------------------------------------------------------------
r63954 | k0kubun | 2018-07-12 07:49:48 +0900 (Thu, 12 Jul 2018) | 4 lines

benchmark/README.md: skip showing --timeout option [ci skip]

because it's only available for limited platforms for now.
I'll make it portable and show it later.
------------------------------------------------------------------------
r63953 | kazu | 2018-07-11 22:00:56 +0900 (Wed, 11 Jul 2018) | 1 line

Failed to unlink before close on mswin
------------------------------------------------------------------------
r63952 | normal | 2018-07-11 19:28:02 +0900 (Wed, 11 Jul 2018) | 3 lines

test/ruby/test_io.rb (test_copy_stream_to_duplex_io): join thread

Don't leave runaway threads as it could affect other tests.
------------------------------------------------------------------------
r63951 | nobu | 2018-07-11 18:56:49 +0900 (Wed, 11 Jul 2018) | 3 lines

Make block spacing consistent

[Fix GH-1910] [ci skip]
------------------------------------------------------------------------
r63950 | normal | 2018-07-11 18:47:36 +0900 (Wed, 11 Jul 2018) | 6 lines

test/ruby/test_io.rb: skip garbage and CPU tests if multi-threaded

Threads should not be active during these tests, but
maybe they are...

ref: https://bugs.ruby-lang.org/issues/14906
------------------------------------------------------------------------
r63949 | normal | 2018-07-11 17:49:23 +0900 (Wed, 11 Jul 2018) | 3 lines

thread_pthread: avoid redundant error message on pipe2() fail

Seeing one error for pipe creation is enough.
------------------------------------------------------------------------
r63948 | normal | 2018-07-11 17:49:18 +0900 (Wed, 11 Jul 2018) | 4 lines

thread_pthread.c: use mask for timer implementation

timer-thread will continue to be supported, but future
"timer" implementation may not be a thread.
------------------------------------------------------------------------
r63947 | normal | 2018-07-11 17:33:37 +0900 (Wed, 11 Jul 2018) | 3 lines

test/test_{tempfile,tmpdir}: get rid of leftover files

I ran out of inodes in $TMPDIR
------------------------------------------------------------------------
r63946 | normal | 2018-07-11 17:33:32 +0900 (Wed, 11 Jul 2018) | 3 lines

spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover files

I ran out of inodes in $TMPDIR :<
------------------------------------------------------------------------
r63945 | k0kubun | 2018-07-11 09:34:32 +0900 (Wed, 11 Jul 2018) | 5 lines

common.mk: upgrade benchmark_driver

benchmark/README.md: fix help output, which is changed on v0.14.6.
Especially `e1::path1,arg1,...; e2::path2,arg2` part was wrong since `,`
can't be used to split arguments anymore.
------------------------------------------------------------------------
r63944 | k0kubun | 2018-07-11 08:56:57 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: some are defined with YAML [ci skip]
------------------------------------------------------------------------
r63943 | naruse | 2018-07-11 01:10:57 +0900 (Wed, 11 Jul 2018) | 4 lines

Use "diagnose_if" attribute for clang

Before this patch, clang shows many "division by zero is undefined" errors
if a files has syntax error.
------------------------------------------------------------------------
r63942 | k0kubun | 2018-07-11 01:03:51 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: fix typo [ci skip]
------------------------------------------------------------------------
r63941 | k0kubun | 2018-07-11 00:58:52 +0900 (Wed, 11 Jul 2018) | 8 lines

benchmark: revise ERB benchmarks using YAML syntax

to improve the accuracy of measurement by stop using block.

benchmark/app_erb.rb -> benchmark/app_erb.yml: renamed and revised
benchmark/erb_render.rb -> benchmark/erb_render.yml: ditto

benchmark/README.md: follow renames
------------------------------------------------------------------------
r63940 | k0kubun | 2018-07-11 00:51:29 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: erb_render is no longer yml but rb [ci skip]
------------------------------------------------------------------------
r63939 | k0kubun | 2018-07-11 00:49:42 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: wording consistency in one sentence [ci skip]
------------------------------------------------------------------------
r63938 | svn | 2018-07-11 00:44:46 +0900 (Wed, 11 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63937 | k0kubun | 2018-07-11 00:44:45 +0900 (Wed, 11 Jul 2018) | 7 lines

output/driver.rb: add output plugin to reproduce

the original behavior of benchmark/driver.rb.
Probably I won't use this but this is requested by ko1.

Use this with:
make benchmark OPTS="-o driver"
------------------------------------------------------------------------
r63936 | k0kubun | 2018-07-11 00:06:59 +0900 (Wed, 11 Jul 2018) | 3 lines

revert r63899

this is no longer needed due to r63926
------------------------------------------------------------------------
r63935 | svn | 2018-07-11 00:01:29 +0900 (Wed, 11 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63934 | svn | 2018-07-11 00:01:28 +0900 (Wed, 11 Jul 2018) | 1 line

* 2018-07-11
------------------------------------------------------------------------
r63933 | k0kubun | 2018-07-11 00:01:27 +0900 (Wed, 11 Jul 2018) | 8 lines

benchmark_driver/runner: add runners for metrics

supported by legacy benchmark/driver.rb.

benchmark/README.md: document them

common.mk: update benchmark_driver to correct 0.0 output and to fix
spacing format of `-o simple` and `-o markdown`.
------------------------------------------------------------------------
r63932 | k0kubun | 2018-07-10 23:16:57 +0900 (Tue, 10 Jul 2018) | 6 lines

runner/size.rb: fix metric passed to output

runner/peak.rb: ditto

This is needed to make commands like `make -C .ruby-svn benchmark
ITEM=erb OPTS="-r size -o simple"` succeed.
------------------------------------------------------------------------
r63931 | k0kubun | 2018-07-10 22:41:13 +0900 (Tue, 10 Jul 2018) | 1 line

benchmark/README.md: add help output [ci skip]
------------------------------------------------------------------------
r63930 | k0kubun | 2018-07-10 22:36:44 +0900 (Tue, 10 Jul 2018) | 4 lines

benchmark/README.md: don't recommend alias installation [ci skip]

benchmark_driver is the official way to install benchmark_driver.
benchmark-driver is just an alias for it.
------------------------------------------------------------------------
r63929 | k0kubun | 2018-07-10 22:16:55 +0900 (Tue, 10 Jul 2018) | 1 line

common.mk: execute benchmark alphabetically
------------------------------------------------------------------------
r63928 | k0kubun | 2018-07-10 22:08:40 +0900 (Tue, 10 Jul 2018) | 3 lines

benchmark: drop all bm_ prefix for legacy driver.rb

benchmark/*.rb is only benchmarks now. We don't need prefixes.
------------------------------------------------------------------------
r63927 | svn | 2018-07-10 22:05:31 +0900 (Tue, 10 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63926 | k0kubun | 2018-07-10 22:05:29 +0900 (Tue, 10 Jul 2018) | 12 lines

Revert "benchmark/*.yml: convert from benchmark/bm_*.rb"

This reverts r63900.

Having single-execution benchmark as a normal Ruby script is preferred
by ko1. I'm not a big fan of having inconsistent benchmark formats, but
I can understand some benefits of it.

common.mk: remove obsolsted benchmark-each PHONY declaration, support
running Ruby scripts added by this commit.

README.md: follow ARGS change
------------------------------------------------------------------------
r63925 | svn | 2018-07-10 21:14:05 +0900 (Tue, 10 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63924 | k0kubun | 2018-07-10 21:14:04 +0900 (Tue, 10 Jul 2018) | 11 lines

benchmark: resurrect peak / size metrics

by adding runner plugins for them.

benchmark/lib/benchmark_driver/runner/peak.rb: added peak runner plugin
benchmark/lib/benchmark_driver/runner/size.rb: added size runner plugin
common.mk: allow using them

benchmark/memory_wrapper.rb: deleted in favor of those runner plugins

benchmark/README.md: document them
------------------------------------------------------------------------
r63923 | tenderlove | 2018-07-10 05:01:54 +0900 (Tue, 10 Jul 2018) | 8 lines

Remove redundant code in the compiler.

During instruction translation (linked list -> iseq generation), we can
treat `TS_VALUE` and `TS_ISEQ` the same as they are just embedded in the
generated sequences.  The only difference between `TS_ISE` and `TS_IC`
is that an inline storage entry may contain a markable `VALUE` pointer
at some point, so we need to flag the iseq as containing markable
objects.
------------------------------------------------------------------------
r63922 | tenderlove | 2018-07-10 04:20:27 +0900 (Tue, 10 Jul 2018) | 3 lines

Remove test code.  ISE generation should not impact write barrier

orz!
------------------------------------------------------------------------
r63921 | tenderlove | 2018-07-10 02:49:21 +0900 (Tue, 10 Jul 2018) | 6 lines

Add lldb as a debugger option

This adds support for lldb as a debugger so that tests can be run under
lldb like this:

  $ make test-all TESTS=test/some_test.rb RUNRUBYOPT=--debugger=lldb
------------------------------------------------------------------------
r63920 | tenderlove | 2018-07-10 02:47:37 +0900 (Tue, 10 Jul 2018) | 5 lines

Fix crash when loading iseq from an array

Objects loaded during iseq deserialization using arrays need to be added
to the compile time mark array so that they stay alive until iseqs
finish loading.
------------------------------------------------------------------------
r63919 | k0kubun | 2018-07-10 01:43:42 +0900 (Tue, 10 Jul 2018) | 1 line

benchmark/README.md: fix -e interface for v0.14 [ci skip]
------------------------------------------------------------------------
r63918 | k0kubun | 2018-07-10 01:31:35 +0900 (Tue, 10 Jul 2018) | 9 lines

benchmark/driver.rb: fully obsolete this

in favor of just using benchmark_driver.gem.

common.mk: The new `make benchmark` covers the both usages for old `make
benchmark` and old `make benchmark-each`. So `make benchmark-each` is
dropped now.

benchmark/README.md: Explain its details
------------------------------------------------------------------------
r63917 | svn | 2018-07-10 00:45:03 +0900 (Tue, 10 Jul 2018) | 1 line

* 2018-07-10
------------------------------------------------------------------------
r63916 | k0kubun | 2018-07-10 00:45:02 +0900 (Tue, 10 Jul 2018) | 4 lines

common.mk: upgrade benchmark_driver to v0.14

benchmark/driver.rb: deal with breaking changes which are actually
introduced for this driver.
------------------------------------------------------------------------
r63915 | hsbt | 2018-07-09 23:01:05 +0900 (Mon, 09 Jul 2018) | 6 lines

Promote irb library to default gems.

  * lib/irb/irb.gemspec: init.
  * lib/irb/version.rb: Set @RELEASE_VERSION value to IRB::VERSION for gemspec.
  * doc/*.rdoc: Move IRB entry to default gems category.
  * tool/sync_default_gems.rb: Add irb support.
------------------------------------------------------------------------
r63914 | k0kubun | 2018-07-09 22:20:25 +0900 (Mon, 09 Jul 2018) | 4 lines

file_rename.yml: allow running this on mswin/mingw

Suggested by MSP-Grep:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/87883
------------------------------------------------------------------------
r63913 | k0kubun | 2018-07-09 21:50:50 +0900 (Mon, 09 Jul 2018) | 1 line

app_pentominio.yml: drop unnecessary prelude
------------------------------------------------------------------------
r63912 | ko1 | 2018-07-09 17:07:26 +0900 (Mon, 09 Jul 2018) | 6 lines

Don't copy FL_USER* on Kernel#clone. [Bug #14847]

* object.c (mutable_obj_clone): `Kernel#clone` should not copy
  FL_USER* flags because they are copied unexpectedly.
  Unexpected copy will break internal data consistency.

------------------------------------------------------------------------
r63911 | normal | 2018-07-09 12:07:59 +0900 (Mon, 09 Jul 2018) | 3 lines

addr2line.c (kprintf): static

This function is not used outside of addr2line.c
------------------------------------------------------------------------
r63910 | nobu | 2018-07-09 10:50:12 +0900 (Mon, 09 Jul 2018) | 1 line

common.mk: codesign ruby-runner too
------------------------------------------------------------------------
r63909 | nobu | 2018-07-09 10:20:20 +0900 (Mon, 09 Jul 2018) | 6 lines

dir.c: fix directory glob

* dir.c (glob_helper): fix directory glob which resulted in lacking
  the first byte.  adjust the length of basename to be appended as
  well as removing the heading path, not the length of the joined
  path.  [ruby-dev:50588] [Bug #14899]
------------------------------------------------------------------------
r63908 | normal | 2018-07-09 08:43:14 +0900 (Mon, 09 Jul 2018) | 8 lines

addr2line.c: no need to keep fd around after mmap

POSIX mmap(3) manpage stipulates mmap bumps the reference
count of the file description.  Thus keeping a file descriptor
to maintain the reference is not necessary.

If this didn't work, every extension .so would require a
permanent FD, which is obviously not the case.
------------------------------------------------------------------------
r63907 | stomar | 2018-07-09 04:30:19 +0900 (Mon, 09 Jul 2018) | 1 line

range.c: [DOC] small improvement
------------------------------------------------------------------------
r63906 | k0kubun | 2018-07-09 03:33:43 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark/driver.rb: make this more similar

to original benchmark-driver command.

I'm going to add some runner plugins to resurrect metrics which were
originally supported by benchmark/driver.rb...
------------------------------------------------------------------------
r63905 | k0kubun | 2018-07-09 03:10:14 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/README.md: [ci skip] change syntax highlight
------------------------------------------------------------------------
r63904 | svn | 2018-07-09 03:08:27 +0900 (Mon, 09 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63903 | k0kubun | 2018-07-09 03:08:26 +0900 (Mon, 09 Jul 2018) | 5 lines

benchmark/README.md: [ci skip] write documentation

about this directory

benchmark/driver.rb: ditto
------------------------------------------------------------------------
r63902 | k0kubun | 2018-07-09 02:48:58 +0900 (Mon, 09 Jul 2018) | 5 lines

benchmark/driver.rb: drop legacy Ruby script support

Now all benchmarks are converted to YAMLs.

common.mk: Drop obsoleted bm_* pattern
------------------------------------------------------------------------
r63901 | k0kubun | 2018-07-09 02:47:32 +0900 (Mon, 09 Jul 2018) | 3 lines

benchmark/app_pentomino.yml: remove original scripts after __END__

mistakenly left by conversion script...
------------------------------------------------------------------------
r63900 | k0kubun | 2018-07-09 02:36:26 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/*.yml: convert from benchmark/bm_*.rb
------------------------------------------------------------------------
r63899 | k0kubun | 2018-07-09 02:31:06 +0900 (Mon, 09 Jul 2018) | 5 lines

benchmark/gc: prevent GC bench from depending on normal benchmark

scripts.

This is needed to finish converting Ruby scripts to YAMLs.
------------------------------------------------------------------------
r63898 | k0kubun | 2018-07-09 02:22:58 +0900 (Mon, 09 Jul 2018) | 3 lines

benchmark/vm2_struct_small_aset.yml: unwrap loop_count

since `i` is involved in this script as well...
------------------------------------------------------------------------
r63897 | k0kubun | 2018-07-09 02:19:57 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/vm2_*.yml: fix ugly conversion errors
------------------------------------------------------------------------
r63896 | k0kubun | 2018-07-09 02:03:23 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/vm2_*.yml: abstract away the while loop
------------------------------------------------------------------------
r63895 | k0kubun | 2018-07-09 01:46:49 +0900 (Mon, 09 Jul 2018) | 8 lines

benchmark/vm1_ensure.yml: rollback loop_count abstraction

for now.

When measured script is really too fast, while loop substituion may
return a negative benchmark result.

Probably benchmark_driver.gem has rooms to be improved about this.
------------------------------------------------------------------------
r63894 | k0kubun | 2018-07-09 01:35:44 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/vm1_*.yml: manual fixes for ugly conversions
------------------------------------------------------------------------
r63893 | k0kubun | 2018-07-09 01:28:34 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark/vm1_*.yml: abstract away the while loop

benchmark/driver.rb had removed the cost for while loop in benchmark/bm_vm1_*.rb,
and benchmark_driver.gem can achieve the same thing with `loop_count`.

But unfortunately current benchmark_driver.gem can't solve it only for vm1_yield.yml...
------------------------------------------------------------------------
r63892 | k0kubun | 2018-07-09 00:35:22 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark: convert bm_vm2_*.rb to vm2_*.yml

This YAML transformation is needed to support whileloop2 time substituion
by benchmark_driver.gem later.

This commmit changes no benchmark behavior.
------------------------------------------------------------------------
r63891 | k0kubun | 2018-07-09 00:12:24 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark: convert bm_vm1_*.rb to vm1_*.yml

This YAML transformation is needed to support whileloop time substituion
by benchmark_driver.gem later.

This commmit changes no benchmark behavior.
------------------------------------------------------------------------
r63890 | svn | 2018-07-09 00:05:19 +0900 (Mon, 09 Jul 2018) | 1 line

* 2018-07-09
------------------------------------------------------------------------
r63889 | k0kubun | 2018-07-09 00:05:18 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/driver.rb: fix wrong multiline regexp
------------------------------------------------------------------------
r63888 | k0kubun | 2018-07-08 23:38:05 +0900 (Sun, 08 Jul 2018) | 29 lines

benchmark: introduce benchmark_driver.gem

Makefile.in: Clone benchmark-driver repository in benchmark/benchmark-driver
  `make update-benchmark-driver`, like simplecov.
win32/Makefile.sub: Roughly do the same thing.
.gitignore: Ignore the cloned repository.
common.mk: Trigger `make update-benchmark-driver` to run `make benchmark`
  and adjust arguments for benchmark_driver.gem.

benchmark/require.yml: renamed from benchmark/bm_require.rb, benchmark/prepare_require.rb
benchmark/require_thread.yml: renamed from benchmark/bm_require_thread.rb, benchmark/prepare_require_thread.rb
benchmark/so_count_words.yml: renamed from benchmark/bm_so_count_words.rb, benchmark/prepare_so_count_words.rb,
  benchmark/wc.input.base
benchmark/so_k_nucleotide.yml: renamed from benchmark/bm_so_k_nucleotide.rb, benchmark/prepare_so_k_nucleotide.rb,
  benchmark/make_fasta_output.rb
benchmark/so_reverse_complement.yml: renamed from benchmark/bm_so_reverse_complement.rb, benchmark/prepare_so_reverse_complement.rb,
  benchmark/make_fasta_output.rb

I'm sorry but I made some duplications between benchmark/require.yml and benchmark/require_thread.yml,
and between benchmark/so_k_nucleotide.yml and benchmark/so_reverse_complement.yml.

If you're not comfortable with it, please combine these YAMLs to share
the same prelude. One YAML file can have multiple benchmark definitions
sharing prelude.

benchmark/driver.rb: Replace its core feature with benchmark_driver.gem.
  Some old features are gone for now, but I'll add them again later.

[Misc #14902]
------------------------------------------------------------------------
r63887 | k0kubun | 2018-07-08 23:08:25 +0900 (Sun, 08 Jul 2018) | 6 lines

common.mk: load prelude on `make benchmark`

because benchmark/bm_io_nonblock_noex.rb and benchmark/bm_io_nonblock_noex2.rb
are using IO#write_nonblock and it's defined in prelude.

miniruby can't run the benchmark without prelude.
------------------------------------------------------------------------
r63886 | k0kubun | 2018-07-08 22:03:01 +0900 (Sun, 08 Jul 2018) | 10 lines

benchmark: drop legacy benchmark drivers

It seems like they are all benchmark drivers but "benchmark/driver.rb"
is the latest and others are no longer used.

It's confusing to have multiple drivers (and actually I used
benchmark/run.rb since I didn't know I should use benchmark/driver.rb).

As I'm going to support only benchmark/driver.rb features in Misc#14902,
let me delete them.
------------------------------------------------------------------------
r63885 | normal | 2018-07-08 16:27:29 +0900 (Sun, 08 Jul 2018) | 7 lines

test/ruby (*no_hidden_garbage): disable GC and skip if multi-threaded

Any single object allocation can reduce object count, and
object counts are global, so multi-threading leads to unpredictable
results.

See also similar commits: r60699 and r62608
------------------------------------------------------------------------
r63884 | normal | 2018-07-08 16:27:24 +0900 (Sun, 08 Jul 2018) | 15 lines

mjit: get rid of memory leak in pause+resume loop

pthread_atfork is not idempotent and repeatedly calling it
causes it to register the same hook repeatedly; leading to
unbound memory growth.

Ruby already has a (confusing-named) internal API for to call
in the forked child process: rb_thread_atfork
Call the MJIT child_after_fork hook inside that to prevent
unbound growth with the following loop:

    loop do
      RubyVM::MJIT.pause
      RubyVM::MJIT.resume
    end
------------------------------------------------------------------------
r63883 | k0kubun | 2018-07-08 14:52:12 +0900 (Sun, 08 Jul 2018) | 6 lines

tool/git-refresh: skip git fetch and checkout

if the tag is already checked out, to optimize the execution time.

I'm going to prepare a task depending on this tool, and I want that to
finish fast and output nothing when it's already up-to-date.
------------------------------------------------------------------------
r63882 | k0kubun | 2018-07-08 13:12:04 +0900 (Sun, 08 Jul 2018) | 1 line

benchmark/driver.rb: simplify LoadError handling
------------------------------------------------------------------------
r63881 | k0kubun | 2018-07-08 11:25:46 +0900 (Sun, 08 Jul 2018) | 4 lines

common.mk: drop obsoleted `make tbench`

benchmark/bmx_* files haven't existed since r37263 and thus it runs
nothing.
------------------------------------------------------------------------
r63880 | normal | 2018-07-08 10:46:31 +0900 (Sun, 08 Jul 2018) | 3 lines

test/ruby/test_signal.rb: skip ensure if test is skipped

Thanks to Greg for the fix. [ruby-core:87860] [Bug #14867]
------------------------------------------------------------------------
r63879 | normal | 2018-07-08 09:02:27 +0900 (Sun, 08 Jul 2018) | 6 lines

signal.c: preserve trap(:CHLD, "IGNORE") behavior with SIGCHLD

We need to preserve "IGNORE" behavior from Ruby 2.5 and earlier.
We can't rely on SA_NOCLDWAIT any more, since we always need
system() and MJIT to work; so we fake that behavior using
dedicated reaper (currently in timer-thread).
------------------------------------------------------------------------
r63878 | svn | 2018-07-08 08:59:24 +0900 (Sun, 08 Jul 2018) | 1 line

* 2018-07-08
------------------------------------------------------------------------
r63877 | normal | 2018-07-08 08:59:23 +0900 (Sun, 08 Jul 2018) | 9 lines

process.c (rb_f_exec): pause MJIT before replacing process

Non-parallel "make test-spec" caused
spec/ruby/core/process/wait2_spec.rb failures because mspec
uses "exec" in single-process mode, so there's no chance
the post-exec state could know about the MJIT child process
from its pre-exec state.

[ruby-core:87846] [Bug #14867]
------------------------------------------------------------------------
r63876 | k0kubun | 2018-07-07 23:55:22 +0900 (Sat, 07 Jul 2018) | 28 lines

wait2_spec.rb: skip leak checker for now

This is not working with cppflags="-DMJIT_FORCE_ENABLE" on my machine.

```
$ make test-spec
$ /home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force/miniruby -I/home/k0kubun/src/github.com/ruby/ruby-svn/lib /home/k0kubun/src/github.com/ruby/ruby-svn/tool/runruby.rb --archdir=/home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force --extout=.ext -- /home/k0kubun/src/github.com/ruby/ruby-svn/spec/mspec/bin/mspec-run -B ../spec/default.mspec
ruby 2.6.0dev (2018-07-07 trunk 63874) +JIT [x86_64-linux]
[| | ================  40%                    | 00:02:03]      0F      0E leaked before wait2 specs: [[31406, #<Process::Status: pid 31406 exit 0>]]

1)
An exception occurred during: before :all FAILED
Expected [[31406, #<Process::Status: pid 31406 exit 0>]] to be empty
/home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:18:in `block (3 levels) in <top (required)>'
/home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:16:in `block (2 levels) in <top (required)>'
/home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:3:in `<top (required)>'
[- | ==================100%================== | 00:00:00]      1F      0E

Finished in 103.288794 seconds

3607 files, 28545 examples, 208272 expectations, 1 failure, 0 errors, 0 tagged
uncommon.mk:777: recipe for target 'yes-test-spec' failed
make: *** [yes-test-spec] Error 1
```

Let me skip this for now and enable MJIT CI again.

Related to Bug#14867
------------------------------------------------------------------------
r63875 | k0kubun | 2018-07-07 23:41:03 +0900 (Sat, 07 Jul 2018) | 3 lines

insns.def: stop pushing unnecessary keys for MJIT

[Bug #14892]
------------------------------------------------------------------------
r63874 | k0kubun | 2018-07-07 23:28:34 +0900 (Sat, 07 Jul 2018) | 5 lines

_mjit_compile_insn_body: rollback pc correctly

for catch_except_p case

Partially solving Bug#14892
------------------------------------------------------------------------
r63873 | svn | 2018-07-07 14:34:04 +0900 (Sat, 07 Jul 2018) | 1 line

* 2018-07-07
------------------------------------------------------------------------
r63872 | normal | 2018-07-07 14:34:03 +0900 (Sat, 07 Jul 2018) | 7 lines

test/socket/test_socket.rb (test_timestamp): retry send

I theorize there can be UDP packet loss even over loopback if
the kernel is under memory pressure.  Retry sending periodically
until recvmsg succeeds.

i[ruby-core:87842] [Bug #14898]
------------------------------------------------------------------------
r63871 | nobu | 2018-07-06 22:56:58 +0900 (Fri, 06 Jul 2018) | 5 lines

const_missing on private constants

* variable.c (rb_const_search): call #const_missing method on
  private constants, as well as uninitialized constants.
  [Feature #14328]
------------------------------------------------------------------------
r63870 | nobu | 2018-07-06 17:01:58 +0900 (Fri, 06 Jul 2018) | 6 lines

compile.c: remove unreachable jump only

* compile.c (iseq_peephole_optimize): remove unreachable jump
  instruction only.  if it is labeled and referred from other
  instructions, it is reachable and must not be removed.
  [ruby-core:87830] [Bug #14897]
------------------------------------------------------------------------
r63869 | normal | 2018-07-06 15:50:04 +0900 (Fri, 06 Jul 2018) | 8 lines

mjit.c: fix waitpid macro return value for win32

We started checking return value of waitpid, so it needs
to be correct for win32 platforms for MJIT to work.

Thanks-to: MSP-Greg (Greg L) <Greg.mpls@gmail.com>

[ruby-core:87832] [Bug #14867]
------------------------------------------------------------------------
r63868 | mame | 2018-07-06 13:52:33 +0900 (Fri, 06 Jul 2018) | 24 lines

Fix a bug of peephole optimization

```
  if   L1
L0:
  jump L2
L1:
  ...
L2:
```

was wrongly optimized to:

```
  unless L2
L0:
L1:
  ...
L2:
```

To make it conservative, this optimization is now disabled when there is
any label between `if` and `jump` instructions.
Fixes [Bug #14897].
------------------------------------------------------------------------
r63867 | normal | 2018-07-06 11:15:05 +0900 (Fri, 06 Jul 2018) | 23 lines

thread.c (ruby_ppoll): improve timespec to msec conversion

Round up non-zero <1ms timeouts to 1ms and use INT_MAX instead
of infinite (-1) for extremely large timeouts.  All of our
ppoll/select callers are able to handle spurious wakeups,
anyways.

This avoids excessive CPU usage and busy waits with short
timeouts to rb_wait_for_single_fd.

CPU usage with the following script is significantly reduced
for systems with "#undef HAVE_PPOLL":

    require 'io/wait'
    r, w = IO.pipe
    Thread.new { loop { r.wait_readable(0.000001) } }.join(5)
    exit!(0)

Low-resolution in poll(2) still sucks, though...

Note: I don't see the value in making a similar change to
time_timeval of a <1us sleep is attempted because of GVL
release and syscall latency.
------------------------------------------------------------------------
r63866 | normal | 2018-07-06 11:15:00 +0900 (Fri, 06 Jul 2018) | 3 lines

thread.c: our fake ppoll implementation is static

Rename it to "ruby_ppoll" so it looks more obvious in debuggers.
------------------------------------------------------------------------
r63865 | kazu | 2018-07-06 10:53:57 +0900 (Fri, 06 Jul 2018) | 1 line

Fixup r63864
------------------------------------------------------------------------
r63864 | nobu | 2018-07-06 10:40:04 +0900 (Fri, 06 Jul 2018) | 1 line

Prefixed reset_leap_second_info
------------------------------------------------------------------------
r63863 | k0kubun | 2018-07-06 00:56:48 +0900 (Fri, 06 Jul 2018) | 10 lines

revert r62655 for r63763

r63655 was tightly coupled to handle_frames and some assumptions seems
to have been broken by r63763.

To partially resolve Bug#14892, this reverts the optimization for now. I
want to make MJIT CI happy first and then I'll probably retry r63655 by
partially reverting r63763 for sp changes.

The skipped test is not fixed yet.
------------------------------------------------------------------------
r63862 | svn | 2018-07-06 00:20:28 +0900 (Fri, 06 Jul 2018) | 1 line

* 2018-07-06
------------------------------------------------------------------------
r63861 | nobu | 2018-07-06 00:20:27 +0900 (Fri, 06 Jul 2018) | 1 line

Make a prototype
------------------------------------------------------------------------
r63860 | naruse | 2018-07-05 21:48:45 +0900 (Thu, 05 Jul 2018) | 1 line

ruby tool/update-deps --fix
------------------------------------------------------------------------
r63859 | naruse | 2018-07-05 21:22:30 +0900 (Thu, 05 Jul 2018) | 1 line

Add missing prototype
------------------------------------------------------------------------
r63858 | naruse | 2018-07-05 20:53:18 +0900 (Thu, 05 Jul 2018) | 1 line

Add missing file
------------------------------------------------------------------------
r63857 | naruse | 2018-07-05 20:43:42 +0900 (Thu, 05 Jul 2018) | 5 lines

Re-apply r63848 (Optimize Time.utc)

* Both timegmw and gmtimew ignores leap second if the timezone doesn't
  have leap seconds on the first call of init_leap_second_info()
* Add Bug::Time.reset_leap_second_info for testing
------------------------------------------------------------------------
r63856 | normal | 2018-07-05 12:20:20 +0900 (Thu, 05 Jul 2018) | 6 lines

Revert "get rid of a compiler warning of VC"

Partially revert r63820.  mjit.c seems to have different idea of
"pid" type/size than the rest of Ruby on win32.

As noted in [ruby-core:87794], this seems to break Greg's build.
------------------------------------------------------------------------
r63855 | normal | 2018-07-05 12:02:33 +0900 (Thu, 05 Jul 2018) | 8 lines

unrevert r63852 but keep SIGCHLD path disabled for win32

Reading win32/win32.c waitpid implementation, maybe waitpid(-1, ...)
on that platform will never conflict with mjit use of waitpid.

In any case, I've added WAITPID_USE_SIGCHLD macro to vm_core.h
so it can be easy for Linux/BSD users to test (hopefully!)
win32-compatible code.
------------------------------------------------------------------------
r63854 | nobu | 2018-07-05 01:10:14 +0900 (Thu, 05 Jul 2018) | 9 lines

signal.c: packed signals

* signal.c (signals): pack signal names instead of references.

* signal.c (signm2signo): also reject too long signal name.
  [ruby-core:87767] [Bug #14893]

reapply r63841 and r63842, which are unrelated to r63758 but had been
wrongly reverted by r63852.
------------------------------------------------------------------------
r63853 | svn | 2018-07-05 00:08:58 +0900 (Thu, 05 Jul 2018) | 1 line

* 2018-07-05
------------------------------------------------------------------------
r63852 | naruse | 2018-07-05 00:08:56 +0900 (Thu, 05 Jul 2018) | 4 lines

Revert r63758 and related commits

The change is unstable on Windows. Please re-commit it when it correctly
supports Windows.
------------------------------------------------------------------------
r63851 | kazu | 2018-07-04 21:45:47 +0900 (Wed, 04 Jul 2018) | 6 lines

Fallback to Digest::SHA512

`Gem::Package::TarWriter#add_file_signed` expects to fallback to
`Digest::SHA512`, and `digest.respond_to? :name` or not.
So lib/rubygems/security.rb should use same logic for
`Gem::Security::DIGEST_ALGORITHM` and `Gem::Security::DIGEST_NAME`.
------------------------------------------------------------------------
r63850 | kazu | 2018-07-04 21:45:46 +0900 (Wed, 04 Jul 2018) | 4 lines

Skip more rubygems tests when openssl is missing

Some tests are already skipped, but some tests are not.
So latter should be skipped too.
------------------------------------------------------------------------
r63849 | naruse | 2018-07-04 19:59:36 +0900 (Wed, 04 Jul 2018) | 4 lines

Revert "Optimize Time.utc"

This reverts commit r63848.
It breaks tests.
------------------------------------------------------------------------
r63848 | naruse | 2018-07-04 19:06:51 +0900 (Wed, 04 Jul 2018) | 15 lines

Optimize Time.utc

Time.utc uses timegmw() and it uses leap second information.
If the given time is larger than known_leap_seconds_limit, it calls
find_time_t, which uses localtime(3) and calls stat(2) in it.

This patch avoid it by setting known_leap_seconds_limit to 0 if the timezone doesn't have leapsecond information (if no leap second is found "now", I assume the timezone doesn't have leapsecond information).

Before:
% time ./miniruby --disable-gem -e'time = Time.now; year = time.year; month = time.month; day = time.day; hour = time.hour; min = time.min; sec = time.sec + time.subsec; i = 0; while i < 100000; ::Time.utc(year, month, day, hour, min, sec); i += 1; end'
./miniruby --disable-gem   0.35s user 0.19s system 99% cpu 0.542 total

After:
% time ./miniruby --disable-gem -e'time = Time.now; year = time.year; month = time.month; day = time.day; hour = time.hour; min = time.min; sec = time.sec + time.subsec; i = 0; while i < 100000; ::Time.utc(year, month, day, hour, min, sec); i += 1; end'
./miniruby --disable-gem   0.23s user 0.00s system 99% cpu 0.233 total
------------------------------------------------------------------------
r63847 | normal | 2018-07-04 10:26:36 +0900 (Wed, 04 Jul 2018) | 3 lines

internal.h (rb_warning_string): use PRINTF_ARGS

Let compilers do a little extra validation for us
------------------------------------------------------------------------
r63846 | normal | 2018-07-04 10:26:31 +0900 (Wed, 04 Jul 2018) | 7 lines

thread_pthread.c: pass rb_vm_t to timer_thread_sleep

I love `container_of' for generic data structures, but
in this case it's unnecessary and slightly harder-to-read.

This will make "Timeout in VM" slightly easier-to-read:
https://bugs.ruby-lang.org/issues/14859
------------------------------------------------------------------------
r63845 | nobu | 2018-07-04 08:56:11 +0900 (Wed, 04 Jul 2018) | 8 lines

vm.c: simplified core#hash_merge_kwd

* vm.c (core_hash_merge_kwd): simplified to merge the second hash
  into the first hash.

* compile.c (compile_array): call core#hash_merge_kwd with 2
  hashes always, by passing an new empty hash to at the first
  iteration.
------------------------------------------------------------------------
r63844 | normal | 2018-07-04 06:29:18 +0900 (Wed, 04 Jul 2018) | 4 lines

mjit.h: avoid signed pointer comparisons (fix for 32-bit)

ptrdiff_t is a signed type, use uintptr_t instead for unsigned
comparisons.
------------------------------------------------------------------------
r63843 | svn | 2018-07-04 00:25:50 +0900 (Wed, 04 Jul 2018) | 1 line

* 2018-07-04
------------------------------------------------------------------------
r63842 | kazu | 2018-07-04 00:25:49 +0900 (Wed, 04 Jul 2018) | 5 lines

Fix compile error

signal.c:69:10: error: variably modified 'signm' at file scope
     char signm[LONGEST_SIGNAME + 1];
          ^
------------------------------------------------------------------------
r63841 | nobu | 2018-07-03 22:34:56 +0900 (Tue, 03 Jul 2018) | 6 lines

signal.c: packed signals

* signal.c (signals): pack signal names instead of references.

* signal.c (signm2signo): also reject too long signal name.
  [ruby-core:87767] [Bug #14893]
------------------------------------------------------------------------
r63840 | nobu | 2018-07-03 22:25:59 +0900 (Tue, 03 Jul 2018) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r63839 | naruse | 2018-07-03 20:10:45 +0900 (Tue, 03 Jul 2018) | 4 lines

skip test_localtime_zone if force_tz_test is false

For example Solaris
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180703T091803Z.fail.html.gz
------------------------------------------------------------------------
r63838 | kazu | 2018-07-03 20:01:06 +0900 (Tue, 03 Jul 2018) | 3 lines

[DOC] Use https: instead of  git: [ci skip]

ref r63801, r61199
------------------------------------------------------------------------
r63837 | normal | 2018-07-03 18:06:28 +0900 (Tue, 03 Jul 2018) | 5 lines

vm.c (rb_source_location): check for NULL cfp->iseq

rb_vm_get_sourceline returns zero if cfp->iseq is NULL,
so rb_iseq_path should not try to follow NULL cfp->iseq,
either.
------------------------------------------------------------------------
r63836 | normal | 2018-07-03 17:30:16 +0900 (Tue, 03 Jul 2018) | 11 lines

thread_pthread.c (native_thread_destroy): clear native TSD pointer

mwrap <https://80x24.org/mwrap/> interposes malloc functions and
checks for GVL existence to determine Ruby source locations of
malloc calls.  pthread_getattr_np (from get_stack) may call
realloc to get the CPU set size; so when using the thread-cache,
ruby_thread_has_gvl_p() may hit a false positive on reused
threads with lingering rb_thread_t in thread-specific data.

This was causing mwrap to call rb_source_location_cstr() and
crash because it was pointed to a zero ec->cfp->iseq.
------------------------------------------------------------------------
r63835 | nobu | 2018-07-03 14:12:52 +0900 (Tue, 03 Jul 2018) | 12 lines

cont.c: handle errors for getcontext()

It may raise an error in a certain security configuration.
It is very likely to trigger a segmentation fault if `getcontext()` failed silently
and we just let it keep going.

Related to https://bugs.ruby-lang.org/issues/14883
[Fix GH-1903]

Based on the patch from Lion Yang <lion@aosc.io>

From: Lion Yang <lion@aosc.io>
------------------------------------------------------------------------
r63834 | nobu | 2018-07-03 13:43:27 +0900 (Tue, 03 Jul 2018) | 3 lines

fake.rb.in: duplicated RUBYOPT

* template/fake.rb.in: removed duplicated options in RUBYOPT.
------------------------------------------------------------------------
r63833 | nobu | 2018-07-03 13:43:25 +0900 (Tue, 03 Jul 2018) | 6 lines

rubyopt_spec.rb: skip -v in RUBYOPT examples

* spec/ruby/command_line/rubyopt_spec.rb: skip -v in RUBYOPT
  examples when CROSS_COMPILING is set by fake.rb.  the version
  number by -v is printed before loading libraries by -r options,
  so setting RUBY_DESCRIPTION in fake.rb has no effect.
------------------------------------------------------------------------
r63832 | nobu | 2018-07-03 09:49:32 +0900 (Tue, 03 Jul 2018) | 6 lines

configure.ac: [DOC] refine help messages

cflags, cppflags, and cxxflags are additional flags to auto
configured flags, and ignored when the their respective autoconf
default variables are given.
[ci skip]
------------------------------------------------------------------------
r63831 | normal | 2018-07-03 09:29:06 +0900 (Tue, 03 Jul 2018) | 3 lines

test/ruby/test_signal.rb: speedup some test by disabling RubyGems

test_signame_delivered is reduced from 1.0s to 0.1s
------------------------------------------------------------------------
r63830 | svn | 2018-07-03 08:14:53 +0900 (Tue, 03 Jul 2018) | 1 line

* 2018-07-03
------------------------------------------------------------------------
r63829 | normal | 2018-07-03 08:14:52 +0900 (Tue, 03 Jul 2018) | 5 lines

process.c (waitpid_nogvl): start timer thread polling for lossy SIGCHLD

For systems with lossy SIGCHLD, an infinitely sleeping timer
thread needs to be aware of rb_waitpid callers in the first
place before it can check and reset polling status.
------------------------------------------------------------------------
r63828 | ngoto | 2018-07-02 22:50:53 +0900 (Mon, 02 Jul 2018) | 12 lines

Makefile.in: ARCH_FLAG may contain "-m64" etc.

* Makefile.in (mjit_config.h): ARCH_FLAG may contain "-m64", "-m32",
  "-march=i486" and so on, but the change made with r63232 only
  supports "-arch AAA -arch BBB" mainly used on Mac OS X.
  To solve the issue, ARCH_FLAG is parsed and the architectures
  specified in "-arch XXX" are added to $archs and the rest is
  stored to $arch_flag. The $arch_flag is defined as MJIT_ARCHFLAG
  if $archs is empty or the target architecture is not listed in $arch.
  Fix build failure on Solaris 10 with ./configure CFLAGS="-m64".
  [Bug #14876] [ruby-dev:50583]

------------------------------------------------------------------------
r63827 | kazu | 2018-07-02 20:11:39 +0900 (Mon, 02 Jul 2018) | 1 line

Use PRI_PIDT_PREFIX for results of getpid()
------------------------------------------------------------------------
r63823 | nobu | 2018-07-02 16:46:38 +0900 (Mon, 02 Jul 2018) | 4 lines

time.c: [DOC] Time#localtime

* time.c: state that Time#localtime does nothing when nothing
  changes.  [ruby-core:87675] [Bug #14880]
------------------------------------------------------------------------
r63822 | nobu | 2018-07-02 16:42:24 +0900 (Mon, 02 Jul 2018) | 4 lines

set up mjit.on at initialization

* ruby.c (cmdline_options_init): set up mjit.on flag by
  MJIT_FORCE_ENABLE in the initialization function.
------------------------------------------------------------------------
r63821 | svn | 2018-07-02 10:50:24 +0900 (Mon, 02 Jul 2018) | 1 line

* 2018-07-02
------------------------------------------------------------------------
r63820 | usa | 2018-07-02 10:50:23 +0900 (Mon, 02 Jul 2018) | 6 lines

get rid of a compiler warning of VC

* mjit.c (exec_prcess): use PRI_PIDT_PREFIX for pid.

* win32/Makefile.sub (PRI_PIDT_PREFIX): force to "I".

------------------------------------------------------------------------
r63816 | ktsj | 2018-07-01 17:12:14 +0900 (Sun, 01 Jul 2018) | 1 line

NEWS: add NEWS entry about Kernel#then [Feature #14594]
------------------------------------------------------------------------
r63815 | ktsj | 2018-07-01 17:12:13 +0900 (Sun, 01 Jul 2018) | 3 lines

lib/.document: add csv

lib/csv.rb was divided into lib/csv/*.
------------------------------------------------------------------------
r63814 | kazu | 2018-07-01 10:38:18 +0900 (Sun, 01 Jul 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r63813 | kazu | 2018-07-01 10:38:16 +0900 (Sun, 01 Jul 2018) | 1 line

Remove unused variable
------------------------------------------------------------------------
r63812 | svn | 2018-07-01 10:38:14 +0900 (Sun, 01 Jul 2018) | 1 line

* 2018-07-01
------------------------------------------------------------------------
r63811 | kazu | 2018-07-01 10:38:14 +0900 (Sun, 01 Jul 2018) | 4 lines

[DOC] newer codes recommend to use spaces only

[Bug #14246]
[ci skip]
------------------------------------------------------------------------
r63810 | eregon | 2018-06-30 22:53:10 +0900 (Sat, 30 Jun 2018) | 6 lines

Fix spec/ruby/command_line/rubylib_spec.rb for use with make test-spec

* Current code clears ENV['RUBYLIB'], but on Windows it's needed when
  running from build 'src' (or running make test-spec).
* Patch by MSP-Greg, from https://github.com/ruby/spec/pull/607.
* Imported manually to fix CI on Windows, without needing a full sync.
------------------------------------------------------------------------
r63803 | nobu | 2018-06-30 20:56:54 +0900 (Sat, 30 Jun 2018) | 4 lines

use sigsetjmp on macOS

SIGCHLD is used internally since r63758, the signal masks need to
be restored.
------------------------------------------------------------------------
r63802 | normal | 2018-06-30 17:38:36 +0900 (Sat, 30 Jun 2018) | 3 lines

fix r63799 ("test/ruby/test_rubyoptions.rb: improve diagnostics for failures")

CI machines are faster than mine :x
------------------------------------------------------------------------
r63801 | kazu | 2018-06-30 17:11:16 +0900 (Sat, 30 Jun 2018) | 1 line

[DOC] Use https: instead of http:, git: [ci skip]
------------------------------------------------------------------------
r63800 | kazu | 2018-06-30 17:10:58 +0900 (Sat, 30 Jun 2018) | 1 line

[DOC] Update URL of rurema [ci skip]
------------------------------------------------------------------------
r63799 | normal | 2018-06-30 16:53:31 +0900 (Sat, 30 Jun 2018) | 4 lines

test/ruby/test_rubyoptions.rb: improve diagnostics for failures

rubyci.org OSX CI instances seem to hang on this, but I'm not
sure why...
------------------------------------------------------------------------
r63798 | normal | 2018-06-30 16:52:51 +0900 (Sat, 30 Jun 2018) | 3 lines

test/ruby/test_optimization.rb: increase timeout

For slow systems...
------------------------------------------------------------------------
r63797 | normal | 2018-06-30 15:11:33 +0900 (Sat, 30 Jun 2018) | 5 lines

process.c: attempt to reap spawnvp (win32) result from mjit

Basically in win32, mjit.c seems to work directly on spawnvp
result while normal Ruby code wraps process handles to look
like *nix PIDs.  I'm only guessing, here...
------------------------------------------------------------------------
r63796 | normal | 2018-06-30 12:50:52 +0900 (Sat, 30 Jun 2018) | 5 lines

mjit: provide more diagnostics for waitpid failures

Also, enable check for defined(_WIN32) macro for SIGCHLD_LOSSY, too.

[Bug #14867]
------------------------------------------------------------------------
r63795 | normal | 2018-06-30 09:51:57 +0900 (Sat, 30 Jun 2018) | 6 lines

use SIGCHLD_LOSSY to enable waitpid polling mode

Some systems lack SIGCHLD or have incomplete SIGCHLD
implementations.  So enable polling mode for them.

[ruby-core:87705] [Bug #14867]
------------------------------------------------------------------------
r63794 | normal | 2018-06-30 07:20:12 +0900 (Sat, 30 Jun 2018) | 6 lines

test_thread.rb (test_thread_interrupt_for_killed_thread): reprieve for MJIT

With MJIT enabled, the exit (from SIGTERM) may take a long time
to complete.  Prevent EnvUtil.invoke_ruby from falling back to
other signals (SIGABRT) when Process.wait takes longer than the
default 1s reprieve.
------------------------------------------------------------------------
r63793 | normal | 2018-06-30 07:13:02 +0900 (Sat, 30 Jun 2018) | 5 lines

signal.c: use ATOMIC_EXCHANGE for sigchld_hit

sig_atomic_t may not be sufficient for multi-threaded
applications if the sighandler runs on a different CPU
than timer thread.
------------------------------------------------------------------------
r63792 | svn | 2018-06-30 06:01:24 +0900 (Sat, 30 Jun 2018) | 1 line

* 2018-06-30
------------------------------------------------------------------------
r63791 | normal | 2018-06-30 06:01:23 +0900 (Sat, 30 Jun 2018) | 5 lines

test/lib/test/unit/assertions.rb (assert_in_out_err): disable gems

RubyGems loading is still a bottleneck at startup and this speeds up
test/ruby/test_rubyoptions.rb test from 15s => 3.5s on the fastest
machine I have access to.
------------------------------------------------------------------------
r63790 | normal | 2018-06-29 17:51:33 +0900 (Fri, 29 Jun 2018) | 4 lines

process.c: handle errno correctly in non-SIGCHLD path

It's a bit redundant, but we optimize for platforms with
SIGCHLD, not without.
------------------------------------------------------------------------
r63789 | normal | 2018-06-29 16:52:24 +0900 (Fri, 29 Jun 2018) | 7 lines

process.c (waitpid_nogvl): check interrupts before sleeping

We may be interrupted by another thread after setting ubf,
but before we re-acquire interrupt_lock again to sleep on
w->cond.

This should fix test_wait_interrupt in test/ruby/test_process.rb
------------------------------------------------------------------------
r63788 | shyouhei | 2018-06-29 13:56:07 +0900 (Fri, 29 Jun 2018) | 2 lines

improve C0 coverage of insns.def

------------------------------------------------------------------------
r63787 | nobu | 2018-06-29 12:28:26 +0900 (Fri, 29 Jun 2018) | 1 line

rethrow the caught exception as-is
------------------------------------------------------------------------
r63786 | normal | 2018-06-29 11:53:11 +0900 (Fri, 29 Jun 2018) | 7 lines

test_process.rb (test_wait_exception): check assertion sooner

To diagnose f.puts => EPIPE failures in CI(*).  I'm not sure
what's wrong and can't reproduce EPIPE even with my slow laptop
from 2005.

(*) http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1058203
------------------------------------------------------------------------
r63785 | normal | 2018-06-29 11:21:08 +0900 (Fri, 29 Jun 2018) | 3 lines

process.c: fix typo in non-SIGCHLD waitpid :x

I expect this to fix [Bug #14873]
------------------------------------------------------------------------
r63784 | svn | 2018-06-29 08:47:00 +0900 (Fri, 29 Jun 2018) | 1 line

* 2018-06-29
------------------------------------------------------------------------
r63783 | nobu | 2018-06-29 08:46:59 +0900 (Fri, 29 Jun 2018) | 4 lines

rb_enc_alias

`rb_encdb`-prefixed functions are only for internal use.
use rb_enc_alias instead.
------------------------------------------------------------------------
r63782 | yui-knk | 2018-06-28 23:33:28 +0900 (Thu, 28 Jun 2018) | 3 lines

ast.c: Fix defs

* ast.c (node_children): Add mid to children
------------------------------------------------------------------------
r63781 | mame | 2018-06-28 23:18:56 +0900 (Thu, 28 Jun 2018) | 3 lines

Revert "rb_enc_alias"

This reverts commit r63779 which made test-spec fail.
------------------------------------------------------------------------
r63780 | nobu | 2018-06-28 22:22:13 +0900 (Thu, 28 Jun 2018) | 5 lines

Use nd_X shorthand for annotation

[Fix GH-1901]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r63779 | nobu | 2018-06-28 22:18:52 +0900 (Thu, 28 Jun 2018) | 4 lines

rb_enc_alias

`rb_encdb`-prefixed functions are only for internal use.
use rb_enc_alias instead.
------------------------------------------------------------------------
r63778 | nobu | 2018-06-28 18:59:35 +0900 (Thu, 28 Jun 2018) | 1 line

fix feature name and removed a duplicate condition
------------------------------------------------------------------------
r63777 | ko1 | 2018-06-28 17:35:48 +0900 (Thu, 28 Jun 2018) | 20 lines

check enc_capable.

* encoding.c (rb_enc_capable): make it extern to check enc_capable.
  enc_index can be set to limited types such as T_STRING, T_REGEX
  and so on. This function check an object is this kind of types.

* include/ruby/encoding.h: ditto.

* encoding.c (enc_set_index): check a given object is enc_capable.

* include/ruby/encoding.h (PUREFUNC):

* marshal.c (encoding_name): check `rb_enc_capable` first.

* marshal.c (r_ivar): ditto. If it is not enc_capable, it should be
  malformed data.

* spec/ruby/optional/capi/encoding_spec.rb: remove tests depending
  on the wrong feature: all objects can set enc_index.

------------------------------------------------------------------------
r63776 | nobu | 2018-06-28 16:34:36 +0900 (Thu, 28 Jun 2018) | 4 lines

symbol.c: dsymbol initial encoding

* symbol.c (dsymbol_alloc): set encoding directly.  no need to
  check existing encoding in rb_enc_associate.
------------------------------------------------------------------------
r63775 | a_matsuda | 2018-06-28 12:48:52 +0900 (Thu, 28 Jun 2018) | 6 lines

Fix typo of file path [ci skip]

Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com>

https://github.com/ruby/ruby/pull/1900
[Fix GH-1900]
------------------------------------------------------------------------
r63774 | normal | 2018-06-28 03:27:58 +0900 (Thu, 28 Jun 2018) | 5 lines

tests: increase timeouts and speedup some slow tests

I'm still using the computer from 2005, so enabling MJIT makes
some tests take longer.  For test_deadlock_by_signal_at_forking
I got it down to 135s to 89s by disabling RubyGems.
------------------------------------------------------------------------
r63773 | svn | 2018-06-28 00:56:56 +0900 (Thu, 28 Jun 2018) | 1 line

* 2018-06-28
------------------------------------------------------------------------
r63772 | hsbt | 2018-06-28 00:56:55 +0900 (Thu, 28 Jun 2018) | 7 lines

Added guard condition for old ruby about RubyVM::MJIT.

  Test libraries under the test/lib is used with default gems in
  their repositories. default gems may support old ruby like
  Ruby 2.5. When default gems invoke test libraries of Ruby core
  with old ruby, they raised
  `uninitialized constant RubyVM::MJIT (NameError)`
------------------------------------------------------------------------
r63771 | nobu | 2018-06-27 23:00:34 +0900 (Wed, 27 Jun 2018) | 1 line

use the prefixed macro
------------------------------------------------------------------------
r63770 | nobu | 2018-06-27 22:42:49 +0900 (Wed, 27 Jun 2018) | 1 line

use rb_pid_t instead of pid_t
------------------------------------------------------------------------
r63769 | eregon | 2018-06-27 22:41:29 +0900 (Wed, 27 Jun 2018) | 1 line

Update to ruby/spec@98c7d74
------------------------------------------------------------------------
r63768 | eregon | 2018-06-27 21:30:05 +0900 (Wed, 27 Jun 2018) | 1 line

Update to ruby/spec@a454137
------------------------------------------------------------------------
r63767 | eregon | 2018-06-27 20:37:31 +0900 (Wed, 27 Jun 2018) | 3 lines

Update to ruby/spec@41068a6

* Only small fixes to specs from CRuby to review the diff more easily.
------------------------------------------------------------------------
r63766 | eregon | 2018-06-27 20:37:19 +0900 (Wed, 27 Jun 2018) | 1 line

Update to ruby/mspec@7074b56
------------------------------------------------------------------------
r63765 | ko1 | 2018-06-27 19:36:49 +0900 (Wed, 27 Jun 2018) | 6 lines

remove assertion for hidden objects.

* vm_insnhelper.h (PUSH): r63763 increase "PUSH()" op and it reveals that
  there are hidden objects (at least T_IMEMO/iseq objects) are located
  on VM stack. Remove this check and I'll revisit it later.

------------------------------------------------------------------------
r63764 | normal | 2018-06-27 19:09:33 +0900 (Wed, 27 Jun 2018) | 9 lines

process.c (waitpid_wait): do not set ECHILD prematurely

It is possible to have both MJIT and normal child processes
alive, so we cannot set ECHILD based on such a guess.  We can
still elide waitpid(PID <= 0) calls if we have callers in
vm->waiting_pids, however.

For specs, ensure Process.waitall does not leak MJIT
PIDs to Rubyspace.
------------------------------------------------------------------------
r63763 | shyouhei | 2018-06-27 18:28:09 +0900 (Wed, 27 Jun 2018) | 11 lines

give up insn attr handles_frame

I introduced this mechanism in r62051 to speed things up. Later it
was reported that the change causes problems.  I searched for
workarounds but nothing seemed appropriate.  I hereby officially
give it up.  The idea to move ADD_PC around was a mistake.

Fixes [Bug #14809] and [Bug #14834].

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>

------------------------------------------------------------------------
r63762 | normal | 2018-06-27 17:24:10 +0900 (Wed, 27 Jun 2018) | 5 lines

signal.c: fix braino in fake_grantfd

[Bug #14871]

Is neon down?  I missed ruby-core notifications on this.
------------------------------------------------------------------------
r63761 | normal | 2018-06-27 15:01:33 +0900 (Wed, 27 Jun 2018) | 3 lines

s/pid_t/rb_pid_t/

Some platforms do not have pid_t :x
------------------------------------------------------------------------
r63760 | normal | 2018-06-27 12:16:59 +0900 (Wed, 27 Jun 2018) | 3 lines

Revert "spec: skip Process wait specs on MJIT"

This reverts r63731 (commit 359dd59db2512d801bb983f98bede4fc598f139a).
------------------------------------------------------------------------
r63759 | normal | 2018-06-27 12:16:54 +0900 (Wed, 27 Jun 2018) | 3 lines

Revert "test_process.rb: skip tests for Bug 14867"

This reverts r63740 (commit 042395a7f7262464265ce70cdffbe1812aa145d3).
------------------------------------------------------------------------
r63758 | normal | 2018-06-27 12:14:30 +0900 (Wed, 27 Jun 2018) | 38 lines

hijack SIGCHLD handler for internal use

Use a global SIGCHLD handler to guard all callers of rb_waitpid.
To work safely with multi-threaded programs, we introduce a
VM-wide waitpid_lock to be acquired BEFORE fork/vfork spawns the
process.  This is to be combined with the new ruby_waitpid_locked
function used by mjit.c in a non-Ruby thread.

Ruby-level SIGCHLD handlers registered with Signal.trap(:CHLD)
continues to work as before and there should be no regressions
in any existing use cases.

Splitting the wait queues for PID > 0 and groups (PID <= 0)
ensures we favor PID > 0 callers.

The disabling of SIGCHLD in rb_f_system is longer necessary,
as we use deferred signal handling and no longer make ANY
blocking waitpid syscalls in other threads which could "beat"
the waitpid call made by rb_f_system.

We prevent SIGCHLD from firing in normal Ruby Threads and only
enable it in the timer-thread, to prevent spurious wakeups
from in test/-ext-/gvl/test_last_thread.rb with MJIT enabled.

I've tried to guard as much of the code for RUBY_SIGCHLD==0
using C "if" statements rather than CPP "#if" so to reduce
the likelyhood of portability problems as the compiler will
see more code.

We also work to suppress false-positives from
Process.wait(-1, Process::WNOHANG) to quiets warnings from
spec/ruby/core/process/wait2_spec.rb with MJIT enabled.

Lastly, we must implement rb_grantpt for ext/pty.  We need a
MJIT-compatible way of supporting grantpt(3) which may spawn
the `pt_chown' binary and call waitpid(2) on it.

[ruby-core:87605] [Ruby trunk Bug#14867]
------------------------------------------------------------------------
r63757 | mame | 2018-06-27 11:37:26 +0900 (Wed, 27 Jun 2018) | 7 lines

Revert "bootstraptest/runner: speed up assert_finish by avoiding sleep"

This reverts commit r63754.
Many CI servers still use old ruby as base ruby which does not support
read_nonblock.

https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180627T013100Z.fail.html.gz
------------------------------------------------------------------------
r63756 | shyouhei | 2018-06-27 10:10:02 +0900 (Wed, 27 Jun 2018) | 4 lines

refactor move logics out of insns.def

This is a pure refactoring.  I see no difference in this change.

------------------------------------------------------------------------
r63755 | shyouhei | 2018-06-27 09:57:16 +0900 (Wed, 27 Jun 2018) | 4 lines

move function declarations from insns.def to internal.h

Just avoid being loose.

------------------------------------------------------------------------
r63754 | normal | 2018-06-27 08:44:00 +0900 (Wed, 27 Jun 2018) | 4 lines

bootstraptest/runner: speed up assert_finish by avoiding sleep

We may use IO.select to watch for process exit.  This speeds up
"make test" by 2 seconds for me.
------------------------------------------------------------------------
r63753 | svn | 2018-06-27 00:56:09 +0900 (Wed, 27 Jun 2018) | 1 line

* 2018-06-27
------------------------------------------------------------------------
r63752 | k0kubun | 2018-06-27 00:56:08 +0900 (Wed, 27 Jun 2018) | 6 lines

test: skip 2 major unstable tests with MJIT

for CI with cppflags=-DMJIT_FORCE_ENABLE.

Since I have no idea to fix this immediately, let me skip this for now
and take a look later.
------------------------------------------------------------------------
r63751 | k0kubun | 2018-06-25 23:15:26 +0900 (Mon, 25 Jun 2018) | 3 lines

mjit_compile.inc.erb: drop unnecessary variable

It never becomes `dispatched: true` with the current code.
------------------------------------------------------------------------
r63750 | watson1978 | 2018-06-25 22:18:44 +0900 (Mon, 25 Jun 2018) | 4 lines

test_range.rb: add tests to improve coverage

This patch will improve the result of line coverage from 91.3% to 95.0%.
[Fix GH-1899]
------------------------------------------------------------------------
r63749 | naruse | 2018-06-25 21:11:31 +0900 (Mon, 25 Jun 2018) | 3 lines

increase body size

To try to block writing on travis.
------------------------------------------------------------------------
r63748 | normal | 2018-06-25 16:57:39 +0900 (Mon, 25 Jun 2018) | 5 lines

mjit.c: hide path search error behind verbose()

Before r63744, we let execvp(3) fail instead and it was quiet.
The verbosity was causing test_search to fail in
test/ruby/test_rubyoptions.rb when PATH is set to /tmp.
------------------------------------------------------------------------
r63747 | shyouhei | 2018-06-25 12:14:48 +0900 (Mon, 25 Jun 2018) | 2 lines

comma at the end of enum is a C99ism

------------------------------------------------------------------------
r63746 | normal | 2018-06-25 11:52:34 +0900 (Mon, 25 Jun 2018) | 5 lines

mjit.c: avoid signed pointer comparisons (fix for 32-bit)

ptrdiff_t is a signed type, use uintptr_t instead for unsigned
comparisons.  This is needed to allow MJIT tests to pass on
32-bit x86 GNU/Linux.
------------------------------------------------------------------------
r63745 | normal | 2018-06-25 11:52:29 +0900 (Mon, 25 Jun 2018) | 10 lines

mjit.c: set PIC flags on clang for FreeBSD and glibc

This seems required on FreeBSD 11.1 (clang 4.0.0) and
Debian stretch (clang 3.8.1) for shared libraries.

Note: Not checking __linux__ because there are statically-linked
Linux distros (I don't know if they can support MJIT).  But
glibc doesn't support static linking, so we guard on that.

Maybe other platforms will need this, too.
------------------------------------------------------------------------
r63744 | normal | 2018-06-25 10:06:15 +0900 (Mon, 25 Jun 2018) | 8 lines

mjit.c: avoid execvp PATH lookup in vfork-ed child

execvp(3) is not async-signal-safe and may alter libc internal
states (e.g. those used by malloc).  However execv(3) is
async-signal-safe as of POSIX.1-2008.

So perform the PATH lookup in the parent and use execv(3)
in the child.
------------------------------------------------------------------------
r63743 | svn | 2018-06-25 07:08:16 +0900 (Mon, 25 Jun 2018) | 1 line

* 2018-06-25
------------------------------------------------------------------------
r63742 | normal | 2018-06-25 07:08:15 +0900 (Mon, 25 Jun 2018) | 9 lines

UNIXSocket#recv_io: trigger GC when out of FDs

Make this behavior is consistent with our other FD-allocating
methods.

EMFILE and ENFILE are not documented nor can I trigger them when
using UNIXSocket#recv_io.  However, ENOMEM is documented, and
I've triggered EMSGSIZE on FreeBSD and truncated messages when
an EMFILE condition is hit on my system.
------------------------------------------------------------------------
r63741 | normal | 2018-06-24 21:36:44 +0900 (Sun, 24 Jun 2018) | 7 lines

process.c (ruby_fork_ruby): fix race in signal handling

We must block signals before stopping timer-thread, otherwise
signal handing may be delayed until (and if) another signal
is received after timer-thread is restarted.

[ruby-core:87622] [Bug #14868] [Bug #13916]
------------------------------------------------------------------------
r63740 | k0kubun | 2018-06-24 20:07:44 +0900 (Sun, 24 Jun 2018) | 1 line

test_process.rb: skip tests for Bug 14867
------------------------------------------------------------------------
r63739 | normal | 2018-06-24 19:30:48 +0900 (Sun, 24 Jun 2018) | 4 lines

process.c (after_fork_ruby): make it a proper function

Improves readability to me, and there's no point in using
macros for this with decent compilers.
------------------------------------------------------------------------
r63738 | mame | 2018-06-24 18:31:09 +0900 (Sun, 24 Jun 2018) | 6 lines

test/net/http/test_httpresponse.rb: add testcases for net/httpresponse

This change adds testcases for Response#inspect and #code_type, and
improves line coverage of lib/net/http/response.rb (91.8 % to 92.94 %).

A patch from @owlworks.  https://github.com/ruby/ruby/pull/1898
------------------------------------------------------------------------
r63737 | mame | 2018-06-24 18:31:07 +0900 (Sun, 24 Jun 2018) | 10 lines

lib/prime.rb: remove unused methods

This change removes TrialDivision#cache, TrialDivision#primes, and
TrialDivision#primes_so_far.

TrialDivision class is undocumented officially, so this class is used
only internally.  Yugui san moved prime library from mathn to prime in
2008, and then she might forget to delete these methods.

A patch from @shio-phys.  https://github.com/ruby/prime/pull/4
------------------------------------------------------------------------
r63736 | svn | 2018-06-24 18:31:07 +0900 (Sun, 24 Jun 2018) | 1 line

* 2018-06-24
------------------------------------------------------------------------
r63735 | mame | 2018-06-24 18:31:06 +0900 (Sun, 24 Jun 2018) | 4 lines

test/test_prime.rb: add testcases of prime library

This change improves line coverage of prime.rb from 86% to 99%.
A patch from @shio-phys.  https://github.com/ruby/prime/pull/3
------------------------------------------------------------------------
r63734 | k0kubun | 2018-06-23 23:11:19 +0900 (Sat, 23 Jun 2018) | 8 lines

mjit.c: disable calling JIT-ed code

when TracePoint is enabled. We're cancelling JIT-ed code execution AFTER
each instruction, but there is no guard before the first insn of method.

To prevent spoiling performance, I don't want to modify the JIT-ed code
to fix this. So this commit replaces `mjit_enabled` check with `mjit_call_p`
check.
------------------------------------------------------------------------
r63733 | tarui | 2018-06-23 22:58:51 +0900 (Sat, 23 Jun 2018) | 4 lines

gc.c (ruby_mimmalloc): add initialize code for USE_GC_MALLOC_OBJ_INFO_DETAILS

We often had SEGV in ruby_xfree when USE_GC_MALLOC_OBJ_INFO_DETAILS is 1

------------------------------------------------------------------------
r63732 | k0kubun | 2018-06-23 22:41:06 +0900 (Sat, 23 Jun 2018) | 9 lines

mjit.c: unify the variable name with method name

`RubyVM::MJIT.enabled?`.

It's set to be TRUE even before initialization is finished.
So it was actually not "mjit initialized predicate".

This flag is also used to check whether JIT-ed code should be called
or not, but I'm going to split the responsibility to another flag.
------------------------------------------------------------------------
r63731 | k0kubun | 2018-06-23 17:29:20 +0900 (Sat, 23 Jun 2018) | 4 lines

spec: skip Process wait specs on MJIT

until [Bug #14867] is fixed. I want to start running CI with MJIT
enabled before fixing the problem.
------------------------------------------------------------------------
r63730 | k0kubun | 2018-06-23 16:21:12 +0900 (Sat, 23 Jun 2018) | 12 lines

mjit.c: initial cygwin support

thread_pthread.c: Drop pthread_attr_setscope usage. It seems that,
at least on Linux and macOS, PTHREAD_SCOPE_PROCESS is not supported
and thus PTHREAD_SCOPE_SYSTEM should be used by default.

Let's just stop calling this until we find some platform that needs
`pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)`.

[Misc #14854]

From: fd0 (Daisuke Fujimura)
------------------------------------------------------------------------
r63729 | ktsj | 2018-06-23 13:57:49 +0900 (Sat, 23 Jun 2018) | 1 line

[DOC] Add call signature for {Array,Hash}#any?
------------------------------------------------------------------------
r63728 | ktsj | 2018-06-23 13:56:49 +0900 (Sat, 23 Jun 2018) | 5 lines

test/ruby/test_settracefunc.rb: fix NoMethodError

* test/ruby/test_settracefunc.rb (test_trace_point_raising_exception_in_bmethod_call):
  this test run in separate process, so #target_thread? is not defined and it doesn't
  need target thread check.
------------------------------------------------------------------------
r63727 | ktsj | 2018-06-23 13:52:58 +0900 (Sat, 23 Jun 2018) | 6 lines

vm.c: fix infinite loop

* vm.c: use EXEC_EVENT_HOOK_AND_POP_FRAME. While exception handling, if an exception
  is raised in hooks, need to pop current frame and raise this raised exception by hook.

[ruby-dev:50582] [Bug #14865]
------------------------------------------------------------------------
r63726 | ktsj | 2018-06-23 13:45:57 +0900 (Sat, 23 Jun 2018) | 1 line

vm.c: fix typo in function name
------------------------------------------------------------------------
r63725 | svn | 2018-06-23 12:47:55 +0900 (Sat, 23 Jun 2018) | 1 line

* 2018-06-23
------------------------------------------------------------------------
r63724 | normal | 2018-06-23 12:47:54 +0900 (Sat, 23 Jun 2018) | 5 lines

thread_pthread.c (native_sleep): do not clear unblock.arg

It is unnecessary to clear unblock.arg once unblock.func is
cleared, and unblock_function_clear in thread.c doesn't
touch it, either.
------------------------------------------------------------------------
r63723 | naruse | 2018-06-22 20:57:06 +0900 (Fri, 22 Jun 2018) | 1 line

remove debug print
------------------------------------------------------------------------
r63722 | naruse | 2018-06-22 20:10:56 +0900 (Fri, 22 Jun 2018) | 3 lines

check net.core.wmem_default and max instead of tcp

https://travis-ci.org/ruby/ruby/jobs/395416137
------------------------------------------------------------------------
r63721 | naruse | 2018-06-22 19:53:03 +0900 (Fri, 22 Jun 2018) | 3 lines

show net.ipv4.tcp_wmem to debug failure on travis

https://travis-ci.org/ruby/ruby/builds/395318841
------------------------------------------------------------------------
r63720 | normal | 2018-06-22 17:47:12 +0900 (Fri, 22 Jun 2018) | 7 lines

dir.c: define O_CLOEXEC for older systems

SuSE 10 has openat(), but not O_CLOEXEC

Reported-by: wangpeiwen

[ruby-core:87591] [Bug #14864]
------------------------------------------------------------------------
r63719 | normal | 2018-06-22 15:17:15 +0900 (Fri, 22 Jun 2018) | 4 lines

thread.c (sleep_timespec): avoid needless update w/o spuriuos check

No point in wasting cycles updating the timespec when not
checking on spurious wakeups.
------------------------------------------------------------------------
r63718 | nobu | 2018-06-22 13:13:02 +0900 (Fri, 22 Jun 2018) | 11 lines

remove DISABLE_RUBYGEMS from config files

* configure.ac: removed DISABLE_RUBYGEMS macro from config.h, not
  to rebuild everything when the flag changed.

* configure.ac, win32/configure.bat: make USE_RUBYGEMS lowercase.

* tool/mkconfig.rb: remove RUBYGEMS stuff from rbconfig.rb, not to
  reconfigure and rebuild all extension libraries.

* Makefile.in (CPPFLAGS): enable/disable Rubygems by USE_RUBYGEMS.
------------------------------------------------------------------------
r63717 | mame | 2018-06-22 12:07:24 +0900 (Fri, 22 Jun 2018) | 1 line

test/ruby/test_range.rb: add a test for endless range's min with comparison
------------------------------------------------------------------------
r63716 | mame | 2018-06-22 11:58:40 +0900 (Fri, 22 Jun 2018) | 4 lines

range.c: Range#last and #max raises a RangeError if it is endless

Also, Range#min raises an error if it is endless and a comparison method
is specified.
------------------------------------------------------------------------
r63715 | mame | 2018-06-22 11:58:39 +0900 (Fri, 22 Jun 2018) | 3 lines

range.c: Range#size now returns Float::INFINITY if it is endless

Fixes [Bug #14699]
------------------------------------------------------------------------
r63714 | mame | 2018-06-22 11:58:37 +0900 (Fri, 22 Jun 2018) | 3 lines

range.c: Range#to_a now raises RangeError if it is endless

Fixes [Bug #14845]
------------------------------------------------------------------------
r63713 | normal | 2018-06-22 11:43:51 +0900 (Fri, 22 Jun 2018) | 4 lines

vm_core.h (rb_vm_t): make sleeper non-volatile

vm->sleeper is never modified in signal handlers or without GVL,
so there's no need for volatile hocus-pocus.
------------------------------------------------------------------------
r63712 | svn | 2018-06-22 11:32:32 +0900 (Fri, 22 Jun 2018) | 1 line

* 2018-06-22
------------------------------------------------------------------------
r63711 | normal | 2018-06-22 11:32:30 +0900 (Fri, 22 Jun 2018) | 4 lines

thread_sync.c (rb_mutex_lock): fix deadlock

* thread_sync.c (rb_mutex_lock): fix deadlock
  [ruby-core:87467] [Bug #14841]
------------------------------------------------------------------------
r63710 | k0kubun | 2018-06-21 23:04:05 +0900 (Thu, 21 Jun 2018) | 3 lines

mjit.c: RubyVM::MJIT.pause / RubyVM::MJIT.resume

[Feature #14830]
------------------------------------------------------------------------
r63709 | normal | 2018-06-21 08:38:21 +0900 (Thu, 21 Jun 2018) | 4 lines

thread_pthread.c: fix non-sleepy timer-thread with fork

This fixes bootstraptest/test_fork.rb for systems with
sleepy timer thread disabled.
------------------------------------------------------------------------
r63708 | normal | 2018-06-21 08:38:16 +0900 (Thu, 21 Jun 2018) | 6 lines

test/ruby/test_io.rb: fix timing sensitive test

For systems with sleepy timer thread disabled, the signal
handler does not fire soon enough and we need to ensure the
signal is received before we check its value.  So use a
self-pipe here.
------------------------------------------------------------------------
r63707 | svn | 2018-06-21 03:10:10 +0900 (Thu, 21 Jun 2018) | 1 line

* 2018-06-21
------------------------------------------------------------------------
r63706 | ko1 | 2018-06-21 03:10:09 +0900 (Thu, 21 Jun 2018) | 1 line

add assertion to vm_search_method()
------------------------------------------------------------------------
r63705 | hsbt | 2018-06-20 21:51:38 +0900 (Wed, 20 Jun 2018) | 3 lines

ConditionVariable and Queue is not standard library.

  They are located under the Thread class.
------------------------------------------------------------------------
r63704 | yui-knk | 2018-06-20 21:40:59 +0900 (Wed, 20 Jun 2018) | 4 lines

test_ast.rb: Remove a needless line

`RubyVM::AST.parse_file` was fixed to raise `SyntaxError`
by r63602. So this line is needless.
------------------------------------------------------------------------
r63703 | yui-knk | 2018-06-20 21:11:25 +0900 (Wed, 20 Jun 2018) | 3 lines

test_ast.rb: Fix an argument of `grep`, child is a `RubyVM::AST::Node`

Yusuke Endoh pointed out coverage of ast module is very low. Thanks!
------------------------------------------------------------------------
r63702 | nobu | 2018-06-20 20:14:08 +0900 (Wed, 20 Jun 2018) | 1 line

skip when group name is not found
------------------------------------------------------------------------
r63701 | ko1 | 2018-06-20 16:53:29 +0900 (Wed, 20 Jun 2018) | 8 lines

Introduce `USE_GC_MALLOC_OBJ_INFO_DETAILS`. [Feature #14857]

* include/ruby/defines.h: introduce `USE_GC_MALLOC_OBJ_INFO_DETAILS`
  to show malloc statistics by replace ruby_xmalloc() and so on with
  macros.

* gc.c (struct malloc_obj_info): introduced to save per-malloc information.

------------------------------------------------------------------------
r63700 | hsbt | 2018-06-20 16:16:25 +0900 (Wed, 20 Jun 2018) | 1 line

Thread is always provided at current ruby version.
------------------------------------------------------------------------
r63699 | svn | 2018-06-20 08:20:37 +0900 (Wed, 20 Jun 2018) | 1 line

* 2018-06-20
------------------------------------------------------------------------
r63698 | normal | 2018-06-20 08:20:36 +0900 (Wed, 20 Jun 2018) | 13 lines

lib/drb/extservm.rb (service): do not return `false'

invoke_service_command may set entries in @servers to `false',
making it incompatible with the intended use of the
safe navigation operator.

This caused occasional DRb test failures, but they were hidden
with automatic retry.

[ruby-core:87524] [Bug #14856]

Fixes: r53111 ("use safe navigation operator")
	commit 059c9c1cf371e049c7481c78b76e9620da52757f [GH-1142]
------------------------------------------------------------------------
r63697 | nobu | 2018-06-19 17:45:17 +0900 (Tue, 19 Jun 2018) | 1 line

describe about NameError by #private_constant
------------------------------------------------------------------------
r63696 | nobu | 2018-06-19 17:15:52 +0900 (Tue, 19 Jun 2018) | 5 lines

variable.c: fix receiver on private constant

* variable.c (rb_const_search): fix NameError :receiver attribute
  on private constant, should raise with the included module, not
  the ICLASS.
------------------------------------------------------------------------
r63695 | normal | 2018-06-19 16:12:43 +0900 (Tue, 19 Jun 2018) | 3 lines

gc.c (gc_verify_heap_pages): fix no-op on heap_eden->pages

Shouldn't affect production use, but good to fix regardless :>
------------------------------------------------------------------------
r63694 | ko1 | 2018-06-19 11:46:10 +0900 (Tue, 19 Jun 2018) | 8 lines

NULL class Data_Wrap_Struct is not allowed.

* spec/ruby/optional/capi/typed_data_spec.rb: same as r63692.

* spec/ruby/optional/capi/ext/typed_data_spec.c: ditto.

* vm_insnhelper.h (PUSH): re-enable assertion to check hidden objects.

------------------------------------------------------------------------
r63693 | svn | 2018-06-19 08:19:39 +0900 (Tue, 19 Jun 2018) | 1 line

* 2018-06-19
------------------------------------------------------------------------
r63692 | nobu | 2018-06-19 08:19:38 +0900 (Tue, 19 Jun 2018) | 4 lines

Removed unobservable behavior

The klass for Data_Wrap_Struct can be NULL, but it MUST NOT appear
in the Ruby level.  It is only for the C level implementation.
------------------------------------------------------------------------
r63688 | ko1 | 2018-06-18 17:30:03 +0900 (Mon, 18 Jun 2018) | 1 line

remvoe assertion because rubyspec hit this assert
------------------------------------------------------------------------
r63687 | ko1 | 2018-06-18 16:41:22 +0900 (Mon, 18 Jun 2018) | 5 lines

hidden objects should not be pushed.

* vm_insnhelper.h (PUSH): hidden objects (klass == 0) should not be pushed
  to a VM value stack. Add assertion for it.

------------------------------------------------------------------------
r63686 | svn | 2018-06-18 00:42:36 +0900 (Mon, 18 Jun 2018) | 1 line

* 2018-06-18
------------------------------------------------------------------------
r63685 | kazu | 2018-06-18 00:42:35 +0900 (Mon, 18 Jun 2018) | 1 line

Remove needless closed?
------------------------------------------------------------------------
r63684 | nobu | 2018-06-17 19:17:39 +0900 (Sun, 17 Jun 2018) | 4 lines

openssl_missing.h: constified

* ext/openssl/openssl_missing.h (IMPL_KEY_ACCESSOR{2,3}):
  constified obj argument getters.
------------------------------------------------------------------------
r63683 | normal | 2018-06-17 12:27:45 +0900 (Sun, 17 Jun 2018) | 4 lines

thread_pthread.c: microptimize vm->gvl.waiting checks

"gvl.waiting" is volatile, so the compiler won't perform
these optimizations for us.
------------------------------------------------------------------------
r63682 | normal | 2018-06-17 11:56:28 +0900 (Sun, 17 Jun 2018) | 5 lines

thread_pthread.c: fix non-sleepy timer thread build

I guess everybody has poll() and fcntl() nowadays, as
the non-sleepy timer thread build has been broken for
years, now.
------------------------------------------------------------------------
r63681 | nobu | 2018-06-17 11:42:46 +0900 (Sun, 17 Jun 2018) | 1 line

EXTOBJS should be included in DLDOBJS
------------------------------------------------------------------------
r63680 | nobu | 2018-06-17 11:41:26 +0900 (Sun, 17 Jun 2018) | 4 lines

share Float 0

* complex.c (RFLOAT_0): share the 0.0 object on non-flonum
  platforms.
------------------------------------------------------------------------
r63679 | nobu | 2018-06-17 11:40:32 +0900 (Sun, 17 Jun 2018) | 5 lines

Makefile.in: MJIT_DLDFLAGS

* Makefile.in (mjit_config.h): needs -arch flag to link, as well
  as precompiling the header, when compiling for i386 on x86_64
  mac.
------------------------------------------------------------------------
r63678 | nobu | 2018-06-17 11:37:32 +0900 (Sun, 17 Jun 2018) | 9 lines

refine Integer#** and Float#**

* complex.c (rb_dbl_complex_polar): utility function, which
  returns more precise value in right angle cases.

* bignum.c (rb_big_pow): use rb_dbl_complex_polar().

* numeric.c (rb_float_pow, fix_pow): create a Complex by polar
  form.
------------------------------------------------------------------------
r63677 | nobu | 2018-06-17 10:24:25 +0900 (Sun, 17 Jun 2018) | 4 lines

compare with correct values

* spec/ruby/shared/rational/exponent.rb: compare with
  mathematically expected values without errors.
------------------------------------------------------------------------
r63676 | nobu | 2018-06-17 10:07:27 +0900 (Sun, 17 Jun 2018) | 4 lines

refine Integer#**

* numeric.c (fix_pow): calculate the denominator, exponent of
  self.
------------------------------------------------------------------------
r63675 | svn | 2018-06-17 08:22:44 +0900 (Sun, 17 Jun 2018) | 1 line

* 2018-06-17
------------------------------------------------------------------------
r63674 | nobu | 2018-06-17 08:22:42 +0900 (Sun, 17 Jun 2018) | 1 line

mjit.c: measure time more precisely
------------------------------------------------------------------------
r63673 | svn | 2018-06-16 17:27:57 +0900 (Sat, 16 Jun 2018) | 1 line

* 2018-06-16
------------------------------------------------------------------------
r63672 | normal | 2018-06-16 17:27:56 +0900 (Sat, 16 Jun 2018) | 9 lines

thread.c (timeout_prepare): common function

I can't seem to reproduce the maybe-uninitialized warning on
gcc 7 or 8 on Debian sid (7.3.0-16 / 8-20180425-1 r259628),
so the guard from r62305 is dropped.

* thread.c (timeout_prepare): hoist out from do_select
  (do_select): ditto
  (rb_wait_for_single_fd): use timeout_prepare
------------------------------------------------------------------------
r63671 | nobu | 2018-06-15 19:35:13 +0900 (Fri, 15 Jun 2018) | 4 lines

gettimeofday is obsolete

* test/ruby/test_process.rb gettimeofday is obsolete in SUSv4, and
  may not be available in the future.
------------------------------------------------------------------------
r63670 | nobu | 2018-06-15 19:15:40 +0900 (Fri, 15 Jun 2018) | 1 line

win32/Makefile.sub: gettimeofday is defined in win32.c
------------------------------------------------------------------------
r63669 | mame | 2018-06-15 17:53:17 +0900 (Fri, 15 Jun 2018) | 1 line

Remove flip-flop usages from build scripts
------------------------------------------------------------------------
r63668 | mame | 2018-06-15 17:53:16 +0900 (Fri, 15 Jun 2018) | 1 line

Remove warnings of flip-flop deprecation from tests and specs
------------------------------------------------------------------------
r63667 | mame | 2018-06-15 17:53:15 +0900 (Fri, 15 Jun 2018) | 3 lines

parse.y: Deprecate flip-flops

Ref #5400
------------------------------------------------------------------------
r63666 | kazu | 2018-06-15 09:19:05 +0900 (Fri, 15 Jun 2018) | 1 line

Update obsoleted URLs of supported platforms [ci skip]
------------------------------------------------------------------------
r63665 | svn | 2018-06-15 09:06:34 +0900 (Fri, 15 Jun 2018) | 1 line

* 2018-06-15
------------------------------------------------------------------------
r63664 | nobu | 2018-06-15 09:06:33 +0900 (Fri, 15 Jun 2018) | 5 lines

Bootstrapping ruby runtime might not have RubyVM::MJIT defined.

[Fix GH-1891]

From: U-DESKTOP-RLT5UQ8\moriyoshi <mozo@mozo.jp>
------------------------------------------------------------------------
r63663 | nobu | 2018-06-14 22:10:25 +0900 (Thu, 14 Jun 2018) | 8 lines

prefer clock_gettime

* configure.ac: clock_gettime or gettimeofday must exist.

* process.c (rb_clock_gettime): prefer clock_gettime over
  gettimeofday, as the latter is obsolete in SUSv4.

* random.c (fill_random_seed): ditto.
------------------------------------------------------------------------
r63662 | kazu | 2018-06-14 20:12:49 +0900 (Thu, 14 Jun 2018) | 1 line

README.ja.md: Add link to downloads [ci skip]
------------------------------------------------------------------------
r63661 | usa | 2018-06-14 18:01:38 +0900 (Thu, 14 Jun 2018) | 6 lines

Get rid of warnings of test/spec

* lib/net/http/exceptions.rb: revert a part of r63590.  to deprecate
  Net::ProtoServerError seems to be wrong.
  see [ruby-core:87488] [Feature#14688]

------------------------------------------------------------------------
r63660 | nobu | 2018-06-14 16:09:02 +0900 (Thu, 14 Jun 2018) | 6 lines

bignum.c: get rid of redefined method

* bignum.c (int_pow_tmp3): get rid of redefined Integer#> on
  internal calculations, as well as the GMP version.

* bignum.c (rb_int_powm): ditto.
------------------------------------------------------------------------
r63659 | usa | 2018-06-14 15:41:09 +0900 (Thu, 14 Jun 2018) | 6 lines

HTTPServerException is deprecated

* spec/ruby/library/net/http/HTTPClientException_spec.rb: add.
* spec/ruby/library/net/http/HTTPServerException_spec.rb: check deprecated message.
* spec/ruby/library/net/http/httpresponse/*_spec.rb: use HTTPClientException instead of HTTPServerException.

------------------------------------------------------------------------
r63658 | mame | 2018-06-14 15:36:40 +0900 (Thu, 14 Jun 2018) | 4 lines

test/rubygems/test_gem_dependency_installer.rb: Avoid Dir.chdir + block

This caused a warning "conflicting chdir during another chdir block"
during "make test-all".
------------------------------------------------------------------------
r63657 | nobu | 2018-06-14 12:18:10 +0900 (Thu, 14 Jun 2018) | 1 line

.gdbinit: expand RBASIC macro for old gdb on mac
------------------------------------------------------------------------
r63656 | svn | 2018-06-14 06:58:55 +0900 (Thu, 14 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63655 | svn | 2018-06-14 06:58:55 +0900 (Thu, 14 Jun 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r63654 | eregon | 2018-06-14 06:58:54 +0900 (Thu, 14 Jun 2018) | 3 lines

Update to ruby/spec@4bb0f25

* Specs added by TruffleRuby.
------------------------------------------------------------------------
r63653 | svn | 2018-06-14 06:41:47 +0900 (Thu, 14 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63652 | eregon | 2018-06-14 06:41:45 +0900 (Thu, 14 Jun 2018) | 1 line

Update to ruby/spec@4bc7a2b
------------------------------------------------------------------------
r63651 | svn | 2018-06-14 06:17:48 +0900 (Thu, 14 Jun 2018) | 1 line

* 2018-06-14
------------------------------------------------------------------------
r63650 | eregon | 2018-06-14 06:17:48 +0900 (Thu, 14 Jun 2018) | 5 lines

Fix condition in Kernel#warn when using uplevel

* It causes SEGV on `warn("foo", uplevel: 100)`.
* Found in a ruby/spec added by @andrykonchin in
  https://github.com/ruby/spec/pull/605
------------------------------------------------------------------------
r63649 | mame | 2018-06-13 20:00:28 +0900 (Wed, 13 Jun 2018) | 4 lines

Revert "range.c: prohibit `(1..nil)`"

This reverts commit a44c010764a16ae09aaed49d76eec055ca0057c8.
Refs #14845.
------------------------------------------------------------------------
r63648 | kazu | 2018-06-13 19:27:17 +0900 (Wed, 13 Jun 2018) | 3 lines

Remove sunsetting FTP site

ref #14842
------------------------------------------------------------------------
r63647 | normal | 2018-06-13 19:00:46 +0900 (Wed, 13 Jun 2018) | 8 lines

thread.c: use flags for sleep_* functions

Same thing as https://bugs.ruby-lang.org/issues/14798
My easily-confused mind gets function call ordering confused
easily:

	sleep_forever(..., TRUE, FALSE);
	sleep_forever(..., FALSE, TRUE);
------------------------------------------------------------------------
r63646 | mame | 2018-06-13 18:04:32 +0900 (Wed, 13 Jun 2018) | 7 lines

range.c: prohibit `(1..nil)`

Now endless range can be created by either a literal `(1..)` or explicit
range creation `Range.new(1, nil)`.  [Bug #14845]

This change is intended for "early failure"; for example,
`(1..var).to_a` causes out of memory if `var` is inadvertently nil.
------------------------------------------------------------------------
r63645 | mame | 2018-06-13 13:51:43 +0900 (Wed, 13 Jun 2018) | 4 lines

Make VM_INSN_INFO_TABLE_IMPL=1 work

rb_iseq_insns_info_decode_positions is used only when
VM_INSN_INFO_TABLE_IMPL=2.
------------------------------------------------------------------------
r63644 | ko1 | 2018-06-13 11:50:21 +0900 (Wed, 13 Jun 2018) | 4 lines

add "print_flags" gdb command.

* .gdbinit (print_flags): added to show raw FLAGS info for objects.

------------------------------------------------------------------------
r63643 | nobu | 2018-06-13 10:21:59 +0900 (Wed, 13 Jun 2018) | 4 lines

bignum.c: call functions directly

* bignum.c (int_pow_tmp{1,2,3}): call dedicated functions directly
  for internal calculations, instead of method calls.
------------------------------------------------------------------------
r63642 | nobu | 2018-06-13 10:04:33 +0900 (Wed, 13 Jun 2018) | 4 lines

bignum.c: refine pow

* bignum.c (rb_big_pow): make Complex and Rational instances from
  calculated results by API functions.
------------------------------------------------------------------------
r63641 | svn | 2018-06-13 05:22:44 +0900 (Wed, 13 Jun 2018) | 1 line

* 2018-06-13
------------------------------------------------------------------------
r63640 | stomar | 2018-06-13 05:22:43 +0900 (Wed, 13 Jun 2018) | 6 lines

lib/securerandom.rb: improve docs

* lib/securerandom.rb: [DOC] add alphanumeric example to module docs.
  [Fix GH-1812]

From: Justin Bull <me@justinbull.ca>
------------------------------------------------------------------------
r63639 | kazu | 2018-06-12 23:36:32 +0900 (Tue, 12 Jun 2018) | 3 lines

Remove needless lines

Because both assert_equal and assert_nil do not pass at the same time.
------------------------------------------------------------------------
r63638 | kazu | 2018-06-12 23:36:30 +0900 (Tue, 12 Jun 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63637 | stomar | 2018-06-12 18:42:39 +0900 (Tue, 12 Jun 2018) | 5 lines

doc/signals.rdoc: fix typo

[Fix GH-1889]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r63636 | nobu | 2018-06-12 09:39:14 +0900 (Tue, 12 Jun 2018) | 4 lines

win32.c: precise time

* win32/win32.c (filetime_split, clock_gettime): keep the
  precision as possible as the FILETIME format.
------------------------------------------------------------------------
r63635 | nobu | 2018-06-12 08:34:11 +0900 (Tue, 12 Jun 2018) | 4 lines

intern.h: suppress warnings

* include/ruby/intern.h (rb_fd_select): turned into an inline
  function, to suppress -Waddress warnings.
------------------------------------------------------------------------
r63634 | nobu | 2018-06-12 08:33:35 +0900 (Tue, 12 Jun 2018) | 4 lines

ruby.c: making hidden objects

* ruby.c (add_modules): make hidden objects by particular
  functions.
------------------------------------------------------------------------
r63633 | svn | 2018-06-12 05:16:28 +0900 (Tue, 12 Jun 2018) | 1 line

* 2018-06-12
------------------------------------------------------------------------
r63632 | stomar | 2018-06-12 05:16:27 +0900 (Tue, 12 Jun 2018) | 1 line

string.c: [DOC] grammar fixes
------------------------------------------------------------------------
r63631 | kazu | 2018-06-11 23:13:56 +0900 (Mon, 11 Jun 2018) | 1 line

Use `&.` instead of modifier if and remove needless closed?
------------------------------------------------------------------------
r63630 | hsbt | 2018-06-11 20:32:10 +0900 (Mon, 11 Jun 2018) | 1 line

Copy gemspec from github repository and keep .document file for rdoc.
------------------------------------------------------------------------
r63629 | hsbt | 2018-06-11 20:17:30 +0900 (Mon, 11 Jun 2018) | 1 line

Added webrick.rb to cleanup target.
------------------------------------------------------------------------
r63628 | svn | 2018-06-11 16:42:29 +0900 (Mon, 11 Jun 2018) | 1 line

* 2018-06-11
------------------------------------------------------------------------
r63627 | hsbt | 2018-06-11 16:42:28 +0900 (Mon, 11 Jun 2018) | 1 line

Added entries of recent updates for gemification.
------------------------------------------------------------------------
r63625 | yui-knk | 2018-06-10 16:01:53 +0900 (Sun, 10 Jun 2018) | 1 line

NEWS: Add TracePoint#parameters which was introduced by r63562
------------------------------------------------------------------------
r63624 | nobu | 2018-06-10 15:33:15 +0900 (Sun, 10 Jun 2018) | 8 lines

random.c: fix need_secure flags

* random.c (fill_random_seed): do not need to be secure, to get
  rid of blocking at the start-up time.
  [ruby-core:87462] [Bug #14837]

* random.c (random_raw_seed): expected to be a cryptographically
  secure, as documented.
------------------------------------------------------------------------
r63623 | yui-knk | 2018-06-10 15:22:15 +0900 (Sun, 10 Jun 2018) | 24 lines

parse.y: Fix locations of none and mid-rule actions

When an empty rule or a mid-rule action is reduced,
`YYLLOC_DEFAULT` is called with the third parameter to be zero.
If we use `RUBY_SET_YYLLOC_OF_NONE` to set their locations,
sometimes the end position of NODE indicates a blank.
For example, `a.b ;` generates `NODE_CALL (line: 1, location: (1,0)-(1,4))*`,
whose end position indicates a blank.

This is because of the following reasons:

* `NODE_CALL` is created when `primary_value call_op operation2 opt_paren_args` is
  reduced to `method_call`.
* `opt_paren_args` is `none`.
* `yylex` is called and `lex.pbeg` moves before `none` is reduced, so
  the beginning position of `none` does not match with the end position of `operation2`.

To fix locations, use `YYRHSLOC(Rhs, 0)` in `YYLLOC_DEFAULT`
(0 "refers to the symbol just before the reduction").

By this change, the bottom of the location stack would be referenced,
so initialize the bottom with `RUBY_SET_YYLLOC_OF_NONE` in `%initial-action`.

Ref: https://www.gnu.org/software/bison/manual/html_node/Location-Default-Action.html#Location-Default-Action
------------------------------------------------------------------------
r63622 | nobu | 2018-06-10 15:00:45 +0900 (Sun, 10 Jun 2018) | 4 lines

doc/extension.rdoc: Fix small copy+paste mistake
[Fix GH-1884]

From: Lars Kanis <lars@greiz-reinsdorf.de>
------------------------------------------------------------------------
r63621 | yui-knk | 2018-06-10 14:02:26 +0900 (Sun, 10 Jun 2018) | 30 lines

parse.y: Fix locations of NODE_RESCUE

* parse.y (new_bodystmt): Fix locations of NODE_RESCUE
  to end with nd_else or nd_resq. Before this commit,
  locations of NODE_RESCUE included locations of nd_ensr
  of NODE_ENSURE which is a parent node of NODE_RESCUE.

  e.g. The location of the end of NODE_RESCUE is fixed:

  ```
  def a
    :b
  rescue
    :c
  ensure
    :d
  end
  ```

  * Before

  ```
  NODE_RESCUE (line: 2, location: (2,2)-(6,4))
  ```

  * After

  ```
  NODE_RESCUE (line: 3, location: (2,2)-(5,0))
  ```
------------------------------------------------------------------------
r63620 | kazu | 2018-06-10 12:10:13 +0900 (Sun, 10 Jun 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63619 | ktsj | 2018-06-10 09:30:57 +0900 (Sun, 10 Jun 2018) | 1 line

gems/bundled_gems: update to power_assert 1.1.2
------------------------------------------------------------------------
r63618 | svn | 2018-06-10 01:05:39 +0900 (Sun, 10 Jun 2018) | 1 line

* 2018-06-10
------------------------------------------------------------------------
r63617 | kazu | 2018-06-10 01:05:38 +0900 (Sun, 10 Jun 2018) | 5 lines

Revert "Use `&.` instead of modifier if"

This reverts commit 9d015aa91cc3ec45e41be58fd836fb7f6655a624.

Because tool/extlibs.rb runs with BASERUBY that may be ruby < 2.3
------------------------------------------------------------------------
r63616 | kazu | 2018-06-09 10:55:31 +0900 (Sat, 09 Jun 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63615 | naruse | 2018-06-09 02:20:20 +0900 (Sat, 09 Jun 2018) | 4 lines

write_timeout doc upates [skip ci]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
fix https://github.com/ruby/ruby/pull/1885
------------------------------------------------------------------------
r63614 | svn | 2018-06-09 01:32:25 +0900 (Sat, 09 Jun 2018) | 1 line

* 2018-06-09
------------------------------------------------------------------------
r63613 | naruse | 2018-06-09 01:32:24 +0900 (Sat, 09 Jun 2018) | 3 lines

assert_raise(Net::ReadTimeout) on Windows [Bug #14829]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r63612 | kazu | 2018-06-08 22:19:02 +0900 (Fri, 08 Jun 2018) | 1 line

Re-add Matrix to doc/standard_library.rdoc [ci skip]
------------------------------------------------------------------------
r63611 | nobu | 2018-06-08 20:03:39 +0900 (Fri, 08 Jun 2018) | 3 lines

ast.c: fix calls

* ast.c (node_children): fix the member for method IDs as nd_mid.
------------------------------------------------------------------------
r63610 | nobu | 2018-06-08 19:45:01 +0900 (Fri, 08 Jun 2018) | 7 lines

[Docs] Improve documentation of String#lines

* Document about optional getline arguments
* Add examples, especially for the demonstration of `chomp: true`
[Fix GH-1886]

From: Koki Takahashi <hakatasiloving@gmail.com>
------------------------------------------------------------------------
r63609 | nobu | 2018-06-08 19:42:48 +0900 (Fri, 08 Jun 2018) | 1 line

common.mk: dependency of node_name.inc
------------------------------------------------------------------------
r63608 | hsbt | 2018-06-08 17:46:52 +0900 (Fri, 08 Jun 2018) | 1 line

Removed needless extension for require.
------------------------------------------------------------------------
r63607 | usa | 2018-06-08 15:15:23 +0900 (Fri, 08 Jun 2018) | 2 lines

th is nil

------------------------------------------------------------------------
r63606 | svn | 2018-06-08 08:18:17 +0900 (Fri, 08 Jun 2018) | 1 line

* 2018-06-08
------------------------------------------------------------------------
r63605 | yui-knk | 2018-06-08 08:18:16 +0900 (Fri, 08 Jun 2018) | 1 line

node.c: Fix format of NODE_OP_ASGN1 and NODE_OP_ASGN2
------------------------------------------------------------------------
r63604 | nobu | 2018-06-07 23:46:25 +0900 (Thu, 07 Jun 2018) | 4 lines

ast.c: refine AST#children

* ast.c (node_children): refined RubyVM::AST#children to include
  symbols (variables, methods, classes, etc).
------------------------------------------------------------------------
r63603 | nobu | 2018-06-07 23:40:39 +0900 (Thu, 07 Jun 2018) | 1 line

ast.c: adjust indent
------------------------------------------------------------------------
r63602 | yui-knk | 2018-06-07 23:04:49 +0900 (Thu, 07 Jun 2018) | 5 lines

ast.c: Fix to raise `SyntaxError`

* ast.c: Fix to raise `SyntaxError` when `RubyVM::AST.parse`
  or `RubyVM::AST.parse_file` fail to parse input.
* test/ruby/test_ast.rb: Add test cases for invalid syntax.
------------------------------------------------------------------------
r63601 | hsbt | 2018-06-07 21:10:24 +0900 (Thu, 07 Jun 2018) | 3 lines

Promote Matrix to default gems.

  The upstream repository is https://github.com/ruby/matrix.
------------------------------------------------------------------------
r63600 | kazu | 2018-06-07 21:06:15 +0900 (Thu, 07 Jun 2018) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r63599 | hsbt | 2018-06-07 19:13:00 +0900 (Thu, 07 Jun 2018) | 3 lines

Promote OpenStruct to default gems.

  Upstream repository is https://github.com/ruby/ostruct.
------------------------------------------------------------------------
r63598 | naruse | 2018-06-07 15:18:23 +0900 (Thu, 07 Jun 2018) | 5 lines

skip write_timeout test on Windows

This test is about write_timeout.
To ensure it really raised Net::WriteTimeout, skip this test on Windows,
whose write returns immediately even for large data.
------------------------------------------------------------------------
r63597 | usa | 2018-06-07 11:37:44 +0900 (Thu, 07 Jun 2018) | 7 lines

Some platforms immediately returns from Socket#write

* test/net/http/test_http.rb (test_timeout_during_HTTP_session_write): on some
  platforms such as Windows immediately returns from Socket#write, and have to
  wait to read its response.  So, we can not handle Net::WriteTimeout and should
  handle Net::ReadTimeout instead.

------------------------------------------------------------------------
r63596 | normal | 2018-06-07 10:14:09 +0900 (Thu, 07 Jun 2018) | 4 lines

iseq.h (struct iseq_compile_data): remove cached_const field

Nobody uses it, and "git log -p -Scached_const" shows it's ever
been used in public history.
------------------------------------------------------------------------
r63595 | svn | 2018-06-07 05:57:49 +0900 (Thu, 07 Jun 2018) | 1 line

* 2018-06-07
------------------------------------------------------------------------
r63594 | normal | 2018-06-07 05:57:48 +0900 (Thu, 07 Jun 2018) | 14 lines

rb_vm_insn_addr2insn: use st to perform addr2insn mapping

The current VM_INSTRUCTION_SIZE is 198, so the linear search
painful during a major GC phase.

I noticed rb_vm_insn_addr2insn2 showing up at the top of some
profiles while working on some malloc-related stuff, so I
decided to attack it.

Most notably, the benchmark/bm_vm3_gc.rb improves by over 40%:

  https://80x24.org/spew/20180602220554.GA9991@whir/raw

[ruby-core:87361] [Feature #14814]
------------------------------------------------------------------------
r63593 | k0kubun | 2018-06-06 23:36:56 +0900 (Wed, 06 Jun 2018) | 6 lines

mjit.c: unify wording between comments and variables

Some comments say "stop", others say "finish".

I'm going to add code which dynamically stops MJIT worker, rather than
finishing it forever. So I'm thinking `stop` is more appropreate for it.
------------------------------------------------------------------------
r63592 | nobu | 2018-06-06 23:01:43 +0900 (Wed, 06 Jun 2018) | 4 lines

math.c: adjust cbrt

* math.c (math_cbrt): refine the approximation result on boundary
  values by an iteration of Newton-Raphson method.
------------------------------------------------------------------------
r63591 | naruse | 2018-06-06 21:13:16 +0900 (Wed, 06 Jun 2018) | 14 lines

Use `Net::HTTPClientException` instead of `Net::HTTPServerException`

`Net::HTTPServerException` has been deprecated since r63590. [Bug #14688]
And `net/http/responses.rb` uses the deprecated constant, so Ruby warns of the deprecation.

Example:

```bash
$ ruby -r net/http -e ''
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/net/http/responses.rb:22: warning: constant Net::HTTPServerException is deprecated
```

This change suppresses the warning.
From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r63590 | naruse | 2018-06-06 18:01:04 +0900 (Wed, 06 Jun 2018) | 1 line

Add Net::HTTPClientException [Bug #14688]
------------------------------------------------------------------------
r63589 | naruse | 2018-06-06 17:39:36 +0900 (Wed, 06 Jun 2018) | 1 line

fix r63587
------------------------------------------------------------------------
r63588 | ko1 | 2018-06-06 17:34:39 +0900 (Wed, 06 Jun 2018) | 1 line

fix r63587 with temporal patch to pass the tests. please re-fix it.
------------------------------------------------------------------------
r63587 | naruse | 2018-06-06 17:03:47 +0900 (Wed, 06 Jun 2018) | 1 line

Introduce write_timeout to Net::HTTP [Feature #13396]
------------------------------------------------------------------------
r63586 | yui-knk | 2018-06-06 15:14:21 +0900 (Wed, 06 Jun 2018) | 10 lines

ast.c: Change tabs to spaces

* ast.c: I created a new C source code file with tabs and spaces mixed
  format by mistake. Currently we move to spaces only.
  Surely we agreed not to batch update. But ast.c is a new
  source code. So please forgive me to change the format before
  many changes are committed this file.
  I'm sorry about my mistake.

  ref [Bug #14246]
------------------------------------------------------------------------
r63585 | normal | 2018-06-06 10:12:23 +0900 (Wed, 06 Jun 2018) | 4 lines

test/io/console/test_io_console.rb: fix for systems where PTY is not defined

[ruby-core:87420] [Bug #14828]
Thanks-to: MSP-Greg (Greg L)
------------------------------------------------------------------------
r63584 | normal | 2018-06-06 07:32:41 +0900 (Wed, 06 Jun 2018) | 1 line

test/lib/jit_support.rb: spelling: s/skiped/skipped/
------------------------------------------------------------------------
r63583 | normal | 2018-06-06 07:28:49 +0900 (Wed, 06 Jun 2018) | 4 lines

test/io/console/test_io_console.rb: ignore TTOU on FreeBSD

I'm not entirely sure why, but SIGTTOU pauses the test
when running test-all in parallel.
------------------------------------------------------------------------
r63582 | normal | 2018-06-06 07:01:43 +0900 (Wed, 06 Jun 2018) | 5 lines

encoding.c: remove rb_gc_mark_encodings

rb_gc_mark_encodings has been empty for a decade
(since r17875 / 28b216ac45262819f8bc7be0b1417a707974f94b).
Just remove it and its only caller in gc.c
------------------------------------------------------------------------
r63581 | normal | 2018-06-06 06:19:50 +0900 (Wed, 06 Jun 2018) | 6 lines

test/dtrace/helper.rb: support systemtap in dtrace tests

For the current cases, a few string substitions is enough to
make dtrace(1) scripts work with stap(1).  For more complex
scripts (maybe in the future), we may pass a hash with
implementation-specific scripts.
------------------------------------------------------------------------
r63580 | normal | 2018-06-06 06:19:45 +0900 (Wed, 06 Jun 2018) | 7 lines

test/dtrace: enable Tracepoint for function calls

Since [Feature #14104], "trace" instructions are no
longer emitted by default, so we must enable them explicitly
for function tracing to work.

[ruby-core:85965]
------------------------------------------------------------------------
r63579 | normal | 2018-06-06 06:19:40 +0900 (Wed, 06 Jun 2018) | 4 lines

test/dtrace/test_method_cache.rb: avoid spewing too much

Don't output method cache clearing at startup since
it causes dtrace to drop output and break the test.
------------------------------------------------------------------------
r63578 | normal | 2018-06-06 06:19:36 +0900 (Wed, 06 Jun 2018) | 4 lines

test/dtrace/test_array_create.rb: require line number

Nowadays we create empty arrays in the parse/compile
phase which gave us lineno==0.
------------------------------------------------------------------------
r63577 | normal | 2018-06-06 06:19:31 +0900 (Wed, 06 Jun 2018) | 6 lines

test/dtrace/helper: fix check for miniruby

RbConfig::TOPDIR points to my installation prefix on my FreeBSD
and GNU/Linux systems, so there's no way miniruby exists, there.
In case we don't have miniruby, --disable=gems anyways to reduce
dtrace overhead.
------------------------------------------------------------------------
r63576 | normal | 2018-06-06 05:46:56 +0900 (Wed, 06 Jun 2018) | 6 lines

io.c: fix compilation when IOV_MAX is not defined

GNU/Hurd has writev(2) but does not define IOV_MAX
[ruby-core:87417] [Bug #14827]

Reported-by: Paul Sonnenschein
------------------------------------------------------------------------
r63575 | normal | 2018-06-06 05:16:21 +0900 (Wed, 06 Jun 2018) | 14 lines

gc.c: reduce parameters for gc_start and garbage_collect

Every time I look at gc.c, I get confused by argument ordering:

	gc_start(..., TRUE, TRUE, FALSE, ...)
	gc_start(..., FALSE, FALSE, FALSE, ... )

While we do not have kwargs in C, we can use flags to improve readability:

	gc_start(...,
		GPR_FLAG_FULL_MARK | GPR_FLAG_IMMEDIATE_MARK |
		GPR_FLAG_IMMEDIATE_SWEEP | ...)

[ruby-core:87311] [Misc #14798]
------------------------------------------------------------------------
r63574 | svn | 2018-06-06 04:53:10 +0900 (Wed, 06 Jun 2018) | 1 line

* 2018-06-06
------------------------------------------------------------------------
r63573 | normal | 2018-06-06 04:53:09 +0900 (Wed, 06 Jun 2018) | 5 lines

gc.c: reduce #ifdefs around GC_ENABLE_*

We may add gc_*_continue calls in a few more places, and adding
more #ifdefs around those is ugly.  For now, this makes the
heap_prepare function look better.
------------------------------------------------------------------------
r63572 | ngoto | 2018-06-05 23:16:50 +0900 (Tue, 05 Jun 2018) | 6 lines

include/ruby/missing.h: defined(__cplusplus) before using __cplusplus

* include/ruby/missing.h (isinf, isnan): For non-C++ programs,
  defined(__cplusplus) may be needed before using __cplusplus.
  [Bug #14816]

------------------------------------------------------------------------
r63571 | shyouhei | 2018-06-05 15:50:20 +0900 (Tue, 05 Jun 2018) | 15 lines

`int isnan(double)` is a POSIXism

- `isnan` is something relatively new.  We need to provide one for
  those systems without it.  However:
- X/Open defines `int isnan(double)`. Note the `int`.
- C99 defines `isnan(x)` to be a macro.
- C++11 nukes them all, undefines all the "masking macro"s, and
  defines its own `bool isnan(double)`.  Note the `bool`.
- In C++, `int isnan(double)` and `bool isnan(double)` are
  incompatible.
- So the mess.

[Bug #14816][ruby-core:87364]
further reading: https://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think/

------------------------------------------------------------------------
r63570 | yui-knk | 2018-06-05 09:48:12 +0900 (Tue, 05 Jun 2018) | 1 line

test_ast.rb: Add test cases of heredoc columns
------------------------------------------------------------------------
r63569 | normal | 2018-06-05 09:37:05 +0900 (Tue, 05 Jun 2018) | 8 lines

gc.c: zero check for malloc_limit_max to initialization

Repeatedly checking for malloc_limit_max in gc_reset_malloc_info
is unnecessary, check and set it once during initialization
in ruby_gc_set_params to simplify the hotter path

* gc.c (gc_reset_malloc_info): remove zero check
  (ruby_gc_set_params): treat malloc_limit_max==0 as SIZE_MAX
------------------------------------------------------------------------
r63568 | yui-knk | 2018-06-05 09:18:29 +0900 (Tue, 05 Jun 2018) | 5 lines

Move a test file

* test/-ext-/ast/test_ast.rb: This test file
  has not depended C extension since r63534,
  so move to 'test/ruby/'.
------------------------------------------------------------------------
r63567 | svn | 2018-06-05 08:26:04 +0900 (Tue, 05 Jun 2018) | 1 line

* 2018-06-05
------------------------------------------------------------------------
r63566 | normal | 2018-06-05 08:26:03 +0900 (Tue, 05 Jun 2018) | 5 lines

String#uminus dedupes unconditionally

[Feature #14478] [ruby-core:85669]

Thanks-to: Sam Saffron <sam.saffron@gmail.com>
------------------------------------------------------------------------
r63565 | svn | 2018-06-04 06:06:26 +0900 (Mon, 04 Jun 2018) | 1 line

* 2018-06-04
------------------------------------------------------------------------
r63564 | normal | 2018-06-04 06:06:26 +0900 (Mon, 04 Jun 2018) | 6 lines

benchmark/driver.rb: add CPU time measurement targets

"Real" time is too unstable on my systems, hopefully counting
only CPU time can gain more reliable benchmark results.

[ruby-core:87362] [Feature #14815]
------------------------------------------------------------------------
r63563 | svn | 2018-06-03 14:10:43 +0900 (Sun, 03 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63562 | mame | 2018-06-03 14:10:41 +0900 (Sun, 03 Jun 2018) | 8 lines

Add TracePoint#parameters

It can be used to get the parameters' information of method and block.
There was no way to get block parameters.
It was possible but ineffective to get method parameters via Method
object: `tp.defined_class.method(tp.method_id).parameters`
TracePoint#parameters allows us to get the information easily.
[Feature #14694]
------------------------------------------------------------------------
r63561 | svn | 2018-06-03 08:05:46 +0900 (Sun, 03 Jun 2018) | 1 line

* 2018-06-03
------------------------------------------------------------------------
r63560 | hsbt | 2018-06-03 08:05:45 +0900 (Sun, 03 Jun 2018) | 3 lines

Promote Prime library to default gems.

  * Its upstream is https://github.com/ruby/prime.
------------------------------------------------------------------------
r63559 | hsbt | 2018-06-02 22:57:48 +0900 (Sat, 02 Jun 2018) | 3 lines

Promote Logger to default gems.

  * Its upstream is https://github.com/ruby/logger.
------------------------------------------------------------------------
r63558 | hsbt | 2018-06-02 22:55:54 +0900 (Sat, 02 Jun 2018) | 1 line

Fixed wrong variable name.
------------------------------------------------------------------------
r63557 | nobu | 2018-06-02 21:17:16 +0900 (Sat, 02 Jun 2018) | 1 line

gmake.mk: update in the source directory properly
------------------------------------------------------------------------
r63556 | svn | 2018-06-02 17:36:01 +0900 (Sat, 02 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63555 | hsbt | 2018-06-02 17:36:00 +0900 (Sat, 02 Jun 2018) | 1 line

Added test for default gems validation.
------------------------------------------------------------------------
r63554 | nobu | 2018-06-02 16:50:18 +0900 (Sat, 02 Jun 2018) | 4 lines

enum.c: bignum counter

* enum.c (imemo_count_up, imemo_count_value): promote the counter
  value to a bignum on overflow.  [Bug #14805]
------------------------------------------------------------------------
r63553 | hsbt | 2018-06-02 16:04:28 +0900 (Sat, 02 Jun 2018) | 1 line

Fixed wrong require path
------------------------------------------------------------------------
r63552 | hsbt | 2018-06-02 15:02:51 +0900 (Sat, 02 Jun 2018) | 3 lines

Promote REXML to default gems.

  * upstream repostiory is https://github.com/ruby/rexml
------------------------------------------------------------------------
r63551 | nobu | 2018-06-02 11:39:34 +0900 (Sat, 02 Jun 2018) | 12 lines

enum.c: mitigate overflows

* enum.c (enum_count): convert counters to Integer as unsigned
  long, instead of long, to mitigate overflows.
  [ruby-core:87348] [Bug #14805]

* enum.c (ary_inject_op): ditto.

* enum.c (each_with_index_i): ditto, instead of int.

* enum.c (find_index_i, find_index_iter_i): ditto, instead of
  unsigned int.
------------------------------------------------------------------------
r63550 | hsbt | 2018-06-02 10:14:24 +0900 (Sat, 02 Jun 2018) | 3 lines

Promote RSS library to default gems.

  Its upstream was moved to https://github.com/ruby/rss.
------------------------------------------------------------------------
r63549 | naruse | 2018-06-02 09:51:43 +0900 (Sat, 02 Jun 2018) | 1 line

memo->u3.cnt is long not int [Bug #14805]
------------------------------------------------------------------------
r63548 | normal | 2018-06-02 06:56:11 +0900 (Sat, 02 Jun 2018) | 9 lines

Initialize condattr_monotonic via pthread_condattr_init

Some operating systems will work without calling
pthread_condattr_init, but some won't (such as OpenBSD). Prior
to r63238, pthread_condattr_init was always called before
calling pthread_condattr_setclock.

From: Jeremy Evans <code@jeremyevans.net>
[ruby-core:87345] [Ruby trunk Bug#14807]
------------------------------------------------------------------------
r63547 | svn | 2018-06-02 06:23:21 +0900 (Sat, 02 Jun 2018) | 1 line

* 2018-06-02
------------------------------------------------------------------------
r63546 | normal | 2018-06-02 06:23:20 +0900 (Sat, 02 Jun 2018) | 11 lines

gc.c: reduce size slightly by making MEMOP_TYPE_MALLOC zero

Most (if not all) architectures have instructions for comparing
against zero, allowing compilers to generate more compact code.

Other MEMOP_TYPE_* enum values are not compared in hot paths,
but MEMOP_TYPE_MALLOC is checked in objspace_malloc_increase

   text	   data	    bss	    dec	    hex	filename
  84088	    264	   3664	  88016	  157d0	gc-before.o
  83784	    264	   3664	  87712	  156a0	gc.o
------------------------------------------------------------------------
r63545 | hsbt | 2018-06-01 22:10:37 +0900 (Fri, 01 Jun 2018) | 1 line

Added missing dependency for ast.c.
------------------------------------------------------------------------
r63544 | knu | 2018-06-01 16:13:38 +0900 (Fri, 01 Jun 2018) | 12 lines

Skip colliding filenames in LIBRUBY_ALIASES

This allows user to specify any name in `--with-so-name` that might
cause a name clash with LIBRUBY_ALIASES on the platform.

Without this, for example, configuring with `--with-soname=ruby
--enable-shared` on macOS would end up running `ln -sf libruby.dylib
libruby.dylib` only to fail with the following error in installation:

```
make[2]: stat: libruby.dylib: Too many levels of symbolic links
```
------------------------------------------------------------------------
r63543 | nobu | 2018-06-01 15:53:26 +0900 (Fri, 01 Jun 2018) | 7 lines

string.c: trivial optimizations

* string.c (rb_str_aset): prefer BUILTIN_TYPE over TYPE after
  SPECIAL_CONST_P check.

* string.c (rb_str_start_with): prefer RB_TYPE_P over switch by
  TYPE.
------------------------------------------------------------------------
r63542 | svn | 2018-06-01 15:37:15 +0900 (Fri, 01 Jun 2018) | 1 line

* 2018-06-01
------------------------------------------------------------------------
r63541 | nobu | 2018-06-01 15:37:14 +0900 (Fri, 01 Jun 2018) | 4 lines

string.c: doc for [Feature #13712]

* string.c (rb_str_start_with): [DOC] start_with? example with
  regexp.
------------------------------------------------------------------------
r63540 | nobu | 2018-05-31 18:30:49 +0900 (Thu, 31 May 2018) | 6 lines

vm_args.c: refined warning splat to var

* vm_args.c (setup_parameters_complex): refine the warning message
  for a splat hash which was passed to a single variable instead
  of keyword arguments.  this behavior will be changed when the
  "real" keyword argument is introduced in the future.
------------------------------------------------------------------------
r63538 | nobu | 2018-05-31 16:10:39 +0900 (Thu, 31 May 2018) | 4 lines

fix the condition

* test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns
  nil while the target process is alive.
------------------------------------------------------------------------
r63537 | nobu | 2018-05-31 15:57:47 +0900 (Thu, 31 May 2018) | 4 lines

test_rubyoptions.rb: relax timeout

* test/ruby/test_rubyoptions.rb: wait for setting process title
  until the child process dies, in the case of extra heavy loads.
------------------------------------------------------------------------
r63536 | yui-knk | 2018-05-31 15:25:58 +0900 (Thu, 31 May 2018) | 1 line

NEWS: Add RubyVM::AST
------------------------------------------------------------------------
r63535 | yui-knk | 2018-05-31 15:24:19 +0900 (Thu, 31 May 2018) | 1 line

Undef RubyVM::AST::Node.new
------------------------------------------------------------------------
r63534 | yui-knk | 2018-05-31 15:13:06 +0900 (Thu, 31 May 2018) | 8 lines

Define AST module under RubyVM [experimental]

* ext/-test-/ast/ast.c: Rename to ast.c
  and define AST module under RubyVM.
* common.mk: compile ast.c.
* ext/-test-/ast/extconf.rb: Don't need this file anymore.
* inits.c (rb_call_inits): Call Init_ast to setup AST module.
* test/-ext-/ast/test_ast.rb: Follow up the namespace change.
------------------------------------------------------------------------
r63533 | svn | 2018-05-31 14:49:57 +0900 (Thu, 31 May 2018) | 1 line

* 2018-05-31
------------------------------------------------------------------------
r63532 | yui-knk | 2018-05-31 14:49:56 +0900 (Thu, 31 May 2018) | 1 line

ast.c: Do not taint TOPLEVEL_BINDING
------------------------------------------------------------------------
r63531 | hsbt | 2018-05-30 22:03:47 +0900 (Wed, 30 May 2018) | 1 line

Ignore bundler assertions on ruby core test suite.
------------------------------------------------------------------------
r63530 | svn | 2018-05-30 22:01:37 +0900 (Wed, 30 May 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63529 | svn | 2018-05-30 22:01:37 +0900 (Wed, 30 May 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r63528 | hsbt | 2018-05-30 22:01:35 +0900 (Wed, 30 May 2018) | 6 lines

Merge RubyGems 3.0.0.beta1.

  * It drop to support < Ruby 2.2
  * Cleanup deprecated methods and classes.
  * Mark obsoleted methods to deprecate.
  * and other enhancements.
------------------------------------------------------------------------
r63527 | normal | 2018-05-30 20:49:06 +0900 (Wed, 30 May 2018) | 3 lines

NEWS: clarify item about built-in thread cache

[Feature #14757]
------------------------------------------------------------------------
r63526 | nobu | 2018-05-30 18:13:21 +0900 (Wed, 30 May 2018) | 1 line

Workaround for old LibreSSL
------------------------------------------------------------------------
r63525 | matz | 2018-05-30 17:24:52 +0900 (Wed, 30 May 2018) | 2 lines

object.c: Add a new alias `then` to `Kernel#yield_self`; [Feature #14594]

------------------------------------------------------------------------
r63524 | svn | 2018-05-30 08:28:51 +0900 (Wed, 30 May 2018) | 1 line

* 2018-05-30
------------------------------------------------------------------------
r63523 | nobu | 2018-05-30 08:28:50 +0900 (Wed, 30 May 2018) | 4 lines

fake.rb: fix RUBY_DESCRIPTION for MJIT

* template/fake.rb.in: switch RUBY_DESCRIPTION at runtime
  depending on the MJIT status.
------------------------------------------------------------------------
r63522 | nobu | 2018-05-29 17:47:07 +0900 (Tue, 29 May 2018) | 3 lines

fake.rb: fix RUBY_DESCRIPTION for MJIT

* template/fake.rb.in: reflect MJIT to RUBY_DESCRIPTION.
------------------------------------------------------------------------
r63521 | nobu | 2018-05-29 17:46:36 +0900 (Tue, 29 May 2018) | 5 lines

spec/ruby: revert r63503 and r63508

When RUBY_DESCRIPTION has `+JIT` already, it will be doubled.
Just fake.rb.in always has copied `RUBY_DESCRIPTION`, regardless
MJIT is enabled or not.  `BOOTSTRAPRUBY` is not involved.
------------------------------------------------------------------------
r63520 | k0kubun | 2018-05-29 11:48:38 +0900 (Tue, 29 May 2018) | 7 lines

mjit_compile.c: drop catch table handling

The loop for `vm_exce_handle_exception` doesn't trigger `mjit_exec`, so
I don't think this code is no longer needed.

This was needed in development of original version of this JIT, but it
seems not needed from the beginning (r62189) at Ruby repository.
------------------------------------------------------------------------
r63519 | yui-knk | 2018-05-29 10:58:57 +0900 (Tue, 29 May 2018) | 5 lines

Unused macro and field

* node.h (nd_cnt, struct RNode): nd_cnt has been unused
  since r60239, and also cnt field.
* .gdbinit (nd_cnt): ditto
------------------------------------------------------------------------
r63518 | yui-knk | 2018-05-29 10:40:01 +0900 (Tue, 29 May 2018) | 4 lines

Unused macro

* node.h (nd_noex): nd_noex has been unused since r24128.
* .gdbinit (nd_noex): ditto
------------------------------------------------------------------------
r63517 | yui-knk | 2018-05-29 10:19:06 +0900 (Tue, 29 May 2018) | 4 lines

Unused macro

* node.h (nd_frml): nd_frml has been unused since r34134.
* .gdbinit (nd_frml): ditto
------------------------------------------------------------------------
r63516 | normal | 2018-05-29 10:18:06 +0900 (Tue, 29 May 2018) | 5 lines

NEWS: add item about built-in thread cache

This change may impact design of future programs and obviate
thread pools in many cases, so it's worth a mention.
Anyways, this seems stable since r63499 [Feature #14757]
------------------------------------------------------------------------
r63515 | yui-knk | 2018-05-29 10:00:54 +0900 (Tue, 29 May 2018) | 4 lines

Unused macro

* node.h (nd_argc): nd_argc has been unused since r24128.
* .gdbinit (nd_argc): ditto
------------------------------------------------------------------------
r63514 | nobu | 2018-05-29 00:35:08 +0900 (Tue, 29 May 2018) | 5 lines

time.rb: fix parsing time zone in iso8601

* lib/time.rb (Time.xmlschema): the minute in time zone designator
  can be omitted together with the preceding colon.
  [ruby-core:87277] [Bug #14790]
------------------------------------------------------------------------
r63513 | svn | 2018-05-29 00:19:39 +0900 (Tue, 29 May 2018) | 1 line

* 2018-05-29
------------------------------------------------------------------------
r63512 | nobu | 2018-05-29 00:19:38 +0900 (Tue, 29 May 2018) | 4 lines

time.rb: fix parsing time zone in iso8601

* lib/time.rb (Time.xmlschema): a colon in time zone designator
  can be omitted.  [ruby-core:87277] [Bug #14790]
------------------------------------------------------------------------
r63511 | yui-knk | 2018-05-28 23:24:14 +0900 (Mon, 28 May 2018) | 5 lines

Unused macro and field

* node.h (nd_cfnc, struct RNode): nd_cfnc has been unused
  since r49938, and also cfunc field.
* .gdbinit (nd_cfnc): ditto
------------------------------------------------------------------------
r63510 | svn | 2018-05-28 09:42:33 +0900 (Mon, 28 May 2018) | 1 line

* 2018-05-28
------------------------------------------------------------------------
r63509 | hsbt | 2018-05-28 09:42:32 +0900 (Mon, 28 May 2018) | 1 line

Merge etc gemspec from github repository.
------------------------------------------------------------------------
r63508 | eregon | 2018-05-27 18:52:04 +0900 (Sun, 27 May 2018) | 1 line

Specs must keep working on older versions and other implementations
------------------------------------------------------------------------
r63507 | k0kubun | 2018-05-27 16:33:18 +0900 (Sun, 27 May 2018) | 3 lines

jit_support.rb: debug check_support stderr

rubyci freebsd11zfs doesn't pass this check. I want to know the stderr.
------------------------------------------------------------------------
r63506 | k0kubun | 2018-05-27 14:52:43 +0900 (Sun, 27 May 2018) | 4 lines

st.c: remove redundant export declaration

rb_hash_bulk_insert is added to official C API in r63488. It's no longer
exported only for MJIT.
------------------------------------------------------------------------
r63505 | svn | 2018-05-27 14:47:44 +0900 (Sun, 27 May 2018) | 1 line

* 2018-05-27
------------------------------------------------------------------------
r63504 | k0kubun | 2018-05-27 14:47:43 +0900 (Sun, 27 May 2018) | 10 lines

jit_support.rb: cahce JIT support check

* Before
make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb"  22.40s user 5.38s system 91% cpu 30.196 total

* After
make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb"  12.91s user 3.33s system 91% cpu 17.648 total

Also, this makes it easier to check if JIT is actually tested, by
showing warning on stderr.
------------------------------------------------------------------------
r63503 | k0kubun | 2018-05-24 23:32:05 +0900 (Thu, 24 May 2018) | 10 lines

spec/ruby: fix RUBY_DESCRIPTION check with JIT enabled

`make test-spec` adds `-r./$(arch)-fake` to pass header options.
But the $(arch)-fake.rb unexpectedly modifies RUBY_DESCRIPTION and it
always drops +JIT from it since the fake.rb is built with BOOTSTRAPRUBY,
which can be miniruby. miniruby can't find MJIT header and thus
mjit_init_p is always FALSE.

So, to pass `make test-spec` with JIT enabled, we can't use
RUBY_DESCRIPTION.
------------------------------------------------------------------------
r63502 | k0kubun | 2018-05-24 22:25:40 +0900 (Thu, 24 May 2018) | 3 lines

test_rubyoptions.rb: RbConfig::CONFIG['cppflags'] can be nil

not '' at least on AppVeyor
------------------------------------------------------------------------
r63501 | k0kubun | 2018-05-24 21:57:40 +0900 (Thu, 24 May 2018) | 4 lines

test_rubyoptions.rb: allow passing test_verbose

with -DMJIT_FORCE_ENABLE. With -DMJIT_FORCE_ENABLE, absence of --jit
doesn't mean JIT disabled.
------------------------------------------------------------------------
r63500 | nobu | 2018-05-24 15:15:43 +0900 (Thu, 24 May 2018) | 1 line

mjit.c: use remove_file in clean_so_file too
------------------------------------------------------------------------
r63499 | normal | 2018-05-24 11:52:46 +0900 (Thu, 24 May 2018) | 4 lines

thread_pthread.c: avoid reading th pointer for thread cache

I suspect GC may free the rb_thread_t (th) pointer by the time
we call register_cached_thread_and_wait.
------------------------------------------------------------------------
r63498 | normal | 2018-05-24 06:16:56 +0900 (Thu, 24 May 2018) | 54 lines

thread_pthread.c: enable thread cache by default

Since r62466 ("thread_pthread.c: shorten and fix thread cache implementation"),
our thread cache is no longer buggy with programs using fork.
This makes significant improvements in vm_thread_alive_check1
and vm_thread_create_join benchmarks and does not introduce
regressions.

Unlike old thread cache, I've changed the cache to only last 3
seconds since per-thread setup in most programs rarely takes
more than a few milliseconds to re-establish things like network
connections.  This is configurable by changing the THREAD_CACHE_TIME
variable.

I hope this allows users to simplify their code by removing the
need for thread pools in many cases.

vm_thread_alive_check1 10.872   0.150
vm_thread_close         1.988   2.027
vm_thread_condvar1      0.751   0.767
vm_thread_condvar2      0.744   0.752
vm_thread_create_join   5.296   2.343
vm_thread_mutex1        1.911   1.892
vm_thread_mutex2        1.902   1.896
vm_thread_mutex3        2.389   2.313
vm_thread_pass          0.271   0.272
vm_thread_pass_flood    0.175   0.179
vm_thread_pipe          0.460   0.436
vm_thread_queue         0.453   0.446
vm_thread_sized_queue   0.547   0.547
vm_thread_sized_queue2  1.417   1.413
vm_thread_sized_queue3  1.410   1.426
vm_thread_sized_queue4  0.787   0.791

Speedup ratio: compare with the result of `trunk' (greater is better)
name    built
vm_thread_alive_check1 72.456
vm_thread_close         0.981
vm_thread_condvar1      0.979
vm_thread_condvar2      0.990
vm_thread_create_join   2.260
vm_thread_mutex1        1.010
vm_thread_mutex2        1.003
vm_thread_mutex3        1.033
vm_thread_pass          0.994
vm_thread_pass_flood    0.980
vm_thread_pipe          1.055
vm_thread_queue         1.016
vm_thread_sized_queue   0.999
vm_thread_sized_queue2  1.003
vm_thread_sized_queue3  0.989
vm_thread_sized_queue4  0.995

[ruby-core:87030] [Feature #14757]
------------------------------------------------------------------------
r63497 | normal | 2018-05-24 05:58:46 +0900 (Thu, 24 May 2018) | 5 lines

benchmark/bm_*erb*: fix for --measure=size/peak in driver.rb

benchmark/memory_wrapper.rb will Kernel#load these
scripts, preventing DATA from being initialized, so
use heredoc instead.
------------------------------------------------------------------------
r63496 | svn | 2018-05-24 00:58:54 +0900 (Thu, 24 May 2018) | 1 line

* 2018-05-24
------------------------------------------------------------------------
r63495 | ngoto | 2018-05-24 00:58:53 +0900 (Thu, 24 May 2018) | 8 lines

ext/pty/pty.c: I_FIND before I_PUSH if possible

* ext/pty/pty.c: Check whether each STREAMS module is already pushed
  or not by using I_FIND ioctl call, before pushing it by using I_PUSH.
  Solved test failure on Solaris. On a Solaris 10 machine, ioctl I_PUSH
  "ldterm" twice was the cause of duplicated "\r".
  [Bug #14786] [ruby-dev:50552]

------------------------------------------------------------------------
r63494 | ko1 | 2018-05-23 15:56:08 +0900 (Wed, 23 May 2018) | 19 lines

remove VM_ENV_DATA_INDEX_ENV_PROC.

* vm_core.h (VM_ENV_DATA_INDEX_ENV_PROC): ep[VM_ENV_DATA_INDEX_ENV_PROC] is
  allocated to mark a Proc which is created from iseq block.
  However, `lep[0]` keeps Proc object itself as a block handler (Proc).
  So we don't need to keep it.

* vm_core.h (VM_ENV_PROCVAL): ditto.

* vm.c (vm_make_env_each): do not need to keep blockprocval as special value.

* vm.c (vm_block_handler_escape): simply return Proc value.

* proc.c (proc_new):  we don't need to check Env because a Proc type block
  handler is a Proc object itself.
  [Bug #14782]

* test/ruby/test_proc.rb: add a test for [Bug #14782]

------------------------------------------------------------------------
r63493 | normal | 2018-05-23 14:51:43 +0900 (Wed, 23 May 2018) | 3 lines

internal.h: export ruby_sized_* for systems w/o malloc_usable_size

[ruby-core:87232]
------------------------------------------------------------------------
r63492 | k0kubun | 2018-05-23 00:48:58 +0900 (Wed, 23 May 2018) | 5 lines

test_jit.rb: propagate suspicious stderr

of child ruby process to parent stderr using `Kernel#warn`.

This fixes a warning in {set,get}classvariable as well.
------------------------------------------------------------------------
r63491 | svn | 2018-05-23 00:39:35 +0900 (Wed, 23 May 2018) | 1 line

* 2018-05-23
------------------------------------------------------------------------
r63490 | k0kubun | 2018-05-23 00:39:34 +0900 (Wed, 23 May 2018) | 1 line

mjit.c: show error message on remove failure
------------------------------------------------------------------------
r63489 | usa | 2018-05-22 21:24:43 +0900 (Tue, 22 May 2018) | 2 lines

rename temporary dummy target

------------------------------------------------------------------------
r63488 | naruse | 2018-05-22 16:31:36 +0900 (Tue, 22 May 2018) | 4 lines

export rb_hash_bulk_insert

msgpack-ruby requests this function public because they want to
create a hash with bulk key value pairs.
------------------------------------------------------------------------
r63487 | normal | 2018-05-22 10:58:47 +0900 (Tue, 22 May 2018) | 4 lines

string.c: MAYBE_UNUSED to suppress warnings for `old`

Building with HAVE_MALLOC_USABLE_SIZE currently makes
SIZED_REALLOC_N ignore the old size arg.
------------------------------------------------------------------------
r63486 | normal | 2018-05-22 10:42:21 +0900 (Tue, 22 May 2018) | 3 lines

gc.c: use RUBY_DEFAULT_FREE instead of open-coded constant

Improves readability and makes future changes easier
------------------------------------------------------------------------
r63485 | normal | 2018-05-22 10:13:08 +0900 (Tue, 22 May 2018) | 4 lines

string.c: size hints for free and realloc calls

Another part of the plan to reduce dependencies on malloc_usable_size:
https://bugs.ruby-lang.org/issues/10238
------------------------------------------------------------------------
r63484 | normal | 2018-05-22 09:44:22 +0900 (Tue, 22 May 2018) | 4 lines

parse.y: use ruby_sized_xfree and SIZED_REALLOC_N

Another part of the plan to reduce dependencies on malloc_usable_size
which costs us speed: https://bugs.ruby-lang.org/issues/10238
------------------------------------------------------------------------
r63483 | normal | 2018-05-22 06:40:54 +0900 (Tue, 22 May 2018) | 5 lines

load.c: use ruby_sized_xfree for calloc-ed RArray VALUE

IMHO, this increases readability, too, since it's not
immediately clear that the object is on the malloc heap
and not a regular Ruby object.
------------------------------------------------------------------------
r63482 | svn | 2018-05-22 06:21:25 +0900 (Tue, 22 May 2018) | 1 line

* 2018-05-22
------------------------------------------------------------------------
r63481 | normal | 2018-05-22 06:21:23 +0900 (Tue, 22 May 2018) | 4 lines

array.c: use ruby_sized_free and SIZED_REALLOC_N

Part of the plan to reduce dependencies on malloc_usable_size
which costs us speed: https://bugs.ruby-lang.org/issues/10238
------------------------------------------------------------------------
r63480 | k0kubun | 2018-05-21 23:32:55 +0900 (Mon, 21 May 2018) | 4 lines

mjit.h: skip accessing mjit_opts if JIT-ed

We want to skip checking `mjit_opts.wait` for already JIT-ed case.
Optcarrot is slightly improved like 65.20 fps -> 66.60 fps.
------------------------------------------------------------------------
r63479 | usa | 2018-05-21 21:36:22 +0900 (Mon, 21 May 2018) | 2 lines

mention about `goruby` target in help

------------------------------------------------------------------------
r63478 | usa | 2018-05-21 21:32:40 +0900 (Mon, 21 May 2018) | 2 lines

now can do `make goruby`

------------------------------------------------------------------------
r63477 | nobu | 2018-05-21 21:25:45 +0900 (Mon, 21 May 2018) | 4 lines

ruby.c: localize a variable

* ruby.c (ruby_init_loadpath_safe): moved libdir to the block
  where it is used.
------------------------------------------------------------------------
r63476 | nobu | 2018-05-21 21:24:47 +0900 (Mon, 21 May 2018) | 6 lines

ruby.c: runtime_libruby_path

* ruby.c (runtime_libruby_path): hoisted out platform dependent
  routine to get the loaded runtime library path.
  cygwin_conv_path does path separator and WCHAR to UTF-8
  conversions too.
------------------------------------------------------------------------
r63475 | usa | 2018-05-21 15:20:24 +0900 (Mon, 21 May 2018) | 2 lines

added `f` for 1 byte FizzBuzz because Hexagony has such feature

------------------------------------------------------------------------
r63474 | shyouhei | 2018-05-21 09:41:57 +0900 (Mon, 21 May 2018) | 6 lines

explicit cast to void* required for %p

No automatic type promotion is expected for variadic arguments.
You have to do it by hand.


------------------------------------------------------------------------
r63473 | usa | 2018-05-21 03:36:53 +0900 (Mon, 21 May 2018) | 2 lines

goruby build was broken

------------------------------------------------------------------------
r63472 | usa | 2018-05-21 03:36:42 +0900 (Mon, 21 May 2018) | 2 lines

should propagate V to sub make

------------------------------------------------------------------------
r63471 | usa | 2018-05-21 03:13:08 +0900 (Mon, 21 May 2018) | 2 lines

goruby build was broken

------------------------------------------------------------------------
r63470 | svn | 2018-05-21 03:09:37 +0900 (Mon, 21 May 2018) | 1 line

* 2018-05-21
------------------------------------------------------------------------
r63469 | usa | 2018-05-21 03:09:36 +0900 (Mon, 21 May 2018) | 2 lines

get rid of unused variable warning.

------------------------------------------------------------------------
r63468 | yui-knk | 2018-05-19 12:43:00 +0900 (Sat, 19 May 2018) | 6 lines

iseq.c: Fix segfault when debug is not 0

* iseq.c (get_insn_info_succinct_bitvector): If
  VM_CHECK_MODE is 0, `body->insns_info.positions` is
  freed in `rb_iseq_insns_info_encode_positions`.
  Print `position` only when VM_CHECK_MODE is set.
------------------------------------------------------------------------
r63467 | yui-knk | 2018-05-19 11:47:26 +0900 (Sat, 19 May 2018) | 1 line

vm_core.h: Remove duplicate declaration
------------------------------------------------------------------------
r63466 | svn | 2018-05-19 09:22:40 +0900 (Sat, 19 May 2018) | 1 line

* 2018-05-19
------------------------------------------------------------------------
r63465 | nobu | 2018-05-19 09:22:39 +0900 (Sat, 19 May 2018) | 5 lines

fileutils.rb: split fu_windows?

* lib/fileutils.rb (FileUtils::StreamUtils_#fu_windows?): select
  the method definition for each platforms, and dropped supports
  for deprecated platforms.
------------------------------------------------------------------------
r63464 | normal | 2018-05-18 17:40:16 +0900 (Fri, 18 May 2018) | 9 lines

Revert "gc.c: use monotonic counters for objspace_malloc_increase"

There were major size regressions I failed to notice before in:

	bm_array_sample_100k__6k
	bm_array_sample_100k___10k
	bm_array_sample_100k___50k

This reverts commit r63463 / 14fb10a9ec41c77a91a778ca2f705c1897958afb
------------------------------------------------------------------------
r63463 | normal | 2018-05-18 17:29:28 +0900 (Fri, 18 May 2018) | 16 lines

gc.c: use monotonic counters for objspace_malloc_increase

atomic_sub_nounderflow is expensive and objspace_malloc_increase
was showing up near the top of some `perf` profiles.  The new
implementation allows the compiler to inline and eliminate
some branches from objspace_malloc_increase.

Furthermore, we do not need atomics for oldmalloc_increase

This consistently improves bm_so_count_words benchmark by
around 10% on my hardware.

name	built
so_count_words	1.107

[ruby-core:87096] [Feature #14767]
------------------------------------------------------------------------
r63462 | normal | 2018-05-18 17:01:07 +0900 (Fri, 18 May 2018) | 15 lines

thread.c (rb_wait_for_single_fd): do not leak EINTR on timeout

We must not leak EINTR to users in case a signal hits a
ppoll/select caller right when (or just before) the timeout
expires.  In other words, the timeout should take precedence
over the -1 result from ppoll or select.

We also try one more time in case of EINTR with a zero timeout,
since technically the syscall finished before timing out if
it returns EINTR.

Regression appeared in r62457
("thread.c (update_timespec): use timespec_update_expire",
 commit e6bf0128add103730d8c96727f3ed4dab95088e4)
and is not in any stable release of Ruby.
------------------------------------------------------------------------
r63461 | hsbt | 2018-05-18 10:39:13 +0900 (Fri, 18 May 2018) | 3 lines

Merge RubyGems 2.7.7

  see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html
------------------------------------------------------------------------
r63460 | nobu | 2018-05-18 09:40:06 +0900 (Fri, 18 May 2018) | 1 line

tool: fixed shadowing variables
------------------------------------------------------------------------
r63459 | nobu | 2018-05-18 09:38:00 +0900 (Fri, 18 May 2018) | 1 line

tool: removed unused variables
------------------------------------------------------------------------
r63458 | nobu | 2018-05-18 09:37:59 +0900 (Fri, 18 May 2018) | 4 lines

redmine-backporter.rb: suppress a warning [ci skip]

* tool/redmine-backporter.rb (StringScanner.readline): use `true`
  to suppress a "literal in condition" warning.
------------------------------------------------------------------------
r63457 | nobu | 2018-05-18 09:36:24 +0900 (Fri, 18 May 2018) | 5 lines

parse.y: relax literal in condition warnings

* parse.y (cond0): do not warn literal boolean (true and false) in
  condition expressions, as they are often used as infinite loops,
  deactivated code block, etc.
------------------------------------------------------------------------
r63456 | svn | 2018-05-18 02:11:08 +0900 (Fri, 18 May 2018) | 1 line

* 2018-05-18
------------------------------------------------------------------------
r63455 | k0kubun | 2018-05-18 02:11:07 +0900 (Fri, 18 May 2018) | 9 lines

_mjit_compile_send.erb: disable attr_reader inline

for now, which was committed in r63333.

Currently trunk's JIT seems to have some wrong behaviors, and this is
the most suspicious culprit of them for now. In the future, I may have
a strict test environment to detect the cause, but there's no enough
time to test this until preview2. So let me revert this and see how it
goes after this.
------------------------------------------------------------------------
r63454 | nobu | 2018-05-17 21:36:33 +0900 (Thu, 17 May 2018) | 5 lines

rb_parser_printf declaration

* node.h (rb_parser_printf): delcare as PRINTF_ARGS.

* parse.y (parser_token_value_print): cast to adjust to %c.
------------------------------------------------------------------------
r63453 | nobu | 2018-05-17 19:46:21 +0900 (Thu, 17 May 2018) | 4 lines

range.c: === by cover?

* range.c (range_eqq): switch `Range#===` to use `cover?` instead
  of `include?`.  [Feature #14575]
------------------------------------------------------------------------
r63452 | naruse | 2018-05-17 16:40:01 +0900 (Thu, 17 May 2018) | 16 lines

http_proxy setting should respect both parent domain and subdomain

URI::Generic: Respect no_proxy for both parent domain and
subdomains It is now possible to add just the subdomains for proxy bypass. In
a setting where the main domain needs to go through proxy while the
subdomains don't, it is now possible to just add the subdomains to the
no_proxy list.
The assumption that subdomains and the parent domain should
behave the same wrt no_proxy has been removed.

eg: Adding .example.com in no_proxy would allow example.com
to go through the proxy.

From: Harsimran Singh Maan <maan.harry@gmail.com>
fix https://github.com/ruby/ruby/pull/1748
[Bug #14345]
------------------------------------------------------------------------
r63451 | normal | 2018-05-17 13:20:33 +0900 (Thu, 17 May 2018) | 7 lines

vm_trace: implement postponed_jobs as st_table

st_table allows the use of st_shift to act as an order-preserving
queue while allowing fast lookups to prevent duplicate jobs.

In typical Ruby apps, this table will only have one entry
for gc_finalize_deferred_register.
------------------------------------------------------------------------
r63450 | normal | 2018-05-17 12:48:32 +0900 (Thu, 17 May 2018) | 9 lines

vm_trace: remove rb_postponed_job_t->flags

This field has been taking up space for 5 years and never used.
Save 8kb of memory on x86-64 for now.  If we ever care about
this flag, we'll simply re-add it.

* vm_trace.c (rb_postponed_job_struct): remove flags
  (postponed_job_register): comment out flags assignment
  [ruby-core:87052] [Misc #14764]
------------------------------------------------------------------------
r63449 | normal | 2018-05-17 12:48:27 +0900 (Thu, 17 May 2018) | 1 line

vm_trace.c: spelling fix: PJRR_SUCESS => PJRR_SUCCESS
------------------------------------------------------------------------
r63448 | normal | 2018-05-17 06:54:42 +0900 (Thu, 17 May 2018) | 6 lines

thread: reduce GET_THREAD calls

This allows native_sleep to use less stack (80 -> 64 bytes on
x86-64) for GVL_UNLOCK_BEGIN/END.  For future APIs, we will pass
`ec` or `th` around anyways, so the BLOCKING_REGION change
should be beneficial in the future.
------------------------------------------------------------------------
r63447 | normal | 2018-05-17 05:39:30 +0900 (Thu, 17 May 2018) | 6 lines

gc.c: use ccan/list

This seems to improve the readability of gc.c a small amount
and it doesn't have any measurable performance impact.

[ruby-core:87067] [Misc #14762]
------------------------------------------------------------------------
r63446 | svn | 2018-05-17 03:55:29 +0900 (Thu, 17 May 2018) | 1 line

* 2018-05-17
------------------------------------------------------------------------
r63445 | stomar | 2018-05-17 03:55:28 +0900 (Thu, 17 May 2018) | 4 lines

lib/optparse.rb: improve docs

* lib/optparse.rb: [DOC] simplify shell prompt in examples;
  other minor improvements.
------------------------------------------------------------------------
r63444 | ngoto | 2018-05-16 20:06:30 +0900 (Wed, 16 May 2018) | 6 lines

configure.ac: move the checks of _XOPEN_SOURCE on Solaris

* configure.ac (solaris*): Move the checks of _XOPEN_SOURCE to the
  location before r63443, to cover non-GCC compilers on Solaris.
  This partly reverts r63443.

------------------------------------------------------------------------
r63443 | ngoto | 2018-05-16 13:11:20 +0900 (Wed, 16 May 2018) | 11 lines

configure.ac: move checks of -std=gnu99 and _XOPEN_SOURCE on Solaris

* configure.ac (ansi_options): On Solaris, "-std=gnu99" should be
  appended to CPPFLAGS instead of warnflags and strict_warnflags,
  because the flag affects existance of functions and macros.

* configure.ac (solaris*): Check _XOPEN_SOURCE just after checking
  "-std=gnu99" on Solaris. Because _XOPEN_SOURCE also affects existance
  of many functions and macros, it is good to define it earlier.
  The check is simplified to use AC_TRY_COMPILE with RUBY_WERROR_FLAG.

------------------------------------------------------------------------
r63442 | ngoto | 2018-05-16 12:57:50 +0900 (Wed, 16 May 2018) | 2 lines

configure.ac: revert r63438

------------------------------------------------------------------------
r63441 | nobu | 2018-05-16 10:40:44 +0900 (Wed, 16 May 2018) | 4 lines

iseq body local variables

* compile.c, iseq.c: extract body and param.keyword in iseq as
  local variables.
------------------------------------------------------------------------
r63440 | nobu | 2018-05-16 10:31:28 +0900 (Wed, 16 May 2018) | 4 lines

fileutils.rb: remove code for OS/2 emx

* lib/fileutils.rb (FileUtils#mv): remove code for OS/2 emx, its
  support has been dropped yeas ago.
------------------------------------------------------------------------
r63439 | svn | 2018-05-16 05:48:24 +0900 (Wed, 16 May 2018) | 1 line

* 2018-05-16
------------------------------------------------------------------------
r63438 | ngoto | 2018-05-16 05:48:23 +0900 (Wed, 16 May 2018) | 5 lines

Change logic to check _XOPEN_SOURCE on Solaris

* configure.ac: Change logic to check _XOPEN_SOURCE on Solaris.
  With _XOPEN_SOURCE, "-std=gnu99" may also be added to CPPFLAGS.

------------------------------------------------------------------------
r63437 | ngoto | 2018-05-15 23:31:47 +0900 (Tue, 15 May 2018) | 7 lines

Split TestThread#test_join_limits into peaces

* test/ruby/test_thread.rb (TestThread#test_join_limit_*): Split
  TestThread#test_join_limits for investigating hang-up on Solaris.
  Each method tests only a single limit value.
  [ruby-core:87045] [Bug #14761]

------------------------------------------------------------------------
r63436 | nobu | 2018-05-15 19:51:07 +0900 (Tue, 15 May 2018) | 1 line

signal.c: follow up r63435
------------------------------------------------------------------------
r63435 | normal | 2018-05-15 19:11:32 +0900 (Tue, 15 May 2018) | 6 lines

vm_core.h (rb_execution_context_t): interrupt_mask size to match interrupt_flag

rb_atomic_t is 32-bit on 64-bit platforms (including the popular
x86-64 Linux), so save 4 bytes on this structure.  This doesn't
result in any final size reduction due to padding, yet, but
future changes are possible to shrink rb_execution_context_t
------------------------------------------------------------------------
r63434 | hsbt | 2018-05-15 19:10:33 +0900 (Tue, 15 May 2018) | 3 lines

Added workaround to fileutils for `make btest` without rbconfig.

  Followed up r63430.
------------------------------------------------------------------------
r63433 | nobu | 2018-05-15 17:08:24 +0900 (Tue, 15 May 2018) | 4 lines

configure.ac: maybe with jemalloc

* configure.ac (--with-jemalloc): accept `maybe` (other than `yes`
  and `no`), check for jemalloc and use it if possible.
------------------------------------------------------------------------
r63432 | nobu | 2018-05-15 16:46:55 +0900 (Tue, 15 May 2018) | 5 lines

generic_erb.rb: get rid of fileutils

* tool/generic_erb.rb: get rid of FileUtils.touch, not to depend
  on fileutils.rb which will depend on rbconfig.rb which does not
  exist when creating encdb.h.
------------------------------------------------------------------------
r63431 | nobu | 2018-05-15 16:45:24 +0900 (Tue, 15 May 2018) | 1 line

share :cause variable
------------------------------------------------------------------------
r63430 | hsbt | 2018-05-15 14:53:18 +0900 (Tue, 15 May 2018) | 6 lines

Retry to merge fileutils-1.1.0.

  * Revert "Revert "Merge fileutils-1.1.0.""
    This reverts commit 84bb8e81c25d4d7d6020c3acfbbc36e9064200fa.

  * Added workaround for make mjit-headers
------------------------------------------------------------------------
r63429 | shyouhei | 2018-05-15 13:35:58 +0900 (Tue, 15 May 2018) | 7 lines

-Wno-cast-function-type

GCC 8.1+ introduced this warning in -Weverything.  It does
shed some lights on something, but rather annoying than
useful ATM.  Might be a subject to revert this option in a
future.

------------------------------------------------------------------------
r63428 | mame | 2018-05-15 13:16:08 +0900 (Tue, 15 May 2018) | 10 lines

Revert "Merge fileutils-1.1.0."

This reverts commit 99da3d2570e110d3024039102205f6d64174bf5e.
The change caused the following build failure:

```
.../ruby/lib/fileutils.rb:88:in `require': cannot load such file -- rbconfig (LoadError)
uncommon.mk:987: recipe for target 'encdb.h' failed
make: *** [encdb.h] Error 1
```
------------------------------------------------------------------------
r63427 | normal | 2018-05-15 12:49:21 +0900 (Tue, 15 May 2018) | 14 lines

thread.c: enable ppoll for FreeBSD 11.0 and later

FreeBSD 11.0+ supports ppoll, so we may use it after accounting
for portability differences in how it treats POLLOUT vs POLLHUP
events as mutually exclusive (as documented in the FreeBSD
poll(2) manpage).

For waiting on high-numbered single FDs, this should put
FreeBSD on equal footing with Linux and should allow cheaper
FD readiness checking with sleepy GC in the future.

* thread.c (USE_POLL, POLLERR_SET): define for FreeBSD 11.0+
  (rb_wait_for_single_fd): return all requested events on POLLERR_SET
  io.c (USE_POLL): define for FreeBSD 11.0+
------------------------------------------------------------------------
r63426 | normal | 2018-05-15 10:29:14 +0900 (Tue, 15 May 2018) | 3 lines

-test-/wait_for_single_fd: fix -Wformat-security warning

Oops
------------------------------------------------------------------------
r63425 | hsbt | 2018-05-15 10:22:36 +0900 (Tue, 15 May 2018) | 4 lines

Merge fileutils-1.1.0.

  This version was migrated JRuby paches.
  https://github.com/ruby/fileutils/pull/18
------------------------------------------------------------------------
r63424 | svn | 2018-05-15 09:08:34 +0900 (Tue, 15 May 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63423 | normal | 2018-05-15 09:08:33 +0900 (Tue, 15 May 2018) | 5 lines

test_io_wait_uncommon: new test for uncommon file types

This should make portability problems more apparent when we try
using ppoll with rb_wait_for_single_fd on FreeBSD or other
non-Linux platforms.
------------------------------------------------------------------------
r63422 | normal | 2018-05-15 08:51:39 +0900 (Tue, 15 May 2018) | 3 lines

test_wait_for_single_fd.rb: remove with_pipe helper

IO.pipe natively accepts a block, nowadays.
------------------------------------------------------------------------
r63421 | normal | 2018-05-15 08:51:35 +0900 (Tue, 15 May 2018) | 8 lines

test_wait_for_single_fd: ensure this works with kqueue

Regardless of future features, this needs to work with
kqueue descriptors across platforms.

Today this will be useful for 3rd-party libraries using
kqueue.  In the future, Ruby may use kqueue natively
and we shall ensure we can wait on it.
------------------------------------------------------------------------
r63420 | normal | 2018-05-15 08:42:10 +0900 (Tue, 15 May 2018) | 1 line

test_wait_for_single_fd.rb: relax test for newer FreeBSD
------------------------------------------------------------------------
r63419 | svn | 2018-05-15 08:40:57 +0900 (Tue, 15 May 2018) | 1 line

* 2018-05-15
------------------------------------------------------------------------
r63418 | normal | 2018-05-15 08:40:55 +0900 (Tue, 15 May 2018) | 13 lines

io.c: cleanup copy_stream wait-for-single-fd cases

Avoid paying unnecessary setup and teardown cost for rb_fdset_t
on platforms (Linux) with good poll() support.  This simplifies
code makes future changes (perhaps for sleepy GC) easier.

* io.c (struct copy_stream_struct): remove rb_fdset_t fds
  (nogvl_wait_for_single_fd): implement with select for non-poll case
  (maygvl_copy_stream_wait_read): remove duplicate definition
  (nogvl_copy_stream_wait_write): remove #ifdef
  (copy_stream_body): remove rb_fd_set calls
  (copy_stream_finalize): remove rb_fd_term call
  (rb_io_s_copy_stream): remove rb_fd_init
------------------------------------------------------------------------
r63417 | nobu | 2018-05-14 17:33:14 +0900 (Mon, 14 May 2018) | 4 lines

error.c: check redefined backtrace result

* error.c (rb_get_backtrace): check the result of `backtrace` even
  if the method is redefined.  [ruby-core:87013] [Bug #14756]
------------------------------------------------------------------------
r63416 | hsbt | 2018-05-14 15:39:40 +0900 (Mon, 14 May 2018) | 1 line

Update test-unit 3.2.8 for bundled gems.
------------------------------------------------------------------------
r63415 | svn | 2018-05-14 12:30:05 +0900 (Mon, 14 May 2018) | 1 line

* 2018-05-14
------------------------------------------------------------------------
r63414 | shyouhei | 2018-05-14 12:30:03 +0900 (Mon, 14 May 2018) | 4 lines

RSTRING_PTR is not guaranteed to be char*-aligned

This commit eliminates (char **)RSTRING_PTR(...) like usages.

------------------------------------------------------------------------
r63413 | yui-knk | 2018-05-13 21:31:38 +0900 (Sun, 13 May 2018) | 7 lines

compile.c: Fix segfault when VM_INSN_INFO_TABLE_IMPL is not 2

* compile.c (ibf_dump_iseq_each): Fix a range of a conditional.
  `positions` is only used when VM_INSN_INFO_TABLE_IMPL is 2.
  And always `dump_body` is expected to be initialized by
  `iseq->body`. For example, `dump_body->insns_info.size` is
  used in `ibf_dump_insns_info_positions`.
------------------------------------------------------------------------
r63412 | svn | 2018-05-13 10:18:34 +0900 (Sun, 13 May 2018) | 1 line

* 2018-05-13
------------------------------------------------------------------------
r63411 | nobu | 2018-05-13 10:18:33 +0900 (Sun, 13 May 2018) | 5 lines

optparse.rb: Remove redundant `.freeze`

[Fix GH-1873]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r63410 | nobu | 2018-05-12 23:41:24 +0900 (Sat, 12 May 2018) | 7 lines

optparse.rb: [DOC] about into: option

* lib/optparse.rb: add documentation for "into" option of #parse
  and family, which stores options to a Hash.
  [ruby-core:87004] [Misc #14753]

From: pocke (Masataka Kuwabara) <kuwabara@pocke.me>
------------------------------------------------------------------------
r63409 | nobu | 2018-05-12 18:13:45 +0900 (Sat, 12 May 2018) | 4 lines

irb.rb: update `_`

* lib/irb.rb (IRB::Irb#eval_input): update `_` after exception.
  [ruby-core:86989] [Bug #14749]
------------------------------------------------------------------------
r63408 | nobu | 2018-05-12 18:09:23 +0900 (Sat, 12 May 2018) | 4 lines

fix TestInputMethod

* test/irb/test_context.rb (TestInputMethod#initialize): fix typos
  and increment `line_no` only when not reaching the end.
------------------------------------------------------------------------
r63407 | kou | 2018-05-12 18:06:00 +0900 (Sat, 12 May 2018) | 8 lines

rss: Add option Hash support to RSS::Parser.parse

Available options:

  * :validate
  * :ignore_unknown_element
  * :parser_class

------------------------------------------------------------------------
r63406 | rhe | 2018-05-12 16:33:53 +0900 (Sat, 12 May 2018) | 15 lines

openssl: merge changes in v2.1.1

Commits in upstream repository since v2.1.0 can be found at:

	https://github.com/ruby/openssl/compare/v2.1.0...v2.1.1

----------------------------------------------------------------
Kazuki Yamaguchi (7):
      test/utils: disable Thread's report_on_exception in start_server
      cipher: validate iterations argument for Cipher#pkcs5_keyivgen
      extconf.rb: fix build with LibreSSL 2.7.0
      test/test_pkey_rsa: fix test failure with OpenSSL 1.1.1
      test/test_ssl_session: set client protocol version explicitly
      Ruby/OpenSSL 2.0.8
      Ruby/OpenSSL 2.1.1
------------------------------------------------------------------------
r63405 | nobu | 2018-05-12 10:26:39 +0900 (Sat, 12 May 2018) | 5 lines

io.c: fix typo and phrase [ci skip]

[Fix GH-1872]

From: Leon M. George <leon@georgemail.eu>
------------------------------------------------------------------------
r63404 | nobu | 2018-05-12 10:24:18 +0900 (Sat, 12 May 2018) | 4 lines

iseq.c: iseq body local variables

* iseq.c: extract body and param.keyword in iseq as local
  variables.
------------------------------------------------------------------------
r63403 | nobu | 2018-05-12 10:24:16 +0900 (Sat, 12 May 2018) | 4 lines

iseq.c: refactoring rb_iseq_free

* iseq.c (rb_iseq_free): call mjit_free_iseq only if iseq->body is
  not NULL too, as the function accesses the body.
------------------------------------------------------------------------
r63402 | stomar | 2018-05-12 05:07:32 +0900 (Sat, 12 May 2018) | 3 lines

lib/securerandom.rb: improve docs

* lib/securerandom.rb: [DOC] drop unnecessary `p' from code examples.
------------------------------------------------------------------------
r63401 | ngoto | 2018-05-12 02:21:37 +0900 (Sat, 12 May 2018) | 7 lines

configure.ac: remove ineffective check on Solaris with GCC

* configure.ac (solaris): Remove ineffective check for -std=iso9899:1999
  on Solaris with GCC. The "-std=iso9899:1999" was replaced by
  "-std=gnu99" by the commit r54895. The check is no longer effective
  after that, and two years have passed without error reports.

------------------------------------------------------------------------
r63400 | ngoto | 2018-05-12 01:47:38 +0900 (Sat, 12 May 2018) | 8 lines

transform_mjit_header.rb: workaround for Solaris 10 with old GCC

* tool/transform_mjit_header.rb (MJITHeader.conflicting_types?):
  Add workaround for Solaris 10 with old GCC (4.6.2), that is
  essentially the same as for AIX (commit r62326), but probably
  due to different GCC versions, different error message is shown.
  [Bug #14751] [ruby-dev:50541]

------------------------------------------------------------------------
r63399 | svn | 2018-05-12 00:46:21 +0900 (Sat, 12 May 2018) | 1 line

* 2018-05-12
------------------------------------------------------------------------
r63398 | ngoto | 2018-05-12 00:46:21 +0900 (Sat, 12 May 2018) | 7 lines

mkmf.rb: set cppflags

* ext/mkmf.rb (configuration): set the default cppflags, which is
  referred from the default CPPFLAGS, for extension libraries.
  This fixes build failure of ext/zlib on Solaris 10.
  [Bug #14746] [ruby-dev:50539]

------------------------------------------------------------------------
r63397 | nobu | 2018-05-11 22:01:36 +0900 (Fri, 11 May 2018) | 5 lines

fix potential memory leaks

* parse.y (primary, new_args_tail, local_tbl): keep the order;
  allocate an empty imemo first then xmalloc, to get rid of
  potential memory leak when allocation imemo failed.
------------------------------------------------------------------------
r63396 | shugo | 2018-05-11 21:39:23 +0900 (Fri, 11 May 2018) | 4 lines

net/imap: Fix ArgumentError in send_string_data

Thanks to ShockwaveNN (Pavel Lobashov) for reporting the bug.
[ruby-core:86990] [Bug #14750]
------------------------------------------------------------------------
r63395 | svn | 2018-05-11 21:12:59 +0900 (Fri, 11 May 2018) | 1 line

* 2018-05-11
------------------------------------------------------------------------
r63394 | kazu | 2018-05-11 21:12:57 +0900 (Fri, 11 May 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63393 | yui-knk | 2018-05-10 18:49:55 +0900 (Thu, 10 May 2018) | 1 line

node.c: Fix format and example of NODE_OPCALL
------------------------------------------------------------------------
r63392 | normal | 2018-05-10 17:54:26 +0900 (Thu, 10 May 2018) | 47 lines

variable.c: fix multiple autoload with identical file (again)

We need to ensure autoload declarations pointing to the same
feature (aka "file") can wait on each other to avoid deadlock
situations.

So, reorganize autoload data structures to maintain a
feature => autoload_data_i mapping, and have module constant
tables point to the new autoload_const struct instead of
directly to autoload_data_i.  This allows multiple
autoload_const structs to refer to the SAME autoload_data_i
struct, and with it, the on-stack autoload_state.waitq.

The end result is different constants can share the same waitq
(tied to the feature name), and not deadlock each other during
loading.

Thanks to Eugene Kenny for the bug report and reproducible test case.

Reported-by: Eugene Kenny <elkenny@gmail.com>

* variable.c (autoload_featuremap): new global
  (struct autoload_const): new per-const struct
  (struct autoload_state): reference autoload_const instead of autoload_data_i
  (struct autoload_data_i): remove per-const
  (autoload_i_mark): delete from autoload_featuremap if unreferenced
  (autoload_c_mark): new dmark callback
  (autoload_c_free): new dfree callback
  (autoload_c_memsize): new memsize callback
  (autoload_const_type): new data type
  (get_autoload_data): set autoload_const as well
  (rb_autoload_str): use new data structures
  (autoload_delete): cleanup from autoload_featuremap
  (check_autoload_required): adjust for new internals
  (rb_autoloading_value): ditto
  (struct autoload_const_set_args): remove, redundant with autoload_const
  (const_tbl_update): adjust for new internals
  (autoload_const_set): ditto
  (autoload_require): ditto
  (autoload_reset): ditto
  (rb_autoload_load): ditto
  (rb_const_set): ditto
  (current_autoload_data): ditto
  (set_const_visibility): ditto
* test/ruby/test_autoload.rb (test_autoload_same_file): new test
  (test_no_leak): new test
  [ruby-core:86935] [Bug #14742]
------------------------------------------------------------------------
r63391 | yui-knk | 2018-05-10 15:34:20 +0900 (Thu, 10 May 2018) | 21 lines

parse.y: Fix locations of NODE_NIL in endless ranges.

* parse.y: Fix to start with the end of dots.

  e.g. The locations of the NODE_NIL is fixed:

  ```
  1..
  ```

  * Before

  ```
  NODE_NIL (line: 1, location: (1,0)-(1,3))
  ```

  * After

  ```
  NODE_NIL (line: 1, location: (1,3)-(1,3))
  ```
------------------------------------------------------------------------
r63390 | normal | 2018-05-10 14:10:13 +0900 (Thu, 10 May 2018) | 5 lines

revert r63387 and r63389 for now

I can't reproduce the problem on my 32-bit machine, and I have
connectivity problems to my 64-bit systems at the moment.
Will revisit in a few hours hopefully.
------------------------------------------------------------------------
r63389 | normal | 2018-05-10 13:18:28 +0900 (Thu, 10 May 2018) | 6 lines

variable.c: fix autoload object lifetimes and leak

We must not call normal Hash methods inside GC free callback,
either, however identity hash may be used.

[ruby-core:86935] [Bug #14742]
------------------------------------------------------------------------
r63388 | shyouhei | 2018-05-10 11:54:04 +0900 (Thu, 10 May 2018) | 5 lines

RSTRING_PTR is not guaranteed to be char*-aligned

We need to ensure aligned memory access by allocating
another memory region.

------------------------------------------------------------------------
r63387 | normal | 2018-05-10 10:19:20 +0900 (Thu, 10 May 2018) | 46 lines

variable.c: fix multiple autoload with identical file

We need to ensure autoload declarations pointing to the same
feature (aka "file") can wait on each other to avoid deadlock
situations.

So, reorganize autoload data structures to maintain a
feature => autoload_data_i mapping, and have module constant
tables point to the new autoload_const struct instead of
directly to autoload_data_i.  This allows multiple
autoload_const structs to refer to the SAME autoload_data_i
struct, and with it, the on-stack autoload_state.waitq.

The end result is different constants can share the same waitq
(tied to the feature name), and not deadlock each other during
loading.

Thanks to Eugene Kenny for the bug report and reproducible test case.

Reported-by: Eugene Kenny <elkenny@gmail.com>

* variable.c (autoload_featuremap): new global
  (struct autoload_const): new per-const struct
  (struct autoload_state): reference autoload_const instead of autoload_data_i
  (struct autoload_data_i): remove per-const
  (autoload_i_mark): delete from autoload_featuremap if unreferenced
  (autoload_c_mark): new dmark callback
  (autoload_c_free): new dfree callback
  (autoload_c_memsize): new memsize callback
  (autoload_const_type): new data type
  (get_autoload_data): set autoload_const as well
  (rb_autoload_str): use new data structures
  (autoload_delete): cleanup from autoload_featuremap
  (check_autoload_required): adjust for new internals
  (rb_autoloading_value): ditto
  (struct autoload_const_set_args): remove, redundant with autoload_const
  (const_tbl_update): adjust for new internals
  (autoload_const_set): ditto
  (autoload_require): ditto
  (autoload_reset): ditto
  (rb_autoload_load): ditto
  (rb_const_set): ditto
  (current_autoload_data): ditto
  (set_const_visibility): ditto
* test/ruby/test_autoload.rb (test_autoload_same_file): new test
  [ruby-core:86935] [Bug #14742]
------------------------------------------------------------------------
r63386 | yui-knk | 2018-05-10 09:23:23 +0900 (Thu, 10 May 2018) | 1 line

node.c: Fix typos
------------------------------------------------------------------------
r63385 | nobu | 2018-05-10 02:40:04 +0900 (Thu, 10 May 2018) | 10 lines

fix potential memory leaks

* gc.c (rb_alloc_tmp_buffer_with_count): keep the order; allocate
  an empty imemo first then xmalloc, to get rid of potential
  memory leak when allocation imemo failed.

* parse.y (rb_parser_malloc, rb_parser_calloc, rb_parser_realloc):
  ditto.

* process.c (rb_execarg_allocate_dup2_tmpbuf): ditto.
------------------------------------------------------------------------
r63384 | k0kubun | 2018-05-10 02:19:23 +0900 (Thu, 10 May 2018) | 5 lines

_mjit_compile_pc_and_sp: re-commit r63360

reverting r63379 (revert of r63360).

The cause of error seems to be r63350. See r63382.
------------------------------------------------------------------------
r63383 | nobu | 2018-05-10 02:17:06 +0900 (Thu, 10 May 2018) | 4 lines

compile.c: suppress a warning

* compile.c (iseq_peephole_optimize): initialize dniobj first, to
  suppress a false warning by gcc 8.1.0.
------------------------------------------------------------------------
r63382 | k0kubun | 2018-05-10 02:11:07 +0900 (Thu, 10 May 2018) | 6 lines

_mjit_compile_send.erb: revert r63350

Revert "_mjit_compile_send.erb: inline recursive call"

I reverted r63360 in r63379, but the errors were reproductive from
r63350. So I need to revert this.
------------------------------------------------------------------------
r63381 | svn | 2018-05-10 01:12:42 +0900 (Thu, 10 May 2018) | 1 line

* 2018-05-10
------------------------------------------------------------------------
r63380 | nobu | 2018-05-10 01:12:41 +0900 (Thu, 10 May 2018) | 4 lines

iseq.h: fix argument order

* iseq.h (ISEQ_ORIGINAL_ISEQ_ALLOC): the order of ruby_xmalloc2
  arguments is `count` and `element size`.
------------------------------------------------------------------------
r63379 | k0kubun | 2018-05-09 22:09:01 +0900 (Wed, 09 May 2018) | 8 lines

_mjit_compile_pc_and_sp.erb: revert r63360

Revert "_mjit_compile_pc_and_sp.erb: make sure no uninitialized"

This triggered some `NoMethodError`s which seem to be caused by the
commit like: https://travis-ci.org/k0kubun/mjit-test/builds/376416934

I'll add tests and fix it later...
------------------------------------------------------------------------
r63378 | kazu | 2018-05-09 21:51:14 +0900 (Wed, 09 May 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63377 | hsbt | 2018-05-09 20:44:30 +0900 (Wed, 09 May 2018) | 1 line

Use hard-coded file list instead of Dir.glob.
------------------------------------------------------------------------
r63376 | hsbt | 2018-05-09 20:44:06 +0900 (Wed, 09 May 2018) | 3 lines

Revert "Use hard-coded vesion number for CI broken."

This reverts commit f5fef0a80d597f40c2d1a8cc8079bf190039fd6f.
------------------------------------------------------------------------
r63375 | shyouhei | 2018-05-09 18:53:19 +0900 (Wed, 09 May 2018) | 6 lines

align jmp_buf to VALUE

This ec->machine.regs is marked by GC. However jmp_buf is
not defined by us.  There are chances of unaligned access.
We should force it VALUE-aligned.

------------------------------------------------------------------------
r63374 | hsbt | 2018-05-09 18:35:12 +0900 (Wed, 09 May 2018) | 3 lines

Use hard-coded vesion number for CI broken.

  https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20180509T063003Z.fail.html.gz
------------------------------------------------------------------------
r63373 | shyouhei | 2018-05-09 16:46:11 +0900 (Wed, 09 May 2018) | 6 lines

RSTRING_PTR is not guaranteed to be VALUE-aligned

Don't abuse struct RString to hold arbitrary memory region.
Thanks to @mame we now have rb_imemo_alloc_auto_free_pointer
so use it instead.

------------------------------------------------------------------------
r63372 | mame | 2018-05-09 16:11:59 +0900 (Wed, 09 May 2018) | 1 line

Rename imemo_alloc with imemo_tmpbuf
------------------------------------------------------------------------
r63371 | mame | 2018-05-09 16:08:53 +0900 (Wed, 09 May 2018) | 8 lines

gc.c (rb_imemo_alloc_new): split for each purpose

imemo_alloc is used for three purposes: auto-free pointer (alternative
of alloca), alloc_tmp_buffer, and heap allocation for bison.
To make it clear, this change introduces three functions:
rb_imemo_alloc_auto_free_pointer,
rb_imemo_alloc_auto_free_maybe_mark_buffer, and
rb_imemo_alloc_parser_heap.
------------------------------------------------------------------------
r63370 | shyouhei | 2018-05-09 15:55:11 +0900 (Wed, 09 May 2018) | 7 lines

type func(); is different from type func(void);

If a function declarator includes no parameter list, that doesn't
mean the function takes zero parameter. rb_ast_new here does take
zero parameter, so it should be explicitly prototypes as (void).


------------------------------------------------------------------------
r63369 | mame | 2018-05-09 15:12:17 +0900 (Wed, 09 May 2018) | 5 lines

gc.c (rb_imemo_alloc_new): improve the API interface

rb_imemo_alloc_new returns rb_imemo_alloc_t*, but took VALUEs, which is
inconsistent.  To make the intention clear, it now takes only a pointer
to the buffer.
------------------------------------------------------------------------
r63368 | shyouhei | 2018-05-09 14:42:06 +0900 (Wed, 09 May 2018) | 5 lines

RSTRING_PTR is not guaranteed to be VALUE-aligned (retry)

Don't abuse struct RString to hold arbitrary memory region.
Raw pointer should just suffice.

------------------------------------------------------------------------
r63367 | hsbt | 2018-05-09 13:45:59 +0900 (Wed, 09 May 2018) | 1 line

Fixed file structure for csv.gemspec.
------------------------------------------------------------------------
r63366 | svn | 2018-05-09 13:39:18 +0900 (Wed, 09 May 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63365 | svn | 2018-05-09 13:39:17 +0900 (Wed, 09 May 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r63364 | hsbt | 2018-05-09 13:39:16 +0900 (Wed, 09 May 2018) | 1 line

Merge csv-1.0.2 from upstream.
------------------------------------------------------------------------
r63363 | shyouhei | 2018-05-09 11:42:22 +0900 (Wed, 09 May 2018) | 2 lines

revert r63362 due to test failure. Sorry!

------------------------------------------------------------------------
r63362 | shyouhei | 2018-05-09 11:36:34 +0900 (Wed, 09 May 2018) | 5 lines

RSTRING_PTR is not guaranteed to be VALUE-aligned

Don't abuse struct RString to hold arbitrary memory region.
use rb_alloc_tmp_buffer for that purpose.

------------------------------------------------------------------------
r63361 | svn | 2018-05-09 00:06:12 +0900 (Wed, 09 May 2018) | 1 line

* 2018-05-09
------------------------------------------------------------------------
r63360 | k0kubun | 2018-05-09 00:06:11 +0900 (Wed, 09 May 2018) | 43 lines

_mjit_compile_pc_and_sp.erb: make sure no uninitialized

area on VM stack to prevent SEGV on GC. GC may mark every value in VM
stack.

Unfortunately I couldn't write a test for it... So let me explain the
situation.

SEGV example:
https://gist.github.com/k0kubun/c7cea2b5761ffdff29ec79ea1a8f7f91

```
$ ruby --dump=insns -e 'def oct(num, len); "%0#{len}o" % num; end'
== disasm: #<ISeq:oct@-e:1 (1,0)-(1,41)> (catch: FALSE)
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] num@0<Arg> [ 1] len@1<Arg>
0000 putobject                    "%0"                                (   1)[LiCa]
0002 getlocal_WC_0                len@1
0004 dup
0005 checktype                    T_STRING
0007 branchif                     14
0009 dup
0010 opt_send_without_block       <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
0013 tostring
0014 putobject                    "o"
0016 concatstrings                3
0018 getlocal_WC_0                num@0
0020 opt_mod                      <callinfo!mid:%, argc:1, ARGS_SIMPLE>, <callcache>
0023 leave                        [Re]
```

Prior to this commit, after arguments are pushed on 0010, stacks were:
VM stack: [uninitialized, uninitialized, len]
JIT stack: ["%0", len, len]

And then, when GC is invoked on 0016, VM stack will be [uninitialized, uninitialized]
and those uninitialized values will be marked by GC.

With this commit, after arguments are pushed on 0010, stacks will be:
VM stack: [len]
JIT stack: ["%0", len, len]

And VM stack will be [] on 0016.
------------------------------------------------------------------------
r63359 | nobu | 2018-05-08 19:58:56 +0900 (Tue, 08 May 2018) | 5 lines

vm_eval.c: eval_string_protect wrapper

* vm_eval.c (eval_string_protect): cast data instead of the
  function pointer, to suppress "cast between incompatible
  function types" warning by gcc 8.1.
------------------------------------------------------------------------
r63358 | shyouhei | 2018-05-08 18:09:12 +0900 (Tue, 08 May 2018) | 4 lines

rb_ary_dig, rb_hash_dig: nobody is using them outside.

mark them static.

------------------------------------------------------------------------
r63357 | ko1 | 2018-05-08 15:53:54 +0900 (Tue, 08 May 2018) | 4 lines

fix type mismatch.

* cont.c (fiber_context_create): `func` should accept variable args.

------------------------------------------------------------------------
r63356 | hsbt | 2018-05-08 11:07:53 +0900 (Tue, 08 May 2018) | 1 line

Merge rdoc-6.0.4 from upstream.
------------------------------------------------------------------------
r63355 | nobu | 2018-05-08 09:01:16 +0900 (Tue, 08 May 2018) | 1 line

cont.c: host out context setup
------------------------------------------------------------------------
r63354 | kazu | 2018-05-08 09:00:13 +0900 (Tue, 08 May 2018) | 1 line

Remove unreachable break
------------------------------------------------------------------------
r63353 | kazu | 2018-05-08 09:00:12 +0900 (Tue, 08 May 2018) | 1 line

Modify spaces [ci skip]
------------------------------------------------------------------------
r63352 | nobu | 2018-05-08 08:52:48 +0900 (Tue, 08 May 2018) | 1 line

cont.c: wrapper function
------------------------------------------------------------------------
r63351 | nobu | 2018-05-08 08:14:07 +0900 (Tue, 08 May 2018) | 4 lines

cont.c: refined error message

* cont.c (fiber_machine_stack_alloc): refined the error message on
  failure at setting a guard page.
------------------------------------------------------------------------
r63350 | k0kubun | 2018-05-08 01:16:59 +0900 (Tue, 08 May 2018) | 50 lines

_mjit_compile_send.erb: inline recursive call

mjit_compile.c: propagate funcname to compile_insn

test_jit.rb: add test covering this behavior

* Benchmark

```
require 'benchmark_driver'

Benchmark.driver(runner: :time, repeat_count: 4) do |x|
  x.prelude %{
    def fib(x)
      return x if x == 0 || x == 1
      fib(x-1) + fib(x-2)
    end
  }
  x.report 'fib(40)'
  x.loop_count 1

  x.rbenv(
    'before,--jit',
    'before',
    'after,--jit',
    'after',
  )
  x.verbose
end
```

```
before,--jit: ruby 2.6.0dev (2018-05-08 trunk 63349) +JIT [x86_64-linux]
before: ruby 2.6.0dev (2018-05-08 trunk 63349) [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-05-08 trunk 63349) +JIT [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline recursive call
after: ruby 2.6.0dev (2018-05-08 trunk 63349) [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline recursive call
Calculating -------------------------------------
                     before,--jit      before  after,--jit       after
             fib(40)        2.886       8.685        2.562       8.800 s -       1.000 times

Comparison:
                          fib(40)
         after,--jit:         2.6 s
        before,--jit:         2.9 s - 1.13x  slower
              before:         8.7 s - 3.39x  slower
               after:         8.8 s - 3.44x  slower

```
------------------------------------------------------------------------
r63349 | kazu | 2018-05-08 00:08:46 +0900 (Tue, 08 May 2018) | 3 lines

Remove needless require [ci skip]

already require on top
------------------------------------------------------------------------
r63348 | svn | 2018-05-08 00:07:52 +0900 (Tue, 08 May 2018) | 1 line

* 2018-05-08
------------------------------------------------------------------------
r63347 | kazu | 2018-05-08 00:07:51 +0900 (Tue, 08 May 2018) | 1 line

Use `&.` instead of modifier if and remove needless closed?
------------------------------------------------------------------------
r63346 | kazu | 2018-05-07 23:44:55 +0900 (Mon, 07 May 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r63345 | svn | 2018-05-07 15:59:55 +0900 (Mon, 07 May 2018) | 1 line

* 2018-05-07
------------------------------------------------------------------------
r63344 | nobu | 2018-05-07 15:59:55 +0900 (Mon, 07 May 2018) | 5 lines

cont.c: machine stack cache condition

* cont.c (fiber_store, rb_fiber_terminate): separate the condition
  to cache machine stacks, which is not directly restricted to the
  platforms, and may be used on Windows too in the future.
------------------------------------------------------------------------
r63343 | svn | 2018-05-06 18:53:35 +0900 (Sun, 06 May 2018) | 1 line

* 2018-05-06
------------------------------------------------------------------------
r63342 | nobu | 2018-05-06 18:53:33 +0900 (Sun, 06 May 2018) | 24 lines

optparse: Suppress warnings

Ruby warns "instance variable `@version` not initialized" for optparse when it receives `--version` option.

`test.rb`

```ruby
require 'optparse'
Version = '1'
OptionParser.new.parse(ARGV)
```

```
$ ruby -w test.rb --version
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1168: warning: instance variable @version not initialized
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1175: warning: instance variable @release not initialized
test 1
```

This change will suppress the warnings.

[Fix GH-1871]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r63341 | nobu | 2018-05-05 12:12:20 +0900 (Sat, 05 May 2018) | 7 lines

securerandom.rb: [DOC] require in examples

* lib/securerandom.rb: added `require 'securerandom'` to each
  example, to state these methods are defined in this library and
  require it explicitly.  [ruby-core:85933] [Bug #14576]

[ci skip]
------------------------------------------------------------------------
r63340 | shyouhei | 2018-05-05 00:20:17 +0900 (Sat, 05 May 2018) | 2 lines

forgot to add INT2FIX (sorry!)

------------------------------------------------------------------------
r63339 | shyouhei | 2018-05-05 00:18:42 +0900 (Sat, 05 May 2018) | 7 lines

passing rb_thread_sleep to rb_protect is IMHO dangerous

rb_thread_sleep's argument is int, while rb_protect expects the function
to take VALUE. Depending on ABI this could be a problem.

We should wrap rb_thread_sleep here.

------------------------------------------------------------------------
r63338 | svn | 2018-05-05 00:03:37 +0900 (Sat, 05 May 2018) | 1 line

* 2018-05-05
------------------------------------------------------------------------
r63337 | shyouhei | 2018-05-05 00:03:37 +0900 (Sat, 05 May 2018) | 5 lines

nobody is using the return value of rb_io_fptr_finalize

However this function is listed in ruby/io.h.  We cannot but
define a new, void-returning variant to use instead.

------------------------------------------------------------------------
r63336 | kazu | 2018-05-04 22:30:25 +0900 (Fri, 04 May 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63335 | svn | 2018-05-04 15:12:14 +0900 (Fri, 04 May 2018) | 1 line

* 2018-05-04
------------------------------------------------------------------------
r63334 | nobu | 2018-05-04 15:12:12 +0900 (Fri, 04 May 2018) | 5 lines

object.c: raise on long invalid float string

* object.c (rb_cstr_to_dbl_raise): check long invalid float
  string more precisely when truncating insignificant part.
  [ruby-core:86800] [Bug #14729]
------------------------------------------------------------------------
r63333 | k0kubun | 2018-05-03 17:47:32 +0900 (Thu, 03 May 2018) | 14 lines

_mjit_compile_send.erb: retry inlining attr_reader

This reverts r63249 (revert r63212) and fixes a bug in it. The test to
prevent the bug is added as well.

vm_insnhelper.c: add `index` argument to vm_getivar. The argument is
created so that MJIT can pass the value of `cc->aux.index` on compilation
time.  The cache invalidation in _mjit_compile_send_guard.erb is only
working for the cache value on compilation time.
Note: As `index` is always passed as constant and it's force-inlined,
the performance of `vm_getivar` won't be degraded in VM.

_mjit_compile_send_guard.erb: New. Used to invalidate inlined values of cc.
common.mk: update dependencies for _mjit_compile_send_guard.erb
------------------------------------------------------------------------
r63332 | k0kubun | 2018-05-03 16:09:51 +0900 (Thu, 03 May 2018) | 5 lines

mjit_compile.c: skip generating unnecessary goto

after return or longjmp. This is mainly for skipping the check of stack
size in such cases, which shouldn't be checked because it does never
happen.
------------------------------------------------------------------------
r63331 | k0kubun | 2018-05-03 12:08:21 +0900 (Thu, 03 May 2018) | 6 lines

mjit_compile.c: verify stack size agreement

between branches.

mjit_compile.inc.erb: move the compiled_for_pos reference to
mjit_compile.c
------------------------------------------------------------------------
r63330 | normal | 2018-05-03 10:24:09 +0900 (Thu, 03 May 2018) | 4 lines

Revert "ext/cgi/escape: preserve String subclass in result"

This reverts commit 6afea14043b0c0e603f26c89ae0d043f65852668 r63328
I misread the original bug report and got results flipped.
------------------------------------------------------------------------
r63329 | k0kubun | 2018-05-03 09:52:30 +0900 (Thu, 03 May 2018) | 5 lines

mjit_compile.inc.erb: verify stack consistency

on JIT compilation. r63092 was risky without this check.

mjit_compile.c: update comment about stack consistency check
------------------------------------------------------------------------
r63328 | normal | 2018-05-03 08:18:55 +0900 (Thu, 03 May 2018) | 8 lines

ext/cgi/escape: preserve String subclass in result

* ext/cgi/escape/escape.c (optimized_escape_html): use rb_str_new_with_class
  (optimized_unescape_html): ditto
  (optimized_escape): ditto
  (optimized_unescape): ditto
* test/cgi/test_cgi_util.rb (test_escape_string_subclass): new test
  [ruby-core:86847] [Bug #14732]
------------------------------------------------------------------------
r63327 | k0kubun | 2018-05-03 01:27:33 +0900 (Thu, 03 May 2018) | 1 line

test_jit.rb: test local variables
------------------------------------------------------------------------
r63326 | k0kubun | 2018-05-03 01:04:26 +0900 (Thu, 03 May 2018) | 1 line

test_jit.rb: test opt_aref_with again
------------------------------------------------------------------------
r63325 | k0kubun | 2018-05-03 00:41:43 +0900 (Thu, 03 May 2018) | 3 lines

test_jit.rb: make it possible to automatically find

untested insns. Resolved some warnings.
------------------------------------------------------------------------
r63324 | svn | 2018-05-03 00:12:55 +0900 (Thu, 03 May 2018) | 1 line

* 2018-05-03
------------------------------------------------------------------------
r63323 | k0kubun | 2018-05-03 00:12:55 +0900 (Thu, 03 May 2018) | 3 lines

test_jit.rb: verify tested insns

and fix some untested insns
------------------------------------------------------------------------
r63322 | nobu | 2018-05-02 22:37:18 +0900 (Wed, 02 May 2018) | 5 lines

object.c: fix exponent with underscore

* object.c (rb_cstr_to_dbl_raise): do not ignore exponent part
  when the input string longer than internal buffer contains
  underscore(s).  [ruby-core:86836] [Bug #14731]
------------------------------------------------------------------------
r63321 | k0kubun | 2018-05-02 22:11:53 +0900 (Wed, 02 May 2018) | 4 lines

test_jit.rb: add missing dependency

The test works with make test-all, but I sometimes want to do a thing like:
`.ruby-svn/ruby -Itest/lib test/ruby/test_jit.rb -n test_clean_so`
------------------------------------------------------------------------
r63320 | k0kubun | 2018-05-02 21:55:57 +0900 (Wed, 02 May 2018) | 7 lines

compile.c: mark catch_except_p of iseq

which has throw insn, not only ancestor iseqs of it.
I think we should remove catch_except_p flag and try to simplify the
catch table itself, to prevent similar bugs in the future.

test_jit.rb: add test to prevent the bug
------------------------------------------------------------------------
r63319 | mame | 2018-05-02 11:07:26 +0900 (Wed, 02 May 2018) | 1 line

common.mk: Update dependencies on tool/ruby_vm scripts
------------------------------------------------------------------------
r63318 | mame | 2018-05-02 09:57:50 +0900 (Wed, 02 May 2018) | 1 line

tool/ruby_vm/views/_insn_name_info.erb: Auto-detect the longest insn name
------------------------------------------------------------------------
r63317 | mame | 2018-05-02 09:57:47 +0900 (Wed, 02 May 2018) | 4 lines

iseq.c (rb_iseq_disasm_insn): Change the width of insn names

Currently "trace_opt_send_without_block" (28 letters) is the longest
insn.
------------------------------------------------------------------------
r63316 | svn | 2018-05-02 05:55:40 +0900 (Wed, 02 May 2018) | 1 line

* 2018-05-02
------------------------------------------------------------------------
r63315 | normal | 2018-05-02 05:55:39 +0900 (Wed, 02 May 2018) | 11 lines

cont.c: cleanup needless cast

It seems like leftover development step from r59557
("refactoring Fiber status").

I will make fiber_status use BITFIELD macro in a future
commit.

* cont.c (struct rb_fiber_struct): drop const from fiber_status
  (fiber_status_set): remove cast
  [ruby-core:86788] [Misc #14720]
------------------------------------------------------------------------
r63314 | normal | 2018-05-01 17:35:19 +0900 (Tue, 01 May 2018) | 4 lines

use list_head_init instead of open-coding it

While we cannot use LIST_HEAD since r63312, we can at
least use list_head_init to make our code more readable.
------------------------------------------------------------------------
r63313 | nobu | 2018-05-01 15:55:43 +0900 (Tue, 01 May 2018) | 6 lines

ast.c: use enum in switch for warnings

* ext/-test-/ast/ast.c (node_children): use enum instead of int
  for not-handled enumeration value in switch warnings.

* ext/-test-/ast/ast.c (node_children): fix the rb_bug message.
------------------------------------------------------------------------
r63312 | shyouhei | 2018-05-01 13:41:10 +0900 (Tue, 01 May 2018) | 14 lines

LIST_HEAD as a local variable is a C99ism.

Address of a variable whose storage duration is `auto` is _not_ a
compile time constant, according to ISO 9899 section 6.4.
LIST_HEAD takes such thing.  You can't use it to declare local
variables.

Interestingly, address of a static variable _is_ a compile time
constant.  So a declaration like `static LIST_HEAD..` is
completely legal even in C90.

In C99 and newer, this is not a constraint violation.


------------------------------------------------------------------------
r63311 | kou | 2018-05-01 12:12:37 +0900 (Tue, 01 May 2018) | 2 lines

rexml: Suppress warnings

------------------------------------------------------------------------
r63310 | normal | 2018-05-01 08:53:55 +0900 (Tue, 01 May 2018) | 4 lines

test/thread/test_cv.rb: test CV usability inside forked child

* test/thread/test_cv.rb (def test_condvar_fork): new test
  [Bug #14725]
------------------------------------------------------------------------
r63309 | normal | 2018-05-01 08:47:21 +0900 (Tue, 01 May 2018) | 6 lines

thread_sync.c (condvar_ptr): reset fork_gen after forking

Otherwise the condition variable waiter list will always
be empty, which is wrong :x

[Bug #14725] [Bug #14634]
------------------------------------------------------------------------
r63308 | svn | 2018-05-01 08:12:03 +0900 (Tue, 01 May 2018) | 1 line

* 2018-05-01
------------------------------------------------------------------------
r63307 | normal | 2018-05-01 08:12:03 +0900 (Tue, 01 May 2018) | 1 line

thread.c (vm_living_thread_num): constify vm arg
------------------------------------------------------------------------
r63306 | kazu | 2018-04-30 19:01:08 +0900 (Mon, 30 Apr 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63305 | kou | 2018-04-30 15:54:13 +0900 (Mon, 30 Apr 2018) | 2 lines

NEWS: Add recent REXML changes

------------------------------------------------------------------------
r63304 | nobu | 2018-04-30 11:17:03 +0900 (Mon, 30 Apr 2018) | 7 lines

io.c: workaround for EPROTOTYPE

* io.c (internal_write_func, internal_writev_func): retry at
  unexpected EPROTOTYPE on macOS, to get rid of a kernel bug.
  [ruby-core:86690] [Bug #14713]

* ext/socket/init.c (rsock_{sendto,send,write}_blocking): ditto.
------------------------------------------------------------------------
r63303 | svn | 2018-04-30 09:28:31 +0900 (Mon, 30 Apr 2018) | 1 line

* 2018-04-30
------------------------------------------------------------------------
r63302 | nobu | 2018-04-30 09:28:30 +0900 (Mon, 30 Apr 2018) | 1 line

io.c: reuse internal_write_func
------------------------------------------------------------------------
r63301 | usa | 2018-04-29 22:45:11 +0900 (Sun, 29 Apr 2018) | 3 lines

* spec/ruby/command_line/dash_upper_i_spec.rb: skip symlink on Windows like
  other specs.

------------------------------------------------------------------------
r63300 | knu | 2018-04-29 20:15:41 +0900 (Sun, 29 Apr 2018) | 13 lines

Remove the teeny part from the shared library name on macOS

This will prevent macOS users from having to rebuild all extension
libraries every time they upgrade ruby to a new teeny release.

Before:
- libruby.2.6.0.dylib
- libruby.2.6.dylib -> libruby.2.6.0.dylib
- libruby.dylib -> libruby.2.6.0.dylib

After:
- libruby.2.6.dylib
- libruby.dylib -> libruby.2.6.dylib
------------------------------------------------------------------------
r63299 | nobu | 2018-04-29 16:12:56 +0900 (Sun, 29 Apr 2018) | 1 line

range.c: optimize range_each for Bignum
------------------------------------------------------------------------
r63298 | k0kubun | 2018-04-29 12:20:31 +0900 (Sun, 29 Apr 2018) | 19 lines

_mjit_compile_send.erb: fix pointer conversion warning

/var/folders/b0/9hgj_tyx10zgkcbyx3_j2dlr0000gn/T//_ruby_mjit_p72619u0.c:37:58: warning: incompatible integer to pointer
      conversion passing 'long' to parameter of type 'const struct rb_call_info *' [-Wint-conversion]
        vm_caller_setup_arg_block(ec, reg_cfp, &calling, 0x7ff6b2e10ca0, 0x7ff6b3847108, FALSE);
                                                         ^~~~~~~~~~~~~~
/Users/kokubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:15613:66: note:
      passing argument to parameter 'ci' here
     struct rb_calling_info *calling, const struct rb_call_info *ci, rb_iseq_t *blockiseq, const int is_super)
                                                                 ^
/var/folders/b0/9hgj_tyx10zgkcbyx3_j2dlr0000gn/T//_ruby_mjit_p72619u0.c:37:74: warning: incompatible integer to pointer
      conversion passing 'long' to parameter of type 'rb_iseq_t *' (aka 'struct rb_iseq_struct *') [-Wint-conversion]
        vm_caller_setup_arg_block(ec, reg_cfp, &calling, 0x7ff6b2e10ca0, 0x7ff6b3847108, FALSE);
                                                                         ^~~~~~~~~~~~~~
/Users/kokubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:15613:81: note:
      passing argument to parameter 'blockiseq' here
     struct rb_calling_info *calling, const struct rb_call_info *ci, rb_iseq_t *blockiseq, const int is_super)
                                                                                ^
2 warnings generated.
------------------------------------------------------------------------
r63297 | nobu | 2018-04-29 08:31:32 +0900 (Sun, 29 Apr 2018) | 4 lines

range.c: endless symbol range

* range.c (range_each): shortcirtuit endless symbol range too, as
  well as `#step`.
------------------------------------------------------------------------
r63296 | eregon | 2018-04-29 08:04:56 +0900 (Sun, 29 Apr 2018) | 3 lines

Generalize the check to MRI in the -I spec

* The current check seems to fail with AppVeyor.
------------------------------------------------------------------------
r63295 | eregon | 2018-04-29 05:37:20 +0900 (Sun, 29 Apr 2018) | 1 line

Ignore the extension of miniruby on Windows in the -I spec
------------------------------------------------------------------------
r63294 | svn | 2018-04-29 04:50:10 +0900 (Sun, 29 Apr 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63293 | eregon | 2018-04-29 04:50:06 +0900 (Sun, 29 Apr 2018) | 1 line

Update to ruby/spec@6f38a82
------------------------------------------------------------------------
r63292 | svn | 2018-04-29 04:49:25 +0900 (Sun, 29 Apr 2018) | 1 line

* 2018-04-29
------------------------------------------------------------------------
r63291 | eregon | 2018-04-29 04:49:24 +0900 (Sun, 29 Apr 2018) | 1 line

Update to ruby/mspec@b5b13de
------------------------------------------------------------------------
r63290 | nobu | 2018-04-28 20:16:54 +0900 (Sat, 28 Apr 2018) | 7 lines

string.c: adjust to rb_str_upto_each

* range.c (range_each_func): adjust the signature of the callback
  function to rb_str_upto_each, and exit the loop if the callback
  returned non-zero.

* string.c (rb_str_upto_endless_each): ditto.
------------------------------------------------------------------------
r63289 | k0kubun | 2018-04-28 18:22:07 +0900 (Sat, 28 Apr 2018) | 3 lines

test_open3.rb: let test_popen2 work with --jit

test/lib/jit_support.rb: add .remove_mjit_logs to normalize stderr
------------------------------------------------------------------------
r63288 | k0kubun | 2018-04-28 18:11:25 +0900 (Sat, 28 Apr 2018) | 1 line

test_rubyoptions.rb: let all tests work with --jit
------------------------------------------------------------------------
r63287 | k0kubun | 2018-04-28 18:02:56 +0900 (Sat, 28 Apr 2018) | 4 lines

test_bug_reporter.rb: make it work with --jit

test_rubyoptions.rb: replace gsub with sub because it's suboptimal for
this
------------------------------------------------------------------------
r63286 | k0kubun | 2018-04-28 17:52:24 +0900 (Sat, 28 Apr 2018) | 1 line

test_rubyoptions.rb: let test_verbose work w/ --jit
------------------------------------------------------------------------
r63285 | k0kubun | 2018-04-28 17:41:19 +0900 (Sat, 28 Apr 2018) | 3 lines

test_parallel.rb: extend timeout for --jit-wait

testing. 10s was long enough for my machine, but not for travis.
------------------------------------------------------------------------
r63284 | k0kubun | 2018-04-28 17:24:44 +0900 (Sat, 28 Apr 2018) | 4 lines

test_ftp.rb: extend read_timeout for --jit-wait

testing. I'm running `make test-all RUN_OPTS='--jit-wait'` and the
read_timeout was too slow for it.
------------------------------------------------------------------------
r63283 | nobu | 2018-04-28 16:31:32 +0900 (Sat, 28 Apr 2018) | 6 lines

range.c: each on endless range

* range.c (range_each): endless range begins with string-like
  object should iterate from the converted result string, as well
  as `#each` on a string-end range or `#step` method on an endless
  range, i.e., `begin.succ` should not be called.
------------------------------------------------------------------------
r63282 | normal | 2018-04-28 15:23:43 +0900 (Sat, 28 Apr 2018) | 5 lines

thread_sync.c: remove "volatile" qualifiers

I may store ->ec in rb_mutex_t instead of ->th to support green
thread.  For now, "volatile" is useless for thread-safety
anyways and we're not dealing with *jmp or signals with mutex.
------------------------------------------------------------------------
r63281 | normal | 2018-04-28 15:00:39 +0900 (Sat, 28 Apr 2018) | 5 lines

thread_sync.c: remove unused list_heads

I forgot to clean these up in r63215

* thread_sync.c (szqueue_list, queue_list, condvar_list): remove
------------------------------------------------------------------------
r63280 | hsbt | 2018-04-28 10:47:58 +0900 (Sat, 28 Apr 2018) | 6 lines

Merge Pysch 3.0.3.pre1.

  I added the following additional commits from 3.0.3.pre1:
    * https://github.com/ruby/psych/pull/356
    * https://github.com/ruby/psych/pull/357
    * https://github.com/ruby/psych/pull/359
------------------------------------------------------------------------
r63279 | nobu | 2018-04-28 10:45:52 +0900 (Sat, 28 Apr 2018) | 7 lines

mjit_config.h: expand min header name

* Makefile.in, win32/Makefile.sub (mjit_config.h): expand min
  header name, including the version number and the suffix.

* mjit.c (init_header_filename): the version number and the suffix
  are now included in the header name.
------------------------------------------------------------------------
r63278 | kou | 2018-04-28 10:36:18 +0900 (Sat, 28 Apr 2018) | 23 lines

rexml: disable XPath 1.0 compatible "#{ELEMENT_NAME}" processing by default

It breaks backward compatibility than I thought. So it's disabled by
default. It means that REXML's XPath processor isn't compatible with
XPath 1.0. But it will be acceptable for users.

We can enable it by specifying "strict: true" to
REXML::XPathParser.new explicitly.

* lib/rexml/xpath.rb,
  lib/rexml/xpath_parser.rb: Accept "strict: true" option.

* test/rexml/test_contrib.rb,
  test/rexml/xpath/test_base.rb: Use not XPath 1.0 compatible behavior.

* test/rexml/test_jaxen.rb: Use XPath 1.0 compatible behavior.

* test/rss/test_1.0.rb,
  test/rss/test_dublincore.rb,
  spec/ruby/library/rexml/element/namespace_spec.rb,
  spec/ruby/library/rexml/element/namespaces_spec.rb,
  spec/ruby/library/rexml/element/prefixes_spec.rb: Enable again.

------------------------------------------------------------------------
r63277 | svn | 2018-04-28 05:25:50 +0900 (Sat, 28 Apr 2018) | 1 line

* 2018-04-28
------------------------------------------------------------------------
r63276 | stomar | 2018-04-28 05:25:49 +0900 (Sat, 28 Apr 2018) | 1 line

NEWS: fix typos
------------------------------------------------------------------------
r63275 | nobu | 2018-04-27 22:14:09 +0900 (Fri, 27 Apr 2018) | 1 line

iseq.c: consistent rb_bug messages
------------------------------------------------------------------------
r63274 | nobu | 2018-04-27 22:14:08 +0900 (Fri, 27 Apr 2018) | 5 lines

mjit.c: remove undef

* mjit.c (clean_so_file): removed unnecessary undef of `Sleep`
  which is redfined as rb_w32_sleep.  eventually, retry loop with
  sleep has been removed.
------------------------------------------------------------------------
r63273 | nobu | 2018-04-27 16:39:00 +0900 (Fri, 27 Apr 2018) | 7 lines

mjit.c: clean so file on Windows

* mjit.c (dlclose): use FreeLibrary to manage the reference count
  on the loaded module properly.

* mjit.c (clean_so_file): clean shared object file after unloaded,
  in-use files cannot be removed on Windows.
------------------------------------------------------------------------
r63272 | nobu | 2018-04-27 14:20:40 +0900 (Fri, 27 Apr 2018) | 6 lines

mjit.c: fix cc arguments

* mjit.c (CC_LIBS): MJIT_LIBS is used only on Windows.

* mjit.c (compile_c_to_so): moved source and shared object files
  to simplify indexes.
------------------------------------------------------------------------
r63271 | nobu | 2018-04-27 14:20:40 +0900 (Fri, 27 Apr 2018) | 4 lines

ruby.c: moved libdir

* ruby.c (ruby_init_loadpath_safe): moved libdir name inside
  LOAD_RELATIVE.
------------------------------------------------------------------------
r63270 | nobu | 2018-04-27 13:36:34 +0900 (Fri, 27 Apr 2018) | 4 lines

ruby.c: fix compilation error

* ruby.c (ruby_init_loadpath_safe): fix compilation error when
  ENABLE_MULTIARCH but not universal binary.
------------------------------------------------------------------------
r63269 | nobu | 2018-04-27 11:02:29 +0900 (Fri, 27 Apr 2018) | 7 lines

mjit.c: prefix and archdir in init

* ruby.c (ruby_init_loadpath_safe): store prefix and archlibdir
  paths.

* mjit.c (compile_c_to_so, init_header_filename): use just one
  library path on Windows.
------------------------------------------------------------------------
r63268 | nobu | 2018-04-27 10:58:29 +0900 (Fri, 27 Apr 2018) | 5 lines

rbinstall.rb: fix timing to read stub

* tool/rbinstall.rb ($script_installer.stub): read stub file on
  demand.  as `$cmdtype` is set to "exe" in parse_args, it is not
  set yet when `$script_installer` is defined.
------------------------------------------------------------------------
r63267 | tenderlove | 2018-04-27 09:13:51 +0900 (Fri, 27 Apr 2018) | 5 lines

Revert "Fix use of `rb_profile_frames` start parameter"

This reverts commit r63265.

ko1 said I should not have committed this! I'm sorry!
------------------------------------------------------------------------
r63266 | svn | 2018-04-27 07:49:01 +0900 (Fri, 27 Apr 2018) | 1 line

* 2018-04-27
------------------------------------------------------------------------
r63265 | tenderlove | 2018-04-27 07:49:00 +0900 (Fri, 27 Apr 2018) | 12 lines

Fix use of `rb_profile_frames` start parameter

rb_profile_frames was always behaving as if the value given for the
start parameter was 0.

The reason for this was that it would check if (start > 0) { then
continue without updating the control frame pointer or anything other
than decrementing start.

[ruby-core:86147] [Bug #14607]

Co-authored-by: Dylan Thacker-Smith <Dylan.Smith@shopify.com>
------------------------------------------------------------------------
r63264 | nobu | 2018-04-26 21:36:27 +0900 (Thu, 26 Apr 2018) | 5 lines

win32/Makefile.sub: LIBDIR_BASENAME

* mjit.c (init_header_filename): support LIBDIR_BASENAME.

* win32/Makefile.sub (config.h): ditto.
------------------------------------------------------------------------
r63263 | nobu | 2018-04-26 21:36:26 +0900 (Thu, 26 Apr 2018) | 1 line

ruby.c (ruby_init_loadpath_safe): constify
------------------------------------------------------------------------
r63262 | svn | 2018-04-26 09:12:36 +0900 (Thu, 26 Apr 2018) | 1 line

* 2018-04-26
------------------------------------------------------------------------
r63261 | nobu | 2018-04-26 09:12:35 +0900 (Thu, 26 Apr 2018) | 5 lines

test_numeric.rb: loose precision assertion

* test/ruby/test_numeric.rb (TestNumeric#test_step): remove a
  loose precision assertion, as Float cannot keep complete
  precision.  [ruby-core:86684] [Bug #14712]
------------------------------------------------------------------------
r63260 | kazu | 2018-04-25 23:00:47 +0900 (Wed, 25 Apr 2018) | 1 line

[DOC] Fix capitallizing [ci skip]
------------------------------------------------------------------------
r63259 | nobu | 2018-04-25 20:56:58 +0900 (Wed, 25 Apr 2018) | 5 lines

common.rb: unused constant

* lib/uri/common.rb (URI::HTML5ASCIIINCOMPAT): remove the constant
  which has been unused since r40460, and wrong since r49069 due
  to the operator precedence.  [ruby-core:86678] [Bug #14711]
------------------------------------------------------------------------
r63258 | eregon | 2018-04-25 17:16:09 +0900 (Wed, 25 Apr 2018) | 1 line

Avoid "should_not raise_error" in Thread#raise spec
------------------------------------------------------------------------
r63257 | eregon | 2018-04-25 17:15:58 +0900 (Wed, 25 Apr 2018) | 3 lines

Fix style in Thread#raise spec

* Add space after { and before }.
------------------------------------------------------------------------
r63256 | eregon | 2018-04-25 17:11:01 +0900 (Wed, 25 Apr 2018) | 3 lines

Use Thread.pass in loop{} to check interrupts more often

* The spec now runs in ~5ms vs ~100ms before.
------------------------------------------------------------------------
r63255 | nobu | 2018-04-25 15:45:05 +0900 (Wed, 25 Apr 2018) | 5 lines

compile.c: fix unconditional branch optimization

* compile.c (iseq_peephole_optimize): add dummy `putnil` after a
  `jump` replacing an unconditional branch, to adjust removed
  `dup`.  [ruby-core:86666] [Bug #14708]
------------------------------------------------------------------------
r63254 | svn | 2018-04-25 05:32:00 +0900 (Wed, 25 Apr 2018) | 1 line

* 2018-04-25
------------------------------------------------------------------------
r63253 | normal | 2018-04-25 05:31:59 +0900 (Wed, 25 Apr 2018) | 10 lines

eval.c (ruby_setup): disable THP on Linux

Transparent Huge Pages (THP) decrease the effectiveness of
CoW-friendly GC because it decreases page granularity.  That is,
a forked process dirtying one bit of CoW-shared memory can
trigger a copy of a huge page (2MB on x86-64) instead of a smaller,
standard page (4K).

* eval.c (ruby_setup): disable THP on Linux
  [ruby-core:86651] [Feature #14705]
------------------------------------------------------------------------
r63252 | nobu | 2018-04-24 21:25:46 +0900 (Tue, 24 Apr 2018) | 5 lines

string.c: fix scanned substring with `\K`

* string.c (scan_once): fix the matched substring with `\K`, the
  beginning of that string may differ from the matched position.
  [ruby-core:86663] [Bug #14707]
------------------------------------------------------------------------
r63251 | nobu | 2018-04-24 08:46:26 +0900 (Tue, 24 Apr 2018) | 4 lines

rescue Errno::EPROTOTYPE

* test/webrick/test_httpserver.rb (test_gigantic_request_header):
  Errno::EPROTOTYPE is sometimes raised on Mac OS X 10.10.
------------------------------------------------------------------------
r63250 | svn | 2018-04-24 01:20:46 +0900 (Tue, 24 Apr 2018) | 1 line

* 2018-04-24
------------------------------------------------------------------------
r63249 | k0kubun | 2018-04-24 01:20:45 +0900 (Tue, 24 Apr 2018) | 6 lines

revert r63212

except test_jit.rb.

In some situations, this generates a wrong code. I'll add a test for it
later but let me revert this to make it work for now.
------------------------------------------------------------------------
r63248 | nobu | 2018-04-23 21:51:18 +0900 (Mon, 23 Apr 2018) | 4 lines

compile.c: copy a short insn with leave

* compile.c (iseq_peephole_optimize): copy not only `leave`, with
  a non-operand instruction, which are not longer than `jump`.
------------------------------------------------------------------------
r63247 | kazu | 2018-04-23 21:09:21 +0900 (Mon, 23 Apr 2018) | 1 line

[DOC] URI::Generic#port returns Integer [ci skip]
------------------------------------------------------------------------
r63246 | nobu | 2018-04-23 18:52:23 +0900 (Mon, 23 Apr 2018) | 4 lines

compile.c: insn before pop

* compile.c (iseq_peephole_optimize): more eliminatable
  instructions before `pop` without side effects.
------------------------------------------------------------------------
r63245 | normal | 2018-04-23 14:54:06 +0900 (Mon, 23 Apr 2018) | 4 lines

test/ruby/test_io.rb: add extra Thread#join to delay close

Maybe this fixes some CI failures.  Also, use different timeouts
for each item for hopefully easier diagnosis.
------------------------------------------------------------------------
r63244 | nobu | 2018-04-23 11:07:11 +0900 (Mon, 23 Apr 2018) | 5 lines

thread_pthread.c: fallback to CLOCK_REALTIME

* thread_pthread.c (Init_native_thread): fallback to the default
  CLOCK_REALTIME when failed to set to CLOCK_MONOTONIC, e.g. on
  Solaris.  [Misc #14497]
------------------------------------------------------------------------
r63243 | normal | 2018-04-23 06:21:06 +0900 (Mon, 23 Apr 2018) | 6 lines

net/imap: set SO_KEEPALIVE on TCP sockets

Otherwise connections (commonly on IDLE, but it could be any
command) may never receive notifications of link errors.

[ruby-core:86628] [Feature #14703]
------------------------------------------------------------------------
r63242 | stomar | 2018-04-23 04:41:06 +0900 (Mon, 23 Apr 2018) | 4 lines

sprintf.c: fix typo

* sprintf.c: [DOC] fix typo.
  Patch by Lazarus Lazaridis (iridakos).  [Fix GH-1789]
------------------------------------------------------------------------
r63241 | ko1 | 2018-04-23 01:33:49 +0900 (Mon, 23 Apr 2018) | 2 lines

Same as the last commit (comment out tests for CI).

------------------------------------------------------------------------
r63240 | svn | 2018-04-23 01:03:10 +0900 (Mon, 23 Apr 2018) | 1 line

* 2018-04-23
------------------------------------------------------------------------
r63239 | ko1 | 2018-04-23 01:03:09 +0900 (Mon, 23 Apr 2018) | 9 lines

Skip some tests to make CI healthy.

r63236 (or r63237) introduces test failures and CI shows errors.
This commit makes skipping these tests.  Please revert this commit
after tests (and rubyspec) work fine.

Failure log example:
https://gist.github.com/ko1/8456cf25fe35a696bd33ac86135092e4

------------------------------------------------------------------------
r63238 | normal | 2018-04-22 21:09:07 +0900 (Sun, 22 Apr 2018) | 7 lines

thread*: all condvars are monotonic

There's no reason to use CLOCK_REALTIME for any condvars in Ruby.
Indeed, we initialized all condvars with RB_CONDATTR_CLOCK_MONOTONIC
anyway; so simplify our code and reduce ifdefs.

[ruby-core:85639] [Misc #14497]
------------------------------------------------------------------------
r63237 | kou | 2018-04-22 18:38:06 +0900 (Sun, 22 Apr 2018) | 37 lines

rexml: Fix XPath bug of //#{ELEMENT_NAME}[#{POSITION}]

The position should be counted for each nodeset but the previous
implementation counts position for union-ed nodeset.

For example, "/a/*/*[1]" should be matched to "<c1/>" and "<c2/>" with
the following XML.

    <a>
      <b>
        <c1/>
      </b>
      <b>
        <c2/>
      </b>
    </a>

But the previous implementation just returns only "<c1/>".

* lib/rexml/element.rb (REXML::Attributes#each_attribute):
  Support Enumerator for no block use.

* lib/rexml/element.rb (REXML::Attributes#each):
  Support Enumerator for no block use.

* lib/rexml/functions.rb (REXML::Functions.string):
  Support NaN again.

* lib/rexml/xpath_parser.rb: Re-implement "Step" evaluator.
  It should evaluate "AxisSpecifier", "NodeTest" and "Predicate" in one
  step to respect position for each nodeset.

* test/rexml/test_jaxen.rb: Enable more tests. Remained tests should
  be also enabled but it'll not be near future.

* test/rexml/xpath/test_base.rb: Fix expected value.

------------------------------------------------------------------------
r63236 | kou | 2018-04-22 17:09:04 +0900 (Sun, 22 Apr 2018) | 31 lines

rexml: Fix XPath bug of /#{ELEMENT_NAME}

It doesn't mean that all elements which name "ELEMENT_NAME" with any
namespace URI including null namespace URI. It means that all elements
which name "ELEMENT_NAME" with null namespace URI.

https://www.w3.org/TR/1999/REC-xpath-19991116/#NT-NodeTest

> if the QName does not have a prefix, then the namespace URI is null
> (this is the same way attribute names are expanded).

We need to use "*[local-name()='#{ELEMENT_NAME}']" for all elements
which name "ELEMENT_NAME" with any namespace URI including null
namespace URI in XPath 1.0. But it's inconvenient. So this change
includes "*:#{LOCAL_NAME}" syntax support that is introduced since
XPath 2.0.

* lib/rexml/parsers/xpathparser.rb: Support "*:#{LOCAL_NAME}" syntax that
  is introduced since XPath 2.0.

* lib/rexml/xpath_parser.rb:
  * Fix namespace URI processing for "#{ELEMENT_NAME}". Now,
    "#{ELEMENT_NAME}" doesn't accept elements with null namespace URI.
  * Add "*:#{LOCAL_NAME}" support.

* test/rexml/test_contrib.rb,
  test/rexml/test_core.rb,
  test/rexml/xpath/test_base.rb: Follow this change.

* test/rexml/test_jaxen.rb: Fix namespace processing.

------------------------------------------------------------------------
r63235 | k0kubun | 2018-04-22 13:01:23 +0900 (Sun, 22 Apr 2018) | 3 lines

mjit_compile.c: comment the intention of r63092 [ci skip]

It's for "leave" instruction.
------------------------------------------------------------------------
r63234 | nobu | 2018-04-22 09:47:56 +0900 (Sun, 22 Apr 2018) | 1 line

made *.cmd excutable
------------------------------------------------------------------------
r63233 | nobu | 2018-04-22 09:46:08 +0900 (Sun, 22 Apr 2018) | 1 line

made *.cmd excutable
------------------------------------------------------------------------
r63232 | nobu | 2018-04-22 09:02:56 +0900 (Sun, 22 Apr 2018) | 5 lines

Makefile.in: MJIT_ARCHFLAG

* Makefile.in (mjit_config.h): separate MJIT_ARCHFLAG for each
  architecture on universal binary.  cannot use precompiled-header
  with multiple -arch options.
------------------------------------------------------------------------
r63231 | normal | 2018-04-22 08:32:18 +0900 (Sun, 22 Apr 2018) | 9 lines

test/ruby/test_io.rb: try to diagnose stuck test_recycled_fd_close

I can't reproduce the problem myself, but gets loop seems ought
to give more useful information for tracking down where we're
stuck, at least.

Followup-to: r63217

cf. http://ci.rvm.jp/results/trunk-test@frontier/804284
------------------------------------------------------------------------
r63230 | nobu | 2018-04-22 08:02:21 +0900 (Sun, 22 Apr 2018) | 4 lines

mjit.c: check pch status

* mjit.c (mjit_add_iseq_to_process, mjit_get_iseq_func): check if
  pch failed before timedout.
------------------------------------------------------------------------
r63229 | svn | 2018-04-22 05:04:06 +0900 (Sun, 22 Apr 2018) | 1 line

* 2018-04-22
------------------------------------------------------------------------
r63228 | stomar | 2018-04-22 05:04:05 +0900 (Sun, 22 Apr 2018) | 16 lines

Improve docs for URI library

* lib/uri/generic.rb: [DOC] fix invalid example code to make it
  syntax highlighted; drop unnecessary `puts', `p'; adapt to current
  inspect format without Object id; do not display unnecessary return
  values in examples; fix or prevent unintended description lists;
  fix broken RDoc; fix grammar and typos.

* lib/uri.rb: ditto.
* lib/uri/common.rb: ditto.
* lib/uri/file.rb: ditto.
* lib/uri/ftp.rb: ditto.
* lib/uri/http.rb: ditto.
* lib/uri/ldap.rb: ditto.
* lib/uri/mailto.rb: ditto.
* lib/uri/rfc2396_parser.rb: ditto.
------------------------------------------------------------------------
r63227 | k0kubun | 2018-04-21 22:15:43 +0900 (Sat, 21 Apr 2018) | 5 lines

test_jit.rb: follow the change of instruction

in r63225. Not strictly needed but to avoid confusion.

The JIT compiler itself seems working fine.
------------------------------------------------------------------------
r63226 | nobu | 2018-04-21 19:52:53 +0900 (Sat, 21 Apr 2018) | 4 lines

compile.c: optimize checktype

* compile.c (optimize_checktype): optimize `checktype` instruction
  on a literal.
------------------------------------------------------------------------
r63225 | nobu | 2018-04-21 19:52:52 +0900 (Sat, 21 Apr 2018) | 4 lines

insns.def: checktype

* insns.def (checktype): split branchiftype to checktype and
  branchif, to make branch condition negation possible.
------------------------------------------------------------------------
r63224 | nobu | 2018-04-21 16:48:36 +0900 (Sat, 21 Apr 2018) | 4 lines

compile.c: renamed macro arguments

* compile.c (INSERT_BEFORE_INSN, INSERT_BEFORE_INSN1): rename
  argument `prev` as `next`.
------------------------------------------------------------------------
r63223 | kou | 2018-04-21 15:45:42 +0900 (Sat, 21 Apr 2018) | 2 lines

rexml: Enable more tests

------------------------------------------------------------------------
r63222 | kou | 2018-04-21 15:43:58 +0900 (Sat, 21 Apr 2018) | 6 lines

rexml: Fix XPath concat() implementation

* lib/rexml/functions.rb (REXML::Functions.concat): Implement.

* test/rexml/test_jaxen.rb: Enable one more test.

------------------------------------------------------------------------
r63221 | kou | 2018-04-21 15:39:43 +0900 (Sat, 21 Apr 2018) | 10 lines

rexml: Fix XPath string() implementation

* lib/rexml/functions.rb( REXML::Functions.string):
  * Support context node.
  * Fix implementation for document node to remove out of root nodes.
  * Support processing instruction node.
  * Improve implementation for integer to omit decimals.

* test/rexml/test_jaxen.rb: Enable processing instruction test.

------------------------------------------------------------------------
r63220 | kou | 2018-04-21 15:21:41 +0900 (Sat, 21 Apr 2018) | 4 lines

rexml: Make more readable

test/rexml/test_jaxen.rb: Use more meaningful name.

------------------------------------------------------------------------
r63219 | kou | 2018-04-21 15:21:02 +0900 (Sat, 21 Apr 2018) | 5 lines

rexml: Fix a test bug

test/rexml/test_jaxen.rb: Fix wrong assert_raise usage. Note that this code
isn't used yet.

------------------------------------------------------------------------
r63218 | kou | 2018-04-21 15:18:08 +0900 (Sat, 21 Apr 2018) | 4 lines

rexml: Make more readable

test/rexml/xpath/test_base.rb: Use here document for readability.

------------------------------------------------------------------------
r63217 | normal | 2018-04-21 13:02:41 +0900 (Sat, 21 Apr 2018) | 3 lines

test/ruby/test_io.rb: add closing recycled FD test

Followup-to: r63216
------------------------------------------------------------------------
r63216 | normal | 2018-04-21 12:12:36 +0900 (Sat, 21 Apr 2018) | 27 lines

io.c: do not use rb_notify_fd_close close on recycled FD

It is unsafe to release GVL and call rb_notify_fd_close after
close(2) on any given FD.  FDs (file descriptor) may be recycled
in other threads immediately after close() to point to a different
file description.  Note the distinction between "file description"
and "file descriptor".

th-1                           | th-2
-------------------------------+---------------------------------------
io_close_fptr                  |
  rb_notify_fd_close(fd)       |
  fptr_finalize_flush          |
    close(fd)                  |
  rb_thread_schedule           |
                               | fd reused (via pipe/open/socket/etc)
  rb_notify_fd_close(fd)       |
                               | sees "stream closed" exception
			       |   for DIFFERENT file description

* thread.c (rb_thread_io_blocking_region): adjust comment for list_del
* thread.c (rb_notify_fd_close): give busy list to caller
* thread.c (rb_thread_fd_close): loop on busy list
* io.c (io_close_fptr): do not call rb_thread_fd_close on invalid FD
* io.c (io_reopen): use rb_thread_fd_close

Fixes: r57422 ("io.c: close before wait")
------------------------------------------------------------------------
r63215 | normal | 2018-04-21 07:53:37 +0900 (Sat, 21 Apr 2018) | 30 lines

thread_sync: redo r62934 to use fork_gen

Instead of maintaining linked-lists to store all
rb_queue/rb_szqueue/rb_condvar structs; store only a fork_gen
serial number to simplify management of these items.

This reduces initialization costs and avoids the up-front cost
of resetting all Queue/SizedQueue/ConditionVariable objects at
fork while saving 8 bytes per-structure on 64-bit.  There are no
savings on 32-bit.

* thread.c (rb_thread_atfork_internal): remove rb_thread_sync_reset_all call
* thread_sync.c (rb_thread_sync_reset_all): remove
* thread_sync.c (queue_live): remove
* thread_sync.c (queue_free): remove
* thread_sync.c (struct rb_queue): s/live/fork_gen/
* thread_sync.c (queue_data_type): use default free
* thread_sync.c (queue_alloc): remove list_add
* thread_sync.c (queue_fork_check): new function
* thread_sync.c (queue_ptr): call queue_fork_check
* thread_sync.c (szqueue_free): remove
* thread_sync.c (szqueue_data_type): use default free
* thread_sync.c (szqueue_alloc): remove list_add
* thread_sync.c (szqueue_ptr):  check fork_gen via queue_fork_check
* thread_sync.c (struct rb_condvar): s/live/fork_gen/
* thread_sync.c (condvar_free): remove
* thread_sync.c (cv_data_type): use default free
* thread_sync.c (condvar_ptr): check fork_gen
* thread_sync.c (condvar_alloc): remove list_add
  [ruby-core:86316] [Bug #14634]
------------------------------------------------------------------------
r63214 | svn | 2018-04-21 06:38:28 +0900 (Sat, 21 Apr 2018) | 1 line

* 2018-04-21
------------------------------------------------------------------------
r63213 | normal | 2018-04-21 06:38:27 +0900 (Sat, 21 Apr 2018) | 11 lines

simplify altstack and enable reuse with thread cache

Instead of allocating and registering the altstack in different
places, do it together to reduce code and improve readability.
When thread cache is enabled, storing altstack in rb_thread_t
is wasteful and we may reuse altstack in the same pthread.

This also lets us clearly allow use of xmalloc to allow GC to
recover from ENOMEM.

[ruby-core:85621] [Feature #14487]
------------------------------------------------------------------------
r63212 | k0kubun | 2018-04-20 22:42:08 +0900 (Fri, 20 Apr 2018) | 63 lines

_mjit_compile_send.erb: inline attr_reader call

_mjit_compile_send_guard.erb: carve out the shared logic to invalidate
inlined method call

common.mk: update dependency for this change

test_jit.rb: add test for attr_reader optimization

* Benchmark

```
require 'benchmark_driver'

Benchmark.driver do |x|
  x.prelude %{
    class C
      attr_reader :a
      def initialize
        @a = 1
      end
    end

    o = C.new

    def l o
      i = 0
      while i < 1000000
        o.a
        i += 1
      end
    end
  }
  x.report 'aread', %{ l o }
  x.loop_count 1000

  x.rbenv 'before', 'before,--jit', 'after,--jit'
  x.verbose
end
```

```
before: ruby 2.6.0dev (2018-04-20 trunk 63211) [x86_64-linux]
before,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline attr_reader call
Calculating -------------------------------------
                         before  before,--jit  after,--jit
               aread     54.597       122.894      218.574 i/s -      1.000k times in 18.316102s 8.137089s 4.575106s

Comparison:
                            aread
         after,--jit:       218.6 i/s
        before,--jit:       122.9 i/s - 1.78x  slower
              before:        54.6 i/s - 4.00x  slower

```

* Optcarrot

A little made faster?

fps: 71.35 -> 72.11
------------------------------------------------------------------------
r63211 | hsbt | 2018-04-20 16:10:53 +0900 (Fri, 20 Apr 2018) | 4 lines

Update latest bundled gems:

  did_you_mean: 1.2.1
  rake: 12.3.1
------------------------------------------------------------------------
r63210 | normal | 2018-04-20 12:22:26 +0900 (Fri, 20 Apr 2018) | 20 lines

variable.c: fix thread + fork errors in autoload

This is fairly non-intrusive bugfix to prevent children
from trying to reach into thread stacks of the parent.
I will probably reuse this idea and redo r62934, too
(same bug).

* vm_core.h (typedef struct rb_vm_struct): add fork_gen counter
* thread.c (rb_thread_atfork_internal): increment fork_gen
* variable.c (struct autoload_data_i): store fork_gen
* variable.c (check_autoload_data): remove (replaced with get_...)
* variable.c (get_autoload_data): check fork_gen when retrieving
* variable.c (check_autoload_required): use get_autoload_data
* variable.c (rb_autoloading_value): ditto
* variable.c (rb_autoload_p): ditto
* variable.c (current_autoload_data): ditto
* variable.c (autoload_reset): reset fork_gen, adjust indent
* variable.c (rb_autoload_load): set fork_gen when setting state
* test/ruby/test_autoload.rb (test_autoload_fork): new test
  [ruby-core:86410] [Bug #14634]
------------------------------------------------------------------------
r63209 | nobu | 2018-04-20 09:25:30 +0900 (Fri, 20 Apr 2018) | 1 line

vm_core.h: adjust indent [ci skip]
------------------------------------------------------------------------
r63208 | nobu | 2018-04-20 09:23:01 +0900 (Fri, 20 Apr 2018) | 4 lines

range.c: step in bignum

* range.c (range_step): honor step in bignum addition.
  [Feature #12912]
------------------------------------------------------------------------
r63207 | nobu | 2018-04-20 09:10:46 +0900 (Fri, 20 Apr 2018) | 4 lines

range.c: fix fixnum loop condition

* range.c (range_step): FIXABLE + FIXABLE never overflow, but may
  not be FIXABLE.  [Feature #12912]
------------------------------------------------------------------------
r63206 | nobu | 2018-04-20 08:46:55 +0900 (Fri, 20 Apr 2018) | 3 lines

fiddle/test_import.rb: fix warnings by rubygems

[Bug #14686]
------------------------------------------------------------------------
r63205 | nobu | 2018-04-20 08:35:39 +0900 (Fri, 20 Apr 2018) | 4 lines

fiddle/import.rb: suppress warning

* ext/fiddle/lib/fiddle/import.rb: suppress exception report when
  $DEBUG is enabled.  [ruby-core:86536] [Bug #14686]
------------------------------------------------------------------------
r63204 | kou | 2018-04-20 06:34:40 +0900 (Fri, 20 Apr 2018) | 8 lines

rexml: Fix a XPath bug that white spaces aren't ignored

lib/rexml/parsers/xpathparser.rb: Ignore white spaces in relative
location path.

test/rexml/xpath/test_base.rb: Add more test patterns and use more
debug friendly assertion style.

------------------------------------------------------------------------
r63203 | kou | 2018-04-20 05:51:07 +0900 (Fri, 20 Apr 2018) | 4 lines

rexml: Fix wrong assertion

test/rexml/xpath/test_base.rb: Use constant value for the expected value.

------------------------------------------------------------------------
r63202 | kou | 2018-04-20 05:49:53 +0900 (Fri, 20 Apr 2018) | 5 lines

rexml: Use more debug friendly assertion style

test/rexml/xpath/test_base.rb: Expand loop assertion and stop to checking
just the first value.

------------------------------------------------------------------------
r63201 | kou | 2018-04-20 05:48:28 +0900 (Fri, 20 Apr 2018) | 5 lines

rexml: Use more debug friendly assertion style

test/rexml/xpath/test_base.rb: Stop to use separated assertions for
checking array value.

------------------------------------------------------------------------
r63200 | kou | 2018-04-20 05:45:16 +0900 (Fri, 20 Apr 2018) | 4 lines

rexml: Make more readable

test/rexml/xpath/test_base.rb: Use here document for XML.

------------------------------------------------------------------------
r63199 | k0kubun | 2018-04-20 01:57:59 +0900 (Fri, 20 Apr 2018) | 8 lines

_mjit_compile_send.erb: simplify control flow

to introduce additional optimization for another `cc->me->def->type`
later. I carved out the `cc->me->def->type == VM_METHOD_TYPE_ISEQ`
part because I wanted to check other types as well.

mjit_compile.c: drop get_iseq_if_available and define simplified version
of it, has_valid_method_type.
------------------------------------------------------------------------
r63198 | k0kubun | 2018-04-20 01:19:48 +0900 (Fri, 20 Apr 2018) | 9 lines

internal.h: use the same declaration as definition

range.c: cast the function type to meet the declaration

This change is for fixing build error on AppVeyor:
https://ci.appveyor.com/project/ruby/ruby/build/1.0.8177

string.c
../string.c(4330) : error C4028: formal parameter 2 different from declaration
------------------------------------------------------------------------
r63197 | mame | 2018-04-20 00:23:34 +0900 (Fri, 20 Apr 2018) | 1 line

Adds "endless range" to NEWS
------------------------------------------------------------------------
r63196 | mame | 2018-04-20 00:19:00 +0900 (Fri, 20 Apr 2018) | 3 lines

Prefer CONST_ID to static global IDs

Just refactoring.
------------------------------------------------------------------------
r63195 | mame | 2018-04-20 00:18:57 +0900 (Fri, 20 Apr 2018) | 1 line

range.c: Make Range#bsearch support endless ranges
------------------------------------------------------------------------
r63194 | mame | 2018-04-20 00:18:53 +0900 (Fri, 20 Apr 2018) | 1 line

Make Range#min, max, include?, cover?, and === to support endless range
------------------------------------------------------------------------
r63193 | svn | 2018-04-20 00:18:51 +0900 (Fri, 20 Apr 2018) | 1 line

* 2018-04-20
------------------------------------------------------------------------
r63192 | mame | 2018-04-20 00:18:50 +0900 (Fri, 20 Apr 2018) | 7 lines

Introduce endless range [Feature#12912]

Typical usages:
```
p ary[1..]          # drop the first element; identical to ary[1..-1]
(1..).each {|n|...} # iterate forever from 1; identical to 1.step{...}
```
------------------------------------------------------------------------
r63191 | naruse | 2018-04-19 16:28:40 +0900 (Thu, 19 Apr 2018) | 1 line

pack/unpack M only handles LF line breaks [Feature #14352]
------------------------------------------------------------------------
r63190 | nobu | 2018-04-19 16:05:39 +0900 (Thu, 19 Apr 2018) | 4 lines

dir.c: warning for NUL

* dir.c (rb_push_glob): warn NUL-separated glob patterns.
  [Feature #14643]
------------------------------------------------------------------------
r63189 | svn | 2018-04-19 14:55:43 +0900 (Thu, 19 Apr 2018) | 1 line

* 2018-04-19
------------------------------------------------------------------------
r63188 | nobu | 2018-04-19 14:55:42 +0900 (Thu, 19 Apr 2018) | 5 lines

Add slice method to ENV like Hash#slice

[Feature #14559]

From:    Benoit Tigeot <benoit@hopsandfork.com>
------------------------------------------------------------------------
r63187 | nobu | 2018-04-18 12:51:19 +0900 (Wed, 18 Apr 2018) | 7 lines

win32.c: fix CSI sequences to delete

* win32/win32.c (constat_apply): CSI 'J' and 'K' are defaulted to
  1, not 0.  [ruby-core:86560] [Bug #14691]

* win32/win32.c (constat_apply): "delete before cursor" sequences
  include the cursor position.
------------------------------------------------------------------------
r63186 | stomar | 2018-04-18 04:52:10 +0900 (Wed, 18 Apr 2018) | 5 lines

lib/uri/generic.rb: fix error in docs for URI::Generic#opaque

* lib/uri/generic.rb: [DOC] fix description of URI::Generic#opaque,
  and add an example. According to RFC2396, opaque path components do not
  use the slash "/" character, as opposed to hierarchical path components.
------------------------------------------------------------------------
r63185 | stomar | 2018-04-18 04:49:51 +0900 (Wed, 18 Apr 2018) | 4 lines

lib/uri/ldap.rb: fix errors in docs for URI::LDAP

* lib/uri/ldap.rb: [DOC] fix errors in example code
  for URI::LDAP.build and URI::LDAP.new.
------------------------------------------------------------------------
r63184 | stomar | 2018-04-18 04:47:57 +0900 (Wed, 18 Apr 2018) | 5 lines

lib/uri/file.rb: fix errors in docs for URI::File.build

* lib/uri/file.rb: [DOC] fix description and example for URI::File.build;
  for file URIs the path component must be absolute, escaping of
  absolute paths is only done for URI::FTP.
------------------------------------------------------------------------
r63183 | svn | 2018-04-18 04:46:26 +0900 (Wed, 18 Apr 2018) | 1 line

* 2018-04-18
------------------------------------------------------------------------
r63182 | stomar | 2018-04-18 04:46:25 +0900 (Wed, 18 Apr 2018) | 5 lines

lib/uri/file.rb: improve docs for URI::File

* lib/uri/file.rb: [DOC] fix invalid example code for URI::File.build
  to make it syntax highlighted; drop unnecessary `puts';
  fix unintended description list; fix typos.
------------------------------------------------------------------------
r63181 | mame | 2018-04-17 17:52:25 +0900 (Tue, 17 Apr 2018) | 1 line

test/ruby/test_super.rb: Remove unused assertions
------------------------------------------------------------------------
r63180 | mame | 2018-04-17 17:47:58 +0900 (Tue, 17 Apr 2018) | 1 line

The test for TracePoint with thread had never worked correctly
------------------------------------------------------------------------
r63179 | mame | 2018-04-17 17:47:56 +0900 (Tue, 17 Apr 2018) | 1 line

The test for TracePoint#raised_exception had never worked correctly
------------------------------------------------------------------------
r63178 | mame | 2018-04-17 17:47:56 +0900 (Tue, 17 Apr 2018) | 1 line

Remove the old disabled assertions for 1.8/1.9
------------------------------------------------------------------------
r63177 | mame | 2018-04-17 17:26:20 +0900 (Tue, 17 Apr 2018) | 1 line

Enable the assertions that had been disabled for historical reason
------------------------------------------------------------------------
r63176 | mame | 2018-04-17 17:26:19 +0900 (Tue, 17 Apr 2018) | 1 line

Remove the assertions that have no meaning
------------------------------------------------------------------------
r63175 | mame | 2018-04-17 17:18:58 +0900 (Tue, 17 Apr 2018) | 1 line

Remove the disabled old tests for Ruby 1.8/1.9 feature change
------------------------------------------------------------------------
r63174 | mame | 2018-04-17 17:18:57 +0900 (Tue, 17 Apr 2018) | 1 line

Use assert(false) for the path that is expected unreachable
------------------------------------------------------------------------
r63173 | mame | 2018-04-17 17:18:56 +0900 (Tue, 17 Apr 2018) | 3 lines

test/date/test_date_base.rb: removed

It depends upon calendar.so which is not bundled.
------------------------------------------------------------------------
r63172 | mame | 2018-04-17 16:03:44 +0900 (Tue, 17 Apr 2018) | 3 lines

test/csv/test_features.rb: enable accidentally-disabled assertions

CSV.new does not yield the instance.
------------------------------------------------------------------------
r63171 | mame | 2018-04-17 15:38:08 +0900 (Tue, 17 Apr 2018) | 1 line

test/zlib/test_zlib.rb (test_path): enable the accidentally-disabled assertion
------------------------------------------------------------------------
r63170 | nobu | 2018-04-17 13:12:57 +0900 (Tue, 17 Apr 2018) | 3 lines

string.c: suppress warning

* string.c (str_undump): get rid of warning C4129 by VC.
------------------------------------------------------------------------
r63169 | svn | 2018-04-17 10:22:27 +0900 (Tue, 17 Apr 2018) | 1 line

* 2018-04-17
------------------------------------------------------------------------
r63168 | nobu | 2018-04-17 10:22:26 +0900 (Tue, 17 Apr 2018) | 6 lines

parse.y: fix cmdarg in command_args

* parse.y (call_args): fix invalid CMDARG state after command_args
  followed by tLBRACE_ARG.  [ruby-core:86551] [Bug #14690]

From: Ilya Bylich <ibylich@gmail.com>
------------------------------------------------------------------------
r63167 | nobu | 2018-04-16 21:46:08 +0900 (Mon, 16 Apr 2018) | 4 lines

compile.c: align range

* compile.c (ibf_dump_object_struct): align range elements.
  [ruby-core:86548] [Bug #14689]
------------------------------------------------------------------------
r63166 | k0kubun | 2018-04-16 19:20:15 +0900 (Mon, 16 Apr 2018) | 8 lines

[DOC] Fix links of cve [ci skip]

`http://www.cve.mitre.org/` seem to move `http://cve.mitre.org/`.
I can't access `http://www.cve.mitre.org/`.

[Fix GH-1857]

From: willnet <netwillnet@gmail.com>
------------------------------------------------------------------------
r63165 | nobu | 2018-04-16 17:54:03 +0900 (Mon, 16 Apr 2018) | 4 lines

parse.y: `else` indent

* parse.y (keyword_else): warn less-indented `else` than `case`.
  [ruby-core:86492] [Bug #14674]
------------------------------------------------------------------------
r63164 | nobu | 2018-04-16 16:12:06 +0900 (Mon, 16 Apr 2018) | 4 lines

string.c: fix dumped suffix

* string.c (rb_str_dump): get rid of an error on evaling with
  frozen-string-literal enabled.  [ruby-core:86539] [Bug #14687]
------------------------------------------------------------------------
r63163 | svn | 2018-04-16 15:37:43 +0900 (Mon, 16 Apr 2018) | 1 line

* 2018-04-16
------------------------------------------------------------------------
r63162 | nobu | 2018-04-16 15:37:42 +0900 (Mon, 16 Apr 2018) | 5 lines

string.c: fix checking order

* string.c (str_undump): check for suffix before if Unicode escape
  conflicts with it.  the message "but used force_encoding" sounds
  strange when it is not used.
------------------------------------------------------------------------
r63161 | stomar | 2018-04-15 01:51:34 +0900 (Sun, 15 Apr 2018) | 1 line

thread_sync.c: [DOC] fix typo
------------------------------------------------------------------------
r63160 | stomar | 2018-04-15 01:50:42 +0900 (Sun, 15 Apr 2018) | 1 line

string.c: [DOC] fix typo
------------------------------------------------------------------------
r63159 | stomar | 2018-04-15 01:50:06 +0900 (Sun, 15 Apr 2018) | 1 line

gc.c: [DOC] fix typo
------------------------------------------------------------------------
r63158 | stomar | 2018-04-15 01:49:27 +0900 (Sun, 15 Apr 2018) | 1 line

process.c: [DOC] fix grammar
------------------------------------------------------------------------
r63157 | stomar | 2018-04-15 01:48:40 +0900 (Sun, 15 Apr 2018) | 1 line

man/ruby.1: [DOC] fix grammar
------------------------------------------------------------------------
r63156 | stomar | 2018-04-15 01:47:59 +0900 (Sun, 15 Apr 2018) | 1 line

lib/fileutils.rb: [DOC] fix typos and grammar
------------------------------------------------------------------------
r63155 | stomar | 2018-04-15 01:46:58 +0900 (Sun, 15 Apr 2018) | 1 line

error.c: [DOC] minor fixes
------------------------------------------------------------------------
r63154 | stomar | 2018-04-15 01:45:46 +0900 (Sun, 15 Apr 2018) | 4 lines

random.c: improve docs for Random.bytes

* random.c: [DOC] improve language and RDoc markup in Random.bytes docs;
  also adjust call-seq style of Random.bytes and Random#bytes.
------------------------------------------------------------------------
r63153 | svn | 2018-04-15 01:43:43 +0900 (Sun, 15 Apr 2018) | 1 line

* 2018-04-15
------------------------------------------------------------------------
r63152 | stomar | 2018-04-15 01:43:42 +0900 (Sun, 15 Apr 2018) | 4 lines

complex.c: improve docs for Complex#{finite?,infinite?}

* complex.c: [DOC] correct term "real value" to "real part", and same
  for imaginary part, in documentation for Complex#{finite?,infinite?}.
------------------------------------------------------------------------
r63151 | naruse | 2018-04-14 23:05:38 +0900 (Sat, 14 Apr 2018) | 4 lines

Extend timeout

On armv7 environment, the timeout is too short
http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180319T191706Z.diff.html.gz
------------------------------------------------------------------------
r63150 | nobu | 2018-04-14 22:05:52 +0900 (Sat, 14 Apr 2018) | 7 lines

irb.rb: restore the last error

* lib/irb.rb (eval_input): restore the last error `$!`, as the
  previous result.  [Feature #14684]

* lib/irb/context.rb (evaluate): add `exception` keyword argument
  to set the last error.
------------------------------------------------------------------------
r63149 | nobu | 2018-04-14 21:49:30 +0900 (Sat, 14 Apr 2018) | 1 line

irb/{context,workspace}.rb: use local_variable_set
------------------------------------------------------------------------
r63148 | nobu | 2018-04-14 21:36:05 +0900 (Sat, 14 Apr 2018) | 1 line

irb/context.rb: using input-method
------------------------------------------------------------------------
r63147 | tenderlove | 2018-04-14 06:36:51 +0900 (Sat, 14 Apr 2018) | 10 lines

Add write barrier calls for direct marking objects.

This commit adds write barriers for objects marked from `rb_iseq_mark`.
r62851 introduced direct marking from iseqs to:

* keyword arg default values
* catch table iseqs
* VALUEs embedded in encoded instructions

This patch adds missing write barrier calls to those references.
------------------------------------------------------------------------
r63146 | nobu | 2018-04-14 03:11:22 +0900 (Sat, 14 Apr 2018) | 4 lines

irb.rb: backtrace order

* lib/irb.rb (handle_exception): show backtrace from the topmost
  if stdout is not a tty.
------------------------------------------------------------------------
r63145 | svn | 2018-04-14 03:06:36 +0900 (Sat, 14 Apr 2018) | 1 line

* 2018-04-14
------------------------------------------------------------------------
r63144 | nobu | 2018-04-14 03:06:35 +0900 (Sat, 14 Apr 2018) | 1 line

irb.rb: hoist out handle_exception
------------------------------------------------------------------------
r63143 | nobu | 2018-04-13 15:26:30 +0900 (Fri, 13 Apr 2018) | 4 lines

file.c: chardev is loadable

* file.c (ruby_is_fd_loadable): allow character devices to load,
  e.g., `ruby /dev/null` exits successfully.
------------------------------------------------------------------------
r63142 | svn | 2018-04-13 07:13:10 +0900 (Fri, 13 Apr 2018) | 1 line

* 2018-04-13
------------------------------------------------------------------------
r63141 | nobu | 2018-04-13 07:13:09 +0900 (Fri, 13 Apr 2018) | 4 lines

parse.y: `when` indent

* parse.y (k_when): warn less-indented `when` than `case`.
  [ruby-core:86492] [Bug #14674]
------------------------------------------------------------------------
r63140 | svn | 2018-04-12 23:24:07 +0900 (Thu, 12 Apr 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63139 | kazu | 2018-04-12 23:24:06 +0900 (Thu, 12 Apr 2018) | 3 lines

[DOC] Add win32/README.win32 to .document

see https://github.com/ruby/docs.ruby-lang.org/issues/56
------------------------------------------------------------------------
r63138 | nobu | 2018-04-12 21:01:51 +0900 (Thu, 12 Apr 2018) | 1 line

assert indents of `case` and `end`
------------------------------------------------------------------------
r63137 | nobu | 2018-04-12 18:34:54 +0900 (Thu, 12 Apr 2018) | 4 lines

error.c: fix for DRb

* error.c (name_err_init_attr): hide the receiver object from
  Marshal, as DRb depends on it.
------------------------------------------------------------------------
r63136 | nobu | 2018-04-12 12:48:48 +0900 (Thu, 12 Apr 2018) | 12 lines

error.c: super in method_missing

* error.c (nometh_err_initialize): do not shirtcut rb_call_super,
  to push proper control frame.  [ruby-dev:50522] [Bug #14670]

* error.c (rb_nomethod_err_new): allocate and initialize a new
  NoMethodError instance.

* vm_eval.c (rb_make_no_method_exception): create a new exception
  instance directly without method calls, to prevent influence of
  ruby level method definitions, which can cause an unpredictable
  behavior, e.g., infinite recursion.
------------------------------------------------------------------------
r63135 | svn | 2018-04-12 12:40:17 +0900 (Thu, 12 Apr 2018) | 1 line

* 2018-04-12
------------------------------------------------------------------------
r63134 | nobu | 2018-04-12 12:40:16 +0900 (Thu, 12 Apr 2018) | 5 lines

marshaltestlib.rb: use clean object for exception

* test/ruby/marshaltestlib.rb (test_exception): use separate
  clean object to raise an exception.  TestCase instance often has
  modules included.
------------------------------------------------------------------------
r63133 | nobu | 2018-04-11 17:03:43 +0900 (Wed, 11 Apr 2018) | 6 lines

eval_error.c: fix loop on exception in message

* error.c (rb_get_message): accessor to the message.

* eval_error.c (rb_ec_error_print): handle exceptions on fetching
  the message.  [Bug #14566]
------------------------------------------------------------------------
r63132 | svn | 2018-04-11 00:29:17 +0900 (Wed, 11 Apr 2018) | 1 line

* 2018-04-11
------------------------------------------------------------------------
r63131 | kazu | 2018-04-11 00:29:16 +0900 (Wed, 11 Apr 2018) | 3 lines

Try to fix some broken links

see https://github.com/ruby/docs.ruby-lang.org/issues/56
------------------------------------------------------------------------
r63130 | nobu | 2018-04-10 09:41:47 +0900 (Tue, 10 Apr 2018) | 7 lines

symbol.c: non-ASCII constant names

* symbol.c (rb_sym_constant_char_p): support for non-ASCII
  constant names.  [Feature #13770]

* object.c (rb_mod_const_get, rb_mod_const_defined): support for
  non-ASCII constant names.
------------------------------------------------------------------------
r63129 | svn | 2018-04-10 01:00:50 +0900 (Tue, 10 Apr 2018) | 1 line

* 2018-04-10
------------------------------------------------------------------------
r63128 | kou | 2018-04-10 01:00:49 +0900 (Tue, 10 Apr 2018) | 7 lines

rexml: Fix a XPath bug of -

[Bug #14600]

* lib/rexml/parsers/xpathparser.rb: Fix a bug that "N-M" requires a space
  before "-".

------------------------------------------------------------------------
r63127 | nobu | 2018-04-09 21:39:59 +0900 (Mon, 09 Apr 2018) | 6 lines

parse.y: [DOC] Ripper.dedent_string is internal

* parse.y (parser_dedent_string): stated that Ripper.dedent_string
  is for internal use only.

[ci skip]
------------------------------------------------------------------------
r63126 | nobu | 2018-04-09 20:09:30 +0900 (Mon, 09 Apr 2018) | 4 lines

parse.y: extra error message after no digits

* parse.y (no_digits): return tINTEGER instead of unexpected
  end-of-input, to get rid of extra error messages.
------------------------------------------------------------------------
r63125 | nobu | 2018-04-09 18:59:36 +0900 (Mon, 09 Apr 2018) | 1 line

test_literal.rb: use assert_syntax_error
------------------------------------------------------------------------
r63124 | shyouhei | 2018-04-09 12:24:21 +0900 (Mon, 09 Apr 2018) | 5 lines

offsetof(type, foo.bar) is (arguably) a GCCism

clang -Wextended-offsetof warns this line.
CF: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2031.htm

------------------------------------------------------------------------
r63123 | shyouhei | 2018-04-09 11:40:12 +0900 (Mon, 09 Apr 2018) | 4 lines

Prefer alignof() over _Alignof()

to allow C++ programs include <ruby.h>. [Bug #14668]

------------------------------------------------------------------------
r63122 | svn | 2018-04-09 04:39:39 +0900 (Mon, 09 Apr 2018) | 1 line

* 2018-04-09
------------------------------------------------------------------------
r63121 | stomar | 2018-04-09 04:39:38 +0900 (Mon, 09 Apr 2018) | 4 lines

parse.y: fix docs for Ripper.dedent_string

* parse.y: [DOC] fix return type in call-seq of Ripper.dedent_string,
  clarify the method's behavior.
------------------------------------------------------------------------
r63120 | nobu | 2018-04-08 20:17:45 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: disable debug prints on sparc
------------------------------------------------------------------------
r63119 | nobu | 2018-04-08 20:12:17 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: fix an exception argument
------------------------------------------------------------------------
r63118 | nobu | 2018-04-08 17:28:40 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: suppress warnings
------------------------------------------------------------------------
r63117 | nobu | 2018-04-08 17:20:11 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: align ibf_object_header
------------------------------------------------------------------------
r63116 | nobu | 2018-04-08 16:42:23 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: debug prints in ibf_load_object
------------------------------------------------------------------------
r63115 | kazu | 2018-04-08 16:31:46 +0900 (Sun, 08 Apr 2018) | 7 lines

[DOC] `*` in glob matches `\n` too [ci skip]

```
File.fnmatch("a*b", "a\nb") # => true
/\Aa.*b\z/x.match?("a\nb")  # => false
/\Aa.*b\z/mx.match?("a\nb") # => true
```
------------------------------------------------------------------------
r63114 | svn | 2018-04-08 14:22:50 +0900 (Sun, 08 Apr 2018) | 1 line

* 2018-04-08
------------------------------------------------------------------------
r63113 | nobu | 2018-04-08 14:22:49 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: align IBF dumped data
------------------------------------------------------------------------
r63112 | nobu | 2018-04-07 22:03:35 +0900 (Sat, 07 Apr 2018) | 7 lines

Remove outdated example from Numeric documentation

Since 2.5, Numeric instances can be cloned and duplicated.

[Fix GH-1850]

From: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r63111 | nobu | 2018-04-07 18:44:30 +0900 (Sat, 07 Apr 2018) | 4 lines

compile.c: refine debug prints

* compile.c (ibf_load_iseq_complete): use alternate hexadecimal
  form for offset.
------------------------------------------------------------------------
r63110 | nobu | 2018-04-07 12:48:45 +0900 (Sat, 07 Apr 2018) | 1 line

test/ruby/test_iseq.rb: hexdump to diff
------------------------------------------------------------------------
r63109 | nobu | 2018-04-07 12:48:44 +0900 (Sat, 07 Apr 2018) | 6 lines

Use assert_include

For better failure message:

- by assert_operator: Expected "X" to be include? "Y"
- by assert_include: Expected "X" to include "Y"
------------------------------------------------------------------------
r63108 | stomar | 2018-04-07 05:50:28 +0900 (Sat, 07 Apr 2018) | 1 line

tool/ruby_vm/scripts/insns2vm.rb: fix typo in r62064
------------------------------------------------------------------------
r63107 | svn | 2018-04-07 00:06:53 +0900 (Sat, 07 Apr 2018) | 1 line

* 2018-04-07
------------------------------------------------------------------------
r63106 | kazu | 2018-04-07 00:06:52 +0900 (Sat, 07 Apr 2018) | 1 line

Use assert_operator instead of assert
------------------------------------------------------------------------
r63105 | svn | 2018-04-06 22:25:12 +0900 (Fri, 06 Apr 2018) | 1 line

* 2018-04-06
------------------------------------------------------------------------
r63104 | nobu | 2018-04-06 22:25:11 +0900 (Fri, 06 Apr 2018) | 1 line

symbol.h: remove stale symbol deleted at r47913
------------------------------------------------------------------------
r63103 | nobu | 2018-04-05 22:13:00 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: fix positions encode

* compile.c (ibf_load_iseq_each): iseq_size necessary to encode
  positions is set in ibf_load_code().  [Bug #14660]
------------------------------------------------------------------------
r63102 | nobu | 2018-04-05 21:46:46 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: do not dump pointers

* compile.c (ibf_dump_iseq_each): ensure succ_index_table pointer
  field to be 0.
------------------------------------------------------------------------
r63101 | nobu | 2018-04-05 21:03:36 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: clear padding

* compile.c (IBF_ZERO): clear padding of struct not to include
  garbages in dumped binary data.
------------------------------------------------------------------------
r63100 | mame | 2018-04-05 18:48:16 +0900 (Thu, 05 Apr 2018) | 4 lines

lib/rubygems/test_case.rb: take over @gem_prelude_index

Gem::TestCase normalizes each path in $LOAD_PATH, which deleted the flag
of @gem_prelude_index.
------------------------------------------------------------------------
r63099 | nobu | 2018-04-05 16:04:39 +0900 (Thu, 05 Apr 2018) | 5 lines

compile.c: do not dump pointers

* compile.c (ibf_dump_iseq_each): do not dump succ_index_table
  pointer.  positions are dumped as integer arrays.  pointer
  values are meaningless outside the process.
------------------------------------------------------------------------
r63098 | nobu | 2018-04-05 16:00:08 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: zero fill

* compile.c (ibf_dump_align): fill padding with zero, instead of
  resizing only, not to leave garbages.
------------------------------------------------------------------------
r63097 | mame | 2018-04-05 10:05:16 +0900 (Thu, 05 Apr 2018) | 1 line

`make test-all COVERAGE=true` supports directory-separated build
------------------------------------------------------------------------
r63096 | usa | 2018-04-05 00:44:56 +0900 (Thu, 05 Apr 2018) | 4 lines

* test/test_tempfile.rb (test_{new,create}_traversal_dir): should not assume `t`
  is always set.  if `t` is nil, `NoMethodError` will be raised and the real
  cause will be hidden.

------------------------------------------------------------------------
r63095 | svn | 2018-04-05 00:26:12 +0900 (Thu, 05 Apr 2018) | 1 line

* 2018-04-05
------------------------------------------------------------------------
r63094 | mame | 2018-04-05 00:26:11 +0900 (Thu, 05 Apr 2018) | 3 lines

test/test_tempfile.rb: close a file object created by Tempfile.create

To stop a "Leaked file descriptor" warning.
------------------------------------------------------------------------
r63093 | mame | 2018-04-04 23:02:59 +0900 (Wed, 04 Apr 2018) | 4 lines

bignum.c: Bignum#fdiv avoids double division when divisor is bignum

`Rational(int, bignum).to_f` sometimes returned a wrong result because
`Bignum#div` casted its divisor to double.  [Bug #14637] [ruby-core:86330]
------------------------------------------------------------------------
r63092 | k0kubun | 2018-04-04 22:17:01 +0900 (Wed, 04 Apr 2018) | 17 lines

mjit_compile.c: disable stack consistency check

This should be basically safe because VM already does this check.
I don't think JIT-ed code, which should be specially optimized, should
still do this.

* Benchmark

Calculating -------------------------------------
                         before  before,--jit  after,--jit
           optcarrot     53.851        68.050       71.641 fps

Comparison:
                        optcarrot
         after,--jit:        71.6 fps
        before,--jit:        68.1 fps - 1.05x  slower
              before:        53.9 fps - 1.33x  slower
------------------------------------------------------------------------
r63091 | nobu | 2018-04-04 20:00:39 +0900 (Wed, 04 Apr 2018) | 3 lines

iseq.c: indent iseq dump

* iseq.c (rb_iseq_disasm): indent catch_table iseq entries.
------------------------------------------------------------------------
r63090 | ko1 | 2018-04-04 17:19:28 +0900 (Wed, 04 Apr 2018) | 11 lines

refactoring r63073.

* cont.c (root_fiber_alloc): call `ConvertThreadToFiber()` here.

  `rb_fiber_t` for root_fiber is allocated before running Threads.
  Fiber objects wrapping this rb_fiber_t for root_fiber are created
  when root Fiber object is required explicitly (for example, Fiber
  switching and so on). We can put calling `ConvertThreadToFiber()`.
  In other words, we can pending `ConvertThreadToFiber()`
  until Fiber objects are created.

------------------------------------------------------------------------
r63089 | yui-knk | 2018-04-04 16:46:06 +0900 (Wed, 04 Apr 2018) | 3 lines

gc.c: Fix a typo

Pointed by hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r63088 | kou | 2018-04-04 15:53:57 +0900 (Wed, 04 Apr 2018) | 9 lines

rexml: Fix a XPath bug of /child::node()
    
[Bug #14600]
    
* lib/rexml/xpath_parser.rb: Fix a bug that "/child::node()" returns
  XML declaration and text nodes out of root element.

* test/rexml/test_jaxen.rb: Enable more tests.

------------------------------------------------------------------------
r63087 | kou | 2018-04-04 15:51:07 +0900 (Wed, 04 Apr 2018) | 2 lines

rexml: Add codes for debugging XPath logic

------------------------------------------------------------------------
r63086 | kou | 2018-04-04 15:36:06 +0900 (Wed, 04 Apr 2018) | 7 lines

rexml: Fix a XPath bug of function()/path
    
[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "function()/path" always returns
  nothing.

------------------------------------------------------------------------
r63085 | ko1 | 2018-04-04 14:00:52 +0900 (Wed, 04 Apr 2018) | 5 lines

use Queue for inter-thread synchronization.

* test/ruby/test_bignum.rb (test_interrupt_during_to_s): should not use
  "while" synchronization, but should use Queue.

------------------------------------------------------------------------
r63084 | nobu | 2018-04-04 13:28:47 +0900 (Wed, 04 Apr 2018) | 1 line

iseq.c: strip trailing spaces in dump
------------------------------------------------------------------------
r63083 | kou | 2018-04-04 12:27:20 +0900 (Wed, 04 Apr 2018) | 9 lines

rexml: Fix a XPath bug of @attribute/parent

[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "@attribute/parent" doesn't
  return element of its attribute.

* test/rexml/test_jaxen.rb: Enable more tests.

------------------------------------------------------------------------
r63082 | kou | 2018-04-04 12:26:01 +0900 (Wed, 04 Apr 2018) | 7 lines

rexml: Fix a  XPath bug of $variable

[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "$variable" returns
  node instead of ndoe set.

------------------------------------------------------------------------
r63081 | nobu | 2018-04-04 01:54:27 +0900 (Wed, 04 Apr 2018) | 5 lines

test_fiber.rb: fix test_create_fiber_in_new_thread

* test/ruby/test_fiber.rb (test_create_fiber_in_new_thread):
  prefix to run, and get the result value not only waiting.
  [Bug #14642]
------------------------------------------------------------------------
r63080 | nobu | 2018-04-04 01:50:17 +0900 (Wed, 04 Apr 2018) | 6 lines

Fix typo

[Bug #14642]
[Fix GH-1855]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r63079 | kou | 2018-04-04 00:51:08 +0900 (Wed, 04 Apr 2018) | 9 lines

rexml: Fix a XPath bug of name(node-set)

[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "name(node-set)" returns
  element instead of element name.
  
* test/rexml/test_jaxen.rb: Enable more tests.

------------------------------------------------------------------------
r63078 | svn | 2018-04-04 00:42:01 +0900 (Wed, 04 Apr 2018) | 1 line

* 2018-04-04
------------------------------------------------------------------------
r63077 | k0kubun | 2018-04-04 00:42:00 +0900 (Wed, 04 Apr 2018) | 10 lines

mjit.c: add class serial of singleton class

for toplevel self.

Toplevel self's class is not `Object` but `#<Class:Object>`.
This commit allows to inline method call setup for toplevel methods.
I've thought r63053 works but it doesn't...

I actually want to add all singleton classes but I'm not sure what's the
good way for it. I assumed that using ObjectSpace.each_object is suboptimal.
------------------------------------------------------------------------
r63076 | nobu | 2018-04-03 20:27:00 +0900 (Tue, 03 Apr 2018) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r63075 | nobu | 2018-04-03 19:50:47 +0900 (Tue, 03 Apr 2018) | 1 line

Reproducible test for [Feature#14370] @ [Bug #14660]
------------------------------------------------------------------------
r63074 | ko1 | 2018-04-03 19:22:45 +0900 (Tue, 03 Apr 2018) | 2 lines

repatch r62966 and r62969.

------------------------------------------------------------------------
r63073 | ko1 | 2018-04-03 19:21:47 +0900 (Tue, 03 Apr 2018) | 21 lines

Fix Fiber with Thread issue on Windows [Bug #14642]

* cont.c (rb_threadptr_root_fiber_setup): divide into two functions:
  * rb_threadptr_root_fiber_setup_by_parent(): called by the parent thread.
  * rb_threadptr_root_fiber_setup_by_child(): called by the created thread.

  `rb_threadptr_root_fiber_setup()` is called by the parent thread and
  set fib->fib_handle by ConvertThreadToFiber() on the parent thread on
  Windows enveironment.
  This means that root_fib->fib_handle of child thread is initialized
  with parent thread's Fiber handle. Furthermore, second call of
  `ConvertThreadToFiber()` for the same thread fails.

  This patch solves this weird situateion. However, maybe we can make more
  clean code.

* thread.c (thread_start_func_2): call
  `rb_threadptr_root_fiber_setup_by_child()` at thread initialize routine.

* vm.c (th_init): call `rb_threadptr_root_fiber_setup_by_parent()`.

------------------------------------------------------------------------
r63072 | nobu | 2018-04-03 17:29:51 +0900 (Tue, 03 Apr 2018) | 1 line

Honor --silent option
------------------------------------------------------------------------
r63071 | nobu | 2018-04-03 17:29:50 +0900 (Tue, 03 Apr 2018) | 1 line

Fixed unmatched quotes and brackets
------------------------------------------------------------------------
r63070 | nobu | 2018-04-03 17:10:32 +0900 (Tue, 03 Apr 2018) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r63069 | naruse | 2018-04-03 16:54:18 +0900 (Tue, 03 Apr 2018) | 3 lines

Revert r62966 and r62969

It breaks mswin's test-all
------------------------------------------------------------------------
r63068 | nobu | 2018-04-03 15:57:44 +0900 (Tue, 03 Apr 2018) | 5 lines

proc.c: fix segfault when no singleton class

* proc.c (rb_obj_singleton_method): bail out if the receiver does
  not have the singleton class without accessing the origin class
  not to segfault.  [Bug #14658]
------------------------------------------------------------------------
r63067 | nobu | 2018-04-03 15:57:43 +0900 (Tue, 03 Apr 2018) | 6 lines

Fix Kernel#singleton_method with Module#Prepend

* proc.c (rb_obj_singleton_method): search the method entry from
  the origin class, for fix prepended modules.  [Bug #14658]

From: Vasiliy Ermolovich <younash@gmail.com>
------------------------------------------------------------------------
r63066 | nobu | 2018-04-03 15:25:10 +0900 (Tue, 03 Apr 2018) | 1 line

removed never used variable
------------------------------------------------------------------------
r63065 | svn | 2018-04-03 14:56:17 +0900 (Tue, 03 Apr 2018) | 1 line

* 2018-04-03
------------------------------------------------------------------------
r63064 | hsbt | 2018-04-03 14:56:16 +0900 (Tue, 03 Apr 2018) | 1 line

Support upstream directory structure for ruby/csv.
------------------------------------------------------------------------
r63063 | nobu | 2018-04-02 21:39:01 +0900 (Mon, 02 Apr 2018) | 3 lines

Win32API.rb: use uplevel option to warn

Also warns always regardless $VERBOSE.
------------------------------------------------------------------------
r63062 | nobu | 2018-04-02 20:39:10 +0900 (Mon, 02 Apr 2018) | 5 lines

error.c: prepend "warning: " always

* error.c (rb_warn_m): prepend the string "warning: " if uplevel
  keyword is given, even if caller file and line information are
  not available.
------------------------------------------------------------------------
r63061 | nobu | 2018-04-02 13:44:35 +0900 (Mon, 02 Apr 2018) | 4 lines

Improve mkmf error message

* lib/mkmf.rb: Improve the error message when ruby.h is missing,
  to suggest installing separate packages.  [Feature #14656]
------------------------------------------------------------------------
r63060 | nobu | 2018-04-02 13:20:07 +0900 (Mon, 02 Apr 2018) | 5 lines

Keep feature names loaded in the block

* lib/rubygems/test_case.rb (Gem::TestCase#save_loaded_features):
  keep feature names for rubygem libraries loaded in the block.
  c.f. rubygems/rubygems#2261
------------------------------------------------------------------------
r63059 | nobu | 2018-04-02 12:30:30 +0900 (Mon, 02 Apr 2018) | 6 lines

Fix typo on URI.hierarchical? [ci skip]

* lib/uri/generic.rb (hierarchical?): [DOC] Fix typo in the
  description.  [Fix GH-1851]

From: Harry Llewelyn <advocation@gmail.com>
------------------------------------------------------------------------
r63058 | svn | 2018-04-02 01:17:53 +0900 (Mon, 02 Apr 2018) | 1 line

* 2018-04-02
------------------------------------------------------------------------
r63057 | kou | 2018-04-02 01:17:52 +0900 (Mon, 02 Apr 2018) | 10 lines

Start re-enabling Jaxen tests

[Bug #14600]
Reported by MSP-Greg. Thanks!!!

* lib/rexml/xpath_parser.rb: Fix a bug that "following_siblings::*[N]"
  doesn't work.

* test/rexml/test_jaxen.rb: Enable only axis test for now.

------------------------------------------------------------------------
r63056 | nobu | 2018-04-01 22:16:14 +0900 (Sun, 01 Apr 2018) | 5 lines

test_time_tz.rb: Lisbon tzdata fix

* test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update
  Lisbon zdump data, which fixed the 1912-01-01 transition for
  Portugual and its colonies.  [Bug #14655]
------------------------------------------------------------------------
r63055 | nobu | 2018-04-01 22:02:11 +0900 (Sun, 01 Apr 2018) | 5 lines

test_time_tz.rb: Kiritimati tzdata fix

* test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected
  data at the Kiritimati's skip of New Year's Eve 1994.
  [Bug #14655]
------------------------------------------------------------------------
r63054 | nobu | 2018-04-01 11:00:36 +0900 (Sun, 01 Apr 2018) | 5 lines

test_time_tz.rb: Kiritimati tzdata fix

* test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati):
  fix the expected data at the skip of New Year's Eve 1994.
  [Bug #14655]
------------------------------------------------------------------------
r63053 | k0kubun | 2018-04-01 10:41:55 +0900 (Sun, 01 Apr 2018) | 4 lines

mjit.c: make Object's class serial valid in JIT

Without this change, we couldn't inline method call setup for methods
which are defined in the top level.
------------------------------------------------------------------------
r63052 | svn | 2018-04-01 00:48:59 +0900 (Sun, 01 Apr 2018) | 1 line

* 2018-04-01
------------------------------------------------------------------------
r63051 | nobu | 2018-04-01 00:48:59 +0900 (Sun, 01 Apr 2018) | 3 lines

compile.c: compile_evstr

* compile.c (compile_evstr): extract from iseq_compile_each.
------------------------------------------------------------------------
r63050 | nobu | 2018-04-01 00:48:57 +0900 (Sun, 01 Apr 2018) | 4 lines

compile.c: end_label

* compile.c (compile_if): branch to end_label is not used if
  else_seq is not used.
------------------------------------------------------------------------
r63048 | naruse | 2018-03-31 22:48:32 +0900 (Sat, 31 Mar 2018) | 1 line

Resurvey performance of RDoc by frozen_string_literal: true [Bug #14654]
------------------------------------------------------------------------
r63047 | nobu | 2018-03-31 20:11:31 +0900 (Sat, 31 Mar 2018) | 1 line

use requrie_relative
------------------------------------------------------------------------
r63046 | nobu | 2018-03-31 19:34:16 +0900 (Sat, 31 Mar 2018) | 5 lines

use require_relative

* spec/ruby/core/file/ftype_spec.rb: use require_relative which
  resolves symbolic links consistently to git rid of constant
  re-definition warnings.
------------------------------------------------------------------------
r63045 | nobu | 2018-03-31 15:05:04 +0900 (Sat, 31 Mar 2018) | 6 lines

file_types.rb: use the current terminal device

* spec/ruby/core/file/fixtures/file_types.rb (configure_types):
  try the current standard input terminal device first to get rid
  of a race condition.  other terminal devices may be used by
  other processes and disposed during the test.
------------------------------------------------------------------------
r63044 | kazu | 2018-03-31 11:29:19 +0900 (Sat, 31 Mar 2018) | 1 line

test/lib/leakchecker.rb: Add check_verbose
------------------------------------------------------------------------
r63043 | svn | 2018-03-31 00:08:53 +0900 (Sat, 31 Mar 2018) | 1 line

* 2018-03-31
------------------------------------------------------------------------
r63042 | k0kubun | 2018-03-31 00:08:52 +0900 (Sat, 31 Mar 2018) | 3 lines

test_jit.rb: loosen CC check condition

see also: r63037. Probably it was not enough.
------------------------------------------------------------------------
r63041 | nobu | 2018-03-30 22:48:16 +0900 (Fri, 30 Mar 2018) | 4 lines

dir.c: Dir.glob example

* dir.c (dir_s_glob): [DOC] added an example of Dir.glob using
  pattern list.  [ci skip]
------------------------------------------------------------------------
r63040 | nobu | 2018-03-30 14:15:07 +0900 (Fri, 30 Mar 2018) | 5 lines

compile.c: do not dump unused callinfos

* compile.c (compile_if): rewind callinfo indexes used in
  unreachable paths, to get rid of dumping unused callinfos.
  [ruby-core:86399] [Bug #14553]
------------------------------------------------------------------------
r63039 | svn | 2018-03-30 11:52:13 +0900 (Fri, 30 Mar 2018) | 1 line

* 2018-03-30
------------------------------------------------------------------------
r63038 | nobu | 2018-03-30 11:52:12 +0900 (Fri, 30 Mar 2018) | 5 lines

ruby.1: [DOC] options to exit [ci skip]

* man/ruby.1: `--copyright` and `--version` quit immediately, and
  also `--verbose` if no scripts are given.
  [ruby-core:86391] [Bug #14633]
------------------------------------------------------------------------
r63037 | k0kubun | 2018-03-29 21:37:31 +0900 (Thu, 29 Mar 2018) | 5 lines

test_jit.rb: loosen debug log check

We couldn't catch log with
https://gist.github.com/ko1/0fdc6a8d4add70cd8648000b16a3da38#file-brlog-trunk_gcc6-20180329-003723-L370
because the error message started with "gcc-6:".
------------------------------------------------------------------------
r63034 | nobu | 2018-03-29 14:56:04 +0900 (Thu, 29 Mar 2018) | 4 lines

dir.c: do not assume NUL terminator

* dir.c (rb_push_glob): do not assume string is NUL terminated
  always, shared substring may not in the future.
------------------------------------------------------------------------
r63033 | nobu | 2018-03-29 12:42:32 +0900 (Thu, 29 Mar 2018) | 3 lines

Use only CMDARG/COND _PUSH/POP for cmdarg/cond management.

From: Ilya Bylich <ibylich@gmail.com>
------------------------------------------------------------------------
r63032 | nobu | 2018-03-29 10:33:25 +0900 (Thu, 29 Mar 2018) | 1 line

parse.y: remove `p->` from bitstack traces
------------------------------------------------------------------------
r63031 | svn | 2018-03-29 09:05:46 +0900 (Thu, 29 Mar 2018) | 1 line

* 2018-03-29
------------------------------------------------------------------------
r63030 | nobu | 2018-03-29 09:05:45 +0900 (Thu, 29 Mar 2018) | 5 lines

array.c: yield blockarg in collect

* array.c (rb_ary_collect): yield in block argument semantics
  always to splat array elements to lambda, for the backward
  compatibility.  [ruby-core:86362] [Bug #14639]
------------------------------------------------------------------------
r63008 | usa | 2018-03-28 22:27:35 +0900 (Wed, 28 Mar 2018) | 7 lines

get rid of test error/failure on Windows introduced at r62955

* lib/webrick/httpresponse.rb (send_body_io): use seek if NotImplementedError
  is raised in IO.copy_stream with offset.

* lib/webrick/httpservlet/filehandler.rb (multipart_body): ditto.

------------------------------------------------------------------------
r63000 | nobu | 2018-03-28 20:30:27 +0900 (Wed, 28 Mar 2018) | 4 lines

unixsocket.c: abstract namespace

* ext/socket/unixsocket.c (unixsock_path_value): fix r62991 for
  Linux abstract namespace.
------------------------------------------------------------------------
r62993 | nobu | 2018-03-28 19:22:57 +0900 (Wed, 28 Mar 2018) | 4 lines

Use Regexp#match? in time.rb for conditionals
[Fix GH-1852]

From: Bart <bartdewater@gmail.com>
------------------------------------------------------------------------
r62992 | nobu | 2018-03-28 19:12:17 +0900 (Wed, 28 Mar 2018) | 4 lines

pack.c: fix underflow

* pack.c (pack_unpack_internal): get rid of underflow.
  https://hackerone.com/reports/298246
------------------------------------------------------------------------
r62991 | nobu | 2018-03-28 19:08:57 +0900 (Wed, 28 Mar 2018) | 4 lines

unixsocket.c: check NUL bytes

* ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes.
  https://hackerone.com/reports/302997
------------------------------------------------------------------------
r62990 | hsbt | 2018-03-28 19:03:03 +0900 (Wed, 28 Mar 2018) | 3 lines

Ignore file separator from tmpfile/tmpdir name.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62989 | nobu | 2018-03-28 18:58:52 +0900 (Wed, 28 Mar 2018) | 7 lines

dir.c: check NUL bytes

* dir.c (GlobPathValue): should be used in rb_push_glob only.
  other methods should use FilePathValue.
  https://hackerone.com/reports/302338

* dir.c (rb_push_glob): expand GlobPathValue
------------------------------------------------------------------------
r62969 | nobu | 2018-03-28 17:48:52 +0900 (Wed, 28 Mar 2018) | 1 line

adjust indents [ci skip]
------------------------------------------------------------------------
r62968 | normal | 2018-03-28 17:38:26 +0900 (Wed, 28 Mar 2018) | 9 lines

webrick: prevent response splitting and header injection

Original patch by tenderlove (with minor style adjustments).

* lib/webrick/httpresponse.rb (send_header): call check_header
  (check_header): raise on embedded CRLF in header value
* test/webrick/test_httpresponse.rb
  (test_prevent_response_splitting_headers): new test
* (test_prevent_response_splitting_cookie_headers): ditto
------------------------------------------------------------------------
r62967 | normal | 2018-03-28 17:38:21 +0900 (Wed, 28 Mar 2018) | 7 lines

io.c: IO#write without args returns 0

This is consistent with other implementations of .write
in openssl and stringio.

* io.c (io_write_m): return 0 on argc == 0
  [ruby-core:86285] [Bug #14338]
------------------------------------------------------------------------
r62966 | normal | 2018-03-28 17:06:55 +0900 (Wed, 28 Mar 2018) | 23 lines

webrick/httpproxy: stream request and response bodies

Reading entire request or response bodies into memory can lead
to trivial denial-of-service attacks.  Introduce Fibers in both
cases to allow streaming.

WEBrick::HTTPRequest gains a new body_reader method to prepare
itself as a source for IO.copy_stream.  This allows the
WEBrick::HTTPRequest object to be used as the
Net::HTTPGenericRequest#body_stream= arg for Net::HTTP.

For HTTP proxy response bodies, we also use a Fiber to
to make the HTTP request and read the response body.

* lib/webrick/httprequest.rb (body_reader): new method
  (readpartial): ditto
* lib/webrick/httpproxy.rb (perform_proxy_request): use Fiber
  to stream response body
  (do_GET, do_HEAD): adjust call
  (do_POST): adjust call and supply body_reader
* test/webrick/test_httprequest.rb (test_chunked): test
  for IO.copy_stream compatibility
* test/webrick/test_httpproxy.rb (test_big_bodies): new test
------------------------------------------------------------------------
r62965 | normal | 2018-03-28 17:06:49 +0900 (Wed, 28 Mar 2018) | 18 lines

webrick/httpauth/digestauth: stream req.body

WARNING! WARNING! WARNING!  LIKELY BROKEN CHANGE

Pass a proc to WEBrick::HTTPRequest#body to avoid reading a
potentially large request body into memory during
authentication.

WARNING! this will break apps completely which want to do
something with the body besides calculating the MD5 digest
of it.

Also, keep in mind that probably nobody uses "auth-int".
Servers such as Apache, lighttpd, nginx don't seem to
support it; nor does curl when using POST/PUT bodies;
and we didn't have tests for it until now...

* lib/webrick/httpauth/digestauth.rb (_authenticate): stream req.body
------------------------------------------------------------------------
r62964 | normal | 2018-03-28 17:06:44 +0900 (Wed, 28 Mar 2018) | 9 lines

webrick: add test for Digest auth-int

No changes to the actual code, this is a new test for
a feature for which no tests existed.  I don't understand
the Digest authentication code well at all, but this is
necessary for the subsequent change.

* test/webrick/test_httpauth.rb (test_digest_auth_int): new test
  (credentials_for_request): support bodies with POST
------------------------------------------------------------------------
r62963 | normal | 2018-03-28 17:06:39 +0900 (Wed, 28 Mar 2018) | 9 lines

webrick/httprequest: use InputBufferSize for chunked requests

While WEBrick::HTTPRequest#body provides a Proc interface
for streaming large request bodies, clients must not force
the server to use an excessively large chunk size.

* lib/webrick/httprequest.rb (read_chunk_size): limit each
  read and block.call to :InputBufferSize in config.
* test/webrick/test_httpserver.rb (test_big_chunks): new test
------------------------------------------------------------------------
r62962 | normal | 2018-03-28 17:06:34 +0900 (Wed, 28 Mar 2018) | 7 lines

webrick/httprequest: raise correct exception

"BadRequest" alone does not resolve correctly, it is in the
HTTPStatus namespace.

* lib/webrick/httprequest.rb (read_chunked): use correct exception
* test/webrick/test_httpserver.rb (test_eof_in_chunk): new test
------------------------------------------------------------------------
r62961 | normal | 2018-03-28 17:06:28 +0900 (Wed, 28 Mar 2018) | 9 lines

webrick/httpservlet/cgihandler: reduce memory use

WEBrick::HTTPRequest#body can be passed a block to process the
body in chunks.  Use this feature to avoid building a giant
string in memory.

* lib/webrick/httpservlet/cgihandler.rb (do_GET):
  avoid reading entire request body into memory
  (do_POST is aliased to do_GET, so it handles bodies)
------------------------------------------------------------------------
r62960 | normal | 2018-03-28 17:06:23 +0900 (Wed, 28 Mar 2018) | 13 lines

webrick/httprequest: limit request headers size

We use the same 112 KB limit started (AFAIK) by Mongrel, Thin,
and Puma to prevent malicious users from using up all the memory
with a single request.  This also limits the damage done by
excessive ranges in multipart Range: requests.

Due to the way we rely on IO#gets and the desire to keep
the code simple, the actual maximum header may be 4093 bytes
larger than 112 KB, but we're splitting hairs at that point.

* lib/webrick/httprequest.rb: define MAX_HEADER_LENGTH
  (read_header): raise when headers exceed max length
------------------------------------------------------------------------
r62959 | normal | 2018-03-28 17:06:18 +0900 (Wed, 28 Mar 2018) | 9 lines

webrick: use IO.copy_stream for multipart response

Use the new Proc response body feature to generate a multipart
range response dynamically.  We use a flat array to minimize
object overhead as much as possible; as many ranges may fit
into an HTTP request header.

* lib/webrick/httpservlet/filehandler.rb (multipart_body): new method
  (make_partial_content): use multipart_body
------------------------------------------------------------------------
r62958 | normal | 2018-03-28 17:06:13 +0900 (Wed, 28 Mar 2018) | 7 lines

webrick/httpresponse: make ChunkedWrapper copy_stream-compatible

The .write method needs to return the number of bytes written
to avoid confusing IO.copy_stream.

* lib/webrick/httpresponse.rb (ChunkedWrapper#write): return bytes written
  (ChunkedWrapper#<<): return self
------------------------------------------------------------------------
r62957 | normal | 2018-03-28 17:06:08 +0900 (Wed, 28 Mar 2018) | 8 lines

webrick: quiet warning for multi-part ranges

Content-Length is ignored by WEBrick::HTTPResponse even if we
calculate it, so instead we chunk responses to HTTP/1.1 clients
and terminate HTTP/1.0 connections.

* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
  quiet warning
------------------------------------------------------------------------
r62956 | normal | 2018-03-28 17:06:02 +0900 (Wed, 28 Mar 2018) | 7 lines

test/webrick/test_filehandler.rb: stricter multipart range test

We need to ensure we generate compatibile output in
the face of future changes

* test/webrick/test_filehandler.rb (test_make_partial_content):
  check response body
------------------------------------------------------------------------
r62955 | normal | 2018-03-28 17:05:57 +0900 (Wed, 28 Mar 2018) | 10 lines

webrick: use IO.copy_stream for single range response

This is also compatible with range responses generated
by Rack::File (tested with rack 2.0.3).

* lib/webrick/httpresponse.rb (send_body_io): use Content-Range
* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
  use File object for the single range case
* test/webrick/test_filehandler.rb (get_res_body): use send_body
  to test result
------------------------------------------------------------------------
r62954 | normal | 2018-03-28 17:05:52 +0900 (Wed, 28 Mar 2018) | 14 lines

webrick/httpresponse: IO.copy_stream for regular files

Remove the redundant _send_file method since its functionality
is unnecessary with IO.copy_stream.  IO.copy_stream also allows
the use of sendfile under some OSes to speed up copies to
non-TLS sockets.

Testing with "curl >/dev/null" and "ruby -run -e httpd" to
read a 1G file over Linux loopback reveals a reduction from
around ~0.770 to ~0.490 seconds on the client side.

* lib/webrick/httpresponse.rb (send_body_io): use IO.copy_stream
  (_send_file): remove
  [Feature #14237]
------------------------------------------------------------------------
r62953 | normal | 2018-03-28 17:05:46 +0900 (Wed, 28 Mar 2018) | 15 lines

webrick: favor .write over << method

This will make the next change to use IO.copy_stream
easier-to-read.  When we can drop Ruby 2.4 support in a few
years, this will allow us to use writev(2) with multiple
arguments for headers and chunked responses.

* lib/webrick/cgi.rb (write): new wrapper method
  lib/webrick/httpresponse.rb: (send_header): use socket.write
  (send_body_io): ditto
  (send_body_string): ditto
  (send_body_proc): ditto
  (_write_data): ditto
  (ChunkedWrapper#write): ditto
  (_send_file): ditto
------------------------------------------------------------------------
r62952 | nobu | 2018-03-28 16:01:48 +0900 (Wed, 28 Mar 2018) | 5 lines

win32/file.c: relative path with drive letter

* win32/file.c (IS_ABSOLUTE_PATH_P): home directory should not be
  a relative path regardless a drive letter.   PathIsRelativeW
  returns FALSE on such path.  [ruby-core:86356] [Bug #14638]
------------------------------------------------------------------------
r62936 | svn | 2018-03-28 12:18:01 +0900 (Wed, 28 Mar 2018) | 1 line

* 2018-03-28
------------------------------------------------------------------------
r62935 | ko1 | 2018-03-28 12:18:00 +0900 (Wed, 28 Mar 2018) | 7 lines

fix regexp introduced at recent RDoc update (r62924).

* lib/rdoc/text.rb: should escape `-` character.
  Sometimes test fails if `$VERBOSE = 1` with the following warning:

  > text.rb:172: warning: character class has duplicated range: ...

------------------------------------------------------------------------
r62934 | normal | 2018-03-27 18:28:37 +0900 (Tue, 27 Mar 2018) | 9 lines

thread_sync.c: avoid reaching across stacks of dead threads

rb_ensure is insufficient cleanup for fork and we must
reinitialize all waitqueues in the child process.

Unfortunately this increases the footprint of ConditionVariable,
Queue and SizedQueue by 8 bytes on 32-bit (16 bytes on 64-bit).

[ruby-core:86316] [Bug #14634]
------------------------------------------------------------------------
r62933 | nobu | 2018-03-27 10:09:14 +0900 (Tue, 27 Mar 2018) | 4 lines

configure.ac: string literal concatenation

* configure.ac: bail out if string literal concatenation is not
  available, as it is used everywhere now.
------------------------------------------------------------------------
r62932 | nobu | 2018-03-27 09:44:34 +0900 (Tue, 27 Mar 2018) | 4 lines

ruby.c: exit by --version

* ruby.c (usage): stated exiting by `--version` option with
  nothing done.
------------------------------------------------------------------------
r62931 | eregon | 2018-03-27 05:48:21 +0900 (Tue, 27 Mar 2018) | 1 line

Update to ruby/spec@a585ec3
------------------------------------------------------------------------
r62930 | svn | 2018-03-27 05:48:02 +0900 (Tue, 27 Mar 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62929 | eregon | 2018-03-27 05:48:01 +0900 (Tue, 27 Mar 2018) | 1 line

Update to ruby/mspec@8b54bf3
------------------------------------------------------------------------
r62928 | svn | 2018-03-27 01:25:06 +0900 (Tue, 27 Mar 2018) | 1 line

* 2018-03-27
------------------------------------------------------------------------
r62927 | nobu | 2018-03-27 01:25:05 +0900 (Tue, 27 Mar 2018) | 5 lines

ruby.c: fix --verbose description in usage

* ruby.c (usage): fix the description of `--verbose` option, which
  does not print the version number unlike `-v` option.
  [ruby-core:86307] [Bug #14633]
------------------------------------------------------------------------
r62926 | kazu | 2018-03-26 19:18:46 +0900 (Mon, 26 Mar 2018) | 1 line

Fix test error
------------------------------------------------------------------------
r62925 | svn | 2018-03-26 14:56:29 +0900 (Mon, 26 Mar 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r62924 | hsbt | 2018-03-26 14:56:26 +0900 (Mon, 26 Mar 2018) | 5 lines

Merge RDoc 6.0.3 from upstream.

  It fixed the several bugs that was found after RDoc 6 releasing.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62923 | nobu | 2018-03-26 09:25:16 +0900 (Mon, 26 Mar 2018) | 4 lines

bigdecimal.c: fix missing argument

* ext/bigdecimal/bigdecimal.c (rb_rational_num, rb_rational_den):
  fix missing argc argument for old ruby.
------------------------------------------------------------------------
r62922 | svn | 2018-03-26 09:02:20 +0900 (Mon, 26 Mar 2018) | 1 line

* 2018-03-26
------------------------------------------------------------------------
r62921 | nobu | 2018-03-26 09:02:20 +0900 (Mon, 26 Mar 2018) | 7 lines

Update Complex#infinite? documenation

to state what it really does.

[Fix GH-1848]

From: Christian Bruckmayer <cbruckmayer@suse.com>
------------------------------------------------------------------------
r62920 | nobu | 2018-03-26 09:02:19 +0900 (Mon, 26 Mar 2018) | 7 lines

Update Complex#finite? documentation

to state what it really does.

[Fix GH-1848]

From: Christian Bruckmayer <cbruckmayer@suse.com>
------------------------------------------------------------------------
r62919 | nobu | 2018-03-25 23:06:06 +0900 (Sun, 25 Mar 2018) | 5 lines

assertions for r62914

* test/ruby/test_keyword.rb (test_splat_hash): assertion on
  mandatory and rest arguments.  r62914 is not only for optional
  argument.
------------------------------------------------------------------------
r62914 | nobu | 2018-03-25 11:22:14 +0900 (Sun, 25 Mar 2018) | 5 lines

vm_args.c: warn splat to var

* vm_args.c (setup_parameters_complex): [EXPERIMENTAL] warn when
  splat keyword arguments is passed as a single ordinary argument,
  not as a keyword rest argument.
------------------------------------------------------------------------
r62913 | svn | 2018-03-25 10:52:23 +0900 (Sun, 25 Mar 2018) | 1 line

* 2018-03-25
------------------------------------------------------------------------
r62912 | nobu | 2018-03-25 10:52:22 +0900 (Sun, 25 Mar 2018) | 1 line

extmk.rb: get rid of shadowing outer local variable
------------------------------------------------------------------------
r62910 | nobu | 2018-03-24 23:28:45 +0900 (Sat, 24 Mar 2018) | 4 lines

configure.ac: named blocks

* configure.ac: turned section block comments into named blocks.
  http://c16e.com/1603281120/
------------------------------------------------------------------------
r62908 | nobu | 2018-03-24 20:15:10 +0900 (Sat, 24 Mar 2018) | 4 lines

compile.c: split add_insn_info

* compile.c (add_insn_info, add_adjust_info): split for each
  list->type, to remove unnecessary repeated conditions and casts.
------------------------------------------------------------------------
r62907 | svn | 2018-03-24 20:04:38 +0900 (Sat, 24 Mar 2018) | 1 line

* 2018-03-24
------------------------------------------------------------------------
r62906 | nobu | 2018-03-24 20:04:37 +0900 (Sat, 24 Mar 2018) | 4 lines

compile.c: suppress missing-noreturn

* compile.c (add_insn_info): move return statement to suppress
  missing-noreturn warning.
------------------------------------------------------------------------
r62902 | nobu | 2018-03-23 10:09:57 +0900 (Fri, 23 Mar 2018) | 4 lines

parse.y: k_else in bodystmt

* parse.y (bodystmt): expand opt_else to show the error message at
  the right place.
------------------------------------------------------------------------
r62901 | nobu | 2018-03-23 09:40:08 +0900 (Fri, 23 Mar 2018) | 13 lines

parse.y: else without rescue

* parse.y (bodystmt): [EXPERIMENTAL] make `else` without `rescue`
  a syntax error.  [DevelopersMeeting20180315Japan]

  https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20180315Japan
  https://docs.google.com/document/d/1RT0ijSo8uJ4Awn3CEvuYkjH0TVeXSYgeAFNmVGYC3ak/edit#
  > * do-else-end
  >   https://twitter.com/joker1007/status/974173396006129664
  >   https://twitter.com/joker1007/status/974173641347756032
  >   https://twitter.com/joker1007/status/974176512554369027
  >   Will be SyntaxError in 2.6-preview2
  >   All of begin/do/def (experimental)
------------------------------------------------------------------------
r62900 | svn | 2018-03-23 01:05:05 +0900 (Fri, 23 Mar 2018) | 1 line

* 2018-03-23
------------------------------------------------------------------------
r62899 | nobu | 2018-03-23 01:05:04 +0900 (Fri, 23 Mar 2018) | 1 line

test_exception.rb: assertions with Exception.to_tty?
------------------------------------------------------------------------
r62898 | kazu | 2018-03-22 22:01:17 +0900 (Thu, 22 Mar 2018) | 1 line

sample/timeout.rb: Remove unnecessary increment [ci skip]
------------------------------------------------------------------------
r62897 | naruse | 2018-03-22 20:20:03 +0900 (Thu, 22 Mar 2018) | 5 lines

set UTF-8 if given URI string is ASCII

Now URI is normally UTF-8, and US-ASCII URI string is considered as
escaped a UTF-8 string.
https://github.com/rails/rails/issues/32294
------------------------------------------------------------------------
r62894 | nobu | 2018-03-22 17:26:23 +0900 (Thu, 22 Mar 2018) | 4 lines

error.c: full_message options

* error.c (exc_full_message): add highlight: and reverse: keyword
  options.  [Bug #14324]
------------------------------------------------------------------------
r62893 | naruse | 2018-03-22 16:58:39 +0900 (Thu, 22 Mar 2018) | 1 line

Factor out get_reg_grapheme_cluster
------------------------------------------------------------------------
r62892 | naruse | 2018-03-22 16:58:38 +0900 (Thu, 22 Mar 2018) | 3 lines

fix each_grapheme_cluster's size [Bug #14363]

From: Hugo Peixoto <hugo.peixoto@gmail.com>
------------------------------------------------------------------------
r62891 | naruse | 2018-03-22 16:58:37 +0900 (Thu, 22 Mar 2018) | 3 lines

Revert "each_grapheme_cluster shouldn't return size [Bug #14363]"

This reverts commit r62887.
------------------------------------------------------------------------
r62888 | naruse | 2018-03-22 15:59:54 +0900 (Thu, 22 Mar 2018) | 3 lines

each_grapheme_cluster shouldn't return size [Bug #14363]

From: Stefan Schu{U+00DF}ler <mail@stefanschuessler.de>
------------------------------------------------------------------------
r62887 | nobu | 2018-03-22 15:47:53 +0900 (Thu, 22 Mar 2018) | 4 lines

parse.y: reorder in the place

* parse.y (new_args_tail): reorder required and optional keyword
  argument variable IDs in the place.
------------------------------------------------------------------------
r62882 | nobu | 2018-03-22 01:03:59 +0900 (Thu, 22 Mar 2018) | 8 lines

Docs and tests on URI.hierarchical?, URI.absolute?

Improve code coverage and clarify meaning of hierarchical based on RFC
text.

[Fix GH-1846]

From: Xavier Riley <xavriley@hotmail.com>
------------------------------------------------------------------------
r62881 | nobu | 2018-03-22 01:02:26 +0900 (Thu, 22 Mar 2018) | 7 lines

Improve documentation for 'text '.split

The documentation didn't mention trailing spaces and the
example only demonstrated the case with leading spaces.
[Fix GH-1845]

From: Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
------------------------------------------------------------------------
r62879 | svn | 2018-03-22 00:46:16 +0900 (Thu, 22 Mar 2018) | 1 line

* 2018-03-22
------------------------------------------------------------------------
r62878 | nobu | 2018-03-22 00:46:15 +0900 (Thu, 22 Mar 2018) | 6 lines

Remove outdated proc.c binding comment.

Passing a proc as the second argument to eval is no longer supported.
[Fix GH-1843]

From: Tieg Zaharia <tieg.zaharia@gmail.com>
------------------------------------------------------------------------
r62873 | nobu | 2018-03-21 21:40:16 +0900 (Wed, 21 Mar 2018) | 4 lines

parse.y: terminator at continued line

* parse.y (here_document): a continuing line is not the
  terminator.  [ruby-core:86283] [Bug #14621]
------------------------------------------------------------------------
r62872 | nobu | 2018-03-21 19:32:15 +0900 (Wed, 21 Mar 2018) | 5 lines

parse.y: unindent continued line

* parse.y (tokadd_string): stop at continued line in dedented here
  documents, to dedent for each lines before removing escaped
  newlines.  [ruby-core:86236] [Bug #14621]
------------------------------------------------------------------------
r62871 | nobu | 2018-03-21 19:06:23 +0900 (Wed, 21 Mar 2018) | 5 lines

test_iseq.rb: disable load_from_binary

* test/ruby/test_iseq.rb (test_to_binary_with_objects): disable
  load_from_binary right now, r62851 seems having a trouble around
  get_insn_info_succinct_bitvector() yet.
------------------------------------------------------------------------
r62870 | svn | 2018-03-21 11:20:38 +0900 (Wed, 21 Mar 2018) | 1 line

* 2018-03-21
------------------------------------------------------------------------
r62869 | nobu | 2018-03-21 11:20:37 +0900 (Wed, 21 Mar 2018) | 1 line

iseq.c: constfied validate_get_insn_info [ci skip]
------------------------------------------------------------------------
r62861 | nobu | 2018-03-20 22:30:57 +0900 (Tue, 20 Mar 2018) | 1 line

node.c: predicates for special NODEs
------------------------------------------------------------------------
r62857 | shugo | 2018-03-20 18:09:49 +0900 (Tue, 20 Mar 2018) | 6 lines

io.c: Methods of File should not invoke external commands

For security reasons, File.read, File.binread, File.write, File.binwrite,
File.foreach, and File.readlines should not invoke external commands even
if the path starts with the pipe character |.
[ruby-core:84495] [Feature #14245]
------------------------------------------------------------------------
r62856 | nobu | 2018-03-20 17:36:42 +0900 (Tue, 20 Mar 2018) | 8 lines

compile.c: fix ibf_load_code

* compile.c (ibf_load_iseq_each): manage iseq_size to point loaded
  objects in iseq_encoded.  now marking iseq scans iseq_encoded
  directly.

* test/ruby/test_iseq.rb (test_to_binary_with_objects): skip for
  now, but fix argument order of assert_equal.
------------------------------------------------------------------------
r62851 | tenderlove | 2018-03-20 03:21:54 +0900 (Tue, 20 Mar 2018) | 5 lines

Reverting r62775, this should fix i686 builds

We need to mark default values for kwarg methods.  This also fixes
Bootsnap.  IBF iseq loading needed to mark iseqs as "having markable
objects".
------------------------------------------------------------------------
r62844 | svn | 2018-03-20 00:40:33 +0900 (Tue, 20 Mar 2018) | 1 line

* 2018-03-20
------------------------------------------------------------------------
r62843 | usa | 2018-03-20 00:40:32 +0900 (Tue, 20 Mar 2018) | 2 lines

* win32/README.win32: `make up` is only necessary when building from SVN source.

------------------------------------------------------------------------
r62841 | nobu | 2018-03-19 23:12:00 +0900 (Mon, 19 Mar 2018) | 7 lines

parse.y: NUL-terminate ruby_sourcefile

* parse.y (yycompile): in some cases (warning, error, dtrace,...),
  ruby_sourcefile is expected to be NUL-terminated, so ensure it.

* template/prelude.c.tmpl (prelude_name): NUL-terminate to get rid
  of copying static data.
------------------------------------------------------------------------
r62840 | usa | 2018-03-19 22:04:22 +0900 (Mon, 19 Mar 2018) | 5 lines

note that patch is required and need to run make up before make

	* win32/README.win32: patch(1) is required, and running `make up` before
	  `make` is also required.

------------------------------------------------------------------------
r62839 | nobu | 2018-03-19 21:40:34 +0900 (Mon, 19 Mar 2018) | 6 lines

parse.y: push `do` token info

* parse.y (k_rescue, k_ensure): revert r62838.

* parse.y (k_do, k_do_LAMBDA, k_do_block): push token infos of
  `do`.
------------------------------------------------------------------------
r62838 | nobu | 2018-03-19 17:37:12 +0900 (Mon, 19 Mar 2018) | 4 lines

parse.y: ignore do indentations

* parse.y (k_rescue, k_ensure): ignore indentations of `do`, it
  is not at the beginning of line usually.
------------------------------------------------------------------------
r62836 | nobu | 2018-03-19 17:21:26 +0900 (Mon, 19 Mar 2018) | 4 lines

parse.y: mismatched indentations at middle

* parse.y (k_rescue, k_ensure, k_when, k_else, k_elsif): warn
  mismatched indentations at keywords in middle of blocks.
------------------------------------------------------------------------
r62833 | nobu | 2018-03-19 13:08:19 +0900 (Mon, 19 Mar 2018) | 6 lines

compile.c: arg var index

* compile.c (iseq_set_arguments): determine argument variable
  indexes by the order, not by just IDs.  arguments begin with `_`
  can be duplicate, so by-ID index may result in a wrong value.
  [ruby-core:86159] [Bug #14611]
------------------------------------------------------------------------
r62832 | nobu | 2018-03-19 12:16:40 +0900 (Mon, 19 Mar 2018) | 9 lines

parse.y: fix duplicate kwrest

* parse.y (f_kwrest): add the variable name as an argument, as
  well as an internal variable.

* parse.y (new_args_tail): now keyword rest argument variable is
  always placed between keyword arguments and block argument, so
  so just reorder required and optional keyword arguments.  no
  longer kwrest duplicates.
------------------------------------------------------------------------
r62831 | nobu | 2018-03-19 09:32:52 +0900 (Mon, 19 Mar 2018) | 1 line

iseq.c: append local var index to name
------------------------------------------------------------------------
r62830 | svn | 2018-03-19 09:32:52 +0900 (Mon, 19 Mar 2018) | 1 line

* 2018-03-19
------------------------------------------------------------------------
r62829 | nobu | 2018-03-19 09:32:51 +0900 (Mon, 19 Mar 2018) | 1 line

iseq.c: mark kwrest arg
------------------------------------------------------------------------
r62807 | nobu | 2018-03-18 19:41:53 +0900 (Sun, 18 Mar 2018) | 4 lines

compile.c: fix function name [ci skip]

* compile.c (ibf_dump_object_object): fix a probable typo in the
  function name, s/lbf/ibf/.
------------------------------------------------------------------------
r62806 | watson1978 | 2018-03-18 19:28:58 +0900 (Sun, 18 Mar 2018) | 76 lines

Improve CSV performance

If it will not use special variables (like $1, $&, $`...),
it can improve the performance by using Regexp#match? or String#match? instead of Regexp#=~ or String#=~.

This patch is same idea as https://github.com/ruby/ruby/pull/1836

[Fix GH-1842]

## Environment
* OS : Ubuntu 17.10
* Compiler : gcc version 7.2.0
* CPU : Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
* Memory : 16 GB

## TL;DR
Methods     | Before | After  | Speed up
----------- | ------ | ------ | --------
CSV.foreach | 44.825 | 48.201 | 7.5%
CSV#shift   | 45.200 | 49.584 | 9.7%
CSV.read    | 42.968 | 46.853 | 9.0%
CSV.table   | 10.933 | 11.277 | 3.1%

## Before
```
Calculating -------------------------------------
         CSV.foreach     44.825  ({U+00B1} 0.0%) i/s -    228.000  in   5.086576s
           CSV#shift     45.200  ({U+00B1} 0.0%) i/s -    228.000  in   5.044297s
            CSV.read     42.968  ({U+00B1} 0.0%) i/s -    216.000  in   5.027504s
           CSV.table     10.933  ({U+00B1} 0.0%) i/s -     55.000  in   5.031098s
```

## After
```
Calculating -------------------------------------
         CSV.foreach     48.201  ({U+00B1} 0.0%) i/s -    244.000  in   5.062256s
           CSV#shift     49.584  ({U+00B1} 0.0%) i/s -    248.000  in   5.001652s
            CSV.read     46.853  ({U+00B1} 0.0%) i/s -    236.000  in   5.037044s
           CSV.table     11.277  ({U+00B1} 0.0%) i/s -     57.000  in   5.054694s
```

## Benchmark code
```ruby
require 'csv'
require 'benchmark/ips'

CSV.open("/tmp/file.csv", "w") do |csv|
  csv << ["player", "gameA", "gameB"]
  1000.times do
    csv << ['"Alice"', "84.0", "79.5"]
    csv << ['"Bob"', "20.0", "56.5"]
  end
end

Benchmark.ips do |x|
  x.report "CSV.foreach" do
    CSV.foreach("/tmp/file.csv") do |row|
    end
  end

  x.report "CSV#shift" do
    CSV.open("/tmp/file.csv") do |csv|
      while line = csv.shift
      end
    end
  end

  x.report "CSV.read" do
    CSV.read("/tmp/file.csv")
  end

  x.report "CSV.table" do
    CSV.table("/tmp/file.csv")
  end
end
```
------------------------------------------------------------------------
r62805 | kazu | 2018-03-18 15:54:21 +0900 (Sun, 18 Mar 2018) | 1 line

Remove duplicated `,` [ci skip]
------------------------------------------------------------------------
r62800 | nobu | 2018-03-18 12:40:49 +0900 (Sun, 18 Mar 2018) | 1 line

IBF works only on x86 platforms now
------------------------------------------------------------------------
r62799 | svn | 2018-03-18 00:13:40 +0900 (Sun, 18 Mar 2018) | 1 line

* 2018-03-18
------------------------------------------------------------------------
r62798 | seki | 2018-03-18 00:13:39 +0900 (Sun, 18 Mar 2018) | 2 lines

If host of URI is omitted, make it with IP address. 

------------------------------------------------------------------------
r62796 | nobu | 2018-03-17 20:42:08 +0900 (Sat, 17 Mar 2018) | 4 lines

compile.c: resize to align offsets

* compile.c (ibf_dump_align): resize the dump buffer.
  rb_str_modify_expand expands the buffer but not set the length.
------------------------------------------------------------------------
r62795 | nobu | 2018-03-17 18:41:19 +0900 (Sat, 17 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62794 | k0kubun | 2018-03-17 15:41:35 +0900 (Sat, 17 Mar 2018) | 11 lines

Remove unused variables

This fixes following warning:

```
test/logger/test_logger.rb:329: warning: assigned but unused variable - read_read
```

[Fix GH-1840]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r62793 | k0kubun | 2018-03-17 15:39:18 +0900 (Sat, 17 Mar 2018) | 7 lines

Add doc for `opt` parameter of IO#reopen [ci skip]

It can be specified from 2.0. Ref: https://bugs.ruby-lang.org/issues/7103

[Fix GH-1841]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r62792 | k0kubun | 2018-03-17 15:33:28 +0900 (Sat, 17 Mar 2018) | 3 lines

test_jit.rb: debug cc1 availability

ENV didn't have any useful information.
------------------------------------------------------------------------
r62791 | nobu | 2018-03-17 13:46:26 +0900 (Sat, 17 Mar 2018) | 7 lines

compile.c: align offsets

* compile.c (ibf_dump_align): expand the buffer for alignment.

* compile.c (ibf_dump_iseq_list, ibf_dump_object_list): align as
  ibf_offset_t.  not all processors do not allow unaligned word,
  or larger, access.
------------------------------------------------------------------------
r62790 | nobu | 2018-03-17 13:13:26 +0900 (Sat, 17 Mar 2018) | 4 lines

string.c: [DOC] split with block [ci skip]

* string.c (rb_str_split_m): [DOC] about split with block.
  [Feature #4780]
------------------------------------------------------------------------
r62789 | k0kubun | 2018-03-17 11:37:51 +0900 (Sat, 17 Mar 2018) | 5 lines

misc/ruby-style.el: use spaces for indentation

instead of hard tabs.

[Bug #14246]
------------------------------------------------------------------------
r62788 | nobu | 2018-03-17 11:18:46 +0900 (Sat, 17 Mar 2018) | 5 lines

transform_mjit_header.rb: read output and errors

* tool/transform_mjit_header.rb (MJITHeader.check_code): read
  output and errors than discarding errors.  also cl.exe prints
  the source file name which is a garbage at this time.
------------------------------------------------------------------------
r62787 | nobu | 2018-03-17 11:11:06 +0900 (Sat, 17 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62786 | svn | 2018-03-17 11:00:31 +0900 (Sat, 17 Mar 2018) | 1 line

* 2018-03-17
------------------------------------------------------------------------
r62785 | k0kubun | 2018-03-17 11:00:30 +0900 (Sat, 17 Mar 2018) | 9 lines

mjit.c: add timeout for --jit-wait

Sometimes test hangs in `mjit_get_iseq_func` like this:
http://ci.rvm.jp/results/trunk-test@ruby-sky3/659391

It seems that a process waiting in `mjit_get_iseq_func` does no longer
have MJIT worker thread. We don't wait for JIT finish forever. So I
added timeout for the case. I'm not sure why there was no MJIT worker
thread in ruby-sky3 test process though.
------------------------------------------------------------------------
r62781 | nobu | 2018-03-16 23:12:39 +0900 (Fri, 16 Mar 2018) | 1 line

test_weakmap.rb: skip unstable assertion
------------------------------------------------------------------------
r62780 | kazu | 2018-03-16 23:09:40 +0900 (Fri, 16 Mar 2018) | 4 lines

sample/timeout.rb: fix warnings

warning: Object#timeout is deprecated, use Timeout.timeout instead.
[ci skip]
------------------------------------------------------------------------
r62779 | nobu | 2018-03-16 22:37:44 +0900 (Fri, 16 Mar 2018) | 7 lines

re.c: do not escape terminator in Regexp.union

* re.c (rb_reg_str_with_term): change terminator.

* re.c (rb_reg_s_union): terminator in source string does not need
  to be escaped.  terminators are outside of regexp source itself.
  [ruby-core:86149] [Bug #14608]
------------------------------------------------------------------------
r62778 | nobu | 2018-03-16 22:29:27 +0900 (Fri, 16 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62777 | nobu | 2018-03-16 21:22:33 +0900 (Fri, 16 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62776 | nobu | 2018-03-16 21:06:55 +0900 (Fri, 16 Mar 2018) | 4 lines

test_iseq.rb: skip iseq with coverage

* test/ruby/test_iseq.rb (test_to_binary_with_objects): #to_binary
  does not support iseq compiled with coverage, just skip.
------------------------------------------------------------------------
r62775 | naruse | 2018-03-16 16:59:10 +0900 (Fri, 16 Mar 2018) | 7 lines

Revert "Add direct marking on iseq operands"

This reverts commit r62706.

It causes SEGV on i686-linux (debian) and armv7l-linux-eabihf:
http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180309T204300Z.diff.html.gz
http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180309T211706Z.diff.html.gz
------------------------------------------------------------------------
r62774 | naruse | 2018-03-16 16:59:09 +0900 (Fri, 16 Mar 2018) | 3 lines

Revert "Fix error: implicit conversion loses integer precision"

This reverts commit r62708.
------------------------------------------------------------------------
r62773 | naruse | 2018-03-16 16:59:08 +0900 (Fri, 16 Mar 2018) | 3 lines

Revert "Fix warning: cast from pointer to integer of different size"

This reverts commit r62709.
------------------------------------------------------------------------
r62772 | nobu | 2018-03-16 11:27:50 +0900 (Fri, 16 Mar 2018) | 6 lines

compile.c: fix load_from_binary

* compile.c (ibf_load_iseq_each): realpath may be nil.  follow up
  r59709.  [fix https://github.com/Shopify/bootsnap/issues/132]

From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
------------------------------------------------------------------------
r62771 | nobu | 2018-03-16 11:07:43 +0900 (Fri, 16 Mar 2018) | 4 lines

gmake.mk: expand MJIT header rules

* defs/gmake.mk: expand MJIT header file rules for each
  architectures.
------------------------------------------------------------------------
r62770 | nobu | 2018-03-16 10:48:02 +0900 (Fri, 16 Mar 2018) | 5 lines

configure.ac: DLDFLAGS without arch flags

* configure.ac (DLDFLAGS): copy LDFLAGS before adding arch flags.
  multiple arch flags on universal binary make mjit_header.h
  failed.
------------------------------------------------------------------------
r62769 | naruse | 2018-03-16 01:51:34 +0900 (Fri, 16 Mar 2018) | 4 lines

Revert r62617 "compile.c: fix load_from_binary"

It breaks Solaris:
http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180301T012502Z.diff.html.gz
------------------------------------------------------------------------
r62768 | svn | 2018-03-16 01:51:32 +0900 (Fri, 16 Mar 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62767 | naruse | 2018-03-16 01:51:31 +0900 (Fri, 16 Mar 2018) | 8 lines

Introduce URI::File to handle file URI scheme

* the default value of URI::File's authority is "" (localhost).
  Both nil and "localhost" is normalized to "" by default.
* URI::File ignores setting userinfo and port
[Feature #14035]
fix https://github.com/ruby/ruby/pull/1719
fic https://github.com/ruby/ruby/pull/1832
------------------------------------------------------------------------
r62766 | svn | 2018-03-16 00:20:08 +0900 (Fri, 16 Mar 2018) | 1 line

* 2018-03-16
------------------------------------------------------------------------
r62765 | nobu | 2018-03-16 00:20:08 +0900 (Fri, 16 Mar 2018) | 5 lines

configure.ac: fix rb_cv_gcc_compiler_cas

* configure.ac (rb_cv_gcc_compiler_cas): do not use one variable
  for multiple AC_CACHE_CHECK.  in one check, select by different
  values.
------------------------------------------------------------------------
r62764 | mrkn | 2018-03-15 21:01:08 +0900 (Thu, 15 Mar 2018) | 1 line

NEWS: add descriptions of [Feature #12732]
------------------------------------------------------------------------
r62763 | nobu | 2018-03-15 20:08:04 +0900 (Thu, 15 Mar 2018) | 4 lines

string.c: split with block

* string.c (rb_str_split_m): yield each split substrings if the
  block is given, instead of returing the array.  [Feature #4780]
------------------------------------------------------------------------
r62762 | nobu | 2018-03-15 18:58:50 +0900 (Thu, 15 Mar 2018) | 1 line

test_array.rb (test_slice!): moved misplaced test
------------------------------------------------------------------------
r62760 | mrkn | 2018-03-15 16:19:48 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Complex()

Support `exception:` keyword argument in `Kernel#Complex()`.
If `exception:` is `false`, `Kernel#Complex()` returns `nil` if the given
value cannot be interpreted as a complex value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62759 | mrkn | 2018-03-15 16:19:46 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Rational()

Support `exception:` keyword argument in `Kernel#Rational()`.
If `exception:` is `false`, `Kernel#Rational()` returns `nil` if the given
value cannot be interpreted as a rational value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62758 | mrkn | 2018-03-15 16:19:45 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Float()

Support `exception:` keyword argument in `Kernel#Float()`.
If `exception:` is `false`, `Kernel#Float()` returns `nil` if the given
value cannot be interpreted as a float value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62757 | mrkn | 2018-03-15 16:19:43 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Integer()

Support `exception:` keyword argument in Kernel#Integer().
If `exception:` is `false`, `Kernel#Integer()` returns `nil` if the given
value cannot be interpreted as an integer value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62756 | nobu | 2018-03-15 16:15:26 +0900 (Thu, 15 Mar 2018) | 1 line

variable.c: hoisted out overtaken cvar warnings
------------------------------------------------------------------------
r62755 | nobu | 2018-03-15 15:29:04 +0900 (Thu, 15 Mar 2018) | 4 lines

enumerator.c: pretty kwags

* enumerator.c (append_method): pretty format for keyword
  arguments.
------------------------------------------------------------------------
r62754 | ko1 | 2018-03-15 12:55:33 +0900 (Thu, 15 Mar 2018) | 9 lines

use SIGUSR2 to debug.

* test/ruby/test_io.rb: use SIGUSR2 instead of SIGUSR1 to confirm
  unknown SIGUSR1 exception. On parallel testing, sometime
  (1 per some days) SIGUSR1 exception. This fix will make clear which
  signal is a suspect.

  http://ci.rvm.jp/results/trunk-test@ruby-sky3/643893

------------------------------------------------------------------------
r62753 | nobu | 2018-03-15 10:05:00 +0900 (Thu, 15 Mar 2018) | 1 line

win32/configure.bat: stop when setup failed
------------------------------------------------------------------------
r62752 | nobu | 2018-03-15 09:12:17 +0900 (Thu, 15 Mar 2018) | 4 lines

vm.c: refined error message

* vm.c (kw_check_symbol): refined the error message for non-symbol
  key.  [Feature #14603]
------------------------------------------------------------------------
r62751 | svn | 2018-03-15 08:27:11 +0900 (Thu, 15 Mar 2018) | 1 line

* 2018-03-15
------------------------------------------------------------------------
r62750 | tenderlove | 2018-03-15 08:27:10 +0900 (Thu, 15 Mar 2018) | 9 lines

Unconditionally define `TRACE_INSN_P`

`TRACE_INSN_P` doesn't need to know about encoded iseqs, it just needs
to look at decoded iseqs.  We have the decoded iseqs available, so no
reason to look at encoded ones.  This change allows us to clear
`original_iseq` from the iseq struct without any segvs (previously,
clearing `original_iseq` would cause the tests to crash).

* iseq.c (rb_iseq_trace_set): Only use decoded iseq with `TRACE_INSN_P`
------------------------------------------------------------------------
r62749 | nobu | 2018-03-14 23:07:00 +0900 (Wed, 14 Mar 2018) | 4 lines

configure.ac: basic libs

* configure.ac: basic libraries like -lm are necessary for some
  extension libraries on some platforms.
------------------------------------------------------------------------
r62748 | nobu | 2018-03-14 20:55:07 +0900 (Wed, 14 Mar 2018) | 4 lines

test_weakmap.rb: fixing CI failures

* test/ruby/test_weakmap.rb (test_include?): create and release
  the object to be garbage-collected in deeper frame.
------------------------------------------------------------------------
r62747 | nobu | 2018-03-14 11:35:51 +0900 (Wed, 14 Mar 2018) | 5 lines

quote symbols

* sprintf.c (ruby__sfvextra): quote symbols as identifiers.

* string.c (rb_id_quote_unprintable): ditto.
------------------------------------------------------------------------
r62746 | svn | 2018-03-14 00:11:00 +0900 (Wed, 14 Mar 2018) | 1 line

* 2018-03-14
------------------------------------------------------------------------
r62745 | kazu | 2018-03-14 00:10:59 +0900 (Wed, 14 Mar 2018) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r62744 | k0kubun | 2018-03-13 22:03:12 +0900 (Tue, 13 Mar 2018) | 1 line

test/ripper/test_lexer.rb: add test for r62743
------------------------------------------------------------------------
r62743 | k0kubun | 2018-03-13 21:56:04 +0900 (Tue, 13 Mar 2018) | 26 lines

Fix FrozenError on `Ripper.slice`

Currently `Ripper.slice` raises a FrozenError

```ruby
require 'ripper'
p Ripper.slice('foo', 'ident')
```

```
/path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `concat': can't modify frozen String (FrozenError)
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `block in compile'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `scan'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `compile'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:169:in `initialize'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `new'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `token_match'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:144:in `slice'
	from /tmp/tmp.kb4cnhvum2/test.rb:2:in `<main>'
```

This patch will fix the problem.

[Fix GH-1837]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r62742 | k0kubun | 2018-03-13 21:32:31 +0900 (Tue, 13 Mar 2018) | 3 lines

mjit_compile.c: remove unintended definition

Actually r62741 defined the macro... It wasn't intentional.
------------------------------------------------------------------------
r62741 | k0kubun | 2018-03-13 21:29:55 +0900 (Tue, 13 Mar 2018) | 7 lines

mjit_compile.c: disable comment_id by default

Doing `rb_ary_aref` to `global_symbols.ids` is not thread-safe and
randomly causes SEGV.
https://gist.github.com/k0kubun/ab60727c6be7c0e777d2b4241f59173c

But it's convenient for development. So I keep it optionally available.
------------------------------------------------------------------------
r62740 | watson1978 | 2018-03-13 18:15:10 +0900 (Tue, 13 Mar 2018) | 109 lines

Improve Pathname performance

If it will not use special variables (like $1, $&, $`...),
it can improve the performance by using Regexp#match? instead of Regexp#=~.
Because Regexp#=~ will generate the objects to special variables by pattern matching.

This patch will replace Regexp#=~ without special variables to Regexp#match?.
(Excludes https://github.com/ruby/ruby/blob/trunk/ext/pathname/lib/pathname.rb#L144-L153)

[Fix GH-1836] [ruby-core:86093] [Bug #14599]

## Environment
* OS : Ubuntu 17.10
* Compiler : gcc version 7.2.0
* CPU : Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
* Memory : 16 GB

## TL;DR
                            | Before | After  | Speed up
--------------------------- | ------ | ------ | --------
Pathname#absolute?          | 142836 | 198487 | 39.0%
Pathname#cleanpath          |  60706 |  79415 | 30.8%
Pathname#root?              | 603806 | 759157 | 25.7%
Pathname#absolute?          | 142592 | 197859 | 38.8%
Pathname#each_filename      | 115600 | 152982 | 32.3%
Pathname#ascend             |  50494 |  63606 | 26.0%
Pathname#+                  | 100550 | 130372 | 29.7%
Pathname#join               |  46673 |  60994 | 30.7%
Pathname#relative_path_from |  28362 |  37494 | 32.2%

## Before
```
Calculating -------------------------------------
  Pathname#absolute?    142.836k ({U+00B1} 0.1%) i/s -    722.304k in   5.056884s
  Pathname#cleanpath     60.706k ({U+00B1} 0.1%) i/s -    306.764k in   5.053305s
      Pathname#root?    603.806k ({U+00B1} 0.3%) i/s -      3.062M in   5.071696s
  Pathname#absolute?    142.592k ({U+00B1} 0.1%) i/s -    720.846k in   5.055301s
Pathname#each_filename
                        115.600k ({U+00B1} 0.1%) i/s -    586.818k in   5.076292s
     Pathname#ascend     50.494k ({U+00B1} 0.1%) i/s -    255.301k in   5.056049s
          Pathname#+    100.550k ({U+00B1} 0.1%) i/s -    509.630k in   5.068433s
       Pathname#join     46.673k ({U+00B1} 0.1%) i/s -    236.433k in   5.065696s
Pathname#relative_path_from
                         28.362k ({U+00B1} 0.0%) i/s -    143.728k in   5.067640s
```

## After
```
Calculating -------------------------------------
  Pathname#absolute?    198.487k ({U+00B1} 0.1%) i/s -    995.665k in   5.016272s
  Pathname#cleanpath     79.415k ({U+00B1} 0.1%) i/s -    404.406k in   5.092344s
      Pathname#root?    759.157k ({U+00B1} 0.0%) i/s -      3.800M in   5.005072s
  Pathname#absolute?    197.859k ({U+00B1} 0.1%) i/s -    995.720k in   5.032494s
Pathname#each_filename
                        152.982k ({U+00B1} 0.1%) i/s -    775.555k in   5.069607s
     Pathname#ascend     63.606k ({U+00B1} 0.0%) i/s -    320.862k in   5.044560s
          Pathname#+    130.372k ({U+00B1} 0.1%) i/s -    660.856k in   5.068991s
       Pathname#join     60.994k ({U+00B1} 0.1%) i/s -    305.068k in   5.001626s
Pathname#relative_path_from
                         37.494k ({U+00B1} 0.4%) i/s -    189.124k in   5.044146s
```

## Benchmark code
```ruby
require 'pathname'
require 'benchmark/ips'

Benchmark.ips do |x|
  root  = Pathname.new('/')
  path1 = Pathname.new('/path/to/some/file1.rb')
  path2 = Pathname.new('/path/to/some/file2.rb')

  x.report("Pathname#absolute?") do
    path1.absolute?
  end

  x.report("Pathname#cleanpath") do
    Pathname.new('/path/to/some/file.rb').cleanpath
  end

  x.report("Pathname#root?") do
    path1.root?
  end

  x.report("Pathname#absolute?") do
    path1.absolute?
  end

  x.report("Pathname#each_filename") do
    path1.each_filename { |file| }
  end

  x.report("Pathname#ascend") do
    path1.ascend { |path| }
  end

  x.report("Pathname#+") do
    path1 + path2
  end

  x.report("Pathname#join") do
    path1.join("../file3.rb")
  end

  x.report("Pathname#relative_path_from") do
    path1.relative_path_from(root)
  end
end
```
------------------------------------------------------------------------
r62739 | mame | 2018-03-13 17:18:03 +0900 (Tue, 13 Mar 2018) | 6 lines

Add FileUtils#cp_lr

* lib/fileutils.rb: Add FileUtils#cp_lr.  This method creates hard links
  of each file from directory to another directory recursively.
  This patch is based on Thomas Sawyers and Zachary Scott.
  [Feature #4189] [ruby-core:33820]
------------------------------------------------------------------------
r62738 | nobu | 2018-03-13 15:29:02 +0900 (Tue, 13 Mar 2018) | 5 lines

Rename test classes to allow stable test count when running test-all -j

[Fix GH-1763]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r62737 | nobu | 2018-03-13 12:48:56 +0900 (Tue, 13 Mar 2018) | 4 lines

eval_error.c: reset attributes

* eval_error.c (print_errinfo): reset all attributes for each
  lines before newlines.
------------------------------------------------------------------------
r62736 | nobu | 2018-03-13 12:40:10 +0900 (Tue, 13 Mar 2018) | 4 lines

eval_error.c: last newline

* eval_error.c (print_errinfo): do not print an empty line at the
  end when the message ends with a newline.
------------------------------------------------------------------------
r62735 | nobu | 2018-03-13 11:43:04 +0900 (Tue, 13 Mar 2018) | 5 lines

test_enumerator.rb: duplicate assertions

* test/ruby/test_enumerator.rb (test_uniq): remove assertions
  which ared duplicate of lazy enumerator tests in
  test_lazy_enumerator.rb.
------------------------------------------------------------------------
r62734 | nobu | 2018-03-13 11:00:42 +0900 (Tue, 13 Mar 2018) | 5 lines

Add missing class FrozenError to Exception subclasses list documentation

[Fix GH-1818]

From: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r62733 | nobu | 2018-03-13 10:28:28 +0900 (Tue, 13 Mar 2018) | 1 line

Hash instead of Set
------------------------------------------------------------------------
r62732 | nobu | 2018-03-13 10:28:27 +0900 (Tue, 13 Mar 2018) | 8 lines

Speed up func1.func2 completion by using Set for ignored modules

And thus avoiding Module#name calls. Those are slow, especially in
larger projects, with lots of anonymous modules.

[Fix GH-1798]

From: Dmitry Gutov <dgutov@yandex.ru>
------------------------------------------------------------------------
r62731 | nobu | 2018-03-13 10:00:08 +0900 (Tue, 13 Mar 2018) | 19 lines

Bug Fix Enumerator::Lazy#uniq state for multiple call

* enumerator.c (lazy_uniq_i): create new hash for each calls.
  [Fix GH-1820]

Currently

	2.5.0-preview1 :001 > arr = (0..100).lazy.uniq{|i| i % 10}
	 => #<Enumerator::Lazy: #<Enumerator::Lazy: 0..100>:uniq>
	2.5.0-preview1 :002 > arr.to_a
	 => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
	2.5.0-preview1 :003 > arr.to_a
	 => []

Expected

arr.to_a to always return same output

From: Anmol Chopra <anmolchopra@rocketbox.in>
------------------------------------------------------------------------
r62730 | svn | 2018-03-13 00:19:38 +0900 (Tue, 13 Mar 2018) | 1 line

* 2018-03-13
------------------------------------------------------------------------
r62729 | nobu | 2018-03-13 00:19:37 +0900 (Tue, 13 Mar 2018) | 4 lines

assertions.rb: parentheses

* test/lib/test/unit/assertions.rb (assert_not_all): fix missing
  parentheses.
------------------------------------------------------------------------
r62728 | nobu | 2018-03-12 22:04:28 +0900 (Mon, 12 Mar 2018) | 4 lines

eval_error.c: fix underflow

* eval_error.c (print_errinfo): get rid of negative string length.
  [ruby-core:86086] [Bug #14598]
------------------------------------------------------------------------
r62727 | nobu | 2018-03-12 16:55:17 +0900 (Mon, 12 Mar 2018) | 6 lines

ripper: fix escaped space

* parse.y: use tSP same as ripper instead of tSPACE.
  [ruby-core:86080] [Bug #14597]

* ext/ripper/eventids2.c: tSP is defined in ripper.c now.
------------------------------------------------------------------------
r62726 | svn | 2018-03-12 15:54:44 +0900 (Mon, 12 Mar 2018) | 1 line

* 2018-03-12
------------------------------------------------------------------------
r62725 | nobu | 2018-03-12 15:54:43 +0900 (Mon, 12 Mar 2018) | 7 lines

Fix setting method visibility on method wrapped with prepend

Ignore prepended modules when looking for already defined methods on a
class to set the visibility on.
[Fix GH-1834]

From: Dylan Thacker-Smith <Dylan.Smith@shopify.com>
------------------------------------------------------------------------
r62724 | nobu | 2018-03-11 21:19:08 +0900 (Sun, 11 Mar 2018) | 8 lines

parse.y: fix interpolated string literal dedent

* parse.y (heredoc_dedent): fix interpolated string literal dedent,
  remove indentations from only nodes with the newline flag.
  [ruby-core:85983] [Bug #14584]

* parse.y (here_document): set the newline flag on literal string
  nodes starting at the beginning of line.
------------------------------------------------------------------------
r62723 | nobu | 2018-03-11 21:12:08 +0900 (Sun, 11 Mar 2018) | 1 line

parse.y: reduce duplicate code
------------------------------------------------------------------------
r62722 | k0kubun | 2018-03-11 18:47:28 +0900 (Sun, 11 Mar 2018) | 5 lines

test_jit.rb: show debugging output on stderr

instead of stdout.

We would not capture the output as test results.
------------------------------------------------------------------------
r62721 | k0kubun | 2018-03-11 18:36:08 +0900 (Sun, 11 Mar 2018) | 1 line

test_jit.rb: fix typo
------------------------------------------------------------------------
r62720 | k0kubun | 2018-03-11 18:32:48 +0900 (Sun, 11 Mar 2018) | 8 lines

test_jit.rb: add debugging output

Sometimes gcc fails to exec cc1 like this:
https://gist.github.com/ko1/c3db8b193e9cc65c39c541e10d957509

I'm not sure why it happens at all. Please let me add this debugging
output to inspect the random failure on CI for now.
I'll remove this after we confirm it's not helpful.
------------------------------------------------------------------------
r62719 | svn | 2018-03-11 09:05:14 +0900 (Sun, 11 Mar 2018) | 1 line

* 2018-03-11
------------------------------------------------------------------------
r62718 | nobu | 2018-03-11 09:05:12 +0900 (Sun, 11 Mar 2018) | 5 lines

re.c: fixed escaped multibyte char

* re.c (unescape_nonascii): escaped multibyte character should be
  copied as-is, just with checking if the encoding matches.
  https://twitter.com/sakuro/status/972014409986883584
------------------------------------------------------------------------
r62717 | k0kubun | 2018-03-10 23:52:12 +0900 (Sat, 10 Mar 2018) | 33 lines

compile.c: mark all ISeq ancestors as catch_except_p

This change assumes that continuously reading `parent_iseq` from block
ISeq would reach non-block ISeq finally.

test/ruby/test_jit.rb: add test that catches 2-depth exception

Combination of r62654 and r62678 caused following error in this test.

-e:12:in `wrapper': Stack consistency error (sp: 14, bp: 13) (fatal)
== disasm: #<ISeq:wrapper@-e:10 (10,0)-(12,3)> (catch: FALSE)===========
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] paths<Arg> [ 1] prefixes<Arg>
0000 putself                                                          (  11)[LiCa]
0001 getlocal_WC_0    paths
0003 getlocal_WC_0    prefixes
0005 opt_send_without_block <callinfo!mid:catch_true, argc:2, FCALL|ARGS_SIMPLE>, <callcache>
0008 leave                                                            (  12)[Re]

As you can see, it says `catch: FALSE`, but obviously it catches
exception raised from `return path`.

As of r62655, it was kind of intentional because I only cared about
expiration of JIT-ed frame and I've thought calling `vm_exec` is only
needed once for it. So r62654 was NOT actually checking if it may catch
exception.

But for r62678, obviously we should set catch_except_p=TRUE for all
ISeqs which may catch exception. Otherwise catch table lookup would
fail.

With this bugfix, code generated by r62655 might be worse, but at least
while loop can be marked as `catch: FALSE` as expected.
------------------------------------------------------------------------
r62716 | nobu | 2018-03-10 20:26:54 +0900 (Sat, 10 Mar 2018) | 1 line

signal.c: refine error messages
------------------------------------------------------------------------
r62715 | nobu | 2018-03-10 19:36:35 +0900 (Sat, 10 Mar 2018) | 4 lines

signal.c: check NUL bytes

* signal.c (trap_signm): check NUL bytes explicitly before raising
  "unsupported signal" ArgumentError.
------------------------------------------------------------------------
r62714 | k0kubun | 2018-03-10 16:05:32 +0900 (Sat, 10 Mar 2018) | 8 lines

mjit.c: keep mutex unlocked on destroy

`mjit_finish` may destroy mutex even while it's still locked by
`worker` by race condition. That would result in the following error:
[BUG] pthread_mutex_destroy: Device or resource busy (EBUSY)

Actually I couldn't get a core dump for it and reproduce it multiple
times. So I'm not sure this fixes the issue which I faced or not.
------------------------------------------------------------------------
r62713 | suke | 2018-03-10 15:46:01 +0900 (Sat, 10 Mar 2018) | 1 line

ext/win32ole/win32ole.c: fix typo. [ci skip]
------------------------------------------------------------------------
r62710 | suke | 2018-03-10 11:16:30 +0900 (Sat, 10 Mar 2018) | 1 line

* ext/win32ole/win32ole.c: fix url of ActiveState. Thanks to Kazuhiro Nishiyama. [ci skip]
------------------------------------------------------------------------
r62709 | kazu | 2018-03-10 09:34:24 +0900 (Sat, 10 Mar 2018) | 8 lines

Fix warning: cast from pointer to integer of different size

```
.../ruby/iseq.c: In function 'rb_vm_insn_null_translator':
.../ruby/iseq.c:137:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     return (int)addr;
            ^
```
------------------------------------------------------------------------
r62708 | kazu | 2018-03-10 09:33:11 +0900 (Sat, 10 Mar 2018) | 8 lines

Fix error: implicit conversion loses integer precision

http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/627906
```
iseq.h:41:36: error: implicit conversion loses integer precision: 'rb_num_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
    int cnt = iseq->body->variable.flip_count;
        ~~~   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
```
------------------------------------------------------------------------
r62707 | svn | 2018-03-10 05:11:46 +0900 (Sat, 10 Mar 2018) | 1 line

* 2018-03-10
------------------------------------------------------------------------
r62706 | tenderlove | 2018-03-10 05:11:45 +0900 (Sat, 10 Mar 2018) | 35 lines

Add direct marking on iseq operands

Directly marking iseq operands allows us to eliminate the "mark array"
stored on ISEQ objects, which will reduce the amount of memory ISEQ
objects consume.  This patch changes the iseq mark function to:

* Directly marks ISEQ operands
* Iterate over and mark child ISEQs

It also introduces two flags on the ISEQ object.  In order to mark
instruction operands, we have to disassemble the instructions and find
the instruction parameters and types.  Instructions may also be
translated to jump addresses.  Instruction sequences may get marked by
the GC *while* they're mid flight (being compiled).  The
`ISEQ_TRANSLATED` flag is used to indicate whether or not the
instructions have been translated to jump addresses so that when we
decode the instructions we know whether or not we need to go from jump
location back to original instruction or not.

Not all ISEQ objects have any markable objects embedded in their
instructions.  We can detect whether or not an ISEQ has markable objects
in the instructions at compile time.  If the instructions contain
markable objects, we set a flag `ISEQ_MARKABLE_ISEQ` on the ISEQ object.
This means that during the mark phase, we can skip decompilation if the
flag is *not* set.  In other words, we can avoid decompilation of we
know in advance there is nothing to mark.

`once` instructions have an operand that contains the result of a
one-time compilation of a regex.  Before this patch, that operand was
called an "inline cache", even though the struct was actually an "inline
storage".  This patch changes the operand to be an "inline storage" so
that we can differentiate between caches that need marking (the inline
storage) and caches that don't need marking (inline cache).

[ruby-core:84909]
------------------------------------------------------------------------
r62705 | nobu | 2018-03-09 13:24:48 +0900 (Fri, 09 Mar 2018) | 7 lines

configure.ac: --disable-mathn option

* Makefile.in, win32/Makefile.sub: move CANONICALIZATION_FOR_MATHN
  from config.h which affects all extension libraries to XCFLAGS
  for the core only.

* configure.ac: added --disable-mathn option.
------------------------------------------------------------------------
r62704 | nobu | 2018-03-09 12:57:34 +0900 (Fri, 09 Mar 2018) | 4 lines

math.c: calling order

* math.c (math_log, rb_math_log): inverted calling order, to
  remove unused argument.
------------------------------------------------------------------------
r62703 | nobu | 2018-03-09 12:51:04 +0900 (Fri, 09 Mar 2018) | 1 line

Removed useless assertions [ci skip]
------------------------------------------------------------------------
r62702 | nobu | 2018-03-09 12:02:08 +0900 (Fri, 09 Mar 2018) | 3 lines

rational.c: removed redundant conditions

Fixnums can be compared by object values themselves only.
------------------------------------------------------------------------
r62701 | nobu | 2018-03-09 11:06:39 +0900 (Fri, 09 Mar 2018) | 5 lines

complex.c: removed redundant conditions

Fixnums can be compared by object values themselves only.
Addition/subtraction/mulplication of fixnum 0 do not affect the
sign.
------------------------------------------------------------------------
r62700 | nobu | 2018-03-09 10:51:25 +0900 (Fri, 09 Mar 2018) | 1 line

complex.c: removed already unused macros
------------------------------------------------------------------------
r62699 | svn | 2018-03-09 01:07:55 +0900 (Fri, 09 Mar 2018) | 1 line

* 2018-03-09
------------------------------------------------------------------------
r62698 | naruse | 2018-03-09 01:07:54 +0900 (Fri, 09 Mar 2018) | 4 lines

Raise ArgumentError if host component is nil

From: oss92 <mohamed.o.alnagdy@gmail.com>
fix https://github.com/ruby/ruby/pull/1278
------------------------------------------------------------------------
r62697 | kazu | 2018-03-08 22:00:04 +0900 (Thu, 08 Mar 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r62696 | svn | 2018-03-08 18:38:02 +0900 (Thu, 08 Mar 2018) | 1 line

* 2018-03-08
------------------------------------------------------------------------
r62695 | naruse | 2018-03-08 18:38:01 +0900 (Thu, 08 Mar 2018) | 5 lines

fix error if the input is mixed Unicode and percent-escapes

Reported by kivikakk (Ashe Connor) with tests and doc fix
Patch based on mame and fix by naruse
[Bug #14586]
------------------------------------------------------------------------
r62693 | k0kubun | 2018-03-07 23:35:28 +0900 (Wed, 07 Mar 2018) | 15 lines

transform_mjit_header.rb: inline ivar operations

* Optcarrot

before,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux]
last_commit=transform_mjit_header.rb: inline ivar operations
Calculating -------------------------------------
                     before,--jit  after,--jit
           optcarrot       67.852       69.359 fps

Comparison:
                        optcarrot
         after,--jit:        69.4 fps
        before,--jit:        67.9 fps - 1.02x  slower
------------------------------------------------------------------------
r62689 | nobu | 2018-03-07 21:04:43 +0900 (Wed, 07 Mar 2018) | 4 lines

complex.c: check type

* complex.c (m_cos, m_sin): determine the type by the internal
  type, not by a method.
------------------------------------------------------------------------
r62688 | nobu | 2018-03-07 20:54:07 +0900 (Wed, 07 Mar 2018) | 4 lines

complex.c: check type

* complex.c (nucomp_s_canonicalize_internal): determine the type
  by the internal type, not by a method.
------------------------------------------------------------------------
r62687 | nobu | 2018-03-07 20:49:24 +0900 (Wed, 07 Mar 2018) | 3 lines

complex.c, rational.c: no backref

Since r37702, parsing complex and rational do not use regexp.
------------------------------------------------------------------------
r62686 | nobu | 2018-03-07 20:49:23 +0900 (Wed, 07 Mar 2018) | 1 line

complex.c, rational.c: adjust indent
------------------------------------------------------------------------
r62685 | nobu | 2018-03-07 17:07:24 +0900 (Wed, 07 Mar 2018) | 4 lines

date_core.c: check conversion

* ext/date/date_core.c (offset_to_sec, d_lite_plus): check
  conversion results, to get rid of infinite recursion.
------------------------------------------------------------------------
r62684 | nobu | 2018-03-07 16:56:40 +0900 (Wed, 07 Mar 2018) | 1 line

test_date_arith.rb: needs `test_` prefix
------------------------------------------------------------------------
r62683 | nobu | 2018-03-07 16:43:07 +0900 (Wed, 07 Mar 2018) | 4 lines

object.c: conversions with ID

* object.c (rb_to_integer, rb_check_to_int): convert to Integer
  with method ID.
------------------------------------------------------------------------
r62682 | nobu | 2018-03-07 11:27:18 +0900 (Wed, 07 Mar 2018) | 1 line

complex.c, rational.c: simplified macro conditions
------------------------------------------------------------------------
r62681 | svn | 2018-03-07 00:14:23 +0900 (Wed, 07 Mar 2018) | 1 line

* 2018-03-07
------------------------------------------------------------------------
r62680 | nobu | 2018-03-07 00:14:22 +0900 (Wed, 07 Mar 2018) | 5 lines

vm_insnhelper.c: blockparamproxy in rescue

* vm_insnhelper.c (vm_call_opt_block_call): get block handler from
  the method local frame.  fix segfault at calling the proxy in
  rescue.  http://twitter.com/wannabe53/status/970955247626567680
------------------------------------------------------------------------
r62679 | nobu | 2018-03-06 22:43:54 +0900 (Tue, 06 Mar 2018) | 1 line

test_signal.rb: fix arguments order
------------------------------------------------------------------------
r62678 | k0kubun | 2018-03-06 22:23:22 +0900 (Tue, 06 Mar 2018) | 13 lines

_mjit_compile_pc_and_sp.erb: skip moving pc

on !body->catch_except_p. We need to move pc only when JIT execution is
canceled if the frame does not catch an exception.

_mjit_compile_insn.erb: lazily move pc for such optimized case
_mjit_compile_insn_body.erb: ditto
_mjit_compile_send.erb: ditto

* Optcarrot benchmark (--jit)

Before: 65.31 fps
After: 67.82 fps
------------------------------------------------------------------------
r62677 | k0kubun | 2018-03-06 21:53:19 +0900 (Tue, 06 Mar 2018) | 6 lines

transform_mjit_header.rb: inline VM instructions

* Optcarrot benchmark (--jit)

Before: 62.42 fps
After: 65.31 fps
------------------------------------------------------------------------
r62676 | k0kubun | 2018-03-06 20:46:02 +0900 (Tue, 06 Mar 2018) | 3 lines

transform_mjit_header.rb: drop obsoleted debug code

Now RubyCI is stable for this part. We no longer use this.
------------------------------------------------------------------------
r62675 | nobu | 2018-03-06 18:03:24 +0900 (Tue, 06 Mar 2018) | 5 lines

parse.y: tSPACE for old bison

* parse.y (tSPACE): define a separate token for escaped space, to
  fix `redefining user token number of ' '` error at word list
  separator on bison 2.
------------------------------------------------------------------------
r62674 | nobu | 2018-03-06 14:59:29 +0900 (Tue, 06 Mar 2018) | 1 line

use the reference as failure messages
------------------------------------------------------------------------
r62673 | nobu | 2018-03-06 14:15:57 +0900 (Tue, 06 Mar 2018) | 5 lines

thread.c: deadlock in backtrace

* thread.c (unblock_function_set): check interrupts just once
  during raising exceptions, as they are deferred since r16651.
  [ruby-core:85939] [Bug #14577]
------------------------------------------------------------------------
r62672 | nobu | 2018-03-06 12:31:46 +0900 (Tue, 06 Mar 2018) | 4 lines

resolv.rb: remove rangerand

* lib/resolv.rb (Resolv::DNS.rangerand): rand and random_number
  accept a Range.
------------------------------------------------------------------------
r62671 | nobu | 2018-03-06 11:48:17 +0900 (Tue, 06 Mar 2018) | 16 lines

resolv.rb: close socket

* lib/resolv.rb (UnconnectedUDP#lazy_initialize): store new
  sockets before binding, so the sockets get closed when the
  requester is closing.

* lib/resolv.rb (ConnectedUDP#lazy_initialize): ditto.

* lib/resolv.rb (UnconnectedUDP#close): synchronize to get rid of
  race condition.

* lib/resolv.rb (ConnectedUDP#close): ditto.

[ruby-core:85901] [Bug #14571]

From: quixoten (Devin Christensen) <quixoten@gmail.com>
------------------------------------------------------------------------
r62670 | hsbt | 2018-03-06 09:52:15 +0900 (Tue, 06 Mar 2018) | 1 line

Removed redundant private declaration.
------------------------------------------------------------------------
r62669 | svn | 2018-03-06 07:58:14 +0900 (Tue, 06 Mar 2018) | 1 line

* 2018-03-06
------------------------------------------------------------------------
r62668 | normal | 2018-03-06 07:58:13 +0900 (Tue, 06 Mar 2018) | 11 lines

thread.c: reset waitq of keeping mutexes in child

We must not maintain references to threads in the parent process
in any mutexes held by the child process.

* thread_sync.c (rb_mutex_cleanup_keeping_mutexes): new function
* thread.c (rb_thread_atfork): cleanup keeping mutexes
  [ruby-core:85940] [Bug #14578]

Fixes: r58604 (commit 3586c9e0876e784767a1c1adba9ebc2499fa0ec2)
       ("reduce rb_mutex_t size from 160 to 80 bytes on 64-bit")
------------------------------------------------------------------------
r62664 | kazu | 2018-03-05 21:23:48 +0900 (Mon, 05 Mar 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r62663 | nobu | 2018-03-05 17:32:46 +0900 (Mon, 05 Mar 2018) | 4 lines

parse.y: named whitespaces

* parse.y: named escaped whitespaces to show unexpected character.
  bare whitespaces should not appear outside of word_list.
------------------------------------------------------------------------
r62662 | nobu | 2018-03-05 16:21:54 +0900 (Mon, 05 Mar 2018) | 6 lines

README.md: removed unnecessary schemes

`mailto:` scheme on text looking like email-address is unnecessary
in Markdown.  [Fix GH-1827]

Co-Authored-By: YoeriH <yoeri90@gmail.com>
------------------------------------------------------------------------
r62661 | nobu | 2018-03-05 15:56:09 +0900 (Mon, 05 Mar 2018) | 11 lines

Tiny Fix for ASYNC BUG error message copying

The previous logic would overwrite the error message, replacing the message with the `fd` number.

This tiny update will print the message in full.

(I'm trying to debug an issue with the timer thread on my machine and the lack of error messages makes it really hard).

[Fix GH-1829]

From: Bo <bo@bowild.com>
------------------------------------------------------------------------
r62660 | nobu | 2018-03-05 10:57:27 +0900 (Mon, 05 Mar 2018) | 4 lines

required paths are real paths

Fix `test-spec` failures when the build directory is a symbolic
link.
------------------------------------------------------------------------
r62659 | nobu | 2018-03-05 10:54:21 +0900 (Mon, 05 Mar 2018) | 4 lines

Makefile.sub: reconfig

* win32/Makefile.sub (reconfig): phony target to force reconfigure
  with previous options.
------------------------------------------------------------------------
r62658 | ko1 | 2018-03-05 10:17:08 +0900 (Mon, 05 Mar 2018) | 4 lines

add prefix to the function name.

* vm.c (handle_exception): rename to vm_exce_handle_exception.

------------------------------------------------------------------------
r62657 | svn | 2018-03-05 00:10:12 +0900 (Mon, 05 Mar 2018) | 1 line

* 2018-03-05
------------------------------------------------------------------------
r62656 | eregon | 2018-03-05 00:09:32 +0900 (Mon, 05 Mar 2018) | 1 line

Update to ruby/spec@c1b568b
------------------------------------------------------------------------
r62655 | k0kubun | 2018-03-04 16:04:40 +0900 (Sun, 04 Mar 2018) | 79 lines

mjit_compile.c: use local variables for stack

if catch_except_p is FALSE. If catch_except_p is TRUE, stack values
should be on VM's stack when exception is thrown and the JIT-ed frame
is re-executed by VM's exception handler. If it's FALSE, the JIT-ed
frame won't be re-executed and don't need to keep values on VM's stack.

Using local variables allows us to reduce cfp->sp motion. Moving cfp->sp
is needed only for insns whose handles_frame? is false. So it improves
performance.

_mjit_compile_insn.erb: Prepare `stack_size` variable for GET_SP,
STACK_ADDR_FROM_TOP, TOPN macros. Share pc and sp motion partial view.
Use cancel handler created in mjit_compile.c.

_mjit_compile_send.erb: ditto. Also, when iseq->body->catch_except_p is
TRUE, this stops to call mjit_exec directly. I described the reason in
vm_insnhelper.h's comment for EXEC_EC_CFP.

_mjit_compile_pc_and_sp.erb: Shared logic for moving sp and pc. As you
can see from thsi file, when status->local_stack_p is TRUE and
insn.handles_frame? is false, moving sp is skipped. But if
insn.handles_frame? is true, values should be rolled back to VM's stack.
common.mk: add dependency for the file

_mjit_compile_insn_body.erb: Set sp value before canceling JIT on
DISPATCH_ORIGINAL_INSN. Replace GET_SP, STACK_ADDR_FROM_TOP, TOPN macros
for the case ocal_stack_p is TRUE and insn.handles_frame? is false.
In that case, values are not available on VM's stack and those macros
should be replaced.

mjit_compile.inc.erb: updated comments of macros which are supported by
JIT compiler. All references to `cfp->sp` should be replaced and thus
INC_SP, SET_SV, PUSH are no longer supported for now, because they are
not used now.

vm_exec.h: moved EXEC_EC_CFP definition to vm_insnhelper.h because it's
tighly coupled to CALL_METHOD.

vm_insnhelper.h: Have revised EXEC_EC_CFP definition moved from vm_exec.h.
Now it triggers mjit_exec for VM, and has the guard for catch_except_p
on JIT-ed code. See comments for details. CALL_METHOD delegates
triggering mjit_exec to EXEC_EC_CFP.

insns.def: Stopped using EXEC_EC_CFP for the case we don't want to
trigger mjit_exec. Those insns (defineclass, opt_call_c_function) are
not supported by JIT and it's safe to use RESTORE_REGS(), NEXT_INSN().
expandarray is changed to pass GET_SP() to replace the macro in
_mjit_compile_insn_body.erb.

vm_insnhelper.c: change to take sp for the above reason.

[close https://github.com/ruby/ruby/pull/1828]

This patch resurrects the performance which was attached in
[Feature #14235].

* Benchmark

Optcarrot (with configuration for benchmark_driver.gem)
https://github.com/benchmark-driver/optcarrot

$ benchmark-driver benchmark.yml --verbose 1 --rbenv 'before;before+JIT::before,--jit;after;after+JIT::after,--jit' --repeat-count 10
before: ruby 2.6.0dev (2018-03-04 trunk 62652) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-03-04 trunk 62652) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-03-04 local-variable.. 62652) [x86_64-linux]
last_commit=mjit_compile.c: use local variables for stack
after+JIT: ruby 2.6.0dev (2018-03-04 local-variable.. 62652) +JIT [x86_64-linux]
last_commit=mjit_compile.c: use local variables for stack
Calculating -------------------------------------
                         before  before+JIT       after   after+JIT
           optcarrot     53.552      59.680      53.697      63.358 fps

Comparison:
                        optcarrot
           after+JIT:        63.4 fps
          before+JIT:        59.7 fps - 1.06x  slower
               after:        53.7 fps - 1.18x  slower
              before:        53.6 fps - 1.18x  slower
------------------------------------------------------------------------
r62654 | k0kubun | 2018-03-04 16:04:28 +0900 (Sun, 04 Mar 2018) | 8 lines

compile.c: set catch_except_p flag

to be used for MJIT's optimization. It's not used for optimization
in this commit yet.

vm_core.h: added catch_except_p field.

iseq.c: show the flag in ISeq disasm for debugging.
------------------------------------------------------------------------
r62653 | nobu | 2018-03-04 15:24:38 +0900 (Sun, 04 Mar 2018) | 1 line

vm.c: trivial optimization
------------------------------------------------------------------------
r62652 | nobu | 2018-03-04 11:37:22 +0900 (Sun, 04 Mar 2018) | 4 lines

vm.c: handle_exception loop

* vm.c (vm_exec): hoist out handle_exception and loop to rewind
  for each catching frames.
------------------------------------------------------------------------
r62650 | nobu | 2018-03-04 11:09:47 +0900 (Sun, 04 Mar 2018) | 4 lines

vm.c: untangle goto loop

* vm.c (vm_exec): moved code to get rid of cross-jumps across
  branches.
------------------------------------------------------------------------
r62649 | svn | 2018-03-04 10:52:20 +0900 (Sun, 04 Mar 2018) | 1 line

* 2018-03-04
------------------------------------------------------------------------
r62648 | nobu | 2018-03-04 10:52:19 +0900 (Sun, 04 Mar 2018) | 1 line

vm_exec.c: reduced repeated same calls
------------------------------------------------------------------------
r62644 | nobu | 2018-03-03 14:09:32 +0900 (Sat, 03 Mar 2018) | 7 lines

mjit_config.h: MJIT_LDSHARED

* configure.in (MJIT_LDSHARED): define based on LDSHARED with
  replacing CC with MJIT_CC.

* Makefile.in, win32/Makefile.sub (mjit_config.h): instead of the
  default LDSHARED, use MJIT_LDSHARED to link mjit shared objects.
------------------------------------------------------------------------
r62643 | k0kubun | 2018-03-03 13:50:14 +0900 (Sat, 03 Mar 2018) | 46 lines

insns.def: unwrap vm_exec for yield

Outer vm_exec can catch longjmp. We don't need to call vm_exec first
here.

This optimizes JIT-ed yield:

* Benchmark script

```
require 'benchmark_driver'

Benchmark.driver do |x|
  x.prelude %{
    def yielder
      yield + 1
    end
  }
  x.report 'yielder', %{
    yielder { 1 }
  }
  x.loop_count 300_000_000

  x.rbenv 'before', 'before,--jit', 'after', 'after,--jit'
  x.verbose
end
```

* Result

before: ruby 2.6.0dev (2018-03-03 trunk 62642) [x86_64-linux]
before,--jit: ruby 2.6.0dev (2018-03-03 trunk 62642) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-03-03 trunk 62642) [x86_64-linux]
last_commit=insns.def: unwrap vm_exec for yield
after,--jit: ruby 2.6.0dev (2018-03-03 trunk 62642) +JIT [x86_64-linux]
last_commit=insns.def: unwrap vm_exec for yield
Calculating -------------------------------------
                         before  before,--jit       after  after,--jit
             yielder    37.214M       29.222M     35.904M      38.035M i/s -    300.000M times in 8.061581s 10.266312s 8.355716s 7.887447s

Comparison:
                          yielder
         after,--jit:  38035121.0 i/s
              before:  37213544.0 i/s - 1.02x  slower
               after:  35903565.7 i/s - 1.06x  slower
        before,--jit:  29221787.6 i/s - 1.30x  slower
------------------------------------------------------------------------
r62642 | svn | 2018-03-03 13:07:03 +0900 (Sat, 03 Mar 2018) | 1 line

* 2018-03-03
------------------------------------------------------------------------
r62641 | k0kubun | 2018-03-03 13:07:02 +0900 (Sat, 03 Mar 2018) | 173 lines

vm.c: add mjit_enable_p flag

to count up total calls properly. Some places (especially CALL_METHOD)
invoke mjit_exec twice for one method call. It would be problematic when
debugging, or possibly it would result in a wrong profiling result.

This commit doesn't have impact for performance:

* Optcarrot benchmark

** before

fps: 59.37757770848619
fps: 56.49998488958699
fps: 59.07900362739362
fps: 58.924749807695996
fps: 57.667905665594894
fps: 57.540021018385254
fps: 59.5518055679647
fps: 55.93831555148311
fps: 57.82685112863262
fps: 59.22391754481736
checksum: 59662

** after

fps: 58.461881158098194
fps: 59.32685183081354
fps: 54.11334310279802
fps: 59.2281560439788
fps: 58.60495705318312
fps: 55.696478648491045
fps: 58.49003452654724
fps: 58.387771929393224
fps: 59.24156772816439
fps: 56.68804731968107
checksum: 59662

* Discourse

Your Results: (note for timings- percentile is first, duration is second in millisecs)

** before (without JIT)

categories_admin:
  50: 16
  75: 17
  90: 24
  99: 37
home_admin:
  50: 20
  75: 20
  90: 24
  99: 42
topic_admin:
  50: 16
  75: 16
  90: 18
  99: 28
categories:
  50: 36
  75: 37
  90: 45
  99: 68
home:
  50: 38
  75: 40
  90: 53
  99: 92
topic:
  50: 14
  75: 15
  90: 17
  99: 26

** after (without JIT)

categories_admin:
  50: 16
  75: 16
  90: 24
  99: 36
home_admin:
  50: 19
  75: 20
  90: 23
  99: 41
topic_admin:
  50: 16
  75: 16
  90: 19
  99: 33
categories:
  50: 35
  75: 36
  90: 44
  99: 61
home:
  50: 38
  75: 40
  90: 52
  99: 101
topic:
  50: 14
  75: 15
  90: 15
  99: 24

** before (with JIT)

categories_admin:
  50: 19
  75: 23
  90: 29
  99: 44
home_admin:
  50: 24
  75: 26
  90: 32
  99: 46
topic_admin:
  50: 20
  75: 22
  90: 27
  99: 44
categories:
  50: 41
  75: 43
  90: 51
  99: 66
home:
  50: 46
  75: 49
  90: 56
  99: 68
topic:
  50: 18
  75: 19
  90: 22
  99: 31

** after (with JIT)

categories_admin:
  50: 18
  75: 21
  90: 28
  99: 42
home_admin:
  50: 23
  75: 25
  90: 31
  99: 51
topic_admin:
  50: 19
  75: 20
  90: 24
  99: 31
categories:
  50: 41
  75: 44
  90: 52
  99: 69
home:
  50: 45
  75: 48
  90: 61
  99: 88
topic:
  50: 19
  75: 20
  90: 24
  99: 33
------------------------------------------------------------------------
r62637 | nobu | 2018-03-02 23:45:28 +0900 (Fri, 02 Mar 2018) | 5 lines

openssl: search winsock

* ext/openssl/extconf.rb: on Windows search winsock library
  always, regardless pkg-config.  direct use of winsock is not
  region of OpenSSL.  [ruby-core:85895] [Bug #14568]
------------------------------------------------------------------------
r62635 | eregon | 2018-03-02 21:56:37 +0900 (Fri, 02 Mar 2018) | 3 lines

Clarify the documentation of the YAML module [Misc #14567]

Based on a patch from Victor Shepelev
------------------------------------------------------------------------
r62633 | nobu | 2018-03-02 20:24:29 +0900 (Fri, 02 Mar 2018) | 1 line

io/console: drop 2.1.0 support [ci skip]
------------------------------------------------------------------------
r62631 | nobu | 2018-03-02 16:53:27 +0900 (Fri, 02 Mar 2018) | 1 line

io/console: drop 2.0.0 support [ci skip]
------------------------------------------------------------------------
r62630 | nobu | 2018-03-02 16:49:20 +0900 (Fri, 02 Mar 2018) | 4 lines

Makefile.sub: need suffix

* win32/Makefile.sub: fix missing suffix of user32.lib.
  [Bug #14422]
------------------------------------------------------------------------
r62629 | nobu | 2018-03-02 16:24:16 +0900 (Fri, 02 Mar 2018) | 4 lines

Makefile.sub: link user32.lib

* win32/Makefile.sub: always link user32.lib which provides a lot
  of very common library functions.  [Bug #14422]
------------------------------------------------------------------------
r62628 | nobu | 2018-03-02 13:36:14 +0900 (Fri, 02 Mar 2018) | 1 line

search winsock libraries explicitly
------------------------------------------------------------------------
r62627 | nobu | 2018-03-02 10:37:53 +0900 (Fri, 02 Mar 2018) | 6 lines

configure.ac: library options to MAINLIBS

* configure.ac (MAINLIBS): moved library options for main program
  and static libruby, and append MAINLIBS to LIBRUBYARG_STATIC, as
  these libraries are not needed for linking to shared libruby.
  [ruby-core:85882] [Bug #14422]
------------------------------------------------------------------------
r62626 | nobu | 2018-03-02 10:16:37 +0900 (Fri, 02 Mar 2018) | 1 line

Makefile.in (ruby.pc): phony target [ci skip]
------------------------------------------------------------------------
r62625 | nobu | 2018-03-02 09:37:28 +0900 (Fri, 02 Mar 2018) | 1 line

configure.ac: fix up r59130
------------------------------------------------------------------------
r62624 | svn | 2018-03-02 07:49:27 +0900 (Fri, 02 Mar 2018) | 1 line

* 2018-03-02
------------------------------------------------------------------------
r62623 | nobu | 2018-03-02 07:49:26 +0900 (Fri, 02 Mar 2018) | 6 lines

MJIT specific flags

Passing options to configure like as `configure MJIT_OPTFLAGS=-O
MJIT_DEBUGFLAGS=-g` overrides options to be used to compile JIT
code, separately from the default options to be used for ruby
itself.
------------------------------------------------------------------------
r62622 | nobu | 2018-03-01 17:26:02 +0900 (Thu, 01 Mar 2018) | 5 lines

compile.c: raise on invalid input

* compile.c (ibf_load_object_unsupported, ibf_load_object_class):
  should raise an exception.  rejection of invalid input is not a
  bug.
------------------------------------------------------------------------
r62621 | nobu | 2018-03-01 16:59:57 +0900 (Thu, 01 Mar 2018) | 5 lines

compile.c: do not truncate VALUE to long

* compile.c (ibf_dump_object_regexp): do not truncate VALUE to
  long.  it makes invalid VALUE on IL32LLP64 platforms where long
  is shorter than VALUE.
------------------------------------------------------------------------
r62620 | nobu | 2018-03-01 13:10:25 +0900 (Thu, 01 Mar 2018) | 5 lines

parse.y: refine assign_in_cond warning

* parse.y (assign_in_cond): refine a warning message for
  assignment of a literal in conditinal expression.
  [ruby-core:85872] [Bug #14562]
------------------------------------------------------------------------
r62619 | nobu | 2018-03-01 12:26:05 +0900 (Thu, 01 Mar 2018) | 1 line

tool/bisect.sh: extracted build part [ci skip]
------------------------------------------------------------------------
r62618 | nobu | 2018-03-01 11:33:15 +0900 (Thu, 01 Mar 2018) | 4 lines

bisect.sh: make srcs in builddir [ci skip]

* tool/bisect.sh: also srcs needs Makefile, must in the build but
  not the source directory.
------------------------------------------------------------------------
r62617 | nobu | 2018-03-01 09:37:47 +0900 (Thu, 01 Mar 2018) | 4 lines

compile.c: fix load_from_binary

* compile.c (ibf_load_iseq_each): realpath may be nil.  follow up
  r59709.  [fix https://github.com/Shopify/bootsnap/issues/132]
------------------------------------------------------------------------
r62616 | svn | 2018-03-01 08:31:43 +0900 (Thu, 01 Mar 2018) | 1 line

* 2018-03-01
------------------------------------------------------------------------
r62615 | nobu | 2018-03-01 08:31:42 +0900 (Thu, 01 Mar 2018) | 5 lines

Revert r61936 "compile.c: use ALLOCV_N"

* compile.c (ibf_dump_object_list): `dump->obj_list` is not fixed
  yet, as new objects are pushed by lbf_dump_object_object.
  fixes crash by buffer overflow.
------------------------------------------------------------------------
r62614 | k0kubun | 2018-02-28 23:31:17 +0900 (Wed, 28 Feb 2018) | 3 lines

NEWS: resurrect ticket number [ci skip]

which was unintentionally dropped at r62612.
------------------------------------------------------------------------
r62613 | nobu | 2018-02-28 22:32:29 +0900 (Wed, 28 Feb 2018) | 3 lines

common.mk: clean timestamp and intermediate header

[ci-skip]
------------------------------------------------------------------------
r62612 | k0kubun | 2018-02-28 21:12:20 +0900 (Wed, 28 Feb 2018) | 8 lines

erb.rb: relax warn level of ERB.new

I changed my mind and thought branching ERB.new in all libraries is too
hard. Code becomes too ugly. I increased the warn level to 2, and the
old initializer will be removed when Ruby 2.5 becomes EOL.
-S option of erb(1) stays in the same policy: will be removed at Ruby 2.7.

NEWS: note about the direction
------------------------------------------------------------------------
r62611 | hsbt | 2018-02-28 20:12:36 +0900 (Wed, 28 Feb 2018) | 1 line

Prefer to use %x instead of backtick.
------------------------------------------------------------------------
r62608 | ko1 | 2018-02-28 16:31:49 +0900 (Wed, 28 Feb 2018) | 6 lines

skip a test if another Thread is running.

* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): this test
  checks no object allocation while specific process, however another
  thread can generate objects.

------------------------------------------------------------------------
r62607 | nobu | 2018-02-28 14:43:53 +0900 (Wed, 28 Feb 2018) | 5 lines

file.c: realpath on special symlink

* file.c (realpath_rec): fallback to symlink path when it is
  accessible but the link target is not actual entry on file
  systems.  [ruby-dev:50487] [Bug #14557]
------------------------------------------------------------------------
r62606 | nobu | 2018-02-28 14:17:01 +0900 (Wed, 28 Feb 2018) | 5 lines

file.c: get rid of useless conversion

* file.c (rb_file_s_stat): File.stat does not accept an IO
  object as trying conversion to path name string first.  skip
  conversion to IO and try stat(2) only.
------------------------------------------------------------------------
r62605 | eregon | 2018-02-28 05:45:59 +0900 (Wed, 28 Feb 2018) | 1 line

Update to ruby/spec@51f301d
------------------------------------------------------------------------
r62604 | eregon | 2018-02-28 05:44:57 +0900 (Wed, 28 Feb 2018) | 3 lines

Remove tool/pull-latest-mspec-spec

* It is now part of mspec in spec/mspec/tool/pull-latest-mspec-spec
------------------------------------------------------------------------
r62603 | svn | 2018-02-28 05:21:26 +0900 (Wed, 28 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62602 | eregon | 2018-02-28 05:21:25 +0900 (Wed, 28 Feb 2018) | 1 line

Update to ruby/spec@cbe855c
------------------------------------------------------------------------
r62601 | svn | 2018-02-28 05:21:02 +0900 (Wed, 28 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62600 | eregon | 2018-02-28 05:21:01 +0900 (Wed, 28 Feb 2018) | 1 line

Update to ruby/mspec@d287466
------------------------------------------------------------------------
r62599 | svn | 2018-02-28 01:45:10 +0900 (Wed, 28 Feb 2018) | 1 line

* 2018-02-28
------------------------------------------------------------------------
r62598 | mrkn | 2018-02-28 01:45:09 +0900 (Wed, 28 Feb 2018) | 6 lines

Support two `to_r`-responding args in Rational()

* rational.c (nurat_s_convert): call `to_r` to convert non-Numeric
  objects also if argc == 2 in Rational().

* test/ruby/test_rational.rb: add tests.
------------------------------------------------------------------------
r62597 | nobu | 2018-02-27 23:22:57 +0900 (Tue, 27 Feb 2018) | 1 line

common.mk: added missing dependencies on id.h
------------------------------------------------------------------------
r62596 | hsbt | 2018-02-27 23:08:26 +0900 (Tue, 27 Feb 2018) | 4 lines

[EXPERIMENTAL] Support upload option for s3 package hosting.

  Example:
    $ ruby tool/make-snapshot -archname=snapshot -s3=tmp /tmp trunk
------------------------------------------------------------------------
r62595 | nobu | 2018-02-27 22:28:31 +0900 (Tue, 27 Feb 2018) | 5 lines

random.c: Random.extend Formatter

* random.c (InitVM_Random): extend Random itself by Formatter
  module, as well as the `bytes` method used by the module.
  [Feature #4938]
------------------------------------------------------------------------
r62594 | k0kubun | 2018-02-27 20:12:23 +0900 (Tue, 27 Feb 2018) | 3 lines

Refactor ERB version checking for keyword arguments

Improving code like r62590. See r62529 for details.
------------------------------------------------------------------------
r62593 | nobu | 2018-02-27 17:15:27 +0900 (Tue, 27 Feb 2018) | 1 line

defs/id.def: predefine to_f ID
------------------------------------------------------------------------
r62592 | svn | 2018-02-27 10:17:47 +0900 (Tue, 27 Feb 2018) | 1 line

* 2018-02-27
------------------------------------------------------------------------
r62591 | nobu | 2018-02-27 10:17:46 +0900 (Tue, 27 Feb 2018) | 1 line

complex.c: use predefined IDs
------------------------------------------------------------------------
r62590 | k0kubun | 2018-02-26 23:42:39 +0900 (Mon, 26 Feb 2018) | 72 lines

tool/ruby_vm/helpers/dumper.rb: check ERB version

I could not `make` trunk (62585) without this patch.

```
$ make -j4 && make install
        BASERUBY = /home/pocke/.rbenv/shims/ruby --disable=gems
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared
        CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Werror=misleading-indentation -Wno-overlength-strings -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wmissing-noreturn -Wimplicit-fallthrough=0 -Werror=duplicated-cond -Werror=restrict -std=gnu99  -fPIC
        XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT
        CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/10.0.0
        DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.6  -fstack-protector
        SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
        LANG = en_GB.UTF-8
        LC_ALL =
        LC_CTYPE =
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

generating opt_sc.inc
generating optunifs.inc
generating insns.inc
generating insns_info.inc
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
make: *** [Makefile:534: opt_sc.inc] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
make: *** [Makefile:534: optunifs.inc] Error 1
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
make: *** [Makefile:534: insns.inc] Error 1
make: *** [Makefile:534: insns_info.inc] Error 1
```

I guess this issue is same as https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/62531
So I applied the same change to tool/ruby_vm/helpers/dumper.rb also.

close https://github.com/ruby/ruby/pull/1826

Co-authored-by: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r62589 | nobu | 2018-02-26 23:39:16 +0900 (Mon, 26 Feb 2018) | 1 line

use convert_type_with_id
------------------------------------------------------------------------
r62588 | nobu | 2018-02-26 23:30:39 +0900 (Mon, 26 Feb 2018) | 1 line

use convert_type_with_id
------------------------------------------------------------------------
r62585 | nobu | 2018-02-26 17:37:02 +0900 (Mon, 26 Feb 2018) | 5 lines

Makefile.in: fix portability issue

* Makefile.in (mjit_config.h): Alternative value with $@ and
  printf without argument are not portable, could fail on some
  platforms.
------------------------------------------------------------------------
r62584 | naruse | 2018-02-26 17:01:05 +0900 (Mon, 26 Feb 2018) | 1 line

r62071 is backported into Ruby 2.5 [Bug #14407]
------------------------------------------------------------------------
r62583 | nobu | 2018-02-26 16:57:16 +0900 (Mon, 26 Feb 2018) | 1 line

make-snapshot: added missing options to usage
------------------------------------------------------------------------
r62582 | mrkn | 2018-02-26 16:57:15 +0900 (Mon, 26 Feb 2018) | 11 lines

Use RB_INTEGER_TYPE_P instead of rb_obj_is_kind_of

For checking whether an object is an Integer, because a subclass of
Integer is meaningless in Ruby, RB_INTEGER_TYPE_P is better than
rb_obj_is_kind_of for speed.

* object.c (rb_to_integer): Use RB_INTEGER_TYPE_P instead of rb_obj_is_kind_of.

* object.c (rb_check_to_integer): ditto.

* range.c (range_max): ditto.
------------------------------------------------------------------------
r62581 | mrkn | 2018-02-26 16:31:10 +0900 (Mon, 26 Feb 2018) | 10 lines

Check the result of to_int in Kernel#Integer

[ruby-core:85813] [Bug #14552]

* object.c (rb_convert_to_integer):
  Check the result of to_int in Kernel#Integer

* test/ruby/test_integer.rb: add tests.

* spec/ruby/core/kernel/Integer_spec.rb: fix examples.
------------------------------------------------------------------------
r62580 | svn | 2018-02-26 15:00:10 +0900 (Mon, 26 Feb 2018) | 1 line

* 2018-02-26
------------------------------------------------------------------------
r62579 | nobu | 2018-02-26 15:00:10 +0900 (Mon, 26 Feb 2018) | 4 lines

make-snapshot: exporting ChangLog with git

* tool/make-snapshot (package): export ChangLog file under the
  exported directory.  Git can work only under a git repository.
------------------------------------------------------------------------
r62578 | nobu | 2018-02-26 15:00:09 +0900 (Mon, 26 Feb 2018) | 1 line

make-snapshot: remove -j option from GNUMAKEFLAGS
------------------------------------------------------------------------
r62577 | nobu | 2018-02-26 15:00:08 +0900 (Mon, 26 Feb 2018) | 4 lines

vcs.rb: .git at export

* tool/vcs.rb (VCS::GIT#export): do not remove .git directory.
  should remove it by after_export.
------------------------------------------------------------------------
r62576 | svn | 2018-02-25 22:52:08 +0900 (Sun, 25 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62575 | eregon | 2018-02-25 22:52:07 +0900 (Sun, 25 Feb 2018) | 12 lines

Add a new #filter alias for #select

* In Enumerable, Enumerator::Lazy, Array, Hash and Set
  [Feature #13784] [ruby-core:82285]
* Share specs for the various #select#select! methods and
  reuse them for #filter/#filter!.
* Add corresponding filter tests for select tests.
* Update NEWS.

[Fix GH-1824]

From: Alexander Patrick <adp90@case.edu>
------------------------------------------------------------------------
r62574 | nobu | 2018-02-25 22:17:35 +0900 (Sun, 25 Feb 2018) | 1 line

date_parse.c, date_strptime.c: ensure symbols static all
------------------------------------------------------------------------
r62573 | nobu | 2018-02-25 13:49:51 +0900 (Sun, 25 Feb 2018) | 1 line

date_core.c: ensure symbols static all
------------------------------------------------------------------------
r62572 | nobu | 2018-02-25 13:28:11 +0900 (Sun, 25 Feb 2018) | 6 lines

date_core.c: defensive code

* ext/date/date_core.c (f_cmp): check comparison failure.

* ext/date/date_core.c (d_lite_step): deal with the comparison
  result more defensively.  [ruby-core:85796] [Bug #14549]
------------------------------------------------------------------------
r62571 | nobu | 2018-02-25 12:08:40 +0900 (Sun, 25 Feb 2018) | 1 line

guard before noreturn function
------------------------------------------------------------------------
r62570 | k0kubun | 2018-02-25 11:12:25 +0900 (Sun, 25 Feb 2018) | 8 lines

process.c: guard eargp against GC

`rb_str_append` may trigger GC, and in that case eargp might be GCed.
Probably for protecting it, `RB_GC_GUARD(execarg_obj)` can be seen in
other places.

Hoping to fix:
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/569818
------------------------------------------------------------------------
r62567 | mrkn | 2018-02-25 00:36:09 +0900 (Sun, 25 Feb 2018) | 4 lines

rb_int_powm: call rb_int_pow directly

* bignum.c (rb_int_powm): call rb_int_pow directly instead of calling `**`
  operator.
------------------------------------------------------------------------
r62566 | svn | 2018-02-25 00:06:08 +0900 (Sun, 25 Feb 2018) | 1 line

* 2018-02-25
------------------------------------------------------------------------
r62565 | mrkn | 2018-02-25 00:06:07 +0900 (Sun, 25 Feb 2018) | 1 line

complex.c, rational.c: remove dead code
------------------------------------------------------------------------
r62564 | mrkn | 2018-02-24 23:56:36 +0900 (Sat, 24 Feb 2018) | 3 lines

rational.c: simplify a branch condition

* rational.c (nurat_s_convert): simplify a branch condition.
------------------------------------------------------------------------
r62563 | kazu | 2018-02-24 17:54:19 +0900 (Sat, 24 Feb 2018) | 1 line

lib/erb.rb: Add uplevel to warn
------------------------------------------------------------------------
r62560 | naruse | 2018-02-24 11:58:41 +0900 (Sat, 24 Feb 2018) | 3 lines

Judge ERB version not RUBY_VERSION but ERB.version

On cross compilation, ruby command uses fake RUBY_VERSION.
------------------------------------------------------------------------
r62559 | naruse | 2018-02-24 11:58:39 +0900 (Sat, 24 Feb 2018) | 1 line

On getting changelog, use git-log with --no-notes
------------------------------------------------------------------------
r62558 | nobu | 2018-02-24 11:55:03 +0900 (Sat, 24 Feb 2018) | 1 line

version.h: get rid of duplication
------------------------------------------------------------------------
r62557 | nobu | 2018-02-24 11:48:09 +0900 (Sat, 24 Feb 2018) | 1 line

test for r62555
------------------------------------------------------------------------
r62556 | nobu | 2018-02-24 11:45:12 +0900 (Sat, 24 Feb 2018) | 3 lines

rational.c: removed needless calc

* rational.c (read_num): exp(0) is 1, no need to multiply.
------------------------------------------------------------------------
r62555 | nobu | 2018-02-24 11:08:36 +0900 (Sat, 24 Feb 2018) | 6 lines

rational.c: segfault on Rational exponent

* rational.c (read_num): fix segfault on Rational() with positive
  but less than the length of fractional part exponent.  should be
  negated to convert to divisor which is a reciprocal.
  [ruby-core:85783] [Bug #14547]
------------------------------------------------------------------------
r62553 | nobu | 2018-02-24 10:12:51 +0900 (Sat, 24 Feb 2018) | 9 lines

Improve Array#sample with random documentation

* array.c (rb_ary_sample): Adds examples for the use of the
  optional parameter random for Array#sample and unifies the style
  with the documentation of Array#shuffle.

[Fix GH-1825]

From: Alberto Almagro <alberto.almagro@rakuten.com>
------------------------------------------------------------------------
r62552 | k0kubun | 2018-02-24 10:05:20 +0900 (Sat, 24 Feb 2018) | 4 lines

NEWS: elaborate on JIT for 2.6.0-preview1 [ci skip]

This information is backported from the draft of 2.6.0-preview1 release
note. NEWS for final 2.6.0 release will be different.
------------------------------------------------------------------------
r62551 | nobu | 2018-02-24 10:02:58 +0900 (Sat, 24 Feb 2018) | 7 lines

Fix typo: blcok -> block

Typo in a comment about "evaluator body".

[Fix GH-1824]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r62550 | svn | 2018-02-24 09:40:37 +0900 (Sat, 24 Feb 2018) | 1 line

* 2018-02-24
------------------------------------------------------------------------
r62549 | k0kubun | 2018-02-24 09:40:36 +0900 (Sat, 24 Feb 2018) | 1 line

mjit.c: fix deadlock on marking MJIT's ISeq
------------------------------------------------------------------------
r62548 | nobu | 2018-02-23 17:39:03 +0900 (Fri, 23 Feb 2018) | 4 lines

eval_error.c: rb_error_write flags

* eval_error.c (rb_error_write): add highlight and reverse mode
  flags.  defaulted to rb_stderr_tty_p() if Qnil.
------------------------------------------------------------------------
r62547 | nobu | 2018-02-23 17:32:33 +0900 (Fri, 23 Feb 2018) | 6 lines

groups_spec.rb: get rid of limit on macOS

* spec/ruby/core/process/groups_spec.rb: on macOS, getgroups(2)
  has a variant which has no limit but not setgroups(2).  so the
  default groups may exceed the limit.  as the call of setgroups
  is expected to fail here, the content does not matter.
------------------------------------------------------------------------
r62546 | hsbt | 2018-02-23 14:09:11 +0900 (Fri, 23 Feb 2018) | 1 line

Update minitest-5.11.3 on bundled gems.
------------------------------------------------------------------------
r62545 | nobu | 2018-02-23 12:45:55 +0900 (Fri, 23 Feb 2018) | 1 line

Use Process::Tms
------------------------------------------------------------------------
r62544 | nobu | 2018-02-23 11:18:52 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] missing docs at toplevel
------------------------------------------------------------------------
r62543 | nobu | 2018-02-23 11:16:43 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] obsolete classes
------------------------------------------------------------------------
r62542 | nobu | 2018-02-23 11:16:42 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] nodoc internal methods/classes
------------------------------------------------------------------------
r62541 | nobu | 2018-02-23 11:16:41 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] hide declaration from rdoc
------------------------------------------------------------------------
r62540 | nobu | 2018-02-23 11:16:41 +0900 (Fri, 23 Feb 2018) | 1 line

process.c: deprecated Struct::Tms
------------------------------------------------------------------------
r62536 | eregon | 2018-02-23 00:34:17 +0900 (Fri, 23 Feb 2018) | 1 line

test/ruby/test_rubyoptions.rb: fix typo and only expect +JIT for CRuby
------------------------------------------------------------------------
r62535 | k0kubun | 2018-02-23 00:29:33 +0900 (Fri, 23 Feb 2018) | 1 line

ruby.c: fix typo in r62530
------------------------------------------------------------------------
r62534 | svn | 2018-02-23 00:11:13 +0900 (Fri, 23 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62533 | k0kubun | 2018-02-23 00:11:12 +0900 (Fri, 23 Feb 2018) | 4 lines

test_rubyoptions.rb: don't test --jit if not supported

test/lib/jit_support.rb: carved out JITSupport
test/ruby/test_jit.rb: ditto
------------------------------------------------------------------------
r62532 | svn | 2018-02-23 00:03:09 +0900 (Fri, 23 Feb 2018) | 1 line

* 2018-02-23
------------------------------------------------------------------------
r62531 | k0kubun | 2018-02-23 00:03:08 +0900 (Fri, 23 Feb 2018) | 18 lines

tool/generic_erb.rb: check ERB version

instead of Ruby's.

When older ERB is installed but Ruby is still 2.6.0, this may cause
error like:

```
Traceback (most recent call last):
    5: from ../src/tool/generic_erb.rb:36:in `<main>'
    4: from ../src/tool/generic_erb.rb:36:in `map'
    3: from ../src/tool/generic_erb.rb:43:in `block in <main>'
    2: from ../src/tool/generic_erb.rb:43:in `block (2 levels) in <main>'
    1: from /opt/local/lib/ruby/2.6.0/erb.rb:873:in `result'
/opt/local/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
```

For safety, I changed this to check ERB's version. See also: r62529.
------------------------------------------------------------------------
r62530 | k0kubun | 2018-02-22 23:53:17 +0900 (Thu, 22 Feb 2018) | 34 lines

version.c: show +JIT when --jit is passed

in version output.
version.h: ditto
ruby.c: propagate option for it
common.mk: updated dependency for version.c

mjit.c: overwrites the RUBY_DESCRIPTION to have +JIT when --jit is passed

test/ruby/test_rubyoptions.rb: add test for them

Only `ruby --jit -v` will have "+JIT", but this is intentional.
This may not be convenient for debugging by ticket with `ruby -v`,
but it's convenient for benchmark tools that pass options (--jit)
when showing it. At least such behavior is planned for benchmark_driver.gem
and this behavior is designed for it. Other benchmark tools are
recommended to follow the behavior too if they show version.
RUBY_DESCRIPTION might be useful for it too.

The position of "+JIT" is changed from original proposal because other
platforms like JRuby and TruffleRuby end it with archtecture.
It's made similar to JRuby, but it's upper-cased because Matz made approval
for "+JIT" in the ticket.

Example:
$ ruby -v
ruby 2.6.0dev (2018-02-22 trunk 62529) [x86_64-linux]
$ ruby --jit -v
ruby 2.6.0dev (2018-02-22 trunk 62529) +JIT [x86_64-linux]

After --jit is made default in the future, this output may be removed.
So do not rely on this output if possible.

[Feature #14462]
------------------------------------------------------------------------
r62529 | k0kubun | 2018-02-22 22:28:25 +0900 (Thu, 22 Feb 2018) | 25 lines

erb.rb: deprecate safe_level of ERB.new

Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments
(trim_mode, eoutvar) are changed to keyword arguments.
Old ways to specify arguments are deprecated and warned now.

bin/erb: deprecate -S option.

We'll remove all of deprecated ones at Ruby 2.7+.

enc/make_encmake.rb: stopped using deprecated interface
ext/etc/mkconstants.rb: ditto
ext/socket/mkconstants.rb: ditto
sample/ripper/ruby2html.rb: ditto
spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto
spec/ruby/library/erb/new_spec.rb: ditto
test/erb/test_erb.rb: ditto
test/erb/test_erb_command.rb: ditto
tool/generic_erb.rb: ditto
tool/ruby_vm/helpers/dumper.rb: ditto
tool/transcode-tblgen.rb: ditto
lib/rdoc/erbio.rb: ditto
lib/rdoc/generator/darkfish.rb: ditto

[Feature #14256]
------------------------------------------------------------------------
r62528 | nobu | 2018-02-22 21:51:41 +0900 (Thu, 22 Feb 2018) | 6 lines

Fix CMDARG manipulation

* parse.y: Fix CMDARG manipulation. Use CMDARG_P to identify
  keyword_do/keyword_do_block.  [Feature #14506] [Fix GH-1823]

From: Ilya Bylich <ibylich@gmail.com>
------------------------------------------------------------------------
r62526 | nobu | 2018-02-22 16:34:43 +0900 (Thu, 22 Feb 2018) | 5 lines

Ignore rb_mjit_min_header- instead of rb_mjit_header-

[Fix GH-1822]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r62525 | nobu | 2018-02-22 16:34:42 +0900 (Thu, 22 Feb 2018) | 5 lines

Ignore /mjit_config.h

[Fix GH-1822]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r62524 | nobu | 2018-02-22 14:06:46 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: fixed unintentional description list [ci skip]
------------------------------------------------------------------------
r62523 | nobu | 2018-02-22 13:55:58 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: fixed unintentional description list [ci skip]
------------------------------------------------------------------------
r62522 | nobu | 2018-02-22 13:13:02 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: adjust layout [ci skip]
------------------------------------------------------------------------
r62521 | kou | 2018-02-22 12:33:42 +0900 (Thu, 22 Feb 2018) | 2 lines

Add KeyError, NameError and NoMethodError changes

------------------------------------------------------------------------
r62520 | nobu | 2018-02-22 12:14:39 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: fixed a typo [ci skip]
------------------------------------------------------------------------
r62519 | nobu | 2018-02-22 10:58:29 +0900 (Thu, 22 Feb 2018) | 4 lines

test_process.rb: assert minimum maxgroups

* test/ruby/test_process.rb (TestProcess#test_maxgroups):
  maxgroups should be one at least.
------------------------------------------------------------------------
r62518 | svn | 2018-02-22 02:06:24 +0900 (Thu, 22 Feb 2018) | 1 line

* 2018-02-22
------------------------------------------------------------------------
r62517 | mame | 2018-02-22 02:06:23 +0900 (Thu, 22 Feb 2018) | 1 line

* NEWS: add NEWS entry about Binding#source_location [Feature #14230]
------------------------------------------------------------------------
r62516 | nobu | 2018-02-21 18:04:48 +0900 (Wed, 21 Feb 2018) | 5 lines

test_process.rb: unlimited getgroups on darwin

* test/ruby/test_process.rb (TestProcess#test_maxgroups): Darwin
  extension of getgroups(2) which is not limited to MAXGROUPS is
  used.
------------------------------------------------------------------------
r62515 | ko1 | 2018-02-21 17:51:49 +0900 (Wed, 21 Feb 2018) | 5 lines

use `--version`.

* benchmark/driver.rb: use `--version` instead of `-v` to get version
  information.

------------------------------------------------------------------------
r62514 | ko1 | 2018-02-21 17:14:51 +0900 (Wed, 21 Feb 2018) | 2 lines

add NEWS entries about [Feature #14318] and [Feature #14330].

------------------------------------------------------------------------
r62513 | hsbt | 2018-02-21 16:12:17 +0900 (Wed, 21 Feb 2018) | 8 lines

Update url with 404 status on LEGAL file.

  * Update redirected and upstream url.
  * Added the Wayback Machine url for missing link.

  [Bug #12762][ruby-dev:49802]

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62512 | hsbt | 2018-02-21 15:31:39 +0900 (Wed, 21 Feb 2018) | 5 lines

Update maintainers of unmaintained libraries.

  [Misc #14211]

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62508 | nobu | 2018-02-21 14:37:23 +0900 (Wed, 21 Feb 2018) | 4 lines

test_time_tz.rb: past Japanese DST tzdata fix

* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix
  the expected data at the end of DST.  [Bug #14438]
------------------------------------------------------------------------
r62506 | nobu | 2018-02-21 11:21:10 +0900 (Wed, 21 Feb 2018) | 5 lines

test_time_tz.rb: past Japanese DST tzdata fix

* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow
  the tzdata 2018 fix of Japanese DST transitions (1948-1951).
  [ruby-core:85373] [Bug #14438]
------------------------------------------------------------------------
r62505 | nobu | 2018-02-21 09:55:22 +0900 (Wed, 21 Feb 2018) | 4 lines

vm_insnhelper.c: no insns_info in jit

* vm_insnhelper.c: instructions info are not used in jit source
  code.  resolved a warning by transform_mjit_header.rb.
------------------------------------------------------------------------
r62504 | nobu | 2018-02-21 09:36:29 +0900 (Wed, 21 Feb 2018) | 1 line

Makefile.in (mjit_config.h): fix duplicated output
------------------------------------------------------------------------
r62503 | svn | 2018-02-21 09:17:54 +0900 (Wed, 21 Feb 2018) | 1 line

* 2018-02-21
------------------------------------------------------------------------
r62502 | nobu | 2018-02-21 09:17:54 +0900 (Wed, 21 Feb 2018) | 4 lines

Makefile.in: empty comment

* Makefile.in (mjit_config.h): add an empty comment if no content,
  to tell the empty content explicitly.
------------------------------------------------------------------------
r62500 | nobu | 2018-02-20 19:08:27 +0900 (Tue, 20 Feb 2018) | 7 lines

error.c: bypass Exception.new

* error.c (rb_exc_new, rb_exc_new_str): instantiate exception
  object directly without Exception.new method call.

Redefinition of class method `new` is an outdated style, and
internal exceptions should not be affected by it.
------------------------------------------------------------------------
r62499 | nobu | 2018-02-20 18:39:41 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: separate call from macro

* mjit.c (convert_unit_to_func): separate a function call from a
  macro, which evaluates the argument multiple times.
------------------------------------------------------------------------
r62498 | nobu | 2018-02-20 18:38:55 +0900 (Tue, 20 Feb 2018) | 4 lines

Signature of rb_uint2inum and rb_int2inum

* include/ruby/ruby.h (rb_int2inum, rb_uint2inum): adjust
  declarations.  [ruby-core:83424] [Bug #14036]
------------------------------------------------------------------------
r62497 | nobu | 2018-02-20 18:26:38 +0900 (Tue, 20 Feb 2018) | 4 lines

random.c: Random.bytes

* random.c (random_s_bytes): new method Random.bytes, which is
  equivalent to Random::DEFAULT.bytes.  [Feature #4938]
------------------------------------------------------------------------
r62496 | nobu | 2018-02-20 18:16:34 +0900 (Tue, 20 Feb 2018) | 3 lines

Makefile.in: fix for Solaris

* Makefile.in (mjit_config.h): expand for each words.
------------------------------------------------------------------------
r62495 | normal | 2018-02-20 17:44:38 +0900 (Tue, 20 Feb 2018) | 12 lines

tool/m4/ruby_replace_type.m4: use AC_CHECK_TYPES for HAVE_* macros

AC_CHECK_TYPE (no "S") does not define HAVE_* macros for types,
so use AC_CHECK_TYPES (with "S") instead.  Without this,
HAVE_CLOCKID_T goes undefined and I can't USE_MONOTONIC_COND in
thread_pthread.c :<

Fixes: r62446 (git 673ae0e3c9cefd693ef82f19a6761e147fc6de93)
	("configure.ac: check clockid_t with necessary headers")

* tool/m4/ruby_replace_type.m4: use AC_CHECK_TYPES for HAVE_* macros
  [ruby-core:85659] [Bug #14494]
------------------------------------------------------------------------
r62494 | nobu | 2018-02-20 17:01:44 +0900 (Tue, 20 Feb 2018) | 5 lines

Signature of rb_uint2big and rb_int2big

* include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with
  uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE
  respectively.  [ruby-core:83424] [Bug #14036]
------------------------------------------------------------------------
r62493 | nobu | 2018-02-20 16:51:22 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: fix compile error

* mjit.c (check_tmpdir): W_OK and S_ISDIR may not defined on
  Windows.
------------------------------------------------------------------------
r62492 | nobu | 2018-02-20 14:32:07 +0900 (Tue, 20 Feb 2018) | 5 lines

mjit.c: prefer $TMPDIR and $TMP

* mjit.c (system_tmpdir): prefer `$TMPDIR` and `$TMP` over system
  defulat temporary directory, if exists, writable, and safe.
  [ruby-core:85651] [Bug #14496]
------------------------------------------------------------------------
r62491 | nobu | 2018-02-20 14:32:06 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: dldflags on mingw

* mjit.c (CC_DLDFLAGS_ARGS): default libraries are necessary on
  Windows.
------------------------------------------------------------------------
r62490 | nobu | 2018-02-20 13:05:42 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: fix memory leak

* mjit.c (system_tmpdir): rb_w32_wstr_to_mbstr returns the pointer
  to `malloc`ed region.  allocate with `xmalloc` instead.
------------------------------------------------------------------------
r62489 | nobu | 2018-02-20 12:15:33 +0900 (Tue, 20 Feb 2018) | 5 lines

vm.c: disable dtrace in jit source

* vm.c: include dummy dtrace probes header in jit header.

* vm_insnhelper.c: probes headers are included by vm.c.
------------------------------------------------------------------------
r62488 | nobu | 2018-02-20 11:37:28 +0900 (Tue, 20 Feb 2018) | 4 lines

common.mk: moved macros to mjit_config.h

* Makefile.in, common.mk, win32/Makefile.sub: moved MJIT macros to
  mjit_config.h from XCFLAGS.
------------------------------------------------------------------------
r62487 | svn | 2018-02-20 10:23:24 +0900 (Tue, 20 Feb 2018) | 1 line

* 2018-02-20
------------------------------------------------------------------------
r62486 | nobu | 2018-02-20 10:23:23 +0900 (Tue, 20 Feb 2018) | 1 line

Makefile.in: function to quote for mjit_config.h
------------------------------------------------------------------------
r62485 | normal | 2018-02-19 18:28:56 +0900 (Mon, 19 Feb 2018) | 1 line

thread_pthread.c: spelling ("cancellation")
------------------------------------------------------------------------
r62484 | normal | 2018-02-19 18:28:51 +0900 (Mon, 19 Feb 2018) | 3 lines

thread_pthread.c: fix thread cache for non-monotonic clock

I noticed this because of https://bugs.ruby-lang.org/issues/14494
------------------------------------------------------------------------
r62480 | nobu | 2018-02-19 15:28:03 +0900 (Mon, 19 Feb 2018) | 1 line

mjit.c: fix a typo [ci skip]
------------------------------------------------------------------------
r62479 | nobu | 2018-02-19 10:45:17 +0900 (Mon, 19 Feb 2018) | 8 lines

Escape MINIRUBY in --make-flags to extmk.rb

If MINIRUBY had arguments, which is the case of cross compiling
they wouldn't be parsed correctly and compiling would fail as a RUBY
without arguments would then be present in the Makefile's in ext/*
[ruby-core:85620] [Bug #14486] [Fix GH-1819]

Author:    Carl Horberg <carl.hoerberg@gmail.com>
------------------------------------------------------------------------
r62478 | normal | 2018-02-19 09:30:43 +0900 (Mon, 19 Feb 2018) | 5 lines

thread_pthread.c (native_thread_create): remove needless attrp

Followup-to: r61719 (commit e8f40bd8f83e1b22ef9c22f0e5d7a1fc0b07f94c)
  ("thread_pthread: remove HAVE_PTHREAD_ATTR_INIT ifdefs")
  [ruby-core:84758] [Misc #14342]
------------------------------------------------------------------------
r62477 | normal | 2018-02-19 09:23:00 +0900 (Mon, 19 Feb 2018) | 3 lines

thread_pthread.c (rb_thread_create_mjit_thread): destroy attr

This is required on some platforms to avoid leaks.
------------------------------------------------------------------------
r62476 | normal | 2018-02-19 08:58:35 +0900 (Mon, 19 Feb 2018) | 3 lines

thread_pthread.c (thread cache): destroy cond after unlock

No need to hold a lock while destroying a condition variable.
------------------------------------------------------------------------
r62475 | normal | 2018-02-19 08:58:30 +0900 (Mon, 19 Feb 2018) | 6 lines

thread_pthread.c (rb_thread_create_mjit): set detach before create

This should be slightly cheaper on NPTL as it does not rely on
atomics to set pd->joinid.   We already use pthread_attr_setdetachstate,
so it won't introduce new problems by using a function we did not
use before.
------------------------------------------------------------------------
r62474 | svn | 2018-02-19 06:03:14 +0900 (Mon, 19 Feb 2018) | 1 line

* 2018-02-19
------------------------------------------------------------------------
r62473 | normal | 2018-02-19 06:03:13 +0900 (Mon, 19 Feb 2018) | 5 lines

thread.c: remove redundant USE_SIGALTSTACK #define

thread.c already includes vm_core.h where USE_SIGALTSTACK is
defined, #include it explicitly (eval_intern.h already includes
it)
------------------------------------------------------------------------
r62469 | nobu | 2018-02-18 18:33:21 +0900 (Sun, 18 Feb 2018) | 4 lines

mjit.c: pch file argument

* mjit.c (compile_c_to_so): pass pch file only when using
  "-include-pch" option.
------------------------------------------------------------------------
r62468 | nobu | 2018-02-18 18:23:47 +0900 (Sun, 18 Feb 2018) | 1 line

adjust indent
------------------------------------------------------------------------
r62467 | kazu | 2018-02-18 17:11:50 +0900 (Sun, 18 Feb 2018) | 1 line

README.ja.md: Mac OS X -> macOS [ci skip]
------------------------------------------------------------------------
r62466 | normal | 2018-02-18 16:54:10 +0900 (Sun, 18 Feb 2018) | 13 lines

thread_pthread.c: shorten and fix thread cache implementation

Update to use ccan/list for constant-time delete on expiry and
avoid malloc.  We must also initialize th->thread_id upon thread
reuse so Thread#name= works immediately upon thread creation.

We must also reinitialize the cache mutex and list_head on
fork like we do with GVL and timer thread mutexes.
While we're at it, use monotonic clock for timeout to avoid
system time changes.

"make exam TESTS='-x test_time_tz'" passes with USE_THREAD_CACHE
enabled (but remains off, here).
------------------------------------------------------------------------
r62465 | nobu | 2018-02-18 15:21:28 +0900 (Sun, 18 Feb 2018) | 5 lines

mjit.c: place DLDFLAGS at last

* mjit.c (compile_c_to_so): place DLDFLAGS at last, as compilers
  other than cl.exee don't care the order of flag arguments,
  usually.
------------------------------------------------------------------------
r62464 | nobu | 2018-02-18 14:12:26 +0900 (Sun, 18 Feb 2018) | 1 line

aclocal.m4: remove ruby_check_va_copy.m4
------------------------------------------------------------------------
r62463 | nobu | 2018-02-18 14:10:52 +0900 (Sun, 18 Feb 2018) | 4 lines

mjit.c: no va_copy

* mjit.c (form_args): do not use va_copy, which cannot detect
  appropriate way to simulate when cross compiling.
------------------------------------------------------------------------
r62462 | normal | 2018-02-18 12:00:33 +0900 (Sun, 18 Feb 2018) | 13 lines

thread.c (thread_join_m): handle negative timeouts correctly

Users may subtract and round into negative values when using
Thread#join, so clamp the timeout to zero to avoid infinite/long
timeouts.

Note: other methods such as Kernel#sleep and IO.select will
raise on negative values, but Thread#join is an outlier *shrug*

This restores Ruby 2.5 (and earlier) behavior.

Fixes: r62182 (commit c915390b9530c31b4665aacf27c1adfc114f768e)
       ("thread.c: avoid FP for Thread#join")
------------------------------------------------------------------------
r62461 | normal | 2018-02-18 12:00:28 +0900 (Sun, 18 Feb 2018) | 7 lines

thread.c (double2timespec): adjust to use NULL for infinity

Using:
  strace ruby -e 'Thread.new { sleep }.join(Float::INFINITY)'

Will show a difference in futex() syscall args (not that I'd
ever advocate Float::INFINITY as a Thread#join arg :P)
------------------------------------------------------------------------
r62460 | usa | 2018-02-18 11:51:31 +0900 (Sun, 18 Feb 2018) | 4 lines

Fixed the order of arguments for cl.exe

* mjit.c (compile_c_to_so): `CC_DLDFLAGS_ARGS` must be after `-link` for cl.exe.

------------------------------------------------------------------------
r62459 | normal | 2018-02-18 11:12:23 +0900 (Sun, 18 Feb 2018) | 5 lines

thread_pthread.c (native_cond_timeout): simplify

Rely on getclockofday for CLOCK_MONOTONIC, avoid needless
variables, and rely on overflow protection from timespec_add
instead of coding our own.
------------------------------------------------------------------------
r62458 | normal | 2018-02-18 11:12:18 +0900 (Sun, 18 Feb 2018) | 3 lines

thread.c: stop updating timespec when timeout is unspecified

No need to waste cycles updating timespecs if there's no expiry.
------------------------------------------------------------------------
r62457 | normal | 2018-02-18 11:12:13 +0900 (Sun, 18 Feb 2018) | 3 lines

thread.c (update_timespec): use timespec_update_expire

Rename "end" as a appropriate for readability.
------------------------------------------------------------------------
r62456 | normal | 2018-02-18 09:38:45 +0900 (Sun, 18 Feb 2018) | 3 lines

thread.c: introduce timespec_cmp for timespec comparisons

This hopefully improves readability when comparing timespecs.
------------------------------------------------------------------------
r62455 | normal | 2018-02-18 09:38:40 +0900 (Sun, 18 Feb 2018) | 4 lines

thread.c (timespec_update_expire): improve naming

Naming the constant timespec as "end" should make it more
apparent is is an absolute time.  Update callers, too.
------------------------------------------------------------------------
r62454 | svn | 2018-02-18 09:38:36 +0900 (Sun, 18 Feb 2018) | 1 line

* 2018-02-18
------------------------------------------------------------------------
r62453 | normal | 2018-02-18 09:38:35 +0900 (Sun, 18 Feb 2018) | 4 lines

ext/fiddle/lib/fiddle/pack.rb: pack "void *" properly on 32-bit

Fixes: r62450 (commit 1aaeeb326e754c5c5db83fbf35f780f729a9dfed)
       ("long long is a C99ism")
------------------------------------------------------------------------
r62452 | kazu | 2018-02-17 23:03:52 +0900 (Sat, 17 Feb 2018) | 1 line

Remove unnecessary `[]`s
------------------------------------------------------------------------
r62451 | shyouhei | 2018-02-17 19:04:22 +0900 (Sat, 17 Feb 2018) | 4 lines

a C source code must end with EOL

cf: ISO 9899 section 5.1.1.2

------------------------------------------------------------------------
r62450 | shyouhei | 2018-02-17 18:51:23 +0900 (Sat, 17 Feb 2018) | 5 lines

long long is a C99ism

so SIZEOF_LONG_LONG is not always available.
We have to check its defined?-ness before using.

------------------------------------------------------------------------
r62449 | nobu | 2018-02-17 16:54:52 +0900 (Sat, 17 Feb 2018) | 4 lines

socket.rb: protected connect_internal

* ext/socket/lib/socket.rb (Addrinfo#connect_internal): make
  protected for Addrinfo#connect_to, instead of private and send.
------------------------------------------------------------------------
r62448 | nobu | 2018-02-17 14:52:21 +0900 (Sat, 17 Feb 2018) | 5 lines

LIBRUBY_A with exts

* Makefile.in, win32/Makefile.sub (LIBRUBY_A): link with extension
  libraries if EXTSTATIC is set, so that static-ruby would work
  too.
------------------------------------------------------------------------
r62447 | nobu | 2018-02-17 14:52:20 +0900 (Sat, 17 Feb 2018) | 4 lines

separate PRE_LIBRUBY_UPDATE

* Makefile.in, win32/Makefile.sub (PRE_LIBRUBY_UPDATE): separate
  definitions without miniruby.
------------------------------------------------------------------------
r62446 | nobu | 2018-02-17 14:22:56 +0900 (Sat, 17 Feb 2018) | 1 line

configure.ac: check clockid_t with necessary headers
------------------------------------------------------------------------
r62445 | nobu | 2018-02-17 10:30:05 +0900 (Sat, 17 Feb 2018) | 1 line

prefixed functions exported for mjit
------------------------------------------------------------------------
r62437 | svn | 2018-02-17 01:04:22 +0900 (Sat, 17 Feb 2018) | 1 line

* 2018-02-17
------------------------------------------------------------------------
r62436 | nagachika | 2018-02-17 01:04:21 +0900 (Sat, 17 Feb 2018) | 4 lines

fix regexp literal warning.

test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
[Bug #14481]
------------------------------------------------------------------------
r62433 | k0kubun | 2018-02-16 23:45:39 +0900 (Fri, 16 Feb 2018) | 236 lines

mjit.c: fix deadlock on class serial increment

This is reported by @hasimo. Fixing a case like this:

 #0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
 #1  0x00007fc7bd824dbd in __GI___pthread_mutex_lock (mutex=mutex@entry=0x55946d294440 <mjit_engine_mutex>) at ../nptl/pthread_mutex_lock.c:80               4
 #2  0x000055946cec54d9 in rb_native_mutex_lock (lock=lock@entry=0x55946d294440 <mjit_engine_mutex>) at thread_pthread.c:211
 #3  0x000055946cde10ca in CRITICAL_SECTION_START (msg=0x55946cfb5423 "mjit_gc_start_hook", level=4) at mjit.c:392
 #4  mjit_gc_start_hook () at mjit.c:412
 #5  0x000055946cda0dfe in gc_enter (event=0x55946cfaf91e "gc_rest", objspace=0x55946da51760) at gc.c:6623
 #6  gc_rest (objspace=objspace@entry=0x55946da51760) at gc.c:6515
 #7  0x000055946cd9f1cf in gc_rest (objspace=0x55946da51760) at gc.c:7841
 #8  objspace_malloc_increase (objspace=objspace@entry=0x55946da51760, new_size=<optimized out>, old_size=old_size@entry=0, type=type@entry=MEMOP_TYPE_MALLOC, mem=0x7fc7a4439010) at gc.c:7842
 #9  0x000055946cda1706 in objspace_malloc_fixup (size=<optimized out>, mem=0x7fc7a4439010, objspace=0x55946da51760) at gc.c:7910
 #10 objspace_xmalloc0 (objspace=0x55946da51760, size=<optimized out>, size@entry=3145728) at gc.c:7939
 #11 0x000055946cda3620 in ruby_xmalloc0 (size=3145728) at gc.c:8006
 #12 ruby_xmalloc (size=size@entry=3145728) at gc.c:8015
 #13 0x000055946ce93f4c in st_init_table_with_size (type=0x55946d28da30 <objhash>, size=<optimized out>) at st.c:602
 #14 0x000055946ce94287 in rebuild_table (tab=tab@entry=0x55946db669f0) at st.c:777
 #15 0x000055946ce963f7 in rebuild_table_if_necessary (tab=0x55946db669f0) at st.c:1139
 #16 st_add_direct_with_hash (hash=8577035585096733536, value=20, key=808451, tab=0x55946db669f0) at st.c:1207
 #17 st_update (tab=0x55946db669f0, key=key@entry=808451, func=<optimized out>, arg=140726472841392) at st.c:1512
 #18 0x000055946cda9e27 in tbl_update (optional_arg=<optimized out>, func=<optimized out>, key=<optimized out>, hash=<optimized out>) at hash.c:561
 #19 rb_hash_aset (hash=94095983218480, key=key@entry=808451, val=val@entry=20) at hash.c:1654
 #20 0x000055946cde243a in mjit_add_class_serial (class_serial=class_serial@entry=404225) at mjit.c:1414                    3
 #21 0x000055946cefcfab in rb_next_class_serial () at vm.c:321
 #22 0x000055946cf48324 in class_alloc (klass=<optimized out>, flags=28) at class.c:178
 #23 rb_include_class_new (module=module@entry=94096115733840, super=0) at class.c:820
 #24 0x000055946cf487ac in include_modules_at (klass=klass@entry=94096135960920, c=<optimized out>, module=<optimized out>, module@entry=94096115734160, search_super=search_super@entry=1) at class.c:913
 #25 0x000055946cf48ac8 in rb_include_module (klass=94096135960920, module=module@entry=94096115734160) at class.c:870
 #26 0x000055946cd84993 in rb_mod_append_features (module=94096115734160, include=<optimized out>) at eval.c:1178
 #27 0x000055946cf06829 in vm_call0_cfunc_with_frame (ci=0x7ffd6f6c9a20, cc=0x7ffd6f6c9ba0, argv=0x7ffd6f6c9ba0, calling=0x7ffd6f6c9a30, ec=0x55946da519c8) at vm_eval.c:87
 #28 vm_call0_cfunc (argv=0x7ffd6f6c9ba0, cc=0x7ffd6f6c9ba0, ci=0x7ffd6f6c9a20, calling=0x7ffd6f6c9a30, ec=0x55946da519c8) at vm_eval.c:102
 #29 vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6c9ae0, ci=ci@entry=0x7ffd6f6c9ad0, cc=cc@entry=0x7ffd6f6c9b00, argv=argv@entry=0x7ffd6f6c9ba0) at vm_eval.c:133
 #30 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7ffd6f6c9ba0, argc=1, id=4849, recv=94096115734160, ec=0x55946da519c8) at vm_eval.c:60
 #31 rb_call0 (ec=0x55946da519c8, recv=94096115734160, mid=4849, mid@entry=94096135960920, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6c9ba0, scope=scope@entry=CALL_FCALL, self=94096135960920) at vm_eval.c:302
 #32 0x000055946cf07b9b in rb_call (scope=CALL_FCALL, argv=0x7ffd6f6c9ba0, argc=1, mid=94096135960920, recv=<optimized out>) at vm_eval.c:595
 #33 rb_funcallv (recv=<optimized out>, mid=mid@entry=4849, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6c9ba0) at vm_eval.c:825
 #34 0x000055946cd848a7 in rb_mod_include (argc=0, argv=0x7fc7bdb4fce8, module=94096135960920) at eval.c:1203
 #35 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x5594710c06b0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4df00, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #36 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4df00, calling=<optimized out>, ci=0x5594710c06b0, cc=<optimized out>) at vm_insnhelper.c:1944
 #37 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #38 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #39 0x000055946cf035fc in invoke_block (captured=0x7ffd6f6ca0a0, opt_pc=<optimized out>, type=<optimized out>, cref=0x559476c23930, self=94096135960920, iseq=0x559471335ee0, ec=0x55946da519c8) at vm.c:1005
 #40 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7ffd6f6ca0a0, self=94096135960920, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x559476c23930, is_lambda=0) at vm.c:1057
 #41 0x000055946cf04520 in invoke_block_from_c_bh (ec=ec@entry=0x55946da519c8, block_handler=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6ca108, cref=<optimized out>, is_lambda=<optimized out>, is_lambda@entry=0, force_blockarg=0, passed_block_handler=0) at vm.c:1075
 #42 0x000055946cf04958 in vm_yield_with_cref (is_lambda=0, cref=<optimized out>, argv=0x7ffd6f6ca108, argc=1, ec=0x55946da519c8) at vm.c:1112
 #43 yield_under (under=94096135960920, self=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6ca108) at vm_eval.c:1572
 #44 0x000055946cf04b12 in rb_mod_module_exec (argc=argc@entry=1, argv=argv@entry=0x7ffd6f6ca108, mod=<optimized out>) at vm_eval.c:1770
 #45 0x000055946ce00fc6 in rb_mod_initialize (module=94096135960920) at object.c:1978
 #46 0x000055946cf06829 in vm_call0_cfunc_with_frame (ci=0x7ffd6f6ca130, cc=0x7fc7bdb4fc98, argv=0x7fc7bdb4fc98, calling=0x7ffd6f6ca140, ec=0x55946da519c8) at vm_eval.c:87
 #47 vm_call0_cfunc (argv=0x7fc7bdb4fc98, cc=0x7fc7bdb4fc98, ci=0x7ffd6f6ca130, calling=0x7ffd6f6ca140, ec=0x55946da519c8) at vm_eval.c:102
 #48 vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6ca1f0, ci=ci@entry=0x7ffd6f6ca1e0, cc=cc@entry=0x7ffd6f6ca210, argv=argv@entry=0x7fc7bdb4fc98) at vm_eval.c:133
 #49 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7fc7bdb4fc98, argc=0, id=3057, recv=94096135960920, ec=0x55946da519c8) at vm_eval.c:60
 #50 rb_call0 (ec=0x55946da519c8, recv=recv@entry=94096135960920, mid=mid@entry=3057, argc=argc@entry=3057, argv=argv@entry=0x0, scope=scope@entry=CALL_FCALL, self=94095983466120) at vm_eval.c:302
 #51 0x000055946cf07b9b in rb_call (scope=CALL_FCALL, argv=0x0, argc=3057, mid=3057, recv=94096135960920) at vm_eval.c:595
 #52 rb_funcallv (recv=recv@entry=94096135960920, mid=mid@entry=3057, argc=argc@entry=0, argv=argv@entry=0x7fc7bdb4fc98) at vm_eval.c:825
 #53 0x000055946cd89673 in rb_obj_call_init (obj=obj@entry=94096135960920, argc=argc@entry=0, argv=argv@entry=0x7fc7bdb4fc98) at eval.c:1590
 #54 0x000055946ce048a1 in rb_class_s_new (argc=0, argv=0x7fc7bdb4fc98, klass=<optimized out>) at object.c:2153
 #55 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x559471339c80, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4dfa8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #56 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4dfa8, calling=<optimized out>, ci=0x559471339c80, cc=<optimized out>) at vm_insnhelper.c:1944
 #57 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #58 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #59 0x000055946cf03274 in invoke_bmethod (ec=ec@entry=0x55946da519c8, iseq=iseq@entry=0x55946f15cbc0, self=self@entry=94096115734640, me=me@entry=0x559475664e28, type=type@entry=572653825, opt_pc=0, captured=0x55947158e8a0) at vm.c:1026
 #60 0x000055946cf03534 in invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x55947158e8a0, self=94096115734640, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=1) at vm.c:1060
 #61 0x000055946cf036ce in invoke_block_from_c_proc (ec=<optimized out>, proc=<optimized out>, self=<optimized out>, argc=1, argv=<optimized out>, passed_block_handler=<optimized out>, is_lambda=<optimized out>) at vm.c:1150
 #62 0x000055946cf03811 in vm_invoke_bmethod (block_handler=<optimized out>, argv=<optimized out>, argc=1, self=<optimized out>, proc=<optimized out>, ec=0x55946da519c8) at vm.c:1175
 #63 vm_call_bmethod_body (ci=<optimized out>, cc=0x55946f625960, argv=<optimized out>, calling=0x7ffd6f6ca9b0, ec=0x55946da519c8) at vm_insnhelper.c:1971
 #64 vm_call_bmethod (ec=0x55946da519c8, cfp=0x7fc7bdc4e0c0, calling=0x7ffd6f6ca9b0, ci=<optimized out>, cc=0x55946f625960) at vm_insnhelper.c:1988
 #65 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e0c0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #66 0x000055946cf0e63e in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:797
 #67 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #68 0x000055946cf06767 in vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6cad00, ci=ci@entry=0x7ffd6f6cacf0, cc=cc@entry=0x7ffd6f6cad20, argv=argv@entry=0x7ffd6f6cadb0) at vm_eval.c:129
 #69 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7ffd6f6cadb0, argc=1, id=3681, recv=94096115734640, ec=0x55946da519c8) at vm_eval.c:60
 #70 rb_call0 (ec=0x55946da519c8, recv=recv@entry=94096115734640, mid=3681, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6cad90, scope=scope@entry=CALL_FCALL, self=94095983452880) at vm_eval.c:302
 #71 0x000055946cf07b9b in rb_call (scope=CALL_FCALL, argv=0x7ffd6f6cad90, argc=1, mid=<optimized out>, recv=94096115734640) at vm_eval.c:595
 #72 rb_funcallv (recv=recv@entry=94096115734640, mid=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6cadb0) at vm_eval.c:825
 #73 0x000055946cf477d2 in rb_class_inherited (super=super@entry=94096115734640, klass=klass@entry=94096135961440) at class.c:625
 #74 0x000055946cf0f796 in vm_declare_class (super=<optimized out>, cbase=94096094868200, flags=<optimized out>, id=847387) at vm_insnhelper.c:3134
 #75 vm_define_class (super=<optimized out>, cbase=<optimized out>, flags=<optimized out>, id=847387) at vm_insnhelper.c:3167
 #76 vm_find_or_create_class_by_id (super=<optimized out>, cbase=<optimized out>, flags=<optimized out>, id=847387) at vm_insnhelper.c:3196
 #77 vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:685
 #78 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #79 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x559471f1b548) at vm.c:2046
 #80 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94096135872160, wrap=wrap@entry=0) at load.c:611
 #81 0x000055946cdd41f1 in rb_require_internal (fname=94096135872400, fname@entry=94096135872440, safe=0) at load.c:992
 #82 0x000055946cdd4493 in rb_require_safe (safe=<optimized out>, fname=94096135872440) at load.c:1038
 #83 rb_f_require (obj=<optimized out>, fname=94096135872440) at load.c:820
 #84 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x5594708700a0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e168, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #85 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e168, calling=<optimized out>, ci=0x5594708700a0, cc=<optimized out>) at vm_insnhelper.c:1944
 #86 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e168, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #87 0x000055946cf0e63e in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:797
 #88 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #89 0x000055946cf035fc in invoke_block (captured=0x7fc7bdc4e490, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94096096426480, iseq=0x55946e49f0b8, ec=0x55946da519c8) at vm.c:1005
 #90 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7fc7bdc4e490, self=94096096426480, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #91 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #92 vm_yield (argc=1, argv=0x7ffd6f6cb938, ec=<optimized out>) at vm.c:1120
 #93 rb_yield_0 (argv=0x7ffd6f6cb938, argc=1) at vm_eval.c:980
 #94 rb_yield_1 (val=94096130169040) at vm_eval.c:986
 #95 rb_yield (val=<optimized out>) at vm_eval.c:996
 #96 0x000055946cf2113d in rb_ary_each (ary=94096076222560) at array.c:1820
 #97 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946ed0d090, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e478, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #98 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e478, calling=<optimized out>, ci=0x55946ed0d090, cc=<optimized out>) at vm_insnhelper.c:1944
 #99 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #100 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #101 0x000055946cf035fc in invoke_block (captured=0x7fc7bdc4e500, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94096096426480, iseq=0x55946e49f298, ec=0x55946da519c8) at vm.c:1005
 #102 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7fc7bdc4e500, self=94096096426480, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #103 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #104 vm_yield (argc=1, argv=0x7ffd6f6cbdf8, ec=<optimized out>) at vm.c:1120
 #105 rb_yield_0 (argv=0x7ffd6f6cbdf8, argc=1) at vm_eval.c:980
 #106 rb_yield_1 (val=94096095502480) at vm_eval.c:986
 #107 rb_yield (val=<optimized out>) at vm_eval.c:996
 #108 0x000055946cf2113d in rb_ary_each (ary=94096095328480) at array.c:1820
 #109 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e8552a0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e4e8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #110 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e4e8, calling=<optimized out>, ci=0x55946e8552a0, cc=<optimized out>) at vm_insnhelper.c:1944
 #111 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #112 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #113 0x000055946cf06767 in vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6cc2d0, ci=ci@entry=0x7ffd6f6cc2c0, cc=cc@entry=0x7ffd6f6cc2f0, argv=argv@entry=0x7ffd6f6cc390) at vm_eval.c:129
 #114 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7ffd6f6cc390, argc=0, id=135807, recv=94096096186440, ec=0x55946da519c8) at vm_eval.c:60
 #115 rb_call0 (ec=0x55946da519c8, recv=94096096186440, mid=135807, argc=<optimized out>, argv=argv@entry=0x8, scope=scope@entry=CALL_PUBLIC, self=94095993048320) at vm_eval.c:302
 #116 0x000055946cf0a31a in rb_call (scope=CALL_PUBLIC, argv=0x8, argc=<optimized out>, mid=<optimized out>, recv=<optimized out>) at vm_eval.c:595
 #117 rb_funcall_with_block (recv=<optimized out>, mid=<optimized out>, argc=argc@entry=0, argv=argv@entry=0x7ffd6f6cc390, passed_procval=passed_procval@entry=8) at vm_eval.c:857
 #118 0x000055946ceb319c in rb_sym_proc_call (mid=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6cc388, passed_proc=passed_proc@entry=8) at string.c:10480
 #119 0x000055946cf0477c in vm_yield_with_symbol (block_handler=0, argv=0x7ffd6f6cc388, argc=1, symbol=<optimized out>, ec=<optimized out>) at vm_insnhelper.c:2573
 #120 invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1084
 #121 vm_yield (argc=1, argv=0x7ffd6f6cc388, ec=<optimized out>) at vm.c:1120
 #122 rb_yield_0 (argv=0x7ffd6f6cc388, argc=1) at vm_eval.c:980
 #123 rb_yield_1 (val=94096096186440) at vm_eval.c:986
 #124 rb_yield (val=<optimized out>) at vm_eval.c:996
 #125 0x000055946cf2113d in rb_ary_each (ary=94095993048320) at array.c:1820
 #126 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x5594744d8280, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e590, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #127 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e590, calling=<optimized out>, ci=0x5594744d8280, cc=<optimized out>) at vm_insnhelper.c:1944
 #128 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e590, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #129 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #130 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #131 0x000055946cf035fc in invoke_block (captured=0x7ffd6f6cc8e0, opt_pc=<optimized out>, type=<optimized out>, cref=0x559474604128, self=94096096426480, iseq=0x5594745027e8, ec=0x55946da519c8) at vm.c:1005
 #132 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7ffd6f6cc8e0, self=94096096426480, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x559474604128, is_lambda=0) at vm.c:1057
 #133 0x000055946cf04520 in invoke_block_from_c_bh (ec=ec@entry=0x55946da519c8, block_handler=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fc7bdb4f7f8, cref=<optimized out>, is_lambda=<optimized out>, is_lambda@entry=0, force_blockarg=0, passed_block_handler=0) at vm.c:1075
 #134 0x000055946cf04958 in vm_yield_with_cref (is_lambda=0, cref=<optimized out>, argv=0x7fc7bdb4f7f8, argc=1, ec=0x55946da519c8) at vm.c:1112
 #135 yield_under (under=94096093646040, self=<optimized out>, argc=1, argv=0x7fc7bdb4f7f8) at vm_eval.c:1572
 #136 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e5cd230, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e600, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #137 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e600, calling=<optimized out>, ci=0x55946e5cd230, cc=<optimized out>) at vm_insnhelper.c:1944
 #138 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #139 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #140 0x000055946cf035fc in invoke_block (captured=0x5594744c4fb0, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94095990659320, iseq=0x55946e192aa0, ec=0x55946da519c8) at vm.c:1005
 #141 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x5594744c4fb0, self=94095990659320, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #142 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #143 vm_yield (argc=1, argv=0x7ffd6f6ccdc8, ec=<optimized out>) at vm.c:1120
 #144 rb_yield_0 (argv=0x7ffd6f6ccdc8, argc=1) at vm_eval.c:980
 #145 rb_yield_1 (val=94096094867920) at vm_eval.c:986
 #146 rb_yield (val=<optimized out>) at vm_eval.c:996
 #147 0x000055946cf2113d in rb_ary_each (ary=94096094867160) at array.c:1820
 #148 0x000055946cf06829 in vm_call0_cfunc_with_frame (ci=0x7ffd6f6cce00, cc=0x7ffd6f6cce70, argv=0x7fc7bdb4f6b8, calling=0x7ffd6f6cce50, ec=0x55946da519c8) at vm_eval.c:87
 #149 vm_call0_cfunc (argv=0x7fc7bdb4f6b8, cc=0x7ffd6f6cce70, ci=0x7ffd6f6cce00, calling=0x7ffd6f6cce50, ec=0x55946da519c8) at vm_eval.c:102
 #150 vm_call0_body (ec=0x55946da519c8, calling=calling@entry=0x7ffd6f6ccec0, ci=ci@entry=0x7ffd6f6cceb0, cc=cc@entry=0x7ffd6f6ccee0, argv=0x7fc7bdb4f6b8) at vm_eval.c:133
 #151 0x000055946cf06c50 in vm_call0 (me=<optimized out>, argv=<optimized out>, argc=<optimized out>, id=<optimized out>, recv=<optimized out>, ec=<optimized out>) at vm_eval.c:60
 #152 rb_vm_call (ec=<optimized out>, recv=<optimized out>, id=<optimized out>, argc=<optimized out>, argv=<optimized out>, me=<optimized out>) at vm_eval.c:209
 #153 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946dba2780, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e7c0, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #154 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e7c0, calling=<optimized out>, ci=0x55946dba2780, cc=<optimized out>) at vm_insnhelper.c:1944
 #155 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e7c0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #156 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #157 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #158 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946dfed3a8) at vm.c:2046
 #159 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095988939080, wrap=wrap@entry=0) at load.c:611
 #160 0x000055946cdd41f1 in rb_require_internal (fname=94095988939160, fname@entry=94095988939200, safe=0) at load.c:992
 #161 0x000055946cdd4493 in rb_require_safe (safe=<optimized out>, fname=94095988939200) at load.c:1038
 #162 rb_f_require (obj=<optimized out>, fname=94095988939200) at load.c:820
 #163 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946dffa920, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e948, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #164 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e948, calling=<optimized out>, ci=0x55946dffa920, cc=<optimized out>) at vm_insnhelper.c:1944
 #165 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e948, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #166 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #167 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #168 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946dfee438) at vm.c:2046
 #169 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095993039280, wrap=wrap@entry=0) at load.c:611
 #170 0x000055946cdd41f1 in rb_require_internal (fname=fname@entry=94095993043840, safe=0) at load.c:992
 #171 0x000055946cdd4493 in rb_require_safe (safe=<optimized out>, fname=94095993043840) at load.c:1038
 #172 rb_f_require (obj=<optimized out>, fname=94095993043840) at load.c:820
 #173 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946ea12160, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e9b8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #174 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e9b8, calling=<optimized out>, ci=0x55946ea12160, cc=<optimized out>) at vm_insnhelper.c:1944
 #175 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e9b8, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #176 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #177 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #178 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e3d7c48) at vm.c:2046
 #179 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095988920840, wrap=<optimized out>) at load.c:611
 #180 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095988920840) at load.c:642
 #181 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #182 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e7c96e0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ea28, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #183 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ea28, calling=<optimized out>, ci=0x55946e7c96e0, cc=<optimized out>) at vm_insnhelper.c:1944
 #184 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ea28, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #185 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #186 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #187 0x000055946cf035fc in invoke_block (captured=0x7fc7bdc4eae8, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94095998891400, iseq=0x55946e4dae10, ec=0x55946da519c8) at vm.c:1005
 #188 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7fc7bdc4eae8, self=94095998891400, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #189 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #190 vm_yield (argc=1, argv=0x7ffd6f6ce8e8, ec=<optimized out>) at vm.c:1120
 #191 rb_yield_0 (argv=0x7ffd6f6ce8e8, argc=1) at vm_eval.c:980
 #192 rb_yield_1 (val=94095988924840) at vm_eval.c:986
 #193 rb_yield (val=<optimized out>) at vm_eval.c:996
 #194 0x000055946cf2113d in rb_ary_each (ary=94095988920960) at array.c:1820
 #195 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e421000, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ead0, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #196 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ead0, calling=<optimized out>, ci=0x55946e421000, cc=<optimized out>) at vm_insnhelper.c:1944
 #197 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ead0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #198 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #199 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #200 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e35f2c0) at vm.c:2046
 #201 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095992643280, wrap=<optimized out>) at load.c:611
 #202 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095992643280) at load.c:642
 #203 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #204 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e24bb20, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ec58, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #205 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ec58, calling=<optimized out>, ci=0x55946e24bb20, cc=<optimized out>) at vm_insnhelper.c:1944
 #206 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ec58, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #207 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #208 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #209 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e3a7390) at vm.c:2046
 #210 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095993616120, wrap=<optimized out>) at load.c:611
 #211 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095993616120) at load.c:642
 #212 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #213 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e6a00d0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ecc8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #214 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ecc8, calling=<optimized out>, ci=0x55946e6a00d0, cc=<optimized out>) at vm_insnhelper.c:1944
 #215 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ecc8, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #216 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #217 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #218 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e470100) at vm.c:2046
 #219 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095993672200, wrap=<optimized out>) at load.c:611
 #220 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095993672200) at load.c:642
 #221 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #222 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e3306a0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4efa0, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #223 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4efa0, calling=<optimized out>, ci=0x55946e3306a0, cc=<optimized out>) at vm_insnhelper.c:1944
 #224 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4efa0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #225 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #226 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #227 0x000055946cf119d5 in rb_iseq_eval_main (iseq=iseq@entry=0x55946e4bbba0) at vm.c:2057
 #228 0x000055946cd83d54 in ruby_exec_internal (n=0x55946e4bbba0) at eval.c:247
 #229 0x000055946cd87fdf in ruby_exec_node (n=0x55946e4bbba0) at eval.c:311
 #230 ruby_run_node (n=<optimized out>) at eval.c:303
 #231 0x000055946cd831bf in main (argc=22, argv=0x7ffd6f6d0148) at ./main.c:42
------------------------------------------------------------------------
r62432 | nobu | 2018-02-16 23:35:06 +0900 (Fri, 16 Feb 2018) | 4 lines

ruby_check_va_copy.m4: for cross compiling

* tool/m4/ruby_check_va_copy.m4 (RUBY_CHECK_VA_COPY): use
  AC_TRY_LINK instead of AC_TRY_RUN for cross compiling.
------------------------------------------------------------------------
r62431 | shyouhei | 2018-02-16 17:51:23 +0900 (Fri, 16 Feb 2018) | 2 lines

add NEWS entry for VM generator renewal [ci skip]

------------------------------------------------------------------------
r62430 | shyouhei | 2018-02-16 17:49:09 +0900 (Fri, 16 Feb 2018) | 2 lines

add casts (cosmetic; just be explicit)

------------------------------------------------------------------------
r62429 | nobu | 2018-02-16 17:39:48 +0900 (Fri, 16 Feb 2018) | 3 lines

no ID cache in Init functions

Init functions are called only once, cache is useless.
------------------------------------------------------------------------
r62424 | hsbt | 2018-02-16 17:08:52 +0900 (Fri, 16 Feb 2018) | 3 lines

Fixed tempfile leak.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62423 | svn | 2018-02-16 17:08:07 +0900 (Fri, 16 Feb 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r62422 | hsbt | 2018-02-16 17:08:06 +0900 (Fri, 16 Feb 2018) | 5 lines

Merge RubyGems 2.7.6 from upstream.

  It fixed some security vulnerabilities.

  http://blog.rubygems.org/2018/02/15/2.7.6-released.html
------------------------------------------------------------------------
r62419 | shyouhei | 2018-02-16 11:10:52 +0900 (Fri, 16 Feb 2018) | 2 lines

non-constant aggregate initializer is a C99ism

------------------------------------------------------------------------
r62418 | nobu | 2018-02-16 10:15:35 +0900 (Fri, 16 Feb 2018) | 4 lines

compile.c: keep debug info

* compile.c (iseq_peephole_optimize): keep freezestring insn
  with debug info.  [Bug #14475]
------------------------------------------------------------------------
r62417 | nobu | 2018-02-16 09:54:50 +0900 (Fri, 16 Feb 2018) | 1 line

test_rubyoptions.rb: assert_same to check identity
------------------------------------------------------------------------
r62416 | svn | 2018-02-16 09:49:47 +0900 (Fri, 16 Feb 2018) | 1 line

* 2018-02-16
------------------------------------------------------------------------
r62415 | nobu | 2018-02-16 09:49:46 +0900 (Fri, 16 Feb 2018) | 1 line

test_rubyoptions.rb: show code in failure messages
------------------------------------------------------------------------
r62414 | knu | 2018-02-15 20:16:51 +0900 (Thu, 15 Feb 2018) | 14 lines

Avoid using `@` in macro substitution that confuses FreeBSD make

```
making mjit_config.h
make: Unknown modifier ' '
make: Unclosed variable specification (expecting ')') for "Q" (value "") modifier
/bin/sh: Syntax error: end of file unexpected (expecting "}")
*** Error code 2

Stop.
```

The at sign probably conflicts the `:@temp@string@` modifier syntax
supported by FreeBSD make.
------------------------------------------------------------------------
r62413 | nobu | 2018-02-15 19:00:57 +0900 (Thu, 15 Feb 2018) | 4 lines

Array#values_at optimization

* array.c (rb_ary_values_at): optimization range argument case.
  bulk concatenation than pushing for each element.
------------------------------------------------------------------------
r62412 | nobu | 2018-02-15 15:14:42 +0900 (Thu, 15 Feb 2018) | 1 line

Benchmarks for Array#values_at
------------------------------------------------------------------------
r62411 | mame | 2018-02-15 14:34:20 +0900 (Thu, 15 Feb 2018) | 3 lines

test/io/console/test_io_console.rb (test_oflush): Avoid race condition

Add a ad-hoc wait.  Follows test_ioflush2.
------------------------------------------------------------------------
r62410 | mame | 2018-02-15 10:59:17 +0900 (Thu, 15 Feb 2018) | 4 lines

gc.c: force STACK_GROW_DIRECTION for emscripten

The configure script fails to guess the direction on emscripten.
Perhaps this is because of https://github.com/kripken/emscripten/issues/2093
------------------------------------------------------------------------
r62409 | mame | 2018-02-15 10:59:16 +0900 (Thu, 15 Feb 2018) | 3 lines

thread_pthread.c: Use `getpagesize()` when `pthread_attr_getguardsize` is unavailable

This is also for emscripten.
------------------------------------------------------------------------
r62408 | mame | 2018-02-15 10:59:15 +0900 (Thu, 15 Feb 2018) | 4 lines

configure.ac: Use `pthread_create` to determine if pthread is available

Instead of `pthread_kill`.  This is because emscripten supports
`pthread_create` but not `pthread_kill`.
------------------------------------------------------------------------
r62407 | normal | 2018-02-15 07:35:13 +0900 (Thu, 15 Feb 2018) | 7 lines

compile.c: drop freezestring insn on String#-@

Followup to r62039 and remove the redundant freezestring
insn which was preventing deduplication from String#-@

* compile.c (iseq_peephole_optimize): drop freezestring insn on String#-@
  [ruby-core:85542] [Bug #14475]
------------------------------------------------------------------------
r62406 | normal | 2018-02-15 07:35:08 +0900 (Thu, 15 Feb 2018) | 3 lines

test/ruby/test_optimization.rb: fix compile kwarg

Fixes: r62177 ("compile.c: fix string Range optimization with FSL")
------------------------------------------------------------------------
r62405 | svn | 2018-02-15 03:38:34 +0900 (Thu, 15 Feb 2018) | 1 line

* 2018-02-15
------------------------------------------------------------------------
r62404 | tenderlove | 2018-02-15 03:38:33 +0900 (Thu, 15 Feb 2018) | 9 lines

load.c: reduce memory usage of loaded_features_index

Use integer hashsum instead of string as a key in loaded_features_index.
Do not use ruby strings for substring operation, just plain pointer
and length.

[ruby-core:53688]

Co-authored-by: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
------------------------------------------------------------------------
r62403 | k0kubun | 2018-02-14 23:09:32 +0900 (Wed, 14 Feb 2018) | 8 lines

appveyor.yml: refactor r62402

We have good feature to share common configuration between branches:
https://www.appveyor.com/docs/branches/#sharing-common-configuration-between-branches
Let's try this.

By the way, the intention of r62402 was excluding PR notifications while
it wasn't written in the commit message.
------------------------------------------------------------------------
r62402 | k0kubun | 2018-02-14 21:34:49 +0900 (Wed, 14 Feb 2018) | 8 lines

appveyor.yml: notify slack only for trunk

Using conditional build configuration.
https://www.appveyor.com/docs/branches/#conditional-build-configuration

This copy-pasting is so ugly, but AppVeyor doesn't have a feature to
filter notification based on branch.
https://github.com/appveyor/ci/issues/272
------------------------------------------------------------------------
r62401 | nobu | 2018-02-14 14:11:02 +0900 (Wed, 14 Feb 2018) | 6 lines

mjit.h: compare as pointer

* mjit.c (mjit_get_iseq_func), mjit.h (mjit_exec): do not compare
  a pointer as shorter type.  by loosing the precision, different
  values can result in "equal" wrongly.  enum type is an alias of
  `int`, and is often shorter than a pointer type nowadays.
------------------------------------------------------------------------
r62400 | ko1 | 2018-02-14 10:50:59 +0900 (Wed, 14 Feb 2018) | 1 line

skip "TestException#test_thread_signal_location" as a known bug [Bug #14474]
------------------------------------------------------------------------
r62399 | svn | 2018-02-14 00:58:39 +0900 (Wed, 14 Feb 2018) | 1 line

* 2018-02-14
------------------------------------------------------------------------
r62398 | k0kubun | 2018-02-14 00:58:38 +0900 (Wed, 14 Feb 2018) | 138 lines

mjit_compile.inc.erb: replace opt_key insn

with opt_send_without_block insn if call cache has valid ISeq.
If the receiver is not optimized target of opt_key (i.e. Hash or Array),
it triggers JIT cancel and it would be slow.

This change allows JIT to drop the check for Hash/Array and continue to
execute JIT even if the receiver is not Hash or Array.

See the following benchmark results. It's not improved so much, but it
would be effective when we achieve Ruby method inlining in
_mjit_compile_send.erb.

* Micro benchmark

Given the following bench.rb,

```
class HashWithIndifferentAccess < Hash
  def []=(key, value)
    super(key.to_s, value)
  end

  def [](key)
    super(key.to_s)
  end
end

indhash = HashWithIndifferentAccess.new
indhash[:foo] = 'bar'
key = 'foo'

100000000.times do
  indhash[key]
end
```

** before

```
$ time ./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb
JIT success (31.4ms): block in <main>@/tmp/bench.rb:15 -> /tmp/_ruby_mjit_p18206u0.c
JIT success (669.3ms): []@/tmp/bench.rb:6 -> /tmp/_ruby_mjit_p18206u1.c
Successful MJIT finish
./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb  12.21s user 0.04s system 107% cpu 11.394 total
```

** after

```
$ time ./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb
JIT success (41.0ms): block in <main>@/tmp/bench.rb:15 -> /tmp/_ruby_mjit_p17293u0.c
JIT success (679.0ms): []@/tmp/bench.rb:6 -> /tmp/_ruby_mjit_p17293u1.c
Successful MJIT finish
./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb  11.54s user 0.06s system 108% cpu 10.726 total
```

The execution time is shortened.

* optcarrot benchmark

Optcarrot has no room to be improved by this change. Almost nothing is changed.

fps: 59.54 (before) -> 59.51 (after)

* discourse benchmark

I expected this to be improved a little, but it isn't too.

** before (JIT)

```
categories_admin:
  50: 12
  75: 13
  90: 14
  99: 22
home_admin:
  50: 12
  75: 13
  90: 16
  99: 22
topic_admin:
  50: 12
  75: 13
  90: 15
  99: 21
categories:
  50: 18
  75: 19
  90: 23
  99: 27
home:
  50: 3
  75: 4
  90: 4
  99: 12
topic:
  50: 11
  75: 11
  90: 14
  99: 20
```

** after (JIT)

```
categories_admin:
  50: 12
  75: 12
  90: 16
  99: 24
home_admin:
  50: 12
  75: 12
  90: 14
  99: 21
topic_admin:
  50: 12
  75: 13
  90: 16
  99: 21
categories:
  50: 17
  75: 18
  90: 23
  99: 32
home:
  50: 3
  75: 4
  90: 4
  99: 10
topic:
  50: 11
  75: 12
  90: 13
  99: 20
```
------------------------------------------------------------------------
r62397 | nobu | 2018-02-13 22:29:57 +0900 (Tue, 13 Feb 2018) | 8 lines

Fixing some minimal formating on enum.c examples

This will fix the formatting shown on detect|find and revese_arch
generated by RDoc.

[Fix GH-1816]

From: Espartaco Palma <esparta@gmail.com>
------------------------------------------------------------------------
r62396 | normal | 2018-02-13 19:02:07 +0900 (Tue, 13 Feb 2018) | 35 lines

st.c: retry operations if rebuilt

Calling the .eql? and .hash methods during a Hash operation can
result in a thread switch or a signal handler to run: allowing
one execution context to rebuild the hash table while another is
still reading or writing the table.  This results in a
use-after-free bug affecting the thread_safe-0.3.6 test suite
and likely other bugs.

This bug did not affect users of commonly keys (String, Symbol,
Fixnum) as those are optimized to avoid method dispatch
for .eql? and .hash methods.

A separate version of this change needs to be ported to Ruby 2.3.x
which had a different implementation of st.c but was affected
by the same bug.

* st.c: Add comment about table rebuilding during comparison.
  (DO_PTR_EQUAL_CHECK): New macro.
  (REBUILT_TABLE_ENTRY_IND, REBUILT_TABLE_BIN_IND): New macros.
  (find_entry, find_table_entry_ind, find_table_bin_ind): Use new
  macros.  Return the rebuild flag.
  (find_table_bin_ptr_and_reserve): Ditto.
  (st_lookup, st_get_key, st_insert, st_insert2): Retry the
  operation if the table was rebuilt.
  (st_general_delete, st_shift, st_update, st_general_foreach):
  Ditto.
  (st_rehash_linear, st_rehash_indexed): Use DO_PTR_EQUAL_CHECK.
  Return the rebuild flag.
  (st_rehash): Retry the operation if the table was rebuilt.
  [ruby-core:85510] [Ruby trunk Bug#14357]

Thanks to Vit Ondruch for reporting the bug.

From: Vladimir Makarov <vmakarov@redhat.com>
------------------------------------------------------------------------
r62395 | nobu | 2018-02-13 18:36:35 +0900 (Tue, 13 Feb 2018) | 5 lines

variable.c: flags at autoloading

* variable.c (const_tbl_update): flags by deprecate_constant /
  private_constant set during autoloading should be preserved
  after required.  [ruby-core:85516] [Bug #14469]
------------------------------------------------------------------------
r62394 | nobu | 2018-02-13 18:34:43 +0900 (Tue, 13 Feb 2018) | 7 lines

vm_insnhelper.c: rb_autoloading_value flag

* vm_insnhelper.c (vm_get_ev_const): add flag argument of
  `rb_autoloading_value`.

* constant.h (rb_autoloading_value): moved the declaration from
  vm_core.h for `rb_const_flag_t`.  [ruby-core:85516] [Bug #14469]
------------------------------------------------------------------------
r62393 | usa | 2018-02-13 18:34:37 +0900 (Tue, 13 Feb 2018) | 5 lines

revert r62392

check the declaration of `rb_autoloading_value()` in vm_core.h and the call in
vm_insnhelper.c, and retry it.

------------------------------------------------------------------------
r62392 | nobu | 2018-02-13 18:11:02 +0900 (Tue, 13 Feb 2018) | 5 lines

variable.c: flags at autoloading

* variable.c (const_tbl_update): flags by deprecate_constant /
  private_constant set during autoloading should be preserved
  after required.  [ruby-core:85516] [Bug #14469]
------------------------------------------------------------------------
r62391 | mame | 2018-02-13 16:42:51 +0900 (Tue, 13 Feb 2018) | 1 line

process.c (try_with_sh): fix the wrong number of arguments
------------------------------------------------------------------------
r62390 | kazu | 2018-02-13 09:03:18 +0900 (Tue, 13 Feb 2018) | 1 line

xmalloc never returns NULL
------------------------------------------------------------------------
r62389 | svn | 2018-02-13 00:25:59 +0900 (Tue, 13 Feb 2018) | 1 line

* 2018-02-13
------------------------------------------------------------------------
r62388 | k0kubun | 2018-02-13 00:25:58 +0900 (Tue, 13 Feb 2018) | 18 lines

vm_insnhelper.c: inline array aref with integer

internal.h: define inlinable rb_ary_entry_internal.

array.c: use rb_ary_entry_internal.

* Benchmark
ruby --jit mame/optcarrot/bin/optcarrot --benchmark mame/optcarrot/examples/Lan_Master.nes

** Before

checksum: 59662
fps: 58.095175012159686

** After

fps: 59.874751599221526
checksum: 59662
------------------------------------------------------------------------
r62387 | k0kubun | 2018-02-12 18:05:12 +0900 (Mon, 12 Feb 2018) | 3 lines

insns.def: remove unnecessary sp motion

This seems obsoleted after r62087.
------------------------------------------------------------------------
r62386 | nobu | 2018-02-12 18:02:30 +0900 (Mon, 12 Feb 2018) | 1 line

use <<- instead of <<~ for older baseruby
------------------------------------------------------------------------
r62385 | k0kubun | 2018-02-12 17:09:25 +0900 (Mon, 12 Feb 2018) | 3 lines

Makefile.in: drop obsoleted debug output

mjit_config.h errors are already fixed.
------------------------------------------------------------------------
r62384 | k0kubun | 2018-02-12 16:27:48 +0900 (Mon, 12 Feb 2018) | 8 lines

_mjit_compile_insn_body.erb: refactor

renamed from tool/ruby_vm/views/_mjit_compile_insn_line.erb.
Basically this file should handle everything about macro on JIT.

_mjit_compile_insn.erb: follow the refactoring

common.mk: follow the rename
------------------------------------------------------------------------
r62383 | k0kubun | 2018-02-12 15:54:25 +0900 (Mon, 12 Feb 2018) | 9 lines

_mjit_compile_insn_line.erb: carve out macro expansion

in _mjit_compile_insn.erb to this file. As I'm going to add macro
expansions later, I want to separate such complex things from whole insn
compilation.

_mjit_compile_insn.erb: _mjit_compile_insn_line.erb part was removed.

common.mk: updated build system for them.
------------------------------------------------------------------------
r62382 | k0kubun | 2018-02-12 14:04:24 +0900 (Mon, 12 Feb 2018) | 5 lines

mjit.c: print JIT failure

mjit_compile.inc.erb: show unsupported insn name on --jit-verbose=1 too.
Also, removed osboleted workaround. Now some insn-related functions are
declared with MAYBE_UNUSED.
------------------------------------------------------------------------
r62381 | k0kubun | 2018-02-12 13:35:16 +0900 (Mon, 12 Feb 2018) | 1 line

test_jit.rb: prettify script in message
------------------------------------------------------------------------
r62380 | k0kubun | 2018-02-12 13:00:45 +0900 (Mon, 12 Feb 2018) | 3 lines

test_jit.rb: explicitly skip for unsupported ones

MSP-Greg watches this metrics and this would be helpful for him.
------------------------------------------------------------------------
r62379 | nobu | 2018-02-12 12:39:18 +0900 (Mon, 12 Feb 2018) | 5 lines

no --jit-cc

* ruby.c (setup_mjit_options): removed --jit-cc option, since
  mjit header is affected by generated config.h which depends on
  the given compiler, so it cannot work with different compilers.
------------------------------------------------------------------------
r62378 | nobu | 2018-02-12 12:33:00 +0900 (Mon, 12 Feb 2018) | 1 line

test_jit.rb: split test_compile_insns
------------------------------------------------------------------------
r62377 | svn | 2018-02-12 10:00:30 +0900 (Mon, 12 Feb 2018) | 1 line

* 2018-02-12
------------------------------------------------------------------------
r62376 | k0kubun | 2018-02-12 10:00:30 +0900 (Mon, 12 Feb 2018) | 51 lines

mjit_compile.c: fix invalid suffix on MinGW

This commit fixes following error.

$ RUBY_FORCE_TEST_JIT=1 ./ruby -I. -Ilib -Itest/lib --disable-gems test/ruby/test_jit.rb
Run options:

 # Running tests:

Environment variable changed: TestJIT#test_compile_insns : "TEMP" changed : "C:\\msys64\\tmp" -> "C:\\Users\\k0kubun\\AppData\\Local\\Temp"
Environment variable changed: TestJIT#test_compile_insns : "TMP" changed : "C:\\msys64\\tmp" -> "C:\\Users\\k0kubun\\AppData\\Local\\Temp"
Environment variable changed: TestJIT#test_compile_insns : "temp" deleted
Environment variable changed: TestJIT#test_compile_insns : "tmp" deleted

  1) Failure:
TestJIT#test_jit_output [test/ruby/test_jit.rb:360]:
Expected /^JIT success \(\d+\.\dms\): block in <main>@-e:1 -> .+_ruby_mjit_p\d+u\d+\.c$/ to match "C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p920u0.c: In function '_mjit0':\n" +
"C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p920u0.c:11:61: error: invalid suffix \"CD6900\" on integer constant\n" +
"     static const VALUE *const original_body_iseq = (VALUE *)0000000004CD6900;\n" +
"                                                             ^~~~~~~~~~~~~~~~\n" +
"compilation terminated due to -Wfatal-errors.\n" +
"Successful MJIT finish\n".

  2) Failure:
TestJIT#test_compile_insns [test/ruby/test_jit.rb:19]:
Expected 1 times of JIT success, but succeeded 0 times.

script:
```
p proc { nil rescue true }.call
```

stderr:
```
C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p10628u0.c: In function '_mjit0':
C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p10628u0.c:11:61: error: invalid suffix "D05F10" on integer constant
     static const VALUE *const original_body_iseq = (VALUE *)0000000004D05F10;
                                                             ^~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Successful MJIT finish

```

.
<1> expected but was
<0>.

Finished tests in 3.028989s, 0.6603 tests/s, 1.9809 assertions/s.
2 tests, 6 assertions, 2 failures, 0 errors, 0 skips

ruby -v: ruby 2.6.0dev (2018-02-11 trunk 62375) [x64-mingw32]
------------------------------------------------------------------------
r62375 | k0kubun | 2018-02-11 23:38:54 +0900 (Sun, 11 Feb 2018) | 15 lines

Makefile.in: prevent from building `"",` macro

Loop removal in r62373 caused the CI failure like:
https://travis-ci.org/ruby/ruby/builds/340136977

mjit_config.h was:
  #ifndef RUBY_MJIT_CONFIG_H
  #define RUBY_MJIT_CONFIG_H 1
  #define MJIT_CC_COMMON  "gcc",
  #define MJIT_CFLAGS  "-w",
  #define MJIT_OPTFLAGS  "-O3",
  #define MJIT_DEBUGFLAGS  "-ggdb3",
  #define MJIT_LDSHARED  "gcc", "-shared",
  #define MJIT_DLDFLAGS  "",
  #endif /* RUBY_MJIT_CONFIG_H */
------------------------------------------------------------------------
r62374 | k0kubun | 2018-02-11 23:18:38 +0900 (Sun, 11 Feb 2018) | 3 lines

Makefile.in: debug mjit_config.h again

Somehow r62373 is failing on travis...
------------------------------------------------------------------------
r62373 | nobu | 2018-02-11 23:01:52 +0900 (Sun, 11 Feb 2018) | 4 lines

Makefile.in: use "%s"

* Makefile.in (mjit_config.h): use "%s" not to interprete % in
  arguments.  and `set` and `loop` are not needed.
------------------------------------------------------------------------
r62372 | k0kubun | 2018-02-11 22:46:54 +0900 (Sun, 11 Feb 2018) | 4 lines

Makefile.in: use printf

`echo -n` is sometimes not available.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180211T132503Z.log.html.gz#miniruby
------------------------------------------------------------------------
r62371 | k0kubun | 2018-02-11 21:50:23 +0900 (Sun, 11 Feb 2018) | 7 lines

Makefile.in: define macro in one line

Having macro definition in multiple definitions makes compiler error
output hard to read, like the commit message of r62367.

Probably build failures will be fixed by r62370, but let me simplify the
mjit_config.h content for future debugging.
------------------------------------------------------------------------
r62370 | nobu | 2018-02-11 21:40:28 +0900 (Sun, 11 Feb 2018) | 1 line

mjit_config.h: moved backslashs outside quotes
------------------------------------------------------------------------
r62369 | k0kubun | 2018-02-11 21:28:10 +0900 (Sun, 11 Feb 2018) | 5 lines

mjit.c: some flags are no longer for GCC

Obviously they are for clang. For simplicity, just inlined them.

Also another obsoleted commant was removed.
------------------------------------------------------------------------
r62368 | k0kubun | 2018-02-11 21:21:13 +0900 (Sun, 11 Feb 2018) | 20 lines

_mjit_compile_send.erb: resolve warnings on clang

/var/folders/tp/g1f_46nj7md_d5_j799rfb140000gn/T//_ruby_mjit_p17396u162.c:2920:143: warning: incompatible integer
      to pointer conversion passing 'long' to parameter of type 'const VALUE *' (aka 'const unsigned long *')
      [-Wint-conversion]
  ...| VM_ENV_FLAG_LOCAL, calling.recv, calling.block_handler, 0x7fc14ceee660, 0x7fc14c870c00, argv + 0, 2, 3);
                                                                               ^~~~~~~~~~~~~~
/Users/k0kubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:21299:21: note:
      passing argument to parameter 'pc' here
       const VALUE *pc,
                    ^
/var/folders/tp/g1f_46nj7md_d5_j799rfb140000gn/T//_ruby_mjit_p17396u162.c:3073:31: warning: incompatible integer
      to pointer conversion passing 'long' to parameter of type 'const rb_iseq_t *' (aka
      'const struct rb_iseq_struct *') [-Wint-conversion]
            vm_push_frame(ec, 0x7fc14c87d290, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling.recv, ca...
                              ^~~~~~~~~~~~~~
/Users/k0kubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:21294:25: note:
      passing argument to parameter 'iseq' here
       const rb_iseq_t *iseq,
                        ^
------------------------------------------------------------------------
r62367 | k0kubun | 2018-02-11 21:04:48 +0900 (Sun, 11 Feb 2018) | 37 lines

Makefile.in: add output to debug rubyci

build failure.

From current output, I can't know what's wrong from current error log.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20180211T110003Z.log.html.gz#miniruby

compiling mjit.c
mjit.c:573:1: error: stray '\' in program
 static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL};
 ^
mjit.c:573:1: error: stray '\' in program
mjit.c:574:1: error: stray '\' in program
 static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
 ^
mjit.c:574:1: error: stray '\' in program
mjit.c:584:5: error: stray '\' in program
     MJIT_CC_COMMON MJIT_CFLAGS GCC_PIC_FLAGS
     ^
mjit.c:584:5: error: stray '\' in program
mjit.c:584:5: error: stray '\' in program
mjit.c:584:5: error: stray '\' in program
mjit.c:588:1: error: stray '\' in program
 static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL};
 ^
mjit.c:588:1: error: stray '\' in program
mjit.c:588:1: error: stray '\' in program
mjit.c:589:1: error: stray '\' in program
 static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL};
 ^
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
gmake: *** [mjit.o] Error 1
exit 2
------------------------------------------------------------------------
r62366 | nobu | 2018-02-11 18:00:44 +0900 (Sun, 11 Feb 2018) | 1 line

win32/Makefile.sub: fix typo, missing comma
------------------------------------------------------------------------
r62365 | nobu | 2018-02-11 17:57:22 +0900 (Sun, 11 Feb 2018) | 1 line

mjit.c: alwasy -fPIC flag to gcc
------------------------------------------------------------------------
r62364 | k0kubun | 2018-02-11 16:35:48 +0900 (Sun, 11 Feb 2018) | 3 lines

appveyor.yml: finish notification test

Now it succeeds to notify. Notifying all CI success would be noisy.
------------------------------------------------------------------------
r62363 | k0kubun | 2018-02-11 16:28:03 +0900 (Sun, 11 Feb 2018) | 4 lines

appveyor.yml: encrypt config with ruby's account

Currently it's encrypted with k0kubun's account and the notification is
failing.
------------------------------------------------------------------------
r62362 | nobu | 2018-02-11 16:10:37 +0900 (Sun, 11 Feb 2018) | 1 line

mjit_config.h: include trailing comma for empty list
------------------------------------------------------------------------
r62361 | k0kubun | 2018-02-11 15:33:45 +0900 (Sun, 11 Feb 2018) | 4 lines

.travis.yml: resurrect notification to #commits

I heard at least Shibata-san sees the channel for the notification.
But I want #alets to have all CI failure notifications too.
------------------------------------------------------------------------
r62360 | k0kubun | 2018-02-11 15:03:21 +0900 (Sun, 11 Feb 2018) | 1 line

appveyor.yml: send AppVeyor slack notification
------------------------------------------------------------------------
r62359 | k0kubun | 2018-02-11 14:49:37 +0900 (Sun, 11 Feb 2018) | 3 lines

.travis.yml: send notification to #alerts

instead of #commits.
------------------------------------------------------------------------
r62358 | k0kubun | 2018-02-11 14:32:17 +0900 (Sun, 11 Feb 2018) | 1 line

NEWS: note about --jit [ci skip]
------------------------------------------------------------------------
r62357 | k0kubun | 2018-02-11 14:29:13 +0900 (Sun, 11 Feb 2018) | 3 lines

common.mk: add comments about r62355 [ci skip]

transform_mjit_header.rb: ditto
------------------------------------------------------------------------
r62356 | nobu | 2018-02-11 13:54:15 +0900 (Sun, 11 Feb 2018) | 6 lines

mjit_config.h: more macros

* Makefie.in, win32/Makefile.sub: add more macros for compiler to
  mjit_config.h.

* mjit.c: unification VC and GCC in progress.
------------------------------------------------------------------------
r62355 | k0kubun | 2018-02-11 13:20:32 +0900 (Sun, 11 Feb 2018) | 13 lines

common.mk: define MJIT_HEADER earlier

so that other predefined macros won't be removed by
`MJITHeader.remove_predefined_macros!`.

Currently macro like -DVM_CHECK_MODE=2 is removed when it's passed in
configure. But it is needed during JIT compilation.

gc.c: export rb_obj_info to let JIT succeed with VM_CHECK_MODE=2.

```
MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p15631u0.so': /tmp/_ruby_mjit_p15631u0.so: undefined symbol: rb_obj_info
```
------------------------------------------------------------------------
r62354 | nobu | 2018-02-11 11:41:50 +0900 (Sun, 11 Feb 2018) | 4 lines

_mjit_compile_insn.erb: comment_id

* tool/ruby_vm/views/_mjit_compile_insn.erb: comment ID of
  constant, calling method, and Symbol literal.
------------------------------------------------------------------------
r62353 | nobu | 2018-02-11 11:41:49 +0900 (Sun, 11 Feb 2018) | 1 line

_mjit_compile_{insn,send}.erb: suppress warnings
------------------------------------------------------------------------
r62352 | nobu | 2018-02-11 10:01:09 +0900 (Sun, 11 Feb 2018) | 4 lines

Makefile.sub: cpp out for older VC

* win32/Makefile.sub (CPPOUTFLAG, MJIT_HEADER_FLAGS): -Fi option
  is available since VC 10.  redirect stdout on older versions.
------------------------------------------------------------------------
r62351 | nobu | 2018-02-11 09:19:03 +0900 (Sun, 11 Feb 2018) | 5 lines

_mjit_compile_send.erb: PRI_SERIALT_PREFIX

* tool/ruby_vm/views/_mjit_compile_send.erb: `printf` modifier for
  `rb_serial_t` which may not be `long long`, and '%ll' may not be
  supported.
------------------------------------------------------------------------
r62350 | nobu | 2018-02-11 01:54:47 +0900 (Sun, 11 Feb 2018) | 6 lines

insns.def: cache nil const

* insns.def (getinlinecache): Qnil is a valid value as a constant.
  this can be observable when accessing a deprecated constant
  which is nil.  non-nil constant is warned just once for each
  location, but every time if it is nil.
------------------------------------------------------------------------
r62349 | svn | 2018-02-11 01:09:56 +0900 (Sun, 11 Feb 2018) | 1 line

* 2018-02-11
------------------------------------------------------------------------
r62348 | k0kubun | 2018-02-11 01:09:55 +0900 (Sun, 11 Feb 2018) | 5 lines

test_jit.rb: cover most insn compilations

test_compile_insns has only basic tests to improve coverage.

Other severer tests should be added with different names.
------------------------------------------------------------------------
r62347 | nobu | 2018-02-10 19:07:41 +0900 (Sat, 10 Feb 2018) | 1 line

mjit_config.h: show content if verbose
------------------------------------------------------------------------
r62346 | nobu | 2018-02-10 19:07:40 +0900 (Sat, 10 Feb 2018) | 1 line

mjit.c: constified command arguments
------------------------------------------------------------------------
r62345 | nobu | 2018-02-10 15:42:35 +0900 (Sat, 10 Feb 2018) | 1 line

vcs.rb: dryrun: option of GIT::SVN#commit
------------------------------------------------------------------------
r62344 | nobu | 2018-02-10 15:38:18 +0900 (Sat, 10 Feb 2018) | 1 line

select each files for architectures
------------------------------------------------------------------------
r62343 | nobu | 2018-02-10 15:22:38 +0900 (Sat, 10 Feb 2018) | 8 lines

mjit_config.h

* Makefie.in, win32/Makefile.sub: make mjit_config.h from
  configured variables, including necessary options, e.g., `-m32`
  for 32bit binary on 64bit platform.

* mjit.c: always use configured CC command.  as config.h depends
  on the compiler, different compilers cannot work.
------------------------------------------------------------------------
r62342 | ktsj | 2018-02-10 15:02:37 +0900 (Sat, 10 Feb 2018) | 1 line

.gdbinit (print_lineno): support a succinct bitvector implementation [ci skip]
------------------------------------------------------------------------
r62341 | nobu | 2018-02-10 10:55:47 +0900 (Sat, 10 Feb 2018) | 1 line

mjit.c: replaced magic numbers
------------------------------------------------------------------------
r62340 | nobu | 2018-02-10 10:28:51 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit_compile.c: original_body_iseq

* mjit_compile.c (mjit_compile): name the original iseq pointer to
  eliminate magic numbers.
------------------------------------------------------------------------
r62339 | nobu | 2018-02-10 10:23:47 +0900 (Sat, 10 Feb 2018) | 1 line

mjit.c: chomp suffix first
------------------------------------------------------------------------
r62338 | nobu | 2018-02-10 10:07:04 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit.c: binary mode

* mjit.c (convert_unit_to_func): write source code in binary
  mode.  not conversion is needed.
------------------------------------------------------------------------
r62337 | usa | 2018-02-10 00:28:09 +0900 (Sat, 10 Feb 2018) | 6 lines

append_str don't look the length of string

	* mjit.c (compile_c_to_so): use append_str2() and pass the length of
	  so_name.  append_str() uses the size of the 2nd argument, not the
	  length of it.

------------------------------------------------------------------------
r62336 | svn | 2018-02-10 00:21:19 +0900 (Sat, 10 Feb 2018) | 1 line

* 2018-02-10
------------------------------------------------------------------------
r62335 | nobu | 2018-02-10 00:21:19 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit.c: set umask

* mjit.c (start_process): set umask so other users cannot access
  generated files.
------------------------------------------------------------------------
r62334 | nobu | 2018-02-10 00:21:18 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit.c: exclusively create

* mjit.c (convert_unit_to_func): create new file exclusively.
  overwriting existing file could cause security issues.
------------------------------------------------------------------------
r62333 | nobu | 2018-02-09 23:09:58 +0900 (Fri, 09 Feb 2018) | 4 lines

compile.c: popped hash

* compile.c (compile_array): skip creating new hash if preceeding
  elements are popped all.  [ruby-core:85486] [Bug #14459]
------------------------------------------------------------------------
r62332 | k0kubun | 2018-02-09 22:14:17 +0900 (Fri, 09 Feb 2018) | 3 lines

transform_mjit_header.rb: fix typo in r62326

Today's AIX CI failed due to this... :innocent:
------------------------------------------------------------------------
r62331 | nobu | 2018-02-09 12:51:57 +0900 (Fri, 09 Feb 2018) | 5 lines

Makefile.sub: MESSAGE_BEGIN/END redirection

* win32/Makefile.sub (MESSAGE_BEGIN, MESSAGE_END): group the whole
  `for` command, to redirect all lines but not overwrite line by
  line.
------------------------------------------------------------------------
r62330 | nobu | 2018-02-09 12:37:38 +0900 (Fri, 09 Feb 2018) | 3 lines

Makefile.in: removed duplicate SET_LC_MESSAGES

[ci skip]
------------------------------------------------------------------------
r62329 | nobu | 2018-02-09 12:15:21 +0900 (Fri, 09 Feb 2018) | 1 line

debug_counter.h: include __FILE__ to recurse
------------------------------------------------------------------------
r62328 | nobu | 2018-02-09 12:15:20 +0900 (Fri, 09 Feb 2018) | 4 lines

sprintf.c: overflow check

* sprintf.c (ruby_do_vsnprintf): pathologically, get rid of
  negative value when the result length exceeds INT_MAX.
------------------------------------------------------------------------
r62327 | k0kubun | 2018-02-09 09:32:55 +0900 (Fri, 09 Feb 2018) | 7 lines

.travis.yml: force to execute JIT test on Travis

test_jit.rb: with environment variable RUBY_FORCE_TEST_JIT, we can force
to test JIT availability.

I wanted to have such CI, but Travis was the only option which I can
modify easily.
------------------------------------------------------------------------
r62326 | k0kubun | 2018-02-09 09:00:27 +0900 (Fri, 09 Feb 2018) | 7 lines

transform_mjit_header.rb: pass -std=c99 for AIX gcc

I heard `error: conflicting types for 'restrict'` can be solved by
adding `-std=c99`.

Ideally we should use the same cflags which are used to compile vm.c,
but let me try this and see what happens on AIX.
------------------------------------------------------------------------
r62325 | usa | 2018-02-09 03:51:33 +0900 (Fri, 09 Feb 2018) | 8 lines

refoctoring

* mjit.c (compile_c_to_so): refactored.

* mjit.c (init_header_filename): xmalloc never returns NULL.

* mjit.c (init_header_filename): report the filename of the header if failed.

------------------------------------------------------------------------
r62324 | usa | 2018-02-09 03:48:25 +0900 (Fri, 09 Feb 2018) | 4 lines

missing macro definition

* win32/Makefile.sub (RUBY_VERSION_NAME): used in this file but not defined.

------------------------------------------------------------------------
r62323 | nobu | 2018-02-09 00:47:24 +0900 (Fri, 09 Feb 2018) | 1 line

mjit.c: rb_w32_system_tmpdir is not in headers
------------------------------------------------------------------------
r62322 | nobu | 2018-02-09 00:46:11 +0900 (Fri, 09 Feb 2018) | 3 lines

mjit.c: revert r62316 partially

* mjit.c (compile_c_to_so): libs is not constant on Windows.
------------------------------------------------------------------------
r62321 | nobu | 2018-02-09 00:22:54 +0900 (Fri, 09 Feb 2018) | 5 lines

Fix compile error when USE_COPY_FILE_RANGE is defined but not USE_SENDFILE

io.c: Variable and label definition are necessary in both cases.

From: Lars Kanis <lars@greiz-reinsdorf.de>
------------------------------------------------------------------------
r62320 | nobu | 2018-02-09 00:19:32 +0900 (Fri, 09 Feb 2018) | 6 lines

MJIT header for multiarch

* configure.ac: MJIT_HEADER_INSTALL_DIR to rubyarchhdrdir to
  support multiarch.

* Makefile.in (MJIT_HEADER_INSTALL_DIR): configured by multiarch.
------------------------------------------------------------------------
r62319 | nobu | 2018-02-09 00:19:01 +0900 (Fri, 09 Feb 2018) | 1 line

mkconfig.rb: hide MJIT configurations
------------------------------------------------------------------------
r62318 | nobu | 2018-02-09 00:00:28 +0900 (Fri, 09 Feb 2018) | 5 lines

mjit.c: ruby_version from version.c

* mjit.c (init_header_filename): get version name from the
  particular global variable, not from the macro in version.h.
  to get rid of re-compilation for each revision.
------------------------------------------------------------------------
r62317 | svn | 2018-02-09 00:00:28 +0900 (Fri, 09 Feb 2018) | 1 line

* 2018-02-09
------------------------------------------------------------------------
r62316 | nobu | 2018-02-09 00:00:27 +0900 (Fri, 09 Feb 2018) | 4 lines

mjit.c: argument arrays

* mjit.c (compile_c_to_so): constified constat array and make
  variable arrays local.
------------------------------------------------------------------------
r62315 | nobu | 2018-02-08 23:59:31 +0900 (Thu, 08 Feb 2018) | 1 line

gmake.mk: tool/ifchange needs miniruby
------------------------------------------------------------------------
r62314 | k0kubun | 2018-02-08 22:56:32 +0900 (Thu, 08 Feb 2018) | 7 lines

test_jit.rb: don't force to test --jit-wait

for platforms which can't use JIT. Such platforms can time out with
eval_with_jit.

http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/509911
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/509904
------------------------------------------------------------------------
r62313 | k0kubun | 2018-02-08 22:54:37 +0900 (Thu, 08 Feb 2018) | 12 lines

Export some missing symbols for MJIT

tool/ruby_vm/views/_insn_name_info.erb: on Linux, rb_vm_insn_name_offset
was needed to compile with --jit-debug (Usually --jit-debug requires
more symbols than the situation without --jit-debug because -O2 skips
some functions to compile).

vm.c: when running transform_mjit_header.rb with --jit-wait,
rb_source_location_cstr was repoted to be missing.

string.c: ditto, for rb_str_eql
numeric.c: ditto, for rb_float_eql
------------------------------------------------------------------------
r62312 | k0kubun | 2018-02-08 22:40:47 +0900 (Thu, 08 Feb 2018) | 3 lines

test_jit.rb: fix typo

This is notified by zns-san.
------------------------------------------------------------------------
r62311 | k0kubun | 2018-02-08 22:01:43 +0900 (Thu, 08 Feb 2018) | 3 lines

test_jit.rb: add forgotten check

I was going to check this in r62310...
------------------------------------------------------------------------
r62310 | k0kubun | 2018-02-08 21:58:27 +0900 (Thu, 08 Feb 2018) | 1 line

test_jit.rb: check JIT support more conservatively
------------------------------------------------------------------------
r62309 | k0kubun | 2018-02-08 21:43:09 +0900 (Thu, 08 Feb 2018) | 6 lines

test_jit.rb: remove unnecessary require

At first I was going to check the name of `RbConfig::CONFIG['CC']` and
use shellwords for it, but I decided not to do so.

Thus removing obsoleted require in r62307.
------------------------------------------------------------------------
r62308 | svn | 2018-02-08 21:40:34 +0900 (Thu, 08 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62307 | k0kubun | 2018-02-08 21:40:33 +0900 (Thu, 08 Feb 2018) | 4 lines

test_jit.rb: try to test JIT again

This commit reverts r62297, revising the check if JIT is supported or
not.
------------------------------------------------------------------------
r62306 | nobu | 2018-02-08 17:09:49 +0900 (Thu, 08 Feb 2018) | 1 line

internal.h: moved ruby_null_device declaration
------------------------------------------------------------------------
r62305 | nobu | 2018-02-08 16:49:42 +0900 (Thu, 08 Feb 2018) | 4 lines

thread.c: suppress a warning

* thread.c (do_select): initialize timespec variable to suppress a
  false positive maybe-uninitialized warning by gcc 7 and 8.
------------------------------------------------------------------------
r62304 | nobu | 2018-02-08 16:49:41 +0900 (Thu, 08 Feb 2018) | 1 line

common.mk: add dependencies and timestamp
------------------------------------------------------------------------
r62303 | usa | 2018-02-08 16:34:41 +0900 (Thu, 08 Feb 2018) | 2 lines

revert r62302 and force to define the version constant

------------------------------------------------------------------------
r62302 | usa | 2018-02-08 16:23:21 +0900 (Thu, 08 Feb 2018) | 2 lines

no need to set bundled bundler unless Gem::USE_BUNDLER_FOR_GEMDEPS

------------------------------------------------------------------------
r62301 | nobu | 2018-02-08 16:14:52 +0900 (Thu, 08 Feb 2018) | 4 lines

test_gem_commands_setup_command.rb: BUNDLER_VERS

* test/rubygems/test_gem_commands_setup_command.rb: run bundled
  gem command, instead of installed one.
------------------------------------------------------------------------
r62300 | nobu | 2018-02-08 11:08:27 +0900 (Thu, 08 Feb 2018) | 1 line

ifchange: --debug option
------------------------------------------------------------------------
r62299 | nobu | 2018-02-08 11:08:26 +0900 (Thu, 08 Feb 2018) | 4 lines

ifchange.bat: --color option

* win32/ifchange.bat: added --color option for the compatibility
  with tool/ifchange.  do nothing right now.
------------------------------------------------------------------------
r62298 | nobu | 2018-02-08 11:00:21 +0900 (Thu, 08 Feb 2018) | 1 line

mjit.c: make filename in allocated buffer
------------------------------------------------------------------------
r62297 | k0kubun | 2018-02-08 09:55:33 +0900 (Thu, 08 Feb 2018) | 85 lines

revert r62291 for now

While some of CIs are succeeding and the test succeeds on my laptop,
some other CIs are failing. As I don't have time to fix it until I come
back to home, reverting this for now.

Failures:
https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180208T000401Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180207T201706Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-trunk/log/20180207T183004Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20180207T213004Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20180207T213003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora25/ruby-trunk/log/20180207T213003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora26/ruby-trunk/log/20180207T213003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/log/20180207T213001Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel_zlinux/ruby-trunk/log/20180207T223303Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1011/ruby-trunk/log/20180207T234501Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1012/ruby-trunk/log/20180207T234501Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20180207T210002Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180207T231805Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180207T232403Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180207T171914Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180207T232503Z.fail.html.gz
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180207T172813Z.fail.html.gz

http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506100
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506114
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506119
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/506170
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506176
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506192
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506202
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/506244
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506271
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506280
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506323
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/506325
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506342
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506354
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/506385
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506389
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506409
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506425
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506471
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506484
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506495
http://ci.rvm.jp/results/trunk-test@x2/506524
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/506547
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506556
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506579
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506582
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/506634
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506638
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506663
http://ci.rvm.jp/results/trunk-test@frontier/506690
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506718
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506728
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506752
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506754
http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/506782
http://ci.rvm.jp/results/trunk_clang_38@silicon-docker/506799
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506816
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506835
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506879
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506903
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506920
http://ci.rvm.jp/results/trunk-test@frontier/506955
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506994
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507012
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/507036
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/507037
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/507053
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507081
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507097
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/507136
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507165
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507178
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/507180
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507257
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507268
http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/507303
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507342
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507355
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507434
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507448
------------------------------------------------------------------------
r62296 | k0kubun | 2018-02-08 01:56:59 +0900 (Thu, 08 Feb 2018) | 12 lines

error.c: export rb_assert_failure

to test JIT with `VM_CHECK_MODE=1`

It's failing on CI which enables VM_CHECK_MODE.

:   1)
: TestJIT#test_jit [/home/ko1/ruby/src/trunk-vm-asserts/test/ruby/test_jit.rb:10]:
: Expected 1 times of JIT success, but succeeded 0 times.
:   2)
: TestJIT#test_jit_output [/home/ko1/ruby/src/trunk-vm-asserts/test/ruby/test_jit.rb:18]:
: Expected /^JIT success \(\d+\.\dms\): block in <main>@-e:1 -> .+_ruby_mjit_p\d+u\d+\.c$/ to match "MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p9896u0.so': /tmp/_ruby_mjit
------------------------------------------------------------------------
r62295 | k0kubun | 2018-02-08 01:39:17 +0900 (Thu, 08 Feb 2018) | 3 lines

.travis.yml: try `make install` to test JIT

If header is not available, JIT won't be tested.
------------------------------------------------------------------------
r62294 | k0kubun | 2018-02-08 01:28:17 +0900 (Thu, 08 Feb 2018) | 1 line

test_jit.rb: make JIT count test optional
------------------------------------------------------------------------
r62293 | svn | 2018-02-08 01:15:22 +0900 (Thu, 08 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62292 | svn | 2018-02-08 01:15:22 +0900 (Thu, 08 Feb 2018) | 1 line

* 2018-02-08
------------------------------------------------------------------------
r62291 | k0kubun | 2018-02-08 01:15:21 +0900 (Thu, 08 Feb 2018) | 1 line

test_jit.rb: add initial test for JIT
------------------------------------------------------------------------
r62290 | k0kubun | 2018-02-07 23:25:03 +0900 (Wed, 07 Feb 2018) | 7 lines

transform_mjit_header.rb: very verbose error log

for debugging AIX..... I have no idea why AIX's gcc is failing to
transform MJIT header....

Today's CI output:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180207T113303Z.log.html.gz#make
------------------------------------------------------------------------
r62289 | nobu | 2018-02-07 23:13:57 +0900 (Wed, 07 Feb 2018) | 1 line

 mjit.c: untabified [ci skip]
------------------------------------------------------------------------
r62288 | k0kubun | 2018-02-07 23:08:24 +0900 (Wed, 07 Feb 2018) | 7 lines

mjit.c: fix -Wdiscarded-qualifiers warning

../mjit.c: In function 'system_tmpdir':
../mjit.c:1231:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  tmpdir = "/tmp";
         ^
../mjit.c: At top level:
------------------------------------------------------------------------
r62287 | k0kubun | 2018-02-07 23:01:51 +0900 (Wed, 07 Feb 2018) | 5 lines

transform_mjit_header.rb: apply Regexp.escape

to prevent future breakage

Following up r62285
------------------------------------------------------------------------
r62286 | kazu | 2018-02-07 22:57:07 +0900 (Wed, 07 Feb 2018) | 1 line

Remove redundant RTEST
------------------------------------------------------------------------
r62285 | k0kubun | 2018-02-07 22:48:48 +0900 (Wed, 07 Feb 2018) | 16 lines

transform_mjit_header.rb: ignore unsupported cc

to generate MJIT header.

Even if we can't build MJIT header, Ruby's build should success. And
compilers which are not explicitly supported are likely to fail to
transform MJIT header.

Also you can pass only gcc or clang to --jit-cc=xxx for now. Thus
generating header does never make sense.

So I decided to conservatively give up MJIT header generation.
But please feel free to add your favorite compiler's macro if you think
it's working. (Another workaround is passing -D__GNUC__ :p)

[Bug #14447] [Bug #14446]
------------------------------------------------------------------------
r62284 | nobu | 2018-02-07 22:45:14 +0900 (Wed, 07 Feb 2018) | 1 line

defs/gmake.mk: make universal mjit_min_header link
------------------------------------------------------------------------
r62283 | nobu | 2018-02-07 22:41:32 +0900 (Wed, 07 Feb 2018) | 4 lines

mjit.c: system_tmpdir

* mjit.c (system_tmpdir): use system provided temporary directory,
  and TMPDIR as well as mktemp(1), before TMP and "/tmp".
------------------------------------------------------------------------
r62282 | k0kubun | 2018-02-07 22:27:42 +0900 (Wed, 07 Feb 2018) | 4 lines

.gitignore: ignore min header for in-place build

In some revision, the build directory of minimized header is changed,
and then it's no longer ignored.
------------------------------------------------------------------------
r62281 | nobu | 2018-02-07 22:26:09 +0900 (Wed, 07 Feb 2018) | 10 lines

mjit.c: fix buffer overflow

* mjit.c (sprint_uniq_filename): get rid of silent buffer
  overflow.

* mjit.c (get_uniq_filename, convert_unit_to_func): allocate
  enough buffer before formatting.

* mjit.c (convert_unit_to_func): use DLEXT instead of hard coded
  extension.
------------------------------------------------------------------------
r62280 | k0kubun | 2018-02-07 20:44:36 +0900 (Wed, 07 Feb 2018) | 7 lines

mjit.c: windows should include fcntl.h too

Fixing build failure on mswin by r62279

mjit.c
../mjit.c(1137) : error C2065: 'O_RDONLY' : undeclared identifier
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
------------------------------------------------------------------------
r62279 | nobu | 2018-02-07 17:14:15 +0900 (Wed, 07 Feb 2018) | 4 lines

mjit.c: FD instead of FILE

* mjit.c (init_header_filename): just FD instead of FILE to check
  file is accessible.
------------------------------------------------------------------------
r62278 | nobu | 2018-02-07 16:48:24 +0900 (Wed, 07 Feb 2018) | 1 line

mjit.c: fd is no longer valid after fclose
------------------------------------------------------------------------
r62277 | nobu | 2018-02-07 16:29:02 +0900 (Wed, 07 Feb 2018) | 1 line

mjit.c: fix declaration of ruby_null_device
------------------------------------------------------------------------
r62276 | nobu | 2018-02-07 15:49:32 +0900 (Wed, 07 Feb 2018) | 4 lines

thread.c: int32_t instead of suseconds_t

* thread.c (timeval_for): cast to int32_t instead of suseconds_t,
  which is not defined non-POSIX platforms.
------------------------------------------------------------------------
r62275 | nobu | 2018-02-07 15:14:56 +0900 (Wed, 07 Feb 2018) | 7 lines

fix up r62272

* thread.c (timeval_for): tv_usec is suseconds_t which may be
  smaller than long.

* thread_pthread.c (native_cond_timeout): ret is now used in
  CLOCK_MONOTONIC case only.
------------------------------------------------------------------------
r62274 | usa | 2018-02-07 13:04:33 +0900 (Wed, 07 Feb 2018) | 7 lines

remove declaration of ruby_engine from internal.h

	* internal.h (ruby_engine): remove declaration of ruby_engine because
	  it's declared at ruby/version.h.

	* ruby.c: include ruby/version.h for ruby_engine.

------------------------------------------------------------------------
r62273 | usa | 2018-02-07 12:21:28 +0900 (Wed, 07 Feb 2018) | 6 lines

mjit mswin support (WIP)

	* mjit.c (compile_c_to_so): fixed broken xfree position.

	* mjit.c (init_header_filename): refactored.

------------------------------------------------------------------------
r62272 | normal | 2018-02-07 10:57:14 +0900 (Wed, 07 Feb 2018) | 13 lines

thread.c: favor timespec internally

This results in fewer conversion on common modern systems with
support for clock_gettime, pthread_cond_timedwait and ppoll.
gettimeofday is declared obsolete by POSIX.1-2008, so it is yet
another reason to move away from it.  This also appears to result
in the reduction of compatibility code required for dealing
with inconsistent implementations of "struct timeval".tv_sec

In the future, this will also result in fewer conversions for
kqueue and pselect if we elect to use them.

[ruby-core:85416] [Feature #14452]
------------------------------------------------------------------------
r62271 | marcandre | 2018-02-07 08:52:30 +0900 (Wed, 07 Feb 2018) | 8 lines

lib/ostruct.rb: Use `FrozenError` instead of `RuntimeError`.

Patch by Yuuji Yaginuma. [Fixes GH-1808]

In other classes, `FrozenError` will be raised if change the frozen
object.
In order to match the behavior, I think that `FrozenError` should
use in `OpenStruct`.
------------------------------------------------------------------------
r62270 | marcandre | 2018-02-07 08:47:49 +0900 (Wed, 07 Feb 2018) | 1 line

lib/matrix.rb: Document deprecated methods [#12032] [doc] [ci-skip]
------------------------------------------------------------------------
r62269 | nobu | 2018-02-07 08:40:20 +0900 (Wed, 07 Feb 2018) | 1 line

common.mk: can't rescue NotImplementedError by default
------------------------------------------------------------------------
r62268 | nobu | 2018-02-07 08:40:19 +0900 (Wed, 07 Feb 2018) | 1 line

share ruby_null_device
------------------------------------------------------------------------
r62267 | usa | 2018-02-07 03:59:18 +0900 (Wed, 07 Feb 2018) | 11 lines

mjit mswin support (WIP)

* win32/Makefile.sub (LIBRUBYARG_SHARED): define for MJIT because it is used in
  common.mk.

* mjit.c (make_pch): skip temporary for mswin.

* mjit.c (compile_c_to_so, init_header_filename, mjit_init): mswin support.

* mjig_compile.c (mjit_compile): ditto.

------------------------------------------------------------------------
r62266 | k0kubun | 2018-02-07 01:57:46 +0900 (Wed, 07 Feb 2018) | 3 lines

mjit.c: make null device portable

for future mswin support
------------------------------------------------------------------------
r62265 | k0kubun | 2018-02-07 01:16:25 +0900 (Wed, 07 Feb 2018) | 3 lines

mjit.c: prefix "_ruby" to precompiled header too

for consistency and to clarify who created it.
------------------------------------------------------------------------
r62264 | k0kubun | 2018-02-07 01:03:14 +0900 (Wed, 07 Feb 2018) | 3 lines

ruby.c: add MJIT_FORCE_ENABLE macro

to always enable MJIT for testing.
------------------------------------------------------------------------
r62263 | nobu | 2018-02-07 01:03:11 +0900 (Wed, 07 Feb 2018) | 1 line

common.mk: clean mjit headers by clean-local
------------------------------------------------------------------------
r62262 | nobu | 2018-02-07 01:03:10 +0900 (Wed, 07 Feb 2018) | 1 line

mjit.c: try installed header only
------------------------------------------------------------------------
r62261 | nobu | 2018-02-07 00:55:12 +0900 (Wed, 07 Feb 2018) | 5 lines

moved MJIT_CPPFLAGS

* Makefile.in, win32/Makefile.sub (XCFLAGS): moved MJIT_CPPFLAGS
  from CPPFLAGS.  MJIT_CPPFLAGS is only for mjit.c, unused in
  extension libraries.
------------------------------------------------------------------------
r62260 | nobu | 2018-02-07 00:31:10 +0900 (Wed, 07 Feb 2018) | 1 line

common.mk: link or copy MJIT_MIN_HEADER under include
------------------------------------------------------------------------
r62259 | svn | 2018-02-07 00:19:11 +0900 (Wed, 07 Feb 2018) | 1 line

* 2018-02-07
------------------------------------------------------------------------
r62258 | k0kubun | 2018-02-07 00:19:10 +0900 (Wed, 07 Feb 2018) | 3 lines

mjit.c: handle fopen error

[Bug #14441]
------------------------------------------------------------------------
r62257 | k0kubun | 2018-02-06 23:58:12 +0900 (Tue, 06 Feb 2018) | 3 lines

transform_mjit_header.rb: resurrect `exit false`

which was just unintentionally dropped at r62252.
------------------------------------------------------------------------
r62256 | nobu | 2018-02-06 23:45:11 +0900 (Tue, 06 Feb 2018) | 4 lines

common.mk: MJIT_CPPFLAGS

* common.mk (MJIT_CPPFLAGS): moved common definition flags for
  mjit compilation.
------------------------------------------------------------------------
r62255 | k0kubun | 2018-02-06 23:27:15 +0900 (Tue, 06 Feb 2018) | 7 lines

mjit_compile.c: fix inconsistent indentation

and style of generated code.

I've used 2-space indentation at first but at some moment I started to
use insns.def contents for generated code. So the 4-space indentation
was introduced. But it does no longer make sense.
------------------------------------------------------------------------
r62254 | k0kubun | 2018-02-06 23:07:57 +0900 (Tue, 06 Feb 2018) | 6 lines

mjit_compile.c: share the definition of macros

(IS_ARGS_SPLAT, IS_ARGS_KEYWORD) with vm_args.c.

vm_args.c: share them with mjit_compile.c.
vm_insnhelper.h: get those definitions, with CALLER_SETUP_ARG too
------------------------------------------------------------------------
r62253 | kazu | 2018-02-06 22:58:04 +0900 (Tue, 06 Feb 2018) | 4 lines

Fix wrong comment

`ruby_strdup` does not return NULL.
[ci skip]
------------------------------------------------------------------------
r62252 | k0kubun | 2018-02-06 22:47:02 +0900 (Tue, 06 Feb 2018) | 14 lines

transform_mjit_header.rb: add output for debug

AIX's header build is failing like:

./miniruby -I./lib -I. -I.ext/common  ./tool/transform_mjit_header.rb "/usr/bin/gcc " rb_mjit_header.h .ext/include/powerpc-aix7.1.3.0/rb_mjit_min_header-2.6.0.h
error in initial header file:
/home/odaira/chkbuild/tmp/build/20180206T113302Z/tmp/20180206-15335556-aaiego.c:19:59: error: conflicting types for 'restrict'
 extern size_t fread(void *restrict, size_t, size_t, FILE *restrict);
                                                           ^

https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180206T113302Z.log.html.gz#make

It's so hard to know the cause from current output. Let me add debug
output and see tomorrow's CI result.
------------------------------------------------------------------------
r62251 | nobu | 2018-02-06 22:23:25 +0900 (Tue, 06 Feb 2018) | 1 line

mjit.c: suppress unused-value warning
------------------------------------------------------------------------
r62250 | kazu | 2018-02-06 21:40:41 +0900 (Tue, 06 Feb 2018) | 3 lines

Remove unused capture

Because `Regexp#to_s` add `(?-mix:)`, it is not unnecessary.
------------------------------------------------------------------------
r62249 | nobu | 2018-02-06 19:36:03 +0900 (Tue, 06 Feb 2018) | 1 line

mjit.c: fixed missing variable
------------------------------------------------------------------------
r62248 | nobu | 2018-02-06 19:30:53 +0900 (Tue, 06 Feb 2018) | 5 lines

mjit.c: build dir prefix

* mjit.c (init_header_filename): prepend basedir to header build
  dir too, so that the header can be found when running not in the
  build directory.
------------------------------------------------------------------------
r62247 | nobu | 2018-02-06 17:00:17 +0900 (Tue, 06 Feb 2018) | 1 line

configure.ac: removed unnecessary pushdef/popdef
------------------------------------------------------------------------
r62246 | nobu | 2018-02-06 16:42:44 +0900 (Tue, 06 Feb 2018) | 4 lines

test_gem_util.rb: fix broken test

* test/rubygems/test_gem_util.rb: no guarantee that tmpdir is
  always underneath the root directory at all.
------------------------------------------------------------------------
r62245 | nobu | 2018-02-06 12:19:42 +0900 (Tue, 06 Feb 2018) | 7 lines

mjit headers for universal binary

* common.mk (MJIT_HEADER, MJIT_MIN_HEADER): added hook to separate
  intermediate headers per archs.

* defs/gmake.mk: build mjit headers per -arch options, and then
  merge the headers with `#ifdef`s.
------------------------------------------------------------------------
r62244 | hsbt | 2018-02-06 11:58:35 +0900 (Tue, 06 Feb 2018) | 3 lines

Merge RubyGems-2.7.5 from upstream.

  Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html
------------------------------------------------------------------------
r62243 | shyouhei | 2018-02-06 11:08:13 +0900 (Tue, 06 Feb 2018) | 12 lines

deal with aclocal(1)

This commit updates files so that aclocal.m4 generated by aclocal(1)
works well with our configure.ac

	* ac_checking.m4: merged back to configure.ac because
	  aclocal(1) cannot handle this macro.

	* ruby_append_options.m4: no longer used.

	* ruby_check_va_copy.m4: define using AC_DEFUN so that
	  aclocal(1) can find this macro.
------------------------------------------------------------------------
r62242 | nobu | 2018-02-06 10:42:38 +0900 (Tue, 06 Feb 2018) | 5 lines

thread_pthread.c: cast inside rb_thread_create_mjit_thread

* thread_pthread.c (rb_thread_create_mjit_thread): cast
  worker_func pointer to void pointer inside.  adjusted to the
  declaration in mjit.c and the definition in thread_win32.c.
------------------------------------------------------------------------
r62241 | nobu | 2018-02-06 10:42:37 +0900 (Tue, 06 Feb 2018) | 1 line

mjit.c: use ruby_strdup as get_string
------------------------------------------------------------------------
r62240 | nobu | 2018-02-06 09:47:19 +0900 (Tue, 06 Feb 2018) | 5 lines

common.mk: ARCH_FLAG to mjit headers

* common.mk (rb_mjit_header.h, rb_mjit_min_header.h): $(ARCH_FLAG)
  is necessary to compile for non-default architecture, e.g.,
  32bit build on 64bit platform.
------------------------------------------------------------------------
r62239 | k0kubun | 2018-02-06 02:00:43 +0900 (Tue, 06 Feb 2018) | 23 lines

mjit.c: fix MinGW warning by r62221

mjit.c: In function 'worker':
mjit.c:126:64: warning: passing argument 1 of '_InterlockedExchangePointer' from incompatible pointer type [-Wincompatible-pointer-types]
 #  define MJIT_ATOMIC_SET(var, val) InterlockedExchangePointer(&(var), val)
                                                                ^
mjit.c:828:17: note: in expansion of macro 'MJIT_ATOMIC_SET'
                 MJIT_ATOMIC_SET(node->unit->iseq->body->jit_func, func);
                 ^
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:27:0,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:8,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23,
                 from ./include/ruby/win32.h:41,
                 from ./include/ruby/defines.h:250,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:76:
C:/msys64/mingw64/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:1420:7: note: expected 'void * volatile*' but argument is of type 'VALUE (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *) {aka long long unsigned int (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)}'
 void *_InterlockedExchangePointer(void *volatile *Target,void *Value) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------------------------------------
r62238 | k0kubun | 2018-02-06 01:51:12 +0900 (Tue, 06 Feb 2018) | 14 lines

mjit.c: determine prefix of MJIT header at runtime

so that MJIT can work if Ruby is distributed as prebuilt binary.

Now mjit_init() depends on the internal const TMP_RUBY_PREFIX which is
only available after ruby_init_loadpath_safe() (L1608) and before
ruby_init_prelude() (L1681). So the place of mjit_init() is moved.

Makefile.in: Removed static prefix from MJIT_HEADER_ISNTALL_DIR macro.
And this removes the unused LIBRUBY_LIBDIR macro as well.
win32/Makefile.sub: ditto.

Patch by: Lars Kanis <lars@greiz-reinsdorf.de>
[Bug #14445]
------------------------------------------------------------------------
r62237 | k0kubun | 2018-02-06 00:49:32 +0900 (Tue, 06 Feb 2018) | 6 lines

vm_insnhelper.c: prefix rb_ to simple_iseq_p

which is started to be used by mjit_compile.c in r62197.

Related to r62235, this intends to transform the function to static.
Of course we shouldn't pollute the namespace anyway.
------------------------------------------------------------------------
r62236 | svn | 2018-02-06 00:39:56 +0900 (Tue, 06 Feb 2018) | 1 line

* 2018-02-06
------------------------------------------------------------------------
r62235 | k0kubun | 2018-02-06 00:39:55 +0900 (Tue, 06 Feb 2018) | 5 lines

transform_mjit_header.rb: restrict transformation

to whitelisted patterns. This fix is for NetBSD.

[Bug #14439]
------------------------------------------------------------------------
r62232 | nobu | 2018-02-05 22:58:48 +0900 (Mon, 05 Feb 2018) | 1 line

transform_mjit_header.rb: same command after error
------------------------------------------------------------------------
r62231 | k0kubun | 2018-02-05 22:24:00 +0900 (Mon, 05 Feb 2018) | 12 lines

tool/downloader.rb: retry SocketError

I would like to stabilize RubyCI.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora26/ruby-trunk/log/20180205T123003Z.fail.html.gz

downloading did_you_mean-1.2.0.gem ... /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:212:in `rescue in download': failed to download did_you_mean-1.2.0.gem (RuntimeError)
SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Name or service not known): https://rubygems.org/downloads/did_you_mean-1.2.0.gem
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:123:in `download'
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:66:in `download'
	from -e:4:in `<main>'
make[1]: *** [Makefile:1685: update-gems] Error 1
------------------------------------------------------------------------
r62230 | k0kubun | 2018-02-05 21:57:24 +0900 (Mon, 05 Feb 2018) | 8 lines

mjit.c: prefer using --jit-cc=clang if __clang__

is defined.  This is basically for OpenBSD.

Failure on using the compiler which is
not used for Ruby compilation is not supported.

[Bug #14440]
------------------------------------------------------------------------
r62229 | kazu | 2018-02-05 21:34:37 +0900 (Mon, 05 Feb 2018) | 1 line

Fix undefined behavior
------------------------------------------------------------------------
r62228 | kazu | 2018-02-05 21:34:35 +0900 (Mon, 05 Feb 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r62227 | k0kubun | 2018-02-05 21:33:36 +0900 (Mon, 05 Feb 2018) | 20 lines

mjit.c: try changing the order of includes

Hoping to fix the AIX's build failure like:

In file included from ./include/ruby/defines.h:139:0,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:81:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/include-fixed/unistd.h:939:14: error: conflicting types for 'ftruncate64'
  extern int  ftruncate64(int, off64_t);
              ^
In file included from ./include/ruby/defines.h:139:0,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:81:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/include-fixed/unistd.h:937:14: note: previous declaration of 'ftruncate64' was here
  extern int  ftruncate(int, off_t);
              ^
------------------------------------------------------------------------
r62226 | k0kubun | 2018-02-05 21:19:38 +0900 (Mon, 05 Feb 2018) | 6 lines

transform_mjit_header.rb: check initial code

separating the macros. Applying the kept macros to code which is already
affected by the macros may cause errors in initial code.

This is hopefully the final fix for icc build failure.
------------------------------------------------------------------------
r62225 | k0kubun | 2018-02-05 21:05:04 +0900 (Mon, 05 Feb 2018) | 6 lines

transform_mjit_header.rb: remove predefined macros

semi-automatically.

This is basically for icc's __DATE__, __TIME__, and many other families.
It causes an error by predefined macro redefinition.
------------------------------------------------------------------------
r62224 | shyouhei | 2018-02-05 14:22:22 +0900 (Mon, 05 Feb 2018) | 1 line

need shell's escape instead of M4's.
------------------------------------------------------------------------
r62223 | nobu | 2018-02-05 13:58:07 +0900 (Mon, 05 Feb 2018) | 4 lines

Makefile.sub: va_copy in old version

* win32/Makefile.sub: va_copy is available since VS12 (VC 18.00).
  simple copy same as VC1 19.00.
------------------------------------------------------------------------
r62222 | nobu | 2018-02-05 13:58:04 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: no extra CRs

* tool/transform_mjit_header.rb (MJITHeader.check_code!): open
  temporary file in binary mode too, not to include extra CRs.
------------------------------------------------------------------------
r62221 | shyouhei | 2018-02-05 13:17:44 +0900 (Mon, 05 Feb 2018) | 5 lines

assigning void* to a function pointer is a POSIXism

No implicit cast is defined between these types.  Should be explicit.
Also, NULL is defined to be ((void*)0) so not usable as a function
pointer value.
------------------------------------------------------------------------
r62220 | shyouhei | 2018-02-05 13:07:25 +0900 (Mon, 05 Feb 2018) | 3 lines

va_copy is a C99ism

Should provide appropriate fallback implementation.
------------------------------------------------------------------------
r62219 | shyouhei | 2018-02-05 13:02:55 +0900 (Mon, 05 Feb 2018) | 1 line

comma at the end of enum is a C99ism
------------------------------------------------------------------------
r62218 | nobu | 2018-02-05 12:19:39 +0900 (Mon, 05 Feb 2018) | 1 line

vcs.rb: no meaningless splat
------------------------------------------------------------------------
r62217 | nobu | 2018-02-05 12:19:39 +0900 (Mon, 05 Feb 2018) | 4 lines

vcs.rb: for old ruby

* tool/vcs.rb (DebugSystem#system): pop option hash for old
  version ruby which does not support `system` options.
------------------------------------------------------------------------
r62216 | nobu | 2018-02-05 11:07:49 +0900 (Mon, 05 Feb 2018) | 1 line

transform_mjit_header.rb: take program name from $0
------------------------------------------------------------------------
r62215 | nobu | 2018-02-05 11:02:23 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: read/write in binmode

* tool/transform_mjit_header.rb: read and write as ASCII-8BIT to
  make single-byte-optimizable always.
------------------------------------------------------------------------
r62214 | nobu | 2018-02-05 09:52:45 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: separate macro and code

* tool/transform_mjit_header.rb (separate_macro_and_code): return
  macro and code separately as the name, and concat before output.
------------------------------------------------------------------------
r62213 | nobu | 2018-02-05 09:52:20 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: scan by regexp

* tool/transform_mjit_header.rb (find_decl): scan by regexp
  instead of char-by-char loop.  return nil when finished.
------------------------------------------------------------------------
r62212 | kazu | 2018-02-05 09:09:09 +0900 (Mon, 05 Feb 2018) | 1 line

Use system option instead of shell redirect
------------------------------------------------------------------------
r62211 | k0kubun | 2018-02-05 00:40:06 +0900 (Mon, 05 Feb 2018) | 15 lines

mjit.c: define __EXTENSIONS__ earlier

Another try of r62204 and r62192.

As far as I can see from solaris's signal.h and sys/procset.h, the only
possibility that causes the following error would be that sys/procset.h
is included without __EXTENSIONS__ and signal.h included it again but it
doesn't define procset_t.  Let's define __EXTENSIONS__ from first.

---
In file included from vm_core.h:87:0,
                 from mjit.c:85:
/usr/include/signal.h:77:29: error: unknown type name 'procset_t'
 extern int sigsendset(const procset_t *, int);
                             ^
------------------------------------------------------------------------
r62210 | nobu | 2018-02-05 00:34:38 +0900 (Mon, 05 Feb 2018) | 3 lines

MINIRUBY dependency

* common.mk ($(MJIT_MIN_HEADER)): add dependency for $(MINIRUBY).
------------------------------------------------------------------------
r62209 | nobu | 2018-02-05 00:23:37 +0900 (Mon, 05 Feb 2018) | 4 lines

use MINIRUBY

* common.mk ($(MJIT_MIN_HEADER)): use $(MINIRUBY) at build time.
  $(BASERUBY) may not be available.
------------------------------------------------------------------------
r62208 | nobu | 2018-02-05 00:17:44 +0900 (Mon, 05 Feb 2018) | 6 lines

common.mk: CPPOUTFLAG

* common.mk (rb_mjit_header.h): use $(CPPOUTFLAG).

* win32/Makefile.sub (CPPOUTFLAG): needs -Fi to let cl.exe name
  preprocessed file, instead of -Fo.
------------------------------------------------------------------------
r62207 | svn | 2018-02-05 00:05:38 +0900 (Mon, 05 Feb 2018) | 1 line

* 2018-02-05
------------------------------------------------------------------------
r62206 | k0kubun | 2018-02-05 00:05:37 +0900 (Mon, 05 Feb 2018) | 7 lines

common.mk: use vm.i as the temporary filename

because `cl -P vm.c` always produces vm.i regardless of -o XXX and
currently mswin build is failing.

Fixing r62202. If this commit does not work, I'll revert this and
r62202.
------------------------------------------------------------------------
r62205 | nobu | 2018-02-04 22:51:02 +0900 (Sun, 04 Feb 2018) | 5 lines

transform_mjit_header.rb: refactor messages and exit

* tool/transform_mjit_header.rb: print non-error messages to
  STDOUT instead of STDERR.  exit with false or abort instead of
  exit 1.
------------------------------------------------------------------------
r62204 | k0kubun | 2018-02-04 22:49:38 +0900 (Sun, 04 Feb 2018) | 9 lines

mjit.c: another try for fixing solaris build

Reverted r62192 and added another try.
I prepared Solaris environment but I couldn't reproduce the RubyCI build
failure. So I'm testing on trunk.

I found the following article and it fixed the same problem with passing
`-D__EXTENSIONS__`. So this commit defines `__EXTENSIONS__` for Solaris.
https://bitbucket.org/ged/ruby-pg/issues/236/compile-error-usr-include-signalh-92-1
------------------------------------------------------------------------
r62203 | nobu | 2018-02-04 22:47:07 +0900 (Sun, 04 Feb 2018) | 1 line

common.mk: phony target mjit-headers
------------------------------------------------------------------------
r62202 | nobu | 2018-02-04 22:43:06 +0900 (Sun, 04 Feb 2018) | 4 lines

common.mk: rb_mjit_header.h

* common.mk (rb_mjit_header.h): moved from Makefile.in and
  win32/Makefile.sub.
------------------------------------------------------------------------
r62201 | nobu | 2018-02-04 22:33:13 +0900 (Sun, 04 Feb 2018) | 4 lines

Makefile.sub: CFLAGS_NO_ARCH

* win32/Makefile.sub: split CFLAGS into CFLAGS_NO_ARCH and
  ARCH_FLAG, as well as Makefile.in.
------------------------------------------------------------------------
r62200 | k0kubun | 2018-02-04 22:15:28 +0900 (Sun, 04 Feb 2018) | 5 lines

vm.c: feedback control frame size change

to VM_ASSERT. r62197 is adding bp.

I'll try to remove bp, but let's pass CI which enables assertion.
------------------------------------------------------------------------
r62199 | nobu | 2018-02-04 22:12:57 +0900 (Sun, 04 Feb 2018) | 5 lines

match whole word

* tool/transform_mjit_header.rb: add word boundary anchors and
  match whole word to get rid of false `static` declarations,
  e.g., rb_str_new_static.
------------------------------------------------------------------------
r62198 | kazu | 2018-02-04 20:59:19 +0900 (Sun, 04 Feb 2018) | 1 line

Fix typos and remove redundant `/#{}/`
------------------------------------------------------------------------
r62197 | k0kubun | 2018-02-04 20:22:28 +0900 (Sun, 04 Feb 2018) | 213 lines

mjit_compile.c: merge initial JIT compiler

which has been developed by Takashi Kokubun <takashikkbn@gmail> as
YARV-MJIT. Many of its bugs are fixed by wanabe <s.wanabe@gmail.com>.

This JIT compiler is designed to be a safe migration path to introduce
JIT compiler to MRI. So this commit does not include any bytecode
changes or dynamic instruction modifications, which are done in original
MJIT.

This commit even strips off some aggressive optimizations from
YARV-MJIT, and thus it's slower than YARV-MJIT too. But it's still
fairly faster than Ruby 2.5 in some benchmarks (attached below).

Note that this JIT compiler passes `make test`, `make test-all`, `make
test-spec` without JIT, and even with JIT. Not only it's perfectly safe
with JIT disabled because it does not replace VM instructions unlike
MJIT, but also with JIT enabled it stably runs Ruby applications
including Rails applications.

I'm expecting this version as just "initial" JIT compiler. I have many
optimization ideas which are skipped for initial merging, and you may
easily replace this JIT compiler with a faster one by just replacing
mjit_compile.c. `mjit_compile` interface is designed for the purpose.

common.mk: update dependencies for mjit_compile.c.

internal.h: declare `rb_vm_insn_addr2insn` for MJIT.

vm.c: exclude some definitions if `-DMJIT_HEADER` is provided to
compiler. This avoids to include some functions which take a long time
to compile, e.g. vm_exec_core. Some of the purpose is achieved in
transform_mjit_header.rb (see `IGNORED_FUNCTIONS`) but others are
manually resolved for now. Load mjit_helper.h for MJIT header.
mjit_helper.h: New. This is a file used only by JIT-ed code. I'll
refactor `mjit_call_cfunc` later.
vm_eval.c: add some #ifdef switches to skip compiling some functions
like Init_vm_eval.

win32/mkexports.rb: export thread/ec functions, which are used by MJIT.

include/ruby/defines.h: add MJIT_FUNC_EXPORTED macro alis to clarify
that a function is exported only for MJIT.

array.c: export a function used by MJIT.
bignum.c: ditto.
class.c: ditto.
compile.c: ditto.
error.c: ditto.
gc.c: ditto.
hash.c: ditto.
iseq.c: ditto.
numeric.c: ditto.
object.c: ditto.
proc.c: ditto.
re.c: ditto.
st.c: ditto.
string.c: ditto.
thread.c: ditto.
variable.c: ditto.
vm_backtrace.c: ditto.
vm_insnhelper.c: ditto.
vm_method.c: ditto.

I would like to improve maintainability of function exports, but I
believe this way is acceptable as initial merging if we clarify the
new exports are for MJIT (so that we can use them as TODO list to fix)
and add unit tests to detect unresolved symbols.
I'll add unit tests of JIT compilations in succeeding commits.

Author: Takashi Kokubun <takashikkbn@gmail.com>
Contributor: wanabe <s.wanabe@gmail.com>

Part of [Feature #14235]

---

* Known issues
  * Code generated by gcc is faster than clang. The benchmark may be worse
    in macOS. Following benchmark result is provided by gcc w/ Linux.
  * Performance is decreased when Google Chrome is running
  * JIT can work on MinGW, but it doesn't improve performance at least
    in short running benchmark.
  * Currently it doesn't perform well with Rails. We'll try to fix this
    before release.

---

* Benchmark reslts

Benchmarked with:
Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores

- 2.0.0-p0: Ruby 2.0.0-p0
- r62186: Ruby trunk (early 2.6.0), before MJIT changes
- JIT off: On this commit, but without `--jit` option
- JIT on: On this commit, and with `--jit` option

** Optcarrot fps

Benchmark: https://github.com/mame/optcarrot

|         |2.0.0-p0 |r62186   |JIT off  |JIT on   |
|:--------|:--------|:--------|:--------|:--------|
|fps      |37.32    |51.46    |51.31    |58.88    |
|vs 2.0.0 |1.00x    |1.38x    |1.37x    |1.58x    |

** MJIT benchmarks

Benchmark: https://github.com/benchmark-driver/mjit-benchmarks
(Original: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch/MJIT-benchmarks)

|           |2.0.0-p0 |r62186   |JIT off  |JIT on   |
|:----------|:--------|:--------|:--------|:--------|
|aread      |1.00     |1.09     |1.07     |2.19     |
|aref       |1.00     |1.13     |1.11     |2.22     |
|aset       |1.00     |1.50     |1.45     |2.64     |
|awrite     |1.00     |1.17     |1.13     |2.20     |
|call       |1.00     |1.29     |1.26     |2.02     |
|const2     |1.00     |1.10     |1.10     |2.19     |
|const      |1.00     |1.11     |1.10     |2.19     |
|fannk      |1.00     |1.04     |1.02     |1.00     |
|fib        |1.00     |1.32     |1.31     |1.84     |
|ivread     |1.00     |1.13     |1.12     |2.43     |
|ivwrite    |1.00     |1.23     |1.21     |2.40     |
|mandelbrot |1.00     |1.13     |1.16     |1.28     |
|meteor     |1.00     |2.97     |2.92     |3.17     |
|nbody      |1.00     |1.17     |1.15     |1.49     |
|nest-ntimes|1.00     |1.22     |1.20     |1.39     |
|nest-while |1.00     |1.10     |1.10     |1.37     |
|norm       |1.00     |1.18     |1.16     |1.24     |
|nsvb       |1.00     |1.16     |1.16     |1.17     |
|red-black  |1.00     |1.02     |0.99     |1.12     |
|sieve      |1.00     |1.30     |1.28     |1.62     |
|trees      |1.00     |1.14     |1.13     |1.19     |
|while      |1.00     |1.12     |1.11     |2.41     |

** Discourse's script/bench.rb

Benchmark: https://github.com/discourse/discourse/blob/v1.8.7/script/bench.rb

NOTE: Rails performance was somehow a little degraded with JIT for now.
We should fix this.
(At least I know opt_aref is performing badly in JIT and I have an idea
 to fix it. Please wait for the fix.)

*** JIT off
Your Results: (note for timings- percentile is first, duration is second in millisecs)

categories_admin:
  50: 17
  75: 18
  90: 22
  99: 29
home_admin:
  50: 21
  75: 21
  90: 27
  99: 40
topic_admin:
  50: 17
  75: 18
  90: 22
  99: 32
categories:
  50: 35
  75: 41
  90: 43
  99: 77
home:
  50: 39
  75: 46
  90: 49
  99: 95
topic:
  50: 46
  75: 52
  90: 56
  99: 101

*** JIT on
Your Results: (note for timings- percentile is first, duration is second in millisecs)

categories_admin:
  50: 19
  75: 21
  90: 25
  99: 33
home_admin:
  50: 24
  75: 26
  90: 30
  99: 35
topic_admin:
  50: 19
  75: 20
  90: 25
  99: 30
categories:
  50: 40
  75: 44
  90: 48
  99: 76
home:
  50: 42
  75: 48
  90: 51
  99: 89
topic:
  50: 49
  75: 55
  90: 58
  99: 99
------------------------------------------------------------------------
r62196 | k0kubun | 2018-02-04 18:48:44 +0900 (Sun, 04 Feb 2018) | 4 lines

Makefile.in: use CFLAGS_NO_ARCH for cpp

Using $(CFLAGS) breaks the build when multiple `-arch` options are
given. Then we should omit arch flags.
------------------------------------------------------------------------
r62195 | nobu | 2018-02-04 18:34:16 +0900 (Sun, 04 Feb 2018) | 4 lines

common.mk: MJIT_MIN_HEADER

* common.mk ($(MJIT_MIN_HEADER)): moved duplicate recipe from
  Makefile.in and win32/Makefile.sub.
------------------------------------------------------------------------
r62194 | nobu | 2018-02-04 18:13:19 +0900 (Sun, 04 Feb 2018) | 4 lines

use ifchange tool for rb_mjit_header.h

* Makefile.in, win32/Makefile.sub (rb_mjit_header.h): use ifchange
  tool.  cmp command is not available on Windows.
------------------------------------------------------------------------
r62193 | k0kubun | 2018-02-04 17:24:58 +0900 (Sun, 04 Feb 2018) | 14 lines

mjit.c: use InterlockedExchangePointer

for Windows, if it's available.

Before this commit, Windows builds printed following warnings.
mjit.c
../mjit.c(802) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'void **'
../mjit.c(802) : warning C4024: '_InterlockedExchange' : different types for formal and actual parameter 1
../mjit.c(802) : warning C4047: 'function' : 'LONG' differs in levels of indirection from 'void *'
../mjit.c(802) : warning C4024: '_InterlockedExchange' : different types for formal and actual parameter 2

ATOMIC_SET is using InterlockedExchange which takes LONG as its value.
As InterlockedExchangePointer takes PVOID, we should use this to set
function pointer atomically.
------------------------------------------------------------------------
r62192 | k0kubun | 2018-02-04 16:52:54 +0900 (Sun, 04 Feb 2018) | 18 lines

mjit.c: try to fix Solaris build failure

In file included from vm_core.h:87:0,
                 from mjit.c:81:
/usr/include/signal.h:71:29: error: unknown type name 'procset_t'
 extern int sigsendset(const procset_t *, int);
                             ^
In file included from mjit.c:81:0:
vm_core.h:90:16: error: '_SIGMAX' undeclared here (not in a function)
 # define NSIG (_SIGMAX + 1)      /* For QNX */
                ^
vm_core.h:93:19: note: in expansion of macro 'NSIG'
 #define RUBY_NSIG NSIG

Errors come from vm_core.h. But obviously I don't touch those parts.
So I guess we need something before vm_core.h.
I included internal.h before vm_core.h so that the situation becomes the
same as cont.c.
------------------------------------------------------------------------
r62191 | k0kubun | 2018-02-04 16:43:20 +0900 (Sun, 04 Feb 2018) | 8 lines

mjit.c: try porting va_copy

for non C99 conforming environments.

The behavior of this macro is undefined, but I heard this works on many
architectures. Let me check the Ruby CI result with this change.
(My Windows environment has only Visual Studio 2015 and va_copy is
provided in it...)
------------------------------------------------------------------------
r62190 | svn | 2018-02-04 15:58:11 +0900 (Sun, 04 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62189 | k0kubun | 2018-02-04 15:58:09 +0900 (Sun, 04 Feb 2018) | 104 lines

mjit.c: merge MJIT infrastructure

that allows to JIT-compile Ruby methods by generating C code and
using C compiler.  See the first comment of mjit.c to know what this
file does.

mjit.c is authored by Vladimir Makarov <vmakarov@redhat.com>.
After he invented great method JIT infrastructure for MRI as MJIT,
Lars Kanis <lars@greiz-reinsdorf.de> sent the patch to support MinGW
in MJIT. In addition to merging it, I ported pthread to Windows native
threads. Now this MJIT infrastructure can be compiled on Visual Studio.

This commit simplifies mjit.c to decrease code at initial merge. For
example, this commit does not provide multiple JIT threads support.
We can resurrect them later if we really want them, but I wanted to minimize
diff to make it easier to review this patch.

`/tmp/_mjitXXX` file is renamed to `/tmp/_ruby_mjitXXX` because non-Ruby
developers may not know the name "mjit" and the file name should make
sure it's from Ruby and not from some harmful programs.  TODO: it may be
better to store this to some temporary directory which Ruby is already using
by Tempfile, if it's not bad for performance.

mjit.h: New. It has `mjit_exec` interface similar to `vm_exec`, which is
for triggering MJIT. This drops interface for AOT compared to the original
MJIT.

Makefile.in: define macros to let MJIT know the path of MJIT header.
Probably we can refactor this to reduce the number of macros (TODO).
win32/Makefile.sub: ditto.

common.mk: compile mjit.o and mjit_compile.o. Unlike original MJIT, this
commit separates MJIT infrastructure and JIT compiler code as independent
object files. As initial patch is NOT going to have ultra-fast JIT compiler,
it's likely to replace JIT compiler, e.g. original MJIT's compiler or some
future JIT impelementations which are not public now.

inits.c: define MJIT module. This is added because `MJIT.enabled?` was
necessary for testing.
test/lib/zombie_hunter.rb: skip if `MJIT.enabled?`. Obviously this
wouldn't work with current code when JIT is enabled.
test/ruby/test_io.rb: skip this too. This would make no sense with MJIT.

ruby.c: define MJIT CLI options. As major difference from original MJIT,
"-j:l"/"--jit:llvm" are renamed to "--jit-cc" because I want to support
not only gcc/clang but also cl.exe (Visual Studio) in the future. But it
takes only "--jit-cc=gcc", "--jit-cc=clang" for now. And only long "--jit"
options are allowed since some Ruby committers preferred it at Ruby
developers Meeting on January, and some of options are renamed.
This file also triggers to initialize MJIT thread and variables.
eval.c: finalize MJIT worker thread and variables.
test/ruby/test_rubyoptions.rb: fix number of CLI options for --jit.

thread_pthread.c: change for pthread abstraction in MJIT. Prefix rb_ for
functions which are used by other files.
thread_win32.c: ditto, for Windows.  Those pthread porting is one of major
works that YARV-MJIT created, which is my fork of MJIT, in Feature 14235.
thread.c: follow rb_ prefix changes

vm.c: trigger MJIT call on VM invocation. Also trigger `mjit_mark` to avoid
SEGV by race between JIT and GC of ISeq. The improvement was provided by
wanabe <s.wanabe@gmail.com>.
In JIT compiler I created and am going to add in my next commit, I found
that having `mjit_exec` after `vm_loop_start:` is harmful because the
JIT-ed function doesn't proceed other ISeqs on RESTORE_REGS of leave insn.
Executing non-FINISH frame is unexpected for my JIT compiler and
`exception_handler` triggers executions of such ISeqs. So `mjit_exec`
here should be executed only when it directly comes from `vm_exec` call.
`RubyVM::MJIT` module and `.enabled?` method is added so that we can skip
some tests which don't expect JIT threads or compiler file descriptors.

vm_insnhelper.h: trigger MJIT on method calls during VM execution.

vm_core.h: add fields required for mjit.c. `bp` must be `cfp[6]` because
rb_control_frame_struct is likely to be casted to another struct. The
last position is the safest place to add the new field.
vm_insnhelper.c: save initial value of cfp->ep as cfp->bp. This is an
optimization which are done in both MJIT and YARV-MJIT. So this change
is added in this commit. Calculating bp from ep is a little heavy work,
so bp is kind of cache for it.

iseq.c: notify ISeq GC to MJIT. We should know which iseq in MJIT queue
is GCed to avoid SEGV.  TODO: unload some GCed units in some safe way.

gc.c: add hooks so that MJIT can wait GC, and vice versa. Simultaneous
JIT and GC executions may cause SEGV and so we should synchronize them.

cont.c: save continuation information in MJIT worker. As MJIT shouldn't
unload JIT-ed code which is being used, MJIT wants to know full list of
saved execution contexts for continuation and detect ISeqs in use.

mjit_compile.c: added empty JIT compiler so that you can reuse this commit
to build your own JIT compiler. This commit tries to compile ISeqs but
all of them are considered as not supported in this commit. So you can't
use JIT compiler in this commit yet while we added --jit option now.

Patch author: Vladimir Makarov <vmakarov@redhat.com>.

Contributors:
Takashi Kokubun <takashikkbn@gmail.com>.
wanabe <s.wanabe@gmail.com>.
Lars Kanis <lars@greiz-reinsdorf.de>.

Part of Feature 12589 and 14235.
------------------------------------------------------------------------
r62188 | svn | 2018-02-04 14:49:22 +0900 (Sun, 04 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62187 | k0kubun | 2018-02-04 14:49:21 +0900 (Sun, 04 Feb 2018) | 34 lines

common.mk: install a single header file for JIT

compilation which is created by transforming a preprocessed vm.c.
This file will be used by JIT compiler's generated code which we are
going to have from succeeding commits.

Makefile.in: generate MJIT header for UNIX environments.
win32/Makefile.sub: generate MJIT header for mswin environments.
At initial merge, we're going to support only MinGW for Windows. So the
header installed by this file won't be used for short term, but we'll
add mswin support in a half year or so, for sure.

tool/transform_mjit_header.rb: New. This script was originally written as
minimize_mjit_header.rb by Vladimir N. Makarov <vmakarov@redhat.com> for
Feature 12589.
Then I refactored a little so that it can conform CodeClimate CI which is
currently set for Ruby's GitHub repository, and fixed some bugs and ported
it to work on Windows.

Also, as original minimize_mjit_header.rb takes too long time to run,
this is modified to skip minimization step because having *static*
unused definitions does not waste compilation time on -O2 since compiler
can skip to compile unused static functions. So this does no longer
"minimize" the header and is renamed.

This header installation does NOT include a header to automatically
export symbols used by MJIT. That's because original MJIT code was
failing to export symbols in the import header in macOS environment.
But I would like to have the functionality for maintainability in the
future. I'll manually export things but it would be just an intemediate
solution.

Patch by: Vladimir N. Makarov <vmakarov@redhat.com>
Part of: Feature 12589 and 14235.
------------------------------------------------------------------------
r62186 | nobu | 2018-02-04 10:31:48 +0900 (Sun, 04 Feb 2018) | 1 line

thread.c: timespec_for is used only if poll() is used
------------------------------------------------------------------------
r62184 | normal | 2018-02-04 07:24:17 +0900 (Sun, 04 Feb 2018) | 3 lines

thread.c (thread_join_m): avoid NUM2TIMET for Bignum

Bignums exceed the range of time_t (or long).
------------------------------------------------------------------------
r62183 | normal | 2018-02-04 04:59:21 +0900 (Sun, 04 Feb 2018) | 4 lines

thread.c: avoid FP in C-API time calculations

FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.
------------------------------------------------------------------------
r62182 | normal | 2018-02-04 04:59:16 +0900 (Sun, 04 Feb 2018) | 6 lines

thread.c: avoid FP for Thread#join

FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.

Convert to use timeval_* functions for now.
------------------------------------------------------------------------
r62181 | normal | 2018-02-04 04:59:11 +0900 (Sun, 04 Feb 2018) | 3 lines

thread.c: extract timeval_sub from timeval_update_expire

It can be useful on its own.
------------------------------------------------------------------------
r62180 | svn | 2018-02-04 04:59:06 +0900 (Sun, 04 Feb 2018) | 1 line

* 2018-02-04
------------------------------------------------------------------------
r62179 | normal | 2018-02-04 04:59:05 +0900 (Sun, 04 Feb 2018) | 4 lines

thread.c (rb_thread_terminate_all): eliminate double2timeval call

No point for a fixed 1s value, and I plan on eliminating double
timeouts from internal API.
------------------------------------------------------------------------
r62178 | nobu | 2018-02-03 16:30:39 +0900 (Sat, 03 Feb 2018) | 3 lines

parse.y: named backslash

* parse.y: named backslash to show unexpected character.
------------------------------------------------------------------------
r62177 | normal | 2018-02-03 16:25:21 +0900 (Sat, 03 Feb 2018) | 4 lines

compile.c: fix string Range optimization with FSL

The optimization in [Feature #13355] needs to be detected
differently to work with "frozen_string_literal: true"
------------------------------------------------------------------------
r62176 | nobu | 2018-02-03 16:21:58 +0900 (Sat, 03 Feb 2018) | 1 line

parse.y: use lex_goto_eol to skip to EOL
------------------------------------------------------------------------
r62175 | nobu | 2018-02-03 12:50:28 +0900 (Sat, 03 Feb 2018) | 4 lines

process.c: command_name encoding

* process.c (rb_exec_fillarg): share subsequence of argv_buf for
  command_name, and copy the encoding from the command string.
------------------------------------------------------------------------
r62170 | nobu | 2018-02-03 10:57:00 +0900 (Sat, 03 Feb 2018) | 1 line

backward.h: adjusted NORETURN declaration
------------------------------------------------------------------------
r62169 | nobu | 2018-02-03 08:25:42 +0900 (Sat, 03 Feb 2018) | 1 line

eval.c: get rid of format-zero-length warning
------------------------------------------------------------------------
r62168 | nobu | 2018-02-03 01:44:22 +0900 (Sat, 03 Feb 2018) | 1 line

test_system.rb: tests without shell
------------------------------------------------------------------------
r62167 | nobu | 2018-02-03 01:39:16 +0900 (Sat, 03 Feb 2018) | 1 line

test_system.rb: exit by abort for portability
------------------------------------------------------------------------
r62166 | nobu | 2018-02-03 01:14:21 +0900 (Sat, 03 Feb 2018) | 1 line

process.c: split pst_message_status from pst_message
------------------------------------------------------------------------
r62165 | nobu | 2018-02-03 01:10:17 +0900 (Sat, 03 Feb 2018) | 1 line

process.c: reduce intermediate string
------------------------------------------------------------------------
r62164 | nobu | 2018-02-03 01:02:03 +0900 (Sat, 03 Feb 2018) | 1 line

backward.h: rb_mod_const_missing is internal function
------------------------------------------------------------------------
r62163 | svn | 2018-02-03 00:16:23 +0900 (Sat, 03 Feb 2018) | 1 line

* 2018-02-03
------------------------------------------------------------------------
r62162 | nobu | 2018-02-03 00:16:22 +0900 (Sat, 03 Feb 2018) | 4 lines

eval.c: unnecessary argument

* eval.c (rb_interrupt): removed unnecessary convertsion specifier
  and an empty string.
------------------------------------------------------------------------
r62161 | nobu | 2018-02-02 22:29:23 +0900 (Fri, 02 Feb 2018) | 1 line

variable.c: removed old warning
------------------------------------------------------------------------
r62160 | kazu | 2018-02-02 20:21:12 +0900 (Fri, 02 Feb 2018) | 3 lines

Fix test

Followup to r62158
------------------------------------------------------------------------
r62159 | kazu | 2018-02-02 20:03:23 +0900 (Fri, 02 Feb 2018) | 5 lines

Fix call-seq of NameError.new

`NameError.new(1,2,3)` raises
`wrong number of arguments (given 2, expected 0..1) (ArgumentError)`
in `StrandardError#initialize`, so NameError can't accept 3 or more arguments.
------------------------------------------------------------------------
r62158 | kazu | 2018-02-02 20:03:22 +0900 (Fri, 02 Feb 2018) | 4 lines

Use more verbose status in error messages

of `system` with `exception: true` like `Process::Status#inspect`
[Feature #14386] [ruby-core:85013]
------------------------------------------------------------------------
r62157 | nobu | 2018-02-02 17:30:57 +0900 (Fri, 02 Feb 2018) | 4 lines

io.c: unused assignments

* io.c (fptr_finalize_flush): removed unused assignments.  if
  noraise, err is never used after set.
------------------------------------------------------------------------
r62156 | svn | 2018-02-02 14:44:14 +0900 (Fri, 02 Feb 2018) | 1 line

* 2018-02-02
------------------------------------------------------------------------
r62155 | nobu | 2018-02-02 14:44:13 +0900 (Fri, 02 Feb 2018) | 1 line

io.c: hoisted out io_fd_check_closed
------------------------------------------------------------------------
r62154 | normal | 2018-02-01 18:20:38 +0900 (Thu, 01 Feb 2018) | 5 lines

array.c: remove rb_ary_frozen_p / Array#frozen?

This is redundant since r15206 /
ffe425ecaaa2a3f813e1d540e20e2179bce44302 as we no longer lock
the array during sort.  Instead, fall back to Object#frozen?
------------------------------------------------------------------------
r62153 | hsbt | 2018-02-01 18:07:16 +0900 (Thu, 01 Feb 2018) | 4 lines

Add test for Forwardable#def_delegator with r55366.

  Patch by @aycabta
  [Bug #12837][ruby-core:77611]
------------------------------------------------------------------------
r62152 | normal | 2018-02-01 17:59:27 +0900 (Thu, 01 Feb 2018) | 11 lines

ccan/list: sync with upstream

This brings us up-to-date with ccan/list
5dbd87b876434dd703dfcc30cb0503118aac2076
git://git.ozlabs.org/~ccan/ccan

This is a combination of 3 commits from ccan:

    list: add parens to gaurd macro args in LIST_INIT
    ccan/list: Add list_empty_nocheck
    list: trivial: fix typos in list_for_each_off's documentation
------------------------------------------------------------------------
r62151 | nobu | 2018-02-01 12:55:55 +0900 (Thu, 01 Feb 2018) | 6 lines

ruby.h: relax rb_funcall(obj, id, 0, 0) case only

* include/ruby/ruby.h (rb_varargs_argc_valid_p): relax rb_funcall
  check on extra args only if argc == 0, for the compatibility
  with wrong code which is probably confused with rb_funcallv.
  [Bug #14425]
------------------------------------------------------------------------
r62150 | nobu | 2018-02-01 11:56:28 +0900 (Thu, 01 Feb 2018) | 4 lines

win32.c: EPIPE for ERROR_NO_DATA

* win32/win32.c (rb_w32_write): writing to closed pipe fails with
  ERROR_NO_DATA but msvcrt maps it to EINVAL.  map it to EPIPE.
------------------------------------------------------------------------
r62149 | hsbt | 2018-02-01 09:25:18 +0900 (Thu, 01 Feb 2018) | 1 line

Fixed duplicated typo for `the the`.
------------------------------------------------------------------------
r62147 | nobu | 2018-02-01 02:35:27 +0900 (Thu, 01 Feb 2018) | 1 line

io.c: fix comparison subject
------------------------------------------------------------------------
r62146 | svn | 2018-02-01 02:26:21 +0900 (Thu, 01 Feb 2018) | 1 line

* 2018-02-01
------------------------------------------------------------------------
r62145 | nobu | 2018-02-01 02:26:20 +0900 (Thu, 01 Feb 2018) | 4 lines

io.c: fix fptr_copy_finalizer

* io.c (fptr_copy_finalizer): fix inverted condition.  if
  finalizer does not change, pipe_list should not change too.
------------------------------------------------------------------------
r62123 | nobu | 2018-01-31 17:17:16 +0900 (Wed, 31 Jan 2018) | 5 lines

io.c: fptr_copy_finalizer

* io.c (fptr_copy_finalizer): remove fptr from pipe_list when pipe
  became ordinary file, to fix access after free.  to be finalized
  by pipe_finalize and being in pipe_list must match.
------------------------------------------------------------------------
r62122 | hsbt | 2018-01-31 15:41:10 +0900 (Wed, 31 Jan 2018) | 1 line

Update csv maintainers.
------------------------------------------------------------------------
r62121 | nobu | 2018-01-31 13:24:57 +0900 (Wed, 31 Jan 2018) | 4 lines

io.c: pipe_register_fptr

* io.c (pipe_register_fptr): get rid of double registration which
  causes access after free and segfault.
------------------------------------------------------------------------
r62120 | nobu | 2018-01-31 13:02:18 +0900 (Wed, 31 Jan 2018) | 4 lines

io.c: simplified pipe_del_fptr

* io.c (pipe_del_fptr): merged code for the case fptr is first to
  the loop for the rest.
------------------------------------------------------------------------
r62119 | nobu | 2018-01-31 13:02:17 +0900 (Wed, 31 Jan 2018) | 1 line

trick ruby-mode.el by heredocs
------------------------------------------------------------------------
r62118 | kazu | 2018-01-31 09:19:33 +0900 (Wed, 31 Jan 2018) | 1 line

Fix wrong function names in rb_bug messages [ci skip]
------------------------------------------------------------------------
r62117 | svn | 2018-01-31 08:55:50 +0900 (Wed, 31 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62116 | normal | 2018-01-31 08:55:49 +0900 (Wed, 31 Jan 2018) | 12 lines

ruby.h: relax rb_funcall check on extra args for clang

clang 5.+ (tested clang 7.0.0) seems to be attempting division-by-zero
and giving a very large number for static args to rb_funcall.

* include/ruby/ruby.h (rb_varargs_bad_length): relax check for clang
* ext/-test-/funcall/funcall.c: renamed from passing_block.c
  define extra_args_name function
* test/-ext-/funcall/test_funcall.rb: new test
  [ruby-core:85266] [Bug #14425]

From: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r62115 | normal | 2018-01-31 04:35:12 +0900 (Wed, 31 Jan 2018) | 6 lines

proc: fix super_method segfault after bind

* proc.c: handle undefined iclass
  [ruby-core:85231] [Bug #14421]

From: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r62114 | svn | 2018-01-31 03:32:41 +0900 (Wed, 31 Jan 2018) | 1 line

* 2018-01-31
------------------------------------------------------------------------
r62113 | normal | 2018-01-31 03:32:40 +0900 (Wed, 31 Jan 2018) | 8 lines

net/http: fix documentation for HTTP connection reuse

Thanks to Paul Kuruvilla <rohitpaulk@gmail.com> for the patch

* lib/net/http.rb: fix documentation for HTTP connection reuse
  [ruby-core:84815] [Bug #14349]

From: Paul Kuruvilla <rohitpaulk@gmail.com>
------------------------------------------------------------------------
r62112 | kazu | 2018-01-30 21:13:47 +0900 (Tue, 30 Jan 2018) | 2 lines

Remove empty directories [ci skip]

------------------------------------------------------------------------
r62111 | usa | 2018-01-30 21:03:28 +0900 (Tue, 30 Jan 2018) | 5 lines

simply show BASERUBY itself

* common.mk (showflags): simply show `BASERUBY` itself, because nmake does not
  supports backquote notation.

------------------------------------------------------------------------
r62110 | nobu | 2018-01-30 20:12:21 +0900 (Tue, 30 Jan 2018) | 4 lines

setup.mak: discard BASERUBY output

* win32/setup.mak: discard output from BASERUBY command, even if
  it contains multiple commands.
------------------------------------------------------------------------
r62109 | naruse | 2018-01-30 16:34:06 +0900 (Tue, 30 Jan 2018) | 1 line

support ruby 1.9.3
------------------------------------------------------------------------
r62108 | hsbt | 2018-01-30 16:08:53 +0900 (Tue, 30 Jan 2018) | 3 lines

[DOC] Refinements on modules are allowed

From: Leo Correa <lcorr005@gmail.com>
------------------------------------------------------------------------
r62107 | nobu | 2018-01-30 14:48:28 +0900 (Tue, 30 Jan 2018) | 6 lines

force fixable

* complex.c (nucomp_hash): force hash values fixable.
  [ruby-core:85224] [Bug #14420]

* rational.c (nurat_hash): ditto.
------------------------------------------------------------------------
r62106 | hsbt | 2018-01-30 14:43:42 +0900 (Tue, 30 Jan 2018) | 17 lines

ia64: update ia64-specific code to use execution context

This change follows commit 837fd5e494731d7d44786f29e7d6e8c27029806f
in '#ifdef __ia64' branches.

Noticed as a build failure by John Paul Adrian Glaubitz:

```
  cont.c:502:50: error: 'rb_thread_t {aka struct rb_thread_struct}'
    has no member named 'machine'
       size = cont->machine.register_stack_size =
           th->machine.register_stack_end - th->machine.register_stack_start;
               ^~
```

The change is trivial: update 'th->machine' usage to 'th->ec->machine'.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
------------------------------------------------------------------------
r62105 | nobu | 2018-01-30 13:17:32 +0900 (Tue, 30 Jan 2018) | 1 line

vcs.rb: checkout the current branch before rebase
------------------------------------------------------------------------
r62104 | nobu | 2018-01-30 12:57:54 +0900 (Tue, 30 Jan 2018) | 1 line

common.mk: added minimum dependencies of incs
------------------------------------------------------------------------
r62103 | nobu | 2018-01-30 12:21:52 +0900 (Tue, 30 Jan 2018) | 8 lines

bare_instructions.rb: sp_inc is signed

* tool/ruby_vm/models/bare_instructions.rb (predefine_attributes):
  `sp_inc` attribute which may return negative values must be
  signed `rb_snum_t`, to be signed-expanded at type promotion.

* vm_insnhelper.h (ADJ_SP): removed the workaround for platforms
  where rb_num_t is wider than int.
------------------------------------------------------------------------
r62102 | ko1 | 2018-01-30 11:21:59 +0900 (Tue, 30 Jan 2018) | 1 line

skip EINVAL on unsupported platform
------------------------------------------------------------------------
r62101 | nobu | 2018-01-30 11:20:02 +0900 (Tue, 30 Jan 2018) | 5 lines

vcs.rb: fix errors

* tool/vcs.rb (DebugSystem#system): fix undefined local variable
  error.  as system doesn't accept `exception:` option before 2.6,
  remove it from `opts`.
------------------------------------------------------------------------
r62100 | nobu | 2018-01-30 11:08:30 +0900 (Tue, 30 Jan 2018) | 3 lines

iseq.c: internal lvar name

* iseq.c (local_var_name): name internal local variables as `?N`.
------------------------------------------------------------------------
r62099 | normal | 2018-01-30 09:22:22 +0900 (Tue, 30 Jan 2018) | 7 lines

net/pop: make modified strings mutable

Thanks to Michael Zimmerman for the bug report

* lib/net/pop.rb: make modified strings mutable
  [ruby-core:85210] [Bug #14416]
* test/net/pop/test_pop.rb: new test
------------------------------------------------------------------------
r62098 | naruse | 2018-01-30 02:12:07 +0900 (Tue, 30 Jan 2018) | 1 line

show BASERUBY's version on `make showflags`
------------------------------------------------------------------------
r62097 | naruse | 2018-01-30 02:05:41 +0900 (Tue, 30 Jan 2018) | 1 line

Suport ruby 1.9.3
------------------------------------------------------------------------
r62094 | eregon | 2018-01-30 01:08:16 +0900 (Tue, 30 Jan 2018) | 1 line

Update to ruby/spec@83063a3
------------------------------------------------------------------------
r62093 | svn | 2018-01-30 01:07:36 +0900 (Tue, 30 Jan 2018) | 1 line

* 2018-01-30
------------------------------------------------------------------------
r62092 | eregon | 2018-01-30 01:07:35 +0900 (Tue, 30 Jan 2018) | 1 line

Update to ruby/mspec@5d49a6c
------------------------------------------------------------------------
r62091 | mame | 2018-01-29 17:40:22 +0900 (Mon, 29 Jan 2018) | 8 lines

string.c (rb_str_format_m): Fix the example code of the doc

Change `%08x` to `%016x` because of two reasons:

* `%016x` demonstrates that we can use two or more digits here.
* Currently, many people uses 64-bit environment.
  (I'm unsure if object_id is a good example here, though...)
I'm unsure if
------------------------------------------------------------------------
r62090 | shyouhei | 2018-01-29 17:11:02 +0900 (Mon, 29 Jan 2018) | 2 lines

redefinition of a typedef is a C11ism

------------------------------------------------------------------------
r62089 | shyouhei | 2018-01-29 16:15:08 +0900 (Mon, 29 Jan 2018) | 66 lines

eliminate CALL_SIMPLE_METHOD

Arrange operands of several opt_something insns so that jumps to
opt_send_without_block can be applied to them. This makes it
possible to eliminate CALL_SIMPLE_METHOD macro at all.  Results
in binary size of vm_exec_core to change from 27,008 bytes to
26,016 bytes on my machine. [close GH-1779]

Note however that PC can point somewhere non-instruction now.

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.450  0.426
so_array         0.789  0.824
so_binary_trees  5.760  5.635
so_concatenate   3.594  3.508
so_count_words   0.211  0.196
so_exception     0.256  0.244
so_fannkuch      1.049  1.044
so_fasta         1.485  1.472
so_k_nucleotide  1.195  1.216
so_lists         0.517  0.513
so_mandelbrot    2.264  2.394
so_matrix        0.501  0.468
so_meteor_contest        2.987  2.912
so_nbody         1.307  1.289
so_nested_loop   0.908  0.925
so_nsieve        1.679  1.614
so_nsieve_bits   2.131  2.092
so_object        0.620  0.625
so_partial_sums  1.623  1.675
so_pidigits      1.135  1.190
so_random        0.357  0.321
so_reverse_complement    0.619  0.583
so_sieve         0.493  0.496
so_spectralnorm  1.749  1.737

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.057
so_array        0.958
so_binary_trees 1.022
so_concatenate  1.024
so_count_words  1.077
so_exception    1.049
so_fannkuch     1.004
so_fasta        1.009
so_k_nucleotide 0.983
so_lists        1.007
so_mandelbrot   0.946
so_matrix       1.072
so_meteor_contest       1.026
so_nbody        1.013
so_nested_loop  0.982
so_nsieve       1.040
so_nsieve_bits  1.018
so_object       0.992
so_partial_sums 0.969
so_pidigits     0.954
so_random       1.111
so_reverse_complement   1.062
so_sieve        0.994
so_spectralnorm 1.007
------------------------------------------------------------------------
r62088 | shyouhei | 2018-01-29 16:04:50 +0900 (Mon, 29 Jan 2018) | 66 lines

s/CALL_SIMPLE_METHOD/DISPATCH_ORIGINAL_INSN/

Now that DISPATCH_ORIGINAL_INSN is introduced, we can replace
CALL_SIMPLE_METHOD with DISPATCH_ORIGINAL_INSN. These two macros
differ in size very much and results in this big difference in
compiled binary size. This changeset reduces the size of
vm_exec_core from 32,352 bytes to 27,008 bytes on my machine.  As
a result it yields slightly better performance.
Closes [GH-1779].

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.484  0.454
so_array         0.837  0.779
so_binary_trees  5.928  5.801
so_concatenate   3.473  3.543
so_count_words   0.201  0.222
so_exception     0.255  0.252
so_fannkuch      1.080  1.019
so_fasta         1.459  1.463
so_k_nucleotide  1.218  1.180
so_lists         0.499  0.484
so_mandelbrot    2.189  2.324
so_matrix        0.510  0.496
so_meteor_contest        3.025  2.925
so_nbody         1.319  1.273
so_nested_loop   0.941  0.932
so_nsieve        1.806  1.647
so_nsieve_bits   2.151  2.078
so_object        0.632  0.621
so_partial_sums  1.560  1.632
so_pidigits      1.190  1.183
so_random        0.333  0.353
so_reverse_complement    0.604  0.586
so_sieve         0.521  0.481
so_spectralnorm  1.774  1.722

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.065
so_array        1.075
so_binary_trees 1.022
so_concatenate  0.980
so_count_words  0.903
so_exception    1.009
so_fannkuch     1.059
so_fasta        0.997
so_k_nucleotide 1.032
so_lists        1.032
so_mandelbrot   0.942
so_matrix       1.028
so_meteor_contest       1.034
so_nbody        1.036
so_nested_loop  1.009
so_nsieve       1.097
so_nsieve_bits  1.035
so_object       1.018
so_partial_sums 0.956
so_pidigits     1.006
so_random       0.943
so_reverse_complement   1.032
so_sieve        1.083
so_spectralnorm 1.030
------------------------------------------------------------------------
r62087 | shyouhei | 2018-01-29 15:56:56 +0900 (Mon, 29 Jan 2018) | 32 lines

also use sp_inc in vm core

Now that sp_inc attributes are officially provided as inline
functions. Why not use them directly from the vm core, not just
by the compiler. By doing so, it is now possible for us to
optimize stack manipulations. We can now know exactly how many
words of stack space an instruction consumes before it actually
does. This changeset deletes some lines from insns.def because
they are no longer needed.  As a result it reduces the size of
vm_exec_core function from 32,400 bytes to 32,352 bytes on my
machine.

It seems it does not affect performance:

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
loop_for         1.093  1.061
loop_generator   1.156  1.152
loop_times       0.982  0.974
loop_whileloop   0.549  0.587
loop_whileloop2  0.115  0.121

Speedup ratio: compare with the result of `before' (greater is better)
name    after
loop_for        1.030
loop_generator  1.003
loop_times      1.008
loop_whileloop  0.935
loop_whileloop2 0.949
------------------------------------------------------------------------
r62086 | nobu | 2018-01-29 15:54:22 +0900 (Mon, 29 Jan 2018) | 6 lines

ruby.c: no VARIABLE_LIBPATH

* ruby.c (ruby_init_loadpath_safe): removed code using fixed size
  path buffer.  relative load path is supported only on platforms
  where dladdr is available, or on Windows, so !VARIABLE_LIBPATH
  code is not used.
------------------------------------------------------------------------
r62085 | shyouhei | 2018-01-29 15:47:05 +0900 (Mon, 29 Jan 2018) | 6 lines

extensive use of instruction attributes

Instead of using magic numbers, let us define a series of attributes
and use them from the VM core.  Proper function declarations makes
these attributes inlined in most modern compilers.  On my machine
exact same binary is generated with or without this changeset.
------------------------------------------------------------------------
r62084 | svn | 2018-01-29 06:57:39 +0900 (Mon, 29 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62083 | normal | 2018-01-29 06:57:38 +0900 (Mon, 29 Jan 2018) | 8 lines

doc/signals.rdoc: new document work-in-progress

We need a longer document to inform users of caveats
related to Signal.trap usage.  This is still incomplete,
and we can fill in and edit other bits as needed.

* doc/signals.rdoc: new document
  [ruby-core:85107] [Misc #14222]
------------------------------------------------------------------------
r62082 | svn | 2018-01-29 06:07:14 +0900 (Mon, 29 Jan 2018) | 1 line

* 2018-01-29
------------------------------------------------------------------------
r62081 | normal | 2018-01-29 06:07:13 +0900 (Mon, 29 Jan 2018) | 23 lines

uri/common: reduce allocations and retained objects

Thanks to Sam Saffron for this patch, it shows
a nice reduction which affects many web applications:

  require 'memory_profiler'

  MemoryProfiler.report do
    require 'uri'
  end.pretty_print

Before:

Total allocated: 986643 bytes (15159 objects)
Total retained:  246370 bytes (2532 objects)

After:

Total allocated: 926903 bytes (13665 objects)
Total retained:  208570 bytes (1587 objects)

* lib/uri/common.rb: reduce allocations and retained objects
  [ruby-core:85161] [Feature #14410]
------------------------------------------------------------------------
r62080 | nobu | 2018-01-28 23:16:48 +0900 (Sun, 28 Jan 2018) | 1 line

method.h: VM_METHOD_TYPE_MINIMUM_BITS
------------------------------------------------------------------------
r62079 | nobu | 2018-01-28 23:05:39 +0900 (Sun, 28 Jan 2018) | 1 line

parse.y (parser_append_options): shorter alias LOC
------------------------------------------------------------------------
r62078 | nobu | 2018-01-28 19:35:28 +0900 (Sun, 28 Jan 2018) | 4 lines

method.h: BITFIELD in rb_method_definition_t

* method.h (rb_method_definition_struct): use BITFIELD for
  rb_method_type_t.
------------------------------------------------------------------------
r62077 | normal | 2018-01-28 06:04:42 +0900 (Sun, 28 Jan 2018) | 7 lines

internal.h: add BITFIELD macro to aid C99 users

I plan to use this macro to pack other enums in the VM.

* internal.h: add BITFIELD macro
* method.h: use BITFIELD for rb_method_visibility_t
  [ruby-core:85074] [Misc #14395]
------------------------------------------------------------------------
r62076 | svn | 2018-01-28 06:04:37 +0900 (Sun, 28 Jan 2018) | 1 line

* 2018-01-28
------------------------------------------------------------------------
r62075 | normal | 2018-01-28 06:04:36 +0900 (Sun, 28 Jan 2018) | 10 lines

vm_core: use "int" for living_thread_num

We treat this as "int" through the vm_living_thread_num API
anyways, and "pid_t" is still 32-bits with glibc on 64-bit
platforms.  I expect it'll be a long time before anybody needs
more than 2 billion native threads.  For now, let's save one
cacheline on x86-64 (as reported by pahole(1)):

	before:  size: 1288, cachelines: 21, members: 45
	 after:  size: 1280, cachelines: 20, members: 45
------------------------------------------------------------------------
r62074 | k0kubun | 2018-01-27 22:50:28 +0900 (Sat, 27 Jan 2018) | 3 lines

insns.def: [DOC] update supported attributes [ci skip]

which are changed at r62051.
------------------------------------------------------------------------
r62073 | nobu | 2018-01-27 19:41:43 +0900 (Sat, 27 Jan 2018) | 5 lines

compile.c: try to convert in massign `for`

* compile.c (compile_for_masgn): try to convert to an Array if an
  element of massign `for` is not an Array.
  [ruby-core:84931] [Bug #14374]
------------------------------------------------------------------------
r62072 | nobu | 2018-01-27 18:27:47 +0900 (Sat, 27 Jan 2018) | 4 lines

array.c: rb_check_to_array

* array.c (rb_check_to_array): conversion to array by to_a method.
  returns nil if not possible.
------------------------------------------------------------------------
r62071 | nobu | 2018-01-27 15:12:09 +0900 (Sat, 27 Jan 2018) | 7 lines

defined? returns nil for toplevel constant lookup

* variable.c (rb_const_defined_0): toplevel constant lookup has
  been removed, should return nil too.
  [ruby-core:85142] [Bug #14407] [Fix GH-1800]

From: Gonzalo <grzuy0@gmail.com>
------------------------------------------------------------------------
r62070 | nobu | 2018-01-27 15:11:23 +0900 (Sat, 27 Jan 2018) | 1 line

vcs.rb: prepend DebugSystem to VCS
------------------------------------------------------------------------
r62069 | nobu | 2018-01-27 14:35:47 +0900 (Sat, 27 Jan 2018) | 4 lines

vm_insnhelper.c: avoid intermediate array

* vm_insnhelper.c (vm_expandarray): get rid of creating
  intermediate Array object when conversion failed.
------------------------------------------------------------------------
r62068 | k0kubun | 2018-01-27 13:14:29 +0900 (Sat, 27 Jan 2018) | 6 lines

bare_instructions.rb: show class name on inspect

as it's helpful for debugging.

I'm not sure what's the good output for RubyVM::TraceInstructions, so I
left it as it is.
------------------------------------------------------------------------
r62067 | kazu | 2018-01-27 13:14:26 +0900 (Sat, 27 Jan 2018) | 4 lines

Fix duplicated HAVE_NAN

And remove redundant `HAVE_*` macros,
and use `USE_RB_*` macros instead.
------------------------------------------------------------------------
r62066 | k0kubun | 2018-01-27 11:14:20 +0900 (Sat, 27 Jan 2018) | 1 line

insns2vm.rb: add missing word to help
------------------------------------------------------------------------
r62065 | k0kubun | 2018-01-27 11:14:20 +0900 (Sat, 27 Jan 2018) | 5 lines

insns2vm.rb: make #generate_parser private

which is only used by #router.

To make it private, we need to stop defining them on top-level.
------------------------------------------------------------------------
r62064 | k0kubun | 2018-01-27 10:59:08 +0900 (Sat, 27 Jan 2018) | 12 lines

dumper.rb: stop getting --destdir option value

via current directory. It's kind of a global state and fragile to
implementation changes in other places, and how the `Dir.getwd` is set
is not obvious from just reading around `RubyVM::Dumper#initialize` if
it depends on the global state.

tool/ruby_vm/controllers/application_controller.rb: explicitly pass
destdir to RubyVM::Dumper.

tool/ruby_vm/scripts/insns2vm.rb: explicitly pass destdir parsed from
optparse.
------------------------------------------------------------------------
r62063 | k0kubun | 2018-01-27 10:28:21 +0900 (Sat, 27 Jan 2018) | 4 lines

win32/Makefile.sub: fix typo

Other places are using RT_VER. So I guess this is correct.
Currently AppVeyor CI is failing and I want to fix that.
------------------------------------------------------------------------
r62062 | svn | 2018-01-27 01:38:39 +0900 (Sat, 27 Jan 2018) | 1 line

* 2018-01-27
------------------------------------------------------------------------
r62061 | usa | 2018-01-27 01:38:38 +0900 (Sat, 27 Jan 2018) | 5 lines

need to declare the prototype of nan() if missing

* include/ruby/missing.h (nan): need to declare the prototype of nan() if
  missing.

------------------------------------------------------------------------
r62060 | nobu | 2018-01-26 22:38:00 +0900 (Fri, 26 Jan 2018) | 1 line

vcs.rb: old version cannot refine modules
------------------------------------------------------------------------
r62059 | nobu | 2018-01-26 22:34:09 +0900 (Fri, 26 Jan 2018) | 4 lines

vcs.rb: dcommit for each commit

svn to git bridge on ci.ruby-lang.org sometimes stalls when
dcommitting some commits at once.
------------------------------------------------------------------------
r62058 | nobu | 2018-01-26 22:27:56 +0900 (Fri, 26 Jan 2018) | 1 line

vcs.rb: debug print in system method
------------------------------------------------------------------------
r62057 | nobu | 2018-01-26 19:55:47 +0900 (Fri, 26 Jan 2018) | 7 lines

error.c: receiver kwarg

* error.c (name_err_initialize_options): NameError#initialize
  accepts receiver.  [Feature #14313]

* error.c (nometh_err_initialize_options): pass keyword arguments
  to the super method.
------------------------------------------------------------------------
r62056 | nobu | 2018-01-26 19:55:46 +0900 (Fri, 26 Jan 2018) | 4 lines

test_exception.rb: NameError.new NoMethodError.new

* test/ruby/test_exception.rb: added tests for NameError.new, and
  NoMethodError.new including priv argument.
------------------------------------------------------------------------
r62055 | nobu | 2018-01-26 19:55:45 +0900 (Fri, 26 Jan 2018) | 4 lines

error.c: [DOC] NoMethodError.new [ci skip]

* error.c (nometh_err_initialize): [RDOC] added missing optional
  argument priv.
------------------------------------------------------------------------
r62054 | nobu | 2018-01-26 19:55:45 +0900 (Fri, 26 Jan 2018) | 5 lines

error.c: copy keyword arguments

* error.c (rb_key_err_new): pass arguments all arguments to the
  super method, except for keyword arguments copied to instance
  variables.  [Feature #14313]
------------------------------------------------------------------------
r62053 | nobu | 2018-01-26 15:41:13 +0900 (Fri, 26 Jan 2018) | 5 lines

error.c: KeyError missing keyword arguments

* error.c (key_err_initialize): leave attributes for missing
  keyword arguments unset, so accessors can tell if it is missing
  or explicit nil.  [Feature #14313]
------------------------------------------------------------------------
r62052 | shyouhei | 2018-01-26 15:30:59 +0900 (Fri, 26 Jan 2018) | 5 lines

treat PC for gc events

ADD_PCs moved. That didn't change vast majority of event hooks
because vm_traece() has been placed before ADD_PC. However for GC
events the situation is different. We have to take care.
------------------------------------------------------------------------
r62051 | shyouhei | 2018-01-26 15:30:58 +0900 (Fri, 26 Jan 2018) | 66 lines

move ADD_PC around to optimize PC manipluiations

This commit introduces new attribute handles_flame and if that is
_not_ the case, places ADD_PC right after INC_SP.  This improves
locality of PC manipulations to prevents unnecessary register spill-
outs. As a result, it reduces the size of vm_exec_core from 32,688
bytes to 32,384 bytes on my machine.

Speedup is very faint, but certain.

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.476  0.464
so_array         0.742  0.728
so_binary_trees  5.493  5.466
so_concatenate   3.619  3.395
so_count_words   0.190  0.184
so_exception     0.249  0.239
so_fannkuch      0.994  0.953
so_fasta         1.369  1.374
so_k_nucleotide  1.111  1.111
so_lists         0.470  0.481
so_mandelbrot    2.059  2.050
so_matrix        0.466  0.465
so_meteor_contest        2.712  2.781
so_nbody         1.154  1.204
so_nested_loop   0.852  0.846
so_nsieve        1.636  1.623
so_nsieve_bits   2.073  2.039
so_object        0.616  0.584
so_partial_sums  1.464  1.481
so_pidigits      1.075  1.082
so_random        0.321  0.317
so_reverse_complement    0.555  0.558
so_sieve         0.495  0.490
so_spectralnorm  1.634  1.627

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.025
so_array        1.019
so_binary_trees 1.005
so_concatenate  1.066
so_count_words  1.030
so_exception    1.040
so_fannkuch     1.043
so_fasta        0.996
so_k_nucleotide 1.000
so_lists        0.978
so_mandelbrot   1.004
so_matrix       1.001
so_meteor_contest       0.975
so_nbody        0.959
so_nested_loop  1.007
so_nsieve       1.008
so_nsieve_bits  1.017
so_object       1.056
so_partial_sums 0.989
so_pidigits     0.994
so_random       1.014
so_reverse_complement   0.996
so_sieve        1.010
so_spectralnorm 1.004
------------------------------------------------------------------------
r62050 | nobu | 2018-01-26 14:34:18 +0900 (Fri, 26 Jan 2018) | 2 lines

error.c: use already initialized IDs
[Feature #14313]
------------------------------------------------------------------------
r62049 | kou | 2018-01-26 13:51:14 +0900 (Fri, 26 Jan 2018) | 3 lines

KeyError#initialize accepts receiver and key.
[Feature #14313][ruby-core:84626]

------------------------------------------------------------------------
r62048 | hsbt | 2018-01-26 12:54:55 +0900 (Fri, 26 Jan 2018) | 5 lines

Removed workaround Travis CI.

  Revert r61209, r61210

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62047 | nobu | 2018-01-26 12:41:04 +0900 (Fri, 26 Jan 2018) | 1 line

optparse.rb: froze string literals
------------------------------------------------------------------------
r62046 | nobu | 2018-01-26 12:13:33 +0900 (Fri, 26 Jan 2018) | 1 line

ignore external library sources [ci skip]
------------------------------------------------------------------------
r62045 | nobu | 2018-01-26 12:13:32 +0900 (Fri, 26 Jan 2018) | 1 line

ext/psych/.gitignore: removed stale file [ci skip]
------------------------------------------------------------------------
r62044 | mrkn | 2018-01-26 11:01:47 +0900 (Fri, 26 Jan 2018) | 3 lines

Fix rubyspec against the change in Hash#transform_keys!

[Bug #14380] [ruby-core:84951]
------------------------------------------------------------------------
r62043 | svn | 2018-01-26 10:33:46 +0900 (Fri, 26 Jan 2018) | 1 line

* 2018-01-26
------------------------------------------------------------------------
r62042 | mrkn | 2018-01-26 10:33:45 +0900 (Fri, 26 Jan 2018) | 8 lines

hash.c: support key swapping in Hash#transform_keys!

* hash.c (rb_hash_transform_keys_bang): support key swapping in
  Hash#transform_keys!
  [Bug #14380] [ruby-core:84951]

* test/ruby/test_hash.rb (test_transform_keys_bang):
  add assertions for this change
------------------------------------------------------------------------
r62041 | nobu | 2018-01-25 22:22:36 +0900 (Thu, 25 Jan 2018) | 5 lines

compile.c: check mid

* compile.c (iseq_peephole_optimize): check that method ID is +@.
  fix up r62039.
  http://d.hatena.ne.jp/nagachika/20180125/ruby_trunk_changes_62025_62039#r62039
------------------------------------------------------------------------
r62040 | nobu | 2018-01-25 22:10:14 +0900 (Thu, 25 Jan 2018) | 5 lines

string.c: clear substring code range

* string.c (str_substr): substring of broken code range string may
  be valid or broken.  patch by tommy (Masahiro Tomita) at
  [ruby-dev:50430] [Bug #14388].
------------------------------------------------------------------------
r62039 | nobu | 2018-01-25 21:00:00 +0900 (Thu, 25 Jan 2018) | 4 lines

compile.c: unnecessary freezing

* compile.c (iseq_peephole_optimize): get rid of freezing
  dynamically created string to be duplicated immediately.
------------------------------------------------------------------------
r62038 | nobu | 2018-01-25 20:21:47 +0900 (Thu, 25 Jan 2018) | 4 lines

openssl/buffering.rb: no RS when output

* ext/openssl/lib/openssl/buffering.rb (do_write, puts): output
  methods should not be affected by the input record separator.
------------------------------------------------------------------------
r62037 | eregon | 2018-01-25 18:50:41 +0900 (Thu, 25 Jan 2018) | 1 line

Group related File.umask specs together
------------------------------------------------------------------------
r62036 | eregon | 2018-01-25 18:50:29 +0900 (Thu, 25 Jan 2018) | 5 lines

Remove specs trying arbitrary values for chmod and umask

* Instead assert that too large values raise RangeError.
* [Bug #14375] [ruby-core:84933]
* See https://github.com/ruby/ruby/pull/1797
------------------------------------------------------------------------
r62035 | nobu | 2018-01-25 10:48:41 +0900 (Thu, 25 Jan 2018) | 5 lines

optparse.rb: literal newline

* lib/optparse.rb (OptionParser#summarize): use literal newline to
  join option summaries as IO#puts does, not the special gloval
  variable $/.
------------------------------------------------------------------------
r62034 | ko1 | 2018-01-25 09:42:08 +0900 (Thu, 25 Jan 2018) | 1 line

revert r62032 because it refers to a undefined variable
------------------------------------------------------------------------
r62033 | kazu | 2018-01-25 09:11:52 +0900 (Thu, 25 Jan 2018) | 4 lines

.editorconfig: Use spaces instead of tab except Makefiles

ref [Bug #14246]
[ci skip]
------------------------------------------------------------------------
r62032 | nobu | 2018-01-25 08:17:20 +0900 (Thu, 25 Jan 2018) | 5 lines

optparse.rb: literal newline

* lib/optparse.rb (OptionParser#summarize): use literal newline to
  join option summaries as IO#puts does, not the special gloval
  variable $/.
------------------------------------------------------------------------
r62031 | normal | 2018-01-25 07:40:01 +0900 (Thu, 25 Jan 2018) | 4 lines

vm.c: remove unnecessary branch

th->altstack is never NULL, and even if it were, POSIX
stipulates free(3) on NULL to be a no-op.
------------------------------------------------------------------------
r62030 | normal | 2018-01-25 07:39:56 +0900 (Thu, 25 Jan 2018) | 4 lines

load.c: use fstring instead of OBJ_FREEZE

These strings already exist (or will exist soon) in the fstring
table, so avoid the duplicate, sooner.
------------------------------------------------------------------------
r62029 | normal | 2018-01-25 06:07:14 +0900 (Thu, 25 Jan 2018) | 38 lines

ruby/ruby.h: remove unnecessary exports from C-API

Needlessly exporting can reduce performance locally and increase
binary size.

Increasing the footprint of our C-API larger is also detrimental
to our development as it encourages tighter coupling with our
internals; making it harder for us to preserve compatibility.

If some parts of the core codebase needs access to globals,
internal.h should be used instead of anything in include/ruby/*.

"Urabe, Shyouhei" <shyouhei@ruby-lang.org> wrote:
> On Thu, Jan 18, 2018 at 7:33 PM, Eric Wong <normalperson@yhbt.net> wrote:
> > shyouhei@ruby-lang.org wrote:
> >>   https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61908
> >>
> >>     export rb_mFConst
> >
> > Why are we exporting all these and making the public C-API bigger?
> > If anything, we should make these static.  Thanks.
>
> No concrete reason, except they have already been externed in 2.5.
> These variables had lacked declarations so far, which resulted in their
> visibility to be that of extern. The commit is just confirming the status quo.
>
> I'm not against to turn them into static.

This reverts changes from r61910, r61909, r61908, r61907, and r61906.

* transcode.c (rb_eUndefinedConversionError): make static
  (rb_eInvalidByteSequenceError): ditto
  (rb_eConverterNotFoundError): ditto
* process.c (rb_mProcGID, rb_mProcUid, rb_mProcID_Syscall): ditto
* file.c (rb_mFConst): ditto
* error.c (rb_mWarning, rb_cWarningBuffer): ditto
* enumerator.c (rb_cLazy): ditto
  [Misc #14381]
------------------------------------------------------------------------
r62028 | svn | 2018-01-25 05:50:30 +0900 (Thu, 25 Jan 2018) | 1 line

* 2018-01-25
------------------------------------------------------------------------
r62027 | normal | 2018-01-25 05:50:29 +0900 (Thu, 25 Jan 2018) | 1 line

ruby.c (open_load_file): avoid shadowing variable for errno
------------------------------------------------------------------------
r62026 | k0kubun | 2018-01-24 23:31:40 +0900 (Wed, 24 Jan 2018) | 3 lines

system_spec.rb: add RubySpec for r62025

NEWS: added an entry for `exception: true` option.
------------------------------------------------------------------------
r62025 | k0kubun | 2018-01-24 23:11:25 +0900 (Wed, 24 Jan 2018) | 5 lines

process.c: add :exception option to Kernel.#system

to raise error when it fails.

[Feature 14386] [GH-1795]
------------------------------------------------------------------------
r62024 | nobu | 2018-01-24 17:25:36 +0900 (Wed, 24 Jan 2018) | 5 lines

mkmf.rb: werror on mswin

* lib/mkmf.rb (MakeMakefile#try_ldflags): enable warning checking
  on mswin, link.exe warns -l options but does not fail.
  [Bug #13069]
------------------------------------------------------------------------
r62022 | nobu | 2018-01-24 16:15:55 +0900 (Wed, 24 Jan 2018) | 4 lines

dir.c: Dir#each_child

* dir.c (dir_each_child_m): new instance methods Dir#each_child
  and Dir#children.  [Feature #13969]
------------------------------------------------------------------------
r62021 | nobu | 2018-01-24 15:32:46 +0900 (Wed, 24 Jan 2018) | 1 line

NEWS: [Feature #14223] [ci skip]
------------------------------------------------------------------------
r62020 | nobu | 2018-01-24 15:25:02 +0900 (Wed, 24 Jan 2018) | 5 lines

vm_args.c: to_proc refinements

* vm_args.c (vm_to_proc): enable #to_proc by refinements at Proc
  passing as a block.  patched by osyo (manga osyo).
  [Feature #14223]
------------------------------------------------------------------------
r62019 | yui-knk | 2018-01-24 09:12:53 +0900 (Wed, 24 Jan 2018) | 1 line

Fix a typo
------------------------------------------------------------------------
r62018 | kazu | 2018-01-24 09:03:51 +0900 (Wed, 24 Jan 2018) | 4 lines

Add documentation for the Kernel#warn :uplevel keyword

[ruby-core:84574] [Bug #14264]
Author:    Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r62017 | nobu | 2018-01-24 00:31:22 +0900 (Wed, 24 Jan 2018) | 5 lines

init.c: encode socket error message

* ext/socket/init.c (rsock_raise_socket_error): on Windows, encode
  error messages from wide characters to the default encodings.
  [ruby-core:84972] [Bug #14384]
------------------------------------------------------------------------
r62016 | svn | 2018-01-24 00:31:22 +0900 (Wed, 24 Jan 2018) | 1 line

* 2018-01-24
------------------------------------------------------------------------
r62015 | nobu | 2018-01-24 00:31:21 +0900 (Wed, 24 Jan 2018) | 4 lines

getaddrinfo.c: ai_errlist

* ext/socket/getaddrinfo.c (ai_errlist): used only if gai_strerror
  is missing.
------------------------------------------------------------------------
r62014 | nobu | 2018-01-23 23:17:25 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: fix yytokentype function declarations
------------------------------------------------------------------------
r62013 | nobu | 2018-01-23 12:53:34 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: added implicit parser_params argument
------------------------------------------------------------------------
r62012 | nobu | 2018-01-23 12:37:21 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: added new_strterm wrapper
------------------------------------------------------------------------
r62011 | nobu | 2018-01-23 11:31:42 +0900 (Tue, 23 Jan 2018) | 3 lines

parse.y: concat dedented heredoc

* parse.y (heredoc_dedent): concat literal strings after dedented.
------------------------------------------------------------------------
r62010 | svn | 2018-01-23 11:23:19 +0900 (Tue, 23 Jan 2018) | 1 line

* 2018-01-23
------------------------------------------------------------------------
r62009 | nobu | 2018-01-23 11:23:18 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: removed implicit parser_params macros
------------------------------------------------------------------------
r62008 | kazu | 2018-01-22 22:09:37 +0900 (Mon, 22 Jan 2018) | 1 line

use predefined IDs
------------------------------------------------------------------------
r62007 | nobu | 2018-01-22 21:34:51 +0900 (Mon, 22 Jan 2018) | 4 lines

mkmf.rb: ignore linker warnings

* lib/mkmf.rb (try_ldflags): ignore linker warnings.  they cause
  unexpected failures on OpenBSD.  [ruby-core:78827] [Bug #13069]
------------------------------------------------------------------------
r62006 | normal | 2018-01-22 12:04:26 +0900 (Mon, 22 Jan 2018) | 4 lines

time.c (num_exact): use predefined IDs

No need to waste space on "to_r" and "to_int" which are
predefined in defs/id.def
------------------------------------------------------------------------
r62005 | normal | 2018-01-22 09:40:11 +0900 (Mon, 22 Jan 2018) | 4 lines

time.c: constify compat_* tables

compat_common_month_table and compat_leap_month_table should
not be writable.
------------------------------------------------------------------------
r62004 | svn | 2018-01-22 00:26:20 +0900 (Mon, 22 Jan 2018) | 1 line

* 2018-01-22
------------------------------------------------------------------------
r62003 | nobu | 2018-01-22 00:26:20 +0900 (Mon, 22 Jan 2018) | 1 line

parse.y: expand tokp macro
------------------------------------------------------------------------
r62002 | nobu | 2018-01-22 00:26:19 +0900 (Mon, 22 Jan 2018) | 1 line

parse.y: add EXPR_NONE
------------------------------------------------------------------------
r62001 | nobu | 2018-01-21 18:59:45 +0900 (Sun, 21 Jan 2018) | 5 lines

keywords: shrink struct kwtable

* defs/keywords (struct kwtable): shrink since members do not
  exceed 16bit.  lex_state needs to be int (or enum lex_state_e)
  when EXPR_MAX_STATE reaches it.
------------------------------------------------------------------------
r62000 | nobu | 2018-01-21 16:44:25 +0900 (Sun, 21 Jan 2018) | 5 lines

parse.y: fix state after left brace

* parse.y (parser_yylex): as well as `tLBRACE_ARG` (expr block),
  `tLBRACE` (primary block) also does not accept a label.  only
  hash brace accepts a label.
------------------------------------------------------------------------
r61999 | nobu | 2018-01-21 16:44:24 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: revert trace message to lex_state
------------------------------------------------------------------------
r61998 | nobu | 2018-01-21 16:44:24 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: use enum yytokentype
------------------------------------------------------------------------
r61997 | nobu | 2018-01-21 16:44:23 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: parser_token_value_print for yydebug
------------------------------------------------------------------------
r61996 | kazu | 2018-01-21 11:24:26 +0900 (Sun, 21 Jan 2018) | 1 line

Fix missing m4_include at r61982
------------------------------------------------------------------------
r61995 | normal | 2018-01-21 07:07:36 +0900 (Sun, 21 Jan 2018) | 7 lines

load.c: use rb_warning directly

This removes the last dependency on rb_mWarning outside of
error.c and allows future commits to mark it static.

Yes, I expect this to slow down the emitting of a warning
message in a cold code path slightly :P
------------------------------------------------------------------------
r61994 | mame | 2018-01-21 02:52:51 +0900 (Sun, 21 Jan 2018) | 3 lines

ext/ripper/tools/dsl.rb: Use String#sub instead of delete_suffix

It fails when baseruby is old.
------------------------------------------------------------------------
r61993 | mame | 2018-01-21 02:52:50 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove unneeded macro nd_set_line
------------------------------------------------------------------------
r61992 | mame | 2018-01-21 02:45:25 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove double meaning of new_qcall/new_command_qcall
------------------------------------------------------------------------
r61991 | mame | 2018-01-21 02:45:24 +0900 (Sun, 21 Jan 2018) | 7 lines

ext/ripper/tools/dsl.rb: Serialize dispatch calls

To avoid the unspecified behavior (the evaluation order of arguments).
In `$$ = foo(bar(), baz());`, it is unspecified which `bar` or `baz` is
called earlier.

This commit changes the code to `v1=bar(); v2=baz(); $$ = foo();`.
------------------------------------------------------------------------
r61990 | mame | 2018-01-21 01:21:29 +0900 (Sun, 21 Jan 2018) | 14 lines

parse.y: rewrite excessed_comma process

Currently, parser.y includes core parser and Ripper parser obscurity.
In addition, *some* Ripper code uses the result of the core parser,
which make it difficult to separate the two parsers.

I want to simplify this, not by separating the two parsers, but by
making *all* Ripper actions follows the core parser actions.
In other words, all the core parser actions run always even in Ripper,
and after that, Ripper-specific actions run.

For tha sake, in principle, I want to put `/*% ripper: ... %*/` in the
end of actions.
Anyway, it is too dirty to put it within expressions, IMO.
------------------------------------------------------------------------
r61989 | mame | 2018-01-21 01:21:28 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove macros that are no longer used
------------------------------------------------------------------------
r61988 | mame | 2018-01-21 01:21:26 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove double meaning of new_op_assign, etc.
------------------------------------------------------------------------
r61987 | mame | 2018-01-21 01:21:25 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove double meaning of new_xstring/new_string1
------------------------------------------------------------------------
r61986 | mame | 2018-01-21 01:21:23 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: remove double meaning of new_brace_body/new_do_body
------------------------------------------------------------------------
r61985 | svn | 2018-01-21 01:21:21 +0900 (Sun, 21 Jan 2018) | 1 line

* 2018-01-21
------------------------------------------------------------------------
r61984 | mame | 2018-01-21 01:21:20 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: remove double meaning of const_path_field/top_const_field
------------------------------------------------------------------------
r61983 | shyouhei | 2018-01-20 16:14:59 +0900 (Sat, 20 Jan 2018) | 4 lines

Emacs friendliness [ci skip]

Just add comment by:
sed -i $'1i\\\n# -*- Autoconf -*-' tool/m4/*.m4
------------------------------------------------------------------------
r61982 | shyouhei | 2018-01-20 16:05:26 +0900 (Sat, 20 Jan 2018) | 5 lines

set AC_CONFIG_MACRO_DIRS [close GH-1793]

We do not use aclocal(1) by default. But in case users do so,
AC_CONFIG_MACRO_DIRS help them reconstruct the same contents as
this commit includes.
------------------------------------------------------------------------
r61981 | shyouhei | 2018-01-20 16:05:25 +0900 (Sat, 20 Jan 2018) | 5 lines

refactor split configure.ac into files

This does not (yet) change anything. The generated configure file
is the identical to previous one (except several empty lines added
and deleted).
------------------------------------------------------------------------
r61980 | nobu | 2018-01-20 15:49:30 +0900 (Sat, 20 Jan 2018) | 3 lines

Makefile.sub: missing/nan.obj

* win32/Makefile.sub (MISSING): nan() is available since msvcrr120.
------------------------------------------------------------------------
r61979 | mame | 2018-01-20 15:11:21 +0900 (Sat, 20 Jan 2018) | 14 lines

parse.y: Remove unneeded var_field_1 trick

I thought this trick was needed because the result of var_field was
passed to different arguments, as follows:

```
$1 = var_field(p, $1);
$$ = backref_assign_error(p, $1, $1, &@$);
```

Currently the DSL supports that one result is passed to one argument.

However, after the refactoring, I found that `backref_assign_error`
uses only one `$1`.
------------------------------------------------------------------------
r61978 | nobu | 2018-01-20 14:58:06 +0900 (Sat, 20 Jan 2018) | 5 lines

parse.y: dot_or_colon as id

* parse.y (dot_or_colon): made type of `dot_or_colon` and EXPR_DOT
  tokens to <id> and set those IDs at tokenization.  type cast at
  primary in ripper is no longer needed.
------------------------------------------------------------------------
r61977 | nobu | 2018-01-20 14:47:59 +0900 (Sat, 20 Jan 2018) | 5 lines

parse.y: moved excessed_comma

* parse.y (block_param): embed excessed_comma event result in
  place of rest argument, instead of dispatching with the whole
  parameters.
------------------------------------------------------------------------
r61976 | nobu | 2018-01-20 14:39:03 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: p

* ext/ripper/tools/dsl.rb (DSL#initialize): define `p` for `struct
  parser_params *p`.
------------------------------------------------------------------------
r61975 | nobu | 2018-01-20 14:39:02 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: ID constants

* ext/ripper/tools/dsl.rb (DSL#method_missing): expand ID
  constnats without parentheses.
------------------------------------------------------------------------
r61974 | nobu | 2018-01-20 14:39:01 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: const_missing

* ext/ripper/tools/dsl.rb (DSL.const_missing): define to expand
  Qnil and Qundef as-is.
------------------------------------------------------------------------
r61973 | nobu | 2018-01-20 14:39:00 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: indent

* ext/ripper/tools/dsl.rb (DSL#generate): indent after surrounding
  by braces.
------------------------------------------------------------------------
r61972 | shyouhei | 2018-01-20 13:18:09 +0900 (Sat, 20 Jan 2018) | 2 lines

[ci skip] tabify

------------------------------------------------------------------------
r61971 | shyouhei | 2018-01-20 12:16:59 +0900 (Sat, 20 Jan 2018) | 6 lines

add missing/nan.c

instead of scattering #ifdef HAVE_NANF here and there define our
own nan() unless defined elsewhere.


------------------------------------------------------------------------
r61970 | nobu | 2018-01-20 10:24:15 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y (yycompile0): check if accepted
------------------------------------------------------------------------
r61969 | naruse | 2018-01-20 03:55:32 +0900 (Sat, 20 Jan 2018) | 1 line

r61950 changes mode_t to ushort on FreeBSD and Darwin
------------------------------------------------------------------------
r61968 | mame | 2018-01-20 02:29:27 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y (assignable): Remove macro hell
------------------------------------------------------------------------
r61967 | mame | 2018-01-20 02:06:56 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y: Split the path of assignable to Ripper/Parser
------------------------------------------------------------------------
r61966 | mame | 2018-01-20 01:28:23 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y: Remove double meaning of node_assign
------------------------------------------------------------------------
r61965 | mame | 2018-01-20 01:24:07 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y: Remove double meaning of backref_assign_error
------------------------------------------------------------------------
r61964 | mame | 2018-01-20 00:43:42 +0900 (Sat, 20 Jan 2018) | 3 lines

parse.y: Remove unneeded type decls for Ripper

I think that they are not used.
------------------------------------------------------------------------
r61963 | svn | 2018-01-20 00:22:37 +0900 (Sat, 20 Jan 2018) | 1 line

* 2018-01-20
------------------------------------------------------------------------
r61962 | mame | 2018-01-20 00:22:36 +0900 (Sat, 20 Jan 2018) | 5 lines

parse.y: swap `foo!` and `foo` in Ripper DSL

`foo!(...)` means Ripper event, and `foo(...)` means C function/macro
call.  This is for fail-safe; if I forget `!` accidentally, it would
fail to compile, instead of wrongly adding a new Ripper event.
------------------------------------------------------------------------
r61961 | nobu | 2018-01-19 23:50:55 +0900 (Fri, 19 Jan 2018) | 4 lines

test_io.rb: avoid OOM

* test/ruby/test_io.rb (TestIO#test_copy_stream_socket7): reduce
  memory usage so the worker process will not die by OOM.
------------------------------------------------------------------------
r61960 | nobu | 2018-01-19 22:41:44 +0900 (Fri, 19 Jan 2018) | 4 lines

parse.y: assign to $$

* parse.y (command): assign to $$.  should not rely upon
  undocumented behavior.
------------------------------------------------------------------------
r61959 | mame | 2018-01-19 22:36:03 +0900 (Fri, 19 Jan 2018) | 3 lines

parse.y: fix up r61957, too

My apologies!
------------------------------------------------------------------------
r61958 | nobu | 2018-01-19 22:25:49 +0900 (Fri, 19 Jan 2018) | 1 line

parse.y: fix up r61957
------------------------------------------------------------------------
r61957 | mame | 2018-01-19 22:11:11 +0900 (Fri, 19 Jan 2018) | 4 lines

parse.y: Allows Ripper DSL to embed C function calls as `foo!`

Instead of `_foo`.  This makes it useful to do word boundary search of
the editor.
------------------------------------------------------------------------
r61956 | kazu | 2018-01-19 21:15:56 +0900 (Fri, 19 Jan 2018) | 3 lines

Fix warning

``lib/net/protocol.rb:214: warning: `*' interpreted as argument prefix``
------------------------------------------------------------------------
r61955 | mame | 2018-01-19 20:10:39 +0900 (Fri, 19 Jan 2018) | 1 line

parse.y: Remove new_command
------------------------------------------------------------------------
r61954 | mame | 2018-01-19 20:10:30 +0900 (Fri, 19 Jan 2018) | 3 lines

ext/ripper/tools/preproc.rb: Remove `/*%c%` handling

It was replaced with `/*% ripper[brace]: ... %*/`
------------------------------------------------------------------------
r61953 | svn | 2018-01-19 19:48:09 +0900 (Fri, 19 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61952 | mame | 2018-01-19 19:48:08 +0900 (Fri, 19 Jan 2018) | 16 lines

ext/ripper: Introduce a simple DSL for ripper.y code generation

Currently, parse.y actions are hard to read and write because the code
has double meaning (for core parser and for ripper).  I think that, if
it is easy to write ripper's code shortly and simply, the double meaning
trick is not needed.

For the sake, this change adds a simple DSL for ripper's code.  For
example, in parse.y, we can write:

    /*% ripper: stmts_add(stmts_new, void_stmt) %*/

instead of:

    $$ = dispatch2(stmts_add, dispatch0(stmts_new),
                   dispatch0(void_stmt));
------------------------------------------------------------------------
r61951 | mame | 2018-01-19 19:26:12 +0900 (Fri, 19 Jan 2018) | 3 lines

parse.y: Fix excessed_comma event

I believe that the assignment to `$$` was just forgotten.
------------------------------------------------------------------------
r61950 | shyouhei | 2018-01-19 18:12:06 +0900 (Fri, 19 Jan 2018) | 6 lines

there is no guarantee that mode_t is as wide as int

POSIX only defines mode_t to be "an integer typea", and in fact
MacOS defines it to be uint16_t.  We didn't have NUM2USHORT before
so it did not make sense but now that we have it.  Why not check
apptopriately.
------------------------------------------------------------------------
r61949 | shyouhei | 2018-01-19 17:17:56 +0900 (Fri, 19 Jan 2018) | 4 lines

don't abuse RSTRING_PTR (2nd try)

r61827, r61947 was about to fix this. The proper way to allocate
memory region is called ALLOCV_N.
------------------------------------------------------------------------
r61948 | shyouhei | 2018-01-19 16:16:54 +0900 (Fri, 19 Jan 2018) | 4 lines

svn merge -c -61947 .

Previous commit fails in CI.

------------------------------------------------------------------------
r61947 | shyouhei | 2018-01-19 16:07:49 +0900 (Fri, 19 Jan 2018) | 4 lines

don't abuse RSTRING_PTR

r61827 was about to fix this. The proper way to allocate memory
region is called ALLOCV_N.
------------------------------------------------------------------------
r61946 | shyouhei | 2018-01-19 14:18:18 +0900 (Fri, 19 Jan 2018) | 3 lines

there is no such thing like 0 in enum defined_type

introduce new enum for it.
------------------------------------------------------------------------
r61945 | nobu | 2018-01-19 13:23:59 +0900 (Fri, 19 Jan 2018) | 6 lines

vm_args.c: fix KW_SPECIFIED_BITS_MAX

* vm_args.c (KW_SPECIFIED_BITS_MAX): subtracted 1bit for
  FIXNUM_FLAG.  [ruby-core:84921] [Bug #14373]

* vm_insnhelper.c (vm_check_keyword): unsigned for bit operation.
------------------------------------------------------------------------
r61944 | shyouhei | 2018-01-19 12:59:13 +0900 (Fri, 19 Jan 2018) | 4 lines

avoid goto

gcc -Wjump-misses-init warns this goto.  That is a false alert.
However why on earth do we need to use goto here?
------------------------------------------------------------------------
r61943 | shyouhei | 2018-01-19 12:57:53 +0900 (Fri, 19 Jan 2018) | 1 line

ruby_gc_debug_indent needed only when RUBY_MARK_FREE_DEBUG
------------------------------------------------------------------------
r61942 | shyouhei | 2018-01-19 12:55:16 +0900 (Fri, 19 Jan 2018) | 1 line

st_hashtype_num marked as static
------------------------------------------------------------------------
r61941 | shyouhei | 2018-01-19 12:19:58 +0900 (Fri, 19 Jan 2018) | 1 line

variable succ_index_table never actually used
------------------------------------------------------------------------
r61940 | nobu | 2018-01-19 12:09:24 +0900 (Fri, 19 Jan 2018) | 7 lines

vm_insnhelper.c: fix many keyword arguments

* vm_insnhelper.c (vm_check_keyword): if the index exceeds the
  width of unspecified bits, that argument is specified.
  `unspecified_bits` still be a fixnum if the actual arguments do
  not exceed the limit, regardless the formal parameters size.
  [ruby-core:84921] [Bug #14373]
------------------------------------------------------------------------
r61939 | nobu | 2018-01-19 11:36:32 +0900 (Fri, 19 Jan 2018) | 4 lines

vm_insnhelper.c: should invert unspecified flag

* vm_insnhelper.c (vm_check_keyword): invert unspecified value
  flag as `checkkeyword` result.  fix up r58390.
------------------------------------------------------------------------
r61938 | shyouhei | 2018-01-19 10:45:36 +0900 (Fri, 19 Jan 2018) | 7 lines

INFINITY is float. That of double is HUGE_VAL.

It seems HUGE_VAL is already used. Why not eliminate INTINITY.
NAN is also float. That of double is called nan(). This is also
fixed.

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>
------------------------------------------------------------------------
r61937 | svn | 2018-01-19 00:48:56 +0900 (Fri, 19 Jan 2018) | 1 line

* 2018-01-19
------------------------------------------------------------------------
r61936 | nobu | 2018-01-19 00:48:55 +0900 (Fri, 19 Jan 2018) | 4 lines

compile.c: use ALLOCV_N

* compile.c (ibf_dump_object_list): allocate known-size array by
  ALLOCV_N instead of rb_ary_tmp_new.
------------------------------------------------------------------------
r61935 | kazu | 2018-01-18 21:54:24 +0900 (Thu, 18 Jan 2018) | 3 lines

Use already casted variable

r61883
------------------------------------------------------------------------
r61934 | kazu | 2018-01-18 21:54:18 +0900 (Thu, 18 Jan 2018) | 1 line

[DOC] Add `Array#{append,prepend}` to call-seq [ci skip]
------------------------------------------------------------------------
r61933 | hsbt | 2018-01-18 20:44:10 +0900 (Thu, 18 Jan 2018) | 4 lines

Fix typos.

  * rememberd -> remembered
  * refered -> referred
------------------------------------------------------------------------
r61932 | nobu | 2018-01-18 20:34:36 +0900 (Thu, 18 Jan 2018) | 1 line

marked as NORETURN
------------------------------------------------------------------------
r61931 | shyouhei | 2018-01-18 18:44:52 +0900 (Thu, 18 Jan 2018) | 1 line

rb_global_tbl marked as static
------------------------------------------------------------------------
r61930 | shyouhei | 2018-01-18 18:44:51 +0900 (Thu, 18 Jan 2018) | 1 line

rb_parser_lex_state_names marked as static
------------------------------------------------------------------------
r61929 | shyouhei | 2018-01-18 18:44:50 +0900 (Thu, 18 Jan 2018) | 1 line

usage analysis functions marke as static
------------------------------------------------------------------------
r61928 | shyouhei | 2018-01-18 18:44:49 +0900 (Thu, 18 Jan 2018) | 1 line

vm_super_outside marked as NORETURN
------------------------------------------------------------------------
r61927 | shyouhei | 2018-01-18 18:44:48 +0900 (Thu, 18 Jan 2018) | 1 line

vm_stackoverflow marked as NORETURN
------------------------------------------------------------------------
r61926 | shyouhei | 2018-01-18 18:44:47 +0900 (Thu, 18 Jan 2018) | 1 line

raise_closed_queue_error marked as NORETURN
------------------------------------------------------------------------
r61925 | shyouhei | 2018-01-18 18:44:46 +0900 (Thu, 18 Jan 2018) | 1 line

rb_threadptr_to_kill marked as NORETURN
------------------------------------------------------------------------
r61924 | shyouhei | 2018-01-18 18:44:45 +0900 (Thu, 18 Jan 2018) | 1 line

sigill marked as NORETURN
------------------------------------------------------------------------
r61923 | shyouhei | 2018-01-18 18:44:45 +0900 (Thu, 18 Jan 2018) | 1 line

ruby_abort marked as NORETURN
------------------------------------------------------------------------
r61922 | shyouhei | 2018-01-18 18:44:44 +0900 (Thu, 18 Jan 2018) | 1 line

sigsegv marked as NORETURN
------------------------------------------------------------------------
r61921 | shyouhei | 2018-01-18 18:44:43 +0900 (Thu, 18 Jan 2018) | 1 line

sigbus marked as NORETURN
------------------------------------------------------------------------
r61920 | shyouhei | 2018-01-18 18:44:42 +0900 (Thu, 18 Jan 2018) | 1 line

rb_reg_raise_str marked as NORETURN
------------------------------------------------------------------------
r61919 | shyouhei | 2018-01-18 18:44:41 +0900 (Thu, 18 Jan 2018) | 1 line

rb_enc_reg_raise marked as NORETURN
------------------------------------------------------------------------
r61918 | shyouhei | 2018-01-18 18:44:41 +0900 (Thu, 18 Jan 2018) | 1 line

rb_reg_enc_error marked as NORETURN
------------------------------------------------------------------------
r61917 | shyouhei | 2018-01-18 18:44:40 +0900 (Thu, 18 Jan 2018) | 1 line

rb_reg_raise marked as NORETURN
------------------------------------------------------------------------
r61916 | shyouhei | 2018-01-18 18:44:39 +0900 (Thu, 18 Jan 2018) | 1 line

num_funcall_op_1_recursion marked as NORETURN
------------------------------------------------------------------------
r61915 | shyouhei | 2018-01-18 18:44:39 +0900 (Thu, 18 Jan 2018) | 1 line

long_toobig marked as NORETURN
------------------------------------------------------------------------
r61914 | shyouhei | 2018-01-18 18:44:38 +0900 (Thu, 18 Jan 2018) | 1 line

dir_closed marked as NORETURN
------------------------------------------------------------------------
r61913 | shyouhei | 2018-01-18 18:44:37 +0900 (Thu, 18 Jan 2018) | 1 line

ibf_dump_object_unsupported marked as NORETURN
------------------------------------------------------------------------
r61912 | shyouhei | 2018-01-18 18:44:36 +0900 (Thu, 18 Jan 2018) | 3 lines

-Wmissing-noreturn

This is the -Wsuggest-attribute=noreturn equivalent option for clang.
------------------------------------------------------------------------
r61911 | shyouhei | 2018-01-18 18:44:36 +0900 (Thu, 18 Jan 2018) | 1 line

merge extern declarations into internal.h
------------------------------------------------------------------------
r61910 | shyouhei | 2018-01-18 18:44:35 +0900 (Thu, 18 Jan 2018) | 1 line

export transcode exceptions
------------------------------------------------------------------------
r61909 | shyouhei | 2018-01-18 18:44:34 +0900 (Thu, 18 Jan 2018) | 1 line

export rb_mProcGID, rb_mProcUid, rb_mProcID_Syscall
------------------------------------------------------------------------
r61908 | shyouhei | 2018-01-18 18:44:34 +0900 (Thu, 18 Jan 2018) | 1 line

export rb_mFConst
------------------------------------------------------------------------
r61907 | shyouhei | 2018-01-18 18:44:33 +0900 (Thu, 18 Jan 2018) | 1 line

export ruby_mWarning
------------------------------------------------------------------------
r61906 | shyouhei | 2018-01-18 18:44:32 +0900 (Thu, 18 Jan 2018) | 1 line

export rb_cLazy
------------------------------------------------------------------------
r61905 | shyouhei | 2018-01-18 18:44:32 +0900 (Thu, 18 Jan 2018) | 1 line

sort lines
------------------------------------------------------------------------
r61904 | nobu | 2018-01-18 16:59:03 +0900 (Thu, 18 Jan 2018) | 4 lines

vm_eval.c: for auto-indent

* vm_eval.c (rb_type_str): moved `case`s and semicolons so auto
  indentation works.
------------------------------------------------------------------------
r61903 | nobu | 2018-01-18 16:53:26 +0900 (Thu, 18 Jan 2018) | 5 lines

eval_intern.h: duplicate check

* eval_intern.h (pass_passed_block_handler): remove duplicate
  check.  vm_block_handler_verify() is called in the successive
  function call.
------------------------------------------------------------------------
r61902 | naruse | 2018-01-18 12:53:46 +0900 (Thu, 18 Jan 2018) | 1 line

extend timeout more
------------------------------------------------------------------------
r61901 | nobu | 2018-01-18 12:37:08 +0900 (Thu, 18 Jan 2018) | 3 lines

parse.y: no longer undef assignable

* parse.y (assignable): no longer needs to undef since r61899.
------------------------------------------------------------------------
r61900 | nobu | 2018-01-18 12:29:12 +0900 (Thu, 18 Jan 2018) | 1 line

parse.y: fix overflow
------------------------------------------------------------------------
r61899 | nobu | 2018-01-18 12:25:20 +0900 (Thu, 18 Jan 2018) | 4 lines

parse.y: REQUIRED_KEYWORD

* parse.y (REQUIRED_KEYWORD): special argument for required
  keyword argument, for core and ripper.
------------------------------------------------------------------------
r61898 | nobu | 2018-01-18 12:09:39 +0900 (Thu, 18 Jan 2018) | 6 lines

resolv.rb: NUL hosts

* lib/resolv.rb (Resolv::Hosts::DefaultFileName): fallback to NUL
  device when Win32::Resolv.get_hosts_path() returned nil, to get
  rid of TypeError in lazy_initialize.
  [ruby-core:84907] [Bug #14369]  [Fix GH-1791]
------------------------------------------------------------------------
r61897 | nobu | 2018-01-18 11:44:50 +0900 (Thu, 18 Jan 2018) | 4 lines

resolv: use safe navigation operator

* lib/resolv.rb (each_address): use safe navigation operator to
  avoid extra hash lookups, as well as each_name since r56890.
------------------------------------------------------------------------
r61896 | nobu | 2018-01-18 10:27:45 +0900 (Thu, 18 Jan 2018) | 4 lines

marshal.c: initialize keywords

* marshal.c (r_object0): initialize `keywords` and removed
  `keyword_init` flag, to get rid of maybe-uninitialized warning.
------------------------------------------------------------------------
r61895 | nobu | 2018-01-18 10:10:22 +0900 (Thu, 18 Jan 2018) | 4 lines

win32/resolv.rb: call rb_w32_osid

* ext/win32/lib/win32/resolv.rb: call rb_w32_osid instead of
  direct GetVersionExA API.
------------------------------------------------------------------------
r61894 | normal | 2018-01-18 09:52:01 +0900 (Thu, 18 Jan 2018) | 3 lines

logger: use safe navigation operator

Saves a few hundred bytes of bytecode in a frequently loaded module.
------------------------------------------------------------------------
r61893 | naruse | 2018-01-18 03:08:58 +0900 (Thu, 18 Jan 2018) | 4 lines

include ruby/ruby.h before ruby.io.h

It breaks AIX build:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180117T113303Z.log.html.gz
------------------------------------------------------------------------
r61892 | naruse | 2018-01-18 03:02:47 +0900 (Thu, 18 Jan 2018) | 1 line

extend timeout
------------------------------------------------------------------------
r61891 | svn | 2018-01-18 00:28:38 +0900 (Thu, 18 Jan 2018) | 1 line

* 2018-01-18
------------------------------------------------------------------------
r61890 | nobu | 2018-01-18 00:28:37 +0900 (Thu, 18 Jan 2018) | 6 lines

iseq.c: dump as non-trace instructions

* iseq.c (iseq_data_to_ary): when OPT_CALL_THREADED_CODE is used,
  iseq_encoded is overwritten by instructions with trace and the
  original_iseq is not stored.  convert these instructions to the
  original instructions as external representation.
------------------------------------------------------------------------
r61889 | hsbt | 2018-01-17 22:15:13 +0900 (Wed, 17 Jan 2018) | 5 lines

Fix typos.

 * node.c: strucutre -> structure
 * random.c: acquried -> acquired
 * thread.c: accross -> across
------------------------------------------------------------------------
r61888 | nobu | 2018-01-17 20:22:14 +0900 (Wed, 17 Jan 2018) | 4 lines

process.c: get_clk_tck fallback

* process.c (get_clk_tck): prefer CLK_TCK over older HZ, next to
  _SC_CLK_TCK.
------------------------------------------------------------------------
r61887 | nobu | 2018-01-17 20:16:24 +0900 (Wed, 17 Jan 2018) | 6 lines

process.c: remove useless cast

* process.c (get_clk_tck): remove useless cast, implicitly cast to
  long again.

* process.c (rb_proc_times): cast explicitly.
------------------------------------------------------------------------
r61886 | nobu | 2018-01-17 20:12:31 +0900 (Wed, 17 Jan 2018) | 4 lines

common.mk: ripper.c recipe

* common.mk (ripper.c): strip nmake-style VPATH from depend file,
  as well as mkmf.rb does.
------------------------------------------------------------------------
r61885 | mame | 2018-01-17 19:17:16 +0900 (Wed, 17 Jan 2018) | 1 line

ext/ripper/depend: Try to fix the path of id.h
------------------------------------------------------------------------
r61884 | nobu | 2018-01-17 15:38:08 +0900 (Wed, 17 Jan 2018) | 4 lines

test_ast.rb: no base directory name

* test/-ext-/ast/test_ast.rb: exclude base directory name from
  test method names.
------------------------------------------------------------------------
r61883 | nobu | 2018-01-17 15:23:57 +0900 (Wed, 17 Jan 2018) | 1 line

iseq.c: flatten TS_NUM operand conditions
------------------------------------------------------------------------
r61882 | nobu | 2018-01-17 15:05:37 +0900 (Wed, 17 Jan 2018) | 1 line

parse.y: refine negate_lit_gen error message
------------------------------------------------------------------------
r61881 | normal | 2018-01-17 14:03:43 +0900 (Wed, 17 Jan 2018) | 3 lines

time.c: use "unsigned int" for bitfields

Followup to r61870
------------------------------------------------------------------------
r61880 | nobu | 2018-01-17 13:25:39 +0900 (Wed, 17 Jan 2018) | 1 line

ripper.c: depends on preproc.rb
------------------------------------------------------------------------
r61879 | mame | 2018-01-17 00:12:15 +0900 (Wed, 17 Jan 2018) | 1 line

parse.y: Refactor for-statement generation
------------------------------------------------------------------------
r61878 | mame | 2018-01-17 00:12:11 +0900 (Wed, 17 Jan 2018) | 1 line

parse.y (new_args_tail): Use human-friendly variable names
------------------------------------------------------------------------
r61877 | svn | 2018-01-17 00:12:10 +0900 (Wed, 17 Jan 2018) | 1 line

* 2018-01-17
------------------------------------------------------------------------
r61876 | mame | 2018-01-17 00:12:09 +0900 (Wed, 17 Jan 2018) | 1 line

node.c: Separately allocate a struct having flexible array
------------------------------------------------------------------------
r61875 | shyouhei | 2018-01-16 18:21:07 +0900 (Tue, 16 Jan 2018) | 5 lines

nested flexible array member is a GCCism

This is NG. The ISO C section 6.7.2.1 explicitly states that
structs having flexible array members "shall not be a member
of a structure or an element of an array."
------------------------------------------------------------------------
r61874 | shyouhei | 2018-01-16 17:35:33 +0900 (Tue, 16 Jan 2018) | 5 lines

-Wno-overlength-strings

as per https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Assumptions
we are officially giving up 509 characters limit of C string
literal length.
------------------------------------------------------------------------
r61873 | nobu | 2018-01-16 17:21:40 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: unified local_push argument
------------------------------------------------------------------------
r61872 | nobu | 2018-01-16 17:05:57 +0900 (Tue, 16 Jan 2018) | 4 lines

parse.y: simplified compstmt

* parse.y (top_compstmt, compstmt): unified void_stmts with
  ripper.
------------------------------------------------------------------------
r61871 | mame | 2018-01-16 16:24:53 +0900 (Tue, 16 Jan 2018) | 6 lines

node.c: Stop double meaning of NODE_FOR by introducing NODE_FOR_MASGN

NODE_FOR was used both for "for"-statement itself and for
multi-assignment of for-statement (for x, y, in...end).
This change separates the two purposes, NODE_FOR for the former, and
newly introduced NODE_FOR_MASGN for the latter.
------------------------------------------------------------------------
r61870 | normal | 2018-01-16 15:36:05 +0900 (Tue, 16 Jan 2018) | 9 lines

timev.h: just use "unsigned int" for bitfields

There's no point in having separate types depending on C dialect
when using bitfields, "unsigned int" bitfields are bitfields
anywhere.

Note: we also have test_memsize in test_time.rb in case
users of other platforms want to enable size assertions
if they don't trust their compiler.
------------------------------------------------------------------------
r61869 | ngoto | 2018-01-16 14:49:01 +0900 (Tue, 16 Jan 2018) | 8 lines

fix macro argument names inconsistency

* include/ruby/defines.h (RUBY_ALIGNAS): Fix macro definition.
  Fix compile error with Fujitsu C Compiler (fcc) on Solaris.

* include/ruby/defines.h (RUBY_ALIGNOF): Fix macro argument name.
  Fix compile error with fcc and Oracle Solaris Studio 12.4 on Solaris.

------------------------------------------------------------------------
r61868 | mame | 2018-01-16 14:27:20 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y (expr_value_do): factor out COND_PUSH->expr_value->do->COND_POP
------------------------------------------------------------------------
r61867 | nobu | 2018-01-16 12:16:17 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: removed PARSER_ARG macro
------------------------------------------------------------------------
r61866 | nobu | 2018-01-16 12:16:15 +0900 (Tue, 16 Jan 2018) | 3 lines

parse.y: expand tokadd_mbchar

* parse.y (tokadd_mbchar): renamed and expand callers with p.
------------------------------------------------------------------------
r61865 | shyouhei | 2018-01-16 12:09:53 +0900 (Tue, 16 Jan 2018) | 4 lines

sizeof(uintptr_t) != sizeof(uintptr_t *)

Reported by mame.  Thanks.

------------------------------------------------------------------------
r61864 | mame | 2018-01-16 11:27:58 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: set location of nodes that lexer generates
------------------------------------------------------------------------
r61863 | mame | 2018-01-16 11:00:16 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: set location of string/literals in the lexer instead of actions
------------------------------------------------------------------------
r61862 | mame | 2018-01-16 10:43:25 +0900 (Tue, 16 Jan 2018) | 4 lines

parse.y (new_regexp): Fix SEGV of `/#{"\u3042"}#{'{U+3044}'}/` in non UTF-8

Mixing other encoding string literals in one Regexp caused SEGV.
This bug was found by CoverityScan.
------------------------------------------------------------------------
r61861 | mame | 2018-01-16 10:32:58 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y (symbol_append): Added to factor out `%i[]` and `%I[]`
------------------------------------------------------------------------
r61860 | svn | 2018-01-16 08:43:18 +0900 (Tue, 16 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61859 | yui-knk | 2018-01-16 08:43:17 +0900 (Tue, 16 Jan 2018) | 13 lines

Add tests for Node code locations

* test/-ext-/ast/test_ast.rb: Add tests for Node
  code locations. This file tests

  1. There are no Node whose code location is default
     value (#test_not_cared)

  2. There are no Node whose children's code locations
     exceed parent's code location (#test_ranges)

* ext/-test-/ast/ast.c, ext/-test-/ast/extconf.rb:
  Define AST module to help tests.
------------------------------------------------------------------------
r61858 | mame | 2018-01-16 01:12:34 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: Removes unneeded Ripper/Parser guards
------------------------------------------------------------------------
r61857 | svn | 2018-01-16 00:04:58 +0900 (Tue, 16 Jan 2018) | 1 line

* 2018-01-16
------------------------------------------------------------------------
r61856 | mame | 2018-01-16 00:04:57 +0900 (Tue, 16 Jan 2018) | 4 lines

parse.y (new_command_qcall): Receives a block (optional)

There were four cases that uses new_command_qcall and then
method_add_block.  This change factors out the four rules.
------------------------------------------------------------------------
r61855 | mame | 2018-01-15 23:01:16 +0900 (Mon, 15 Jan 2018) | 3 lines

test/ruby/test_syntax.rb (test_command_with_cmd_brace_block): Added

The bison rules were not covered.
------------------------------------------------------------------------
r61853 | nobu | 2018-01-15 21:25:24 +0900 (Mon, 15 Jan 2018) | 4 lines

test_console_attr.rb: fix test

* test/-ext-/win32/test_console_attr.rb (reverse_video): fix test
  when reverse video is set.
------------------------------------------------------------------------
r61852 | hsbt | 2018-01-15 21:00:06 +0900 (Mon, 15 Jan 2018) | 3 lines

Fix a typo.

  * gc.c: beacuse -> because.
------------------------------------------------------------------------
r61851 | hsbt | 2018-01-15 19:09:00 +0900 (Mon, 15 Jan 2018) | 3 lines

Fix a typo.

  * win32/win32.c: wrok -> work
------------------------------------------------------------------------
r61850 | mame | 2018-01-15 17:54:25 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Removes unreachable warnings

tIDENTIFIER is now always a local id (except fname).
------------------------------------------------------------------------
r61849 | mame | 2018-01-15 17:54:24 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Removes unneeded NULL checks

Nowadays, there are less rules whose return value is NULL.
------------------------------------------------------------------------
r61848 | mame | 2018-01-15 16:54:24 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Remove unneeded NULL check

There are many usages assuming that bodystmt always returns non-null.
------------------------------------------------------------------------
r61847 | mame | 2018-01-15 16:39:47 +0900 (Mon, 15 Jan 2018) | 1 line

parse.y (last_arg_append, rest_arg_append): factor out the code clones
------------------------------------------------------------------------
r61846 | shyouhei | 2018-01-15 16:32:48 +0900 (Mon, 15 Jan 2018) | 4 lines

__declspec(align(#)) does not take sizeof()

same as r61833

------------------------------------------------------------------------
r61845 | shyouhei | 2018-01-15 16:30:43 +0900 (Mon, 15 Jan 2018) | 2 lines

ruby_aligned_char no longer needed.

------------------------------------------------------------------------
r61844 | nobu | 2018-01-15 16:01:08 +0900 (Mon, 15 Jan 2018) | 4 lines

raddrinfo.c: fix parse_numeric_port

* ext/socket/raddrinfo.c (parse_numeric_port): necessary
  regardless of GETADDRINFO_EMU.
------------------------------------------------------------------------
r61843 | shyouhei | 2018-01-15 15:47:56 +0900 (Mon, 15 Jan 2018) | 5 lines

take alignof instead of sizeof

win32ole.c includes ALLOCA_N(struct myCPINFOEX, 1).  On such case
it is not a wise idea to align to the size of that struct.

------------------------------------------------------------------------
r61842 | mame | 2018-01-15 15:25:43 +0900 (Mon, 15 Jan 2018) | 1 line

parse.y (new_ary_op_assign): Factor out the typical code clone
------------------------------------------------------------------------
r61841 | mame | 2018-01-15 15:25:42 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Fix a bug of `obj[42, &blk] ||= foo bar`

Follow up of r28123 (!)
------------------------------------------------------------------------
r61840 | mame | 2018-01-15 15:25:41 +0900 (Mon, 15 Jan 2018) | 1 line

parse.y (begin_block): Factor out BEGIN {} process.
------------------------------------------------------------------------
r61839 | shyouhei | 2018-01-15 14:51:46 +0900 (Mon, 15 Jan 2018) | 4 lines

also blacklist gcc 4.9 for  __builtin_alloca_with_align

Reports show that gcc (Raspbian 4.9.2-10) 4.9.2 fails here.

------------------------------------------------------------------------
r61838 | nobu | 2018-01-15 14:27:11 +0900 (Mon, 15 Jan 2018) | 1 line

tool/ruby_vm/models/attribute.rb: void for empty arguments
------------------------------------------------------------------------
r61837 | mame | 2018-01-15 14:17:18 +0900 (Mon, 15 Jan 2018) | 4 lines

parse.y: Remove unused code comment blocks

The code fragments were commented out in YARV merge era.
I believe that it will be never needed in near future.
------------------------------------------------------------------------
r61836 | shyouhei | 2018-01-15 13:36:09 +0900 (Mon, 15 Jan 2018) | 4 lines

disable __builtin_alloca_with_align for GCC 4.8

It seems to be a false positive that the configure detects this
undocumented function to be available on the compiler.
------------------------------------------------------------------------
r61835 | shyouhei | 2018-01-15 13:36:09 +0900 (Mon, 15 Jan 2018) | 6 lines

give up RSTRING_PTR() being VALUE-aligned

rb_setup_fake_str() can take arbitrary char* address, typicalluy
C string literals.  These arguments have no guarantee of
alignment at all.  It was not a wise idea for me to think
RSTRING_PTR can be aligned.
------------------------------------------------------------------------
r61834 | shyouhei | 2018-01-15 13:36:08 +0900 (Mon, 15 Jan 2018) | 1 line

sorry, this hunk was a garbage. [ci skip]
------------------------------------------------------------------------
r61833 | shyouhei | 2018-01-15 11:59:18 +0900 (Mon, 15 Jan 2018) | 4 lines

__declspec(align(#)) does not take sizeof()

Use compile-time constant expression instead.

------------------------------------------------------------------------
r61832 | nobu | 2018-01-15 11:39:32 +0900 (Mon, 15 Jan 2018) | 6 lines

more ytab.sed fixes

* tool/ytab.sed: fix for more old bison which does not support %lex-param
  at yydestruct (missed at the previous commit).
  define yy_stack_print macro to add `p` argument instead of
  replacement at callers.
------------------------------------------------------------------------
r61831 | shyouhei | 2018-01-15 11:35:20 +0900 (Mon, 15 Jan 2018) | 5 lines

more support for NORETURN

Before this NORETURN was checked only for __attribute__ or __declspec,
but nowadays other ways are there to tell compilers that a function
never returns.  Take them into account.
------------------------------------------------------------------------
r61830 | shyouhei | 2018-01-15 11:35:19 +0900 (Mon, 15 Jan 2018) | 6 lines

__builtin_alloca_with_align for optimal memory access

ALLOCA_N takes type arugment.  It is natural that the returned
value to be used as an array of type, thus type-aligned.
Luckily GCC has a builtin to tell compiler such alignment info.
This should generate beter instructions.
------------------------------------------------------------------------
r61829 | shyouhei | 2018-01-15 11:35:18 +0900 (Mon, 15 Jan 2018) | 3 lines

__builtin_assume_aligned for *(foo *) casts

These casts are guarded. Must be safe to assume alignments.
------------------------------------------------------------------------
r61828 | shyouhei | 2018-01-15 11:35:17 +0900 (Mon, 15 Jan 2018) | 3 lines

__alignof__ to take alignment of a type

C11 and C++11 has this feature so why not use it when available.
------------------------------------------------------------------------
r61827 | shyouhei | 2018-01-15 11:35:16 +0900 (Mon, 15 Jan 2018) | 13 lines

__attibute__((__aligned__)) for RSTRING_PTR()

For instance array.c:rb_ary_product() uses RSTRING_PTR() as an
array of int. So to avoid misaligned memory access RSTRING_PTR()
must at least be sizeof(int)-aligned.  However the type of
RSTRING_PTR() is char*, which of course can expect alignment as
much as 1.  This is a problem.

The reality is, there is no misaligned memory access because the
memory region behind RSTRING_PTR() is allocated using malloc().
Memory regions returned from malloc() are always aligned
appropriately.  So let's tell the compiler about this information.
It seems GCC, clang, and MSVC have such feature.
------------------------------------------------------------------------
r61826 | nobu | 2018-01-15 11:23:24 +0900 (Mon, 15 Jan 2018) | 6 lines

more ytab.sed fixes

* tool/ytab.sed: `p` is too short to distinguish alone from other
  names.  fix for more old bison which does not support %lex-param
  at yydestruct.  add `p` argument to non-prototype declaration of
  yy_stack_print.
------------------------------------------------------------------------
r61825 | svn | 2018-01-15 09:45:26 +0900 (Mon, 15 Jan 2018) | 1 line

* 2018-01-15
------------------------------------------------------------------------
r61824 | mame | 2018-01-15 09:45:26 +0900 (Mon, 15 Jan 2018) | 3 lines

tool/ytab.sed: Support some old bison implementations

At least, I confirmed bison 2.3 (because macOS uses the version).
------------------------------------------------------------------------
r61823 | mame | 2018-01-14 23:44:46 +0900 (Sun, 14 Jan 2018) | 1 line

parse.y (parser_heredoc_dedent): Removed
------------------------------------------------------------------------
r61822 | nobu | 2018-01-14 23:28:10 +0900 (Sun, 14 Jan 2018) | 4 lines

parse.y: yydebug

* parse.y (yydebug): define to disable a global variable and get
  rid of linker error when static linked ext.
------------------------------------------------------------------------
r61821 | mame | 2018-01-14 23:17:25 +0900 (Sun, 14 Jan 2018) | 4 lines

parse.y: Remove unused a macro "FIXME"

I don't know what it was, but seems that it has been already fixed since
r12117.
------------------------------------------------------------------------
r61820 | nobu | 2018-01-14 23:14:51 +0900 (Sun, 14 Jan 2018) | 1 line

parse.y: ripper no longer uses rb_discard_node
------------------------------------------------------------------------
r61819 | mame | 2018-01-14 23:09:41 +0900 (Sun, 14 Jan 2018) | 5 lines

parse.y: Remove a code for old yacc

The current parse.y won't compile with yacc since it depends on many
bison's extensions.  Also, configure.ac does not have a check for yacc,
so the macro OLD_YACC is no longer used.
------------------------------------------------------------------------
r61818 | mame | 2018-01-14 22:51:44 +0900 (Sun, 14 Jan 2018) | 10 lines

parse.y: Remove almost all *_gen macros by passing parser_params explicitly

In parse.y many functions were suffixed "_gen" and had companion macros
to pass struct parser_params implicitly, which made parse.c bigger and
more obscure.

This change expands and removes almost all "*_gen" macros.  This
requires explicit passing of struct parser_params, i.e., we need to
write "foo(p, ..)" instead of "foo(..)".  However, it is just extra
three letters.  I believe that this is easier to understand.
------------------------------------------------------------------------
r61817 | mame | 2018-01-14 22:51:41 +0900 (Sun, 14 Jan 2018) | 5 lines

parse.y: Expand global-like accessor macros for struct parser_params

For example, `lex_strterm` is expanded to `p->lex.strterm`.
I believe that this expansion make the code straightforward.
They look not so annoying because "parser" was renamed to "p".
------------------------------------------------------------------------
r61816 | mame | 2018-01-14 22:51:38 +0900 (Sun, 14 Jan 2018) | 1 line

parse.y: Use "p" for the variable of struct parser_params consistently
------------------------------------------------------------------------
r61815 | mame | 2018-01-14 22:51:35 +0900 (Sun, 14 Jan 2018) | 5 lines

parse.y: Avoid "p" as a variable name

Because I want to use the name "p" for struct parser_params through
parse.c.  This change renames "p" to "ptr", "paren", etc. depending upon
the context.
------------------------------------------------------------------------
r61814 | nobu | 2018-01-14 20:19:18 +0900 (Sun, 14 Jan 2018) | 1 line

exclude flexible array size with old compilers
------------------------------------------------------------------------
r61813 | svn | 2018-01-14 11:44:54 +0900 (Sun, 14 Jan 2018) | 1 line

* 2018-01-14
------------------------------------------------------------------------
r61812 | normal | 2018-01-14 11:44:53 +0900 (Sun, 14 Jan 2018) | 52 lines

net/http: use writev for HTTP chunked request bodies

This reduces both user and system CPU time for large
uploads with dynamically-generated request bodies.

              user     system      total        real
before:   0.393334   1.580000   1.973334 (  1.971066)
after:    0.223334   0.976666   1.200000 (  1.198514)

------
require 'socket'
require 'net/http'
require 'benchmark'
nr = 1024 * 1024 * 1024
s = TCPServer.new('127.0.0.1', 0)
addr = s.addr
at_exit { Process.waitall }
fork do
  c = s.accept
  # not exactly accurate but fast
  IO.copy_stream(c, '/dev/null', nr + 500000)
  begin
    buf = c.readpartial(16384)
    tmp = ''
    until buf.end_with?(-"0\r\n\r\n")
      buf << c.readpartial(16384, tmp)
    end
  rescue EOFError
  end
  c.write "HTTP/1.1 201 Created\r\nConnection:close\r\n\r\n"
  c.close
end
r, w = IO.pipe
fork do
  r.close
  IO.copy_stream('/dev/zero', w, nr)
  w.close
end
w.close
Net::HTTP.start(addr[3], addr[1]) do |http|
  put = Net::HTTP::Put.new('/dev0/foo')
  put['Content-Type'] = 'application/content-type'
  put['Transfer-Encoding'] = 'chunked'
  put.body_stream = r
  puts(Benchmark.measure { http.request(put) })
end
------

* lib/net/http/generic_request.rb (write): use multi-arg write
* lib/net/protocol.rb (write): support multi-arg
  (write0): ditto
  [ruby-core:84845] [Feature #14339]
------------------------------------------------------------------------
r61811 | mame | 2018-01-13 22:08:05 +0900 (Sat, 13 Jan 2018) | 1 line

string.c (struct mapping_buffer): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61810 | mame | 2018-01-13 22:00:14 +0900 (Sat, 13 Jan 2018) | 1 line

compile.c (struct ibf_object_*): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61809 | mame | 2018-01-13 22:00:11 +0900 (Sat, 13 Jan 2018) | 3 lines

compile.c (struct ibf_id_entry): Just removed.

It looked unused.
------------------------------------------------------------------------
r61808 | mame | 2018-01-13 21:44:17 +0900 (Sat, 13 Jan 2018) | 1 line

iseq.h (struct iseq_catch_table_entry, iseq_compile_data_storage): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61807 | mame | 2018-01-13 21:25:15 +0900 (Sat, 13 Jan 2018) | 1 line

file.c (struct apply_arg): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61806 | mame | 2018-01-13 21:17:42 +0900 (Sat, 13 Jan 2018) | 1 line

variable.c (struct gen_ivtbl): Use FLEX_ARY_LEN.
------------------------------------------------------------------------
r61805 | mame | 2018-01-13 21:09:24 +0900 (Sat, 13 Jan 2018) | 1 line

node.c (node_buffer_elem_t): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61804 | mame | 2018-01-13 20:45:25 +0900 (Sat, 13 Jan 2018) | 3 lines

internal.h (FLEX_ARY_LEN): Add a macro to define a flexible array

Also, use it in iseq.c.
------------------------------------------------------------------------
r61803 | hsbt | 2018-01-13 20:10:08 +0900 (Sat, 13 Jan 2018) | 3 lines

Fix a typo.

  configure.ac: delcares -> declares.
------------------------------------------------------------------------
r61802 | shyouhei | 2018-01-13 19:47:33 +0900 (Sat, 13 Jan 2018) | 3 lines

__VA_ARGS__ is a C99ism

give up CALL_ATTRIBUTE macro.
------------------------------------------------------------------------
r61801 | shyouhei | 2018-01-13 19:47:32 +0900 (Sat, 13 Jan 2018) | 1 line

flexible array member is a C99ism
------------------------------------------------------------------------
r61800 | nobu | 2018-01-13 18:23:40 +0900 (Sat, 13 Jan 2018) | 10 lines

Update dependencies

* common.mk: enc/unicode.$(OBJEXT) depends on onigmo.h via
  oniguruma.h.

* common.mk: dependencies of *prelude.$(OBJEXT) are defined for
  each generated C sources.

* enc/depend: casefold.h and name2ctype.h are located under
  $(UNICODE_HDR_DIR).
------------------------------------------------------------------------
r61799 | kazu | 2018-01-13 09:30:01 +0900 (Sat, 13 Jan 2018) | 1 line

Update dependencies using `tool/update-deps`
------------------------------------------------------------------------
r61798 | svn | 2018-01-13 00:59:27 +0900 (Sat, 13 Jan 2018) | 1 line

* 2018-01-13
------------------------------------------------------------------------
r61797 | mame | 2018-01-13 00:59:26 +0900 (Sat, 13 Jan 2018) | 3 lines

parse.y: Remove meaningless ifndef guards

Because the part of the code is already within `#ifndef RIPPER`.
------------------------------------------------------------------------
r61796 | mame | 2018-01-12 23:25:31 +0900 (Fri, 12 Jan 2018) | 5 lines

parse.y (token_info_push, token_info_pop): Refactoring

* remove unused argument len
* factor out initialization code of token_info
* make the condition of "mismatched indentations" warning easy to understand
------------------------------------------------------------------------
r61795 | mame | 2018-01-12 23:25:28 +0900 (Fri, 12 Jan 2018) | 1 line

parse.y (token_info_push, token_info_pop): Use code_location
------------------------------------------------------------------------
r61794 | shyouhei | 2018-01-12 22:25:03 +0900 (Fri, 12 Jan 2018) | 5 lines

suppress warning for VC12

It says "warning C4146: unary minus operator applied
to unsigned type, result still unsigned"

------------------------------------------------------------------------
r61793 | mame | 2018-01-12 22:22:20 +0900 (Fri, 12 Jan 2018) | 3 lines

parse.y: Remove unneeded dependence on pointer representatin

A simple comparison is enough in this case
------------------------------------------------------------------------
r61792 | shyouhei | 2018-01-12 22:14:53 +0900 (Fri, 12 Jan 2018) | 7 lines

merge revision: 61746

`signed` is required for Rasbian (x86_64).

* tool/ruby_vm/views/_insn_stack_increase.erb: specify `signed` explicitly
  for systems which use `unsigned` for `char` type.

------------------------------------------------------------------------
r61791 | hsbt | 2018-01-12 22:05:09 +0900 (Fri, 12 Jan 2018) | 3 lines

Fix a typo.

  * template/unicode_norm_gen.tmpl: ouput -> output
------------------------------------------------------------------------
r61790 | normal | 2018-01-12 18:31:22 +0900 (Fri, 12 Jan 2018) | 4 lines

sample/iseq_loader: use File.open instead of Kernel#open

This makes auditing for inadvertant command execution
easier.
------------------------------------------------------------------------
r61789 | normal | 2018-01-12 18:31:17 +0900 (Fri, 12 Jan 2018) | 1 line

sample/iseq_loader.rb: spelling fix
------------------------------------------------------------------------
r61788 | hsbt | 2018-01-12 18:07:47 +0900 (Fri, 12 Jan 2018) | 4 lines

Fixed typos.

  * sample/trick2013/kinaba/remarks.markdown: algorthim -> algorithm
  * sample/trick2015/ksk_1/remarks.markdown: Limination -> Limitation
------------------------------------------------------------------------
r61787 | shyouhei | 2018-01-12 17:38:12 +0900 (Fri, 12 Jan 2018) | 4 lines

tool/ruby_vm support for pre-2.0 BASERUBY

This was not requested :) but actually easier than the previous
so I just did it anyway.
------------------------------------------------------------------------
r61786 | shyouhei | 2018-01-12 17:38:11 +0900 (Fri, 12 Jan 2018) | 3 lines

tool/ruby_vm support for pre-2.1 BASERUBY

as requested by devs, support for BASERUBY prior to 2.1
------------------------------------------------------------------------
r61785 | shyouhei | 2018-01-12 17:38:10 +0900 (Fri, 12 Jan 2018) | 3 lines

tool/ruby_vm support for pre-2.3 BASERUBY

as requested by devs, support for BASERUBY prior to 2.3
------------------------------------------------------------------------
r61784 | shyouhei | 2018-01-12 17:38:09 +0900 (Fri, 12 Jan 2018) | 20 lines

delete tool/instruction.rb (2nd try)

Previous commit changed insns.def format. Now is the time for its
generators. In doing so I chose to modernize the system, not just
patch.  My attempt includes

- extensive use of Onigumo regular expressions
- split from one big file (instruction.rb) into separated MVC
- partial view

Also, let me take this opportunity to kill old unused features
such as

- stack caching
- minsns / yasmdata which are never seriously used
- yarvarch document generation (moved to doc/)
- vast majority of unused arguments to insns2vm.rb

This commit generates VM source codes that cleanly compile, and
the generated binary passes tests.  At least for me.
------------------------------------------------------------------------
r61783 | shyouhei | 2018-01-12 17:38:08 +0900 (Fri, 12 Jan 2018) | 1 line

[ci skip] add comments about file format (2nd try)
------------------------------------------------------------------------
r61782 | shyouhei | 2018-01-12 17:38:07 +0900 (Fri, 12 Jan 2018) | 4 lines

new insns.def format (2nd try)

- Gave up @j comments
- Room for sp_inc to be a proper grammer element
------------------------------------------------------------------------
r61781 | kazu | 2018-01-12 09:16:59 +0900 (Fri, 12 Jan 2018) | 3 lines

Add `103 Early Hints` to `Net::HTTP::STATUS_CODES` [ci skip]

Update by `ruby lib/net/http/status.rb | sponge lib/net/http/status.rb`
------------------------------------------------------------------------
r61780 | kazu | 2018-01-12 09:16:56 +0900 (Fri, 12 Jan 2018) | 1 line

doc/NEWS-2.5.0: `step` is not `Integer#step` but `Numeric#step` [ci skip]
------------------------------------------------------------------------
r61779 | normal | 2018-01-12 09:15:28 +0900 (Fri, 12 Jan 2018) | 4 lines

thread.c (thread_cleanup_func): document small leak

It's minor, I haven't analyzed how fixable it is, but we should
at least note it, here.
------------------------------------------------------------------------
r61778 | naruse | 2018-01-12 04:41:49 +0900 (Fri, 12 Jan 2018) | 1 line

fix for IPv6 env
------------------------------------------------------------------------
r61777 | stomar | 2018-01-12 04:37:25 +0900 (Fri, 12 Jan 2018) | 1 line

NEWS: Matrix#antisymmetric?
------------------------------------------------------------------------
r61776 | svn | 2018-01-12 04:36:31 +0900 (Fri, 12 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61775 | stomar | 2018-01-12 04:36:30 +0900 (Fri, 12 Jan 2018) | 6 lines

matrix.rb: add Matrix#antisymmetric?

* lib/matrix.rb: add Matrix#antisymmetric?.
  Proposed by Yilo (@yiloo). Patch by Marcus Stollsteimer (@stomar).
  [Fix GH-1788]
* spec/ruby/library/matrix/antisymmetric_spec.rb: add specs.
------------------------------------------------------------------------
r61774 | naruse | 2018-01-12 03:26:49 +0900 (Fri, 12 Jan 2018) | 3 lines

Mock fetching data from real DNS [Feature #14340]

This test just tests MDNS#each_address method.
------------------------------------------------------------------------
r61773 | svn | 2018-01-12 00:54:14 +0900 (Fri, 12 Jan 2018) | 1 line

* 2018-01-12
------------------------------------------------------------------------
r61772 | mame | 2018-01-12 00:54:13 +0900 (Fri, 12 Jan 2018) | 7 lines

parse.y: Remove LEXPOP hack

cmdarg_stack became inconsistent state due to look-ahead, and LEXPOP
hack smoothed over the inconsistency.

This commit fixes the inconsisitent state itself, and removes LEXPOP
hack.
------------------------------------------------------------------------
r61771 | kazu | 2018-01-11 22:56:05 +0900 (Thu, 11 Jan 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r61770 | kazu | 2018-01-11 22:56:04 +0900 (Thu, 11 Jan 2018) | 1 line

Fix indent and use as skipped message instead of comment
------------------------------------------------------------------------
r61769 | mame | 2018-01-11 22:42:18 +0900 (Thu, 11 Jan 2018) | 1 line

parse.y: disentangle the lexer handling of ')', ']', and '}'
------------------------------------------------------------------------
r61768 | mame | 2018-01-11 22:42:15 +0900 (Thu, 11 Jan 2018) | 1 line

parse.y: simplify and add a comment for paren_nest and lpar_beg
------------------------------------------------------------------------
r61767 | nobu | 2018-01-11 17:34:55 +0900 (Thu, 11 Jan 2018) | 3 lines

iseq.c: child iseq encoding

* iseq.c (iseq_inspect): preserve the encoding of child iseqs.
------------------------------------------------------------------------
r61766 | nobu | 2018-01-11 17:26:21 +0900 (Thu, 11 Jan 2018) | 5 lines

vm_insnhelper.c: search in the indexing order

* vm_insnhelper.c (vm_opt_newarray_max, vm_opt_newarray_min):
  search in the indexing order, as well as usual methods.
  [ruby-core:84821] [Bug #14350]
------------------------------------------------------------------------
r61765 | mame | 2018-01-11 13:25:33 +0900 (Thu, 11 Jan 2018) | 1 line

parse.y: add a simple comment for COND_* and CMDARG_*
------------------------------------------------------------------------
r61764 | mame | 2018-01-11 12:23:50 +0900 (Thu, 11 Jan 2018) | 3 lines

parse.y (local_push_gen): Rewrite the condition of "unused var" warning

It was unnecessarily too complex, IMO.
------------------------------------------------------------------------
r61763 | svn | 2018-01-11 00:44:52 +0900 (Thu, 11 Jan 2018) | 1 line

* 2018-01-11
------------------------------------------------------------------------
r61762 | k0kubun | 2018-01-11 00:44:52 +0900 (Thu, 11 Jan 2018) | 12 lines

tool/downloader.rb: retry against Errno::ETIMEDOUT

instead of Errno::ECONNREFUSED.

As I commented in r61498, at that moment I was not sure if the actual
exception is really `Errno::ECONNREFUSED` or not.

In https://ci.appveyor.com/project/ruby/ruby/build/1.0.6974, I could
confirm that the download can fail with `Errno::ETIMEDOUT`. So I want to
retry that.

Let's add `Errno::ECONNREFUSED` too if it fails with the exception.
------------------------------------------------------------------------
r61761 | hsbt | 2018-01-10 23:13:06 +0900 (Wed, 10 Jan 2018) | 4 lines

Fix typos.

 * doc/contributors.rdoc: pathces -> patches.
 * doc/syntax/refinements.rdoc: exmaple -> example.
------------------------------------------------------------------------
r61760 | mame | 2018-01-10 22:30:25 +0900 (Wed, 10 Jan 2018) | 4 lines

spec/: skip some specs so that no failure occurs in root privilege

Follow up of r61757,  This change makes `sudo make test-spec` pass on my
machine.
------------------------------------------------------------------------
r61759 | mame | 2018-01-10 22:30:22 +0900 (Wed, 10 Jan 2018) | 9 lines

spec/ruby/library/etc/getlogin_spec.rb: Use `logname` as an expected result

It had used `id -un`, but it is not always equal to `Etc.getlogin`.
`id` returns the current user of the process, and `Etc.getlogin` returns
the user name logged in on the controlling terminal of the process.

This change uses `logname` by default.  `id` remains as a fallback since
there seem to be some platforms where `logname` is not available:
https://github.com/ruby/spec/commit/49576b417ca3704cfb8271d2545c06c076c10cbc
------------------------------------------------------------------------
r61758 | mame | 2018-01-10 19:39:09 +0900 (Wed, 10 Jan 2018) | 9 lines

skip some tests so that no failure occurs in root privilege

Some tests had failed on `sudo make test-all`, mainly because root can
access any files regardless of permission.  This change adds `skip`
guards into such tests.

Note that almost all tests in which `skip` guards is added, already have
"windows" guard.  This is because there is no support to avoid read
access by owner on Windows.
------------------------------------------------------------------------
r61757 | mame | 2018-01-10 14:57:15 +0900 (Wed, 10 Jan 2018) | 3 lines

iseq.c: Succinct bitvector now supports 32-bit machine

Second try of succinct bitvector.
------------------------------------------------------------------------
r61756 | usa | 2018-01-10 12:54:02 +0900 (Wed, 10 Jan 2018) | 5 lines

should cause preprocess error as other cases

* string.c (NONASCII_MASK): should cause preprocess error immediately if the
  compiler does not satisfy our assumptions.

------------------------------------------------------------------------
r61755 | shyouhei | 2018-01-10 10:53:24 +0900 (Wed, 10 Jan 2018) | 4 lines

merge revisions 61753:61750 61747:61740 61737:61728

Revert all the VM generator rewrites; requested by naruse

------------------------------------------------------------------------
r61754 | normal | 2018-01-10 10:07:27 +0900 (Wed, 10 Jan 2018) | 8 lines

dir.c: pass flags to openat(2) correctly

Flags are 3rd argument of openat(2) while the 4th argument
(mode_t) is unnecessary for our uses.  This bug exists since
Ruby 2.5 from r58860 and was discoverd by strace.

* dir.c (nogvl_opendir_at): use openat correctly
  [Feature #13056] [Feature #14346]
------------------------------------------------------------------------
r61753 | svn | 2018-01-10 10:00:23 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61752 | hsbt | 2018-01-10 10:00:21 +0900 (Wed, 10 Jan 2018) | 4 lines

Fixed typos.

  * tool/ruby_vm/loaders/opt_operand_def.rb: grammer -> grammar
  * tool/ruby_vm/scripts/insns2vm.rb: beginnig -> beginning
------------------------------------------------------------------------
r61751 | kazu | 2018-01-10 09:01:31 +0900 (Wed, 10 Jan 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r61750 | normal | 2018-01-10 08:47:19 +0900 (Wed, 10 Jan 2018) | 4 lines

thread_pthread.c: remove dead code around "get_stack_of"

"get_stack_of" was only in a proposed patch for [Feature #8793]
https://bugs.ruby-lang.org/issues/8793 and never applied.
------------------------------------------------------------------------
r61749 | normal | 2018-01-10 07:59:58 +0900 (Wed, 10 Jan 2018) | 3 lines

thread.c: threadptr_pending_interrupt_active_p is static

It's not used elsewhere.
------------------------------------------------------------------------
r61748 | ko1 | 2018-01-10 02:09:23 +0900 (Wed, 10 Jan 2018) | 5 lines

use binary search for insns_info.

* vm_core.h (VM_INSN_INFO_TABLE_IMPL): use 1 (binary search)
  because 2 (succinct bitvector) doesn't work on Rasbian (x86_64).

------------------------------------------------------------------------
r61747 | svn | 2018-01-10 01:27:51 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61746 | ko1 | 2018-01-10 01:27:50 +0900 (Wed, 10 Jan 2018) | 5 lines

`signed` is required for Rasbian (x86_64).

* tool/ruby_vm/views/_insn_stack_increase.erb: specify `signed` explicitly
  for systems which use `unsigned` for `char` type.

------------------------------------------------------------------------
r61745 | svn | 2018-01-10 00:47:54 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61744 | naruse | 2018-01-10 00:47:53 +0900 (Wed, 10 Jan 2018) | 1 line

grep_v is ruby 2.3 feature
------------------------------------------------------------------------
r61743 | svn | 2018-01-10 00:41:11 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61742 | svn | 2018-01-10 00:41:11 +0900 (Wed, 10 Jan 2018) | 1 line

* 2018-01-10
------------------------------------------------------------------------
r61741 | naruse | 2018-01-10 00:41:10 +0900 (Wed, 10 Jan 2018) | 3 lines

Here document <<~ is Ruby 2.3 feature

baseruby should support wider ruby versions
------------------------------------------------------------------------
r61740 | mame | 2018-01-09 23:11:39 +0900 (Tue, 09 Jan 2018) | 1 line

iseq.c: Add explicit casts from long to int (to pass compile on clang)
------------------------------------------------------------------------
r61739 | mame | 2018-01-09 23:05:23 +0900 (Tue, 09 Jan 2018) | 1 line

iseq.c: Add a succinct bitvector implementation for insn_info_table
------------------------------------------------------------------------
r61738 | mame | 2018-01-09 23:05:21 +0900 (Tue, 09 Jan 2018) | 1 line

iseq.c (iseq_data_to_ary): Avoid direct use of insns_info.positions
------------------------------------------------------------------------
r61737 | svn | 2018-01-09 22:30:39 +0900 (Tue, 09 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61736 | shyouhei | 2018-01-09 22:30:35 +0900 (Tue, 09 Jan 2018) | 1 line

insns_info.inc.tmpl: share large tablese
------------------------------------------------------------------------
r61735 | shyouhei | 2018-01-09 22:30:34 +0900 (Tue, 09 Jan 2018) | 4 lines

insns_info.inc: position independent

* template/insns_info.inc.tmpl (insn_name_info): make position
  independent for large strings.
------------------------------------------------------------------------
r61734 | shyouhei | 2018-01-09 22:30:33 +0900 (Tue, 09 Jan 2018) | 1 line

comma at the end of enum is a C99ism.
------------------------------------------------------------------------
r61733 | shyouhei | 2018-01-09 22:30:31 +0900 (Tue, 09 Jan 2018) | 20 lines

delete tool/instruction.rb

Previous commit changed insns.def format. Now is the time for its
generators. In doing so I chose to modernize the system, not just
patch.  My attempt includes

- extensive use of Onigumo regular expressions
- split from one big file (instruction.rb) into separated MVC
- partial view

Also, let me take this opportunity to kill old unused features
such as

- stack caching
- minsns / yasmdata which are never seriously used
- yarvarch document generation (moved to doc/)
- vast majority of unused arguments to insns2vm.rb

This commit generates VM source codes that cleanly compile, and
the generated binary passes tests.  At least for me.
------------------------------------------------------------------------
r61732 | svn | 2018-01-09 22:30:30 +0900 (Tue, 09 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61731 | svn | 2018-01-09 22:30:30 +0900 (Tue, 09 Jan 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r61730 | shyouhei | 2018-01-09 22:30:29 +0900 (Tue, 09 Jan 2018) | 1 line

[ci skip] add comments about file format
------------------------------------------------------------------------
r61729 | shyouhei | 2018-01-09 22:30:28 +0900 (Tue, 09 Jan 2018) | 4 lines

new insns.def format

- Gave up @j comments
- Room for sp_inc to be a proper grammer element
------------------------------------------------------------------------
r61728 | shyouhei | 2018-01-09 22:30:27 +0900 (Tue, 09 Jan 2018) | 1 line

rb_num_t happen to be unsigned; introduce signed variant
------------------------------------------------------------------------
r61727 | mame | 2018-01-09 22:04:24 +0900 (Tue, 09 Jan 2018) | 4 lines

parse.y: insane syntax too (class definition in cond)

This change partially reverts r61724 and take another approach:
exploiting struct local_vars to backup the cond_stack state.
------------------------------------------------------------------------
r61726 | kazu | 2018-01-09 21:35:54 +0900 (Tue, 09 Jan 2018) | 1 line

Fix indent [ci skip]
------------------------------------------------------------------------
r61725 | kazu | 2018-01-09 21:35:12 +0900 (Tue, 09 Jan 2018) | 3 lines

Include ruby/{io,encoding}.h before internal.h

because of r61712 and r61713
------------------------------------------------------------------------
r61724 | nobu | 2018-01-09 21:33:38 +0900 (Tue, 09 Jan 2018) | 4 lines

parse.y: insane syntax

* parse.y (primary): save/restore COND and CMDARG stacks at method
  definition, to distinguish do_block and do_cond properly.
------------------------------------------------------------------------
r61723 | nobu | 2018-01-09 21:26:23 +0900 (Tue, 09 Jan 2018) | 4 lines

insns_info.inc.tmpl: split rb_vm_insn_name_info

* template/insns_info.inc.tmpl (rb_vm_insn_name_info): split
  instruction names pool not to exceed C90 limit.
------------------------------------------------------------------------
r61722 | nobu | 2018-01-09 20:52:17 +0900 (Tue, 09 Jan 2018) | 5 lines

thread_pthread.c: round stack size

* thread_pthread.c (rb_thread_create_timer_thread): round up
  additional stack size to PTHREAD_STACK_MIN, to get rid of
  EINVAL at pthread_attr_setstacksize().
------------------------------------------------------------------------
r61721 | mame | 2018-01-09 17:45:35 +0900 (Tue, 09 Jan 2018) | 8 lines

Rename code_range to code_location

Because the name "code_range" is ambiguous with encoding's.
Abbreviations ("crange", and "cr") are also renamed to "loc".

The traditional "code_location" (a pair of lineno and column) is
renamed to "code_position".  Abbreviations are also renamed
(first_loc to beg_pos, and last_loc to end_pos).
------------------------------------------------------------------------
r61720 | normal | 2018-01-09 17:26:43 +0900 (Tue, 09 Jan 2018) | 9 lines

thread_pthread: remove checks for pthread_cond*_init

These were added for NaCL support in r36022, and we dropped NaCL
in r60374.

IMHO, any pthreads implementation without these basic functions
is not worth the time to support.

[ruby-core:84758] [Misc #14342]
------------------------------------------------------------------------
r61719 | normal | 2018-01-09 17:26:38 +0900 (Tue, 09 Jan 2018) | 7 lines

thread_pthread: remove HAVE_PTHREAD_ATTR_INIT ifdefs

ifdefs make code confusing for my easily-confused mind :<
These were added for NaCL support in r36022, and we dropped NaCL
in r60374.  There are more #ifdefs to remove...

[ruby-core:84758] [Misc #14342]
------------------------------------------------------------------------
r61718 | mame | 2018-01-09 17:05:40 +0900 (Tue, 09 Jan 2018) | 1 line

bootstraptest/test_fork.rb: Stop too restrict NPROC test temporarily
------------------------------------------------------------------------
r61717 | mame | 2018-01-09 16:33:38 +0900 (Tue, 09 Jan 2018) | 3 lines

Fix the position of VM_ASSERT for "pthread_create failed for time"

Fix r61706.  Thank you, Eric Wong. [ruby-core:84756]
------------------------------------------------------------------------
r61716 | normal | 2018-01-09 16:15:44 +0900 (Tue, 09 Jan 2018) | 4 lines

thread_pthread: more diagnostics around timer thread creation failures

However, I don't think EAGAIN on pthread_create can really
be fixed in our code.  I suspect test machines are overloaded.
------------------------------------------------------------------------
r61715 | nobu | 2018-01-09 15:55:55 +0900 (Tue, 09 Jan 2018) | 1 line

update dependencies
------------------------------------------------------------------------
r61714 | nobu | 2018-01-09 15:55:54 +0900 (Tue, 09 Jan 2018) | 5 lines

update-deps: strip -j option

* update-deps: strip -j option from ENV['GNUMAKEFLAGS'], not
  dirstack to get confused by intermingled entering/leaveing
  directory messages.
------------------------------------------------------------------------
r61713 | nobu | 2018-01-09 15:24:11 +0900 (Tue, 09 Jan 2018) | 1 line

internal.h: remove dependecy on ruby/encoding.h
------------------------------------------------------------------------
r61712 | nobu | 2018-01-09 15:24:10 +0900 (Tue, 09 Jan 2018) | 1 line

internal.h: remove dependecy on ruby/io.h
------------------------------------------------------------------------
r61711 | mame | 2018-01-09 15:17:21 +0900 (Tue, 09 Jan 2018) | 12 lines

compile.c (iseq_compile_each0): remove irrelevant tracecoverage

This change removes tracecoverage instructions on a line that has any
NODE but is non-significant, such as, just one literal.

This fixes the following failure that occurs only when coverage is
enabled:

  1) Failure:
TestISeq#test_to_a_lines [.../ruby/test/ruby/test_iseq.rb:56]:
<[3, 4, 7, 9]> expected but was
<[3, 4, 5, 6, 7, 8, 9]>.
------------------------------------------------------------------------
r61710 | mame | 2018-01-09 14:19:18 +0900 (Tue, 09 Jan 2018) | 3 lines

Allow `-> do rescue; end` as well as `proc do rescue; end`

https://twitter.com/takiuchi/status/950593389963051008
------------------------------------------------------------------------
r61709 | mame | 2018-01-09 14:03:03 +0900 (Tue, 09 Jan 2018) | 4 lines

parse.y: Remove redefinition of malloc

Because the purpose is now unsure (maybe, to support very old bison?).
If an issue occurs, it should be resurrected with explicit comment.
------------------------------------------------------------------------
r61708 | mame | 2018-01-09 13:27:26 +0900 (Tue, 09 Jan 2018) | 1 line

parse.y: PARSER_DEBUG is no longer used
------------------------------------------------------------------------
r61707 | mame | 2018-01-09 12:48:26 +0900 (Tue, 09 Jan 2018) | 3 lines

parse.y: Remove meaningless ifndef guards

Because the part of the code is already within `#ifndef RIPPER`.
------------------------------------------------------------------------
r61706 | mame | 2018-01-09 12:47:22 +0900 (Tue, 09 Jan 2018) | 5 lines

Explicit failure in VM_CHECK_MODE when failing to create timer thread

"warning: pthread_create failed for timer: Resource temporarily
unavailable, scheduling broken" still occurs randomly.  This change will
allow us to debug the issue.
------------------------------------------------------------------------
r61705 | nobu | 2018-01-09 12:37:36 +0900 (Tue, 09 Jan 2018) | 1 line

common.mk (srcs_vpath): renamed for nmake
------------------------------------------------------------------------
r61704 | normal | 2018-01-09 11:45:03 +0900 (Tue, 09 Jan 2018) | 12 lines

use predefined ids in a few more places

Saves a little space on x86:

   text	   data	    bss	    dec	    hex	filename
3684110	  11968	  34240	3730318	 38eb8e	ruby.before
3684086	  11968	  34240	3730294	 38eb76	ruby.after

* enumerator.c: include id.h, define aliases
  (Init_Enumeerator): remove unnecessary rb_intern calls
* gc.c (should_be_callable): use idCall
* vm.c (Init_VM): ditto
------------------------------------------------------------------------
r61703 | nobu | 2018-01-09 11:10:58 +0900 (Tue, 09 Jan 2018) | 4 lines

gmake.mk: update srcdir files

* defs/gmake.mk (commit): update source files under the sources
  directory after commit.
------------------------------------------------------------------------
r61702 | nobu | 2018-01-09 10:56:05 +0900 (Tue, 09 Jan 2018) | 1 line

parse.y: set ID to yylval ID instead of token
------------------------------------------------------------------------
r61701 | mame | 2018-01-09 10:49:40 +0900 (Tue, 09 Jan 2018) | 3 lines

parse.y: Remove special handling of tOROP and tANDOP

The complexity is no longer considered necessary.
------------------------------------------------------------------------
r61700 | ktsj | 2018-01-09 10:46:07 +0900 (Tue, 09 Jan 2018) | 3 lines

.gdbinit (print_lineno): follow up changes in r61534, r61536

insns_info was refactored.
------------------------------------------------------------------------
r61699 | nobu | 2018-01-09 10:10:15 +0900 (Tue, 09 Jan 2018) | 1 line

parse.y: use change_shortcut_operator_id
------------------------------------------------------------------------
r61698 | nobu | 2018-01-09 09:25:27 +0900 (Tue, 09 Jan 2018) | 1 line

wrap statement expression with __extension__
------------------------------------------------------------------------
r61697 | yui-knk | 2018-01-09 09:19:51 +0900 (Tue, 09 Jan 2018) | 6 lines

parse.y: Remove duplicated nd_line set

* parse.y: These nodes are created with `@$` locations.
  Start position of `@$` is same as start position of `@1`.
  And NEW_XXX macros set first_loc.lineno of a passed
  code range to nd_line. So these nd_set_line are not needed.
------------------------------------------------------------------------
r61696 | nobu | 2018-01-09 09:06:00 +0900 (Tue, 09 Jan 2018) | 1 line

constified
------------------------------------------------------------------------
r61695 | nobu | 2018-01-09 08:35:36 +0900 (Tue, 09 Jan 2018) | 4 lines

vm.c: remove extra ifdef

* vm.c (rb_execution_context_mark): VM_ASSERT works only if
  VM_CHECK_MODE > 0.
------------------------------------------------------------------------
r61694 | ko1 | 2018-01-09 01:06:33 +0900 (Tue, 09 Jan 2018) | 10 lines

use `getblockparamproxy` to pass blocks.

* compile.c (setup_args): use `getblockparamproxy` (`rb_block_param_proxy`)
  to represent a block parameter passing.

* vm_args.c (vm_caller_setup_arg_block): check `rb_block_param_proxy`
  instead of using `VM_CALL_ARGS_BLOCKARG_BLOCKPARAM` call flag.

* vm_core.h (VM_CALL_ARGS_BLOCKARG_BLOCKPARAM): removed.

------------------------------------------------------------------------
r61693 | ko1 | 2018-01-09 01:00:38 +0900 (Tue, 09 Jan 2018) | 5 lines

fix a bug only on assertion.

* vm.c (rb_execution_context_mark): check escaped directly
  to skip assertions. Not sure why there is an inconsistency.

------------------------------------------------------------------------
r61692 | svn | 2018-01-09 00:27:57 +0900 (Tue, 09 Jan 2018) | 1 line

* 2018-01-09
------------------------------------------------------------------------
r61691 | ko1 | 2018-01-09 00:27:56 +0900 (Tue, 09 Jan 2018) | 7 lines

fix mark miss of Env (which is pointed by prev_ep).

* vm.c (rb_execution_context_mark): r61624 and r61659 introduce marking miss
  bug for Env objects as a prev_ep which is contained by Proc objects because
  Proc objects can be collected when they should be living and Env objects
  will collected unexpectedly. This patch solves this problem.

------------------------------------------------------------------------
r61690 | mame | 2018-01-08 21:56:58 +0900 (Mon, 08 Jan 2018) | 10 lines

parse.y: Make consistent with the terms about code ranges and locations

"loc" was ambiguous; it might refer both a location and a code range.
This change uses "loc" for a location, and "crange" or "cr" for a code
range.

A location (abbr. loc) is a point in a program and consists of line
number and column number.  A code range (abbr. crange and cr) is a range
within a program and consists of a pair of locations which is the first
and the last.
------------------------------------------------------------------------
r61689 | yui-knk | 2018-01-08 21:39:58 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y (remove_duplicate_keys): Remove a not used argument
------------------------------------------------------------------------
r61688 | mame | 2018-01-08 21:30:35 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: Factor out code fragments that merges two code ranges
------------------------------------------------------------------------
r61687 | yui-knk | 2018-01-08 21:23:56 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y (block_append_gen): Remove a not used argument
------------------------------------------------------------------------
r61686 | yui-knk | 2018-01-08 21:23:53 +0900 (Mon, 08 Jan 2018) | 28 lines

parse.y: Use nd_loc of head and tail

* parse.y (block_append_gen): Use nd_loc of
  head(tail) when create NEW_BLOCK of head(tail).

  e.g. The locations of the NODE_BLOCK is fixed:

  ```
  BEGIN {
    :a
  }

  BEGIN {
    :b
  }
  ```

  * Before

  ```
  NODE_BLOCK (line: 5, code_range: (5,0)-(7,1))
  ```

  * After

  ```
  NODE_BLOCK (line: 1, code_range: (1,0)-(7,1))
  ```
------------------------------------------------------------------------
r61685 | yui-knk | 2018-01-08 20:50:35 +0900 (Mon, 08 Jan 2018) | 16 lines

parse.y: Fix the lineno of nd_set_line

* parse.y: Follow up of r61676. r61676 removed
  ruby_sourceline from some actions. When stop to
  use lineno of "n th" symbol, it's better to
  use last location's lineno of "n-1 th" symbol.

  e.g.

  ```
  primary : k_begin {} bodystmt k_end
  ```

  Before r61676 we use lineno of `@2` (ruby_sourceline).
  In this case, last location's lineno of `k_begin` (`@1`)
  is suitable.
------------------------------------------------------------------------
r61684 | normal | 2018-01-08 19:23:27 +0900 (Mon, 08 Jan 2018) | 50 lines

net/http: clear compressed chunk after decompression

We no longer need the compressed data once the inflate block is
called; so clear it ASAP to reduce memory overhead.  This is a
small chunk, so it only saves a few hundred kilobytes with the
script below.

before:        RssAnon:     5976 kB
 after:        RssAnon:     5564 kB
------
require 'net/http'
require 'zlib'
response_gz = ARGV.shift or abort "#$0 TEMPORARY_FILE"

 # pre-create response since compressing is slower than decompressing
unless File.readable?(response_gz)
  nr = 16384 * 2
  buf = ((0..255).map(&:chr).join * 128)
  File.open(response_gz, 'wb') do |fp|
    gzip = Zlib::GzipWriter.new(fp)
    nr.times { gzip.write(buf) }
    gzip.close
  end
  buf.clear
end
response_gz = File.open(response_gz)

s = TCPServer.new('127.0.0.1', 0)
pid = fork do
  c = s.accept
  c.readpartial(16384).clear
  c.write("HTTP/1.1 200 OK\r\n" \
          "Content-Length: #{response_gz.stat.size}\r\n" \
          "Content-Encoding: gzip\r\n" \
          "Accept-Ranges: bytes\r\n" \
          "\r\n")
  IO.copy_stream(response_gz, c)
  c.close
end

addr = s.addr
Net::HTTP.start(addr[3], addr[1]) do |http|
  http.request_get(-'/') do |res|
    res.read_body(&:clear)
  end
end
puts File.readlines(-'/proc/self/status').grep(/RssAnon/)[0]
Process.waitpid2(pid)
------
* lib/net/http/response.rb (inflate_adapter): clear compressed_chunk
------------------------------------------------------------------------
r61683 | hsbt | 2018-01-08 19:12:41 +0900 (Mon, 08 Jan 2018) | 1 line

Update minitest-5.11.1
------------------------------------------------------------------------
r61682 | mame | 2018-01-08 18:39:01 +0900 (Mon, 08 Jan 2018) | 4 lines

parse.y: Remove dispose_string

I think that recycling the delimiter string objects doesn't pay its
complexity.
------------------------------------------------------------------------
r61681 | nobu | 2018-01-08 18:11:26 +0900 (Mon, 08 Jan 2018) | 4 lines

vm_insnhelper.c: vm_invoke_block_opt_call

* vm_insnhelper.c (vm_invoke_block_opt_call): renamed with sliding
  arguments.
------------------------------------------------------------------------
r61680 | nobu | 2018-01-08 18:04:07 +0900 (Mon, 08 Jan 2018) | 12 lines

vm.c: respect redefinition of Proc#call

* vm.c (vm_redefinition_check_method_type): hoist out method
  definition type to check redefinition.

* vm.c (rb_vm_check_redefinition_opt_method): should check
  optimized method too.

* vm.c (vm_init_redefined_flag): check Proc#call.

* vm_insnhelper.c (vm_call_opt_block_call): search proper method
  if redefined.  [Bug #14335]
------------------------------------------------------------------------
r61679 | kazu | 2018-01-08 17:12:04 +0900 (Mon, 08 Jan 2018) | 1 line

Add parens [ci skip]
------------------------------------------------------------------------
r61678 | nobu | 2018-01-08 15:55:12 +0900 (Mon, 08 Jan 2018) | 1 line

node.c: show newline node mark
------------------------------------------------------------------------
r61677 | mame | 2018-01-08 15:54:55 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Use last_loc.lineno instead of ruby_sourceline

State-less way is better.
------------------------------------------------------------------------
r61676 | mame | 2018-01-08 15:30:53 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Remove `$<num>$ = ruby_sourceline` hacks

Instead, use bison's lineno.
------------------------------------------------------------------------
r61675 | nobu | 2018-01-08 14:17:09 +0900 (Mon, 08 Jan 2018) | 3 lines

compile.c: compile_case2 branch

* compile.c (compile_case2): compile as a branch condition.
------------------------------------------------------------------------
r61674 | nobu | 2018-01-08 14:17:08 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: constified NULL_LOC
------------------------------------------------------------------------
r61673 | mrkn | 2018-01-08 13:35:20 +0900 (Mon, 08 Jan 2018) | 1 line

doc/NEWS-2.5.0: Time.at is a class method
------------------------------------------------------------------------
r61672 | mame | 2018-01-08 12:22:13 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: Factor out special handling of a short-cut operator id
------------------------------------------------------------------------
r61671 | yui-knk | 2018-01-08 11:38:21 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Remove duplicated nd_loc set

* parse.y: nd_loc is set by NEW_CASE2/NEW_WHEN
------------------------------------------------------------------------
r61670 | mame | 2018-01-08 11:36:12 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: Embed simple wrapper functions for NEW_NODEs
------------------------------------------------------------------------
r61669 | yui-knk | 2018-01-08 11:24:18 +0900 (Mon, 08 Jan 2018) | 4 lines

parse.y: Make NULL_LOC to be internal

* parse.y (NULL_LOC): We will create NODEs only
  inside of parse.y, so make NULL_LOC to be internal.
------------------------------------------------------------------------
r61668 | mame | 2018-01-08 11:19:47 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Remove unneeded wrapper functions for NEW_NODEs

Just refactoring.
------------------------------------------------------------------------
r61667 | mame | 2018-01-08 10:49:00 +0900 (Mon, 08 Jan 2018) | 9 lines

parse.y: set bison's first_loc.lineno to nd_line by default

This change initializes nd_line, lineno of each node, by default, by
using the first line number of code range that bison tracks, instead of
extracting from lexer state.
The lexer state basically provides only the last line number of code
range, so many hacks are used to approximate the first line number.  The
hacks have been introduced on demand, or very ad-hocly.  I think this
change will make it possible to remove most of the hacks.
------------------------------------------------------------------------
r61666 | mame | 2018-01-08 10:29:35 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: make all NEW_NODE macros receive location

This looks a big change, but just for refactoring.
------------------------------------------------------------------------
r61665 | normal | 2018-01-08 10:11:38 +0900 (Mon, 08 Jan 2018) | 47 lines

zlib: reduce garbage on Zlib::GzipReader#readpartial

For garbage-concious users who use the `outbuf' argument of
`readpartial' to supply a destination buffer, this provides
a drastic reduction in garbage when inflating large inputs
in a streaming fashion.

This results in a anonymous RSS reduction in the reader
similar to the reduction in the writer from r61631.

Results using the test script from r61631
<https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61631>

Before:

        writer   7.359999   0.000000   7.359999 (  7.360639)
        writer RssAnon:     4040 kB
        reader   6.346667   0.070000   6.416667 (  7.387654)
        reader RssAnon:    98272 kB

After:

        writer   7.309999   0.000000   7.309999 (  7.310651)
        writer RssAnon:	    4048 kB
        reader   6.146666   0.003333   6.149999 (  7.334868)
        reader RssAnon:	    4300 kB

* ext/zlib/zlib.c (struct read_raw_arg): new struct
  (gzfile_read_raw_partial): use read_raw_arg
  (gzfile_read_raw_rescue): ditto
  (gzfile_read_raw): accept outbuf, use read_raw_arg
  (gzfile_read_raw_ensure): accept outbuf
  (gzfile_read_header): ditto
  (gzfile_check_footer): ditto
  (gzfile_read_more): ditto
  (gzfile_read_raw_until_zero): adjust for changes
  (gzfile_fill): ditto
  (gzfile_readpartial): ditto
  (gzfile_read_all): ditto
  (gzfile_getc): ditto
  (gzfile_reader_end_run): ditto
  (gzfile_reader_get_unused): ditto
  (rb_gzreader_initialize): ditto
  (gzreader_skip_linebreaks): ditto
  (gzreader_gets): ditto
  (zlib_gunzip_run): ditto
  [ruby-core:84660] [Feature #14319]
------------------------------------------------------------------------
r61664 | normal | 2018-01-08 10:11:33 +0900 (Mon, 08 Jan 2018) | 51 lines

open-uri: clear string after buffering

Since r58846 (in Ruby 2.5), it is safe to clear the string
yielded to Net::HTTPResponse#read_body methods.  This
reduces malloc garbage (anonymous RSS) using the Linux-only
script below:

before:  user     system      total        real
      0.030000   0.250000   0.280000 (  0.280511)
    RssAnon:	   60240 kB

 after:  user     system      total        real
      0.050000   0.223333   0.273333 (  0.273118)
    RssAnon:	    6676 kB

------
  # warning this script requires 1G free space for buffering
require 'open-uri'
require 'socket'
require 'benchmark'

s = TCPServer.new('127.0.0.1', 0)
len = 1024 * 1024 * 1024
buf = ((0..255).map(&:chr).join * 128)
nr = len / buf.size
pid = fork do
  c = s.accept
  c.readpartial(16384).clear
  c.write("HTTP/1.1 200 OK\r\n" \
	  "Content-Length: #{len}\r\n" \
          "Content-Type: application/octet-stream\r\n" \
          "\r\n")
  buf.freeze # speeds up IO#write slightly
  nr.times { c.write(buf) }
  c.close
end

addr = s.addr
open("http://#{addr[3]}:#{addr[1]}/", "rb") do |fp|
  bm = Benchmark.measure do
    while fp.read(16384, buf)
    end
  end
  puts bm
end
puts File.readlines("/proc/#$$/status").grep(/RssAnon/)[0]
Process.waitpid2(pid)
------

* lib/open-uri.rb: clear string yielded by Net::HTTPResponse#read_body
  [ruby-core:84662] [Feature #14320]
------------------------------------------------------------------------
r61663 | normal | 2018-01-08 09:34:47 +0900 (Mon, 08 Jan 2018) | 41 lines

net/protocol: read directly into rbuf if it's empty

There's no need to allocate a temporary string when @rbuf is
empty, we can use it as the read_nonblock destination buffer to
save both allocation overhead and avoid a later memcpy.

This results in a halving user CPU time and tiny memory
reduction with the script below:

             user     system      total        real
before   0.603333   0.539999   1.143332 (  1.143347)
       RssAnon:     5624 kB

after    0.283334   0.560000   0.843334 (  0.846072)
       RssAnon:     5592 kB

------
require 'net/http'
require 'benchmark'
s = TCPServer.new('127.0.0.1', 0)
len = 1024 * 1024 * 1024 * 2
pid = fork do
  c = s.accept
  c.readpartial(16384).clear
  c.send("HTTP/1.0 200 OK\r\nContent-Length: #{len}\r\n\r\n", Socket::MSG_MORE)
  IO.copy_stream('/dev/zero', c, len)
  c.close
end

addr = s.addr
Net::HTTP.start(addr[3], addr[1]) do |http|
  http.request_get('/') do |res|
    puts(Benchmark.measure { res.read_body(&:clear) })
  end
end
puts File.readlines("/proc/self/status").grep(/RssAnon/)[0]
Process.waitpid2(pid)
------

* lib/net/protocol.rb (rbuf_fill): avoid allocation if rbuf is empty
  [ruby-core:84678] [Feature #14326]
------------------------------------------------------------------------
r61662 | normal | 2018-01-08 09:34:42 +0900 (Mon, 08 Jan 2018) | 7 lines

net/protocol: use binary string buffers

Not an encoding expert, but this seems necessary for the next
change.  All of the IO#read, IO#read_nonblock and related
methods will return a binary string when given a length
argument; so anything appended to these buffers via <<
will be binary.
------------------------------------------------------------------------
r61659 | ko1 | 2018-01-08 04:18:49 +0900 (Mon, 08 Jan 2018) | 19 lines

Speedup `block.call` [Feature #14330]

* insns.def (getblockparamproxy): introduce new instruction to return
  the `rb_block_param_proxy` object if possible. This object responds
  to `call` method and invoke given block (completely similar to `yield`).

* method.h (OPTIMIZED_METHOD_TYPE_BLOCK_CALL): add new optimized call type
  which is for `rb_block_param_proxy.cal`.

* vm_insnhelper.c (vm_call_method_each_type): ditto.

* vm_insnhelper.c (vm_call_opt_block_call): ditto.

* vm_core.h (BOP_CALL, PROC_REDEFINED_OP_FLAG): add check for `Proc#call`
  redefinition.

* compile.c (iseq_compile_each0): compile to use new insn
  `getblockparamproxy` for method call.

------------------------------------------------------------------------
r61658 | stomar | 2018-01-08 02:49:46 +0900 (Mon, 08 Jan 2018) | 1 line

lib/scanf.rb: [DOC] fix typos
------------------------------------------------------------------------
r61657 | svn | 2018-01-08 02:47:54 +0900 (Mon, 08 Jan 2018) | 1 line

* 2018-01-08
------------------------------------------------------------------------
r61656 | stomar | 2018-01-08 02:47:53 +0900 (Mon, 08 Jan 2018) | 1 line

doc/NEWS-2.5.0: improve language
------------------------------------------------------------------------
r61655 | mame | 2018-01-07 21:55:10 +0900 (Sun, 07 Jan 2018) | 1 line

node.c: fix SEGV of `->(a:){}` when --dump=parsetree
------------------------------------------------------------------------
r61654 | nobu | 2018-01-07 20:51:30 +0900 (Sun, 07 Jan 2018) | 1 line

parse.y: do not overwrite case_body position
------------------------------------------------------------------------
r61653 | nobu | 2018-01-07 20:51:29 +0900 (Sun, 07 Jan 2018) | 1 line

parse.y: set case_body line position to args
------------------------------------------------------------------------
r61652 | nobu | 2018-01-07 18:44:34 +0900 (Sun, 07 Jan 2018) | 1 line

parse.y: removed unused macro new_command_call
------------------------------------------------------------------------
r61651 | nobu | 2018-01-07 18:36:48 +0900 (Sun, 07 Jan 2018) | 3 lines

parse.y: nd_line of new_qcall

* parse.y (new_qcall): set nd_line to the method name location.
------------------------------------------------------------------------
r61650 | nobu | 2018-01-07 14:38:37 +0900 (Sun, 07 Jan 2018) | 5 lines

eval_error.c: reset in each line

* eval_error.c (print_errinfo): reset in each line, so that
  Exception#full_message ends with a newline and puts will not
  print an extra newline.
------------------------------------------------------------------------
r61649 | nobu | 2018-01-07 13:57:04 +0900 (Sun, 07 Jan 2018) | 4 lines

eval_error.c: concat directly

* eval_error.c (write_warn, write_warn2): get rid of unnecessary
  intermediate string objects, concat directly.
------------------------------------------------------------------------
r61648 | nobu | 2018-01-07 13:23:55 +0900 (Sun, 07 Jan 2018) | 4 lines

test_exception.rb: fix message

* test/ruby/test_exception.rb (test_full_message): fix method name
  in a message.
------------------------------------------------------------------------
r61647 | nobu | 2018-01-07 13:16:31 +0900 (Sun, 07 Jan 2018) | 4 lines

eval_error.c: renamed an argument

* eval_error.c (print_errinfo): renamed argument `colored` as
  `highlight`, as it does not use colors.
------------------------------------------------------------------------
r61646 | nobu | 2018-01-07 13:10:06 +0900 (Sun, 07 Jan 2018) | 4 lines

io.c: rb_stderr_to_original_p

* io.c (rb_stderr_to_original_p): hoist out the condition to write
  messages to the stderr FD directly.
------------------------------------------------------------------------
r61645 | hsbt | 2018-01-07 12:14:19 +0900 (Sun, 07 Jan 2018) | 3 lines

Added bundler for `test-bundled-gems` dependency.

  rake, did_you_mean, test-unit depends on bundler.
------------------------------------------------------------------------
r61644 | nobu | 2018-01-07 12:10:00 +0900 (Sun, 07 Jan 2018) | 4 lines

prelude.rb: eliminate a private constant

* prelude.rb (Thread.exclusive): eliminate a private constant,
  MUTEX_FOR_THREAD_EXCLUSIVE.
------------------------------------------------------------------------
r61643 | nobu | 2018-01-07 11:49:27 +0900 (Sun, 07 Jan 2018) | 3 lines

extmk.rb: exclude recursively

* ext/extmk.rb: exclude extension libraries recursively.
------------------------------------------------------------------------
r61642 | svn | 2018-01-07 10:20:11 +0900 (Sun, 07 Jan 2018) | 1 line

* 2018-01-07
------------------------------------------------------------------------
r61641 | mrkn | 2018-01-07 10:20:10 +0900 (Sun, 07 Jan 2018) | 3 lines

doc/NEWS-2.5.0: Fix the description of backtrace format change

* The backtrace format change is affected by $stderr, but not STDERR.
------------------------------------------------------------------------
r61640 | normal | 2018-01-06 18:23:43 +0900 (Sat, 06 Jan 2018) | 4 lines

Revert "net/protocol: use binary string buffers"

Oops, not ready, yet (will work on this tomorrow :x).
This reverts commit r61638
------------------------------------------------------------------------
r61639 | normal | 2018-01-06 18:21:35 +0900 (Sat, 06 Jan 2018) | 11 lines

net/ftp: fix FrozenError in BufferedSocket

I noticed this bug while working on something else with
RUBYOPT=-d on, existing test cases all passed with it.

Note: I use String.new because it is the local style, here,
I prefer +'' (or ''.b, for a future commit)

* lib/net/ftp.rb (BufferedSocket#read): use String.new
* test/net/ftp/test_buffered_socket.rb (test_read_nil): new test
  [ruby-core:84675] [Bug #14323]
------------------------------------------------------------------------
r61638 | normal | 2018-01-06 18:21:12 +0900 (Sat, 06 Jan 2018) | 4 lines

net/protocol: use binary string buffers

Not an encoding expert, but this seems necessary for the next
change.
------------------------------------------------------------------------
r61637 | nobu | 2018-01-06 18:01:02 +0900 (Sat, 06 Jan 2018) | 5 lines

test_process.rb: skip not-found groups

* test/ruby/test_process.rb (test_execopts_gid): under some
  network configuration (maybe with Open Directory but
  disconnected temporarily), some groups may fail to find.
------------------------------------------------------------------------
r61636 | nobu | 2018-01-06 17:44:17 +0900 (Sat, 06 Jan 2018) | 4 lines

string.c: out-of-bounds access

* string.c (rb_str_enumerate_lines): fix out-of-bounds access when
  record separator is longer than the last element.  [Bug #14257]
------------------------------------------------------------------------
r61635 | kazu | 2018-01-06 13:55:07 +0900 (Sat, 06 Jan 2018) | 3 lines

Update Status Code

see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
------------------------------------------------------------------------
r61634 | kazu | 2018-01-06 13:55:06 +0900 (Sat, 06 Jan 2018) | 3 lines

Add 103 Early Hints

see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
------------------------------------------------------------------------
r61633 | kazu | 2018-01-06 13:55:05 +0900 (Sat, 06 Jan 2018) | 1 line

Specify frozen_string_literal: true
------------------------------------------------------------------------
r61632 | normal | 2018-01-06 06:14:19 +0900 (Sat, 06 Jan 2018) | 10 lines

io.c: clear Strings we create for IO.copy_stream

While we can't recycle strings after giving them rb_funcall*,
we can reduce their malloc overhead by resizing them to zero.
This only affects cases where either `src' or `dst' is a non-IO
object and either `copy_length' is passed or there is
pre-existing data in the read buffer.

* io.c (copy_stream_fallback_body): clear when done with `copy_length'
  (copy_stream_body): clear when done with pre-existing read buffer
------------------------------------------------------------------------
r61631 | normal | 2018-01-06 05:48:55 +0900 (Sat, 06 Jan 2018) | 76 lines

zlib: reduce garbage on gzip writes (deflate)

Zlib::GzipWriter generated large amounts of garbage from
(struct zstream).input.  Reuse the .input field when it is
hidden, and recycle it when its lifetime is over.  This change
alone reduced memory usage of the writer from 90MB to 4.5MB.

For the detached buffer of compressed data used by
gzfile_write_raw, we can only clear the string (not recycle it)
since user code may hold references to it (but the data would be
clobbered, anyways).  This reduced memory usage slightly by
around 0.5MB (because it's smaller compressed data).

Combined, these changes reduce the anonymous RSS memory of a
dedicated writer process from over 90MB to under 4MB.

before:

    #      user     system      total        real

    writer   7.823332   0.053333   7.876665 (  7.881464)
    writer RssAnon:    92944 kB
    reader   6.969999   0.076666   7.046665 (  7.906377)
    reader RssAnon:   109820 kB

after:

    writer   7.359999   0.000000   7.359999 (  7.360639)
    writer RssAnon:     4040 kB
    reader   6.346667   0.070000   6.416667 (  7.387654)
    reader RssAnon:    98272 kB

Script used:
-------
require 'zlib'
require 'benchmark'
nr = 16384 * 2

def stats(pfx, bm)
  str = "#{bm}#{File.readlines("/proc/#$$/status").grep(/^RssAnon:/)[0]}"
  puts str.gsub!(/^/m, pfx)
end

rd, wr = IO.pipe
pid = fork do
  buf = ((0..255).map(&:chr).join * 128).freeze
  rd.close
  gzip = Zlib::GzipWriter.new(wr)
  bm = Benchmark.measure do
    nr.times { gzip.write(buf) }
    gzip.close
    wr.close
  end
  stats('writer ', bm)
end

wr.close
buf = ''
gunzip = Zlib::GzipReader.new(rd)
n = 0
bm = Benchmark.measure do
  begin
    gunzip.readpartial(16384, buf)
    n += buf.size
  rescue EOFError
    break
  end while true
end
stats('reader ', bm)
Process.waitall
-------
* ext/zlib/zlib.c (zstream_discard_input): reuse or recycle hidden input
  (zstream_reset_input): clear hidden input
  (zstream_run): detach input and recycle after use
  (gzfile_write_raw): clear buffer after write
  [ruby-core:84638] [Feature #14315]
------------------------------------------------------------------------
r61627 | naruse | 2018-01-06 05:38:02 +0900 (Sat, 06 Jan 2018) | 1 line

Extend timeout of test_clear_unreachable_keyword_args
------------------------------------------------------------------------
r61626 | naruse | 2018-01-06 05:36:46 +0900 (Sat, 06 Jan 2018) | 3 lines

Show how many seconds it timeouts

By this we can easily extend timeout.
------------------------------------------------------------------------
r61625 | naruse | 2018-01-06 04:24:48 +0900 (Sat, 06 Jan 2018) | 1 line

extend timeout to 15 seconds for ARMv8 environment
------------------------------------------------------------------------
r61624 | ko1 | 2018-01-06 02:51:10 +0900 (Sat, 06 Jan 2018) | 11 lines

Speedup `Proc#call` [Feature #14318]

* vm_insnhelper.c (vm_call_opt_call): do same process of `yield` instead of
  invoking `Proc`.

* vm_insnhelper.c (vm_invoke_block): invoke given block handler instead of
  using a block handler in the current frame.
  Also do not check blcok handler here (caller should check it).

* insns.def (invokeblock): catch up this fix.

------------------------------------------------------------------------
r61623 | mame | 2018-01-06 01:04:02 +0900 (Sat, 06 Jan 2018) | 1 line

parse.y: Use nd_set_loc instead of direct modification to nd_loc
------------------------------------------------------------------------
r61622 | mame | 2018-01-06 01:04:00 +0900 (Sat, 06 Jan 2018) | 3 lines

parse.y: Remove unneeded code

Because block_append sets prelude->nd_loc.
------------------------------------------------------------------------
r61621 | mame | 2018-01-06 00:44:03 +0900 (Sat, 06 Jan 2018) | 3 lines

parse.y: make method_add_block accept location

Also, use method_add_block instead of direct modification to nd_iter.
------------------------------------------------------------------------
r61620 | svn | 2018-01-06 00:16:43 +0900 (Sat, 06 Jan 2018) | 1 line

* 2018-01-06
------------------------------------------------------------------------
r61619 | mame | 2018-01-06 00:16:42 +0900 (Sat, 06 Jan 2018) | 1 line

node_h (NEW_DEFN): remove unused argument
------------------------------------------------------------------------
r61618 | nobu | 2018-01-05 23:23:23 +0900 (Fri, 05 Jan 2018) | 6 lines

compile.c: fix stack consistency error

* compile.c (iseq_peephole_optimize): fix stack consistency error
  from return in loop, by adding extra `pop` when replacing `jump`
  with `leave`, which is never reached but needed to adjust sp
  calculation.  [ruby-core:84589] [Bug #14273]
------------------------------------------------------------------------
r61617 | nobu | 2018-01-05 23:23:22 +0900 (Fri, 05 Jan 2018) | 4 lines

compile.c: remove more unreachable chunk

* compile.c (remove_unreachable_chunk): remove beyond labels to be
  removed.
------------------------------------------------------------------------
r61616 | k0kubun | 2018-01-05 20:44:31 +0900 (Fri, 05 Jan 2018) | 9 lines

marshal.c: allow marshalling keyword_init struct

struct.c: define rb_struct_s_keyword_init to shared with marshal.c

internal.h: add the declaration to be used by marshal.c

test/ruby/test_marshal.rb: add test for Bug#14314

[Feature #14314] [ruby-core:84629]
------------------------------------------------------------------------
r61615 | mame | 2018-01-05 20:39:27 +0900 (Fri, 05 Jan 2018) | 1 line

node.c: factor out the part of operator output into F_OPERATOR
------------------------------------------------------------------------
r61614 | mame | 2018-01-05 20:39:25 +0900 (Fri, 05 Jan 2018) | 3 lines

node.c: remove unused macro F_OPTION

Follow up of r61610
------------------------------------------------------------------------
r61613 | mame | 2018-01-05 19:46:24 +0900 (Fri, 05 Jan 2018) | 1 line

node.c (NODE_OP_CDECL): fix a typo bug.
------------------------------------------------------------------------
r61612 | normal | 2018-01-05 19:30:40 +0900 (Fri, 05 Jan 2018) | 5 lines

zlib: remove redundant rb_obj_reveal

No need to reveal strings freshly created with rb_str_new.

* ext/zlib/zlib.c (zstream_detach_input): remove redundant call
------------------------------------------------------------------------
r61611 | normal | 2018-01-05 18:41:21 +0900 (Fri, 05 Jan 2018) | 11 lines

tool/rbinstall.rb: allow owner to have write permissions

Denying write permissions to the owner seems wrong.

Oddly, this problem only manifests in the "ruby_2_4" branch when
installing bundled gems (rake and friends).  It does not happen
with "ruby_2_3", or "trunk", so it might be related to RubyGems
changes.

* tool/rbinstall.rb: set umask to 022
  [ruby-core:84420] [Bug #14227]
------------------------------------------------------------------------
r61610 | mame | 2018-01-05 17:59:23 +0900 (Fri, 05 Jan 2018) | 8 lines

node.h: remove NODE_PRELUDE

NODE_PRELUDE contains a `BEGIN` node, a main node, and compile_option.
This node is assumed that it must be located immediately under the root
NODE_SCOPE, but this strange assumption is not so good, IMO.

This change removes the assumtion; it integrates the former two nodes by
block_append, and moves compile_option into rb_ast_body_t.
------------------------------------------------------------------------
r61609 | mame | 2018-01-05 17:59:22 +0900 (Fri, 05 Jan 2018) | 1 line

make rb_iseq_new* accept rb_ast_body_t instead of NODE*
------------------------------------------------------------------------
r61608 | mame | 2018-01-05 17:59:20 +0900 (Fri, 05 Jan 2018) | 1 line

node.h: define rb_ast_body_t and restructure rb_ast_t
------------------------------------------------------------------------
r61607 | mame | 2018-01-05 16:47:51 +0900 (Fri, 05 Jan 2018) | 1 line

node.c: constify NODE* arguments in node.c
------------------------------------------------------------------------
r61606 | ko1 | 2018-01-05 16:25:55 +0900 (Fri, 05 Jan 2018) | 2 lines

* insns.def (invokeblock): `calling->recv` is not used.

------------------------------------------------------------------------
r61605 | hsbt | 2018-01-05 15:18:57 +0900 (Fri, 05 Jan 2018) | 1 line

Try to fix Travis CI configuration.
------------------------------------------------------------------------
r61604 | mame | 2018-01-05 14:27:25 +0900 (Fri, 05 Jan 2018) | 1 line

parse.y: refactor out ast generation code of two rb_parser_compile_*
------------------------------------------------------------------------
r61603 | ko1 | 2018-01-05 11:25:26 +0900 (Fri, 05 Jan 2018) | 7 lines

check array for zsuper. [Bug #14279]

* compile.c (iseq_compile_each0): for zsuper (NODE_ZSUPER), we need to check
  given argument is Array or not.

* test/ruby/test_super.rb: add a test for this bug.

------------------------------------------------------------------------
r61602 | normal | 2018-01-05 11:22:23 +0900 (Fri, 05 Jan 2018) | 44 lines

net/protocol: optimize large read case

There are several places where rbuf_consume is called with
@rbuf.size as its length arg; simplify that case by avoiding
the slow String#slice! operation in favor of a lightweight
replacement.

The following script exhibits reduced memory usage and
runtimes using the time(1) command:

	2.9s =>  2.6s
	70MB => 12 MB

---------
require 'net/http'
require 'digest/md5'
Thread.abort_on_exception = true
s = TCPServer.new('127.0.0.1', 0)
len = 1024 * 1024 * 1024
th = Thread.new do
  c = s.accept
  c.readpartial(16384)
  c.write("HTTP/1.0 200 OK\r\nContent-Length: #{len}\r\n\r\n")
  IO.copy_stream('/dev/zero', c, len)
  c.close
end

addr = s.addr
Net::HTTP.start(addr[3], addr[1]) do |http|
  http.request_get('/') do |res|
    dig = Digest::MD5.new
    res.read_body { |buf|
      dig.update(buf)
      # String#clear is important to reduce malloc overhead,
      # but most Ruby programmers don't do this :<
      buf.clear
    }
    puts dig.hexdigest
  end
end
----------

* lib/net/protocol (rbuf_consume): optimize for @rbuf.size == len
  [Feature #14268]
------------------------------------------------------------------------
r61601 | mame | 2018-01-05 09:49:41 +0900 (Fri, 05 Jan 2018) | 6 lines

Refactor ISEQ_TYPE_DEFINED_GUARD out

This commit removes ISEQ_TYPE_DEFINED_GUARD because it is no longer
needed.  And this introduces ISEQ_TYPE_PLAIN which means that the iseq
does nothing special but just wrap an expression.  Currently, this is
used for once execution: `/foo#{ bar }baz/o`.
------------------------------------------------------------------------
r61600 | svn | 2018-01-05 09:49:41 +0900 (Fri, 05 Jan 2018) | 1 line

* 2018-01-05
------------------------------------------------------------------------
r61599 | mame | 2018-01-05 09:49:40 +0900 (Fri, 05 Jan 2018) | 4 lines

compile.c: refactoring of defined? exception handler

This commit removes tmp_node trick to create a special exception handler
for `defined?`.
------------------------------------------------------------------------
r61598 | mame | 2018-01-04 21:56:49 +0900 (Thu, 04 Jan 2018) | 8 lines

test/ruby/test_io.rb: relax RLIMIT_NPROC for invocation of ruby

This limit seems to be too restrict.  It sometimes produces the
following warning when running `make test-all`:
```
TestIO#test_close_on_exec<main>: warning: pthread_create failed for
timer: Resource temporarily unavailable, scheduling broken
```
------------------------------------------------------------------------
r61597 | mame | 2018-01-04 21:47:22 +0900 (Thu, 04 Jan 2018) | 1 line

node.h: add NODE_ONCE instead of reuse of NODE_SCOPE
------------------------------------------------------------------------
r61596 | shyouhei | 2018-01-04 16:51:19 +0900 (Thu, 04 Jan 2018) | 1 line

suppress warnings for long string literals
------------------------------------------------------------------------
r61595 | shyouhei | 2018-01-04 16:51:18 +0900 (Thu, 04 Jan 2018) | 3 lines

define NO_LONG_LONG appropriately

as documented above.
------------------------------------------------------------------------
r61594 | shyouhei | 2018-01-04 16:51:17 +0900 (Thu, 04 Jan 2018) | 7 lines

ULL suffix is a C99ism

Don't assume long long == 8 bytes.

If you can assume C99, there are macros named UINT64_C and
such for appropriate integer literal suffixes.
If you can't, no way but do a bitwise or.
------------------------------------------------------------------------
r61593 | shyouhei | 2018-01-04 16:51:16 +0900 (Thu, 04 Jan 2018) | 3 lines

ULL suffix is a C99ism

... and why not just use ~0 instead?
------------------------------------------------------------------------
r61592 | mame | 2018-01-04 16:07:49 +0900 (Thu, 04 Jan 2018) | 3 lines

iseq.c: Refactor out rb_iseq_new_ifunc from rb_iseq_new_with_opt

It is too error-prone to pass IMEMO_IFUNC object as NODE*.
------------------------------------------------------------------------
r61591 | mame | 2018-01-04 13:44:16 +0900 (Thu, 04 Jan 2018) | 1 line

iseq.c (rb_iseq_new_with_opt): handle the case where node is imemo_func
------------------------------------------------------------------------
r61590 | nobu | 2018-01-04 10:46:01 +0900 (Thu, 04 Jan 2018) | 1 line

insns_info.inc.tmpl: share large tablese
------------------------------------------------------------------------
r61589 | nobu | 2018-01-04 10:30:20 +0900 (Thu, 04 Jan 2018) | 4 lines

insns_info.inc: position independent

* template/insns_info.inc.tmpl (insn_name_info): make position
  independent for large strings.
------------------------------------------------------------------------
r61588 | nobu | 2018-01-04 09:44:40 +0900 (Thu, 04 Jan 2018) | 5 lines

Fix doc typo in Symbol#to_proc [Fix GH-1785]

[ci skip]

From: Dimitris Zorbas <dimitrisplusplus@gmail.com>
------------------------------------------------------------------------
r61587 | nobu | 2018-01-04 09:26:51 +0900 (Thu, 04 Jan 2018) | 4 lines

compile.c: next label

* compile.c (compile_next): label for jump to the end of block is
  removable.
------------------------------------------------------------------------
r61586 | nobu | 2018-01-04 09:26:50 +0900 (Thu, 04 Jan 2018) | 4 lines

test_iseq_load.rb: set location

* test/-ext-/iseq_load/test_iseq_load.rb (assert_iseq_roundtrip):
  set path and line number from callers.
------------------------------------------------------------------------
r61585 | svn | 2018-01-04 08:05:03 +0900 (Thu, 04 Jan 2018) | 1 line

* 2018-01-04
------------------------------------------------------------------------
r61584 | nobu | 2018-01-04 08:05:02 +0900 (Thu, 04 Jan 2018) | 7 lines

compile.c: fix disasm dump

* compile.c (DECL_ANCHOR): initialize as anchor type, which is not
  a valid iseq element.

* compile.c (BADINSN_DUMP): dump from the first element, excluding
  the anchor itself.
------------------------------------------------------------------------
r61578 | nobu | 2018-01-03 22:58:27 +0900 (Wed, 03 Jan 2018) | 4 lines

compile.c: label sp

* compile.c (dump_disasm_list_with_cursor): show stack depth for
  each label.
------------------------------------------------------------------------
r61577 | nobu | 2018-01-03 18:19:11 +0900 (Wed, 03 Jan 2018) | 4 lines

dln.c: dln_incompatible_library_p

* dln.c (dln_incompatible_library_p): renamed as the error message
  with dln prefix, since it is not bound to xmalloc restrictively.
------------------------------------------------------------------------
r61576 | nobu | 2018-01-03 18:05:18 +0900 (Wed, 03 Jan 2018) | 4 lines

dln.c: xmalloc_mismatch_p with dlopen

* dln.c (xmalloc_mismatch_p): define only when using dlopen,
  otherwise dlsym is not available too, and should be used then.
------------------------------------------------------------------------
r61575 | shyouhei | 2018-01-03 10:43:17 +0900 (Wed, 03 Jan 2018) | 3 lines

delete extra #undef [ci skip]

Sorry, this was a garbage.
------------------------------------------------------------------------
r61574 | normal | 2018-01-03 06:51:59 +0900 (Wed, 03 Jan 2018) | 14 lines

variable.c: fix autoload stack space regression

r61560 ("offsetof(type, foo.bar) is (arguably) a GCCism")
introduced 16 bytes of stack overhead on 64-bit systems.
Remove that overhead and cast, instead.  While we're at it,
restore the "waitq" name to clarify the purpose of the field.

(This is one unfortunate consequence of the CC0 ccan/list.h
 implementation compared to the *GPL ones in glibc/urcu/linux)

* variable.c (struct autoload_state): remove head field, clarify naming
  (autoload_reset): cast and adjust
  (autoload_sleep_done): ditto
  (rb_autoload_load): ditto
------------------------------------------------------------------------
r61573 | normal | 2018-01-03 06:23:47 +0900 (Wed, 03 Jan 2018) | 6 lines

thread_pthread.c: use container_of

It's easier to read this macro from ccan than open-coding pointer
arithmetic.

thread_pthread.c (ubf_wakeup_all_threads): use container_of
------------------------------------------------------------------------
r61572 | svn | 2018-01-03 00:29:59 +0900 (Wed, 03 Jan 2018) | 1 line

* 2018-01-03
------------------------------------------------------------------------
r61571 | ko1 | 2018-01-03 00:29:58 +0900 (Wed, 03 Jan 2018) | 9 lines

check an existence of block.

* gc.c (rb_raw_obj_info): check block before using it.

* vm_core.h (vm_block_iseq): r61565 introduced NULL check but this
  check is only needed by `rb_raw_obj_info()` and it is called at GC
  debug mode. Above fix for `rb_raw_obj_info()` solves this problem and
  NULL check should not be needed any more.

------------------------------------------------------------------------
r61570 | shyouhei | 2018-01-02 15:46:40 +0900 (Tue, 02 Jan 2018) | 1 line

include missing header
------------------------------------------------------------------------
r61569 | shyouhei | 2018-01-02 15:42:05 +0900 (Tue, 02 Jan 2018) | 73 lines

fix SEGV inspecting uninitialized objects

obj_info() assumes the given object is alive.  OTOH
gc_writebarrier_incremental is called before or in middle of
object initialization.  Can casue SEGV.

(lldb) run
Process 48188 launched: './miniruby' (x86_64)
Process 48188 stopped
* thread #1: tid = 0x30fd53, 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072
   2069 static inline const VALUE *
   2070 rb_array_const_ptr(VALUE a)
   2071 {
-> 2072     return FIX_CONST_VALUE_PTR((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ?
   2073         RARRAY(a)->as.ary : RARRAY(a)->as.heap.ptr);
   2074 }
   2075
(lldb) bt
* thread #1: tid = 0x30fd53, 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072
    frame #1: 0x00000001000bfaab miniruby`pathobj_path(pathobj=5251291222225483145) + 70 at vm_core.h:269
    frame #2: 0x00000001000c25ff miniruby`rb_iseq_path(iseq=0x00000001025b71a8) + 32 at iseq.c:723
    frame #3: 0x000000010009db09 miniruby`rb_raw_iseq_info(buff="0x00000001025b7158 [0    ] proc (Proc)", buff_size=256, iseq=0x00000001025b71a8) + 69 at gc.c:9274
    frame #4: 0x000000010009e1d5 miniruby`rb_raw_obj_info(buff="0x00000001025b7158 [0    ] proc (Proc)", buff_size=256, obj=4334514520) + 1546 at gc.c:9351
    frame #5: 0x000000010009e4d5 miniruby`obj_info(obj=4334514520) + 98 at gc.c:9429
    frame #6: 0x0000000100096658 miniruby`gc_writebarrier_incremental(a=4334514520, b=4334514600, objspace=0x00000001007d3280) + 61 at gc.c:5963
    frame #7: 0x00000001000968ca miniruby`rb_gc_writebarrier(a=4334514520, b=4334514600) + 127 at gc.c:6009
    frame #8: 0x00000001001eabe0 miniruby`rb_obj_written(a=4334514520, oldv=52, b=4334514600, filename="/Users/urabe.shyouhei/data/src/pedantic/vm.c", line=821) + 72 at ruby.h:1472
    frame #9: 0x00000001001eac2c miniruby`rb_obj_write(a=4334514520, slot=0x000000010259ff10, b=4334514600, filename="/Users/urabe.shyouhei/data/src/pedantic/vm.c", line=821) + 70 at ruby.h:1489
    frame #10: 0x0000000100208b6f miniruby`vm_proc_create_from_captured(klass=4311027960, captured=0x0000000102500338, block_type=block_type_ifunc, is_from_method='\0', is_lambda='\x01') + 137 at vm.c:821
    frame #11: 0x0000000100208e5c miniruby`rb_vm_make_proc_lambda(ec=0x00000001007d3548, captured=0x0000000102500338, klass=4311027960, is_lambda='\x01') + 134 at vm.c:892
    frame #12: 0x000000010011f08e miniruby`proc_new(klass=4311027960, is_lambda='\x01') + 445 at proc.c:752
    frame #13: 0x000000010011f110 miniruby`rb_block_lambda + 27 at proc.c:808
    frame #14: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`rb_block_lambda at proc.c:807), recv=4310991600, argc=0, argv=0x0000000000000000) + 41 at vm_insnhelper.c:1729
    frame #15: 0x00000001002033de miniruby`vm_call0_cfunc_with_frame(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 370 at vm_eval.c:85
    frame #16: 0x00000001002034d9 miniruby`vm_call0_cfunc(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 59 at vm_eval.c:100
    frame #17: 0x000000010020368f miniruby`vm_call0_body(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 436 at vm_eval.c:131
    frame #18: 0x000000010020326a miniruby`vm_call0(ec=0x00000001007d3548, recv=4310991600, id=2993, argc=0, argv=0x0000000000000000, me=0x0000000100f48110) + 142 at vm_eval.c:58
    frame #19: 0x0000000100203c60 miniruby`rb_call0(ec=0x00000001007d3548, recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000, scope=CALL_FCALL, self=4334514640) + 166 at vm_eval.c:296
    frame #20: 0x0000000100204827 miniruby`rb_call(recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000, scope=CALL_FCALL) + 84 at vm_eval.c:589
    frame #21: 0x000000010020518b miniruby`rb_funcallv(recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000) + 52 at vm_eval.c:815
    frame #22: 0x000000010012242e miniruby`mlambda(method=0) + 45 at proc.c:2661
    frame #23: 0x0000000100205bac miniruby`rb_iterate0(it_proc=(miniruby`mlambda at proc.c:2660), data1=0, ifunc=0x00000001025b71a8, ec=0x00000001007d3548) + 380 at vm_eval.c:1134
    frame #24: 0x0000000100205d16 miniruby`rb_iterate(it_proc=(miniruby`mlambda at proc.c:2660), data1=0, bl_proc=(miniruby`bmcall at proc.c:2666), data2=4334514640) + 88 at vm_eval.c:1166
    frame #25: 0x00000001001224c7 miniruby`method_to_proc(method=4334514640) + 43 at proc.c:2701
    frame #26: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`method_to_proc at proc.c:2688), recv=4334514640, argc=0, argv=0x0000000102400568) + 41 at vm_insnhelper.c:1729
    frame #27: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 386 at vm_insnhelper.c:1918
    frame #28: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 149 at vm_insnhelper.c:1934
    frame #29: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 239 at vm_insnhelper.c:2232
    frame #30: 0x00000001001f49a4 miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 117 at vm_insnhelper.c:2355
    frame #31: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 59 at vm_insnhelper.c:2398
    frame #32: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
    frame #33: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
    frame #34: 0x000000010020c3d1 miniruby`rb_iseq_eval(iseq=0x00000001007f8270) + 52 at vm.c:2008
    frame #35: 0x00000001000caa4a miniruby`rb_load_internal0(ec=0x00000001007d3548, fname=4310799960, wrap=0) + 631 at load.c:611
    frame #36: 0x00000001000cab36 miniruby`rb_load_internal(fname=4310799960, wrap=0) + 46 at load.c:642
    frame #37: 0x00000001000cae1d miniruby`rb_f_load(argc=1, argv=0x00000001024004b8) + 217 at load.c:710
    frame #38: 0x00000001001f247c miniruby`call_cfunc_m1(func=(miniruby`rb_f_load at load.c:695), recv=4311327440, argc=1, argv=0x00000001024004b8) + 47 at vm_insnhelper.c:1723
    frame #39: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 386 at vm_insnhelper.c:1918
    frame #40: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 149 at vm_insnhelper.c:1934
    frame #41: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 239 at vm_insnhelper.c:2232
    frame #42: 0x00000001001f4a2c miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 253 at vm_insnhelper.c:2366
    frame #43: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 59 at vm_insnhelper.c:2398
    frame #44: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
    frame #45: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
    frame #46: 0x000000010020c40f miniruby`rb_iseq_eval_main(iseq=0x0000000100f21240) + 52 at vm.c:2019
    frame #47: 0x000000010007c774 miniruby`ruby_exec_internal(n=0x0000000100f21240) + 297 at eval.c:246
    frame #48: 0x000000010007c89a miniruby`ruby_exec_node(n=0x0000000100f21240) + 36 at eval.c:310
    frame #49: 0x000000010007c86d miniruby`ruby_run_node(n=0x0000000100f21240) + 62 at eval.c:302
    frame #50: 0x0000000100001399 miniruby`main(argc=9, argv=0x00007fff5fbfdae0) + 113 at main.c:42
    frame #51: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
------------------------------------------------------------------------
r61568 | shyouhei | 2018-01-02 15:42:04 +0900 (Tue, 02 Jan 2018) | 80 lines

fix SEGV inspecting already freed objects

obj_info() assumes the given object is alive.  Passing freed
objects to it results in SEGV.

(lldb) run
Process 29718 launched: './miniruby' (x86_64)
Process 29718 stopped
* thread #1: tid = 0x3082c5, 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269
   266      }
   267      else {
   268          VM_ASSERT(RB_TYPE_P(pathobj, T_ARRAY));
-> 269          return RARRAY_AREF(pathobj, PATHOBJ_PATH);
   270      }
   271  }
   272
(lldb) bt
* thread #1: tid = 0x3082c5, 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269
    frame #1: 0x00000001000c25ff miniruby`rb_iseq_path(iseq=0x000000010af34a20) + 32 at iseq.c:723
    frame #2: 0x000000010009db09 miniruby`rb_raw_iseq_info(buff="0x000000010af34a20 [1    ] T_IMEMO iseq", buff_size=256, iseq=0x000000010af34a20) + 69 at gc.c:9274
    frame #3: 0x000000010009e45a miniruby`rb_raw_obj_info(buff="0x000000010af34a20 [1    ] T_IMEMO iseq", buff_size=256, obj=4478683680) + 2191 at gc.c:9397
    frame #4: 0x000000010009e4d5 miniruby`obj_info(obj=4478683680) + 98 at gc.c:9429
    frame #5: 0x0000000100091ae3 miniruby`gc_page_sweep(objspace=0x00000001007d3280, heap=0x00000001007d32a0, sweep_page=0x000000010ae07bc0) + 622 at gc.c:3529
    frame #6: 0x000000010009206a miniruby`gc_sweep_step(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 188 at gc.c:3705
    frame #7: 0x0000000100092254 miniruby`gc_sweep_continue(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 133 at gc.c:3772
    frame #8: 0x000000010008d7f9 miniruby`heap_prepare(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 48 at gc.c:1746
    frame #9: 0x000000010008d8a1 miniruby`heap_get_freeobj_from_next_freepage(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 37 at gc.c:1769
    frame #10: 0x000000010008d98d miniruby`heap_get_freeobj(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 83 at gc.c:1803
    frame #11: 0x000000010008dcb0 miniruby`newobj_slowpath(klass=4334386280, flags=5, v1=0, v2=0, v3=0, objspace=0x00000001007d3280, wb_protected=1) + 220 at gc.c:1930
    frame #12: 0x000000010008dd6c miniruby`newobj_slowpath_wb_protected(klass=4334386280, flags=5, v1=0, v2=0, v3=0, objspace=0x00000001007d3280) + 76 at gc.c:1942
    frame #13: 0x000000010008dea1 miniruby`newobj_of(klass=4334386280, flags=5, v1=0, v2=0, v3=0, wb_protected=1) + 221 at gc.c:1974
    frame #14: 0x000000010008df39 miniruby`rb_wb_protected_newobj_of(klass=4334386280, flags=5) + 54 at gc.c:1990
    frame #15: 0x0000000100195f7c miniruby`str_alloc(klass=4334386280) + 29 at string.c:692
    frame #16: 0x0000000100195fe9 miniruby`str_new0(klass=4334386280, ptr="gitm", len=4, termlen=1) + 73 at string.c:714
    frame #17: 0x000000010019633e miniruby`rb_enc_str_new(ptr="gitm", len=4, enc=0x00000001025d50a0) + 81 at string.c:766
    frame #18: 0x000000010010a80a miniruby`parser_str_new(p="gitm", n=4, enc=0x00000001025d50a0, func=66, enc0=0x00000001025d50a0) + 50 at parse.y:5817
    frame #19: 0x000000010010ce1a miniruby`parser_parse_string(parser=0x00000001042ac5c0, quote=0x000000010460c028) + 795 at parse.y:6675
    frame #20: 0x00000001001120bd miniruby`parser_yylex(parser=0x00000001042ac5c0) + 159 at parse.y:8281
    frame #21: 0x0000000100115068 miniruby`yylex(lval=0x00007fff5fbf9948, yylloc=0x00007fff5fbf9ab0, parser=0x00000001042ac5c0) + 55 at parse.y:8931
    frame #22: 0x00000001000fc79f miniruby`ruby_yyparse(parser=0x00000001042ac5c0) + 1198 at parse.c:5798
    frame #23: 0x0000000100109f5a miniruby`yycompile0(arg=4364879296) + 317 at parse.y:5595
    frame #24: 0x0000000100214ef0 miniruby`rb_suppress_tracing(func=(miniruby`yycompile0 at parse.y:5565), arg=4364879296) + 349 at vm_trace.c:397
    frame #25: 0x000000010010a1df miniruby`yycompile(parser=0x00000001042ac5c0, fname=4443743440, line=1) + 126 at parse.y:5637
    frame #26: 0x000000010010a4c1 miniruby`parser_compile_string(vparser=4443743480, fname=4443743440, s=4443743520, line=1) + 191 at parse.y:5706
    frame #27: 0x000000010010a5b7 miniruby`rb_parser_compile_string_path(vparser=4443743480, f=4443743440, s=4443743520, line=1) + 58 at parse.y:5730
    frame #28: 0x0000000100206025 miniruby`eval_make_iseq(src=4443743520, fname=4443743440, line=1, bind=0x0000000000000000, base_block=0x00007fff5fbfb370) + 266 at vm_eval.c:1274
    frame #29: 0x0000000100206153 miniruby`eval_string_with_cref(self=4334412520, src=4443743520, cref=0x0000000000000000, file=52, line=1) + 197 at vm_eval.c:1307
    frame #30: 0x0000000100206389 miniruby`rb_f_eval(argc=1, argv=0x0000000102400eb8, self=4334412520) + 219 at vm_eval.c:1382
    frame #31: 0x00000001001f247c miniruby`call_cfunc_m1(func=(miniruby`rb_f_eval at vm_eval.c:1364), recv=4334412520, argc=1, argv=0x0000000102400eb8) + 47 at vm_insnhelper.c:1723
    frame #32: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500d80, calling=0x00007fff5fbfbf50, ci=0x000000010263f240, cc=0x0000000100749b50) + 386 at vm_insnhelper.c:1918
    frame #33: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500d80, calling=0x00007fff5fbfbf50, ci=0x000000010263f240, cc=0x0000000100749b50) + 149 at vm_insnhelper.c:1934
    frame #34: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
    frame #35: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
    frame #36: 0x00000001002093f8 miniruby`invoke_block(ec=0x00000001007d3548, iseq=0x000000010252d7f0, self=4334412520, captured=0x0000000102500df8, cref=0x0000000000000000, type=572653569, opt_pc=0) + 224 at vm.c:988
    frame #37: 0x0000000100209766 miniruby`invoke_iseq_block_from_c(ec=0x00000001007d3548, captured=0x0000000102500df8, self=4334412520, argc=0, argv=0x0000000000000000, passed_block_handler=0, cref=0x0000000000000000, is_lambda=0) + 389 at vm.c:1040
    frame #38: 0x0000000100209824 miniruby`invoke_block_from_c_bh(ec=0x00000001007d3548, block_handler=4333768185, argc=0, argv=0x0000000000000000, passed_block_handler=0, cref=0x0000000000000000, is_lambda=0, force_blockarg=0) + 138 at vm.c:1058
    frame #39: 0x00000001002099d0 miniruby`vm_yield(ec=0x00000001007d3548, argc=0, argv=0x0000000000000000) + 69 at vm.c:1103
    frame #40: 0x0000000100205623 miniruby`rb_yield_0(argc=0, argv=0x0000000000000000) + 40 at vm_eval.c:970
    frame #41: 0x0000000100205964 miniruby`loop_i + 19 at vm_eval.c:1049
    frame #42: 0x000000010007db07 miniruby`rb_rescue2(b_proc=(miniruby`loop_i at vm_eval.c:1047), data1=0, r_proc=(miniruby`loop_stop at vm_eval.c:1056), data2=0) + 369 at eval.c:896
    frame #43: 0x0000000100205a2e miniruby`rb_f_loop(self=4334412520) + 121 at vm_eval.c:1100
    frame #44: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`rb_f_loop at vm_eval.c:1098), recv=4334412520, argc=0, argv=0x0000000102400e80) + 41 at vm_insnhelper.c:1729
    frame #45: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 386 at vm_insnhelper.c:1918
    frame #46: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 149 at vm_insnhelper.c:1934
    frame #47: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 239 at vm_insnhelper.c:2232
    frame #48: 0x00000001001f4a2c miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 253 at vm_insnhelper.c:2366
    frame #49: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 59 at vm_insnhelper.c:2398
    frame #50: 0x00000001001fab2f miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 7480 at insns.def:850
    frame #51: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
    frame #52: 0x000000010020c40f miniruby`rb_iseq_eval_main(iseq=0x000000010252dd90) + 52 at vm.c:2019
    frame #53: 0x000000010007c768 miniruby`ruby_exec_internal(n=0x000000010252dd90) + 297 at eval.c:246
    frame #54: 0x000000010007c88e miniruby`ruby_exec_node(n=0x000000010252dd90) + 36 at eval.c:310
    frame #55: 0x000000010007c861 miniruby`ruby_run_node(n=0x000000010252dd90) + 62 at eval.c:302
    frame #56: 0x000000010000138d miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 113 at main.c:42
    frame #57: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb) p ((struct RVALUE*)pathobj)->as.basic
(RBasic) $0 = (flags = 0, klass = 4478683600)
(lldb)
------------------------------------------------------------------------
r61567 | shyouhei | 2018-01-02 15:42:03 +0900 (Tue, 02 Jan 2018) | 3 lines

fix uninitialized variable

Likewise this can easily be noticed if you read the warnings.
------------------------------------------------------------------------
r61566 | shyouhei | 2018-01-02 15:42:02 +0900 (Tue, 02 Jan 2018) | 50 lines

fix SEGV touching uninitialized local variable

This imemo_name is used uninitialized because the switch
above does not cover all possible imemo types.

(lldb) run
Process 26068 launched: './miniruby' (x86_64)
Process 26068 stopped
* thread #1: tid = 0x14ba96, 0x00007fff8a402132 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
    frame #0: 0x00007fff8a402132 libsystem_c.dylib`strlen + 18
libsystem_c.dylib`strlen:
->  0x7fff8a402132 <+18>: pcmpeqb (%rdi), %xmm0
    0x7fff8a402136 <+22>: pmovmskb %xmm0, %esi
    0x7fff8a40213a <+26>: andq   $0xf, %rcx
    0x7fff8a40213e <+30>: orq    $-0x1, %rax
(lldb) bt
* thread #1: tid = 0x14ba96, 0x00007fff8a402132 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
  * frame #0: 0x00007fff8a402132 libsystem_c.dylib`strlen + 18
    frame #1: 0x00000001001f1531 miniruby`BSD_vfprintf(fp=0x00007fff5fbfc9e0, fmt0="%s %s", ap=0x00007fff5fbfcbf0) + 5873 at vsnprintf.c:1026
    frame #2: 0x00000001001ef213 miniruby`ruby_do_vsnprintf(str="0x0000000100f46450 [0    ] T_IMEMO", n=256, fmt="%s %s", ap=0x00007fff5fbfcbf0) + 131 at sprintf.c:1285
    frame #3: 0x00000001001ef3ea miniruby`ruby_snprintf(str="0x0000000100f46450 [0    ] T_IMEMO", n=256, fmt="%s %s") + 426 at sprintf.c:1300
    frame #4: 0x00000001000bdc61 miniruby`rb_raw_obj_info(buff="0x0000000100f46450 [0    ] T_IMEMO", buff_size=256, obj=4310983760) + 2353 at gc.c:9376
    frame #5: 0x00000001000b7bff miniruby`obj_info(obj=4310983760) + 95 at gc.c:9428
    frame #6: 0x00000001000c1658 miniruby`newobj_init(klass=0, flags=36890, v1=0, v2=4303040512, v3=4310983800, wb_protected=1, objspace=0x00000001007ee280, obj=4310983760) + 424 at gc.c:1887
    frame #7: 0x00000001000b4469 miniruby`newobj_of(klass=0, flags=36890, v1=0, v2=4303040512, v3=4310983800, wb_protected=1) + 217 at gc.c:1970
    frame #8: 0x00000001000b45eb miniruby`rb_imemo_new(type=imemo_ast, v1=0, v2=4303040512, v3=4310983800, v0=0) + 75 at gc.c:2017
    frame #9: 0x000000010011daed miniruby`rb_ast_new + 61 at node.c:1146
    frame #10: 0x0000000100160e15 miniruby`rb_parser_compile_file_path(vparser=4310984400, fname=4310984960, file=4310984080, start=1) + 53 at parse.y:5776
    frame #11: 0x00000001001e18ea miniruby`load_file_internal(argp_v=140734799795024) + 1834 at ruby.c:1907
    frame #12: 0x00000001000a1bb5 miniruby`rb_ensure(b_proc=(miniruby`load_file_internal at ruby.c:1795), data1=140734799795024, e_proc=(miniruby`restore_load_file at ruby.c:2007), data2=140734799795024) + 245 at eval.c:1037
    frame #13: 0x00000001001df4a4 miniruby`load_file(parser=4310984400, fname=4310984960, f=4310984080, script=1, opt=0x00007fff5fbfda28) + 100 at ruby.c:2026
    frame #14: 0x00000001001e084e miniruby`process_options(argc=0, argv=0x00007fff5fbfdc00, opt=0x00007fff5fbfda28) + 3454 at ruby.c:1682
    frame #15: 0x00000001001dfaae miniruby`ruby_process_options(argc=2, argv=0x00007fff5fbfdbf0) + 238 at ruby.c:2257
    frame #16: 0x000000010009ff43 miniruby`ruby_options(argc=2, argv=0x00007fff5fbfdbf0) + 211 at eval.c:105
    frame #17: 0x0000000100000989 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 105 at main.c:42
    frame #18: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb) up 4
frame #4: 0x00000001000bdc61 miniruby`rb_raw_obj_info(buff="0x0000000100f46450 [0    ] T_IMEMO", buff_size=256, obj=4310983760) + 2353 at gc.c:9376
   9373 #undef IMEMO_NAME
   9374               default: UNREACHABLE;
   9375             }
-> 9376             snprintf(buff, buff_size, "%s %s", buff, imemo_name);
   9377
   9378             switch (imemo_type(obj)) {
   9379               case imemo_ment: {
(lldb) p imemo_name
(const char *) $0 = 0xffffffffffffffff
(lldb) p imemo_type(obj)
(imemo_type) $1 = imemo_ast
(lldb)
------------------------------------------------------------------------
r61565 | shyouhei | 2018-01-02 15:42:01 +0900 (Tue, 02 Jan 2018) | 48 lines

fix SEGV touching uninitialized memory

This function can be called from rb_data_typed_object_zalloc().
No assumption can be made about object internals.

(lldb) run
Process 22135 launched: './miniruby' (x86_64)
Process 22135 stopped
* thread #1: tid = 0x14a3af, 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
    frame #0: 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364
   1361         break;
   1362     }
   1363 #endif
-> 1364     return block->type;
   1365 }
   1366
   1367 static inline void
(lldb) bt
* thread #1: tid = 0x14a3af, 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
  * frame #0: 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364
    frame #1: 0x000000010008acdb miniruby`vm_block_iseq(block=0x0000000000000000) + 24 at vm_core.h:1399
    frame #2: 0x000000010008acc1 miniruby`vm_proc_iseq(procval=4310866360) + 32 at vm_core.h:1387
    frame #3: 0x000000010009cbed miniruby`rb_raw_obj_info(buff="0x0000000100f299b8 [0    ] proc (Proc)", buff_size=256, obj=4310866360) + 1513 at gc.c:9349
    frame #4: 0x000000010009cf01 miniruby`obj_info(obj=4310866360) + 98 at gc.c:9428
    frame #5: 0x000000010008ca1b miniruby`newobj_init(klass=4311027960, flags=12, v1=4298186080, v2=1, v3=0, wb_protected=32, objspace=0x00000001007cf280, obj=4310866360) + 338 at gc.c:1887
    frame #6: 0x000000010008cce5 miniruby`newobj_of(klass=4311027960, flags=12, v1=4298186080, v2=1, v3=0, wb_protected=32) + 171 at gc.c:1970
    frame #7: 0x000000010008d01d miniruby`rb_data_typed_object_wrap(klass=4311027960, datap=0x0000000000000000, type=0x0000000100311d60) + 133 at gc.c:2062
    frame #8: 0x000000010008d04e miniruby`rb_data_typed_object_zalloc(klass=4311027960, size=40, type=0x0000000100311d60) + 42 at gc.c:2073
    frame #9: 0x000000010011b459 miniruby`rb_proc_alloc(klass=4311027960) + 36 at proc.c:113
    frame #10: 0x0000000100204d8e miniruby`vm_proc_create_from_captured(klass=4311027960, captured=0x00000001025003f8, block_type=block_type_iseq, is_from_method='\0', is_lambda='\x01') + 44 at vm.c:814
    frame #11: 0x00000001002050d8 miniruby`rb_vm_make_proc_lambda(ec=0x00000001007cf548, captured=0x00000001025003f8, klass=4311027960, is_lambda='\x01') + 134 at vm.c:892
    frame #12: 0x000000010011c0d2 miniruby`proc_new(klass=4311027960, is_lambda='\x01') + 445 at proc.c:752
    frame #13: 0x000000010011c154 miniruby`rb_block_lambda + 27 at proc.c:808
    frame #14: 0x00000001001ee7e3 miniruby`call_cfunc_0(func=(miniruby`rb_block_lambda at proc.c:807), recv=4310991600, argc=0, argv=0x0000000102400480) + 41 at vm_insnhelper.c:1729
    frame #15: 0x00000001001ef2c3 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 386 at vm_insnhelper.c:1918
    frame #16: 0x00000001001ef412 miniruby`vm_call_cfunc(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 149 at vm_insnhelper.c:1934
    frame #17: 0x00000001001f0655 miniruby`vm_call_method_each_type(ec=0x00000001007cf548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 239 at vm_insnhelper.c:2232
    frame #18: 0x00000001001f0ce0 miniruby`vm_call_method(ec=0x00000001007cf548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 117 at vm_insnhelper.c:2355
    frame #19: 0x00000001001f0eb6 miniruby`vm_call_general(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 59 at vm_insnhelper.c:2398
    frame #20: 0x00000001001f6e61 miniruby`vm_exec_core(ec=0x00000001007cf548, initial=0) + 7480 at insns.def:850
    frame #21: 0x0000000100207995 miniruby`vm_exec(ec=0x00000001007cf548) + 230 at vm.c:1771
    frame #22: 0x0000000100208647 miniruby`rb_iseq_eval_main(iseq=0x0000000100f29fd0) + 52 at vm.c:2019
    frame #23: 0x000000010007b750 miniruby`ruby_exec_internal(n=0x0000000100f29fd0) + 297 at eval.c:246
    frame #24: 0x000000010007b876 miniruby`ruby_exec_node(n=0x0000000100f29fd0) + 36 at eval.c:310
    frame #25: 0x000000010007b849 miniruby`ruby_run_node(n=0x0000000100f29fd0) + 62 at eval.c:302
    frame #26: 0x0000000100000c05 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 113 at main.c:42
    frame #27: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
------------------------------------------------------------------------
r61564 | shyouhei | 2018-01-02 15:42:00 +0900 (Tue, 02 Jan 2018) | 47 lines

fix SEGV touching uninitialized memory

This function can be called from Init_VM().
No assumption can be made about object internals.

(lldb) run
Process 15734 launched: './miniruby' (x86_64)
Process 15734 stopped
* thread #1: tid = 0x1441d4, 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
    frame #0: 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273
   9270 static void
   9271 rb_raw_iseq_info(char *buff, const int buff_size, const rb_iseq_t *iseq)
   9272 {
-> 9273     if (iseq->body->location.label) {
   9274         VALUE path = rb_iseq_path(iseq);
   9275         snprintf(buff, buff_size, "%s %s@%s:%d", buff,
   9276                  RSTRING_PTR(iseq->body->location.label),
(lldb) p *iseq
(rb_iseq_t) $0 = {
  flags = 28698
  reserved1 = 0
  body = 0x0000000000000000
  aux = {
    compile_data = 0x0000000000000000
    loader = (obj = 0, index = 0)
    trace_events = 0
  }
}
(lldb) bt
* thread #1: tid = 0x1441d4, 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
  * frame #0: 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273
    frame #1: 0x00000001000bde72 miniruby`rb_raw_obj_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, obj=4311097160) + 2786 at gc.c:9396
    frame #2: 0x00000001000b7c5f miniruby`obj_info(obj=4311097160) + 95 at gc.c:9428
    frame #3: 0x00000001000c16a8 miniruby`newobj_init(klass=0, flags=28698, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x00000001007ee280, obj=4311097160) + 424 at gc.c:1887
    frame #4: 0x00000001000b44c9 miniruby`newobj_of(klass=0, flags=28698, v1=0, v2=0, v3=0, wb_protected=1) + 217 at gc.c:1970
    frame #5: 0x00000001000b464b miniruby`rb_imemo_new(type=imemo_iseq, v1=0, v2=0, v3=0, v0=0) + 75 at gc.c:2017
    frame #6: 0x00000001000fd914 miniruby`iseq_imemo_alloc + 36 at iseq.h:156
    frame #7: 0x00000001000f6e1d miniruby`iseq_alloc + 13 at iseq.c:211
    frame #8: 0x00000001000f6bf8 miniruby`rb_iseq_new_with_opt(node=0x0000000000000000, name=4311097200, path=4311097200, realpath=8, first_lineno=1, parent=0x0000000000000000, type=ISEQ_TYPE_TOP, option=0x0000000100335c30) + 56 at iseq.c:519
    frame #9: 0x00000001000f6bb6 miniruby`rb_iseq_new(node=0x0000000000000000, name=4311097200, path=4311097200, realpath=8, parent=0x0000000000000000, type=ISEQ_TYPE_TOP) + 86 at iseq.c:480
    frame #10: 0x0000000100284bb0 miniruby`Init_VM + 1040 at vm.c:3022
    frame #11: 0x00000001000d4f7d miniruby`rb_call_inits + 189 at inits.c:55
    frame #12: 0x000000010009fe06 miniruby`ruby_setup + 198 at eval.c:61
    frame #13: 0x000000010009fe5d miniruby`ruby_init + 13 at eval.c:78
    frame #14: 0x00000001000009ed miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 93 at main.c:41
    frame #15: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
------------------------------------------------------------------------
r61563 | shyouhei | 2018-01-02 15:41:59 +0900 (Tue, 02 Jan 2018) | 46 lines

fix SEGV touching uninitialized memory

This function can be called from InitVM_Object().
No assumption can be made about object internals.

(lldb) run
Process 10675 launched: './miniruby' (x86_64)
Process 10675 stopped
* thread #1: tid = 0x14252c, 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383
   9380                 const rb_method_entry_t *me = &RANY(obj)->as.imemo.ment;
   9381                 snprintf(buff, buff_size, "%s (called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)", buff,
   9382                          rb_id2name(me->called_id),
-> 9383                          method_type_name(me->def->type),
   9384                          me->def->alias_count,
   9385                          obj_info(me->owner),
   9386                          obj_info(me->defined_class));
(lldb) p *me
(rb_method_entry_t) $0 = {
  flags = 24602
  defined_class = 4311488400
  def = 0x0000000000000000
  called_id = 3057
  owner = 4311488400
}
(lldb) bt
* thread #1: tid = 0x14252c, 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383
    frame #1: 0x00000001000b7cbf miniruby`obj_info(obj=4311487880) + 95 at gc.c:9423
    frame #2: 0x00000001000c16a8 miniruby`newobj_init(klass=4311488400, flags=24602, v1=0, v2=3057, v3=4311488400, wb_protected=1, objspace=0x00000001007ee280, obj=4311487880) + 424 at gc.c:1887
    frame #3: 0x00000001000b4529 miniruby`newobj_of(klass=4311488400, flags=24602, v1=0, v2=3057, v3=4311488400, wb_protected=1) + 217 at gc.c:1970
    frame #4: 0x00000001000b46ab miniruby`rb_imemo_new(type=imemo_ment, v1=0, v2=3057, v3=4311488400, v0=4311488400) + 75 at gc.c:2017
    frame #5: 0x00000001002773b4 miniruby`rb_method_entry_alloc(called_id=3057, owner=4311488400, defined_class=4311488400, def=0x0000000000000000) + 52 at vm_method.c:368
    frame #6: 0x0000000100277307 miniruby`rb_method_entry_create(called_id=3057, klass=4311488400, visi=METHOD_VISI_PRIVATE, def=0x0000000000000000) + 71 at vm_method.c:389
    frame #7: 0x00000001002784c7 miniruby`rb_method_entry_make(klass=4311488400, mid=3057, defined_class=4311488400, visi=METHOD_VISI_PRIVATE, type=VM_METHOD_TYPE_CFUNC, def=0x0000000000000000, original_id=3057, opts=0x00007fff5fbfd9e8) + 1207 at vm_method.c:594
    frame #8: 0x00000001002770f9 miniruby`rb_add_method(klass=4311488400, mid=3057, type=VM_METHOD_TYPE_CFUNC, opts=0x00007fff5fbfd9e8, visi=METHOD_VISI_PRIVATE) + 73 at vm_method.c:650
    frame #9: 0x000000010027708a miniruby`rb_add_method_cfunc(klass=4311488400, mid=3057, func=(miniruby`rb_obj_dummy at object.c:1125), argc=0, visi=METHOD_VISI_PRIVATE) + 138 at vm_method.c:137
    frame #10: 0x00000001000391e4 miniruby`rb_define_private_method(klass=4311488400, name="initialize", func=(miniruby`rb_obj_dummy at object.c:1125), argc=0) + 68 at class.c:1529
    frame #11: 0x000000010013f5bf miniruby`InitVM_Object + 47 at object.c:3905
    frame #12: 0x0000000100142ffd miniruby`Init_Object + 61 at object.c:4122
    frame #13: 0x00000001000d4edd miniruby`rb_call_inits + 29 at inits.c:23
    frame #14: 0x000000010009fe66 miniruby`ruby_setup + 198 at eval.c:61
    frame #15: 0x000000010009febd miniruby`ruby_init + 13 at eval.c:78
    frame #16: 0x0000000100000a4d miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 93 at main.c:41
    frame #17: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
------------------------------------------------------------------------
r61562 | shyouhei | 2018-01-02 15:41:58 +0900 (Tue, 02 Jan 2018) | 37 lines

fix SEGV touching uninitialized memory

This function can be called from boot_defclass().
No assumption can be made about object internals.

(lldb) run
Process 2386 launched: './miniruby' (x86_64)
Process 2386 stopped
* thread #1: tid = 0x13f3b6, 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
    frame #0: 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321
   318  VALUE
   319  rb_class_path_cached(VALUE klass)
   320  {
-> 321      st_table *ivtbl = RCLASS_IV_TBL(klass);
   322      st_data_t n;
   323
   324      if (!ivtbl) return Qnil;
(lldb) bt
* thread #1: tid = 0x13f3b6, 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
  * frame #0: 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321
    frame #1: 0x000000010009cbd0 miniruby`rb_raw_obj_info(buff="0x0000000100fa5798 [2    ] T_CLASS", buff_size=256, obj=4311373720) + 1393 at gc.c:9341
    frame #2: 0x000000010009cf16 miniruby`obj_info(obj=4311373720) + 98 at gc.c:9423
    frame #3: 0x000000010008ca87 miniruby`newobj_init(klass=0, flags=66, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x00000001007cf280, obj=4311373720) + 338 at gc.c:1887
    frame #4: 0x000000010008cd51 miniruby`newobj_of(klass=0, flags=66, v1=0, v2=0, v3=0, wb_protected=1) + 171 at gc.c:1970
    frame #5: 0x000000010008ce1b miniruby`rb_wb_protected_newobj_of(klass=0, flags=66) + 54 at gc.c:1990
    frame #6: 0x0000000100027563 miniruby`class_alloc(flags=2, klass=0) + 46 at class.c:165
    frame #7: 0x000000010002761a miniruby`rb_class_boot(super=0) + 35 at class.c:203
    frame #8: 0x0000000100028612 miniruby`boot_defclass(name="BasicObject", super=0) + 28 at class.c:537
    frame #9: 0x000000010002868b miniruby`Init_class_hierarchy + 26 at class.c:548
    frame #10: 0x00000001000efe69 miniruby`InitVM_Object + 9 at object.c:3892
    frame #11: 0x00000001000f138e miniruby`Init_Object + 57 at object.c:4122
    frame #12: 0x00000001000a59bd miniruby`rb_call_inits + 29 at inits.c:23
    frame #13: 0x000000010007af30 miniruby`ruby_setup + 229 at eval.c:61
    frame #14: 0x000000010007af7e miniruby`ruby_init + 13 at eval.c:78
    frame #15: 0x0000000100000c58 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 88 at main.c:41
    frame #16: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
------------------------------------------------------------------------
r61561 | shyouhei | 2018-01-02 15:41:57 +0900 (Tue, 02 Jan 2018) | 5 lines

fix memory leak (FOUND BY A COMPILER WARNING)

Confusion of argument order ignores this st_free_table.
Results in garbaged table not GCed.
Easily noticable when you read the compiper warnings.
------------------------------------------------------------------------
r61560 | shyouhei | 2018-01-02 15:41:56 +0900 (Tue, 02 Jan 2018) | 15 lines

offsetof(type, foo.bar) is (arguably) a GCCism

TL;DR see http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2031.htm

Suppose we have:

struct X {
  struct Y {
    z_t z;
  } y;
} x;

then, you _cant_ infer offsetof(struct X, y.z). The ISO C99 section
7.17 says nothing about such situation. At least clang warns this
being an extension to the language (-Wextended-offsetof).
------------------------------------------------------------------------
r61559 | shyouhei | 2018-01-02 15:41:55 +0900 (Tue, 02 Jan 2018) | 4 lines

comparing function pointer versus void* is a GCCism

However dlsym() requires such feature so this function is non-
portable by nature.  Cannot but suppress warning.
------------------------------------------------------------------------
r61558 | shyouhei | 2018-01-02 15:41:54 +0900 (Tue, 02 Jan 2018) | 1 line

label as lvalue is a GCCism
------------------------------------------------------------------------
r61557 | shyouhei | 2018-01-02 15:41:53 +0900 (Tue, 02 Jan 2018) | 3 lines

statement experssion is a GCCism

should mark as such.
------------------------------------------------------------------------
r61556 | shyouhei | 2018-01-02 15:41:52 +0900 (Tue, 02 Jan 2018) | 1 line

enum value grater than int is a GCCism
------------------------------------------------------------------------
r61555 | shyouhei | 2018-01-02 15:41:51 +0900 (Tue, 02 Jan 2018) | 1 line

_Static_assert is a C11ism
------------------------------------------------------------------------
r61554 | shyouhei | 2018-01-02 15:41:50 +0900 (Tue, 02 Jan 2018) | 4 lines

bit-fields other than int is a C99ism

To be precise C90 says "A bit-field may have type int, unsigned
int, or signed int". It is clear that char or enum are NG.
------------------------------------------------------------------------
r61553 | shyouhei | 2018-01-02 15:41:49 +0900 (Tue, 02 Jan 2018) | 8 lines

initializer paren-string `{("str")}` is a C99ism

First, `"str"` is a string constant but `("str")` is not.  It is a
random expression whose type happen to be const char*.  Second,
non-constant initializer element is forbidden in C90.  Mixture of
these two results in the fact that `{("str")}` is a C99ism.

Just delete the parens and everything goes well.
------------------------------------------------------------------------
r61552 | shyouhei | 2018-01-02 15:41:49 +0900 (Tue, 02 Jan 2018) | 1 line

string literal longer than 509 characters is a C99ism
------------------------------------------------------------------------
r61551 | shyouhei | 2018-01-02 15:41:48 +0900 (Tue, 02 Jan 2018) | 1 line

flexible array member is a C99ism
------------------------------------------------------------------------
r61550 | shyouhei | 2018-01-02 15:41:47 +0900 (Tue, 02 Jan 2018) | 1 line

long long is a C99ism
------------------------------------------------------------------------
r61549 | shyouhei | 2018-01-02 15:41:46 +0900 (Tue, 02 Jan 2018) | 1 line

comma at the end of enum is a C99ism
------------------------------------------------------------------------
r61548 | shyouhei | 2018-01-02 15:41:45 +0900 (Tue, 02 Jan 2018) | 1 line

__VA_ARGS__ is a C99ism
------------------------------------------------------------------------
r61547 | shyouhei | 2018-01-02 15:41:44 +0900 (Tue, 02 Jan 2018) | 3 lines

long long is a C99sim

Don't assume 8-bytes integers == "long long".
------------------------------------------------------------------------
r61546 | shyouhei | 2018-01-02 15:41:43 +0900 (Tue, 02 Jan 2018) | 3 lines

string literal longer than 509 characters is a C99ism

Should avoid such thing.
------------------------------------------------------------------------
r61545 | shyouhei | 2018-01-02 15:41:43 +0900 (Tue, 02 Jan 2018) | 3 lines

"%z" printf format specifier is a C99ism

PRIxSIZE is also.  But shimmed in ruby.h
------------------------------------------------------------------------
r61544 | shyouhei | 2018-01-02 15:41:42 +0900 (Tue, 02 Jan 2018) | 1 line

int (*)(void) is incompatible with void*
------------------------------------------------------------------------
r61543 | shyouhei | 2018-01-02 15:41:41 +0900 (Tue, 02 Jan 2018) | 3 lines

rb_insn_func_t is incompatible with void*

Why not just use void* ?
------------------------------------------------------------------------
r61542 | shyouhei | 2018-01-02 15:41:40 +0900 (Tue, 02 Jan 2018) | 4 lines

explicit cast to void* required for %p

These functions take variadic arguments so no automatic type
promotion is expected.  You have to do it by hand.
------------------------------------------------------------------------
r61541 | shyouhei | 2018-01-02 15:41:39 +0900 (Tue, 02 Jan 2018) | 6 lines

suppress warning for clang

In this function, "volatile" is specified twice in macro-expanded
`VAR_INITIALIZED(cont)` part.  That is a problem in fact.  However
I don't want to touch this line because it is already a messy
workaround for clang SEGV.  Let me just ignore.
------------------------------------------------------------------------
r61540 | nobu | 2018-01-02 13:24:32 +0900 (Tue, 02 Jan 2018) | 3 lines

parse.y: fix typo

* parse.y (singleton): fix typo, show the expression.
------------------------------------------------------------------------
r61539 | svn | 2018-01-02 12:00:15 +0900 (Tue, 02 Jan 2018) | 1 line

* 2018-01-02
------------------------------------------------------------------------
r61538 | nobu | 2018-01-02 12:00:13 +0900 (Tue, 02 Jan 2018) | 4 lines

parse.y: code end position

* parse.y (parser_yyerror): use the given location as the end of
  erred code, instead of the current position.
------------------------------------------------------------------------
r61537 | mame | 2018-01-01 22:18:55 +0900 (Mon, 01 Jan 2018) | 5 lines

vm_core.h: make the algorithm of get_insn_info selectable

Currently, VM_INSN_INFO_TABLE_IMPL == 0 means linear search, and
VM_INSN_INFO_TABLE_IMPL == 1 means binary search.  I plan to add
succinct bitvector algorithm later.
------------------------------------------------------------------------
r61536 | mame | 2018-01-01 21:51:21 +0900 (Mon, 01 Jan 2018) | 7 lines

iseq.h: Extract position array from iseq_insn_info_entry

This makes TracePoint a bit fast by reducing cache misses of
`get_insn_info_binary_search`.

Also, I plan to use succinct bitvector algorithm for `get_insn_info`
instead of binary search.  This change will make it easy.
------------------------------------------------------------------------
r61535 | mame | 2018-01-01 18:30:06 +0900 (Mon, 01 Jan 2018) | 3 lines

iseq.c: fix build error when VM_CHECK_MODE is enabled

Follow up of r61534.  Sorry.
------------------------------------------------------------------------
r61534 | mame | 2018-01-01 18:16:27 +0900 (Mon, 01 Jan 2018) | 4 lines

vm_core.h: refactoring of insns_info

This factors rb_iseq_constant_body#insns_info and #insns_info_size to
struct iseq_insn_info.
------------------------------------------------------------------------
r61533 | nobu | 2018-01-01 10:04:50 +0900 (Mon, 01 Jan 2018) | 1 line

parse.y: highlight yyerror
------------------------------------------------------------------------
r61532 | kazu | 2018-01-01 09:13:54 +0900 (Mon, 01 Jan 2018) | 1 line

[DOC] doc/NEWS-2.5.0: remove trailing comma [ci skip]
------------------------------------------------------------------------
r61531 | hsbt | 2018-01-01 08:29:59 +0900 (Mon, 01 Jan 2018) | 3 lines

Removed debug code. It is inconsistency in rubygems upsteream.

  Revert r58657, r58660, r58692, r58723.
------------------------------------------------------------------------
r61530 | nobu | 2018-01-01 00:05:26 +0900 (Mon, 01 Jan 2018) | 3 lines

parse.y: yyerror1

* parse.y (yyerror1): pass location to parser_yyerror.
------------------------------------------------------------------------
r61529 | svn | 2018-01-01 00:00:24 +0900 (Mon, 01 Jan 2018) | 1 line

* 2018-01-01
------------------------------------------------------------------------
r61528 | nobu | 2018-01-01 00:00:23 +0900 (Mon, 01 Jan 2018) | 4 lines

parse.y: yylloc at yyerror

* parse.y (parser_yyerror): consider the case first_loc and
  last_loc point different lines.
------------------------------------------------------------------------
r61527 | nobu | 2017-12-31 22:15:52 +0900 (Sun, 31 Dec 2017) | 4 lines

error.c: limit depth

* error.c (rb_warn_m): limit backtrace depth to reduce objects to
  be created but not used.
------------------------------------------------------------------------
r61526 | nobu | 2017-12-31 22:12:47 +0900 (Sun, 31 Dec 2017) | 3 lines

test_exception.rb: more assertions

[ruby-core:84568] [Bug #14262]
------------------------------------------------------------------------
r61525 | nobu | 2017-12-31 22:01:55 +0900 (Sun, 31 Dec 2017) | 4 lines

error.c: negative uplevel

* error.c (rb_warn_m): negative uplevel is not allowed.
  [ruby-core:84568] [Bug #14262]
------------------------------------------------------------------------
r61524 | nobu | 2017-12-31 21:21:53 +0900 (Sun, 31 Dec 2017) | 5 lines

prelude.c.tmpl: get rid of warnings on old gcc

* template/prelude.c.tmpl: ignore missing-field-initializers on
  old gcc, e.g. 4.4, which does not support pushing/popping
  diagnostics.
------------------------------------------------------------------------
r61523 | nobu | 2017-12-31 20:25:38 +0900 (Sun, 31 Dec 2017) | 4 lines

parse.y: assignable_error

* parse.y (assignable_gen): should return valid NODE always even
  on errors.  [ruby-core:84565] [Bug #14261]
------------------------------------------------------------------------
r61522 | nobu | 2017-12-31 15:53:04 +0900 (Sun, 31 Dec 2017) | 3 lines

parse.y: yylloc at yyerror

* parse.y (parser_yyerror): utilize the location given by bison.
------------------------------------------------------------------------
r61521 | ko1 | 2017-12-31 09:06:34 +0900 (Sun, 31 Dec 2017) | 13 lines

fix reset order.

* lib/rdoc/test_case.rb (setup): call `RDoc::Markup::PreProcess.reset`
  at the end of `setup` method.
  `RDoc::RDoc.new` requires `rdoc/generator/darkfish`
  and requires `rdoc/tom_doc.rb` at last. It add post_proecssor
  (at `add_post_processor`) and it fails
  `TestRDocMarkupPreProcess#test_class_post_process`.
  This issue occured only with sorted tests by alphabetical order.
  `make test-all TESTS='rdoc/test_rdoc_markup_pre_process.rb --test-order=alpha`)
  We can observe this failure with parallel test only a few times.


------------------------------------------------------------------------
r61520 | ko1 | 2017-12-31 08:06:39 +0900 (Sun, 31 Dec 2017) | 4 lines

increase test timeout.

* test/ruby/test_thread.rb (test_signal_at_join): increase timeout.

------------------------------------------------------------------------
r61519 | svn | 2017-12-31 01:38:23 +0900 (Sun, 31 Dec 2017) | 1 line

* 2017-12-31
------------------------------------------------------------------------
r61518 | ngoto | 2017-12-31 01:38:22 +0900 (Sun, 31 Dec 2017) | 8 lines

bit fields treating negative values should be declared as signed int

* internal.h (struct vm_ifunc_argc): Bit fields are unsigned by default.
  For storing nagative values to bit fields, they must be declated as
  signed int. Fix multiple test failure observed by 32-bit binaries
  compiled with Oracle Developer Studio (Solaris Studio) 12.x on
  Solaris 10 on sparc architecture. [Bug #14260]

------------------------------------------------------------------------
r61517 | mrkn | 2017-12-30 23:50:15 +0900 (Sat, 30 Dec 2017) | 6 lines

numeric.c: Fix Integer#pow with a large Fixnum modulo

* numeric.c: Fix Integer#pow with a large Fixnum modulo
  [Bug #14259] [ruby-core:84562]

* test/ruby/test_numeric.rb: add assertions for reproducing this bug.
------------------------------------------------------------------------
r61516 | nobu | 2017-12-30 21:10:43 +0900 (Sat, 30 Dec 2017) | 1 line

drb: use \A and \z
------------------------------------------------------------------------
r61515 | svn | 2017-12-30 09:00:24 +0900 (Sat, 30 Dec 2017) | 1 line

* 2017-12-30
------------------------------------------------------------------------
r61514 | normal | 2017-12-30 09:00:23 +0900 (Sat, 30 Dec 2017) | 10 lines

hash literal deduplicates like Hash#[]=

From: Eric Wong <e@80x24.org>

* hash.c (rb_hash_key_str): new function
  (hash_aset_str): use rb_hash_key_str
* internal.h: add rb_hash_key_str
* st.c (st_stringify): use rb_hash_key_str
* test/ruby/test_hash.rb (test_NEWHASH_fstring_key): dynamic key
  [ruby-core:84554] [Feature #14258]
------------------------------------------------------------------------
r61513 | nobu | 2017-12-29 21:19:03 +0900 (Fri, 29 Dec 2017) | 6 lines

string.c: chomp rs at the end

* string.c (rb_str_enumerate_lines): should chomp record separator
  only, but not a newline, at the end of the receiver as well as
  middle, if the separator is given.
  [ruby-core:84552] [Bug #14257]
------------------------------------------------------------------------
r61512 | normal | 2017-12-29 15:47:29 +0900 (Fri, 29 Dec 2017) | 6 lines

test/ruby/test_hash: minor test cleanup

Prep work for proposed behavior change:
https://bugs.ruby-lang.org/issues/14225

* test/ruby/test_hash.rb (test_tainted_string_key): assert_predicate
------------------------------------------------------------------------
r61511 | svn | 2017-12-29 05:09:25 +0900 (Fri, 29 Dec 2017) | 1 line

* 2017-12-29
------------------------------------------------------------------------
r61510 | ko1 | 2017-12-29 05:09:24 +0900 (Fri, 29 Dec 2017) | 84 lines

`$SAFE` as a process global state. [Feature #14250]

* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to
  `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state.

* vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc`
  objects don't need to keep `$SAFE` at the creation.
  Also make `is_from_method` and `is_lambda` as 1 bit fields.

* cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation.

* eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access
  `vm->safe_level_` directly.

* eval_jump.c: End procs `END{}` doesn't keep `$SAFE`.

* proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c.

* safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes.

* safe.c (safe_setter): use `rb_set_safe_level()`.

* thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`.
  It should be obsolete.

* transcode.c (load_transcoder_entry): `rb_safe_level()` only returns
  0 or 1 so that this check is not needed.

* vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc.

* vm.c (rb_proc_create): renamed to `proc_create`.

* vm.c (rb_proc_dup): moved from proc.c.

* vm.c (vm_invoke_proc): do not need to set and restore `$SAFE`
  for `Proc#call`.

* vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer
  meaning.

* lib/drb/drb.rb: restore `$SAFE`.

* lib/erb.rb: restore `$SAFE`, too.

* test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests.

* test/rubygems/test_gem.rb: do not set `$SAFE = 1`.

* bootstraptest/test_proc.rb: catch up this change.

* spec/ruby/optional/capi/string_spec.rb: ditto.

* test/bigdecimal/test_bigdecimal.rb: ditto.

* test/fiddle/test_func.rb: ditto.

* test/fiddle/test_handle.rb: ditto.

* test/net/imap/test_imap_response_parser.rb: ditto.

* test/pathname/test_pathname.rb: ditto.

* test/readline/test_readline.rb: ditto.

* test/ruby/test_file.rb: ditto.

* test/ruby/test_optimization.rb: ditto.

* test/ruby/test_proc.rb: ditto.

* test/ruby/test_require.rb: ditto.

* test/ruby/test_thread.rb: ditto.

* test/rubygems/test_gem_specification.rb: ditto.

* test/test_tempfile.rb: ditto.

* test/test_tmpdir.rb: ditto.

* test/win32ole/test_win32ole.rb: ditto.

* test/win32ole/test_win32ole_event.rb: ditto.

------------------------------------------------------------------------
r61509 | nobu | 2017-12-28 17:28:42 +0900 (Thu, 28 Dec 2017) | 4 lines

proc.c: empty iseq names

* proc.c (proc_binding): unified the name and realpath of an empty
  iseq.
------------------------------------------------------------------------
r61508 | k0kubun | 2017-12-28 14:07:16 +0900 (Thu, 28 Dec 2017) | 3 lines

erb.rb: let's remove constant deprecated at 2.5

(r59497).
------------------------------------------------------------------------
r61507 | kazu | 2017-12-28 09:00:05 +0900 (Thu, 28 Dec 2017) | 3 lines

Fix KeyError#{key,receiver} of Thread#fetch

[ruby-core:84508] [Bug #14247]
------------------------------------------------------------------------
r61506 | normal | 2017-12-28 08:40:43 +0900 (Thu, 28 Dec 2017) | 5 lines

remove empty spec/rubyspec directory

* spec/rubyspec: remove empty directory trees
  [ruby-core:84533]

------------------------------------------------------------------------
r61505 | eregon | 2017-12-28 06:18:20 +0900 (Thu, 28 Dec 2017) | 1 line

Update to ruby/spec@b95d7ed
------------------------------------------------------------------------
r61504 | eregon | 2017-12-28 01:12:47 +0900 (Thu, 28 Dec 2017) | 1 line

Update to ruby/spec@0fe33ac
------------------------------------------------------------------------
r61503 | svn | 2017-12-28 01:12:19 +0900 (Thu, 28 Dec 2017) | 1 line

* 2017-12-28
------------------------------------------------------------------------
r61502 | eregon | 2017-12-28 01:12:18 +0900 (Thu, 28 Dec 2017) | 1 line

Update to ruby/mspec@5f563e4
------------------------------------------------------------------------
r61501 | ko1 | 2017-12-27 23:50:49 +0900 (Wed, 27 Dec 2017) | 8 lines

fix concurrent test.

* test/rubygems/test_require.rb (test_concurrent_require):
  Synchronizations should be in ensure clause. Sometimes
  `require` fails (not sure why) and latch is not released.
  Such case introduces unlimited awaiting.
  This patch soleve this problem.

------------------------------------------------------------------------
r61500 | nobu | 2017-12-27 23:07:49 +0900 (Wed, 27 Dec 2017) | 6 lines

fix fd mask detection on os x

This was broken in r59440 (3215b27a9abd8de793cf517f32d8901fd421eb1c)
[Bug #14248]

From: Stefan Kaes <skaes@railsexpress.de>
------------------------------------------------------------------------
r61499 | k0kubun | 2017-12-27 22:35:25 +0900 (Wed, 27 Dec 2017) | 5 lines

tool/downloader.rb: don't suppress exception

on the end of retry failure.

Fixed mistake in r61498
------------------------------------------------------------------------
r61498 | k0kubun | 2017-12-27 22:32:59 +0900 (Wed, 27 Dec 2017) | 8 lines

tool/downloader.rb: retry downloads

because it's randomly failing on CI like
https://ci.appveyor.com/project/ruby/ruby/build/1.0.6724

Actually I'm not sure whether the exception class is Errno::ECONNREFUSED
or not. Please change the rescued exception to the correct one doc/alt-ruby26/NEWS000064400000044751150403121760007731 0ustar00tension):
  search libruby.so only when enable-shared.
------------------------------------------------------------------------
r61494 | nobu | 2017-12-27 12:00:30 +0900 (Wed, 27 Dec 2017) | 1 line

vm_eval.c: expanded eval_string
------------------------------------------------------------------------
r61493 | nobu | 2017-12-27 11:55:16 +0900 (Wed, 27 Dec 2017) | 4 lines

vm_eval.c: split eval_string_with_cref

* vm_eval.c (eval_string_with_cref): split into cref and scope
  modes, which are exclusive.
------------------------------------------------------------------------
r61492 | nobu | 2017-12-27 11:55:15 +0900 (Wed, 27 Dec 2017) | 4 lines

vm_eval.c: refactor eval_make_iseq

* vm_eval.c (eval_make_iseq): moved preparations of location and
  debug print.
------------------------------------------------------------------------
r61491 | nobu | 2017-12-27 10:58:18 +0900 (Wed, 27 Dec 2017) | 5 lines

spec_helper.rb: must find libruby.so

* spec/ruby/optional/capi/spec_helper.rb (compile_extension): if
  libruby.so should have been built but is not found, fail early.
  get mtime of the library just once.
------------------------------------------------------------------------
r61490 | nobu | 2017-12-27 10:26:22 +0900 (Wed, 27 Dec 2017) | 4 lines

fake.rb: set libdir

* tool/fake.rb: set "libdir" to build directory too, so that
  spec/ruby/optional/capi/spec_helper.rb can find libruby_so.
------------------------------------------------------------------------
r61489 | svn | 2017-12-27 09:04:30 +0900 (Wed, 27 Dec 2017) | 1 line

* 2017-12-27
------------------------------------------------------------------------
r61488 | kazu | 2017-12-27 09:04:30 +0900 (Wed, 27 Dec 2017) | 1 line

[DOC] Fix typos in downcase [ci skip]
------------------------------------------------------------------------
r61487 | kazu | 2017-12-26 20:36:07 +0900 (Tue, 26 Dec 2017) | 2 lines

Add NEWS for Ruby 2.6.0

------------------------------------------------------------------------
r61486 | kazu | 2017-12-26 20:35:48 +0900 (Tue, 26 Dec 2017) | 2 lines

Move from NEWS to doc/NEWS-2.5.0

------------------------------------------------------------------------
r61485 | nobu | 2017-12-26 19:40:48 +0900 (Tue, 26 Dec 2017) | 1 line

test_proc.rb: remove duplicate test_source_location
------------------------------------------------------------------------
r61484 | nobu | 2017-12-26 19:32:58 +0900 (Tue, 26 Dec 2017) | 6 lines

vm_method.c: fix super in refined module

* vm_method.c (rb_method_entry_complement_defined_class): clone
  the original method entry of refined module instance method with
  the active ICLASS, to track super method chain.
  [ruby-dev:50390] [Bug #14232]
------------------------------------------------------------------------
r61483 | nobu | 2017-12-26 19:10:41 +0900 (Tue, 26 Dec 2017) | 5 lines

parse.y: warning for locations

* parse.y (gettable_gen): warn for __FILE__/__LINE__ when eval
  with binding only.  promote use of Binding#source_location
  instead.
------------------------------------------------------------------------
r61482 | nobu | 2017-12-26 18:05:28 +0900 (Tue, 26 Dec 2017) | 5 lines

vm_eval.c: strange message in eval

* vm_eval.c (eval_string_with_cref): remove unnecessary location
  from exception backtrace in eval.
  [ruby-core:84434] [Bug #14229]
------------------------------------------------------------------------
r61481 | mame | 2017-12-26 18:04:26 +0900 (Tue, 26 Dec 2017) | 1 line

test/ruby/test_proc.rb: Add a test for Binding#source_location
------------------------------------------------------------------------
r61480 | mame | 2017-12-26 17:38:35 +0900 (Tue, 26 Dec 2017) | 3 lines

proc.c (bind_location): Add Binding#source_location

Fixes #14230
------------------------------------------------------------------------
r61479 | nobu | 2017-12-26 14:30:31 +0900 (Tue, 26 Dec 2017) | 4 lines

variable.c: public rb_autoload

* variable.c (rb_autoload): restore the visibility for backward
  compatibility.  [ruby-core:84454] [Bug #14236]
------------------------------------------------------------------------
r61478 | nobu | 2017-12-26 08:59:56 +0900 (Tue, 26 Dec 2017) | 4 lines

prelude.c.tmpl: get rid of errors with old gcc

* template/prelude.c.tmpl: moved diagnostic pragmas outside
  prelude_eval() for very old gcc.  [ruby-core:84449] [Bug #14234]
------------------------------------------------------------------------
r61477 | svn | 2017-12-26 08:33:53 +0900 (Tue, 26 Dec 2017) | 1 line

* 2017-12-26
------------------------------------------------------------------------
r61476 | nobu | 2017-12-26 08:33:52 +0900 (Tue, 26 Dec 2017) | 1 line

test/ruby/test_process.rb: get rid of timing issue
------------------------------------------------------------------------
r61475 | k0kubun | 2017-12-25 23:22:21 +0900 (Mon, 25 Dec 2017) | 3 lines

cont.c: fix comment to follow field name change

saved_thread was renamed to saved_ec in r59831 [ci skip]
------------------------------------------------------------------------
r61474 | matz | 2017-12-25 23:05:59 +0900 (Mon, 25 Dec 2017) | 2 lines

version.h (RUBY_VERSION): 2.6.0 development has started.

------------------------------------------------------------------------
doc/alt-ruby26/NEWS000064400000044751150403121760007731 0ustar00# -*- rdoc -*-

= NEWS for Ruby 2.6.0

This document is a list of user visible feature changes made between
releases except for bug fixes.

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. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)

== Changes since the 2.5.0 release

=== Language changes

* <code>$SAFE</code> now is a process global state and can be set to 0 again. [Feature #14250]

* Refinements take place at block passing.  [Feature #14223]

* Refinements take place at Kernel#public_send.  [Feature #15326]

* Refinements take place at Kernel#respond_to?.  [Feature #15327]

* +else+ without +rescue+ now causes a syntax error.  [EXPERIMENTAL] [Feature #14606]

* Constant names may start with a non-ASCII capital letter. [Feature #13770]

* Endless ranges are introduced.  You can use a Range that has no end,
  like <code>(0..)</code> (or similarly <code>(0...)</code>).  [Feature #12912]

  The following shows typical use cases:

    ary[1..]                              # identical to ary[1..-1]
    (1...).each {|index| block }          # infinite loop from index 1
    ary.zip(1..) {|elem, index| block }   # ary.each.with_index(1) { }

* The "shadowing outer local variable" warning is removed.  [Feature #12490]

  You can now write the following without warning:

    user = users.find {|user| cond(user) }

* Print +cause+ of the exception if the exception is not caught and printed
  its backtraces and error message. [Feature #8257]

* The flip-flop syntax is deprecated. [Feature #5400]

* Non-Symbol keys in a keyword arguments hash was prohibited at 2.6.0, but
  now allowed again.  [Bug #15658]

=== Core classes updates (outstanding ones only)

[Array]

  [New methods]

    * Added Array#union and Array#difference instance methods.  [Feature #14097]

  [Modified methods]

    * Array#to_h now accepts a block that maps elements to new key/value pairs.  [Feature #15143]

  [Aliased methods]

    * Array#filter is a new alias for Array#select. [Feature #13784]
    * Array#filter! is a new alias for Array#select!. [Feature #13784]

[Binding]

  [New methods]

    * Added Binding#source_location.  [Feature #14230]

      This method returns the source location of the binding, a 2-element
      array of <code>__FILE__</code> and <code>__LINE__</code>.
      Traditionally, the same information could be retrieved by
      <code>eval("[__FILE__, __LINE__]", binding)</code>, but we are
      planning to change this behavior so that Kernel#eval ignores
      binding's source location [Bug #4352].  So, users should use this
      newly-introduced method instead of Kernel#eval.

[Dir]

  [New methods]

    * Added Dir#each_child and Dir#children instance methods. [Feature #13969]

[Enumerable]

  [New methods]

    * Enumerable#chain returns an enumerator object that iterates over the
      elements of the receiver and then those of each argument
      in sequence.  [Feature #15144]

  [Modified methods]

    * Enumerable#to_h now accepts a block that maps elemendoc/alt-ruby26/NEWS000064400000044751150403121760007731 0ustar00f the receiver and then those of the other operand.  [Feature #15144]

[ENV]

  [Modified methods]

    * ENV.to_h now accepts a block that maps names and values to new keys and values.  [Feature #15143]

[Exception]

  [New options]

    * Exception#full_message takes +:highlight+ and +:order+
      options. [Bug #14324]

[Hash]

  [Modified methods]

    * Hash#merge, Hash#merge!, and Hash#update now accept multiple
      arguments.  [Feature #15111]

    * Hash#to_h now accepts a block that maps keys and values to new keys and values.  [Feature #15143]

  [Aliased methods]

    * Hash#filter is a new alias for Hash#select.  [Feature #13784]

    * Hash#filter! is a new alias for Hash#select!. [Feature #13784]

[IO]

  [New options]

    * Added new mode character <code>'x'</code> to open files for exclusive
      access. [Feature #11258]

[Kernel]

  [Aliased methods]

    * Kernel#then is a new alias for Kernel#yield_self. [Feature #14594]

  [New options]

    * Kernel#Complex, Kernel#Float, Kernel#Integer, and
      Kernel#Rational take an +:exception+ option to specify the way of
      error handling.  [Feature #12732]

    * Kernel#system takes an +:exception+ option to raise an exception
      on failure.  [Feature #14386]

  [Incompatible changes]

    * Kernel#system and Kernel#exec do not close non-standard file descriptors
      (the default of the +:close_others+ option is changed to +false+,
      but we still set the +FD_CLOEXEC+ flag on descriptors we
      create).  [Misc #14907]

[KeyError]

  [New options]

    * KeyError.new accepts +:receiver+ and +:key+ options to set receiver and
      key in Ruby code.  [Feature #14313]

[Method]

  [New methods]

    * Added Method#<< and Method#>> for Proc composition.  [Feature #6284]

[Module]

  [Modified methods]

    * Module#method_defined?, Module#private_method_defined?, and
      Module#protected_method_defined? now accept the second
      parameter as optional. If it is +true+ (the default value), it checks
      ancestor modules/classes, or checks only the class itself. [Feature #14944]

[NameError]

  [New options]

    * NameError.new accepts a +:receiver+ option to set receiver in Ruby
      code.  [Feature #14313]

[NilClass]

  [New methods]

    * NilClass#=~ is added for compatibility.  [Feature #15231]

[NoMethodError]

  [New options]

    * NoMethodError.new accepts a +:receiver+ option to set receiver in Ruby
      code.  [Feature #14313]

[Numeric]

  [Incompatible changes]

    * Numeric#step now returns an instance of the Enumerator::ArithmeticSequence
      class rather than one of the Enumerator class.

[OpenStruct]

  [Modified methods]

    * OpenStruct#to_h now accepts a block that maps keys and values to new keys and values.  [Feature #15143]

[Proc]

  [New methods]

    * Added Proc#<< and Proc#>> for Proc composition.  [Feature #6284]

  [Incompatible changes]

    * Proc#call doesn't change <code>$SAFE</code> any more.  [Feature #14250]

[Random]

  [New methods]

    * Added Random.bytes.  [Feature #4938]

[Range]

  [New methods]

    * Added Range#% instance method.  [Feature #14697]

  [Incompatible changes]

    * Range#=== now uses the +#cover?+ instead of the +#include?+ method. [Feature #14575]
    * Range#cover? now accepts a Range object. [Feature #14473]
    * Range#step now returns an instance of the Enumerator::ArithmeticSequence
      class rather than one of the Enumerator class.

[Regexp/String]

    * Update Unicode version to 12.1.0, adding support for
      U+32FF SQUARE ERA NAME REIWA [Feature #15195]

    * Update Unicode version and Emoji version from 11.0.0 to
      12.0.0. [Feature #15321]

    * Update Unicode version from 10.0.0 to 11.0.0. [Feature #14802]

      This includes a rewrite of the grapheme cluster (/\X/) algorithm
      and special-casing for Georgian MTAVRULI on String#downcase.

    * Update Emoji version from 5.0 to 11.0.0 [Feature #14802]

[RubyVM::AbstractSyntaxTree]

  [New methods]

    * RubyVM::AbstractSyntaxTree.parse parses a given string and returns AST
      nodes. [experimental]

    * RubyVM::AbstractSyntaxTree.parse_file parses a given file and returns AST
      nodes.  [experimental]

    * RubyVM::AbstractSyntaxTree.of returns AST nodes of the given proc or method.
      [experimental]

[RubyVM]

  [New methods]

    * RubyVM.resolve_feature_path identifies the file that will be loaded by
      "require(feature)". [experimental] [Feature #15230]

[String]

  * String#crypt is now deprecated. [Feature #14915]

  [New features]

    * String#split yields each substring to the block if given. [Feature #4780]

[Struct]

  [Modified methods]

    * Struct#to_h now accepts a block that maps keys and values to new keys and values.  [Feature #15143]

  [Aliased method]

    * Struct#filter is a new alias for Struct#select. [Feature #13784]

[Time]

  [New features]

    * Time.new and Time#getlocal accept a timezone object as well as
      a UTC offset string. Time#+, Time#-, and Time#succ also preserve
      the timezone.  [Feature #14850]

[TracePoint]

  [New features]

    * "script_compiled" event is supported. [Feature #15287]

  [New methods]

    * TracePoint#parameters [Feature #14694]

    * TracePoint#instruction_sequence [Feature #15287]

    * TracePoint#eval_script [Feature #15287]

  [Modified methods]

    * TracePoint#enable accepts new keywords "target:" and "target_line:".
      [Feature #15289]

=== Stdlib updates (outstanding ones only)

[BigDecimal]

  Update to version 1.4.0.  This version includes several compatibility
  issues, see Compatibility issues section below for details.

  [Modified methods]

  * BigDecimal() accepts the new keyword "exception:" similar to Float().

  [Note for the differences among recent versions]

  You should want to know the differences among recent versions of bigdecimal.
  Please select the suitable version of bigdecimal according to the following
  information.

  * 1.3.5 has BigDecimal.new without "exception:" keyword.  You can see the
    deprecation warning of BigDecimal.new when you specify "-w" option.
    BigDecimal(), BigDecimal.new, and Object#to_d methods are the same.

  * 1.4.0 has BigDecimal.new with "exception:" keyword.  You always see the
    deprecation warning of BigDecimal.new.  Object#to_d method is different
    from BigDecimal() and BigDecimal.new.

  * 2.0.0 will be released soon after releasing Ruby 2.6.0.  This version
    will not have the BigDecimal.new method.

[Bundler]

  * Add Bundler to Standard Library. [Feature #12733]

  * Use 1.17.2, the latest stable version.

[Coverage]

  A oneshot_lines mode is added.  [Feature #15022]

  This mode checks "whether each line was executed at least once or not",
  instead of "how many times each line was executed".
  A hook for each line is fired at most once, and after it is fired
  the hook flag is removed, i.e., it runs with zero overhead.

  [New options]

    * Add +:oneshot_lines+ keyword argument to Coverage.start.

    * Add +:stop+ and +:clear+ keyword arguments to Coverage.result.
      If +clear+ is true, it clears the counters to zero.
      If +stop+ is true, it disables coverage measurement.

  [New methods]

    * Coverage.line_stub, which is a simple helper function that
      creates the "stub" of line coverage from a given source code.

[CSV]

  * Upgrade to 3.0.2. This includes performance improvements especially
    for writing. Writing is about 2 times faster.
    See https://github.com/ruby/csv/blob/master/NEWS.md.

[ERB]

  [New options]

    * Add +:trim_mode+ and +:eoutvar+ keyword arguments to ERB.new.
      Now non-keyword arguments other than the first one are softly deprecated
      and will be removed when Ruby 2.5 becomes EOL. [Feature #14256]

    * erb command's <tt>-S</tt> option is deprecated, and will be removed
      in the next version.

[FileUtils]

  [New methods]

    * FileUtils#cp_lr.  [Feature #4189]

[Matrix]

  [New methods]

    * Matrix#antisymmetric?, Matrix#skew_symmetric?

    * Matrix#map!, Matrix#collect! [Feature #14151]

    * Matrix#[]=

    * Vector#map!, Vector#collect!

    * Vector#[]=

[Net]

  [New options]

    * Add +:write_timeout+ keyword argument to Net::HTTP.new. [Feature #13396]

  [New methods]

    * Add Net::HTTP#write_timeout and Net::HTTP#write_timeout=.  [Feature #13396]

  [New constant]

    * Add Net::HTTPClientException to deprecate Net::HTTPServerException,
      whose name is misleading.  [Bug #14688]

  [Net::IMAP]

    * Add Server Name Indication (SNI) support.  [Feature #15594]

[NKF]

  * Upgrade to nkf v2.1.5

[Psych]

  * Upgrade to Psych 3.1.0

[RDoc]

  * Becdoc/alt-ruby26/README.ja.md000064400000020077150403121760011075 0ustar00implementations]

    * <code>concat()</code> function: Stringify all arguments before concatenating.

    * <code>string()</code> function: Support context node.

    * <code>string()</code> function: Support processing instruction node.

    * Support <code>"*:#{ELEMENT_NAME}"</code> syntax in XPath 2.0.

  [Fixed some XPath implementations]

    * <code>"//#{ELEMENT_NAME}[#{POSITION}]"</code> case

    * <code>string()</code> function: Fix <code>function(document)</code>
      returns nodes that are out of root elements.

    * <code>"/ #{ELEMENT_NAME} "</code> case

    * <code>"/ #{ELEMENT_NAME} [ #{PREDICATE} ]"</code> case

    * <code>"/ #{AXIS}::#{ELEMENT_NAME}"</code> case

    * <code>"#{N}-#{M}"</code> case: One or more white spaces were required
      before <code>"-"</code>

    * <code>"/child::node()"</code> case

    * <code>"#{FUNCTION}()/#{PATH}"</code> case

    * <code>"@#{ATTRIBUTE}/parent::"</code> case

    * <code>"name(#{NODE_SET})"</code> case

[CSV]

  * Upgrade to 3.0.9.
    See https://github.com/ruby/csv/blob/master/NEWS.md.

[Date]

  * Date.jisx0301, Date#jisx0301, and Date.parse provisionally support the
    new Japanese era as an informal extension, until the new JIS X 0301 is
    issued.  [Feature #15742]

[RSS]

  [New options]

    * RSS::Parser.parse now accepts options as Hash. +:validate+ ,
      +:ignore_unknown_element+ , +:parser_class+ options are available.

[RubyGems]

  * Upgrade to RubyGems 3.0.1

  * https://blog.rubygems.org/2018/12/19/3.0.0-released.html

  * https://blog.rubygems.org/2018/12/23/3.0.1-released.html

[Set]

  [Aliased methods]

    * Set#filter! is a new alias for Set#select!.  [Feature #13784]

[URI]

  [New constant]

    * Add URI::File to handle the file URI scheme.  [Feature #14035]

=== Compatibility issues (excluding feature bug fixes)

[Dir]

  * Dir.glob with <code>'\0'</code>-separated pattern list will be deprecated,
    and is now warned.  [Feature #14643]

[File]

  * File.read, File.binread, File.write, File.binwrite, File.foreach, and
    File.readlines do not invoke external commands even if the path starts
    with the pipe character <code>'|'</code>. [Feature #14245]

[Object]

  * Object#=~ is deprecated.  [Feature #15231]

=== Stdlib compatibility issues (excluding feature bug fixes)

* These standard libraries have been promoted to default gems.

  * e2mmap
  * forwardable
  * irb
  * logger
  * matrix
  * mutex_m
  * ostruct
  * prime
  * rexml
  * rss
  * shell
  * sync
  * thwait
  * tracer

[BigDecimal]

  * The following methods are removed.

    * BigDecimal.allocate
    * BigDecimal.ver

  * Every BigDecimal object is frozen. [Feature #13984]

  * BigDecimal() parses the given string similar to Float().

  * String#to_d parses the receiver string similar to String#to_f.

  * BigDecimal.new will be removed in version 2.0.

[Pathname]

  * Pathname#read, Pathname#binread, Pathname#write, Pathname#binwrite,
    Pathname#each_line and Pathname#readlines do not invoke external
    commands even if the path starts with the pipe character <code>'|'</code>.
    This follows [Feature #14245].

=== C API updates

=== Implementation improvements

* Speedup Proc#call because we don't need to care about <code>$SAFE</code>
  any more. [Feature #14318]

  With +lc_fizzbuzz+ benchmark which uses Proc#call many times we can
  measure x1.4 improvements.  [Bug #10212]

* Speedup block.call where +block+ is passed block parameter. [Feature #14330]

  Ruby 2.5 improves block passing performance. [Feature #14045]

  Additionally, Ruby 2.6 improves the performance of passed block calling.

* Introduce an initial implementation of a JIT (Just-in-time) compiler. [Feature #14235] [experimental]

  * <tt>--jit</tt> command line option is added to enable JIT. <tt>--jit-verbose=1</tt>
    is good for inspection.  See <tt>ruby --help</tt> for others.
  * To generate machine code, this JIT compiler uses the C compiler used for building
    the interpreter. Currently GCC, Clang, and Microsoft Visual C++ are supported for it.
  * <tt>--disable-mjit-support</tt> option is added to configure. This is added for JIT debugging,
    but if you get an error on building a header file for JIT, you can use this option to skip
    building it as a workaround.
  * rb_waitpid reimplemented on Unix-like platforms to maintain
    compatibility with processes created for JIT [Bug #14867]

* VM generator script renewal; makes the generated VM more optimized. [GH-1779]

* Thread cache enabled for pthreads platforms (for Thread.new and
  Thread.start).  [Feature #14757]

* timer thread is eliminated for platforms with POSIX timers. [Misc #14937]

* Transient Heap (theap) is supported. [Bug #14858] [Feature #14989]

  theap is a managed heap for short-living memory objects. For example,
  making a small and short-living Hash object is x2 faster. With rdoc benchmark,
  we measured 6-7% performance improvement.

* Native implementations (arm32, arm64, ppc64le, win32, win64, x86, amd64) of
  coroutines to improve performance of Fiber significantly. [Feature #14739]

=== Miscellaneous changes

* On macOS, shared libraries no longer include a full version number of Ruby
  in their names.  This eliminates the burden of each teeny upgrade on the
  platform that users need to rebuild every extension library.

  [Before]
    * libruby.2.6.0.dylib
    * libruby.2.6.dylib -> libruby.2.6.0.dylib
    * libruby.dylib -> libruby.2.6.0.dylib

  [After]
    * libruby.2.6.dylib
    * libruby.dylib -> libruby.2.6.dylib

* Extracted misc/*.el files to https://github.com/ruby/elisp
doc/alt-ruby26/README.ja.md000064400000020077150403121760011075 0ustar00[![Build Status](https://travis-ci.org/ruby/ruby.svg?branch=trunk)](https://travis-ci.org/ruby/ruby)
[![Build status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/trunk?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/trunk)
[![wercker status](https://app.wercker.com/status/e5e7e1704f62b76525022aa424aef6ef/s/trunk "wercker status")](https://app.wercker.com/project/byKey/e5e7e1704f62b76525022aa424aef6ef)

# Rubyとは

Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です. Rubyは純粋なオブジェクト指向言語として設計されているので,
オブジェクト指向プログラミングを手軽に行う事が出来ます.もちろん普通の手続き型のプログラミングも可能です.

Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい強力です.さらにシンプルな文法と,
例外処理やイテレータなどの機構によって,より分かりやすいプログラミングが出来ます.

## Rubyの特長

*   シンプルな文法
*   普通のオブジェクト指向機能(クラス,メソッドコールなど)
*   特殊なオブジェクト指向機能(Mixin, 特異メソッドなど)
*   演算子オーバーロード
*   例外処理機能
*   イテレータとクロージャ
*   ガーベージコレクタ
*   ダイナミックローディング (アーキテクチャによる)
*   移植性が高い.多くのUnix-like/POSIX互換プラットフォーム上で動くだけでなく,Windows, macOS,
    Haikuなどの上でも動く cf.
    https://github.com/ruby/ruby/blob/trunk/doc/contributing.rdoc#platform-maintainers


## 入手法

サードパーティーツールを使った方法を含むRubyのインストール方法の一覧は

https://www.ruby-lang.org/ja/downloads/

を参照してください.

### Subversionで

開発先端のソースコードは次のコマンドで取得できます.

    $ svn co https://svn.ruby-lang.org/repos/ruby/trunk/ ruby

他に開発中のブランチの一覧は�doc/alt-ruby26/COPYING.ja000064400000005100150403121760010637 0ustar00�リングリストと数学関係の話題について話し合うruby-mathメーリングリストと
英語でrubyについて話し合うruby-talkメーリングリストもあります.参加方法はどれも同じです.

## コンパイル・インストール

以下の手順で行ってください.

1.  もし `configure` ファイルが見つからない,もしくは `configure.ac` より古いようなら, `autoconf` を実行して
    新しく `configure` をdoc/alt-ruby26/README.ja.md000064400000020077150403121760011075 0ustar00れます.

    ダイナミックローディングをサポートしていないアーキテクチャでは `Setup` の1行目の「`option nodynamic`」という行のコ
    メントを外す必要があります.また,このアーキテクチャで拡張モジュールを利用するためには,あらかじめ静的にリンクをしておく必要があります.

5.  `make` を実行してコンパイルする

6.  `make check`でテストを行う.

    「`check succeeded`」と表示されれば成功です.ただしテストに成功しても完璧だと保証されている訳ではありません.

7.  `make install`

    以下のディレクトリを作って,そこにファイルをインストー ルします.

    *   `${DESTDIR}${prefix}/bin`
    *   `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
    *   `${DESTDIR}${prefix}/lib`
    *   `${DESTDIR}${prefix}/lib/ruby`
    *   `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby`
    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby`
    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}`
    *   `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
    doc/alt-ruby26/README.EXT000064400000000034150403121760010533 0ustar00解決できる可能性が�doc/alt-ruby26/LEGAL000064400000114543150403121760007776 0ustar00�ルを参照してください.

## フィードバック

Rubyに関する質問は Ruby-Talk(英語)や Ruby-List(日本語) (https://www.ruby-lang.org/ja/community/mailing-lists) や,
stackoverflow (https://ja.stackoverflow.com/) などのWebサイトに投稿してください.

バグ報告は https://bugs.ruby-lang.org で受け付けています.


## 著者

Rubyのオリジナル版は,1995年にまつもとゆきひろ氏によって設計・開発されました.

<mailto:matz@ruby-lang.org>

---
created at: Thu Aug  3 11:57:36 JST 1995
doc/alt-ruby26/COPYING.ja000064400000005100150403121760010637 0ustar00本プログラムはフリーソフトウェアです.2-clause BSDL
または以下に示す条件で本プログラムを再配布できます
2-clause BSDLについてはBSDLファイルを参照して下さい.

  1. 複製は制限なく自由です.

  2. 以下の条件のいずれかを満たす時に本プログラムのソースを
     自由に変更できます.

     (a) ネットニューズにポストしたり,作者に変更を送付する
         などの方法で,変更を公開する.

     (b) 変更した本プログラムを自分の所属する組織内部だけで
         使う.

     (c) 変更点を明示したうえ,ソフトウェアの名前を変更する.
         そのソフトウェアを配布する時には変更前の本プログラ
         ムも同時に配布する.または変更前の本プログラムのソー
         スの入手法を明示する.

     (d) その他の変更条件を作者と合意する.

  3. 以下の条件のいずれかを満たす時に本プログラムをコンパイ
     ルしたオブジェクトコードや実行形式でも配布できます.

     (a) バイナリを受け取った人がソースを入手できるように,
         ソースの入手法を明示する.

     (b) 機械可読なソースコードを添付する.

     (c) 変更を行ったバイナリは名前を変更したうえ,オリジナ
         ルのソースコードの入手法を明示する.

     (d) その他の配布条件を作者と合意する.

  4. 他のプログラムへの引用はいかなる目的であれ自由です.た
     だし,本プログラムに含まれる他の作者によるコードは,そ
     れぞれの作者の意向による制限が加えられる場合があります.

     それらファイルの一覧とそれぞれの配布条件などに付いては
     LEGALファイルを参照してください.

  5. 本プログラムへの入力となるスクリプトおよび,本プログラ
     ムからの出力の権利は本プログラムの作者ではなく,それぞ
     れの入出力を生成した人に属します.また,本プログラムに
     組み込まれるための拡張ライブラリについても同様です.

  6. 本プログラムは無保証です.作者は本プログラムをサポート
     する意志はありますが,プログラム自身のバグあるいは本プ
     ログラムの実行などから発生するいかなる損害に対しても責
     任を持ちません.
doc/alt-ruby26/README.EXTdoc/alt-ruby26/COPYING.ja000064400000005100150403121760010637 0ustar00doc/alt-ruby26/LEGAL000064400000114543150403121760007776 0ustar00# -*- rdoc -*-

= LEGAL NOTICE INFORMATION
--------------------------

All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.

ccan/build_assert/build_assert.h::
ccan/check_type/check_type.h::
ccan/container_of/container_of.h::
ccan/str/str.h::

  These files are licensed under the CC0.

  >>>
    https://creativecommons.org/choose/zero/

ccan/list/list.h::

  This file is licensed under the MIT License.

  >>>
    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:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    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.

include/ruby/onigmo.h::
include/ruby/oniguruma.h::
regcomp.c::
regenc.c::
regenc.h::
regerror.c::
regexec.c::
regint.h::
regparse.c::
regparse.h::
enc/ascii.c::
enc/big5.c::
enc/cp949.c::
enc/emacs_mule.c::
enc/encdb.c::
enc/euc_jp.c::
enc/euc_kr.c::
enc/euc_tw.c::
enc/gb18030.c::
enc/gb2312.c::
enc/gbk.c::
enc/iso_8859_1.c::
enc/iso_8859_10.c::
enc/iso_8859_11.c::
enc/iso_8859_13.c::
enc/iso_8859_14.c::
enc/iso_8859_15.c::
enc/iso_8859_16.c::
enc/iso_8859_2.c::
enc/iso_8859_3.c::
enc/iso_8859_4.c::
enc/iso_8doc/alt-ruby26/README.EXT000064400000000034150403121760010533 0ustar00provided with the distributidoc/alt-ruby26/LEGAL000064400000114543150403121760007776 0ustar00ation, 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.

  * https://github.com/k-takata/Onigmo/
  * https://github.com/kkos/oniguruma
  * https://svnweb.freebsd.org/ports/head/devel/oniguruma/

    When this software is partly used or it is distributed with Ruby,
    this of Ruby follows the license of Ruby.

enc/trans/GB/GB12345%UCS.src::
enc/trans/GB/UCS%GB12345.src::
enc/trans/GB/GB2312%UCS.src::
enc/trans/GB/UCS%GB2312.src::

  These files have this explanatory texts.

  >>>
    This mapping data was created from files provided by Unicode, Inc.
    (The Unicode Consortium). The files were used to create a product supporting
    Unicode, as explicitly permitted in the files' copyright notices.
    Please note that Unicode, Inc. never made any claims as to fitness of these
    files for any particular purpose, and has ceased to publish the files many
    years ago.

enc/trans/JIS/JISX0201-KANA%UCS.src::
enc/trans/JIS/JISX0208\@1990%UCS.src::
enc/trans/JIS/JISX0212%UCS.src::
enc/trans/JIS/UCS%JISX0201-KANA.src::
enc/trans/JIS/UCS%JISX0208@1990.src::
enc/trans/JIS/UCS%JISX0212.src::

  These files are copyrighted as the following.

  >>>
    © 2015 Unicode®, Inc.

    For terms of use, see http://www.unicode.org/terms_of_use.html

enc/trans/JIS/JISX0213-1%UCS@BMP.src::
enc/trans/JIS/JISX0213-1%UCS@SIP.src::
enc/trans/JIS/JISX0213-2%UCS@BMP.src::
enc/trans/JIS/JISX0213-2%UCS@SIP.src::

  These files are copyrighted as the following.

  >>>
    Copyright (C) 2001 earthian@tama.or.jp, All Rights Reserved.  
    Copyright (C) 2001 I'O, All Rights Reserved.  
    Copyright (C) 2006 Project X0213, All Rights Reserved.  
    You can use, modify, distribute this table freely.

enc/trans/JIS/UCS@BMP%JISX0213-1.src::
enc/trans/JIS/UCS@BMP%JISX0213-2.src::
enc/trans/JIS/UCS@SIP%JISX0213-1.src::
enc/trans/JIS/UCS@SIP%JISX0213-2.src::

  These files are copyrighted as the following.

  >>>
    Copyright (C) 2001 earthian@tama.or.jp, All Rights Reserved.  
    Copyright (C) 2001 I'O, All Rights Reserved.  
    You can use, modify, distribute this table freely.

configure::

  This file is free software.

  >>>
    Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.

    This configure script is free software; the Free Software Foundation
    gives unlimited permission to copy, distribute and modify it.

tool/config.guess::
tool/config.sub::

  As long as you distribute these files with the file configure, they
  are covered under the Ruby's license.

  >>>
    Copyright 1992-2018 Free Software Foundation, Inc.

    This file is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, see <https://www.gnu.org/licenses/>.

    As a special exception to the GNU General Public License, if you
    distribute this file as part of a program that contains a
    configuration script generated by Autoconf, you may include it under
    the same distribution terms that you use for the rest of that
    program.  This Exception is an additional permission under section 7
    of the GNU General Public License, version 3 ("GPLv3").

parse.c::

  This file is licensed under the GPL, but is incorporated into Ruby and
  redistributed under the terms of the Ruby license, as permitted by the
  exception to the GPL below.

  >>>
    Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
    under terms of your choice, so long as that work isn't itself a
    parser generator using the skeleton or a modified version thereof
    as a parser skeleton.  Alternatively, if you modify or redistribute
    the parser skeleton itself, you may (at your option) remove this
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.

    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.

util.c (partly)::

  This file contains the source code under these licenses.

  >>>
    Copyright (c) 1991, 2000, 2001 by Lucent Technologies.

    Permission to use, copy, modify, and distribute this software for any
    purpose without fee is hereby granted, provided that this entire notice
    is included in all copies of any software which is or includes a copy
    or modification of this software and in all copies of the supporting
    documentation for such software.

    THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
    WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
    REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
    OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.

  >>>
    Copyright (c) 2004-2008 David Schultz <das@FreeBSD.ORG>  
    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.

win32/win32.{c,h}::

  You can apply the Artistic License to these files. (or GPL,
  alternatively)

  >>>
    Copyright (c) 1993, Intergraph Corporation

    You may distribute under the terms of either the GNU General Public
    License or the Artistic License, as specified in the perl README file.

random.c::

  This file contains the source code under the new-style BSD license.

  >>>
    A C-program for MT19937, with initialization improved 2002/2/10.
    Coded by Takuji Nishimura and Makoto Matsumoto.  
    This is a faster version by taking Shawn Cokus's optimization,
    Matthe Bellew's simplification, Isaku Wada's real version.

    Before using, initialize the state by using init_genrand(seed)
    or init_by_array(init_key, key_length).

    Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
    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.

    3. The names of its contributors may not be used to endorse or promote
       products derived from this software without specific prior written
       permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.


    Any feedback is very welcome.
    http://www.math.keio.ac.jp/matumoto/emt.html
    email: matumoto@math.keio.ac.jp

  The Wayback Machine url: http://web.archive.org/web/19990429082237/http://www.math.keio.ac.jp/matumoto/emt.html

vm_dump.c:procstat_vm::

  This file contains the source code under the new-style BSD license.

  >>>
    Copyright (c) 2007 Robert N. M. Watson  
    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.

    $FreeBSD: head/usr.bin/procstat/procstat_vm.c 261780 2014-02-11 21:57:37Z jhb $

vsnprintf.c::

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

  >>>
    Copyright (c) 1990, 1993  
    The Regents of the University of California.  All rights reserved.

    This code is derived from software contributed to Berkeley by
    Chris Torek.

    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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

    IMPORTANT NOTE:
    --------------
    From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
    paragraph 3 above is now null and void.

st.c::
strftime.c::
include/ruby/st.h::
missing/acosh.c::
missing/alloca.c::
missing/dup2.c::
missing/erf.c::
missing/finite.c::
missing/hypot.c::
missing/isinf.c::
missing/isnan.c::
missing/lgamma_r.c::
missing/memcmp.c::
missing/memmove.c::
missing/strchr.c::
missing/strerror.c::
missing/strstr.c::
missing/tgamma.c::
ext/date/date_strftime.c::
ext/digest/sha1/sha1.c::
ext/digest/sha1/sha1.h::
ext/sdbm/_sdbm.c::
ext/sdbm/sdbm.h::

  These files are all under public domain.

missing/crypt.c::

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

  >>>
    Copyright (c) 1989, 1993  
    The Regents of the University of California.  All rights reserved.

    This code is derived from software contributed to Berkeley by
    Tom Truscott.

    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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

missing/setproctitle.c::

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

  >>>
    Copyright 2003 Damien Miller  
    Copyright (c) 1983, 1995-1997 Eric P. Allman  
    Copyright (c) 1988, 1993  
    The Regents of the University of California.  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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

missing/strlcat.c::
missing/strlcpy.c::

  These files are under an ISC-style license.

  >>>
    Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>

    Permission to use, copy, modify, and distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

missing/langinfo.c::

  This file is from http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c.
  Ruby uses a modified version. The file contains the following
  author/copyright notice:

  >>>
    Markus.Kuhn@cl.cam.ac.uk -- 2002-03-11  
    Permission to use, copy, modify, and distribute this software
    for any purpose and without fee is hereby granted. The author
    disclaims all warranties with regard to this software.

ext/digest/md5/md5.c::
ext/digest/md5/md5.h::

  These files are under the following license.  Ruby uses modified
  versions of them.

  >>>
    Copyright (C) 1999, 2000 Aladdin Enterprises.  All rights reserved.

    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any damages
    arising from the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
       claim that you wrote the original software. If you use this software
       in a product, an acknowledgment in the product documentation would be
       appreciated but is not required.
    2. Altered source versions must be plainly marked as such, and must not be
       misrepresented as being the original software.
    3. This notice may not be removed or altered from any source distribution.

    L. Peter Deutsch
    ghost@aladdin.com

ext/digest/rmd160/rmd160.c::
ext/digest/rmd160/rmd160.h::

  These files have the following copyright information, and by the
  author we are allowed to use it under the new-style BSD license.

  >>>
    AUTHOR::  Antoon Bosselaers, ESAT-COSIC
              (Arranged for libc by Todd C. Miller)
    DATE::    1 March 1996

    Copyright (c) Katholieke Universiteit Leuven
    1996, All Rights Reserved

ext/digest/sha2/sha2.c::
ext/digest/sha2/sha2.h::

  These files are under the new-style BSD license.

  >>>
    Copyright 2000 Aaron D. Gifford.  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.
    3. Neither the name of the copyright holder nor the names of contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``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(S) OR CONTRIBUTOR(S) 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.

ext/json/generator/generator.c::

  The file contains the following copyright notice.

  >>>
    Copyright 2001-2004 Unicode, Inc.

    Disclaimer::

      This source code is provided as is by Unicode, Inc. No claims are
      made as to fitness for any particular purpose. No warranties of any
      kind are expressed or implied. The recipient agrees to determine
      applicability of information provided. If this file has been
      purchased on magnetic or optical media from Unicode, Inc., the
      sole remedy for any claim will be exchange of defective media
      within 90 days of receipt.

    Limitations on Rights to Redistribute This Code::

      Unicode, Inc. hereby grants the right to freely use the information
      supplied in this file in the creation of products supporting the
      Unicode Standard, and to make copies of this file in any form
      for internal or external distribution as long as this notice
      remains attached.

ext/nkf/nkf-utf8/config.h::
ext/nkf/nkf-utf8/nkf.c::
ext/nkf/nkf-utf8/utf8tbl.c::

  These files are under the following license.  So to speak, it is
  copyrighted semi-public-domain software.

  >>>
    Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)

    Everyone is permitted to do anything on this program
    including copying, modifying, improving,
    as long as you don't try to pretend that you wrote it.
    i.e., the above copyright notice has to appear in all copies.
    Binary distribution requires original version messages.
    You don't have to ask before copying, redistribution or publishing.
    THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.

ext/psych::
test/psych::

  The files under these directories are under the following license, except for
  ext/psych/yaml.

  >>>
    Copyright 2009 Aaron Patterson, et al.

    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:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    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.

ext/psych/yaml::

  The files under this directory are under the following license.

  >>>
    Copyright (c) 2006 Kirill Simonov

    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:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    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.

ext/socket/addrinfo.h::
ext/socket/getaddrinfo.c::
ext/socket/getnameinfo.c::

  These files are under the new-style BSD license.

  >>>
    Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
    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.
    3. Neither the name of the project nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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 LIABILITYdoc/alt-ruby26/README.EXT.ja000064400000000053150403121770011126 0ustar00cense, as specified in the README file
    doc/alt-ruby26/BSDL000064400000002402150403121770007665 0ustar00cluded in all copies or substantial portions of the Software.

    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.

lib/rubygems.rb::
lib/rubygems::
test/rubygems::

  RubyGems is under the following license.

  >>>
    RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
    Weirich and others.  You can redistribute it and/or modify it under
    either the terms of the MIT license (see the file MIT.txt), or the
    conditions below:

    1. You may make and give away verbatim copies of the source form of the
       software without restriction, provided that you duplicate all of the
       original copyright notices and associated disclaimers.

    2. You may modify your copy of the software in any way, provided that
       you do at least ONE of the following:

       a. place your modifications in the Public doc/alt-ruby26/COPYING000064400000004751150403121770010262 0ustar00 (in the manual page or equivalent)
          on where to get the original distribution.

       b. accompany the distribution with the machine-readable source of
          the software.

       c. give non-standard executables non-standard names, with
          instructions on where to get the original software distribution.

       d. make other distribution arrangements with the author.

    4. You may modify and include the part of the software into any other
       software (possibly commercial).

    5. The scripts and library files supplied as input to or produced as
       output from the software do not automatically fall under the
       copyright of the software, but belong to whomever generated them,
       and may be sold commercially, and may be aggregated with this
       software.

    6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
       IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
       PURPOSE.

lib/bundler::
lib/bundler.rb::
lib/bundler.gemspec::
spec/bundler::
man/bundle-*,gemfile.*::

  Bundler is under the following license.

  >>>
    Portions copyright (c) 2010 Andre Arko  
    Portions copyright (c) 2009 Engine Yard  

    MIT License::

      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:

      The above copyright notice and this permission notice shall be
      included in all copies or substantial portions of the Software.

      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.
doc/alt-ruby26/GPL000064400000043254150403121770007575 0ustar00doc/extension.ja.rdocに移動しました
doc/alt-ruby26/BSDL000064400000002402150403121770007665 0ustar00Copyright (C) 1993-2013 Yukihiro Matsumoto. 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.
doc/alt-ruby26/COPYING000064400000004751150403121770010262 0ustar00Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:

  1. You may make and give away verbatim copies of the source form of the
     software without restriction, provided that you duplicate all of the
 doc/alt-ruby26/README.EXT.ja000064400000000053150403121770011126 0ustar00tribution.

       d) make other distributidoc/alt-ruby26/BSDL000064400000002402150403121770007665 0ustar00ts and library files supplied as input to or produced as
     output from the software do not automatically fall under the
     copyright of the software, but belong to whomever generated them,
     and may be sold commercially, and may be aggregated with this
     software.

  6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     PURPOSE.
doc/alt-ruby26/GPL000064400000043254150403121770007575 0ustar00                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute vedoc/alt-ruby26/COPYING000064400000004751150403121770010262 0ustar00blic Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation indoc/alt-ruby26/GPL000064400000043254150403121770007575 0ustar00s you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent appliman/man1/rake.1000064400000011007150403127720007157 0ustar00 Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer)doc/alt-ruby20-rubygems/LICENSE.txt000064400000004423150403127740012676 0ustar00man/man1/rake.1000064400000007000150403127720007155 0ustar00.Dd November 30, 2008
.Dt RAKE(1) "" "Ruby Programmers Reference Guide"
.Os UNIX
.Sh NAME
.Nm rake
.Nd Ruby Make
.Sh SYNOPSIS
.Nm
.Op Fl -f Ar Rakefile
.Op Fl -version
.Op Fl CGNPgnqstv
.Op Fl D Op Ar PATTERN
.Op Fl E Ar CODE
.Op Fl I Ar LIBDIR
.Op Fl R Ar RAKELIBDIR
.Op Fl T Op Ar PATTERN
.Op Fl e Ar CODE
.Op Fl p Ar CODE
.Op Fl r Ar MODULE
.Op Fl -rules
.Op Ar variable Ns = Ns Ar value
.Ar target ...
.Sh DESCRIPTION
.Nm Rake
is a simple
.Xr ruby 1
build program with capabilities similar to the regular
.Xr make 1
command.
.Pp
.Nm Rake
has the following features:
.Bl -bullet
.It
Rakefiles (Rake's version of Makefiles) are completely defined in standard Ruby syntax.
No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?).
.It
Users can specify tasks with prerequisites.
.It
Rake supports rule patterns to synthesize implicit tasks.
.It
Flexible FileLists that act like arrays but know about manipulating file names and paths.
.It
A library of prepackaged tasks to make building rakefiles easier.
.El
.Pp
.Sh OPTIONS
.Bl -tag -width "--execute-continue" -compact
.Pp
.It Fl -version
Display the program version.
.Pp
.It Fl C
.It Fl -classic-namespace
Put Task and FileTask in the top level namespace
.Pp
.It Fl D Op Ar PATTERN
.It Fl -describe Op Ar PATTERN
Describe the tasks (matching optional
.Ar PATTERN Ns
), then exit.
.Pp
.It Fl E Ar CODE
.It Fl -execute-continue Ar CODE
Execute some Ruby code, then continue with normal task processing.
.Pp
.It Fl G
.It Fl -no-system
.It Fl -nosystem
Use standard project Rakefile search paths, ignore system wide rakefiles.
.Pp
.It Fl I Ar LIBDIR
.It Fl -libdir Ar LIBDIR
Include
.Ar LIBDIR
in the search path for required modules.
.Pp
.It Fl N
.It Fl -no-search
.It Fl -nosearch
Do not search parent directories for the Rakdoc/alt-ruby20/README.ja000064400000017000150403127750010465 0ustar00tions.
.Pp
.It Fl p Ar CODE
.It Fl -execute-print Ar CODE
Execute some Ruby code, print the result, then exit.
.Pp
.It Fl q
.It Fl -quiet
Do not log messages to standard output.
.Pp
.It Fl r Ar MODULE
.It Fl -require Ar MODULE
Require MODULE before executing rakefile.
.Pp
.It Fl s
.It Fl -silent
Like
.Fl -quiet ,
but also suppresses the 'in directory' announcement.
.Pp
.It Fl t
.It Fl -trace
Turn on invoke/execute tracing, enable full backtrace.
.Pp
.It Fl v
.It Fl -verbose
Log message to standard output (default).
.Pp
.It Fl -rules
Trace the rules resolution.
.Pp
.El
.Pp
.Sh SEE ALSO
.Xr ruby 1
.Xr make 1
.Pp
http://rake.rubyforge.org/
.Sh REPORTING BUGS
Bugs, features requeman/man1/rake.1000064400000007215150403127720007165 0ustar00.Dd June 12, 2016
.Dt RAKE 1
.Os rake 11.2.2
.Sh NAME
.Nm rake
.Nd make-like build utility for Ruby
.Sh SYNOPSIS
.Nm
.Op Fl f Ar rakefile
.Op Ar options
.Ar targets ...
.Sh DESCRIPTION
.Nm
is a
.Xr make 1 Ns -like
build utility for Ruby.
Tasks and dependencies are specified in standard Ruby syntax.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl m , Fl -multitask
Treat all tasks as multitasks.
.It Fl B , Fl -build-all
Build all prerequisites, including those which are up\-to\-date.
.It Fl j , Fl -jobs Ar num_jobs
Specifies the maximum number of tasks to execute in parallel (default is number of CPU cores + 4).
.El
.Ss Modules
.Bl -tag -width Ds
.It Fl I , Fl -libdir Ar libdir
Include
.Ar libdir
in the search path for required modules.
.It Fl r , Fl -require Ar module
Require
.Ar module
before executing
.Pa rakefile .
.El
.Ss Rakefile location
.Bl -tag -width Ds
.It Fl f , Fl -rakefile Ar filename
Use
.Ar filename
as the rakefile to search for.
.It Fl N , Fl -no-search , Fl -nosearch
Do not search parent directories for the Rakefile.
.It Fl G , Fl -no-system , Fl -nosystem
Use standard project Rakefile search paths, ignore system wide rakefiles.
.It Fl R , Fl -rakelib Ar rakelibdir , Fl -rakelibdir Ar rakelibdir
Auto-import any .rake files in
.Ar rakelibdir
(default is
.Sq rakelib )
.It Fl g , Fl -system
Use system-wide (global) rakefiles (usually
.Pa ~/.rake/*.rake ) .
.El
.Ss Debugging
.Bl -tag -width Ds
.It Fl -backtrace Ns = Ns Ar out
Enable full backtrace.
.Ar out
can be
.Dv stderr
(default) or
.Dv stdout .
.It Fl t , Fl -trace Ns = Ns Ar out
Turn on invoke/execute tracing, enable full backtrace.
.Ar out
can be
.Dv stderr
(default) or
.Dv stdout .
.It Fl -suppress-backtrace Ar pattern
Suppress backtrace lines matching regexp
.Ar pattern .
Ignored if
.Fl -trace
is on.
.It Fl -rules
Trace the rules resolution.
.It Fl n , Fl -dry-run
Do a dry run without executing actions.
.It Fl T , Fl -tasks Op Ar pattern
Display the tasks (matching optional
.Ar pattern )
with descriptions, then exit.
.It Fl D , Fl -describe Op Ar pattern
Describe the tasks (matching optional
.Ar pattern ) ,
then exit.
.It Fl W , Fl -where Op Ar pattern
Describe the tasks (matching optional
.Ar pattern ) ,
then exit.
.It Fl P , Fl -prereqs
Display the tasks and dependencies, then exit.
.It Fl e , Fl -execute Ar code
Execute some Ruby code and exit.
.It Fl p , Fl -execute-print Ar code
Execute some Ruby code, print the result, then exit.
.It Fl E , Fl -execute-continue Ar code
Execute some Ruby code, then continue with normal task processing.
.El
.Ss Information
.Bl -tag -width Ds
.It Fl v , Fl -verbose
Log message to standard output.
.It Fl q , Fl -quiet
Do not log messages to standard output.
.It Fl s , Fl -silent
Like
.Fl -quiet ,
but also suppresses the
.Sq in directory
announcement.
.It Fl X , Fl -no-deprecation-warnings
Disable the deprecation warnings.
.It Fl -comments
Show commented tasks only
.It Fl A , Fl -all
Show all tasks, even uncommented ones (in combination with
.Fl T
or
.Fl D )
.It Fl -job-stats Op Ar level
Display job statistics.
If
.Ar level
is
.Sq history ,
displays a complete job list.
.It Fl V , Fl -version
Display the program version.
.It Fl h , Fl H , Fl -help
Display a help message.
.El
.Sh SEE ALSO
The complete documentation for
.Nm rake
has been installed at
.Pa /usr/share/doc/rake-doc/html/index.html .
It is also available online at
.Lk https://ruby.github.io/rake .
.Sh AUTHORS
.An -nosplit
.Nm
was written by
.An Jim Weirich Aq Mt jim@weirichhouse.org .
.Pp
This manual was created by
.An Caitlin Matos Aq Mt caitlin.matos@zoho.com
for the Debian project (but may be used by others).
It was inspired by the manual by
.An Jani Monoses Aq Mt jani@iv.ro
for the Ubuntu project.
doc/alt-ruby20-rubygems/LICENSE.txt000064400000004423150403127740012676 0ustar00ーリングリストと
数学関係の話題について話し合うruby-mathメーリングリストと
英語で話し合うruby-talkメーリングリストもあります。参加方法
はどれも同じです。


== コンパイル・インストール

以下の手順で行ってください.

1.   もし +configure+ ファイルが見つからない、もしくは
     +configure.in+ より古いようなら、 +autoconf+ を実行して
     新しく +configure+ を生成する

2.   +configure+ を実行して +Makefile+ などを生成する

     環境によってはデフォルトのCコンパイラ用オプションが付き
     ます. +configure+ オプションで <tt>optflags=..</tt> <tt>warnflags=..</tt> 等
     で上書きできます.

3.   (必要ならば)+defines.h+ を編集する

     多分,必要無いと思います.

4.   (必要ならば)+ext/Setup+ に静的にリンクする拡張モジュールを
     指定する

     +ext/Setup+ に記述したモジュールは静的にリンクされます.

     ダイナミックローディングをサポートしていないアーキテク
     チャでは +Setup+ の1行目の「<tt>option nodynamic</tt>」という行のコ
     メントを外す必要があります.また,このアーキテクチャで
     拡張モジュールを利用するためには,あらかじめ静的にリン
     クしておく必要があります.

5.   +make+ を実行してコンパイルする

6.   <tt>make check</tdoc/alt-ruby20/ChangeLog000064400003676032150403127760011012 0ustar00INOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
  doc/alt-ruby20/README.ja000064400000017000150403127750010465 0ustar00��
     '_x_'で,<tt>${MINOR}</tt>は'_y_',<tt>${TEENY}</tt>は'_z_'です.

     <b>注意</b>: APIバージョンの +teeny+ は,Rubyプログラムのバージョ
     ンとは異なることがあります.

     +root+ で作業する必要があるかもしれません.

もし,コンパイル時にエラーが発生した場合にはエラーのログとマ
シン,OSの種類を含むできるだけ詳しいレポートを作者に送ってく
ださると他の方のためにもなります.


== 移植

UNIXであれば +configure+ がほとんどの差異を吸収してくれるはずで
すが,思わぬ見落としがあった場合(あるに違いない),作者にその
ことをレポートすれば,解決できるかも知れません.

アーキテクチャにもっとも依存するのはGC部です.RubyのGCは対象
のアーキテクチャが<tt>setjmp()</tt>または<tt>getcontext()</tt>によって全てのレ
ジスタを +jmp_buf+ や +ucontext_t+ に格納することと, +jmp_buf+ や
+ucontext_t+ とスタックが32bitアラインメントされていることを仮定
しています.特に前者が成立しない場合の対応は非常に困難でしょう.
後者の解決は比較的簡単で, +gc.c+ でスタックをマークしている
部分にアラインメントのバイト数だけずらしてマークするコードを
追加するだけで済みます.<tt>defined(\_\_mc68000\_\_)</tt>で括られてい
る部分を参考にしてください.

レジスタウィンドウを持つCPUでは,レジスタウィンドウをスタッ
クにフラッシュするアセンブラコードを追加する必要があるかも知
れません.


== 配布条件

+COPYING.ja+ ファイルを参照してください。


== 著者

コメント,バグレポートその他は mailto:matz@ruby-lang.jp まで.
-------------------------------------------------------
created at: Thu Aug  3 11:57:36 JST 1995
--
Local variables:
mode: rdoc
end:
doc/alt-ruby20/ChangeLog000064400003676032150403127760011012 0ustar00Wed Dec 16 21:16:55 2015  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/fiddle/handle.c: check tainted string arguments.
	  Patch provided by tenderlove and nobu.

	* test/fiddle/test_handle.rb (class TestHandle): add test for above.

Wed Dec 16 21:16:55 2015  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* ext/dl/handle.c (rb_dlhandle_initialize): prohibits DL::dlopen
	  with a tainted name of library.
	  Patch by sheepman <sheepman AT sheepman.sakura.ne.jp>.

	* ext/dl/handle.c (rb_dlhandle_sym): ditto

Tue Aug 18 22:00:12 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* lib/rubygems.rb: bump version to 2.0.14.1. this version fixed
	  CVE-2015-3900.

	* lib/rubygems/remote_fetcher.rb: ditto.

	* test/rubygems/test_gem_remote_fetcher.rb: added testcase for CVE-2015-3900

Tue Jun  2 00:10:14 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/resolv.rb (Requester#request): typo, regression introduced at
	  r49422 (patchlevel 618).  reported and patched by Stefan Kolb
	  [ruby-core:69429] [Backport #11204]

Mon Apr 13 22:11:42 2015  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl.rb: stricter hostname verification
	  following RFC 6125. with the patch provided by Tony Arcieri and
	  Hiroshi Nakamura [ruby-core:61545] [Bug #9644]
	* test/openssl/test_ssl.rb: add tests for above.

Tue Mar 24 16:38:14 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* spec/default.mspec: use default configuration file name.
	  https://github.com/ruby/rubyspec/commit/cc69f337b06362e5607ffa3e3ad40ef7494960cf

Tue Mar 24 16:38:14 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* spec/default.mspec: remove specific version number.
	  https://github.com/ruby/rubyspec/commit/7a909e925c1baa9c700bd44af9241aef6e596714

Tue Mar 24 16:38:14 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* common.mk: use ruby organization for rubyspec.

Wed Feb 25 17:30:10 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* class.c (clone_method): fixed missing assignment introduced by
	  previous commit.

	* vm_insnhelper.c (rb_vm_rewrite_cref_stack): ditto.

Wed Feb 25 15:07:01 2015  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_insnhelper.c (rb_vm_rewrite_cref_stack): copy nd_refinements
	  of original crefs. It fixes segmentation fault when calling
	  refined method in duplicate module. [ruby-dev:48878] [Bug #10885]

	* vm_core.h, class.c: change accordingly.

	* test/ruby/test_refinement.rb: add a test for above.

Wed Feb 25 14:53:27 2015  Shugo Maeda  <shugo@ruby-lang.org>

	* class.c (method_entry_i, class_instance_method_list,
	  rb_obj_singleton_methods): should not include methods of
	  superclasses if recur is false. [ruby-dev:48854] [Bug #10826]

Wed Feb 25 14:53:27 2015  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (remove_method): When remove refined
	  method, raise a NameError if the method is not
	  defined in refined class.
	
	  But if the method is defined in refined class,
	  it should keep refined method and remove original
	  method.
	  
	  Patch by Seiei Higa. [ruby-core:67722] [Bug #10765]

Wed Feb 25 14:41:01 2015  Seiei Higa  <hanachin@gmail.com>

	* vm_method.c (check_definition): Module#public_method_defined?,
	  Module#private_method_defined?, Module#protected_method_defined?
	  should not use refinements. [ruby-core:67656] [Bug #10753]

Wed Feb 25 14:29:19 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/sdbm/_sdbm.c: include ruby/ruby.h for PRIdPTRDIFF when a
	  macro `DEBUG` is defined.  based on the patch by Owen Rodley in
	  [ruby-core:67987]. [Bug #10825]

Wed Feb 25 14:22:57 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
	  interference by modifying global variables in have_devel? method.
	  [ruby-core:67962] [Bug #10821]

Wed Feb 25 14:19:35 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* thread.c: Improve documentation for Thread#value
	  [Bug #10694][ruby-core:67324][ci skip]

Wed Feb 25 14:18:26 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* string.c: [DOC] Add missing documentation around String#chomp.
	  Patchby @stderr [ci skip][fix GH-780]

Sat Feb 21 09:48:48 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic.build):
	  use hostname= to detect and wrap IPv6 hosts.
	  Build is accepting URI components and users may not expect
	  that a host component needs to be wrapped with square brackets
	  since it's not providing a URI.
	  Note: initialize with arg_check => true does not wrap IPv6 hosts.
	  by Joe Rafaniello <jrafanie@redhat.com>
	  https://github.com/ruby/ruby/pull/765 fix GH-765

	* test/uri/test_generic.rb: Add more tests

Wed Feb 18 16:02:30 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements
	  returned by Kernel#instance_variables are Symbols now.
	  [ruby-core:68128] [Bug #10857]

Tue Feb 17 17:37:14 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/getaddrinfo.c (get_addr): reject too long hostname to
	  get rid of GHOST vulnerability on very old platforms.

	* ext/socket/raddrinfo.c (make_hostent_intdoc/alt-ruby20/ChangeLog000064400003676032150403127760011012 0ustar00y(): fix error.
	  * Class: fix variable name style and indentation in example.
	  * improve consistency, fix typos and formatting.

Fri Jan 30 16:49:15 2015  Benoit Daloze  <eregontp@gmail.com>

	* object.c (Module#const_defined?): [DOC] Revise the documentation.
	  Patch by Xavier Noria.
	  [Fixes GH-754] https://github.com/ruby/ruby/pull/754

Fri Jan 30 16:49:15 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* object.c: fix document of Kernel.Stirng by @suzukaze
	  [fix GH-743][ci skip]

Fri Jan 30 16:26:57 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (str_associate, str_associated): keep associated objects
	  in an instance variables, instead of in the internal structure.

Fri Jan 30 16:11:47 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
	  CR.  should check if substitution occurred too.
	  [ruby-dev:48813] [Bug #10732]

Fri Jan 30 16:00:35 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (install_dirs): revert DESTDIR prefix by r39841, since
	  it is fixed by r41648.  [ruby-core:55760] [Bug #8115]

Fri Jan 30 15:47:49 2015  Eric Wong  <e@80x24.org>

	* numeric.c (bit_coerce): use original value for error message
	  [ruby-core:67405] [Bug #10711]
	* test/ruby/test_numeric.rb (test_coerce): check error message

Tue Jan 27 17:05:43 2015  Seiei Higa  <hanachin@gmail.com>

	* vm_method.c (rb_alias): raise a NameError when creating alias to
	  a refined method if the original method of the refined method is
	  not defined.  [ruby-core:67523] [Bug #10731]

Tue Jan 27 16:41:33 2015  Seiei Higa  <hanachin@gmail.com>

	* vm_method.c (rb_export_method): bail out if the original method
	  is undefined when the method is refined.
	  [ruby-core:67387] [Bug #10706]

Tue Jan 27 16:27:44 2015  Eric Wong  <e@80x24.org>

	* lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
	  [ruby-core:67411] [Bug #10712]

Thu Jan 22 18:15:41 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* ext/zlib/zlib.c: fix document of method signatures.
	  [Bug #10668][ruby-core:67186][ci skip]

Thu Jan 22 18:10:35 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/ruby/test_io.rb: added timeout for AIX environment.
	  [ruby-core:62983][Bug #9917]

Thu Jan 22 17:30:33 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* lib/net/http.rb (Net::HTTP#send_request): there is no response body
	  with HEAD request. Patch by @rodrigosaito [fix GH-520]

Thu Jan 22 17:30:33 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/net/http/test_http.rb (_test_send_request__HEAD): Added
	  failing test for send_request with HEAD method.

Wed Jan 14 16:53:14 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* ext/tk/lib/tkextlib/tcllib/plotchart.rb: fix to invoke correct function
	  of tcllib. Patch by @zalt50 [fix GH-787]

Wed Jan 14 16:48:15 2015  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Str
	  objects.  Label#Str#== is case-insensitive.

Wed Jan 14 16:48:15 2015  Ben Miller  <bmiller@rackspace.com>

	* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
	  comparison should be case-insensitive as well.
	  [ruby-core:66498] [Bug #10550]

Wed Jan 14 16:48:15 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::DNS::Name): names with different dots
	  should be different.

Wed Jan 14 16:30:51 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/response.rb (Net::HTTPResponse): require one or more
	  spaces [Bug #10591].
	  by leriksen <leif.eriksen.au@gmail.com>
	  https://github.com/ruby/ruby/pull/782 fix GH-782
	  NOTE: graph.facebook.com returns without SP Reason-Phrase.

Wed Jan 14 16:23:49 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_cipher.c (ossl_cipher_update_long): update huge
	  data gradually not to exceed INT_MAX.  workaround of OpenSSL API
	  limitation.  [ruby-core:67043] [Bug #10633]

Wed Jan 14 16:14:50 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rb_cv_binary_elf): get rid of -e option of cat
	  which is not available on BusyBox, use tr instead.
	  [ruby-core:64824] [Bug #10210]

Wed Jan 14 16:07:11 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* signal.c (ruby_signal): since SIGKILL is not supported by MSVCRT,
	  should be treated before calling signal(3).
	  [Bug #10615]

Wed Jan 14 15:57:26 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (exec_recursive): use the same last method name as
	  recursive_push in the error message when recursive_pop failed.
	  [ruby-core:66742] [Bug #10579]

Wed Jan 14 15:57:26 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_frame_last_func): return the most recent frame method
	  name.

	* thread.c (recursive_list_access): use the last method name,
	  instead of the current method name which can be unset in some
	  cases, not to use a symbol by the invalid ID.
	  [ruby-core:66742] [Bug #10579]

Wed Jan 14 15:54:18 2015  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/resolv.rb: fall back if canonicalization fails.
	  Thanks Vit Ondruch for the patch!  [ruby-core:65836]

	* test/resolv/test_dns.rb: test for patch

Fri Nov 28 16:43:20 2014  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Do not attempt SSL session resumption when the
	  session is expired.  [Bug #10533]

Fri Nov 28 16:36:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (symbol_list): fix the node type of literal symbol list
	  with no interpolation.  [ruby-core:66343]

Fri Nov 28 16:28:07 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/etc/etc.c (etc_getlogin): set login name encoding properly.
	  [ruby-core:66163] [Bug #10493]

Fri Nov 28 16:18:44 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (method_proc): the receiver of binding from method should
	  be same as the receiver of the method.
	  [ruby-core:65917] [Bug #10432]

Fri Nov 28 16:12:22 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead
	  of parser to handle IPv6 address. [Bug #9129]

Fri Nov 28 16:05:09 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (copy_stream_body): should write in binary mode.  based on a
	  patch by godfat (Lin Jen-Shin) at [ruby-core:56556].
	  [ruby-core:56518] [Bug #8767]

Fri Nov 28 16:05:09 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (copy_stream_body): move common open flags.

Fri Nov 28 16:01:44 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rubygems/ssl_certs/AddTrustExternalCARoot{-2048,}.pem: add newer
	  root CA for rubygems.org.  a part of r48389 of trunk.
	  see also https://github.com/rubygems/rubygems/commit/98f5f44c7141881c756003e4256b1a96b200b98e .
	  [Backport #10516] [ruby-core:66303]

Wed Nov 19 10:19:36 2014  Eric Wong  <e@80x24.org>

	* vm_eval.c (rb_yield_splat): add missing GC guard
	  [Bug #10509]

Thu Nov 13 22:31:50 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rexml/document.rb: add REXML::Document#document.
	  reported by Tomas Hoger <thoger@redhat.com> and patched by nahi.

Thu Nov  6 17:31:51 2014  Naohisa Goto  <ngotogenome@gmail.com>

	* compile.c (compile_data_alloc): add padding when strict alignment
	  is required for memory access. Currently, the padding is enabled
	  only when the CPU is 32-bit SPARC and the compiler is GCC.
	  [Bug #9681] [ruby-core:61715]

	* compile.c (STRICT_ALIGNMENT): defined if strict alignment is required

	* compile.c (ALIGNMENT_SIZE, ALIGNMENT_SIZE_MASK, PADDING_SIZE_MAX):
	  new macros for alignemnt word size, bit mask, max size of padding.

	* compile.c (calc_padding): new function to calculate padding size

Wed Nov  5 18:26:49 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* vm_insnhelper.c (unknown_keyword_error): delete expected keywords
	  directly from raw table, so that the given block is not called.
	  derived from r48102 of trunk.
	  [ruby-core:65837] [Bug #10413]

Mon Oct 27 20:21:05 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rexml/entity.rb: keep the entity size within the limitation.
	  reported by Willis Vandevanter <will@silentrobots.com> and
	  patched by nahi.

Mon Oct 27 13:26:46 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_method_entry_make): warn redefinition only for
	  already defined methods, but not for undefined methods.
	  [ruby-dev:48691] [Bug #10421]

Thu Oct 23 18:56:55 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl.rb (DEFAULT_PARAMS): override
	  options even if OpenSSL::SSL::OP_NO_SSLv3 is not defined.
	  this is pointed out by Stephen Touset. [ruby-core:65711] [Bug #9424]

Thu Oct 23 18:56:55 2014  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* test/openssl/test_ssl.rb: Reuse TLS default options from
	  OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.

Thu Oct 23 18:56:55 2014  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* lib/openssl/ssl.rb: Explicitly whitelist the default
	  SSL/TLS ciphers. Forbid SSLv2 and SSLv3, disable
	  compression by default.
	  Reported by Jeff Hodges.
	  [ruby-core:59829] [Bug #9424]

Mon Oct 20 14:41:45 2014  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_core.h, vm.c, proc.c: fix GC mark miss on bindings.
	  [ruby-dev:48616] [Bug #10368]

	* test/ruby/test_eval.rb: add a test code.

Fri Oct 17 13:22:17 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_here_document): do not append already appended
	  and disposed code fragment.  [ruby-dev:48647] [Bug #10392]

Fri Oct 17 13:19:44 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
	  should be writable any encoding strings, without conversion.
	  [ruby-core:65240] [Bug #10285]

Fri Oct 17 13:10:08 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): fix super from eval with
	  scope.  set klass in the current control frame to the class of
	  the receiver in the context to be evaluated, this class/module
	  must match the actual receiver to call super.
	  [ruby-core:65122] [Bug #10263]

Thu Oct 16 16:33:51 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* regcomp.c, regexec.c: Optimization should be disabled not only for
	  /(?<=x).*/ but also for /(?!x).*/.
	  (merge r47598 partially. [Bug #9728])

Thu Oct 16 16:23:03 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* lib/fileutils.rb: handle ENOENT error with symlink targeted to
	  non-exists file. [ruby-dev:45933] [Bug #6716]

Wed Oct 15 16:23:22 2014  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_time_tz.rb: Fix test error with tzdata-2014g.
	  [ruby-core:65058] [Bug #10245] Reported by Vit Ondruch.

Wed Oct 15 16:23:22 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/minitest/test_minitest_unit.rb: removed obsoleted condition
	  for Ruby 1.8.
	* test/ruby/test_time_tz.rb: ditto.

Wed Oct 15 16:19:39 2014  Eric Wong  <e@80x24.org>

	* array.c (ary_recycle_hash): add RB_GC_GUARD
	  (rb_ary_diff): remove volatile
	  [Bug #10369]

Wed Oct 15 16:13:28 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_s_aref): fix rdoc.  `Dir.glob` allows an array but
	  `Dir[]` not.  the former accepts an optional parameter `flags`,
	  while the latter accepts arbitrary number of arguments but no
	  `flags`.  [ruby-core:65265] [Bug #10294]

Wed Oct 15 16:12:11 2014  Rei Odaira  <Rei.Odaira@gmail.com>

	* configure.in: Fix typo. [Bug #9914]

Wed Oct 15 16:05:47 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* error.c: update exception tree. [DOC]
	  reported by @hemge via twitter.

Wed Oct 15 15:57:48 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (VCSUP): nothing to do if this worktree is not
	  under any VCS (it means that the worktree may be from the release
	  package).

Wed Oct 15 15:35:39 2014  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
	  the result encoding.

Wed Sep 17 15:09:16 2014  Natalie Weizenbaum  <nweiz@google.com>

	* ext/pathname/lib/pathname.rb (SAME_PATHS):
	  Pathname#relative_path_from uses String#casecmp to compare strings
	  on case-insensitive filesystem platforms (e.g., Windows). This can
	  return nil for strings with different encodings, and the code
	  previously assumed that it always returned a Fixnum.  [Fix GH-713]

Wed Sep 17 15:07:35 2014  Sho Hashimoto  <sho.hsmt@gmail.com>

	* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof): fix typo,
	  SIZEOF_LONG_LON.  [Fix GH-714]

Wed Sep 17 14:58:50 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#pkg_config): append --cflags to also
	  $CXXFLAGS, as they are often used by C++ compiler.
	  [ruby-core:54532] [Bug #8315]

Wed Sep 17 14:58:50 2014  Shota Fukumori  <her@sorah.jp>

	* lib/mkmf.rb (configuration): Make CXXFLAGS customizable.
	  Patch by Kohei Suzuki (eagletmt). [Fixes GH-492]

Wed Sep 17 14:52:38 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/csv.rb (CSV#<<): honor explicitly given encoding.  based on
	  the patch by DAISUKE TANIWAKI <daisuketaniwaki AT gmail.com> at
	  [ruby-core:62113].  [Bug #9766]

Fri Sep 12 11:34:39 2014  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_object.rb: extend timeout.

Fri Sep 12 11:34:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_copy_ivar): allocate no memory for empty
	  instance variables.  [ruby-core:64700] [Bug #10191]

Fri Sep 12 11:34:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_copy_ivar): extract function to copy instance
	  variables only for T_OBJECT from init_copy.

Fri Sep 12 11:30:50 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* regcomp.c: Merge Onigmo 988517a4f16f14acbd7cc9d5b51a096d5153992c.
	  [Bug #9344].

Fri Sep 12 11:22:55 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (Doxyfile): revert r43888, not to require preinstalled
	  ruby.  [ruby-core:64488] [Bug #10161]

Fri Sep 12 11:15:04 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_reopen): create a new, temporary FD via rb_sysopen and
	  call rb_cloexec_dup2 on it to atomically replace the file fptr->fd
	  points to.  This leaves no possible window where fptr->fd is invalid
	  to userspace (even for any threads running w/o GVL).  based on the
	  patch by Eric Wong <normalperson@yhbt.net> at [ruby-core:57943].
	  [Bug #9036]

Wed Sep 10 12:34:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_close): ignore only "closed stream" IOError and
	  NoMethodError, do not swallow other exceptions at the end of
	  block.  [ruby-core:64463] [Bug #10153]

Wed Sep 10 12:27:08 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/trans/euckr-tbl.rb (EUCKR_TO_UCS_TBL): add missing euro and
	  registered signs.  [ruby-core:64452] [Bug #10149]

Wed Sep 10 12:25:24 2014  Eric Wong  <e@80x24.org>

	* time.c (time_timespec): fix tv_nsec overflow
	  [Bug #10144]

Wed Sep 10 12:21:51 2014  Eric Wong  <e@80x24.org>

	* ext/zlib/zlib.c (gzfile_reset): preserve ZSTREAM_FLAG_GZFILE
	  [Bug #10101]

	* test/zlib/test_zlib.rb (test_rewind): test each_byte

Wed Sep 10 12:06:27 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_initialize): [DOC] fix rdoc of append mode.  it does
	  not move the pointer at open.  [ruby-core:63747] [Bug #10039]

Wed Sep 10 11:50:26 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (GETASTER): should not use the numbered argument to be
	  formatted, raise ArgumentError instead.
	  [ruby-dev:48330] [Bug #9982]

Wed Sep 10 11:43:55 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/openssl/test_pkey_rsa.rb (OpenSSL#test_sign_verify_memory_leak):
	  added timeout into testcase for low performance environment.
	  [Bug #9984][ruby-core:63367]

Wed Sep 10 11:39:54 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (env_aset, env_has_key, env_assoc, env_has_value),
	  (env_rassoc, env_key): prohibit tainted strings if $SAFE is
	  non-zero.  [Bug #9976]

Sat Sep  6 09:10:45 2014  Zachary Scott  <e@zzak.io>

	* lib/rdoc/generator/template/darkfish/js/jquery.js: Backport
	  rdoc/rdoc@74f60fcb04fee1778fe2694d1a0ea6513f8e67b7

Fri Sep  5 14:08:00 2014  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_create_dcom): use the converted
	  result if the argument can be converted to a string, to get rid
	  of invalid access. Thanks to nobu. [ruby-dev:48467] [Bug #10127]

Fri Sep  5 14:00:33 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (open): use UTF-8 version function to support
	  non-ascii path properly.  [ruby-core:63185] [Bug #9946]

Fri Sep  5 13:53:41 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): fix invalid char in eval, should raise
	  an syntax error too, as well as directly coded.
	  [ruby-core:64243] [Bug #10117]

Fri Sep  5 13:51:10 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yyerror): preserve source code encoding in
	  syntax error messages.  [ruby-core:64228] [Bug #10114]

Fri Sep  5 13:44:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_count): fix wrong single-byte optimization.
	  7bit ascii can be a trailing byte in Shift_JIS.
	  [ruby-dev:48442] [Bug #10078]

Fri Sep  5 13:36:12 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	merge r46831 partially.  these changes are from:
	https://github.com/k-takata/Onigmo/commit/7abd7b29481f98eb92be786e3d33611fc7d000a0
	[Bug #8716]

	* include/ruby/oniguruma.h (ONIG_MAX_CAPTURE_GROUP_NUM,
	  ONIGERR_TOO_MANY_CAPTURE_GROUPS): add cheking the number of capture
	  groups.

	* regerror.c (onig_error_code_to_format): ditto.

	* regparse.c (scan_env_add_mem_entry): ditto.

	* regexec.c (onig_region_copy, match_at): fix: segmation fault occurs
	  when many groups are used.

Fri Sep  5 13:06:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_resize): update capa only when buffer get
	  reallocated.
	  http://d.hatena.ne.jp/nagachika/20140613/ruby_trunk_changes_46413_46420#r46413

Fri Sep  5 13:06:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_resize): should consider the capacity instead
	  of the old length, as pointed out by nagachika.

Fri Sep  5 13:06:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (expand_path): shrink expanded path which no longer needs
	  rooms to append.  [ruby-core:63114] [Bug #9934]

Wed Sep  3 13:42:24 2014  Mark Lorenz  <mlorenz@covermymeds.com>

	* lib/erb.rb (result): [DOC] no longer accepts a Proc, as
	  Kernel.eval does not.  [fix GH-619]

Wed Sep  3 13:23:29 2014  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_io_autoclose_p): Don't raise on frozen IO.

	* test/lib/minitest/unit.rb: IO#autoclose? may raise IOError.

Wed Sep  3 13:23:29 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_fileno, rb_io_inspect): non-modification does not
	  error on frozen IO.  [ruby-dev:48241] [Bug #9865]

Wed Sep  3 13:17:38 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (posix_fadvise): disable use of posix_fadvise
	  itself on 32-bit AIX.  [ruby-core:62968] [Bug #9914]

Wed Sep  3 13:17:38 2014    <kanemoto@ruby-lang.org>

	* io.c (rb_io_advise): AIX currently does not support a 32-bit call to
	  posix_fadvise() if _LARGE_FILES is defined. Patch by Rei Odaira.
	  [ruby-core:62968] [Bug #9914]

Wed Sep  3 12:48:14 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_write): use rb_str_append to
	  reuse coderange bits other than ASCII-8BIT, and keep
	  taintedness.  [ruby-dev:48118] [Bug #9769]

Wed Sep  3 12:41:35 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (env_shift): fix memory leak on Windows, free environment
	  strings block always.  [ruby-dev:48332] [Bug #9983]

Wed Sep  3 12:41:35 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (env_select): fix memory leak and crash on Windows, make
	  keys array first instead of iterating on environ directly.
	  [ruby-dev:48325] [Bug #9978]

Wed Sep  3 12:41:35 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (ruby_setenv): fix memory leak on Windows, free
	  environment strings block after check for the size.
	  [ruby-dev:48323] [Bug #9977]

Wed Sep  3 12:24:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (match_aref, rb_reg_regsub): consider encoding of captured
	  names, encoding-incompatible should not match.
	  [ruby-dev:48278] [Bug #9903]

Wed Sep  3 12:24:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable
	  characters.

Wed Sep  3 12:24:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable
	  characters.

Sun Aug 31 16:59:45 2014  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (rb_catch_protect): fix same problem of [Bug #9961].

	* vm_eval.c (rb_iterate): ditto.

Sun Aug 31 16:59:45 2014  Koichi Sasada  <ko1@atdot.net>

	* vm.c (rb_vm_rewind_cfp): add new function to rewind specified cfp
	  with invoking RUBY_EVENT_C_RETURN.
	  [Bug #9961]

	* vm_core.h: ditto.

	* eval.c (rb_protect): use it.

	* eval.c (rb_rescue2): ditto.

	* vm_eval.c (rb_iterate): ditto.

	* test/ruby/test_settracefunc.rb: add a test.

	* vm_core.h (rb_name_err_mesg_new): 

Sun Aug 31 16:50:06 2014  Koichi Sasada  <ko1@atdot.net>

	* compile.c (rb_iseq_compile_node): put start label of block after
	  trace (b_call).
	  [Bug #9964]

	* test/ruby/test_settracefunc.rb: add a test.

	  added assert_consistent_call_return() method check call/return
	  consistency.

Sun Aug 31 16:38:26 2014  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: add VM_FRAME_MAGIC_RESCUE to recognize normal block or
	  rescue clause.

	* vm.c (vm_exec): use VM_FRAME_MAGIC_RESCUE on at rescue/ensure.

	* test/ruby/test_settracefunc.rb: should not invoke b_return at rescue
	  clause.
	  [Bug #9957]

	* vm_dump.c (control_frame_dump): check VM_FRAME_MAGIC_RESCUE.

	* vm_dump.c (vm_stack_dump_each): ditto.

Sun Aug 31 16:32:10 2014  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* lib/test/unit/parallel.rb: fix test-all parallel failure if a test
	  is skipped after raise.
	  DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
	  But it causes Marshal.load failure due to undefined class/module
	  DL::DLError when doing test-all parallel and test-all doesn't
	  complete. We create new MiniTest::Skip object to avoid Marshal.load
	  failure.
	  [ruby-core:62133] [Bug #9767]

	* test/testunit/test_parallel.rb (TestParallel): add a test.

	* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.

Sun Aug 31 16:24:54 2014  Tanaka Akira  <akr@fsij.org>

	* ext/pathname/lib/pathname.rb (cleanpath_aggressive): make all
	  separators File::SEPARATOR from File::ALT_SEPARATOR.
	  Reported by Daniel Rikowski.
	  Fixed by Nobuyoshi Nakada.  [Bug #9618]

	* ext/pathname/lib/pathname.rb (cleanpath_conservative): ditto.

Sun Aug 31 16:23:41 2014  Naohisa Goto  <ngotogenome@gmail.com>

	* lib/fileutils.rb (rmdir): rescue Errno::EEXIST in addition to
	  ENOTEMPTY (and ENOENT), because SUSv3 describes that "If the
	  directory is not an empty directory, rmdir() shall fail and set
	  errno to [EEXIST] or [ENOTEMPTY]" and Solaris uses EEXIST.
	  [Bug #9571] [ruby-dev:48017]

Sun Aug 31 16:20:14 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (bind_random_port): Rescue EPERM for FreeBSD which
	  security.mac.portacl.port_high is changed.
	  See mac_portacl(4) for details.
	  Reported by Jakub Szafranski.  [ruby-core:60917] [Bug #9544]

Sun Aug 31 16:16:24 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (match_aref): should not ignore name after NUL byte.
	  [ruby-dev:48275] [Bug #9902]

Sun Aug 31 16:10:30 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/digest/digest.c (rb_digest_instance_equal): no need to call
	  `to_s` twice.  [Bug #9913]

Sun Aug 31 16:10:30 2014  Benoit Daloze  <eregontp@gmail.com>

	* ext/digest/digest.c (rb_digest_instance_equal):
	  fix #== for non-string arguments. [ruby-core:62967] [Bug #9913]

	* test/digest/test_digest.rb: add test for above.

Sun Aug 31 15:46:23 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (yield_indexed_values): extract from permute0(),
	  rpermute0(), and rcombinate0().

Sun Aug 31 15:23:25 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_permutation): `p` is the array of size `r`, as
	  commented at permute0().  since `n >= r` here, buffer overflow
	  never happened, just reduce unnecessary allocation though.

Mon Jul  7 13:05:04 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/test_timeout.rb (test_timeout): inverted test condition.
	  [Bug #8523]

Mon Jul  7 12:57:26 2014  Masaya Tarui  <tarui@ruby-lang.org>

	* st.c (st_foreach_check): change start point of search at check
	  from top to current. [ruby-dev:48047] [Bug #9646]

Mon Jul  7 12:53:45 2014  Zachary Scott  <e@zzak.io>

	* lib/gserver.rb: [DOC] Fixed typo in example by @stomar [Bug #9543]

Mon Jul  7 12:52:44 2014  Zachary Scott  <e@zzak.io>

	* enumerator.c: [DOC] Fix example to show Enumerator#peek behavior
	  Patch by Erik Hollembeak [Bug #9814]

Mon Jul  7 12:51:09 2014  Zachary Scott  <e@zzak.io>

	* enum.c: [DOC] Use #find in example to clarify alias by @rachellogie
	  Patch submitted via documenting-ruby/ruby#34

Mon Jul  7 12:49:10 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* man/ruby.1: remove deadlink. [ruby-core:62145][Bug #9773]

Mon Jul  7 12:46:28 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (not_a_member): extract name error and use same error
	  messages.  based on the patch by Marcus Stollsteimer <sto.mar AT
	  web.de> at [ruby-core:61721].  [Bug #9684]

Mon Jul  7 12:39:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (read_all): truncate the buffer before appending read data,
	  instead of truncating before reading.
	  [ruby-core:55951] [Bug #8625]

Mon Jul  7 12:39:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_setstrbuf, io_read): should not shorten the given buffer until
	  read succeeds.  [ruby-core:55951] [Bug #8625]

Mon Jul  7 12:16:54 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (gets, readline): read lines without LF properly.
	  [ruby-core:63205] [Bug #9949]

	* test/net/ftp/test_buffered_socket.rb: related test.

Mon Jul  7 12:13:09 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body
	  type as "MIXED" followed immediately by params
	  [ruby-core:62864] [Bug #9885]
	  Patch by @rayners (David Raynes). [Fixes GH-622] 
	  https://github.com/ruby/ruby/pull/622

Mon Jul  7 12:05:28 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (body_type_msg): should accept
	  message/delivery-status with extra data.
	  [ruby-core:53741] [Bug #8167]

	* test/net/imap/test_imap_response_parser.rb: related test.

Mon Jul  7 11:47:51 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (local_tbl_gen): remove local variables duplicated with
	  arguments.

Thu Jul  3 15:17:22 2014  Koichi Sasada  <ko1@atdot.net>

	  [ruby-core:60501] [Bug #9486]
	* vm.c (rb_vm_pop_cfunc_frame): added.  It cares c_return event.
	  The patch base by drkaes (Stefan Kaes).
	  [Bug #9321]

	* variable.c (rb_mod_const_missing): use rb_vm_pop_cfunc_frame()
	  instead of rb_frame_pop().

	* vm_eval.c (raise_method_missing): ditto.

	* vm_eval.c (rb_iterate): ditto.

	* internal.h (rb_vm_pop_cfunc_frame): add decl.

	* test/ruby/test_settracefunc.rb: add tests.
	  provided by drkaes (Stefan Kaes).

	* vm.c, eval.c, include/ruby/intern.h (rb_frame_pop):
	  move definition of rb_frame_pop() and deprecate it.
	  It doesn't care about `return' events.

Fri Jun 27 17:57:16 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_substr): need to reset code range for shared
	  string too, not only copied string.
	  [ruby-core:62842] [Bug #9882]

Fri Jun 27 17:54:09 2014  Rei Odaira  <Rei.Odaira@gmail.com>

	* signal.c (ruby_signal): should return either `old.sa_sigaction`
	  or `old.sa_handler`, depending on whether `SA_SIGINFO` is set in
	  `old.sa_flags`, because they may not be a union.
	  [ruby-core:62836] [Bug #9878]

Fri Jun 27 17:37:12 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vsnprintf.c (BSD_vfprintf): fix string width when precision is
	  given.  as the result of `memchr` is NULL or its offset from the
	  start cannot exceed the size, the comparison was always false.
	  [ruby-core:62737] [Bug #9861]

Fri Jun 27 17:27:26 2014  Eric Wong  <e@80x24.org>

	* process.c (proc_getgroups, proc_setgroups): use ALLOCV_N
	  [Bug #9856]

Fri Jun 27 17:19:22 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_setstrbuf): always check if the buffer is modifiable.
	  [ruby-core:62643] [Bug #9847]

Fri Jun 27 17:15:36 2014  Tanaka Akira  <akr@fsij.org>

	* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#accept):
	  Consider Socket#accept as well as TCPServer#accept.
	  Reported by Sam Stelfox.  [ruby-core:62064] [Bug #9750]

Fri Jun 27 17:12:45 2014  Eric Wong  <e@80x24.org>

	* complex.c (parse_comp): replace ALLOCA_N with ALLOCV_N/ALLOCV_END
	  [Bug #9608]
	* rational.c (read_digits): ditto

Fri Jun 27 17:05:23 2014  Tanaka Akira  <akr@fsij.org>

	* lib/net/ftp.rb (transfercmd): Close TCP server socket even if an
	  exception occur.

Fri Jun 27 17:02:36 2014  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* thread_win32.c (rb_w32_stack_overflow_handler): use Structured
	  Exception Handling by AddVectoredExceptionHandler() for machine
	  stack overflow on mingw.
	  This would be equivalent to the handling using __try and __except
	  on mswin introduced by r43748.

Fri Jun 27 17:02:36 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of
	  test/ruby/test_exception.rb on Windows.
	  wrap by __try and __exception statements on mswin to raise SIGSEGV
	  when EXCEPTION_STACK_OVERFLOW is occurred, because MSVCRT doesn't
	  handle the exception.
	  however, (1) mingw-gcc doesn't support __try and __exception
	  statements, and (2) we cannot retry SystemStackError after this
	  change yet (maybe crashed) because SEH and longjmp() are too
	  uncongenial.

	* signal.c (check_stack_overflow, CHECK_STACK_OVERFLOW): now defined on
	  Windows, too.

	* thread_win32.c (ruby_stack_overflowed_p): ditto.

Fri Jun 27 16:56:38 2014  Eric Wong  <e@80x24.org>

	* signal.c (signal_exec): ignore immediate cmd for SIG_IGN
	* signal.c (trap_handler): set cmd to true for SIG_IGN
	* signal.c (trap): handle nil and true values for oldcmd
	  [Bug #9835]

Mon Jun 23 18:51:43 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_init_copy): always clear instance variable,
	  constant and method tables first, regardless the source tables.
	  [ruby-dev:48182] [Bug #9813]

Mon Jun 23 18:50:13 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (thread_start_func_2): stop if forked in a sub-thread,
	  the thread has become the main thread.
	  [ruby-core:62070] [Bug #9751]

Mon Jun 23 18:35:34 2014  Josh Goebel  <dreamer3@gmail.com>

	* net/protocol.rb (using_each_crlf_line): fix SMTP dot-stuffing
	  for messages not ending with a new-line.
	  [ruby-core:61441] [Bug #9627] [fix GH-616]

Mon Jun 23 18:16:07 2014  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* configure.in: enable SSE2 on mingw. target='i386-pc-mingw32'.
	  [ruby-core:62095] [Bug #8358]

Mon Jun 23 18:16:07 2014  Tanaka Akira  <akr@fsij.org>

	* configure.in: Fix compilation error.
	  https://bugs.ruby-lang.org/issues/8358#note-16

Mon Jun 23 18:16:07 2014  Vit Ondruch  <vondruch@redhat.com>

	* configure.in: add qouting brackets and append wildcard for the
	  rest after target_cpu, to properly detect platform for SSE2
	  instructions.  [ruby-core:60576] [Bug #8358]

Mon Jun 23 18:16:07 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: use SSE2 instructions to drop unexpected precisions on
	  other than mingw.  [ruby-core:59472] [Bug #8358]

Mon Jun 23 18:16:07 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: use SSE2 instructions for drop unexpected
	  precisions.  [ruby-core:54738] [Bug #8358]

Mon Jun 23 17:29:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (obj2uid, obj2gid): now getpwnam_r() and getgrnam_r()
	  may need larger buffers than sysconf values, so retry with
	  expanding the buffer when ERANGE is returned.
	  [ruby-core:61325] [Bug #9600]

Mon Jun 23 17:20:10 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (sock_s_getnameinfo): Save errno for EAI_SYSTEM.
	  Reported by Saravana kumar.  [ruby-core:61820] [Bug #9697]
	  Fixed by Heesob Park.  [ruby-core:61868]

Mon Jun 23 17:20:10 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ipsocket.c (ip_s_getaddress): Don't access freed memory.

Mon Jun 23 17:20:10 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket: always operate length of socket addess companion with
	  socket address. 

	* ext/socket/rubysocket.h (rsock_make_ipaddr): add an argument for
	  socket address length.
	  (rsock_ipaddr): ditto.

	* ext/socket/ipsocket.c (ip_addr): pass length to rsock_ipaddr.
	  (ip_peeraddr): ditto.
	  (ip_s_getaddress): pass length to rsock_make_ipaddr.

	* ext/socket/socket.c (make_addrinfo): pass length to rsock_ipaddr.
	  (sock_s_getnameinfo): pass actual address length to rb_getnameinfo.
	  (sock_s_unpack_sockaddr_in): pass length to rsock_make_ipaddr.
	  
	* ext/socket/init.c (rsock_s_recvfrom): pass length to rsock_ipaddr.
	  (rsock_s_recvfrom_nonblock): ditto.

	* ext/socket/tcpsocket.c (tcp_sockaddr): pass length to
	  rsock_make_ipaddr.

	* ext/socket/raddrinfo.c (make_ipaddr0): add an argument for socket
	  address length.  pass the length to rb_getnameinfo.
	  (rsock_ipaddr): ditto.
	  (rsock_make_ipaddr): add an argument for socket address length. 
	  pass the length to make_ipaddr0.
	  (make_inetaddr): pass length to make_ipaddr0.
	  a local variable renamed.
	  (host_str): a local variable renamed.
	  (port_str): ditto.

Mon Jun 23 16:55:13 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): flush cmdarg flags inside left-paren in a
	  command argument, to allow parenthesed do-block as an argument
	  without arguments parentheses.  [ruby-core:61950] [Bug #9726]

Mon Jun 23 16:45:48 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
	  ext/fiddle/handle.c (fiddle_handle_free),
	  ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
	  based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].

Wed May 28 13:24:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rb_cv_func___builtin_unreachable): try with an
	  external variable not only by a warning, which might not be
	  shown due to the optimization.  [ruby-core:61647] [Bug #9665]

Wed May 28 13:20:32 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_initialize): SYMID on a value
	  other than Symbol is an undefined behavior.  fix up r31699.
	  [ruby-core:62142] [Bug #9771]

Wed May 28 13:18:21 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_putc): fix for non-ascii
	  encoding, like as IO#putc.  [ruby-dev:48114] [Bug #9765]

Tue May 27 13:57:41 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/fileutils.rb (FileUtils#copy_entry): update rdoc about
	  preserve option and permissions, following r31123.
	  [ruby-core:62065] [Bug #9748]

Tue May 27 13:42:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (umethod_bind): use the ancestor iclass instead of new
	  iclass to get rid of infinite recursion, if the defined module
	  is already included.  [ruby-core:62014] [Bug #9721]

Tue May 27 13:42:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_method_call_with_block, umethod_bind): call with
	  IClass including the module for a module instance method.
	  [ruby-core:61936] [Bug #9721]

	* vm_insnhelper.c (vm_search_super_method): allow bound
	  UnboundMethod case.

Tue May 27 11:51:00 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (ary_reject): may be turned into a shared array during
	  the given block.  [ruby-dev:48101] [Bug #9727]

Tue May 27 11:48:22 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_buf_cat): should round up the capacity by 4KiB,
	  but not number of rooms.  [ruby-core:61886] [Bug #9709]

Tue May 27 11:46:03 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/xmlrpc/client.rb (do_rpc): don't check body length.
	  If HTTP content-encoding is used, the length may be different.
	  [Bug #8182] [ruby-core:53811]

Tue May 27 11:23:02 2014  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (d_lite_cmp): should compare with #<.

Mon May  5 00:42:35 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* ext/psych/yaml/config.h: ditto.

	* ext/psych/yaml/scanner.c: ditto.

	* ext/psych/yaml/yaml_private.h: ditto.

Thu May  8 02:01:51 2014  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.

Thu May  8 01:51:19 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
	  finalizes only a copy of the digest context, the context must be
	  cleaned up after initialization by EVP_MD_CTX_cleanup() or a
	  memory leak will occur.  [ruby-core:62038] [Bug #9743]

Wed Apr 30 16:39:43 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
	  [ruby-dev:48089] [Bug #9702]

Wed Apr 30 16:37:16 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_accept, open_ifs_socket, socketpair_internal):
	  reset inherit flag of socket to avoid unintentional inheritance of
	  socket.  note that the return value of SetHandleInformation() is not
	  verified intentionally because old Windows may return an error.
	  [Bug #9688] [ruby-core:61754]

Wed Apr 30 16:33:57 2014  Eric Wong  <e@80x24.org>

	* time.c (time_mload): freeze and preserve marshal-loaded time zone
	* test/ruby/test_time.rb: add test for GC on loaded object
	  [Bug #9652]

Wed Apr 30 16:15:09 2014  Kohei Suzuki  <eagletmt@gmail.com>

	* vm_method.c (rb_method_entry_get_without_cache): me->klass is 0
	  for a method aliased in a module.  [ruby-core:61636] [Bug #9663]

Wed Apr 30 16:15:09 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_method_entry_get_without_cache): get rid of
	  infinite recursion at aliases in a subclass and a superclass.
	  return actually defined class for other than singleton class.
	  [ruby-core:60431] [Bug #9475]

Wed Apr 30 16:09:18 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_arg): turn a macro into an
	  inline function.

Wed Apr 30 15:04:25 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
	  [ruby-core:61756] [Bug #9578]

Mon Mar 31 00:57:39 2014  James Edward Gray II  <james@graysoftinc.com>

	* lib/csv.rb: Fixed a broken regular expression that was causing
	  CSV to miss escaping some special meaning characters when used
	  in parsing.
	  Reported by David Unric
	  [ruby-core:54986] [Bug #8405]

Mon Mar 31 00:48:12 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/envutil.rb (assert_no_memory_leak): increase default value
	  of `limit` keyword argument.
	  assert_no_memory_leak occasionally fails with limit=1.5.

Mon Mar 31 00:15:45 2014  Shota Fukumori  <her@sorah.jp>

	* vm_eval.c (eval_string_with_cref): Unify to use NIL_P.

Mon Mar 31 00:15:45 2014  Shota Fukumori  <her@sorah.jp>

	* vm_eval.c (eval_string_with_cref): Use file path even if scope is
	  given. Related to [ruby-core:56099] [Bug #8662] and r42103.

Mon Mar 31 00:02:04 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yycompile): store file name as String to keep the encoding.

	* parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path):
	  new functions to pass file name as a String.

	* parse.y (gettable_gen): return a copy of the original file name, not
	  a copy in filesystem encoding.

	* vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)".

Sun Mar 30 23:49:21 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
	  error reasons with old OpenSSL, and insert a colon iff formatted
	  message is not empty.

Thu Mar 20 21:13:18 2014  Eric Wong  <e@80x24.org>

	* variable.c (rb_const_set): delete existing entry on redefinition
	  [Bug #9645]
	* test/ruby/test_const.rb (test_redefinition): test for leak

Thu Mar 20 20:44:17 2014  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/fiddle/test_c_struct_entry.rb,
	  test/fiddle/test_c_union_entity.rb,
	  test/fiddle/test_cparser.rb, test/fiddle/test_func.rb,
	  test/fiddle/test_handle.rb, test/fiddle/test_import.rb,
	  test/fiddle/test_pointer.rb: don't run test if the system
	  don't support fiddle.

Sun Mar 16 00:57:20 2014  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/.document: remove refinement from documentable directories.

Mon Mar  3 01:43:30 2014  Charlie Somerville  <charliesome@ruby-lang.org>

	* eval_error.c (warn_printf): use rb_vsprintf instead so ruby specific
	  extensions like PRIsVALUE can be used in format strings
	* eval_error.c (error_print): use warn_print_str (alias for
	  rb_write_error_str) to print a string value instead of using
	  RSTRING_PTR and RSTRING_LEN manually
	* eval.c (setup_exception): use PRIsVALUE instead of %s and RSTRING_PTR

Mon Mar  3 01:32:14 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/extconf.rb (rl_hook_func_t): define as Function for
	  very old readline versions.  [ruby-core:61209] [Bug #9578]

Mon Mar  3 01:32:14 2014  Tanaka Akira  <akr@fsij.org>

	* ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead
	  of Function to support readline-6.3.  (rl_hook_func_t is available
	  since readline-4.2.)
	  Reported by Dmitry Medvinsky.  [ruby-core:61141] [Bug #9578]

Mon Mar  3 01:25:28 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (setup_exception): preserve errinfo across calling #to_s
	  method on the exception.  [ruby-core:61091] [Bug #9568]

Mon Mar  3 01:00:00 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (ruby_num_interval_step_size): check signs and get rid
	  of implementation dependent behavior of negative division.
	  [ruby-core:61106] [Bug #9570]

Mon Mar  3 00:43:33 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	(merged partially from r42781)
	* test/ruby/test_numeric.rb (assert_step): introduce assert_step.

Mon Mar  3 00:24:38 2014  Zachary Scott  <e@zzak.io>

	* README.EXT.ja: [DOC] Fix typo "macro macro" @utenmiki [Fixes GH-551]
	  https://github.com/ruby/ruby/pull/551

Sat Feb 22 22:11:58 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/io/console/console.c (console_dev): need read access for conout$
	  because some functions need it.  [Bug#9554]

Sat Feb 22 14:01:42 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (iseq_load): keep type_map to get rid of memory leak.
	  based on a patch by Eric Wong at [ruby-core:59699].  [Bug #9399]

Sat Feb 22 13:56:38 2014  Charlie Somerville  <charliesome@ruby-lang.org>

	* compile.c (iseq_build_from_ary_body): Use :blockptr instead of :block
	  as hash key when loading serialized instruction sequences from arrays.
	  [Bug #9455] [ruby-core:60146]

Sat Feb 22 13:04:54 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/socket/init.c (wait_connectable): break if the socket is
	  writable to avoid infinite loops on FreeBSD and other platforms
	  which conforms to SUSv3.  This problem cannot be reproduced with
	  loopback interfaces, so it's hard to write test code.
	  rsock_connect() and wait_connectable() are overly complicated, so
	  they should be refactored, but I commit this fix as a workaround
	  for the release of Ruby 1.9.3 scheduled on Feb 24.
	  [ruby-core:60940] [Bug #9547]

Sat Feb 22 12:55:24 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	(merged partially from r42927)
	* lib/rubygems/core_ext/kernel_require.rb: Backport a fix for concurrent
	  requires. [ruby-core:58918] [Backport #9224]
	  see also https://github.com/rubygems/rubygems/pull/833

Sat Feb 22 11:50:52 2014  Eric Wong  <e@80x24.org>

	* ext/socket/ancdata.c (bsock_sendmsg_internal): only retry on error
	  (bsock_recvmsg_internal): ditto
	* test/socket/test_unix.rb: test above for infinite loop

Sat Feb 22 11:44:50 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_init_copy): do nothing if copying self.
	  [ruby-dev:47989] [Bug #9535]

	* hash.c (rb_hash_initialize_copy): ditto.

Thu Feb 20 02:14:18 2014  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/buffering.rb: Fix warning in copyright

Thu Feb 20 02:14:18 2014  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/buffering.rb: [DOC] Fix HEREDOC comment for
	  OpenSSL::Buffering which breaks overview because of RDoc bug

Thu Feb 20 02:04:09 2014  Eric Hodel  <drbrain@segment7.net>

	* ext/.document:  Add syslog/lib to documentable items. [Bug #9228]

Thu Feb 20 01:54:08 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_search_super_method): when super called in a
	  bound UnboundMethod generated from a module, no superclass is
	  found since the current defined class is the module, then call
	  method_missing in that case.  [ruby-core:59619] [Bug #9377]

Thu Feb 20 01:33:06 2014  Eric Hodel  <drbrain@segment7.net>

	* lib/optparse.rb:  The Integer acceptable now allows binary and
	  hexadecimal numbers per the documentation.  [ruby-trunk - Bug #8865]

	  DecimalInteger, OctalInteger, DecimalNumeric now validate their input
	  before converting to a number.  [ruby-trunk - Bug #8865]

	* test/optparse/test_acceptable.rb:  Tests for the above, tests for all
	  numeric acceptables for existing behavior.

Thu Feb 20 01:23:36 2014  Aaron Pfeifer  <aaron.pfeifer@gmail.com>

	* thread.c (terminate_atfork_i): fix locking mutexes not unlocked in
	  forks when not tracked in thread.  [ruby-core:55102] [Bug #8433]

Tue Feb 18 23:48:03 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (assert_separately): require envutil in the
	  child process too.

Tue Feb 18 22:38:01 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
	  specify the encoding of source.

Mon Feb 17 02:00:36 2014  Tanaka Akira  <akr@fsij.org>

	* lib/open-uri.rb: Make proxy disabling working again.
	  Fixed by Christophe Philemotte.   [ruby-core:59650] [Bug #9385]

Mon Feb 17 01:57:45 2014  Benoit Daloze  <eregontp@gmail.com>

	* range.c (Range#size): [DOC] improve description and add examples.
	  Patch by @skade. [Fixes GH-501]

Mon Feb 17 01:51:49 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML
	  meta chars even in non-ascii string.  [Bug #8425] [ruby-core:55052]

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils#{_escape,_unescape}):
	  fix %-escape encodings.  [Bug #8425] [ruby-core:55052]

Mon Feb 17 01:51:49 2014  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/webrick/test_htmlutils.rb: add test for WEBrick::HTMLUtils.

Mon Feb 17 01:41:59 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_hash_rehash): use hash_alloc() instead of rb_hash_new().
	  [Bug #9187]

Mon Feb 17 01:41:59 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_rehash): make temporary st_table under the control
	  of GC. [Bug #9187]

	* test/ruby/test_hash.rb: add a test for above.

Mon Feb 17 01:41:59 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_rehash): fix to free new st_table when exception
	  is raised in do_hash(). [Bug #9187]

Mon Feb 17 01:18:04 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_mod_s_constants): return its own constants for other
	  than Module itself.  [ruby-core:59763] [Bug #9413]

Mon Feb 17 01:16:00 2014  Eric Wong <e@80x24.org>

	* ext/json/generator/depend: add build dependencies for json extension
	  [Bug #9374] [ruby-core:59609]
	* ext/json/parser/depend: ditto

Mon Feb 17 01:12:57 2014  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
	  [ruby-core:57599] [Bug #8978].

Mon Feb 17 01:12:57 2014  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
	  [ruby-core:57599] [Bug #8978].  Thanks mame!

Mon Feb 17 01:09:52 2014  Eric Wong <e@80x24.org>

	* benchmark/driver: avoid large alloc in driver process
	  [ruby-core:59869] [Bug #9430]

Mon Feb 17 00:59:40 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (rb_thread_create_timer_thread): fix for platforms
	  where PTHREAD_STACK_MIN is a dynamic value and not a compile-time
	  constant.  [ruby-dev:47911] [Bug #9436]

Mon Feb 17 00:59:40 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (rb_thread_create_timer_thread): expand timer
	  thread stack size to get rid of segfault on FreeBSD/powerpc64.
	  based on the patch by Steve Wills at [ruby-core:59923].
	  [ruby-core:56590] [Bug #8783]

Mon Feb 17 00:45:44 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_modify_expand): enable capacity and disable
	  association with packed objects when setting capa, so that
	  pack("p") string fails to unpack properly after modified.

Sun Feb 16 01:36:57 2014  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/yaml/emitter.c: merge libyaml 0.1.5
	* ext/psych/yaml/loader.c: ditto
	* ext/psych/yaml/parser.c: ditto
	* ext/psych/yaml/reader.c: ditto
	* ext/psych/yaml/scanner.c: ditto
	* ext/psych/yaml/writer.c: ditto
	* ext/psych/yaml/yaml_private.h: ditto

Sun Feb 16 01:02:32 2014  Zachary Scott  <e@zzak.io>

	* lib/racc/rdoc/grammar.en.rdoc: [DOC] Correct grammar and typos
	  Patch by Giorgos Tsiftsis [Bug #9429] [ci skip]

Sun Feb 16 01:00:45 2014  Zachary Scott  <e@zzak.io>

	* lib/open-uri.rb: [DOC] use lower case version of core classes, same
	  as commit r44878, based on patch by Jonathan Jackson [Bug #9483]

Sun Feb 16 01:00:45 2014  Zachary Scott  <e@zzak.io>

	* ext/ripper/lib/ripper/lexer.rb: [DOC] use lower case version of core
	  classes when referring to return value, since we aren't directly
	  talking about the class. Patch by Jonathan Jackson [Bug #9483]

Sun Feb 16 00:57:13 2014  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* variable.c: [DOC] adding extra example in docs.
	  patched by Steve Klabnik. [Bug #9210]

Sun Feb 16 00:54:50 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS::Resource::TXT#data): Return concatenated
	  string.
	  Patch by Ryan Brunner.  [ruby-core:58220] [Bug #9093]

Sun Feb 16 00:50:59 2014  Zachary Scott  <e@zzak.io>

	* ext/openssl/ossl_pkey_dh.c: Fixed typo by Sandor Szuecs [Bug #9243]

Sun Feb 16 00:47:36 2014  Zachary Scott  <e@zzak.io>

	* lib/xmlrpc/client.rb: [DOC] Remove note about SSL package on RAA
	  Since RAA has been deprecated, and the SSL package has been replaced
	  with net/https this statement is entirely false and should be
	  deleted. [Bug #9152]

Sun Feb 16 00:44:51 2014  Zachary Scott  <e@zzak.io>

	* lib/net/smtp.rb: [DOC] Remove dead link to RAA by Giorgos Tsiftsis
	  Fixes the following bugs: [Bug #9152] [Bug #9268] [Bug #9394]
	* lib/open-uri.rb: ditto

Sun Feb 16 00:27:04 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_assoc): revert r42224. table->type->compare is
	  called only if hashes are matched.

	* test/ruby/test_hash.rb: add a test to check using #== to compare.

Sun Feb 16 00:27:04 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_initialize_copy): copy st_table type even if empty.
	  [ruby-core:56256] [Bug #8703]

Sun Feb 16 00:27:04 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_initialize_copy): clear old table before copy new
	  table.

Sun Feb 16 00:27:04 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_assoc): aggregate object can be initialized only
	  with link time constants.

Sun Feb 16 00:27:04 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_assoc): performance improvement by replacing
	  compare function in RHASH(hash)->ntbl->type temporarily.

Sun Feb 16 00:01:16 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: Ignore name servers which cause EAFNOSUPPORT on
	  socket creation.
	  Reported by Bjoern Rennhak.  [ruby-core:60442] [Bug #9477]

Sat Feb 15 23:58:31 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raise
	  DecodeError if no data before the limit.
	  Reported by Will Bryant.  [ruby-core:60557] [Bug #9498]

Sat Feb 15 23:46:31 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (IDSET_ATTRSET_FOR_INTERN): fix off-by-one bug.

	* parse.y (rb_enc_symname_type): junk ID succeeded by '=' is also
	  attrset ID.  [ruby-core:60668] [Bug #8756]

Sat Feb 15 23:42:04 2014  Richo Healy  <richo@psych0tik.net>

	* test/ruby/test_struct.rb: Add regression test for question marks and
	  bangs in struct members. [Closes GH-468]

Sat Feb 15 23:26:31 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (new_struct): fix warning message, class name and encoding.

Sat Feb 15 16:08:26 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (make_struct): avoid inadvertent symbol creation.
	  (rb_struct_aref): ditto.
	  (rb_struct_aset): ditto.

Sat Feb 15 15:32:46 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): should check ci->me->flag of
	  a refining method in case the method is private.
	  [ruby-core:60111] [Bug #9452]

	* vm_method.c (make_method_entry_refined): set me->flag of a refined
	  method entry to NOEX_PUBLIC in case the original method is private
	  and it is refined as a public method.  The original flag is stored
	  in me->def->body.orig_me, so it's OK to make a refined method
	  entry public.  [ruby-core:60111] [Bug #9452]

	* test/ruby/test_refinement.rb: related tests.

Tue Feb 11 23:21:02 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/test_struct.rb (test_struct_question_mark): add a testcase
	  for Struct attribute with question mark. the patch was originally
	  written by Eric Wong [ruby-core:59095] [Backport #9248]

Tue Feb 11 23:21:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_id_attrset, intern_str): allow junk attrset ID for
	  Struct.

	* parse.y (rb_id_attrset): fix inconsistency with literals, allow
	  ID_ATTRSET and return it itself, but ID_JUNK cannot make ID_ATTRSET.
	  and raise a NameError instead of rb_bug() for invalid argument.

Tue Feb 11 23:21:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_enc_symname_type): allow ID_ATTRSET for ID_INSTANCE,
	  ID_GLOBAL, ID_CLASS, ID_JUNK too.  [Bug #8756]

Tue Feb 11 23:21:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_id_attrset): allow other than ID_ATTRSET.

	* parse.y (intern_str): ditto.  try stem ID for ID_INSTANCE,
	  ID_GLOBAL, ID_CLASS, ID_JUNK too.  [Bug #8756]

Tue Feb 11 23:21:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_id_attrset): check if the argument is valid type as an
	  attribute.

Tue Feb 11 00:26:19 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (GetLastError): already defined in windows.h on nowadays
	  cygwin, and caused the confliction with the system provided
	  definition on cygwin64.  by @kou1okada [Fixes GH-433].

Mon Feb 10 01:15:10 2014  Kouhei Sutou  <kou@cozmixng.org>

	* ext/socket/raddrinfo.c (nogvl_getaddrinfo): Fix indent.

Mon Feb 10 01:15:10 2014  Kouhei Sutou  <kou@cozmixng.org>

	* ext/socket/raddrinfo.c (nogvl_getaddrinfo): Add missing return
	  value assignment.

Mon Feb 10 01:15:10 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/socket/raddrinfo.c (nogvl_getaddrinfo): work around for Ubuntu
	  13.04's getaddrinfo issue with mdns4. [ruby-list:49420]

Mon Feb 10 00:42:12 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* ext/thread/thread.c (rb_szqueue_clear): notify SZQUEUE_WAITERS
	  on SizedQueue#clear. [ruby-core:59462] [Bug #9342]

	* test/thread/test_queue.rb: add test. the patch is from
	  Justin Collins.

Mon Feb 10 00:27:33 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (local_push_gen, local_pop_gen): save cmdarg_stack to
	  isolate command argument state from outer scope.
	  [ruby-core:59342] [Bug #9308]

Mon Feb 10 00:02:18 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): don't skip current directories if FNM_DOTMATCH
	  is given.  [ruby-core:53108] [Bug #8006]

Wed Feb  5 23:39:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (intern_str): sigil only names are junk, at least one
	  identifier character is needed.  [ruby-dev:47723] [Bug #8928]

	* parse.y (rb_enc_symname_type): fix out of bound access.

Wed Feb  5 22:54:52 2014  Kazuki Tsujimoto  <kazuki@callcc.net>

	* time.c (get_timeval, get_new_timeval): use rb_obj_class()
	  instead of CLASS_OF() because CLASS_OF() may return
	  a singleton class.

Sun Feb 2 05:48:42 2014  Eric Wong <e@80x24.org>

	* io.c (rb_io_syswrite): add RB_GC_GUARD
	  [Bug #9472][ruby-core:60407]

Fri Jan 31 00:51:50 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* configure.in: use $@ instead of $(.TARGET) because .TARGET is not
	  supported by GNU make.

Fri Jan 31 00:49:41 2014  Yamashita Yuu  <yamashita@geishatokyo.com>

	* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant
	  `OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined.  The
	  `SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest
	  snapshot of OpenSSL 1.0.1.  [Fixes GH-488]

Thu Jan 23 21:08:16 2014  Shota Fukumori  <her@sorah.jp>

	* vm_insnhelper.c (check_match): Fix SEGV with VM_CHECKMATCH_TYPE_CASE
	  and class of `pattern` has `method_missing`
	  [Bug #8882] [ruby-core:58606]

Mon Jan 20 01:02:18 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (CLASS_NAME): macro to wrap
	  depending on PRIsVALUE for 1.9.  [Backport #9406]

	* ext/bigdecimal/bigdecimal.c (DECIMAL_SIZE_OF_BITS): fallback
	  definition for 2.1 or older.  [ruby-core:59750] [Backport #9406]

Sun Jan 12 22:46:49 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	patch inspired from r44260 on trunk. [ruby-core:58652] [Bug #9168]

	* gc.c (run_finalizer): clear th->errinfo before invoke finalizer and
	  restore afterward.

	* test/ruby/test_gc.rb (test_exception_in_finalizer): add test for
	  above.

	* vm_trace.c (rb_threadptr_exec_event_hooks_orig): clear th->errinfo
	  before invoke hook.

Sun Jan 12 16:07:52 2014  vo.x (Vit Ondruch)  <vondruch@redhat.com>

	* tool/rbinstall.rb (Gem::Specification#collect): make stable
	  Gem::Specification.files in default .gemspecs the different order of
	  "files" in .gemspec files makes them different therefore possibly
	  conflicting in multilib scenario.  patch by vo.x (Vit Ondruch) at
	  [ruby-core:57544] [Bug #8623].

Sun Jan 12 16:01:54 2014  Tanaka Akira  <akr@fsij.org>

	* test/openssl/test_cipher.rb (test_aes_gcm_wrong_tag): Don't use
	  String#succ because it can make modified (wrong) auth_tag longer
	  than 16 bytes.  The longer auth_tag makes that
	  EVP_CIPHER_CTX_ctrl (and internally aes_gcm_ctrl) fail.
	  [ruby-core:55143] [Bug #8439] reported by Vit Ondruch.

Sun Jan 12 15:33:11 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_qsort): fix potential stack overflow on a large
	  machine.  based on the patch by Conrad Irwin <conrad.irwin AT
	  gmail.com> at [ruby-core:51816].  [Bug #7772]

Sun Jan 12 15:17:00 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tk/tkutil/tkutil.c: use rb_sprintf(), rb_id2str(), and
	  rb_intern_str() instead of rb_intern() and RSTRING_PTR() with
	  RB_GC_GUARD(), to prevent temporary objects from GC.
	  [ruby-core:39000] [Bug #5199]

Tue Jan  7 01:16:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew_from_me): keep iclass as-is, to make inheritance
	  chain consistent.  [ruby-core:59358] [Bug #9315]

	* proc.c (method_owner): return the original defined_class from
	  prepended iclass, instead.

Tue Jan  7 01:16:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_search_super_method): direct superclass of a
	  module is found when super called in a Method object generated a
	  method defined in a module, call method_missing in that case.
	  [ruby-core:59358] [Bug #9315]

Fri Jan  3 22:25:23 2014  Aman Gupta <ruby@tmm1.net>

	* test/net/imap/cacert.pem: generate new CA cert, since the last one
	  expired. [Bug #9341] [ruby-core:59459]
	* test/net/imap/server.crt: new server cert signed with updated CA.
	* test/net/imap/Makefile: add `make regen_certs` to automate this
	  process.

Wed Dec 25 00:46:44 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/smtp.rb (Net::SMTP#critical):  Always return a
	  Net::SMTP::Response.  Patch by Pawel Veselov.
	  [ruby-trunk - Bug #9125]
	* test/net/smtp/test_smtp.rb:  Test for the above.

Wed Dec 25 00:18:19 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because
	  it may be set before the body.
	  Reported by ko1 and mrkn.  [ruby-core:59088] [Bug #9247]

	* lib/cgi/core.rb: Ditto.

	* lib/drb/ssl.rb: Ditto.

Tue Dec 24 00:18:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (configuration): strip destdir part from prefix to get
	  rid of duplication.  a patch by arton at [ruby-core:58859].
	  [ruby-core:58856] [Bug #9213]

Mon Dec 23 22:37:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew_from_me): method by respond_to_missing? should be
	  owned by the original class.

Sun Dec 22 22:56:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew_from_me): achieve the original defined_class from
	  prepended iclass, to fix inherited owner.

	* proc.c (method_owner): return the defined class, but not the
	  class which the method object is created from.

Sun Dec 22 22:56:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (method_owner): return the class where alias is defined, not
	  the class original method is defined.

	* vm_method.c (rb_method_entry_make, rb_alias): store the originally
	  defined class in me.  [Bug #7993] [Bug #7842] [Bug #9236]

	* vm_method.c (rb_method_entry_get_without_cache): cache included
	  module but not iclass.

Sun Dec 22 00:07:09 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* insns.def: Fix optimization bug of Float#/ [Bug #9238]

Sat Dec 21 23:13:55 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_jump.c (rb_exec_end_proc): unlink and free procs data before
	  calling for each procs.  [Bug #9110]

Sat Dec 21 23:13:55 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* eval_jump.c (rb_exec_end_proc): fix double free or corruption error
	  when reentering by callcc. [ruby-core:58329] [Bug #9110]

	* test/ruby/test_beginendblock.rb: test for above.

Sat Dec 21 22:55:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not
	  consider encodings in hosts file.  [ruby-core:59239] [Bug #9273]

	* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto.

Sat Dec 21 22:51:51 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
	  install win32.h.
	  [ruby-core:58801][Bug #9199] reported by arton.

Sat Dec 21 16:16:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (finalize_deferred): flush all deferred finalizers while other
	  finalizers can get ready to run newly by lazy sweep.
	  [ruby-core:58833] [Bug #9205]

Sat Dec 21 16:07:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for
	  a generic pointer.

Sat Dec 21 15:50:13 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* ruby_atomic.h: remove duplicate definisions between ATOMIC_XXX
	  and ATOMIC_SIZE_XXX.

Sat Dec 21 15:50:13 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* ruby_atomic.h: define ATOMIC_SIZE_CAS() with
	  __atomic_compare_exchange_n() and refactoring.

Sat Dec 21 15:50:13 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* ruby_atomic.h: use __atomic builtin functions supported by GCC.
	  __sync family are legacy functions now and it is recommended
	  that new code use the __atomic functions.
	  http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

	* configure.in: check existence of __atomic functions.

Sat Dec 21 15:37:11 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* ruby_atomic.h (ATOMIC_SIZE_CAS): fix compile error on Solaris
	  since r43460.

Sat Dec 21 15:37:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.

Sat Dec 21 15:37:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
	  directly.

	* ruby_atomic.h (ATOMIC_CAS): fix missing function call.

Sat Dec 21 15:37:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (ATOMIC_CAS): suppress C4022 and C4047 warnings in
	  VC6.  only InterlockedCompareExchange is declared using PVOID.

Sat Dec 21 14:54:37 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
	  Rational#to_d without argument. [Bug #8958]

Sat Dec 21 14:54:37 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required

Sat Dec 21 14:54:37 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
	  +precision+ argument for Rational#to_d [Bug #8958]

Sat Dec 21 03:46:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/date/date_strptime.c (date__strptime_internal): unset
	  case-insensitive flag for [:alpha:], which already implies both
	  cases, to get rid of backtrack explosion.  [ruby-core:58984]
	  [Bug #9221]

Sat Dec 21 03:46:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/date/date_parse.c (parse_time): unset case-insensitive flag
	  for [:alpha:], which already implies both cases, to get rid of
	  backtrack explosion.  [ruby-core:58876] [Bug #9221]

Fri Dec 13 00:23:01 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* enumerator.c (enumerator_with_index): try to convert given offset to
	  integer. fix bug introduced in r39594.

Mon Dec  2 23:31:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (enumerator_with_index): should not store local variable
	  address to memoise the arguments.  it is invalidated after the return.
	  [ruby-core:58692] [Bug #9178]

Mon Dec  2 23:16:50 2013  Eric Hodel  <drbrain@segment7.net>

	* enumerator.c (enumerator_with_index):  Restore handling of a nil memo
	  from r39594.

Mon Dec  2 22:53:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_readlink): fix buffer overflow on a long symlink. since
	  rb_str_modify_expand() expands from its length but not its capacity,
	  need to set the length properly for each expansion.
	  [ruby-core:58592] [Bug #9157]

Fri Nov 29 00:31:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (Doxyfile): tool/file2lastrev.rb needs running with
	  BASERUBY since r43617.  [ruby-dev:47823] [Bug #9169]

Fri Nov 22 13:18:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_strtod): BigMath requires more precision.

Fri Nov 22 12:46:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_strtod): ignore too long fraction part, which does not
	  affect the result.

Wed Nov 20 15:20:00 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/test_thread.rb (test_mutex_unlock_on_trap): extend waiting
	  time to invocation of signal handler from 0.01 sec to 0.2 sec.
	  RubyCI report error on mswin. reported by @unak

Wed Nov 13 11:57:01 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to RubyGems 2.0.14. [ruby-core:58300]
	  [Backport #9104]
	  the patch is provided by drbrain (Eric Hodel).

Tue Nov 12 23:41:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (rb_feature_p): deal with default loadable suffixes.

	* load.c (load_lock): initialize statically linked extensions.

	* load.c (search_required, rb_require_safe): deal with statically
	  linked extensions.

	* load.c (ruby_init_ext): defer initialization of statically linked
	  extensions until required actually.  [Bug #8883]

Tue Nov 12 23:41:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (ruby_init_ext): share feature names between frame name and
	  provided features.

Tue Nov 12 23:33:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (Gem::Specification.load): obtain spec date from
	  VCS for the case using git, RUBY_RELEASE_DATE is the last resort.
	  probably fixes [Bug #9085].

Tue Nov 12 23:24:35 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUNRUBY): append -- only after runruby.rb, not
	  cross-compiling baseruby, so that $(RUN_OPT) can be command line
	  options.  [ruby-dev:47703] [Bug #8893]

Tue Nov 12 23:24:35 2013  Masaki Matsushita  <glass.saga@gmail.com>

	(partially merged from r42862)
	* common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can't
	  require extension libraries. The patch is from nobu
	  (Nobuyoshi Nakada).

Mon Nov 11 23:54:51 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/init.c (cloexec_accept): Fix a compile error on
	  Debian GNU/kFreeBSD.  Consider HAVE_ACCEPT4 is defined
	  but SOCK_CLOEXEC is not defined.

Mon Nov 11 22:14:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h (rb_infinity_float): suppress overflow in
	  constant arithmetic warnings.  [ruby-core:57981] [Bug #9044]

Mon Nov 11 22:14:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
	  functions.  [ruby-core:57981] [Bug #9044]

Thu Oct 31 22:28:04 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
	  they are not suitable for ECDSA.
	  [ruby-core:54881] [Bug #8384]

Thu Oct 31 22:28:04 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds of
	  OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not
	  defined.
	* test/openssl/test_pkey_ec.rb: Iterate over built-in curves
	  (and assert their non-emptiness!) instead of hard-coding them, as
	  this may cause problems with respect to the different availability
	  of individual curves in individual OpenSSL builds.
	  [ruby-core:54881] [Bug #8384]

	  Thanks to Vit Ondruch for providing the patch!

Sun Oct 27 01:04:28 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to RubyGems 2.0.13. [ruby-core:58031]
	  [Backport #9052]
	  the patch is provided by drbrain (Eric Hodel).

Sat Oct 26 16:04:36 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* gc.c (gc_prof_set_heap_info): fix compile error when
	  GC_PROFILE_MORE_DETAIL != 0.
	  the patch is provided by ko1 (Koichi Sasada).

Thu Oct 24 23:27:12 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to RubyGems 2.0.12. [ruby-core:57818]
	  [Backport #9014]
	  the patch is provided by drbrain (Eric Hodel).

Thu Oct 24 22:49:28 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* parse.y: Remove +(binary) and -(binary) special cases
	  [Feature #9048]

Thu Oct 24 22:36:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (load_encoding): should preserve outer errinfo, so that
	  expected exception may not be lost.  [ruby-core:57949] [Bug #9038]

Fri Oct 18 02:10:00 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): set ci->me to 0 when the
	  original method of a refined method is undef to avoid SEGV.

	* vm_method.c (rb_method_entry_without_refinements): return 0 when
	  the original method of a refined method is undef to avoid SEGV.

	* test/ruby/test_refinement.rb: related test.

Fri Oct 18 02:05:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/file.c (rb_file_expand_path_internal): fix memory leaks at
	  a non-absolute home exception.

Thu Oct 10 01:14:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compar.c (cmp_eq): fail if recursion.  [ruby-core:57736] [Bug #9003]

	* thread.c (rb_exec_recursive_paired_outer): new function which is
	  combinnation of paired and outer variants.

Thu Oct 10 01:07:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/tempfile.rb (Tempfile#unlink): finalizer is no longer needed
	  after unlinking.  patched by by normalperson (Eric Wong) at
	  [ruby-core:56521] [Bug #8768]

Thu Oct 10 00:58:39 2013  Benoit Daloze  <eregontp@gmail.com>

	* test/ruby/test_array.rb (test_count): add a test case for #count
	  with an argument. See Bug #8654.

Thu Oct 10 00:58:39 2013  Benoit Daloze  <eregontp@gmail.com>

	* array.c (rb_ary_count): check length to avoid SEGV
	  while iterating. Remove other pointer loop when arg is given.

	* test/ruby/test_array.rb (test_count): add test for bug.
	  [ruby-core:56072] [Bug #8654]

Thu Oct 10 00:58:39 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_count): iterate items appropriately.
	  [Bug #8654]

Thu Oct 10 00:44:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_fork_internal): remove cloexec setting on pipes
	  created by rb_cloexec_pipe.  patch by normalperson (Eric Wong) at
	  [ruby-core:56523].  [Bug #8769]

Thu Oct 10 00:24:01 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't
	  support a combination getcontext() and threads. Patch by
	  Gabriele Giacone (1o5g4r8o@gmail.com). [Bug #8990][ruby-core:57685]

Mon Oct  7 21:03:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
	  from cont.c

Thu Oct 10 00:17:56 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
	  correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com).
	  [Bug #8937][ruby-core:57311]
	* test/fiddle/helper.rb: ditto.

Thu Oct 10 00:00:30 2013  Tanaka Akira  <akr@fsij.org>

	* lib/time.rb (Time.strptime): Time.strptime('0', '%s') returns local
	  time Time object as Ruby 2.0 and before.

Thu Oct 10 00:00:30 2013  Tanaka Akira  <akr@fsij.org>

	* lib/time.rb (Time.strptime): Use :offset.
	  Patch by Felipe Contreras.  [ruby-core:57694]

Wed Oct  9 23:32:37 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_gc_disable): do rest_sweep() before disable GC.
	  This fix may solve a failure of
	  TestTracepointObj#test_tracks_objspace_events
	  [test/-ext-/tracepoint/test_tracepoint.rb:43].

Sat Oct  5 02:14:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_close_read): duplex IO should wait its child process
	  even after close_read.

Sat Oct  5 02:14:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
	  fix freed pointer access when it is in use by other threads, and get
	  rid of potential memory/fd leak.

Sat Oct  5 01:59:50 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (rb_undef): raise a NameError if the original method
	  of a refined method is not defined.

	* vm_insnhelper.c (rb_method_entry_eq): added NULL check to avoid SEGV.

	* test/ruby/test_refinement.rb: related test.

Sat Oct  5 00:16:33 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* process.c (rb_daemon): daemon(3) is implemented with fork(2).
	  Therefore it needs rb_thread_atfork(). (and revert r41903)

Sat Oct  5 00:16:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (fork_daemon): kill the other threads all and abandon the
	  kept mutexes.

Sat Oct  5 00:16:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (fork_daemon): kill the other threads all and abandon the
	  kept mutexes.

Tue Oct  1 00:28:40 2013  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* tool/make-snapshot: Fix order of priority for option parameter.

Sat Sep 28 21:40:40 2013  Kenichi Kamiya  <kachick1@gmail.com>

	* random.c (rb_random_ulong_limited): coerce before check negative.
	  [Fixes GH-379]

Fri Sep 27 01:24:20 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to Rubygems 2.0.10. [ruby-core:57360]
	  [Backport #8950]
	  the patch is provided by drbrain (Eric Hodel).
	  this update contains a security fix for CVE-2013-4363.

Fri Sep 27 01:11:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (lambda): adjust position to the beginning of the block.

Fri Sep 27 01:02:59 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic.find_proxy): return nil if
	  http_proxy environment variable is empty string.
	  [ruby-core:57140] [Bug #8898]

Fri Sep 27 00:58:57 2013  Zachary Scott  <e@zzak.io>

	* lib/gserver.rb: [DOC] correct gserver.rb license [Bug #8913]

Sun Sep 15 23:15:32 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to Rubygems 2.0.9. [ruby-core:57183]
	  [Backport #8908]
	  the patch is provided by drbrain (Eric Hodel).

Sun Sep 15 22:59:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (Gem::Specification#initialize): default date to
	  RUBY_RELEASE_DATE.  [ruby-core:57072] [Bug #8878]

	* tool/rbinstall.rb (Gem::Specification#to_ruby): add date.

Sun Sep 15 22:55:44 2013  Zachary Scott  <e@zzak.io>

	* hash.c (rb_hash_aset): [DOC] Document key dup patch by @kachick
	  [Fixes GH-382] https://github.com/ruby/ruby/pull/382

Sun Sep 15 22:03:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
	  float.h.

	* vsnprintf.c (BSD_vfprintf): limit length for cvt() to get rid of
	  buffer overflow.  [ruby-core:57023] [Bug #8864]

	* vsnprintf.c (exponent): make expbuf size more precise.

Sat Sep 14 00:01:20 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to RubyGems 2.0.8. [ruby-core:57155]
	  [Backport #8900]
	  the patch is provided by drbrain (Eric Hodel).
	  this update contains a security fix for CVE-2013-4287.

Fri Sep 13 23:20:29 2013  Kenichi Kamiya  <kachick1@gmail.com>

	* object.c (Init_Object): undef Module#prepend_features on Class, as
	  well as Module#append_features.  [Fixes GH-376]

	* test_class.rb: Added test for above. And ensure type checking
	  on similar methods as module_function.

Fri Sep 13 23:16:12 2013  Zachary Scott  <e@zzak.io>

	* enumerator.c: [DOC] Remove reference to Enumerator::Lazy#cycle
	  Patch by @kachick [Fixes GH-372]
	  https://github.com/ruby/ruby/pull/372

Fri Sep 13 22:40:28 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_search_super_method): use ci->argc instead of
	  ci->orig_argc. ci->argc can be changed by splat arguments.
	  [ruby-list:49575]
	  This fix should be applied to Ruby 2.0.0 series.

	* test/ruby/test_super.rb: add a test for above.

Fri Sep 13 01:44:54 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_unlock): Mutex#unlock no longer raise
	  an exception even if uses on trap. [Bug #8891]

Fri Sep 13 01:09:59 2013  Shota Fukumori  <sorah@tubusu.net>

	* vm_backtrace.c (vm_backtrace_to_ary): Ignore the second argument if
	  it is nil. [Bug #8884] [ruby-core:57094]

	* test/ruby/test_backtrace.rb (test_caller_with_nil_length):
	  Test for above.

Fri Sep 13 00:57:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (method_entry_i): should exclude refined methods from
	  instance method list.  [ruby-core:57080] [Bug #8881]

Fri Sep 13 00:33:09 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm_eval.c (vm_call0): fix prototype, the id parameter should be of
	  type ID, not VALUE

	* vm_insnhelper.c (check_match): the rb_funcall family of functions
	  does not care about refinements. We need to use
	  rb_method_entry_with_refinements instead to call === with
	  refinements. Thanks to Jon Conley for reporting this bug.
	  [ruby-core:57051] [Bug #8872]

	* test/ruby/test_refinement.rb: add test

Fri Sep 13 00:18:55 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (lazy_zip_func): fix non-single argument.  fix
	  out-of-bound access and pack multiple yielded values.
	  [ruby-core:56383] [Bug #8735]

Thu Sep 12 01:44:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_gsub): use BEG(0) for whole matched position not
	  return value from rb_reg_search(), for \K matching.
	  [ruby-dev:47694] [Bug #8856]

Thu Sep 12 01:34:07 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* object.c (rb_class_inherited_p): allow iclasses to be tested for
	  inheritance. [Bug #8686] [ruby-core:56174]

	* test/ruby/test_method.rb: add test

Thu Sep 12 01:18:44 2013  Michal Rokos  <michal@rokos.cz>

	* configure.in (sys/pstat.h): fix missing header check for
	  missing/setproctitle.c on HP-UX.  [ruby-core:56644] [Bug #8792]

Thu Sep 12 01:02:56 2013  Benoit Daloze  <eregontp@gmail.com>

	* test/ruby/test_time.rb: use the in_timezone() helper
	  and define it at the top with other helpers.

Thu Sep 12 01:02:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_mload): ignore auxiliary data, offset and zone, if
	  invalid.  [ruby-core:56648] [Bug #8795]

Thu Sep 12 00:22:22 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* variable.c (classname): the name of class that has
	  non class id should not be nil. This bug was introduced
	  in r36577.

	* test/thread/test_cv.rb: test for change.

Thu Aug 29 21:51:33 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (zstream_run):  Fix handling of deflate streams that
	  need a dictionary but are being decompressed by Zlib::Inflate.inflate
	  (which has no option to set a dictionary).  Now Zlib::NeedDict is
	  raised instead of crashing.  [ruby-trunk - Bug #8829]
	* test/zlib/test_zlib.rb (TestZlibInflate):  Test for the above.

Thu Aug 29 21:28:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): a method entry refers the based
	  class/module, so should search superclass from the origin i-class
	  where the entry belongs to, to get rid of infinite loop when zsuper
	  in a prepended class/module.  [ruby-core:54105] [Bug #8238]

Fri Aug 23 01:16:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
	  can be omitted.

Fri Aug 23 00:55:02 2013  Tanaka Akira  <akr@fsij.org>

	* gc.c (getrusage_time): Fallback clock_gettime to getrusage when
	  clock_gettime fails.
	  Reported by Eric Saxby.  [ruby-core:56762] [Bug #8805]
	  
Sat Aug 17 00:42:12 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* parse.y: fix build error with bison-3.0.

Sat Aug 17 00:39:20 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/webrick/test_cgi.rb (TestWEBrickCGI#{start_cgi_server,test_cgi}):
	  mswin is not only mswin32 but also mswin64. [Bug #8746]

Sat Aug 17 00:36:24 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* test/openssl/test_ssl.rb: Fix test for CVE-2013-4073.
	  Patch by Antonio Terceiro. [Bug #8750] [ruby-core:56437]

Sat Aug 17 00:32:17 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: update to RubyGems 2.0.7. the patch by drbrain.
	  [ruby-core:56633] [Backport #8787]

Sat Aug 10 23:59:47 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/coverage/test_coverage.rb (TestCoverage#test_big_code): use `1'
	  instead of `p' to get rid of a side effect.
	  Kernel#p without any argument seems to do nothing, but flushes stdout.
	  and, if stdout is redirected to file, fsync() will be called on
	  Windows.  so, when running test-all on Windows with redirection, such
	  as CI environment, this test took a lot of time.

Sun Aug  4 22:42:16 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (wrename): use MoveFileExW instead of MoveFileW,
	  because the latter fails on cross device file move of some
	  environments.
	  fix [ruby-core:53492] [Bug #8109]
	  reported by mitchellh (Mitchell Hashimoto)

Sat Aug  3 23:02:09 2013  Tanaka Akira  <akr@fsij.org>

	* ext/extmk.rb (extmake): Invoke Logging::log_close in a ensure
	  clause.

Sat Aug  3 23:02:09 2013  Tanaka Akira  <akr@fsij.org>

	* ext/extmk.rb (extmake): Use Logging.open to switch stdout and
	  stderr.  Delay Logging::log_close until the failure message is
	  written.  Write the failure message only if log file is opened.

	* lib/mkmf.rb (Logging.log_opened?): New method.

	  [ruby-dev:47215] [Bug #8209]

Sat Aug  3 22:46:19 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (xsystem): expand environment variable in all macros not
	  expanded with RbConfig.  [Bug #8702]

	* test/mkmf/test_framework.rb (create_framework): replace all $@ not
	  only once.

Sat Aug  3 22:40:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_framework): allow header file to check.
	  [ruby-core:55745] [Bug #8593]

Sat Aug  3 22:24:44 2013  Shota Fukumori  <her@sorah.jp>

	* lib/uri/common.rb (URI.decode_www_form_component):
	  Don't raise error when str includes multibyte characters.

Sun Jul 28 22:00:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* rational.c (f_round_common): Rational is expected to be returned by
	  Rational#*, but mathn.rb breaks that assumption.  [ruby-core:56177]
	  [Bug #8687]

Sun Jul 28 21:50:34 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* io.c (io_getpartial): use rb_str_locktmp_ensure().
	  [ruby-core:56121] [Bug #8669]

	* io.c (rb_io_sysread): ditto.

	* test/ruby/test_io.rb: add tests for above.

Sun Jul 28 21:50:34 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c: add internal API rb_str_locktmp_ensure().

	* io.c (io_fread): use rb_str_locktmp_ensure().
	  [ruby-core:56121] [Bug #8669]

	* test/ruby/test_io.rb: add a test for above.

Sun Jul 28 21:44:57 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_asn1.c (asn1time_to_time):  Implement YYMMDDhhmmZ
	  format for ASN.1 UTCTime.  [ruby-trunk - Bug #8664]
	* test/openssl/test_asn1.rb:  Test for the above.

Fri Jul 26 00:38:58 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to RubyGems 2.0.6. [ruby-core:56160]
	  [Backport #8682]

Wed Jul 24 22:35:32 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is
	  a relative URI. [Bug #8645]

Wed Jul 24 01:13:02 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* include/ruby/intern.h (rb_f_lambde): restore the declaration of
	  rb_f_lambda() for backword compatibility. and mark it as deprecated.

Tue Jul 23 01:36:43 2013  Zachary Scott  <e@zzak.io>

	* lib/rubygems/psych_additions.rb: Ignore Psych docs here

Tue Jul 23 01:34:00 2013  Koichi Sasada  <ko1@atdot.net>

	* test/test_tracer.rb: catch up recent rubygems changes.

Tue Jul 23 01:28:54 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems: Update to RubyGems 2.0.5.
	  The patch provided by drbrain (Eric Hodel). [ruby-core:55896]
	  [Backport #8617]

	* test/rubygems:  Tests for the above.

Tue Jul 23 00:00:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): use the given file name unless
	  eval even if scope is given.  additional fix for [Bug #8436].
	  based on the patch by srawlins at [ruby-core:56099] [Bug #8662].

Sat Jul 20 23:49:33 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/drb/drbtest.rb (Drb{Core,Ary}#teardown): retry Process.kill
	  if it fails with Errno::EPERM on Windows (workaround).
	  [ruby-dev:47245] [Bug #8251]

Sat Jul 20 23:31:11 2013  Aman Gupta  <tmm1@ruby-lang.org>

	* iseq.c (iseq_location_setup): re-use existing string when iseq has
	  the same path and absolute_path. [Bug #8149]

Sun Jul 14 00:18:08 2013  Zachary Scott  <e@zzak.io>

	* sprintf.c: Fix typo patch by @hynkle [Fixes GH-357]
	  https://github.com/ruby/ruby/pull/357

Sun Jul 14 00:17:07 2013  Zachary Scott  <zachary@zacharyscott.net>

	* man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill

Sun Jul 14 00:15:26 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/logger.rb: Use :call-seq: for method signature rdoc

Sun Jul 14 00:13:01 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/net/http/test_http.rb (TestNetHTTP_v1_2#test_get,
	  TestNetHTTP_v1_2_chunked#test_get): shouldn't check
	  HttpResponse#decode_content if Zlib is not available.
	  ko1 complained via IRC.

Sat Jul 13 23:50:00 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: fixed coding error [ruby-core:55337].
	  reported by Riley Lynch.

Sat Jul 13 23:50:00 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: fixed a bug [ruby-core:55295].  reported
	  by Riley Lynch.

Sat Jul 13 23:41:25 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (date_zone_to_diff): [ruby-core:55831].

Sat Jul 13 23:34:13 2013  Akinori MUSHA  <knu@iDaemons.org>

	* object.c: Fix rdoc for Kernel#<=>. [Fix GH-352]

Sat Jul 13 23:29:51 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#mode_to_s): Define mode_to_s() also
	  as singleton method, or FileUtils.chmod fails in verbose mode.

Sat Jul 13 23:27:12 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): If user
	  and group are both nil, print ":".

Sat Jul 13 23:16:49 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigrsh_bang): Fix bignum digits overrun.

Sat Jul 13 23:16:49 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (biglsh_bang): Fix bignum digits under-run.

Sat Jul 13 22:45:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_DTRACE_POSTPROCESS): dtrace version SUN D 1.11
	  introduces a check in the dtrace compiler to ensure that probes
	  actually exist. If there are no probes, then the -G step will
	  fail. As this test is only being used to determine whether -G is
	  necessary (for instance, on OSX it is not), adding a real probe to
	  the conftest allows it to succeed on newer versions of dtrace.
	  Patch by Eric Saxby <sax AT livinginthepast.org> at
	  [ruby-core:55826].  [Fix GH-351], [Bug #8606].

Sat Jul 13 22:41:20 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* test/openssl/test_x509crl.rb: Remove unused variable.
	  [ruby-core:53501] [Bug #8114]

	  Thanks, Vipul Amler, for pointing this out!

Sun Jul  7 02:00:41 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* lib/openssl/ssl.rb: Fix SSL client connection crash for SAN marked
	  critical.
	  The patch for CVE-2013-4073 caused SSL crash when a SSL server returns
	  the certificate that has critical SAN value.  X509 extension could
	  include 2 or 3 elements in it:

	  [id, criticality, octet_string] if critical,
	  [id, octet_string] if not.

	  Making sure to pick the last element of X509 extension and use it as
	  SAN value.
	  [ruby-core:55685] [Bug #8575]

	  Thank you @nahi for providing the patch!

Sun Jul  7 01:58:25 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): Fix the wrong
	  character class [+-=], which happened to match all desired
	  characters but also match undesired characters.

Sun Jul  7 01:54:44 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): Fix the
	  wrong output message when user is nil, which should be "chown
	  :group file" instead of "chown group file".

Fri Jul  5 00:55:05 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.

	  * [bug]  (thanks Akinori MUSHA and Ippei Obayashi)
	           Fix a renumbering bug in condition regexp with a named
	           capture. [Bug #8583]
	  * [spec] (thanks Akinori MUSHA)
	    Allow ENCLOSE_OPTION in look-behind.

Wed Jul  3 23:31:26 2013  Shota Fukumori  <sorah@cookpad.com>

	* lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
	  (1.9.3 behavior) [ruby-core:55752] [Bug #8595]

Tue Jul  2 03:06:38 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix for the cases when
	  the argument x is not a BigDecimal.
	  This change is based on the patch made by Heesob Park and Garth Snyder.
	  [Bug #6862] [ruby-core:47145]
	  [Fix GH-332] https://github.com/ruby/ruby/pull/332

Fri Jun 28 02:20:13 2013  Aman Gupta  <ruby@tmm1.net>

	* compile.c (iseq_add_mark_object): Use new rb_iseq_add_mark_object().

	* insns.def (setinlinecache): Ditto.

	* iseq.c (rb_iseq_add_mark_object): New function to allocate
	  iseq->mark_ary on demand. [Bug #8142]

	* iseq.h (rb_iseq_add_mark_object): Ditto.

	* iseq.c (prepare_iseq_build): Avoid allocating mark_ary until needed.

	* iseq.c (rb_iseq_build_for_ruby2cext): Ditto.

Thu Jun 27 20:10:56 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl.rb (verify_certificate_identity): fix
	  hostname verification. Patched by nahi.

	* test/openssl/test_ssl.rb (test_verify_certificate_identity): test for
	  above.


Thu Jun 27 13:16:40 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/rubygems/test_gem_installer.rb (test_install_extension_flat):
	  use ruby in build directory in case ruby is not installed.
	  [ruby-core:53265] [Bug #8058]

Wed Jun 26 23:05:34 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if
	  writing a file is slow.
	  [ruby-core:55541] [Bug #8519]

Wed Jun 26 22:42:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: should use expanded values for header directories
	  unless extmk.  patch by vo.x (Vit Ondruch) at [ruby-core:55653]
	  [Bug #8115], rhbz#921650.

Wed Jun 26 02:25:52 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Pass
	  DESTDIR via command line to override what's in MAKEFLAGS.  This
	  fixes an installation problem under a package building
	  environment where DESTDIR is specified in the (parent) command
	  line. [Fixes GH-327]

Tue Jun 25 00:12:19 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: Return value in Array overview example found by @PragTob
	  [Fix GH-336] https://github.com/ruby/ruby/pull/336

Tue Jun 25 00:11:46 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c (rb_ary_zip): typo by @PragTob [Fix GH-337]
	  https://github.com/ruby/ruby/pull/337

Tue Jun 25 00:10:54 2013  Zachary Scott  <zachary@zacharyscott.net>

	* win32/README.win32: grammar typo by @blankenshipz [Fix GH-334]
	  https://github.com/ruby/ruby/pull/334

Sun Jun 23 00:03:18 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string instead
	  of %s and RSTRING_PTR

	* ext/etc/etc.c (etc_getgrnam): ditto

Sat Jun 22 00:54:41 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 2.0.3

	* test/rubygems:  Tests for the above.

	* NEWS:  Added RubyGems 2.0.3 note.

Wed Jun 19 04:20:31 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): ensure methods of type
	  VM_METHOD_TYPE_ATTR_SET are called with 1 argument

	* test/ruby/test_module.rb (class TestModule): add test

	[ruby-core:55543] [Bug #8540]

Wed Jun 19 03:54:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* defs/id.def (predefined): add "idProc".

	* proc.c (mnew, mproc, mlambda): use predefined IDs.

	* vm.c (Init_VM): ditto.

Wed Jun 19 03:54:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/intern.h (rb_block_lambda): add declaration instead of
	  deprecated rb_f_lambda.

Wed Jun 19 03:24:07 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):
	  new function to invoke a method with a block passed
	  as an argument.

	* string.c (sym_call): use the above function to avoid
	  a block sharing. [ruby-dev:47438] [Bug #8531]

	* vm_insnhelper.c (vm_yield_with_cfunc): don't set block
	  in the frame.

	* test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc):
	  run related tests.

Wed Jun 19 03:06:57 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/ruby/test_proc.rb (TestProc#test_block_given_method_to_proc):
	  run test for r41359.

Wed Jun 19 03:06:57 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* include/ruby/intern.h, proc.c (rb_method_call_with_block):
	  new function to invoke a Method object with a block passed
	  as an argument.

	* proc.c (bmcall): use the above function to avoid a block sharing.
	  [ruby-core:54626] [Bug #8341]

	* test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls):
	  run related tests.

Tue Jun 18 02:49:20 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/ruby/envutil.rb (assert_separately): stop_auto_run of
	  Test::Unit::Runner to prevent auto runner use ARGV.

	* test/ruby/envutil.rb (assert_separately): add $: to separate process.

	* test/ruby/envutil.rb (assert_separately): fail if stderr is not
	  empty and ignore_stderr is false.

Tue Jun 18 02:21:54 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/ruby/envutil.rb (EnvUtil.with_default_external): add for
	  changing Encoding.default_external without warnings.

	* test/ruby/envutil.rb (EnvUtil.with_default_internal): ditto.

	* test/ruby/test_io_m17n.rb: use above with_default_external.

Tue Jun 18 00:43:27 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1

Tue Jun 18 00:34:57 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

merge revision(s) 41347: [Backport #5048] [Backport #5465] [Backport #8319]

        * ext/tk/extconf.rb: support s390x (Thanks to bkabrda) [Bug #5465]

	* ext/tk/extconf.rb: apply [Bug #5048]

	* ext/tk/lib/tk/canvas.rb,ext/tk/sample/demos-{en,jp}/{tree.rb,widget}:
	  fix bug (Thanks to zzak) [ruby-trunk - Bug #8319]

Sun Jun 16 01:56:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (FL_SET_EMBED): shared object is frozen even when get
	  unshared.

	* array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.

Sun Jun 16 01:32:26 2013  TAKANO Mitsuhiro <tak@no32.tk>

	* insns.def: fix condition.

Sun Jun 16 01:22:35 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/socket/extconf.rb:  Enable RFC 3542 IPV6 socket options for OS X
	  10.7+.  [ruby-trunk - Bug #8517]

Sun Jun 16 01:11:10 2013  Koichi Sasada  <ko1@atdot.net>

	* compile.c (rb_iseq_compile_node): fix location of a `trace'
	  instruction (b_return event).
	  [ruby-core:55305] [ruby-trunk - Bug #8489]
	  (need a backport to 2.0.0?)

	* test/ruby/test_settracefunc.rb: add a test.

Sun Jun 16 00:30:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): propagate absolute path from the
	  binding if it is given explicitly.  patch by Gat (Dawid Janczak) at
	  [ruby-core:55123]. [Bug #8436]

Wed Jun 12 23:41:21 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.
	  The code is not useless.

Wed Jun 12 23:41:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_yield_setup_block_args): split single parameter
	  if any keyword arguments exist, and then extract keyword arguments.
	  [ruby-core:55203] [Bug #8463]

Wed Jun 12 23:05:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_getc): fix 7bit coderange condition, check if ascii read
	  data instead of read length. [ruby-core:55444] [Bug #8516]

Sun Jun  9 02:27:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (install_dirs, with_destdir): prefix with DESTDIR
	  directories to install only unless bundled extension libraries.
	  [ruby-core:53502] [Bug #8115]

Sun Jun  9 02:17:16 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* class.c (include_modules_at): invalidate method cache if included
	  module contains constants

	* test/ruby/test_module.rb: add test

Sun Jun  9 01:59:39 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

merge revision 40783 (partially): [Backport #8413]

	* win32/Makefile.sub: fix a typo in config.h.

Sun Jun  9 01:38:55 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* intern.h: remove dangling rb_class_init_copy declaration
	  [ruby-core:55120] [Bug #8434]

Sun Jun  9 01:30:57 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (capability_response): should ignore trailing
	  spaces.  Thanks, Peter Kovacs.  [ruby-core:55024] [Bug #8415]

	* test/net/imap/test_imap_response_parser.rb: related test.

Wed Jun  5 00:38:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),
	  (gzreader_gets): check EOF.  [ruby-core:55220] [Bug #8467]

Wed Jun  5 00:32:18 2013  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_require.rb: Remove temporally files in the tests.

	* test/ruby/test_rubyoptions.rb: Ditto.

	* test/logger/test_logger.rb: Ditto.

	* test/psych/test_psych.rb: Ditto.

	* test/readline/test_readline.rb: Ditto.

	* test/syslog/test_syslog_logger.rb: Ditto.

	* test/webrick/test_httpauth.rb: Ditto.

	* test/zlib/test_zlib.rb: Ditto.

Wed Jun  5 00:08:55 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* dir.c (bracket): fix copy-paste error.  When the first and last
	  characters of fnmatch range have different length, fnmatch may
	  have wrongly matched a path that does not really match.
	  Coverity Scan found this bug.

Wed Jun  5 00:04:12 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_quote_unprintable): check if argument is a string.

Tue Jun  4 23:42:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (loaded_feature_path): fix invalid read by index underflow.
	  the beginning of name is also a boundary as well as just after '/'.

Tue Jun  4 23:32:12 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* variable.c (set_const_visibility): use rb_frame_this_func() instead
	  of rb_frame_callee() for getting the name of the called method

	* test/ruby/test_module.rb: add test for private_constant with no args

Tue Jun  4 23:27:24 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* vm_insnhelper.c (vm_callee_setup_keyword_arg,
	  vm_callee_setup_arg_complex): consider a hash argument for keyword
	  only when the number of arguments is more than the expected
	  mandatory parameters.  [ruby-core:53199] [ruby-trunk - Bug #8040]

	* test/ruby/test_keyword.rb: update a test for above.

Tue Jun  4 00:46:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (setup_overlapped, finish_overlapped): extract from
	  rb_w32_read() and rb_w32_write().

Tue Jun  4 00:02:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to
	  be accessible.

Tue Jun  4 00:02:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_intern.h (TH_PUSH_TAG): ensure jmpbuf to be accessible before
	  pushing tag to get rid of unaccessible tag by stack overflow.

Mon Jun  3 23:22:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): forward anonymous and first keyword
	  rest argument one.  [ruby-core:55033] [Bug #8416].

Sun Jun  2 22:39:24 2013  Zachary Scott  <zachary@zacharyscott.net>

	* range.c: Fix rdoc on Range#bsearch [Bug #8242] [ruby-core:54143]

Mon May 20 04:00:48 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/yaml.rb: YAML documentation from #8344 [Bug #8355]

Wed May 15 23:22:09 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* include/ruby/intern.h: should include sys/time.h for struct timeval
	  if it exists. [ruby-list:49363]

Tue May 14 20:21:41 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/config_file.rb:  Lazily load .gem/credentials to only
	  check permissions when necessary.  RubyGems bug #465
	* test/rubygems/test_gem_config_file.rb:  Test for the above.

	* test/rubygems/test_gem_commands_push_command.rb:  Remove duplicated
	  test.

Tue May 14 20:11:00 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/dl/lib/dl/func.rb (DL::Function#call): check tainted when
	  $SAFE > 0.
	* ext/fiddle/function.c (function_call): check tainted when $SAFE > 0.
	* test/fiddle/test_func.rb (module Fiddle): add test for above.


Sun May 12 22:42:25 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (rb_f_kill): fixes typo. s/HAS_KILLPG/HAVE_KILLPG/.

Sun May 12 04:23:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_peek_variable_name): treat invalid global, class,
	  and instance variable names as mere strings rather than errors.
	  [ruby-core:54885] [Bug #8375]

Sun May 12 04:23:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): fail if $, @, @@ are not followed by a valid
	  name character.  [ruby-core:54846] [Bug #8375].

Sun May 12 02:50:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_RM_RECURSIVE): this hack is needed by only
	  autoconf 2.69 or earlier on darwin.

Sun May 12 02:50:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not
	  available on old shells.

	* configure.in (shvar_to_cpp): escape quotes for old shells.
	  [Bug #7959] [Bug #8071]

Thu May  9 23:39:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_included_modules): should not include non-modules.
	  [ruby-core:53158] [Bug #8025]

Thu May  9 23:39:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_included_modules): should not include the original
	  module itself.  [ruby-core:53158] [Bug #8025]

Wed May  8 23:07:19 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (defined): use vm_search_superclass() like as normal super
	  call.  based on a patch <https://gist.github.com/wanabe/5520026> by
	  wanabe.

	* vm_insnhelper.c (vm_search_superclass): return error but not raise
	  exceptions.

	* vm_insnhelper.c (vm_search_super_method): check the result of
	  vm_search_superclass and raise exceptions on error.

Wed May  8 23:07:19 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (defined): get method entry from the method top level
	  frame, not block frame.  [ruby-core:54769] [Bug #8367]

Wed May  8 01:18:41 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (MUL_OVERFLOW_SIGNED_INTEGER_P): New macro.
	  (MUL_OVERFLOW_FIXNUM_P): Ditto.
	  (MUL_OVERFLOW_LONG_P): Ditto.

	* array.c (rb_ary_product): Don't overflow on signed integer
	  multiplication.

	* numeric.c (fix_mul): Ditto.
	  (int_pow): Ditto.

	* rational.c (f_imul): Ditto.

	* insns.def (opt_mult): Ditto.

	* thread.c (sleep_timeval): Don't overflow on signed integer addition.

	* bignum.c (rb_int2big): Don't overflow on signed integer negation.
	  (rb_big2ulong): Ditto.
	  (rb_big2long): Ditto.
	  (rb_big2ull): Ditto.
	  (rb_big2ll): Ditto.

Tue May  7 20:13:12 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/test_thread.rb (invoke_rec): extend timeout 10 -> 50 sec,
	  to investigate test failure on rubyci.
	  http://a.mrkn.jp/~mrkn/chkbuild/mountain_lion/ruby-2.0.0-m64-o0/log/20130507T052909Z.log.html.gz

Sat May  4 23:48:56 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/security.rdoc: Add note about reporting security vulns

Sat May  4 23:44:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_is_kind_of): skip prepending modules.
	  [ruby-core:54742] [Bug #8357]

	* object.c (rb_class_inherited_p): ditto.
	  [ruby-core:54736] [Bug #8357]

Thu May  2 23:39:45 2013  Tanaka Akira  <akr@fsij.org>

	* thread.c (double2timeval): convert the infinity to TIME_MAX to avoid
	  SEGV by Thread.new {}.join(Float::INFINITY) on
	  Debian GNU/Linux (amd64).

Thu May  2 00:30:00 2013  Tanaka Akira  <akr@fsij.org>

	* thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
	  This fixes a compilation failure while cross-compiling for Tensilica
	  Xtensa Processor.

Thu May  2 00:19:46 2013  Tanaka Akira  <akr@fsij.org>

	* dir.c (dir_set_pos): Fix a compilation error when seekdir() is not
	  exist.

Thu May  2 00:16:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* README.EXT: correct method name to be used.  [Bug #7982]

	* README.EXT.ja: add notes too.

Thu May  2 00:16:36 2013  Zachary Scott  <zachary@zacharyscott.net>

	* README.EXT: Copy note from r40505 for rb_sprintf() [Bug #7982]

Thu May  2 00:16:36 2013  Zachary Scott  <zachary@zacharyscott.net>

	* README.EXT: Update note from r40504, by Jeremy Evans [Bug #7982]

Thu May  2 00:16:36 2013  Zachary Scott  <zachary@zacharyscott.net>

	* README.EXT: Add note to warn use of %i in Exceptions [Bug #7982]

Wed May  1 23:35:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_ext_int_to_encs, parse_mode_enc): bom-prefixed name is
	  not a real encoding name, just a fallback.  so the proper conversion
	  should take place even if if the internal encoding is equal to the
	  bom-prefixed name, unless actual encoding is equal to the internal
	  encoding.  [ruby-core:54563] [Bug #8323]

	* io.c (io_set_encoding_by_bom): reset extenal encoding if no BOM
	  found.  [ruby-core:54569]

Sat Apr 27 02:12:14 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_fd_fix_cloexec): use rb_update_max_fd().

Sat Apr 27 02:12:14 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_update_max_fd): use ATOMIC_CAS because this function
	  is used from timer thread too.

Sat Apr 27 01:57:43 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* configure.in: use quadrigraphs. workaround for autoconf 2.64.
	  a patch provided by Hessob Park. [ruby-core:53157] [Backport #8020]

Sat Apr 27 00:39:28 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_inspect): refix r40413, on Ruby 1.9 usual character
	  escape uses hex/Unicode escapes, so fix to use Unicode escape on
	  Unicode strings and hex on others. [ruby-core:54458] [Bug #8290]

Sat Apr 27 00:39:28 2013  Akinori MUSHA  <knu@iDaemons.org>

	* test/ruby/test_module.rb
	  (TestModule#test_const_get_invalid_name)
	  (test_const_defined_invalid_name): Fix expected values.

Sat Apr 27 00:39:28 2013  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_inspect): NUL should not be represented as "\0"
	  when octal digits may follow.  [ruby-core:54458] [Bug #8290]

Fri Apr 26 23:48:58 2013  Tanaka Akira  <akr@fsij.org>

	* thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
	  This fixes a compilation failure while cross-compiling for ARM.

Fri Apr 26 23:32:09 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/atom.rb (RSS::Atom::Entry): Fix indent of document comment.

Fri Apr 26 23:32:09 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/maker.rb (RSS::Maker): Fix indent of document comment.

Fri Apr 26 23:32:09 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/rss/atom.rb: Documentation for RSS::Atom based on a patch by
	  Michael Denomy
	* lib/rss/maker.rb: Documentation for RSS::Maker also by @mdenomy

Thu Apr 25 00:40:41 2013  Zachary Scott  <zachary@zacharyscott.net>

	* numeric.c: Fix wiki link on Float imprecision in overview, patched
	  by Makoto Kishimoto [Bug #8304] [ruby-dev:47280]

Thu Apr 25 00:39:16 2013  Zachary Scott  <zachary@zacharyscott.net>

	* string.c: Document String#setbyte return value by @gjmurakami-10gen
	  [Fixes GH-294]

Thu Apr 25 00:38:06 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]

Tue Apr 23 23:06:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_mod_public_method): fix visibility on anonymous
	  module. set visibility of singleton method, not method in base
	  class.  [ruby-core:54404] [Bug #8284]

Tue Apr 23 22:33:16 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (getacl_response): parse the mailbox of an ACL
	  response correctly.  [ruby-core:54365] [Bug #8281]

Sun Apr 21 00:14:36 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
	  RUBY_PLATFORM should escape as Regexp,
	  because RUBY_PLATFORM may contain '.'.

Sun Apr 21 00:14:36 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
	  fix load path for encoding to run the test as stand-alone.

Sun Apr 21 00:14:36 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* load.c (features_index_add): use rb_str_subseq() to specify C string
	  position properly to fix require non ascii path.
	  [ruby-core:53733] [Bug #8165]

	* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
	  a test for the above.

Sun Apr 21 00:13:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (rb_feature_p), vm_core.h (rb_vm_struct): turn
	  loaded_features_index into st_table.  patches by tmm1 (Aman Gupta)
	  in [ruby-core:53251] and [ruby-core:53274] [Bug #8048]

Sun Apr 21 00:13:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (features_index_add_single, rb_feature_p): store single index
	  as Fixnum to reduce the number of arrays for the indexes.  based on
	  the patch by tmm1 (Aman Gupta) in [ruby-core:53216] [Bug #8048].

Sat Apr 20 23:32:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): should skip dot directories only for recursion,
	  but should not if matching to the given pattern.  [ruby-core:54387]
	  [Bug #8283]

Sat Apr 20 02:37:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/curses/curses.c (Init_curses): fix implementation function,
	  crmode should be same as cbreak.  [ruby-core:54013] [Bug #8222]

Sat Apr 20 02:09:46 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl_ssl.c: Correct shutdown behavior w.r.t GC.

	* test/openssl/test_ssl.rb: Add tests to verify correct behavior.

	[Bug #8240] Patch provided by Shugo Maeda. Thanks!

Sat Apr 20 01:56:32 2013  Yuki Yugui Sonoda  <yugui@google.com>

	* thread_pthread.c (ruby_init_stack): Avoid using uninitialized value.
	  stackaddr and size are not set if get_stack() fails.

Sat Apr 20 01:47:31 2013  Yuki Yugui Sonoda  <yugui@google.com>

	* thread_pthread.c: Fixes wrong scopes of #if USE_SLEEPY_TIMER_THREAD
	  .. #endif sections.  This fixes a build error on NativeClient.

Sat Apr 20 01:31:38 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
	  [bug] fix problem with optimization of \z (Issue #16) [Bug #8210]

Sat Apr 20 01:18:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_keyword_arg): non-symbol key is not
	  a keyword argument, keep it as a positional argument.

Sat Apr 20 01:14:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_mutex_synchronize_m): yield no block params.  patch by
	  splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
	  fix GH-266.

Sat Apr 20 00:41:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): append keyword hash to argument array
	  to splat if needed.  [ruby-core:54094] [Bug #8236]

Sat Apr 20 00:31:57 2013  Kouhei Sutou  <kou@cozmixng.org>

	* README.EXT.ja (Data_Wrap_Struct): Remove a description about
	  orphan argument. Oh, I renamed the argument name without
	  changing description at r36180... Sorry....
	  Patch by Makoto Kishimoto. Thanks!!! [ruby-dev:47269] [Bug #8292]
	* README.EXT.ja (Data_Make_Struct): Add a sample code that describes
	  how it works.
	  Patch by Makoto Kishimoto. Thanks!!! [ruby-dev:47269] [Bug #8292]

Tue Apr 16 01:30:47 2013  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: set ac_cv_prog_cxx if CXX is supplied.

Tue Apr 16 01:30:47 2013  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: Fix c++ compiler auto-selection not only for
	  Darwin 11.x, but also the other versions of Darwin.

Tue Apr 16 00:27:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): fix of defined? with empty
	  expression.  [ruby-core:53999] [Bug #8220]

Mon Apr 15 00:25:00 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (num_exact): use to_r method only if to_int method is
	  available.
	  [ruby-core:53764] [Bug #8173] reported by Hiro Asari.

Mon Apr 15 00:22:09 2013  Shota Fukumori  <her@sorah.jp>

	* ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.
	  [Bug #8116] [ruby-dev:47177]

Mon Apr 15 00:15:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (HAVE_METACLASS_P): should check FL_SINGLETON flag before get
	  instance variable to get rid of wrong warning about __attached__.
	  [ruby-core:53839] [Bug #8188]

Mon Apr 15 00:13:13 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/file.c (code_page): use cp1252 instead of cp20127 as US-ASCII.
	  fix [ruby-core:53079] [Bug #7996]
	  reported and patched by mmeltner (Michael Meltner).

Mon Apr 15 00:07:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/io.h: undef POSIX compliant names on AIX, which are no
	  longer needed.  patch suggested by edelsohn (David Edelsohn) in
	  [ruby-core:53815].  [Bug #8174]

Mon Apr 15 00:07:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/io.h: rename SVR3,4 member names as POSIX compliant,
	  to get rid of conflict on AIX.  [ruby-core:53765] [Bug #8174]

Sun Apr 14 23:49:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (configuration): not include all CFLAGS in CXXFLAGS, to
	  use different set than C for C++.  [ruby-core:45273] [Bug #6504]

Sun Apr 14 23:43:06 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/fiddle/closure.c (initialize): check mprotect's return value.
	  If mprotect is failed because of PaX or something, its function call
	  will cause SEGV.
	  http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130401T210301Z.diff.html.gz

Sun Apr 14 23:19:55 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MAIN_DOES_NOTHING): ensure symbols for tests to be
	  preserved.  [ruby-core:53745] [Bug #8169]

Sun Apr 14 23:19:55 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MAIN_DOES_NOTHING): force to refer symbols for tests
	  to be preserved.  [ruby-core:53745] [Bug #8169]

Sun Apr 14 03:00:51 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.

	* ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or
	  earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228]

Sun Apr 14 02:32:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (GetTimeval): check if already initialized instance.

	* time.c (GetNewTimeval): check if newly created instance.

	* time.c (time_init_0, time_init_1, time_init_copy, time_mload): must
	  be newly created instance.  [ruby-core:53436] [Bug #8099]

Sun Apr 14 02:13:25 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* vm_eval.c (check_funcall_respond_to): preserve passed_block, which
	  is modified in vm_call0_body() via vm_call0(), and caused a bug of
	  rb_check_funcall() by false negative result of rb_block_given_p().
	  re-fix [ruby-core:53650] [Bug #8153].
	  [ruby-core:53653] [Bug #8154]

Fri Apr 12 04:16:30 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* marshal.c (marshal_dump, marshal_load): workaround for segv on
	  Intel Solaris compiled with Oracle SolarisStudio 12.3.
	  Partly revert r38174. [ruby-core:52042] [Bug #7805]

Fri Apr 12 04:12:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_conv_enc_opts): convert with one converter, instead
	  of re-creating converters for each buffer expansion.

Fri Apr 12 03:48:25 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (find_library): fix to format message.
	  [ruby-core:53568] [Bug #8130]

Fri Apr 12 03:44:45 2013  Narihiro Nakamura  <authornari@gmail.com>

	* proc.c (bm_free): need to clean up the mark flag of a free and
	  unlinked method entry. [Bug #8100] [ruby-core:53439]

Fri Apr 12 02:27:42 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c: use more generic type:
	  * u_char -> unsigned char
	  * u_short -> unsigned short
	  * u_int -> unsigned int
	  * u_long -> unsigned long
	  * quad_t -> int64_t
	  * u_quad_t -> uint64_t

	* addr2line.c (imax): inline is defined by configure.

Fri Apr 12 02:27:42 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* addr2line.c: quad_t and u_quad_t is not available on Solaris.
	  __inline is not available with old compilers on Solaris.
	  [ruby-dev:47229] [Bug #8227]

Fri Apr 12 02:27:42 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* addr2line.c (putce): suppress unused return value warning.

Fri Apr 12 02:27:42 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c (kprintf): added from FreeBSD libstand's printf.
	  this is consided as async signal safe function.

	* addr2line.c (rb_dump_backtrace_with_lines): use kfprintf.
	  [Bug #8144] [ruby-core:53632]

Fri Apr 12 02:27:42 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c (rb_dump_backtrace_with_lines): output line at once.

Fri Apr 12 02:10:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_export_method): directly override the flag of method
	  defined in prepending class too, not adding zsuper entry.
	  [ruby-core:53106] [Bug #8005]

Fri Apr 12 01:57:52 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/fileutils.rb:  Revert r34669 which altered the way
	  metaprogramming in FileUtils occurred.  [ruby-trunk - Bug #7958]

	* test/fileutils/visibility_tests.rb:  Refactored tests of FileUtils
	  options modules to expose bug found in #7958
	* test/fileutils/test_dryrun.rb:  ditto.
	* test/fileutils/test_nowrite.rb:  ditto.
	* test/fileutils/test_verbose.rb:  ditto.

Fri Apr 12 01:28:46 2013  Luis Lavena  <luislavena@gmail.com>

	* win32/file.c (get_user_from_path):  add internal function that retrieves
	  username from supplied path (refactored).
	* win32/file.c (rb_file_expand_path_internal):  refactor expansion of user
	  home to use get_user_from_path and cover dir_string corner cases.
	  [ruby-core:53168] [Bug #8034]

Fri Apr 12 01:28:46 2013  Luis Lavena  <luislavena@gmail.com>

	* win32/file.c (rb_file_expand_path_internal):  Expand home directory when
	  used as second parameter (dir_string).  [ruby-core:53168] [Bug #8034]
	* test/ruby/test_file_exhaustive.rb: add test to verify.

Mon Apr  8 00:10:59 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: Fix unlimited memory growth with large values of
	  RUBY_FREE_MIN. patched by tmm1(Aman Gupta).
	  [Bug #8095] [ruby-core:53405]

Sun Apr  7 22:27:12 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: Avoid unnecessary heap growth. patched by tmm1(Aman Gupta).
	  [Bug #8093] [ruby-core:53393]

Sun Apr  7 03:01:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (simple_re_meta): escape all closing characters, not only
	  round parenthesis.  [ruby-core:53578] [Bug #8133]

Sun Apr  7 02:54:40 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: Improve accuracy of objspace_live_num() and
	  allocated/freed counters. patched by tmm1(Aman Gupta).
	  [Bug #8092] [ruby-core:53392]

Fri Apr  5 00:54:08 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_bn.c (ossl_bn_initialize): fix can't create from bn.

Thu Apr  4 02:27:12 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv-replace.rb (TCPSocket#initialize): resolve the 3rd
	  argument only if non-nil value is given.
	  [ruby-dev:47150] [ruby-trunk - Bug #8054] reported and analyzed by
	  mrkn.

Thu Apr  4 02:24:59 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* Merge Onigmo d4bad41e16e3eccd97ccce6f1f96712e557c4518.
	  fix lookbehind assertion fails with /m mode enabled. [Bug #8023]
	  fix \Z matches where it shouldn't. [Bug #8001]

Thu Apr  4 02:11:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_extended): check for prepended object.
	  [ruby-core:53206] [Bug #8043]

Wed Mar 27 03:02:30 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_exec.c: Correct predefined macro name. This typo is introduced by
	  r36534 and should be backported to ruby_2_0_0.

Wed Mar 27 02:58:44 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
	  v5.13.3 [Bug#7972] [Bug#7974]

Wed Mar 27 02:53:53 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb: move entity_expansion_text_limit accessor to ...
	* lib/rexml/rexml.rb: ... here to make rexml/text independent from
	  REXML::Document. It causes circular require.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  deprecated.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit=):
	  deprecated.
	* lib/rexml/text.rb: add missing require "rexml/rexml" for
	  REXML.entity_expansion_text_limit.
	  Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961]

Wed Mar 27 02:50:45 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* object.c (Init_Object): remove Module#used, which has been
	  introduced in Ruby 2.0 by mistake.  [Bug #7916] [ruby-core:52719]

Mon Mar 25 02:02:15 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: edited rdoc.
	* rational.c: ditto.

Mon Mar 25 02:02:15 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: described syntax of string form.
	* rational.c: ditto.

Mon Mar 25 01:26:26 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/webrick/httpproxy.rb: Fix typos in HTTPProxyServer [Bug #8013]
	  Patch by Nobuhiro IMAI [ruby-core:53127]

Mon Mar 25 01:09:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): pass keyword arguments to zsuper,
	  with current values.  [ruby-core:53114] [Bug #8008]

Mon Mar 25 01:05:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/objspace/objspace.c (count_nodes): count also newly added nodes,
	  and fix key for unknown node.  patch by tmm1 (Aman Gupta) in
	  [ruby-core:53130] [Bug #8014]

Mon Mar 25 01:00:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_prepend_module): check redefinition of built-in optimized
	  methods.  [ruby-dev:47124] [Bug #7983]

	* vm.c (rb_vm_check_redefinition_by_prepend): ditto.

Mon Mar 25 00:51:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
	  must appear after object files with newer versions of gcc.  patch by
	  tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Mon Mar 25 00:47:04 2013  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (iseq_data_to_ary): fix condition.
	  r34303 introduces a bug to avoid all line information from
	  a result of ISeq#to_a. This is a regression problem from 2.0.0p0.

	* test/ruby/test_iseq.rb: add a test of lines after ISeq#to_a.

Mon Mar 25 00:41:23 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/mkconfig.rb: reconstruct comma separated list values.  a
	  command line to Windows batch file is split not only by spaces
	  and equal signs but also by commas and semicolons.

Wed Mar 20 23:21:14 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/rubygems/test_gem_installer.rb (test_install_extension_flat):
	  use ruby in build directory in case ruby is not installed.
	  [ruby-core:53265] [Bug #8058]

Wed Mar 20 23:17:33 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup):
	  allow using different root for source and build directories.
	  this may fixes a minor problem of r39834.

Wed Mar 20 23:17:33 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use
	  relative path to get rid of "too long commandline" error.

Wed Mar 20 23:17:33 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_err_in_callback.rb
	  (TestErrInCallBack#test_err_in_callback): shouldn't create a file in
	  the top of build directory.

Wed Mar 20 23:08:40 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/missing.h: removed __linux__. it's unnecessary.

Wed Mar 20 23:03:27 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: move OS specific header/function knowledge before
	  automatic header tests.

Wed Mar 20 23:01:42 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: move header files check to the beginning of
	  "header and library section".
	  test rlim_t with sys/types.h and sys/time.h for MirOS BSD.
	  sys/types.h and sys/time.h is gurded by #ifdef and the above move
	  is required for this change.

Wed Mar 20 22:57:27 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: move the test for -march=i486 just after
	  RUBY_UNIVERSAL_ARCH/RUBY_DEFAULT_ARCH.

Wed Mar 20 22:56:07 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: change CFLAGS temporally to test
	  ARCH_FLAG="-march=i486".

Wed Mar 20 22:54:33 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: don't define ARCH_FLAG="-march=i486" if it causes
	  compilation problem.

Wed Mar 20 22:36:41 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c: disabled _FORTIFY_SOURCE for avoid to hit glibc bug.
	  [Bug #8080] [ruby-core:53349]
	* test/ruby/test_io.rb (TestIO#test_io_select_with_many_files):
	  test for the above.

Wed Mar 20 22:34:52 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/missing.h (__syscall): moved to...
	* io.c: here. because __syscall() is only used from io.c.

	* include/ruby/missing.h: move "#include <sys/type.h>" to ....
	* include/ruby/intern.h: here. because it was introduced for
	  fixing NFDBITS issue. [ruby-core:05179].

Wed Mar 20 22:33:26 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/missing.h (struct timespec): include <sys/time.h>

Wed Mar 20 22:33:26 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: check struct timeval exist or not.
	* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
	  properly. and don't include sys/time.h if struct timeval exist.

	* file.c: include sys/time.h explicitly.
	* random.c: ditto.
	* thread_pthread.c: ditto.
	* time.c: ditto.
	* ext/date/date_strftime.c: ditto.

Mon Mar 18 00:12:28 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/setup_command.rb:  Don't delete non-rubygems
	  files when installing RubyGems.
	* test/rubygems/test_gem_commands_setup_command.rb:  Test for the
	  above.

	* lib/rubygems/ext/ext_conf_builder.rb:  Use full path to siteconf.rb
	  in case the extconf.rb changes directories (like memcached does).

	* lib/rubygems/package.rb:  Remove double slash from path.
	* test/rubygems/test_gem_package.rb:  Test for the above.
	* test/rubygems/test_gem_package_old.rb:  ditto.

	* lib/rubygems/source.rb:  Revert automatic HTTPS upgrade
	* lib/rubygems/spec_fetcher.rb:  ditto.
	* test/rubygems/test_gem_remote_fetcher.rb:  ditto.
	* test/rubygems/test_gem_source.rb:  ditto.
	* test/rubygems/test_gem_spec_fetcher.rb:  ditto.

Mon Mar 18 00:11:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  it is impossible to predict which file will be installed to where,
	  by the arguments, so use intermediate destination directory always.
	  [Bug #7698]

Mon Mar 18 00:11:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  it is impossible to predict which file will be installed to where,
	  by the arguments, so use intermediate destination directory always.
	  [Bug #7698]

Mon Mar 18 00:05:50 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/setup_command.rb:  Install .pem files.
	* test/rubygems/test_gem_commands_setup_command.rb:  Test for the
	  above.

	* lib/rubygems/spec_fetcher.rb:  Test HTTPS upgrade with URI::HTTPS,
	  not URI::HTTP.  Fixes bug in automatic HTTPS upgrade.
	* test/rubygems/test_gem_spec_fetcher.rb:  Test for the above.

	* lib/rubygems.rb:  Version 2.0.2

	* lib/rubygems/test_utilities.rb:  Ensure scheme and uri class match.

Mon Mar 18 00:03:27 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/test_require.rb:  Fix tests when 'a.rb' exists.
	  [ruby-trunk - Bug #7749]

Mon Mar 18 00:02:27 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Allow specification of directory permissions.
	  [ruby-trunk - Bug #7713]
	* test/rubygems/test_gem.rb:  Test for the above.

Mon Mar 18 00:00:32 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/test_gem_spec_fetcher.rb:  Removed unused variable.

Mon Mar 18 00:00:32 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/query_command.rb:  Only fetch remote specs when
	  showing details.  [ruby-trunk - Bug #8019]  RubyGems bug #487
	* lib/rubygems/remote_fetcher.rb:  ditto.
	* lib/rubygems/security/policy.rb:  ditto.
	* test/rubygems/test_gem_commands_query_command.rb:  Test for the
	  above.

	* lib/rubygems/security.rb:  Make OpenSSL optional for RubyGems.
	* lib/rubygems/commands/cert_command.rb:  ditto.

	* lib/rubygems/config_file.rb:  Display file with YAML error, not
	  ~/.gemrc

	* lib/rubygems/remote_fetcher.rb:  Only create gem subdirectories when
	  installing gems.
	* lib/rubygems/dependency_resolver.rb:  ditto.
	* lib/rubygems/test_utilities.rb:  ditto.
	* test/rubygems/test_gem_commands_fetch_command.rb:  Test for the
	  above.

	* lib/rubygems/spec_fetcher.rb:  Only try to upgrade
	  http://rubygems.org to HTTPS
	* test/rubygems/test_gem_spec_fetcher.rb:  Test for the above.

	* lib/rubygems.rb:  Update win_platform? check for JRuby compatibility.

	* test/rubygems/test_gem_installer.rb:  Update for Ruby 1.9.2
	  compatibility

Sun Mar 17 23:53:19 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Bump version to 2.0.1 for upcoming bugfix release

	* lib/rubygems/ext/ext_conf_builder.rb:  Restore ruby 1.8 compatibility
	  for [Bug #7698]
	* test/rubygems/test_gem_installer.rb:  Ditto.

	* lib/rubygems/package.rb:  Restore ruby 1.8 compatibility.

	* test/rubygems/test_gem_dependency_installer.rb:  Fix warnings

Sun Mar 17 23:36:05 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/available_set.rb:  Undent for style

	* lib/rubygems/dependency_installer.rb:  Pick latest prerelease gem to
	  install.  Fixes RubyGems bug #468.
	* test/rubygems/test_gem_dependency_installer.rb:  Test for the above.

	* lib/rubygems/dependency_installer.rb:  Don't display "Done installing
	  documentation" if documentation will not be installed.
	* lib/rubygems/rdoc.rb:  ditto

	* lib/rubygems/dependency_list.rb:  Use Array#concat for Ruby 1.x
	  performance.

	* lib/rubygems/installer.rb:  Use formatted program name when comparing
	  executables.  RubyGems pull request #471
	* test/rubygems/test_gem_installer.rb:  Test for the above.

	* lib/rubygems/package.rb:  Use more explicit feature check to work
	  around JRuby bug #552

	* lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem:  Added GeoTrust root
	  certificate.

	* test/rubygems/test_gem_source_list.rb:  Use "example" instead of real
	  hostname

Sun Mar 17 23:28:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  clear DESTDIR so RUBYARCHDIR and RUBYLIBDIR are not be overrdden.
	  [Bug #7698]

Sun Mar 17 23:26:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  fix for unusal cases again.  install to a temporary directory once
	  and move instaled files to the destination directory, if it is same
	  as the current directory.  [Bug #7698]

Sun Mar 17 23:22:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb
	  (Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
	  circular dependencies in install-so too.  [ruby-core:52882]
	  [Bug #7698]

Sun Mar 17 23:19:34 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  revert use of temporary directory for build, to work some buggy
	  extconf.rb which cannot build outside the source directory.
	  [ruby-core:53056] [Bug #7698]

Sun Mar 17 23:11:35 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/ext/builder.rb:  Fix incompatibilities when installing
	  extensions.  Patch by Nobu.
	  [ruby-trunk - Bug #7698] [ruby-trunk - Bug #7971]
	* lib/rubygems/ext/ext_conf_builder.rb:  ditto.
	* lib/rubygems/installer.rb:  ditto.
	* test/rubygems/test_gem_ext_ext_conf_builder.rb:  Test for the above.
	* test/rubygems/test_gem_installer.rb:  ditto.

	* lib/rubygems/commands/sources_command.rb:  Prefer HTTPS over HTTP.
	* lib/rubygems/defaults.rb:  ditto
	* lib/rubygems/dependency_resolver.rb:  Ditto.
	* lib/rubygems/source.rb:  ditto.
	* lib/rubygems/spec_fetcher.rb:  ditto.
	* lib/rubygems/specification.rb:  ditto.
	* lib/rubygems/test_utilities.rb:  ditto.
	* test/rubygems/test_gem.rb:  Test for the above.
	* test/rubygems/test_gem_commands_sources_command.rb:  ditto.
	* test/rubygems/test_gem_dependency_resolver_api_set.rb:  ditto.
	* test/rubygems/test_gem_remote_fetcher.rb:  ditto.
	* test/rubygems/test_gem_source.rb:  ditto.
	* test/rubygems/test_gem_spec_fetcher.rb:  ditto.

Tue Mar 12 00:56:19 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/thread/test_queue.rb (TestQueue#test_thr_kill): reduce
	  iterations from 2000 to 250. When running on uniprocessor
	  systems, every th.kill needs TIME_QUANTUM_USEC time (i.e.
	  100msec on posix systems). Because, "r.read 1" is 3 steps
	  operations that 1) release GVL 2) read 3) acquire gvl and
	  (1) invoke context switch to main thread. and then, main
	  thread's th.kill resume (1), but not (2). Thus read interrupt
	  need TIME_QUANTUM_USEC. Then maximum iteration is 30sec/100msec
	  = 300.

Tue Mar 12 00:53:34 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* process.c (setup_communication_pipe): remove unused function.
	  it was unintentionally added r39683.

Tue Mar 12 00:53:34 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (ARRAY_SIZE): new.
	* thread_pthread.c (gvl_acquire_common): use low priority
	  notification for avoiding timer thread interval confusion.
	  If we use timer_thread_pipe[1], every gvl_yield() request
	  one more gvl_yield(). It lead to thread starvation.
	  [Bug #7999] [ruby-core:53095]
	* thread_pthread.c (rb_reserved_fd_p): adds timer_thread_pipe_low
	  to reserved fds.

Tue Mar 12 00:53:34 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (rb_thread_wakeup_timer_thread_fd): add fd
	  argument and remove hardcoded dependency of timer_thread_pipe[1].
	* thread_pthread.c (consume_communication_pipe): add fd argument.
	* thread_pthread.c (close_communication_pipe): ditto.

	* thread_pthread.c (timer_thread_sleep): adjust the above changes.

	* thread_pthread.c (setup_communication_pipe_internal): factor
	  out pipe initialize logic.

Tue Mar 12 00:53:34 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (rb_thread_create_timer_thread): factor out
	  creating communication pipe logic into separate function.
	* thread_pthread.c (setup_communication_pipe): new helper function.
	* thread_pthread.c (set_nonblock): moves a definition before
	  setup_communication_pipe.

Tue Mar 12 00:53:34 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (consume_communication_pipe): retry when
	  read returned CCP_READ_BUFF_SIZE.

Tue Mar 12 00:53:34 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (set_nonblock): new helper function for set
	  O_NONBLOCK.
	* thread_pthread.c (rb_thread_create_timer_thread): set O_NONBLOCK
	  to timer_thread_pipe[0] too.

Tue Mar 12 00:51:23 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (timer_thread_sleep): use poll() instead of
	  select(). select doesn't work if timer_thread_pipe[0] is
	  greater than FD_SETSIZE.
	* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): add a dependency
	  against poll.

Tue Mar 12 00:51:23 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
	  ifdef condtions.

Mon Mar 11 01:16:12 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (unexpand_shvar): get rid of non-portable shell
	  behavior on OpenBSD, so no extra quotes.  [Bug #7959]

Mon Mar 11 01:12:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just
	  after method definition without a parenthesis.  [ruby-core:52820]
	  [Bug #7942]

Mon Mar 11 01:09:23 2013  Zachary Scott  <zachary@zacharyscott.net>

	* error.c: clarify reason for sleep in SignalException example

Mon Mar 11 01:09:23 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* error.c: clarify a document of SignalException. Process.kill()
	  doesn't have any guarantee when signal will be delivered.
	  [Bug #7951] [ruby-core:52864]

Mon Mar 11 01:04:54 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (str_byte_substr): don't set coderange if it's not known.
	  [Bug #7954] [ruby-dev:47108]

Mon Mar 11 00:58:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (realclean-local): miniprelude.c is made by srcs, so it
	  should not removed by distclean but by realclean.  [Bug #6807]

Mon Mar 11 00:54:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/depend (ARFLAGS): VisualC++ linker does not allow spaces between
	  output option and the output file name.  [Bug #7950]

	* enc/depend (RANLIB): set default command to do nothing, or make the
	  entire line a label on Windows.

Mon Mar 11 00:50:21 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Document Thread::new, clean up ::fork and mention calling
	  super if subclassing Thread

Mon Mar 11 00:47:47 2013  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in (unexpand_shvar): Use the numeric comparison
	  operator instead of '==' which is a ksh extention. [Bug #7941]

Sun Mar 10 00:01:07 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:52303]

Sat Mar  9 23:55:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rb_random_ulong_limited): limit is inclusive, but generic
	  rand method should return a number less than it, so increase for the
	  difference.  [ruby-core:52779] [Bug #7935]

Sat Mar  9 23:51:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rb_random_ulong_limited): fix error message for negative
	  value.  [ruby-dev:47061] [Bug #7903]

Sat Mar  9 23:41:11 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Document ThreadGroup::Default

Sat Mar  9 23:31:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): block level control frame does not
	  have method entry, so obtain the method entry from method top-level
	  control frame to be compared with refined method entry.
	  [ruby-core:52750] [Bug #7925]

Sat Mar  9 23:15:06 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (sigsegv): suppress unused result warning. Because
	  write(2) is marked __warn_unused_result__ on Linux glibc.

Sat Mar  9 23:08:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_set_arguments): no keyword check if any keyword rest
	  argument exists, even unnamed.  [ruby-core:52744] [Bug #7922]

Sat Mar  9 22:50:28 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: Document #<=> return values and formatting
	* bignum.c: ditto
	* file.c: ditto
	* object.c: ditto
	* numeric.c: ditto
	* rational.c: ditto
	* string.c: ditto
	* time.c: ditto

Sat Mar  9 22:45:01 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order
	  [RubySpec #7803]

Sat Mar  9 22:38:26 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c (rb_obj_comp): Documenting Object#<=> return values
	  Patch by Stefan Rusterholz

Sat Mar  9 22:35:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (file_s_fnmatch, fnmatch_brace): encoding-incompatible pattern
	  and string do not match, instead of exception.  [ruby-dev:47069]
	  [Bug #7911]

Sat Mar  9 22:18:43 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/test_rbconfig.rb (TestRbConfig): fix r39372.
	  It must see RbConfig::CONFIG instead of CONFIG.

Sat Mar  9 22:18:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/test_rbconfig.rb (TestRbConfig): skip user defined values by
	  configuration options.  [Bug #7902]

Sat Mar  9 22:07:53 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  fix a typo in comment in r39384.

Sat Mar  9 21:52:19 2013  Zachary Scott  <zachary@zacharyscott.net>

	* numeric.c: Examples and formatting for Numeric and Float
	  Based on a patch by Zach Morek and Oren K of newhaven.rb
	  [Github documenting-ruby/ruby#5]

Sat Mar  9 21:46:41 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/globals.rdoc:  Document what setting $DEBUG does.

	* doc/globals.rdoc:  Added pointer to $-d for full documentation.

Sat Mar  9 21:45:38 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/globals.rdoc:  Document what setting $VERBOSE does.  [Bug #7899]

	* doc/globals.rdoc:  Added pointer to $-w and $-v for full
	  documentation.

Sat Mar  9 21:29:45 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Sat Mar  9 21:29:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* signal.c (check_stack_overflow): extract duplicated code and get rid
	  of declaration-after-statement.  [Bug #5014]

Sat Mar  9 21:29:45 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (sigsegv): avoid to use async signal unsafe functions
	  when nested sigsegv is happen.
	  [Bug #5014] [ruby-dev:44082]

Sat Mar  9 21:25:45 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (rb_group_member): added an error check. SUS says,
	  getgroups(small_value) may return EINVAL.

Sat Mar  9 21:23:36 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* process.c (RB_MAX_GROUPS): moved to
	* internal.h (RB_MAX_GROUPS): here.

	* file.c (rb_group_member): use RB_MAX_GROUPS instead of
	  RUBY_GROUP_MAX. They are the same.

Sat Mar  9 21:15:39 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (access_internal): removed.
	* file.c (rb_file_readable_real): use access() instead of
	  access_internal().
	* file.c (rb_file_writable_real): ditto.
	* file.c (rb_file_executable_real): ditto.

Wed Mar  6 22:13:38 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

merge revision(s) 39297: [Backport #8032]

	* tool/mkconfig.rb: clear exec_prefix which may differ from prefix,
	  before expanding rubyarchdir to remove prefix.

Tue Mar  5 01:20:39 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/merger.rb: add interaction when only ChangeLog is modified.

Tue Mar  5 01:03:16 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (rb_group_member): get rid of NGROUPS dependency.
	  [Bug #7886] [ruby-core:52537]

Tue Mar  5 00:16:56 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl.c (class OpenSSL):  Use only inner parenthesis in
	  create_extension examples.

Tue Mar  5 00:16:56 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl.c (class OpenSSL):  Fixed ExtensionFactory example.
	  Patch by Richard Bradley.  [ruby-trunk - Bug #7551]

Mon Mar  4 23:53:18 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	(merge r39291)
	* configure.in (opt-dir): remove debug print.

Mon Mar  4 23:42:34 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/psych/lib/psych/y.rb: Document Kernel#y by Adam Stankiewicz
	  [Github tenderlove/psych#127]

Mon Mar  4 23:37:14 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/mkconfig.rb: remove prefix from rubyarchdir.
	  r39267 expands variables, it changes expansion timing,
	  breaks RbConfig::CONFIG["includedir"] and building
	  extension libraries with installed ruby.

Sun Mar  3 02:45:13 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (ENV_IN_HEAP_P): fix off-by-one error.

Sun Mar  3 02:39:01 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/ruby/test_thread.rb: fixed typo
	  patched by Hiroki Matsue via https://github.com/ruby/ruby/pull/248

Sun Mar  3 02:22:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (include_modules_at): detect cyclic prepend with original
	  method table.  [ruby-core:52205] [Bug #7841]

Sun Mar  3 02:16:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c: call method_removed hook on called class, not on
	  prepending iclass.  [ruby-core:52207] [Bug #7843]

Sun Mar  3 01:57:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (warnflags): disable -Werror by default unless
	  development.  [ruby-core:52131] [Bug #7830]

Wed Feb 27 00:20:43 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_process.rb (test_setsid): Added a workaround for
	  MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]

Sun Feb 24 15:16:00 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Removed duplicate Accept-Encoding in Net::HTTP#get.
	  [ruby-trunk - Bug #7924]
	* test/net/http/test_http.rb:  Test for the above.

Wed Feb 20 14:23:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Grammar for #backtrace_locations and ::handle_interrupt

Fri Feb 22 11:10:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* enum.c (Enumerable#chunk: Improved examples, grammar, and formatting
	  Patch by Dan Bernier and Rich Bruchal of newhaven.rb
	  [Backport #7926]

Fri Feb 22 02:33:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/abbrev.rb: Add words parameter to Abbrev::abbrev
	  Patch by Devin Weaver [Backport #7927]

Wed Feb 20 13:37:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/pty/pty.c: Documentation for the PTY module [Backport #7928]

Wed Feb 20 12:18:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c: Document Data class by Matthew Mongeau [Backport #7929]

Wed Feb 20 11:50:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/mutex_m.rb: Add rdoc for Mutex_m module [Backport #7930]

Tue Feb 19 12:30:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c: rdoc formatting for Kernel#Array() [Backport #7931]
	* array.c: Add rdoc for Array() method to Creating Arrays section

Sat Feb 23 16:51:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Documentation for Thread#backtrace_locations
	  [Backport #7932]

Sat Feb 23 16:05:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm.c: Typo in ObjectSpace::WeakMap overview [Backport #7933]

Sat Feb 23 16:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Improved rdoc for ::handle_interrupt, ::pending_interrupt?
	  and #pending_interrupt? [Backport #7934]

Sat Feb 23 14:19:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (HAVE_RB_SCAN_ARGS_OPTIONAL_HASH): for
	  rb_scan_args() optional hash feature.  [Bug #7861]

Sat Feb 23 13:03:22 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/ipaddr.rb (IPAddr#in6_addr): Fix a typo with the closing
	  parenthesis.

Sat Feb 23 13:03:22 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/ipaddr.rb (IPAddr#in6_addr): Fix the parser so that it can
	  recognize IPv6 addresses with only one edge 16-bit piece
	  compressed, like [::2:3:4:5:6:7:8] or [1:2:3:4:5:6:7::].
	  [Bug #7477]

Sat Feb 23 13:00:49 2013  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in (LIBRUBY_DLDFLAGS): Fix a bug where --with-opt-dir
	  options given were not reflected to LIBRUBY_DLDFLAGS on many
	  platforms including Linux and other GNU-based systems, NetBSD,
	  AIX and BeOS.

Sat Feb 23 13:00:07 2013  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in: Fix a bug introduced in r38342 that the cflagspat
	  substitution is messed up by the way CFLAGS and optflags are
	  modified, which affected FreeBSD and NetBSD/amd64 when
	  configured to use libexecinfo.  This bug resulted in CFLAGS and
	  CXXFLAGS in RbConfig::CONFIG having warnflags expanded in them,
	  forcing third-party C/C++ extensions to follow what warnflags
	  demands, like ANSI/ISO-C90 conformance.  ref [Bug #7101]

Sat Feb 23 12:58:32 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: remove extra topdir in VPATH, which was in
	  win32/Makefile.sub for some reason and moved from there.
	  [ruby-dev:46998] [Bug #7864]

Tue Feb 23 12:07:00 2013  Kenta MURATA  <mrkn@mrkn.jp>

	* backport r39321 from trunk. [ruby-core:51777] [Bug #7761]

	* ext/bigdecimal/bigdecimal.gemspec: bump to 1.2.0.
	  [ruby-core:51777] [Bug #7761]

Sat Feb 23 08:57:46 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* backport r39410 from trunk

	* doc/NEWS-*: Update NEWS from their respective branches

Sat Feb 23 08:14:43 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* backport r39400-r39407 from trunk.

	* NEWS: many additions

	* object.c: Add doc for Module.prepended

Sat Feb 23 06:07:04 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/installer.rb (build_extensions):  Create extension
	  install destination before building extension.  Patch by Kenta Murata.
	  [ruby-trunk - Bug #7897]
	* test/rubygems/test_gem_installer.rb:  Test for the above.

Sat Feb 23 04:34:44 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* NEWS: pending_interrupt? is both instance and singleton method

Sat Feb 23 02:49:10 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* NEWS: Add Thread#pending_interrupt? and Thread.handle_interrupt

Fri Feb 22 19:22:05 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  new attribute to read/write entity expansion text limit.  the default
	  limit is 10Kb.

	* lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.

Thu Feb 21 05:03:38 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/update_command.rb:  Create the installer after
	  options are processed.  [ruby-trunk - Bug #7779]
	* test/rubygems/test_gem_commands_update_command.rb:  Test for the
	  above.

Thu Feb 21 04:54:14 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/installer.rb:  Use gsub instead of gsub! to avoid
	  altering @bin_dir.  Fixes tests on windows.  [ruby-trunk - Bug #7885]

Thu Feb 21 03:16:37 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* NEWS: Floats are frozen too

Thu Feb 21 03:10:53 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* NEWS: Add that Fixnums and Bignums are frozen

Wed Feb 20 17:02:12 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (vm_call0_body): check interrupts after method dispatch
	  from C methods. [Bug #7878]

Wed Feb 20 08:05:25 2013 Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compar.c (rb_invcmp): compare by inversed comparison, with preventing
	  from infinite recursion.  [ruby-core:52305] [Bug #7870]

	* string.c (rb_str_cmp_m), time.c (time_cmp): get rid of infinite
	  recursion.

Tue Feb 19 15:49:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (unexpand_shvar): regularize a shell variable by
	  unexpanding shell variables in it.

	* configure.in (shvar_to_cpp): do not substitute exec_prefix itself
	  with RUBY_EXEC_PREFIX, which cause recursive definition.
	  [ruby-core:52296] [Bug #7860]

	* configure.in: unexpand arch sitearch and exec_prefix values, so
	  directly specified bindir, libdir, rubyprefix, etc can be properly
	  substituted.  [ruby-core:52296] [Bug #7860]

Tue Feb 19 14:08:46 2013  Eric Hodel  <drbrain@segment7.net>

	* backport r39307 from trunk.  [Bug #7880]

	* lib/rubygems/installer.rb:  Fixed placement of executables with
	  --user-install.  [ruby-trunk - Bug #7779]

	* test/rubygems/test_gem_installer.rb:  Test for above.

Tue Feb 19 13:57:26 2013  Eric Hodel  <drbrain@segment7.net>

	* backport r39247 from trunk. [Bug #7853]

	* lib/rdoc.rb:  Update to release version of 4.0.0

	* lib/rubygems.rb:  Update to release version of 2.0.0

Tue Feb 19 12:25:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (config.status): site and vendor directories
	  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]

Tue Feb 19 07:51:01 2013  Koichi Sasada  <ko1@atdot.net>

	* backport r39275 from trunk. [ruby-dev:46994] [Bug #7774]

	* proc.c (rb_binding_new_with_cfp): create binding object even if
	  the frame is IFUNC. But return a ruby-level binding to keep
	  compatibility.
	  This patch fix degradation introduced from r39067.
	  [Bug #7774] [ruby-dev:46960]

	* test/ruby/test_settracefunc.rb: add a test.

Sat Feb 16 20:43:43 2013  Koichi Sasada  <ko1@atdot.net>

	* backport r39276 from trunk. [ruby-dev:46997] [Bug #7825]

	* vm.c (rb_thread_mark): mark a working Proc of bmethod
	  (a method defined by define_method) even if the method was removed.
	  We could not trace working Proc object which represents the body
	  of bmethod if the method was removed (alias/undef/overridden).
	  Simply, it was mark miss.
	  This patch by Kazuki Tsujimoto. [Bug #7825]

	  NOTE: We can brush up this marking because we do not need to mark
	  `me' on each living control frame. We need to mark `me's
	  only if `me' was free'ed. This is future work after Ruby 2.0.0.

	* test/ruby/test_method.rb: add a test.

Fri Feb 15 00:49:32 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Removed OpenSSL dependency from Net::HTTP.

	* test/net/http/test_http.rb:  Remove Zlib dependency from tests.
	* test/net/http/test_http_request.rb:  ditto.

Fri Feb 15 00:49:32 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http:  Do not handle Content-Encoding when the user sets
	  Accept-Encoding.  This allows users to handle Content-Encoding for
	  themselves.  This restores backwards-compatibility with Ruby 1.x.
	  [ruby-trunk - Bug #7831]
	* lib/net/http/generic_request.rb:  ditto.
	* lib/net/http/response.rb:  ditto
	* test/net/http/test_http.rb:  Test for the above.
	* test/net/http/test_http_request.rb:  ditto.
	* test/net/http/test_httpresponse.rb:  ditto.

Thu Feb 14 13:17:10 2013  Zachary Scott  <zachary@zacharyscott.net>

	* Backport r39168 Warning about TracePoint events to 2.0.0
	  [ruby-core:52073] [Bug #7815]

	* vm_trace.c: note about TracePoint events set

Thu Feb 14 07:04:13 2013  Eric Hodel  <drbrain@segment7.net>

	* Backport r39213 from trunk [ruby-trunk - Bug #7383]

	* lib/rubygems.rb:  Return BINARY strings from Gem.gzip and Gem.gunzip.
	  Fixes intermittent test failures.  RubyGems issue #450 by Jeremey
	  Kemper.
	* test/rubygems/test_gem.rb:  Test for the above.

Thu Feb 14 07:01:12 2013  Eric Hodel  <drbrain@segment7.net>

	* Backport part of r39166 from trunk [ruby-trunk - Bug #7809]

	* lib/rubygems/package.rb:  Include checksums.yaml.gz signatures for
	  verification.
	* test/rubygems/test_gem_package.rb:  Test for the above.

Wed Feb 13 15:34:21 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: merge JSON 1.7.7.
	  This includes security fix. [CVE-2013-0269]
	  https://github.com/flori/json/commit/d0a62f3ced7560daba2ad546d83f0479a5ae2cf2
	  https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion

Sat Feb  9 21:13:35 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* backport r39167 from trunk. [ruby-core:52059] [Bug #7812]

	* BSDL: update copyright notice for 2013.

Fri Feb  8 19:56:54 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* array.c (rb_ary_dup): reverted r39004.  see [Bug #7768], and
	  release manager finally decided to revert it.

Fri Feb  8 16:09:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_ensure): preserve errinfo across ensure proc before
	  JUMP_TAG().  [ruby-core:52022] [Bug #7802]

Fri Feb  8 16:08:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (assert_separately): check also terminating
	  signal not only if core dumped.

Fri Feb  8 13:12:04 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/generator/darkfish.rb:  Set encoding on output template to
	  user-specified encoding.
	* test/rdoc/test_rdoc_generator_darkfish.rb:  Test for above.

	* lib/rdoc.rb:  Bump version

Fri Feb  8 11:53:33 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/security/policy.rb:  Raise proper exceptions when
	  verifying unsigned gems (instead of crashing).
	* test/rubygems/test_gem_security_policy.rb:  Tests for the above.

Fri Feb  8 10:44:44 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/test_gem_dependency_installer.rb:  Improve coverage of
	  --install-dir feature of gem install.

Fri Feb  8 10:11:09 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/config_file.rb:  Add missing require for
	  user_interaction.rb

	* lib/rubygems/dependency_installer.rb:  Minor refactor for clarity.

Fri Feb  8 09:35:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#configuration): set all ruby names.
	  hdrdir now needs RUBY_VERSION_NAME.

Fri Feb  8 08:58:26 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/package/old.rb:  Fix loading old format gems on ruby
	  1.8.  This commit is only so trunk and rubygems master have the same
	  code.

Fri Feb  8 08:53:27 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotation
	  when dumping Ruby strings. Thanks Ingy

	* test/psych/test_psych.rb: appropriate tests.

	* test/psych/test_yaml.rb: ditto

Fri Feb  8 08:50:42 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: change output reference
	  ids to be sequential numbers.

Fri Feb  8 07:47:56 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/package/old.rb:  Disallow installation of old-format
	  gems when a security policy is active.
	* test/rubygems/test_gem_package_old.rb:  Test for above.

Fri Feb  8 07:34:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/net/http.rb (HTTP.post_form): Fix module scope in documentation
	  Patch by David Albert [Bug #7794] [ruby-core:51955]

Fri Feb  8 07:33:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* compar.c (cmp_equal): Document ignored exception and return false
	  By Makoto Kishimoto [Bug #7790] [ruby-dev:46925] [ruby-dev:46910]

Fri Feb  8 07:17:00 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/dependency_installer.rb:  Only install local gems if
	  they end in '.gem'.  Fixes github rubygems issue #407.
	* test/rubygems/test_gem_dependency_installer.rb:  Test for the above.

Fri Feb  8 00:02:48 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (obj2gid): use getgrnam_r() only if getgrnam_r() and
	  _SC_GETGR_R_SIZE_MAX is available.
	  MirOS BSD (MirBSD 10 GENERIC#1382 i386) have getgrnam_r() but
	  no _SC_GETGR_R_SIZE_MAX.
	  (obj2uid): use getpwnam_r() only if getpwnam_r() and
	  _SC_GETPW_R_SIZE_MAX is available.
	  This is consistency for obj2gid.
	  MirOS BSD have neither getpwnam_r() nor _SC_GETPW_R_SIZE_MAX.

Thu Feb  7 22:01:18 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: define linker for shared library on MirOS BSD.

Thu Feb  7 21:09:23 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rubygems/test_gem_config_file.rb
	  (TestGemConfigFile#test_check_credentials_permissions): skip on
	  Windows. see [Bug #7784] [ruby-core:51864] and r39070.

Thu Feb  7 20:52:40 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (config.status): added variables which were
	  missing at r39130.

Thu Feb  7 15:33:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal
	  ordered elements just after the duplicated element, not overwriting
	  successive elements.  [ruby-core:50314] [Bug #7467]

Thu Feb  7 14:56:15 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/package.rb:  Ensure digests are generated for signing.
	* test/rubygems/test_gem_package.rb:  Test for the above.

	* lib/rubygems/security/policy.rb:  Ensure digests are present when
	  verifying a gem and match the number of signatures bidirectionally.
	* test/rubygems/test_gem_security_policy.rb:  Test for the above.

	* lib/rubygems.rb:  Documentation improvements (by zzak)

Thu Feb  7 05:52:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/pty/README: Remove static documentation file
	* ext/pty/pty.c: Add License to PTY module overview

Thu Feb  7 02:31:10 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* vm_insnhelper.c: attr_writer should return its argument [Bug #7773]

	* test/ruby/test_basicinstructions.rb: Test for above

Thu Feb  7 01:35:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/security.rdoc: Link to japanese version of CVE page patch by
	  nagachika

Wed Feb  6 23:30:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/pty/README.expect: Removed static documentation file
	* ext/pty/lib/expect.rb: Documentation for IO#expect

Wed Feb  6 22:25:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* hash.c (env_reject_bang): hide keys array from ObjectSpace
	* hash.c (env_select_bang): ditto

Wed Feb  6 17:33:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (multiarch): add option to move architecture dependent
	  directories.  [Feature #6111]

	* template/ruby.pc.in: add arch dependent paths.

	* configure.in (rubyarchhdrdir, sitearchhdrdir, vendorarchhdrdir): add
	  options to customize architecture dependent header directories.

	* configure.in (rubyarchprefix, sitearchdir, vendorarchdir): add
	  options to customize architecture dependent library directories.

	* template/ruby.pc.in, tool/mkconfig.rb, tool/rbinstall.rb: use
	  configured values.

	* tool/mkconfig.rb: expand rubyarchdir to extract prefix.

	* configure.in (RUBY_VERSION_NAME), template/ruby.pc.in: add
	  substitution and define.

	* configure.in, version.c: parametric architecture name for paths.

	* configure.in (shvar_to_cpp): convert sh variable references
	  by replacing with string literal forms in cpp.

Wed Feb  6 17:05:26 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Import RDoc 4.0.0.rc.2

Mon Feb  4 02:22:49 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_process.rb (test_setsid): ensure to call
	  Process.wait(). Reported by George Koehler. Thanks.

Mon Feb  4 02:18:00 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_process.rb (test_setsid): skip when platform is
	  OpenBSD. Contributed from George Koehler.
	  [Bug #7789] [ruby-core:51889]

Wed Feb  6 13:35:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_method_entry_location, rb_{mod,obj}_method_location): new
	  functions to obtain source location of method definition.

	* vm_method.c (rb_obj_respond_to): show the location of old style
	  respond_to? method.

Wed Feb  6 13:03:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/security.rdoc: Add link to CVEs on ruby-lang.org/en/security

Wed Feb  6 12:49:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* NEWS: Add note about removal of CSV::load and CSV::dump from r39077

Wed Feb  6 05:57:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/racc/parser.rb: Hide copyright notice from Racc doc

Wed Feb  6 05:50:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/rubygems/*: Removed outdated documentation files
	* lib/rubygems/LICENSE.txt: Include license file
	* lib/rubygems.rb: Move Gem module documentation so rdoc can parse it
	  and link to LICENSE.txt
	* lib/rubygems/*: Hide useless documentation from Gem module rdoc

Wed Feb  6 03:45:19 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/security.rdoc: Remove documentation for unsafe CSV.load which
	  was deleted in r39077

Wed Feb  6 03:27:19 2013  James Edward Gray II  <james@graysoftinc.com>

	* lib/csv.rb: Remove the dangerous serialization feature.

Wed Feb  6 00:56:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb.rb: Remove example from restrictions, it works [Github #246]
	  Based on patch by Ryunosuke SATO

Wed Feb  6 00:46:53 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (rb_vm_stack_to_heap): call rb_vm_get_binding_creatable_next_cfp
	  instead of rb_vm_get_ruby_level_next_cfp to prevent a segfault by
	  calling Kernel#callcc. See r39067 for more details.
	  [ruby-dev:46908] [ruby-trunk - Bug #7774]

	* test/ruby/test_settracefunc.rb: add a test.

Tue Feb  5 18:48:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* doc/security.rdoc: add regex, eval and drb sections

Tue Feb  5 17:24:02 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/servlet.rb:  Fixed root search paths, filesystem paths
	  instead of HTTP paths were returned.
	* test/rdoc/test_rdoc_servlet.rb:  Test for above.

Tue Feb  5 16:37:00 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/config_file.rb:  Ignore permissions check on windows.
	  Windows writes 0600 file as 0644 permissions making the check
	  useless.

Tue Feb  5 16:25:25 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_obj_respond_to): drop optional include_all flag if
	  respond_to? method is defined in old style.  [Bug #7722]

Tue Feb 05 15:04:34 2013  Koichi Sasada  <ko1@atdot.net>

	* proc.c (rb_binding_new_with_cfp): permit to create binding object
	  of IFUNC frame.
	  When `rb_binding_new_with_cfp()' is called, VM finds out the first
	  normal (has iseq) frame and create a binding object of this frame
	  and create Env objects. `ep's of related frames are updated
	  (`ep's point Env object managed spaces).
	  However, `ep' of skipped IFUNC frame was not updated and
	  old invalid `ep' was remained. It causes serious problems.
	  To solve this issue, permit IFUNC to create binding.
	  (Maybe there is no problem on it)
	  [ruby-dev:46908] [ruby-trunk - Bug #7774]

	* test/ruby/test_settracefunc.rb: add a test.

	* vm.c (rb_vm_get_binding_creatable_next_cfp), vm_core.h: added.

	* vm_trace.c: fix to use `rb_vm_get_binding_creatable_next_cfp()'.

Tue Feb  5 14:43:15 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]

Tue Feb  5 14:36:04 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (fix_pow): Handle special cases when base is 0, -1 or +1
	  [Bug #5713] [Bug #5715]

	* rational.c (nurat_expt): ditto

Tue Feb  5 13:27:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (rawmode_opt): use default values by `stty
	  raw`.

Tue Feb  5 12:50:47 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* range.c: Use div instead of / for bsearch

	* test/ruby/test_range.rb: Test showing bug when requiring mathn

Tue Feb  5 12:48:38 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: Use to_enum for Enumerable methods returning
	  Enumerators.
	  This makes Lazy#cycle no longer needed, so it was removed.
	  Make Enumerator#chunk and slice_before return lazy Enumerators.
	  [Bug #7715]

	* internal.h: Remove ref to rb_enum_cycle_size; no longer needed

	* enum.c: Make enum_cycle_size static.

	* test/ruby/test_lazy_enumerator.rb: Test for above

Tue Feb  5 12:48:10 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: Finalize and document Lazy.new. [Bug #7248]
	  Add Lazy#to_enum and simplify Lazy#size.

	* test/ruby/test_lazy_enumerator.rb: tests for above

Tue Feb  5 11:35:35 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/push_command.rb:  Fixed credential download for
	  `gem push --host`
	* lib/rubygems/gemcutter_utilities.rb:  ditto.
	* test/rubygems/test_gem_commands_push_command.rb:  Test for the above.
	* test/rubygems/test_gem_gemcutter_utilities.rb:  ditto.

	* lib/rubygems/config_file.rb:  Abort if the `gem push` credentials
	  file has insecure permissions.
	* test/rubygems/test_gem_config_file.rb:  Test for the above.

	* lib/rubygems/ext/builder.rb:  Do not look for Gemfile, Isolate, etc.
	  while building gem extensions.

	* lib/rubygems/package.rb:  Unset spec and files list if a gem's
	  signatures cannot be verified.
	* test/rubygems/test_gem_package.rb:  Test for the above.

	* lib/rubygems/specification.rb:  Reduce use of eval.
	* lib/rubygems/test_case.rb:  ditto.

	* test/rubygems/test_gem_specification.rb:  Test setting
	  specification_version for legacy gems.  Dup Gem.ruby before
	  untainting in case it's frozen.

	* lib/rubygems.rb:  Reduce use of eval.  Only read files when looking
	  for Gemfile, Isolate, etc.
	* test/rubygems/test_gem.rb:  Test for the above.

Tue Feb  5 10:15:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/security.rdoc: Wrap security guide at 80 columns

Tue Feb  5 10:15:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/security.rdoc: Grammatical error on security guide
	  Patch by Josh Bassett [Github fixes #245]

Tue Feb  5 10:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/racc/parser.rb: Update #do_parse and #yyparse from upstream
	  See [Github tenderlove/racc@7d954b5]

Tue Feb  5 09:55:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/racc: Merge Racc documentation downstream, add grammar ref file

Tue Feb  5 08:03:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb.rb, lib/irb/ext/save-history.rb: Add documentation on how to
	  enabled irb history [ruby-core:51347] [Bug #7679]

Tue Feb  5 07:35:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb.rb, lib/irb/context.rb: Add documentation on how to enable
	  auto-indentation and autocompletion using irbrc and irb_context
	  [ruby-core:51209] [Bug #7642] and [ruby-core:51348] [Bug #7680]

Tue Feb  5 05:20:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/standard_library.rdoc: Document list of libraries and extensions
	  and their purpose or short description
	* lib/README: Remove lib/README in favor of doc/standard_library.rdoc

Tue Feb  5 04:40:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/json/lib/json.rb: Move module overview definition for rdoc

Tue Feb  5 03:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/tracer.rb: Move class overview definition and reformat

Mon Feb  4 15:10:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (rawmode_opt): initialize options for the
	  case all options are not given.

Mon Feb  4 12:44:13 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_dump.c (control_frame_dump): capitalize prefix of `ep'
	  if `ep' points an env object.

Mon Feb  4 04:20:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/English.rb: Add English module for RDoc to parse, then
	  remove_const to avoid confusion. Include full list of aliases and
	  their associated global variable.

Mon Feb  4 02:40:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and
	  #yamler= for using the removed Syck gem as the YAML::ENGINE

Sun Feb  3 16:54:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/io-console.gemspec: bump.  [Bug #7762]

	* test/io/console/test_io_console.rb (test_stringio_getch): use more
	  descriptive assertions.

	* ext/io/console/console.c (rawmode_opt): min is minimum characters,
	  not tenths.

Sun Feb  3 16:13:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* doc/security.rdoc: add first cut at a Ruby security document

Sun Feb  3 10:25:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* random.c: Document range argument for Kernel#rand.
	  [ruby-core:51794] [Bug #7770]

Sun Feb  3 10:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* numeric.c: Document Float constants [ruby-core:51484] [Bug #7709]

Sun Feb  3 09:38:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/profiler.rb (PROFILE_CALL_PROC, PROFILE_RETURN_PROC): add b_call
	  and b_return to profile block calls.

	* lib/profiler.rb (PROFILE_CALL_PROC, PROFILE_RETURN_PROC): split
	  PROFILE_PROC for call and return events.

Sat Feb  2 14:32:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/minitest/mock.rb, lib/minitest/hell.rb: nodoc top-level module

Sat Feb  2 14:05:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/debug.rb: Documentation for DEBUGGER__ class methods based on
	  patch by Vincent Batts [ruby-core:51253]

Sat Feb  2 13:37:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/net/smtp.rb: Fix rdoc title for Net::SMTP

Sat Feb  2 13:32:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/net/pop.rb: Fix rdoc title for Net::POP3

Sat Feb  2 13:00:11 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* lib/gserver.rb (GServer#start): fix a timing issue.  patch from
	  Charles Nutter.  [Bug #7081]

Sat Feb  2 12:36:54 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* lib/fileutils.rb (copy_entry, wrap_traverse): preserve attributes of
	  directories on FileUtils.cp_r.  The fix was proposed by Jan
	  Wedekind.  [Bug #7246]

	* test/fileutils/test_fileutils.rb: add a test for above.

Sat Feb  2 12:30:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/uri/ftp.rb (URI::FTP.new2): nodoc method from r39013 [Bug #7301]

Sat Feb  2 12:15:36 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* lib/uri/ftp.rb (URI::FTP.new2): remove the rdoc because it is not
	  well tested yet.  [Bug #7301]

Sat Feb  2 12:07:41 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* ChangeLog: Forgot to add a reference to the ChangeLog of the
	  previous commit.

Sat Feb  2 12:05:18 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* lib/fileutils.rb: chmod/chmod_R with a string mode (e.g., "+x")
	  caused error in verbose mode.  [Bug #7373]

	* test/fileutils/test_fileutils.rb: add a test for above.

Sat Feb  2 11:44:42 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* lib/English.rb: Remove some confusing words from rdoc.  [Bug #7406]

Sat Feb  2 10:17:12 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* NEWS: add keyword arguments.

Sat Feb  2 07:45:44 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* proc.c (proc_curry): Fix arity check [Bug #5747]

	* test/ruby/test_proc.rb: Test for above

Sat Feb  2 07:44:15 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* proc.c: Add {*}_min_max_arity and refactor.
	  [Bug #7765]

	* test/ruby/test_proc.rb: Fix wrong test

Fri Feb  2 00:46:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* marshal.c: add security considerations to marshal overview, refer to
	  overview from Marshal.load documentation [#7759]

Fri Feb  1 23:04:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* array.c (rb_ary_dup): make returned array the same class as the original
	  array [Bug #7768] [ruby-core:51792]
	* test/ruby/test_array.rb (class TestArray): add test

Fri Feb  1 16:35:34 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_object0): prohibit setting instance variables of
	  existing class/module.

Fri Feb  1 14:34:29 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/readline/extconf.rb, ext/readline/readline.c: check
	  RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE directly in
	  readline.c.  Patch by Zachary Scott.  [Bug #7397] [ruby-core:49561]

Thu Jan 31 21:55:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* marshal.c (marshal_load): Add documentation warning against using
	  Marshal.load on untrusted data [Bug #7759] [ruby-core:51765]

Thu Jan 31 16:33:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (local_push_gen): no assigned but unused variable warnings
	  in eval as well as -e.  [Feature #7730] [ruby-core:51580]

Wed Jan 30 12:30:08 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_signal.rb (test_trap_puts): Fix typo. "sync"
	  should be "STDOUT.sync".

Thu Jan 31 15:39:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* string.c (rb_str_aset_m): Documentation for String#[]= fix
	  Raises an IndexError if Regexp match is out of range.
	  Github fixes #243 Patch by Dmtiriy Budnik

Thu Jan 31 13:54:44 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/socket/raddrinfo.c (rsock_unix_sockaddr_len): return
	  sizeof(sa_family_t) if path is empty.  see "Autobind Feature" in
	  unix(7) for details.

	* ext/socket/lib/socket.rb (unix_socket_abstract_name?): treat an
	  empty path as an abstract name.

	* test/socket/test_unix.rb: related test.

Wed Jan 30 20:58:50 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/basicsocket.c (bsock_getsockname): ignore truncated
	  part of socket address.
	  (bsock_getpeername): ditto.
	  (bsock_local_address): ditto.
	  (bsock_remote_address): ditto.

	* ext/socket/unixsocket.c (unix_path): ditto.
	  (unix_addr): ditto.
	  (unix_peeraddr): ditto.

	* ext/socket/init.c (cloexec_accept): ditto.

Wed Jan 30 17:08:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h (fstat): revert r37337, which uses _fstati64()
	  instead of fstati64() on mingw32.  [Bug #7276]

Wed Jan 30 15:26:37 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/socket/unixsocket.c (rsock_init_unixsock): use rb_inspect()
	  because rb_sys_fail_str() fails if its argument contains NUL.

	* test/socket/test_unix.rb: related test.

Wed Jan 30 15:21:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_dump.c (rb_vm_bugreport): show the most important message, Crash
	  Report log information, first.

Wed Jan 30 15:00:05 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* array.c (rb_ary_bsearch): Raise TypeError on bad return from block

	* range.c (range_bsearch): ditto

	* test/ruby/test_array.rb (class): Test for above

	* test/ruby/test_range.rb (class): ditto

Wed Jan 30 14:46:28 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* range.c: Restrict bsearch to integers [#7728]

	* test/ruby/test_range.rb: Test for above

Wed Jan 30 14:10:52 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* array.c (rb_ary_bsearch): Return enumerator if no block [#7725]

	* range.c (range_bsearch): ditto

	* test/ruby/test_array.rb: Test for above

	* test/ruby/test_range.rb: ditto

Wed Jan 30 13:53:43 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Take conjugate for inner product
	  [rubyspec:5a01ad5719f2] [ruby-dev:46101]

Wed Jan 30 13:22:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (local_push_gen): warn assigned but unused variables also in
	  toplevel, except for -e option.  [Feature #7730] [ruby-core:51580]

Wed Jan 30 13:17:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* cont.c (cont_restore_thread): svar should be separate per fibers.
	  [ruby-core:51331] [Bug #7678]

Wed Jan 30 07:15:04 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* re.c (reg_operand): Simplify and reuse error handling [Bug #7539]

	* test/ruby/test_regexp.rb: Test for above

Wed Jan 30 07:00:16 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* object.c: Improve error for failed implicit conversions [Bug #7539]

	* error.c: Adapt rdoc

	* test/ruby/test_object.rb: Test for above

Tue Jan 29 21:40:12 2013  Tanaka Akira  <akr@fsij.org>

	* lib/net/http/generic_request.rb (encode_multipart_form_data): remove
	  tempfile explicitly.

Tue Jan 29 19:27:18 2013  Benoit Daloze  <eregontp@gmail.com>

	* array.c: Improve documentation about
	  comparison by hash for concerned methods. [ruby-core:51266]

Tue Jan 29 17:03:28 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c: fix issue of rb_debug_inspector_open().
	  The order of making binding should be stack (frame) top to bottom.
	  [Bug #7635]
	  And also fix issue of collecting klass. Collecting klass is same
	  as TracePoint#defined_class.
	  (previous version, it returns T_ICLASS (internal objects).

	* test/-ext-/debug/test_debug.rb: add a test.

	* ext/-test-/debug/extconf.rb, init.c, inspector.c: ditto.

	* vm_backtrace.c: remove magic number and add enum CALLER_BINDING_*.

	* vm_backtrace.c, include/ruby/debug.h: add new C api (experimental)
	  rb_debug_inspector_frame_self_get().

	* vm.c, vm_core.h, vm_trace.c: move decl. of
	  rb_vm_control_frame_id_and_class() and constify first parameter.

Tue Jan 29 16:50:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_trace.c (rb_tracepoint_enable, rb_tracepoint_disable): check safe
	  level as well as set_trace_func.

	* vm_trace.c (set_trace_func, thread_{add,set}_trace_func_m): check
	  safe level as well as 1.8.

Tue Jan 29 16:49:19 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_mod_method_arity): return original arity of the method if
	  aliased because of visibility change, like as Method#arity.

Tue Jan 29 12:05:18 2013  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_marshal.rb: remove temporally files early.

	* test/ruby/test_process.rb: ditto.

	* test/psych/test_exception.rb: ditto.

Tue Jan 29 09:26:20 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/socket/socket.c (sock_s_pack_sockaddr_un): calculate the
	  correct address length of an abstract socket.

	* test/socket/test_unix.rb: related test.

Mon Jan 28 18:02:16 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_backtrace.c (rb_debug_inspector_frame_{class,binding,iseq}_get):
	  use long as index as well as RARRAY_LEN().

Mon Jan 28 17:51:38 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (assert_separately): imply no core dump.

Mon Jan 28 12:32:31 2013  Tanaka Akira  <akr@fsij.org>

	* ext/fcntl/fcntl.c: update document.  use "file descriptor" instead
	  of "file handle" because it is not used other Ruby documents and
	  it is confusing with Windows file handle.
	  correct F_DUPFD behavior.

Sat Jan 26 22:39:12 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object): dump instance variables of the result of
	  marshal_dump not the original object.  [ruby-core:51163] [Bug #7627]

	* complex.c (nucomp_marshal_dump): need to copy instance variables.

	* rational.c (nurat_marshal_dump): ditto.

Sat Jan 26 13:35:56 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/fcntl/fcntl.c:  Document Fcntl constants

Sat Jan 26 12:54:40 2013  Eric Hodel  <drbrain@segment7.net>

	* hash.c (rb_env_size):  Restored documentation for ENV.size

	* lib/drb/drb.rb:  Documented DRb::DRb#run.

	* lib/erb.rb (class ERB):  Improved documentation of ERb.

	* transcode.c:  Documented Encoding::Converter constants.

Sat Jan 26 10:09:57 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/webrick/accesslog.rb:  Improved WEBrick documentation.
	* lib/webrick/cgi.rb:  ditto.
	* lib/webrick/config.rb:  ditto.
	* lib/webrick/cookie.rb:  ditto.
	* lib/webrick/httpauth/authenticator.rb:  ditto.
	* lib/webrick/httpauth/basicauth.rb:  ditto.
	* lib/webrick/httpauth/digestauth.rb:  ditto.
	* lib/webrick/httpproxy.rb:  ditto.
	* lib/webrick/httprequest.rb:  ditto.
	* lib/webrick/httpresponse.rb:  ditto.
	* lib/webrick/https.rb:  ditto.
	* lib/webrick/httpserver.rb:  ditto.
	* lib/webrick/httpservlet/cgihandler.rb:  ditto.
	* lib/webrick/httpservlet/filehandler.rb:  ditto.
	* lib/webrick/httpservlet/prochandler.rb:  ditto.
	* lib/webrick/httputils.rb:  ditto.
	* lib/webrick/httpversion.rb:  ditto.
	* lib/webrick/log.rb:  ditto.
	* lib/webrick/server.rb:  ditto.
	* lib/webrick/ssl.rb:  ditto.
	* lib/webrick/utils.rb:  ditto.
	* lib/webrick/version.rb:  ditto.

Sat Jan 26 08:29:33 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/socket/raddrinfo (rsock_unix_sockaddr_len): renamed from
	  rsock_unixpath_len, because it returns not the length of the path,
	  but the length of a socket address for the path.

Sat Jan 26 01:12:23 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_io.rb (test_ioctl_linux): skip if a platform is
	  not x86 because linux ioctl request number depend on cpu arch.
	  At least, alpha, mips, sparc and ppc have a different number.
	  [Bug #7718] [ruby-core:51544]

Fri Jan 25 19:14:24 2013  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c: use TlsAlloc instead of __declspec(thread)
	  to avoid SEGV if win32ole.so loaded with LoadLibrary in Windows
	  XP or earlier.

Fri Jan 25 16:47:31 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/socket/raddrinfo.c (rsock_unixpath_len, init_unix_addrinfo),
	  ext/socket/unixsocket.c (unixsock_connect_internal,
	  rsock_init_unixsock): calculate the correct address length of
	  an abstract socket.  Without this fix, sizeof(struct sockaddr_un)
	  is specified as the length of an abstract socket for bind(2) or
	  connect(2), so the address of the socket is filled with extra NUL
	  characters.  See unix(7) for details.

	* ext/socket/lib/socket.rb (unix_server_socket): don't access the
	  file system if the platform is Linux and path starts with NUL,
	  which means that the socket is an abstract socket.

	* test/socket/test_unix.rb: related test.

Fri Jan 25 13:02:27 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/drb/drb.rb:  Updated documentation based on patch from Vincent
	  Batts.  [ruby-trunk - Bug #7714]
	* lib/drb/ssl.rb:  ditto.

Fri Jan 25 12:23:29 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/drb/drb.rb:  Improved documentation by adding or hiding methods.
	* lib/drb/eq.rb:  ditto.
	* lib/drb/extserv.rb:  ditto.
	* lib/drb/gw.rb:  ditto.
	* lib/drb/invokemethod.rb:  ditto.
	* lib/drb/observer.rb:  ditto.
	* lib/drb/ssl.rb:  ditto.
	* lib/drb/timeridconv.rb:  ditto.
	* lib/drb/unix.rb:  ditto.

	* sample/drb/gw_cu.rb:  Fixed bug in DRb gateway sample.

Fri Jan 25 12:01:56 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: modify a comment about rb_iseq_t::local_size.
	  A patch by davidbalbert (David Albert) [Bug #6750]

Fri Jan 25 10:36:31 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/mkmf.rb:  Documented MakeMakefile constants.  Hide implementation
	  details from RDoc

Fri Jan 25 10:04:07 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/compatibility.rb:  Hide compatibility shims from RDoc

	* lib/rubygems/config_file.rb:  Hide RbConfig use from RDoc

	* lib/rubygems/test_case.rb:  Added note to use realpath when 1.8
	  support is dropped.

Fri Jan 25 09:14:43 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/generator/darkfish.rb:  Fixed debug message.  RDoc bug #174
	  by Thomas Leitner.

	* lib/rdoc/store.rb:  Fixed deletion of ri attribute data when a class
	  was loaded then saved.  RDoc bug #171 by Thomas Leitner.
	* test/rdoc/test_rdoc_store.rb:  Test for above.

Thu Jan 24 19:55:25 2013  Shota Fukumori  <her@sorah.jp>

	* NEWS (yaml): Write about bundled libyaml.

Thu Jan 24 16:54:34 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/calling_methods.rdoc:  Added a Method Lookup section.
	* doc/syntax/refinements.rdoc (Method Lookup):  Clarified that
	  refinement methods are looked up in classes, not instances.

Thu Jan 24 16:49:17 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enum.c (enum_zip): Fix error message

	* array.c (take_items): Same, for Array#zip

Thu Jan 24 16:47:26 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c (lazy_zip): raise error for bad arguments
	  [Bug #7706]

Thu Jan 24 16:05:08 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: Optimize Lazy#zip when passed only arrays
	  [Bug #7706]

Thu Jan 24 15:21:17 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: Fix state handling for Lazy#zip,{drop_take}{_while}
	  [bug #7696] [bug #7691]

Thu Jan 24 11:43:47 2013  Narihiro Nakamura  <authornari@gmail.com>

	* eval.c (f_current_dirname): Add documentation about "__dir__
	  returns always an absolute path". [Bug #7729]

Thu Jan 24 10:28:30 2013  Eric Hodel  <drbrain@segment7.net>

	* NEWS (RDoc):  Added mention of page support and markdown support.

Thu Jan 24 09:40:13 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/refinements.rdoc:  Added refinements document based on
	  the specification from the wiki.
	* doc/syntax.rdoc:  Added link to refinements document.

Wed Jan 23 16:29:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): fix missing
	  initialization.  pointed out by phasis68 (Heesob Park) at
	  [ruby-core:51579].  [Bug #7721]

Wed Jan 23 16:18:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#try_constant): fix for large unsigned.

	* lib/mkmf.rb (MakeMakefile#try_constant): fix for larger constants.

	* test/mkmf/test_constant.rb: tests for try_constant.
	  TODO: define check_constant and use it.

Wed Jan 23 13:35:37 2013  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (ruby_init_stack): ignore `STACK_END_ADDRESS'
	  if Ruby interpreter is running on co-routine.
	  [Feature #2294]
	  https://bugs.ruby-lang.org/issues/2294#note-18

Wed Jan 23 12:28:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): check the results
	  of acp_to_wstr() which can return NULL.  [ruby-core:51557] [Bug #7721]

Wed Jan 23 10:40:49 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/assignment.rdoc (Implicit Array Assignment):  Clarify
	  that "left-hand side" means "of the assignment".  Suggested by Jorge
	  Dias.
	* doc/syntax/assignment.rdoc (Multiple Assignment):  ditto.

Wed Jan 23 10:34:47 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/assignment.rdoc (Local Variables and Methods):  Fixed
	  example showing caching of a method's results into a local variable.
	  Added not about using an explicit receiver to call a method that
	  matches a local variable.  Suggested by markov_twain on twitter.

Wed Jan 23 10:20:08 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/README:  Fixed typo.  Patch by Pradeep Sahoo.
	  Fixes #240 on github

Wed Jan 23 09:53:39 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/servlet.rb:  Fixed display of site and home documentation.
	  Fixes rdoc issue #170 by Thomas Leitner.
	* test/rdoc/test_rdoc_servlet.rb:  Test for above.

	* lib/rdoc/code_object.rb:  Split #initialize_visibility from
	  #initialize for reuse when loading a stored object.
	  Fixes rdoc issue #171 by Thomas Leitner.

	* lib/rdoc/any_method.rb:  Initialize visibility for #display?  For
	  rdoc issue #171
	* lib/rdoc/attr.rb:  ditto.
	* lib/rdoc/class_module.rb:  ditto.
	* lib/rdoc/top_level.rb:  ditto.
	* test/rdoc/test_rdoc_any_method.rb:  Test for above.
	* test/rdoc/test_rdoc_attr.rb:  ditto.
	* test/rdoc/test_rdoc_class_module.rb:  ditto.
	* test/rdoc/test_rdoc_constant.rb:  ditto.
	* test/rdoc/test_rdoc_top_level.rb:  ditto.

Wed Jan 23 06:43:26 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/test_case.rb:  Use Dir.tmpdir for rubygems tests instead
	  of ./tmp/test.  Fixes [ruby-trunk - Bug #7717]

Tue Jan 22 22:58:03 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-curlies): Fix the bug where
	  an open curly inserted in a string is always replaced with a
	  hash sign.

Mon Jan 21 15:41:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/mkconfig.rb: BASERUBY is transient at core build.

Mon Jan 21 13:51:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb ($extmk): traverse parent directories for the case
	  srcdir is a symlink.

Sun Jan 20 23:55:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object, r_object0): separate respond_to checks and
	  calling, and get back to the old behavior for 2.0.  [Bug #7564]

Sun Jan 20 22:24:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/vpath.rb (VPath#def_options): hack for msys make, which
	  converts a command line argument to non-msys command seems like a
	  path list automagically.  [Bug #7710] [ruby-core:51489]

Sat Jan 19 11:35:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* struct.c (Struct.new): Document Struct.new with block
	  Patch by Hiroyuki Iwatsuki [Bug #7674]

Sat Jan 19 09:52:46 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/miscellaneous.rdoc:  Added section on defined?

Sat Jan 19 09:27:31 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/assignment.rdoc (Local Variables and Methods):  Made it
	  more clear that local variables are created by the parser, not
	  execution.  Thanks to John Hawthorn.

Sat Jan 19 09:15:58 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/assignment.rdoc:  Improved links
	* doc/syntax/methods.rdoc:  ditto.

	* doc/syntax.rdoc:  Added link to assignment document

Sat Jan 19 08:47:33 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/assignment.rdoc:  Added a syntax document on assignment.

Fri Jan 18 14:11:01 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc:  Added Array Decomposition.

Fri Jan 18 12:54:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (gem): Gem.ensure_gem_subdirectories makes
	  subdirectories group-writable, so make them with $dir_mode.

Fri Jan 18 11:24:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32ole/win32ole.c (ole_initialize): uninitialize OLE at thread
	  ends.  [Bug #2618] [ruby-core:27634]

	* ext/win32ole/win32ole.c (ole_initialize): initialize OLE for each
	  threads.  [Bug #2618] [ruby-core:27634]

Thu Jan 17 22:10:35 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Remove
	  .time dependency from *.rb install target. It causes needless
	  *.rb install. [Bug #7698] [ruby-core:51437]
	  Reported by Tadashi Saito. Thanks!!!
	* test/rubygems/test_gem_installer.rb
	  (TestGemInstaller#test_install_extension_and_script): Add a test
	  for the above change.

Thu Jan 17 21:08:20 2013  Kouhei Sutou  <kou@cozmixng.org>

	* eval.c: Fix a typo in ruby_finalize() documentation.

Thu Jan 17 20:28:18 2013  Benoit Daloze  <eregontp@gmail.com>

	* object.c: Typo in Kernel#hash documentation.
	  Patch by zed_0xff [Github Fixes #237]

Thu Jan 17 10:48:56 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: use constants rather than
	  calculating Inf and NaN.

Thu Jan 17 10:21:05 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/miscellaneous.rdoc:  Added Ending an Expression and
	  indentation.

Thu Jan 17 09:30:21 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/installer.rb:  Untaint string when checking output
	  for $SAFE=1

	* lib/rubygems/specification.rb:  Keep previously loaded specs as
	  active.  This prevents double loading when refreshing the gem list.
	* test/rubygems/test_gem.rb:  Test for above

	* lib/rubygems.rb:  Bump version to 2.0.0.rc.2

Thu Jan 17 09:08:37 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/control_expressions.rdoc:  Added ? : ternary if

Thu Jan 17 08:36:04 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/miscellaneous.rdoc:  Added documentation for alias, undef,
	  BEGIN, END.
	* doc/syntax/modules_and_classes.rdoc (Constants):  Fixed unwrapped
	  paragraph with trailing whitespace.
	* doc/syntax/modules_and_classes.rdoc (Scope):  Added section pointing
	  to alias and undef documentation.
	* doc/syntax.rdoc:  Added link to miscellaneous section.

Thu Jan 17 07:50:26 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/control_expressions.rdoc (Flip-Flop):  Added a section on
	  the flip-flop.

Thu Jan 17 06:59:51 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/control_expressions.rdoc (if Expressions):  Fixed markup
	  error.  Fixes #235 on github by FlyingFoX.

Thu Jan 17 06:53:58 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/literals.rdoc (Strings):  Fixed typo.  Fixes #236 on
	  github by Doug Yun.

Wed Jan 16 18:45:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32ole/lib/win32ole.rb: use TracePoint to hook all thread
	  creation not only by Thread.new and to get rid of interference with
	  svar scope.  [Bug #7681] [ruby-core:51365]

Wed Jan 16 09:35:53 2013  Eric Hodel  <drbrain@segment7.net>

	* .document:  Removed extra space
	* lib/irb/lc/.document:  Hide help-message
	* lib/minitest/.document:  Hide README.txt
	* lib/rake/lib/.document:  Hide project.rake
	* lib/rdoc/generator/template/json_index/.document:  Hide JavaScript
	  files
	* lib/rubygems/ssl_certs/.document:  Hide PEM files.

Wed Jan 16 03:54:28 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/control_expressions.rdoc:  Omit optional "then" for if and
	  unless expressions.  Improved description of "a if a = 0.zero?"
	  NameError.  Note that "do" for for loop is optional.

Wed Jan 16 03:28:47 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/calling_methods.rdoc:  Link to defining methods.
	* doc/syntax/methods.rdoc:  Link to calling methods, fixed typo.

Wed Jan 16 03:15:00 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc:  Fixed link
	* doc/syntax/modules_and_classes.rdoc:  Fixed link
	* doc/syntax.rdoc:  Updated with links to the recently added pages

Wed Jan 16 03:05:50 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/control_expressions.rdoc (redo Statement):  Added note
	  about retry.
	* doc/syntax/exceptions.rdoc:  Added retry statement

Tue Jan 15 23:12:34 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/vpath.rb (VPath#list): default separator to PATH_SEPARATOR from
	  configure.in for make, not same name constant of File for use in ruby.

Tue Jan 15 22:30:04 2013  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ext/save-history.rb: identify rightly a status of a
	  history file that already exists [Bug #7694]. Thanks Nobuhiro IMAI
	  for this patch.

Tue Jan 15 15:55:28 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/control_expressions.rdoc:  Added description of control
	  expressions in ruby.

Tue Jan 15 13:33:00 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc (Method Names):  Added method names including
	  operator methods.
	* doc/syntax/methods.rdoc (Return Values):  Added note that assignment
	  methods ignore return values.
	* doc/syntax/precedence.rdoc:  Added document describing precedence.

Tue Jan 15 11:49:31 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc (Block Argument):  Added section on block
	  argument.  Thanks to Andy Lindeman.

Tue Jan 15 10:54:59 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/calling_methods.rdoc (Arguments):  Added improved
	  introduction to arguments including passing style and lazy
	  evaluation.  Thanks to Matt Aimonetti.
	* doc/syntax/calling_methods.rdoc (Positional Arguments):  Added
	  description for sending a message to a method with *arguments
	* doc/syntax/calling_methods.rdoc (Default Positional Arguments):
	  Added description.  Thanks to Andy Lindeman.
	* doc/syntax/calling_methods.rdoc (Block Local Arguments):
	  Added description of block locals.  Thanks to Justin Collins.
	* doc/syntax/calling_methods.rdoc (Hash to Keyword Arguments):  Added
	  section describing ** operator.  Thanks  to Justin Collins.

Tue Jan 15 10:40:18 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* test_lazy_enumerator: Test that map & flat_map also require a block

Tue Jan 15 09:22:47 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (gvl_init): Reset gvl.wait_yield explicitly when
	  fork()ing. Patch by Apollon Oikonomopoulos. Thanks!
	  [Bug #7693][ruby-core:51424]

Tue Jan 15 09:27:56 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/calling_methods.rdoc (Receiver):  Added :: as pointed out
	  by Tony Arcieri
	* doc/syntax/calling_methods.rdoc (Block Argument):  Fixed { } block
	  examples as pointed out by David Copeland.

Tue Jan 15 09:10:29 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc (Array/Hash Argument):  Moved above Keyword
	  Arguments
	* doc/syntax/methods.rdoc (Keyword Arguments):  Described ** for
	  gathering arbitrary keyword arguments.

Tue Jan 15 08:56:37 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/calling_methods.rdoc:  Added document describing method
	  calls.

Tue Jan 15 07:39:21 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/top_level.rb:  Fixed extension trimming for page names in
	  RDoc HTML output.  [ruby-trunk - Bug #7673]
	* test/rdoc/test_rdoc_top_level.rb:  Test for above.

Mon Jan 14 23:06:41 2013  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ext/save-history.rb: outputs its history to
	  owner-only-readable file and change the permission of a file that
	  already exists [Bug #7694]. Thanks Nobuhiro IMAI for bug reports.

Mon Jan 14 17:12:48 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_flat_map_func): flat_map should call each only
	  when the value of a block returns a forcable object.
	  [ruby-core:51401] [Bug #7690]

	* enumerator.c (lazy_flat_map): add documentation.

	* test/ruby/test_lazy_enumerator.rb: related test.

Mon Jan 14 16:42:28 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: Require block for Lazy#{take|drop}_while [Bug #7692]

Mon Jan 14 14:41:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_s): use CRuby style.

Mon Jan 14 14:39:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c: use `RB_TYPE_P(x, t)` instead of
	  `TYPE(x) == t`.

Mon Jan 14 10:18:56 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: Fix size for Enumerator::Lazy#flat_map

Mon Jan 14 07:12:52 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix/lup_decomposition: Fix bugs with LUP Decomposition of
	  rectangular matrices. [rubyspec:ba849801a85]

Mon Jan 14 06:46:53 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* regparse.c (add_ctype_to_cc): don't check dup warn on adding
	  negative ctype to cclass. [Bug #7471] [ruby-core:50344]

Mon Jan 14 06:06:03 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix/eigenvalue_decomposition: Backport bugfix of Jama 1.0.3
	  [rubyspec:df87040be371]

Sun Jan 13 16:45:00 2013  Zachary Scott <zachary@zacharyscott.net>

	* ext/psych/yaml/scanner.c: Fix typos, patch by James Dabbs
	  [Github tenderlove/psych#118]

Sun Jan 13 15:00:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_sub):
	  need to specify precision for converting Rational and Float.
	  [ruby-dev:46544] [Bug #7404]

	* ext/bigdecimal/bigdecimal.c (BigDecimal_mult): ditto.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): ditto.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): ditto.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_divremain): ditto.

	* test/bigdecimal/test_bigdecimal.rb: add tests for the above fixes.

Sun Jan 13 14:48:55 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix/eigenvalue_decomposition: Fix eigensystem with complex
	  eigenvectors. Patch by pypypy567.
	  [Bug #7208] [ruby-dev:46251] [rubyspec:242f8e55bd]

	* lib/matrix/lup_decomposition.rb: Fix error for rectangular matrices
	  [bug#7620] [ruby-core:51118] [rubyspec:41f833ee2]

Sun Jan 13 14:06:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb.rb, lib/prime.rb: Typos in overview
	  Patch by Ershad K [Github Fixes #234]

Sun Jan 13 13:40:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/open3.rb : Typo in Open3 overview. Patch by zed_0xff
	  [Github Fixes #233]

Sat Jan 12 17:42:00 2013  Kenta Murata  <mrkn@cookpad.com>

	* numeric.c (do_coerce): fix for the exceptions which the coerce
	  method raises.  The optimization done by r38756 is preserved.
	  [Bug #7645] [ruby-core:51213]

Sat Jan 12 16:12:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/setup.mak (-runtime-): see msvcrt from link header on mswin
	  instead of running testing executable file, for cross compiling.

Sat Jan 12 08:58:47 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: merge key values that
	  contain something besides a hash should be left in tact.

	* test/psych/test_merge_keys.rb: test for change

Sat Jan 12 07:52:47 2013  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_set_byref): support VT_UI8|VT_BYREF,
	  VT_I8|VT_BYREF in cygwin and mingw.

	* ext/win32ole/win32ole.c (ole_variant2val): ditto.

	* test/win32ole/test_win32ole_variant.rb (test_s_new_with_i8_byref):
	  ditto.

	* test/win32ole/test_win32ole_variant.rb (test_s_new_with_ui8_byref):
	  ditto.

Sat Jan 12 02:45:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* man/ruby.1 (options): include --*-encoding from r38784

Fri Jan 11 23:34:48 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ruby.c (usage): sort --*-encoding in help. (same order of -E)

Fri Jan 11 16:56:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/mkconfig.rb: use configured libdir value to fix
	  --enable-load-relative on systems where libdir is not default value,
	  overridden in config.site files.  [ruby-core:47267] [Bug #6903]

Fri Jan 11 11:59:32 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (dispose_string): use rb_str_free for freeing string in
	  parse.y. by Sokolov Yura <funny.falcon@gmail.com>
	  https://github.com/ruby/ruby/pull/87 fix GH-87

Fri Jan 11 09:56:22 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* insns.def (defineclass): private constants should not be accessed
	  by scoped module definitions.  The bug was introduced in r38495.

	* test/ruby/test_module.rb: related test.

Fri Jan 11 02:11:59 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/rbconfig/obsolete.rb (respond_to_missing?): use send because
	  RbConfig.respond_to_missing? is now private.

Thu Jan 10 22:00:58 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h (VM_DEBUG_BP_CHECK): set 0 as default.
	  This flag specifies checking BP consistency on each frame popping.
	  Now, we don't have any trouble on it, so I remove it.
	  If you feel any bugs about VM execution, then set it to 1.

Thu Jan 10 21:03:05 2013 TAKANO `takano32' Mitsuhiro <tak@no32.tk>

	* cont.c: define FIBER_USE_NATIVE as 0 in ia64.

Thu Jan 10 19:39:05 2013  TAKANO `takano32' Mitsuhiro <tak@no32.tk>

	* thread.c: fix RB_GC_SAVE_MACHINE_REGISTER_STACK define for ia64.

Thu Jan 10 17:45:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, win32/Makefile.sub ($(MKFILES)): continue if Makefile
	  unchanged.

Thu Jan 10 16:31:20 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_search_super_method): raise a TypeError
	  instead of a NotImplementedError if self is not an instance of the
	  current class.  [ruby-dev:39772] [Bug #2402]

Thu Jan 10 16:47:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tk/extconf.rb (find_tcltk_header): use have_header instead of
	  try_cpp, which is incredibly slow with VC.

Thu Jan 10 15:55:28 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* numeric.c (do_coerce): remove an unused variable.

Thu Jan 10 15:35:55 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* tool/gen_dummy_probes.rb: remove comments in probes.d to fix the
	  compilation error introduced by r38755.

Thu Jan 10 11:15:04 2013  Kenta Murata  <mrkn@cookpad.com>

	* numeric.c (do_coerce): speed optimization by using rb_check_funcall
	  instead of rb_rescue + rb_funcall.
	  This fix is based on the patch by Benoit Daloze.
	  [Bug #7645] [ruby-core:51213]

Thu Jan 10 11:15:04 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* probes.d: updating probes to be more symmetrical, adding
	  documentation.

	* load.c: ditto

Thu Jan 10 04:23:07 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: strip trailing dots from
	  floats so that Float() will not raise an exception.

	* test/psych/test_numeric.rb: test to ensure "1." can be loaded

	* test/psych/test_string.rb: make sure "1." can round trip

Thu Jan 10 03:38:40 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: ascii only binary strings
	  will be dumped as unicode.  Thanks Paul Kunysch!

	* test/psych/test_string.rb: appropriate test

Thu Jan 10 03:29:55 2013  Koichi Sasada  <ko1@atdot.net>

	* compile.c (compile_array_): modify wrong optimization.
	  A script "[print(1)]; print(2)" should output "12".
	  However, the compiler had eliminated "[print(1)]" expression
	  because it is void expression (unused array).
	  Of course, side-effect should be remained.
	  This issue is reported by Masaya Tarui.

	* bootstraptest/test_literal.rb: add a test.

Wed Jan  9 22:07:42 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* load.c (load_lock): if thread shield is destroyed and there is no
	  waiting thread, insert new thread shield into load_table.
	  [Bug #7530] [ruby-core:50645]

Wed Jan  9 21:43:32 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* load.c (load_lock): revert r38744. it should acquire new thread
	  shield.

Wed Jan  9 15:40:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (th_init, ruby_thread_init): initialize root_svar with Qnil,
	  since lep_svar_place() expects uninitialized svar to be nil, not 0.

Wed Jan  9 13:20:23 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* test/ruby/test_require.rb: improve test for r38744.
	  fix to use Tempfile instead of temporary file in current directory.
	  the patch is from nobu (Nobuyoshi Nakada).

Wed Jan  9 09:53:23 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* load.c (load_lock): fix not to delete thread shield twice.
	  it may break the shield locked by another thread.
	  [Bug #7530] [ruby-core:50645]

	* test/ruby/test_require.rb: a test for above.

Wed Jan  9 02:13:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (RBasic): to be aligned on a VALUE size
	  boundary.  [Bug #7647]

Tue Jan  8 14:41:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_core.h (rb_iseq_t): move flip_cnt from struct iseq_compile_data,
	  because it has same life span as enclosing iseq.  [Bug #7671]
	  [ruby-core:51296]

Mon Jan  7 23:43:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (rmpd_power_by_big_decimal):
	  add RB_GC_GUARD to prevent the intermediate object is GCed too early.
	  This patch was made by Yusuke Endoh.  [Bug #7044] [ruby-core:47632]

	* test/bigdecimal/test_bigdecimal.rb: add a reproduction test for
	  the issue [Bug #7044]

Mon Jan  7 21:40:36 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (Init_eval_method): main.public and main.private
	  should be private.

	* proc.c (Init_Proc): main.define_method should be private.

	* test/ruby/test_module.rb: related test.

Mon Jan  7 20:48:47 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (Init_eval): main.include should be private.
	  [ruby-core:51293] [Bug #7670]

	* test/ruby/test_module.rb (test_top_include_is_private): a new test
	  for the above change.

Mon Jan  7 20:29:50 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* NEWS: remove description about `require "refinement"'.

Mon Jan  7 20:15:49 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (Init_eval): enable Refinements by default.
	  [ruby-core:51286] [Bug #7667]

	* eval.c (rb_mod_refine, top_using): show a warning when
	  Module#refine or main.using is called at the first time.

	* ext/refinement/*: removed the extension library "refinement".

	* test/ruby/test_refinement.rb: fix for the above changes.

Mon Jan  7 17:34:22 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.
	  This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL.
	  This event is experimental one. It is possible to remove/rename
	  flag name after 2.0.1.

	* vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was
	  occurred. `:specified_line' never been returned.

Mon Jan  7 15:42:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (f_kwrest): allow bare kwrest_mark as valid syntax.  its
	  semantics is still undefined.  [Bug #7662] [ruby-core:51269]

Mon Jan  7 15:31:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (f_kwrest): reject duplicated kwrest argument name.

Mon Jan  7 15:24:10 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_threadptr_exec_event_hooks_orig): pop tag before
	  JUMP_TAG() if frame is `finish' frame.
	  Without this patch, there is an inconsistency between control
	  frame stack and tags stack.
	  [Bug #7668]

	* test/ruby/test_settracefunc.rb: add a test for above.

Mon Jan  7 15:21:48 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* Makefile.in, common.mk (fake, yes-fake, no-make): these dependencies
	  are not platform dependent.

	* win32/Makefile.sub ($(arch)-fake.rb): workaround.

Mon Jan  7 12:09:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args):
	  set keyrest hash after making rest array, so that the last element
	  will not be overwritten.  [ruby-core:51278] [Bug #7665]

Mon Jan  7 09:37:24 2013  Koichi Sasada  <ko1@atdot.net>

	* NEWS: add a NEWS entry about RubyVM.

Sun Jan  6 19:06:57 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* win32/Makefile.sub: Fix build with VC.
	  Patch by Charlie Savage. Fixes [ruby-core:51261]

Sun Jan  6 18:43:48 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* bootstraptest/test_io.rb: add a test for [ruby-dev:46834].

	* io.c (rb_cloexec_fcntl_dupfd) Use an emulation with dup(2) when
	  fcntl(2) and/or F_DUPFD is unavailable.
	  Suggested by akr.

	* configure.in (HAVE_FCNTL): NativeClient does not provide fcntl(2).

Sun Jan  6 11:11:26 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/modules_and_classes.rdoc:  Fixed typo.

Sun Jan  6 05:35:18 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/modules_and_classes.rdoc:  Added singleton classes
	  documentation.

Sun Jan  6 02:22:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/webrick/httpservlet/abstract.rb (WEBrick::HTTPServlet): Typo in
	  example. Patch by shlensky [Fixes #232 on github]

Sat Jan  5 21:15:10 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/generic_request.rb:
	  Amazon ECA API and GTE/1.3 disallow requests whose host has port
	  number if its port number equals to default port number of the
	  scheme. [Bug #7650]

Sat Jan  5 13:58:59 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/modules_and_classes.rdoc:  Improved description of methods
	  on a module or class as suggested by Tobias Buhlmann

Sat Jan  5 13:38:07 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_enumerate_lines): fix invalid byte sequence error
	  when a separator is passed. The patch is from yoshidam (Yoshida
	  Masato).
	  [Bug #7646] [ruby-dev:46827]

	* test/ruby/test_string.rb: a test for above.

Sat Jan  5 12:25:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err):
	  check stdout and stderr both.

Sat Jan  5 10:21:54 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/modules_and_classes.rdoc:  Added documentation of syntax
	  for Modules and Classes.
	* doc/syntax/methods.rdoc:  Moved some text to the Modules and
	  Classes syntax document.

Sat Jan  5 08:38:27 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc:  Added return values and scope sections,
	  slightly modified from the original patch.  Fixes #227 from github by
	  Dave Brown.

Sat Jan  5 08:21:41 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_cloexec_fcntl_dupfd): improve #ifdef condition.
	* io.c (rb_maygvl_fd_fix_cloexec): ditto.

Sat Jan  5 07:54:59 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/cleanup_command.rb:  Clean all possible gems
	  using multiple passes.  Fixes RubyGems bug #422.  Refactored for
	  maintainability.
	* test/rubygems/test_gem_commands_cleanup_command.rb:  Test for above.

Sat Jan  5 05:04:39 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* gc.c (vm_xrealloc): add a few comment why we avoid realloc(ptr,0).

Fri Jan  4 20:17:06 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* Makefile.in (RBCONFIG): Moved from common.mk in order to use the
	  variable in Makefile.in.

	* win32/Makefile.sub (RBCONFIG): Ditto.

Fri Jan  4 19:45:50 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* common.mk (run, parse): Use BTESTRUBY instead of MINIRUBY to handle
	  cross-compiling cases, e.g. NativeClient.

Fri Jan  4 17:58:16 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* common.mk (yes-btest): btest depends on also $(arch)-fake.rb and
	  rbconfig.rb on building for NativeClient.

	* Makefile.in (fake): Avoid generating $(arch)-fake.rb unless cross
	  compiling.

	* configure.in (CROSS_COMPILING): New substitution.

Fri Jan  4 16:26:45 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/doctor.rb:  Process directories in order in case the
	  filesystem doesn't.  [ruby-trunk - Bug #7618]

	  Process specifications before other directories in case of bugs.
	* test/rubygems/test_gem_doctor.rb:  Test for above.

	* lib/rubygems.rb:  Updated version.

	* test/rubygems/test_require.rb:  Fixed double require of
	  benchmark.rb.  RubyGems bug #420.

	* test/rubygems/test_gem_commands_check_command.rb:  Fixed unused
	  variable warnings.
	* test/rubygems/test_gem_commands_query_command.rb:  ditto
	* test/rubygems/test_gem_installer.rb:  ditto

Fri Jan  4 15:05:25 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/cross_reference.rb:  Fixed matching of C#=== or #===.  RDoc
	  bug #164
	* test/rdoc/test_rdoc_cross_reference.rb:  Test for above.

	* lib/rdoc/parser/changelog.rb:  Fixed parsing of dates.  RDoc bug #165
	* test/rdoc/test_rdoc_parser_changelog.rb:  Test for above.

	* lib/rdoc/parser.rb:  Fixed parsing multibyte files with incomplete
	  characters at byte 1024.  [ruby-trunk - Bug #6393]
	  Fixed handling of -E.  [ruby-trunk - Bug #6392]
	* test/rdoc/test_rdoc_options.rb:  Test for above.
	* test/rdoc/test_rdoc_parser.rb:  ditto.
	* test/rdoc/test_rdoc_parser_c.rb:  ditto.
	* test/rdoc/test_rdoc_parser_changelog.rb:  ditto.
	* test/rdoc/test_rdoc_parser_markdown.rb:  ditto.
	* test/rdoc/test_rdoc_parser_rd.rb:  ditto.
	* test/rdoc/test_rdoc_rdoc.rb:  ditto.

	* lib/rdoc/tom_doc.rb:  Fixed parsing of [] in TomDoc arguments list.
	  RDoc bug #167
	* test/rdoc/test_rdoc_tom_doc.rb:  Test for above.

	* lib/rdoc.rb:  Update version.

Fri Jan  4 11:51:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/forwardable.rb: Fix rdoc parameters for ::def_single_delegator.
	  Patch by Vladimir Andrijevik [Github Fixes #230]

Fri Jan  4 00:35:11 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	Fix failures on btest for NativeClient.
	* bootstraptest/runner.rb (nacl?): New method to distinguish NaCl
	  cross build.

	* bootstraptest/test_io.rb: Skip unsupported operations.

	* bootstraptest/test_literal.rb: ditto.

Fri Jan  4 00:29:40 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* io.c (rb_cloexec_fcntl_dupfd): Fix failures in
	  bootstrap_test/test_io.rb.  NativeClient does not support F_DUPFD
	  but supports dup2(2).

Thu Jan  3 17:46:50 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/element.rb (REXML::Elements#add): Remove too much
	  "elements" in document. Sorry...

Thu Jan  3 17:42:32 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/element.rb (REXML::Elements#each): Add missing
	  "elements" in document. [ruby-talk:402713]
	  Reported by Wesley Rishel. Thanks!!!

Thu Jan  3 15:13:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/psych/lib/psych.rb (Psych.load): Return value of
	  Psych::SyntaxError.message should be same as example.
	  Patch by Ippei Obayashi [ruby-core:51193] [Bug #7636]

Thu Jan  3 14:58:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/forwardable.rb (SingleForwardable): Fix example in overview
	  Patch by Vladimir Andrijevik [Github Fixes #231]

Thu Jan  3 14:32:47 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* configure.in (OBJCOPY):  Fixes build error for NativeClient.
	  Avoid disabling OBJCOPY for NativeClient.

	* thread_pthread.c (rb_reserved_fd_p): USE_SLEEPY_TIMER_THREAD is
	  always defined.  Fixes compilation error for NativeClient.

Wed Jan 02 03:09:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/zlib/zlib.c (Zlib::GzipReader): Fix typo by zed_0xff
	  [Fixes Github #229]

Wed Jan 02 02:29:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* hash.c (rb_hash_update): Revert documentation from r38672
	  See: https://github.com/ruby/ruby/pull/228#issuecomment-11791013

Wed Jan 02 02:16:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* hash.c (rb_hash_update): Documentation for Hash#merge and shallow
	  copies Patch by Yorick Peterse [Fixes Github #228]

Mon Dec 31 15:10:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* vm_backtrace.c: Add documentation for Kernel#caller_locations,
	  Kernel#caller, and Thread::Backtrace::Location

Mon Dec 31 13:05:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* test/ruby/test_backtrace.rb: Add test for r37957 [Feature #7434]

Sun Dec 30 23:33:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (simple_re_meta): escaped closing parenthesis has different
	  meaning.  [Bug #7610] [ruby-core:51088]

Sun Dec 30 12:09:47 2012  Charlie Somerville  <charlie@charliesomerville.com>

	* configure.in: use 4 argument form of AC_CHECK_HEADERS to force
	  autoconf to use compiler's result

Sun Dec 30 10:58:04 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/ruby/test_keyword.rb: add a test for passing hash
	  as a last argument. [ruby-dev:46712] [Bug #7529]

Sun Dec 30 10:51:29 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_insnhelper.c: set keyword hash on Proc/block calls.
	  [ruby-core:51172] [Bug #7630]

	* test/ruby/test_keyword.rb: add tests for above.

Sat Dec 29 21:57:11 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/completion.rb: treat rightly completion for symbol on irb
	  [Bug #7632].

Sat Dec 29 21:51:30 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/curses/curses.c (window_cury, window_curx, window_maxy,
	  window_maxx, window_begy, window_begx): use RB_UNUSED_VAR()
	  to suppress unused-but-set-variable warnings.

Sat Dec 29 16:45:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* iseq.c (RubyVM::InstructionSequence): rdoc formatting

Sat Dec 29 15:28:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* iseq.c (RubyVM::InstructionSequence):	Add rdoc for new iseq features
	  added from r38085, this includes ::of, #path, #absolute_path,
	  #label, #base_label, #first_lineno, and #inspect

Sat Dec 29 14:06:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* iseq.c (rb_iseq_line_trace_all, rb_iseq_line_trace_specify): Add
	  rdoc for experimental C level api of iseq, from r38076

Sat Dec 29 11:37:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_clone): attach clone to its singleton class during
	  cloning singleton class so that singleton_method_added will be called
	  on it.  based on the patch by shiba (satoshi shiba)[Bug #5283] in
	  [ruby-dev:44477].  [Bug #5283]

Sat Dec 29 10:10:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (crt_externs.h): use standard macro AC_CHECK_HEADERS.

Fri Dec 28 23:12:44 2012  Charlie Somerville  <charlie@charliesomerville.com>

	* configure.in: check for the whether crt_externs.h is present when compiling
	  for darwin (this header is missing in the iOS SDK)
	* eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if
	  not defined, include missing/crt_externs.h instead
	* hash.c: ditto
	* missing/setproctitle.c: ditto
	* missing/crt_externs.h: declare _NSGetEnviron() function and define environ
	  for iOS

Fri Dec 28 21:40:36 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/context.rb: IRB::Context#new: Check from JobManager
	  inside IRB namespace [Bug #7628]. Thanks rafaelfranca for bug
	  report and its patch.

Fri Dec 28 17:06:17 2012  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-curlies): Automatically
	  indent closing curly brackets when
	  ruby-electric-newline-before-closing-bracket is true.

Fri Dec 28 11:50:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to
	  single optional parameter unchanged without splatting.  [Bug #7621]
	  [ruby-dev:46801]

Fri Dec 28 11:17:47 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* proc.c (method_eq): fix the documentation to refer to owner.
	  [ruby-core:51105] [Bug #7613]

	* test/ruby/test_method.rb (test_alias_onwer): new test to confirm
	  that `a == b' returns false if owners of a and b are different.

Fri Dec 28 07:07:43 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* def/id.def: use split(/^/) instead of String#lines to support
	  Ruby 1.8.5 as BASERUBY.

Thu Dec 27 21:56:56 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* variable.c (rb_mod_remove_const): fix segv caused by r38558.

Tue Dec 28 01:13:48 2012  James Edward Gray II  <james@graysoftinc.com>

	* lib/csv.rb: Added more Hash methods to CSV::Row.

Thu Dec 27 23:27:15 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ruby-lex.rb: make lex_state to EXPR_END when next token
	  is an operator after SYMBEG [Bug #6378].

Thu Dec 27 21:30:21 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ruby-lex.rb: allow to handle recursive heredocs on
	  irb[Bug #5648].

Thu Dec 27 20:45:29 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* ext/stringio/stringio.c (strio_getline): fix not to raise TypeError
	  when limit is nil.
	  [Bug #7232] [ruby-core:48531]

	* test/stringio/test_stringio.rb: a test for above.

Thu Dec 27 21:08:23 2012  Charlie Somerville  <charlie@charliesomerville.com>

	* vm_core.h (VM_DEFINECLASS_TYPE): explicit cast to enum type to avoid 64->32
	  shorten warning

Thu Dec 27 20:11:29 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* ext/stringio/stringio.c (strio_ungetc): raise IOError instead of RuntimeError
	  if the string is frozen.
	  [Bug #7231] [ruby-core:48530]

	* ext/stringio/stringio.c (strio_ungetbyte): ditto.

	* test/stringio/test_stringio.rb: a test for above.

Wed Dec 26 23:55:18 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/context.rb: fix IRB::Inspector#keys_with_inspector [Bug #7598]

Wed Dec 26 23:26:15 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/context.rb: IRB::Context#use_readline= has been obsolete
	  [Bug #6339].

Wed Dec 26 21:32:46 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/context.rb: make a correct prompt from
	  IRB.conf[:IRB_NAME] on irb [Bug #6338]. Patched by sho-h.

Wed Dec 26 21:09:19 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ext/math-mode.rb: make not able to change math-mode
	  after irb starting [Bug #6302]. Patched by sho-h.

Wed Dec 26 12:52:36 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/init.rb: change default debug level for
	  irb[ruby-dev:46805], [Bug #6301].

Wed Dec 26 11:54:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: enable -fPIE when checking -pie for fixing
	  OpenBSD build error. Patch by George Koehler. Thank you!
	  [Bug #7606] [ruby-core:51082]

Wed Dec 26 07:31:24 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_enc_cr_str_copy_for_substr): empty string is always
	  valid or 7bit.

	* string.c (rb_str_enumerate_lines, rb_str_chop): reduce duplicated
	  code.

	* string.c (rb_str_enumerate_chars): prevent shared copy from GC.

Wed Dec 26 01:31:16 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/init.rb, lib/irb/context.rb: fix conf.debug_level=
	  [Bug #6301] and fix irb command option: -- irb_debug_level for irb.

Wed Dec 26 00:59:18 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ruby-lex.rb: improve RubyLex performance for large files
	  [Bug #5202]. Patch by ryanmelt.

Tue Dec 25 22:21:06 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/output-method.rb: raise right exception when
	  IRB::OutputMethod#print don't defined [Bug #6657].

Tue Dec 25 22:06:33 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_threadptr_exec_event_hooks_and_pop_frame):
	  pop a frame before JUMP_TAG() if exception occurred.
	  This change fix bug of Ruby 1.9.
	  [ruby-core:51128] [ruby-trunk - Bug #7624]

	* vm_core.h (EXEC_EVENT_HOOK_AND_POP_FRAME): add to use
	  `rb_threadptr_exec_event_hooks_and_pop_frame()'.

	* vm.c (vm_exec): use EXEC_EVENT_HOOK_AND_POP_FRAME() while
	  exception handling. While exception handling, if an exception
	  is raised in hooks, need to pop current frame and raise this
	  raised exception by hook.

	* test/ruby/test_settracefunc.rb: add a test.

Tue Dec 25 21:08:53 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/init.rb, lib/irb/lc/ja/error.rb, lib/irb/lc/error.rb:
	  raise exception when illegal RC_NAME_GENERATOR defined [Bug #6455].

Tue Dec 25 19:22:17 2012  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/workspace.rb: define method to private on top-level irb
	  [Bug #5776]. Patch by davidbalbert.

Tue Dec 25 19:09:51 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bignum.c, include/ruby/intern.h (rb_big_eql): exported.

	* thread.c (recursive_check): object_id maybe a Bignum, not Fixnum on
	  LLP64.  see also r38493 and r38548.
	  reported by Heesob Park at [ruby-core:51083] [Bug #7607], and patched
	  by shirosaki at [ruby-core:51095]

Tue Dec 25 18:53:35 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h, eval_intern.h (CHECK_STACK_OVERFLOW): move
	  CHECK_STACK_OVERFLOW() to vm_core.h and rename to
	  CHECK_VM_STACK_OVERFLOW().
	  This change is only move and rename.

	* tool/instruction.rb: catch up above changes.

	* vm.c, vm_insnhelper.c: ditto.

	* vm_insnhelper.c (vm_stackoverflow): add a function to unify
	  raising vm stackoverflow exception.

Tue Dec 25 16:16:54 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h (RUBY_VM_THREAD_VM_STACK_SIZE): change default
	  VM stack size (128 KB or  256 KB -> 512 KB or 1024 KB).
	  This re-sizing corrects smaller value introduced at r38478.
	  Newer value is same VM stack size of Ruby 1.9.
	  [ruby-dev:46797] [ruby-trunk - Bug #7603]

Tue Dec 25 13:38:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (compile_err_append, compile_warn_print, warn_print): use
	  rb_write_error_str() instead of writing to rb_stderr directly.

	* io.c (rb_write_error_str): a stopgap measure not to unblock GVL.
	  warning from require seems to still have race condition errors.

Tue Dec 25 00:59:29 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (NODE_OP_CDECL), compile.c (iseq_compile_each),
	  parse.y (stmt, arg): allow scoped constant op-assignment.
	  [ruby-core:40154] [Bug #5449]

Mon Dec 24 04:56:48 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/generic_request.rb (Net::HTTPGenericRequest):
	  set content-length to zero on empty post requests
	  by Gregory Ostermayr <gregory.ostermayr@gmail.com>
	  https://github.com/ruby/ruby/pull/201 fix GH-201

Sun Dec 23 19:09:16 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c: rename methods:
	    from Thread.async_interrupt_timing to Thread.handle_interrupt,
	    from Thread.async_interrupted? to Thread.pending_interrupt?.
	  Also rename option from `defer' to `never'.
	  [ruby-core:51074] [ruby-trunk - Feature #6762]

	* vm_core.c, thread.c: rename functions and data structure
	  `async_errinfo' to `pending_interrupt'.

	* thread.c: add global variables sym_immediate, sym_on_blocking and
	  sym_never.

	* cont.c, process.c, vm.c, signal.c: ditto.

	* lib/sync.rb, lib/thread.rb: catch up this renaming.

	* test/ruby/test_thread.rb: ditto.

Sun Dec 23 17:57:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/profiler.rb (Profiler__::PROFILE_PROC, print_profile): store
	  profile data per threads for concurrent-execution.
	  [ruby-core:22046] [Bug #1152]

	* lib/profiler.rb (Profiler__::Wrapper): support calling singleton
	  methods of an instance of BasicObject.

	* lib/profiler.rb (Profiler__::PROFILE_PROC): use TracePoint.

Sun Dec 23 16:13:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/erb.rb: typos for ERB::new link

Sun Dec 23 16:06:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/erb.rb: Document ERB::new trim_mode '-' for lines ending in -%>
	  [ruby-core:51084] [Bug #7608]

Sun Dec 23 15:25:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb/ruby-lex.rb: Add handling for %i and %I quoting to irb
	  Patch by flori [ruby-core:49550] [Bug #7392] [Github Issue #157]

Sun Dec 23 15:05:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_check_funcall_with_hook): rb_check_funcall with hook
	  which is called before calling method_missing or target method.

	* marshal.c (w_object, r_object0): use rb_check_funcall_with_hook
	  instead of respond_to? and call.

Sun Dec 23 14:52:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* re.c (rb_reg_eqq): doc: #=== is not a synonym for #=~, added example
	  [ruby-dev:46746] [Bug #7571]

Sun Dec 23 14:35:13 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (BLOCKING_REGION): if fail_if_interrupted is false ignore
	  the result of blocking_region_begin(), since it always is true in
	  that case.  suppress "uninitialized" warnings.

Sun Dec 23 09:34:07 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/check_command.rb:  Added --doctor and --dry-run
	  options to clean up after failed uninstallation.
	* test/rubygems/test_gem_commands_check_command.rb:  Test for above.

	* lib/rubygems/commands/push_command.rb:  Allow pushes from RubyGems
	  2.0.0.preview3

	* lib/rubygems/commands/update_command.rb:  Use Gem.ruby_version

	* lib/rubygems/dependency.rb:  Update style.

	* lib/rubygems/installer.rb:  Ensure installed gem specifications will
	  be useable.  Refactor.
	* test/rubygems/test_gem_installer.rb:  ditto.

	* lib/rubygems/validator.rb:  Fixed bug with unreadable files.

	* lib/rubygems.rb:  Fixed broken methods.
	* test/rubygems/test_gem.rb:  Test for above.

	* test/rubygems/test_gem_commands_push_command.rb:  Fixed overridden
	  Gem.latest_rubygems_version

Sun Dec 23 01:52:01 2012  Akinori MUSHA  <knu@iDaemons.org>

	* io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints):
	  Deprecate IO#{lines,bytes,chars,codepoints} and those of ARGF.
	  [Feature #6670]

	* ext/stringio/stringio.c (strio_lines, strio_bytes, strio_chars)
	  (strio_codepoints): Deprecate
	  StringIO#{lines,bytes,chars,codepoints}. [Feature #6670]

	* ext/zlib/zlib.c (rb_gzreader_lines, rb_gzreader_bytes):
	  Deprecate Zlib::GzipReader#{lines,bytes}. [Feature #6670]

Sat Dec 23 01:35:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/optparse.rb: Documentation for OptionParser to remove 'shadowed
	  outer local variable' from example and make obvious ARGV with
	  non-option arguments.
	  Patch by Marcus Stollsteimer [ruby-core:47460] [Bug #6997]

Sat Dec 23 00:08:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* include/ruby/intern.h: add the prototype declaration of
	  rb_num_coerce_bit.

	* numeric.c (rb_num_coerce_bit): the new coerce function for bitwise
	  binary operation.

	* bignum.c (rb_big_and): use coerce to convert the argument, which isn't
	  a Fixnum nor a Bignum, to the corresponding Integer object so that
	  bitwise operations can support Integer-mimic objects.
	  [Bug #1792] [ruby-core:39491]

	* bignum.c (rb_big_or): ditto.

	* bignum.c (rb_big_xor): ditto.

	* numeric.c (bit_coerce): ditto.

	* numeric.c (fix_and): ditto.

	* numeric.c (fix_or): ditto.

	* numeric.c (fix_xor): ditto.

	* test/ruby/test_integer.rb: add tests for the above changes.

	* test/ruby/test_bignum.rb: ditto.

Sun Dec 23 00:04:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and
	  IDs. [Bug #7574] [ruby-dev:46749]

	* string.c (rb_str_quote_unprintable): ditto.

Sat Dec 22 23:59:18 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_compile_error, rb_compile_warn, rb_compile_warning),
	  (rb_warn, rb_warning): support PRIsVALUE.

Sat Dec 22 22:04:58 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* cont.c (rb_fiber_start): unify conditions.

Sat Dec 22 21:47:55 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_io_wait_writable): use rb_thread_check_ints() instead
	  of rb_thread_fd_writable().
	* io.c (rb_io_wait_readable): ditto.

Sat Dec 22 20:31:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_const_get): symbol cannot be nested constant name.

Sat Dec 22 19:26:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_const_get): check more strictly.  [ruby-dev:46748]
	  [Bug #7573]

Wed Dec 19 02:34:48 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* cont.c (rb_fiber_start): in case of jump with TAG_FATAL,
	  enqueue error into async_errinfo_queue, because you cannot call
	  TH_TAG_JUMP() in this function. [ruby-dev:45218]  [Bug #5993]

	* thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL)
	  can be popped from async_errinfo_queue.

	* vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441.
	  rb_vm_make_jump_tag_but_local_jump() shouldn't return exception
	  in case of state == TAG_FATAL.

	* test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate
	  Thread.exit should terminate current Thread.

Sat Dec 22 13:15:08 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* gc.c (obj_id_to_ref): add a macro to treat Bignum object id.
	  This follows the change r38493.

	* gc.c (id2ref): fix for working fine with Bignum object id on x64
	  Windows.
	* gc.c (wmap_finalize): ditto.

Sat Dec 22 11:30:21 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* struct.c (make_struct): remove junk ID check to allow members who
	  have junk name like "foo\000".
	* test/ruby/test_struct.rb: Test for above.
	  [Bug #7575] [ruby-dev:46750]

Sat Dec 22 05:34:54 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Requests may be created with a URI which sets the
	  Host header.  Responses contain the requested URI for easier redirect
	  following.  [ruby-trunk - Feature #6482]
	* lib/net/http/generic_request.rb:  ditto.
	* lib/net/http/response.rb:  ditto.
	* NEWS (net/http):  Updated for above.
	* test/net/http/test_http.rb:  Tests for above.
	* test/net/http/test_http.rb:  ditto.
	* test/net/http/test_httpresponse.rb:  ditto.

Sat Dec 22 02:35:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb/slex.rb(#match): Typo, should be D_DETAIL
	  [ruby-core:51071] [Bug#7600]

Sat Dec 22 02:29:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb/input-method.rb, lib/irb.rb: Typo in
	  InputMethod#readable_atfer_eof? to #readable_after_eof?
	  [ruby-core:51069] [Bug #7599]

Sat Dec 22 02:19:38 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_dump.c (rb_vm_bugreport): revert r38533.
	* addr2line.c (fill_lines): add ELF sanity check.
	  [Bug #7597] [ruby-dev:46786]

Sat Dec 22 02:05:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb/inspector.rb, lib/irb/context.rb: Move IRB::INSPECTORS and
	  class methods to IRB::Inspector [ruby-core:51067][Bug #7598]

Sat Dec 22 00:28:46 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* object.c (rb_obj_hash): shouldn't assume object_id can be long.
	  based on a patch by Heesob Park at [ruby-core:51060].
	  cf. [Backport #7454]

Fri Dec 21 23:15:25 2012  Kouhei Sutou  <kou@cozmixng.org>

	* ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
	  CPtr -> Pointer.
	* test/fiddle/test_c_struct_entry.rb
	  (Fiddle::TestCStructEntity#test_aref_pointer):
	  Added the test for the above.

Fri Dec 21 23:12:05 2012  Kouhei Sutou  <kou@cozmixng.org>

	* ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
	  CPtr -> Pointer.
	* test/fiddle/test_c_struct_entry.rb
	  (Fiddle::TestCStructEntity#test_aref_pointer_array):
	  Added the test for the above.

Fri Dec 21 22:43:36 2012  Kouhei Sutou  <kou@cozmixng.org>

	* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):
	  CPtr -> Pointer.
	* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
	  Added the test for the above.

Fri Dec 21 22:34:17 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_iseq.rb: disable a test which checks features
	  removed at r38532.

Fri Dec 21 22:02:00 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/{dir.h,win32.c} (rb_w32_readdir): removed old rb_w32_readdir()
	  and renamed from rb_w32_readdir_with_enc().
	  [ruby-core:24864] [Feature #1927]

	* dir.c (READDIR): follow above change.

Fri Dec 21 21:12:54 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* vm_dump.c (rb_vm_bugreport): commentout addr2line call temporarily
	  in order to avoid segv. anyone can fix addr2line?
	  [Bug #7597] [ruby-dev:46786]

Fri Dec 21 20:38:28 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (Init_ISeq): remove definition of the following methods:
	  ISeq#line_trace_all and ISeq#line_trace_specify because they are
	  half baked.
	  C APIs are remained as experimental. These functions will be
	  renamed, removed their parameters may be changed.
	  You can use these methods by C exts. Please give us your comments.

Fri Dec 21 20:21:04 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (tracepoint_new): add code to support specified thread.
	  But not tested and this feature is not supported officially.

Fri Dec 21 19:37:15 2012  Koichi Sasada  <ko1@atdot.net>

	* ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
	  each time.
	  `bind->env' may update after `eval()'.
	   [Bug #7536]

Fri Dec 21 18:46:50 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/debug.h, vm_core.h: define rb_trace_arg_t at
	  include/ruby/debug.h (move from vm_core.h).

Fri Dec 21 17:48:15 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h, vm_trace.c: fix multi-threading bug for tracing.
	  Move `trace_arg' from rb_tp_t::trace_arg to rb_thread_t::trace_arg.
	  `trace_arg' may changed by multiple threads.
	  rb_thread_t::trace_arg can represent rb_thread_t::trace_running
	  (null or non-null) and rb_thread_t::trace_running is removed.
	  After that, `rb_tp_t' is not needed to check tracing or not
	  (A running thread knows tracing or not). This is why I remove
	  tp_attr_check_active() and make new function get_trace_arg().

	  And this modification disable to work the following code:
	    TracePoint.trace{|tp|
	      Thread.new{p tp.event} # access `tp' from other threads.
	    }
	  I believe nobody mix threads at trace procedure.
	  This is current limitation.
	  [Bug #7590]

	* cont.c (fiber_switch, rb_cont_call): use rb_thread_t::trace_arg
	  instead of rb_thread_t::trace_running.

	* test/ruby/test_settracefunc.rb: add a multi-threading test.

Fri Dec 21 16:38:08 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/id.h.tmpl (ID2ATTRSET): compile time constant macro for
	  ID_ATTRSET.

	* defs/id.def (KeywordError): check duplication.

	* defs/id.def: support for other scope IDs,
	  ID_{INSTANCE,GLOBAL,CONST,CLASS}.

Fri Dec 21 14:45:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb.rb, lib/irb/*: Documentation for IRB

Fri Dec 21 11:31:02 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rake/*:  Updated to rake 0.9.6
	* doc/rake/*:  ditto
	* test/rake/*:  ditto

Fri Dec 21 08:56:34 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* vm_trace.c (rb_suppress_tracing): remove unused variable 'vm_tracing'

Fri Dec 21 01:01:45 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* lib/irb/completion.rb (CompletionProc): support completion of
	  instance variables. [ruby-dev:46710] [Bug #7520]

Thu Dec 20 20:58:25 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* vm_trace.c (rb_suppress_tracing): bugfix for vm->trace_running
	  counter. And if tracing is already true, vm_trace_running ops is
	  skipped to control overflow.

Thu Dec 20 18:29:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without
	  outermost parentheses.

Thu Dec 20 17:29:00 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* NEWS: fix the description for Refinements.

Thu Dec 20 16:53:59 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_core.h (rb_vm_defineclass_type_t),
	  compile.c (iseq_compile_each), insns.def (defineclass): change the
	  meaning of the third operand of defineclass as follows:
	    lower 3bits: the type of the defineclass
	                   0 = class, 1 = singleton class, 2 = module
	    4th bit: a flag represents whether the defineclass is scoped
	               0 = not scoped (e.g., class Foo)
		       1 = scoped (e.g., class Bar::Baz)
	    5th bit: a flag represents whether the superclass is specified
	               0 = not specified (e.g., class Foo)
	               1 = specified (e.g., class Bar < Foo)
	  If the superclass is specified and is not a class, a TypeError
	  should be raised.  [ruby-dev:46747] [Bug #7572]

	* test/ruby/test_class.rb: related test.

Thu Dec 20 16:52:37 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* NEWS: announce AEAD encryption support in the OpenSSL extension.

Thu Dec 20 16:40:13 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* gc.c (nonspecial_obj_id): VALUE is not compatible with Fixnum on
	  LLP64 platform, such as 64bit Windows.
	  reported by Heesob Park at [ruby-core:50255] [Bug #7454], and the
	  fix is suggested by akr.

Thu Dec 20 16:39:04 2012  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl_cipher.c: fix errors for installations that do not
	  feature Authenticated Encryption.
	* ext/openssl/extconf.rb: detect presence of EVP_CTRL_GCM_GET_TAG to
	  determine whether Authenticated Encryption can be used.
	  [Feature #6980] [ruby-core:47426]

Thu Dec 20 15:55:46 2012  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl.c: do not use FIPS_mode_set if not available.
	* test/openssl/utils.rb: revise comment about setting FIPS mode to
	  false.
	* test/openssl/test_fips.rb: remove tests that cause errors on
	  ruby-ci.
	  [Feature #6946] [ruby-core:47345]

Thu Dec 20 15:22:59 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parser/ruby.rb:  Ignore methods defined on constants to
	  prevent modules with the names of constants from appearing in the
	  documentation.
	* test/rdoc/test_rdoc_parser_ruby.rb:  Test for the above.

Thu Dec 20 15:00:33 2012  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl_cipher.c: add support for Authenticated Encryption
	  with Associated Data (AEAD) for OpenSSL versions that support the
	  GCM encryption mode. It's the only mode supported for now by OpenSSL
	  itself. Add Cipher#authenticated? to detect whether a chosen mode
	  does support Authenticated Encryption.
	* test/openssl/test_cipher.rb: add tests for Authenticated Encryption.
	  [Feature #6980] [ruby-core:47426] Thank you, Stephen Touset for
	  providing a patch!

Thu Dec 20 12:56:53 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/markup/to_html.rb (class RDoc):  Added current heading and
	  top links to headings.
	* lib/rdoc/generator/template/darkfish/rdoc.css:  ditto
	* test/rdoc/test_rdoc_generator_markup.rb:  Test for above
	* test/rdoc/test_rdoc_markup_to_html.rb:  ditto

	* test/rdoc/test_rdoc_comment.rb:  Removed trailing whitespace.

Thu Dec 20 11:05:26 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (assert_valid_syntax): move from
	  test_syntax.rb.

	* test/ruby/envutil.rb (assert_normal_exit): validate syntax before
	  running because this assertion passes even if the code fails by
	  SyntaxError.

Thu Dec 20 10:29:58 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_pkey_dh.rb: revert special treatment of
	  FIPS-capable installations since FIPS mode is now disabled for the
	  tests.

Thu Dec 20 10:23:12 2012  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl.c: add OpenSSL.fips_mode= to allow enabling FIPS
	  mode manually.
	* test/openssl/utils.rb: turn off FIPS mode for tests. This prevents
	  OpenSSL installations with FIPS mode enabled by default from raising
	  FIPS-related errors during the tests.
	* test/openssl/test_fips.rb: add tests for FIPS-capable OpenSSL
	  installations.
	  [Feature #6946] [ruby-core:47345]

Thu Dec 20 06:59:52 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c: support variable VM/Machine stack sizes.
	  Specified by the following environment variables:
	    - RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
	      default: 128KB (32bit CPU) or 256KB (64bit CPU).
	    - RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
	      creation. default: 512KB or 1024KB.
	    - RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
	      default: 64KB or 128KB.
	    - RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
	      creation. default: 256KB or 256KB.
	  This values are specified at launched timing. You can not change
	  these values at running time.
	  Environ variables are only *hints* because:
	    - They are aligned to 4KB.
	    - They have minimum values (depend on OSs).
	    - Machine stack settings are ignored by some OSs.
	  Default values especially fiber stack sizes are increased.
	  This change affect Fiber's behavior:
	    (1) You can run more complex program on a Fiber.
	    (2) You can not make many (thousands) Fibers because of
	        lack of address space (on 32bit CPU).
	  If (2) bothers you,
	    (a) Use 64bit CPU with big memory, or
	    (b) Specify RUBY_FIBER_(VM|MACHINE)_STACK_SIZE correctly.
	  You need to choose correct stack size carefully. These values
	  are completely rely on systems (OS/compiler and so on).
	  [Feature #4614], [Bug #7212]

	* vm_core.h (rb_vm_t::default_params): add to record above settings.

	* vm.c (RubyVM::DEFAULT_PARAMS): add new constant to see
	  above setting.

	* thread_pthread.c: support RUBY_THREAD_MACHINE_STACK_SIZE.

	* cont.c: support RUBY_FIBER_(VM|MACHINE)_STACK_SIZE.

	* test/ruby/test_fiber.rb: add tests for above.

	* test/ruby/test_thread.rb: ditto.

Thu Dec 20 06:25:44 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_fiber.rb: remove a strange single quote character.
	  With this character, this script exits by SyntaxError.

Thu Dec 20 01:03:00 2012  Zachary Scott  <zachary@zacharyscott>

	* ext/.document: Add missing ext modules to .document
	  Patch by Ryunosuke SATO [Fixes Github #224]

Wed Dec 19 23:52:16 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ruby.c (load_file_internal): use original C string as the filename
	  for parser.
	  reported by whiteleaf at [ruby-list:49085] [ruby-dev:46738]
	  [Bug #7562]

Wed Dec 19 23:36:12 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* marshal.c (marshal_dump, marshal_load): fix SEGV during make rdoc
	  and test failure in TestMarshal#test_gc and test_context_switch
	  on SPARC Solaris 10 compiled with Oracle Solaris Studio 12.3.
	  [Bug #7591] [ruby-dev:46772]

Wed Dec 19 19:34:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_const_get): nul byte is invalid as constant name.

Wed Dec 19 17:54:18 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* vm_trace.c (rb_threadptr_exec_event_hooks): get rid of race
	  condition. [Bug #7589] [ruby-dev:46763]

Wed Dec 19 16:30:28 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/literals.rdoc:  Added 0d decimal format.  Thanks Nobu!

Wed Dec 19 16:19:36 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc:  Fixed typo.  Thanks to Josh Susser.

Wed Dec 19 16:18:22 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/query_command.rb:  Refactored to improve
	  maintainability.
	* test/rubygems/test_gem_commands_query_command.rb:  Note default gems
	  in gem list details.

	* lib/rubygems/uninstaller.rb:  Detect all gems for uninstallation.
	  This allows duplicate installs of default gems to be removed.
	* lib/rubygems/specification.rb:  Allow use of ::each_spec.
	* lib/rubygems/test_case.rb:  Added install_default_gems.
	* test/rubygems/test_gem_commands_uninstall_command.rb:  Moved test
	  down to the uninstaller tests.
	* test/rubygems/test_gem_uninstaller.rb:  Test for uninstallation of
	  default gems and duplicate default gems.

Wed Dec 19 15:23:50 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc:  Add () around keyword arguments example for
	  consistency.  Thanks to Josh Susser.

Wed Dec 19 01:51:24 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* vm.c (rb_vm_jump_tag_but_local_jump): remove unnecessary 2nd
	  argument.

	* load.c (rb_load_internal): ditto.

	* eval_intern.h (rb_vm_jump_tag_but_local_jump): ditto.

Tue Dec 18 18:57:58 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_io_wait_writable): don't use rb_thread_wait_fd()
	  because it is for waiting until io readable.

	* io.c (rb_io_wait_writable): always use rb_thread_fd_writable()
	  instead of bare rb_wait_for_single_fd(). we shouldn't ignore
	  return value.
	* io.c (rb_io_wait_readable): ditto. always use rb_thread_wait_fd().

Tue Dec 18 18:55:33 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_wait_fd_rw): fix infinite loop bug.
	  rb_wait_for_single_fd() never return positive number.

Tue Dec 18 17:24:40 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/encoding.rb:  Do not remove #! line from document when
	  setting encoding.  This allows ruby executables to be parsed as ruby
	  files.
	* test/rdoc/test_rdoc_encoding.rb:  Test for above.

	* lib/rdoc/parser.rb:  Set the parser file name of ruby executables
	  correctly.
	* test/rdoc/test_rdoc_parser.rb:  Test for above.

Tue Dec 18 16:46:15 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/literals.rdoc:  Used simplified heredoc example that
	  doesn't include method definition.  Added heredoc with backticks.

Tue Dec 18 16:38:51 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/store.rb:  Work around RDoc stores from older versions of
	  RDoc.
	* test/rdoc/test_rdoc_store.rb:  Test for above.

Tue Dec 18 16:31:20 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/ruby_lex.rb:  Return a TkHEREDOC instead of a TkSTRING when
	  the heredoc identifier is followed by a line-end.  This allows proper
	  display of some HEREDOCs in source view.
	* lib/rdoc/ruby_token.rb:  Added TkHEREDOC
	* test/rdoc/test_rdoc_ruby_lex.rb:  Test for above.

Tue Dec 18 09:45:14 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* vm.c (rb_vm_make_jump_tag_but_local_jump): take care of the case
	  TAG_JUMP() with TAG_FATAL (ex. rb_fatal()). [ruby-core:50917]
	  [Bug #7570]

	* test/ruby/test_fiber.rb (test_fatal_in_fiber): add a test for above.

	* ext/-test-/fatal/extconf.rb, ext/-test-/fatal/rb_fatal.c: ditto.

Tue Dec 18 13:17:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* vm_trace.c (tracepoint_attr_defined_class): Clean up rdoc for
	  TracePoint#defined_class

Tue Dec 18 12:15:59 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/specification.rb:  Fixed ruby output of requirements
	  with multiple version specifiers.
	* test/rubygems/test_gem_ext_cmake_builder.rb:  Only look for specific
	  lines in cmake output.  Should fix [ruby-trunk - Bug #7579]

Tue Dec 18 11:45:26 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/literals.rdoc:  Added 0o octal integers.

Tue Dec 18 12:28:52 2012  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* test/openssl/test_ssl.rb: Use :TLSv1_2_client explicitly in
	  test_tls_v1_2 to prevent upstream bug.
	  [Bug #7197] [ruby-dev:46240]

Tue Dec 18 11:52:34 2012  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/lib/ssl.rb: Enable insertion of empty fragments as a
	  countermeasure for the BEAST attack by default. The default options
	  of OpenSSL::SSL:SSLContext are now:
	  OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
	  [Bug #5353] [ruby-core:39673]

	* test/openssl/test_ssl.rb: Adapt tests to new SSLContext default.

	* NEWS: Announce the new default.

Tue Dec 18 06:36:12 2012  Koichi Sasada  <ko1@atdot.net>

	* method.h: remove `VM_METHOD_TYPE_CFUNC_FRAMELESS' method type.
	  This method type is for optimized CFUNC such as Fixnum#+ and so on.
	  This feature is half-baked and no way to use them.
	  [Background]
	  Now, VM has opt_plus instructions to optimize `+' methods for
	  some Classes (such as Fixnum, Float (flonum)). We call this
	  type of instructions as `specialized instructions'.
	  This simple technique improve simple program dramatically.
	  However, we can make specialized instructions for only several
	  types (classes) and selectors (method names) because a large
	  instruction will be slow. In other words, this technique has no
	  extensibility.
	  To overcome this problem, VM_METHOD_TYPE_CFUNC_FRAMELESS was
	  introduced (r37198). This type is a variant of CFUNC, but called
	  their functions directly without building a method frame.
	  Any CFUNC method can be defined as frameless methods if a method
	  is not needed to make method frame. Frameless methods are faster
	  as specialized instructions (a bit slower, but no need to care).
	  No problem described at
	  http://charlie.bz/blog/why-do-singleton-methods-make-ruby-slow
	  because this technique doesn't see class, but see method body
	  itself. Alias is also no problem.
	  [Problem]
	  However, we can't set frameless method type for polymorphic methods
	  such as Array#[]. Necessity for method frame depends on which
	  parameter type. For example, Fixnum#+ needs method frame if
	  coerce is needed. Current VM_METHOD_TYPE_CFUNC_FRAMELESS is not
	  flexible and need more tuning to introduce it.
	  Expected behavior of frameless method type may be:
	    result = optimized_cfunc(params); /* call optimized cfunc */
	    if (result == Qundef) { result = normal_cfunc(); }
	  This is why I say this feature is half-baked.
	  We need to learn primitive method in Smalltalk more.
	  (I heard this name at RubyConf Taiwan this month. Thanks!)
	  [Conclusion]
	  I remove this feature and consider again.
	  This feature goes to next minor (2.1?).
	  Nobody may use this feature and there is no compatibility issue.

	* proc.c (rb_method_entry_arity): ditto.

	* vm_eval.c, vm_insnhelper.c, vm_method.c: ditto.

Tue Dec 18 04:58:22 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (fill_id_and_klass): TracePoint#defined_class returns
	  singleton class. `set_trace_func' passed attached class (which is
	  attached/modified by singleton class) by 6th block parameter if it
	  is singleton class. Previous behavior follows this spec.
	  However, this method named `defined_class' should return singleton
	  class directly because singleton methods are defined in singleton
	  class. There are no compatible issue because TracePoint is introduced
	  after 2.0.
	  But compatibility with `set_trace_func' is broken. This means that
	  you can not replace all `set_trace_func' code with TracePoint
	  without consideration of this behavior.
	  [Bug #7554]

	* test/ruby/test_settracefunc.rb: change a test to catch up
	  an above change.

Tue Dec 18 03:03:10 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: speed up node mapping so
	  common cases are evaluated first.  Thanks Kevin Menard!

Tue Dec 18 02:35:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/optparse.rb: Remove 'developer documentation' section from rdoc
	  Patch by Marcus Stollsteimer [ruby-core:50526][Bug #7504]

Tue Dec 18 02:35:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/matrix.rb (#lup): typo in example [ruby-core:50946][Bug #7582]

Mon Dec 17 18:03:34 2012  Charlie Somerville  <charlie@charliesomerville.com>

	* class.c (rewrite_cref_stack, clone_method): rewrite a method's cref
	  stack when cloning into a new class to allow lexical const lookup to
	  work as expected [ruby-core:47834] [Bug #7107]
	* test/ruby/test_class.rb (class TestClass): related test

Mon Dec 17 13:56:55 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (io_flush_buffer_sync2): avoid to return 0. because
	  rb_thread_call_without_gvl2 uses 0 internally.
	* io.c (io_flush_buffer_async2): adapt the above.

Mon Dec 17 12:05:32 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/methods.rdoc:  Added a description of singleton methods.

Mon Dec 17 11:35:57 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/.document:  Added doc/syntax

Mon Dec 17 11:25:32 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax.rdoc:  Added syntax guide table of contents
	* doc/syntax/exceptions.rdoc:  Syntax guide for exceptions
	* doc/syntax/literals.rdoc:  Syntax guide for literals
	* doc/syntax/methods.rdoc:  Syntax guide for methods

Mon Dec 17 07:59:40 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Updated VERSION

	* test/rubygems/test_gem_installer.rb:  Fixed ambiguous first argument
	  warning.

	* test/rubygems/test_gem_rdoc.rb:  RDoc generation depends on installed
	  version of RDoc.

Sun Dec 16 02:04:41 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (rb_sigaltstack_size): cast sysconf() return value
	  explicitly. Fix compile error on Mac OS X.

Sun Dec 16 00:39:43 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* cont.c (rb_fiber_start): don't enqueue Qnil to async_errinfo_queue.
	  rb_vm_make_jump_tag_but_local_jump() could return Qnil (ex. when
	  finished by Thread.exit). [ruby-dev:45218] [Bug #5993]

	* test/ruby/test_fiber.rb (test_exit_in_fiber): add test for it.

Sat Dec 15 23:56:51 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/fiddle/pointer.c (rb_fiddle_ptr2cptr): fix error message
	  forgotten to be changed from DL to Fiddle.

Sat Dec 15 23:14:32 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (default_handler): remove rb_register_sigaltstack()
	  call. sigaltstack was already registered when creating threads.

Sat Dec 15 23:08:56 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (rb_sigaltstack_size): new. calculate stack size for
	  sigsegv handler. enlarge value when x86 or x86_64 on Linux.
	  Linux has very small MINSIGSTKSZ size (2048 bytes) and
	  our sigsegv routine need 5KiB at least. [Bug #7141]
	* internal.h: add declaration of rb_sigaltstack_size().
	* vm_core.h: remove ALT_STACK_SIZE definition.

	* signal.c (rb_register_sigaltstack): replace ALT_STACK_SIZE with
	  rb_sigaltstack_size();
	* gc.c (Init_heap): ditto.
	* vm.c (th_init): ditto.

Sat Dec 15 18:24:21 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* rational.c (f_round_common): should check overflow.

Sat Dec 15 18:00:00 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* rational.c (float_rationalize): reduced.

Sat Dec 15 14:18:44 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (finish_writeconv): uses rb_write_internal2 if
	  fptr->write_lock have.

Sat Dec 15 13:57:08 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_owned_p): remove static.
	* io.c (io_flush_buffer): don't hold mutex if already have.
	  Now recursive lock may occur when following scenario.
	  fptr_finalize -> finish_writeconv_sync -> finish_writeconv
	  -> io_fflush.

Sat Dec 15 13:38:30 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (io_flush_buffer): uses io_flush_buffer_async2 instead of
	  io_flush_buffer_async.
	* io.c (io_flush_buffer_async2): new helper function for
	  io_flush_buffer. It uses rb_thread_call_without_gvl2() instead
	  of rb_thread_io_blocking_region.
	* io.c (io_flush_buffer_sync2): new helper function for
	  io_flush_buffer_async2.

Sat Dec 15 13:04:26 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (internal_write_func2): new helper function for rb_write_internal2().
	* io.c (rb_write_internal2): new function. it uses
	  rb_thread_call_without_gvl2() instead of rb_thread_io_blocking_region().
	* io.c (rb_binwrite_string): uses rb_write_internal2 instead of
	  rb_write_internal. [Bug #7134]

Sat Dec 15 12:55:29 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_io_wait_writable): add to call rb_thread_wait_fd()
	  likes rb_io_wait_readable.

Sat Dec 15 11:54:50 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_io_wait_writable): don't call rb_thread_fd_writable()
	  when EINTR. EINTR mean signal interrupt was happen. We don't
	  need any wait.

Sat Dec 15 11:53:36 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_wait_fd_rw): remove silly rb_thread_alone()
	  check.

Sat Dec 15 10:22:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_thread_polling): revert but deprecate.

	* include/ruby/intern.h (rb_thread_polling): deprecate.

Sat Dec 15 08:37:01 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* test/rubygems/test_gem_ext_cmake_builder.rb (test_self_build):
	  get rid of false positive.

Sat Dec 15 08:05:56 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_thread.rb (test_uninitialized, test_backtrace,
	test_thread_timer_and_interrupt, test_thread_join_in_trap,
	test_thread_join_current, test_thread_join_main_thread,
	test_main_thread_status_at_exit, test_thread_status_in_trap,
	test_thread_status_raise_after_kill, test_mutex_owned,
	test_mutex_owned2): move these tests from TestThreadGroup class
	  to TestThread because they are not thread group tests.

	* test/ruby/test_thread.rb (test_thread_status_raise_after_kill):
	  add t.join.

	* test/ruby/test_threadgroup.rb: new file. moved ThreadGroup test
	  from test_thread.rb.

Sat Dec 15 08:02:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_thread.rb (TestThread::Thread::new.): remove
	  th.abort_on_exception change. Test template shouldn't change
	  global flag. It prevent to test a normal case.

Sat Dec 15 06:15:14 2012  Eric Hodel  <drbrain@segment7.net>

	* configure.in (HAVE_GCC_ATOMIC_BUILTINS):  Set -march=i486 to enable
	  __sync_val_compare_and_swap.  Patch by KOSAKI Motohiro.
	  [ruby-trunk - Bug #7485]

Sat Dec 15 03:42:34 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/.document: add fiddle/pointer.c, fiddle/handle.c, and
	  fiddle/win32/lib as documentation.

Sat Dec 15 03:06:40 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (rb_file_flock): use rb_thread_wait_for() instead of
	  rb_thread_polling(). When getting EAGAIN, we need to wait a
	  while even if no multi threading.
	* thread.c (sleep_for_polling, rb_thread_polling) removed.

Sat Dec 15 00:03:31 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (rb_f_kill): remove rb_thread_polling() because this
	  has no good effect and makes meaningless 100ms delay. 1)
	  when sending signal to another process, waiting has just silly.
	  2) when sending signal to current process, 100ms is often not
	  enough time to wait. It depend on kernel behavior. And,
	  rb_thread_polling() doesn't make sense anyway. When rb_thread_alone()
	  is true, it doesn't wait at all and Process.kill() users don't
	  expect threading changes Process.kill() behavior. [Bug #7560]

Fri Dec 14 17:10:57 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_params): parser_tokline to track the line number at
	  which token started.  [ruby-dev:46737] [Bug #7559]

	* parse.y (fcall): operation with starting line number.

	* parse.y (command, primary, method_call): point method name line.

	* parse.y (gettable_gen): return token line for __LINE__.

Fri Dec 14 16:56:59 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_call_super_method): remove volatile introduced
	  in r38365.

	* vm_insnhelper.c (vm_call_method): use __forceinline to prevent
	  VC++ to make vm_call_general and vm_call_super_method as the same
	  method.  Thanks, Heesob Park.  [Bug #7556] [ruby-core:50867]

Fri Dec 14 14:59:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
	  take file and line by using caller_locations if not given.

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
	  count assertions in separated tests.

Fri Dec 14 14:16:42 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/rubygems_hook.rb:  Fixed generation of documentation.
	  Disabled rdoc generation by default to match RubyGems defaults.
	  Reduced diff with RubyGems::RDoc.
	* test/rdoc/test_rdoc_rubygems_hook.rb:  Tests for the above.
	* test/rubygems/test_gem_rdoc.rb:  ditto.

	* lib/rdoc/store.rb:  Removed useless variable assignment

Fri Dec 14 13:58:40 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/rdoc_command.rb:  When overwriting
	  documentation, remove existing documentation first.

	* lib/rubygems/server.rb:  Fixed documentation links.
	* test/rubygems/test_gem_server.rb:  Test for the above.

	* lib/rubygems/rdoc.rb:  Reduced diff with RDoc::RubyGemsHook
	* test/rubygems/test_gem_rdoc.rb:  ditto

Fri Dec 14 04:08:05 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
	  added to execute given test source on separate process,
	  catch its resulted exception and raise it on main process.

Fri Dec 14 07:43:44 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: quote strings that begin
	  with non-word characters.  Thanks Alex Tambellini!
	* test/psych/test_yaml.rb: appropriate test case

Thu Dec 13 23:14:17 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_call_super_method): a workaround for the
	  failure of TestRefinement#test_refine_recursion in Windows.
	  See [ruby-core:50871] for details.

Thu Dec 13 23:10:52  Charlie Somerville  <charlie@charliesomerville.com>

	* object.c (Init_Object): use rb_mod_init_copy for Class#initialize_copy
	* class.c (rb_class_init_copy): rename to class_init_copy_check, performs type
	  checks on arguments to prevent reinitialization of initialized class
	  [ruby-core:50869] [Bug #7557]
	* class.c (rb_mod_init_copy): use class_init_copy_check if receiver is T_CLASS
	* test/ruby/test_class.rb (class TestClass): related test

Thu Dec 13 16:53:10 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/class_module.rb:  Fixed duplicate comments for classes and
	  modules from C.
	* test/rdoc/test_rdoc_class_module.rb:  Test for the above.

	* lib/rdoc/parser/c.rb:  Reload C variable names to allow proper
	  updates of an ri store for C files.
	* lib/rdoc/rdoc.rb:  ditto.
	* lib/rdoc/store.rb:  ditto.
	* test/rdoc/test_rdoc_parser_c.rb:  Test for the above.
	* test/rdoc/test_rdoc_store.rb:  ditto.

Thu Dec 13 14:20:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb*: merge doc from doc/irb/ird.rd and improve overall
	  documentation of IRB
	* doc/irb/irb.rd: remove stale documentation

Thu Dec 13 14:10:00 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* marshal.c (r_entry0): don't taint classes and modules because
	  Marshal.load just returns the dumped classes and modules.
	  [Bug #7325] [ruby-core:49198]

	* test/ruby/test_marshal.rb: related test.

Thu Dec 13 14:10:13 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_require.rb (TestRequire#test_loaded_features_encoding):
	  need to check compatibility, not equality of encodings.

Thu Dec 13 14:02:15 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (rb_file_join): check encoding compatibility before joining
	  strings.

Thu Dec 13 13:06:27 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (umethod_bind): allow another form of method transplanting
	  from a module via UnboundMethod.  [ruby-core:34267][Feature #4254]

Thu Dec 13 12:07:25 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* include/ruby/ruby.h (RB_UNUSED_VAR): new macro to suppress
	  warnings for unused variables.

	* ext/bigdecimal/bigdecimal.c (ENTER): use RB_UNUSED_VAR() to
	  suppress annoying warnings by -Wunused-but-set-variable in gcc 4.6.

Thu Dec 13 11:22:33 2012  Koichi Sasada  <ko1@atdot.net>

	* method.h: remove "VM_METHOD_TYPE__MAX" from rb_method_type_t.
	  rb_method_type_t is not a number and "_MAX" causes misunderstanding.

	* proc.c (rb_method_entry_arity): ditto.

	* vm_eval.c (vm_call0_body): ditto.

	* vm_insnhelper.c (vm_call_method): ditto.

Wed Dec 12 21:40:45 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/tmpdir.rb (Dir::Tmpname#create): deal with a prefix name which
	  starts with tilde as a plain name, not expanding as home directory.
	  [ruby-core:50793] [Bug #7547]

Wed Dec 12 19:48:59 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: merge JSON 1.7.5.
	  fix tests and other fixes.

Wed Dec 12 18:30:29 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* class.c (rb_prepend_module): move refined methods from the origin
	  of a class to the class, because refinements should have priority
	  over prepended modules.

	* test/ruby/test_refinement.rb: related test.

Wed Dec 12 18:27:09 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (zone_str): lookup or insert by using st_update() at once.

Wed Dec 12 15:30:11 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: add -fno-omit-frame-pointer if libexecinfo is used.
	  At least on FreeBSD ruby will crash on getting C backtrace
	  when it is compiled with other than -O0.

	* vm_dump.c: enable backtrace on FreeBSD even if with optimizations.

Wed Dec 12 16:08:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_normalized_file_list_non_file_directory):
	  use File::NULL for portability if possible.

Wed Dec 12 16:07:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* method.h (rb_method_flag_t): name a magic number for NOEX_SAFE and
	  NOEX_WITH as NOEX_SAFE_SHIFT_OFFSET.

	* method.h (rb_method_type_t, method_optimized_type): C89 forbids a
	  comma after the last element in enum.

	* proc.c (rb_method_entry_arity), vm_eval.c (vm_call0_body),
	  vm_insnhelper.c (vm_call_method): add VM_METHOD_TYPE__MAX case.

Wed Dec 12 14:16:35 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/class_module.rb:  Added RDoc::ClassModule#documented? which
	  checks comment_location.  Hide RDoc::ClassModule#comment=.
	* test/rdoc/test_rdoc_class_module.rb:  Test for above.

	* lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml:
	  Fix display of the table of contents in the sidebar.

	* lib/rdoc/generator/template/darkfish/table_of_contents.rhtml:
	  Use #comment_location when displaying classes or modules.

	* test/rdoc/test_rdoc_store.rb:  Use comment_location.

Wed Dec 12 13:40:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_getivar): no uninitialized instance variables
	  warnings for non-object if attr method.

Wed Dec 12 06:43:37 2012  Benoit Daloze  <eregontp@gmail.com>

	* iseq.c (rb_iseq_parameters): fix limit for optional arguments.

	* test/ruby/test_keyword.rb: tests for above.

	* vm_core.h (struct rb_iseq_struct): update documentation
	  with keyword arguments. [Bug #7540] [ruby-core:50735]

Wed Dec 12 03:45:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (vm_exec): pass exceptions while handling an exception.

	* vm_trace.c (rb_threadptr_exec_event_hooks): propagate exceptions.
	  revert r38293 partially.

Wed Dec 12 03:09:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sample/test.rb (Progress#initialize): add --verbose option and show
	  messages in one line unless --verbose is given.

Wed Dec 12 01:47:02 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_using_refinement): make the method table of an iclass
	  for a refinement that of the refinement, not that of the origin of
	  the refinement, which is set by rb_include_class_new().  This
	  change is needed to make module prepend into a refinement work
	  properly.

	* test/ruby/test_refinement.rb: related test.

Wed Dec 12 01:05:04 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/make-snapshot: add --disable-rubygem to both MINIRUBY and RUBY.
	  On making miniprelude.c, it seems use MINIRUBY. this fixes #7541
	  but rubygems also needs to be fixed for older rubies.

Wed Dec 12 00:32:11 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* test/dl/test_func.rb (test_name_with_block, test_bind, test_qsort1):
	  call unbind to release the callback closure because maximum number
	  of callbacks is limited to DL::MAX_CALLBACK (== 5) with pure DL
	  without Fiddle.

Wed Dec 12 00:13:34 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/dl/lib/dl/func.rb (DL::Function#unbind, #bound?): suppress
	  NoMethodError when Fiddle is available. [ruby-core:50756] [Bug #7543]
	* test/dl/test_func.rb (test_bound*, test_unbind*): tests for the above.

Tue Dec 11 19:38:37 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/fiddle/function.c (Fiddle::Function.new): new keyword argument
	  :name to set the name attribute.
	* ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
	  set function name by using the :name keyword argument.
	  Re-fixes r38243. [ruby-core:50566]
	* test/fiddle/test_function.rb (test_name): test for the :name keyword
	  argument and Fiddle::Function#name.

Tue Dec 11 16:57:33 2012  Eric Hodel  <drbrain@segment7.net>

	* common.mk:  Added --pages-dir to rdoc creation.  Now doc/ items show
	  up at top-level.
	* .document:  Moved doc/* entries to doc/.document
	* doc/.document:  ditto

Tue Dec 11 16:44:37 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/options.rb:  Added --page-dir option for moving pages in
	  doc/ to the top-level.
	* lib/rdoc/rdoc.rb:  ditto.
	* test/rdoc/test_rdoc_options.rb:  Test for the above.
	* test/rdoc/test_rdoc_rdoc.rb:  ditto.

Tue Dec 11 15:24:05 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/pathname/lib/pathname.rb:  Hide private methods from RDoc.

Tue Dec 11 15:11:29 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/make-snapshot (BASERUBY): add --disable-gem to avoid load gems.
	  [Bug #7541] [ruby-core:50736]

Tue Dec 11 12:00:19 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/dl/win32/extconf.rb: Fix typo
	  by Santiago Pastorino <santiago@wyeworks.com>
	  https://github.com/ruby/ruby/pull/221 fix GH-221

Tue Dec 11 01:53:37 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix: alias {row|column}_size to {row|column}_count and use
	  the latter.
	  [Bug #7369] [ruby-core:49409]

Tue Dec 11 00:26:58 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* fix the behavior when a module is included into a refinement.
	  This change is a little tricky, so it might be better to prohibit
	  module inclusion to refinements.

	* include/ruby/ruby.h (RMODULE_INCLUDED_INTO_REFINEMENT): new flag
	  to represent that a module (iclass) is included into a refinement.

	* class.c (include_modules_at): set RMODULE_INCLUDED_INTO_REFINEMENT
	  if klass is a refinement.

	* eval.c (rb_mod_refine): set the superclass of a refinement to the
	  refined class for super.

	* eval.c (rb_using_refinement): skip the above superclass (the
	  refined class) when creating iclasses for refinements.  Otherwise,
	  `using Refinement1; using Refinement2' creates iclasses:
	  <Refinement2> -> <RefinedClass> -> <Refinement1> -> RefinedClass,
	  where <Module> is an iclass for Module, so RefinedClass is
	  searched before Refinement1.  The correct iclasses should be
	  <Refinement2> -> <Refinement1> -> RefinedClass.

	* vm_insnhelper.c (vm_search_normal_superclass): if klass is an
	  iclass for a refinement, use the refinement's superclass instead
	  of the iclass's superclass.  Otherwise, multiple refinements are
	  searched by super.  For example, if a refinement Refinement2
	  includes a module M (i.e., Refinement2 -> <M> -> RefinedClass,
	  and if refinements iclasses are <Refinement2> -> <M>' ->
	  <Refinement1> -> RefinedClass, then super in <Refinement2> should
	  use Refinement2's superclass <M> instead of <Refinement2>'s
	  superclass <M>'.

	* vm_insnhelper.c (vm_search_super_method): do not raise a
	  NotImplementError if current_defined_class is a module included
	  into a refinement.  Because of the change of
	  vm_search_normal_superclass(), the receiver might not be an
	  instance of the module('s iclass).

	* test/ruby/test_refinement.rb: related test.

Mon Dec 10 18:35:25 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (rb_method_entry_without_refinements): use
	  rb_resolve_refined_method() to search superclasses if
	  me->def->orig_me is 0.  This change fixes make test-all
	  TESTS="json ruby/test_refinement.rb".

	* test/ruby/test_refinement.rb: related test.

Mon Dec 10 17:59:07 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/fiddle/win32/*: library ports from DL to Fiddle.

	* ext/dl/win32/extconf.rb: check fiddle.  often case dl compiled prior
	  to fiddle, so this change is no meaning.  in most cases, simply
	  fiddle/win32 overwrite dl/win32.

Mon Dec 10 15:23:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_trace.c (rb_threadptr_exec_event_hooks): exceptions in event
	  hooks should not propagate outside.

Mon Dec 10 15:11:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): count flip-flop state in local iseq
	  not in each iseqs, so that the keys can be other than hidden
	  strings.  [ruby-core:47253] [Bug #6899]

	* vm_insnhelper.c (lep_svar_get, lep_svar_set, vm_getspecial): store
	  flip-flop states in an array instead of a hash.

	* iseq.c (set_relation): main iseq also can has local scope.

Mon Dec 10 10:36:12 2012  Narihiro Nakamura  <authornari@gmail.com>

	* lib/irb/magic-file.rb: set a encoding, which is detected from
	  the file to read, to the internal encoding.
	  [Bug #4281][ruby-dev:43036]

Mon Dec 10 09:40:19 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/ext/cmake_builder.rb:  Added a builder for cmake.
	* lib/rubygems/ext.rb:  ditto.
	* lib/rubygems/installer.rb:  ditto.
	* test/rubygems/test_gem_ext_cmake_builder.rb:  Test for above.

Mon Dec 10 09:13:08 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/package.rb:  Omit directories when packaging gems like
	  RubyGems 1.8.x
	* test/rubygems/test_gem_package.rb:  Test for above.

Sun Dec  9 17:36:59 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_call_opt_send): Kernel#send should not use
	  refinements.

	* proc.c (mnew): Kernel#method, Kernel#public_method,
	  Module#instance_method, and Module#public_instance_method should
	  not use refinements.

	* vm_method.c (rb_method_boundp): Kernel#respond_to? should not use
	  refinements.

	* test/ruby/test_refinement.rb: related test.

Sun Dec  9 06:19:04 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/markdown/entities.rb:  Added documentation.

	* lib/rdoc/parser/ruby.rb:  Updated style

	* lib/rdoc/ruby_lex.rb:  Parse characters up to \u{FFFFF}
	* test/rdoc/test_rdoc_ruby_lex.rb:  Test for above.

Sat Dec  8 22:38:35 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_refine): don't override Module#include.  It's
	  unnecessary now because refinements are activated only in refine
	  blocks.

Sat Dec  8 22:33:26 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c: remove Module#refinements.

	* test/ruby/test_refinement.rb: remove tests for Module#refinements.

Sat Dec  8 13:17:55 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (top_using): raise a RuntimeError if using is called in a
	  module definition or a method definition.

	* test/ruby/test_refinement.rb: related test.

Sat Dec  8 15:01:35 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/cleanup_command.rb:  Skip default gems when
	  cleaning up.
	* test/rubygems/test_gem_commands_cleanup_command.rb:  Test for above.

	* lib/rubygems/commands/query_command.rb:  Fixed listing remote gems.

	* lib/rubygems/dependency_installer.rb:  Ignore non-files when looking
	  for local gems.
	* test/rubygems/test_gem_dependency_installer.rb:  Test for above.

	* lib/rubygems/uninstaller.rb:  The user must confirm uninstalling gems
	  that have dependencies.
	* test/rubygems/test_gem_uninstaller.rb:  Test for above.

	* lib/rubygems.rb (module Gem):  Updated version.

	* test/rubygems/*.pem:  Updated to run in FIPS mode.
	* test/rubygems/test_gem_security.rb:  ditto.
	* test/rubygems/test_gem_security_signer.rb:  ditto.

Sat Dec  8 12:34:01 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_search_normal_superclass): super in a
	  refinement always uses the refined class as its superclass.

	* test/ruby/test_refinement.rb: related test.

Sat Dec  8 11:59:59 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_refine): raise an ArgumentError if a given
	  block is of a Proc object.

	* vm_insnhelper.c (vm_call_method): store refined methods in inline
	  cache to improve performance.  It's safe now because blocks cannot
	  be yielded with different refinements in the new specification.

	* test/ruby/test_refinement.rb: related test.

Sat Dec  8 11:17:53 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_refine), vm_eval.c (rb_yield_refine_block):
	  Module#refine activates all refinements defined in that module
	  only in a given block.

	* string.c (sym_to_proc, sym_call): don't use refinements.

	* test/ruby/test_refinement.rb: related test.

Sat Dec  8 09:24:42 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_x509name.c:  Completed documentation for
	  OpenSSL::X509::Name.

Sat Dec  8 07:57:12 2012  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (iow_size): return size of internal object
	  for ObjectSpace.memsize_of().

	* test/objspace/test_objspace.rb: add a test.

Tue Dec 08 02:39:23 2012  James Edward Gray II  <james@graysoftinc.com>

	* lib/csv.rb: A fix for row comparison by Stephen Wattam.  [Bug #7528]

Sat Dec  8 01:27:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need to
	  check all reports.

Sat Dec  8 00:10:34 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_eval.c (yield_under, eval_under): do not activate refinements
	  of the receiver in module_eval and instance_eval.

	* eval.c (ruby_Init_refinement): undef Class#refine.

	* eval.c (ruby_Init_refinement): remove Module#using.

	* eval.c (ruby_Init_refinement): main.using should be private.

	* eval.c (rb_mod_refine): the argument of Module#refine should not
	  be a module.

	* insns.def (defineclass): do not activate refinements in a class or
	  module.

Fri Dec  7 23:42:11 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/refinement/refinement.c: include ruby/ruby.h instead of the
	  declaration of rb_warn().

Fri Dec  7 16:07:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* doc/etc.rd: Removed stale documentation file
	* ext/etc/etc.c:  Merged documentation from doc/etc.rd and updated
	  rdoc, added documentation for Etc::Passwd and Etc::Group

Fri Dec  7 16:00:57 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need to
	  retry skipped test.  this fix makes 40% faster the whole test-all
	  with -j5 on Windows.

Fri Dec  7 14:22:29 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/markup/to_joined_paragraph.rb:  Completed documentation
	* lib/rdoc/parser/c.rb:  ditto
	* lib/rdoc/parser/changelog.rb:  ditto
	* lib/rdoc/servlet.rb:  ditto
	* lib/rdoc/store.rb:  ditto

	* lib/rdoc/store.rb:  Improved HTML error page.  Completed
	  documentation

	* lib/rdoc/parser/ruby.rb:  Fixed bug attaching a comment to A::B = 42
	* test/rdoc/test_rdoc_parser_ruby.rb:  Test for above

	* test/rdoc/test_rdoc_comment.rb:  Removed garbage

Fri Dec  7 14:03:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (Timeout#timeout): since async_interrupt_timing
	  re-raises a deferred exception, replace the timeout exception with
	  Timeout::Error after it.  [Bug #7503]

Fri Dec  7 13:07:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* doc/forwardable.rd: Remove stale documentation file
	* lib/forwardable.rb: Merge documentation from doc/forwardable.rd

Fri Dec  7 09:47:35 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* time.c (time_mdump): dump timezone string to private instance variable
	  on marshaling.

	* time.c (time_mload): load timezone string from private instance
	  variable named 'zone'.

Fri Dec  7 01:15:07 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/fiddle/lib/fiddle/function.rb (Fiddle::Function#name): new
	  attribute needed to switch Win32::Registry from DL to Fiddle.

	* ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
	  set function name to the returned Fiddle::Function object.

Fri Dec  7 00:11:44 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* test/ruby/test_refinement.rb: fix some tests to use neither
	  Module#using nor Module#module_eval.

Thu Dec  6 23:27:50 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (ruby_Init_refinement): a new function to enable
	  Refinements with a warning "Refinements are experimental...".

	* ext/refinement/refinement.c, ext/refinement/extconf.rb: a new
	  extension library to enable Refinements.

Thu Dec  6 18:23:05 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* revised r37993 to avoid SEGV/ILL in tests.  In r37993, a method
	  entry with VM_METHOD_TYPE_REFINED holds only the original method
	  definition, so ci->me is set to a method entry allocated in the
	  stack, and it causes SEGV/ILL.  In this commit, a method entry
	  with VM_METHOD_TYPE_REFINED holds the whole original method entry.
	  Furthermore, rb_thread_mark() is changed to mark cfp->klass to
	  avoid GC for iclasses created by copy_refinement_iclass().

	* vm_method.c (rb_method_entry_make): add a method entry with
	  VM_METHOD_TYPE_REFINED to the class refined by the refinement if
	  the target module is a refinement.  When a method entry with
	  VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with
	  the same name is searched in refinements.  If such a method is
	  found, the method is invoked.  Otherwise, the original method in
	  the refined class (rb_method_definition_t::body.orig_me) is
	  invoked.  This change is made to simplify the normal method lookup
	  and to improve the performance of normal method calls.

	* vm_method.c (EXPR1, search_method, rb_method_entry),
	  vm_eval.c (rb_call0, rb_search_method_entry): do not use
	  refinements for method lookup.

	* vm_insnhelper.c (vm_call_method): search methods in refinements if
	  ci->me is VM_METHOD_TYPE_REFINED.  If the method is called by
	  super (i.e., ci->call == vm_call_super_method), skip the same
	  method entry as the current method to avoid infinite call of the
	  same method.

	* class.c (include_modules_at): add a refined method entry for each
	  method defined in a module included in a refinement.

	* class.c (rb_prepend_module): set an empty table to
	  RCLASS_M_TBL(klass) to add refined method entries, because
	  refinements should have priority over prepended modules.

	* proc.c (mnew): use rb_method_entry_with_refinements() to get
	  a refined method.

	* vm.c (rb_thread_mark): mark cfp->klass for iclasses created by
	  copy_refinement_iclass().

	* vm.c (Init_VM), cont.c (fiber_init): initialize th->cfp->klass.

	* test/ruby/test_refinement.rb (test_inline_method_cache): do not skip
	  the test because it should pass successfully.

	* test/ruby/test_refinement.rb (test_redefine_refined_method): new
	  test for the case a refined method is redefined.

Thu Dec  6 17:29:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_here_document): flush string content between new
	  line and :string_embexpr.  [ruby-core:48703] [Bug #7255]

Thu Dec  6 16:35:21 2012  Eric Hodel  <drbrain@segment7.net>

	* test/rake/helper.rb:  Load envutil correctly.  Removed useless rescue
	  for signal propagation tests
	* lib/rake/file_utils.rb:  Prefer the built ruby.
	* test/rake/test_rake_functional.rb:  ditto

Thu Dec  6 15:20:34 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/context.rb:  Don't warn for duplicate methods while loading.
	* test/rdoc/test_rdoc_context.rb:  Test for above.

Thu Dec  6 14:26:22 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/command_manager.rb:  Removed string concatenation
	  syntax.  [Bug #6265]
	* lib/rubygems/commands/install_command.rb:  ditto
	* lib/rubygems/commands/uninstall_command.rb:  ditto
	* lib/rubygems/indexer.rb:  ditto
	* lib/rubygems/security/policy.rb:  ditto
	* lib/rubygems/security.rb:  ditto
	* lib/rubygems/uninstaller.rb:  ditto
	* test/rubygems/test_gem_commands_cert_command.rb:  ditto
	* test/rubygems/test_gem_package.rb:  ditto
	* test/rubygems/test_gem_security.rb:  ditto
	* test/rubygems/test_gem_security_policy.rb:  ditto

Thu Dec  6 14:10:08 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/package.rb:  Set rubygems_version before validation.
	  Fixes issue with bundler.
	* test/rubygems/test_gem_package.rb:  Test for above.

	* lib/rubygems/remote_fetcher.rb:  Only update the cache when we have
	  permission.  [ruby-trunk - Bug #7509]
	* lib/rubygems/source.rb (class Gem):  ditto
	* test/rubygems/test_gem_remote_fetcher.rb:  Test for above.
	* lib/rubygems/test_utilities.rb:  ditto

	* lib/rubygems/specification.rb:  Derive base_dir properly for default
	  gems.  [ruby-trunk - Bug #7496]
	* test/rubygems/test_gem_specification.rb:  Test for above.

	* lib/rubygems.rb:  Untaint Dir.pwd when searching for gemdeps files
	  for operation under $SAFE=1

Thu Dec 06 12:07:11 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: TracePoint#enable should not cause an error
	  when it is already enabled. TracePoint#disable is too.
	  [ruby-core:50561] [ruby-trunk - Bug #7513]

	* test/ruby/test_settracefunc.rb: add tests.

Thu Dec  6 07:19:58 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc*:  Improved display of ChangeLog files as HTML.
	* test/rdoc*:  Test for above.

Thu Dec  6 04:34:19 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_uninterruptible): helper function for providing
	  temporary async_interrupt_timing(Object => :defer)

	* io.c (rb_f_p): use rb_uninterruptible.
	* io.c (rb_f_p_internal): helper function for rb_f_p().
	* io.c (struct rb_f_p_arg): new struct for rb_f_p_internal.

	* test/ruby/test_thread.rb (test_async_interrupt_and_p): test for
	  the above.

Thu Dec  6 04:27:10 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (io_binwrite): check interrupt before io issue.
	* test/ruby/test_thread.rb (test_async_interrupt_and_io):
	  test for the above.

Thu Dec  6 01:10:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_method_call_status): use Qundef as no self instead of
	  the current self.

	* vm_eval.c (send_internal): public_send does not consider how it is
	  called, as mentioned in r14173.  patched by charliesome (Charlie
	  Somerville).  [ruby-core:50489] [Bug #7499]

Wed Dec  5 23:50:23 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (getrusage_time): uses clock_gettime() with
	  CLOCK_PROCESS_CPUTIME_ID when available, which provides a 1ns
	  precision on linux. [ruby-core:50495] [Bug #7500]
	  patched by Aman Gupta.

Wed Dec  5 22:46:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (rb_vm_make_proc): save the proc made from the given block so
	  that it will not get collected.  [ruby-core:50545] [Bug #7507]

Wed Dec  5 22:13:57 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/dl/lib/dl/func.rb (DL::Function#bind): When Fiddle is used,
	  @ptr should be updated. This fixes SEGV raised in DL::Function#call
	  after calling DL::Function#bind. [Bug #7516] [ruby-dev:46708]

	* test/dl/test_func.rb (test_bind): test for the above

Wed Dec  5 18:53:00 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* thread.c (rb_thread_s_async_interrupt_timing): have to check ints
	  before jumping out.
	* test/ruby/test_thread.rb (test_async_interrupt_with_return): add test
	  rescue has to catch a queued async exception at the time of return.
	* test/ruby/test_thread.rb (test_async_interrupt_with_break): add test
	  rescue has to catch a queued async exception at the time of break.

Wed Dec  5 16:54:28 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/memory_status.rb: suppress warning.
	  A patch from NAKAMURA Usaku.

Wed Dec  5 16:06:54 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parser/changelog.rb:  Parse more ChangeLog file variations.
	* test/rdoc/test_rdoc_parser_changelog.rb:  Test for above.

Wed Dec  5 12:17:11 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/dl/lib/dl/func.rb (DL::Function#initialize, DL::Function#bind):
	  ABI should be set by using CFunc#calltype even when Fiddle is used.
	  When Fiddle is used and a block is given, name should not be ignored.
	  [ruby-core:50562] [Bug #7514]

	* ext/dl/lib/dl/import.rb (DL::Importer#bind_function): should respect
	  abi and name when Fiddle is used.

	* test/dl/test_func.rb (test_name_with_block): test for "name" method
	  with giving a block.

Wed Dec  5 11:55:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* doc/shell.rd, doc/shell.rd.ja: Removed stale doc files
	* lib/shell.rb, lib/shell/*: Merge and updates docs from doc/shell.rd*

Wed Dec  5 11:42:38 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_settracefunc.rb: disable trace.

Wed Dec  5 11:37:37 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#macro_defined?): use clearly different
	  strings from conflict markers.

Wed Dec  5 04:25:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/README: Add rdoc modeline directive and formatting libs

Wed Dec  5 04:04:02 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* test/ruby/test_thread.rb (test_async_interrupt_blocking): bugfix
	  about deferred check

Wed Dec  5 03:35:37 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): check async queue everytime.
	* thread.c (sleep_forever): check RUBY_VM_CHECK_INTS_BLOCKING first.
	* thread.c (sleep_timeval): ditto.
	* test/ruby/test_thread.rb (test_async_interrupt_blocking): add a test
	  exceptions are correctly deferred and raised on :on_blocking context.

Wed Dec  5 02:36:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk, defs/id.def, template/id.c.tmpl: generate id.c as well as id.h.

Wed Dec  5 00:56:21 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_owned_p): new method that return current
	  thread have the target mutex or not. [Feature #7505] [ruby-dev:46697]
	* test/ruby/test_thread.rb (test_mutex_owned, test_mutex_owned2):
	  test for the above.
	* NEWS: new for the above.

Wed Dec  5 00:05:47 2012  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb (make_compiler, add_put_cmd, add_insert_cmd): extract
	  methods.

Tue Dec  4 18:21:04 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* test/ruby/memory_status.rb (Memory): use fiddle/types if available.

	* test/ruby/memory_status.rb (Memory::Win32): :stdcall is needed on
	  x86 WIN32. This commit partly reverts r38054.

Tue Dec  4 18:05:58 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/fiddle/lib/fiddle/types.rb: copied from ext/dl/lib/dl/types.rb
	  and modified for Fiddle, needed for migration from DL to Fiddle.

Tue Dec  4 17:57:09 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
	  should respect call_type for migration from DL to Fiddle.
	  [Bug #7484] [ruby-core:50405]

Tue Dec  4 16:54:00 2012  Eric Hodel  <drbrain@segment7.net>

	* .document:  Added ChangeLog and doc/ChangeLog-* as documentation

Tue Dec  4 16:47:46 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parser/changelog.rb:  Added a ChangeLog parser to RDoc.
	* lib/rdoc/parser.rb:  ditto
	* test/rdoc/test_rdoc_parser_changelog.rb:  Test for above.

Tue Dec  4 16:23:32 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (path2class, path2module): use PRIsVALUE.

	* marshal.c (w_object, marshal_dump, marshal_load): use
	  rb_check_funcall if possible.

	* marshal.c (w_object, marshal_dump, r_object0, marshal_load): use
	  RB_GC_GUARD() (directly or indirectly) instead of volatile.

	* variable.c (rb_path_to_class): prevent the argument from GC.

Tue Dec 04 13:55:07 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_opts.h: enable optimization - operand unification.
	  Operand unification technique enable to combine
	  an instruction and specific operands and make new
	  instruction.

	* defs/opt_operand.def: add several configuration
	  of operand unification.

	* insns.def: use `int' instead to suppress warning.

Mon Dec  3 17:58:53 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* parse.y: replace parser->enc with current_enc.

Tue Dec  4 08:33:46 2012  Eric Hodel  <drbrain@segment7.net>

	* README.EXT:  Converted to RDoc format
	* README.EXT.ja:  ditto

Tue Dec  4 08:32:10 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/ri/driver.rb:  Fixed ri page display for files with
	  extensions.
	* test/rdoc/test_rdoc_ri_driver.rb:  Test for above

Tue Dec  4 04:11:50 2012  Eric Hodel  <drbrain@segment7.net>

	* .document:  Add NEWS for `ri ruby:NEWS`
	* NEWS:  Set format as rdoc
	* doc/NEWS-1.8.7:  ditto
	* doc/NEWS-1.9.1:  ditto
	* doc/NEWS-1.9.2:  ditto
	* doc/NEWS-1.9.3:  ditto

Mon Dec  3 20:37:22 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_exec.c: check VM_COLLECT_USAGE_DETAILS.

Mon Dec  3 20:28:02 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (iseq_specialized_instruction):
	  change condition of using `opt_send_simple'.
	  More method invocations can be simple.

Mon Dec  3 20:03:38 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_objectspace.rb: skip RuntimeError
	  which says a message "can't modify frozen File".
	  Is that correct behavior?

Mon Dec 03 20:00:19 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_exec.c: vm_analysis_insn should be static.

Mon Dec  3 19:10:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (Init_Random), rational.c (Init_Rational): make marshal
	  methods private.  [Feature #6539]

Mon Dec  3 18:29:27 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.h: iseq_catch_table_entry::catch_type should be
	  Fixnum because they are pushed into Array in a compiler.
	  [Bug #7502]

	* test/ruby/test_objectspace.rb: add a test of this issue.

Mon Dec  3 18:25:16 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/id.h.tmpl (preserved_ids): "empty?" is not an attribute name.

Mon Dec  3 16:23:09 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c (vm_backtrace_to_ary): check negative size (2nd arg).

Mon Dec  3 15:50:33 2012  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el (ruby-mode-set-encoding): Unbreak by
	  fixing a typo, s/set/setq/.

Mon Dec  3 14:14:19 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (iseq_compile_each): joke shouldn't use id.h defined ids.

	* id.c (Init_id): ditto.

	* common.mk: fix dependency.

Mon Dec  3 12:43:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-block-end-re, ruby-delimiter)
	  (ruby-mode-syntax-table, ruby-parse-partial, ruby-beginning-of-indent):
	  merge from Emacs.

	* misc/ruby-mode.el (ruby-calculate-indent): fix indentation of
	  argument lines in parentheses.  [Bug #5140]

Mon Dec  3 07:52:41 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parser.rb:  Improved modeline support.  Patch by nobu.
	* test/rdoc/test_rdoc_parser.rb:  Test for above.

Sun Dec  3 00:06:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_new): stop checking string
	  taintness.  [Bug #5508] [ruby-core:40510]

Sun Dec  2 19:26:47 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* thread.c (RB_GC_SAVE_MACHINE_CONTEXT, rb_gc_save_machine_context):
	  extract rb_gc_save_machine_context to RB_GC_SAVE_MACHINE_CONTEXT.
	  NOTE: machine_regs and machine_stack_end must be set in current scope.

Sun Dec  2 18:46:24 2012  Koichi Sasada  <ko1@atdot.net>

	* array.c, enum.c, insns.def, io.c, numeric.c, parse.y, process.c,
	  range.c: use prepared IDs.
	  A patch from charliesome (Charlie Somerville).
	  [Bug #7495]

	* common.mk: add dependency to id.h.

	* common.mk: replace ID_H_INCLUDES with id.h.

Sun Dec  2 16:48:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/weakref.rb (rdoc): Clean up usage, add example,
	  note ArgumentError on WeakRef.new

Sun Dec  2 16:45:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* gc.c (WeakMap): Add doc for internal reference, use lib/weakref.rb

Sun Dec  2 07:24:23 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parser.rb:  Parse files with a -*- rdoc -*- modeline
	* test/rdoc/test_rdoc_parser.rb:  Test for above

Sun Dec  2 06:02:00 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* gc.h (SET_MACHINE_STACK_END): add volatile for preventing
	  harmful optimization.  [ruby-dev:46665] [Bug #7468]

Sun Dec  2 05:01:58 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (rb_iseq_line_trace_each): iterate `line' event only.

	* test/ruby/test_iseq.rb: add a test for this change.

Sun Dec  2 02:46:04 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: add TracePoint#inspect.

	* test/ruby/test_settracefunc.rb: add a test for this change.

Sat Dec  1 21:18:19 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_backtrace.rb: add a test for
	  Thread::Backtrace::Location#inspect.
	  BTW, tests for `caller_locations' are not enough.
	  Any volunteers are welcome.

Sat Dec  1 21:06:58 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c (location_inspect_m): add
	  Thread::Backtrace::Location#inspect.
	  It same as loc_obj.to_s.inspect.

Sat Dec  1 19:24:09 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_puts): recurse for the argument itself, not converted
	  array elements.  [ruby-core:42444] [Bug #5986]

Sat Dec  1 19:01:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object, r_object0): call private marshal methods.
	  [Feature #6539]

Sat Dec  1 18:52:22 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/cleanup_command.rb:  Fix cleanup command for
	  multiple gems.  [ruby-trunk - #7481] by Kouhei Sutou
	* test/rubygems/test_gem_commands_cleanup_command.rb:  Test for above.
	* lib/rubygems.rb:  Autoload Gem::Source to prevent test failures

Sat Dec  1 18:17:00 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* complex.c (Init_Complex), time.c (Init_Time): make marshal methods
	  private.  [Feature #6539]

	* object.c (Init_Object): make remove_instance_variable public.
	  [Feature #6539]

	* id.c (Init_id), template/id.h.tmpl: add initialize_{copy,clone,dup}
	  and respond_to_missing?.

	* vm_method.c (rb_method_entry_make): make above methods private.
	  [Feature #6539]

Sat Dec  1 16:40:22 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_thread.rb: move ConditionVariable related test
	  into test/thread/test_cv.rb.
	* test/thread/test_cv.rb: new file.
	* test/thread/test_cv.rb (test_condvar_empty_signal): new tests.
	* test/thread/test_cv.rb (test_condvar_empty_broadcast): ditto.

Sat Dec  1 15:14:25 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_thread.rb (test_cv_wait_deadlock): enable
	  cv deadlock test.

Sat Dec  1 14:23:33 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/thread.rb (ConditionVariable): use hash instead of array for
	  @waiters.
	* test/thread/test_queue.rb (test_sized_queue_and_wakeup): remove
	  a test because @waiters no longer have a chance to duplicated. Now it's
	  a hash.

Sat Dec  1 17:16:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-electric.el (ruby-electric-curlies): use kill-region
	  instead of interactive command delete-backward-char.

Sat Dec  1 17:12:55 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/inf-ruby.el (inferior-ruby-mode): fix the
	  compilation-shell-minor-mode configuration.  a patch by
	  j2petkov (Jean-Christophe Petkovich) in [ruby-core:46518].
	  [Bug #6742]

Sat Dec  1 15:05:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): use NAMLEN() to tell the length of d_name
	  instead of strlen(), which can access beyond the boundary.

Sat Dec  1 13:48:13 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/specification.rb:  Don't add default gems to $LOAD_PATH
	  as they are already there.

Sat Dec  1 12:22:17 2012  Kouhei Sutou  <kou@cozmixng.org>

	* re-added r38053 that is reverted by r38061. Problems by r38053
	  are resolved by r38096. r38096 removed GEM_SKIP configuration.

	  The below is ChangeLog of r38053:

	* defs/default_gems: Add base directory column.

	* tool/rbinstall.rb:
	  - Install .gemspecs of default gem to
	    #{GEM_HOME}/specifications/default/.
	  - Update files parameter of .gemspecs by relative path from
	    library directory.

Sat Dec  1 11:09:12 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* variable.c (rb_class_path_no_cache): add a function to get the class
	  path without caching the computed path. Some classes are frozen, and
	  will raise an exception without this.

	* probes.d (cmethod-entry, cmethod-return): separate cmethods from
	  regular methods to match set trace func.

	* probes_helper.h: refactor macros.  Fix probes to avoid calling
	  #inspect when profiling.

	* insns.def: update for use with new macros.

	* vm_eval.c: ditto

	* vm_insnhelper.c: ditto

	* test/dtrace/test_singleton_function.rb: fix test for new output.

	* test/dtrace/test_cmethod.rb: test the cmethod probes.

Sat Dec  1 09:44:16 2012  Eric Hodel  <drbrain@segment7.net>

	* test/rdoc/test_rdoc_options.rb:  Windows drive letters are
	  case-insensitive.

Sat Dec  1 09:42:13 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Search for gem deps file up the directory tree.
	* test/rubygems/test_gem.rb:  Test for above.

Sat Dec  1 09:33:32 2012  Eric Hodel  <drbrain@segment7.net>

	* test/runner.rb:  Set GEM_HOME, GEM_PATH and GEM_SKIP to empty set.
	  With default_gem support in RubyGems GEM_SKIP prevents loading of
	  built-in gems.

Sat Dec  1 07:16:17 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* compile.c (ADD_CATCH_ENTRY): add a cast to fix SEGV with x64 mingw
	  on Windows 8. Without cast, 0 might be non zero value at higher bits
	  in rb_ary_new3().
	  [ruby-core:50258] [Bug #7456]

Sat Dec  1 04:07:57 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* parse.y (parser.utf8): remove unused property.

	* parse.y (UTF8_ENC): remove unused macro.

	* parse.y (parser_tokadd_utf8): use rb_utf8_encoding() directly.

Sat Dec  1 03:49:45 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/sync.rb (Sync_m#sync_synchronize): add Thread.async_interrupt_timing
	  for protecting from async interrupt.
	* lib/sync.rb (Sync_m#sync_lock): ditto.

Sat Dec  1 03:38:04 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/thread.rb (ConditionVariable#broadcast): s/RuntimeError/StandardError/
	* lib/thread.rb (ConditionVariable#signal): ditto.

Sat Dec  1 03:29:52 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/thread.rb (SizedQueue#pop): rewrite by using ConditionVariable.
	* lib/thread.rb (SizedQueue#push): ditto.
	* lib/thread.rb (SizedQueue#max): ditto.
	* lib/thread.rb (Queue#pop): ditto.
	* lib/thread.rb (Queue#push): ditto.

	* lib/thread.rb (SizedQueue#num_waiting): adopt the above changes.
	* lib/thread.rb (SizedQueue#initialize): ditto.
	* lib/thread.rb (Queue#num_waiting): ditto.
	* lib/thread.rb (Queue#initialize): ditto.
	* test/thread/test_queue.rb (test_sized_queue_and_wakeup): ditto.

Sat Dec  1 03:45:47 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (Thread.async_interrupt_timing): fix RDoc.
	  :never is not used any more.

Sat Dec  1 02:56:19 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.c: add RubyVM::InstructionSequence (ISeq) inspection methods.
	  * ISeq#path returns path of this ISeq written.
	  * ISeq#absolute_path returns absolute path.
	  * ISeq#label returns label (method name and so on).
	  * ISeq#base_label returns base label (see Thread::Backtrace::Location).
	  * ISeq#first_lineno returns first line number of this ISeq.
	  * ISeq.of(obj) returns ISeq object which obj (Proc or Method)
	    is contains.

	* test/ruby/test_iseq.rb: add tests.

Sat Dec  1 02:58:51 2012  Eric Hodel  <drbrain@segment7.net>

	* include/ruby/ruby.h (rb_event_flag_t):  Maintain integer precision
	  for clang error (VALUE aka unsigned long vs unsigned int)

Sat Dec  1 02:53:18 2012  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/test_gem_dependency_installer.rb:  Use Gem.read_binary
	  instead of File.binread for ruby 1.8 compatibility in the rubygems
	  source repository.  Updates r38075

Sat Dec  1 02:33:20 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_threadptr_interrupt_mask, async_interrupt_timing_func):
	  merge into them into rb_thread_s_async_interrupt_timing.
	* thread.c (rb_thread_s_async_interrupt_timing): ditto.

Sat Dec  1 02:11:47 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_threadptr_interrupt_mask): add argument check.
	* thread.c (async_interrupt_timing_arg_check_i): helper function
	  for the above.
	* test/ruby/test_thread.rb (test_async_interrupt_timing_invalid_argument):
	  test for the above.

Sat Dec  1 01:19:34 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/thread.rb (ConditionVariable#broadcast): protect from
	  async interrupt by using Thread.async_interrupt_timing.
	* lib/thread.rb (ConditionVariable#signal): ditto.
	* lib/thread.rb (ConditionVariable#wait): ditto.

Sat Dec  1 02:04:23 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err):
	  raise if assert_in_out_err misused.

Sat Dec  1 02:08:16 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rdoc/test_rdoc_rubygems_hook.rb
	  (TestRDocRubygemsHook#test_setup_unwritable): 1. check the existence
	  of the file(directory) before touch it.  2. remove test
	  file(directory) after the test.  see [ruby-core:50388].

Sat Dec  1 01:51:06 2012  Koichi Sasada  <ko1@atdot.net>

	[EXPERIMENTAL]
	* iseq.c: add following two methods.
	  * ISeq#line_trace_all returns all line traces (line numbers)
	  * ISeq#line_trace_specify(pos, set) set `pos'th line event to
	    specified_line event (if set is true).
	  These features are introduced for debuggers (mainly to make
	  breakpoint).

	* iseq.h: add decl. of C APIs.

	* test/ruby/test_iseq.rb: add tests.

	* vm_trace.c: add `specified_line' event.

	* include/ruby/ruby.h: ditto.

Sat Dec  1 01:49:52 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rubygems/test_gem_dependency_installer.rb: gems are of course
	  binary files, so use a binary reading method when reading it.
	  see [ruby-core:50388].

Sat Dec  1 01:21:07 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rubygems/command.rb (Gem::Command#get_all_gem_names_and_versions):
	  who assumes that the pathname of a gem never contains ':' ?
	  yes, on Unixen pathnames can contain ':', and on Windows they almost
	  certainly contain ':'.  see [ruby-core:50388].

	* lib/rubygems/requirement.rb (Gem::Requirement::PATTERN_RAW): extract
	  the regexp to match the version specifier from PATTERN to use in
	  above method.

Sat Dec  1 00:48:19 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/fiddle/extconf.rb, ext/fiddle/function.c
	  (Fiddle::Function::STDCALL): FFI_STDCALL is not a macro, but an
	  enumeration. [ruby-core:50398] [Bug #7483]

Sat Dec  1 00:08:55 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rubygems/test_gem_installer.rb
	  (TestGemInstaller#test_check_executable_overwrite_other_non_gem):
	  on Windows, rubygems always generate a wrapper .bat file when
	  installing a file into bin, so testing no-overwrite a wrapper file
	  and a non-wrapper file is nonsense.  see [ruby-core:50388].

Fri Nov 30 23:39:58 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rubygems/test_gem_installer.rb
	  (TestGemInstaller#test_check_executable_overwrite_default_bin_dir):
	  if the executable to be overwritten was generated by rubygems, the
	  error message differs from the only copied one's.
	  see [ruby-core:50388].

Fri Nov 30 23:27:26 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rubygems/test_gem_ext_ext_conf_builder.rb
	  (TestGemExtExtConfBuilder::test_class_make): reading with binary mode
	  of course introduce \r on Windows.  see [ruby-core:50388].

Fri Nov 30 23:11:37 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rubygems/specification.rb
	  (Gem::Specification.validate_permissions): don't check executability
	  of the source on Windows.  they will be wrapped to .bat files when
	  installing.  see [ruby-core:50388].

Fri Nov 30 22:44:14 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_core.h (rb_vm_struct): add thread_destruct_lock field.
	* thread.c (Init_Thread): ditto.
	* thread.c (rb_vm_gvl_destroy): ditto.

	* thread.c (thread_start_func_2): make sure vm->running_thread
	  don't point to dead thread.
	* thread.c (timer_thread_function): close a race against thread
	  destruction. [Bug #4911][ruby-dev:43859]

	* vm_core.h (rb_thread_set_current): reset running time of
	  current thread instead of previous thread. We no longer
	  assume previous running thread still live.

Fri Nov 30 21:57:43 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* revert r38053 because it causes too many test failures.
	  if you've already installed r38053 or later, remove the installed
	  lib/ruby/gems/2.0.0 directory and reinstall this revision or later.

Fri Nov 30 21:07:56 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadError
	  because it's Gem::LoadError sometimes.  see [Bug #6882]

Fri Nov 30 20:47:44 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c: TracePoint#self returns invoking/exiting thread object
	  at thread_begin/end event.

	* test/ruby/test_settracefunc.rb: fix test.

Fri Nov 30 19:55:17 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/memory_status.rb (Memory::Win32): use fiddle instead of dl,
	  but I doubt fiddle is not compatible with dl. (if you are interested,
	  see the diff.)  [ruby-core:50194] [Bug #7443]

Fri Nov 30 19:37:44 2012  Kouhei Sutou  <kou@cozmixng.org>

	* defs/default_gems: Add base directory column.

	* tool/rbinstall.rb:
	  - Install .gemspecs of default gem to
	    #{GEM_HOME}/specifications/default/.
	  - Update files parameter of .gemspecs by relative path from
	    library directory.

Fri Nov 30 19:30:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* vm_trace.c:
	  tracepoint_attr_return_value (TracePoint#return_value):
	    include `:b_return` for method doc
	  tracepoint_enable_m, tracepoint_disable_m (#enable/#disable):
	    don't have block argument, document block scope

Fri Nov 30 18:52:56 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (tracepoint_disable_m, tracepoint_enable_m):
	  fix block parameter.
	  No argument should be given to a block which is passed
	  to TracePoint#enable (and disable).

Fri Nov 30 18:23:26 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c: rename Thread.control_interrupt
	  to Thread.async_interrupt_timing.
	  The option name `:never' is also changed to  `:defer'.
	  [ruby-core:50375] [ruby-trunk - Feature #6762]

	* thread.c: remove Thread.check_interrupt.
	  This method is difficult to understand by name.

	* thread.c: add Thread.async_interrupted?.
	  This method check any deferred async interrupts.

	* test/ruby/test_thread.rb: change tests for above.

Fri Nov 30 18:24:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* vm_trace.c: Documentation for TracePoint API
	  [ruby-core:47243] [Feature #6895]

Fri Nov 30 17:43:50 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_cmp_m): try to compare with to_str result if
	  possible before calling <=> method.  [ruby-core:49279] [Bug #7342]

	* string.c (rb_str_cmp_m): use rb_check_funcall instead of respond_to
	  and call.

	* string.c (rb_str_cmp_m): return fixed value, one of -1,0,+1 always.

Fri Nov 30 16:19:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_dump.c (rb_vm_bugreport): get rid of calling methods in sigsegv
	  handler.  based on a patch by charliesome (Charlie Somerville)
	  [ruby-core:49573] [Bug #7402]

Fri Nov 30 16:05:44 2012  Eric Hodel  <drbrain@segment7.net>

	* NEWS:  Added RubyGems 2.0.0

Fri Nov 30 15:24:37 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): fix false usage of local variable, it cannot
	  appear in fname state [ruby-core:49659] [Bug #7408]

Fri Nov 30 15:20:12 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/package.rb:  Load YAML for building gems.
	* test/rubygems/test_gem_commands_contents_command.rb:  Sort expected
	  output of default gem contents.  Re-fixes r38004 and r38005.

Fri Nov 30 15:15:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* vm_trace.c (set_trace_func): Formatting of params and events

Fri Nov 30 14:45:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/net/http.rb: Net::HTTP::Patch to list of HTTP Request Classes
	  Patch by Ryunosuke SATO [Fixes #217 on github]

Fri Nov 30 14:05:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/cgi.rb: CGI example for HTML generation
	  Patch by Marcus Stollsteimer [ruby-core:50303] [Bug #7465]

Fri Nov 30 13:52:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* time.c: Documentation improvements, grammar and formatting
	  Patch by Bernd Homuth [ruby-core:49203] [Bug #7326]

Fri Nov 30 13:48:33 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc.rb:  Set version to 4.0.0.preview2
	* lib/rubygems.rb:  Set version to 2.0.0.preview2

Fri Nov 30 13:11:53 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/setup_command.rb:  Remove old files on install
	  of RubyGems.  (not by rbinstall.rb).
	* test/rubygems/test_gem_commands_setup_command.rb:  Test for above.

Fri Nov 30 12:47:59 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/abbrev.rb (Abbrev#abbrev): A fixed string prefix pattern
	  should only match the beginning of each word, not the beginning
	  of every line in it.

	* lib/abbrev.rb (Abbrev#abbrev): Stop using a regexp that causes a
	  false warning. [Bug #7471]

Fri Nov 30 12:30:55 2012  Akinori MUSHA  <knu@iDaemons.org>

	* test/test_abbrev.rb: Add tests for lib/abbrev.rb.

Fri Nov 30 12:27:51 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/spec_fetcher.rb:  Allow prerelease spec fetching to fail
	  for bundler.
	* test/rubygems/test_gem_spec_fetcher.rb:  Test for above.

Fri Nov 30 12:20:53 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rake/backtrace.rb:  Removed duplication in
	  Rake::Backtrace::SUPPRESSED_PATHS
	* test/rake/test_rake_backtrace.rb:  Skip tests when tmpdir is in the
	  suppressed pattern.

Fri Nov 30 11:07:45 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* revert r37993 to avoid SEGV in tests.

Fri Nov 30 10:38:54 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/ri/driver.rb:  Relaxed matching for pages to be more
	  user-friendly.
	* test/rdoc/test_rdoc_ri_driver.rb:   Test for above.

Fri Nov 30 09:50:16 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/markdown.rb:  Fixed warnings with -w

Fri Nov 30 09:38:22 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (RB_GC_GUARD_PTR): add note.

	* vm_backtrace.c (backtrace_to_str_ary): use RB_GC_GUARD() instead of
	  RB_GC_GUARD_PTR() which has no effect.
	  (backtrace_to_location_ary): ditto.
	  (vm_backtrace_to_ary): ditto.

Fri Nov 30 09:22:52 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/contents_command.rb:  Sort output from command.
	  Replaces r38004, r38005
	* test/rubygems/test_gem_commands_contents_command.rb:  ditto.

	* lib/rubygems/defaults.rb:  Use Gem.path_separator for jruby support.
	* lib/rubygems/path_support.rb:  ditto

Fri Nov 30 08:34:03 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/generator/darkfish.rb:  Silenced warning
	* test/rdoc/test_rdoc_rdoc.rb:  ditto

	* lib/rdoc/markup/parser.rb:  Use byteslice when available for
	  performance
	* test/rdoc/test_rdoc_markup_parser.rb:  Test for above
	* lib/rdoc/test_case.rb:  ditto

	* lib/rdoc/parser/ruby.rb:  Fixed bug parsing yield({})
	* test/rdoc/test_rdoc_parser_ruby.rb (end):

	* lib/rdoc/rubygems_hook.rb:  Skip default gems.  Display generator
	  name properly.
	* test/rdoc/test_rdoc_rubygems_hook.rb:  Test for above

	* lib/rdoc/servlet.rb:  Fixed typo.

Fri Nov 30 08:09:56 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c : remove a unused function.

Fri Nov 30 07:46:42 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (rb_objspace_call_finalizer): finalize_deferred may free up
	  a object which is reachable from a part after this function,
	  e.g. ruby_vm_destruct(). [ruby-dev:46647] [Bug #7452]

	* test/ruby/test_gc.rb (test_finalizing_main_thread): add a test
	  for above.

Fri Nov 30 07:43:44 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_thread_interrupted): avoid warning of
	  implicit conversion.

	* thread.c (rb_threadptr_execute_interrupts): ditto.

Fri Nov 30 07:34:28 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c: add GC guards.

Fri Nov 30 07:21:33 2012  Koichi Sasada  <ko1@atdot.net>

	[EXPERIMENTAL: NEED DISCUSS]
	* vm_trace.c: add events
	  * :thread_begin - hook at thread beginning.
	  * :thread_end - hook at thread ending.
	  * :b_call - hook at block enter.
	  * :b_return - hook at block leave.
	  This change slow down block invocation.
	  Please try and give us feedback until 2.0 code freeze.

	* include/ruby/ruby.h: ditto.

	* compile.c (rb_iseq_compile_node): ditto.

	* insns.def: ditto.

	* thread.c: ditto.

	* vm.c: ditto.

	* include/ruby/debug.h: add a comment.

	* test/ruby/test_settracefunc.rb: add a tests.

Fri Nov 30 06:56:30 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* test/minitest/*: Imported minitest 4.3.2 (r8027)

Fri Nov 30 04:16:29 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rake/*:  Updated to rake 0.9.5
	* test/rake/*:  ditto.
	* NEWS:  ditto.

Fri Nov 30 02:53:47 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* vm.c: add a return hook when a method raises an exception.

	* probes_helper.h: look up klass and method if none are provided.

	* eval.c: update macro usage.

	* vm_eval.c: ditto.

	* vm_insnhelper.c: ditto.

	* test/dtrace/test_function_entry.rb: test for change.

Fri Nov 30 02:27:12 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* compile.c (compile_array_): refix r37991 remove assertion:
	  it is true only if type == COMPILE_ARRAY_TYPE_HASH.
	  [ruby-dev:46658] [Bug #7466]

	* vm.c (m_core_hash_from_ary): add assertion instead of above.

	* vm.c (m_core_hash_merge_ary): ditto.

Thu Nov 29 19:15:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (compile_array_): hash elements must be paired even for
	  literal elements.  [ruby-dev:46658] [Bug #7466]

Thu Nov 29 22:39:35 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/openssl/ossl_ssl.c (ssl_npn_encode_protocol_i): fix byte order
	  issue on big-endian architecture [ruby-core:50292] [Bug #7463]

Thu Nov 29 22:23:31 2012  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/openssl/test_cipher.rb (test_ctr_if_exists): add CTR mode test
	  if underlying OpenSSL supports it. See #4408

Thu Nov 29 21:42:16 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (rb_method_entry_make): add a method entry with
	  VM_METHOD_TYPE_REFINED to the class refined by the refinement if
	  the target module is a refinement.  When a method entry with
	  VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with
	  the same name is searched in refinements.  If such a method is
	  found, the method is invoked.  Otherwise, the original method in
	  the refined class (rb_method_definition_t::body.orig_def) is
	  invoked.  This change is made to simplify the normal method lookup
	  and to improve the performance of normal method calls.

	* vm_method.c (EXPR1, search_method, rb_method_entry),
	  vm_eval.c (rb_call0, rb_search_method_entry): do not use
	  refinements for method lookup.

	* vm_insnhelper.c (vm_call_method): search methods in refinements if
	  ci->me is VM_METHOD_TYPE_REFINED.  If the method is called by
	  super (i.e., ci->call == vm_call_super_method), skip the same
	  method entry as the current method to avoid infinite call of the
	  same method.

	* class.c (include_modules_at): add a refined method entry for each
	  method defined in a module included in a refinement.

	* class.c (rb_prepend_module): set an empty table to
	  RCLASS_M_TBL(klass) to add refined method entries, because
	  refinements should have priority over prepended modules.

	* proc.c (mnew): use rb_method_entry_with_refinements() to get
	  a refined method.

	* test/ruby/test_refinement.rb (test_inline_method_cache): do not skip
	  the test because it should pass successfully.

	* test/ruby/test_refinement.rb (test_redefine_refined_method): new
	  test for the case a refined method is redefined.

Thu Nov 29 17:45:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (rb_const_set): show namespace in warning messages.
	  [Feature #7190]

Thu Nov 29 17:31:53 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rubygems.rb (Gem.load_yaml): return if Kernel#gem is not defined
	  yet. This causes crash if test-all requires libraries in a certain
	  order. A simple reproducible code is
	  ruby --disable-gem -e'require"yaml";require"minitest/autorun"'

Thu Nov 29 17:19:26 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/tracer.rb:  Updated to match removal of custom_require from
	  RubyGems.
	* test/test_tracer.rb:  ditto.  Improved failure message if the test
	  fails

Thu Nov 29 17:15:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* gc.c: Documentation for GC, GC::Profiler, ObjectSpace, and
	  ObjectSpace::WeakMap [ruby-core:50245] [Bug #7449]

Thu Nov 29 17:12:26 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/generic_erb.rb, tool/id2token.rb: add --path-separator option
	  for mingw where make and built ruby live in different world.

	* tool/vpath.rb: extract from tool/instruction.rb.

Thu Nov 29 17:11:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/io/wait/test_io_wait.rb (TestIOWait#fill_pipe):
	  Errno::EWOULDBLOCK may not be the same as Errno::EAGAIN.  patch by
	  phasis68 (Heesob Park) at [ruby-core:49894].  [Bug #7420]

Thu Nov 29 17:03:38 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/test_case.rb:  Determine path to certificates to avoid
	  build-dir problems.
	* test/rubygems/test_gem_security_signer.rb:  Use predetermined paths
	  to avoid build-dir problems.

Thu Nov 29 16:18:14 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/test_case.rb:  Disable loading of keys and certificates
	  outside rubygems or ruby tests as the files are not available (or
	  necessary).

Thu Nov 29 16:14:41 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c (rb_debug_inspector_open): use RARRAY_LENINT() for
	  int variable.

Thu Nov 29 15:59:55 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/debug.h: add rb_debug_inspector_* APIs.

	* vm_backtrace.c: ditto.

	* common.mk: add dependency from vm_backtrace.o to
	  include/ruby/debug.h.

	* proc.c (rb_binding_new_with_cfp): constify.

	* vm.c (rb_vm_get_ruby_level_next_cfp): constify.

	* vm_core.h, vm_trace.c: move decls.

Thu Nov 29 15:56:14 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rdoc/test_case.rb (RDoc::TestCase#verbose_capture_io):
	  defined for asserts of warnings.

	* test/rdoc: use verbose_capture_io on asserts of warnings.
	  they failed when tests was run with RUBYOPT=-W0.

Thu Nov 29 15:53:38 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/psych/extconf.rb: added --enable-bundled-libyaml option.  this
	  enforces using bundled libyaml.

Thu Nov 29 15:51:54 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems*:  Updated to RubyGems 2.0
	* test/rubygems*:  ditto.

	* common.mk (prelude):  Updated for RubyGems 2.0 source rearrangement.

	* tool/change_maker.rb:  Allow invalid UTF-8 characters in source
	  files.

Thu Nov 29 15:38:14 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/debug.h: provide rb_tracearg_*() APIs,
	  instead of rb_tracepoint_attr_*().
	  These APIs are for debuggers/profilers.
	  They will be explained in another docs sometime.

	* vm_trace.c: ditto.

Thu Nov 29 15:10:45 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/minitest/test_minitest_unit.rb: restore orig_verbose only
	  if it is set. This broke rdoc's tests.
	  http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20121129T050102Z.diff.html.gz

Thu Nov 29 14:56:30 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_tracepoint_attr_method_id):
	  rename TracePoint#id to TracePoint#method_id.

	* include/ruby/debug.h: ditto.

	* test/ruby/test_settracefunc.rb: ditto,

Thu Nov 29 14:49:10 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_tracepoint_attr_defined_class):
	  rename TracePoint#klass to TracePoint#defined_class.
	  [ruby-core:50187] Re: [ruby-trunk - Feature #6895]

	* include/ruby/debug.h: ditto.

	* test/ruby/test_settracefunc.rb: ditto.

Thu Nov 29 14:27:57 2012  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): prepare Symbol objects at first time
	  to make it fast.

Thu Nov 29 14:02:15 2012  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): GC.stat supports new information
	  * total_allocated_object: total allocated object number.
	  * total_freed_object: total freed object number.
	  Above two numbers are only accumulated and they will
	  overflow (return to 0). Please use them as a hint.

Thu Nov 29 12:13:54 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 4.3.2 (r8026)
	* test/minitest/*: ditto

Thu Nov 29 11:06:06 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_start_func_2): remove unused code. When
	  th->safe_level == 4, th->errinfo never be thrown. So, to
	  create new exception makes no sense.

Thu Nov 29 10:29:53 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c: same as a last patch.

Thu Nov 29 10:24:25 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c: use `long' for return values of `NUM2LONG()'.

Thu Nov 29 09:52:08 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread.c (do_select): suppress warning (uninitialized value warning)
	  with UNINITIALIZED_VAR().

Thu Nov 29 09:36:09 2012  Koichi Sasada  <ko1@atdot.net>

	* eval.c (ruby_cleanup): delay THREAD_KILLED timing.
	  It should be located just before rb_thread_terminate_all().

Thu Nov 29 09:10:17 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c (vm_backtrace_to_ary): support range argument
	  like Array#[].
	  [ruby-core:50092] [ruby-trunk - Feature #7434]
	  Test and document is not available. Please help us.

Thu Nov 29 06:46:33 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_start_func_2): small cleanups.

Thu Nov 29 06:37:08 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_start_func_2): remove unused code.
	  this function never be used for main thread.

Thu Nov 29 06:27:55 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_start_func_2): remove unused code.
	  errinfo = th->errinfo; and errinfo = rb_errinfo(); are
	  the same.

Thu Nov 29 05:26:32 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c (backtrace_to_str_ary2): rename to backtrace_to_str_ary.

	* vm_backtrace.c (rb_backtrace_to_str_ary): use `backtrace_to_str_ary()'.

	* vm_backtrace.c (backtrace_to_frame_ary): rename to
	  backtrace_to_location_ary.

Thu Nov 29 05:19:25 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* probes.d: Change function-entry probe to method-entry.
	* insns.def: ditto
	* probes_helper.h: ditto
	* test/dtrace/test_function_entry.rb: ditto
	* test/dtrace/test_singleton_function.rb: ditto
	* vm.c: ditto
	* vm_eval.c: ditto
	* vm_insnhelper.c: ditto

Thu Nov 29 04:45:17 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c: rename Class name from
	  ::RubyVM::Backtrace and ::RubyVM::Backtrace::Location
	  to ::Thread::Backtrace and ::Thread::Backtrace::Location.

Wed Nov 28 23:52:02 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* NEWS (Thread) remove incompatible changes about trap.

Wed Nov 28 23:39:01 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_mutex_sleep): fix to allow spurious wakeup.
	  [ruby-dev:46654] [ruby-trunk - Bug #7455]

	* NEWS: write about spurious wakeup.

Wed Nov 28 22:57:23 2012  Koichi Sasada  <ko1@atdot.net>

	* thread_win32.c: catch up latest change of BLOCKING_REGION.

Wed Nov 28 22:54:21 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_method): fix undefined behavior.
	  Should not access scope local variable from outer scope.

Wed Nov 28 22:20:55 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* test/ruby/test_thread.rb (test_thread_status_in_trap): change test for
	  thread status in trap. now can accept Thread#join and Thread#value in trap.

Wed Nov 28 21:58:47 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/thread.h (rb_thread_call_without_gvl2): change
	  meaning of function.
	  This function is called with same parameters of
	  `rb_thread_call_without_gvl()'.
	  However, if interrupts are detected, then return immediately.

	* thread.c: implement `rb_thread_call_without_gvl2()'.

Wed Nov 28 21:31:21 2012  Masaya Tarui  <tarui@ruby-lang.org>

	* thread.c (thread_join_sleep): check spurious wakeup by itself for
	corresponding status change in trap context.
	* vm_core.h (struct rb_thread_struct): add rb_thread_list_t and use as join_list for
	reentry by trap context.
	* thread.c (thread_start_func_2): ditto.
	* thread.c (remove_from_join_list): ditto.
	* thread.c (rb_thread_atfork): ditto.
	* thread.c (thread_join): ditto. & remove trap handler check.
	* thread.c (sleep_forever): add argument : spurious_check.
	* thread.c (sleep_timeval): ditto.
	* thread.c (rb_thread_sleep_forever): set spurious_check.
	* thread.c (rb_thread_sleep_deadly): ditto.
	* thread.c (sleep_for_polling): ditto.
	* thread.c (rb_thread_wait_for): ditto.
	* thread.c (sleep_wait_for_interrupt): bypass spurious_check.

Wed Nov 28 21:23:18 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/psych/yaml/emitter.c (yaml_emitter_write_indicator): constify.

	* ext/psych/yaml/emitter.c (yaml_emitter_write_block_scalar_hints):
	  ditto.

	* ext/psych/extconf.rb: mingw32 also needs macros for win32, not
	  only mswin32.

	* ext/psych/extconf.rb: compile sources in the source directory
	  without copying by using VPATH.

Wed Nov 28 21:18:57 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#each_compile_rules): splat $(*VPATH*) for
	  each VPATH elements.

Wed Nov 28 16:40:14 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_core.h (enum rb_thread_status): remove THREAD_TO_KILL
	* vm_core.h (struct rb_thread_struct): add to_kill field
	* thread.c (terminate_i): convert THREAD_TO_KILL to to_kill.
	* thread.c (rb_threadptr_to_kill): ditto.
	* thread.c (rb_thread_kill): ditto.
	* thread.c (rb_thread_wakeup_alive): ditto.
	* thread.c (thread_list_i): ditto.
	* thread.c (static const char): ditto.
	* thread.c (thread_status_name): ditto.
	* thread.c (rb_thread_status): ditto.
	* thread.c (rb_thread_inspect): ditto.
	* vm_backtrace.c (thread_backtrace_to_ary): ditto.

	* thread.c (rb_threadptr_execute_interrupts): fix thread status
	  overwritten issue. [Bug #7450] [ruby-core:50249]

	* test/ruby/test_thread.rb (test_hread_status_raise_after_kill):
	  test for the above.
	* test/ruby/test_thread.rb (test_thread_status_in_trap): test for
	  thread status in trap.
	* test/ruby/test_thread.rb (test_status_and_stop_p): remove
	  Thread.control_interrupt unsafe test. Thread#kill no longer
	  changes thread status. Instead of, Thread#kill receiver changes
	  their own status when receiving kill signal.

Wed Nov 28 16:21:46 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (struct rb_mutex_struct): add allow_trap field.
	* internal.h (rb_mutex_allow_trap): added.
	* thread.c (rb_mutex_lock, rb_mutex_unlock): check mutex->allow_trap.
	* thread.c (mutex_sleep): remove trap check because it uses
	  rb_mutex_lock and rb_mutex_unlock internally.
	* thread.c (rb_mutex_allow_trap): new helper function for the above.

	* io.c (io_binwrite): mark fptr->write_lock as writable in trap.

	* test/ruby/test_signal.rb (test_trap_puts): test for the above.

Wed Nov 28 16:59:12 2012  Koichi Sasada  <ko1@atdot.net>

	* proc.c: remove Proc#== and Proc#eql?.
	  Proc objects compared with their object ids.
	  [Bug #4559]

	* test/ruby/test_proc.rb: remove related test.

Wed Nov 28 16:41:04 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/servlet.rb:  Add support for serving documentation from a
	  subdirectory.
	* lib/rdoc/generator/darkfish.rb:  ditto
	* test/rdoc/test_rdoc_servlet.rb:  Test for above
	* test/rdoc/test_rdoc_servlet.rb:  ditto

Wed Nov 28 15:37:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: fix r37924: run only on i[3-6]86-linux.

Wed Nov 28 15:31:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (FMODE_SYNCWRITE): removed unused macro.

Wed Nov 28 15:19:25 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in: revert r37911, r37906 and r37904 which break build
	  with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio,
	  Fujitsu C Compiler. [ruby-dev:46646] [Bug #7451]

Wed Nov 28 14:50:55 2012  Koichi Sasada  <ko1@atdot.net>

	* ext/psych/extconf.rb: copy sources into build directory,
	  not into srcdir.

Wed Nov 28 14:34:06 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_lock): moved trap context check from
	  rb_mutex_trylock because try_lock have no change to make
	  a deadlock.
	* thread.c (rb_mutex_trylock): ditto.
	* NEWS: news for the above.

Wed Nov 28 13:39:54 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_s_new): uses main_thread->status instead of
	  th->inhibit_thread_creation for preventing thread creation.
	* vm_core.h (rb_vm_struct): remove inhibit_thread_creation field.
	* thread.c (rb_thread_terminate_all): ditto.

Wed Nov 28 13:27:29 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/extconf.rb: use embedded libyaml if no system libyaml is
	  found. [ruby-core:49463]
	* ext/psych/lib/psych.rb: updating to psych 2.0.0
	* ext/psych/lib/psych/deprecated.rb: updated docs
	* ext/psych/psych.gemspec: updated to psych 2.0.0
	* ext/psych/psych.h: fixing header file include for rename
	* ext/psych/psych_emitter.c: renamed to avoid libyaml conflict.
	* ext/psych/psych_emitter.h: ditto
	* ext/psych/psych_parser.c: ditto
	* ext/psych/psych_parser.h: ditto
	* ext/psych/psych_to_ruby.c: ditto
	* ext/psych/psych_to_ruby.h: ditto
	* ext/psych/psych_yaml_tree.c: ditto
	* ext/psych/psych_yaml_tree.h: ditto
	* ext/psych/yaml/LICENSE: embedding libyaml 0.1.4
	* ext/psych/yaml/api.c: ditto
	* ext/psych/yaml/config.h: ditto
	* ext/psych/yaml/dumper.c: ditto
	* ext/psych/yaml/emitter.c: ditto
	* ext/psych/yaml/loader.c: ditto
	* ext/psych/yaml/parser.c: ditto
	* ext/psych/yaml/reader.c: ditto
	* ext/psych/yaml/scanner.c: ditto
	* ext/psych/yaml/writer.c: ditto
	* ext/psych/yaml/yaml.h: ditto
	* ext/psych/yaml/yaml_private.h: ditto

Wed Nov 28 12:54:59 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_join): A trap handler check was moved from
	  thread_join_m because Thread#value should be raised an exception
	  too.
	* thread.c (thread_join_m): remove trap handler check.
	* test/ruby/test_thread.rb (test_thread_join_in_trap): add test
	  for thread#value.
	* NEWS: documentation fix for the above.

Wed Nov 28 11:07:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* ext/fiddle/closure.c: Documentation for Fiddle
	* ext/fiddle/lib/fiddle/import.rb: ditto
	* ext/fiddle/lib/fiddle/value.rb: ditto
	* ext/fiddle/lib/fiddle/pack.rb: ditto
	* ext/fiddle/lib/fiddle/cparser.rb: ditto
	* ext/fiddle/lib/fiddle/struct.rb: ditto
	* ext/fiddle/lib/fiddle/function.rb: ditto

Wed Nov 28 09:15:51 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* ext/strscan/strscan.c: Added #charpos for multibyte string position.
	* test/strscan/test_stringscanner.rb: ditto

Wed Nov 28 09:00:34 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/fiddle/fiddle.c: adding alignment constants for compatibility
	  with DL.
	* ext/fiddle/fiddle.h: ditto
	* ext/fiddle/lib/fiddle/cparser.rb: importing the C parser for DL
	  backwards compatibility.
	* ext/fiddle/lib/fiddle/import.rb: importing the import DSL for DL
	  backwards compatibility.
	* ext/fiddle/lib/fiddle/pack.rb: importing structure pack for DL
	  backwards compatibility.
	* ext/fiddle/lib/fiddle/value.rb: ditto
	* ext/fiddle/lib/fiddle/struct.rb: importing struct DSL for DL backwards
	  compatibility.
	* test/dl/test_c_struct_entry.rb: importing tests
	* test/dl/test_c_union_entity.rb: ditto
	* test/dl/test_cparser.rb: ditto
	* test/dl/test_import.rb: ditto
	* test/fiddle/test_c_struct_entry.rb: ditto
	* test/fiddle/test_c_union_entity.rb: ditto
	* test/fiddle/test_cparser.rb: ditto
	* test/fiddle/test_import.rb: ditto

Wed Nov 28 08:56:00 2012  Zachary Scott <zachary@zacharyscott.net>

	* doc/globals.rdoc: Add documentation file for magic globals
	[ruby-core:29048] [Bug #3022]

Wed Nov 28 08:55:00 2012  Zachary Scott <zachary@zacharyscott.net>

	* .document: Add README's to be included with docs

Wed Nov 28 08:26:00 2012  Zachary Scott <zachary@zacharyscott.net>

	* ext/dl/lib/dl.rb: Deprecation notice for DL

Wed Nov 28 08:25:00 2012  Zachary Scott <zachary@zacharyscott.net>

	* ext/fiddle/closure.c: Documentation for Fiddle
	* ext/fiddle/pointer.c: ditto
	* ext/fiddle/function.c: ditto
	* ext/fiddle/lib/fiddle.rb: ditto
	* ext/fiddle/fiddle.c: ditto
	* ext/fiddle/handle.c: ditto

Wed Nov 28 04:53:40 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handle
	  to Fiddle::Handle.
	* ext/fiddle/pointer.c: Make Fiddle independent of DL, copy
	  DL::Pointer to Fiddle::Pointer.
	* test/fiddle/test_func.rb: relevant tests
	* test/fiddle/test_handle.rb: ditto
	* test/fiddle/test_pointer.rb: ditto
	* ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available
	* ext/fiddle/extconf.rb: check for dlfcn.h
	* ext/fiddle/fiddle.c: add constants for sizeof() things
	* ext/fiddle/fiddle.h: include dlfcn.h
	* ext/fiddle/function.c: expose a C function for creating new
	  Fiddle::Function objects.
	* ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat
	* ext/fiddle/lib/fiddle/function.rb: read the pointer from the
	  function for dl backwards compat.
	* test/dl/test_callback.rb: check the addresses of the pointers rather
	  than their types.
	* test/fiddle/helper.rb: remove dependency on dl
	* test/fiddle/test_closure.rb: ditto
	* test/fiddle/test_fiddle.rb: ditto

Wed Nov 28 03:03:28 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (opt-dir): don't use non portable flag -E of sed.

Wed Nov 28 02:55:35 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs
	  -march=$target_cpu on at least linux gcc 4.1.
	  patched by KOSAKI Motohiro

Tue Nov 27 22:03:09 2012  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
	  (rb_str_enumerate_lines): Dummy initialization of ary has been
	  replaced with UNINITIALIZED_VAR().

Tue Nov 27 21:29:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* bignum.c (bigdivrem): optimize the way to retry calculation of
	  bigdivrem so that the calculation is started from the point where
	  the last interruption was occurred.

	* bignum.c (bigdivrem1): ditto.

	* test/ruby/test_bignum.rb: add a test case for rb_bigdivrem in the
	  case that an interruption is occurred during bigdivrem1 is running.

Tue Nov 27 19:56:43 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (rb_vm_make_env_object): make Proc object if Env is possible
	  to point block.
	  [ruby-core:41038] [ruby-trunk - Bug #5634]

	* vm.c (rb_vm_make_proc): No need to make Proc object here.

	* bootstraptest/test_proc.rb: add tests.

Tue Nov 27 18:51:06 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ruby_atomic.h (ATOMIC_CAS): added for Solaris and other platforms.
	* ruby_atomic.h, signal.c (NEED_RUBY_ATOMIC_OPS): renamed from
	  NEED_RUBY_ATOMIC_EXCHANGE.
	* signal.c (ruby_atomic_compare_and_swap): naive, non-atomic
	  compare-and-swap implementation only used for platforms without
	  valid support for atomic operations.

Tue Nov 27 17:43:46 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/*:  Added --root option for building documentation outside
	  the source directory.
	* test/rdoc/*:  ditto
	* common.mk (rdoc):  Added --root to rdoc rule

Tue Nov 27 16:24:45 2012  Eric Hodel  <drbrain@segment7.net>

	* test/rdoc/test_rdoc_ri_paths.rb:  Fixed duplicate path bug which
	  caused windows failures.

Tue Nov 27 16:06:00 2012  Eric Hodel  <drbrain@segment7.net>

	* test/rdoc/test_rdoc_generator_darkfish.rb:  Updated tests for windows
	* test/rdoc/test_rdoc_options.rb:  ditto
	* test/rdoc/test_rdoc_parser.rb:  ditto
	* test/rdoc/test_rdoc_rdoc.rb:  ditto
	* test/rdoc/test_rdoc_ri_driver.rb:  ditto
	* test/rdoc/test_rdoc_servlet.rb:  ditto

Tue Nov 27 15:13:51 2012  Eric Hodel  <drbrain@segment7.net>

	* common.mk (rdoc):  Set --debug for rdoc generation in case of bugs

Tue Nov 27 14:56:45 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/rubygems_hook.rb:  Updated for (upcoming) RubyGems 2
	  import.
	* test/rdoc/test_rdoc_rubygems_hook.rb:  ditto

Tue Nov 27 13:59:29 2012  Narihiro Nakamura  <authornari@gmail.com>

	* NEWS: add improvements of the garbage collector.

Tue Nov 27 13:27:46 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc*:  Updated to RDoc 4.0 (pre-release)
	* bin/rdoc:  ditto
	* test/rdoc*:  ditto
	* NEWS:  Updated with RDoc 4.0 information

Tue Nov 27 12:17:11 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_thread_terminate_all): retry broadcast only when
	  an exception is raised.

Tue Nov 27 12:02:25 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_thread_terminate_all): broadcast terminate event
	  not only an interrupt exception but any exceptions.

Tue Nov 27 10:55:09 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* eval.c (ruby_cleanup): set thread status to THREAD_KILLED
	  for preventing thr.raise.
	* test/ruby/test_thread.rb (test_main_thread_status_at_exit):
	  test for the above.

Tue Nov 27 10:31:29 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_terminate_all): suppress a warning.

Tue Nov 27 09:29:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_join): raises ThreadError if target thread
	  is a main thread.
	* test/ruby/test_thread.rb (test_thread_join_main_thread):
	  test for the above.
	* NEWS: news for the above.

Tue Nov 27 09:24:47 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_join): raises ThreadError if target thread
	  is a current thread.
	* test/ruby/test_thread.rb (test_thread_join_current):
	  test for the above.
	* NEWS: news for the above.

Tue Nov 27 09:59:16 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): close mkmf.log for each libraries so that
	  failure messages are not mixed.

Tue Nov 27 09:58:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/digest/*/extconf.rb, ext/openssl/extconf.rb: get git rid of
	  post-1.8 feature require_relative for cross compilation.
	  [ruby-core:50160] [Bug #7439]

Tue Nov 27 09:17:59 2012  Koichi Sasada  <ko1@atdot.net>

	* NEWS: add TracePoint.

Tue Nov 27 08:16:03 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: rename TracePoint#file and TracePoint#line
	  to TracePoint#path and TracePoint#lineno respectively.
	  They are consistent to RubyVM::Backtrace::Location.

	* include/ruby/debug.h: ditto.

	* vm_core.h: ditto.

	* test/ruby/test_settracefunc.rb: ditto.

Tue Nov 27 08:04:26 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_terminate_all): broadcast eTerminateSignal
	  again when Ctrl-C was pressed. [Feature #1952] [ruby-dev:39107]

Tue Nov 27 07:58:03 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: add members to rb_trace_arg_t:
	  * `klass_solved' represents klass and id is checked.
	  * `line' represents line calculated from cfp.
	  * `file' represents line calculated from cfp.

	* vm_trace.c: fix to use above data structures.
	  No need to calculate klass and id, line and file
	  pairs for each trace points.

Tue Nov 27 07:47:09 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING().
	  Otherwise the loop in this function behave as busy loop because
	  native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true.

Tue Nov 27 04:12:49 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): git rid of post-1.8 features for cross
	  compilation.  [ruby-core:50160] [Bug #7439]

Tue Nov 27 00:13:41 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_trylock, rb_mutex_unlock, mutex_sleep):
	  raises ThreadError if called from trap handler as Thread#join.
	* NEWS: news for the above.

Mon Nov 26 23:55:33 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* NEWS: update for Thread#join incompatible change.

Mon Nov 26 22:44:24 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_terminate_all): use native_sleep() instead
	  of rb_thread_schedule(). Otherwise, it consume 100% cpu meaninglessly.
	  [Bug #5368] [ruby-dev:44546]
	* thread.c (thread_start_func_2): last sub-thread wakes up main thread.

Mon Nov 26 21:16:04 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_core.h (RUBY_VM_SET_TIMER_INTERRUPT, RUBY_VM_SET_INTERRUPT)
	(RUBY_VM_SET_FINALIZER_INTERRUPT, RUBY_VM_SET_TRAP_INTERRUPT)
	(RUBY_VM_INTERRUPTED): use enum symbol instead of immediate value.
	* thread.c (thread_join_m, rb_threadptr_execute_interrupts): ditto.
	* signal.c (signal_exec): ditto.

Mon Nov 26 20:23:20 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_join_m): use th->interrupt_mask instead of
	  th->in_trap.

	* vm_core.h (struct rb_thread_struct): remove in_trap member.
	* signal.c (signal_exec): ditto.
	* thread.c (thread_create_core): ditto.
	* thread.c (Init_Thread): ditto.

Mon Nov 26 20:23:49 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_argf.rb (TestArgf#test_chars): since marshal data is
	  binary, shouldn't pass via text mode.  use base64 encoded data.

Mon Nov 26 19:45:18 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ruby_atomic.h (ATOMIC_CAS): new macro for compare-and-exchange.

	* vm_core.h (struct rb_thread_struct): add interrupt_mask member.
	* thread.c (thread_create_core, Init_Thread): initialize
	  th->thread_mask.

	* vm_core.h (RUBY_VM_INTERRUPTED_ANY): new macro for avoiding
	  bare th->interrupt_flag.
	* vm_core.h (RUBY_VM_INTERRUPTED, RUBY_VM_INTERRUPTED): check
	  th->interrupt_mask.
	* thread.c (set_unblock_function, rb_thread_schedule): replace
	  th->interrupt_flag with RUBY_VM_INTERRUPTED_ANY()

	* signal.c (signal_exec): set up thread->interrupt_mask for
	  preventing recursive trap handler.
	* vm_core.h (RUBY_VM_CHECK_INTS, RUBY_VM_CHECK_INTS_BLOCKING): ditto.

	* thread.c (rb_threadptr_execute_interrupts):
	  don't process interrupt if it is masked.
	  [Bug #6009] [ruby-core:42524]

Mon Nov 26 19:43:42 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (make_compile_option_value): add trace_instruction option.
	  a patch by davidbalbert (David Albert).
	  [Bug #6786]

Mon Nov 26 19:10:53 2012  Koichi Sasada  <ko1@atdot.net>

	* bootstraptest/test_thread.rb: try to `join' each 100
	  threads.
	  This benchmark seems consuming long time on travis-ci
	  several times (and make `failure').

Mon Nov 26 18:22:56 2012  Koichi Sasada  <ko1@atdot.net>

	* common.mk: specify label `built-ruby'.

	* benchmark/driver.rb: quote path.

Mon Nov 26 18:26:28 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (signal_exec): add volatile to make sure setjmp safe.

Mon Nov 26 18:19:47 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (signal_exec): suppress "warning: variable 'signum'
	  might be clobbered by 'longjmp' or 'vfork'" warning.

Mon Nov 26 18:15:47 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/driver.rb: accept multiple `-e'.
	  You don't need to use `;' separation character.
	  [ruby-core:50139] [ruby-trunk - Bug #7380]

Mon Nov 26 17:10:04 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
	(rb_str_enumerate_lines): suppress "may be used uninitialized in
	  this function" warning.

Mon Nov 26 17:00:12 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_core.h (rb_thread_struct): added 'in_trap' member for marking
	  running trap handler.
	* signal.c (signal_exec): turn on in_trap when running trap.
	* thread.c (Init_Thread, thread_create_core): initialize in_trap
	  when creating new threads.
	* thread.c (thread_join_m): raise ThreadError when running trap
	  handler.Bug [#6416][ruby-core:44956]
	* test/ruby/test_thread.rb (test_thread_join_in_trap): new test
	  for the above.

Mon Nov 26 16:36:13 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (argf_each_codepoint): add missing ARGF#codepoints [Bug #7438]

Mon Nov 26 15:50:29 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* bignum.c (bigdivrem): restart calculation when bigdivrem1 was
	  interrupted by signal. Otherwise, ruby script may see a garbage
	  value.

Mon Nov 26 15:33:02 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* bignum.c (big_div_struct): added volatile to 'stop' member.
	  Otherwise, "if (bds->stop)" check in bigdivrem1 don't read
	  memory and ignore interrupt.
	* bignum.c (bigdivrem, rb_big_stop): ditto.

Mon Nov 26 12:11:09 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (DLNOBJ): missing in r37821.

Mon Nov 26 10:50:19 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_process.rb (test_setsid): added a few wait for
	  preventing that Process.getsid(io.pid) makes Errno::ESRCH.

Sun Nov 25 22:34:00 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* array.c (ary_resize_smaller): new function to resize array.

	* array.c (rb_ary_delete): refactoring to extract a function.

	* array.c (rb_ary_delete_same): refactoring.
	  It renames function, reduces duplicated code and removes unused
	  code.

	* gc.c (wmap_final_func): follow the above change.

	* internal.h (rb_ary_delete_same): ditto.

Sun Nov 25 22:27:33 2012  Benoit Daloze  <eregontp@gmail.com>

	* array.c: fixes for the updated documentation in r35858:
	  Typos and #take/#drop accept to take/drop 0 elements.

Sun Nov 25 19:43:29 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* NEWS: add a news about iconv.

Sun Nov 25 03:49:23 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb, test/test_set.rb: Move tests embedded in lib/set.rb
	  to test/test_set.rb.

Sun Nov 25 03:44:50 2012  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_each_line, rb_str_lines): String#lines now
	  returns an array instead of an enumerator.  Passing a block is
	  deprecated but still supported for backwards compatibility.
	  Based on the patch by yhara. [Feature #6670]

	* string.c (rb_str_each_char, rb_str_chars): Ditto for
	  String#chars.

	* string.c (rb_str_each_codepoint, rb_str_codepoints): Ditto for
	  String#codepoints.

	* string.c (rb_str_each_byte, rb_str_bytes): Ditto for
	  String#bytes.

	* NEWS: Add notes for the above changes.

Sun Nov 25 02:07:37 2012  Akinori MUSHA  <knu@iDaemons.org>

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_warning)
	  (Test::Unit::Assertions#assert_warn), test/ruby/envutil.rb,
	  test/ruby/test_enumerator.rb, test/ruby/test_io_m17n.rb,
	  test/ruby/test_regexp.rb, test/ruby/test_syntax.rb:
	  assert_warn() and assert_warning() are reversed.

Sat Nov 24 21:08:50 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* gc.c (wmap_final_func): rename variables to clarify the meaning.
	  In wmap2obj the key is WeakRef and the value is referenced object.
	  In obj2wmap the key is referenced object and the value is an array
	  of WeakRef.

	* gc.c (wmap_finalize): ditto.
	  [ruby-core:49044] [Bug #7304]

Sat Nov 24 21:01:55 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* array.c (rb_ary_delete_same_obj): new function for WeakRef.
	  This deletes same objects as item argument in the array.

	* internal.h (rb_ary_delete_same_obj): add a declaration.

	* gc.c (wmap_final_func): remove WeakRef object reference from the
	  array. rb_ary_delete() is not usable because it uses rb_equal() to
	  compare object references.

	* gc.c (wmap_finalize): remove recycled object references from weak
	  map hash properly. How to get object reference from object id was
	  wrong. st_delete() doesn't work properly if key and value arguments
	  are same. The key of obj2wmap is referenced object and the value of
	  obj2wmap is WeakRef array.

	* gc.c (wmap_aset): obj2wmap should contain WeakRef array in the
	  definition.

	* test/test_weakref.rb
	  (TestWeakRef#test_not_reference_different_object,
	   TestWeakRef#test_weakref_finalize): add tests for above.
	  [ruby-core:49044] [Bug #7304]

Sat Nov 24 19:44:41 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c (unicode_iconv_combine): returning flags are
	  nkf_char.

Sat Nov 24 19:29:18 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* test/ruby/test_rubyoptions.rb (test_usage, test_usage_long):
	  reduced, renamed.

Sat Nov 24 13:10:14 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_tracepoint_attr_raised_exception): should not check
	  value before event checking.

	* vm_trace.c (rb_tracepoint_attr_return_value): ditto.

	* test/ruby/test_settracefunc.rb: add tests for TracePoint#return_value
	  and TracePoint#raised_exception.

Sat Nov 24 12:47:27 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_process.rb (TestProcess#test_setsid): "./ruby-trunk"
	  doesn't work on all environments. EnvUtil.rubybin would be suitable.

Sat Nov 24 12:28:04 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* array.c (rb_ary_aref): fix Segmentation fault at TestArray#test_aref
	  on x64 mingw. Variable argument of rb_scan_args() should be a pointer
	  (VALUE *), but 0 of variable argument seems not equal to null pointer
	  on x64 mingw.

Sat Nov 24 11:47:14 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* process.c (proc_getsid): adds new method for getting session id.
	  Contributed from fumiyas (Fumiyasu SATOH). Thank you!
	  [Feature #6757] [ruby-dev:45977]
	* configure.in: adds getsid check.
	* test/ruby/test_process.rb (TestProcess#test_setsid): new test
	  for the above.
	* NEWS: news for the above.

Sat Nov 24 10:59:14 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_create_core): don't use th->thread_id before
	  initialized.

Sat Nov 24 00:00:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (proc_options, process_options, ruby_process_options): take
	  care of the case argc is 0, and check if argv has NULL.
	  [ruby-core:49889] [Bug #7423]

Sat Nov 24 00:00:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (--disable-dln): option to disable dynamic linking
	  feature.  [ruby-core:37676] [Feature #4946]

Fri Nov 23 23:44:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#pkg_config): strip all white spaces for
	  mingw64+MSYS pkg-config which erroneously emits extra newlines.
	  [ruby-core:47998] [Bug #7163]

Fri Nov 23 17:31:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (usage): wrap description lines if options are too long.

Fri Nov 23 11:13:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_usage2): refine
	  assertion.

	* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_usage2): now
	  --help option is for modern terminals.

Fri Nov 23 10:45:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* ext/socket/ipsocket.c (IPSocket#peeraddr): Fix example
	  [ruby-core:46429] [Bug #6732]

Fri Nov 23 02:40:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/cgi/core.rb: Documentation for CGI#header alias
	  Based on a patch by Marcus Stollsteimer
	  [ruby-core:49585] [Bug #7405]

Thu Nov 22 23:48:10 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (is_swept_object): extract from is_dead_object().

	* gc.c (rb_gcdebug_print_obj_condition): add the function for debug.
	  This function shows some conditions of given object (e.g.,
	  marked, in heap, swept).

	* gc.c (rb_gcdebug_sentinel): add the function for debug.
	  This function allow check to inadvertently free up an object.

Thu Nov 22 23:45:18 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* array.c (rb_ary_shared_with_p): fix cache validity check.
	  If #pop or #shift has been called against $: or $", the array will
	  be still shared with the snapshot. We check array length for cache
	  validity.
	  [ruby-core:49518] [Bug #7383]

	* test/ruby/test_require.rb
	  (TestRequire#test_require_with_array_pop,
	   TestRequire#test_require_with_array_shift): add tests for above.

Thu Nov 22 21:48:48 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk, win32/Makefile.sub (probes.dmyh): now be made in current
	  (=build) directory if build from the repository.

Thu Nov 22 21:34:51 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* test/ruby/test_rubyoptions.rb: added a test.

Thu Nov 22 20:32:07 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (string_to_c_strict, string_to_c): check NUL.
	* rational.c (string_to_r_strict, string_to_r): ditto.

Thu Nov 22 20:21:45 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* Makefile.in (.dmyh.h): removed $(VPATH). GNU make don't
	  recognize suffix rule with VPATH.

Thu Nov 22 18:11:27 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk, Makefile.in, win32/Makefile.sub (.dmyh.h): nmake merges
	  explicit rules for same target, but not merges explicit rules and
	  implicit rules -- always explicit rules win.  So, need to add an
	  explicit rule for probes.h.  [Bug #7421] [ruby-core:49839]

Thu Nov 22 18:01:28 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* Makefile.in (probes.o): add -C to ignore #include in probes.d.

	* probes.d: include vm_opts.h instead of vm_core.h.

	* vm_opts.h (VM_COLLECT_USAGE_DETAILS): move definition from vm_core.h.

Thu Nov 22 17:45:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8: Merge b0a6577a521d1bba5e19853f95d5c4b9be1072b5.
	  Support JIS X 0213 and some bugfixes.

Thu Nov 22 17:39:37 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* tool/gen_dummy_probes.rb: don't change #include, #if and #endif
	  lines. [Bug #7370]

Thu Nov 22 16:58:26 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* Makefile.in: run preprocessor when making probe.h
	* probes.d: define probe insn and insn__operand only when
	  VM_COLLECT_USAGE_DETAILS is 1. [Bug #7370]

Thu Nov 22 16:20:49 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm.c: Don't define vm_collect_usage_operand() and
	  static void vm_collect_usage_insn() when disabling
	  VM_COLLECT_USAGE_DETAILS. (refix r37796)

Thu Nov 22 15:26:02 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_insnhelper.h: partly revert r37631 (DTrace support).
	  "vm usage information is always collected, so uncomment the
	  functions." causes performance impact. [Bug #7370]
	  Off course this revert disables related probes.

Thu Nov 22 14:14:36 2012  Akinori MUSHA  <knu@iDaemons.org>

	* re.c (rb_memsearch_ss): Apply performance improvement to short
	  byte array search for platforms without memmem(3).
	  [Feature #6311] [ruby-dev:45530]

Thu Nov 22 12:52:19 2012  Akinori MUSHA  <knu@iDaemons.org>

	* test/ruby/test_string.rb (TestString#test_index): Add some
	  corner cases to tests for String#index, which might fail if ruby
	  directly used a buggy memmem(3) implementation.

Thu Nov 22 08:06:42 2012  Narihiro Nakamura  <authornari@gmail.com>

	* test/ruby/test_gc.rb (test_profiler_clear): fix wrong method
	  calls [Bug #7419] [ruby-core:49828].

Thu Nov 22 02:22:33 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* NEWS: edited (order etc).

Wed Nov 21 22:52:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/wait/wait.c (io_wait_readable): add alias wait_readable.

	* ext/io/wait/wait.c (io_wait_writable): this is easier to use than
	  IO.select for a single IO object and is immune to the
	  limitations/inefficiency of select() on platforms where poll/ppoll
	  is available.  patched by Eric Wong.  [Feature #4646]

Wed Nov 21 22:27:52 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (garbage_collect): remove a duplicative probe.

Wed Nov 21 22:08:48 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (gc_profile_clear): realloc profile records if its size is
	  higher than the threshold, GC_PROFILE_RECORD_DEFAULT_SIZE * 2.

Wed Nov 21 21:53:29 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (nucomp_to_c): added.

Wed Nov 21 21:35:38 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* include/ruby/util.h: removed extra semicolon in definition of
	  macro.
	* compile.c: ditto.
	* cont.c: ditto.
	* math.c: ditto.
	* node.c: ditto.
	* parse.y: ditto.

Wed Nov 21 18:46:37 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* rational.c (read_digits): due to a bit tighter rb_cstr_to_inum().

Wed Nov 21 16:13:37 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_so_nsieve_bits.rb: add an encoding pragma because
	  this benchmark using strings (literals) as binary sequence.
	  Now, they are UTF-8 strings. [ruby-dev:46578]

Wed Nov 21 00:57:43 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (Init_File): null device definition uses rb_define_const
	  instead of rb_file_const.

Wed Nov 21 00:28:18 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/ruby/test_m17n_comb.rb (test_str_crypt): Use RbConfig to get
	  libc's directory. Patched by Vit Ondruch [ruby-core:49763] [Bug #7312]

Tue Nov 20 23:28:26 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* marshal.c: add marshal readahead. marshalized Array, Hash and Struct
	  have size at least number of its elements, marshal readahead will
	  read the certain readable length and buffer when it needs more bytes.
	  marshal readahead prevents many calls to IO#getbyte and IO#read,
	  then it enables performance improvement.
	  [ruby-dev:45637] [Feature #6440]

Tue Nov 20 22:35:02 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* Makefile.in (.d.h): replace char * to const char * because somehow
	  current dtrace removes const of function declaration in probes.d.

Tue Nov 20 21:41:04 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/debug.h: introduced.
	  Debugging/profiling features will be located.

	* vm_trace.c: expose C-level TracePoint APIs.
	  Note that they are experimental.

	* vm_trace.c, include/ruby/debug.h: rename `rb_hook_flag_t'
	  to `rb_event_hook_flag_t'.
	  Macro names `RUBY_HOOK_FLAG_*' are also renamed to
	  `RUBY_EVENT_HOOK_FLAG_*'.

	* debug.h, vm_debug.h: rename debug.h to vm_debug.h.

	* common.mk: ditto.

	* debug.c, main.c, vm_core.h: ditto.

Tue Nov 20 21:12:37 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (RUBY_DTRACE_AVAILABLE): only check dtrace availability.

	* configure.in (RUBY_DTRACE_POSTPROCESS): restore.

Tue Nov 20 21:22:44 2012  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
	  IShellDispatch6 bundled in Windows 8. Thanks to phasis68 (Heesob
	  Park).  [ruby-core:49580][Bug #7403]

Tue Nov 20 21:06:41 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: some improvements.
	* rational.c: ditto.

Tue Nov 20 21:01:16 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (incs): BSD make cannot deal with non-prefixed dependency
	  and prefixed target.

Tue Nov 20 20:10:23 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* array.c (rb_ary_bsearch): fix rdoc bug (O(n log n) -> O(log n)).
	  Patch by Charlie Somerville.  [ruby-core:49661] [Bug #7409]

	* range.c (range_bsearch): ditto.

Tue Nov 20 19:02:44 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: rename and add TracePoint APIs.
	  (1) TracePoint.new(...){...} creates a new trace point
	      but does not make it enable.
	  (2) TracePoint.trace(...){...} creates a new trace point
	      and enable it (same as old behavior).
	  (3) TracePoint#enable make it enable (renamed from TracePoint#retrace).
	      If block given, when enable only in block.
	  (4) TracePoint#disable make it disable (renamed from TracePoint#untrace).
	      If block given, when disable only in block.
	  (5) TracePoint#enabled? returns this trace is enable or not.
	  [Feature #6895]

	* test/ruby/test_settracefunc.rb: add tests.

Tue Nov 20 18:35:05 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: add two methods:
	  (1) TracePoint#return_value which returns return
	      value on the :return and :c_return event.
	  (2) TracePoint#raised_exception which returns raised exception
	      value on the :raise event.
	  Each methods raise RuntimeError if it is called at unsupported
	  event.
	  Please review and give us feedback until next preview
	  release (Dec/2012) of Ruby 2.0.0.
	  [Feature #6895]

	* insns.def, vm.c, vm_eval.c, vm_insnhelper.c, eval.c, thread.c:
	  ditto.

	* vm_trace.c, vm_core.h: move definition of rb_trace_arg_t from
	  vm_trace.c to vm_core.h.
	  Caller fills rb_trace_arg_t and pass the pointer of this variable.

	* test/ruby/test_settracefunc.rb: fix tests to test this change.

Tue Nov 20 17:31:12 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: fix dtrace didn't work on darwin.

	* configure.in (RUBY_DTRACE_AVAILABLE): unify RUBY_DTRACE_POSTPROCESS
	  and RUBY_DTRACE_BSD_BROKEN.

Tue Nov 20 15:20:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* file.c (File.extname): Documentation for extname on dotfiles and
	files ending with a dot. Also, added example for this.
	[ruby-core:47852] [Bug #7112]

Tue Nov 20 14:19:20 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_signal.rb (TestSignal#test_signame): fix windows
	  test failure. Process.kill on windows can't send a signal to
	  another process.

Tue Nov 20 13:58:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (Init_IO): moved all rb_file_const() into file.c.
	* file.c (Init_File): replace with rb_file_const() with
	  rb_define_const() because RDoc don't care rb_file_const.
	  [Bug #5530]

Tue Nov 20 12:35:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* ruby.c (usage_msg): Fix typo [ruby-core:49205] [Bug #7327]

Tue Nov 20 12:35:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* file.c (File::NULL): Document File::NULL constant
	  [ruby-core:49384] [Bug #7365]

Tue Nov 20 12:05:15 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_read): Windows 8 fixed one of a bug of console
	  API.
	  based on the patch by Heesob Park at [ruby-core:49479] [Bug #7379]

Tue Nov 20 11:14:33 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (--enable-dtrace): always call RUBY_DTRACE_BSD_BROKEN
	  for portability.
	  As the note, FreeBSD 8 has DTrace as the optional
	  feature (it is enabled by the build option), but doesn't have USDT.
	  FreeBSD 9 has USDT but they are still optional. FreeBSD 10 will
	  enable them by default.
	  The variable $rb_cv_prog_dtrace_g is "yes" only on FreeBSD 9 with
	  optional DTrace or FreeBSD 10. If it is "no", you cannot know
	  whether it doesn't need -G or DTrace is disabled. (by checking
	  error code, you can know)

Mon Nov 19 22:55:48 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in (--enable-dtrace): change help message

Tue Nov 20 11:05:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/tracer.rb (Tracer.trace_func): printf to stdout
	  Patch by Michal Fojtik [ruby-core:45219] [Bug #6490]

Mon Nov 19 21:24:18 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* vm_dump.c: not to include probes.h because the code does not depend
	  on it.
	* common.mk (vm_dump.$(OBJEXT)): remove dependency on probes.h

Tue Nov 20 10:14:22 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_s_check_interrupt): removed redundant
	  GET_THREAD().

Tue Nov 20 10:12:46 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_threadptr_async_errinfo_active_p): added a small
	  comment.

Tue Nov 20 10:05:56 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_blocking_region_end): replaced GET_THREAD()
	  with ruby_thread_from_native(). We don't have GVL here.

Tue Nov 20 09:56:15 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_threadptr_execute_interrupts) removed.
	* thread.c (rb_threadptr_execute_interrupts_common) renamed to
	  rb_threadptr_execute_interrupts. I.e. unified
	  rb_threadptr_execute_interrupts and rb_threadptr_execute_interrupts_common.
	* thread.c (rb_thread_schedule, rb_thread_execute_interrupts) s/_common//.

Tue Nov 20 09:48:34 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (rb_get_next_signal): removed pointless signal
	  disabling. pthread_sigmask() only changes current thread
	  mask.

Tue Nov 20 09:36:55 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (install_sighandler): added comments why we need
	  rb_disable_interrupt().

Tue Nov 20 09:31:33 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (rb_disable_interrupt, rb_enable_interrupt): removed
	  USE_TRAP_MASK.
	* signal.c (trap_arg, trap_ensure): removed.
	* signal.c (trap, sig_trap): removed pointless signal disabling.
	  We don't need it because we no longer run trap handler on signal
	  handler context.

Tue Nov 20 09:20:49 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* prelude.rb: Moved Mutex#synchronize to
	* thread.c (rb_mutex_synchronize_m): here. [Bug #4266]

Tue Nov 20 08:36:15 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (sig_signame): implements Signal.signame method
	[Feature #5613]
	* test/ruby/test_signal.rb (test_signame): adds test for above
	* NEWS: add an item about above

Mon Nov 19 16:30:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (rb_struct_each_pair): yield associated pairs so that
	  an unsplat argument can get both, for consistency with Hash,
	  OpenStruct, and etc.  [ruby-dev:46533] [Bug #7382]

Mon Nov 19 16:17:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LIBS): libelf is need on only FreeBSD.

Mon Nov 19 16:08:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (RUBYLIB): purelib option in runruby.rb is deprecated
	  since r28841, so set to an empty list to get rid of a bogus path in
	  child processes, which caused an insecure operation exception in
	  test/ruby/test_encoding.rb:test_unsafe.

Mon Nov 19 15:40:50 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (script): add OPTS=-v, requested by @_ko1.

Mon Nov 19 15:09:07 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: fix didn't enable_dtrace=yes on auto.

	* configure.in: see enable_dtrace for adding libelf on FreeBSD.

	* common.mk: VPATH is not needed.

Mon Nov 19 14:55:51 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c: add `Thread#backtrace_locations' method.
	  This method is similar to `caller_locations' method for
	  specific method.
	  And fix to accept `level' and `n' parameters for `Thread#backtrace'
	  and `Thread#backtrace_locations'.
	  `caller' (and `caller_locations') do not return `caller' method
	  frame.
	  However, `Thread#backtrace' (and `Thread#backtrace_locations')
	  return `Thread#backtrace' method frame itself
	  if `Thread.current.backtrace' was called.

	* vm_backtrace.c: ditto.

	* internal.h: ditto.

	* test/ruby/test_backtrace.rb: add tests.

Mon Nov 19 14:54:32 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* Makefile.in, common.mk (probes.h): moved to common.mk and changed to
	  see $(srcdir).

	* common.mk (probes.dmyh): now created it on $(srcdir) always.

	* win32/Makefile.sub (.SUFFIXES): removed common suffix.

Mon Nov 19 10:00:10 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* Makefile.in (.SUFFIX): bsdmake needs .SUFFIX is defined before use.

	* common.mk: fix path of probes.dmyh.

	* common.mk (vm_dump.o): depend probes.h.

	* configure.in: FreeBSD's USDT requires libelf.

Mon Nov 19 01:11:59 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,
	  RUBY_DTRACE_FUNC_RETURN_HOOK): move from vm_core.h to new file
	  probes_helper.h for narrowing dependency to probes.h.
	* common.mk (VM_CORE_H_INCLUDES): remove dependency to probes.h.
	* common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h.
	* vm.c, vm_insnhelper.c: include probes_helper.h.

Sun Nov 18 16:33:00 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in, Makefile.in, common.mk: support DTrace on Solaris 10,
	  based on r26235 by Yugui. On Solaris 10, low optimization level
	  may also be needed, e.g. optflags="-xO1" or "-xO0" with Oracle
	  SolarisStudio 12.3 cc.

	* configure.in (--enable-dtrace): new option to enable/disable
	  DTrace support. By default, trying to enable if dtrace command
	  is found on the system. It is disabled when cross compiling.

	* configure.in (RUBY_DTRACE_POSTPROCESS): new macro. checks whether
	  the dtrace on the system needs postprocessing with "dtrace -G".
	  The postprocessing is needed on Solaris 10 and other platforms.

	* configure.in (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether
	  the dtrace supports USDT.

	* configure.in (DTRACE): move after RUBY_DTRACE_POSTPROCESS.

	* configure.in (LD): On Solaris, /usr/ccs/bin/ld is preferred.

	* configure.in, Makefile.in, common.mk (DTRACE_OBJ): new macro for
	  DTrace probe object generated by postprocessing with "dtrace -G".

	* Makefile.in, common.mk (probes.$(OBJEXT)): DTrace probe object
	  generated by the postprocessing. New file probes.stamp is for
	  rebuilding related objects that may be modified by "dtrace -G".

	* configure.in, Makefile.in, common.mk (DTRACE_GLOMMED_OBJ): new
	  macro for DTrace static library hacks.

	* configure.in, Makefile.in (LIBRUBY_A_OBJS): ditto.

	* Makefile.in, common.mk (ruby-glommed.$(OBJEXT)): new target with
	  rule for DTrace static library hacks.

	* common.mk (DTRACE_DEPENDENT_OBJS): objects depended on probes.h.

Sun Nov 18 09:31:47 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (read_comp): mathn compliant.
	* rational.c (read_num): ditto.

Sun Nov 18 02:50:12 2012  Luis Lavena <luislavena@gmail.com>

	* win32/file.c (replace_to_long_name): correct logic around wildcard
	  characters detection and ensure wide-chars are used as pattern.
	  [ruby-core:49451] [Bug #7374]

Sun Nov 18 02:02:46 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (read_comp): modified handling of polar form.

Sun Nov 18 00:50:44 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (read_comp): fixed handling of polar form.

Sun Nov 18 00:14:46 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (string_to_c_strict, string_to_c): rewrote without regexp.
	* rational.c (string_to_r_strict, string_to_r): ditto.

Sat Nov 17 23:53:05 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (make_patterns): should not accept extra sign.

Sat Nov 17 21:45:12  Luis Lavena  <luislavena@gmail.com>

	* win32/file.c (replace_to_long_name): skip expansion for all wildcard
	  characters.
	  [ruby-core:49451] [Bug #7374]

	* test/ruby/test_file_exhaustive.rb: add more assertions to test.

Sat Nov 17 12:14:50 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: use literal YAML style
	  when emitting multi-line strings. Thanks @atambo

	* test/psych/test_yaml.rb: test for change.

Sat Nov 17 12:03:41 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: avoid raising exceptions when
	  parsing Floats and Integers. Thanks riffraff [ruby-core:44426]
	* test/psych/test_numeric.rb: associated test

Sat Nov 17 11:34:31 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* st.c (st_update): pass the key in st_table so that we can free
	  memory of the key in st_table when deleting.
	  [ruby-core:49220] [Bug #7330]

	* test/-ext-/st/test_update.rb
	  (Bug::StTable#test_pass_objects_in_st_table): add a test.

Sat Nov 17 11:26:36 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/core_ext.rb: move Kernel#y so that it can
	  manually be required as 'psych/y'.

	* ext/psych/lib/psych/y.rb: ditto

Sat Nov 17 08:13:48 2012  Benoit Daloze  <eregontp@gmail.com>

	* lib/abbrev.rb: fix r37113. Correct examples, fix style
	  and show explicit dependency (require 'abbrev').

Sat Nov 17 07:35:15 2012  Luis Lavena  <luislavena@gmail.com>

	* win32/file.c (replace_to_long_name): skip automatic path expansion
	  when wildcard character is used.  [ruby-core:49451] [Bug #7374]

	* test/ruby/test_file_exhaustive.rb: add a test for above.

Sat Nov 17 00:50:23 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* marshal.c (w_object): add flonum to arg->data to keep reference index
	  consistency. [ruby-core:49323] [Bug #7348]

	* test/ruby/test_marshal.rb: add a test for above.

Sat Nov 17 00:40:25 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (incs): dist files need probes.dmyh.

	* common.mk (probes.dmyh): depends on generator script.

	* Makefile.in, common.mk, configure.in, win32/Makefile.sub (probes.h):
	  select generating with dtrace or copying dummy file by suffix rules.

Fri Nov 16 19:24:10 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_thread_call_without_gvl2): change the parameter of
	  `func' from `int *skip_interrupt' to `VALUE *flags'.
	  If (flags & RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS) is not zero,
	  then skip checking interrupt.
	  [ruby-core:46547]

	* include/ruby/thread.h: ditto.

Fri Nov 16 18:59:05 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* Makefile.in (no-dtrace-probes.h): dmyprobes.h is in srcdir.

	* common.mk (dmyprobes.h): ditto.

Fri Nov 16 17:57:15 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (probes.h): split build commands for dtrace-available
	  and unavailable platforms.

	* Makefile.in (incs): probes.h is a platform dependent file, so it
	  cannot be a part of prereq target.  move it to all-incs.

	* configure.in (DTRACE): move after AC_PROG_CC since cross_compiling
	  is set in it.

	* configure.in (DTRACE): ignore non-prefixed version if
	  cross-compiling.

	* Makefile.in, win32/Makefile.sub (probes.h): fix copying dmyprobes.h
	  path when outplace-build.

Fri Nov 16 15:27:36 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* lib/net/pop.rb (POP3.certs): fix typo in comment.
	  patch from no6v (Nobuhiro IMAI) <nov@yo.rim.or.jp>.
	  [ruby-dev:46519] [Bug #7355]

Fri Nov 16 12:36:47 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/rake/helper.rb (Rake::TestCase#setup): revert r37669.
	  @orig_PWD should be the original pwd.

	* test/rake/test_*.rb: don't use @orig_PWD to load libraries.
	  It should be specified with relative path from the file.

Fri Nov 16 10:22:52 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/rake/helper.rb (Rake::TestCase#setup): @orig_PWD shouldn't be
	  Dir.pwd when the build directory is different from source directory.

Fri Nov 16 09:41:08 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rake/version.rb:  workaround fix to build. see #7366
	  [ruby-dev:46522]

Fri Nov 16 07:23:18 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rake*:  Updated to rake 0.9.4
	  http://rake.rubyforge.org/doc/release_notes/rake-0_9_4_rdoc.html for
	  a list of changes in 0.9.4.

	* test/rake*:  ditto

	* NEWS:  ditto

Fri Nov 16 06:58:52 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rake*:  Updated to rake 0.9.3.  See
	  http://rake.rubyforge.org/doc/release_notes/rake-0_9_3_rdoc.html for
	  a list of changes in 0.9.3.

	* test/rake*:  ditto

	* bin/rake:  ditto

	* NEWS:  ditto

Thu Nov 15 22:39:32 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
	  condition, missed break in switch/case, and workaround for GCC
	  optimization. See [ruby-core:49364] in detail.  A great patch from
	  Heesob Park. [Bug #7352] [Feature #4766]

	* array.c (rb_ary_bsearch): fix similar bug (missed break).

	* test/ruby/test_range.rb: add two test cases for above.

Thu Nov 15 22:41:57 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_exec.h (GENTRY): GENTRY should be pointer size.
	  A patch by yoshidam (Yoshida Masato) [Bug #7332].

Thu Nov 15 13:20:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* man/erb.1: Fix grammar and copyright dates
	* man/goruby.1: ditto
	* man/irb.1: ditto
	* man/rake.1: ditto
	* man/ri.1: ditto
	* man/ruby.1: ditto
	  Patch by Arthur Gunn
	  [Fixes Github #210]

Thu Nov 15 11:35:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* man/ruby.1: Grammar edits for man page
	  Based on a patch by Michael Endsley [Fixes Github #183]

Thu Nov 15 00:47:20 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* array.c (rb_ary_bsearch): add Array#bsearch for binary search.
	  [ruby-core:36390] [Feature #4766]

	* test/ruby/test_array.rb: add a test for above.

	* range.c (range_bsearch): add Range#bsearch for binary search.
	  [ruby-core:36390] [Feature #4766]

	* test/ruby/test_range.rb: add a test for above

	* NEWS: added the two new methods.

Wed Nov 14 13:25:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/fileutils.rb (chmod): Add "X" to modes, convert format to table
	  [ruby-core:48965] [Bug #7288]

Wed Nov 14 11:51:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/csv.rb (init_comments): Document private method #init_comments.
	  Based on a patch from Vincent Batts [ruby-core:49172] [Bug #7319]

Wed Nov 14 00:54:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* Makefile.in (probes.h): create from probes.d

Tue Nov 13 18:44:01 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_cfunc_with_frame): don't use ci after
	  EXEC_EVENT_HOOK because ci can be overridden.

	* vm_eval.c: ditto.

	* method.h: change invoker's parameters types.

	* vm_method.c (call_cfunc_invoker_func): ditto.

Tue Nov 13 18:01:54 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_using): raise an ArgumentError if cyclic using is
	  detected.  based on the patch by Charlie Somerville.
	  [ruby-core:49092] Bug #7308

	* test/ruby/test_refinement.rb: related test.

Tue Nov 13 17:40:04 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* common.mk (vm_insnhelper.c): this target is useless and causes
	  ruby always need rebuild.

Tue Nov 13 17:35:49 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (insn_data_to_s_detail): remove debug lines.

Tue Nov 13 17:28:47 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_caller_setup_args): save and restore
	  ci->argc and ci->blockptr before and after method invocations
	  because these method dispatches can override call_info.

	* bootstraptest/test_method.rb: add tests for this fix.

Tue Nov 13 16:38:02 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* common.mk (dmyprobes.h): always create for make dist.

	* Makefile.in (probes.h): create or copy dmyprobes.h

	* win32/Makefile.sub: only do copy dmyprobes.h.

Tue Nov 13 15:37:21 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* Makefile.in (.SUFFIX): .SUFFIX is needed here for .d.h on bsd make.

Tue Nov 13 15:34:35 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk Makefile.in win32/Makefile.sub (.d.h): it's not common.

Tue Nov 13 12:27:11 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: disable dtrace because it doesn't work on FreeBSD.

	* common.mk (clean-local): rm probes.h.

	* common.mk (parse.o): depend $(PROBES_H_INCLUDES).

	* common.mk (.d.h): moved from Makefile.in and use BASERUBY.

	* tool/gen_dummy_probes.rb: reimplemented with ruby because sed is not
	  available on Windows Microsoft VC++ environment.

Tue Nov 13 12:30:26 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/README.win32: added mention about build directory.  currently
	  we can not build ruby in win32 directory.  this problem is reported
	  by Masahiro Kitajima <katonbo@katontech.com>.

Tue Nov 13 11:03:47 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* re.c (rb_memsearch_ss): performance improvement by using memmem(3) if
	  possible. [ruby-dev:45530] [Feature #6311]

	* configure.in: check existence of memmem(3) and that it is not broken.

Tue Nov 13 06:50:02 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* probes.d: add DTrace probe declarations. [ruby-core:27448]

	* array.c (empty_ary_alloc, ary_new): added array create DTrace probe.

	* compile.c (rb_insns_name): allowing DTrace probes to access
	  instruction sequence name.

	* Makefile.in: translate probes.d file to appropriate header file.

	* common.mk: declare dependencies on the DTrace header.

	* configure.in: add a test for existence of DTrace.

	* eval.c (setup_exception): add a probe for when an exception is
	  raised.

	* gc.c: Add DTrace probes for mark begin and end, and sweep begin and
	  end.

	* hash.c (empty_hash_alloc): Add a probe for hash allocation.

	* insns.def: Add probes for function entry and return.

	* internal.h: function declaration for compile.c change.

	* load.c (rb_f_load): add probes for `load` entry and exit, require
	  entry and exit, and wrapping search_required for load path search.

	* object.c (rb_obj_alloc): added a probe for general object creation.

	* parse.y (yycompile0): added a probe around parse and compile phase.

	* string.c (empty_str_alloc, str_new): DTrace probes for string
	  allocation.

	* test/dtrace/*: tests for DTrace probes.

	* vm.c (vm_invoke_proc): add probes for function return on exception
	  raise, hash create, and instruction sequence execution.

	* vm_core.h: add probe declarations for function entry and exit.

	* vm_dump.c: add probes header file.

	* vm_eval.c (vm_call0_cfunc, vm_call0_cfunc_with_frame): add probe on
	  function entry and return.

	* vm_exec.c: expose instruction number to instruction name function.

	* vm_insnhelper.c: add function entry and exit probes for cfunc
	  methods.

	* vm_insnhelper.h: vm usage information is always collected, so
	  uncomment the functions.

Mon Nov 12 19:14:50 2012  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in (isinf, isnan): isinf() and isnan() are macros on
	  DragonFly which cannot be found by AC_REPLACE_FUNCS().  This
	  workaround enforces the fact that they exist on DragonFly.

Mon Nov 12 15:59:38 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo),
	  vm_insnhelper.c (vm_search_method): revert r37616 because it's too
	  slow.  [ruby-dev:46477]

	* test/ruby/test_refinement.rb (test_inline_method_cache): skip
	  the test until the bug is fixed efficiently.

Mon Nov 12 14:28:01 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/mkexports.rb (each_export): skip garbage generated by VS2012's
	  nmake.
	  reported and patched by Yoshida Masato at [Bug #7333] [ruby-dev:46484]

Sun Nov 11 18:58:55 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* test/date/test_date_{parse,strptime}.rb: changed the format of
	  some extra messages.

Sun Nov 11 18:41:34 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (date__parse): revised the tight parser
	  (about handling of apostrophes).

Sun Nov 11 15:39:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_s_create): just warn for wrong elements now.
	  [ruby-dev:46440] [Bug #7300]

	* hash.c (rb_hash_s_create): refine error messages.

	* error.c (rb_builtin_class_name): share for above.

Sun Nov 11 15:12:18 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (top_using): remove Kernel#using, and add main.using instead.

	* test/ruby/test_refinement.rb: related test.

Sun Nov 11 13:41:01 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_using_refinement, rb_mod_using, f_using): clear method
	  cache only when using is called explicitly.

	* test/ruby/test_refinement.rb: related test.

Sun Nov 11 12:56:34 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* lib/pstore.rb (PStore): fix not to replace ThreadError raised in
	  #transaction block with PStore::Error.
	  [ruby-core:39238] [Bug #5269]

Sun Nov 11 11:36:19 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo):
	  add a new field for inline method cache.

	* vm_insnhelper.c (vm_search_method): check rb_call_info_t::refinements
	  not to confuse inline method cache when module_eval is used with
	  refinements.

	* test/ruby/test_refinement.rb: related test.

Sun Nov 11 08:45:45 2012  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* ruby.c: removed a comma before "before"

Sat Nov 10 23:02:31 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: move immutable fields from struct heaps_slot and struct
	  sorted_heaps_slot into struct heaps_header.
	  Based on a patch from Sokolov Yura [Feature #6199][ruby-core:43592]

Sat Nov 10 19:28:16 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: modified doc.
	* rational.c: ditto.

Sat Nov 10 18:20:10 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c: edited about era.

Sat Nov 10 12:13:41 2012  Kouhei Sutou  <kou@cozmixng.org>

	* tool/rbinstall.rb: Don't install *.gemspec under lib/.
	  [ruby-core:48966] [Bug #7289]
	  Reported by Vit Ondruch. Thanks!!!

Sat Nov 10 00:49:26 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* ruby_atomic.h: renamed from atomic.h to avoid header file name
	  conflict on Solaris 10. [ruby-dev:46414] [Bug #7287]

	* gc.c, signal.c, vm_core.h, common.mk: reflect the rename from
	  atomic.h to ruby_atomic.h.

Sat Nov 10 00:46:57 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* atomic.h: Revert r37491 which is a temporary workaround.

Sat Nov 10 00:33:31 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* siphash.h: check configure macros before include newer headers.

Fri Nov  9 23:33:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/erb.rb (ERB#run, ERB#result): eval under isolated bindings for
	  safe concurrent use.  [ruby-core:47638] [Bug #7046]

Fri Nov  9 23:05:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (BYTE_ORDER): define using configured WORDS_BIGENDIAN.

	* siphash.c (sip_init_state): use union to suppress warnings by gcc
	  4.7.

Fri Nov  9 19:40:03 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* array.c (rb_ary_splice): fix r37583 doesn't consider the case when
	  beg > array length.

Fri Nov  9 16:11:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rb_memhash): use siphash.

Fri Nov  9 16:08:46 2012  Sokolov Yura funny-falcon  <funny.falcon@gmail.com>

	* array.c: speedup Array#unshift by using space in shared array.
	  [Feature #6638]
	  - when array owns its shared array (ARY_SHARED_NUM == 1), and there
	    is enough space then try unshift values directly into shared
	    array.
	  - when resulting array is big (~>64 items) then make it shared with
	    enough room for future #unshifts, and then insert into shared
	    array.

	* array.c (rb_ary_splice): use shared array in rb_ary_slice.
	  [Feature #6638]
	  - use ary_ensure_room_for_push when rb_ary_slice used to add at the
	    end of array, cause rb_ary_concat use rb_ary_slice.

	* array.c (ary_ensure_room_for_push): make array really suitable for
	  queue.  [Feature #6638]
	  when array is shared (which happens after Array#shift), and
	  ARY_SHARED_NUM == 1 (which is very often when array used as queue),
	  then make rb_ary_push push directly into shared array.

	* array.c (rb_ary_modify): steal shared array's container when
	  ARY_SHARED_NUM == 1.  [Feature #6638]
	  - Do not allocate new memory in rb_ary_modify when ARY_SHARED_NUM == 1
	    and length almost same.
	  - Store ARY_CAPA instead of RARRAY_LEN in ary_make_shared, to make
	    it useful.
	  - Fix rb_ary_sort_bang accordantly.

Fri Nov  9 16:00:00 2012  Zachary Scott  <zzak@zacharyscott.net>

	* ext/bigdecimal/bigdecimal.c: Documentation for BigDecimal
	  Based on a patch from Vincent Batts [ruby-core:49047] [Bug #7305]

Fri Nov  9 15:25:42 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/shellwords.rb (Shellwords#shellescape): Add back my original
	  real world example with some enhancement.

	* lib/shellwords.rb (Shellwords#shelljoin): Undo part of the
	  previous rdoc change.  This new example using a string-only
	  array was not in line with the description.

Fri Nov  9 12:58:13 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_crypt): crypt(3) may return NULL.
	  Latest glibc (2.16?) crypt(3) actually returns NULL. [Bug #7312]

Fri Nov  9 12:07:06 2012  Akinori MUSHA  <knu@iDaemons.org>

	* include/ruby/ruby.h (alloca), eval_intern.h (alloca), gc.c
	  (alloca): Make alloca() globally available by moving the
	  ultimate ifdef's to ruby/ruby.h.  Gcc hides its builtin alloca()
	  when compiling with -ansi, and linking thus fails on platforms
	  that lack their own alloca() implementation in libc, which
	  include OpenBSD and some ports of NetBSD.  We use alloca()
	  everywhere including from within third party C extensions, so
	  alloca() must be made globally available. [Bug #7307]

	* addr2line.c (alloca): Replace the alloca() part with the
	  ultimate ifdef's. [Bug #7307]

Fri Nov  9 09:30:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* io.c (IO#new):
	  Fix indentation from r37444
	  [ruby-core:48052] [Bug #7179]

Fri Nov  9 07:36:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* bignum.c (bigmul0): enable big_mul_toom3.
	  [ruby-core:48552] [Bug #7242]

	* bignum.c (bigmul1_toom3): fix incorrect calculation.
	  the patch is made by Heesob Park.
	  [ruby-core:48552] [Bug #7242]

Fri Nov  9 05:33:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* bignum.c (bigmul0): disable big_mul_toom3 temporarily.
	  [ruby-core:48552] [Bug #7242]

	* test/ruby/test_bignum.rb (test_mul_large_numbers):
	  add a test for bigmul1_toom3 suggested in [Bug #7242].

Thu Nov  8 21:57:59 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* re.c (rb_memsearch): performance improvement by using memchr().
	  [ruby-dev:45397] [Feature #6173]

Thu Nov  8 19:02:50 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
	  treat \r as newline as mame pointed. [ruby-dev:46425] [Bug #7278]

Thu Nov  8 11:32:11 2012  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in (--with-opt-dir): Avoid nesting of double quotes
	  inside backquotes, since some traditional shells like PD KSH
	  (which OpenBSD's /bin/sh bases on) fail to parse them.

Thu Nov  8 09:34:00 2012  Kenta Murata  <mrkn@cookpad.com>

	* numeric.c: Add a caution that the results of the comparing
	  operations of two NaNs are undefined.
	  [#1720] [ruby-dev:38725] [ruby-core:36966]

Thu Nov  8 04:45:21 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* include/ruby/intern.h: Restore rb_enumeratorize as it was before
	  r37497 and introduce rb_enumeratorize_with_size instead. [#7302]

	* enumerator.c: ditto.

Wed Nov  7 15:22:37 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* numeric.c (ruby_float_step): fix r37514: it yielded with NaN
	  if the unit is infinity.

Wed Nov  7 15:46:12 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/webrick.rb: fix typo. reported by Rohit Arondekar.
	  https://github.com/ruby/ruby/pull/211

Wed Nov  7 15:34:12 2012  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi/core.rb: alias CGI#http_header to CGI#header.

Wed Nov  7 12:49:39 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_refine): set RMODULE_IS_REFINEMENT to a created
	  refinement module, and don't override method_added.

	* vm_method.c (rb_method_entry_make): check redefinition of
	  optimized methods when a method is added to a refinement module.
	  [ruby-core:48970] [Bug #7290]

	* test/ruby/test_refinement.rb: related test.

Wed Nov  7 11:48:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-additional.el (ruby-mode-set-encoding): now encoding needs
	  to be set always explicitly actually.  [Feature #6679]

Wed Nov  7 09:15:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_const_get): avoid inadvertent symbol creation.

Wed Nov  7 07:52:50 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (rb_enum_cycle_size): prefix with rb.

Wed Nov  7 04:32:15 2012  Luis Lavena  <luislavena@gmail.com>

	* test/ruby/test_file_exhaustive.rb: Remove FIXME skip on Windows
	  specific test because the test in question was already fixed.

Wed Nov  7 03:45:12 2012  Luis Lavena  <luislavena@gmail.com>

	* ext/zlib/extconf.rb: Recognize zlibwapi as linking library.
	  Patch by Daniel Berger.

	  [ruby-core:44979] [Feature #6421]

Wed Nov  7 02:06:40 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: New method #size; constructor accepts size.
	                Have #to_enum accept a block
	                Warn when using deprecated form of constructor
	                Support #size for enumerators created from enumerators
	                Support for lazy.{map|flat_map|...}.size.

	* include/ruby/intern.h: RETURN_SIZED_ENUMERATOR for support of
	  sized enumerators.

	* array.c: Support for various enumerator.size.

	* enum.c: ditto.

	* hash.c: ditto.

	* numeric.c: ditto.

	* range.c: ditto.

	* string.c: ditto.

	* struct.c: ditto.

	* vm_eval.c: ditto.

Tue Nov  6 20:40:28 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* object.c (rb_mod_const_get): Fix constant missing exception class
	  and message to maintain backwards compatibility. Constant search
	  should start at Object when constant starts with '::'

	* test/ruby/test_module.rb: test for fixes

Tue Nov  6 16:50:00 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* lib/tempfile.rb (Tempfile#inspect): fix confusing #inspect.
	  previous Tempfile#inspect says it is a File, but actually
	  it is not a File.

	    t = Tempfile.new("foo") #=> #<File:/tmp/foo20121106-31970-1ffbum0>
	    t.is_a? File #=> false

	  now Tempfile#inspect returns like:

	    t = Tempfile.new("foo")
	    #=> #<Tempfile:/tmp/foo20121106-31970-1ffbum0>

	  [ruby-core:47544] [Bug #7027]

Tue Nov  6 16:22:30 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* atomic.h: add #include <sys/atomic.h> for the workaround of
	  header file name conflict of atomic.h with /usr/include/atomic.h
	  on Solaris 10. [ruby-dev:46414] [Bug #7287]

Tue Nov  6 14:38:00 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_win32ole.rb: now source encoding is UTF-8, so
	  binary strings in old scripts are dangerous.

Tue Nov  6 14:25:09 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
	  don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278]

Tue Nov  6 09:42:26 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_b): Add String#b, returning a copied string
	  whose encoding is ASCII-8BIT. [ruby-dev:45992] [Feature #6767]

Tue Nov  6 09:37:57 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ruby.c (load_file_internal): set default source encoding as
	  UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]

	* parse.y (parser_initialize): set default parser encoding as
	  UTF-8 instead of US-ASCII.

Tue Nov  6 05:48:06 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_require.rb
	  (TestRequire#test_require_to_path_redefined_in_load_path,
	   TestRequire#test_require_to_str_redefined_in_load_path):
	  Suppress method redefined warning when test-all with RUBYOPT=-w.

Thu Nov  8 00:24:14 2012  Akinori MUSHA  <knu@iDaemons.org>

	* ext/curses/view.rb: Do not fail if the file to view is shorter
	  than the screen height.

Mon Nov  5 11:40:00 2012  Mark Somerville  <mark@scottishclmibs.com>

	* thread_pthread.c (rb_reserved_fd_p): fix typo in macro check
	  that prevented the ifdef ever being true.
	  [Bug #7281] [ruby-core:48940]

Mon Nov  5 23:28:57 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* file.c (rb_get_path_check_to_string): extract from
	  rb_get_path_check(). We change the spec not to call to_path of
	  String object.

	* file.c (rb_get_path_check_convert): extract from rb_get_path_check().

	* file.c (rb_get_path_check): follow the above change.

	* file.c (rb_file_expand_path_fast): remove check_expand_path_args().
	  Instead we call it in load.c.

	* file.c (rb_find_file_ext_safe): use rb_get_expanded_load_path() to
	  reduce expand cost.

	* file.c (rb_find_file_safe): ditto.

	* internal.h (rb_get_expanded_load_path): add a declaration.

	* internal.h (rb_get_path_check_to_string, rb_get_path_check_convert):
	  add declarations.

	* load.c (rb_construct_expanded_load_path): fix for compatibility.
	  Same checks in rb_get_path_check() are added. We don't replace
	  $LOAD_PATH and ensure that String object of $LOAD_PATH are frozen.
	  We don't freeze non String object and expand it every time. We add
	  arguments for expanding load path partially and checking if load path
	  have relative paths or non String objects.

	* load.c (load_path_getcwd): get current working directory for checking
	  if it's changed when getting load path.

	* load.c (rb_get_expanded_load_path): fix for rebuilding cache properly.
	  We check if current working directory is changed and rebuild expanded
	  load path cache. We expand paths which start with ~ (User HOME) and
	  non String objects every time for compatibility. We make this
	  accessible from other source files.

	* load.c (rb_feature_provided): call rb_get_path() since we changed
	  rb_file_expand_path_fast() not to call it.

	* load.c (Init_load): initialize vm->load_path_check_cache.

	* vm.c (rb_vm_mark): mark vm->load_path_check_cache for GC.

	* vm_core.h (rb_vm_struct): add vm->load_path_check_cache to store data
	  to check load path cache validity.

	* test/ruby/test_require.rb (TestRequire): add tests for require
	  compatibility related to cached expanded load path.
	  [ruby-core:47970] [Bug #7158]

Mon Nov  5 23:26:05 2012  Greg Price  <price@mit.edu>

	* load.c (rb_get_expanded_load_path): cache the expanded load
	  path.  This saves 4KB of allocation and some stats for every
	  element of the load path (so nearly a MB in my Rails app)
	  on every require.

	* load.c (rb_construct_expanded_load_path): ensure that $LOAD_PATH
	  entries are frozen strings.  The user must mutate $LOAD_PATH
	  itself rather than its individual entries.

	* vm_core.h (rb_vm_struct): add fields.

	* vm.c (rb_vm_mark): mark new fields.

	* ruby.c (process_options): modify $LOAD_PATH directly rather than
	  its elements.
	  Patch by Greg Price.
	  [ruby-core:47970] [Bug #7158]

Mon Nov  5 23:24:42 2012  Greg Price  <price@mit.edu>

	* load.c (rb_feature_p, rb_provide_feature): index $LOADED_FEATURES
	  so that require isn't so slow.

	* load.c (rb_provide_feature, get_loaded_features_index): ensure
	  that $LOADED_FEATURES entries are frozen strings.  The user
	  must mutate $LOADED_FEATURES itself rather than its individual
	  entries.

	* load.c (reset_loaded_features_snapshot): add a new function to reset
	  vm->loaded_features_snapshot.

	* load.c (get_loaded_features_index_raw): add a new function to get
	  the loaded-features index.

	* load.c (features_index_add_single): add a new function to add to the
	  loaded-features index a single feature.

	* load.c (features_index_add): add a new function to add to the
	  loaded-features index all the required entries for `feature`.

	* vm_core.h (rb_vm_struct): add fields.

	* vm.c (rb_vm_mark): mark new fields.

	* include/ruby/intern.h (rb_hash_clear): declare function.

	* hash.c (rb_hash_clear): make function non-static.
	  Patch by Greg Price.
	  [ruby-core:47970] [Bug #7158]

Mon Nov  5 23:23:51 2012  Greg Price  <price@mit.edu>

	* array.c (rb_ary_shared_with_p): new function.
	  Expose whether two arrays are shared (read-only, C only).

	* include/ruby/intern.h (rb_ary_shared_with_p): declare.
	  Patch by Greg Price.
	  [ruby-core:47970] [Bug #7158]

Mon Nov  5 23:21:14 2012  Greg Price  <price@mit.edu>

	* load.c (loaded_feature_path): clarify and briefly comment
	  function.  These clarifications have no effect on the behavior
	  of the function.

	* load.c (rb_feature_p): explain the search loop.  Especially
	  useful because the logic is complicated as described in the
	  second paragraph.
	  Patch by Greg Price.
	  [ruby-core:47970] [Bug #7158]

Mon Nov  5 22:45:03 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* ext/dl/win32/lib/Win32API.rb (Win32API#call): use 64bit pointer for x64
	  Windows. This would fix
	  TestSecureRandom#test_s_random_bytes_without_openssl error.
	  [ruby-core:47451] [Bug #6990]

Mon Nov  5 22:09:26 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* cygwin/GNUmakefile.in (uncommon.mk): link *.res.o.
	  EXTOBJES is defined in uncommon.mk. *.res.o setting should be below
	  uncommon.mk.
	  [ruby-core:48858] [Bug #7277]

Mon Nov  5 11:35:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (native_thread_init, native_thread_destroy):
	  removed HAVE_PTHREAD_CONDATTR_INIT check because this silly
	  #ifdef makes use-uninitialized-var issue and (2) native_cond_initialize()
	  already have a right platform and caller don't need any additional care.
	  [Bug #6825]

Mon Nov  5 10:57:59 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/cgi/core.rb: check if Tempfile is defined before use it.

	* lib/cgi/core.rb: remove tempfiles only if tempfiles exist

Mon Nov  5 12:17:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* lib/uri/http.rb (URI::HTTP.build): Fix example
	  Patch by Carina C. Zona
	  [Fixes #209 Github]

Mon Nov  5 09:55:05 2012  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi/core.rb: remove tempfile more early.

Sun Nov  4 20:29:46 2012  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi.rb, lib/cgi/*/rb: rename CGI#header to CGI#http_header,
	  add and update HTML5 tag generator.  [Bug #7110]
	  Patch provided by Marcus Stollsteimer, thank you !

Sun Nov  4 11:47:39 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* lib/fileutils.rb (module FileUtils): repatch [ruby-core:39622]
	  [Feature #5337]. improve performance of FileUtils.compare_stream.
	  [ruby-core:47545] [Feature #7028]

Sun Nov  4 11:27:54 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (recursive_equal): fix to return true when self and other
	  are resized to same size and the current index become out of
	  range.

	* test/ruby/test_array.rb: add a test for the above.

Sun Nov  4 10:19:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (file_s_fnmatch): match with expanding braces if FNM_EXTGLOB
	  is set.  [ruby-core:40037] [Feature #5422]

Sat Nov  3 23:38:15 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: modified doc.
	* rational.c: ditto.

Sat Nov  3 22:38:55 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: modified doc.

Sat Nov  3 18:35:55 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (rb_vm_rewrite_ep_in_errinfo, vm_rewrite_ep_in_errinfo):
	  merge code and remove `rb_vm_rewrite_ep_in_errinfo'.

Sat Nov  3 18:15:24 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c, proc.c: avoid unnecessary `rb_vm_rewrite_ep_in_errinfo'
	  calls.

Sat Nov  3 17:53:43 2012  Kouhei Sutou  <kou@cozmixng.org>

	* bin/testrb: Use only Test::Unit::AutoRunner in test-unit gem
	  compatible API to be available by both test/unit bundled in Ruby
	  and test-unit gem.
	* lib/test/unit.rb (Test::Unit::AutoRunner): Move codes from testrb.

Sat Nov  3 14:56:21 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (parse_eu): should capture apostrophe too.

Sat Nov  3 14:46:15 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (date__parse): revised the tight parser.

Sat Nov  3 14:43:42 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/xmldecl.rb (REXML::XMLDecl#content): Add missing \A
	  and \z.

Sat Nov  3 14:42:55 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/output.rb (REXML::Output#initialize): Use normalized
	  encoding name.

Sat Nov  3 14:41:17 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/output.rb (REXML::Output): Don't output BOM in middle
	  of the output string.
	* test/rexml/test_document.rb: Add a test for the above change.

Sat Nov  3 14:09:55 2012  Kouhei Sutou  <kou@cozmixng.org>

	* NEWS: Add an item about REXML::Document#write.

Sat Nov  3 13:46:49 2012  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_document.rb: Fix tests that expect encoding name
	  isn't normalized.

Sat Nov  3 13:26:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* dir.c (Dir#glob):
	  Documentation for pattern section, backslash subsection
	  Patch by Eric Bouchut
	  [ruby-core:48528] [Bug #7230]

Sat Nov  3 13:26:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* io.c (IO#new):
	  Documentation for IO#open modes and formatting
	  [ruby-core:48052] [Bug #7179]

Sat Nov  3 13:01:02 2012  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_encoding.rb (EncodingTester#test_in_different_out):
	  Fix a test that expects encoding in XML declaration is changed by
	  Output's encoding. It is dropped feature.

Sat Nov  3 12:49:45 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb (REXML::Document#write): Document encoding
	  option. Now different encoding between XML file's encoding and
	  XML declaration's encoding is support.
	  [Feature #4872] (work in progress)
	* lib/rexml/xmldecl.rb (REXML::XMLDecl#write): Always use XMLDecl's
	  encoding.
	* test/rexml/test_document.rb: Update tests for the above change.

Sat Nov  3 12:18:35 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (recursive_equal): fix not to make invalid pointers when
	  self and other are resized to same size in #== of their elements.
	  [ruby-dev:46373] [Feature #6177]

Sat Nov  3 12:06:15 2012  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_xml_declaration.rb (TestXmlDeclaration#test_*):
	  Remove needless prefix from test names.

Sat Nov  3 12:04:52 2012  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_xml_declaration_parent_child.rb: Rename to ...
	* test/rexml/test_xml_declaration.rb: ... this.

Sat Nov  3 11:43:00 2012  Zachary Scott  <zachary@zacharyscott.net>

	* hash.c (rb_hash_delete): Correct grammar
	  Patch by Glenn Oppegard
	  [Fixes #208 Github]

Sat Nov  3 11:28:28 2012  Narihiro Nakamura  <authornari@gmail.com>

	* NEWS: add a news about GC::Profiler.raw_data.

Sat Nov  3 11:01:32 2012  Narihiro Nakamura  <authornari@gmail.com>

	* NEWS: add a news about rb_newobj_of() and NEWOBJ_OF().

Sat Nov  3 10:17:41 2012  Narihiro Nakamura  <authornari@gmail.com>

	* eval.c (f_current_dirname): add the new method for Kernel.
	  This method almost same as File.dirname(__FILE__). One
	  different behavior is it returns nil when __FILE__ returns nil.
	  [Feature #3346]

	* NEWS:  ditto

	* test/ruby/test_method.rb: related test.

Sat Nov  3 09:03:34 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* test/ruby/test_refinement.rb (test_new_method_by_send,
	  test_new_method_by_method_object): add tests for Kernel#send and
	  Kernel#method with refinements.

	* test/ruby/test_refinement.rb (test_symbol_to_proc): add a test
	  calling a proc created by Symbol#to_proc outside the scope where
	  a refinement is closed over.

Sat Nov  3 04:14:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (rb_vm_rewrite_ep_in_errinfo): rewrite all catch points in
	  errinfo, not only the topmost frame.  based on the patch by
	  ktsj (Kazuki Tsujimoto) in [ruby-dev:45656]. [Bug #6460]

Fri Nov  2 20:11:17 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#timestamp_file): remove @ which looks like
	  configure variables.

	* lib/mkmf.rb (MakeMakefile#timestamp_file): use .-. instead of !, a
	  special character of NMAKE and BSD make.  [Bug #7265]

Fri Nov  2 17:55:39 2012  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb (_run_parallel): Delete status line before showing
	  results. Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250]

	* lib/test/unit.rb (_run_parallel): Fix strange result when disabled retrying.
	  Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250]

Fri Nov  2 17:52:12 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* object.c (rb_mod_to_s): Module#{to_s,inspect}, when invoked on
	  a refinement, returns a string in the format #<refinement:C@M>,
	  where C is a refined class and M is a module at which the refinement
	  is defined.

	* eval.c (rb_mod_refine): store information on a refinement for the
	  above change.

	* test/ruby/test_refinement.rb: related test.

Fri Nov  2 16:57:52 2012  Shota Fukumori  <sorah@tubusu.net>

	* vm_dump.c (rb_vm_bugreport): Because of many log directories,
	  making directory lists readable.

Fri Nov  2 16:44:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* vm_dump.c (rb_vm_bugreport): add ~/Library/Logs/DiagnosticReports
	  in the locations list of crash reports.

Fri Nov  2 14:52:52 2012  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (recursive_equal): performance improvement by avoiding
	  overhead to call rb_ary_elt().
	  [ruby-dev:45412] [Feature #6177]

Fri Nov  2 14:47:53 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* string.c (sym_to_proc, sym_call): A Proc created by Symbol#to_proc
	  should close over the current refinements.
	  [ruby-dev:46345] [Bug #7261]

	* vm_eval.c (rb_call0, rb_search_method_entry,
	  rb_funcall_passing_block_with_refinements): add a new argument
	  `refinements' for the above changes.

	* test/ruby/test_refinement.rb: related test.

Fri Nov  2 08:24:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (top_define_method): new method, main.define_method.
	  [ruby-core:45715] [Feature #6609]

	* eval.c (top_include): fix a warning message, main is not a class or
	  module.

Fri Nov  2 04:41:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#timestamp_file): use ! instead of %, a GNU
	  make special character.

Fri Nov  2 04:40:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_process.rb (test_execopts_preserve_env_on_exec_failure):
	  use never existing file in the current temporary directory.

Fri Nov  2 04:23:20 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/merger.rb: add feature to tag preview/rc.

Fri Nov  2 03:23:37 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/mkmf.rb: fix for if config["libdir"] is nil.

Thu Nov  1 23:06:01 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/make-snapshot: fix wrong regexp for releasing preview.
	  patched by mame.

Thu Nov  1 22:27:11 2012  Koichi Sasada <ko1@atdot.net>

	* NEWS: add a news about objspace,
	  ObjectSpace.reachable_objects_from.

Thu Nov  1 21:57:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_new),
	  test/bigdecimal/test_bigdecimal.rb:
	  Fix exception message of BigDecimal constructor with a Float.

Thu Nov  1 21:52:20 2012  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_add),
	  test/bigdecimal/test_bigdecimal.rb:
	  need to specify precision for converting Rational and Float.
	  [ruby-core:48045] [Bug #7176]

Thu Nov  1 21:42:20 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* test/ruby/test_process.rb: Revert r37404.  My ubuntu box has
	  actually the directory named "/nonexistent"...  Sorry.

Thu Nov  1 21:28:28 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* test/ruby/test_process.rb: Process.exec raised EACCES on Linux
	  3.5.0-17-generic.  This is a temporal fix to rescue that exception.
	  Needs kosaki's review.

Thu Nov  1 21:19:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (set_relation): parent_iseq need to be set regardless iseq
	  type.  fix r37397.

Thu Nov  1 19:47:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
	  fix r37079.  [ruby-dev:46322] [Bug #7247]

Thu Nov  1 16:44:36 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* NEWS: add note for Module#refine, Module#refinements,
	  Module#using, and Kernel#using.

Thu Nov  1 14:41:47 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_using_module): using should be used indirectly.
	  [ruby-dev:46326] [Feature #7251]

Wed Oct 31 18:17:38 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (gc_profile_record): don't define unused variables when
	  GC_PROFILE_MORE_DETAIL is 0.

Wed Oct 31 18:10:53 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (gc_prof_mark_timer_stop): count is not initialized.

Wed Oct 31 09:28:24 2012  Eric Hodel  <drbrain@segment7.net>

	* thread.c (rb_thread_call_without_gvl2):  Note that ubf() may or may
	  not be called with the GVL.  Hinted that rb_thread_call_with_gvl()
	  can be used to access ruby functionality.

Wed Oct 31 09:06:54 2012  Eric Hodel  <drbrain@segment7.net>

	* thread.c (rb_thread_call_without_gvl2):  Update documentation to
	  natural English.
	* thread.c (rb_thread_call_with_gvl):  ditto.

Wed Oct 31 02:53:07 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]

	* ext/dl/lib/dl/value.rb: ditto

	* test/dl/test_c_struct_entry.rb: remove strange require order from
	  tests.

	* test/dl/test_c_union_entity.rb: ditto

Tue Oct 30 23:59:32 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_refine): fix the error message when no block is
	  given.  [ruby-dev:46319] [Bug #7244]

	* test/ruby/test_refinement.rb: related test.

Tue Oct 30 19:27:48 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (redirect_dup2): set standard handles when new fd is stdio,
	  because if there is no allocated console at the moment Windows does
	  not automatically associate it for child process's standard handle.
	  this is adhoc workaround.
	  reported by Martin Thiede at [ruby-core:48542] [Bug #7239].

	* io.c (rb_cloexec_dup2): ditto.

Tue Oct 30 03:08:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rbconfig/obsolete.rb (Config): re-introduce warnings for a
	  lame-duck.  [ruby-core:46836] [Bug #6809]

Tue Oct 30 02:20:10 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* thread.c: added Thread#thread_variable_(get|set),
	  Thread#thread_variable?, and Thread#thread_variables for operating
	  on variables that are local to threads. [ruby-core:47790]

	* vm.c: ditto

	* test/ruby/test_thread.rb: tests for thread variables.

Mon Oct 29 18:22:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_close): close separately per each
	  instances, as well as IO.

Mon Oct 29 10:22:00 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/handlers/recorder.rb: added a class for
	  recording YAML parse and emit events.

	* ext/psych/lib/psych/handler.rb: adding a list of events so that
	  handler classes can more easily be meta-programmed.

	* test/psych/handlers/test_recorder.rb: tests for the change.

Mon Oct 29 05:48:52 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/ostruct.rb: Add [] and []=, base on a patch by Thomas Sawyer.
	  Also accept {Open}Struct as argument to new.
	  Add #eql?, #hash & #each_pair
	  Protect new_ostruct_member

Mon Oct 29 03:20:58 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Fix determinant_e [ruby-dev:46305] [Bug #7228]

Sun Oct 28 23:52:25 2012  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_document.rb: Add tests for parsing XML encoded
	  by UTF-8 with BOM.

Sun Oct 28 23:47:09 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/source.rb: Move encoding detection code to base class.
	* lib/rexml/encoding.rb: Remove needless encoding detection code.

Sun Oct 28 21:40:13 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is used
	  for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in
	  XML declaration.
	* test/rexml/test_document.rb: Add tests for the above change.

Sun Oct 28 21:37:34 2012  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_document.rb: Group tests that they parse
	  UTF-16XX encoded XML that has encoding="UTF-16" in XML declaration.

Sun Oct 28 21:25:11 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/source.rb (REXML::IOSource#initialize): Reduce
	  @line_break initialize code. It should be done only in #encoding=.
	* lib/rexml/parsers/baseparser.rb: Don't set UTF-16 encoding to
	  source by encoding="UTF-16" in XML declaration because UTF-16XX
	  source encoding should be set in Source#initialize or
	  IOSource#initialize. They should handle BOM. Parser should not
	  consider about it.

Sun Oct 28 21:18:37 2012  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_document.rb: Add tests for parsing XML encoded
	  by UTF-16 with BOM.

Sun Oct 28 19:12:11 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (iso8601_{ext,bas}_time): should not match
	  empty string.

Sun Oct 28 18:51:33 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (date__parse): revised the tight parser.

Sun Oct 28 15:41:50 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb (REXML::Document#write): Add :encoding option
	  to support custom XML encoding.
	  [Feature #4872] (work in progress)
	* test/rexml/test_document.rb: Add tests for the above change.

Sun Oct 28 15:00:19 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb (REXML::Document#write): Remove needless
	  indent in document.

Sun Oct 28 14:59:14 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb (REXML::Document#write): Accept options
	  Hash as argument.
	* test/rexml/test_document.rb: Add tests for the above change.

Sun Oct 28 14:09:44 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb (REXML::Document#write): Fix wrong usage
	  in document.

Sun Oct 28 14:03:48 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb (REXML::Document#write): Fix wrong method
	  names in document.

Sun Oct 28 10:12:15 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return the
	  same thing on every call.

	* test/psych/visitors/test_yaml_tree.rb: related test.

Sun Oct 28 10:05:03 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object should
	  be able to take an emitter object as it's output.

	* test/psych/visitors/test_yaml_tree.rb: related test.

Sun Oct 28 08:23:16 2012  Koichi Sasada  <ko1@atdot.net>

	* bignum.c (bignew_1): Bignum instances are frozen.
	  Feature #3222

	* include/ruby/ruby.h: Fixnum instances are also frozen.

	* class.c (singleton_class_of): check Bignum before
	  singleton checking.

	* test/ruby/test_bignum.rb: add a test.

	* test/ruby/test_fixnum.rb: ditto.

	* test/ruby/marshaltestlib.rb, test/ruby/test_eval.rb,
	  test/ruby/test_object.rb: catch up above changes.

Sun Oct 28 04:38:06 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (vm_define_method): remove type and frozen checking.
	  Checking is done in `rb_singleton_class()'.

Sun Oct 28 00:49:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (assign_in_cond): warn for static content object assignments
	  in conditional statements.  [ruby-dev:43083] [Feature #4299]

Sat Oct 27 23:33:41 2012  Benoit Daloze  <eregontp@gmail.com>

	* gc.c (gc_profile_result, gc_profile_report): use internal structures
	  to avoid allocations and progressively print the output for #report.
	  [ruby-core:47163] [Bug #6865]

Sat Oct 27 11:01:10 2012  Koichi Sasada  <ko1@atdot.net>

	* numeric.c (rb_float_new_in_heap), include/ruby/ruby.h:
	  make all Float objects frozen.
	  [ruby-dev:46081] [ruby-trunk - Feature #6936]
	  Most part of patch by NARUSE, Yui  <naruse@ruby-lang.org>.

	* class.c (singleton_class_of): raise TypeError when
	  trying to define a singleton method on Float objects.

	* vm.c (vm_define_method): ditto.

	* test/ruby/marshaltestlib.rb: catch up above changes.

	* test/ruby/test_class.rb: ditto.

	* test/test_pp.rb: ditto.

Sat Oct 27 10:50:53 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* object.c (rb_mod_const_get): make sure the constant name is
	  converted to a string before searching. [ruby-core:48405]

Sat Oct 27 10:12:13 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* iseq.c (rb_iseq_compile_with_option): Instead of testing
	  respond_to, just check if the argument is actually a file,
	  because by calling user-defined gets something weired can
	  happen.  Patch by Glass_saga. [ruby-dev:40202] [Bug #2861]

	* parse.y (ripper_initialize): ditto.

Sat Oct 27 10:07:57 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (enum lex_state_e): [EXPERIMENTAL] lex_state as bit field /
	  IS_lex_state() macro.  based on the patch by Dave B in
	  [ruby-core:23503].  [Feature #1493]

Sat Oct 27 10:05:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h (fstat): use _fstati64() instead of fstati64()
	  on mingw32.

Sat Oct 27 06:28:33 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* object.c (rb_mod_const_get): const_get accepts qualified constant
	  strings.  e.g. Object.const_get("Foo::Bar::Baz") [ruby-core:41404]

	* test/ruby/test_module.rb: tests for new behavior

Fri Oct 26 13:24:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (literal_concat_gen): merge fixed strings across
	  concatenated literals, after an interpolation.

Thu Oct 25 17:48:54 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (has_redirection): should use shell (cmd.exe) when
	  the commandline contains '&'.
	  reported by Roger Pack at [ruby-core:47912] [Bug #7143], and
	  patched by Heesob Park at [ruby-core:47931].

Thu Oct 25 15:00:08 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h, class.c: remove (revert)
	  `rb_add_method_cfunc_frameless()' API.
	  This API is not mature to become an official API.
	  For example, we can not use this API with
	  `rb_define_private_method()'.

	* method.h, vm_method.c (rb_add_method_cfunc_frameless): removed.

Thu Oct 25 13:35:07 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* tool/mkconfig.rb: remove string literal concatenation.

Wed Oct 24 18:49:16 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/objspace/objspace.c (type2sym, count_objects_size): use enum
	  instead of size_t which may be larger than actual values.

Wed Oct 24 17:41:24 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/driver.rb: add `-x' or `--exclude' option
	  to specify exclude benchmark name pattern.
	  You can specify "-x foo" if you want to exclude the benchmarks
	  if the name of benchmark contains `foo'.

Wed Oct 24 11:57:24 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (gc_prepare_free_objects): rename to match the behavior of
	  this function.

Wed Oct 24 11:55:19 2012  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (reachable_object_from_i): change data
	  structure of the result of reachable objects. Keys of table
	  contains object_id of each reachable objects. Value of table
	  is an object itself or an instance of InternalObjectWrapper.
	  To avoid duplication, we use st_table and object_id keys.

	* ext/objspace/objspace.c (type2sym): bug fix.
	  Should use `i' instead of `type'.

Wed Oct 24 10:33:09 2012  Koichi Sasada  <ko1@atdot.net>

	* gc.c (garbage_collect, gc_marks): move the location of
	  clear and restore rb_objspace_t::mark_func_data
	  from garbage_collect() to gc_marks().

Wed Oct 24 10:17:45 2012  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (Init_objspace): add a new method
	  `ObjectSpace::InternalObjectWrapper#internal_object_id' which returns
	  an object id of a wrapped internal object.

Wed Oct 24 08:55:04 2012  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (ObjectSpace.reachable_objects_from):
	  internal object support.
	  If given object `obj' has references to internal objects
	  (such as T_NODE objects), then this method returns instances of
	  `ObjectSpace::InternalObjectWrapper' instead of that internal objects.
	  This instance contains a reference to an internal object and you can
	  check the type of internal object using
	  `ObjectSpace::InternalObjectWrapper#type' method.
	  Rdoc of `InternalObjectWrapper' is not prepared yet.

	* gc.c (rb_objspace_reachable_objects_from), gc.h: change
	  an interface of 'rb_objspace_reachable_objects_from()'

	* gc.c, gc.h: add two APIs
	  - rb_objspace_markable_object_p(obj): check markable or not.
	  - rb_objspace_internal_object_p(obj): check internal or not.

Wed Oct 24 05:52:36 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_method): remove `default' and
	  add a case for `VM_METHOD_TYPE_UNDEF'.

Wed Oct 24 05:41:18 2012  Koichi Sasada  <ko1@atdot.net>

	* eval_error.c (error_print), vm_eval.c (eval_string_with_cref),
	  vm_trace.c (rb_suppress_tracing): use TH_PUSH_TAG() instead of
	  PUSH_TAG().

Wed Oct 24 05:17:52 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (vm_call0_body): remove RUBY_VM_CHECK_INTS()
	  after method invocation using rb_call0().

	* vm_eval.c (vm_call0_body): remove default section on top of
	  switch statement and add cases for `VM_METHOD_TYPE_CFUNC_FRAMELESS'
	  and `VM_METHOD_TYPE_UNDEF'.

	* vm_eval.c (vm_call0_body): remove useless brackets.

Tue Oct 23 22:34:49 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (thread_raise_m):  check interrupts after Thread#raise
	  if a target thread is the current thread because the behavior
	  of Thread.current.raise is expected to perform same as
	  Kernel.raise (by rubyspec).

Tue Oct 23 17:08:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (usage, process_options): show more info in --help.
	  [EXPERIMENTAL] [ruby-core:48072] [Bug #7184]

Tue Oct 23 14:20:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-electric.el using variable `last-command-event' instead of
	  obsolete `last-command-char', so that work with Emacs trunk.
	  a patch by Victor Deryagin <vderyagin AT gmail.com>.

Tue Oct 23 14:06:47 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (visibility_option): visibility attribute is not
	  available before GCC 4, so do not use -fvisibility option in that
	  case.  [ruby-core:48147] [Bug #7205]

Tue Oct 23 12:57:29 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h, vm_insnhelper.c, vm_eval.c (OPT_CALL_CFUNC_WITHOUT_FRAME):
	  add a new optimization and its macro `OPT_CALL_CFUNC_WITHOUT_FRAME'.
	  This optimization makes all cfunc method calls `frameless', which
	  is faster than ordinal cfunc method call.
	  If `frame' is needed (for example, it calls another method with
	  `rb_funcall()'), then build a frame. In other words, this
	  optimization delays frame building.
	  However, to delay the frame building, we need additional overheads:
	    (1) Store the last call information.
	    (2) Check the delayed frame building before the frame is needed.
	    (3) Overhead to build a delayed frame.
	  rb_thread_t::passed_ci is storage of delayed cfunc call information.
	  (1) is lightweight because it is only 1 assignment to `passed_ci'.
	  To achieve (2), we modify GET_THREAD() to check `passed_ci' every
	  time. It causes 10% overhead on my environment.
	  This optimization only works for cfunc methods which do not need
	  their `frame'.
	  After evaluation on my environment, this optimization does not
	  effective every time. Because of this evaluation results, this
	  optimization is disabled at default.

	* vm_insnhelper.c, vm.c: add VM_PROFILE* macros to measure behaviour
	  of VM internals. I will extend this feature.

	* vm_method.c, method.h: change parameters of the `invoker' function.
	  Receive `func' pointer as the first parameter.

Tue Oct 23 06:21:05 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c: just get the constant defined in Ruby.

	* ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits
	  from StandardError rather than SyntaxError.  Thanks Eric Hodel!

	* test/psych/test_exception.rb: tests for change.

Tue Oct 23 06:17:36 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: Cache symbols while
	  tokenizing.  Thanks Kevin Menard!

Tue Oct 23 06:15:40 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: Updated the RegExp to catch
	  Strings earlier in the tokenization process.  Thanks Kevin Menard!

Tue Oct 23 06:12:39 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Handle nil tags specially
	  to avoid slow method_missing calls.  Thanks Kevin Menard!

Tue Oct 23 06:07:57 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps.  If
	  something looks like a timestamp but has an invalid component, treat
	  it as a string instead of throwing an ArgumentError.
	  Thanks Rhett Sutphin!

	* test/psych/test_scalar_scanner.rb: appropriate tests.

Tue Oct 23 06:04:07 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner to
	  understand strings starting with an underscore and containing only
	  digits.  Thanks Kelley Reynolds.

	* test/psych/test_scalar_scanner.rb: test for fix

Tue Oct 23 06:00:41 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: Changed comment in psych.rb to update new
	  home page for libyaml.  Thanks to Carolyn Ann.

Sun Oct 21 19:12:59 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_core.h (rb_vm_t::trace_running): add a new field
	  `trace_running' to store vm global tracing status.

	* vm_trace.c: fix SEGV bug. event_hook was free'd
	  even when the hook is still used in another thread.
	  [ruby-dev:46141] [Bug #7032]

Sun Oct 21 19:12:42 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_core.h (rb_vm_t::trace_flag): remove `trace_flag'
	  which is no longer used.

Sun Oct 21 18:34:27 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (date__parse): uses more tight parser if
	  defined TIGHT_PARSER.  now inactivated; because it introduces
	  incompatibilities and it is a bit slow.

Sat Oct 20 15:35:06 2012  Narihiro Nakamura  <authornari@gmail.com>

	* include/ruby/ruby.h: add C APIs.
	  VALUE rb_newobj_of(VALUE klass, VALUE flags)
	  #define NEWOBJ_OF(obj,type,klass,flags)
	  These allow to change a allocation strategy depending on klass
	  or flags.

	* gc.c: ditto

	* array.c: use new C API.
	* bignum.c: ditto
	* class.c: ditto
	* complex.c: ditto
	* ext/socket/ancdata.c: ditto
	* ext/socket/option.c: ditto
	* hash.c: ditto
	* io.c: ditto
	* marshal.c: ditto
	* numeric.c: ditto
	* object.c: ditto
	* random.c: ditto
	* range.c: ditto
	* rational.c: ditto
	* re.c: ditto
	* string.c: ditto
	* struct.c: ditto
	  [Feature #7177][Feature #7047]

Sat Oct 20 12:50:00 2012  Zachary Scott	<zachary@zacharyscott.net>

	* ext/socket/socket.c: Documentation for Socket
	  Based on a patch by David Albert
	  [Bug #7105] [ruby-core:47828]

Sat Oct 20 11:00:00 2012  Zachary Scott	<zachary@zacharyscott.net>

	* lib/open-uri.rb: Documentation for OpenURI

Sat Oct 20 06:18:34 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* hash.c (initialize_copy): unset the default proc if there isn't one
	  for the target hash, call to_hash, check frozen status.

Fri Oct 19 22:22:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (rb_vm_jump_tag_but_local_jump): pass through thrown objects.
	  [ruby-dev:46234] [Bug #7185]

	* vm_eval.c (rb_eval_cmd): if state is non-zero, val should be nil and
	  rb_vm_jump_tag_but_local_jump() just jump tag.

Fri Oct 19 22:11:55 2012  Benoit Daloze  <eregontp@gmail.com>

	* pack.c (pack_unpack): set encoding of the
	  'H','h','B' and 'B' modifiers to US-ASCII.

	* test/ruby/test_pack.rb: tests for the above.
	  [ruby-core:47653][Bug #7050]

	* test/test_securerandom.rb: tests for SecureRandom.hex
	  from tenderlove. [ruby-core:46792][Bug #6799]

Fri Oct 19 19:29:11 2012  Koichi Sasada  <ko1@atdot.net>

	* method.h (rb_method_cfunc_t::invoker): add new field (func ptr)
	  `invoker'. `invoker' function invoke cfunc body
	  (rb_method_cfunc_t::func).
	  `invoker' is set at method definition timing.
	  With this change, the big `switch' (branch) in `call_cfunc()'
	  is no longer needed.
	  However, the performance benefit is only a bit.

	* vm_core.h (rb_call_info_t::aux::func): add a new field to store
	  cfunc body function pointer.

	* vm_method.c (call_cfunc_invoker_func): add a new function which
	  returns a suitable invoke function.

	* vm_method.c (setup_method_cfunc_struct): added.

	* vm_method.c (rb_add_method): fix to set `invoker'.

	* vm_eval.c (vm_call0_body): catch up above changes.

	* vm_insnhelper.c (call_cfunc): removed.

	* vm_insnhelper.c (vm_call_cfunc): fix to call cfunc body
	  with `invoker' function.

Fri Oct 19 16:55:58 2012  Koichi Sasada  <ko1@atdot.net>

	* eval.c, vm_eval.c: use TH_PUSH_TAG() instead of PUSH_TAG().

Fri Oct 19 11:13:55 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/driver.rb: remove unexpected `output'.
	  (commit miss)

Fri Oct 19 10:24:03 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_search_method): remove needless local variable.

Fri Oct 19 10:22:26 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bmx_temp.rb: removed.
	  This file should not be in repository.

Fri Oct 19 10:20:10 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/driver.rb: add new option `--ruby-arg [ARG]'
	  which is passed as a launch parameter for each ruby's execution.
	  ($ ruby [ARG] [File])

Thu Oct 18 18:42:35 2012  Koichi Sasada  <ko1@atdot.net>

	* insns.def (opt_send_simple): move the location of
	  `opt_send_simple' to the place near `send' definition.
	  (to take care about icache locality).

Thu Oct 18 18:29:25 2012  Koichi Sasada  <ko1@atdot.net>

	* insns.def (send): remove unused condition.
	  This condition will be true after r37258.

	* vm_insnhelper.c (vm_caller_setup_args): remove `UNLIKELY' on
	  checking blockiseq (it seems `LIKELY').

Thu Oct 18 17:31:58 2012  Koichi Sasada  <ko1@atdot.net>

	* insns.def (opt_send_simple): introduce new instruction used
	  when no need to care about block and splat.

	* compile.c: use the `opt_send_simple' instruction.

Thu Oct 18 16:44:07 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_add_method_cfunc, rb_add_method_cfunc_frameless):
	  check arity earlier at definition time.

Thu Oct 18 15:11:31 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c: add `inline' keyword to several functions.
	  Compilers (gcc) are conservative than I expected.

Thu Oct 18 15:01:15 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: add a decl. of
	  `rb_define_frameless_method()'.

Thu Oct 18 14:31:17 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (new_callinfo): set a temporary index of callinfo
	  (used in `iseq_set_sequence()') to rb_call_info_t::aux::index.
	  rb_call_info_t::argc is initialized by same value of
	  rb_call_info_t::orig_argc.

Thu Oct 18 14:11:08 2012  Koichi Sasada  <ko1@atdot.net>

	* class.c (rb_define_frameless_method): rename from
	  rb_define_method_fast(). Defined method with this C API
	  does not make a method frame. It is bit lightweight than
	  ordinal C functions. Now only 0 or 1 argc are permitted.

	* method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name
	  from VM_METHOD_TYPE_CFUNC_FAST.

	* vm_insnhelper.c, vm_method.c: rename related functions.

	* proc.c (rb_method_entry_arity): catch up above changes.

Thu Oct 18 10:30:34 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (assignable_gen): fail if yyerror occurred.  fix a bug in
	  r36973.

Thu Oct 18 09:23:03 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* hash.c (initialize_copy): duping should rehash the hash.

	* test/ruby/test_hash.rb: added a test to ensure rehash.

Wed Oct 17 21:16:47 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* common.mk (WPROGRAM): need same dependencies as PROGRAM.

	* cygwin/GNUmakefile.in (uncommon.mk): move include position
	  below WPROGRAM definition to be defined in uncommon.mk.

	* ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN.
	  If make of ruby.exe and rubyw.exe run in parallel, link dll and link
	  exe run in parallel, which causes link failure on mingw. To fix this,
	  we make ruby.exe and rubyw.exe in one make process.
	  [ruby-core:48007] [Bug #7165]

Wed Oct 17 16:25:34 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm2_method_missing.rb: add a benchmark to measure
	  performance of invoking `method_missing'.

Wed Oct 17 16:23:17 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead of
	  `aux.opt_pc'.

Wed Oct 17 16:03:54 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_method_missing): make a refactoring
	  about method_missing process. Use `vm_call_method()' to invoke
	  `method_missing' method instead of `rb_funcall2()'.
	  In `vm_call_method()', set fastpath to `vm_call_method_missing()'
	  if it can be cached.

	* vm_core.h (rb_call_info_t): add new field
	  `rb_call_info_t::aux::missing_reason' to pass the reason to
	  `vm_call_method_missing()'.

Wed Oct 17 15:33:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (opt-dir): allow multiple directories separated by
	  $PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868]
	  [Bug #7120]

Wed Oct 17 15:08:13 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb: fix Net::IMAP::ResponseParser to accept
	  message/delivery-status ([ruby-core:47920] [Bug #7146]),
	  message/rfc822 attachments ([ruby-core:47921] [Bug #7147]), and
	  (BODY ("MIXED")) ([ruby-core:47951] [Bug #7153]).
	  patched by Tony Arkles.

	* test/net/imap/test_imap_response_parser.rb: related test.

Wed Oct 17 11:04:48 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test
	  to show the problem of r37232.

Wed Oct 17 10:48:40 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_search_method): fix a build error that occurs
	  when OPT_INLINE_METHOD_CACHE is 0.

Wed Oct 17 08:46:47 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm2_dstr.rb: add a benchmark to measure
	  performance of dynamic generated string ("foo#{bar}baz").

Wed Oct 17 08:32:46 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (compile_dstr_fragments): use `putobject' instead of
	  `putstring' for all of strings used by NODE_DSTR because
	  ruby users can not grab this string.
	  For example, the string object of "baz" in "foo#{bar}baz"
	  is located by `putobject' (users can not touch "baz" object
	  directly). This change reduces GC pressure.
	  This improvement is suggested by Aaron Patterson.

Wed Oct 17 08:02:57 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_threadptr_interrupt_mask): fix to check interrupt
	  after interrupt_mask changed.

Wed Oct 17 06:42:47 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_method): fix to return value immediately.
	  Remove CHECK_INTS() after that method dispatch.

Wed Oct 17 06:25:56 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* hash.c (initialize_copy): copy the underlying st_table on dup,
	  rather than copying the hash key by key. [ruby-core:48009]

	* test/ruby/test_hash.rb: relevant tests for initialize_copy

Wed Oct 17 06:17:44 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_iseq_setup_2): separate tailcall and normal
	  method frame setup functions.
	  Add checking interrupts at the tailcall setup function.

Wed Oct 17 05:35:37 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm1_yield.rb: add a benchmark to measure `yield'
	  (invoke empty block) performance.

	* benchmark/bm_vm2_method_with_block.rb: add a benchmark to measure
	  method invocation with empty block.

Wed Oct 17 05:05:07 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_invoke_block): vm_caller_setup_args() can skip
	  when splat flag is not set.

Wed Oct 17 01:53:47 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_getivar, vm_setivar): support index inline cache
	  with rb_call_info_t to speedup `attr' getter and setter.
	  Cached index is stored in rb_call_info_t::aux::index.
	  `index' == 0 means not cached. `index' > 0 means cached and cached
	  index is `index - 1'.

	* insns.def ((get|set)instancevariable): use new wrapper functions
	  vm_(get|set)instancevariable() defined in vm_insnhelper.c.

	* vm_core.h (rb_call_info_t::aux): introduce new union data because
	  opt_pc can share with index.

Tue Oct 16 22:24:44 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/driver.rb (show_results): Show speedup ratio
	  with first executables score at last of results
	  if two or more executables are given.

Tue Oct 16 21:59:01 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/driver.rb: some refactoring.
	  (1) Remove `average differential'.
	      In this benchmark driver, We should not care about `average'.
	      We use fastest score because this score should not include
	      any disturbances (affections of background process, etc).
	      If you care about timing affect, I recommend `median'
	      score with more than 5 examinations rather than simple
	      `average' score (`average' score was affected by error scores).
	  (2) Show log file name.
	  (3) Change default directory from './' to driver's directory.

Tue Oct 16 14:56:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_join): need to check again after any conversion run.
	  [ruby-core:48012] [Bug #7168]

Tue Oct 16 12:52:14 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/envutil.rb (Test::Unit::Assertions#assert_file):
	  rename from file_assertion.

Tue Oct 16 11:30:18 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_join): hide the result under construction until
	  return.

	* file.c (rb_file_join): check nul-byte only for strings, since
	  FilePathStringValue() does it.  [ruby-core:48012] [Bug #7168]

	* file.c (rb_file_join): path names must be ASCII-compatible.
	  [ruby-core:48012] [Bug #7168]

	* file.c (check_path_encoding): new function to ensure path name
	  encoding to be ASCII-compatible.

Tue Oct 16 09:40:04 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_regexp.rb
	  (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use
	  Regexp.new instead of literal to ignore a parser warning.

Tue Oct 16 09:30:30 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_regexp.rb
	  (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): ignoring
	  warnings are already set in setup method.

Tue Oct 16 06:44:06 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): fix wrong condition.

Tue Oct 16 06:29:18 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() if
	  this method call needs splat argument because cached functions
	  (vm_call_attrset, vm_call_ivar, vm_call_cfunc_fast_(unary|binary))
	  do not check an arity.

	* bootstraptest/test_method.rb: add a test to check an above issue.

Tue Oct 16 06:15:44 2012  Koichi Sasada  <ko1@atdot.net>

	* method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.
	  This method is similar to VM_METHOD_TYPE_CFUNC methods, but
	  called cfunc without building new frame (does not push new control
	  frame). If error is occurred in cfunc, the backtrace only shows
	  caller frame and upper.
	  This kind of methods can be added by rb_define_method_fast().
	  This feature is similar to specialized instructions (opt_plus, etc),
	  but more flexible (but a bit slower).

	* class.c (rb_define_method_fast): added.
	  Maybe it will be renamed soon.

	* vm_insnhelper.c (vm_call_method): support method type
	  VM_METHOD_TYPE_CFUNC_FAST.

	* proc.c (rb_method_entry_arity): catch up new method type.

	* vm_method.c (rb_add_method_cfunc_fast): added.

Tue Oct 16 02:32:29 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.h (CI_SET_FASTPATH): add new parameter `enabled'.
	  If `enable' is 0 then CI_SET_FASTPATH() doesn't work.
	  And add new configuration option OPT_CALL_FASTPATH. If this macro
	  was defined by 0, then CI_SET_FASTPATH() doesn't work any more.

	* vm_insnhelper.c (vm_call_method): Pass `0' for `enabled' parameter
	  of CI_SET_FASTPATH if this method is protected.

Tue Oct 16 02:17:35 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h (VM_CALL_*): rename VM_CALL_*_BIT
	  to VM_CALL_* (remove `_BIT' suffix).
	  Add comments on each macros.
	  Remove unused macro VM_CALL_TAILRECURSION_BIT.

	* compile.c, iseq.c, insns.def, vm_insnhelper.c: ditto.

Mon Oct 15 22:14:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (Test::Unit::Assertions#file_assertion):
	  rewrite file assertions.

Mon Oct 15 09:41:17 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() if
	  it was called from vm_yield_setup_args().

Mon Oct 15 05:20:13 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.h CI_SET_FASTPATH: introduce new macro
	  `CI_SET_FASTPATH(ci, func)'. This macro set `ci->call' as `func'.
	  `func' (ci->call) is called at the last of `send'
	  (and `invokesuper') instruction.
	  `CI_SET_FASTPATH' does not set `ci->call' when the method
	  (stored in `ci->me') is `protected'.

	* vm_insnhelper.c (vm_call_method): use `CI_SET_FASTPATH'.
	  After several checking (visibility, argc checking), the result of
	  checking can be reused until re-definition of this method
	  with inline method cache.

	  Note that this optimization is now experimental.
	  If you find any problem about it, please tell us.

Mon Oct 15 04:51:55 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c: refactoring.
	  - move all `call' related functions to the last of file.
	  - make functions for respective method types in vm_call_method().
	    (all functions have same function parameters)

	* vm_core.h: add `opt_pc' field in `rb_call_info_t'
	  as temporal variable.

	* vm_eval.c (vm_call0_body): catch up above changes.

Mon Oct 15 03:51:46 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).

	* benchmark/bm_vm1_float_simple.rb: added (for flonum/float).

Mon Oct 15 02:51:16 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (vm_call0_body): add new function.
	  `vm_call0()' makes call_info struct and calls `vm_call0_body()'
	  with this struct. In near future, `vm_call0()' will be removed
	  because all of `vm_call0()' users setup call_info struct by itself.

Mon Oct 15 01:38:06 2012  Koichi Sasada  <ko1@atdot.net>

	* insns.def (send, invokesuper, invokeblock, opt_*), vm_core.h:
	  use only a `ci' (rb_call_info_t) parameter instead of using
	  parameters such as `op_id', 'op_argc', `blockiseq' and flag.
	  These information are stored in rb_call_info_t at the compile
	  time.
	  This technique simplifies parameter passing at related
	  function calls (~10% speedups for simple method invocation at
	  my machine).
	  `rb_call_info_t' also has new function pointer variable `call'.
	  This `call' variable enables to customize method (block)
	  invocation process for each place. However, it always call
	  `vm_call_general()' at this changes.
	  `rb_call_info_t' also has temporary variables for method
	  (block) invocation.

	* vm_core.h, compile.c, insns.def: introduce VM_CALL_ARGS_SKIP_SETUP
	  VM_CALL macro.  This flag indicates that this call can skip
	  caller_setup (block arg and splat arg).

	* compile.c: catch up above changes.

	* iseq.c: catch up above changes (especially for TS_CALLINFO).

	* tool/instruction.rb: catch up above changes.

	* vm_insnhelper.c, vm_insnhelper.h: ditto. Macros and functions
	  parameters are changed.

	* vm_eval.c (vm_call0): ditto (it will be rewritten soon).

Sun Oct 14 12:30:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (rb_f_sub, rb_f_gsub): pass the given block.
	  [ruby-core:47967] [Bug #7157]

Sat Oct 13 23:15:39 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* regparse.c (parse_char_class): should match with a hyphen after a
	  range in a character class.

	* test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong
	  test.

	* test/ruby/test_regexp.rb (TestRegexp#check): now can accept the
	  error message.

	* test/ruby/test_regexp.rb
	  (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed
	  because the previous name was wrong.

	* test/ruby/test_regexp.rb
	  (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added
	  more test pattern.

Sat Oct 13 03:01:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (realpath_rec): prevent link from GC while link_names refers
	  the content.

Sat Oct 13 01:37:48 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_regexp.rb
	  (TestRegexp#test_raw_hyphen_and_type_char_after_range): added new
	  test. ref [ruby-core:47115] [Backport #6853]

Fri Oct 12 21:55:08 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* include/ruby/win32.h (rb_w32_pow): set floating point precision
	  for mingw-w64 x86 pow(). This improves the precision of pow() on
	  Windows XP for TestFloat#test_round_with_precision failure.
	  [ruby-core:47911] [Bug #7142]

Fri Oct 12 21:37:25 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test
	  depending on locale on Windows. ENV[] doesn't work properly if
	  console code page is not equal to file system encoding.
	  [ruby-core:47910] [Bug #7140]

Fri Oct 12 20:40:29 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (posix_sh_cmds): the command name of colon is ":".

Fri Oct 12 18:18:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_get_path_check): path name must not contain NUL bytes.

Fri Oct 12 16:06:20 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* tool/merger.rb: now can merge revision(s) without --ticket again.

Fri Oct 12 14:10:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (dir_config, init_mkmf): use configured libdir value as
	  default library path.  [ruby-core:43726] [Bug #6207]

Fri Oct 12 05:25:00 2012  Zachary Scott	<zzak@ruby-lang.org>

	* lib/timeout.rb (timeout):
	  Remove paragraph on wrong implementation detail.
	  [ruby-core:47739] [Bug #7088]

Thu Oct 11 23:09:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_sub{seq,pos,str}, rb_str_each_{line,codepoint}):
	  prevent String copies from GC.  [ruby-core:47881] [Bug #7135]

Thu Oct 11 07:40:50 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* iseq.c (insn_operand_intern): cast op to rb_call_info_t* before
	  compare with iseq->callinfo_entries whose type is rb_call_info_t*.

Thu Oct 11 03:37:08 2012  Koichi Sasada  <ko1@atdot.net>

	* bootstraptest/test_block.rb: add tests for block with super.

Thu Oct 11 02:54:07 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_dump.c: fix debug prints to catch up recent changes
	  such as VM data structures.

Thu Oct 11 02:50:34 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (insn_operand_intern): add support disasm TS_CALLINFO
	  operands.

Wed Oct 10 15:12:48 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_process.rb (TestProcess#test_execopts_gid): skip on
	  windows because the platform does not have Process.group method.
	  patched by Jon Forums in [ruby-core:47878] [Bug #7133].

Tue Oct  9 23:18:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (assert_file, assert_file_not): more
	  descriptive assertions for File predicates.

Tue Oct  9 18:01:37 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_sample): use rb_random_ulong_limited, since
	  precision of long may be larger than double.

	* random.c (rb_random_ulong_limited): new function to return a random
	  value from 0 upto limit as unsigned long, similarly to
	  rb_genrand_ulong_limited but with arbitrary RNG object.

Tue Oct  9 17:13:27 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and
	  :gid options.  [ruby-core:47414] [Feature #6975]

Tue Oct  9 14:36:11 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (iseq_free): fix memory leak.
	  rb_iseq_t::callinfo_entries should be freed.

Tue Oct  9 14:28:18 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h (rb_call_info_t): add new type `rb_call_info_t'.
	  This data structure contains information including inline method
	  cache. After that, `struct iseq_inline_cache_entry' does not
	  need to contain inline cache for method invocation.
	  Other information will be added to this data structure.

	* vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size'
	  members to `rb_iseq_t'.

	* insns.def, compile.c: Use CALL_INFO instead of IC.

	* tool/instruction.rb: support CALL_INFO as operand type.

	* vm_insnhelper.c, vm_insnhelper.h: ditto.

Sun Oct  7 23:54:33 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/zlib/zlib.c (zstream_run_func): don't call inflate() when
	  z->stream.avail_in == 0. it return Z_BUF_ERROR.
	  but deflate() could be called with z->stream->avail_in == 0 because
	  it has hidden buffer in z->stream->state (opaque structure).
	  fix for gem install error. [ruby-dev:46149] [Bug #7040]

Mon Oct  8 23:55:41 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_refinements): new method Module#refinements.

	* test/ruby/test_refinement.rb: add new tests for the above changes.

Mon Oct  8 23:02:19 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,
	  vm_method.c: rename omod and overlaid modules to refinements.

	* eval.c (hidden_identity_hash_new): renamed from identity_hash_new.

Sun Oct  7 04:50:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* lib/abbrev.rb: Documentation examples for Abbrev.
	  [ruby-core:47442] [Bug #6985]

Sun Oct  7 04:50:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* thread.c (rb_thread_aref):
	  Grammar in Thread documentation.
	  Patch by Steve Klabnik [ruby-core:47799] [Bug #7099]

Sun Oct  7 04:37:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* string.c (rb_str_match):
	  Clarify behavior for captured strings and local variable assignment
	  Patch by Marcus Stollsteimer [ruby-core:47668] [Bug #7062]

Sat Oct  6 18:31:36 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option to
	  enable/disable global method caching. [ruby-dev:46203] [Bug #7111]

	* vm_method.c (rb_method_entry_get_with_omod): don't use global
	  method cache if OPT_GLOBAL_METHOD_CACHE is 0.

Sat Oct  6 16:32:04 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (search_method): check omod only once for performance.

Sat Oct  6 09:42:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): endian-less wide
	  UTF encodings are dummy but Unicode.

	* encoding.c (rb_encdb_set_unicode): set Unicode flag.

	* template/encdb.h.tmpl: allow ENC_DUMMY variants.

	* encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.

Fri Oct  5 17:18:42 JST 2012  TAKANO Mitsuhiro  <tak@no32.tk>

	* template/Doxyfile.tmpl: remove SHOW_DIRECTORIES and
	  HTML_ALIGN_MEMBERS lines. They have been obsolete in
	  Doxygen version 1.8.2.

Fri Oct  5 15:26:18 2012  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
	  This method returns an array of objects referenced by given object.
	  If given object is special objects such as true/false/nil/Fixnum etc
	  then it returns nil. See rdoc for details.
	  [ruby-core:39772]

	* test/objspace/test_objspace.rb: add a test for this method.

	* gc.c: add rb_objspace_reachable_objects_from().
	  To make this function, add several member `mark_func_data'
	  to rb_objspace_t.  If mark_func_data is not null, then
	  gc_mark() calls mark_func_data::mark_func.

	* gc.h: export rb_objspace_reachable_objects_from().

Thu Oct  4 23:40:04 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (init_heap): call init_mark_stack before to allocate
	  altstack. This change avoid the stack overflow at the signal
	  handler on 32bit, but I don't understand reason... [Feature #7095]

Thu Oct  4 22:39:27 2012  Koichi Sasada  <ko1@atdot.net>

	* insns.def (getlocal, setlocal): remove old getlocal/setlocal
	  instructions and rename getdaynmic/setdynamic instructions
	  to getlocal/setlocal.

	* compile.c: ditto.

	* iseq.c: remove TS_DINDEX.

	* vm_exec.h (dindex_t): remove type definition of `dindex_t'.

	* tool/instruction.rb: ditto.

Thu Oct  4 21:44:17 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (vm_analysis_insn|operand|register): use st_insert
	  instead of using rb_hash_aset() because rb_hash_aset()
	  check $SAFE.

Thu Oct  4 21:15:26 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysis
	  hooks (old macro name is COLLECT_USAGE_ANALYSIS).
	  This feature is only for VM developers.  (I'm not sure I can use
	  `VM developers' (the plural form) in this sentence).
	  If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following
	  usage collection features:
	    (1) instruction: collect instruction usages.
	    (2) operand: collect operand usages.
	    (3) register: collect register usages.
	  The results are stored in
	    RubyVM::USAGE_ANALYSIS_INSN for (1, 2),
	    RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and
	    RubyVM::USAGE_ANALYSIS_REGS for (3).
	  You can stop collecting usages with
	    RubyVM::USAGE_ANALYSIS_INSN_STOP(),
	    RubyVM::USAGE_ANALYSIS_OPERAND_STOP(),
	    RubyVM::USAGE_ANALYSIS_REGISTER_STOP()
	  for (1), (2), (3) respectively.
	  You can also change the hook functions by setting
	  C level global variables
	    `ruby_vm_collect_usage_func_(insn|operand|register)'
	  for (1), (2), (3) respectively.
	  See codes for more details.

	* tool/instruction.rb: fix macro names.

	* iseq.c (insn_operand_intern): make it export (used in vm.c).
	  fix to skip several processes if not needed (pointer is 0).

	* vm_dump.c: move codes for collection features to vm.c.

	* vm_exec.h: rename macro and function names.

	* vm_insnhelper.h: ditto.

Thu Oct  4 18:59:14 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_settracefunc.rb (test_tracepoint):
	  remove unused test case.
	  (this test case is redefined by newer tests)

Thu Oct  4 17:24:51 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
	  at suitable point.

Thu Oct  4 16:31:29 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers
	  before run finalizers, to fix SEGV from btest on 32bit.

	* gc.c (gc_mark_stacked_objects): extract from gc_marks().

Thu Oct  4 11:43:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (ruby_init_stack): round stack limit to page size
	  boundary to calculate stack size more precisely.  [ruby-dev:46174]
	  [Bug #7084]

Wed Oct  3 19:51:57 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: Use the non-recursive marking instead of recursion. The
	  recursion marking of CRuby needs checking stack overflow and the
	  fail-safe system, but these systems not good at partial points,
	  for example, marking deep tree structures. [ruby-dev:46184]
	  [Feature #7095]

	* configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
	  checking stack overflow of marking.

	* win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.

Wed Oct  3 15:33:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (ruby_init_stack): use getrlimit() for the main
	  thread on Mac OS X, since pthread_get_stack{addr,size}_np()
	  return the default value always, but not the ulimit value.
	  [ruby-dev:46174] [Bug #7084]

Wed Oct  3 11:43:15 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_reopen): improvement to accept optional arguments.
	  a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806].
	  [Feature #7103]

Wed Oct  3 04:36:11 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_x509store.c (ossl_x509store_add_file):  Added
	  documentation
	* ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
	  ditto
	* ext/openssl/ossl_x509store.c (ossl_x509store_add_cert):  ditto

Wed Oct  3 02:23:37 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
	  taint messages.

Tue Oct  2 16:47:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (identity_hash_new): hide internal hashes for refinements.

	* eval.c (rb_mod_refine): no default value.

Mon Oct  1 22:54:02 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (identity_hash_new): new function to create a new identity
	  hash.

	* eval.c (rb_overlay_module, rb_mod_using, rb_mod_refine): use
	  identity_hash_new().

Mon Oct  1 02:34:53 2012  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in (--with-opt-dir): Make this also work on DLDFLAGS
	  so LIBRUBY_SO links fine with libexecinfo installed in a
	  non-system directory.

Sun Sep 30 23:32:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* vm_dump.c (rb_vm_bugreport): add /Library/Logs/DiagnosticReports
	  in the list of locations of crash reports.

Sun Sep 30 21:18:03 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_concat): use memcpy to copy a string which contains
	  NUL characters. [ruby-core:47751] [Bug #7090]

Sat Sep 29 19:41:53 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process
	  before Timeout::Error is raised. rmdir of mktmpdir fails with
	  EACCES if child process is alive on Windows.

	* test/thread/test_queue.rb (TestQueue): increase timeout.
	  This test takes long time on Windows XP.

Sat Sep 29 19:41:33 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
	  clear environment variables. If http_proxy environment variable was
	  set, the test failed.

	* test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.

Sat Sep 29 19:41:11 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/drb/drbtest.rb (DRbCore#teardown):
	  Use Process.kill :KILL on Windows because Process.kill :INT silently
	  fails on Windows 7 and raises EINVAL on Windows XP for spawned
	  process with new_pgroup: false.

	* test/drb/drbtest.rb (DRbAry#teardown): ditto.

Sat Sep 29 19:40:32 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
	  set script encoding to work with LANG=C. It would work on both
	  Windows and Unix. Refix of r37051.

Sat Sep 29 11:21:06 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (rb_vm_using_modules): use using_modules before
	  klass to fix method lookup order, and use klass even if klass is
	  not a module to make refinements in class_eval invoked on classes
	  work.

	* eval.c (rb_using_module): accept a class as the second argument.

	* eval.c (rb_mod_using, f_using): raise a TypeError if the argument
	  is not a module.

	* test/ruby/test_refinement.rb: add new tests for the above changes.

Sat Sep 29 02:18:57 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
	  Use ruby only on Windows since the test fails on Unix with LANG=C.
	  [ruby-core:47709] [Bug #7076]

Fri Sep 28 22:19:31 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
	  echo command doesn't work properly against non-ascii character on
	  Windows with chcp 437. Instead we use ruby.
	  [ruby-core:47709] [Bug #7076]

Fri Sep 28 17:54:31 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_setup_method): refactoring.
	  Remove src_argc and use iseq->arg_size directly.

Fri Sep 28 17:26:27 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
	  test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
	  fails on Windows with msys bash. It makes comparing paths
	  case-insensitive.
	  pick from upstream to fix a failure of test-all [ruby-core:47711]
	 https://github.com/rubygems/rubygems/commit/c474edb2f3704206f04da1c8c6cf9fb079d84abe

Fri Sep 28 15:44:45 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (search_method): copy refinement iclasses to search
	  superclasses correctly.

	* test/ruby/test_refinement.rb: related test.

Fri Sep 28 15:15:41 2012  Koichi Sasada  <ko1@atdot.net>

	* insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.

	* compile.c (iseq_compile_each): ditto.

	* node.h: remove unused node `NODE_OPTBLOCK'.

	* ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.

Fri Sep 28 13:14:34 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: now VM_DEBUG_BP_CHECK should be 1.

Fri Sep 28 12:51:54 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: remove rb_control_frame_t::bp (bp: base pointer).
	  `bp' can be calculate by `sp' (stack pointer) of previous frame.
	  Now, `bp_check' field is remained for debug.  You can eliminate
	  this field by setting  VM_DEBUG_BP_CHECK as 0.

	* vm_insnhelper.c (vm_base_ptr): add `vm_base_ptr(cfp).
	  This function calculates base pointer from cfp.

	* vm_insnhelper.c (vm_setup_method): push `recv' value on top of
	  value stack (before method parameters).
	  This change is for keeping consistency with normal method dispatch.

	* insns.def: fix to use vm_base_ptr().

	* vm.c (vm_exec): ditto.

	* vm_dump.c: remove `bp' related dumps.

	* cont.c (fiber_init): fix to check VM_DEBUG_BP_CHECK.

Fri Sep 28 10:40:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_reopen): accept File::Constants as well as mode string.
	  based on the patch by Glass_saga (Masaki Matsushita) in
	  [ruby-core:47694].  [Feature #7067]

Thu Sep 27 18:36:51 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_overlay_module, rb_mod_refine): accept a module as the
	  argument of Module#refine.

	* vm_method.c (search_method): if klass is an iclass, lookup the
	  original module of the iclass in omod in order to allow
	  refinements of modules.

	* test/ruby/test_refinement.rb: add tests for the above changes.

Thu Sep 27 18:12:20 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/syslog/lib/syslog/logger.rb: add a formatter to the
	  Syslog::Logger object. [Bug #7065]
	* test/syslog/test_syslog_logger.rb: ditto.

Wed Sep 26 16:39:57 2012  Koichi Sasada  <ko1@atdot.net>

	* insns.def: add new instruction `opt_empty_p' for optimize `empty?'
	  method.  Apply a patch proposed at [ruby-dev:46120]
	  [ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita).

	* compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h:
	  ditto.

	* id.c, template/id.h.tmpl: ditto.

	* test/ruby/test_optimization.rb: test for this changes.

Tue Sep 25 09:59:26 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (invokesuper): klass in cfp is not valid in at_exit and
	  END blocks.  [ruby-core:47680] [Bug #7064]

Tue Sep 25 08:11:11 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* iseq.c (rb_iseq_defined_string): the index of defined_strings must
	  be the value of type - 1.

Mon Sep 24 17:36:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (defined_expr), insns.def (defined): share single frozen
	  strings.  [EXPERIMENTAL] [ruby-core:47558][Feature #7035]

	* iseq.c (rb_iseq_defined_string): make expression strings.

Mon Sep 24 11:22:36 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/merger.rb: add --ticket option to add ticket number.

Sun Sep 23 21:51:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (String#unspace): unescape with backslashes.  normal
	  makes need to escape spaces with backslashes.  nmake is not the
	  case.  [Bug #7036]

	* lib/mkmf.rb (create_makefile): use timestamp file dependencies for
	  directories.

	* lib/mkmf.rb: unexpand macros.

	* lib/mkmf.rb (LIBPATHFLAG): no needs to escape library path here.

	* lib/mkmf.rb (MakeMakefile#configuration): make prefix paths
	  internal to deal with in Makefile.

	* lib/mkmf.rb (MakeMakefile#mkintpath): not a global function now.

Sun Sep 23 02:33:37 2012  Benoit Daloze  <eregontp@gmail.com>

	* complex.c: Fix examples of r36993.
	  Keep the simple definition, mathematics define the result.
	  Based on patch by Robin Dupret. Fixes #188 on github.

Sat Sep 22 07:15:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* ext/ripper/lib/ripper.rb:
	  Match sample output to Ripper.sexp from current trunk version.
	  [Bug #6929]

Thu Sep 20 23:05:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (native_cond_initialize): destroy condattr
	  after using it. Patch by Stanislav Sedov. Thank you.
	  [Bug #7041] [ruby-core:47619]

Thu Sep 20 22:53:02 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (native_cond_initialize): clean up #ifdef condition.

Thu Sep 20 16:42:44 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/drb/ssl.rb (DRb::DRbSSLSocket::SSLConfig::DEFAULT): add
	  SSLTmpDhCallback for configuration option.

	* lib/drb/ssl.rb (setup_ssl_context): copy the value of tmp_dh_callback.

	* test/drb/ut_array_drbssl.rb: set tmp_dh_callback to suppress warning.

	* test/drb/ut_drb_drbssl.rb: ditto.

Thu Sep 20 10:56:08 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/drb/ut_drb.rb: revert a part of r36987, and get rid of a warning
	  with another method.  if the substitution is removed, the ExtSrv
	  object will be GC'ed and some tests will be blocked.

Thu Sep 20 07:20:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* complex.c: Examples for Complex Documentation.
	  Patch by Robin Dupret.
	  Fixes #184 on github.

Thu Sep 20 07:15:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* ext/ripper/lib/ripper.rb: Documentation for Ripper.
	  +:void_stmt+ is meaningless
	  [Bug #6929] [ruby-core:47507]

Thu Sep 20 07:05:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv):
	  Examples and documentation for CSV.
	  [Bug #6880] [ruby-core:47218]

Thu Sep 20 00:42:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (take_items), enum.c (enum_zip): raise TypeError at
	  non-enumerable objects, not NoMethodError.  [ruby-dev:46145]
	  [Bug #7038]

	* vm_eval.c (rb_check_block_call): check_funcall variant with block
	  function.

Tue Sep 18 17:51:29 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_ssl.c (ossl_sslctx_attrs): add npn_select_db to
	  suppress warning: instance variable @npn_select_cb not initialized

Sun Sep 16 17:47:00 2012  Eric Hodel  <drbrain@segment7.net>

	* tool/change_maker.rb:  Update svn detection for subversion 1.7's
	  single .svn directory.

Sun Sep 16 11:39:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_set_read_length): if the read length equals to the buffer
	  string size then nothing to do.  or ensure the string modifiable
	  before setting the length only when the former is shorter.  based on
	  the patch in [ruby-core:47541] by Hiroshi Shirosaki.
	  [ruby-core:46586] [Bug #6764]

Sun Sep 16 08:57:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (strict_warnflags): separate strict flags from
	  warnflags only for core.  [ruby-dev:46105]

Sun Sep 16 08:16:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* .editorconfig: add.  [ruby-core:47548] [Feature #7030]

Sat Sep 15 01:56:40 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: Merge upstream: 50a383c84.
	  [ruby-dev:46128] [Bug #7005]

Sat Sep 15 00:20:04 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf.c (rb_nkf_convert): suppress warning.

Fri Sep 14 04:05:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* array.c (rb_ary_diff, rb_ary_uniq):
	  Enhance documentation for array uniqueness
	  Based on a patch by Robin Dupret
	  [Bug #6872] [ruby-core:47209]

Fri Sep 14 03:30:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* array.c (rb_ary_select):
	  Update documentation for Array#select
	* enum.c (enum_find_all, enum_reject):
	  Update documentation for Enumerable#find_all and Enumerable#reject
	  Based on a patch by Jeff Saracco
	  [Bug #6908] [ruby-core:47285] [Fixes #166 on github]

Fri Sep 14 00:20:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* signal.c (rb_f_kill):
	  Update documentation for Process.kill to reflect kill(2)
	  Patch by Richo Healey

Thu Sep 13 21:40:49 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* lib/securerandom.rb (SecureRandom.random_bytes):
	  Use 64bit value as pointer for Windows x64 to fix SystemCallError.

	* lib/securerandom.rb (SecureRandom.lastWin32ErrorMessage):
	  Set proper encoding to avoid invalid byte sequence error.
	  [ruby-core:47451] [Bug #6990]

Thu Sep 13 11:20:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* lib/optparse.rb: Remove unreachable email address from documentation
	  [Bug #6996] [ruby-core:47459]

Thu Sep 13 11:20:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* lib/xmlrpc.rb: Documentation for XMLRPC
	* lib/xmlrpc/datetime.rb: ditto.
	* lib/xmlrpc/parser.rb: ditto.
	* lib/xmlrpc/client.rb: ditto.
	* lib/xmlrpc/utils.rb: ditto.
	* lib/xmlrpc/README.rdoc: ditto.
	* lib/xmlrpc/create.rb: ditto.
	* lib/xmlrpc/base64.rb: ditto.
	* lib/xmlrpc/config.rb: ditto.
	* lib/xmlrpc/httpserver.rb: ditto.
	* lib/xmlrpc/server.rb: ditto.
	* lib/xmlrpc/marshal.rb: ditto.
	* lib/xmlrpc/README.txt: ditto.
	  [Bug #6909] [ruby-core:47286]

Thu Sep 13 10:22:11 2012  Takashi Toyoshima  <toyoshim@gmail.com>

	* configure.in: Don't use PIE on Haiku because loader support is not
	  enough.

Thu Sep 13 08:20:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* lib/shellwords.rb: Documentation for Shellwords.

Thu Sep 13 08:00:00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* ext/ripper/lib/ripper.rb: Documentation for Ripper.
	* ext/ripper/lib/ripper/lexer.rb: ditto.
	* ext/ripper/lib/ripper/sexp.rb: ditto.
	* ext/ripper/lib/ripper/filter.rb: ditto.
	* ext/ripper/lib/ripper/core.rb: ditto.
	  [Bug #6929] [ruby-core:47309]

Wed Sep 12 22:59:07 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_method_missing, vm_call_method): reuse arguments
	  on the VM stack and get rid of ALLOCA.

Wed Sep 12 22:45::00 2012  Zachary Scott  <zzak@ruby-lang.org>

	* ext/pathname/lib/pathname.rb: Documentation for Pathname.
	* ext/pathname/pathname.c: ditto.
	  [Bug #6947] [ruby-core:47354]

Mon Sep 10 10:19:34 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enc/depend: fixed wrong change in a part of r34802.

Sun Sep  9 22:02:50 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/socket/basicsocket.c (rsock_bsock_send):
	  avoid unnecessary select() calls before doing I/O
	  Patch by Eric Wong. [Feature #4538] [ruby-core:35586]
	* ext/socket/init.c (rsock_s_recvfrom): ditto.
	* ext/socket/init.c (rsock_s_accept): ditto.
	* ext/socket/udpsocket.c (udp_send): ditto.
	* io.c (io_fflush): ditto.
	* io.c (io_binwrite): ditto.
	* io.c (rb_io_syswrite): ditto.

Mon Sep 10 01:38:51 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
	  suppress integer <-> pointer cast warnings.
	  [Feature #4570] [ruby-core:35711]

Mon Sep 10 01:36:00 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_io_close): notify fd close before releasing gvl.
	* io.c (fptr_finalize): modify fptr->mode before releasing gvl.
	  remove unnecessary rb_thread_fd_close().
	  [Feature #4570] [ruby-core:35711]

Mon Sep 10 00:16:34 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* process.c: exec() requires to be single threaded also on Haiku.
	  by Takashi Toyoshima <toyoshim@gmail.com>
	  https://github.com/ruby/ruby/pull/178

Sun Sep  9 21:21:15 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/thread.rb (Queue#pop): Fixed double registration issue when
	  mutex.sleep is interrupted. [Bug #5258] [ruby-dev:44448]
	* lib/thread.rb (SizedQueue#push): ditto.

	* test/thread/test_queue.rb (test_sized_queue_and_wakeup,
	test_queue_pop_interrupt, test_sized_queue_pop_interrupt,
	test_sized_queue_push_interrupt): new tests.

Sun Sep  9 20:20:31 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/sync.rb (Sync_m#sync_lock): Fixed wakeup/raise unsafe code.
	  Patched by Masaki Matsushita. [Bug #5355] [ruby-dev:44521]

	* test/thread/test_sync.rb (test_sync_lock_and_wakeup,
	  test_sync_upgrade_and_wakeup, test_sync_lock_and_raise):
	  new test.

Sun Sep  9 18:39:46 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/intern.h (rb_thread_blocking_region): Added
	  a comment of recommended alternative way.

Sun Sep  9 18:37:05 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/sync.rb (Sync_m): Removed RCS_ID.

Sun Sep  9 18:21:03 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_io.rb (test_advise_pipe): new test to check
	  io.advise() against anonymous io object don't make crash.
	  made by Eric Wong. [Bug #6081] [ruby-core:42880]

Sun Sep  9 16:47:12 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
	  new functions.
	* io.c (fptr_finalize): release GVL if possible.
	  Patched by Eric Wong. [Feature #4570] [ruby-core:35711]

Sun Sep  9 16:08:48 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (io_bufread): removed unnecessary rb_thread_wait_fd().
	  Patch by Eric Wong. [Bug #6629] [ruby-core:45789]
	* io.c (rb_io_sysread): ditto.
	* io.c (copy_stream_fallback_body): ditto.

Sun Sep  9 15:21:52 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_lock): stop multiple threads use
	  pthread_cond_timedwait() concurrently. [Bug #6278] [ruby-core:44275]

Sat Sep  8 18:52:22 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (struct rb_classext_struct): move allocator function into
	  rb_classext_t from ordinary method table.  [ruby-dev:46121]
	  [Feature #6993]

	* object.c (rb_obj_alloc): call allocator function directly.

	* vm_method.c (rb_define_alloc_func, rb_undef_alloc_func)
	  (rb_get_alloc_func): use allocator function in rb_classext_t.

Fri Sep  7 01:21:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake), lib/mkmf.rb (have_framework): fix splitting
	  options with an argument, not using NUL as special character.
	  [ruby-core:47447] [Bug #6987]

Thu Sep  6 14:49:49 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* .gdbinit (rp): FLONUM support.

	* include/ruby/ruby.h (ruby_special_consts): define FLONUM constants
	  always, so that they are available from gdb.

	* include/ruby/ruby.h (RB_FLOAT_TYPE_P): merge FLONUM and non-FLONUM
	  versions.  inline TYPE() comparison and FLONUM_P() should be
	  optimized away on non-FLONUM.

Thu Sep  6 08:20:55 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 3.4.0 (r7762)
	* test/minitest/*: ditto

Wed Sep  5 19:20:53 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* parse.y (rb_warn4S): renamed from rb_warn4(), because the case in
	  r36911 takes a string.

	* parse.y (rb_warn4S): use ripper_warnS() for ripper.

	* parse.y (ripper_warnS): now it is used.

Wed Sep  5 15:51:52 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (notifications): [experimental] update notification
	  template.

Wed Sep  5 15:21:12 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* parse.y (rb_warn4): added as a rb_warn variant to warn with explicit
	  source file name and line in parse.y.

	* parse.y (warn_unused_var): use rb_warn4 to suppress warning on ripper.

Wed Sep  5 13:30:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_make_pattern): names under recursive need to be single
	  basenames to match for each name.  [ruby-core:47418] [Bug #6977]

Tue Sep  4 20:55:17 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/envutil.rb (EnvUtil#invoke_ruby): show Timeout::Error
	  instead of IOError if the timeout has expired.

	* test/test_pstore.rb
	  (PStoreTest#test_pstore_files_are_accessed_as_binary_files):
	  increase timeout because this test is slow on Windows.
	  [ruby-core:47402] [Bug #6965]

Tue Sep  4 11:28:57 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* vm_eval.c (ruby_eval_string_from_file_protect): initializer
	  element is not computable at load time.

Tue Sep  4 07:48:35 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_asn1_rb:
	  test/openssl/test_ssl_session.rb:
	  test/openssl/test_x509name.rb:
	  test/openssl/test_buffering.rb:
	  test/openssl/test_x509cert.rb:
	  test/openssl/test_ssl.rb: Refactor code that leads to warnings on
	  Ruby CI.

Tue Sep  4 07:02:56 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/utils.rb: Use DSS1 as DSA signature digest for all
	  OpenSSL versions < 1.0.0.
	  [Feature #6946] [ruby-core:47405]

Mon Sep  3 21:22:37 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (rb_float_value): suppress warnings.
	  [ruby-core:47406][Bug #6971]

Mon Sep  3 14:49:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/matrix.rb (Vector#magnitude): accumulate squares of absolute
	  values to fix for complex vector.  [ruby-dev:46100] [Bug #6966]

Mon Sep  3 10:09:36 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/extconf.rb: Detect OpenSSL_FIPS macro
	  ext/openssl/ossl.c: Expose OpenSSL::OPENSSL_FIPS constant to
	  indicate whether OpenSSL runs in FIPS mode.
	  test/openssl/test_pkey_dh.rb: Generate 256 bit keys for
	  non-FIPS installations to improve test performance (e.g. for
	  rubyci).
	  test/openssl/utils.rb: Replace DSS1 as certificate signature
	  digest with SHA1 for FIPS installations when using DSA by
	  introducing TestUtils::DSA_SIGNATURE_DIGEST.
	  test/openssl/test_x509cert.rb:
	  test/openssl/test_x509crl.rb:
	  test/openssl/test_x509req.rb: Use DSA_SIGNATURE_DIGEST
	  NEWS: Introduce OpenSSL::OPENSSL_FIPS

	  These changes allow running the OpenSSL tests in FIPS mode
	  while keeping a high performance for non-FIPS installations.
	  Introduction of OpenSSL::OPENSSL_FIPS allows for applications
	  to react to special requirements when using OpenSSL in FIPS mode.
	  [Feature #6946] [ruby-core:47345]

Sun Sep  2 21:46:28 2012  Martin Bosslet <Martin.Bosslet@googlemail.com>

	* test/openssl/utils.rb: Use a cached DH key instead of generating a
	  new one each time.

Sun Sep  2 05:41:28 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/ssl.rb (WEBrick::Config::SSL): add new key
	  SSLTmpDhCallback to set SSLContext#tmp_dh_callback.

	* lib/webrick/ssl.rb (WEBrick::GenericServer#setup_ssl_context):
	  follow above.

Sat Sep  1 18:50:50 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (#initialize_copy, #eql): Use instance_variable_get
	  instead of instance_eval.

Fri Aug 31 21:47:56 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/test/unit/test-unit.gemspec: Make test/unit default gem.
	  [Feature #6875] [ruby-dev:46051]

Fri Aug 31 18:35:02 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/extconf.rb: Check existence of OPENSSL_NPN_NEGOTIATED.
	  ext/ossl_ssl.c: Support Next Protocol Negotiation. Protocols to be
	  advertised by the server can be set in the SSLContext by using
	  SSLContext#npn_protocols=, protocol selection on the client is
	  supported by providing a selection callback with
	  SSLContext#npn_select_cb. The protocol that was finally negotiated
	  is available through SSL#npn_protocol.
	  test/openssl/test_ssl.rb: Add tests for Next Protocol Negotiation.
	  NEWS: add news about NPN support.
	  [Feature #6503] [ruby-core:45272]

Fri Aug 31 17:38:43 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#{each,reject!,select!}, SortedSet#each): Pass
	  the original block through instead of creating one that only
	  yields the passed argument.

Fri Aug 31 16:23:20 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/ipaddr.rb: Introduce several new error classes where only
	  ArgumentError and StandardError were used.  IPAddr::Error is
	  their common ancestor class that inherits from ArgumentError for
	  backward compatibility.  Submitted by Jon Daniel.  Fixes #173 on
	  GitHub.

Fri Aug 31 14:51:27 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_to_f): added
	  for previous commit.

Fri Aug 31 14:32:05 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use self's sign to
	  determine 0.0 and Inf's sign instead of internal double value's.
	  Reported by phasis68 (Heesob Park) at [ruby-core:47381] [Bug #6955]

Fri Aug 31 14:31:17 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/id.h.tmpl, tool/id2token.rb: make id.h independent from
	  parse.h, and make parse.c dependent on it instead.

Fri Aug 31 14:27:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): fix race conditions at install-ext.
	  target files need to depend on destination directory timestamp
	  files, not phony targets.

Fri Aug 31 14:03:45 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_trace.c (clean_hooks): do not access freed memory.

	* vm_trace.c (rb_threadptr_exec_event_hooks): fix uninitialized state
	  when no events is executed.

Thu Aug 30 18:21:51 2012  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_io_close): call rb_last_status_clear.

Thu Aug 30 16:17:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): check underflow since
	  strtod() sets errno to ERANGE at underflow too.  [ruby-core:47342]
	  [Bug #6944]

Thu Aug 30 12:44:43 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#{<,>,<=,>=}): Define comparison operators as
	  shorthand for the {proper_}{subset?,superset?} methods (finally).
	  Given a push by Alexander E. Fischer.

Thu Aug 30 09:21:01 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//"
	  is not present [ruby-core:47344] [Bug #6945]

Thu Aug 30 07:45:12 2012  Luis Lavena  <luislavena@gmail.com>

	* test/ruby/test_file_exhaustive.rb: fix test introduced in r36811 for
	  posix environments where HOME is not defined.  [ruby-core:47322]

Wed Aug 29 23:42:59 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_last_status_clear): declared.

	* process.c (rb_last_status_clear): exported.
	  (rb_f_system): call rb_last_status_clear.

	* io.c (rb_f_backquote): call rb_last_status_clear.

Wed Aug 29 22:01:15 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_f_system): check failures of waitpid.
	  [ruby-talk:398687]

Wed Aug 29 15:03:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LIBDIR_BASENAME): use configured libdir value to fix
	  --enable-load-relative on systems where libdir is not default value,
	  overridden in config.site files.  [ruby-core:47267] [Bug #6903]

	* ruby.c (ruby_init_loadpath_safe): ditto.

Wed Aug 29 14:34:41 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c: SIZE_MAX is defined in stdint.h, so r36755 breaks
	  32bit FreeBSD. [ruby-core:47360] [Bug #6948]

Wed Aug 29 04:50:04 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/utils.rb
	  test/openssl/test_pair.rb
	  test/openssl/test_pkey_dh.rb: Use 1024 bit DH parameters to satisfy
	  OpenSSL FIPS requirements. Patch by Vit Ondruch.
	  [Bug #6938] [ruby-core:47326]

Tue Aug 28 22:31:49 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* insns.def (checkmatch): suppress warnings. [ruby-core:47339]
	  [Bug #6930]

Tue Aug 28 20:03:54 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: Fixing Haiku R1/alpha3 build with gcc-4.4.4.
	  - omit ANSI standard flags to compile socket extension where
	    anonymous union is required.
	  - remove redundant -be flags.
	  by Takashi Toyoshima <toyoshim@gmail.com>
	  https://github.com/ruby/ruby/pull/168

Tue Aug 28 11:32:37 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* nacl/GNUmakefile.in (.rbconfig.time): r36828 was incomplete.
	  It did not run correctly on clean build.

Tue Aug 28 09:25:20 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (Makefile): make to depend on common.mk, to
	  stop and force to re-run make process when common.mk is changed.

Mon Aug 27 20:19:49 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/etc/test_etc.rb (TestEtc#test_getgrgid): fix for non unique GID.
	  No unixen systems guarantee that GID is unique. Etc.getgrgid would
	  not return the first entry in the order of Etc.group for shared GID.
	  [ruby-core:47312] [Bug #6935]

Mon Aug 27 18:19:36 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h (rb_float_value): optimize it.
	  This technique was pointed by shinichiro.hamaji
	  <http://shinh.skr.jp/m/?date=20120825#p02>.

Mon Aug 27 15:08:25 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* common.mk (vm_trace.o): Added a missing dependency.

Sun Aug 26 09:29:32 2012  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* nacl/GNUmakefile.in (package): make package should install
	  example.html for nacl build

	Patch by Takashi Toyoshima <toyoshim AT gmail.com>.

Sun Aug 26 09:22:33 2012  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY)
	  Rewrites these variables instead of PATH.
	  NaCl port uses a toolchain which is specified by NACL_SDK_ROOT
	  environment variable. Originally, NaCl build added the toolchain
	  under the NACL_SDK_ROOT to the PATH. But updating PATH doesn't work
	  on Mac.
	  (RBCONFIG): Replaces configs with the variable updates above.

	* configure.in: Thus it is no longer necessary to check $PATH.

	Based on a patch by Takashi Toyoshima <toyoshim AT gmail.com>.

Sun Aug 26 16:53:00 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (checkmatch): suppress warnings.  [ruby-core:47310]
	  [Bug #6930]

	* vm_core.h (VM_FRAME_TYPE_FINISH_P): ditto.

Fri Aug 24 15:42:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): use timestamp for destination
	  directories to make them before making or copying files there.
	  [ruby-dev:46067] [Bug #6904]

Fri Aug 24 12:40:15 2012  Luis Lavena  <luislavena@gmail.com>

	* configure.in (mingw): add shlwapi to the list of dependency
	  libs for Windows.
	* win32/Makefile.sub (EXTSOLIBS): ditto.

	* internal.h: declare internal functions rb_w32_init_file,
	  rb_file_expand_path_internal and rb_file_expand_path_fast.

	* file.c (Init_File): invoke Windows initialization rb_w32_init_file

	* win32/file.c (rb_file_load_path_internal): new function.
	  Windows-specific implementation that replaces file_expand_path.
	  [Bug #6836][ruby-core:46996]

	* win32/file.c (rb_w32_init_file): new function. Initialize codepage
	  cache for faster conversion encodings lookup.

	* file.c (file_expand_path): rename to rb_file_expand_path_internal.
	  Conditionally exclude from Windows.

	* file.c (rb_file_expand_path_fast): new function. delegates to
	  rb_file_expand_path_internal without performing a hit to the
	  filesystem.

	* file.c (file_expand_path_1): use rb_file_expand_path_internal without
	  path expansion (used by require).
	* file.c (rb_find_file_ext_safe): ditto.
	* file.c (rb_find_file_safe): ditto.

	* load.c (rb_get_expanded_load_path): use rb_file_expand_path_fast.
	* load.c (rb_feature_provided): ditto.

	* file.c (rb_file_expand_path): use rb_file_expand_path_internal with
	  path expansion.
	* file.c (rb_file_absolute_path): ditto.

	* test/ruby/test_file_exhaustive.rb: new tests to exercise
	  rb_file_expand_path_internal implementation and compliance with
	  existing behaviors.

Fri Aug 24 07:35:24 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http/backward.rb (class Net):  Restored Net::HTTPSession to
	  fix backwards-compatibility with ancient Net::HTTP.  [Bug #6889]

Thu Aug 23 20:58:55 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* common.mk: support `make id.h` without `rm .id.h.time` after
	  `rm id.h`.

Thu Aug 23 20:48:45 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test.

	* test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto.

	* test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto.

	* test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto.

Thu Aug 23 20:34:32 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* class.c (singleton_class_of): flonum can't have singleton class.

	* vm.c (vm_define_method): flonum can't have singleton method.

Thu Aug 23 19:18:33 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk (win32/*): macro RUBY_H_INCLUDES is not defined there,
	  so need to move dependency rules under the definition of it.

Thu Aug 23 19:16:20 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub: refactoring.  remove unused rules, and update
	  some rules which are not used usually to fit current macros.

Thu Aug 23 16:46:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_find_file_ext_safe, rb_find_file_safe): default to
	  US-ASCII for encdb and transdb.

	* load.c (search_required): keep encoding of feature name.  set
	  loading path to filesystem encoding.  [Bug #6377][ruby-core:44750]

	* ruby.c (add_modules, require_libraries): assume default external
	  encoding as well as ARGV.

Thu Aug 23 16:20:04 2012  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: introduce flonum technique for
	  64bit CPU environment (sizeof(double) == sizeof(VALUE)).
	  flonum technique enables to avoid double object creation
	  if the double value d is in range about between
	  1.72723e-77 < |d| <= 1.15792e+77 or 0.0.
	  flonum Float value is immediate and their lowest two bits
	  are b10.
	  If flonum is activated, then USE_FLONUM macro is 1.
	  I'll write detailed in this technique on
	  https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech

	* benchmark/bmx_temp.rb: add an benchmark for simple
	  Float calculation.

	* gc.c (id2ref, rb_obj_id): add flonum Float support.

	* include/ruby/intern.h: move decl of rb_float_new(double)
	  to include/ruby/ruby.h.

	* insns.def, vm.c, vm_insnhelper.c: add flonum optimization
	  and simplify source code.

	* vm_insnhelper.h (FLONUM_2_P): added.

	* marshal.c: support flonum output.

	* numeric.c (rb_float_new_in_heap): added.

	* parse.y: support flonum.

	* random.c: ditto.

Thu Aug 23 16:12:40 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): add dependency to header files when
	  depend files don't exist.  now we can remove simple (and often
	  wrong) depend files in most cases.

Thu Aug 23 16:02:20 2012  Koichi Sasada  <ko1@atdot.net>

	* ext/date/depend: add dependency to $(ruby_headers).

Thu Aug 23 12:51:39 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* insns.def (invokesuper): reverted r36640 partially to make super
	  in a thread work correctly. [ruby-core:47284] [Bug #6907]

	* test/ruby/test_super.rb: related test.

Thu Aug 23 12:30:20 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/configure.bat: support --with(out)?-ext(ensions) options.

Thu Aug 23 11:52:04 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: Fixing Haiku build.
	  - -lbe is not required for linking
	  - stack protector doesn't work for now because of the default gcc's
	    bug
	  by Takashi Toyoshima <toyoshim@gmail.com>
	  https://github.com/ruby/ruby/pull/167

	* signal.c (ruby_signal): haiku doesn't have SIGBUS.

Thu Aug 23 11:32:44 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/open-uri/test_open-uri.rb (TestOpenURI#test_read_timeout): this
	  test expects that the server thread will be killed in sleep, but 0.01
	  sec is too short to reach there.

Thu Aug 23 10:49:28 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: use the value of --with-opt-dir on building ruby
	  itself. [ruby-dev:46064] [Bug #6900]

Thu Aug 23 10:36:35 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk (ID_H_TARGET): revert a part of r36724 and r36751.  they
	  break mswin build from clean source.

Thu Aug 23 02:37:35 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/syck: removed. Fixes [ruby-core:43360]

	* test/syck: removed.

	* lib/yaml.rb: only require psych, show a warning if people try to set
	  the engine to syck.

Thu Aug 23 01:46:53 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* insns.def: search up the cf stack for an object that is an instance
	  of the recipient class.  Fixes [ruby-core:47186]

	* test/ruby/test_super.rb: related test.

Wed Aug 22 19:46:24 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:47266].

Wed Aug 22 19:41:19 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:47226].

Wed Aug 22 16:57:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (configuration): extract least ruby headers list as
	  ruby_headers, so depend files can use default dependency
	  explicitly.

Wed Aug 22 15:27:50 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_setup_method): fix last commit of
	  vm_insnhelper.c (r36771). [ruby-dev:46065] [Bug #6901]
	  Should not disable tail call opt on FINISH_FRAME.
	  This flag should be propagated correctly.

Wed Aug 22 14:05:23 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]

	* test/ruby/test_settracefunc.rb: add tests for above.

	* proc.c (rb_binding_new_with_cfp): add an internal function.

	* vm.c (rb_vm_control_frame_id_and_class): add an internal function.

	* vm_trace.c: add rb_add_event_hook2() and rb_thread_add_event_hook2().
	  Give us the good name for them!

Wed Aug 22 11:38:16 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (before_script): Turned out that make -j is broken.

Wed Aug 22 11:23:35 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_setup_method): should not enable tail call
	  optimization for frames with VM_FRAME_FLAG_FINISH.
	  [ruby-dev:46065] [Bug #6901]

Wed Aug 22 11:20:47 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rubygems/test_case.rb: run test with psych if exist.

Thu Aug 16 12:09:51 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* nacl/pepper_main.c (init_loadpath): Pushes the correct load path on
	  other architectures than x86_64. Fixes #6873.

Wed Aug 15 19:37:33 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* configure.in (ac_cv_func_shutdown): shutdown(2) has a dummy
	  implementation but has no declaration and does not work in
	  NativeClient SDK pepper_20.

Wed Aug 15 19:29:29 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* common.mk (vm_backtrace.o): Added missing dependencies.

	* ext/nkf/depend (nkf.o): ditto.

	* ext/ripper/depend (ripper.o) ditto.

Wed Aug 22 07:27:00 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/cgi/util.rb (CGI.escapeHTML): use &#39;
	  [ruby-core:47221] [Bug #6861]

Tue Aug 21 21:59:22 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/observer.rb: fix typo. https://github.com/ruby/ruby/pull/162 by
	  unsymbol (Philip Cunningham).

Tue Aug 21 20:30:06 2012  Benoit Daloze  <eregontp@gmail.com>

	* test/fileutils/test_fileutils.rb (TestFileUtils#teardown):
	  do not assume cwd is TMPROOT and never remove current directory.
	  [ruby-core:47224][Bug #6884]

Tue Aug 21 17:29:56 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* addr2line.c (fill_lines): need check and cast of the file size of
	  target binary because there are some platforms which off_t > size_t.

Tue Aug 21 17:07:58 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (compiler): [experimental] clang support.

Tue Aug 21 15:44:27 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/lib/dl/func.rb (DL::Function#bind): fixes an error in
	  test/dl/test_import.rb (DL::TestImport#test_carried_function)
	  introduced by r36718.
	  the instance of the anonymous class which wraps the block should have
	  same methods and instance variables of self.

Tue Aug 21 14:29:22 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (scriptbin.mk): no need to include twice.

Tue Aug 21 10:52:08 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/unit/test.rb (Test::Unit::ProxyError): new exception class to
	  wrap exceptions raised in workers in parallel test mode.

	* test/unit/parallel.rb (Test::Unit::Worker#puke): use above wrapper
	  exception.
	  [Bug #6882] [ruby-dev:46054]

Tue Aug 21 10:40:06 2012  Koichi Sasada  <ko1@atdot.net>

	* test_continuation.rb (tracing_with_thread_set_trace_func):
	  fix to use Thread#set_trace_func(nil), not set_trace_func(nil).

Tue Aug 21 09:32:41 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 3.3.0 (r7676)
	* test/minitest/*: ditto

Tue Aug 21 09:05:32 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
	  which causes an error.

	* test/testunit/test_parallel.rb: follow above change.
	  see [Bug #6882]

Tue Aug 21 05:43:00 2012  James Edward Gray II  <james@graysoftinc.com>

	* lib/csv.rb: Fixes #161 on github
	* lib/csv.rb: You can now specify a pattern for :skip_lines.
	  Matching lines will not be passed to the CSV parser.
	* lib/csv.rb: Patch by Christian Schwartz.

Tue Aug 21 05:25:41 2012  Eric Hodel  <drbrain@segment7.net>

	* re.c (rb_reg_initialize_m): Forgot to update output for or'd-options
	  example.

Tue Aug 21 05:18:03 2012  Eric Hodel  <drbrain@segment7.net>

	* re.c (rb_reg_initialize_m): Update example to show that regexp
	  options use | an not || to avoid confusion.

Mon Aug 20 23:02:27 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y: more descriptive token names in syntax error messages.

Mon Aug 20 20:36:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): follow iclasses as klass in cfp
	  but not included modules.  [ruby-core:47241] [Bug #6891]

	* vm_insnhelper.c (vm_call_bmethod): pass defined_class to follow
	  proper ancestors.  [ruby-core:47241] [Bug #6891]

Mon Aug 20 11:40:27 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* common.mk: fix failed to make with -j2.
	  https://gist.github.com/3397935

Mon Aug 20 10:51:01 2012  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb, lib/test/unit/parallel.rb:
	  generate error message (String) in parallel.rb instead of
	  marshalling Exception. Fixes [Bug #6882] [ruby-dev:46054]

Sun Aug 19 01:24:32 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* enum.c: fix docs. https://github.com/ruby/ruby/pull/129 by
	  richardkmichael (Richard Michael).

Sun Aug 19 00:47:26 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/fileutils.rb: fix typo.
	  https://github.com/ruby/ruby/pull/155 by simonc (Simon COURTOIS).

Sat Aug 18 09:57:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/depend: fix inplace-build condition.  enc.mk is generated with
	  setting $srcdir to enc, but pwd is still top build directory.
	  [ruby-core:47236] [Bug #6888]

Fri Aug 17 23:28:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_any_to_s, rb_obj_inspect): preserve encodings of class
	  name and instance variable names.

Fri Aug 17 12:39:33 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
	  the callback method. (Fiddle already allows it.)
	  [Bug #6389] [ruby-dev:45604]

Thu Aug 16 19:54:24 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c, vm_core.h: simplify tracing mechanism.

	  (1) add rb_hook_list_t data structure which includes
	      hooks, events (flag) and `need_clean' flag.
	      If the last flag is true, then clean the hooks list.
	      In other words, deleted hooks are contained by `hooks'.
	      Cleanup process should run before traversing the list.
	  (2) Change check mechanism
	      See EXEC_EVENT_HOOK() in vm_core.h.
	  (3) Add `raw' hooks APIs
	      Normal hooks are guarded from exception by rb_protect().
	      However, this protection is overhead for too simple
	      functions which never cause exceptions.  `raw' hooks
	      are executed without protection and faster.
	      Now, we only provide registration APIs.  All `raw'
	      hooks are kicked under protection (same as normal hooks).

	* include/ruby/ruby.h: remove internal data definition and
	  macros.

	* internal.h (ruby_suppress_tracing), vm_trace.c: rename
	  ruby_suppress_tracing() to rb_suppress_tracing()
	  and remove unused function parameter.

	* parse.y: fix to use renamed rb_suppress_tracing().

	* thread.c (thread_create_core): no need to set RUBY_VM_VM.

	* vm.c (mark_event_hooks): move definition to vm_trace.c.

	* vm.c (ruby_vm_event_flags): add a global variable.
	  This global variable represents all of Threads and VM's
	  event masks (T1#events | T2#events | ... | VM#events).
	  You can check the possibility kick trace func or not
	  with ruby_vm_event_flags.
	  ruby_vm_event_flags is maintained by vm_trace.c.

	* cont.c (fiber_switch, rb_cont_call): restore tracing status.
	  [Feature #4347]

	* test/ruby/test_continuation.rb: ditto.

Thu Aug 16 19:15:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_class_initialize): forbid inheriting uninitialized
	  class.  another class tree not based on BasicObject cannot exist.
	  [ruby-core:47148][Bug #6863]

Thu Aug 16 11:52:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/-ext-/test_printf.rb (Test_SPrintf#test_{taint,untrust}): use
	  plain object so that the results of to_s and inspect are infected.
	  [ruby-dev:46053] [Bug #6881]

Thu Aug 16 09:46:07 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* strftime.c: remove unnecessary macros to check traditional C.
	  https://github.com/ruby/ruby/pull/46 by lateau (Daehyub Kim).

	* vsnprintf.c: remove K&R.

Wed Aug 15 20:47:49 2012  Benoit Daloze  <eregontp@gmail.com>

	* object.c (rb_obj_inspect): Kernel#inspect: do not call #to_s. A class
	  can now benefit from the nice default #inspect even if it defines #to_s.
	  Also, there is no more unexpected change in #inspect result.

	* NEWS: Add note about the change.

	* bignum.c, io.c, numeric.c, object.c, proc.c, vm.c (Init_*):
	  Adapt internal structures (by aliasing #inspect to #to_s) so they
	  don't rely on the removed behavior (#inspect calling overridden #to_s).

	* test/ruby/test_object.rb (test_inspect): add tests for Kernel#inspect.

	* lib/pp.rb (class PP): do not call #to_s anymore, as #inspect
	  no more does (mame).

	* test/test_pp.rb (class PPInspectTest): remove related assertion (mame).
	  [ruby-core:43238][Feature #6130]

	* test/drb/drbtest.rb (DRbCore#teardown, DRbAry#teardown):
	  adapt DRb tests with the new change (shirosaki).
	  [ruby-core:47182][Bug #6866]

Wed Aug 15 18:05:37 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#failed): need to delete the
	  status line if the status is skipped and -q is specified.

Wed Aug 15 16:26:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (ruby__sfvextra): the result should be infected by the
	  given strings.

	* sprintf.c (ruby__sfvwrite): set buffer length and exclude
	  uninitialized garbage to get correct coderange.

Wed Aug 15 16:20:09 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (ID_H_TARGET): make timestamp file of id.h so that the
	  header will not be remade repetitively.

Wed Aug 15 11:39:53 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: separate trace_func related functions from
	  thread.c.

	* thread.c: ditto.

	* common.mk: add vm_trace.o.

	* inits.c: call Init_vm_trace().

Tue Aug 14 16:25:46 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* test/erb/test_erb.rb (test_html_escape): add assertions for the
	  cases where the argument is not a String.

Tue Aug 14 16:03:31 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (check_valid_dir): reject "..." as directory name.
	  [Bug #6851]

Tue Aug 14 16:02:51 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_file_exhaustive.rb
	  (TestFileExhaustive#test_stat_dotted_prefix): added.

Tue Aug 14 15:39:09 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_file_exhaustive.rb
	  (TestFileExhaustive#test_stat_drive_root): added.

Tue Aug 14 10:38:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before
	  passing it to CGI.escapeHTML.

Mon Aug 13 13:13:19 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/erb.rb (ERB::Util.html_escape): use CGI.escapeHTML to escape
	  single quotes. [ruby-core:47138] [Bug #6861]

Sun Aug 12 11:57:20 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (invoke_block_from_c): fix unintentional block passing.
	  [ruby-dev:45071] [Bug #5832]

Fri Aug 10 08:41:28 2012  Eric Hodel  <drbrain@segment7.net>

	* gc.c (gc_malloc_allocated_size):  RDoc does not process macros, so
	  mention this method is only available when ruby is built with
	  CALC_EXACT_MALLOC_SIZE
	* gc.c (gc_malloc_allocations):  ditto

Thu Aug  9 23:46:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/mkrunnable.rb: see build_os instead of target arch for
	  cross-compiling.

	* configure.in (MINIRUBY): use real path for include path.

	* template/fake.rb.in (builddir): remove duplications

Thu Aug  9 20:03:11 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_file_exhaustive.rb
	  (TestFileExhaustive#test_stat_special_file): add a test.
	  GetFileAttributesExW fails to get attributes of special files
	  such as pagefile.sys.

	* win32/win32.c (check_valid_dir): for performance, check the path
	  by FindFirstFileW only if the path contains "..."

	* win32/win32.c (winnt_stat): use GetFileAttributesExW instead of
	  FindFirstFileW since GetFileAttributesExW is faster.
	  Based on the patch by Dusan D. Majkic.
	  [ruby-core:47083] [Feature #6845]

Thu Aug  9 18:33:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (proc_options): show version only once even if -v and
	  --version are given together.
	  http://twitter.com/d6rkaiz/status/233491797085671424

Thu Aug  9 12:37:22 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/openssl/test_config.rb (OpenSSL#test_constants): skip this
	  test if platform is Mac OS X or Windows. [Bug #6830]

Wed Aug  8 22:51:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_under): singletons other than special constants
	  don't need cref-scope hack.

Wed Aug  8 22:45:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (.y.h): split from .y.c rule to manage dependency on
	  parse.h.  [ruby-core:46741] [Bug #6789]

	* common.mk (id.h): keep old file unless changed.

Wed Aug  8 17:11:20 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (ADD_INSNL): make ADD_INSNL as alias of ADD_INSN1.

Wed Aug  8 17:08:14 2012  Koichi Sasada  <ko1@atdot.net>

	* bootstrap/test_exception.rb: fix a last committed test.

Wed Aug  8 16:27:58 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c, insns.def (checkmatch):
	  remove checkincludearray instruction and
	  add new instruction checkmatch.
	  This change is to solve
	  [Bug #4438] "rescue args type check omitted".

	* iseq.c: increment ISEQ_MAJOR_VERSION because removal of
	  checkincludearray instruction.

	* vm_core.h: add several definitions for
	  the checkmatch instruction.

	* vm_insnhelper.c (check_match): added.

	* bootstraptest/test_exception.rb: add a test.

	* test/ruby/test_exception.rb: ditto.

Wed Aug  8 05:51:20 2012  Eric Hodel  <drbrain@segment7.net>

	* proc.c (method_clone):  Added documentation.  Patch by Robin Dupret.
	  Fixes #152 on github.

Tue Aug  7 20:19:29 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns
	  back. Without this, on FreeBSD9 and readline 6.2 irb can't catch ^C.
	  [Bug #5423]

Tue Aug  7 20:12:39 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_exec.c, insns.def (leave): solve problems on
	  OPT_CALL_THREADED_CODE.
	  Catch up finish frame structure on OPT_CALL_THREADED_CODE.

	* vm_core.h: add rb_thread_t#retval for temporary space on
	  OPT_CALL_THREADED_CODE.

	* vm.c (th_init): clear rb_thread_t#retval as Qundef.

	* vm_dump.c (rb_vmdebug_debug_print_pre): fix debug print format.

Tue Aug  7 11:58:27 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_require.rb (TestRequire#test_require_twice): added.

Tue Aug  7 11:35:37 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoid
	  SEGV when a module-prepended class is refined.

Tue Aug  7 10:46:37 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_file_exhaustive.rb
	  (TestFileExhaustive#test_expand_path*): refactoring.  split the method
	  into some chunks of the same kind of tests.

Tue Aug  7 00:31:09 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_special_singleton_class_of): utility function.

	* vm_eval.c (eval_under): special deal for class variable scope with
	  instance_eval.

	* vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow method
	  definition in instance_eval of special constants.  [ruby-core:28324]
	  [Bug #2788]

Tue Aug  7 00:23:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (CVAR_LOOKUP): split into helper functions.

Mon Aug  6 19:15:11 2012  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale
	  to pass some assertion.  Thanks to Hiroshi Shirosaki.
	  [ruby-core:46873][Bug #6814]

Mon Aug  6 15:54:50 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* internal.h, class.c, eval.c, insns.def: find the appropriate
	  receiver for super called in instance_eval.  If such a receiver is
	  not found, raise NoMethodError. [ruby-dev:39772] [Bug #2402]

Mon Aug  6 14:54:38 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* include/ruby/ruby.h, eval.c, vm_insnhelper.c: fix typo.

Mon Aug  6 13:13:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (vm_call_super): since cfp->klass is always class or
	  iclass, no search from method entry.

	* insns.def (defined): now should use klass in the current control
	  frame to search superclass, not me->klass.  reported by naruse.

Mon Aug  6 11:19:19 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/etc/test_etc.rb (TestEtc#test_getpwuid): `s' is never set to nil.

Mon Aug  6 11:08:48 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/syslog/test_syslog_logger.rb: skip unless Syslog module is
	  available.

Mon Aug  6 00:40:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier.

Mon Aug  6 00:39:24 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (NUM2ULONG): optimize by inline as well as
	  NUM2LONG, and cast to unsigned long explicitly for the platforms
	  where SIZEOF_VALUE is larger than SIZEOF_LONG.

	* include/ruby/ruby.h (NUM2SSIZET): fix type to cast.

Sun Aug  5 21:10:36 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c : if ENABLE_VM_OBJSPACE is 1, rest_sweep is not defined.
	  remove unused declarations. [ruby-core:47004] [Bug #6837]

Sun Aug  5 19:31:57 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: just move functions and so on. I don't touch any internal
	  implementation.

Sun Aug  5 13:22:29 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: use gcc-4.2 prior to clang, gcc, and cc if exist for
	  the use of Snow Leopard's old clang. see also r36594, r36610, r36611.

Sun Aug  5 06:55:10 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_{core,strftime}.c: [ruby-core:46990].

Sat Aug  4 22:56:20 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: use inline functions instead of macros, and close up
	  related codes for the profiler.

Sat Aug  4 20:37:56 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (gc_mark_children): use gc_mark_ptr instead of marking
	  a object directly.

Sat Aug  4 10:02:03 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* test/ruby/test_alias.rb (test_super_in_aliased_module_method):
	  add a test case for [ruby-dev:46028], which fails in 1.8.

Sat Aug  4 01:56:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_search_normal_superclass): no longer needs
	  receiver, klass is always unique in the ancestors now.

Sat Aug  4 01:27:40 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* insns.def (invokesuper): reverted r36612 so that super in an
	  aliased method will not call the same method.

Fri Aug  3 19:26:10 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* insns.def (invokesuper): don't skip the same class.  instead, use
	  rb_method_entry_get_with_omod() to avoid infinite loop when
	  super is used with refinements. [ruby-core:30450] [Bug #3351]

Fri Aug  3 19:21:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: use clang prior to gcc only when self-compiling on
	  darwin.  search default compilers on other platforms.  [Bug #6816]

Fri Aug  3 17:25:49 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: move RUBY_MINGW32 after AC_PROG_CC.
	  RUBY_MINGW32 uses AC_TRY_CPP and it sets CC and CPP. [Bug #6816]

	* configure.in: don't use AC_PROG_CC in AS_CASE.

Fri Aug  3 17:21:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/runner.rb: get rid of loading previously installed gems.
	  [ruby-dev:46025]

Fri Aug  3 16:40:01 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (notifications): [experimental] IRC notifications.

Thu Aug  2 20:32:29 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_using): new method Module#using. [experimental]

	* eval.c (rb_mod_refine): new method Module#refine. [experimental]

	* eval.c (f_using): new method Kernel#using. [experimental]

Thu Aug  2 20:08:02 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* class.c, insns.def, method.h, proc.c, vm.c, vm_core.h, vm_eval.c,
	  vm_insnhelper.c, vm_insnhelper.h, vm_method.c: add klass to
	  rb_control_frame_t to implement super correctly.

Thu Aug  2 13:23:08 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (AC_PROG_CC): AC_PROG_CC tries clang at first on
	  darwin. [Bug #6816]

Thu Aug  2 11:39:25 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]

	* test/ruby/test_gc.rb: add test-case for this bug.

Thu Aug  2 10:51:12 2012  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/lib/openssl/digest.rb
	  test/openssl/test_digest.rb: Add Digest module function to OpenSSL
	  module and test it. Patch provided by Eric Hodel.
	  [ruby-core:46908][Feature #6819]

Wed Aug  1 22:29:12 2012  Benoit Daloze  <eregontp@gmail.com>

	* ext/digest/digest.c (hexencode_str_new): return an ASCII string

	* test/digest: tests for all kind of digests encodings
	  [ruby-core:46792][Bug #6799]

Wed Aug  1 05:50:53 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding):
	  Fix test_encoding failure on Windows.
	  With chcp 65001, 1252 and 437, test_encoding failed. Test result
	  depends on locale because LANG environment variable doesn't affect
	  locale on Windows.
	  [ruby-core:46872] [Bug #6813]

Wed Aug  1 00:33:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (include_class_new): fix duplication of prepended module.
	  since m_tbl of prepended module is always zero, copy from its
	  copy iclass of original.

Tue Jul 31 18:22:34 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (classname): tell if found name is permanent.  search
	  tmp_classpath only if class id is set.  [ruby-core:42865][Bug #6078]

	* variable.c (rb_class_path): duplicate found temporary path.

	* variable.c (rb_set_class_path_string, rb_set_class_path): set class
	  id to find classpath.

Tue Jul 31 10:36:12 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: updated to released version.

	* ext/psych/psych.gemspec: ditto

Tue Jul 31 06:18:06 2012  Eric Hodel  <drbrain@segment7.net>

	* time.c (time_sec):  Remove extra wording about leap seconds and refer
	  directly to Wikipedia's leap second page for further information.
	  [Bug #6749]

Mon Jul 30 23:01:47 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rubygems/platform.rb (Gem::Platform#initialize): Support pattern
	  like x86_64-netbsd6.99.7.

Mon Jul 30 21:00:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (find_class_path): no retry when preferred is given.

	* variable.c (classname): if classid is set try it to find full
	  qualified class path, and then try arbitrary class path.  try
	  tmp_classpath at last even if enclosing namespace is anonymous.
	  fix r36574.  [ruby-core:42865][Bug #6078]

	* variable.c (rb_set_class_path_string, rb_set_class_path): set
	  tmp_classpath instead of classpath if the name is not permanent.

Mon Jul 30 14:24:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c: store anonymous class path in tmp_classpath but not in
	  classpath.  [ruby-core:42865][Bug #6078]

Mon Jul 30 13:11:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (DLDFLAGS): on Darwin, deprecate -flat_namespace to get
	  rid of huge imported symbols table.

	* configure.in (LIBRUBY_RELATIVE): libruby_so is not made when
	  disable-shared, so no absolute path is used for it and executable
	  file is runnable anywhere.

Mon Jul 30 01:30:10 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* common.mk: add a dependency. [ruby-core:46741] [Bug #6789]

Sun Jul 29 15:44:47 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* thread.c (thread_create_core): hide th->async_errinfo_mask_stack from
	  ObjectSpace.each_object. refix of r36539.

Sun Jul 29 23:57:27 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
	  inet_ntop directly, which is unavailable on older version Windows.

	* win32/win32.c (rb_w32_inet_ntop): type should be const.

Sun Jul 29 14:20:34 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* thread.c (Init_Thread): does not need to set klass
	  explicitly.

Sun Jul 29 06:21:04 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* win32/win32.c: suppress warning redeclared on mingw64.
	  *_s functions are declared if MINGW_HAS_SECURE_API is defined.
	  Follow up r36556.

Sun Jul 29 00:28:46 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: remove unused initialization.

Sat Jul 28 16:26:09 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* win32/win32.c (gmtime_r): use _gmtime64_s() with x86_64-w64-mingw32.

	* win32/win32.c (localtime_r): use _localtime64_s() with
	  x86_64-w64-mingw32. Since FileTimeToSystemTime() seems not work with
	  large value under x64. Mingw-w64 doesn't have these declaration.
	  [ruby-core:46780] [Bug #6794]

Fri Jul 27 18:25:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_check_io): make public.

	* process.c (check_exec_redirect): try conversion to IO on redirect
	  parameters.  [ruby-core:44181] [Bug #6269]

Fri Jul 27 17:58:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_CPPOUTFILE): get rid of variable conflict so
	  CPPFLAGS is not duplicated.  [ruby-core:43097] [Bug #6119]

Fri Jul 27 12:12:36 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/mkexports.rb: should not export DllMain().
	  reported by luis at [ruby-core:46743] [Bug #6790], solved by
	  Heesob Park, and confirmed by nobu.

Thu Jul 26 14:51:29 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/net/http/test_https.rb (TestNetHTTPS#test_session_reuse):
	  localhost is not (always) 127.0.0.1.  Don't expect that.

Thu Jul 26 07:18:38 2012    <kanemoto@ruby-lang.org>

	* ext/json/fbuffer/fbuffer.h: avoid compilation error on AIX by
	   -ansi -std=iso9899:199409 (r36038). [ruby-core:46744] [Bug #6791].

Thu Jul 26 00:42:23 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* thread.c (thread_create_core, Init_Thread): hide
	  th->async_errinfo_queue and th->async_errinfo_mask_stack from
	  ObjectSpace.each_object.

Wed Jul 25 17:41:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* complex.c, rational.c: compatible marshal loader for compatibilities
	  with 1.8.  [ruby-core:45775] [Bug #6625]

Wed Jul 25 17:17:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* atomic.h: prefer GCC atomic builtins than Windows APIs, if possible,
	  since they are generic.

Wed Jul 25 11:16:57 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/.document:  Removed.  All files in net/ should be included in
	  RDoc.

Wed Jul 25 10:00:23 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/testunit/test_redefinition.rb: broken class/method names.

Wed Jul 25 09:26:32 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/cgi/html.rb: Use << instead of +=.
	  `a += b` is syntax sugar of `a = a + b`; it creates a new string
	  object. `a << b` is concatenation and doesn't create new object.

Wed Jul 25 09:16:26 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/cgi/html.rb (element_init): suppress redefine warning.
	  Don't define methods if they are already defined.

Wed Jul 25 09:05:38 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Added SSL session reuse across connections for a
	  single instance to speed up connection.  [Feature #5341]
	* NEWS:  ditto
	* test/net/http/test_https.rb:  Tests for #5341

Wed Jul 25 06:54:24 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/re.rdoc:  Fix spelling

Wed Jul 25 06:49:12 2012  Eric Hodel  <drbrain@segment7.net>

	* re.c (rb_reg_s_last_match):  Update $~ to reference Regexp
	  documentation about "special global variables".  [Bug #6723]

Wed Jul 25 06:28:56 2012  Eric Hodel  <drbrain@segment7.net>

	* iseq.c:  Added documentation.  Patch by David Albert.  [Bug #6785]

Wed Jul 25 03:05:06 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* parse.y: added symbols and qsymbols productions for %i and %I
	  support. %i{ .. } returns a list of symbols without interpolation,
	  %I{ .. } returns a list of symbols with interpolation.  Thanks to
	  Josh Susser for inspiration of this feature. [Feature #4985]

	* ext/ripper/eventids2.c: added ripper events for %i and %I.

	* test/ripper/test_parser_events.rb: ripper tests

	* test/ripper/test_scanner_events.rb: ditto

	* test/ruby/test_array.rb: test for %i and %I behavior

Tue Jul 24 23:34:43 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* include/ruby/win32.h (rb_w32_pow): add new function.
	  We use powl() instead of broken pow() for x64-mingw32. This workaround
	  fixes test failures related to floating point numeric.
	  [ruby-core:46686] [Bug #6784]

Tue Jul 24 15:01:24 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_socket, rb_w32_socketpair): remember the family
	  in the high word of socklist value.

	* win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, setfl): follow
	  above changes.

	* win32/win32.c (rb_w32_getsockname): set remembered family to the
	  argument when OS's function fails.

Tue Jul 24 12:35:13 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_dir_m17n.rb: remove a garbage.

	* test/ruby/test_dir_m17n.rb: convert from ascii-8bit to other encoding
	  with 8bit bytes always fails.

Tue Jul 24 12:32:18 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_dir_m17n.rb: sorry, typo.

Tue Jul 24 12:13:26 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_dir_m17n.rb: refactoring. RE should be in the left side
	  of the =~ operator, and compare the result with nil is meaningless.

Tue Jul 24 11:35:20 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_pack.rb (test_pack_unpack_M): was redefined
	  accidentally.

Tue Jul 24 09:31:18 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Updated to RubyGems 1.8.24, a bugfix release.

Tue Jul 24 08:30:15 2012  Luis Lavena  <luislavena@gmail.com>

	* test/ruby/test_dir_m17n.rb (create_and_check_raw_file_name): add new
	  helper method to ease encoding testing. Patch by Oleg Sukhodolsky.
	  [ruby-core:46589][Bug #6765]

	* test/ruby/test_dir_m17n.rb (test_filename_extutf8): use filesystem
	  encoding when reading entries and comparing.

	* test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_name): removed.

	* test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_jp_name): split test.

Tue Jul 24 08:09:30 2012  Luis Lavena  <luislavena@gmail.com>

	* test/win32ole/test_win32ole_method.rb (is_ruby64?): Correct platform
	  used to identify mingw-w64 (x64-mingw32). Patch by Hiroshi Shirosaki.
	  [ruby-core:46651][Bug #6782]

Tue Jul 24 07:22:58 2012  Eric Hodel  <drbrain@segment7.net>

	* time.c (time_sec):  Updated description of leap seconds for accuracy.
	  Based on patch by Marcus Stollsteimer.  [Bug #6749]

Tue Jul 24 07:03:11 2012  Eric Hodel  <drbrain@segment7.net>

	* string.c (rb_str_sub):  Fixed wording of documentation to match the
	  replacement operation.  Minor cleanup of markup.  [Bug #6719]
	* string.c (rb_str_sub_bang):  Minor wording change for clarity, minor
	  cleanup of markup.

Mon Jul 23 23:58:40 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/Makefile.in (TARGET_NAME, TARGET_ENTRY): needed for EXTDLDFLAGS
	  on some platforms.  [ruby-core:46600] [Bug #6768]

	* enc/depend: no longer needs tweaking DLDFLAGS for TARGET names.

Mon Jul 23 22:48:19 2012  Tanaka Akira  <akr@fsij.org>

	* lib/open-uri.rb: use respond_to? to test Tempfile.
	  [ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA).

Mon Jul 23 14:43:34 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LIBPATHENV): LIBPATH is used on AIX, but not
	  SHLIB_PATH which was carelessly copied from HP/UX.  suggested by
	  Perry Smith at [ruby-core:46397].  [Bug #6728]

Mon Jul 23 01:55:08 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/uri/test_generic.rb (URI#test_find_proxy): add tests with
	  empty *_proxy env variables.

Mon Jul 23 01:47:26 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/uri/test_generic.rb (URI#with_env): unset proxy related env
	  variables.  [Bug #6774]

	* test/uri/test_generic.rb (URI#test_find_proxy): fix failures
	  when proxy related env variables already set.  [Bug #6774]

Sun Jul 22 23:58:48 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread.c (rb_threadptr_execute_interrupts_common): increase
	  running_time_us on THREAD_TO_KILL like on THREAD_RUNNABLE.
	  This cause not to switch from a thread which is to be killed
	  on FreeBSD and Mac OS X. see also the test.
	  This issue maybe exist for long time but happens after r36430.

Sat Jul 21 06:21:45 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb: fixes for r36476. [Feature #6546]
	 http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120720T030101Z.diff.html.gz

	* lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.

	* lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is
	  not given.

	* lib/net/http.rb (Net::HTTP#initialize): ditto.

	* lib/net/http.rb (Net::HTTP#proxy?): return true or false.

	* lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil.

	* lib/net/http.rb (Net::HTTP#proxy_port): ditto.

Sat Jul 21 23:12:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (ruby_init_stack): STACK_GROW_DIR_DETECTION is
	  necessary on platforms with unknown stack direction.  [Bug #6761]

Sat Jul 21 15:13:42 2012  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit/testcase.rb (method_added): refactoring.

Sat Jul 21 14:06:41 2012  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit/testcase.rb: warn when test_* method is redefined.
	  Patch by mame (Yusuke Endoh). [Feature #2643] [ruby-core:27790]

	* test/testunit/test_redefinition.rb: Test for above.

	* test/testunit/test4test_redefinition.rb: Ditto.

Sat Jul 21 08:41:14 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/logger.rb:  Updated example in Logger comment to match other
	  examples and fixed a bug.  Patch by Marcus Stollsteimer.
	  [Bug #6759]

Fri Jul 20 17:20:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rb_random_real): refine error message.

Fri Jul 20 11:03:17 2012  Eric Hodel  <drbrain@segment7.net>

	* NEWS:  Updated net/http for automatic proxy detection (#6546) and
	  automatic gzip and deflate compression (#6492, #6494).

Fri Jul 20 10:55:38 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Net::HTTP now automatically detects and uses
	  proxies from the environment.  A proxy may also be specified as
	  before.

	  Net::HTTP::Proxy still creates anonymous classes, but these classes
	  are only used to store configuration information.  When an HTTP
	  instance is created the configuration is now copied.

	  Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP

	  [Feature #6546]
	* lib/open-uri.rb:  Moved URI::Generic#find_proxy to uri/generic.
	* lib/uri/generic.rb:  Imported find_proxy from open-uri.
	* test/open-uri/test_open-uri.rb:  Moved proxy-discovery tests to URI.
	* test/uri/test_generic.rb:  Imported proxy-discovery tests from
	  open-uri.
	* test/net/http/test_http.rb:  Added tests for proxy behavior.

Fri Jul 20 09:34:11 2012  Eric Hodel  <drbrain@segment7.net>

	* test/socket/test_socket.rb:  Ignore IPv6 unique local addresses on OS
	  X (iCloud Back to my Mac addresses) for test_udp_socket since they do
	  not act as loopback addresses.  [Bug #6692]

Fri Jul 20 09:32:14 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/socket/raddrinfo.c (addrinfo_ipv6_unique_local_p):  Added
	  Addrinfo#ipv6_unique_local? to detect RFC 4193 unique local
	  addresses.  Part of #6692
	* ext/socket/rubysocket.h:  Add IN6_IS_ADDR_UNIQUE_LOCAL macro if
	  missing.
	* test/socket/test_addrinfo.rb:  Test for ipv6_unique_local?

Fri Jul 20 07:40:32 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http/response.rb:  Automatically inflate gzip and
	  deflate-encoded response bodies.  [Feature #6942]
	* lib/net/http/generic_request.rb:  Automatically accept gzip and
	  deflate content-encoding for requests.  [Feature #6494]
	* lib/net/http/request.rb:  Updated documentation for #6494.
	* lib/net/http.rb:  Updated documentation for #6492 and #6494, removed
	  Content-Encoding handling now present in Net::HTTPResponse.
	* test/net/http/test_httpresponse.rb:  Tests for #6492
	* test/net/http/test_http_request.rb:  Tests for #6494
	* test/open-uri/test_open-uri.rb (test_content_encoding):  Updated test
	  for automatic content-encoding handling.

Fri Jul 20 03:42:54 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c: use #ifdef, not #if.

Thu Jul 19 15:08:40 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_thread_s_control_interrupt,
	            rb_thread_s_check_interrupt): added for
	  Thread.control_interrupt and Thread.check_interrupt.
	  See details on rdoc.
	  I'll make an ticket for this feature.

	* test/ruby/test_thread.rb: add a test for Thread.control_interrupt.

	* thread.c (rb_threadptr_raise): make a new exception object
	  even if argc is 0.

	* thread.c (rb_thread_kill): kill thread immediately if target thread
	  is current thread.

	* vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): added.
	  CHECK_INTS while/after blocking operation.

	* vm_core.h (RUBY_VM_CHECK_INTS): require rb_thread_t ptr.

	* cont.c (fiber_switch): use replaced RUBY_VM_CHECK_INTS().

	* eval.c (ruby_cleanup): ditto.

	* insns.def: ditto.

	* process.c (rb_waitpid): ditto.

	* vm_eval.c (vm_call0): ditto.

	* vm_insnhelper.c (vm_call_method): ditto.

Thu Jul 19 22:46:48 2012  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_io.rb: remove temporally files early.

Thu Jul 19 15:38:35 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* variable.c (rb_mod_class_variables): return inherited variables
	  except when the optional argument is set to false.
	  [ruby-dev:44034] [Bug #4971]

	* variable.c (rb_mod_constants): fix typo in documentation.

Thu Jul 19 14:30:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h: move mark function declarations that should be private.

Thu Jul 19 14:18:22 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/init.c (rsock_init_sock): need to update max fd on all
	  platforms.

Thu Jul 19 14:15:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_gc_mark_threads): remove deprecated function.

Thu Jul 19 13:28:03 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
	  re-enable the tests because now it's OK on windows.

Thu Jul 19 13:26:25 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/extconf.rb: now enable IPv6 by default on mswin.

Thu Jul 19 09:33:46 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/emitter.c (initialize): allow a configuration object to be
	  passed to the constructor so that mutation isn't required after
	  instantiation.

	* ext/psych/lib/psych/handler.rb: add configuration object

	* ext/psych/lib/psych/visitors/emitter.rb: use configuration object if
	  extra configuration is present.

Thu Jul 19 08:20:25 2012  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_file.rb: remove temporally files early.

Thu Jul 19 07:37:41 2012  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/drb/drbtest.rb: fixed: can't delete unix domain sockets problem.

Thu Jul 19 03:41:20 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* bignum.c: Added #include <strings.h> for ffs(). Patch by Perry
	  Smith. Thank you. [Bug #6748]

Thu Jul 19 01:56:02 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/intern.h (rb_num_zerodiv): Added NORETURN.
	  Patched by Xi Wang. [Bug #6736]

Wed Jul 18 23:57:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (pack_pack): round down too long uuencode width.  folding
	  width in uuencode format cannot be longer than 63 bytes.

Wed Jul 18 23:04:18 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/dbm/dbm.c (fdbm_empty_p): fix wrong condition introduced in r36438.

	* ext/sdbm/init.c (fsdbm_empty_p): ditto.

Wed Jul 18 23:08:57 2012  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_beginendblock.rb: remove temporally files early.

Wed Jul 18 22:43:02 2012  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_autoload.rb: remove temporally files early.

Wed Jul 18 21:59:46 2012  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_argf.rb: use temporally directory.

Wed Jul 18 19:41:19 2012  Tanaka Akira  <akr@fsij.org>

	* test/openssl/test_config.rb: remove temporally files early.

Wed Jul 18 17:45:26 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_builtin_type_name): map by index.

Wed Jul 18 16:17:40 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_framework): get rid of separating -framework
	  option and its argument and dealing with the argument as a library
	  or an object name.  if $LDFLAGS were an array...

Wed Jul 18 16:09:10 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/curses/extconf.rb: support PDCurses.  patched by Luis Lavena.
	  [ruby-core:46485] [Feature #6735]

Wed Jul 18 15:50:25 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* parse.y (primary): allow an empty grouped expression as the
	  operand of the not operator (e.g., not ()).
	  [ruby-core:45976] [Bug #6674]

	* parse.y (parser_yylex): show no warning for a grouped expression
	  as the operand of the not operator (e.g., not (a)) or as an
	  argument of a method call without parentheses (e.g., foo (a)).
	  [ruby-core:39050] [Bug #5214]

Wed Jul 18 15:33:21 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_thread_call_without_gvl2): added.
	  it can skip last CHECK_INTS.  See document for more details.
	  Document about it was updated a bit.

	* include/ruby/thread.h (decl. of rb_thread_call_without_gvl2): added.

	* thread.c (rb_thread_call_with_gvl): remove "EXPERIMENTAL!"
	  warning from a document.

Wed Jul 18 14:53:21 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (EXTDLDFLAGS): split options for each extension
	  libraries, and unused in ruby.pc.  [Bug #6734]

	* lib/mkmf.rb (MakeMakefile#configuration): add EXTDLDFLAGS.

Wed Jul 18 14:47:23 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c: fix last commit miss.

Wed Jul 18 14:16:51 2012  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_threadptr_async_errinfo_*): manage async errors queue.
	  Async events such as an exception throwed by Thread#raise,
	  Thread#kill and thread termination (after main thread termination)
	  will be queued to th->async_errinfo_queue.
	  - clear: clear the queue.
	  - enque: enque err object into queue.
	  - deque: deque err object from queue.
	  - active_p: return 1 if the queue should be checked.
	  rb_thread_t#thrown_errinfo was removed.

	* vm_core.h: add declarations of rb_threadptr_async_errinfo_*.
	  remove rb_thread_t#thrown_errinfo field and
	  add rb_thread_t#async_errinfo_queue (queue body: Array),
	      rb_thread_t#async_errinfo_queue_checked (flag),
	      rb_thread_t#async_errinfo_mask_stack(Array, not used yet).

	* vm.c (rb_thread_mark): fix a mark function.

	* cont.c (rb_fiber_start): enque an error.

	* process.c (after_fork): clear async errinfo queue.

Wed Jul 18 14:25:55 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* pack.c: (ditto) bitwise operations are not char.  Apply explicit
	  casts on them.

Wed Jul 18 12:59:50 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* encoding.c (load_encoding): explicit cast  to suppress  warning.
	  Though the  cast truncates some bits, from  heuristic analysis I
	  believe it is OK to do so here.

	* bignum.c (rb_cstr_to_inum): ditto.

Wed Jul 18 12:55:54 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/benchmark.rb: Fix Benchmark.benchmark output with an empty
	  caption.  patched by Benoit Daloze. [ruby-core:45719] [Bug #6610]

Wed Jul 18 10:00:54 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/debug.rb:  Added toplevel documentation.  Based on patch by Oscar
	  Del Ben.  [Bug #6743], fixes #146 on github.

Wed Jul 18 09:33:59 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_win32ole_event.rb (TestWIN32OLE_EVENT): use
	  standard skip method to skip tests.

Wed Jul 18 09:26:45 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/logger.rb:  Updated typos and output to match modern Logger
	  output.  Patch by Marcus Stollsteimer.  [Bug #6738]

Wed Jul 18 07:59:29 2012  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add &apos; for HTML5
	  escaping.
	  [Feature #6620]

Tue Jul 17 22:17:13 2012  Tanaka Akira  <akr@fsij.org>

	* lib/open-uri.rb: call io.close! for Tempfile.

Tue Jul 17 16:41:32 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* proc.c (rb_proc_arity): return normal value (not -n-1) if it is not
	  a labmda, or it is a labmda and no arg_opts. [Bug #5694]

Tue Jul 17 03:56:34 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: strings with YAML anchors
	  are properly referenced. Patched by Joe Rafaniello via Github:
	    https://github.com/tenderlove/psych/pull/69
	* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
	* test/psych/test_alias_and_anchor.rb: test for change

Mon Jul 16 23:20:24 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_float_cmp): use FIXNUM_MIN and FIXNUM_MAX,
	  instead of LONG_MIN and LONG_MAX.

Mon Jul 16 22:50:41 2012  Tanaka Akira  <akr@fsij.org>

	* numeric.c (flo_to_s): use the exponential form if the integer part
	  is longer than or equal DBL_DIG.
	  [ruby-dev:45960] [ruby-trunk - Bug #6741]

Mon Jul 16 22:01:00 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/readline/readline.c: fixed docs. [Bug #6740][ruby-core:46501]
	  patched by Nobuhiro IMAI.

Mon Jul 16 19:24:01 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_float_eq): new function.
	  (rb_big_eq): use rb_integer_float_eq.

	* internal.h (rb_integer_float_eq): declared.

	* numeric.c (flo_eq): use rb_integer_float_eq.
	  (fix_equal): ditto.

Mon Jul 16 19:02:31 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_float_cmp): rename a local variable.

Mon Jul 16 18:40:26 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_float_cmp): renamed from rb_big_float_cmp.

	* internal.h: follow the above change.

	* numeric.c: ditto.

Mon Jul 16 17:57:54 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_float_cmp): compare an integer and float precisely.
	  [ruby-core:31376] [Bug #3589] reported by Tomasz Wegrzanowski.

Mon Jul 16 17:29:45 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_float_cmp): support fixnum for argument x.

	* numeric.c (fix_equal): use rb_big_float_cmp.
	  (fix_cmp): ditto.
	  (fix_gt): ditto.
	  (fix_ge): ditto.
	  (fix_lt): ditto.
	  (fix_le): ditto.
	  (flo_eq): ditto.
	  (flo_cmp): use rb_big_float_cmp for fixnum argument.
	  (flo_gt): ditto.
	  (flo_ge): ditto.
	  (flo_lt): ditto.
	  (flo_le): ditto.

Mon Jul 16 17:05:53 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/fileutils/test_fileutils.rb: add test for FileUtils#uptodate?

Mon Jul 16 16:56:12 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/fileutils.rb (FileUtils.uptodate?): remove useless parameter.
	  patched by Oscar Del Ben.[Bug #6708][ruby-core:46256]

Mon Jul 16 15:37:56 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_eq): use rb_big_float_cmp.

Mon Jul 16 15:00:45 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_big_float_cmp): declared.

	* bignum.c (rb_big_float_cmp): extracted from rb_big_cmp and big_op.
	  (rb_big_cmp): use rb_big_float_cmp.
	  (big_op): ditto.

	* numeric.c (flo_cmp): use rb_big_float_cmp.
	  (flo_gt): ditto.
	  (flo_ge): ditto.
	  (flo_lt): ditto.
	  (flo_le): ditto.

Mon Jul 16 14:14:21 2012  Tanaka Akira  <akr@fsij.org>

	* bignum.c (enum big_op_t): new type.
	  (big_op): use enum big_op_t.
	  (big_gt): ditto.
	  (big_ge): ditto.
	  (big_lt): ditto.
	  (big_le): ditto.

Sat Jul 14 18:18:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_get_values_at): fill with nil out of range.
	  [ruby-core:43678] [Bug #6203]

Sat Jul 14 17:17:55 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* cont.c (cont_restore_0): improve docs. [Bug #6706][ruby-core:46243]
	  patched by Oscar Del Ben via https://github.com/ruby/ruby/pull/140

Sat Jul 14 17:08:13 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_s_create): raise an exception, when input elements
	  are not one or two elements arrays.  [ruby-core:39945] [Bug #5406]

Sat Jul 14 16:16:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): use
	  Array#uniq!.

	* lib/test/unit.rb (Test::Unit::Runner#deal): deal tasks to workers.

	* lib/test/unit.rb (Test::Unit::Runner#quit_workers): close and kill
	  all workers.

	* lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead
	  worker from working set.

	* lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker
	  to working set.

	* lib/test/unit.rb (Test::Unit::Runner#launch_worker): extract.

	* lib/test/unit.rb (Test::Unit::Runner#start_watchdog): extract.

	* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move
	  initializations with nothing to release outside begin/ensure.

Sat Jul 14 16:04:24 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_join): should not infected by separator if it is not
	  used.  [ruby-core:42161][Bug #5902]

Sat Jul 14 02:31:55 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/intern.h (rb_thread_blocking_region): fix declarations
	  prototypes without arguments in C++ have different meanings than C.

Thu Jul 12 12:32:26 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/runner.rb: skip default gems to get rid of loading old versions
	  before installation.

Thu Jul 12 11:44:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_new_frozen): since the result object should have
	  same tainted/untrusted bits with the original object, return new
	  object if the shared object unmatch.  [ruby-core:39745][Bug #5374]

Thu Jul 12 10:46:39 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
	  cannot cross between network interfaces on Windows, so skip this test
	  until we find better test.

Thu Jul 12 08:48:33 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 3.2.0 (r7598)
	* test/minitest/*: ditto

Thu Jul 12 05:11:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (defined): use method entry and id in cfp for proper
	  superclass, since klass in iseq is shared by dynamically defined
	  methods from the same block.  [ruby-core:45831][Bug #6644]

Thu Jul 12 01:49:07 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP#connect): use local_host and local_port
	  if specified. patched by Ricardo Amorim [Feature #6617]

Wed Jul 11 17:36:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: append ENCOBJS to DLDOBJS but not EXTSOLIBS which is
	  not a target, to compile enc/encinit.c.

Wed Jul 11 12:38:20 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): nonstatic initializer
	  of an aggregate type is a C99ism.

	* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): get rid of VC++
	  warnings.

Mon Jul  9 16:11:30 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* vm_eval.c (rb_eval_string_from_file,
	  rb_eval_string_from_file_protect): new functions to replace
	  rb_compile_main_from_string() and ruby_eval_main().

	* nacl/pepper_ruby.c: Follows the change in vm_eval.c

Mon Jul  9 14:05:42 2012  Yuki Yugui Sonoda  <yugui@google.com>

	Reverts a half of r36079. As we discussed on ruby-dev@ and IRC,
	we do not need to disclose intermediate representation of program.
	The program embedding CRuby should use rb_eval_string family.
	* include/ruby/ruby.h (ruby_opaque_t): removed.
	  (ruby_compile_main_from_file, ruby_compile_main_from_string,
	   ruby_eval_main): removed.

	* eval.c (ruby_eval_main_internal): became ruby_exec_internal() again.
	  (ruby_eval_main): removed.

	* ruby.c (PREPARE_PARSE_MAIN) reverted.
	  (parse_and_compile_main, ruby_compile_main_from_file,
	   ruby_compile_main_from_string): removed

Wed Jul 11 10:16:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby.h (HAVE_RUBY_THREAD_H): to show ruby/thread.h to be
	  available.  fixup of r36355.

Wed Jul 11 03:26:47 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c:  Added streaming support to inflate processing.
	  This allows zlib streams to be processed without huge memory growth.
	  [Feature #6612]
	* NEWS:  ditto
	* ext/zlib/zlib.c (zstream_expand_buffer):  Uses rb_yield when a block
	  is given for streaming support.  Refactored to use
	  zstream_expand_buffer_into to remove duplicate code.
	* ext/zlib/zlib.c (zstream_expand_buffer_protect):  Added wrapper
	  function to pass jump state back through GVL-free section to allow
	  zstream clean-up before terminating the ruby call.
	* ext/zlib/zlib.c (zstream_expand_buffer_without_gvl):  Acquire GVL to
	  yield processed chunk of output stream.
	* ext/zlib/zlib.c (zstream_detach_buffer):  When a block is given,
	  returns Qnil mid-stream and yields the output buffer at the end of
	  the stream.
	* test/zlib/test_zlib.rb:  Updated tests

Tue Jul 10 22:57:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/thread.h: new header file for thread stuff.

	* thread.c (rb_thread_call_without_gvl): export.  [Feature#4328]
	  returns void* instead of VALUE.  [Feature #5543]

	* thread.c (rb_thread_blocking_region): deprecate.  [ruby-core:46295]

Tue Jul 10 10:48:59 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/win32.h (NT, NtInitialize): removed unused old macros.

Tue Jul 10 10:43:37 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* configure.in: removed --enable/disable-win95 options. (see r36342)

Tue Jul 10 00:44:41 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/ruby.h: Removed RUBY_GLOBAL_SETUP completely. It is
	  no meaning definition since r24894.
	* main.c: ditto.
	* nacl/pepper_main.c: ditto.

Mon Jul  9 23:59:36 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* dln.c: Simplify and make consistent an ifdef for Mac OS X.
	* ext/socket/rubysocket.h: ditto.
	* ext/tk/stubs.c: ditto.
	* io.c: ditto.
	* process.c: ditto.
	* signal.c: ditto.
	* vm_dump.c: ditto.

Mon Jul  9 17:37:35 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (win95_stat): removed unnecessary macro.

Mon Jul  9 17:22:16 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/configure.bat, win32/setup.mak, win32/Makefile.sub: omitted
	  Win9x support.  removed --enable/disable-win95 options.

	* include/ruby/win32.h, file.c, win32/win32.c: ditto.

	* win32/README.win32: ditto.

Mon Jul  9 13:28:34 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
	  instead of TARGET which may contain non-identifier characters.

	* lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
	  part consists of only word characters.  [ruby-core:46248][Bug #6709]

Sun Jul  8 07:36:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (shadowing_lvar_gen, warn_unused_var): no warnings for
	  variables starting with _.  [ruby-core:46160][Feature #6693]

Sat Jul  7 23:07:30 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/csv/test_features.rb: add require for Tempfile.
	* test/csv/test_serialization.rb: ditto.

Fri Jul  6 06:49:50 2012  Eric Hodel  <drbrain@segment7.net>

	* array.c (rb_ary_aref):  Added a description of the behavior of
	  index positioning.  [Bug #6680]
	* array.c (rb_ary_aset):  ditto.  Reordered sentences for clarity.
	* string.c (rb_str_aref_m):  Added a description of the behavior of
	  index positioning

Fri Jul  6 05:38:44 2012  Eric Hodel  <drbrain@segment7.net>

	* string.c (rb_str_bytesize):  Improve documentation.  Patch by Oscar
	  Del Ben from github issue #138.
	* string.c (rb_str_empty):  ditto.
	* string.c (rb_str_times):  ditto.
	* string.c (rb_str_dump):  ditto.
	* string.c (rb_str_center):  ditto.

Fri Jul  6 04:05:59 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (zstream_expand_buffer_without_gvl):  Use
	  ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE.

Thu Jul  5 17:32:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h: move ThreadShield declarations from intern.h.

Thu Jul  5 16:00:24 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (ThreadShield): rename from Barrier.

Thu Jul  5 15:14:50 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bootstraptest/runner.rb (show_progress): refine error output. do not
	  count non-empty error message, but just warn.

	* bootstraptest/runner.rb (error): show errors immediately if tty.

Thu Jul  5 12:28:11 2012  Akinori MUSHA  <knu@iDaemons.org>

	* test/net/http/test_httpresponses.rb: Add a test file for
	  Net::HTTPResponses and put a test case for the previous bug.

Thu Jul  5 06:33:52 2012  Mark Dodwell <mark@mkdynamic.co.uk>

	* lib/net/http/responses.rb: Fix 4xx classes to inherit correctly
	  from Net::HTTPClientError. [Bug #6700]

Wed Jul  4 21:55:35 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ruby.c (proc_options): warn only if -K and -w option is specified.
	  see also r36274 [Feature #5206]

Wed Jul  4 21:41:44 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* gc.c, atomic.h (ATOMIC_SIZE_*): moved from gc.c to atomic.h
	  [ruby-dev:45909]

Wed Jul  4 19:13:15 2012  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* test/win32ole/test_win32ole.rb (test_s_codepage_changed):
	  FileSystemObject only supports ANSI or UTF-16LE encoding.
	  Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650]

Wed Jul  4 11:52:12 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* gc.c (ATOMIC_SIZE_*): 64bit Windows support.

Wed Jul  4 11:11:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_frame_callee, rb_f_callee_name): fix to return the
	  called id.  this longstanding bug has been caused and blocked by
	  the structure of old rb_control_frame_t and rb_iseq_t.

	* vm_insnhelper.c (vm_push_frame): set proper method entry.

Wed Jul  4 08:29:31 2012  Eric Hodel  <drbrain@segment7.net>

	* array.c (rb_ary_aref):  Updated documentation to indicate the
	  starting index is an index into the array or string.  Updated
	  examples to show behavior of indexes at the end of an array or
	  string.  Based on patch by Marcus Stollsteimer.  [Bug #6680]
	* array.c (rb_ary_aset):  ditto.
	* string.c (rb_str_aref):  ditto.  Also added descriptive argument
	  names to call-seq section.

Wed Jul  4 07:05:59 2012  Eric Hodel  <drbrain@segment7.net>

	* test/zlib/test_zlib.rb (test_inflate_partial_input):  Added test for
	  inflating incomplete zlib streams.

Tue Jul  3 23:14:16 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* gc.c (ATOMIC_SIZE_EXCHANGE): fix function name on Solaris [Bug #6689]
	  [ruby-dev:45904]

Tue Jul  3 16:07:49 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (vm_malloc_fixup, vm_xrealloc, vm_xfree, after_gc_sweep): use
	  atomic operations to update malloc_params.

Tue Jul  3 14:50:16 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (zstream_run_func):  Don't exit run loop for buffer
	  error.  [Feature #6615]
	* ext/zlib/zlib.c:  Fix style to match existing functions.

Tue Jul  3 12:05:51 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8
	  for x64.  [ruby-dev:45875] [Bug #6676]
	  reported by aves_ramphastos (Seigo Ishigane)

Tue Jul  3 11:56:46 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (zstream_detach_buffer):  Refactored tainting of
	  output string, moving it from the callee to zstream_detach_buffer.
	* ext/zlib/zlib.c (rb_zstream_finish):  ditto
	* ext/zlib/zlib.c (rb_zstream_flush_next_out):  ditto
	* ext/zlib/zlib.c (rb_deflate_deflate):  ditto
	* ext/zlib/zlib.c (rb_deflate_flush):  ditto
	* ext/zlib/zlib.c (rb_inflate_inflate):  ditto

Tue Jul  3 11:16:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (runnable): make symbolic links to run in build directory.

Tue Jul  3 10:46:06 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ruby.c (proc_options): warn if -K option is specified. [Feature #5206]

Tue Jul  3 06:12:13 2012  Eric Hodel  <drbrain@segment7.net>

	* object.c (Init_Object):  Added RDoc location pointers for
	  Kernel#methods, Kernel#protected_methods, Kernel#private_methods and
	  Kernel#public_methods.  [Bug #6666]

Tue Jul  3 06:02:54 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (zstream_run):  Process zlib streams without GVL.
	  [Feature #6615]
	* NEWS:  ditto.

Mon Jul  2 22:13:04 2012  Tanaka Akira  <akr@fsij.org>

	* thread.c (rb_thread_aref): add explanation for why Thread#[] and
	  Thread#[]= are fiber-local and not thread-local.
	  reported by Julien A.  [ruby-core:41606] [ruby-trunk - Bug #5750]

Mon Jul  2 21:25:55 2012  Tanaka Akira  <akr@fsij.org>

	* time.c (timew_out_of_timet_range): specialization for
	  SIZEOF_TIME_T == SIZEOF_INT64_T.

Mon Jul  2 17:06:32 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_include_module): include modules after the origin.

	* class.c (include_modules_at): skip prepended modules.

	* class.c (rb_prepend_module): now basic.klass in ICLASS refers the
	  old original class/module.  [ruby-dev:45868][Bug #6662]

	* class.c (rb_mod_ancestors): ditto.

	* vm_method.c (search_method): search method entry from the origin
	  iclass.

Mon Jul  2 05:54:58 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:46058].

Mon Jul  2 05:35:43 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (d_lite_marshal_load): accepts old dump.

Mon Jul  2 03:21:53 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* README.EXT.ja: fixed args of have_struct_member() ,
	  create_makefile() same as r35977. however, mkmf.rb include
	  no Japanese-docs, so Appendix C was not removed. [Bug #6597]

Fri Jun 29 05:08:41 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/test/unit/parallel.rb: workaround fix for rubygems.
	  RubyGems can't find rake if the source directory is not equal to
	  the directory which is running the test. [Bug #6604]

Thu Jun 28 20:33:15 2012  Luis Lavena  <luislavena@gmail.com>

	* test/win32ole/test_win32ole.rb (test_s_codepage_changed):
	  FileSystemObject only supports ANSI or UTF-16LE encoding.
	  Patch by bosko (Bosko Ivanisevic) [ruby-trunk - Bug #6650]

Thu Jun 28 09:27:09 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* class.c (class_instance_method_list): consider prepended Class/Module
	  when recur != 0. [ruby-dev:45863] [Bug #6660]

	* test/ruby/test_module.rb (test_prepend_instance_methods_false): add
	  a test for it.


Thu Jun 28 06:12:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_ancestors): fix ancestors order.
	  [ruby-core:45919][Bug #6658] [ruby-dev:45861][Bug #6659]

Wed Jun 27 21:28:59 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/racc/parser.rb: NotImplementError is not exist.

	* lib/irb/output-method.rb (IRB::OutputMethod#print): ditto.

Wed Jun 27 21:31:13 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_prepend_module): ancestors of prepending module also
	  should be included.  [ruby-core:45914][Bug #6654]

Wed Jun 27 21:01:32 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (class_instance_method_list): m_tbl in prepended
	  class/module is NULL.  [ruby-core:45915][Bug #6655]

Wed Jun 27 16:48:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_prepend_module): prepend module into another module.

	* eval.c (rb_mod_prepend): new method Module#prepend.  [Feature #1102]

Wed Jun 27 09:15:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (is_popen_fork): check if fork and raise NotImplementedError if
	  unavailable.

	* io.c (rb_io_s_popen): allow environment variables hash and exec
	  options as flat parameters, not in an array arguments.
	  [Feature#6651] [EXPERIMENTAL]

	* process.c (rb_execarg_extract_options): extract exec options, but no
	  exceptions on non-exec options and returns them as a Hash.

	* process.c (rb_execarg_setenv): set environment variables.

Tue Jun 26 16:57:14 2012  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (register_cached_thread_and_wait):
	  return immediately if malloc() failed.
	  [ruby-core:43960] [ruby-trunk - Bug #6235]

	* thread_pthread.c (USE_THREAD_CACHE): check already defined or not.

Tue Jun 26 10:01:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_s_popen): revert r36213 "popen: shell commands with
	  envvar" because it disabled to let single command bypass shell.

Mon Jun 25 17:49:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mix_module): revert Module#mix.

Mon Jun 25 16:57:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_mod_define_method): allow method transplanting from a
	  module to either class or module.  [ruby-core:34267][Feature #4254]

Mon Jun 25 11:34:45 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* internal.h: use rb_pid_t instead of pid_t because of there is no
	  definition of pid_t here on Windows.

Mon Jun 25 00:25:01 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in (for stack end address): remove human68k specific
	  check. It is no longer supported.

Sun Jun 24 23:02:17 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (pipe_open): merge win32 code using spawnv().

Sun Jun 24 22:53:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (check_exec_fds): separate check_exec_fds_1() since
	  nonstatic initializer of an aggregate type is not allowed by C89.

Sun Jun 24 07:47:17 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): options field removed.

	* process.c: follow the rb_execarg change.

Sat Jun 23 23:48:21 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (proc_spawn_cmd): unused variable removed to suppress a
	  warning.
	  (save_env): ditto.

	  [ruby-core:45797] reported by Luis Lavena.

Sat Jun 23 23:19:31 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add new_pgroup_given and new_pgroup_flag
	  fields.

	* process.c (EXEC_OPTION_NEW_PGROUP): removed.
	  (proc_spawn_cmd): take a struct rb_execarg argument.
	  use the new fields.
	  (rb_execarg_addopt): use the new fields.
	  (rb_spawn_process): follow the proc_spawn_cmd change.

	  [ruby-core:45794] [ruby-trunk - Bug #6633] reported by Luis Lavena.

Sat Jun 23 20:26:36 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add fd_dup2, fd_close, fd_open,
	  fd_dup2_child fields.

	* process.c (EXEC_OPTION_DUP2): removed.
	  (EXEC_OPTION_CLOSE): removed.
	  (EXEC_OPTION_OPEN): removed.
	  (EXEC_OPTION_DUP2_CHILD): removed.
	  (mark_exec_arg): mark the new fields.
	  (check_exec_redirect1): change condition for default option.
	  (check_exec_redirect): take a struct rb_execarg argument.
	  use the new fields.
	  (rb_execarg_addopt): follow the check_exec_redirect change.
	  (check_exec_fds): use the new fields.
	  (save_redirect_fd): ditto.

Sat Jun 23 19:01:18 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_execarg_fixup): fix envopts condition.

Sat Jun 23 18:44:13 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (check_exec_redirect1): extracted from
	  check_exec_redirect.

Sat Jun 23 17:22:02 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (save_env): don't use EXEC_OPTION_UNSETENV_OTHERS.
	  (rb_execarg_run_options): ditto.

Sat Jun 23 17:04:08 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add env_modification field.

	* process.c (EXEC_OPTION_ENV): removed.
	  (mark_exec_arg): mark env_modification field.
	  (rb_exec_fillarg): update the new field, instead of options array.
	  (rb_execarg_fixup): use the new field.
	  (save_env): ditto.
	  (rb_execarg_run_options): ditto.

Sat Jun 23 16:27:01 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add rlimit_limits field.

	* process.c (EXEC_OPTION_RLIMIT): removed.
	  (mark_exec_arg): mark rlimit_limits field.
	  (rb_execarg_addopt): update the new fields, instead of options array.
	  (run_exec_rlimit): use the new field.
	  (rb_execarg_run_options): clear sarg using MEMZERO.  use the new
	  field.

Sat Jun 23 14:29:25 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add chdir_given and chdir_dir fields.

	* process.c (EXEC_OPTION_CHDIR): removed.
	  (mark_exec_arg): mark chdir_dir field.
	  (rb_execarg_addopt): update the new fields, instead of options array.
	  (rb_execarg_run_options): use the new fields.

Sat Jun 23 13:20:47 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add close_others_given, close_others_do and
	  close_others_maxhint fields.

	* process.c (EXEC_OPTION_CLOSE_OTHERS): removed.
	  (rb_execarg_addopt): update the new fields, instead of options array.
	  (check_exec_fds): take eargp as an argument.  update the
	  close_others_maxhint field.
	  (rb_execarg_fixup): follow the argument change of check_exec_fds.
	  (rb_execarg_run_options): use the new fields.

Sat Jun 23 10:41:59 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add unsetenv_others_given and
	  unsetenv_others_do fields.

	* process.c (EXEC_OPTION_UNSETENV_OTHERS): removed.
	  (rb_execarg_addopt): update the new fields, instead of options array.
	  (rb_execarg_fixup): use the new fields.

Sat Jun 23 09:35:47 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: use the variable name "soptions" for sargp->options.

Sat Jun 23 09:17:49 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: use the name "sargp" for struct rb_execarg variables
	  consistently for saving process attributes.

	* io.c: ditto.

Sat Jun 23 07:59:57 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: use the name "eargp" for struct rb_execarg variables
	  consistently except for saving process attributes.

	* io.c: ditto.

	* ext/pty/pty.c: ditto.

Wed Jun 20 18:27:03 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* common.mk: Add missing dependencies.

Fri Jun 22 20:27:39 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg): add pgroup_given and pgroup_pgid fields.

	* process.c (EXEC_OPTION_PGROUP): removed.
	  (rb_execarg_addopt): update the new fields, instead of options array.
	  (run_exec_pgroup): take a struct rb_execarg argument.  refer the new
	  fields.
	  (rb_execarg_run_options): follow run_exec_pgroup change.

Fri Jun 22 18:48:51 2012  Kouhei Sutou  <kou@cozmixng.org>

	* README.EXT, README.EXT.ja: use "sval" for the third argument
	  name of Data_Wrap_Struct().
	  Suggested by @satoh_fumiyasu. Thanks!!!

Fri Jun 22 18:04:26 2012  Koichi Sasada  <ko1@atdot.net>

	* iseq.c, vm_eval.c: set th->base_block properly.
	  th->base_block is information for (a) parsing, (b) compiling
	  and (c) setting up the frame to execute the program passed by
	  `eval' method.  For example, (1) parser need to know up-level
	  variables to detect it is variable or method without paren.
	  Befor (a), (b) and (c), VM set th->base_block by passed bindng
	  (or previous frame information).  After execute (a), (b) and (c),
	  VM should clear th->base_block.  However, if (a), (b) or (c)
	  raises an exception, then th->base_block is not cleared.
	  Problem is that the uncleared value th->balo_block is used for
	  irrelevant iseq compilation.  It causes SEGV or critical error.
	  I tried to solve this problem: to clear them before exception,
	  but finally I found out that it is difficult to do it (Ruby
	  program can be run in many places).
	  Because of this background, I set th->base_block before
	  compiling iseq and restore it after compiling.
	  Basically, th->base_block is dirty hack (similar to global
	  variable) and this patch is also dirty.

	* bootstraptest/test_eval.rb: add a test for above.

	* internal.h: remove unused decl.

	* iseq.c (rb_iseq_compile_with_option): add base_block parameter.
	  set th->base_block before compilation and restore it after
	  compilation.

	* ruby.c (require_libraries): pass 0 as base_block instead of
	  setting th->base_block

	* tool/compile_prelude.rb (prelude_eval): apply above changes.

	* vm.c, vm_eval.c: ditto.

	* vm_core.h: add comments.

Fri Jun 22 18:19:38 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: pass struct rb_execarg value instead of its options
	  field for saving process attribute changing functions.
	  (save_redirect_fd): take a struct rb_execarg argument.
	  (run_exec_dup2): ditto.
	  (run_exec_close): ditto.
	  (run_exec_open): ditto.
	  (run_exec_dup2_child): ditto.
	  (run_exec_pgroup): ditto.
	  (run_exec_rlimit): ditto.
	  (save_env): ditto.
	  (rb_execarg_run_options): follow the above functions change.

Fri Jun 22 17:55:48 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_backtrace.rb: decrease recursion depth
	  to reduce consuming stack size.

Fri Jun 22 13:36:50 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (random_init, random_load): cannot initialize frozen object
	  again, nor with tainted/untrusted object.  [Bug #6540]

Fri Jun 22 13:32:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_check_copyable): new function, to ensure the target is
	  not frozen and the source is not tainted nor untrusted.

Fri Jun 22 05:55:20 2012  Eric Hodel  <drbrain@segment7.net>

	* eval.c (ruby_cleanup):  Fixed typo.  Patch by Trever Dawe.
	  Fixes #131 (github).  [ruby-trunk - Bug #6619]

Thu Jun 21 21:16:58 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_execarg_addopt): take a VALUE argument instead of
	  struct rb_execarg.
	  (rb_exec_arg_addopt): follow the rb_execarg_addopt change.
	  (check_exec_options_i): ditto.

	* io.c (pipe_open): follow the rb_execarg_addopt change.

	* internal.h (rb_execarg_addopt): follow the definition change.

Thu Jun 21 20:34:19 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_fillarg): take a VALUE argument instead of
	  struct rb_execarg.
	  (rb_check_exec_options): ditto.
	  (check_exec_options_i): ditto.

Thu Jun 21 19:48:05 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_async_signal_safe): use rb_execarg_run_options
	  instead of rb_run_exec_options_err.
	  (rb_spawn_process): ditto.

Thu Jun 21 19:02:43 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_fillarg): take a VALUE argument instead of
	  struct rb_execarg.
	  (rb_execarg_init): follow the rb_exec_fillarg change.

Thu Jun 21 18:36:43 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_execarg_init): take a VALUE argument instead of
	  struct rb_execarg.
	  (rb_execarg_new): follow the rb_execarg_init change.
	  (rb_exec_arg_init): ditto.

	* internal.h (rb_execarg_init): follow the definition change.

Thu Jun 21 17:20:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (new_args_tail_gen): fix GC problem of keyword rest
	  argument.  the wrapped struct should be bound to the wrapping node
	  before assignment of child nodes, to get rid of the case the
	  children are referred by only the struct pointer which is not a
	  subject of GC.  [ruby-core:45744]

Thu Jun 21 07:06:52 2012  Koichi Sasada  <ko1@atdot.net>

	* error.c (err_append): rename err_append() to compile_err_append()
	  and move definition body.  err_append() is used only by compiling.

Thu Jun 21 06:21:54 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_execarg_fixup): take a VALUE argument instead of
	  struct rb_execarg.

	* internal.h (rb_execarg_fixup): follow the definition change.

	* io.c (pipe_open): follow rb_execarg_fixup change.

	* ext/pty/pty.c (establishShell): ditto.

Wed Jun 20 21:25:37 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (struct rb_execarg): add umask_given and umask_mask
	  fields.

	* process.c (STATIC_ASSERT): removed.
	  (rb_execarg_addopt): follow the rb_execarg change.
	  (rb_execarg_run_options): ditto.

Wed Jun 20 20:38:23 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (struct rb_execarg) moved and renamed from
	  struct rb_exec_arg in intern.h.

	* include/ruby/intern.h (struct rb_exec_arg): refer Data object which
	  contains struct rb_execarg.

	* process.c: use struct rb_execarg instead of struct rb_exec_arg
	  except functions declared in intern.h.
	  (rb_exec_arg_addopt): extract a pointer to struct rb_execarg from
	  struct rb_exec_arg.
	  (rb_exec_arg_init): ditto.
	  (rb_exec_arg_fixup): ditto.
	  (rb_run_exec_options_err): ditto.
	  (rb_run_exec_options): ditto.
	  (rb_exec_err): ditto.
	  (rb_exec): ditto.

	* io.c: use struct rb_execarg instead of struct rb_exec_arg.

	* ext/pty/pty.c: ditto.

Wed Jun 20 19:13:25 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_execarg_new): declared.
	  (rb_execarg_get): ditto.

	* process.c (mark_exec_arg): new function.
	  (free_exec_arg): ditto.
	  (memsize_exec_arg): ditto.
	  (exec_arg_data_type): defined.
	  (rb_execarg_new): new function.
	  (rb_execarg_get): ditto.
	  (rb_f_exec): use rb_execarg_new.
	  (rb_spawn_internal): ditto.
	  (rb_f_spawn): ditto.

	* io.c (pipe_open_v): use rb_execarg_new.
	  (pipe_open_s): ditto.

	* ext/pty/pty.c (establishShell): use rb_execarg_new.

Wed Jun 20 16:36:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of
	  environ on Darwin for namespace cleanness, same as [ruby-core:00537].
	  [ruby-core:45615] [Bug #6576]

Wed Jun 20 11:33:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_execarg_addopt): always make Fixnum, and ignore higher
	  bits in too large umask value.

Wed Jun 20 11:24:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): deal with
	  sudden-death of workers.

Mon Jun 18 20:34:20 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* time.c (init_leap_second_info): fix non-ANSI function declaration.

Mon Jun 18 20:29:04 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ruby.c (rb_f_sub): use ansi style declaration.
	* ruby.c (rb_f_gsub): ditto.
	* ruby.c (rb_f_chomp): ditto.

Mon Jun 18 20:26:23 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* random.c (rb_random_int32): get rid of "warning: constant 0x100000000
	  is so big it is long" warning.

Mon Jun 18 20:07:23 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* dir.c (dir_initialize): get rid of "unused return: argc = rb_scan_args()"
	  warning.

Mon Jun 18 19:31:20 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/missing.h: include math.h before checking INFINITY
	  and NAN. Otherwise, strange macro redefinition will occur.

Mon Jun 18 19:12:37 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* array.c (ary_reverse): use ansi style declaration.

Tue Jun 19 18:43:50 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/backward/rubysig.h: fix visibility.  [Bug #6607]

Tue Jun 19 17:51:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_execarg_run_options): do not call any methods in the
	  async-signal-safe function.  mask has been checked with NUM2MODET()
	  already and converted with LONG2NUM().

Tue Jun 19 11:59:56 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (Init_readline): don't set 0 to
	  rl_catch_signals and rl_catch_sigwinch. [Bug #5423]

Tue Jun 19 11:52:59 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (readline_s_get_special_prefixes): suppress
	  warning: uninitialized instance variable.

Tue Jun 19 11:43:16 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (readline_getc): fix editline compatibility
	  broken by r36123. [Bug #6601]

Mon Jun 18 17:10:08 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_subpos): split from rb_str_substr.  returns
	  adjusted position for substring.

Mon Jun 18 10:42:57 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/readline.c (readline_getc): deal with ESC just followed
	  by ASCII as meta prefix in incremental search mode.  based on the
	  patch from rctay (Tay Ray Chuan) at [ruby-core:45682].  [Bug #6601]

Sun Jun 17 22:23:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (rb_file_directory_p): move documentation for Dir.exist? from
	  file.c so that the proper description will be shown instead of the
	  documentation of File.directory?.  [ruby-core:45685]

Sun Jun 17 16:21:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX.
	  this internal is used only in thread_win32.c, but has to be complete
	  to define rb_thread_t.

	* thread_win32.c (native_mutex_lock, native_mutex_destroy): fix for
	  USE_WIN32_MUTEX.

	* thread_win32.c (native_cond_timedwait_ms): rename reserved pattern
	  name.  user defined symbols should not start with __.

Sat Jun 16 19:24:01 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: define date_sg_t.

Sat Jun 16 18:46:57 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
	* ext/date/date_strftime.c: ditto.
	* ext/date/date_core.c: ditto.

Sat Jun 16 18:31:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_setup): set running state in the normal case before
	  popping a tag.

Sat Jun 16 07:46:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers
	  results in the parent.

Sat Jun 16 07:12:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/runruby.rb (File.realpath): return real path of expanded path.
	  [Bug #6598]

Sat Jun 16 07:12:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bootstraptest/runner.rb (main): ignore -j option for compatibility
	  with test/unit.

Sat Jun 16 07:11:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
	  drop useless reports, not override entirely.

	* lib/test/unit/parallel.rb (Test::Unit::Worker#_run_suite): report
	  unformatted results.  formatting messages is not a workers task.

	* lib/test/unit/parallel.rb (Test::Unit::Worker#puke): store raw
	  results.

Sat Jun 16 01:27:14 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: bumping psych to 1.3.3
	* ext/psych/psych.gemspec: ditto

Fri Jun 15 20:54:28 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* vm_backtrace.c (backtrace_collect): rename from backtreace_collect.

Fri Jun 15 19:22:13 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: remove VM_FRAME_MAGIC_FINISH (finish frame type).
	  Before this commit:
	    `finish frame' was place holder which indicates that VM loop
	    needs to return function.
	    If a C method calls a Ruby methods (a method written by Ruby),
	    then VM loop will be (re-)invoked.  When the Ruby method returns,
	    then also VM loop should be escaped.  `finish frame' has only
	    one instruction `finish', which returns VM loop function.
	    VM loop function executes `finish' instruction, then VM loop
	    function returns itself.
	    With such mechanism, `leave' instruction (which returns one
	    frame from current scope) doesn't need to check that this `leave'
	    should also return from VM loop function.
	    Strictly, one branch can be removed from `leave' instruction.
	  Consideration:
	    However, pushing the `finish frame' needs costs because
	    it needs several memory accesses.  The number of pushing
	    `finish frame' is greater than I had assumed.  Of course,
	    pushing `finish frame' consumes additional control frame.
	    Moreover, recent processors has good branch prediction,
	    with which we can ignore such trivial checking.
	  After this commit:
	    Finally, I decide to remove `finish frame' and `finish'
	    instruction.  Some parts of VM depend on `finish frame',
	    so the new frame flag VM_FRAME_FLAG_FINISH is introduced.
	    If this frame should escape from VM function loop, then
	    the result of VM_FRAME_TYPE_FINISH_P(cfp) is true.
	    `leave' instruction checks this flag every time.
	    I measured performance on it.  However on my environments,
	    it improves some benchmarks and slows some benchmarks down.
	    Maybe it is because of C compiler optimization parameters.
	    I'll re-visit here if this cause problems.

	* insns.def (leave, finish): remove finish instruction.

	* vm.c, vm_eval.c, vm_exec.c, vm_backtrace.c, vm_dump.c:
	  apply above changes.

Fri Jun 15 19:11:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
	  results to the report for parallel test.  [Bug #6595]

Fri Jun 15 09:01:35 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* nacl/pepper_main.c: Removed an unnecessary and erroneous inclusion.

Thu Jun 14 22:59:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_CPPOUTFILE): check if output is really sent to
	  specified file to tell if -o option works.  [ruby-dev:45742]
	  [Bug#6591]

	* configure.in (RUBY_CPPOUTFILE): check if output file is actually
	  created.  [ruby-dev:45742] [Bug#6591]

Thu Jun 14 22:10:50 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (proc_exec_sh): don't strip leading spaces of the script.

Thu Jun 14 15:54:02 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (rb_file_s_basename, rb_file_s_dirname): documentation fix.
	  File.basename and File.dirname support File::ALT_SEPARATOR.

Thu Jun 14 11:10:10 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* nacl/pepper_main.c: Applies the new embedding API to pepper_ruby.

Thu Jun 14 10:44:41 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* include/ruby/ruby.h: Grouped APIs for embedding CRuby interpreter.
	  (ruby_setup, ruby_compile_main_from_file,
	  ruby_compile_main_from_string, ruby_eval_main,
	  ruby_set_script_name): new APIs to embed CRuby.
	  (ruby_opaque_t) Opaque pointer to an internal data, to NODE or iseq
	  in particular.

	* eval.c (ruby_setup): Similar to ruby_init but returns an error code
	  instead of exit(3) on error.
	  (ruby_eval_main): Similar to ruby_exec_node but returns the
	  evaluation result.
	  (ruby_eval_main_internal): renamed from ruby_exec_internal.

	* ruby.c (toplevel_context): new helper function.
	  (PREPARE_EVAL_MAIN): moved.
	  (process_options): refactored with new functions.
	  (parse_and_compile_main) new helper function.
	  (ruby_compile_main_from_file, ruby_compile_main_from_string) new API
	  (ruby_set_script_name): new API.


Thu Jun 14 10:39:48 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* eval.c: Add doxygen comments.

	* ruby.c: ditto.

	* thread_pthread.c: ditto

	* version.c: ditto.

	* vm_core.h: ditto.

Thu Jun 14 10:16:07 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: revert r36071 and add NetBSD to blacklist of -ansi.

Thu Jun 14 07:59:12 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (get_stack): Linux is the only OS which includes
	  the size of guard page into the stack size.

Thu Jun 14 06:21:00 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/drb/drb.rb:  Replace broken links to the English DRb book.
	  Patch by Zachary Scott.  [ruby-trunk - Bug #6544]

Thu Jun 14 06:17:47 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/observer.rb:  Update broken link to the Programming Ruby book.
	  Patch by Zachary Scott.  [ruby-trunk - Bug #6536]
	* lib/drb/drb.rb:  ditto.

Thu Jun 14 05:23:05 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* regparse.c (PFETCH_READY): suppress Wunused-but-set-variable.

	* regparse.c (is_onechar_cclass): restructured to clarify that c is
	  used iff found == 1.

Thu Jun 14 02:54:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: use -fbuiltin with -ansi -std=iso9899:199409.
	  This prevents errors introduced by disabling builtin functions,
	  which is the sub-effect of -ansi/-std.
	  Now NetBSD can use -ansi -std=iso9899:199409.
	  Maybe mingw, cygwin and darwin can also.

Thu Jun 14 02:53:30 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* Makefile.in: don't remove macros. now name2ctype uses macros.

	* tool/enc-unicode.rb: add comment why it uses Hash#index.

	* enc/unicode/{name2ctype.kwd,name2ctype.src,name2ctype.h.blt}:
	  update to follow the current name2ctype.h.
	  FYI current Unicode version is 6.1.

Thu Jun 14 00:16:59 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
	  response codes added in RFCs 2817 and 4918.  [ruby-core:45547]
	  [Feature #6569]

	* lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
	  Net::HTTPMultipleChoices, leaving the former as alias to the
	  latter for backward compatibility.  [ruby-core:45547]
	  [Feature #6569]

	* lib/net/http/responses.rb: Add comments about unused,
	  still-in-draft and private extension response codes.
	  [ruby-core:45547] [Feature #6569]

Wed Jun 13 22:44:32 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
	  for size_t variables. [ruby-dev:45733] [Bug #6584]

Wed Jun 13 22:18:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: remove -ansi and -std options for lgamma_r() and
	  finite().

Wed Jun 13 21:46:34 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: cygwin does not provide some declarations in strict
	  ANSI mode.

Wed Jun 13 20:19:59 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_internal): move a variable declaration.

Wed Jun 13 17:54:38 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* regparse.c (PFETCH_READY):  this  line was to  suppress warning,
	  but  did emit  warnings if  -Wuninitialized was  set.  Assigning
	  NULL instead if pfetch_prev should suffice the situation.

Wed Jun 13 17:51:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: cygwin needs C99 for some stuff, e.g.,
	  pthread_attr_setstacksize, sched_yield.

Wed Jun 13 17:50:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (.c.i): add warnflags to make the result consistent with
	  compilation.

Wed Jun 13 15:12:07 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* configure.in: On Windows  platforms, system provided headers are
	  VC++ optimized.  That is, C++ habits are often contaminated into
	  various  headers.  Most  frequent  situation is  the  use of  //
	  comments.  We bypass ANSI  C mode for them.  Otherwise extension
	  libs cannot include those headers.

Wed Jun 13 13:39:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h: get rid of C99 style one line comments.

Wed Jun 13 13:39:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (enc_alias_internal): use strdup defined as macro.

Wed Jun 13 10:20:27 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_exec_fillarg): get rid of SIZE_T_MAX which may need
	  more headers.

	* process.c (rb_exec_fillarg): fix array element size.  "continue" and
	  "readonly" exceeded the size.

	* process.c (rb_exec_fillarg): use shell if the first word is reserved
	  or special built-in name.
	 http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

	* process.c (rb_exec_fillarg): treat '=' only in the first word.  if
	  the first word does not contain '=', it is the command name and
	  environment assignments cannot be anymore.

Tue Jun 12 23:45:36 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/mkmf.rb: add dummy clean-static target to prevent errors for the
	  case real clean-static target doesn't exist.

Tue Jun 12 22:49:42 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* process.c (rb_exec_arg_fixup): fix compile error

Tue Jun 12 21:40:13 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_fillarg): treat '=' character as a meta
	  character to detect assignments preceding command name.

Tue Jun 12 20:29:19 2012  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_exec_arg_init): deprecated.
	  (rb_exec_arg_addopt): ditto.
	  (rb_exec_arg_fixup): ditto.
	  (rb_run_exec_options): ditto.
	  (rb_run_exec_options_err): ditto.

	* internal.h (rb_execarg_init): declared.
	  (rb_execarg_addopt): ditto.
	  (rb_execarg_fixup): ditto.
	  (rb_execarg_run_options): ditto.

	* process.c: call rb_execarg_addopt, rb_execarg_fixup,
	  rb_execarg_run_options, rb_execarg_init.
	  (rb_execarg_addopt): renamed from rb_exec_arg_addopt.
	  (rb_exec_arg_addopt): stub to call rb_execarg_addopt.
	  (rb_execarg_init): renamed from rb_exec_arg_init.
	  (rb_exec_arg_init): stub to call rb_execarg_init.
	  (rb_execarg_fixup): renamed from rb_exec_arg_fixup.
	  (rb_exec_arg_fixup): stub to call rb_execarg_fixup.
	  (rb_execarg_run_options): renamed from rb_run_exec_options_err.
	  (rb_run_exec_options_err): stub to call rb_execarg_run_options.
	  (rb_run_exec_options): call rb_execarg_run_options.

	* io.c: call rb_execarg_addopt, rb_execarg_fixup,
	  rb_execarg_run_options, rb_execarg_init.

	* ext/pty/pty.c (establishShell): call rb_execarg_init and
	  rb_execarg_fixup.

Tue Jun 12 18:39:59 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* configure.in: enable strict ANSI mode by default in case of GCC,
	  requested by _ko1.

Tue Jun 12 06:40:23 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_fillarg): detect '#' as a meta character.

Mon Jun 11 22:15:44 2012  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_proc_exec_n): deprecated.
	  (rb_exec): ditto.
	  (rb_exec_err): ditto.
	  (rb_fork): ditto.
	  (rb_fork_err): ditto.

Mon Jun 11 18:49:52 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: on checking libexecinfo, don't specify /use/local.
	  On FreeBSD people must specify --with-opt-dir or --with-execinfo-dir.

Mon Jun 11 12:14:37 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: remove lfp (local frame pointer) and rename
	  dfp (dynamic frame pointer) to ep (environment pointer).
	  This change make VM `normal' (similar to other interpreters).
	  Before this commit:
	    Each frame has two env pointers lfp and dfp.  lfp points
	    local environment which is method/class/toplevel frame.
	    lfp[0] is block pointer.
	    dfp is block local frame. dfp[0] points previous (parent)
	    environment pointer.
	    lfp == dfp when frame is method/class/toplevel.
	    You can get lfp from dfp by traversing previous environment
	    pointers.
	  After this commit:
	    Each frame has only `ep' to point respective environment.
	    If there is parent environment, then ep[0] points parent
	    environment (as dfp).  If there are no more environment,
	    then ep[0] points block pointer (as lfp).  We call such ep
	    as `LEP' (local EP).  We add some macros to get LEP and to
	    detect LEP or not.
	    In short, we replace dfp and lfp with ep and LEP.
	  rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
	  and member `ep' is added.
	  rename rb_thread_t's member `local_lfp' and `local_svar' to
	  `root_lep' and `root_svar'.
	  (VM_EP_PREV_EP(ep)): get previous environment pointer.  This macro
	    assume that ep is not LEP.
	  (VM_EP_BLOCK_PTR(ep)): get block pointer.  This macro assume
	    that ep is LEP.
	  (VM_EP_LEP_P(ep)): detect ep is LEP or not.
	  (VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
	  (VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
	  (VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
	  (VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.

	* vm.c: apply above changes.
	  (VM_EP_LEP(ep)): get LEP.
	  (VM_CF_LEP(cfp)): get LEP of cfp->ep.
	  (VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
	  (VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).

	* vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
	  apply above changes.

	* cont.c: ditto.

	* eval.c, eval_intern.h: ditto.

	* proc.c: ditto.

	* thread.c: ditto.

	* vm_dump.c: ditto.

	* vm_exec.h: fix function name (on vm debug mode).

Mon Jun 11 11:52:18 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* compile.c (iseq_set_sequence): nonstatic initializer of an
	  aggregate type is a C99ism.

	* compile.c (enum compile_array_type_t): comma at the end of enum
	  list is a C99ism.

	* vm_backtrace.c (enum LOCATION_TYPE): ditto.

Mon Jun 11 06:31:33 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_proc_exec_n): revert the function removed at r35889.

Mon Jun 11 06:20:50 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (rb_thread_create_timer_thread): assign return
	  value to the variable err.

Mon Jun 11 06:17:06 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (native_cond_initialize): fix typo in r36022.
	  this cause a failure on FreeBSD 8.2 amd64.
	 http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20120610T130201Z.diff.html.gz

Mon Jun 11 05:21:57 2012  Koichi Sasada  <ko1@atdot.net>

	* .gdbinit (SDR): add SDR function.  It's only for VM debugging.

Sun Jun 10 21:50:45 2012  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* nacl/nacl_config.rb: Fixed for 32bit hosts.

Sun Jun 10 20:23:14 2012  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	Fixes threading on NativeClient.

	* thread_pthread.c (timer_thread_sleep): Extracted out a function from
	  thread_timer(). Added an alternative implementation for platforms
	  that lacks select(2) or pipe(2).
	  (rb_thread_create_timer_thread, native_cond_initialize,
	  native_cond_destroy): Replaced wrong HAVE_XXX checks.

	* configure.in (pthread_attr_init): New check.

Sun Jun 10 21:30:11 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_without_timer_thread): renamed from rb_exec_err.
	  (rb_exec_err): new stub function to call
	  rb_exec_without_timer_thread.
	  (rb_f_exec): call rb_exec_without_timer_thread.
	  (rb_exec): call rb_exec_without_timer_thread.

Sun Jun 10 21:13:10 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork): call rb_fork_internal instead of rb_fork_err.

Sun Jun 10 20:55:59 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_ruby): call rb_fork_internal directly.

Sun Jun 10 20:19:40 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_ruby): new function.
	  (rb_f_fork): use rb_fork_ruby instead of rb_fork.
	  (rb_daemon): ditto.

	* io.c (pipe_open): use rb_fork_ruby instead of rb_fork.

	* internal.h (rb_fork_ruby): declared.

Sun Jun 10 18:58:16 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/net/http/response.rb: Remove a duplicated rdoc and leave a
	  pointer.

	* lib/net/http/responses.rb: Add RFC numbers to base on.

Sun Jun 10 18:31:42 2012  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* configure.in (RUBY_NACL): Warns if $PATH does not contain the path
	  to NativeClient SDK. PATH variable redefinition in GNUmakefile does
	  not work for GNU make 3.81.

Sun Jun 10 17:54:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.h (IS_STACK_DIR_UPPER): utility macro.

	* thread_pthread.c (get_stack): seems stack size does not include
	  guard size on Mac OS X.

	* thread_pthread.c (ruby_init_stack): adjust stack size for offset of
	  addr from the bottom.

Sun Jun 10 15:49:47 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (retry_fork): call after_fork except in a child process.
	  (rb_fork_internal): restrict after_fork call condition.

Sun Jun 10 14:19:33 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: NetBSD 6 adds libexecinfo but it only works on amd64.
	 http://www.mail-archive.com/source-changes-full@netbsd.org/msg38729.html

Sun Jun 10 12:43:23 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_f_exec): call rb_exec_async_signal_safe except on
	  Mac OS X.  cf. the comment in before_exec_non_async_signal_safe.

Sun Jun 10 12:15:18 2012  Tanaka Akira  <akr@fsij.org>

	* io.c (popen_exec): don't call rb_thread_atfork_before_exec.  use
	  rb_exec_async_signal_safe instead of rb_exec_err.
	  (pipe_open): use rb_fork_async_signal_safe instead of rb_fork_err.

Sun Jun 10 11:44:57 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_internal): call after_fork only unless
	  chfunc_is_async_signal_safe.

Sun Jun 10 11:33:01 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkey_ec.c
	  test/openssl/test_pkey_ec.rb: Add support for EC_POINT_mul.
	  Patch provided by Sambasiva Suda. Thanks!
	  [ruby-core:44408][ruby-trunk - Feature #6310]

Sun Jun 10 10:48:15 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* lib/openssl/ssl.rb: Use a simple random number to generate the
	  session id. MD5, as was used before, causes problems when
	  using a FIPS version of OpenSSL. Issue was found by Jared
	  Jennings, thank you!
	  [ruby-trunk - Bug #6137]

Sun Jun 10 10:27:34 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* NEWS: Add note about the new private key export behavior.

Sun Jun 10 10:24:51 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_async_signal_safe): exported.

	* ext/pty/extconf.rb: modify $INCFLAGS to include internal.h

	* ext/pty/pty.c: include internal.h.
	  (chfunc): don't call rb_thread_atfork_before_exec.  use
	  rb_exec_async_signal_safe instead of rb_f_exec.
	  (establishShell): set up earg.  use rb_fork_async_signal_safe
	  instead of rb_fork_err.

	* internal.h (rb_exec_async_signal_safe): declared.
	  (rb_fork_async_signal_safe): declared.

Sun Jun 10 10:21:37 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl.c
	  ext/openssl/ossl_pkey_rsa.c
	  ext/openssl/ossl_pkey_dsa.c
	  ext/openssl/ossl_pkey_ec.c: Forbid export passwords that are less
	  than four characters long, as OpenSSL itself does not allow this.
	  Issue found by Eric Hodel.
	* ext/openssl/ossl_pkey_ec.c: Add export as an alias of to_pem,
	  following the PKey interface contract.
	* test/openssl/test_pkey_dsa.rb
	  test/openssl/test_pkey_rsa.rb
	  test/openssl/test_pkey_ec.rb: Add tests that assert correct
	  behaviour when dealing with passwords that are less than four
	  characters long.
	  [ruby-core: 42281][ruby-trunk - Bug #5951]

Sun Jun 10 10:14:26 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_f_exec): use rb_exec_arg_prepare.

Sun Jun 10 06:43:51 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: split after_exec into async-signal-safe part and rest.
	  (after_exec_async_signal_safe): extracted from after_exec.
	  (after_exec_non_async_signal_safe): ditto.
	  (after_exec): call them.
	  (rb_exec_async_signal_safe): call after_exec_async_signal_safe.
	  (rb_exec_err): call after_exec_non_async_signal_safe instead of
	  after_exec.

Sun Jun 10 06:21:10 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* NEWS: document new features of Ruby OpenSSL.

Sun Jun 10 03:09:41 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl.c: Fix error in example. Patch by David Albert.

	  Add/extend existing documentation. Examples now also cover RSA
	  signatures and PBKDF2.
	  [ruby-core: 45154][ruby-trunk - Bug #6475]


Sun Jun 10 01:41:45 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: Introduce SSLContext#renegotiation_cb and
	  remove SSLContext#disable_client_renegotiation and related
	  functionality introduced in r35797. The new callback approach
	  gives clients maximum flexibility to decide on their own what to
	  do on renegotiation attempts.
	  Add documentation for SSL module and SSLError.
	* test/openssl/test_ssl.rb: Add a test for
	  SSLContext#renegotiation_cb.

Sun Jun 10 01:37:18 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_internal): initialize exc.

Sun Jun 10 00:19:25 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: don't use non async-signal-safe functions in a child
	  process before exec, for invoking a command.
	  (rb_exec_atfork): call rb_exec_async_signal_safe only.
	  (retry_fork): take chfunc_is_async_signal_safe argument.  call
	  before_fork and after_fork only unless chfunc_is_async_signal_safe.
	  (send_child_error): take chfunc_is_async_signal_safe argument.
	  send an exception only unless chfunc_is_async_signal_safe.
	  (recv_child_error): take chfunc_is_async_signal_safe argument.
	  receive an exception only unless chfunc_is_async_signal_safe.
	  (rb_fork_internal): renamed from rb_fork_err and take
	  chfunc_is_async_signal_safe argument.
	  use rb_protect only unless chfunc_is_async_signal_safe.
	  (rb_fork_err): call rb_fork_internal with false as
	  chfunc_is_async_signal_safe.
	  (rb_fork_async_signal_safe): call rb_fork_internal with true as
	  chfunc_is_async_signal_safe.
	  (rb_spawn_process): call rb_fork_async_signal_safe instead of
	  rb_fork_err.

Sat Jun  9 23:57:03 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_err): rewrite a complex "if" statement.

Sat Jun  9 23:44:29 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (before_exec_async_signal_safe): extracted from
	  before_exec.
	  (before_exec_non_async_signal_safe): ditto.
	  (before_exec): call before_exec_async_signal_safe and
	  before_exec_non_async_signal_safe.
	  (rb_exec_async_signal_safe): call before_exec_async_signal_safe.
	  (rb_exec_err): call before_exec_non_async_signal_safe instead of
	  before_exec.

Sat Jun  9 23:36:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (iseq_load, insn_operand_intern, rb_iseq_disasm)
	  (rb_iseq_parameters): use rb_id2str() instead of rb_id2name() to
	  keep encoding.

	* string.c (rb_str_symname_p): new function that checks if the string
	  is valid as a symbol name.  split from sym_inspect().

Sat Jun  9 22:27:05 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (retry_fork): rewrite a complex "for" statement by
	  simple statements.

Sat Jun  9 21:50:04 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (retry_fork): extracted from rb_fork_err.
	  (send_child_error): ditto.
	  (recv_child_error): ditto.

Sat Jun  9 17:21:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (iseq_load): type is a symbol, and invalid as ID in common.

Sat Jun  9 10:57:14 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_async_signal_safe): extracted from rb_exec_err.

Sat Jun  9 09:31:07 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: simplified because close_others option is always
	  enabled by default.
	  (rb_f_exec): don't need to set the option.
	  (rb_exec_arg_prepare): don't need to set the option.  don't need
	  default_close_others argument.
	  (rb_spawn_internal): don't need to give default_close_others
	  argument for rb_exec_arg_prepare.  don't need default_close_others
	  argument.
	  (rb_spawn_err): don't need to give default_close_others
	  argument for rb_spawn_internal.
	  (rb_spawn): don't need to give default_close_others
	  argument for rb_spawn_internal.
	  (rb_f_system): don't need to give default_close_others argument for
	  rb_spawn_internal.
	  (rb_f_spawn): don't need to give default_close_others argument for
	  rb_exec_arg_prepare.

Sat Jun  9 09:00:58 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_proc_exec): call before_exec() here addition to
	  rb_exec_err.

Sat Jun  9 08:30:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (ruby_init_stack): use stack info if possible.

Sat Jun  9 08:21:32 2012  Eric Hodel  <drbrain@segment7.net>

	* README.EXT (prepare extconf.rb):  Added note to see MakeMakefile for
	  documentation of extconf.rb functions.  Patch by Zachary Scott.
	  [ruby-trunk - Feature #6522]
	* README.EXT (Appendix C):  Removed in favor of MakeMakefile.
	  Patch by Zachary Scott.
	* lib/mkmf.rb:  Merged documentation from README.EXT Appendix C.  Patch
	  by Zachary Scott.

Sat Jun  9 08:16:47 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/re.rdoc:  Completed wording in the description of the =~ operator.
	  [ruby-trunk - Bug #6529]

Sat Jun  9 08:09:38 2012  Eric Hodel  <drbrain@segment7.net>

	* string.c (rb_str_start_with):  Removed "p" from start_with? examples
	  to match other String method examples.  [ruby-trunk - Bug #6553]
	* string.c (rb_str_end_with):  Updated end_with? to use code markup
	  instead of italic.

Sat Jun  9 07:56:03 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/benchmark.rb:  Updated formatting of Benchmark documentation for
	  consistency.  [ruby-trunk - Bug #6533]

Sat Jun  9 07:46:26 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/delegate.rb:  Added documentation for Delegator#!.  Patch by
	  Zachary Scott.  [ruby-trunk - Feature #6534]

Sat Jun  9 07:39:50 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http/responses.rb:  Add RFC 6585 response codes.  Patch by
	  Sangil Jung.  [ruby-trunk - Feature #6480]
	* lib/net/http/response.rb:  ditto
	* lib/net/http.rb:  ditto
	* lib/webrick/httpstatus.rb:  ditto

Sat Jun  9 01:24:28 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_err): before_exec() call moved from proc_exec_cmd
	  and proc_exec_sh.
	  (rb_proc_exec): ditto.

Sat Jun  9 01:11:07 2012  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_exec_arg_init): declaration changed to
	  return a value.

	* process.c (rb_exec_arg_init): return a value.

Fri Jun  8 23:44:14 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: don't check the availability of FD_CLOEXEC.  It should
	  be available if fork() is available.

	* io.c: ditto.

Fri Jun  8 22:39:32 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_err): revert r35955.  The condition needs !chfunc
	  to close ep[0] and ep[1].  The catched exception is re-raised
	  immediately after that if status is not NULL.

Fri Jun  8 19:43:33 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_err): after_exec() call moved from proc_exec_cmd
	  and proc_exec_sh.
	  (rb_proc_exec): ditto.

Fri Jun  8 19:00:59 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (ARGV_COUNT): unused macro removed.
	  (ARGV_SIZE): ditto.
	  (ALLOC_ARGV): ditto.
	  (ALLOC_ARGV_WITH_STR): ditto.

Fri Jun  8 16:19:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/runner.rb (src_testdir): expand real path so that
	  TestGem#test_self_find_files does not fail by aliased load path when
	  srcdir contains a symbolic link.

	* tool/runruby.rb (srcdir): ditto.

Fri Jun  8 12:04:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_fork_err): error state in the child process is prior
	  to exceptions in proc_syswait().

	* process.c (rb_fork_err): determine status on errors.

	* ext/pty/pty.c (establishShell): reraise exception if something
	  raised during sleep.

	* ext/pty/pty.c (establishShell): now needs status to protect from
	  exceptions in rb_fork_err().

Thu Jun  7 22:13:05 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_fork_err): Fix the condition to use rb_protect.

Thu Jun  7 20:29:12 2012  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h: rb_exec_arg and related stuff moved back from
	  internal.h

Thu Jun  7 15:53:03 2012  Koichi Sasada  <ko1@atdot.net>

	* .gdbinit: add function `trace_machine_instructions' to trace
	  in native machine assemble.
	  See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
	  for more details.

Wed Jun  6 21:31:21 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (proc_exec_cmd) renamed from proc_exec_v.
	  (proc_exec_sh): renamed from rb_proc_exec_e.
	  (proc_spawn_cmd_internal): renamed from proc_spawn_v.
	  (proc_spawn_cmd): renamed from proc_spawn_n.
	  (proc_spawn_sh): renamed from proc_spawn.

Wed Jun  6 21:18:47 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (try_with_sh): please take care of the macro defined by
	  you.

Wed Jun  6 20:45:08 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (proc_exec_v): don't call dln_find_exe_r here because it
	  is not async-signal-safe and proc_exec_v is called in a child
	  process.
	  command_abspath field of rb_exec_arg.
	  (rb_exec_fillarg): call dln_find_exe_r and set command_abspath.
	  (rb_exec_err): Give the absolute path of the invoking command for
	  proc_exec_v, instead of the command name.

	* internal.h: add command_abspath field for rb_exec_arg.

Wed Jun  6 20:08:01 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (try_with_sh): take envp argument.
	  (exec_with_sh): ditto.  use it for execve.
	  (proc_exec_v): provide envp for try_with_sh.

Wed Jun  6 13:25:04 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c, include/ruby/win32.h (rb_w32_wrap_io_handle): new API.
	  this API wraps an I/O handle (HANDLE or SOCKET) and returns fd.
	  the second parameter should be combination of O_*, for example,
	  O_RDWR | O_BINARY | O_NOINHERIT.

	* win32/win32.c, include/ruby/win32.h (rb_w32_unwrap_io_handle): new
	  API.  this API unwraps an I/O handle and close the fd (not closes
	  the handle itself).

	[Feature #4906] [ruby-core:37227]

Wed Jun  6 13:18:26 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_close): of course, console handle is not socket.

Wed Jun  6 12:37:43 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (rb_run_exec_options_err): allocate a temporary buffer for
	  run_exec_dup2() for restoring fds on non-fork environments.

Wed Jun  6 09:45:21 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.

Wed Jun  6 05:27:54 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_fillarg): check use_shell field before accessing
	  a union field.

Wed Jun  6 04:58:44 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_spawn_process): prog variable is not used for Unix.

Wed Jun  6 00:20:37 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_exec_arg_init): change return type to void.

	* process.c (rb_exec_arg_init): don't return a value.
	  (rb_exec_arg_prepare): ditto.
	  (rb_spawn_process): don't take the prog argument.  extract the
	  information from earg.
	  (rb_spawn_internal): follow rb_spawn_process change.
	  (rb_f_spawn): ditto.

	* io.c (pipe_open): don't take the prog argument.  extract the
	  information from eargp.
	  (pipe_open_v): follow pipe_open change.
	  (pipe_open_s): ditto.

Tue Jun  5 23:51:33 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_exec_arg): use union to represent command invocation
	  with/without shell.

	* process.c: follow the rb_exec_arg change.

	* io.c (pipe_open): ditto.

Tue Jun  5 22:28:46 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h: rb_exec_arg and related stuff moved from intern.h

	* include/ruby/intern.h (rb_proc_exec_n): removed.

Tue Jun  5 21:57:22 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_arg_fixup): allocate a temporary buffer for
	  run_exec_dup2 here because it should be async-signal-safe.
	  (run_exec_dup2): use the temporary buffer.
	  (run_exec_dup2_tmpbuf_size): new function.

	* include/ruby/intern.h (rb_exec_arg): add dup2_tmpbuf field.

Tue Jun  5 20:13:15 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_init_copy): should check if trusted too.

Tue Jun  5 19:59:13 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (strtok): declaration removed because it is not used.

Tue Jun  5 19:33:51 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (proc_spawn): don't detect simple command line here
	  because rb_exec_fillarg already did.

Tue Jun  5 19:21:10 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_fillarg): bail out a loop eagerly.

Tue Jun  5 19:15:14 2012  Tanaka Akira  <akr@fsij.org>

	* process.c: add comments about async-signal-safe.

	* io.c: ditto.

Tue Jun  5 09:25:10 2012  Eric Hodel  <drbrain@segment7.net>

	* io.c:  Edited documentation for IO and File open and new and
	  Kernel#open for consistency and clarity.

Mon Jun  4 21:53:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_sysinit): let the system not display the
	  critical-error-handler message box and the Windows Error Reporting
	  dialog.  [ruby-core:45389] [Bug #6535]

Mon Jun  4 19:36:25 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_fillarg): allocate one more element before
	  beginning in argv_str for try_with_sh.

	* internal.h (ARGVSTR2ARGC): adjust for the above change.
	  (ARGVSTR2ARGV): ditto.

Mon Jun  4 19:17:06 2012  Tanaka Akira  <akr@fsij.org>

	* internal.h (ARGVSTR2ARGC): defined.
	  (ARGVSTR2ARGV): defined.

	* process.c (proc_exec_v): use ARGVSTR2ARGV.
	  (rb_spawn_process): use ARGVSTR2ARGC and ARGVSTR2ARGV.

	* io.c (pipe_open): use ARGVSTR2ARGV.

Mon Jun  4 16:13:00 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.h: remove magical code "lfp[0] & 0x02".
	  Current VM doesn't use this bit.

	* vm_core.h (RUBY_VM_GET_BLOCK_PTR): added.

	* eval.c (rb_block_given_p): use RUBY_VM_GET_BLOCK_PTR().

	* vm_eval.c (rb_f_block_given_p): ditto.

Mon Jun  4 15:39:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (constat_apply): apply VT100 functions.
	  [ruby-core:44958] [Feature #6418]

	* win32/win32.c (constat_parse): parse some VT100 escape sequence.

Mon Jun  4 14:06:12 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (rb_exec_err): should preserve errno.

Mon Jun  4 13:10:11 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/dl/test_c_{struct_entry,union_entity}.rb: broken require.

Mon Jun  4 12:01:21 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_backtrace.rb: fix test.
	  Windows path includes `:' character.

Mon Jun  4 11:42:39 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h (rb_location_t): fix type and field name.
	  (1) rename rb_location_t to rb_iseq_location_t.
	  (2) rename field names of rb_iseq_location_t to adjust
	      RubyVM::Backtrace::Location methods.
	      (2-1) filename -> path
	      (2-2) filepath -> absolute_path
	      (2-3) basename -> base_label
	      (2-4) name -> label
	  (3) rename filed name rb_iseq_location_t#line_no to
	      rb_iseq_location_t#first_lineno to clear purpose of this field.
	  (4) The field names rb_binding_t#(filename|line_no) are also renamed
	      to rb_binding_t#(path|first_lineno).

	* compile.c: apply above changes.

	* iseq.c: ditto.

	* proc.c: ditto.

	* vm*.c: ditto.

Mon Jun  4 11:40:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_object0): also load TYPE_USRMARSHAL, TYPE_DATA using
	  compatible loader.

Mon Jun  4 11:33:42 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (rb_run_exec_options_err): restore save_env() call for
	  non-fork environments.

	* process.c (rb_exec_err): restore environments after the failure of
	  exec to fix [ruby-core:44093] [Bug #6249] on non-fork environments

Mon Jun  4 10:42:04 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (pipe_open): follow up changes in r35889.

	* process.c (proc_spawn_n): now uses char ** instead of VALUE *.

	* process.c (rb_spawn_process): prog is now VALUE of String, not char *.

Mon Jun  4 06:12:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_object0): remove old warning for _alloc.

Mon Jun  4 04:24:06 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* marshal.c: experimental test aborted.
	* complex.c: ditto.
	* rational.c: ditto.
	* include/ruby/intern.h: ditto.

Mon Jun  4 00:45:18 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_spawn_process): fix for Windows.  not tested.

Mon Jun  4 00:11:51 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_proc_exec_e): don't use ISSPACE().  \f, \r and \v
	  are not word separator in Bourne shell.

Sun Jun  3 23:47:30 2012  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_exec_arg): remove argc and argv fields.
	  add use_shell, argv_str and argv_buf fields.

	* process.c (rb_proc_exec_e): don't split shell command line arguments
	  here to avoid memory allocation in a child process.
	  (rb_exec_fillarg): split shell command line arguments here.
	  (proc_exec_v): takes argv_str argument instead of argv.
	  (rb_proc_exec_ne): removed.
	  (rb_proc_exec_n): removed.
	  (rb_run_exec_options_err): don't initialize the removed fields.
	  (rb_exec_err): don't initialize the removed fields.
	  call proc_exec_v directly instead of rb_proc_exec_ne.
	  (rb_spawn_process): use use_shell field.

Sun Jun  3 21:53:00 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
	  http://www.gnu.org/licenses/gpl-2.0.txt

Sun Jun  3 21:22:52 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_exec_getargs): remove rb_exec_arg argument.

Sun Jun  3 21:14:26 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* marshal.c: calls directly rb_{Complex,Rational}_marshal_load().
	  But now disabled. [experimental]
	* complex.c: followed the above.
	* rational.c: ditto.
	* include/ruby/intern.h: ditto.

Sun Jun  3 21:18:17 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_check_argv): use rb_str_new_frozen instead of
	  rb_str_new4.

Sun Jun  3 20:10:52 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_proc_exec_e): extended version of rb_proc_exec() to
	  call execle().
	  (rb_proc_exec): use rb_proc_exec_e().
	  (rb_exec_err): use rb_proc_exec_e().

Sun Jun  3 19:47:18 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread.c (vm_living_thread_num): suppress a warning.

Sun Jun  3 17:23:52 2012  Tanaka Akira  <akr@fsij.org>

	* use execve() to preserve environment variables when exec method is
	  failed.  [ruby-core:44093] [ruby-trunk - Bug #6249]

	* include/ruby/intern.h (rb_exec_arg): add envp_str and envp_buf field
	  to store envp of execve().

	* process.c (proc_exec_v): takes envp_str as an argument and use it
	  for execve().
	  (rb_proc_exec_ne): extended version of rb_proc_exec_n().
	  (rb_proc_exec_n): use rb_proc_exec_ne().
	  (rb_proc_exec): follow proc_exec_v() change.
	  (fill_envp_buf_i): new function.
	  (rb_exec_arg_fixup): set up envp_str and envp_buf.
	  (save_env_i): removed.
	  (save_env): removed.
	  (rb_run_exec_options_err): don't modify environment variables.
	  (rb_exec_err): use rb_proc_exec_ne().

Sun Jun  3 16:33:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c: revert r35879 "now marshal_{load|dump} are external."

	* complex.c (nucomp_marshal__{dump,load}): should use rb_marshal_{dump,load}.

	* rational.c (nurat_marshal__{dump,load}): ditto.

Sun Jun  3 14:13:58 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: checks whether the object is frozen or not.

Sun Jun  3 14:00:51 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: wrote Complex#_dump and Complex::load.  But now
	  disabled (due to compatibility) [experimental].

	* rational.c: wrote Rational#_dump and Rational::load. ditto.

Sun Jun  3 10:23:32 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (nucomp_marshal_load): [ruby-core:45394]
	* rational.c (nurat_marshal_load): ditto.

Sun Jun  3 03:15:46 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* regparse.c (onig_number_of_names): suppress a warning.

Sun Jun  3 01:36:52 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c: change names.
	  (1) Class name: RubyVM::FrameInfo -> RubyVM::Backtrace::Location.
	  (2) Method name: RubyVM::FrameInfo.caller ->
	      Kernel.caller_locations.
	  (3) Instance methods of
	      RubyVM::FrameInfo (RubyVM::Backtrace::Location)
	      (3-1) name -> label
	      (3-2) basename -> base_label (basename is confusing with
		    File.basename)
	      (3-3) line_no -> lineno (We have already similar name
		    File#lineno, commented by kou [ruby-dev:45686]).
	      (3-4) filename -> path.
	      (3-5) filepath -> absolute_path.
	      (3-5) iseq -> removed (we will make other APIs to access iseq
		    and other information of frame for debugging).

	* test/ruby/test_backtrace.rb: apply above changes.
	  And apply comment from kou [ruby-dev:45686].

Sun Jun  3 00:49:11 2012  Koichi Sasada  <ko1@atdot.net>

	* common.mk: fix to build vm_backtrace.c only itself (vm_backtrace.c
	  is no longer included from vm.c).  I hope this separation reduce
	  compile time of vm.c.

	* internal.h: ditto.

	* vm.c, vm_core.h, vm_dump.c, vm_eval.c: ditto.

	* vm_eval.c: some functions (callee, etc) moved to vm_backtrace.c.

Sun Jun  3 00:20:53 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c: added.  Separate backtrace related functions to
	  this file.

	* vm.c, common.mk: ditto.

Sat Jun  2 18:09:02 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/ipaddr.rb: Inhibit zero-filled octets in an IPv4 address in
	  all platforms. [ruby-dev:45671]

	* lib/ipaddr.rb: Allow the x:x:x:x:x:x:d.d.d.d form not limited to
	  IPv4 mapped/compatible addresses.  This change also makes it
	  possible for the parser to understand IPv4 mapped and compatible
	  IPv6 addresses in non-compressed form.

	* lib/ipaddr.rb: Stop exposing IPSocket.valid*? methods which were
	  only usable on non-IPv6-ready platforms.

Sat Jun  2 16:59:00 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_enc_cr_str_buf_cat): don't reset coderange as unknown.
	  the condition 'ptr_a8 && str_cr != ENC_CODERANGE_7BIT' means not
	  unknown, str is also ASCII-8BIT because str_encindex == ptr_encindex,
	  and nont (str_cr == ENC_CODERANGE_UNKNOWN) and
	  str_cr != ENC_CODERANGE_7BIT means str_cr is valid because ASCII-8BIT
	  can't be broken. [ruby-dev:45688] [Bug #6509]

Sat Jun  2 07:04:48 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/re.rdoc (Performance):  Replaced incorrect example of reducing
	  backtracking through anchoring with reduced backtracking through a
	  range.  [ruby-trunk - Bug #6525]

Sat Jun  2 06:34:15 2012  Eric Hodel  <drbrain@segment7.net>

	* doc/re.rdoc (Performance):  Removed useless sample output from final
	  performance example and switched from #match to #=~ for consistency.
	  [ruby-trunk - Bug #6524]

Fri Jun  1 09:30:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (class_or_module_required): extract check for class or
	  module.

Fri Jun  1 08:50:47 2012  Eric Hodel  <drbrain@segment7.net>

	* array.c:  Updated Array documentation formatting.  Patch by Zachary
	  Scott.  [ruby-trunk - Feature #6517]

Fri Jun  1 06:57:10 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes):  Refactored
	  #set_ctypes using newer ruby features to simplify its implementation.
	* test/dl/test_c_struct_entry.rb (class DL):  Test to verify
	  refactoring.

Fri Jun  1 06:40:25 2012  Eric Hodel  <drbrain@segment7.net>

	* object.c (Init_Object):  Restored Kernel documentation based on
	  Pickaxe book documentation.  Patch by Zachary Scott.
	  [ruby-trunk - Feature #6521]

Fri Jun  1 06:29:42 2012  Eric Hodel  <drbrain@segment7.net>

	* object.c (rb_equal):  Let Object be a link in #=== documentation.
	  Patch by Zachary Scott.  [ruby-trunk - Feature #6518]

Thu May 31 09:27:06 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/dl/lib/dl/struct.rb (DL::CStructEntity::size):  Refactored ::size
	  to remove unused variables and simplify using newer ruby features.
	* test/dl/test_c_struct_entry.rb:  Test to validate refactoring

Thu May 31 08:40:34 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes):  Refactored
	  #set_types to reuse DL::CUnionEntity::size
	* test/dl/test_c_union_entity.rb:  Added test

Thu May 31 08:20:14 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size):  Fixed ::size to
	  return the size of the union.
	* test/dl/test_c_union_entity.rb:  Test for DL::CUnionEntity::size

Thu May 31 07:45:43 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/dl:  Added documentation.  Patch by Vincent Batts.
	  [ruby-trunk - Bug #6496]

Wed May 30 16:30:00 2012  Kenta Murata  <mrkn@cookpad.com>

	* ext/bigdecimal/lib/bigdecimal/jacobian.rb,
	  ext/bigdecimal/lib/bigdecimal/newton.rb:
	  fix documentation comments.
	  Patch by alperakgun from github.com/shyouhei/ruby/pull/8

Wed May 30 16:20:00 2012  Kenta Murata  <mrkn@cookpad.com>

	* ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian#dfdxi):
	  fix jacobian to get stuck in an infinite loop when a solution is not
	  found due to forget to increment nRetry counter.
	  Patch by alperakgun from github.com/shyouhei/ruby/pull/8

Wed May 30 10:58:31 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (utc_offset_arg): utc offset can be precision in seconds.
	  e.g. old Europe/Lisbon (c.f. [ruby-dev:40066])

Wed May 30 06:20:29 2012  Eric Hodel  <drbrain@segment7.net>

	* error.c (exc_set_backtrace):  Updated documentation to indicate
	  set_backtrace allows a string as well as an array of strings.
	  [ruby-trunk - Bug #6501]

Tue May 29 17:28:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* strftime.c (rb_strftime_with_timespec): support GNU extension triple
	  colons modifier.  [EXPERIMENTAL]

	* strftime.c (rb_strftime_with_timespec): check conversion with locale
	  modifier.

	* strftime.c (rb_strftime_with_timespec): colons are valid only for
	  'z' and must come just before it.

Mon May 28 16:56:55 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): StatusLineOutput
	  needs job_status to be :replace.

Mon May 28 13:35:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (do-install-*): fix dependencies.  based on the patch by
	  nagachika at [ruby-dev:45683].  [Bug #6506]

Mon May 28 12:03:04 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (obj_free): doesn't free a method table if it doesn't
	  exist. [ruby-dev:44436]
	* test/ruby/test_gc.rb (class TestGc): added the test case for
	  this issue.

Sun May 27 23:37:48 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm1_lvar_init.rb: added.
	  This benchmark measures a initialize time of non-used variable.

	* benchmark/bm_vm1_lvar_set.rb: added.
	  This benchmark measures a local variables initialization time.

	* benchmark/bm_vm2_bigarray.rb: added.
	  This benchmark mesures a big array literal creation time.

	* benchmark/bm_vm2_bighash.rb: added.
	  This benchmark mesures a big hash literal creation time.

	* benchmark/bm*: change notation "i=0" to "i = 0".

Sun May 27 13:33:26 2012  Koichi Sasada  <ko1@atdot.net>

	* benchmark/driver.rb: fix to continue benchmarks when
	  an error is occurred.

Sun May 27 11:27:50 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): fix operator
	  precedence, so that platform and TERM should be counted.

Sun May 27 10:02:33 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strftime.c: allows %Ok and %Ol.

Sun May 27 09:29:20 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: modified doc.

Sat May 26 19:04:34 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: added description.

Sat May 26 18:14:57 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strftime.c: reduced the code.

Sat May 26 18:08:59 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* time.c: modified doc.
	* ext/date/date_core.c: ditto.

Sat May 26 17:05:45 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (backtrace_*): change type of lev and n from size_t to int.
	  Also set type of rb_backtrace_t#backtrace_size to int.
	  A patch from nobu.

	* vm_eval.c: ditto.

Sat May 26 16:26:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (realpath_rec): UNC prefix does not end with path separator,
	  so new separator is needed after it.

Sat May 26 15:29:22 2012  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_backtrace.rb (test_caller_lev):
	  decrease recursion size.

Sat May 26 13:50:48 2012  Koichi Sasada  <ko1@atdot.net>

	* NEWS: add Kernel#caller's second argument.

Sat May 26 13:40:29 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (RubyVM::FrameInfo): add a class to access each frame
	  information.  You don't need to parse strings from caller().
	  FrameInfo has the following methods:
	    FrameInfo#name: method name, class name, etc with decorations.
	    FrameInfo#basename: name without decorations.
	    FrameInfo#line_no: line number.
	    FrameInfo#filename: file name.
	    FrameInfo#filepath: full filepath.
	    FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script)
	    FrameInfo#to_s: return caller() method style string.
	  RubyVM::FrameInfo.caller(n, lev) returns array of FrameInfo objects.
	  The name "RubyVM::FrameInfo.caller" is long and ambiguous (it is
	  confusing with Kernel::caller() method), we need to change the name
	  before Ruby 2.0 release. Good names or comments are welcome.

	* test/ruby/test_backtrace.rb: add a test for above change.

Sat May 26 12:18:09 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (frame_info_to_str): add `break'.

	* vm.c (backtrace_object): remove lev and n parameter.
	  backtrace_object always returns all of backtrace information.

	* vm.c (rb_backtrace_to_str_ary): fix to use backtrace_object().
	  This change improve performance of caller(lev, n).

	* benchmark/bm_vm3_backtrace.rb: added to check above improvement.
	  FYI: measurement on my laptop, 1.9.3p229 needs 5.125 sec,
	  and current trunk only needs 0.299sec.

Sat May 26 11:05:09 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (rb_frame_info_t): keep previous ISEQ frame info for CFUNC
	  frame info.  And fix to cache a calculated line_no of ISEQ frame
	  info.

Sat May 26 09:54:53 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.
	* test/openssl/test_ssl.rb: Simple tests for this.

	  Client-side renegotiation is still considered problematic, even
	  when used in the context of secure renegotiation (RI, RFC 5746).
	  The changes allow users to either completely disable client
	  renegotiation on the server, or to specify a maximum number of
	  handshakes allowed in total. The number of total handshakes is
	  counted in a callback set as SSL_set_info_callback. If the
	  maximum number of handshakes is exceeded an error will be raised
	  We do not support renegotiation in the OpenSSL extension, therefore
	  this feature can only be tested externally.
	  The feature is opt-in, the default setting will be to allow
	  unlimited client renegotiation, as was the case before.

Fri May 25 23:38:58 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_ssl.rb: Clarify the intention of errors to be
	  expected. Two errors are possible when connection is refused due
	  to a protocol version that was explicitly disallowed,
	  OpenSSL::SSL::SSLError or Errno::ECONNRESET, depending on the
	  OpenSSL version in use.

Fri May 25 22:19:40 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: Revert r35583
	* test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid
	  the test failing in Ruby CI [1]

	[1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all

Fri May 25 19:51:36 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (rb_f_caller): caller() method accepts second optional
	  argument `n' which specify how many frames should return.
	  For example, `caller(0, 1)' returns only one frame information
	  which calls caller() method.  If there are less than n frame
	  information, then all frame information are returned.  If n is 0,
	  then always return [].
	  This fix is part of [ruby-dev:42345] [Ruby 1.9-Feature#3917].
	  However, performance and features are not enough.
	  RDoc is also not available.

	* test/ruby/test_backtrace.rb: add a test for above.

Fri May 25 17:05:07 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c (oldbt_init, vm_backtrace_str_ary): arg->data should
	  be initialized before calling `backtrace_each()'.

Fri May 25 16:11:27 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* trunk/ext/-test-/printf/printf.c: change function names because of
	  conflict with msvcrt.  fixed build error of mswin.

Fri May 25 10:52:52 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c: refactoring backtrace related functions.
	  (1) unify similar functions (rb_backtrace_each() and
	      backtrace_object()).  backtrace_each() is a unified function.
	      variation:
	      a) backtrace_object(): create backtrace object.
	      b) vm_backtrace_str_ary(): create bt as an array of string.
	      c) vm_backtrace_print(): print backtrace to specified file.
	      d) rb_backtrace_print_as_bugreport(): print backtrace on
	                                            bugreport style.
	  (2) remove rb_backtrace_each().  Use backtrace_each() instead.
	  (3) change the type of lev parameter to size_t.
	      a) lev == 0 means current frame (exception, etc use it).
	      b) lev == 1 means upper frame (caller(0) use it).

	* vm_core.h, vm_dump.c, vm_eval.c: ditto.

	* vm.c (backtrace_object(), vm_backtrace_str_ary()): fix to return a
	  correct size of caller(lev) array.
	  Let n be a "caller(0).size" then ln as caller(lev).size should be
	  (n - lev).  However, the previous implementation returns a wrong
	  size array (ln > n - lev).  [ruby-dev:45673]

	* test/ruby/test_backtrace.rb: add tests for backtrace.

Fri May 25 08:51:39 2012  Eric Hodel  <drbrain@segment7.net>

	* enum.c (enum_count):  Enumerable#count no longer uses #size when
	  counting elements.  Patch by Nobuhiro IMAI.  [ruby-trunk - Bug #6473]

Fri May 25 01:15:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (ruby__sfvextra): [EXPERIMENTAL] use inspect instead of
	  to_s if plus flag is given.

	* vsnprintf.c (BSD_vfprintf): pass sign flag.

Fri May 25 00:37:22 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/rubygems/test_gem_indexer.rb (setup, teardown): save @tempdir
	  to remove it properly.  [Bug #5348]

Thu May 24 23:36:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vsnprintf.c (BSD_vfprintf): [EXPERIMENTAL] object representation in
	  rb_enc_vsprintf(). [Feature #5896]

Thu May 24 15:33:01 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_method.c (rb_method_defined_by): removed.
	  nobu pointed out that rb_method_basic_definition_p() is enough
	  for last commit.

	* error.c, eval_error.c: change for above.

Thu May 24 14:30:13 2012  Koichi Sasada  <ko1@atdot.net>

	* vm.c: add RubyVM::Backtrace object (btobj).
	  Backtrace information contains an array consists of location
	  information for each frames by string.
	  RubyVM::Backtrace object is lightweight backtrace information,
	  which contains complete information to generate traditional style
	  backtrace (an array of strings) with faster generation.
	  If someone accesses to backtrace information via
	  Exception#backtrace, then convert a RubyVM::Backtrace object to
	  traditional style backtrace.
	  This change causes incompatibility on marshal dumped binary
	  of Exception.  If you have any trouble on it, please tell us
	  before Ruby 2.0 release.
	  Note that RubyVM::Backtrace object should not expose Ruby level.

	* error.c, eval.c, vm_eval.c: ditto.

	* internal.h: ditto.

	* eval_error.c: fix to skip "set_backtrace" method invocation in
	  creating an exception object if it call a normal set_backtrace
	  method (defined by core).

	* test/ruby/test_settracefunc.rb: fix for above change.

	* vm_method.c (rb_method_defined_by): added.  This function
	  checks that the given object responds with the given method
	  by the given cfunc.

	* benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb:
	  add to measure exception creation speed. raise1 create
	  exception objects from shallow stack frame.  raise2 create
	  exception objects from deep stack frame.

Thu May 24 12:07:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_strip_bom): check EOF.  [Bug #6487][ruby-core:45203]

Wed May 23 22:06:14 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser of
	  HTTP Range request. Old one can't parse invalid specs and multiple
	  specs correctly.

Wed May 23 10:18:54 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (finish_overlapped_socket, overlapped_socket_io):
	  replace ECONNABORTED to EPIPE in send, sendto and sendmsg to improve
	  BSD socket compatibility.  this change removes a failure on the test
	  of net/ftp.

Wed May 23 05:35:58 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Broke up Net::HTTP into individual files.
	  [ruby-trunk - Feature #6435]
	* lib/net/http/backward.rb:  ditto.
	* lib/net/http/response.rb:  ditto.
	* lib/net/http/exceptions.rb:  ditto.
	* lib/net/http/responses.rb:  ditto.
	* lib/net/http/generic_request.rb:  ditto.
	* lib/net/http/header.rb:  ditto.
	* lib/net/http/request.rb:  ditto.
	* lib/net/http/proxy_delta.rb:  ditto.
	* lib/net/http/requests.rb:  ditto.

Wed May 23 05:15:11 2012  Eric Hodel  <drbrain@segment7.net>

	* class.c (rb_mod_init_copy):  Clear the cached inspect string of a
	  dup'd anonymous module or class.  [ruby-trunk - Bug #6454]
	* test/ruby/test_module.rb (class TestModule):  ditto

Tue May 22 16:49:15 2012  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: add a data type rb_location_t to store iseq location
	  information.
	  rb_location_t#filename, filepath, name and line_no was moved from
	  rb_iseq_t.  rb_location_t#basename is a new field which is
	  similar to `name' field without any decoration.
	  `name' field contains some decoration such as `block in foo'.
	  `basename' only contains `foo'.
	  rb_iseq_t contains memory object of rb_location_t.

	* iseq.c: setup rb_location_t for each rb_iseq_t memory objects.

	* compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c,
	  vm_method.c: support about it.

Tue May 22 00:45:05 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* struct.c (rb_struct_members): Refactoring.  As Struct#members had
	  returned an array of String, the old code was needed to convert
	  Symbols to Strings.  But it is almost unnecessary because the
	  method now returns an array of Symbols.  A patch by Masaki
	  Matsushita <glass.saga at gmail dot com>  [Feature #6218]
	  [ruby-dev:45451]

Mon May 21 19:20:25 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nil
	  because transfercmd may fail and return nil.

	* lib/net/ftp.rb (Net::FTP#retrlines): ditto.

Mon May 21 15:10:28 2012  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syslog/syslog.c: Classify constants and macros into several
	  sub-modules. (Syslog::Priority, Syslog::Level, Syslog::Option
	  and Syslog::Macros)

	* ext/syslog/syslog.c (mSyslog_inspect): Use rb_sprintf().

	* ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
	  module before calling rb_class2name().

Mon May 21 12:44:11 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (install): It seems tcl/tk is skipped in Travis
	  CI. Trying to fix the situation.

Mon May 21 12:11:25 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/depend (ENCOBJS): add dependencies.

	* enc/make_encmake.rb (target_encodings): extract dependencies.

Mon May 21 11:26:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.

Sun May 20 23:00:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): reopen $stdout to NULL, since setting
	  $stdout cannot affect child processes.

Sun May 20 21:36:39 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* enc/shift_jis.c (code_to_mbclen): return
	  ONIGERR_INVALID_CODE_POINT_VALUE if the code is invalid.

	* string.c (tr_next): increment character until the code
	  is a valid character. [ruby-dev:45652] [Bug #6450]

Sun May 20 12:25:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.

	* ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
	  of discard libraries needed by default.  [Bug #6462]

Sat May 19 19:04:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (command_output): ENCOBJS is needed for all linked
	  ruby, if --disable-shared and --with-static-linked-ext.

	* ext/extmk.rb (command_output): dmyext is needed as DLDOBJS if no
	  static linked extensions.

	* Makefile.in, common.mk (PROGRAM): no extension libraries.

	* common.mk (build-ext): pass macros for libruby.so.

	* ext/extmk.rb (command_output): link extension libraries and encoding
	  libraries into libruby.so, not ruby executable.

	* ext/extmk.rb (command_output): fold long macro lines.

	* Makefile.in (LIBEXT): add macro.

	* configure.in (ENCOBJS, EXTOBJS): use LIBEXT, not hardcoded suffix.

	* Makefile.in (LIBRUBY_A): fix typo.  re-applying r35242.

Sat May 19 04:46:53 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/openssl/extconf.rb: Use Logging::message instead of message.
	* ext/zlib/extconf.rb: ditto.

Fri May 18 18:13:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#configuration): keep space at end of
	  OUTFLAG and COUTFLAG.  [ruby-dev:45650]

Fri May 18 17:39:42 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (rb_thread_create_timer_thread): Added error
	  check when failing fcntl(). [Bug #6147] [ruby-dev:45364]

Fri May 18 17:41:00 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): link archives only, skip script only
	  extension libraries.

Fri May 18 17:25:33 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c: bump up fiber machine stack size when running on 64bit
	  arch. [Bug #6344] [ruby-dev:45554]

Fri May 18 15:20:56 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic.build): duplicate args before adding
	  new items. (don't change arguments)

	* lib/uri/generic.rb (URI::Generic.build): use URI::Generic::COMPONENT
	  if this method is called from URI::Generic.

	* lib/uri/generic.rb (URI::Generic.build2): escape only if the item is
	  a String.

	* lib/uri/generic.rb (URI::Generic.build2): use DEFAULT_PARSER because
	  it doesn't have parser method. [Bug #6420]

Fri May 18 15:54:07 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/zlib/extconf.rb: Use an exception instead of bare puts.

Fri May 18 15:53:05 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/psych/extconf.rb: Use an exception instead of bare abort.

Fri May 18 15:51:32 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/fiddle/extconf.rb: Use an exception instead of bare abort.

Fri May 18 15:49:35 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/readline/extconf.rb: Use an exception instead of bare exit.

Fri May 18 15:38:11 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/ripper/extconf.rb: Use an exception instead of bare
	  Logging.message.

Fri May 18 15:23:06 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/openssl/extconf.rb: Clarify a message when hit Apple
	  OpenSSL issue.

Fri May 18 15:14:32 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/extmk.rb: Show a message when extconf.rb raised an exception.
	* ext/openssl/extconf.rb: Use exception raising instead of message
	  and/or abort. We want to display error message to console _and_
	  logging into mkmf.log.

Fri May 18 06:14:07 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/syslog/lib/syslog/logger.rb:  Added Syslog::Logger which was
	  ported from the SyslogLogger gem.  [ruby-trunk - Feature #5096]
	* NEWS:  ditto.
	* test/syslog/test_syslog_logger.rb:  ditto.

Fri May 18 01:28:21 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c (transcode_string): fix encoding index names.
	  Thanks markizko for reporting.

Thu May 17 23:03:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: fix function name to be checked, to initialize
	  rb_thread_cond_t properly.

	* thread_pthread.c (native_cond_initialize, native_cond_destroy):
	  fix macro name.

Thu May 17 12:53:07 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* thread.c, thread_pthread.c: Moved pthread-specific preprocessor
	  hacks to thread_pthread.c

Thu May 17 12:18:47 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* io.c: Fix a mistake on merging the patch in the previous commit.

Thu May 17 11:33:07 2012  Yuki Yugui Sonoda  <yugui@google.com>

	Imports Ruby's port to NativeClient (a.k.a NaCl).
	Patch by Google Inc. [ruby-core:45073].

	* configure.in (RUBY_NACL): New M4 func to configure variables for
	  NaCl.
	  (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
	  of Pepper interface types.
	  (BTESTRUBY): New variable to specify which ruby should be run on
	  "make btest". NaCl can run the built binary by sel_ldr, but it need
	  rbconfig.rb. So this variable is distinguished from $MINIRUBY.

	* thread_pthread.c: Disabled some features on NaCl.

	* io.c: ditto.

	* process.c: ditto.

	* signal.c: ditto.

	* file.c: ditto.

	* missing/flock.c: ditto.

	* nacl/pepper_main.c: An example implementation of Pepper application
	  that embeds Ruby.

	* nacl/example.html: An example of web page that uses the Pepper
	  application.

	* nacl/nacl-config.rb: Detects variants of NaCl SDK.

	* nacl/GNUmakefile.in: Makefile template for NaCl specific build
	  process.

	* nacl/package.rb: script for packaging a NaCl-Ruby embedding
	  application.

	* nacl/reate_nmf.rb: Wrapper script of create_nmf.py

	* dln.c (dln_load): Added a hack to call on NaCl.

	* util.c (ruby_getcwd): Path to the current directory is not available
	  on NaCl.

Thu May 17 10:54:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tk/extconf.rb: add -l options to $libs not $LDFLAGS,
	  to be passed to EXTLIBS in exts.mk.

	* enc/encinit.c.erb: use %-lines to adjust indent in the generated file.

	* lib/mkmf.rb (MakeMakefile#have_framework): combine -framework option
	  and its argument with an equal sign not to be separated in merge_libs.

	* ext/tk/extconf.rb: ditto.

	* ext/extmk.rb: EXTLDFLAGS also needs to be passed.

Wed May 16 15:44:22 2012  Yuki Yugui Sonoda  <yugui@google.com>

	* configure.in: Fix an unbalanced quote.

Wed May 16 15:43:10 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/extmk.rb (exts.mk): use double quotes instead of single quotes
	  for commandline because it's not recognized as quotes on Windows.

Wed May 16 15:15:55 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LD): enclose with single quotes but not double quotes
	  not to expand command substitution.

Wed May 16 14:19:51 2012  Yuki Yugui Sonoda  <yugui@google.com>

	Supports static linking of extensions and encodings again.
	Fixes --with-static-linked-ext.

	Patch by Google Inc. [ruby-core:45073].

	* Makefile.in (ENCOBJS, EXTOBJS): New variables to specify static
	  linked libraries. Also reintroduces extinit.o, introduces encinit.o
	  introduces encinit.o

	* common.mk: Builds static libraries rather than shared objects if
	  specified.

	* configure.in (LD): new substitution.

	* enc/depend: Supports static linked libraries
	  (libencs, libenc, libtrans): New target.

	* enc/encinit.c.erb: new template to generate the initialization of
	  statically linked encodings.

	* enc/make_encmake.rb (--module): new flag to specify whether static
	  or dynamic.

	* transcode_data.h (TRANS_INIT): New macro to get rid of the name
	  collision of encoding initializers and transcoder initializers.

	* ext/extmk.rb: Fixes the behavior on $extstatic is true.

	* lib/mkmf.rb (clean-static): new target to clean up static linked
	  libraries.

	* ruby.c (process_options): New initializes statically linked
	  encodings here.

Wed May 16 14:30:43 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c: fixed a merge mistake of r33878, reported by nobu via IRC.

Wed May 16 06:59:41 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strftime.c: should also be aware of flags on
	  complex specifier.

Wed May 16 05:11:29 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string
	  subclass dumping and loading.

	* test/psych/test_array.rb: pertinent tests

	* test/psych/test_string.rb: ditto

Wed May 16 01:31:21 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to
	  Psych::Omap objects rather than hashes. [Bug #6425]

	* test/psych/test_omap.rb: pertinent test.

Wed May 16 01:15:45 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: keep a reference to
	  custom coders so that GC does not impact dumped yaml reference ids.

Tue May 15 23:59:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Options#setup_options): add --color option.

	* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): defer color code
	  initialization to regard --color option.

Mon May 14 16:28:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (f_arglist): should reset lexical states after empty
	  argument list with no parenthesis as well as parenthesized list,
	  so that reserved name method definition work.  [ruby-dev:45626]
	  [Bug #6403]

Mon May 14 00:14:24 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* enumerator.c (lazy_take_func, lazy_take): multiple calls of
	  force/to_a method to Enumerator::Lazy#take should return same
	  results. [ruby-dev:45634] [Bug #6428]

	* test/ruby/test_lazy_enumerator.rb (test_take_recycle): add test for
	  above.

Sun May 13 23:38:31 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/test_io.rb (test_flush_in_finalizer1): don't use IO.for_fd
	  to close IO objects. it create IO object with already closed fd, and
	  cause occasional Errno::EBADF in following tests. [ruby-core:45020]
	  [Bug #6228]

Sun May 13 23:32:16 2012  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/test_io.rb (TestIO): revert r35631. it broke the intent of
	  test_flush_in_finalizer1.  [ruby-core:43951] [Bug #6228]

Sun May 13 22:46:36 2012  Tanaka Akira  <akr@fsij.org>

	* ext/etc/etc.c (passwd_ensure): move endpwent() call from
	  passwd_iterate to close /etc/passwd on exception.
	  (group_ensure): move endgrent() call from group_iterate to close
	  /etc/group on exception.

Sun May 13 18:10:43 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strftime.c: removed unused code and changed the style.

Sun May 13 17:37:56 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strftime.c: refactored.

Sun May 13 06:40:12 2012  Luis Lavena  <luislavena@gmail.com>

	* test/ruby/test_io.rb (class TestIO):  Disable GC during IO tests to
	  avoid file descriptors being GC'ed. Suggestion by Tomoyuki Chikanaga
	  [ruby-core:43951][Bug #6228]

Sat May 12 07:00:16 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/sdbm/init.c:  Added documentation.  Patch by Justin Collins,
	  cleanup by Zachary Scott.  [ruby-trunk - #6410]

Sat May 12 06:02:03 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/fileutils.rb (cp_r):  Fixed cp_r example.  Patch by TJ Koblentz
	  from pull request #114.  [ruby-trunk - Bug #6411]

Sat May 12 05:23:06 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread.c (rb_threadptr_execute_interrupts_common):
	  test_signal_requiring of test/ruby/test_signal.rb fail if the sub
	  process is killed on waiting IO in lex_io_gets in rb_load_file in
	  rb_load_internal in require.
	  This is because
	  (1) the process receive the killing signal in
	      rb_thread_io_blocking_region in rb_read_internal in lex_io_gets.
	  (2) set th->errinfo as INT2FIX(TAG_FATAL) at
	      rb_threadptr_execute_interrupts_common.
	  (3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG()
	      without set loaded as TRUE.
	  (4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded
	      is FALSE as above. this errinfo should be an exception object
	      but this is INT2FIX(TAG_FATAL).
	  Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum.

Fri May 11 14:23:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): begin/end block should be isolated from outside.
	  [ruby-dev:45631][Bug #6419]

Fri May 11 14:09:47 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
	  must not cast it to unsigned long, which may be shorter than
	  VALUE, and the result can be mere garbage.

Fri May 11 09:51:07 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary
	  newlines if no reports to be displayed.

Thu May 10 10:55:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/minitest/test_minitest_mock.rb: Correct requiring path to
	  metametameta.rb.

	* test/minitest/test_minitest_unit.rb: Correct requiring path to
	  metametameta.rb.

Thu May 10 10:18:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (lex_state_name): returns name for lex_state_e, for debug
	  use.

Wed May  9 16:36:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from
	  pkg-config works actually.

Wed May  9 16:01:38 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (decode_utf7, encode_utf7): refactored by
	  Nobuyoshi Nakada, to use String#encode.

Wed May  9 13:26:25 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/rubygems/test_gem_remote_fetcher.rb: skip OpenSSL dependent
	  tests if not available.

Wed May  9 08:09:38 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 3.0.0 (r7435)
	* test/minitest/*: ditto
	* test/rubygems/*: Imported fixes for buggy use of assert_match
	  and deprecated assert_block
	UNBUNCH YOUR PANTIES. THE TESTS DO NOT RUN CLEAN ON OSX.

Wed May  9 06:28:59 2012  Eric Hodel  <drbrain@segment7.net>

	* re.c (rb_reg_equal):  Removed incorrect example for Regexp#== with
	  "n" option.  [ruby-talk - Bug #6415]

Wed May  9 06:23:33 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: reverted.

Wed May  9 04:31:26 2012  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/ring.rb (lookup_ring_any): fix Rinda::RingFinger.primary
	  hungs forever. [ruby-talk:395364]

Tue May  8 21:09:00 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* include/ruby/win32.h (FD_SET): change function to macro.
	  To avoid buffer overflow when smaller FD_SETSIZE is used in ext
	  libraries.

	* win32/win32.c (rb_w32_fdset): this function is not used anymore.
	  But we leave this for compatibility.

	* win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller
	  FD_SETSIZE is used in ext libraries. Dereference of fd_set pointer
	  causes SEGV.

	* test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for
	  above.
	* ext/-test-/win32/fd_setsize/depend: ditto.
	* ext/-test-/win32/fd_setsize/extconf.rb: ditto.
	* ext/-test-/win32/fd_setsize/fd_setsize.c: ditto.

	  [ruby-core:44588] [Bug #6352]

Tue May  8 20:44:46 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
	  If the end of reading buffer is CR, io_unread() needs to unread one
	  more byte.
	  [ruby-core:44874] [Bug #6401]

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
	  add a test for above.

Tue May  8 13:38:17 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/date/date_core.c: improving introduction in Date/DateTime
	  documentation. patched by Daniel Kaufman via Github.
		https://github.com/ruby/ruby/pull/110

Tue May  8 13:36:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (POSTLINK): default to : command to get rid of flag
	  only command, since BSD make does not work with it.

Tue May  8 13:35:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid
	  of IndexError, which could caused by modified $@ sometimes.

Tue May  8 11:21:27 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/minitest/metametameta.rb (MetaMetaMetaTestCase#assert_report):
	  support drive letter on Windows.  yes, the original code is metameta.

Tue May  8 08:54:48 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/abbrev.rb:  Fixed typo in abbrev pattern documentation.  Based on
	  patch by Mark Rushakoff.  [ruby-trunk - #6346]

Tue May  8 07:44:18 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_ssl.c (ossl_start_ssl): remove useless rb_sys_fail
	  before ossl_raise. this cause a test failure on Linux.
	 http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz

Tue May  8 05:35:18 2012  Eric Hodel  <drbrain@segment7.net>

	* object.c (Init_Object):  Added reference to variable.c where
	  public_constant and private_constant documentation lives.  [#6381]

Tue May  8 04:47:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#output): prefer local output to
	  get rid of unexpected side effect in test/minitest/metametameta.rb.

	* lib/test/unit.rb (MiniTest#run_test): show the running test in $0.

	* lib/test/unit.rb (Test::Unit::StatusLineOutput): new class to output
	  in status line.

	* test/testunit/test_hideskip.rb (TestHideSkip#test_hideskip):
	  MiniTest#puke now reports Skipped messages only if verbose mode.

	* test/testunit/test_sorting.rb (TestTestUnitSorting#test_sorting):
	  ditto.

	* lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
	  drop useless reports, not override entirely.

	* bootstraptest/runner.rb (exec_test, show_progress): show rotators
	  and pass/fail counts.

	* sample/test.rb (PROGRESS): refine output.

Tue May  8 02:34:26 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/minitest/unit.rb (assert_match): refix of r35563.
	  r35563 breaks the intention of the original change.
	 https://github.com/seattlerb/minitest/commit/68858105b2eb11c85105ffac5f32b662c59397f3
	* lib/minitest/unit.rb (refute_match): ditto.

Mon May  7 21:19:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: Merge JSON 1.7.1.
	 https://github.com/flori/json/commit/e5b9a9465c1159fae533bca320d950b772bcb4ac

Mon May  7 22:54:22 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: add support for option flags
	  OpenSSL::SSL::OP_NO_TLSv1_1
	  OpenSSL::SSL::OP_NO_TLSv1_2
	  to allow blocking specific TLS versions. Thanks to Justin Guyett for
	  pointing this out to me.
	* test/openssl/test_ssl.rb: add tests to assert correct behavior when
	  blocking certain versions of TLS/SSL both on server and client side.
	  Also refactored tests to reduce boilerplate code a little.
	* test/openssl/utils.rb: rescue Errno::ECONNRESET for tests where
	  client rejects the connection because a forbidden protocol version
	  was used.

Mon May  7 20:14:15 2012  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb (random_bytes): call to_int method for the
	  argument at first.

Mon May  7 17:54:12 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/minitest/unit.rb (assert_match): replace matcher only if both
	  matcher and obj are String. fix r35541. [Bug #6405]
	  DON'T COMMIT IF YOU CAN'T RUN TEST.
	  FIX AS SOON AS POSSIBLE YOU BREAK TESTS.
	  patched by ayumin.
	  https://github.com/seattlerb/minitest/pull/124

	* lib/minitest/unit.rb (refute_match): ditto.

Mon May  7 13:41:00 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (PROGRAM), configure.in (POSTLINK): sign built program
	  using RUBY_CODESIGN identity.

Mon May  7 13:03:55 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (body_type_attachment): parse body type
	  "ATTACHMENT". [ruby-core:44849] [Bug #6397]

Mon May  7 10:49:36 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before
	  they are used. [ruby-core:44900] [Bug #6406]

Mon May  7 10:27:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data.

Mon May  7 10:23:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on.

	* test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb,
	  test/ruby/test_io_m17n.rb (assert_str_equal): ditto.

	* test/rubygems/test_gem_remote_fetcher.rb
	  (assert_data_from_{server,proxy}): ditto.

	* test/test_pstore.rb (test_thread_safe): ditto.

Mon May  7 10:16:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/rubygems/test_gem_installer.rb (TestGemInstaller#test_dir): fix
	  argument order.  expected value must come first.

Mon May  7 09:14:11 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: support TLSv1.1 & TLSv1.2. Add
	  SSLContext#version to inspect the version that was negotiated for
	  a given connection.
	* ext/openssl/extconf.rb: detect TLS 1.1 & 1.2 support.
	* test/openssl/test_ssl.rb: add tests for TLS 1.1 & 1.2 given they
	  are supported by the native OpenSSL being used.

Sun May  6 21:34:29 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (io_encoding_set): suppress warnings. [ruby-dev:45627]
	  this tmp1 is not required after r35538.

	* addr2line.c: suppress warnings.

Sun May  6 18:39:39 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (iseq_compile_each): remove unused variable `size'.

Sun May  6 14:50:03 2012  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb: show actual read length in an error message.

Sat May  5 06:43:10 2012  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 2.12.1 (r7323)
	* test/minitest/*: ditto

Sat May  5 01:47:33 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/zlib/test_zlib.rb (test_inflate): add a test for Zlib.inflate.
	  patched by headius (Charles Nutter). [ruby-core:44859] [Bug #6398]

	* test/zlib/test_zlib.rb (test_deflate): add a test for Zlib.deflate.

Sat May  5 00:53:55 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (parse_mode_enc): remove warnings 'Ignoring internal encoding'.
	  [ruby-core:44455] [Bug #6324]

	* io.c (io_encoding_set): ditto.

Fri May  4 07:19:02 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rdoc/parser.rb (RDoc.binary?): fix wrong regexp.
	  [ruby-core:44798] [Bug #6393]

Fri May  4 01:33:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/parser.rb (RDoc.alias_extension): a real file is irrelevant
	  to aliasing.  [ruby-core:44796][Bug #6392]

	* lib/rdoc/parser.rb (RDoc.zip?): non-existent file will not be a zip
	  file.

	* lib/rdoc/parser.rb (RDoc.can_parse_by_name): accept aliased
	  extension file names.

	* lib/rdoc/parser.rb (RDoc.binary?): binary read data may have
	  incomplete multibyte sequence.  [ruby-core:44798][Bug #6393]

Wed May  2 23:55:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::RequireFiles#non_options): expand
	  real path to get rid of loading same files via symlinks.

Wed May  2 23:26:04 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* cont.c (rb_fiber_m_transfer): improve sample code in Fiber#transfer
	  documentation. emphasize the difference between transfer and resume.

Wed May  2 23:21:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): allow spaces between lambda arrow and
	  parenthesis.  [ruby-dev:45605][Feature #6390]

Wed May  2 19:06:30 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* cont.c (rb_fiber_m_transfer): Improved Fiber documentation.
	  patched by Anuj Dutta. [ruby-core:44540][Bug #6343]

Wed May  2 13:06:37 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* README, README.ja: reformatted using rdoc markup.  based on the
	  patches by zzak (Zachary Scott) in [Feature #6388].

	* README, README.ja: updated the author's mail address.

Wed May  2 09:46:09 2012  Kouji Takao  <kouji@takao7.net>

	* ext/readline/readline.c (Readline.special_prefixes=)
	  (Readline.special_prefixes): new function. An original patch was
	  created by nagachika. [Feature #5784]

Tue May  1 22:18:45 2012  Kouji Takao  <kouji@takao7.net>

	* ext/readline/readline.c (Readline.pre_input_hook)
	  (Readline.insert_text, Readline.redisplay): new function. An
	  original patch was created by nagachika. [Feature #5785]

Tue May  1 15:46:48 2012  Koichi Sasada  <ko1@atdot.net>

	* common.mk: "$(Q)-..." doesn't work on nmake.

Tue May  1 15:32:10 2012  Koichi Sasada  <ko1@atdot.net>

	* common.mk: replace '@' prefix to '$(Q)' to control build
	  process outputs.

Tue May  1 14:17:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/deprecation.rb (OpenSSL.check_func): check if header is
	  available for macro compatibility.

Tue May  1 10:53:54 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_settracefunc.rb: ignore traces from another threads
	  because Kernel.set_trace_func affects other threads.

Tue May  1 06:04:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/digest/sha2/sha2.c (REVERSE32): explicitly cast since unsigned
	  long may be larger than sha2_word32.

	* ext/digest/sha2/sha2.c (SHA{256,512,384}_{Final,End}): should clear
	  whole content, not pointer size.

	* ext/digest/*/extconf.rb: use pkg_config to use same library with
	  openssl.  [ruby-core:44755][Bug #6379]

	* ext/openssl/deprecation.rb: extract check for broken Apple OpenSSL.

Tue May  1 05:02:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (optflags): disable unsafe optimizations.
	  [ruby-core:44679][Bug #6370]

Mon Apr 30 23:36:49 2012  Tanaka Akira  <akr@fsij.org>

	* lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod to
	  update meta data of symlinks.

Mon Apr 30 23:05:53 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/ruby/test_continuation.rb (tracing_with_set_trace_func): don't
	  call Continuation from other threads. [ruby-dev:45596] [Bug #6382]

Mon Apr 30 20:10:04 2012  Tanaka Akira  <akr@fsij.org>

	* ext/zlib/extconf.rb: detect z_crc_t type which will be defined
	  since zlib-1.2.7.

	* ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available.

Mon Apr 30 09:02:15 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/openssl/lib/openssl/ssl.rb: add hostname to "hostname does not
	  match server cert." error. patched by Wes Morgan via Github.
	  https://github.com/ruby/ruby/pull/122

Mon Apr 30 04:43:53 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/json/yaml_events.rb: implicit styles should not
	  be changeable for JSON events.

Sun Apr 29 06:12:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (assoc, parser_yylex): add syntax to splat keyword hash.
	  [ruby-core:44591][Feature #6353]

	* compile.c (compile_array_): generate keyword splat insns.

	* vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate
	  hash.  leftward argument is prior currently.

Fri Apr 27 12:34:23 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
	  unsigned long long on Win64.
	  [ruby-core:44636][Bug #6364] reported by raylinn@gmail.com (ray linn)

Fri Apr 27 10:58:17 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/readline/test_readline.rb (setup): avoid affected by user's
	  inputrc file.  [ruby-dev:45584][Bug #6357]

Fri Apr 27 01:45:05 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread.c (rb_threadptr_execute_interrupts_common):
	  handle timer_interrupt only on the first loop for the case to avoid
	  the infinite loop like following case:
	  * there is 2 Ruby threads (3 pthreads)
	  (1) main thread is waiting at gvl_yield:112 (native_cond_wait)
	  (2) sub thread works
	  (3) sub thread waits at gvl_yield:133 (native_mutex_unlock)
	  (4) main thread works
	  (5) main thread goes to gvl_acquire_common
	  (6) main thread call rb_wakeup_timer_thread
	  (7) timer thread set timer interrupt to the main thread
	  (8) main thread works
	  (9) main thread waits at gvl_acquire_common:64 (native_cond_wait)
	  (10) sub tread works
	  (11) set sub thread as the current thread
	  (12) run Ruby thread
	  (13) ...100ms
	  (14) sub thread goes to rb_threadptr_execute_interrupts_common
	  (15) sub thread call rb_thread_schedule_limits
	  (16) sub thread call gvl_release_common
	  (17) sub threads waits at gvl_yield:121 (native_cond_wait)
	  (18) main threads works
	  (19) main thread back to gvl_yield
	  (20) set main thread as the current thread
	  (21) main thread call gvl_yield
	  (22) main thread waits at gvl_yield:112 (native_cond_wait)
	  As described above, the main thread can't escape from
	  rb_threadptr_execute_interrupts_common.
	  See extended memo: http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/R35480_ExtendedMemo

Fri Apr 27 07:15:07 2012  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
	  path in sockaddr_un, really.
	  reported by nagachika.
	 http://d.hatena.ne.jp/nagachika/20120426/ruby_trunk_changes_35474_35476

Thu Apr 26 12:28:06 2012  Tanaka Akira  <akr@fsij.org>

	* ext/socket/raddrinfo.c (init_unix_addrinfo): support the longest
	  path in sockaddr_un.
	  (inspect_sockaddr): ditto.
	  (addrinfo_mdump): ditto.
	  (addrinfo_mload): ditto.
	  (rsock_unixpath_str): new function.
	  (rsock_unixpath): removed.
	  (rsock_unixaddr): use rsock_unixpath_str.

	* ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
	  path in sockaddr_un.
	  (sock_s_unpack_sockaddr_un): ditto.
	  (sock_s_gethostbyaddr): unused variable removed.

	* ext/socket/unixsocket.c (rsock_init_unixsock): support the longest
	  path in sockaddr_un.

	* ext/socket/rubysocket.h (rsock_unixpath_str): declared.
	  (rsock_unixpath): removed.

	* test/socket/test_unix.rb: comment out test_nul because abstract unix
	  sockets may contain NULs.

Thu Apr 26 01:32:33 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/optparse/test_summary.rb (test_summary_containing_space): add
	  test for r35467. OptionParser#to_a shouldn't split banner by spaces.

Wed Apr 25 23:02:46 2012  Tanaka Akira  <akr@fsij.org>

	* ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
	  format.
	  (addrinfo_mload): show more information on "too long AF_UNIX path"
	  error.
	  (addrinfo_unix_path): ditto for "too short AF_UNIX address" and
	  "too long AF_UNIX address" error.

Wed Apr 25 05:46:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#to_a): split for each lines.
	  [ruby-dev:45568][Bug #6348]

Tue Apr 24 21:57:53 2012  Tanaka Akira  <akr@fsij.org>

	* ext/socket/raddrinfo.c (init_unix_addrinfo): show actual path length
	  when it is too long for Unix socket.

	* ext/socket/unixsocket.c (rsock_init_unixsock): ditto.

	* ext/socket/socket.c (sock_s_pack_sockaddr_un): ditto.

Tue Apr 24 21:43:58 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* lib/net/smtp.rb (check_continue): raise an error with an explanatory
	  message.  [ruby-core:35854] [Feature #4598]

Tue Apr 24 21:11:31 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/optparse.rb (OptionParser#to_a): should split by end-of-line,
	  and MUST TEST IT, MUST RUN THE TEST, MUST VERIFY BEFORE BACKPORT.
	  [ruby-dev:45568][Bug #6348]

Tue Apr 24 19:59:31 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enc/euc_jp.c: added EUC-JP-2004 and its alias EUC-JISX0213.
	  [ruby-dev:45571] [Feature #6349]
	  Requested by Kyouhei Yanagita <yanagi@shakenbu.org>.

	* enc/trans/japanese_euc.trans: ditto.

	* enc/trans/JIS/JISX0213-[12]%UCS@{BMP,SIP}.src: JIS X 0213:2004 ->
	  Unicode mapping table from NetBSD.

	* enc/trans/JIS/UCS@{BMP,SIP}%JISX0213-[12].src: Unicode -> JIS X
	  0213:2004 mapping table from NetBSD.

	* tool/transcode-tblgen.rb: added SIP support.

	* test/ruby/test_transcode.rb: tests of above changes.

Tue Apr 24 18:12:13 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c: fix to output warning when the same literals
	  are available as a condition of same case clause.
	  And remove information ('#n') because we can find duplicated
	  condition with explicit line numbers.
	  [ruby-core:38343] [Ruby 1.9 - Bug #5068]

	* test/ruby/test_syntax.rb: add a test for above.

Tue Apr 24 17:03:51 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (waitpid): need to check the return value of
	  FindChildSlotByHandle() before passing poll_child_status().
	  this fixed a SEGV in test-all.  reported by ko1 via IRC.

Tue Apr 24 16:04:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): EXPR_BEG by keywords is a start point of
	  commands.  [ruby-dev:45563][Bug #6347]

	* parse.y (superclass): ditto for superclass.

	* parse.y (parser_parse_string, parser_here_document): ditto for
	  string interpolation.

	* parse.y (parser_yylex): ditto for singleton class.

Tue Apr 24 15:51:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#to_a): should split by end-of-line
	  [ruby-dev:45568][Bug #6348]

	* lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
	  defined.  [ruby-dev:45568][Bug #6348]

Tue Apr 24 12:46:50 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.
	  [Feature #6276]

Tue Apr 24 10:54:34 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/drb/drbtest.rb ({DRbCore,DRbAry}#teardown): cannot pass SIGTERM
	  to another process on Windows, so use SIGINT instead.

Tue Apr 24 00:25:39 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* thread.c (rb_check_deadlock): refine an error message of deadlock
	  detection.  [ruby-core:44336] [Bug #6288]

Tue Apr 24 00:14:42 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* parse.y (primary): remove wrong "fixpos" that caused incorrect
	  source_location of blocks.  [ruby-core:42232] [Bug #5930]

	* test/ruby/test_proc.rb: add a test for above.

Mon Apr 23 22:56:08 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv: deprecated.  [Feature #6322]

Mon Apr 23 22:07:00 2012  Tanaka Akira  <akr@fsij.org>

	* test/socket/test_unix.rb (bound_unix_socket): make temporary
	  filename shorter for less possibility of Unix socket path over
	  107 bytes when TMPDIR has long path.

Mon Apr 23 20:35:49 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (szInternalCmds, internal_match, internal_cmd_match):
	  get rid of a segmentation fault with GCC 4.7.0.
	  reported by raylinn@gmail.com (ray linn) at [ruby-core:44505]
	  [Bug #6333], and patched by mame.

	* test/ruby/test_system.rb (TestSystem#test_system): test for it.

Mon Apr 23 20:11:02 2012  Tanaka Akira  <akr@fsij.org>

	* lib/drb/ssl.rb: generate 1024 bits RSA key instead of 512 bits.
	  OpenSSL 1.0.1 rejects 512 bits RSA key for TLS1.2 with SHA512.
	 http://rt.openssl.org/Ticket/Display.html?id=2769&user=guest&pass=guest
	  reported by Bohuslav Kabrda.
	  [ruby-core:43844] [ruby-trunk - Bug #6221]

Mon Apr 23 19:54:33 2012  Tanaka Akira  <akr@fsij.org>

	* test/drb/drbtest.rb: rescue Errno::ESRCH for Process.kill.
	  reported by NARUSE, Yui.  [ruby-dev:45551]

Mon Apr 23 14:16:45 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* .gdbinit (rb_ps_vm): follow st_table's packing change.

Mon Apr 23 10:43:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: disable rubygems not to load rbconfig.rb before
	  fake.rb.  [ruby-core:44492][Bug #6329]

Sun Apr 22 20:26:06 2012  Tanaka Akira  <akr@fsij.org>

	* lib/drb/extservm.rb (DRb::ExtServManager): don't use /bin/sh to
	  invoke service subprocess.  mark detach threads for clean up.

	* test/drb/drbtest.rb: clean up the service subprocess in teardown.

	* test/drb/test_drb.rb: set @service_name for teardown.

	* test/drb/test_drbunix.rb: ditto.

	* test/drb/test_drbssl.rb: ditto.

	[ruby-dev:45547]

Sun Apr 22 07:51:29 2012  Tanaka Akira  <akr@fsij.org>

	* lib/drb/ssl.rb: close accepted TCP socket if SSL accept is failed.
	  [ruby-dev:45541]

Sat Apr 21 14:36:49 2012  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb: fix sticks on some tests problem
	  [Bug #6272]

Fri Apr 20 12:24:04 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem:  Removed to avoid
	  conflict with ca-bundle.pem
	* lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem:
	  ditto.
	* lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem:
	  ditto.

Fri Apr 20 08:07:06 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.23 which contains security
	  fixes:

	  RubyGems now disallows redirection from HTTPS to HTTP.

	  RubyGems now verifies SSL connections.

	  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
	  changes since 1.8.22.
	* test/rubygems:  ditto.

Thu Apr 19 16:33:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* strftime.c (rb_strftime_with_timespec): fix carry-up bug and
	  overwrite '+' with '-' if negative offset less than a hour.
	  [ruby-core:44447][Bug #6323]

Thu Apr 19 09:39:57 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/-test-/win32/dln/extconf.rb: need import library for ordinal
	  entry even on mingw.  [ruby-core:44441][Bug #6320]

Thu Apr 19 09:35:15 2012  Eric Hodel  <drbrain@segment7.net>

	* random.c (random_init):  Clarify that the default seed is
	  Random.new_seed, not zero.  Based on patch by Roger Pack.
	  [ruby-trunk - Bug #6313]
	* random.c (rb_f_srand):  ditto.

Thu Apr 19 08:59:02 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/curses/curses.c (window_nodelay):  Fixed call-seq of nodelay to
	  include the '='.

	  Improved description window.nodelay=.

Thu Apr 19 08:47:54 2012  Eric Hodel  <drbrain@segment7.net>

	* io.c (io_readpartial):  Document the output buffer parameter is
	  overwritten with the read contents even when non-empty.
	  Patch by yu nobuoka.  [ruby-trunk - Bug #6285]
	* io.c (io_read_nonblock):  ditto.
	* io.c (io_read):  ditto.
	* io.c (rb_io_sysread):  ditto.
	* io.c (argf_read):  ditto.
	* io.c (argf_readpartial):  ditto.
	* ext/stringio/stringio.c (strio_read):  ditto.
	* test/ruby/test_argf.rb (class TestArgf):  Add test for existing
	  behavior of read outbuf.
	* test/ruby/test_io.rb (class TestIO):  ditto.
	* test/stringio/test_stringio.rb (class TestStringIO):  ditto.

Wed Apr 18 22:58:55 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (DOT, DOXYGEN): use AC_CHECK_PROGS instead of
	  AC_CHECK_PROG which needs the third argument.  [ruby-core:44433]
	  [Bug #6316]

	* configure.in (PKG_CONFIG): fix condition to skip older version
	  of pkg-config.  continue in backticks does not affect outside.

Wed Apr 18 13:59:40 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/file.c (INVALID_FILE_ATTRIBUTES): define for old SDK.

Wed Apr 18 10:22:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* strftime.c (rb_strftime_with_timespec): add an interim digit for
	  the timezone offset which is less than an hour.

Wed Apr 18 09:58:29 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/version.rb:  Fixed init_with warning by calling into
	  yaml_initialize (for syck) from psych's init_with

Wed Apr 18 09:03:43 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.22 plus r33517 and r35337 which
	  were ported to the rubygems git repository.

	  See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
	  changes since 1.8.11.

	* test/rubygems:  ditto.

Tue Apr 17 22:18:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* strftime.c (rb_strftime_with_timespec): fix padding of time zone
	  offset.  [ruby-dev:43287][Bug #4458]

Tue Apr 17 13:11:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dln.c (rb_w32_check_imported): skip ordinal entries.  based on a
	  patch by phasis68 (Heesob Park) at [ruby-core:44381].
	  [ruby-core:44371][Bug #6303]

Mon Apr 16 18:22:14 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* spec/default.mspec: expand relative path for ruby_exe which uses
	  them with Dir.chdir; it breaks relative paths, for example
	  core/kernel/exec_spec.rb.

Mon Apr 16 16:22:40 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrant
	  versions.

	* configure.in (RUBY_MSVCRT_VERSION): define on mingw too.

	* win32/Makefile.sub (config.h): prefix RT_VER with RUBY and make
	  more descriptive to get rid of potential conflict.

Mon Apr 16 15:19:39 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (NO_RUBY_VENDOR_LIB): fix missing comma.

Mon Apr 16 12:17:12 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb (hermitian?): Bug fix, patch by George Koehler
	  [Bug #6290] [rubyspec:4b9573d7613]

Mon Apr 16 09:42:50 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#download): should
	  use File.identical? to check the identity of the files.
	  this fixed an error of a test on Windows.

Sat Apr 14 12:55:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code
	  if -O3 is given.

	* win32/win32.c (child_result): dropped colon.

Sat Apr 14 10:45:18 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/server.rb (WEBrick::GenericServer#start):
	  partially revert r35315.

	* test/webrick/test_server.rb (test_start_exception):
	  received signal is delivered to the main thread, so it is needed to
	  emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]

Sat Apr 14 09:35:45 2012  Eric Hodel  <drbrain@segment7.net>

	* variable.c (trace_ev):  Removed "not reached" comment as this line is
	  reached.
	* variable.c (rb_obj_remove_instance_variable):  Replaced "not reached"
	  comment with the UNREACHABLE macro.
	* variable.c (rb_mod_const_missing):  ditto.
	* variable.c (rb_mod_remove_cvar):  ditto.
	* enum.c (first_i):  ditto.
	* string.c (rb_str_aref):  ditto.
	* string.c (str_byte_aref):  ditto.
	* string.c (rb_to_id):  ditto.
	* io.c (rb_io_fmode_modestr):  ditto.
	* io.c (rb_io_oflags_modestr):  ditto.
	* pack.c (num2i32):  ditto.
	* vm_eval.c (rb_method_missing):  ditto.
	* vm_eval.c (rb_f_throw):  ditto.
	* dir.c (dir_read):  ditto.
	* win32/win32.c (child_result):  ditto.
	* struct.c (rb_struct_getmember):  ditto.
	* struct.c (rb_struct_set):  ditto.
	* struct.c (rb_struct_aref_id):  ditto.
	* eval.c (rb_f_raise):  ditto.
	* process.c (rb_f_exit_bang):  ditto.
	* process.c (rb_f_exit):  ditto.
	* process.c (rb_f_abort):  ditto.
	* ext/-test-/iter/break.c (iter_break_value):  ditto.
	* ext/pty/pty.c (pty_check):  ditto.
	* ext/openssl/ossl_pkey.c (ossl_pkey_new):  ditto.
	* ext/readline/readline.c (rb_remove_history):  ditto.
	* ext/stringio/stringio.c (strio_unimpl):  ditto.
	* numeric.c (num_sadded):  ditto.
	* numeric.c (num_init_copy):  ditto.
	* numeric.c (rb_num2ll):  ditto.
	* numeric.c (rb_num2ull):  ditto.
	* vm_insnhelper.c (call_cfunc):  ditto.
	* ruby.c (opt_W_getter):  ditto.
	* bignum.c (rb_big_coerce):  ditto.
	* file.c (rb_f_test):  ditto.

Sat Apr 14 08:38:20 2012  Eric Hodel  <drbrain@segment7.net>

	* encoding.c (rb_enc_codepoint_len):  Use UNREACHABLE to avoid "control
	  reaches end of non-void function" warnings.  [ruby-trunk - Bug #6066]
	* re.c (name_to_backref_number):  ditto.
	* object.c (rb_Float):  ditto.
	* io.c (io_readpartial):  ditto.
	* io.c (io_read_nonblock):  ditto.
	* pack.c (rb_uv_to_utf8):  ditto.
	* proc.c (rb_method_entry_arity):  ditto.
	* vm_method.c (rb_f_notimplement):  ditto.
	* struct.c (rb_struct_aset_id):  ditto.
	* class.c (rb_scan_args):  ditto.
	* process.c (rlimit_resource_type):  ditto.
	* process.c (rlimit_resource_value):  ditto.
	* process.c (p_uid_switch):  ditto.
	* process.c (p_gid_switch):  ditto.
	* ext/digest/digest.c (rb_digest_instance_update):  ditto.
	* ext/digest/digest.c (rb_digest_instance_finish):  ditto.
	* ext/digest/digest.c (rb_digest_instance_reset):  ditto.
	* ext/digest/digest.c (rb_digest_instance_block_length):  ditto.
	* ext/bigdecimal/bigdecimal.c (BigDecimalCmp):  ditto.
	* ext/dl/handle.c (rb_dlhandle_close):  ditto.
	* ext/tk/tcltklib.c (pending_exception_check0):  ditto.
	* ext/tk/tcltklib.c (pending_exception_check1):  ditto.
	* ext/tk/tcltklib.c (ip_cancel_eval_core):  ditto.
	* ext/tk/tcltklib.c (lib_get_reltype_name):  ditto.
	* ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core):  ditto.
	* ext/tk/tkutil/tkutil.c (tk_hash_kv):  ditto.
	* ext/openssl/ossl_ssl.c (ossl_ssl_session_reused):  ditto.
	* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1):  ditto.
	* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit):  ditto.
	* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve):  ditto.
	* ext/fiddle/conversions.c (generic_to_value):  ditto.
	* ext/socket/raddrinfo.c (rsock_io_socket_addrinfo):  ditto.
	* ext/socket/socket.c (sock_s_getnameinfo):  ditto.
	* ext/ripper/eventids2.c (ripper_token2eventid):  ditto.
	* cont.c (return_fiber):  ditto.
	* dmydln.c (dln_load):  ditto.
	* vm_insnhelper.c (vm_search_normal_superclass):  ditto.
	* bignum.c (big_fdiv):  ditto.
	* marshal.c (r_symlink):  ditto.
	* marshal.c (r_symbol):  ditto.

Fri Apr 13 17:12:09 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* hash.c (inspect_i): keep string's coderange.

Fri Apr 13 15:26:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_aset, rb_hash_update, rb_hash_update_by): use
	  st_update() to reduce evaluation of hash values.

Fri Apr 13 15:17:36 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
	  this method is to deny new connections, not shutdown yet.

	* lib/webrick/server.rb (WEBrick::GenericServer#start):
	  re-raise exception only when the exception is Interrupt (^C).

Thu Apr 12 19:51:45 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: added some notes.

Wed Apr 11 17:16:49 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (compile_array, compile_array_):
	  Divide big array (or hash) literals into several blocks and
	  concatenate them.  There was a problem that a big array (hash)
	  literal causes SystemStackError exception (stack overflow)
	  because VM push all contents of the literal onto VM stack to
	  make an array (or hash).  To solve this issue, we make several
	  arrays (hashes) and concatenate them to make a big array (hash)
	  object.  [ruby-dev:37701] [Bug #982]

	* compile.c (iseq_compile_each, setup_args): use modified
	  compile_array.

	* vm.c (m_core_hash_from_ary, m_core_hash_merge_ary,
	  m_core_hash_merge_ptr): added for above change.

	* id.c (Init_id), parse.y: add core method ids.

	* bootstraptest/test_literal.rb: add simple tests.

	* bootstraptest/test_eval.rb: remove rescue clause to catch
	  SystemStackError exception.

	* test/ruby/test_literal.rb: add tests to check no stack overflow.

Thu Apr 12 07:10:37 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/uri/generic.rb (module URI):  URI now downcases the scheme to
	  follow RFC 2396 section 3.1.  [ruby-trunk - Feature #4551]
	* test/uri/test_generic.rb (class URI):  Test for above

Thu Apr 12 06:15:44 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/protocol.rb (module Net):  Added ReadTimeout to match
	  OpenTimeout.  ReadTimeout is now raised by rbuf_fill instead of
	  Timeout::Error to help users distinguish what type of timeout
	  occurred.  [ruby-trunk - Feature #6088]
	* lib/net/pop.rb (module Net):  Updated documentation for ReadTimeout
	  and OpenTimeout.
	* lib/net/http.rb (module Net):  ditto
	* lib/net/smtp.rb (module Net):  ditto
	* lib/net/telnet.rb (module Net):  Net::ReadTimeout is now raised in
	  waitfor to match Net::Protocol.
	* test/net/http/test_http.rb:  Updated Timeout::Error expectation to
	  Net::ReadTimeout.
	* test/net/ftp/test_ftp.rb:  ditto

Thu Apr 12 05:27:01 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/webrick/server.rb (module WEBrick::GenericServer):  A server
	  will now continue only when a StandardError subclass is raised.  For
	  other exception types the error will be logged at the fatal level and
	  the server will safely stop.  Based on a patch by Alex Young.
	  [ruby-trunk - Feature #6236]
	* test/webrick/test_server.rb:  Test for new exception handling
	  behavior.  Join the server thread instead of busy-waiting for it to
	  shut down to remove race conditions.

Thu Apr 12 03:50:44 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit:Runner::Worker#_run_suites):
	  call GC.start before running the test suites.

Wed Apr 11 22:31:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_check_id_cstr): new function to check if ID is
	  registered with NUL-terminated C string.

	* sprintf.c (rb_str_format): avoid inadvertent symbol creation.

Wed Apr 11 20:28:36 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because
	  io_unread() doesn't work properly when reading CRLF with read(length)
	  and mode 'r'.
	  [ruby-core:44189][Bug #6271]

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof):
	  test for above.

Wed Apr 11 07:38:33 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/digest/sha2/lib/sha2.rb (Digest#block_length):  Fixed method name
	  in documentation examples.  Patch by naleski via
	  https://github.com/ruby/ruby/pull/115

Wed Apr 11 07:33:13 2012  Eric Hodel  <drbrain@segment7.net>

	* pack.c (pack_pack):  Warn when an invalid character is found in the
	  format string when $VERBOSE is true.  [ruby-trunk - Feature #5219]
	* pack.c (pack_unpack):  ditto
	* test/ruby/test_pack.rb (class TestPack):  Test for warnings on
	  invalid format characters.

Wed Apr 11 06:11:10 2012  Eric Hodel  <drbrain@segment7.net>

	* string.c (rb_str_tr):  Documented use of \ to escape characters.
	  [ruby-trunk - Bug #6161]
	* string.c (rb_str_count):  ditto

Wed Apr 11 05:14:51 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/abbrev.rb:  Clarified that Abbrev.abbrev returns a Hash instead
	  of an Array.  Patch by Andrei Bocan.  [ruby-trunk - Bug #6107]

Wed Apr 11 03:02:24 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/ripper/lib/ripper/sexp.rb: fix spelling. patched by
	  Jonathan Hinkle via https://github.com/ruby/ruby/pull/116

Tue Apr 10 19:07:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_enc_raise): new function to raise an exception with
	  the message in the given encoding.  patched by now (Nikolai
	  Weibull) at [ruby-core:41160].  [Feature #5650]

Tue Apr 10 18:19:32 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP#send_request_with_body_stream):
	  use IO.copy_stream for requests using body_stream.
	  patched by Eric Wong. [ruby-core:40898] [Feature #5605]

Tue Apr 10 16:53:21 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c: add prototype declarations for older Mac OS X.
	  [ruby-core:43376][Bug #6170]

Tue Apr 10 15:35:21 2012  Koichi Sasada  <ko1@atdot.net>

	* compile.c (iseq_set_sequence): show a hint if there are duplicated
	  "when" clauses.  [ruby-core:41502] [ruby-trunk - Feature #5716]

Tue Apr 10 09:57:00 2012  Eric Hodel  <drbrain@segment7.net>

	* string.c (rb_str_split_m):  Documented behavior of split on the empty
	  string.  [ruby-trunk - Feature #3575]

Tue Apr 10 09:48:31 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (rb_deflate_s_deflate):  Fixed ruby example replacing
	  NO_FLUSH with FINISH.  [ruby-trunk - Bug #6273]

Mon Apr  9 23:10:26 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (isUNCRoot, winnt_stat): support long UNC.
	  [ruby-core:30623][Feature #3399]

Mon Apr  9 15:16:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (string_content, parser_yylex): count brace nesting to
	  dispatch embexpr_end.  [ruby-core:43775][Bug #6211]

Mon Apr  9 13:06:58 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* hash.c (rb_hash_set_default_proc): Accept nil, patch by Run Paint
	  [Feature #4234]

	* test/ruby/test_hash.rb: test for above.

Mon Apr  9 08:01:15 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strftime.c: gets the value with range() consistently.
	* ext/date/date_strftime.c (range): now just replaces the given item.

Mon Apr  9 06:58:01 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (nucomp_expt): [ruby-core:44170].

Mon Apr  9 02:52:03 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* complex.c (nucomp_expt): the result of f_complex_new2 may be a fixnum
	  with mathn. [ruby-core:44170] [Bug #6267]

Sun Apr  8 22:46:01 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json/generator/generator.c (generate_json_bignum):
	  add RB_GC_GUARD.
	 http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20120407T210301Z.diff.html.gz

Sun Apr  8 07:26:40 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): get keys
	  and fetch values from it to prevent @timeout_info's error
	  "can't add a new key into hash during iteration".

Sun Apr  8 06:51:57 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (io_unread): cast as long the value for extra_max.
	  [ruby-core:44137] [Bug #6257]

Sun Apr  8 06:46:48 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
	  use readpartial to get data even if the response is streaming data and
	  each data is smaller than @buffer_size.
	  patched by yu nobuoka. [ruby-dev:45471] [Bug #6230]

Sat Apr  7 22:35:36 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
	  new function.

	* process.c (enum): add EXEC_OPTION_PGROUP and move the position
	  above for the usage in proc_spawn_n().

	* process.c (proc_spawn_n): add an argument to pass new option
	  `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to
	  CreateProcessW(). This flag is necessary for the usage of
	  Process.kill on the subprocess on Windows.

	* process.c (rb_exec_arg_addopt): ditto.

	* process.c (rb_spawn_process): ditto.

	* process.c (documentation for rb_f_spawn): add documentation for new
	  option `new_pgroup` of spawn.

	* test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup):
	  add tests for option `new_pgroup`.

	* test/ruby/test_thread.rb
	  (TestThreadGroup#test_thread_timer_and_interrupt):
	  add option `new_pgroup: true` to spawn on Windows. It's needed for
	  Process.kill on a subprocess.

	* win32/win32.c (CreateChild): add an argument to pass
	  dwCreationFlags of CreateProcessW().

	* win32/win32.c (rb_w32_spawn): ditto.

	* win32/win32.c (rb_w32_aspawn_flags): add new function to pass
	  dwCreationFlags.

	* win32/win32.c (rb_w32_aspawn): refactor to move the content to
	  rb_w32_aspawn_flags().
	  [ruby-core:43245][Bug #6131]

Sat Apr  7 22:32:00 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_thread.rb
	  (TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
	  Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
	  flag is not specified in a call to CreateProcessW().

	* win32/win32.c (CreateChild): revert the usage of
	  CREATE_NEW_PROCESS_GROUP flag for compatibility.
	  [ruby-core:43245][Bug #6131]

Sat Apr  7 10:28:40 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: bumping up psych version to match release.
	* ext/psych/psych.gemspec: ditto

Sat Apr  7 02:07:00 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c: fall back to any encoding if the external
	  encoding is wrong.  [ruby-core:44163]
	* test/psych/test_encoding.rb: fix test

Fri Apr  6 16:24:24 2012  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* struct.c (documentation for rb_struct_members_m):
	  fix 'array of strings' to 'array of symbols'
	  [ruby-core:44152][Bug #6264]

Fri Apr  6 14:27:04 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* Makefile.in ($(LIBRUBY_A)): fix typo.

Thu Apr  5 13:26:15 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* missing/alloca.c (xmalloc, xfree): use ruby version, not
	  depending on RUBY_LIB_PREFIX.  [ruby-dev:45492][Bug #6255]

Wed Apr  4 13:06:39 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.

Wed Apr  4 10:33:31 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and
	  read on closing.

Wed Apr  4 01:48:35 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.

	* lib/ftp/ftp.rb (Net::BufferedSocket#shutdown): added.

	* test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): wait socket
	  with shutdown and read.

Tue Apr  3 19:00:52 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): should wait
	  a little before closing socket because if the client call
	  Net::FTP#getmultiline the socket is suddenly closed by the server in
	  the getline loop.

Tue Apr  3 18:33:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (setreuid, setregid): suppress warnings.
	  [ruby-core:43374][Bug #6169]

Tue Apr  3 10:18:27 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (inspect_enumerator): suppress uninitialized
	  instance variable warnings.  [ruby-dev:45449][Bug #6214]
	  patched by no6v (Nobuhiro IMAI).

Mon Apr  2 13:25:08 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse/ac.rb: autoconf-like options.

Mon Apr  2 10:34:00 2012  eregon  <eregontp@gmail.com>

	* string.c (rb_str_start_with, rb_str_end_with): raise an error if
	  an argument is not convertible to a String.
	  [ruby-core:40623][Bug #5536]

Mon Apr  2 03:35:25 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/server.rb (WEBrick::GenericServer): close socket only if
	  the socket is not closed yet.

Sun Apr  1 23:03:18 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io
	  for Net::FTP#abort and Net::FTP#status.

Sun Apr  1 00:41:56 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb: fixed the domain name in examples.

Sat Mar 31 21:39:45 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent
	  @timeout_info's "can't add a new key into hash during iteration".

Sat Mar 31 14:22:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (hash_default_value): extract from rb_hash_aref(), to be
	  shared with rb_hash_shift(), so that overriding Hash#default
	  will be respected.

Sat Mar 31 14:16:02 2012  Sokolov Yura (funny-falcon)  <funny.falcon@gmail.com>

	* hash.c: do not allocate st_table when it is not necessary.

Sat Mar 31 13:42:39 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.

Sat Mar 31 13:20:40 2012  Sokolov Yura (funny-falcon)  <funny.falcon@gmail.com>

	* hash.c: remove unnecessary checks for Qundef in hash iterations.
	  since hash use st_foreach_check for iterations, such checks are
	  needless.

Sat Mar 31 12:05:01 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_x509cert.c: Fix doc typo.

Sat Mar 31 10:13:24 2012  Sokolov Yura (funny-falcon)  <funny.falcon@gmail.com>

	* st.c (st_foreach_check, st_foreach): remove ancient check.  This
	  check are from initial ordered hash commit when first entry were
	  created with entry->fore = entry->back = entry.

	* st.c (st_delete): use real_entries in st_delete for packed tables

Sat Mar 31 07:53:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c (st_foreach_check): remove the entry by replacing with never
	  when ST_DELETE.

	* hash.c (st_foreach_safe): since table is not for VALUE, Qundef is
	  not special value, so use 0 instead.  therefore this function can be
	  applied to only st_table which 0 is invalid as keys, e.g., IDs.

	* hash.c: Qundef cannot be passed from st_foreach_check().

	* hash.c, marshal.c, object.c, variable.c: fix callback argument types
	  of iterators.

Thu Mar 29 23:50:15 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c (st_update): pass pointer to key to the callback function.

Thu Mar 29 16:36:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c (st_update): add existing parameter to the callback function.

Thu Mar 29 16:35:32 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (terminal_width, del_status_line, put_status):
	  extract as methods.

Thu Mar 29 10:20:18 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkcs7.c: fix crash when parsing garbage data.
	* test/openssl/test_pkcs7.rb: assert correct behavior for it.
	  Thanks to Matt Venables for reporting the issue.
	  [ruby-core:43250][Bug #6134]

Thu Mar 29 10:16:05 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* thread_win32.c (TIME_QUANTUM_USEC): 10ms(= old setting) [experimental]
	  cf. [Bug #6098]

Thu Mar 29 10:12:12 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* thread.c (rb_threadptr_execute_interrupts_common): use defined
	  TIME_QUANTUM_USEC instead of a magic number.  there is no meanings
	  to use different values for checking interval of interruption and
	  thread switching limits.
	  cf. [Bug #6098]

Thu Mar 29 09:26:17 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_x509cert.rb: exclude test that fails when issuing
	  a certificate with RSA signature and DSS1 digest for earlier
	  OpenSSL versions when used in conjunction with OpenSSL 1.0.1.
	  Thanks, Vit Ondruch, for reporting the issue.
	  [ruby-core:42949][Bug #6089]

Thu Mar 29 08:25:35 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* NEWS: add note about unified behavior of encoding nil values in
	  instances of OpenSSL::ASN1::ASN1Data.

Thu Mar 29 07:45:36 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_asn1.c: raise TypeError when trying to encode nil
	  values for Primitive instances.
	* test/openssl/test_asn1.rb: Assert consistent behavior when
	  encoding nil values: Primitives raise TypeError, Constructives
	  raise NoMethodError.
	  Fixes [ruby-core:43009][Bug #6102]

Wed Mar 28 16:39:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (obj2uid, obj2gid): allow strings as input user/group id.
	  [ruby-core:40923][Feature #5610]

Wed Mar 28 15:06:18 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,
	  otherwise it should be converted to US-ASCII in rb_intern_str() if
	  possible.  [ruby-core:43762][Bug #6209]

Wed Mar 28 08:44:24 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: updating version to match gem
	* ext/psych/psych.gemspec: ditto
	* ext/psych/lib/psych/visitors/to_ruby.rb: fixing deprecation warning

Tue Mar 27 23:44:11 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (io_unread): fixed memory leak.  report by nagachika via IRC.

Tue Mar 27 22:44:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (verconf.h): separate load path specific stuff from
	  config.h.

Tue Mar 27 22:43:40 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub: fix config.h path to include.

Tue Mar 27 17:08:08 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* win32/win32.c (check_if_dir): fix memory leak.

Tue Mar 27 13:13:51 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_new_empty): should copy also the encoding as an
	  empty substring.  [ruby-dev:45441][Bug #6206]

Mon Mar 26 23:43:04 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (parse227, parse228, parse229): don't use $~.

Mon Mar 26 23:34:40 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (parse227, parse228, parse229): don't use local
	  variables defined by named capture for other Ruby implementations
	  such as Rubinius.

Mon Mar 26 23:19:03 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (parse_pasv_port): refactored.

Mon Mar 26 19:49:49 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* test/net/ftp/test_ftp.rb: add the test, which was forgotten in the
	  previous commit.

Mon Mar 26 19:37:27 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (parse227, parse228, parse229): refactored.

Mon Mar 26 11:46:23 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (inspect_enumerator): show method arguments of
	  lazy enumerators correctly.

Mon Mar 26 13:51:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (check_if_dir, check_if_wdir): fix for Visual C++
	  not to use S_ISDIR().  [Feature #2408][ruby-core:26925]

	* ruby.c (load_file_internal): ditto.

Mon Mar 26 11:46:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (load_file_internal): bail out if the script is a directory.
	  [Feature #2408][ruby-core:26925]

	* win32/win32.c (rb_w32_open, rb_w32_wopen): check if the file is a
	  directory when access denied, to set errno to EISDIR.

Sun Mar 25 18:13:14 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (tr_setup_table): fix multiple non latin argument for
	  non latin (over 256 characters) tr-like methods.
	  [ruby-core:43371] [Bug #6167]

Sun Mar 25 00:46:06 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator (lazy_initialize): set the instance variable "receiver"
	  to include the receiver to the return value of inspect on a lazy
	  enumerator directly created by Enumerator::Lazy.new.

	* enumerator (RETURN_LAZY): don't set the instance variable "receiver".

Sat Mar 24 23:59:00 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator (enumerator_inspect): include the original receiver and
	  method name of Enumerator::Lazy in the result of inspect.
	  [ruby-core:43345] [Bug #6159]

	* enumerator (InitVM_Enumerator): don't use rb_define_alias for
	  some methods such as collect in order to make rb_frame_this_func()
	  return the correct method names.

Sat Mar 24 22:22:18 2012  Sambasiva Rao Suda  <sambasivarao@gmail.org>

	* time.c (time_init_1): Time.new will accept seconds as string or
	  int.  [ruby-core:43569][Bug #6193]

Fri Mar 23 15:12:12 2012  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* transcode.c (documentation for str_encode): Explain
	  that transcoding to the same encoding is a no-op
	  (i.e. no exceptions, no replacements,...).
	  [ruby-core:43557][Bug #6190]

Fri Mar 23 13:19:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_str_to_inum): must be ASCII compatible encoding as
	  well as String#hex and String#oct.  [ruby-core:43566][Bug #6192]

	* string.c (rb_must_asciicompat): check if ASCII compatible.

Thu Mar 22 23:14:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (str_encode_bang, encoded_dup): if nothing was
	  transcoded, just set encoding but leave coderange unchanged as
	  force_encoding.  [ruby-core:43557][Bug #6190]

Thu Mar 22 22:30:44 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* io.c (static int io_fflush): add the definition.
	  Use it in set_binary_mode_with_seek_cur().

	* io.c (set_binary_mode_with_seek_cur): refactoring to split the
	  content into io_unread(). Fix the possibility of buffer overflow.

	* io.c (io_unread): add new implementation for Windows. Previous one
	  caused invalid cursor position using IO#pos with OS text mode. New
	  one fixes the bug.

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for
	  above bug.
	  [ruby-core:43497] [Bug #6179]

Thu Mar 22 19:55:08 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME
	  to time_t directly, not to be affected by TZ unnecessarily.

	* win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME
	  simply.

Thu Mar 22 13:43:31 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type.
	  [Bug #6094]

Thu Mar 22 11:14:10 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.
	  see [ruby-core:43550]

Wed Mar 21 17:57:57 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* regcomp.c: Merge Onigmo 3d855b30d574536d3ae600260208c6624ae4791c.
	  [Bug#6143] [Bug#6144] [Bug#6145]

Wed Mar 21 17:01:55 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.
	  see [Bug #6179][ruby-core:43518]

Mon Mar 19 17:18:51 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_flat_map_func): convert the block value to
	  Array if it doesn't respond to each.  [ruby-core:43334]
	  [Bug #6155]

Mon Mar 19 16:34:14 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enum.c (zip_i): variadic argument needs explicit cast on the
	  platforms where VALUE is longer than int.

Mon Mar 19 15:36:41 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (enumerable_lazy): add an example of take and first
	  to the documentation.  [ruby-core:43344] [Bug #6158]
	  add the description of the behavior when a block is given to zip
	  or cycle.

Mon Mar 19 15:20:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_specialized_instruction): DRY and replace chain
	  of if-else with switch for special instructions.  based on a
	  patch by Vasfed.  https://github.com/ruby/ruby/pull/105

Mon Mar 19 15:05:54 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/test_pty.rb: same as r29280, skip tests when PTY allocation
	  failed (that's not our fault).

Sun Mar 18 23:21:17 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (aligned_free): fix condition for free.  memalign() and
	  posix_memalign() are not defined together normally.

Sun Mar 18 18:31:45 2012  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* gc.c (aligned_malloc, aligned_free): added fallback implementations
	  for platforms like OSX Leopard.

Sun Mar 18 17:17:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_pow): estimate result bit size more precisely.
	  [ruby-core:30735][Feature #3429]

Sun Mar 18 17:17:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (free_method_entry_i): method entry may be in
	  unlinked_method_entry_list.  [ruby-core:43383][Bug #6171]

Sun Mar 18 15:27:31 2012  Tanaka Akira  <akr@fsij.org>

	* compile.c: typo fix by Run Paint Run Run.
	  [ruby-core:28368] [Bug #2824]

Sun Mar 18 10:01:02 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* lib/profiler.rb: support calling singleton methods of
	  an instance of BasicObject.

Sat Mar 17 06:56:58 2012  Eric Hodel  <drbrain@segment7.net>

	* object.c:  Fix indentation of Class#inherited example.

Sat Mar 17 01:46:05 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* string.c (trnext): fix bug with string ending with '\\'.
	  [ruby-dev:45374][Bug #6160]

	* test/ruby/test_string.rb (TestString#test_delete): test for
	  above.

Fri Mar 16 20:06:24 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (trnext): should advance char-wise.
	  [ruby-core:43335][Bug #6156]

Fri Mar 16 17:42:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (block_append_gen): fix unreachable warning line number.
	  should warn at the code, not jump.

Fri Mar 16 17:33:08 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (enum_take): allocate buffer array before iteration, as well
	  as enum_first did.

	* enum.c (enum_first): remove duplication.

Fri Mar 16 14:43:18 2012  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* load.c (ruby_init_ext): don't free the given pointer itself.
	  It is not guaranteed even that the pointer is on heap.

Fri Mar 16 14:37:57 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_eval.c (rb_mod_module_eval): fix the documentation of
	  class_eval to mention class variable lookup.  [ruby-core:40649]
	  [Bug #5544]

Fri Mar 16 14:27:11 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_eval.c (rb_mod_module_eval): fix the documentation of
	  class_eval to mention constant lookup.  [ruby-core:41718]
	  [Bug #5777]

Fri Mar 16 14:10:45 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (initialize): raise Net::IMAP::Error when the
	  connection is closed without a greeting response.
	  [ruby-core:40938] [Bug #5616]

Fri Mar 16 13:50:12 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (rfc822_text): ignore [] after RFC822.
	  [ruby-core:40945] [Bug #5620]

Fri Mar 16 12:00:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (argument_error): use line number at the beginning
	  of lambda, not the first code of its body.
	  [ruby-core:43314][Bug #6151]

	* iseq.c (rb_iseq_first_lineno): constified.

Fri Mar 16 11:20:07 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_take): don't enumerate an extra value.
	  [ruby-dev:45370] [Bug #6152]

Fri Mar 16 06:30:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (lazy_zip_func): variadic argument needs explicit cast
	  on the platforms where VALUE is longer than int.

	* enumerator.c (lazy_init_iterator): no need to check overflow twice.

Fri Mar 16 05:47:09 2012  Eric Hodel  <drbrain@segment7.net>

	* enumerator.c (lazy_init_iterator):  Fix type error (int vs long).

Thu Mar 15 23:13:36 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enum.c (rb_enum_values_pack): rename from enum_values_pack, and
	  remove static.

	* enumerator.c (lazy_init_iterator, lazy_init_yielder,
	  lazy_select_func, lazy_reject_func, lazy_grep_func): handle
	  multiple values correctly.

	* enumerator.c (lazy_grep): change the behavior when a block is
	  given, to be consistent with Enumerable#grep.

Thu Mar 15 19:12:31 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_zip): rescue StopIteration returned by
	  Enumerator#next.

Thu Mar 15 18:19:53 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_zip, lazy_cycle): Enumerator::Lazy#{zip,cycle}
	  should be eager when a block is given, to be consistent with
	  Enumerable#{zip,cycle}.

Thu Mar 15 17:45:27 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (InitVM_Enumerator): renamed Enumerable::Lazy to
	  Enumerator::Lazy.

Thu Mar 15 16:37:38 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (enumerable_lazy): added cycle to the documentation.

Thu Mar 15 15:37:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): fix warning line number.

Thu Mar 15 15:19:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (lazy_cycle): check argument number overflow before
	  creating temporary array.

Thu Mar 15 15:04:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_strtod): no need to check same digit for hexdigit
	  twice.  [ruby-dev:45363][Bug #6146]

	* parse.y (sym_check_asciionly): check ascii compatibility before
	  scanning for code range.

	* parse.y (intern_str): set to us-ascii if ascii only.
	  [ruby-dev:45363][Bug #6146]

	* file.c (ruby_enc_find_basename): allow NULL as alllen.
	  [ruby-dev:45363][Bug #6146]

Thu Mar 15 14:49:31 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_conv_enc_opts): default to original encoding.

Thu Mar 15 13:47:17 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* hash.c (env_str_new, rb_f_getenv, env_fetch): use rb_str_conv_enc()
	  instead of rb_str_encode() to simplify the code.

Thu Mar 15 12:44:50 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c, include/ruby/win32.h (rb_w32_ugetenv): new API to
	  accept and to return UTF-8 strings.

	* win32/win32.c (rb_w32_getenv): follow above change.

	* win32/win32.c (rb_w32_get_environ): returns UTF-8 environment area.

	* hash.c (env_str_new, rb_f_getenv, env_fetch): follow above changes.
	  [Bug #5570] [ruby-core:40737]

Thu Mar 15 10:57:27 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_cycle): add Enumerable::Lazy#cycle.

Thu Mar 15 10:31:40 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_arity.rb (TestArity#err_mess): use assert_raise.

Thu Mar 15 07:03:52 2012  Eric Hodel  <drbrain@segment7.net>

	* vm_eval.c (check_funcall):  Raise ArgumentError if respond_to?
	  requires more than three arguments. [Bug #6000]

	* test/ruby/test_object.rb (class TestObject):  Test for respond_to?
	  requiring more than three arguments.

Thu Mar 15 06:08:06 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* include/ruby/intern.h: Add rb_check_arity, rb_error_arity [#6085]

	* array.c: Use rb_check_arity / rb_error_arity

	* class.c: ditto

	* enumerator.c: ditto

	* eval.c: ditto

	* file.c: ditto

	* hash.c: ditto

	* numeric.c: ditto

	* proc.c: ditto

	* process.c: ditto

	* random.c: ditto

	* re.c: ditto

	* signal.c: ditto

	* string.c: ditto

	* struct.c: ditto

	* transcode.c: ditto

	* vm_eval.c: ditto

	* vm_insnhelper.c: ditto & implementation of rb_error_arity

	* test/ruby/test_arity.rb: tests for above

Thu Mar 15 06:08:05 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* vm_insnhelper.c: improve number of arguments error in case of
	  optional parameters (issue #6085)

	* include/ruby/intern.h: define UNLIMITED_ARGUMENTS

	* test/ruby/test_arity.rb:  test for above

Thu Mar 15 00:58:04 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (enumerable_lazy): fix the documentation of
	  Enumerable#lazy.

Wed Mar 14 22:01:06 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_init_iterator): break when Qundef is returned
	  to make obj.drop(3).take(2) work properly.

	* enumerator.c (lazy_take_while): add Enumerable::Lazy#take_while.

	* enumerator.c (lazy_drop): add Enumerable::Lazy#drop.

	* enumerator.c (lazy_drop_while): add Enumerable::Lazy#drop_while.

	* enumerator.c (InitVM_Enumerator): add Enumerable::Lazy#force as an
	  alias of to_a.

Wed Mar 14 19:28:40 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_take): add Enumerable::Lazy#take.

Wed Mar 14 18:40:36 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c: use long for array indices.

Wed Mar 14 18:25:18 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c: moved the comment of StopIteration.

Wed Mar 14 17:55:29 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* numeric.c (flodivmod): must go through the same pass if HAVE_FMOD or
	  not.  this is a bugfix of r35013.

Wed Mar 14 16:41:55 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/test_tmpdir.rb (TestTmpdir#test_world_writable): skip on Windows.

Wed Mar 14 15:09:23 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c: fix flodivmod for cornercases [Bug #6044]
	  add ruby_float_mod

	* insns.def (opt_mod): use ruby_float_mod

	* internal.h: declare ruby_float_mod

	* test/ruby/test_float.rb: tests for above

	* test/ruby/envutil.rb: create helper assert_is_minus_zero

Wed Mar 14 10:44:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (lazy_grep_func): should use === instead of =~, as
	  well as Enumerable#grep

Wed Mar 14 08:15:54 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_flat_map_func): use each for non-Array objects.

Wed Mar 14 08:06:35 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_zip): add Enumerable::Lazy#zip.

	* enumerator.c (lazy_lazy): just returns self.

Wed Mar 14 07:48:36 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (datetime_s_now): [ruby-core:43256].

Tue Mar 13 22:00:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_set_arguments): keyword rest arg without keyword args.

	* node.c (dump_node): dump kw_rest_arg too.

	* parse.y (block_param, f_arg): more kwrest patterns.
	  [ruby-core:42455][Bug #5989]

	* parse.y (new_args_gen): no extra kw_rest_arg if no keyword rest arg.

Tue Mar 13 15:17:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (block_param, f_args): add rules for the case arguments
	  begin with kwrest.  [ruby-core:42455][Bug #5989]

Tue Mar 13 12:37:53 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (io_encoding_set): always warn if external encoding and internal
	  encoding are identical. [ruby-core:40727] [Bug #5568]

Tue Mar 13 12:37:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c: add ObjectSpace::WeakMap.  [ruby-dev:44565][Bug #5350]

	* lib/weakref.rb: use WeakMap instead of _id2ref.

Tue Mar 13 10:59:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (prepare): skip if basedir is not defined.
	  [ruby-core:39135][Bug #5238]

	* tool/rbinstall.rb (CONFIG.[]): check for mandatory
	  configurations.

Tue Mar 13 00:09:18 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (enumerable_lazy): added documentation.

Mon Mar 12 20:19:25 2012  Tanaka Akira  <akr@fsij.org>

	* lib/tmpdir.rb (Dir::tmpdir): test the current directory suitable for
	  temporary directory.

Mon Mar 12 20:08:16 2012  Tanaka Akira  <akr@fsij.org>

	* lib/fileutils.rb (fu_have_symlink?): specify TypeError for rescue
	  clause.

Mon Mar 12 19:23:13 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (rb_find_encoding): new function find encoding from
	  arbitrary object as a pointer to rb_encoding, and return NULL if
	  not found.

	* io.c (io_encoding_set): just warn unsupported encodings, but not
	  exception.  [ruby-core:40726] [Bug #5567]

Mon Mar 12 19:03:32 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (Init_eval_method): respond_to? and
	  respond_to_missing? are public.

Mon Mar 12 14:56:52 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flags
	  has been already obsolete.  patch by Thomas Enebo.
	  [ruby-core:41929][Bug #5847]

Mon Mar 12 12:44:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (Init_eval_method): copy basic methods to Exception.
	  [ruby-core:40287][Bug #5473]

Mon Mar 12 10:13:36 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_jump.c (rb_exec_end_proc): remember the latest exit status.
	  [ruby-core:43173][Bug #5218]

Mon Mar 12 07:33:12 2012  Tanaka Akira  <akr@fsij.org>

	* lib/tmpdir.rb: update document for changing
	  FileUtils.remove_entry_secure to FileUtils.remove_entry.

	* NEWS: add incompatibility note for lib/tmpdir.rb.

Mon Mar 12 07:19:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/tmpdir.rb (Dir.tmpdir): should not use world-writable but
	  non-sticky directory.

	* lib/tmpdir.rb (Dir.mktmpdir): check the parent directory.

Mon Mar 12 07:04:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (Init_Random): removed rb_Random_DEFAULT and register as
	  mark-object instead of global variable.

Mon Mar 12 07:03:32 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (random_s_rand): ensure default PRNG is re-initialized
	  after fork.  patched by Eric Wong.  [ruby-core:41209][Bug #5661]

Sun Mar 11 23:57:29 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* pack.c (pack_unpack): when unpack('M') occurs an illegal byte
	  sequence, output the "=" character and the following character in
	  the decoded data without any transformation.
	  [ruby-dev:44875] [Bug #5635]

Sun Mar 11 22:32:43 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: Merge 164a75c8bd2007d32c4d7665d53140d8fc126dcd.
	  [ruby-core:41917] [Bug #5846]

Sun Mar 11 17:10:04 2012  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb: Put error message into STDERR if failed to launch
	  worker (job) process. [ruby-dev:44802] [Bug #5577]

	* lib/test/unit/parallel.rb: If failed to increment_io, exit with code
	  2. [ruby-dev:44802] [Bug #5577]

Sun Mar 11 15:46:45 2012  Shota Fukumori  <sorah@tubusu.net>

	* io.c: fix rdoc of `IO.binwrite` to show same as `IO.write` except
	  it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

Sat Mar 10 23:52:28 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c: pack tables also generic keys.  patched by Sokolov Yura at
	  https://github.com/ruby/ruby/pull/84

	* st.c: add st_foreach_check for fixing iteration over packed table
	  and st_delete_safe.  patched by Sokolov Yura at
	  https://github.com/ruby/ruby/pull/84

	* st.c: fix packed num_entries on delete_safe.  patched by Sokolov
	  Yura at https://github.com/ruby/ruby/pull/84

Fri Mar  9 14:29:32 2012  Shugo Maeda  <shugo@ruby-lang.org>

	* enumerator.c (lazy_flat_map): add Enumerable::Lazy#flat_map.

Fri Mar  9 06:29:22 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb (load, parse): stop parsing or loading after
	  the first document has been parsed.

	* test/psych/test_stream.rb: pertinent tests.

Fri Mar  9 06:17:05 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb (parse_stream, load_stream): if a block is
	  given, documents will be yielded to the block as they are parsed.
	  [ruby-core:42404] [Bug #5978]

	* ext/psych/lib/psych/handlers/document_stream.rb: add a handler that
	  yields documents as they are parsed

	* test/psych/test_stream.rb: corresponding tests.

Fri Mar  9 00:35:03 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (lazy_initialize, enumerable_lazy): no additional
	  arguments.

Fri Mar  9 00:30:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c: add Enumerable#lazy. based on the patch by
	  Innokenty Mikhailov at <https://github.com/ruby/ruby/pull/101>
	  [ruby-core:37164] [Feature #4890]

Fri Mar  9 00:25:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (enumerator_each, generator_each): pass arguments to
	  the block with yielder.

Fri Mar  9 00:25:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_cat): new function to concat objects into array.

Thu Mar  8 16:44:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* .gdbinit (rb_numtable_entry): update for recent refactoring of
	  st_table.

Wed Mar  7 22:41:50 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* lib/xmlrpc/client.rb (module XMLRPC): fix typo.

	* test/xmlrpc/test_client.rb (test_async_call): add test for
	  XMLRPC::Client#call_async to check above fix.

Wed Mar  7 16:30:24 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_load_fail): should honor encoding.

	* load.c (load_failed): ditto.

Wed Mar  7 12:26:25 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_load_fail): use path as a string, not char*.

	* internal.h: (rb_load_fail): moved from ruby/intern.h.

	* ruby.c (load_file_internal): fname cannot be NULL.

Wed Mar  7 08:32:43 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* error.c (rb_loaderror_with_path): Adding the missing file as an
	  instance variable to the LoadError exception.
	  [ruby-core:39079]

	* load.c: call rb_loaderror_with_path so that the missing path is
	  added to the exception.

	* ruby.c: call rb_loaderror rather than raising our own LoadError
	  exception.

	* include/ruby/intern.h: add declaration for rb_loaderror_with_path.

	* test/ruby/test_require.rb: add supporting test for LoadError#path
	  method.

Wed Mar  7 08:28:00 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/xmlrpc/parser.rb: support i8 types. Thanks Stas Kelvich!
	  [ruby-core:29246] [Feature #3090]

	* test/xmlrpc/test_client.rb: supporting test

Wed Mar  7 07:43:29 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/xmlrpc/client.rb: assume servers that do not send a Content-Type
	  header are sending 'text/xml'. Thanks Nathan Leavitt!
	  [ruby-core:41204] [Bug #5660]

	* test/xmlrpc/test_client.rb: supporting test

Wed Mar  7 07:39:28 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* test/xmlrpc/test_client.rb: adding a test for performing an XMLRPC
	  call.
	* test/xmlrpc/data/blog.xml: supporting XML document for the response.

Tue Mar  6 16:24:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_tokadd_string): escape simple regexp meta
	  character terminators.

Tue Mar  6 10:11:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (set_rawmode): clear ECHOE and ECHOK
	  bits too.

	* ext/io/console/console.c (echo_p): ignore ECHOE and ECHOK bits.
	  [ruby-dev:45309] [Bug #6116]

	* ext/io/console/console.c (console_raw): fix rdoc.

	* ext/io/console/console.c (console_set_echo): mentioned about
	  platform dependency.

Tue Mar  6 07:18:10 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/xmlrpc/client.rb: switch net/http post2 calls to modern
	  `request_post` methods.

Tue Mar  6 02:31:20 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded
	  in order to stop method pollution.

Tue Mar  6 01:34:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (block_call): rules for block_call after block_call.
	  based on a patch by pasberth https://github.com/ruby/ruby/pull/102
	  [ruby-dev:45308][Bug #6115]

Tue Mar  6 01:24:13 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (block_command, block_call): simplified rules.

Mon Mar  5 18:28:35 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/test_regexp.rb (TestRegexp#test_source): fix typo.
	* test/ruby/test_regexp.rb (TestRegexp#test_equal): ditto.

Mon Mar  5 17:11:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/syck/lib/syck/rubytypes.rb (Exception.yaml_new): fix bug
	  that causes YAML serialization problem for Exception.
	  Exception#initialize doesn't use visible instance variable for
	  the exception message, so call the method with the message.
	  patched by Jingwen Owen Ou <jingweno AT gmail.com>.
	  http://github.com/ruby/ruby/pull/41

Mon Mar  5 16:50:22 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): syntax error.

	* test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): call uname
	  only on linux because it's a workaround for linux only.

Mon Mar  5 12:44:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c (unpack_entries): chain entries directly.  based on a patch
	  by Sokolov Yura <funny.falcon AT gmail.com>.

	* st.c (unpack_entries): use union instead of casted pointer.
	  patched by Sokolov Yura <funny.falcon AT gmail.com>.

	* st.c: use PACKED_ENT and FIND_ENTRY.  patched by Sokolov
	  Yura <funny.falcon AT gmail.com>.

	* st.c (unpack_entries): reallocate bins if packed array size
	  is not same as initial bins size.  based on a patch by
	  Sokolov Yura <funny.falcon AT gmail.com>.

Mon Mar  5 11:51:48 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/bigdecimal/lib/bigdecimal/math.rb: remove description about
	  BigMath#log. patched by Sho Hashimoto [ruby-dev:45307] [Bug #6112]

	* string.c (str_byteslice): fix typo.

Sun Mar  4 23:21:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_tokadd_string): regexp engine doesn't need
	  terminators to be escaped.  [ruby-core:40364][Bug #5484]

Sat Mar  3 22:51:46 2012  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_run_exec_options_err): chdir at last to interpret
	  relative pathnames from the current directory of the parent process.

Sat Mar  3 12:20:44 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strftime.c: reassigned some variables.

Sat Mar  3 12:12:16 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_{parse,strptime}.c: [ruby-dev:45303].

Sat Mar  3 10:09:21 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/xmlrpc/client.rb (initialize): net/http defaults to 1_2 in 1.8+,
	  so we can safely remove the call to enable it.

Sat Mar  3 08:42:25 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/xmlrpc/client.rb (new2): use URI for uri parsing.
	* test/xmlrpc/test_client.rb: test that query params are passed to the
	  client constructor.

Sat Mar  3 08:20:10 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/xmlrpc/client.rb (new2): raises an ArgumentError on bad
	  arguments.
	* test/xmlrpc/test_client.rb: tests for bad uris

Sat Mar  3 08:08:11 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/xmlrpc/client.rb (new2): fix custom port specification when an
	  SSL uri is used.
	* test/xmlrpc/test_client.rb: tests for XMLRPC::Client.new2

Sat Mar  3 08:03:29 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/syck/rubyext.c (mktime_do): use ISDIGIT().
	  [ruby-core:43060] [Bug #6108]

	* ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char.
	  [ruby-core:43060] [Bug #6108]

Sat Mar  3 06:57:14 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ruby_pc): make configurable.  [Bug #6051]

Fri Mar  2 17:49:03 2012  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* .travis.yml (branches): Enable TravisCI for ruby_1_9_3.

Fri Mar  2 17:13:33 2012  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/ruby/test_array.rb (test_combination2): Make the test case for
	  [ruby-core:29240] more descriptive.
	  cf. http://bugs.jruby.org/6518

Fri Mar  2 16:37:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): use wcscasecmp().

Fri Mar  2 16:36:31 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (native_cond_timeout): cast explicitly to suppress
	  a warning.

Fri Mar  2 16:35:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (pipe_open): cmd is no longer used if fork is available.

Thu Mar  1 16:13:18 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (rb_file_const, rb_file_load_ok): moved functions for
	  internal use only.

Thu Mar  1 15:40:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/makedirs.bat: new command to make intermediate
	  directories, and not to report any errors if the directory
	  already exists.

	* win32/Makefile.sub (MAKEDIRS): enable command extensions.

Thu Mar  1 01:25:43 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* regparse.c (is_onechar_cclass): optimize character class
	  Merge Onigmo 27278c12e6674043cc8affca6507e20e119a86ee.

	* regparse.c (is_onechar_cclass): [bug] unexpected match occurs when a
	  char class contains no char

	* enc/unicode.c (init_case_fold_table): define the sizes of case
	  folding tables in casefold.h

Wed Feb 29 16:11:34 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (MAKEDIRS): use mkdir of cmd.exe instead of ruby.
	  [Bug #6103] [ruby-core:43012]

	* win32/README.win32: added a notice about command extension of cmd.exe.

Wed Feb 29 15:39:39 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io.rb (TestIO#test_readpartial_locktmp): skip on
	  windows because of the platform restriction.

Wed Feb 29 15:38:50 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/memory_status.rb (Memory): syntax error.

Wed Feb 29 13:06:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/memory_status.rb: use /proc/self/status if it is in
	  the expected format.

Wed Feb 29 06:14:51 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: reverted r34825.

Tue Feb 28 23:20:01 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* Makefile.in (PLATFORM_DIR): add a variable for `win32` directory.
	* Makefile.in (clean-platform): add new target.
	  It cleans `win32` directory.

	* common.mk (clean): add a dependency for `win32` directory.
	* common.mk (distclean): ditto.
	* common.mk (distclean-platform): add new target.
	  It cleans `win32` directory.
	* common.mk ($(PLATFORM_D)): add new target to make `win32` directory.
	* common.mk (win32/win32.$(OBJEXT)): move win32.o into `win32`
	  directory.
	* common.mk (win32/file.$(OBJEXT)): add new target for win32/file.c.

	* configure.in: move win32.o into `win32` directory and add
	  win32/file.o to MISSING.

	* file.c (file_load_ok, rb_file_load_ok): replace static
	  file_load_ok() with public rb_file_load_ok().
	  It's to link Windows implementation in win32/file.c.
	* file.c (rb_find_file_ext_safe): ditto.
	* file.c (rb_find_file_safe): ditto.

	* win32/file.c (rb_file_load_ok): new file. Add Windows specific
	  optimized implementation of rb_file_load_ok(). We created a
	  separated file to avoid too many #ifdef macro which is unreadable.

	* win32/Makefile.sub (PLATFORM_DIR): add a variable for `win32`
	  directory.
	* win32/Makefile.sub (MISSING): move win32.obj into `win32`
	  directory and add win32/file.obj to MISSING.
	* win32/Makefile.sub (MAKEDIRS): replace MINIRUBY with BASERUBY.
	  It's because miniruby doesn't exist when making `win32` directory.
	* win32/Makefile.sub (clean-platform): add new target to clean `win32`
	  directory.
	* win32/Makefile.sub ({$(srcdir)}.c{}.obj): make it not match
	  win32/file.c to build properly.
	* win32/Makefile.sub (win32/win32.$(OBJEXT)): move win32.obj into
	 `win32` directory.

	  Patch created with Luis Lavena.
	  [ruby-core:42480] [Feature #5999]

Tue Feb 28 20:27:25 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:42998]

Tue Feb 28 18:47:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_binwrite, rb_io_syswrite): use shared frozen source
	  strings.

	* io.c (io_fread, io_getpartial, rb_io_sysread): set buffer size
	  after check if readable, which can cause thread switch.
	  [ruby-dev:45297][Bug #6099]

Tue Feb 28 17:16:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/time.rb (Time#xmlschema): use strftime specifiers instead of
	  fractional exponential calculation which yields undesirable
	  result.  [ruby-core:42997][Bug #6100]

Tue Feb 28 14:15:29 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/protocol.rb: Add OpenTimeout subclass of Timeout::Error
	* lib/net/pop.rb:  Modernize Timeout usage.  Patch by Eric Wong.
	  Use Net::OpenTimeout instead of Timeout::Error.  [Bug #5765]
	* lib/net/http.rb:  ditto
	* lib/net/smtp.rb:  ditto
	* lib/net/telnet.rb:  ditto

Tue Feb 28 13:51:12 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Retry HTTP requests for additional network errors.
	  Introduce OpenTimeout subclass of Timeout::Error.  [Bug #6001]
	* test/net/http/test_http.rb:  Reduce timeout to 0.01s for faster test
	* test/net/http/test_https.rb:  ditto

Tue Feb 28 11:44:49 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (debugflags): check if -ggdb is accepted.
	  [ruby-core:42875][Bug #6080]

Tue Feb 28 10:28:51 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: default open YAML files with utf8 external
	  encoding. [ruby-core:42967]
	* test/psych/test_tainted.rb: ditto

Mon Feb 27 23:46:09 2012  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (opt_bv_decl): allow newline at the end.  [ruby-dev:45292]

Mon Feb 27 20:43:05 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_io_set_pos): add rdoc about textmode.

	* test/ruby/test_io.rb (TestIO#test_setpos): use binmode.

Mon Feb 27 17:00:15 2012  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_crypt): Update rdoc and state that this
	  function is system dependent.  Reviewed by nobu, thanks to
	  @takai.

Mon Feb 27 17:03:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): since methods
	  can be overridden, so should not make an assumption on the type
	  of results.  [ruby-core:42969][Bug #6093]

Mon Feb 27 10:54:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): replace the
	  target flags if the given flag is accepted.

Mon Feb 27 10:53:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/rubygems/test_gem_specification.rb (test_self_from_yaml_syck_default_key_bug):
	  ignore the test for too old versions.

Mon Feb 27 10:53:12 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::Runner#puke): skips with no
	  messages should be trivial.

Mon Feb 27 10:50:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c, process.c, time.c, ext: use rb_sys_fail_str instead of
	  rb_sys_fail.

Mon Feb 27 10:48:49 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/extconf.rb: suppress useless deprecation warnings
	  from OpenSSL added by Apple.

Sun Feb 26 23:29:49 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* regparse.c (add_code_range_to_buf0): wrong condition of duplicated
	  warnings.

Sun Feb 26 11:26:44 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): call on special object instead of
	  self.  since stabby lambda is a syntax, so it should not be
	  affected by the context.  [ruby-core:42349][Bug #5966]

	* insns.def (send): no special deal for FCALL.  self should be put
	  on TOS instead.

Sun Feb 26 05:35:43 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* error.c (report_bug): use buf and snprintf to avoid consuming stack.
	  [ruby-dev:45272] [Bug #6058]

Sat Feb 25 17:41:19 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb (headers): try ambiguous headers at last.

Sat Feb 25 17:07:15 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/fileutils.rb: use chomp(?/) instead of sub to optimize and avoid
	  to regexping invalid string.

Sat Feb 25 16:18:24 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* complex.c (nucomp_marshal_load): raise error on invalid data.
	  reported by John Firebaugh [ruby-core:42860] [Bug #6076]

Sat Feb 25 14:46:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_t
	  and intptr_t.  [ruby-core:42460][Feature #5992]

	* ext/fiddle/fiddle.c (Init_fiddle): ditto.

	* ext/dl/lib/dl/cparser.rb (DL::CParser#parse_ctype): ditto.

Sat Feb 25 11:08:28 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/curses.c (Init_curses): use rb_define_const once for
	  Curses::VERSION.

	* ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.

Sat Feb 25 10:34:22 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/curses.c (Init_curses): make Curses::VERSION
	  understandable without context.

	* ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.

Sat Feb 25 07:53:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_tokadd_string): insert a backslash only if
	  quoted by single quotes.  [ruby-dev:45281] [Bug #6069]

Sat Feb 25 07:53:49 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path.
	  [Bug #6072]

Sat Feb 25 07:53:40 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_initialize): keep path in original encoding.

	* error.c (syserr_initialize): prefer the encoding of message over
	  locale.  [ruby-dev:45279][Bug #6071]

Sat Feb 25 06:55:29 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (utime_internal): fix a variable missed to replace.
	  [ruby-core:42864] [Bug #6077]

Fri Feb 24 18:21:55 2012  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/zlib/test_zlib.rb (TestZlibGzipReader#test_encoding): Add
	  encoding testcases for GzipReader#read.  read() emits
	  Encoding.default_external in contrast to read(size) emits BINARY.
	  See also: http://bugs.jruby.org/6208

Fri Feb 24 17:56:39 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/ruby/test_literal.rb (TestRubyLiteral#test_special_const):
	  test for https://bugs.php.net/bug.php?id=61095

Fri Feb 24 16:48:29 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c, file.c, io.c (rb_sys_fail_path): use rb_sys_fail_str.

	* error.c: new functions to deal exceptions with string instances.

	* dir.c, file.c, io.c: use rb_sys_fail_path.

Fri Feb 24 15:49:07 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (__builtin_unreachable): check for clang.
	  [ruby-core:42849]

	* include/ruby/ruby.h (UNREACHABLE): fallback definition.

Fri Feb 24 13:54:33 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c: prevent a memory leak by protecting calls to
	  handler callbacks.
	* test/psych/test_parser.rb: test to demonstrate leak.

Fri Feb 24 12:07:34 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/net/http.rb: Fix documentation. Patched from Florian Mhun
	  via http://github.com/ruby/ruby/pull/96

Fri Feb 24 11:48:07 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* string.c (rb_str_prepend): Fix documentation for String#prepend.
	  Patched from Franck Verrot via http://github.com/ruby/ruby/pull/98
	  and Andrew Horsman via http://github.com/ruby/ruby/pull/55

Fri Feb 24 10:08:33 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb (Net::HTTP#transport_request):  Fix infinite loop
	  upon EOFError or Errno::ECONNRESET where count is reset to 0.
	* test/net/http/test_http.rb (class TestNetHTTPKeepAlive):  Test for
	  above.

Fri Feb 24 09:05:40 2012  Eric Hodel  <drbrain@segment7.net>

	* complex.c (Init_Complex):  Document Complex::I.  Patch by Sylvain
	  Daubert.  [Feature #5623]

Fri Feb 24 08:52:09 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_tokadd_string, parser_yylex): insert a backslash
	  if the next character is non-ascii.  [ruby-dev:45278] [Bug #6069]

Fri Feb 24 08:13:20 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/profiler.rb:  Add Profiler documentation by Gonzalo Rodriguez.
	  [Bug #5816]

Fri Feb 24 08:08:38 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c: set parser encoding based on the YAML input
	  rather than user configuration.
	* test/psych/test_encoding.rb: corresponding tests.
	* test/psych/test_parser.rb: ditto
	* test/psych/test_tainted.rb: ditto

Fri Feb 24 08:02:52 2012  Eric Hodel  <drbrain@segment7.net>

	* hash.c (Init_Hash):  Add section on how objects are used as Hash keys
	  and how to use custom classes as Hash keys.

Fri Feb 24 07:36:11 2012  Eric Hodel  <drbrain@segment7.net>

	* object.c (rb_obj_eql):  Improve equality documentation by adding an
	  example of equal? vs == and recommending eql? be aliased to == when
	  overridden.

Fri Feb 24 07:21:15 2012  Eric Hodel  <drbrain@segment7.net>

	* object.c (rb_obj_hash):  Added note that the hash value is not
	  deterministic on Marc-Andre's suggestion.  Expanded description of
	  the purpose of the hash method.  [Bug #6068]

Thu Feb 23 23:01:21 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: unused macro removed.

Thu Feb 23 22:26:53 2012  Tanaka Akira  <akr@fsij.org>

	* test/test_curses.rb: new file.

Thu Feb 23 19:57:56 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/rain.rb: trap SIGHUP, SIGINT, SIGQUIT and SIGTERM only.

Thu Feb 23 19:56:48 2012  Tanaka Akira  <akr@fsij.org>

	* signal.c (sig_trap): show signal name on error.

Thu Feb 23 12:21:48 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
	  Berkeley DB.

Thu Feb 23 10:00:18 2012  Eric Hodel  <drbrain@segment7.net>

	* io.c (rb_io_f_sync):  Fix double-negative typo.  [ruby-trunk - #5837]

Thu Feb 23 09:57:21 2012  Eric Hodel  <drbrain@segment7.net>

	* load.c (rb_f_require):  Add note to require for scope of items in the
	  loaded file.  [ruby-trunk - #5910]

Thu Feb 23 03:58:08 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/ostruct.rb (delete_field): Bug fix so previous value is
	  returned. Patch by Nick Recobra [Bug #6063]

Thu Feb 23 02:33:00 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_extract_modeenc): fail only if conflicting
	  text/binary modes given explicitly.  [ruby-dev:45268][Bug #6055]

Wed Feb 22 23:27:08 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/iconv/test_option.rb: enabled.  [ruby-core:42802][Bug #6061]

Wed Feb 22 21:45:56 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/curses.c: use defined() to suppress a warning.

Wed Feb 22 21:44:29 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: refactored.

Wed Feb 22 20:42:28 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: try to distinguish curses_version is a
	  function or variable.

	* ext/curses/curses.c (Init_curses): refine Curses::VERSION.

Wed Feb 22 19:47:03 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: show the chosen header and library.

Wed Feb 22 19:22:31 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* reverted 34739 for test/date.

Wed Feb 22 19:08:55 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: refactored.

Wed Feb 22 18:44:41 2012  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb (setup_options): add option "--retry" as opposite
	  for "--no-retry"

Wed Feb 22 18:34:02 2012  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb (setup_options): add option "--show-skip" to
	  cancel "--hide-skip" (-q)

Wed Feb 22 17:36:22 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_s_foreach): argument check before making Enumerator.
	  [ruby-dev:31525]

Wed Feb 22 17:07:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_s_foreach): return enumerator including keyword
	  arguments.  [ruby-dev:45267][Bug #6054]

Wed Feb 22 12:15:16 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: allow llvm-gcc because it work fine with r34278.

Wed Feb 22 10:57:08 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* regparse.c (fetch_token): don't use // comment.

Wed Feb 22 10:32:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/mkmf/test_framework.rb: try CoreFoundation framework, than
	  Cocoa which is dependent on QuickTime SDK which has separated
	  since Xcode 4.3.

Wed Feb 22 10:18:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (test-all, test-ruby): more dependencies.

Wed Feb 22 06:48:55 2012  Eric Hodel  <drbrain@segment7.net>

	* file.c (rb_f_test):  Fix formatting of Kernel#test rdoc.

Wed Feb 22 06:12:15 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: check DBM_SUFFIX for Mac OS X.
	  Its ndbm.h doesn't include db.h.

Wed Feb 22 06:02:42 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/dbm.c (fdbm_initialize): disable Berkeley DB error messages.

	* ext/dbm/extconf.rb: check DBC type for above.

	[ruby-dev:45269]

Tue Feb 21 20:23:47 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_any_hash): treat Qundef like as other special constants.

	* hash.c (hash_foreach_iter): fix signature.

Tue Feb 21 19:39:34 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/curses.c (Init_curses): use curses_version() for
	  Curses::VERSION.

Tue Feb 21 18:21:25 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c : remove gc_clear_mark_on_sweep_slots() and use
	  rest_sweep() instead of it, because some dead objects might be
	  marked in next the mark phase by false pointers.
	  [ruby-core:42672]

Tue Feb 21 16:08:17 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_hash_proc): get wrapped pointer properly.  [Bug #6048]

Tue Feb 21 14:41:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/ruby.pc.in: added rubylibprefix, {rubylib,vendor,site}dir
	  and {ruby,vendor,site}archdir.  [ruby-core:42766][Feature #6052]

Tue Feb 21 09:13:25 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* proc.c (method_hash, proc_hash): Fix {Unbound}Method#hash
	  [Bug #6048]. Isolate hash computation for proc

	* internal.h: Declaration for above

	* vm_method.c (rb_method_definition_hash): Computation for
	  hash part of a method definition

	* method.h: Declaration for above

	* test/ruby/test_method.rb: Test for above

Tue Feb 21 02:56:15 2012  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* enumerator.c (enumerator_rewind): update the documentation.
	  fixed: #6053

Mon Feb 20 23:38:35 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enc/depend: ignore mktable.c because it's not encoding library.
	  [ruby-core:42760] [Bug #6049]

Mon Feb 20 21:40:53 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: fold too long lines.

Mon Feb 20 21:16:48 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* lib/fileutils.rb: revert a line modified accidentally at r34669.
	  This fixes mingw test errors in TestDir_M17N.
	  [ruby-core:42728] [Feature #4970]

Mon Feb 20 21:09:27 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/curses.c (Init_curses): define Curses::VERSION.

Mon Feb 20 21:08:00 2012  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: restore $libs and $defs for each
	  header/library choice.

Mon Feb 20 19:57:26 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: weaken header/library consistency check if db is
	  "ndbm".  It seems several (possibly historical) distributions
	  provide libndbm.  However the content of libndbm vary: Berkeley DB,
	  GDBM or even 4.3BSD NDBM.  (Mandriva, Tru64 UNIX, OpenSuSE,
	  SCO OpenServer, ...)
	  "ndbm" is not searched automatically now (dblib doesn't contain it)
	  but configure --with-dbm-type=ndbm choose libndbm and ndbm.h.

Mon Feb 20 19:15:57 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: refine variable names.

Mon Feb 20 15:50:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check if -fstack-protector is really available.

Sun Feb 19 23:43:38 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: show header and library found.

Sun Feb 19 23:01:01 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/dbm.c (Init_dbm): refine DBM::VERSION definition.

	* ext/dbm/extconf.rb: provide RUBYDBM_GDBM_HEADER macro.

Sun Feb 19 17:07:27 2012  Tanaka Akira  <akr@fsij.org>

	* test/dbm/test_dbm.rb (test_dbmfile_suffix): check pag and dir is
	  empty for 4.3BSD ndbm.

Sun Feb 19 03:00:30 2012  Tanaka Akira  <akr@fsij.org>

	* test/dbm/test_dbm.rb (test_dbmfile_suffix): check magic numbers.

Sun Feb 19 01:05:41 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: detect GDBM's ndbm.h by testing dbm_clearerr is
	  an empty macro.

Sun Feb 19 00:25:55 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
	  is available since GDBM 1.9 because 'gdbm_compat' is appropriate
	  choice since GDBM 1.8.1.

Sat Feb 18 23:27:00 2012  Kenta Murata  <mrkn@mrkn.jp>

	* random.c: remove a duplicated comment.

Sat Feb 18 18:43:13 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb (dblib): prefer recent GDBM over older GDBM.
	  (have_declared_libvar): new function to check a declared variable
	  exists in a library.
	  (have_undeclared_libvar): renamed from renamed from have_libvar.
	  (headers.db_check2): check that GDBM version variable if GDBM header
	  is chosen.

	* ext/dbm/dbm.c (Init_dbm): use HAVE_DECLARED_LIBVAR_GDBM_VERSION and
	  HAVE_UNDECLARED_LIBVAR_GDBM_VERSION macro.

Sat Feb 18 13:53:01 2012  Tanaka Akira  <akr@fsij.org>

	* test/dbm/test_dbm.rb (test_dbmfile_suffix): DBM::VERSION should
	  be Berkeley DB if foo.db is created by DBM.open.

Sat Feb 18 13:40:37 2012  Tanaka Akira  <akr@fsij.org>

	* test/dbm/test_dbm.rb (test_dbmfile_suffix): test dbm file suffix.

Sat Feb 18 12:50:59 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/dbm.c (DBM::VERSION): define it by detecting _GDBM_H_ or
	  _DBM_IOERR.

Sat Feb 18 07:52:45 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/enc-unicode.rb: don't use 1.9 feature on tools.

Sat Feb 18 02:48:39 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/fileutils.rb: refactored FileUtil methods to use the
	  `define_command` API.  Patch from 7rans <transfire@gmail.com>
	* test/fileutils/test_dryrun.rb: corresponding test refactoring
	* test/fileutils/test_nowrite.rb: ditto
	* test/fileutils/test_verbose.rb: ditto

Fri Feb 17 21:39:36 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: remove dbm.

Fri Feb 17 21:18:39 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: refine header/library mismatch detection.
	  check only for ndbm.h except libc.  check _GDBM_H_ for gdbm.
	  check _DBM_IOERR for the original ndbm.

Fri Feb 17 20:30:44 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: don't check libdbm.  It is not a ndbm
	  implementation.  (libdbm in Version 7 Unix is database library
	  for single database per process.)

Fri Feb 17 15:38:53 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
	  https://github.com/k-takata/Onigmo
	  cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
	  cp oniguruma.h
	  cp tool/enc-unicode.rb
	  cp -r enc/

Fri Feb 17 15:20:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (enum_each_slice): arrays to be yielded can be newly
	  created in the block.

	* enum.c: move work variables to objects not to let called blocks
	  access stack area out of scope.  [Bug #5801]

Fri Feb 17 12:35:55 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/merger.rb: remove borders from the commit message which is used
	  when the commit doesn't change ChangeLog.

Fri Feb 17 11:50:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (btest, btest-ruby, test-sample test-knownbugs)
	  (test-all, test-ruby): depend on prog.

Fri Feb 17 09:56:22 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_header): log the content of header.

Fri Feb 17 09:44:55 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/transcode-tblgen.rb (import_ucm): don't use \h because the
	  script should work with ruby 1.8.

	* tool/enc-unicode.rb: ditto.

Fri Feb 17 07:33:29 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (id_lshift): use constant ID.

Fri Feb 17 07:30:53 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: refactored to split too long conditions.

Fri Feb 17 00:23:25 2012  Tanaka Akira  <akr@fsij.org>

	* test/dbm/test_dbm.rb: fix skip condition for libgdbm 1.8.0 or prior.
	  reported by Bohuslav Kabrda.
	  [ruby-core:42685] [ruby-trunk - Bug #6036]

Fri Feb 17 00:04:21 2012  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: check _DB_H_ macro unavailable except
	  Berkeley DB library.

Thu Feb 16 05:41:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (splatarray): make new array if flag is set.

	* compile.c (iseq_compile_each): make new array with
	  splat. [ruby-core:21901][Feature #1125]

Thu Feb 16 00:14:04 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/abbrev.rb (Array#abbrev): add missing '"' in documentation.

Wed Feb 15 22:20:19 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* cont.c (rb_fiber_reset_root_local_storage): add a new function to
	  restore rb_thread_t::local_storage.

	* cont.c (rb_obj_is_fiber): add a new function to tell finalizer to
	  prevent fibers from destroy.

	* gc.c (rb_objspace_call_finalizer): don't sweep fibers at finalizing
	  objspace.

	* internal.h (rb_fiber_reset_root_local_storage, rb_obj_is_fiber):
	  add prototypes.

	* vm.c (ruby_vm_destruct): reset main thread's local_storage before
	  free main thread. rb_thread_t::local_storage is replaced by fiber's
	  local storage when forked from fiber, and it should be already freed
	  when the fiber was destroyed. [ruby-core:41456] [Bug #5700]

	* test/ruby/test_fiber.rb (test_fork_from_fiber): add test for fork
	  from fiber.

Wed Feb 15 19:57:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/fiddle/closure.c (callback): deal with unsigned integers.
	  [ruby-core:42458][Bug #5991][Bug #6022]

	* ext/fiddle/conversions.c (value_to_generic, generic_to_value):
	  ditto.

	* ext/fiddle/closure.c (callback): same as r34506.

Wed Feb 15 17:41:31 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (io_strsetbuf): call rb_str_modify to make str independent
	  before calling rb_str_set_len for r34580.

Wed Feb 15 12:30:10 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (Init_zlib):  Added Zlib::TEXT and note that
	  Zlib::ASCII is deprecated in zlib 1.2.3 and newer.

Wed Feb 15 12:24:40 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c:  Move constant descriptions to constants.  Remove
	  extra comment block at the top of Init_zlib().

Wed Feb 15 12:30:46 2012  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/ostruct.rb: Create getters and setters after dup.
	  [Bug #6028] [rubyspecs:0380bcc]

Wed Feb 15 10:59:52 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (HEAP_BITMAP_LIMIT): HEAP_BITMAP_LIMIT is computed on the
	  basis of HEAP_SIZE because it must covers a whole heap block.
	  [ruby-trunk - Bug #6006]

Wed Feb 15 09:27:45 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (Init_zlib):  Added Zlib::FIXED and Zlib::RLE
	  strategies.
	* NEWS:  Add note about the new Zlib constants.

Wed Feb 15 09:11:36 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c:  Improve documentation.  [ruby-trunk - Bug #5948]

Wed Feb 15 07:28:54 2012  Eric Hodel  <drbrain@segment7.net>

	* encoding.c (Init_Encoding):  Add IO example of internal and external
	  encoding.  Fixed a typo in the force_encoding example.  [#5949]

Wed Feb 15 06:58:21 2012  Eric Hodel  <drbrain@segment7.net>

	* encoding.c (Init_Encoding):  Add Encoding documentation.
	  [ruby-trunk - Bug #5949]
	* encoding.c (rb_set_default_external):  Fix typo in documentation.

Tue Feb 14 20:22:11 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (CEILDIV): rename to a appropriate name.

Tue Feb 14 18:07:20 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (assign_heap_slot): SEGV happens cause on 64-bit platform
	  sometime there should be `objs-=2` instead of `objs--`.
	  [Bug #6006]
	  patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92

Tue Feb 14 16:00:30 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_setstrbuf): cut down the buffer if longer.

Tue Feb 14 15:06:37 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb (build_message): skip escaped
	  question marks.

Tue Feb 14 12:10:04 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (autoload_const_set, autoload_require): fix
	  signatures.

Tue Feb 14 05:23:40 2012  Eric Hodel  <drbrain@segment7.net>

	* process.c (proc_wait):  Change typo "SystemError" to
	  "SystemCallError".  [ruby-trunk - Bug #5962]
	* process.c (proc_wait2):  ditto

Tue Feb 14 05:18:24 2012  Eric Hodel  <drbrain@segment7.net>

	* enumerator.c:  Document use of Enumerator.new for creating a lazy
	  enumeration for filtering/chaining.  [ruby-trunk - Feature #707]

Mon Feb 13 23:01:50 2012  Akinori MUSHA  <knu@iDaemons.org>

	* vm_method.c (rb_method_boundp):
	  obj.respond_to?(:a_protected_method) should return false because
	  calling a protected method may cause NoMethodError if called
	  from outside the class inheritance tree.  Kernel#respond_to? is
	  mostly used to test if it is safe to call a method, so the false
	  positive should be avoided. [ruby-dev:40461] [ruby-dev:41739]
	  [ruby-dev:41837]

Mon Feb 13 21:52:06 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (HEAP_OBJ_LIMIT, HEAP_BITMAP_LIMIT): HEAP_OBJ_LIMIT used
	  `sizeof(struct heaps_slot)` while heap is currently allocated
	  with `struct heaps_header`.
	  HEAP_BITMAP_LIMIT were calculated from
	  `HEAP_OBJ_LIMIT/sizeof(uintptr_t)` - one Byte for each object,
	  not one Bit. [Bug #6006]
	  patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92

Mon Feb 13 18:30:32 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_setstrbuf): defer resizing buffer string until data is
	  read actually.

Mon Feb 13 10:24:39 2012  Loren Segal  <lsegal@soen.ca>

	* io.c (Init_IO): use directive hack to make ARGF documentable
	  in other tools.  [ruby-core:42515][Bug #6007]

Sun Feb 12 20:43:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (rb_event_hook_func_t): add argument names.

Sun Feb 12 16:30:23 2012  Akinori MUSHA  <knu@iDaemons.org>

	* tool/merger.rb (#default_merge_branch): Add support for
	  Subversion 1.7 which adopted a whole new working directory
	  structure.

Sun Feb 12 15:14:41 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* benchmark/driver.rb: suppress unused/shadowing variable warnings.

Sun Feb 12 03:14:40 2012  Eric Hodel  <drbrain@segment7.net>

	* vm_eval.c (check_funcall):  Call respond_to? with matching arity for
	  legacy single-argument implementations.  [ruby-trunk - Bug #6000]

Sat Feb 11 12:04:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (defined_expr): guard the whole expression.
	  [ruby-dev:45021][Bug#5786]

Sat Feb 11 08:34:42 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (rb_inflate_add_dictionary):  Added
	  Zlib::Inflate#add_dictionary to allow users to pre-specify
	  for using during #inflate.  [ruby-trunk - Feature #5937]

Sat Feb 11 08:23:02 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (do_inflate):  Inflate more data if buffered data
	  exists.  Allows Zlib::Inflate#set_dictionary to work.
	  [ruby-trunk - Bug #5929]

Sat Feb 11 06:00:48 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* dir.c (fnmatch): The * needs to be escaped to avoid formatting in
	  fnmatch comment.
	  patched by @dalton. https://github.com/ruby/ruby/pull/91

Fri Feb 10 03:41:31 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c: removed external encoding setter, allow parser
	  to be reused.
	* ext/psych/lib/psych/parser.rb: added external encoding setter.
	* test/psych/test_parser.rb: test parser reuse

Fri Feb 10 01:30:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/dl.h (ALIGN_OF): use offsetof().

	* ext/dl/dl.h (DLALIGN): round up at once and get rid of overflow.

Fri Feb 10 00:47:07 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (assert_no_memory_leak): new assertion to
	  check memory leak by invoking child ruby process and watch its
	  memory size.

Thu Feb  9 23:41:44 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/pathname/test_pathname.rb (test_binread): add assertion to
	  check encoding.

Thu Feb  9 16:48:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/dl.c (Init_dl): fix mangled document.

Thu Feb  9 16:10:34 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/memory_status.rb (Memory::Win32): 64bit support.

Thu Feb  9 16:08:55 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
	  currently pack/unpack does not accept "q!" and "Q!".

Thu Feb  9 16:01:29 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/fiddle/conversions.c (value_to_generic): src is not guaranteed as
	  a Bignum if the type is LONG_LONG.  it may be a Fixnum if the value
	  is small.

Thu Feb  9 11:32:36 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/lib/types.rb: Win64 support.

Thu Feb  9 04:12:29 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/pathname/test_pathname.rb: not read but binread.
	  patched by Benoit Daloze, [ruby-core:42440] [Bug #5984]

Wed Feb  8 22:29:59 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_modify_expand): fix memory leak.

Wed Feb  8 14:06:59 2012  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
	  option to prevent BEAST attack. See [Bug #5353].

	  In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
	  TLS-CBC-IV vulnerability described at
	  http://www.openssl.org/~bodo/tls-cbc.txt
	  It's known issue of TLSv1/SSLv3 but it attracts lots of attention
	  these days as BEAST attack. (CVE-2011-3389)

	  Until now ossl sets OP_ALL at SSLContext allocation and call
	  SSL_CTX_set_options at connection.  SSL_CTX_set_options updates the
	  value by using |= so bits set by OP_ALL cannot be unset afterwards.

	  This commit changes to call SSL_CTX_set_options only 1 time for each
	  SSLContext. It sets the specified value if SSLContext#options= are
	  called and sets OP_ALL if not.

	  To help users to unset bits in OP_ALL, this commit also adds several
	  constant to SSL such as
	  OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.  These constants were
	  not exposed in Ruby because there's no way to unset bits in OP_ALL
	  before.

	  Following is an example to enable 0/n split for BEAST prevention.

	    ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS

	* test/openssl/test_ssl.rb: Test above option exists.

Wed Feb 8 13:12:02 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_x509name.c: Use the numerical representation of
	  unrecognized OIDs instead of the sn "UNDEF".

	* test/openssl/test_x509name.rb: Add tests for the fixed behavior.

	  Patch provided by Paul Kehrer, thank you!
	  [ruby-core:41769] [Feature #5787]

Wed Feb  8 09:49:58 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/merger.rb: don't abort, update first.

Wed Feb 8 09:47:33 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_asn1.c: Call INT2NUM only once for GeneralString.
	  Thanks to Mantas Mikulenas for noticing and providing a patch!
	  [ruby-core:42358] [Bug #5972]

Wed Feb 8 09:19:00 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_cipher.c: Add warning about key as IV.

Tue Feb  7 20:08:12 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* error.c (exc_inspect): Fix typo. patch from Trent Ogren
	  via https://github.com/ruby/ruby/pull/90

Tue Feb  7 19:37:35 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c: refactor packed entries using structs.

Tue Feb  7 14:52:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c (st_update): table can be unpacked in the callback.

	* st.c (st_foreach): should not yield same pair when checking
	  after unpacking.

Mon Feb  6 21:55:13 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/merger.rb: abort if the working directory is dirty.

	* tool/merger.rb: update the working directory after commit.

Mon Feb  6 00:16:27 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* encoding.c (rb_enc_compatible): return ASCII-8BIT even if 2nd string
	  is ascii only string. [ruby-core:42354] [Bug #5968]

Fri Feb  3 07:16:47 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/webrick.rb:  Moved proxy rewriting to WEBrick::HTTPProxy.
	* lib/webrick/httpproxy.rb:  Add examples of creating a proxy server
	  and response rewriting using HTTPProxy.

Fri Feb  3 06:53:22 2012  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_x509store.c:  Add class documentation for
	  OpenSSL::X509::Store

Thu Feb  2 22:28:13 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/net/http/test_https_proxy.rb
	  (HTTPSProxyTest#test_https_proxy_authentication):
	  add workaround to avoid to hang up without openssl.
	  see [ruby-dev:45021][Bug #5786]

	* test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address):
	  ditto.

Thu Feb  2 21:48:18 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb: use meaningful names.

Thu Feb  2 21:38:52 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:
	  fix the default xml namespace URI validation.
	  [ruby-dev:45169] [Bug #5956]
	  Reported by Miho Hiramatsu. Thanks!!!

Thu Feb  2 17:51:02 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.
	  r34409 breaks replacing ARGV.
	  [ruby-dev:45160] [Bug #5952]

Thu Feb  2 16:21:01 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/net/http/test_http.rb (TestNetHTTPKeepAlive#*): remove debug
	  output.

Thu Feb  2 01:24:34 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* parse.y (debug_lines, coverage): set file path encoding for coverage
	  result.  [ruby-dev:44950]

Wed Feb  1 14:38:31 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): Just
	  call File.unlink and ignore ENOENT because existence check
	  before unlinking does not help in terms of race condition.

	* lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): My
	  comment about thread safeness is obsolete.

Wed Feb  1 09:50:10 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* doc/re.rdoc (Repetition): fix typo.  reported by Ori Avtalion
	  and patched by Zachary Scott.  [Bug #5947]

Wed Feb  1 06:38:54 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_close): skip stdin, which should be readable again.
	  [ruby-dev:45160] [Bug #5952]

	* io.c (argf_readlines): reinitialize after all read to be
	  readable again.

Tue Jan 31 21:27:43 2012  Narihiro Nakamura  <authornari@gmail.com>

	* configure.in (HEAP_ALIGN_LOG): HEAP_ALIGN_LOG should be page
	  size in OpenBSD. [ruby-core:42158][Bug #5901]

	* gc.c : avoid to redefine.

Tue Jan 31 14:27:22 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pid
	  in block form.

Mon Jan 30 19:08:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (vm_call0): should pass block to enumerators.  patched
	  by Kazuki Tsujimoto.  [ruby-dev:44961][Bug #5731]

	* vm_eval.c (method_missing), vm_insnhelper.c (vm_call_method):
	  ditto.  patched by satoshi shiba.

Mon Jan 30 12:31:05 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (append_fspath): need to set the encoding to result always.

Mon Jan 30 10:38:37 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/irb/test_completion.rb: skip if cannot load irb/completion
	  (maybe readline does not exist).

Sun Jan 29 22:47:19 2012  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* tool/config.{guess,sub}: updated to automake-1.11.2.

Sun Jan 29 12:17:56 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/readline.c (readline_attempted_completion_function):
	  respect encodings.  [Bug #5941]

Sat Jan 28 09:33:33 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* win32/win32.c (rb_w32_read): fix an issue that $stdin.read doesn't
	  terminate by CTRL-C on Windows.
	  [ruby-dev:45149] [Bug #5812]

Sat Jan 28 08:18:11 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_thread.rb
	  (TestThreadGroup#test_thread_timer_and_interrupt): skip exit status
	  assertion because we cannot get signal status on Windows.

	* win32/win32.c (CreateChild): create process group to receive the
	  signal by GenerateConsoleCtrlEvent().

	* win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT
	  if a process group is specified. CTRL_C_EVENT signal cannot be
	  generated for process groups for the specification.
	  [ruby-dev:45149] [Bug #5812]

Sat Jan 28 07:46:03 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* thread_win32.c (rb_w32_wait_events_blocking): use
	  ruby_thread_from_native() instead of GET_THREAD() because
	  GET_THREAD() doesn't always return the current thread and
	  WaitForMultipleObjects() at rb_w32_read() doesn't return by
	  Thread#kill. This fixes TestQueue#test_thr_kill failure on
	  Windows.

	* thread_win32.c (rb_w32_wait_events): use ruby_thread_from_native()
	  instead of GET_THREAD() for consistency with the above change.

	* thread_win32.c (rb_w32_sleep): ditto.

	* thread_win32.c (rb_w32_Sleep): ditto.
	  [ruby-dev:45149] [Bug #5812]

Sat Jan 28 07:28:48 2012  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/zlib/test_zlib.rb (TestZlibGzipReader#test_reader_wrap): set
	  binmode explicitly for fixing test error on Windows. This is consistent
	  with r34243.
	  [ruby-dev:45149] [Bug #5812]

Sat Jan 28 05:53:34 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):
	  ignore non-string name modules.  [ruby-core:42244][Bug #5938]

Fri Jan 27 16:31:45 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (HEAP_ALIGN, HEAP_ALIGN_MASK): DRY, let compiler calculate
	  from HEAP_ALIGN_LOG.

Thu Jan 26 11:03:37 2012  Eric Hodel  <drbrain@segment7.net>

	* lib/matrix.rb:  Clean up extra whitespace in output documentation.

Thu Jan 26 03:24:02 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (io_getch): default delegating method
	  for StringIO.  https://github.com/nobu/io-console/issues/4

	* ext/stringio/stringio.c: moved some methods to hidden modules.

Wed Jan 25 13:27:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_basename): ignore non-ascii extension in
	  different encoding, which cannot match.

	* file.c (rmext): no extension to strip if empty string.

	* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
	  (rb_enc_path_last_separator, rb_enc_path_end)
	  (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
	  path handling functions.

	* file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
	  (rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
	  (rb_file_join): should respect the encodings of arguments than
	  file system encoding.  [ruby-dev:45145] [Bug #5919]

	* dir.c (check_dirname, ruby_glob0): ditto.

	* ext/pathname/pathname.c (path_sub_ext): ditto.

Tue Jan 24 14:20:42 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (rb_iter_break_value): new function to break a block with
	  the value.  [ruby-dev:45132] [Feature #5895]

Tue Jan 24 12:58:41 2012  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (rb_Hash): add Kernel#Hash conversion method like
	  Array() or Float().  a patch from Run Paint Run Run.  Fix #3131

Tue Jan 24 11:38:05 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/common.rb (URI.encode_www_form_component): initialize on
	  requiring to support JRuby, which runs parallel multithreads.
	  [ruby-core:42222] [Bug #5925]

	* lib/uri/common.rb (URI.decode_www_form_component): initialize on

Mon Jan 23 20:33:11 2012  Jason Kay  <geniture@me.com>

	* lib/net/http.rb (Net::HTTP#connect): Writing entire packet at
	  once to avoid incomplete transmission.  Current code using
	  writeline was causing sub-optimal conversing with a proxy due to
	  the connect tunnel request headers being split over multiple
	  packets. The modification I made allows the connect request to
	  be written as one packet, avoiding problems and optimizing the
	  conversation.

	  https://github.com/ruby/ruby/pull/72
	  [Feature #5460]

Mon Jan 23 17:06:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/mailto.rb (URI::MailTo.build): follow Array#to_s change of
	  Ruby 1.9; use Array#join. [Bug #5840]

Mon Jan 23 16:42:28 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (extract_binmode): raise an exception if binmode/textmode
	  is specified with both vmode and opthash.
	  [ruby-core:42199] [Bug #5918]

Mon Jan 23 16:35:27 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (rb_io_extract_modeenc): set ASCII-8BIT if binmode is specified
	  with opthash. [ruby-core:42197] [Bug #5917]

Mon Jan 23 10:08:00 2012  Kenta Murata  <mrkn@cookpad.com>

	* test/cgi/test_cgi_util.rb (test_cgi_escape_preserve_encoding):
	  add a test for CGI::escape to preserve encoding.

	* test/cgi/test_cgi_util.rb (test_cgi_unescape_preserve_encoding):
	  add a test for CGI::unescape to preserve encoding.

Mon Jan 23 00:45:34 2012  Akinori MUSHA  <knu@iDaemons.org>

	* misc/rdoc-mode.el (rdoc-imenu-create-index): Add imenu support
	  to rdoc-mode.

	* misc/rdoc-mode.el (rdoc-mode): Fix regexp patterns containing
	  "\s " where CR/LF is not supposed to match.

Sun Jan 22 15:41:26 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_intern3): split to registration check and new
	  registration.

	* parse.y (rb_intern_str): make interned string shared with the
	  given string.

	* parse.y (rb_intern3, rb_intern_str): check the coderange first.

Sat Jan 21 22:21:07 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (FIXNUM_P): simple flag should be int.

Sat Jan 21 21:51:19 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* encoding.c (rb_enc_compatible): fix segv on symbols.
	  [ruby-core:42204] [Bug #5921]

Sat Jan 21 11:43:45 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_chdir, check_dirname): get rid of optimization-out.

Fri Jan 20 20:47:37 2012  Kenta Murata  <mrkn@cookpad.com>

	* lib/cgi/util.rb (CGI.escape): support a string with invalid byte
	  sequence.  [Bug #5913]

	* test/cgi/test_cgi_util.rb
	  (test_cgi_escape_with_invalid_byte_sequence): test for the above
	  change.

Fri Jan 20 17:37:37 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm.c (vm_exec): remove workaround for LLVM because r34278 fixes it.

	* vm_insnhelper.c (vm_call_cfunc): ditto.

Fri Jan 20 14:31:43 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP#transport_request): retry a idempotent
	  request automatically. [ruby-dev:45030] [Bug #5790]
	  [ruby-core:41821] [Bug #5813]

	* lib/net/http.rb (Net::HTTP#keep_alive_timeout=): added to specify
	  the second to reconnect the TCP connection on Keep-Alive.
	  The default value is 2 second because current servers uses 2 sec.
	  http://ftp-admin.blogspot.com/2009/09/keepalivetimeout2.html

	* lib/net/http.rb (Net::HTTP#begin_transport): reconnect TCP
	  connection on keep-alive timeout.

Thu Jan 19 07:53:09 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_strptime.c: moved detector of leftover.

Thu Jan 19 07:10:47 2012  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c: [ruby-core:42173].

Wed Jan 18 18:11:02 2012  Akinori MUSHA  <knu@iDaemons.org>

	* misc/rdoc-mode.el (rdoc-mode): Add provide so that requiring
	  this library succeeds.

Wed Jan 18 18:06:45 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/curses/curses.c (cWindow, cMouseEvent): made typed data.

Wed Jan 18 12:49:15 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading
	  subclasses of String with ivars
	* ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping
	  subclasses of String with ivars
	* test/psych/test_string.rb: corresponding tests

Wed Jan 18 10:39:47 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load array
	  subclasses with ivars.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: Added ability to dump
	  array subclasses with ivars.
	* test/psych/test_array.rb: corresponding tests

Tue Jan 17 17:18:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (SPT_TYPE): enable as SPT_REUSEARGV on Darwin.

	* missing/setproctitle.c (ruby_init_setproctitle): changed prefix.

Tue Jan 17 12:32:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (aligned_malloc, aligned_free): covered missing defined
	  operators and fixes for cygwin.

Tue Jan 17 10:54:46 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c (do_hash): it's the time to remove cast to unsigned int.

Tue Jan 17 07:30:12 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* st.c (unpack_entries): Fix r34310: on unpacking, the position of
	  a hash must be do_hash-ed value.

	* st.c (add_packed_direct): ditto.

Mon Jan 16 16:41:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (Regexp): fix incorrect options when casting to
	  a Regexp, and suppress encoding option warnings.
	  https://github.com/ruby/ruby/pull/82

Mon Jan 16 11:22:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_chsize): no need to get the current file size.

Mon Jan 16 00:41:33 2012  Sokolov Yura  <funny.falcon@gmail.com>

	* st.c: st use function instead of macro.  In my current
	  environment (Ubuntu 11.04 32bit gcc-4.5.2) it gives 4%
	  performance improvement.

	  https://github.com/ruby/ruby/pull/77

Sun Jan 15 14:09:48 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* object.c (rb_inspect): raise the result is not compatible with
	  the default external encoding. [ruby-core:42095] [Bug #5848]
	  If the default external encoding is ASCII compatible, the encoding of
	  inspected result must be compatible with it.
	  If the default external encoding is ASCII incompatible,
	  the result must be ASCII only.

Sun Jan 15 13:21:50 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json/parser/parser.rl (json_string_unescape): workaround fix
	  for over optimization of GCC 4.7. [ruby-core:42085] [Bug #5888]
	  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51862

Sat Jan 14 22:24:09 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/callback/mkcallback.rb (gencallback): suppress unused
	  variables.

Sat Jan 14 21:56:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (iseq_data_to_ary): check line info table boundary.  line
	  number 0 means no line number info is needed.  [ruby-dev:45130]
	  [Bug #5894]

Sat Jan 14 18:24:13 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* error.c (exc_equal): clear rb_thread_t::errinfo when ignore
	  an exception under rb_protect(). [ruby-core:41979] [Bug #5865]

Sat Jan 14 12:02:55 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (rb_enc_vsprintf): relaxed the restriction.  since the
	  implementation deeply depends on plain char, so wchar_t based
	  encodings are not supported.

Sat Jan 14 12:00:20 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (exc_equal): ignore exceptions during implicit
	  conversion.  [ruby-core:41979] [Bug #5865]

Sat Jan 14 05:58:54 2012  Eric Hodel  <drbrain@segment7.net>

	* io.c (rb_io_s_read):  Fix formatting of open_args comment.  Reported
	  by Adam Prescott.

Fri Jan 13 18:41:19 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (rb_enc_vsprintf): can be used for ASCII compatible
	  encodings only.

Fri Jan 13 18:29:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_mutex_unlock_th): simplified.

	* thread.c (rb_barrier_waiting): fix potential overflows.

Fri Jan 13 17:23:38 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (load_unlock): update loading table at once.

Fri Jan 13 16:44:45 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (exc_equal): try implicit conversion for delegator.
	  [ruby-core:41979] [Bug #5865]

Fri Jan 13 03:46:53 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/shellwords.rb (Shellwords#shellescape): shellescape() now
	  stringifies the given object using to_s.

	* lib/shellwords.rb (Shellwords#shelljoin): shelljoin() accepts
	  non-string objects in the given array, each of which is
	  stringified using to_s.

	* lib/shellwords.rb: Fix rdoc markups.

Fri Jan 13 03:38:36 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/shellwords.rb (Shellwords#shellsplit): Fix a bug where
	  consecutive backslashes in double quotes are all removed except
	  the one at the tail.

Fri Jan 13 03:28:00 2012  Luis Lavena  <luislavena@gmail.com>

	* ext/socket/extconf.rb (if ipv6): only define _WIN32_WINNT if was not
	  previously defined. This solve warnings with multiple defines in
	  command line with GCC 4.6.1

Thu Jan 12 18:44:31 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: fix r33904 and revert r33905.  initialize global
	  variables with init_mkmf before initializing constants.
	  [ruby-dev:45124] [Bug #5879]

Thu Jan 12 13:51:00 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for
	  reserving a memory space with ALLOCA_N for restoring machine stack
	  stored in cont->machine_stack, but clang optimized out it (and
	  maybe #5851 is also caused by this).
	  This affected TestContinuation#test_check_localvars.

	* cont.c (cont_restore_1): revert workaround introduced in r32201.

Thu Jan 12 02:14:43 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* object.c: Added examples for Object#is_a? and
	  Object#instance_of? patched from Manoj Kumar.
	  [Bug #5880] [ruby-core:42057]

Thu Jan 12 00:57:48 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/mkmf.rb: verbose-mode can use by RM, RMDIRS, etc.
	  (e.g. make V=1 realclean)

Wed Jan 11 23:40:21 2012  Naohisa Goto  <ngoto@gen-info.osaka-u.ac.jp>

	* string.c (rb_str_concat): set array element after definition
	  to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
	  on Sparc.  [Bug #5878] [ruby-dev:45123]

Wed Jan 11 22:52:51 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (ruby_mimmalloc): don't set allocated size to header.
	  ruby_mimmalloc() doesn't increment allocated_size/allocations and
	  decrement them in ruby_xfree() cause inconsistency.

	* gc.c (ruby_xfree): don't decrement allocated_size/allocations if
	  allocated size record is 0.

Wed Jan 11 22:36:43 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/readline/test_readline.rb (test_completion_proc_empty_result):
	  ensure clearance of Readline's line_buffer after the test.

Tue Jan 10 21:57:38 2012  Hiroshi Shirosaki <h.shirosaki@gmail.com>

	* ext/dbm/dbm.c (Init_dbm): fix a build error on mswin32.
	  use `extern __declspec(dllimport)` for dll link with VC.
	  [ruby-core:41996] [Bug #5869]

Tue Jan 10 15:31:55 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm.c (vm_exec): refix r34162; suppress warning and add description.

Tue Jan 10 15:13:58 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (readline_attempted_completion_function):
	  use rb_memerror().

Tue Jan 10 12:49:42 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c: in fact, i686-linux doesn't need to define _XOPEN_SOURCE 600.

Tue Jan 10 12:44:11 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c (ruby_mimmalloc): defined for objects need not rb_objspace,
	  but should return pointer suitable for ruby_xfree;
	  main vm and main thread.
	  patched by Sokolov Yura. https://github.com/ruby/ruby/pull/79

	* internal.h: ditto.

	* vm.c (Init_BareVM): use ruby_mimmalloc.

	* ext/dl/cfunc.c: #include <ruby/util.h>.

	* ext/syslog/syslog.c: use xfree because it is allocated by
	  ruby_strdup.

Tue Jan 10 12:13:56 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ext/readline/readline.c (readline_attempted_completion_function):
	  fix compile error.

Tue Jan 10 10:41:11 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/readline.c (readline_attempted_completion_function):
	  empty completion result does not mean memory error.

Tue Jan 10 02:19:22 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/ruby/test_io.rb (test_autoclose_true_closed_by_finalizer,
	  test_autoclose_true_closed_by_finalizer): skip if IO objects are
	  not recycled yet. [ruby-dev:45098] [Bug #5850]

Tue Jan 10 00:41:28 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* lib/tempfile.rb (Tempfile#_close): clear @tempfile and @data[1] even
	  when exception is raised at @tempfile.close. [ruby-dev:45113]

	* lib/tempfile.rb (Tempfile#unlink): fix a typo.

Tue Jan 10 00:32:17 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (run_finalizer): clear rb_thread_t::errinfo when ignore
	  an exception under rb_protect(). [ruby-dev:45113]

Mon Jan  9 23:37:43 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/readline/readline.c (readline_attempted_completion_function):
	  fix typos.

Mon Jan  9 20:55:34 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c : don't embed struct heaps_slot to a heap block because it
	  can causes copy-on-write of memory page on heap block when its
	  free_next is rewritten.

Mon Jan  9 20:26:33 2012  Tanaka Akira  <akr@fsij.org>

	* ext/pathname/pathname.c (path_entries): add document suggested by
	  the thread [ruby-core:41959] [Bug #5859].

Mon Jan  9 20:14:13 2012  Tanaka Akira  <akr@fsij.org>

	* ext/socket/lib/socket.rb (family_addrinfo): don't require protocol
	  equality.  For example, protocol 0 and IPPROTO_TCP is not problem
	  for TCP.

Mon Jan  9 20:08:52 2012  Tanaka Akira  <akr@fsij.org>

	* ext/socket/lib/socket.rb (family_addrinfo): return the given
	  addrinfo object.
	  Patch by Ippei Obayashi.  [ruby-dev:45095] [Bug #5845]

Mon Jan  9 19:40:20 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/zlib/test_zlib.rb (TestZlibGzipWriter#test_writer_wrap): set
	  binmode explicitly.

Mon Jan  9 14:42:41 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: free_slots is changed Singly linked list. clear
	  free_slots before sweep.

Mon Jan  9 07:46:17 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c: i686-linux needs to define _XOPEN_SOURCE 600 for posix_memalign.

Mon Jan  9 04:24:59 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c (rb_objspace_free): global_List is allocated with xmalloc.
	  patched by Sokolov Yura.  https://github.com/ruby/ruby/pull/78

	* dln_find.c: remove useless replacement of free.

	* ext/readline/readline.c (readline_attempted_completion_function):
	  strings for readline must allocated with malloc.

	* process.c (run_exec_dup2): use free; see also r20950.

	* re.c (onig_new_with_source): use malloc for oniguruma.

	* vm.c (ruby_vm_destruct): use free for VMs.

	* vm.c (thread_free): use free for threads.

Mon Jan  9 04:24:59 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* dln_find.c: remove useless replacement of free.

	* ext/readline/readline.c (filename_completion_proc_call):
	  matches should use xfree.

	* ext/readline/readline.c (username_completion_proc_call): ditto.

Mon Jan  9 01:12:35 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* numeric.c (rb_enc_uint_char): raise RangeError when added codepoint
	  is invalid. [Feature #5855] [Bug #5863] [Bug #5864]

	* string.c (rb_str_concat): ditto.

	* string.c (rb_str_concat): set encoding as ASCII-8BIT when the string
	  is US-ASCII and the argument is an integer greater than 127.

	* regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code.

	* enc/euc_jp.c (code_to_mbclen): ditto.

	* enc/shift_jis.c (code_to_mbclen): ditto.

Sun Jan  8 20:31:45 2012  Narihiro Nakamura  <narihiro@netlab.jp>

	* gc.c : consider header bytes which are used by malloc.

Sun Jan  8 11:54:43 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (aligned_free): support MinGW. Patch by Hiroshi Shirosaki.

Sun Jan  8 11:43:05 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (slot_sweep): add a assertion instead of a debug print.

Sun Jan  8 01:18:19 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/-ext-/old_thread_select/test_old_thread_select.rb:
	  avoid platform bug. [Bug #5858] [ruby-dev:45108]

Sun Jan  8 00:46:34 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* gc.c: get rid of implicit narrowing conversion.

Sun Jan  8 00:10:10 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: check posix_memalign(3) and memalign(3).

	* gc.c (aligned_malloc): use configure's result instead of
	  _POSIX_C_SOURCE and _XOPEN_SOURCE because they can't be used
	  to check availability at least on FreeBSD.

Sat Jan  7 22:25:50 2012  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: use Bitmap Marking algorithm to avoid copy-on-write of
	  memory pages. See [ruby-dev:45085] [Feature #5839]
	  [ruby-core:41916].

	* include/ruby/ruby.h : FL_MARK rename to FL_RESERVED1.

	* node.h : ditto.

	* debug.c : ditto.

	* object.c (rb_obj_clone): FL_MARK move to a bitmap.

	* class.c (rb_singleton_class_clone): ditto.

Sat Jan  7 00:47:07 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* configure.in: always define CANONICALIZATION_FOR_MATHN.
	  [ruby-dev:45100] [Bug #5852]

Fri Jan  6 23:11:20 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* include/ruby/version.h: RUBY_API_VERSION 2.0.0

Fri Jan  6 12:24:11 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* object.c (rb_inspect): raises Encoding::CompatibilityError if the
	  result is incompatible with the default external encoding.
	  [ruby-core:41931] [Bug #5848]

Thu Jan  5 15:26:15 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (check_valid_dir): strict checking of root.
	  GetDriveType() succeeds with non root directory as the argument,
	  even if MSDN says that the API needs the root directory.
	  this patch fixes a failure of test/ruby/test_file_exhaustive.rb.

Thu Jan  5 12:15:55 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (rb_file_join): separator is appended by array length - 1
	  times. patched by Benoit Daloze [ruby-core:41901] [Bug #5841]

Thu Jan  5 11:47:54 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/common.rb (URI::Parser#initialize_regexp):
	  use \A \z instead of ^ $. [Bug #5843]

Wed Jan  4 17:55:53 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* array.c (rb_ary_sample): add example for Array#sample
	  based on patch from https://github.com/ruby/ruby/pull/74

Wed Jan  4 14:24:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_nth_len): count ascii-only run at the end.  this
	  bug appears only when single-byte-optimization is disabled due
	  to unknown coderange.  [ruby-core:41896] [Bug #5836]

Wed Jan  4 11:32:07 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (check_valid_dir): special case for a root directory.
	  Reported by Masateru OKAMOTO at [Bug #5819].

Wed Jan  4 00:19:54 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb: use private instead of _xxx
	  method name. This is Ruby code not Python code.
	  refs #5696

Tue Jan  3 23:57:37 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/rexml/parsers/baseparser.rb: rexml BaseParser uses
	  instance_eval unnecessarily on listener add.
	  patch from Charles Nutter. [Bug #5696] [ruby-core:41437]

Tue Jan  3 20:44:13 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* README: add comment for Git user. patch from Arun Agrawal.
	* README.ja: ditto.

Tue Jan  3 15:58:22 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* thread.c: changed documentation for "thread-local" variables.
	  patch from Julien Ammous.

Tue Jan  3 15:50:12 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* process.c: Fix typo. patch from Aviv Ben-Yosef.

Tue Jan  3 13:43:37 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* tool/merger.rb: allow r0123 style revision number.

Tue Jan  3 11:17:55 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* tool/merger.rb (#version_up): version.h date should be Japanese
	  locale date.

Mon Jan  2 22:08:00 2012  Akinori MUSHA  <knu@iDaemons.org>

	* tool/file2lastrev.rb (VCS::detect): Add support for Subversion
	  1.7 which adopted a whole new working directory structure.

	* tool/file2lastrev.rb (VCS::detect): Simply use .each instead of
	  .sort.reverse_each which looks too arbitrary.  If you want SVN
	  to be tried first, then you just have to register it first as it
	  is right now.

Mon Jan  2 20:53:36 2012  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb (random_bytes): use IO#read instead of
	  IO#readpartial to make the intent more clear.

Mon Jan  2 15:26:39 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/ruby/test_object.rb (test_send_with_block): add a normal case.

Mon Jan  2 15:18:54 2012  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/ruby/test_object.rb (test_send_with_block): moved from
	  bootstraptest/test_flow.rb.

Mon Jan  2 15:10:11 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/test/unit/parallel.rb: use pack("m0") instead of
	  pack("m").gsub("\n","").
	* lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto.

Mon Jan  2 15:05:09 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/test/unit.rb (Test::Unit::Runner::Worker#run): use
	  File.basename with suffix instead of gsub.

Mon Jan  2 14:55:28 2012  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): find may
	  return nil and nil can not dup.

Sun Jan  1 12:23:10 2012  Akinori MUSHA  <knu@iDaemons.org>

	* lib/shellwords.rb (Shellwords#shellescape): Drop the //n flag
	  that only causes warnings with no real effect.  [Bug #5637]

Sat Dec 31 06:28:37 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread.c (rb_barrier_waiting): save the number of waiting threads
	  in RBASIC()->flags. [ruby-dev:45002] [Bug #5768]

	* thread.c (rb_barrier_wait): increment and decrement around
	  rb_mutex_lock, and use rb_barrier_waiting().

	* thread.c (rb_barrier_release): use rb_barrier_waiting().

	* thread.c (rb_barrier_destroy): ditto.

Mon Dec 26 17:20:10 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm.c (vm_exec): add guard to prevent optimization for LLVM clang.

Fri Dec 30 17:01:12 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* vm_eval.c (rb_f_send): fix obj.send() documentation issue.
	 [Bug #5125] [ruby-core:38633]

Thu Dec 29 22:36:16 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* lib/test/unit.rb (Test::Unit::Runner::Worker#_run_parallels): fix
	  premature exit when all workers' status are :ready or :prepare.
	  [ruby-dev:45061] [Bug #5822]

Thu Dec 29 01:51:13 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* include/ruby/ruby.h: fix #error pragma. LLP64 platform is supported.

	* include/ruby/st.h: ditto.

Wed Dec 28 11:22:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/fileutils.rb (FileUtils::Entry_#entries): use utility method
	  instead of typoed regexp.  [ruby-core:41829] [Bug #5817]

Wed Dec 28 02:08:04 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent
	  intermediate object from GC.

Tue Dec 27 22:34:54 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb (Worker#close): "closing IO if IO is closed"
	  should be "closing IO if IO isn't closed"

Tue Dec 27 22:04:27 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.c (st_update): new function to lookup the given key and
	  update the value.  [ruby-dev:44998]

Tue Dec 27 21:17:33 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (rb_args_info): change pre_args_num and post_args_num as
	  int, to match with rb_iseq_t.

	* parse.y (new_args_gen): check overflow.

Mon Dec 26 22:38:35 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* vm_insnhelper.c (unknown_keyword_error): make it kind a error
	  message when unknown keyword is given.  It require more work.
	  See [ruby-core:40518] and [ruby-core:40541] in detail.

Mon Dec 26 22:31:07 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments),
	  iseq.c (rb_iseq_parameters), vm_insnhelper.c
	  (vm_callee_setup_arg_complex): support Method#parameters for keyword
	  arguments.  The provisional spec is what Benoit Daloze proposed.
	  [ruby-core:40541]

	* test/ruby/test_keyword.rb: add a test for above.

Mon Dec 26 22:15:27 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments,
	  iseq_compile_each), vm_insnhelper.c (vm_callee_setup_arg_complex):
	  implement keyword arguments.  See [ruby-core:40290]
	  The feature is promised to be included in 2.0, but the detail spec
	  is still under discussion; this commit is a springboard for further
	  discussion.  Please try it and give us feedback.
	  This commit includes fixes for some problems reported by Benoit
	  Daloze <eregontp AT gmail.com> [ruby-core:40518] and Marc-Andre
	  Lafortune <ruby-core-mailing-list AT marc-andre.ca>
	  [ruby-core:41772].

	* iseq.c (iseq_free, prepare_iseq_build): bookkeeping.

	* test/ruby/test_keyword.rb: add tests for keyword arguments.

	* test/ripper/dummyparser.rb (class DummyParser): temporal fix for
	  ripper test.

Mon Dec 26 22:00:17 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* node.h, node.c, parse.y: implement a parser part for keyword
	  arguments.
	  This is a preparation for keyword argument (see [ruby-core:40290]).

	* gc.c (gc_mark_children): bookkeeping.

Mon Dec 26 21:03:18 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* node.h, parse.y (new_args_gen), compile.c (iseq_set_arguments): use
	  struct rb_args_info instead of NODEs.
	  This is a preparation for keyword argument (see [ruby-core:40290]).

	* node.c (dump_node), gc.c (gc_mark_children, obj_free): bookkeeping.

Mon Dec 26 20:59:51 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack.
	  This is a preparation for keyword argument (see [ruby-core:40290]).

Mon Dec 26 22:01:19 2011  Hiroshi Shirosaki <h.shirosaki@gmail.com>

	* io.c (rb_sys_fail_path): move the definition.
	  Move above for using it in set_binary_mode_with_seek_cur().

	* io.c (set_binary_mode_with_seek_cur): fix improper seek cursor.
	  Seeking file cursor with setting binary mode has possibility to
	  cause infinite loop. Fixed the bug and refined error handling.
	  Introduced at r34043.

	  And cleanups as below.
	  Remove unnecessary parentheses of `fptr`.
	  Use return value of setmode().

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_seek_with_setting_binmode): add a test for above.
	  [ruby-core:41671] [Bug #5714]

Mon Dec 26 17:01:14 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (LIBRUBY_A): depends on main.o since r33774.
	  [ruby-core:41786] [Bug #5796]

Mon Dec 26 13:07:08 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't
	  accept the block argument.

Mon Dec 26 13:06:52 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb: Avoid zombie processes on "--separate" option
	  added at r34121.

Mon Dec 26 04:01:23 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_cipher.c: Update and complete documentation.

Sun Dec 25 23:16:11 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/testunit/test_parallel.rb (test_separate): Test for "--separate"
	  option (r34121)

Sun Dec 25 22:39:49 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb (_run_parallel):
	  New option "--separate" for test/unit; when running tests with this
	  option, a job process will be restarted after one test file has done.
	  This means all test files will run with separated process.

	* lib/test/unit/parallel.rb: Fix for above. Now parallel.rb puts
	  "ready!" for first ready, "ready" for afters.

Sun Dec 25 00:02:15 2011  Luis Lavena  <luislavena@gmail.com>

	* configure.in: change --with-ntver to --with-winnt-ver to be more
	  descriptive in the context. [ruby-core:41794]

Sat Dec 24 23:25:15 2011  Luis Lavena  <luislavena@gmail.com>

	* configure.in: add --with-ntver option to match win32/configure.bat
	  functionality. Set 0x0501 as default. [ruby-core:35010]
	  [ruby-core:35035]

Sat Dec 24 12:38:53 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (proc_call): get rid of optimization-out by clang.

	* proc.c (rb_proc_call, rb_proc_call_with_block): ditto.

Sat Dec 24 10:56:32 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/readline.c (readline_readline): check if outstream
	  is closed to get rid of a bug of readline 6.  [ruby-dev:45043]
	  [Bug #5803]

Sat Dec 24 06:59:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/readline/test_readline.rb (test_line_buffer__point): use
	  lambda not to exit entire method by "return".  or "next" for
	  proc.  [ruby-dev:45042] [Bug #5802]

Sat Dec 24 01:20:39 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed
	  just before calling rb_call0.

	* bootstraptest/test_flow.rb: add a test for above.

Sat Dec 24 00:55:16 2011  Tanaka Akira  <akr@fsij.org>

	* lib/tempfile.rb (Tempfile#initialize): warn if a block is given.

Fri Dec 23 16:14:30 2011  TAKAO Kouji  <kouji@takao7.net>

	* ext/readline/readline.c (readline_attempted_completion_function):
	  in Readline module with GNU Readline 6 case, Readline module
	  resets completion_append_character to " ", after it executes
	  completion. So, Readline module stores
	  completion_append_character, and Readline module always sets it
	  after Readline module executes completion. [ruby-dev:43456]
	  [Feature #4635]

Fri Dec 23 15:59:05 2011  TAKAO Kouji  <kouji@takao7.net>

	* ext/readline/readline.c (Init_readline): libedit check
	  rl_getc_function only when rl_initialize() is called, and
	  using_history() call rl_initialize(). This assignment should be
	  placed before using_history(). [ruby-core:40641] [Bug #5539]

Fri Dec 23 10:14:47 2011  Tanaka Akira  <akr@fsij.org>

	* test/thread/test_queue.rb (test_thr_kill): show the number of loop
	  run when the test failed.

Fri Dec 23 09:23:48 2011  Tanaka Akira  <akr@fsij.org>

	* test/test_pty.rb (test_pty_check_default): call PTY.check until
	  "cat" command is finished.

Fri Dec 23 06:03:00 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* common.mk: add "check succeeded" message.

	* README, README.ja: follow above change.

Fri Dec 23 06:00:39 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ext/bigdecimal/bigdecimal.h: add satisfy cc-mode comment.
	* util.c: ditto.

Fri Dec 23 00:08:25 2011  Tanaka Akira  <akr@fsij.org>

	* test/test_pty.rb (test_pty_check_default): "cat" may not terminated
	  in the 0.1 second.

Thu Dec 22 23:37:25 2011  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_thread.rb (test_condvar_timed_wait): don't test the
	  maximum sleep time.  Ruby is not a real-time system.

Thu Dec 22 22:37:45 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* thread_pthread.c (ping_signal_thread_list): remove return value.
	* thread_pthread.c (check_signal_thread_list): add a new function to
	  check if signal thread list is empty.
	* thread_pthread.c (thread_timer): check signal thread list after
	  timer_thread_function(). main thread might be added into signal thread
	  list during timer_thread_function().

Thu Dec 22 00:40:24 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/bigdecimal/bigdecimal.c (VpMult, VpCtoV, VpSqrt): remove assigned
	  but unused variables.

Wed Dec 21 18:28:22 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk (newline.c, miniprelude.c): revert r33949 because the change
	  broke mswin build, and the changer said no reason about the change.
	  [ruby-dev:45016] [Bug #5783]

Wed Dec 21 12:35:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_s_allocate): follow
	  Allocation Framework.  [Bug #5775]

Wed Dec 21 02:25:36 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/emitter.c: fixing clang warnings. Thanks Joey!

Wed Dec 21 01:06:00 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.org
	* ext/socket/ancdata.c: ditto
	* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto
	* test/syck/test_yaml.rb: ditto
	* doc/ChangeLog-1.9.3: ditto

Tue Dec 20 23:50:12 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* PStore content update perf optimization. Patch by Masaki Matsushita.
	  See #5248.

	* lib/pstore.rb (save_data):

	  * Delete inadequate Marshal check.

	  * Deferred file truncation: when writing the new content, truncate
	    the saved file to the data size after writing the data, instead of
	    truncating whole bytes before writing data.

	  * Deferred MD5 calculation: when comparing MD5 hash to check the
	    content modification, calculate MD5 hash of new data iif the
	    content length is differ from the old one.

	  * Compare content size with String#bytesize instead of String#size.

Tue Dec 20 21:00:30 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: uses to_integer instead.
	* test/date/test_switch_hitter.rb: added a test.

Tue Dec 20 15:04:18 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* Make sure to clear $! when ignoring an exception

	* ext/openssl/ossl.c (ossl_pem_passwd_cb0, ossl_verify_cb):
	  pem_passwd_cb and verify_cb ignores the exception raised in a
	  callback proc so it should clear $! for subsequent execution.

	  That's said, both subsequent processes for pem_passwd_cb and
	  verify_cb raises another exception before leaking $! to Ruby world.
	  We cannot test this fix in Ruby land.

	* test/openssl/test_pkey_rsa.rb
	  (test_read_private_key_pem_pw_exception): Test for pem_passwd_cb +
	  exception.

Tue Dec 20 11:49:13 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/date/test_date_base.rb (test_jd): tests for
	  [ruby-dev:45008].

Tue Dec 20 10:20:48 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/date/date_core.c (wholenum): fix the type of the return value.

Tue Dec 20 05:03:24 2011  Eric Hodel  <drbrain@segment7.net>

	* README.ja:  Update redmine.ruby-lang.org to bugs.ruby-lang.org
	* README:  ditto
	* common.mk:  ditto
	* man/erb.1:  ditto
	* man/irb.1:  ditto
	* man/ri.1:  ditto
	* man/ruby.1:  ditto
	* sparc.c:  ditto
	* tool/install-sh:  ditto

Tue Dec 20 02:15:18 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c:  [ruby-dev:45008].

Sun Dec 18 18:52:37 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* vm.c (vm_define_method): improve guard of iseq from GC.  Fix
	  failure or segmentation fault in test_singleton_method(TestGc)
	  on sparc Solaris10 compiled with Oracle Solaris Studio 12.2.
	  [Bug #5762] [ruby-dev:45000] [Bug #4178]

Sun Dec 18 14:34:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): does not follow
	  allocation framework right now.  [ruby-core:41710] [Bug #5773]

Sun Dec 18 12:42:48 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restored
	  from YAML.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: BigDecimals can be dumped
	  to YAML.
	* test/psych/test_numeric.rb: tests for BigDecimal serialization

Sun Dec 18 12:03:13 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: Strings that look like dates
	  should be treated as strings and not dates.

	* test/psych/test_scalar_scanner.rb: corresponding tests.

Sun Dec 18 09:43:21 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/thread/test_queue.rb (test_thr_kill): extend timeout.
	  this test takes a long time at slow machine.

Sun Dec 18 09:36:51 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/ruby/envutil.rb (invoke_ruby): remove :timeout option before
	  pass it to Kernel#spawn.

Fri Dec 16 17:18:38 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* README, README.ja: 'make check' is preferable to 'make test'.

Thu Dec 15 23:16:13 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* error.c (builtin_type_name): don't return pointer to the buffer of
	  temporary String object.

Thu Dec 15 17:56:58 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_type): make typed data.

Thu Dec 15 17:40:28 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_check_type): fix typo.

Thu Dec 15 14:48:35 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/strscan/strscan.c: use typed data with
	  onig_region_memsize().

Thu Dec 15 14:33:33 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_check_typeddata): refine error message with
	  including expected struct name.

Thu Dec 15 13:15:51 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* regcomp.c (onig_region_memsize): implemented for memsize_of().

	* ext/objspace/objspace.c (memsize_of): use it.

Thu Dec 15 10:44:54 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_reject_bang, rb_ary_delete_if): update rdoc.
	  documentation from Thomas Leitner <t_leitner AT gmx.at> in
	  [ruby-core:41616].  [Bug #5752]

Thu Dec 15 10:10:43 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_require.rb (test_race_exception): get rid of
	  not-guaranteed timing issue.  [ruby-core:41655] [Bug #5754]

Wed Dec 14 21:58:42 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_{read_with_binmode_and_get[cs]}): only for Windows.

Wed Dec 14 19:57:23 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk,Makefile.in,win32/Makefile.sub (ECHO1): move platform
	  specific hack from common.mk to Makefile.in (and win32/Makefile.sub).
	  [Bug #5711]

	* lib/mkmf.rb: we can generate Makefile as we like.

Wed Dec 14 19:22:33 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.

	* win32/win32.c (init_stdhandle): set default mode of stdin as binmode.

	* io.c (set_binary_mode_with_seek_cur): new function to replace
	  SET_BINARY_MODE_WITH_SEEK_CUR macro.  now returns previous mode of the
	  fd and take care of LF in rbuf.

	* io.c (do_writeconv): set text mode when needed.

	* io.c (io_read): need to change the mode of the IO to binmode
	  temporally when the length for IO#read, because IO#read with length
	  must behave so.

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length,
	  read_with_length_binmode,get[cs]_and_read_with_binmode,
	  read_with_binmode_and_get[cs],read_write_with_binmode}): tests for
	  above changes.

	all patches are written by Hiroshi Shirosaki. [ruby-core:41496]
	[Feature #5714]

Wed Dec 14 15:28:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (str_encode): about the extension of :fallback
	  option since 1.9.3.

Wed Dec 14 12:19:59 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (load_unlock): release loading barrier and then remove it
	  from loading_table if it is not in-use.  [Bug #5754]

	* thread.c (rb_barrier_release, rb_barrier_destroy): return
	  whether any other threads are waiting on it.

Wed Dec 14 11:23:45 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (ubf_select): call rb_thread_wakeup_timer_thread()
	  only when it is not timer_thread. [Bug #5757] [ruby-dev:44985]
	  patched by Tomoyuki Chikanaga.

Wed Dec 14 10:20:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (load_lock): delete the loading barrier if it has been
	  destroyed.

	* thread.c (rb_barrier_wait): return nil for recursive lock
	  instead of false, to distinguish it from destroyed barrier.

Wed Dec 14 01:24:55 2011  okkez  <okkez000@gmail.com>

	* thread_pthread.c (rb_thread_create_timer_thread): fix memory
	  leak. [ruby-dev:44904] [Bug #5688]

Wed Dec 14 00:01:15 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): point method name line.  [ruby-core:40936]
	  [Bug #5614]

Tue Dec 13 23:43:48 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* error.c (name_err_mesg_to_str): clear rb_thread_t::errinfo when
	  ignore exception under rb_protect(). [ruby-core:41612] [Bug #5755]

	* test/ruby/test_exception.rb (test_exception_in_name_error_to_str):
	  add a corresponding test.

Tue Dec 13 16:13:29 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (load_unlock): all threads requiring one file should
	  share same loading barrier, so it must be kept alive while those
	  are waiting on it.  [ruby-core:41618] [Bug #5754]

Tue Dec 13 07:30:14 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/webrick/httpresponse.rb (setup_header): 1xx responses
	  are allowed to have Keep-Alive connections.

	* test/webrick/test_httpresponse.rb: corresponding test.

Tue Dec 13 07:13:28 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/webrick/httpresponse.rb (setup_header): 204 and 304 responses
	  are allowed to have a Keep-Alive connection. [ruby-core:41581]

	* test/webrick/test_httpresponse.rb: corresponding test.

Tue Dec 13 06:29:39 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_magic_comment): should pass the proper value.
	  [ruby-dev:44984][Bug #5753]

Tue Dec 13 05:50:07 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_yield_setup_block_args): splat single
	  argument if optional arguments are defined not only mandatory or
	  post arguments.  [ruby-core:41557] [Bug #5730]

Mon Dec 12 22:35:39 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* parse.y (stmt_or_begin): changed the error message for BEGIN not
	  at toplevel.  [ruby-dev:44963] [Bug #5738]

Mon Dec 12 17:29:01 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* README: Fixed SupportedPlatforms URL in the README.
	  patched by eMxyzptlk. https://github.com/ruby/ruby/pull/62

Mon Dec 12 17:26:51 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (rb_feature_p): lazy assigned load_path searched in
	  loading_table were not expanded, but all features, pushed to
	  loading table, are expanded.  a patch by Yura Sokolov
	  <funny.falcon AT gmail.com> in [ruby-core:41545]. [Bug #5727]

Mon Dec 12 15:41:03 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_truncate): fix typo.  patched by
	  Nick Howard <ndh AT baroquebobcat.com>.
	  https://github.com/ruby/ruby/pull/65

Sun Dec 11 12:19:17 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb: includes the sequence number of UID in a error
	  message.  suggested by art lussos.
	  [ruby-core:41413] [Feature #5692]

Sun Dec 11 11:42:10 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/syslog/syslog.c: fix a typo. [ruby-core:41585] [Bug #5740]

Sun Dec 11 10:48:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (exit_initialize): deal with true and false as well as
	  Kernel#exit.  [ruby-dev:44951] [Bug #5728]

Sun Dec 11 10:37:47 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_check_to_int): new function to convert a VALUE to
	  an Integer if possible, but returns nil instead of raising an
	  exception otherwise.

Sun Dec 11 10:34:39 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_exit_status_code): extract from rb_f_exit_bang and
	  rb_f_exit.  assume 0 to be success in Kernel#exit! too.

Fri Dec  9 19:24:31 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* enc/trans/iso-8859-16-tbl.rb: add ISO-8859-16 converter.

	* enc/trans/single_byte.trans: ditto.

Fri Dec  9 14:28:40 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (file_path_convert): don't convert it when the path string is
	  ascii only. [ruby-core:41556] [Bug #5733]
	  tests are contributed by nobu.

Fri Dec  9 08:00:15 2011  Luis Lavena  <luislavena@gmail.com>

	* include/ruby/win32.h: undef stat to silence mingw-w64 stat
	  redefinition warnings (GCC 4.6.3).

Thu Dec  8 23:38:24 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* variable.c (set_const_visibility): clear inline-cache when constant's
	  visibility is modified. [ruby-dev:44929]

	* test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
	  add test for it.

Thu Dec  8 23:26:11 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/extmk.rb (extract_makefile): should sort after map, not before
	  it.  in this case there is no difference, but we should write better
	  code.  this bad smell was caught by nagachika.

Thu Dec  8 22:31:13 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/extmk.rb (extract_makefile): need to sort the array of current
	  srcs before comparing to the sorted old srcs.
	  fixed the problem that the configuring stage of exts were always
	  run, introduced at r33801.

Thu Dec  8 13:26:24 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rexml/test_order.rb (OrderTester#test_more_ordering): use
	  Zlib::GzipReader.open instead of Zlib::GzipReader.new with File.new.
	  fixed a test error on Windows introduced at r33946.

Thu Dec  8 13:11:26 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_process.rb (TestProcess#test_sete[gu]id): silently
	  skip if not implemented such functions (such as, on Windows).
	  fixed test errors on Windows introduced at r33953.

Thu Dec  8 12:57:50 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/extconf.rb: forgotten to define HAVE_SOCKETPAIR for
	  windows.
	  fixed test errors on Windows introduced at r33947.

Thu Dec  8 12:11:06 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_WERROR_FLAG): append all warning flags which
	  are enabled to compile, so that printf format modifiers properly
	  fail.  [ruby-core:41351] [Bug #5679]

Thu Dec  8 07:20:15 2011  Eric Hodel  <drbrain@segment7.net>

	* doc/re.rdoc:  Document difference between match and =~, options with
	  Regexp.new and global variables.  Patch by Sylvain Daubert.
	  [Ruby 1.9 - Bug #5709]

Thu Dec  8 06:53:10 2011  Eric Hodel  <drbrain@segment7.net>

	* doc/re.rdoc:  Fix example code to match documentation.  Patch by
	  Jarno Lamberg.  [Ruby 1.9 - Bug #5624]

Wed Dec  7 19:04:22 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rpath): fix typo in the help string.  a patch from
	  Yuji Yamano <yyamano AT kt.rim.or.jp> in [ruby-list:48568].

Wed Dec  7 18:55:56 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (vm_set_top_stack, vm_set_eval_stack): check for stack
	  overflow with stack_max before push new frame. [ruby-core:41520]
	  [Bug #5720]

	* vm.c (vm_set_main_stack): no stack overflow chances after
	  vm_set_eval_stack().

Wed Dec  7 09:58:15 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/bigdecimal/bigdecimal.c:  Document +@, -@, hash, INFINITY, Nan.
	  Patch by Sylvain Daubert.  [Ruby 1.9 - Feature #5622]

Wed Dec  7 09:48:00 2011  Eric Hodel  <drbrain@segment7.net>

	* io.c (Init_IO):  Mention io/console methods.  [Ruby 1.9 - Bug #5602]
	* ext/io/console/console.c:  Mention that io/console must be required
	  similar to lib/time.rb

Wed Dec  7 08:04:31 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb (module Psych): parse and load methods take
	  an optional file name that is used when raising Psych::SyntaxError
	  exceptions
	* ext/psych/lib/psych/syntax_error.rb (module Psych): allow nil file
	  names and handle nil file names in the exception message
	* test/psych/test_exception.rb (module Psych): Tests for changes.

Tue Dec  6 18:26:33 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/dbm.c: use db_version() instead of DB_VERSION_STRING to
	  detect runtime Berkeley DB version.
	  use dpversion instead of _QDBM_VERSION to detect runtime QDBM
	  version.
	  [ruby-dev:44948]

Tue Dec  6 12:30:41 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: detect gdbm_version in libgdbm.

	* ext/dbm/dbm.c: make DBM::VERSION more informative for gdbm, qdbm and
	  Berkeley DB 1.x.  [ruby-dev:44944]

Tue Dec  6 07:26:37 2011  Eric Hodel  <drbrain@segment7.net>

	* range.c:  Improve documentation for Range.  Patch by Chris Zetter.
	  [Ruby 1.9 - Bug #5656]

Mon Dec  5 19:08:04 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* regparse.c (PFETCH_READY): separate gcc specific trick.

Mon Dec  5 19:01:59 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (proc_seteuid_m): fix argument.

	* test/ruby/test_process.rb (test_geteuid): fix typo.

	* test/ruby/test_process.rb (test_getegid, test_set[eg]uid): add.

Mon Dec  5 18:56:55 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (big_rshift), compile.c (validate_label,
	  iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
	  (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
	  (rb_io_advise), parse.y (parser_compile_string)
	  (rb_parser_compile_file), proc.c (binding_free), process.c
	  (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
	  (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
	  signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
	  vm_insnhelper.c (vm_expandarray): suppress
	  unused-but-set-variable warnings.

	* class.c (rb_obj_methods), compile.c (iseq_compile_each),
	  iseq.c(iseq_load, rb_iseq_parameters), pack.c (pack_pack),
	  regcomp.c (is_not_included, update_string_node_case_fold),
	  transcode.c (rb_econv_open0, make_replacement),
	  vm_eval.c (raise_method_missing): remove unused variable.

	* signal.c (reserved_signal_p): static.

Mon Dec  5 14:27:23 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert
	  r33876.  [ruby-core:41475] [Bug #5706]

	* ext/socket/extconf.rb: the alternative hack for [Bug #5675].

Mon Dec  5 10:18:45 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
	  1st, to change the mode of an IO is very sensitive problem, so
	  the maintainer of this library should judge it.
	  2nd, usually Zlib::GzipReader.new is not called directly.  #initialize
	  is called via .open, and in the method the I/O is opened in binary
	  mode, so there is no problem without changing the mode in #initialize.

Sun Dec  4 22:53:12 2011  Tanaka Akira  <akr@fsij.org>

	* lib/tempfile.rb: don't use lock directory.  [ruby-dev:39197]

Sun Dec  4 22:34:43 2011  Tanaka Akira  <akr@fsij.org>

	* lib/tempfile.rb (Tempfile::MAX_TRY): remove unused constant.

Sun Dec  4 12:11:28 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* lib/pp.rb: fix rdoc.

Sun Dec  4 12:03:16 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/delegate.rb (Delegator#methods): Kernel#methods receives
	  zero or one argument. [ruby-core:37118] [Bug #4882]

Sun Dec  4 10:15:00 2011  Luis Lavena  <luislavena@gmail.com>

	* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
	  under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706]
	  [Feature #5562]

	* include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
	  decorator.

	* io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
	  NEED_WRITECONV to replace universal newline decorator by CRLF only
	  when required to improve file reading and writing under Windows.
	  Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562]
	* io.c (do_writeconv): adjust binary mode if required.
	* io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.
	* io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.
	* io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.
	* io.c (rb_io_extract_modeenc, rb_sysopen): ditto.
	* io.c (pipe_open, prep_stdio, io_encoding_set): ditto.
	* io.c (rb_io_s_pipe, copy_stream_body): ditto.

	* test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
	  binary mode.

	* win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
	  initialization.
	* win32/win32.c (rb_w32_write): use FTEXT mode accordingly.

Sat Dec  3 20:49:16 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* variable.c (set_const_visibility): print a warning when no argument
	  is passwd to Module#private_constant.  [ruby-list:48558]

	* vm_method.c (set_method_visibility): ditto for
	  Module#private_class_method.

Sat Dec  3 20:43:14 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* variable.c (set_const_visibility): Module#private_constant has
	  changed the visibility of only the first argument.  Now it changes
	  all of them.  [ruby-list:48558]

	* test/ruby/test_module.rb: add a test for above.

Sat Dec  3 07:17:29 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (CFLAGS): append ARCH_FLAG.

	* configure.in (ARCH_FLAG): exclude from CFLAGS.

	* configure.in (UNIVERSAL_INTS): include short int.  fix for
	  test/mkmf.

Fri Dec  2 15:48:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (VpAllocReal): reduce extra frac.

Fri Dec  2 15:41:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check whether -pie or -Wl,-pie is valid as
	  LDFLAGS.  [ruby-core:41438] [Bug#5697]

	* configure.in: use $linker_flag for LDFLAGS option which is not
	  limited to particular platforms.

Thu Dec  1 23:21:58 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) only if
	  PR_SET_NAME is available.

Thu Dec  1 22:31:16 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (linux_get_maxfd): change local variable name.

Thu Dec  1 16:59:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/extconf.rb: add arguments for macro calls.
	  [ruby-core:41370] [Bug#5681]

Thu Dec  1 16:20:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#try_func): fix broken patch at r33834.

Thu Dec  1 14:43:17 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.h (Real): suppress false warning from
	  clang.  [ruby-core:41418] [Bug#5693]

Thu Dec  1 10:31:55 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LDFLAGS): -fstack-protector is always needed to
	  link static library created with it.  [ruby-core:41387]
	  [Bug#5686]

Thu Dec  1 07:03:51 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: add sys/prctl.h test.
	* thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) to change
	  thread name. It may help to debug.

Wed Nov 30 23:35:45 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* variable.c (rb_path2class): don't raise NameError when the middle
	  constant of the path is not defined but defined on toplevel.
	  [ruby-core:41410] [Bug #5691]

Wed Nov 30 20:02:02 2011  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* transcode.c: Simplified rb_econv_binmode, avoided a warning on cygwin.

Wed Nov 30 08:57:07 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/mkmf.rb:  Use MakeMakefile's rm_f to avoid conflict with Rake or
	  FileUtils.
	* test/ruby/test_module.rb:  Hide MakeMakefile's inclusion in Object

Wed Nov 30 09:12:43 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars
	  on Windows.
	  see https://github.com/rdoc/rdoc/issues/87

	* test/rdoc/test_rdoc_markup_pre_process.rb
	  (TestRDocMarkupPreProcess#test_include_file,
	  TestRDocMarkupPreProcess#test_include_file_encoding_incompatible):
	  follow above change.

Wed Nov 30 09:09:37 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c (parse): parse method can take an option file
	  name for use in exception messages.
	* test/psych/test_parser.rb: corresponding tests.

Tue Nov 29 09:07:59 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/mkmf.rb:  Fix indentations of constants at end of module.
	  Document some constants.

Tue Nov 29 09:58:23 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_write_error2): suppress unused variable warning.

Tue Nov 29 07:45:26 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/mkmf.rb:  Wrap comments to 78 columns and clean up formatting.

Tue Nov 29 05:54:18 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/mkmf.rb:  Wrap mkmf.rb in module MakeMakefile to clean up Object
	  documentation.  [Ruby 1.9 - Feature #5658]
	* ext/extmk.rb:  Use MakeMakefile::CONFIG instead of Object::CONFIG
	* test/mkmf/base.rb:  ditto

Tue Nov 29 00:08:57 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* common.mk (INSTRUBY_ARGS): added --mantype to apply mdoc2man.rb
	  to man pages.  Fixes #5598.
	  (do-install-nodoc, do-install-local, do-install-man,
	  dont-install-nodoc, dont-install-local, dont-install-man):
	  No longer needs --mantype.

	  Reported by Rainer Orth <ro AT cebitec.uni-bielefeld.de>,
	  patch by George Koehler <xkernigh AT netscape.net>.

Mon Nov 28 22:26:31 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rake/test_rake_directory_task.rb
	  (TestRakeDirectoryTask#test_directory_win32): shouldn't create any
	  file/directory on root directory.  create on @tempdir (= Dir.pwd).
	  see https://github.com/jimweirich/rake/issues/91

Mon Nov 28 12:57:29 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_write_error2): fwrite() returns ssize_t.

Mon Nov 28 12:47:19 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* parse.y (nodetype, nodeline): static.  these functions are for
	  debugging, and not intend to be public.

Mon Nov 28 12:37:54 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* gc.c (initial_params): static.  it seems to be forgotten at r33501.

Mon Nov 28 12:32:24 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/win32.h, win32/win32.c (GetCurrentThreadHandle): remove
	  unused old API.

Mon Nov 28 12:29:20 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/mkexports.rb (Exports#initialize): remove old symbol name.

Mon Nov 28 12:15:28 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/mkexports.rb (Exports#read_substitution): need to read
	  from subst.h too.  [Bug #5675]

Mon Nov 28 11:46:35 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_io_flush): release GVL during fsync() on Windows.

Mon Nov 28 11:00:25 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/subst.h: typo of r33876.

Mon Nov 28 10:36:00 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/subst.h: moved Windows specific substitutions from
	  win32.h.

	* ext/socket/rubysocket.h: include ruby/subst.h.  [Bug #5675]

Mon Nov 28 10:20:58 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/{Makeilfe.sub,win32.c} (FILE_COUNT, FILE_READPTR): move the
	  definitions from config.h to win32.c.  I dared to have left such
	  macros, for other future compiler support.
	  [ruby-core:41313] [Bug #5674]

Mon Nov 28 09:28:30 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_uchmod): typo.  [Bug#5671] [ruby-dev:44898]

	* test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug.

Sun Nov 27 21:25:33 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: added -fno-strict-overflow. it suppress annoying
	  -Wstrict-overflow warning.

Sun Nov 27 20:58:02 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_write_error2): get rid of warning on linux. fwrite
	  of glibc is tagged __attribute__ ((__warn_unused_result__))
	  if _FORTIFY_SOURCE != 0.
	* vm_dump.c (rb_vm_bugreport): ditto.

Sun Nov 27 19:09:02 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (stack_protector): disable on mingw.  [Bug#5676]

	* Makefile.in (DLDFLAGS): also needs -fstack-protector.
	  [Bug#5676]

Sun Nov 27 14:13:33 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: add -fstack-protector into XLDFLAGS as well as
	  XCFLAGS if stack-protector is used.

Sun Nov 27 13:09:25 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: workaround to avoid MacOS X build error.
	  Maybe autoconf 2.61 is slightly buggy. [ruby-core:41316]

Sun Nov 27 04:57:11 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (--no-undefined): r33840 breaks FreeBSD and DragonFly
	  with gcc 4.4 or later. Their environ is in /usr/libexec/ld-elf.so.1,
	  so it will be false negative.

Sun Nov 27 04:55:45 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP::SSL_IVNAMES): rerefix 33701.
	  SSL_ATTRIBUTES stores names for set_params, they are symbol.
	  SSL_IVNAMES stores instance variable names.

Sun Nov 27 00:16:07 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (copy_stream_body): use 0666 for permission argument for open.
	  [ruby-core:40865]

Sat Nov 26 23:01:38 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_engine.rb: remove side effect of generic engine
	  load by explicitly loading software-based "openssl" engine for
	  all tests.

Sat Nov 26 20:41:48 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
	  if given URI object is https.
	  patched by Mark Ferlatte [ruby-core:40665] [Bug #5545]

	* lib/net/http.rb (Net::HTTP.post_form): ditto.

Sat Nov 26 20:01:18 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): refix 33701.
	  store instance variable symbol names.

Sat Nov 26 15:40:25 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (script): should be ./configure

Sat Nov 26 15:39:18 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (before_script): wrong name, sorry.

Sat Nov 26 15:31:34 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml (before-script): autoconf required.

Sat Nov 26 15:24:05 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* .travis.yml: Travis enable.

Sat Nov 26 10:47:50 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/extconf.rb: remove checks for available functions.
	* ext/openssl/missing.h: ditto.
	  Thanks, Tim Mooney for reporting this!
	  [Bug #5432] [ruby-core:40088]

Sat Nov 26 10:22:28 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: add comment on where to find implementation
	  of OpenSSL::SSL::SSLSocket#session.

Sat Nov 26 05:00:25 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (--no-undefined): RUBY_TRY_CFLAGS does nothing for
	  linker flags.  use RUBY_TRY_LDFLAGS.

Fri Nov 25 11:37:07 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (ioctl_narg_len, linux_iocparm_len): reinstantiate linux
	  specific narg length calculation.
	* test/ruby/test_io.rb (test_ioctl_linux2): add new test for old and
	  unstructured ioctl.

Fri Nov 25 10:39:14 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* Makefile.in (EXTLDFLAGS): export it.
	* configure.in: add --no-undefined if --enable-shared is specified.
	  Gentoo enabled this option long time. Also, export EXTLDFALGS.

Fri Nov 25 08:48:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: turn on PIE if --enable-shared is not specified.

Fri Nov 25 08:05:07 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: add -fstack-protector. It help to protect us from
	  stack smashing attack.

Fri Nov 25 08:03:28 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: add -D_FORTIFY_SOURCE=2. It provide some compile
	  time and runtime check for security.

Fri Nov 25 08:00:23 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/mkmf.rb: get rid of warnings of mkmf.rb if -Wmissing-declarations
	  and/or -Wold-style-definition warnings if specified.
	  Patch by Nikolai Weibull. Thank you! [Bug #5459] [ruby-core:40200]

Fri Nov 25 07:46:09 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: add -Wall always.

Thu Nov 24 20:02:40 2011  Tanaka Akira  <akr@fsij.org>

	* test/openssl/test_engine.rb: use IO#reopen to restore stderr.

Thu Nov 24 19:59:56 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_io_reopen): re-initialize buffering mode for stdout and
	  stderr.

Thu Nov 24 11:12:48 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_io_fsync,rb_io_fdatasync): release GVL during fsync().
	  fsync() and fdatasync() may take a long time on slow disks and/or
	  if there is much dirty data.
	  Patch by Eric Wong. [Feature #5665] [ruby-core:41247]

Thu Nov 24 10:05:02 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_engine.rb: Suppress output from 'openssl'
	  engine's RC4 cipher.
	  [Bug #5633] [ruby-core:41026]

Thu Nov 24 08:05:02 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkey_dsa.c: remove redundant colon from error
	  message.
	* ext/openssl/ossl_ssl.c: ditto.
	* ext/openssl/ossl_pkey_rsa: ditto.
	  patched by Eric Hodel [Bug #5604] [ruby-core:40896]

Wed Nov 23 20:03:43 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (ioctl_narg_len): don't use _IOC_SIZE macro on Linux.
	  On Linux some constants for ioctl(2) doesn't include the size of
	  its return value and 16bit value; for example FIONREAD 0x541B.
	  Moreover the manual, ioctl_list(2),  says "Note  that  the  size
	  bits  are  very unreliable: in lots of cases they are wrong,
	  either because of buggy macros using sizeof(sizeof(struct)),
	  or because of legacy values."
	  So we shouldn't use it.

Tue Nov 22 18:07:32 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (_pioinfo): need to declare _pioinfo() before using
	  _osfhnd and other macros which uses _pioinfo() internally.

Tue Nov 22 17:49:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (_pioinfo): make an inline function.

Tue Nov 22 11:26:08 2011  NARUSE, Yui  <naruse@ruby-lang.org>

Tue Nov 22 11:33:58 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (dupfd): argument of _osfhnd and so on should not
	  have side effect.

Tue Nov 22 11:26:08 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* bignum.c (rb_big_divide): refix of r33536. Don't change behavior of Bignum#/.
	  [ruby-core:40429] [Bug #5490]

Tue Nov 22 10:46:57 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* numeric.c (ruby_float_step): improve floating point calculations.
	  [ruby-core:35753] [Bug #4576]

	* numeric.c (ruby_float_step): correct the error of floating point
	  numbers on the excluding case.
	  patched by Masahiro Tanaka [ruby-core:39608]

	* numeric.c (ruby_float_step): use the end value when the current
	  value is greater than or equal to the end value.
	  patched by Akira Tanaka [ruby-core:39612]

Tue Nov 22 06:59:21 2011  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_io.rb (test_fcntl_dupfd): there is no known platform
	  which don't have F_DUPFD.  [ruby-dev:44874]

Tue Nov 22 04:46:22 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: remove autoload from psych
	* ext/psych/lib/psych/json.rb: ditto

Tue Nov 22 00:44:59 2011  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_io.rb (test_fcntl_dupfd): the argument of F_DUPFD is
	  minimum file descriptor.

Tue Nov 22 00:25:17 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (linux_get_maxfd): get rid of a warning.

Mon Nov 21 23:39:14 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (linux_get_maxfd): new function to find maximum fd on Linux.
	  (rb_close_before_exec): use linux_get_maxfd.

Mon Nov 21 06:16:24 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (fiber_switch): ignore fiber context switch
	  because destination fiber is same as current fiber.
	  With out this, it may segv on FreeBSD 9.
	  patched by Koichi Sasada.

Sun Nov 20 23:22:42 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extract_makefile, extmake): regenerate makefiles
	  if globbed source file list is changed.

	* lib/mkmf.rb (create_makefile): store ORIG_SRCS.

Sun Nov 20 22:43:03 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* enc/unicode.c (PROPERTY_NAME_MAX_SIZE): +1.
	  reported by Ken Takata. [ruby-dev:44894][Bug #5652]

Sun Nov 20 11:01:28 2011  Tanaka Akira  <akr@fsij.org>

	* lib/set.rb (SortedSet.setup): remove old_init after initialize
	  method is redefined.  The remove before redefinition makes the
	  warning prevention fragile.  [ruby-dev:44892]

Sun Nov 20 04:01:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (enc/unicode/name2ctype.h): remove duplicated
	  ifdefs.

Sat Nov 19 19:31:47 2011  Tanaka Akira  <akr@fsij.org>

	* time.c (TIME_COPY_GMT): copy vtm.utc_offset and vtm.zone too.
	  patch by Tomoyuki Chikanaga.
	  [ruby-dev:44827] [Bug #5586]

Sat Nov 19 16:36:57 2011  Tanaka Akira  <akr@fsij.org>

	* test/net/http/test_http.rb: remove temporally files in ensure clause.

Sat Nov 19 08:18:41 2011  Tanaka Akira  <akr@fsij.org>

	* test/net/http/test_http.rb: remove temporally files.

Fri Nov 18 17:18:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (console_raw, console_set_raw)
	  (console_getch): optional parameters.  [EXPERIMENTAL]

Fri Nov 18 16:12:11 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (console_cooked, console_set_cooked):
	  new methods to reset cooked mode.  [EXPERIMENTAL]

Fri Nov 18 13:20:26 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid of
	  warnings when using assert/assert_respond_to.

Fri Nov 18 13:03:38 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_cloexec_open): set O_NOINHERIT instead of O_CLOEXEC if it is
	  available (for Windows).

	* win32/win32.c (fcntl): on F_DUPFD, determine the inheritance of the
	  new handle by O_NOINHERIT flag of original fd.

Fri Nov 18 08:00:41 2011  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 2.8.1 (r6750)
	* test/minitest/*: ditto
	* configure.in: Improved gcc-llvm error message to help people migrate.

Thu Nov 17 20:43:34 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: revert a part of the patch in [ruby-dev:41531].
	  don't use db.h with other headers.  [ruby-dev:44884].

Thu Nov 17 20:23:03 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* benchmark/bm_io_select[23].rb: use Process::RLIMIT_NOFILE only when
	  it is defined.  if it is not defined, assume 64 as the max of fds.

Thu Nov 17 10:36:46 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
	  also closed. [ruby-core:41088]

Wed Nov 16 18:13:52 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (LIBRUBY_A): check if generated linked library is
	  valid for extconf.

Wed Nov 16 13:51:40 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bignum.c (rb_big2ulong): need to calc in unsigned long, because
	  the range of VALUE is larger than it on LLP64 platform, such as Win64.
	  this change fixes the failures of test/-ext-/num2int.

Wed Nov 16 12:02:47 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there are
	  no guarantee of existence of RbConfig::CONFIG['LIBPATHENV'].
	  it only exists in Unix-like environments.

	* test/webrick/test_filehandler.rb
	  (WEBrick::TestFileHandler#test_script_disclosure): ditto.

Wed Nov 16 11:34:20 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (argf_next_argv): wrong timing of setting ecflags.
	  fixed the failure of TestArgf#test_textmode introduced at r33662.

Wed Nov 16 10:45:00 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/-test-/num2int/num2int.c: remove an unnecessary and wrong decl
	  of rb_stdout.  it's declared in ruby.h correctly.

Wed Nov 16 10:26:41 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bignum.c (rb_big2ull): add a cast to get rid of a VC++ warning.

Wed Nov 16 09:39:27 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/minitest/unit.rb (assert_raises): experimental fix to run
	  correctly on chkbuild over 64bit linux. call exception_details only
	  when the detail is really needed to avoid create needless inspect
	  under ulimit-ed environment.

Wed Nov 16 06:34:30 2011  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_thread.rb (test_condvar_timed_wait): use
	  assert_operator.

Tue Nov 15 21:56:25 2011  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_sleep.rb (test_sleep_5sec): 0.1sec tolerance is too
	  small for busy environment.

Tue Nov 15 20:08:55 2011  Tanaka Akira  <akr@fsij.org>

	* io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
	  __linux__ macro for consistency.

Tue Nov 15 14:45:15 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
	  INT2NUM, UINT2NUM, LONG2NUM, ULONG2NUM, NUM2CHR): wrap by
	  macros.

Tue Nov 15 13:38:14 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* include/ruby/defines.h (FLUSH_REGISTER_WINDOWS): move sparc asm code
	  to a separate file sparc.c for preventing inlining optimization.
	  Patched by Jurij Smakov. [Bug #5244] [ruby-core:40685]
	* sparc.c (rb_sparc_flush_register_windows): ditto.
	* configure.in: ditto.

Tue Nov 15 13:11:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/ruby.h: get rid of gcc specific rb_long2int(),
	  NUM2LONG(), NUM2INT(), NUM2SHORT(), NUM2LL(), INT2NUM(),
	  UINT2NUM(), LONG2NUM(), ULONG2NUM() and NUM2CHR()
	  implementation. Because 1) They don't make any better code
	  at all. 2) Inline function have a better debugger supoort.

Tue Nov 15 09:58:25 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_io.rb (TestIO#test_fcntl_dupfd): fix OpenBSD test
	  failure. [ruby-dev:44872]

Tue Nov 15 09:50:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* regcomp.c (print_indent_tree): fix double printing of ENCLOSE_OPTION
	  children bug. patched by Suraj Kurapati. [ruby-core:40964]

Tue Nov 15 01:53:48 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/ruby/test_io.rb (test_fcntl_dupfd): fix test error on
	  SnowLeopard. Pointed out by CHIKANAGA Tomoyuki. [ruby-dev:44866]

Mon Nov 14 22:06:02 2011  Tanaka Akira  <akr@fsij.org>

	* ext/openssl/ossl_pkey.c (ossl_pkey_new_from_file): set close-on-exec
	  flag.

	* ext/openssl/ossl_x509cert.c (rb_fd_fix_cloexec): ditto.

Mon Nov 14 14:54:17 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* bignum.c (rb_big2ull): fix 32bit platform breakage. we must
	  not assume sizeof(VALUE) == sizeof(LONG_LONG).
	* test/-ext-/num2int/test_num2int.rb (class TestNum2int):
	  fix false assumption on 32bit platform.

Mon Nov 14 14:52:54 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* numeric.c (rb_fix2ushort): fix typo. use num rb_num2ushort()
	  instead of num2uint().

Sun Nov 13 10:31:03 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/ruby.h: add #ifdef comment.

Sun Nov 13 10:28:18 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.
	* numeric.c: ditto.

	* test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT().
	* ext/-test-/num2int/num2int.c: ditto.

Sun Nov 13 10:23:48 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* bignum.c (rb_big2ull): fix off-by-twice bug of NUM2ULL.
	* test/-ext-/num2int/test_num2int.rb (class TestNum2int):
	  fix a testcase too.

Sun Nov 13 10:22:44 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/-ext-/num2int/test_num2int.rb (class TestNum2int):
	  add FIXNUM tests.

Sun Nov 13 09:57:29 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* numeric.c (check_uint): fix off-by-one bug of NUM2UINT.
	* bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG.

	* test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT()
	  NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL().
	* ext/-test-/num2int/depend: ditto.
	* ext/-test-/num2int/extconf.rb: ditto.
	* ext/-test-/num2int/num2int.c: ditto.

Sun Nov 13 23:47:29 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dbm/extconf.rb: use convertible_int.

Sun Nov 13 23:45:57 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (checking_for): should not modify the result.

	* lib/mkmf.rb (have_struct_member): accept compiler options.

	* lib/mkmf.rb (convertible_int): add restricted support of struct
	  member, and TYPEOF_ macro.

Sun Nov 13 23:21:24 2011  Tanaka Akira  <akr@fsij.org>

	* ext/gdbm/gdbm.c (fgdbm_reorganize): set close-on-exec flag after
	  gdbm_reorganize().  gdbm_reorganize() opens a new database internally.

Sun Nov 13 19:57:18 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: rollback for each headers for each libraries.

Sun Nov 13 16:24:48 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: treat libc as a choice for a library which
	  provide ndbm API.

Sun Nov 13 15:40:43 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: duplicate $libs and $defs when save them.

Sun Nov 13 12:43:48 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: rollback $libs and $defs when db detection is
	  failed.  It fixes -lgdbm -lqdbm when the system has qdbm and gdbm
	  without gdbm_compat.

Sat Nov 12 21:14:51 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/webrick/test_cgi.rb (class TestWEBrickCGI): respect
	  RbConfig::CONFIG["LIBPATHENV"]. [Bug #5135] [ruby-core:38653]
	* test/webrick/test_filehandler.rb (class WEBrick): ditto.

Sat Nov 12 20:57:29 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_io.rb (test_fcntl_dupfd): skip if Fcntl::DUPFD
	  is not defined. Pointed out by CHIKANAGA Tomoyuki. Thanks.

Sat Nov 12 17:26:10 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (do_ioctl, ioctl_narg_len, setup_narg, rb_ioctl): use
	  ioctl_req_t.

Sat Nov 12 17:01:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dbm/extconf.rb (headers.db_check): reduce duplicated code.

Sat Nov 12 15:59:42 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: dbm_clearerr should be available in all ndbm
	  implementation.  If it is not available, it is caused by
	  header/library mismatch such that Berkeley DB header & gdbm library.

	* ext/dbm/dbm.c (fdbm_store): use dbm_clearerr() unconditionally.
	  gdbm 1.9 provides it as a real function instead of a empty macro.

Sat Nov 12 13:35:33 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* bootstraptest/runner.rb: don't suppress SIGINT.
	  [Feature #5612] [ruby-dev:44856]

Sat Nov 12 11:20:36 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (fcntl_narg_len): introduce narg calculation for fcntl instead
	  of hard coded 256.
	* io.c (setup_narg): ditto.

Sat Nov 12 11:19:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.

Sat Nov 12 11:18:17 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_io.rb (test_fcntl_lock_freebsd): add a testcase
	  of fcntl lock for freebsd.

Sat Nov 12 11:16:32 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (ioctl_narg_len): Linux doesn't have IOCPARM_LEN macro, but
	  has _IOC_SIZE. support it.

Sat Nov 12 11:13:18 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_ioctl): don't expose our sanity check value to ruby script.
	  It may change string value meaning if the value is string.
	  (e.g. MacOS X has F_GETPATH ioctl)
	* io.c (rb_fcntl): ditto.

Sat Nov 12 11:06:02 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (ioctl_req_t): Type of req argument of ioctl() depend on platform.
	  Moreover almost all linux ioctl can't be represented by 32bit integer
	  (i.e. MSB is 1). We need wrap ioctl argument type.
	  [Bug #5429] [ruby-dev:44589]
	* io.c (struct ioctl_arg): ditto.
	* io.c (rb_ioctl): ditto.
	* test/ruby/test_io.rb (test_ioctl_linux): add a testcase for ioctl

Sat Nov 12 11:00:42 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (struct io_cntl_arg): remove io_p member.
	* io.c (nogvl_fcntl, do_fcntl, rb_fcntl): separated from ioctl functions.
	* io.c (nogvl_io_cntl): remove fcntl depended logic.
	* io.c (io_cntl): ditto.
	* io.c (rb_io_ctl): ditto.
	* io.c (rb_io_ioctl): ditto.

Sat Nov 12 10:59:49 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (setup_narg): fix off by one bug.

Sat Nov 12 10:56:43 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (+setup_narg): factor out length calculation logic.
	* io.c (rb_io_ctl): ditto.

Sat Nov 12 10:52:17 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (+ioctl_narg_len) new helper function.
	* io.c (rb_io_ctl): don't use ioctl specific length check
	  if caller is fcntl.

Fri Nov 11 23:00:46 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: db_prefix is not required now.

Fri Nov 11 21:13:30 2011  Tanaka Akira  <akr@fsij.org>

	* ext/gdbm/gdbm.c (fgdbm_initialize): use GDBM_CLOEXEC if available.

Fri Nov 11 21:00:05 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
	  Berkeley DB.  Macro definitions needs arguments to detect correctly.
	  SIZEOF_DSIZE needs -DDB_DBM_HSEARCH because db.h defines datum type
	  only if DB_DBM_HSEARCH is defined.

Fri Nov 11 18:41:57 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (proc_seteuid): separate an internal wrapper function
	  from the method implementation.

Fri Nov 11 17:21:15 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_library, find_library, have_func): allow
	  arguments of function to be checked.

Fri Nov 11 17:09:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_dump.c (HAVE_BACKTRACE): fallback to 0.

	* vm_dump.c (rb_vm_bugreport): show "Other runtime information"
	  header only when available.

	* vm_dump.c (rb_vm_bugreport): get rid of modifying the content of
	  VM directly.

	* vm_dump.c (rb_vm_bugreport): check if vm is non-null.
	  Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
	  Thank you.

Fri Nov 11 12:36:37 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (pipe_open): Remove fflush(stdin). it's no effect.
	  Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
	  Thank you.

Fri Nov 11 07:33:30 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES):  Use symbol keys instead
	  of string keys to avoid duplicating parameters in
	  OpenSSL::SSL:SSLContext#set_params.

Thu Nov 10 15:02:37 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_library, have_func, have_var, have_header):
	  add compiler option parameter.

Thu Nov 10 07:45:16 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/lib/openssl/ssl.rb (class OpenSSL::SSL::SSLContext):
	  Document #set_params.

Wed Nov  9 11:36:53 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (gvl_yield): don't prevent concurrent sched_yield().
	  [Bug #5130] [ruby-core:38647]

Wed Nov  9 23:20:22 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_update_max_fd): fstat(2) can fail with other than
	  EBADF.  [ruby-dev:44837] [Bug #5593].  Cf.
	  http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html

	* io.c (rb_sysopen): max fd is updated in rb_sysopen_internal()
	  already.

Wed Nov  9 22:13:38 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
	  fixed previous commit.

Wed Nov  9 19:53:45 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
	  add test for r33685.

Wed Nov  9 19:00:44 2011  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_fiber.rb: add tests for r33684 (Fiber#resume).

Wed Nov  9 16:40:49 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (unixtime_to_filetime): should check the return value
	  of localtime().  reported by snowjail at gmail.com.
	  [ruby-dev:44838] [Bug #5596]

Thu Nov  9 13:17:25 2011  Koichi Sasada  <ko1@atdot.net>

	* cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using
	  "resume" after "transfer" method are used.  You should not mix
	  "resume" fiber and "transfer" fiber.
	  [Bug #5526]

	* NEWS: add information about this change.

Wed Nov  9 11:40:37 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/Doxyfile.tmpl (INCLUDE_PATH): add srcdir and include.
	  [ruby-core:40843] [Bug #5597]

Wed Nov  9 11:02:54 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread.c (do_select): fix cast, tv_sec is time_t.

Wed Nov  9 10:32:20 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: should not use test -e for portability.
	  [ruby-core:40841] [Bug #5594]

Wed Nov  9 04:52:16 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
	  rationals, etc with reference ids.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
	* ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers,
	  rationals, etc with reference ids.
	* test/psych/test_object_references.rb: corresponding tests

Tue Nov  8 23:34:37 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dbm/dbm.c (fdbm_fetch, fdbm_key, fdbm_delete, fdbm_store)
	  (fdbm_has_key, fdbm_has_value): get rid of overflow.

	* ext/gdbm/gdbm.c (rb_gdbm_fetch2, rb_gdbm_nextkey)
	  (rb_gdbm_delete, fgdbm_store, fgdbm_has_key): ditto.

	* ext/dbm/dbm.c (fdbm_delete_if): hide intermediate objects.

	* ext/gdbm/gdbm.c (fgdbm_delete_if): ditto.

	* ext/dbm/extconf.rb: check size of datum.dsize to get rid of
	  overflow.

Tue Nov  8 23:30:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c (PATH_MAX): define if not defined. [ruby-core:40840]

Tue Nov  8 23:26:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tk/tcltklib.c (rb_thread_critical): fix type.

	* ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core): int is
	  enough for micro seconds.  may need to check overflow in the
	  setter though.

	* ext/tk/tcltklib.c (RSTRING_LENINT): check overflow if necessary.

	* ext/tk/tcltklib.c (RbTk_ALLOC_N): wrapper for ckalloc() which
	  takes an int.

	* ext/tk/tcltklib.c (ip_ruby_cmd_receiver_get, tcltklib_compile_info):
	  get rid overflow.

	* ext/tk/tcltklib.c (tcltklib_compile_info): constified.

Tue Nov  8 20:50:45 2011  Tanaka Akira  <akr@fsij.org>

	* test/dbm/test_dbm.rb: split tests for read only database.

	* test/gdbm/test_gdbm.rb: ditto.

Tue Nov  8 18:59:07 2011  Tanaka Akira  <akr@fsij.org>

	* ext/pty/pty.c (MasterDevice): define only when used.
	  (SlaveDevice): ditto.
	  (deviceNo): ditto.

Tue Nov  8 17:59:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (rb_long2int): define as a macro always, so
	  that cpp conditionals can tell if it is provided.

Tue Nov  8 17:30:50 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp
	  cannot work.

Tue Nov  8 14:50:55 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
	  set.  this is the one of the reason of IO writing slowness of Windows
	  in 1.9.3 or later.

Tue Nov  8 11:01:04 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/pty/pty.c (get_device_once): FreeBSD 8 supported O_CLOEXEC flag
	  for posix_openpt, but FreeBSD 9's posix_openpt doesn't support
	  O_CLOEXEC and fails if specified.

Tue Nov  8 02:36:45 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
	  ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.

	* io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
	  set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
	  if the flag is available.

	* io.c (make_writeconv): drop decorators for reading.

	* io.c (make_readconv): drop decorators for writing.

	* io.c (do_writeconv): existing writeconv is not the condition to raise
	  ArgumentError.  should check textmode or not.

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
	  changes.

Mon Nov  7 22:03:47 2011  Tanaka Akira  <akr@fsij.org>

	* ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.

Mon Nov  7 20:31:52 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
	  like base 60 numbers are serialized as quoted strings.
	* test/psych/test_string.rb: test for change.

Mon Nov  7 20:26:37 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* test/psych/test_yamlstore.rb: make test case inherit from MiniTest,
	  load psych/helper so that psych is loaded.

Mon Nov  7 20:18:29 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,
	  load psych/helper so that psych and friends are loaded.

Mon Nov  7 20:15:44 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/extconf.rb: check dbm_pagfno() and dbm_dirfno().

	* ext/dbm/dbm.c: use above to set close-on-exec flag.

Mon Nov  7 20:05:16 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (io_fflush): remove fsync().

	* io.c (rb_io_flush, rb_io_rewind): fsync() here.

	these changes reduces fsync() calls to improve performance.
	first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
	[Bug #5585]

Mon Nov  7 19:43:10 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_close_before_exec): use F_MAXFD if available.
	  F_MAXFD is available on NetBSD since NetBSD 2.0.

Mon Nov  7 19:25:16 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_default_stdout_stderr_mode): new test for
	  r33627-33629.  see [backport #5565]

Mon Nov  7 01:14:22 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/debug.rb: add help for 'pp' and 'r[estart]'. patch
	  from Sho Hashimoto. [Bug #5093] [ruby-dev:44222]

Sun Nov  6 14:49:58 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/rubysocket.h (rsock_recvmsg): declared.

	* ext/socket/ancdata.c (rsock_recvmsg): extracted from
	  nogvl_recvmsg_func.
	  (nogvl_recvmsg_func): use rsock_recvmsg.

	* ext/socket/unixsocket.c (recvmsg_blocking): use rsock_recvmsg.

Sun Nov  6 03:22:36 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_engine.rb: add test for engine cipher. RC4 is used
	  because AES is not supported by the "openssl" engine currently.

Sun Nov  6 00:11:52 2011  Tanaka Akira  <akr@fsij.org>

	* lib/test/unit.rb (Test::Unit::Options#non_options): options[:ruby]
	  should be an array.  This fixes
	  "./ruby test/runner.rb test/testunit/test_parallel.rb"
	  [ruby-dev:44782]

Sat Nov  5 20:30:30 2011  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* insns.def: Some fixes and tweaks to English explanations

Sat Nov  5 19:11:50 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if
	  fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC).

Sat Nov  5 18:05:12 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_socketpair0): refactored.

Sat Nov  5 17:55:52 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/init.c (rsock_socket0): don't clear try_sock_cloexec if
	  SOCK_CLOEXEC is not a reason for EINVAL.

Sat Nov  5 16:27:52 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
	  ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
	  lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
	  lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
	  lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
	  lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
	  lib/shell/command-processor.rb, lib/shell/process-controller.rb,
	  lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
	  arguments to avoid creating Proc objects.

Sat Nov  5 15:45:04 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/init.c (rsock_socket0): extract single socket() call with
	  CLOEXEC handling from rsock_socket.

Sat Nov  5 13:49:40 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* lib/pathname.rb (Pathname#find): return an enumerator if
	  no block is given.

	* test/pathname/test_pathname.rb: add tests for above.

	[ruby-dev:44797] [Feature #5572]

Sat Nov  5 11:18:12 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_socketpair0): don't clear
	  try_sock_cloexec if SOCK_CLOEXEC is not a reason for EINVAL.

Fri Nov  4 14:08:19 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_pkey_rsa.c (rsa_generate): [SECURITY] Set RSA
	  exponent value correctly.  Awful bug.  This bug caused exponent of
	  generated key to be always '1'.  By default, and regardless of e
	  given as a parameter.

	  !!! Keys generated by this code (trunk after 2011-09-01) must be
	  re-generated !!! (ruby_1_9_3 is safe)

	* test/openssl/test_pkey_rsa.rb: Add tests for default exponent and
	  specifying exponent by a parameter.

Fri Nov  4 01:31:25 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_engine.rb: add first tests for builtin "openssl"
	  engine.

Fri Nov  4 08:41:26 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/extconf.rb:
	* ext/openssl/ossl_engine.c: add some missing OpenSSL engines.
	  Thanks, Yui Naruse, for providing the patch!
	  [Bug #5548] [ruby-core:40670]

Fri Nov  4 04:54:10 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/configure.bat: disable delayed expansion of enironment variable.
	  [Bug #5517] [ruby-core:40531]

Fri Nov  4 03:45:22 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (make_writeconv): fixed typo of previous commit.

Fri Nov  4 01:56:30 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (make_writeconv): unversal_newline converter is for reading.
	  so, if the io is text mode and has ECONV_UNIVERSAL_NEWLINE_DECORATOR
	  flag, use crlf_newline converter for writing.
	  this change fixes the problem about the luck of CR up Kernel.p and
	  Kernel.puts to stdout/stderr on Windows.

Fri Nov  4 01:04:48 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (Init_readline): like r18313, libedit's
	  replace_history_entry may use offset instead of which.
	  so introduce history_replace_offset_func and initialize it.

	* ext/readline/readline.c (hist_set): use history_replace_offset_func.

Fri Nov  4 00:53:35 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (Init_readline): fix wrong condition.

Thu Nov  3 23:53:04 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset()
	  on Windows except cygwin. [experimental]

Thu Nov  3 22:45:09 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_socketpair0): extracted from
	  rsock_socketpair to set close-on-exec flag for each socketpair()
	  call.

Thu Nov  3 22:12:41 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/socket/init.c (rsock_socket): set close-on-exec flag when
	  SOCK_CLOEXEC is not available.

Thu Nov  3 08:36:00 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_engine.rb: call Engine::cleanup on exit.
	  Patch provided by Yui Naruse, thanks!
	  [Bug #5547] [ruby-core:40669]

Wed Nov  2 21:36:00 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* complex.c (nucomp_rationalize): fix function.  [ruby-core:40667]
	  [Bug #5546]

Wed Nov  2 08:16:45 2011  Tanaka Akira  <akr@fsij.org>

	* lib/webrick/utils.rb: fix fcntl call.

	* lib/drb/unix.rb: ditto.

Wed Nov  2 00:43:59 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/psych/test_yamldbm.rb: avoid platform dependency.
	  patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535]
	* test/syck/test_yamldbm.rb: ditto.

Wed Nov  2 00:14:15 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* test/ruby/test_marshal.rb: renamed methods duplicated with those
	  of marshaltestlib.rb.

Tue Nov  1 22:08:27 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: reject llvm-gcc.

Tue Nov  1 21:39:00 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (rb_cloexec_pipe): remove workaround of r33587.
	  The bug of NetBSD is fixed on Mon Oct 31 21:31:29 UTC 2011.
	  http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45545

Tue Nov  1 19:49:08 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_io_reopen): call rb_fd_fix_cloexec instead of
	  rb_maygvl_fd_fix_cloexec.

Tue Nov  1 19:00:30 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_io_reopen): call rb_maygvl_fd_fix_cloexec after freopen().

Tue Nov  1 17:17:26 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (file_expand_path): reset coderange after expanding path.

Tue Nov  1 14:55:29 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (nogvl_io_cntl): rb_cloexec_fcntl_dupfd's 2nd argument is int.

	* process.c (move_fds_to_avoid_crash): ditto.

Tue Nov  1 13:14:33 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* vsnprintf.c (BSD_vfprintf): support 'll' prefix.

	* vsnprintf.c (__sfeof): rename to avoid the collision with NetBSD's
	  one.

	* vsnprintf.c (__sferror): ditto.

	* vsnprintf.c (__sclearerr): ditto.

	* vsnprintf.c (__sfileno): ditto.

Tue Nov  1 12:36:16 2011  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_maygvl_fd_fix_cloexec): change the visibility for
	  ext/socket.

Tue Nov  1 12:00:53 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_maygvl_fd_fix_cloexec): renamed from fd_set_cloexec.

	* internal.h (rb_maygvl_fd_fix_cloexec): declared.

	* ext/socket/init.c (cloexec_accept): use rb_maygvl_fd_fix_cloexec.
	  (rsock_s_accept_nonblock): use rb_update_max_fd.
	  (rsock_s_accept): use rb_update_max_fd.

Tue Nov  1 08:24:40 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/init.c (cloexec_accept): new function to use accept4 if
	  available.
	  (rsock_s_accept_nonblock): use cloexec_accept.
	  (accept_blocking): ditto.

	* ext/socket/extconf.rb: check accept4.

Tue Nov  1 07:31:55 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ancdata.c (nogvl_recvmsg_func): use MSG_CMSG_CLOEXEC if
	  available.

	* ext/socket/unixsocket.c (recvmsg_blocking): ditto.

Tue Nov  1 05:59:41 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_socketpair): use SOCK_CLOEXEC if
	  available.

Tue Nov  1 02:56:17 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ruby.c (load_file_internal): convert the encoding of load path if
	  needed by platform.  calling open() was replaced by rb_cloexec_open()
	  at r33549, but the function expected UTF-8 pathname on Windows.
	  (open() expected "locale" pathname.)
	  reported by taco via IRC.

	* ruby.c (load_file): change the type of the 2nd parameter to pass its
	  encoding to load_file_internal().

	* ruby.c (process_options, rb_load_file): follow above change.
	  NOTE: we should pass encoding information to rb_load_file().

Mon Oct 31 23:49:38 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_socketpair): extracted from
	  rsock_sock_s_socketpair.

Mon Oct 31 23:31:53 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/init.c (rsock_socket): use SOCK_CLOEXEC if available.

Mon Oct 31 21:47:44 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (rb_cloexec_pipe): NetBSD 6.0 will support pipe2(2),
	  but its return value is -1 or larger than 0.

Mon Oct 31 22:04:54 2011  Tanaka Akira  <akr@fsij.org>

	* ext/dbm/dbm.c (fdbm_initialize): use O_CLOEXEC if available.

Mon Oct 31 21:47:48 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_fd_fix_cloexec): renamed from
	  rb_fd_set_cloexec.

	* io.c: follow the above renaming.

	* ext/pty/pty.c: ditto.

	* ext/socket/init.c: ditto.

	* ext/socket/socket.c: ditto.

	* ext/socket/ancdata.c: ditto.

	* ext/socket/unixsocket.c: ditto.

Mon Oct 31 21:02:43 2011  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS): retry IO.select for premature wakeup.

Mon Oct 31 20:14:22 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (fd_set_cloexec): clear CLOEXEC flag for standard file
	  descriptors.
	  (rb_cloexec_dup): use rb_cloexec_fcntl_dupfd.
	  (rb_cloexec_fcntl_dupfd): use F_DUPFD_CLOEXEC if available.

Mon Oct 31 19:14:11 2011  Tanaka Akira  <akr@fsij.org>

	* test/resolv/test_dns.rb: don't check maximum slept time.
	  ruby doesn't guarantee the maximum time because it is not a
	  realtime application.

Mon Oct 31 13:10:06 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (setfl): extract from fcntl().

	* win32/win32.c (dupfd): new function to support F_DUPFD. based on a
	  patch written by akr.

	* win32/win32.c (fcntl): use above functions.

	* include/ruby/win32.h (F_DUPFD): define. [experimental]

	* include/ruby/win32.h (F_SETFL): change the value to correspond with
	  other platforms.

Mon Oct 31 12:37:50 2011  Tanaka Akira  <akr@fsij.org>

	* ext/pty/pty.c (get_device_once): use O_CLOEXEC for posix_openpt if
	  available.

Mon Oct 31 12:05:24 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_cloexec_dup2): check oldfd == newfd at first.
	  pointed by KOSAKI Motohiro.  [ruby-dev:44713]

Mon Oct 31 10:50:26 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_cloexec_fcntl_dupfd): this function needs F_DUPFD.

	* io.c (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd() only if the
	  platform has F_DUPFD.

Mon Oct 31 00:50:00 2011  Luis Lavena  <luislavena@gmail.com>

	* configure.in: check -fno-omit-frame-pointer acceptance and usage
	  under MinGW. [ruby-core:39957] [Bug #5407]

Mon Oct 31 00:16:11 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_cloexec_fcntl_dupfd): declared.

	* io.c (rb_cloexec_fcntl_dupfd): new function.
	  (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd.

	* process.c (move_fds_to_avoid_crash): use rb_cloexec_fcntl_dupfd.

Sun Oct 30 22:46:46 2011  Tanaka Akira  <akr@fsij.org>

	* configure.in: check pipe2.

	* io.c (rb_cloexec_pipe): use pipe2 if available.

Sun Oct 30 22:32:44 2011  Tanaka Akira  <akr@fsij.org>

	* ruby.c (fill_standard_fds): use fstat() instead of fcntl(F_GETFD)
	  for MinGW.  reported by Luis Lavena.  [ruby-core:40526] [Bug #5516]

Sun Oct 30 21:12:47 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_cloexec_pipe): declared.

	* io.c (rb_cloexec_pipe): new function.
	  (rb_pipe): use rb_cloexec_pipe.

	* thread_pthread.c (rb_thread_create_timer_thread): use
	  rb_cloexec_pipe.

Sun Oct 30 20:06:07 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_cloexec_dup): refine control flow.
	  (rb_cloexec_dup2): ditto.

Sun Oct 30 18:45:50 2011  Tanaka Akira  <akr@fsij.org>

	* ruby.c (fill_standard_fds): new function to open closed standard
	  file descriptors.
	  (ruby_sysinit): call fill_standard_fds.

Sun Oct 30 10:50:36 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (install_recursive, bin-comm): split mere
	  string not path name.  [ruby-core:40462] [Bug #5492]

Sun Oct 30 10:47:20 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
	  dup3 succeeded.

Sun Oct 30 09:58:48 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_cloexec_dup): don't allocate standard file descriptors.

Sun Oct 30 08:29:51 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_cloexec_dup2): don't set CLOEXEC for standard file
	  descriptors.

Sun Oct 30 07:47:10 2011  Tanaka Akira  <akr@fsij.org>

	* configure.in: check dup3.

	* io.c (rb_cloexec_dup2): use dup3 if available.

Sat Oct 29 22:06:37 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_cloexec_dup2): declared.

	* io.c (rb_cloexec_dup2): new function.
	  (io_reopen): use rb_cloexec_dup2.

Sat Oct 20 21:08:18 2011  Tajima Akio <artonx@yahoo.co.jp>

	* win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010.
	  [Bug #5243]

Sat Oct 29 20:59:08 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_cloexec_dup): use F_DUPFD_CLOEXEC if available.

Sat Oct 29 20:00:26 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_cloexec_dup): declared.

	* io.c (rb_cloexec_dup): new function.
	  (ruby_dup): use rb_cloexec_dup.

	* ext/pty/pty.c (pty_getpty): use rb_cloexec_dup.

	* ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.

Sat Oct 29 16:11:34 2011  Tanaka Akira  <akr@fsij.org>

	* ext/sdbm/_sdbm.c (sdbm_prep): use O_CLOEXEC if available.

Sat Oct 29 14:26:56 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_cloexec_open): use O_CLOEXEC if available.

Sat Oct 29 12:57:15 2011  Tanaka Akira  <akr@fsij.org>

	* process.c (ruby_setsid): use rb_cloexec_open.
	  (rb_daemon): ditto.

	* ruby.c (load_file_internal): ditto.

	* file.c (rb_file_s_truncate): ditto.
	  (file_load_ok): ditto.

	* random.c (fill_random_seed): ditto.

	* ext/pty/pty.c (chfunc): ditto.
	  (get_device_once): ditto.

	* ext/io/console/console.c (console_dev): ditto.

Sat Oct 29 10:40:19 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_cloexec_open): declared.

	* io.c (fd_set_cloexec): extracted from rb_fd_set_cloexec.
	  (rb_cloexec_open): new function.
	  (sysopen_func): use rb_cloexec_open.
	  (rb_sysopen_internal): use rb_update_max_fd instead of
	  rb_fd_set_cloexec.

Sat Oct 29 09:05:07 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.h: no Structured Exception Handling like macros.
	  [ruby-core:40432] [Bug #5491]

Fri Oct 28 22:05:34 2011  Tanaka Akira  <akr@fsij.org>

	* ext/sdbm/_sdbm.c: RCS $Id$ removed.

Thu Oct 27 18:58:00 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* parse.y (parser_nextc): set encoding for the buffer of ripper.

Fri Oct 28 06:06:08 2011  Tanaka Akira  <akr@fsij.org>

	* ext/sdbm/_sdbm.c (sdbm_prep): set FD_CLOEXEC flags for file
	  descriptors.
	  (fd_set_cloexec): new function.

Fri Oct 28 03:01:27 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* vm_insnhelper.c (vm_call_cfunc): adding back useless hack.  For some
	  reason, this fixes CFP errors on OS X 10.7.

Fri Oct 28 00:09:31 2011  Tanaka Akira  <akr@fsij.org>

	* ext/sdbm/_sdbm.c (sdbm_prep): refactored for less nesting.

Thu Oct 27 18:28:18 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_DEFINE_IF): revert r33534 partially to get
	  rid of AS_ECHO which is not available in autoconf 2.61.
	  [ruby-dev:44702]

Thu Oct 27 16:10:46 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_divide): raise ZeroDivisionError if divisor is
	  zero, as well as Fixnum.  [ruby-core:40429] [Bug #5490]

Thu Oct 27 14:56:22 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_FUNC_ATTRIBUTE): unset temporary variable.

	* configure.in (RUBY_STACK_GROW_DIRECTION): substitute CPU name as
	  shell variable name.  based on the patch by The Written Word Inc. at
	  [ruby-core:40421].  [Bug #5488]

Thu Oct 27 09:57:56 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.
	  patched by The Written Word Inc. [ruby-core:40422] [Bug #5489]

Thu Oct 27 08:47:38 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/psych/parser.c: remove unused variable.

Thu Oct 27 08:38:41 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/extconf.rb: add -Wall flag by default when compiler is
	  GCC.

Wed Oct 26 15:24:25 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_join): honor input encodings than ASCII-8BIT.
	  [ruby-core:40338] [Bug #5483]

Tue Oct 25 21:52:31 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h: use "__sparc" instead of "sparc" and
	  "__sparc__".

	* dln.c: ditto.

	  [ruby-dev:44694]

Tue Oct 25 06:34:39 2011  Eric Hodel  <drbrain@segment7.net>

	* re.c (match_aref):  Use <code> around indexing examples to prevent
	  hyperlinks.  [ruby-talk:389396]

Mon Oct 24 23:55:31 2011  Tanaka Akira  <akr@fsij.org>

	* complex.c: use "__sun" instead of "__sun__" to detect SunOS.

	* math.c: ditto.

	* hash.c: ditto.

	* atomic.h: ditto.

	* ext/io/wait/wait.c: ditto.

	[ruby-dev:44693]

Mon Oct 24 22:45:37 2011  Tanaka Akira  <akr@fsij.org>

	* io.c: use "__sun" instead of "sun" to detect SunOS.

	* dln.c: ditto.

	* cont.c: ditto.

	* ext/sdbm/_sdbm.c: ditto.

	[ruby-dev:44693]

Mon Oct 24 22:38:08 2011  Tanaka Akira  <akr@fsij.org>

	* ext/pty/pty.c (get_device_once): delay rb_fd_set_cloexec() until
	  grantpt() on Solaris.  grantpt() doesn't work with CLOEXEC on
	  Solaris 10.
	  reported by Naohisa GOTO.  [ruby-dev:44688] [Bug #5475]

Mon Oct 24 08:18:14 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (copy_stream_fallback_body): check nil for EOF of read method.
	  patch by Eric Wong.  [ruby-core:39134] [Bug #5237]

Sun Oct 23 18:21:23 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/tk/MANUAL_tcltklib.eng: fix typo.

Sun Oct 23 18:03:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (rb_infinity, rb_nan): aggregated member initializers
	  need braces.

Sun Oct 23 16:43:43 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/io/wait/wait.c: ioctl(2) is declared in unistd.h on Solaris.

Sun Oct 23 16:33:35 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/tk/MANUAL_tcltklib.eng: fix typo. reported by Mimura-san.
	  [ruby-dev:44683] [Bug #5471]

Sun Oct 23 08:01:29 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_fd_set_cloexec): set close-on-exec flag only if F_GETFD is
	  defined.  reported by Luis Lavena.  [ruby-core:40281] [Bug #5470]

Sat Oct 22 19:48:50 2011  Tanaka Akira  <akr@fsij.org>

	* test/openssl/test_ssl.rb (test_multibyte_read_write): start server
	  for each length to avoid race condition.

Sat Oct 22 18:49:24 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_fd_set_cloexec): declared.

	* io.c (rb_fd_set_cloexec): new function.
	  (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag.
	  (rb_sysopen_internal): ditto.
	  (rb_pipe): ditto.
	  (io_reopen): ditto.
	  (io_cntl): ditto.

	* process.c (rb_f_exec): change the default :close_others option to
	  true.
	  (rb_f_system): ditto.
	  (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set
	  close-on-exec flag.
	  (ruby_setsid): ditto.
	  (rb_daemon): ditto.

	* thread_pthread.c (rb_thread_create_timer_thread): call
	  rb_fd_set_cloexec to set close-on-exec flag.

	* ruby.c (load_file_internal): ditto.

	* file.c (rb_file_s_truncate): ditto.
	  (file_load_ok): ditto.

	* random.c (fill_random_seed): ditto.

	* ext/pty/pty.c (chfunc): ditto.
	  (get_device_once): ditto.

	* ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.

	* ext/socket/init.c (rsock_socket): ditto.
	  (rsock_s_accept_nonblock): ditto.
	  (rsock_s_accept): ditto.

	* ext/socket/socket.c (rsock_sock_s_socketpair): ditto.

	* ext/socket/ancdata.c (discard_cmsg): ditto.
	  (make_io_for_unix_rights): ditto.

	* ext/socket/unixsocket.c (unix_recv_io): ditto.

	* ext/io/console/console.c (console_dev): ditto.

	[ruby-core:38140] [Feature #5041]

Sat Oct 22 17:46:27 2011  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: fix a exception name in previous patch.

Sat Oct 22 17:43:33 2011  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: make timeout configurable for DNS query.
	  patch by Eric Wong.  [ruby-core:38533] [Feature #5100]

Sat Oct 22 02:07:48 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* numeric.c (rb_infinity, rb_nan): use union to prevent bus error
	  caused by misalignment.  [Bug #5469] [ruby-dev:44657]

	* include/ruby/missing.h (INFINITY, NAN): ditto

Fri Oct 21 22:02:17 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (initial_params): pack in a struct.

	* gc.c (rb_gc_set_params): set parameters always.
	  [ruby-dev:44648] [Bug #5467]

Fri Oct 21 12:10:20 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* atomic.h: change Solaris checking macro because atomic_ops can work
	  not only with Sun Studio but also with Fujitsu C Compiler.

Fri Oct 21 02:11:00 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ns_spki.c: Complete documentation.
	* test/openssl/test_ns_spki.rb: Integrate SPKI#to_text.

Thu Oct 20 22:47:28 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (socklist_insert, socklist_lookup, socklist_delete):
	  new functions to wrap of st_insert(), st_lookup() and st_delete() to
	  socklist.
	  allocating socklist is deferred until it is really needed.

	* win32/win32.c (exit_handler): delete socklist only if it is
	  initialized.

	* win32/win32.c (rb_w32_sysinit, StartSockets): refactoring: move
	  initialization of select_mutex to StartSockets().

	* win32/win32.c (exit_handler): refactoring: delete select_mutex only
	  if winsock is used.

Thu Oct 20 22:38:53 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkcs5.c: add note on timing attacks and general
	  documentation.

Thu Oct 20 21:19:15 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* vm_eval.c (check_funcall): set array elements one-by-one to fix
	  compile error with Fujitsu C Compiler 5.6 on Solaris 10 on Sparc.
	  [Bug #5464] [ruby-dev:44632]

Thu Oct 20 13:09:35 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/defines.h (flush_register_windows): use software
	  trap on Debian Sparc 32-bit userspace.  [Bug #5244]

Thu Oct 20 12:28:22 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_pkcs5.rb: add RFC 6070 tests for PBKDF2 with
	  HMAC-SHA1

Thu Oct 20 11:42:23 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (mmprepare): fix for fragmental size.

	* util.c (mmswap_, mmrot3_): portability improvement.

Thu Oct 20 05:58:02 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_ns_spki.c (Init_ossl_ns_spki):  Stub documentation
	  for Netscape SPKI.

Thu Oct 20 05:13:39 2011  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 2.6.2 (r6712)
	* test/minitest/*: ditto

Thu Oct 20 06:55:32 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* lib/openssl/buffering.rb: Force multi-byte strings to be treated as
	  binary data.
	* test/openssl/test_ssl.rb: Add test for it.

	Thanks to Niklas Baumstark for reporting the issue!

	[Ruby 1.9 - Bug #5233] [ruby-core:39120]

Wed Oct 19 17:06:54 2011  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* version.h (RUBY_VERSION): finally declare start of 2.0 work!

Wed Oct 19 11:48:44 2011  Eric Hodel  <drbrain@segment7.net>

	* error.c (Init_Exception):  Document $! and $@.  Provide
	  recommendations for creating exceptions for a library.

Wed Oct 19 11:25:46 2011  Eric Hodel  <drbrain@segment7.net>

	* error.c (Init_Exception):  Add hierarchy of Exception subclasses.
	  Based on patch by Sylvain Daubert.  [Ruby 1.9 - Bug #5438]

Wed Oct 19 11:04:47 2011  Eric Hodel  <drbrain@segment7.net>

	* enum.c: Reformat block args to a single standard, { |args| ... }.
	  Patch by b t.  [Ruby 1.9 - Bug #5393]

Wed Oct 19 12:11:26 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: Remove set, but unused variables.
	  ext/openssl/ossl_pkey.c: ditto

	* ext/openssl/ossl_pkey_dh.c: Make functions passed to
	  rb_thread_blocking_region return VALUE instead of void.
	  ext/openssl/ossl_pkey_dsa.c: ditto
	  ext/openssl/ossl_pkey_rsa.c: ditto

Tue Oct 18 23:28:53 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (identhash): share with type_numhash.

	* st.c (st_hashtype_num): rename from type_numhash.

Tue Oct 18 23:07:30 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_core.h (ruby_current_thread): probeprofiler has been removed
	  long ago.

Tue Oct 18 23:05:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/ripper/eventids2.c (ripper_init_eventids2): separate
	  initializations of IDs and objects.

	* ext/ripper/tools/generate.rb (generate_eventids1): ditto.

	* parse.y (Init_ripper, InitVM_ripper): fix inversed roles.

Sun Oct 16 19:46:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.gemspec (files): fixed typo, and
	  removed nonexistent file.

	* ext/bigdecimal/bigdecimal.gemspec (homepage): added.

	* ext/io/console/io-console.gemspec (homepage): ditto.

Fri Oct 14 12:13:57 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/pty/pty.c (pty_check): should return nil until the child
	  terminates or stops.  [ruby-dev:44600] [Bug #2642]

Fri Oct 14 11:19:37 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/intern.h (rb_ary_rotate): export.

Fri Oct 14 05:58:05 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* atomic.h (ATOMIC_INC, ATOMIC_DEC): return old values.
	  [ruby-dev:44596] [Bug #5439]

	* signal.c (ruby_atomic_exchange): no needs to define on the
	  platforms where atomic.h is available.

Thu Oct 13 19:29:40 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* atomic.h (ATOMIC_*): use atomic_ops(3C) when SunStudio on Solaris.
	  [ruby-dev:44596] [Bug #5439]

Thu Oct 13 18:13:04 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* atomic.h(ATOMIC_SET): add cast to void to prevent misuse.
	  [ruby-dev:44596] [Bug #5439]

Thu Oct 13 18:04:27 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (rb_gc_finalize_deferred, rb_objspace_call_finalizer):
	  should use ATOMIC_EXCHANGE() to check the previous value.
	  [ruby-dev:44596] [Bug #5439]

Wed Oct 12 23:39:58 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/openssl/test_ssl.rb: Move duplicated tests for SSL::Session to
	  test_ssl_session.rb

Tue Oct 11 08:49:40 2011  Eric Hodel  <drbrain@segment7.net>

	* array.c (rb_ary_initialize):  Improve explanation of Array.new
	  parameters.  Patch by Alvaro Pereyra Rabanal.  [Ruby 1.9 - Bug #5425]
	* array.c (rb_ary_s_try_convert):  Fix typo (try => tries)
	* array.c (rb_ary_rindex):  Add spacing for block.
	* array.c (rb_ary_uniq_bang):  Describe block
	* array.c (rb_ary_uniq):  ditto

Tue Oct 11 07:55:38 2011  Eric Hodel  <drbrain@segment7.net>

	* array.c:  Add a description to Array, minor cleanups.  Patch by
	  Andrea Singh.  [Ruby 1.9 - Bug #5412]

Tue Oct 11 06:09:52 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/pp.rb:  Move PP documentation to top of class PP.  Patch by
	  Sylvain Daubert.  [Ruby 1.9 - Bug #5430]

Tue Oct 11 06:06:29 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/coverage/coverage.c (Init_coverage):  Change list format and
	  describe Coverage.result output.  Patch by Sylvain Daubert.
	  [Ruby 1.9 - Bug #5428]

Tue Oct 11 05:53:23 2011  Eric Hodel  <drbrain@segment7.net>

	* object.c (Init_Object):  Add reference to BasicObject, brief
	  explanation of constant lookup.  Based on patch by Alvaro Pereyra
	  Rabanal.
	  [Ruby 1.9 - Bug #5426]

Sun Oct  9 11:06:52 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/psych/test_yamldbm.rb: don't run test if the system
	  don't support yaml/dbm.

	* test/syck/test_yamldbm.rb: ditto.

Sat Oct  8 08:54:56 2011  Eric Hodel  <drbrain@segment7.net>

	* enum.c (group_by):  Improve group_by description.  Patch by b t.
	  [#5411]

Sat Oct  8 03:17:51 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/shell.rb:  Document some methods of Shell.  Patch by Carol
	  Nichols.  [Ruby 1.9 - Bug #5417]

Fri Oct  7 17:54:28 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb (assert_send, assert_not_send):
	  parenthesize non-empty arguments.

Fri Oct  7 06:35:50 2011  Eric Hodel  <drbrain@segment7.net>

	* array.c:  Use + for arguments described in documentation to allow
	  rdoc -C2 to work better.  Remove <code> from method references to
	  allow cross-references in HTML documentation.

Thu Oct  6 18:46:23 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* vm_eval.c (make_no_method_exception): fix typo.

	* vm_insnhelper.c, vm_insnhelper.h: ditto.

Thu Oct  6 16:29:30 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (make_no_method_execption): extract from
	  raise_method_missing().

	* vm_eval.c (send_internal): remove inadvertent symbol creation
	  from public_send.  based on a patch by Jeremy Evans <code AT
	  jeremyevans.net> in [ruby-core:38576]. [Feature #5112]

	* vm_insnhelper.c (vm_call_method): remove inadvertent symbol
	  creation from send and __send__, too.

Thu Oct  6 14:59:11 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/time.rb:  Clean up Time documentation.  Patch by Jake Goulding.
	  [Ruby 1.9 - Bug #5416]

Thu Oct  6 10:00:54 2011  Eric Hodel  <drbrain@segment7.net>

	* enum.c (group_by):  Improve documentation based on patch by b t.

Thu Oct  6 09:56:30 2011  Eric Hodel  <drbrain@segment7.net>

	* enum.c:  Clean up wording in Enumerable documentation.  Patch by b t.
	  [Ruby 1.9 - Bug #5411]

Thu Oct  6 09:17:18 2011  Eric Hodel  <drbrain@segment7.net>

	* time.c (Init_Time):  Remove editorial comments from Time
	  documentation, fix link.

Thu Oct  6 09:14:20 2011  Eric Hodel  <drbrain@segment7.net>

	* time.c (Init_Time):  Improve Time documentation.  Patch by Shane
	  Emmons.  [Ruby 1.9 - Bug #5404]
	* lib/time.rb:  Improve time.rb documentation including Time.strptime.
	  Patch by Shane Emmons.  [Ruby 1.9 - Bug #5402]

Thu Oct  6 08:54:05 2011  Eric Hodel  <drbrain@segment7.net>

	* random.c:  Improve documentation of Random.  Patch by Gregory
	  Parkhurst.  [Ruby 1.9 - Bug #5410]

Thu Oct  6 01:44:51 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* cont.c (cont_mark): mark original Thread object from saved_thread.
	  [ruby-dev:44571] [Bug #5386]

Wed Oct  5 16:33:04 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_insnhelper.c (vm_call_cfunc): remove useless hack.

Wed Oct  5 05:56:39 2011  Eric Hodel  <drbrain@segment7.net>

	* hash.c (Init_Hash):  Improve Hash documentation.  Patch by Alvaro
	  Pereyra Rabanal.  [Ruby 1.9 - Bug #5405]

Wed Oct  5 05:47:59 2011  Eric Hodel  <drbrain@segment7.net>

	* random.c (Init_Random):  Add a top-level comment for Random.  Patch
	  by Brett Bim.  [Ruby 1.9 - Bug #5403]

Wed Oct  5 02:50:27 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, and
	  message attributes during parse failure.
	* ext/psych/parser.c: Update parser to raise exception with correct
	  values.
	* test/psych/test_exception.rb: corresponding tests.

Wed Oct  5 01:52:16 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/parser.c (parse): Use context_mark for indicating error
	  line and column.

Wed Oct  5 01:22:08 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue
	  since postfix rescue cannot receive the exception class. Thanks
	  nagachika!

Tue Oct  4 21:10:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (class_alloc): allocate extra memory after containing
	  object setup to get rid of rare-but-potential memory leak.

	* gc.c (gc_mark_children): skip marking extended members if ptr is
	  NULL.

Tue Oct  4 16:17:50 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/time.rb (Time.strptime): use Time.at if d[:seconds] is set.
	  Reported by Christopher Eberz. [ruby-core:39903] Bug #5399

Tue Oct  4 11:44:10 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.

Tue Oct  4 08:33:41 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/etc/etc.c:  Document Etc, Etc.sysconfdir, Etc.systmpdir.  Patch
	  by mathew murphy.  [Ruby 1.9 - Bug #5396]

Tue Oct  4 08:21:51 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/shellwords.rb:  Update toplevel comment with an example.  Patch
	  by Samnang Chhun.  [Ruby 1.9 - Bug #5388]

Tue Oct  4 08:15:50 2011  Eric Hodel  <drbrain@segment7.net>

	* proc.c (proc_call):  Update documentation to match argument handling
	  of proc/Proc.new/lambda/->()

Tue Oct  4 07:59:16 2011  Eric Hodel  <drbrain@segment7.net>

	* proc.c (proc_call):  Fix documentation of Proc#call vs Proc#===.
	  [Ruby 1.9 - Bug #5349]

Tue Oct  4 07:43:18 2011  Eric Hodel  <drbrain@segment7.net>

	* array.c (rb_ary_initialize):  Make Array.new description match
	  call-seq.  Patch by Henry Maddocks.  [Ruby 1.9 - Bug #5344]

Tue Oct  4 07:35:23 2011  Eric Hodel  <drbrain@segment7.net>

	* array.c (rb_ary_initialize):  Add output for examples.  Patch by
	  Jonathan Mukai.  [Ruby 1.9 - Bug #5216]

Tue Oct  4 07:30:50 2011  Eric Hodel  <drbrain@segment7.net>

	* array.c (rb_ary_s_create):  Add example results for Array::[].  Patch
	  by Jonathan Mukai.  [Ruby 1.9 - Bug #5215]

Tue Oct  4 07:15:17 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.11.  Move Deprecate into the
	  Gem namespace.

Tue Oct  4 06:43:47 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: update psych version.
	* ext/psych/psych.gemspec: generate new gemspec for new version.

Tue Oct  4 06:29:55 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.
	* ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
	  in order to avoid YAML::ENGINE switching from replacing this method.
	* test/psych/helper.rb: fix tests for method name change.
	* test/psych/test_document.rb: ditto
	* test/psych/visitors/test_emitter.rb: ditto

Tue Oct  4 06:20:19 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: Match values against the
	  floating point spec defined in YAML to avoid erroneous parses.
	* test/psych/test_numeric.rb: corresponding test.

Tue Oct  4 05:59:24 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: ToRuby visitor can be
	  constructed with a ScalarScanner.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: ScalarScanner can be
	  passed to the YAMLTree visitor.

Tue Oct  4 05:47:23 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODING
	  for 1.9.2 backwards compatibility.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string
	  generation for 1.9.2 backwards compatibility.

Mon Oct  3 23:56:39 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (rb_gc_set_params): output GC parameter change messages only
	  if -w/-v options are specified. these messages are output to stderr,
	  not to stdout. [ruby-core:39795] [Bug #5380]

	* test/ruby/test_gc.rb (test_gc_parameter): add test for it.

Sun Oct  2 20:05:32 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (rb_thread_mark), cont.c (cont_mark): revert r33369 and r33371
	  that may cause SEGV in certain environments.

Sun Oct  2 12:14:06 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/psych/test_yamldbm.rb: add test case.
	* test/syck/test_yamldbm.rb: ditto.

Sun Oct  2 11:28:09 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/yaml/store.rb: make initialize method signature match the
	  superclass signature.

Sun Oct  2 10:44:01 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* io.c: fix documentation of ARGF.lineno=.

Sat Oct  1 20:03:19 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_framework): try as Objective-C.
	  https://twitter.com/nagachika/status/120294447660539904

Sun Oct  2 08:43:25 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (rb_thread_mark), cont.c (cont_mark): self pointer should not
	  be marked by itself. Patch by Koichi Sasada.
	  [ruby-dev:44567] [Bug #5386]

Sun Oct  2 00:42:14 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (rb_thread_mark): rb_thread_t needs self to be marked.
	  [ruby-dev:44566] [Bug #5386]

Sat Oct  1 09:48:53 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (add_heap_slots, init_heap): reset heaps_inc zero when
	  heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS.
	  [ruby-core:39777] [Bug #5380]

	* test/ruby/test_gc.rb (test_gc_parameter): add test for it.

	* test/ruby/envutil.rb (assert_normal_exit): add :child_env option to
	  enable pass environment variables to child process.

Thu Sep 29 13:17:51 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (ary_join_1): should not copy the encoding of non-string
	  element after string element.  [ruby-core:39776] [Bug #5379]

Thu Sep 29 11:53:56 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (slot_sweep, rb_gc_finalize_deferred)
	  (rb_objspace_call_finalizer, rb_gc): run finalizers
	  sequentially.  [ruby-dev:44562]

Thu Sep 29 20:37:38 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/gdbm/gdbm.c (rb_gdbm_fatal): adjust argument type.

Thu Sep 29 20:10:42 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (is_id_value, is_live_object): extract from id2ref().

	* gc.c (run_finalizer): use object instead of object id.

Thu Sep 29 20:07:36 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* use RB_TYPE_P which is optimized for constant types, instead of
	  comparison with TYPE.

Wed Sep 28 09:20:37 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (pthread_np.h): needs pthread.h to be included
	  previously on OpenBSD.  a patch by George Koehler <xkernigh AT
	  netscape.net> at [ruby-core:39752].  [Bug #5376]

Wed Sep 28 04:41:35 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/psych/test_yamlstore.rb: use tmpdir for tmpfile.
	* test/syck/test_yamlstore.rb: ditto.

Wed Sep 28 04:10:46 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/bigdecimal/README: update report to.

Tue Sep 28 04:05:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal_en.html: removed because this file isn't
	  maintained now.

	* ext/bigdecimal/bigdecimal_ja.html: ditto.

Tue Sep 27 09:55:40 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c: make native_fd_select().
	* thread.c (do_select): remove #ifdef _WIN32. Instead, use
	  native_fd_select() always.

Tue Sep 27 09:44:59 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (do_select): remove cygwin specific hack. It's layer
	  violation and too large hack.
	* thread.c (cmp_tv, subtract_tv): removed.

Tue Sep 27 03:50:19 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/rexml/test_sax.rb: add require 'rexml/document'.

Tue Sep 27 03:32:27 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/psych/test_yamldbm.rb: fix #setup and #teardown.
	  [Bug #5370] [ruby-core:39730]
	* test/syck/test_yamldbm.rb: ditto.

Mon Sep 26 11:27:38 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/httputils.rb: Add MIME Type definition of .js and .svg.
	  patched by Hal Brodigan. [ruby-core:39704] [Bug #5365]

Mon Sep 26 09:20:44 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: remove DJGPP support. It's not longer supported
	  since ruby 1.9.0.

Mon Sep 26 09:07:46 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/defines.h: remove NextStep, OpenStep, Rhapsody
	  support. Last activity of their OSes are 7 years ago.
	* configure.in: ditto.
	* dir.c: ditto.
	* ext/tk/extconf.rb: ditto.

Mon Sep 26 09:02:49 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: remove a code for human68k. it's no longer
	  supported since r19677.

Sun Sep 25 23:43:32 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_asn1.c: fix int_ossl_asn1_decode0_cons when being
	  fed arbitrary string values.
	  Clearly distinguish between the cases "universal, infinite and
	  not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly
	  infinite". Raise error for universal tags that are not infinite.
	* test/openssl/test_asn1.rb: add a test for this.

	  Thanks to Hiroshi Yoshida for reporting this bug.
	  [Bug #5363] [ruby-dev:44542]

Sun Sep 25 20:57:18 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/syck/test/yamldbm.rb: add test for Syck::DBM.
	* test/psych/test_yamldbm.rb: add test for Psych::DBM.
	* test/psych/test_yamlstore.rb: add test for Psych::PStore.

Sun Sep 25 20:54:10 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/yaml/dbm/dbm.rb: fix #update, add #key for using instead #index.
	  [Bug #5305][ruby-dev:44485]

Sun Sep 25 16:54:33 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (require_enc): reject only loading from untrusted
	  load paths.  [ruby-dev:44541] [Bug #5279]

	* transcode.c (load_transcoder_entry): ditto.

Sun Sep 25 16:45:05 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: ignore all warnings from an arbitrary
	  header in /usr/local/include.

Sun Sep 25 03:43:03 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* enum.c (slice_before_i): use rb_attr_get to suppress wrong warning
	  for internal instance variable slicebefore_initial_state.

Fri Sep 23 14:20:14 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_asn1.c: remove unused variable.

Fri Sep 23 13:46:59 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_ssl_session.rb: execute test_session_exts_read
	  only for OpenSSL versions >= 0.9.8k. Thanks, Eric Wong, for
	  reporting this.
	  [Bug #4961] [ruby-core:37726]

Fri Sep 23 11:59:08 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_ssl_session.rb: ensure server calls callbacks in
	  test_ctx_server_session_cb. Thanks to Eric Wong for the patch.
	  [Bug #5336] [ruby-core:39619]

Thu Sep 22 02:53:19 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_call_cfunc): suppress a warning.  note that
	  `volatile type *var' doesn't make var itself volatile.

Thu Sep 22 01:52:48 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* thread_pthread.c (ubf_select): activate timer thread when interrupt
	  blocking thread.
	  A patch created by Koichi Sasada. [ruby-core:39634] [Bug #5343]
	  to cover race condition, timer thread periodically send SIGVTARLM to
	  threads in signal thread list. so you should activate timer thread
	  when interrupt a thread.

Wed Sep 21 16:55:26 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/io/wait/test_io_wait.rb (TestIOWait#setup): of course, the
	  behavior of mingw is just same with mswin.

Tue Sep 20 18:08:51 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_get_cvar_base): reduce duplicated checks and
	  move a warning outside the loop.

Mon Sep 19 18:55:51 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/fileutils.rb (module FileUtils): improve performance of
	  FileUtils.compare_stream. a patch by Masaki Matsushita.
	  [Feature #5337] [ruby-core:39622]

Mon Sep 19 18:42:58 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/-ext-/old_thread_select/test_old_thread_select.rb:
	  select() with timeout may return early in old Linux kernels
	  with 250 Hz tickrate and no dynticks, so skip everything older
	  than 2.6.32 (which has long term support).
	  And, Make the timing assertions consistently use assert_operator with
	  timing difference in error message
	  Patch by Eric Wong. [Bug #5335] [ruby-core:39618]

Mon Sep 19 09:28:06 2011  Eric Hodel  <drbrain@segment7.net>

	* test/openssl/test_ssl.rb (class OpenSSL):  Test
	  OpenSSL::SSL::SSLSocket#session and #session=.

Mon Sep 19 07:54:17 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_clone): singleton class should be attached
	  singleton object to.  a patch by Satoshi Shiba <shiba AT rvm.jp>
	  at [ruby-dev:44460].  [Bug #5274]

Sat Sep 17 23:34:10 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_data_type): inherit the core type in ripper so
	  that checks in core would work.  [ruby-core:39591] [Bug #5331]

Sat Sep 17 12:44:04 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* lib/find.rb (Find.find): add documentation that Find.find
	  without block returns an enumerator.

Thu Sep 15 11:39:43 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (mark_entry, mark_key, mark_keyvalue): adjust callback
	  argument types.

Thu Sep 15 01:44:10 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/tk/*: Change encoding from EUC-JP to UTF-8

Wed Sep 14 11:43:37 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_fd_rcopy): added an argument guard.
	  Patch by NAKAMURA Usaku. [Bug #5306] [ruby-core:39435]

Tue Sep 13 20:21:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/pstore.rb, test/test_pstore.rb: suppress warnings with -v.

	* lib/pstore.rb (PStore): always open in binary mode even if
	  default encodings are set.  [Bug #5311] [ruby-core:39503]

Tue Sep 13 05:37:15 2011  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (Init_IO): update BINARY comment.  it should not change the
	  encoding of the result to ASCII-8BIT.  [ruby-talk:387719]

Mon Sep 12 19:55:00 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_select): fix to ignore an argument
	  modification of rb_thread_fd_select().
	  based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435]
	* thread.c (rb_fd_rcopy): New. for reverse fd copy.

	* test/-ext-/old_thread_select/test_old_thread_select.rb
	(test_old_select_false_positive): test for bug5306.

	* ext/-test-/old_thread_select/old_thread_select.c (fdset2array):
	  New. convert fdsets to array.
	* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
	  return 'read', 'write', 'except' argument of rb_thread_select()
	  to ruby script.

Mon Sep 12 13:38:12 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* README.EXT, README.EXT.ja (2.2.2), parse.y (rb_check_id): add
	  documents for rb_check_id().

Mon Sep 12 12:53:39 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to
	  open files in binary mode.
	  see more details in https://github.com/jimweirich/rake/issues/74

Mon Sep 12 12:42:36 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_exception.rb (TestException#test_exit_success_p):
	  assert also the cases when exiting with true and false.

	* lib/test/unit/assertions.rb (assert_send): make arguments in
	  the default message clearer.

Sun Sep 11 05:23:14 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Deal with subclasses of Matrix [redmine #5307]

Sat Sep 10 13:38:20 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* dir.c (dir_s_aref):
	* dir.c (dir_entries): Two small documentation fixes.
	  A patch from Aaron Lerch. [Bug #5302] [ruby-core:39404]

Sat Sep 10 08:30:03 2011  Koichi Sasada  <ko1@atdot.net>

	* gc.c (GC_PROFILE_MORE_DETAIL, CALC_EXACT_MALLOC_SIZE):
	  define macros only if they are not defined.
	  fixes: [Ruby 1.9 - Feature #5291]

Sat Sep 10 08:25:47 2011  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (bv_decls): parse.y relies on $$ = $1 before action
	  routines.  a patch from Michael Edgar.  [Bug #5303]
	  [ruby-core:39429]

Sat Sep 10 01:37:55 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* sample/drb/dhasenc.rb: coding cookie of Emacs is coding,
	  not encoding.

	* sample/mine.rb: ditto.

Fri Sep  9 21:56:40 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix comment.
	  BigDecimal#sqrt requires argument. Reported by Makoto Kishimoto.
	  Thanks for your contribution. [Bug #5267] [ruby-dev:44452]

Fri Sep  9 11:00:55 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/rubygems/test_gem_commands_help_command.rb: Add one
	  `require` because if run test-all with test/unit parallel
	  running, sometimes this test fails by some constants not found.
	  The error reason is some worker doesn't require the file needed by
	  this test. This issue is related to [ruby-core:36168].

Fri Sep  9 10:22:03 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_thread_select): fix a typo to initialize efds
	  properly.  [Bug #5299] [ruby-core:39380]

Fri Sep  9 02:02:09 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* template/yarvarch.ja:
	  Change encoding from Shift_JIS to UTF-8

Thu Sep  9 01:14:00 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* sample/drb/README.rd.ja:
	* sample/drb/dhasenc.rb:
	* sample/mine.rb:
	  Change encoding from EUC-JP to UTF-8

Thu Sep  8 21:03:22 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: import nkf 2.1.2 (be9c280)
	  Bump version number/release date only.

Thu Sep  8 12:43:18 2011  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
	  patch by Eric Hodel. [ruby-core:37857] [Bug #4991]

Thu Sep  8 09:02:53 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (id2ref): objects which are unmarked but not in sweep_slots
	  are not dead.

Thu Sep  8 07:44:25 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (rb_declare_transcoder, load_transcoder_entry): no
	  longer need to limit the length of transcoder library name.

Thu Sep  8 07:36:36 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/syck/lib/syck/types.rb: use toplevel Syck.
	  for the case someone define Syck::Syck (or YAML::Syck).

Thu Sep  8 07:33:12 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (id2ref): unmarked object is already dead while lazy
	  sweeping, and to it cannot come back since other objects
	  referred from it might have been freed already.

Wed Sep  8 03:48:00 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/readline/README.ja:
	  Change encoding from EUC-JP to UTF-8

Wed Sep  8 02:59:00 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/rexml/test_encoding.rb:
	  Add require 'require 'rexml/document'

Wed Sep  8 02:53:00 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/nkf/nkf-utf8/nkf.c:
	  Change encoding from ISO-2022 to UTF-8

Wed Sep  7 23:41:24 2011  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb, test/rexml/test_comment.rb:
	  allow a single hyphen in comment. [Bug #5278] [ruby-core:39289]
	  Reported by Thomas Fritzsche. Thanks!!!

Wed Sep  7 17:27:18 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/yaml.rb: explicitly specify ::Object to avoid the collision with
	  Syck::Object.

Tue Sep  6 21:06:49 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb (_run_suites): Now reports are written the
	  following order: Skip, Failure, Error. [Feature #5282]

	* test_sorting.rb: test for above.

	* test4test_sorting.rb: Ditto.

	* lib/test/unit.rb (run): Put RUBY_DESCRIPTION before quitting.
	  [Feature #5282]

Tue Sep  6 21:13:47 2011  Masaya Tarui  <tarui@ruby-lang.org>

	* win32/Makefile.sub (INSNS): change command line option -Ks to -Ku
	  for generate *.inc. because insns.def encoding has been changed SJIS
	  to UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]
	  (same as r33194)

Tue Sep  6 15:55:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (load_transcoder_entry): concatenate paths directly.

	* encoding.c (load_encoding): predefined encoding names are safe.
	  [ruby-dev:44469] [Bug #5279]

	* transcode.c (load_transcoder_entry): ditto.

Tue Sep  6 12:07:10 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c: enabled econv newline option.

Tue Sep  6 06:44:57 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (dbl2ival): Fix Float#divmod and #round for 32 bit
	  platform. part 1 of [bug #5276]

Tue Sep  6 06:44:25 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (flo_round): Fix criteria for 32 bits platform
	  part 2 of [bug #5276]

Tue Sep  6 05:37:11 2011  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb (test_core_03_notify): Fixed test failures
	  [ruby-dev:44430] [Ruby 1.9 - Bug #372]

Mon Sep  5 20:59:30 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* insns.def: change encoding pragma for emacs (shift_jis to utf-8).

Mon Sep  5 19:32:15 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* Makefile.in (INSNS): change command line option -Ks to -Ku for
	  generate *.inc. because insns.def encoding has been changed SJIS to
	  UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]

Mon Sep  5 18:10:56 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (rb_econv_binmode): newline decorators are
	  exclusive.

Mon Sep  5 15:03:37 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/rubygems/test_gem_security.rb
	  (test_class_build_self_signed_cert): reset opt[:trust_dir] to apply
	  temporary Gem.user_home.

Mon Sep  5 10:04:35 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* README.ja, README.EXT.ja: resolve conflicts. [ruby-dev:44459]

Mon Sep  5 05:13:22 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (flo_round): Make Float#round round big values [bug
	  #5272]

Mon Sep  5 04:28:25 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (int_round): Integer#round always returns an Integer [Bug
	  #5271]

Sun Sep  4 22:28:50 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (default_port, default_imap_port,
	  default_tls_port, default_ssl_port, default_imaps_port):
	  added methods for consistency with Net::POP.
	  based on the patch by art lussos.  [ruby-core:38997] [Bug #5198]

Sun Sep  4 21:19:19 2011  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* Change encoding from EUC-JP to UTF-8. [Feature #5128]

Sun Sep  4 00:47:39 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
	  add a test. Unlike TestThread#test_no_valid_cfp,
	  this test succeeds even if win32ole is required (see r33153).

Sun Sep  4 00:11:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (rb_const_set): show the previous definition
	  location.  [EXPERIMENTAL]

Sat Sep  3 23:56:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (sizeof_struct_dirent_too_small): check if struct
	  dirent.d_name is too small.

	* configure.in (RUBY_MINGW32): take tool prefix from CC.

Sat Sep  3 23:52:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_next_argv): open in default text mode.
	  [ruby-core:39234] [Bug #5268]

Sat Sep  3 18:40:57 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* lib/thread.rb (SizedQueue#max=): raise ArgumentError if max is not
	  positive number. patch by Masaki Matsushita.
	  [ruby-dev:44449] [Bug #5259]

	* test/thread/test_queue.rb (test_sized_queue_initialize,
	  test_sized_queue_assign_max): add tests for it.

Fri Sep  2 21:11:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (validate_enc_binmode, prep_stdio): default to text mode on
	  dosish platforms.  [ruby-core:38822] [Bug #5164]

	* transcode.c (rb_econv_prepare_options): keep default ecflags
	  unchanged if no options.

Fri Sep  2 14:36:47 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_search_const_defined_class): search
	  ancestors only when global scope.  [ruby-core:39227] [Bug #5264]

Fri Sep  2 09:58:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_tokadd_string, parser_yylex): ignore a backslash
	  which prefixes an non-ascii character, which has no escape
	  syntax.  [ruby-core:39222] [Ruby 1.9 - Bug #5262]

Fri Sep  2 04:05:25 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged as
	  ascii-8bit as binary in YAML.
	* test/psych/test_string.rb: corresponding test.

Fri Sep  2 01:07:14 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (flo_round): substitute machine dependent magic number.

Thu Sep  1 17:31:22 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see
	  also inherited constants for classes without superclass and
	  modules.  [ruby-core:37698] [Bug #3423]

Thu Sep  1 16:18:44 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* Release GVL while OpenSSL's public key generation.

	    t = Thread.new { print "."; sleep 0.1 }
	    key = OpenSSL::PKey::RSA.new(2048)
	    #=> Thread t works in parallel with public key generation if
		OS/machine allows it.

	  This works with OpenSSL >= 0.9.8. From this version, it has new
	  public key generation function which allows us to interrupt the
	  execution while pkey generation iterations.

	* ext/openssl/extconf.rb: Check existence of OpenSSL's new public key
	  generation function. (DH_generate_parameters_ex,
	  DSA_generate_parameters_ex and RSA_generate_key_ex.

	* ext/openssl/ossl_pkey.{h,c} (ossl_generate_cb_2,
	  ossl_generate_cb_stop): Added new callback function for OpenSSL pkey
	  generation which handles Thread interruption by Ruby.
	  ossl_generate_cb_stop is the unblock function(ubf) for Ruby which
	  sets a stop flag. New pkey generation callback ossl_generate_cb_2
	  checks the stop flag at each iterations of OpenSSL and interrupts
	  pkey generation when the flag is set.

	* ext/openssl/ossl_pkey_dsa.c (dsa_generate): Call
	  rb_thread_blocking_region with the above unblock function to release
	  GVL while pkey generation.

	* ext/openssl/ossl_pkey_rsa.c (rsa_generate): ditto.

	* ext/openssl/ossl_pkey_dh.c (dh_generate): ditto.

	* test/openssl/test_pkey_{dh,dsa,rsa}.rb: Test it.

Thu Sep  1 14:06:54 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_thread.rb (TestThread#test_no_valid_cfp): skip when
	  win32ole is required.  in such case, win32ole redefines
	  Thread#initialize, and the block argument becomes to be not the top
	  of the thread, then this testcase always fails.

Thu Sep  1 10:20:50 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
	  default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
	  committed in r33144.  I'd misunderstood the spec of ruby's universal
	  newline.

Thu Sep  1 09:27:57 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* variable.c (rb_autoloading_value): Fix the order of definitions.
	  It is used by autoload_defined_p.

Wed Aug 31 17:28:23 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* variable.c (rb_autoload): There was a chance to run GC (from
	  rb_str_new2()) before finishing autoload_data_i construction. It
	  caused SEGV at rb_gc_mark() at autoload_i_mark.

	* variable.c (rb_autoload_load): Move RB_GC_GUARD() to proper
	  position based on suggestion by CHIKANAGA Tomoyuki at
	 http://d.hatena.ne.jp/nagachika/20110826/ruby_trunk_changes_33070_33078

	* variable.c (autoload_defined_p): Fix incompatible autoload behavior
	  that causes Rails crash. Class definition instruction defined in
	  'defineclass' in insns.def always invokes rb_autoload_load for a
	  constant. It's invoked for every class definition regardless of
	  existence of autoload definition. rb_autoload_load checks if a
	  constant is defined as autoloaded, but new thread-safe autoload
	  returned different value if the constant is under autoloading.

Wed Aug 31 17:20:56 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* Re-apply r33078, thread-safe autoload which is reverted at r33093.

Wed Aug 31 16:28:04 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
	  default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].

Wed Aug 31 15:54:11 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).

Wed Aug 31 13:09:41 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (flo_round): Avoid overflow by optimizing for trivial
	  cases [Bug #5227]

Wed Aug 31 00:50:01 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_select_with_thread): and my typo. we all must
	  be more careful.

Wed Aug 31 00:48:38 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* thread.c (rb_thread_select): critical typo in r33117.

Wed Aug 31 00:30:49 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/-ext-/old_thread_select/test_old_thread_select.rb
	  (TestOldThreadSelect#test_old_select_read_timeout): if the machine
	  is fast enough, the time used by code around IO.select may be smaller
	  than Time implement threshold.

Wed Aug 31 00:04:38 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
	  typo.

	* test/-ext-/old_thread_select/test_old_thread_select.rb
	  (TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
	  of SIGUSR1 because the former is general and the latter is platform
	  dependent.

Tue Aug 30 23:59:36 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implement
	  for rb_thread_select() in thread.c.  the use of rb_fd_copy() is
	  introduced in r33117.
	  [Bug #5251] [ruby-core:39195]

	* thread.c (rb_thread_select): must call rb_fd_init() before using
	  rb_fdset_t.  see the implementations of rb_fd_init()s if you want to
	  know the reason.

Tue Aug 30 22:34:45 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/dl/test_callback.rb (test_callback_with_string): prevents
	  temporary string from GC.

Tue Aug 30 22:25:38 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* vm_insnhelper.c (vm_call_cfunc): revert r33112.  RB_GC_GUARD macro
	  protect a VALUE from GC.  It's not for general anti-optimizing
	  purpose.

Tue Aug 30 11:06:19 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
	  [Bug #5173] [ruby-core:38866]

Tue Aug 30 09:57:50 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/thread.rb (Queue#pop): fix a race against Thread.wakeup.
	  Patch by Masaki Matsushita <glass.saga at gmail dot com>
	  [Bug #5195] [ruby-dev:44400]

Tue Aug 30 09:48:07 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (fiber_entry): fix stack allocation failure on Debian
	  GNU/kFreeBSD.
	  Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>.
	  [Bug #5241] [ruby-core:39147]

Tue Aug 30 09:28:01 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_select): rewrite by using
	  rb_thread_fd_select(). old one is EINTR unsafe.
	  Patch by Eric Wong. [Bug #5229] [ruby-core:39102]

	* test/-ext-/old_thread_select/test_old_thread_select.rb:
	  a testcase for rb_thread_select().
	* ext/-test-/old_thread_select/old_thread_select.c: ditto.
	* ext/-test-/old_thread_select/depend: ditto.
	* ext/-test-/old_thread_select/extconf.rb: ditto.

Tue Aug 30 09:08:22 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: fix a build failure on GNU Hurd.
	  Patch by Samuel Thibault <sthibault at debian dot org>. Thank you!
	  [Bug #5250] [ruby-core:39185]

Sun Aug 29 23:22:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* test/ruby/test_numeric.rb (test_num2long): modify a test against the
	  change by r33108.

Sun Aug 29 09:58:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* numeric.c (bit_coerce): A Fixnum and a Bignum are only permitted for
	 bitwise arithmetic with a Fixnum.  #1792

	* test/ruby/test_fixnum.rb: add tests for the above change.

	* bignum.c (bit_coerce): A Fixnum and a Bignum are only permitted for
	 bitwise arithmetic with a Bignum.  #1792

	* test/ruby/test_bignum.rb: add tests for the above change.

Sun Aug 28 15:38:17 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/date/date_parse.c (date_zone_to_diff): keep a temporary string
	  stored in variable while the contents buffer is being used.

	* ext/date/date_parse.c (date_zone_to_diff): get rid of out of bounds
	  memory read. [ruby-dev:44409] [Bug #5213]

Sun Aug 28 05:29:50 2011  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 2.5.1 (r6596)
	* test/minitest/*: ditto

Sat Aug 27 20:46:05 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (rb_vm_rewrite_dfp_in_errinfo): change return type
	  to suppress a warning.

	* vm_core.h: ditto.

Sat Aug 27 19:04:06 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* internal.h (rb_strftime_timespec): moved from time.c and define only
	  if ruby/encoding.h is included.

	* internal.h (rb_strftime): ditto.

Sat Aug 27 18:53:51 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.
	  [Bug #5234] [ruby-core:39125]
	  This code will be removed after changing throw mechanism (see r33064).

	* vm.c (rb_vm_rewrite_dfp_in_errinfo): new function.

	* vm.c (vm_make_env_each): changed accordingly.

	* vm_core.h: ditto.

	* bootstraptest/test_flow.rb: add tests for above.

Sat Aug 27 18:44:06 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* internal.h (rb_strftime_timespec): move to time.c because it depends
	  encoding.h.

Sat Aug 27 18:17:58 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* strftime.c (rb_strftime_with_timespec): get enc argument to specify
	  the encoding of the format. On Windows (at least Japanese Windows),
	  Time#strftime("%Z") includes non ASCII in locale encoding (CP932).
	  So convert locale to default internal. [ruby-core:39092] [Bug #5226]

	* strftime.c (rb_strftime): ditto.

	* strftime.c (rb_strftime_timespec): ditto.

	* internal.h (rb_strftime_timespec): follow above.

	* time.c (rb_strftime_alloc): ditto.

	* time.c (strftimev): ditto.

	* time.c (time_strftime): ditto.

	* time.c (time_to_s): the resulted string of Time#to_s is always
	  ascii only, so this should be US-ASCII.

	* time.c (time_asctime): ditto.

Sat Aug 27 11:18:12 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* Revert r33078. It caused a Rails application NoMethodError.

	 /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/utils.rb:157: warning: toplevel constant ScanError referenced by Regin::Parser::ScanError
	 /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/vendor/regin/regin/parser.rb:17:in `parse_regexp': undefined method `scan_str' for #<Regin::Parser:0x00000002344548> (NoMethodError)

Sat Aug 27 08:44:58 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Import RDoc 3.9.4.  Typo and grammar fixes by Luke Gruber.
	  [Ruby 1.9 - Bug #5203]

Sat Aug 27 07:53:34 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/open-uri.rb:  Fix indentation of OpenURI::OpenRead#open.  Use ++
	  instead of `' for method arguments in open-uri.rb

Sat Aug 27 07:22:07 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/pathname/lib/pathname.rb:  Fix typos and grammar mistakes.  Patch
	  by Luke Gruber.  [#5203]
	* ext/pty/lib/expect.rb:  ditto
	* lib/mathn.rb:  ditto
	* lib/net/http.rb:  ditto
	* lib/open-uri.rb:  ditto
	* lib/ostruct.rb:  ditto
	* lib/tempfile.rb:  ditto
	* lib/thread.rb:  ditto
	* lib/weakref.rb:  ditto
	* sample/webrick/httpproxy.rb:  ditto

Sat Aug 27 04:03:18 2011  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (iseq_data_to_ary): fix type of variable
	  (long -> unsigned long) to suppress a warning.

Sat Aug 27 04:02:11 2011  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: add a decl. of rb_autoloading_value().

Fri Aug 26 19:12:08 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* variable.c: Make autoload thread-safe. See #921.

	  What's the problem?
	    autoload is thread unsafe. When we define a constant to be
	    autoloaded, we expect the constant construction is invariant. But
	    current autoload implementation allows other threads to access the
	    constant while the first thread is loading a file.

	  What's happening inside?
	    The current implementation uses Qundef as a marker of autoload in
	    Constant table. Once the first thread find Qundef as a value at
	    constant lookup, it starts loading a defined feature. Generally a
	    loaded file overrides the Qundef in Constant table by module/class
	    declaration at very beginning lines of the file, so other threads
	    can see the new Module/Class object before feature loading is
	    finished. It breaks invariant construction.

	  How to solve?
	    To ensure invariant constant construction, we need to override
	    Qundef with defined Object after the feature loading. For keeping
	    Qundef in Constant table, I expanded autoload_data struct in
	    Module to have a slot for keeping the defined object while feature
	    loading. And changed Module's constant lookup/update logic a
	    little so that the slot is only visible from the thread which
	    invokes feature loading. (== the first thread which accessed the
	    autoload constant)

	  Evaluation?
	    All test passes (bootstrap test, test-all and RubySpec) and added
	    8 tests for threading behavior. Extra logics are executed only
	    when Qundef is found, so no perf drop should happen except
	    autoloading.

	* variable.c (rb_autoload): Prepare new autoload_data struct.

	* variable.c (rb_autoload_load): Load feature and update Constant
	  table after feature loading is finished.

	* variable.c (rb_const_get_0): When the fetched constant is under
	  autoloading, it returns the object only for the thread which starts
	  autoloading.

	* variable.c (rb_const_defined_0): Ditto.

	* variable.c (rb_const_set): When the specified constant is under
	  autoloading, it sets the object only for the thread which starts
	  autoloading. Otherwise, simply overrides Qundef with constant
	  override warning.

	* vm_insnhelper.c (vm_get_ev_const): Apply same change as
	  rb_const_get_0 in variable.c.

	* test/ruby/test_autoload.rb: Added tests for threading behavior.

Fri Aug 26 10:10:37 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.10.  Fixes security issue in
	  creating ruby-format gemspecs.  Fixes Gem.dir not being at the front
	  of Gem.path to fix uninstall and cleanup commands.  Fixes gem
	  uninstall stopping on the first missing gem.

Fri Aug 26 08:21:10 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* time.c (strftimev): Make Time#to_s default to US-ASCII encoding but
	  respect Encoding.default_internal. [ruby-core:39092]
	* test/ruby/test_time.rb (class TestTime): Corresponding test.

Thu Aug 25 09:43:16 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/lib/openssl/bn.rb:  Hide copyright info from RDoc.
	* ext/openssl/lib/openssl/digest.rb:  ditto
	* ext/openssl/lib/openssl/x509.rb:  ditto
	* ext/openssl/lib/openssl/cipher.rb:  ditto

Thu Aug 25 09:25:48 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_digest.c:  Document OpenSSL::Digest::digest and add
	  an example to OpenSSL::Digest.  Patch by Sylvain Daubert.
	  [Ruby 1.9 - Bug #5166]
	* ext/openssl/lib/openssl/digest.rb (module OpenSSL):  ditto

Thu Aug 25 08:19:43 2011  Koichi Sasada  <ko1@atdot.net>

	* vm.c (vm_make_env_each): work around to solve Bug #2729.
	  fixes: Bug #2729
	  a patch from Kazuki Tsujimoto <kazuki@callcc.net>
	  This problem is caused by changing dfp (dynamic env pointer)
	  from saved dfp.  Saved dfp is pointed env in VM stack.  However,
	  the dfp can be moved because VM copies env from VM stack to
	  the heap.  At this copying, dfp was also changed.  To solve this
	  problem, I'll try to change throw mechanism (not save target dfp,
	  but save target cfp).

	* bootstraptest/test_flow.rb: add a test for above.

Thu Aug 25 07:57:33 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (int_round): Fix Integer#round [ruby-core:39096]

Thu Aug 25 07:00:00 2011  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.h, vm_insnhelper.c, vm.c, vm_method.c, insns.def:
	  Manage a redefinition of special methods for each classes.
	  A patch from Joel Gouly <joel.gouly@gmail.com>.  Thanks!

Thu Aug 25 06:51:08 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: Fixing psych version number.
	* ext/psych/psych.gemspec: updating the gemspec.

Thu Aug 25 06:11:35 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to be
	  UTF-8.
	* test/psych/test_encoding.rb: test yaml dump encoding.

Thu Aug 25 01:24:33 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solaris
	  seems to behave the same as FreeBSD.

Thu Aug 25 01:11:36 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* test/ruby/test_rubyoptions.rb (test_script_from_stdin): slave pty
	  should be manipulated because master pty may not be a tty on some
	  environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420]

Wed Aug 24 15:13:56 2011  Koichi Sasada  <ko1@atdot.net>

	* iseq.h, iseq.c, compile.c: Change the line number data structure
	  to solve an issue reported at [ruby-dev:44413] [Ruby 1.9 - Bug #5217].
	  Before this fix, each instruction has an information including
	  line number (iseq::iseq_insn_info_table).  Instead of this data
	  structure, recording only line number changing places
	  (iseq::iseq_line_info_table).
	  The order of entries in iseq_line_info_table is ascending order of
	  iseq_line_info_table_entry::position.  You can get a line number
	  by an iseq and a program counter with this data structure.
	  This fix reduces memory consumption of iseq (bytecode).
	  On my measurement, a rails application consumes 21.8MB for
	  iseq with this fix on the 32bit CPU.  Without this fix, it
	  consumes 24.7MB for iseq [ruby-dev:44415].

	* proc.c: ditto.

	* vm_insnhelper.c: ditto.

	* vm_method.c: ditto.

	* vm.c (rb_vm_get_sourceline): change to use rb_iseq_line_no().

Wed Aug 24 09:49:10 2011  Koichi Sasada  <ko1@atdot.net>

	* insns.def (defined): fix to checking class variable.
	  A patch by Magnus Holm <judofyr@gmail.com>.  Thanks!

	* test/ruby/test_variable.rb: add a test for above.

Wed Aug 24 08:53:06 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc 3.9.3.  Fixes RDoc with `ruby -Ku`.  Allows
	  HTTPS image paths to be turned into <img> tags.  Prevents special
	  markup inside <tt> from being processed.

Wed Aug 24 07:57:43 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.9.  Fixes uninstalling multiple
	  gems and gem cleanup.

Wed Aug 24 06:45:20 2011  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 2.5.0 (r6557)
	* test/minitest/*: ditto

Wed Aug 24 00:38:22 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* thread.c (update_coverage): skip coverage count up if the current
	  line is out of the way.  rb_sourceline() is unreliable when source
	  code is big.  [ruby-dev:44413]

	* test/coverage/test_coverage.rb: add a test for above.

Tue Aug 23 15:23:56 2011  Eric Hodel  <drbrain@segment7.net>

	* load.c (rb_f_require):  Improve documentation of Kernel#require.
	  [Ruby 1.9 - Bug #5210]

Tue Aug 23 11:27:26 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/zlib/zlib.c (gzfile_read_header): Ensure that each section of
	  gzip header is readable to avoid SEGV.

	* test/zlib/test_zlib.rb (test_corrupted_header): Test it.

Mon Aug 22 23:43:33 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* sprintf.c (rb_str_format): add RB_GC_GUARD to prevent temporary
	  strings from GC.

Sun Aug 21 17:49:53 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* iseq.c (iseq_s_disasm): remove variable which is no longer used
	  since r33013.

Sun Aug 21 14:20:58 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in: use LD_LIBRARY_PATH_64 on 64-bit Solaris.

Sat Aug 20 13:19:52 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.

	* test/ruby/test_method.rb (test_body): add a test for the above change.

Sat Aug 20 10:43:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): return new string if nil
	  is explicitly given as a buffer ([Bug #5207]), otherwise set the
	  encoding.  also removed dead code.

Fri Aug 19 14:25:51 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (proc_spawn_v, proc_spawn): should not wait the
	  spawned process.

	* process.c (proc_spawn_v): fix missing argument, and try with
	  /bin/sh only if failed with ENOEXEC.

Fri Aug 19 14:12:57 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (idle): raises a Net::IMAP::Error when the
	  connection is closed.  based on the patch by Hugo Barauna.
	  [Bug #5190] [ruby-core:38930]

Fri Aug 19 13:18:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: defines _DARWIN_UNLIMITED_SELECT if the target_os
	  is darwin.

Fri Aug 19 13:14:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* thread.c: add a description for the behavior of select(2) on
	  Mac OS X 10.7 (Lion).

Fri Aug 19 11:28:58 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (msg_att): accepts extra space before ')'.
	  based on the patch by art lussos.  [Bug #5163] [ruby-core:38820]

Wed Aug 17 23:01:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
	  remove duplication.

Wed Aug 17 15:27:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
	  add a new function for raising error when an object cannot coerce
	  into BigDecimal.  [Bug #5172]

	* ext/bigdecimal/bigdecimal.c (BigDecimalValueWithPrec): use
	  cannot_be_coerced_into_BigDecimal function.

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.

	* ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.

	* test/bigdecimal/test_bigdecimal.rb: test for the above changes.

	* test/bigdecimal/testbase.rb (under_gc_stress): add a new utility
	  method to run tests under the condition of GC.stress = true.

Wed Aug 17 10:16:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* rational.c (nurat_coerce): Rational#coerce should converts itself
	  into Complex if the argument is a Complex with non-zero imaginary
	  part.  [Bug #5020] [ruby-dev:44088]

	* test/ruby/test_rational.rb (test_coerce): test for the above change.

Wed Aug 17 06:33:19 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_x509cert.c: Add class documentation for
	  OpenSSL::X509::Certificate.

Wed Aug 17 04:54:25 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkey.c: corrected docs, OpenSSL::PKey::DH does
	  *not* support #sign/verify.

Tue Aug 16 18:56:54 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (ruby_threadptr_data_type): rename to hide.
	  [ruby-core:38972]

Tue Aug 16 18:52:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/mkexports.rb (Exports::Mswin#each_export): exclude Init_
	  and _threadptr_ functions, as well as mingw.

Tue Aug 16 09:31:44 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/dl:  Add documentation.  Patch by Vincent Batts.
	  [Ruby 1.9 - Bug #5192]

Tue Aug 16 08:48:26 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/.document (fiddle):  Remove duplicate entry
	* ext/fiddle:  Complete documentation of Fiddle.  Patch by Vincent
	  Batts.  [#5192]

Tue Aug 16 08:00:15 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/socket:  Make Socket documentation appear.  Add documentation for
	  Socket, TCPServer, SOCKSSocket.  Patch by Sylvain Daubert.
	  [Ruby 1.9 - Feature #5182]

Mon Aug 15 09:58:55 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.

	* test/openssl/test_ssl.rb: Add a test for it.
	  Thanks to Eric Wong for the patch.
	  [Ruby 1.9 - Feature #5183] [ruby-core:38911]

Sun Aug 14 05:57:01 2011  Tanaka Akira  <akr@fsij.org>

	* test/socket/test_socket.rb (test_connect_timeout): added a test
	  based on a patch by Eric Wong.  [ruby-core:38910]

Sat Aug 13 22:17:27 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/mkconfig.rb: do not make the entries related to sitedir and
	  verdordir if disabled by --without options.  [ruby-core:38922]
	  [Bug #5187]

Sat Aug 13 17:03:22 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:38861]

Sat Aug 13 09:39:07 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* test/date/test_*.rb: added tests.

Sat Aug 13 09:36:19 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/date/date_parse.c (parse_ddd_cb): fix r32896. RB_GC_GUARD
	  insertion position was mistaken. [ruby-dev:44337] [Bug #5152]

Sat Aug 13 09:26:24 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.
	  [ruby-core:38913]

	* test/psych/test_yaml.rb: corresponding test.

Sat Aug 13 09:05:16 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (date_strftime_alloc): followed the change
	  of r32885.

	* doc/NEWS-1.9.3: followed the above change.

Sat Aug 13 08:55:38 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: Only consider strings
	  with fewer than 2 dots to be numbers. [ruby-core:38915]

Sat Aug 13 08:47:20 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:38855].

Sat Aug 13 03:41:37 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/uri/common.rb:  Fix documentation of URI::Parser.new.  Patch by
	  Steve Klabnik.  [Ruby 1.9 - Bug #5177]

Sat Aug 13 02:19:57 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/digest/digest.c:  Add documentation for the Digest module.  Patch
	  by Sylvain Daubert.  [Ruby 1.9 - Bug #5167]

Sat Aug 13 01:56:11 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rake:  Update to Rake 0.9.2.2.  Prevent pollution of toplevel
	  namespace by Commands.  Remove unused variable and debugging
	  statement in tests.

Fri Aug 12 11:39:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: Describe "no" configure option for site_ruby
	  and vendor_ruby. Patch by Vit Ondruch. [Bug #5187][ruby-core:38921]

Fri Aug 12 09:00:24 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems 1.8.8.  Fixes encoding of YAML gemspec
	  from gems.  Github Issue #149

Fri Aug 12 08:17:46 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for
	  listen backlog.

	* ext/socket/unixsocket.c (rsock_init_unixsock): ditto.

	* ext/socket/lib/socket.rb (Addrinfo#listen): ditto.
	  (Socket.tcp_server_sockets_port0): ditto.

	* ext/socket/mkconstants.rb: define SOMAXCONN as 5 if not available.

	[ruby-core:38493]

Fri Aug 12 03:24:35 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Import RDoc 3.9.2.  Fixes TIDYLINK for HTML output.

Thu Aug 11 15:37:42 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* variable.c (autoload_delete): An autoload entry is still in a
	  RCLASS_IV_TBL, not in a RCLASS_CONST_TBL, so take back the table
	  changed in r29600. And an autoload entry keeps not a
	  rb_const_entry_t but a NODE so remove rb_const_entry_t thing added
	  in r29602.

Thu Aug 11 15:07:36 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (link_command): use LIBRUBYARG in rbconfig for
	  unbundled extensions.  [ruby-core:38802] [Bug #5147]

	* lib/mkmf.rb (init_mkmf): revert r32902.  [ruby-core:38903]

Wed Aug 10 23:03:55 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/lib/socket.rb: fix argument check in the previous commit.

Wed Aug 10 22:12:28 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/lib/socket.rb (Socket.tcp): add :connect_timeout option.
	  (Addrinfo#connect_from): add :timeout option.
	  (Addrinfo#connect): ditto.
	  (Addrinfo#connect_to): ditto.
	  [ruby-core:38538]

Wed Aug 10 21:27:19 2011  Tanaka Akira  <akr@fsij.org>

	* lib/net/pop.rb: fix typo in document.

	* lib/net/http.rb: ditto.

	* lib/net/imap.rb: ditto.

Wed Aug 10 19:30:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* complex.c (nucomp_rationalize): calls rationalize of real part if
	  imaginary part is exactly zero.  The patch is made by Marc-Andre
	  Lafortune.  fixes [Bug #5178] [ruby-core:38885]

	* test/ruby/test_complex.rb (test_rationalize): add a test for the
	  above change.

	* complex.c (nucomp_to_r): fix RDoc comment.  The patch is made by
	  Marc-Andre Lafortune.

Wed Aug 10 14:11:07 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (init_mkmf): set $LIBRUBYARG regardless of shared
	  option.  [ruby-core:38802] [Bug #5147]

Wed Aug 10 02:53:27 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb: come back autoload. OpenSSL constant is used
	  some places, so it leads mistakes like HTTP.start.

Tue Aug  9 22:57:45 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/date/date_parse.c (date_zone_to_diff): add RB_GC_GUARD.
	  [ruby-dev:44337] [Bug #5152]

	* ext/date/data_parse.c (parse_ddd_cb): ditto.

Tue Aug  9 14:25:47 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg
	  should be used to handle shorter return value. fix [Bug #3861]
	  [ruby-core:32504]

	* ext/fiddle/closure.c (callback): ditto

	* ext/fiddle/conversions.h (fiddle_generic): ditto

	* ext/fiddle/conversions.c (value_to_generic): char, short and int
	  are strictly distinguished on big-endian CPU, e.g. sparc64.

Tue Aug  9 11:21:08 2011  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (gc_lazy_sweep): if sweep target slots are not found, we
	  try heap_increment() because it might be able to expand the
	  heap. [Bug #5127] [ruby-dev:44285]

	* gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
	  interrupted, we expand the heap if at all possible.

Tue Aug  9 12:20:33 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.
	  [ruby-core:38853] [Bug #5168]

	* test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc
	  and libm version numbers for detecting default libc and libm.

Tue Aug  9 09:18:04 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (gzfile_wrap):  Document encoding options.

	* ext/zlib/zlib.c (rb_gzwriter_s_open): ditto

	* ext/zlib/zlib.c (rb_gzreader_s_open): ditto

Sun Aug  7 23:31:32 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* time.c (rb_strftime_alloc): raise ERANGE if width is too large.
	  Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]

	* test/ruby/test_time.rb (class TestTime): add a test for the
	  above change.

Sun Aug  7 22:51:45 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/openssl/ossl_asn1.c (decode_eoc): remove unused variables.
	  Patch by Eric Wong. [Feature #5157] [ruby-core:38798]

	* ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto.

	* ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): ditto.

Sun Aug  7 22:37:08 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: add -Wunused-variable to default CFLAGS.
	  Patch by Eric Wong. [Feature #5157] [ruby-core:38798]

Sun Aug  7 15:37:35 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/digest/sha2/sha2ossl.c: use original SHA384_Final on DragonFly.

Sun Aug  7 14:08:16 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/objspace/objspace.c: fix typos in a document.

Sun Aug  7 07:14:57 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (HAVE_GETCONTEXT): see getcontext(3) because DragonFly BSD
	  x64 port doesn't have it.

Sun Aug  7 00:42:55 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/tk/lib/tk/wm.rb (Tk::Wm.command): Add the missing receiver
	  before calling epath. patched by flori
	 https://github.com/flori/ruby/commit/aa9474d32e5f2c57f8b0e2e0c528a03f06a4d433

Sat Aug  6 07:06:34 2011  Eric Hodel  <drbrain@segment7.net>

	* marshal.c (w_object):  Fix exception message when _dump_data is not
	  defined on a T_DATA object.

Fri Aug  5 22:16:20 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* numeric.c (rb_infinity, rb_nan): use WORDS_BIGENDIAN to get endian.
	  fix [Bug #5160] [ruby-dev:44356]

Fri Aug  5 17:14:11 2011  Akinori MUSHA  <knu@iDaemons.org>

	* test/test_syslog.rb (TestSyslog#test_log): Do not be too
	  specific about the log line format.  Fixes #5081.

Fri Aug  5 15:57:10 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* complex.c (f_signbit): fix compile error in gcc4 on Solaris with
	  CFLAGS="-std=gnu99".  [ruby-dev:44355] fix [Bug #5159]

	* math.c: ditto.

Fri Aug  5 15:55:33 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_object.rb: tests that respond_to? returns false.

Fri Aug  5 13:32:43 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/xmlrpc/client.rb, lib/xmlrpc/server.rb: should use
	  String#bytesize instead of String#size.

Fri Aug  5 12:18:20 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (check_funcall): try respond_to? first if redefined.
	  [Bug #5158]

Fri Aug  5 09:48:22 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems 1.8.7:
	  Added missing require for `gem uninstall --format-executable`.

	  The correct name of the executable being uninstalled is now displayed
	  with --format-executable.

	  Fixed `gem unpack uninstalled_gem` default version picker.

	  RubyGems no longer claims a nonexistent gem can be uninstalled.

	  `gem which` no longer claims directories are requirable files.

	  `gem cleanup` continues cleaning up gems if one can't be uninstalled
	  due to permissions.  Issue #82.

	  Gem repository directories are no longer created world-writable.
	  Patch by Sakuro OZAWA.  [Ruby 1.9 - Bug #4930]

Fri Aug  5 07:00:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/io/console/test_io_console.rb (test_noctty): daemon() on
	  Fedora Rawhide seems not to detach the controlling terminal,
	  when the argument noclose is non-zero.  ref: [Bug #5135]

Thu Aug  4 23:48:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* thread_pthread.c (native_cond_signal): retry to call pthread_cond_signal
	  and pthread_cond_broadcast if they return EAGAIN in
	  native_cond_signal and native_cond_broadcast, respectively.
	  It is for the pthread implementation of Mac OS X 10.7 (Lion).
	  fixes #5155.  [ruby-dev:44342].

	* thread_pthread.c (native_cond_broadcast): ditto.

	* thread_pthread.c (struct cached_thread_entry): stop using
	  pthread_cond_t and its functions directly.

	* thread_pthread.c (register_cached_thread_and_wait): ditto.

	* thread_pthread.c (use_cached_thread): ditto.

Thu Aug  4 20:29:41 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in: when Solaris cc, use $(CC) to link shared libs.

Thu Aug  4 20:19:11 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* error.c (report_bug): use a small message buffer instead of BUFSIZ.
	  It is needed for avoiding nested SIGSEGV on Linux.
	  Note: BUFSIZ is not proper buffer size. It's unrelated with maximum
	  filename length. :-/
	  [Bug #5139] [ruby-dev:44315]

Thu Aug  4 16:08:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (gem): install all gemspecs under lib and ext.

	* tool/rbinstall.rb (Gem::Specification): may not be defined when
	  cross-compiling and BASERUBY is 1.8.

Thu Aug  4 11:30:36 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* include/ruby/missing.h: define __syscall on OpenBSD as r32702.

Thu Aug  4 03:02:54 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* tool/rbinstall.rb: use rubygems to load gemspecs, copy actual
	  gemspecs on install rather than generate fake ones for all gems.

Thu Aug  4 02:45:10 2011  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: set CXX variable to the C++ compiler that matches the
	  C compiler specified by CC variable (e.g. use g++-4.2 for gcc-4.2).

Thu Aug  4 02:21:10 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (link_command): use static library only for bundled
	  extensions.  [Bug #5147]

Thu Aug  4 02:02:10 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/psych.gemspec: installing psych as a gem.

Wed Aug  3 16:01:35 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
	  [Bug #5153] [ruby-core:38736]

	* io.c (argf_next_argv): remove the call of above function.

	* ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
	  extension module because this is only for testing ruby_add_suffix().

	* LEGAL: remove the mention about a part of util.c, because now we
	  removed the part.

	* io.c (argf_next_argv): now the new filename is not guaranteed to
	  use, so should check the return value of rename(2).

	* test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
	  now we expect same result with other platforms on no_safe_rename
	  platforms (=Windows).

Wed Aug  3 09:18:08 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/xmlrpc/webrick_testing.rb (WEBrick_Testing#start_server):
	  Like r32795, bind address should be specified.

Wed Aug  3 07:46:30 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (enc_find): mistakenly remained !.  [Bug #5150]

Wed Aug  3 00:11:08 2011  Tanaka Akira  <akr@fsij.org>

	* lib/prettyprint.rb: update document.  [ruby-core:36776]

Tue Aug  2 22:04:46 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c (init_heap): allocate sigaltstack after heaps are allocated.
	  [ruby-dev:44315] [Bug #5139]

	* vm.c (thread_free): use free because objspace is not ready.

	* vm.c (th_init): use malloc because objspace is not ready.

Tue Aug  2 20:10:16 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/testunit/test_parallel.rb: pass "--ruby" option to
	  test/testunit/tests_for_parallel/runner.rb. [Bug #5132] [ruby-dev:44303]

Tue Aug  2 15:53:37 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* encoding.c (str_to_encoding): rename from to_encoding and
	  use str_to_encindex.

	* encoding.c (str_to_encindex): split from to_encoding.

	* encoding.c (rb_to_encoding): use str_to_encoding.

	* encoding.c (rb_obj_encoding): don't bypass rb_encoding*.
	  If it uses rb_encoding*, it bypass encindex. If it uses encindex,
	  it doesn't bypass.

	* encoding.c (enc_find): add shortcut for encoding object, use
	  str_to_encindex, and avoid bypass rb_encoding*.

Tue Aug  2 12:03:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (recursive_hash): hash value of emptied hash should be
	  equal to an empty hash.  [ruby-core:38650]

Tue Aug  2 11:42:15 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_enc_symname2_p): :! is valid symbol.  [Bug #5136]

Tue Aug  2 07:33:29 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/net/http/test_http.rb (TestNetHTTP_version_1_1_methods#test_timeout_during_HTTP_session):
	  If you connect to localhost, you should listen localhost.

	* test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake):
	  ditto.

Tue Aug  2 06:18:15 2011  Luis Lavena  <luislavena@gmail.com>

	* lib/rubygems/installer.rb (class Gem): Correct path check on Windows
	  Possible fix for [Ruby 1.9 - Bug #5111]
	* test/rubygems/test_gem_installer.rb (load Gem): ditto

Mon Aug  1 20:12:03 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_process.rb (TestProcess#windows?): new method.

	* test/ruby/test_process.rb (TestProcess#*): use above method.

	* test/ruby/test_process.rb (TestProcess#test_execopts_redirect):
	  windows doesn't support FD_CLOEXEC.

Mon Aug  1 15:45:23 2011  Eric Hodel  <drbrain@segment7.net>

	* test/rake/test_rake_functional.rb:  Don't assume the binary name of
	  ruby is "ruby".  [Ruby 1.9 - Bug #5114]
	* test/rake/helper.rb:  ditto

Mon Aug  1 15:31:14 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/io/console/test_io_console.rb (TestIO_Console#test_sync):
	  Skip when PTY allocation failed (that's not our fault).

Mon Aug  1 15:04:12 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/xmlrpc/test_webrick_server.rb (Test_Webrick#setup_http_server):
	  XMLRPC::Client.new3(), when called without host: argument, tries
	  to  connect to  a host  where "localhost"  resolves to.   On the
	  other  hand  a  WEBrick::HTTPServer.new(), when  called  without
	  BindAddress:  argument, tries  to listen  all the  address where
	  getaddrinfo(AF_UNSPEC) resolves to.   This is a mismatch because
	  "localhost" might not resolve to one of those listening sockets.
	  We  would  better explicitly  specify  "localhost"  here and  if
	  failed, just skip the whole test.

Mon Aug  1 14:24:56 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc.rb:  Import RDoc 3.9.1.  Fixes bugs in the RDoc::Markup
	  parser.

Mon Aug  1 12:00:35 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* insns.def (concatstrings): don't use initial ASCII-8BIT string.
	  [ruby-core:38635] [Bug #5126]

Sun Jul 31 22:57:16 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* enc/Makefile.in (ECHO1): Same as the recent fix in common.mk.
	  ":" in a make variable replacement cause a syntax error with
	  /usr/ccs/bin/make on Solaris.  Uses $(NULLCMD) instead.

Sun Jul 31 21:16:02 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* complex.c (f_signbit): gcc4 on Solaris DOES have signbit but does
	  not have it on header.

	* math.c: ditto.

Sun Jul 31 21:09:04 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* common.mk (node_name.inc): Use $(Q) for consistency.

	* Makefile.in (INSNS): ditto.

Sun Jul 31 21:19:51 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* lib/mkmf.rb (configuration:ECHO1): Same as the recent fix in
	  common.mk.
	  ":" in a make variable replacement cause a syntax error with
	  /usr/ccs/bin/make on Solaris.  Uses $(NULLCMD) instead.

Sun Jul 31 20:39:12 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* common.mk (ECHO1): nmake does not allow parenthesis in make variable
	  replacement.

Sun Jul 31 23:06:57 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (check_env): print debug messages to stderr.
	[Feature #4871] [ruby-dev:43743]

Sun Jul 31 22:50:23 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (vm_make_env_each): don't save prev env value.
	It is no longer used. [Feature #4871] [ruby-dev:43743]

	* vm.c (check_env): changed accordingly.

Sun Jul 31 20:21:36 2011  "Yuki Sonoda (Yugui)"  <yugui@yugui.jp>

	* common.mk (ECHO1): ":" in a make variable replacement cause a syntax
	  error with /usr/ccs/bin/make on Solaris.  Uses $(NULLCMD) instead.

	* configure.in (NULLCMD): new check.

	* Makefile.in (NULLCMD): Reflects checking in configure.

	* win32/Makefile.sub (NULLCMD): new assignment.

Sun Jul 31 18:58:59 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_pipe): pipe on cygwin can succeed half but fail
	  half.

Sun Jul 31 11:31:07 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]

Sun Jul 31 09:18:28 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc 3.9.  Fixed `ri []`, stopdoc creating an
	  object reference, nodoc for class aliases, verbatim === lines.

Sun Jul 31 01:29:08 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (rb_io_each_byte): remove unused variable e.

Sat Jul 31 01:23:45 2011  Kenta Murata  <mrkn@mrkn.jp>

	* test/bigdecimal/test_bigdecimal.rb (test_version): removed.

Sat Jul 30 23:19:09 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* defs/default_gems: separate from tool/rbinstall.rb.

Sat Jul 30 23:14:44 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_each_byte): rbuf can be refreshed during yield.
	  [Bug #5119]

Sat Jul 30 22:35:50 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* strftime.c (NEEDS): avoid SEGV due to integer overflow in
	  sparc-solaris2.10 and i686-linux.  fix [Bug #4456] [ruby-dev:43284]

Sat Jul 30 17:26:26 2011  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* test/win32ole/test_win32ole_variant.rb: use skip method to skip the test.

	* test/win32ole/test_win32ole_variant_outarg.rb: ditto.

Sat Jul 30 14:27:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_version): version 1.1.0.

	* ext/bigdecimal/bigdecimal.gemspec: turn into a default gem.

	* tool/rbinstall.rb: ditto.

Sat Jul 30 11:21:55 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_core.h (ALT_STACK_SIZE): use MINSIGSTKSZ*2 instead of SIGSTKSZ*2.
	  [ruby-core:38607]

Sat Jul 30 10:39:14 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm.c (th_init): preallocate alternative stack.
	  NoMemoryError is better than rb_bug, of course.
	  Patch by Eric Wong. [ruby-core:38572][ruby-core:38594].

	* signal.c (rb_register_sigaltstack): ditto.

	* vm_core.h: moved ALT_STACK_SIZE definition from signal.c.
	* vm.c (thread_free): use xfree() instead of free().

Sat Jul 30 07:20:49 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/lib/socket.rb (udp_server_sockets): unused variable
	  removed.
	  patch by Jeremy Evans.  [ruby-core:38600]

Fri Jul 29 23:56:32 2011  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb: call OpenSSL::Random.seed at the
	  SecureRandom.random_bytes call.
	  based on the patch by Masahiro Tomita.  [ruby-dev:44270]

Fri Jul 29 23:53:48 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_set_len): new function to set array length.

	* vm_eval.c (method_missing): set the length of argv array, to mark
	  arguments.

	* vm_eval.c (rb_apply): get rid of too large alloca.

Fri Jul 29 20:48:39 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb: fix typos.

Fri Jul 29 20:28:56 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb: use whitespaces as a separator.

Fri Jul 29 18:59:07 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb: add documents for constants.
	  patch by Eric Hodel.  [ruby-core:37853] [Bug #4989]

Fri Jul 29 16:00:43 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (enable_pthread): use -pthread on OpenBSD without
	  explicit option. patched by Jeremy Evans. [ruby-core:38572]

Thu Jul 28 23:36:28 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/fiddle/closure.c (callback): use rb_ary_tmp_new() instead of
	  xmalloc() to allocate an array for arguments of callback procedure,
	  to prevent arguments from being swept by GC. [ruby-core:38546]
	  [Bug #4929]

Thu Jul 28 22:36:06 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_cipher.c (ossl_cipher_initialize): Avoid possible
	  SEGV from AES encryption/decryption. Processing data by
	  Cipher#update without initializing key (meaningless usage of Cipher
	  object since we don't offer a way to export a key) could cause SEGV.

	  In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3)
	  allows uninitialized key, but other EVPs (such as AES) does not
	  allow it. Calling EVP_CipherUpdate() without initializing key causes
	  SEGV so we set the data filled with "\0" as the key by default. See
	  #2768.

	* test/openssl/test_cipher.rb: test it.

Thu Jul 28 14:25:08 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): typo.

Thu Jul 28 12:32:53 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/callback/mkcallback.rb (gencallback): use PTR2NUM.

	* ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointer
	  dereference.

	* ext/dl/cptr.c (rb_dlptr_s_to_ptr): use rb_check_funcall.

	* ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition.

Thu Jul 28 04:53:31 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/delegate.rb:  Move file-level documentation to the appropriate
	  classes.

Thu Jul 28 02:15:04 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):
	  workaround to mark wrapped object.  this is not a true fix,
	  because [Bug #4929] is caused by the interface design of DL.

Thu Jul 28 00:28:15 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/fileutils/test_fileutils.rb: add OpenBSD case.
	  patched by Jeremy Evans [ruby-core:38530] see #5097

	* test/ruby/test_process.rb: ditto.

Wed Jul 27 22:46:59 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/rinda/test_rinda.rb (test_remote_array_and_hash):
	  add local variables to protect objects from GC. [ruby-dev:44253]
	  [Bug #5104]

Wed Jul 27 17:55:54 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* include/ruby/missing.h: define __syscall if the platform has
	  __syscall in the library but doesn't define it in headers
	  for example Mac OS X.

Wed Jul 27 15:39:14 2011  Eric Hodel  <drbrain@segment7.net>

	* object.c:  Add usage documentation for BasicObject.  Based on patch
	  by Thomas Sawyer.  [Ruby 1.9 - Bug #5067]

Wed Jul 27 12:24:17 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/uninstaller.rb:  Add missing require and update
	  messaging to avoid confusion with uninstall --format-executable.
	  [Ruby 1.9 - Bug #4062]

Wed Jul 27 09:34:24 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.6.1.

Wed Jul 27 09:27:59 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_pkcs12.rb: Add test and intermediate certificates.
	  [ Ruby 1.9 - Feature #3793 ] [ruby-core:32088]

Wed Jul 27 01:05:32 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_error.c (rb_print_undef_str): new function to raise
	  NameError for undefined method.

	* load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
	  variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
	  (rb_mod_{remove,undef,alias}_method, set_method_visibility):
	  remove inadvertent symbol creation.  based on the first patch by
	  Jeremy Evans at [ruby-core:38447].  [Feature #5089]

	* vm_method.c (obj_respond_to): fix the respond_to_missing? override
	  case.  based on the patch by Jeremy Evans at [ruby-core:38417].
	  [Feature #5072]

	* parse.y (rb_check_id): make the given name a symbol or a string.
	  based on the second patch by Jeremy Evans at [ruby-core:38447]

Wed Jul 27 00:50:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
	  zero or negative precision is error.  fixes #5098.
	  [ruby-dev:44210]

	* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
	  change.

Wed Jul 27 00:48:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
	  specifying precision.  fixes #5098.  [ruby-dev:44210]

	* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
	  change.

Wed Jul 27 00:45:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
	  for symmetry to BigDecimal() function with an Integer.
	  fixes #5098.  [ruby-dev:44210]

	* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
	  change.

Wed Jul 27 00:30:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
	  for adapting other Numeric subclasses.  [ruby-dev:44245]

	* test/bigdecimal/test_bigdecimal_util.rb: test for the above change.

Wed Jul 27 00:27:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* bigdecimal/bigdecimal.c (VpDup) a new function for duplicating
	  a BigDecimal.

	* bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
	  BigDecimal from another BigDecimal using BigDecimal global function
	  or constructor.  [ruby-dev:44245]

Tue Jul 26 23:33:24 2011  Igor Zubkov  <igor.zubkov@gmail.com>

	* array.c: Fix typo. https://github.com/ruby/ruby/pull/36

Mon Jul 25 23:51:01 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* proc.c: pre-allocate the unlinked_method_entry_list_entry struct to
	  avoid memory allocation during GC.  based on a patch from Eric Wong.
	  [ruby-core:38498]

Mon Jul 25 23:39:33 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rake/test_rake_directory_task.rb (TestRakeDirectoryTask#
	  test_directory_win32): fixed wrong test.

Mon Jul 25 22:36:11 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* proc.c (struct METHOD), gc.c (gc_marks), vm_method.c
	  (rb_gc_mark_unlinked_live_method_entries): fix SEGV bug.
	  rb_method_entry_t was free'd even when the method is still on the
	  stack if it is BMETHOD (i.e., Method#call).  This is because
	  rb_method_entry_t is embedded in struct METHOD.  This commit
	  separates them and marks the live method entries.
	  See [ruby-core:38449] in detail.  fix [Bug #5047] [ruby-core:38171]

Mon Jul 25 22:14:37 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by
	  'Basic' header. Long username caused the base64 String truncation in
	  HTTP header which is not allowed. See #5046.

	* test/xmlrpc/test_webrick_server.rb: test it.

Mon Jul 25 15:04:33 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/lib/openssl.rb: End of transition period introduced by
	  [ruby-dev:38018]. From the next version of 1.9.3, you should use
	    require "openssl"
	  instead of
	    require "openssl/ssl"
	  and
	    require "openssl/x509"

Mon Jul 25 13:46:38 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/lib/openssl/x509.rb: Cosmetic change: move definition
	  introduced in r30152 to x509-internal.rb.

Mon Jul 25 13:09:42 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Avoid randomly generated
	  SSLError from SSLSocket just after invoking SSLSocket#close.
	  OpenSSL's SSL_shutdown could try to send alert packet and it might
	  set SSLerr(global error stack) as the result. It causes the next
	  SSL read/write operation to fail by unrelated reason.

	  By design, we're ignoring any error at SSL_shutdown() so we clear
	  global error stack after SSL_shutdown is called. See #5039.

Sun Jul 24 20:29:53 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: refine the recvmsg test.

Sun Jul 24 20:02:31 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: fix the recvmsg test.

Sun Jul 24 08:42:51 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: test recvmsg allocates file descriptors for
	  fd passing even with MSG_PEEK.

	* ext/socket/ancdata.c: use the above test result.

Sun Jul 24 01:04:50 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/specification.rb:  Restore behavior of
	  Gem::Specification#loaded.  [Ruby 1.9 - Bug #5032]

Sun Jul 24 00:05:00 2011  Jeremy Evans  <merch-redmine@jeremyevans.net>

	* error.c (rb_name_error_str): new function to raise NameError
	  with the name string but not ID.

	* object.c, proc.c, variable.c: more removal of inadvertent symbol
	  creation.  [Feature #5079]

Sat Jul 23 21:14:00 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/cmath.rb (cbrt): should return a real number if possible.

Sat Jul 23 20:12:52 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
	  directory. Current directory is not the top source directory when
	  the building process runs on other than there.

	* test/rake/test_rake_rake_test_loader.rb: ditto.

	* test/rake/test_rake_task_argument_parsing.rb
	  (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
	  when app.unix? is false.

Sat Jul 23 20:11:50 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: an issue that is same as  [ruby-dev:44071].
	* ext/date/date_strftime.c: identical to [ruby-dev:44112].

Sat Jul 23 19:12:53 2011  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* test/win32ole/test_err_in_callback.rb (test_err_in_callback):
	  skip test if ADODB.connection is not available.

Sat Jul 23 15:37:04 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* parse.y (rb_enc_symname_type): :$a!, @a! and so on are not
	  valid symbols, so they should be inspected with quotes.

Sat Jul 23 17:06:25 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_update_max_fd): validate fd.

	* ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add
	  msg_peek_p argument for the declaration.

	* ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument.
	  assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd
	  when MSG_PEEK.
	  (rsock_discard_cmsg_resource): add msg_peek_p argument.
	  (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with
	  msg_peek_p argument.

	* ext/socket/unixsocket.c (unix_recv_io): call
	  rsock_discard_cmsg_resource with msg_peek_p argument.

Sat Jul 23 14:38:28 2011  Eric Hodel  <drbrain@segment7.net>

	* test/rake*: Remove dependencies on flexmock and session gems.
	  [Ruby 1.9 - Bug #4987]

Sat Jul 23 12:19:04 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_check_id): take care of attrset ID created
	  implicitly by local ID.  [Bug #5084]

	* parse.y (rb_check_id): conversion condition was inverse.
	  [Bug #5084]

Fri Jul 22 21:46:54 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround
	  of cfp consistency error problem on OS X 10.7 (Lion). It's
	  suspected llvm optimization bug.
	  [Bug #5074] [ruby-dev:44185]

Fri Jul 22 21:18:20 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (WFKV_): unroll the loop of regexp.

	* lib/uri/generic.rb (URI.decode_www_form_component): ditto.

Fri Jul 22 21:06:39 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_{const,cvar}_defined, rb_obj_ivar_defined):
	  avoid inadvertent symbol creation in reflection methods.  based
	  on a patch by Jeremy Evans at [ruby-core:38367].  [Feature #5072]

	* vm_method.c (rb_mod_method_defined)
	  (rb_mod_{public,private,protected}_method_defined)
	  (obj_respond_to): ditto.

	* parse.y (rb_check_id): new function returns already interned ID
	  or 0.

Fri Jul 22 20:44:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_is_global_id, rb_is_attrset_id): add missing
	  predicates.

Fri Jul 22 20:24:38 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/test_object.rb (TestObject#test_respond_to_missing):
	  2nd argument of respond_to_missing? is not optional.

Fri Jul 22 19:05:47 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
	  access.

Fri Jul 22 13:55:59 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Net::HTTP#finish is used to manually close
	  connections.  [Ruby 1.9 - Bug #5045]

Fri Jul 22 13:51:29 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/readline/readline.c:  Add examples for Readline.completion_proc=.
	  [Ruby 1.9 - Bug #5057]

Fri Jul 22 13:03:12 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_hmac.c: Revert checking return type of
	  HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.

Fri Jul 22 12:10:21 2011  Eric Hodel  <drbrain@segment7.net>

	* tool/rbinstall.rb (default gems):  Install executables into the fake
	  gem dir for Gem.bin_path.  [#4485]

Fri Jul 22 11:20:20 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
	* ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
	  Thanks, Jared Jennings, for the patch.
	  [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]

Fri Jul 22 09:09:43 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
	* test/openssl/test_engine.rb: Add a test for it.
	  Thanks to Ippei Obayashi for providing the patch.
	  [ Ruby 1.9 - Bug #5062 ] [ruby-dev:44173]

Fri Jul 22 06:37:13 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]

Thu Jul 21 20:59:59 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ancdata.c (discard_cmsg): workaround for MacOS X Lion.

Thu Jul 21 20:02:11 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* thread.c (set_trace_func, thread_set_trace_func_m): reset tracing
	  state when set_trace_func hook is removed.  This is workaround patch
	  to force to reset tracing state that is broken by continuation call.
	  a patch from James M. Lawrence.  [Feature #4347] [ruby-core:34998]

	* test/ruby/test_continuation.rb (class TestContinuation): add a test
	  for above.  a patch from James M. Lawrence.

Thu Jul 21 19:27:19 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* node.c (dump_node): add today's knowledge.  "init arguments (m)" and
	  "init arguments (p)" of compile.c indicates a Ruby code that
	  evaluates multiple assignments that is in method or block
	  parameters:  def foo((m1,m2), (m3,m4), *r, (p1,p2), (p3,p4)); end
	  The former (init arguments (m)) evaluates the multiple assignments
	  before rest argument, that are (m1,m2) and (m3,m4).  The letter
	  (init arguments (p)) does ones after rest argument, that are
	  (p1,p2) and (p3, p4).

Thu Jul 21 18:11:07 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* enum.c (enum_inject): remove empty line to notify rdoc
	  Enumerable#reduce is alias. patched by milki@github.
	  https://github.com/ruby/ruby/pull/26

Thu Jul 21 17:30:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* array.c (rb_ary_delete_at_m): use simple array literal in rdoc.
	  patched by samuel tonini. [ruby-core:38310] [Bug #5066]

Thu Jul 21 17:14:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):
	  Allow HTTP/0.9 request which doesn't has any header or body.
	  patched by Felix Jodoin. [ruby-core:38040] [Bug #5022]

Wed Jul 20 23:02:18 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* io.c (rb_update_max_fd): remove parentheses. they are not in
	  macro.

Wed Jul 20 22:22:23 2011  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_update_max_fd): declaration moved from
	  internal.h.

	* file.c: ditto.

	* io.c: call rb_update_max_fd for each new fds.

	* process.c: ditto.

	* random.c: ditto.

	* ruby.c: ditto.

	* ext/io/console/console.c: ditto.

	* ext/openssl/ossl_bio.c: ditto.

	* ext/pty/pty.c: ditto.

	* ext/socket/init.c: ditto.

	* ext/socket/socket.c: ditto.

	* ext/socket/ancdata.c: ditto.

	* ext/socket/unixsocket.c: ditto.

Wed Jul 20 15:16:22 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
	  before calling dlsym(). [ruby-dev:44091] [Bug #5021]

Wed Jul 20 07:16:26 2011  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* NEWS: mention Kernel#warn.  [ruby-core:38119] [Feature #5029]

Tue Jul 19 16:40:45 2011  TAKANO Mitsuhiro (takano32)  <tak@no32.tk>

	* cont.c (cont_save_thread): fix missing semicolon.

Tue Jul 19 16:25:15 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (UPDATE_MAXFD): removed.

Tue Jul 19 16:07:45 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_update_max_fd): new function.

	* internal.h (rb_update_max_fd): declare rb_update_max_fd.

	* thread_pthread.c (rb_thread_create_timer_thread): update max fd when
	  timer thread pipe is created.

Mon Jul 18 13:36:47 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: define a new BadAlias error class.

	* ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when
	  deserializing an alias that does not exist.

	* test/psych/test_merge_keys.rb: corresponding test.

Mon Jul 18 00:00:46 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/curses/curses.c: added the new class Curses::Pad, which
	  supports scrolling.  patch by Eric Hodel.  [Feature #4896]
	  [ruby-core:37206]

Sun Jul 17 16:26:40 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_check_trusted): new function to check an object is
	  trusted.

	* struct.c (rb_struct_modify), time.c (time_modify): check by the
	  above function to show proper class names.  [Bug #5036]

Sun Jul 17 15:30:04 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_warn_m): accept multiple args in like puts.  rdoc
	  patch by Erik Price at [ruby-core:38119].  [Feature #5029]

Sun Jul 17 07:56:31 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_ssl_session.rb: add PEM SSL session without TLS
	  extensions. Use this as the default for the tests to ensure
	  compatibility with OpenSSL 0.9.7.
	  [ Ruby 1.9 - Bug #4961 ] [ruby-core:37726]

Sat Jul 16 17:29:20 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag.
	  Bug #4977

Sat Jul 16 06:27:51 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/uri/common.rb (module): Remove optional parser argument to
	  Kernel#URI
	  [ruby-core:38061]

	* lib/uri/generic.rb (module): ditto

Sat Jul 16 03:19:45 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (is_socket, is_console): add prototypes to fix compile
	  problem with gcc introduced at r32549.
	  reported by Jon Forums. [Bug #5030] [ruby-core:38079]

Sat Jul 16 00:55:38 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* time.c (time_dup): used rb_obj_class() instead of CLASS_OF().
	  The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071]

	* test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass):
	  added a new test for eigenclass of time object.

Fri Jul 15 19:11:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* bignum.c (bigsub_int): add RB_GC_GUARD.  This patch is made by
	  Makoto Kishimoto.  fixes #4223 [ruby-dev:42907]

	* bignum.c (bigadd_int): ditto.

Fri Jul 15 14:27:53 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed
	  from rb_w32_has_cancel_io().  now it takes a parameter as fd to check
	  the fd is console or not, because we cannot cancel console input even
	  if we have cancel_io function.

	* io.c (WAIT_FD_IN_WIN32): call above function instead of the old one,
	  so now we can kill the thread which calls STDIN.gets.
	  the problem was reported by ko1 via IRC.

Fri Jul 15 09:10:41 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/digest/sha2/sha2.c (SHA256_Update, SHA512_Update): avoid Bus
	  Error caused by unalignment access on Sparc-Solaris (and possibly on
	  other similar environment.) This patch just do memcpy always instead
	  of checking architecture. I see no perf drop on my 64bit env. For
	  more details, see #4320.

	* test/digest/test_digest.rb: add test for unalignment access.

Fri Jul 15 01:51:25 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): Power PC does not
	  allow unaligned word access.

	* st.c (UNALIGNED_WORD_ACCESS): x86_64 allows unaligned word
	  access as well as i386.

Thu Jul 14 12:19:34 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl.c (ossl_verify_cb): trap the exception from
	  verify callback of SSLContext and X509Store and make the
	  verification fail normally. Raising exception directly from callback
	  causes orphan resources in OpenSSL stack. Patched by Ippei Obayashi.
	  See #4445.

	* test/openssl/test_ssl.rb
	  (test_exception_in_verify_callback_is_ignored): test it.

Tue Jul 12 23:41:49 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* NEWS: add a description of Signal.trap change.

Tue Jul 12 20:02:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (reserved_signal_p): reverted a pardoc/alt-ruby20/NEWS000064400000044642150403127760007730 0ustar00AKAMURA Usaku  <usa@ruby-lang.org>

	* win32/setup.mak: support x86-amd64 cross compile environment.

Mon Jul 11 23:22:28 2011  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* time.c: can't compile time.c on AIX due to missing declaration for
	  ffs(). It is declared in strings.h on AIX.

Mon Jul 11 15:54:24 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* process.c: removed signal() macro. It's no longer used.

Mon Jul 11 15:02:24 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see
	  rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
	  platforms, introduced at r32433.

Mon Jul 11 05:38:05 2011  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* thread_pthread.c (get_stack): need to adjust stack addr for
	  [Bug #1813] on AIX.

Mon Jul 11 01:16:27 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (rb_thread_create_timer_thread): removed
	  rb_disable_interrupt()/rb_enable_interrupt().
	* vm_core.h: ditto.
	* process.c (static void before_exec): ditto.
	* process.c (static void after_exec): ditto.
	  [Bug #4765] [ruby-dev:43571]

	* eval_intern.h: removed rb_trap_restore_mask().
	* vm_eval.c (rb_throw_obj): ditto.
	* eval.c (setup_exception): ditto.

	* signal.c: removed trap_last_mask.
	* signal.c (trap_restore_mask): removed.
	* signal.c (init_sigchld): comment clarification why signal block
	  is needed. and removed trap_last_mask operation.
	* signal.c (trap_ensure): removed trap_last_mask operation.

	* signal.c (rb_disable_interrupt, rb_enable_interrupt): made
	  static and removed sigdelset(SIGVTALRM) and sigdelset(SIGSEGV).

	* process.c (rb_syswait): removed implicit signal handler change.

Sun Jul 10 23:49:12 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* docs/NEWS-1.9.3: moved from NEWS.

	* docs/ChangeLog-1.9.3: merged ChangeLog for 1.9.3.

	* NEWS: NEWS for 1.9.4 that describes changes since 1.9.3

	* ChangeLog: new ChangeLog for 1.9.4.

Sun Jul 10 23:30:52 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* version.h (RUBY_VERSION): ruby_1_9_3 branch was forked.

For the changes before 1.9.3, see doc/ChangeLog-1.9.3
For the changes before 1.8.0, see doc/ChangeLog-1.8.0

Local variables:
coding: us-ascii
add-log-time-format: (lambda ()
  (let* ((time (current-time))
	 (system-time-locale "C")
	 (diff (+ (cadr time) 32400))
	 (lo (% diff 65536))
	 (hi (+ (car time) (/ diff 65536))))
  (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t)))
indent-tabs-mode: t
tab-width: 8
change-log-indent-text: 2
end:
vim: tabstop=8 shiftwidth=2
doc/alt-ruby20/NEWS000064400000044642150403127760007730 0ustar00# -*- rdoc -*-

= NEWS for Ruby 2.0.0

This document is a list of user visible feature changes made between
releases except for bug fixes.

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.

== Changes since the 1.9.3 release

=== Language changes

* Added keyword arguments.

* Added %i and %I for symbol list creation (similar to %w and %W).

* Default source encoding is changed to UTF-8. (was US-ASCII)

* No warning for unused variables starting with '_'

=== Core classes updates (outstanding ones only)

* ARGF
  * added method:
    * added ARGF#codepoints and ARGF#each_codepoint, like the corresponding
      methods for IO.

* Array
  * added method:
    * added Array#bsearch for binary search.
  * incompatible changes:
    * random parameter of Array#shuffle! and Array#sample now
      will be called with one argument, maximum value.
    * when given Range arguments, Array#values_at now returns nil for each
      value that is out-of-range.

* Enumerable
  * added method:
    * added Enumerable#lazy method for lazy enumeration.

* Enumerator
  * added method:
    * added Enumerator#size for lazy size evaluation.
  * extended method:
    * Enumerator.new accept an argument for lazy size evaluation.
  * new class Enumerator::Lazy for lazy enumeration

* ENV
  * aliased method:
    * ENV.to_h is a new alias for ENV.to_hash

* Fiber
  * incompatible changes:
    * Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".

* File
  * extended method:
    * File.fnmatch? now expands braces in the pattern if
      File::FNM_EXTGLOB option is given.

* GC
  * improvements:
    * introduced the bitmap marking which suppresses to copy a memory page
      with Copy-on-Write.
    * introduced the non-recursive marking which avoids unexpected stack overflow.

* GC::Profiler
  * added method:
    * added GC::Profiler.raw_data which returns raw profile data for GC.

* Hash
  * added method:
    * added Hash#to_h as explicit conversion method, like Array#to_a.
  * extended method:
    * Hash#default_proc= can be passed nil to clear the default proc.

* IO
  * deprecated methods:
    * IO#lines, #bytes, #chars and #codepoints are deprecated.

* Kernel
  * added method:
    * added Kernel#Hash conversion method like Array() or Float().
    * added Kernel#__dir__ which returns the absolute path of the
      directory of the file from which this method is called.
    * added Kernel#caller_locations which returns an array of
      frame information objects.
  * extended method:
    * Kernel#warn accepts multiple args in like puts.
    * Kernel#caller accepts second optional argument `n' which specify
      required caller size.
    * Kernel#to_enum and enum_for accept a block for lazy size evaluation.
  * incompatible changes:
    * system() and exec() closes non-standard file descriptors
      (The default of :close_others option is changed to true by default.)
    * respond_to? against a protected method now returns false unless
      the second argument is true.
    * __callee__ has returned to the original behavior, and now
      returns the called name but not the original name in an
      aliased method.
    * Kernel#inspect does not call #to_s anymore
      (it used to call redefined #to_s).

* LoadError
  * added method:
    * added LoadError#path method to return the file name that could not be
      loaded.

* Module
  * added method:
    * added Module#prepend which is similar to Module#include,
      however a method in the prepended module overrides the
      corresponding method in the prepending module.
    * added Module.prepended and Module.prepend_features, similar
      to included and append_features.
    * added Module#refine, which extends a class or module locally.
      [experimental]
  * extended method:
    * Module#define_method accepts a UnboundMethod from a Module.
    * Module#const_get accepts a qualified constant string, e.g.
      Object.const_get("Foo::Bar::Baz")

* Mutex
  * added method:
    * added Mutex#owned? which returns the mutex is held by current
      thread or not. [experimental]
  * incompatible changes:
    * Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize
      and Mutex#sleep are no longer allowed to be used from trap handler
      and raise a ThreadError in such case.
    * Mutex#sleep may spurious wakeup. Check after wakeup.

* NilClass
  * added method:
    * added nil.to_h which returns {}

* ObjectSpace::WeakMap
  * new low level class to hold weak referendoc/alt-ruby20/NEWS000064400000044642150403127760007730 0ustar00used at fiber creation.
      default: 64KB or 128KB.
    * RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
      creation. default: 256KB or 256KB.
    These variables are checked only at launched time.
  * added constant DEFAULT_PARAMS to get above default parameters.

* Signal
  * added method:
    * added Signal.signame which returns signal name

  * incompatible changes:
    * Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
      are specified.

* String
  * added method:
    * added String#b returning a copied string whose encoding is ASCII-8BIT.
  * change return value:
    * String#lines now returns an array instead of an enumerator.
    * String#chars now returns an array instead of an enumerator.
    * String#codepoints now returns an array instead of an enumerator.
    * String#bytes now returns an array instead of an enumerator.

* Struct
  * added method:
    * added Struct#to_h returning values with keys corresponding to the
      instance variable names.

* Thread
  * added method:
    * added Thread#thread_variable_get for getting thread local variables
      (these are different than Fiber local variables).
    * added Thread#thread_variable_set for setting thread local variables.
    * added Thread#thread_variables for getting a list of the thread local
      variable keys.
    * added Thread#thread_variable? for testing to see if a particular thread
      variable has been set.
    * added Thread.handle_interrupt as well as instance and singleton methods
      pending_interrupt? for asynchronous handling of exceptions
    * added Thread#backtrace_locations which returns similar information of
      Kernel#caller_locations.
  * new class Thread::Backtrace::Location to hold backtrace location
    information. These are returned by Thread#backtrace_locations and
    Kernel#caller_locations.
  * incompatible changes:
    * Thread#join and Thread#value now raises a ThreadError if target thread
      is the current or main thread.

* Time
  * change return value:
    * Time#to_s now returns US-ASCII encoding instead of BINARY.

* TracePoint
  * new class. This class is replacement of set_trace_func.
    Easy to use and efficient implementation.

* toplevel
  * added method:
    * added main.define_method which defines a global function.
    * added main.using, which imports refinements into the current file or
      eval string. [experimental]

=== Core classes compatibility issues (excluding feature bug fixes)

* Array#values_at

  See above.

* String#lines
* String#chars
* String#codepoints
* String#bytes

  These methods no longer return an Enumerator, although passing a
  block is still supported for backwards compatibility.

  Code like str.lines.with_index(1) { |line, lineno| ... } no longer
  works because str.lines returns an array.  Replace lines with
  each_line in such cases.

* IO#lines
* IO#chars
* IO#codepoints
* IO#bytes
* ARGF#lines
* ARGF#chars
* ARGF#bytes
* StringIO#lines
* StringIO#chars
* StringIO#codepoints
* StringIO#bytes
* Zlib::GzipReader#lines
* Zlib::GzipReader#bytes

  These methods are deprecated in favor of each_line, each_byte,
  each_char and each_codepoint.

* Proc#==
* Proc#eql?

  These methods were removed. Two procs are == only when they are
  the same object.

* Fixnum
* Bignum
* Float

  Fixnums, Bignums and Floats are frozen.

* Signal.trap

  See above.

* Merge Onigmo.
  https://github.com/k-takata/Onigmo

* The :close_others option is true by default for system() and exec().
  Also, the close-on-exec flag is set by default for all new file descriptors.
  This means file descriptors doesn't inherit to spawned process unless
  explicitly requested such as system(..., fd=>fd).

* Kernel#respond_to? against a protected method now returns false
  unless the second argument is true.

* Kernel#respond_to_missing?
* Kernel#initialize_clone
* Kernel#initialize_dup

  These methods are now private.

* Thread#join, Thread#value

  See above.

* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep

  See above.

=== Stdlib updates (outstanding ones only)

* cgi
  * Add HTML5 tag maker.
  * CGI#header has been renamed to CGI#http_header and
    aliased to CGI#header.
  * When HTML5 tagmaker called, overwrite CGI#header,
    CGI#header function is to create a <header> element.

* CSV
  * Removed CSV::dump and CSV::load to protect users from dangerous
    serialization vulnerability

* iconv
  * Iconv has been removed. Use String#encode instead.

* io/console
  * new methods:
    * added IO#cooked which sets the terminal to cooked mode within the given block.
    * added IO#cooked! which sets the terminal to cooked.
  * extended method:
    * IO#raw, IO#raw!, and IO#getch accept keyword arguments, :min and :time.

* io/wait
  * new features:
    * added IO#wait_writable method.
    * added IO#wait_readable method as alias of IO#wait.

* json
  * updated to 1.7.7.

* net/http
  * new features:
    * Proxies are now automatically detected from the http_proxy environment
      variable.  See Net::HTTP::new for details.
    * gzip and deflate compression are now requested for all requests by
      default.  See Net::HTTP for details.
    * SSL sessions are now reused across connections for a single instance.
      This speeds up connection by using a previously negotiated session.
    * Requests may be created from a URI which sets the request_uri and host
      header of the request (but does not change the host connected to).
    * Responses contain the URI requested which allows easier implementation of
      redirect following.
  * new methods:
    * Net::HTTP#local_host
    * Net::HTTP#local_host=
    * Net::HTTP#local_port
    * Net::HTTP#local_port=
  * extended method:
    * Net::HTTP#connect uses local_host and local_port if specified.

* net/imap
  * new methods:
    * Net::IMAP.default_port
    * Net::IMAP.default_imap_port
    * Net::IMAP.default_tls_port
    * Net::IMAP.default_ssl_port
    * Net::IMAP.default_imaps_port

* objspace
  * new method:
    * ObjectSpace.reachable_objects_from(obj)

* openssl
  * Consistently raise an error when trying to encode nil values. All instances
    of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
    instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
    raise NoMethodError in the same case. Constructing such values is still
    permitted.
  * TLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to
    :TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
    :TLSv1_1_client. The version being effectively used can be queried
    with OpenSSL::SSL#ssl_version. Furthermore, it is also possible to
    blacklist the new TLS versions with OpenSSL::SSL:OP_NO_TLSv1_1 and
    OpenSSL::SSL::OP_NO_TLSv1_2.
  * Added OpenSSL::SSL::SSLContext#renegotiation_cb. A user-defined callback
    may be set which gets called whenever a new handshake is negotiated. This
    also allows to programmatically decline (client) renegotiation attempts.
  * Support for "0/n" splitting of records as BEAST mitigation via
    OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
  * The default options for OpenSSL::SSL::SSLContext have changed to
    OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
    instead of OpenSSL::SSL::OP_ALL only. This enables the countermeasure for
    the BEAST attack by default.
  * OpenSSL requires passwords for decrypting PEM-encoded files to be at least
    four characters long. This led to awkward situations where an export with
    a password with fewer than four characters was possible, but accessing the
    file afterwards failed. OpenSSL::PKey::RSA, OpenSSL::PKey::DSA and
    OpenSSL::PKey::EC therefore now enforce the same check when exporting a
    private key to PEM with a password - it has to be at least four characters
    long.
  * SSL/TLS support for the Next Protocol Negotiation extension. Supported
    with OpenSSL 1.0.1 and higher.
  * OpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL
    is FIPS-enabled. OpenSSL.fips_mode= allows turning on and off FIPS mode
    manually in order to adapt to situations where FIPS mode would be an
    explicit requirement.
  * Authenticated Encryption with Associated Data (AEAD) is supported via
    Cipher#auth_data= and Cipher#auth_tag/Cipher#auth_tag=.
    Currently (OpenSSL 1.0.1c), only GCM mode is supported.

* ostruct
  * new methods:
    * OpenStruct#[], []=
    * OpenStruct#each_pair
    * OpenStruct#eql?
    * OpenStruct#hash
    * OpenStruct#to_h converts the struct to a hash.
  * extended method:
    * OpenStruct.new also accepts an OpenStruct / Struct.

* pathname
  * extended method:
    * Pathname#find returns an enumerator if no block is given.

* rake
  * rake has been updated to version 0.9.5.

    This version is backwards-compatible with previous rake versions and
    contains many bug fixes.

    See
    http://rake.rubyforge.org/doc/release_notes/rake-0_9_5_rdoc.html for a list
    of changes in rake 0.9.3, 0.9.4 and 0.9.5.

* RDoc
  * RDoc has been updated to version 4.0

    This version is largely backwards-compatible with previous rdoc versions.
    The most notable change is an update to the ri data format (ri data must
    be regenerated for gems shared across rdoc versions).  Further API changes
    are internal and won't affect most users.

    Notable changes include:

    * Page support for ri.  Try `ri ruby:` for a list of pages in ruby or
      `ri ruby:syntax/literals` for the syntax documentation for doc/alt-ruby20/COPYING.ja000064400000005100150403127770010640 0ustar00oding.

* RubyGems
  * Updated to 2.0.14.

    See http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.0.14+%2F+2013-11-12
    for release notes.

  * Updated to 2.0.10.  This fixes CVE_2013-4363:

    http://rubygems.rubyforge.org/rubygems-update/CVE-2013-4363_txt.html

  * Updated to 2.0.8.  This fixes CVE-2013-4287:

    http://rubygems.rubyforge.org/rubygems-update/CVE-2013-4287_txt.html

  * Updated to 2.0.0

    RubyGems 2.0.0 features the following improvements:

    * Improved support for default gems shipping with ruby 2.0.0+
    * A gem can have arbitrary metadata through Gem::Specification#metadata
    * `gem search` now defaults to --remote and is anchored like gem list.
    * Added --document to replace --rdoc and --ri.  Use --no-document to
      disable documentation, --document=rdoc to only generate rdoc.
    * Only ri-format documentation is generated by default.
    * `gem server` uses RDoc::Servlet from RDoc 4.0 to generate HTML
      documentation.

    For an expanded list of updates and bug fixes see:
    https://github.com/rubygems/rubygems/blob/master/History.txt

* shellwords
  * Shellwords#shellescape now stringifies the given object using to_s.
  * Shellwords#shelljoin accepts non-string objects in the given
    array, each of which is stringified using to_s.

* stringio
  * deprecated methods:
    * StringIO#lines, #bytes, #chars and #codepoints are deprecated.

* syslog
  * Added Syslog::Logger which provides a Logger API atop Syslog.
  * Syslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros
    are introduced for easy detection of available constants on a
    running system.

* tmpdir
  * incompatible changes:
    * Dir.mktmpdir uses FileUtils.remove_entry instead of
      FileUtils.remove_entry_secure.  This means that applications should not
      change the permission of the created temporary directory to make
      accessible from other users.

* yaml
  * Syck has been removed.  YAML now completely depends on libyaml being
    installed.
  * libyaml is now bundled with ruby, for cases where the library is not
    installed locally.

* zlib
  * Added streaming support for Zlib::Inflate and Zlib::Deflate.  This allows
    processing of a stream without the use of large amounts of memory.
  * Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED.
  * Zlib streams are now processed without the GVL.  This allows gzip, zlib and
    deflate streams to be processed in parallel.
  * deprecated methods:
    * Zlib::GzipReader#lines and #bytes are deprecated.

=== Stdlib compatibility issues (excluding featdoc/alt-ruby20/README.EXT000064400000127336150403130000010527 0ustar00本プログラムはフリーソフトウェアです.2-clause BSDL
または以下に示す条件で本プログラムを再配布できます
2-clause BSDLについてはBSDLファイルを参照して下さい.

  1. 複製は制限なく自由です.

  2. 以下の条件のいずれかを満たす時に本プログラムのソースを
     自由に変更できます.

     (a) ネットニューズにポストしたり,作者に変更を送付する
         などの方法で,変更を公開する.

     (b) 変更した本プログラムを自分の所属する組織内部だけで
         使う.

     (c) 変更点を明示したうえ,ソフトウェアの名前を変更する.
         そのソフトウェアを配布する時には変更前の本プログラ
         ムも同時に配布する.または変更前の本プログラムのソー
         スの入手法を明示する.

     (d) その他の変更条件を作者と合意する.

  3. 以下の条件のいずれかを満たす時に本プログラムをコンパイ
     ルしたオブジェクトコードや実行形式でも配布できます.

     (a) バイナリを受け取った人がソースを入手できるように,
         ソースの入手法を明示する.

     (b) 機械可読なソースコードを添付する.

     (c) 変更を行ったバイナリは名前を変更したうえ,オリジナ
         ルのソースコードの入手法を明示する.

     (d) その他の配布条件を作者と合意する.

  4. 他のプログラムへの引用はいかなる目的であれ自由です.た
     だし,本プログラムに含まれる他の作者によるコードは,そ
     れぞれの作者の意向による制限が加えられる場合があります.

     それらファイルの一覧とそれぞれの配布条件などに付いては
     LEGALファイルを参照してください.

  5. 本プログラムへの入力となるスクリプトおよび,本プログラ
     ムからの出力の権利は本プログラムの作者ではなく,それぞ
     れの入出力を生成した人に属します.また,本プログラムに
     組み込まれるための拡張ライブラリについても同様です.

  6. 本プログラムは無保証です.作者は本プログラムをサポート
     する意志はありますが,プログラム自身のバグあるいは本プ
     ログラムの実行などから発生するいかなる損害に対しても責
     任を持ちません.
doc/alt-ruby20/README.EXT000064400000127336150403130000010527 0ustar00# README.EXT -  -*- RDoc -*- created at: Mon Aug  7 16:45:54 JST 1995

This document explains how to make extension libraries for Ruby.

= Basic Knowledge

In C, variables have types and data do not have types.  In contrast,
Ruby variables do not have a static type, and data themselves have
types, so data will need to be converted between the languages.

Data in Ruby are represented by the C type `VALUE'.  Each VALUE data
has its data-type.

To retrieve C data from a VALUE, you need to:

1. Identify the VALUE's data type
2. Convert the VALUE into C data

Converting to the wrong data type may cause serious problems.

== Data-Types

The Ruby interpreter has the following data types:

T_NIL       :: nil
T_OBJECT    :: ordinary object
T_CLASS     :: class
T_MODULE    :: module
T_FLOAT     :: floating point number
T_STRING    :: string
T_REGEXP    :: regular expression
T_ARRAY     :: array
T_HASH      :: associative array
T_STRUCT    :: (Ruby) structure
T_BIGNUM    :: multi precision integer
T_FIXNUM    :: Fixnum(31bit or 63bit integer)
T_COMPLEX   :: complex number
T_RATIONAL  :: rational number
T_FILE      :: IO
T_TRUE      :: true
T_FALSE     :: false
T_DATA      :: data
T_SYMBOL    :: symbol

In addition, there are several other types used internally:

T_ICLASS    :: included module
T_MATCH     :: MatchData object
T_UNDEF     :: undefined
T_NODE      :: syntax tree node
T_ZOMBIE    :: object awaiting finalization

Most doc/alt-ruby20/COPYING.ja000064400000005100150403127770010640 0ustar00ck function

  void Check_Type(VALUE value, int type)

which raises an exception if the VALUE does not have the type
specified.

There are also faster check macros for fixnums and nil.

  FIXNUM_P(obj)
  NIL_P(obj)

== Convert VALUE into C Data

The data for type T_NIL, T_FALSE, T_TRUE are nil, false, true
respectively.  They are singletons for the data type.
The equivalent C constants are: Qnil, Qfalse, Qtrue.
Note that Qfalse is false in C also (i.e. 0), but not Qnil.

The T_FIXNUM data is a 31bit or 63bit length fixed integer.
This size is depend on the size of long: if long is 32bit then
T_FIXNUM is 31bit, if long is 64bit then T_FIXNUM is 63bit.
T_FIXNUM can be converted to a C integer by using the
FIX2INT() macro or FIX2LONG().  Though you have to check that the
data is really FIXNUM before using them, they are faster.  FIX2LONG()
never raises exceptions, but FIX2INT() raises RangeError if the
result is bigger or smaller than the size of int.
There are also NUM2INT() and NUM2LONG() which converts any Ruby
numbers into C integers.  These macros includes a type check,
so an exception will be raised if the conversion failed.  NUM2DBL()
can be used to retrieve the double float value in the same way.

You can use the macros
StringValue() and StringValuePtr() to get a char* from a VALUE.
StringValue(var) replaces var's value with the result of "var.to_str()".
StringValuePtr(var) does same replacement and returns char*
representation of var.  These macros will skip the replacement if var
is a String.  Notice that the macros take only the lvalue as their
argument, to change the value of var in place.

You can also use the macro named StringValueCStr(). This is just
like StringValuePtr(), but always add nul character at the end of
the result. If the result contains nul character, this macro causes
the ArgumentError exception.
StringValuePtr() doesn't guarantee the existence of a nul at the end
of the result, and the result may contain nul.

Other data types have corresponding C structures, e.g. struct RArray
for T_ARRAY etc. The VALUE of the type which has the corresponding
structure can be cast to retrieve the pointer to the struct.  The
casting macro will be of the form RXXXX for each data type; for
instance, RARRAY(obj).  See "ruby.h".

There are some accessing macros for structure members, for example
`RSTRING_LEN(str)' to get the size of the Ruby String object.  The
allocated region can be accessed by `RSTRING_PTR(str)'.  For arrays,
use `RARRAY_LEN(ary)' and `RARRAY_PTR(ary)' respectively.

Notice: Do not change the value of the structure directly, unless you
are responsibledoc/alt-ruby20/README.EXT000064400000127336150403130000010527 0ustar00d below:

=== String Functions

rb_str_new(const char *ptr, long len) ::

  Creates a new Ruby string.

rb_str_new2(const char *ptr) ::
rb_str_new_cstr(const char *ptr) ::

  Creates a new Ruby string from a C string.  This is equivalent to
  rb_str_new(ptr, strlen(ptr)).

rb_tainted_str_new(const char *ptr, long len) ::

  Creates a new tainted Ruby string.  Strings from external data
  sources should be tainted.

rb_tainted_str_new2(const char *ptr) ::
rb_tainted_str_new_cstr(const char *ptr) ::

  Creates a new tainted Ruby string from a C string.

rb_sprintf(const char *format, ...) ::
rb_vsprintf(const char *format, va_list ap) ::

  Creates a new Ruby string with printf(3) format.

  Note: In the format string, %i is used for Object#to_s (or Object#inspect if
  '+' flag is set) output (and related argument must be a VALUE).  For integers
  in format strings, use %d.

rb_str_cat(VALUE str, const char *ptr, long len) ::

  Appends len bytes of data from ptr to the Ruby string.

rb_str_cat2(VALUE str, const char* ptr) ::

  Appends C string ptr to Ruby string str.  This function is
  equivalent to rb_str_cat(str, ptr, strlen(ptr)).

rb_str_catf(VALUE str, const char* format, ...) ::
rb_str_vcatf(VALUE str, const char* format, va_list ap) ::

  Appends C string format and successive arguments to Ruby string
  str according to a printf-like format.  These functions are
  equivalent to rb_str_cat2(str, rb_sprintf(format, ...)) and
  rb_str_cat2(str, rb_vsprintf(format, ap)), respectively.

rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) ::

  Creates a new Ruby string with the specified encoding.

rb_usascii_str_new(const char *ptr, long len) ::
rb_usascii_str_new_cstr(const char *ptr) ::

  Creates a new Ruby string with encoding US-ASCII.

rb_str_resize(VALUE str, long len) ::

  Resizes Ruby string to len bytes.  If str is not modifiable, this
  function raises an exception.  The length of str must be set in
  advance.  If len is less than the old length the content beyond
  len bytes is discarded, else if len is greater than the old length
  the content beyond the old length bytes will not be preserved but
  will be garbage.  Note that RSTRING_PTR(str) may change by calling
  this function.

rb_str_set_len(VALUE str, long len) ::

  Sets the length of Ruby string.  If str is not modifiable, this
  function raises an exception.  This function preserves the content
  upto len bytes, regardless RSTRING_LEN(str).  len must not exceed
  the capacity of str.

=== Array Functions

rb_ary_new() ::

  Creates an array with no elements.

rb_ary_new2(long len) ::

  Creates an array with no elements, allocating internal buffer
  for len elements.

rb_ary_new3(long n, ...) ::

  Creates an n-element array from the arguments.

rb_ary_new4(long n, VALUE *elts) ::

  Creates an n-element array from a C array.

rb_ary_to_ary(VALUE obj) ::

  Converts the object into an array.
  Equivalent to Object#to_ary.

There are many functions to operate an array.  They may dump core if other
types are given.

rb_ary_aref(argc, VALUE *argv, VALUE ary) ::

  Equivaelent to Array#[].

rb_ary_entry(VALUE ary, long offset) ::

  ary[offset]

rb_ary_subseq(VALUE ary, long beg, long len) ::

  ary[beg, len]

rb_ary_push(VALUE ary, VALUE val) ::
rb_ary_pop(VALUE ary) ::
rb_ary_shift(VALUE ary) ::
rb_ary_unshift(VALUE ary, VALUE val) ::

rb_ary_cat(VALUE ary, const VALUE *ptr, long len) ::

  Appends len elements of objects from ptr to the array.

= Extending Ruby with C

== Adding New Features to Ruby

You can add new features (classes, methods, etc.) to the Ruby
interpreter.  Ruby provides APIs for defining the following things:

* Classes, Modules
* Methods, Singleton Methods
* Constants

=== Class and Module Definition

To define a class or module, use the functions below:

  VALUE rb_define_class(const char *name, VALUE super)
  VALUE rb_define_module(const char *name)

These functions return the newly created class or module.  You may
want to save this reference into a variable to use later.

To define nested classes or modules, use the functions below:

  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
  VALUE rb_define_module_under(VALUE outer, const char *name)

=== Method and Singleton Method Definition

To define methods or singleton methods, use these functions:

  void rb_define_method(VALUE klass, const char *name,
		        VALUE (*func)(), int argc)

  void rb_define_singleton_method(VALUE object, const char *name,
			          VALUE (*func)(), int argc)

The `argc' represents the number of the arguments to the C function,
which must be less than 17.  But I doubt you'll need that many.

If `argc' is negative, it specifies the calling sequence, not number of
the arguments.

If argc is -1, the function will be called as:

  VALUE func(int argc, VALUE *argv, VALUE obj)

where argc is the actual number of arguments, argv is the C array of
the arguments, and obj is the receiver.

If argc is -2, the arguments are passed in a Ruby array. The function
will be called like:

  VALUE func(VALUE obj, VALUE args)

where obj is the receiver, and args is the Ruby array containing
actual arguments.

There are some more functions to define methods. One takes an ID
as the name of method to be defined. See also ID or Symbol below.

  void rb_define_method_id(VALUE klass, ID name,
                           VALUE (*func)(ANYARGS), int argc)

There are two functions to define private/protected methods:

  void rb_define_private_method(VALUE klass, const char *name,
			        VALUE (*func)(), int argc)
  void rb_define_protected_method(VALUE klass, const char *name,
			          VALUE (*func)(), int argc)

At last, rb_define_module_function defines a module functions,
which are private AND singleton methods of the module.
For example, sqrt is the module function defined in Math module.
It can be called in the following way:

  Math.sqrt(4)

or

  include Math
  sqrt(4)

To define module functions, use:

  void rb_define_module_function(VALUE module, const char *name,
				 VALUE (*func)(), int argc)

In addition, function-like methods, which are private methods defined
in the Kernel module, can be defined using:

  void rb_define_global_function(const char *name, VALUE (*func)(), int argc)

To define an alias for the method,

  void rb_define_alias(VALUE module, const char* new, const char* old);

To define a reader/writer for an attribute,

  void rb_define_attr(VALUE klass, const char *name, int read, int write)

To define and undefine the `allocate' class method,

  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
  void rb_undef_alloc_func(VALUE klass);

func has to take the klass as the argument and return a newly
allocated instance.  This instance should be as empty as possible,
without any expensive (including external) resources.

=== Constant Definition

We have 2 functions to define constants:

  void rb_define_const(VALUE klass, const char *name, VALUE val)
  void rb_define_global_const(const char *name, VALUE val)

The former is to define a constant under specified class/module.  The
latter is to define a global constant.

== Use Ruby Features from C

There are several ways to invoke Ruby's features from C code.

=== Evaluate Ruby Programs in a String

The easiest way to use Ruby's functionality from a C program is to
evaluate the string as Ruby program.  This function will do the job:

  VALUE rb_eval_string(const char *str)

Evaluation is done under the current context, thus current local variables
of the innermost method (which is defined by Ruby) can be accessed.

Note that the evaluation can raise an exception. There is a safer
function:

  VALUE rb_eval_string_protect(const char *str, int *state)

It returns nil when an error occur. Moreover, *state is zero if str was
successfully evaluated, or nonzero otherwise.

=== ID or Symbol

You can invoke methods directly, without parsing the string.  First I
need to explain about ID.  ID is the integer number to represent
Ruby's identifiers such as variable names.  The Ruby data type
corresponding to ID is Symbol.  It can be accessed from Ruby in the
form:

  :Identifier

or

  :"any kind of string"

You can get the ID value from a string within C code by using

  rb_intern(const char *name)
  rb_intern_str(VALUE name)

You can retrieve ID from Ruby object (Symbol or String) given as an
argument by using

  rb_to_id(VALUE symbol)
  rb_check_id(volatile VALUE *name)
  rb_check_id_cstr(const char *name, long len, rb_encoding *enc)

These functions try to convert the argument to a String if it was not
a Symbol nor a String.  The second function stores the converted
result into *name, and returns 0 if the string is not a known symbol.
After this function returned a non-zero value, *name is always a
Symbol or a String, otherwise it is a String if the result is 0.
The third function takes NUL-terminated C string, not Ruby VALUE.

You can convert C ID to Ruby Symbol by using

  VALUE ID2SYM(ID id)

and to convert Ruby Symbol object to ID, use

  ID SYM2ID(VALUE symbol)

=== Invoke Ruby Method from C

To invoke methods directly, you can use the function below

  VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)

This function invokes a method on the recv, with the method name
specified by the symbol mid.

=== Accessing the Variables and Constants

You can access class variables and instance variables using access
functions.  Also, global variables can be shared between both
environments.  There's no way to access Ruby's local variables.

The functions to access/modify instance variables are below:

  VALUE rb_ivar_get(VALUE obj, ID id)
  VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)

id must be the symbol, which can be retrieved by rb_intern().

To access the constants of the class/module:

  VALUE rb_const_get(VALUE obj, ID id)

See also Constant Definition above.

= Information Sharing Between Ruby and C

=== Ruby Constants That C Can Be Accessed From C

As stated in section 1.3,
the following Ruby constants can be referred from C.

  Qtrue
  Qfalse

Boolean values.  Qfalse is false in C also (i.e. 0).

  Qnil

Ruby nil in C scope.

== Global Variables Shared Between C and Ruby

Information can be shared between the two environments using shared global
variables.  To define them, you can use functions listed below:

  void rb_define_variable(const char *name, VALUE *var)

This function defines the variable which is shared by both environments.
The value of the global variable pointed to by `var' can be accessed
through Ruby's global variable named `name'.

You can define read-only (from Ruby, of course) variables using the
function below.

  void rb_define_readonly_variable(const char *name, VALUE *var)

You can defined hooked variables.  The accessor functions (getter and
setter) are called on access to the hooked variables.

  void rb_define_hooked_variable(const char *name, VALUE *var,
				 VALUE (*getter)(), void (*setter)())

If you need to supply either setter or getter, just supply 0 for the
hook you don't need.  If both hooks are 0, rb_define_hooked_variable()
works just like rb_define_variable().

The prototypes of the getter and setter functions are as follows:

  VALUE (*getter)(ID id, VALUE *var);
  void (*setter)(VALUE val, ID id, VALUE *var);


Also you can define a Ruby global variable without a corresponding C
variable.  The value of the variable will be set/get only by hooks.

  void rb_define_virtual_variable(const char *name,
				  VALUE (*getter)(), void (*setter)())

The prototypes of the getter and setter functions are as follows:

  VALUE (*getter)(ID id);
  void (*setter)(VALUE val, ID id);


== Encapsulate C Data into a Ruby Object

To wrap and objectify a C pointer as a Ruby object (so called
DATA), use Data_Wrap_Struct().

  Data_Wrap_Struct(klass, mark, free, sval)

Data_Wrap_Struct() returns a created DATA object.  The klass argument
is the class for the DATA object.  The mark argument is the function
to mark Ruby objects pointed by this data.  The free argument is the
function to free the pointer allocation.  If this is -1, the pointer
will be just freed.  The functions mark and free will be called from
garbage collector.

These mark / free functions are invoked during GC execution.  No
object allocations are allowed during it, so do not allocate ruby
objects inside them.

You can allocate and wrap the structure in one step.

  Data_Make_Struct(klass, type, mark, free, sval)

This macro returns an allocated Data object, wrapping the pointer to
the structure, which is also allocated.  This macro works like:

  (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))

Arguments klass, mark, and free work like their counterparts in
Data_Wrap_Struct().  A pointer to the allocated structure will be
assigned to sval, which should be a pointer of the type specified.

To retrieve the C pointer from the Data object, use the macro
Data_Get_Struct().

  Data_Get_Struct(obj, type, sval)

A pointer to the structure will be assigned to the variable sval.

See the example below for details.

= Example - Creating dbm Extension

OK, here's the example of making an extension library.  This is the
extension to access DBMs.  The full source is included in the ext/
directory in the Ruby's source tree.

== Make the Directory

  % mkdir ext/dbm

Make a directory for the extension library under ext directory.

== Design the Library

You need to design the library features, before making it.

== Write the C Code

You need to write C code for your extension library.  If your library
has only one source file, choosing ``LIBRARY.c'' as a file name is
preferred.  On the other hand, in case your library has multiple source
files, avoid choosing ``LIBRARY.c'' for a file name.  It may conflict
with an intermediate file ``LIBRARY.o'' on some platforms.
Note that some functions in mkmf library described below generate
a file ``conftest.c'' for checking with compilation.  You shouldn't
choose ``conftest.c'' as a name of a source file.

Ruby will execute the initializing function named ``Init_LIBRARY'' in
the library.  For example, ``Init_dbm()'' will be executed when loading
the library.

Here's the example of an initializing function.

  void
  Init_dbm(void)
  {
      /* define DBM class */
      cDBM = rb_define_class("DBM", rb_cObject);
      /* DBM includes Enumerable module */
      rb_include_module(cDBM, rb_mEnumerable);

      /* DBM has class method open(): arguments are received as C array */
      rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);

      /* DBM instance method close(): no args */
      rb_define_method(cDBM, "close", fdbm_close, 0);
      /* DBM instance method []: 1 argument */
      rb_define_method(cDBM, "[]", fdbm_fetch, 1);

      /* ... */

      /* ID for a instance variable to store DBM data */
      id_dbm = rb_intern("dbm");
  }

The dbm extension wraps the dbm struct in the C environment using
Data_Make_Struct.

  struct dbmdata {
      int  di_size;
      DBM *di_dbm;
  };

  obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);

This code wraps the dbmdata structure into a Ruby object.  We avoid
wrapping DBM* directly, because we want to cache size information.

To retrieve the dbmdata structure from a Ruby object, we define the
following macro:

  #define GetDBM(obj, dbmp) {\
      Data_Get_Struct(obj, struct dbmdata, dbmp);\
      if (dbmp->di_dbm == 0) closed_dbm();\
  }

This sort of complicated macro does the retrieving and close checking for
the DBM.

There are three kinds of way to receive method arguments.  First,
methods with a fixed number of arguments receive arguments like this:

  static VALUE
  fdbm_delete(VALUE obj, VALUE keystr)
  {
        /* ... */
  }

The first argument of the C function is the self, the rest are the
arguments to the method.

Second, methods with an arbitrary number of arguments receive
arguments like this:

  static VALUE
  fdbm_s_open(int argc, VALUE *argv, VALUE klass)
  {
      /* ... */
      if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
          mode = 0666;		/* default value */
      }
      /* ... */
  }

The first argument is the number of method arguments, the second
argument is the C array of the method arguments, and the third
argument is the receiver of the method.

You can use the function rb_scan_args() to check and retrieve the
arguments.  The third argument is a string that specifies how to
capture method arguments and assign them to the following VALUE
references.


The following is an example of a method that takes arguments by Ruby's
array:

  static VALUE
  thread_initialize(VALUE thread, VALUE args)
  {
      /* ... */
  }

The first argument is the receiver, the second one is the Ruby array
which contains the arguments to the method.

*Notice*: GC should know about global variables which refer to Ruby's objects,
but are not exported to the Ruby world.  You need to protect them by

  void rb_global_variable(VALUE *var)

== Prepare extconf.rb

If the file named extconf.rb exists, it will be executed to generate
Makefile.

extconf.rb is the file for checking compilation conditions etc.  You
need to put

  require 'mkmf'

at the top of the file.  You can use the functions below to check
various conditions.

  have_macro(macro[, headers[, opt]]): check whether macro is defined
  have_library(lib[, func[, headers[, opt]]]): check whether library containing function exists
  find_library(lib[, func, *paths]): find library from paths
  have_func(func[, headers[, opt]): check whether function exists
  have_var(var[, headers[, opt]]): check whether variable exists
  have_header(header[, preheaders[, opt]]): check whether header file exists
  find_header(header, *paths): find header from paths
  have_framework(fw): check whether framework exists (for MacOS X)
  have_struct_member(type, member[, headers[, opt]]): check whether struct has member
  have_type(type[, headers[, opt]]): check whether type exists
  find_type(type, opt, *headers): check whether type exists in headers
  have_const(const[, headers[, opt]]): check whether constant is defined
  check_sizeof(type[, headers[, opts]]): check size of type
  check_signedness(type[, headers[, opts]]): check signedness of type
  convertible_int(type[, headers[, opts]]): find convertible integer type
  find_executable(bin[, path]): find excutable file path
  create_header(header): generate configured header
  create_makefile(target[, target_prefix]): generate Makefile

See MakeMakefile for full documentation of these functions.

The value of the variables below will affect the Makefile.

  $CFLAGS: included in CFLAGS make variable (such as -O)
  $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D)
  $LDFLAGS: included in LDFLAGS make variable (such as -L)
  $objs: list of object file names

Normally, the object files list is automatically generated by searching
source files, but you must define them explicitly if any sources will
be generated while building.

If a compilation condition is not fulfilled, you should not call
``create_makefile''.  The Makefile will not be generated, compilation will
not be done.

== Prepare Depend (Optional)

If the file named depend exists, Makefile will include that file to
check dependencies.  You can make this file by invoking

  % gcc -MM *.c > depend

It's harmless.  Prepare it.

== Generate Makefile

Try generating the Makefile by:

  ruby extconf.rb

If the library should be installed under vendor_ruby directory
instead of site_ruby directory, use --vendor option as follows.

  ruby extconf.rb --vendor

You don't need this step if you put the extension library under the ext
directory of the ruby source tree.  In that case, compilation of the
interpreter will do this step for you.

== Run make

Type

  make

to compile your extension.  You don't need this step either if you have
put the extension library under the ext directory of the ruby source tree.

== Debug

You may need to rb_debug the extension.  Extensions can be linked
statically by adding the directory name in the ext/Setup file so that
you can inspect the extension with the debugger.

== Done! Now You Have the Extension Library

You can do anything you want with your library.  The author of Ruby
will not claim any restrictions on your code depending on the Ruby API.
Feel free to use, modify, distribute or sell your program.

= Appendix A. Ruby Source Files Overview

== Ruby Language Core

class.c    :: classes and modules
error.c    :: exception classes and exception mechanism
gc.c       :: memory management
load.c     :: library loading
object.c   :: objects
variable.c :: variables and constants

== Ruby Syntax Parser

parse.y  :: grammar definition
parse.c  :: automatically generated from parse.y
keywords :: reserved keywords
lex.c    :: automatically generated from keywords

== Ruby Evaluator (a.k.a. YARV)

  compile.c
  eval.c
  eval_error.c
  eval_jump.c
  eval_safe.c
  insns.def           : definition of VM instructions
  iseq.c              : implementation of VM::ISeq
  thread.c            : thread management and context swiching
  thread_win32.c      : thread implementation
  thread_pthread.c    : ditto
  vm.c
  vm_dump.c
  vm_eval.c
  vm_exec.c
  vm_insnhelper.c
  vm_method.c

  opt_insns_unif.def  : instruction unification
  opt_operand.def     : definitions for optimization

    -> insn*.inc      : automatically generated
    -> opt*.inc       : automatically generated
    -> vm.inc         : automatically generated

== Regular Expression Engine (Oniguruma)

  regex.c
  regcomp.c
  regenc.c
  regerror.c
  regexec.c
  regparse.c
  regsyntax.c

== Utility Functions

debug.c    :: debug symbols for C debuggger
dln.c      :: dynamic loading
st.c       :: general purpose hash table
strftime.c :: formatting times
util.c     :: misc utilities

== Ruby Interpreter Implementation

  dmyext.c
  dmydln.c
  dmyencoding.c
  id.c
  inits.c
  main.c
  ruby.c
  version.c

  gem_prelude.rb
  prelude.rb

== Class Library

array.c      :: Array
bignum.c     :: Bignum
compar.c     :: Comparable
complex.c    :: Complex
cont.c       :: Fiber, Continuation
dir.c        :: Dir
enum.c       :: Enumerable
enumerator.c :: Enumerator
file.c       :: File
hash.c       :: Hash
io.c         :: IO
marshal.c    :: Marshal
math.c       :: Math
numeric.c    :: Numeric, Integer, Fixnum, Float
pack.c       :: Array#pack, String#unpack
proc.c       :: Binding, Proc
process.c    :: Process
random.c     :: random number
range.c      :: Range
rational.c   :: Rational
re.c         :: Regexp, MatchData
signal.c     :: Signal
sprintf.c    :: String#sprintf
string.c     :: String
struct.c     :: Struct
time.c       :: Time

defs/known_errors.def :: Errno::* exception classes
-> known_errors.inc   :: automatically generated

== Multilingualization

encoding.c  :: Encoding
transcode.c :: Encoding::Converter
enc/*.c     :: encoding classes
enc/trans/* :: codepoint mapping tables

== goruby Interpreter Implementation

  goruby.c
  golf_prelude.rb     : goruby specific libraries.
    -> golf_prelude.c : automatically generated


= Appendix B. Ruby Extension API Reference

== Types

VALUE ::

  The type for the Ruby object.  Actual structures are defined in ruby.h,
  such as struct RString, etc.  To refer the values in structures, use
  casting macros like RSTRING(obj).

== Variables and Constants

Qnil::
  nil object

Qtrue::
  true object (default true value)

Qfalse::
  false object

== C Pointer Wrapping

Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ::

  Wrap a C pointer into a Ruby object.  If object has references to other
  Ruby objects, they should be marked by using the mark function during
  the GC process.  Otherwise, mark should be 0.  When this object is no
  longer referred by anywhere, the pointer will be discarded by free
  function.

Data_Make_Struct(klass, type, mark, free, sval) ::

  This macro allocates memory using malloc(), assigns it to the variable
  sval, and returns the DATA encapsulating the pointer to memory region.

Data_Get_Struct(data, type, sval) ::

  This macro retrieves the pointer value from DATA, and assigns it to
  the variable sval.

== Checking Data Types

TYPE(value) ::

  Internal type (T_NIL, T_FIXNUM, etc.)

FIXNUM_P(value) ::

  Is +value+ a Fixnum?

NIL_P(value) ::

  Is +value+ nil?

void Check_Type(VALUE value, int type) ::

  Ensures +value+ is of the given internal +type+ or raises a TypeError

SaveStringValue(value) ::

  Checks that +value+ is a String and is not tainted

== Data Type Conversion

FIX2INT(value), INT2FIX(i) ::

  Fixnum <-> integer

FIX2LONG(value), LONG2FIX(l) ::

  Fixnum <-> long

NUM2INT(value), INT2NUM(i) ::

  Numeric <-> integer

NUM2UINT(value), UINT2NUM(ui) ::

  Numeric <-> unsigned integer

NUM2LONG(value), LONG2NUM(l) ::

  Numeric <-> long

NUM2ULONG(value), ULONG2NUM(ul) ::

  Numeric <-> unsigned long

NUM2LL(value), LL2NUM(ll) ::

  Numeric <-> long long

NUM2ULL(value), ULL2NUM(ull) ::

  Numeric <-> unsigned long long

NUM2OFFT(value), OFFT2NUM(off) ::

  Numeric <-> off_t

NUM2SIZET(value), SIZET2NUM(size) ::

  Numeric <-> size_t

NUM2SSIZET(value), SSIZET2NUM(ssize) ::

  Numeric <-> ssize_t

NUM2DBL(value) ::

  Numeric -> double

rb_float_new(f) ::

  double -> Float

StringValue(value) ::

  Object with #to_str -> String

StringValuePtr(value) ::

  Object with #to_str -> pointer to String data

StringValueCStr(value) ::

  Object with #to_str -> pointer to String data without NULL bytes

rb_str_new2(s) ::

  char * -> String

== Defining Class and Module

VALUE rb_define_class(const char *name, VALUE super) ::

  Defines a new Ruby class as a subclass of super.

VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ::

  Creates a new Ruby class as a subclass of super, under the module's
  namespace.

VALUE rb_define_module(const char *name) ::

  Defines a new Ruby module.

VALUE rb_define_module_under(VALUE module, const char *name) ::

  Defines a new Ruby module under the module's namespace.

void rb_include_module(VALUE klass, VALUE module) ::

  Includes module into class.  If class already includes it, just ignored.

void rb_extend_object(VALUE object, VALUE module) ::

  Extend the object with the module's attributes.

== Defining Global Variables

void rb_define_variable(const char *name, VALUE *var) ::

  Defines a global variable which is shared between C and Ruby.  If name
  contains a character which is not allowed to be part of the symbol,
  it can't be seen from Ruby programs.

void rb_define_readonly_variable(const char *name, VALUE *var) ::

  Defines a read-only global variable.  Works just like
  rb_define_variable(), except the defined variable is read-only.

void rb_define_virtual_variable(const char *name, VALUE (*getter)(), VALUE (*setter)()) ::

  Defines a virtual variable, whose behavior is defined by a pair of C
  functions.  The getter function is called when the variable is
  referenced.  The setter function is called when the variable is set to a
  value.  The prototype for getter/setter functions are:

    VALUE getter(ID id)
    void setter(VALUE val, ID id)

  The getter function must return the value for the access.

void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), VALUE (*setter)()) ::

  Defines hooked variable.  It's a virtual variable with a C variable.
  The getter is called as

    VALUE getter(ID id, VALUE *var)

  returning a new value.  The setter is called as

    void setter(VALUE val, ID id, VALUE *var)

  GC requires C global variables which hold Ruby values to be marked.

void rb_global_variable(VALUE *var)

  Tells GC to protect these variables.

== Constant Definition

void rb_define_const(VALUE klass, const char *name, VALUE val) ::

  Defines a new constant under the class/module.

void rb_define_global_const(const char *name, VALUE val) ::

  Defines a global constant.  This is just the same as

    rb_define_const(cKernal, name, val)

== Method Definition

rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  Defines a method for the class.  func is the function pointer.  argc
  is the number of arguments.  if argc is -1, the function will receive
  3 arguments: argc, argv, and self.  if argc is -2, the function will
  receive 2 arguments, self and args, where args is a Ruby array of
  the method arguments.

rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  Defines a private method for the class.  Arguments are same as
  rb_define_method().

rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  Defines a singleton method.  Arguments are same as rb_define_method().

rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::

  Retrieve argument from argc and argv to given VALUE references
  according to the format string.  The format can be described in ABNF
  as follows:

    scan-arg-spec  := param-arg-spec [option-hash-arg-spec] [block-arg-spec]

    param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec /
                      pre-opt-post-arg-spec
    pre-arg-spec   := num-of-leading-mandatory-args [num-of-optional-args]
    post-arg-spec  := sym-for-variable-length-args
                      [num-of-trailing-mandatory-args]
    pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args
                             num-of-trailing-mandatory-args
    option-hash-arg-spec := sym-for-option-hash-arg
    block-arg-spec := sym-for-block-arg

    num-of-leading-mandatory-args  := DIGIT ; The number of leading
                                            ; mandatory arguments
    num-of-optional-args           := DIGIT ; The number of optional
                                            ; arguments
    sym-for-variable-length-args   := "*"   ; Indicates that variable
                                            ; length arguments are
                                            ; captured as a ruby array
    num-of-trailing-mandatory-args := DIGIT ; The number of trailing
                                            ; mandatory arguments
    sym-for-option-hash-arg        := ":"   ; Indicates that an option
                                            ; hash is captured if the last
                                            ; argument is a hash or can be
                                            ; converted to a hash with
                                            ; #to_hash.  When the last
                                            ; argument is nil, it is
                                            ; captured if it is not
                                            ; ambiguous to take it as
                                            ; empty option hash; i.e. '*'
                                            ; is not specified and
                                            ; arguments are given more
                                            ; than sufficient.
    sym-for-block-arg              := "&"   ; Indicates that an iterator
                                            ; block should be captured if
                                            ; given

  For example, "12" means that the method requires at least one
  argument, and at most receives three (1+2) arguments.  So, the format
  string must be followed by three variable references, which are to be
  assigned to captured arguments.  For omitted arguments, variables are
  set to Qnil.  NULL can be put in place of a variable reference, which
  means the corresponding captured argument(s) should be just dropped.

  The number of given arguments, excluding an option hash or iterator
  block, is returned.

== Invoking Ruby method

VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ::

  Invokes a method.  To retrieve mid from a method name, use rb_intern().

VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ::

  Invokes a method, passing arguments by an array of values.

VALUE rb_eval_string(const char *str) ::

  Compiles and executes the string as a Ruby program.

ID rb_intern(const char *name) ::

  Returns ID corresponding to the name.

char *rb_id2name(ID id) ::

  Returns the name corresponding ID.

char *rb_class2name(VALUE klass) ::

  Returns the name of the class.

int rb_respond_to(VALUE object, ID id) ::

  Returns true if the object responds to the message specified by id.

== Instance Variables

VALUE rb_iv_get(VALUE obj, const char *name) ::

  Retrieve the value of the instance variable.  If the name is not
  prefixed by `@', that variable shall be inaccessible from Ruby.

VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) ::

  Sets the value of the instance variable.

== Control Structure

VALUE rb_block_call(VALUE recv, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ::

  Calls a method on the recv, with the method name specified by the
  symbol mid, with argc arguments in argv, supplying func as the
  block. When func is called as the block, it will receive the value
  from yield as the first argument, and data2 as the second argument.
  When yielded with multiple values (in C, rb_yield_values(),
  rb_yield_values2() and rb_yield_splat()), data2 is packed as an Array,
  whereas yielded values can be gotten via argc/argv of the third/fourth
  arguments.

[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2) ::

  Calls the function func1, supplying func2 as the block.  func1 will be
  called with the argument arg1.  func2 receives the value from yield as
  the first argument, arg2 as the second argument.

  When rb_iterate is used in 1.9, func1 has to call some Ruby-level method.
  This function is obsolete since 1.9; use rb_block_call instead.

VALUE rb_yield(VALUE val) ::

  Evaluates the block with value val.

VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  Calls the function func1, with arg1 as the argument.  If an exception
  occurs during func1, it calls func2 with arg2 as the argument.  The
  return value of rb_rescue() is the return value from func1 if no
  exception occurs, from func2 otherwise.

VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  Calls the function func1 with arg1 as the argument, then calls func2
  with arg2 if execution terminated.  The return value from
  rb_ensure() is that of func1 when no exception occured.

VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ::

  Calls the function func with arg as the argument.  If no exception
  occured during func, it returns the result of func and *state is zero.
  Otherwise, it returns Qnil and sets *state to nonzero.  If state is
  NULL, it is not set in both cases.
  You have to clear the error info with rb_set_errinfo(Qnil) when
  ignoring the caught exception.

void rb_jump_tag(int state) ::

  Continues the exception caught by rb_protect() and rb_eval_string_protect().
  state must be the returned value from those functions.  This function
  never return to the caller.

void rb_iter_break() ::

  Exits from the current innermost block.  This function never return to
  the caller.

void rb_iter_break_value(VALUE value) ::

  Exits from the current innermost block with the value.  The block will
  return the given argument value.  This function never return to the
  caller.

== Exceptions and Errodoc/alt-ruby20/LEGAL000064400000054677150403130000007766 0ustar00 the situation caused by the bug in the interpreter.  No
  exception handling nor ensure execution will be done.

Note: In the format string, %i is used for Object#to_s (or Object#inspect if
'+' flag is set) output (and related argument must be a VALUE).  For integers
in format strings, use %d.

== Initialize and Start the Interpreter

The embedding API functions are below (not needed for extension libraries):

void ruby_init() ::

  Initializes the interpreter.

void ruby_options(int argc, char **argv) ::

  Process command line arguments for the interpreter.

void ruby_run() ::

  Starts execution of the interpreter.

void ruby_script(char *name) ::

  Specifies the name of the script ($0).

== Hooks for the Interpreter Events

  void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events,
                         VALUE data)

Adds a hook function for the specified interpreter events.
events should be OR'ed value of:

  RUBY_EVENT_LINE
  RUBY_EVENT_CLASS
  RUBY_EVENT_END
  RUBY_EVENT_CALL
  RUBY_EVENT_RETURN
  RUBY_EVENT_C_CALL
  RUBY_EVENT_C_RETURN
  RUBY_EVENT_RAISE
  RUBY_EVENT_ALL

The definition of rb_event_hook_func_t is below:

  typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
                                       VALUE self, ID id, VALUE klass)

The third argument `data' to rb_add_event_hook() is passed to the hook
function as the second argument, which was the pointer to the current
NODE in 1.8.  See RB_EVENT_HOOKS_HAVE_CALLBACK_DATA below.

  int rb_remove_event_hook(rb_event_hook_func_t func)

Removes the specified hook function.

== Macros for Compatibility

Some macros to check API compatibilities are available by default.

NORETURN_STYLE_NEW ::

  Means that NORETURN macro is functional style instead of prefix.

HAVE_RB_DEFINE_ALLOC_FUNC ::

  Means that function rb_define_alloc_func() is provided, that means the
  allocation framework is used.  This is same as the result of
  have_func("rb_define_alloc_func", "ruby.h").

HAVE_RB_REG_NEW_STR ::

  Means that function rb_reg_new_str() is provided, that creates Regexp
  object from String object.  This is same as the result of
  have_func("rb_reg_new_str", "ruby.h").

HAVE_RB_IO_T ::

  Means that type rb_io_t is provided.

USE_SYMBOL_AS_METHOD_NAME ::

  Means that Symbols will be returned as method names, e.g.,
  Module#methods, #singleton_methods and so on.

HAVE_RUBY_*_H ::

  Defined in ruby.h and means corresponding header is available.  For
  instance, when HAVE_RUBY_ST_H is defined you should use ruby/st.h not
  mere st.h.

RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::

  Means that rb_add_event_hook() takes the third argument `data', to be
  passed to the given event hook function.

/*
 * Local variables:
 * fill-column: 70
 * end:
 */
doc/alt-ruby20/LEGAL000064400000054677150403130000007766 0ustar00LEGAL NOTICE INFORMATION
------------------------

All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.

include/ruby/oniguruma.h:
regcomp.c:
regenc.[ch]:
regerror.c:
regexec.c:
regint.h:
regparse.[ch]:
enc/ascii.c
enc/big5.c
enc/cp949.c
enc/emacs_mule.c
enc/encdb.c
enc/euc_jp.c
enc/euc_kr.c
enc/euc_tw.c
enc/gb18030.c
enc/gb2312.c
enc/gbk.c
enc/iso_8859_1.c
enc/iso_8859_10.c
enc/iso_8859_11.c
enc/iso_8859_13.c
enc/iso_8859_14.c
enc/iso_8859_15.c
enc/iso_8859_16.c
enc/iso_8859_2.c
enc/iso_8859_3.c
enc/iso_8859_4.c
enc/iso_8859_5.c
enc/iso_8859_6.c
enc/iso_8859_7.c
enc/iso_8859_8.c
enc/iso_8859_9.c
enc/koi8_r.c
enc/koi8_u.c
enc/shift_jis.c
enc/unicode.c
enc/us_ascii.c
enc/utf_16be.c
enc/utf_16le.c
enc/utf_32be.c
enc/utf_32le.c
enc/utf_8.c
enc/windows_1251.c

Oniguruma  ----   (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>

http://www.geocities.jp/kosako3/oniguruma/
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/oniguruma/
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/

   When this software is partly used or it is distributed with Ruby, 
   this of Ruby follows the license of Ruby.

configure:

  This file is free software.

    Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.

    This configure script is free software; the Free Software Foundation
    gives unlimited permission to copy, distribute and modify it.

tool/config.guess:
tool/config.sub:

  As long as you distribute these files with the file configure, they
  are covered under the Ruby's license.

      Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
      Free Software Foundation, Inc.

    This file is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

    As a special exception to the GNU General Public License, if you
    distribute this file as part of a program that contains a
    configuration script generated by Autoconf, you may include it under
    the same distribution terms that you use for the rest of that program.

parse.c:

  This file is licensed under the GPL, but is incorporated into Ruby and 
  redistributed under the terms of the Ruby license, as permitted by the
  exception to the GPL below.

     Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
     Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2, or (at your option)
     any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor,
     Boston, MA 02110-1301, USA.  */

  /* As a special exception, you may create a larger work that contains
     part or all of the Bison parser skeleton and distribute that work
     under terms of your choice, so long as that work isn't itself a
     parser generator using the skeleton or a modified version thereof
     as a parser skeleton.  Alternatively, if you modify or redistribute
     the parser skeleton itself, you may (at your option) remove this
     special exception, which will cause the skeleton and the resulting
     Bison output files to be licensed under the GNU General Public
     License without this special exception.

     This special exception was added by the Free Software Foundation in
     version 2.2 of Bison.  */

util.c (partly):

    Copyright (c) 1991, 2000, 2001 by Lucent Technologies.

    Permission to use, copy, modify, and distribute this software for any
    purpose without fee is hereby granted, provided that this entire notice
    is included in all copies of any software which is or includes a copy
    or modification of this software and in all copies of the sdoc/alt-ruby20/LEGAL000064400000054677150403130000007766 0ustar00 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.

random.c

  This file is under the new-style BSD license.

    A C-program for MT19937, with initialization improved 2002/2/10.
    Coded by Takuji Nishimura and Makoto Matsumoto.
    This is a faster version by taking Shawn Cokus's optimization,
    Matthe Bellew's simplification, Isaku Wada's real version.

    Before using, initialize the state by using init_genrand(seed) 
    or init_by_array(init_key, key_length).

    Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
    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.

      3. The names of its contributors may not be used to endorse or promote 
	 products derived from this software without specific prior written 
	 permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.


    Any feedback is very welcome.
    http://www.math.keio.ac.jp/matumoto/emt.html
    email: matumoto@math.keio.ac.jp

vsnprintf.c:

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

    Copyright (c) 1990, 1993
         The Regents of the University of California.  All rights reserved.

    This code is derived from software contributed to Berkeley by
    Chris Torek.

    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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

    IMPORTANT NOTE:
    --------------
    From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
    paragraph 3 above is now null and void.

st.[ch]:
missing/alloca.c:
missing/dup2.c:
missing/erf.c:
missing/finite.c:
missing/hypot.c:
missing/isinf.c:
missing/isnan.c:
missing/lgamma_r.c:
missing/memcmp.c:
missing/memmove.c:
missing/strchr.c:
missing/strstr.c:
missing/strtol.c:
missing/tgamma.c:
ext/digest/sha1/sha1.[ch]:

  These files are all under public domain.

missing/crypt.c:

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

    Copyright (c) 1989, 1993
    	The Regents of the University of California.  All rights reserved.

    This code is derived from software contributed to Berkeley by
    Tom Truscott.

    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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

missing/setproctitle.c

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

    Copyright 2003 Damien Miller
    Copyright (c) 1983, 1995-1997 Eric P. Allman
    Copyright (c) 1988, 1993
    	The Regents of the University of California.  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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

missing/strlcat.c
missing/strlcpy.c

  These files are under the new-style BSD license.

   Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
   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.
   3. The name of the author may not be used to endorse or promote products
      derived from this software without specific prior written permission.

   THIS SOFTWARE IS PROVIDED ``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 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.

missing/langinfo.c

  This file is from http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c.
  Ruby uses a modified version. The file contains the following
  author/copyright notice:

  Markus.Kuhn@cl.cam.ac.uk -- 2002-03-11
  Permission to use, copy, modify, and distribute this software
  for any purpose and without fee is hereby granted. The author
  disclaims all warranties with regard to this software.

ext/digest/md5/md5.[ch]:

  These files are under the following license.  Ruby uses modified
  versions of them.

    Copyright (C) 1999, 2000 Aladdin Enterprises.  All rights reserved.

    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any damages
    arising from the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
       claim that you wrote the original software. If you use this software
       in a product, an acknowledgment in the product documentation would be
       appreciated but is not required.
    2. Altered source versions must be plainly marked as such, and must not be
       misrepresented as being the original software.
    3. This notice may not be removed or altered from any source distribution.

    L. Peter Deutsch
    ghost@aladdin.com

ext/digest/rmd160/rmd160.[ch]:

  These files have the following copyright information, and by the
  author we are allowed to use it under the new-style BSD license.

    AUTHOR:   Antoon Bosselaers, ESAT-COSIC
              (Arranged for libc by Todd C. Miller)
    DATE:     1 March 1996

    Copyright (c) Katholieke Universiteit Leuven
    1996, All Rights Reserved

ext/digest/sha2/sha2.[ch]:

  These files are under the new-style BSD license.

    Copyright 2000 Aaron D. Gifford.  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.
    3. Neither the name of the copyright holder nor the names of contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMdoc/alt-ruby20/README.EXT.ja000064400000167474150403130010011130 0ustar00EVEN IF ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGE.

ext/nkf/nkf-utf8/config.h:
ext/nkf/nkf-utf8/nkf.c:
ext/nkf/nkf-utf8/utf8tbl.c:

  These files are under the following license.  So to speak, it is
  copyrighted semi-public-domain software.

    Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
       Everyone is permitted to do anything on this program 
       including copying, modifying, improving,
       as long as you don't try to pretend that you wrote it.
       i.e., the above copyright notice has to appear in all copies.
       Binary distribution requires original version messages.
       You don't have to ask before copying, redistribution or publishing.
       THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.

ext/socket/addrinfo.h:
ext/socket/getaddrinfo.c:
ext/socket/getnameinfo.c:

  These files are under the new-style BSD license.

    Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
    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.
    3. Neither the name of the project nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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.

ext/win32ole/win32ole.c:

  You can apply the Artistic License to this file. (or GPL,
  alternatively)

    (c) 1995 Microsoft Corporation. All rights reserved.
    Developed by ActiveWare Internet Corp., http://www.ActiveWare.com

    Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
    <gsar@umich.edu> and Jan Dubois <jan.dubois@ibm.net>
 
    You may distribute under the terms of either the GNU General Public
    License or the Artistic License, as specified in the README file
    of the Perl distribution.
doc/alt-ruby20/README.EXT.ja000064400000167474150403130010011130 0ustar00# README.EXT.ja -  -*- RDoc -*- created at: Mon Aug  7 16:45:54 JST 1995

Rubyの拡張ライブラリの作り方を説明します.

= 基礎知識

Cの変数には型があり,データには型がありません.ですから,た
とえばポインタをintの変数に代入すると,その値は整数として取
り扱われます.逆にRubyの変数には型がなく,データに型がありま
す.この違いのため,CとRubyは相互に変換しなければ,お互いの
データをアクセスできません.

RubyのデータはVALUEというCの型で表現されます.VALUE型のデー
タはそのデータタイプを自分で知っています.このデータタイプと
いうのはデータ(オブジェクト)の実際の構造を意味していて,Ruby
のクラスとはまた違ったものです.

VALUEからCにとって意味のあるデータを取り出すためには

1. VALUEのデータタイプを知る
2. VALUEをCのデータに変換する

の両方が必要です.(1)を忘れると間違ったデータの変換が行われ
て,最悪プログラムがcore dumpします.

== データタイプ

Rubyにはユーザが使う可能性のある以下のタイプがあります.

T_NIL      :: nil
T_OBJECT   :: 通常のオブジェクト
T_CLASS    :: クラス
T_MODULE   :: モジュール
T_FLOAT    :: 浮動小数点数
T_STRING   :: 文字列
T_REGEXP   :: 正規表現
T_ARRAY    :: 配列
T_HASH     :: 連想配列
T_STRUCT   :: (Rubyの)構造体
T_BIGNUM   :: 多倍長整数
T_FIXNUM   :: Fixnum(31bitまたは63bit長整数)
T_COMPLEX  :: 複素数
T_RATIONAL :: 有理数
T_FILE     :: 入出力
T_TRUE     :: 真
T_FALSE    :: 偽
T_DATA     :: データ
T_SYMBOL   :: シンボル

その他に内部で利用されている以下のタイプがあります.

  T_ICLASS
  T_MATCH
  T_UNDEF
  T_NODE
  T_ZOMBIE

ほとんどのタイプはCの構造体で実装されています.

== VALUEのデータタイプをチェックする

ruby.hではTYPE()というマクロが定義されていて,VALUEのデータ
タイプを知ることが出来ます.TYPE()マクロは上で紹介したT_XXXX
の形式の定数を返します.VALUEのデータタイプに応じて処理する
場合には,TYPE()の値で分岐することになります.

  switch (TYPE(obj)) {
    case T_FIXNUM:
      /* FIXNUMの処理 */
      break;
    case T_STRING:
      /* 文字列の処理 */
      break;
    case T_ARRAY:
      /* 配列の処理 */
      break;
    default:
      /* 例外を発生させる */
      rb_raise(rb_eTypeError, "not valid value");
      break;
  }

それとデータタイプをチェックして,正しくなければ例外を発生す
る関数が用意されています.

  void Check_Type(VALUE value, int type)

この関数はvalueがtypeで無ければ,例外を発生させます.引数と
して与えられたVALUEのデータタイプが正しいかどうかチェックす
るためには,この関数を使います.

FIXNUMとNILに関してはより高速な判別マクロが用意されています.

  FIXNUM_P(obj)
  NIL_P(obj)

== VALUEをCのデータに変換する

データタイプがT_NIL,T_FALSE,T_TRUEである時,データはそれぞ
れnil,false,trueです.このデータタイプのオブジェクトはひと
つずつしか存在しません.

データタイプがT_FIXNUMの時,これは31bitまたは63bitのサイズを
持つ整数です.longのサイズが32bitのプラットフォームであれば
31bitに,longのサイズが64bitのプラットフォームであれば63bit
になります. FIXNUM を C の整数に変換するためにはマクロ
「FIX2INT()」または「FIX2LONG()」を使います.これらのマクロ
を使用する際には事前にデータタイプがFIXNUMであることを確認す
る必要がありますが,比較的高速に変換を行うことができます.ま
た,「FIX2LONG()」は例外を発生しませんが,「FIX2INT()」は変
換結果がintのサイズに収まらない場合には例外を発生します.
それから,FIXNUMに限らずRubyのデータを整数に変換する
「NUM2INT()」および「NUM2LONG()」というマクロがあります.こ
れらのマクロはデータタイプのチェック無しで使えます
(整数に変換できない場合には例外が発生する).同様にチェック無
で使える変換マクロはdoubleを取り出す「NUM2DBL()」があります.

char* を取り出す場合, StringValue() と StringValuePtr()
を使います.
StringValue(var) は var が String
であれば何もせず,そうでなければ var を var.to_str() の結果
に置き換えるマクロ,StringValuePtr(var) は同様に var を
String に置き換えてから var のバイト列表現に対する char* を
返すマクロです.var の内容を直接置き換える処理が入るので,
var は lvalue �doc/alt-ruby20/README.EXT.ja000064400000167474150403130010011130 0ustar00�外のデータタイプは対応するCの構造体があります.対応す
る構造体のあるVALUEはそのままキャスト(型変換)すれば構造体の
ポインタに変換できます.

構造体は「struct RXxxxx」という名前でruby.hで定義されていま
す.例えば文字列は「struct RString」です.実際に使う可能性が
あるのは文字列と配列くらいだと思います.

ruby.hでは構造体へキャストするマクロも「RXXXXX()」(全部大文
字にしたもの)という名前で提供されています(例: RSTRING()).

構造体からデータを取り出すマクロが提供されています.文字列
strの長さを得るためには「RSTRING_LEN(str)」とし,文字列strを
char*として得るためには「RSTRING_PTR(str)」とします.配列の
場合には,それぞれ「RARRAY_LEN(ary)」,「RARRAY_PTR(ary)」と
なります.

Rubyの構造体を直接アクセスする時に気をつけなければならないこ
とは,配列や文字列の構造体の中身は参照するだけで,直接変更し
ないことです.直接変更した場合,オブジェクトの内容の整合性が
とれなくなって,思わぬバグの原因になります.

== CのデータをVALUEに変換する

VALUEの実際の構造は

FIXNUMの場合 ::

  1bit左シフトして,LSBを立てる.

その他のポインタの場合 ::

  そのままVALUEにキャストする.

となっています.よって,LSBをチェックすればVALUEがFIXNUMかど
うかわかるわけです(ポインタのLSBが立っていないことを仮定して
いる).

ですから,FIXNUM以外のRubyのオブジェクトの構造体は単にVALUE
にキャストするだけでVALUEに変換出来ます.ただし,任意の構造
体がVALUEにキャスト出来るわけではありません.キャストするの
はRubyの知っている構造体(ruby.hで定義されているstruct RXxxx
のもの)だけです.

FIXNUMに関しては変換マクロを経由する必要があります.Cの整数
からVALUEに変換するマクロは以下のものがあります.必要に応じ
て使い分けてください.

INT2FIX() :: もとの整数が31bitまたは63bit以内に収まる自信
      	     がある時
INT2NUM() :: 任意の整数からVALUEへ

INT2NUM()は整数がFIXNUMの範囲に収まらない場合,Bignumに変換
してくれます(が,少し遅い).

== Rubyのデータを操作する

先程も述べた通り,Rubyの構造体をアクセスする時に内容の更新を
行うことは勧められません.で,Rubyのデータを操作する時には
Rubyが用意している関数を用いてください.

ここではもっとも使われるであろう文字列と配列の生成/操作を行
い関数をあげます(全部ではないです).

=== 文字列に対する関数

rb_str_new(const char *ptr, long len) ::

  新しいRubyの文字列を生成する.

rb_str_new2(const char *ptr)
rb_str_new_cstr(const char *ptr)

  Cの文字列からRubyの文字列を生成する.この関数の機能は
  rb_str_new(ptr, strlen(ptr))と同等である.

rb_tainted_str_new(const char *ptr, long len)

  汚染マークが付加された新しいRubyの文字列を生成する.外部
  からのデータに基づく文字列には汚染マークが付加されるべき
  である.

rb_tainted_str_new2(const char *ptr)
rb_tainted_str_new_cstr(const char *ptr)

  Cの文字列から汚染マークが付加されたRubyの文字列を生成する.

rb_sprintf(const char *format, ...)
rb_vsprintf(const char *format, va_list ap)

  Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
  整形し,Rubyの文字列を生成する.

  注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を
  使ったVALUEの出力に使用されているため,整数には%dを使用すること.

rb_str_cat(VALUE str, const char *ptr, long len)

  Rubyの文字列strにlenバイトの文字列ptrを追加する.

rb_str_cat2(VALUE str, const char* ptr)

  Rubyの文字列strにCの文字列ptrを追加する.この関数の機能は
  rb_str_cat(str, ptr, strlen(ptr))と同等である.

rb_str_catf(VALUE str, const char* format, ...)
rb_str_vcatf(VALUE str, const char* format, va_list ap)

  Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
  整形し,Rubyの文字列strに追加する.この関数の機能は,それぞれ
  rb_str_cat2(str, rb_sprintf(format, ...)) や
  rb_str_cat2(str, rb_vsprintf(format, ap)) と同等である.

rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)

  指定されたエンコーディングでRubyの文字列を生成する.

rb_usascii_str_new(const char *ptr, long len)
rb_usascii_str_new_cstr(const char *ptr)

  エンコーディングがUS-ASCIIのRubyの文字列を生成する.

rb_str_resize(VALUE str, long len)

  Rubyの文字列のサイズをlenバイトに変更する.strの長さは前
  以てセットされていなければならない.lenが元の長さよりも短
  い時は,lenバイトを越えた部分の内容は捨てられる.lenが元
  の長さよりも長い時は,元の長さを越えた部分の内容は保存さ
  れないでゴミになるだろう.この関数の呼び出しによって
  RSTRING_PTR(str)が変更されるかもしれないことに注意.

rb_str_set_len(VALUE str, long len)

  Rubyの文字列のサイズをlenバイトにセットする.strが変更可
  能でなければ例外が発生する.RSTRING_LEN(str)とは無関係に,
  lenバイトまでの内容は保存される.lenはstrの容量を越えてい
  てはならない.


== 配列に対する関数

rb_ary_new()

  要素が0の配列を生成する.

rb_ary_new2(long len)

  要素が0の配列を生成する.len要素分の領域をあらかじめ割り
  当てておく.

rb_ary_new3(long n, ...)

  引数で指定したn要素を含む配列を生成する.

rb_ary_new4(long n, VALUE *elts)

  配列で与えたn要素の配列を生成する.

rb_ary_to_ary(VALUE obj)

  オブジェクトを配列に変換する.
  Object#to_aryと同等である.

他にも配列を操作する関数が多数ある. これらは
引数aryに配列を渡さなければならない. さもないと
コアを吐く.

rb_ary_aref(argc, VALUE *argv, VALUE ary)

  Array#[]と同等.

rb_ary_entry(VALUE ary, long offset)

  ary[offset]

rb_ary_subseq(VALUE ary, long beg, long len)

  ary[beg, len]

rb_ary_push(VALUE ary, VALUE val)
rb_ary_pop(VALUE ary)
rb_ary_shift(VALUE ary)
rb_ary_unshift(VALUE ary, VALUE val)

rb_ary_cat(VALUE ary, const VALUE *ptr, long len)

  配列aryにptrからlen個のオブジェクトを追加する.

= Rubyの機能を使う

原理的にRubyで書けることはCでも書けます.RubyそのものがCで記
述されているんですから,当然といえば当然なんですけど.ここで
はRubyの拡張に使うことが多いだろうと予測される機能を中心に紹
介します.

== Rubyに機能を追加する

Rubyで提供されている関数を使えばRubyインタプリタに新しい機能
を追加することができます.Rubyでは以下の機能を追加する関数が
提供されています.

* クラス,モジュール
* メソッド,特異メソッドなど
* 定数

では順に紹介します.

=== クラス/モジュール定義

クラスやモジュールを定義するためには,以下の関数を使います.

  VALUE rb_define_class(const char *name, VALUE super)
  VALUE rb_define_module(const char *name)

これらの関数は新しく定義されたクラスやモジュールを返します.
メソッドや定数の定義にこれらの値が必要なので,ほとんどの場合
は戻り値を変数に格納しておく必要があるでしょう.

クラスやモジュールを他のクラスの内部にネストして定義する時に
は以下の関数を使います.

  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
  VALUE rb_define_module_under(VALUE outer, const char *name)

=== メソッド/特異メソッド定義

メソッドや特異メソッドを定義するには以下の関数を使います.

  void rb_define_method(VALUE klass, const char *name,
                        VALUE (*func)(), int argc)

  void rb_define_singleton_method(VALUE object, const char *name,
                                  VALUE (*func)(), int argc)


念のため説明すると「特異メソッド」とは,その特定のオブジェク
トに対してだけ有効なメソッドです.RubyではよくSmalltalkにお
けるクラスメソッドとして,クラスに対する特異メソッドが使われ
ます.

これらの関数の argcという引数はCの関数へ渡される引数の数(と
形式)を決めます.argcが0以上の時は関数に引き渡す引数の数を意
味します.16個以上の引数は使えません(が,要りませんよね,そ
んなに).実際の関数には先頭の引数としてselfが与えられますの
で,指定した数より1多い引数を持つことになります.

argcが負の時は引数の数ではなく,形式を指定したことになります.
argcが-1の時は引数を配列に入れて渡されます.argcが-2の時は引
数はRubyの配列として渡されます.

メソッドを定義する関数はまだいくつかあります. ひとつはメソッド
名としてIDを取ります. IDについては2.2.2を参照.

  void rb_define_method_id(VALUE klass, ID name,
                           VALUE (*func)(ANYARGS), int argc)

private/protectedなメソッドを定義するふたつの関数があります.

  void rb_define_private_method(VALUE klass, const char *name,
				VALUE (*func)(), int argc)
  void rb_define_protected_method(VALUE klass, const char *name,
			          VALUE (*func)(), int argc)

privateメソッドとは関数形式でしか呼び出すことの出来ないメソッ
ドです.

最後に, rb_define_module関数はモジュール関数を定義します.
モジュール関数とはモジュールの特異メソッドであり,同時に
privateメソッドでもあるものです.例をあげるとMathモジュール
のsqrt()などがあげられます.このメソッドは

  Math.sqrt(4)

という形式でも

  include Math
  sqrt(4)

という形式でも使えます.モジュール関数を定義する関数は以下の
通りです.

  void rb_define_module_function(VALUE module, const char *name,
		                 VALUE (*func)(), int argc)

関数的メソッド(Kernelモジュールのprivate method)を定義するた
めの関数は以下の通りです.

  void rb_define_global_function(const char *name, VALUE (*func)(), int argc)


メソッドの別名を定義するための関数は以下の通りです.

  void rb_define_alias(VALUE module, const char* new, const char* old);

属性の取得・設定メソッドを定義するには

  void rb_define_attr(VALUE klass, const char *name, int read, int write)

クラスメソッドallocateを定義したり削除したりするための関数は
以下の通りです.

  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
  void rb_undef_alloc_func(VALUE klass);

funcはクラスを引数として受け取って,新しく割り当てられたイン
スタンスを返さなくてはなりません.このインスタンスは,外部リ
ソースなどを含まない,できるだけ「空」のままにしておいたほう
がよいでしょう.

=== 定数定義

拡張ライブラリが必要な定数はあらかじめ定義しておいた方が良い
でしょう.定数を定義する関数は二つあります.

  void rb_define_const(VALUE klass, const char *name, VALUE val)
  void rb_define_global_const(const char *name, VALUE val)

前者は特定のクラス/モジュールに属する定数を定義するもの,後
者はグローバルな定数を定義するものです.

== Rubyの機能をCから呼び出す

既に『1.5 Rubyのデータを操作する』で一部紹介したような関数を
使えば,Rubyの機能を実現している関数を直接呼び出すことが出来
ます.

# このような関数の一覧表はいまのところありません.ソースを見
# るしかないですね.

それ以外にもRubyの機能を呼び出す方法はいくつかあります.

=== Rubyのプログラムをevalする

CからRubyの機能を呼び出すもっとも簡単な方法として,文字列で
与えられたRubyのプログラムを評価する以下の関数があります.

  VALUE rb_eval_string(const char *str)

この評価は現在の環境で行われます.つまり,現在のローカル変数
などを受け継ぎます.

評価は例外を発生するかもしれないことに注意しましょう. より安全
な関数もあります.

  VALUE rb_eval_string_protect(const char *str, int *state)

この関数はエラーが発生するとnilを返します.そして,成功時には
*stateはゼロに,さもなくば非ゼロになります.

=== IDまたはシンボル

Cから文字列を経由せずにRubyのメソッドを呼び出すこともできま
す.その前に,Rubyインタプリタ内でメソッドや変数名を指定する
時に使われているIDについて説明しておきましょう.

IDとは変数名,メソッド名を表す整数です.Rubyの中では

 :識別子

または

 :"任意の文字列"

でアクセスできます.Cからこの整数を得るためには関数

  rb_intern(const char *name)
  rb_intern_str(VALUE name)

を使います.Rubyから引数として与えられたシンボル(または文字
列)をIDに変換するには以下の関数を使います.

  rb_to_id(VALUE symbol)
  rb_check_id(volatile VALUE *name)
  rb_check_id_cstr(const char *name, long len, rb_encoding *enc)

もし引数がシンボルでも文字列でもなければ、to_strメソッドで文
字列に変換しようとします.第二の関数はその変換結果を*nameに保
存し,その名前が既知のシンボルでない場合は0を返します.この関
数が0以外を返した場合は*nameは常にシンボルか文字列であり、0を
返した場合は常に文字列です.第三の関数はRubyの文字列ではなく
NUL終端されたCの文字列を使います.

=== CからRubyのメソッドを呼び出す

Cから文字列を経由せずにRubyのメソッドを呼び出すためには以下
の関数を使います.

  VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)

この関数はオブジェクトrecvのmidで指定されるメソッドを呼び出
します.その他に引数の指定の仕方が違う以下の関数もあります.

  VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
  VALUE rb_apply(VALUE recv, ID mid, VALUE args)

applyには引数としてRubyの配列を与えます.

=== 変数/定数を参照/更新する

Cから関数を使って参照・更新できるのは,定数,インスタンス変
数です.大域変数は一部のものはCの大域変数としてアクセスでき
ます.ローカル変数を参照する方法は公開していません.

オブジェクトのインスタンス変数を参照・更新する関数は以下の通
りです.

  VALUE rb_ivar_get(VALUE obj, ID id)
  VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)

idはrb_intern()で得られるものを使ってください.

定数を参照するには以下の関数を使ってください.

  VALUE rb_const_get(VALUE obj, ID id)

定数を新しく定義するためには『2.1.3 定数定義』で紹介さ
れている関数を使ってください.

= RubyとCとの情報共有

C言語とRubyの間で情報を共有する方法について解説します.

== Cから参照できるRubyの定数

以下のRubyの定数はCのレベルから参照できます.

  Qtrue
  Qfalse

真偽値.QfalseはC言語でも偽とみなされます(つまり0).

  Qnil

C言語から見た「nil」.

== CとRubyで共有される大域変数

CとRubyで大域変数を使って情報を共有できます.共有できる大域
変数にはいくつかの種類があります.そのなかでもっとも良く使わ
れると思われるのはrb_define_variable()です.

  void rb_define_variable(const char *name, VALUE *var)

この関数はRubyとCとで共有する大域変数を定義します.変数名が
`$'で始まらない時には自動的に追加されます.この変数の値を変
更すると自動的にRubyの対応する変数の値も変わります.

またRuby側からは更新できない変数もあります.このread onlyの
変数は以下の関数で定義します.

  void rb_define_readonly_variable(const char *name, VALUE *var)

これら変数の他にhookをつけた大域変数を定義できます.hook付き
の大域変数は以下の関数を用いて定義します.hook付き大域変数の
値の参照や設定はhookで行う必要があります.

  void rb_define_hooked_variable(const char *name, VALUE *var,
				 VALUE (*getter)(), void (*setter)())

この関数はCの関数によってhookのつけられた大域変数を定義しま
す.変数が参照された時には関数getterが,変数に値がセットされ
た時には関数setterが呼ばれる.hookを指定しない場合はgetterや
setterに0を指定します.
# getterもsetterも0ならばrb_define_variable()と同じになる.

getterとsetterの仕様は次の通りです.

  VALUE (*getter)(ID id, VALUE *var);
  void (*setter)(VALUE val, ID id, VALUE *var);


それから,対応するCの変数を持たないRubyの大域変数を定義する
こともできます. その変数の値はフック関数のみによって取得・設定
されます.

  void rb_define_virtual_variable(const char *name,
				  VALUE (*getter)(), void (*setter)())

この関数によって定義されたRubyの大域変数が参照された時には
getterが,変数に値がセットされた時にはsetterが呼ばれます.

getterとsetterの仕様は以下の通りです.

  (*getter)(ID id);
  (*setter)(VALUE val, ID id);

== CのデータをRubyオブジェクトにする

Cの世界で定義されたデータ(構造体)をRubyのオブジェクトとして
取り扱いたい場合がありえます.このような場合には,Dataという
RubyオブジェクトにCの構造体(へのポインタ)をくるむことでRuby
オブジェクトとして取り扱えるようになります.

Dataオブジェクトを生成して構造体をRubyオブジェクトにカプセル
化するためには,以下のマクロを使います.

  Data_Wrap_Struct(klass, mark, free, sval)

このマクロの戻り値は生成されたDataオブジェクトです.

klassはこのDataオブジェクトのクラスです.markはこの構造体が
Rubyのオブジェクトへの参照がある時に使う関数です.そのような
参照を含まない時には0を指定します.

# そのような参照は勧められません.

freeはこの構造体がもう不要になった時に呼ばれる関数です.この
関数がガーベージコレクタから呼ばれます.これが-1の場合は,単
純に開放されます.

markおよびfree関数はGC実行中に呼び出されます.
なお, GC実行中はRubyオブジェクトのアロケーションは禁止されま
す. よって, markおよびfree関数でRubyオブジェクトのアロケーシ
ョンは行わないでください.

Cの構造体の割当とDataオブジェクトの生成を同時に行うマクロと
して以下のものが提供されています.

  Data_Make_Struct(klass, type, mark, free, sval)

このマクロの戻り値は生成されたDataオブジェクトです.このマク
ロは以下の式のように働きます:

  (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))

klass, mark, freeはData_Wrap_Structと同じ働きをします.type
は割り当てるC構造体の型です.割り当てられた構造体は変数sval
に代入されます.この変数の型は (type*) である必要があります.

Dataオブジェクトからポインタを取り出すのは以下のマクロを用い
ます.

  Data_Get_Struct(obj, type, sval)

Cの構造体へのポインタは変数svalに代入されます.

これらのDataの使い方はちょっと分かりにくいので,後で説明する
例題を参照してください.

= 例題 - dbmパッケージを作る

ここまでの説明でとりあえず拡張ライブラリは作れるはずです.
Rubyのextディレクトリにすでに含まれているdbmライブラリを例に
して段階的に説明します.

== ディレクトリを作る

  % mkdir ext/dbm

Ruby 1.1からは任意のディレクトリでダイナミックライブラリを作
ることができるようになりました.Rubyに静的にリンクする場合に
はRubyを展開したディレクトリの下,extディレクトリの中に拡張
ライブラリ用のディレクトリを作る必要があります.名前は適当に
選んで構いません.

== 設計する

まあ,当然なんですけど,どういう機能を実現するかどうかまず設
計する必要があります.どんなクラスをつくるか,そのクラスには
どんなメソッドがあるか,クラスが提供する定数などについて設計
します.

== Cコードを書く

拡張ライブラリ本体となるC言語のソースを書きます.C言語のソー
スがひとつの時には「ライブラリ名.c」を選ぶと良いでしょう.C
言語のソースが複数の場合には逆に「ライブラリ名.c」というファ
イル名は避ける必要があります.オブジェクトファイルとモジュー
ル生成時に中間的に生成される「ライブラリ名.o」というファイル
とが衝突するからです.また,後述する mkmf ライブラリのいくつ
かの関数がコンパイルを要するテストのために「conftest.c」とい
うファイル名を使用することに注意してください.ソースファイル
名として「conftest.c」を使用してはなりません.

Rubyは拡張ライブラリをロードする時に「Init_ライブラリ名」と
いう関数を自動的に実行します.dbmライブラリの場合「Init_dbm」
です.この関数の中でクラス,モジュール,メソッド,定数などの
定義を行います.dbm.cから一部引用します.

  void
  Init_dbm(void)
  {
      /* DBMクラスを定義する */
      cDBM = rb_define_class("DBM", rb_cObject);
      /* DBMはEnumerableモジュールをインクルードする */
      rb_include_module(cDBM, rb_mEnumerable);
  
      /* DBMクラスのクラスメソッドopen(): 引数はCの配列で受ける */
      rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);
  
      /* DBMクラスのメソッドclose(): 引数はなし */
      rb_define_method(cDBM, "close", fdbm_close, 0);
      /* DBMクラスのメソッド[]: 引数は1個 */
      rb_define_method(cDBM, "[]", fdbm_fetch, 1);

      /* ... */
  
      /* DBMデータを格納するインスタンス変数名のためのID */
      id_dbm = rb_intern("dbm");
  }

DBMライブラリはdbmのデータと対応するオブジェクトになるはずで
すから,Cの世界のdbmをRubyの世界に取り込む必要があります.

dbm.cではData_Make_Structを以下のように使っています.

  struct dbmdata {
      int  di_size;
      DBM *di_dbm;
  };
  
  
  obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);

ここではdbmstruct構造体へのポインタをDataにカプセル化してい
ます.DBM*を直接カプセル化しないのはclose()した時の処理を考
えてのことです.

Dataオブジェクトからdbmstruct構造体のポインタを取り出すため
に以下のマクロを使っています.

  #define GetDBM(obj, dbmp) {\
      Data_Get_Struct(obj, struct dbmdata, dbmp);\
      if (dbmp->di_dbm == 0) closed_dbm();\
  }

ちょっと複雑なマクロですが,要するにdbmdata構造体のポインタ
の取り出しと,closeされているかどうかのチェックをまとめてい
るだけです.

DBMクラスにはたくさんメソッドがありますが,分類すると3種類の
引数の受け方があります.ひとつは引数の数が固定のもので,例と
してはdeleteメソッドがあります.deleteメソッドを実装している
fdbm_delete()はこのようになっています.

  static VALUE
  fdbm_delete(VALUE obj, VALUE keystr)
  {
      /* ... */
  }

引数の数が固定のタイプは第1引数がself,第2引数以降がメソッド
の引数となります.

引数の数が不定のものはCの配列で受けるものとRubyの配列で受け
るものとがあります.dbmライブラリの中で,Cの配列で受けるもの
はDBMのクラスメソッドであるopen()です.これを実装している関
数fdbm_s_open()はこうなっています.

  static VALUE
  fdbm_s_open(int argc, VALUE *argv, VALUE klass)
  {
      /* ... */

      if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
  	mode = 0666;		/* default value */
      }

      /* ... */
  }

このタイプの関数は第1引数が与えられた引数の数,第2引数が与え
られた引数の入っている配列になります.selfは第3引数として与
えられます.

この配列で与えられた引数を解析するための関数がopen()でも使わ
れているrb_scan_args()です.第3引数に指定したフォーマットに従
い,第4変数以降に指定したVALUEへの参照に値を代入してくれま
す.


引数をRubyの配列として受け取るメソッドの例には
Thread#initializeがあります.実装はこうです.

  static VALUE
  thread_initialize(VALUE thread, VALUE args)
  {
      /* ... */
  }

第1引数はself,第2引数はRubyの配列です.

*注意事項*

Rubyと共有はしないがRubyのオブジェクトを格納する可能性のある
Cの大域変数は以下の関数を使ってRubyインタプリタに変数の存在
を教えてあげてください.でないとGCでトラブルを起こします.

  void rb_global_variable(VALUE *var)

== extconf.rbを用意する

Makefileを作る場合の雛型になるextconf.rbというファイルを作り
ます.extconf.rbはライブラリのコンパイルに必要な条件のチェッ
クなどを行うことが目的です.まず,

  require 'mkmf'

をextconf.rbの先頭に置きます.extconf.rbの中では以下のRuby関
数を使うことが出来ます.

  have_library(lib, func): ライブラリの存在チェック
  have_func(func, header): 関数の存在チェック
  have_header(header): ヘッダファイルの存在チェック
  create_makefile(target[, target_prefix]): Makefileの生成

以下の変数を使うことができます.

  $CFLAGS: コンパイル時に追加的に指定するフラグ(-Oなど)
  $CPPFLAGS: プリプロセッサに追加的に指定するフラグ(-Iや-Dなど)
  $LDFLAGS: リンク時に追加的に指定するフラグ(-Lなど)
  $objs: リンクされるオブジェクトファイル名のリスト

オブジェクトファイルのリストは,通常はソースファイルを検索し
て自動的に生成されますが,makeの途中でソースを生成するような
場合は明示的に指定する必要があります.

ライブラリをコンパイルする条件が揃わず,そのライブラリをコン
パイルしない時にはcreate_makefileを呼ばなければMakefileは生
成されず,コンパイルも行われません.

== dependを用意する

もし,ディレクトリにdependというファイルが存在すれば,
Makefileが依存関係をチェックしてくれます.

  % gcc -MM *.c > depend

などで作ることが出来ます.あって損は無いでしょう.

== Makefileを生成する

Makefileを実際に生成するためには

  ruby extconf.rb

とします.extconf.rbに require 'mkmf' の行がない場合にはエラー
になりますので,引数を追加して

  ruby -r mkmf extconf.rb

としてください.

site_ruby ディレクトリでなく,
vendor_ruby ディレクトリにインストールする場合には
以下のように --vendor オプションを加えてください.

  ruby extconf.rb --vendor

ディレクトリをext以下に用意した場合にはRuby全体のmakeの時に
自動的にMakefileが生成されますので,このステップは不要です.

== makeする

動的リンクライブラリを生成する場合にはその場でmakeしてくださ
い.必要であれば make install でインストールされます.

ext以下にディレクトリを用意した場合は,Rubyのディレクトリで
makeを実行するとMakefileを生成からmake,必要によってはそのモ
ジュールのRubyへのリンクまで自動的に実行してくれます.
extconf.rbを書き換えるなどしてMakefileの再生成が必要な時はま
たRubyディレクトリでmakeしてください.

拡張ライブラリはmake installでRubyライブラリのディレクトリの
下にコピーされます.もし拡張ライブラリと協調して使うRubyで記
述されたプログラムがあり,Rubyライブラリに置きたい場合には,
拡張ライブラリ用のディレクトリの下に lib というディレクトリ
を作り,そこに 拡張子 .rb のファイルを置いておけば同時にイン
ストールされます.

== デバッグ

まあ,デバッグしないと動かないでしょうね.ext/Setupにディレ
クトリ名を書くと静的にリンクするのでデバッガが使えるようにな
ります.その分コンパイルが遅くなりますけど.

== できあがり

後はこっそり使うなり,広く公開するなり,売るなり,ご自由にお
使いください.Rubyの作者は拡張ライブラリに関して一切の権利を
主張しません.

= Appendix A. Rubyのソースコードの分類

Rubyのソースはいくつかに分類することが出来ます.このうちクラ
スライブラリの部分は基本的に拡張ライブラリと同じ作り方になっ
ています.これらのソースは今までの説明でほとんど理解できると
思います.

== Ruby言語のコア

class.c    :: クラスとモジュール
error.c    :: 例外クラスと例外機構
gc.c       :: 記憶領域管理
load.c     :: ライブラリのロード
object.c   :: オブジェクト
variable.c :: 変数と定数

== Rubyの構文解析器

  parse.y      : 字句解析器と構文定義
    -> parse.c : 自動生成
  keywords     : 予約語
    -> lex.c   : 自動生成

== Rubyの評価器 (通称YARV)
  compile.c
  eval.c
  eval_error.c
  eval_jump.c
  eval_safe.c
  insns.def           : 仮想機械語の定義
  iseq.c              : VM::ISeqの実装
  thread.c            : スレッド管理とコンテキスト切り替え
  thread_win32.c      : スレッド実装
  thread_pthread.c    : 同上
  vm.c
  vm_dump.c
  vm_eval.c
  vm_exec.c
  vm_insnhelper.c
  vm_method.c

  opt_insns_unif.def  : 命令融合
  opt_operand.def     : 最適化のための定義

    -> insn*.inc      : 自動生成
    -> opt*.inc       : 自動生成
    -> vm.inc         : 自動生成

== 正規表現エンジン (鬼車)

  regex.c
  regcomp.c
  regenc.c
  regerror.c
  regexec.c
  regparse.c
  regsyntax.c

== ユーティリティ関数

debug.c    :: Cデバッガ用のデバッグシンボル
dln.c      :: 動的ローディング
st.c       :: 汎用ハッシュ表
strftime.c :: 時刻整形
util.c     :: その他のユーティリティ

== Rubyコマンドの実装

  dmyext.c
  dmydln.c
  dmyencoding.c
  id.c
  inits.c
  main.c
  ruby.c
  version.c

  gem_prelude.rb
  prelude.rb

== クラスライブラリ

array.c      :: Array
bignum.c     :: Bignum
compar.c     :: Comparable
complex.c    :: Complex
cont.c       :: Fiber, Continuation
dir.c        :: Dir
enum.c       :: Enumerable
enumerator.c :: Enumerator
file.c       :: File
hash.c       :: Hash
io.c         :: IO
marshal.c    :: Marshal
math.c       :: Math
numeric.c    :: Numeric, Integer, Fixnum, Float
pack.c       :: Array#pack, String#unpack
proc.c       :: Binding, Proc
process.c    :: Process
random.c     :: 乱数
range.c      :: Range
rational.c   :: Rational
re.c         :: Regexp, MatchData
signal.c     :: Signal
sprintf.c    :: String#sprintf
string.c     :: String
struct.c     :: Struct
time.c       :: Time
defs/known_errors.def :: 例外クラス Errno::*
-> known_errors.inc   :: 自動生成

== 多言語化

encoding.c  :: Encoding
transcode.c :: Encoding::Converter
enc/*.c     :: エンコーディングクラス群
enc/trans/* :: コードポイント対応表

== gorubyコマンドの実装

  goruby.c
  golf_prelude.rb      : goruby固有のライブラリ
    -> golf_prelude.c  : 自動生成

= Appendix B. 拡張用関数リファレンス

C言語からRubyの機能を利用するAPIは以下の通りである.

== 型

VALUE ::

  Rubyオブジェクトを表現する型.必要に応じてキャストして用いる.
  組み込み型を表現するCの型はruby.hに記述してあるRで始まる構造
  体である.VALUE型をこれらにキャストするためにRで始まる構造体
  名を全て大文字にした名前のマクロが用意されている.

== 変数・定数

Qnil ::

  定数: nilオブジェクト

Qtrue ::

  定数: trueオブジェクト(真のデフォルト値)

Qfalse ::

  定数: falseオブジェクト

== Cデータのカプセル化

Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ::

  Cの任意のポインタをカプセル化したRubyオブジェクトを返す.こ
  のポインタがRubyからアクセスされなくなった時,freeで指定した
  関数が呼ばれる.また,このポインタの指すデータが他のRubyオブ
  ジェクトを指している場合,markに指定する関数でマークする必要
  がある.

Data_Make_Struct(klass, type, mark, free, sval) ::

  type型のメモリをmallocし,変数svalに代入した後,それをカプセ
  ル化したデータを返すマクロ.

Data_Get_Struct(data, type, sval) ::

  dataからtype型のポインタを取り出し変数svalに代入するマクロ.

== 型チェック

  TYPE(value)
  FIXNUM_P(value)
  NIL_P(value)
  void Check_Type(VALUE value, int type)
  SafeStringValue(value)

== 型変換

  FIX2INT(value), INT2FIX(i)
  FIX2LONG(value), LONG2FIX(l)
  NUM2INT(value), INT2NUM(i)
  NUM2UINT(value), UINT2NUM(ui)
  NUM2LONG(value), LONG2NUM(l)
  NUM2ULONG(value), ULONG2NUM(ul)
  NUM2LL(value), LL2NUM(ll)
  NUM2ULL(value), ULL2NUM(ull)
  NUM2OFFT(value), OFFT2NUM(off)
  NUM2SIZET(value), SIZET2NUM(size)
  NUM2SSIZET(value), SSIZET2NUM(ssize)
  NUM2DBL(value)
  rb_float_new(f)
  StringValue(value)
  StringValuePtr(value)
  StringValueCStr(value)
  rb_str_new2(s)

== クラス/モジュール定義

VALUE rb_define_class(const char *name, VALUE super) ::

  superのサブクラスとして新しいRubyクラスを定義する.

VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ::

  superのサブクラスとして新しいRubyクラスを定義し,moduleの
  定数として定義する.

VALUE rb_define_module(const char *name) ::

  新しいRubyモジュールを定義する.

VALUE rb_define_module_under(VALUE module, const char *name) ::

  新しいRubyモジュールを定義し,moduleの定数として定義する.

void rb_include_module(VALUE klass, VALUE module) ::

  モジュールをインクルードする.classがすでにmoduleをインク
  ルードしている時には何もしない(多重インクルードの禁止).

void rb_extend_object(VALUE object, VALUE module) ::

  オブジェクトをモジュール(で定義されているメソッド)で拡張する.

== 大域変数定義

void rb_define_variable(const char *name, VALUE *var) ::

  RubyとCとで共有するグローバル変数を定義する.変数名が`$'で
  始まらない時には自動的に追加される.nameとしてRubyの識別子
  として許されない文字(例えば` ')を含む場合にはRubyプログラ
  ムからは見えなくなる.

void rb_define_readonly_variable(const char *name, VALUE *var) ::

  RubyとCとで共有するread onlyのグローバル変数を定義する.
  read onlyであること以外はrb_define_variable()と同じ.

void rb_define_virtual_variable(const char *name, VALUE (*getter)(), void (*setter)()) ::

  関数によって実現されるRuby変数を定義する.変数が参照された
  時にはgetterが,変数に値がセットされた時にはsetterが呼ばれ
  る.

void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), void (*setter)()) ::

  関数によってhookのつけられたグローバル変数を定義する.変数
  が参照された時にはgetterが,関数に値がセットされた時には
  setterが呼ばれる.getterやsetterに0を指定した時にはhookを
  指定しないのと同じ事になる.

void rb_global_variable(VALUE *var)

  GCのため,Rubyプログラムからはアクセスされないが, Rubyオブ
  ジェクトを含む大域変数をマークする.

== 定数

void rb_define_const(VALUE klass, const char *name, VALUE val) ::

  定数を定義する.

void rb_define_global_const(const char *name, VALUE val) ::

  大域定数を定義する.

    rb_define_const(rb_cObject, name, val)

  と同じ意味.

== メソッド定義

rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  メソッドを定義する.argcはselfを除く引数の数.argcが-1の時,
  関数には引数の数(selfを含まない)を第1引数, 引数の配列を第2
  引数とする形式で与えられる(第3引数はself).argcが-2の時,
  第1引数がself, 第2引数がargs(argsは引数を含むRubyの配列)と
  いう形式で与えられる.

rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  privateメソッドを定義する.引数はrb_define_method()と同じ.

rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  特異メソッドを定義する.引数はrb_define_method()と同じ.

rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::

  argc, argv形式で与えられた指定されたフォーマットに従って引
  数を分解し,続くVALUEへの参照にセットします.このフォーマッ
  トは,ABNFで記述すると以下の通りです.

    scan-arg-spec  := param-arg-spec [option-hash-arg-spec] [block-arg-spec]

    param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec /
                      pre-opt-post-arg-spec
    pre-arg-spec   := num-of-leading-mandatory-args [num-of-optional-args]
    post-arg-spec  := sym-for-variable-length-args
                      [num-of-trailing-mandatory-args]
    pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args
                             num-of-trailing-mandatory-args
    option-hash-arg-spec := sym-for-option-hash-arg
    block-arg-spec := sym-for-block-arg

    num-of-leading-mandatory-args  := DIGIT ; 先頭に置かれる省略不能な引数の数
    num-of-optional-args           := DIGIT ; 続いて置かれる省略可能な引数の数
    sym-for-variable-length-args   := "*"   ; 続いて置かれる可変長引数を
                                            ; Rubyの配列で取得するための指定
    num-of-trailing-mandatory-args := DIGIT ; 終端に置かれる省略不能な引数の数
    sym-for-option-hash-arg        := ":"   ; オプションハッシュを取得する
                                            ; ための指定; 省略不能な引数の
                                            ; 数よりも多くの引数が指定され,
                                            ; 最後の引数がハッシュ(または
                                            ; #to_hashで変換可能)の場合に
                                            ; 取得される.最後の引数がnilの
                                            ; 場合,可変長引数指定がなく,
                                            ; 省略不能引数の数よりも多くの
                                            ; 引数が指定された場合に取得される
    sym-for-block-arg              := "&"   ; イテレータブロックを取得するための
                                            ; 指定

  フォーマットが"12"の場合,引数は最低1つで,3つ(1+2)まで許さ
  れるという意味になります.従って,フォーマット文字列に続い
  て3つのVALUEへの参照を置く必要があります.それらには取得した
  変数がセットされます.変数への参照の代わりにNULLを指定する
  こともでき,その場合は取得した引数の値は捨てられます.なお,
  省略可能引数が省略された時の変数の値はnil(C言語のレベルでは
  Qnil)になります.

  返り値は与えられた引数の数です.オプションハッシュおよびイ
  テレータブロックは数えません.

== Rubyメソッド呼び出し

VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ::

  メソッド呼び出し.文字列からmidを得るためにはrb_intern()を
  使う.

VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ::

  メソッド呼び出し.引数をargc, argv形式で渡す.

VALUE rb_eval_string(const char *str)

  文字列をRubyスクリプトとしてコンパイル・実行する.

ID rb_intern(const char *name) ::

  文字列に対応するIDを返す.

char *rb_id2name(ID id) ::

  IDに対応する文字列を返す(デバッグ用).

char *rb_class2name(VALUE klass) ::

  クラスの名前を返す(デバッグ用).クラスが名前を持たない時に
  は, 祖先を遡って名前を持つクラスの名前を返す.

int rb_respond_to(VALUE obj, ID id) ::

  objがidで示されるメソッドを持つかどうかを返す.

== インスタンス変数

VALUE rb_iv_get(VALUE obj, const char *name) ::

  objのインスタンス変数の値を得る.`@'で始まらないインスタン
  ス変数は Rubyプログラムからアクセスできない「隠れた」イン
  スタンス変数になる.定数は大文字の名前を持つクラス(または
  モジュール)のインスタンス変数として実装されている.

VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) ::

  objのインスタンス変数をvalにセットする.

== 制御構造

VALUE rb_block_call(VALUE obj, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ::

  funcをブロックとして設定し,objをレシーバ,argcとargvを引数
  としてmidメソッドを呼び出す.funcは第一引数にyieldされた値,
  第二引数にdata2を受け取る.複数の値がyieldされた場合(Cでは
  rb_yield_values()とrb_yield_values2(), rb_yield_splat()),
  data2はArrayとしてパックされている.第三, 第四引数のargcと
  argvによってyieldされた値を取り出すことができる.

[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  func2をブロックとして設定し, func1をイテレータとして呼ぶ.
  func1には arg1が引数として渡され, func2には第1引数にイテレー
  タから与えられた値, 第2引数にarg2が渡される.
  
  1.9でrb_iterateを使う場合は, func1の中でRubyレベルのメソッド
  を呼び出さなければならない.
  1.9でobsoleteとなった. 代わりにrb_block_callが用意された.

VALUE rb_yield(VALUE val) ::

  valを値としてイテレータブロックを呼び出す.

VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  関数func1をarg1を引数に呼び出す.func1の実行中に例外が発生
  した時には func2をarg2を引数として呼ぶ.戻り値は例外が発生
  しなかった時はfunc1の戻り値, 例外が発生した時にはfunc2の戻
  り値である.

VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  関数func1をarg1を引数として実行し, 実行終了後(たとえ例外が
  発生しても) func2をarg2を引数として実行する.戻り値はfunc1
  の戻り値である(例外が発生した時は戻らない).

VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ::

  関数funcをargを引数として実行し, 例外が発生しなければその戻
  り値を返す.例外が発生した場合は, *stateに非0をセットして
  Qnilを返す.
  rb_jump_tag()を呼ばずに捕捉した例外を無視する場合には,
  rb_set_errinfo(Qnil)でエラー情報をクリアしなければならない.

void rb_jump_tag(int state) ::

  rb_protect()やrb_eval_string_protect()で捕捉された例外を再
  送する.stateはそれらの関数から返された値でなければならない.
  この関数は直接の呼び出し元に戻らない.

void rb_iter_break() ::

  現在の最も内側のブロックを終了する.この関数は直接の呼び出
  し元に戻らない.

void rb_iter_break_value(VALUE value) ::

  現在の最も内側のブロックをvalueで終了する.ブロックは引数で
  与えられたvalueを返す.この関数は直接の呼び出し元に戻らない.

== 例外・エラー

void rb_warning(const char *fmt, ...) ::

  rb_verbose時に標準エラー出力に警告情報を表示する.引数は
  printf()と同じ.

void rb_raise(rb_eRuntimeError, const char *fmt, ...) ::

  RuntimeError例外を発生させる.引数はprintf()と同じ.

void rb_raise(VALUE exception, const char *fmt, ...) ::

  exceptionで指定した例外を発生させる.fmt以下の引数は
  printf()と同じ.

void rb_fatal(const char *fmt, ...) ::

  致命的例外を発生させる.通常の例外処理は行なわれず, インター
  プリタが終了する(ただしensureで指定されたコードは終了前に
  実行される).

void rb_bug(const char *fmt, ...) ::

  インタープリタなどプログラムのバグでしか発生するはずのない
  状況の時呼ぶ.インタープリタはコアダンプし直ちに終了する.
  例外処理は一切行なわれない.

注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を
使ったVALUEの出力に使用されているため,整数には%dを使用すること.

== Rubyの初期化・実行

Rubyをアプリケーションに埋め込む場合には以下のインタフェース
を使う.通常の拡張ライブラリには必要ない.

void ruby_init() ::

  Rubyインタプリタの初期化を行なう.

void ruby_options(int argc, char **argv) ::

  Rubyインタプリタのコマンドライン引数の処理を行なう.

void ruby_run() ::

  Rubyインタプリタを実行する.

void ruby_script(char *name) ::

  Rubyのスクリプト名($0)を設定する.

== インタプリタのイベントのフック

  void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events,
                         VALUE data)

指定されたインタプリタのイベントに対するフック関数を追加します.
eventsは以下の値のorでなければなりません:

  RUBY_EVENT_LINE
  RUBY_EVENT_CLASS
  RUBY_EVENT_END
  RUBY_EVENT_CALL
  RUBY_EVENT_RETURN
  RUBY_EVENT_C_CALL
  RUBY_EVENT_C_RETURN
  RUBY_EVENT_RAISE
  RUBY_EVENT_ALL

rb_event_hook_func_tの定義は以下の通りです:

  typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
                                       VALUE self, ID id, VALUE klass)

rb_add_event_hook() の第3引数 data は,フック関数の第2引数と
して渡されます.これは1.8では現在のNODEへのポインタでした.以
下の RB_EVENT_HOOKS_HAVE_CALLBACK_DATA も参照してください.

  int rb_remove_event_hook(rb_event_hook_func_t func)

指定されたフック関数を削除します.

== 互換性のためのマクロ

APIの互換性をチェックするために以下のマクロがデフォルトで定義されています.

NORETURN_STYLE_NEW ::

  NORETURN マクロが関数型マクロとして定義されていることを意味する.

HAVE_RB_DEFINE_ALLOC_FUNC ::

  rb_define_alloc_func() 関数が提供されていること,つまり
  allocation framework が使われることを意味する.
  have_func("rb_define_alloc_func", "ruby.h")
  の結果と同じ.

HAVE_RB_REG_NEW_STR ::

  StringオブジェクトからRegexpオブジェクトを作る
  rb_reg_new_str() 関数が提供されていることを意味する.
  have_func("rb_reg_new_str", "ruby.h").
  の結果と同じ.

HAVE_RB_IO_T ::

  rb_io_t 型が提供されていることを意味する.

USE_SYMBOL_AS_METHOD_NAME ::

  メソッド名を返すメソッド,Module#methods, #singleton_methods
  などがSymbolを返すことを意味する.

HAVE_RUBY_*_H ::

  ruby.h で定義されている.対応するヘッダが提供されていること
  を意味する.たとえば,HAVE_RUBY_ST_H が定義されている場合は
  単なる st.h ではなく ruby/st.h を使用する.

RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::

  rb_add_event_hook() がフック関数に渡す data を第3引数として
  受け取ることを意味する.

= Appendix C. extconf.rbで使える関数たち

extconf.rbの中では利用可能なコンパイル条件チェックの関数は以
下の通りである.

have_macro(macro, headers) ::

  ヘッダファイルheaderをインクルードしてマクロmacroが定義さ
  れているかどうかチェックする.マクロが定義されている時true
  を返す.

have_library(lib, func) ::

  関数funcを定義しているライブラリlibの存在をチェックする.
  ライブラリが存在する時,trueを返す.

find_library(lib, func, path...) ::

  関数funcを定義しているライブラリlibの存在を -Lpath を追加
  しながらチェックする.ライブラリが見付かった時,trueを返す.

have_func(func, header) ::

  ヘッダファイルheaderをインクルードして関数funcの存在をチェ
  ックする.funcが標準では�doc/alt-ruby20/BSDL000064400000002402150403130020007643 0ustar00�ァイルheaderの存在を -Ipath を追加しながらチェック
  する.ヘッダファイルが見付かった時,trueを返す.

have_struct_member(type, member[, header[, opt]]) ::

  ヘッダファイルheaderをインクルードして型typeにメンバmember
  が存在するかをチェックする.typeが定義されていて,memberを
  持つする時trueを返す.

have_type(type, header, opt) ::

  ヘッダファイルheaderをインクルードして型typeが存在するかを
  チェックする.typeが定義されている時trueを返す.

check_sizeof(type, header) ::

  ヘッダファイルheaderをインクルードして型typeのchar単位サイ
  ズを調べる.typeが定義されている時そのサイズを返す.定義さ
  れていないときはnilを返す.

create_makefile(target[, target_prefix]) ::

  拡張ライブラリ用のMakefileを生成する.この関数を呼ばなけれ
  ばそのライブラリはコンパイルされない.targetはモジュール名
  を表す.

find_executable(command, path) ::

  コマンドcommandをFile::PATH_SEPARATORで区切られたパス名の
  リストpathから探す.pathがnilまたは省略された場合は,環境
  変数PATHの値�doc/alt-ruby20/COPYING000064400000004710150403130020010233 0ustar00なしなら
  *defaultsを返す.

dir_config(target[, default_dir]) ::
dir_config(target[, default_include, default_lib]) ::

  コマンドライン上の--with-<target>-dir, --with-<target>-include,
  --with-<target>-libのいずれかで指定されるディレクトリを
  $CFLAGS や $LDFLAGS に追加する.--with-<target>-dir=/pathは
  --with-<target>-include=/path/include --with-<target>-lib=/path/lib
  と等価である.追加された include ディレクトリと lib ディレ
  クトリの配列を返す. ([include_dir, lib_dir])

pkg_config(pkg) ::

  pkg-configコマンドからパッケージpkgの情報を得る.
  pkg-configの実際のコマンド名は,--with-pkg-configコマンド
  ラインオプションで指定可能.

/*
 * Local variables:
 * fill-column: 60
 * end:
 */
doc/alt-ruby20/BSDL000064400000002402150403130020007643 0ustar00Copyright (C) 1993-2013 Yukihiro Matsumoto. 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 SUBSTIdoc/alt-ruby20/README000064400000012670150403130020010064 0ustar00doc/alt-ruby20/COPYING000064400000004710150403130020010233 0ustar00Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:

  1. You may make and give away verbatim copies of the source form of the
     software without restriction, provided that you duplicate all of the
     original copyright notices and associated disclaimers.

  2. You may modify your copy of the software in any way, provided that
     you do at least ONE of the following:

       a) place your modifications in the Public Domain or otherwise
          make them Freely Available, such as by posting said
	  modifications to Usenet or an equivalent medium, or by allowing
	  the author to include your modifications in the software.

       b) use the modified software only within your corporation or
          organization.

       c) give non-standard binaries non-standard names, with
          instructions on where to get the original software distribution.

       d) make other distribution arrangements with the author.

  3. You may distribute the software in object code or binary form,
     provided that you do at least ONE of the following:

       a) distribute the binaries and library files of the software,
	  together with instructions (in the manual page or equivalent)
	  on where to get the original distribution.

       b) accompany the distribution with the machine-readable source of
	  the software.

       c) give non-standard binaries non-standard names, with
          instructions on where to get the original software distribution.

       d) make other distribution arrangements with the author.

  4. You may modify and include the part of the software into any other
     software (possibly commercial).  But some files in the distribution
     are not written by the author, so that they are not under these terms.

     For the list of those files and their copying conditions, see the
     file LEGAL.

  5. The scripts and library files supplied as input to or produced as 
     output from the software do not automatically fall under the
     copyright of the software, but belong to whomever generated them, 
     and may be sold commercially, and may be aggregated with this
     software.

  6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     PURPOSE.
doc/alt-ruby20/README000064400000012670150403130020010064 0ustar00doc/alt-ruby20/BSDL000064400000002402150403130020007643 0ustar00ection
*   Dynamic Loading of Object files(on some architecture)
*   Highly Portable (works on many Unix-like/POSIX compatible platforms
    as well as Windows, Mac OS X, BeOS etc.)
    cf. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms


== How to get Ruby

For a complete list of ways to install Ruby, including using third party
tools like rvm, see:

http://www.ruby-lang.org/en/downloads/

The Ruby distribution files can be found in the following FTP site:

ftp://ftp.ruby-lang.org/pub/ruby/

The trunk of the Ruby source tree can be checked out with the
following command:

  $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby

Or if you are using git then use following command:

  $ git clone git://github.com/ruby/ruby.git

There are some other branches under development.  Try the following
command and see the list of branches:

  $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/

Or if you are using git then use following command:

  $ git ls-remote git://github.com/ruby/ruby.git

== Ruby home-page

The URL of the Ruby home-page is:

http://www.ruby-lang.org/


== Mailing list

There is a mailing list to talk about Ruby.
To subscribe this list, please send the following phrase

        subscribe YourFirstName YourFamilyName
e.g.doc/alt-ruby20/GPL000064400000043254150403130030007554 0ustar00 Remove comment mark(<tt>#</tt>) before the module names from +ext/Setup+
     (or add module names if not present), if you want to link modules
     statically.

     If you don't want to compile non static extension modules
     (probably on architectures which does not allow dynamic loading),
     remove comment mark from the line "<tt>#option nodynamic</tt>" in
     +ext/Setup+.

     Usually this step will not be needed.

5.   Run +make+.

6.   Optionally, run '<tt>make check</tt>' to check whether the compiled Ruby
     interpreter works well. If you see the message "<tt>check succeeded</tt>",
     your ruby works as it should (hopefully).

7.   Run '<tt>make install</tt>'

     This command will create following directories and install files
     onto them.

     * <tt>${DESTDIR}${prefix}/bin</tt>
     * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/share/man/man1</tt>
     * <tt>${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system</tt>

     If Ruby's API version is '_x.y.z_', the <tt>${MAJOR}</tt> is '_x_', the
     <tt>${MINOR}</tt> is '_y_', and the <tt>${TEENY}</tt> is '_z_'.

     *NOTE*: teeny of the API version may be different from one of
     Ruby's program version

     You may have to be a super user to install ruby.

If you fail to compile ruby, please send the detailed error report with
the error log and machine/OS type, to help others.

Some extension libraries may not get compiled because of lack of
necessary external libraries and/or headers, then you will need to run
'<tt>make distclean-ext</tt>' to remove old confidoc/alt-ruby20/README000064400000012670150403130020010064 0ustar00doc/alt-ruby20/GPL000064400000043254150403130030007554 0ustar00                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, thdoc/alt-ruby20/GPL000064400000043254150403130030007554 0ustar00am under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALdoc/alt-ruby21/README.ja000064400000017001150403130650010460 0ustar00se to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
doc/alt-ruby21/README.ja000064400000017001150403130650010460 0ustar00= Rubyとは

Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.
Rubyは最初から純粋なオブジェクト指向言語として設計されていま
すから,オブジェクト指向プログラミングを手軽に行う事が出来ま
す.もちろん通常の手続き型のプログラミングも可能です.

Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい強力
です.さらにシンプルな文法と,例外処理やイテレータなどの機構
によって,より分かりやすいプログラミングが出来ます.


== Rubyの特長

*   シンプルな文法
*   普通のオブジェクト指向機能(クラス,メソッドコールなど)
*   特殊なオブジェクト指向機能(Mixin, 特異メソッドなど)
*   演算子オーバーロード
*   例外処理機能
*   イテレータとクロージャ
*   ガーベージコレクタ
*   ダイナミックローディング (アーキテクチャによる)
*   移植性が高い.多くのUnix-like/POSIX互換プラットフォーム上で
    動くだけでなく,Windows, Mac OS X,BeOSなどの上でも動く
    cf. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatformsJa

== 入手法

=== FTPで

以下の場所においてあります.

ftp://ftp.ruby-lang.org/pub/ruby/

=== Subversionで

開発先端のソースコードは次のコマンドで取得できます.

  $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby

他に開発中のブランチの一覧は次のコマンドで見られます.

  $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/

=== Gitで

SubversionのミラーをGitHubに公開しています.
以下のコマンドでリポジトリを取得できます.

  $ git clone git://github.com/ruby/ruby.git

== ホームページ

RubyのホームページのURLは

http://www.ruby-lang.org/

です.


== メーリングリスト

Rubyのメーリングリストがあります。参加希望の方は

mailto:ruby-list-ctl@ruby-lang.org

まで本文に

   subscribe YourFirstName YourFamilyName

と書いて送って下さい。

Ruby開発者向けメーリングリストもあります。こちらではrubyのバ
グ、将来の仕様拡張など実装上の問題について議論されています。
参加希望の方は

mailto:ruby-dev-ctl@ruby-lang.org

までruby-listと同様の方法でメールしてください。

Ruby拡張モジュールについて話し合うruby-extメーリングリストと
数学関係の話題について話し合うruby-mathメーリングリストと
英語で話し合うruby-talkメーリングリストもあります。参加方法
はどれも同じです。


== コンパイル・インストール

以下の手順で行ってください.

1.   もし +configure+ ファイルが見つからない、もしくは
     +configure.in+ より古いようなら、 +autoconf+ を実行して
     新しく +configure+ を生成する

2.   +configure+ を実行して +Makefile+ などを生成する

     環境によってはデフォルトのCコンパイラ用オプションが付き
     ます. +configure+ オプションで <tt>optflags=..</tt> <tt>warnflags=..</tt> 等
     で上書きできます.

3.   (必要ならば)+defines.h+ を編集する

     多分,必要無いと思います.

4.   (必要ならば)+ext/Setup+ に静的にリンクする拡張モジュールを
     指定する

     +ext/Setup+ に記述したモジュールは静的にリンクされます.

     ダイナミックローディングをサポートしていないアーキテク
     チャでは +Setup+ の1行目の「<tt>option nodynamic</tt>」という行のコ
     メントを外す必要があります.また,このアーキテクチャで
     拡張モジュールを利用するためには,あらかじめ静的にリン
     クしておく必要があります.

5.   +make+ を実行してコンパイルする

6.   <tt>make check</ttdoc/alt-ruby21/ChangeLog000064400002644670150403130660011006 0ustar00doc/alt-ruby21/README.ja000064400000017001150403130650010460 0ustar00��
     '_x_'で,<tt>${MINOR}</tt>は'_y_',<tt>${TEENY}</tt>は'_z_'です.

     <b>注意</b>: APIバージョンの +teeny+ は,Rubyプログラムのバージョ
     ンとは異なることがあります.

     +root+ で作業する必要があるかもしれません.

もし,コンパイル時にエラーが発生した場合にはエラーのログとマ
シン,OSの種類を含むできるだけ詳しいレポートを作者に送ってく
ださると他の方のためにもなります.


== 移植

UNIXであれば +configure+ がほとんどの差異を吸収してくれるはずで
すが,思わぬ見落としがあった場合(あるに違いない),作者にその
ことをレポートすれば,解決できるかも知れません.

アーキテクチャにもっとも依存するのはGC部です.RubyのGCは対象
のアーキテクチャが<tt>setjmp()</tt>または<tt>getcontext()</tt>によって全てのレ
ジスタを +jmp_buf+ や +ucontext_t+ に格納することと, +jmp_buf+ や
+ucontext_t+ とスタックが32bitアラインメントされていることを仮定
しています.特に前者が成立しない場合の対応は非常に困難でしょう.
後者の解決は比較的簡単で, +gc.c+ でスタックをマークしている
部分にアラインメントのバイト数だけずらしてマークするコードを
追加するだけで済みます.<tt>defined(\_\_mc68000\_\_)</tt>で括られてい
る部分を参考にしてください.

レジスタウィンドウを持つCPUでは,レジスタウィンドウをスタッ
クにフラッシュするアセンブラコードを追加する必要があるかも知
れません.


== 配布条件

+COPYING.ja+ ファイルを参照してください。


== 著者

コメント,バグレポートその他は mailto:matz@ruby-lang.org まで.
-------------------------------------------------------
created at: Thu Aug  3 11:57:36 JST 1995
--
Local variables:
mode: rdoc
end:
doc/alt-ruby21/ChangeLog000064400002644670150403130660011006 0ustar00Fri Apr  1 00:41:17 2016  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rubygems/test_gem_commands_environment_command.rb (test_execute):
	  version number may be two-digit.

Fri Apr  1 00:00:31 2016  NAKAMURA Usaku  <usa@ruby-lang.org>

	* version.h: bump to 2.1.10.  welcome to two-digit version!

Wed Mar 30 18:45:26 2016  Kimura Wataru  <kimuraw@i.nifty.jp>

	* test/ruby/test_io.rb: handled rlimit value same as r52277
	  [Bug #11852][ruby-dev:49446]

Tue Mar 29 21:10:10 2016  Kazuki Yamaguchi  <k@rhe.jp>

	* ext/openssl/extconf.rb: check SSL_CTX_set_next_proto_select_cb
	  function rather than OPENSSL_NPN_NEGOTIATED macro. it exists
	  even if it is disabled by OpenSSL configuration.
	  [ruby-core:74384] [Bug #12182]

	* ext/openssl/ossl_ssl.c: update #ifdef(s) as above.

	* test/openssl/test_ssl.rb: skip NPN tests if NPN is disabled.

Tue Mar 29 21:09:02 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/uri/http.rb (URI::HTTP#initialize): [DOC] fix example,
	  missing mandatory arguments.  [ruby-core:74540] [Bug #12215]

Tue Mar 29 21:07:30 2016  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (reserve_stack): fix reserving position where
	  the stack growing bottom to top. [Bug #12118]

Fri Mar 25 18:42:46 2016  Koichi ITO  <koic.ito@gmail.com>

	* variable.c: Added documentation about order of `Module#constants`
	  [ci skip][Bug #12121][ruby-dev:49505][fix GH-1301]

Fri Mar 25 18:41:14 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (enc_succ_alnum_char): try to skip an invalid character
	  gap between GREEK CAPITAL RHO and SIGMA.
	  [ruby-core:74478] [Bug #12204]

Fri Mar 25 18:38:42 2016  NARUSE, Yui  <naruse@ruby-lang.org>

	* enc/trans/JIS: update Unicode's notice. [Bug #11844]

Fri Mar 25 18:36:04 2016  Eric Wong  <e@80x24.org>

	* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): document as MT-unsafe
	  [ruby-core:73803] [Bug #12069]

Fri Mar 25 18:35:08 2016  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb: fix method name typo.
	  [ruby-core:72513] [Bug #11893] The patch provided by Akira Matsuda.


Fri Mar 25 18:34:20 2016  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/tk/lib/tkextlib/tcllib/toolbar.rb: fix method name typo.
	  [ruby-core:72511] [Bug #11891] The patch provided by Akira Matsuda.


Fri Mar 25 18:33:34 2016  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/tk/lib/tkextlib/blt/tree.rb: fix method name typo.
	  [ruby-core:72510] [Bug #11890] The patch provided by Akira Matsuda.


Fri Mar 25 18:32:44 2016  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/tk/lib/tk/menubar.rb: fix a typo in font name. [ruby-core:72505]
	  [Bug #11886] The patch provided by Akira Matsuda.

	* ext/tk/sample/*.rb: ditto.

Fri Mar 25 18:30:55 2016  Anthony Dmitriyev  <antstorm@gmail.com>

	* net/ftp.rb: add NullSocket#closed? to fix closing not opened
	  connection.  [Fix GH-1232]

Fri Mar 25 18:24:04 2016  Victor Nawothnig  <Victor.Nawothnig@gmail.com>

	* parse.y (parse_numvar): NTH_REF must be less than a half of
	  INT_MAX, as it is left-shifted to be ORed with back-ref flag.
	  [ruby-core:74444] [Bug#12192] [Fix GH-1296]

Fri Mar 25 18:18:29 2016  Eric Hodel  <drbrain@segment7.net>

	* marshal.c (r_object0):  raise ArgumentError when linking to undefined
	  object.

Fri Mar 25 18:18:29 2016  Eric Hodel  <drbrain@segment7.net>

	* marshal.c (r_object0): Fix Marshal crash for corrupt extended object.

Fri Mar 25 18:07:48 2016  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* cont.c (rb_fiber_struct): keep context.uc_stack.ss_sp and context.uc_stack.ss_size
	  for later use. Patch by Rei Odaira. [ruby-core:62945] [Bug #9905]

Fri Mar 25 17:52:46 2016  Tanaka Akira  <akr@fsij.org>

	* test/openssl/utils.rb (start_server, server_loop): Use a
	  pipe to stop server instead of shutdown/close a listening socket.

Fri Mar 25 17:52:46 2016  Tanaka Akira  <akr@fsij.org>

	* test/ruby/envutil.rb (assert_join_threads): New assertion to
	  join multiple threads without exceptions.

Fri Mar 25 17:52:46 2016  Tanaka Akira  <akr@fsij.org>

	* ext/openssl/lib/openssl/ssl.rb (SSLServer#accept): Close a socket
	  if any exception occur. 

Fri Mar 25 17:52:46 2016  Tanaka Akira  <akr@fsij.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_close): Fix sync_close to work
	  when SSL is not started.
	  This fix the fd leak by test_https_proxy_authentication in
	  test/net/http/test_https_proxy.rb.

Fri Mar 25 17:52:46 2016  Tanaka Akira  <akr@fsij.org>

	* test/openssl: Join threads.

Fri Mar 25 17:47:06 2016  NARUSE, Yui  <naruse@ruby-lang.org>

	* insns.def (opt_mod): sdoc/alt-ruby21/ChangeLog000064400002644670150403130660011006 0ustar00cket.rb (test_getsockopt): ditto.
	* test/socket/test_sockopt.rb (test_bool): ditto.

Fri Mar 25 17:35:06 2016  Rei Odaira  <Rei.Odaira@gmail.com>

	* test/zlib/test_zlib.rb (test_adler32_combine, test_crc32_combine):
	  Skip two tests on AIX because zconf.h in zlib does not correctly
	  recognize _LARGE_FILES in AIX. The problem was already reported
	  to zlib, and skip these tests until it is fixed.

Fri Mar 25 17:33:52 2016  Rei Odaira  <Rei.Odaira@gmail.com>

	* test/socket/test_addrinfo.rb (test_ipv6_address_predicates):
	  IN6_IS_ADDR_V4COMPAT and IN6_IS_ADDR_V4MAPPED are broken
	  on AIX, so skip related tests.

Fri Mar 25 17:32:34 2016  Rei Odaira  <Rei.Odaira@gmail.com>

	* test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_lock): skip
	  this test on AIX. The issue is the same as on Solaris.
	  [ruby-dev:47631]

Fri Mar 25 17:28:13 2016  Rei Odaira  <Rei.Odaira@gmail.com>

	* thread_pthread.c (getstack): __pi_stacksize returned by
	  pthread_getthrds_np() is wrong on AIX. Use
	  __pi_stackend - __pi_stackaddr instead.

Fri Mar 25 17:21:51 2016  Alex Boyd  <alex@opengroove.org>

	* lib/irb.rb: avoid to needless truncation when using back_trace_limit option.
	  [fix GH-1205][ruby-core:72773][Bug #11969]

Fri Mar 25 17:18:59 2016  Naohisa Goto  <ngotogenome@gmail.com>

	* enc/windows_1250.c: Should not use C++ style comments (C99 feature).
	  [Bug #11843]

Fri Mar 25 17:15:19 2016  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* enc/iso_8859_2.c, enc/windows_1250.c: separate Windows-1250
	  from ISO-8859-2 to fix 0x80..0x9e range (from Kimihito Matsui)

Fri Mar 25 17:15:19 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/windows_1252.c: separate from ISO-8859-1 to fix 0x80..0x9e
	  range.  [ruby-core:64049] [Bug #10097]

Fri Mar 25 17:15:19 2016  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* enc/iso_8859_13.c: Added three missing lower/upper-case
	  character pairs (from Kimihito Matsui)

Fri Mar 25 17:15:19 2016  Martin Duerst  <duerst@it.aoyama.ac.jp>

	* enc/iso_8859_4.c: Added missing lower/upper-case character
	  pair (U+014A and U+014B, LATIN CAPITAL/SMALL LETTER ENG)
	  (from Kimihito Matsui)

Fri Mar 25 16:53:41 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_scrub): the result should be infected by the
	  original string.

Fri Mar 25 16:53:41 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (rb_econv_substr_append, econv_primitive_convert):
	  the result should be infected by the original string.

Fri Mar 25 16:53:41 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h: add raw FL macros, which assume always the
	  argument object is not a special constant.

	* internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING.

	* string.c: deal with taint flags directly across String instances.

Thu Feb 25 20:03:32 2016  Naotoshi Seo  <sonots@gmail.com>

	* lib/logger.rb: Remove block from Logger.add as it's not needed
	  patch provided by Daniel Lobato Garcia [fix GH-1240] [Bug #12054]

Thu Feb 25 19:58:48 2016  Zachary Scott  <zzak@ruby-lang.org>

	* re.c: Remove deprecated kcode argument from Regexp.new and compile
	  patch provided by Dylan Pulliam [Bug #11495]

Thu Feb 25 19:49:31 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (sock_gethostname): support unlimited size
	  hostname.

Thu Feb 25 19:28:19 2016  Kouhei Sutou  <kou@cozmixng.org>

	* lib/xmlrpc/client.rb: Support SSL options in async methods of
	  XMLRPC::Client.
	  [Bug #11489]
	  Reported by Aleksandar Kostadinov. Thanks!!!

Thu Feb 25 19:25:25 2016  NARUSE, Yui  <naruse@ruby-lang.org>

	* marshal.c (r_object0): honor Marshal.load post proc
	  value for TYPE_LINK.  by Hiroshi Nakamura <nahi@ruby-lang.org>
	  https://github.com/ruby/ruby/pull/1204 fix GH-1204

Thu Feb 25 18:59:27 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/option.c (sockopt_bool): relax boolean size to be one
	  too not only sizeof(int).  Winsock getsockopt() returns a single
	  byte as a boolean socket option.  [ruby-core:72730] [Bug #11958]

Thu Feb 25 18:36:26 2016  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (rb_execarg_parent_start1): need to convert the encoding to
	  ospath's one.

Thu Feb 25 18:36:26 2016  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c: use rb_w32_uchdir() instead of plain chdir() on Windows.
	  reported by naruse via twitter.

	* process.c (rb_execarg_addopt): need to convert the encoding to
	  ospath's one.

Thu Feb 25 18:21:55 2016  Eric Wong  <e@80x24.org>

	* ext/stringio/stringio.c (strio_binmode): implement to set encoding
	* test/stringio/test_stringio.rb (test_binmode): new test
	  [ruby-core:72699] [Bug #11945]

Thu Feb 25 18:12:00 2016  Eric Wong  <e@80x24.org>

	* io.c (io_getpartial): remove unused kwarg from template
	* test/ruby/test_io.rb (test_readpartial_bad_args): new
	  [Bug #11885]

Thu Feb 25 17:51:35 2016  Tadashi Saito  <tad.a.digger@gmail.com>

	* compile.c, cont.c, doc, man: fix common misspelling.
	  [ruby-core:72466] [Bug #11870]

Thu Feb 25 17:48:16 2016  Eric Wong  <e@80x24.org>

	* ext/socket/init.c (rsock_init_sock): reject reserved FDs
	  [ruby-core:72445] [Bug #11862]

Thu Feb 25 17:38:59 2016  Eric Wong  <e@80x24.org>

	* ext/socket/init.c (rsock_init_sock): check FD after validating
	* test/socket/test_basicsocket.rb (test_for_fd): new
	  [ruby-core:72418] [Bug #11854]

Thu Feb 25 17:33:38 2016  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* cont.c: fix a double word typo.
	  [Bug #11313][ruby-core:69749]

Thu Feb 25 17:32:23 2016  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* ext/tk/lib/multi-tk.rb: fix typos.
	  [Bug #11764][ruby-core:71800]

Thu Feb 25 16:46:37 2016  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (reg_names_iter): should consider encoding of regexp.
	  [ruby-core:72185] [Bug #11825]

Wed Dec 23 14:13:59 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* version.h: bump to 2.1.9.  may this version be the last of 2.1.

Wed Dec 16 21:10:03 2015  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/fiddle/handle.c: check tainted string arguments.
	  Patch provided by tenderlove and nobu.

	* test/fiddle/test_handle.rb (class TestHandle): add test for above.

Wed Dec 16 21:10:03 2015  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* ext/dl/handle.c (rb_dlhandle_initialize): prohibits DL::dlopen
	  with a tainted name of library.
	  Patch by sheepman <sheepman AT sheepman.sakura.ne.jp>.

	* ext/dl/handle.c (rb_dlhandle_sym): ditto

Wed Dec 16 16:13:04 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (parse_mode_enc): fix buffer overflow.

Wed Dec 16 16:10:52 2015  Eric Wong  <e@80x24.org>

	* insns.def (opt_case_dispatch): avoid converting Infinity
	* test/ruby/test_optimization.rb (test_opt_case_dispatch_inf): new
	  [ruby-dev:49423] [Bug #11804]'

Wed Dec 16 16:07:29 2015  Rei Odaira  <Rei.Odaira@gmail.com>

	* configure.in: pthread_getattr_np is broken on AIX.
	  More specifically, the stack address and size returned are
	  not correct.

Wed Dec 16 16:04:27 2015  Eric Wong  <e@80x24.org>

	* insns.def (opt_case_dispatch): check Float#=== redefinition
	* test/ruby/test_optimization.rb (test_opt_case_dispatch): new
	  [ruby-core:71920] [Bug #11784]

Tue Dec  8 11:53:06 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (ATOMIC_SIZE_CAS): fix the argument order of
	  InterlockedCompareExchange64.  new value and then old value is
	  the last.

Tue Dec  8 11:45:42 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (enc_m_loader): defer finding encoding object not to
	  be infected by marshal source.  [ruby-core:71793] [Bug #11760]

	* marshal.c (r_object0): enable compatible loader on USERDEF
	  class.  the loader function is called with the class itself,
	  instead of an allocated object, and the loaded data.

	* marshal.c (compat_allocator_table): initialize
	  compat_allocator_tbl on demand.

	* object.c (rb_undefined_alloc): extract from rb_obj_alloc.

Fri Dec  4 10:55:08 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (range_to_s): should be infected by the receiver.
	  str2 infects by appending.  [ruby-core:71811] [Bug #11767]

Wed Dec  2 15:14:29 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/extconf.rb: call dir_config("libedit")
	  if --enable-libedit is spcified. [Bug #11751]
	  patched by John Hein

Tue Dec  1 16:57:57 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_each_codepoint): raise an exception at incomplete
	  character before EOF when conversion takes place.  [Bug #11444]

Tue Dec  1 16:57:57 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_each_codepoint): read more data when read partially.
	  [ruby-core:70379] [Bug #11444]

Tue Dec  1 13:06:29 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/digest/sha1/sha1ossl.c: fixed build error introduced at r52797.

Mon Nov 30 21:29:57 2015  Koichi Sasada  <ko1@atdot.net>

	* insns.def (defined): skip respond_to_missing? when
	  a method is available.
	  [Bug #11211]

	* test/ruby/test_defined.rb: add a test for this fix.

Mon Nov 30 21:27:09 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/digest/rmd160/rmd160.c: fixed commit mistake at r52797.

Mon Nov 30 21:18:24 2015  Shugo Maeda  <shugo@ruby-lang.org>

	* io.c (argf_getpartial): should not resize str if the second
	  argument is not given.
	  [ruby-core:71668] [Bug #11738]

Mon Nov 30 21:17:08 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* lib/net/http.rb: set hostname before call ossl_ssl_set_session.
	  [Bug #11401][ruby-core:70152][fix GH-964] Patch by @mkarnebeek

Mon Nov 30 21:09:48 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (rb_econv_open0): rb_econv_t::source_encoding_name
	  and rb_econv_t::destination_encoding_name should refer static
	  strings always or NULL.  [ruby-core:70247] [Bug #11416]

Mon Nov 30 21:02:21 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/digest/*/*.[ch]: include ruby.h before digest.h to avoid
	  includeing ext/digest/extconf.h. [Bug #3231]
	  https://msdn.microsoft.com/library/36k2cdd4.aspx

	* ext/digest/*/extconf.rb: remove ext/digest from include search path
	  to avoid confusion of cl.exe.

	* ext/digest/*/*.[ch]: explicitly specify def.h's path.

Mon Nov 30 20:54:22 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* Added missing reference of GitHub

Mon Nov 30 20:54:22 2015  Trevor Rowe  <trevorrowe@gmail.com>

	* lib/net/http.rb: Fixed regression for Net::HTTP::PUT with "Expect-100"
	  header. [fix GH-949]
	* test/net/http/test_http.rb: added test.

Wed Nov 18 20:56:50 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906]
	  ruby itself (including numeric.c) is built with strict compile
	  options including -std=iso9899:1999, but ext/date is not.
	  By the way -std=iso9899:1999 is not only a warning option but also
	  changes behavior like MACRO definitions for example INFINITY.
	  gcc on Solaris affect this.

Wed Nov 18 20:38:15 2015  Zachary Scott  <zzak@ruby-lang.org>

	* ext/openssl/ossl_pkey.c: Merge ruby/openssl@b9ea8ef [Bug #10735]

Wed Nov 18 20:31:56 2015  Aaron Patterson <tenderlove@ruby-lang.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_method_tab): Only add SSLv3 support
	  if the SSL library supports it.  Thanks Kurt Roeckx <kurt@roeckx.be>
	  [Bug #11376]

	* ext/openssl/extconf.rb: check for SSLv3 support in the SSL
	  implementation.

	* test/openssl/test_ssl.rb (class OpenSSL): Skip tests that need SSLv3
	  if there is no support.

Wed Nov 18 20:26:08 2015  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_threadptr_exec_event_hooks_orig):
	  maintain trace_running counter on internal events.

	  This patch is made by Takashi Kokubun <takashikkbn@gmail.com>.
	  [Bug #11603] https://github.com/ruby/ruby/pull/1059

Wed Nov 18 20:19:49 2015  Koichi Sasada  <ko1@atdot.net>

	* compile.c (iseq_compile_each): remove duplicated line event.
	  [Bug #10449]

	* test/ruby/test_settracefunc.rb: add and fix tests.

Wed Nov 18 20:14:38 2015  Koichi Sasada  <ko1@atdot.net>

	* vm.c (hook_before_rewind): prevent kicking :return event while
	  finishing vm_exec func because invoke_block_from_c() kick a :return
	  event for bmethods.
	  [Bug #11492]

	* test/ruby/test_settracefunc.rb: add a test.

Wed Nov 18 20:10:31 2015  Aaron Patterson <tenderlove@ruby-lang.org>

	* test/openssl/test_ssl_session.rb: Fix tests so that they take in to
	  account OpenSSL installations that have SSLv3 disabled by default.
	  Thanks Jeremy Evans <code@jeremyevans.net> for the patches.
	  [Bug #11366] [Bug #11367]

Wed Nov 18 20:04:50 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/openssl/test_ssl_session.rb (OpenSSL#test_ctx_client_session_cb):
	  fix test failure with OpenSSL disabled SSLv3 protocol.
	  [ruby-core:63772] [Bug #10046]

Thu Oct 29 23:54:35 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (sym_to_proc), proc.c (rb_block_clear_env_self): clear
	  caller's self which is useless, so that it can get collected.
	  [Fixes GH-592]

Thu Oct 29 23:30:20 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* lib/ipaddr.rb, test/test_ipaddr.rb: Reject invalid address contained
	  EOL string. Patch by @kachick [fix GH-942][Bug #11513]

	* lib/ipaddr.rb, test/test_ipaddr.rb: split test code from library
	  script and move to test script, just like trunk.

Thu Oct 29 23:04:04 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_ssl.c (ssl_npn_select_cb): explicitly raise error
	  in ext/openssl instead of OpenSSL itself because LibreSSL
	  silently truncate the selected protocol name by casting the length
	  from int to unsigned char. [Bug #11369]
	  Patch by Jeremy Evans <merch-redmine@jeremyevans.net>

Thu Oct 29 22:56:01 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check for libunwind.h, which is not available in
	  very old OS X SDK.  [ruby-core:71080] [Bug #11591]

Thu Oct 29 22:51:59 2015  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/drb/test_drb.rb: Run Rinda/DRb tests on localhost. [Fix GH-1027]
	  patch by voxik.

	* test/rinda/test_rinda.rb: ditto

Tue Sep 29 17:39:42 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (literal_concat_gen, evstr2dstr_gen): keep literal
	  encoding beginning with an interpolation same as the source file
	  encoding.  [ruby-core:70703] [Bug #11519]

Tue Sep 29 17:33:13 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rss/rss.rb (Time#w3cdtf): fix zero-trimmed width of fraction
	  digits.  [ruby-core:70667] [Bug #11509]

Tue Sep 29 17:25:14 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (rb_memsearch_wchar, rb_memsearch_qchar): test matching
	  till the end of string.  [ruby-core:70592] [Bug #11488]

	* test/ruby/test_m17n.rb (test_include?, tet_index): add tests by
	  Tom Stuart.

Tue Sep 29 17:20:07 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (reserve_stack): ensure the memory is really
	  allocated. [Bug #11457]

Tue Sep 29 17:18:40 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.8.

Tue Aug 18 21:40:43 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* lib/rubygems.rb: bump version to 2.2.5. this version fixed
	  CVE-2015-3900.

	* lib/rubygems/remote_fetcher.rb: ditto.

	* test/rubygems/test_gem_remote_fetcher.rb: added testcase for CVE-2015-3900

Mon Aug 17 23:27:45 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (API#SetValue): data size should
	  be in bytes, not in chars.  [ruby-core:70365] [Bug #11439]

Mon Aug 17 23:27:45 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (API#SetValue): add terminator
	  size, not 1 byte.  [ruby-core:70365] [Bug #11439]

Mon Aug 17 17:57:12 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (rb_memsearch): should match only char boundaries in wide
	  character encodings.  [ruby-core:70220] [Bug #11413]

Mon Aug 17 17:54:33 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (rb_econv_set_replacement): target encoding name can
	  be empty now.  [ruby-core:69841] [Bug #11324]

Mon Aug 17 17:52:11 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_any_hash): fix Float hash.  rb_dbl_hash() returns a
	  Fixnum, but not a long.  [Bug #9381]

Mon Aug 17 17:43:56 2015  Eric Wong  <e@80x24.org>

	* io.c (rb_io_oflags_modestr): handle O_TRUNC correctly
	* test/ruby/test_io.rb (test_reopen_stdio): new test
	  Patch-by: cremno phobia <cremno@mail.ru>
	  [ruby-core:69779] [Bug #11319]

Mon Aug 17 17:42:18 2015  Benoit Daloze  <eregontp@gmail.com>

	* lib/net/ftp.rb (makeport): close the TCPServer
	  when sending the port fails.

	* test/net/ftp/test_ftp.rb: test for above.

Mon Aug 17 17:38:15 2015  Kazuki Tsujimoto  <kazuki@callcc.net>

	* lib/net/http/response.rb (Net::HTTPResponse::Inflater#finish):
	  fix a bug that empty gzipped response body causes Zlib::BufError.
	  [ruby-core:68846] [Bug #11058]

	* test/net/http/test_httpresponse.rb: tests for the above.

Mon Aug 17 17:38:15 2015  Kazuki Tsujimoto  <kazuki@callcc.net>

	* lib/net/http/response.rb (Net::HTTPResponse#inflater):
	  fix TypeError. An exception object might be nil.
	  [ruby-core:68846] [Bug #11058]

Mon Aug 17 17:38:15 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/response.rb (Net::HTTPResponse.each_response_header):
	  raise first exception even if inflate_body_io.finish raises error.
	  when begin block raises error, finish usually raises error too.

Mon Aug 17 17:16:22 2015  Aaron Patterson <tenderlove@ruby-lang.org>

	* .travis.yml: update libssl before running tests. 
	  Thanks to Chris Sinjakli <chris@sinjakli.co.uk> for figuring out the
	  travis settings!

Mon Aug 17 17:16:22 2015  Aaron Patterson <tenderlove@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): raise a more
	  helpful exception when verifying the peer connection and an
	  anonymous cipher has been selected. [ruby-core:68330] [Bug #10910]
	  Thanks to Chris Sinjakli <chris@sinjakli.co.uk> for the patch.

	* test/openssl/test_ssl.rb (class OpenSSL): test for change

Mon Aug 17 17:12:46 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (waitpid): return immediately if interrupted.
	  reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340]

Mon Aug 17 17:09:02 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (lambda_body): pop cmdarg stack for lookahead
	  token.  [ruby-core:70067] [Bug #11380]

Mon Aug 17 17:04:57 2015  Jeremy Evans  <merch-redmine@jeremyevans.net>

	* test/openssl/test_ssl.rb: Fix LocalJumpErrors being raised
	  in OpenSSL tests. [ruby-core:70020][Bug #11368]

Mon Aug 17 16:51:45 2015  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/timeout.rb (ExitException): leave Timeout::ExitException as an
	  alias of Timeout::Error for backward compatibility in stable branch.
	  [ruby-dev:49179] [Bug #11344]

Mon Aug 17 16:51:45 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (ExitException): removed internal exception class
	  and use Timeout::Error instead, as using throw/catch to isolate
	  each timeouts now.  [ruby-dev:49179] [Bug #11344]

Mon Aug 17 16:49:00 2015  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/net/http/test_httpresponse.rb
	(HTTPResponseTest#test_read_body_content_encoding_deflate_uppercase):
	fix a failure without zlib.

Mon Aug 17 16:49:00 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/response.rb (inflater): CONTENT_ENCODING can be upper
	  case. [ruby-core:69670] [Bug #11285] patched by Andy Chu

Mon Aug 17 16:46:28 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (m_core_hash_merge_ptr): copy the arguments to the machine
	  stack before rewinding the control frame pointer and leaving the
	  arguments outside valid region of the value stack.
	  [ruby-core:69969] [Bug #11352]

	* vm.c (REWIND_CFP): keep the arguments region inside the valid
	  value stack.  [ruby-core:69969] [Bug #11352]

Mon Aug 17 16:44:01 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_reverse): reversed string is not a substring,
	  and should not set coderange of the original string.
	  [ruby-dev:49189] [Bug #11387]

Mon Aug 17 16:24:10 2015  Tanaka Akira  <akr@fsij.org>

	* lib/time.rb (strptime): Support %s.%N.
	  [ruby-core:68301] [Bug #10904] Patch by Sadayuki Furuhashi.

Mon Aug 17 16:22:28 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (load_transcoder_entry): fix transcoder loading race
	  condition, by waiting in require.  [ruby-dev:49106] [Bug #11277]

Mon Aug 17 16:18:13 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (ary_ensure_room_for_push): check if array size will
	  exceed maximum size to get rid of buffer overflow.
	  [ruby-dev:49043] [Bug #11235]

	* array.c (ary_ensure_room_for_unshift, rb_ary_splice): ditto.

Mon Aug 17 16:14:38 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (Win32::Registry::API): use wide
	  versions of RegDeleteValue and RegDeleteKey.
	  [ruby-core:67958] [Bug #10820]

Tue Jul  7 13:39:46 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* ext/zlib/zlib.c: Fix indentation for rdoc.
	  [Bug #11221][ruby-core:69465]

Tue Jul  7 13:37:34 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.gemspec: Fix require paths for released gem.
	  [fix GH-929] Patch by @voxik
	* ext/io/console/io-console.gemspec: ditto.

Fri Jul  3 21:54:46 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_require.rb (TestRequire#test_loading_fifo_threading):
	  fix previous commit.  [Bug #11060]

Fri Jul  3 19:28:51 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_require.rb (TestRequire#test_loading_fifo_threading):
	  ignore Errno::ENOENT on unlinking.  [Bug #11060]

Fri Jul  3 18:40:48 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (pkg_config): split --libs if --libs-only-l option
	  is not available.  patch in [ruby-core:69428] by Hans Mackowiak.
	  [ruby-core:69421] [Bug #11201]

Fri Jul  3 18:32:37 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): out of range NTH_REF is always
	  nil.

	* parse.y (parse_numvar): check overflow of NTH_REF and range.
	  [ruby-core:69393] [Bug #11192]

	* util.c (ruby_scan_digits): make public and add length parameter.

Fri Jul  3 17:53:43 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_method_call_status): resolve refined method entry
	  to check if undefined.  [ruby-core:69064] [Bug #11117]

Fri Jul  3 17:53:43 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_method_call_status): undefined refined method is
	  not callable unless using.  [ruby-core:69064] [Bug #11117]

Fri Jul  3 17:44:27 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_load_ok): try opening file without gvl not to
	  lock entire process.  [Bug #11060]

Tue Jun 30 11:56:24 2015  Eric Wong  <e@80x24.org>

	* numeric.c (bit_coerce): use original value for error message
	  [ruby-core:67405] [Bug #10711]
	* test/ruby/test_numeric.rb (test_coerce): check error message

Mon Jun 29 13:22:14 2015  Shota Fukumori  <her@sorah.jp>

	* ext/objspace/objspace_dump.c(dump_object): Return empty JSON object when
	  passed object is a special const, instead of SEGV.
	  Based patch by Kohei Suzuki (eagletmt). [ruby-core:69692] [Bug #11291]

	* test/objspace/test_objspace.rb(test_dump_special_consts): Test for above fix.


Wed Jun 17 11:39:15 2015  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (lep_svar_set): add WBs.

Tue Jun  9 16:29:49 2015  Eric Wong  <e@80x24.org>

	* ext/socket/ancdata.c: use RB_GC_GUARD instead of volatile
	  [ruby-core:69419] [Feature #11198]

Tue Jun  9 16:26:48 2015  Eric Wong  <e@80x24.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
	  ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
	  [ruby-core:69371] [Bug #11185]

Tue Jun  9 16:24:25 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* win32/win32.c (setup_overlapped): seek to the file end only when
	  writing (mode:a), not reading (mode:a+, read).

Tue Jun  9 16:15:31 2015  Aaron Patterson <tenderlove@ruby-lang.org>

	* load.c (loaded_feature_path): stop returning false negatives for
	  filenames which are trailing substrings of file extensions.  For
	  example, 'b', which a trailing substring of ".rb" should not return
	  false. [Bug #11155][ruby-core:69206]

	* test/ruby/test_autoload.rb: test for fix

Fri May 29 14:03:33 2015  Matt Hoyle  <matt@deployable.co>

	* ext/bigdecimal/bigdecimal.c (VpSetPTR): fix a typo, 'expoennt'
	  to 'exponent'.  [ruby-core:67980] [Bug #10823] [Fix GH-825]

Fri May 29 14:00:16 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/file.c (rb_file_expand_path_internal): neither the drive
	  of base directory nor the current drive are involved in the
	  result if different than the drive of path.
	  [ruby-core:68130] [Bug #10858]

Fri May 29 14:00:16 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/file.c (rb_file_expand_path_internal): do not make invalid
	  (or ADS) path if the path has a drive letter, the result also
	  should have be under it.  [ruby-core:68130] [Bug #10858]

Fri May 29 13:41:44 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* marshal.c (r_symreal): register the symbol name first so that
	  r_symlink always returns valid names. [Bug #10991]

Thu May 28 09:51:28 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_any_hash): use same hash values with Float#hash so
	  that -0.0 and +0.0 will be identical.
	  [ruby-core:68541] [Bug #10979]

Thu May 21 14:15:10 2015  Eric Wong  <e@80x24.org>

	* ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard
	  [Bug #11123]

Thu May 21 14:11:50 2015  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (body_ext_mpart): should work even if body-fld-dsp
	  is omitted.  [ruby-core:69093] [Bug #11128]

Thu May 21 14:08:15 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* string.c: added documentation for character sequence \' with String#sub
	  [Bug #11132][ruby-core:69121][fix GH-900][ci skip] Patch by @shishir127

Thu May 21 14:04:06 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (linear_object_p, range_include): test if covered for
	  linear objects.  [ruby-core:69052] [Bug #11113]

Thu May 21 14:01:40 2015  SHIBATA Hiroshi  <hsbt@ruby-lang.org>

	* rational.c: Added documentation for rational literal.
	  [Bug #11075][fix GH-885][ci skip] Patch by @shishir127

Thu May 21 13:57:47 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/ipsocket.c (init_inetsock_internal): preserve errno
	  before other library calls and use rb_syserr_fail.
	  [ruby-core:68531] [Bug #10975]

Thu May 21 13:32:52 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of
	  conflict on cygwin.  [ruby-core:68877] [Bug #11065]

Thu May 21 13:28:03 2015  Koichi Sasada  <ko1@atdot.net>

	* vm.c (vm_exec): check other events when RETURN is thrown.
	  [Bug #10724]

	* test/ruby/test_settracefunc.rb: add a test.

Thu May 21 13:23:44 2015  Masahiro Tomita  <tommy@tmtm.org>

	* ext/socket/raddrinfo.c (addrinfo_mload): fix memory leak of
	  addrinfo.  [ruby-dev:48923] [Bug #11051]

Thu May 21 13:19:52 2015  Kenta Murata  <mrkn@cookpad.com>

	* bigdecimal: conform to ruby's license.  [ruby-core:68466] [Bug #10952]

Thu May 21 09:49:01 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (id2ref): prohibit from accessing internal objects.
	  [ruby-core:68348] [Bug #10918]

Thu May 21 09:46:58 2015  Rei Odaira  <Rei.Odaira@gmail.com>

	* ext/pty/pty.c: AIX supports autopush.
	  Patch by Perry Smith [ruby-core:58539] [Bug #9144]

Wed May 20 17:34:43 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (rb_iseq_compile_with_option): check source type, must be
	  an IO or a String.  [ruby-core:69219] [Bug #11159]

Wed May 13 14:32:13 2015  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS::Label::Str#==): Check class equality.
	  (Resolv::DNS::Name#initialize): Normalize labels as
	  Resolv::DNS::Label::Str objects.

Tue May 12 16:11:55 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/tk/extconf.rb: support Tcl/Tk8.6.

	* ext/tk/tcltklib.c, ext/tk/lib/tk.rb: get rid of SEGV with Tcl/Tk8.6.
	  [Backport #10401]

Mon May 11 11:09:08 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dln.c (dln_load): check if a different libruby is loaded by the
	  extension library, and then bail out to get rid of very frequent
	  reported stale bug reports.

	* dln.c (dln_load): raise fatal error on OSX not other extension
	  libraries to refer different libruby.

Mon May 11 10:59:53 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (lambda): push and reset cmdarg_stack in lambda body.
	  [ruby-core:69017] [Bug #11107]

Tue Apr 28 14:15:49 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/fileutils.rb (FileUtils#mv): show the exact target path in
	  the error message instead of the destination parent directory
	  name.  patched by Joao Britto <jabcalves AT gmail.com> at
	  [ruby-core:68706].  [Bug #11021]

Tue Apr 28 14:14:16 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (reserve_stack): keep sp safe zone to get rid
	  of crash by -fstack-check.  [ruby-core:68740] [Bug #11030]

Fri Apr 24 17:27:31 2015  Koichi Sasada  <ko1@atdot.net>

	* test/fiddle/test_handle.rb: fix syntax.

Tue Apr 14 16:02:07 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.7.

Mon Apr 13 22:17:59 2015  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl.rb: stricter hostname verification
	  following RFC 6125. with the patch provided by Tony Arcieri and
	  Hiroshi Nakamura [ruby-core:61545] [Bug #9644]
	* test/openssl/test_ssl.rb: add tests for above.

Mon Apr 13 17:09:06 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (different_device_p): compare by volume serial
	  numbers, not by path names.  [ruby-core:68162] [Bug #10865]

Mon Apr 13 17:09:06 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (wrename): return EXDEV if moving a directory to
	  another drive, since MoveFileExW does not set proper error code.
	  [ruby-core:68162] [Bug #10865]

Mon Apr 13 17:02:25 2015  Scott Francis  <scott.francis@shopify.com>

	* thread_pthread.c (reserve_stack): fix intermittent SIGBUS on
	  Linux, by reserving the stack virtual address space at process
	  start up so that it will not clash with the heap space.
	  [Fix GH-822]

Mon Apr 13 16:52:14 2015  Koichi Sasada  <ko1@atdot.net>

	* class.c (rb_prepend_module): need a WB for klass -> origin.

Mon Apr 13 16:48:14 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (vm_call_super): search next super class from the
	  original class, to get rid of infinite recursion with
	  prepending.  a patch by Seiei Higa <hanachin AT gmail.com> at
	  [ruby-core:68434].  [ruby-core:68093] [Bug #10847]

Mon Apr 13 16:39:57 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (arg): fix segfault by null caused by syntax error.
	  [ruby-core:68851] [Bug #10957]

Tue Mar 31 00:49:23 2015  Naohisa Goto  <ngotogenome@gmail.com>

	* gc.c (wmap_final_func): fix memory size shortage when realloc wmap.
	  Fix SEGV during finalize of WeakRef on Solaris (though the SEGV
	  could occur on all OS/platforms). [ruby-dev:48779] [Bug #10646]

Tue Mar 31 00:38:14 2015  Seiei Higa  <hanachin@gmail.com>

	* vm_method.c (rb_method_entry): if no super class, no original
	  method entry.  [ruby-core:67389] [Bug #10707]

Tue Mar 31 00:34:39 2015  Vit Ondruch  <vondruch@redhat.com>

	* configure.in (RUBY_SETJMP_TYPE): Remove superfluous semicolon
	  which causes a syntax error with autoconf 2.63.
	  [ruby-core:67429] [Bug #10716]

Tue Mar 31 00:32:04 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/fiddle/test_handle.rb (test_NEXT): use -test-/dln/empty
	  which is always a shared object and is not used by others.
	  [ruby-dev:48629] [Bug #10384]

Tue Mar 31 00:18:12 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): empty parentheses at cmdarg can be null.
	  [ruby-core:68477] [Bug #10957]

Mon Mar 30 23:30:57 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (console_dev): id_console is not a
	  constant name, use rb_const_remove() to get rid of NameError.

Sun Mar 22 04:15:39 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/thread/thread.c (Init_thread): ConditionVariable and Queue
	  are not able to copy.  [ruby-core:59961] [Bug #9440]

Wed Mar 18 02:42:37 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also
	  `cmd`, so must not free before using `cmd`.
	  [ruby-core:66648] [Bug #10563]

Wed Mar 18 02:40:18 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (constat_reset): do nothing on non-standard
	  console emulators.  [ruby-core:66471] [Bug #10546]

Wed Mar 18 02:03:02 2015  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_insnhelper.c (rb_vm_rewrite_cref_stack): copy nd_refinements
	  of original crefs. It fixes segmentation fault when calling
	  refined method in duplicate module. [ruby-dev:48878] [Bug #10885]

	* vm_core.h, class.c: change accordingly.

	* test/ruby/test_refinement.rb: add a test for above.

Wed Mar 18 01:58:18 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/sdbm/_sdbm.c: include ruby/ruby.h for PRIdPTRDIFF when a
	  macro `DEBUG` is defined.  based on the patch by Owen Rodley in
	  [ruby-core:67987]. [Bug #10825]

Wed Mar 18 01:45:12 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
	  interference by modifying global variables in have_devel? method.
	  [ruby-core:67962] [Bug #10821]

Wed Mar 18 00:58:43 2015  Shugo Maeda  <shugo@ruby-lang.org>

	* class.c (method_entry_i, class_instance_method_list,
	  rb_obj_singleton_methods): should not include methods of
	  superclasses if recur is false. [ruby-dev:48854] [Bug #10826]

Wed Mar 18 00:58:43 2015  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (remove_method): When remove refined
	  method, raise a NameError if the method is not
	  defined in refined class.
	
	  But if the method is defined in refined class,
	  it should keep refined method and remove original
	  method.
	  
	  Patch by Seiei Higa. [ruby-core:67722] [Bug #10765]

Wed Mar 18 00:32:08 2015  Seiei Higa  <hanachin@gmail.com>

	* vm_method.c (check_definition): Module#public_method_defined?,
	  Module#private_method_defined?, Module#protected_method_defined?
	  should not use refinements. [ruby-core:67656] [Bug #10753]

Tue Mar 10 02:40:11 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* thread.c: Improve documentation for Thread#value
	  [Bug #10694][ruby-core:67324][ci skip]

Tue Mar 10 02:37:55 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* string.c: [DOC] Add missing documentation around String#chomp.
	  Patch by @stderr [ci skip][fix GH-780]

Mon Mar  9 22:30:50 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* spec/default.mspec: use default configuration file name.
	  https://github.com/ruby/rubyspec/commit/cc69f337b06362e5607ffa3e3ad40ef7494960cf

Mon Mar  9 22:30:50 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* spec/default.mspec: remove specific version number.
	  https://github.com/ruby/rubyspec/commit/7a909e925c1baa9c700bd44af9241aef6e596714

Mon Mar  9 22:27:47 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* common.mk: use ruby organization for rubyspec.

Mon Mar  9 21:52:41 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic.build):
	  use hostname= to detect and wrap IPv6 hosts.
	  Build is accepting URI components and users may not expect
	  that a host component needs to be wrapped with square brackets
	  since it's not providing a URI.
	  Note: initialize with arg_check => true does not wrap IPv6 hosts.
	  by Joe Rafaniello <jrafanie@redhat.com>
	  https://github.com/ruby/ruby/pull/765 fix GH-765

	* test/uri/test_generic.rb: Add more tests

Tue Mar  3 02:42:27 2015  Eric Wong  <e@80x24.org>

	* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX
	  Thanks to Yura Sokolov <funny.falcon@gmail.com>
	  [ruby-core:68369] [Bug#10923]
	* test/io/wait/test_io_wait.rb (test_nread_buffered):
	  fix broken test

Sun Mar  1 02:30:23 2015  Seiei Higa  <hanachin@gmail.com>

	* vm_method.c (rb_alias): raise a NameError when creating alias to
	  a refined method if the original method of the refined method is
	  not defined.  [ruby-core:67523] [Bug #10731]

Sun Mar  1 01:17:24 2015  Seiei Higa  <hanachin@gmail.com>

	* vm_method.c (rb_export_method): bail out if the original method
	  is undefined when the method is refined.
	  [ruby-core:67387] [Bug #10706]

Sun Mar  1 01:14:59 2015  Eric Wong  <e@80x24.org>

	* lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
	  [ruby-core:67411] [Bug #10712]

Sun Mar  1 01:01:21 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* lib/net/http.rb (Net::HTTP#send_request): there is no response body
	  with HEAD request. Patch by @rodrigosaito [fix GH-520]

Sun Mar  1 01:01:21 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/net/http/test_http.rb (_test_send_request__HEAD): Added
	  failing test for send_request with HEAD method.

Sun Mar  1 00:58:30 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* ext/zlib/zlib.c: fix document of method signatures.
	  [Bug #10668][ruby-core:67186][ci skip]

Sat Feb 28 02:13:17 2015  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Str
	  objects.  Label#Str#== is case-insensitive.

Sat Feb 28 02:13:17 2015  Ben Miller  <bmiller@rackspace.com>

	* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
	  comparison should be case-insensitive as well.
	  [ruby-core:66498] [Bug #10550]

Sat Feb 28 02:13:17 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::DNS::Name): names with different dots
	  should be different.

Thu Feb 19 19:14:34 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/response.rb (Net::HTTPResponse): require one or more
	  spaces [Bug #10591].
	  by leriksen <leif.eriksen.au@gmail.com>
	  https://github.com/ruby/ruby/pull/782 fix GH-782
	  NOTE: graph.facebook.com returns without SP Reason-Phrase.

Thu Feb 19 19:10:53 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* ext/tk/lib/tkextlib/tcllib/plotchart.rb: fix to invoke correct function
	  of tcllib. Patch by @zalt50 [fix GH-787]

Wed Feb 18 00:27:57 2015  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Do not attempt SSL session resumption when the
	  session is expired.  [Bug #10533]

Wed Feb 18 00:20:36 2015  Eric Wong  <e@80x24.org>

	* vm_eval.c (rb_yield_splat): add missing GC guard
	  [Bug #10509]

Wed Feb 18 00:18:12 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
	  CR.  should check if substitution occurred too.
	  [ruby-dev:48813] [Bug #10732]

Tue Feb 17 22:59:31 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements
	  returned by Kernel#instance_variables are Symbols now.
	  [ruby-core:68128] [Bug #10857]

Sun Feb 15 07:29:12 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/getaddrinfo.c (get_addr): reject too long hostname to
	  get rid of GHOST vulnerability on very old platforms.

	* ext/socket/raddrinfo.c (make_hostent_internal): ditto, paranoic
	  check for the canonical name.

Mon Feb  2 22:57:30 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/etc/etc.c (etc_getlogin): set login name encoding properly.
	  [ruby-core:66163] [Bug #10493]

Mon Feb  2 22:47:35 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (method_proc): the receiver of binding from method should
	  be same as the receiver of the method.
	  [ruby-core:65917] [Bug #10432]

Mon Feb  2 22:43:42 2015  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/resolv.rb: fall back if canonicalization fails.
	  Thanks Vit Ondruch for the patch!  [ruby-core:65836]

	* test/resolv/test_dns.rb: test for patch

Mon Feb  2 22:38:53 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rb_cv_binary_elf): get rid of -e option of cat
	  which is not available on BusyBox, use tr instead.
	  [ruby-core:64824] [Bug #10210]

Thu Jan 22 20:40:36 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_cipher.c (ossl_cipher_update_long): update huge
	  data gradually not to exceed INT_MAX.  workaround of OpenSSL API
	  limitation.  [ruby-core:67043] [Bug #10633]

Thu Jan 22 01:14:12 2015  NAKAMURA Usaku  <usa@ruby-lang.org>

	* signal.c (ruby_signal): since SIGKILL is not supported by MSVCRT,
	  should be treated before calling signal(3).
	  [Bug #10615]

Thu Jan 22 01:02:16 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (exec_recursive): use the same last method name as
	  recursive_push in the error message when recursive_pop failed.
	  [ruby-core:66742] [Bug #10579]

Thu Jan 22 01:02:16 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_frame_last_func): return the most recent frame method
	  name.

	* thread.c (recursive_list_access): use the last method name,
	  instead of the current method name which can be unset in some
	  cases, not to use a symbol by the invalid ID.
	  [ruby-core:66742] [Bug #10579]

Thu Jan 22 00:54:00 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (symbol_list): fix the node type of literal symbol list
	  with no interpolation.  [ruby-core:66343]

Thu Jan 22 00:49:52 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c: [DOC] Revise documentation by Marcus Stollsteimer at
	  [ruby-core:66368].  [Bug #10526]

	  * #inspect: be more specific about generated string, remove
	    obsolete example.
	  * #nil?: use code examples instead of different call-seq's.
	  * #tap: clarify what is yielded.
	  * Integer(): be more specific about to_int and to_i, remove
	    reference to Ruby 1.8.
	  * Array(): fix error.
	  * Class: fix variable name style and indentation in example.
	  * improve consistency, fix typos and formatting.

Thu Jan 22 00:49:52 2015  Benoit Daloze  <eregontp@gmail.com>

	* object.c (Module#const_defined?): [DOC] Revise the documentation.
	  Patch by Xavier Noria.
	  [Fixes GH-754] https://github.com/ruby/ruby/pull/754

Thu Jan 22 00:49:52 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* object.c: fix document of Kernel.Stirng by @suzukaze
	  [fix GH-743][ci skip]

Thu Jan 22 00:25:15 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (rb_f_load): path name needs to be transcoded to OS path
	  encoding.  [ruby-list:49994]

Wed Jan 21 04:36:27 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (NET_LUID): include winsock2.h instead of windows.h.
	  patch by Jon Forums in [ruby-core:67125].  [Bug #10640]

Wed Jan 21 04:36:27 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (NET_LUID): include also ifdef.h as a workaround of
	  a bug in mingw-w64 header.  [ruby-core:67103] [Bug #10640]

Wed Jan  7 22:34:52 2015  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/config_files.rb: use config.guess in gcc repo.

Tue Jan  6 00:04:38 2015  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/ruby/test_io.rb: added timeout for AIX environment.
	  [ruby-core:62983][Bug #9917]

Mon Jan  5 23:58:50 2015  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/test_string.rb(test_LSHIFT_neary_long_max):
	  increase timeout for Arch Linux CI environment.

Wed Dec 31 00:00:09 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead
	  of parser to handle IPv6 address. [Bug #9129]

Tue Dec 30 23:46:26 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rubygems/*: upgrade to RubyGems 2.2.3. [Backport #10515]

Thu Nov 13 22:32:34 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rexml/document.rb: add REXML::Document#document.
	  reported by Tomas Hoger <thoger@redhat.com> and patched by nahi.

Thu Nov  6 22:57:43 2014  Naohisa Goto  <ngotogenome@gmail.com>

	* bignum.c (absint_numwords_generic): set an array element after
	  definition of a variable to fix compile error with older version
	  of fcc (Fujitsu C Compiler) 5.6 on Solaris 10 on Sparc.
	  [Bug #10350] [ruby-dev:48608]

Thu Nov  6 22:36:55 2014  Naohisa Goto  <ngotogenome@gmail.com>

	* compile.c (compile_data_alloc): add padding when strict alignment
	  is required for memory access. Currently, the padding is enabled
	  only when the CPU is 32-bit SPARC and the compiler is GCC.
	  [Bug #9681] [ruby-core:61715]

	* compile.c (STRICT_ALIGNMENT): defined if strict alignment is required

	* compile.c (ALIGNMENT_SIZE, ALIGNMENT_SIZE_MASK, PADDING_SIZE_MAX):
	  new macros for alignemnt word size, bit mask, max size of padding.

	* compile.c (calc_padding): new function to calculate padding size.

Wed Nov  5 00:18:22 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (__builtin_setjmp): disable with gcc/clang earlier
	  than 4.3 on Mac OS X.  [ruby-core:65174] [Bug #10272]

Wed Nov  5 00:01:04 2014  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_balance_with_mulfunc): Fix free work area
	  location.
	  [ruby-dev:48723] [Bug #10464]
	  [ruby-core:66044] [Bug #10465]
	  Reported by Kohji Nishihama.

Tue Oct 28 22:30:21 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: remove apple-gcc4.2 from CC candidates.

Tue Oct 28 22:19:44 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.5.

Mon Oct 27 20:20:14 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rexml/entity.rb: keep the entity size within the limitation.
	  reported by Willis Vandevanter <will@silentrobots.com> and
	  patched by nahi.

Sun Oct 26 03:31:46 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_method_entry_make): warn redefinition only for
	  already defined methods, but not for undefined methods.
	  [ruby-dev:48691] [Bug #10421]

Sun Oct 26 03:21:30 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (unknown_keyword_error): delete expected keywords
	  directly from raw table, so that the given block is not called.
	  [ruby-core:65837] [Bug #10413]

Wed Oct 22 23:02:49 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl.rb (DEFAULT_PARAMS): override
	  options even if OpenSSL::SSL::OP_NO_SSLv3 is not defined.
	  this is pointed out by Stephen Touset. [ruby-core:65711] [Bug #9424]

Wed Oct 22 23:02:49 2014  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* test/openssl/test_ssl.rb: Reuse TLS default options from
	  OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.

Wed Oct 22 23:02:49 2014  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* lib/openssl/ssl.rb: Explicitly whitelist the default
	  SSL/TLS ciphers. Forbid SSLv2 and SSLv3, disable
	  compression by default.
	  Reported by Jeff Hodges.
	  [ruby-core:59829] [Bug #9424]

Sun Oct 19 03:22:53 2014  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_core.h, vm.c, proc.c: fix GC mark miss on bindings.
	  [ruby-dev:48616] [Bug #10368]

	* test/ruby/test_eval.rb: add a test code.

Sun Oct 19 03:13:38 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_here_document): do not append already appended
	  and disposed code fragment.  [ruby-dev:48647] [Bug #10392]

Thu Oct 16 22:10:11 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
	  should be writable any encoding strings, without conversion.
	  [ruby-core:65240] [Bug #10285]

Thu Oct 16 22:06:03 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): fix super from eval with
	  scope.  set klass in the current control frame to the class of
	  the receiver in the context to be evaluated, this class/module
	  must match the actual receiver to call super.
	  [ruby-core:65122] [Bug #10263]

Thu Oct 16 00:30:30 2014  Tanaka Akira  <akr@fsij.org>

	* lib/find.rb (Find.find): Call to_path for arguments to obtain
	  strings.
	  [ruby-core:63713] [Bug #10035] Reported by Herwin.

Thu Oct 16 00:20:12 2014  Eric Wong  <e@80x24.org>

	* object.c (rb_class_real): do not dereference 0 VALUE

	* test/ruby/test_module.rb (test_inspect_segfault):
	  Test case and bug report by Thomas Stratmann.
	  [ruby-core:65214] [Bug #10282]

Thu Oct 16 00:10:45 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* signal.c (rb_f_kill): get rid of deadlock as unhandled and
	  discarded signals do not make interrupt_cond signaled.
	  based on the patch by Kazuki Tsujimoto at [ruby-dev:48606].
	  [Bug #9820]

Thu Oct 16 00:10:45 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* signal.c (rb_f_kill): should not ignore signal unless the
	  default handler is registered.  [ruby-dev:48592] [Bug #9820]

Wed Oct 15 23:58:13 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	merge r47598 partially. extracted commits are as follows. [Bug #9728]
	https://github.com/k-takata/Onigmo/commit/15ddec6d18e27fdc1988236764e766fd5892ecf5

Wed Oct 15 23:50:33 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* lib/fileutils.rb: handle ENOENT error with symlink targeted to
	  non-exists file. [ruby-dev:45933] [Bug #6716]

Wed Oct 15 23:25:24 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: NetBSD's ksh, used by configure, needs escapes.

Wed Oct 15 23:13:43 2014  Eric Wong  <e@80x24.org>

	* array.c (ary_recycle_hash): add RB_GC_GUARD
	  (rb_ary_diff): remove volatile
	  [Bug #10369]

Wed Oct 15 23:10:07 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_s_aref): fix rdoc.  `Dir.glob` allows an array but
	  `Dir[]` not.  the former accepts an optional parameter `flags`,
	  while the latter accepts arbitrary number of arguments but no
	  `flags`.  [ruby-core:65265] [Bug #10294]

Wed Oct 15 23:08:02 2014  Rei Odaira  <Rei.Odaira@gmail.com>

	* configure.in: Fix typo. [Bug #9914]

Wed Oct 15 22:46:52 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* error.c: update exception tree. [DOC]
	  reported by @hemge via twitter.

Wed Sep 24 02:30:55 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parse_ident): just after a label, new expression should
	  start, cannot be a modifier.  [ruby-core:65211] [Bug #10279]

Wed Sep 24 02:21:41 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (VCSUP): nothing to do if this worktree is not
	  under any VCS (it means that the worktree may be from the release
	  package).

Wed Sep 24 02:06:33 2014  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_time_tz.rb: Fix test error with tzdata-2014g.
	  [ruby-core:65058] [Bug #10245] Reported by Vit Ondruch.

Wed Sep 24 02:06:33 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/minitest/test_minitest_unit.rb: removed obsoleted condition
	  for Ruby 1.8.
	* test/ruby/test_time_tz.rb: ditto.

Wed Sep 24 01:43:13 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.4.

Fri Sep 19 00:58:34 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.3.

Mon Sep 15 23:12:47 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* signal.c (check_stack_overflow): drop the last tag too close to
	  the fault page, to get rid of stack overflow deadlock.
	  [Bug #9971]

Mon Sep 15 22:34:39 2014  Natalie Weizenbaum  <nweiz@google.com>

	* ext/pathname/lib/pathname.rb (SAME_PATHS):
	  Pathname#relative_path_from uses String#casecmp to compare strings
	  on case-insensitive filesystem platforms (e.g., Windows). This can
	  return nil for strings with different encodings, and the code
	  previously assumed that it always returned a Fixnum.  [Fix GH-713]

Mon Sep 15 22:31:33 2014  Sho Hashimoto  <sho.hsmt@gmail.com>

	* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof): fix typo,
	  SIZEOF_LONG_LON.  [Fix GH-714]

Mon Sep 15 11:08:23 2014  Shota Fukumori  <her@sorah.jp>

	* lib/mkmf.rb (configuration): Make CXXFLAGS customizable.
	  Patch by Kohei Suzuki (eagletmt). [Fixes GH-492]

Mon Sep 15 01:06:35 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#pkg_config): append --cflags to also
	  $CXXFLAGS, as they are often used by C++ compiler.
	  [ruby-core:54532] [Bug #8315]

Mon Sep 15 00:02:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/csv.rb (CSV#<<): honor explicitly given encoding.  based on
	  the patch by DAISUKE TANIWAKI <daisuketaniwaki AT gmail.com> at
	  [ruby-core:62113].  [Bug #9766]

Wed Sep 10 23:36:38 2014  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_object.rb: extend timeout.

Wed Sep 10 23:36:38 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_copy_ivar): allocate no memory for empty
	  instance variables.  [ruby-core:64700] [Bug #10191]

Wed Sep 10 23:36:38 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_copy_ivar): extract function to copy instance
	  variables only for T_OBJECT from init_copy.

Wed Sep 10 23:14:42 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	merge r46831 partially. extracted commits are as follows. [Bug #9344]
	https://github.com/k-takata/Onigmo/commit/bdfc1997aa15b6baddaf9a482c6610b32504bd86

	* regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
	  this includes Support for Unicode 7.0 [Bug #9092].

Wed Sep 10 22:58:25 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (Doxyfile): revert r43888, not to require preinstalled
	  ruby.  [ruby-core:64488] [Bug #10161]

Wed Sep 10 03:29:48 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_close): ignore only "closed stream" IOError and
	  NoMethodError, do not swallow other exceptions at the end of
	  block.  [ruby-core:64463] [Bug #10153]

Wed Sep 10 03:17:13 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/trans/euckr-tbl.rb (EUCKR_TO_UCS_TBL): add missing euro and
	  registered signs.  [ruby-core:64452] [Bug #10149]

Wed Sep 10 03:01:31 2014  Eric Wong  <e@80x24.org>

	* time.c (time_timespec): fix tv_nsec overflow
	  [Bug #10144]

Wed Sep 10 02:51:38 2014  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (rb_iseq_clone): Should not insert write barrier from
	  non-RVALUE data (to non-RVALUE data, of course).

	  Ruby 2.1 also has a same problem.

Wed Sep 10 02:33:08 2014  Koichi Sasada  <ko1@atdot.net>

	* parse.y (setup_fake_str): fake strings should not set class by
	  RBASIC_SET_CLASS() because it insert write barriers to fake
	  (non-RVALUE) structure.

	  It can cause unexpected behaviour.

Fri Sep  5 17:01:38 2014  Zachary Scott  <e@zzak.io>

	* lib/rdoc/generator/template/darkfish/js/jquery.js: Backport
	  rdoc/rdoc@74f60fcb04fee1778fe2694d1a0ea6513f8e67b7

Sat Sep  6 00:57:07 2014  Eric Wong  <e@80x24.org>

	* ext/zlib/zlib.c (gzfile_reset): preserve ZSTREAM_FLAG_GZFILE
	  [Bug #10101]

	* test/zlib/test_zlib.rb (test_rewind): test each_byte

Sat Sep  6 00:47:32 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rb_cv_broken_backtrace): exit with failure
	  normally, no needs to abort.  [ruby-core:63678] [Bug #10008]

Sat Sep  6 00:05:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h, win32/win32.c (rb_w32_inet_pton): add a
	  wrapper function for inet_pton minimum supported client is
	  Vista, as well as inet_ntop.

Sat Sep  6 00:05:02 2014  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ext/socket/raddrinfo.c (rb_getaddrinfo): second argument of
	  MEMZERO is type.  Coverity Scan found this bug.

Sat Sep  6 00:05:02 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket/raddrinfo.c (numeric_getaddrinfo): Use xcalloc.
	  Suggested by Eric Wong.
	  https://bugs.ruby-lang.org/issues/9525#note-14

Sat Sep  6 00:05:02 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket: Bypass getaddrinfo() if node and serv are numeric.
	  Reporeted by Naotoshi Seo.  [ruby-core:60801] [Bug #9525]

	* ext/socket/extconf.rb: Detect struct sockaddr_in6.sin6_len.

	* ext/socket/sockport.h (SET_SIN6_LEN): New macro.
	  (INIT_SOCKADDR_IN6): Ditto.

	* ext/socket/rubysocket.h (struct rb_addrinfo): Add
	  allocated_by_malloc field.

	* ext/socket/raddrinfo.c (numeric_getaddrinfo): New function.
	  (rb_getaddrinfo): Call numeric_getaddrinfo at first.
	  (rb_freeaddrinfo): Free struct addrinfo properly when it is
	  allocated by numeric_getaddrinfo.

Sat Sep  6 00:05:02 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket: Wrap struct addrinfo by struct rb_addrinfo.

Thu Sep  4 00:31:23 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/thread/thread.c (get_array): check instance variables are
	  initialized properly.  [ruby-core:63826][Bug #10062]

Thu Sep  4 00:29:10 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_initialize): [DOC] fix rdoc of append mode.  it does
	  not move the pointer at open.  [ruby-core:63747] [Bug #10039]

Thu Sep  4 00:23:15 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (GETASTER): should not use the numbered argument to be
	  formatted, raise ArgumentError instead.
	  [ruby-dev:48330] [Bug #9982]

Thu Sep  4 00:21:05 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/openssl/test_pkey_rsa.rb (OpenSSL#test_sign_verify_memory_leak):
	  added timeout into testcase for low performance environment.
	  [Bug #9984][ruby-core:63367]

Tue Sep  2 02:21:58 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (env_aset, env_has_key, env_assoc, env_has_value),
	  (env_rassoc, env_key): prohibit tainted strings if $SAFE is
	  non-zero.  [Bug #9976]

Tue Sep  2 02:08:12 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* signal.c (rb_f_kill): directly enqueue an ignored signal to self,
	  except for SIGSEGV and SIGBUS.  [ruby-dev:48203] [Bug #9820]

Sun Aug 31 01:13:21 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c: change full GC timing to keep lower memory usage.

	  Extend heap only at
	  (1) after major GC
	  or
	  (2) after several (two times, at current) minor GC

	  Details in https://bugs.ruby-lang.org/issues/9607#note-9
	  [Bug #9607]

Sun Aug 31 01:07:05 2014  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_create_dcom): use the converted
	  result if the argument can be converted to a string, to get rid
	  of invalid access. Thanks to nobu. [ruby-dev:48467] [Bug #10127]

Sun Aug 31 00:54:47 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (open): use UTF-8 version function to support
	  non-ascii path properly.  [ruby-core:63185] [Bug #9946]

Tue Aug 26 00:08:40 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_SETJMP_TYPE): check for setjmp type after
	  CCDLFLAGS is appended to CFLAGS, since __builtin_setjmp can be
	  affected.  [ruby-core:62469] [Bug #9818]

Tue Aug 26 00:07:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: get rid of __builtin_setjmp/__builtin_longjmp on
	  x64-mingw, which causes SEGV with callcc.
	  [ruby-core:61887] [Bug #9710]

Tue Aug 26 00:06:05 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ac_cv_func___builtin_setjmp): should not skip
	  flags restoration in RUBY_WERROR_FLAG by `break`.
	  [ruby-dev:48086] [Bug #9698]

Tue Aug 26 00:02:51 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ac_cv_func___builtin_setjmp): __builtin_longjmp()
	  in Apple LLVM 5.1 (LLVM 3.4svn) uses `void**`, not `jmp_buf`.
	  [Bug #9692]

Tue Aug 26 00:02:51 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ac_cv_func___builtin_setjmp): gcc 4.9 disallows a
	  variable as the second argument of __builtin_longjmp().
	  [ruby-core:61800] [Bug #9692]

Mon Aug 25 00:36:56 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): fix invalid char in eval, should raise
	  an syntax error too, as well as directly coded.
	  [ruby-core:64243] [Bug #10117]

Mon Aug 25 00:26:12 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yyerror): preserve source code encoding in
	  syntax error messages.  [ruby-core:64228] [Bug #10114]

Sat Aug 23 02:39:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): unusable super class should cause
	  method missing when BasicObject is refined but not been using.
	  [ruby-core:64166] [Bug #10106]

Sat Aug 23 02:22:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_count): fix wrong single-byte optimization.
	  7bit ascii can be a trailing byte in Shift_JIS.
	  [ruby-dev:48442] [Bug #10078]

Thu Aug 21 01:44:46 2014  Tanaka Akira  <akr@fsij.org>

	* gc.c (mark_current_machine_context): Call SET_STACK_END.
	  This reverts a hunk of r40703 by ko1.
	  This fixes [ruby-dev:48098] [Bug #9717].

Thu Aug 21 01:41:09 2014  Tanaka Akira  <akr@fsij.org>

	* lib/time.rb (Time.parse): [DOC] Fix an example in the documentation
	  to use EST.
	  Reported by Marcus Stollsteimer.
	  [ruby-core:60778] [Bug #9521] and [ruby-core:61718] [Bug #9682]

Thu Aug 21 01:41:09 2014  Zachary Scott  <e@zzak.io>

	* lib/time.rb: [DOC] Fix timezone in example of Time.parse [Bug #9521]
	  Based on patch by @stomar

Tue Aug 19 23:31:48 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	merge r46831 partially. extracted commits are as follows.
	https://github.com/k-takata/Onigmo/commit/b9fba1dc63ccb42a86e934011b468e6022fabb74
	https://github.com/k-takata/Onigmo/commit/c1fc76b9bd463948ffc5058bc352bf93732f0314
	https://github.com/k-takata/Onigmo/commit/a0efc0a200f7108ca3d5ac3039c8f952e0051619
	https://github.com/k-takata/Onigmo/commit/c7cda4ed5676167b0d01bb5555724f6164fbdb13
	[Bug #8716]

	* include/ruby/oniguruma.h (ONIG_MAX_CAPTURE_GROUP_NUM,
	  ONIGERR_TOO_MANY_CAPTURE_GROUPS): add cheking the number of capture
	  groups.

	* regerror.c (onig_error_code_to_format): ditto.

	* regparse.c (scan_env_add_mem_entry): ditto.

	* regexec.c (onig_region_copy, match_at): fix: segmation fault occurs
	  when many groups are used.

Mon Aug 18 23:38:21 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (enc_find): [DOC] never accepted a symbol.
	  [ruby-dev:48308] [Bug #9966]

Mon Aug 18 23:22:03 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_resize): update capa only when buffer get
	  reallocated.
	  http://d.hatena.ne.jp/nagachika/20140613/ruby_trunk_changes_46413_46420#r46413

Mon Aug 18 23:22:03 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_resize): should consider the capacity instead
	  of the old length, as pointed out by nagachika.

Mon Aug 18 23:22:03 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (expand_path): shrink expanded path which no longer needs
	  rooms to append.  [ruby-core:63114] [Bug #9934]

Mon Aug 11 23:55:32 2014  Mark Lorenz  <mlorenz@covermymeds.com>

	* lib/erb.rb (result): [DOC] no longer accepts a Proc, as
	  Kernel.eval does not.  [fix GH-619]

Mon Aug 11 23:38:20 2014  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_io_autoclose_p): Don't raise on frozen IO.

Mon Aug 11 23:38:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_fileno, rb_io_inspect): non-modification does not
	  error on frozen IO.  [ruby-dev:48241] [Bug #9865]

Mon Aug 11 22:34:47 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (posix_fadvise): disable use of posix_fadvise
	  itself on 32-bit AIX.  [ruby-core:62968] [Bug #9914]

Mon Aug 11 22:34:47 2014    <kanemoto@ruby-lang.org>

	* io.c (rb_io_advise): AIX currently does not support a 32-bit call to
	  posix_fadvise() if _LARGE_FILES is defined. Patch by Rei Odaira.
	  [ruby-core:62968] [Bug #9914]

Mon Aug 11 22:14:28 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_keyword_arg): adjust VM stack
	  pointer to get rid of overwriting splat arguments by arguments
	  for `to_hash` conversion.  [ruby-core:63593] [Bug #10016]

Fri Aug  8 23:36:01 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_write): use rb_str_append to
	  reuse coderange bits other than ASCII-8BIT, and keep
	  taintedness.  [ruby-dev:48118] [Bug #9769]

Mon Aug  4 01:29:57 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (env_shift): fix memory leak on Windows, free environment
	  strings block always.  [ruby-dev:48332] [Bug #9983]

Mon Aug  4 01:26:46 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (env_select): fix memory leak and crash on Windows, make
	  keys array first instead of iterating on environ directly.
	  [ruby-dev:48325] [Bug #9978]

Mon Aug  4 01:24:09 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (ruby_setenv): fix memory leak on Windows, free
	  environment strings block after check for the size.
	  [ruby-dev:48323] [Bug #9977]

Mon Aug  4 01:11:07 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (match_aref, rb_reg_regsub): consider encoding of captured
	  names, encoding-incompatible should not match.
	  [ruby-dev:48278] [Bug #9903]

Mon Aug  4 00:52:42 2014  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (rb_catch_protect): fix same problem of [Bug #9961].

	* vm_eval.c (rb_iterate): ditto.

Mon Aug  4 00:52:42 2014  Koichi Sasada  <ko1@atdot.net>

	* vm.c (rb_vm_rewind_cfp): add new function to rewind specified cfp
	  with invoking RUBY_EVENT_C_RETURN.
	  [Bug #9961]

	* vm_core.h: ditto.

	* eval.c (rb_protect): use it.

	* eval.c (rb_rescue2): ditto.

	* vm_eval.c (rb_iterate): ditto.

	* test/ruby/test_settracefunc.rb: add a test.

	* vm_core.h (rb_vm_rewind_cfp): add the prototype declaration.

Sun Aug  3 00:06:10 2014  Charlie Somerville  <charliesome@ruby-lang.org>

	* node.c (dump_node): handle nd_value == (NODE *)-1 to mean this
	  keyword argument is required

Thu Jul 31 01:56:11 2014  Koichi Sasada  <ko1@atdot.net>

	* compile.c (rb_iseq_compile_node): put start label of block after
	  trace (b_call).
	  [Bug #9964]

	* test/ruby/test_settracefunc.rb: add a test.

	  added assert_consistent_call_return() method check call/return
	  consistency.

Thu Jul 31 01:22:43 2014  Koichi Sasada  <ko1@atdot.net>

	* vm.c (invoke_block_from_c): move call/return event timing for
	  bmethod. It can invoke inconsistent call event if this call raises
	  argument error.
	  [Bug #9959]

	* vm_insnhelper.c (vm_call_bmethod_body): ditto.

	* test/ruby/test_settracefunc.rb: add a test.

Thu Jul 31 01:12:55 2014  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h: add VM_FRAME_MAGIC_RESCUE to recognize normal block or
	  rescue clause.

	* vm.c (vm_exec): use VM_FRAME_MAGIC_RESCUE on at rescue/ensure.

	* test/ruby/test_settracefunc.rb: should not invoke b_return at rescue
	  clause.
	  [Bug #9957]

	* vm_dump.c (control_frame_dump): check VM_FRAME_MAGIC_RESCUE.

	* vm_dump.c (vm_stack_dump_each): ditto.

Thu Jul 31 00:44:34 2014  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: clear and restore recursive checking thread local data
	  to avoid unexpected throw from TracePoint.
	  [Bug #9940]

	* test/ruby/test_settracefunc.rb: add a test.

	* thread.c: added
	  * rb_threadptr_reset_recursive_data(rb_thread_t *th);
	  * rb_threadptr_restore_recursive_data(rb_thread_t *th, VALUE old);

	* vm_core.h: ditto.

Wed Jul 23 23:49:59 2014  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* lib/test/unit/parallel.rb: fix test-all parallel failure if a test
	  is skipped after raise.
	  DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
	  But it causes Marshal.load failure due to undefined class/module
	  DL::DLError when doing test-all parallel and test-all doesn't
	  complete. We create new MiniTest::Skip object to avoid Marshal.load
	  failure.
	  [ruby-core:62133] [Bug #9767]

	* test/testunit/test_parallel.rb (TestParallel): add a test.

	* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.

Wed Jul 23 23:11:28 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/socket/test_socket.rb: unix socket is required by test case.

Wed Jul 23 23:11:28 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/socket/test_addrinfo.rb: remove unused variables.
	* test/socket/test_nonblock.rb: ditto.
	* test/socket/test_socket.rb: ditto.
	* test/socket/test_unix.rb: ditto.
	* test/testunit/test_parallel.rb: ditto.
	* test/webrick/test_filehandler.rb: ditto.
	* test/xmlrpc/test_features.rb: ditto.
	* test/zlib/test_zlib.rb: ditto.

Wed Jul 23 23:05:19 2014  Tanaka Akira  <akr@fsij.org>

	* ext/pathname/lib/pathname.rb (cleanpath_aggressive): make all
	  separators File::SEPARATOR from File::ALT_SEPARATOR.
	  Reported by Daniel Rikowski.
	  Fixed by Nobuyoshi Nakada.  [Bug #9618]

	* ext/pathname/lib/pathname.rb (cleanpath_conservative): ditto.

Wed Jul 23 22:51:34 2014  Naohisa Goto  <ngotogenome@gmail.com>

	* lib/fileutils.rb (rmdir): rescue Errno::EEXIST in addition to
	  ENOTEMPTY (and ENOENT), because SUSv3 describes that "If the
	  directory is not an empty directory, rmdir() shall fail and set
	  errno to [EEXIST] or [ENOTEMPTY]" and Solaris uses EEXIST.
	  [Bug #9571] [ruby-dev:48017]

Wed Jul 23 22:43:50 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (bind_random_port): Rescue EPERM for FreeBSD which
	  security.mac.portacl.port_high is changed.
	  See mac_portacl(4) for details.
	  Reported by Jakub Szafranski.  [ruby-core:60917] [Bug #9544]

Wed Jul 23 22:24:26 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/openssl/test_x509cert.rb: split assertions into algorithms.
	  CentOS 7 seems finish MD5 support
	  http://chkbuild005.hsbt.org/chkbuild/ruby-trunk/log/20140722T140010Z.fail.html.gz

	* test/openssl/test_x509req.rb: ditto.

Sat Jul 19 01:44:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (match_aref): should not ignore name after NUL byte.
	  [ruby-dev:48275] [Bug #9902]

Sun Jul 13 23:28:41 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* test/test_timeout.rb (test_timeout): inverted test condition.
	  [Bug #8523]

Sun Jul 13 23:18:11 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/digest/digest.c (rb_digest_instance_equal): no need to call
	  `to_s` twice.  [Bug #9913]

Sun Jul 13 23:18:11 2014  Benoit Daloze  <eregontp@gmail.com>

	* ext/digest/digest.c (rb_digest_instance_equal):
	  fix #== for non-string arguments. [ruby-core:62967] [Bug #9913]

	* test/digest/test_digest.rb: add test for above.

Sun Jul 13 23:10:03 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (yield_indexed_values): extract from permute0(),
	  rpermute0(), and rcombinate0().

Sun Jul 13 23:02:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_permutation): `p` is the array of size `r`, as
	  commented at permute0().  since `n >= r` here, buffer overflow
	  never happened, just reduce unnecessary allocation though.

Sun Jul 13 22:52:43 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (encodes): fix buffer overrun by tail_lf.  Thanks to
	  Mamoru Tasaka and Tomas Hoger.  [ruby-core:63604] [Bug #10019]

Sun Jul 13 22:44:05 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/thread/thread.c (undumpable): ConditionVariable and Queue
	  are not dumpable.  [ruby-core:61677] [Bug #9674]

Fri Jul 11 23:07:09 2014  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Fix sign for cross_product [#9499]

Sun Jul  6 23:16:30 2014  Masaya Tarui  <tarui@ruby-lang.org>

	* st.c (st_foreach_check): change start point of search at check
	  from top to current. [ruby-dev:48047] [Bug #9646]

Sun Jul  6 22:56:03 2014  Zachary Scott  <e@zzak.io>

	* lib/gserver.rb: [DOC] Fixed typo in example by @stomar [Bug #9543]

Fri Jul  4 00:46:03 2014  Zachary Scott  <e@zzak.io>

	* enumerator.c: [DOC] Fix example to show Enumerator#peek behavior
	  Patch by Erik Hollembeak [Bug #9814]

Fri Jul  4 00:44:43 2014  Zachary Scott  <e@zzak.io>

	* enum.c: [DOC] Use #find in example to clarify alias by @rachellogie
	  Patch submitted via documenting-ruby/ruby#34

Fri Jul  4 00:42:57 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* man/ruby.1: remove deadlink. [ruby-core:62145][Bug #9773]

Fri Jul  4 00:25:16 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (not_a_member): extract name error and use same error
	  messages.  based on the patch by Marcus Stollsteimer <sto.mar AT
	  web.de> at [ruby-core:61721].  [Bug #9684]

Thu Jul  3 01:19:50 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* numeric.c (num_step_scan_args): table argument of rb_get_kwargs() is
	  array of IDs, not Symbols. [ruby-dev:48353] [Bug #9811]

Thu Jul  3 01:19:50 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (num_step_scan_args): check keyword arguments and fail
	  if they conflict with positional arguments.
	  [ruby-dev:48177] [Bug #9811]

Tue Jul  1 03:05:22 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (read_all): truncate the buffer before appending read data,
	  instead of truncating before reading.
	  [ruby-core:55951] [Bug #8625]

Tue Jul  1 03:05:22 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_setstrbuf, io_read): should not shorten the given buffer until
	  read succeeds.  [ruby-core:55951] [Bug #8625]

Mon Jun 30 03:15:59 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (core_hash_merge_kwd): should return the result hash, which
	  may be converted from and differ from the given argument.
	  [ruby-core:62921] [Bug #9898]

Mon Jun 30 03:07:22 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (gets, readline): read lines without LF properly.
	  [ruby-core:63205] [Bug #9949]

	* test/net/ftp/test_buffered_socket.rb: related test.

Mon Jun 30 02:59:08 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body
	  type as "MIXED" followed immediately by params
	  [ruby-core:62864] [Bug #9885]
	  Patch by @rayners (David Raynes). [Fixes GH-622] 
	  https://github.com/ruby/ruby/pull/622

Mon Jun 30 02:46:44 2014  Rei Odaira  <Rei.Odaira@gmail.com>

	* signal.c (ruby_signal): should return either `old.sa_sigaction`
	  or `old.sa_handler`, depending on whether `SA_SIGINFO` is set in
	  `old.sa_flags`, because they may not be a union.
	  [ruby-core:62836] [Bug #9878]

Mon Jun 30 02:36:08 2014  Eric Wong  <e@80x24.org>

	* process.c (proc_getgroups, proc_setgroups): use ALLOCV_N
	  [Bug #9856]

Mon Jun 30 02:28:10 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_setstrbuf): always check if the buffer is modifiable.
	  [ruby-core:62643] [Bug #9847]

Mon Jun 30 02:25:00 2014  Tanaka Akira  <akr@fsij.org>

	* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#accept):
	  Consider Socket#accept as well as TCPServer#accept.
	  Reported by Sam Stelfox.  [ruby-core:62064] [Bug #9750]

Mon Jun 30 02:18:47 2014  Eric Wong  <e@80x24.org>

	* complex.c (parse_comp): replace ALLOCA_N with ALLOCV_N/ALLOCV_END
	  [Bug #9608]
	* rational.c (read_digits): ditto

Mon Jun 30 02:10:34 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vsnprintf.c (BSD_vfprintf): fix string width when precision is
	  given.  as the result of `memchr` is NULL or its offset from the
	  start cannot exceed the size, the comparison was always false.
	  [ruby-core:62737] [Bug #9861]

Mon Jun 30 01:46:19 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION
	  with 3-digit.  libffi 3.1 returns just 2-digit.
	  [ruby-core:62920] [Bug #9897]

Mon Jun 30 00:57:05 2014  Koichi Sasada  <ko1@atdot.net>

	* vm.c (rb_vm_pop_cfunc_frame): added.  It cares c_return event.
	  The patch base by drkaes (Stefan Kaes).
	  [Bug #9321]

	* variable.c (rb_mod_const_missing): use rb_vm_pop_cfunc_frame()
	  instead of rb_frame_pop().

	* vm_eval.c (raise_method_missing): ditto.

	* vm_eval.c (rb_iterate): ditto.

	* internal.h (rb_vm_pop_cfunc_frame): add decl.

	* test/ruby/test_settracefunc.rb: add tests.
	  provided by drkaes (Stefan Kaes).

	* vm.c, eval.c, include/ruby/intern.h (rb_frame_pop):
	  move definition of rb_frame_pop() and deprecate it.
	  It doesn't care about `return' events.

Sun Jun 29 01:34:06 2014  Tanaka Akira  <akr@fsij.org>

	* lib/webrick/utils.rb (create_listeners): Close socket objects.

Sat Jun 28 16:35:51 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_substr): need to reset code range for shared
	  string too, not only copied string.
	  [ruby-core:62842] [Bug #9882]

Sat Jun 28 14:37:17 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (local_tbl_gen): remove local variables duplicated with
	  arguments.
	  [ruby-core:60501] [Bug #9486]

Tue Jun 24 00:21:58 2014  Koichi Sasada  <ko1@atdot.net>

	* eval.c (rb_using_refinement): add write-barriers for
	  cref->nd_refinements.

Tue Jun 24 00:14:20 2014  Tanaka Akira  <akr@fsij.org>

	* lib/net/ftp.rb (transfercmd): Close TCP server socket even if an
	  exception occur.

Tue Jun 24 00:06:41 2014  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* thread_win32.c (rb_w32_stack_overflow_handler): use Structured
	  Exception Handling by AddVectoredExceptionHandler() for machine
	  stack overflow on mingw.
	  This would be equivalent to the handling using __try and __except
	  on mswin introduced by r43748.

Mon Jun 23 23:56:54 2014  Eric Wong  <e@80x24.org>

	* signal.c (signal_exec): ignore immediate cmd for SIG_IGN
	* signal.c (trap_handler): set cmd to true for SIG_IGN
	* signal.c (trap): handle nil and true values for oldcmd
	  [Bug #9835]

Mon Jun 23 02:46:14 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_init_copy): always clear instance variable,
	  constant and method tables first, regardless the source tables.
	  [ruby-dev:48182] [Bug #9813]

Mon Jun 23 02:36:04 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (thread_start_func_2): stop if forked in a sub-thread,
	  the thread has become the main thread.
	  [ruby-core:62070] [Bug #9751]

Mon Jun 23 01:53:18 2014  Josh Goebel  <dreamer3@gmail.com>

	* net/protocol.rb (using_each_crlf_line): fix SMTP dot-stuffing
	  for messages not ending with a new-line.
	  [ruby-core:61441] [Bug #9627] [fix GH-616]

Fri Jun 20 00:40:06 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p):
	  place get_stack above others to get stack boundary information.
	  [ruby-core:60113] [Bug #9454]

Fri Jun 20 00:40:06 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c: rlimit is only available on Linux.
	  At least r44712 breaks FreeBSD.
	  [ruby-core:60113] [Bug #9454]

Fri Jun 20 00:40:06 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c: get current main thread stack size, which may
	  be expanded than allocated size at initialization, by rlimit().
	  [ruby-core:60113] [Bug #9454]

Fri Jun 20 00:20:02 2014  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* configure.in: enable SSE2 on mingw. target='i386-pc-mingw32'.
	  [ruby-core:62095] [Bug #8358]

Tue Jun 17 00:45:44 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (compile_array_): make copy a first hash not to modify
	  the argument itself.  keyword splat should be non-destructive.
	  [ruby-core:62161] [Bug #9776]

Tue Jun 17 00:37:15 2014  Bugra Barin  <bugrabarin@hotmail.com>

	* dln.c (dln_load): use wchar version to load a library in
	  non-ascii path on Windows.  based on the patch by Bugra Barin
	  <bugrabarin AT hotmail.com> in [ruby-core:61845].  [Bug #9699]

Tue Jun 17 00:26:59 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (obj2uid, obj2gid): now getpwnam_r() and getgrnam_r()
	  may need larger buffers than sysconf values, so retry with
	  expanding the buffer when ERANGE is returned.
	  [ruby-core:61325] [Bug #9600]

Wed Jun 11 22:58:30 2014  Eric Wong  <e@80x24.org>

	* gc.c (ruby_gc_set_params): simplify condition

Wed Jun 11 22:58:30 2014  Eric Wong  <e@80x24.org>

	* gc.c (ruby_gc_set_params): fix building without RGenGC

Wed Jun 11 02:43:32 2014  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/objspace/test_objspace.rb (TestObjSpace#test_dump_uninitialized_file):
	  remove dependency on json library.

Wed Jun 11 02:43:32 2014  Scott Francis  <scott.francis@shopify.com>

	* ext/objspace/objspace_dump.c: Check fptr before trying to dump RFILE
	  object fd. [GH-562]

	* test/objspace/test_objspace.rb: add test

Wed Jun 11 02:27:55 2014  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in: Fix a build problem with clang and --with-opt-dir.
	  If ruby is configured with --with-opt-dir=dir when using clang
	  as compiler, a warning `clang: warning: argument unused during
	  compilation: '-I dir'` is emitted almost every time clang
	  compiles a file.  Unfortunately, RUBY_CHECK_PRINTF_PREFIX takes
	  any output from the compiler as fatal error, and the check thus
	  fails due to the warning.  This is an attempt to fix the problem
	  by adding a flag -Qunused-arguments to CFLAGS locally in the
	  function to suppress the warning. [ruby-dev:48062] [Bug #9658]
	  [Fixes GH-571] https://github.com/ruby/ruby/pull/571

Wed Jun 11 02:18:34 2014  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c: Fix Numeric#step with 0 unit [Bug #9575]

Wed Jun 11 00:36:05 2014  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* test/ruby/test_string (test_LSHIFT_neary_long_max): extend timeout.
	  this test fails on some CI environment by timeout.

Sat Jun  7 01:17:16 2014  Tanaka Akira  <akr@fsij.org>

	* signal.c (check_stack_overflow): Don't use ucontext_t if ucontext.h
	  is not available.
	  Fixes build on Android (x86).

Tue Jun  3 00:38:33 2014  Eric Wong  <e@80x24.org>

	* class.c (rb_class_subclass_add): use xmalloc
	* class.c (rb_module_add_to_subclasses_list): ditto
	* class.c (rb_class_remove_from_super_subclasses): use xfree
	* class.c (rb_class_remove_from_module_subclasses): ditto
	  [Bug #9616]

Mon Jun  2 02:19:30 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_accept, open_ifs_socket, socketpair_internal):
	  reset inherit flag of socket to avoid unintentional inheritance of
	  socket.  note that the return value of SetHandleInformation() is not
	  verified intentionally because old Windows may return an error.
	  [Bug #9688] [ruby-core:61754]

Mon Jun  2 02:12:10 2014  Eric Wong  <e@80x24.org>

	* time.c (time_mload): freeze and preserve marshal-loaded time zone
	* test/ruby/test_time.rb: add test for GC on loaded object
	  [Bug #9652]

Mon Jun  2 01:57:59 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_arg): turn a macro into an
	  inline function.

Mon Jun  2 01:46:43 2014  Eric Wong  <e@80x24.org>

	* variable.c (rb_const_set): delete existing entry on redefinition
	  [Bug #9645]
	* test/ruby/test_const.rb (test_redefinition): test for leak

Fri May 30 00:13:19 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (setup_exception): preserve errinfo across calling #to_s
	  method on the exception.  [ruby-core:61091] [Bug #9568]

Thu May 29 20:57:59 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (ruby_num_interval_step_size): check signs and get rid
	  of implementation dependent behavior of negative division.
	  [ruby-core:61106] [Bug #9570]

Wed May 28 23:47:22 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rb_cv_func___builtin_unreachable): try with an
	  external variable not only by a warning, which might not be
	  shown due to the optimization.  [ruby-core:61647] [Bug #9665]

Wed May 28 23:40:57 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_initialize): SYMID on a value
	  other than Symbol is an undefined behavior.  fix up r31699.
	  [ruby-core:62142] [Bug #9771]

Wed May 28 23:37:32 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_putc): fix for non-ascii
	  encoding, like as IO#putc.  [ruby-dev:48114] [Bug #9765]

Wed May 28 01:05:06 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/fileutils.rb (FileUtils#copy_entry): update rdoc about
	  preserve option and permissions, following r31123.
	  [ruby-core:62065] [Bug #9748]

Wed May 28 00:57:06 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (umethod_bind): use the ancestor iclass instead of new
	  iclass to get rid of infinite recursion, if the defined module
	  is already included.  [ruby-core:62014] [Bug #9721]

Wed May 28 00:57:06 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_method_call_with_block, umethod_bind): call with
	  IClass including the module for a module instance method.
	  [ruby-core:61936] [Bug #9721]

	* vm_insnhelper.c (vm_search_super_method): allow bound
	  UnboundMethod case.

Wed May 28 00:38:37 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (ary_reject): may be turned into a shared array during
	  the given block.  [ruby-dev:48101] [Bug #9727]

Wed May 28 00:29:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_buf_cat): should round up the capacity by 4KiB,
	  but not number of rooms.  [ruby-core:61886] [Bug #9709]

Wed May 28 00:23:11 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/xmlrpc/client.rb (do_rpc): don't check body length.
	  If HTTP content-encoding is used, the length may be different.
	  [Bug #8182] [ruby-core:53811]

Wed May 28 00:18:29 2014  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (d_lite_cmp): should compare with #<.

Fri May 23 00:04:13 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (sock_s_getnameinfo): Save errno for EAI_SYSTEM.
	  Reported by Saravana kumar.  [ruby-core:61820] [Bug #9697]
	  Fixed by Heesob Park.  [ruby-core:61868]

Fri May 23 00:04:13 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket: Wrap struct addrinfo by struct rb_addrinfo.

Fri May 23 00:04:13 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ipsocket.c (ip_s_getaddress): Don't access freed memory.

Mon May 19 00:47:00 2014  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_array.rb: remove useless `assert'.

Mon May 19 00:47:00 2014  Koichi Sasada  <ko1@atdot.net>

	* array.c (rb_ary_modify): remember shared array owner if a shared
	  array owner is promoted and a shared array is not promoted.

	  Now, shared array is WB-unprotected so that shared arrays are not
	  promoted.  All objects referred from shared array should be marked
	  correctly.

	  [ruby-core:61919] [ruby-trunk - Bug #9718]

	* test/ruby/test_array.rb: add a test for above.

Mon May 19 00:26:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): only a newline after label should be
	  significant.  [ruby-core:61658] [Bug #9669]

Mon May 19 00:26:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (lex_state_e, parser_params, f_arglist, parser_yylex):
	  separate EXPR_LABELARG from EXPR_BEG and let newline significant,
	  so that required keyword argument can place at the end of
	  argument list without parentheses.  [ruby-core:61658] [Bug #9669]

Fri May 16 00:27:02 2014  James Edward Gray II  <james@graysoftinc.com>

	* lib/csv.rb: Fixed a broken regular expression that was causing
	  CSV to miss escaping some special meaning characters when used
	  in parsing.
	  Reported by David Unric
	  [ruby-core:54986] [Bug #8405]

Fri May 16 00:14:25 2014  Kohei Suzuki  <eagletmt@gmail.com>

	* vm_method.c (rb_method_entry_get_without_cache): me->klass is 0
	  for a method aliased in a module.  [ruby-core:61636] [Bug #9663]

Fri May 16 00:14:25 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_method_entry_get_without_cache): get rid of
	  infinite recursion at aliases in a subclass and a superclass.
	  return actually defined class for other than singleton class.
	  [ruby-core:60431] [Bug #9475]

Mon May 12 22:53:08 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): flush cmdarg flags inside left-paren in a
	  command argument, to allow parenthesed do-block as an argument
	  without arguments parentheses.  [ruby-core:61950] [Bug #9726]

Mon May 12 22:22:43 2014  Koichi Sasada  <ko1@atdot.net>

	* vm.c (invoke_block_from_c): add VM_FRAME_FLAG_BMETHOD to record
	  it is bmethod frame.

	* vm.c (vm_exec): invoke RUBY_EVENT_RETURN event if rollbacked frame
	  is VM_FRAME_FLAG_BMETHOD.
	  [Bug #9759]

	* test/ruby/test_settracefunc.rb: add a test for TracePoint/set_trace_func.

	* vm_core.h: rename rb_thread_t::passed_me to
	  rb_thread_t::passed_bmethod_me to clarify the usage.

	* vm_insnhelper.c (vm_call_bmethod_body): use renamed member.

Mon May 12 22:11:47 2014  Shota Fukumori  <her@sorah.jp>

	* vm_eval.c (eval_string_with_cref): Unify to use NIL_P.

Mon May 12 22:11:47 2014  Shota Fukumori  <her@sorah.jp>

	* vm_eval.c (eval_string_with_cref): Use file path even if scope is
	  given. Related to [ruby-core:56099] [Bug #8662] and r42103.

Thu May  8 01:13:10 2014  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: correct pthread_setname_np's prototype on NetBSD.
	  [Bug #9586]

Tue May  6 00:54:56 2014  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (gc_after_sweep): suppress unnecessary expanding heap.
	  Tomb heap pages are freed pages here, so expanding heap is
	  not required.

Mon May  5 02:35:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
	  finalizes only a copy of the digest context, the context must be
	  cleaned up after initialization by EVP_MD_CTX_cleanup() or a
	  memory leak will occur.  [ruby-core:62038] [Bug #9743]

Mon May  5 02:21:48 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
	  ext/fiddle/handle.c (fiddle_handle_free),
	  ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
	  based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].

Mon May  5 01:20:27 2014  Eric Wong  <e@80x24.org>

	* gc.c (rb_gc_writebarrier): drop special case for big hash/array
	  [Bug #9518]

Mon May  5 01:13:00 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_before_sweep): cap `malloc_limit' to
	  gc_params.malloc_limit_max.  It can grow and grow with such case:
	    `loop{"a" * (1024 ** 2)}'
	  [Bug #9687]

	  This issue is pointed by Tim Robertson.
	  http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/

Mon May  5 00:52:18 2014  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.

Mon May  5 00:42:35 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* ext/psych/psych.gemspec: update gemspec for psych-2.0.5

Mon May  5 00:42:35 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
	  libyaml-0.1.6 for CVE-2014-2525.
	* ext/psych/yaml/config.h: ditto.
	* ext/psych/yaml/scanner.c: ditto.
	* ext/psych/yaml/yaml_private.h: ditto.

Mon May  5 00:35:20 2014  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
	  objects.

	* ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
	  objects.

	* test/psych/test_encoding.rb: add test

	* ext/psych/lib/psych.rb: add version

Mon May  5 00:16:35 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* gc.c: Fix up default GC params by @csfrancis [fix GH-556]

Fri May  2 00:19:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
	  error reasons with old OpenSSL, and insert a colon iff formatted
	  message is not empty.

Thu May  1 20:56:56 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
	  [ruby-dev:48089] [Bug #9702]

Thu May  1 20:47:08 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
	  [ruby-core:61756] [Bug #9578]

Thu May  1 20:47:08 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/extconf.rb (rl_hook_func_t): define as Function for
	  very old readline versions.  [ruby-core:61209] [Bug #9578]

Thu May  1 20:47:08 2014  Tanaka Akira  <akr@fsij.org>

	* ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead
	  of Function to support readline-6.3.  (rl_hook_func_t is available
	  since readline-4.2.)
	  Reported by Dmitry Medvinsky.  [ruby-core:61141] [Bug #9578]

Sat Mar  1 21:00:27 2014  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* proc.c: Having optional keyword arguments makes maximum arity +1,
	  not unlimited [#8072]

Sat Mar  1 17:25:12 2014  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* proc.c: Having any mandatory keyword argument increases min arity
	  [#9299]

Mon Feb 24 14:56:41 2014  WATANABE Hirofumi  <eban@ruby-lang.org>

	* tool/make-snapshot: needs CXXFLAGS.  [ruby-core:59393][Bug #9320]

Mon Feb 24 14:56:41 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* tool/make-snapshot: support new version scheme.

Mon Feb 24 13:05:48 2014  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: New release of psych.
	* ext/psych/psych.gemspec: ditto

Mon Feb 24 13:05:48 2014  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/yaml/emitter.c: merge libyaml 0.1.5
	* ext/psych/yaml/loader.c: ditto
	* ext/psych/yaml/parser.c: ditto
	* ext/psych/yaml/reader.c: ditto
	* ext/psych/yaml/scanner.c: ditto
	* ext/psych/yaml/writer.c: ditto
	* ext/psych/yaml/yaml_private.h: ditto

Sat Feb 22 22:26:43 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/io/console/console.c (console_dev): need read access for conout$
	  because some functions need it.  [Bug#9554]

Sat Feb 22 21:56:26 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_set_arguments): set arg_keyword_check from
	  nd_cflag, which is set by parser.  internal ID is used for
	  unnamed keyword rest argument, which should be separated from no
	  keyword check.

	* iseq.c (rb_iseq_parameters): if no keyword check, keyword rest is
	  present.

	* parse.y (new_args_tail_gen): set keywords check to nd_cflag, which
	  equals to that keyword rest is not present.

Sat Feb 22 21:56:26 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (rb_iseq_parameters): push argument type symbol only for
	  unnamed rest keywords argument.

Sat Feb 22 21:56:26 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_iseq_min_max_arity): maximum argument is unlimited if
	  having rest keywords argument.  [ruby-core:53298] [Bug #8072]

Sat Feb 22 18:55:08 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/socket/init.c (wait_connectable): break if the socket is
	  writable to avoid infinite loops on FreeBSD and other platforms
	  which conforms to SUSv3.  This problem cannot be reproduced with
	  loopback interfaces, so it's hard to write test code.
	  rsock_connect() and wait_connectable() are overly complicated, so
	  they should be refactored, but I commit this fix as a workaround
	  for the release of Ruby 1.9.3 scheduled on Feb 24.
	  [ruby-core:60940] [Bug #9547]

Sat Feb 22 18:48:57 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_init_copy): do nothing if copying self.
	  [ruby-dev:47989] [Bug #9535]

	* hash.c (rb_hash_initialize_copy): ditto.

Sat Feb 22 18:20:58 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_flatten): fix behavior of flatten(-1).
	  [ruby-dev:47988] [Bug #9533]

	* test/ruby/test_array.rb: test for above.

Sat Feb 22 17:46:32 2014  Tanaka Akira  <akr@fsij.org>

	* lib/open-uri.rb: Make proxy disabling working again.
	  Fixed by Christophe Philemotte.   [ruby-core:59650] [Bug #9385]

Sat Feb 22 17:33:39 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_mod_s_constants): return its own constants for other
	  than Module itself.  [ruby-core:59763] [Bug #9413]

Sat Feb 22 16:51:36 2014  Eric Wong <e@80x24.org>

	* ext/json/generator/depend: add build dependencies for json extension
	  [Bug #9374] [ruby-core:59609]
	* ext/json/parser/depend: ditto

Sat Feb 22 16:34:12 2014  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
	  [ruby-core:57599] [Bug #8978].

Sat Feb 22 16:34:12 2014  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
	  [ruby-core:57599] [Bug #8978].  Thanks mame!

Sat Feb 22 16:17:54 2014  Eric Wong  <e@80x24.org>

	* ext/socket/ancdata.c (bsock_sendmsg_internal): only retry on error
	  (bsock_recvmsg_internal): ditto
	* test/socket/test_unix.rb: test above for infinite loop

Sat Feb 22 15:56:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (rb_thread_create_timer_thread): fix for platforms
	  where PTHREAD_STACK_MIN is a dynamic value and not a compile-time
	  constant.  [ruby-dev:47911] [Bug #9436]

Sat Feb 22 15:56:53 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (rb_thread_create_timer_thread): expand timer
	  thread stack size to get rid of segfault on FreeBSD/powerpc64.
	  based on the patch by Steve Wills at [ruby-core:59923].
	  [ruby-core:56590] [Bug #8783]

Sat Feb 22 15:13:38 2014  Benoit Daloze  <eregontp@gmail.com>

	* range.c (Range#size): [DOC] improve description and add examples.
	  Patch by @skade. [Fixes GH-501]

Sat Feb 22 15:07:58 2014  Zachary Scott  <e@zzak.io>

	* lib/racc/rdoc/grammar.en.rdoc: [DOC] Correct grammar and typos
	  Patch by Giorgos Tsiftsis [Bug #9429] [ci skip]

Sat Feb 22 15:06:32 2014  Zachary Scott  <e@zzak.io>

	* lib/open-uri.rb: [DOC] use lower case version of core classes, same
	  as commit r44878, based on patch by Jonathan Jackson [Bug #9483]

Sat Feb 22 15:06:32 2014  Zachary Scott  <e@zzak.io>

	* ext/ripper/lib/ripper/lexer.rb: [DOC] use lower case version of core
	  classes when referring to return value, since we aren't directly
	  talking about the class. Patch by Jonathan Jackson [Bug #9483]

Sat Feb 22 15:03:05 2014  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* variable.c: adding extra example in docs.
	  patched by Steve Klabnik. [Bug #9210]

Sat Feb 22 15:01:21 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS::Resource::TXT#data): Return concatenated
	  string.
	  Patch by Ryan Brunner.  [ruby-core:58220] [Bug #9093]

Sat Feb 22 14:52:55 2014  Zachary Scott  <e@zzak.io>

	* ext/openssl/ossl_pkey_dh.c: Fixed typo by Sandor Szuecs [Bug #9243]

Sat Feb 22 14:45:36 2014  Zachary Scott  <e@zzak.io>

	* lib/xmlrpc/client.rb: [DOC] Remove note about SSL package on RAA
	  Since RAA has been deprecated, and the SSL package has been replaced
	  with net/https this statement is entirely false and should be
	  deleted. [Bug #9152]

Sat Feb 22 14:31:23 2014  Zachary Scott  <e@zzak.io>

	* lib/net/smtp.rb: [DOC] Remove dead link to RAA by Giorgos Tsiftsis
	  Fixes the following bugs: [Bug #9152] [Bug #9268] [Bug #9394]
	* lib/open-uri.rb: ditto

Sat Feb 22 14:18:35 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: Ignore name servers which cause EAFNOSUPPORT on
	  socket creation.
	  Reported by Bjoern Rennhak.  [ruby-core:60442] [Bug #9477]

Sat Feb 22 14:07:04 2014  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raise
	  DecodeError if no data before the limit.
	  Reported by Will Bryant.  [ruby-core:60557] [Bug #9498]

Sat Feb 22 13:49:30 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): should check ci->me->flag of
	  a refining method in case the method is private.
	  [ruby-core:60111] [Bug #9452]

	* vm_method.c (make_method_entry_refined): set me->flag of a refined
	  method entry to NOEX_PUBLIC in case the original method is private
	  and it is refined as a public method.  The original flag is stored
	  in me->def->body.orig_me, so it's OK to make a refined method
	  entry public.  [ruby-core:60111] [Bug #9452]

	* test/ruby/test_refinement.rb: related tests.

Sat Feb 22 13:26:57 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* iseq.c (iseq_load): keep type_map to get rid of memory leak.
	  based on a patch by Eric Wong at [ruby-core:59699].  [Bug #9399]

Sat Feb 22 13:17:32 2014  Masaki Matsushita  <glass.saga@gmail.com>

	* ext/thread/thread.c (rb_szqueue_clear): notify SZQUEUE_WAITERS
	  on SizedQueue#clear. [ruby-core:59462] [Bug #9342]

	* test/thread/test_queue.rb: add test. the patch is from
	  Justin Collins.

Sat Feb 22 01:35:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check if pthread_setname_np is available.

	* thread_pthread.c: pthread_setname_np is not available on old
	  Darwins.  [ruby-core:60524] [Bug #9492]

Sat Feb 22 00:21:50 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (local_push_gen, local_pop_gen): save cmdarg_stack to
	  isolate command argument state from outer scope.
	  [ruby-core:59342] [Bug #9308]

Fri Feb 21 23:51:38 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (must_encindex, rb_enc_from_index, rb_obj_encoding): mask
	  encoding index and ignore dummy flags.  [ruby-core:59354] [Bug #9314]

Fri Feb 21 23:10:12 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (RbConfig): expand RUBY_SO_NAME for extensions
	  backward compatibility.  [ruby-core:59426] [Bug #9329]

Fri Feb 21 23:07:56 2014  Akio Tajima <artonx@yahoo.co.jp>

	* win32/Makefile.sub: remove HAVE_FSEEKO because fseeko removed from win32/win32.c
	  Fixed [Bug #9333].

Fri Feb 21 23:00:34 2014  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
	  quotes should not have changed.  [ruby-core:59316] [Bug #9300]

	* ext/psych/lib/psych.rb: fixed missing require.

	* test/psych/test_string.rb: test

Sun Feb 2 05:48:42 2014  Eric Wong <e@80x24.org>

	* io.c (rb_io_syswrite): add RB_GC_GUARD
	  [Bug #9472][ruby-core:60407]

Fri Feb 21 17:42:42 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not
	  consider encodings in hosts file.  [ruby-core:59239] [Bug #9273]

	* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto.

Fri Feb 21 16:47:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (get_encoding): respect BOM on pseudo encodings.
	  [ruby-dev:47895] [Bug #9415]

Fri Feb 21 16:47:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (get_actual_encoding): get actual encoding according to
	  the BOM if exists.

	* string.c (rb_str_inspect): use according encoding, instead of
	  pseudo encodings, UTF-{16,32}.  [ruby-core:59757] [Bug #8940]

Fri Feb 21 13:39:21 2014  Charlie Somerville  <charliesome@ruby-lang.org>

	* compile.c (iseq_build_from_ary_body): Use :blockptr instead of :block
	  as hash key when loading serialized instruction sequences from arrays.
	  [Bug #9455] [ruby-core:60146]

Thu Feb 20 12:58:45 2014  Tanaka Akira  <akr@fsij.org>

	* process.c (READ_FROM_CHILD): Apply the last hunk of
	  0001-process.c-avoid-EINTR-from-Process.spawn.patch written by
	  Eric Wong in [Bug #8770].

Thu Feb 20 12:58:45 2014  Eric Wong  <normalperson@yhbt.net>

	* process.c (send_child_error): retry write on EINTR to fix
	  occasional Errno::EINTR from Process.spawn.

	* process.c (recv_child_error): retry read on EINTR to fix
	  occasional Errno::EINTR from Process.spawn.

Thu Feb 20 12:24:59 2014  Eric Hodel  <drbrain@segment7.net>

	* lib/rinda/ring.rb (Rinda::RingFinger#make_socket):  Use
	  ipv4_multicast_ttl option for portability.

Thu Feb 20 10:19:40 2014  Tanaka Akira  <akr@fsij.org>

	* ext/socket/option.c: IP_MULTICAST_LOOP and IP_MULTICAST_TTL socket
	  option takes a byte on OpenBSD.
	  Fixed by Jeremy Evans.  [ruby-core:59496] [Bug #9350]

Wed Feb 19 15:25:13 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c (ruby_gc_set_params): don't show obsolete warnings for
	  RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if
	  RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given.
	  [Bug #9276]

Wed Feb 19 14:25:55 2014  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_gc.rb: ignore warning messages for running with -w
	  option such as chkbuild.

Wed Feb 19 14:25:55 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c (get_envparam_double): fix a warning message.

Wed Feb 19 14:25:55 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c: introduce new environment variable
	  "RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR" to control major/minor GC
	  frequency.

	  Do full GC when the number of old objects is more than R * N
	  where R is this factor and
	  N is the number of old objects just after last full GC.

	* test/ruby/test_gc.rb: add a test.

Wed Feb 19 07:51:02 2014  Eric Hodel  <drbrain@segment7.net>

	* lib/rinda/ring.rb (Rinda::RingFinger#make_socket):  Use
	  ipv4_multicast_loop option for portability.  Patch by Jeremy Evans.
	  [ruby-trunk - Bug #9351]

Mon Feb 17 05:43:20 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: reset LDFLAGS and DLDFLAGS for opt-dir again after
	  LIBPATHFLAG and RPATHFLAG are set.  [ruby-dev:47868] [Bug #9317]

Sun Feb 16 07:13:36 2014  Tanaka Akira  <akr@fsij.org>

	* configure.in: Fix compilation error.
	  https://bugs.ruby-lang.org/issues/8358#note-16

Sun Feb 16 07:13:36 2014  Vit Ondruch  <vondruch@redhat.com>

	* configure.in: add qouting brackets and append wildcard for the
	  rest after target_cpu, to properly detect platform for SSE2
	  instructions.  [ruby-core:60576] [Bug #8358]

Sun Feb 16 07:13:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: -mstackrealign is necessary for -msse2 working.
	  [ruby-core:54716] [Bug #8349]

Sun Feb 16 07:13:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: -mstackrealign is necessary for -msse2 working.
	  [ruby-core:54716] [Bug #8349]

	* configure.in: use SSE2 instructions to drop unexpected precisions on
	  other than mingw.  [ruby-core:59472] [Bug #8358]

Sun Feb 16 07:13:36 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: use SSE2 instructions for drop unexpected
	  precisions.  [ruby-core:54738] [Bug #8358]

Fri Feb  7 04:19:19 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c (get_envparam_int): correct warning messsages.

	* gc.c (get_envparam_double): ditto.

Fri Feb  7 04:19:19 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c (get_envparam_int): don't accept a value equals to lowerbound
	  (changed by last commit) because "" or "foo" (not a number) strings
	  are parsed as 0. They should be rejected.

	* gc.c (get_envparam_double): ditto.

Thu Feb 6 08:23:28 2014  Eric Wong  <e@80x24.org>

	* ext/thread/thread.c (rb_szqueue_max_set): use correct queue and
	  limit wakeups.  [Bug #9343][ruby-core:60517]
	* test/thread/test_queue.rb (test_sized_queue_assign_max):
	  test for bug

Thu Feb  6 11:27:39 2014  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems: RubyGems 2.2.2 which contains the following bug fixes:
	  http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05
	  https://bugs.ruby-lang.org/issues/9489

Thu Feb  6 11:23:59 2014  Koichi Sasada  <ko1@atdot.net>

	* gc.c (ruby_gc_set_params): if RUBY_GC_OLDMALLOC_LIMIT is provided,
	  then set objspace->rgengc.oldmalloc_increase_limit.
	  Without this fix, the env variable RUBY_GC_OLDMALLOC_LIMIT
	  does not work.

	* gc.c (get_envparam_int): accept a value equals to lowerbound.

	* gc.c (get_envparam_double): ditto.

Wed Feb  5 23:57:05 2014  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
	  instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong.
	  [Bug #9302] [ruby-core:59324]

	* test/thread/test_queue.rb: add test

Wed Feb  5 23:43:30 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* hash.c (rb_objid_hash): should return `long'.  brushup r44534.

	* object.c (rb_obj_hash): follow above change.

Wed Feb  5 23:43:30 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* hash.c (rb_any_hash): should treat the return value of rb_objid_hash()
	  as `long', because ruby assumes the hash value of the object id of
	  an object is `long'.
	  this fixes test failures on mswin64 introduced at r44525.

Wed Feb  5 23:43:30 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_objid_hash): return hash value from object ID with a
	  salt, extract from rb_any_hash().

	* object.c (rb_obj_hash): return same value as rb_any_hash().
	  fix r44125.  [ruby-core:59638] [Bug #9381]

Wed Feb  5 22:28:41 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_search_super_method): allow bound method from a
	  module, yet another method transplanting.

Wed Feb  5 22:28:41 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_search_super_method): when super called in a
	  bound UnboundMethod generated from a module, no superclass is
	  found since the current defined class is the module, then call
	  method_missing in that case.  [ruby-core:59619] [Bug #9377]

Wed Feb  5 21:57:40 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (rsock_syserr_fail_host_port): add errno
	  argument version anduse rb_syserr_fail_str() instead of
	  rb_sys_fail_str() with restoring errno.

	* ext/socket/socket.c (rsock_syserr_fail_path): ditto, and
	  rb_syserr_fail().

	* ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto, use
	  rsock_syserr_fail_raddrinfo().

	* ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto.

	* ext/socket/socket.c (setup_domain_and_type): ditto.

Wed Feb  5 21:57:40 2014  Eric Wong  <normalperson@yhbt.net>

	* ext/socket/socket.c (rsock_sys_fail_host_port): save and restore errno
	  before calling rb_sys_fail_str to prevent [BUG] errno == 0.
	  Patch by Eric Wong. [ruby-core:59498] [Bug #9352]

	* ext/socket/socket.c (rsock_sys_fail_path): ditto
	* ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto
	* ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto
	* ext/socket/socket.c (rsock_sys_fail_raddrinfo_or_sockaddr): ditto

Wed Feb  5 21:12:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (Timeout::ExitException.catch): pass arguments
	  for new instance.

	* lib/timeout.rb (Timeout::ExitException#exception): fallback to
	  Timeout::Error if couldn't throw.  [ruby-dev:47872] [Bug #9380]

	* lib/timeout.rb (Timeout#timeout): initialize ExitException with
	  message for the fallback case.

Wed Feb  5 21:12:02 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (Timeout#timeout): should not rescue ordinarily
	  raised ExitException, which should not be thrown.

	* lib/timeout.rb (Timeout::ExitException.catch): set @thread only if
	  it ought to be caught.

	* lib/timeout.rb (Timeout#timeout): when a custom exception is given,
	  no instance is needed to be caught, so defer creating new instance
	  until it is raised.  [ruby-core:59511] [Bug #9354]

Wed Feb  5 17:55:28 2014  Aman Gupta <ruby@tmm1.net>

	* array.c (ary_add_hash): Fix consistency issue between Array#uniq and
	  Array#uniq! [Bug #9340] [ruby-core:59457]
	* test/ruby/test_array.rb (class TestArray): regression test for above.

Wed Feb  5 11:48:42 2014  Charlie Somerville  <charliesome@ruby-lang.org>

	* struct.c (rb_struct_set): return assigned value from setter method
	  rather than struct object. [Bug #9353] [ruby-core:59509]

	* test/ruby/test_struct.rb (test_setter_method_returns_value): add test

Wed Feb  5 11:13:21 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_modify_expand): enable capacity and disable
	  assocation with packed objects when setting capa, so that
	  pack("p") string fails to unpack properly after modified.

Sun Feb  2 22:39:28 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/delegate.rb (Delegator): keep source information methods
	  which start and end with '__'.  [ruby-core:59718] [Bug #9403]

Fri Jan 31 12:10:16 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew_from_me): keep iclass as-is, to make inheritance
	  chain consistent.  [ruby-core:59358] [Bug #9315]

	* proc.c (method_owner): return the original defined_class from
	  prepended iclass, instead.

Fri Jan 31 12:05:59 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: let mingw do something black-magic, and check if
	  _gmtime64_s() is available actually.

	* win32/win32.c (gmtime_s, localtime_s): use _gmtime64_s() and
	  _localtime64_s() if available, not depending on very confusing
	  mingw variants macros.  based on the patch by phasis68 (Heesob
	  Park) at [ruby-core:58764].  [ruby-core:58391] [Bug #9119]

Thu Jan 30 15:02:35 2014  Shugo Maeda  <shugo@ruby-lang.org>

	* configure.in: use $@ instead of $(.TARGET) because .TARGET is not
	  supported by GNU make.

Mon Jan 27 16:49:52 2014  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additional
	  digit for the quotient to be compatible with bigdecimal 1.2.1 and
	  the former.  [ruby-core:59365] [#9316] [#9305]

	* test/bigdecimal/test_bigdecimal.rb: tests for the above change.

	* ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.4.

Mon Jan 27 16:45:34 2014  Yamashita Yuu  <yamashita@geishatokyo.com>

	* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant
	  `OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined.  The
	  `SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest
	  snapshot of OpenSSL 1.0.1.  [Fixes GH-488]

Thu Jan 23 10:37:24 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (HAS_EXTRA_STATES): warn extra states only when something
	  differ.  [ruby-core:59254] [Bug #9275]

Thu Jan  9 14:05:24 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/{setup.mak,Makefile.sub}: update fake.rb like
	  template/fake.rb.in.

Thu Jan  9 14:05:24 2014  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (fake.rb): should depend on version.h because
	  if RUBY_VERSION is updated, fake.rb need to say the new version
	  to avoid install error in rbconfig.rb.

Thu Jan  9 08:21:00 2014  Aman Gupta <ruby@tmm1.net>

	* test/net/imap/cacert.pem: generate new CA cert, since the last one
	  expired. [Bug #9341] [ruby-core:59459]
	* test/net/imap/server.crt: new server cert signed with updated CA.
	* test/net/imap/Makefile: add `make regen_certs` to automate this
	  process.

Thu Dec 26 03:28:11 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (argument_error): insert dummy frame to make
	  a backtrace object intead of modify backtrace string array.
	  [Bug #9295]

	* test/ruby/test_backtrace.rb: add a test for this patch.
	  fix test to compare a result of Exception#backtrace with
	  a result of Exception#backtrace_locations.

Wed Dec 25 16:58:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_mod_define_method): consider visibility only if self
	  in the caller is same as the receiver, otherwise make public as
	  well as old behavior.  [ruby-core:57747] [Bug #9005]
	  [ruby-core:58497] [Bug #9141]

	* vm.c (rb_vm_cref_in_context): return ruby level cref if self is
	  same.

Wed Dec 25 16:35:34 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* sample/trick2013/: added the award-winning entries of TRICK 2013.
	  See https://github.com/tric/trick2013 for the contest outline.
	  (Matz has approved the attachment.)

Tue Dec 24 23:47:50 2013  Koichi Sasada  <ko1@atdot.net>

	* README.EXT: add a refer to URL.

Tue Dec 24 23:47:50 2013  Koichi Sasada  <ko1@atdot.net>

	* README.EXT: add a document about RGenGC.
	  Reviewed by havenwood.
	  [misc #8962]

	* README.EXT.ja: ditto.

Mon Dec 23 19:00:00 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/test_gem_ext_builder.rb:  Fix warning due to ambiguous
	  expression.

Mon Dec 23 16:13:10 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/install_command.rb:  Restore gem install
	  --ignore-dependencies for remote gems
	* test/rubygems/test_gem_commands_install_command.rb:  Test for the
	  above.

Mon Dec 23 16:12:24 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* array.c: Have to_h raise on elements that are not key-value pairs
	  [#9239]

	* enum.c: ditto

Sun Dec 22 19:22:52 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc.rb:  Set RDoc to release version.

Sun Dec 22 19:22:31 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Set RubyGems to release version.

Sun Dec 22 19:22:01 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb (module Gem):  Fix comment for
	  Gem::load_path_insert_index.

Sun Dec 22 18:08:42 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
	  install win32.h.
	  [ruby-core:58801][Bug #9199] reported by arton.

Fri Dec 20 17:52:50 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_method.c: check definition of
	  GLOBAL_METHOD_CACHE_SIZE and GLOBAL_METHOD_CACHE_MASK.

Fri Dec 20 17:03:10 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
	  RB_OBJ_WRITE and RB_OBJ_WRITTEN.

	* array.c, class.c, compile.c, hash.c, internal.h, iseq.c,
	  proc.c, process.c, re.c, string.c, variable.c, vm.c,
	  vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, 
	  vm_method.c: catch up this change.

Fri Dec 20 16:01:35 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: add a comment for WB interfaces.

Fri Dec 20 16:00:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: DLDFLAGS is defined in --with-opt-dir handler, so
	  ${DLDFLAGS=} does not work now.  use RUBY_APPEND_OPTIONS instead.
	  [ruby-dev:47855] [Bug #9256]

Fri Dec 20 14:19:12 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in (AC_ARG_WITH): use withval directly.
	  fix failure on FreeBSD.
	  http://fb32.rubyci.org/~chkbuild/ruby-trunk/log/20131217T070301Z.diff.html.gz

Fri Dec 20 14:00:01 2013  Aman Gupta <ruby@tmm1.net>

	* include/ruby/ruby.h (struct RClass): add super, remove iv_index_tbl.
	  since RCLASS_SUPER() is commonly used inside while loops, we move it
	  back inside struct RClass to improve cache hits. this provides a
	  small improvement (1%) in hotspots like rb_obj_is_kind_of()
	* internal.h (struct rb_classext_struct): remove super, add
	  iv_index_table
	* internal.h (RCLASS_SUPER): update for new location
	* internal.h (RCLASS_SET_SUPER): ditto
	* internal.h (RCLASS_IV_INDEX_TBL): ditto
	* object.c (rb_class_get_superclass): ditto
	* include/ruby/backward/classext.h (RCLASS_SUPER): ditto

Fri Dec 20 07:07:35 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 03d6ae7.  Changes include:

	  * Fixed typos.

	  * Relaxed Gem.ruby test for ruby packagers that do not use `ruby`.

	* test/rubygems:  ditto.

Thu Dec 19 14:03:04 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (heap_get_freeobj): improve hot path performance.

	* gc.c (heap_get_freeobj_from_next_freepage): replace with
	  heap_get_freepage(). It returns freeobj instead of freepage.
	  This is not on hot path.

Thu Dec 19 12:05:17 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master af60443.  Changes include:

	  * Improved speed of `gem install --ignore-dependencies`.

	  * Open read-write for exclusive flock.  [ruby-trunk - Bug #9257]

	  * Remove specification before install to prevent infinite loop.

Thu Dec 19 11:23:49 2013  Aman Gupta <ruby@tmm1.net>

	* vm_insnhelper.c (vm_call_iseq_setup_normal): simple for loop
	  condition optimization. this area shows up as a hotspot in VM
	  profiles.

Thu Dec 19 10:50:13 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (newobj_of): don't need to RBASIC_SET_CLASS() which includes WB
	  here because created obj is always YOUNG/INFANT.

Thu Dec 19 10:48:37 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: check GC::OPTS availability
	  for not MRI 2.1.0.

Thu Dec 19 03:10:30 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (heap_get_freeobj): remove redundant assignment. heap->freelist
	  is set after the while() loop already.

Thu Dec 19 01:54:30 2013  Koichi Sasada  <ko1@atdot.net>

	* test/runner.rb: fix commit miss on r44278.

Thu Dec 19 00:26:11 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (garbage_collect_body): lazy_sweep setting should work
	  without USE_RGENGC.

Wed Dec 18 23:31:04 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_dump_major_reason): fix this function because major_reason
	  can be OR of multiple reasons.

	* gc.c (gc_profile_dump_on): ditto.

Wed Dec 18 17:03:00 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_record_get): should return an empty array
	  when profiling is active.

Wed Dec 18 16:49:40 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_clear, gc_profile_enable): remove rest_sweep().

	* gc.c: check objspace->profile.current_record before inserting
	  profiling record by new macro gc_prof_enabled().

Wed Dec 18 14:32:06 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
	  disable stack overflow check for every stack pushing as default.

	* vm_exec.c (vm_stack_overflow_for_insn): ditto.

Wed Dec 18 10:00:22 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master d8f12e2.  This increases the
	  speed of `gem install --ignore-dependencies` which helps bundler
	  tests.
	* test/rubygems:  ditto.

Wed Dec 18 09:00:17 2013  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.

Tue Dec 17 23:44:15 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/ruby/test_io.rb: fix duplicated test name.

Tue Dec 17 20:15:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_reject): revert to deprecated behavior, with
	  warnings, due to compatibility for HashWithDifferentAccess.
	  [ruby-core:59154] [Bug #9223]

Tue Dec 17 17:30:56 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el: Import version 2.1.1 from
	  https://github.com/knu/ruby-electric.el.

	  * ruby-electric-delete-backward-char: Enable support for number
	    prefix.

	  * ruby-electric-curlies: Fix electric operation after an open
	    curly.

Tue Dec 17 16:19:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_trace.c (rb_postponed_job_flush): isolate exceptions in
	  postponed jobs and restore outer ones.  based on a patch by
	  tarui.  [ruby-core:58652] [Bug #9168]

Tue Dec 17 10:48:04 2013  Aman Gupta <ruby@tmm1.net>

	* configure.in (RUBY_DTRACE_POSTPROCESS): Fix compatibility with
	  systemtap on linux. stap requires `dtrace -G` post-processing, but
	  the dtrace compatibility wrapper is very strict about probes.d
	  syntax.

Tue Dec 17 05:18:17 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 1c5f4b3.  Allows rubygems
	  repackagers to disable backward-compatible shared gem directory
	  behavior.
	* test/rubygems:  ditto.

Tue Dec 17 05:14:35 2013  Eric Hodel  <drbrain@segment7.net>

	* NEWS (RDoc):  Update version number so I don't have to change it
	  for the final release.

Mon Dec 16 19:19:19 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace_markable_object_p): should check special_const_p
	  first (by is_markable_object()).

Mon Dec 16 19:12:54 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (reachable_object_from_root_i): use
	  compare_by_identity hash to avoid hash modify problem
	  during iteration.
	  [Bug #9252]

	* ext/objspace/objspace.c (reachable_objects_from_root): ditto.

Mon Dec 16 18:16:28 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_verify_internal_consistency): should not use
	  rb_objspace_each_objects() because it call rest_sweep().

Mon Dec 16 18:07:30 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace_markable_object_p): fix last commit (build error).

Mon Dec 16 18:04:28 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace_markable_object_p): it should be live objects.

Mon Dec 16 18:00:51 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweep
	  flag in nested case.

Mon Dec 16 16:40:35 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_method.c (rb_method_entry_make): fix WB miss.
	  Note that rb_method_entry_t::klass is not constified.
	  We may  constify this field.

	* test/ruby/test_alias.rb: add a test.

Mon Dec 16 14:14:22 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: use gc_verify_internal_consistency() instead of
	  gc_check_before_marks_i() for check consistency
	  on RGENGC_CHECK_MODE >= 2.

Mon Dec 16 14:01:48 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* process.c (make_clock_result): add :second as a unit for
	  Process.clock_gettime.

Mon Dec 16 13:10:54 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: introduce GC.verify_internal_consistency method to verify GC
	  internal data structure.

	  Now this method only checks generation (old/young) consistency.

Mon Dec 16 11:49:26 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (gc_info_decode): Fix build errors when compiled with
	  RGENGC_ESTIMATE_OLDMALLOC=0
	* gc.c (objspace_malloc_increase): ditto

Sun Dec 15 13:38:29 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (reachable_object_from_root_i):
	  reachable objects should not include categories and
	  category_objects because it is noisy information.

	  In fact, objects created after calling
	  ObjectSpace.reachable_objects_from_root should not be included
	  as a returning hash objects. Currently, mswin64 platform has a
	  problem because of this behavior. Should we trace new objects?

Sun Dec 15 07:09:28 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc master 263a9e5.  This improves the
	  accessibility of the search box.

Sat Dec 14 17:39:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_arg_complex): count post
	  arguments as mandatory arguments.  [ruby-core:57706] [Bug #8993]

	* vm_insnhelper.c (vm_yield_setup_block_args): ditto.

Sat Dec 14 16:26:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rubylibprefix): replace exec_prefix as well as
	  bindir and libdir.  a patch by kimuraw (Wataru Kimura) at
	  [ruby-dev:47852].  [Bug #9160]

Sat Dec 14 14:42:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/logger.rb (lock_shift_log): no need to rotate the log file
	  if it has been rotated by another process.  based on the patch
	  by no6v (Nobuhiro IMAI) in [ruby-core:58620].  [Bug #9133]

Sat Dec 14 13:01:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew_from_me): method by respond_to_missing? should be
	  owned by the original class.

Sat Dec 14 11:55:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/scanf.rb (IO#scanf): fix mistaken use of rescue modifier.
	  a patch by Mon_Ouie at [ruby-core:52813].  [Bug #7940]

Sat Dec 14 11:44:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_qsort): fix potential stack overflow on a large
	  machine.  based on the patch by Conrad Irwin <conrad.irwin AT
	  gmail.com> at [ruby-core:51816].  [Bug #7772]

Sat Dec 14 11:25:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_const_defined): support nested class path as
	  well as const_get.  [Feature #7414]

Sat Dec 14 01:31:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_rescue2): reuse tags pushed for body proc to protect
	  rescue proc too.

Sat Dec 14 01:15:51 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (wmap_final_func): Bugfix. Should update *value to new pointer.

Sat Dec 14 01:05:46 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because
	  it may be set before the body.
	  Reported by ko1 and mrkn.  [ruby-core:59088] [Bug #9247]

	* lib/cgi/core.rb: Ditto.

	* lib/drb/ssl.rb: Ditto.

Sat Dec 14 00:34:31 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* internal.h (ruby_sized_xrealloc2): fix typo introduced in r44117,
	  which cause compile error on Solaris.

Sat Dec 14 00:22:16 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c: (exec_recursive): use rb_catch_protect() instead of
	  rb_catch_obj() and PUSH_TAG(), and reduce pushing tags and
	  machine stack usage.

Sat Dec 14 00:18:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew_from_me): achieve the original defined_class from
	  prepended iclass, to fix inherited owner.

	* proc.c (method_owner): return the defined class, but not the
	  class which the method object is created from.

Fri Dec 13 22:29:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (method_owner): return the class where alias is defined, not
	  the class original method is defined.

	* vm_method.c (rb_method_entry_make, rb_alias): store the originally
	  defined class in me.  [Bug #7993] [Bug #7842] [Bug #9236]

	* vm_method.c (rb_method_entry_get_without_cache): cache included
	  module but not iclass.

Fri Dec 13 16:27:17 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (gc_info_decode): Use :major_by=>:nofree as fallback reason
	  when other trigger conditions are present.

Fri Dec 13 13:25:30 2013  Koichi Sasada  <ko1@atdot.net>

	* error.c: add Exception#backtrace_locations.
	  Now, there are no setter and independent from Exception#backtrace.
	  [Feature #8960]

	* eval.c (setup_exception): set backtrace locations for `bt_location'
	  special attribute.

	* vm_backtrace.c (rb_backtrace_to_location_ary): added.

	* internal.h: ditto.

	* test/ruby/test_backtrace.rb: add a test for
	  Exception#backtrace_locations.

Fri Dec 13 12:01:07 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (garbage_collect_body): use rb_bug() and explicit error message
	  instead of using assert().
	  [Bug #9222]

Fri Dec 13 11:52:41 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c: fix comment to remove the word "shady".

	* variable.c: ditto.

Fri Dec 13 11:33:55 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: rename *shady* func/macros.
	  * RVALUE_RAW_SHADY()   -> RVALUE_WB_PROTECTED_RAW()
	  * RVALUE_SHADY()       -> RVALUE_RAW_SHADY()
	  * rgengc_check_shady() -> rgengc_check_relation().
	  And fix some messages using "shady" to "non-WB-protected".

Fri Dec 13 10:04:23 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/request_set/lockfile.rb:  Import RubyGems master a8d0669
	  with a 1.8.7 compatibility fix.
	* test/rubygems/test_gem_request_set_lockfile.rb:  ditto.

Fri Dec 13 09:50:49 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master ddac51f.  Changes:

	  * Allow override for the shared gem installation directory for
	    rubygems packagers.

	  * Lock gem cache files for read and write to improve thread safety.

	  * Use io/console when available.

	  * Minor cleanup.

	* test/rubygems:  ditto.

Fri Dec 13 08:15:31 2013  Aman Gupta <ruby@tmm1.net>

	* class.c (include_modules_at): use RCLASS_M_TBL_WRAPPER for
	  equality checks. this avoids an unnecessary deference inside a tight
	  loop, fixing a performance regression from r43973.
	* object.c (rb_obj_is_kind_of): ditto.
	* object.c (rb_class_inherited_p): ditto.

Wed Dec 13 02:00:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (VpSetPTR): fix for limitation of the resulting
	  precision.
	  [ruby-core:50269] [Bug #7458]

	* test/bigdecimal/test_bigdecimal.rb (test_limit): add tests for the above
	  change.

Wed Dec 13 01:56:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (VpAddAbs): put out a conditional branch from
	  the inside of while-loop.

	* ext/bigdecimal/bigdecimal.c (VpSubAbs): ditto.

Wed Dec 13 01:53:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (VPrint): be a static function, support another
	  dump formats, and add more information of the given bigdecimal.

	* ext/bigdecimal/bigdecimal.h: ditto.

Wed Dec 11 16:45:58 2013  Koichi Sasada  <ko1@atdot.net>

	* eval.c (rb_raise_jump): call c_return hook immediately after
	  popping `raise' frame.
	  Patches by deivid (David Rodriguez). [Bug #8886]

	* test/ruby/test_settracefunc.rb: catch up this fix.

Wed Dec 11 16:01:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_reject): return a plain hash, without copying
	  the class, default value, instance variables, and taintedness.
	  they had been copied just by accident.
	  [ruby-core:59045] [Bug #9223]

Wed Dec 11 15:36:15 2013  Aman Gupta <ruby@tmm1.net>

	* compile.c (iseq_specialized_instruction): emit opt_aset instruction
	  to optimize Hash#[]= and Array#[]= when called with Fixnum argument.
	  [Bug #9227] [ruby-core:58956]

Wed Dec 11 04:54:03 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master ec8ed22.  Notable changes
	  include:

	  * Renamed extension_install_dir to extension_dir (backwards
	    compatible).

	  * Fixed creation of gem.deps.rb.lock file from
	    TestGemRequestSet#test_install_from_gemdeps_install_dir

	  * Fixed a typo and some documentation.

	* test/rubygems:  ditto.

Wed Dec 11 03:18:08 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* insns.def: Fix optimization bug of Float#/ [Bug #9238]

Tue Dec 10 23:58:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/date/date_strptime.c (date__strptime_internal): unset
	  case-insensitive flag for [:alpha:], which already implies both
	  cases, to get rid of backtrack explosion.  [ruby-core:58984]
	  [Bug #9221]

Tue Dec 10 23:44:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_hash): add salt to differentiate false and empty
	  array.  [ruby-core:58993] [Bug #9231]

	* hash.c (rb_any_hash, rb_hash_hash): ditto.

Tue Dec 10 18:16:09 2013  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* man/ruby.1: [DOC] Use www.ruby-toolbox.com instead of RAA.

Tue Dec 10 17:21:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (wmap_finalize, wmap_aset_update): use simple malloced array
	  instead of T_ARRAY, to reduce GC pressure.

Tue Dec 10 15:56:48 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (reflist_add): revert changes from r44109. it is unnecessary
	  after r44113
	* gc.c (allrefs_i): fix whitespace
	* gc.c (allrefs_roots_i): fix whitespace

Tue Dec 10 15:46:03 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (allrefs_add): push obj only if allrefs table doesn't have
	  obj.

	* gc.c (allrefs_roots_i): ditto.

Tue Dec 10 15:28:10 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (RGENGC_CHECK_MODE): separate checkers to different modes.
	  * 2: enable generational bits check (for debugging)
	  * 3: enable livness check
	  * 4: show all references

Tue Dec 10 15:15:37 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_marks_check): disable GC during checking and
	  restore malloc_increase info.

Tue Dec 10 14:41:53 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (reflist_add): return 0 if reference already exists
	* gc.c (allrefs_add): return 1 on newly added references
	* gc.c (allrefs_i): follow references to construct complete object
	  graph. before this patch, RGENGC_CHECK could fail to verify some WB
	  miss issues. [Bug #9226] [ruby-core:58959]

Tue Dec 10 11:20:56 2013  Aman Gupta <ruby@tmm1.net>

	* ext/objspace/objspace_dump.c (dump_object): include fstring flag on
	  strings. include gc flags (old, remembered, wb_protected) on all objects.
	* ext/objspace/objspace_dump.c (Init_objspace_dump): initialize lazy
	  IDs before first use.
	* gc.c (rb_obj_gc_flags): new function to retrieve object flags
	* internal.h (RB_OBJ_GC_FLAGS_MAX): maximum flags allowed for one obj
	* test/objspace/test_objspace.rb (test_dump_flags): test for above
	* test/objspace/test_objspace.rb (test_trace_object_allocations):
	  resolve name before dump (for rb_class_path_cached)

Tue Dec 10 07:48:29 2013  Aman Gupta <ruby@tmm1.net>

	* vm_method.c (rb_clear_method_cache_by_class): fire
	  ruby::method-cache-clear probe on global or klass-level method cache
	  clear [Bug #9190]
	* probes.d (provider ruby): new dtrace probe
	* doc/dtrace_probes.rdoc: docs for new probe
	* test/dtrace/test_method_cache.rb: test for new probe

Tue Dec 10 06:14:11 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/.document:  Remove curses from documentable directories.

Tue Dec 10 04:55:36 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/digest.rb: Deprecate OpenSSL::Digest::Digest
	  [Fixes GH-446] https://github.com/ruby/ruby/pull/446

Tue Dec 10 00:41:42 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/thread/thread.c: [DOC] add call-seq alias for Queue#enq, #<<, etc.

	* ext/thread/thread.c (Init_thread): use rb_define_alias instead of
	  rb_alias to document alias.

Mon Dec  9 20:00:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* internal.h (RCLASS_SERIAL): Add RCLASS_SERIAL as a convenience
	  accessor for RCLASS_EXT(klass)->class_serial.

	* class.c, vm_insnhelper.c, vm_method.c: Use RCLASS_SERIAL

Mon Dec  9 19:50:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* compile.c, insns.def, test/ruby/test_rubyvm.rb, vm.c, vm_core.h,
	  vm_insnhelper.c, vm_insnhelper.h, vm_method.c: Rename method_serial
	  to global_method_state and constant_serial to global_constant_state
	  after discussion with ko1.

Mon Dec  9 18:50:43 2013  Aman Gupta <ruby@tmm1.net>

	* hash.c (rb_hash_replace): fix segv on `{}.replace({})` introduced
	  in r44060 [Bug #9230] [ruby-core:58991]
	* test/ruby/test_hash.rb: regression test for above

Mon Dec  9 18:10:10 2013  Koichi Sasada  <ko1@atdot.net>

	* vm.c (vm_stat): renamed from ruby_vm_stat.
	  Should not use ruby_ prefix here.

Mon Dec  9 16:13:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (wmap_size): add ObjectSpace::WeakMap#size and #length.

Mon Dec  9 15:26:17 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* test/test_curses.rb: removed.

Mon Dec  9 13:36:55 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/curses, sample/curses: removed curses.

	* NEWS: added an entry for the above change.

Mon Dec  9 12:26:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/objspace/object_tracing.c (newobj_i): use cached class path
	  only to get rid object allocation during NEWOBJ hook.
	  [ruby-core:58853] [Bug #9212]

	* variable.c (rb_class_path_cached): returns cached class path
	  only, without searching and allocating new class path string.

Mon Dec  9 11:14:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/date/date_parse.c (parse_time): unset case-insensitive flag
	  for [:alpha:], which already implies both cases, to get rid of
	  backtrack explosion.  [ruby-core:58876] [Bug #9221]

Mon Dec  9 08:40:40 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master bf37240.  Fixes useless
	  error message with `gem install -g` with no gem dependencies file.
	* test/rubygems:  ditto.

Mon Dec  9 04:52:25 2013  Eric Hodel  <drbrain@segment7.net>

	* NEWS:  Update RubyGems entry with notable features.

Mon Dec  9 04:43:54 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/.document:  Add syslog/lib and thread/thread.c to documentable
	  items.  [ruby-trunk - Bug #9228]

Mon Dec  9 04:28:50 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 096db36.  Changes include
	  support for PATH in Gemfile.lock and a typo fix from Akira Matsuda.
	* test/rubygems:  ditto.

Mon Dec  9 02:10:32 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http/responses.rb:
	  Add `HTTPIMUsed`, as it is also supported by rack/rails.
	  RFC - http://tools.ietf.org/html/rfc3229
	  by Vipul A M <vipulnsward@gmail.com>
	  https://github.com/ruby/ruby/pull/447 fix GH-447

Sun Dec  8 20:47:35 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_get_kwargs): when values is non-null, remove
	  extracted keywords from the rest keyword argument.

Sun Dec  8 20:26:54 2013  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* common.mk (ruby.imp): avoid circular dependency on AIX

Sun Dec  8 20:21:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* bigdecimal.c (BigDecimal_coerce): convert a Float to a BigDecimal instead
	  of converting the receiver to a Float.  The reason is there are BigDecimal
	  instances with precisions that is smaller than the Float's precision.
	  [ruby-core:58756] [Bug #9192]

	* test/bigdecimal/test_bigdecimal.rb: add tests for the above change.

Sun Dec  8 18:28:20 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* NEWS: [DOC] update NEWS about GC.

Sun Dec  8 17:52:24 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* object.c: [DOC] document Module#singleton_class?.

Sun Dec  8 16:19:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_get_kwargs): if optional is negative, unknown
	  keywords are allowed.

	* vm_insnhelper.c (vm_callee_setup_keyword_arg): check unknown
	  keywords.

Sun Dec  8 14:55:12 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* array.c (rb_ary_shuffle_bang, rb_ary_sample): rename local variables.

Sun Dec  8 13:59:38 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* array.c (rb_ary_shuffle_bang, rb_ary_sample): check
	  unknown keywords.

	* test/ruby/test_array.rb (test_shuffle, test_sample): tests for
	  the above.

Sun Dec  8 13:01:11 2013  Aman Gupta <ruby@tmm1.net>

	* vm.c (ruby_vm_stat): add RubyVM.stat() for access to internal cache
	  counters. this methods behaves like GC.stat, accepting an optional
	  hash or symbol argument. [Bug #9190] [ruby-core:58750]
	* test/ruby/test_rubyvm.rb: test for new method

Sun Dec  8 11:59:40 2013  Aman Gupta <ruby@tmm1.net>

	* hash.c (rb_hash_replace): add a write barrier to fix GC mark miss on
	  hashes using Hash#replace [Bug #9226] [ruby-core:58948]

Sun Dec  8 11:21:00 2013  Aman Gupta <ruby@tmm1.net>

	* include/ruby/ruby.h: add RGENGC_WB_PROTECTED_NODE_CREF setting
	  In a large app, this reduces the size of
	  remembered_shady_object_count by 80%. [Bug #9225] [ruby-core:58947]
	* gc.c (rb_node_newnode): add FL_WB_PROTECTED flag to NODE_CREF
	* class.c (rewrite_cref_stack): insert OBJ_WRITE for NODE_CREF
	* iseq.c (set_relation): ditto
	* iseq.c (rb_iseq_clone): ditto
	* vm_eval.c (rb_yield_refine_block): ditto
	* vm_insnhelper.c (vm_cref_push): ditto
	* vm_insnhelper.h (COPY_CREF): ditto

Sun Dec  8 10:45:05 2013  Aman Gupta <ruby@tmm1.net>

	* hash.c (hash_aset_str): revert r43870 due to performance issue
	  [Bug #9188] [ruby-core:58730]
	* parse.y (assoc): convert literal string hash keys to fstrings
	* test/ruby/test_hash.rb (class TestHash): expand test

Sun Dec  8 10:22:38 2013  Aman Gupta <ruby@tmm1.net>

	* parse.y (register_symid_str): use fstrings in symbol table
	  [Bug #9171] [ruby-core:58656]
	* parse.y (rb_id2str): ditto
	* string.c (rb_fstring): create frozen_strings on first usage. this
	  allows rb_fstring() calls from the parser (before cString is created)
	* string.c (fstring_set_class_i): set klass on fstrings generated
	  before cString was defined
	* string.c (Init_String): convert frozen_strings table to String
	  objects after boot
	* ext/-test-/symbol/type.c (bug_sym_id2str): expose rb_id2str()
	* test/-ext-/symbol/test_type.rb (module Test_Symbol): verify symbol
	  table entries are fstrings

Sun Dec  8 10:24:20 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Update version for upcoming ruby 2.1.0 RC.

Sun Dec  8 10:21:36 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 14749ce.  This fixes bugs
	  handling of gem dependencies lockfiles (Gemfile.lock).

	* test/rubygems:  ditto.

Sun Dec  8 09:40:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* array.c (rb_ary_or): use RHASH_TBL_RAW instead of RHASH_TBL

	* process.c (rb_execarg_fixup): use RHASH_TBL_RAW and insert write
	  barriers where appropriate

	* vm.c (kwmerge_i): use RHASH_TBL_RAW

	* vm.c (HASH_ASET): use rb_hash_aset instead of calling directly into
	  st_insert

Sat Dec  7 11:15:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_reject): copy unrejected elements only to new hash,
	  so that the change on the original receiver can affect.
	  [ruby-core:58914] [Bug #9223]

Sat Dec  7 08:25:00 2013  Richo Healey  <richo@psych0tik.net>

	* test/ruby/test_struct.rb: Add regression test for question marks and
	  bangs in struct members. [Closes GH-468]

Fri Dec  6 19:33:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_extract_keywords, rb_get_kwargs): move from
	  vm_insnhelper.c.

Fri Dec  6 19:18:02 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: change oldmalloc meaning.
	  Increase oldmalloc_increase with malloc_increase
	  instead of using obj_memsize_of().

	  This change will avoid the danger of memory full without major GC.

Fri Dec  6 19:08:48 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (atomic_sub_nounderflow): not 0 but val itself.

Fri Dec  6 18:37:11 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace_alloc, Init_heap): initialize
	  oldmalloc_increase_limit at Init_heap.

	  rb_objspace_alloc() is not called on some platforms.

Fri Dec  6 18:33:39 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (garbage_collect_body): bug fix.
	  initialize after recording.

Fri Dec  6 17:49:46 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (atomic_sub_nounderflow): added to simplify atomic sub with
	  care about underflow.

	* gc.c (objspace_malloc_increase): use it.

Fri Dec  6 17:10:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (rb_get_kwargs): get keyword argument values from an
	  option hash, not only checking keys.

	* dir.c (dir_initialize): use rb_get_kwargs.

	* gc.c (gc_start_internal): ditto.

Fri Dec  6 16:47:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-brace-to-do-end): split single line block.

	* misc/ruby-mode.el (ruby-do-end-to-brace): shrink single line block
	  to one line.

Fri Dec  6 16:16:30 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_start_internal): do not use rb_gc_start() and rb_gc().

Fri Dec  6 15:24:30 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_start_internal, rb_gc): do not need
	  heap_pages_free_unused_pages() here.
	  It was done in after_sweep().

	* gc.c (rb_gc): The reason is now GPR_FLAG_CAPI.

Fri Dec  6 14:05:19 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (gc_start_internal): GC.start() now accepts two optional
	  keyword arguments. These can be used to disable full_mark (minor
	  mark only) or disable immediate_sweep (use lazy sweep). These new
	  options are useful for benchmarking GC behavior, or performing minor
	  GC out-of-band.
	* test/ruby/test_gc.rb (class TestGc): tests for new options.

Fri Dec  6 11:51:28 2013  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* lib/erb.rb: [DOC] fix broken link, Use rubygems.org and www.ruby-toolbox.com instead of RAA.
	  [Bug #9197]

Fri Dec  6 10:50:54 2013  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* lib/webrick/httprequest.rb: [DOC] Fix broken link of CGI specification by @udzura [fix GH-466]

Thu Dec  6 01:27:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec):
	  treat 0.0 and -0.0 of floating-point numbers specially for an optimization
	  and to correctly propagate its signbit to the result.
	  [Bug #9214] [ruby-core:58858]

	* test/bigdecimal/test_bigdecimal.rb: add tests case for the above change.

	* test/bigdecimal/test_bigdecimal_util.rb: ditto.

Thu Dec  5 22:18:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (configuration): strip destdir part from prefix to get
	  rid of duplication.  a patch by arton at [ruby-core:58859].
	  [ruby-core:58856] [Bug #9213]

Thu Dec  5 21:53:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_or): lhs elements are preferred, so should not
	  replace with rhs elements.

	* test/ruby/test_array.rb (test_OR_in_order): import the test failed
	  by r43969 from rubyspec/core/array/union_spec.rb.

Thu Dec  5 21:05:42 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_info_decode): fix to avoid syntax error on VS2012.

Thu Dec  5 19:35:35 2013  Martin Duerst <duerst@it.aoyama.ac.jp>

	* st.c: tweaked comment

Thu Dec  5 19:21:10 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (struct rb_objspace): rename internal last_collection_flags to
	  latest_gc_info
	* gc.c (gc_latest_collection_info): add GC.latest_gc_info() with similar
	  behavior to GC.stat()
	* gc.c (rb_gc_latest_gc_info): new c-api for above
	* gc.c (gc_stat_internal): remove :last_collection_flags from GC.stat
	* gc.c (gc_profile_decode_flags): remove GC::Profiler.decode_flags
	* include/ruby/intern.h (rb_gc_latest_gc_info): export new c-api
	* test/ruby/test_gc.rb (class TestGc): test for new behavior
	* NEWS: note about new api

	* gc.c (gc_stat_internal): raise TypeError on wrong type
	* gc.c (gc_stat): fix error message

Thu Dec  5 18:18:08 2013  Aman Gupta <ruby@tmm1.net>

	* ext/objspace/gc_hook.c: remove this file
	* ext/-test-/tracepoint/gc_hook.c: new filename for above
	* ext/objspace/objspace.c: remove ObjectSpace.after_gc_start_hook=
	* test/objspace/test_objspace.rb: remove test
	* test/-ext-/tracepoint/test_tracepoint.rb: add above test for
	  tracepoint re-entry

Thu Dec  5 17:44:53 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: change function names vm_ prefix to objspace_ prefix.
	  They are objspace_ functionality.

Thu Dec  5 16:11:04 2013  Aman Gupta <ruby@tmm1.net>

	* include/ruby/intern.h: add rb_gc_stat() for access to GC.stat
	  variables from c-api
	* gc.c (rb_gc_stat): new c-api method. accepts either VALUE hash like
	  GC.stat, or VALUE symbol key and returns size_t directly. the second
	  form is useful to avoid allocations, i.e. for usage inside
	  INTERNAL_EVENT_GC tracepoints.
	* gc.c (gc_stat): add GC.stat(:key) to return single value instead of hash
	* gc.c (gc_stat_internal): helper method to retrieve single or all stat values
	* test/ruby/test_gc.rb (class TestGc): test for new behavior
	* NEWS: note about this new api

Thu Dec  5 14:40:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash): revert r43981 and bail out to the outermost frame
	  when recursion is detected.

Thu Dec  5 13:47:15 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (vm_malloc_size): added.
	  return malloc_usable_size() if possible.

	* gc.c (MALLOC_ALLOCATED_SIZE): add new setting macro to enable
	  GC.allocated_size.
	  If platform supports `malloc_usable_size()' (or similar one),
	  GC.allocated_size can be implemented with this function.
	  Default is 0.

	* gc.c (vm_xmalloc, vm_xrealloc, vm_xfree): use vm_malloc_size()
	  to detect collect allocated size.

	* gc.c (vm_malloc_increase): refactoring.

Thu Dec  5 13:19:03 2013  Aman Gupta <ruby@tmm1.net>

	* include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with
	  two new events: GC_END_MARK and GC_END_SWEEP
	* gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done
	* gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark
	* ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests
	  for new events.
	* test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj):
	  ditto.
	* NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample,
	  and will be removed before ruby 2.1.
	* ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook=

Thu Dec  5 10:47:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for
	  a generic pointer.

Thu Dec  5 10:47:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (finalize_deferred): flush all deferred finalizers while other
	  finalizers can get ready to run newly by lazy sweep.
	  [ruby-core:58833] [Bug #9205]

Thu Dec  5 09:07:59 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (ruby_gc_set_params): Accept safe_level argument so GC tuning
	  settings can be applied before rb_safe_level() is available.
	* internal.h (rb_gc_set_params): ditto.
	* ruby.c (process_options): Apply GC tuning early during boot process
	  so boot-time allocations can benefit. This also benefits any code
	  loaded in via `ruby -r`.

Wed Dec  4 13:02:13 2013  Aman Gupta <ruby@tmm1.net>

	* vm_trace.c (rb_suppress_tracing): Fix initialization of stack
	  allocated rb_trace_arg_t structure. Without this patch, sometimes
	  INTERNAL_EVENT_GC would be skipped accidentally inside
	  rb_threadptr_exec_event_hooks_orig().

Wed Dec  4 12:57:24 2013  Aman Gupta <ruby@tmm1.net>

	* string.c (fstr_update_callback): Improve implementation in r43968
	  based on feedback from @nagachika. In the existing case, we can
	  return ST_STOP to prevent any hash modification. In the !existing
	  case, set both key and value to the fstr.

Wed Dec  4 12:47:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/delegate.rb (Delegator#method_missing): ignore the target if not
	  set, and delegate to global methods.  [ruby-core:58572] [Bug #9155]

	* lib/delegate.rb (Delegator#respond_to_missing): ditto.

	* lib/delegate.rb (SimpleDelegator#__getobj__): yield and return if
	  not delegated but a block is given, like as Hash#fetch.

	* lib/delegate.rb (DelegateClass#__getobj__): ditto.

Tue Dec  3 23:48:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check malloc_size() availability.

	* gc.c: use malloc_size() with malloc/malloc.h if available.

Tue Dec  3 23:06:20 2013  Narihiro Nakamura  <authornari@gmail.com>

	* object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a
	  original object.

Tue Dec  3 22:32:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_recursive): make similar (recursive) constructs
	  return same hash value.  execute recursively, and rewind to the
	  topmost frame with an object which .eql? to the recursive
	  object, if recursion is detected.

	* hash.c (rb_hash): detect recursion for all `hash' methods.  each
	  `hash' methods no longer need to use rb_exec_recursive().

Tue Dec  3 21:53:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_catch_protect): new function similar to
	  rb_catch_obj(), but protect from all global jumps like as
	  rb_load_protect(), rb_protect(), etc.

Tue Dec  3 20:18:46 2013  Narihiro Nakamura  <authornari@gmail.com>

	* object.c (rb_obj_clone): Protect FL_PROMOTED and FL_WB_PROTECTED
	  flags of a destination object.

Tue Dec  3 20:16:38 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_hash_rehash): use hash_alloc() instead of rb_hash_new(),
	  to hide temporary object from ObjectSpace.  [Bug #9187]

Tue Dec  3 17:11:47 2013  Aman Gupta <ruby@tmm1.net>

	* load.c (features_index_add_single): Move loaded_features_index array values off
	  the ruby heap. [Bug #9201] [ruby-core:58805]
	* load.c (loaded_features_index_clear_i): Clean up off-heap array structure.
	* vm.c (rb_vm_mark): Remove unnecessary mark_tbl for loaded_features_index.
	  This improves minor GC time by 15% in a large application.

Tue Dec  3 17:01:45 2013  Aman Gupta <ruby@tmm1.net>

	* include/ruby/ruby.h (struct RClass): Add wrapper struct around
	  RClass->m_tbl with serial. This prevents double marking method
	  tables, since many classes/modules can share the same method table.
	  This improves minor mark time in a large application by 30%.
	* internal.h (struct method_table_wrapper): Define new
	  wrapper struct with additional serial.
	* internal.h (RCLASS_M_TBL_INIT): New macro for initializing method
	  table wrapper and st_table.
	* method.h (void rb_sweep_method_entry): Rename rb_free_m_table to
	  rb_free_m_tbl for consistency
	* .gdbinit (define rb_method_entry): Update rb_method_entry gdb helper
	  for new method table structure.
	* class.c: Use RCLASS_M_TBL_WRAPPER and
	  RCLASS_M_TBL_INIT macros.
	* class.c (rb_include_class_new): Share WRAPPER between module and
	  iclass, so serial can prevent double marking.
	* eval.c (rb_prepend_module): ditto.
	* eval.c (rb_using_refinement): ditto.
	* gc.c: Mark and free new wrapper struct.
	* gc.c (obj_memsize_of): Count size of additional wrapper struct.

Tue Dec  3 14:05:49 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_uniq_bang): remove duplicate code.

Tue Dec  3 13:40:42 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (ary_add_hash): set and return values because string keys
	  will be frozen. [ruby-core:58809] [Bug #9202]

	* array.c (rb_ary_uniq_bang): ditto.

	* array.c (rb_ary_or): ditto.

	* array.c (rb_ary_uniq): ditto.

	* test/ruby/test_array.rb: tests for above.

	The patch is from normalperson (Eric Wong).

Tue Dec  3 12:20:21 2013  Aman Gupta <ruby@tmm1.net>

	* string.c (rb_fstring): Use st_update instead of st_lookup +
	  st_insert.
	* string.c (fstr_update_callback): New callback for st_update.

Tue Dec  3 12:17:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
	  NoMethodError when the original of alias is not found.

Tue Dec  3 10:43:58 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/lib/openssl/buffering.rb:  Return ASCII-8BIT strings from
	  SSLSocket methods.  [ruby-trunk - Bug #9028]
	* test/openssl/test_ssl.rb:  Test for the above.

Tue Dec  3 09:42:27 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc master 900de99.  Changes include:

	  Fixed documentation display of constants

	  Fixed handling of unknown parsers

	* test/rdoc:  ditto.

Mon Dec  2 22:30:10 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* hash.c (getenv): fixed test failures introduced by r43950.
	  [ruby-core:58774] [Bug #9195] reported by phasis68 (Heesob Park).

Mon Dec  2 21:49:19 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_rehash): make temporary st_table under the control
	  of GC. [Bug #9187]

	* test/ruby/test_hash.rb: add a test for above.

Mon Dec  2 17:23:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* variable.c (rb_mod_constants): when calling Module#constants with
	  inherit=false, there is no need to use a hashtable to deduplicate
	  constant names. [Feature #9196] [ruby-core:58786]

Mon Dec  2 14:16:52 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/smtp.rb (Net::SMTP#critical):  Always return a
	  Net::SMTP::Response.  Patch by Pawel Veselov.
	  [ruby-trunk - Bug #9125]
	* test/net/smtp/test_smtp.rb:  Test for the above.

Mon Dec  2 05:52:33 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master baa965b.  Notable changes:

	  Copy directories to lib/ when installing extensions.  This completes
	  the fix for [ruby-trunk - Bug #9106]

	* test/rubygems:  ditto.

Mon Dec  2 02:03:47 2013  Shota Fukumori  <her@sorah.jp>

	* test/ruby/test_case.rb (test_nomethoderror):
	  Add test related to r43913, r43914

Mon Dec  2 00:53:01 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* hash.c (getenv): use ANSI codepage version of getenv() for miniruby
	  on Windows.
	  [ruby-core:58732] [Bug #9189] reported by phasis68 (Heesob Park).

Sun Dec  1 22:14:27 2013  Zachary Scott  <e@zzak.io>

	* doc/contributors.rdoc: [DOC] Import contributors from redmine wiki
	  Many wiki pages have become outdated and spam-ridden, we will import
	  these to trunk and begin maintaining them in ruby-trunk. This will
	  also allow new contributors to easily contribute patches to update
	  these pages, where previously a redmine account with wiki access was
	  required. Another bonus is having a contributors file to show thanks
	  to all of the people who have submitted a patch to Ruby.

Sun Dec  1 18:03:26 2013  Zachary Scott  <e@zzak.io>

	* doc/maintainers.rdoc: [DOC] Current maintainers of Ruby

Sun Dec  1 17:17:36 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Current branch maintainers

Sun Dec  1 17:16:36 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Reporting other (ruby-lang.org) issues

Sun Dec  1 17:15:51 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Current platform maintainers

Sun Dec  1 17:14:55 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Reporting downstream distro issues

Sun Dec  1 14:37:20 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_to_a): specify array capa.

Sun Dec  1 14:15:36 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_rehash): fix to free new st_table when exception
	  is raised in do_hash(). [Bug #9187]

Sun Dec  1 11:57:59 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/buffering.rb: Fix warning in copyright

Sun Dec  1 08:27:28 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 66e5c39.  Notable changes:

	  Implement gem.deps.rb (Gemfile) .lock support

	  Fixed `gem uninstall` for a relative directory in GEM_HOME.

	* test/rubygems:  ditto.

Sun Dec  1 06:00:49 2013  Aman Gupta <ruby@tmm1.net>

	* test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming
	  free slots to fix test.

Sat Nov 30 21:22:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_initialize): check unknown keywords.  [ruby-dev:47152]
	  [Bug #8060]

Sat Nov 30 18:05:38 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32ole/win32ole.c (hash2named_arg): correct declaration to fix
	  build failure.  a patch by phasis68 (Heesob Park) at
	  [ruby-core:58710].  [Bug #9184]

Sat Nov 30 17:46:35 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_cleanup): determine exit status and signal to terminate
	  before finalization, to get rid of access destroyed T_DATA exception
	  object.  [ruby-core:58643] [Bug #9167]

Sat Nov 30 16:25:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (enumerator_with_index): should not store local variable
	  address to memoize the arguments.  it is invalidated after the return.
	  [ruby-core:58692] [Bug #9178]

Sat Nov 30 13:28:13 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* siphash.c (sip_hash24): fix for aligned word access little endian
	  platforms.  [ruby-core:58658] [Bug #9172]

Sat Nov 30 13:21:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_yield_block): implement non-nil block argument.

Fri Nov 29 20:59:39 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* vm_dump.c (rb_vmdebug_debug_print_pre): Bugfix. Get PC directly.
	  PC is cached into local stack and cfp->pc is incorrect at next of
	  branch or jump.
	* vm_exec.h (DEBUG_ENTER_INSN): catch up this change.
	* vm_core.h: update signature of rb_vmdebug_debug_print_pre.

Fri Nov 29 20:43:57 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* compile.c: Bugsfix for dump_disasm_list.
	  rb_inspect denies a hidden object. So, insert wrapper that creates
	  the unhidden one.
	  adjust->label is null sometimes.
	  insn_data_line_no makes no sense at all.

Fri Nov 29 18:06:45 2013  Shota Fukumori  <her@sorah.jp>

	* test/ruby/test_case.rb (test_method_missing): Test for r43913.

Fri Nov 29 17:53:22 2013  Shota Fukumori  <her@sorah.jp>

	* vm_insnhelper.c (check_match): Fix SEGV with VM_CHECKMATCH_TYPE_CASE
	  and class of `pattern` has `method_missing`
	  [Bug #8872] [ruby-core:58606]

Fri Nov 29 17:06:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_yield_block): yield block with rb_block_call_func
	  arguments.

	* range.c (range_each): use rb_yield_block.

	* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): constify argv.

	* enum.c (rb_enum_values_pack): ditto.

	* vm_eval.c (rb_block_call, rb_check_block_call): ditto.

	* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
	  argument list of rb_block_call_func.

Fri Nov 29 11:26:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (rb_block_call_func): add blockarg.  block
	  function can take block argument, e.g., proc {|&blockarg| ...}.

Thu Nov 28 21:43:48 2013  Zachary Scott  <e@zzak.io>

	* doc/dtrace_probes.rdoc: [DOC] Import dtrace probes doc from wiki

Thu Nov 28 21:17:32 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Add heading above ChangeLog tips to
	  setup entry for commits, its not required. Actually easier if
	  contributors don't include a ChangeLog entry.

Thu Nov 28 21:16:18 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Add coding style heading for patch
	  rules

Thu Nov 28 21:15:45 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Add notes about deciding what to patch

Thu Nov 28 19:43:45 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster
	  than 2.0.0p353.

	* benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster
	  than 2.0.0p353.

	* benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster
	  than 2.0.0p353.

Thu Nov 28 19:29:04 2013  Zachary Scott  <e@zzak.io>

	* doc/contributing.rdoc: [DOC] Add notes about slideshow proposals
	  from wiki page: HowToRequestFeatures

Thu Nov 28 17:34:42 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* st.c: add st_values() and st_values_check().

	* include/ruby/st.h: add prototypes for above.

	* hash.c (rb_hash_values): use st_values_check() for performance
	  improvement if VALUE and st_data_t are compatible.

Thu Nov 28 17:14:14 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* st.c (st_keys): fix not to use Qundef in st.c.

	* include/ruby/st.h: define modified prototype.

	* hash.c (rb_hash_keys): use modified st_keys().

Thu Nov 28 16:34:43 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c: Expose details about last garbage collection via GC.stat.
	* gc.c (gc_stat): Add :last_collection_flags for reason/trigger/type of
	  last GC run.
	* gc.c (gc_prof_sweep_timer_stop): Record HAVE_FINALIZE GPR even
	  without GC_PROFILE_MORE_DETAIL.
	* gc.c (gc_profile_flags): Add GC::Profiler.decode_flags to make sense
	  of GC.stat[:last_collection_flags]
	* test/ruby/test_gc.rb (class TestGc): Test for above.

Thu Nov 28 16:15:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_dup2): extract from rb_cloexec_dup2() and
	  redirect_dup2().

Tue Nov 28 14:40:00 2013  Akira Matsuda  <ronnie@dio.jp>

	* lib/drb/ssl.rb:  [Doc] Fix typo

Thu Nov 28 13:56:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (Doxyfile): tool/file2lastrev.rb needs running with
	  BASERUBY since r43617.  [ruby-dev:47823] [Bug #9169]

Thu Nov 28 09:18:39 2013  Koichi Sasada  <ko1@atdot.net>

	* string.c (rb_fstring): fstrings should be ELTS_SHARED.
	  If we resurrect dying objects (non-marked, but not swept yet),
	  pointing shared string can be collected.
	  To avoid such issue, fstrings (recorded to fstring_table)
	  should not be ELTS_SHARED (should not have a shared string).

Thu Nov 28 01:35:08 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* st.c (st_keys): fix to use st_index_t for size of hash.

Thu Nov 28 00:36:52 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* st.c (st_keys): define st_keys(). it writes each key to buffer.

	* hash.c (rb_hash_keys): use st_keys() for performance improvement
	  if st_data_t and VALUE are compatible.

	* include/ruby/st.h: define macro ST_DATA_COMPATIBLE_P() to predicate
	  whether st_data_t and passed type are compatible.

	* configure.in: check existence of builtin function to use in
	  ST_DATA_COMPATIBLE_P().

Thu Nov 28 00:07:28 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* ruby_atomic.h: remove duplicate definitions between ATOMIC_XXX
	  and ATOMIC_SIZE_XXX.

Wed Nov 27 23:55:50 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* ruby_atomic.h: define ATOMIC_SIZE_CAS() with
	  __atomic_compare_exchange_n() and refactoring.

Tue Nov 27 21:43:00 2013  Akira Matsuda  <ronnie@dio.jp>

	* lib/irb/notifier.rb:  [Doc] Fix typo
	* ext/json/lib/json/common.rb:  Ditto.

Tue Nov 27 18:04:57 2013  Akira Matsuda  <ronnie@dio.jp>

	* lib/irb/notifier.rb:  Fix typo

Wed Nov 27 17:54:57 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_mark_stacked_objects): check only when check_mode > 0.

Wed Nov 27 16:07:19 2013  Aman Gupta <ruby@tmm1.net>

	* test/ruby/test_gc.rb (class TestGc): Fix warning in
	  test_expand_heap.

Wed Nov 27 15:55:52 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (Init_GC): Add new GC::INTERNAL_CONSTANTS for information about
	  GC heap/page/slot sizing.
	* test/ruby/test_gc.rb (class TestGc): test for above.

Wed Nov 27 15:21:17 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (gc_page_sweep): Fix compile warning from last commit.
	* hash.c (hash_aset_str): Re-use existing variable to avoid
	  unnecessary pointer dereferencing.

Wed Nov 27 15:12:55 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_page_sweep): disable debug print.

Wed Nov 27 15:05:59 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): add new information heap_eden_page_length and
	  heap_tomb_page_length.

	* test/ruby/test_gc.rb: fix to use GC.stat[:heap_eden_page_length]
	  instead of GC.stat[:heap_length].
	  This test expects `heap_eden_page_length' (used pages size).

Wed Nov 27 15:02:53 2013  Aman Gupta <ruby@tmm1.net>

	* test/ruby/test_eval.rb (class TestEval): Use assert_same instead of
	  assert_equal.
	* test/ruby/test_hash.rb (class TestHash): ditto.
	* test/ruby/test_iseq.rb (class TestISeq): ditto.

Wed Nov 27 14:50:02 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rinda/ring.rb:  Announce RingServer for the same process.
	  [ruby-trunk - Bug #9163]
	* test/rinda/test_rinda.rb:  Tests for the above.

Wed Nov 27 14:37:33 2013  Aman Gupta <ruby@tmm1.net>

	* test/ruby/test_eval.rb (class TestEval): Add test for shared eval
	  filenames via rb_fstring().
	* test/ruby/test_iseq.rb (class TestISeq): Add test for shared
	  iseq labels via rb_fstring(). [Bug #9159]

Wed Nov 27 14:24:55 2013  Aman Gupta <ruby@tmm1.net>

	* hash.c (hash_aset_str): Use rb_fstring() to de-duplicate hash string
	  keys. Patch by Eric Wong. [Bug #8998] [ruby-core:57727]
	* test/ruby/test_hash.rb (class TestHash): test for above.

Wed Nov 27 10:39:39 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c: Rename rb_heap_t members:
	    used -> page_length
	    limit -> total_slots

Wed Nov 27 08:24:49 2013  Aman Gupta <ruby@tmm1.net>

	* compile.c: Use rb_fstring() to de-duplicate string literals in code.
	  [ruby-core:58599] [Bug #9159] [ruby-core:54405]
	* iseq.c (prepare_iseq_build): De-duplicate iseq labels and source
	  locations.
	* re.c (rb_reg_initialize): Use rb_fstring() for regex string.
	* string.c (rb_fstring): Handle non-string and already-fstr arguments.
	* vm_eval.c (eval_string_with_cref): De-duplicate eval source
	  filename.

Wed Nov 27 07:13:54 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: psych version 2.0.2
	* ext/psych/psych.gemspec: ditto

Wed Nov 27 06:40:18 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: fix support for negative
	  years.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
	* test/psych/test_date_time.rb: test for change.
	  Fixes: https://github.com/tenderlove/psych/issues/168

Wed Nov 27 04:46:55 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: fix regexp for matching TIME
	  strings.
	* test/psych/test_date_time.rb: test for change.
	  Fixes: https://github.com/tenderlove/psych/issues/171

Wed Nov 27 02:26:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_new4): copy the original capacity so that memsize of
	  frozen shared string returns correct size.

Wed Nov 27 02:20:13 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_hash): should not ignore the rest of recursive
	  constructs.

	* hash.c (rb_hash_hash): ditto.

	* range.c (range_hash): ditto.

	* struct.c (rb_struct_hash): ditto.

	* test/-ext-/test_recursion.rb (TestRecursion): separate from
	  test/ruby/test_thread.rb.

Tue Nov 26 22:43:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash): cut off if recursion detected to get rid of stack
	  overflow.  [ruby-core:58567] [Bug #9151]

Tue Nov 26 20:02:39 2013  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_settracefunc.rb: add tests for a_call/a_return
	  by Brandur <brandur@mutelight.org> [Feature #9120]

Tue Nov 26 19:29:52 2013  Koichi Sasada  <ko1@atdot.net>

	* common.mk: add useful config "set breakpoint pending on"
	  for run.gdb.

Tue Nov 26 19:17:47 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/object_tracing.c (newobj_i): skip class_path if class
	  is frozen.

	  rb_class_path() can modify frozen classes (and causes errors).
	  This patch is temporary. We need no-modification/no-allocation
	  class path function.

Tue Nov 26 18:12:13 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: skip "exception check" and "reentrant check (only normal
	  events)  for internal events.

	  Reentrant check for internal events are remaining.

Tue Nov 26 17:38:16 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: prohibit to specify normal events and internal events
	  simultaneously.
	  I will introduce special care for internal events later.

	* ext/-test-/tracepoint/tracepoint.c: test this behavior.

	* test/-ext-/tracepoint/test_tracepoint.rb: ditto.

Tue Nov 26 16:30:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_readlink): fix buffer overflow on a long symlink. since
	  rb_str_modify_expand() expands from its length but not its capacity,
	  need to set the length properly for each expansion.
	  [ruby-core:58592] [Bug #9157]

Tue Nov 26 14:23:17 2013  Aman Gupta <ruby@tmm1.net>

	* ext/objspace/objspace_dump.c (dump_append_string_value): Escape
	  control characters for strict json parsers.
	* ext/objspace/objspace_dump.c (objspace_dump): Document File/IO
	  output option.

Tue Nov 26 11:43:19 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* ruby_atomic.h: use __atomic builtin functions supported by GCC.
	  __sync family are legacy functions now and it is recommended
	  that new code use the __atomic functions.
	  http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

	* configure.in: check existence of __atomic functions.

Tue Nov 26 10:57:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.gemspec: revert Gem::Specification#date
	  for snapshot/release tarballs.

Tue Nov 26 06:42:50 2013  Aman Gupta <ruby@tmm1.net>

	* NEWS: Add ObjectSpace.after_gc_{start,end}_hook=
	* ext/objspace/objspace_dump.c: [DOC] catch up dump/dump_all to r43679

Tue Nov 26 04:12:10 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 612f85a.  Notable changes:

	  Fixed installation and activation of git: and path: gems via
	  Gem.use_gemdeps

	  Improved documentation coverage

	* test/rubygems:  ditto.

Mon Nov 25 22:23:03 2013  Zachary Scott  <e@zzak.io>

	* lib/xmlrpc.rb: [DOC] Fix link to xmlrpc4r site [Bug #9148]
	  Patch by Giorgos Tsiftsis

Mon Nov 25 19:48:10 2013  Zachary Scott  <e@zzak.io>

	* lib/uri/common.rb: [DOC] typo fixes by @vipulnsward [Fixes GH-456]
	  https://github.com/ruby/ruby/pull/456
	* lib/uri/generic.rb: [DOC] ditto.

Mon Nov 25 14:34:42 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/bigdecimal.gemspec: bump BigDecimal to 1.2.3 for
	  proper release date in RubyGems

Mon Nov 25 14:25:08 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/bigdecimal.gemspec: Remove Gem::Specification#date
	  We should rely on rubygems to create the date the gem was released
	  for each version.

Mon Nov 25 06:53:30 2013  Koichi Sasada  <ko1@atdot.net>

	* internal.h: do not use ruby_sized_xrealloc() and ruby_sized_xfree()
	  if HAVE_MALLOC_USABLE_SIZE (or _WIN32) is defined.

	  We don't need these function if malloc_usable_size() is available.

	* gc.c: catch up this change.

	* gc.c: define HAVE_MALLOC_USABLE_SIZE on _WIN32.

	* array.c (ary_resize_capa): do not use ruby_sized_xfree() with
	  local variable to avoid "unused local variable" warning.
	  This change only has few impact.

	* string.c (rb_str_resize): ditto.

Mon Nov 25 05:05:04 2013  Koichi Sasada  <ko1@atdot.net>

	* test/-ext-/tracepoint/test_tracepoint.rb: catch up GC.stat changes
	  at r43835.

Mon Nov 25 04:45:59 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: continue to change OLDSPACE -> OLDMALLOC.
	  RGENGC_ESTIMATE_OLDSPACE -> RGENGC_ESTIMATE_OLDMALLOC.

	* gc.c: add a new major GC reason GPR_FLAG_MAJOR_BY_OLDMALLOC.

Mon Nov 25 04:16:09 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: change terminology "..._num" to "..._slots" about slot operation.
	  * final_num -> final_slots
	  * objspace_live_num() -> objspace_live_slots()
	  * objspace_limit_num() -> objspace_limit_slots()
	  * objspace_free_num() -> objspace_free_slots()

Mon Nov 25 04:03:12 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): add internal information.
	  * heap_swept_slot
	  * malloc_increase
	  * malloc_limit
	  * remembered_shady_object
	  * remembered_shady_object_limit
	  * old_object
	  * old_object_limit
	  * oldmalloc_increase
	  * oldmalloc_limit

	* gc.c (gc_stat): rename names.
	  * heap_live_num -> heap_live_slot
	  * heap_free_num -> heap_free_slot
	  * heap_final_slot -> heap_final_slot

	  Quote from RDoc of GC.stat():
	    "The contents of the hash are implementation specific and may
	    be changed in the future."

	* test/ruby/test_gc.rb: catch up this change.

Mon Nov 25 03:59:45 2013  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_gc.rb: catch up last commit.
	  Now RUBY_GC_OLDSPACE_LIMIT(...) is RUBY_GC_OLDMALLOC_LIMIT(...).

Mon Nov 25 03:10:46 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: change terminology OLDSPACE -> OLDMALLOC.
	  (oldspace -> oldmalloc for variable names)

	  OLDSPACE is confusing because it is not includes slots.
	  To more clearly, rename such as (oldspace_limit -> oldmalloc_limit).
	  It is clear that it measures (estimates) malloc()'ed size.

Mon Nov 25 00:50:03 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* internal.h: use __builtin_bswap16() if possible.

	* configure.in: check existence of __builtin_bswap16().

Sun Nov 24 22:24:19 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigxor_int): Apply BIGLO for long in a BDIGIT expression.
	  (bigor_int): Ditto.
	  (bigand_int): Ditto.

Sun Nov 24 18:13:23 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h (SIZEOF_ACTUAL_BDIGIT): Defined.

	* include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Use
	  SIZEOF_ACTUAL_BDIGIT instead of SIZEOF_BDIGITS.
	  SIZEOF_BDIGITS can be different to sizeof(BDIGIT).

Sun Nov 24 13:49:08 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h: Don't use int128_t for Bignum.
	  It's not always faster.

	* bignum.c: Ditto.

Sun Nov 24 10:18:15 2013  Aman Gupta <ruby@tmm1.net>

	* NEWS: Add details about new debugging features and APIs.

Sun Nov 24 09:37:20 2013  Andrew Vit  <andrew@avit.ca>

	* lib/csv.rb: Optimize header hashes by freezing string keys.
	  [ruby-core:58510]

Sun Nov 24 09:18:06 2013  Aman Gupta <ruby@tmm1.net>

	* ext/objspace/objspace_dump.c (dump_object): Use PRIuSIZE to print
	  size_t for better win32 compatibility.
	* test/objspace/test_objspace.rb (test_dump_all): Hold reference to
	  test string to avoid failure due to GC. Reduce size of failure message
	  using grep(/TEST STRING/).

Sun Nov 24 08:38:00 2013  Kyle Stevens  <kstevens715@gmail.com>

	* lib/csv.rb: If skip_lines is set to a String, convert it to a Regexp
	  to prevent the alternative, which is that each line in the CSV gets
	  converted to a Regexp when calling skip_lines#match.

Sun Nov 24 01:03:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_power): Use FIX2LONG instead
	  of FIX2INT to avoid conversion error.

Sun Nov 24 00:44:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): define by macros
	  defined in defines.h, instead of complex and repeated expression.

Sat Nov 23 22:22:26 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Limit the value to
	  less than 8.

Sat Nov 23 19:52:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.E): Use BigMath.exp.
	  [Feature #6857] [ruby-core:47130]

Sat Nov 23 19:46:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Optimize the
	  calculation algorithm to reduce the number of divisions.
	  This optimization was proposed by Rafal Michalski.
	  [Feature #6857] [ruby-core:47130]

Sat Nov 23 19:20:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_div2): The signature was
	  changed to allow us to pass arguments directly.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_div3): Added for the role of
	  the old BigDecimal_div2.

Sat Nov 23 12:31:00 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix global variable name.
	  Now we have following environments (and related variable names).

	  * RUBY_GC_HEAP_INIT_SLOTS
	  * RUBY_GC_HEAP_FREE_SLOTS
	  * RUBY_GC_HEAP_GROWTH_FACTOR (new from 2.1)
	  * RUBY_GC_HEAP_GROWTH_MAX_SLOTS (new from 2.1)

	  * obsolete
	    * RUBY_FREE_MIN       -> RUBY_GC_HEAP_FREE_SLOTS (from 2.1)
	    * RUBY_HEAP_MIN_SLOTS -> RUBY_GC_HEAP_INIT_SLOTS (from 2.1)

	  * RUBY_GC_MALLOC_LIMIT
	  * RUBY_GC_MALLOC_LIMIT_MAX (new from 2.1)
	  * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR (new from 2.1)

	  * RUBY_GC_OLDSPACE_LIMIT (new from 2.1)
	  * RUBY_GC_OLDSPACE_LIMIT_MAX (new from 2.1)
	  * RUBY_GC_OLDSPACE_LIMIT_GROWTH_FACTOR (new from 2.1)

	* test/ruby/test_gc.rb: catch up this change.

Sat Nov 23 09:45:49 2013  Aman Gupta <ruby@tmm1.net>

	* marshal.c (w_object): Use HASH_PROC_DEFAULT directly from internal.h

Sat Nov 23 08:43:23 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c: Rename heap_pages_swept_num to heap_pages_swept_slots to
	  clarify meaning (number of slots, not pages).

Sat Nov 23 08:23:23 2013  Aman Gupta <ruby@tmm1.net>

	* lib/set.rb (class SortedSet): Fix source_location for methods
	  defined via eval.

Sat Nov 23 03:44:03 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master dcce4ff.  Important changes
	  in this commit:

	  Remove automatic detection of gem dependencies files.  This prevents a
	  security hole as described in [ruby-core:58490]

	  Fixed bugs for installing git gems.

	* test/rubygems:  ditto.

Fri Nov 22 22:30:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_power):
	  Round the result value only if the precision is given.

Fri Nov 22 17:20:50 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* transcode.c (str_transcode0): don't scrub invalid chars if
	  str.encode doesn't have explicit invalid: :replace.
	  workaround fix for see #8995

Fri Nov 22 17:11:26 2013  Narihiro Nakamura  <authornari@gmail.com>

	* include/ruby/intern.h, internal.h: Expose rb_gc_count().

Fri Nov 22 17:07:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.gemspec: version 1.2.2.

Fri Nov 22 17:04:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_data_type):
	  Use RUBY_TYPED_FREE_IMMEDIATELY only if it is available.

Fri Nov 22 16:49:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_power): Round the result value.
	  [Bug #8818] [ruby-core:56802]

	* test/bigdecimal/test_bigdecimal.rb: Add a test for the above fix.

Fri Nov 22 16:25:43 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (heap_set_increment): accept minimum additional page number.

	* gc.c (gc_after_sweep): allocate pages to allocate at least
	   RUBY_HEAP_MIN_SLOTS.
	   [Bug #9137]

Fri Nov 22 16:19:52 2013  Narihiro Nakamura  <authornari@gmail.com>

	* include/ruby/intern.h (rb_gc_set_params): Deprecate
	  rb_gc_set_params because it's only used in ruby internal.

	* internal.h (ruby_gc_set_params): Declare rb_gc_set_params's
	  alias function.

	* gc.c: ditto.

	* ruby.c: use ruby_gc_set_params.

Fri Nov 22 14:55:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Insert rb_thread_check_ints.

Fri Nov 22 14:35:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix the inserting points
	  of RB_GC_GUARDs.

Fri Nov 22 14:31:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c: Fix indentation.

Fri Nov 22 14:03:00 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf: merge nkf 2.1.3 2a2f2c5.

Fri Nov 22 12:43:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_strtod): ignore too long fraction part, which does not
	  affect the result.

Fri Nov 22 12:17:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#initialize):
	  initialize of a module should pass arguments to super.

Fri Nov 22 12:02:58 2013  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_settracefunc.rb: Ignore events from other threads.

Fri Nov 22 10:35:57 2013  Koichi Sasada  <ko1@atdot.net>

	* vm.c (ruby_vm_destruct): do not use ruby_xfree() after freeing
	  objspace.

	* gc.c (ruby_mimfree): added. It is similar to ruby_mimmalloc().

	* internal.h: ditto.

Fri Nov 22 09:42:35 2013  Zachary Scott  <e@zzak.io>

	* test/digest/test_digest.rb: Reverse order of assert_equal
	  Reported by @splattael

Fri Nov 22 09:03:16 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c: fix build failure on FreeBSD introduced by r43763.
	  malloc_usable_size() is defined by malloc_np.h on FreeBSD.

	* configure.in: check malloc.h and malloc_np.h.

Fri Nov 22 08:27:13 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 50a8210.  Important changes
	  in this commit:

	  RubyGems now automatically checks for gem.deps.rb or Gemfile when
	  running ruby executables.  This behavior is similar to `bundle exec
	  rake`.  This change may be reverted before Ruby 2.1.0 if too many bugs
	  are found.

	* test/rubygems:  ditto.

Thu Nov 21 22:33:59 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: RGENGC_CHECK_MODE should be 0.

Thu Nov 21 21:40:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (VpAlloc): Fix the expr to adjust the size
	  of the digit array.

Thu Nov 21 21:36:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix the precision of
	  the result BigDecimal of sqrt.
	  [Bug #5266] [ruby-dev:44450]

	* test/bigdecimal/test_bigdecimal.rb: add tests for the above changes.

Thu Nov 21 18:49:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (vm_xrealloc, vm_xfree): use malloc_usable_size() to obtain old
	  size if available.

Thu Nov 21 18:47:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/delegate.rb (SimpleDelegator#__getobj__): target object must be set.

	* lib/delegate.rb (DelegateClass#__getobj__): ditto.

Thu Nov 21 18:28:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/tempfile.rb (Tempfile#initialize): use class method to get rid
	  of warnings when $VERBOSE.

Thu Nov 21 17:43:29 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: rename initial_xxx variables to gc_params.xxx.
	  They are not only used initial values.

	  Chikanaga-san: Congratulations on RubyPrize!

Thu Nov 21 17:16:00 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: enable "RGENGC_ESTIMATE_OLDSPACE" option as default.
	  Without this option, some application consumes huge memory.
	  (and there are only a few performance down)

	  Introduced new environment variables:
	  * RUBY_GC_HEAP_OLDSPACE (default 16MB)
	  * RUBY_GC_HEAP_OLDSPACE_MAX (default 128 MB)
	  * RUBY_GC_HEAP_OLDSPACE_GROWTH_FACTOR (default 1.2)

	* gc.c (initial_malloc_limit): rename to initial_malloc_limit_min.

Thu Nov 21 16:51:34 2013  Zachary Scott  <e@zzak.io>

	* ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble

Thu Nov 21 16:50:16 2013  Zachary Scott  <e@zzak.io>

	* test/digest/test_digest.rb: Add more tests for digest/bubblebabble

Thu Nov 21 16:32:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/delegate.rb (Delegator#method_missing): try private methods defined in
	  Kernel after the target.  [Fixes GH-449]

Thu Nov 21 16:25:08 2013  Akinori MUSHA  <knu@iDaemons.org>

	* test/uri/test_generic.rb (URI#test_merge): Test uri + URI(path)
	  in addition to uri + path.

Thu Nov 21 15:36:08 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/buffering.rb: [DOC] Fix HEREDOC comment for
	  OpenSSL::Buffering which breaks overview because of RDoc bug

Thu Nov 21 14:46:57 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of
	  test/ruby/test_exception.rb on Windows.
	  wrap by __try and __exception statements on mswin to raise SIGSEGV
	  when EXCEPTION_STACK_OVERFLOW is occurred, because MSVCRT doesn't
	  handle the exception.
	  however, (1) mingw-gcc doesn't support __try and __exception
	  statements, and (2) we cannot retry SystemStackError after this
	  change yet (maybe crashed) because SEH and longjmp() are too
	  uncongenial.

	* signal.c (check_stack_overflow, CHECK_STACK_OVERFLOW): now defined on
	  Windows, too.

	* thread_win32.c (ruby_stack_overflowed_p): ditto.

Thu Nov 21 14:18:24 2013  Zachary Scott  <e@zzak.io>

	* object.c: [DOC] Clarify Object#dup vs #clone [Bug #9128]
	  Moving existing doc for this comparison to separate section of #dup
	  Adding examples to document behavior of #dup with Module#extend.
	  Based on a patch by stevegoobermanhill

Thu Nov 21 14:06:02 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_marks_check): do not dump all refs.

	* gc.c (allrefs_dump_i): fix output format.

Thu Nov 21 13:43:07 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: change RGENGC_CHECK_MODE (>= 2) logic.
	  Basically, make an object graph of all of living objects before and
	  after marking and check status.

	  [Before marking: check WB sanity]
	  If there is a non-old object `obj' pointed from old object
	  (`parent') then `parent' or `obj' should be remembered.

	  [After marking: check marking miss]
	  Traversible objects with the object graph should be marked.
	  (However, this alert about objects pointed by machine context
	   can be false positive. We only display alert.)

	  [Implementation memo]
	  objspace_allrefs() creates an object graph.
	  The object graph is represented by st_table, key is object (VALUE)
	  and value is referring objects. Referring objects are stored by
	  "struct reflist".

	* gc.c (init_mark_stack): do not use push_mark_stack_chunk() at init.
	  This pre-allocation causes failure on is_mark_stack_empty()
	  without any pushing.

Thu Nov 21 13:40:20 2013  Zachary Scott  <e@zzak.io>

	* lib/observer.rb: [DOC] Clarify default observer method.
	  By @edward [Fixes GH-450] https://github.com/ruby/ruby/pull/450

Thu Nov 21 13:32:53 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/ossl_engine.c: [DOC] Documentation for OpenSSL::Engine
	  This patch is based off work by @vbatts in GH-436 completing the
	  documentation for this class and its methods.
	  https://github.com/ruby/ruby/pull/436

Thu Nov 21 10:45:22 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/buffering.rb: Remove unused arguments from
	  OpenSSL::Buffering.new [Fixes GH-445]

Thu Nov 21 10:30:47 2013  Zachary Scott  <e@zzak.io>

	* test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble

Wed Nov 20 20:54:01 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* tool/instruction.rb : fix typo.

Wed Nov 20 19:45:22 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (rand_init): Make it possible to specify arbitrary array
	  for init_genrand().

Wed Nov 20 17:34:13 2013  Koichi Sasada  <ko1@atdot.net>

	* parse.y (rb_gc_mark_symbols): set global_symbols.minor_marked only
	  when full_mark is 0.
	  rb_gc_mark_symbols() (with full_mark == 1) can be called by other
	  than GC (such as rb_objspace_reachable_objects_from_root()).

Wed Nov 20 11:46:38 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: merge JSON 1.8.1.
	  https://github.com/nurse/json/compare/002ac2771ce32776b32ccd2d06e5604de6c36dcd...e09ffc0d7da25d0393873936c118c188c78dbac3
	* Remove Rubinius exception since transcoding should be working now.
	* Fix https://github.com/flori/json/issues/162 reported by Marc-Andre
	  Lafortune <github_rocks@marc-andre.ca>. Thanks!
	* Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress
	  warning with -Wchar-subscripts and better validate UTF-8 strings.
	* Applied patch by ginriki@github to remove unnecessary if.
	* Add load/dump interface to JSON::GenericObject to make
	  serialize :some_attribute, JSON::GenericObject
	  work in Rails active models for convenient
	  SomeModel#some_attribute.foo.bar access to serialised JSON data.

Wed Nov 20 01:39:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
	  NoMethodError when the original of alias is not found.

Tue Nov 19 23:38:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (--with-os-version-style): option to transform target
	  OS version string.

Tue Nov 19 21:27:33 2013  Tanaka Akira  <akr@fsij.org>

	* test/net/http/utils.rb (spawn_server): Specify zero for port to
	  avoid reusing an allocated port.

	* test/net/http/test_http.rb: Don't specify port here.

	* test/net/http/test_https.rb: Ditto.

Tue Nov 19 18:52:10 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (heap_is_swept_object): use heap_page::before_sweep flag.

Tue Nov 19 18:49:32 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace_reachable_objects_from_root): do major marking.

Tue Nov 19 18:45:40 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_gc_resurrect): added.
	  rb_fstring() used rb_gc_mark() to avoid freeing used string.
	  However, rb_gc_mark() set mark bit *and* pushes mark_stack.
	  rb_gc_resurrect() does only set mark bit if it is before sweeping.

	* string.c (rb_fstring): use rb_gc_resurrect.

	* internal.h: add decl.

Tue Nov 19 09:47:02 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc master a1195ce.  Changes include:

	  Improved accessibility of the main sidebar navigation.

	  Fixed handling of regexp options in HTML source highlighting.

	* test/rdoc:  ditto.

Tue Nov 19 09:33:52 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 6a3d9f9.  Changes include:

	  Compatibly renamed Gem::DependencyResolver to Gem::Resolver.

	  Added support for git gems in gem.deps.rb and Gemfile.

	  Fixed resolver bugs.

	* test/rubygems: ditto.

	* lib/rubygems/LICENSE.txt:  Updated to license from RubyGems trunk.
	  [ruby-trunk - Bug #9086]

	* lib/rubygems/commands/which_command.rb:  RubyGems now indicates
	  failure when any file is missing.  [ruby-trunk - Bug #9004]

	* lib/rubygems/ext/builder:  Extensions are now installed into the
	  extension install directory and the first directory in the require
	  path from the gem.  This allows backwards compatibility with msgpack
	  and other gems that calculate full require paths.
	  [ruby-trunk - Bug #9106]


Tue Nov 19 07:21:56 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in (LOCALTIME_OVERFLOW_PROBLEM): Define it for cross
	  compiling.
	  [ruby-core:58391] [Bug #9119] Reported by Luis Lavena.
	  Analyzed by Heesob Park.

Tue Nov 19 05:55:05 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/rubygems_hook.rb:  Remove debugging puts committed by
	  accident.

Mon Nov 18 22:47:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_intern.h (TH_PUSH_TAG, TH_EXEC_TAG): refine stack overflow
	  detection.  chain local tag after setjmp() successed on it, because
	  calling setjmp() also can overflow the stack.
	  [ruby-dev:47804] [Bug #9109]

	* vm_eval.c (rb_catch_obj): now th->tag points previous tag until
	  TH_EXEC_TAG().

	* thread_pthread.c (ruby_init_stack): set stack_start properly by
	  get_main_stack() if possible.

Mon Nov 18 22:45:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_jump.c (rb_exec_end_proc): unlink and free procs data before
	  calling for each procs.  [Bug #9110]

Sun Nov 17 06:33:32 2013  Shota Fukumori  <her@sorah.jp>

	* configure.in: Use $LIBS for base of $SOLIBS, also in darwin.
	  By this fix, environment that libgmp is located in $LIBS can build
	  ruby.

Sun Nov 17 01:56:32 2013  Tanaka Akira  <akr@fsij.org>

	* thread_pthread.c (rb_thread_create_timer_thread): Show error
	  message instead of error number.
	  (thread_create_core): Ditto.

	* cont.c (fiber_machine_stack_alloc): Ditto.

Sat Nov 16 18:28:08 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/ultralightparser.rb
	  (REXML::Parsers::UltraLightParser#parse): Fix wrong :start_doctype
	  position.
	  [Bug #9061] [ruby-dev:47778]
	  Patch by Ippei Obayashi. Thanks!!!

	* test/rexml/parser/test_ultra_light.rb: Add a test for this case.

Sat Nov 16 02:13:56 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* cont.c : Introduce ensure rollback mechanism. Please see below.

	* internal.h (ruby_register_rollback_func_for_ensure): catch up above change.
	  Add rollback mechanism API.

	* vm_core.h (typedef struct rb_vm_struct): catch up above change.
	  Introduce ensure-rollback relation table.

	* vm_core.h (typedef struct rb_thread_struct): catch up above change.
	  Introduce ensure stack.

	* eval.c (rb_ensure): catch up above change.
	  Introduce ensure stack.

	* hash.c : New function for rollback ensure, and register it to
	  ensure-rollback relation table. [ruby-dev:47803] [Bug #9105]

	Ensure Rollback Mechanism:
	A rollback's function is a function to rollback a state before ensure's
	function execution.
	When the jump of callcc is across the scope of rb_ensure,
	ensure's functions and rollback's functions are executed appropriately
	for keeping consistency.

	Current API is unstable, and only internal use.

	ruby_register_rollback_func_for_ensure(ensure_func,rollback_func)
	This API create relation ensure's function to rollback's function.
	By registered rollback's function, it is executed When jumping into
	corresponding rb_ensure scope.

Sat Nov 16 00:18:36 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* eval_jump.c (rb_exec_end_proc): fix double free or corruption error
	  when reentering by callcc. [ruby-core:58329] [Bug #9110]

	* test/ruby/test_beginendblock.rb: test for above.

Fri Nov 15 01:06:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/objspace/objspace_dump.c (dump_output): allow IO object as
	  output, and use Tempfile.create and return open file instead of
	  mkstemp() and path name for :file output.
	  [ruby-core:58266] [Bug #9102]

	* test/objspace/test_objspace.rb (TestObjSpace#dump_my_heap_please):
	  remove temporary output file.

Thu Nov 14 23:39:00 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
	  Rational#to_d without argument. [Bug #8958]

Thu Nov 14 20:24:15 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* ruby_atomic.h (ATOMIC_SIZE_CAS): fix compile error on Solaris
	  since r43460.

Thu Nov 14 19:53:00 2013  Tanaka Akira  <akr@fsij.org>

	* test/openssl/test_cipher.rb (test_aes_gcm_wrong_tag): Don't use
	  String#succ because it can make modified (wrong) auth_tag longer
	  than 16 bytes.  The longer auth_tag makes that
	  EVP_CIPHER_CTX_ctrl (and internally aes_gcm_ctrl) fail.
	  [ruby-core:55143] [Bug #8439] reported by Vit Ondruch.

Thu Nov 14 11:33:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (foreach_safe_i, hash_foreach_iter): deal with error detected
	  by ST_CHECK.

	* st.c (st_foreach_check): call with non-error argument in normal case.

Thu Nov 14 02:37:14 2013  Zachary Scott  <e@zzak.io>

	* ext/thread/thread.c: [DOC] This patch accomplishes the following:

	  - Teach RDoc about ConditionVariable
	  - Teach RDoc about Queue
	  - Teach RDoc about SizedQueue
	  - Use fully-qualified namespace for Document-method
	    This is necessary to separate definitions between classes
	  - Fix rdoc bug in call_seq vs. call-seq
	  - Correct doc for SizedQueue#pop patch by @jackdanger [Bug #8988]

Thu Nov 14 01:11:54 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required

Wed Nov 13 19:21:36 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
	  +precision+ argument for Rational#to_d [Bug #8958]

Wed Nov 13 19:02:05 2013  Zachary Scott  <e@zzak.io>

	* ext/digest/*: [DOC] Fix several typos and broken http links.
	  Improved examples for Digest overview and fixed a broken example in
	  Digest::HMAC overview. This patch also adds a description of
	  Digest::SHA256.bubblebabble to the Digest overview.

	  Patched by @stomar [Bug #9027]

Wed Nov 13 18:32:12 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/ossl_config.c: [DOC] Document the following:

	  - OpenSSL::ConfigError
	  - OpenSSL::Config::DEFAULT_CONFIG_FILE

	  Patched by @vbatts via GH-436
	  https://github.com/ruby/ruby/pull/436

Wed Nov 13 18:03:00 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/ossl_asn1.c: [DOC] Document parts of
	  OpenSSL::ASN1::ObjectId included a fix for the class overview, which
	  previously showed the documentation for Constructive due to missing
	  ObjectId overview. This patch also includes a note for Primitive.

	  Based on a patch by @vbatts via GH-436
	  https://github.com/ruby/ruby/pull/436

Wed Nov 13 17:19:36 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/config.rb: In #parse use +string+ for +str+

Wed Nov 13 17:09:45 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/*.rb: [DOC] Document the following:

	  - Integer#to_bn
	  - OpenSSL::Buffering module
	  - Deprecated OpenSSL::Digest::Digest compatibility class
	  - OpenSSL::Config

	  These changes were based on a patch by @vbatts via GH-436
	  https://github.com/ruby/ruby/pull/436

Wed Nov 13 10:55:43 2013  Zachary Scott  <e@zzak.io>

	* doc/regexp.rdoc: [DOC] Fix typo in Special global variables section.
	  Reported by Alex Johnson on ruby-doc.org

Wed Nov 13 10:43:19 2013  Zachary Scott  <e@zzak.io>

	* hash.c: [DOC] Adds an example for Hash#store

Wed Nov 13 09:03:40 2013  Zachary Scott  <e@zzak.io>

	* doc/regexp.rdoc: [DOC] add note about Bug #4044 as suggested by
	  duerst-san in [ruby-core:43612] [Fixes GH-443] Patched by @rosenfeld
	  https://github.com/ruby/ruby/pull/443

Tue Nov 12 10:15:14 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/insure_session.rb:  Remove unused test file.

Tue Nov 12 09:16:24 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master b9213d7.  Changes include:

	  Fixed tests on Windows (I hope) by forcing platform for
	  platform-dependent tests.

	  Fixed File.exists? warnings.

	  Improved testing infrastructure.

	* test/rubygems:  ditto.

	* test/rdoc/test_rdoc_rubygems_hook.rb:  Switch to util_spec like
	  RubyGems.

Mon Nov 11 18:31:12 2013  Aman Gupta <ruby@tmm1.net>

	* internal.h: move common string/hash flags to include file.
	* ext/objspace/objspace_dump.c: remove flags shared above.
	* hash.c: ditto.
	* string.c: ditto.

Mon Nov 11 04:36:14 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/specification.rb:  Include 2.2.0.preview.2 when checking
	  if extensions should be built.  Fixes a ruby-ci failure.
	* test/rubygems/test_gem_specification.rb:  Test for the above.

Mon Nov 11 03:15:56 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (symbol2event_flag): add secret feature.
	  add a_call/a_return events.
	  a_call is call | b_call | c_call, and same as a_return.

Mon Nov 11 02:51:17 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems: Update to RubyGems master 4bdc4f2.  Important changes
	  in this commit:

	  RubyGems now chooses the test server port reliably.  Patch by akr.

	  Partial implementation of bundler's Gemfile format.

	  Refactorings to improve the new resolver.

	  Fixes bugs in the resolver.

	* test/rubygems:  Tests for the above.

Mon Nov 11 01:02:06 2013  Zachary Scott  <e@zzak.io>

	* lib/timeout.rb: [DOC] Add note about change from #8730 [Fixes GH-440]
	* NEWS: [DOC] Improve grammar on change to Timeout
	  Patched by @srawlins in https://github.com/ruby/ruby/pull/440

Sun Nov 10 23:47:05 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* gc.c (rb_gcdebug_print_obj_condition): catch up recent changes
	  to compile on GC_DEBUG.

Sun Nov 10 22:16:19 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (exc_cause): captured previous exception.

	* eval.c (make_exception): capture previous exception automagically.
	  [Feature #8257]

Sun Nov 10 08:37:20 2013  Zachary Scott  <e@zzak.io>

	* thread.c: [DOC] Remove duplicate reference

Sun Nov 10 08:09:29 2013  Zachary Scott  <e@zzak.io>

	* lib/drb/drb.rb: [DOC] promote better windows-safe filename regular
	  expression in DRb Logger example. Reported by Chris Pheonix
	  [Bug #9074]

Sun Nov 10 08:03:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (rb_define_finalizer, rb_undefine_finalizer): rename and export
	  finalizer functions.

Sun Nov 10 07:41:22 2013  Zachary Scott  <e@zzak.io>

	* lib/weakref.rb: [DOC] fix typos by @xaviershay [Fixes GH-439]
	  https://github.com/ruby/ruby/pull/439

Sun Nov 10 06:14:39 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* compile.c (iseq_compile_each): emit opt_str_freeze if the #freeze
	  method is called on a static string literal with no arguments.

	* defs/id.def (firstline): add freeze so idFreeze is available

	* insns.def (opt_str_freeze): add opt_str_freeze instruction which
	  pushes a frozen string literal without allocating a new object if
	  String#freeze is not overridden

	* string.c (Init_String): define String#freeze

	* vm.c (vm_init_redefined_flag): define BOP_FREEZE on String class as
	  a basic operation

	* vm_insnhelper.h: ditto

	[Feature #8992] [ruby-core:57705]

Sun Nov 10 01:34:14 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (vm_malloc_increase): sweep immediately on GC due to malloc().
	  To reduce memory usage, sweep as soon as possible.
	  This behavior is same as Ruby 2.0.0 and before.

Sun Nov 10 00:39:26 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: output version description and GC::OPTS.

Sun Nov 10 00:36:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (should_be_callable): allow private call since rb_eval_cmd
	  calls even private methods.

Sun Nov 10 00:33:17 2013  Zachary Scott  <e@zzak.io>

	* lib/racc/rdoc/grammar.en.rdoc: [DOC] fix typo by Tsuyoshi Sawada
	  [Bug #9077]

Sat Nov  9 22:35:35 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (Gem::Specification.load): obtain spec date from
	  VCS for the case using git, RUBY_RELEASE_DATE is the last resort.
	  probably fixes [Bug #9085].

Sat Nov  9 20:56:12 2013  Narihiro Nakamura  <authornari@gmail.com>

	* ext/objspace/object_tracing.c: use declarations in internal.h.

	* ext/objspace/objspace.c: ditto

Sat Nov  9 20:32:59 2013  Tanaka Akira  <akr@fsij.org>

	* test/objspace/test_objspace.rb (test_dump_all): Make the test string
	  shorter to be an embedded string on 32bit environment as well as
	  64bit environment.

Sat Nov  9 15:00:16 2013  Zachary Scott  <e@zzak.io>

	* io.c: [DOC] ARGF.gets may return nil [Bug #9029] patch by znz

Sat Nov  9 14:54:52 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/*: [DOC] document various constants @steveklabnik [Bug #8812]

Sat Nov  9 14:50:09 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/rss.rb: [DOC] document Time#w3cdtf by @steveklabnik
	  [Bug #8821]

Sat Nov  9 14:29:04 2013  Zachary Scott  <e@zzak.io>

	* ext/dl/cfunc.c: [DOC] fix typo in example [Bug #8944]
	  Patched by Heesob Park

Sat Nov  9 13:59:58 2013  Zachary Scott  <e@zzak.io>

	* lib/test/unit/assertions.rb: [DOC] better example for assert_send()
	  Patch by Andrew Grimm [Bug #8975]

Sat Nov  9 12:45:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* insns.def: unify ic_constant_serial and ic_class_serial into one field
	  ic_serial. This is possible because these fields are only ever used
	  exclusively with each other.

	* insns.def: ditto
	* vm_core.h: ditto
	* vm_insnhelper.c: ditto

Sat Nov  9 12:31:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* class.c: unify names of vm state version counters to 'serial'.
	  This includes renaming 'vm_state_version_t' to 'rb_serial_t',
	  'method_state' to 'method_serial', 'seq' to 'class_serial',
	  'vmstat' to 'constant_serial', etc.

	* insns.def: ditto
	* internal.h: ditto
	* vm.c: ditto
	* vm_core.h: ditto
	* vm_insnhelper.c: ditto
	* vm_insnhelper.h: ditto
	* vm_method.c: ditto

Sat Nov  9 09:22:29 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_page_sweep, rgengc_rememberset_mark): Refactoring.
	  Get bitmaps directly.

Sat Nov  9 09:16:36 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (RVALUE_PROMOTE_INFANT): Refactoring. Remove duplicated nonsense
	  code.

Sat Nov  9 09:04:48 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_marks_test): Bugfix. Fix a struct member name for build
	  with RGENGC_CHECK_MODE.

Sat Nov  9 08:58:23 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c : Add GC_PROFILE_DETAIL_MEMORY option.
	  If GC_PROFILE_MORE_DETAIL && GC_PROFILE_DETAIL_MEMORY,
	  maxrss, minflt and majflt are added to each profile record.

Sat Nov  9 07:41:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (rb_vm_backtrace_object, rb_gc_count): make prototype
	  declarations, not old-K&R style.

Sat Nov  9 06:11:14 2013  vo.x (Vit Ondruch)  <vondruch@redhat.com>

	* tool/rbinstall.rb (Gem::Specification#collect): make stable
	  Gem::Specification.files in default .gemspecs the different order of
	  "files" in .gemspec files makes them different therefore possibly
	  conflicting in multilib scenario.  patch by vo.x (Vit Ondruch) at
	  [ruby-core:57544] [Bug #8623].

Sat Nov  9 01:59:18 2013  Aman Gupta <ruby@tmm1.net>

	* ext/objspace/objspace_dump.c: Add experimental methods to
	  dump objectspace as json: ObjectSpace.dump_all and
	  ObjectSpace.dump(obj). These methods are useful for debugging
	  reference leaks and memory growth in large ruby applications.
	  [Bug #9026] [ruby-core:57893] [Fixes GH-423]
	* test/objspace/test_objspace.rb: tests for above.

Sat Nov  9 00:26:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (GetLastError): already defined in windows.h on nowadays
	  cygwin, and caused the confliction with the system provided
	  definition on cygwin64.  by @kou1okada [Fixes GH-433].

Fri Nov  8 18:35:31 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* lib/open3.rb: receive arguments as keyword arguments.

Fri Nov  8 13:19:26 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* io.c (rb_io_open_with_args): use RARRAY_CONST_PTR().

	* io.c (rb_scan_open_args): use const qualifier for above.

	* io.c (rb_open_file): ditto.

	* io.c (rb_io_open_with_args): ditto.

Fri Nov  8 11:35:06 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().

Fri Nov  8 10:58:02 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().

	* compile.c (iseq_build_from_ary_body): ditto.

Fri Nov  8 10:49:34 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* enumerator.c (append_method): use RARRAY_CONST_PTR().

	* enumerator.c (lazy_init_iterator): ditto.

Fri Nov  8 02:44:29 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (vm_malloc_increase): check GVL before gc_rest_sweep().
	  vm_malloc_increase() can be called without GVL.
	  However, gc_rest_sweep() assumes acquiring GVL.
	  To avoid this problem, check GVL before gc_rest_sweep().
	  [Bug #9090]

	  This workaround introduces possibility to set malloc_limit as
	  wrong value (*1). However, this may be rare case. So I commit it.

	  *1: Without rest_sweep() here, gc_rest_sweep() can decrease
	      malloc_increase due to ruby_sized_xfree().

Fri Nov  8 02:50:25 2013  Zachary Scott  <e@zzak.io>

	* lib/securerandom.rb: [DOC] specify arguments passed to ::random_bytes
	  By @chastell [Fixes GH-412] https://github.com/ruby/ruby/pull/412

Fri Nov  8 02:43:01 2013  Zachary Scott  <e@zzak.io>

	* ext/objspace/object_tracing.c: [DOC] trace_object_allocations_stop
	  By @srawlins [Fixes GH-421] https://github.com/ruby/ruby/pull/421

Fri Nov  8 02:34:20 2013  Zachary Scott  <e@zzak.io>

	* lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix
	  spelling typo, based on patch by @artfuldodger [Fixes GH-426]
	  https://github.com/ruby/ruby/pull/426

Fri Nov  8 02:14:37 2013  Zachary Scott  <e@zzak.io>

	* array.c: [DOC] Add note about negative indices in Array overview
	  By @ckaenzig [Fixes GH-427] https://github.com/ruby/ruby/pull/427

Fri Nov  8 02:09:12 2013  Zachary Scott  <e@zzak.io>

	* lib/csv.rb: [DOC] Fix typo in CSV.parse_line by @funky-bibimbap
	  [Fixes GH-430] https://github.com/ruby/ruby/pull/430

Fri Nov  8 01:01:54 2013  Zachary Scott  <e@zzak.io>

	* golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
	  Patch by @edward https://github.com/ruby/ruby/pull/425

Thu Nov  7 19:36:09 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: modify malloc_limit strategy.

	  * fix default values:
	    GC_MALLOC_LIMIT_GROWTH_FACTOR
	    GC_MALLOC_LIMIT: 8MB -> 16MB
	    GC_MALLOC_LIMIT_MAX: 384MB -> 32MB

	  * algorithm of malloc_limit increment.
	    if (malloc_increase < malloc_limit) {
	      next_malloc_limit = malloc_limit * factor
	      if (malloc_limit > malloc_limit_max) {
	        malloc_limit = malloc_increase
	      }
	    }
	    This algorithm change malloc_limit from
	    16MB -> 32MB slowly.
	    If malloc_limit exceeds malloc_limit_max, then
	    increase with malloc_increase.

Thu Nov  7 11:06:05 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_shuffle_bang): use RARRAY_PTR_USE() without WB
	  because there are not new relations.

Thu Nov  7 10:34:12 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_sample): use rb_ary_dup().

Thu Nov  7 09:39:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_trace.c (rb_threadptr_exec_event_hooks_orig): errinfo should not
	  be propagated to trace blocks so that no argument raise does not
	  throw internal objects.  [ruby-dev:47793] [Bug #9088]

Wed Nov  6 21:30:55 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_before_sweep): Change algorithm of malloc_limit to
	  conservative for closing to memory consumption of ruby 2.0.

	* gc.c (GC_MALLOC_LIMIT, GC_MALLOC_LIMIT_GROWTH_FACTOR):
	  Adjust parameters for new algorithm.

Wed Nov  6 21:16:51 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_shift_m): use RARRAY_PTR_USE() without WB because
	  there are not new relations.

Wed Nov  6 21:05:20 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_reverse): use RARRAY_PTR_USE().

Wed Nov  6 19:30:44 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* common.mk (help): add texts about gcbench.

Wed Nov  6 16:32:32 2013  Martin Duerst <duerst@it.aoyama.ac.jp>

	* lib/open3.rb: tweaked grammar in comments

Wed Nov  6 11:46:36 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_sample): use RARRAY_AREF() and RARRAY_PTR_USE()
	  instead of RARRAY_PTR().

Wed Nov  6 10:37:07 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_and): defer hash creation and some refactoring.

Wed Nov  6 09:14:31 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm1_gc_short_lived.rb: added.
	  These GC benchmarks do not reflect practical applications.
	  They are only for tuning.

	* benchmark/bm_vm1_gc_short_with_complex_long.rb: added.

	* benchmark/bm_vm1_gc_short_with_long.rb: added.

	* benchmark/bm_vm1_gc_short_with_symbol.rb: added.

	* benchmark/bm_vm1_gc_wb_ary.rb: added.

	* benchmark/bm_vm1_gc_wb_obj.rb: added.

	* benchmark/bm_vm_thread_queue.rb: added.
	  This benchmark is added to know how fast C version of thread.so.

Wed Nov  6 09:13:32 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: define RGENGC_ESTIMATE_OLDSPACE == 0 if USE_RGENGC is 0.

Wed Nov  6 07:13:18 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (Init_GC): add GC::OPTS to show options.

Wed Nov  6 07:12:17 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: add some options to make quiet.

Wed Nov  6 04:14:25 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys before
	  reviving objects. Fixes GH psych #168
	* test/psych/test_merge_keys.rb: test for change
	  https://github.com/tenderlove/psych/issues/168

Tue Nov  5 21:21:47 2013  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_thread.rb (test_thread_join_in_trap):
	  Run the test in a different process.

Tue Nov  5 20:14:32 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (is_live_object): A hidden object may be a live object.
	  [ruby-dev:47788] [Bug #9072]

Tue Nov  5 13:37:19 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: add support to estimate increase of oldspace memory usage.
	  This is another approach to solve an issue discussed at r43530.
	  This feature is disabled as default.

	  This feature measures an increment of memory consumption by oldgen
	  objects. It measures memory consumption for each objects when
	  the object is promoted. However, measurement of memory consumption
	  is not accurate now. So that this measurement is `estimation'.

	  To implement this feature, move memsize_of() function from
	  ext/objspace/objspace.c and expose rb_obj_memsize_of().

	  Some memsize() functions for T_DATA (T_TYPEDDATA) have problem to
	  measure memory size, so that we ignores T_DATA objects now.
	  For example, some functions skip NULL check for pointer.

	  The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature,
	  and turned off as default.

	  We need to compare 3gen GC and this feature carefully.
	  (it is possible to enable both feature)
	  We need a help to compare them.

	* internal.h: expose rb_obj_memsize_of().

	* ext/objspace/objspace.c: use rb_obj_memsize_of() function.

	* cont.c (fiber_memsize): fix to check NULL.

	* variable.c (autoload_memsize): ditto.

	* vm.c (vm_memsize): ditto.

Tue Nov  5 04:03:07 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (GC_MALLOC_LIMIT_MAX): fix default value 512MB -> 384MB.
	  512MB is huge.

Tue Nov  5 03:31:23 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: add 3gen GC patch, but disabled as default.

	  RGenGC is designed as 2 generational GC, young and old generation.
	  Young objects will be promoted to old objects after one GC.
	  Old objects are not collect until major (full) GC.

	  The issue of this approach is some objects can promoted as old
	  objects accidentally and not freed until major GC.
	  Major GC is not frequently so short-lived but accidentally becoming
	  old objects are not freed.

	  For example, the program "loop{Array.new(1_000_000)}" consumes huge
	  memories because short lived objects (an array which has 1M
	  elements) are promoted while GC and they are not freed before major
	  GC.

	  To solve this problem, generational GC with more generations
	  technique is known. This patch implements three generations gen GC.

	  At first, newly created objects are "Infant" objects.
	  After surviving one GC, "Infant" objects are promoted to "Young"
	  objects.
	  "Young" objects are promoted to "Old" objects after surviving
	  next GC.
	  "Infant" and "Young" objects are collected if it is not marked
	  while minor GC. So that this technique solves this problem.

	  Representation of generations:
	  * Infant: !FL_PROMOTED and !oldgen_bitmap [00]
	  * Young :  FL_PROMOTED and !oldgen_bitmap [10]
	  * Old   :  FL_PROMOTED and  oldgen_bitmap [11]

	  The macro "RGENGC_THREEGEN" enables/disables this feature, and
	  turned off as default because there are several problems.
	  (1) Failed sometimes (Heisenbugs).
	  (2) Performance down.
	      Especially on write barriers. We need to detect Young or Old
	      object by oldgen_bitmap. It is slower than checking flags.

	  To evaluate this feature on more applications, I commit this patch.
	  Reports are very welcome.

	  This patch includes some refactoring (renaming names, etc).

	* include/ruby/ruby.h: catch up 3gen GC.

	* .gdbinit: fix to show a prompt "[PROMOTED]" for promoted objects.

Tue Nov  5 00:05:51 2013  Koichi Sasada  <ko1@atdot.net>

	* node.h: catch up comments for last commit.

Tue Nov  5 00:02:00 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.
	  This flag represents that "this object is promoted at least once."

	* gc.c, debug.c, object.c: catch up this change.

Mon Nov  4 22:20:16 2013  Tanaka Akira  <akr@fsij.org>

	* test/xmlrpc: Don't use fixed ports: 8070 and 8071.

Mon Nov  4 15:25:52 2013  Tanaka Akira  <akr@fsij.org>

	* test/xmlrpc/webrick_testing.rb (start_server): Initialize the server
	  at main thread to fail early.

Mon Nov  4 10:08:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_intern.h (TH_EXEC_TAG, TH_JUMP_TAG): get rid of undefined
	  behavior of setjmp() in rhs of assignment expression.
	  [ISO/IEC 9899:1999] 7.13.1.1

Sun Nov  3 23:06:51 2013  Tanaka Akira  <akr@fsij.org>

	* sample/test.rb: Make temporary file names unique.

Sun Nov  3 20:41:17 2013  Tanaka Akira  <akr@fsij.org>

	* test/xmlrpc: Wrap definitions by TestXMLRPC module.

Sun Nov  3 20:23:38 2013  Tanaka Akira  <akr@fsij.org>

	* test/xmlrpc/webrick_testing.rb (stop_server): Don't try to shutdown
	  the server if the server is not started.

Sun Nov  3 09:35:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (rb_feature_p): deal with default loadable suffixes.

	* load.c (load_lock): initialize statically linked extensions.

	* load.c (search_required, rb_require_safe): deal with statically
	  linked extensions.

	* load.c (ruby_init_ext): defer initialization of statically linked
	  extensions until required actually.  [Bug #8883]

Sat Nov  2 15:14:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/logger.rb (Logger::LogDevice::LogDeviceMutex#lock_shift_log):
	  open file can't be removed or renamed on Windows.  [ruby-dev:47790]
	  [Bug #9046]

	* test/logger/test_logger.rb (TestLogDevice#run_children): don't use
	  fork.

Sat Nov  2 07:08:43 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/logger.rb: Inter-process locking for log rotation
	  Current implementation fails log rotation on multi process env.
	  by sonots <sonots@gmail.com>
	  https://github.com/ruby/ruby/pull/428 fix GH-428 [Bug #9046]

Fri Nov  1 23:24:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (wmap_mark_map): mark live objects only, but delete zombies.
	  [ruby-dev:47787] [Bug #9069]

Fri Nov  1 22:45:54 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (struct heap_page, gc_page_sweep, gc_sweep): Refactoring for
	  performance. Add before_sweep condition to heap_page structure.

	* gc.c (rb_gc_force_recycle): Use before_sweep member.

	* gc.c (heap_is_before_sweep, is_before_sweep): Remove. They have not
	  already been used.

Fri Nov  1 22:20:28 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (make_deferred): Refactoring. Collect codes which should be
	  atomic.

	* gc.c (make_io_deferred, obj_free, rb_objspace_call_finalizer,
	  gc_page_sweep): Correspond to the above.

Fri Nov  1 21:40:35 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (typedef struct rb_objspace): Refactoring. Move some members
	  into profile member.

	* gc.c (newobj_of): Correspond to the above.

	* gc.c (finalize_list): Ditto.

	* gc.c (objspace_live_num): Ditto.

	* gc.c (gc_page_sweep): Ditto.

	* gc.c (rb_gc_force_recycle): Ditto.

	* gc.c (garbage_collect_body): Ditto.

	* gc.c (rb_gc_count): Ditto.

	* gc.c (gc_stat): Ditto.

	* gc.c (gc_prof_set_heap_info): Ditto.

	* gc.c (gc_profile_dump_on): Ditto.

Fri Nov  1 20:53:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_scrub): fix typo, should yield invalid byte
	  sequence to be scrubbed.  reported by znz at IRC.

Fri Nov  1 17:25:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (is_live_object): finalizer may not run because of lazy-sweep.
	  [ruby-dev:47786] [Bug #9069]

Fri Nov  1 16:55:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_scrub): export with fixed length arguments, and
	  allow nil as replacement string instead of omitting.

Fri Nov  1 06:20:44 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_struct): reduce rb_mutex_t size by 8 bytes
	  on 64bit platform. Patch by Eric Wong. [Feature #9068][ruby-core:58114]

Fri Nov  1 01:08:33 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: print HWM (high water mark) if possible.

Thu Oct 31 21:48:31 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/streamparser.rb: Add dependency file require.
	  [Bug #9062] [ruby-dev:47779]
	  Reported by Ippei Obayashi. Thanks!!!

Thu Oct 31 14:09:32 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_method.c (rb_method_entry_make): fix to pass an ISeq value.
	  OBJ_WRITTEN() accepts only VALUE.

Wed Oct 30 19:07:57 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el (ruby-brace-to-do-end)
	  (ruby-do-end-to-brace, ruby-toggle-block): Remove functions that
	  are already in the latest released version of Emacs (24.3).
	  [Bug #7565]

Wed Oct 30 12:44:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (config.status): add missing variables,
	  PLATFORM_DIR and THREAD_MODEL.

Wed Oct 30 12:20:32 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (v2w): Normalize a rational value to an integer if possible.
	  [ruby-core:58070] [Bug #9059] reported by Isaac Schwabacher.

Wed Oct 30 12:08:41 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_uniq_bang): use rb_ary_modify_check() instead of
	  rb_ary_modify() because the array will be unshared soon.

Wed Oct 30 03:25:10 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: make less garbage when
	  testing if a string is binary.

Wed Oct 30 03:08:24 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses should
	  not be considered to be binary.  Fixes Psych / GH 166
	  https://github.com/tenderlove/psych/issues/166

	* test/psych/test_string.rb: test for fix

Tue Oct 29 23:01:18 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_zip): some refactoring.

Tue Oct 29 22:11:37 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_uniq_bang): use st_foreach() instead of for loop.

Tue Oct 29 20:01:58 2013  Koichi Sasada  <ko1@atdot.net>

	* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only use
	  safe functions during garbage collection such as xfree().

	  On default, T_DATA objects are freed at same points as finalizers.
	  This approach protects issues such as reported by [ruby-dev:35578].
	  However, freeing T_DATA objects immediately helps heap usage.

	  Most of T_DATA (in other words, most of dfree functions) are safe.
	  However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default
	  for safety.

	* cont.c: ditto.

	* dir.c: ditto.

	* encoding.c: ditto.

	* enumerator.c: ditto.

	* error.c: ditto.

	* file.c: ditto.

	* gc.c: ditto.

	* io.c: ditto.

	* iseq.c: ditto.

	* marshal.c: ditto.

	* parse.y: ditto.

	* proc.c: ditto.

	* process.c: ditto.

	* random.c: ditto.

	* thread.c: ditto.

	* time.c: ditto.

	* transcode.c: ditto.

	* variable.c: ditto.

	* vm.c: ditto.

	* vm_backtrace.c: ditto.

	* vm_trace.c: ditto.

	* ext/bigdecimal/bigdecimal.c: ditto.

	* ext/objspace/objspace.c: ditto.

	* ext/stringio/stringio.c: ditto.

	* ext/strscan/strscan.c: ditto.

Tue Oct 29 19:48:33 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: fix typo (FL_WB_PROTECT -> FL_WB_PROTECTED).

Tue Oct 29 18:45:08 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (tp_free): removed because empty free function.
	  Use RUBY_TYPED_NEVER_FREE instead.

Tue Oct 29 18:37:33 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: introduce new flags for T_TYPEDDATA.
	  * RUBY_TYPED_FREE_IMMEDIATELY: free the data given by DATA_PTR()
	    with dfree function immediately.  Otherwise (default), the data
	    freed at finalization point.
	  * RUBY_TYPED_WB_PROTECTED: make this object with FL_WB_PROTECT
	    (not shady).

	* gc.c (obj_free): support RUBY_TYPED_FREE_IMMEDIATELY.

Tue Oct 29 16:49:03 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (vm_malloc_increase): decrease it more carefully.

Tue Oct 29 16:24:52 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (heap_page_resurrect): return a page in tomb heap even if
	  freelist is NULL.

Tue Oct 29 15:46:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.

Tue Oct 29 12:08:05 2013  Tanaka Akira  <akr@fsij.org>

	* ext/readline/readline.c (readline_getc): Consider
	  NULL as input.

Tue Oct 29 11:10:08 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (gc_profile_total_time): fix off-by-one error in
	  GC::Profiler.total_time.
	* test/ruby/test_gc.rb (class TestGc): test for above.

Tue Oct 29 09:53:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: split
	  ruby_vm_global_state_version into two separate counters - one for the
	  global method state and one for the global constant state. This means
	  changes to constants do not affect method caches, and changes to
	  methods do not affect constant caches. In particular, this means
	  inclusions of modules containing constants no longer globally
	  invalidate the method cache.

	* class.c, eval.c, include/ruby/intern.h, insns.def, vm.c, vm_method.c:
	  rename rb_clear_cache_by_class to rb_clear_method_cache_by_class

	* class.c, include/ruby/intern.h, variable.c, vm_method.c: add
	  rb_clear_constant_cache

	* compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in
	  rb_call_info_struct to method_state

	* vm_method.c: rename vmstat field in struct cache_entry to method_state

Mon Oct 28 23:26:04 2013  Tanaka Akira  <akr@fsij.org>

	* test/readline/test_readline.rb (teardown): Clear Readline.input and
	  Readline.output.

Mon Oct 28 21:35:31 2013  Tanaka Akira  <akr@fsij.org>

	* ext/-test-/file/depend, ext/-test-/postponed_job/depend,
	  ext/-test-/tracepoint/depend: New files for dependencies.

Mon Oct 28 15:32:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/depend (ossl.o): work around of dependency of
	  thread_native.h, which depends on headers by THREAD_MODEL.
	  [ruby-dev:47777]

	* ext/openssl/extconf.rb: need THREAD_MODEL.

Mon Oct 28 14:57:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (ruby_init_ext): share feature names between frame name and
	  provided features.

Mon Oct 28 14:41:27 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el: Import ruby-electric.el 2.1 from
	  https://github.com/knu/ruby-electric.el.

	  * Hitting the newline-and-indent key within a comment fires
	    comment-indent-new-line.

	  * Introduce a new feature
	    `ruby-electric-autoindent-on-closing-char`.

	  * Fix fallback behavior of ruby-electric-space/return that
	    caused error with auto-complete.

Mon Oct 28 13:17:17 2013  Or Cohen  <orc@fewbytes.com>

	* error.c (name_err_to_s): remove no longer needed overriding, since
	  r30455 which made exc_to_s almost same.  Fixes [GH-413].

Mon Oct 28 12:42:11 2013  Tanaka Akira  <akr@fsij.org>

	* common.mk, ext/objspace/depend, ext/coverage/depend,
	  ext/-test-/debug/depend, ext/date/depend: Update dependencies.

Mon Oct 28 09:29:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm.c: vm_clear_all_cache is not necessary now we use a 64 bit counter
	  for global state version.

	* vm_insnhelper.h: ruby_vm_global_state_version overflow is unnecessary

Mon Oct 28 07:47:32 2013  Aman Gupta <ruby@tmm1.net>

	* vm_backtrace.c (rb_profile_frame_classpath): do not use rb_inspect
	  directly, since it might have a custom implementation or show ivars.

Mon Oct 28 04:10:41 2013  Aman Gupta <ruby@tmm1.net>

	* vm_backtrace.c (rb_profile_frame_classpath): handle singleton
	  methods defined directly on an object.
	* test/-ext-/debug/test_profile_frames.rb: test for above.

Mon Oct 28 00:52:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (new_struct): fix warning message, class name and encoding.

Sun Oct 27 20:53:08 2013  Tanaka Akira  <akr@fsij.org>

	* ext/readline/readline.c: Include ruby/thread.h for
	  rb_thread_call_without_gvl2.
	  (readline_rl_instream, readline_rl_outstream): Record FILE
	  structures allocated by this extension.
	  (getc_body): New function extracted from readline_getc.
	  (getc_func): New function.
	  (readline_getc): Use rb_thread_call_without_gvl2 to invoke getc_func.
	  [ruby-dev:47033] [Bug #8749]
	  (clear_rl_instream, clear_rl_outstream): Close FILE structure
	  allocated by this extension reliably.  [ruby-core:57951] [Bug #9040]
	  (readline_readline): Use clear_rl_instream and clear_rl_outstream.
	  (readline_s_set_input): Set readline_rl_instream.
	  (readline_s_set_output): Set readline_rl_outstream.
	  (Init_readline): Don't call readline_s_set_input because
	  readline_getc doesn't block other threads for any FILE structure now.

	  [ruby-dev:47033] [Bug #8749] reported by Nobuhiro IMAI.
	  [ruby-core:57951] [Bug #9040] reported by Eamonn Webster.

Sat Oct 26 19:31:28 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* gc.c: catch up recent changes to compile on GC_DEBUG,
	  RGENGC_CHECK_MODE.

Sat Oct 26 19:08:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (range_initialize_copy): disallow to modify after
	  initialized.

Sat Oct 26 17:48:54 2013  Tanaka Akira  <akr@fsij.org>

	* lib/open-uri.rb (meta_add_field): : Re-implemented.
	   [ruby-core:58017] [Bug #9051] patch by Eamonn Webster.

Sat Oct 26 14:35:09 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_dump_on): use "Page" terminology.

Sat Oct 26 13:25:45 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
	  We only need one sweep time measurement without lazy sweep.

Sat Oct 26 11:59:13 2013  Tanaka Akira  <akr@fsij.org>

	* addr2line.c: Include ELF header after system headers (especially
	  sys/types.h) to avoid compilation failure,
	  "usr/include/sh3/elf_machdep.h:4:2: error: #error Define _BYTE_ORDER!",
	  on NetBSD/sh3 (dreamcast, hpcsh, landisk, mmeye).

Sat Oct 26 11:35:22 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: tuning parameters.

	* gc.c (GC_MALLOC_LIMIT): change default value to 16MB.

	* gc.c (GC_MALLOC_LIMIT_GROWTH_FACTOR): change default value to 2.0.

	* gc.c (gc_before_sweep): change decrease ratio of `malloc_limit'
	  from 1/4 to 1/10.

Sat Oct 26 11:30:07 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (vm_malloc_increase): do gc_rest_sweep() before GC.
	  gc_rest_sweep() can reduce malloc_increase, so try it before GC.
	  Otherwise, malloc_increase can be less than malloc_limit at
	  gc_before_sweep(). This means that re-calculation of malloc_limit
	  may be wrong value.

Sat Oct 26 06:35:41 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_before_heap_sweep): Restructure code to mean clearly.
	  heap->freelist is connected to end of list.

Sat Oct 26 04:01:35 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_before_heap_sweep): fix freelist management.
	  After rb_gc_force_recycle() for a object belonging to heap->freelist,
	  `heap->using_page->freelist' is not null.

Thu Oct 24 21:57:24 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* parse.y: Remove +(binary) and -(binary) special cases
	  [Feature #9048]

Thu Oct 24 12:45:53 2013  Zachary Scott  <e@zzak.io>

	* object.c: [DOC] Document first argument also takes string for:

	  rb_mod_const_get, rb_mod_const_set, rb_mod_const_defined

	  Also added note about NameError exception for invalid constant name

Thu Oct 24 12:23:58 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_terminate_all): add a comment why we need
	  state check and call terminate_i again.

Thu Oct 24 12:15:02 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_terminate_all): add a comment why infinite
	  sleep is safe.

Thu Oct 24 07:41:42 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c: add new initial_growth_max tuning parameter.
	  [ruby-core:57928] [Bug #9035]
	* gc.c (heap_set_increment): when initial_growth_max is set,
	  do not grow number of slots by more than growth_max at a time.
	* gc.c (rb_gc_set_params): load optional new tuning value from
	  RUBY_HEAP_SLOTS_GROWTH_MAX environment variable.
	* test/ruby/test_gc.rb (class TestGc): test for above.

Thu Oct 24 01:34:12 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h (rb_infinity_float): suppress overflow in
	  constant arithmetic warnings.  [ruby-core:57981] [Bug #9044]

Thu Oct 24 00:11:24 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/ostruct.rb: raise NoMethodError with a #name and #args.
	  Raise RuntimeError when modifying frozen instances
	  instead of TypeError.
	  (OpenStruct#each_pair): Return an enumerator with size
	  (OpenStruct#delete): Use the converted argument.
	  Patches by Kenichi Kamiya. [Fixes GH-383]

	* test/ostruct/test_ostruct.rb: Added tests for above.

Thu Oct 24 00:10:22 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* array.c: Add Array#to_h [Feature #7292]

	* enum.c: Add Enumerable#to_h

Wed Oct 23 23:48:28 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c: Rename free_min to min_free_slots and free_min_page to
	  max_free_slots. The algorithm for heap growth is:
	    if (swept_slots < min_free_slots) pages++
	    if (swept_slots > max_free_slots) pages--

Wed Oct 23 22:51:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
	  functions.  [ruby-core:57981] [Bug #9044]

Wed Oct 23 19:13:18 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: move increment from heap to heap_pages.
	  Share `increment' information with heaps.

	* gc.c: change ratio of heap_pages_free_min_page
	  to 0.80.
	  This change means slow down page freeing speed.

Wed Oct 23 17:52:03 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (heap_pages_free_unused_pages): cast to (int) for size_t
	  variable `i'.

Wed Oct 23 17:39:35 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: introduce tomb heap.
	  Tomb heap is where zombie objects and ghost (freed slot) lived in.
	  Separate from other heaps (now there is only eden heap) at sweeping
	  helps freeing pages more efficiently.
	  Before this patch, even if there is an empty page at former phase
	  of sweeping, we can't free it.

	  Algorithm:
	    (1) Sweeping all pages in a heap and move empty pages from the
	        heap to tomb_heap.
	    (2) Check all existing pages and free a page
	        if all slots of this page are empty and
	           there is enough empty slots (checking by swept_num)

	  To introduce this patch, there are several tuning of GC parameters.

Wed Oct 23 14:20:56 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_prof_sweep_timer_stop): catch up recent changes
	  to compile on GC_PROFILE_MORE_DETAIL=1.

Wed Oct 23 11:43:27 2013  Zachary Scott  <e@zzak.io>

	* file.c: [DOC] fix rdoc format of File#expand_path from r43386

Tue Oct 22 21:58:28 2013  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* vm_core.h (enum): avoid syntax error.

	* method.h: ditto.

	* internal.h: ditto.

Tue Oct 22 19:53:16 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (Init_heap): move logics from heap_pages_init() and remove
	  heap_pages_init().

Tue Oct 22 19:19:05 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: allow multiple heaps.
	  Now, objects are managed by page. And a set of pages is called heap.
	  This commit supports multiple heaps in the object space.

	  * Functions heap_* and rb_heap_t manages heap data structure.
	  * Functions heap_page_* and struct heap_page manage page data
	    structure.
	  * Functions heap_pages_* and struct rb_objspace_t::heap_pages
	    maintains all pages.
	    For example, pages are allocated from the heap_pages.

	  See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design
	  and https://bugs.ruby-lang.org/attachments/4015/data-heap_structure_with_multiple_heaps.png
	  for more details.

	  Now, there is only one heap called `eden', which is a space for all
	  new generated objects.

Tue Oct 22 18:26:12 2013  Tanaka Akira  <akr@fsij.org>

	* lib/pp.rb (object_address_group): Use Kernel#to_s to obtain the class
	  name and object address.
	  This fix a problem caused by %p in C generates variable length
	  address.
	  Reported by ko1 via IRC.

Tue Oct 22 16:57:48 2013  Benoit Daloze  <eregontp@gmail.com>

	* file.c (File#expand_path): [DOC] improve documentation of File#expand_path.
	  Based on patch by Prathamesh Sonpatki. [ruby-core:57734] [Bug #9002]

Tue Oct 22 15:59:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): don't skip current directories if FNM_DOTMATCH
	  is given.  [ruby-core:53108] [Bug #8006]

Tue Oct 22 14:53:11 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c: exterminate Zombies.
	  There is a bug that T_ZOMBIE objects are not collected.
	  Because there is a pass to miss finalizer postponed job
	  with multi-threading. This patch solve this issue.

	* vm_trace.c (rb_postponed_job_register_one): set
	  RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(th) if another same job
	  is registered.
	  There is a possibility to remain a postponed job without
	  interrupt flag.

	* vm_trace.c (rb_postponed_job_register_one): check interrupt
	  carefully.

	* vm_trace.c (rb_postponed_job_register_one): use additional space
	  to avoid buffer full.

	* gc.c (gc_finalize_deferred_register): check failure.

	* thread.c (rb_threadptr_execute_interrupts): check
	  `postponed_job_interrupt' immediately.  There is a possibility
	  to miss this flag.

Tue Oct 22 12:11:16 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check if the given CFLAGS and LDFLAGS are working, and
	  bail out early if not.

Tue Oct 22 00:06:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_exists_p): warn deprecated name.  [Bug #9041]

Mon Oct 21 23:57:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (load_encoding): should preserve outer errinfo, so that
	  expected exception may not be lost.  [ruby-core:57949] [Bug #9038]

Sun Oct 20 15:41:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_reopen): create a new, temporary FD via rb_sysopen and
	  call rb_cloexec_dup2 on it to atomically replace the file fptr->fd
	  points to.  This leaves no possible window where fptr->fd is invalid
	  to userspace (even for any threads running w/o GVL).  based on the
	  patch by Eric Wong <normalperson@yhbt.net> at [ruby-core:57943].
	  [Bug #9036]

Sun Oct 20 15:29:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_syserr_fail_path_in): new function split from
	  rb_sys_fail_path_in to raise SystemCallError without errno.

	* internal.h (rb_syserr_fail_path): like rb_sys_fail_path but without
	  errno.

Sun Oct 20 13:58:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (rb_obj_wb_unprotect, rb_obj_written),
	  (rb_obj_write): suppress unused-parameter warnings.

Sun Oct 20 10:32:48 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update RubyGems to master 0886307.  This commit
	  improves documentation and should bring ruby above 75% documented on
	  rubyci.

Sun Oct 20 09:30:56 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 3de7e0f.  Changes:

	  Only attempt to build extensions for newly-installed gems.  This
	  prevents compilation attempts at gem activation time for gems that
	  already have extensions built.

	  Fix crash in the dependency resolver for dependencies that cannot be
	  resolved.

	* test/rubygems:  ditto.

Sun Oct 20 05:24:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (rb_class2name): should return real class name, not
	  singleton class or iclass.

Sun Oct 20 04:18:48 2013  Aman Gupta <ruby@tmm1.net>

	* variable.c (rb_class2name): call rb_tmp_class_path() directly to
	  avoid extra rb_str_dup() from rb_class_name().

Sat Oct 19 19:59:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/file.c (code_page): use simple array instead of st_table.

	* encoding.c (rb_locale_encindex): defer initialization of win32 code
	  page table until encoding db loaded.

Sat Oct 19 08:25:05 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix rb_objspace_t.
	  * make "struct heap" and move most of variables
	    in rb_objspace_t::heap.
	  * rename rb_objspace_t::heap::sorted to
	    rb_objspace_t::heap_sorted_pages
	    and make a macro heap_sorted_pages.
	  * rename rb_objspace_t::heap::range to
	    rb_objspace_t::heap_range and rename macros
	    lomem/himem to heap_lomem/heap_himem.

Sat Oct 19 07:14:40 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 42543b6.  Changes:

	  Fix `gem update` for gems with multiple platforms.

	* test/rubygems:  ditto.

Sat Oct 19 06:55:52 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 0a3814b.  Changes:

	  Fixed extension directory in Gem::Specification#require_paths.

	  Allow installation of gems when $HOME is nonexistent or unwritable.

	  Use proper API in InstallCommand.

	  Improve support for path option in gem dependency files.

	  Remove warnings.

	* test/rubygems:  ditto.

Fri Oct 18 15:23:34 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: change terminology of heap.
	  Change "slot" to "page". "Slot" is a space of RVALUE.
	  1. "Heap" consists of a set of "heap_page"s (pages).
	  2. Each "heap_page" has "heap_page_body".
	  3. "heap_page_body" has RVALUE (a.k.a. "slot") spaces.
	  4. "sorted" is a sorted array of "heap_page"s, sorted
	     by address of heap_page_body (for "is_pointer_to_heap").

	  See https://bugs.ruby-lang.org/attachments/4008/data-heap_structure.png.

Fri Oct 18 09:40:43 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master cee6788.  Changes:

	  Fix test failure on vc10-x64 Server on rubyci.org due to attempting
	  to File.chmod where it is not supported.

	  Continuing work on improved gem dependencies file (Gemfile) support.

	* test:  ditto.

Fri Oct 18 06:02:49 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master f738c67.  Changes:

	  Fixed test bug for ruby with ENABLE_SHARED = no

	* test/rubygems:  ditto.

Fri Oct 18 00:57:07 2013  Tanaka Akira  <akr@fsij.org>

	* lib/tsort.rb (TSort.tsort): Extracted from TSort#tsort.
	  (TSort.tsort_each): Extracted from TSort#tsort_each.
	  (TSort.strongly_connected_components): Extracted from
	  TSort#strongly_connected_components.
	  (TSort.each_strongly_connected_component): Extracted from
	  TSort#each_strongly_connected_component.

Thu Oct 17 18:50:08 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (CALC_EXACT_MALLOC_SIZE_CHECK_OLD_SIZE): introduced.
	  This macro enable checker compare with allocated memory and
	  declared old_size of sized_xfree and sized_xrealloc.

Thu Oct 17 18:45:41 2013  Koichi Sasada  <ko1@atdot.net>

	* string.c (STR_HEAP_SIZE): includes TERM_LEN(str).

	* string.c (rb_str_memsize): use STR_HEAP_SIZE().

Thu Oct 17 17:43:00 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): set ci->me to 0 when the
	  original method of a refined method is undef to avoid SEGV.

	* vm_method.c (rb_method_entry_without_refinements): return 0 when
	  the original method of a refined method is undef to avoid SEGV.

	* test/ruby/test_refinement.rb: related test.

Thu Oct 17 17:38:36 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c, internal.h: rename ruby_xsizefree/realloc to
	  rb_sized_free/realloc.

	* array.c: catch up these changes.

	* string.c: ditto.

Thu Oct 17 17:32:51 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c, string.c: use ruby_xsizedfree() and ruby_xsizedrealloc().

	* internal.h (SIZED_REALLOC_N): define a macro as REALLOC_N().

Thu Oct 17 17:11:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (console_emulator_p): check by comparison between
	  module handle of WriteConsoleW and kernel32.dll.

	* configure.in, win32/Makefile.sub, win32/setup.mak: no longer need
	  psapi.lib.

Thu Oct 17 16:53:30 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c, internal.h: add new internal memory management functions.
	  * void *ruby_xsizedrealloc(void *ptr, size_t new_size, size_t old_size)
	  * void ruby_xsizedfree(void *x, size_t size)
	  These functions accept additional size parameter to calculate more
	  accurate malloc_increase parameter which control GC timing.
	  [Feature #8985]

Thu Oct 17 14:21:34 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/file.c (rb_file_expand_path_internal): fix memory leaks at
	  a non-absolute home exception.

Thu Oct 17 14:06:39 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/object_tracing.c (newobj_i): fix memory leak.
	  There is possibility to remain info due to missing FREEOBJ event.
	  FREEOBJ events are skipped while suppress_tracing state, for example,
	  during trace events are invoking.

Thu Oct 17 12:30:16 2013  Tanaka Akira  <akr@fsij.org>

	* lib/tsort.rb (TSort.each_strongly_connected_component_from):
	  Extracted from TSort#each_strongly_connected_component_from.

Thu Oct 17 11:07:06 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 941c21a.  Changes:

	  Restored method bundler wants to remove for compatibility.

	  Improvements to Gemfile compatibility.

	* test/rubygems:  ditto.

Thu Oct 17 08:08:11 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/object_tracing.c (newobj_i): add workaround.
	  some bugs hits this check.

	* ext/objspace/object_tracing.c (object_allocations_reporter_i): cast as pointer.

Thu Oct 17 07:36:53 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 2abce58.  Changes:

	  Fixed documentation generation when sdoc and json are installed as
	  gems.

	  Added some missing documentation.

Thu Oct 17 07:10:26 2013  Zachary Scott  <e@zzak.io>

	* ext/curses/curses.c: [DOC] Cleaned up formatting consistency of rdoc
	  comments for Curses, including period spacing and column width.

	  This patch also fixed some typos. Thanks to @postmodern for the patch!
	  [Fixes GH-420] https://github.com/ruby/ruby/pull/420

Thu Oct 17 06:58:42 2013  Zachary Scott  <e@zzak.io>

	* ext/date/date_core.c: [DOC] plural grammar fixed by @scott113341
	  Contributed via documenting-ruby.org: documenting-ruby/ruby#16
	  https://github.com/documenting-ruby/ruby/pull/16

Thu Oct 17 05:52:31 2013  Zachary Scott  <e@zzak.io>

	* ext/io/nonblock/nonblock.c: [DOC] Document io/nonblock by reprah
	  [Fixes GH-418] https://github.com/ruby/ruby/pull/418 based on the
	  original discussion from documenting-ruby/ruby#18

Thu Oct 17 05:40:33 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (objspace_each_objects): do not skip empty RVALUEs.

Thu Oct 17 05:31:31 2013  Koichi Sasada  <ko1@atdot.net>

	* error.c (rb_bug_reporter_add): return simply 0 if failed.
	  Please check return value.

Thu Oct 17 05:17:33 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/object_tracing.c: add new method
	  ObjectSpace.trace_object_allocations_debug_start for GC debugging.
	  If you encounter the BUG "... is T_NONE" (and so on) on your
	  application, please try this method at the beginning of your app.

Wed Oct 16 22:35:27 2013  Zachary Scott  <e@zzak.io>

	* ext/io/nonblock/nonblock.c: use rb_cIO instead of VALUE

Wed Oct 16 17:45:13 2013  Koichi Sasada  <ko1@atdot.net>

	* bootstraptest/runner.rb: check nil before calling `signal?'
	  for a process status.

Wed Oct 16 17:37:17 2013  Koichi Sasada  <ko1@atdot.net>

	* error.c, internal.h (rb_bug_reporter_add): add a new C-API.
	  rb_bug_reporter_add() allows to register a function which
	  is called at rb_bug() called.

	* ext/-test-/bug_reporter/bug_reporter.c: add a test for this C-API.

	* ext/-test-/bug_reporter/extconf.rb: ditto.

	* test/-ext-/bug_reporter/test_bug_reporter.rb: ditto.

Wed Oct 16 15:14:21 2013  Koichi Sasada  <ko1@atdot.net>

	* NEWS: add a line into NEWS for last commit.

Wed Oct 16 15:09:14 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c: add a new method `reachable_objects_from_root'.
	  ObjectSpace.reachable_objects_from_root returns all objects referred
	  from root (called "root objects").
	  This feature is for deep object analysis.

	* test/objspace/test_objspace.rb: add a test.

Wed Oct 16 15:00:21 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master b955554.  Changes:

	  Fixed NameError for Gem::Ext due to re-entering file lookup in
	  RubyGems' overridden require.  Bug by Koichi Sasada.

	  Fixed possible circular require warning in tests.

	  Used existing constant for `gem install -g` dependency file list.

	* test/rubygems:  ditto.

Wed Oct 16 09:42:42 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master 278d00d.  Changes:

	  Fixes building extensions without a "clean" make rule

	  Adds gem dependency file autodetection to "gem install -g"

	* test/rubygems:  Tests for the above.

Wed Oct 16 09:12:23 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems master commit 2a74263.  This fixes
	  several bugs in RubyGems 2.2.0.preview.1.

	* test/rubygems:  ditto.

Wed Oct 16 07:25:02 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (gc_mark_roots): rename roots to be categories
	  instead of function names.

Tue Oct 15 19:18:13 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.h (rb_objspace_reachable_objects_from_root): added.
	  This API provides information which objects are root objects.
	  `category' shows what kind of root objects.

	* gc.c (gc_mark_roots): separate from gc_marks_body().

Tue Oct 15 17:47:59 2013  Tanaka Akira  <akr@fsij.org>

	* process.c: Fix a typo.  MacOS X doesn't have ENOTSUPP.

Mon Oct 14 12:32:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (process_options): load statically linked extensions before
	  rubygems, because of ext/thread.

	* ruby.c (process_options): use gem_prelude instead of requiring
	  rubygems directly when --enable=gems is given.

	* Makefile.in (DEFAULT_PRELUDES): always use gem_prelude regardless of
	  --disable-rubygems.

Mon Oct 14 11:07:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_framework): should append framework options to
	  $LIBS, not $LDFLAGS.  The former is propagated to exts.mk when
	  enable-static-linked-ext.

	* lib/mkmf.rb (create_makefile): ranlib on static library, not DLLIB.

Sun Oct 13 23:53:40 2013  Andrew Grimm  <andrew.j.grimm@gmail.com>

	* vsnprintf.c: Fix spelling from compliment to complement.
	  Patch by @agrimm.

	* include/ruby/ruby.h: ditto

Sun Oct 13 20:59:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (Init_BareVM): initialize defined_module_hash here,
	  Init_top_self() is too late to register core classes/modules.

	* compile.c (compile_array_): no hash to merge if it is empty.

	* vm.c (m_core_hash_merge_kwd): just check keys if only one argument
	  is given, without merging.

Sat Oct 12 06:35:01 2013-10-11  Eric Hodel  <drbrain@segment7.net>

	* lib/rake:  Update to rake 10.1.0
	* bin/rake:  ditto.
	* test/rake:  ditto.

	* NEWS:  Update NEWS to include rake 10.1.0 and links to release notes.

Sat Oct 12 03:26:04 2013  Koichi Sasada  <ko1@atdot.net>

	* class.c, variable.c, gc.c (rb_class_tbl): removed.

	* vm.c, vm_core.h (rb_vm_add_root_module): added to register as a
	  defined root module or class.
	  This guard helps mark miss from defined classes/modules they are
	  only referred from C's global variables in C-exts.
	  Basically, it is extension's bug.
	  Register to hash object VM has.
	  Marking a hash objects allows generational GC supports.

	* gc.c (RGENGC_PRINT_TICK): disable (revert).

Sat Oct 12 03:24:49 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_method.c (rb_gc_mark_unlinked_live_method_entries):
	  revert last commit to introduce debug prints.

Fri Oct 11 21:05:19 2013  Koichi Sasada  <ko1@atdot.net>

	* internal.h, parse.y: use `full_mark' instead of `full_marking'.

Fri Oct 11 20:58:16 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: use terminology `full_mark' instead of `minor_gc'
	  in mark functions.

Fri Oct 11 20:46:09 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: use __GNUC__ instead of __GCC__.

Fri Oct 11 20:35:59 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c, parse.y: support generational Symbol related marking.
	  Each symbols has String objects respectively to represent
	  Symbols.
	  These objects are marked only when:
	  * full marking
	  * new symbols are added
	  This hack reduce symbols (related strings) marking time.
	  For example, on my Linux environment, the following code
	    "20_000_000.times{''}"
	  with 40k symbols (similar symbol number on Rails 3.2.14 app,
	  @jugyo tells me) boosts, from 7.3sec to 4.2sec.

	* internal.h: change prototype of rb_gc_mark_symbols().

Fri Oct 11 19:27:22 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el: Import ruby-electric.el 2.0.1 which fixes
	  a bug and a flaw with auto-end introduced in the revamp.

	  * ruby-forward-sexp is inappropriate here because it moves the
	    cursor past the keyword.

	  * Fix a reversed looking-back check in
	    ruby-electric--block-beg-keyword-at-point-p.

	  * Do not add end again if space or return is hit repeatedly
	    after a block beginning keyword.

Fri Oct 11 18:12:47 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/gc_hook.c: prohibit reentrant.

Fri Oct 11 18:11:34 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_postponed_job_flush): fix bit operation.

Fri Oct 11 17:33:24 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el: Import ruby-electric.el 2.0 from
	  https://github.com/knu/ruby-electric.el which integrates changes
	  from another fork by @qoobaa.

	  * Allow ruby-electric-mode to be disabled by introducing a
	    dedicated key map.  Electric key bindings are now defined in
	    ruby-electric-mode-map instead of overwriting ruby-mode-map.

	  * Add ruby-electric-mode-hook.

	  * Use a remap in binding ruby-electric-delete-backward-char.

	  * Totally revamp electric keywords and then introduce electric
	    return.  Modifier keywords are now properly detected making
	    use of ruby-mode's indentation level calculator, and

	  * block-mid keywords (then, else, elsif, when, rescue and
	    ensure) also become electric with automatic reindentation.

	  * Add standardized comments for ELPA integration.

	  * Fix interaction with smartparens-mode by disabling its end
	    keyword completion, since ruby-electric has become more clever
	    at it.

	  * The custom variable `ruby-electric-keywords` is changed to
	    `ruby-electric-keywords-alist`, allowing user to fine-grained
	    configuration.

Fri Oct 11 16:53:28 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_postponed_job_flush): simplify.

Fri Oct 11 03:36:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_threadptr_execute_interrupts): flush postponed job only
	  once at last.

	* vm_trace.c (rb_postponed_job_flush): defer calling postponed jobs
	  registered while flushing to get rid of infinite reentrance of
	  ObjectSpace.after_gc_start_hook.  [ruby-dev:47400] [Bug #8492]

Thu Oct 10 23:04:00 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_or): remove unused variables.

Thu Oct 10 23:01:16 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_or): use rb_hash_keys().

Thu Oct 10 21:36:16 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_compact_bang): use ary_resize_smaller().

Thu Oct 10 17:25:28 2013  Koichi Sasada  <ko1@atdot.net>

	* vm.c (vm_exec): support :b_return event for "lambda{return}.call".
	  [Bug #8622]

	* test/ruby/test_settracefunc.rb: add a test.

Thu Oct 10 13:52:37 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (postponed_job): use preallocated buffer.
	  Pre-allocate MAX_POSTPONED_JOB (1024) sized buffer
	  and use it.
	  If rb_postponed_job_register() cause overflow, simply it
	  fails and returns 0.
	  And maybe rb_postponed_job_register() is signal safe.

	* vm_core.h: change data structure.

Thu Oct 10 11:11:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (Init_VM): hide also the singleton class of frozen-core, not
	  only frozen-core itself.

Thu Oct 10 06:02:08 2013  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_rand.rb: fix r43224. local variable `e' is
	  no longer available.

Thu Oct 10 00:02:35 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* numeric.c (fix_aref): avoid a possible undefined behavior.
	  1L << 63 on 64-bit platform is undefined, at least, according to
	  ISO/IEC 9899 (C99) 6.5.7.

Wed Oct  9 23:57:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (id_for_attr): avoid inadvertent symbol creation.

Wed Oct  9 18:03:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_attr): preserve encoding of the attribute ID in
	  error message.

Wed Oct  9 17:40:16 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_fstring): because of lazy sweep, str may be unmarked
	  already and swept at next time, so mark it for the time being.
	  [ruby-core:57756]

Wed Oct  9 13:53:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compar.c (cmp_eq): fail if recursion.  [ruby-core:57736] [Bug #9003]

	* thread.c (rb_exec_recursive_paired_outer): new function which is
	  combination of paired and outer variants.

Wed Oct  9 09:18:14 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/debug.h,
	  vm_backtrace.c (rb_profile_frame_full_label): add new C API
	  rb_profile_frame_full_label() which returns label with
	  qualified method name.
	  Note that in future version of Ruby label() may return
	  same return value of full_label().

	* ext/-test-/debug/profile_frames.c,
	  test/-ext-/debug/test_profile_frames.rb: fix a test for this change.


Wed Oct  9 00:55:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (load_lock): display backtrace to $stderr at circular
	  require.

	* vm_backtrace.c (rb_backtrace_print_to): new function to print
	  backtrace to the given output.

Tue Oct  8 21:03:35 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_backtrace.c, include/ruby/debug.h: add new APIs
	  * VALUE rb_profile_frame_method_name(VALUE frame)
	  * VALUE rb_profile_frame_qualified_method_name(VALUE frame)

	* iseq.c (rb_iseq_klass), internal.h: add new internal function
	  rb_iseq_method_name().

	* ext/-test-/debug/profile_frames.c (profile_frames),
	  test/-ext-/debug/test_profile_frames.rb: add a test.

Tue Oct  8 16:11:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_uniq): use rb_hash_values(), as well as the case no
	  block is given.

	* internal.h: define rb_hash_values() as internal API.

Tue Oct  8 13:53:21 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_uniq): use rb_hash_keys().

	* internal.h: define rb_hash_keys() as internal API.

	* hash.c (rb_hash_keys): ditto.

Tue Oct  8 10:56:39 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't
	  support a combination getcontext() and threads. Patch by
	  Gabriele Giacone (1o5g4r8o@gmail.com). [Bug #8990][ruby-core:57685]

Tue Oct  8 05:58:12 2013  Tanaka Akira  <akr@fsij.org>

	* lib/time.rb (Time.strptime): Time.strptime('0', '%s') returns local
	  time Time object as Ruby 2.0 and before.

Tue Oct  8 05:40:37 2013  Eric Hodel  <drbrain@segment7.net>

	* .travis.yml:  Rebuild Travis CI's "ruby-head" version on successful
	  build.  Patch by Konstantin Haase.  [Fixes GH-417]
	  https://github.com/ruby/ruby/pull/417

Tue Oct  8 04:28:25 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-mode.el: Use preceding-char/following-char
	  (returning 0 at BOF/EOF) instead of char-before/char-after
	  (returning nil at BOF/EOF) to avoid error from char-syntax when
	  at BOF/EOF.

Tue Oct  8 04:12:45 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el (ruby-mode-set-encoding): Add a missing
	  else clause to unbreak with `cp932`, etc.

	* misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.

Tue Oct  8 03:57:34 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el (ruby-mode-set-encoding): Use
	  `default-buffer-file-coding-system` if the :prefer-utf-8
	  property is not available.

	* misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.

	* misc/ruby-additional.el (ruby-encoding-map): Override the
	  default value.

Tue Oct  8 03:19:19 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el (ruby-mode-set-encoding): Add support
	  for `prefer-utf-8` which was introduced in Emacs trunk.

	* misc/ruby-additional.el (ruby-encoding-map): Add a mapping from
	  `japanese-cp932` to `cp932` to fix the problem where saving a
	  source file written in Shift_JIS twice would end up having
	  `coding: japanese-cp932` which Ruby could not recognize.

	* misc/ruby-additional.el (ruby-mode-set-encoding): Add support
	  for encodings mapped to nil in `ruby-encoding-map`.

	* misc/ruby-additional.el (ruby-encoding-map): Map `us-ascii` and
	  `utf-8` to nil by default, meaning they need not be explicitly
	  declared in magic comment.

	* misc/ruby-additional.el (ruby-encoding-map): Add type
	  declaration for better customize UI.

	* misc/ruby-mode.el: Ditto for the above.

Tue Oct  8 00:14:53 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el: Add a standard header and footer,
	  including (provide 'ruby-additional).

Mon Oct  7 22:52:45 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-space-can-be-expanded-p):
	  Return nil to avoid "end" insertion when in smartparens-mode
	  that is configured to insert "end" for the same keyword.

	* misc/ruby-electric.el (ruby-electric-keywords): New custom
	  variable to replace `ruby-electric-simple-keywords-re` with.

Mon Oct  7 22:52:16 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el: Use preceding-char/following-char
	  (returning 0 at BOF/EOF) instead of char-before/char-after
	  (returning nil at BOF/EOF) to avoid error from char-syntax when
	  at BOF/EOF.

Mon Oct  7 22:45:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* cont.c (FIBER_USE_NATIVE): split long conditions.

Mon Oct  7 20:29:31 2013  Zachary Scott  <e@zzak.io>

	* lib/time.rb: [DOC] typo in Time.rb overview by @srt32 [Fixes GH-416]
	  https://github.com/ruby/ruby/pull/416

Mon Oct  7 20:07:20 2013  Tanaka Akira  <akr@fsij.org>

	* lib/time.rb (Time.strptime): Use :offset.
	  Patch by Felipe Contreras.  [ruby-core:57694]

Mon Oct  7 16:47:27 2013  Koichi Sasada  <ko1@atdot.net>

	* test/-ext-/debug/test_profile_frames.rb: rename class C to
	  something long name because one test depends on absence of
	  class ::C.

Mon Oct  7 16:33:10 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/-test-/debug/profile_frames.c:
	  test/-ext-/debug/test_profile_frames.rb: add a test for new C-APIs.

Mon Oct  7 16:12:36 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/debug.h: add backtrace collecting APIs for profiler.
	  * int rb_profile_frames(int start, int limit, VALUE *buff, int *lines);
	    Collect information of frame information.

	  * 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_first_lineno(VALUE frame);
	  * VALUE rb_profile_frame_classpath(VALUE frame);
	  * VALUE rb_profile_frame_singleton_method_p(VALUE frame);
	    Get information about each frame.

	  These APIs are designed for profilers, for example, no object allocation,
	  and enough information for profilers.
	  In this version, this API collects only Ruby level frames.
	  This issue will be fixed after Ruby 2.1.

	* vm_backtrace.c: implement above APIs.

	* iseq.c (rb_iseq_klass): return local_iseq's class.

Mon Oct  7 14:26:01 2013  Koichi Sasada  <ko1@atdot.net>

	* proc.c: catch up last commit.
	  Type of return value of rb_iseq_first_lineno() is now VALUE.

	* vm_insnhelper.c (argument_error): ditto.

	* vm_method.c (rb_method_entry_make): ditto.

Mon Oct  7 14:07:45 2013  Koichi Sasada  <ko1@atdot.net>

	* iseq.c, internal.h: change to public (but internal) functions
	  * VALUE rb_iseq_path(VALUE iseqval);
	  * VALUE rb_iseq_absolute_path(VALUE iseqval);
	  * VALUE rb_iseq_label(VALUE iseqval);
	  * VALUE rb_iseq_base_label(VALUE iseqval);
	  * VALUE rb_iseq_first_lineno(VALUE iseqval);
	  And new (temporary) function:
	  * VALUE rb_iseq_klass(VALUE iseqval);

	* iseq.c. vm_core.h (int rb_iseq_first_lineno): remove
	  function `int rb_iseq_first_lineno(const rb_iseq_t *iseq)'.
	  Use `VALUE rb_iseq_first_lineno(VALUE iseqval)' instead.

	* proc.c. vm_insnhelper.c, vm_method.c: catch up this change.

Sun Oct  6 08:37:39 2013  Zachary Scott  <e@zzak.io>

	* lib/webrick.rb: [DOC] fix grammar in WEBrick overview [Fixes GH-413]
	  Based on patch by @chastell https://github.com/ruby/ruby/pull/413

Sat Oct  5 11:21:01 2013  Aaron Pfeifer  <aaron.pfeifer@gmail.com>

	* thread.c (terminate_atfork_i): fix locking mutexes not unlocked in
	  forks when not tracked in thread.  [ruby-core:55102] [Bug #8433]

Fri Oct  4 19:54:09 2013  Zachary Scott  <e@zzak.io>

	* ext/dbm/dbm.c: [DOC] Fix wrong constant name in DBM by @edward
	  [Fixes GH-409] https://github.com/ruby/ruby/pull/409

Fri Oct  4 19:49:42 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c: rename heap.free_num as heap.swept_num to clarify meaning and
	  avoid confusion with objspace_free_num().

Fri Oct  4 19:02:01 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c (objspace_free_num): new method for available/free slots on
	  heap. [ruby-core:57633] [Bug #8983]
	* gc.c (gc_stat): change heap_free_num definition to use new method.
	* test/ruby/test_gc.rb: test for above.

Fri Oct  4 18:53:42 2013  Aman Gupta <ruby@tmm1.net>

	* gc.c: add rb_objspace.limit to keep accurate count of total heap
	  slots [ruby-core:57633] [Bug #8983]

Fri Oct  4 09:32:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/csv.rb (CSV.foreach): support enumerator.  based on a patch by
	  Hanmac (Hans Mackowiak) at [ruby-core:57643].  [ruby-core:57283]
	  [Feature #8929]

Thu Oct  3 18:20:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (console_emulator_p, constat_handle): disable built-in
	  console colorizing when console-emulator-like DLL is injected.
	  [Feature #8201]

Thu Oct  3 18:01:44 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: define gc_profile_record::allocated_size if
	  CALC_EXACT_MALLOC_SIZE is true.

Thu Oct  3 13:42:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (yes-test-sample): use RUNRUBY instead of MINIRUBY to set
	  runtime library path and run the built ruby.  [Bug #8971]

Thu Oct  3 00:17:15 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-additional.el: Properly quote the body.  An unquoted
	  body given to eval-after-load is evaluated immediately!

Wed Oct  2 21:38:30 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/socket/ifaddr.c (rsock_getifaddrs): fix possible memory leak.
	  When a system had no interface, this function used xmalloc for root
	  but did not return any reference to it.  This patch fixes it by
	  immediately returning an empty array if no interface is found.
	  Coverity Scan found this bug.

Wed Oct  2 21:37:04 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* random.c (make_seed_value): a local array declaration was accessed
	  out of scope.  Coverity Scan found this bug.

Wed Oct  2 18:52:40 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: relax GC condition due to malloc_limit.

	* gc.c (GC_MALLOC_LIMIT_MAX): change default value
	  (256MB -> 512MB) and permit zero to ignore max value.

	* gc.c (vm_malloc_increase, vm_xrealloc): do not cause GC on realloc.

	* gc.c (gc_before_sweep): change debug messages.

Wed Oct  2 16:26:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_close_read): duplex IO should wait its child process
	  even after close_read.

Wed Oct  2 15:39:13 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_core.h: use __has_attribute() instead of __clang__major__ because
	  clang says "Note that marketing version numbers should not be used
	  to check for language features, as different vendors use different
	  numbering schemes. Instead, use the Feature Checking Macros."
	  http://clang.llvm.org/docs/LanguageExtensions.html

Wed Oct  2 14:19:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_close_write): detach tied IO for writing before closing
	  to get rid of race condition.  [ruby-list:49598]

	* io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
	  fix freed pointer access when it is in use by other threads, and get
	  rid of potential memory/fd leak.

Tue Oct  1 23:44:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm_core.h: use __attribute__((unused)) in UNINITIALIZED_VAR on clang
	  4.0+ instead of just on 4.2. Clang has supported the unused attribute
	  since before version 4, so this should be safe.

Tue Oct  1 22:03:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/tempfile.rb (Tempfile#unlink): finalizer is no longer needed
	  after unlinking.  patched by by normalperson (Eric Wong) at
	  [ruby-core:56521] [Bug #8768]

Tue Oct  1 20:54:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (stat_new_0): constify.

	* file.c (rb_stat_new): constify and export.  based on a patch by
	  Hanmac (Hans Mackowiak) at [ruby-core:53225].  [Feature #8050]

Tue Oct  1 16:03:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (ruby_safe_level_4_warning): needed by extension
	  libraries which check safe level 4.  [ruby-dev:47517] [Bug #8652]

Mon Sep 30 23:14:36 2013  Zachary Scott  <e@zzak.io>

	* ext/objspace/objspace.c: [DOC] Cleaned up many rdoc formatting
	  issues and several duplicate grammar bugs.

Mon Sep 30 23:01:01 2013  Zachary Scott  <e@zzak.io>

	* ext/objspace/object_tracing.c: [DOC] Adjust rdoc formatting and fix
	  small grammar typo

Mon Sep 30 17:28:39 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/object_tracing.c: [DOC] add some notes for
	  ObjectSpace::trace_object_allocations.

Mon Sep 30 16:46:58 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/object_tracing.c: add new 3 methods to control tracing.
	  * ObjectSpace::trace_object_allocations_start
	  * ObjectSpace::trace_object_allocations_stop
	  * ObjectSpace::trace_object_allocations_clear
	  And some refactoring.

	* test/objspace/test_objspace.rb: add a test for new methods.

	* NEWS: add a description for new methods.

Mon Sep 30 11:18:04 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_gc_disable): do rest_sweep() before disable GC.
	  This fix may solve a failure of
	  TestTracepointObj#test_tracks_objspace_events
	  [test/-ext-/tracepoint/test_tracepoint.rb:43].

Mon Sep 30 10:40:20 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_method.c (rb_undef): raise a NameError if the original method
	  of a refined method is not defined.

	* vm_insnhelper.c (rb_method_entry_eq): added NULL check to avoid SEGV.

	* test/ruby/test_refinement.rb: related test.

Sun Sep 29 23:45:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_id_attrset, intern_str): allow junk attrset ID for
	  Struct.

	* parse.y (rb_id_attrset): fix inconsistency with literals, allow
	  ID_ATTRSET and return it itself, but ID_JUNK cannot make ID_ATTRSET.
	  and raise a NameError instead of rb_bug() for invalid argument.

Sun Sep 29 18:45:05 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args):
	  clear keyword arguments to prevent GC bug which occurs
	  while marking VM stack.
	  [ruby-dev:47729] [Bug #8964]

	* test/ruby/test_keyword.rb: tests for the above.

Sat Sep 28 23:25:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* math.c (math_log, math_log2, math_log10): fix for Bignum argument.
	  numbits should be add only when right shifted.

Sat Sep 28 14:30:29 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
	  correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com).
	  [Bug #8937][ruby-core:57311]
	* test/fiddle/helper.rb: ditto.

Sat Sep 28 00:19:41 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/curses/extconf.rb: check the size of chtype.

	* ext/curses/curses.c (NUM2CH, CH2NUM): use proper macros for
	  the size of chtype.

	[ruby-core:56090] [Bug #8659]

Fri Sep 27 18:33:23 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: add two GC tuning environment variables.
	  RUBY_GC_MALLOC_LIMIT_MAX and RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR.
	  See r43067 for details.

	* gc.c (rb_gc_set_params): refactoring. And change verbose notation.
	  Mostly duplicated functions get_envparam_int/double is not cool.
	  Please rewrite it.

	* test/ruby/test_gc.rb: fix a test for this change.

Fri Sep 27 17:44:41 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (GC_MALLOC_LIMIT): 8,000,000 -> 8 * 1,024 * 1,024.

Fri Sep 27 17:19:39 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_before_sweep): cast to size_t to suppress warnings.

Fri Sep 27 17:07:55 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: add some fine-grained profiling codes to tuning marking phase.
	  If you enable RGENGC_PRINT_TICK to 1, then profiling results by RDTSC
	  (on x86/amd64 environment) are printed at last.
	  Thanks Yoshii-san.

Fri Sep 27 16:32:27 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: simplify threshold of GC caused by malloc_increase.
	  Now, malloc_limit is increased/decreased by mysterious logic.
	  This fix simplify malloc_limit increase/decrease logic such as:
	    if (malloc_increase > malloc_limit) /* so many malloc */
	      malloc_limit += malloc_limit * (GC_MALLOC_LIMIT_FACTOR-1);
	    else
	      malloc_limit -= malloc_limit * (GC_MALLOC_LIMIT_FACTOR-1)/4;
	  Default value of GC_MALLOC_LIMIT_FACTOR is 1.8.
	  malloc_limit is bounded by GC_MALLOC_LIMIT_MAX (256MB by default).
	  This logic runs at gc_before_sweep(). So there are no effect from
	  caused by lazy sweep. And we can remove malloc_increase2.

	* gc.c (HEAP_MIN_SLOTS, FREE_MIN, HEAP_GROWTH_FACTOR): rename to
	  GC_HEAP_MIN_SLOTS, GC_FREE_MIN, GC_HEAP_GROWTH_FACTOR respectively.
	  Check them by `#ifndef' so you can specify these values outside gc.c.

	* gc.c (ruby_gc_params_t): add initial_malloc_limit_factor and
	  initial_malloc_limit_max.

	* gc.c (vm_malloc_prepare, vm_xrealloc): use vm_malloc_increase to
	  add and check malloc_increase.

Fri Sep 27 01:05:00 2013  Zachary Scott  <e@zzak.io>

	* re.c: [DOC] arguments of Regexp::union receive #to_regexp [Bug #8205]

Fri Sep 27 00:39:27 2013  Zachary Scott  <e@zzak.io>

	* struct.c: [DOC] grammar of ArgumentError in Struct.new [Bug #8936]
	  Patch by Prathamesh Sonpatki

Thu Sep 26 22:11:56 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/bigdecimal.c: [DOC] several fixes by @chastell
	  This includes fixing the capitalization of Infinity, return value of
	  example "BigDecimal.new('NaN') == 0.0", and code style in example.
	  [Fixes GH-398] https://github.com/ruby/ruby/pull/398

Thu Sep 26 22:08:11 2013  Zachary Scott  <e@zzak.io>

	* lib/observer.rb: [DOC] syntax improvement in example by @chastell
	  [Fixes GH-400] https://github.com/ruby/ruby/pull/400

Thu Sep 26 22:03:15 2013  Zachary Scott  <e@zzak.io>

	* ext/digest/digest.c: [DOC] typo in overview by @chastell
	  [Fixes GH-399] https://github.com/ruby/ruby/pull/399

Thu Sep 26 22:00:42 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/ossl.c: [DOC] typo in example by @zoranzaric
	  [Fixes GH-401] https://github.com/ruby/ruby/pull/401

Thu Sep 26 21:07:49 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-delete-backward-char): Add
	  support for smartparens-mode.

	* misc/ruby-electric.el (ruby-electric-cua-replace-region-maybe)
	  (ruby-electric-cua-delete-region-maybe): New functions that
	  combine `ruby-electric-cua-*-region` with
	  `ruby-electric-cua-*-region-p`, using a slightly better way to
	  detect if it is in cua-mode.

Thu Sep 26 16:51:00 2013  Shota Fukumori  <her@sorah.jp>

	* insns.def (opt_regexpmatch2): Check String#=~ hasn't overridden
	  before calling rb_reg_match().

	* test/ruby/test_string.rb: Test for above.

	* vm.c (vm_init_redefined_flag): Add BOP flag for String#=~

	[ruby-core:57385] [Bug #8953]

Thu Sep 26 16:43:42 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el: Avoid use of the interactive function
	  `self-insert-command` which fires `post-self-insert-hook` and
	  `post-command-hook`, to make the ruby-electric commands work
	  nicely with those minor modes that make use of them to do
	  similar input assistance, such as electric-pair-mode,
	  autopair-mode and smartparens-mode.

Thu Sep 26 16:24:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* insns.def (opt_regexpmatch1): check Regexp#=~ is not defined before
	  calling rb_reg_match()

	* test/ruby/test_regexp.rb: add test

	* vm.c (ruby_vm_redefined_flag): change type to short[]

	* vm.c (vm_redefinition_check_flag): return REGEXP_REDEFINED_OP_FLAG if
	  klass == rb_cRegexp

	* vm.c (vm_init_redefined_flag): setup BOP flag for Regexp#=~

	* vm_insnhelper.h: add REGEXP_REDEFINED_OP_FLAG

	[ruby-core:57385] [Bug #8953]

Thu Sep 26 14:46:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (mark_locations_array): disable AddressSanitizer.  based on a
	  patch by halfie (Ruby Guy) at [ruby-core:57372].
	  [ruby-core:56155] [Bug #8680]

Wed Sep 25 17:41:29 2013  Koichi Sasada  <ko1@atdot.net>

	* README.EXT, README.EXT.ja: remove description of RARRAY_PTR()
	  and add a caution of accessing internal data structure directly.
	  Also add a description of rb_ary_store().
	  [Bug #8399]

Wed Sep 25 17:12:08 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().
	  RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and
	  usecase of this macro is not acquire raw pointer, but acquire
	  read-only pointer. So we rename to better name.
	  RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR()
	  (I expect that nobody use it).

	* array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c,
	  string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c:
	  catch up this change.

Wed Sep 25 16:58:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (rb_float_value, rb_float_new): move inline functions
	  from ruby/ruby.h.

	* numeric.c (rb_float_value, rb_float_new): define external functions
	  for extension libraries.

Wed Sep 25 15:37:02 2013  Koichi Sasada  <ko1@atdot.net>

	* test/rdoc/test_rdoc_generator_darkfish.rb: add a guard for windows.

Wed Sep 25 09:53:11 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Fix CVE-2013-4363.  Miscellaneous minor improvements.

	* test/rubygems:  Tests for the above.

Tue Sep 24 17:38:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_inspect): get rid of out-of-bound access.

	* string.c (rb_str_inspect): when a UTF-16/32 string doesn't have a
	  BOM, inspect as a dummy encoding string.

Tue Sep 24 17:15:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy.

	* encoding.c (enc_autoload): keep dummy encodings dummy.

Tue Sep 24 16:41:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (Win32::Registry#write): data size
	  is in bytes, not chars.  terminators should be placed automatically.

Tue Sep 24 16:39:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): encode
	  name.

	* ext/win32/lib/win32/registry.rb (Win32::Registry#each_key): ditto.

	* ext/win32/lib/win32/registry.rb (Win32::Registry#export_string):
	  encode to locale encoding if default internal is not set.

Tue Sep 24 16:35:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey):
	  size of the name is in WCHARs, not in bytes.

Tue Sep 24 14:07:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* gc.c (free_method_cache_entry_i): unused function

	* gc.c (rb_free_mc_table): ditto

	* internal.h (method_cache_entry_t): unused struct

	* vm_method.c (verify_method_cache): remove unused variable

	* vm_method.c (rb_method_entry): ditto

Tue Sep 24 14:01:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* class.c (class_alloc): remove mc_tbl

	* gc.c (obj_free): ditto

	* internal.h (struct rb_classext_struct): ditto

	* method.h (rb_method_entry): remove ent param

	* vm_method.c: restore the global method cache. Per class cache tables
	  turned out to be far too slow.

	  [ruby-core:57289] [Bug #8930]

Tue Sep 24 12:51:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (Win32::Registry::API): need
	  Constants.

	* ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumValue):
	  size of the name is in WCHARs, not in bytes.

Mon Sep 23 22:16:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): Unicode with BOM
	  must be based on big endian variants, so that actual encodings would
	  work.  [ruby-core:57318] [Bug #8940]

Mon Sep 23 12:11:26 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (env_each_pair): do not call rb_assoc_new() if
	  it isn't needed.

Mon Sep 23 10:42:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_module.rb (TestModule#test_include_toplevel): test
	  for top level main.include.  based on a part of the patch by
	  kyrylo at [GH-395].

Mon Sep 23 05:07:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/intern.h (rb_ary_cat): move from internal.h, since it
	  is described in README.EXT.

Sun Sep 22 20:55:20 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_insnhelper.c (vm_make_proc_with_iseq): fix bug message.
	  This is follow up to changes in r42637.

Sun Sep 22 20:35:38 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/-test-/tracepoint/tracepoint.c (Init_tracepoint): prevent from GC.

Sun Sep 22 19:00:28 2013  Benoit Daloze  <eregontp@gmail.com>

	* benchmark/bm_app_answer.rb: revert r42990, benchmark scripts should
	  be self-contained and avoid dependencies, especially such small one.
	  See https://github.com/ruby/ruby/pull/393#issuecomment-24861301.

Sat Sep 21 20:11:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_fork_internal): remove cloexec setting on pipes
	  created by rb_cloexec_pipe.  patch by normalperson (Eric Wong) at
	  [ruby-core:56523].  [Bug #8769]

Sat Sep 21 01:04:25 2013  Zachary Scott  <e@zzak.io>

	* lib/benchmark.rb: [DOC] grammar of Benchmark#bm [Bug #8888]
	  Patch by Prathamesh Sonpatki

Sat Sep 21 00:50:02 2013  Zachary Scott  <e@zzak.io>

	* enumerator.c: [DOC] Enumerator#each arguments documentation [GH-388]
	  Patch by @kachick  https://github.com/ruby/ruby/pull/388

Sat Sep 21 00:49:16 2013  Zachary Scott  <e@zzak.io>

	* enum.c: [DOC] Enumerable#to_a accepts arguments [GH-388]
	  Patch by @kachick https://github.com/ruby/ruby/pull/388

Sat Sep 21 00:47:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_conv_enc_opts): make sure to scan coderange to get
	  rid of unnecessary conversion.

Sat Sep 21 00:21:08 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/lib/openssl/ssl.rb: [DOC] Document OpenSSL::SSLServer
	  Based on a patch by Rafal Lisowski [Bug #8758]

Fri Sep 20 23:54:03 2013  Zachary Scott  <e@zzak.io>

	* lib/gserver.rb: [DOC] correct gserver.rb license [Bug #8913]

Fri Sep 20 23:48:34 2013  Zachary Scott  <e@zzak.io>

	* ext/psych/yaml/yaml.h: [DOC] merge upstream typo fix by @GreenGeorge
	  https://github.com/tenderlove/psych/pull/161

Fri Sep 20 23:37:40 2013  Zachary Scott  <e@zzak.io>

	* lib/securerandom.rb: [DOC] SecureRandom.hex length argument
	  [Fixes GH-394] Patch by @avdi https://github.com/ruby/ruby/pull/394

Fri Sep 20 23:34:48 2013  Zachary Scott  <e@zzak.io>

	* benchmark/bm_app_answer.rb: removed duplicate code [Fixes GH-393]
	  Patch by @gouravtiwari https://github.com/ruby/ruby/pull/393

Fri Sep 20 23:24:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (btest, btest-ruby, test-knownbug): add $(RUN_OPTS) to
	  ruby to be run, so that tests are runnable before making exts.

	* common.mk (test-sample): ditto, and use $(MINIRUBY) as rubytest.rb
	  does not need extension libraries.

	* tool/rubytest.rb: pass $(RUN_OPTS) to testing ruby using --run-opt.

Fri Sep 20 15:01:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (intern_str): sigil only names are junk, at least one
	  identifier character is needed.  [ruby-dev:47723] [Bug #8928]

	* parse.y (rb_enc_symname_type): fix out of bound access.

Fri Sep 20 14:14:32 2013  Tanaka Akira  <akr@fsij.org>

	* ext/-test-/printf/printf.c (printf_test_call): Fix an end of buffer
	  argument.

Thu Sep 19 16:59:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (lambda): adjust position to the beginning of the block.

Thu Sep 19 16:25:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vsnprintf.c (BSD_vfprintf): initialize cp so that size is 0 in the
	  commented case.  fix an accidental bug at r16716.

Thu Sep 19 14:33:14 2013  Koichi Sasada  <ko1@atdot.net>

	* NEWS: add a news for r42974.

Thu Sep 19 14:12:02 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: make Symbol objects frozen.
	  [Feature #8906]
	  I want to freeze this good day, too.

	* test/ruby/test_eval.rb: catch up this change.

	* test/ruby/test_symbol.rb: add a test to check frozen symbols.

Thu Sep 19 09:11:33 2013  Eric Hodel  <drbrain@segment7.net>

	* NEWS:  Update for RDoc 4.1.0.preview.1 and RubyGems 2.2.0.preview.1

Thu Sep 19 08:59:41 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/markdown/literals_1_9.rb:  Fix trailing whitespace.

	  Previously kpeg (which generates this file) added trailing
	  whitespace, but this bug is now fixed.

	* lib/rdoc/markdown.rb:  ditto.

Thu Sep 19 08:33:14 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc 4.1.0.preview.1

	  RDoc 4.1.0 contains a number of enhancements including a new default
	  style and accessibility support.  You can see the changelog here:

	  https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc

	* test/rdoc:  ditto.

Thu Sep 19 07:16:26 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: updating Psych version

	* ext/psych/psych.gemspec: ditto

Thu Sep 19 06:39:40 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/dependency_resolver.rb:  Switch the iterative resolver
	  algorithm from recursive to iterative to avoid possible
	  SystemStackError.

Thu Sep 19 06:29:30 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 2.2.0.preview.1

	  This brings several new features to RubyGems summarized here:

	  https://github.com/rubygems/rubygems/blob/v2.2.0.preview.1/History.txt

	* test/rubygems:  ditto.

Wed Sep 18 23:14:58 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_enumerate_lines): make String#each_line and
	  #lines not raise invalid byte sequence error when it is called
	  with an argument. The patch also causes performance improvement.
	  [ruby-dev:47549] [Bug #8698]

	* test/ruby/test_m17n_comb.rb (test_str_each_line): remove
	  assertions which check that String#each_line and #lines will
	  raise an error if the receiver includes invalid byte sequence.

Wed Sep 18 16:32:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew_from_me): allocate structs after allocated wrapper
	  object successfully, to get rid of potential memory leak.

Tue Sep 17 15:54:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/shell/command-processor.rb (Shell::CommandProcessor#find_system_command):
	  return executable file only, should ignore directories and
	  unexecutable files.  [ruby-core:57235] [Bug #8918]

	* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_throw):
	  assertion for throw.  MiniTest::Assertions#assert_throws discards
	  the caught value.

	* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_nothing_thrown):
	  returns the result of the given block.

Tue Sep 17 12:55:58 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/regexp.rdoc:  [DOC] Replace paragraphs in verbatim sections with
	  plain paragraphs to improve readability as ri and HTML.

Mon Sep 16 07:32:35 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: removed meaningless lines.
	* rational.c: ditto.

Mon Sep 16 00:44:23 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* ext/socket/mkconstants.rb: define MSG_FASTOPEN.
	  [ruby-core:57138] [Feature #8897]

Sun Sep 15 13:31:23 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* rational.c (nurat_div): reverted r28844, r28886 and r28887.
	  REASON: Nobuyoshi Nakada  <nobu@ruby-lang.org>'s commits are buggy.
	  So Rational#/ may produce exact number with inexact number.
	  Moreover, without reducing.
	  REALLY NONSENSE COMMITS.
	  A bug report by me [ruby-dev:44710] is also caused by this behavior.
	  Kenta Murata  <mrkn@mrkn.jp> patched it up.
	  But he did not fix the origin.
	  Today, the bug is still alive in ruby 1.9.3 and 2.0.0.

Sat Sep 14 06:08:10 2013  Eric Hodel  <drbrain@segment7.net>

	* dir.c (dir_s_glob):  [DOC] Improve wording and layout.

	* dir.c (file_s_fnmatch):  ditto.

	* dir.c (Init_Dir):  [DOC] Document File::Constants::FNM_XXX
	  constants.  (These won't show up in RDoc until a new RDoc is
	  imported.)

Thu Sep 12 14:58:58 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic.find_proxy): return nil if
	  http_proxy environment variable is empty string.
	  [ruby-core:57140] [Bug #8898]

Fri Sep 13 10:40:28 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 2.1.3

	  Fixed installing platform gems

	  Restored concurrent requires

	  Fixed installing gems with extensions with --install-dir

	  Fixed `gem fetch -v` to install the latest version

	  Fixed installing gems with "./" in their files entries

	* test/rubygems/test_gem_package.rb:  Tests for the above.

	* NEWS:  Updated for RubyGems 2.1.3

Thu Sep 12 22:40:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_CHECK_SIGNEDNESS): macro to check signedness of a
	  type.

	* configure.in (size_t): must be unsigned.
	  [ruby-core:57149] [Feature #8890]

Thu Sep 12 22:37:08 2013  Anton Ovchinnikov  <revolver112@gmail.com>

	* ext/bigdecimal/bigdecimal.c, ext/digest/md5/md5.c,
	  ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c:
	  Eliminate less-than-zero checks for unsigned variables.
	  According to section 4.1.5 of C89 standard, size_t is an unsigned
	  type.  These checks were found with 'cppcheck' static analysis tool.
	  [ruby-core:57117] [Feature #8890]

Thu Sep 12 21:35:46 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* Makefile.in (libruby-static.a): change LDFLAGS order. LDFLAGS may
	  include library path that should be specified before LIBS.
	  [ruby-dev:47707] [Bug #8901]

Thu Sep 12 20:07:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
	  float.h.

	* vsnprintf.c (BSD_vfprintf): limit length for cvt() to get rid of
	  buffer overflow.  [ruby-core:57023] [Bug #8864]

	* vsnprintf.c (exponent): make expbuf size more precise.

Wed Sep 11 17:30:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUNRUBY): append -- only after runruby.rb, not
	  cross-compiling baseruby, so that $(RUN_OPT) can be command line
	  options.  [ruby-dev:47703] [Bug #8893]

Wed Sep 11 07:55:17 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_unlock): Mutex#unlock no longer raise
	  an exception even if uses on trap. [Bug #8891]

Tue Sep 10 14:37:01 2013  Shota Fukumori  <sorah@tubusu.net>

	* vm_backtrace.c (vm_backtrace_to_ary): Ignore the second argument if
	  it is nil. [Bug #8884] [ruby-core:57094]

	* test/ruby/test_backtrace.rb (test_caller_with_nil_length):
	  Test for above.

Tue Sep 10 12:39:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (method_entry_i): should exclude refined methods from
	  instance method list.  [ruby-core:57080] [Bug #8881]

Tue Sep 10 12:05:04 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* io.c (rb_f_printf): [DOC] add missing parenthesis in rdoc.

Tue Sep 10 10:08:00 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* NEWS: Update RubyGems note.

Tue Sep 10 09:51:22 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 2.1.0.  Fixes CVE-2013-4287.

	  See http://rubygems.rubyforge.org/rubygems-update/CVE-2013-4287_txt.html
	  for CVE information.

	  See http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.1.0+%2F+2013-09-09
	  for release notes.

	* test/rubygems:  Tests for the above.

Mon Sep  9 21:31:45 2013  Tanaka Akira  <akr@fsij.org>

	* process.c: Remove spaces between SI prefix and unit to follow
	  SI brochure.
	  http://www.bipm.org/en/si/si_brochure/
	  https://www.nmij.jp/library/units/si/

	* time.c: Ditto.

	* ext/socket/ancdata.c: Ditto.

Mon Sep  9 16:55:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_add_refined_method_entry): clear cache in the
	  refined class since refining a method entry is modifying the class.
	  [ruby-core:57079] [Bug #8880]

Mon Sep  9 09:14:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (Gem::Specification#initialize): default date to
	  RUBY_RELEASE_DATE.  [ruby-core:57072] [Bug #8878]

	* tool/rbinstall.rb (Gem::Specification#to_ruby): add date.

Sun Sep  8 16:01:54 2013  Tanaka Akira  <akr@fsij.org>

	* rational.c (f_gcd): Relax the condition to use GMP.

Sun Sep  8 13:56:38 2013  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (folevariant_initialize): check type of
	  element of array.

	* test/win32ole/test_win32ole_variant.rb (test_s_new_ary): ditto.

Sat Sep  7 21:33:10 2013  Tanaka Akira  <akr@fsij.org>

	* math.c (math_log): Test the sign for bignums.
	  (math_log2): Ditto.
	  (math_log10): Ditto.

Sat Sep  7 20:25:47 2013  Tanaka Akira  <akr@fsij.org>

	* math.c (math_log): Support bignums bigger than 2**1024.
	  (math_log2): Ditto.
	  (math_log10): Ditto.

Sat Sep  7 15:36:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm_eval.c (vm_call0): fix prototype, the id parameter should be of
	  type ID, not VALUE

	* vm_insnhelper.c (check_match): the rb_funcall family of functions
	  does not care about refinements. We need to use
	  rb_method_entry_with_refinements instead to call === with
	  refinements. Thanks to Jon Conley for reporting this bug.
	  [ruby-core:57051] [Bug #8872]

	* test/ruby/test_refinement.rb: add test

Sat Sep  7 13:49:40 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* variable.c (classname): the name of class that has
	  non class id should not be nil. This bug was introduced
	  in r36577.

	* test/thread/test_cv.rb: test for change.

Sat Sep  7 13:29:22 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* lib/find.rb (Find.find): respect the encodings of arguments.
	  [ruby-dev:47530] [Feature #8657]

	* test/test_find.rb: add tests.

Sat Sep  7 10:40:32 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb (TCP_FASTOPEN): Defined for TCP fast open.
	  [ruby-core:57048] [Feature #8871] patch by Masaki Matsushita.

Fri Sep  6 23:53:31 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can't
	  require extension libraries. The patch is from nobu
	  (Nobuyoshi Nakada).

	* ext/thread/extconf.rb: for build ext/thread/thread.c.

	* include/ruby/intern.h: ditto.

	* thread.c: ditto.

	* lib/thread.rb: removed and replaced by ext/thread/thread.c.

	* ext/thread/thread.c: Queue, SizedQueue and ConditionVariable
	  implementations in C. This patch is based on patches from panaggio
	  (Ricardo Panaggio) and funny_falcon (Yura Sokolov) and  ko1
	  (Koichi Sasada). [ruby-core:31513] [Feature #3620]

	* test/thread/test_queue.rb (test_queue_thread_raise): add a test for
	  ensuring that killed thread should be removed from waiting threads.
	  It is based on a code by ko1 (Koichi Sasada). [ruby-core:45950]

Fri Sep  6 22:47:12 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Define ac_cv_func_clock_getres to yes for mingw*.

Fri Sep  6 21:04:10 2013  Tanaka Akira  <akr@fsij.org>

	* rational.c: Include gmp.h if GMP is used.
	  (GMP_GCD_DIGITS): New macro.
	  (rb_gcd_gmp): New function.
	  (f_gcd_normal): Renamed from f_gcd.
	  (rb_gcd_normal): New function.
	  (f_gcd): Invoke rb_gcd_gmp or f_gcd_normal.

	* internal.h (rb_gcd_normal): Declared.
	  (rb_gcd_gmp): Ditto.

	* ext/-test-/rational: New directory.

	* test/-ext-/rational: New directory.

Fri Sep  6 14:23:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (clock_getres): required as well as clock_gettime().
	  [ruby-dev:47699] [Bug #8869]

Fri Sep  6 11:45:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (rb_econv_append): new function to append a string data
	  with converting its encoding.  split from rb_econv_substr_append.

Fri Sep  6 02:37:22 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when
	  strings start with special characters.
	  https://github.com/tenderlove/psych/issues/157

	* test/psych/test_string.rb: test for change.

Fri Sep  6 00:05:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rewrite_cref_stack): remove recursion.

Thu Sep  5 18:05:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* string.c (fstring_cmp): take string encoding into account when
	  comparing fstrings [ruby-core:57037] [Bug #8866]

	* test/ruby/test_string.rb: add test

Thu Sep  5 17:25:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_fstring, rb_str_free): use st_data_t instead of VALUE.

	* string.c (rb_fstring): get rid of duplicating already frozen object.

Thu Sep  5 14:01:22 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/optparse.rb:  The Integer acceptable now allows binary and
	  hexadecimal numbers per the documentation.  [ruby-trunk - Bug #8865]

	  DecimalInteger, OctalInteger, DecimalNumeric now validate their input
	  before converting to a number.  [ruby-trunk - Bug #8865]

	* test/optparse/test_acceptable.rb:  Tests for the above, tests for all
	  numeric acceptables for existing behavior.

Thu Sep  5 13:49:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* include/ruby/ruby.h: add RSTRING_FSTR flag

	* internal.h: add rb_fstring() prototype

	* string.c (rb_fstring): deduplicate frozen string literals

	* string.c (rb_str_free): delete fstrings from frozen_strings table when
	  they are GC'd

	* string.c (Init_String): initialize frozen_strings table

Thu Sep  5 12:48:00 2013  Kenta Murata  <mrkn@cookpad.com>

	* configure.in (with_gmp): set with_gmp no if it is empty.

Thu Sep  5 10:41:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm_insnhelper.c (vm_getivar): use class sequence to check class
	  identity, instead of pointer + vm state

	* vm_insnhelper.c (vm_setivar): ditto

Thu Sep  5 08:20:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (GMP_DIV_DIGITS): New macro.
	  (bary_divmod_gmp): New function.
	  (rb_big_divrem_gmp): Ditto.
	  (bary_divmod_branch): Ditto.
	  (bary_divmod): Use bary_divmod_branch.
	  (bigdivrem): Ditto.

	* internal.h (rb_big_divrem_gmp): Declared.

Thu Sep  5 06:22:42 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_divmod_normal): Reduce temporary array allocations.

Thu Sep  5 02:17:06 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_divrem_normal): Add GC guards.

Thu Sep  5 00:38:32 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_divrem_normal): New function.

	* internal.h (rb_big_divrem_normal): Declared.

	* ext/-test-/bignum/div.c: New file.

	* test/-ext-/bignum/test_div.rb: New file.

Thu Sep  5 00:08:44 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_normal): Removed.
	  (bary_divmod_normal): New function.
	  (bary_divmod): Use bary_divmod_normal.
	  (bigdivrem): Use bary_divmod_normal.

Wed Sep  4 23:02:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Useless declaration removed.

Wed Sep  4 22:56:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (NUM_STEP_GET_INF): split from NUM_STEP_SCAN_ARGS(), since
	  inf is not used in num_step_size().

Wed Sep  4 20:22:43 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_normal): Add assertions.

Wed Sep  4 19:18:40 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (vm_state_version_t): prefer LONG_LONG to uint64_t.

Wed Sep  4 16:28:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (vm_state_version_t): use uint64_t when it is larger than
	  LONG_LONG, and fallback to unsigned long.

Wed Sep  4 15:37:05 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* enc/trans/utf8_mac-tbl.rb: fix r42789.
	  Fix conversion table and logic. [ruby-dev:47680]

Wed Sep  4 14:08:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* class.c, compile.c, eval.c, gc.h, insns.def, internal.h, method.h,
	  variable.c, vm.c, vm_core.c, vm_insnhelper.c, vm_insnhelper.h,
	  vm_method.c: Implement class hierarchy method cache invalidation.

	  [ruby-core:55053] [Feature #8426] [GH-387]

Wed Sep  4 11:13:40 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_gsub): use BEG(0) for whole matched position not
	  return value from rb_reg_search(), for \K matching.
	  [ruby-dev:47694] [Bug #8856]

Wed Sep  4 11:11:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (SOLIBS): LIBRUBY_SO also needs linking with gmp, to
	  run worker processes in test-all on non-ELF platforms.

Tue Sep  3 23:01:41 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/parser/test_tree.rb
	  (TestTreeParser::TestInvalid#test_unmatched_close_tag):
	  Compute expected value from test value.

Tue Sep  3 22:59:58 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
	  Add source information to parse exception on no close tag error.
	  [Bug #8844]  [ruby-dev:47672]
	  Patch by Ippei Obayashi. Thanks!!!
	* test/rexml/parser/test_tree.rb: Add a test for the above case.

Tue Sep  3 22:57:57 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/parser/test_tree.rb: Fix test name to describe test
	  content.

Tue Sep  3 22:54:46 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
	  Remove needless nested parse exception information.
	  [Bug #8844]  [ruby-dev:47672]
	  Reported by Ippei Obayashi. Thanks!!!
	* test/rexml/parser/test_tree.rb: Add a test for the above case.

Tue Sep  3 22:03:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_enc_str_new_cstr): new function to create a string from
	  the C-string pointer with the specified encoding.

Tue Sep  3 21:41:37 2013  Akira Matsuda  <ronnie@dio.jp>

	* eval.c (Init_eval): Make Module#include and Module#prepend public
	  [Feature #8846]

	* test/ruby/test_module.rb (class TestModule): Test for above

Tue Sep  3 21:35:19 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (sys/dyntune.h): for gettune().

	* thread_pthread.c (hpux_attr_getstackaddr): fix missing *.
	  [ruby-core:56983] [Feature #8793]

Tue Sep  3 20:12:46 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (GMP_STR2BIG_DIGITS): New macro.
	  (str2big_gmp): New function.
	  (rb_cstr_to_inum): Use str2big_gmp for big bignums.
	  (rb_str2big_gmp): New function.

	* internal.h (rb_str2big_gmp): Declared.

Tue Sep  3 19:44:40 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/win32/lib/win32/registry.rb (Win32::Registry#values): added.
	  [Feature #7763] [ruby-core:51783]

Tue Sep  3 18:26:00 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/inf-ruby.el (inf-ruby-keys, run-ruby): Add magic autoload
	  comments.

	* misc/rdoc-mode.el (rdoc-mode): Ditto.

	* misc/ruby-electric.el (ruby-electric-mode): Ditto.

	* misc/ruby-style.el (ruby-style-c-mode): Ditto.

Tue Sep  3 17:06:15 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_rubyoptions.rb
	  (TestRubyOptions::SEGVTest::ExpectedStderr): the URL was changed at
	  r42800.

Tue Sep  3 14:48:25 2013  Zachary Scott  <e@zzak.io>

	* lib/thread.rb: [DOC] CV#wait typo by @avdi [Fixes GH-386]
	  https://github.com/ruby/ruby/pull/386

Tue Sep  3 14:37:53 2013  Zachary Scott  <e@zzak.io>

	* error.c: [DOC] Update bug tracker url by @ScotterC [Fixes GH-390]
	  https://github.com/ruby/ruby/pull/390

Tue Sep  3 12:45:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_str2big_poweroftwo): New function.
	  (rb_str2big_normal): Ditto.
	  (rb_str2big_karatsuba): Ditto.

	* internal.h (rb_str2big_poweroftwo): Declared.
	  (rb_str2big_normal): Ditto.
	  (rb_str2big_karatsuba): Ditto.

	* ext/-test-/bignum/str2big.c: New file.

	* test/-ext-/bignum/test_str2big.rb: New file.

	* ext/-test-/bignum/depend: Add the dependency for str2big.c.

Tue Sep  3 12:09:08 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): Support times() based monotonic clock.
	  (rb_clock_getres): Ditto.

Tue Sep  3 12:03:02 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (str2big_scan_digits): Extracted from rb_cstr_to_inum.

Tue Sep  3 11:23:57 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_select_with_thread): rounding up the fraction of
	  tv_usec instead of rounding down.
	  this change is an experiment to get rid of failures on vc10-x64 CI.

Tue Sep  3 11:00:28 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (do_select): constify timeout.

	* win32/win32.c (rb_w32_select_with_thread): constify 10ms wait and
	  0ms wait structs.

Tue Sep  3 10:03:42 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/openssl/test_pair.rb
	  (OpenSSL::TestPair#test_write_nonblock_no_exceptions): on some CIs
	  such as Debian 6.0, Ubuntu 10.04, CentOS and vc10-x64 (maybe depend
	  on OpenSSL version), writing to SSLSocket after SSL_ERROR_WANT_WRITE
	  causes SSL_ERROR_SSL "bad write retry".

Tue Sep  3 08:20:46 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* enc/trans/utf8_mac-tbl.rb: update conversion table to recent OS X.
	  Previous table is used on Mac OS X 10.1 or prior.
	  This table is used on 10.2 or later. [ruby-dev:47680]

Tue Sep  3 07:49:25 2013  Akinori MUSHA  <knu@iDaemons.org>

	* numeric.c (NUM_STEP_SCAN_ARGS): On second thought, keep
	  Numeric#step backward compatible in that it raises TypeError
	  when nil is given as second argument.

	* test/ruby/test_float.rb (TestFloat#test_num2dbl): Revert.

	* test/ruby/test_numeric.rb (TestNumeric#test_step): Fix test
	  cases for the above change.

Tue Sep  3 07:39:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bytes_2comp): Define it only for little endian
	  environment.

Tue Sep  3 07:31:29 2013  Akinori MUSHA  <knu@iDaemons.org>

	* numeric.c (NUM_STEP_SCAN_ARGS): Numeric#step should raise
	  TypeError if a non-numeric parameter is given.

	* test/ruby/test_float.rb (TestFloat#test_num2dbl): Allow nil as
	  step, as with the keyword argument.

	* test/ruby/test_numeric.rb (TestNumeric#test_step): Add tests for
	  nil as step or limit.

Tue Sep  3 07:28:49 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (bit_length): Add casts to fix compilation error with
	  clang 3.0 -Werror,-Wshorten-64-to-32.
	  [ruby-dev:47687] reported by SASADA Koichi.

Tue Sep  3 03:17:26 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_search_super_method): use ci->argc instead of
	  ci->orig_argc. ci->argc can be changed by splat arguments.
	  [ruby-list:49575]
	  This fix should be applied to Ruby 2.0.0 series.

	* test/ruby/test_super.rb: add a test for above.

Mon Sep  2 23:46:29 2013  Akinori MUSHA  <knu@iDaemons.org>

	* numeric.c (num_step): Default the limit argument to infinity and
	  allow it to be omitted.  Keyword arguments (by: and to:) are
	  introduced for ease of use. [Feature #8838] [ruby-dev:47662]
	  [ruby-dev:42194]

	* numeric.c (num_step): Optimize for infinite loop.

Mon Sep  2 22:55:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (ISDIGIT): Unused macro removed.

Mon Sep  2 22:49:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (str2big_poweroftwo): Extracted from rb_cstr_to_inum.
	  (str2big_normal): Ditto.
	  (str2big_karatsuba): Ditto.

Mon Sep  2 14:39:29 2013  Akinori MUSHA  <knu@iDaemons.org>

	* ruby.c (Process#setproctitle): [DOC] Fix and improve rdoc.

	* ruby.c (Process#argv0): [DOC] Improve rdoc.

Mon Sep  2 14:15:00 2013  Kenta Murata  <mrkn@cookpad.com>

	* NEWS: fix description of number literal suffixes.

Mon Sep  2 14:01:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* test/rake/test_rake_rules.rb: add space after string literal to
	  prevent conflict with string options syntax "foo"opts

	* test/rss/rss-assertions.rb: ditto

Mon Sep  2 12:28:38 2013  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_bignum.rb (test_interrupt_during_to_s): Disable it
	  when GMP is used.

Mon Sep  2 07:02:10 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used.

Mon Sep  2 01:46:14 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_generic): Reduce arguments.
	  (big2str_gmp): Ditto.
	  (rb_big2str1): Follow the above change.

Mon Sep  2 00:08:08 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (get_mach_timebase_info): Extracted from rb_clock_gettime.
	  (rb_clock_gettime): Use get_mach_timebase_info.
	  (rb_clock_getres): Support MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC.

Sun Sep  1 23:30:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (GMP_BIG2STR_DIGITS): New constant.
	  (big2str_gmp): New function.
	  (rb_big2str1): Use big2str_gmp for big bignums.

	* internal.h (rb_big2str_gmp): Declared.

	* ext/-test-/bignum/big2str.c (big2str_gmp): New method.

Sun Sep  1 22:37:51 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_gmp): Use mpz_init and mpz_clear instead of
	  mpz_inits and mpz_clears.
	  Older GMP don't have them.

Sun Sep  1 21:17:54 2013  Tanaka Akira  <akr@fsij.org>

	* test/net/http/test_http.rb (test_bind_to_local_port): Choose an open
	  port more reliably.

Sun Sep  1 20:32:40 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_base_poweroftwo): Renamed from
	  big2str_base_powerof2.
	  (rb_big2str_poweroftwo): New function for test.
	  (big2str_generic): Extracted from rb_big2str1.
	  (rb_big2str_generic): New function for test.

	* internal.h (rb_big2str_poweroftwo): Declared.
	  (rb_big2str_generic): Ditto.

	* ext/-test-/bignum/big2str.c: New file.

	* test/-ext-/bignum/test_big2str.rb: New file.

Sun Sep  1 15:21:21 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_2bdigits): Renamed from big2str_orig.

Sun Sep  1 13:02:24 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Remove BITSPERDIG >= INT_MAX test.  The static assertion,
	  SIZEOF_BDIGITS <= sizeof(BDIGIT) is enough.

Sun Sep  1 11:38:26 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (maxpow_in_bdigit): Removed.

Sun Sep  1 10:30:42 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (rb_fix_bit_length): Moved from bignum.c.

Sun Sep  1 09:55:45 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (bit_length): Moved from bignum.c.
	  (nlz_int): Ditto.
	  (nlz_long): Ditto.
	  (nlz_long_long): Ditto.
	  (nlz_int128): Ditto.

Sun Sep  1 03:32:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bit_length): Renamed from bitsize.

Sun Sep  1 00:07:09 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_bit_length): New method.
	  (rb_fix_bit_length): Ditto.
	  [ruby-core:56247] [Feature #8700]

Sat Aug 31 22:18:29 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_getres): New method.
	  (timetick2dblnum_reciprocal): New function.

	* configure.in: Check clock_getres.

	[ruby-core:56780] [Feature #8809] accepted as a CRuby feature at
	DevelopersMeeting20130831Japan
	https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130831Japan

Sat Aug 31 21:02:07 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Use GMP to accelerate big Bignum multiplication.
	  (bary_mul_gmp): New function.
	  (bary_mul): Use bary_mul_gmp.
	  (bigsq): Use different threshold with GMP.

	* configure.in: Detect GMP.

	[ruby-core:56658] [Feature #8796]

Sat Aug 31 15:03:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2

	* insns.def (opt_regexpmatch2): use CALL_SIMPLE_METHOD to call =~ if
	  the receiver is not a T_STRING [Bug #8847] [ruby-core:56916]

Sat Aug 31 14:07:11 2013  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb (random_bytes): Use Process.clock_gettime.

Sat Aug 31 00:25:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/encoding.h (rb_{ascii8bit,utf8,usascii}_encindex): get
	  rid of conflict with macros defined in internal.h.

Fri Aug 30 22:37:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (native_thread_init_stack): wait the creator thread
	  to fill machine stack info, if get_stack_of() is available.

	* thread_pthread.c (native_thread_create): fill the created thread
	  stack info after starting, if get_stack_of() is available.

	* thread_pthread.c (native_thread_create): define attr only if it is
	  used, and merge pthread_create() calls.

	* thread_pthread.c (get_main_stack): separate function to get stack of
	  main thread.

Thu Aug 29 18:05:33 2013  Koichi Sasada  <ko1@atdot.net>

	* struct.c (rb_struct_define_without_accessor_under): added.
	  This function is similar to rb_define_class_under() against
	  rb_define_class().

	* include/ruby/intern.h: add a declaration of this function.

Thu Aug 29 17:03:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): a method entry refers the based
	  class/module, so should search superclass from the origin i-class
	  where the entry belongs to, to get rid of infinite loop when zsuper
	  in a prepended class/module.  [ruby-core:54105] [Bug #8238]

Thu Aug 29 05:35:58 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/zlib/zlib.c (zstream_run):  Fix handling of deflate streams that
	  need a dictionary but are being decompressed by Zlib::Inflate.inflate
	  (which has no option to set a dictionary).  Now Zlib::NeedDict is
	  raised instead of crashing.  [ruby-trunk - Bug #8829]
	* test/zlib/test_zlib.rb (TestZlibInflate):  Test for the above.

Thu Aug 29 02:40:45 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be
	  treated as strings.
	  https://github.com/tenderlove/psych/issues/156

	* test/psych/test_string.rb: test for change

Wed Aug 28 17:20:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (hpux_attr_getstackaddr): basic support for the
	  get_stack() under HP-UX.  based on the patch by michal@rokos.cz
	  (Michal Rokos) at [ruby-core:56645].  [Feature #8793]

Wed Aug 28 11:24:20 2013  Michal Rokos  <michal@rokos.cz>

	* configure.in (sys/pstat.h): fix missing header check for
	  missing/setproctitle.c on HP-UX.  [ruby-core:56644] [Bug #8792]

Wed Aug 28 04:54:33 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_ssl.c (ossl_ssl_read):  Replace duplicate
	  wait_writable with wait_readable.

Tue Aug 27 17:18:40 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (Timeout#timeout): skip rescue clause only when no
	  exception class is given.

Tue Aug 27 17:02:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (copy_stream_body): should write in binary mode.  based on a
	  patch by godfat (Lin Jen-Shin) at [ruby-core:56556].
	  [ruby-core:56518] [Bug #8767]

Tue Aug 27 17:02:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (copy_stream_body): move common open flags.

Tue Aug 27 16:56:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (enumerator_size): use rb_check_funcall() instead of
	  respond_to? and call.

	* enumerator.c (enumerator_each): ensure that argument array size
	  does not overflow at appending.

Tue Aug 27 16:46:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_index, rb_ary_rindex): use optimized equality to
	  improve performance.  [Feature #8820]

	* vm_insnhelper.c (rb_equal_opt): optimized equality function.

Tue Aug 27 16:11:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (opt_eq_func): use RBASIC_CLASS() instead of HEAP_CLASS_OF().

	* insns.def (opt_plus, opt_minus, opt_mult, opt_div, opt_mod, opt_lt),
	  (opt_gt, opt_ltlt, opt_aref, opt_aset, opt_length, opt_size),
	  (opt_empty_p, opt_succ): ditto.

Tue Aug 27 16:08:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_check_funcall, rb_check_funcall_with_hook): constify
	  argv.

Tue Aug 27 13:03:33 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/stringio/stringio.c (strio_read_nonblock): declare local
	  variables at the first of function.

Tue Aug 27 11:51:37 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* enumerator.c: Allow Enumerator size argument to be any callable.
	  Patch by Avdi Grimm. [bug #8641] [ruby-core:56032] [fix GH-362]

	* test/ruby/test_enumerator.rb: Test for above

Tue Aug 27 11:46:31 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_clear): do rest_sweep() before clearing
	  profile.current_record.

Tue Aug 27 07:35:05 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* io.c (io_read_nonblock): support non-blocking reads without raising
	  exceptions. As in: `io.read_nonblock(size, exception: false)`
	  [ruby-core:38666] [Feature #5138]
	* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): ditto
	* ext/stringio/stringio.c (strio_sysread): ditto
	* io.c (rb_io_write_nonblock): support non-blocking writes without
	  raising an exception.
	* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): ditto
	* test/openssl/test_pair.rb (class OpenSSL): tests
	* test/ruby/test_io.rb (class TestIO): ditto
	* test/socket/test_nonblock.rb (class TestSocketNonblock): ditto
	* test/stringio/test_stringio.rb (class TestStringIO): ditto

Tue Aug 27 05:24:34 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems 2.1.0 Release Candidate
	* test/rubygems:  ditto.

Mon Aug 26 16:24:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_nextc): warn carriage return in middle of line.
	  [ruby-core:56240] [Feature #8699]

Mon Aug 26 15:27:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (Timeout#timeout): should not be caught by rescue
	  clause.  [Bug #8730]

Mon Aug 26 14:44:26 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB because
	  there are not new relations.

	* enum.c (enum_sort_by): ditto.

	* struct.c (setup_struct): use RARRAY_RAWPTR().

	* vm_eval.c (yield_under): ditto.

	* ext/pathname/pathname.c (path_entries): use RARRAY_AREF().

	* ext/pathname/pathname.c (path_s_glob): ditto.

Mon Aug 26 13:11:10 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* array.c (ary_ensure_room_for_push): fix typo in r42658.

Mon Aug 26 12:37:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/sizes.c.tmpl: generate automatically by extracting
	  RUBY_CHECK_SIZEOF from configure.in.

Mon Aug 26 10:16:59 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* process.c (gcd_timetick_int): Renamed from gcd_timtick_int.

Sun Aug 25 21:02:15 2013  Tanaka Akira  <akr@fsij.org>

	* sizes.c (Init_sizes): Define the size of clock_t.

Sun Aug 25 01:47:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BARY_SHORT_MUL): Renamed from BARY_MUL1.
	  (bary_short_mul): Renamed from bary_mul1.

Sat Aug 24 10:35:09 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): The emulated clock names changed.

Fri Aug 23 22:22:07 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): Add a cast to fix compile error by
	  -Werror,-Wshorten-64-to-32.

Fri Aug 23 22:12:13 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_intern): no symbol cache while initialization.

Fri Aug 23 22:07:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (clock_t): needs time.h.

Fri Aug 23 21:37:28 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (reduce_factors): New function.
	  (timetick2dblnum): Use reduce_factors.
	  (timetick2integer): Ditto.
	  (make_clock_result): Follow the above change.
	  (rb_clock_gettime): Ditto.

Fri Aug 23 21:00:55 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (timetick_int_t): Renamed from timetick_giga_count_t.
	  (gcd_timtick_int): Renamed from gcd_ul and make the arguments
	  timetick_giga_count_t.
	  (reduce_fraction): Make the arguments timetick_int_t.
	  (timetick2integer): Ditto.
	  (make_clock_result): Ditto.
	  (timetick2dblnum): Fix the return type.
	  (rb_clock_gettime): Use timetick_int_t.

Fri Aug 23 20:50:40 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (gcd_ul): New function.
	  (reduce_fraction): Ditto.
	  (reduce_fraction): Ditto.
	  (timetick2dblnum): Ditto.
	  (timetick2integer): Ditto.
	  (make_clock_result): Use timetick2dblnum and timetick2integer.
	  (rb_clock_gettime): Follow the make_clock_result change.

Fri Aug 23 18:39:04 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_make_shared): shared ary as shady. Need more effort to
	  make it normal object.

	* array.c (rb_ary_modify): use RARRAY_PTR_USE() without WB because
	  there are not new relations.

	* array.c (ary_ensure_room_for_unshift): use RARRAY_RAWPTR() because
	  there are not new relations.

Fri Aug 23 11:25:57 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c: introduce ARY_SHARED_OCCUPIED(shared).

Fri Aug 23 11:07:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (config.h): now SIZEOF_CLOCK_T is needed for
	  unsigned_clock_t.

Thu Aug 22 22:01:04 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): Strip "s" from unit names.

Thu Aug 22 20:14:59 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (unsigned_clock_t): Defined.
	  (rb_clock_gettime): Consider clock_t overflow for
	  ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID.

	* configure.in: Check the size of clock_t.

Thu Aug 22 16:22:48 2013  Koichi Sasada  <ko1@atdot.net>

	* compile.c (build_postexe_iseq): fix to setup the local table.

Thu Aug 22 15:42:43 2013  Koichi Sasada  <ko1@atdot.net>

	* compile.c (rb_iseq_compile_node): accept NODE_IFUNC to support
	  custom compilation.

	* compile.c (NODE_POSTEXE): compile to
	  "ONCE{ VMFrozenCore::core#set_postexe{...} }" with a new custom
	  compiler `build_postexe_iseq()'.

	* vm.c (m_core_set_postexe): remove parameters (passed by a block).

Thu Aug 22 06:54:15 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): Change emulation symbols for
	  Process.clock_gettime.

Thu Aug 22 06:24:54 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (make_clock_result): Extracted from rb_clock_gettime.

Wed Aug 21 22:30:51 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): clock() based CLOCK_PROCESS_CPUTIME_ID
	  emulation implemented.

Wed Aug 21 21:02:37 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_proc_times): Use RB_GC_GUARD to guard objects from GC.

Wed Aug 21 20:33:01 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (get_clk_tck): Extracted from rb_proc_times.
	  (rb_clock_gettime): times() based CLOCK_PROCESS_CPUTIME_ID emulation
	  is implemented.

Wed Aug 21 19:31:48 2013  Tanaka Akira  <akr@fsij.org>

	* process.c: POSIX_GETTIMEOFDAY_CLOCK_REALTIME is renamed to
	  SUS_GETTIMEOFDAY_CLOCK_REALTIME.

Wed Aug 21 19:17:46 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): CLOCK_PROCESS_CPUTIME_ID emulation
	  using getrusage is implemented.

Wed Aug 21 17:34:27 2013  Tanaka Akira  <akr@fsij.org>

	* gc.c (getrusage_time): Fallback clock_gettime to getrusage when
	  clock_gettime fails.
	  Reported by Eric Saxby.  [ruby-core:56762] [Bug #8805]

Wed Aug 21 02:32:32 2013  Koichi Sasada  <ko1@atdot.net>

	* insns.def: fix regexp's once option behavior.
	  fix [ruby-trunk - Bug #6701]

	* insns.def: remove `onceinlinecache' and introduce `once' instruction.
	  `once' doesn't use `setinlinecache' insn any more.

	* vm_core.h: `union iseq_inline_storage_entry' to store once data.

	* compile.c: catch up above changes.

	* iseq.c: ditto.

	* vm.c, vm_insnhelper.c: ditto. fix `m_core_set_postexe()' which
	  is depend on `onceinlinecache' insn.

	* test/ruby/test_regexp.rb: add tests.

	* iseq.c: ISEQ_MINOR_VERSION to 1 (should increment major?)

Wed Aug 21 02:30:15 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_gcdebug_print_obj_condition): add printing information.

Tue Aug 20 13:38:00 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris.
	  On Solaris (and platforms which do not have flock and have lockf),
	  with GDBM 1.10, gdbm_open(3) blocks when opening already locked
	  gdbm file. [Bug #8790] [ruby-dev:47631]

Tue Aug 20 02:32:52 2013  Zachary Scott  <e@zzak.io>

	* lib/test/: [DOC] Document Test::Unit, hide most submodules and
	  classes from rdoc. Since lib/test is only present as a compatibility
	  layer with the legacy test suite many test/unit users will be using
	  minitest or the test/unit gem instead. It is recommended to use one
	  of these alternatives for writing new tests.

	  This patch was based on a patch submitted by Steve Klabnik.
	  [ruby-core:56694] [Bug #8778]

Tue Aug 20 02:10:19 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/rss.rb: [DOC] Document for constants by Steve Klabnik
	  [ruby-core:56705] [Bug #8798]

Tue Aug 20 02:01:10 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/xmlparser.rb: [DOC] Hide legacy constant from rdoc
	  Patch by Steve Klabnik [ruby-core:56708] [Bug #8799]

Tue Aug 20 01:52:05 2013  Zachary Scott  <e@zzak.io>

	* ext/socket/unixserver.c: [DOC] Document #accept
	* ext/socket/tcpserver.c: ditto
	* ext/socket/udpsocket.c: [DOC] Fix indentation of documentation
	* ext/socket/socket.c: ditto
	  Patches by David Rodr'iguez [ruby-core:56734] [Bug #8802]

Tue Aug 20 01:19:22 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Define ac_cv_func_clock_gettime to yes for mingw*.

Mon Aug 19 21:31:35 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h: Fix a compilation error with
	  i586-mingw32msvc-gcc of gcc-mingw32 package on Debian squeeze.
	  ruby/missing.h should be included before include/ruby/win32.h
	  because struct timespec, used in the clock_gettime declaration in
	  include/ruby/win32.h, is defined in ruby/missing.h instead of
	  system headers.

Mon Aug 19 20:55:12 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix around GC_DEBUG.

	* gc.c (RVALUE::line): should be VALUE. On some environment
	  (such as mswin64), `int' introduces alignment mismatch.

	* gc.c (newobj_of): add an assertion to check VALUE alignment.

	* gc.c (aligned_malloc): `&' is low priority than `=='.

	* gc.c: define GC_DEBUG everytime and use it as value 0 or 1.

Mon Aug 19 17:43:44 2013  Koichi Sasada  <ko1@atdot.net>

	* test/ruby/test_fiber.rb: collect garbage fibers immediately.

Mon Aug 19 17:41:49 2013  Koichi Sasada  <ko1@atdot.net>

	* test/profile_test_all.rb: add `failed?' information.

Mon Aug 19 17:00:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (retry_fork): retry with GC if ENOMEM occurred, to free
	  swap/kernel space.

Mon Aug 19 13:28:47 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/win32.h (CLOCK_MONOTONIC): typo.

	* win32/win32.c: removed duplicated declarations.

Mon Aug 19 13:03:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (clock_gettime): should not overwrite cache variable
	  with different condition.  otherwise -lrt is not linked and the link
	  fails, after reconfig.

Mon Aug 19 12:56:49 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (Init_process): Add constants: CLOCK_REALTIME_ALARM and
	  CLOCK_BOOTTIME_ALARM.

Sun Aug 18 20:17:41 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* variable.c, vm_method.c: remove dead code.

	* test/ruby/test_fiber.rb, test/ruby/test_thread.rb:
	  change accordingly.

Sun Aug 18 19:32:26 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* error.c, file.c, gc.c, hash.c, thread.c, variable.c, vm_eval.c, bin/erb:
	  $SAFE=4 is obsolete.

Sun Aug 18 14:30:47 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): Rename POSIX_TIME_CLOCK_REALTIME to
	  ISO_C_TIME_CLOCK_REALTIME.

Sun Aug 18 14:22:45 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Revert r42604.  It causes linking librt on systems
	  with newer glibc uselessly.

Sun Aug 18 13:18:38 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (Init_process): Add constants: CLOCK_REALTIME_COARSE,
	  CLOCK_MONOTONIC_COARSE and CLOCK_BOOTTIME.

Sun Aug 18 12:41:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (clock_gettime): need to check with -lrt prior to check
	  for the function only.  otherwise -lrt is not linked and the link
	  fails, when ac_cv_func_clock_gettime is cached as yes.

Sun Aug 18 10:05:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2str1): Make an expression more explicit.

Sun Aug 18 03:18:45 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2str1): Use power_level instead of bitsize(xn).

Sun Aug 18 00:44:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BIGDIVREM_EXTRA_WORDS): Redefine to 1.
	  (bigdivrem_num_extra_words): Removed.
	  (bigdivrem_normal): Simplified.
	  (big2str_karatsuba): Ditto.

Sat Aug 17 23:25:19 2013  Benoit Daloze  <eregontp@gmail.com>

	* test/ruby/test_time.rb: use the in_timezone() helper
	  and define it at the top with other helpers.

Sat Aug 17 22:20:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_mload): ignore auxiliary data, offset and zone, if
	  invalid.  [ruby-core:56648] [Bug #8795]

Sat Aug 17 20:11:49 2013  Benoit Daloze  <eregontp@gmail.com>

	* process.c: [DOC] MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC is an
	  available emulation for a monotonic clock on Darwin.
	  https://developer.apple.com/library/mac/qa/qa1398/_index.html

Fri Aug 16 18:12:05 2013  Koichi Sasada  <ko1@atdot.net>

	* test/profile_test_all.rb: fix typo.

Fri Aug 16 18:09:20 2013  Koichi Sasada  <ko1@atdot.net>

	* test/profile_test_all.rb: remove space characters from test names.

Fri Aug 16 17:32:02 2013  Koichi Sasada  <ko1@atdot.net>

	* test/profile_test_all.rb: refactoring memory profiling tool for
	  test-all.
	  Add profiling targets /proc/meminfo and /proc/self/status.

	* test/runner.rb: accept other than 'true'.

Fri Aug 16 11:23:35 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (rb_file_size, rb_file_flock): improve performance of Windows.

	* file.c (rb_file_truncate): removed unnecessary #ifdef.

	* test/test_file.rb (TestFile#test_truncate_size): added an assertion
	  for File#size.

Fri Aug 16 10:07:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_single1): Renamed from bigdivrem_single.  Add
	  x_higher_bdigit argument.
	  (bigdivrem_single): Just call bigdivrem_single1.
	  (bigdivrem_restoring): Use bigdivrem_single1 to avoid memmove.

Fri Aug 16 09:17:00 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_small_rshift): Specify the higher BDIGIT instead of
	  sign bit.
	  (big_shift3): Follow the above change.

Fri Aug 16 02:20:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_toom3): Reduce a branch.

Fri Aug 16 02:14:09 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* process.c (rb_clock_gettime): add CLOCK_MONOTONIC support on OS X.
	  http://developer.apple.com/library/mac/qa/qa1398/_index.html
	  [Feature #8658]

Fri Aug 16 01:37:43 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_single): Use shift when y is a power of two.

Fri Aug 16 01:09:33 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_restoring): Use bigdivrem_single if non-topmost
	  BDIGITs of y are zero.

Fri Aug 16 00:33:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2str1): Truncate topmost zeros of x.

Fri Aug 16 00:00:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_divmod): Simplify an expression.

Thu Aug 15 23:26:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_normal): Remove a local variable.

Thu Aug 15 23:08:32 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_karatsuba): Use bigdivrem_restoring directly to
	  reduce working buffer and memory copy.
	  (rb_big2str1): Allocate working buffer for big2str_karatsuba here.

Thu Aug 15 20:51:29 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c, internal.h (rb_io_flush_raw): new function to select calling
	  fsync() (on Windows).

	* io.c (rb_io_flush_raw): use above function.

	* file.c (rb_file_truncate): use above function.

	* test/ruby/test_file.rb (TestFile#test_truncate_size): test for
	  above changes.

Thu Aug 15 18:39:31 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (clock_gettime): improve precision when freq is less
	  than and nearly equals 10**9.

Thu Aug 15 17:43:15 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_lazy_sweep): remove heap_increment() here because heap_inc
	  may be 0.

Thu Aug 15 16:59:56 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_io_rewind): remove fsync() for Windows to improve the
	  performance.

Thu Aug 15 16:30:23 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):
	  FileUtils.rmdir ignores Errno::ENOTEMPTY, so, in such cases, this
	  assertion is nonsense.

Thu Aug 15 15:49:35 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): [DOC] FreeBSD 7.1 supports
	  CLOCK_THREAD_CPUTIME_ID.
	  http://www.freebsd.org/releases/7.1R/relnotes.html

Thu Aug 15 14:30:23 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/win32.h, win32/Makefile.sub, win32/win32.c
	  (clock_gettime): [experimental] emulates clock_gettime(2) of posix.

Thu Aug 15 02:32:40 2013  Zachary Scott  <e@zzak.io>

	* hash.c (rb_hash_aset): [DOC] Document key dup patch by @kachick
	  [Fixes GH-382] https://github.com/ruby/ruby/pull/382

Wed Aug 14 14:28:39 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* proc.c (rb_mod_define_method): now they return the symbols of the
	  defined methods, not the methods/procs themselves.
	  [ruby-dev:42151] [Feature #3753]

	* NEWS: documents about above change and def-expr (see r42337).

	* test/ruby/test_module.rb: tests about above change.

Wed Aug 14 00:51:14 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_restoring): xn argument removed.
	  (bigdivrem_normal): Follow the above change.

Wed Aug 14 00:18:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_div_struct): Remove xn and j field.  Add zn field.
	  (bigdivrem1): Follow the above change.
	  (bigdivrem_restoring): Ditto.

Tue Aug 13 23:38:17 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_div_struct): ynzero field removed.
	  (bigdivrem1): Follow the above change.
	  (bigdivrem_restoring): Ditto.

Tue Aug 13 23:01:16 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_restoring): Extracted from bigdivrem_normal.

Tue Aug 13 22:12:59 2013  Kenichi Kamiya  <kachick1@gmail.com>

	* random.c (rb_random_ulong_limited): coerce before check negative.
	  [Fixes GH-379]

Tue Aug 13 21:52:15 2013  Kenichi Kamiya  <kachick1@gmail.com>

	* object.c (Init_Object): undef Module#prepend_features on Class, as
	  well as Module#append_features.  [Fixes GH-376]

	* test_class.rb: Added test for above. And ensure type checking
	  on similar methods as module_function.

Tue Aug 13 08:52:18 2013  Zachary Scott  <e@zzak.io>

	* doc/syntax/literals.rdoc: [DOC] String literal concat by @cknadler
	  [Fixes GH-380] https://github.com/ruby/ruby/pull/380

Mon Aug 12 23:07:21 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_marks_test): inhibit gc for st's operation.

Mon Aug 12 15:59:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_whole_match_p): treat CR in middle of a line as a
	  mere whitespace.

Mon Aug 12 15:16:58 2013  Koichi Sasada  <ko1@atdot.net>

	* class.c (rb_prepend_module): make T_ICLASS object shady because
	  this T_ICLASS object seems to share method table with other class
	  objects. It was causes WB miss.
	  TODO: need to know the data structure.

	* test/ruby/test_module.rb: add a test for WB miss.

Mon Aug 12 13:47:54 2013  Zachary Scott  <e@zzak.io>

	* process.c: [DOC] RDoc formatting of Process.clock_gettime

Mon Aug 12 13:29:09 2013  Zachary Scott  <e@zzak.io>

	* lib/yaml/dbm.rb: [DOC] Document call-seq for YAML::DBM

Mon Aug 12 12:57:26 2013  Zachary Scott  <e@zzak.io>

	* ext/dbm/extconf.rb: [DOC] Hide from RDoc
	  Some libraries might want to document extconf.rb so RDoc treats it
	  like any other ruby program. However, DBM users shouldn't care about
	  these methods.

Mon Aug 12 12:53:39 2013  Zachary Scott  <e@zzak.io>

	* ext/dbm/dbm.c: [DOC] Reformat headings of DBM class

Mon Aug 12 12:46:31 2013  Zachary Scott  <e@zzak.io>

	* lib/yaml.rb, lib/yaml/: [DOC] Document YAML::DBM#key and add
	  references to similar methods with more detail. This patch brings
	  lib/yaml to 100% documentation coverage.

Mon Aug 12 02:51:32 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (readline_s_set_input): on OS X with editline,
	  Readline.readline doesn't work because readline_get doesn't use
	  rl_getc. The difference is introduced by r42402 [ruby-dev:47509]
	  [Bug #8644]. Before it rb_io_stdio_file set ifp->stdio_file.
	  Therefore add manually setting the value.

	* ext/readline/readline.c (readline_s_set_output): ditto.

Sun Aug 11 23:27:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_str_encode_ospath): OS path encoding on Mac OS X is also
	  fixed.

Sun Aug 11 22:57:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_require.rb (assert_require_nonascii_path): OS path
	  encoding on Windows is fixed, so encoding of __FILE__ should be it.
	  [ruby-core:56498] [Bug #8764]

Sun Aug 11 19:11:45 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/parser/test_sax2.rb: Expand abbreviated class name.

Sun Aug 11 19:06:03 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/sax2listener.rb (REXML::SAX2Listener#notationdecl): Fix
	  wrong number of arguments in the template listener.
	  [Bug #8731] [ruby-dev:47582]
	  Reported by Ippei Obayashi.
	* test/rexml/parser/test_sax2.rb: Add tests for parsing notation
	  declarations with SAX2 API.

Sun Aug 11 18:44:04 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/sax2listener.rb (REXML::SAX2Listener#elementdecl): Fix wrong
	  examples. [Bug #8731] [ruby-dev:47582]
	  Reported by Ippei Obayashi.

Sun Aug 11 18:42:13 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/sax2parser.rb
	  (REXML::Parsers::SAX2Parser#handle_entitydecl): Extract.

Sun Aug 11 18:40:25 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
	  Fix wrong "%" position in parameter entity declaration event argument.
	* test/rexml/parser/test_sax2.rb: Add tests for the above case.

Sun Aug 11 18:08:40 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
	  Support NDATA in external ID entity declaration.
	* test/rexml/parser/test_sax2.rb: Add tests for the above case.

Sun Aug 11 18:07:39 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb
	  (REXML::Parsers::BaseParser#pull_event): Support optional NDATA
	  in external ID entity declaration.

Sun Aug 11 17:54:07 2013  Kouhei Sutou  <kou@cozmixng.org>

	* NEWS (REXML::Parsers::SAX2Parser): Add about this change.
	* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
	  Fix wrong number of arguments. Document says "an array of the
	  entity declaration" but it passes two or more arguments.
	  This is a bug but it break backward compatibility.
	  Reported by Ippei Obayashi. [Bug #8731] [ruby-dev:47582]
	* lib/rexml/sax2listener.rb (REXML::SAX2Listener#entitydecl): ditto.
	  The listener template accepted two arguments.
	* test/rexml/parser/test_sax2.rb: Add tests for external ID case.

Sun Aug 11 17:41:41 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/parser/test_sax2.rb: Add SAX2 API test.

Sun Aug 11 15:10:40 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_enc_symname_type): allow ID_ATTRSET for ID_INSTANCE,
	  ID_GLOBAL, ID_CLASS, ID_JUNK too.  [Bug #8756]

Sun Aug 11 13:17:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* include/ruby/encoding.h: Reduce ENCODING_INLINE_MAX to 127 as this
	  should be sufficient to represent all the encodings Ruby supports.

Sun Aug 11 11:54:38 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (rb_clock_gettime): New method.
	  This is accepted in the meeting:
	  https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809
	  This method is accepted as a CRuby feature.
	  I.e. Other Ruby implementations don't need to implement it.
	  [ruby-core:56087] [Feature #8658]

Sun Aug 11 10:40:48 2013  Zachary Scott  <e@zzak.io>

	* lib/time.rb: [DOC] Correcting rdoc visibility of time.rb constants
	  Reported by Tanaka Akira [ruby-core:56517]

Sun Aug 11 04:48:14 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (rb_str_normalize_ospath):
	  HFS Plus (Mac OS Extended) uses a variant of Normal Form D in which
	  U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through
	  U+2FAFF are not decomposed (this avoids problems with round trip
	  conversions from old Mac text encodings).
	  http://developer.apple.com/library/mac/qa/qa1173/_index.html
	  Therefore fix r42457 to exclude the range.

Sun Aug 11 03:26:07 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bitsize): Fix a conditional expression.

Sun Aug 11 02:44:03 2013  Zachary Scott  <e@zzak.io>

	* lib/time.rb: [DOC] Document constants by @markijbema [Fixes GH-377]
	  https://github.com/ruby/ruby/pull/377

Sun Aug 11 01:28:52 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Revert r42458.
	  It removes the HAVE_CLOCK_GETTIME from config.h.
	  http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20130809T044800Z.diff.html.gz

Sat Aug 10 13:53:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_id_attrset): allow other than ID_ATTRSET.

	* parse.y (intern_str): ditto.  try stem ID for ID_INSTANCE,
	  ID_GLOBAL, ID_CLASS, ID_JUNK too.  [Bug #8756]

Sat Aug 10 12:49:50 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb
	  (REXML::Parsers::BaseParser::CDATA_END): Use "\A" instead of "^".
	  It is not an used constant but I fix it. (Or should I remove it?)

Sat Aug 10 12:47:19 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
	  Fix wrong constant name. "]>" pattern match is the same but
	  it is used for "<!DOCTYPE" end mark not "<![CDATA[" end mark.

Sat Aug 10 12:43:15 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
	  Use "\A" instead of "^" in document type declaration patterns
	  because they are used as the head match in content not the head
	  match in line. They don't cause any problems in the current code
	  but it should be fixed.

Sat Aug 10 12:39:00 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/parse/test_document_type_declaration.rb: Add tests for
	  parsing document type declaration.

Sat Aug 10 12:00:45 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::SYSTEM):
	  Fix loose "head" match regular expression. It doesn't cause any
	  problem in the current code but it should be fixed because readers
	  may confuse it.
	  Patch by Ippei Obayashi. Thanks!!!

Sat Aug 10 11:58:24 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/parse/test_notation_declaration.rb (#test_system_public):
	  Add a test for PUBLIC notation and SYSTEM notation order case.

Sat Aug 10 11:31:35 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::PUBLIC):
	  Fix loose "head" match regular expression.
	  [Bug #8701] [ruby-dev:47551]
	  Patch by Ippei Obayashi. Thanks!!!
	* test/rexml/parse/test_notation_declaration.rb (#test_system_public):
	  Add a test for the above case.

Sat Aug 10 09:20:21 2013  Zachary Scott  <e@zzak.io>

	* NEWS: [DOC] typo in example reported by @moretea
	  https://github.com/ruby/ruby/commit/a39e724#commitcomment-3831489

Sat Aug 10 09:19:04 2013  Zachary Scott  <e@zzak.io>

	* proc.c: [DOC] rdoc code formatting

Sat Aug 10 09:12:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_id_attrset): check if the argument is valid type as an
	  attribute.

Sat Aug 10 05:44:08 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/trackback.rb: [DOC] Hide RSS::Trackback from rdoc
	  Patch by Steve Klabnik [Bug #8755] [ruby-core:56456]

Sat Aug 10 04:52:21 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_div_struct): Use size_t.
	  (bigdivrem1): Ditto.
	  (bigdivrem_num_extra_words): Ditto.
	  (bigdivrem_single): Ditto.
	  (bigdivrem_normal): Ditto.
	  (bary_divmod): Ditto.

Fri Aug  9 23:47:15 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rexmlparser.rb: Remove needless REXML version check.
	  Both RSS Parser and REXML are bundled in Ruby. RSS Parser can
	  always use the latest REXML. [Bug #8754] [ruby-core:56454]
	  Patch by Steve Klabnik. Thanks!!!

Fri Aug  9 22:51:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (XLDFLAGS, LIBRUBYARG_STATIC): CoreFoundation framework
	  option is now needed always, regardless enable-shared.
	  [ruby-core:56467] [Bug #8759]

Fri Aug  9 22:20:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (load_file_internal): use rb_parser_compile_string_path and
	  rb_parser_compile_file_path, String path name versions.  [Bug #8753]

Fri Aug  9 07:16:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/io/console/console.c: delete redefinition of rb_cloexec_open.
	  drop support for 1.8 and 1.9 from the next release of io-console gem.

Fri Aug  9 19:13:54 2013  Koichi Sasada  <ko1@atdot.net>

	* NEWS: update about new methods for Binding.

Fri Aug  9 18:48:09 2013  Koichi Sasada  <ko1@atdot.net>

	* proc.c: add Binding#local_variable_get/set/defined?
	  to access local variables which a binding contains.
	  Most part of implementation by nobu.

	* test/ruby/test_proc.rb: add a tests for above.

	* vm.c, vm_core.h (rb_binding_add_dynavars): add a new function
	  to add a new environment to create space for new local variables.

Fri Aug  9 14:02:01 2013  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>

	* tool/make-snapshot: Fix order of priority for option parameter.

Fri Aug  9 12:06:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_str_normalize_ospath): normalize to Normalization Form C
	  using CFString.

Fri Aug  9 10:53:57 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* time.c (get_timeval, get_new_timeval): use rb_obj_class()
	  instead of CLASS_OF() because CLASS_OF() may return
	  a singleton class.

Fri Aug  9 10:42:11 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm_insnhelper.c (vm_invoke_block): returning from lambda proc
	  now always exits from the Proc. [ruby-core:56193] [Feature #8693]

	* NEWS, test/ruby/test_lambda.rb: ditto. Patch by nobu.

Fri Aug  9 00:10:32 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (lazy_zip_func): fix non-single argument.  fix
	  out-of-bound access and pack multiple yielded values.
	  [ruby-core:56383] [Bug #8735]

Thu Aug  8 23:01:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_singleton_p): new method Module#singleton_class? to
	  return whether the receiver is a singleton class or not.
	  [ruby-core:51087] [Feature #7609]

Thu Aug  8 21:56:44 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (time_overflow_p): Avoid signed integer overflow.
	  (rb_time_new): Fix overflow condition.

Thu Aug  8 19:58:02 2013  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_threadptr_pending_interrupt_check_mask):
	  use RARRAY_RAWPTR() instead of RARRAY_PTR() because
	  there is no new reference.

Thu Aug  8 19:56:52 2013  Koichi Sasada  <ko1@atdot.net>

	* string.c (rb_str_format_m): use RARRAY_RAWPTR() instead of
	  RARRAY_PTR() because there is no new reference.

Thu Aug  8 19:55:51 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: define USE_RGENGC_LOGGING_WB_UNPROTECT.

Thu Aug  8 16:44:25 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: add old macro name `RUBY_EVENT_SWITCH'.
	  This macro name is obsolete because it is renamed to
	  RUBY_INTERNAL_EVENT_SWITCH, but it has compatibility problem
	  using this macro name like ruby-prof.
	  I want to remove this macro after ruby 2.1.

Thu Aug  8 15:37:53 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/coverage/test_coverage.rb (TestCoverage#test_big_code): use `1'
	  instead of `p' to get rid of a side effect.
	  Kernel#p without any argument seems to do nothing, but flushes stdout.
	  and, if stdout is redirected to file, fsync() will be called on
	  Windows.  so, when running test-all on Windows with redirection, such
	  as CI environment, this test took a lot of time.

Thu Aug  8 14:54:18 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* NEWS: add description of incompatibility introduced by r42396.
	  [ruby-core:56329] [Bug #8722]

Thu Aug  8 14:50:36 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* common.mk (mini): portable target to build miniruby

	* common.mk (bisect): run git-bisect with miniruby

	* common.mk (bisect-ruby): run git-bisect with ruby

	* tool/bisect.sh: script for git-bisect

Thu Aug  8 12:11:43 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/webrick/test_httpresponse.rb (test_send_body_*_chunked): these
	  expectations assumes that the IOs are binmode.  fixed test failures
	  introduced at r42427 on Windows.

Thu Aug  8 10:27:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (range_last): revert r42400.  [Bug #8739]

Thu Aug  8 10:26:25 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_str_normalize_ospath): extract and move from dir.c.

Thu Aug  8 05:59:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* test/openssl/test_ssl.rb: Fix test for CVE-2013-4073.
	  Patch by Antonio Terceiro. [Bug #8750] [ruby-core:56437]

Thu Aug  8 03:37:38 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/webrick/httpresponse.rb:  Allow #body to be an IO-like object
	  that responds to #readpartial and #read.
	  [ruby-trunk - Feature #8155]
	* NEWS:  NEWS for above
	* test/webrick/test_httpresponse.rb:  Tests for above.

Wed Aug  7 23:06:26 2013  Akinori MUSHA  <knu@iDaemons.org>

	* ruby.c (Process.argv0): New method to return the original value
	  of $0. [Feature #8696]

Wed Aug  7 23:05:55 2013  Akinori MUSHA  <knu@iDaemons.org>

	* ruby.c (Process.setproctitle): New method to change the title of
	  the running process that is shown in ps(1). [Feature #8696]

Wed Aug  7 20:05:38 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_odd_p): Check the bignum length.
	  (rb_big_even_p): Ditto.

Wed Aug  7 19:29:26 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (dbl2big): A condition simplified.

Wed Aug  7 16:34:30 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/webrick/test_cgi.rb (TestWEBrickCGI#{start_cgi_server,test_cgi}):
	  mswin is not only mswin32 but also mswin64. [Bug #8746]

Wed Aug  7 16:19:12 2013  Koichi Sasada  <ko1@atdot.net>

	* cont.c (rb_fiber_start): use RARRAY_RAWPTR() instead of
	  RARRAY_PTR() because there is no new reference.

	* proc.c (curry): ditto.

	* proc.c (rb_proc_call): remove line break.

Wed Aug  7 13:20:12 2013  Koichi Sasada  <ko1@atdot.net>

	* random.c (random_load): use RARRAY_RAWPTR() instead of
	  RARRAY_PTR() because there is no new reference.

Wed Aug  7 12:58:23 2013  Koichi Sasada  <ko1@atdot.net>

	* thread.c (thread_start_func_2): use RARRAY_RAWPTR() instead of
	  RARRAY_PTR() because there is no new reference.

Wed Aug  7 09:00:24 2013  Zachary Scott  <e@zzak.io>

	* string.c: [DOC] Description of rb_str_equal [Fixes GH-375]
	  Based on a patch by @markijbema
	  https://github.com/ruby/ruby/pull/375

Wed Aug  7 08:30:38 2013  Zachary Scott  <e@zzak.io>

	* ext/openssl/ossl_hmac.c: [DOC] Documentation for OpenSSL::HMAC
	  based on a patch by @repah documenting-ruby/ruby#14
	  https://github.com/documenting-ruby/ruby/pull/14

Wed Aug  7 07:46:23 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/utils.rb: [DOC] RSS::Utils by Steve Klabnik [Bug #8745]

Wed Aug  7 07:38:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (nlz16): Removed.
	  (nlz32): Ditto.
	  (nlz64): Ditto.
	  (nlz128): Ditto.
	  (nlz_int): New function.
	  (nlz_long): New function.
	  (nlz_long_long): New function.
	  (nlz_int128): New function.
	  (nlz): Follow above changes.
	  (bitsize): Follow above changes.

Tue Aug  6 22:38:15 2013  Zachary Scott  <e@zzak.io>

	* time.c: [DOC] Typo in Time overview by @sparr [Fixes GH-374]
	  https://github.com/ruby/ruby/pull/374

Tue Aug  6 22:35:32 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/1.0.rb: [DOC] Document RSS10 by Steve Klabnik [Bug #8740]

Tue Aug  6 22:14:11 2013  Kouji Takao  <kouji.takao@gmail.com>

	* ext/readline/readline.c (readline_s_delete_text): remove
	  checking "$SAFE == 4".

	* ext/readline/readline.c: fix rdoc, remove "Raises SecurityError"
	  and add "Raises NotImplementedError".

Tue Aug  6 22:04:38 2013  Kouji Takao  <kouji.takao@gmail.com>

	* ext/readline/readline.c, test/readline/test_readline.rb: fix
	  indent.

Tue Aug  6 21:59:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (range_last): return nil for empty range, or in the case the
	  predecessor is smaller than the begin.  [Bug #8739]

Tue Aug  6 21:48:31 2013  Kouji Takao  <kouji.takao@gmail.com>

	* ext/readline/readline.c (readline_s_set_point, Init_readline):
	  add Readline.point=(pos). Patched by naruse.  [ruby-dev:47535]
	  [Feature #8675]

Tue Aug  6 21:14:11 2013  Kouji Takao  <kouji.takao@gmail.com>

	* ext/readline/readline.c (Init_readline, readline_s_set_output)
	(clear_rl_outstream, readline_s_set_input, clear_rl_instream)
	(readline_readline): fix causing SEGV if closed IO object that is
	  set Readline.input or Readline.output. Patched by akr
	  [ruby-dev:47509] [Bug #8644]

Tue Aug  6 17:56:40 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_push_frame): change type of stack_max to size_t.

Tue Aug  6 17:42:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (range_last): exclude the last number of the exclusive range
	  if the end is Numeric.  [ruby-dev:47587] [Bug #8739]

Tue Aug  6 17:42:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_conv_from_wchar): converted string to CP_UTF8
	  should have UTF-8 encoding.  otherwise no conversion takes place
	  later.

Tue Aug  6 17:21:38 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_push_frame): fix stack overflow check codes.
	  Stack overflow check should be done *after* pushing a stack frame.
	  However, some stack overflow checking codes checked *before*
	  pushing a stack frame with iseq->stack_max.
	  To solve this problem, add a new parameter `stack_max' to specify
	  a possible consuming stack size.

	* vm_core.h (CHECK_VM_STACK_OVERFLOW0): add to share the stack overflow
	  checking code.

	* insns.def: catch up this change.

	* vm.c, vm_eval.c: ditto.

	* test/ruby/test_exception.rb: add a stack overflow test.
	  This code is reported by nobu.

Tue Aug  6 17:02:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_conv_from_wchar): use WideCharToMultiByte(),
	  as like as mbstr_to_wstr(), in the first step of the conversion from
	  WCHAR.

Tue Aug  6 16:14:32 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): copy cref to limit the scope of
	  refinements in the eval string. [ruby-core:56329] [Bug #8722]

	* test/ruby/test_refinement.rb: related test.

Tue Aug  6 12:23:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_realloc): Use VALGRIND_MAKE_MEM_UNDEFINED to
	  declare undefined memory area.
	  (bignew_1): Ditto.

	* internal.h (VALGRIND_MAKE_MEM_DEFINED): Moved from gc.c
	  (VALGRIND_MAKE_MEM_UNDEFINED): Ditto.

Tue Aug  6 01:40:37 2013  Zachary Scott  <e@zzak.io>

	* process.c: [DOC] Document caveats of command form of Process.spawn
	  with regard to the shell and OS. Patched by Steve Klabnik [Bug #8550]

Tue Aug  6 01:28:35 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/0.9.rb: [DOC] Typo in example [Bug #8732]

Tue Aug  6 01:22:37 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/2.0.rb: [DOC] Document RSS::Rss by Steve Klabnik #8740
	* lib/rss/atom.rb: [DOC] Typo in rdoc by Steve Klabnik

Mon Aug  5 23:47:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Rename local variables.

Mon Aug  5 22:23:59 2013  Zachary Scott  <e@zzak.io>

	* vm_trace.c: [DOC] Fix TracePoint return values in examples
	  Based on a patch by @sho-h [Fixes GH-373]
	  https://github.com/ruby/ruby/pull/373

Mon Aug  5 17:38:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_write_console): use MultiByteToWideChar() for
	  the last step of conversion to WCHAR, to get rid of warnings from
	  rb_enc_find() in miniruby.  [ruby-dev:47584] [Bug #8733]

	* win32/win32.c (wstr_to_mbstr, mbstr_to_wstr): fix wrong trimming.
	  WideCharToMultiByte() and MultiByteToWideChar() do not count
	  NUL-terminator in the size for conversion result, unless the input
	  length is -1.

Mon Aug  5 11:51:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* include/ruby/encoding.h: document which user flags are used by
	  ENCODING_MASK for better greppability

Mon Aug  5 10:01:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* object.c (rb_class_inherited_p): allow iclasses to be tested for
	  inheritance. [Bug #8686] [ruby-core:56174]

	* test/ruby/test_method.rb: add test

Mon Aug  5 06:13:48 2013  Zachary Scott  <e@zzak.io>

	* enumerator.c: [DOC] Remove reference to Enumerator::Lazy#cycle
	  Patch by @kachick [Fixes GH-372]
	  https://github.com/ruby/ruby/pull/372

Mon Aug  5 03:57:16 2013  Zachary Scott  <e@zzak.io>

	* lib/rss/0.9.rb: [DOC] Document RSS09 by Steve Klabnik [Bug #8732]

Mon Aug  5 03:35:11 2013  Zachary Scott  <e@zzak.io>

	* lib/rexml/attribute.rb: [DOC] Update example for #namespace
	  Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173]

Sun Aug  4 21:08:29 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_zip): performance implement by using
	  ALLOCA_N() to allocate tmp buffer.

Sun Aug  4 07:14:49 2013  Tanaka Akira  <akr@fsij.org>

	* README.EXT, README.EXT.ja: Mention rb_integer_pack and
	  rb_integer_unpack.

Sun Aug  4 01:54:45 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BARY_TRUNC): New macro.
	  (bary_cmp): Use BARY_TRUNC.
	  (bary_mul_toom3): Ditto.
	  (bary_divmod): Ditto.
	  (abs2twocomp): Ditto.
	  (bigfixize): Ditto.
	  (rb_cstr_to_inum): Ditto.
	  (big2str_karatsuba): Ditto.
	  (bigdivrem): Ditto.

Sun Aug  4 00:57:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_karatsuba): Don't allocate new temporary buffer
	  if the buffer is enough for current invocation.

Sun Aug  4 00:22:34 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary2bdigitdbl): New function.
	  (bdigitdbl2bary): Ditto.
	  (bary_mul_single): Use bdigitdbl2bary.
	  (power_cache_get_power): Ditto.
	  (bary_divmod): Use bary2bdigitdbl.
	  (big2str_orig): Ditto.
	  (bigdivrem): Ditto.

Sat Aug  3 22:47:11 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: The branch condition of selecting multiplication
	  algorithms should check smaller argument because Karatsuba and Toom3
	  is effective only if both arguments are big.
	  (bary_mul_toom3_branch): Compare the smaller argument to
	  TOOM3_MUL_DIGITS.
	  (bary_mul): Compare the smaller argument to KARATSUBA_MUL_DIGITS.

Sat Aug  3 22:23:31 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_orig): Receive the number to stringize as
	  BDIGIT array and size.
	  (big2str_karatsuba): Receive the number to stringize as BDIGIT array
	  and size.  Use an temporary array of BDIGIT.
	  (rb_big2str1): Follow the above change.

Sat Aug  3 13:30:04 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (MAX_BASE36_POWER_TABLE_ENTRIES): Renamed from
	  MAX_BIG2STR_TABLE_ENTRIES.
	  (base36_power_cache): Renamed from big2str_power_cache.
	  (base36_numdigits_cache): Renamed from big2str_numdigits_cache.

Sat Aug  3 10:33:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_set_integer_literal): use rb_rational_raw1() for
	  integral rational because no reduction is needed with 1.

Sat Aug  3 09:46:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/etc/etc.c (setup_passwd, setup_group): set proper encodings to
	  string members.

Sat Aug  3 09:30:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (rb_struct_define_under): new function to define Struct
	  under the given namespace, not under Struct.  [Feature #8264]

	* ext/etc/etc.c: use rb_struct_define_under.

Sat Aug  3 06:55:29 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* parse.y (value_expr_gen): now NODE_DEFN and NODE_DEFS are not void
	  value expressions.  get rid of wrong warning with -w, and make to
	  pass tests with chkbuild.  ref. [Feature #3753]

Sat Aug  3 04:23:48 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/refinements.rdoc:  Remove mention of instance_eval and
	  module_eval from scope section per:
	  http://twitter.com/shugomaeda/status/363219951336693761

Sat Aug  3 02:22:05 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_orig): Refactored.

Sat Aug  3 01:20:19 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigadd_core): Removed.
	  (bigadd): Use bary_add instead of bigadd_core.

Sat Aug  3 00:52:43 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2str1): Simplify power_level calculation.

Sat Aug  3 00:34:20 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_zip): use rb_ary_new2() to create buffer
	  if rb_block_arity() > 1.

Sat Aug  3 00:12:00 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* NEWS: Add the description that IO#seek supports SEEK_DATA
	  and SEEK_HOLE.

Fri Aug  2 23:57:57 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* vm.c (m_core_define_method, m_core_define_singleton_method): now
	  the value of def-expr is the Symbol of the name of the method, not
	  nil.
	  ref. [ruby-dev:42151] [Feature #3753]

	* test/ruby/test_syntax.rb (TestSyntax#test_value_of_def): test for
	  above changes.

Fri Aug  2 23:54:11 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_zip): performance improvement by avoiding
	  array creation if rb_block_arity() > 1.

Fri Aug  2 23:50:53 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (power_cache_get_power): Apply bigtrunc to the result of
	  bigsq.
	  (big2str_karatsuba): Fix number of leading zero characters.

Fri Aug  2 23:48:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): calculate denominator directly as powers of
	  ten, not parsing string.

	* parse.y (parser_number_literal_suffix): return bit set of found
	  suffixes.

	* parse.y (parser_set_number_literal, parser_set_integer_literal):
	  split from parser_number_literal_suffix to set yylval.

	* parse.y (parser_yylex): parse rational number literal with decimal
	  point precisely.

	* parse.y (simple_numeric): integrate numeric literals and simplify
	  numeric rules.

	* ext/ripper/eventids2.c (ripper_init_eventids2): ripper support for
	  new literals, tRATIONAL and tIMAGINARY.

Fri Aug  2 18:33:28 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_karatsuba): Reduce power_level more than one at
	  recursion, if possible.
	  (rb_big2str1): Follow the above change.

Fri Aug  2 12:25:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul): Swap x and y for bary_mul1 if x is longer than y.
	  [ruby-dev:47565] [Bug #8719] Reported by Narihiro Nakamura.

Fri Aug  2 10:39:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* parse.y (negate_lit): add T_RATIONAL and T_COMPLEX to the switch
	  statement, and call rb_bug() if an unknown type is passed to
	  negate_lit(). [ruby-core:56316] [Bug #8717]

	* bootstraptest/test_literal_suffix.rb (assert_equal): add test

Fri Aug  2 09:14:47 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/syntax/refinements.rdoc:  Improve description of where you may
	  activate refinements.

Fri Aug  2 07:45:55 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_orig): Remove len argument.
	  (big2str_karatsuba): Ditto.
	  (rb_big2str1): Follow above change.

Thu Aug  2 02:32:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* NEWS: Add the description of number literal suffixes.

Thu Aug  2 00:02:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* bootstraptest/test_literal_suffix.rb: add two test cases to
	  examine that "1if true" and "1rescue nil" are recognized as 1.

Thu Aug  1 23:45:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* rational.c (rb_flt_rationalize_with_prec): new public C function
	  to rationalize a Float instance with a precision.

	* rational.c (rb_flt_rationalize): new public C function to
	 rationalize a Float instance.  A precision is calculated from
	 the given float number.

	* include/ruby/intern.h: Add rb_flt_rationalize_with_prec and
	  rb_flt_rationalize.

	* parse.y: implement number literal suffixes, 'r' and 'i'.
	  [ruby-core:55096] [Feature #8430]

	* bootstraptest/test_literal_suffix.rb: add tests for parser to scan
	  number literals with the above tsuffixes.

Thu Aug  1 23:55:08 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2str1): Remove a local variable.

Thu Aug  1 23:33:01 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_cstr_to_inum): Use power_cache_get_power.

Thu Aug  1 21:02:48 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2str1): Raise an error for too big number.

Thu Aug  1 20:46:29 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (power_cache_get_power): Hide cached Bignum objects.

Thu Aug  1 19:15:05 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2str1): Remove non-trim mode.
	  (rb_big2str0): Non-trim mode implemented here.
	  (big2str_find_n1): Change the result type to long again.
	  (big2str_base_powerof2): Don't take arguments: len and trim.
	  (rb_big2str): Follow above change.

Thu Aug  1 12:37:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_alloc): New function to allocate the result string.
	  It is called after actual length is calculated.
	  (big2str_struct): Add fields: negative, result and ptr.
	  (big2str_orig): Write out the result via b2s->ptr.
	  (big2str_orig): Ditto.
	  (rb_big2str1): Don't allocate the result string at beginning.

Thu Aug  1 07:36:27 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_orig): Use temporary buffer when trim mode.

Thu Aug  1 06:28:48 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_orig): Simplified because RBIGNUM_LEN(x) <= 2 now.
	  (big2str_struct): Two fields added: hbase2, hbase2_numdigits.
	  (rb_big2str1): Initialize above fields.

Thu Aug  1 04:06:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/options.rb (RDoc#finish): include root path in include
	  paths, to work in another directory than the source directory.
	  [ruby-core:56282] [Bug #8712]

	* test/test_rdoc_markup_pre_process.rb (TestRDocMarkupPreProcess#setup):
	  fix input_file_name, as the test script is not pre-processed.

Thu Aug  1 01:45:18 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_karatsuba): Fix a condition of power_level.

Thu Aug  1 01:09:02 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (LOG2_KARATSUBA_BIG2STR_DIGITS): Removed.
	  (KARATSUBA_BIG2STR_DIGITS): Removed.
	  (big2str_numdigits_cache): New variable.
	  (power_cache_get_power): Merged with power_cache_get_power0.
	  This function returns maxpow_in_bdigit_dbl(base)**(2**power_level).
	  (rb_big2str1): use power_cache_get_power.

Wed Jul 31 23:59:28 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_find_n1): Change the return type to size_t.
	  (big2str_orig): Ditto.
	  (big2str_karatsuba): Ditto.
	  (rb_big2str1): Follow the above changes.

Wed Jul 31 23:19:06 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (power_cache_get_power): Change numdigits_ret to size_t *.
	  (big2str_orig): Change len argument to size_t.
	  (big2str_karatsuba): Ditto.
	  (rb_big2str1): Follow the above changes.

Wed Jul 31 22:59:47 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/parse/test_notation_declaration.rb: Change class
	  name to follow file name change.

Wed Jul 31 22:57:50 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Rename to ...
	* test/rexml/parse/test_notation_declaration.rb: ... this.

Wed Jul 31 22:54:39 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_mixin.rb: Remove duplicated tests.

Wed Jul 31 22:52:55 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Fix typos in expected
	  value.
	  pubilc ->
	  public
	     ^^

Wed Jul 31 22:50:51 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
	  system literal in external ID system notation declaration.

Wed Jul 31 22:36:21 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_cmp): Extracted from rb_big_cmp.
	  (power_cache_get_power): Change n1 argument (number of digits) to
	  power_level which is just passed to power_cache_get_power0.
	  (big2str_karatsuba): Ditto.
	  (rb_big2str1): Calculate the initial power_level.

Wed Jul 31 22:04:36 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Fix a typo.
	  Extern  ID ->
	  ExternalID
	        ^^

Wed Jul 31 22:01:36 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
	  public ID in external ID notation declaration.

Wed Jul 31 22:01:24 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* parse.y: fix build error with bison-3.0.

Wed Jul 31 21:58:53 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Split test patterns.

Wed Jul 31 21:42:33 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Group tests.

Wed Jul 31 21:37:51 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_mixin.rb (TestNotationDecl#test_name):
	  Move to ...
	* test/rexml/test_notationdecl_parsetest.rb
	  (TestNotationDecl#test_name): ... here.

Wed Jul 31 21:37:47 2013  Kouhei Sutou  <kou@cozmixng.org>

Wed Jul 31 21:31:49 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: Remove setup because it
	  doesn't share anything with other tests.

Wed Jul 31 21:24:55 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_attributes_mixin.rb: Remove a needless shebang.
	* test/rexml/test_notationdecl_mixin.rb: ditto.
	* test/rexml/test_doctype.rb: ditto.
	* test/rexml/test_xml_declaration.rb: ditto.
	* test/rexml/test_changing_encoding.rb: ditto.

Wed Jul 31 21:20:08 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_notationdecl_parsetest.rb: remove a needless shebang.

Wed Jul 31 20:11:01 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_rindex): fix bug introduced in r42269.
	  "".rindex("") should return 0.
	  (str_rindex): ditto.

Wed Jul 31 19:55:33 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (MAX_BIG2STR_TABLE_ENTRIES): Use SIZEOF_SIZE_T.
	  (power_cache_get_power0): Add rb_bug call for too bit i argument.
	  (power_cache_get_power): Simplified.

Wed Jul 31 18:32:25 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/uri/common.rb (URI.decode_www_form_component): Use String#b.

Wed Jul 31 18:24:02 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_mod_refine, mod_using, top_using): don't show
	  warnings because Refinements are no longer experimental.
	  [ruby-core:55993] [Feature #8632]

	* test/ruby/test_refinement.rb: related test.

	* NEWS: fixes for the above change.

Wed Jul 31 17:55:55 2013  Shota Fukumori  <her@sorah.jp>

	* lib/uri/common.rb (URI.decode_www_form_component):
	  Don't raise error when str includes multibyte characters.

Wed Jul 31 17:45:39 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_rindex): performance improvement by using
	  memrchr(3).

Wed Jul 31 16:43:30 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_rindex): refactoring and avoid to call str_nth() if
	  pos == 0.

Wed Jul 31 14:41:36 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb: [DOC] Add a couple of notes on Hash as storage.
	  ref. [Feature #6589]

Wed Jul 31 14:38:52 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb: [DOC] Fix example result.  Hash is now ordered.

Wed Jul 31 14:38:10 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb: [DOC] Use the term "sorted" instead of "ordered"
	  when mentioning SortSet.

Wed Jul 31 12:18:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_struct): New structure.
	  (big2str_orig): Use big2str_struct.
	  (big2str_karatsuba): Ditto.
	  (rb_big2str1): Ditto.

Wed Jul 31 12:02:16 2013  Zachary Scott  <e@zzak.io>

	* lib/rubygems.rb: [DOC] typo in url patch by @Red54 [Fixes #369]
	  https://github.com/ruby/ruby/pull/369

Wed Jul 31 07:09:07 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems from master as of commit 523551c
	* test/rubygems:  ditto.

Tue Jul 30 22:21:54 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* test/ruby/test_hash.rb: add a test for enumeration order of Hash.

Tue Jul 30 18:52:27 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#intersect?, Set#disjoint?): Add new methods for
	  testing if two sets have any element in common.
	  [ruby-core:45641] [Feature #6588] Based on the code by marcandre.

Tue Jul 30 17:16:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable
	  characters.

Tue Jul 30 11:00:52 2013  Zachary Scott  <e@zzak.io>

	* ext/curses/extconf.rb: [DOC] nodoc to reduce Object pollution

Tue Jul 30 08:19:42 2013  Tanaka Akira  <akr@fsij.org>

	* sizes.c (Init_sizes): Define sizes only if the type actually exists.

Mon Jul 29 22:55:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sizes.c (Init_sizes): define RbConfig::SIZEOF.  [Feature #8568]

Mon Jul 29 22:25:20 2013  Zachary Scott  <e@zzak.io>

	* ext/curses/curses.c: [DOC] Update location of samples
	* samples/curses/*: Move Curses samples and refactor from mixin
	  The samples are included in rdoc for module and use of mixin is
	  confusing

Mon Jul 29 22:16:11 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (LOG2_KARATSUBA_BIG2STR_DIGITS): Renamed from
	  LOG2_KARATSUBA_DIGITS.
	  (KARATSUBA_BIG2STR_DIGITS): Renamed from KARATSUBA_DIGITS.

Mon Jul 29 22:04:45 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_compare_by_id): add function prototype.

Mon Jul 29 21:53:41 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_compare_by_id): don't call rb_hash_rehash()
	  if self.compare_by_identity? == true.

Mon Jul 29 21:29:48 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_assoc): performance improvement by replacing
	  compare function in RHASH(hash)->ntbl->type temporarily like r42224.
	  it falls back to rb_hash_foreach() if st_lookup() doesn't find the key.

	* test/ruby/test_hash.rb: add a test for above.

Mon Jul 29 21:15:30 2013  Akinori MUSHA  <knu@iDaemons.org>

	* test/ruby/test_lazy_enumerator.rb
	  (TestLazyEnumerator#test_initialize): Make sure
	  Enumerator::Lazy#initialize raises error if the object is
	  frozen.  The check was performed by rb_ivar_set() before
	  rb_check_frozen() was added to enumerator_init().

Mon Jul 29 21:06:42 2013  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c (enumerator_init): Add a frozenness check to
	  prevent a frozen Enumerator object from being reinitialized with
	  a different enumerable object.  This is the least we should do,
	  and more fixes will follow. [Fixes GH-368] Patch by Kenichi
	  Kamiya.

	* enumerator.c (generator_init): Ditto.

Mon Jul 29 20:14:24 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_assoc): revert r42224. table->type->compare is
	  called only if hashes are matched.

	* test/ruby/test_hash.rb: add a test to check using #== to compare.

Mon Jul 29 17:00:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yycompile): store file name as String to keep the encoding.

	* parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path):
	  new functions to pass file name as a String.

	* parse.y (gettable_gen): return a copy of the original file name, not
	  a copy in filesystem encoding.

	* vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)".

Mon Jul 29 16:53:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_initialize_copy): copy st_table type even if empty.
	  [ruby-core:56256] [Bug #8703]

Mon Jul 29 16:34:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_initialize_copy): clear old table before copy new
	  table.

Mon Jul 29 16:34:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_assoc): aggregate object can be initialized only
	  with link time constants.

Mon Jul 29 14:54:44 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_assoc): performance improvement by replacing
	  compare function in RHASH(hash)->ntbl->type temporarily.

Mon Jul 29 14:52:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (xsystem): expand environment variable in all macros not
	  expanded with RbConfig.  [Bug #8702]

	* test/mkmf/test_framework.rb (create_framework): replace all $@ not
	  only once.

Mon Jul 29 06:54:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_pipe): use enum for compile time constants,
	  instead of const int for debugging.

Mon Jul 29 00:11:49 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Specialized implementation added for
	  nx == 2 && ny == 2

Sun Jul 28 20:28:41 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* io.c (io_getpartial): use rb_str_locktmp_ensure().
	  [ruby-core:56121] [Bug #8669]

	* io.c (rb_io_sysread): ditto.

	* test/ruby/test_io.rb: add tests for above.

Sun Jul 28 20:10:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): should make static libraries for extensions
	  to be statically linked.  [Bug #7948]

Sun Jul 28 17:38:32 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c: add internal API rb_str_locktmp_ensure().

	* io.c (io_fread): use rb_str_locktmp_ensure().
	  [ruby-core:56121] [Bug #8669]

	* test/ruby/test_io.rb: add a test for above.

Sun Jul 28 13:04:39 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* io.c (interpret_seek_whence): support SEEK_DATA and SEEK_HOLE.
	  These are whences for lseek(2) supported by Linux since version 3.1.
	  [ruby-core:56123] [Feature #8671]

	* test/ruby/test_io.rb: Add tests for above.

Sun Jul 28 12:41:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (absint_numwords_generic): The char_bit variable changed
	  to static constant.

Sun Jul 28 12:03:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Constify bary_* functions.

Sun Jul 28 11:12:07 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_absint_size): Declaration moved from
	  internal.h to calculate required buffer size to pack integers.
	  (rb_absint_numwords): Ditto.
	  (rb_absint_singlebit_p): Ditto.
	  [ruby-core:42813] [Feature #6065]

Sun Jul 28 10:54:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_pipe): fix pipe name formatting.  as "%x" may
	  not contain '0' at all, fill at fixed position instead.

Sun Jul 28 00:35:14 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_size): Return the bignum "bytewise" size.
	  [ruby-core:55578] [Feature #8553]
	  This is accepted by matz on DevelopersMeeting20130727Japan.

Sun Jul 28 00:07:48 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_integer_pack): Declaration moved from
	  internal.h.
	  (rb_integer_unpack): Ditto.
	  [ruby-core:42813] [Feature #6065]

Fri Jul 26 23:18:13 2013  Kouhei Sutou  <kou@cozmixng.org>

	* NEWS: Add a new feature that REXML::Parsers::StreamParser
	  supports "entity" event.

Fri Jul 26 23:14:31 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/streamparser.rb
	  (REXML::Parsers::StreamParser#parse): Add "entity" event support to
	  listener. [Bug #8689] [ruby-dev:47542]
	  Reported by Ippei Obayashi.
	* test/rexml/test_stream.rb (StreamTester#entity): Add a test for
	  the above case.

Fri Jul 26 23:05:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): separate numeric literal from succeeding
	  token, and treat 'e' as floating point number only if followed by
	  exponent part.

Fri Jul 26 22:14:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): surround with
	  do/while (0), and remove unnecessary casts.

Fri Jul 26 20:12:07 2013  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syslog/lib/syslog/logger.rb (Syslog::Logger): Add facility
	  to Syslog::Logger. [Fixes GH-305] patch by Max Shytikov
	  https://github.com/ruby/ruby/pull/305

Fri Jul 26 19:25:17 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_exec.h, tool/instruction.rb: not an error, but a BUG if stack
	  overflow checking failed just before/after the beginning of an
	  instruction. It should be treated as a BUG.
	  Please tell us if your code cause BUG with this problem.
	  This check will removed soon (for performance).

Fri Jul 26 18:30:14 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_memcpy): cast to int to suppress a warning.

Fri Jul 26 18:21:58 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_memcpy): try to enable optimization.
	  At least on my environments, I don't see any errors
	  with many trials. Please tell us if you find any GC bugs.

Fri Jul 26 17:49:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/file.c (fix_string_encoding): fix target encoding.  the
	  parameter `encoding' is not the target encoding but the original
	  encoding.

Fri Jul 26 14:05:19 2013  Zachary Scott  <e@zzak.io>

	* ext/fiddle/*: [DOC] More doc on dlopen and RTLD_DEFAULT from r42184

Fri Jul 26 13:08:53 2013  Zachary Scott  <e@zzak.io>

	* ext/fiddle/lib/fiddle.rb: [DOC] Document Fiddle.dlopen(nil)
	* ext/fiddle/handle.c: [DOC] Document Fiddle::Handle.new(nil)

Fri Jul 26 13:04:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (rb_load_internal): use rb_load_file_str() to keep path
	  encoding.

	* load.c (rb_require_safe): search in OS path encoding for Windows.

	* ruby.c (rb_load_file_str): load file with keeping path encoding.

	* win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming
	  path is encoded in UTF-8.  [ruby-core:56136] [Bug #8676]

	* file.c (rb_str_encode_ospath): simplify using rb_str_conv_enc().

	* win32/file.c (fix_string_encoding): simplify with rb_str_conv_enc().

	* win32/file.c (convert_mb_to_wchar): use bare pointer instead of
	  VALUE, and remove useless argument.

Fri Jul 26 11:42:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* rational.c (f_round_common): Rational is expected to be returned by
	  Rational#*, but mathn.rb breaks that assumption.  [ruby-core:56177]
	  [Bug #8687]

Fri Jul 26 01:37:45 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* include/ruby/ruby.h: check defined(USE_RGENGC_LOGGING_WB_UNPROTECT)

Fri Jul 26 01:21:41 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (rb_file_expand_path_internal): fix r42160; skip '~'.

Thu Jul 25 17:53:18 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP#connect): disable Nagle's algorithm on
	  HTTP connection. [ruby-core:56158] [Feature #8681]

Thu Jul 25 17:49:42 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* re.c (rb_reg_to_s): convert closing parenthesis to the target encoding
	  if it is ASCII incompatible encoding. [ruby-core:56063] [Bug #8650]

Thu Jul 25 17:21:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (is_obj_encoding): new macro to check if obj is an
	  Encoding.  obj can be any type while is_data_encoding expects T_DATA
	  only.

Thu Jul 25 17:17:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_expand_path_internal): should clear coderange after
	  copying user name as binary data.

Thu Jul 25 16:17:55 2013  Koichi Sasada  <ko1@atdot.net>

	* encoding.c (check_encoding): Check T_DATA or not.
	  is_data_encoding(obj) assumes that `obj' is T_DATA.

Thu Jul 25 13:06:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_s_home): use rb_home_dir_of and rb_default_home_dir.

	* file.c (rb_home_dir_of): split from rb_home_dir() for the home
	  directry of the given user, and the user name is a VALUE, not a bare
	  pointer.  should raise if the user does not exist.

	* file.c (rb_default_home_dir): split from rb_home_dir() for the home
	  directry of the current user.

Thu Jul 25 12:32:11 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/openssl/ossl.c: support additional three thread synchronization
	  functions. [ruby-trunk - Bug #8386]

Thu Jul 25 07:15:58 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems from master as of commit 4ff70cc
	* test/rubygems:  ditto.

Wed Jul 24 20:57:44 2013  Koichi Sasada  <ko1@atdot.net>

	* compile.c (iseq_set_arguments): use RARRAY_RAWPTR() instead of
	  RARRAY_PTR() because there is no new reference.

	* compile.c (iseq_set_exception_table): ditto.

Wed Jul 24 19:49:54 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is
	  a relative URI. [Bug #8645]

Wed Jul 24 18:56:06 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_expandarray): use RARRAY_RAWPTR() instead of
	  RARRAY_PTR() because there is no new reference.

	* vm_insnhelper.c (vm_caller_setup_args): ditto.

	* vm_insnhelper.c (vm_yield_setup_block_args): ditto.

Wed Jul 24 18:40:11 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c, gc.c: move ary_unprotect_logging() into
	  rb_gc_unprotect_logging() which is general version

	* include/ruby/ruby.h: add USE_RGENGC_LOGGING_WB_UNPROTECT
	  to enable.

Wed Jul 24 17:37:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_expand_path_internal): preserve the file name
	  encoding in an exception message.

Wed Jul 24 08:04:49 2013  Koichi Sasada  <ko1@atdot.net>

	* test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
	  GC events strictly.

Tue Jul 23 23:19:24 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/extconf.rb (CRYPTO_THREADID): check exist or not.

	* ext/openssl/ossl.c (ossl_thread_id): use rb_nativethread_self()
	  implemented at r42137 to allow threads which doesn't associated with
	  Ruby thread to use openssl functions.

	* ext/openssl/ossl.c (Init_ossl_locks): If CRYPTO_THREADID is defined
	  (OpenSSL 1.0.0 or later has it) use CRYPTO_THREADID_set_callback()
	  instead of CRYPTO_set_id_callback() because its argument is
	  unsigned long; it may cause id collision on mswin64
	  whose sizeof(unsigned long) < sizeof(void*).
	  http://www.openssl.org/docs/crypto/threads.html

	* ext/openssl/ossl.c (ossl_threadid_func): defined for above.

Tue Jul 23 20:47:36 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Move functions.

Tue Jul 23 20:14:55 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_divmod): Add special cases for x < y easily detected
	  and nx == 2 && ny == 2.

Tue Jul 23 19:48:38 2013  Koichi Sasada  <ko1@atdot.net>

	* thread_(pthread|win32).h: rename rb_thread_cond_t to
	  rb_nativethread_cond_t.

	* thread.c, thread_pthread.c, thread_win32.c, vm_core.h: catch up
	  renaming.

Tue Jul 23 19:44:32 2013  Koichi Sasada  <ko1@atdot.net>

	* thread_native.h: add rb_nativethread_self() which returns
	  current running native thread identifier.

	* thread_[pthread|win32].c: implement rb_nativethread_self().

Tue Jul 23 19:34:11 2013  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.h, thread_win32.h: rename rb_thread_id_t to
	  rb_nativethread_id_t.

	* thread_pthread.c, vm_core.h: use rb_nativethread_id_t.

Tue Jul 23 18:56:11 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/openssl/ossl.c: use system native (system provided)
	  thread locking APIs added by last commit.
	  This patch fixes [Bug #8386].
	  "rb_mutex_*" APIs control only "Ruby" threads.
	  Not for native threads.

Tue Jul 23 18:44:15 2013  Koichi Sasada  <ko1@atdot.net>

	* thread_native.h: added.
	  Move native thread related lines from vm_core.h.
	  And declare several functions "rb_nativethread_lock_*",
	  manipulate locking.

	* common.mk: add thread_native.h.

	* thread.c: add functions "rb_nativethread_lock_*".

	* thread.c, thread_[pthread,win32].[ch]: rename rb_thread_lock_t
	  to rb_nativethread_lock_t to make it clear that this lock is for
	  native threads, not for ruby threads.

Tue Jul 23 16:14:57 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_before_sweep): fix spacing.

Tue Jul 23 15:57:11 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (heap_get_freeobj): clear slot->freelist here.
	  This means that this slot doesn't have any free objects.
	  And store this slot with objspace->heap.using_slot.

	* gc.c (gc_before_sweep): restore objspace->freelist
	  into objspace->heap.using_slot->freelist.
	  This means that using_slot has free objects which are
	  pointed from objspace->freelist.

	* gc.c (gc_slot_sweep): do not need to clear slot->freelist.

Tue Jul 23 09:34:49 2013  Zachary Scott  <e@zzak.io>

	* sample/drb/README*.rdoc: [DOC] migrate DRb sample READMEs to rdoc

Tue Jul 23 09:28:05 2013  Zachary Scott  <e@zzak.io>

	* lib/drb/invokemethod.rb: [DOC] nodoc InvokeMethod18Mixin

Tue Jul 23 08:44:37 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl_asn1.c (asn1time_to_time):  Implement YYMMDDhhmmZ
	  format for ASN.1 UTCTime.  [ruby-trunk - Bug #8664]
	* test/openssl/test_asn1.rb:  Test for the above.

Tue Jul 23 08:11:32 2013  Zachary Scott  <e@zzak.io>

	* lib/rexml/streamlistener.rb: [DOC] Fix examples in
	  REXML::StreamListener#entitydecl patch by Ippei Obayashi [Bug #8665]

Tue Jul 23 07:44:59 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems from master as of commit b165260
	* test/rubygems:  ditto.

Tue Jul 23 07:14:31 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mulsub_1xN): New function.
	  (bary_mul_toom3): Use bary_mulsub_1xN.

Tue Jul 23 03:32:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (KARATSUBA_BALANCED): New macro.
	  (TOOM3_BALANCED): Ditto.
	  (bary_mul_balance_with_mulfunc): Use KARATSUBA_BALANCED and
	  TOOM3_BALANCED.
	  (rb_big_mul_balance): Relax a condition.
	  (rb_big_mul_karatsuba): Use KARATSUBA_BALANCED.
	  (rb_big_mul_toom3): Use TOOM3_BALANCED.
	  (bary_mul_karatsuba_branch): Use KARATSUBA_BALANCED.
	  (bary_mul_toom3_branch): Use TOOM3_BALANCED.

Tue Jul 23 01:34:45 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem_mulsub): Extracted from bigdivrem1.
	  (bigdivrem1): Use bary_add.

Mon Jul 22 18:39:52 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_enumerate_chars): specify array capa
	  with str_strlen().

	* string.c (rb_str_enumerate_codepoints): ditto.

Mon Jul 22 18:01:33 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_enumerate_chars): specify array capa.

Mon Jul 22 17:24:14 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_each_char_size): performance improvement by
	  using rb_str_length().

Mon Jul 22 16:32:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): check by Check_TypedStruct
	  instead of rb_obj_is_kind_of.

Mon Jul 22 13:19:22 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_resize_capa): use RARRAY_RAWPTR() because
	  this code creates no new references.

Mon Jul 22 12:58:18 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_memfill): added.

	* array.c (rb_ary_initialize): use ary_memfill().

	* array.c (rb_ary_fill): ditto.

	* array.c (rb_ary_slice_bang): use RARRAY_RAWPTR() because
	  this code creates no new references.

Mon Jul 22 10:09:46 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_slot_sweep): need to add empty RVALUE as freeobj.

Mon Jul 22 09:48:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): use the given file name unless
	  eval even if scope is given.  additional fix for [Bug #8436].
	  based on the patch by srawlins at [ruby-core:56099] [Bug #8662].

Mon Jul 22 09:24:19 2013  Kouji Takao  <kouji@takao7.net>

	* ext/readline/readline.c (Init_readline): added
	  Readline.delete_text. [ruby-dev:45789] [Feature #6626]
	* ext/readline/extconf.rb: check for rl_delete_text() in Readline library.

	  Thanks, Nobuyoshi Nakada, for the patch.

Mon Jul 22 03:15:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
	  can be omitted.

Mon Jul 22 00:15:20 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_sq_fast): Refine expressions.

Sun Jul 21 21:08:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul): Use simple multiplication if yl is small.
	  (rb_cstr_to_inum): Invoke bigsq instead of bigmul0.
	  (bigsq): Re-implemented.
	  (bigmul0): Invoke bigsq if two arguments are identical.

Sun Jul 21 09:58:19 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_toom3): New function based on bigmul1_toom3.
	  (bary_mul_toom3_branch): Call bary_mul_toom3.
	  (rb_big_mul_toom3): Ditto.
	  (bigmul1_toom3): Removed.
	  (big_real_len): Ditto.
	  (big_split): Ditto.
	  (big_split3): Ditto.

Sun Jul 21 08:12:16 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* proc.c (proc_to_s): use PRIsVALUE to preserve the result encoding.

Sun Jul 21 03:36:18 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bit
	  platform. it's introduced by r42039

Sun Jul 21 01:07:45 2013  Benoit Daloze  <eregontp@gmail.com>

	* common.mk (help): Fix environment variable name and argument.
	  Actually it can also be a directory or any argument for
	  test/unit runner. [Fixes GH-363]

Sat Jul 20 22:44:50 2013  Zachary Scott  <e@zzak.io>

	* common.mk: Document running a single test [Fixes GH-363]
	  Patch by Avdi Grimm https://github.com/ruby/ruby/pull/363

Sat Jul 20 22:39:56 2013  Zachary Scott  <e@zzak.io>

	* sample/*: whitespace patch by Sergio Campama [Fixes GH-364]
	  https://github.com/ruby/ruby/pull/364

Sat Jul 20 22:33:13 2013  Zachary Scott  <e@zzak.io>

	* doc/regexp.rdoc: [DOC] Fix typo in example [Fixes GH-365]
	  Patch by Juanito Fatas https://github.com/ruby/ruby/pull/365

Sat Jul 20 17:46:03 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_succ): add missing case NEIGHBOR_WRAPPED.
	  r42078 caused buggy behavior like "\xFF".b -> "\x01\xFF".b

Sat Jul 20 15:22:38 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (rb_ary_resize): use simple memcpy because there are no new
	  references.

Sat Jul 20 15:02:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* safe.c (ruby_safe_level_4_warning): define for old extension
	  libraries.  [Bug #8652]

Sat Jul 20 14:38:00 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_make_shared): make shared array shady.
	  Making non-shady shared array causes SEGV (see rubyci).
	  It seems a bug around shared array.

Sat Jul 20 12:14:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (enc_succ_char, enc_pred_char): consider wchar case.
	  [ruby-core:56071] [Bug #8653]

	* string.c (rb_str_succ): do not replace with invalid char.

	* encoding.c (rb_enc_code_to_mbclen): add new function which returns
	  mbclen from codepoint like as rb_enc_codelen() but 0 for invalid
	  char.

	* include/ruby/encoding.h (rb_enc_code_to_mbclen): declaration and
	  shortcut macro.

Fri Jul 19 21:59:12 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: declare type_name() at the beginning of file.

Fri Jul 19 21:35:09 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c: reduce shady operations.

	* array.c (rb_ary_modify, ary_make_partial, rb_ary_splice,
	  rb_ary_replace, rb_ary_eql, rb_ary_compact_bang):
	  use RARRAY_RAWPTR() instead of RARRAY_PTR().

	* array.c (rb_ary_shift): use RARRAY_PTR_USE() without WB because
	  there are not new relations.

	* array.c (ary_ensure_room_for_unshift): ditto.

	* array.c (rb_ary_sort_bang): ditto.

	* array.c (rb_ary_delete_at): ditto.

	* array.c (rb_ary_reverse_m): use RARRAY_RAWPTR() because
	  there are not new relations.

Fri Jul 19 20:58:20 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c: reduce shade operations.

	* array.c (rb_ary_modify): use RARRAY_RAWPTR().

	* array.c (ary_make_substitution, rb_ary_s_create, ary_make_partial,
	  rb_ary_splice, rb_ary_resize, rb_ary_rotate_m, rb_ary_times):
	  use ary_memcpy().

Fri Jul 19 19:55:28 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_mem_clear): added. This operation doesn't need WB
	  because this operation creates a reference to Qnil.

	* array.c (ary_make_shared, rb_ary_store, rb_ary_shift_m,
	  rb_ary_splice, rb_ary_resize, rb_ary_fill): use ary_mem_clear()
	  instead of rb_mem_clear().

	* array.c (ary_make_shared): use RARRAY_RAWPTR() instead of RARRAY_PTR().

Fri Jul 19 19:18:51 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c: fix commit miss.
	  RGENGC_UNPROTECT_LOGGING should be 0.

Fri Jul 19 19:15:30 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (rb_ary_resurrect): use RARRAY_RAWPTR() because there is no
	  writing.

	* array.c (rb_ary_new_from_values): use ary_memcpy().

Fri Jul 19 19:07:31 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_memcpy): add a function to copy VALUEs into ary
	  with write barrier. If ary is promoted, use write barrier correctly.

	* array.c (rb_ary_cat, rb_ary_unshift_m, rb_ary_dup,
	  rb_ary_sort_bang, rb_ary_replace, rb_ary_plus): use ary_memcpy().

Fri Jul 19 15:32:57 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (rb_ary_store): use RARRAY_PTR_USE() instead of RARRAY_PTR().
	  Clearing memory space doesn't need WBs.

Fri Jul 19 15:19:37 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_ensure_room_for_push): use RARRAY_RAWPTR() instead of
	  RARRAY_PTR. In this code, there are no "write" operation.

	* array.c (rb_ary_equal): ditto.

	* array.c (recursive_equal): ditto.

Fri Jul 19 15:09:22 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c, internal.h (rb_gc_writebarrier_remember_promoted): add a new
	  function to remember an specified object. This api is only
	  experimental (strongly depend on WB/rgengc strategy).

Fri Jul 19 14:56:00 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_unprotect_logging): use (void *) for first parameter
	  because VALUE is not defined before including ruby/ruby.h.

Fri Jul 19 14:19:48 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
	  the result encoding.

Fri Jul 19 12:35:41 2013  Tanaka Akira  <akr@fsij.org>

	* test/socket/test_tcp.rb (test_initialize_failure): Use EADDRNOTAVAIL
	  to test an error message generated by bind() failure.

Fri Jul 19 11:27:38 2013  Zachary Scott  <e@zzak.io>

	* lib/racc/parser.rb: [DOC] Capitalize "Ruby" in documentation
	  Patch by Dave Worth https://github.com/ruby/ruby/pull/341

Fri Jul 19 11:26:28 2013  Zachary Scott  <e@zzak.io>

	* ext/psych/lib/psych*: [DOC] Capitalize "Ruby" in documentation
	  Patch by Dave Worth https://github.com/ruby/ruby/pull/341

Fri Jul 19 11:25:12 2013  Zachary Scott  <e@zzak.io>

	* lib/rdoc/*: [DOC] Capitalize "Ruby" in documentation
	  Patch by Dave Worth https://github.com/ruby/ruby/pull/341

Fri Jul 19 11:23:55 2013  Zachary Scott  <e@zzak.io>

	* lib/rubygems*: [DOC] Capitalize "Ruby" in documentation
	  Patch by Dave Worth https://github.com/ruby/ruby/pull/341

Fri Jul 19 11:16:54 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#to_set): Define Set#to_set so that aSet.to_set
	  returns self. [Fixes GH-359]

Fri Jul 19 11:10:23 2013  Zachary Scott  <e@zzak.io>

	* lib/rake/*: [DOC] Capitalize "Ruby" in documentation
	  Patch by Dave Worth https://github.com/ruby/ruby/pull/341

Fri Jul 19 01:04:14 2013  Tanaka Akira  <akr@fsij.org>

	* ext/-test-/bignum/intpack.c: Renamed from ext/-test-/bignum/pack.c.
	  (Init_intpack): Renamed from Init_pack.
	  Reported by Naohisa Goto.  [ruby-dev:47526] [Bug #8655]

Fri Jul 19 00:54:27 2013  Benoit Daloze  <eregontp@gmail.com>

	* test/ruby/test_array.rb (test_count): add a test case for #count
	  with an argument. See Bug #8654.

Thu Jul 18 23:45:06 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_eql): compare RARRAY_PTR() for performance
	  improvement in case of that self and other are shared.

Thu Jul 18 22:46:42 2013  Zachary Scott  <e@zzak.io>

	* lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]
	  Patch by Dave Worth https://github.com/ruby/ruby/pull/341
	* lib/webrick.rb: ditto
	* lib/scanf.rb: ditto
	* lib/xmlrpc/config.rb: ditto
	* lib/resolv.rb: ditto
	* lib/e2mmap.rb: ditto
	* lib/fileutils.rb: ditto
	* lib/mkmf.rb: ditto
	* lib/cgi/session.rb: ditto
	* lib/yaml.rb: ditto
	* lib/erb.rb: ditto
	* lib/irb.rb: ditto
	* lib/tracer.rb: ditto
	* lib/net/http.rb: ditto
	* ext/syslog/lib/syslog/logger.rb: ditto
	* sample/pty/expect_sample.rb: ditto

Thu Jul 18 21:30:50 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_sq_fast): Specialize the last iteration of the
	  outer loop.
	  (bigfixize): A condition simplified.

Thu Jul 18 21:15:41 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_equal): compare RARRAY_PTR() for performance
	  improvement in case of that self and other are shared.

Thu Jul 18 20:44:51 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_fill): use memfill().

Thu Jul 18 20:35:14 2013  Benoit Daloze  <eregontp@gmail.com>

	* array.c (rb_ary_count): check length to avoid SEGV
	  while iterating. Remove other pointer loop when arg is given.

	* test/ruby/test_array.rb (test_count): add test for bug.
	  [ruby-core:56072] [Bug #8654]

Thu Jul 18 18:14:36 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* array.c (rb_ary_count): iterate items appropriately.
	  [Bug #8654]

Thu Jul 18 17:35:41 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_flatten): performance improvement by not using
	  rb_hash_to_a() to avoid array creation with rb_assoc_new().

Thu Jul 18 16:16:17 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c: add logging feature for RGenGC's write barrier unprotect
	  event.

Thu Jul 18 15:45:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): make only
	  rb_set_safe_level(4) an error always but make rb_secure(4) an error
	  only in the core.  [ruby-dev:47517] [Bug #8652]

Thu Jul 18 15:42:01 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: fix spell miss.

Thu Jul 18 15:11:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (ruby_safe_level_4): get rid of special
	  character.  [ruby-dev:47512] [misc #8646]

Thu Jul 18 14:51:39 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (ary_alloc): slim setup process.

Thu Jul 18 14:37:57 2013  Koichi Sasada  <ko1@atdot.net>

	* string.c (str_alloc): no need to clear RString (already cleared).

Thu Jul 18 12:57:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BDIGITS_ZERO): Defined.
	  (bary_pack): Use BDIGITS_ZERO.
	  (bary_unpack): Ditto.
	  (bary_mul_single): Ditto.
	  (bary_mul_normal): Ditto.
	  (bary_sq_fast): Ditto.
	  (bary_mul_balance_with_mulfunc): Ditto.
	  (bary_mul_precheck): Ditto.
	  (bary_mul_toom3_branch): Ditto.
	  (rb_cstr_to_inum): Ditto.
	  (big_shift3): Ditto.
	  (bigmul1_toom3): Ditto.
	  (bary_divmod): Ditto.

Thu Jul 18 06:30:02 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: rename gc related functions with prefix "gc_".
	  * before_gc_sweep() -> gc_before_sweep().
	  * after_gc_sweep()  -> gc_after_sweep().
	  * lazy_sweep()      -> gc_lazy_sweep().
	  * rest_sweep()      -> gc_rest_sweep().
	  * slot_sweep()      -> gc_slot_sweep().

	* gc.c: rename a heap management function with prefix "heap_".
	  * get_freeobj() -> heap_get_freeobj().

	* gc.c: rename markable_object_p() to is_markable_object().

Wed Jul 17 22:57:40 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (delete_if_i): use ST_DELETE.

Wed Jul 17 22:34:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: An static assertion for relation of SIZEOF_LONG and
	  SIZEOF_BDIGITS is added.
	  (bary_mul_precheck): Reduce comparisons.
	  (bary_mul): Invoke bary_sq_fast or bary_mul1 if the bignum size is
	  small.
	  (bigfixize): Resize the argument bignum here.
	  (bignorm): Don't call bigtrunc after bigfixize.

Wed Jul 17 22:13:26 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_replace): performance improvement by using
	  st_copy().

Wed Jul 17 17:19:54 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: rename heap management functions with prefix "heap_".
	  * allocate_sorted_array() -> heap_allocate_sorted_array().
	  * slot_add_freeobj()      -> heap_slot_add_freeobj().
	  * assign_heap_slot()      -> heap_assign_slot().
	  * add_heap_slots()        -> heap_add_slots().
	  * init_heap()             -> heap_init().
	  * set_heap_increment()    -> heap_set_increment().

	* gc.c (initial_expand_heap): inlined in rb_gc_set_params().

Wed Jul 17 17:12:23 2013  Matthew M. Boedicker  <matthewm@boedicker.org>

	* hash.c (env_fetch): Add key name to message on ENV.fetch KeyError,
	  as well as Hash#fetch.  [ruby-core:56062] [Feature #8649]

Wed Jul 17 15:59:33 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: catch up last changes for debugging/checking mode.

Wed Jul 17 15:50:10 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace_free): free slot itself.

	* gc.c (objspace_each_objects): fix condition.
	  Use slot->body instead of slot.

	* gc.c (count_objects): use "slot" variable.

Wed Jul 17 15:21:10 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (unlink_heap_slot): fix memory leak.
	  free slot itself at free_heap_slot().

	  Reproduce-able code is here:
	    N1 = 100_000; N2 = 1_000_000
	    N1.times{ary = []; N2.times{ary << ''}}
	  Maybe this problem is remaining in Ruby 2.0.0.

	* gc.c (unlink_heap_slot): remove not working code.

Wed Jul 17 14:31:13 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: re-design the heap structure.

	  (1) The heap is consists of a set of slots.
	  (2) Each "slot" has a "slot_body".
	      slot::start and slot::limit specify RVALUE beginning address
	      and number of RVALUE in a "slot_body".
	  (3) "slot_body" contains a pointer to slot (slot_body::header::slot)
	      and an array of RVALUE.
	  (4) heap::sorted is an array of "slots", sorted by an address of
	      slot::body.

	  See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design
	  for more details (figure).

	* gc.c: Avoid "heaps" terminology. It is ambiguous.

Wed Jul 17 13:29:16 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix heaps_header and heaps_slot to reduce memory consumption.
	  (1) move heaps_header::start and limit to  heaps_slot.
	  (2) remove heaps_header::end which can be calculated by start+limit.

	* gc.c: catch up above change.

Wed Jul 17 12:30:05 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/st.h (st_strcasecmp): Macro defined for compatibility.
	  (st_strncasecmp): Ditto.

Wed Jul 17 11:57:45 2013  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi/util.rb (CGI::Util#escape, unescape): Avoid use of regexp
	  special global variable. [Feature #8648] Thanks to fotos.

Wed Jul 17 11:57:10 2013  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/erb.rb (ERB::Util#url_encode): Avoid use of regexp special global
	  variable. [Feature #8648] Thanks to fotos.

Wed Jul 17 08:12:41 2013  Tanaka Akira  <akr@fsij.org>

	* st.c (st_locale_insensitive_strcasecmp): Renamed from st_strcasecmp.
	  (st_locale_insensitive_strncasecmp): Renamed from st_strncasecmp.

	* include/ruby/st.h: Follow above changes.

	* include/ruby/ruby.h: Ditto.

Wed Jul 17 00:14:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigmul1_toom3): Use bigdivrem_single instead of bigdivrem.
	  (big_three): Removed.
	  (Init_Bignum): Don't initialize big_three.

Tue Jul 16 21:46:03 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* configure.in: revert r42008. strcasecmp() uses the current locale.

	* include/ruby/ruby.h: ditto.

	* st.c (st_strcasecmp): ditto.

Tue Jul 16 21:07:04 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* configure.in: check strcasecmp().

	* include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it
	  exists.

	* st.c (st_strcasecmp): define the function only if strcasecmp()
	  doesn't exist.

Tue Jul 16 20:21:28 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigsq): Renamed from bigsqr.

Tue Jul 16 19:42:08 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (USHORT): Unused macro removed.

Tue Jul 16 19:18:51 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: slim a path of newobj_of().

	* gc.c (objspace): add a new field objspace::freelist, which contains
	  available RVALUEs.

	* gc.c (newobj_of): simply call new function `get_freeobj()'.
	  get_freeobj() returns objspace::freelist. If  objspace::freelist
	  is not available, refill objspace::freelist with a slot pointed by
	  objspace::heap::free_slots.

	* gc.c (before_gc_sweep): clear objspace::freelist.

	* gc.c (slot_sweep): clear slot::freelist.

	* gc.c (heaps_prepare_freeslot): renamed to heaps_prepare_freeslot.

	* gc.c (unlink_free_heap_slot): remove unused function.

	* gc.c (rb_free_const_table): remove unused function.

Tue Jul 16 19:05:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_shift3): Big shift width is not a problem for right
	  shift.

Tue Jul 16 18:50:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_count): [DOC] fix typo.  Array#count uses ==, not
	  ===.  a question at asakusa.rb ML.

Tue Jul 16 18:35:48 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_karatsuba): Avoid duplicate calculation when
	  squaring.
	  (bary_mul_toom3_branch): Ditto.

Tue Jul 16 17:43:22 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (link_free_heap_slot): removed.

	* gc.c (slot_sweep): use `heaps_add_freeslot' instead of
	  `link_free_heap_slot'.

	* gc.c (assign_heap_slot): use local variable `slot' instead of
	  `heaps'.

Tue Jul 16 17:21:39 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (assign_heap_slot): refactoring variable names.

	* gc.c (slot_add_freeobj): added.

	* gc.c (heaps_add_freeslot): added.

	* gc.c (finalize_list, rb_gc_force_recycle, slot_sweep): use
	  `slot_add_freeobj' instead of modifying linked list directly.

Tue Jul 16 16:30:58 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (lazy_sweep): refactoring.

Tue Jul 16 13:32:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (enc_set_index): since r41967, old terminator is dealt
	  with in str_fill_term().  should not consider it here because this
	  function is called before any encoding is set.

Tue Jul 16 11:12:03 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* proc.c (rb_block_arity): raise ArgumentError if no block given.

Tue Jul 16 08:15:22 2013  Zachary Scott  <e@zzak.io>

	* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] document top-level
	  classes from BigDecimal utils native extensions

Tue Jul 16 03:23:03 2013  Zachary Scott  <e@zzak.io>

	* numeric.c: [DOC] improve rdoc formatting for parameters and links

Mon Jul 15 14:40:00 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h (rb_big2str0): Deprecated.

	* bignum.c (rb_big2str1): Renamed from rb_big2str0.
	  (rb_big2str0): Deprecated wrapper for rb_big2str1.
	  (rb_big2str): Invoke rb_big2str1 instead of rb_big2str0.

Mon Jul 15 14:13:02 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* struct.c (rb_struct_each_pair): use rb_yield_values(2, key, value)
	  instead of rb_yield(rb_assoc_new(key, value)) if rb_block_arity()
	  is greater than 1.

Mon Jul 15 13:46:26 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Add static assertions.

Mon Jul 15 13:36:02 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_each_pair): performance improvement by using
	  rb_block_arity().

Mon Jul 15 13:15:37 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* proc.c (rb_block_arity): create internal API rb_block_arity().
	  it returns arity of given block.

Mon Jul 15 13:07:27 2013  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* lib/prime.rb (Prime::EratosthenesGenerator,
	  Prime::EratosthenesSieve): New implementation by
	  robertjlooby <robertjlooby AT gmail.com>.

	* test/test_prime.rb: updated with new method name

Mon Jul 15 11:32:46 2013  Zachary Scott  <e@zzak.io>

	* numeric.c (rb_cNumeric): [DOC] Added comment for Numeric to fix doc

Mon Jul 15 11:24:48 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (maxpow_in_bdigit_dbl): Useless #if removed.

Mon Jul 15 11:10:46 2013  Zachary Scott  <e@zzak.io>

	* bignum.c (rb_big_coerce): [DOC] Add docs for Bignum#coerce
	  Based on patch by Juanito Fatas [Fixes GH-360]
	  https://github.com/ruby/ruby/pull/360

Mon Jul 15 10:56:01 2013  Zachary Scott  <e@zzak.io>

	* thread.c (mutex_sleep): [DOC] Awake thread will reacquire lock
	  By Tim Abdulla [Fixes GH-342] https://github.com/ruby/ruby/pull/342

Mon Jul 15 10:45:09 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (nlz16): Use __builtin_clz if possible.
	  (nlz32): Use __builtin_clz or __builtin_clzl if possible.
	  (nlz64): Use __builtin_clzl or __builtin_clzll if possible.
	  (nlz128): Use __builtin_clzll if possible.

	* configure.in: Check __builtin_clz, __builtin_clzl and
	  __builtin_clzll.

Mon Jul 15 09:39:07 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (power_cache_get_power): Use bitsize instead of ceil_log2.
	  (ones): Removed.
	  (next_pow2): Removed.
	  (floor_log2): Removed.
	  (ceil_log2): Removed.

	* configure.in (__builtin_popcountl): Don't check.

Mon Jul 15 02:47:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* localeinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
	  move from encoding.c.

	* miniinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
	  define miniruby specific functions only.

Mon Jul 15 02:32:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (rb_enc_init): no longer needs NO_PRESERVED_ENCODING.

	* encoding.c (enc_inspect): defer loading autoloaded encoding.

	* encoding.c (enc_check_encoding): use is_data_encoding() to check
	  type consistently.

	* encoding.c (must_encoding): return rb_encoding* instead of encoding
	  index.

	* encoding.c (enc_check_encoding): use is_data_encoding() to check
	  type consistently.

	* encoding.c (must_encoding): return rb_encoding* instead of encoding
	  index.

Mon Jul 15 02:21:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_fill_term): consider old terminator length, and should
	  not use rb_enc_ascget since it depends on the current encoding which
	  may not be compatible with the new terminator.  [Bug #8634]

	* encoding.c (enc_inspect): use PRIsVALUE to preserve the result
	  encoding.

Sun Jul 14 23:21:47 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Check __builtin_popcountl, __builtin_bswap32 and
	  __builtin_bswap64.

	* internal.h (swap32): Use the configure result for the condition to
	  use __builtin_bswap32.
	  (swap64): Use the configure result for the condition to use
	  __builtin_bswap64.

	* bignum.c (ones): Use the configure result for the condition to use
	  __builtin_popcountl.
	  (bary_unpack_internal): Use appropriate types for swap argument.

Sun Jul 14 22:21:11 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_subb): Support xn < yn.
	  (bigsub_core): Removed.
	  (bigsub): Don't compare before subtraction.  Just subtract and
	  get the two's complement if the subtraction causes a borrow.

Sun Jul 14 00:36:03 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (DIGSPERLONG): Unused macro removed.
	  (DIGSPERLL): Ditto.

Sun Jul 14 00:32:51 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_aref): Less scan when the number is negative.

Sun Jul 14 00:17:42 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_shift): Avoid signed integer overflow.

Sun Jul 14 00:14:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_precheck): Use bary_small_lshift or
	  bary_mul_normal if xl is 1.

Sat Jul 13 22:58:16 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_shift3): New function.
	  big_lshift and big_rshift are merged.
	  (big_shift2): New function.
	  (big_lshift): Use big_shift3.
	  (big_rshift): Ditto.
	  (check_shiftdown): Removed.
	  (rb_big_lshift): Use big_shift2 and big_shift3.
	  (rb_big_rshift): Ditto.
	  (big_lshift): Removed.
	  (big_rshift): Ditto.

Sat Jul 13 15:51:38 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_small_lshift): Use size_t instead of long.
	  (bary_small_rshift): Ditto.

Sat Jul 13 15:33:33 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_small_lshift): Functions moved to remove
	  declaration.
	  (bary_small_rshift): Ditto.

Sat Jul 13 12:27:34 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (rb_enc_associate_index): fill new terminator length, not
	  old one.

Sat Jul 13 12:24:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32: move from ext/dl and ext/fiddle.  since ext/extmk.rb
	  builds extensions in alphabetical order, compiled?('fiddle') under
	  ext/dl makes no sense.

Sat Jul 13 09:26:09 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (biglsh_bang): Removed.
	  (bigrsh_bang): Ditto.
	  (bigmul1_toom3): Use bary_small_lshift and bary_small_rshift.

Sat Jul 13 01:04:43 2013  Zachary Scott  <e@zzak.io>

	* lib/rubygems/psych_additions.rb: Ignore Psych docs here

Fri Jul 12 18:10:46 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/fiddle/win32/lib/win32/registry.rb
	  (Win32::Registry::API#make_wstr): same as r41922.

Fri Jul 12 16:28:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (rb_enc_associate_index): refill the terminator if it
	  becomes longer than before.  [ruby-dev:47500] [Bug #8624]

	* string.c (str_null_char, str_fill_term): get rid of out of bound
	  access.

	* string.c (rb_str_fill_terminator): add a parameter for the length of
	  new terminator.

Fri Jul 12 11:26:25 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_reject_bang): do not call rb_hash_foreach() if RHash
	  has ntbl and it is empty.

Fri Jul 12 11:17:41 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (recursive_hash): use RHASH_SIZE() to check hash size.

Fri Jul 12 00:20:00 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_size): use RHASH_SIZE().

Fri Jul 12 00:08:24 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_values): set array capa to RHASH_SIZE().

Thu Jul 11 23:54:45 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* hash.c (rb_hash_keys): set array capa to RHASH_SIZE().

Thu Jul 11 21:30:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
	  recursive call.  re-fix [Bug #8495].  [ruby-core:55923] [Bug #8621]

Thu Jul 11 20:18:13 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/win32/lib/win32/registry.rb (Win32::Registry::API#make_wstr):
	  remove workaround to append WCHAR terminator.

	* transcode.c (str_encode_associate): fill terminator after conversion.

	* string.c (rb_enc_str_new, rb_str_set_len, rb_str_resize): fill
	  minimum length of the encoding as the terminator.

	* string.c (str_buf_cat, rb_str_buf_append, rb_str_splice_0): ditto.

	* string.c (str_make_independent_expand, rb_str_modify_expand): make
	  the capacity enough for multi-byte terminator.

	* string.c (rb_string_value_cstr): fill minimum length of the encoding
	  as the terminator.

	* string.c (rb_string_value_cstr): check null char in char, not in
	  byte.

Thu Jul 11 14:48:35 2013  Zachary Scott  <e@zzak.io>

	* array.c: Replace confusing example for #reverse_each in overview
	  Patch by Earl St Sauver [Fixes documenting-ruby/ruby-12]
	  https://github.com/documenting-ruby/ruby/pull/12

Thu Jul 11 14:22:37 2013  Zachary Scott  <e@zzak.io>

	* test/drb/ut_eq.rb: Use localhost for drb tests [Bug #7311]
	  Patch by Vit Ondruch [ruby-core:49101]
	* test/drb/ut_array.rb: ditto
	* test/drb/ut_array_drbssl.rb: ditto

Thu Jul 11 13:48:03 2013  Zachary Scott  <e@zzak.io>

	* sprintf.c: Fix typo patch by @hynkle [Fixes GH-357]
	  https://github.com/ruby/ruby/pull/357

Thu Jul 11 13:00:34 2013  Zachary Scott  <e@zzak.io>

	* lib/securerandom.rb: Refactor conditions by Rafal Chmiel
	  [Fixes GH-326] https://github.com/ruby/ruby/pull/326

Thu Jul 11 12:04:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Don't use toom3 after once karatsuba is chosen.
	  (mulfunc_t): New type.
	  (bary_mul_toom3_start): Renamed from bary_mul.
	  (bary_mul_karatsuba_start): Renamed from bary_mul.
	  (bary_mul_balance_with_mulfunc): Renamed from bary_mul_balance and
	  new argument, mulfunc, is added.
	  (rb_big_mul_balance): Invoke bary_mul_balance_with_mulfunc with
	  bary_mul_toom3_start.
	  (bary_mul_karatsuba): Invoke bary_mul_karatsuba_start instead of
	  bary_mul.
	  (bary_mul_precheck): Extracted from bary_mul.
	  (bary_mul_karatsuba_branch): Extracted from bary_mul.
	  (bary_mul_karatsuba_start): New function to call bary_mul_precheck
	  and bary_mul_karatsuba_branch.
	  (bary_mul_toom3_branch): Extracted from bary_mul.
	  (bary_mul_toom3_start): New function to call bary_mul_precheck and
	  bary_mul_toom3_branch.
	  (bary_mul): Just call bary_mul_toom3_start.
	  Arguments for work memory are removed.
	  (rb_cstr_to_inum): Follow the bary_mul change.
	  (bigmul0): Ditto.

Thu Jul 11 10:46:38 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/probes_to_wiki.rb: fix usage comment.  use Enumerable#grep
	  which yields each elements to reduce unnecessary array.

Thu Jul 11 10:09:18 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* process.c (rb_daemon): daemon(3) is implemented with fork(2).
	  Therefore it needs rb_thread_atfork(). (and revert r41903)

Thu Jul 11 03:22:10 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki
	  format for easy wiki updates.

Thu Jul 11 00:54:07 2013  Zachary Scott  <zachary@zacharyscott.net>

	* man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill

Thu Jul 11 00:48:29 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/delegate.rb: Add example for __setobj__ and __getobj__
	  [Bug #8615] Patch by Caleb Thompson

Wed Jul 10 23:29:22 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/logger.rb: Use :call-seq: for method signature rdoc

Wed Jul 10 23:23:18 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/logger.rb (#add): Remove incorrect rdoc for return value
	  [Bug #8567] Reported by Tim Pease.

Wed Jul 10 23:12:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_subpos): make public function.

Wed Jul 10 22:44:19 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Add a static assertion for RBIGNUM_EMBED_LEN_MAX.

Wed Jul 10 22:31:25 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* string.c (rb_str_index): cache single byte flag and some
	  cosmetic changes.

Wed Jul 10 22:03:27 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_2comp): Don't use bary_plus_one.
	  (bary_add_one): Replaced by the implementation of bary_plus_one.

Wed Jul 10 20:48:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (sizeof_bdigit_dbl): check sizeof(BDIGIT_DBL).

	* internal.h (STATIC_ASSERT): move from enum.c.

Wed Jul 10 20:08:21 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (SIZEOF_BDIGIT_DBL): Add a ifdef guard for test.

Wed Jul 10 14:18:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (fork_daemon): kill the other threads all and abandon the
	  kept mutexes.

Wed Jul 10 11:35:36 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/net/http/test_http.rb (TestNetHTTP_v1_2#test_get,
	  TestNetHTTP_v1_2_chunked#test_get): shouldn't check
	  HttpResponse#decode_content if Zlib is not available.
	  ko1 complained via IRC.

Wed Jul 10 10:20:07 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/rbinstall.rb: always require rubygems to stabilize rubygems
	  related status like whether Gem::Specification is defined or not.

	* tool/rbinstall.rb (Gem::Specification.unresolved_deps): define stub.

Wed Jul 10 08:21:15 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems 2.1
	* test/rubygems:  Ditto.

Wed Jul 10 07:34:34 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/ext/ext_conf_builder.rb:  Remove siteconf file after
	  building the gem.
	* test/rubygems/test_gem_ext_ext_conf_builder.rb:  Test for the above.

	* lib/rubygems/psych_tree.rb (module Gem):  Add backward compatibility
	  for r41148

	* test/rubygems/test_gem_package.rb:  Add backward compatibility for
	  double-slash elimination.

Wed Jul 10 06:22:27 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c (date_zone_to_diff): [ruby-core:55831].

Wed Jul 10 00:41:42 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul): x*1 is x.

Tue Jul  9 22:24:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul1): No need to invoke MEMZERO at last.
	  (bary_mul_single): Invoke MEMZERO here.

Tue Jul  9 21:40:01 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_text.rb: Add missing tests for Text#<<.
	  Reported by nagachika. Thanks!!!

Tue Jul  9 18:02:38 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#chown_R): Do not skip traversal even
	  if user and group are both nil, to be consistent with #chown and
	  other commands.

Tue Jul  9 17:58:26 2013  Akinori MUSHA  <knu@iDaemons.org>

	* test/fileutils/test_fileutils.rb
	  (TestFileUtils#assert_output_lines): New utility assertion
	  method for testing verbose output.

Tue Jul  9 17:43:57 2013  Koichi Sasada  <ko1@atdot.net>

	* test/test_tracer.rb: catch up recent rubygems changes.

Tue Jul  9 16:58:30 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/{dl,fiddle}/win32/lib/win32/registry.rb: hope that the final
	  resolution to fix the failure of test-all.  and includes Win64
	  support (fixed a potential bug).

Tue Jul  9 15:57:20 2013  Akinori MUSHA  <knu@iDaemons.org>

	* object.c: Fix rdoc for Kernel#<=>. [Fixes GH-352]

Tue Jul  9 15:53:51 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#mode_to_s): Define mode_to_s() also
	  as singleton method, or FileUtils.chmod fails in verbose mode.

Tue Jul  9 15:16:02 2013  Akinori MUSHA  <knu@iDaemons.org>

	* test/fileutils/fileasserts.rb
	  (Test::Unit::FileAssertions#assert_not_symlink): Add a missing
	  optional argument "message".

Tue Jul  9 15:03:24 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): If user
	  and group are both nil, print ":".

Tue Jul  9 12:47:08 2013  Masaki Matsushita  <glass.saga@gmail.com>

	* io.c (appendline): use READ_CHAR_PENDING_XXX macros and
	  RSTRING_END().

	* io.c (rb_io_getline_1): rewrite nested if statement into one
	  statement.

Tue Jul  9 11:04:35 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/{dl,fiddle}/win32/lib/win32/registry.rb (Win32::Registry#check):
	  should report the position of the error.

	* ext/{dl,fiddle}/win32/lib/win32/registry.rb
	  (Win32::Registry#QueryValue): workaround for test-all crash.

Tue Jul  9 10:27:56 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/{dl,fiddle}/win32/lib/win32/registry.rb
	  (Win32::Registry.expand_environ): use suitable encoding for the
	  string.

	* ext/{dl,fiddle}/win32/lib/win32/registry.rb (Win32::Registry#read):
	  should return REG_SZ, REG_EXPAND_SZ and REG_MULTI_SZ values with
	  the expected encoding -- assumed as the same encoding of name.

Tue Jul  9 10:02:45 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/{dl,fiddle}/win32/lib/win32/registry.rb
	  (Win32::Registry::Error#initialize): use suitable encoding for the
	  string.

Tue Jul  9 09:46:53 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/win32/lib/win32/registry.rb (Win32::Registry.expand_environ):
	  use suitable encoding for the string.  fixed a test-all error of
	  r41838.

	* ext/fiddle/win32/lib/win32/registry.rb: same changes of r41838 and
	  this revision of dl's win32/registry.rb.

Tue Jul  9 07:39:45 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 2.0.4.  See
	  https://github.com/rubygems/rubygems/blob/2.0/History.txt for changes

Tue Jul  9 01:47:16 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (biglsh_bang): Don't shift a BDIGIT with BITSPERDIG bits.
	  (bigrsh_bang): Ditto.

Tue Jul  9 01:17:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigrsh_bang): Fix bignum digits overrun.

Tue Jul  9 00:46:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (biglsh_bang): Fix bignum digits under-run.

Mon Jul  8 23:36:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/win32/lib/win32/registry.rb (Error, API): use WCHAR
	  interfaces.  c.f. [Bug #8508]

Mon Jul  8 23:13:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_pow): move from win32.h and disable strict
	  ANSI mode macro to let _controlfp() stuff defined.
	  [ruby-core:55312] [Bug #8495]

	* numeric.c (finite): add declaration for strict ANSI.
	  [ruby-core:55312] [Bug #8495]

	* thread_win32.c (w32_thread_start_func, thread_start_func_1),
	  (timer_thread_func): use __stdcall instead of _stdcall which is
	  unavailable in strict ANSI mode.  [ruby-core:55312] [Bug #8495]

	* win32/win32.c (gettimeofday): use __cdecl instead of _cdecl.

Mon Jul  8 22:41:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul): Arguments for work memory added.
	  (bary_mul_balance): Ditto.
	  (bary_mul_karatsuba): Ditto.

Mon Jul  8 22:03:30 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_sq_fast): New function for testing.
	  (rb_big_mul_toom3): Ditto.

	* internal.h (rb_big_sq_fast): Declared.
	  (rb_big_mul_toom3): Ditto.

Mon Jul  8 21:59:34 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_balance): Initialize a local variable to suppress
	  a warning.

Mon Jul  8 20:55:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_balance): Reduce work memory.

Mon Jul  8 08:26:15 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
	  they are not suitable for ECDSA.
	  [ruby-core:54881] [Bug #8384]

Mon Jul  8 08:03:01 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul): Add a RB_GC_GUARD.

Sun Jul  7 23:56:32 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_karatsuba): Unreachable code removed.  Remove
	  several branches.

Sun Jul  7 22:59:06 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_big_mul_normal): Declared.
	  (rb_big_mul_balance): Ditto.
	  (rb_big_mul_karatsuba): Ditto.

	* bignum.c (rb_big_mul_normal): New function for tests.
	  (rb_big_mul_balance): Ditto.
	  (rb_big_mul_karatsuba): Ditto.

Sun Jul  7 19:21:30 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Reorder functions to decrease forward reference.

Sun Jul  7 14:41:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: (bigsub_core): Use bary_sub.
	  (bary_sub): Returns a borrow flag.  Use bary_subb.
	  (bary_subb): New function for actually calculating subtraction with
	  borrow.
	  (bary_sub_one): New function.
	  (bigadd_core): Use bary_add.
	  (bary_add): Returns a carry flag.  Use bary_addc.
	  (bary_addc): New function for actually calculating addition with
	  carry.
	  (bary_add_one): New function.
	  (bary_muladd_1xN): Extracted from bary_mul_normal.
	  (bigmul1_normal): Removed.
	  (bary_mul_karatsuba): New function.
	  (bary_mul1): Invoke rb_thread_check_ints after bary_mul_normal.
	  (bary_mul): Remove most and least significant zeros before actual
	  multiplication.  Use bary_sq_fast, bary_mul_balance,
	  bary_mul_karatsuba and bigmul1_toom3 as bigmul0.
	  (bigmul1_balance): Removed.
	  (bigmul1_karatsuba): Removed.
	  (bigsqr_fast): Removed.
	  (bary_sparse_p): Extracted from big_sparse_p.
	  (big_sparse_p): Removed.
	  (bigmul0): Use bary_mul.

Sun Jul  7 11:54:33 2013  Kouhei Sutou  <kou@cozmixng.org>

	* NEWS: Add REXML::Text#<< related updates.

Sun Jul  7 11:49:19 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/text.rb (REXML::Text#<<): Support appending in not
	  "raw" mode. [Bug #8602] [ruby-dev:47482]
	  Reported by Ippei Obayashi. Thanks!!!

Sun Jul  7 11:43:13 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/text.rb (REXML::Text#<<): Support method chain use by "<<"
	  like other objects.

Sun Jul  7 11:34:18 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/text.rb (REXML::Text#clear_cache): Extract common
	  cache clear code.

Sun Jul  7 11:01:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_DTRACE_POSTPROCESS): dtrace version SUN D 1.11
	  introduces a check in the dtrace compiler to ensure that probes
	  actually exist. If there are no probes, then the -G step will
	  fail. As this test is only being used to determine whether -G is
	  necessary (for instance, on OSX it is not), adding a real probe to
	  the conftest allows it to succeed on newer versions of dtrace.
	  Patch by Eric Saxby <sax AT livinginthepast.org> at
	  [ruby-core:55826].  [Fixes GH-351], [Bug #8606].

Sun Jul  7 10:07:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_sq_fast): Extracted from bigsqr_fast and
	  ensure not to access zds[2*xn].
	  (bigsqr_fast): Allocate the result bignum with 2*xn words.

Sat Jul  6 07:37:43 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds of
	  OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not
	  defined.
	* test/openssl/test_pkey_ec.rb: Iterate over built-in curves
	  (and assert their non-emptiness!) instead of hard-coding them, as
	  this may cause problems with respect to the different availability
	  of individual curves in individual OpenSSL builds.
	  [ruby-core:54881] [Bug #8384]

	  Thanks to Vit Ondruch for providing the patch!

Sat Jul  6 07:12:39 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* test/openssl/test_x509crl.rb: Remove unused variable.
	  [ruby-core:53501] [Bug #8114]

	  Thanks, Vipul Amler, for pointing this out!

Sat Jul  6 06:37:10 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl.c: Provide CRYPTO_set_locking_callback() and
	  CRYPTO_set_id_callback() callback functions ossl_thread_id and
	  ossl_lock_callback to ensure the OpenSSL extension is usable in
	  multi-threaded environments.
	  [ruby-core:54900] [Bug #8386]

	  Thanks, Dirkjan Bussink, for the patch!

Sat Jul  6 06:06:16 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* lib/openssl/ssl.rb: Fix SSL client connection crash for SAN marked
	  critical.
	  The patch for CVE-2013-4073 caused SSL crash when a SSL server returns
	  the certificate that has critical SAN value.  X509 extension could
	  include 2 or 3 elements in it:

	  [id, criticality, octet_string] if critical,
	  [id, octet_string] if not.

	  Making sure to pick the last element of X509 extension and use it as
	  SAN value.
	  [ruby-core:55685] [Bug #8575]

	  Thank you @nahi for providing the patch!

Sat Jul  6 04:49:38 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: register time objects so
	  they are referenced as ids during output.
	* test/psych/test_date_time.rb: corresponding test.

Fri Jul  5 20:46:39 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic): this
	  assertion doesn't seems to be checking the unicode string on command
	  line, but seems to be checking how to treat the unicode string from
	  stdin.  so, should escape '\' before 'u'.  this fixes a test failure
	  on Windows.

Fri Jul  5 19:05:40 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): Fix the
	  wrong output message when user is nil, which should be "chown
	  :group file" instead of "chown group file".

Fri Jul  5 16:21:56 2013  Akinori MUSHA  <knu@iDaemons.org>

	* test/ruby/test_regexp.rb
	  (TestRegexp#test_options_in_look_behind)
	  (TestRegexp#assert_match_at): Add tests for another problem
	  fixed in Onigmo 5.13.5.  Previously Onigmo did not allow option
	  enclosures in look-behind, which makes it impossible to
	  interpolate a regexp into another in the middle of a look-behind
	  pattern.  cf. https://github.com/k-takata/Onigmo/pull/17

	* test/ruby/test_regexp.rb
	  (TestRegexp#test_options_in_look_behind)
	  (TestRegexp#assert_match_at): Parse regexps in run time rather
	  than in compile time.

Fri Jul  5 12:14:40 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_notfound): after
	  r41710, the path of command uses backslash as the separator on
	  Windows.

Fri Jul  5 11:29:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb (assert_raise_with_message): move from
	  test/fileutils/test_fileutils.rb.  this is still experimental and
	  the interface may be changed.

Fri Jul  5 11:08:00 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (w32_spawn): r41710 made that if the command starts with
	  a quote and includes slash, removed the top quote and NOT removed the
	  last quote.
	  this fixes test failures on test/ruby/test_process.rb and
	  test/webrick.

Fri Jul  5 09:53:15 2013  NARUSE, Yui  <naruse@ruby-lang.org>
	* lib/mkmf.rb (CONFIG['CPPOUTFILE']): fix r41769; CONFIG['CPPOUTFILE']
	  may be nil.

Fri Jul  5 05:39:53 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BARY_MUL1): Renamed from BARY_MUL.
	  (bary_mul1): Renamed from bary_mul.
	  (bary_mul): Renamed from bary_mul2.

Fri Jul  5 04:58:05 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul_balance): Extracted from bigmul1_balance and
	  use bary_mul2 and bary_add to decrease allocations.

Fri Jul  5 02:14:00 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): Fix the wrong
	  character class [+-=], which happened to match all desired
	  characters but also match undesired characters.

	* lib/fileutils.rb (FileUtils.chmod{,_R}): Enhance the symbolic
	  mode parser to support the permission symbols u/g/o and multiple
	  actions as defined in SUS, so that chmod("g=o+w", file) works as
	  expected.  Invalid symbolic modes are now rejected with
	  ArgumentError.

Fri Jul  5 00:25:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_framework): allow header file to check.
	  [ruby-core:55745] [Bug #8593]

Thu Jul  4 22:31:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* object.c (rb_obj_equal): Fixed an rb_obj_equal documentation typo
	  where "a" was used instead of "obj".
	  Fixes GH-349. Patch by @adnandoric

Thu Jul  4 20:39:20 2013  Tanaka Akira  <akr@fsij.org>

	* tool/make-snapshot: Exit with EXIT_FAILURE when it fails.

Thu Jul  4 20:20:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (maxpow_in_bdigit_dbl): Use tables if available.
	  (maxpow_in_bdigit): Ditto.
	  (U16): New macro.
	  (U32): Ditto.
	  (U64): Ditto.
	  (U128): Ditto.
	  (maxpow16_exp): New table.
	  (maxpow16_num): New table.
	  (maxpow32_exp): New table.
	  (maxpow32_num): New table.
	  (maxpow64_exp): New table.
	  (maxpow64_num): New table.
	  (maxpow128_exp): New table.
	  (maxpow128_num): New table.

Thu Jul  4 18:25:25 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_cstr_to_inum): Avoid temporary buffer allocation except
	  very big base non-power-of-2 numbers.

Thu Jul  4 15:51:56 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_succ): use ONIGENC_MBCLEN_CHARFOUND_P correctly.

	* string.c (rb_str_dump): ditto.

Thu Jul  4 10:04:11 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.

	  * [bug]  (thanks Akinori MUSHA and Ippei Obayashi)
	           Fix a renumbering bug in condition regexp with a named
	           capture. [Bug #8583]
	  * [spec] (thanks Akinori MUSHA)
	    Allow ENCLOSE_OPTION in look-behind.

Thu Jul  4 00:36:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h (SIGNED_INTEGER_MAX): suppress warning C4146 on VC6.
	  seems a logical ORed expression becomes unsigned.

Thu Jul  4 00:13:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
	  directly.

	* ruby_atomic.h (ATOMIC_CAS): fix missing function call.

Wed Jul  3 23:47:35 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby_atomic.h (ATOMIC_CAS): suppress C4022 and C4047 warnings in
	  VC6.  only InterlockedCompareExchange is declared using PVOID.

Wed Jul  3 22:29:20 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (ruby_digit36_to_number_table): Declared.

	* util.c (ruby_digit36_to_number_table): Moved from scan_digits.

	* bignum.c (conv_digit): Use ruby_digit36_to_number_table.

	* pack.c (hex2num): Ditto.

Wed Jul  3 18:12:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (install_dirs): revert DESTDIR prefix by r39841, since
	  it is fixed by r41648.  [ruby-core:55760] [Bug #8115]

Wed Jul  3 14:15:25 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (do_stat): use rb_w32_ustati64() in win32.c to get rid of
	  mysterious behavior of FindFirstFile() Windows API which treat "<"
	  and ">" like as wildcard characters.  [ruby-core:55764] [Bug #8597]

Wed Jul  3 12:06:42 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (maxpow_in_bdigit): Renamed from calc_hbase and return
	  maxpow.

Tue Jul  2 23:47:50 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (roomof): Cast to long.
	  (rb_ull2big): Fix bignew arguments.

Tue Jul  2 21:17:37 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_cstr_to_inum): Merge two temporary buffers.

Tue Jul  2 20:25:04 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_cstr_to_inum): Use BDIGIT_DBL to collect adjacent digits.
	  (BDIGIT_DBL_MAX): New macro.
	  (maxpow_in_bdigit_dbl): New function.

Tue Jul  2 17:23:33 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* doc/syntax/refinements.rdoc: add description of Module#using and
	  refinement inheritance by module inclusion.

Tue Jul  2 17:22:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* internal.h: add EUC-JP and Windows-31J.

	* re.c (rb_char_to_option_kcode): use built-in encoding indexes in
	  internal.h.

	* internal.h: add UTF8-MAC.

	* dir.c (rb_utf8mac_encoding): use built-in encoding indexes in
	  internal.h.

	* internal.h: add UTF-{16,32} dummy encodings.

	* string.c (rb_str_inspect, str_scrub0): use built-in encoding indexes
	  in internal.h.

	* internal.h: add UTF-{16,32}{BE,LE}.

	* io.c (io_strip_bom): use built-in encoding indexes in internal.h.

	* internal.h (rb_{ascii8bit,utf8,usascii}_encindex): use built-in
	  encoding indexes for optimization.

	* encoding.c (enc_inspect, rb_locale_encindex),
	  (enc_set_filesystem_encoding, rb_filesystem_encindex): use built-in
	  encoding indexes directly.

	* encoding.c (rb_enc_set_index, rb_enc_associate_index): validate
	  argument encoding index.

	* include/ruby/encoding.h (ENCODING_SET): use rb_enc_set_index()
	  instead of setting inlined bits directly.

	* encoding.c (rb_enc_init): register preserved indexes.

	* internal.h (ruby_preserved_encindex): move from encoding.c.

Tue Jul  2 11:14:36 2013  Shota Fukumori  <sorah@cookpad.com>

	* lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
	  (1.9.3 behavior) [ruby-core:55752] [Bug #8595]

Tue Jul  2 00:39:59 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ipsocket.c (init_inetsock_internal): Don't try mismatched
	  address family if already failed.

Mon Jul  1 23:07:38 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* template/encdb.h.tmpl: define encoding index macros to use the index
	  statically from C source.

Mon Jul  1 22:57:19 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul2): New function.
	  (rb_cstr_to_inum): Use a better algorithm to compose the result
	  if input length is very long.

Mon Jul  1 20:22:00 2013  Kenta Murata  <mrkn@cookpad.com>

	* ext/bigdecimal/bigdecimal.h (RB_UNUSED_VAR, UNREACHABLE):
	  import macros from ruby.h for 1.9.3.
	  [Bug #8588] [ruby-core:55730]

	* ext/bigdecimal/bigdecimal.gemspec: Bump version to 1.2.1.

Mon Jul  1 20:03:39 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ipsocket.c (init_inetsock_internal): Use an address
	  family for local address which is different to the remote
	  address if no other choice.

Mon Jul  1 15:05:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/csv.rb (CSV#<<): use StringIO#set_encoding instead of creating
	  new StringIO instance with String#force_encoding, forcing encoding
	  discards the cached coderange bits and can make further operations
	  very slow.  [ruby-core:55714] [Bug #8585]

	* ext/stringio/stringio.c (strio_write): keep coderange of
	  ptr->string.

	* string.c (rb_enc_cr_str_buf_cat, rb_str_append): consider an empty
	  string 7bit-clean and should not discard cached coderange of string
	  to be appended.

Mon Jul  1 12:56:41 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_using_module): activate refinements in the ancestors of
	  the argument module to support refinement inheritance by
	  Module#include.  [ruby-core:55671] [Feature #8571]

	* test/ruby/test_refinement.rb: related test.

Mon Jul  1 12:02:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_cstr_to_inum): Skip leading zeros.

Mon Jul  1 00:59:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (nlz16): New function.
	  (nlz32): Ditto.
	  (nlz64): Ditto.
	  (nlz128): Ditto.
	  (nlz): Redefined using an above function.
	  (bitsize): New macro.
	  (rb_cstr_to_inum): Use bitsize instead of nlz.

Sun Jun 30 22:40:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* lib/prime.rb: Corrected a few comments. Patch by @Nullset14.
	  Fixes GH-346.

Sun Jun 30 21:53:38 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_cstr_to_inum): Use rb_integer_unpack if base is a power
	  of 2.

Sun Jun 30 10:59:23 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (join_argv): use backslash instead of slash in program
	  path, otherwise cannot invoke "./c\u{1ee7}a.exe" for some reason.
	  [ruby-core:24309] [Bug #1771]

	* io.c (spawnv, spawn): use UTF-8 spawn family.  [Bug #1771]

	* process.c (proc_exec_sh, proc_spawn_cmd, proc_spawn_sh): ditto.

	* win32/win32.c (translate_char, join_argv, has_redirection): make
	  codepage aware.

	* win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r):
	  codepage independent versions.

	* win32/win32.c (w32_spawn): extract codepage aware code from
	  rb_w32_spawn().

	* win32/win32.c (rb_w32_uspawn): add UTF-8 version function.

	* win32/win32.c (w32_aspawn_flags): extract codepage aware code from
	  rb_w32_aspawn_flags().

	* win32/win32.c (rb_w32_uaspawn_flags, rb_w32_uaspawn_flags): add
	  UTF-8 version functions.

	* win32/win32.c (w32_getenv): extract codepage aware code from
	  rb_w32_ugetenv() and rb_w32_getenv().

	* win32/win32.c (w32_stati64): extract codepage aware code from
	  rb_w32_ustati64() and rb_w32_stati64().

	* dln.h (DLN_FIND_EXTRA_ARG, DLN_FIND_EXTRA_ARG_DECL): allow extra
	  arguments to dln_find_{exe,file}_r().

	* dln_find.c (dln_find_exe_r, dln_find_file_r): add extract arguments.

	* process.c (EXPORT_STR, EXPORT_DUP): convert to default process
	  encoding if defined.

	* process.c (check_exec_env_i): convert environment variables too.

	* process.c (rb_exec_fillarg): convert program path and arguments too.

Sun Jun 30 01:57:08 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_rshift): Use abs2twocomp and twocomp2abs_bang.

Sun Jun 30 00:14:20 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (RBIGNUM_SET_NEGATIVE_SIGN): New macro.
	  (RBIGNUM_SET_POSITIVE_SIGN): Ditto.
	  (rb_big_neg): Inline get2comp to avoid double negation.

Sat Jun 29 23:26:41 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_neg): Extracted from bary_2comp.
	  (bary_plus_one): Extracted from bary_2comp.
	  (bary_2comp): Use bary_neg and bary_plus_one.
	  (big_extend_carry): Extracted from get2comp.
	  (get2comp): Use big_extend_carry.
	  (rb_integer_unpack): Use big_extend_carry.
	  (rb_big_neg): Use bary_neg.

Sat Jun 29 22:31:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_2comp): Simplified.

Sat Jun 29 09:33:53 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigor_int): Return -1 if y == -1.

Sat Jun 29 09:07:16 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigor_int): Use RB_GC_GUARD.
	  (bigxor_int): Take xn and hibitsx arguments.  Use twocomp2abs_bang.
	  (rb_big_xor): Use abs2twocomp and twocomp2abs_bang.

Sat Jun 29 08:19:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigand_int): Don't apply bitwise and for BDIGIT and long.
	  (bigor_int): Take xn and hibitsx arguments.  Use twocomp2abs_bang.
	  (rb_big_or): Use abs2twocomp and twocomp2abs_bang.

Fri Jun 29 01:08:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* numeric.c (fix_mul): remove FIT_SQRT_LONG test as it was causing
	  fix_mul to return an incorrect result for -2147483648*-2147483648
	  on 64 bit platforms

	* test/ruby/test_integer_comb.rb (class TestIntegerComb): add test case

Fri Jun 28 12:26:53 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_and): Allocate new bignum with same size to shorter
	  argument if it's high bits are zero.

Fri Jun 28 12:14:04 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ipsocket.c (init_inetsock_internal): Don't use local
	  addresses which address family is different to remote address.

Fri Jun 28 08:06:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigand_int): Add arguments, xn and hibitsx.
	  Use twocomp2abs_bang.

Thu Jun 27 23:58:13 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (abs2twocomp_bang): Removed.
	  (abs2twocomp): Take n_ret argument to return actual length.
	  (rb_big_and): Follow above change.

Thu Jun 27 22:52:19 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (get2comp): Use bary_2comp.
	  (abs2twocomp_bang): New function.
	  (abs2twocomp): New function.
	  (twocomp2abs_bang): New function.
	  (rb_big_and): Use abs2twocomp and twocomp2abs_bang.

Thu Jun 27 20:03:13 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl.rb (verify_certificate_identity): fix
	  hostname verification. Patched by nahi.

	* test/openssl/test_ssl.rb (test_verify_certificate_identity): test for
	  above.


Thu Jun 27 00:23:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_pow): Retry if y is a Bignum and it is
	  representable as a Fixnum.
	  Use rb_absint_numwords.

Wed Jun 26 23:53:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_save_rounding_mode): fix typo.
	  Fixes GH-343. Patch by @jgarber.

Wed Jun 26 23:22:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (rb_enumeratorize_with_size): use strict definition
	  rb_enumerator_size_func.

Wed Jun 26 23:11:14 2013  Kouhei Sutou  <kou@cozmixng.org>

	* gc.c (is_before_sweep): Add a missing space before a parenthesis.
	* gc.c (rb_gc_force_recycle): Add a missing space around a parenthesis.

Wed Jun 26 22:44:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/intern.h (rb_enumeratorize_with_size): cast for
	  backward compatibility.

	* include/ruby/intern.h (rb_enumerator_size_func): define strict
	  function declaration for rb_enumeratorize_with_size().

Wed Jun 26 21:01:22 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if
	  writing a file is slow.
	  [ruby-core:55541] [Bug #8519]

Wed Jun 26 16:42:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: should use expanded values for header directories
	  unless extmk.  patch by vo.x (Vit Ondruch) at [ruby-core:55653]
	  [Bug #8115], rhbz#921650.

Wed Jun 26 12:48:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigxor_int): Fix a buffer over read.

Wed Jun 26 12:13:12 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigand_int): Consider negative values.
	  (bigor_int): The allocated bignum should have enough size
	  to store long.
	  This fixes (bignum fits in a BDIGIT) | (fixnum bigger than BDIGIT)
	  on platforms which SIZEOF_BDIGITS < SIZEOF_LONG,
	  such as LP64 with 32bit BDIGIT (no int128).

Wed Jun 26 12:08:51 2013  Tanaka Akira  <akr@fsij.org>

	* test/socket/test_udp.rb: Close sockets explicitly.
	  Don't use fixed port number.

Wed Jun 26 07:27:17 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigand_int): Fix a buffer over read.

Wed Jun 26 06:48:07 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigadd_int): Fix a buffer over read.

Wed Jun 26 01:18:13 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (is_before_sweep): Add new helper function that check the object
	  is before sweep?
	* gc.c (rb_gc_force_recycle): Have to clear mark bit if object's slot
	  already ready to minor sweep.

Wed Jun 26 01:17:29 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigsub_int): Fix a buffer over read.

Tue Jun 25 22:45:43 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_absint_singlebit_p): Use POW2_P.
	  (bary_pack): Ditto.
	  (rb_big2str0): Ditto.
	  (POW2_P): Moved to top.

Tue Jun 25 22:28:07 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Pass
	  DESTDIR via command line to override what's in MAKEFLAGS.  This
	  fixes an installation problem under a package building
	  environment where DESTDIR is specified in the (parent) command
	  line. [Fixes GH-327]

Tue Jun 25 21:43:13 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2dbl): Use (BDIGIT)1 instead of 1UL.
	  (bary_mul_normal): Remove a useless cast.

Tue Jun 25 21:26:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix for the cases when
	  the argument x is not a BigDecimal.
	  This change is based on the patch made by Heesob Park and Garth Snyder.
	  [Bug #6862] [ruby-core:47145]
	  [Fixes GH-332] https://github.com/ruby/ruby/pull/332

Tue Jun 25 20:36:31 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2ulong): "check" argument removed.
	  (rb_big2ulong): Follow above change.
	  (rb_big2long): Ditto.
	  (rb_big_rshift): Ditto.
	  (rb_big_aref): Ditto.

Tue Jun 25 20:08:29 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big2ulong_pack): Use rb_integer_pack.
	  (rb_big_aref): Call big2ulong with TRUE for "check" argument.
	  It should be non-effective.

Tue Jun 25 19:07:33 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (LSHIFTX): Revert r41611.
	  The redundant expression suppresses a warning, C4293, by Visual
	  Studio.
	  http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby

Tue Jun 25 19:03:00 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2ulong): Add a cast.
	  (big2ull): Add a specialized code for SIZEOF_LONG_LONG <=
	  SIZEOF_BDIGITS.

Tue Jun 25 12:42:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead of
	  "-u" to suppress warning (C4146) by Visual Studio.
	  Reported by ko1 via IRC.

Tue Jun 25 12:28:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2ulong): Add code specialized for SIZEOF_LONG <=
	  SIZEOF_BDIGITS.
	  This prevents shift width warning from "num <<= BITSPERDIG".

Tue Jun 25 12:23:30 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix oldgen/remembered_shady counting algorithm.

	* gc.c (rgengc_check_shady): increment
	  `objspace->rgengc.remembered_shady_object_count' here.

	* gc.c (rgengc_remember): return FALSE if obj is already remembered.

	* gc.c (rgengc_rememberset_mark): make it void.

	* gc.c (gc_mark_children): fix to double counting oldgen_object_count
	  at minor GC.

Tue Jun 25 12:07:18 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (MSB): Removed.
	  (BDIGIT_MSB): Defined using BIGRAD_HALF.
	  (bary_2comp): Apply BIGLO after possible over flow of BDIGIT.
	  (get2comp): Ditto.
	  (bary_unpack_internal): Use BDIGIT_MSB.
	  Apply BIGLO after possible over flow of BDIGIT.
	  (rb_integer_unpack): Use BDIGIT_MSB.
	  (calc_hbase): Use BDIGMAX.
	  (big2dbl): Use BDIGMAX.
	  Apply BIGLO after possible over flow of BDIGIT.
	  (rb_big_neg): Apply BIGLO after possible over flow of BDIGIT.
	  (biglsh_bang): Ditto.
	  (bigrsh_bang): Ditto.
	  (bary_divmod): Use BDIGIT_MSB.
	  (bigdivrem): Ditto.
	  (bigxor_int): Apply BIGLO after possible over flow of BDIGIT.

	* marshal.c (shortlen): Use SIZEOF_BDIGITS instead of sizeof(BDIGIT).

	* ext/openssl/ossl_bn.c (ossl_bn_initialize): Use SIZEOF_BDIGITS
	  instead of sizeof(BDIGIT).

Tue Jun 25 11:40:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (big2ulong): suppress shorten-64-to-32 warning.  BDIGIT can
	  be bigger than long now.

	* bignum.c (LSHIFTX): remove redundant never-true expression.

Tue Jun 25 00:55:54 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (typedef struct rb_objspace): Change members for monitor objects.
	* gc.c (gc_marks_test): Check all WriteBarrier Errors and track them in obj-tree.
	* gc.c (rgengc_check_shady): Ditto.
	* gc.c (gc_marks): Move 2 function calls to gc_marks_test for test initialize.

Mon Jun 24 23:30:31 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_unpack_single_bdigit): Refine code to filling
	  higher bits and use BIGLO.

Mon Jun 24 22:26:31 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6):
	  ifindex() function may not be implemented on Windows. We use another
	  check for the case.

Mon Jun 24 22:11:37 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_nolock):
	  skip a failing test on Windows because flock() implementation is
	  different from Unix.

Mon Jun 24 22:06:14 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/rubygems/test_gem_installer.rb (test_install_extension_flat):
	  use ruby in build directory in case ruby is not installed.
	  [ruby-core:53265] [Bug #8058]

Mon Jun 24 22:04:02 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* ext/dl/cfunc.c (rb_dlcfunc_call): fix conversion from Bignum to
	  pointer. sizeof(DLSTACK_TYPE) is larger than sizeof(long) on
	  Windows x64 and higher bits over sizeof(long) of DLSTACK_TYPE was
	  zero even if a pointer value was over 32 bits which causes SEGV on
	  DL::TestCPtr#test_to_ptr_io. Adding a cast solves the bug.

Mon Jun 24 22:04:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* eval_error.c (warn_printf): use rb_vsprintf instead so ruby specific
	  extensions like PRIsVALUE can be used in format strings
	* eval_error.c (error_print): use warn_print_str (alias for
	  rb_write_error_str) to print a string value instead of using
	  RSTRING_PTR and RSTRING_LEN manually
	* eval.c (setup_exception): use PRIsVALUE instead of %s and RSTRING_PTR

Mon Jun 24 20:31:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* compile.c (make_name_for_block): use PRIsVALUE in format string
	  instead of %s and RSTRING_PTR to protect objects from being garbage
	  collected too soon
	* encoding.c (str_to_encindex): ditto
	* hash.c (rb_hash_fetch_m): ditto
	* io.c (rb_io_reopen): ditto
	* parse.y (reg_fragment_check_gen): ditto
	* parse.y (reg_compile_gen): ditto
	* parse.y (ripper_assert_Qundef): ditto
	* re.c (rb_reg_raise): ditto
	* ruby.c (set_option_encoding_once): ditto
	* vm_eval.c (rb_throw_obj): ditto

Mon Jun 24 07:57:18 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (after_gc_sweep): Have to record malloc info before reset.
	* gc.c (gc_prof_timer_start): Pick out part of new record creation as gc_prof_setup_new_record.
	* gc.c (gc_prof_set_malloc_info): Move point of recording allocation size to front of mark.

Mon Jun 24 02:53:09 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: Return value in Array overview example found by @PragTob
	  [Fixes GH-336] https://github.com/ruby/ruby/pull/336

Mon Jun 24 02:45:51 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c (rb_ary_zip): typo by @PragTob [Fixes GH-337]
	  https://github.com/ruby/ruby/pull/337

Mon Jun 24 02:42:01 2013  Zachary Scott  <zachary@zacharyscott.net>

	* win32/README.win32: grammar typo by @blankenshipz [Fixes GH-334]
	  https://github.com/ruby/ruby/pull/334

Mon Jun 24 00:59:35 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BIGUP): Use LSHIFTX and avoid cast to consider the type
	  of x is bigger than BDIGIT_DBL.
	  (big2ulong): Use unsigned long to store the result.
	  (big2ull): Use unsigned LONG_LONG to store the result.
	  (bigand_int): Use long for num to avoid data loss.
	  (bigor_int): Ditto.
	  (bigxor_int): Ditto.

Sun Jun 23 23:05:58 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h (BDIGIT): Define it only if it is not defined
	  yet.  This eases tests and debug.
	  (SIZEOF_BDIGITS): Ditto.
	  (BDIGIT_DBL): Ditto.
	  (BDIGIT_DBL_SIGNED): Ditto.
	  (PRI_BDIGIT_PREFIX): Ditto.
	  (PRI_BDIGIT_DBL_PREFIX): Ditto.
	  (PRIdBDIGIT): Define it only if PRI_BDIGIT_PREFIX is defined.
	  (PRIiBDIGIT): Ditto.
	  (PRIoBDIGIT): Ditto.
	  (PRIuBDIGIT): Ditto.
	  (PRIxBDIGIT): Ditto.
	  (PRIXBDIGIT): Ditto.
	  (PRIdBDIGIT_DBL): Ditto.
	  (PRIiBDIGIT_DBL): Ditto.
	  (PRIoBDIGIT_DBL): Ditto.
	  (PRIuBDIGIT_DBL): Ditto.
	  (PRIxBDIGIT_DBL): Ditto.
	  (PRIXBDIGIT_DBL): Ditto.

	* include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Define it only if it is
	  not defined yet.

Sun Jun 23 17:29:51 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_unpack_single_bdigit): Use a cast.

Sun Jun 23 15:38:07 2013  Koichi Sasada  <ko1@atdot.net>

	* bootstraptest/test_thread.rb: rescue resource limitation errors.

Sun Jun 23 08:19:27 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_unpack_single_bdigit): Extracted from
	  bary_unpack_internal.

Sun Jun 23 07:41:52 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_unpack_internal): Suppress warnings (C4146) on Visual Studio.
	  Reported by ko1 via IRC.

Sun Jun 23 06:49:28 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h, gc.c: rename macros and functions:
	  OBJ_WB_GIVEUP() -> OBJ_WB_UNPROTECT(),
	  rb_obj_wb_giveup() -> rb_obj_wb_unprotect(),
	  rb_gc_giveup_promoted_writebarrier() ->
	  rb_gc_writebarrier_unprotect_promoted(),

	* class.c, eval.c, hash.c: use OBJ_WB_UNPROTECT().

Sun Jun 23 05:41:32 2013  Koichi Sasada  <ko1@atdot.net>

	* class.c (rb_include_class_new), eval.c (rb_using_refinement):
	  make classes/modules (who share method table) shady.
	  If module `a' and `b' shares method table m_tbl and new method
	  with iseq is added, then write barrier is applied only `a' or `b'.
	  To avoid this issue, shade such classes/modules.

	* vm_method.c (rb_method_entry_make): add write barriers.

Sun Jun 23 01:27:54 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bytes_zero_p): Removed.
	  (bary_pack): Don't call bytes_zero_p.

Sun Jun 23 00:51:29 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bytes_zero_p): Extracted from bary_pack.
	  (bary_pack): Use bytes_zero_p.

Sun Jun 23 00:16:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (MSB): New macro.
	  (bary_unpack_internal): Use MSB.
	  (bary_divmod): Ditto.
	  (bigdivrem): Ditto.

Sat Jun 22 23:45:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_swap): New function.
	  (bary_pack): Use bary_swap.
	  (bary_unpack_internal): Ditto.

Sat Jun 22 23:18:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bytes_2comp): Renamed from quad_buf_complement.
	  (bary_pack): Use bytes_2comp.
	  (rb_quad_pack): Use rb_integer_pack.
	  (rb_quad_unpack): Use rb_integer_unpack.

Sat Jun 22 21:46:18 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_unpack): Don't allocate a Bignum if possible.

Sat Jun 22 21:03:58 2013  Tanaka Akira  <akr@fsij.org>

	* pack.c (pack_unpack): Remove specialized unpackers for integers.

Sat Jun 22 20:36:50 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_unpack_internal): Specialized unpacker implemented.
	  (bary_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION.
	  (rb_integer_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION.

Sat Jun 22 18:53:10 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_pack): Support
	  INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION flag.
	  Fix byte order and word order handling in code specialized for
	  wordsize % SIZEOF_BDIGITS == 0.

	* internal.h (INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION): Defined.

Sat Jun 22 15:41:25 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rgengc_check_shady): add new WB miss checking
	  on RGENGC_CHECK_MODE >= 2.

	    (1) Save bitmaps before marking
	    (2) Run full marking
	    (3) On each traceable object,
	      (a) object        was not oldgen (== newly or shady object) &&
	      (b) parent object was     oldgen &&
	      (c) parent object was not remembered &&
	      (d) object        was not remembered
	      then, it should be WB miss.

	  This idea of this checker is by Masaya Tarui <tarui@ruby-lang.org>.

Sat Jun 22 15:25:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/etc/etc.c (setup_passwd): revert r41560, unnecessary

Sat Jun 22 14:39:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/etc/etc.c (Init_etc): omit 'passwd' from definition of Etc::Passwd
	  if HAVE_STRUCT_PASSWD_PW_PASSWD is not defined to prevent mismatch of
	  fields and values in setup_passwd

Sat Jun 22 14:35:40 2013  Tanaka Akira  <akr@fsij.org>

	* ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead of
	  rb_big2ulong_pack and rb_big2ull.

	* include/ruby/intern.h (rb_big2ulong_pack): Deprecated.

Sat Jun 22 14:31:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new to
	  prevent segfault if the compiler passes it as a 32 bit integer on
	  a 64 bit ruby

Sat Jun 22 13:47:13 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_pack): MEMZERO can be used even if nails is not zero.

Sat Jun 22 13:43:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string instead
	  of %s and RSTRING_PTR

	* ext/etc/etc.c (etc_getgrnam): ditto

Sat Jun 22 13:07:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (CLEAR_LOWBITS): Rewritten without RSHIFTX.
	  (RSHIFTX): Removed.

Sat Jun 22 10:38:03 2013  Tanaka Akira  <akr@fsij.org>

	* pack.c (num2i32): Removed.
	  (pack_pack): Don't use num2i32.

Sat Jun 22 09:55:13 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (LSHIFTX): Defined to suppress a warning.
	  (RSHIFTX): Ditto.
	  (CLEAR_LOWBITS): Use LSHIFTX and RSHIFTX.
	  (FILL_LOWBITS): Use LSHIFTX.
	  Reported by ko1 via IRC.

Sat Jun 22 09:11:33 2013  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 4.7.5 (r8724)
	* test/minitest/*: ditto

Sat Jun 22 07:20:30 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_prof_set_heap_info, after_gc_sweep): call
	  gc_prof_set_heap_info() just after sweeping to calculate
	  live object number correctly.
	  (live object number = total generated number (before marking) -
	                        total freed number (after sweeping))

	* gc.c (gc_marks): record `oldgen_object_count' into current profile`
	  record directly.

	* gc.c (rgengc_rememberset_mark): same for remembered_normal_objects
	  and remembered_shady_objects.

Sat Jun 22 06:46:04 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace::profile): rename rb_objspace::profile::record to
	  records (because it points a set of records) and add a field
	  rb_objspace::profile::current_record to point a current profiling
	  record.

	* gc.c: use above fields.

Sat Jun 22 06:05:36 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_gc_giveup_promoted_writebarrier): remove `rest_sweep()'
	  because all of remembered objects are called for gc_mark_children().

Sat Jun 22 05:08:03 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rgengc_rememberset_mark): call gc_mark_children() for
	  remembered objects directly instead of pushing on the mark stack.

Sat Jun 22 04:48:53 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h (OBJ_WRITE): cast to (VALUE *) for second
	  parameter `slot'. You don't need to write a cast (VALUE *) any more.

	* class.c, compile.c, hash.c, iseq.c, proc.c, re.c, variable.c,
	  vm.c, vm_method.c: remove cast expressions for OBJ_WRITE().

Sat Jun 22 04:37:08 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (slot_sweep_body): rename to slot_sweep().
	  No need to separate major/minor GC.

	* gc.c (gc_setup_mark_bits): remove gc_clear_mark_bits() and unify to
	  this function.

Sat Jun 22 04:20:21 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (check_bitmap_consistency): add to check flag and bitmap consistency.
	  Use this function in several places.

Sat Jun 22 02:18:07 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_pack): Specialized packers implemented.
	  (HOST_BIGENDIAN_P): New macro.
	  (ALIGNOF): New macro.
	  (CLEAR_LOWBITS): New macro.
	  (FILL_LOWBITS): New macro.
	  (swap_bdigit): New macro.
	  (bary_2comp): Returns an int.

	* internal.h (swap16): Moved from pack.c
	  (swap32): Ditto.
	  (swap64): Ditto.

Fri Jun 21 21:29:49 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (typedef enum): Introduce flags of major gc reason.
	* gc.c (garbage_collect_body): Ditto.
	* gc.c (gc_profile_flags): Ditto.
	* gc.c (gc_profile_dump_on): Ditto.

Fri Jun 21 21:11:53 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (allocate_sorted_heaps): remove unused variable `add'.

Fri Jun 21 20:50:32 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: constify RArray::as::ary and RArray::heap::ptr.
	  Use RARRAY_ASET() or RARRAY_PTR_USE() to modify Array objects.

	* array.c, gc.c: catch up above changes.

Fri Jun 21 20:32:13 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (eval_string_with_cref): fix WB miss.

Fri Jun 21 20:15:49 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: support write barrier protection for T_STRUCT.
	  Introduce the following C APIs:
	    * RSTRUCT_RAWPTR(st) returns pointer (do WB on your risk).
	      The type of returned pointer is (const VALUE *).
	    * RSTRUCT_GET(st, idx) returns idx-th value of struct.
	    * RSTRUCT_SET(st, idx, v) set idx-th value by v with WB.
	  And
	    * RSTRUCT_PTR(st) returns pointer with shady operation.
	      The type of returned pointer is (VALUE *).

	* struct.c, re.c, gc.c, marshal.c: rewrite with above APIs.

Fri Jun 21 19:38:37 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BDIGMAX): Use BIGRAD.
	  (BIGLO): Use BDIGMAX.
	  (bigdivrem1): Ditto.
	  (bigor_int): Ditto.
	  (rb_big_or): Ditto.

Fri Jun 21 19:18:48 2013  Tanaka Akira  <akr@fsij.org>

	* pack.c (pack_pack): Move the implementation for 'c' directive after
	  pack_integer label.

Fri Jun 21 19:11:56 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h, re.c: support write barrier for T_REGEXP.

	   Note: T_MATCH object is also easy to support write barriers.
	         However, most of T_MATCH objects are short-lived objects.
	         So I skipped to support non-shady T_MATCH.

Fri Jun 21 18:56:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigsub_int): Use bdigit_roomof.
	  (bigadd_int): Ditto.
	  (bigand_int): Ditto.
	  (bigor_int): Ditto.
	  (bigxor_int): Ditto.

Fri Jun 21 17:56:25 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: fix summary of benchmark result notation.

Fri Jun 21 16:38:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* ext/openssl/ossl_x509attr.c: change OSSL_X509ATTR_IS_SINGLE and
	  OSSL_X509ATTR_SET_SINGLE macros to use ->value.set rather than
	  ->set to fix compile failure

Fri Jun 21 15:26:45 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_sweep): profile sweep time correctly when LAZY_SWEEP is
	  disabled.

	* gc.c (gc_marks_test): store oldgen count and shady count
	  before test marking and restore them after marking.

Fri Jun 21 15:07:42 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: enable lazy sweep (commit miss).

Fri Jun 21 14:31:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (ruby_setenv): refine error message so include the variable
	  name.

Fri Jun 21 14:15:08 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix to use total_allocated_object_num and heaps_used
	  at the GC time for profiler.

Fri Jun 21 12:35:35 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: RGENGC_CHECK_MODE should be 0.

Fri Jun 21 11:18:25 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_marks_body): fix to get `th' in this function.

Fri Jun 21 10:21:44 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (heaps_header/heaps_slot): embed bitmaps into heaps_slot.
	  no need to maintain allocation/free bitmaps.

Fri Jun 21 09:22:16 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (slot_sweep_body): add counters at a time.

	* gc.c (gc_profile_dump_on): fix line break position.

Fri Jun 21 08:14:00 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c: refactoring bitmaps. introduce bits_t type and some Consts.

Fri Jun 21 08:04:32 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix to support USE_RGENGC == 0 (disable RGenGC).
	  If USE_RGENGC==0, it caused compilation error.

Fri Jun 21 08:08:11 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (lazy_sweep): Use is_lazy_sweeping()
	* gc.c (rest_sweep): Ditto.
	* gc.c (gc_prepare_free_objects): Ditto.

Fri Jun 21 07:34:47 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_record::oldgen_objects): added.

	* gc.c (gc_profile_dump_on): print the following information:
	  * Living object counts
	  * Free object counts
	  If RGENGC_PROFILE > 0 then
	  * Oldgen object counts
	  * Remembered normal object counts
	  * Remembered shady object counts

Fri Jun 21 06:43:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_ull2big): Refactored.
	  (rb_uint2big): Useless code removed.

Fri Jun 21 05:37:39 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_prof_sweep_timer_stop): accumulate sweep time only when
	  record->gc_time > 0.

Fri Jun 21 00:37:31 2013  Tanaka Akira  <akr@fsij.org>

	* ext/bigdecimal: Workaround fix for bigdecimal test failures caused
	  by [ruby-dev:47413] [Feature #8509]

	* ext/bigdecimal/bigdecimal.h (BDIGIT): Make it independent from the
	  definition for bignum.c.
	  (SIZEOF_BDIGITS): Ditto.
	  (BDIGIT_DBL): Ditto.
	  (BDIGIT_DBL_SIGNED): Ditto.
	  (PRI_BDIGIT_PREFIX): Undefine the definition.
	  (PRI_BDIGIT_DBL_PREFIX): Ditto.

	* ext/bigdecimal/bigdecimal.c (RBIGNUM_ZERO_P): Use rb_bigzero_p.
	  (bigzero_p): Removed.
	  (is_even): Use rb_big_pack.

Thu Jun 20 22:52:42 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigmul1_toom3): Don't call bignorm twice.

Thu Jun 20 22:49:27 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bignorm): Don't call bigtrunc if the result is a fixnum.

Thu Jun 20 22:29:42 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_uint2big): Refactored.

Thu Jun 20 22:24:41 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (dump_bignum): Use SIZEOF_BDIGITS.

Thu Jun 20 22:22:46 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2ulong): Change the return type to unsigned long.
	  (rb_big2ulong_pack): Follow the above change.
	  (rb_big2long): Ditto.
	  (rb_big_lshift): Ditto.
	  (rb_big_rshift): Ditto.
	  (rb_big_aref): Ditto.

Thu Jun 20 22:02:46 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_unpack_internal): Return -2 when negative overflow.
	  (bary_unpack): Set the overflowed bit if an extra BDIGIT exists.
	  (rb_integer_unpack): Set the overflowed bit.

Thu Jun 20 21:17:19 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rgengc_rememberset_mark): record
	  (1) normal objects count in remember set
	  (2) shady objects count in remember set
	  each GC timing.

	* gc.c (gc_profile_record_get): enable to access above information
	  and REMOVING_OBJECTS, EMPTY_OBJECTS.

Thu Jun 20 18:29:26 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: Do not use GC::Profiler::disable because
	  GC::Profiler::disable prohibit to access profiling data. It should
	  be spec bug.

	  Skip GC::Profiler::report if RUBY_VERSION < '2.0.0'

Thu Jun 20 17:59:08 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: stop GC::Profiler before output results.
	  Generating GC::Profiler result under profiling causes infinite loop.

Thu Jun 20 17:24:24 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/gcbench.rb: don't use __dir__ to make compatible
	  with ruby 1.9.3.

Thu Jun 20 16:57:19 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_app_aobench.rb: use attr_accessor/reader instead of
	  defining methods.

Thu Jun 20 16:46:46 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_app_aobench.rb: added.

	* benchmark/gc/aobench.rb: added.

Thu Jun 20 16:28:33 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_so_binary_trees.rb: disable `puts' method
	  and change iteration parameter to increase execution time.

	* benchmark/gc/binarytree.rb: added.

Thu Jun 20 16:06:37 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/pentomino.rb: added.
	  Simply load pentomino puzzle in the benchmark/ directory.

Thu Jun 20 15:32:56 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc/redblack.rb: import red black tree benchmark from
	  https://github.com/jruby/rubybench/blob/master/time/bench_red_black.rb

	* benchmark/gc/ring.rb: add a benchmark. This benchmark create many
	  old objects.

Thu Jun 20 15:14:00 2013  Koichi Sasada  <ko1@atdot.net>

	* benchmark/gc: create a directory to store GC related benchmark.

	* benchmark/gc/gcbench.rb: moved from tool/gcbench.rb.

	* benchmark/gc/hash(1|2).rb: ditto.

	* benchmark/gc/rdoc.rb: ditto.

	* benchmark/gc/null.rb: added.

	* common.mk: fix rule.

Thu Jun 20 14:09:54 2013  Koichi Sasada  <ko1@atdot.net>

	* tool/hashbench1.rb: fix parameter too. Increase temporary objects.

Thu Jun 20 14:01:35 2013  Koichi Sasada  <ko1@atdot.net>

	* tool/hashbench1.rb: fix parameters.

Thu Jun 20 14:00:34 2013  Koichi Sasada  <ko1@atdot.net>

	* common.mk: remove dependency from ruby.

Thu Jun 20 13:14:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_check_backtrace): evaluate RARRAY_AREF only once.
	  the first argument of RB_TYPE_P is expanded twice for non-immediate
	  types.

Thu Jun 20 08:09:29 2013  Koichi Sasada  <ko1@atdot.net>

	* tool/gcbench.rb: Summary in one line.

	* common.mk: separate gcbench-hash to gcbench-hash1 and gcbench-hash2.

Thu Jun 20 08:07:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BIGSIZE): New macro.
	  (bigfixize): Use BIGSIZE.
	  (big2ulong): Ditto.
	  (check_shiftdown): Ditto.
	  (rb_big_aref): Ditto.

Thu Jun 20 07:46:48 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (rb_gc_writebarrier): give up rescan A and register B directly
	  if A has huge number of children.

Thu Jun 20 07:30:35 2013  Koichi Sasada  <ko1@atdot.net>

	* common.mk: add new rules `gcbench-rdoc', `gcbench-hash'.

	* tool/gcbench.rb: separate GC bench framework and process.

	* tool/hashbench1.rb, tool/hashbench2.rb: add two types GC bench.
	  hashbench1: many temporal objects (GC by newobj)
	  hashbench2: hash size becomes bigger and bigger (GC by malloc)
	  Two benches are executed by `gcbench-hash' rule.

	* tool/rdocbench.rb: separated.

Thu Jun 20 06:25:39 2013  Koichi Sasada  <ko1@atdot.net>

	* tool/rdocbench.rb: add summary.

Thu Jun 20 06:18:01 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_total_time): check objspace->profile.next_index > 0.

Thu Jun 20 05:47:41 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_prof_sweep_timer_start): fix merge miss.

	* gc.c (GC_PROFILE_MORE_DETAIL): set it 0.

Thu Jun 20 05:38:56 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: Accumulate sweep time to GC time.
	  Now [GC time] is [mark time] + [sweep time] + [misc].
	  ([GC time] >= [mark time] + [sweep time])

	* gc.c (gc_prof_sweep_slot_timer_start/stop): rename to
	  gc_prof_sweep_timer_start/stop and locate at lazy_sweep().

	* gc.c (elapsed_time_from): add a utility function.

Thu Jun 20 05:08:53 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_marks): fix wrong option. FALSE means major/full GC.
	  It should be TRUE (minor marking).

Thu Jun 20 02:44:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (waitpid): should not return 0 but wait until exit
	  unless WNOHANG is given.  waiting huge process may return while
	  active, for some reason.

Thu Jun 20 01:34:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bdigit_roomof): Use SIZEOF_BDIGITS.
	  (bigfixize): Refine an ifdef condition.
	  (rb_absint_size): Use bdigit_roomof.
	  (rb_absint_singlebit_p): Ditto.
	  (rb_integer_pack): Ditto.
	  (integer_pack_fill_dd): Use BITSPERDIG.
	  (integer_unpack_push_bits): Use BITSPERDIG, BIGLO and BIGDN.

Thu Jun 20 01:07:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (MARKED_IN_BITMAP, FL_TEST2): return boolean value since always
	  used as boolean value.

	* gc.c (MARK_IN_BITMAP, CLEAR_IN_BITMAP): evaluate bits once.

Thu Jun 20 00:05:07 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (RVALUE_PROMOTED): fix type.

Wed Jun 19 23:39:01 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_marks_test): rewrite checking code.
	  When RGENGC_CHECK_MODE >= 2, all minor marking, run normal minor
	  marking *and* major/full marking. After that, compare the results
	  and shows BUG if a object living with major/full marking but dead
	  with minor marking.
	  After detecting bugs, print references information.
	  (RGENGC_CHECK_MODE == 2, show references to dead object)
	  (RGENGC_CHECK_MODE == 3, show all references)

Wed Jun 19 23:51:48 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigfixize): Use rb_absint_size.
	  (check_shiftdown): Ditto.
	  (big2ulong): Use bdigit_roomof.

Wed Jun 19 23:32:23 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (RVALUE_PROMOTED): check consistency between oldgen flag and
	  oldgen bitmap if RGENGC_CHECK_MODE > 0.

Wed Jun 19 23:29:29 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_gc_force_recycle): clear oldgen bitmap, too.

Wed Jun 19 21:02:13 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_uint2big): Consider environments BDIGIT is bigger than
	  long.
	  (big2ulong): Ditto.
	  (rb_big_aref): Ditto.
	  (rb_big_pack): Just call rb_integer_pack.
	  (rb_big_unpack): Just call rb_integer_unpack.

Wed Jun 19 20:51:21 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* gc.c (gc_stress_get): GC.stress can be Fixnum.

Wed Jun 19 19:31:30 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (DIGSPERLONG): Don't define if BDIGIT is bigger than long.
	  (DIGSPERLL): Don't define if BDIGIT is bigger than LONG_LONG
	  (rb_absint_size): Consider environments BDIGIT is bigger than long.
	  Use BIGLO and BIGDN.
	  (rb_absint_singlebit_p): Ditto.
	  (rb_integer_pack): Ditto.
	  (bigsub_int): Consider environments BDIGIT is bigger than long.
	  Use SIZEOF_BDIGITS instead of sizeof(BDIGIT).
	  (bigadd_int): Ditto.
	  (bigand_int): Ditto.
	  (bigor_int): Ditto.
	  (bigxor_int): Ditto.

Wed Jun 19 15:14:30 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add
	  rb_data_type_struct::flags. Now, this flags is passed
	  at T_DATA object creation. You can specify FL_WB_PROTECTED
	  on this flag.

	* iseq.c: making non-shady iseq objects.

	* class.c, compile.c, proc.c, vm.c: add WB for iseq objects.

	* vm_core.h, iseq.h: constify fields to detect WB insertion.

Wed Jun 19 15:11:13 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (gc_mark_children): show more info for broken object.

Wed Jun 19 14:04:41 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/envutil.rb (EnvUtil#rubybin): remove unnecessary
	  unless expression.

Wed Jun 19 07:47:48 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.

Wed Jun 19 07:44:31 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.

Wed Jun 19 07:25:35 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (make_deferred): clear flags to T_ZOMBIE.

	* gc.c (slot_sweep_body): fix indent.

Wed Jun 19 07:18:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
	  BDIGIT is 16bit.

Wed Jun 19 07:09:26 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rgengc_remember): fix output level.

	* gc.c (rgengc_rememberset_mark): fix to output clear count.
	  (shady_object_count + clear_count = count of remembered objects)

Wed Jun 19 07:06:21 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rgengc_remember): check T_NONE and T_ZOMBIE
	  if RGENGC_CHECK_MODE > 0.

Wed Jun 19 07:02:19 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (RGENGC_CHECK_MODE): add new check mode `3'.
	  In this mode, show all references if there is
	  a miss-corrected object.

Wed Jun 19 06:31:08 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stress_set): add special option of GC.stress.
	  `GC.stress=(flag)' accepts integer to control behavior of GC.
	  See code for details. Of course, this feature is only for MRI.

	  You can debug RGenGC (WB) using `GC.stress = 1'.
	  Using this option, do minor marking at all possible places.

	  GC::STRESS_MINOR_MARK = 1 and GC::STRESS_LAZY_SWEEP = 2
	  seem good to add.

Wed Jun 19 06:29:31 2013  Koichi Sasada  <ko1@atdot.net>

	* vm.c (kwmerge_i): add WB.

Wed Jun 19 06:26:49 2013  Koichi Sasada  <ko1@atdot.net>

	* hash.c: `st_update()' also has same issue of last fix.
	  write barriers at callback function are too early.
	  All write barriers are executed after `st_update()'

Wed Jun 19 04:33:22 2013  Koichi Sasada  <ko1@atdot.net>

	* variable.c (rb_const_set): fix WB miss.

	  WBs had located before creating reference between a klass
	  and constant value. It causes GC bug.

	    # pseudo code:
	    WB(klass, value); # WB and remember klass
	    st_insert(klass->const_table, const_id, value);

	  `st_insert()' can cause GC before inserting `value' and
	  forget `klass' from the remember set. After that, relationship
	  between `klass' and `value' are created with constant table.
	  Now, `value' can be young (shady) object and `klass' can be old
	  object, without remembering `klass' object.
	  At the next GC, old `klass' object will be skipped and
	  young (shady) `value' will be miss-collected. -> GC bug

	  Lesson: The place of a WB is important.

Tue Jun 18 22:01:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): ensure methods of type
	  VM_METHOD_TYPE_ATTR_SET are called with 1 argument

	* test/ruby/test_module.rb
	  (TestModule#test_attr_writer_with_no_arguments): add test
	  [ruby-core:55543] [Bug #8540]

Tue Jun 18 22:36:23 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_profile_record_flag): fix typo.

Tue Jun 18 22:08:53 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/objspace/object_tracing.c: Return for ::allocation_generation

Tue Jun 18 22:04:35 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/objspace/object_tracing.c: Document object_tracing methods.

Tue Jun 18 21:58:17 2013  Zachary Scott  <zachary@zacharyscott.net>

	* gc.c: Rename rb_mObSpace -> rb_mObjSpace

Tue Jun 18 20:55:05 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/objspace/objspace.c: Document ObjectSpace::InternalObjectWrapper.

Tue Jun 18 20:39:04 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/objspace/object_tracing.c: Teach rdoc object_tracing.c [Bug #8537]

Tue Jun 18 20:29:47 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/.document: add object_tracing.c to document file

Tue Jun 18 20:20:27 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/objspace/objspace.c: rdoc on require to overview from r41355

Tue Jun 18 18:39:58 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Check __int128.

	* include/ruby/defines.h (BDIGIT_DBL): Use uint128_t if it is available.
	  (BDIGIT): Use uint64_t if uint128_t is available.
	  (SIZEOF_BDIGITS): Defined for above case.
	  (BDIGIT_DBL_SIGNED): Ditto.
	  (PRI_BDIGIT_PREFIX): Ditto.

	* include/ruby/ruby.h (PRI_64_PREFIX): Defined.

	* bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which
	  rb_big_pow returns Float or Bignum.

	[ruby-dev:47413] [Feature #8509]

Tue Jun 18 16:43:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_heredoc_restore): clear lex_strterm always to get
	  rid of marking recycled node.  this bug is revealed by r41372 with
	  GC.stress=true.

Tue Jun 18 12:53:25 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (nlz): Cast the result explicitly.
	  (big2dbl): Don't assign BDIGIT values to int variable.

Tue Jun 18 12:25:16 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_xor): Non-effective code removed.

Tue Jun 18 11:26:05 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): add `generated_normal_object_count_types' for
	  RGENGC_PROFILE >= 2.

Tue Jun 18 11:02:18 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_mark_maybe): check to skip T_NONE.

	* gc.c (markable_object_p): do not need to check (flags == 0) here.

Tue Jun 18 10:17:37 2013  Koichi Sasada  <ko1@atdot.net>

	* variable.c (rb_autoload): fix WB miss.

Tue Jun 18 04:20:18 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_mark_children): don't need to care about T_ZOMBIE here.

Mon Jun 17 22:16:02 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/ruby/test_proc.rb (TestProc#test_block_given_method_to_proc):
	  run test for r41359.

Mon Jun 17 21:42:18 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):
	  new function to invoke a method with a block passed
	  as an argument.

	* string.c (sym_call): use the above function to avoid
	  a block sharing. [ruby-dev:47438] [Bug #8531]

	* vm_insnhelper.c (vm_yield_with_cfunc): don't set block
	  in the frame.

	* test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc):
	  run related tests.

Mon Jun 17 21:33:27 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* include/ruby/intern.h, proc.c (rb_method_call_with_block):
	  new function to invoke a Method object with a block passed
	  as an argument.

	* proc.c (bmcall): use the above function to avoid a block sharing.
	  [ruby-core:54626] [Bug #8341]

	* test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls):
	  run related tests.

Mon Jun 17 20:53:21 2013  Tanaka Akira  <akr@fsij.org>

	* loadpath.c (RUBY_REVISION): Defined to suppress revision.h
	  inclusion actually.  r41352 removes the dependency.

Mon Jun 17 18:15:57 2013  Benoit Daloze  <eregontp@gmail.com>

	* ext/objspace/objspace.c: let rdoc know about objspace methods.
	  Specify 'objspace' should be required. See #8537.

Mon Jun 17 17:44:31 2013  Benoit Daloze  <eregontp@gmail.com>

	* gc.c (ObjectSpace): is a module not a class.

	* ext/objspace/objspace.c: try to include overview in rdoc,
	  see #8537.

Mon Jun 17 17:38:24 2013  Benoit Daloze  <eregontp@gmail.com>

	* gc.c: fix example of ObjectSpace.define_finalizer in overview

Mon Jun 17 16:59:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tk/tkutil/tkutil.c: use rb_sprintf(), rb_id2str(), and
	  rb_intern_str() instead of rb_intern() and RSTRING_PTR() with
	  RB_GC_GUARD(), to prevent temporary objects from GC.
	  [ruby-core:39000] [Bug #5199]

Mon Jun 17 14:27:54 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1

Mon Jun 17 13:04:01 2013  Akinori MUSHA  <knu@iDaemons.org>

	* tool/ifchange (until): Fix the condition, although harmless in
	  this case.

Mon Jun 17 11:50:29 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_mark_maybe): added. check `is_pointer_to_heap()' and
	  type is not T_ZOMBIE.

	* gc.c: use `gc_mark_maybe()'. T_ZOMBIE objects should not be pushed
	  to the mark stack.

Mon Jun 17 07:56:24 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_small_lshift): Renamed from bdigs_small_lshift.
	  (bary_small_rshift): Renamed from bdigs_small_rshift.

Mon Jun 17 07:38:48 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (absint_numwords_bytes): Removed.
	  (rb_absint_numwords): Don't call absint_numwords_bytes.

Sun Jun 16 23:14:58 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (BARY_ADD): New macro.
	  (BARY_SUB): Ditto.
	  (BARY_MUL): Ditto.
	  (BARY_DIVMOD): Ditto.
	  (BARY_ZERO_P): Ditto.
	  (absint_numwords_generic): Use these macros.

Sun Jun 16 21:41:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_2comp): Extracted from get2comp.
	  (integer_unpack_num_bdigits): Extracted from
	  rb_integer_unpack_internal.
	  (bary_unpack_internal): Renamed from bary_unpack and support
	  INTEGER_PACK_2COMP.
	  (bary_unpack): New function to validate arguments and invoke
	  bary_unpack_internal.
	  (rb_integer_unpack_internal): Removed.
	  (rb_integer_unpack): Invoke bary_unpack_internal.
	  (rb_integer_unpack_2comp): Removed.

	* internal.h (rb_integer_unpack_2comp): Removed.

	* pack.c: Follow the above change.

Sun Jun 16 18:41:42 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (INTEGER_PACK_2COMP): Defined.
	  (rb_integer_pack_2comp): Removed.

	* bignum.c (bary_pack): Support INTEGER_PACK_2COMP.
	  (rb_integer_pack): Invoke bary_pack directly.
	  (rb_integer_pack_2comp): Removed.
	  (rb_integer_pack_internal): Ditto.
	  (absint_numwords_generic): Follow the above change.

	* pack.c (pack_pack): Ditto.

	* sprintf.c (rb_str_format): Ditto.

Sun Jun 16 17:48:14 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (absint_numwords_generic): rb_funcall invocations removed.

Sun Jun 16 16:04:38 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/config_files.rb: use URI.read to allow it runs with Ruby 1.8.5.

Sun Jun 16 14:32:25 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_pack) Extracted from rb_integer_pack_internal.
	  (absint_numwords_generic): Use bary_pack.

Sun Jun 16 11:01:57 2013  Kouhei Sutou  <kou@cozmixng.org>

	* NEWS (XMLRPC::Client#http): Add.
	  [ruby-core:55197] [Feature #8461]

Sun Jun 16 10:38:45 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_add): New function.
	  (bary_zero_p): Extracted from bigzero_p.
	  (absint_numwords_generic): Use bary_zero_p and bary_add.
	  (bary_mul): Fix an argument for bary_mul_single.
	  (bary_divmod): Use size_t for arguments.

Sun Jun 16 08:55:22 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Use a BDIGIT variable to store the return
	  value of bigdivrem_single.

Sun Jun 16 08:43:59 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_divmod): New function.
	  (absint_numwords_generic): Use bary_divmod.
	  (bigdivrem_num_extra_words): Extracted from bigdivrem.
	  (bigdivrem_single): Ditto.
	  (bigdivrem_normal): Ditto.
	  (BIGDIVREM_EXTRA_WORDS): Defined.

Sun Jun 16 05:51:51 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c: Fixup around GC by MALLOC.
	  Add allocate size to malloc_increase before GC
	  for updating limit in after_gc_sweep.
	  Reset malloc_increase into garbage_collect()
	  for preventing GC again soon.

Sun Jun 16 05:15:36 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c: Add some columns to more detail profile.
	  new columns: Allocated size, Prepare Time, Removing Objects, Empty Objects

Sun Jun 16 02:04:40 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_prof_timer_stop): Merge function codes of GC_PROFILE_MORE_DETAIL and !GC_PROFILE_MORE_DETAIL.
	* gc.c (gc_prof_mark_timer_start): Ditto.
	* gc.c (gc_prof_mark_timer_stop): Ditto.
	* gc.c (gc_prof_sweep_slot_timer_start): Ditto.
	* gc.c (gc_prof_sweep_slot_timer_stop): Ditto.
	* gc.c (gc_prof_set_malloc_info): Ditto.
	* gc.c (gc_prof_set_heap_info): Ditto.

Sat Jun 15 23:50:24 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_sub): New function.
	  (absint_numwords_generic): Use bary_sub.
	  (bigsub_core): Skip unnecessary copy.

Sat Jun 15 22:05:30 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_mul): New function.
	  (absint_numwords_generic): Use bary_mul.
	  (bary_mul_single): Extracted from bigmul1_single.
	  (bary_mul_normal): Extracted from bigmul1_normal.

Sat Jun 15 20:13:46 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bary_unpack): Extracted from rb_integer_unpack_internal.
	  (absint_numwords_generic): Use bary_unpack.
	  (roomof): Defined.
	  (bdigit_roomof): Defined.
	  (BARY_ARGS): Defined.
	  (bary_unpack): Declared.

Sat Jun 15 19:35:04 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (absint_numwords_bytes): Make it static.
	  (absint_numwords_small): Ditto.
	  (absint_numwords_generic): Ditto.

Sat Jun 15 17:14:32 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigmul1_normal): Shrink the result Bignum length.

Sat Jun 15 10:19:42 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/bigdecimal/bigdecimal.c: Update overview formatting of headers

Sat Jun 15 10:19:06 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/bigdecimal/bigdecimal.gemspec: Update authors

Sat Jun 15 10:02:26 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bdigs_small_rshift): Extracted from big_rshift.
	  (bigdivrem): Use bdigs_small_rshift.

Sat Jun 15 08:37:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (eval_string_with_cref): propagate absolute path from the
	  binding if it is given explicitly.  patch by Gat (Dawid Janczak) at
	  [ruby-core:55123]. [Bug #8436]

Sat Jun 15 02:40:18 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bdigs_small_lshift): Extracted from big_lshift.
	  (bigdivrem): Use bdigs_small_lshift.

Fri Jun 14 20:47:41 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Reduce number of digits before bignew() for div.

Fri Jun 14 20:12:37 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Use bignew when ny == 1.

Fri Jun 14 18:52:51 2013  Koichi Sasada  <ko1@atdot.net>

	* compile.c (rb_iseq_compile_node): fix location of a `trace'
	  instruction (b_return event).
	  [ruby-core:55305] [ruby-trunk - Bug #8489]
	  (need a backport to 2.0.0?)

	* test/ruby/test_settracefunc.rb: add a test.

Fri Jun 14 18:18:07 2013  Koichi Sasada  <ko1@atdot.net>

	* class.c, include/ruby/ruby.h: add write barriers for T_CLASS,
	  T_MODULE, T_ICLASS.

	* constant.h: constify rb_const_entry_t::value and file to detect
	  assignment.

	* variable.c, internal.h (rb_st_insert_id_and_value, rb_st_copy):
	  added. update table with write barrier.

	* method.h: constify some variables to detect assignment.

	* object.c (init_copy): add WBs.

	* variable.c: ditto.

	* vm_method.c (rb_add_method): ditto.

Fri Jun 14 14:33:47 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* NEWS: add a note for Module#using.

Fri Jun 14 13:40:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* .travis.yml (before_script): update config files.

	* common.mk ($(srcdir)/tool/config.{guess,sub}): use get-config_files.

	* tool/config_files.rb: split get-config_files.

	* common.mk (update-config_files): rule to download config files.

	* tool/config.guess, tool/config.sub: remove and download from the
	  upstream.

	* tool/config_files.rb: download config files from GNU.

Fri Jun 14 12:21:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): suppress warnings
	  "left-hand operand of comma expression has no effect", on gcc 4.4.

Fri Jun 14 09:48:48 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* NEWS: add notes for $SAFE.

	* doc/security.rdoc: remove the description of $SAFE=4.

Fri Jun 14 00:14:29 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Zero test condition simplified.

Thu Jun 13 23:43:11 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/bigdecimal/*: improve documentation, nodoc samples with @mrkn

Thu Jun 13 23:02:14 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/xmlrpc/client.rb (XMLRPC::Client#http): Add reader for raw
	  Net::HTTP. [ruby-core:55197] [Feature #8461]
	  Reported by Herwin Weststrate. Thanks!!!

Thu Jun 13 22:44:52 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Support
	  multiple names in a response. [ruby-core:41711] [Bug #5774]
	  Reported by Roman Riha. Thanks!!!
	* test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_override):
	  Add a test of the above case.

Thu Jun 13 22:35:50 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Use
	  guard style.

Thu Jun 13 22:12:32 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/fileutils.rb (FileUtils#rmdir): fix traversal loop, not trying
	  remove same directory only.

Thu Jun 13 21:30:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (opt-dir), tool/ifchange: get rid of "alternate value"
	  expansion for legacy sh.  [ruby-dev:47420] [Bug #8524]

Thu Jun 13 21:24:09 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Refactored to use ALLOCV_N for temporary
	  buffers.

Thu Jun 13 18:54:11 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bignum.c (integer_unpack_num_bdigits_generic): reorder terms (but not
	  changed the intention of the expression) because VC++ reports a
	  warning for it.  reported by ko1 via IRC.

Thu Jun 13 18:53:14 2013  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_thread.rb (test_thread_local_security): Don't create
	  an unused thread.

Thu Jun 13 18:34:20 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bigdivrem): Use nlz.

Thu Jun 13 14:51:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): check constant safe
	  level at compile time.

Thu Jun 13 14:39:08 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* test/-ext-/test_printf.rb, test/rss/test_parser.rb,
	  test/ruby/test_array.rb, test/ruby/test_hash.rb,
	  test/ruby/test_m17n.rb, test/ruby/test_marshal.rb,
	  test/ruby/test_object.rb, test/ruby/test_string.rb: don't use
	  untrusted?, untrust, and trust to avoid warnings in case $VERBOSE is
	  true.

Thu Jun 13 10:47:16 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* bootstraptest/test_autoload.rb, bootstraptest/test_method.rb:
	  remove tests for $SAFE=4.

	* lib/pp.rb: use taint instead of untrust to avoid warnings when
	  $VERBOSE is set to true.

Thu Jun 13 06:12:18 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_unpack_num_bdigits_small): Fix a compile error on
	  clang -Werror,-Wshorten-64-to-32
	  Reported by Eric Hodel.  [ruby-core:55467] [Bug #8522]

Thu Jun 13 05:32:13 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/socket/extconf.rb:  Enable RFC 3542 IPV6 socket options for OS X
	  10.7+.  [ruby-trunk - Bug #8517]

Thu Jun 13 00:17:18 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_unpack_2comp): New function.
	  (rb_integer_unpack_internal): Extracted from rb_integer_unpack and
	  nlp_bits_ret argument added.
	  (integer_unpack_num_bdigits_small): nlp_bits_ret argument added to
	  return number of leading padding bits.
	  (integer_unpack_num_bdigits_generic): Ditto.

	* internal.h (rb_integer_unpack_2comp): Declared.

	* pack.c (pack_unpack): Use rb_integer_unpack_2comp and
	  rb_integer_unpack.

Wed Jun 12 23:27:03 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (mod_using): new method Module#using, which activates
	  refinements of the specified module only in the current class or
	  module definition.  [ruby-core:55273] [Feature #8481]

	* test/ruby/test_refinement.rb: related test.

Wed Jun 12 22:58:48 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentError
	  when $SAFE is set to 4.  $SAFE=4 is now obsolete.
	  [ruby-core:55222] [Feature #8468]

	* object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust):
	  Kernel#untrusted?, untrust, and trust are now deprecated.
	  Their behavior is same as tainted?, taint, and untaint,
	  respectively.

	* include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
	  and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
	  respectively.

	* array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c,
	  ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c,
	  ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c,
	  ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c,
	  ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c,
	  ext/socket/socket.c, ext/socket/udpsocket.c,
	  ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c,
	  ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c,
	  load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c,
	  safe.c, string.c, thread.c, transcode.c, variable.c,
	  vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for
	  $SAFE=4.

	* test/dl/test_dl2.rb, test/erb/test_erb.rb,
	  test/readline/test_readline.rb,
	  test/readline/test_readline_history.rb, test/ruby/test_alias.rb,
	  test/ruby/test_array.rb, test/ruby/test_dir.rb,
	  test/ruby/test_encoding.rb, test/ruby/test_env.rb,
	  test/ruby/test_eval.rb, test/ruby/test_exception.rb,
	  test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb,
	  test/ruby/test_io.rb, test/ruby/test_method.rb,
	  test/ruby/test_module.rb, test/ruby/test_object.rb,
	  test/ruby/test_pack.rb, test/ruby/test_rand.rb,
	  test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb,
	  test/ruby/test_struct.rb, test/ruby/test_thread.rb,
	  test/ruby/test_time.rb: remove tests for $SAFE=4.

Wed Jun 12 22:18:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_unpack_num_bdigits_generic): Rewritten without
	  rb_funcall.
	  (integer_unpack_num_bdigits_bytes): Removed.
	  (rb_integer_unpack): integer_unpack_num_bdigits_bytes invocation
	  removed.

Wed Jun 12 20:18:03 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.

Wed Jun 12 18:19:41 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (validate_integer_pack_format): supported_flags argument
	  added and validate given flags.
	  (rb_integer_pack_internal): Specify supported_flags.
	  (rb_integer_unpack): Ditto.

Wed Jun 12 16:41:38 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_sort_bang): remove duplicated assertions.
	  ARY_HEAP_PTR() implies ary not to be embedded.  [ruby-dev:47419]
	  [Bug #8518]

Wed Jun 12 12:44:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_getc): fix 7bit coderange condition, check if ascii read
	  data instead of read length. [ruby-core:55444] [Bug #8516]

Wed Jun 12 12:35:13 2013  Tanaka Akira  <akr@fsij.org>

	* pack.c (pack_pack): Use rb_integer_pack_2comp.

Wed Jun 12 12:07:04 2013  Tanaka Akira  <akr@fsij.org>

	* sprintf.c (rb_str_format): Fix a dynamic format string.

Wed Jun 12 12:04:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_uniq_bang): must not be modified once frozen even in
	  a callback method.

Wed Jun 12 12:03:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_sort_bang): must not be modified once frozen even in
	  a callback method.

Wed Jun 12 12:00:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (FL_SET_EMBED): shared object is frozen even when get
	  unshared.

	* array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.

Wed Jun 12 07:32:01 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (rand_int): Use rb_big_uminus.

Wed Jun 12 07:12:54 2013  Eric Hodel  <drbrain@segment7.net>

	* struct.c:  Improve documentation: replace "instance variable" with
	  "member", recommend the use of a block to customize structs, note
	  that member accessors are created, general cleanup.

Wed Jun 12 06:35:01 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (INTEGER_PACK_NEGATIVE): Defined.
	  (rb_integer_unpack): sign argument removed.

	* bignum.c (rb_integer_unpack): sign argument removed.
	  Non-negative integers generated by default.
	  INTEGER_PACK_NEGATIVE flag is used to generate non-positive integers.

	* pack.c (pack_unpack): Follow the above change.

	* random.c (int_pair_to_real_inclusive): Ditto.
	  (make_seed_value): Ditto.
	  (mt_state): Ditto.
	  (limited_big_rand): Ditto.

	* marshal.c (r_object0): Ditto.

Wed Jun 12 00:07:46 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple):
	  Add a test for the extracted method.

Tue Jun 11 23:56:24 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started):
	  Add a missing empty line.

Tue Jun 11 23:37:19 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (validate_integer_pack_format): Don't require a word order
	  flag if numwords is 1 or less.
	  (absint_numwords_generic): Don't specify a word order for
	  rb_integer_pack.

	* hash.c (rb_hash): Ditto.

	* time.c (v2w_bignum): Ditto.

Tue Jun 11 23:01:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (validate_integer_pack_format): Refine error messages.

Tue Jun 11 22:25:04 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (validate_integer_pack_format): numwords argument added.
	  Move a varidation from rb_integer_pack_internal and rb_integer_unpack.
	  (rb_integer_pack_internal): Follow above change.
	  (rb_integer_unpack): Ditto.

Tue Jun 11 20:52:43 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_pack_internal): Renamed from rb_integer_pack
	  and overflow_2comp argument added.
	  (rb_integer_pack): Just call rb_integer_pack_internal.
	  (rb_integer_pack_2comp): New function.

	* internal.h (rb_integer_pack_2comp): Declared.

	* sprintf.c (rb_str_format): Use rb_integer_pack and
	  rb_integer_pack_2comp to format binary/octal/hexadecimal integers.
	  (ruby_digitmap): Declared.
	  (remove_sign_bits): Removed.
	  (BITSPERDIG): Ditto.
	  (EXTENDSIGN): Ditto.

Tue Jun 11 16:15:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (ary_shrink_capa): shrink the capacity so it fits just with
	  the length.

	* array.c (ary_make_shared): release never used elements from frozen
	  array to be shared.  [ruby-dev:47416] [Bug #8510]

Tue Jun 11 12:49:01 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/re.rdoc: Rename to doc/regexp.rdoc
	* re.c: Update rdoc include for rename of file

Tue Jun 11 07:13:13 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* eval_error.c (error_print): keep that errat is non-shady object.
	  and guard errat from GC.

Tue Jun 11 05:04:25 2013  Benoit Daloze  <eregontp@gmail.com>

	* ext/racc/cparse/cparse.c: use rb_ary_entry() and
	  rb_ary_subseq() instead of RARRAY_PTR.
	  Based on a patch by Dirkjan Bussink. See Bug #8399.

Mon Jun 10 23:51:51 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* array.c (rb_ary_new_from_values): fix a typo. pointed out by
	  nagachika.
	  http://d.hatena.ne.jp/nagachika/20130610/ruby_trunk_changes_41199_41220

Mon Jun 10 21:51:03 2013  Kouhei Sutou  <kou@cozmixng.org>

	* ext/socket/raddrinfo.c (nogvl_getaddrinfo): Fix indent.

Mon Jun 10 21:49:43 2013  Kouhei Sutou  <kou@cozmixng.org>

	* ext/socket/raddrinfo.c (nogvl_getaddrinfo): Add missing return
	  value assignment.

Mon Jun 10 20:58:11 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/socket/raddrinfo.c (nogvl_getaddrinfo): work around for Ubuntu
	  13.04's getaddrinfo issue with mdns4. [ruby-list:49420]

Mon Jun 10 19:34:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_pack): Returns sign instead of words.
	  (absint_numwords_generic): Follow the above change.
	  (big2str_base_powerof2): Follow the above change.

	* internal.h: Ditto.

	* hash.c (rb_hash): Ditto.

	* pack.c (pack_pack): Ditto.

	* random.c (int_pair_to_real_inclusive): Ditto.
	  (rand_init): Ditto.
	  (random_load): Ditto.
	  (limited_big_rand): Ditto.

	* time.c (v2w_bignum): Ditto.

Mon Jun 10 17:20:01 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rgengc_remember): permit promoted object.
	  (rb_gc_writebarrier -> remember)

Mon Jun 10 17:14:01 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (RVALUE_PROMOTE): fix parameter name (`x' to `obj')
	  and make it inline function (like RVALUE_PROMOTE).

Mon Jun 10 16:22:50 2013  Koichi Sasada  <ko1@atdot.net>

	* array.c (rb_ary_new_from_values): add assertion
	  (ary should be young object).

Mon Jun 10 16:05:59 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (wmap_mark): check allocation of `w->obj2wmap'.
	  (no-allocation `w->obj2wmap' will be NULL pointer reference)

Mon Jun 10 15:36:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_error.c (error_print): use checking functions instead of
	  catching exceptions.

	* eval_error.c (error_print): restore errinfo for the case new
	  exception raised while printing the message.  [ruby-core:55365]
	  [Bug #8501]

	* eval_error.c (error_print): reduce calling setjmp.

Mon Jun 10 12:10:06 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_unpack_num_bdigits_small: Extracted from
	  rb_integer_unpack.
	  (integer_unpack_num_bdigits_generic): Ditto.
	  (integer_unpack_num_bdigits_bytes): New function.
	  (rb_integer_unpack): Use above functions.
	  Return a Bignum for INTEGER_PACK_FORCE_BIGNUM even when the result
	  is zero.

Mon Jun 10 05:38:23 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (absint_numwords_small): New function.
	  (absint_numwords_generic): Use absint_numwords_small if possible.

Mon Jun 10 01:07:57 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (absint_numwords_bytes): New function.
	  (absint_numwords_generic): Extracted from rb_absint_numwords.
	  (rb_absint_numwords): Use absint_numwords_bytes if possible.

Sun Jun  9 21:33:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_absint_numwords): Return (size_t)-1 when overflow.
	  Refine variable names.
	  (rb_absint_size): Refine variable names.

	* internal.h (rb_absint_size): Refine an argument name.
	  (rb_absint_numwords): Ditto.

Sun Jun  9 16:51:41 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_absint_numwords): Renamed from rb_absint_size_in_word.

	* internal.h (rb_absint_numwords): Follow the above change.

	* pack.c (pack_pack): Ditto.

	* random.c (rand_init): Ditto.
	  (limited_big_rand): Ditto.

Sun Jun  9 14:41:05 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_pack): numwords_allocated argument removed.

	* internal.h (rb_integer_pack): Follow the above change.

	* hash.c (rb_hash): Ditto.

	* time.c (v2w_bignum): Ditto.

	* pack.c (pack_pack): Ditto.

	* random.c (int_pair_to_real_inclusive): Ditto.
	  (rand_init): Ditto.
	  (random_load): Ditto.
	  (limited_big_rand): Ditto.

Sun Jun  9 09:34:44 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big2str_base_powerof2): New function.
	  (rb_big2str0): Use big2str_base_powerof2 if base is 2, 4, 8, 16 or 32.

Sun Jun  9 00:59:04 2013  Tanaka Akira  <akr@fsij.org>

	* hash.c (rb_hash): Use rb_integer_pack to obtain least significant
	  long integer.

Sat Jun  8 23:56:00 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (rb_num_to_uint): Use rb_absint_size instead of
	  RBIGNUM_LEN.

Sat Jun  8 22:53:45 2013  Tanaka Akira  <akr@fsij.org>

	* marshal.c (r_object0): Use rb_integer_unpack.

Sat Jun  8 22:18:57 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.

Sat Jun  8 21:47:33 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (v2w_bignum): Simplified using rb_integer_pack.
	  (rb_big_abs_find_maxbit): Removed.

Sat Jun  8 21:03:40 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_absint_singlebit_p): New function.

	* internal.h (rb_absint_singlebit_p): Declared.

	* time.c (v2w_bignum): Use rb_absint_singlebit_p instead of
	  rb_big_abs_find_minbit.
	  (rb_big_abs_find_minbit): Removed.

Sat Jun  8 20:24:23 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (rb_big_abs_find_maxbit): Use rb_absint_size.
	  (bdigit_find_maxbit): Removed.

Sat Jun  8 19:47:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* class.c (include_modules_at): invalidate method cache if included
	  module contains constants

	* test/ruby/test_module.rb: add test

Sat Jun  8 19:31:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* random.c (limited_big_rand): declare rnd, lim and mask as uint32_t
	  to avoid 64 bit to 32 bit shorten warnings.

Sat Jun  8 19:23:53 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* win32/Makefile.sub: r41163 changed win32/win32.c and configure.in
	  but it didn't treat about mswin32/mswin64, so fix it.
	  NOTE: this needs a review by usa whether additional condition is
	  required or not.

Sat Jun  8 19:06:26 2013  Tanaka Akira  <akr@fsij.org>

	* random.c: Unused RBignum internal accessing macros removed.

Sat Jun  8 19:04:15 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (limited_big_rand): The argument, limit, is changed to
	  VALUE.  Use rb_integer_pack and rb_integer_unpack.

Sat Jun  8 17:15:18 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (make_seed_value): Fix the length given for
	  rb_integer_unpack.

Sat Jun  8 16:38:02 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_unpack): Don't use rb_funcall if possible.

	* random.c: Use uint32_t for elements of seed.
	  (make_seed_value): Use rb_integer_unpack.

Sat Jun  8 15:58:18 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (rand_init): Add a cast to fix clang compile error:
	  random.c:410:32: error: implicit conversion loses integer precision:
	  'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
	  This cast doesn't cause a problem because len is not bigger than
	  MT_MAX_STATE.

Sat Jun  8 15:30:03 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (rand_init): Use rb_integer_pack.
	  (roomof): Removed.

Sat Jun  8 14:58:32 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (INTEGER_PACK_FORCE_BIGNUM): New flag constant.

	* bignum.c (rb_integer_unpack): Support INTEGER_PACK_FORCE_BIGNUM.

	* random.c (int_pair_to_real_inclusive): Use
	  INTEGER_PACK_FORCE_BIGNUM to use rb_big_mul instead of rb_funcall.

Sat Jun  8 14:17:01 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check for NET_LUID.  header macro varies across
	  compiler versions.

	* win32/win32.c: use configured macro.

Sat Jun  8 11:59:55 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (int_pair_to_real_inclusive): Use rb_funcall instead of
	  rb_big_mul because rb_integer_unpack can return a Fixnum.

Sat Jun  8 11:17:39 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (int_pair_to_real_inclusive): Use rb_integer_pack.

Sat Jun  8 09:49:42 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (int_pair_to_real_inclusive): Use rb_integer_unpack.

Sat Jun  8 08:12:22 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (random_load): Use rb_integer_pack.

Sat Jun  8 06:15:46 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (numberof): Removed.

Sat Jun  8 06:00:47 2013  Tanaka Akira  <akr@fsij.org>

	* random.c: include internal.h.
	  (mt_state): Use rb_integer_unpack.

Sat Jun  8 00:55:51 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_pack_loop_setup): word_num_nailbytes_ret argument
	  removed.
	  (rb_integer_pack): Follow the above change.
	  (rb_integer_unpack): Follow the above change.

Sat Jun  8 00:37:32 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (validate_integer_pack_format): Renamed from
	  validate_integer_format.
	  (integer_pack_loop_setup): Renamed from integer_format_loop_setup.
	  (integer_pack_fill_dd): Renamed from int_export_fill_dd.
	  (integer_pack_take_lowbits): Renamed from int_export_take_lowbits.
	  (integer_unpack_push_bits): Renamed from int_import_push_bits.

Fri Jun  7 23:58:06 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_pack): Arguments changed.  Use flags to
	  specify word order and byte order.
	  (rb_integer_unpack): Ditto.
	  (validate_integer_format): Follow the above change.
	  (integer_format_loop_setup): Ditto.

	* pack.c: Ditto.

	* internal.h: Ditto.
	  (INTEGER_PACK_MSWORD_FIRST): Defined.
	  (INTEGER_PACK_LSWORD_FIRST): Ditto.
	  (INTEGER_PACK_MSBYTE_FIRST): Ditto.
	  (INTEGER_PACK_LSBYTE_FIRST): Ditto.
	  (INTEGER_PACK_NATIVE_BYTE_ORDER): Ditto.
	  (INTEGER_PACK_LITTLE_ENDIAN): Ditto.
	  (INTEGER_PACK_BIG_ENDIAN): Ditto.

Fri Jun  7 22:10:50 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/rubygems/specification.rb (Gem::Specification#to_yaml):
	  use Gem::NoAliasYAMLTree.create instead of Gem::NoAliasYAMLTree.new
	  to suppress deprecated warnings.

Fri Jun  7 21:39:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_integer_pack): Renamed from rb_int_export.
	  (rb_integer_unpack): Renamed from rb_int_import.

	* internal.h, pack.c: Follow the above change.

Fri Jun  7 21:05:26 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (integer_format_loop_setup): Extracted from rb_int_export
	  and rb_int_import.

Fri Jun  7 19:48:38 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (validate_integer_format): Extracted from rb_int_export and
	  rb_int_import.

Fri Jun  7 19:23:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_absint_size): Use numberof.
	  (rb_int_export): Ditto.

Fri Jun  7 18:58:56 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (numberof): Gathered from various files.

	* array.c, math.c, thread_pthread.c, iseq.c, enum.c, string.c, io.c,
	  load.c, compile.c, struct.c, eval.c, gc.c, parse.y, process.c,
	  error.c, ruby.c: Remove the definitions of numberof.

Fri Jun  7 18:24:39 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_absint_size): Declare a variable, i, just before used
	  to suppress a warning.
	  (rb_int_export): Ditto.

Fri Jun  7 17:41:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* bignum.c (rb_absint_size): explicit cast to BDIGIT to avoid implicit
	  64 bit to 32 bit shortening warning
	* bignum.c (rb_int_export): ditto
	* bignum.c (int_import_push_bits): ditto

Fri Jun  7 17:31:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* internal.h (RCLASS_SUPER): use descriptive variable name
	* internal.h (RCLASS_SET_SUPER): ditto

Fri Jun  7 13:25:27 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place of
	  RB_GC_GUARD. it should be after the object is used.

Fri Jun  7 13:22:43 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c (before_gc_sweep): noinline can also avoid the segv instead of
	  -O0 of r41084. this way is expected less slow.

Fri Jun  7 11:45:42 2013  Kenta Murata  <mrkn@cookpad.com>

	* rational.c (numeric_quo): move num_quo in numeric.c to numeric_quo
	  in rational.c to refer canonicalization state for mathn support.
	  [ruby-core:41575] [Bug #5736]

	* numeric.c (num_quo): ditto.

	* test/test_mathn.rb: add a test for the change at r41109.

Fri Jun  7 11:41:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: revert r41106.  size_t may not be unsigned

	* bignum.c (rb_absint_size_in_word, rb_int_export, rb_int_import): use
	  NUM2SIZET() and SIZET2NUM() already defined in ruby/ruby.h.

Fri Jun  7 11:28:37 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c: use oldgen bitmap as initial mark bitmap when major gc.
	  so can skip oldgen bitmap check around mark & sweep.
	* gc.c (slot_sweep_body): change scan algorithm for performance:
	  from object's pointer base to bitmap one.

Fri Jun  7 11:25:56 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c: introduce oldgen bitmap for preparing performance tuning.

Fri Jun  7 11:20:57 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (MARKED_IN_BITMAP, MARK_IN_BITMAP, CLEAR_IN_BITMAP): bring
	  bitmap macros in one place, and introduce BITMAP_BIT.

Fri Jun  7 11:18:35 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* array.c (ary_new): change order of allocation in order
	  to remove FL_OLDGEN operation.

Fri Jun  7 11:16:28 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* tool/rdocbench.rb: add gc total time information.

Fri Jun  7 10:12:01 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: remove "Sunny" terminology.
	  "Sunny" doesn't mean antonym of "Shady" (questionable, doubtful, etc).
	  Instead of "Sunny", use "non-shady" or "normal".

Fri Jun  7 09:29:33 2013  Kenta Murata  <mrkn@cookpad.com>

	* bignum.c (rb_int_import): explicitly casting BDIGIT_DBL to BDIGIT
	  to prevent warning.

Fri Jun  7 07:29:33 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (rb_int_export): countp argument is split into
	  wordcount_allocated and wordcount.

	* bignum.c (rb_int_export): Follow the above change.

	* pack.c (pack_pack): Ditto.

Fri Jun  7 07:17:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* NEWS: describe a compatibility issue of Numeric#quo
	  introduced at r41109.

Fri Jun  7 07:15:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* NEWS: fix style.

Fri Jun  7 06:48:17 2013  Benoit Daloze  <eregontp@gmail.com>

	* numeric.c: remove unused ID id_to_r introduced in r41109.

Fri Jun  7 06:15:31 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_int_import): New function.
	  (int_import_push_bits): Ditto.

	* internal.h (rb_int_import): Declared.

	* pack.c (pack_unpack): Use rb_int_import for BER compressed integer.

Thu Jun  6 22:24:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* numeric.c (num_quo): Use to_r method to convert the receiver to
	  rational.  [ruby-core:41575] [Bug #5736]

	* test/ruby/test_numeric.rb: add a test for the above change.

Thu Jun  6 20:40:17 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Invoke RUBY_REPLACE_TYPE for size_t.
	  Don't invoke RUBY_CHECK_PRINTF_PREFIX for size_t to avoid conflict
	  with RUBY_REPLACE_TYPE.

	* internal.h (rb_absint_size): Declared.
	  (rb_absint_size_in_word): Ditto.
	  (rb_int_export): Ditto.

	* bignum.c (rb_absint_size): New function.
	  (rb_absint_size_in_word): Ditto.
	  (int_export_fill_dd): Ditto.
	  (int_export_take_lowbits): Ditto.
	  (rb_int_export): Ditto.

	* pack.c (pack_pack): Use rb_int_export for BER compressed integer.

Thu Jun  6 19:31:33 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: fixed coding error [ruby-core:55337].
	  reported by Riley Lynch.

Thu Jun  6 14:16:37 2013  Narihiro Nakamura  <authornari@gmail.com>

	* ext/objspace/object_tracing.c: rename allocation_info to
	  lookup_allocation_info. At times I confused "struct
	  allocation_info" with "function allocation_info".

Thu Jun  6 13:57:06 2013  Narihiro Nakamura  <authornari@gmail.com>

	* ext/objspace/object_tracing.c: allocation_info function isn't
	  called by any other file.

Thu Jun  6 09:41:00 2013  Kenta Murata  <mrkn@cookpad.com>

	* numeric.c (num_quo): should return a Float for a Float argument.
	  [ruby-dev:44710] [Bug #5515]

	* test/ruby/test_fixnum.rb: Add an assertion for the above change.

	* test/ruby/test_bignum.rb: ditto.

Thu Jun  6 00:59:44 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (gc_mark): get rid of pushing useless objects.
	* gc.c (rgengc_rememberset_mark): bypass gc_mark() in order to push
	  sunny old object at minor gc.
	* gc.c (gc_mark_children): move sunny old check to gc_mark().
	* gc.c (rgengc_check_shady): remove DEMOTE that already unnecessary.
	* gc.c (rb_gc_writebarrier): ditto.

	  change sunny old check point in order to save mark stack and
	  remove unnatural rest_sweep & demote.

Thu Jun  6 00:52:42 2013  Masaya Tarui  <tarui@ruby-lang.org>

	* gc.c (rgengc_rememberset_mark): change scan algorithm for performance:
	  from object's pointer base to bitmap one.

Thu Jun  6 00:30:04 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* win32/win32.c (NET_LUID): define it on MinGW32.
	  mingw-w64 has NET_LUID but mingw32 (mingw.org) still doesn't have
	  NET_LUID. reported by taco on IRC

Thu Jun  6 00:05:08 2013  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (String#b): Allow code range scan to happen later so
	  ascii_only? on a result string returns the correct value.
	  [ruby-core:55315] [Bug #8496]

Wed Jun  5 22:40:42 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (capability_response): should ignore trailing
	  spaces.  Thanks, Peter Kovacs.  [ruby-core:55024] [Bug #8415]

	* test/net/imap/test_imap_response_parser.rb: related test.

Wed Jun  5 21:17:08 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_fdiv): Use nlz() instead of bdigbitsize().
	  (bdigbitsize): Removed.

Wed Jun  5 20:32:00 2013  Kenta Murata  <mrkn@cookpad.com>

	* include/ruby/ruby.h: fix alignment in comment.

Wed Jun  5 20:05:29 2013  Tanaka Akira  <akr@fsij.org>

	* random.c (int_pair_to_real_inclusive): Add a cast to BDIGIT.
	  (random_load): Fix shift width for fixnums.
	  Re-implement bignum extraction without ifdefs.

Wed Jun  5 15:26:10 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c (before_gc_sweep): don't optimize it to avoid segv on Ubuntu
	  10.04 gcc 4.4.
	  http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20130527T190301Z.diff.html.gz

Wed Jun  5 09:46:46 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): add
	  EACCES for Windows.

Wed Jun  5 08:13:37 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_big_pow): Don't need to multiply SIZEOF_BDIGITS.
	  Use nlz instead of bitlength_bdigit.
	  (bitlength_bdigit): Removed.

Wed Jun  5 07:14:18 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (d_lite_cmp, d_lite_equal): simplified.

Wed Jun  5 07:07:01 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: fixed a bug [ruby-core:55295].  reported
	  by Riley Lynch.

Wed Jun  5 06:44:08 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 2.0.3

	* test/rubygems:  Tests for the above.

	* NEWS:  Added RubyGems 2.0.3 note.

Wed Jun  5 06:35:15 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/marshal.rdoc:  Add description of Marshal format.

Wed Jun  5 01:16:09 2013  Benoit Daloze  <eregontp@gmail.com>

	* array.c (Array#+): fix documentation example.
	  Patch by Logan Serman. [Fixes GH-324]

Wed Jun  5 00:21:54 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/irb/lc/ja/help-message: update help messages.
	  following r41028. [ruby-dev:46707] [Feature #7510]

Wed Jun  5 00:09:32 2013  Tanaka Akira  <akr@fsij.org>

	* marshal.c (r_object0): Generalize a round up expression.
	  Use BDIGIT instead of int.

Tue Jun  4 23:44:02 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* object.c (rb_Hash): fix docs. patched by Stefan Sch"ussler.
	  [ruby-core:55299] [Bug #8487]

Tue Jun  4 23:16:49 2013  Benoit Daloze  <eregontp@gmail.com>

	* lib/irb/completion.rb: Use %w literal construction for long lists.
	  Patch by Dave Goodchild. [Fixes GH-299]

Tue Jun  4 23:08:42 2013  Benoit Daloze  <eregontp@gmail.com>

	* ext/objspace/objspace.c: improve wording and remove duplicated comment.
	  Based on a patch by Dave Goodchild. [Fixes GH-299]

Tue Jun  4 18:41:47 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bitlength_bdigit): Fix an off-by-one error.

Tue Jun  4 15:30:00 2013  Kenta Murata  <mrkn@cookpad.com>

	* ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): fix the number
	  of figures.  Patch by Vipul A M <vipulnsward@gmail.com>.
	  https://github.com/ruby/ruby/pull/323  fix GH-323

	* test/bigdecimal/test_bigdecimal_util.rb: fix for the above change.

Tue Jun  4 00:44:27 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): add
	  EEXIST for Linux. (suggested by nurse)

Mon Jun  3 23:58:19 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/fileutils.rb (FileUtils.rmdir): use remove_tailing_slash.
	* test/fileutils/test_fileutils.rb: test for above.

Mon Jun  3 23:47:55 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (bitlength_bdigit): New function.
	  (rb_big_pow): Use bitlength_bdigit instead of ffs.

Mon Jun  3 23:11:19 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/fileutils.rb: fix behavior when mkdir/mkdir_p accepted "/".
	* test/fileutils/test_fileutils.rb: add test for above change.
	  Patched by Mitsunori Komatsu. [GH-319]

Mon Jun  3 19:02:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (is_hfs): use the file descriptor instead of a path.

Mon Jun  3 07:15:17 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: removes AC_CHECK_FUNCS(readdir_r). readdir_r()
	  is only used from dir.c and it doesn't need readdir_r().
	* configure.in (SIZEOF_STRUCT_DIRENT_TOO_SMALL): removed. It is
	  only used for readdir_r.
	* dir.c: removes NAME_MAX_FOR_STRUCT_DIRENT. It is not right way
	  to detect maximum length of path len. POSIX require to use
	  fpathconf(). IOW, it might have lead to make a vulnerability
	  using stack smashing. Moreover, readdir() works enough for our
	  usage.
	* dir.c (READDIR): removes an implementation which uses
	  readdir_r() and parenthesize in a macro body correctly.
	* dir.c (dir_read): removes IF_HAVE_READDIR_R(DEFINE_STRUCT_DIRENT
	  entry), it is used only for readdir_r().
	* dir.c (dir_each): ditto.
	* dir.c (glob_helper): ditto.

	* dir.c (READDIR): removes entry and dp argument.
	* dir.c (dir_read): adjust for the above change.
	* dir.c (dir_each): ditto.
	* dir.c (glob_helper): ditto.

Mon Jun  3 03:40:29 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.
	  The code is not useless.

Mon Jun  3 01:25:25 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/socket/test_sockopt.rb: change test name. follow r41037.

Mon Jun  3 01:08:43 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/rinda/test_rinda.rb: rename functions introduced in r41009.

Sun Jun  2 23:33:42 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* enc/trans/japanese_euc.trans, test/ruby/test_transcode.rb,
	  tool/transcode-tblgen.rb: change EUC-JP-2004 to EUC-JIS-2004.
	  This is follow up to changes in r41024.

Sun Jun  2 22:44:42 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/socket/option.c: rename functions introduced in r41009
	  s/ip/ipv4/g because they are ipv4 functions.
	  (there's a policy that the name "ip" is for methods which supports
	   both ipv4 and ipv6)

Sun Jun  2 16:15:29 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dln_find.c (dln_find_exe, dln_find_file): remove deprecated
	  non-reentrant functions.

Sun Jun  2 15:04:35 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/cgi/util.rb, lib/erb.rb: Use String#b [Feature #8394] by znz

Sun Jun  2 14:10:21 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/irb/lc/help-message: Apply english updates for irb --help #7510

Sun Jun  2 12:03:58 2013  Zachary Scott  <zachary@zacharyscott.net>

	* range.c: Fix rdoc on Range#bsearch [Bug #8242] [ruby-core:54143]

Sun Jun  2 02:08:37 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* enc/euc_jp.c: fix typo: the name of EUC-JIS-2004.

Sat Jun  1 23:17:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* vm_eval.c (rb_mod_module_eval): mention in docs that arguments passed
	  to the method are passed to the block

Sat Jun  1 17:58:13 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#freeze, taint, untaint): Save a "self" by
	  utilizing super returning self, and add tests while at it.

Sat Jun  1 17:24:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_set_arguments): not a simple single argument if any
	  keyword arguments exist.  [ruby-core:55203] [Bug #8463]

	* vm_insnhelper.c (vm_yield_setup_block_args): split single parameter
	  if any keyword arguments exist, and then extract keyword arguments.
	  [ruby-core:55203] [Bug #8463]

Sat Jun  1 11:16:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_exc_new_cstr): rename from rb_exc_new2.

	* error.c (rb_exc_new_str): rename from rb_exc_new3.

Sat Jun  1 10:13:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_new[2-5], rb_{tainted,usascii}_str_new2),
	  (rb_str_buf_new2): remove old interfaces.

Sat Jun  1 08:00:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),
	  (gzreader_gets): check EOF.  [ruby-core:55220] [Bug #8467]

Sat Jun  1 07:32:15 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Use BDIGIT type for hbase.

Sat Jun  1 02:37:35 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/socket/option.c (sockopt_s_byte): constructor of the sockopt
	  whose value's is byte.

	* ext/socket/option.c (sockopt_byte): getter for above.

	* ext/socket/option.c (inspect_byte): inspect for above.

	* ext/socket/option.c (sockopt_s_ip_multicast_loop): constructor of
	  the sockopt whose optname is IP_MULTICAST_LOOP.

	* ext/socket/option.c (sockopt_ip_multicast_loop): getter for above.

	* ext/socket/option.c (sockopt_s_ip_multicast_ttl): constructor of
	  the sockopt whose optname is IP_MULTICAST_TTL.

	* ext/socket/option.c (sockopt_ip_multicast_ttl): getter for above.

	* ext/socket/option.c (sockopt_inspect): use above.

Sat Jun 01 01:50:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_power): use rb_dbl2big
	  to convert a double value to a Bignum.

Sat Jun  1 00:19:50 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (calc_hbase): Make hbase the maximum power of base
	  representable in BDIGIT.

Fri May 31 23:56:13 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (calc_hbase): Extracted from rb_big2str0.

Fri May 31 23:22:24 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c: Don't hard code SIZEOF_BDIGITS for log_base(hbase).
	  (big2str_orig): hbase_numdigits argument added.
	  (big2str_karatsuba): Ditto.
	  (rb_big2str0): Calculate hbase_numdigits.

Fri May 31 17:57:21 2013  Zachary Scott  <zachary@zacharyscott.net>

	* process.c: Improve Process::exec documentation

Fri May 31 17:26:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (rb_funcallv): add better names of rb_funcall2.

	* vm_eval.c (rb_funcallv_public): ditto for rb_funcall3.

Fri May 31 17:04:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_new_capa): add better names of rb_ary_new2.

	* array.c (rb_ary_new_from_args): ditto for rb_ary_new3.

	* array.c (rb_ary_new_from_values): ditto for rb_ary_new4.

Fri May 31 16:35:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (HAVE_ATTRIBUTE_FUNCTION_ALIAS): define to tell if
	  alias attribute is available.

Fri May 31 16:03:23 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c, proc.c: s/call_seq/call-seq in rdoc. [Fixes GH-322]

Fri May 31 15:56:36 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/openssl/ossl_ssl.c: Add missing paren in rdoc [Fixes GH-321]

Fri May 31 11:58:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (set_visibility): extract from rb_mod_public(),
	  rb_mod_protected() and rb_mod_private().

Thu May 30 19:47:42 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* vm_insnhelper.c (vm_callee_setup_keyword_arg,
	  vm_callee_setup_arg_complex): consider a hash argument for keyword
	  only when the number of arguments is more than the expected
	  mandatory parameters.  [ruby-core:53199] [ruby-trunk - Bug #8040]

	* test/ruby/test_keyword.rb: update a test for above.

Thu May 30 17:55:04 2013  Zachary Scott  <zachary@zacharyscott.net>

	* process.c: RDoc on Process.spawn

Thu May 30 00:08:14 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_enable): rest_sweep() to finish last GC.
	  Profiling record is allocated at first of marking phase.
	  Enable at lazy sweeping may cause an error (SEGV).

Wed May 29 10:33:27 2013  Koichi Sasada  <ko1@atdot.net>

	* hash.c: fix WB bug.
	  (1) Hash's key also needs WB.
	  (2) callback parameter *key and *value of st_update() is not a
	      storage of st_table itself (only local variable). So that
	      OBJ_WRITE() is not suitable, especially for `!existing'.
	      OBJ_WRITTEN() is used instead of OBJ_WRITE().

Tue May 28 12:31:21 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/object_tracing.c: fix a bug reported at
	  "[ruby-core:55182] [ruby-trunk - Bug #8456][Open] Sugfault in Ruby Head"
	  Care about the case TracePoint#path #=> `nil'.

	* ext/objspace/object_tracing.c: add two new methods:
	  * ObjectSpace.allocation_class_path(o)
	  * ObjectSpace.allocation_method_id(o)
	  They are not useful for Object.new because they are always
	  "Class" and :new.
	  To trace more useful information, we need to maintain call-tree
	  using call/return hooks, which is implemented by
	  ll-prof <http://sunagae.net/wiki/doku.php?id=software:llprof>

	* test/objspace/test_objspace.rb: add a test.

Tue May 28 11:30:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): leave makefiles untouched if the content is
	  not changed, to get rid of unnecessary re-linking.

Tue May 28 03:11:02 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/gc_hook.c, ext/objspace/objspace.c: add new methods to
	  hook GC invocation.
	  * ObjectSpace.after_gc_start_hook=(proc)
	  * ObjectSpace.after_gc_end_hook=(proc)

	  Note that hooks are not kicked immediately. Procs are kicked
	  at postponed_job.

	  This feature is a sample of new internal event and
	  rb_postponed_job API.

Tue May 28 02:56:15 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): remove wrong rest_sweep().

Tue May 28 02:44:23 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (garbage_collect_body): fix GC_ENABLE_LAZY_SWEEP condition.

	* gc.c (GC_NOTIFY): move debug print location and use stderr instead
	  of stdout.

Tue May 28 02:07:21 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_postponed_job_register_one): fix iteration bug.

	* ext/-test-/postponed_job/postponed_job.c,
	  test/-ext-/postponed_job/test_postponed_job.rb: add a test.

Tue May 28 00:34:23 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h, gc.c: add new internal event
	  RUBY_INTERNAL_EVENT_GC_END. This event invokes at the end of
	  after_sweep().
	  Time chart with lazy sweep is:
	    (1) Kick RUBY_INTERNAL_EVENT_GC_START
	    (2) [gc_marks()]
	    (3) [lazy_sweep()]
	    (4) [... run Ruby program (mutator) with lazy_sweep() ...]
	    (5) [after_sweep()]
	    (6) Kick RUBY_INTERNAL_EVENT_GC_END
	    (7) [... run Ruby program (mutator), and go to (1) ...]
	  Time chart without lazy sweep (GC.start, etc) is:
	    (1) Kick RUBY_INTERNAL_EVENT_GC_START
	    (2) [gc_marks()]
	    (3) [gc_sweep()]
	    (4) [after_sweep()]
	    (5) Kick RUBY_INTERNAL_EVENT_GC_END
	    (6) [... run Ruby program (mutator), and go to (1) ...]

	* ext/-test-/tracepoint/tracepoint.c,
	  test/-ext-/tracepoint/test_tracepoint.rb: modify a test.

Tue May 28 00:18:57 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_postponed_job_flush): remove a wrong comment.

Mon May 27 22:09:33 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/ruby.h (RHASH_SIZE): Add a cast to suppress a
	  warning, comparison between signed and unsigned integer
	  expressions [-Wsign-compare], on ILP32.

Mon May 27 19:25:47 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE to
	  RUBY_INTERNAL_EVENT_FREEOBJ.

	* ext/-test-/tracepoint/tracepoint.c,
	  ext/objspace/object_tracing.c,
	  gc.c, vm_trace.c: catch up this change.

Mon May 27 18:57:28 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c: support ObjectSpace.trace_object_allocations.
	  Read the following test to know HOWTO.
	  This feature is a sample of RUBY_INTERNAL_EVENT.

	* test/objspace/test_objspace.rb: add a test.

	* ext/objspace/object_tracing.c: ditto.

	* gc.c (rb_gc_count): add. This function returns GC count.

	* internal.h: add decl. of rb_gc_count(). Same as `GC.count'.

Mon May 27 17:33:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (install_recursive): add maxdepth option.

	* tool/rbinstall.rb (bin-comm): limit depth of bindir and reject empty
	  files.  [ruby-core:55101] [Bug #8432]

Mon May 27 16:16:18 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_trace.c (rb_postponed_job_flush, rb_postponed_job_register): use
	  ruby_xmalloc/xfree. It is safe during GC.

Mon May 27 09:24:03 2013  Koichi Sasada  <ko1@atdot.net>

	* test/-ext-/postponed_job/test_postponed_job.rb: fix typo and class name.

Mon May 27 09:05:17 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h, gc.c, vm_trace.c: add internal events.
	  * RUBY_INTERNAL_EVENT_NEWOBJ: object created.
	  * RUBY_INTERNAL_EVENT_FREE: object freed.
	  * RUBY_INTERNAL_EVENT_GC_START: GC started.
	  And rename `RUBY_EVENT_SWITCH' to `RUBY_INTERNAL_EVENT_SWITCH'.

	  Internal events can not invoke any Ruby program because the tracing
	  timing may be critical (under huge restriction).
	  These events can be hooked only by C-extensions.
	  We recommend to use rb_postponed_job_register() API to call Ruby
	  program safely.

	  This change is mostly written by Aman Gupta (tmm1).
	  https://bugs.ruby-lang.org/issues/8107#note-12
	  [Feature #8107]

	* include/ruby/debug.h, vm_trace.c: added two new APIs.
	  * rb_tracearg_event_flag() returns rb_event_flag_t of this event.
	  * rb_tracearg_object() returns created/freed object.

	* ext/-test-/tracepoint/extconf.rb,
	  ext/-test-/tracepoint/tracepoint.c,
	  test/-ext-/tracepoint/test_tracepoint.rb: add a test.

Mon May 27 08:38:21 2013  Koichi Sasada  <ko1@atdot.net>

	* ext/-test-/postponed_job/postponed_job.c: fix `init' function name.

Mon May 27 06:22:41 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/debug.h, vm_trace.c: add rb_postponed_job API.
	  Postponed jobs are registered with this API. Registered jobs
	  are invoked at `ruby-running-safe-point' as soon as possible.
	  This timing is completely same as finalizer timing.

	  There are two APIs:
	  * rb_postponed_job_register(flags, func, data): register a
	    postponed job with data. flags are reserved.
	  * rb_postponed_job_register_one(flags, func, data): same as
	    `rb_postponed_job_register', but only one `func' job is
	    registered (skip if `func' is already registered).

	  This change is mostly written by Aman Gupta (tmm1).
	  https://bugs.ruby-lang.org/issues/8107#note-15
	  [Feature #8107]

	* gc.c: use postponed job API for finalizer.

	* common.mk: add dependency from vm_trace.c to debug.h.

	* ext/-test-/postponed_job/extconf.rb, postponed_job.c,
	  test/-ext-/postponed_job/test_postponed_job.rb: add a test.

	* thread.c: implement postponed API.

	* vm_core.h: ditto.

Mon May 27 02:26:02 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): collect promote_operation_count and
	  types (RGENGC_PROFILE >= 2).

Mon May 27 01:40:58 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_stat): collect shade_operation_count,
	  remembered_sunny_object_count and remembered_shady_object_count
	  for each types when RGENGC_PROFILE >= 2.
	  They are informative for optimization.

Mon May 27 01:15:22 2013  Koichi Sasada  <ko1@atdot.net>

	* hash.c (rb_hash_tbl_raw), internal.h: added.
	  Returns st_table without shading hash.

	* array.c: use rb_hash_tbl_raw() for read-only purpose.

	* compile.c (iseq_compile_each): ditto.

	* gc.c (count_objects): ditto.

	* insns.def: ditto.

	* process.c: ditto.

	* thread.c (clear_coverage): ditto.

	* vm_insnhelper.c: ditto.

Mon May 27 00:31:09 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/make-snapshot: use ENV["AUTOCONF"] instead of directly using
	  literal "autoconf".

Sun May 26 21:31:46 2013  Koichi Sasada  <ko1@atdot.net>

	* hash.c, include/ruby/ruby.h: support WB protected hash.
	  * constify RHash::ifnone and make new macro RHASH_SET_IFNONE().
	  * insert write barrier for st_update().

	* include/ruby/intern.h: declare rb_hash_set_ifnone(hash, ifnone).

	* marshal.c (r_object0): use RHASH_SET_IFNONE().

	* ext/openssl/ossl_x509name.c (Init_ossl_x509name): ditto.

Sat May 25 23:22:38 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* test/fiddle/test_c_struct_entry.rb,
	  test/fiddle/test_c_union_entity.rb,
	  test/fiddle/test_cparser.rb, test/fiddle/test_func.rb,
	  test/fiddle/test_handle.rb, test/fiddle/test_import.rb,
	  test/fiddle/test_pointer.rb: don't run test if the system
	  don't support fiddle.

Sat May 25 21:29:34 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/pty/pty.c (get_device_once): FreeBSD 10-current and 9-stable
	  added O_CLOEXEC support to posix_openpt, so assume FreeBSD 9.2 or
	  later supports it.
	  http://www.freebsd.org/cgi/query-pr.cgi?pr=162374

Sat May 25 18:46:23 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* proc.c (rb_method_entry_min_max_arity): fix missing break in switch.
	  This was introduced in r38236, which is not intentional apparently.
	  This has caused no actual harm because VM_METHOD_TYPE_OPTIMIZED is
	  not used except for OPTIMIZED_METHOD_TYPE_SEND, but may do in
	  future.  Coverity Scan found this inadequacy.

Sat May 25 18:08:06 2013  Yusuke Endoh  <mame@tsg.ne.jp>

	* dir.c (bracket): fix copy-paste error.  When the first and last
	  characters of fnmatch range have different length, fnmatch may
	  have wrongly matched a path that does not really match.
	  Coverity Scan found this bug.

Sat May 25 17:06:25 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (after_gc_sweep): reduce full GC timing.

Sat May 25 11:28:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (set_const_visibility): return without clearing method
	  cache if no arguments.

	* vm_method.c (set_method_visibility): ditto.

Sat May 25 11:27:32 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (set_method_visibility): quote unprintable method name.

Sat May 25 11:24:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_frame_callee): returns the called name of the current
	  frame, not the previous frame.

	* eval.c (prev_frame_callee, prev_frame_func): rename and make static,
	  as these are used by rb_f_method_name() and rb_f_callee_name() only.

	* variable.c (set_const_visibility): use the called name.

Sat May 25 08:58:23 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_quote_unprintable): check if argument is a string.

Fri May 24 19:32:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* variable.c (set_const_visibility): use rb_frame_this_func() instead
	  of rb_frame_callee() for getting the name of the called method

	* test/ruby/test_module.rb: add test for private_constant with no args

Fri May 24 18:53:10 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: do major/full GC when:
	  * number of oldgen object is bigger than twice of
	    number of oldgen object at last full GC.
	  * number of remembered shady object is bigger than twice of
	    number of remembered shady object at last full GC.
	  * number of oldgen object and remembered shady object is bigger
	    than half of total object space.
	  (please fix my English!)

Fri May 24 17:07:00 2013  Charlie Somerville  <charliesome@ruby-lang.org>

	* intern.h: remove dangling rb_class_init_copy declaration
	  [ruby-core:55120] [Bug #8434]

Fri May 24 16:31:23 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/strscan/strscan.c (strscan_aref): raise error if given
	  name reference is not found.

Fri May 24 15:48:18 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (after_gc_sweep, garbage_collect_body): do major GC (full GC)
	  before extending heaps.
	  TODO: do major GC when there are many old (promoted) objects.

	* gc.c (after_gc_sweep): remove TODO comments.

Fri May 24 11:04:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LIBRUBY_RPATHFLAGS): do not append -L option with
	  runtime library directory if cross compiling, but only -R option.
	  runtime path makes no sense on the host system.  [ruby-dev:47363]
	  [Bug #8443]

Fri May 24 02:57:17 2013  Koichi Sasada  <ko1@atdot.net>

	* object.c (rb_obj_clone): should not propagate OLDGEN status.
	  This propagation had caused WB miss for class.

Thu May 23 17:35:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (loaded_feature_path): fix invalid read by index underflow.
	  the beginning of name is also a boundary as well as just after '/'.

Thu May 23 17:21:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (gc_profile_dump_on): revert r40898.  ok to show the record
	  accumulating while lazy_sweep().

Wed May 22 16:50:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (gc_profile_dump_on): use size_t to get rid of overflow and
	  show the header when next_index > 0, instead of next_index != 1.

Wed May 22 15:18:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (setup_overlapped): check the error code in addition
	  to the result of SetFilePointer() to determine if an error occurred,
	  because INVALID_SET_FILE_POINTER is a valid value.
	  [ruby-core:55098] [Bug #8431]

	* win32/win32.c (setup_overlapped, finish_overlapped): extract from
	  rb_w32_read() and rb_w32_write().

Wed May 22 14:19:56 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_prepare_free_objects, rest_sweep, lazy_sweep): fix position
	  of `during_gc' setting.

Wed May 22 07:36:08 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (garbage_collect): all GC is start from garbage_collect()
	  (or garbage_collect_body()). `garbage_collect()' accept additional
	  two parameters `full_mark' and `immediate_sweep'.
	  If `full_mark' is TRUE, then force it full gc (major gc), otherwise,
	  it depends on status of object space. Now, it will be minor gc.
	  If `immediate_sweep' is TRUE, then disable lazy sweep.
	  To allocate free memory, `full_mark' and `immediate_sweep' should be
	  TRUE. Otherwise, they should be FALSE.

	* gc.c (gc_prepare_free_objects): use `garbage_collect_body()'.

	* gc.c (slot_sweep, before_gc_sweep, after_gc_sweep): add logging code.

Tue May 21 22:47:06 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/strscan/strscan.c (strscan_aref): support named captures.
	  patched by Konstantin Haase [ruby-core:54664] [Feature #8343]

Tue May 21 21:48:44 2013  Kouhei Sutou  <kou@cozmixng.org>

	* test/ruby/test_dir_m17n.rb (TestDir_M17N#test_entries_compose):
	  Use #each instead of #map just for iteration.

Tue May 21 19:57:22 2013  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/lib/digest.rb (Digest::Class.file): Take optional
	  arguments that are passed to the constructor of the digest
	  class.

Tue May 21 17:21:12 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: remove gc_profile_record::is_marked. always true.

Tue May 21 17:13:40 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: fix to collect additional information for GC::Profiler.
	  * major/minor GC
	  * trigger reason of GC

	* gc.c (gc_profile_dump_on): change reporting format with
	  added information.

	* gc.c (gc_profile_record_get): return added information by
	  :GC_FLAGS => array.

Tue May 21 16:45:31 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: GC::Profiler's sweeping time is accumulated all slot
	  sweeping time. At lazy GC, GC::Profiler makes new record entry
	  for each lazy_sweep(). In this change, accumulating all
	  slot_sweep() time.
	  And change indentation.

Tue May 21 16:29:09 2013  Koichi Sasada  <ko1@atdot.net>

	* common.mk (rdoc-bench): add a benchmark rule
	  using RDoc. Generate all rdoc related files
	  (same as `make rdoc') in temporary directory
	  and remove them. Execution time, GC::Profiler
	  and results of GC.stat are printed.

	* tool/rdocbench.rb: added for `rdoc-bench'.

Tue May 21 16:25:05 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (gc_profile_dump_on): `count' should be (int) because it
	  can be negative number.
	  And use pointer for `record' (don't copy).

Tue May 21 03:11:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_each): compose HFS file names from
	  UTF8-MAC. [ruby-core:48745] [Bug #7267]

Tue May 21 03:08:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/envutil.rb (assert_separately): require envutil in the
	  child process too.

Tue May 21 03:07:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_conv_enc_opts): should infect.

Mon May 20 22:24:45 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#delete_if, Set#keep_if): Avoid blockless call of
	  proc, which is not portable to JRuby.  Replace &method() with
	  faster and simpler literal blocks while at it.

Mon May 20 22:00:31 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/e2mmap.rb: Format of E2MM documentation

Mon May 20 21:41:15 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/extmk.rb: nodoc this file

Mon May 20 20:43:32 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/cmath.rb: Remove duplicate RDoc heading from overview

Mon May 20 20:36:19 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/securerandom.rb: Update position of overview for RDoc

Mon May 20 19:33:55 2013  Benoit Daloze  <eregontp@gmail.com>

	* math.c: improve and fix documentation of sin, tan and log

Mon May 20 19:31:49 2013  Benoit Daloze  <eregontp@gmail.com>

	* lib/logger.rb (Logger::Application): show namespace in documentation

Mon May 20 11:50:12 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin
	  [ruby-core:55068]

Mon May 20 10:40:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML
	  meta chars even in non-ascii string.  [Bug #8425] [ruby-core:55052]

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils#{_escape,_unescape}):
	  fix %-escape encodings.  [Bug #8425] [ruby-core:55052]

	* lib/webrick/httpservlet/filehandler.rb (set_dir_list): revert r20152
	  partially and fix misuse of bytesize and regexp repetition operator.

Mon May 20 08:03:51 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/profiler.rb: Document Profiler__ methods

Mon May 20 08:02:13 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/tempfile.rb: nodoc Tempfile#inspect

Mon May 20 07:48:24 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/stringio/stringio.c: Correct position of method rdoc

Mon May 20 07:27:41 2013  Zachary Scott  <zachary@zacharyscott.net>

	* math.c: RDoc formatting of Math core docs with domains and codomains
	  Patch by @eLobato [Fixes GH-309]

Mon May 20 05:58:12 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/bigdecimal/bigdecimal.c: Formatting for BigMath [Fixes GH-306]
	  Based on a patch by @eLobato.
	* ext/bigdecimal/lib/bigdecimal/math.rb: ditto

Mon May 20 04:56:59 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/forwardable.rb: Forwardable examples in overview were broken
	  Based on patch by @joem [Fixes GH-303] [Bug #8392]

Mon May 20 03:35:26 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/optparse.rb: nodoc OptionParser::Version and SPLAT_PROC

Mon May 20 03:16:52 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]

Sun May 19 23:52:22 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/webrick/test_htmlutils.rb: add test for WEBrick::HTMLUtils.

Sun May 19 23:12:07 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* encoding.c: document fix, change default script encoding.
	  patched by @windwiny [Fixes GH-310]

Sun May 19 17:29:07 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#delete_if, Set#keep_if): Add comments.

Sun May 19 11:37:36 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* ext/fiddle/extconf.rb: ignore rc version of libffi to fix build failure.

Sun May 19 10:38:50 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-delete-backward-char): Use
	  delete-char instead of delete-backward-char, which is an
	  interactive function.

Sun May 19 03:59:29 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (str_scrub0): added for refactoring.

Sun May 19 03:48:26 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/common.rb (URI.decode_www_form): scrub string if decoded
	  bytes are invalid for the encoding.

Sun May 19 02:46:32 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#delete_if, Set#keep_if): Make Set#delete_if and
	  Set#keep_if more space and time efficient by avoiding to_a.

Sun May 19 02:33:09 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-setup-keymap): Make
	  backquotes electric as well.  It was listed in
	  ruby-electric-expand-delimiters-list but not activated.

	* misc/ruby-electric.el (ruby-electric-delete-backward-char):
	  Introduce electric DEL that deletes what the previous electric
	  command has input.

	* misc/ruby-electric.el (ruby-electric-matching-char): Make
	  electric quotes work again at the end of buffer.

Sun May 19 01:39:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (setjmp-type): check if setjmpex() is really available.
	  workaround for i686-w64-mingw32 which declares it but lacks its
	  definition.

	* include/ruby/defines.h: include setjmpex.h only if also setjmpex()
	  is available.

Sat May 18 23:57:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (setjmp-type): use setjmpex() on w64-mingw32 to get rid
	  of -Wclobbered warnings.

	* include/ruby/defines.h: include setjmpex.h here becase setjmp.h is
	  included from win32.h via intrin.h, winnt.h, and so on.

Sat May 18 20:28:12 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb (INTEGER2NUM): Make less comparisons.

Sat May 18 20:15:28 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (str_scrub_bang): add String#scrub!. [Feature #8414]

Sat May 18 16:59:52 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE.

Sat May 18 16:57:58 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning:
	  comparison between signed and unsigned integer expressions

Sat May 18 16:38:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): forward anonymous and first keyword
	  rest argument one.  [ruby-core:55033] [Bug #8416].

Sat May 18 15:49:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to
	  be accessible.

Sat May 18 11:05:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (inspect_enumerator): use VALUE instead of mere char*
	  by using rb_sprintf() and rb_id2str().

	* enumerator.c (append_method): extract from inspect_enumerator().

Sat May 18 09:00:32 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb (INTEGER2VALUE): Use LONG2FIX if possible.

Sat May 18 00:38:47 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/mkconstants.rb: Convert integer constants bigger than int
	  correctly.

Fri May 17 22:02:15 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ifaddr.c: Use unsigned LONG_LONG to represent flags
	  because SunOS 5.11 (OpenIndiana) defines ifa_flags as uint64_t.

Fri May 17 21:47:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* cont.c: Typo in constant MAX_MACHINE_STACK_CACHE from '..MAHINE..'
	  patch by @schmurfy [Fixes GH-307]

Fri May 17 19:18:24 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-matching-char): Do not put
	  a closing quote when the quote typed does not start a string, as
	  in $', ?\' or ?\".

Fri May 17 18:06:15 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Consider error messages to find out version option of
	  C compiler.
	  The C compiler of Sun Studio C emits "Warning: Option -qversion
	  passed to ld, if ld is invoked, ignored otherwise" and exit
	  successfully.

Fri May 17 17:34:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (rb_gc_guarded_ptr): unoptimize on other compilers than gcc and
	  msvc.

Fri May 17 11:06:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_intern.h (TH_PUSH_TAG): ensure jmpbuf to be accessible before
	  pushing tag to get rid of unaccessible tag by stack overflow.

Thu May 16 17:15:32 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_eval.c (rb_catch_obj): add volatile to tag to prevent crash
	  experimentally.
	  http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20130515T133500Z.log.html.gz

Thu May 16 16:19:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (verconf.in): no longer used.

	* win32/Makefile.sub (config.status): fix typo.

	* configure.in, template/verconf.h.in (RUBY_EXEC_PREFIX): fix for
	  default prefix.

Thu May 16 13:12:27 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/verconf.h.in: generate verconf.h from the template and
	  rbconfig.rb.

Thu May 16 05:47:18 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: fix syntax error.
	  Thanks @spastorino! [ruby-core:55011]

Thu May 16 03:05:45 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_node_newnode): use newobj_of() instead of rb_newobj().

Thu May 16 02:03:39 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/depend: Add a dependency for ifaddr.o.

Thu May 16 01:44:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (verconf.h): $< cannot be used in explicit rules with
	  nmake.

	* win32/Makefile.sub (CONFIG_H): create verconf.in instead of
	  verconf.h.

Thu May 16 01:25:07 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: only emit warnings when
	  -w is enabled.

Wed May 15 18:58:17 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (newobj): rename to `newobj_of' and accept additional
	  three parameters v1, v2, v3. newobj_of() do OBJSETUP() and
	  fill values with v1, v2, v3.

	* gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
	  use newobj_of().

Wed May 15 17:55:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_PLATFORM): move to config.h as needed by
	  version.c.

Wed May 15 17:04:11 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: add an additional RGENGC_PROFILE mode (2).
	  Profiling result can be check by GC.stat.

	* gc.c (type_name): separate from obj_type_name().

Wed May 15 16:58:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: save configured load path values into verconf.in.

	* common.mk (verconf.h): create from verconf.in with shvar_to_cpp.rb.

	* tool/shvar_to_cpp.rb: turn shell variables into C macros.
	  [Bug #7959]

	* loadpath.c: split load path staffs from version.c.

	* dmyloadpath.c: miniruby has no builtin load paths, so verconf.h is
	  not needed.

Wed May 15 03:56:09 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: adding backwards
	  compatible YAMLTree.new method

Wed May 15 02:22:16 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a user
	  defined, restricted subset of Ruby object types.
	* ext/psych/lib/psych/class_loader.rb: A class loader for
	  encapsulating the logic for which objects are allowed to be
	  deserialized.
	* ext/psych/lib/psych/deprecated.rb: Changes to use the class loader
	* ext/psych/lib/psych/exception.rb: ditto
	* ext/psych/lib/psych/json/stream.rb: ditto
	* ext/psych/lib/psych/nodes/node.rb: ditto
	* ext/psych/lib/psych/scalar_scanner.rb: ditto
	* ext/psych/lib/psych/stream.rb: ditto
	* ext/psych/lib/psych/streaming.rb: ditto
	* ext/psych/lib/psych/visitors/json_tree.rb: ditto
	* ext/psych/lib/psych/visitors/to_ruby.rb: ditto
	* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
	* ext/psych/psych_to_ruby.c: ditto
	* test/psych/helper.rb: ditto
	* test/psych/test_safe_load.rb: tests for restricted subset.
	* test/psych/test_scalar_scanner.rb: ditto
	* test/psych/visitors/test_to_ruby.rb: ditto
	* test/psych/visitors/test_yaml_tree.rb: ditto

Wed May 15 02:06:35 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* test/psych/helper.rb: envutil is not available outside Ruby, so
	  port the functions from envutil to the test helper.

	* test/psych/test_deprecated.rb: ditto

	* test/psych/test_encoding.rb: ditto

Wed May 15 00:42:54 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* signal.c: need to include unistd.h for write(2).
	  unistd.h is now included via ruby/defines.h, but should explicitly
	  include here.  (suggested by kosaki)

Tue May 14 23:43:05 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/.document: Add ifaddr.c.

Tue May 14 23:24:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/extconf.rb: check for if_nametoindex() for
	  i686-w64-mingw32, and check for declarations of if_indextoname() and
	  if_nametoindex().

	* ext/socket/ifaddr.c (ifaddr_ifindex): not-implement unless
	  if_nametoindex() is available.

	* ext/socket/rubysocket.h: declare if_indextoname() and
	  if_nametoindex() if available but not declared.

Tue May 14 19:58:17 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* ext/dl/lib/dl/func.rb (DL::Function#call): check tainted when
	  $SAFE > 0.
	* ext/fiddle/function.c (function_call): check tainted when $SAFE > 0.
	* test/fiddle/test_func.rb (module Fiddle): add test for above.


Tue May 14 14:51:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): split
	  from intptr_t and uintptr_t, since VC9 defines the latter only in
	  crtdefs.h.

Tue May 14 12:21:28 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (NET_LUID): mingw may have NET_LUID and not defined
	  _IFDEF_.

Tue May 14 03:33:17 2013  Koichi Sasada  <ko1@atdot.net>

	* string.c (rb_str_new_frozen): remove debug print.

Tue May 14 03:22:51 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: enable to generate write barrier protected
	  arrays (T_ARRAY).

Tue May 14 03:21:42 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: enable to generate write barrier protected
	  strings (T_STRING).

Tue May 14 03:19:59 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: enable to generate write barrier protected
	  objects (T_OBJECT).

Tue May 14 03:17:15 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: enable to generate write barrier protected
	  objects for numeric types (Float, Complex, Rational, Bignum).

Tue May 14 03:10:59 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: enable RGENGC (USE_RGENGC)
	  but no type creates write protected (sunny) objects
	  (RGENGC_WB_PROTECTED_* == 0).

Tue May 14 02:47:30 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: support RGENGC. [ruby-trunk - Feature #8339]
	  See this ticket about RGENGC.

	* gc.c: Add several flags:
	  * RGENGC_DEBUG: if >0, then prints debug information.
	  * RGENGC_CHECK_MODE: if >0, add assertions.
	  * RGENGC_PROFILE: if >0, add profiling features.
	    check GC.stat and GC::Profiler.

	* include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0).

	* array.c: add write barriers for T_ARRAY and generate sunny objects.

	* include/ruby/ruby.h (RARRAY_PTR_USE): added. Use this macro if
	  you want to access raw pointers. If you modify the contents which
	  pointer pointed, then you need to care write barrier.

	* bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects.

	* complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX
	  and generate sunny objects.

	* rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write
	  barriers for T_RATIONAL and generate sunny objects.

	* internal.h: add write barriers for RBasic::klass.

	* numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects.

	* object.c (rb_class_allocate_instance), range.c:
	  generate sunny T_OBJECT objects.

	* string.c: add write barriers for T_STRING and generate sunny objects.

	* variable.c: add write barriers for ivars.

	* vm_insnhelper.c (vm_setivar): ditto.

	* include/ruby/ruby.h, debug.c: use two flags
	  FL_WB_PROTECTED and FL_OLDGEN.

	* node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED):
	  move flag bits.

Tue May 14 01:54:48 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: remove rb_objspace_t::marked_num.
	  We can use `objspace_live_num()' instead of removed `marked_num'
	  if it is after `after_gc_sweep()' function call.

	* gc.c (after_gc_sweep): use objspace_live_num() instead of removed
	  rb_objspace_t::marked_num.

	* gc.c (gc_mark_ptr, gc_marks): remove rb_objspace_t::marked_num code.

	* gc.c (gc_prepare_free_objects): do not call set_heaps_increment()
	  with checking objspace->heap.marked_num. At this point, we only
	  need to check availability of free-cell.

	* gc.c (lazy_sweep): call after_gc_sweep() if there are no sweep_able entry.

	* gc.c (rest_sweep, gc_prepare_free_objects): remove after_gc_sweep() call.

Tue May 14 01:50:41 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: disable GC_PROFILE_MORE_DETAIL (fix last commit).

	* gc.c (gc_prof_set_malloc_info): fix "objspace->heap.live_num" to
	  "objspace_live_num(objspace)". There is no such member variable.

Tue May 14 01:25:55 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c: refactoring GC::Profiler.

	* gc.c (gc_prof_sweep_timer_start/stop): removed because
	  they doesn't support lazy sweep.

	* gc.c (gc_prof_sweep_slot_timer_start/stop): added.
	  redefine `sweeping time' to accumulated time of all of
	  slot_sweep().

	* gc.c (rb_objspace_t::profile::count): renamed to
	  rb_objspace_t::profile::next_index. `counter' seems ambiguous.
	  increment it when next record is acquired.

Tue May 14 00:48:55 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: constify RRational::(num,den) and
	  RComplex::(real,imag).
	  Add macro to set these values:
	    * RRATIONAL_SET_NUM()
	    * RRATIONAL_SET_DEN()
	    * RCOMPLEX_SET_REAL()
	    * RCOMPLEX_SET_IMAG()
	  This change is a part of RGENGC branch [ruby-trunk - Feature #8339].

	  TODO: API design. RRATIONAL_SET(rat,num,den) is enough?
	  TODO: Setting constify variable with cast has same issue of r40691.

	* complex.c, rational.c: use above macros.

Mon May 13 21:49:17 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Check socketpair again.
	  It is required on Unix.

Mon May 13 21:20:32 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (getipaddrs): use alternative interface name if
	  available, because if_nametoindex() requires them.

Mon May 13 20:23:24 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]
	  emulate getipaddrs(3) on Unix.

	* win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above
	  function.

	* include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't
	  substitute for any function, so use non-prefixed name.

	* ext/socket/extconf.rb (socketpair); follow above change.

Mon May 13 20:11:06 2013  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (prepare_iseq_build): remove additional line break.

Mon May 13 19:29:54 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: constify RBasic::klass and add
	  RBASIC_CLASS(obj) macro which returns a class of `obj'.
	  This change is a part of RGENGC branch [ruby-trunk - Feature #8339].

	* object.c: add new function rb_obj_reveal().
	  This function reveal internal (hidden) object by rb_obj_hide().
	  Note that do not change class before and after hiding.
	  Only permitted example is:
	    klass = RBASIC_CLASS(obj);
	    rb_obj_hide(obj);
	    ....
	    rb_obj_reveal(obj, klass);

	  TODO: API design. rb_obj_reveal() should be replaced with others.

	  TODO: modify constified variables using cast may be harmful for
	        compiler's analysis and optimization.
	        Any idea to prohibit inserting RBasic::klass directly?
	        If rename RBasic::klass and force to use RBASIC_CLASS(obj),
	        then all codes such as `RBASIC(obj)->klass' will be
	        compilation error. Is it acceptable? (We have similar
	        experience at Ruby 1.9,
	        for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)".

	* internal.h: add some macros.
	  * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal
	    object.
	  * RBASIC_SET_CLASS(obj, cls) set RBasic::klass.
	  * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS
	    without write barrier (planned).
	  * RCLASS_SET_SUPER(a, b) set super class of a.

	* array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c,
	  file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c,
	  parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c,
	  string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c:
	  Use above macros and functions to access RBasic::klass.

	* ext/coverage/coverage.c, ext/readline/readline.c,
	  ext/socket/ancdata.c, ext/socket/init.c,
	* ext/zlib/zlib.c: ditto.

Mon May 13 18:44:14 2013  Koichi Sasada  <ko1@atdot.net>

	* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macro
	  instead of using RARRAY_PTR().

Mon May 13 16:53:53 2013  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/ruby.h: add new utility macros to access
	  Array's element.
	  * RARRAY_AREF(a, i) returns i-th element of an array `a'
	  * RARRAY_ASET(a, i, v) set i-th element of `a' to `v'
	  This change is a part of RGENGC branch [ruby-trunk - Feature #8339].

Mon May 13 15:31:10 2013  Koichi Sasada  <ko1@atdot.net>

	* object.c (rb_obj_setup): added.

	* include/ruby/ruby.h (OBJSETUP): use rb_obj_setup() instead of
	  a macro.

Mon May 13 15:24:16 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_data_object_alloc): check klass only if klass is not 0.
	  klass==0 means internal object.

Mon May 13 14:57:28 2013  Koichi Sasada  <ko1@atdot.net>

	* gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
	  use NEWOBJ_OF() instead of NEWOBJ().

Mon May 13 14:51:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_obj_singleton_method): new method Kernel#singleton_method
	  which returns a Method object of the singleton method.
	  non-singleton method causes NameError, but not aliased or zsuper
	  method, right now.
	  [ruby-core:54914] [Feature #8391]

	* vm_method.c (rb_method_entry_at): return the method entry for id at
	  klass, without ancestors.

	* class.c (rb_singleton_class_get): get the singleton class if exists,
	  or nil.

Mon May 13 10:20:59 2013  Yuki Yugui Sonoda  <yugui@google.com>

	* ext/openssl/ossl_ssl.c: Disabled OpenSSL::SSL::SSLSocket if
	  defined(OPENSSL_NO_SOCK).

	  This fixes a linkage error on platforms which do not have socket.
	  OpenSSL itself is still useful as a set of cryptographic functions
	  even on such platforms.

Mon May 13 10:30:04 2013  Zachary Scott  <zachary@zacharyscott.net>

	* hash.c: Hash[] and {} are not equivalent by @eam [Fixes GH-301]

Mon May 13 10:04:22 2013  Zachary Scott  <zachary@zacharyscott.net>

	* random.c: Document Random::DEFAULT by @eLobato [Fixes GH-304]

Sun May 12 21:12:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (OFFT2NUM): RUBY_REPLACE_TYPE also defines macro
	  to convert int type to VALUE if found.

Wed May  8 13:46:52 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/intern.h (rb_iv_set, rb_iv_get): removed. Because
	  ruby.h has a declaration for that.

Wed May  8 13:49:06 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/intern.h (rb_uint2big, rb_int2big, rb_uint2inum)
	(rb_int2inum, rb_ll2inum, rb_ull2inum): removed because ruby.h
	  has a declaration for these.

Sun May 12 17:52:23 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: removes 'ac_cv_func_fseeko=yes' form MinGW
	  specific definitions.

Sun May 12 17:25:46 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (rb_file_s_truncate): use correct type. chsize takes
	  a long.

Sun May 12 17:18:46 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* process.c: move '#define HAVE_SPAWNV 1' to win32/Makefile.sub.
	* win32/Makefile.sub: see above.

Sun May 12 17:13:32 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: removes AC_CHECK_FUNCS(setitimer) because it's
	  unused.

Sun May 12 17:08:16 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: removes AC_CHECK_FUNCS(pause) because it's unused.

Sun May 12 17:05:18 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (rb_f_kill): fixes typo. s/HAS_KILLPG/HAVE_KILLPG/.

Sun May 12 17:03:27 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: abort if gettimeofday doesn't exist.

Sun May 12 16:31:27 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: adds RUBY_REPLACE_TYPE(off_t) for creating
	  NUM2OFFT.
	* file.c (rb_file_truncate): use correct type. chsize() take
	  a long.
	* include/ruby/ruby.h (NUM2OFFT): use a definition created by
	  a configure script by default.

Sun May 12 16:03:41 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: removes AC_CHECK_FUNC(fseeko, fseeko64, ftello,
	  ftello64). They are not used from anywhere.

	* win32/win32.c (fseeko): removes.
	* win32/win32.c (rb_w32_ftello): removes.
	* include/ruby/win32.h: removes declarations of rb_w32_ftello and
	  rb_w32_fseeko.
	* win32/Makefile.sub: removes '#define HAVE_FTELLO 1'.

Sun May 12 15:51:47 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: remove AC_CHECK_FUNC(close). It is not used from
	  anywhere.

Sun May 12 15:50:45 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: adds comments for setjmp check.

Sun May 12 15:38:09 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: move clock_gettime() check into regular place.

Wed May  8 13:45:53 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: add getenv() declaration check.
	* dln_find.c: add HAVE_DECL_GETENV test.

Sun May 12 15:33:18 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: sorts AC_CHECK_FUNCS()s as alphabetical order.

Wed May  8 13:41:57 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* bignum.c: remove redundant decl for big_lshift() big_rshift().

Sun May 12 16:06:43 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/socket/rubysocket.h (rsock_inspect_sockaddr): as r40646
	  check HAVE_TYPE_STRUCT_SOCKADDR_DL.

Sat May 11 23:01:58 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/socket/rubysocket.h (HAVE_TYPE_STRUCT_SOCKADDR_DL):
	  MSVC has struct sockaddr_dl, but its content is broken.
	  http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130511T103938Z.log.html.gz

Sat May 11 22:07:42 2013  Tanaka Akira  <akr@fsij.org>

	* test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interface
	  which #addr method returns nil for venet0 in OpenVZ.

Sat May 11 21:56:34 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/raddrinfo.c (rsock_inspect_sockaddr): Add casts to
	  suppress warnings.

Sat May 11 17:28:51 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket: New method, Socket.getifaddrs, implemented.
	  [ruby-core:54777] [Feature #8368]

Sat May 11 00:47:22 2013  Tanaka Akira  <akr@fsij.org>

	* gc.h (SET_MACHINE_STACK_END): Add !defined(_ILP32) to a defining
	  condition to avoid compilation error on x32.
	  https://sites.google.com/site/x32abi/

Fri May 10 23:56:34 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_peek_variable_name): treat invalid global, class,
	  and instance variable names as mere strings rather than errors.
	  [ruby-core:54885] [Bug #8375]

Fri May 10 20:22:40 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Move library checks into "Checks for libraries." part.

Fri May 10 19:32:01 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Reformat arguments of AC_CHECK_HEADERS and
	  AC_CHECK_FUNCS to track modifications easily.

Fri May 10 12:01:36 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Don't link librt if clock_gettime is available in
	  the main C library.
	  glibc 2.17 moves clock_* from librt to the main C library.
	  http://sourceware.org/ml/libc-announce/2012/msg00001.html

Thu May  9 22:00:35 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ancdata.c (bsock_sendmsg_internal): controls_num should
	  not be negative.

Thu May  9 21:09:57 2013  Tanaka Akira  <akr@fsij.org>

	* file.c, ext/etc/etc.c, ext/socket/unixsocket.c,
	  ext/openssl/ossl.h, ext/openssl/openssl_missing.c: Use
	  HAVE_AGGREGATE_MEMBER instead of HAVE_ST_MEMBER.

Thu May  9 20:43:41 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ancdata.c (bsock_sendmsg_internal): Always set
	  controls_num to raise NotImplementedError appropriately.
	  (bsock_recvmsg_internal): Raise NotImplementedError if
	  :scm_rights=>true is given on platforms which don't have
	  4.4BSD style control message.

Thu May  9 12:06:07 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/rubysocket.h, ext/socket/unixsocket.c,
	  ext/socket/ancdata.c: Use HAVE_STRUCT_MSGHDR_MSG_CONTROL instead
	  of HAVE_ST_MSG_CONTROL.

Thu May  9 11:30:02 2013  Zachary Scott	 <zachary@zacharyscott.net>

	* string.c: Add call-seq alias for String#=== [Bug #8381]

Thu May  9 11:14:18 2013  Zachary Scott	 <zachary@zacharyscott.net>

	* doc/contributing.rdoc: Add guide for contributing to CRuby

Thu May  9 04:55:49 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Check socket library again.  shutdown() is used in
	  io.c.

Thu May  9 01:52:31 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Don't check socketpair.  socketpair is not used in
	  ruby command itself.

Thu May  9 01:05:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_included_modules): should not include non-modules.
	  [ruby-core:53158] [Bug #8025]

Wed May  8 22:46:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_included_modules): should not include the original
	  module itself.  [ruby-core:53158] [Bug #8025]

Wed May  8 17:43:55 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (rb_io_ext_int_to_encs): ignore internal encoding if external
	  encoding is ASCII-8BIT. [Bug #8342]

Wed May  8 13:49:38 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json/generator/generator.c (isArrayOrObject): cast char to
	  unsigned char. [Bug #8378]

Wed May  8 13:46:10 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json/generator/depend: fix dependencies [Bug #8379]

	* ext/json/parser/depend: ditto.

Wed May  8 13:07:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): fail if $, @, @@ are not followed by a valid
	  name character.  [ruby-core:54846] [Bug #8375].

Wed May  8 13:06:31 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (ISGRAPH): add missing macro.

Wed May  8 06:42:56 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/socket/socket.c (socket_s_ip_address_list): fix wrongly filled
	  sin6_scope_id on KAME introduced by r40593 for OpenIndiana.
	  KAME uses fe80:<scope_id>::<interface id> for link-local address
	  internally.
	  Setting sin6_scope_id causes it leaked.
	  see also comments of sockaddr_obj().

Tue May  7 22:12:34 2013  Tanaka Akira  <akr@fsij.org>

	* ext/readline/readline.c (insert_ignore_escape): Add a cast to
	  unsigned char * before dereference.
	  This suppress a warning on Cygwin.

Tue May  7 12:15:24 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ancdata.c (bsock_recvmsg_internal): Add a cast to
	  suppress warning.
	  Bionic defines socklen_t as int.
	  Bionic defines msg_controllen as unsigned int (__kernel_size_t)
	  instead of socklen_t as POSIX.

Tue May  7 12:12:42 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ancdata.c (ancillary_inspect): Don't call
	  anc_inspect_ipv6_pktinfo if !HAVE_TYPE_STRUCT_IN6_PKTINFO.
	  anc_inspect_ipv6_pktinfo is not defined in the case.

Tue May  7 12:10:52 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (socket_s_ip_address_list): Cast EXTRA_SPACE as
	  int.  This suppress a warning.

Tue May  7 12:09:29 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Set close_fds false for Cygwin.
	  Cygwin doesn't support fd passing.
	  This enables socket extension library cross-compilable by default.

Tue May  7 12:07:35 2013  Tanaka Akira  <akr@fsij.org>

	* pack.c (swap32): Don't redefine it if it is already defined.
	  Bionic defines it.
	  (swap64): Ditto.

Mon May  6 20:50:37 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (socket_s_ip_address_list): Fill sin6_scope_id
	  if getifaddrs() returns an IPv6 link local address which
	  sin6_scope_id is zero, such as on OpenIndiana SunOS 5.11.

Sun May  5 18:56:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (defined): use vm_search_superclass() like as normal super
	  call.  based on a patch <https://gist.github.com/wanabe/5520026> by
	  wanabe.

	* vm_insnhelper.c (vm_search_superclass): return error but not raise
	  exceptions.

	* vm_insnhelper.c (vm_search_super_method): check the result of
	  vm_search_superclass and raise exceptions on error.

Sun May  5 16:29:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* insns.def (defined): get method entry from the method top level
	  frame, not block frame.  [ruby-core:54769] [Bug #8367]

Sun May  5 13:28:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/ruby.pc.in (Cflags): use rubyarchhdrdir for multiarch.
	  [Bug #7874]

Sat May  4 07:20:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/security.rdoc: Add note about reporting security vulns

Sat May  4 04:13:27 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): New for
	  attribute((alloc_size(params))).

	* include/ruby/defines.h (xmalloc, xmalloc2, xcalloc)
	(xrealloc, xrealloc2): Annotated by RUBY_ATTR_ALLOC_SIZE.
	* include/ruby/ruby.h (rb_alloc_tmp_buffer): ditto.

Fri May  3 19:32:13 2013  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi/util.rb: All class methods modulized.
	  We can use these methods like a function when "include CGI::Util".
	  [Feature #8354]

Fri May  3 14:09:45 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Make default_ipv6 true for Cygwin.
	  Cygwin supports IPv6 since Cygwin 1.7.1 (2009-12).
	  http://cygwin.com/ml/cygwin-announce/2009-12/msg00027.html

Fri May  3 13:35:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/{getaddrinfo,getnameinfo}.c: define socklen_t if not
	  defined, e.g., older VC.

Fri May  3 13:29:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): also
	  should be defined when defining intptr_t and uintptr_t.
	  bigdecimal.c requires the former two now.

Fri May  3 13:22:12 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (poll_child_status): fix build error on older mingw.

Fri May  3 00:15:58 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* common.mk: remove timestamps in distclean-ext realclean-ext.

Thu May  2 23:23:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_is_kind_of): skip prepending modules.
	  [ruby-core:54742] [Bug #8357]

	* object.c (rb_class_inherited_p): ditto.
	  [ruby-core:54736] [Bug #8357]

Thu May  2 22:11:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bin/irb: remove dead code from sample/irb.rb.

Thu May  2 17:32:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (copy_ivar_i): get rid of overwriting already copied
	  instance variables.  c.f. [Bug #8276]

Thu May  2 16:55:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (id_locals): use cached ID.

	* vm.c (ruby_thread_init): ditto.

	* defs/id.def: add more predefined IDs used in core.

Thu May  2 13:42:42 2013  Ryan Davis  <ryand-ruby@zenspider.com>

	* lib/minitest/*: Imported minitest 4.7.4 (r8483)
	* test/minitest/*: ditto

Thu May  2 11:32:22 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (poll_child_status): [experimental] set the cause of
	  a child's death to status if its exitcode seems to be an error.

	* test/ruby/test_process.rb (TestProcess#test_no_curdir): maybe now
	  we can test it.

	* test/ruby/test_thread.rb (TestThread#test_thread_timer_and_interrupt):
	  ditto.

Thu May  2 11:24:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/yaml.rb: nodoc EngineManager, add History doc #8344

Wed May  1 21:11:17 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (localtime_with_gmtoff_zone): musl libc may return NULL for
	  tm_zone.

Wed May  1 18:59:36 2013  Benoit Daloze  <eregontp@gmail.com>

	* enum.c (Enumerable#chunk): fix grammar of error message
	  for symbols beginning with an underscore [Bug #8351]

Wed May  1 16:47:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/curses/extconf.rb (curses_version): try once for each tests, a
	  function or a variable.  fallback to variable for old SVR4.

Wed May  1 16:17:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): extensions not to be installed should not
	  make static libraries, but make dynamic libraries always.

Wed May  1 12:20:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/rake/version.rb: Fix RDoc warning with  :include: [Bug #8347]

Wed May  1 11:40:25 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* defs/id.def (predefined): add "idProc".

	* eval.c (frame_func_id): use predefined IDs.

	* proc.c (mnew, mproc, mlambda): use predefined IDs.

	* vm.c (rb_vm_control_frame_id_and_class): ditto.

	* vm.c (Init_VM): ditto.

Tue Apr 30 23:18:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/benchmark.rb: Update Benchmark results on newer CPU

Tue Apr 30 12:31:40 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mproc, mlambda): use frozen core methods instead of plain
	  global methods, so that methods cannot be overridden.
	  [ruby-core:54687] [Bug #8345]

	* vm.c (Init_VM): define proc and lambda on the frozen core object.

	* include/ruby/intern.h (rb_block_lambda): add declaration instead of
	  deprecated rb_f_lambda.

Mon Apr 29 17:02:30 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.h: Bionic libc doesn't have locale.
	  [Feature #8338]


Mon Apr 29 06:58:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_bn.c (ossl_bn_initialize): no need of alloca for
	  small fixed size array.

	* ext/openssl/ossl_bn.c (ossl_bn_initialize): check overflow first,
	  and use alloca for small size input.

Mon Apr 29 00:40:13 2013  Benoit Daloze  <eregontp@gmail.com>

	* lib/yaml.rb: Clarify documentation about YAML being always Psych.
	  Give a tip about using Syck. See #8344.

Sun Apr 28 23:34:01 2013  Benoit Daloze  <eregontp@gmail.com>

	* lib/yaml.rb: Use another trick to define the YAML module.
	  https://twitter.com/n0kada/status/328342207511801856

Sun Apr 28 23:19:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/pp.rb: Update PP module overview by @geopet

Sun Apr 28 22:04:37 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* ext/openssl/ossl_bn.c (ossl_bn_initialize): fix buffer overflow on
	  x64 Windows and memory leak when initializing with integer.
	  [ruby-core:54615] [Bug #8337]

Sun Apr 28 12:38:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* README.EXT: correct method name to be used.  [Bug #7982]

	* README.EXT.ja: add notes too.

Sun Apr 28 10:35:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c: With feedback from Steve Klabnik, reverted a change to
	  #untrusted? and #tainted?. Also adjusted grammar for $SAFE levels

Sun Apr 28 10:10:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/yaml.rb: Disable setting YAML const twice [ruby-core:54642]

Sun Apr 28 09:50:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c: Documentation for taint and trust [Bug #8162]

Sun Apr 28 09:40:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* README.EXT: Copy note from r40505 for rb_sprintf() [Bug #7982]

Sun Apr 28 08:28:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/curses/curses.c: Update Curses::Window example for nicer output
	  Patch by Michal Suchanek [Bug #8121] [ruby-core:53520]

Sun Apr 28 08:10:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* README.EXT: Update note from r40504, by Jeremy Evans [Bug #7982]

Sun Apr 28 08:02:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* README.EXT: Add note to warn use of %i in Exceptions [Bug #7982]

Sun Apr 28 02:41:05 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Fix a typo.  Should check endgrent() instead of
	  endgrnam().

Sun Apr 28 00:35:45 2013  Tanaka Akira  <akr@fsij.org>

	* process.c (obj2gid): Don't call endgrent() if not exist.
	  Bionic (Android's libc) don't have endgrent().

	* configure.in: Check endgrnam function.

Sat Apr 27 23:53:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* lib/yaml.rb: add security warning to YAML documentation

Sat Apr 27 23:25:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/yaml.rb: Documentation for YAML module [Bug #8213]

Sat Apr 27 20:19:21 2013  Tanaka Akira  <akr@fsij.org>

	* thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
	  This fixes a compilation failure while cross-compiling for Tensilica
	  Xtensa Processor.

Sat Apr 27 19:32:44 2013  Benoit Daloze  <eregontp@gmail.com>

	* thread.c: fix typos and documentation

Sat Apr 27 19:04:55 2013  Tanaka Akira  <akr@fsij.org>

	* sparc.c: Use __asm__ instead of asm for gcc.
	  gcc doesn't provide asm keyword if -ansi option is given.
	  http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html

Sat Apr 27 17:22:50 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Redundant test removed.

Sat Apr 27 16:00:10 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb (test_recvmsg_with_msg_peek_creates_fds):
	  Extracted.

Sat Apr 27 15:50:40 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (SIGNED_INTEGER_TYPE_P): New macro.
	  (SIGNED_INTEGER_MAX): Ditto.
	  (SIGNED_INTEGER_MIN): Ditto.
	  (UNSIGNED_INTEGER_MAX): Ditto.
	  (TIMET_MAX): Use SIGNED_INTEGER_MAX and UNSIGNED_INTEGER_MAX.
	  (TIMET_MIN): Use SIGNED_INTEGER_MIN.

	* thread.c (TIMEVAL_SEC_MAX): Use SIGNED_INTEGER_MAX.
	  (TIMEVAL_SEC_MIN): Use SIGNED_INTEGER_MIN.

Sat Apr 27 10:52:52 2013  Tanaka Akira  <akr@fsij.org>

	* thread.c (TIMEVAL_SEC_MAX, TIMEVAL_SEC_MIN): Consider environments,
	  sizeof(time_t) is smaller than sizeof(tv_sec), such as
	  OpenBSD 5.2 (amd64).

Fri Apr 26 23:34:59 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/text.rb (REXML::Text.normalize): Fix a bug that all
	  entity filters are ignored. [ruby-dev:47278] [Bug #8302]
	  Patch by Ippei Obayashi. Thanks!!!
	* test/rexml/test_entity.rb (EntityTester#test_entity_filter): Add
	  a test of the above change.

Fri Apr 26 22:53:55 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/element.rb (REXML::Attributes#to_a): Support
	  namespaced attributes. [ruby-dev:47277] [Bug #8301]
	  Patch by Ippei Obayashi. Thanks!!!
	* test/rexml/test_attributes.rb
	  (AttributesTester#test_to_a_with_namespaces): Add a test of the
	  above change.

Fri Apr 26 21:48:29 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/atom.rb (RSS::Atom::Entry): Fix indent of document comment.

Fri Apr 26 21:21:17 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/maker.rb (RSS::Maker): Fix indent of document comment.

Fri Apr 26 18:41:04 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Use a block of enable_config() for
	  --{enable,disable}-close-fds-by-recvmsg-with-peek configure option

Fri Apr 26 18:08:08 2013  Tanaka Akira  <akr@fsij.org>

	* dir.c (dir_set_pos): Fix a compilation error when seekdir() is not
	  exist.

Fri Apr 26 17:41:17 2013  Tanaka Akira  <akr@fsij.org>

	* thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
	  This fixes a compilation failure while cross-compiling for ARM.

Fri Apr 26 14:35:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/rss/atom.rb: Documentation for RSS::Atom based on a patch by
	  Michael Denomy
	* lib/rss/maker.rb: Documentation for RSS::Maker also by @mdenomy

Fri Apr 26 12:41:22 2013  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: Test linkability of curses_version at first.

	* ext/socket/extconf.rb: Test the behavior of fd passing with MSG_PEEK
	  only if recvmsg(), msg_control member, AF_UNIX and SCM_RIGHTS are
	  available.

Fri Apr 26 00:07:52 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* lib/rinda/ring.rb (Rinda::RingServer#initialize): accept array
	  arguments of address to specify multicast interface.

	* lib/rinda/ring.rb (Rinda::RingServer#make_socket): add optional
	  arguments for multicast interface.

	* test/rinda/test_rinda.rb
	  (TestRingFinger#test_ring_server_ipv4_multicast,
	   TestRingFinger#test_ring_server_ipv6_multicast): add tests for
	  above change.

	* test/rinda/test_rinda.rb
	  (TestRingServer#test_make_socket_ipv4_multicast,
	   TestRingServer#test_make_socket_ipv6_multicast): change bound
	  interface address because multicast address is not allowed on Linux
	  or Windows.
	  [ruby-core:53692] [Bug #8159]

Thu Apr 25 23:45:02 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* lib/rinda/ring.rb (Rinda::RingServer#initialize): add a socket
	  to @sockets in make_socket() to close sockets on shutdown even if
	  make_socket() is called after initialize.

	* lib/rinda/ring.rb (Rinda::RingServer#make_socket): ditto.

Thu Apr 25 23:39:42 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/rinda/test_rinda.rb (TupleSpaceProxyTest#test_take_bug_8215):
	  use KILL on Windows since TERM doen't work and ruby process remains
	  after test-all on Windows.

Thu Apr 25 23:16:28 2013  Tanaka Akira  <akr@fsij.org>

	* ext/curses/extconf.rb: Implement
	  --with-curses-version={function,variable} configure option for
	  cross-compiling.

Thu Apr 25 18:15:46 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Don't use WIDE getaddrinfo by default.

Thu Apr 25 17:56:39 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Remove obsolete options: ---with-ipv6-lib and
	  --with-ipv6-libdir.

Thu Apr 25 17:43:49 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Implement
	  --{enable,disable}-close-fds-by-recvmsg-with-peek configure option
	  for cross-compiling.
	  Make --{enable,disable}-wide-getaddrinfo configure option
	  cross-compiling friendly.

Thu Apr 25 16:11:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_ext_int_to_encs, parse_mode_enc): bom-prefixed name is
	  not a real encoding name, just a fallback.  so the proper conversion
	  should take place even if if the internal encoding is equal to the
	  bom-prefixed name, unless actual encoding is equal to the internal
	  encoding.  [ruby-core:54563] [Bug #8323]

	* io.c (io_set_encoding_by_bom): reset extenal encoding if no BOM
	  found.  [ruby-core:54569]

Thu Apr 25 14:35:01 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_bn.c (ossl_bn_initialize): allow Fixnum and Bignum.
	  [ruby-core:53986] [Feature #8217]

Thu Apr 25 14:26:32 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/common.rb (URI.decode_www_form): follow current URL Standard.
	  It gets encoding argument to specify the character encoding.
	  It now allows loose percent encoded strings, but denies ;-separator.
	  [ruby-core:53475] [Bug #8103]

	* lib/uri/common.rb (URI.decode_www_form): follow current URL Standard.
	  It gets encoding argument to convert before percent encode.
	  Now UTF-16 strings aren't converted to UTF-8 before percent encode
	  by default.

Wed Apr 25 14:26:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* benchmark/bm_hash_shift.rb: add benchmark for Hash#shift

	* hash.c (rb_hash_shift): use st_shift if hash is not being iterated to
	  delete element without iterating the whole hash.

	* hash.c (shift_i): remove function

	* include/ruby/st.h (st_shift): add st_shift function

	* st.c (st_shift): ditto

	[Bug #8312] [ruby-core:54524] Patch by funny-falcon

Thu Apr 25 12:03:38 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Extract C programs as toplevel constants.

Thu Apr 25 02:23:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_RM_RECURSIVE): this hack is needed by only
	  autoconf 2.69 or earlier on darwin.

Thu Apr 25 01:22:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/tracer.rb (get_line): simply read by File.readlines.

	* lib/debug.rb (script_lines): get source lines from SCRIPT_LINES__ or
	  read from the file.

	* lib/debug.rb (display_list): use script_lines instead of recursion.
	  [Bug #8318]

	* lib/debug.rb (line_at): use script_lines same as display_list.

	* lib/debug.rb (display_list): Fix debug listing when called from the
	  same file it has been required.  patch by Dario Bertini <berdario AT
	  gmail.com> [Bug #8318] [fix GH-280]

Wed Apr 24 21:51:13 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: Check mblen().
	  mblen() is optional in uClibc.

	* eval_intern.h (CharNext): Don't use mblen() is not available.

Wed Apr 24 15:55:06 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_fd_fix_cloexec): use rb_update_max_fd().

Wed Apr 24 14:08:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* numeric.c: Fix wiki link on Float imprecision in overview, patched
	  by Makoto Kishimoto [Bug #8304] [ruby-dev:47280]

Wed Apr 24 14:03:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): disallow $- without following identifier
	  character.  [ruby-talk:406969]

	* parse.y (is_special_global_name): mere $- is not a valid global
	  variable name.

Wed Apr 24 13:54:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* string.c: Document String#setbyte return value by @gjmurakami-10gen
	  [Fixes GH-294]

Wed Apr 24 13:45:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* class.c: Example of Object#methods by @windwiny [Fixes GH-293]
	* ruby.c: Document return values of Kernel #sub, #gsub, and #chop

Wed Apr 24 12:54:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]


Wed Apr 24 12:54:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]

Wed Apr 24 12:27:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: Fix documentation for Array#index and #replace aliases
	  Based on a patch by @phiggins [Fixes GH-282]

Tue Apr 23 21:14:38 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_inspect): refix r40413, on Ruby 1.9 usual character
	  escape uses hex/Unicode escapes, so fix to use Unicode escape on
	  Unicode strings and hex on others. [ruby-core:54458] [Bug #8290]

Tue Apr 23 20:10:02 2013  Tanaka Akira  <akr@fsij.org>

	* missing/isnan.c (isnan): Don't define if isnan() macro is defined.
	  This fixes a compilation failure on uClibc based Gentoo system.

Tue Apr 23 17:40:40 2013  Martin Duerst <duerst@it.aoyama.ac.jp>

	* lib/rexml/document.rb, lib/rexml/element.rb,
	  lib/rexml/formatters/pretty.rb: remove opinionated
	  language in documentation. [Bug #8309],
	  reported by Charles Beckmann

Tue Apr 23 14:04:44 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (getacl_response): parse the mailbox of an ACL
	  response correctly.  [ruby-core:54365] [Bug #8281]

Tue Apr 23 11:58:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_scrub): fix for UTF-32.  strlen() on strings
	  contain NUL returns wrong result, use sizeof operator instead.
	  [ruby-dev:45975] [Feature #6752]

Tue Apr 23 10:26:50 2013  Akinori MUSHA  <knu@iDaemons.org>

	* test/ruby/test_module.rb
	  (TestModule#test_const_get_invalid_name)
	  (test_const_defined_invalid_name): Fix expected values.

Tue Apr 23 09:51:26 2013  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_inspect): NUL should not be represented as "\0"
	  when octal digits may follow.  [ruby-core:54458] [Bug #8290]

Mon Apr 22 22:54:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* insns.def (opt_mod): Use % operator if both operands are positive for
	  a significant performance improvement. Thanks to @samsaffron.

Mon Apr 22 17:09:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_object0): copy all instance variables not only generic
	  ivars, before calling post proc.  [ruby-core:51163] [Bug #7627]

Mon Apr 22 10:25:21 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* util.c (ruby_hdtoa): revert r29729.
	  If you want ruby to behave as before on x86, specify to use SSE like
	  -msse2 -mfpmath=sse for gcc.

Sun Apr 21 23:19:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* configure.in: Revert using sigsetjmp by default due to performance
	  problems on some systems (eg. older Linux)

Sun Apr 21 21:35:00 2013  Charlie Somerville  <charlie@charliesomerville.com>

	* configure.in: Use sigsetjmp by default so jumping out of signal
	  handlers properly restores the signal mask and SS_ONSTACK flag.
	  [ruby-core:54175] [Bug #8254]

	* configure.in: Manually check for presence of sigsetjmp. It is not a
	  function on some systems, so AC_CHECK_FUNCS cannot be used.

Sun Apr 21 08:00:55 2013  Tanaka Akira  <akr@fsij.org>

	* test/csv/test_features.rb, test/logger/test_logger.rb
	  test/mkmf/test_have_macro.rb, test/net/http/test_http.rb,
	  test/openssl/test_config.rb, test/psych/test_encoding.rb,
	  test/psych/test_exception.rb, test/psych/test_psych.rb,
	  test/psych/test_tainted.rb, test/readline/test_readline.rb,
	  test/rexml/test_contrib.rb, test/ruby/test_autoload.rb,
	  test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb,
	  test/ruby/test_file.rb, test/ruby/test_io.rb,
	  test/ruby/test_marshal.rb, test/ruby/test_process.rb,
	  test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb,
	  test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb,
	  test/zlib/test_zlib.rb: Use Tempfile.create.

Sun Apr 21 00:15:36 2013  Tanaka Akira  <akr@fsij.org>

	* lib/tempfile.rb (Tempfile.create): Close when the block exits.

Sat Apr 20 23:38:14 2013  Tanaka Akira  <akr@fsij.org>

	* lib/webrick/httpauth/htpasswd.rb: Use Tempfile.create to avoid
	  unintentional unlink() by the finalizer.
	  lib/webrick/httpauth/htdigest.rb: Ditto.

Sat Apr 20 22:47:48 2013  Tanaka Akira  <akr@fsij.org>

	* lib/tempfile.rb (Tempfile.create): New method.
	  The method name is proposed by Shugo Maeda.  [ruby-dev:47220]
	  [ruby-core:41478] [Feature #5707]

Sat Apr 20 14:22:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object): dump no ivars to the original by marshal_dump.
	  [ruby-core:54334] [Bug #8276]

	* marshal.c (r_object0): copy all ivars of marshal_dump data to the
	  result object instead.  [ruby-core:51163] [Bug #7627]

Sat Apr 20 02:33:27 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (str_scrub): add ruby method String#scrub which verify and
	  fix invalid byte sequence. [ruby-dev:45975] [Feature #6752]

	* string.c (str_compat_and_valid): check given string is compatible
	  and valid with given encoding.

	* transcode.c (str_transcode0): If invalid: :replace is specified for
	  String#encode, replace invalid byte sequence even if the destination
	  encoding equals to the source encoding.

Fri Apr 19 21:55:40 2013  Kouhei Sutou  <kou@cozmixng.org>

	* README.EXT.ja (Data_Wrap_Struct): Remove a description about
	  orphan argument. Oh, I renamed the argument name without
	  changing description at r36180... Sorry....
	  Patch by Makoto Kishimoto. Thanks!!! [ruby-dev:47269] [Bug #8292]
	* README.EXT.ja (Data_Make_Struct): Add a sample code that describes
	  how it works.
	  Patch by Makoto Kishimoto. Thanks!!! [ruby-dev:47269] [Bug #8292]

Fri Apr 19 17:54:57 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (body_type_msg): should accept
	  message/delivery-status with extra data.
	  [ruby-core:53741] [Bug #8167]

	* test/net/imap/test_imap_response_parser.rb: related test.

Fri Apr 19 13:03:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object): do not dump encoding which is dumped with
	  marshal_dump data.  [ruby-core:54334] [Bug #8276]

Fri Apr 19 11:36:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (stack_protector): control use of -fstack-protector.

	* configure.in (debugflags): let -fstack-protector precede and disable
	  debugflags, because they can't work together on SmartOS.  [Bug #8268]

Fri Apr 19 07:43:52 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/openssl/test_cipher.rb: Correct a typo
	  by jgls <joerg@joergleis.com>
	  https://github.com/ruby/ruby/pull/291 fix GH-291

Thu Apr 18 16:58:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_mod_public_method): fix visibility on anonymous
	  module. set visibility of singleton method, not method in base
	  class.  [ruby-core:54404] [Bug #8284]

Thu Apr 18 16:20:51 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): should skip dot directories only for recursion,
	  but should not if matching to the given pattern.  [ruby-core:54387]
	  [Bug #8283]

Thu Apr 18 16:20:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (pack_unpack): increase buffer size to fix buffer overflow,
	  and fix garbage just after unpacking without missing paddings.
	  [Bug #8286]

Thu Apr 18 13:35:54 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* pack.c (pack_unpack): output characters even if the input doesn't
	  have paddings. [Bug #8286]

Thu Apr 18 08:20:48 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* common.mk (clean-ext): remove timestamps.

Wed Apr 17 22:07:50 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/rubysocket.h (SOCKLEN_MAX): Expression simplified.

Wed Apr 17 20:09:19 2013  Aman Gupta  <ruby@tmm1.net>

	* compile.c (iseq_add_mark_object): Use new rb_iseq_add_mark_object().

	* insns.def (setinlinecache): Ditto.

	* iseq.c (rb_iseq_add_mark_object): New function to allocate
	  iseq->mark_ary on demand. [Bug #8142]

	* iseq.h (rb_iseq_add_mark_object): Ditto.

	* iseq.c (prepare_iseq_build): Avoid allocating mark_ary until needed.

	* iseq.c (rb_iseq_build_for_ruby2cext): Ditto.

Wed Apr 17 20:00:18 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/rubysocket.h (SOCKLEN_MAX): Defined.

	* ext/socket/raddrinfo.c (ext/socket/raddrinfo.c): Reject too long
	  Linux abstract socket name.

Wed Apr 17 19:45:27 2013  Aman Gupta  <tmm1@ruby-lang.org>

	* iseq.c (iseq_location_setup): re-use existing string when iseq has
	  the same path and absolute_path. [Bug #8149]

Wed Apr 17 11:38:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
	  UNASSIGNED is not a valid message.

Wed Apr 17 10:58:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (sleep_timeval): get rid of overflow on Windows where
	  timeval.tv_sec is not time_t but mere long.

Tue Apr 16 23:07:12 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/unixsocket.c (unix_send_io): Suppress a warning by clang.
	  (unix_recv_io): Ditto.

Tue Apr 16 12:27:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/sdbm/init.c: Fix comment indentation, by windwiny [Fixes GH-277]

Tue Apr 16 12:25:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/socket/option.c: Document synonymous methods, by windwiny [GH-277]
	* ext/stringio/stringio.c: ditto
	* ext/io/wait/wait.c: ditto
	* ext/gdbm/gdbm.c: ditto
	* ext/dl/cfunc.c: ditto
	* ext/zlib/zlib.c: ditto
	* ext/win32ole/win32ole.c: ditto
	* ext/dbm/dbm.c: ditto
	* ext/json/generator/generator.c: ditto
	* ext/date/date_core.c: ditto

Tue Apr 16 11:23:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/openssl/*: Document synonymous methods, by windwiny [GH-277]

Mon Apr 15 22:21:42 2013  Tanaka Akira  <akr@fsij.org>

	* ext/fiddle/depend: New file.

Mon Apr 15 22:01:02 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-insert): Check
	  ruby-electric-is-last-command-char-expandable-punct-p here.

	* misc/ruby-electric.el (ruby-electric-closing-char): New
	  interactive function bound to closing characters.  Typing one of
	  those closing characters right after the matching counterpart
	  cancels the effect of automatic closing.  For example, typing
	  "{" followed by "}" simply makes "{}" instead of "{ } }".

Mon Apr 15 12:54:42 2013  Martin Bosslet  <Martin.Bosslet@gmail.com>

	* ext/openssl/ossl_ssl.c: Correct shutdown behavior w.r.t GC.

	* test/openssl/test_ssl.rb: Add tests to verify correct behavior.

	[Bug #8240] Patch provided by Shugo Maeda. Thanks!

Mon Apr 15 10:23:39 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/coverage/depend: fix id.h place as r40283.

	* ext/coverage/extconf.rb: add topdir and topsrcdir to VPATH.

Sun Apr 14 19:46:14 2013  Tanaka Akira  <akr@fsij.org>

	* ext/-test-/debug/depend: New file.

	* ext/-test-/exception/depend: Ditto.

	* ext/-test-/printf/depend: Ditto.

	* ext/-test-/string/depend: Ditto.

	* ext/coverage/depend: Ditto.

	* ext/io/console/depend: Ditto.

	* ext/io/nonblock/depend: Ditto.

	* ext/io/wait/depend: Ditto.

	* ext/openssl/depend: Ditto.

	* ext/pathname/depend: Ditto.

	* ext/psych/depend: Ditto.

	* ext/zlib/depend: Ditto.

Sun Apr 14 02:46:50 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#create_makefile): remove {$(VPATH)} other
	  than nmake.

	* ext/ripper/depend: use VPATH expecting removed by above.

Sat Apr 13 23:06:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (timestamp_file): gather timestamp files in one
	  directory from each extension directories.

Sat Apr 13 21:09:02 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#create_makefile): output new macro
	  disthdrdir to specify the path of id.h, parse.h and etc.

	* ext/ripper/depend: use above macro.

Sat Apr 13 20:28:08 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
	  [bug] fix problem with optimization of \z (Issue #16) [Bug #8210]

Sat Apr 13 18:56:15 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/ripper/depend: parse.h and id.h may be created on topdir.

Sat Apr 13 12:08:16 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Add Vector#cross_product, patch by Luis Ezcurdia
	  [fix GH-276] [rubyspec:81eec89a124]

Sat Apr 13 10:20:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (rb_struct_define_without_accessor, rb_struct_define),
	  (rb_struct_s_def): hide member names array.

	* struct.c (anonymous_struct, new_struct, setup_struct): split
	  make_struct() for each purpose.

Sat Apr 13 09:34:31 2013  Tanaka Akira  <akr@fsij.org>

	* lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,
	  ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile.

	* ext/-test-/old_thread_select/depend: Update dependencies.

	* ext/-test-/wait_for_single_fd/depend: Ditto.

	* ext/bigdecimal/depend: Ditto.

	* ext/curses/depend: Ditto.

	* ext/digest/bubblebabble/depend: Ditto.

	* ext/digest/depend: Ditto.

	* ext/digest/md5/depend: Ditto.

	* ext/digest/rmd160/depend: Ditto.

	* ext/digest/sha1/depend: Ditto.

	* ext/digest/sha2/depend: Ditto.

	* ext/dl/callback/depend: Ditto.

	* ext/dl/depend: Ditto.

	* ext/etc/depend: Ditto.

	* ext/nkf/depend: Ditto.

	* ext/objspace/depend: Ditto.

	* ext/pty/depend: Ditto.

	* ext/readline/depend: Ditto.

	* ext/ripper/depend: Ditto.

	* ext/sdbm/depend: Ditto.

	* ext/socket/depend: Ditto.

	* ext/stringio/depend: Ditto.

	* ext/strscan/depend: Ditto.

	* ext/syslog/depend: Ditto.

	* ext/-test-/num2int/depend: Removed.

	* ext/dbm/depend: Ditto.

	* ext/fcntl/depend: Ditto.

	* ext/gdbm/depend: Ditto.

	* ext/racc/cparse/depend: Ditto.

Sat Apr 13 00:15:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/etc/etc.c (Init_etc): move Passwd and Group under Etc namespace
	  as primary names.

Fri Apr 12 21:06:55 2013  Tanaka Akira  <akr@fsij.org>

	* common.mk: pack.o depends on internal.h.

Fri Apr 12 20:59:24 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (ones): Use __builtin_popcountl if available.

	* internal.h (GCC_VERSION_SINCE): Macro moved from pack.c.

	* pack.c: Include internal.h for GCC_VERSION_SINCE.

Fri Apr 12 18:29:42 2013  Tanaka Akira  <akr@fsij.org>

	* common.mk: version.o depends on $(srcdir)/include/ruby/version.h
	  instead of {$(VPATH)}version.h to avoid confusion by VPATH between
	  top level version.h and include/ruby/version.h for build in-place.
	  [ruby-dev:47249] [Bug #8256]

Fri Apr 12 15:21:24 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_keyword_arg): non-symbol key is not
	  a keyword argument, keep it as a positional argument.

Fri Apr 12 11:58:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: Document synonymous methods, by windwiny [GH-277]
	* bignum.c: ditto
	* complex.c: ditto
	* dir.c: ditto
	* encoding.c: ditto
	* enumerator.c: ditto
	* numeric.c: ditto
	* proc.c: ditto
	* re.c: ditto
	* string.c: ditto

Thu Apr 11 23:41:46 2013  Tanaka Akira  <akr@fsij.org>

	* common.mk: Add dependencies for include/ruby.h

	* tool/update-deps: Use "make -p all miniruby ruby golf" to extract
	  dependencies in makefiles.

Thu Apr 11 23:21:17 2013  Tanaka Akira  <akr@fsij.org>

	* tool/update-deps: Use "make -p all golf" to extract dependencies in
	  makefiles.

Thu Apr 11 21:02:19 2013  Tanaka Akira  <akr@fsij.org>

	* common.mk: Dependency updated.

	* tool/update-deps: Rewritten.

Thu Apr 11 19:59:48 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* common.mk: partially revert r40183, which breaks building on
	  other than source directory. (its commit log also says the same
	  thing, but such failure is not reproducible on my environment
	  and the commit breaks build on my environment)

Thu Apr 11 16:10:01 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 on
	  Mac OS X and Linux [Bug #3371]

Thu Apr 11 13:19:22 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/drb/drbtest.rb (Drb{Core,Ary}#teardown): retry Process.kill
	  if it fails with Errno::EPERM on Windows (workaround).
	  [ruby-dev:47245] [Bug #8251]

Thu Apr 11 11:11:38 2013  Akinori MUSHA  <knu@iDaemons.org>

	* dir.c: Fix a typo.

Thu Apr 11 10:39:34 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): add missing case:
	  RUBY_LIBFFI_MODVERSION is not defined (usually on Windows).

Thu Apr 11 09:27:04 2013  Konstantin Haase  <me@rkh.im>

	* dir.c (file_s_fnmatch): Document File::FNM_EXTGLOB flag.

Thu Apr 11 09:17:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* README: Fix typo by Benjamin Winkler [Fixes GH-281]

Thu Apr 11 06:15:51 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* regint.h: fix typo: _M_AMD86 -> _M_AMD64.

	* siphash.c: ditto.

	* st.c: ditto.

Thu Apr 11 06:09:57 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/fiddle/extconf.rb: define RUBY_LIBFFI_MODVERSION macro.

	* ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 or 1
	  with platform and libffi's version. [Bug #3371]

Thu Apr 11 05:30:43 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/mkmf.rb (pkg_config): Add optional argument "option".
	  If it is given, it returns the result of
	  `pkg-config --<option> <pkgname>`.

Thu Apr 11 03:33:05 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/fiddle/closure.c (initialize): check mprotect's return value.
	  If mprotect is failed because of PaX or something, its function call
	  will cause SEGV.
	  http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130401T210301Z.diff.html.gz

Wed Apr 10 17:39:13 2013  Tanaka Akira  <akr@fsij.org>

	* ext/bigdecimal/bigdecimal.c (VpCtoV): Initialize a local variable
	  even when overflow.

Wed Apr 10 12:32:37 2013  Tanaka Akira  <akr@fsij.org>

	* bignum.c (rb_ll2big): Don't overflow on signed integer negation.

	* ext/bigdecimal/bigdecimal.c (MUL_OVERFLOW_SIGNED_VALUE_P): New
	  macro.
	  (AddExponent): Don't overflow on signed integer multiplication.
	  (VpCtoV): Don't overflow on signed integer arithmetic.
	  (VpCtoV): Don't overflow on signed integer arithmetic.

Wed Apr 10 06:32:12 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (MUL_OVERFLOW_INT_P): New macro.

	* sprintf.c (GETNUM): Don't overflow on signed integer multiplication.

Tue Apr  9 20:38:20 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (MUL_OVERFLOW_SIGNED_INTEGER_P): New macro.
	  (MUL_OVERFLOW_FIXNUM_P): Ditto.
	  (MUL_OVERFLOW_LONG_P): Ditto.

	* array.c (rb_ary_product): Don't overflow on signed integer
	  multiplication.

	* numeric.c (fix_mul): Ditto.
	  (int_pow): Ditto.

	* rational.c (f_imul): Ditto.

	* insns.def (opt_mult): Ditto.

	* thread.c (sleep_timeval): Don't overflow on signed integer addition.

	* bignum.c (rb_int2big): Don't overflow on signed integer negation.
	  (rb_big2ulong): Ditto.
	  (rb_big2long): Ditto.
	  (rb_big2ull): Ditto.
	  (rb_big2ll): Ditto.

Tue Apr  9 19:45:44 2013  Tanaka Akira  <akr@fsij.org>

	* lib/open-uri.rb: Support multiple fields with same field
	  name (like Set-Cookie).
	  (OpenURI::Meta#metas): New accessor to obtain fields as a Hash from
	  field name (string) to field values (array of strings).
	  [ruby-core:37734] [Bug #4964] reported by ren li.

Tue Apr  9 15:26:12 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): append keyword hash to argument array
	  to splat if needed.  [ruby-core:54094] [Bug #8236]

Tue Apr  9 10:02:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (timestamp_file): gather timestamp files in one
	  directory from each extension directories, with considering
	  target_prefix.

Tue Apr  9 04:57:59 JST 2013  Charles Oliver Nutter  <headius@headius.com>

	* error.c: Capture EAGAIN, EWOULDBLOCK, EINPROGRESS exceptions and
	  export them for use in WaitReadable/Writable exceptions.
	* io.c: Create versions of EAGAIN, EWOULDBLOCK, EINPROGRESS that
	  include WaitReadable and WaitWritable. Add rb_readwrite_sys_fail
	  for nonblocking failures using those exceptions. Use that
	  function in io_getpartial and io_write_nonblock instead of
	  rb_mod_sys_fail
	* ext/openssl/ossl_ssl.c: Add new SSLError subclasses that include
	  WaitReadable and WaitWritable. Use those classes for
	  write_would_block and read_would_block instead of rb_mod_sys_fail.
	* ext/socket/ancdata.c: Use rb_readwrite_sys_fail instead of
	  rb_mod_sys_fail in bsock_sendmsg_internal and
	  bsock_recvmsg_internal.
	* ext/socket/init.c: Use rb_readwrite_sys_fail instead of
	  rb_mod_sys_fail in rsock_s_recvfrom_nonblock and
	  rsock_s_connect_nonblock.
	* ext/socket/socket.c: Use rb_readwrite_sys_fail instead of
	  rb_mod_sys_fail in sock_connect_nonblock.
	* include/ruby/ruby.h: Export rb_readwrite_sys_fail for use instead
	  of rb_mod_sys_fail. Introduce new constants RB_IO_WAIT_READABLE and
	  RB_IO_WAIT_WRITABLE for first arg to rb_readwrite_sys_fail.

Tue Apr  9 02:44:32 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/extconf.rb: $defs needs -D or -U.  nothing is added
	  otherwize.

	* ext/socket/extconf.rb: check struct in_addr6, which is defined in
	  VC6 instead of in6_addr.

	* ext/socket/option.c (optname_to_sym): fix macro name.

	* ext/socket/constants.c (rsock_cmsg_type_arg): fix macro name.

Mon Apr  8 23:57:21 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (id_for_setter): extract common code from const, class
	  variable, instance variable setters.

Mon Apr  8 23:55:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/depend (ENCOBJS, TRANSOBJS): use explicit path to ruby.h for
	  nmake.

	* ext/depend (ENCOBJS, TRANSOBJS): fix header dependency, VPATH has
	  $(srcdir)/include/ruby but not $(srcdir)/include, so cannot find out
	  ruby/ruby.h.  use ruby.h instead and ../ruby for include/ruby.h.

Mon Apr  8 20:30:37 2013  Yuki Yugui Sonoda  <yugui@google.com>

	* ext/depend (ENCOBJS, TRANSOBJS): Add missing dependencies.

Mon Apr  8 17:19:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32ole/win32ole.c (fole_missing): should check actual argument
	  count before accessing.

Mon Apr  8 16:03:55 2013  Yuki Yugui Sonoda  <yugui@google.com>

	Fixes a build failure of ext/ripper/ripper.c on building out of place.
	* common.mk (id.h, id.c): Always generated in $(srcdir).
	(ext/ripper/ripper.c): Passes $(PATH_SEPARATOR) too to the sub make.

Mon Apr  8 12:05:02 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* object.c (rb_obj_ivar_set): call to_str for string only once.
	  to_str was called from rb_is_const_name and rb_to_id before.

	* object.c (rb_mod_const_set): ditto.

	* object.c (rb_mod_cvar_set): ditto.

Sun Apr  7 13:56:16 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
	  RUBY_PLATFORM should escape as Regexp,
	  because RUBY_PLATFORM may contain '.'.

Sun Apr  7 10:44:01 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h: Simplify the logic to include sys/select.h.
	  This fixes a compilation error on Haiku (gcc2 and gcc4).

	* configure.in: Use shared linker as $(CC) for Haiku.
	  This fixes a build error on Haiku (gcc2).

Sun Apr  7 10:41:30 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (MDNSOneShot#sender): Delete an unused variable.

Sun Apr  7 03:24:36 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c: use more generic type:
	  * u_char -> unsigned char
	  * u_short -> unsigned short
	  * u_int -> unsigned int
	  * u_long -> unsigned long
	  * quad_t -> int64_t
	  * u_quad_t -> uint64_t

	* addr2line.c (imax): inline is defined by configure.

Sun Apr  7 01:40:39 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-hash): New electric
	  function that expands a hash sign inside a string or regexp to
	  "#{}".

	* misc/ruby-electric.el (ruby-electric-curlies): Do not insert
	  spaces inside when the curly brace is a delimiter of %r, %w,
	  etc.

	* misc/ruby-electric.el (ruby-electric-curlies): Insert another
	  space before a closing curly brace when
	  ruby-electric-newline-before-closing-bracket is nil.

Sun Apr  7 01:01:26 2013  Tanaka Akira  <akr@fsij.org>

	* strftime.c (rb_strftime_with_timespec): Test yday range.
	  [ruby-core:44088] [Bug #6247] reported by Ruby Submit.

Sat Apr  6 23:46:54 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.

	* ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or
	  earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228]

Sat Apr  6 23:40:40 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: Support LOC resources.
	  [ruby-core:23361] [Feature #1436] by JB Smith.

Sat Apr  6 23:38:09 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* addr2line.c: quad_t and u_quad_t is not available on Solaris.
	  __inline is not available with old compilers on Solaris.
	  [ruby-dev:47229] [Bug #8227]

Sat Apr  6 23:31:38 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: Add one-shot multicast DNS support.
	  [ruby-core:53387] [Feature #8089] by Eric Hodel.

Sat Apr  6 22:12:01 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS.fetch_resource): New method to obtain
	  full result.
	  [ruby-dev:43587] [Feature #4788] proposed by Makoto Kishimoto.

Sat Apr  6 20:17:51 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_sys_fail_raddrinfo): Renamed from
	  rsock_sys_fail_addrinfo.
	  (rsock_sys_fail_raddrinfo_or_sockaddr): Renamed from
	  rsock_sys_fail_addrinfo_or_sockaddr.

	* ext/socket/rubysocket.h: Follow the above change.

Sat Apr  6 19:24:59 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_sys_fail_sockaddr): Takes struct sockaddr
	  and socklen_t instead of String object.
	  (rsock_sys_fail_addrinfo_or_sockaddr): Follow the above change.

	* ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow the above
	  change.

Sat Apr  6 14:28:23 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/rubysocket.h (SockAddrStringValueWithAddrinfo): New macro.
	  (rsock_sockaddr_string_value_with_addrinfo): New declaration.
	  (rsock_addrinfo_inspect_sockaddr): Ditto.
	  (rsock_sys_fail_addrinfo): Ditto.
	  (rsock_sys_fail_sockaddr_or_addrinfo): Ditto.

	* ext/socket/raddrinfo.c (rsock_addrinfo_inspect_sockaddr): Renamed
	  from addrinfo_inspect_sockaddr and exported.
	  (rsock_sockaddr_string_value_with_addrinfo): New function to obtain
	  string and possibly addrinfo object.

	* ext/socket/socket.c (rsock_sys_fail_sockaddr): Don't use
	  rsock_sys_fail_host_port which is IP dependent.  Invoke
	  rsock_sys_fail_addrinfo.
	  (rsock_sys_fail_addrinfo): New function using
	  rsock_addrinfo_inspect_sockaddr.
	  (rsock_sys_fail_addrinfo_or_sockaddr): New function.
	  (sock_connect): Use SockAddrStringValueWithAddrinfo and
	  rsock_sys_fail_addrinfo_or_sockaddr.
	  (sock_connect_nonblock): Ditto.
	  (sock_bind): Ditto.

Sat Apr  6 13:34:20 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument.

	* ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above
	  change.

Sat Apr  6 13:13:39 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect only
	  for String to avoid SEGV.

Sat Apr  6 12:40:16 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/rubysocket.h (rsock_sys_fail_host_port): Wrap by NORETURN.
	  (rsock_sys_fail_path): Ditto.
	  (rsock_sys_fail_sockaddr): Ditto.

Sat Apr  6 11:49:35 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect if the
	  path contains a NUL.

Sat Apr  6 11:39:19 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket: Improve socket exception message to show socket address.
	  [ruby-core:45617] [Feature #6583] proposed Eric Hodel.

	* ext/socket/rubysocket.h (rsock_sys_fail_host_port): Declared.
	  (rsock_sys_fail_path): Ditto.
	  (rsock_sys_fail_sockaddr): Ditto.

	* ext/socket/udpsocket.c (udp_connect): Use rsock_sys_fail_host_port.
	  (udp_bind): Ditto.
	  (udp_send): Ditto.

	* ext/socket/init.c (rsock_init_sock): Specify a string for rb_sys_fail
	  argument.
	  (make_fd_nonblock): Ditto.
	  (rsock_s_accept): Ditto.

	* ext/socket/ipsocket.c (init_inetsock_internal): Use
	  rsock_sys_fail_host_port.

	* ext/socket/socket.c (rsock_sys_fail_host_port): Defined.
	  (rsock_sys_fail_path): Ditto.
	  (rsock_sys_fail_sockaddr): Ditto.
	  (setup_domain_and_type): Use rsock_sys_fail_sockaddr.
	  (sock_connect_nonblock): Ditto.
	  (sock_bind): Ditto.
	  (sock_gethostname): Specify a string for rb_sys_fail argument.
	  (socket_s_ip_address_list): Ditto.

	* ext/socket/basicsocket.c (bsock_shutdown): Specify a string for
	  rb_sys_fail argument.
	  (bsock_setsockopt): Use rsock_sys_fail_path.
	  (bsock_getsockopt): Ditto.
	  (bsock_getpeereid): Refine the argument for rb_sys_fail.

	* ext/socket/unixsocket.c (rsock_init_unixsock): Use
	  rsock_sys_fail_path.
	  (unix_path): Ditto.
	  (unix_send_io): Ditto.
	  (unix_recv_io): Ditto.
	  (unix_addr): Ditto.
	  (unix_peeraddr): Ditto.

Sat Apr  6 11:23:18 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
	  fix load path for encoding to run the test as stand-alone.

Sat Apr  6 09:54:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (NATINT_LEN): fix definition order, must be after
	  NATINT_PACK.

Sat Apr  6 03:11:07 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in coder
	  emission.  Thanks @tjwallace
	* test/psych/test_coder.rb: test for change

Sat Apr  6 02:54:08 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/exception.rb: there should be only one exception
	  base class. Fixes tenderlove/psych #125
	* ext/psych/lib/psych.rb: require the correct exception class
	* ext/psych/lib/psych/syntax_error.rb: ditto
	* ext/psych/lib/psych/visitors/to_ruby.rb: ditto

Sat Apr  6 02:30:28 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (new_defined): remove all extra parentheses, and return
	  "nil" for defined? with empty expression.
	  [ruby-core:54024] [Bug #8224]

Sat Apr  6 02:06:04 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: correctly register
	  self-referential strings. Fixes tenderlove/psych #135

	* test/psych/test_string.rb: appropriate test.

Sat Apr  6 01:21:56 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/init.c (cloexec_accept): Fix a compile error on
	  Debian GNU/kFreeBSD.  Consider HAVE_ACCEPT4 is defined
	  but SOCK_CLOEXEC is not defined.

Sat Apr  6 00:19:30 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* load.c (features_index_add): use rb_str_subseq() to specify C string
	  position properly to fix require non ascii path.
	  [ruby-core:53733] [Bug #8165]

	* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
	  a test for the above.

Fri Apr  5 20:41:49 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h (HAVE_TRUE_LONG_LONG): Defined to distinguish
	  availability of long long and availability of 64bit integer type.

	* pack.c: Use HAVE_TRUE_LONG_LONG to distinguish q! and Q! support.

Fri Apr  5 20:19:42 2013  Tanaka Akira  <akr@fsij.org>

	* addr2line.c: Include ruby/missing.h to fix compile error on Debian.

Fri Apr  5 19:39:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): fix of defined? with empty
	  expression.  [ruby-core:53999] [Bug #8220]

Fri Apr  5 13:22:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/curses/curses.c (Init_curses): fix implementation function,
	  crmode should be same as cbreak.  [ruby-core:54013] [Bug #8222]

Fri Apr  5 12:06:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/curses/hello.rb: Typo in Curses example by Drew Blas
	  [Fixes GH-273]

Thu Apr  4 23:45:13 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (bind_random_port): Rescue EACCES for SunOS.
	  bind() on SunOS for port 2049 (nfs) and 4045 (lockd) causes
	  EACCES with unprivileged process.  cf. PRIV_SYS_NFS in privileges(5)
	  [ruby-core:48064] [Bug #7183] reported by Frank Meier.

Thu Apr  4 23:24:45 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Remove condition for bcc.

Thu Apr  4 22:53:23 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/ruby.h (FIX2LONG): Parenthesize the macro body.

Thu Apr  4 22:32:32 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (time_strftime): Describe %L and %N truncates digits under
	  the specified length.
	  [ruby-core:52130] [Bug #7829]

Thu Apr  4 22:08:46 2013  Tanaka Akira  <akr@fsij.org>

	* object.c (rb_mod_cvar_set): Reverted "avoid inadvertent
	  symbol creation" to avoid SEGV by
	  Class.new.class_variable_set(1, 2).

Thu Apr  4 20:07:19 2013  Tanaka Akira  <akr@fsij.org>

	* ext/pathname/pathname.c (path_write): New method.
	  (path_binwrite): Ditto.
	  [ruby-core:49468] [Feature #7378]

Thu Apr  4 16:51:29 2013  Yuki Yugui Sonoda  <yugui@google.com>

	* thread_pthread.c: Fixes wrong scopes of #if USE_SLEEPY_TIMER_THREAD
	  .. #endif sections.  This fixes a build error on NativeClient.

Wed Apr  3 17:25:31 2013  Yuki Yugui Sonoda  <yugui@google.com>

	* thread_pthread.c (ruby_init_stack): Avoid using uninitialized value.
	  stackaddr and size are not set if get_stack() fails.

Thu Apr  4 16:55:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (make_struct): avoid inadvertent symbol creation.
	  (rb_struct_aref): ditto.
	  (rb_struct_aset): ditto.

Thu Apr  4 16:54:40 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_const_set): avoid inadvertent symbol creation.
	  (rb_obj_ivar_set): ditto.
	  (rb_mod_cvar_set): ditto.

Thu Apr  4 15:46:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (enum_inject): avoid inadvertent symbol creation.

Thu Apr  4 14:37:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_thread_aref): avoid inadvertent symbol creation.
	  (rb_thread_variable_get): ditto.
	  (rb_thread_key_p): ditto.
	  (rb_thread_variable_p): ditto.

Thu Apr  4 11:33:57 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_bn.c (ossl_bn_to_i): Use bn2hex to speed up.
	  In general, binary to/from decimal needs extra cost.

Thu Apr  4 07:24:18 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Specify arguments to test functions.

Thu Apr  4 03:25:09 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_bn.c (ossl_bn_initialize): fix can't create from bn.

Wed Apr  3 22:09:25 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: Test functions and libraries after headers.

Wed Apr  3 21:23:29 2013  Tanaka Akira  <akr@fsij.org>

	 * io.c (rb_io_seek_m): Accept :CUR, :END, :SET as "whence" argument.
	   (interpret_seek_whence): New function.
	   [ruby-dev:45818] [Feature #6643]

Wed Apr  3 20:52:49 2013  Tanaka Akira  <akr@fsij.org>

	* process.c: Describe the behavior which Ruby invokes a commandline
	  directly without shell if the commandline is simple enough.
	  [ruby-core:50459] [Bug #7489]

Wed Apr  3 20:27:37 2013  Tanaka Akira  <akr@fsij.org>

	* ext/extmk.rb (extmake): Invoke Logging::log_close in a ensure
	  clause.

Wed Apr  3 18:53:58 2013  Tanaka Akira  <akr@fsij.org>

	* ext/extmk.rb (extmake): Use Logging.open to switch stdout and
	  stderr.  Delay Logging::log_close until the failure message is
	  written.  Write the failure message only if log file is opened.

	* lib/mkmf.rb (Logging.log_opened?): New method.

	  [ruby-dev:47215] [Bug #8209]

Wed Apr  3 17:11:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (constat_apply): pass through unknown sequence which
	  starts with ESC but is not followed by a bracket.  [ruby-core:53879]
	  [Bug #8201]

Wed Apr  3 16:35:32 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_eq): hide intermediate Bignums not just freeing
	  memory.  [ruby-core:53893] [Bug #8204]

	* object.c (rb_obj_hide): hide an object by clearing klass.

	* bignum.c (rb_big_eq): test as Fixnum if possible and get rid of zero
	  length Bignum.  [ruby-core:53893] [Bug #8204]

Tue Apr  2 23:56:03 2013  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb (SecureRandom.random_bytes): Use
	  OpenSSL::Random.random_add instead of OpenSSL::Random.seed and
	  specify 0.0 as the entropy.
	  [ruby-core:47308] [Bug #6928]

Tue Apr  2 20:24:52 2013  Tanaka Akira  <akr@fsij.org>

	* pack.c: Support Q! and q! for long long.
	  (natstr): Moved to toplevel.  Add q and Q if there is long long type.
	  (endstr): Moved to toplevel.
	  (NATINT_PACK): Consider long long.
	  (NATINT_LEN_Q): New macro.
	  (pack_pack): Support Q! and q!.
	  (pack_unpack): Ditto.
	  [ruby-dev:43970] [Feature #3946]

Tue Apr  2 19:24:26 2013  Tanaka Akira  <akr@fsij.org>

	* ext/-test-/num2int/num2int.c: Define utility methods
	  as module methods of Num2int.

	* test/-ext-/num2int/test_num2int.rb: Follow the above change.

Tue Apr  2 18:49:01 2013  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb: Don't use Array#to_s.
	   [ruby-core:52058] [Bug #7811] fixed by zzak (Zachary Scott).

Tue Apr  2 17:38:20 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* re.c (rb_reg_to_s): suppress duplicated charclass warning.
	  Regexp#to_s suppress extra its whole regexp options by calling
	  onig_new with its source, but it doesn't call rb_reg_preprocess.
	  Therefore its Unicode escapes (\u{XXXX}) are given as is,
	  and it may cause duplicated charclass warning for example
	  "[\u{33}]" (3 is duplicated) or "[\u{a}\u{b}]" (u is duplicated).
	  [ruby-core:53649] [Bug #8151]

Tue Apr  2 16:00:06 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_dump.c (rb_print_backtrace): separate to ease showing C backtrace.

	* internal.h (rb_print_backtrace): ditto.

Tue Apr  2 15:22:09 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/ruby/envutil.rb (assert_separately): stop_auto_run of
	  Test::Unit::Runner to prevent auto runner use ARGV.

	* test/ruby/envutil.rb (assert_separately): add $: to separate process.

	* test/ruby/envutil.rb (assert_separately): fail if stderr is not
	  empty and ignore_stderr is false.

Tue Apr  2 06:46:59 2013  Tanaka Akira  <akr@fsij.org>

	* ext/-test-/num2int/num2int.c: Rename utility methods
	  to global functions to ease manual experiments.

	* test/-ext-/num2int/test_num2int.rb: Follow the above change.

Mon Apr  1 22:26:17 2013  Tanaka Akira  <akr@fsij.org>

	* ext/zlib/zlib.c (rb_gzfile_set_mtime): Use NUM2UINT.
	  The old logic doesn't work well on LP64 platforms as:
	  .. -2**63-1 => error,
	  -2**63 .. -2**62-1 => success,
	  -2**62 .. -2**31-1 => error,
	  -2**31 .. 2**31-1 => success,
	  2**31 .. 2**62-1 => error,
	  2**62 .. 2**64-1 => success,
	  2**64 ..  => error.

Mon Apr  1 22:08:02 2013  Benoit Daloze  <eregontp@gmail.com>

	* ext/zlib/zlib.c (Zlib::Inflate.new):
	  Fix documentation syntax and naming errors.
	  Based on patch by Robin Dupret. Fix GH-271.

Mon Apr  1 21:22:31 2013  Tanaka Akira  <akr@fsij.org>

	* test/-ext-/num2int/test_num2int.rb: Test small bignums.

Mon Apr  1 21:10:56 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (rb_num2ulong_internal): Don't cast a negative double value
	  into unsigned long, which is undefined behavior.
	  (rb_num2ull): Don't cast a value bigger than LLONG_MAX into
	  long long, which is undefined behavior.

Mon Apr  1 20:57:57 2013  Tanaka Akira  <akr@fsij.org>

	* ext/-test-/num2int/num2int.c: Return string for result, instead of
	  printing.

	* test/-ext-/num2int/test_num2int.rb: updated to follow above change.

Mon Apr  1 20:08:07 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (rb_num2long): Don't use SIGNED_VALUE uselessly.
	  (check_int): Ditto.
	  (check_short): Ditto.
	  (rb_num2fix): Ditto.
	  (rb_num2ulong_internal): Add a cast.

Mon Apr  1 18:41:35 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: skip autoconf 2.64 and 2.66, 2.67 seems short-lived
	  but stick on it for Debian Squeeze.

Mon Apr  1 14:22:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check clang version by predefined macro values.
	  [Bug #8192]

Mon Apr  1 12:05:15 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (check_uint): Take the 1st argument as unsigned long,
	  instead of VALUE.  Refine the validity test conditions.
	  (check_ushort): Ditto.

Mon Apr  1 07:15:03 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* configure.in: use quadrigraph to put '[' or ']'. [Bug #8192]

Mon Apr  1 04:16:41 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: kick old clang. [ruby-dev:47204] [Bug #8192]

Mon Apr  1 01:12:46 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.

	* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests.

	* test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX.

Sun Mar 31 17:17:56 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (rb_mod_define_method): consider visibility in define_method.
	  patch by mashiro <mail AT mashiro.org>.  fix GH-268.

Sun Mar 31 15:40:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/configure.bat: try to fix option arguments split by commas and
	  equals here.  this batch file no longer run with old command.com.

	* tool/mkconfig.rb: no hacks for cmd.exe.

Sun Mar 31 13:47:04 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (rb_num2ulong_internal): New function similar to
	  rb_num2ulong but integer wrap around flag is also returned.
	  (rb_num2ulong): Use rb_num2ulong_internal.
	  (rb_num2uint): Use rb_num2ulong_internal and the wrap around flag is
	  used instead of negative_int_p(val).
	  (rb_num2ushort): ditto.

Sun Mar 31 06:27:17 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (HAVE_METACLASS_P): should check FL_SINGLETON flag before get
	  instance variable to get rid of wrong warning about __attached__.
	  [ruby-core:53839] [Bug #8188]

Sat Mar 30 14:11:28 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* bcc32: removed. agreed at
	  http://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130223Japan

Sat Mar 30 03:58:00 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/file.c (code_page): use cp1252 instead of cp20127 as US-ASCII.
	  fix [ruby-core:53079] [Bug #7996]
	  reported and patched by mmeltner (Michael Meltner).

Sat Mar 30 03:49:21 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (wrename): use MoveFileExW instead of MoveFileW,
	  because the latter fails on cross device file move of some
	  environments.
	  fix [ruby-core:53492] [Bug #8109]
	  reported by mitchellh (Mitchell Hashimoto).

Fri Mar 29 22:09:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_mutex_synchronize_m): yield no block params.  patch by
	  splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
	  fix GH-266.

Fri Mar 29 16:51:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_next_argv): set init flag if succeeded to forward, after
	  skipping.

	* io.c (argf_block_call_i, argf_block_call): no more forwarding if
	  forwarded after skipping.  [ruby-list:49185]

	* io.c (argf_close): deal with init flag.

	* io.c (argf_block_call_i, argf_block_call): forward next file if
	  skipped while iteration, to get rid of IOError.  [ruby-list:49185]

Fri Mar 29 11:09:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (configuration): not include all CFLAGS in CXXFLAGS, to
	  use different set than C for C++.  [ruby-core:45273] [Bug #6504]

Fri Mar 29 10:24:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/io.h: undef POSIX compliant names on AIX, which are no
	  longer needed.  patch suggested by edelsohn (David Edelsohn) in
	  [ruby-core:53815].  [Bug #8174]

Fri Mar 29 06:39:42 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (rb_num2ull): Cast double to unsigned LONG_LONG via
	  LONG_LONG instead of double to unsigned LONG_LONG directly.
	  This is a challenge to fix a test_num2ull(TestNum2int)
	  failure (NUM2ULL(-1.0) should be "18446744073709551615" but was "0")
	  on Mac OS X with 32bit clang.
	  http://a.mrkn.jp/~mrkn/chkbuild/mountain_lion/ruby-trunk-m32-o0/log/20130328T191100Z.diff.html.gz

Fri Mar 29 00:54:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MAIN_DOES_NOTHING): ensure symbols for tests to be
	  preserved.  [ruby-core:53745] [Bug #8169]

Thu Mar 28 23:11:25 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: Test Windows platform by detecting LoadError when
	  require 'win32/resolv' suggested by Nobuyoshi Nakada [ruby-core:53389].
	  [ruby-core:53388] [Feature #8090] Reported by Charles Nutter.

Thu Mar 28 23:10:10 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/io.h: rename SVR3,4 member names as POSIX compliant,
	  to get rid of conflict on AIX.  [ruby-core:53765] [Bug #8174]

Thu Mar 28 18:22:21 2013  Tanaka Akira  <akr@fsij.org>

	* test/-ext-/num2int/test_num2int.rb: extract
	  assert_num2i_success_internal and assert_num2i_error_internal and
	  provide assertion messages as "NUM2XXX(NNN)".

Thu Mar 28 07:05:25 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/intern.h: Delete redundant inclusions caused by
	  AC_INCLUDES_DEFAULT in defines.h.

	* include/ruby/defines.h: Ditto.

	* include/ruby/ruby.h: Ditto.

	* include/ruby/st.h: Ditto.

Thu Mar 28 06:51:31 2013  Tanaka Akira  <akr@fsij.org>

	* include/ruby/defines.h: Fix a compilation error on NetBSD,
	  "type of formal parameter 1 is incomplete" for the rb_thread_wait_for
	  invocation in rb_file_flock, by including header files as
	  AC_INCLUDES_DEFAULT of autoconf.

Wed Mar 27 22:09:14 2013  Tanaka Akira  <akr@fsij.org>

	* numeric.c (LONG_MIN_MINUS_ONE_IS_LESS_THAN): New macro.
	  (LLONG_MIN_MINUS_ONE_IS_LESS_THAN): Ditto.
	  (rb_num2long): Use LONG_MIN_MINUS_ONE_IS_LESS_THAN.
	  (rb_num2ulong): Ditto.
	  (rb_num2ll): Use LLONG_MIN_MINUS_ONE_IS_LESS_THAN.
	  (rb_num2ull): Ditto.

	* test/-ext-/num2int/test_num2int.rb (assert_num2i_success): Test the
	  value converted into a Float if Float can represent the value
	  exactly.
	  (assert_num2i_error): Ditto.

Wed Mar 27 20:59:47 2013  Tanaka Akira  <akr@fsij.org>

	* test/-ext-/num2int/test_num2int.rb (assert_num2i_success): New
	  utility method.
	  (assert_num2i_error): Ditto.

Wed Mar 27 20:37:59 2013  Tanaka Akira  <akr@fsij.org>

	* time.c (num_exact): Use to_r method only if to_int method is
	  available.
	  [ruby-core:53764] [Bug #8173] Reported by Hiro Asari.

Wed Mar 27 12:07:40 2013  Tanaka Akira  <akr@fsij.org>

	* test/-ext-/num2int/test_num2int.rb (test_num2ll): test LLONG_MIN,
	  not LONG_MIN.

Wed Mar 27 12:02:45 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (TIMET_MAX_PLUS_ONE): definition simplified.

Wed Mar 27 06:39:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MAIN_DOES_NOTHING): force to refer symbols for tests
	  to be preserved.  [ruby-core:53745] [Bug #8169]

Wed Mar 27 05:15:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_REPLACE_TYPE): define SIGNEDNESS_OF_type same as
	  check_signedness of mkmf.rb.

	* internal.h (TIMET_MAX, TIMET_MIN, TIMET_MAX_PLUS_ONE): use
	  SIGNEDNESS_OF_TIME_T.

Wed Mar 27 00:28:45 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h (TIMET_MAX_PLUS_ONE): Defined.

	* thread.c (double2timeval): Saturate out-of-range values.

Tue Mar 26 23:41:18 2013  Tanaka Akira  <akr@fsij.org>

	* internal.h: Define TIMET_MAX and TIMET_MIN here.

	* time.c: Remove TIMET_MAX and TIMET_MIN definitions.

	* thread.c: Ditto.

	* thread_pthread.c: Remove TIMET_MAX definition.

	* thread_win32.c: Ditto.

Tue Mar 26 22:31:10 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (sockaddr_len): return the shortest length for
	  unknown socket address.

Tue Mar 26 22:14:46 2013  Tanaka Akira  <akr@fsij.org>

	* thread.c (double2timeval): convert the infinity to TIME_MAX to avoid
	  SEGV by Thread.new {}.join(Float::INFINITY) on
	  Debian GNU/Linux (amd64).

Mon Mar 25 07:09:20 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rinda/tuplespace.rb:  Only return tuple entry once on move,
	  either through port or regular return, not both.  This results in a
	  120% speedup when combined with #8125.  Patch by Joel VanderWerf.
	  [ruby-trunk - Feature #8119]

Mon Mar 25 06:59:01 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rinda/test_rinda.rb:  Skip IPv6 tests if no IPv6 addresses
	  exist.  Skip fork-dependent test if fork is not available.
	  [ruby-trunk - Bug #8159]

Sun Mar 24 10:38:24 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* addr2line.c (putce): suppress unused return value warning.

Mon Mar 25 02:01:03 2013  Narihiro Nakamura  <authornari@gmail.com>

	* proc.c (bm_free): need to clean up the mark flag of a free and
	  unlinked method entry. [Bug #8100] [ruby-core:53439]

Sun Mar 24 22:13:51 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (rb_str_rpartition): revert r39903, and convert byte offset
	  to char offset; the return value of rb_reg_search is byte offset,
	  but other than it of rb_str_rpartition expects char offset.
	  [Bug #8138] [ruby-dev:47183]

Sun Mar 24 18:29:46 2013  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_rpartition): Fix String#rpartition(/re/)
	  against a multibyte string. [Bug #8138] [ruby-dev:47183]

Sun Mar 24 13:42:24 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping
	  for debugging. [Feature #8024] [ruby-dev:47135]

Sun Mar 24 12:55:47 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: We have no chance to expand the heap when lazy sweeping is
	  restricted. So collecting is often invoked if there is not
	  enough free space in the heap. Try to expand heap when this is
	  the case.

Sun Mar 24 11:03:31 2013  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_require.rb: Remove temporally files in the tests.

	* test/ruby/test_rubyoptions.rb: Ditto.

	* test/logger/test_logger.rb: Ditto.

	* test/psych/test_psych.rb: Ditto.

	* test/readline/test_readline.rb: Ditto.

	* test/syslog/test_syslog_logger.rb: Ditto.

	* test/webrick/test_httpauth.rb: Ditto.

	* test/zlib/test_zlib.rb: Ditto.

Sun Mar 24 05:36:29 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rinda/ring.rb:  Added documentation for multicast support.

	* NEWS:  Point to above documentation.

Sun Mar 24 05:32:39 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rinda/test_rinda.rb:  Restore tests commented out while fixing
	  test slowdown bug before r39895.

Sun Mar 24 05:03:36 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rinda/ring.rb:  Add multicast support to Rinda::RingFinger and
	  Rinda::RingServer.  [ruby-trunk - Bug #8073]
	* test/rinda/test_rinda.rb:  Test for the above.

	* NEWS: Update with Rinda multicast support

Sun Mar 24 04:13:27 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rinda/test_rinda.rb:  Fixed test failures in r39890 and r39891
	  due to stopping DRb service.

Sun Mar 24 03:34:02 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rinda/rinda.rb:  Fixed loss of tuple when remote is alive but the
	  call stack was unwound.  Patch by Joel VanderWerf.
	  [ruby-trunk - Bug #8125]
	* test/rinda/test_rinda.rb:  Test for the above.

Sun Mar 24 02:14:53 2013  Tanaka Akira  <akr@fsij.org>

	* test/mkmf/test_have_macro.rb: remove temporally files in the tests.

Sat Mar 23 23:50:04 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c (kprintf): added from FreeBSD libstand's printf.
	  this is consided as async signal safe function.

	* addr2line.c (rb_dump_backtrace_with_lines): use kfprintf.
	  [Bug #8144] [ruby-core:53632]

Sat Mar 23 23:28:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Use Qnil and NIL_P
	  instead of (VALUE)0 as a return value.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_div): ditto.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_divremain): ditto.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_remainder): ditto.

Sat Mar 23 17:39:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_eval.c (check_funcall_respond_to): preserve passed_block, which
	  is modified in vm_call0_body() via vm_call0(), and caused a bug of
	  rb_check_funcall() by false negative result of rb_block_given_p().
	  re-fix [ruby-core:53650] [Bug #8153].
	  [ruby-core:53653] [Bug #8154]

Fri Mar 22 17:48:34 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/forwardable.rb (Forwardable::FILE_REGEXP): create regexp object
	  outside sources for eval, to reduce allocations in def_delegators
	  wrappers.  //o option does not make each regexps shared.  patch by
	  tmm1 (Aman Gupta) in [ruby-core:53620] [Bug #8143].

Fri Mar 22 17:38:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (rb_feature_p), vm_core.h (rb_vm_struct): turn
	  loaded_features_index into st_table.  patches by tmm1 (Aman Gupta)
	  in [ruby-core:53251] and [ruby-core:53274] [Bug #8048]

Fri Mar 22 10:29:00 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c: Fix style.

Fri Mar 22 05:30:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (ambiguous_operator): refine warning message, since this
	  warning is shown after literal too.

Fri Mar 22 04:51:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_callee_setup_keyword_arg): should check required
	  keyword arguments even if rest hash is defined.  [ruby-core:53608]
	  [Bug #8139]

Fri Mar 22 01:00:17 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* process.c (rb_execarg_addopt, run_exec_pgroup): use rb_pid_t
	  instead of pid_t.

	* ext/pty/pty.c (raise_from_check, pty_check): ditto.

Fri Mar 22 00:04:15 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c (rb_dump_backtrace_with_lines): output line at once.

Thu Mar 21 23:17:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (ruby_kill): get rid of deadlock on signal 0.
	  [ruby-dev:47182] [Bug #8137]

Thu Mar 21 22:39:46 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* marshal.c (marshal_dump, marshal_load): workaround for segv on
	  Intel Solaris compiled with Oracle SolarisStudio 12.3.
	  Partly revert r38174. [ruby-core:52042] [Bug #7805]

Thu Mar 21 16:48:06 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (simple_re_meta): escape all closing characters, not only
	  round parenthesis.  [ruby-core:53578] [Bug #8133]

Thu Mar 21 13:50:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_core.h (UNINITIALIZED_VAR): suppress warnings by clang 4.2.
	  [ruby-core:51742] [Bug #7756]

Thu Mar 21 07:34:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/date/date_core.c: Typo in Date::MONTHNAMES by Matt Gauger
	  [GH fixes #261]

Wed Mar 20 22:53:14 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (find_library): fix to format message.
	  [ruby-core:53568] [Bug #8130]

Wed Mar 20 22:52:52 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (install_dirs, with_destdir): prefix with DESTDIR
	  directories to install only unless bundled extension libraries.
	  [ruby-core:53502] [Bug #8115]

Wed Mar 20 17:47:53 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup):
	  allow using different root for source and build directories.
	  this may fixes a minor problem of r39834.

Wed Mar 20 16:40:48 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/ruby/test_signal.rb (test_hup_me): skip if HUP isn't supported.
	  On Windows this test causes ArgumentError.

Wed Mar 20 16:24:12 2013  Hiroshi Shirosaki  <h.shirosaki@gmail.com>

	* test/rubygems/test_gem_installer.rb (test_install_extension_flat):
	  use ruby in build directory in case ruby is not installed.
	  [ruby-core:53265] [Bug #8058]

Wed Mar 20 15:22:07 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use
	  relative path to get rid of "too long commandline" error.

Wed Mar 20 04:27:42 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/rinda/test_rinda.rb: remove unused variables.
	  patched by Vipul A M <vipulnsward@gmail.com>

Wed Mar 20 04:15:32 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* ext/bigdecimal/bigdecimal.c: fixed typo.
	  patched by Vipul A M <vipulnsward@gmail.com>

Sat Mar 16 03:40:49 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_signal.rb (test_hup_me): added a few comments.

Sat Mar 16 03:39:38 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (ruby_kill): added a few comments.

Sat Mar 16 03:36:56 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (ruby_kill): release GVL while waiting signal delivered.

Tue Mar 19 19:50:48 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ruby_kill (internal.h, thread.c): use rb_pid_t instead of pid_t.
	  this fixes the build failure of mswin introduced at r39819.

Tue Mar 19 17:09:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_conv_enc_opts): convert with one converter, instead
	  of re-creating converters for each buffer expansion.

Tue Mar 19 17:06:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): compose HFS file names from UTF8-MAC.
	  [ruby-core:48745] [Bug #7267]

Sat Mar 16 01:44:29 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* internal.h: added a declaration of ruby_kill().
	* thread.c (ruby_kill): helper function of kill().

	* signal.c (rb_f_kill): use ruby_kill() instead of kill().
	* signal.c (rb_f_kill): call rb_thread_execute_interrupts()
	  to ensure that make SignalException if sent a signal
	  to myself. [Bug #7951] [ruby-core:52864]

	* vm_core.h (typedef struct rb_thread_struct): added
	  th->interrupt_cond.
	* thread.c (rb_threadptr_interrupt_common): added to
	  initialization of th->interrupt_cond.
	* thread.c (thread_create_core): ditto.

	* test/ruby/test_signal.rb (TestSignal#test_hup_me): test for
	  the above.

Sat Mar 16 00:42:39 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (linux_iocparm_len): enable only exist _IOC_SIZE().
	  Because musl libc doesn't have it. [Bug #8051] [ruby-core:53229]

Tue Mar 19 10:05:04 2013  Shota Fukumori  <her@sorah.jp>

	* ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.
	  [Bug #8116] [ruby-dev:47177]

Tue Mar 19 02:13:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: set ac_cv_prog_cxx if CXX is supplied.

Tue Mar 19 01:18:00 2013  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: Fix c++ compiler auto-selection not only for
	  Darwin 11.x, but also the other versions of Darwin.

Tue Mar 19 00:26:22 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: Improve accuracy of objspace_live_num() and
	  allocated/freed counters. patched by tmm1(Aman Gupta).
	  [Bug #8092] [ruby-core:53392]

Mon Mar 18 21:42:48 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: Avoid unnecessary heap growth. patched by tmm1(Aman Gupta).
	  [Bug #8093] [ruby-core:53393]

Mon Mar 18 17:58:36 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: Fix unlimited memory growth with large values of
	  RUBY_FREE_MIN. patched by tmm1(Aman Gupta).
	  [Bug #8095] [ruby-core:53405]

Mon Mar 18 14:46:19 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/win32ole/test_err_in_callback.rb
	  (TestErrInCallBack#test_err_in_callback): shouldn't create a file in
	  the top of build directory.

Mon Mar 18 13:29:52 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_dump.c (backtrace): on darwin use custom backtrace() to trace
	  beyond _sigtramp. darwin's backtrace can't trace beyond signal
	  trampoline with sigaltstack.

	* configure.in: check execinfo.h on darwin.

Mon Mar 18 11:03:23 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_exec.h (END_INSN): revert r39517 because the segv seems fixed by
	  r39806.

Mon Mar 18 10:41:06 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_exec.c: Correct predefined macro name. This typo is introduced by
	  r36534 and should be backported to ruby_2_0_0.

Mon Mar 18 03:18:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: Typo in Array#delete by Timo Sand [GH fixes #258]

Mon Mar 18 01:14:56 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (io_fillbuf): show fd number on failure to debug.
	  http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20130316T050302Z.diff.html.gz

Sun Mar 17 02:38:21 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/date/date_core.c: include sys/time.h for avoiding implicit
	  declaration of gettimeofday().

Sun Mar 17 00:55:31 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/missing.h: removed __linux__. it's unnecessary.

Fri Mar 15 14:57:16 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c: disabled _FORTIFY_SOURCE for avoid to hit glibc bug.
	  [Bug #8080] [ruby-core:53349]
	* test/ruby/test_io.rb (TestIO#test_io_select_with_many_files):
	  test for the above.

Wed Mar 13 15:16:35 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/missing.h (__syscall): moved to...
	* io.c: here. because __syscall() is only used from io.c.

	* include/ruby/missing.h: move "#include <sys/type.h>" to ....
	* include/ruby/intern.h: here. because it was introduced for
	  fixing NFDBITS issue. [ruby-core:05179].

Wed Mar 13 14:38:53 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* include/ruby/missing.h (struct timespec): include <sys/time.h>

Wed Mar 13 13:54:45 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: check struct timeval exist or not.
	* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
	  properly. and don't include sys/time.h if struct timeval exist.

	* file.c: include sys/time.h explicitly.
	* random.c: ditto.
	* thread_pthread.c: ditto.
	* time.c: ditto.
	* ext/date/date_strftime.c: ditto.

Fri Mar 15 14:45:02 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in (_FORTIFY_SOURCE): added a few comments.

Fri Mar 15 14:17:55 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (numberof): renamed from ARRAY_SIZE() because
	  other all files use numberof().

Say Mar 15 01:33:00 2013  Charles Oliver Nutter <headius@headius.com>

	* test/ruby/test_lazy_enumerator.rb (TestLazyEnumerator#test_drop_while):
	  Modify while condition to show dropping remains off after first false
	  value. This change was made in 39711.

Fri Mar 15 23:06:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (GetTimeval): check if already initialized instance.

	* time.c (GetNewTimeval): check if newly created instance.

	* time.c (time_init_0, time_init_1, time_init_copy, time_mload): must
	  be newly created instance.  [ruby-core:53436] [Bug #8099]

Fri Mar 15 14:51:33 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_sys_fail_path_with_func): share same function, and path
	  may be nil.

Fri Mar 15 08:24:51 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (rb_sys_fail_path): define & use rb_sys_fail_path0 like r39752

Fri Mar 15 04:08:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* proc.c: Typo in Proc.arity found by Jack Nagel [Bug #8094]

Thu Mar 14 16:59:09 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rb_cv_function_name_string): macro for function name
	  string predefined identifier, __func__ in C99, or __FUNCTION__ in
	  gcc.

	* file.c (rb_sys_fail_path): use RUBY_FUNCTION_NAME_STRING.

Thu Mar 14 14:12:34 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (rb_sys_fail_path): use rb_sys_fail_path0 only on GCC.
	  __func__ is C99 feature.

Thu Mar 14 12:59:59 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (rb_sys_fail_path0): add to append the name of called function
	  to ease debugging for example blow umask_spec failure.
	  http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20130309T010202Z.diff.html.gz

	* file.c (rb_sys_fail_path): use rb_sys_fail_path0.

Thu Mar 14 12:53:15 2013  Luis Lavena  <luislavena@gmail.com>

	* win32/file.c (get_user_from_path):  add internal function that retrieves
	  username from supplied path (refactored).
	* win32/file.c (rb_file_expand_path_internal):  refactor expansion of user
	  home to use get_user_from_path and cover dir_string corner cases.
	  [ruby-core:53168] [Bug #8034]

Thu Mar 14 11:53:01 2013  Narihiro Nakamura  <authornari@gmail.com>

	* NEWS: describe RUBY_HEAP_SLOTS_GROWTH_FACTOR.

Thu Mar 14 10:01:12 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/globals.rdoc:  $? is thread-local

Wed Mar 13 23:25:59 2013  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: allow to tune growth of heap by environment variable
	  RUBY_HEAP_SLOTS_GROWTH_FACTOR. patched by tmm1(Aman Gupta).
	  [Feature #8015] [ruby-core:53131]

Wed Mar 13 19:43:46 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* doc/irb/irb.rd.ja: fix typo

	* ext/tk/MANUAL_tcltklib.eng: fix typos

	* ext/tk/sample/tktextframe.rb (Tk#component_delegates): fix typo

Wed Mar 13 15:13:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_obj_singleton_methods): collect methods from the origin
	  class.  [ruby-core:53207] [Bug #8044]

Wed Mar 13 14:51:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c (rb_export_method): directly override the flag of method
	  defined in prepending class too, not adding zsuper entry.
	  [ruby-core:53106] [Bug #8005]

Wed Mar 13 13:06:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not
	  available on old shells.

	* configure.in (shvar_to_cpp): escape quotes for old shells.
	  [Bug #7959] [Bug #8071]

Wed Mar 13 11:11:07 2013  Shugo Maeda  <shugo@ruby-lang.org>

	* object.c (Init_Object): remove Module#used, which has been
	  introduced in Ruby 2.0 by mistake.  [Bug #7916] [ruby-core:52719]

Wed Mar 13 05:49:29 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/irb.rb:  Fix typo

Tue Mar 12 22:20:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_set_arguments, iseq_compile_each): support required
	  keyword arguments.   [ruby-core:51454] [Feature #7701]

	* iseq.c (rb_iseq_parameters): ditto.

	* parse.y (f_kw, f_block_kw): ditto.  this syntax is still
	  experimental, the notation may change.

	* vm_core.h (rb_iseq_struct): ditto.

	* vm_insnhelper.c (vm_callee_setup_keyword_arg): ditto.

Tue Mar 12 17:02:53 2013  TAKANO Mitsuhiro <tak@no32.tk>

	* date_core.c: clearly specify operator precedence.

Tue Mar 12 17:00:45 2013  TAKANO Mitsuhiro <tak@no32.tk>

	* insns.def: fix condition.

Tue Mar 12 16:48:19 2013  TAKANO Mitsuhiro <tak@no32.tk>

	* rational.c: fix dangling if, else-if and else.

Tue Mar 12 06:27:59 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/setup_command.rb:  Don't delete non-rubygems
	  files when installing RubyGems.
	* test/rubygems/test_gem_commands_setup_command.rb:  Test for the
	  above.

	* lib/rubygems/ext/ext_conf_builder.rb:  Use full path to siteconf.rb
	  in case the extconf.rb changes directories (like memcached does).

	* lib/rubygems/package.rb:  Remove double slash from path.
	* test/rubygems/test_gem_package.rb:  Test for the above.
	* test/rubygems/test_gem_package_old.rb:  ditto.

	* lib/rubygems/source.rb:  Revert automatic HTTPS upgrade
	* lib/rubygems/spec_fetcher.rb:  ditto.
	* test/rubygems/test_gem_remote_fetcher.rb:  ditto.
	* test/rubygems/test_gem_source.rb:  ditto.
	* test/rubygems/test_gem_spec_fetcher.rb:  ditto.

Tue Mar 12 02:25:19 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/smtp.rb:  Added Net::SMTP#rset method to implement the SMTP
	  RSET command.  [ruby-trunk - Feature #5373]
	* NEWS:  ditto.
	* test/net/smtp/test_smtp.rb:  Test for the above.

Mon Mar 11 22:44:57 2013  Tanaka Akira  <akr@fsij.org>

	* lib/resolv-replace.rb (TCPSocket#initialize): resolve the 3rd
	  argument only if non-nil value is given.
	  [ruby-dev:47150] [ruby-trunk - Bug #8054] reported and analyzed by
	  mrkn.

Mon Mar 11 19:22:54 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/mkmf/base.rb: class name conflict.

Mon Mar 11 18:45:09 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* enumerator.c (enumerator_with_index): try to convert given offset to
	  integer. fix bug introduced in r39594.

Mon Mar 11 17:27:57 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/ruby/envutil.rb (EnvUtil.with_default_external): add for
	  changing Encoding.default_external without warnings.

	* test/ruby/envutil.rb (EnvUtil.with_default_internal): ditto.

	* test/ruby/test_io_m17n.rb: use above with_default_external.

Mon Mar 11 16:57:00 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (extract_binmode): raise error even if binmode and textmode
	  don't conflict. [Bug #5918] [ruby-core:42199]

Mon Mar 11 12:25:12 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* Merge Onigmo d4bad41e16e3eccd97ccce6f1f96712e557c4518.
	  fix lookbehind assertion fails with /m mode enabled. [Bug #8023]
	  fix \Z matches where it shouldn't. [Bug #8001]

Mon Mar 11 11:53:35 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#dir_config, MakeMakefile#_libdir_basename):
	  defer use of instance variable until needed.  [Bug #8074]

Thu Mar  7 10:42:28 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* lib/thread.rb (Queue#clear): return self.
	  Patch by Cubing Cube. Thank you! [Bug #7947] [ruby-dev:47098]
	* lib/thread.rb (Queue#push): ditto.
	* lib/thread.rb (SizedQueue#push): ditto.
	* test/thread/test_queue.rb: add tests for the above.

Thu Mar  7 10:40:49 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* tool/change_maker.rb (#diff2index): check Encoding::BINARY.
	  BASERUBY may still be 1.8.x.

Thu Mar  7 08:47:42 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* NEWS (Mutex#owned?): no longer experimental.

Sun Mar 10 23:38:15 2013  Luis Lavena  <luislavena@gmail.com>

	* win32/file.c (rb_file_expand_path_internal):  Expand home directory when
	  used as second parameter (dir_string).  [ruby-core:53168] [Bug #8034]
	* test/ruby/test_file_exhaustive.rb: add test to verify.

Sun Mar 10 23:27:05 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  it is impossible to predict which file will be installed to where,
	  by the arguments, so use intermediate destination directory always.
	  [Bug #7698]

Sun Mar 10 17:00:22 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: edited rdoc.
	* rational.c: ditto.

Sun Mar 10 15:02:39 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* process.c (setup_communication_pipe): remove unused function.
	  it was unintentionally added r39683.

Wed Mar  6 00:30:40 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* tool/gen_ruby_tapset.rb: add tapset generator.

Wed Mar  6 03:27:43 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* probes.d (symbol-create): change argument name `string' to
	  `str'. `string' is a keyword for systemtap.

Tue Mar  5 22:23:01 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* probes.d: added argument name

Thu Mar  7 01:17:00 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/thread/test_queue.rb (TestQueue#test_thr_kill): reduce
	  iterations from 2000 to 250. When running on uniprocessor
	  systems, every th.kill needs TIME_QUANTUM_USEC time (i.e.
	  100msec on posix systems). Because, "r.read 1" is 3 steps
	  operations that 1) release GVL 2) read 3) acquire gvl and
	  (1) invoke context switch to main thread. and then, main
	  thread's th.kill resume (1), but not (2). Thus read interrupt
	  need TIME_QUANTUM_USEC. Then maximum iteration is 30sec/100msec
	  = 300.

Thu Mar  7 00:14:51 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c (rb_update_max_fd): use ATOMIC_CAS because this function
	  is used from timer thread too.

Wed Mar  6 23:30:21 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (ARRAY_SIZE): new.
	* thread_pthread.c (gvl_acquire_common): use low priority
	  notification for avoiding timer thread interval confusion.
	  If we use timer_thread_pipe[1], every gvl_yield() request
	  one more gvl_yield(). It lead to thread starvation.
	  [Bug #7999] [ruby-core:53095]
	* thread_pthread.c (rb_reserved_fd_p): adds timer_thread_pipe_low
	  to reserved fds.

Wed Mar  6 22:36:19 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (rb_thread_wakeup_timer_thread_fd): add fd
	  argument and remove hardcoded dependency of timer_thread_pipe[1].
	* thread_pthread.c (consume_communication_pipe): add fd argument.
	* thread_pthread.c (close_communication_pipe): ditto.

	* thread_pthread.c (timer_thread_sleep): adjust the above changes.

	* thread_pthread.c (setup_communication_pipe_internal): factor
	  out pipe initialize logic.

Wed Mar  6 22:56:14 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (ubf_select): add to small comments why we
	  need to call rb_thread_wakeup_timer_thread().

Wed Mar  6 21:42:24 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (rb_thread_create_timer_thread): factor out
	  creating communication pipe logic into separate function.
	* thread_pthread.c (setup_communication_pipe): new helper function.
	* thread_pthread.c (set_nonblock): moves a definition before
	  setup_communication_pipe.

Sun Mar  3 02:42:29 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (consume_communication_pipe): retry when
	  read returned CCP_READ_BUFF_SIZE.

Wed Mar  6 21:31:35 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (timer_thread_sleep): use poll() instead of
	  select(). select doesn't work if timer_thread_pipe[0] is
	  greater than FD_SETSIZE.
	* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): add a dependency
	  against poll.

Wed Mar  6 21:00:23 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
	  ifdef conditions.

Sun Mar  3 02:30:36 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (set_nonblock): new helper function for set
	  O_NONBLOCK.
	* thread_pthread.c (rb_thread_create_timer_thread): set O_NONBLOCK
	  to timer_thread_pipe[0] too.

Sun Mar 10 09:12:51 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c: described syntax of string form.
	* rational.c: ditto.

Sat Mar  9 11:58:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_extended): check for prepended object.
	  [ruby-core:53206] [Bug #8043]

Sat Mar  9 08:36:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* load.c (features_index_add_single, rb_feature_p): store single index
	  as Fixnum to reduce the number of arrays for the indexes.  based on
	  the patch by tmm1 (Aman Gupta) in [ruby-core:53216] [Bug #8048].

Sat Mar  9 00:25:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_object0): load prepended objects.  treat the class of
	  extended object in the included modules as prepended singleton
	  class. [ruby-core:53202] [Bug #8041]

Fri Mar  8 19:44:00 2013  Akinori MUSHA  <knu@iDaemons.org>

	* man/rake.1, man/ruby.1: Use the Pa macro to make URLs stand out.

Fri Mar  8 13:20:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/pathname/pathname.c (path_f_pathname): rdoc for Pathname()

Fri Mar  8 12:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* man/rake.1: Document ENVIRONMENT variables on RAKE(1) manpage

Fri Mar  8 10:44:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/webrick/httpproxy.rb: Fix typos in HTTPProxyServer [Bug #8013]
	  Patch by Nobuhiro IMAI [ruby-core:53127]

Fri Mar  8 03:16:15 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* class.c (rb_mod_ancestors): Include singleton_class in ancestors
	  list [Feature #8035]

	* test/ruby/test_module.rb (class): test for above

	* test/ruby/marshaltestlib.rb (module): adapt test

	* NEWS: list change

Thu Mar  7 14:21:37 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_compile_each): pass keyword arguments to zsuper,
	  with current values.  [ruby-core:53114] [Bug #8008]

Thu Mar  7 12:53:47 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/setup_command.rb:  Install .pem files.
	* test/rubygems/test_gem_commands_setup_command.rb:  Test for the
	  above.

	* lib/rubygems/spec_fetcher.rb:  Test HTTPS upgrade with URI::HTTPS,
	  not URI::HTTP.  Fixes bug in automatic HTTPS upgrade.
	* test/rubygems/test_gem_spec_fetcher.rb:  Test for the above.

	* lib/rubygems.rb:  Version 2.0.2

	* lib/rubygems/test_utilities.rb:  Ensure scheme and uri class match.

Thu Mar  7 10:39:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (gem): Gem.ensure_gem_subdirectories now has mode
	  option since r39607.  refix of r38870.

Wed Mar  6 13:14:28 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/test_gem_spec_fetcher.rb:  Removed unused variable.

Wed Mar  6 08:10:15 2013  Eric Hodel  <drbrain@segment7.net>

	* test/rubygems/test_require.rb:  Fix tests when 'a.rb' exists.
	  [ruby-trunk - Bug #7749]

Wed Mar  6 08:00:59 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Allow specification of directory permissions.
	  [ruby-trunk - Bug #7713]
	* test/rubygems/test_gem.rb:  Test for the above.

Wed Mar  6 07:40:21 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/query_command.rb:  Only fetch remote specs when
	  showing details.  [ruby-trunk - Bug #8019]  RubyGems bug #487
	* lib/rubygems/remote_fetcher.rb:  ditto.
	* lib/rubygems/security/policy.rb:  ditto.
	* test/rubygems/test_gem_commands_query_command.rb:  Test for the
	  above.

	* lib/rubygems/security.rb:  Make OpenSSL optional for RubyGems.
	* lib/rubygems/commands/cert_command.rb:  ditto.

	* lib/rubygems/config_file.rb:  Display file with YAML error, not
	  ~/.gemrc

	* lib/rubygems/remote_fetcher.rb:  Only create gem subdirectories when
	  installing gems.
	* lib/rubygems/dependency_resolver.rb:  ditto.
	* lib/rubygems/test_utilities.rb:  ditto.
	* test/rubygems/test_gem_commands_fetch_command.rb:  Test for the
	  above.

	* lib/rubygems/spec_fetcher.rb:  Only try to upgrade
	  http://rubygems.org to HTTPS
	* test/rubygems/test_gem_spec_fetcher.rb:  Test for the above.

	* lib/rubygems.rb:  Update win_platform? check for JRuby compatibility.

	* test/rubygems/test_gem_installer.rb:  Update for Ruby 1.9.2
	  compatibility

Wed Mar  6 01:19:28 2013  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* enumerator.c (enumerator_with_index, lazy_take): use INT2FIX(0)
	  instead of INT2NUM(0).

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.

	* ext/fiddle/function.c (function_call): ditto.

	* ext/openssl/ossl_x509store.c (ossl_x509store_initialize): ditto.

	* process.c (proc_getsid): ditto.

	* transcode.c (econv_finish): ditto.

Tue Mar  5 21:36:43 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_prepend_module): check redefinition of built-in optimized
	  methods.  [ruby-dev:47124] [Bug #7983]

	* vm.c (rb_vm_check_redefinition_by_prepend): ditto.

Tue Mar  5 20:29:25 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew): revert r39224.  [ruby-core:53038] [Bug #7988]

Tue Mar  5 20:23:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/intern.h (rb_check_arity): make a static inline
	  function so it can be used as an expression and argc would be
	  evaluated only once.

Tue Mar  5 12:30:55 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Bump version to 2.0.1 for upcoming bugfix release

	* lib/rubygems/ext/ext_conf_builder.rb:  Restore ruby 1.8 compatibility
	  for [Bug #7698]
	* test/rubygems/test_gem_installer.rb:  Ditto.

	* lib/rubygems/package.rb:  Restore ruby 1.8 compatibility.

	* test/rubygems/test_gem_dependency_installer.rb:  Fix warnings

Tue Mar  5 12:24:23 2013  Eric Hodel  <drbrain@segment7.net>

	* enumerator.c (enumerator_with_index):  Restore handling of a nil memo
	  from r39594.

Tue Mar  5 10:40:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/objspace/objspace.c (count_nodes): count also newly added nodes,
	  and fix key for unknown node.  patch by tmm1 (Aman Gupta) in
	  [ruby-core:53130] [Bug #8014]

Tue Mar  5 10:20:16 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enumerator.c (enumerator_with_index_i): allow Bignum as offset, to
	  get rid of conversion exception and integer overflow.
	  [ruby-dev:47131] [Bug #8010]

	* numeric.c (rb_int_succ, rb_int_pred): shortcut optimization for
	  Bignum.

Tue Mar  5 10:02:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  clear DESTDIR so RUBYARCHDIR and RUBYLIBDIR are not be overridden.
	  [Bug #7698]

Mon Mar  4 15:33:40 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  fix for unusual cases again.  install to a temporary directory once
	  and move installed files to the destination directory, if it is same
	  as the current directory.  [Bug #7698]

Mon Mar  4 14:13:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
	  must appear after object files with newer versions of gcc.  patch by
	  tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Mon Mar  4 10:23:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* encoding.c: Typo in Encoding overview by Tom Wardrop [GH fixes #255]

Sun Mar  3 12:35:08 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#libpath_env): set runtime library path for
	  the case rpath is disabled.

Sun Mar  3 12:17:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb
	  (Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
	  circular dependencies in install-so too.  [ruby-core:52882]
	  [Bug #7698]

Sun Mar  3 07:33:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/socket/tcpserver.c: Grammar for TCPServer.new from r39554

Sun Mar  3 01:17:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rubygems/ext/ext_conf_builder.rb
	  (Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
	  circular dependencies for old style gems which locate extconf.rb on
	  the toplevel.  [ruby-core:53059] [ruby-trunk - Bug #7698]

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  use RUBYOPT instead of -r option, and revert some tests.  [Bug #7698]

	* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
	  revert use of temporary directory for build, to work some buggy
	  extconf.rb which cannot build outside the source directory.
	  [ruby-core:53056] [Bug #7698]

Sun Mar  3 00:04:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/depend (CPPFLAGS), lib/mkmf.rb (MakeMakefile#create_makefile):
	  define RUBY_EXPORT for static-linked-ext mswin.  [Bug #7960]

Sat Mar  2 22:49:47 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (ENCOBJS, EXTOBJS, config.h): definitions for
	  static-linked-ext.  [Bug #7960]

Sat Mar  2 17:34:19 2013  Tanaka Akira  <akr@fsij.org>

	* lib/webrick/utils.rb: use Socket.tcp_server_sockets to create server
	  sockets.
	  fix [Bug #7100] https://bugs.ruby-lang.org/issues/7100
	  reported by sho-h (Sho Hashimoto).

Sat Mar  2 02:45:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: typo in comment patch by Nami-Doc [Github fixes #253]

Sat Mar  2 01:33:17 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
	  v5.13.3 [Bug#7972] [Bug#7974]

Fri Mar  1 11:09:06 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/fileutils.rb:  Revert r34669 which altered the way
	  metaprogramming in FileUtils occurred.  [ruby-trunk - Bug #7958]

	* test/fileutils/visibility_tests.rb:  Refactored tests of FileUtils
	  options modules to expose bug found in #7958
	* test/fileutils/test_dryrun.rb:  ditto.
	* test/fileutils/test_nowrite.rb:  ditto.
	* test/fileutils/test_verbose.rb:  ditto.

Fri Mar  1 09:18:00 2013  Zachary Scott <zachary@zacharyscott.net>

	* lib/psych.rb: specify in rdoc what object is returned in parser
	  By Adam Stankiewicz [Github tenderlove/psych#133]

Fri Mar  1 07:21:41 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/ext/builder.rb:  Fix incompatibilities when installing
	  extensions.  Patch by Nobu.
	  [ruby-trunk - Bug #7698] [ruby-trunk - Bug #7971]
	* lib/rubygems/ext/ext_conf_builder.rb:  ditto.
	* lib/rubygems/installer.rb:  ditto.
	* test/rubygems/test_gem_ext_ext_conf_builder.rb:  Test for the above.
	* test/rubygems/test_gem_installer.rb:  ditto.

	* lib/rubygems/commands/sources_command.rb:  Prefer HTTPS over HTTP.
	* lib/rubygems/defaults.rb:  ditto
	* lib/rubygems/dependency_resolver.rb:  Ditto.
	* lib/rubygems/source.rb:  ditto.
	* lib/rubygems/spec_fetcher.rb:  ditto.
	* lib/rubygems/specification.rb:  ditto.
	* lib/rubygems/test_utilities.rb:  ditto.
	* test/rubygems/test_gem.rb:  Test for the above.
	* test/rubygems/test_gem_commands_sources_command.rb:  ditto.
	* test/rubygems/test_gem_dependency_resolver_api_set.rb:  ditto.
	* test/rubygems/test_gem_remote_fetcher.rb:  ditto.
	* test/rubygems/test_gem_source.rb:  ditto.
	* test/rubygems/test_gem_spec_fetcher.rb:  ditto.

Fri Mar 1 03:25:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/psych/lib/psych.rb: rdoc for Psych overview by Adam Stankiewicz
	  [Github tenderlove/psych#134]

Thu Feb 28 22:57:48 2013  Koichi Sasada  <ko1@atdot.net>

	* compile.c (iseq_compile_each): remove redundant trace(line)
	  instruction. for example, at the following script
	    def m()
	      p:xyzzy
	      1
	      2
	    end
	  compiler ignores `1' because there is no effect. However,
	  `trace(line)' instruction remains in bytecode.
	  This modification removes such redundant trace(line) instruction.

	* test/ruby/test_iseq.rb: add a test.

Thu Feb 28 22:23:27 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix
	  domain socket filename is bigger than sizeof(sun_path).
	  This limit is not rigid on some platforms such as Darwin and SunOS.

Thu Feb 28 21:33:01 2013  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in(AC_DISABLE_OPTION_CHECKING): avoid warning "WARNING:
	  Unrecognized options: --with-PACKAGE".

Thu Feb 28 20:22:04 2013  Koichi Sasada  <ko1@atdot.net>

	* iseq.c (iseq_data_to_ary): fix condition.
	  r34303 introduces a bug to avoid all line information from
	  a result of ISeq#to_a. This is a regression problem from 2.0.0p0.

	* test/ruby/test_iseq.rb: add a test of lines after ISeq#to_a.

Thu Feb 28 08:20:33 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/available_set.rb:  Undent for style

	* lib/rubygems/dependency_installer.rb:  Pick latest prerelease gem to
	  install.  Fixes RubyGems bug #468.
	* test/rubygems/test_gem_dependency_installer.rb:  Test for the above.

	* lib/rubygems/dependency_installer.rb:  Don't display "Done installing
	  documentation" if documentation will not be installed.
	* lib/rubygems/rdoc.rb:  ditto

	* lib/rubygems/dependency_list.rb:  Use Array#concat for Ruby 1.x
	  performance.

	* lib/rubygems/installer.rb:  Use formatted program name when comparing
	  executables.  RubyGems pull request #471
	* test/rubygems/test_gem_installer.rb:  Test for the above.

	* lib/rubygems/package.rb:  Use more explicit feature check to work
	  around JRuby bug #552

	* lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem:  Added GeoTrust root
	  certificate.

	* test/rubygems/test_gem_source_list.rb:  Use "example" instead of real
	  hostname

Thu Feb 28 05:57:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: rdoc formatting for Thread, ThreadGroup, and ThreadError

Thu Feb 28 02:42:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm.c: Typo in overview for example of Thread#status returning false
	  Reported by Lee Jarvis

Wed Feb 27 22:54:27 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/rubysocket.h (union_sockaddr): make it longer for SunOS
	  and Darwin.

Wed Feb 27 21:14:34 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/security.rb (REXML::Security): create.
	* lib/rexml/rexml.rb: move entity_expansion_limit and
	  entity_expansion_text_limit accessors to ...
	* lib/rexml/security.rb: ... here.
	* lib/rexml/document.rb: use REXML::Security.
	* lib/rexml/text.rb: use REXML::Security.
	* test/rexml/test_document.rb: use REXML::Security.

Wed Feb 27 19:53:32 2013  Benoit Daloze  <eregontp@gmail.com>

	* vm.c (Thread): fix typos in overview

Wed Feb 27 13:21:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm.c (Thread): Typo in overview, swap setting and getting

Wed Feb 27 13:02:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm.c (Thread): Documentation overview of Thread class

Wed Feb 27 12:57:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c (rb_thread_wakeup): rdoc formatting

Wed Feb 27 12:53:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c (rb_thread_group): rdoc formatting

Wed Feb 27 12:33:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/ostruct.rb: Typo in OpenStruct overview [Github Fixes #251]
	  Patch by Chun-wei Kuo

Wed Feb 27 12:13:32 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_exec.h (END_INSN): llvm-gcc may optimize out reg_cfp and cause
	  Stack/cfp consistency error when the instruction doesn't use reg_cfp.
	  Usually instructions use PUSH() but for example trace doesn't.
	  This hack cause speed down but you shouldn't use llvm-gcc, use clang.
	  [Bug #7938]

Wed Feb 27 10:23:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c (thread_raise_m): rdoc formatting

Tue Feb 26 23:32:44 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb: move entity_expansion_limit accessor to ...
	* lib/rexml/rexml.rb: ... here for consistency.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_limit):
	  deprecated.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_limit=):
	  deprecated.

Tue Feb 26 23:26:13 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb: move entity_expansion_text_limit accessor to ...
	* lib/rexml/rexml.rb: ... here to make rexml/text independent from
	  REXML::Document. It causes circular require.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  deprecated.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit=):
	  deprecated.
	* lib/rexml/text.rb: add missing require "rexml/rexml" for
	  REXML.entity_expansion_text_limit.
	  Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961]

Tue Feb 26 15:12:11 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/mkconfig.rb: reconstruct comma separated list values.  a
	  command line to Windows batch file is split not only by spaces
	  and equal signs but also by commas and semicolons.

Tue Feb 26 15:04:19 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (unexpand_shvar): get rid of non-portable shell
	  behavior on OpenBSD, so no extra quotes.  [Bug #7959]

Tue Feb 26 10:24:49 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just
	  after method definition without a parenthesis.  [ruby-core:52820]
	  [Bug #7942]

Tue Feb 26 04:50:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* error.c: clarify reason for sleep in SignalException example

Tue Feb 26 03:47:00 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* error.c: clarify a document of SignalException. Process.kill()
	  doesn't have any guarantee when signal will be delivered.
	  [Bug #7951] [ruby-core:52864]

Mon Feb 25 23:51:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/version.h: bump RUBY_API_VERSION same as RUBY_VERSION.

Mon Feb 25 21:03:34 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* string.c (str_byte_substr): don't set coderange if it's not known.
	  [Bug #7954] [ruby-dev:47108]

Mon Feb 25 16:47:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (realclean-local): miniprelude.c is made by srcs, so it
	  should not removed by distclean but by realclean.  [Bug #6807]

Mon Feb 25 16:30:30 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/config_file.rb:  Lazily load .gem/credentials to only
	  check permissions when necessary.  RubyGems bug #465
	* test/rubygems/test_gem_config_file.rb:  Test for the above.

	* test/rubygems/test_gem_commands_push_command.rb:  Remove duplicated
	  test.

Mon Feb 25 15:47:18 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enc/depend (ARFLAGS): VisualC++ linker does not allow spaces between
	  output option and the output file name.  [Bug #7950]

	* enc/depend (RANLIB): set default command to do nothing, or make the
	  entire line a label on Windows.

Mon Feb 25 14:41:07 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#init_mkmf): default libdirname to libdir.

	* tool/rbinstall.rb: ditto.

Mon Feb 25 13:12:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (setup): find Setup file from target_os 1. by
	  suffix (e.g. Setup.nacl, Setup.atheos), 2. by "platform"
	  option (e.g. Setup.nt, Setup.emx), and 3. default Setup.  And
	  Setup.dj had been removed.

Mon Feb 25 12:48:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Document Thread::new, clean up ::fork and mention calling
	  super if subclassing Thread

Mon Feb 25 12:38:50 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: don't test ss_family and ss_len member of
	  struct sockaddr_storage.  They are not used now except SunOS
	  specific code.

Mon Feb 25 11:03:38 2013  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in (unexpand_shvar): Use the numeric comparison
	  operator instead of '==' which is a ksh extension. [Bug #7941]

Mon Feb 25 02:37:56 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket: define and use union_sockaddr instead of struct
	  sockaddr_storage for less casts.

	* ext/socket/rubysocket.h (union_sockaddr): defined.

	* ext/socket/socket.c (sock_accept): use union_sockaddr.
	  (sock_accept_nonblock): ditto.
	  (sock_sysaccept): ditto.
	  (sock_s_getnameinfo): ditto.

	* ext/socket/basicsocket.c (bsock_getsockname): ditto.
	  (bsock_getpeername): ditto.
	  (bsock_local_address): ditto.
	  (bsock_remote_address): ditto.

	* ext/socket/ancdata.c (bsock_recvmsg_internal): ditto.

	* ext/socket/init.c (recvfrom_arg): ditto.
	  (recvfrom_blocking): ditto.
	  (rsock_s_recvfrom): ditto.
	  (rsock_s_recvfrom_nonblock): ditto.
	  (rsock_getfamily): ditto.

	* ext/socket/raddrinfo.c (rb_addrinfo_t): ditto.
	  (ai_get_afamily): ditto.
	  (inspect_sockaddr): ditto.
	  (addrinfo_mdump): ditto.
	  (addrinfo_mload): ditto.
	  (addrinfo_getnameinfo): ditto.
	  (addrinfo_ip_port): ditto.
	  (extract_in_addr): ditto.
	  (addrinfo_ipv6_to_ipv4): ditto.
	  (addrinfo_unix_path): ditto.

	* ext/socket/tcpserver.c (tcp_accept): ditto.
	  (tcp_accept_nonblock): ditto.
	  (tcp_sysaccept): ditto.

	* ext/socket/ipsocket.c (ip_addr): ditto.
	  (ip_peeraddr): ditto.
	  (ip_s_getaddress): ditto.

Sun Feb 24 21:15:05 2013  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:52303]

Sun Feb 24 15:33:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rb_random_ulong_limited): limit is inclusive, but generic
	  rand method should return a number less than it, so increase for the
	  difference.  [ruby-core:52779] [Bug #7935]

Sun Feb 24 15:32:36 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rb_random_ulong_limited): limit is inclusive, but generic
	  rand method should return a number less than it, so increase for the
	  difference.  [ruby-core:52779] [Bug #7935]

Sun Feb 24 15:14:43 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Removed duplicate Accept-Encoding in Net::HTTP#get.
	  [ruby-trunk - Bug #7924]
	* test/net/http/test_http.rb:  Test for the above.

Wed Feb 20 14:28:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Document ThreadGroup::Default

Wed Feb 20 14:23:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Grammar for #backtrace_locations and ::handle_interrupt

Sun Feb 24 13:35:57 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_call_method): block level control frame does not
	  have method entry, so obtain the method entry from method top-level
	  control frame to be compared with refined method entry.
	  [ruby-core:52750] [Bug #7925]

Wed Feb 20 13:23:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c: Document methods receiving string and convert to symbol
	  Patch by Stefan Rusterholz
	* vm_eval.c: ditto
	* vm_method.c: ditto

Wed Feb 20 07:20:56 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (sigsegv): suppress unused result warning. Because
	  write(2) is marked __warn_unused_result__ on Linux glibc.

Sun Feb 24 07:50:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compile.c (iseq_set_arguments): no keyword check if any keyword rest
	  argument exists, even unnamed.  [ruby-core:52744] [Bug #7922]

Sat Feb 23 16:51:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Documentation for Thread#backtrace_locations

Sat Feb 23 16:05:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm.c: Typo in ObjectSpace::WeakMap overview

Sat Feb 23 16:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* thread.c: Improved rdoc for ::handle_interrupt, ::pending_interrupt?
	  and #pending_interrupt?

Sat Feb 23 12:26:43 2013  Akinori MUSHA  <knu@iDaemons.org>

	* misc/ruby-electric.el (ruby-electric-curlies)
	  (ruby-electric-matching-char, ruby-electric-bar): Avoid electric
	  insertion when there is a prefix argument.

	* misc/ruby-electric.el (ruby-electric-insert)
	  (ruby-electric-cua-replace-region-p)
	  (ruby-electric-cua-replace-region): Avoid electric insertion and
	  fall back when cua-mode is enabled and a region is active.

Sat Feb 23 12:35:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c: Document #<=> return values and formatting
	* bignum.c: ditto
	* file.c: ditto
	* object.c: ditto
	* numeric.c: ditto
	* rational.c: ditto
	* string.c: ditto
	* time.c: ditto

Sat Feb 23 10:50:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order
	  [RubySpec #7803]

Sat Feb 23 10:17:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c (rb_obj_comp): Documenting Object#<=> return values
	  Patch by Stefan Rusterholz

Sat Feb 23 09:48:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (file_s_fnmatch, fnmatch_brace): encoding-incompatible pattern
	  and string do not match, instead of exception.  [ruby-dev:47069]
	  [Bug #7911]

Sat Feb 23 08:57:46 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* doc/NEWS-*: Update NEWS from their respective branches

Sat Feb 23 08:14:43 2013  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* NEWS: many additions for Ruby 2.0.0

	* object.c: Add doc for Module.prepended

Sat Feb 23 07:52:53 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* template/ruby.pc.in: reorder library flags which may refer library
	  names.  [Bug #7913]

Fri Feb 22 23:46:20 2013  CHIKANAGA Tomoyuki  <nagachika@ruby-lang.org>

	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  fix a typo in comment in r39384.

Fri Feb 22 18:31:46 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  new attribute to read/write entity expansion text limit.  the default
	  limit is 10Kb.

	* lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.

Fri Feb 22 17:36:23 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/test_rbconfig.rb (TestRbConfig): fix r39372.
	  It must see RbConfig::CONFIG instead of CONFIG.

Fri Feb 22 14:55:41 2013  Naohisa Goto  <ngotogenome@gmail.com>

	* signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Fri Feb 22 12:46:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rb_random_ulong_limited): fix error message for negative
	  value.  [ruby-dev:47061] [Bug #7903]

Fri Feb 22 11:36:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/test_rbconfig.rb (TestRbConfig): skip user defined values by
	  configuration options.  [Bug #7902]

Fri Feb 22 11:33:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#init_mkmf): adjust default library path
	  for multiarch.  [Bug #7874]

Fri Feb 22 11:10:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* enum.c (Enumerable#chunk: Improved examples, grammar, and formatting
	  Patch by Dan Bernier and Rich Bruchal of newhaven.rb
	  [Github documenting-ruby/ruby#8]

Fri Feb 22 11:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* numeric.c: Examples and formatting for Numeric and Float
	  Based on a patch by Zach Morek and Oren K of newhaven.rb
	  [Github documenting-ruby/ruby#5]

Fri Feb 22 07:04:41 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/installer.rb (build_extensions):  Create extension
	  install destination before building extension.  Patch by Kenta Murata.
	  [ruby-trunk - Bug #7897]
	* test/rubygems/test_gem_installer.rb:  Test for the above.

Fri Feb 22 06:30:57 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/globals.rdoc:  Document what setting $DEBUG does.

	* doc/globals.rdoc:  Added pointer to $-d for full documentation.

Fri Feb 22 06:27:07 2013  Eric Hodel  <drbrain@segment7.net>

	* doc/globals.rdoc:  Document what setting $VERBOSE does.  [Bug #7899]

	* doc/globals.rdoc:  Added pointer to $-w and $-v for full
	  documentation.

Fri Feb 22 02:33:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/abbrev.rb: Add words parameter to Abbrev::abbrev
	  Patch by Devin Weaver [Github documenting-ruby/ruby#7]

Thu Feb 21 17:28:14 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/merger.rb: add interaction when only ChangeLog is modified.

Thu Feb 21 16:34:46 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* signal.c (check_stack_overflow): extract duplicated code and get rid
	  of declaration-after-statement.  [Bug #5014]

Thu Feb 21 14:14:13 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (sigsegv): avoid to use async signal unsafe functions
	  when nested sigsegv is happen.
	  [Bug #5014] [ruby-dev:44082]

Thu Feb 21 13:47:59 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (rb_group_member): added an error check. SUS says,
	  getgroups(small_value) may return EINVAL.

Thu Feb 21 13:37:07 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* process.c (RB_MAX_GROUPS): moved to
	* internal.h (RB_MAX_GROUPS): here.

	* file.c (rb_group_member): use RB_MAX_GROUPS instead of
	  RUBY_GROUP_MAX. They are the same.

Thu Feb 21 13:15:40 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (access_internal): removed.
	* file.c (rb_file_readable_real): use access() instead of
	  access_internal().
	* file.c (rb_file_writable_real): ditto.
	* file.c (rb_file_executable_real): ditto.

Thu Feb 21 13:04:59 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (eaccess): use access() when not using setuid nor setgid.
	  This is minor optimization.

Thu Feb 21 12:56:19 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* file.c (rb_group_member): get rid of NGROUPS dependency.
	  [Bug #7886] [ruby-core:52537]

Thu Feb 21 12:45:03 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (ruby_init_loadpath_safe): try two levels upper for stripping
	  libdir name.  [Bug #7874]

	* configure.in (libdir_basename): expand with multiarch in configure,
	  not to defer the expansion till ruby.pc.in and mkmf.rb.  [Bug #7874]

	* configure.in (libdir_basename): also -rpath and -install_name flags
	  are affected when libruby directory changes.  [Bug #7874]

Wed Feb 20 19:27:02 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/ruby.h (HAVE_RB_SCAN_ARGS_OPTIONAL_HASH): for
	  rb_scan_args() optional hash feature.  [Bug #7861]

Wed Feb 20 18:02:26 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (target_os): do not strip -gnu suffix on Linux if
	  --target is given explicitly.  [Bug #7874]

	* configure.in (libdirname): adjust library path name which libruby
	  files will be installed.  [Bug #7874]

	* tool/rbinstall.rb (libdir): ditto.

Wed Feb 20 13:37:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/pty/pty.c: Documentation for the PTY module

Wed Feb 20 12:18:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c: Document Data class [Bug #7890] [ruby-core:52549]
	  Patch by Matthew Mongeau

Wed Feb 20 11:50:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/mutex_m.rb: Add rdoc for Mutex_m module

Wed Feb 20 09:34:43 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/commands/update_command.rb:  Create the installer after
	  options are processed.  [ruby-trunk - Bug #7779]
	* test/rubygems/test_gem_commands_update_command.rb:  Test for the
	  above.

Wed Feb 20 07:51:19 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/installer.rb:  Use gsub instead of gsub! to avoid
	  altering @bin_dir.  Fixes tests on windows.  [ruby-trunk - Bug #7885]

Tue Feb 19 20:50:00 2013  Kenta MURATA  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.gemspec: bump to 1.2.0.
	  [ruby-core:51777] [Bug #7761]

Tue Feb 19 13:07:25 2013  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syslog/syslog.c (Init_syslog): Define inspect as a singleton
	  method and remove it as an instance method. [Bug #6502]

Tue Feb 19 12:30:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* object.c: rdoc formatting for Kernel#Array()
	* array.c: Add rdoc for Array() method to Creating Arrays section

Tue Feb 19 10:35:52 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl.c (class OpenSSL):  Use only inner parenthesis in
	  create_extension examples.

Tue Feb 19 10:27:12 2013  Eric Hodel  <drbrain@segment7.net>

	* ext/openssl/ossl.c (class OpenSSL):  Fixed ExtensionFactory example.
	  Patch by Richard Bradley.  [ruby-trunk - Bug #7551]

Tue Feb 19 08:32:11 2013  Koichi Sasada  <ko1@atdot.net>

	* vm_eval.c (vm_call0_body): check interrupts after method dispatch
	  from C methods. [Bug #7878]

Tue Feb 19 08:14:40 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/installer.rb:  Fixed placement of executables with
	  --user-install.  [ruby-trunk - Bug #7779]
	* test/rubygems/test_gem_installer.rb:  Test for above.

Tue Feb 19 06:04:06 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* vm_dump: FreeBSD ports' libexecinfo's backtrace(3) can't trace
	  beyond signal trampoline, and as described in r38342 it can't
	  trace on -O because it see stack frame pointers.
	  libunwind unw_backtrace see dwarf information in the binary
	  and it works with -O (without frame pointers).

	* configure.in: remove r38342's hack and check libunwind.

Tue Feb 19 04:26:29 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* configure.in: check whether backtrace(3) works well or not.

	* vm_dump.c: set HAVE_BACKTRACE 0 if BROKEN_BACKTRACE.

Mon Feb 18 16:30:18 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/ipaddr.rb (IPAddr#in6_addr): Fix a typo with the closing
	  parenthesis.

Mon Feb 18 12:32:24 2013  Akinori MUSHA  <knu@iDaemons.org>

	* lib/ipaddr.rb (IPAddr#in6_addr): Fix the parser so that it can
	  recognize IPv6 addresses with only one edge 16-bit piece
	  compressed, like [::2:3:4:5:6:7:8] or [1:2:3:4:5:6:7::].
	  [Bug #7477]

Mon Feb 18 10:09:54 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (unexpand_shvar): regularize a shell variable by
	  unexpanding shell variables in it.

Sun Feb 17 20:55:44 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* compar.c (rb_invcmp): compare by inversed comparison, with preventing
	  from infinite recursion.  [ruby-core:52305] [Bug #7870]

	* string.c (rb_str_cmp_m), time.c (time_cmp): get rid of infinite
	  recursion.

Sun Feb 17 17:23:22 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: remove extra topdir in VPATH, which was in
	  win32/Makefile.sub for some reason and moved from there.
	  [ruby-dev:46998] [Bug #7864]

Sun Feb 17 01:19:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* ext/psych/lib/psych/y.rb: Document Kernel#y by Adam Stankiewicz
	  [Github tenderlove/psych#127]

Sun Feb 17 00:52:14 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* tool/mkconfig.rb: remove prefix from rubyarchdir.
	  r39267 expands variables, it changes expansion timing,
	  breaks RbConfig::CONFIG["includedir"] and building
	  extension libraries with installed ruby.

Sat Feb 16 20:51:17 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* vm.c (ENV_IN_HEAP_P): fix off-by-one error.

Sat Feb 16 20:47:16 2013  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in (LIBRUBY_DLDFLAGS): Fix a bug where --with-opt-dir
	  options given were not reflected to LIBRUBY_DLDFLAGS on many
	  platforms including Linux and other GNU-based systems, NetBSD,
	  AIX and BeOS.

Sat Feb 16 20:43:20 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/ancdata.c (rsock_recvmsg): ignore truncated part of
	  socket address returned from recvmsg().

	* ext/socket/init.c (recvfrom_blocking): ignore truncated part of
	  socket address returned from recvfrom().
	  (rsock_s_recvfrom_nonblock): ditto.

Sat Feb 16 20:05:26 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/ruby/test_thread.rb: fixed typo
	  patched by Hiroki Matsue via https://github.com/ruby/ruby/pull/248

Sat Feb 16 16:08:35 2013  Koichi Sasada  <ko1@atdot.net>

	* vm.c (rb_thread_mark): mark a working Proc of bmethod
	  (a method defined by define_method) even if the method was removed.
	  We could not trace working Proc object which represents the body
	  of bmethod if the method was removed (alias/undef/overridden).
	  Simply, it was mark miss.
	  This patch by Kazuki Tsujimoto. [Bug #7825]

	  NOTE: We can brush up this marking because we do not need to mark
	  `me' on each living control frame. We need to mark `me's
	  only if `me' was free'ed. This is future work after Ruby 2.0.0.

	* test/ruby/test_method.rb: add a test.

Sat Feb 16 15:45:56 2013  Koichi Sasada  <ko1@atdot.net>

	* proc.c (rb_binding_new_with_cfp): create binding object even if
	  the frame is IFUNC. But return a ruby-level binding to keep
	  compatibility.
	  This patch fix degradation introduced from r39067.
	  [Bug #7774] [ruby-dev:46960]

	* test/ruby/test_settracefunc.rb: add a test.

Sat Feb 16 13:40:13 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (shvar_to_cpp): do not substitute exec_prefix itself
	  with RUBY_EXEC_PREFIX, which cause recursive definition.
	  [ruby-core:52296] [Bug #7860]

Sat Feb 16 13:13:04 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/io-console.gemspec: bump to 0.4.2.  now explicitly
	  requires ruby 1.9.3 or later.  [Bug #7847]

	* ext/io/console/console.c (console_dev): compatibility with ruby 1.8.

	* ext/io/console/console.c (rawmode_opt, console_dev): compatibility
	  with ruby 1.9.  [ruby-core:52220] [Bug #7847]

Sat Feb 16 12:45:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: unexpand arch sitearch and exec_prefix values, so
	  directly specified bindir, libdir, rubyprefix, etc can be properly
	  substituted.  [ruby-core:52296] [Bug #7860]

Sat Feb 16 12:15:20 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* parse.y: add dtrace probe for symbol create.

	* probes.d: ditto

Sat Feb 16 09:27:37 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: don't test sys/feature_tests.h which is not
	  used now.
	  It was included in r7901 as "bug of gcc 3.0 on Solaris 8 ?".

Sat Feb 16 09:24:37 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: reorder header tests to consider inclusion
	  order in rubysocket.h.

Sat Feb 16 08:42:58 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in, ext/socket/extconf.rb: test netinet/in_systm.h in
	  ext/socket/extconf.rb instead of configure.in.

	  Originally, netinet/in_systm.h is included for NextStep, OpenStep,
	  and Rhapsody.  [ruby-core:1596]

Sat Feb 16 07:55:40 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: don't test xti.h here.

	* ext/socket/extconf.rb: test xti.h here.

	  Originally, xti.h is included for IRIX [ruby-core:14447].

Sat Feb 16 07:16:49 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: test struct sockaddr_un and its member,
	  sun_len.

	* ext/socket/sockport.h (INIT_SOCKADDR_UN): new macro defined.

	* ext/socket/socket.c (sock_s_pack_sockaddr_un): use INIT_SOCKADDR_UN.

	* ext/socket/unixsocket.c (rsock_init_unixsock): ditto.

	* ext/socket/raddrinfo.c (init_unix_addrinfo): ditto.
	  (addrinfo_mload): ditto.

Sat Feb 16 07:05:59 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/sockport.h (INIT_SOCKADDR_IN): don't need family
	  argument.  it is always AF_INET.

	* ext/socket/raddrinfo.c (make_inetaddr): follow INIT_SOCKADDR_IN
	  change.
	  (addrinfo_ipv6_to_ipv4): ditto.

Sat Feb 16 04:21:07 2013  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/extconf.rb: workaround for mswin/mingw build problem.
	  sendmsg emulation in win32/win32.c is not enough.

Sat Feb 16 00:19:20 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: use all all tested available headers for
	  have_func.

Fri Feb 15 22:21:37 2013  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in: Fix a bug introduced in r38342 that the cflagspat
	  substitution is messed up by the way CFLAGS and optflags are
	  modified, which affected FreeBSD and NetBSD/amd64 when
	  configured to use libexecinfo.  This bug resulted in CFLAGS and
	  CXXFLAGS in RbConfig::CONFIG having warnflags expanded in them,
	  forcing third-party C/C++ extensions to follow what warnflags
	  demands, like ANSI/ISO-C90 conformance.  ref [Bug #7101]

Fri Feb 15 20:29:11 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/sockport.h (SET_SIN_LEN): defined for strict-aliasing
	  rule.
	  (INIT_SOCKADDR_IN): ditto.

	* ext/socket/raddrinfo.c (make_inetaddr): use INIT_SOCKADDR_IN.
	  (addrinfo_ipv6_to_ipv4): ditto.

Fri Feb 15 18:24:48 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#try_run): bail out explicitly if cross
	  compiling, because it cannot work of course.

Fri Feb 15 12:34:58 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: test struct sockaddr_storage directly.

	* ext/socket/rubysocket.h: use HAVE_TYPE_STRUCT_SOCKADDR_STORAGE.

Fri Feb 15 12:26:13 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/getaddrinfo.c (GET_AI): don't cast 1st argument for
	  INIT_SOCKADDR.

Fri Feb 15 08:12:11 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/sockport.h (SET_SS_LEN): removed.
	  (SET_SIN_LEN): removed.
	  (INIT_SOCKADDR): new macro.

	* ext/socket/ancdata.c (extract_ipv6_pktinfo): use INIT_SOCKADDR.

	* ext/socket/raddrinfo.c (make_inetaddr): use INIT_SOCKADDR.
	  (addrinfo_ipv6_to_ipv4): ditto.

	* ext/socket/getaddrinfo.c (GET_AI): use INIT_SOCKADDR.

Fri Feb 15 07:49:27 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc.rb:  Update to release version of 4.0.0

	* lib/rubygems.rb:  Update to release version of 2.0.0

Fri Feb 15 07:07:27 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/sockport.h (SA_LEN): removed because unused now.
	  (SS_LEN): ditto.
	  (SIN_LEN): ditto.

Thu Feb 14 10:45:31 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_process.rb (test_setsid): Added a workaround for
	  MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]

Fri Feb 15 00:15:31 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/sockport.h (VALIDATE_SOCKLEN): new macro to validate
	  sa_len member of 4.4BSD socket address.

	* ext/socket/getnameinfo.c (getnameinfo): use VALIDATE_SOCKLEN,
	  instead of SA_LEN.

	* ext/socket/socket.c (sock_s_getnameinfo): use VALIDATE_SOCKLEN
	  instead of SS_LEN.

Thu Feb 14 22:25:54 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (sockaddr_len): extracted from sockaddr_obj.
	  (sockaddr_obj): add an argument to length of socket address.
	  (socket_s_ip_address_list): call sockaddr_obj with actual socket
	  address length if given, use sockaddr_len otherwise.

Thu Feb 14 20:11:23 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket: always operate length of socket address companion with
	  socket address.

	* ext/socket/rubysocket.h (rsock_make_ipaddr): add an argument for
	  socket address length.
	  (rsock_ipaddr): ditto.

	* ext/socket/ipsocket.c (ip_addr): pass length to rsock_ipaddr.
	  (ip_peeraddr): ditto.
	  (ip_s_getaddress): pass length to rsock_make_ipaddr.

	* ext/socket/socket.c (make_addrinfo): pass length to rsock_ipaddr.
	  (sock_s_getnameinfo): pass actual address length to rb_getnameinfo.
	  (sock_s_unpack_sockaddr_in): pass length to rsock_make_ipaddr.

	* ext/socket/init.c (rsock_s_recvfrom): pass length to rsock_ipaddr.
	  (rsock_s_recvfrom_nonblock): ditto.

	* ext/socket/tcpsocket.c (tcp_sockaddr): pass length to
	  rsock_make_ipaddr.

	* ext/socket/raddrinfo.c (make_ipaddr0): add an argument for socket
	  address length.  pass the length to rb_getnameinfo.
	  (rsock_ipaddr): ditto.
	  (rsock_make_ipaddr): add an argument for socket address length.
	  pass the length to make_ipaddr0.
	  (make_inetaddr): pass length to make_ipaddr0.
	  a local variable renamed.
	  (host_str): a local variable renamed.
	  (port_str): ditto.

Thu Feb 14 14:31:43 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Removed OpenSSL dependency from Net::HTTP.

	* test/net/http/test_http.rb:  Remove Zlib dependency from tests.
	* test/net/http/test_http_request.rb:  ditto.

Thu Feb 14 11:08:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (include_modules_at): detect cyclic prepend with original
	  method table.  [ruby-core:52205] [Bug #7841]

Thu Feb 14 10:30:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_method.c: call method_removed hook on called class, not on
	  prepending iclass.  [ruby-core:52207] [Bug #7843]

Thu Feb 14 10:05:57 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http:  Do not handle Content-Encoding when the user sets
	  Accept-Encoding.  This allows users to handle Content-Encoding for
	  themselves.  This restores backwards-compatibility with Ruby 1.x.
	  [ruby-trunk - Bug #7831]
	* lib/net/http/generic_request.rb:  ditto.
	* lib/net/http/response.rb:  ditto
	* test/net/http/test_http.rb:  Test for the above.
	* test/net/http/test_http_request.rb:  ditto.
	* test/net/http/test_httpresponse.rb:  ditto.

Thu Feb 14 08:18:47 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: don't define HAVE_SA_LEN and HAVE_SA_LEN.
	  use HAVE_STRUCT_SOCKADDR_SA_LEN and HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
	  instead.

Wed Feb 13 20:59:48 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: don't define socklen_t here, just test.

	* ext/socket/rubysocket.h: define socklen_t if not available.

Wed Feb 13 18:37:50 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (mnew): skip prepending modules and return the method bound
	  on the given class.  [ruby-core:52160] [Bug #7836]

Wed Feb 13 18:11:59 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* proc.c (method_original_name): new methods Method#original_name and
	  UnboundMethod#original_name.  [ruby-core:52048] [Bug #7806]
	  [EXPERIMENTAL]

	* proc.c (method_inspect): show the given name primarily, and
	  original_id if aliased.  [ruby-core:52048] [Bug #7806]

Wed Feb 13 17:56:39 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (warnflags): disable -Werror by default unless
	  development.  [ruby-core:52131] [Bug #7830]

Wed Feb 13 06:05:52 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Return BINARY strings from Gem.gzip and Gem.gunzip.
	  Fixes intermittent test failures.  RubyGems issue #450 by Jeremey
	  Kemper.
	* test/rubygems/test_gem.rb:  Test for the above.

Wed Feb 13 05:49:21 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: test functions just after struct members.

Tue Feb 12 12:02:35 2013  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: merge JSON 1.7.7.
	  This includes security fix. [CVE-2013-0269]
	  https://github.com/flori/json/commit/d0a62f3ced7560daba2ad546d83f0479a5ae2cf2
	  https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion

Mon Feb 11 23:08:48 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: enable rb_cv_page_size_log test for MirOS BSD.

Mon Feb 11 20:06:38 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: use -pthread on mirbsd*.

Mon Feb 11 16:07:09 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: add SOLIBS and LIBRUBY_SO definition for mirbsd*.

Mon Feb 11 13:17:20 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
	  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]

	* win32/Makefile.sub (config.status): site and vendor directories
	  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]

Mon Feb 11 12:31:25 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: move OS specific header/function knowledge before
	  automatic header tests.

Mon Feb 11 11:04:29 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: move the test for -march=i486 just after
	  RUBY_UNIVERSAL_ARCH/RUBY_DEFAULT_ARCH.

Sun Feb 10 23:42:26 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: test structure members just afdoc/alt-ruby21/NEWS000064400000030273150403130660007715 0ustar00iro@gmail.com>

	* vm_exec.h (DISPATCH_ARCH_DEPEND_WAY): use __asm__ __volatile__
	  instead of asm volatile.

Sun Feb 10 15:50:02 2013  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* gc.h (SET_MACHINE_STACK_END): use __volatile__ instead of volatile.

Sun Feb 10 14:25:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/rake/, lib/rake/doc/: Move Rake rdoc files to lib/rake

Sun Feb 10 12:10:25 2013  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: test headers at first.

Sun Feb  10 12:00:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* doc/rake/*: Removed stale Rake static files

Sun Feb  10 09:10:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* lib/pp.rb, lib/prettyprint.rb: Documentation for PP and PrettyPrint
	  Based on a patch by Vincent Batts [ruby-core:51253] [Bug #7656]

Sat Feb  9 21:11:21 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: move header files check to the beginning of
	  "header and library section".
	  test rlim_t with sys/types.h and sys/time.h for MirOS BSD.
	  sys/types.h and sys/time.h is guarded by #ifdef and the above
	  move is required for this change.

Sat Feb  9 17:45:58 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in, version.c: prevent duplicated load paths by empty
	  version string, it does not work right now.

Sat Feb  9 17:38:41 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: fix arch parameters in help message.  [Bug #7804]

Sat Feb  9 13:13:00 2013  Zachary Scott  <zachary@zacharyscott.net>

	* vm_trace.c: Note about TracePoint events set, and comment on
	  Kernel#set_trace_func to prefer new TracePoint API

Sat Feb  9 10:07:47 2013  Kazuki Tsujimoto  <kazuki@callcc.net>

	* BSDL: update copyright notice for 2013.

Sat Feb  9 09:24:38 2013  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/package/old.rb:  Fix behavior only on ruby 1.8.

	* lib/rubygems/package.rb:  Include checksums.yaml.gz signatures for
	  verification.
	* test/rubygems/test_gem_package.rb:  Test for the above.

Sat Feb  9 01:23:24 2013  Tanaka Akira  <akr@fsij.org>

	* test/fiddle/helper.rb: specify libc and libm locations for MirOS BSD.

	* test/dl/test_base.rb: ditto.

Fri Feb  8 23:25:33 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: change CFLAGS temporally to test
	  ARCH_FLAG="-march=i486".

Fri Feb  8 21:19:41 2013  Tanaka Akira  <akr@fsij.org>

	* configure.in: don't define ARCH_FLAG="-march=i486" if it causes
	  compilation problem.

For the changes before 2.0.0, see doc/ChangeLog-2.0.0
For the changes before 1.9.3, see doc/ChangeLog-1.9.3
For the changes before 1.8.0, see doc/ChangeLog-1.8.0

Local variables:
coding: us-ascii
add-log-time-format: (lambda ()
  (let* ((time (current-time))
	 (system-time-locale "C")
	 (diff (+ (cadr time) 32400))
	 (lo (% diff 65536))
	 (hi (+ (car time) (/ diff 65536))))
  (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t)))
indent-tabs-mode: t
tab-width: 8
change-log-indent-text: 2
end:
vim: tabstop=8 shiftwidth=2
doc/alt-ruby21/NEWS000064400000030273150403130660007715 0ustar00# -*- rdoc -*-

= NEWS for Ruby 2.1.0

This document is a list of user visible feature changes made between
releases except for bug fixes.

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.

== Changes since the 2.0.0 release

=== Language changes

* Now the default values of keyword arguments can be omitted.  Those
  "required keyword arguments" need giving explicitly at the call time.

* Added suffixes for integer and float literals: 'r', 'i', and 'ri'.
  * "42r" and "3.14r" are evaluated as Rational(42, 1) and 3.14.rationalize,
    respectively.  But exponential form with 'r' suffix like "6.022e+23r" is
    not accepted because it is misleading.
  * "42i" and "3.14i" are evaluated as Complex(0, 42) and Complex(0, 3.14),
    respectively.
  * "42ri" and "3.14ri" are evaluated as Complex(0, 42r) and Complex(0, 3.14r),
    respectively.

* def-expr now returns the symbol of its name instead of nil.

=== Core classes updates (outstanding ones only)

* Array
  * New methods
    * Array#to_h converts an array of key-value pairs into a Hash.

* Binding
  * New methods
    * Binding#local_variable_get(symbol)
    * Binding#local_variable_set(symbol, obj)
    * Binding#local_variable_defined?(symbol)

* Enumerable
  * New methods
    * Enumerable#to_h converts a list of key-value pairs into a Hash.

* Exception
  * New methods
    * Exception#cause provides the previous exception which has been caught
      at where raising the new exception.

* GC
  * improvements:
    * introduced the generational GC a.k.a RGenGC.
  * added environment variables:
    * RUBY_GC_HEAP_INIT_SLOTS
    * RUBY_GC_HEAP_FREE_SLOTS
    * RUBY_GC_HEAP_GROWTH_FACTOR
    * RUBY_GC_HEAP_GROWTH_MAX_SLOTS
    * RUBY_GC_MALLOC_LIMIT_MAX
    * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR
    * RUBY_GC_OLDMALLOC_LIMIT
    * RUBY_GC_OLDMALLOC_LIMIT_MAX
    * RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
  * obsoleted environment variables:
    * RUBY_FREE_MIN (Use RUBY_GC_HEAP_FREE_SLOTS instead)
    * RUBY_HEAP_MIN_SLOTS (Use RUBY_GC_HEAP_INIT_SLOTS instead)

* Integer
  * New methods
    * Fixnum#bit_length
    * Bignum#bit_length
  * Bignum performance improvement
    * Use GMP if available.
      GMP is used only for several operations:
      multiplication, division, radix conversion, GCD

* IO
  * extended methods:
    * IO#seek supports SEEK_DATA and SEEK_HOLE as whence.
    * IO#seek accepts symbols (:CUR, :END, :SET, :DATA, :HOLE) for 2nd argument.
    * IO#read_nonblock accepts optional `exception: false` to return symbols
    * IO#write_nonblock accepts optional `exception: false` to return symbols

* Kernel
  * New methods:
    * Kernel#singleton_method

* Module
  * New methods:
    * Module#using, which activates refinements of the specified module only
      in the current class or module definition.
    * Module#singleton_class? returns true if the receiver is a singleton class
      or false if it is an ordinary class or module.
  * extended methods:
    * Module#refine is no longer experimental.
    * Module#include and Module#prepend are now public methods.

* Mutex
  * misc
    * Mutex#owned? is no longer experimental.

* Numeric
  * extended methods:
    * Numeric#step allows the limit argument to be omitted, in which
      case an infinite sequence of numbers is generated.  Keyword
      arguments `to` and `by` are introduced for ease of use.

* Process
  * New methods:
    * alternative methods to $0/$0=:
      * Process.argv0() returns the original value of $0.
      * Process.setproctitle() sets the process title without affecting $0.
    * Process.clock_gettime
    * Process.clock_getres

* String
  * "literal".freeze is now optimized to return the same object
  * New methods:
    * String#scrub and String#scrub! verify and fix invalid byte sequence.
      If you want to use this function with older Ruby,
      consider to use string-scrub.gem.

* Symbol
  * All symbols are now frozen.

* pack/unpack (Array/String)
  * Q! and q! directives for long long type if platform has the type.

* toplevel
  * extended methods:
    * main.using is no longer experimental. The method activates refinements
      in the ancestors of the argument module to support refinement
      inheritance by Module#include.

=== Core classes compatibility issues (excluding feature bug fixes)

* Dir
  * incompatible changes:
    * Dir#glob returns composed characters (previously Apple Modofied UTF-8).

* Hash
  * incompatible changes:
    * Hash#reject will return plain Hash object in the future versions, that
      is the original object's subclass, instance variables, default value,
      and taintedness will be no longer copied, so now warnings are emitted
      when called with such Hash.

* IO
  * incompatible changes:
    * open ignore internal encoding if external encoding is ASCII-8BIT.
  * IO#each_codepoint raises an exception at incomplete character
    before EOF when cdoc/alt-ruby21/NEWS000064400000030273150403130660007715 0ustar00show warnings.

* Module#ancestors
  * The ancestors of a singleton class now include singleton classes,
    in particular itself.

* Module#define_method and Object#define_singleton_method
  * Now they return the symbols of the defined methods, not the methods/procs
    themselves.

* Numeric#quo
  * Raises TypeError instead of ArgumentError if the receiver doesn't have
    to_r method.

* Proc
  * Returning from lambda proc now always exits from the Proc, not from the
    method where the lambda is created.  Returning from non-lambda proc exits
    from the method, same as the former behavior.

String
  * If invalid: :replace is specified for String#encode, replace
    invalid byte sequence even if the destination encoding equals to
    the source encoding.

=== Stdlib updates (outstanding ones only)

* CGI::Util
  * All class methods modulized.

* Digest
  * extended methods:
    * Digest::Class.file takes optional arguments for its constructor

* Matrix
  * Added Vector#cross_product.

* Net::SMTP
  * Added Net::SMTP#rset to implement the RSET command

* objspace
  * new method:
    * ObjectSpace.trace_object_allocations
    * ObjectSpace.trace_object_allocations_start
    * ObjectSpace.trace_object_allocations_stop
    * ObjectSpace.trace_object_allocations_clear
    * ObjectSpace.allocation_sourcefile
    * ObjectSpace.allocation_sourceline
    * ObjectSpace.allocation_class_path
    * ObjectSpace.allocation_method_id
    * ObjectSpace.allocation_generation
    * ObjectSpace.reachable_objects_from_root
    * ObjectSpace.dump
    * ObjectSpace.dump_all

* OpenSSL::BN
  * extended methods:
    * OpenSSL::BN.new allows Fixnum/Bignum argument.

* open-uri
  * Support multiple fields with same field name (like Set-Cookie).

* Pathname
  * New methods:
    * Pathname#write
    * Pathname#binwrite

* rake
  * Updated to 10.1.0.  Major changes include removal of the class namespace,
    Rake::DSL to hold the rake DSL methods and removal of support for legacy
    rake features.

    For a complete list of changes since rake 0.9.6 see:

    http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html

    http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html

* RbConfig
  * New constants:
    * RbConfig::SIZEOF is added to provide the size of C types.

* RDoc
  * Updated to 4.1.0.  Major enhancements include a modified default template
  * and accessibility enhancements.

    For a list of minor enhancements and bug fixes see:
    https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc

* Resolv
  * New methods:
    * Resolv::DNS.fetch_resource
  * One-shot multicast DNS support
  * Support LOC resources

* REXML::Parsers::SAX2Parser
  * Fixes wrong number of arguments of entitydecl event. Document of the event
    says "an array of the entity declaration" but implementation passes two
    or more arguments. It is an implementation bug but it breaks backward
    compatibility.

* REXML::Parsers::StreamParser
  * Supports "entity" event.

* REXML::Text
  * REXML::Text#<< supports method chain like 'text << "XXX" << "YYY"'.
  * REXML::Text#<< supports not "raw" mode.

* Rinda::RingServer, Rinda::RingFinger
  * Rinda now supports multicast sockets.  See Rinda::RingServer and
    Rindoc/alt-ruby21/COPYING.ja000064400000005100150403130670010632 0ustar00n to terminate the given block can no longer be rescued
    inside the block, by default, unless the exception class is given
    explicitly.

* TSort
  * New methods:
    * TSort.tsort
    * TSort.tsort_each
    * TSort.strongly_connected_components
    * TSort.each_strongly_connected_component
    * TSort.each_strongly_connected_component_from

* WEBrick
  * The body of a response may now be a StringIO or other IO-like that responds
    to #readpartial and #read.

* XMLRPC::Client
  * New methods:
    * XMLRPC::Client#http. It returns Net::HTTP for the client. Normally,
      it is not needed. It is useful when you want to change minor HTTP client
      options. You can change major HTTP client options by XMLRPC::Client
      methods. You should use XMLRPC::Client methods for changing major
      HTTP client options instead of XMLRPC::Client#http.

=== Stdlib compatibility issues (excluding feature bug fixes)

* Set
  * incompatible changes:
    * Set#to_set now returns self instead of generating a copy.

* URI
  * incompatible changes:
    * URI.decode_www_form follows current WHATWG URL Standard.
      It gets encoding argument to specify the character encoding.
      It now allows loose percent encoded strings, but denies ;-separator.
    * URI.encode_www_form follows current WHATWG URL Standard.
      It gets encoding argument to convert before percent encode.
      UTF-16 strings aren't converted to UTF-8 before percent encode by default.

* curses
  * Removed.
    curses is now available as a gem.
    See https://rubygems.org/gems/curses for details.

=== Built-in global variables compatibility issues

* $SAFE
  * $SAFE=4 is obsolete.  If $SAFE is set to 4 or larger, an ArgumentError
    is raised.

=== C API updates

* rb_gc_set_params() is deprecated. This is only used in Ruby internal.

* rb_gc_count() added. This returns the number of times GC occurred.

* rb_gc_stat() added. This allows access to specific GC.stat() values from C
  without any allocation overhead.

* rb_gc_latest_gc_info() added. This allows access to GC.latest_gc_info().

* rb_postponed_job_register() added. Takes a function callback which is invoked
  when the VM is in a consistent state, i.e. to perform work from a C signal
  handler.

* rb_profile_frames() added. Provides low-cost access to the current ruby stack
  for callstack profiling.

* rb_tracepoint_new() supports new internal events accessible only from C:
  * RUBY_INTERNAL_EVENT_NEWOBJ
  * RUBY_INTERNAL_EVENT_FREEOBJ
  * RUBY_INTERNAL_EVENT_GC_START
  * RUBY_INTERNAL_EVENT_GC_END_MARK
  * RUBY_INTERNAL_EVENT_GC_END_SWEEP
  * Note that ydoc/alt-ruby21/README.EXT000064400000140645150403130670010543 0ustar00本プログラムはフリーソフトウェアです.2-clause BSDL
または以下に示す条件で本プログラムを再配布できます
2-clause BSDLについてはBSDLファイルを参照して下さい.

  1. 複製は制限なく自由です.

  2. 以下の条件のいずれかを満たす時に本プログラムのソースを
     自由に変更できます.

     (a) ネットニューズにポストしたり,作者に変更を送付する
         などの方法で,変更を公開する.

     (b) 変更した本プログラムを自分の所属する組織内部だけで
         使う.

     (c) 変更点を明示したうえ,ソフトウェアの名前を変更する.
         そのソフトウェアを配布する時には変更前の本プログラ
         ムも同時に配布する.または変更前の本プログラムのソー
         スの入手法を明示する.

     (d) その他の変更条件を作者と合意する.

  3. 以下の条件のいずれかを満たす時に本プログラムをコンパイ
     ルしたオブジェクトコードや実行形式でも配布できます.

     (a) バイナリを受け取った人がソースを入手できるように,
         ソースの入手法を明示する.

     (b) 機械可読なソースコードを添付する.

     (c) 変更を行ったバイナリは名前を変更したうえ,オリジナ
         ルのソースコードの入手法を明示する.

     (d) その他の配布条件を作者と合意する.

  4. 他のプログラムへの引用はいかなる目的であれ自由です.た
     だし,本プログラムに含まれる他の作者によるコードは,そ
     れぞれの作者の意向による制限が加えられる場合があります.

     それらファイルの一覧とそれぞれの配布条件などに付いては
     LEGALファイルを参照してください.

  5. 本プログラムへの入力となるスクリプトおよび,本プログラ
     ムからの出力の権利は本プログラムの作者ではなく,それぞ
     れの入出力を生成した人に属します.また,本プログラムに
     組み込まれるための拡張ライブラリについても同様です.

  6. 本プログラムは無保証です.作者は本プログラムをサポート
     する意志はありますが,プログラム自身のバグあるいは本プ
     ログラムの実行などから発生するいかなる損害に対しても責
     任を持ちません.
doc/alt-ruby21/README.EXT000064400000140645150403130670010543 0ustar00# README.EXT -  -*- RDoc -*- created at: Mon Aug  7 16:45:54 JST 1995

This document explains how to make extension libraries for Ruby.

= Basic Knowledge

In C, variables have types and data do not have types.  In contrast,
Ruby variables do not have a static type, and data themselves have
types, so data will need to be converted between the languages.

Data in Ruby are represented by the C type `VALUE'.  Each VALUE data
has its data-type.

To retrieve C data from a VALUE, you need to:

1. Identify the VALUE's data type
2. Convert the VALUE into C data

Converting to the wrong data type may cause serious problems.

== Data-Types

The Ruby interpreter has the following data types:

T_NIL       :: nil
T_OBJECT    :: ordinary object
T_CLASS     :: class
T_MODULE    :: module
T_FLOAT     :: floating point number
T_STRING    :: string
T_REGEXP    :: regular expression
T_ARRAY     :: array
T_HASH      :: associative array
T_STRUCT    :: (Ruby) structure
T_BIGNUM    :: multi precision integer
T_FIXNUM    :: Fixnum(31bit or 63bit integer)
T_COMPLEX   :: complex number
T_RATIONAL  :: rational number
T_FILE      :: IO
T_TRUE      :: true
T_FALSE     :: false
T_DATA      :: data
T_SYMBOL    :: symbol

doc/alt-ruby21/COPYING.ja000064400000005100150403130670010632 0ustar00ck function

  void Check_Type(VALUE value, int type)

which raises an exception if the VALUE does not have the type
specified.

There are also faster check macros for fixnums and nil.

  FIXNUM_P(obj)
  NIL_P(obj)

== Convert VALUE into C Data

The data for type T_NIL, T_FALSE, T_TRUE are nil, false, true
respectively.  They are singletons for the data type.
The equivalent C constants are: Qnil, Qfalse, Qtrue.
Note that Qfalse is false in C also (i.e. 0), but not Qnil.

The T_FIXNUM data is a 31bit or 63bit length fixed integer.
This size is depend on the size of long: if long is 32bit then
T_FIXNUM is 31bit, if long is 64bit then T_FIXNUM is 63bit.
T_FIXNUM can be converted to a C integer by using the
FIX2INT() macro or FIX2LONG().  Though you have to check that the
data is really FIXNUM before using them, they are faster.  FIX2LONG()
never raises exceptions, but FIX2INT() raises RangeError if the
result is bigger or smaller than the size of int.
There are also NUM2INT() and NUM2LONG() which converts any Ruby
numbers into C integers.  These macros includes a type check,
so an exception will be raised if the conversion failed.  NUM2DBL()
can be used to retrieve the double float value in the same way.

You can use the macros
StringValue() and StringValuePtr() to get a char* from a VALUE.
StringValue(var) replaces var's value with the result of "var.to_str()".
StringValuePtr(var) does same replacement and returns char*
representation of var.  These macros will skip the replacement if var
is a String.  Notice that the macros take only the lvalue as their
argument, to change the value of var in place.

You can also use the macro named StringValueCStr(). This is just
like StringValuePtr(), but always add nul character at the end of
the result. If the result contains nul character, this macro causes
the ArgumentError exception.
StringValuePtr() doesn't guarantee the existence of a nul at the end
of the result, and the result may contain nul.

Other data types have corresponding C structures, e.g. struct RArray
for T_ARRAY etc. The VALUE of the type which has the corresponding
structure can be cast to retrieve the pointer to the struct.  The
casting macro will be of the form RXXXX for each data type; for
instance, RARRAY(obj).  See "ruby.h".  However, we do not recommend
to access RXXXX data directly because these data structure is complex.
Use corresponding rb_xxx() functions to access internal struct.
For example, to access an entry of array, use rb_ary_entry(ary, offset)
and rb_ary_store(ary, offset, obj).

There are some accessing macros for structure members, for example
`RSTRINdoc/alt-ruby21/README.EXT000064400000140645150403130670010543 0ustar00dy mentioned, it is not recommended to modify an object's
internal structure.  To manipulate objects, use the functions supplied
by the Ruby interpreter. Some (not all) of the useful functions are
listed below:

=== String Functions

rb_str_new(const char *ptr, long len) ::

  Creates a new Ruby string.

rb_str_new2(const char *ptr) ::
rb_str_new_cstr(const char *ptr) ::

  Creates a new Ruby string from a C string.  This is equivalent to
  rb_str_new(ptr, strlen(ptr)).

rb_tainted_str_new(const char *ptr, long len) ::

  Creates a new tainted Ruby string.  Strings from external data
  sources should be tainted.

rb_tainted_str_new2(const char *ptr) ::
rb_tainted_str_new_cstr(const char *ptr) ::

  Creates a new tainted Ruby string from a C string.

rb_sprintf(const char *format, ...) ::
rb_vsprintf(const char *format, va_list ap) ::

  Creates a new Ruby string with printf(3) format.

  Note: In the format string, %i is used for Object#to_s (or Object#inspect if
  '+' flag is set) output (and related argument must be a VALUE).  For integers
  in format strings, use %d.

rb_str_cat(VALUE str, const char *ptr, long len) ::

  Appends len bytes of data from ptr to the Ruby string.

rb_str_cat2(VALUE str, const char* ptr) ::

  Appends C string ptr to Ruby string str.  This function is
  equivalent to rb_str_cat(str, ptr, strlen(ptr)).

rb_str_catf(VALUE str, const char* format, ...) ::
rb_str_vcatf(VALUE str, const char* format, va_list ap) ::

  Appends C string format and successive arguments to Ruby string
  str according to a printf-like format.  These functions are
  equivalent to rb_str_cat2(str, rb_sprintf(format, ...)) and
  rb_str_cat2(str, rb_vsprintf(format, ap)), respectively.

rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) ::
rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc) ::

  Creates a new Ruby string with the specified encoding.

rb_usascii_str_new(const char *ptr, long len) ::
rb_usascii_str_new_cstr(const char *ptr) ::

  Creates a new Ruby string with encoding US-ASCII.

rb_str_resize(VALUE str, long len) ::

  Resizes Ruby string to len bytes.  If str is not modifiable, this
  function raises an exception.  The length of str must be set in
  advance.  If len is less than the old length the content beyond
  len bytes is discarded, else if len is greater than the old length
  the content beyond the old length bytes will not be preserved but
  will be garbage.  Note that RSTRING_PTR(str) may change by calling
  this function.

rb_str_set_len(VALUE str, long len) ::

  Sets the length of Ruby string.  If str is not modifiable, this
  function raises an exception.  This function preserves the content
  upto len bytes, regardless RSTRING_LEN(str).  len must not exceed
  the capacity of str.

=== Array Functions

rb_ary_new() ::

  Creates an array with no elements.

rb_ary_new2(long len) ::
rb_ary_new_capa(long len) ::

  Creates an array with no elements, allocating internal buffer
  for len elements.

rb_ary_new3(long n, ...) ::
rb_ary_new_from_args(long n, ...) ::

  Creates an n-element array from the arguments.

rb_ary_new4(long n, VALUE *elts) ::
rb_ary_new_from_values(long n, VALUE *elts) ::

  Creates an n-element array from a C array.

rb_ary_to_ary(VALUE obj) ::

  Converts the object into an array.
  Equivalent to Object#to_ary.

There are many functions to operate an array.  They may dump core if other
types are given.

rb_ary_aref(argc, VALUE *argv, VALUE ary) ::

  Equivalent to Array#[].

rb_ary_entry(VALUE ary, long offset) ::

  ary[offset]

rb_ary_store(VALUE ary, long offset, VALUE obj) ::

  ary[offset] = obj

rb_ary_subseq(VALUE ary, long beg, long len) ::

  ary[beg, len]

rb_ary_push(VALUE ary, VALUE val) ::
rb_ary_pop(VALUE ary) ::
rb_ary_shift(VALUE ary) ::
rb_ary_unshift(VALUE ary, VALUE val) ::

rb_ary_cat(VALUE ary, const VALUE *ptr, long len) ::

  Appends len elements of objects from ptr to the array.

= Extending Ruby with C

== Adding New Features to Ruby

You can add new features (classes, methods, etc.) to the Ruby
interpreter.  Ruby provides APIs for defining the following things:

* Classes, Modules
* Methods, Singleton Methods
* Constants

=== Class and Module Definition

To define a class or module, use the functions below:

  VALUE rb_define_class(const char *name, VALUE super)
  VALUE rb_define_module(const char *name)

These functions return the newly created class or module.  You may
want to save this reference into a variable to use later.

To define nested classes or modules, use the functions below:

  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
  VALUE rb_define_module_under(VALUE outer, const char *name)

=== Method and Singleton Method Definition

To define methods or singleton methods, use these functions:

  void rb_define_method(VALUE klass, const char *name,
		        VALUE (*func)(), int argc)

  void rb_define_singleton_method(VALUE object, const char *name,
			          VALUE (*func)(), int argc)

The `argc' represents the number of the arguments to the C function,
which must be less than 17.  But I doubt you'll need that many.

If `argc' is negative, it specifies the calling sequence, not number of
the arguments.

If argc is -1, the function will be called as:

  VALUE func(int argc, VALUE *argv, VALUE obj)

where argc is the actual number of arguments, argv is the C array of
the arguments, and obj is the receiver.

If argc is -2, the arguments are passed in a Ruby array. The function
will be called like:

  VALUE func(VALUE obj, VALUE args)

where obj is the receiver, and args is the Ruby array containing
actual arguments.

There are some more functions to define methods. One takes an ID
as the name of method to be defined. See also ID or Symbol below.

  void rb_define_method_id(VALUE klass, ID name,
                           VALUE (*func)(ANYARGS), int argc)

There are two functions to define private/protected methods:

  void rb_define_private_method(VALUE klass, const char *name,
			        VALUE (*func)(), int argc)
  void rb_define_protected_method(VALUE klass, const char *name,
			          VALUE (*func)(), int argc)

At last, rb_define_module_function defines a module functions,
which are private AND singleton methods of the module.
For example, sqrt is the module function defined in Math module.
It can be called in the following way:

  Math.sqrt(4)

or

  include Math
  sqrt(4)

To define module functions, use:

  void rb_define_module_function(VALUE module, const char *name,
				 VALUE (*func)(), int argc)

In addition, function-like methods, which are private methods defined
in the Kernel module, can be defined using:

  void rb_define_global_function(const char *name, VALUE (*func)(), int argc)

To define an alias for the method,

  void rb_define_alias(VALUE module, const char* new, const char* old);

To define a reader/writer for an attribute,

  void rb_define_attr(VALUE klass, const char *name, int read, int write)

To define and undefine the `allocate' class method,

  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
  void rb_undef_alloc_func(VALUE klass);

func has to take the klass as the argument and return a newly
allocated instance.  This instance should be as empty as possible,
without any expensive (including external) resources.

=== Constant Definition

We have 2 functions to define constants:

  void rb_define_const(VALUE klass, const char *name, VALUE val)
  void rb_define_global_const(const char *name, VALUE val)

The former is to define a constant under specified class/module.  The
latter is to define a global constant.

== Use Ruby Features from C

There are several ways to invoke Ruby's features from C code.

=== Evaluate Ruby Programs in a String

The easiest way to use Ruby's functionality from a C program is to
evaluate the string as Ruby program.  This function will do the job:

  VALUE rb_eval_string(const char *str)

Evaluation is done under the current context, thus current local variables
of the innermost method (which is defined by Ruby) can be accessed.

Note that the evaluation can raise an exception. There is a safer
function:

  VALUE rb_eval_string_protect(const char *str, int *state)

It returns nil when an error occur. Moreover, *state is zero if str was
successfully evaluated, or nonzero otherwise.

=== ID or Symbol

You can invoke methods directly, without parsing the string.  First I
need to explain about ID.  ID is the integer number to represent
Ruby's identifiers such as variable names.  The Ruby data type
corresponding to ID is Symbol.  It can be accessed from Ruby in the
form:

  :Identifier

or

  :"any kind of string"

You can get the ID value from a string within C code by using

  rb_intern(const char *name)
  rb_intern_str(VALUE name)

You can retrieve ID from Ruby object (Symbol or String) given as an
argument by using

  rb_to_id(VALUE symbol)
  rb_check_id(volatile VALUE *name)
  rb_check_id_cstr(const char *name, long len, rb_encoding *enc)

These functions try to convert the argument to a String if it was not
a Symbol nor a String.  The second function stores the converted
result into *name, and returns 0 if the string is not a known symbol.
After this function returned a non-zero value, *name is always a
Symbol or a String, otherwise it is a String if the result is 0.
The third function takes NUL-terminated C string, not Ruby VALUE.

You can convert C ID to Ruby Symbol by using

  VALUE ID2SYM(ID id)

and to convert Ruby Symbol object to ID, use

  ID SYM2ID(VALUE symbol)

=== Invoke Ruby Method from C

To invoke methods directly, you can use the function below

  VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)

This function invokes a method on the recv, with the method name
specified by the symbol mid.

=== Accessing the Variables and Constants

You can access class variables and instance variables using access
functions.  Also, global variables can be shared between both
environments.  There's no way to access Ruby's local variables.

The functions to access/modify instance variables are below:

  VALUE rb_ivar_get(VALUE obj, ID id)
  VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)

id must be the symbol, which can be retrieved by rb_intern().

To access the constants of the class/module:

  VALUE rb_const_get(VALUE obj, ID id)

See also Constant Definition above.

= Information Sharing Between Ruby and C

=== Ruby Constants That C Can Be Accessed From C

As stated in section 1.3,
the following Ruby constants can be referred from C.

  Qtrue
  Qfalse

Boolean values.  Qfalse is false in C also (i.e. 0).

  Qnil

Ruby nil in C scope.

== Global Variables Shared Between C and Ruby

Information can be shared between the two environments using shared global
variables.  To define them, you can use functions listed below:

  void rb_define_variable(const char *name, VALUE *var)

This function defines the variable which is shared by both environments.
The value of the global variable pointed to by `var' can be accessed
through Ruby's global variable named `name'.

You can define read-only (from Ruby, of course) variables using the
function below.

  void rb_define_readonly_variable(const char *name, VALUE *var)

You can defined hooked variables.  The accessor functions (getter and
setter) are called on access to the hooked variables.

  void rb_define_hooked_variable(const char *name, VALUE *var,
				 VALUE (*getter)(), void (*setter)())

If you need to supply either setter or getter, just supply 0 for the
hook you don't need.  If both hooks are 0, rb_define_hooked_variable()
works just like rb_define_variable().

The prototypes of the getter and setter functions are as follows:

  VALUE (*getter)(ID id, VALUE *var);
  void (*setter)(VALUE val, ID id, VALUE *var);


Also you can define a Ruby global variable without a corresponding C
variable.  The value of the variable will be set/get only by hooks.

  void rb_define_virtual_variable(const char *name,
				  VALUE (*getter)(), void (*setter)())

The prototypes of the getter and setter functions are as follows:

  VALUE (*getter)(ID id);
  void (*setter)(VALUE val, ID id);


== Encapsulate C Data into a Ruby Object

To wrap and objectify a C pointer as a Ruby object (so called
DATA), use Data_Wrap_Struct().

  Data_Wrap_Struct(klass, mark, free, sval)

Data_Wrap_Struct() returns a created DATA object.  The klass argument
is the class for the DATA object.  The mark argument is the function
to mark Ruby objects pointed by this data.  The free argument is the
function to free the pointer allocation.  If this is -1, the pointer
will be just freed.  The functions mark and free will be called from
garbage collector.

These mark / free functions are invoked during GC execution.  No
object allocations are allowed during it, so do not allocate ruby
objects inside them.

You can allocate and wrap the structure in one step.

  Data_Make_Struct(klass, type, mark, free, sval)

This macro returns an allocated Data object, wrapping the pointer to
the structure, which is also allocated.  This macro works like:

  (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))

Arguments klass, mark, and free work like their counterparts in
Data_Wrap_Struct().  A pointer to the allocated structure will be
assigned to sval, which should be a pointer of the type specified.

To retrieve the C pointer from the Data object, use the macro
Data_Get_Struct().

  Data_Get_Struct(obj, type, sval)

A pointer to the structure will be assigned to the variable sval.

See the example below for details.

= Example - Creating dbm Extension

OK, here's the example of making an extension library.  This is the
extension to access DBMs.  The full source is included in the ext/
directory in the Ruby's source tree.

== Make the Directory

  % mkdir ext/dbm

Make a directory for the extension library under ext directory.

== Design the Library

You need to design the library features, before making it.

== Write the C Code

You need to write C code for your extension library.  If your library
has only one source file, choosing ``LIBRARY.c'' as a file name is
preferred.  On the other hand, in case your library has multiple source
files, avoid choosing ``LIBRARY.c'' for a file name.  It may conflict
with an intermediate file ``LIBRARY.o'' on some platforms.
Note that some functions in mkmf library described below generate
a file ``conftest.c'' for checking with compilation.  You shouldn't
choose ``conftest.c'' as a name of a source file.

Ruby will execute the initializing function named ``Init_LIBRARY'' in
the library.  For example, ``Init_dbm()'' will be executed when loading
the library.

Here's the example of an initializing function.

  void
  Init_dbm(void)
  {
      /* define DBM class */
      cDBM = rb_define_class("DBM", rb_cObject);
      /* DBM includes Enumerable module */
      rb_include_module(cDBM, rb_mEnumerable);

      /* DBM has class method open(): arguments are received as C array */
      rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);

      /* DBM instance method close(): no args */
      rb_define_method(cDBM, "close", fdbm_close, 0);
      /* DBM instance method []: 1 argument */
      rb_define_method(cDBM, "[]", fdbm_fetch, 1);

      /* ... */

      /* ID for a instance variable to store DBM data */
      id_dbm = rb_intern("dbm");
  }

The dbm extension wraps the dbm struct in the C environment using
Data_Make_Struct.

  struct dbmdata {
      int  di_size;
      DBM *di_dbm;
  };

  obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);

This code wraps the dbmdata structure into a Ruby object.  We avoid
wrapping DBM* directly, because we want to cache size information.

To retrieve the dbmdata structure from a Ruby object, we define the
following macro:

  #define GetDBM(obj, dbmp) {\
      Data_Get_Struct(obj, struct dbmdata, dbmp);\
      if (dbmp->di_dbm == 0) closed_dbm();\
  }

This sort of complicated macro does the retrieving and close checking for
the DBM.

There are three kinds of way to receive method arguments.  First,
methods with a fixed number of arguments receive arguments like this:

  static VALUE
  fdbm_delete(VALUE obj, VALUE keystr)
  {
        /* ... */
  }

The first argument of the C function is the self, the rest are the
arguments to the method.

Second, methods with an arbitrary number of arguments receive
arguments like this:

  static VALUE
  fdbm_s_open(int argc, VALUE *argv, VALUE klass)
  {
      /* ... */
      if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
          mode = 0666;		/* default value */
      }
      /* ... */
  }

The first argument is the number of method arguments, the second
argument is the C array of the method arguments, and the third
argument is the receiver of the method.

You can use the function rb_scan_args() to check and retrieve the
arguments.  The third argument is a string that specifies how to
capture method arguments and assign them to the following VALUE
references.


The following is an example of a method that takes arguments by Ruby's
array:

  static VALUE
  thread_initialize(VALUE thread, VALUE args)
  {
      /* ... */
  }

The first argument is the receiver, the second one is the Ruby array
which contains the arguments to the method.

*Notice*: GC should know about global variables which refer to Ruby's objects,
but are not exported to the Ruby world.  You need to protect them by

  void rb_global_variable(VALUE *var)

== Prepare extconf.rb

If the file named extconf.rb exists, it will be executed to generate
Makefile.

extconf.rb is the file for checking compilation conditions etc.  You
need to put

  require 'mkmf'

at the top of the file.  You can use the functions below to check
various conditions.

  have_macro(macro[, headers[, opt]]): check whether macro is defined
  have_library(lib[, func[, headers[, opt]]]): check whether library containing function exists
  find_library(lib[, func, *paths]): find library from paths
  have_func(func[, headers[, opt]): check whether function exists
  have_var(var[, headers[, opt]]): check whether variable exists
  have_header(header[, preheaders[, opt]]): check whether header file exists
  find_header(header, *paths): find header from paths
  have_framework(fw): check whether framework exists (for MacOS X)
  have_struct_member(type, member[, headers[, opt]]): check whether struct has member
  have_type(type[, headers[, opt]]): check whether type exists
  find_type(type, opt, *headers): check whether type exists in headers
  have_const(const[, headers[, opt]]): check whether constant is defined
  check_sizeof(type[, headers[, opts]]): check size of type
  check_signedness(type[, headers[, opts]]): check signedness of type
  convertible_int(type[, headers[, opts]]): find convertible integer type
  find_executable(bin[, path]): find executable file path
  create_header(header): generate configured header
  create_makefile(target[, target_prefix]): generate Makefile

See MakeMakefile for full documentation of these functions.

The value of the variables below will affect the Makefile.

  $CFLAGS: included in CFLAGS make variable (such as -O)
  $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D)
  $LDFLAGS: included in LDFLAGS make variable (such as -L)
  $objs: list of object file names

Normally, the object files list is automatically generated by searching
source files, but you must define them explicitly if any sources will
be generated while building.

If a compilation condition is not fulfilled, you should not call
``create_makefile''.  The Makefile will not be generated, compilation will
not be done.

== Prepare Depend (Optional)

If the file named depend exists, Makefile will include that file to
check dependencies.  You can make this file by invoking

  % gcc -MM *.c > depend

It's harmless.  Prepare it.

== Generate Makefile

Try generating the Makefile by:

  ruby extconf.rb

If the library should be installed under vendor_ruby directory
instead of site_ruby directory, use --vendor option as follows.

  ruby extconf.rb --vendor

You don't need this step if you put the extension library under the ext
directory of the ruby source tree.  In that case, compilation of the
interpreter will do this step for you.

== Run make

Type

  make

to compile your extension.  You don't need this step either if you have
put the extension library under the ext directory of the ruby source tree.

== Debug

You may need to rb_debug the extension.  Extensions can be linked
statically by adding the directory name in the ext/Setup file so that
you can inspect the extension with the debugger.

== Done! Now You Have the Extension Library

You can do anything you want with your library.  The author of Ruby
will not claim any restrictions on your code depending on the Ruby API.
Feel free to use, modify, distribute or sell your program.

= Appendix A. Ruby Source Files Overview

== Ruby Language Core

class.c    :: classes and modules
error.c    :: exception classes and exception mechanism
gc.c       :: memory management
load.c     :: library loading
object.c   :: objects
variable.c :: variables and constants

== Ruby Syntax Parser

parse.y  :: grammar definition
parse.c  :: automatically generated from parse.y
keywords :: reserved keywords
lex.c    :: automatically generated from keywords

== Ruby Evaluator (a.k.a. YARV)

  compile.c
  eval.c
  eval_error.c
  eval_jump.c
  eval_safe.c
  insns.def           : definition of VM instructions
  iseq.c              : implementation of VM::ISeq
  thread.c            : thread management and context switching
  thread_win32.c      : thread implementation
  thread_pthread.c    : ditto
  vm.c
  vm_dump.c
  vm_eval.c
  vm_exec.c
  vm_insnhelper.c
  vm_method.c

  opt_insns_unif.def  : instruction unification
  opt_operand.def     : definitions for optimization

    -> insn*.inc      : automatically generated
    -> opt*.inc       : automatically generated
    -> vm.inc         : automatically generated

== Regular Expression Engine (Oniguruma)

  regex.c
  regcomp.c
  regenc.c
  regerror.c
  regexec.c
  regparse.c
  regsyntax.c

== Utility Functions

debug.c    :: debug symbols for C debugger
dln.c      :: dynamic loading
st.c       :: general purpose hash table
strftime.c :: formatting times
util.c     :: misc utilities

== Ruby Interpreter Implementation

  dmyext.c
  dmydln.c
  dmyencoding.c
  id.c
  inits.c
  main.c
  ruby.c
  version.c

  gem_prelude.rb
  prelude.rb

== Class Library

array.c      :: Array
bignum.c     :: Bignum
compar.c     :: Comparable
complex.c    :: Complex
cont.c       :: Fiber, Continuation
dir.c        :: Dir
enum.c       :: Enumerable
enumerator.c :: Enumerator
file.c       :: File
hash.c       :: Hash
io.c         :: IO
marshal.c    :: Marshal
math.c       :: Math
numeric.c    :: Numeric, Integer, Fixnum, Float
pack.c       :: Array#pack, String#unpack
proc.c       :: Binding, Proc
process.c    :: Process
random.c     :: random number
range.c      :: Range
rational.c   :: Rational
re.c         :: Regexp, MatchData
signal.c     :: Signal
sprintf.c    :: String#sprintf
string.c     :: String
struct.c     :: Struct
time.c       :: Time

defs/known_errors.def :: Errno::* exception classes
-> known_errors.inc   :: automatically generated

== Multilingualization

encoding.c  :: Encoding
transcode.c :: Encoding::Converter
enc/*.c     :: encoding classes
enc/trans/* :: codepoint mapping tables

== goruby Interpreter Implementation

  goruby.c
  golf_prelude.rb     : goruby specific libraries.
    -> golf_prelude.c : automatically generated


= Appendix B. Ruby Extension API Reference

== Types

VALUE ::

  The type for the Ruby object.  Actual structures are defined in ruby.h,
  such as struct RString, etc.  To refer the values in structures, use
  casting macros like RSTRING(obj).

== Variables and Constants

Qnil::
  nil object

Qtrue::
  true object (default true value)

Qfalse::
  false object

== C Pointer Wrapping

Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ::

  Wrap a C pointer into a Ruby object.  If object has references to other
  Ruby objects, they should be marked by using the mark function during
  the GC process.  Otherwise, mark should be 0.  When this object is no
  longer referred by anywhere, the pointer will be discarded by free
  function.

Data_Make_Struct(klass, type, mark, free, sval) ::

  This macro allocates memory using malloc(), assigns it to the variable
  sval, and returns the DATA encapsulating the pointer to memory region.

Data_Get_Struct(data, type, sval) ::

  This macro retrieves the pointer value from DATA, and assigns it to
  the variable sval.

== Checking Data Types

TYPE(value) ::

  Internal type (T_NIL, T_FIXNUM, etc.)

FIXNUM_P(value) ::

  Is +value+ a Fixnum?

NIL_P(value) ::

  Is +value+ nil?

void Check_Type(VALUE value, int type) ::

  Ensures +value+ is of the given internal +type+ or raises a TypeError

SaveStringValue(value) ::

  Checks that +value+ is a String and is not tainted

== Data Type Conversion

FIX2INT(value), INT2FIX(i) ::

  Fixnum <-> integer

FIX2LONG(value), LONG2FIX(l) ::

  Fixnum <-> long

NUM2INT(value), INT2NUM(i) ::

  Numeric <-> integer

NUM2UINT(value), UINT2NUM(ui) ::

  Numeric <-> unsigned integer

NUM2LONG(value), LONG2NUM(l) ::

  Numeric <-> long

NUM2ULONG(value), ULONG2NUM(ul) ::

  Numeric <-> unsigned long

NUM2LL(value), LL2NUM(ll) ::

  Numeric <-> long long

NUM2ULL(value), ULL2NUM(ull) ::

  Numeric <-> unsigned long long

NUM2OFFT(value), OFFT2NUM(off) ::

  Numeric <-> off_t

NUM2SIZET(value), SIZET2NUM(size) ::

  Numeric <-> size_t

NUM2SSIZET(value), SSIZET2NUM(ssize) ::

  Numeric <-> ssize_t

rb_integer_pack(value, words, numwords, wordsize, nails, flags), rb_integer_unpack(words, numwords, wordsize, nails, flags) ::

  Numeric <-> Arbitrary size integer buffer

NUM2DBL(value) ::

  Numeric -> double

rb_float_new(f) ::

  double -> Float

StringValue(value) ::

  Object with #to_str -> String

StringValuePtr(value) ::

  Object with #to_str -> pointer to String data

StringValueCStr(value) ::

  Object with #to_str -> pointer to String data without NULL bytes

rb_str_new2(s) ::

  char * -> String

== Defining Class and Module

VALUE rb_define_class(const char *name, VALUE super) ::

  Defines a new Ruby class as a subclass of super.

VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ::

  Creates a new Ruby class as a subclass of super, under the module's
  namespace.

VALUE rb_define_module(const char *name) ::

  Defines a new Ruby module.

VALUE rb_define_module_under(VALUE module, const char *name) ::

  Defines a new Ruby module under the module's namespace.

void rb_include_module(VALUE klass, VALUE module) ::

  Includes module into class.  If class already includes it, just ignored.

void rb_extend_object(VALUE object, VALUE module) ::

  Extend the object with the module's attributes.

== Defining Global Variables

void rb_define_variable(const char *name, VALUE *var) ::

  Defines a global variable which is shared between C and Ruby.  If name
  contains a character which is not allowed to be part of the symbol,
  it can't be seen from Ruby programs.

void rb_define_readonly_variable(const char *name, VALUE *var) ::

  Defines a read-only global variable.  Works just like
  rb_define_variable(), except the defined variable is read-only.

void rb_define_virtual_variable(const char *name, VALUE (*getter)(), VALUE (*setter)()) ::

  Defines a virtual variable, whose behavior is defined by a pair of C
  functions.  The getter function is called when the variable is
  referenced.  The setter function is called when the variable is set to a
  value.  The prototype for getter/setter functions are:

    VALUE getter(ID id)
    void setter(VALUE val, ID id)

  The getter function must return the value for the access.

void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), VALUE (*setter)()) ::

  Defines hooked variable.  It's a virtual variable with a C variable.
  The getter is called as

    VALUE getter(ID id, VALUE *var)

  returning a new value.  The setter is called as

    void setter(VALUE val, ID id, VALUE *var)

  GC requires C global variables which hold Ruby values to be marked.

void rb_global_variable(VALUE *var)

  Tells GC to protect these variables.

== Constant Definition

void rb_define_const(VALUE klass, const char *name, VALUE val) ::

  Defines a new constant under the class/module.

void rb_define_global_const(const char *name, VALUE val) ::

  Defines a global constant.  This is just the same as

    rb_define_const(cKernal, name, val)

== Method Definition

rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  Defines a method for the class.  func is the function pointer.  argc
  is the number of arguments.  if argc is -1, the function will receive
  3 arguments: argc, argv, and self.  if argc is -2, the function will
  receive 2 arguments, self and args, where args is a Ruby array of
  the method arguments.

rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  Defines a private method for the class.  Arguments are same as
  rb_define_method().

rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  Defines a singleton method.  Arguments are same as rb_define_method().

rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::

  Retrieve argument from argc and argv to given VALUE references
  according to the format string.  The format can be described in ABNF
  as follows:

    scan-arg-spec  := param-arg-spec [option-hash-arg-spec] [block-arg-spec]

    param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec /
                      pre-opt-post-arg-spec
    pre-arg-spec   := num-of-leading-mandatory-args [num-of-optional-args]
    post-arg-spec  := sym-for-variable-length-args
                      [num-of-trailing-mandatory-args]
    pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args
                             num-of-trailing-mandatory-args
    option-hash-arg-spec := sym-for-option-hash-arg
    block-arg-spec := sym-for-block-arg

    num-of-leading-mandatory-args  := DIGIT ; The number of leading
                                            ; mandatory arguments
    num-of-optional-args           := DIGIT ; The number of optional
                                            ; arguments
    sym-for-variable-length-args   := "*"   ; Indicates that variable
                                            ; length arguments are
                                            ; captured as a ruby array
    num-of-trailing-mandatory-args := DIGIT ; The number of trailing
                                            ; mandatory arguments
    sym-for-option-hash-arg        := ":"   ; Indicates that an option
                                            ; hash is captured if the last
                                            ; argument is a hash or can be
                                            ; converted to a hash with
                                            ; #to_hash.  When the last
                                            ; argument is nil, it is
                                            ; captured if it is not
                                            ; ambiguous to take it as
                                            ; empty option hash; i.e. '*'
                                            ; is not specified and
                                            ; arguments are given more
                                            ; than sufficient.
    sym-for-block-arg              := "&"   ; Indicates that an iterator
                                            ; block should be captured if
                                            ; given

  For example, "12" means that the method requires at least one
  argument, and at most receives three (1+2) arguments.  So, the format
  string must be followed by three variable references, which are to be
  assigned to captured arguments.  For omitted arguments, variables are
  set to Qnil.  NULL can be put in place of a variable reference, which
  means the corresponding captured argument(s) should be just dropped.

  The number of given arguments, excluding an option hash or iterator
  block, is returned.

== Invoking Ruby method

VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ::

  Invokes a method.  To retrieve mid from a method name, use rb_intern().
  Able to call even private/protected methods.

VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ::
VALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv) ::

  Invokes a method, passing arguments as an array of values.
  Able to call even private/protected methods.

VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, VALUE *argv) ::

  Invokes a method, passing arguments as an array of values.
  Able to call only public methods.

VALUE rb_eval_string(const char *str) ::

  Compiles and executes the string as a Ruby program.

ID rb_intern(const char *name) ::

  Returns ID corresponding to the name.

char *rb_id2name(ID id) ::

  Returns the name corresponding ID.

char *rb_class2name(VALUE klass) ::

  Returns the name of the class.

int rb_respond_to(VALUE object, ID id) ::

  Returns true if the object responds to the message specified by id.

== Instance Variables

VALUE rb_iv_get(VALUE obj, const char *name) ::

  Retrieve the value of the instance variable.  If the name is not
  prefixed by `@', that variable shall be inaccessible from Ruby.

VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) ::

  Sets the value of the instance variable.

== Control Structure

VALUE rb_block_call(VALUE recv, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ::

  Calls a method on the recv, with the method name specified by the
  symbol mid, with argc arguments in argv, supplying func as the
  block. When func is called as the block, it will receive the value
  from yield as the first argument, and data2 as the second argument.
  When yielded with multiple values (in C, rb_yield_values(),
  rb_yield_values2() and rb_yield_splat()), data2 is packed as an Array,
  whereas yielded values can be gotten via argc/argv of the third/fourth
  arguments.

[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2) ::

  Calls the function func1, supplying func2 as the block.  func1 will be
  called with the argument arg1.  func2 receives the value from yield as
  the first argument, arg2 as the second argument.

  When rb_iterate is used in 1.9, func1 has to call some Ruby-level method.
  This function is obsolete since 1.9; use rb_block_call instead.

VALUE rb_yield(VALUE val) ::

  Evaluates the block with value val.

VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  Calls the function func1, with arg1 as the argument.  If an exception
  occurs during func1, it calls func2 with arg2 as the argument.  The
  return value of rb_rescue() is the return value from func1 if no
  exception occurs, from func2 otherwise.

VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  Calls the function func1 with arg1 as the argument, then calls func2
  with arg2 if execution terminated.  The return value from
  rb_ensure() is that of func1 when no exception occurred.

VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ::

  Calls the function func with arg as the argument.  If no exception
  occurred during func, it returns the result of func and *state is zero.
  Otherwise, it returns Qnil and sets *state to nonzero.  If state is
  NULL, it is not set in both cases.
  You have to clear the error info with rb_set_errinfo(Qnil) when
  ignoring the caught exception.

void rb_jump_tag(int state) ::

  Continues the exception caught by rb_protect() and rb_eval_string_protect().
  state must be the returned value from those functions.  This function
  never return to the caller.

void rb_iter_break() ::

  Exits from the current innermost block.  This function never return to
  the caller.

void rb_iter_break_value(VALUE value) ::

  Exits from the current innermost block with the value.  The block will
  return the given argument value.  This function never return to the
  caller.

== Exceptions and Errors

void rb_warn(const char *fmt, ...) ::

  Prints a warning message according to a printf-like format.

void rb_warning(const char *fmt, ...) ::

  Prints a warning message according to a printf-like format, if
  $VERBOSE is true.

void rb_raise(rb_eRuntimeError, const char *fmt, ...) ::

  Raises RuntimeError.  The fmt is a format string just like printf().

void rb_raise(VALUE exception, const char *fmt, ...) ::

  Raises a class exception.  The fmt is a format string just like printf().

void rb_fatal(const char *fmt, ...) ::

  Raises a fatal error, terminates the interpreter.  No exception handling
  will be done for fatal errors, but ensure blocks will be executed.

void rb_bug(const char *fmt, ...) ::

  Terminates the interpreter immediately.  This function should be
  called under the situation caused by the bug in the interpreter.  No
  exception handling nor ensure execution will be done.

Note: In the format string, %i is used for Object#to_s (or Object#inspect if
'+' flag is set) output (and related argument must be a VALUE).  For integers
in format strings, use %d.

== Initialize and Start the Interpreter

The embedding API functions are below (not needed for extension libraries):

void ruby_init() ::

  Initializes the interpreter.

void ruby_options(int argc, char **argv) ::

  Process command line arguments for the interpreter.

void ruby_run() ::

  Starts execution of the interpreter.

void ruby_script(char *name) ::

  Specifies the name of the script ($0).

== Hooks for the Interpreter Events

  void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events,
                         VALUE data)

Adds a hook function for the specified interpreter events.
events should be OR'ed value of:

  RUBY_EVENT_LINE
  RUBY_EVENT_CLASS
  RUBY_EVENT_END
  RUBY_EVENT_CALL
  RUBY_EVENT_RETURN
  RUBY_EVENT_C_CALL
  RUBY_EVENT_C_RETURN
  RUBY_EVENT_RAISE
  RUBY_EVENT_ALL

The definition of rb_event_hook_func_t is below:

  typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
                                       VALUE self, ID id, VALUE klass)

The third argument `data' to rb_add_event_hook() is passed to the hook
function as the second argument, which was the pointer to the current
NODE in 1.8.  See RB_EVENT_HOOKS_HAVE_CALLBACK_DATA below.

  int rb_remove_event_hook(rb_event_hook_func_t func)

Removes the specified hook function.

== Macros for Compatibility

Some macros to check API compatibilities are available by default.

NORETURN_STYLE_NEW ::

  Means that NORETURN macro is functional style instead of prefix.

HAVE_RB_DEFINE_ALLOC_FUNC ::

  Means that function rb_define_alloc_func() is provided, that means the
  allocation framework is used.  This is same as the result of
  have_func("rb_define_alloc_func", "ruby.h").

HAVE_RB_REG_NEW_STR ::

  Means that function rb_reg_new_str() is provided, that creates Regexp
  object from String object.  This is same as the result of
  have_func("rb_reg_new_str", "ruby.h").

HAVE_RB_IO_T ::

  Means that type rb_io_t is provided.

USE_SYMBOL_AS_METHOD_NAME ::

  Means that Symbols will be returned as method names, e.g.,
  Module#methods, #singleton_methods and so on.

HAVE_RUBY_*_H ::

  Defined in ruby.h and means corresponding header is available.  For
  instance, when HAVE_RUBY_ST_H is defined you should use ruby/st.h not
  mere st.h.

RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::

  Means that rb_add_event_hook() takes the third argument `data', to be
  passed to the given event hook function.

= Appendix C. Functions available for use in extconf.rb

See documentation for {mkmf}[rdoc-ref:MakeMakefile].

= Appendix D. Generational GC

Ruby 2.1 introduced a generational garbage collector (called RGenGC).
RGenGC (mostly) keeps compatibility.

Generally, the use of the technique called write barriers is required in
extendoc/alt-ruby21/LEGAL000064400000054677150403130670010004 0ustar00
VALUE rb_obj_hide(VALUE obj) ::

  Clear RBasic::klass field. The object will be an internal object.
  ObjectSpace::each_object can't find this object.

VALUE rb_obj_reveal(VALUE obj, VALUE klass) ::

  Reset RBasic::klass to be klass.
  We expect the `klass' is hidden class by rb_obj_hide().

== Write barriers

RGenGC doesn't require write barriers to support generational GC.
However, caring about write barrier can improve the performance of
RGenGC. Please check the following tips.

=== Don't touch pointers directly

In MRI (include/ruby/ruby.h), some macros to acquire pointers to the
internal data structures are supported such as RARRAY_PTR(),
RSTRUCT_PTR() and so on.

DO NOT USE THESE MACROS and instead use the corresponding C-APIs such as
rb_ary_aref(), rb_ary_store() and so on.

=== Consider whether to insert write barriers

You don't need to care about write barriers if you only use built-in
types.

If you support T_DATA objects, you may consider using write barriers.

Inserting write barriers into T_DATA objects only works with the
following type objects: (a) long-lived objects, (b) when a huge number
of objects are generated and (c) container-type objects that have
references to other objects. If your extension provides such a type of
T_DATA objects, consider inserting write barriers.

(a): short-lived objects don't become old generation objects.
(b): only a few oldgen objects don't have performance impact.
(c): only a few references don't have performance impact.

Inserting write barriers is a very difficult hack, it is easy to
introduce critical bugs. And inserting write barriers has several areas
of overhead. Basically we don't recommend you insert write barriers.
Please carefully consider the risks.

=== Combine with built-in types

Please consider utilizing built-in types. Most built-in types support
write barrier, so you can use them to avoid manually inserting write
barriers.

For example, if your T_DATA has references to other objects, then you
can move these references to Array. A T_DATA object only has a reference
to an array object. Or you can also use a Struct object to gather a
T_DATA object (without any references) and an that Array contains
references.

With use of such techniques, you don't need to insert write barriers
anymore.

=== Insert write barriers

[AGAIN] Inserting write barriers is a very difficult hack, and it is
easy to introduce critical bugs. And inserting write barriers has
several areas of overhead. Basically we don't recommend you insert write
barriers. Please carefully consider the risks.

Before inserting write barriers, you need to know about RGenGC algorithm
(gc.c will help you). Macros and functions to insert write barriers are
available in in include/ruby/ruby.h. An example is available in iseq.c.

For a complete guide for RGenGC and write barriers, please refer to
<https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/RGenGC>.

/*
 * Local variables:
 * fill-column: 70
 * end:
 */
doc/alt-ruby21/LEGAL000064400000054677150403130670010004 0ustar00LEGAL NOTICE INFORMATION
------------------------

All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.

include/ruby/oniguruma.h:
regcomp.c:
regenc.[ch]:
regerror.c:
regexec.c:
regint.h:
regparse.[ch]:
enc/ascii.c
enc/big5.c
enc/cp949.c
enc/emacs_mule.c
enc/encdb.c
enc/euc_jp.c
enc/euc_kr.c
enc/euc_tw.c
enc/gb18030.c
enc/gb2312.c
enc/gbk.c
enc/iso_8859_1.c
enc/iso_8859_10.c
enc/iso_8859_11.c
enc/iso_8859_13.c
enc/iso_8859_14.c
enc/iso_8859_15.c
enc/iso_8859_16.c
enc/iso_8859_2.c
enc/iso_8859_3.c
enc/iso_8859_4.c
enc/iso_8859_5.c
enc/iso_8859_6.c
enc/iso_8859_7.c
enc/iso_8859_8.c
enc/iso_8859_9.c
enc/koi8_r.c
enc/koi8_u.c
enc/shift_jis.c
enc/unicode.c
enc/us_ascii.c
enc/utf_16be.c
enc/utf_16le.c
enc/utf_32be.c
enc/utf_32le.c
enc/utf_8.c
enc/windows_1251.c

Oniguruma  ----   (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>

http://www.geocities.jp/kosako3/oniguruma/
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/oniguruma/
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/

   When this software is partly used or it is distributed with Ruby, 
   this of Ruby follows the license of Ruby.

configure:

  This file is free software.

    Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.

    This configure script is free software; the Free Software Foundation
    gives unlimited permission to copy, distribute and modify it.

tool/config.guess:
tool/config.sub:

  As long as you distribute these files with the file configure, they
  are covered under the Ruby's license.

      Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
      Free Software Foundation, Inc.

    This file is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

    As a special exception to the GNU General Public License, if you
    distribute this file as part of a program that contains a
    configuration script generated by Autoconf, you may include it under
    the same distribution terms that you use for the rest of that program.

parse.c:

  This file is licensed under the GPL, but is incorporated into Ruby and 
  redistributed under the terms of the Ruby license, as permitted by the
  exception to the GPL below.

     Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
     Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2, or (at your option)
     any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor,
     Boston, MA 02110-1301, USA.  */

  /* As a special exception, you may create a larger work that contains
     part or all of the Bison parser skeleton and distribute that work
     under terms of your choice, so long as that work isn't itself a
     parser generator using the skeleton or a modified version thereof
     as a parser skeleton.  Alternatively, if you modify or redistribute
     the parser skeleton itself, you may (at your option) remove this
     special exception, which will cause the skeleton and the resulting
     Bison output files to be licensed under the GNU General Public
     License without this special exception.

     This special exception was added by the Free Software Foundation in
     version 2.2 of Bison.  */

util.c (partly):

    Copyright (c) 1991, 2000, 2001 by Lucent Technologies.

    Permission to use, copy, modify, and distribute this software for any
    purpose without fee is hereby granted, provided that this entire notice
    is included in all copies of any software which is or includes a copy
    or modification of this software and in all copies of the supporting
    documentation for such software.

    THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
    WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
    Rdoc/alt-ruby21/LEGAL000064400000054677150403130670010004 0ustar00 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.

random.c

  This file is under the new-style BSD license.

    A C-program for MT19937, with initialization improved 2002/2/10.
    Coded by Takuji Nishimura and Makoto Matsumoto.
    This is a faster version by taking Shawn Cokus's optimization,
    Matthe Bellew's simplification, Isaku Wada's real version.

    Before using, initialize the state by using init_genrand(seed) 
    or init_by_array(init_key, key_length).

    Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
    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.

      3. The names of its contributors may not be used to endorse or promote 
	 products derived from this software without specific prior written 
	 permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.


    Any feedback is very welcome.
    http://www.math.keio.ac.jp/matumoto/emt.html
    email: matumoto@math.keio.ac.jp

vsnprintf.c:

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

    Copyright (c) 1990, 1993
         The Regents of the University of California.  All rights reserved.

    This code is derived from software contributed to Berkeley by
    Chris Torek.

    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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

    IMPORTANT NOTE:
    --------------
    From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
    paragraph 3 above is now null and void.

st.[ch]:
missing/alloca.c:
missing/dup2.c:
missing/erf.c:
missing/finite.c:
missing/hypot.c:
missing/isinf.c:
missing/isnan.c:
missing/lgamma_r.c:
missing/memcmp.c:
missing/memmove.c:
missing/strchr.c:
missing/strstr.c:
missing/strtol.c:
missing/tgamma.c:
ext/digest/sha1/sha1.[ch]:

  These files are all under public domain.

missing/crypt.c:

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

    Copyright (c) 1989, 1993
    	The Regents of the University of California.  All rights reserved.

    This code is derived from software contributed to Berkeley by
    Tom Truscott.

    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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

missing/setproctitle.c

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

    Copyright 2003 Damien Miller
    Copyright (c) 1983, 1995-1997 Eric P. Allman
    Copyright (c) 1988, 1993
    	The Regents of the University of California.  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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

missing/strlcat.c
missing/strlcpy.c

  These files are under the new-style BSD license.

   Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
   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.
   3. The name of the author may not be used to endorse or promote products
      derived from this software without specific prior written permission.

   THIS SOFTWARE IS PROVIDED ``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 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.

missing/langinfo.c

  This file is from http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c.
  Ruby uses a modified version. The file contains the following
  author/copyright notice:

  Markus.Kuhn@cl.cam.ac.uk -- 2002-03-11
  Permission to use, copy, modify, and distribute this software
  for any purpose and without fee is hereby granted. The author
  disclaims all warranties with regard to this software.

ext/digest/md5/md5.[ch]:

  These files are under the following license.  Ruby uses modified
  versions of them.

    Copyright (C) 1999, 2000 Aladdin Enterprises.  All rights reserved.

    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any damages
    arising from the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
       claim that you wrote the original software. If you use this software
       in a product, an acknowledgment in the product documentation would be
       appreciated but is not required.
    2. Altered source versions must be plainly marked as such, and must not be
       misrepresented as being the original software.
    3. This notice may not be removed or altered from any source distribution.

    L. Peter Deutsch
    ghost@aladdin.com

ext/digest/rmd160/rmd160.[ch]:

  These files have the following copyright information, and by the
  author we are allowed to use it under the new-style BSD license.

    AUTHOR:   Antoon Bosselaers, ESAT-COSIC
              (Arranged for libc by Todd C. Miller)
    DATE:     1 March 1996

    Copyright (c) Katholieke Universiteit Leuven
    1996, All Rights Reserved

ext/digest/sha2/sha2.[ch]:

  These files are under the new-style BSD license.

    Copyright 2000 Aaron D. Gifford.  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.
    3. Neither the name of the copyright holder nor the names of contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMdoc/alt-ruby21/README.EXT.ja000064400000175326150403130670011140 0ustar00EVEN IF ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGE.

ext/nkf/nkf-utf8/config.h:
ext/nkf/nkf-utf8/nkf.c:
ext/nkf/nkf-utf8/utf8tbl.c:

  These files are under the following license.  So to speak, it is
  copyrighted semi-public-domain software.

    Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
       Everyone is permitted to do anything on this program 
       including copying, modifying, improving,
       as long as you don't try to pretend that you wrote it.
       i.e., the above copyright notice has to appear in all copies.
       Binary distribution requires original version messages.
       You don't have to ask before copying, redistribution or publishing.
       THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.

ext/socket/addrinfo.h:
ext/socket/getaddrinfo.c:
ext/socket/getnameinfo.c:

  These files are under the new-style BSD license.

    Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
    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.
    3. Neither the name of the project nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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.

ext/win32ole/win32ole.c:

  You can apply the Artistic License to this file. (or GPL,
  alternatively)

    (c) 1995 Microsoft Corporation. All rights reserved.
    Developed by ActiveWare Internet Corp., http://www.ActiveWare.com

    Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
    <gsar@umich.edu> and Jan Dubois <jan.dubois@ibm.net>
 
    You may distribute under the terms of either the GNU General Public
    License or the Artistic License, as specified in the README file
    of the Perl distribution.
doc/alt-ruby21/README.EXT.ja000064400000175326150403130670011140 0ustar00# README.EXT.ja -  -*- RDoc -*- created at: Mon Aug  7 16:45:54 JST 1995

Rubyの拡張ライブラリの作り方を説明します.

= 基礎知識

Cの変数には型があり,データには型がありません.ですから,た
とえばポインタをintの変数に代入すると,その値は整数として取
り扱われます.逆にRubyの変数には型がなく,データに型がありま
す.この違いのため,CとRubyは相互に変換しなければ,お互いの
データをアクセスできません.

RubyのデータはVALUEというCの型で表現されます.VALUE型のデー
タはそのデータタイプを自分で知っています.このデータタイプと
いうのはデータ(オブジェクト)の実際の構造を意味していて,Ruby
のクラスとはまた違ったものです.

VALUEからCにとって意味のあるデータを取り出すためには

1. VALUEのデータタイプを知る
2. VALUEをCのデータに変換する

の両方が必要です.(1)を忘れると間違ったデータの変換が行われ
て,最悪プログラムがcore dumpします.

== データタイプ

Rubyにはユーザが使う可能性のある以下のタイプがあります.

T_NIL      :: nil
T_OBJECT   :: 通常のオブジェクト
T_CLASS    :: クラス
T_MODULE   :: モジュール
T_FLOAT    :: 浮動小数点数
T_STRING   :: 文字列
T_REGEXP   :: 正規表現
T_ARRAY    :: 配列
T_HASH     :: 連想配列
T_STRUCT   :: (Rubyの)構造体
T_BIGNUM   :: 多倍長整数
T_FIXNUM   :: Fixnum(31bitまたは63bit長整数)
T_COMPLEX  :: 複素数
T_RATIONAL :: 有理数
T_FILE     :: 入出力
T_TRUE     :: 真
T_FALSE    :: 偽
T_DATA     :: データ
T_SYMBOL   :: シンボル

その他に内部で利用されている以下のタイプがあります.

  T_ICLASS
  T_MATCH
  T_UNDEF
  T_NODE
  T_ZOMBIE

ほとんどのタイプはCの構造体で実装されています.

== VALUEのデータタイプをチェックする

ruby.hではTYPE()というマクロが定義されていて,VALUEのデータ
タイプを知ることが出来ます.TYPE()マクロは上で紹介したT_XXXX
の形式の定数を返します.VALUEのデータタイプに応じて処理する
場合には,TYPE()の値で分岐することになります.

  switch (TYPE(obj)) {
    case T_FIXNUM:
      /* FIXNUMの処理 */
      break;
    case T_STRING:
      /* 文字列の処理 */
      break;
    case T_ARRAY:
      /* 配列の処理 */
      break;
    default:
      /* 例外を発生させる */
      rb_raise(rb_eTypeError, "not valid value");
      break;
  }

それとデータタイプをチェックして,正しくなければ例外を発生す
る関数が用意されています.

  void Check_Type(VALUE value, int type)

この関数はvalueがtypeで無ければ,例外を発生させます.引数と
して与えられたVALUEのデータタイプが正しいかどうかチェックす
るためには,この関数を使います.

FIXNUMとNILに関してはより高速な判別マクロが用意されています.

  FIXNUM_P(obj)
  NIL_P(obj)

== VALUEをCのデータに変換する

データタイプがT_NIL,T_FALSE,T_TRUEである時,データはそれぞ
れnil,false,trueです.このデータタイプのオブジェクトはひと
つずつしか存在しません.

データタイプがT_FIXNUMの時,これは31bitまたは63bitのサイズを
持つ整数です.longのサイズが32bitのプラットフォームであれば
31bitに,longのサイズが64bitのプラットフォームであれば63bit
になります. FIXNUM を C の整数に変換するためにはマクロ
「FIX2INT()」または「FIX2LONG()」を使います.これらのマクロ
を使用する際には事前にデータタイプがFIXNUMであることを確認す
る必要がありますが,比較的高速に変換を行うことができます.ま
た,「FIX2LONG()」は例外を発生しませんが,「FIX2INT()」は変
換結果がintのサイズに収まらない場合には例外を発生します.
それから,FIXNUMに限らずRubyのデータを整数に変換する
「NUM2INT()」および「NUM2LONG()」というマクロがあります.こ
れらのマクロはマクロはデータタイプのチェック無しで使えます
(整数に変換できない場合には例外が発生する).同様にチェック無
で使える変換マクロはdoubleを取り出す「NUM2DBL()」があります.

char* を取り出す場合, StringValue() と StringValuePtr()
を使います.
StringValue(var) は var が String
であれば何もせず,そうでなければ var を var.to_str() の結果
に置き換えるマクロ,StringValuePtr(var) は同様に var を
String に置き換えてから var のバイト列表現に対する char* を
返すマクロです.var の内容を直接置き換える処理が入るので,
var �doc/alt-ruby21/README.EXT.ja000064400000175326150403130670011140 0ustar00��

それ以外のデータタイプは対応するCの構造体があります.対応す
る構造体のあるVALUEはそのままキャスト(型変換)すれば構造体の
ポインタに変換できます.

構造体は「struct RXxxxx」という名前でruby.hで定義されていま
す.例えば文字列は「struct RString」です.実際に使う可能性が
あるのは文字列と配列くらいだと思います.

ruby.hでは構造体へキャストするマクロも「RXXXXX()」(全部大文
字にしたもの)という名前で提供されています(例: RSTRING()).た
だし、構造体への直接のアクセスはできるだけ避け,対応する
rb_xxxx() といった関数を使うようにして下さい.例えば,配列の
要素へアクセスする場合は,rb_ary_entry(ary, offset),
rb_ary_store(ary, offset, obj) を利用するようにして下さい.

構造体からデータを取り出すマクロが提供されています.文字列
strの長さを得るためには「RSTRING_LEN(str)」とし,文字列strを
char*として得るためには「RSTRING_PTR(str)」とします.

Rubyの構造体を直接アクセスする時に気をつけなければならないこ
とは,配列や文字列の構造体の中身は参照するだけで,直接変更し
ないことです.直接変更した場合,オブジェクトの内容の整合性が
とれなくなって,思わぬバグの原因になります.

== CのデータをVALUEに変換する

VALUEの実際の構造は

FIXNUMの場合 ::

  1bit左シフトして,LSBを立てる.

その他のポインタの場合 ::

  そのままVALUEにキャストする.

となっています.よって,LSBをチェックすればVALUEがFIXNUMかど
うかわかるわけです(ポインタのLSBが立っていないことを仮定して
いる).

ですから,FIXNUM以外のRubyのオブジェクトの構造体は単にVALUE
にキャストするだけでVALUEに変換出来ます.ただし,任意の構造
体がVALUEにキャスト出来るわけではありません.キャストするの
はRubyの知っている構造体(ruby.hで定義されているstruct RXxxx
のもの)だけです.

FIXNUMに関しては変換マクロを経由する必要があります.Cの整数
からVALUEに変換するマクロは以下のものがあります.必要に応じ
て使い分けてください.

INT2FIX() :: もとの整数が31bitまたは63bit以内に収まる自信
      	     がある時
INT2NUM() :: 任意の整数からVALUEへ

INT2NUM()は整数がFIXNUMの範囲に収まらない場合,Bignumに変換
してくれます(が,少し遅い).

== Rubyのデータを操作する

先程も述べた通り,Rubyの構造体をアクセスする時に内容の更新を
行うことは勧められません.で,Rubyのデータを操作する時には
Rubyが用意している関数を用いてください.

ここではもっとも使われるであろう文字列と配列の生成/操作を行
う関数をあげます(全部ではないです).

=== 文字列に対する関数

rb_str_new(const char *ptr, long len) ::

  新しいRubyの文字列を生成する.

rb_str_new2(const char *ptr)
rb_str_new_cstr(const char *ptr)

  Cの文字列からRubyの文字列を生成する.この関数の機能は
  rb_str_new(ptr, strlen(ptr))と同等である.

rb_tainted_str_new(const char *ptr, long len)

  汚染マークが付加された新しいRubyの文字列を生成する.外部
  からのデータに基づく文字列には汚染マークが付加されるべき
  である.

rb_tainted_str_new2(const char *ptr)
rb_tainted_str_new_cstr(const char *ptr)

  Cの文字列から汚染マークが付加されたRubyの文字列を生成する.

rb_sprintf(const char *format, ...)
rb_vsprintf(const char *format, va_list ap)

  Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
  整形し,Rubyの文字列を生成する.

  注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を
  使ったVALUEの出力に使用されているため,整数には%dを使用すること.

rb_str_cat(VALUE str, const char *ptr, long len)

  Rubyの文字列strにlenバイトの文字列ptrを追加する.

rb_str_cat2(VALUE str, const char* ptr)

  Rubyの文字列strにCの文字列ptrを追加する.この関数の機能は
  rb_str_cat(str, ptr, strlen(ptr))と同等である.

rb_str_catf(VALUE str, const char* format, ...)
rb_str_vcatf(VALUE str, const char* format, va_list ap)

  Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
  整形し,Rubyの文字列strに追加する.この関数の機能は,それぞれ
  rb_str_cat2(str, rb_sprintf(format, ...)) や
  rb_str_cat2(str, rb_vsprintf(format, ap)) と同等である.

rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc)

  指定されたエンコーディングでRubyの文字列を生成する.

rb_usascii_str_new(const char *ptr, long len)
rb_usascii_str_new_cstr(const char *ptr)

  エンコーディングがUS-ASCIIのRubyの文字列を生成する.

rb_str_resize(VALUE str, long len)

  Rubyの文字列のサイズをlenバイトに変更する.strの長さは前
  以てセットされていなければならない.lenが元の長さよりも短
  い時は,lenバイトを越えた部分の内容は捨てられる.lenが元
  の長さよりも長い時は,元の長さを越えた部分の内容は保存さ
  れないでゴミになるだろう.この関数の呼び出しによって
  RSTRING_PTR(str)が変更されるかもしれないことに注意.

rb_str_set_len(VALUE str, long len)

  Rubyの文字列のサイズをlenバイトにセットする.strが変更可
  能でなければ例外が発生する.RSTRING_LEN(str)とは無関係に,
  lenバイトまでの内容は保存される.lenはstrの容量を越えてい
  てはならない.


== 配列に対する関数

rb_ary_new()

  要素が0の配列を生成する.

rb_ary_new2(long len)
rb_ary_new_capa(long len)

  要素が0の配列を生成する.len要素分の領域をあらかじめ割り
  当てておく.

rb_ary_new3(long n, ...)
rb_ary_new_from_args(long n, ...)

  引数で指定したn要素を含む配列を生成する.

rb_ary_new4(long n, VALUE *elts)
rb_ary_new_from_values(long n, VALUE *elts)

  配列で与えたn要素の配列を生成する.

rb_ary_to_ary(VALUE obj)

  オブジェクトを配列に変換する.
  Object#to_aryと同等である.

他にも配列を操作する関数が多数ある. これらは
引数aryに配列を渡さなければならない. さもないと
コアを吐く.

rb_ary_aref(argc, VALUE *argv, VALUE ary)

  Array#[]と同等.

rb_ary_entry(VALUE ary, long offset)

  ary[offset]

rb_ary_store(VALUE ary, long offset, VALUE obj) ::

  ary[offset] = obj

rb_ary_subseq(VALUE ary, long beg, long len)

  ary[beg, len]

rb_ary_push(VALUE ary, VALUE val)
rb_ary_pop(VALUE ary)
rb_ary_shift(VALUE ary)
rb_ary_unshift(VALUE ary, VALUE val)

rb_ary_cat(VALUE ary, const VALUE *ptr, long len)

  配列aryにptrからlen個のオブジェクトを追加する.

= Rubyの機能を使う

原理的にRubyで書けることはCでも書けます.RubyそのものがCで記
述されているんですから,当然といえば当然なんですけど.ここで
はRubyの拡張に使うことが多いだろうと予測される機能を中心に紹
介します.

== Rubyに機能を追加する

Rubyで提供されている関数を使えばRubyインタプリタに新しい機能
を追加することができます.Rubyでは以下の機能を追加する関数が
提供されています.

* クラス,モジュール
* メソッド,特異メソッドなど
* 定数

では順に紹介します.

=== クラス/モジュール定義

クラスやモジュールを定義するためには,以下の関数を使います.

  VALUE rb_define_class(const char *name, VALUE super)
  VALUE rb_define_module(const char *name)

これらの関数は新しく定義されたクラスやモジュールを返します.
メソッドや定数の定義にこれらの値が必要なので,ほとんどの場合
は戻り値を変数に格納しておく必要があるでしょう.

クラスやモジュールを他のクラスの内部にネストして定義する時に
は以下の関数を使います.

  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
  VALUE rb_define_module_under(VALUE outer, const char *name)

=== メソッド/特異メソッド定義

メソッドや特異メソッドを定義するには以下の関数を使います.

  void rb_define_method(VALUE klass, const char *name,
                        VALUE (*func)(), int argc)

  void rb_define_singleton_method(VALUE object, const char *name,
                                  VALUE (*func)(), int argc)


念のため説明すると「特異メソッド」とは,その特定のオブジェク
トに対してだけ有効なメソッドです.RubyではよくSmalltalkにお
けるクラスメソッドとして,クラスに対する特異メソッドが使われ
ます.

これらの関数の argcという引数はCの関数へ渡される引数の数(と
形式)を決めます.argcが0以上の時は関数に引き渡す引数の数を意
味します.16個以上の引数は使えません(が,要りませんよね,そ
んなに).実際の関数には先頭の引数としてselfが与えられますの
で,指定した数より1多い引数を持つことになります.

argcが負の時は引数の数ではなく,形式を指定したことになります.
argcが-1の時は引数を配列に入れて渡されます.argcが-2の時は引
数はRubyの配列として渡されます.

メソッドを定義する関数はまだいくつかあります. ひとつはメソッド
名としてIDを取ります. IDについては2.2.2を参照.

  void rb_define_method_id(VALUE klass, ID name,
                           VALUE (*func)(ANYARGS), int argc)

private/protectedなメソッドを定義するふたつの関数があります.

  void rb_define_private_method(VALUE klass, const char *name,
				VALUE (*func)(), int argc)
  void rb_define_protected_method(VALUE klass, const char *name,
			          VALUE (*func)(), int argc)

privateメソッドとは関数形式でしか呼び出すことの出来ないメソッ
ドです.

最後に, rb_define_module関数はモジュール関数を定義します.
モジュール関数とはモジュールの特異メソッドであり,同時に
privateメソッドでもあるものです.例をあげるとMathモジュール
のsqrt()などがあげられます.このメソッドは

  Math.sqrt(4)

という形式でも

  include Math
  sqrt(4)

という形式でも使えます.モジュール関数を定義する関数は以下の
通りです.

  void rb_define_module_function(VALUE module, const char *name,
		                 VALUE (*func)(), int argc)

関数的メソッド(Kernelモジュールのprivate method)を定義するた
めの関数は以下の通りです.

  void rb_define_global_function(const char *name, VALUE (*func)(), int argc)


メソッドの別名を定義するための関数は以下の通りです.

  void rb_define_alias(VALUE module, const char* new, const char* old);

属性の取得・設定メソッドを定義するには

  void rb_define_attr(VALUE klass, const char *name, int read, int write)

クラスメソッドallocateを定義したり削除したりするための関数は
以下の通りです.

  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
  void rb_undef_alloc_func(VALUE klass);

funcはクラスを引数として受け取って,新しく割り当てられたイン
スタンスを返さなくてはなりません.このインスタンスは,外部リ
ソースなどを含まない,できるだけ「空」のままにしておいたほう
がよいでしょう.

=== 定数定義

拡張ライブラリが必要な定数はあらかじめ定義しておいた方が良い
でしょう.定数を定義する関数は二つあります.

  void rb_define_const(VALUE klass, const char *name, VALUE val)
  void rb_define_global_const(const char *name, VALUE val)

前者は特定のクラス/モジュールに属する定数を定義するもの,後
者はグローバルな定数を定義するものです.

== Rubyの機能をCから呼び出す

既に『1.5 Rubyのデータを操作する』で一部紹介したような関数を
使えば,Rubyの機能を実現している関数を直接呼び出すことが出来
ます.

# このような関数の一覧表はいまのところありません.ソースを見
# るしかないですね.

それ以外にもRubyの機能を呼び出す方法はいくつかあります.

=== Rubyのプログラムをevalする

CからRubyの機能を呼び出すもっとも簡単な方法として,文字列で
与えられたRubyのプログラムを評価する以下の関数があります.

  VALUE rb_eval_string(const char *str)

この評価は現在の環境で行われます.つまり,現在のローカル変数
などを受け継ぎます.

評価は例外を発生するかもしれないことに注意しましょう. より安全
な関数もあります.

  VALUE rb_eval_string_protect(const char *str, int *state)

この関数はエラーが発生するとnilを返します.そして,成功時には
*stateはゼロに,さもなくば非ゼロになります.

=== IDまたはシンボル

Cから文字列を経由せずにRubyのメソッドを呼び出すこともできま
す.その前に,Rubyインタプリタ内でメソッドや変数名を指定する
時に使われているIDについて説明しておきましょう.

IDとは変数名,メソッド名を表す整数です.Rubyの中では

 :識別子

または

 :"任意の文字列"

でアクセスできます.Cからこの整数を得るためには関数

  rb_intern(const char *name)
  rb_intern_str(VALUE name)

を使います.Rubyから引数として与えられたシンボル(または文字
列)をIDに変換するには以下の関数を使います.

  rb_to_id(VALUE symbol)
  rb_check_id(volatile VALUE *name)
  rb_check_id_cstr(const char *name, long len, rb_encoding *enc)

もし引数がシンボルでも文字列でもなければ、to_strメソッドで文
字列に変換しようとします.第二の関数はその変換結果を*nameに保
存し,その名前が既知のシンボルでない場合は0を返します.この関
数が0以外を返した場合は*nameは常にシンボルか文字列であり、0を
返した場合は常に文字列です.第三の関数はRubyの文字列ではなく
NUL終端されたCの文字列を使います.

=== CからRubyのメソッドを呼び出す

Cから文字列を経由せずにRubyのメソッドを呼び出すためには以下
の関数を使います.

  VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)

この関数はオブジェクトrecvのmidで指定されるメソッドを呼び出
します.その他に引数の指定の仕方が違う以下の関数もあります.

  VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
  VALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv)
  VALUE rb_apply(VALUE recv, ID mid, VALUE args)

applyには引数としてRubyの配列を与えます.

=== 変数/定数を参照/更新する

Cから関数を使って参照・更新できるのは,定数,インスタンス変
数です.大域変数は一部のものはCの大域変数としてアクセスでき
ます.ローカル変数を参照する方法は公開していません.

オブジェクトのインスタンス変数を参照・更新する関数は以下の通
りです.

  VALUE rb_ivar_get(VALUE obj, ID id)
  VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)

idはrb_intern()で得られるものを使ってください.

定数を参照するには以下の関数を使ってください.

  VALUE rb_const_get(VALUE obj, ID id)

定数を新しく定義するためには『2.1.3 定数定義』で紹介さ
れている関数を使ってください.

= RubyとCとの情報共有

C言語とRubyの間で情報を共有する方法について解説します.

== Cから参照できるRubyの定数

以下のRubyの定数はCのレベルから参照できます.

  Qtrue
  Qfalse

真偽値.QfalseはC言語でも偽とみなされます(つまり0).

  Qnil

C言語から見た「nil」.

== CとRubyで共有される大域変数

CとRubyで大域変数を使って情報を共有できます.共有できる大域
変数にはいくつかの種類があります.そのなかでもっとも良く使わ
れると思われるのはrb_define_variable()です.

  void rb_define_variable(const char *name, VALUE *var)

この関数はRubyとCとで共有する大域変数を定義します.変数名が
`$'で始まらない時には自動的に追加されます.この変数の値を変
更すると自動的にRubyの対応する変数の値も変わります.

またRuby側からは更新できない変数もあります.このread onlyの
変数は以下の関数で定義します.

  void rb_define_readonly_variable(const char *name, VALUE *var)

これら変数の他にhookをつけた大域変数を定義できます.hook付き
の大域変数は以下の関数を用いて定義します.hook付き大域変数の
値の参照や設定はhookで行う必要があります.

  void rb_define_hooked_variable(const char *name, VALUE *var,
				 VALUE (*getter)(), void (*setter)())

この関数はCの関数によってhookのつけられた大域変数を定義しま
す.変数が参照された時には関数getterが,変数に値がセットされ
た時には関数setterが呼ばれる.hookを指定しない場合はgetterや
setterに0を指定します.
# getterもsetterも0ならばrb_define_variable()と同じになる.

getterとsetterの仕様は次の通りです.

  VALUE (*getter)(ID id, VALUE *var);
  void (*setter)(VALUE val, ID id, VALUE *var);


それから,対応するCの変数を持たないRubyの大域変数を定義する
こともできます. その変数の値はフック関数のみによって取得・設定
されます.

  void rb_define_virtual_variable(const char *name,
				  VALUE (*getter)(), void (*setter)())

この関数によって定義されたRubyの大域変数が参照された時には
getterが,変数に値がセットされた時にはsetterが呼ばれます.

getterとsetterの仕様は以下の通りです.

  (*getter)(ID id);
  (*setter)(VALUE val, ID id);

== CのデータをRubyオブジェクトにする

Cの世界で定義されたデータ(構造体)をRubyのオブジェクトとして
取り扱いたい場合がありえます.このような場合には,Dataという
RubyオブジェクトにCの構造体(へのポインタ)をくるむことでRuby
オブジェクトとして取り扱えるようになります.

Dataオブジェクトを生成して構造体をRubyオブジェクトにカプセル
化するためには,以下のマクロを使います.

  Data_Wrap_Struct(klass, mark, free, sval)

このマクロの戻り値は生成されたDataオブジェクトです.

klassはこのDataオブジェクトのクラスです.markはこの構造体が
Rubyのオブジェクトへの参照がある時に使う関数です.そのような
参照を含まない時には0を指定します.

# そのような参照は勧められません.

freeはこの構造体がもう不要になった時に呼ばれる関数です.この
関数がガーベージコレクタから呼ばれます.これが-1の場合は,単
純に開放されます.

markおよびfree関数はGC実行中に呼び出されます.
なお, GC実行中はRubyオブジェクトのアロケーションは禁止されま
す. よって, markおよびfree関数でRubyオブジェクトのアロケーシ
ョンは行わないでください.

Cの構造体の割当とDataオブジェクトの生成を同時に行うマクロと
して以下のものが提供されています.

  Data_Make_Struct(klass, type, mark, free, sval)

このマクロの戻り値は生成されたDataオブジェクトです.このマク
ロは以下の式のように働きます:

  (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))

klass, mark, freeはData_Wrap_Structと同じ働きをします.type
は割り当てるC構造体の型です.割り当てられた構造体は変数sval
に代入されます.この変数の型は (type*) である必要があります.

Dataオブジェクトからポインタを取り出すのは以下のマクロを用い
ます.

  Data_Get_Struct(obj, type, sval)

Cの構造体へのポインタは変数svalに代入されます.

これらのDataの使い方はちょっと分かりにくいので,後で説明する
例題を参照してください.

= 例題 - dbmパッケージを作る

ここまでの説明でとりあえず拡張ライブラリは作れるはずです.
Rubyのextディレクトリにすでに含まれているdbmライブラリを例に
して段階的に説明します.

== ディレクトリを作る

  % mkdir ext/dbm

Ruby 1.1からは任意のディレクトリでダイナミックライブラリを作
ることができるようになりました.Rubyに静的にリンクする場合に
はRubyを展開したディレクトリの下,extディレクトリの中に拡張
ライブラリ用のディレクトリを作る必要があります.名前は適当に
選んで構いません.

== 設計する

まあ,当然なんですけど,どういう機能を実現するかどうかまず設
計する必要があります.どんなクラスをつくるか,そのクラスには
どんなメソッドがあるか,クラスが提供する定数などについて設計
します.

== Cコードを書く

拡張ライブラリ本体となるC言語のソースを書きます.C言語のソー
スがひとつの時には「ライブラリ名.c」を選ぶと良いでしょう.C
言語のソースが複数の場合には逆に「ライブラリ名.c」というファ
イル名は避ける必要があります.オブジェクトファイルとモジュー
ル生成時に中間的に生成される「ライブラリ名.o」というファイル
とが衝突するからです.また,後述する mkmf ライブラリのいくつ
かの関数がコンパイルを要するテストのために「conftest.c」とい
うファイル名を使用することに注意してください.ソースファイル
名として「conftest.c」を使用してはなりません.

Rubyは拡張ライブラリをロードする時に「Init_ライブラリ名」と
いう関数を自動的に実行します.dbmライブラリの場合「Init_dbm」
です.この関数の中でクラス,モジュール,メソッド,定数などの
定義を行います.dbm.cから一部引用します.

  void
  Init_dbm(void)
  {
      /* DBMクラスを定義する */
      cDBM = rb_define_class("DBM", rb_cObject);
      /* DBMはEnumerableモジュールをインクルードする */
      rb_include_module(cDBM, rb_mEnumerable);

      /* DBMクラスのクラスメソッドopen(): 引数はCの配列で受ける */
      rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);

      /* DBMクラスのメソッドclose(): 引数はなし */
      rb_define_method(cDBM, "close", fdbm_close, 0);
      /* DBMクラスのメソッド[]: 引数は1個 */
      rb_define_method(cDBM, "[]", fdbm_fetch, 1);

      /* ... */

      /* DBMデータを格納するインスタンス変数名のためのID */
      id_dbm = rb_intern("dbm");
  }

DBMライブラリはdbmのデータと対応するオブジェクトになるはずで
すから,Cの世界のdbmをRubyの世界に取り込む必要があります.

dbm.cではData_Make_Structを以下のように使っています.

  struct dbmdata {
      int  di_size;
      DBM *di_dbm;
  };


  obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);

ここではdbmstruct構造体へのポインタをDataにカプセル化してい
ます.DBM*を直接カプセル化しないのはclose()した時の処理を考
えてのことです.

Dataオブジェクトからdbmstruct構造体のポインタを取り出すため
に以下のマクロを使っています.

  #define GetDBM(obj, dbmp) {\
      Data_Get_Struct(obj, struct dbmdata, dbmp);\
      if (dbmp->di_dbm == 0) closed_dbm();\
  }

ちょっと複雑なマクロですが,要するにdbmdata構造体のポインタ
の取り出しと,closeされているかどうかのチェックをまとめてい
るだけです.

DBMクラスにはたくさんメソッドがありますが,分類すると3種類の
引数の受け方があります.ひとつは引数の数が固定のもので,例と
してはdeleteメソッドがあります.deleteメソッドを実装している
fdbm_delete()はこのようになっています.

  static VALUE
  fdbm_delete(VALUE obj, VALUE keystr)
  {
      /* ... */
  }

引数の数が固定のタイプは第1引数がself,第2引数以降がメソッド
の引数となります.

引数の数が不定のものはCの配列で受けるものとRubyの配列で受け
るものとがあります.dbmライブラリの中で,Cの配列で受けるもの
はDBMのクラスメソッドであるopen()です.これを実装している関
数fdbm_s_open()はこうなっています.

  static VALUE
  fdbm_s_open(int argc, VALUE *argv, VALUE klass)
  {
      /* ... */

      if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
  	mode = 0666;		/* default value */
      }

      /* ... */
  }

このタイプの関数は第1引数が与えられた引数の数,第2引数が与え
られた引数の入っている配列になります.selfは第3引数として与
えられます.

この配列で与えられた引数を解析するための関数がopen()でも使わ
れているrb_scan_args()です.第3引数に指定したフォーマットに従
い,第4変数以降に指定したVALUEへの参照に値を代入してくれま
す.


引数をRubyの配列として受け取るメソッドの例には
Thread#initializeがあります.実装はこうです.

  static VALUE
  thread_initialize(VALUE thread, VALUE args)
  {
      /* ... */
  }

第1引数はself,第2引数はRubyの配列です.

*注意事項*

Rubyと共有はしないがRubyのオブジェクトを格納する可能性のある
Cの大域変数は以下の関数を使ってRubyインタプリタに変数の存在
を教えてあげてください.でないとGCでトラブルを起こします.

  void rb_global_variable(VALUE *var)

== extconf.rbを用意する

Makefileを作る場合の雛型になるextconf.rbというファイルを作り
ます.extconf.rbはライブラリのコンパイルに必要な条件のチェッ
クなどを行うことが目的です.まず,

  require 'mkmf'

をextconf.rbの先頭に置きます.extconf.rbの中では以下のRuby関
数を使うことが出来ます.

  have_library(lib, func): ライブラリの存在チェック
  have_func(func, header): 関数の存在チェック
  have_header(header): ヘッダファイルの存在チェック
  create_makefile(target[, target_prefix]): Makefileの生成

以下の変数を使うことができます.

  $CFLAGS: コンパイル時に追加的に指定するフラグ(-Oなど)
  $CPPFLAGS: プリプロセッサに追加的に指定するフラグ(-Iや-Dなど)
  $LDFLAGS: リンク時に追加的に指定するフラグ(-Lなど)
  $objs: リンクされるオブジェクトファイル名のリスト

オブジェクトファイルのリストは,通常はソースファイルを検索し
て自動的に生成されますが,makeの途中でソースを生成するような
場合は明示的に指定する必要があります.

ライブラリをコンパイルする条件が揃わず,そのライブラリをコン
パイルしない時にはcreate_makefileを呼ばなければMakefileは生
成されず,コンパイルも行われません.

== dependを用意する

もし,ディレクトリにdependというファイルが存在すれば,
Makefileが依存関係をチェックしてくれます.

  % gcc -MM *.c > depend

などで作ることが出来ます.あって損は無いでしょう.

== Makefileを生成する

Makefileを実際に生成するためには

  ruby extconf.rb

とします.extconf.rbに require 'mkmf' の行がない場合にはエラー
になりますので,引数を追加して

  ruby -r mkmf extconf.rb

としてください.

site_ruby ディレクトリでなく,
vendor_ruby ディレクトリにインストールする場合には
以下のように --vendor オプションを加えてください.

  ruby extconf.rb --vendor

ディレクトリをext以下に用意した場合にはRuby全体のmakeの時に
自動的にMakefileが生成されますので,このステップは不要です.

== makeする

動的リンクライブラリを生成する場合にはその場でmakeしてくださ
い.必要であれば make install でインストールされます.

ext以下にディレクトリを用意した場合は,Rubyのディレクトリで
makeを実行するとMakefileを生成からmake,必要によってはそのモ
ジュールのRubyへのリンクまで自動的に実行してくれます.
extconf.rbを書き換えるなどしてMakefileの再生成が必要な時はま
たRubyディレクトリでmakeしてください.

拡張ライブラリはmake installでRubyライブラリのディレクトリの
下にコピーされます.もし拡張ライブラリと協調して使うRubyで記
述されたプログラムがあり,Rubyライブラリに置きたい場合には,
拡張ライブラリ用のディレクトリの下に lib というディレクトリ
を作り,そこに 拡張子 .rb のファイルを置いておけば同時にイン
ストールされます.

== デバッグ

まあ,デバッグしないと動かないでしょうね.ext/Setupにディレ
クトリ名を書くと静的にリンクするのでデバッガが使えるようにな
ります.その分コンパイルが遅くなりますけど.

== できあがり

後はこっそり使うなり,広く公開するなり,売るなり,ご自由にお
使いください.Rubyの作者は拡張ライブラリに関して一切の権利を
主張しません.

= Appendix A. Rubyのソースコードの分類

Rubyのソースはいくつかに分類することが出来ます.このうちクラ
スライブラリの部分は基本的に拡張ライブラリと同じ作り方になっ
ています.これらのソースは今までの説明でほとんど理解できると
思います.

== Ruby言語のコア

class.c    :: クラスとモジュール
error.c    :: 例外クラスと例外機構
gc.c       :: 記憶領域管理
load.c     :: ライブラリのロード
object.c   :: オブジェクト
variable.c :: 変数と定数

== Rubyの構文解析器

  parse.y      : 字句解析器と構文定義
    -> parse.c : 自動生成
  keywords     : 予約語
    -> lex.c   : 自動生成

== Rubyの評価器 (通称YARV)
  compile.c
  eval.c
  eval_error.c
  eval_jump.c
  eval_safe.c
  insns.def           : 仮想機械語の定義
  iseq.c              : VM::ISeqの実装
  thread.c            : スレッド管理とコンテキスト切り替え
  thread_win32.c      : スレッド実装
  thread_pthread.c    : 同上
  vm.c
  vm_dump.c
  vm_eval.c
  vm_exec.c
  vm_insnhelper.c
  vm_method.c

  opt_insns_unif.def  : 命令融合
  opt_operand.def     : 最適化のための定義

    -> insn*.inc      : 自動生成
    -> opt*.inc       : 自動生成
    -> vm.inc         : 自動生成

== 正規表現エンジン (鬼車)

  regex.c
  regcomp.c
  regenc.c
  regerror.c
  regexec.c
  regparse.c
  regsyntax.c

== ユーティリティ関数

debug.c    :: Cデバッガ用のデバッグシンボル
dln.c      :: 動的ローディング
st.c       :: 汎用ハッシュ表
strftime.c :: 時刻整形
util.c     :: その他のユーティリティ

== Rubyコマンドの実装

  dmyext.c
  dmydln.c
  dmyencoding.c
  id.c
  inits.c
  main.c
  ruby.c
  version.c

  gem_prelude.rb
  prelude.rb

== クラスライブラリ

array.c      :: Array
bignum.c     :: Bignum
compar.c     :: Comparable
complex.c    :: Complex
cont.c       :: Fiber, Continuation
dir.c        :: Dir
enum.c       :: Enumerable
enumerator.c :: Enumerator
file.c       :: File
hash.c       :: Hash
io.c         :: IO
marshal.c    :: Marshal
math.c       :: Math
numeric.c    :: Numeric, Integer, Fixnum, Float
pack.c       :: Array#pack, String#unpack
proc.c       :: Binding, Proc
process.c    :: Process
random.c     :: 乱数
range.c      :: Range
rational.c   :: Rational
re.c         :: Regexp, MatchData
signal.c     :: Signal
sprintf.c    :: String#sprintf
string.c     :: String
struct.c     :: Struct
time.c       :: Time
defs/known_errors.def :: 例外クラス Errno::*
-> known_errors.inc   :: 自動生成

== 多言語化

encoding.c  :: Encoding
transcode.c :: Encoding::Converter
enc/*.c     :: エンコーディングクラス群
enc/trans/* :: コードポイント対応表

== gorubyコマンドの実装

  goruby.c
  golf_prelude.rb      : goruby固有のライブラリ
    -> golf_prelude.c  : 自動生成

= Appendix B. 拡張用関数リファレンス

C言語からRubyの機能を利用するAPIは以下の通りである.

== 型

VALUE ::

  Rubyオブジェクトを表現する型.必要に応じてキャストして用いる.
  組み込み型を表現するCの型はruby.hに記述してあるRで始まる構造
  体である.VALUE型をこれらにキャストするためにRで始まる構造体
  名を全て大文字にした名前のマクロが用意されている.

== 変数・定数

Qnil ::

  定数: nilオブジェクト

Qtrue ::

  定数: trueオブジェクト(真のデフォルト値)

Qfalse ::

  定数: falseオブジェクト

== Cデータのカプセル化

Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ::

  Cの任意のポインタをカプセル化したRubyオブジェクトを返す.こ
  のポインタがRubyからアクセスされなくなった時,freeで指定した
  関数が呼ばれる.また,このポインタの指すデータが他のRubyオブ
  ジェクトを指している場合,markに指定する関数でマークする必要
  がある.

Data_Make_Struct(klass, type, mark, free, sval) ::

  type型のメモリをmallocし,変数svalに代入した後,それをカプセ
  ル化したデータを返すマクロ.

Data_Get_Struct(data, type, sval) ::

  dataからtype型のポインタを取り出し変数svalに代入するマクロ.

== 型チェック

  TYPE(value)
  FIXNUM_P(value)
  NIL_P(value)
  void Check_Type(VALUE value, int type)
  SafeStringValue(value)

== 型変換

  FIX2INT(value), INT2FIX(i)
  FIX2LONG(value), LONG2FIX(l)
  NUM2INT(value), INT2NUM(i)
  NUM2UINT(value), UINT2NUM(ui)
  NUM2LONG(value), LONG2NUM(l)
  NUM2ULONG(value), ULONG2NUM(ul)
  NUM2LL(value), LL2NUM(ll)
  NUM2ULL(value), ULL2NUM(ull)
  NUM2OFFT(value), OFFT2NUM(off)
  NUM2SIZET(value), SIZET2NUM(size)
  NUM2SSIZET(value), SSIZET2NUM(ssize)
  rb_integer_pack(value, words, numwords, wordsize, nails, flags), rb_integer_unpack(words, numwords, wordsize, nails, flags)
  NUM2DBL(value)
  rb_float_new(f)
  StringValue(value)
  StringValuePtr(value)
  StringValueCStr(value)
  rb_str_new2(s)

== クラス/モジュール定義

VALUE rb_define_class(const char *name, VALUE super) ::

  superのサブクラスとして新しいRubyクラスを定義する.

VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ::

  superのサブクラスとして新しいRubyクラスを定義し,moduleの
  定数として定義する.

VALUE rb_define_module(const char *name) ::

  新しいRubyモジュールを定義する.

VALUE rb_define_module_under(VALUE module, const char *name) ::

  新しいRubyモジュールを定義し,moduleの定数として定義する.

void rb_include_module(VALUE klass, VALUE module) ::

  モジュールをインクルードする.classがすでにmoduleをインク
  ルードしている時には何もしない(多重インクルードの禁止).

void rb_extend_object(VALUE object, VALUE module) ::

  オブジェクトをモジュール(で定義されているメソッド)で拡張する.

== 大域変数定義

void rb_define_variable(const char *name, VALUE *var) ::

  RubyとCとで共有するグローバル変数を定義する.変数名が`$'で
  始まらない時には自動的に追加される.nameとしてRubyの識別子
  として許されない文字(例えば` ')を含む場合にはRubyプログラ
  ムからは見えなくなる.

void rb_define_readonly_variable(const char *name, VALUE *var) ::

  RubyとCとで共有するread onlyのグローバル変数を定義する.
  read onlyであること以外はrb_define_variable()と同じ.

void rb_define_virtual_variable(const char *name, VALUE (*getter)(), void (*setter)()) ::

  関数によって実現されるRuby変数を定義する.変数が参照された
  時にはgetterが,変数に値がセットされた時にはsetterが呼ばれ
  る.

void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), void (*setter)()) ::

  関数によってhookのつけられたグローバル変数を定義する.変数
  が参照された時にはgetterが,関数に値がセットされた時には
  setterが呼ばれる.getterやsetterに0を指定した時にはhookを
  指定しないのと同じ事になる.

void rb_global_variable(VALUE *var)

  GCのため,Rubyプログラムからはアクセスされないが, Rubyオブ
  ジェクトを含む大域変数をマークする.

== 定数

void rb_define_const(VALUE klass, const char *name, VALUE val) ::

  定数を定義する.

void rb_define_global_const(const char *name, VALUE val) ::

  大域定数を定義する.

    rb_define_const(rb_cObject, name, val)

  と同じ意味.

== メソッド定義

rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  メソッドを定義する.argcはselfを除く引数の数.argcが-1の時,
  関数には引数の数(selfを含まない)を第1引数, 引数の配列を第2
  引数とする形式で与えられる(第3引数はself).argcが-2の時,
  第1引数がself, 第2引数がargs(argsは引数を含むRubyの配列)と
  いう形式で与えられる.

rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  privateメソッドを定義する.引数はrb_define_method()と同じ.

rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::

  特異メソッドを定義する.引数はrb_define_method()と同じ.

rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::

  argc, argv形式で与えられた指定されたフォーマットに従って引
  数を分解し,続くVALUEへの参照にセットします.このフォーマッ
  トは,ABNFで記述すると以下の通りです.

    scan-arg-spec  := param-arg-spec [option-hash-arg-spec] [block-arg-spec]

    param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec /
                      pre-opt-post-arg-spec
    pre-arg-spec   := num-of-leading-mandatory-args [num-of-optional-args]
    post-arg-spec  := sym-for-variable-length-args
                      [num-of-trailing-mandatory-args]
    pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args
                             num-of-trailing-mandatory-args
    option-hash-arg-spec := sym-for-option-hash-arg
    block-arg-spec := sym-for-block-arg

    num-of-leading-mandatory-args  := DIGIT ; 先頭に置かれる省略不能な引数の数
    num-of-optional-args           := DIGIT ; 続いて置かれる省略可能な引数の数
    sym-for-variable-length-args   := "*"   ; 続いて置かれる可変長引数を
                                            ; Rubyの配列で取得するための指定
    num-of-trailing-mandatory-args := DIGIT ; 終端に置かれる省略不能な引数の数
    sym-for-option-hash-arg        := ":"   ; オプションハッシュを取得する
                                            ; ための指定; 省略不能な引数の
                                            ; 数よりも多くの引数が指定され,
                                            ; 最後の引数がハッシュ(または
                                            ; #to_hashで変換可能)の場合に
                                            ; 取得される.最後の引数がnilの
                                            ; 場合,可変長引数指定がなく,
                                            ; 省略不能引数の数よりも多くの
                                            ; 引数が指定された場合に取得される
    sym-for-block-arg              := "&"   ; イテレータブロックを取得するための
                                            ; 指定

  フォーマットが"12"の場合,引数は最低1つで,3つ(1+2)まで許さ
  れるという意味になります.従って,フォーマット文字列に続い
  て3つのVALUEへの参照を置く必要があります.それらには取得した
  変数がセットされます.変数への参照の代わりにNULLを指定する
  こともでき,その場合は取得した引数の値は捨てられます.なお,
  省略可能引数が省略された時の変数の値はnil(C言語のレベルでは
  Qnil)になります.

  返り値は与えられた引数の数です.オプションハッシュおよびイ
  テレータブロックは数えません.

== Rubyメソッド呼び出し

VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ::

  メソッド呼び出し.文字列からmidを得るためにはrb_intern()を
  使う.
  private/protectedなメソッドでも呼び出せる.

VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ::
VALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv) ::

  メソッド呼び出し.引数をargc, argv形式で渡す.
  private/protectedなメソッドでも呼び出せる.

VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, VALUE *argv) ::

  メソッド呼び出し.
  publicなメソッドしか呼べない.

VALUE rb_eval_string(const char *str)

  文字列をRubyスクリプトとしてコンパイル・実行する.

ID rb_intern(const char *name) ::

  文字列に対応するIDを返す.

char *rb_id2name(ID id) ::

  IDに対応する文字列を返す(デバッグ用).

char *rb_class2name(VALUE klass) ::

  クラスの名前を返す(デバッグ用).クラスが名前を持たない時に
  は, 祖先を遡って名前を持つクラスの名前を返す.

int rb_respond_to(VALUE obj, ID id) ::

  objがidで示されるメソッドを持つかどうかを返す.

== インスタンス変数

VALUE rb_iv_get(VALUE obj, const char *name) ::

  objのインスタンス変数の値を得る.`@'で始まらないインスタン
  ス変数は Rubyプログラムからアクセスできない「隠れた」イン
  スタンス変数になる.定数は大文字の名前を持つクラス(または
  モジュール)のインスタンス変数として実装されている.

VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) ::

  objのインスタンス変数をvalにセットする.

== 制御構造

VALUE rb_block_call(VALUE obj, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ::

  funcをブロックとして設定し,objをレシーバ,argcとargvを引数
  としてmidメソッドを呼び出す.funcは第一引数にyieldされた値,
  第二引数にdata2を受け取る.複数の値がyieldされた場合(Cでは
  rb_yield_values()とrb_yield_values2(), rb_yield_splat()),
  data2はArrayとしてパックされている.第三, 第四引数のargcと
  argvによってyieldされた値を取り出すことができる.

[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  func2をブロックとして設定し, func1をイテレータとして呼ぶ.
  func1には arg1が引数として渡され, func2には第1引数にイテレー
  タから与えられた値, 第2引数にarg2が渡される.

  1.9でrb_iterateを使う場合は, func1の中でRubyレベルのメソッド
  を呼び出さなければならない.
  1.9でobsoleteとなった. 代わりにrb_block_callが用意された.

VALUE rb_yield(VALUE val) ::

  valを値としてイテレータブロックを呼び出す.

VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  関数func1をarg1を引数に呼び出す.func1の実行中に例外が発生
  した時には func2をarg2を引数として呼ぶ.戻り値は例外が発生
  しなかった時はfunc1の戻り値, 例外が発生した時にはfunc2の戻
  り値である.

VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::

  関数func1をarg1を引数として実行し, 実行終了後(たとえ例外が
  発生しても) func2をarg2を引数として実行する.戻り値はfunc1
  の戻り値である(例外が発生した時は戻らない).

VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ::

  関数funcをargを引数として実行し, 例外が発生しなければその戻
  り値を返す.例外が発生した場合は, *stateに非0をセットして
  Qnilを返す.
  rb_jump_tag()を呼ばずに捕捉した例外を無視する場合には,
  rb_set_errinfo(Qnil)でエラー情報をクリアしなければならない.

void rb_jump_tag(int state) ::

  rb_protect()やrb_eval_string_protect()で捕捉された例外を再
  送する.stateはそれらの関数から返された値でなければならない.
  この関数は直接の呼び出し元に戻らない.

void rb_iter_break() ::

  現在の最も内側のブロックを終了する.この関数は直接の呼び出
  し元に戻らない.

void rb_iter_break_value(VALUE value) ::

  現在の最も内側のブロックをvalueで終了する.ブロックは引数で
  与えられたvalueを返す.この関数は直接の呼び出し元に戻らない.

== 例外・エラー

void rb_warning(const char *fmt, ...) ::

  rb_verbose時に標準エラー出力に警告情報を表示する.引数は
  printf()と同じ.

void rb_raise(rb_eRuntimeError, const char *fmt, ...) ::

  RuntimeError例外を発生させる.引数はprintf()と同じ.

void rb_raise(VALUE exception, const char *fmt, ...) ::

  exceptionで指定した例外を発生させる.fmt以下の引数は
  printf()と同じ.

void rb_fatal(const char *fmt, ...) ::

  致命的例外を発生させる.通常の例外処理は行なわれず, インター
  プリタが終了する(ただしensureで指定されたコードは終了前に
  実行される).

void rb_bug(const char *fmt, ...) ::

  インタープリタなどプログラムのバグでしか発生するはずのない
  状況の時呼ぶ.インタープリタはコアダンプし直ちに終了する.
  例外処理は一切行なわれない.

注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を
使ったVALUEの出力に使用されているため,整数には%dを使用すること.

== Rubyの初期化・実行

Rubyをアプリケーションに埋め込む場合には以下のインタフェース
を使う.通常の拡張ライブラリには必要ない.

void ruby_init() ::

  Rubyインタプリタの初期化を行なう.

void ruby_options(int argc, char **argv) ::

  Rubyインタプリタのコマンドライン引数の処理を行なう.

void ruby_run() ::

  Rubyインタプリタを実行する.

void ruby_script(char *name) ::

  Rubyのスクリプト名($0)を設定する.

== インタプリタのイベントのフック

  void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events,
                         VALUE data)

指定されたインタプリタのイベントに対するフック関数を追加します.
eventsは以下の値のorでなければなりません:

  RUBY_EVENT_LINE
  RUBY_EVENT_CLASS
  RUBY_EVENT_END
  RUBY_EVENT_CALL
  RUBY_EVENT_RETURN
  RUBY_EVENT_C_CALL
  RUBY_EVENT_C_RETURN
  RUBY_EVENT_RAISE
  RUBY_EVENT_ALL

rb_event_hook_func_tの定義は以下の通りです:

  typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
                                       VALUE self, ID id, VALUE klass)

rb_add_event_hook() の第3引数 data は,フック関数の第2引数と
して渡されます.これは1.8では現在のNODEへのポインタでした.以
下の RB_EVENT_HOOKS_HAVE_CALLBACK_DATA も参照してください.

  int rb_remove_event_hook(rb_event_hook_func_t func)

指定されたフック関数を削除します.

== 互換性のためのマクロ

APIの互換性をチェックするために以下のマクロがデフォルトで定義されています.

NORETURN_STYLE_NEW ::

  NORETURN マクロが関数型マクロとして定義されていることを意味する.

HAVE_RB_DEFINE_ALLOC_FUNC ::

  rb_define_alloc_func() 関数が提供されていること,つまり
  allocation framework が使われることを意味する.
  have_func("rb_define_alloc_func", "ruby.h")
  の結果と同じ.

HAVE_RB_REG_NEW_STR ::

  StringオブジェクトからRegexpオブジェクトを作る
  rb_reg_new_str() 関数が提供されていることを意味する.
  have_func("rb_reg_new_str", "ruby.h").
  の結果と同じ.

HAVE_RB_IO_T ::

  rb_io_t 型が提供されていることを意味する.

USE_SYMBOL_AS_METHOD_NAME ::

  メソッド名を返すメソッド,Module#methods, #singleton_methods
  などがSymbolを返すことを意味する.

HAVE_RUBY_*_H ::

  ruby.h で定義されている.対応するヘッダが提供されていること
  を意味する.たとえば,HAVE_RUBY_ST_H が定義されている場合は
  単なる st.h ではなく ruby/st.h を使用する.

RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::

  rb_add_event_hook() がフック関数に渡す data を第3引数として
  受け取ることを意味する.

= Appendix C. extconf.rbで使える関数たち

extconf.rbの中では利用可能なコンパイル条件チェックの関数は以
下の通りである.

have_macro(macro, headers) ::

  ヘッダファイルheaderをインクルードしてマクロmacroが定義さ
  れているかどうかチェックする.マクロが定義されている時true
  を返す.

have_library(lib, func) ::

  関数funcを定義しているライブラリlibの存在をチェックする.
  チェックに成功すると,-llibを$libsに追加し,trueを返す.

find_library(lib, func, path...) ::

  関数funcを定義しているライブラリlibの存在を -Lpath を追加
  しながらチェックする.チェックに成功すると,-llibを$libsに
  追加し,trueを返す.

have_func(func, header) ::

  ヘッダファイルheaderをインクルードして関数funcの存在をチェ
  ックする.funcが標準ではリンクされないライブラリ内のもので
  ある時には先にhave_libraryでそのライブラリをチェックしてお
  く事.チェックに成功すると,プリプロセッサマクロ
  `HAVE_{FUNC}` を定義し,trueを返す.

have_var(var, header) ::

  ヘッダファイルheaderをインクルードして変数varの存在をチェッ
  クする.varが標準ではリンクされないライブラリ内のものであ
  る時には先にhave_libraryでそのライブラリをチェックしておく
  事.チェックに成功すると,プリプロセッサマクロ
  `HAVE_{VAR}` を定義し,trueを返す.

have_header(header) ::

  ヘッダファイルの存在をチェックする.チェックに成功すると,
  プリプロセッサマクロ `HAVE_{HEADER_H}` を定義し,trueを返す.
  (スラッシュやドットはアンダースコアに置換される)

find_header(header, path...) ::

  ヘッダファイルheaderの存在を -Ipath を追加しながらチェック
  する.チェックに成功すると,プリプロセッサマクロ
  `HAVE_{HEADER_H}` を定義し,trueを返す.
  (スラッシュやドットはアンダースコアに置換される)

have_struct_member(type, member[, header[, opt]]) ::

  ヘッダファイルheaderをインクルードして型typeが定義され,
  なおかつメンバmemberが存在するかをチェックする.チェックに
  成功すると,プリプロセッサマクロ `HAVE_{TYPE}_{MEMBER}` を
  定義し,trueを返す.

have_type(type, header, opt) ::

  ヘッダファイルheaderをインクルードして型typeが存在するかを
  チェックする.チェックに成功すると,プリプロセッサマクロ
  `HAVE_TYPE_{TYPE}` を定義し,trueを返す.

check_sizeof(type, header) ::

  ヘッダファイルheaderをインクルードして型typeのchar単位�doc/alt-ruby21/BSDL000064400000002402150403130670007657 0ustar00config(withval[, default=nil]) ::

  コマンドライン上の--with-<withval>で指定されたオプション値
  を得る.

enable_config(config, *defaults) ::
disable_config(config, *defaults) ::

  コマンドライン上の--enable-<config>または
  --disable-<config>で指定された真偽値を得る.
  --enable-<config>が指定されていた場合はtrue,
  --disable-<config>が指定されていた場合はfalseを返す.
  どちらも指定されていない場合は,ブロックつきで呼び出されて
  いる場合は*defaultsをyieldした結果,ブロックなしなら
  *defaultsを返す.

dir_config(target[, default_dir]) ::
dir_config(target[, default_include, default_lib]) ::

  コマンドライン上の--with-<target>-dir, --with-<target>-include,
  --with-<target>-libのいずれかで指定されるディレクトリを
  $CFLAGS や $LDFLAGS に追加する.--with-<target>-dir=/pathは
  --with-<target>-include=/path/include --with-<target>-lib=/path/lib
  と等価である.追加された include ディレクトリと lib ディレ
  クトリの配列を返す. ([include_dir, lib_dir])

pkg_config(pkg, option=nil) ::

  pkg-configコマンドからパッケージpkgの情報を [cflags, ldflags, libdoc/alt-ruby21/COPYING000064400000004710150403130700010241 0ustar00張ライブラリ側の対応はほぼ不要です。

ただし、対応をすることで性能を向上することができる可能性があります。もし
拡張ライブラリに高い性能が必要である場合は対応を検討して下さい。

とくにRARRAY_PTR()/RHASH_TBL()のようなマクロを用いてポインタに直接アクセ
スするようなコードは書かないようにして下さい。代わりに、rb_ary_aref(),
rb_ary_store() などの、適切な API 関数を利用するようにして下さい。

そのほか、対応についての詳細は README.ext の「Appendix D. Generational
GC」を参照して下さい。

/*
 * Local variables:
 * fill-column: 60
 * end:
 */
doc/alt-ruby21/BSDL000064400000002402150403130670007657 0ustar00Copyright (C) 1993-2013 Yukihiro Matsumoto. 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 SUBSTIdoc/alt-ruby21/README000064400000012700150403130700010064 0ustar00doc/alt-ruby21/COPYING000064400000004710150403130700010241 0ustar00Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:

  1. You may make and give away verbatim copies of the source form of the
     software without restriction, provided that you duplicate all of the
     original copyright notices and associated disclaimers.

  2. You may modify your copy of the software in any way, provided that
     you do at least ONE of the following:

       a) place your modifications in the Public Domain or otherwise
          make them Freely Available, such as by posting said
	  modifications to Usenet or an equivalent medium, or by allowing
	  the author to include your modifications in the software.

       b) use the modified software only within your corporation or
          organization.

       c) give non-standard binaries non-standard names, with
          instructions on where to get the original software distribution.

       d) make other distribution arrangements with the author.

  3. You may distribute the software in object code or binary form,
     provided that you do at least ONE of the following:

       a) distribute the binaries and library files of the software,
	  together with instructions (in the manual page or equivalent)
	  on where to get the original distribution.

       b) accompany the distribution with the machine-readable source of
	  the software.

       c) give non-standard binaries non-standard names, with
          instructions on where to get the original software distribution.

       d) make other distribution arrangements with the author.

  4. You may modify and include the part of the software into any other
     software (possibly commercial).  But some files in the distribution
     are not written by the author, so that they are not under these terms.

     For the list of those files and their copying conditions, see the
     file LEGAL.

  5. The scripts and library files supplied as input to or produced as 
     output from the software do not automatically fall under the
     copyright of the software, but belong to whomever generated them, 
     and may be sold commercially, and may be aggregated with this
     software.

  6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     PURPOSE.
doc/alt-ruby21/README000064400000012700150403130700010064 0doc/alt-ruby21/BSDL000064400000002402150403130670007657 0ustar00ection
*   Dynamic Loading of Object files(on some architecture)
*   Highly Portable (works on many Unix-like/POSIX compatible platforms
    as well as Windows, Mac OS X, BeOS etc.)
    cf. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms


== How to get Ruby

For a complete list of ways to install Ruby, including using third party
tools like rvm, see:

http://www.ruby-lang.org/en/downloads/

The Ruby distribution files can be found in the following FTP site:

ftp://ftp.ruby-lang.org/pub/ruby/

The trunk of the Ruby source tree can be checked out with the
following command:

  $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby

Or if you are using git then use the following command:

  $ git clone git://github.com/ruby/ruby.git

There are some other branches under development.  Try the following
command and see the list of branches:

  $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/

Or if you are using git then use the following command:

  $ git ls-remote git://github.com/ruby/ruby.git

== Ruby home-page

The URL of the Ruby home-page is:

http://www.ruby-lang.org/


== Mailing list

There is a mailing list to talk about Ruby.
To subscribe this list, please send the following phrase

        subscribe YourFirstName YourFamilyNdoc/alt-ruby21/GPL000064400000043254150403130700007561 0ustar00d.

4.   Remove comment mark(<tt>#</tt>) before the module names from +ext/Setup+
     (or add module names if not present), if you want to link modules
     statically.

     If you don't want to compile non static extension modules
     (probably on architectures which does not allow dynamic loading),
     remove comment mark from the line "<tt>#option nodynamic</tt>" in
     +ext/Setup+.

     Usually this step will not be needed.

5.   Run +make+.

6.   Optionally, run '<tt>make check</tt>' to check whether the compiled Ruby
     interpreter works well. If you see the message "<tt>check succeeded</tt>",
     your ruby works as it should (hopefully).

7.   Run '<tt>make install</tt>'

     This command will create following directories and install files
     onto them.

     * <tt>${DESTDIR}${prefix}/bin</tt>
     * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
     * <tt>${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}</tt>
     * <tt>${DESTDIR}${prefix}/share/man/man1</tt>
     * <tt>${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system</tt>

     If Ruby's API version is '_x.y.z_', the <tt>${MAJOR}</tt> is '_x_', the
     <tt>${MINOR}</tt> is '_y_', and the <tt>${TEENY}</tt> is '_z_'.

     *NOTE*: teeny of the API version may be different from one of
     Ruby's program version

     You may have to be a super user to install ruby.

If you fail to compile ruby, please send the detailed error report with
the error log and machine/OS type, to help others.

Some extension libraries may not get compiled because of lack of
necessary external libraries and/or headers, then you will need to run
'<tt>make distclean-ext</tt>' to remove odoc/alt-ruby21/README000064400000012700150403130700010064 0ustar00doc/alt-ruby21/GPL000064400000043254150403130700007561 0ustar00                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
  doc/alt-ruby21/GPL000064400000043254150403130700007561 0ustar00am under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALdoc/alt-ruby21-rubygems/LICENSE.txt000064400000004331150403130710012664 0ustar00se to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovisman/man1/bundle-plugin.1000064400000004425150403131710011002 0ustar00doc/alt-ruby21-rubygems/LICENSE.txt000064400000004331150403130710012664 0ustar00RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
Weirich and others.  You can redistribute it and/or modify it under
either the terms of the MIT license (see the file MIT.txt), or the
conditions below:

1. You may make and give away verbatim copies of the source form of the
   software without restriction, provided that you duplicate all of the
   original copyright notices and associated disclaimers.

2. You may modify your copy of the software in any way, provided that
   you do at least ONE of the following:

   a. place your modifications in the Public Domain or otherwise
      make them Freely Available, such as by posting said
      modifications to Usenet or an equivalent medium, or by allowing
      the author to include your modifications in the software.

   b. use the modified software only within your corporation or
      organization.

   c. give non-standard executables non-standard names, with
      instructions on where to get the original software distribution.

   d. make other distribution arrangements with the author.

3. You may distribute the software in object code or executable
   form, provided that you do at least ONE of the following:

   a. distribute the executables and library files of the software,
      together with instructions (in the manual page or equivalent)
      on where to get the original distribution.

   b. accompany the distribution with the machine-readable source of
      the software.

   c. give non-standard executables non-standard names, with
      instructions on where to get the original software distribution.

   d. make other distribution arrangements with the author.

4. You may modify and include the part of the software into any other
   software (possibly commercial).

5. The scripts and library files sman/man1/bundle-help.1000064400000000705150403131710010431 0ustar00man/man1/bundle-plugin.1000064400000004425150403131710011002 0ustar00man/man1/bundle-console.1000064400000003221150403131710011137 0ustar00ou can install, uninstall, and list plugin(s) with this command to extend functionalities of Bundler\.
.
.SH "SUB\-COMMANDS"
.
.SS "install"
Install the given plugin(s)\.
.
.IP "\(bu" 4
\fBbundle plugin install bundler\-graph\fR: Install bundler\-graph gem from RubyGems\.org\. The global source, specified in source in Gemfile is ignored\.
.
.IP "\(bu" 4
\fBbundle plugin install bundler\-graph \-\-source https://example\.com\fR: Install bundler\-graph gem from example\.com\. The global source, specified in source in Gemfile is not considered\.
.
.IP "\(bu" 4
\fBbundle plugin install bundler\-graph \-\-version 0\.2\.1\fR: You can specify the version of the gem via \fB\-\-version\fR\.
.
.IP "\(bu" 4
\fBbundle plugin install bundler\-graph \-\-git https://github\.com/rubygems/bundler\-graph\fR: Install bundler\-graph gem from Git repository\. \fB\-\-git\fR can be replaced with \fB\-\-local\-git\fR\. You cannot use both \fB\-\-git\fR and \fB\-\-local\-git\fR\. You can use standard Git URLs like:
.
.IP "\(bu" 4
\fBssh://[user@]host\.xz[:port]/path/to/repo\.git\fR
.
.IP "\(bu" 4
\fBhttp[s]://host\.xz[:port]/path/to/repo\.git\fR
.
.IP "\(bu" 4
\fB/path/to/repo\fR
.
.IP "\(bu" 4
\fBfiledoc/alt-ruby21-rubygems/LICENSE.txt000064400000004331150403130man/man1/bundle-version.1000064400000001200150403131750011161 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-HELP" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-help\fR \- Displays detailed help for each subcommand
.
.SH "SYNOPSIS"
\fBbundle help\fR [COMMAND]
.
.SH "DESCRIPTION"
Displays detailed help for the given subcommand\. You can specify a single \fBCOMMAND\fR at the same time\. When \fBCOMMAND\fR is omitted, help for \fBhelp\fR command will be displayed\.
man/man1/bundle-console.100006440000man/man1/bundle-cache.1000064400000006632150403131770010557 0ustar00\fR are preliminarily loaded\.
.
.P
If \fBGROUP\fR is specified, all gems in the given group in the Gemfile in addition to the gems in \fBdefault\fR group are loaded\. Even if the given group does not exist in the Gemman/man1/bundle-plugin.1000064400000004162150403131710011000 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-PLUGIN" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-plugin\fR \- Manage Bundler plugins
.SH "SYNOPSIS"
\fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR] [\-\-path=\fIpath\fR]
.br
\fBbundle plugin\fR uninstall PLUGINS
.br
\fBbundle plugin\fR list
.br
\fBbundle plugin\fR help [COMMAND]
.SH "DESCRIPTION"
You can install, uninstall, and list plugin(s) with this command to extend functionalities of Bundler\.
.SH "SUB\-COMMANDS"
.SS "install"
Install the given plugin(s)\.
.TP
\fBbundle plugin install bundler\-graph\fR
Install bundler\-graph gem from globally configured sources (defaults to RubyGems\.org)\. The global source, specified in source in Gemfile is ignored\.
.TP
\fBbundle plugin install bundler\-graph \-\-source https://example\.com\fR
Install bundler\-graph gem from example\.com\. The global source, specified in source in Gemfile is not considered\.
.TP
\fBbundle plugin install bundler\-graph \-\-version 0\.2\.1\fR
You can specify the version of the gem via \fB\-\-version\fR\.
.TP
\fBbundle plugin install bundler\-graph \-\-git https://github\.com/rubygems/bundler\-graph\fR
Install bundler\-graph gem from Git repository\. You can use standard Git URLs like:
.IP
\fBssh://[user@]host\.xz[:port]/path/to/repo\.git\fR
.br
\fBhttp[s]://host\.xz[:port]/path/to/repo\.git\fR
.br
\fB/path/to/repo\fR
.br
\fBfile:///path/to/repo\fR
.IP
When you specify \fB\-\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\.
.TP
\fBbundle plugin install bundler\-graph \-\-path \.\./bundler\-graph\fR
Install bundler\-graph gem from a local path\.
.SS "uninstall"
Uninstall the plugin(s) specified in PLUGINS\.
.SS "list"
List the installed plugins and available commands\.
.P
No options\.
.SS "help"
Describe subcommands or one specific subcommand\.
.P
No options\.
.SH "SEE ALSO"
.IP "\(bu" 4
How to write a Bundler plugin \fIhttps://bundler\.io/guides/bundler_plugins\.html\fR
.IP "" 0

gems/specifications/rdoc-6.5.1.1.gemspec000064400000013370150403132030013575 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-HELP" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-help\fR \- Displays detailed help for each subcommand
.SH "SYNOPSIS"
\fBbundle help\fR [COMMAND]
.SH "DESCRIPTION"
Displays detailed help for the given subcommand\. You can specify a single \fBCOMMAND\fR at the same time\. When \fBCOMMAND\fR is omitted, help for \fBhelp\fR command will be displayed\.
man/man1/bundle-console.1000064400000002675150403131710011153 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CONSOLE" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
.SH "SYNOPSIS"
\fBbundle console\fR [GROUP]
.SH "DESCRIPTION"
Starts an interactive Ruby console session in the context of the current bundle\.
.P
If no \fBGROUP\fR is specified, all gems in the \fBdefault\fR group in the Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR are preliminarily loaded\.
.P
If \fBGROUP\fR is specified, all gems in the given group in the Gemfile in addition to the gems in \fBdefault\fR group are loaded\. Even if the given group does not exist in the Gemfile, IRB console starts without any warning or error\.
.P
The environment variable \fBBUNDLE_CONSOLE\fR or \fBbundle config set console\fR can be used to change the shell from the following:
.IP "\(bu" 4
\fBirb\fR (default)
.IP "\(bu" 4
\fBpry\fR (https://github\.com/pry/pry)
.IP "\(bu" 4
\fBripl\fR (https://github\.com/cldwalker/ripl)
.IP "" 0
.P
\fBbundle console\fR uses irb by default\. An alternative Pry or Ripl can be used with \fBbundle console\fR by adjusting the \fBconsole\fR Bundler setting\. Also make sure that \fBpry\fR or \fBripl\fR is in your Gemfile\.
.SH "EXAMPLE"
.nf
$ bundle config set console pry
$ bundle console
Resolving dependencies\|\.\|\.\|\.
[1] pry(main)>
.fi
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR
man/man1/bundle-version.1000064400000001152150403131750011167 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-VERSION" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-version\fR \- Prints Bundler version information
.SH "SYNOPSIS"
\fBbundle version\fR
.SH "DESCRIPTION"
Prints Bundler version information\.
.SH "OPTIONS"
No options\.
.SH "EXAMPLE"
Print the version of Bundler with build date and commit hash of the in the Git source\.
.IP "" 4
.nf
bundle version
.fi
.IP "" 0
.P
shows \fBBundler version 2\.3\.21 (2022\-08\-24 commit d54be5fdd8)\fR for example\.
.P
cf\. \fBbundle \-\-version\fR shows \fBBundler version 2\.3\.21\fR\.
man/man1/bundle-cache.1000064400000010217150403131770010551 0ustar00.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CACHE" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
.SH "SYNOPSIS"
\fBbundle cache\fR [\fIOPTIONS\fR]
.P
alias: \fBpackage\fR, \fBpack\fR
.SH "DESCRIPTION"
Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
.SH "OPTIONS"
.TP
\fB\-\-all\fR
Include all sources (including path and git)\.
.TP
\fB\-\-all\-platforms\fR
Include gems for all platforms present in the lockfile, not only the current one\.
.TP
\fB\-\-cache\-path=CACHE\-PATH\fR
Specify a different cache path than the default (vendor/cache)\.
.TP
\fB\-\-gemfile=GEMFILE\fR
Use the specified gemfile instead of Gemfile\.
.TP
\fB\-\-no\-install\fR
Don't install the gems, only update the cache\.
.TP
\fB\-\-no\-prune\fR
Don't remove stale gems from the cache\.
.TP
\fB\-\-path=PATH\fR
Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME)\.
.TP
\fB\-\-quiet\fR
Only output warnings and errors\.
.TP
\fB\-\-frozengems/specifications/ruby-lsapi-5.6.gemspec000064400000001673150403132040014443 0ustar00 if you run \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
.P
For instance, consider this Gemfile(5):
.IP "" 4
.nf
source "https://rubygems\.org"

gem "nokogiri"
.fi
.IP "" 0
.P
If you run \fBbundle cache\fR under C Ruby, bundler will retrieve the version of \fBnokogiri\fR for the \fB"ruby"\fR platform\. If you deploy to JRuby and run \fBbundle install\fR, bundler is forced to check to see whether a \fB"java"\fR platformed \fBnokogiri\fR exists\.
.P
Even though the \fBnokogiri\fR gem for the Ruby platform is \fItechnically\fR acceptable on JRuby, it has a C extension that does not run on JRuby\. As a result, bundler will, by default, still connect to \fBrubygems\.org\fR to check whether it has a version of one of your gems more specifgems/specifications/rack-3.0.8.gemspec000064400000003437150403132040013432 0ustar00che\fR on an identical machine and check in the gems\. For instance, you can run \fBbundle cache\fR on an identical staging box during your staging process, and check in the \fBvendor/cache\fR before deploying to production\.
.P
By default, bundle cache(1) \fIbundle\-cache\.1\.html\fR fetches and also installs the gems to the default location\. To package the dependencies to \fBvendor/cache\fR without installing them to the local install location, you can run \fBbundle cache \-\-no\-install\fR\.
.SH "HISTORY"
In Bundler 2\.1, \fBcache\fR took in the functionalities of \fBpackage\fR and now \fBpackage\fR and \fBpack\fR are aliases of \fBcache\fR\.
gems/specifications/rdoc-6.5.1.1.gemspec000064400000013370150403132030013575 0ustar00new(">= 2.5.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "RDoc produces HTML and command-line documentation for Ruby projects".freeze

  s.specification_version = 4

  s.add_runtime_dependency(%q<psych>.freeze, [">= 4.0.0"])
end
gems/specifications/bigdecimal-3.1.3.gemspec000064400000002250150403132050014557 0ustar00# -*- encoding: utf-8 -*-
# stub: ruby-lsapi 5.6 ruby lib
# stub: ext/lsapi/extconf.rb

Gem::Specification.new do |s|
  s.name = "ruby-lsapi".freeze
  s.version = "5.6"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["LiteSpeed Technologies Inc.".freeze]
  s.date = "2024-01-22"
  s.description = "This is a ruby extension for fast communication with LiteSpeed Web Server.".freeze
  s.email = "info@litespeedtech.com".freeze
  s.extensions = ["ext/lsapi/extconf.rb".freeze]
  s.extra_rdoc_files = ["README".freeze]
  s.files = ["README".freeze, "ext/lsapi/extconf.rb".freeze]
  s.homepage = "http://www.litespeedtech.com/".freeze
  s.rubygems_version = "3.4.10".freeze
  s.summary = "A ruby extension for fast communication with LiteSpeed Web Server.".freeze

  s.installed_by_version = "3.4.10" if s.respond_to? :installed_by_version
end
gems/specifications/rack-3.0.8.gemspec000064400000003437150403132040013432 0gems/specifications/psych-5.0.1.gemspec000064400000005227150403132060013634 0ustar00 } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Leah Neukirchen".freeze]
  s.date = "2023-06-14"
  s.description = "Rack provides a minimal, modular and adaptable interface for developing\nweb applications in Ruby. By wrapping HTTP requests and responses in\nthe simplest way possible, it unifies and distills the API for web\nservers, web frameworks, and software in between (the so-called\nmiddleware) into a single method call.\n".freeze
  s.email = "leah@vuxu.org".freeze
  s.extra_rdoc_files = ["README.md".freeze, "CHANGELOG.md".freeze, "CONTRIBUTING.md".freeze]
  s.files = ["CHANGELOG.md".freeze, "CONTRIBUTING.md".freeze, "README.md".freeze]
  s.homepage = "https://github.com/rack/rack".freeze
  s.licenses = ["MIT".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.4.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "A modular Ruby webserver interface.".freeze

  s.installed_by_version = "3.4.19" if s.respond_to? :installed_by_version

  s.specification_version = 4

  s.add_development_dependency(%q<minitest>.freeze, ["~> 5.0"])
  s.add_development_dependency(%q<minitest-global_expectations>.freeze, [">= 0"])
  s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
  s.add_development_dependency(%q<rake>.freeze, [">= 0"])
end
gems/specifications/bigdecimal-3.1.3.gemspec000064400000002250150403132050014557 0ustar00# -*- encoding: utf-8 -*-
# stub: bigdecimal 3.1.3 ruby lib
# stub: ext/bigdecimal/extconf.rb

Gem::Specification.new do |s|
  s.name = "bigdecimal".freeze
  s.version = "3.1.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Kenta Murata".freeze, "Zachary Scott".freeze, "Shigeo Kobayashi".freeze]
  s.date = "2025-03-26"
  s.description = "This library provides arbitrary-precision decimal floating-point number class.".freeze
  s.email = ["mrkn@mrkn.jp".freeze]
  s.extensions = ["ext/bigdecimal/extconf.rb".freeze]
  s.files = ["ext/bigdecimagems/specifications/json-2.6.3.gemspec000064400000004320150403132060013455 0ustar00# -*- encoding: utf-8 -*-
# stub: ruby-lsapi 5.6 ruby lib
# stub: ext/lsapi/extconf.rb

Gem::Specification.new do |s|
  s.name = "ruby-lsapi".freeze
  s.version = "5.6".freeze

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["LiteSpeed Technologies Inc.".freeze]
  s.date = "2024-01-22"
  s.description = "This is a ruby extension for fast communication with LiteSpeed Web Server.".freeze
  s.email = "info@litespeedtech.com".freeze
  s.extensions = ["ext/lsapi/extconf.rb".freeze]
  s.extra_rdoc_files = ["README".freeze]
  s.files = ["README".freeze, "ext/lsapi/extconf.rb".freeze]
  s.homepage = "http://www.litespeedtech.com/".freeze
  s.rubygems_version = "3.6.2".freeze
  s.summary = "A ruby extension for fast communication with LiteSpeed Web Server.".freeze

  s.installed_by_version = "3.6.2".freeze
end
gems/specifications/rack-3.0.8.gemspec000064400000003440150403132040013424 0ustar00# -*- encoding: utf-8 -*-
# stub: rack 3.0.8 ruby lib

Gem::Specification.new do |s|
  s.name = "rack".freeze
  s.version = "3.0.8".freeze

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "bug_tracker_uri" => "https://github.com/rack/rack/issues", "changelog_uri" => "https://github.com/rack/rack/blob/main/CHANGELOG.md", "documentation_uri" => "https://rubydoc.info/github/rack/rack", "source_code_uri" => "https://github.com/rack/rack" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Leah Neukirchen".freeze]
  s.date = "2023-06-14"
  s.description = "Rack provides a minimal, modular and adaptable integems/specifications/default/drb-2.1.1.gemspec000064400000002525150403132100014670 0ustar00evelopment_dependency(%q<minitest>.freeze, ["~> 5.0".freeze])
  s.add_development_dependency(%q<minitest-global_expectations>.freeze, [">= 0".freeze])
  s.add_development_dependency(%q<bundler>.freeze, [">= 0".freeze])
  s.add_development_dependency(%q<rake>.freeze, [">= 0".freeze])
end
gems/specifications/bigdecimal-3.1.3.gemspec000064400000002250150403132050014557 0ustar00# -*- encoding: utf-8 -*-
# stub: json 2.6.3 ruby lib
# stub: ext/json/ext/generator/extconf.rbext/json/ext/parser/extconf.rbext/json/extconf.rb

Gem::Specification.new do |s|
  s.name = "json".freeze
  s.version = "2.6.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  gems/specifications/default/fileutils-1.7.0.gemspec000064400000001625150403132100016125 0ustar00"ext/json/ext/parser/extconf.rb".freeze, "ext/json/extconf.rb".freeze]
  s.extra_rdoc_files = ["README.md".freeze]
  s.files = ["README.md".freeze, "ext/json/ext/generagems/specifications/psych-5.0.1.gemspec000064400000005227150403132060013634 0ustar00gems/specifications/default/benchmark-0.2.1.gemspec000064400000001650150403132110016051 0ustar00gems/specifications/default/drb-2.1.1.gemspec000064400000002525150403132100014670 0ustar00# -*- encoding: utf-8 -*-
# stub: drb 2.1.1 ruby lib

Gem::Specification.new do |s|
  s.name = "drb".freeze
  s.version = "2.1.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/drb", "source_code_uri" => "https://github.com/ruby/drb" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freezegems/specifications/default/stringio-3.0.4.gemspec000064400000001621150403132110015757 0ustar00.com/ruby/drb".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.7.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Distributed object system for Ruby".freeze

  s.specification_version = 4

  s.add_runtime_dependency(%q<ruby2_keywords>.freeze, [">= 0"])
end
gems/specifications/default/fileutils-1.7.0.gemspec00006440000000162515040313210001gems/specifications/default/readline-0.0.3.gemspec000064400000001774150403132120015712 0ustar00ing, moving, removing, etc.".freeze
  s.email = [nil]
  s.files = ["lib/fileutils.rb".freeze]
  s.homepage = "https://github.com/ruby/fileutils".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Several file utility methods for copying, moving, removing, etc.".freeze
end
gems/specifications/default/benchmark-0.2.1.gemspec000064400000001650150403132110016051 0ustar00gems/specifications/default/readline-ext-0.1.5.gemspec000064400000002051150403132130016501 0ustar00.freeze
  s.date = "2025-03-26"
  s.description = "a performance benchmarking library".freeze
  s.email = ["matz@ruby-lang.org".freeze]
  s.files = ["lib/benchmark.rb".freeze, "lib/benchmark/version.rb".freeze]
  s.homepage = "https://github.com/ruby/benchmark".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.rubygems_version = "3.4.19".freeze
  s.summary = "a performance benchmarking library".freeze
end
gems/specifications/default/stringio-3.0.4.gemspec000064400000001621150403132110015757 0gems/specifications/default/drb-2.1.1.gemgems/specifications/default/open-uri-0.3.0.gemspec000064400000002232150403132130015654 0ustar00gems/specifications/default/readline-0.0.3.gemspec000064400000001774150403132120015712 0ustar00# -*- encoding: utf-8 -*-
# stub: readline 0.0.3 ruby lib

Gem::Specification.new do |s|
  s.name = "readline".freeze
  s.version = "0.0.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["aycabta".freeze]
  s.date = "2025-03gems/specifications/default/fileutils-1.7.0.gemspec00006440000000162515040313210001612gems/specifications/default/delegate-0.3.0.gemspec000064400000001741150403132140015675 0ustar00# -*- encoding: utf-8 -*-
# stub: readline-ext 0.1.5 ruby lib
# stub: ext/readline/extconf.rb

Gem::Specification.new do |s|
  s.name = "readline-ext".freeze
  s.version = "0.1.5"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/readline-ext", "source_code_uri" => "https://githubgems/specifications/default/benchmark-0.2.1.gemspec000064400000001650150403132110016051 0ustar00gems/specifications/default/find-0.1.1.gemspec000064400000001742150403132150015044 0ustar00gems/specifications/default/open-uri-0.3.0.gemspec000064400000002232150403132130015654 0ustar00gems/specifications/default/stringio-3.0.4.gemspec000064400000001621150403132110015757 0ustar00gems/specifications/default/open3-0.1.2.gemspec000064400000001702150403132150015145 0ustar00_dependency(%q<uri>.freeze, [">= 0"])
  s.add_runtime_dependency(%q<stringio>.freeze, [">= 0"])
  s.add_runtime_dependency(%q<time>.freeze, [">= 0"])
end
gems/specifications/default/readline-0.0.3.gemspec000064400000001774150403132120015712 0ustar00gems/specifications/default/reline-0.3.2.gemspec000064400000002737150403132160015413 0ustar00"
  s.description = "Provides three abilities to delegate method calls to an object.".freeze
  s.email = ["matz@ruby-lang.org".freeze]
  s.files = ["lib/delegate.rb".freeze]
  s.homepage = "https://github.com/ruby/delegate".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.7".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Provides three abilities to delegate method calls to an object.".freeze
end
gems/specifications/default/readline-ext-0.1.5.gemspec000064400000002051150403132130016501 0ustar00# -*- encoding: utf-8 -*-
# stub: find 0.1.1 ruby lib

Gem::Specification.new do |s|
  s.name = "find".freeze
  s.version = "0.1.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/find", "source_code_uri" => "https://github.com/ruby/find" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Kazuki Tsujimoto".freeze]
  s.bingems/specifications/default/ostruct-0.5.5.gemspec000064400000001724150403132170015641 0ustar00gems/specifications/default/open3-0.1.2.ggems/specifications/default/open-uri-0.3.0.gemspec000064400000002232150403132130015654 0ustar00gems/specifications/default/syntax_suggest-1.1.0.gemspec000064400000004564150403132170017222 0ustar00gems/specifications/default/reline-0.3.2.gemspec000064400000002737150403132160015413 0ustar00# -*- encoding: utf-8 -*-
# stub: reline 0.3.2 ruby lib

Gem::Specification.new do |s|
  s.name = "reline".freeze
  s.version = "0.3.2"

  s.required_rubygems/specifications/default/delegate-0.3.0.gemspec000064400000001741150403132140015675 0ustar00unicode/east_asian_width.rb".freeze, "lib/reline/version.rb".freeze, "lib/reline/windows.rb".freeze]
  s.homepage = "https://github.com/ruby/reline".freeze
  s.licenses = ["Ruby".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.6".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Alternative GNU Readline or Editline implementation by pure Ruby.".freeze

  s.specification_version = 4

  s.add_runtime_dependency(%q<io-console>.freeze, ["~> 0.5"])
end
gems/specifications/default/ostruct-0.5.5.gemspec000064400000001724150403132170015641 0ustar00gems/specifications/default/pp-0.4.0.gemspec000064400000001776150403132200014550 0ustar00ct.rb".freeze]
  s.homepage = "https://github.com/ruby/ostruct".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Class to build custom data structures, similar to a Hash.".freeze

  s.specification_version = 4

  s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
  s.add_development_dependency(%q<rake>.freeze, [">= 0"])
end
gems/specifications/default/syntax_suggest-1.1.0.gemspec000064400000004564150403132170017222 0ustar00gems/specifications/default/pstore-0.1.2.gemspec000064400000001605150403132210015434 0ustar00  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "When you get an \"unexpected end\" in your syntax this gem helps you find it".freeze
  s.email = ["richard.schneeman+foo@gmail.com".freeze]
  s.executables = ["syntax_suggest".freeze]
  s.files = ["exe/syntax_suggest".freeze, "lib/syntax_suggest.rb".freeze, "lib/syntax_suggest/api.rb".freeze, "lib/syntax_suggest/around_block_scan.rb".freeze, "lib/syntax_suggest/block_expand.rb".freeze, "lib/syntax_suggest/capture/before_after_keyword_ends.rb".freeze, "lib/syntax_suggest/capture/falling_indent_lines.rb".freeze, "lib/syntax_suggest/capture_code_context.rb".freeze, "lib/syntax_suggest/clean_document.rb".freeze, "lib/syntax_suggest/cli.rb".freeze, "lib/syntax_suggest/code_block.rb".freeze, "lib/syntax_suggest/code_frontier.rb".freeze, "lib/syntax_suggest/code_line.rb".freeze, "lib/syntax_suggest/code_search.rb".freeze, "lib/gems/specifications/default/tmpdir-0.1.3.gemspec000064400000002104150403132210015413 0ustar00.freeze, "lib/syntax_suggest/unvisited_lines.rb".freeze, "lib/syntax_suggest/version.rb".freeze]
  s.homepage = "https://github.com/ruby/syntax_suggest.git".freeze
  s.licenses = ["MIT".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Find syntax errors in your source in a snap".freeze
end
gems/specifications/default/pp-0.4.0.gemspec000064400000001776150403132200014550 0ustar00# -*- encoding: utf-8 -*-
# stub: pp 0.4.0 ruby lib

Gem::Specificatgems/specifications/default/base64-0.1.1.gemspec000064400000002005150403132220015177 0ustar00gems/specifications/default/pstore-0.1.2.gemspec000064400000001605150403132210015434 0ustar00# -*- encoding: utf-8 -*-
# stub: pstore 0.1.2 ruby lib

Gem::Specification.new do |s|
  s.name = "pstore".freeze
  s.version = "0.1.2"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/pstore", "source_code_uri" => "https://github.com/ruby/pstore" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Yukihiro Matsugems/gems/specifications/default/zlib-3.0.0.gemspec000064400000001676150403132230015072 0ustar00# -*- encoding: utf-8 -*-
# stub: tmpdir 0.1.3 ruby lib

Gem::Specification.new do |s|
  s.name = "tmpdir".freeze
  s.version = "0.1.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/tmpdir", "source_code_uri" => "https://github.com/ruby/tmpdir" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Yukihiro Matsumoto".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Extends the Dir class to manage the OS temporary file path.".freeze
  s.email = ["matz@ruby-lang.org".freeze]
  s.files = ["lib/tmpdir.rb".freeze]
  s.homepage = "https://github.com/ruby/tmpdir".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.7.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Extends the Dir class to managems/specifications/default/racc-1.6.2.gemspec000064400000003454150403132230015044 0ustar00gems/specifications/default/base64-0.1.1.gemspec000064400000002005150403132220015177 0ustar00gems/specifications/default/pp-0.4.0.gemspec000064400000001776150403132200014550 0ustar00 "2025-03-26"
  s.description = "Support for encoding and decoding binary data using a Base64 representation.".freeze
  s.email = ["mame@ruby-lang.org".freeze]
  s.files = ["lib/base64.rb".freeze]
  s.homepage = "https://github.com/ruby/base64".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Support for encoding and decoding binary data using a Base64 representation.".freeze
end
gems/specifications/default/cgi-0.3.7.gemspec000064400000002322150403132240014671 0ustar00# -*- encoding: utf-8 -*-
# stub: zlib 3.0.0 ruby lib
# stub: ext/zlib/extconf.rb

Gem::Specification.new do |s|
  s.name = "zlib".freeze
  s.version = "3.0.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Yukihiro Matsumoto".freeze, "UENO Katsuhiro".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Ruby interface for the zlib compression/decompression library".freeze
  s.email = ["matz@ruby-lang.org".freeze, nil]
  s.extensions = ["ext/zlib/extconf.rb".freeze]
  s.files = ["ext/zlib/extconf.rb".freeze]
  s.homepage = "https://github.com/ruby/zlib".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Ruby interface fogems/specifications/default/tmpdir-0.1.3.gemspec000064400000002104150403132210015413 0gems/specifications/default/csv-3.2.6.gemspec000064400000003326150403132240014730 0ustar00ogram.\n\n  NOTE: Ruby 1.8.x comes with Racc runtime module.  You\n  can run your parsers generated by racc 1.4.x out of the\n  box.\n".freeze
  s.email = [nil, "aaron@tenderlovemaking.com".freeze]
  s.executables = ["racc".freeze]
  s.extensions = ["ext/racc/cparse/extconf.rb".freeze]
  s.extra_rdoc_files = ["README.ja.rdoc".freeze, "README.rdoc".freeze]
  s.files = ["README.ja.rdoc".freeze, "README.rdoc".freeze, "bin/racc".freeze, "ext/racc/cparse/extconf.rb".freeze, "lib/racc.rb".freeze, "lib/racc/compat.rb".freeze, "lib/racc/debugflags.rb".freeze, "lib/racc/exception.rbgems/specifications/default/base64-0.1.1.gemspec000064400000002005150403132220015177 0ustar00gems/specifications/default/cgi-0.3.7.gemspec000064400000002322150403132240014671 0gems/specifications/default/openssl-3.1.0.gemspec000064400000003163150403132250015611 0ustar00 = "2gems/specifications/default/zlib-3.0.0.gemspec000064400000001676150403132230015072 0ustar00gems/specifications/default/csv-3.2.6.gemspec000064400000003326150403132240014730 0ustar00# -*- encoding: utf-8 -*-
# stub: csv 3.2.6 ruby lib

Gem::Specification.new do |s|
  s.name = "csv".freeze
  s.vergems/specifications/default/resolv-replace-0.1.1.gemspec000064400000002023150403132260017042 0ustar00freeze, "lib/csv/row.rb".freeze, "lib/csv/table.rb".freeze, "lib/csv/version.rb".freeze, "lib/csv/writer.rb".freeze]
  s.homepage = "https://github.com/ruby/csv".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.rdoc_options = ["--main".freeze, "README.md".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "CSV Reading and Writing".freeze

  s.specification_version = 4

  s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
  s.add_development_dependency(%q<rake>.freeze, [">= 0"])
  s.add_development_dependency(%q<benchmark_driver>.freeze, [">= 0"])
  s.add_development_dependency(%q<test-unit>.freeze, [">= 3.4.8"])
end
gems/specificationsgems/specifications/default/strscan-3.0.7.gemspec000064400000001721150403132260015610 0ustar00gems/specifications/default/cgi-0.3.7.gemspec000064400000002322150403132240014671 0ustar00.freeze, "lib/openssl/cipher.rb".freeze, "lib/openssl/digest.rb".freeze, "lib/openssl/hmac.rb".freeze, "lib/openssl/marshal.rb".freeze, "lib/openssl/pkcs5.rb".freeze, "lib/openssl/pkey.rb".freeze, "lib/openssl/ssl.rb".freeze, "lib/openssl/version.rb".freeze, "lib/openssl/x509.rb".freeze]
  s.homepage = "https://github.com/ruby/openssl".freeze
  s.licenses = ["Ruby".freeze]
  s.rdoc_options = ["--main".freeze, "README.md".freeze]
  s.required_ruby_version = Gem:gems/specifications/default/did_you_mean-1.6.3.gemspec000064400000003635150403132270016576 0ustar00gems/specifications/default/resolv-replace-0.1.1.gemspec000064400000002023150403132260017042 0gems/specifications/default/csv-3.2.6.gemspec000064400000003326150403132240014730 0ustar00date = "2025-03-26"
  s.description = "Replace Socket DNS with Resolv.".freeze
  s.email = ["akr@fsij.org".freeze]
  s.files = ["lib/resolv-replace.rb".freeze]
  s.homepage = "https://github.com/ruby/resolv-replace".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Replace Socket DNS with Resolv.".freeze

  s.specification_version = 4

  s.add_runtime_dependency(%q<resolv>.freeze, [">= 0"])
end
gems/specifications/default/weakref-0.1.2.gemspec000064400000001765150403132300015553 0ustar00# -*- encoding: utf-8 -*-
# stub: strscan 3.0.7 ruby lib
# stub: ext/strscan/extconf.rb

Gem::Specification.new do |s|
  s.name = "strscan".freeze
  s.version = "3.0.7"

  s.required_rubygems_version = Gem::Requiregems/specifications/default/openssl-3.1.0.gemspec000064400000003163150403132250015611 0ustar00gems/specifications/default/timeout-0.3.1.gemspec000064400000001621150403132300015605 0ustar00# -*- encoding: utf-8 -*-
# stub: did_you_mean 1.6.3 ruby lib

Gem::Specification.new do |s|
  s.name = "did_you_mean".freeze
  s.version = "1.6.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Yuki Nishijima".freeze]
  s.date = "2025-03-26"
  s.description = "The gem that has been saving people from typos since 2014.".freeze
  s.email = ["mail@yukinishijima.net".freeze]
  s.files = ["lib/did_you_mean.rb".freeze, "lib/did_you_mean/core_ext/name_error.rb".freeze, "lib/did_you_mean/experimental.rb".freeze, "lib/did_you_mean/formatter.rb".freeze, "lib/did_you_mean/formatters/plain_formatter.rb".freeze, "lib/did_you_mean/formatters/verbose_formatter.rb".freeze, "lib/did_you_mean/jaro_winkler.rb".freeze, "lib/did_you_mean/levenshtein.rb".freeze, "lib/did_you_mean/spell_checker.rb".freeze,gems/specifications/default/date-3.3.3.gemspec000064400000001616150403132310015046 0ustar00gems/specifications/default/resolv-replace-0.1.1.gemspec000064400000002023150403132260017042 0ustar00gems/specifications/default/weakref-0.1.2.gemspec000064400000001765150403132300015553 0ustar00gems/specifications/default/pathname-0.2.1.gemspec000064400000002157150403132320015722 0ustar00  s.date = "2025-03gems/specifications/default/strscan-3.0.7.gemspec000064400000001721150403132260015610 0ustar00# -*- encoding: utf-8 -*-
# stub: timeout 0.3.1 ruby lib

Gem::Specification.new do |s|
  s.name = "timeout".frgems/specifications/default/getoptlong-0.2.0.gemspec000064400000001523150403132320016302 0ustar00gems/specifications/default/did_you_mean-1.6.3.gemspec000064400000003635150403132270016576 0ustar00# -*- encoding: utf-8 -*-
# stub: date 3.3.3 ruby lib
# stub: ext/date/extconf.rb

Gem::Specification.new do |s|
  s.name = "date".freeze
  s.version = "3.3.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Tadayoshi Funagems/specifications/default/tempfile-0.1.3.gemspec000064400000001677150403132330015742 0ustar00gems/specifications/default/pathname-0.2.1.gemspec000064400000002157150403132320015722 0ustar00# -*- encoding: utf-8 -*-
# stub: pathname 0.2.1 ruby lib
# stub: ext/pathname/extconf.rb

Gem::Specification.new do |s|
  s.name = "pathname".freeze
  s.version = "0.2.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/pathname", "source_code_uri" => "https://github.com/ruby/pathname" gems/specifications/default/yaml-0.2.1.gemspec000064400000001711150403132340015064 0ustar00"3.4.19".freeze
  s.summary = "Representation of the name of a file or directory on the filesystem".freeze
end
gems/specifications/default/getoptlong-0.2.0.gemspec000064400000001523150403132320016302 0ustar00gems/specifications/default/fcntl-1.0.2.gemspec000064400000001632150403132340015232 0ustar0025-03-26"
  s.description = "GetoptLong for Ruby".freeze
  s.email = ["matz@ruby-lang.org".freeze]
  s.files = ["lib/getoptlong.rb".freeze]
  s.homepage = "https://github.com/ruby/getoptlong".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.rubygems_version = "3.4.19".freeze
  s.summary = "GetoptLong for Ruby".freeze
end
gems/specifications/default/tempfile-0.1.3.gemspec000064400000001677150403132330015742 0ustar00gems/specifications/default/set-1.0.3.gemspec000064400000002065150403132350014722 0ustar00"
  s.description = "A utility class for managing temporary files.".freeze
  s.email = ["matz@ruby-lang.org".freeze]
  s.files = ["lib/tempfile.rb".freeze]
  s.homepage = "https://github.com/ruby/tempfile".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "A utility class for managing temporary files.".freeze
end
gems/specifications/default/yaml-0.2.1.gemspec000064400000001711150403132340015064 0ustar00gems/specifications/default/pathname-0.2.1.gemspecgems/specifications/default/ipaddr-1.2.5.gemspec000064400000001570150403132350015376 0ustar00gems/specifications/default/fcntl-1.0.2.gemspec000064400000001632150403132340015232 0ustar00# -*- encoding: utf-8 -*-
# stub: fcntl 1.0.2 ruby lib
# stub: ext/fcntl/extconf.rb

Gem::Specification.new do gems/specifications/default/net-protocol-0.2.1.gemspec000064400000002046150403132360016553 0ustar00gems/specifications/default/set-1.0.3.gemspec000064400000002065150403132350014722 0ustar00# -*- encoding: utf-8 -*-
# stub: set 1.0.3 ruby lib

Gem::Specification.new do |s|
  s.name = "set".freeze
  s.version = "1.0.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "changelog_uri" => "https://github.com/ruby/set/blob/v1.0.3/CHANGELOG.md", "hogems/specifications/default/tempfile-0gems/specifications/default/resolv-0.2.2.gemspec000064400000001673150403132360015446 0ustar00gems/specifications/default/ipaddr-1.2.5.gemspec000064400000001570150403132350015376 0ustar00gems/specifications/default/yaml-0.2.1.gemspec000064400000001711150403132340015064 0ustar00gems/specifications/default/fiddle-1.1.1.gemspec000064400000002416150403132370015357 0ustar00gems/specifications/default/net-protocol-0.2.1.gemspec000064400000002046150403132360016553 0ustar00gems/specifications/default/fcntl-1.0.2.gemspec000064400000001632150403132340015232 0ustar00te = "2025-03-26"
  s.description = "The abstract interface for net-* client.".freeze
  s.email = ["matz@ruby-lang.org".freeze]
  s.files = ["lib/net/protocol.rb".freeze]
  s.homepage = "https://github.com/ruby/net-protocol".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-gems/specifications/default/erb-4.0.2.gemspec000064400000002612150403132370014701 0ustar00gems/specifications/default/set-1.0.3.gemspec000064400000002065150403132350014722 0ustar00# -*- encoding: utf-8 -*-
# stub: resolv 0.2.2 ruby lib

Gem::Specification.new do |s|
  s.name = "resolv".freeze
  s.version = "0.2.2"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/resolv", "source_code_uri" => "https://github.com/ruby/resolv" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Tanaka Akira".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Thread-aware DNS resolver library in Ruby.".freeze
  s.email = ["akr@fsij.org".freeze]
  s.files = ["lib/resolv.rb".freeze]
  s.homepage = "https://github.com/ruby/resolv".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Threadgems/specifications/default/english-0.7.2.gemspec000064400000001765150403132370015575 0ustar00gems/specifications/default/ipaddr-1.2.5.gemspec000064400000001570150403132350015376 0ustar00 libffi wrapper for Ruby.".freeze
  s.email = ["aaron@tenderlovemaking.com".freeze, "hsbt@ruby-lang.org".freeze]
  s.extensions = ["ext/fiddle/extconf.rb".freeze]
  s.files = ["ext/fiddle/extconf.rb".freeze, "lib/fiddle.rb".freeze, "lib/fiddle/closure.rb".freeze, "lib/fiddle/cparser.rb".freeze, "lib/fiddle/function.rb".freeze, "lib/fiddle/import.rb".freeze, "lib/fiddle/pack.rb".freeze, "lib/fiddle/struct.rb".freeze, "lib/fiddle/types.rb".freeze, "lib/fiddle/value.rb".freeze, "lib/fiddle/version.rgems/specifications/default/singleton-0.1.1.gemspec000064400000001655150403132370016135 0ustar00gems/specifications/default/net-protocol-0.2.1.gemspec000064400000002046150403132360016553 0ustar00# -*- encoding: utf-8 -*-
# stub: erb 4.0.2 ruby lib
# stub: ext/erb/escape/extconf.rb

Gem::Specification.new do |s|
  s.name = "erb".freeze
  s.version = "4.0.2"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/erb", "source_code_uri" => "https://github.com/ruby/erb" } if s.respond_to? :metadata=
  s.gems/specifications/default/syslog-0.1.1.gemspec000064400000002115150403132370015443 0ustar00.freeze]
  s.homepage = "https://githugems/specifications/default/resolv-0.2.2.gemspec000064400000001673150403132360015446 0ustar00# -*- encoding: utf-8 -*-
# stub: english 0.7.2 ruby lib

Gem::Specification.gems/specifications/default/nkf-0.1.2.gemspec000064400000001650150403132400014677 0ustar00gems/specifications/default/fiddle-1.1.1.gemspec000064400000002416150403132370015357 0ustar00# -*- encoding: utf-8 -*-
# stub: singleton 0.1.1 ruby lib

Gem::Specification.new do |s|
  s.name = "singleton".freeze
  s.version = "0.1.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/singleton", "source_code_uri" => "https://github.com/ruby/singleton" } if s.respond_to? :metadata=
  s.requigems/specifications/default/etc-1.4.2.gemspec000064400000002604150403132400014700 0ustar00gems/specifications/default/syslog-0.1.1.gemspec000064400000002115150403132370015443 0ustar00gems/specifications/default/erb-4.0.2.gemspec000064400000002612150403132370014701 0ustar00indir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Ruby interface for the POSIX system logging facility.".freeze
  s.email = ["knu@idaemons.org".freeze]
  s.extensions = ["ext/syslog/extconf.rb".freeze]
  s.files = ["ext/syslog/extconf.rb".freeze, "lib/syslog/logger.rb".freeze]
  s.homepage = "https://github.com/ruby/syslog".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clagems/specifications/default/error_highlight-0.5.1.gemspec000064400000002022150403132400017276 0ustar00gems/specifications/default/nkf-0.1.2.gemspec000064400000001650150403132400014677 0ustar00gems/specifications/default/english-0.7.2.gemspec000064400000001765150403132370015575 0ustar00  s.description = gems/specifications/default/optparse-0.3.1.gemspec000064400000002505150403132400015757 0ustar00gems/specifications/default/singleton-0.1.1.gemspec000064400000001655150403132370016135 0ustar00"matz@ruby-lang.org".freeze]
  s.extensions = ["ext/etc/extconf.rb".freeze]
  s.extra_rdoc_files = ["ChangeLog".freeze, "LICENSE.txt".freeze, "README.md".freeze, "ext/etc/constdefs.h".freeze, "ext/etc/etc.c".freeze, "ext/etc/extconf.rb".freeze, "ext/etc/mkconstants.rb".freeze, "test/etc/test_etc.rb".freeze]
  s.files = ["ChangeLog".freeze, "LICENSE.txt".freeze, "README.md".freeze, "ext/etc/constdefs.h".freeze, "ext/etc/etc.c".freeze, "ext/etc/extconf.rb".freeze, "ext/etc/mkconstants.rb".freeze, "test/etc/test_etc.rb".freeze]
  s.homepage = "https://github.com/ruby/etc".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.rdoc_options = ["--main".freeze, "README.md".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.6.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Provides access to ingems/specifications/default/observer-0.1.1.gemspec000064400000001667150403132400015757 0ustar00# -*- encoding: utf-8 -*-
# stub: error_highlight 0.5.1 ruby lib

Gem::Specification.new do |s|
  s.name = "error_highlight".freeze
  s.version = "0.5.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Yusuke Endoh".freeze]
  s.date = "2025-03-26"
  s.description = "The gem enhances Exception#message by adding a short explanation where the exception is raised".freeze
  s.email = ["mame@ruby-lang.org".freeze]
  s.files = ["lib/error_highlight.rb".freeze, "lib/error_highlight/base.rb".freeze, "lib/error_highlight/core_ext.rb".freeze, "lib/error_highlight/formatter.rb".freeze, "lib/error_highlight/version.rb".freeze]
  s.homepage = "https://github.com/ruby/error_highlight".freeze
  s.licenses = ["MIT".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 3.1.0.dev".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.sumgems/specifications/default/mutex_m-0.1.2.gemspec000064400000001724150403132400015601 0ustar00gems/specifications/default/nkf-0.1.2.gemspec000064400000001650150403132400014677 0ustar00# -*- encoding: utf-8 -*-
# stub: optparse 0.3.1 ruby lib

Gem::Specification.new do |s|
  s.name = "optparse".freeze
  s.version = "0.3.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/optparse", "source_code_uri" => "https://github.com/ruby/optparse" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Nobu Ngems/specifications/default/shellwords-0.1.0.gemspec000064400000002006150403132400016301 0ustar00gems/specifications/default/etc-1.4.2.gemspec000064400000002604150403132400014700 0ustar00gems/specifications/default/observer-0.1.1.gemspec000064400000001667150403132400015757 0ustar00# -*- gems/specifications/default/tsort-0.1.1.gemspec000064400000001671150403132410015277 0ustar00gems/specifications/default/error_highlight-0.5.1.gemspec000064400000002022150403132400017276 0ustar00# -*- encoding: utf-8 -*-
# stub: mutex_m 0.1.2 ruby lib

Gem::Specification.new do |s|
  s.name = "mutex_m".freeze
  s.version = "0.1.2"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Keiju ISHITSUKA".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Mixin to extend objects to be handled like agems/specifications/default/uri-0.12.4.gemspec000064400000002564150403132410015012 0ustar00gems/specificationgems/specifications/default/optparse-0.3.1.gemspec000064400000002505150403132400015757 0ustar00freeze
  s.date = "2025-03-26"
  s.description = "Manipulates strings with word parsing rules of UNIX Bourne shell.".freeze
  s.email = ["knu@idaemons.org".freeze]
  s.files = ["lib/shellwords.rb".freeze]
  s.homepage = "https://github.com/ruby/shellwords".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2gems/specifications/default/logger-1.5.3.gemspec000064400000002402150403132410015403 0ustar00gems/specifications/default/tsort-0.1.1.gemspec000064400000001671150403132410015277 0ustar00gems/specifications/default/observer-0.1.1.gemspec000064400000001667150403132400015757 0ustar0025-03-26"
  s.description = "Topological sorting using Tarjan's algorithm".freeze
  s.email = ["akr@fsij.org".freeze]
  s.files = ["lib/tsort.rb".freeze]
  s.homepage = "https://github.com/ruby/tsort".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freegems/specifications/default/forwardable-1.3.3.gemspec000064400000001616150403132410016420 0ustar00gems/specifications/default/mutex_m-0.1.2.gemspec000064400000001724150403132400015601 0ustar0026"
  s.description = "URI is a module providing classes to handle Uniform Resource Identifiers".freeze
  s.email = ["akira@ruby-lang.org".freeze]
  s.files = ["lib/uri.rb".freeze, "lib/uri/common.rb".freeze, "lib/uri/file.rb".freeze, "lib/uri/ftp.rb".freeze, "lib/uri/generic.rb".freeze, "lib/uri/http.rb".freeze, "lib/uri/https.rb".freeze, "lib/uri/ldap.rb".freeze, "lib/uri/ldaps.rb".freeze, "ligems/specifications/default/securerandom-0.2.2.gemspec000064400000001745150403132410016617 0ustar00gems/specifications/default/shellwords-0.1.0.gemspec000064400000002006150403132400016301 0ustar00# -*- encoding: utf-8 -*-
# stub: logger 1.5.3 ruby lib

Gem::Specification.new do |s|
  s.name = "logger".freeze
  s.version = "1.5.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Naotoshi Seo".freeze, "SHIBATA Hiroshi".freeze]
  s.date = "2025-03-26"
  s.description = "Provides a simple logging utility for outputting messages.".freeze
  s.email = ["sonots@gmailgems/specifications/default/digest-3.1.1.gemspec000064400000003121150403132410015376 0ustar00y for gems/specifications/default/tsort-0.1.1.gemspec000064400000001671150403132410015277 0ustar00# -*- encoding: utf-8 -*-
# stub: forwardable 1.3.3 ruby lib

Gem::Specification.new do |s|
  s.name = "forwardable".freeze
  s.version = "1.3.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Keiju ISHITSUKA".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Provides delegation of specified methods to a designated object.".freeze
  s.email = ["keiju@ruby-lang.org".freeze]
  s.files = ["lib/forwardable.rb".freeze, "lib/forwardable/impl.rb".freegems/specifications/default/net-http-0.4.1.gemspec000064400000002577150403132410015700 0ustar00# -*- encoding: utf-8 -*-
# stub: securerandom 0.2.2 ruby lib

Gem::Specification.new do |s|
  s.name = "securerandom".freeze
  s.version = "0.2.2"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/securerandom", "source_code_uri" => "https://github.com/ruby/securerandom" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Tanaka Akira".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Interface for secure random number generator.".freeze
  s.email = ["akr@fsij.org".freeze]
  s.files = ["lib/securerandom.rb".freeze]
  s.homepage = "https://github.com/ruby/securerandom".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.6.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Interface for secure random number generator.".freeze
end
gems/specifications/default/digest-3.1.1.gemspec000064400000003121150403132410015376 0ustar00gems/specifications/default/io-nonblock-0.2.0.gemspec000064400000002040150403132410016325 0ustar00 s.require_paths = ["lib".freeze]
  s.authors = ["Akinori MUSHA".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Provides a framework for message digest libraries.".freeze
  s.email = ["knu@idaemons.org".freeze]
  s.extensions = ["ext/digest/bubblebabble/extconf.rb".freeze, "ext/digest/extconf.rb".freeze, "ext/digest/md5/extconf.rb".freeze, "ext/digest/rmd160/extconf.rb".freeze, "ext/digest/sha1/extconf.rb".freeze, "ext/digest/sha2/extconf.rb".freeze]
  s.files = ["ext/digest/bubblebabble/extconf.rb".freeze, "ext/digest/extconf.rb".freeze, "ext/digest/md5/extconf.rb".freeze, "ext/digest/rmd160/extconf.rb".freeze, "ext/digest/sha1/extconf.rb".freeze, "ext/digest/sha2/extconf.rb".freeze, "lib/digest.rb".freeze, "lib/digest/loader.rb".freeze, "lib/digest/version.rb".freeze]
  s.homepage = "https://github.com/ruby/digest".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.5.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Provides a fragems/specifications/default/rinda-0.1.1.gemspec000064400000002331150403132410015213 0ustar00# -*- encoding: utf-8 -*-
# stub: forwardable 1.3.3 ruby lib

Gem::Specification.new do |s|
  s.name = "forwardable".freeze
  s.version = "1.3.3".freeze

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Keiju ISHITSUKA".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-05-14"
  s.description = "Provides delegation of specified methods to a designated object.".freeze
  s.email = ["keiju@ruby-lang.org".freeze]
  s.files = ["forwardable.rb".freeze, "forwardable/impl.rb".freeze]
  s.homepage = "https://github.com/ruby/forwardable".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.4.0".freeze)
  s.rubygems_version = "3.6.7".freeze
  s.summary = "Provides delegation of specified methods to a designated object.".freeze
end
gems/specifications/default/securerandom-0.2.2.gemspec000064400000001745150403132410016617 0gems/specifications/default/ruby2_keywords-0.0.5.gemspec000064400000001603150403132410017114 0ustar00# -*- encoding: utf-8 -*-
# stub: io-nonblock 0.2.0 ruby lib
# stub: ext/io/nonblock/extconf.rb

Gem::Specification.new do |s|
  s.name = "io-nonblock".freeze
  s.version = "0.2.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/io-nonblock", "source_code_uri" => "https://github.com/ruby/io-nonblock" } if s.respond_to? :metadata=
  s.require_paths = ["lib".gems/specifications/default/digest-3.1.1.gemspec000064400000003121150403132410015376 0ustar00gems/specifications/default/un-0.2.1.gemspec000064400000001654150403132410014550 0ustar00gems/specifications/default/rinda-0.1.1.gemspec000064400000002331150403132410015213 0ustar00# -*- encoding: utf-8 -*-
# stub: rinda 0.1.1 ruby lib

Gem::Specification.new do |s|
  s.name = "rinda".freeze
  s.version = "0.1.1"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/rinda", "source_code_uri" => "https://github.com/ruby/rinda" } if s.respond_to? :metadata=
  s.require_paths = ["lib".frgems/specifications/default/abbrev-0.1.1.gemspec000064400000001762150403132420015367 0ustar00gems/specifications/default/net-http-0.4.1.gemspec000064400000002577150403132410015700 0ustar00gems/specifications/default/ruby2_keywords-0.0.5.gemspec000064400000001603150403132410017114 0ustar00gems/specifications/default/time-0.2.2.gemspec000064400000002057150403132420015064 0ustar00freeze, "lib/ruby2_keywords.rb".freeze]
  s.homepage = "https://github.com/ruby/ruby2_keywords".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.rdoc_options = ["--main".freeze, "README.md".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.0.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Shim library for Module#ruby2_keywords".freeze
gems/specifications/default/io-nonblock-0.2.0.gemspec000064400000002040150403132410016325 0ustar00# -*- encoding: utf-8 -*-
# stub: un 0.2.1 rubygems/specifications/default/prettyprint-0.1.1.gemspec000064400000002001150403132430016516 0ustar00gems/specifications/default/abbrgems/specifications/default/rinda-0.1.1.gemspec000064400000002331150403132410015213 0ustar00=gems/specifications/default/io-wait-0.3.0.gemspec000064400000002066150403132440015500 0ustar00# -*- encoding: utf-8 -*-
# stub: time 0.2.2 ruby lib

Gem::Specification.new do |s|
  s.name = "time".freeze
  s.version = "0.2.2"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to?gems/specifications/default/ruby2_keywords-0.0.5.gemspec000064400000001605150403132410017116 0ustar00# -*- encoding: utf-8 -*-
# stub: ruby2_keywords 0.0.5gems/specifications/bundler-2.4.19.gemspec000064400000026315150403132440014236 0ustar00gems/specifications/default/un-0.2.1.gemspec000064400000001654150403132410014550 0ustar00e".freeze
  s.date = "2025-03-26"
  s.description = "Implements a pretty printing algorithm for readable structure.".freeze
  s.email = ["akr@fsij.org".freeze]
  s.files = ["lib/prettyprint.rb".freeze]
  s.homepage = "https://github.com/ruby/prettyprint".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Implements a pretty printing algorithm for readable structure.".freeze
end
gems/specifications/default/abbrev-0.1.1.gemspec000064400000001762150403132420015367 0ustar00# -*- encoding: utf-8 -*-
# stub: io-wait 0.3.0 ruby lib
# stub: ext/io/wait/extconf.rb

Gem::Specification.new do |s|
  s.name = "io-wait".freeze
  s.version = "0.3.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "homepage_uri" => "https://github.com/ruby/io-wait", "source_code_uri" => "https://github.com/ruby/io-wait" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Nobu Nakada".freeze, "Charles Oliver Nutter".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Waits until IO is readable or writable without blocking.".freeze
  s.email = ["nobu@ruby-lang.org".freeze, "headius@headius.com".freeze]
  s.extensions = ["ext/io/wait/extconf.rb".freeze]
  s.files = ["ext/io/wait/extconf.rb".freeze]
  s.homepage = "https://github.com/ruby/io-wait".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Wgems/specifications/default/time-0.2.2.gemspec000064400000002057150403132420015064 0ustar00gems/specifications/bundler-2.4.19.gemspec000064400000026315150403132440014236 0ustar00# -*- encoding: utf-8 -*-
# stub: bundler 2.4.19 ruby lib

Gem::Specification.new do |s|
  s.name = "bundler".freeze
  s.version = "2.4.19"

  s.required_rubygems_version = Gem::Requirement.new(">= 3.0.1".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler", "changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md", "homepage_uri" => "https://bundler.io/", "source_code_uri" => "https://github.com/rubgems/specifications/default/prettyprint-0.1.1.gemspec000064400000002001150403132430016516 0ustar00/binstubs.rb".freeze, "lib/bundler/cli/cache.rb".freeze, "lib/bundler/cli/check.rb".freeze, "lib/bundler/cli/clean.rb".freeze, "lib/bundler/cli/common.rb".freeze, "lib/bundler/cli/config.rb".freeze, "lib/bundler/cli/console.rb".freeze, "lib/bundler/cli/doctor.rb".freeze, "lib/bundler/cli/exec.rb".freeze, "lib/bundler/cli/fund.rb".freeze, "lib/bundler/cli/gem.rb".freeze, "lib/bundler/cli/info.rb".freeze, "lib/bundler/cli/init.rb".freeze, "lib/bundler/cli/inject.rb".freeze, "lib/bundler/cli/install.rb".freeze, "lib/bundler/cli/issue.rb".freeze, "lib/bundler/cli/list.rb".freeze, "lib/bundler/cli/lock.rb".freeze, "lib/bundler/cli/open.rb".freeze, "lib/bundler/cli/outdated.rb".freeze, "lib/bundler/cli/platform.rb".freeze, "lib/bundler/cli/plugin.rb".freeze, "lib/bundler/cli/pristine.rb".freeze, "lib/bundler/cli/remove.rb".freeze, "lib/bundler/cli/show.rb".freeze, "lib/bundler/cli/update.rb".freeze, "lib/bundler/cli/viz.rb".freeze, "lib/bundler/compact_index_client.rb".freeze, "lib/bundler/compact_index_client/cachegems/specifications/default/io-wait-0.3.0.gemspec000064400000002066150403132440015500 0ustar00eeze, "lib/bundler/gem_version_promoter.rb".freeze, "lib/bundler/graph.rb".freeze, "lib/bundler/index.rb".freeze, "lib/bundler/injector.rb".freeze, "lib/bundler/inline.rb".freeze, "lib/bundler/installer.rb".freeze, "lib/bundler/installer/gem_installer.rb".freeze, "lib/bundler/installer/parallel_installer.rb".freeze, "lib/bundler/installer/standalone.rb".freeze, "lib/bundler/lazy_specification.rb".freeze, "lib/bundler/lockfile_generator.rb".freeze, "lib/bundler/lockfile_parser.rb".freeze, "lib/bundler/match_metadata.rb".freeze, "lib/bundler/match_platform.rb".freeze, "lib/bundler/match_remote_metadata.rb".freeze, "lib/bundler/mirror.rb".freeze, "lib/bundler/plugin.rb".freeze, "lib/bundler/plugin/api.rb".freeze, "lib/bundler/plugin/api/source.rb".freeze, "lib/bundler/plugin/dsl.rb".freeze, "lib/bundler/plugin/events.rb".freeze, "lib/bundler/plugin/index.rb".freeze, "lib/bundler/plugin/installer.rb".freeze, "lib/bundler/plugin/installer/git.rb".freeze, "lib/bundler/plugin/installer/rubygems.rb".freeze, "lib/bundler/plugin/source_list.rb".freeze, "lib/bundler/procesgems/specifications/bundler-2.4.19.gemspec000064400000026315150403132440014236 0ustar00ib/bundler/source/git.rb".freeze, "lib/bundler/source/git/git_proxy.rb".freeze, "lib/bundler/source/metadata.rb".freeze, "lib/bundler/source/path.rb".freeze, "lib/bundler/source/path/installer.rb".freeze, "lib/bundler/source/rubygems.rb".freeze, "lib/bundler/source/rubygems/remote.rb".freeze, "lib/bundler/source/rubygems_aggregate.rb".freeze, "lib/bundler/source_list.rb".freeze, "lib/bundler/source_map.rb".freeze, "lib/bundler/spec_set.rb".freeze, "lib/bundler/stub_specification.rb".freeze, "lib/bundler/ui.rb".freeze, "lib/bundler/ui/rg_proxy.rb".freeze, "lib/bundler/ui/shell.rb".freeze, "lib/bundler/ui/silent.rb".freeze, "lib/bundler/uri_credentials_filter.rb".freeze, "lib/bundler/uri_normalizer.rb".freeze, "lib/bundler/vendor/connection_pool/lib/connection_pool.rb".freeze, "lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb".freeze, "lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb".freeze, "lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb".freeze, "lib/bundler/vendor/fileutils/lib/fileutils.rb".freeze, "lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb".freeze, "lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb".freeze, "lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb".freeze, "lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb".freeze, "lib/bundler/vendor/pub_grub/lib/pub_grub.rb".freeze, "lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb".freeze, "lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb".freeze, "lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb".freeze, "lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb".freegems/specifications/io-console-0.6.0.gemspec000064400000001750150403132450014555 0ustar00hor/actions.rb".freeze, "lib/bundler/vendor/thor/lib/thor/actions/create_file.rb".freeze, "lib/bundler/vendor/thor/lib/thor/actions/create_link.rb".freeze, "lib/bundler/vendor/thor/lib/thor/actions/directory.rb".freeze, "lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb".freeze, "lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb".freeze, "lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb".freeze, "lib/bundler/vendor/thor/lib/thor/base.rb".freeze, "lib/bundler/vendor/thor/lib/thor/command.rb".freeze, "lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb".freeze, "lib/bundler/vendor/thor/lib/thor/error.rb".freeze, "lib/bundler/vendor/thor/lib/thor/group.rb".freeze, "lib/bundler/vendor/thor/lib/thor/invocation.rb".freeze, "lib/bundler/vendor/thor/lib/thor/line_editor.rb".freeze, "lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb".freeze, "lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb".freeze, "lib/bundler/vendor/thor/libgems/specifications/rake-13.0.6.gemspec000064400000003532150403132460013515 0ustar00asic.rb".freeze, "lib/bundler/vendor/thor/lib/thor/shell/color.rb".freeze, "lib/bundler/vendor/thor/lib/thor/shell/html.rb".freeze, "lib/bundler/vendor/thor/lib/thor/util.rb".freeze, "lib/bundler/vendor/thor/lib/thor/version.rb".freeze, "lib/bundler/vendor/tsort/lib/tsort.rb".freeze, "lib/bundler/vendor/uri/lib/uri.rb".freeze, "lib/bundler/vendor/uri/lib/uri/common.rb".freeze, "lib/bundler/vendor/uri/lib/uri/file.rb".freeze, "lib/bundler/vendor/uri/lib/uri/ftp.rb".freeze, "lib/bundler/vendor/uri/lib/uri/generic.rb".freeze, "lib/bundler/vendor/uri/lib/uri/http.rb".freeze, "lib/bundler/vendor/uri/lib/uri/https.rb".freeze, "lib/bundler/vendor/uri/lib/uri/ldap.rb".freeze, "lib/bundler/vendor/uri/lib/uri/ldaps.rb".freeze, "lib/bundler/vendor/uri/lib/uri/mailto.rb".freeze, "lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb".freeze, "lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb".freeze, "lib/bundler/vendor/uri/lib/uri/version.rb".freeze, "lib/bundler/vendor/uri/lib/uri/ws.rb".freeze, "lib/bundler/vendor/uri/lib/uri/wss.rb".freeze, "lib/bundler/vendored_fileutils.rb".freeze, "lib/bundler/vendored_persistent.rb".freeze, "lib/bundler/vendored_pub_grub.rb".freeze, "lib/bundler/vendored_thor.rb".freeze, "lib/bundler/vendored_tsort.rb".freeze, "lib/bundler/vendored_uri.rb".freeze, "lib/bundler/version.rb".freeze, "lib/bundler/vlad.rb".freeze, "lib/bundler/worker.rb".freeze, "lib/bundler/yaml_serializer.rb".freeze, "libexec/bundle".freeze, "libexec/bundler".freeze]
  s.homepage = "https://bundler.io".freeze
  s.licenses = ["MIT".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.6.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "The best way to manage your application's dependencies".freeze
end
gems/specifications/rackup-2.1.0.gemspec000064400000002361150403132470013771 0ustar00# -*- encoding: utf-8 -*-
# stub: io-console 0.6.0 ruby lib
# stub: ext/io/console/extconf.rb

Gem::Specification.new do |s|
  s.name = "io-console".freeze
  s.version = "0.6.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.metadata = { "source_code_url" => "https://github.com/ruby/io-console" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Nobu Nakada".freeze]
  s.date = "2025-03-26"
  s.description = "add console capabilities to IO instances.".freeze
  s.email = "nobu@ruby-lang.org".freeze
  s.extensions = ["ext/io/console/extconf.rb".freeze]
  s.files = ["ext/io/console/extconf.rb".freeze, "lib/console/size.rb".freeze]
  s.homepage = "https://github.com/ruby/io-console".freeze
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.6.0".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Console interface".freeze
end
gems/specifications/rake-13.0.6.gemspec000064400000003532150403132460013515 0gems/gems/bigdecimal-3.1.3/lib/bigdecimal/math.rb000064400000013231150403132520015251 0ustar00v13.0.6" } if s.respond_to? :metadata=
  s.require_paths = ["lib".freeze]
  s.authors = ["Hiroshi SHIBATA".freeze, "Eric Hodel".freeze, "Jim Weirich".freeze]
  s.bindir = "exe".freeze
  s.date = "2025-03-26"
  s.description = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are\nspecified in standard Ruby syntax.\nRake has the following features:\n  * Rakefiles (rake's version of Makefiles) are completely defined in standard Ruby syntax.\n    No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?)\n  * Users can specify tasks with prerequisites.\n  * Rake supports rule patterns to synthesize implicit tasks.\n  * Flexible FileLists that act like arrays but know about manipulating file names and paths.\n  * Supports parallel execution of tasks.\n".freeze
  s.email = ["hsbt@ruby-lang.org".freeze, "drbrain@segment7.net".freeze, "".freeze]
  s.executables = ["rake".freeze]
  s.files = ["exe/rake".freeze]
  s.homepage = "https://github.com/ruby/rake".freeze
  s.licenses = ["MIT".freeze]
  s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
  s.rubygems_version = "3.4.19".freeze
  s.summary = "Rake is a Make-like program implemented in Ruby".freeze

  s.installed_by_version = "3.4.19" if s.respond_to? :installed_by_version
end
gems/specifications/rackup-2.1.0.gemspec000064400000002361150403132470013771 0ustar00# -*- encoding: utf-8 -*-
# stub: rackup 2.1.0 ruby lib

Gem::Specification.new do |s|
  s.name = "rackup".freeze
  s.version = "2.1.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Samuel Williams".freeze, "Jeremy Evans".freeze]
  s.date = "2023-01-27"
  s.executables = ["rackup".freeze]
  s.files = ["bin/rackup".freeze]
  s.homepage = "https://github.com/rack/rackup".freeze
  s.licenses = ["MIT".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.4.0".freeze)
  s.rubygems_version = "3.4.10".freeze
  s.summary = "A general server command for Rack applications.".freeze

  s.instalgems/specifications/io-console-0.6.0.gemspec000064400000001750150403132450014555 0ustar00gems/gems/bigdecimal-3.1.3/lib/bigdecimal/math.rb000064400000013231150403132520015251 0ustar00# frozen_string_literal: false
require 'bigdecimal'

#
#--
# Contents:
#   sqrt(x, prec)
#   sin (x, prec)
#   cos (x, prec)
#   atan(x, prec)  Note: |x|<1, x=0.9999 may not converge.
#   PI  (prec)
#   E   (prec) == exp(1.0,prec)
#
# where:
#   x    ... BigDecimal number to be computed.
#            |x| must be small enough to get convergence.
#   prec ... Number of digits to be obtained.
#++
#
# Provides mathematical functions.
#
# Example:
#
#   require "bigdecimal/math"
#
#   incgems/specifications/rake-13.0.6.gemspec000064400000003532150403132460013515 0ustar00 +decimal+ to the specified number of digits of
  # precision, +numeric+.
  #
  # If +decimal+ is Infinity or NaN, returns NaN.
  #
  #   BigMath.sin(BigMath.PI(5)/4, 5).to_s
  #   #=> "0.70710678118654752440082036563292800375e0"
  #
  def sin(x, prec)
    raise ArgumentError, "Zero or negative precision for sin" if prec <= 0
    return BigDecimal("NaN") if x.infinite? || x.nan?
    n    = prec + BigDecimal.double_fig
    one  = BigDecimal("1")
    two  = BigDecimal("2")
    x = -x if neg = x < 0
    if x > (twopi = two * BigMath.PI(prec))
      if x > 30
        x %= twopi
      else
        x -= twopi while x > twopi
      end
    end
    x1   = x
    x2 gems/gems/bigdecimal-3.1.3/lib/bigdecimal/jacobian.rb000064400000004161150403132530016071 0ustar00 + BigDecimal.double_fig
    one  = BigDecimal("1")
    two  = BigDecimal("2")
    x = -x if x < 0
    if x > (twopi = two * BigMath.PI(prec))
      if x > 30
        x %= twopi
      else
        x -= twopi while x > twopi
      end
    end
    x1 = one
    x2 = x.mult(x,n)
    sign = 1
    y = one
    d = y
    i = BigDecimal("0")
    z = onegems/specifications/rackup-2.1.0.gemspec000064400000002407150403132470013772 0ustar00# -*- encoding: utf-8 -*-
# stub: rackup 2.1.0 ruby lib

Gem::Specification.new do |s|
  s.name = "rackup".freeze
  s.version = "2.1.0".freeze

  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
  s.require_paths = ["lib".freeze]
  s.authors = ["Samuel Williams".freeze, "Jeremy Evans".freeze]
  s.date = "2023-01-27"
  s.executables = ["rackup".freeze]
  s.files = ["bin/rackup".freeze]
  s.homepage = "https://github.com/rack/rackup".freeze
  s.licenses = ["MIT".freeze]
  s.required_ruby_version = Gem::Requirement.new(">= 2.4.0".freeze)
  s.rubygems_version = "3.4.1".freeze
  s.summary = "A general server command for Rack applications.".freeze

  s.installed_by_version = "3.6.2".freeze

  s.specification_version = 4

  s.add_runtime_dependency(%q<rack>.freeze, [">= 3".freeze])
  s.add_runtime_dependency(%q<webrick>.freeze, ["~> 1.8".freeze])
  s.add_development_dependency(%q<bundler>.freeze, [">= 0".freeze])
  s.add_development_dependency(%q<minitest>.freeze, ["~> 5.0".freeze])
  s.add_development_dependency(%q<minitest-global_expectations>.freeze, [">= 0".freegems/gems/bigdecimal-3.1.3/lib/bigdecimal/util.rb000064400000007605150403132540015307 0ustar0036028752390026306410273e1"
  #
  def E(prec)
    raise ArgumentError, "Zero or negative precision for E" if prec <= 0
    BigMath.exp(1, prec)
  end
end
gems/gems/bigdecimal-3.1.3/lib/bigdecimal/jacobian.rb000064400000004161150403132530016071 0ustar00# frozen_string_literal: false

require 'bigdecimal'

# require 'bigdecimal/jacobian'
#
# Provides methods to compute the Jacobian matrix of a set of equations at a
# point x. In the methods below:
#
# f is an Object which is used to compute the Jacobian matrix of the equations.
# It must provide the following methods:
#
# f.values(x):: returns the values of all functions at x
#
# f.zero:: returns 0.0
# f.one:: returns 1.0
# f.two:: returns 2.0
# f.ten:: returns 10.0
#
# f.eps:: 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.
#
# x is the point at which to compute the Jacobian.
#
# fx is f.values(x).
#
module Jacobian
  module_function

  # Determines the equality of two numbers by comparing to zero, or using the epsilon value
  def isEqual(a,b,zero=0.0,e=1.0e-8)
    aa = a.abs
    bb = b.abs
    if aa == zero &&  bb == zero then
      true
    else
      if ((a-b)/(aa+bb)).abs < e then
        true
      else
        false
      end
    end
  end


  # Computes the derivative of +f[i]+ at +x[i]+.
  # +fx+ is the value of +f+ at +x+.
  def dfdxi(f,fx,x,i)
    nRetry = 0
    n = x.size
    xSave = x[i]
    ok = 0
    ratio = f.ten*f.ten*f.ten
    dx = x[i].abs/ratio
    dx = fx[i].abs/ratio if isEqual(dx,f.zero,f.zero,f.eps)
    dx = f.one/f.ten     if isEqual(dx,f.zero,f.zero,f.eps)
    until ok>0 do
      deriv = []
      nRetry += 1
      if nRetry > 100
        raise "Singular Jacobian matrix. No change at x[" + i.to_s + "]"
      end
      dx = dx*f.two
      x[i] += dx
      fxNew = f.values(x)
      for j in 0...n do
        if !isEqual(fxNew[j],fx[j],f.zero,f.eps) then
          ok += 1
          deriv <<= (fxNew[j]-fx[j])/dx
        else
          deriv <<= f.zero
        end
      end
      x[i] = xSave
    end
    deriv
  end

  # Computes the Jacobian of +f+ at +x+. +fx+ is the value of +f+ at +x+.
  def jacobian(f,fx,x)
    n = x.size
    dfdx = Array.new(n*n)
    for i in 0...n do
      df = dfdxi(f,fx,x,i)
      for j in 0...n do
        dfdx[j*n+i] = df[j]
      end
    end
    dfdx
  end
end
gems/gems/bigdecimal-3.1.3/lib/bigdecimal/util.rb000064400000007605150403132540015307 0ustar00gems/gems/bigdecimal-3.1.3/lib/bigdecimal/ludcmp.rb000064400000004201150403132540015603 0ustar00oat < Numeric
  # call-seq:
  #     float.to_d             -> bigdecimal
  #     float.to_d(precision)  -> bigdecimal
  #
  # Returns the value of +float+ as a BigDecimal.
  # The +precision+ parameter is used to determine the number of
  # significant digits for the result. When +precision+ is set to +0+,
  # the number of digits to represent the float being converted is determined
  # automatically.
  # The default +precision+ is +0+.
  #
  #     require 'bigdecimal'
  #     require 'bigdecimal/util'
  #
  #     0.5.to_d         # => 0.5e0
  #     1.234.to_d       # => 0.1234e1
  #     1.234.to_d(2)    # => 0.12e1
  #
  # See also BigDecimal::new.
  #
  def to_d(precision=0)
    BigDecimal(self, precision)
  end
end


class String
  # call-seq:
  #     str.to_d  -> bigdecimal
  #
  # Returns the result of interpreting leading characters in +str+
  # as a BigDecimal.
  #
  #     require 'bigdecimal'
  #     require 'bigdecimal/util'
  #
  #     "0.5".to_d             # => 0.5e0
  #     "123.45e1".to_d        # => 0.12345e4
  #     "45.67 degrees".to_d   # => 0.4567e2
  #
  # See also BigDecimal::new.
  #
  def to_d
    BigDecimal.interpret_loosely(self)
  engems/gems/bigdecimal-3.1.3/lib/bigdecimal/jacobian.rb000064400000004161150403132530016071 0ustar00 a BigDecimal.
  #
  # The required +precision+ parameter is used to determine the number of
  # significant digits for the resulgems/gems/bigdecimal-3.1.3/lib/bigdecimal/newton.rb000064400000003532150403132550015640 0ustar00case self.real
      when Rational
        BigDecimal(self.real) # to raise error
      end
    end
    self.real.to_d(*args)
  end
end


class NilClass
  # call-seq:
  #     nil.to_d -> bigdecimal
  #
  # Returns nil represented as a BigDecimal.
  #
  #     require 'bigdecimal'
  #     require 'bigdecimal/util'
  #
  #     nil.to_d   # => 0.0
  #
  def to_d
    BigDecimal(0)
  end
end
gems/gems/bigdecimal-3.1.3/lib/bigdecimal/ludcmp.rb000064400000004201150403132540015603 0ustar00# frozen_string_literal: false
require 'bigdecimal'

#
# Solves a*x = b for x, using LU decomposition.
#
module Lgems/gems/bigdecimal-3.1.3/lib/bigdecimal/util.rb000064400000007605150403132540015307 0ustar00gems/gems/syntax_suggest-1.1.0/exe/syntax_suggest000075500000000166150403132570015755 0ustar00 constant vector, x is the solution vector.
  #
  # ps is the pivot, a vector which indicates the permutation of rows gems/gems/psych-5.0.1/lib/psych/versions.rb000064400000000274150403132620014307 0ustar00gems/gems/bigdecimal-3.1.3/lib/bigdecimal/newton.rb000064400000003532150403132550015640 0gems/gems/psych-5.0.1/lib/psych/nodes/mapping.rb000064400000003051150403132630015177 0ustar00 values of all functions at x
#
# f.zero:: returns 0.0
# f.one:: returns 1.0
# f.two:: returns 2.0
# f.ten:: returns 10.0
#
# f.eps:: 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.
#
# On exit, x is the solution vector.
#
module Newton
  include LUSolve
  include Jacobian
  module_function

  def norm(fv,zero=0.0) # :nodoc:
    s = zero
    n = fv.size
    for i in 0...n do
      s += fv[i]*fv[i]
    end
    s
  end

  # See also Newton
  def nlsolve(f,x)
    nRetry = 0
    n = x.size

    f0 = f.values(x)
    zero = f.zero
    one  = f.one
    two  = f.two
    p5 = one/two
    d  = norm(f0,zero)
    minfact = f.ten*f.ten*f.ten
    minfact = one/minfact
    e = f.eps
    while d >= e do
      nRetry += 1
      # Not yet converged. => Compute Jacobian matrix
      dfdx = jacobian(f,f0,x)
      # Solve dfdx*dx = -f0 to estimate dx
      dx = lusolve(dfdx,f0,ludecomp(dfdx,n,zero,one),zero)
      fact = two
      xs = x.dup
      begin
        fact *= p5
        if fact < minfact then
          raise "Failed to reduce function values."
        end
        for i in 0...n do
          x[i] = xs[i] - dx[i]*fact
        end
        f0 = f.values(x)
        dn = norm(f0,zero)
      end while(dn>=d)
      d = dn
    end
    nRetry
  end
end
gems/gems/bigdecimal-3.1.3/lib/bigdecimalgems/gems/psych-5.0.1/lib/psych/nodes/stream.rb000064400000002001150403132640015032 0ustar00gems/gems/psych-5.0.1/lib/psych/versions.rb000064400000000274150403132620014307 0ustar00# frozen_string_literal: true

module Psych
  # The version of Psych you are using
  VERSION = '5.0.1'

  if RUBY_ENGINE == 'jruby'
    DEFAULT_SNAKEYAML_VERSION = '1.33'.freeze
  end
end
ggems/gems/psych-5.0.1/lib/psych/nodes/document.rb000064400000003501150403132640015363 0ustar00gems/gems/bigdecimal-3.1.3/lib/bigdecimal/newton.rb000064400000003532150403132550015640 0ustar00l+.
      # +tag+ is the tag associated with the map or +nil+.
      # +implicit+ is a boolean indicating whether or not the map was implicitly
      # started.
      # +style+ is an integer indicating the mapping style.
      #
      # == See Also
      # See also Psych::Handler#start_mapping
      def initialize anchor = nil, tag = nil, implicit = true, style = BLOCK
        super()
        @anchor   = anchor
        @tag      = tag
        @implicit = implicit
        @style    = style
      end

      def mapping?; true; end
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/nodes/stream.rb000064400000002001150403132640015032 0ustar00gems/gems/psych-5.0.1/lib/psych/nodes/scalar.rb000064400000003204150403132650015013 0ustar00gems/gems/syntax_suggest-1.1.0/exe/syntax_suggest000075500000000166150403132570015755 0ustar00
gems/gems/psych-5.0.1/lib/psych/versions.rb000064400000000274150403132620014307 0ustar00# frozen_string_literal: true
module Psych
  module Nodes
    ###
    # This represents a YAML Document.  This node must be a child gems/gems/psych-5.0.1/lib/psych/nodes/alias.rb000064400000001013150403132660014634 0ustar00mple:
      # This creates a YAML document object that represents a YAML 1.1 document
      # with one tag directive, and has an implicit start:
      #
      #   Psych::Nodes::Document.new(
      #     [1,1],
      #     [["!", "tag:tenderlovemaking.com,2009:"]],
      #     true
      #   )
      #
      # == See Also
      # See also Psych::Handler#start_document
      def initialize version = [], tag_directives = [], implicit = false
        super()
        @version        = version
        @tag_directives = tag_dgems/gems/psych-5.0.1/lib/psych/nodes/sequence.rb000064400000004041150403132660015357 0ustar00# frozen_string_literal: true
module Psycgems/gems/psych-5.0.1/lib/psych/nodes/stream.rb000064400000002001150403132640015032 0ustar00 #
      # +value+ is the string value of the scalar
      # +anchor+ is an associated anchor or nil
      # +tag+ is an associated tag or nil
      # +plain+ is a boolean value
      # +quoted+ is a boolean value
      # +style+ is an integer indicating the string style
      #
      # == See Also
      #
      # See also Psych::Handler#scalar
      def initialize value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY
        @value  = value
        @anchor = anchor
        @tag    = tag
        @plain  = plain
        @quoted = quoted
        @style  = style
      end

      def scalar?; true; end
    end
  end
end
ggems/gems/psych-5.0.1/lib/psych/nodes/node.rb000064400000003651150403132670014503 0ustar00
  end
end
gems/gems/psych-5.0.1/lib/psych/nodes/sequence.rb000064400000004041150403132660015357 0ustar00# frozen_string_literal: true
module Psych
  module Nodes
    ###
    # This class represents a
    # {YAML sequence}[http://yaml.org/spec/1.1/#sequence/syntax].
    #
    # A YAML sequence is basically a list, and looks like this:
    #
    #   %YAML 1.1
    #   ---
    #   - I am
    #   - a Sequence
    #
    # A YAML sequence may have an anchor like this:
    #
    #   %YAML 1.1
    #   ---
    #   &A [
    #     "This sequence",
    #     "has an anchor"
    #   ]
    #
    # A YAML sequence may also have a tag like this:
    #
    #   %YAML 1.1
    #   ---
    #   !!seq [
    #     "This sequence",
    #     "has a tag"
    #   ]
    #
    # This class represents a sequence in a YAML document.  A
    # Psych::Nodes::Sequence node may have 0 or more children.  Valid children
    # for this node are:
    #
    # * Psygems/gems/psych-5.0.1/lib/psych/y.rb000064400000000276150403132670012716 0ustar00sequence or nil.
      # +tag+ is the tag associated with the sequence or nil.
      # +implicit+ a boolean indicating whether or not the sequence was
      # implicitly started.
      # +stgems/gems/psych-5.0.1/lib/psych/class_loader.rb000064400000003762150403132670015104 0ustar00gems/gems/psych-5.0.1/lib/psych/nodes/node.rb000064400000003651150403132670014503 0ustar00# frozen_string_literal: true
require 'stringio'
require_relative '../class_loader'
require_relative '../scalar_scanner'

module Psygems/gems/psych-5.0.1/lib/psych/nodes/alias.rb000064400000001013150403132660014634 0ustar00pthFirst.new(block).accept self
      end

      ###
      # Convert this node to Ruby.
      #
      # See also Psych::Visitors::ToRuby
      def to_ruby(symbolize_names: false, freeze: false, strict_integer: false)
        Visitors::ToRuby.create(symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer).accept(self)
      end
      alias :transform :to_ruby

      ###
      # Convert this node to YAML.
      #
      # See also Psych::Visitors::Emitter
      def yaml igems/gems/psych-5.0.1/lib/psych/exception.rb000064400000001326150403132700014433 0ustar00gems/gems/psych-5.0.1/lib/psych/nodes/sequence.rb000064400000004041150403132660015357 0ustar00# frozen_string_literal: true
module Kernel
  ###
  # An alias for Psych.dump_stream meant to be used with IRB.
  def y *objects
    puts Psych.dump_stream(*objects)
  end
  private :y
end

gems/gems/psych-5.0.1/lib/psych/visitors/visitor.rb000064400000001276150403132700016022 0ustar00# frozen_string_literal: true
require_relative 'omap'
require_relative 'set'

module Psych
  class ClassLoader # :nodoc:
    BIG_DECIMAL = 'BigDecimal'
    COMPLEX     = 'Complex'
    DATE        = 'Date'
    DATE_TIME   = 'DateTime'
    EXCEPTION   = 'Exception'
    OBJECT      = 'Object'
    PSYCH_OMAP  = 'Psych::Omap'
    PSYCH_SET   = 'Psych::Set'
    RANGE       = 'Range'
    RATIONAL    = 'Rational'
    REGEXP      = 'Regexp'
    STRUCT      = 'Struct'
    SYMBOL      = 'Symbol'

    def initialize
      @cache = CACHE.dup
    end

    def load klassname
      return nil if !klassname || klassname.empty?

      find klassname
    end

    def symbolize sym
      symbol
      sym.to_sym
 gems/gems/psych-5.0.1/lib/psych/visitors/json_tree.rb000064400000001121150403132710016301 0ustar00gems/gems/psych-5.0.1/lib/psych/nodes/node.rb000064400000003651150403132670014503 0ustar00gems/gems/psych-5.0.1/lib/psych/exception.rbgems/gems/psych-5.0.1/lib/psych/visitors/emitter.rb000064400000002712150403132710015771 0ustar00enced an unknown anchor: #{anchor_name}"
    end
  end

  class DisallowedClass < Exception
    def initialize action, klass_name
      super "Tried to #{action} unspecified class: #{klass_name}"
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/visitors/visitor.rb000064400000001276150403132700016022 0ustar00gems/gems/psych-5.0.1/lib/psych/y.rb000064400000000276150403132670012716 0ustar00gems/gems/psych-5.0.1/lib/psych/visitors/depth_first.rb000064400000001162150403132720016632 0ustar00gems/gems/psych-5.0.1/lib/psych/class_loader.rb000064400000003762150403132670015104 0ustar00# frozen_string_literal: true
require_relative '../json/ruby_events'

module Psych
  module Visitors
    class JSOgems/gems/psych-5.0.1/lib/psych/visitors/yaml_tree.rb000064400000040377150403132720016313 0ustar00gems/gems/psych-5.0.1/lib/psych/visitors/emitter.rb000064400000002712150403132710015771 0ustar00# frozen_string_literal: true
module Psych
  module Visitors
    class Emitter < Psych::Visitors::Visitor
      def initialize io, options = {}
        opts = [:indentation, :canonical, :line_width].find_all { |opt|
          options.key?(opt)
        }

        if opts.empty?
          @handler = Psych::Emitter.new io
        else
          du = Handler::DumperOptions.new
          opts.each { |option| du.send :"#{option}=", options[option] }
          @handler = Psych::Emitter.new io, du
   gems/gems/psych-5.0.1/lib/psych/exception.rb000064400000001326150403132700014433 0ustar00_Psych_Nodes_Sequence o
        @handler.start_sequence o.anchor, o.tag, o.implicit, o.style
        o.children.each { |c| accept c }
        @handler.end_sequence
      end

      def visit_Psych_Nodes_Mapping o
        @handler.start_mapping o.anchor, o.tag, o.implicit, o.style
        o.children.each { |c| accept c }
        @handler.end_mapping
      end

      def visit_Psych_Nodes_Alias o
        @handler.alias o.anchor
      end
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/visitors/depth_first.rb000064400000001162150403132720016632 0gems/gems/psych-5.0.1/lib/psych/visitors/visitor.rb000064400000001276150403132700016022 0ustar00      alias :visit_Psych_Nodes_Scalar :terminal
      alias :visit_Psych_Nodes_Alias  :terminal
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/visitors/yaml_tree.rb000064400000040377150403132720016313 0gems/gems/psych-5.0.1/lib/psych/visitors/json_tree.rb000064400000001121150403132710016301 0ustar00to_id   = {}
          @obj_to_node = {}
          @targets     = []
          @counter     = 0
        end

        def register target, node
          return unless target.respond_to? :object_id
          @targets << target
          @obj_to_node[target.object_id] = node
        end

        def key? target
          @obj_to_node.key? target.object_id
        rescue NoMethodError
          false
        end

        def id_for target
          @obj_to_id[target.object_id] ||= (@counter += 1)
        end

        def node_for target
          @obj_to_node[target.object_id]
        end
gems/gems/psych-5.0.1/lib/psych/visitors/emitter.rb000064400000002712150403132710015771 0ustar00end
        @coders     = []

        @dispatch_cache = Hash.new do |h,klass|
          method = "visit_#{(klass.name || '').split('::').join('_')}"

          method = respond_to?(method) ? method : h[klass.superclass]

          raise(TypeError, "Can't dump #{target.class}") unless method

          h[klass] = method
        end.compare_by_identity
      end

      def start encoding = Nodes::Stream::UTF8
        @emitter.start_stream(encoding).tap do
          @started = true
        end
      end

      def finish
        @emitter.end_stream.tap do
          @finished = true
        end
      end

      def tree
        finish unless finished?
        @emitter.root
      end

      def push object
        start unless started?
        version = []
        version = [1,1] if @options[:header]

        case @options[:version]
        when Array
          version = @options[:version]
        when String
          version = @options[:version].split('.').map { |x| x.to_i }
        else
          version = [1,1]
        end if @options.key? :version

        @emitter.start_document version, [], false
        accept object
        @emitter.end_document !@emitter.streaming?
      end
      alias :<< :push

      def accept target
        # return any aliases we find
        if @st.key? target
          oid         = @st.id_for target
          node        = @st.node_for target
          anchor      = oid.to_s
          node.anchor = anchor
          return @emitgems/gems/psych-5.0.1/lib/psych/visitors/depth_first.rb000064400000001162150403132720016632 0ustar00    end

      def visit_Object o
        tag = Psych.dump_tags[o.class]
        unless tag
          klass = o.class == Object ? nil : o.class.name
          tag   = ['!ruby/object', klass].compact.join(':')
        end

        map = @emitter.start_mapping(nil, tag, false, Nodes::Mapping::BLOCK)
        register(o, map)

        dump_ivars o
        @emitter.end_mapping
      end

      alias :visit_Delegator :visit_Object

      def visit_Struct o
        tag = ['!ruby/struct', o.class.name].compact.join(':')

        register o, @emitter.start_mapping(nil, tag, false, Nodes::Mapping::BLOCK)
        o.members.each dgems/gems/psych-5.0.1/lib/psych/visitors/yaml_tree.rb000064400000040377150403132720016313 0ustar00ed, nil, nil, true, false, Nodes::Scalar::ANY)
      end

      def visit_Rational o
        register o, @emitter.start_mapping(nil, '!ruby/object:Rational', false, Nodes::Mapping::BLOCK)

        [
          'denominator', o.denominator.to_s,
          'numerator', o.numerator.to_s
        ].each do |m|
          @emitter.scalar m, nil, nil, true, false, Nodes::Scalar::ANY
        end

        @emitter.end_mapping
      end

      def visit_Complex o
        register o, @emitter.start_mapping(nil, '!ruby/object:Complex', false, Nodes::Mapping::BLOCK)

        ['real', o.real.to_s, 'image', o.imag.to_s].each do |m|
          @emitter.scalar m, nil, nil, true, false, Nodes::Scalar::ANY
        end

        @emitter.end_mapping
      end

      def visit_Integer o
        @emitter.scalar o.to_s, nil, nil, true, false, Nodes::Scalar::ANY
      end
      alias :visit_TrueClass :visit_Integer
      alias :visit_FalseClass :visit_Integer

      def visit_Float o
        if o.nan?
          @emitter.scalar '.nan', nil, nil, true, false, Nodes::Scalar::ANY
        elsif o.infinite?
          @emitter.scalar((o.infinite? > 0 ? '.inf' : '-.inf'),
            nil, nil, true, false, Nodes::Scalar::ANY)
        else
          @emitter.scalar o.to_s, nil, nil, true, false, Nodes::Scalar::ANY
        end
      end

      def visit_BigDecimal o
        @emitter.scalar o._dump, nil, '!ruby/object:BigDecimal', false, false, Nodes::Scalar::ANY
      end

      def visit_String o
        plain = true
        quote = true
        style = Nodes::Scalar::PLAIN
        tag   = nil

        if binary?(o)
          o     = [o].pack('m0')
          tag   = '!binary' # FIXME: change to below when syck is removed
          #tag   = 'tag:yaml.org,2002:binary'
          style = Nodes::Scalar::LITERAL
          plain = false
          quote = false
        elsif o =~ /\n(?!\Z)/  # match \n except blank line at the end of string
          style = Nodes::Scalar::LITERAL
        elsif o == '<<'
          style = Nodes::Scalar::SINGLE_QUOTED
          tag   = 'tag:yaml.org,2002:str'
          plain = false
          quote = false
        elsif o == 'y' || o == 'n'
          style = Nodes::Scalar::DOUBLE_QUOTED
        elsif @line_width && o.length > @line_width
          style = Nodes::Scalar::FOLDED
        elsif o =~ /^[^[:word:]][^"]*$/
          style = Nodes::Scalar::DOUBLE_QUOTED
        elsif not String === @ss.tokenize(o) or /\A0[0-7]*[89]/ =~ o
          style = Nodes::Scalar::SINGLE_QUOTED
        end

        is_primitive = o.class == ::String
        ivars = is_primitive ? [] : o.instance_variables

        if ivars.empty?
          unless is_primitive
            tag = "!ruby/string:#{o.class}"
            plain = false
            quote = false
          end
          @emitter.scalar o, nil, tag, plain, quote, style
        else
          maptag = '!ruby/string'.dup
          maptag << ":#{o.class}" unless o.class == ::String

          register o, @emitter.start_mapping(nil, maptag, false, Nodes::Mapping::BLOCK)
          @emitter.scalar 'str', nil, nil, true, false, Nodes::Scalar::ANY
          @emitter.scalar o, nil, tag, plain, quote, style

          dump_ivars o

          @emitter.end_mapping
        end
      end

      def visit_Module o
        raise TypeError, "can't dump anonymous module: #{o}" unless o.name
        register o, @emitter.scalar(o.name, nil, '!ruby/module', false, false, Nodes::Scalar::SINGLE_QUOTED)
      end

      def visit_Class o
        raise TypeError, "can't dump anonymous class: #{o}" unless o.name
        register o, @emitter.scalar(o.name, nil, '!ruby/class', false, false, Nodes::Scalar::SINGLE_QUOTED)
      end

      def visit_Range o
        register o, @emitter.start_mapping(nil, '!ruby/range', false, Nodes::Mapping::BLOCK)
        ['begin', o.begin, 'end', o.end, 'excl', o.exclude_end?].each do |m|
          accept m
        end
        @emitter.end_mapping
      end

      def visit_Hash o
        if o.class == ::Hash
          register(o, @emitter.start_mapping(nil, nil, true, Psych::Nodes::Mapping::BLOCK))
          o.each do |k,v|
            accept k
            accept v
          end
          @emitter.end_mapping
        else
          visit_hash_subclass o
        end
      end

      def visit_Psych_Set o
        register(o, @emitter.start_mapping(nil, '!set', false, Psych::Nodes::Mapping::BLOCK))

        o.each do |k,v|
          accept k
          accept v
        end

        @emitter.end_mapping
      end

      def visit_Array o
        if o.class == ::Array
          visit_Enumerator o
        else
          visit_array_subclass o
        end
      end

      def visit_Enumerator o
        register o, @emitter.start_sequence(nil, nil, true, Nodes::Sequence::BLOCK)
        o.each { |c| accept c }
        @emitter.end_sequence
      end

      def visit_NilClass o
        @emitter.scalar('', nil, 'tag:yaml.org,2002:null', true, false, Nodes::Scalar::ANY)
      end

      def visit_Symbol o
        if o.empty?
          @emitter.scalar "", nil, '!ruby/symbol', false, false, Nodes::Scalar::ANY
        else
          @emitter.scalar ":#{o}", nil, nil, true, false, Nodes::Scalar::ANY
        end
      end

      def visit_BasicObject o
        tag = Psych.dump_tags[o.class]
        tag ||= "!ruby/marshalable:#{o.class.name}"

        map = @emitter.start_mapping(nil, tag, false, Nodes::Mapping::BLOCK)
        register(o, map)

        o.marshal_dump.each(&method(:accept))

        @emitter.end_mapping
      end

      private

      def binary? string
        string.encoding == Encoding::ASCII_8BIT && !string.ascii_only?
      end

      def visit_array_subclass o
        tag = "!ruby/array:#{o.class}"
        ivars = o.instance_variables
        if ivars.empty?
          node = @emitter.start_sequence(nil, tag, false, Nodes::Sequence::BLOCK)
          register o, node
          o.each { |c| accept c }
          @emitter.end_sequence
        else
          node = @emitter.start_mapping(nil, tag, false, Nodes::Sequence::BLOCK)
          register o, node

          # Dump the internal list
          accept 'internal'
          @emitter.start_sequence(nil, nil, true, Nodes::Sequence::BLOCK)
          o.each { |c| accept c }
          @emitter.end_sequence

          # Dump the ivars
          accept 'ivars'
          @emitter.start_mapping(nil, nil, true, Nodes::Sequence::BLOCK)
          ivars.each do |ivar|
            accept ivar
            accept o.instance_variable_get ivar
          end
          @emitter.end_mapping

          @emitter.end_mapping
        end
      end

      def visit_hash_subclass o
        ivars = o.instance_variables
        if ivars.any?
          tag = "!ruby/hash-with-ivars:#{o.class}"
          node = @emitter.start_mapping(nil, tag, false, Psych::Nodes::Mapping::BLOCK)
          register(o, node)

          # Dump the igems/gems/psych-5.0.1/lib/psych/visitors/to_ruby.rb000064400000030615150403132730016010 0ustar00ept v
          end
          @emitter.end_mapping
        end
      end

      def dump_list o
      end

      def dump_exception o, msg
        tag = ['!ruby/exception', o.class.name].join ':'

        @emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK

        if msg
          @emitter.scalar 'message', nil, nil, true, false, Nodes::Scalar::ANY
          accept msg
        end

        @emitter.scalar 'backtrace', nil, nil, true, false, Nodes::Scalar::ANY
        accept o.backtrace

        dump_ivars o

        @emitter.end_mapping
      end

      def format_time time, utc = time.utc?
        if utc
          time.strftime("%Y-%m-%d %H:%M:%S.%9N Z")
        else
          time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z")
        end
      end

      def register target, yaml_obj
        @st.register target, yaml_obj
        yaml_obj
      end

      def dump_coder o
        @coders << o
        tag = Psych.dump_tags[o.class]
        unless tag
          klass = o.class == Object ? nil : o.class.name
          tag   = ['!ruby/object', klass].compact.join(':')
        end

        c = Psych::Coder.new(tag)
        o.encode_with(c)
        emit_coder c, o
      end

      def emit_coder c, o
        case c.type
        when :scalar
          @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, c.style
        when :seq
          @emitter.start_sequence nil, c.tag, c.tag.nil?, c.style
          c.seq.each do |thing|
            accept thing
          end
          @emitter.end_sequence
        when :map
          register o, @emitter.start_mapping(nil, c.tag, c.implicit, c.style)
          c.map.each do |k,v|
            accept k
            accept v
          end
          @emitter.end_mapping
        when :object
          accept c.object
        end
      end

      def dump_ivars target
        target.instance_variables.each do |iv|
          @emitter.scalar("#{iv.to_s.sub(/^@/, '')}", nil, nil, true, false, Nodes::Scalar::ANY)
          accept target.instance_variable_get(iv)
        end
      end
    end

    class RestrictedYAMLTree < YAMLTree
      DEFAULT_PERMITTED_CLASSES = {
        TrueClass => true,
        FalseClass => true,
        NilClass => true,
        Integer => true,
        Float => true,
        String => true,
        Array => true,
        Hash => true,
      }.compare_by_identity.freeze

      def initialize emitter, ss, options
        super
        @permitted_classes = DEFAULT_PERMITTED_CLASSES.dup
        Array(options[:permitted_classes]).each do |klass|
          @permitted_classes[klass] = true
        end
        @permitted_symbols = {}.compare_by_identity
        Array(options[:permitted_symbols]).each do |symbol|
          @permitted_symbols[symbol] = true
        end
        @aliases = options.fetch(:aliases, false)
      end

      def accept target
        if !@aliases && @st.key?(target)
          raise BadAlias, "Tried to dump an aliased object"
        end

        unless @permitted_classes[target.class]
          raise DisallowedClass.new('dump', target.class.name || target.class.inspect)
        end

        super
      end

      def visit_Symbol sym
        unless @permitted_symbols[sym]
          raise DisallowedClass.new('dump', "Symbol(#{sym.inspect})")
        end

        super
      end
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/visitors/to_ruby.rb000064400000030615150403132730016010 0ustar00# frozen_string_literal: true
require_relative '../scalar_scanner'
require_relative '../class_loader'
require_relative '../exception'

unless defined?(Regexp::NOENCODING)
  Regexp::NOENCODING = 32
end

module Psych
  module Visitors
    ###
    # This class walks a YAML AST, converting each node to Ruby
    class ToRuby < Psych::Visitors::Visitor
      def self.create(symbolize_names: false, freeze: false, strict_integer: false)
        class_loader = ClassLoader.new
        scanner      = ScalarScanner.new class_loader, strict_integer: strict_integer
        new(scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze)
      end

      attr_reader :class_loader

      def initialize ss, class_loader, symbolize_names: false, freeze: false
        super()
        @st = {}
        @ss = ss
        @load_tags = Psych.load_tags
        @domain_types = Psych.domain_types
        @class_loader = class_loader
        @symbolize_names = symbolize_names
        @freeze = freeze
      end

      def accept target
        result = super

        unless @domain_types.empty? || !target.tag
          key = target.tag.sub(/^[!\/]*/, '').sub(/(,\d+)\//, '\1:')
          key = "tag:#{key}" unless key =~ /^(?:tag:|x-private)/

          if @domain_types.key? key
            value, block = @domain_types[key]
            result = block.call value, result
          end
        end

        result = deduplicate(result).freeze if @freeze
        result
      end

      def deserialize o
        if klass = resolve_class(@load_tags[o.tag])
          instance = klass.allocate

          if instance.respond_to?(:init_with)
            coder = Psych::Coder.new(o.tag)
            coder.scalar = o.value
            instance.init_with coder
          end

          return instance
        end

        return o.value if o.quoted
        return @ss.tokenize(o.value) unless o.tag

        case o.tag
        when '!binary', 'tag:yaml.org,2002:binary'
          o.value.unpack('m').first
        when /^!(?:str|ruby\/string)(?::(.*))?$/, 'tag:yaml.org,2002:str'
          klass = resolve_class($1)
          if klass
            klass.allocate.replace o.value
          else
            o.value
          end
        when '!ruby/object:BigDecimal'
          require 'bigdecimal' unless defined? BigDecimal
          class_loader.big_decimal._load o.value
        when "!ruby/object:DateTime"
          class_loader.date_time
          require 'date' unless defined? DateTime
          t = @ss.parse_time(o.value)
          DateTime.civil(*t.to_a[0, 6].reverse, Rational(t.utc_offset, 86400)) +
            (t.subsec/86400)
        when '!ruby/encoding'
          ::Encoding.find o.value
        when "!ruby/object:Complex"
          class_loader.complex
          Complex(o.value)
        when "!ruby/object:Rational"
          class_loader.rational
          Rational(o.value)
        when "!ruby/class", "!ruby/module"
          resolve_class o.value
        when "tag:yaml.org,2002:float", "!float"
          Float(@ss.tokenize(o.value))
        when "!ruby/regexp"
          klass = class_loader.regexp
          o.value =~ /^\/(.*)\/([mixn]*)$/m
          source  = $1
          options = 0
          lang    = nil
          ($2 || '').split('').each do |option|
            case option
            when 'x' then options |= Regexp::EXTENDED
            when 'i' then options |= Regexp::IGNORECASE
            when 'm' then options |= Regexp::MULTILINE
            when 'n' then options |= Regexp::NOENCODING
            else lang = option
            end
          end
          klass.new(*[source, options, lang].compact)
        when "!ruby/range"
          klass = class_loader.range
          args = o.value.split(/([.]{2,3})/, 2).map { |s|
            accept Nodes::Scalar.new(s)
          }
          args.push(args.delete_at(1) == '...')
          klass.new(*args)
        when /^!ruby\/sym(bol)?:?(.*)?$/
          class_loader.symbolize o.value
        else
          @ss.tokenize o.value
        end
      end
      private :deserialize

      def visit_Psych_Nodes_Scalar o
        register o, deserialize(o)
      end

      def visit_Psych_Nodes_Sequence o
        if klass = resolve_class(@load_tags[o.tag])
          instance = klass.allocate

          if instance.respond_to?(:init_with)
            coder = Psych::Coder.new(o.tag)
            coder.seq = o.children.map { |c| accept c }
            instance.init_with coder
          end

          return instance
        end

        case o.tag
        when nil
          register_empty(o)
        when '!omap', 'tag:yaml.org,2002:omap'
          map = register(o, Psych::Omap.new)
          o.children.each { |a|
            map[accept(a.children.first)] = accept a.children.last
          }
          map
        when /^!(?:seq|ruby\/array):(.*)$/
          klass = resolvegems/gems/psych-5.0.1/lib/psych/visitors/to_ruby.rb000064400000030615150403132730016010 0ustar00            if struct_members.include?(class_loader.symbolize(member))
                s.send("#{member}=", value)
              else
                members[member.to_s.sub(/^@/, '')] = value
              end
            end
            init_with(s, members, o)
          else
            klass = class_loader.struct
            members = o.children.map { |c| accept c }
            h = Hash[*members]
            s = klass.new(*h.map { |k,v|
              class_loader.symbolize k
            }).new(*h.map { |k,v| v })
            register(o, s)
            s
          end

        when /^!ruby\/object:?(.*)?$/
          name = $1 || 'Object'

          if name == 'Complex'
            class_loader.complex
            h = Hash[*o.children.map { |c| accept c }]
            register o, Complex(h['real'], h['image'])
          elsif name == 'Rational'
            class_loader.rational
            h = Hash[*o.children.map { |c| accept c }]
            register o, Rational(h['numerator'], h['denominator'])
          elsif name == 'Hash'
            revive_hash(register(o, {}), o)
          else
            obj = revive((resolve_class(name) || class_loader.object), o)
            obj
          end

        when /^!(?:str|ruby\/string)(?::(.*))?$/, 'tag:yaml.org,2002:str'
          klass   = resolve_class($1)
          members = {}
          string  = nil

          o.children.each_slice(2) do |k,v|
            key   = accept k
            value = accept v

            if key == 'str'
              if klass
                string = klass.allocate.replace value
              else
                string = value
              end
              register(o, string)
            else
              members[key] = value
            end
          end
          init_with(string, members.map { |k,v| [k.to_s.sub(/^@/, ''),v] }, o)
        when /^!ruby\/array:(.*)$/
          klass = resolve_class($1)
          list  = register(o, klass.allocate)

          members = Hash[o.children.map { |c| accept c }.each_slice(2).to_a]
          list.replace members['internal']

          members['ivars'].each do |ivar, v|
            list.instance_variable_set ivar, v
          end
          list

        when '!ruby/range'
          klass = class_loader.range
          h = Hash[*o.children.map { |c| accept c }]
          register o, klass.new(h['begin'], h['end'], h['excl'])

        when /^!ruby\/exception:?(.*)?$/
          h = Hash[*o.children.map { |c| accept c }]

          e = build_exception((resolve_class($1) || class_loader.exception),
                              h.delete('message'))

          e.set_backtrace h.delete('backtrace') if h.key? 'backtrace'
          init_with(e, h, o)

        when '!set', 'tag:yaml.org,2002:set'
          set = class_loader.psych_set.new
          @st[o.anchor] = set if o.anchor
          o.children.each_slice(2) do |k,v|
            set[accept(k)] = accept(v)
          end
          set

      gems/gems/psych-5.0.1/lib/psych/stream.rb000064400000001633150403132730013734 0ustar0002:omap'
          map = register(o, class_loader.psych_omap.new)
          o.children.each_slice(2) do |l,r|
            map[accept(l)] = accept r
          end
          map

        when /^!ruby\/marshalable:(.*)$/
          name = $1
          klass = resolve_class(name)
          obj = register(o, klass.allocate)

          if obj.respond_to?(:init_with)
            init_with(obj, revive_hash({}, o), o)
          elsif obj.respond_to?(:marshal_load)
            marshal_data = o.children.map(&method(:accept))
            obj.marshal_load(marshal_data)
            obj
          else
            raise ArgumentError, "Cannot deserialize #{name}"
          end

        else
          revive_hash(register(o, {}), o)
        end
      end

      def visit_Psych_Nodes_Document o
        accept o.root
      end

      def visit_Psych_Nodes_Stream o
        o.children.map { |c| accept c }
      end

      def visitgems/gems/psych-5.0.1/lib/psych/handler.rb000064400000016311150403132740014056 0ustar00as, Nodes::Mapping
              begin
                hash.merge! val
              rescue TypeError
                hash[key] = val
              end
            when Nodes::Sequence
              begin
                h = {}
                val.reverse_each do |value|
                  h.merge! value
                end
                hash.merge! h
              rescue TypeError
                hash[key] = val
              end
            else
              hash[key] = val
            end
          else
            if !tagged && @symbolize_names && key.is_a?(String)
              key = key.to_sym
            elsif !@freeze
              key = deduplicate(key)
            end

            hash[key] = val
          end

        }
        hash
      end

      if RUBY_VERSION < '2.7'
        def deduplicate key
          if key.is_a?(String)
            # It is important to untaint the string, otherwise it won't
            # be deduplicated into an fstring, but simply frozen.
            -(key.untaint)
          else
            key
          end
        end
      else
        def deduplicate key
          if key.is_a?(String)
            -key
          else
            key
          end
        end
      end

      def merge_key hash, key, val
      end

      def revive klass, node
        s = register(node, klass.allocate)
        init_with(s, revive_hash({}, node, true), node)
      end

      def init_with o, h, node
        c = Psych::Coder.new(node.tag)
        c.map = h

        if o.respond_to?(:init_with)
          o.init_with c
        else
          h.each { |k,v| o.instance_variable_set(:"@#{k}", v) }
        end
        o
      end

      # Convert +klassname+ to a Class
      def resolve_class klassname
        class_loader.load klassname
      end
    end

    class NoAliasRuby < ToRuby
      def visit_Psych_Nodes_Alias o
        raise AliasesNotEnabled
      end
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/stream.rb000064400000001633150403132730013734 0ustar00# frozen_string_literal: true
module Psych
  ###
  # Psych::Stream is a streaming YAML emitter.  It will not buffer your YAML,
  # but send it straight to an IO.
  #
  # Here is an example use:
  #
  #   stream = Psych::Stream.new($stdout)
  #   stream.start
  #   stream.push({:foo => 'bar'})
  #   stream.finish
  #
  # YAML will be immediately emitted to $stdout with no buffering.
  #
  # Psych::Stream#start will take a block and ensure that Psych::Stream#finish
  # is called, so you can do this form:
  #
  #   stream = Psych::Stream.new($stdout)
  #   stream.start do |em|
  #     em.push(:foo => 'bar')
  #   end
  #
  class Stream < Psych::Visitors::YAMLTree
    class Emitter < Psych::Emitter # :nodoc:
      def end_document implicit_end = !streaming?
        super
      end

      def streaming?
        true
      end
    end

    include Psych::Streaming
    extend Psych::Streaming::ClassMethods
  end
end
gems/gems/psych-5.0.1/lib/psych/handler.rb000064400000016311150403132740014056 0ustar00# frozen_string_literal: true
module Psych
  ###
  # Psych::Handler is an abstract base class that defines the events used
  # when dealing with Psych::Parser.  Clients who want to use Psych::Parser
  # should implement a class that inherits from Psych::Handler and define
  # events that they can handle.
  #
  # Psych::Handler defines all events that Psych::Parser can possibly send to
  # event handlers.
  #
  # See Psych::Parser for more details
  class Handler
    ###
    # Configuration options for dumping YAML.
    class DumperOptions
      attr_accessor :line_width, :indentation, :canonical

      def initialize
        @line_width  = 0
        @indentation = 2
        @canonical   = false
      end
    end

    # Default dumping options
    OPTIONS = DumperOptions.new

    # Events that a Handler should respond to.
    EVENTS = [ :alias,
               :empty,
               :end_document,
               :end_mapping,
               :end_sequence,
               :end_stream,
               :scalar,
               :start_document,
               :start_mapping,
               :start_sequence,
               :start_stream ]

    ###
    # Called with +encoding+ when the YAML stream starts.  This method is
    # called once per stream.  A stream may contain multiple documents.
    #
    # See the constants in Psych::Parser for the possible values of +encoding+.
    def start_stream encoding
    end

    ###
    # Called when the document starts with the declared +version+,
    # +tag_directives+, if the document is +implicit+.
    #
    # +version+ will be an array of integers indicating the YAML version being
    # dealt with, +tag_directives+ is a list of tuples indicating the prefix
    # and suffix of each tag, and +implicit+ is a boolean indicating whether
    # the document is started implicitly.
    #
    # === Example
    #
    # Given the following YAML:
    #
    #   %YAML 1.1
    #   %TAG ! tag:tenderlovemaking.com,2009:
    #   --- !squee
    #
    # The parameters for start_document must be this:
    #
    #   version         # => [1, 1]
    #   tag_directives  # => [["!", "tag:tenderlovemaking.com,2009:"]]
    #   implicit        # => false
    def start_document version, tag_directives, implicit
    end

    ###
    # Called with the document ends.  +implicit+ is a boolean value indicating
    # whether or not the document has an implicit ending.
    #
    # === Example
    #
    # Given the following YAML:
    #
    #   ---
    #     hello world
    #
    # +implicit+ will be true.  Given this YAML:
    #
    #   ---
    #     hello world
    #   ...
    #
    # +implicit+ will be false.
    def end_document implicit
    end

    ###
    # Called when an alias is found to +anchor+.  +anchor+ will be the name
    # of the anchor found.
    #
    # === Example
    #
    # Here we have an example of an array that references itself in YAML:
    #
    #   --- &ponies
    #   - first element
    #   - *ponies
    #
    # &ponies is the anchor, *ponies is the alias.  In this case, alias is
    # called with "ponies".
    def alias anchor
    end

    ###
    # Called when a scalar +value+ is found.  The scalar may have an
    # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+
    #
    #gems/gems/psych-5.0.1/lib/psych/set.rb000064400000000112150403132740013224 0ustar00uoted  style
    #   ["foo",               nil,      "!str", false,  falsegems/gems/psych-5.0.1/lib/psych/handlers/document_stream.rb000064400000001014150403132750017425 0ustar00gems/gems/psych-5.0.1/lib/psych/handler.rb000064400000016311150403132740014056 0ustar00
    # Callegems/gems/psych-5.0.1/lib/psych/handlers/recorder.rb000064400000001573150403132760016054 0ustar00,     1     ]
    #   [nil,       "tag:yaml.org,2002:map",  false,    2     ]
    #   ["pewpew",  nil,                      true,     1     ]

    def start_mapping anchor, tag, implicit, style
    end

    ###
    # Called when a map ends
    def end_mapping
    end

    ###
    # Called when an empty event happens. (Which, as far as I can tell, is
    # never).
    def empty
    end

    ###
    # Called when the YAML stream ends
    def end_stream
    end

    ###
    # Called before each event with line/column information.
    def event_location(start_line, start_column, end_line, end_column)
    end

    ###
    # Is this handler a streaming handler?
    def streaming?
      false
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/omap.rb000064400000000113150403132760013370 0ustar00# frozen_string_literal: true
module Psych
  class Set < ::Hash
  end
end
gems/gems/psych-5.0.1/lib/psych/nodes.rb000064400000004600150403132770013552 0ustar00# frozen_string_literal: true
require_relative '../tree_builder'

module Psych
  module Handlers
    class DocumentStream < Psych::TreeBuilder # :nodoc:
      def initialize &block
        super
        @block = block
      end

      def start_document version, tag_directives, implicit
        n = Nodes::Document.new version, tag_directives, implicit
        push n
      end

      def end_document implicit_end = !streaming?
        @last.implicit_end = implicit_end
        @block.call pop
      end
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/handlers/recorder.rb000064400000001573150403132760016054 0ustar00# frozen_string_literal: true
require_relative '../handler'

module Psych
  module Handlers
    ###
    # This handler will capture an event and record the event.  Recorder events
    # are available vial Psych::Handlers::Recorder#events.
    #
    # For example:
    #
    #   recorder = Psych::Handlers::Recorder.new
    #   parser = Psych::Parser.new recorder
    #   parser.parse '--- foo'
    #
    #   recorder.events # => [list of events]
    #
    #   # Replay the events
    #
    #   emitter = Psych::Emitter.new $stdout
    #   recorder.events.each do |m, args|
    #     emitter.send m, *args
    #   end

    class Recorder < Psych::Handler
      attr_reader :events

      def initialize
        @events = []
        super
      end

      EVENTS.each do |event|
        define_method event do |*args|
          @events << [event, args]
        end
      end
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/coder.rb000064400000004062150403132770013540 0ustar00# frozen_string_literal: true
module Psych
  class Omap < ::Hash
  end
end
gems/gems/psych-5.0.1/lib/psych/nodes.rb000064400000004600150403132770013552 0gems/gems/psych-5.0.1/lib/psych/set.rb000064400000000112150403132740013224 0ustar00on, when using Psych.dump, the Ruby object graph is
  # translated to an igems/gems/psych-5.0.1/lib/psych/handlers/document_gems/gems/psych-5.0.1/lib/psych/tree_builder.rb000064400000005762150403133000015104 0ustar00n number of
gems/gems/psych-5.0.1/lib/psych/handlers/recorder.rb000064400000001573150403132760016054 0ustar00# frozen_string_literal: true
module Psych
  ###
  # If an object defines +encode_with+, then an instance of Psych::Coder will
  # be passed to the method when the object is being serialized.  The Coder
  # automatically assumes a Psych::Nodes::Mapping is being emitted.  Other
  # objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are
  # called, respectively.
  class Coder
    attr_accessor :tag, :style, :implicit, :object
    attr_reader   :type, :seq

    def initialize tag
      @map      = {}
      @seq      = []
      @implicit = false
      @type     = :map
      @tag      = tag
      @style    = Psych::Nodes::Mapping::BLOCK
      @scalar   = nil
      @object   = nil
    end

    def scalar *args
      if args.length > 0
        warn "#{caller[0]}: Coder#scalar(a,b,c) is deprecated" if $VERBOSE
        @tag, @scalar, _ = args
        @type = :scalar
 gems/gems/psych-5.0.1/lib/psych/omap.rb000064400000000113150403132760013370 0ustar00d +tag+
    def represent_object tag, obj
      @tag    = tag
      @type  gems/gems/psych-5.0.1/lib/psych/core_ext.rb000064400000000552150403133010014240 0ustar00gems/gems/psych-5.0.1/lib/psych/tree_builder.rb000064400000005762150403133000015104 0ustar00gems/gems/psych-5.0.1/lib/psych/streaming.rb000064400000001233150403133020014417 0ustar00 tree
    attr_reader :root

    # Create a new TreeBuilder instance
    def initialize
      @stack = []
      @last  = nil
      @root  = nil

      @start_line   = nil
      @start_column = nil
      @end_line     = nil
      @end_column   = nil
    end

    def event_location(start_line, start_column, end_line, end_column)
      @start_line   = start_line
      @start_column = start_column
      @end_line     = end_line
      @end_column   = end_column
    end

    %w{
      Sequence
      Mapping
    }.each do |node|
      class_eval %{
        def start_#{node.downcase}(anchor, tag, implicit, style)
          n = Nodes::#{node}.new(anchor, tag, implicitgems/gems/psych-5.0.1/lib/psych/syntax_error.rb000064400000001114150403133020015163 0ustar00gems/gems/psych-5.0.1/lib/psych/coder.rb000064400000004062150403132770013540 0ustar00d

    private
    def push value
      @stack.push value
      @last = valugems/gems/psych-5.0.1/lib/psych/json/yaml_events.rb000064400000001413150403133030015726 0ustar00# frozen_string_literal: true
class Object
  def self.yaml_tag url
    Psych.add_tag(url, self)
  end

  ###
  # call-seq: to_yaml(options = {})
  #
  # Convert an object to YAML.  See Psych.dump for more information on the
  # available +options+.
  def to_yaml options = {}
    Psych.dump self, options
  end
end

if defined?(::IRB)
  require_relative 'y'
end
gems/gems/psych-5.0.1/lib/psych/streaming.rb000064400000001233150403133020014417 0ustar00gems/gems/psych-5.0.1/lib/psych/json/stream.rb000064400000000622150403133040014675 0ustar00gems/gems/psych-5.0.1/lib/psych/tree_builder.rb000064400000005762150403133000015104 0ustar00gems/gems/psych-5.0.1/lib/psych/json/ruby_events.rb000064400000000750150403133040015751 0ustar00# frozen_string_literal: true
require_relative 'exception'

module Psych
  class SyntaxError < Psych::Exception
    attr_reader :file, :line, :column, :offset, :problem, :context

    def initialize file, line, col, offset, problem, context
      err      = [problem, context].compact.join ' '
      filename = file || '<unknown>'
      message  = "(%s): %s at line %d column %d" % [filename, err, line, col]

      @file    = file
      @line    = line
      @column  = col
      @offsetgems/gems/psych-5.0.1/lib/psych/json/tree_builder.rb000064400000000543150403133050016052 0ustar00gems/gems/psych-5.0.1/lib/psych/json/yaml_events.rb000064400000001413150403133030015726 0ustar00gems/gems/psych-5.0.1/lib/psych/visitors.rb000064400000000376150403133060014323 0ustar00:Sequence::FLOW)
      end

      def scalar value, anchor, tag, plain, quoted, style
        if "tag:yaml.org,2002:null" == tag
          super('null', nil, nil, true, false, Nodes::Scalar::PLAIN)
        else
          super
        end
      end
    egems/gems/psych-5.0.1/lib/psych/scalar_scanner.rb000064400000011277150403133060015421 0ustar00# frozen_string_literal: true
require_relative 'ruby_events'
require_relative 'yaml_events'

module Psych
  module JSON
    class Stream < Psych::Visitors::JSONTree
      include Psych::JSON::RubyEvents
      include Psych::Streaming
      extend Psych::Streaming::ClassMethods

      class Emitter < Psych::Stream::Emitter # :nodoc:
        include Psych::JSON:gems/gems/psych-5.0.1/lib/psych/streaming.rb000064400000001233150403133020014417 0ustar00# frozen_string_literal: true
module Psych
  module JSON
    module RubyEvents # :nodoc:
      def visit_Time o
        formatted = format_time o
        @emitter.scalar formatted, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED
      end

      def visit_DateTime o
        visit_Time o.to_time
      end

      def visit_String o
        @emitter.scalar o.to_s, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED
      end
      alias :visit_Symbol :visit_String
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/json/tree_builder.rb000064400000000543150403133050016052gems/gems/psych-5.0.1/lib/psych/syntax_error.rb000064400000001114150403133020015163 0ustar00gems/gems/psych-5.0.1/lib/psych/visitors.rb000064400000000376150403133060014323 0ustar00# frozen_string_literal: true
require_relative 'visitors/visitor'
require_regems/gems/psych-5.0.1/lib/psych/json/yaml_events.rb000064400000001413150403133030015726 0ustar00# frozen_string_literal: true

module Psych
  ###
  # Scan scalars for built in types
  class ScalarScanner
    # Taken from http://yaml.org/type/timestamp.html
    TIME = /^-?\d{4}-\d{1,2}-\d{1,2}(?:[Tt]|\s+)\d{1,2}:\d\d:\d\d(?:\.\d*)?(?:\s*(?:Z|[-+]\d{1,2}:?(?:\d\d)?))?$/

    # Taken from http://yaml.org/type/float.html
    # Base 60, [-+]inf and NaN are handled separately
    FLOAT = /^(?:[-+]?([0-9][0-9_,]*)?\.[0-9]*([eE][-+][0-9]+)?(?# base 10))$/x

    # Taken from http://yaml.org/type/int.html
    INTEGER_STRICT = /^(?:[-+]?0b[0-1_]+                  (?# base 2)
                         |[-+]?0[0-7_]+                   (?# base 8)
                         |[-+]?(0|[1-9][0-9_]*)         gems/gems/psych-5.0.1/lib/psych/parser.rb000064400000004034150403133070013731 0ustar00ty?
      return @symbol_cache[string] if @symbol_cache.key?(string)
      integer_regex = @strict_integer ? INTEGER_STRICT : INTEGER_LEGACY
      # Check for a String type, being careful not to get caught by hash keys, hex values, and
      # special floats (e.g., -.inf).
      if string.match?(%r{^[^\d.:-]?[[:alpha:]_\s!@#$%\^&*(){}<>|/\\~;=]+}) || string.match?(/\n/)
        return string if strigems/gems/psych-5.0.1/lib/psych/json/ruby_events.rb000064400000000750150403133040015751 0ustar00RIAN)
        rescue ArgumentError
          string
        end
      elsif string.match?(/^\+?\.inf$/i)
        Float::INFINITY
      elsif string.match?(/^-\.inf$/i)
        -Float::INFINITY
      elsif string.match?(/^\.nan$/i)
        Float::NAN
      elsif string.match?(/^:./)
        if string =~ /^:(["'])(.*)\1/
          @symbol_cache[string] = class_loader.symbolize($2.sub(/^:/, ''))
        else
          @symbol_cache[string] = class_loader.symbolize(string.sub(/^:/, ''))
gems/gems/psych-5.0.1/lib/psych/json/tree_builder.rb000064400000000543150403133050016052 0ustar00t(string.delete(',_').gsub(/gems/gems/psych-5.0.1/lib/psych.rb000064400000061170150403133070012441 0ustar00 offset < 0
        offset -= ((tz[1] || 0) * 60)
      else
        offset += ((tz[1] || 0) * 60)
      end

      klass.new(yy, m, dd, hh, mm, ss+us/(1_000_000r), offset)
    end
  end
end
gems/gems/psych-5.0.1/lib/psych/scalar_scanner.rb000064400000011277150403133060015421 0ustar00# frozen_string_literal: true
module Psych
  ###
  # YAML event parser class.  This class parses a YAML document and calls
  # events on the handler that is passed to the constructor.  The events can
  # be used for things such as constructing a YAML AST or deserializing YAML
  # documents.  It can even be fed back to Psych::Emitter to emit the same
  # document that was parsed.
  #
  # See Psych::Handler for documentation on the events that Psych::Parser emits.
  #
  # Here is an example that prints out ever scalar found in a YAML document:
  #
  #   # Handler for detecting scalar values
  #   class ScalarHandler < Psych::Handler
  #     def scalar value, anchor, tag, plain, quoted, style
  #       puts value
  #     end
  #   end
  #
  #   parser = Psych::Parser.new(ScalarHandler.new)
  #   parser.parse(yaml_document)
  #
  # Here is an example that feeds the parser back in to Psych::Emitter.  The
  # YAML document is read from STDIN and written back out to STDERR:
  #
  #   parser = Psych::Parser.new(Psych::Emitter.new($stderr))
  #   parser.parse($stdin)
  #
  # Psych uses Psych::Parser in combination with Psych::TreeBuilder to
  # construct an AST of the parsed YAML document.

  class Parser
    class Mark < Struct.new(:index, :line, :column)
    end

    # The handler on which events will be called
    attr_accessor :handler

    # Set the encoding for this parser to +encoding+
    attr_writer :external_encoding

    ###
    # Creates a new Psych::Parser instance with +handler+.  YAML events will
    # be called on +handler+.  See Psych::Parser for more details.

    def initialize handler = Handler.new
      @handler = handler
      @external_encoding = ANY
    end

    ###
    # call-seq:
    #    parser.parse(yaml)
    #
    # Parse the YAML document contained in +yaml+.  Events will be called on
    # the handler set on the parser instance.
    #
    # See Psych::Parser and Psych::Parser#handler

    def parse yaml, path = yaml.respond_to?(:path) ? yaml.path : "<unknown>"
      _native_parse @handler, yaml, path
    end
  end
end
gems/gems/psych-5.0.1/lib/psych.rb000064400000061170150403133070012441 0ustar00# frozen_string_literal: true
require_relative 'psych/versions'
case RUBY_ENGINE
when 'jruby'
  require_relative '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_relative 'psych/nodes'
require_relative 'psych/streaming'
require_relative 'psych/visitors'
require_relative 'psych/handler'
require_relative 'psych/tree_builder'
require_relative 'psych/parser'
require_relative 'psych/omap'
require_relative 'psych/set'
require_relative 'psych/coder'
require_relative 'psych/core_ext'
require_relative 'psych/stream'
require_relative 'psych/json/tree_builder'
require_relative 'psych/json/stream'
require_relative 'psych/handlers/document_stream'
require_relative 'psych/class_loader'

###
# = Overview
#
# Psych is a YAML parser and emitter.
# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML]
# or [git repo: https://github.com/yaml/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, isgems/gems/psych-5.0.1/lib/psych/parser.rb000064400000004034150403133070013731 0ustar00 => ['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)  # => #<StringIO:0x000001009d0890>
#
#   # 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.gems/gems/psych-5.0.1/lib/psych.rb000064400000061170150403133070012441 0ustar00des::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) # => #<Psych::Parser>
#   parser = Psych.parser                       # it's an alias for the above
#
#   parser.parse("---\n - a\n - b")             # => #<Psych::Parser>
#   parser.handler                              # => #<Psych::TreeBuilder>
#   parser.handler.root                         # => #<Psych::Nodes::Stream>
#
# ==== 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")       # => #<Psych::Parser>
#
#   parser.handler.first              # => #<Psych::Nodes::Stream>
#   parser.handler.first.to_ruby      # => ["a"]
#
#   parser.handler.root.first         # => #<Psych::Nodes::Document>
#   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

  ###
  # 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.unsafe_load("--- a")             # => 'a'
  #   Psych.unsafe_load("---\n - a\n - b")   # => ['a', 'b']
  #
  #   begin
  #     Psych.unsafe_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.unsafe_load("---\n foo: bar")                         # => {"foo"=>"bar"}
  #   Psych.unsafe_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
  # load method or the safe_load method.
  #
  def self.unsafe_load yaml, filename: nil, fallback: false, symbolize_names: false, freeze: false, strict_integer: false
    result = parse(yaml, filename: filename)
    return fallback unless result
    result.to_ruby(symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer)
  end

  ###
  # Safely load the yaml string in +yaml+.  By default, only the following
  # classes are allowed to be deserialized:
  #
  # * TrueClass
  # * FalseClass
  # * NilClass
  # * Integer
  # * Float
  # * 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::AliasesNotEnabled 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, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false
    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, strict_integer: strict_integer
    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

  ###
  # 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.  This method is
  # similar to `safe_load` except that `Symbol` objects are allowed by default.
  #
  def self.load yaml, permitted_classes: [Symbol], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false
    safe_load yaml, permitted_classes: permitted_classes,
                    permitted_symbols: permitted_symbols,
                    aliases: aliases,
                    filename: filename,
                    fallback: fallback,
                    symbolize_names: symbolize_names,
                    freeze: freeze,
                    strict_integer: strict_integer
  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") # => #<Psych::Nodes::Document:0x00>
  #
  #   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, filename: nil
    parse_stream(yaml, filename: filename) do |node|
      return node
    end

    false
  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::Nodes::Stream:0x00>
  #
  #   Psych.parse_stream("--- a\n--- b") do |node|
  #     node # => #<Psych::Nodes::Document:0x00>
  #   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, filename: nil, &block
    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:
  #
  # [<tt>:indentation</tt>]   Number of space characters used to indent.
  #                           Acceptable value should be in <tt>0..9</tt> range,
  #                           otherwise option is ignored.
  #
  #                           Default: <tt>2</tt>.
  # [<tt>:line_width</tt>]    Max character to wrap line at.
  #
  #                           Default: <tt>0</tt> (meaning "wrap at 81").
  # [<tt>:canonical</tt>]     Write "canonical" YAML form (very verbose, yet
  #                           strictly formal).
  #
  #                           Default: <tt>false</tt>.
  # [<tt>:header</tt>]        Write <tt>%YAML [version]</tt> at the beginning of document.
  #
  #                           Default: <tt>false</tt>.
  #
  # 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)  # => #<StringIO:0x000001009d0890>
  #
  #   # 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

  ###
  # call-seq:
  #   Psych.safe_dump(o)               -> string of yaml
  #   Psych.safe_dump(o, options)      -> string of yaml
  #   Psych.safe_dump(o, io)           -> io object passed in
  #   Psych.safe_dump(o, io, options)  -> io object passed in
  #
  # Safely 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. By default, only the following
  # classes are allowed to be serialized:
  #
  # * TrueClass
  # * FalseClass
  # * NilClass
  # * Integer
  # * Float
  # * String
  # * Array
  # * Hash
  #
  # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+
  # keyword argument.  They are additive.  For example, to allow Date serialization:
  #
  #   Psych.safe_dump(yaml, permitted_classes: [Date])
  #
  # Now the Date class can be dumped in addition to the classes listed above.
  #
  # A Psych::DisallowedClass exception will be raised if the object contains a
  # class that isn't in the +permitted_classes+ list.
  #
  # Currently supported options are:
  #
  # [<tt>:indentation</tt>]   Number of space characters used to indent.
  #                           Acceptable value should be in <tt>0..9</tt> range,
  #                           otherwise option is ignored.
  #
  #                           Default: <tt>2</tt>.
  # [<tt>:line_width</tt>]    Max character to wrap line at.
  #
  #                           Default: <tt>0</tt> (meaning "wrap at 81").
  # [<tt>:canonical</tt>]     Write "canonical" YAML form (very verbose, yet
  #                           strictly formal).
  #
  #                           Default: <tt>false</tt>.
  # [<tt>:header</tt>]        Write <tt>%YAML [version]</tt> at the beginning of document.
  #
  #                           Default: <tt>false</tt>.
  #
  # Example:
  #
  #   # Dump an array, get back a YAML string
  #   Psych.safe_dump(['a', 'b'])  # => "---\n- a\n- b\n"
  #
  #   # Dump an array to an IO object
  #   Psych.safe_dump(['a', 'b'], StringIO.new)  # => #<StringIO:0x000001009d0890>
  #
  #   # Dump an array with indentation set
  #   Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n-  - b\n"
  #
  #   # Dump an array to an IO with indentation set
  #   Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3)
  def self.safe_dump o, io = nil, options = {}
    if Hash === io
      options = io
      io      = nil
    end

    visitor = Psych::Visitors::RestrictedYAMLTree.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.yagems/gems/bundler-2.4.19/libexec/bundler000075500000000143150403133110013577 0ustar00filename: filename).children.map { |node| node.to_ruby(**kwargs) }
             end

    return falgems/gems/bundler-2.4.19/libexec/bundle000075500000002341150403133110013417 0ustar00filename, **kwargs
    File.open(filename, 'r:bom|utf-8') { |f|
      self.safe_load f, filename: filename, **kwargs
    }
  end

  ###
  # 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 load for options.
  def self.load_file filename, **kwargs
    File.open(filename, 'r:bom|utf-8') { |f|
      self.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 "#gems/gems/bundler-2.4.19/lib/bundler/environment_preserver.rb000064400000003705150403133130020003 0ustar00sor :domain_types
    end
  end
  self.load_tags = {}
  self.dump_tags = {}
  self.domain_types = {}
  # :startdoc:
end
gems/gems/bundler-2.4.19/libexec/bundler000075500000000143150403133110013577 0ustar00#!/opt/alt/ruby32/bin/ruby
# frozen_string_literal: true

load File.expand_path("bundle", __dir__)
gems/gems/bundler-2.4.19/libexec/bundle000075500000002341150403133110013417 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-gem.1000064400000012304150403133130015664 0ustar00version (#{Gem::VERSION}) has a bug that prevents " \
    "`required_ruby_version` from working for Bundler. Any scripts that use " \
    "`gem install bundler` will break as soon as Bundler drops support for " \
    "your Ruby version. Please upgrade RubyGems to avoid future breakage " \
    "and silence this warning by running `gem update --system 3.2.3`"
end

require "bundler/friendly_errors"

Bundler.with_friendly_errors do
  require "bundler/cli"

  # Allow any command to use --help flag to show help for that command
  help_flags = %w[--help -h]
  help_flag_used = ARGV.any? {|a| help_flags.include? a }
  args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV

  Bundler::CLI.start(args, :debug => true)
end
gems/gems/bundler-2.4.19/lib/bundler/environment_preserver.rb000064400000003705150403133130020003 0ustar00# frozen_string_literal: true

module Bundler
  class EnvironmentPreserver
    INTENTIONALLY_NIL = "BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL"
    BUNDLER_KEYS = %w[
      BUNDLE_BIN_PATH
      BUNDLE_GEMFILE
      BUNDLER_VERSION
      BUNDLER_SETUP
      GEM_HOME
      GEM_PATH
      MANPATH
      PATH
      RB_USER_INSTALL
      RUBYLIB
      RUBYOPT
    ].map(&:freeze).freeze
    BUNDLER_PREFIX = "BUNDLER_ORIG_"

    def self.from_env
      new(env_to_hash(ENV), BUNDLER_KEYS)
    end

    def self.env_to_hash(env)
      to_hash = env.to_hash
      return to_hash unless Gem.win_platform?

      to_hash.each_with_object({}) {|(k,v), a| a[k.upcase] = v }
    end

    # @param env [Hash]
    # @param keys [Array<String>]
    def initialize(env, keys)
      @original = env
      @keys = keys
      @prefix = BUNDLER_PREFIX
    end

    # Replaces `ENV` with the bundler environment variables backed up
    def replace_with_backup
      unless Gem.win_platform?
        ENV.replace(backup)
        return
      end

      # Fallback logic for Windows below to workaround
      # https://bugs.ruby-lang.org/issues/16798. Can be dropped once all
      # supported rubies include the fix for that.

      ENV.clear

      backup.each {|k, v| ENV[k] = v }
    end

    # @return [Hash]
    def backup
      env = @original.clone
      @keys.each do |key|
        value = env[key]
        if !value.nil? && !value.empty?
          env[@prefix + key] ||= value
        elsif value.nil?
          env[@prefix + key] ||= INTENTIONALLY_NIL
        end
      end
      env
    end

    # @return [Hash]
    def restore
      env = @original.clone
    gems/gems/bundler-2.4.19/libexec/bundler000075500000000143150403133110013577 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-GEM" "gems/gems/bundler-2.4.19/libexec/bundle000075500000002341150403133110013417 0ustar00d create a binary executable (as \fBexe/GEM_NAME\fR) in the generated rubygem project\. This binary will also be added to the \fBGEM_NAME\.gemspec\fR manifest\. This behavior is disabled by defaulgems/gems/bundler-2.4.19/lib/bundler/man/bundle-show.1.ronn000064400000001124150403133140017046 0ustar00cified in the global config)\.
.
.IP "\(bu" 4
\fB\-\-mit\fR: Add an MIT license to a \fBLICENSE\.txt\fR file in the root of the generated project\. Your name from the global git config is used for the copyright statement\. Ifgems/gems/bundler-2.4.19/lib/bundler/environment_preserver.rbgems/gems/bundler-2.4.19/lib/bundler/man/bundle-list.1000064400000001703150403133140016071 0ustar00g the project\. Acceptable values are \fBgithub\fR, \fBgitlab\fR and \fBcircle\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
.
.IP
When Bundler is configured to generate CI files, this defaults to Bundler\'s global config setting \fBgem\.ci\fR\.
.
.IP
When Bundler is configured to not generate CI files, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
.
.IP
When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
.
.IP "\(bu" 4
\fB\-\-linter\fR, \fB\-\-linter=rubocop\fR, \fB\-\-linter=standard\fR: Specify the linter and code formatter that Bundler should add to the project\'s development dependencies\. Acceptable values are \fBrubocop\fR and \fBstandard\fR\. A configuration file will be generated in the project directory\. Given no option isgems/gems/bundler-2.4.19/lib/bundler/man/bundle-help.1.ronn000064400000000535150403133140017023 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-gem.1000064400000012304150403133130015664 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-binstubs.1.ronn000064400000002612150403133140017722 0ustar00bundle-show(1) -- Shows all the gems in your bundle, or the path to a gem
=========================================================================

## SYNOPSIS

`bundle show` [GEM]
              [--paths]

## DESCRIPTION

Without the [GEM] option, `show` will print a list of the names and versions of
all gems that are required by your [`Gemfile(5)`][Gemfile(5)], sorted by name.

Calling show with [GEM] will list the exact location of that gem on your
machine.

## OPTIONS

* `--paths`:
  List the paths of all gems that are required by your [`Gemfile(5)`][Gemfile(5)],
  sorted by gem name.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-list.1000064400000001703150403133140016071 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-gem.1.ronn000064400000011101150403133140016632 0ustar00 \-\-without\-group test
.
.P
bundle list \-\-only\-group dev
.
.P
bundle list \-\-only\-group dev test \-\-paths
.
.SH "OPTIONS"
.
.TP
\fB\-\-name\-only\fR
Print only the name of each gem\.
.
.TP
\fB\-\-paths\fR
Print the path to each gem in the bundle\.
.
.TP
\fB\-\-without\-group=<list>\fR
A space\-separated list of groups of gems to skip during printing\.
.
.TP
\fB\-\-only\-group=<list>\fR
A space\-separated list of groups of gems to print\.

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-help.1.ronn000064400000000535150403133140017023 0ustar00bundle-help(1) -- Displays detailed help for each subcommand
============================================================

## SYNOPSIS

`bundle help` [COMMAND]

## DESCRIPTION

Displays detailed help for the given subcommand.
You can specify a single `COMMAND` at the same time.
When `COMMAND` is omitted, help for `help` command will be displayed.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-binstubs.1.ronn000064400000002612150403133140017722 0ustar00bundle-binstubs(1) -- Install the binstubs of the listed gems
=============================================================

## SYNOPSIS

`bundle binstubs` <GEM_NAME> [--force] [--path PATH] [--standalone]

## DESCRIPTION

Binstubs are scripts that wrap around executables. Bundler creates a
small Ruby file (a binstub) that loads Bundler, runs the command,
and puts it into `bin/`. Binstubs are a shortcut-or alternative-
to always using `bundle exec`. This gives you a file that can be run
directly, and one that will always run the correct gem version
used by the application.

For example, if you run `bundle binstubs rspec-core`, Bundler will create
the file `bin/rspec`. That file will contain enough cgems/gems/bundler-2.4.19/lib/bundler/man/bundle-show.1.ronn000064400000001124150403133140017046 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-gem.1.ronn000064400000011101150403133140016632 0ustar00bundle-gem(1) -- Generate a project skeleton for creating a rubygem
================gems/gems/bundler-2.4.19/lib/bundler/man/bundle-list.1gems/gems/bundler-2.4.19/lib/bundler/man/gemfile.5000064400000055321150403133140015270 0ustar00s.rs/magnus) based) extension code to the generated project. This behavior
  is disabled by default.

* `--no-ext`:
  Do not add extension code (overrides `--ext` specified in the global
  config).

* `--mit`:
  Add an MIT license to a `LICENSE.txt` file in the root of the generated
  project. Your name from the global git config is used for the copyright
  statement. If this option is unspecified, an interactive prompt will be
  displayed and thegems/gems/bundler-2.4.19/lib/bundler/man/bundle-help.1.ronn000064400000000535150403133140017023 0ustar00erate tests, this defaults to Bundler's
  global config setting `gem.test`.

  When Bundler is configured to not generate tests, an interactive prompt will
  be displayed and the answer will be used for the current rubygem project.

  When Bundler is unconfigured, an interactive prompt will be displayed and
  the answer will be saved in Bundler's gems/gems/bundler-2.4.19/lib/bundler/man/bundle-binstubs.1.ronn000064400000002612150403133140017722 0ustar00prompt will be displayed and
  the answer will be saved in Bundler's global config for future `bundle gem`
  use.

* `--linter`, `--linter=rubocop`, `--linter=standard`:
  Specify the linter and code formatter that Bundler should add to the
  project's development dependencies. Acceptable values are `rubocop` and
  `standard`. A configuration file will be generated in the project directory.
  Given no option is specified:

  When Bundler is configured to add a linter, this defaults to Bundler's
  global config setting `gem.linter`.

  When Bundler is configured not to add a linter, an interactive prompt
  will be displayed and the answer will be used for the current rubygem project.

  When Bundler is unconfigured, an interactive prompt will be displayed and
  the answer will be saved in Bundler's global config for future `bundle gem`
  use.

* `-e`, `--edit[=EDITOR]`:
  Open the resulting GEM_NAME.gemspec in EDITOR, or the default editor if not
  specified. The default is `$BUNDLER_EDITOR`, `$VISUAL`, or `$EDITOR`.

## SEE ALSO

* [bundle config(1)](bundle-config.1.html)
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-gem.1.ronn000064400000011101150403133140016632 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GEMFILE" "5" "August 2023" "" ""
.
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
.
.SH "SYNOPSIS"
A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
.
.P
Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
.
.SH "SYNTAX"
A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
.
.SH "GLOBAL SOURCE"
At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
.
.IP "" 4
.
.nf

source "https://rubygems\.org"
.
.fi
.
.IP "" 0
.
.P
You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
.
.P
To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
.
.P
A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
.
.P
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
.
.SS "CREDENTIALS"
Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
.
.IP "" 4
.
.nf

bundle config gems\.example\.com user:password
.
.fi
.
.IP "" 0
.
.P
For some sources, like a company Gemfury account, it may be easier to include the credentials in the Gemfile as part of the source URL\.
.
.IP "" 4
.
.nf

source "https://user:password@gems\.example\.com"
.
.fi
.
.IP "" 0
.
.P
Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
.
.SH "RUBY"
If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
.
.SS "VERSION (required)"
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
.
.IP "" 4
.
.nf

ruby "3\.1\.2"
.
.fi
.
.IP "" 0
.
.P
If you wish to derive your Ruby version from a version file (ie \.ruby\-version), you can use the \fBfile\fR option instead\.
.
.IP "" 4
.
.nf

ruby file: "\.ruby\-version"
.
.fi
.
.IP "" 0
.
.SS "ENGINE"
Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
.
.P
What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby language\.
.
.IP "\(bu" 4
For background: the reference or original implementation of the Ruby programming language is called Matz\'s Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
.
.IP "\(bu" 4
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
.
.IP "" 0
.
.SS "ENGINE VERSION"
Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
.
.IP "" 4
.
.nf

ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
.
.fi
.
.IP "" 0
.
.SS "PATCHLEVEL"
Each application \fImay\fR specify a Ruby pgems/gems/bundler-2.4.19/lib/bundler/man/gemfile.5000064400000055321150403133140015270 0ustar00 an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
.
.IP "" 4
.
.nf

gem "redis", require: ["redis/connection/hiredis", "redis"]
gem "webmock", require: false
gem "byebug", require: true
.
.fi
.
.IP "" 0
.
.P
The argument defaults to the name of the gem\. For example, these are identical:
.
.IP "" 4
.
.nf

gem "nokogiri"
gem "nokogiri", require: "nokogiri"
gem "nokogiri", require: true
.
.fi
.
.IP "" 0
.
.SS "GROUPS"
Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
.
.IP "" 4
.
.nf

gem "rspec", group: :test
gem "wirble", groups: [:development, :test]
.
.fi
.
.IP "" 0
.
.P
The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
.
.IP "" 4
.
.nf

# setup adds gems to Ruby\'s load path
Bundler\.setup                    # defaults to all groups
require "bundler/setup"          # same as Bundler\.setup
Bundler\.setup(:default)          # only set up the _default_ group
Bundler\.setup(:test)             # only set up the _test_ group (but `not` _default_)
Bundler\.setup(:default, :test)   # set up the _default_ and _test_ groups, but no others

# require requires all of the gems in the specified groups
Bundler\.require                  # defaults to the _default_ group
Bundler\.require(:default)        # identical
Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
Bundler\.require(:test)           # requires the _test_ group
.
.fi
.
.IP "" 0
.
.P
The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fBwithout\fR configuration\.
.
.P
To specify multiple groups to ignore, specify a list of groups separated by spaces\.
.
.IP "" 4
.
.nf

bundle config set \-\-local without test
bundle config set \-\-local without development test
.
.fi
.
.IP "" 0
.
.P
Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
.
.P
Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttps://bundler\.io/rationale\.html\fR\.
.
.SS "PLATFORMS"
If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
.
.P
There are a number of \fBGemfile\fR platforms:
.
.TP
\fBruby\fR
C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
.
.TP
\fBmri\fR
C Ruby (MRI) only, but not Windows
.
.TP
\fBwindows\fR
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
.
.TP
\fBmswin\fR
Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
.
.TP
\fBmswin64\fR
Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
.
.TP
\fBrbx\fR
Rubinius
.
.TP
\fBjruby\fR
JRuby
.
.TP
\fBtruffleruby\fR
TruffleRuby
.
.P
On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
.
.IP "" 4
.
.nf

ruby_31
.
.fi
.
.IP "" 0
.
.P
As with groups (above), you may specify one or more platforms:
.
.IP "" 4
.
.nf

gem "weakling",   platforms: :jruby
gem "ruby\-debug", platforms: :mri_31
gem "nokogiri",   platforms: [:windows_31, :jruby]
.
.fi
.
.IP "" 0
.
.P
All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
.
.SS "FORCE_RUBY_PLATFORM"
If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
.
.IP "" 4
.
.nf

gem "ffi", force_ruby_platform: true
.
.fi
.
.IP "" 0
.
.P
This can be handy (assuming the pure ruby variant works fine) when:
.
.IP "\(bu" 4
You\'re having issues with the platform specific variant\.
.
.IP "\(bu" 4
The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
.
.IP "" 0
.
.SS "SOURCE"
You can select an alternate RubyGems repository for a gem using the \':source\' option\.
.
.IP "" 4
.
.nf

gem "some_internal_gem", source: "https://gems\.example\.com"
.
.fi
.
.IP "" 0
.
.P
This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
.
.P
Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
.
.P
\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
.
.P
Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
.
.SS "GIT"
If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
.
.TP
\fBHTTP(S)\fR
gem "rails", git: "https://github\.com/rails/rails\.git"
.
.TP
\fBSSH\fR
gem "rails", git: "git@github\.com:rails/rails\.git"
.
.TP
\fBgit\fR
gem "rails", git: "git://github\.com/rails/rails\.git"
.
.P
If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
.
.P
\fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
.
.P
The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
.
.P
A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\.
.
.P
If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
.
.P
If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
.
.IP "" 4
.
.nf

gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
# bundle install will fail, because the \.gemspec in the rails
# repository\'s master branch specifies version 3\.0\.0
.
.fi
.
.IP "" 0
.
.P
If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
.
.P
Git repositories support a number of additional options\.
.
.TP
\fBbranch\fR, \fBtag\fR, and \fBref\fR
You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
.
.IP
gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
.
.IP
gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
.
.IP
gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
.
.TP
\fBsubmodules\fR
For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
.
.P
If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
.
.IP "" 4
.
.nf

|~rails                   [git root]
| |\-rails\.gemspec         [rails gem located here]
|~actionpack
| |\-actionpack\.gemspec    [actionpack gem located here]
|~activesupport
| |\-activesupport\.gemspec [activesupport gem located here]
|\.\.\.
.
.fi
.
.IP "" 0
.
.P
To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
.
.SS "GIT SOURCE"
A custom git source can be defined via the \fBgit_source\fR method\. Provide the source\'s name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
.
.IP "" 4
.
.nf

git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
gem \'rails\', stash: \'forks/rails\'
.
.fi
.
.IP "" 0
.
.P
In addition, if you wish to choose a specific branch:
.
.IP "" 4
.
.nf

gem "rails", stash: "forks/rails", branch: "branch_name"
.
.fi
.
.IP "" 0
.
.SS "GITHUB"
\fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
.
.P
If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
.
.IP "" 4
.
.nf

gem "rails", github: "rails/rails"
gem "rails", github: "rails"
.
.fi
.
.IP "" 0
.
.P
Are both equivalent to
.
.IP "" 4
.
.nf

gem "rails", git: "https://github\.com/rails/rails\.git"
.
.fi
.
.IP "" 0
.
.P
Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
.
.P
You can also directly pass a pull request URL:
.
.IP "" 4
.
.nf

gem "rails", github: "https://github\.com/rails/rails/pull/43753"
.
.fi
.
.IP "" 0
.
.P
Which is equivalent to:
.
.IP "" 4
.
.nf

gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
.
.fi
.
.IP "" 0
.
.SS "GIST"
If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
.
.IP "" 4
.
.nf

gem "the_hatch", gist: "4815162342"
.
.fi
.
.IP "" 0
.
.P
Is equivalent to:
.
.IP "" 4
.
.nf

gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
.
.fi
.
.IP "" 0
.
.P
Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
.
.SS "BITBUCKET"
If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
.
.IP "" 4
.
.nf

gem "rails", bitbucket: "rails/rails"
gem "rails", bitbucket: "rails"
.
.fi
.
.IP "" 0
.
.P
Are both equivalent to
.
.IP "" 4
.
.nf

gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
.
.fi
.
.IP "" 0
.
.P
Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
.
.SS "PATH"
You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
.
.P
Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
.
.P
Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
.
.IP "" 4
.
.nf

gem "rails", path: "vendor/rails"
.
.fi
.
.IP "" 0
.
.P
If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem\'s files\. This will automatically load gemspec files from subdirectories\.
.
.IP "" 4
.
.nf

path \'components\' do
  gem \'admin_ui\'
  gem \'public_ui\'
end
.
.fi
.
.IP "" 0
.
.SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
The gems/gems/bundler-2.4.19/lib/bundler/man/bundle-cache.1.ronn000064400000006046150403133140017141 0ustar00s may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
.
.P
The presence of a \fBsource\fR block in a Gemfile also makes that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when defining source blocks, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources, either via source blocks or \fB:source\fR directives on individual gems\.
.
.SH "INSTALL_IF"
The \fBinstall_if\fR method allows gems to be installed based on a proc or lambda\. This is especially useful for optional gems that can only be used if certain software is installed or some other conditions are met\.
.
.IP "" 4
.
.nf

install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
  gem "pasteboard"
end
.
.fi
.
.IP "" 0
.
.SH "GEMSPEC"
The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
.
.P
If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
.
.P
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
.
.P
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
.
.P
When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
.
.SH "SOURCE PRIORITY"
When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
.
.IP "1." 4
The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
.
.IP "2." 4
For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
.
.IP "3." 4
If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, thegems/gems/bundler-2.4.19/lib/bundler/man/bundle-check.1.ronn000064400000001531150403133140017145 0ustar00bundle-cache(1) -- Package your needed `.gem` files into your application
===========================================================================

## SYNOPSIS

`bundle cache`

alias: `package`, `pack`

## DESCRIPTION

Copy all of the `.gem` files needed to run the application into the
`vendor/cache` directory. In the future, when running [`bundle install(1)`](bundle-install.1.html),
use the gems in the cache in preference to the ones on `rubygems.org`.

## GIT AND PATH GEMS

The `bundle cache` command can also package `:git` and `:path` dependencies
besides .gem files. This needs to be explicitly enabled via the `--all` option.
Once used, the `--all` option will be remembered.

## SUPPORT FOR MULTIPLE PLATFORMS

When using gems that have different packages for different platforms, Bundler
supports caching of gems for other platforms where thgems/gems/bundler-2.4.19/lib/bundler/man/bundle-platform.1000064400000002664150403133140016751 0ustar00by"` platform. If you deploy
to JRuby and run `bundle install`, bundler is forced to check to
see whether a `"java"` platformed `nokogiri` exists.

Even though the `nokogiri` gem for the Ruby platform is
_technically_ acceptable on JRuby, it has a C extension
that does not run on JRuby. As a result, bundler will, by default,
still connect to `rubygems.org` to check whether it has a version
of one of your gems more specific to your platform.

This problem is also not limited to the `"java"` platform.
A similar (common) problem can happen when developing on Windows
and deploying to Linux, or even when developing on OSX and
deploying to Linux.

If you know for sure that the gems packaged in `vendor/cache`
are appropriate for the platform you are on, you can run
`bundle install --local` to skip checking for more appropriate
gems, and use the ones in `vendor/cache`.

One way to be sure that you have the right platformed versions
of all your gems is to run `bundle cache` on an identical
machine and check in the gems. For instance, you can run
`bundle cache` on an identical staging box during your
staging process, and check in the `vendor/cache` before
deploying to production.

By default, [bundle cache(1)](bundle-cache.1.html) fetches and also
installs the gems to the default location. To package the
dependencies to `vendor/cache` without installing them to the
local install location, you can run `bundle cache --no-install`.

## HISTORY

In Bgems/gems/bundler-2.4.19/lib/bundler/man/bundle-open.1000064400000001503150403133140016055 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-check.1.ronn000064400000001531150403133140017145 0ustar00bundle-check(1) -- Verifies if dependencies are satisfied by installed gems
===========================================================================

## SYNOPSIS

`bundle check` [--dry-run]
               [--gemfile=FILE]
               [--path=PATH]

## DESCRIPTION

`check` searches the local machine for each of the ggems/gems/bundler-2.4.19/lib/bundler/man/bundle-console.1.ronn000064400000002652150403133140017537 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-cache.1.ronn000064400000006046150403133140017141 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-PLATFORM" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information
.
.SH "SYNOPSIS"
\fBbundle platform\fR [\-\-ruby]
.
.SH "DESCRIPTION"
\fBplatform\fR displays information from your Gemfile, Gemfile\.lock, and Ruby VM about your platform\.
.
.P
For instance, using this Gemfile(5):
.
.IP "" 4
.
.nf

source "https://rubygems\.org"

ruby "3\.1\.2"

gem "rack"
.
.fi
.
.IP "" 0
.
.P
If you run \fBbundle platform\fR on Ruby 3\.1\.2, it displays the following output:
.
.IP "" 4
.
.nf

Your platform is: x86_64\-linux

Your app has gems that work on these platforms:
* arm64\-darwin\-21
* ruby
* x64\-mingw\-ucrt
* x86_64\-linux

Your Gemfile specifies a Ruby version requirement:
* ruby 3\.1\.2

Your current platform satisfies the Ruby version requirement\.
.
.fi
.
.IP "" 0
.
.P
\fBplatform\fR gems/gems/bundler-2.4.19/lib/bundler/man/bundle-inject.1000064400000001514150403133140016372 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-open.1000064400000001503150403133140016055 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-OPEN" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
.
.SH "SYNOPSIS"
\fBbundle open\fR [GEM] [\-\-path=PATH]
.
.SH "DESCRIPTION"
Opens the source directory of the provided GEgems/gems/bundler-2.4.19/lib/bundler/man/bundle-install.1.ronn000064400000037307150403133150017551 0ustar00gems/gems/bundler-2.4.19/lib/bundler/mgems/gems/bundler-2.4.19/lib/bundler/man/bundle-check.1.ronn000064400000001531150403133140017145 0ustar00the Gemfile in addition
to the gems in `default` group are loaded. Even if the given group does not
exist in the Gemfile, IRB console starts without any warning or error.

The environment variable `BUNDLE_CONSOLE` or `bundle config set console` can be used to change
the shell from the following:

* `irb` (default)
* `pry` (https://github.com/pry/pry)
* `ripl` (https://github.com/cldwalker/ripl)

`bundle console` uses irb by default. An alternative Pry or Ripl can be used with
`bundle console` by adjusting the `console` Bundler setting. Also make sure that
`pry` or `ripl` is in your Gemfile.

## EXAMPLE

    $ bundle config set console pry
    $ bundle console
    Resolving dependencies...
    [1] pry(main)>

## NOTES

This command was deprecated in Bundler 2.1 and will be removed in 3.0.
Use `bin/console` script, which can be generated by `bundlgems/gems/bundler-2.4.19/lib/bundler/man/bundle-platform.1000064400000002664150403133140016751 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-INJECT" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
.
.SH "SYNOPSIS"
\fBbundle inject\fR [GEM] [VERSION]
.
.SH "DESCRIPTION"
Adds the named gem(s) with their version requirements to the resolved [\fBGemfile(5)\fR][Gemfile(5)]\.
.
.P
This command will add the gem to both your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock if it isn\'t listed yet\.
.
.P
Example:
.
.IP "" 4
.
.nf

bundle install
bundle inject \'rack\' \'> 0\'
.
.fi
.
.IP "" 0
.
.P
This will inject the \'rack\' gem with a version greater than 0 in your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock\.
.
.P
The \fBbundle inject\fR command was deprecated in Bundler 2\.1 and will be removed in Bundler 3\.0\.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-install.1.ronn000064400000037307150403133150017551 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-open.1000064400000001503150403133140016055 0ustar00            [--quiet]
                 [--redownload]
                 [--retry=NUMBER]
                 [--shebang]
                 [--standalone[=GROUP[ GROUP...]]]
                 [--system]
                 [--trust-policy=POLICY]
                 [--with=GROUP[ GROUP...]]
                 [--without=GROUP[ GROUP...]]

## DESCRIPTION

Install the gems specified in your Gemfile(5). If this is the first
time you run bundle install (and a `Gemfile.lock` does not exist),
Bundler will fetch all remote sources, resolve dependencies and
install all needed gems.

If a `Gemfile.lock` does exist, and you have not updated your Gemfile(5),
Bundler will fetch all remote sources, but use the dependencies
specified in the `Gemfile.lock` instead of resolving dependencies.

If a `Gemfile.lock` does exist, and you have updated your Gemgems/gems/bundler-2.4.19/lib/bundler/man/bundle-console.1.ronn000064400000002652150403133140017537 0ustar00o apply them permanently.

* `--binstubs[=<directory>]`:
  Binstubs are scripts that wrap around executables. Bundler creates a small Ruby
  file (a binstub) that loads Bundler, runs the command, and puts it in `bin/`.
  This lets you link the binstub inside of an application to the exact gem
  version the application needs.

  Creates a directory (defaults to `~/bin`) and places any executables from the
  gem there. These executables run in Bundler's context. If used, you might add
  this directory to your environment's `PATH` variable. For instance, if the
  `rails` gem comes with a `rails` executable, this flag will create a
  `bin/rails` executable that ensures that all referred dependencies will be
  resolved using the bundled gems.

* `--clean`:
  On finishing the installation Bundler is going to remove any gems not present
  in the current Gemfile(5). Don't worry, gems currently in use will not be
  removed.

  This option is deprecated in favor of the `clean` setting.

* `--deployment`:
  In [deployment mode][DEPLOYMENT MODE], Bundler will 'roll-out' the bundle for
  production or CI use. Please check carefully if you want to have this option
  enabled in your development environment.

  This option is deprecated in favor of the `deployment` setting.

* `--redownload`:
  Force download every gem, even if the required versions are already available
  locally.

* `--frozen`:
  Do not allow the Gemfile.lock to be updated gems/gems/bundler-2.4.19/lib/bundler/man/bundle-inject.1000064400000001514150403133140016372 0ustar00 Gemfile(5) is also the project's
  root and will try to find `Gemfile.lock` and `vendor/cache` relative
  to this location.

* `--jobs=[<number>]`, `-j[<number>]`:
  The maximum number of parallel download and install jobs. The default is the
  number of available processors.

* `--local`:
  Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the
  gems already present in Rubygems' cache or in `vendor/cache`. Note that if an
  appropriate platform-specific gem exists on `rubygems.org` it will not be
  found.

* `--prefer-local`:
  Force using locally installed gems, or gems already present in Rubygems' cache
  or in `vendor/cache`, when resolving, even if newer versions are available
  remotely. Only attempt to connect to `rubygems.org` for gems that are not
  present locally.

* `--no-cache`:
  Do not update thegems/gems/bundler-2.4.19/lib/bundler/man/bundle-install.1.ronn000064400000037307150403133150017551 0ustar00isted.

  This option is deprecated in favor of the `path` setting.

* `--quiet`:
  Do not print progress information to the standard output. Instead, Bundler
  will exit using a status code (`$?`).

* `--retry=[<number>]`:
  Retry failed network or git requests for <number> times.

* `--shebang=<ruby-executable>`:
  Uses the specified ruby executable (usually `ruby`) to execute the scripts
  created with `--binstubs`. In addition, if you use `--binstubs` together with
  `--shebang jruby` these executables will be changed to execute `jruby`
  instead.

  This option is deprecated in favor of the `shebang` setting.

* `--standalone[=<list>]`:
  Makes a bundle that can work without depending on Rubygems or Bundler at
  runtime. A space separated list of groups to install has to be specified.
  Bundler creates a directory named `bundle` and installs the bundle there. It
  also generates a `bundle/bundler/setup.rb` file to replace Bundler's own setup
  in the manner required. Using this option implicitly sets `path`, which is a
  [remembered option][REMEMBERED OPTIONS].

* `--system`:
  Installs the gems specified in the bundle to the system's Rubygems location.
  This overrides any previous configuration of `--path`.

  This option is deprecated in favor of the `system` setting.

* `--trust-policy=[<policy>]`:
  Apply the Rubygems security policy <policy>, where policy is one of
  `HighSecurity`, `MediumSecurity`, `LowSecurity`, `AlmostNoSecurity`, or
  `NoSecurity`. For more details, please see the Rubygems signing documentation
  linked below in [SEE ALSO][].

* `--with=<list>`:
  A space-separated list of groups referencing gems to install. If an
  optional group is given it is installed. If a group is given that is
  in the remembered list of groups given to --without, it is removed
  from that list.

  This option is deprecated in favor of the `with` setting.

* `--without=<list>`:
  A space-separated list of groups referencing gems to skip during installation.
  If a group is given that is in the remembered list of groups given
  to --with, it is removed from that list.

  This option is deprecated in favor of the `without` setting.

## DEPLOYMENT MODE

Bundler's defaults are optimized for development. To switch to
defaults optimized for deployment and for CI, use the `--deployment`
flag. Do not activate deployment mode on development machines, as it
will cause an error when the Gemfile(5) is modified.

1. A `Gemfile.lock` is required.

   To ensure that the same versions of the gems you developed with
   and tested with are also used in deployments, a `Gemfile.lock`
   is required.

   This is mainly to ensure that you remember to check your
   `Gemfile.lock` into version control.

2. The `Gemfile.lock` must be up to date

   In development, you can modify your Gemfile(5) and re-run
   `bundle install` to [conservatively update][CONSERVATIVE UPDATING]
   your `Gemfile.lock` snapshot.

   In deployment, your `Gemfile.lock` should be up-to-date with
   changes made in your Gemfile(5).

3. Gems are installed to `vendor/bundle` not your default system location

   In development, it's convenient to share the gems used in your
   application with other applications and other scripts that run on
   the system.

   In deployment, isolation is a more important default. In addition,
   the user deploying the application may not have permission to install
   gems to the system, or the web server may not have permission to
   read them.

   As a result, `bundle install --deployment` installs gems to
   the `vendor/bundle` directory in the application. This may be
   overridden using the `--path` option.

## INSTALLING GROUPS

By default, `bundle install` will install all gems in all groups
in your Gemfile(5), except those declared for a different platform.

However, you can explicitly tell Bundler to skip installing
certain groups with the `--without` option. This option takes
a space-separated list of groups.

While the `--without` option will skip _installing_ the gems in the
specified groups, it will still _download_ those gems and use them to
resolve the dependencies of every gem in your Gemfile(5).

This is so that installing a different set of groups on another
 machine (such as a production server) will not change the
gems and versions that you have already developed and tested against.

`Bundler offers a rock-solid guarantee that the third-party
code you are running in development and testing is also the
third-party code you are running in production. You can choose
to exclude some of that code in different environments, but you
will never be caught flat-footed by different versions of
third-party code being used in different environments.`

For a simple illustration, consider the following Gemfile(5):

    source 'https://rubygems.org'

    gem 'sinatra'

    group :production do
      gem 'rack-perftools-profiler'
    end

In this case, `sinatra` depends on any version of Rack (`>= 1.0`), while
`rack-perftools-profiler` depends on 1.x (`~> 1.0`).

When you run `bundle install --without production` in development, we
look at the dependencies of `rack-perftools-profiler` as well. That way,
you do not spend all your time developing against Rack 2.0, using new
APIs unavailable in Rack 1.x, only to have Bundler switch to Rack 1.2
when the `production` group _is_ used.

This should not cause any problems in practice, because we do not
attempt to `install` the gems in the excluded groups, and only evaluate
as part of the dependency resolution process.

This also means that you cannot include different versions of the same
gem in different groups, because doing so would result in different
sets of dependencies used in development and production. Because of
the vagaries of the dependency resolution process, this usually
affects more than the gems you list in your Gemfile(5), and can
(surprisingly) radically change the gems you are using.

## THE GEMFILE.LOCK

When you run `bundle install`, Bundler will persist the full names
and versions of all gems that you used (including dependencies of
the gems specified in the Gemfile(5)) into a file called `Gemfile.lock`.

Bundler uses this file in all subsequent calls to `bundle install`,
which guarantees that you always use the same exact code, even
as your application moves across machingems/gems/bundler-2.4.19/lib/bundler/man/bundle-plugin.1.ronn000064400000003557150403133150017401 0ustar00ces the pain of broken dependencies onto new contributors,
while leaving existing contributors potentially unaware of the problem. Since
`bundle install` is usually the first step towards a contribution, the pain of
broken dependencies would discourage new contributors from contributing. As a
result, we have revised our guidance for gem authors to now recommend checking
in the lock for gems.

## CONSERVATIVE UPDATING

When you make a change to the Gemfile(5) and then run `bundle install`,
Bundler will update only the gems that you modified.

In other words, if a gem that you `did not modify` worked before
you called `bundle install`, it will continue to use the exact
same versions of all dependencies as it used before the update.

Let's take a look at an example. Here's your original Gemfile(5):

    source 'https://rubygems.org'

    gem 'actionpack', '2.3.8'
    gem 'activemerchant'

In this case, both `actionpack` and `activemerchant` depend on
`activesupport`. The `actionpack` gem depends on `activesupport 2.3.8`
and `rack ~> 1.1.0`, while the `activemerchant` gem depends on
`activesupport >= 2.3.2`, `braintree >= 2.0.0`, and `builder >= 2.0.0`.

When the dependencies are first resolved, Bundler will select
`activesupport 2.3.8`, which satisfies the requirements of both
gems in your Gemfile(5).

Next, you modify your Gemfile(5) to:

    source 'https://rubygems.org'

    gem 'actionpack', '3.0.0.rc'
    gem 'activemerchant'

The `actionpack 3.0.0.rc` gem has a number of new dependencies,
and updates the `activesupport` dependency to `= 3.0.0.rc` and
the `rack` dependency to `~> 1.2.1`.

When you run `bundle install`, Bundler notices that you changed
the `actionpack` gem, but not the `activemerchant` gem. It
evaluates the gems currently being used to satisfy its requirements:

  * `activesupport 2.3.8`:
    also used to satisfy a dependency in `activemerchant`,
    whgems/gems/bundler-2.4.19/lib/bundler/man/bundle-plugin.1000064400000004425150403133160016422 0ustar00`activemerchant 1.7.1 + activesupport 2.3.8`,
so `bundle install` will report that it cannot update `actionpack`.

To explicitly update `actionpack`, including its dependencies
which other gems in the Gemfile(5) still depend on, run
`bundle update actionpack` (see `bundle update(1)`).

`Summary`: In general, after making a change to the Gemfile(5) , you
should first try to run `bundle install`, which will guarantee that no
other gem in the Gemfile(5) is impacted by the change. If that
does not work, run [bundle update(1)](bundle-update.1.html).

## SEE ALSO

* [Gem install docs](http://guides.rubygems.org/rubygems-basics/#installing-gems)
* [Rubygems signing docs](http://guides.rubygems.org/security/)
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-plugin.1.ronn000064400000003557150403133150017401 0ustar00bundle-plugin(1) -- Manage Bundler plugins
==========================================

## SYNOPSIS

`bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>]
                              [--git|--local_git=<git-url>] [--branch=<branch>|--ref=<rev>]<br>
`bundle plugin` uninstall PLUGINS<br>
`bundle plugin` list<br>
`bundle plugin` help [COMMAND]

## DESCRIPTION

You can install, uninstall, and list plugin(s) with this command to extend functionalities of Bundler.

## SUB-COMMANDS

### install

Install the given plugin(s).

* `bundle plugin install bundler-graph`:
  Install bundler-graph gem from RubyGems.org. The global source, specified in source in Gemfile is ignored.

* `bundle plugin install bundler-graph --source https://example.com`:
  Install bundler-graphgems/gems/bundler-2.4.19/lib/bundler/man/bundle-pristine.1000064400000003214150403133160016754 0ustar00ion) to use. When you specify both, only the latter is used.

### uninstall

Uninstall the plugin(s) specified in PLUGINS.

### list

List the installed plugins and available commands.

No options.

### help

Describe subcommands or one specific subcommand.

No options.

## SEE ALSO

* [How to write a Bundler plugin](https://bundler.io/guides/bundler_plugins.html)
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-plugin.1000064400000004425150403133160016422 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-PLUGIN" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-plugin\fR \- Manage Bundler plugins
.
.SH "SYNOPSIS"
\fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git|\-\-local_git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR]
.
.br
\fBbundle plugin\fR uninstall PLUGINS
.
.br
\fBbundle plugin\fR list
.
.br
\fBbundle plugin\fR help [COMMAND]
.
.SH "DESCRIPTION"
You can install, uninstall, and list plugin(s) with this command to extend functionalities of Bundler\.
.
.SH "SUB\-COMMANDS"
.
.SS "install"gems/gems/bundler-2.4.19/lib/bundler/man/bundle-lock.1000064400000006165150403133170016060 0ustar00ssh://[user@]host\.xz[:port]/path/to/repo\.git\fR
.
.IP "\(bu" 4
\fBhttp[s]://host\.xz[:port]/path/to/repo\.git\fR
.
.IP "\(bu" 4
\fB/path/to/repo\fR
.
.IP "\(bu" 4
\fBfile:///path/to/repo\fR
.
.IP "" 0
.
.IP
When you specify \fB\-\-git\fR/\fB\-\-local\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\. When you specify both, only the latter is used\.
.
.IP "" 0
.
.SS "uninstall"
Uninstall the plugin(s) specified in PLUGINS\.
.
.SS "list"
List the installed plugins and available commands\.
.
.P
No options\.
.
.SS "help"
Describe subcommands or one specific subcommand\.
.
.P
No options\.
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
How to write a Bundgems/gems/bundler-2.4.19/lib/bundler/man/bundle-plugin.1.ronn000064400000003557150403133150017401 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-PRISTINE" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
.
.SH "SYNOPSIS"
\fBbundle pristine\fR
.
.SH "DESCRIPTION"
\fBpristine\fR restores the installed gems in the bundle to their pristine condition using the local gem cache from RubyGems\. For git gems, a forced checkout will be performed\.
.
.P
For further explanation, \fBbundle pristine\fR ignores unpacked files on disk\. In other words, this command utilizes the local \fB\.gem\fR cache or the gem\'s git repository as if one were installing from scratch\.
.
.P
Note: the Bundler gem cannot be restored to its original state with \fBpristine\fR\. One also cannot use \fBbundle pristine\fR on gems with a \'path\' option in the Gemfile, because bundler has no original copy it can restore from\.
.
.P
When is it practical to use \fBbundle pristine\fR?
.
.P
It comes in handy when a developer is debugging a gem\. \fBbundle pristine\fR is a great way to get rid of experimental changes to a gem that one may not want\.
.
.P
Why use \fBbundle pristine\fR over \fBgem pristine \-\-all\fR?
.
.P
Both commands are very similar\. For context: \fBbundle pristine\fR, without arguments, cleans all gems from the lockfile\. Meanwhile, \fBgem pristine \-\-all\fR cleans all installed gems for that Ruby version\.
.
.P
If a developer forgets which gems in their project they might have been debugging, the Rubygems \fBgem pristine [GEMNAME]\fR command may be inconvenient\. One can avoid waiting for \fBgem pristine \-\-all\fR, and instead run \gems/gems/bundler-2.4.19/lib/bundler/man/bundle-update.1.ronn000064400000031002150403133170017351 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-LOCK" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
.
.SH "SYNOPSIS"
\fBbundle lock\fR [\-\-update] [\-\-local] [\-\-print] [\-\-lockfile=PATH] [\-\-full\-index] [\-\-add\-platform] [\-\-remove\-platform] [\-\-patch] [\-\-minor] [\-\-major] [\-\-strict] [\-\-conservative]
.
.SH "DESCRIPTION"
Lock the gems specified in Gemfile\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-update=<*gems>\fR
Ignores the existing lockfile\. Resolve then updates lockfile\. Taking a list of gems or updating all gems if no list is given\.
.
.TP
\fB\-\-local\fR
Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if a appropriate platform\-specific gem exists on \fBrubygems\.org\fR it will not be found\.
.
.TP
\fB\-\-print\fR
Prints the lockfile to STDOUT instead of writing to the file system\.
.
.TP
\fB\-\-lockfile=<path>\fR
The path where the lockfile should be written to\.
.
.TP
\fB\-\-full\-index\fR
Fall back to using the single\-file index of all gems\.
.
.TP
\fB\-\-add\-platform\fR
Add a new platform to the lockfile, re\-resolving for the addition of that platform\.
.
.TP
\fB\-\-remove\-platform\fR
Remove a platform from the lockfile\.
.
.TP
\fB\-\-patch\fR
If updating, prefer updating only to next patch version\.
.
.TP
\fB\-\-minor\fR
If updating, prefer updating only to next minor version\.
.
.TP
\fB\-\-major\fR
If updating, prefer updating to next major version (default)\.
.
.TP
\fB\-\-strict\fR
If updating, do not allow any gem to be updated past latest \-\-patch | \-\-minor | \-\-major\.
.
.TP
\fB\-\-conservative\fR
If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated\.
.
.SH "UPDATING ALL GEMS"
If you run \fBbundle lock\fR with \fB\-\-update\fR option without list of gems, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
.
.SH "UPDATING A LIST OF GEMS"
Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the \fBGegems/gems/bundler-2.4.19/lib/bundler/man/bundle-pristine.1000064400000003214150403133160016754 0ustar00Bgem help platform\fR\.
.
.SH "PATCH LEVEL OPTIONS"
See bundle update(1) \fIbundle\-update\.1\.html\fR for details\.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-update.1.ronn000064400000031002150403133170017351 0ustar00bundle-update(1) -- Update your gems to the latest available versions
=====================================================================

## SYNOPSIS

`bundle update` <*gems> [--all]
                        [--group=NAME]
                        [--source=NAME]
                        [--local]
                        [--ruby]
                        [--bundler[=VERSION]]
                        [--full-index]
                        [--jobs=JOBS]
                        [--quiet]
                        [--patch|--minor|--major]
                        [--redownload]
                        [--strict]
                        [--conservativegems/gems/bundler-2.4.19/lib/bundler/man/bundle-lock.1000064400000006165150403133170016060 0ustar00/rails/rails.git`,
  you would call `bundle update --source rails`

* `--local`:
  Do not attempt to fetch gems remotely and use the gem cache instead.

* `--ruby`:
  Update the locked version of Ruby to the current version of Ruby.

* `--bundler`:
  Update the locked version of bundler to the invoked bundler version.

* `--full-index`:
  Fall back to using the single-file index of all gems.

* `--jobs=[<number>]`, `-j[<number>]`:
  Specify the number of jobs to run in parallel. The default is the number of
  available processors.

* `--retry=[<number>]`:
  Retry failed network or git requests for <number> times.

* `--quiet`:
  Only output warnings and errors.

* `--redownload`:
  Force downloading every gem.

* `--patch`:
  Prefer updating only to next patch version.

* `--minor`:
  Prefer updating only to next minor version.

* `--major`:
  Prefer updating to next major version (default).

* `--strict`:
  Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`.

* `--conservative`:
  Use bundle install conservative update behavior and do not allow indirect dependencies to be updated.

## UPDATING ALL GEMS

If you run `bundle update --all`, bundler will ignore
any previously installed gems and resolve all dependencies again
based on the latest versions of all gems available in the sources.

Consider the following Gemfile(5):

    source "https://rubygems.org"

    gem "rails", "3.0.0.rc"
    gem "nokogiri"

When you run [bundle install(1)](bundle-install.1.html) the first time, bundler will resolve
all of the dependencies, all the way down, and install what you need:

    Fetching gem metadata from https://rubygems.org/.........
    Resolving dependencies...
    Installing builder 2.1.2
    Installing abstract 1.0.0
    Installing rack 1.2.8
    Using bundler 1.7.6
    Installing rake 10.4.0
    Installing polyglot 0.3.5
    Installing mime-types 1.25.1
    Installing i18n 0.4.2
    Installing mini_portile 0.6.1
    Installing tzinfo 0.3.42
    Installing rack-mount 0.6.14
    Installing rack-test 0.5.7
    Installing treetop 1.4.15
    Installing thor 0.14.6
    Installing activesupport 3.0.0.rc
    Installing erubis 2.6.6
    Installing activemodel 3.0.0.rc
    Installing arel 0.4.0
    Installing mail 2.2.20
    Installing activeresource 3.0.0.rc
    Installing actionpack 3.0.0.rc
    Installing activerecord 3.0.0.rc
    Installing actionmailer 3.0.0.rc
    Installing railties 3.0.0.rc
    Installing rails 3.0.0.rc
    Installing nokogiri 1.6.5

    Bundle complete! 2 Gemfile dependencies, 26 gems total.
    Use `bundle show [gemname]` to see where a bundled gem is installed.

As you can see, even though you have two gems in the Gemfile(5), your application
needs 26 different gems in order to run. Bundler remembers the exact versions
it installed in `Gemfile.lock`. The next time you run [bundle install(1)](bundle-install.1.html), bundler skips
the dependency resolution and installs the same gems as it installed last time.

After checking in the `Gemfile.lock` into version control and cloning it on another
machine, running [bundle install(1)](bundle-install.1.html) will _still_ install the gems that yougems/gems/bundler-2.4.19/lib/bundler/man/bundle-update.1.ronn000064400000031002150403133170017351 0ustar00Rails and all of its dependencies. To do this,
run `bundle update nokogiri`.

Bundler will update `nokogiri` and any of its dependencies, but leave alone Rails and
its dependencies.

## OVERLAPPING DEPENDENCIES

Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same
second-level dependency. For instance, consider the case of `thin` and
`rack-perftools-profiler`.

    source "https://rubygems.org"

    gem "thin"
    gem "rack-perftools-profiler"

The `thin` gem depends on `rack >= 1.0`, while `rack-perftools-profiler` depends
on `rack ~> 1.0`. If you run bundle install, you get:

    Fetching source index for https://rubygems.org/
    Installing daemons (1.1.0)
    Installing eventmachine (0.12.10) with native extensions
    Installing open4 (1.0.1)
    Installing perftools.rb (0.4.7) with native extensions
    Installing rack (1.2.1)
    Installing rack-perftools_profiler (0.0.2)
    Installing thin (1.2.7) with native extensions
    Using bundler (1.0.0.rc.3)

In this case, the two gems have their own set of dependencies, but they share
`rack` in common. If you run `bundle update thin`, bundler will update `daemons`,
`eventmachine` and `rack`, which are dependencies of `thin`, but not `open4` or
`perftools.rb`, which are dependencies of `rack-perftools_profiler`. Note that
`bundle update thin` will update `rack` even though it's _also_ a dependency of
`rack-perftools_profiler`.

In short, by default, when you update a gem using `bundle update`, bundler will
update all dependencies of that gem, including those that are also dependencies
of another gem.

To prevent updating indirect dependencies, prior to version 1.14 the only option
was the `CONSERVATIVE UPDATING` behavior in [bundle install(1)](bundle-install.1.html):

In this scenario, updating the `thin` version manually in the Gemfile(5),
and then running [bundle install(1)](bundle-install.1.html) will only update `daemons` and `eventmachine`,
but not `rack`. For more information, see the `CONSERVATIVE UPDATING` section
of [bundle install(1)](bundle-install.1.html).

Starting with 1.14, specifying the `--conservative` option will also prevent indirect
dependencies from being updated.

## PATCH LEVEL OPTIONS

Version 1.14 introduced 4 patch-level options that will influence how gem
versions are resolved. One of the following options can be used: `--patch`,
`--minor` or `--major`. `--strict` can be added to further influence resolution.

* `--patch`:
  Prefer updating only to next patch version.

* `--minor`:
  Prefer updating only to next minor version.

* `--major`:
  Prefer updating to next major version (default).

* `--strict`:
  Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`.

When Bundler is resolving what versions to use to satisfy declared
requirements in the Gemfile or in parent gems, it looks up all
available versions, filters out any versions that don't satisfy
the requirement, and then, by default, sorts them from newest to
oldest, considering them in that order.

Providing one of the patch levelgems/gems/bundler-2.4.19/lib/bundler/man/bundle-install.1000064400000041153150403133200016564 0ustar00th `--patch` and `--strict`
options are used, the available versions for resolution would be
"1.0.4, 1.0.3, 1.0.2". If `--minor` and `--strict` are used, it would
be "1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2".

Gem requirements as defined in the Gemfile will still be the first
determining factor for what versions are available. If the gem
requirement for `foo` in the Gemfile is '~> 1.0', that will accomplish
the same thing as providing the `--minor` and `--strict` options.

## PATCH LEVEL EXAMPLES

Given the following gem specifications:

    foo 1.4.3, requires: ~> bar 2.0
    foo 1.4.4, requires: ~> bar 2.0
    foo 1.4.5, requires: ~> bar 2.1
    foo 1.5.0, requires: ~> bar 2.1
    foo 1.5.1, requires: ~> bar 3.0
    bar with versions 2.0.3, 2.0.4, 2.1.0, 2.1.1, 3.0.0

Gemfile:

    gem 'foo'

Gemfile.lock:

    foo (1.4.3)
      bar (~> 2.0)
    bar (2.0.3)

Cases:

    #  Command Line                     Result
    ------------------------------------------------------------
    1  bundle update --patch            'foo 1.4.5', 'bar 2.1.1'
    2  bundle update --patch foo        'foo 1.4.5', 'bar 2.1.1'
    3  bundle update --minor            'foo 1.5.1', 'bar 3.0.0'
    4  bundle update --minor --strict   'foo 1.5.0', 'bar 2.1.1'
    5  bundle update --patch --strict   'foo 1.4.4', 'bar 2.0.4'

In case 1, bar is upgraded to 2.1.1, a minor version increase, because
the dependency from foo 1.4.5 required it.

In case 2, only foo is requested to be unlocked, but bar is also
allowed to move because it's not a declared dependency in the Gemfile.

In case 3, bar goes up a whole major release, because a minor increase
is preferred now for foo, and when it goes to 1.5.1, it requires 3.0.0
of bar.

In case 4, foo is preferred up to a minor version, but 1.5.1 won't work
because the --strict flag removes bar 3.0.0 from consideration since
it's a major increment.

In case 5, both foo and bar have any minor or major increments removed
from consideration because of the --strict flag, so the most they can
move is up to 1.4.4 and 2.0.4.

## RECOMMENDED WORKFLOW

In general, when working with an application managed with bundler, you should
use the following workflow:

* After you create your Gemfile(5) for the first time, run

    $ bundle install

* Check the resulting `Gemfile.lock` into version control

    $ git add Gemfile.lock

* When checking out this repository on another development machine, run

    $ bundle install

* When checking out this repository on a deployment machine, run

    $ bundle install --deployment

* After changing the Gemfile(5) to reflect a new or update dependency, run

    $ bundle install

* Make sure to check the updated `Gemfile.lock` into version control

    $ git add Gemfile.lock

* If [bundle install(1)](bundle-install.1.html) reports a conflict, manually update the specific
  gems that you changed in the Gemfile(5)

    $ bundle update rails thin

* If you want to update all the gems to the latest possible versions that
  still match the gems listed in the Gemfile(5), run

    $ bundle update --all
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-install.1000064400000041153150403133200016564 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-INSTALL" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
.
.SH "SYNOPSIS"
\fBbundle install\fR [\-\-binstubs[=DIRECTORY]] [\-\-clean] [\-\-deployment] [\-\-frozen] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-local] [\-\-no\-cache] [\-\-no\-prune] [\-\-path PATH] [\-\-quiet] [\-\-redownload] [\-\-retry=NUMBER] [\-\-shebang] [\-\-standalone[=GROUP[ GROUP\.\.\.]]] [\-\-system] [\-\-trust\-policy=POLICY] [\-\-with=GROUP[ GROUP\.\.\.]] [\-\-without=GROUP[ GROUP\.\.\.]]
.
.SH "DESCRIPTION"
Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), Bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
.
.P
If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), Bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
.
.P
If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), Bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
.
.SH "OPTIONS"
The \fB\-\-clean\fR, \fB\-\-deployment\fR, \fB\-\-frozen\fR, \fB\-\-no\-prune\fR, \fB\-\-path\fR, \fB\-\-shebang\fR, \fB\-\-system\fR, \fB\-\-without\fR and \fB\-\-with\fR options are deprecated because they only make sense if they are applied to every subsequent \fBbundle install\fR run automatically and that requires \fBbundler\fR to silently remember them\. Since \fBbundler\fR will no longer remember CLI flags in future versions, \fBbundle config\fR (see bundle\-config(1)) should be used to apply them permanently\.
.
.TP
\fB\-\-binstubs[=<directory>]\fR
Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it in \fBbin/\fR\. This lets you link the binstub inside of an application to the exact gem version the application needs\.
.
.IP
Creates a directory (defaults to \fB~/bin\fR) and places any executables from the gem there\. These executables run in Bundler\'s context\. If used, you might add this directory to your environment\'s \fBPATH\fR variable\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all referred dependencies will be resolved using the bundled gems\.
.
.TP
\fB\-\-clean\fR
On finishing the installation Bundler is going to remove any gems not present in the current Gemfile(5)\. Don\'t worry, gems currently in use will not be removed\.
.
.IP
This option is deprecated in favor of the \fBclean\fR setting\.
.
.TP
\fB\-\-deployment\fR
In \fIdeployment mode\fR, Bundler will \'roll\-out\' the bundle for production or CI use\. Please check carefully if you want to have this option enabled in your development environment\.
.
.IP
This option is deprecated in favor of the \fBdeployment\fR setting\.
.
.TP
\fB\-\-redownload\fR
Force download every gem, even if the required versions are already available locally\.
.
.TP
\fB\-\-frozen\fR
Do not allow the Gemfile\.lock to be updated after this install\. Exits non\-zero if there are going to be changes to the Gemfile\.lock\.
.
.IP
This option is deprecated in favor of the \fBfrozen\fR setting\.
.
.TP
\fB\-\-full\-index\fR
Bundler will not call Rubygems\' API endpoint (default) but download and cache a (currently big) index file of all gems\. Performance can be improved for large bundles that seldom change by enabling this option\.
.
.TP
\fB\-\-gemfile=<gemfile>\fR
The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project\'s root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
.
.TP
\fB\-\-jobs=[<number>]\fR, \fB\-j[<number>]\fR
The maximum number of parallel download and install jobs\. The default is the number of available processors\.
.
.TP
\fB\-\-local\fR
Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if an appropriate platform\-specifigems/gems/bundler-2.4.19/lib/bundler/man/bundle-install.1000064400000041153150403133200016564 0ustar00ill show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
.
.IP
This option is deprecated in favor of the \fBpath\fR setting\.
.
.TP
\fB\-\-quiet\fR
Do not print progress information to the standard output\. Instead, Bundler will exit using a status code (\fB$?\fR)\.
.
.TP
\fB\-\-retry=[<number>]\fR
Retry failed network or git requests for \fInumber\fR times\.
.
.TP
\fB\-\-shebang=<ruby\-executable>\fR
Uses the specified ruby executable (usually \fBruby\fR) to execute the scripts created with \fB\-\-binstubs\fR\. In addition, if you use \fB\-\-binstubs\fR together with \fB\-\-shebang jruby\fR these executables will be changed to execute \fBjruby\fR instead\.
.
.IP
This option is deprecated in favor of the \fBshebang\fR setting\.
.
.TP
\fB\-\-standalone[=<list>]\fR
Makes a bundle that can work without depending on Rubygems or Bundler at runtime\. A space separated list of groups to install has to be specified\. Bundler creates a directory named \fBbundle\fR and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler\'s own setup in the manner required\. Using this option implicitly sets \fBpath\fR, which is a [remembered option][REMEMBERED OPTIONS]\.
.
.TP
\fB\-\-system\fR
Installs the gems specified in the bundle to the system\'s Rubygems location\. This overrides any previous configuration of \fB\-\-path\fR\.
.
.IP
This option is deprecated in favor of the \fBsystem\fR setting\.
.
.TP
\fB\-\-trust\-policy=[<policy>]\fR
Apply the Rubygems security policy \fIpolicy\fR, where policy is one of \fBHighSecurity\fR, \fBMediumSecurity\fR, \fBLowSecurity\fR, \fBAlmostNoSecurity\fR, or \fBNoSecurity\fR\. For more details, please see the Rubygems signing documentation linked below in \fISEE ALSO\fR\.
.
.TP
\fB\-\-with=<list>\fR
A space\-separated list of groups referencing gems to install\. If an optional group is given it is installed\. If a group is given that is in the remembered list of groups given to \-\-without, it is removed from that list\.
.
.IP
This option is deprecated in favor of the \fBwith\fR setting\.
.
.TP
\fB\-\-without=<list>\fR
A space\-separated list of groups referencing gems to skip during installation\. If a group is given that is in the remembered list of groups given to \-\-with, it is removed from that list\.
.
.IP
This option is deprecated in favor of the \fBwithout\fR setting\.
.
.SH "DEPLOYMENT MODE"
Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment and for CI, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause an error when the Gemfile(5) is modified\.
.
.IP "1." 4
A \fBGemfile\.lock\fR is required\.
.
.IP
To ensure that the same versions of the gems you developed with and tested with are also used in deployments, a \fBGemfile\.lock\fR is required\.
.
.IP
This is mainly to ensure that you remember to check your \fBGemfile\.lock\fR into version control\.
.
.IP "2." 4
The \fBGemfile\.lock\fR must be up to date
.
.IP
In development, you can modify your Gemfile(5) and re\-run \fBbundle install\fR to \fIconservatively update\fR your \fBGemfile\.lock\fR snapshot\.
.
.IP
In deployment, your \fBGemfile\.lock\fR should be up\-to\-date with changes made in your Gemfile(5)\.
.
.IP "3." 4
Gems are installed to \fBvendor/bundle\fR not your default system location
.
.IP
In development, it\'s convenient to share the gems used in your application with other applications and other scripts that run on the system\.
.
.IP
In deployment, isolation is a more important default\. In addition, the user deploying the application may not have permission to install gems to the system, or the web server may not have permission to read them\.
.
.IP
As a result, \fBbundle install \-\-deployment\fR installs gems to the \fBvendor/bundle\fR directory in the application\. This may be overridden using the \fB\-\-path\fR option\.
.
.IP "" 0
.
.SH "INSTALLING GROUPS"
By default, \fBbundle install\fR will install all gems in all groups in your Gemfile(5), except those declared for a different platform\.
.
.P
However, you can explicitly tell Bundler to skip installing certain groups with the \fB\-\-without\fR option\. This option takes a space\-separated list of groups\.
.
.P
While the \fB\-\-without\fR option will skip \fIinstalling\fR the gems in the specified groups, it will still \fIdownload\fR those gems and use them to resolve the dependencies of every gem in your Gemfile(5)\.
.
.P
This is so that installing a different set of groups on another machine (such as a production server) will not change the gems and versions that you have already developed and tested against\.
.
.P
\fBBundler offers a rock\-solid guarantee that the third\-party code you are running in development and testing is also the third\-party code you are running in production\. You can choose to exclude some of that code in different environments, but you will never be caught flat\-footed by different versions of third\-party code being used in different environments\.\fR
.
.P
For a simple illustration, consider the following Gemfile(5):
.
.IP "" 4
.
.nf

source \'https://rubygems\.org\'

gem \'sinatra\'

group :production do
  gem \'rack\-perftools\-profiler\'
end
.
.fi
.
.IP "" 0
.
.P
In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR), while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
.
.P
When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, only to have Bundler switch to Rack 1\.2 when the \fBproduction\fR group \fIis\fR used\.
.
.P
This should not cause any problems in practice, because we do not attempt to \fBinstall\fR the gems in the excluded groups, and only evaluate as part of the dependency resolution process\.
.
.P
This also means that you cannot include different versions of the same gem in different groups, because doing so would result in different sets of dependencies used in development and production\. Because of the vagaries of the dependency resolution process, this usually affects more than the gems you list in your Gemfile(5), and can (surprisingly) radically change the gems you are using\.
.
.SH "THE GEMFILE\.LOCK"
When you run \fBbundle install\fR, Bundler will persist the full names and versions of all gems that you used (including dependencies of the gems specified in the Gemfile(5)) into a file called \fBGemfile\.lock\fR\.
.
.P
Bundler uses this file in all subsequent calls to \fBbundle install\fR, which guarantees that you always use the same exact code, even as your application moves across machines\.
.
.P
Because of the way dependency resolution works, even a seemingly small change (for instance, an update to a point\-release of a dependency of a gem in your Gemfile(5)) can result in radically different gems being needed to satisfy all dependencies\.
.
.P
As a result, you \fBSHOULD\fR check your \fBGemfile\.lock\fR into version control, in both applications and gems\. If you do not, every machine that chegems/gems/bundler-2.4.19/lib/bundler/man/bundle-clean.1000064400000001341150403133200016173 0ustar00e(5) and then run \fBbundle install\fR, Bundler will update only the gems that you modified\.
.
.P
In other words, if a gem that you \fBdid not modify\fR worked before you called \fBbundle install\fR, it will continue to use the exact same versions of all dependencies as it used before the update\.
.
.P
Let\'s take a look at an example\. Here\'s your original Gemfile(5):
.
.IP "" 4
.
.nf

source \'https://rubygems\.org\'

gem \'actionpack\', \'2\.3\.8\'
gem \'activemerchant\'
.
.fi
.
.IP "" 0
.
.P
In this case, both \fBactionpack\fR and \fBactivemerchant\fR depend on \fBactivesupport\fR\. The \fBactionpack\fR gem depends on \fBactivesupport 2\.3\.8\fR and \fBrack ~> 1\.1\.0\fR, while the \fBactivemerchant\fR gem depends on \fBagems/gems/bundler-2.4.19/lib/bundler/man/bundle-outdated.1000064400000006425150403133200016732 0ustar00to satisfy its requirements:
.
.TP
\fBactivesupport 2\.3\.8\fR
also used to satisfy a dependency in \fBactivemerchant\fR, which is not being updated
.
.TP
\fBrack ~> 1\.1\.0\fR
not currently being used to satisfy another dependency
.
.P
Because you did not explicitly ask to update \fBactivemerchant\fR, you would not expect it to suddenly stop working after updating \fBactionpack\fR\. However, satisfying the new \fBactivesupport 3\.0\.0\.rc\fR dependency of actionpack requires updating one of its dependencies\.
.
.P
Even though \fBactivemerchant\fR declares a very loose dependency that theoretically matches \fBactivesupport 3\.0\.0\.rc\fR, Bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies\. In this case, the \fBactivemerchant\fR dependency is treated as \fBactivemerchant 1\.7\.1 + activesupport 2\.3\.8\fR, so \fBbundle install\fR will report that it cannot update \fBactionpack\fR\.
.
.P
To explicitly update \fBactionpack\fR, including its dependencies which other gems in the Gemfile(5) still depend on, run \fBbundle update actionpack\fR (see \fBbundle update(1)\fR)\.
.
.P
\fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gem in the Gemfile(5) is impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
Gem install docs \fIhttp://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
.
.IP "\(bu" 4
Rubygems signing docs \fIhttp://guides\.rubygems\.org/security/\fR
.
.IP "" 0

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-clean.1000064400000001341150403133200016173 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CLEAN" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
.
.SH "SYNOPSIS"
\fBbundle clean\fR [\-\-dry\-run] [\-\-force]
.
.SH "DESCRIPTION"
This command will remove all unused gems in your bundler directory\. This is useful when you have made many changes to your gem dependencies\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-dry\-run\fR
Print the changes, but do not clean the unused gems\.
.
.TP
\fB\-\-force\fR
Forces cleaning up unused gems even if Bundler is configured to use globally installed gems\. As a consequence, removes all system gems except for the ones in the current application\.

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-outdated.1.ronn000064400000006075150403133200017706 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-OUTDATED" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available
.
.SH "SYNOPSIS"
\fBbundle outdated\fR [GEM] [\-\-local] [\-\-pre] [\-\-source] [\-\-strict] [\-\-parseable | \-\-porcelain] [\-\-group=GROUP] [\-\-groups] [\-\-patch|\-\-minor|\-\-major] [\-\-filter\-major] [\-\-filter\-minor] [\-\-filter\-patch] [\-\-only\-explicit]
.
.SH "DESCRIPTION"
Outdated lists the names and versions of gems that have a newer version available in the given source\. Calling outdated with [GEM [GEM]] will only check for newer versions of the given gems\. Prerelease gems are ignored by default\. If your gems are up to date, Bundler will exit with a status of 0\. Otherwise, it will exit 1\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-local\fR
Do not attempt to fetch gems remotely and use the gem cache instead\.
.
.TP
\fB\-\-pre\fR
Check for newer pre\-release gems\.
.
.TP
\fB\-\-source\fR
Check against a specific source\.
.
.TP
\fB\-\-strict\fR
Only list newer versions allowed by your Gemfile requirements, also respecting conservative update flags (\-\-patch, \-\-minor, \-\-major)\.
.
.TP
\fB\-\-parseable\fR, \fB\-\-porcelain\fR
Use minimal formatting for more parseable output\.
.
.TP
\fB\-\-group\fR
List gems from a specific group\.
.
.TP
\fB\-\-groups\fR
List gems organized by groups\.
.
.TP
\fB\-\-minor\fR
Prefer updating only to next minor version\.
.
.TP
\fB\-\-major\fR
Prefer updating to next major version (default)\.
.
.TP
\fB\-\-patch\fR
Prefer updating only to next patch version\.
.
.TP
\fB\-\-filter\-major\fR
Only list major newer versions\.
.
.TP
\fB\-\-filter\-minor\fR
Only list minor newer versions\.
.
.TP
\fB\-\-filter\-patch\fR
Only list patch newer versions\.
.
.TP
\fB\-\-only\-explicit\fR
Only list gems specified in your Gemfile, not their dependencies\.
.
.SH "PATCH LEVEL OPTIONS"
See bundle update(1) \fIbundle\-update\.1\.html\fR for details\.
.
.SH "FILTERING OUTPUT"
The 3 filtering options do not affect the resolution of versions, merely what versions are shown in the output\.
.
.P
If the regular output shows the following:
.
.IP "" 4
.
.nf

* Gem       Current  Latest  Requested  Groups
* faker     1\.6\.5    1\.6\.6   ~> 1\.4     development, test
* hashie    1\.2\.0    3\.4\.6   = 1\.2\.0    default
* headless  2\.2\.3    2\.3\.1   = 2\.2\.3    test
.
.fi
.
.IP "" 0
.
.P
\fB\-\-filter\-major\fR would only show:
.
.IP "" 4
.
.nf

* Gem       Current  Latest  Requested  Groups
* hashie    1\.2\.0    3\.4\.6   = 1\.2\.0    default
.
.fi
.
.IP "" 0
.
.P
\fB\-\-filter\-minor\fR would only show:
.
.IP "" 4
.
.nf

* Gem       Current  Latest  Requested  Groups
* headless  2\.2\.3    2\.3\.1   = 2\.2\.3    test
.
.fi
.
.IP "" 0
.
.P
\fB\-\-filter\-patch\fR would only show:
.
.IP "" 4
.
.nf

* Gem       Current  Latest  Requested  Groups
* faker     1\.6\.5    1\.6\.6   ~> 1\.4     development, test
.
.fi
.
.IP "" 0
.
.P
Filter options can be combined\. \fB\-\-filter\-minor\fR and \fB\-\-filter\-patch\fR would show:
.
.IP "" 4
.
.nf

* Gem     gems/gems/bundler-2.4.19/lib/bundler/man/bundle-add.1000064400000003460150403133200015645 0ustar00bundle-outdated(1) -- List installed gems with newer versions available
=======================================================================

## SYNOPSIS

`bundle outdated` [GEM] [--local]
                        [--pre]
                        [--source]
                        [--strict]
                        [--parseable | --porcelain]
                        [--group=GROUP]
                        [--groups]
                        [--patch|--minor|--major]
                        [--filter-major]
                        [--filter-minor]
                        [--filter-patch]
                        [--only-explicit]

## DESCRIPTION

Outdated lists the names and versions of gems that have a newer version available
ingems/gems/bundler-2.4.19/lib/bundler/man/bundle-outdated.1000064400000006425150403133200016732 0ustar00ng only to next minor version.

* `--major`:
  Prefer updating to next major version (default).

* `--patch`:
  Prefer updating only to next patch version.

* `--filter-major`:
  Only list major newer versions.

* `--filter-minor`:
  Only list minor newer versions.

* `--filter-patch`:
  Only list patchgems/gems/bundler-2.4.19/lib/bundler/man/bundle-exec.1000064400000015160150403133200016041 0ustar00t

`--filter-minor` would only show:

    * Gem       Current  Latest  Requested  Groups
    * headless  2.2.3    2.3.1   = 2.2.3    test

`--filter-patch` would only show:

    * Gem       Current  Latest  Requested  Groups
    * faker     1.6.5    1.6.6   ~> 1.4     development, test

Filter options can be combined. `--filter-minor` and `--filter-patch` would show:

    * Gem       Current  Latest  Requested  Groups
    * faker     1.6.5    1.6.6   ~> 1.4     development, test
Combining all three `filter` options would be the same result as providing none of them.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-add.1000064400000003460150403133200015645 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-ADD" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
.
.SH "SYNOPSIS"
\fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT] [\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-skip\-install] [\-\-strict] [\-\-optimistic]
.
.SH "DESCRIPTION"
Adds the named gem to the Gemfile and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
.
.P
Example:
.
.P
bundle add rails
.
.P
bundle add rails \-\-version "< 3\.0, > 1\.1"
.
.P
bundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-ggems/gems/bundler-2.4.19/lib/bundler/man/bundle-outdated.1.ronn000064400000006075150403133200017706 0ustar00git branch for the added gem\.
.
.TP
\fB\-\-ref\fR
Specify the git ref for the added gem\.
.
.TP
\fB\-\-skip\-install\fR
Adds the gem to the Gemfile but does not install it\.
.
.TP
\fB\-\-optimistic\fR
Adds optimistic declaration of version\.
.
.TP
\fB\-\-strict\fR
Adds strict declaration of version\.

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-exec.1000064400000015160150403133200016041 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-EXEC" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
.
.SH "SYNOPSIS"
\fBbundle exec\fR [\-\-keep\-file\-descriptors] \fIcommand\fR
.
.SH "DESCRIPTION"
This command executes the command, making all gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] available to \fBrequire\fR in Ruby programs\.
.
.P
Essentially, if you would normally have run something like \fBrspec spec/my_spec\.rb\fR, and you want to use the gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] and installed via bundle install(1) \fIbundle\-install\.1\.html\fR, you should run \fBbundle exec rspec spec/my_spec\.rb\fR\.
.
.P
Note that \fBbundle exec\fR does not require that an executable is available on your shell\'s \fB$PATH\fR\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-keep\-file\-descriptors\fR
Exec in Ruby 2\.0 began discarding non\-standard file descriptors\. When this flag is passed, exec will revert to the 1\.9 behaviour of passing all file descriptors to the new process\.
.
.SH "BUNDLE INSTALL \-\-BINSTUBS"
If you use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR, Bundler will automatically create a directory (which defaults to \fBapp_root/bin\fR) containing all of the executables available from gems in the bundle\.
.
.P
After using \fB\-\-binstubs\fR, \fBbin/rspec spec/my_spec\.rb\fR is identical to \fBbundle exec rspec spec/my_spec\.rb\fR\.
.
.SH "ENVIRONMENT MODIFICATIONS"
\fBbundle exec\fR makes a number of changes to the shell environment, then executes the command you specify in full\.
.
.IP "\(bu" 4
make sure that it\'s still possible to shell out to \fBbundle\fR from inside a command invoked by \fBbundle exec\fR (using \fB$BUNDLE_BIN_PATH\fR)
.
.IP "\(bu" 4
put the directory containing executables (like \fBrails\fR, \fBrspec\fR, \fBrackup\fR) for your bundle on \fB$PATH\fR
.
.IP "\(bu" 4
make sure that if bundler is invoked in the subshell, it uses the same \fBGemfile\fR (by setting \fBBUNDLE_GEMFILE\fR)
.
.IP "\(bu" 4
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-add.10000644gems/gems/bundler-2.4.19/lib/bundler/man/bundle-version.1.ronn000064400000000731150403133200017553 0ustar00ause some subtle side\-effects (such as dependence on the exact contents of \fB$0\fR or \fB__FILE__\fR) and the optimization can be disabled by enabling the \fBdisable_exec_load\fR setting\.
.
.SS "Shelling out"
Any Ruby code that opens a subshell (like \fBsystem\fR, backticks, or \fB%x{}\fR) will automatically use the current Bundler environment\. If you need to shell out to a Ruby command that is not part of your current bundle, use the \fBwith_unbundled_env\fR methogems/gems/bundler-2.4.19/lib/bundler/man/bundle-help.1000064400000000705150403133200016044 0ustar00Bwith_unbundled_env\fR\.
.
.IP "" 4
.
.nf

Bundler\.with_unbundled_env do
  Dir\.chdir "/other/bundler/project" do
    `bundle exec \./script`
  end
end
.
.fi
.
.IP "" 0
.
.P
Bundler provides convenience helpers that wrap \fBsystem\fR and \fBexec\fR, and they can be used like this:
.
.IP "" 4
.
.nf

Bungems/gems/bundler-2.4.19/lib/bundler/man/bundle-check.1000064400000001704150403133200016171 0ustar00is problem), Rubygems would activate \fBgemcutter 0\.5\fR and \fBjson_pure <latest>\fR\.
.
.P
If your Gemfile(5) also contained \fBjson_pure\fR (or a gem with a dependency on \fBjson_pure\fR), the latest version on your system might conflict with the version in your Gemfile(5), or the snapshot version in your \fBGemfile\.lock\fR\.
.
.P
If this happens, bundler will say:
.
.IP "" 4
.
.nf

You have already activated json_pure 1\.4\.6 but your Gemfile
requires json_pure 1\.4\.3\. Consider using bundle exec\.
.
.fi
.
.IP "" 0
.
.P
In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin\. In general, the authors of these plugins (in this case, the \fBgemcutter\fR gem) have released newer versions that are more careful in their plugins\.
.
.P
You can find a list of all the gems containing gem plugins by running
.
.IP "" 4
.
.nf

ruby \-e "puts Gem\.find_files(\'rubygems_plugin\.rb\')"
.
.fi
.
.IP "" 0
.
.P
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-inject.1.ronn000064400000001265150403133200017345 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-version.1.ronn000064400000000731150403133200017553 0ustar00bundle-version(1) -- Prints Bundler version information
=======================================================

## SYNOPSIS

`bundle version`

## DESCRIPTION

Prints Bundler versiogems/gems/bundler-2.4.19/lib/bundler/man/bundle.1000064400000007375150403133200015130 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-HELP" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-help\fR \- Displays detailed help for each subcommand
.
.SH "SYNOPSIS"
\fBbundle help\fR [COMMAND]
.
.SH "DESCRIPTION"
Displays detailed help for the given subcommand\. You can specify a single \fBCOMMAND\fR at the same time\. When \fBCOMMAND\fR is omitted, help for \fBhelp\fR command will be displayed\.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-check.1000064400000001704150403133200016171 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CHECK" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
.
.SH "SYNOPSIS"
\fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE] [\-\-path=PATH]
.
.SH "DESCRIPTION"
\fBcheck\fR searches the local machine for each of the gems requested in the Gemfile\. If all gems are found, Bundler prints a success message and exits with a status of 0\.
.
.P
If not, the first missing gem is listed and Bundler exits status 1\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-dry\-run\fR
Locks the [\fBGemfile(5)\fR][Gemfile(5)] before running the command\.
.
.TP
\fB\-\-gemfile\fR
Use the specified gemfile instead of the [\fBGemfile(5)\fR][Gemfile(5)]\.
.
.TP
\fB\-\-path\fR
Specify a different path than the system default (\fB$BUNDLE_PATH\fR or \fB$GEM_HOME\fR)\. Bundler will remember this value for future installs on this machine\.

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-inject.1.ronn000064400000001265150403133200017345 0ustar00bundle-inject(1) -- Add named gem(s) with version requirements to Gemfile
=========================================================================

## SYNOPSIS

`bundle inject` [GEM] [VERSION]

## DESCRIPTION

Adds the named gem(s) with their version requirements to the resolved
[`Gemfile(5)`][Gemfile(5)].

This command will add the gem to both your [`Gemfile(5)`][Gemfile(5)] and Gemfile.lock if it
isn't listed yet.

Example:

    bundle install
    bundle inject 'rack' '> 0'

This will inject the 'rack' gem with a version greater than 0 in your
[`Gemfile(5)`][Gemfile(5)] and Gemfile.lock.

The `bundle inject` command was deprecated in Bundler 2.1 and will be removed in Bundler 3.0.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle.10000644gems/gems/bundler-2.4.19/lib/bundler/man/bundle-init.1.ronn000064400000001770150403133200017035 0ustar00 information on the \fBGemfile\fR format\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-no\-color\fR
Print all output without color
.
.TP
\fB\-\-retry\fR, \fB\-r\fR
Specify the number of times you wish to attempt network commands
.
.TP
\fB\-\-verbose\fR, \fB\-V\fR
Print out additional logging information
.
.SH "BUNDLE COMMANDS"
We divide \fBbundle\fR subcommands into primary commands and utilities:
.
.SH "PRIMARY COMMANDS"
.
.TP
\fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR
Igems/gems/bundler-2.4.19/lib/bundler/man/bundle-help.1000064400000000705150403133200016044 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-list.1.ronn000064400000001424150403133200017041 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-check.1000064400000001704150403133200016171 0ustar00fBbundle viz(1)\fR \fIbundle\-viz\.1\.html\fR (deprecated)
Generate a visual representation of your dependencies
.
.TP
\fBbundle init(1)\fR \fIbundle\-init\.1\.html\fR
Generate a simple \fBGemfile\fR, placed in the current directory
.
.TP
\fBbundle gem(1)\fR \fIbundle\-gem\.1gems/gems/bundler-2.4.19/lib/bundler/man/bundle.1.ronn000064400000006453150403133200016077 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-inject.1.ronn000064400000001265150403133200017345 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-init.1.ronn000064400000001770150403133200017035 0ustar00bundle-init(1) -- Generates a Gemfile into the current working directory
========================================================================

## SYNOPSIS

`bundle init` [--gemsgems/gems/bundler-2.4.19/lib/bundler/man/bundle.1000064400000007375150403133200015130 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-list.1.ronn000064400000001424150403133200017041 0ustar00bundle-list(1) -- List all the gems in the bundle
=========================================================================

## SYNOPSIS

`bundle list` [--name-only] [--paths] [--without-group=GROUP[ GROUP...]] [--only-group=GROUP[ GROUP...]]

## DESCRIPTION

Prints a list of all the gems in the bundle including their version.

Example:

bundle list --name-only

bundle list --paths

bundle list --without-group test

bundle list --only-group dev

bundle list --only-group dev test --paths

## OPTIONS

* `--name-only`:
  Print only the name of each gem.
* `--paths`:
  Print the path to each gem in the bundle.
* `--without-group=<list>`:
  A space-separated list of groups of gems to skip during printing.
* `--only-group=<list>`:
  A space-separated list of groups of gems to print.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-pristine.1.ronn000064400000002723150403133200017726 0ustar00bundle(1) -- Ruby Dependency Management
=======================================

## SYNOPSIS

`bundle` COMMAND [--no-color] [--verbose] [ARGS]

## DESCRIPTION

Bundler manages an `application's dependencies` through its entire life
across many machines systematically and repeatably.

See [the bundler website](https://bundler.io) for information on getting
started, and Gemfile(5) for more information on the `Gemfile` format.

## OPTIONS

* `--no-color`:
  Print all output without color

* `--retry`, `-r`:
  Specify the number of times you wish to attempt network commands

* `--verbose`, `-V`:
  Print out additional logging information

## BUNDLE COMMANDS

We divide `bundle` subcommands into primary commands and utilities:

## PRIMARY COMMANDS

* [`bundle install(1)`](bundle-install.1.html):
  Install the gems specified by the `Gemfile` or `Gemfile.lock`

* [`bundle update(1)`](bundle-update.1.html):
  Update dependencies to their latest versions

* [`bundle cache(1)`](bundle-cache.1.html):
  Package the .gem files required by your application into the
  `vendor/cache` directory (aliases: `bundle package`, `bundle pack`)

* [`bundle exec(1)`](bundle-exec.1.html):
  Execute a script in the current bundle

* [`bundle config(1)`](bundle-config.1.html):
  Specify and read configuration options for Bundler

* [`bundle help(1)`](bundle-help.1.html):
  Display detailed help for each subcommand

## UTILITIES

* [`bundle add(1)`](bundle-add.1.html):
  Add the named gem to the Ggems/gems/bundler-2.4.19/lib/bundler/man/bundle-console.1000064400000003221150403133200016552 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-init.1.ronn000064400000001770150403133200017035 0ustar00(1)`](bundle-platform.1.html):
  Display platform compatibility information

* [`bundle clean(1)`](bundle-clean.1.html):
  Clean up unused gems in your Bundler directory

* [`bundle doctor(1)`](bundle-doctor.1.html):
  Display warnings about common problems

* [`bundle remove(1)`](bundle-remove.1.html):
  Removes gems from the Gemfile

* [`bundle plugin(1)`](bundle-plugin.1.html):
  Manage Bundler plugins

* [`bundle version(1)`](bundle-version.1.html):
  Prints Bundler version information

## PLUGINS

When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
Bundler will try to find an executable on your path named `bundler-<command>`
and execute it, passing down any extra arguments to it.

## OBSOLETE

These commands are obsolete and should no longer be used:

* `bundle inject(1)`
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-list.1.ronn000064400000001424150403133gems/gems/bundler-2.4.19/lib/bundler/man/bundle-exec.1.ronn000064400000013605150403133200017016 0ustar00the gem's git repository
as if one were installing from scratch.

Note: the Bundler gem cannot be restored to its original state with `pristine`.
One also cannot use `bundle pristine` on gems with a 'path' option in the Gemfile,
because bundler has no original copy it can resgems/gems/bundler-2.4.19/lib/bundler/man/bundle.1.ronn000064400000006453150403133200016077 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-console.1000064400000003221150403133200016552 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CONSOLE" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
.
.SH "SYNOPSIS"
\fBbundle console\fR [GROUP]
.
.SH "DESCRIPTION"
Starts an interactive Ruby console session in the context of the current bundle\.
.
.P
If no \fBGROUP\fR is specified, all gems in the \fBdefault\fR group in the Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR are preliminarily loaded\.
.
.P
If \fBGROUP\fR is specified, all gems in the given group in the Gemfile in addition to the gems in \fBdefault\fR group are loaded\. Even if the given group does not exist in the Gemfile, IRB console starts without any warning or error\.
.
.P
The environment variable \fBBUNDLE_CONSOLE\fR or \fBbundle config set console\fR can be used to change the shell from the following:
.
.IP "\(bu" 4
\fBirb\fR (default)
.
.IP "\(bu" 4
\fBpry\fR (https://github\.com/pry/pry)
.
.IP "\(bu" 4
\fBripl\fR (https://github\.com/cldwalker/ripl)
.
.IP "" 0
.
.P
\fBbundle console\fR uses irb by default\. An alternative Pry or Ripl can be used with \fBbundle console\fR by adjusting the \fBconsole\fR Bundler setting\. Also make sure that \fBpry\fR or \fBripl\fR is in your Gemfile\.
.
.SH "EXAMPLE"
.
.nf

$ bundle config set console pry
$ bundle console
Resolving dependencies\.\.\.
[1] pry(main)>
.
.fi
.
.SH "NOTES"
This command was deprecated in Bundler 2\.1 and will be removed in 3\.0\. Use \fBbin/console\fR script, which can be generated by \fBbundle gem <NAME>\fR\.
.
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-exec.1.ronn000064400000013605150403133200017016 0ustar00bundle-exec(1) -- Execute a command in the context of the bundle
================================================================

## SYNOPSIS

`bundle exec` [--keep-file-descriptors] <command>

## DESCRIPTION

This command executes the command, making all gems specified in the
[`Gemfile(5)`][Gemfigems/gems/bundler-2.4.19/lib/bundler/man/bundle-pristine.1.ronn000064400000002723150403133200017726 0ustar00stall(1)](bundle-install.1.html), Bundler will
automatically create a directory (which defaults to `app_root/bin`)
containing all of the executables available from gems in the bundle.

After using `--binstubs`, `bin/rspec spec/my_spec.rb` is identical
to `bundle exec rspec spec/my_spec.rb`.

## ENVIRONMENT MODIFICATIONS

`bundle exec` makes a number of changes to the shell environment,
then executes the command you specify in full.

* make sure that it's still possible to shell out to `bundle`
  from inside a command invoked by `bundle exec` (using
  `$BUNDLE_BIN_PATH`)
* put the directory containing executables (like `rails`, `rspec`,
  `rackup`) for your bundle on `$PATH`
* make sure that if bundler is invoked in the subshell, it uses
  the same `Gemfile` (by setting `BUNDLE_GEMFILE`)
* add `-rbundler/setup` to `$RUBYOPT`, which makes sure that
  Ruby programs invoked in the subshell cagems/gems/bundler-2.4.19/lib/bundler/man/bundle-init.1000064400000002215150403133200016055 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-console.1000064400000003221150403133200016552 0ustar00s, this is a performance improvement. In a rare few cases,
this could cause some subtle side-effects (such as dependence on the exact
contents of `$0` or `__FILE__`) and the optimization can be disabled by enabling
the `disable_exec_load` setting.

### Shelling out

Any Ruby code that opens a subshell (like `system`, backticks, or `%x{}`) will
automatically use the current Bundler environment. If you need to shell out to
a Ruby command that is not part of your current bundle, use the
`with_unbundled_env` method with a block. Any subshells created inside the block
will be given the environment present before Bundler was activated. For
example, Hogems/gems/bundler-2.4.19/lib/bundler/man/bundle-add.1.ronn000064400000003023150403133200016613 0ustar00e requires `rubygems.rb`. This includes
executables installed into the system, like `rails`, `rackup`,
and `rspec`.

Since Rubygems plugins can cgems/gems/bundler-2.4.19/lib/bundler/man/bundle-exec.1.ronn000064400000013605150403133200017016 0ustar00se, the `gemcutter`
gem) have released newer versions that are more careful in
their plugins.

You can find a list of all the gems containing gem plugins
by running

    ruby -e "puts Gem.find_files('rubygems_plugin.rb')"

At the very least, you should remove all but the newest
version of each gem plugin, and also remove all gem plugins
that you aren't using (`gem uninstall gem_name`).
gems/gems/bundler-2gems/gems/bundler-2.4.19/lib/bundler/man/bundle-doctor.1.ronn000064400000001717150403133200017365 0ustar00ncy listed in the gemspec file to the newly created [\fBGemfile(5)\fR][Gemfile(5)]\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-gemspec\fR
Use the specified \.gemspec to create the [\fBGemfile(5)\fR][Gemfile(5)]
.
.TP
\fB\-\-gemfile\fR
Use the specified name for the gemfile instead of \fBGemfile\fR
.
.SH "FILES"
Included in the default [\fBGemfile(5)\fR][Gemfile(5)] generated is the line \fB# frozen_string_literal: true\fR\. This is a magic comment supported for the first time in Ruby 2\.3\. The presence of this line results in all string literals in the file being implicitly frozen\.
.
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-viz.1.ronn000064400000002073150403133200016677 0ustar00bundle-add(1) -- Add gem to the Gemfile and run bundle install
================================================================

## SYNOPSIS

`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--path=PATH] [--git=GIT] [--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]

## DESCRIPTION
Adds the named gem to the Gemfile and run `bundle install`. `bundle install` can be avoided by using the flag `--skip-install`.

Example:

bundle add rails

bundle add rails --version "< 3.0, > 1.1"

bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development"

bundle add rails --skip-install

bundle add rails --group "development, test"

## OPTIONS
* `--version`, `-v`:
  Specify version requirements(s) for the added gem.

* `--group`, `-g`:
  Specify the group(s) for the added gem. Multiple groups should be separated by commas.

* `--source`, `-s`:
  Specify the source for the added gem.

* `--require`, `-r`:
  Adds require path to gem. Provide false, or a path as a string.

* `--path`gems/gems/bundler-2.4.19/lib/bundler/man/bundle-remove.1.ronn000064400000001332150403133200017361 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-doctor.1.ronn000064400000001717150403133200017365 0ustar00bundle-doctor(1) -- Checks the bundle for common problems
=========================================================

## SYNOPSIS

`bundle doctor` [--quiet]
                [--gemfile=GEMFILE]

## DESCRIPTION

Checks yogems/gems/bundler-2.4.19/lib/bundler/man/gemfile.5.ronn000064400000051313150403133200016235 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-viz.1.ronn000064400000002073150403133200016677 0ustar00bundle-viz(1) -- Generates a visual dependency graph for your Gemfile
=====================================================================

## SYNOPSIS

`bundle viz` [--file=FILE]
             [--format=FORMAT]
             [--requirements]
             [--version]
             [--without=GROUP GROUP]

## DESCRIPTION

`viz` generates a PNG file of the current `Gemfile(5)` as a dependency graph.
`viz` requires the ruby-graphviz gem (and its dependencies).

The associated gems must also be installed via [`bundle install(1)`](bundle-install.1.html).

`viz` command was deprecated in Bundler 2.2. Use [bundler-graph plugin](https://github.com/rubygemgems/gems/bundler-2.4.19/lib/bundler/man/bundle-add.1.ronn000064400000003023150403133200016613 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-remove.1.ronn000064400000001332150403133200017361 0ustar00bundle-remove(1) -- Removes gems from the Gemfile
===========================================================================

## SYNOPSIS

`bundle remove [GEM [GEM ...]] [--install]`

## DESCRIPTION

Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If a gem cannot be removed, a warning is printed. If a gem is already absent from the Gemfile, and error is raised.

## OPTIONS

* `--install`:
  Runs `bundle install` after the given gems have been removed from the Gemfile, which ensures that both the lockfile and the installed gems on disk are also updated to remove the given gem(s).

Example:

bundle remove rails

bundle remove rails rack

bundle remove rails rack --install
gems/gems/bundler-2gems/gems/bundler-2.4.19/lib/bundler/man/bundle-doctor.1.ronn000064400000001717150403133200017365 0ustar00a number of methods used to describe the gem requirements.

## GLOBAL SOURCE

At the top of the `Gemfile`, add a single line for the `RubyGems` source that
contains the gems listed in the `Gemfile`.

    source "https://rubygems.org"

You can add only one global source. In Bundler 1.13, adding multiple global
sources was deprecated. The `source` `MUST` be a valid RubyGems repository.

To use more than one source of RubyGems, you should use [`source` block
](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).

A source is checked for gems following the heuristics described in
[SOURCE PRIORITY][].

**Note about a behavior of the feature deprecated in Bundler 1.13**:
If a gem is found in more than one global source, Bundler
will print a warning after installing the gem indicating which source was used,
and listing the other sources where the gem is available. A specific source can
be selected for gems that need to use a non-standard repository, suppressing
this wgems/gems/bundler-2.4.19/lib/bundler/man/bundle-viz.1.ronn000064400000002073150403133200016677 0ustar00e Gemfile as part of the source URL.

    source "https://user:password@gems.example.com"

Credentials in the source URL will take precedence over credentials set using
`config`.

## RUBY

If your application requires a specific Ruby version or engine, specify your
requirements using the `ruby` method, with the following arguments.
All parameters are `OPTIONAL` unless otherwise specified.

### VERSION (required)

The version of Ruby that your application requires. If your application
requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc., this
should be the Ruby version that the engine is compatible with.

    ruby "3.1.2"

If you wish to derive your Ruby version from a version file (ie .ruby-version),
you can use the `file` option instead.

    ruby file: ".ruby-version"

### ENGINE

Each application _may_ specify a Ruby engine. If an engine is specified, an
engine version _must_ also be specified.

What exactly is an Engine?
  - A Ruby engine is an implementation of the Ruby language.

  - For background: the reference or original implementation of thegems/gems/bundler-2.4.19/lib/bundler/man/bundle-remove.1.ronn000064400000001332150403133200017361 0ustar00on specified _must_ match the Ruby version.

    ruby "2.6.8", engine: "jruby", engine_version: "9.3.8.0"

### PATCHLEVEL

Each application _may_ specify a Ruby patchlevel. Specifying the patchlevel has
been meaningless since Ruby 2.1.0 was released as the patchlevel is now
uniquely determined by a combination of major, minor, and teeny version numbers.

This option was implemented in Bundler 1.4.0 for Ruby 2.0 or earlier.

    ruby "3.1.2", patchlevel: "20"

## GEMS

Specify gem requirements using the `gem` method, with the following arguments.
All parameters are `OPTIONAL` unless otherwise specified.

### NAME (required)

For each gem requirement, list a single _gem_ line.

    gem "nokogiri"

### VERSION

Each _gem_ `gems/gems/bundler-2.4.19/lib/bundler/man/gemfile.5.ronn000064400000051313150403133200016235 0ustar00bership in any group is placed in the `default` group.

    gem "rspec", group: :test
    gem "wirble", groups: [:development, :test]

The Bundler runtime allows its two main methods, `Bundler.setup` and
`Bundler.require`, to limit their impact to particular groups.

    # setup adds gems to Ruby's load path
    Bundler.setup                    # defaults to all groups
    require "bundler/setup"          # same as Bundler.setup
    Bundler.setup(:default)          # only set up the _default_ group
    Bundler.setup(:test)             # only set up the _test_ group (but `not` _default_)
    Bundler.setup(:default, :test)   # set up the _default_ and _test_ groups, but no others

    # require requires all of the gems in the specified groups
    Bundler.require                  # defaults to the _default_ group
    Bundler.require(:default)        # identical
    Bundler.require(:default, :test) # requires the _default_ and _test_ groups
    Bundler.require(:test)           # requires the _test_ group

The Bundler CLI allows you to specify a list of groups whose gems `bundle install` should
not install with the `without` configuration.

To specify multiple groups to ignore, specify a list of groups separated by spaces.

    bundle config set --local without test
    bundle config set --local without development test

Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
will setup all groups except for the ones you excluded via `--without` (since they
are not available).

Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
create a single canonical list of all of the required gems and their dependencies.
This means that you cannot list different versions of the same gems in different
groups. For more details, see [Understanding Bundler](https://bundler.io/rationale.html).

### PLATFORMS

If a gem should only be used in a particular platform or set of platforms, you can
specify them. Platforms are essentially identical to groups, except that you do not
need to use the `--without` install-time flag to exclude groups of gems for other
platforms.

There are a number of `Gemfile` platforms:

  * `ruby`:
    C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
  * `mri`:
    C Ruby (MRI) only, but not Windows
  * `windows`:
    Windows C Ruby (MRI), including RubyInstaller 32-bit and 64-bit versions
  * `mswin`:
    Windows C Ruby (MRI), including RubyInstaller 32-bit versions
  * `mswin64`:
    Windows C Ruby (MRI), including RubyInstaller 64-bit versions
  * `rbx`:
    Rubinius
  * `jruby`:
    JRuby
  * `truffleruby`:
    TruffleRuby

On platforms `ruby`, `mri`, `mswin`, `mswin64`, and `windows`, you may
additionally specify a version by appending the major and minor version numbers
without a delimiter. For example, to specify that a gem should only be used on
platform `ruby` version 3.1, use:

    ruby_31

As with groups (above), you may specify one or more platforms:

    gem "weakling",   platforms: :jruby
    gem "ruby-debug", platforms: :mri_31
    gem "nokogiri",   platforms: [:windows_31, :jruby]

All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
`Bundler.require`) behave exactly the same as if any groups not
matching the current platform were explicitly excluded.

### FORCE_RUBY_PLATFORM

If you always want the pure ruby variant of a gem to be chosen over platform
specific variants, you can use the `force_ruby_platform` option:

    gem "ffi", force_ruby_platform: true

This can be handy (assuming the pure ruby variant works fine) when:

* You're having issues with the platform specific variant.
* The platform specific variant does not yet support a newer ruby (and thus has
  a `required_ruby_version` upper bound), but you still want your Gemfile{.lock}
  files to resolve under that ruby.

### SOURCE

You can select an alternate RubyGems repository for a gem using the ':source'
option.

    gem "some_internal_gem", source: "https://gems.example.com"

This forces the gem to be loaded from this source and ignores the global source
declared at the top level of the file. If the gem does not exist in this source,
it will not be installed.

Bundler will search for child dependencies of this gem by first looking in the
source selected for the parent, but if they are not found there, it will fall
back on the global source.

**Note about a behavior of the feature deprecated in Bundler 1.13**:
Selecting a specific source repository this way also suppresses the ambiguous
gem warning described above in [GLOBAL SOURCE](#GLOBAL-SOURCE).

Using the `:source` option for an individual gem will also make that source
available as a possible global source for any other gems which do not specify
explicit sources. Thus, when adding gems with explicit sources, it is
recommended that you also ensure all other gems in the Gemfile are using
explicit sources.

### GIT

If necessary, you can specify that a gem is located at a particular
git repository using the `:git` parameter. The repository can be accessed via
several protocols:

  * `HTTP(S)`:
    gem "rails", git: "https://github.com/rails/rails.git"
  * `SSH`:
    gem "rails", git: "git@github.com:rails/rails.git"
  * `git`:
    gem "rails", git: "git://github.com/rails/rails.git"

If using SSH, the user that you use to run `bundle install` `MUST` have the
appropriate keys available in their `$HOME/.ssh`.

`NOTE`: `http://` and `git://` URLs should be avoided if at all possible. These
protocols are unauthenticated, so a man-in-the-middle attacker can deliver
malicious code and compromise your system. HTTPS and SSH are strongly
preferred.

The `group`, `platforms`, and `require` options are available and behave
exactly the same as they would for a normal gem.

A git repository `SHOULD` have at least one file, at the root of the
directory containing the gem, with the extension `.gemspec`. This file
`MUST` contain a valid gem specification, as expected by the `gem build`
command.

If a git repository does not have a `.gemspec`, bundler will attempt to
create one, but it will not contain any dependencies, executables, or
C extension compilation instructions. As a result, it may fail to properly
integrate into your application.

If a git repository does have a `.gemspec` for the gem you attached it
to, a version specifier, if provided, means that the git repository is
only valid if the `.gemspec` specifies a version matching the version
specifier. If not, bundler will print a warning.

    gem "rails", "2.3.8", git: "https://github.com/rails/rails.git"
    # bundle install will fail, because the .gemspec in the rails
    # repository's master branch specifies version 3.0.0

If a git repository does `not` have a `.gemspec` for the gem you attached
it to, a version specifier `MUST` be provided. Bundler will use this
version in the simple `.gemspec` it creates.

Git repositories support a number of additional options.

  * `branch`, `tag`, and `ref`:
    You `MUST` only specify at most one of these options. The default
    is `branch: "master"`.  For example:

      gem "rails", git: "https://github.com/rails/rails.git", branch: "5-0-stable"

      gem "rails", git: "https://github.com/rails/rails.git", tag: "v5.0.0"

      gem "rails", git: "https://github.com/rails/rails.git", ref: "4aded"

  * `submodules`:
    For reference, a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
    lets you have another git repository within a subfolder of your repository.
    Specify `submodules: true` to cause bundler to expand any
    submodules included in the git repository

If a git repository contains multiple `.gemspecs`, each `.gemspec`
represents a gem located at the same place in the file system as
the `.gemspec`.

    |~rails                   [git root]
    | |-rails.gemspec         [rails gem located here]
    |~actionpack
    | |-actionpack.gemspec    [actionpack gem located here]
    |~activesupport
    | |-activesupport.gemspec [activesupport gem located here]
    |...

To install a gem located in a git repository, bundler changes to
the directory containing the gemspec, runs `gem build name.gemspec`
and then installs the resulting gem. The `gem build` command,
which comes standard with Rubygems, evaluates the `.gemspec` in
the context of the directory in which it is located.

### GIT SOURCE

A custom git source can be defined via the `git_source` method. Provide the source's name
as an argument, and a block which receives a single argument and interpolates it into a
string to return the full repo address:

    git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
    gem 'rails', stash: 'forks/rails'

In addition, if you wish to choose a specific branch:

    gem "rails", stash: "forks/rails", branch: "branch_name"

### GITHUB

`NOTE`: This shorthand should be avoided until Bundler 2.0, since it
currently expands to an insecure `git://` URL. This allows a
man-in-the-middle attacker to compromise your system.

If the git repository you want to use is hosted on GitHub and is public, you can use the
:github shorthand to specify the github username and repository name (without the
trailing ".git"), separated by a slash. If both the username and repository name are the
same, you can omit one.

    gem "rails", github: "rails/rails"
    gem "rails", github: "rails"

Are both equivalent to

    gem "rails", git: "https://github.com/rails/rails.git"

Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.

You can also directly pass a pull request URL:

    gem "rails", github: "https://github.com/rails/rails/pull/43753"

Which is equivalent to:

    gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"

### GIST

If the git repository you want to use is hosted as a GitHub Gist and is public, you can use
the :gist shorthand to specify the gist identifier (without the trailing ".git").

    gem "the_hatch", gist: "4815162342"

Is equivalent to:

    gem "the_hatch", git: "https://gist.github.com/4815162342.git"

Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.

### BITBUCKET

If the git repository you want to use is hosted on Bitbucket and is public, you can use the
:bitbucket shorthand to specify the bitbucket username and repository name (without the
trailing ".git"), separated by a slash. If both the username and repository name are the
same, you can omit one.

    gem "rails", bitbucket: "rails/rails"
    gem "rails", bitbucket: "rails"

Are both equivalent to

    gem "rails", git: "https://rails@bitbucket.org/rails/rails.git"

Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.

### PATH

You can specify that a gem is located in a particular location
on the file system. Relative paths are resolved relative to the
directory containing the `Gemfile`.

Similar to the semantics of the `:git` option, the `:path`
option requires that the directory in question either contains
a `.gemspec` for the gem, or that you specify an explicit
version that bundler should use.

Unlike `:git`, bundler does not compile C extensions for
gems specified as paths.

    gem "rails", path: "vendor/rails"

If you would like to use multiple local gems directly from the filesystem, you can set a global `path` option to the path containinggems/gems/bundler-2.4.19/lib/bundler/man/bundle-info.1000064400000000737150403133210016055 0ustar00 installed unless listed in the `--with`
option given to the `bundle install` command.

In the case of the `git` block form, the `:ref`, `:branch`, `:tag`,
and `:submodules` options may be passed to the `git` method, and
all gems in the block will inherit those options.

The presence of a `source` block in a Gemfile also makes that source
available as a possible global source for any other gems which do not specify
explicit sources. Thus, when defining source blocks, it is
rgems/gems/bundler-2.4.19/lib/bundler/man/bundle-open.1.ronn000064400000001176150403133210017034 0ustar00rence/) file is where
 you provide metadata about your gem to Rubygems. Some required Gemspec
 attributes include the name, description, and homepage of your gem. This is
 also where you specify the dependencies your gem needs to run.

If you wish to use Bundler to help install dependencies for a gem while it is
being developed, use the `gemspec` method to pull in the dependencies listed in
the `.gemspec` file.

The `gemspec` method adds any runtime dependencies as gem requirements in the
default group. It also adds development dependencies as gem requirements in the
`development` group. Finally, it adds a gem requirement on your gems/gems/bundler-2.4.19/lib/bundler/man/bundle-remove.1000064400000001517150403133210016414 0ustar00em to satisfy a gem requirement,
bundler uses the following priority order:

  1. The source explicitly attached to the gem (using `:source`, `:path`, or
     `:git`)
  2. For implicit gems (dependencies of explicit gems), any source, git, or path
     repository declared on the parent. This results in bundler prioritizing the
     ActiveSupport gem from the Rails git repository over ones from
     `rubygems.org`
  3. If neither of the above conditions are met, the global source will be used.
     If multiple global sources are specified, they will be prioritized from
     last to first, but this is deprecated since Bundler 1.13, so Bundler prints
     a warning and will abort with an error in the future.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-show.1000064400000001260150403133220016073 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-INFO" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle
.
.SH "SYNOPSIS"
\fBbundle info\fR [GEM_NAME] [\-\-path]
.
.SH "DESCRIPTION"
Given a gem name present in your bundle, print the basic information about it such as homepage, version, path and summary\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-path\fR
Print the path of the given gem

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-open.1.ronn000064400000001176150403133210017034 0gems/gems/bundler-2.4.19/lib/bundler/man/bundle-binstubs.1000064400000003116150403133220016746 0ustar00e README.md file of the 'rack' gem source in your bundle.

## OPTIONS
* `--path`:
  Specify GEM source relative path to open.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-remove.1000064400000001517150403133210016414 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-REMOVE" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile
.
.SH "SYNOPSIS"
\fBbundle remove [GEM [GEM \.\.\.]] [\-\-install]\fR
.
.SH "DESCRIPTION"
Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid\. If a gem cannot be removed, a warning is printed\. If a gem is already absent from the Gemfile, and error is raised\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-install\fR
Runs \fBbundle install\fR after the given gems havegems/gems/bundler-2.4.19/lib/bundler/man/bundle-lock.1.ronn000064400000005735150403133230017032 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-SHOW" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
.
.SH "SYNOPSIS"
\fBbundle show\fR [GEM] [\-\-paths]
.
.SH "DESCRIPTION"
Without the [GEM] option, \fBshow\fR will print a list of the names and versions of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by name\.
.
.P
Calling show with [GEM] will list the exact location of that gem on your machine\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-paths\fR
List the paths of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by gem name\.

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-info.1000064400000000737150403133210016055 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-BINSTUBS" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
.
.SH "SYNOPSIS"
\fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-path PATH] [\-\-standalone]
.
.SH "DESCRIPTION"
Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it into \gems/gems/bundler-2.4.19/lib/bundler/man/bundle-open.1.ronn000064400000001176150403133210017034 0ustar00he \fB\-\-path\fR directory if one has been set\. Calling binstubs with [GEM [GEM]] will create binstubs for all given gems\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-force\fR
Overwrite existing binstubs if they exist\.
.
.TP
\fB\-\-path\fR
The location to install the specified binstubs to\. This defaults to \fBbin\fR\.
.
.TP
\fB\-\-standalone\fR
Makes binstubs that can work without depending on Rubygems or Bundler at runtime\.
.
.TP
\fB\-\-shebang\fR
Specify a different shebang execugems/gems/bundler-2.4.19/lib/bundler/man/bundle-clean.1.ronn000064400000001160150403133230017150 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-remove.1000064400000001517150403133210016414 0ustar00bundle-lock(1) -- Creates / Updates a lockfile without installing
==============================================gems/gems/bundler-2.4.19/lib/bundler/man/bundle-platform.1.ronn000064400000002334150403133230017716 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-show.1000064400000001260150403133220016073 0ustar00updating to next major version (default).

* `--strict`:
  If updating, do not allow any gem to be updated past latest --patch | --minor | --major.

* `--conservative`:
  If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated.

## UPDATING ALL GEMS

If you run `bundle lock` with `--update` option without list of gems, bundler will
ignore any previously installed gems and resolve all dependencies again based
on the latest versions of all gems available in the sources.

## UPDATING A LIST OF GEMS

Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of
the gems that you specified locked to the versgems/gems/bundler-2.4.19/lib/bundler/man/bundle-viz.1000064400000002335150403133230015730 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-clean.1.ronn000064400000001160150403133230017150 0ustar00bundle-clean(1) -- Cleans up unused gems in your bundler directory
==================================================================

## SYNOPSIS

`bundle clean` [--dry-run] [--force]

## DESCRIPTION

This command will remove all unused gems in your bundler directory. This is
useful when you have made many changes to your gem dependencies.

## OPTIONS

* `--dry-run`:
  Print the changes, but do not clean the unused gems.
* `--force`:
  Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-version.1000064400000001200150403133230016573 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-lock.1.ronn000064400000005735150403133230017032 0ustar00   Your app has gems that work on these platforms:
    * arm64-darwin-21
    * ruby
    * x64-mingw-ucrt
    * x86_64-linux

   gems/gems/bundler-2.4.19/lib/bundler/man/bundle-doctor.1000064400000002213150403133230016405 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-viz.1000064400000002335150403133230015730 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-VIZ" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
.
.SH "SYNOPSIS"
\fBbundle viz\fR [\-\-file=FILE] [\-\-format=FORMAT] [\-\-requirements] [\-\-version] [\-\-without=GROUP GROUP]
.
.SH "DESCRIPTION"
\fBviz\fR generates a PNG file of the current \fBGemfile(5)\fR as a dependency graph\. \fBviz\fR requires the ruby\-graphviz gem (and its dependencies)\.
.
.P
The associated gems must also be installed via \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR\.
.
.P
\fBviz\fR command was depgems/gems/bundler-2.4.19/lib/bundler/man/bundle-config.1000064400000052432150403133230016370 0ustar00gems/gems/bundler-2.4.19/lib/bundler/man/bundle-clean.1.ronn000064400000001160150403133230017150 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-VERSION" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-version\fR \- Prints Bundler version information
.
.SH "SYNOPSIS"
\fBbundle version\fR
.
.SH "DESCRIPTION"
Prints Bundler version information\.
.
.SH "OPTIONS"
No options\.
.
.SH "EXAMPLE"
Print the version of Bundler with build date and commit hash of the in the Git source\.
.
.IP "" 4
.
.nf

bundle version
.
.fi
.
.IP "" 0
.
.P
shows \fBBundler version 2\.3\.21 (2022\-08\-24 commit d54be5fdd8)\fR for example\.
.
.P
cf\. \fBbundle \-\-version\fR shows \fBBundler versiogems/gems/bundler-2.4.19/lib/bundler/man/bundle-platform.1.ronn000064400000002334150403133230017716 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-DOCTOR" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems
.
.SH "SYNOPSIS"
\fBbundle doctor\fR [\-\-quiet] [\-\-gemfile=GEMFILE]
.
.SH "DESCRIPTION"
Checks your Gemfile and gem environment for common problems\. If issues are detected, Bundler prints them and exits status 1\. Otherwise, Bundler prints a success message and exits status 0\.
.
.P
Examples of common problems caught by bundle\-doctor include:
.
.IP "\(bu" 4
Invalid Bundler settings
.
.IP "\(bu" 4
Mismatched Ruby versions
.
.IP "\(bu" 4
Mismatched platforms
.
.IP "\(bu" 4
Uninstalled gems
.
.IP "\(bu" 4
Missing dependencies
.
.IP "" 0
.
.SH "OPTIONS"
.
.TP
\fB\-\-quiet\fR
Only output warnings and errors\.
.
.TP
\fB\-\-gemfile=<gemfile>\fR
The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project\'s root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-viz.1000064400000002335150403133230015730 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CONFIG" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options
.
.SH "SYNOPSIS"
\fBbundle config\fR list
.
.br
\fBbundle config\fR [get] NAME
.
.br
\fBbundle config\fR [set] NAME VALUE
.
.br
\fBbundle config\fR unset NAME
.
.SH "DESCRIPTION"
This command allows you to interact with Bundler\'s configuration system\.
.
.P
Bundler loads configuration settings in this order:
.
.IP "1." 4
Local config (\fB<project_root>/\.bundle/config\fR or \fB$BUNDLE_APP_CONFIG/config\fR)
.
.IP "2." 4
Environmental variables (\fBENV\fR)
.
.IP "3." 4
Global config (\fB~/\.bundle/config\fR)
.
.IP "4." 4
Bundler default config
.
.IP "" 0
.
.P
Executing \fBbundle config list\fR will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
.
.P
Executing \fBbundle config get <name>\fR will print the value of that configuration setting, and where it was set\.
.
.P
Executing \fBbundle config set <name> <value>\fR defaults to setting \fBlocal\fR configuration if executing from within a local application, otherwise it will set \fBglobal\fR configuration\. See \fB\-\-local\fR agems/gems/bundler-2.4.19/lib/bundler/man/bundle-version.1000064400000001200150403133230016573 0ustar00onfig unset \-\-global <name>\fR will delete the configuration only from the user configuration\.
.
.P
Executing \fBbundle config unset \-\-local <name>\fR will delete the configuration only from the local application\.
.
.P
Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
.
.SH "REMEMBERING OPTIONS"
Flags passed to \fBbundle install\fR or the Bundler runtime, such as \fB\-\-path foo\fR or \fB\-\-without production\fR, are remembered between commands and saved to your local application\'s configuration (normally, \fB\./\.bundle/config\fR)\.
.
.P
However, this wgems/gems/bundler-2.4.19/lib/bundler/man/bundle-doctor.1000064400000002213150403133230016405 0ustar00pment\fR or \fBtest\fR environments\.
.
.TP
\fBonly\fR
A space\-separated list of groups to install only gems of the specified groups\.
.
.TP
\fBpath\fR
The location to install the specified gems to\. This defaults to Rubygems\' setting\. Bundler shares this location with Rubygems, \fBgem install \.\.\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \.\.\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
.
.TP
\fBwithout\fR
A space\-separated list of groups referencing gems to skip during installation\.
.
.TP
\fBwith\fR
A space\-separated list of \fBoptional\fR groups referencing gems to include during installation\.
.
.SH "BUILD OPTIONS"
You can use \fBbundle config\fR to give Bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
.
.P
A very common example, the \fBmysql\fR gem, requires Snow Leopard users to pass configuration flags to \fBgem install\fR to specify where to find the \fBmysql_config\fR executable\.
.
.IP "" 4
.
.nf

gem install mysql \-\- \-\-with\-mysql\-config=/usr/locagems/gems/bundler-2.4.19/lib/bundler/man/bundle-config.1000064400000052432150403133230016370 0ustar00from the \fBGemfile\fR that you didn\'t install\. Additionally, subsequent calls to bundle install(1) \fIbundle\-install\.1\.html\fR remember this setting and skip those groups\.
.
.P
The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
.
.P
Any periods in the configuration keys must be replaced with two underscores when setting it via environment variables\. The configuration key \fBlocal\.rack\fR becomes the environment variable \fBBUNDLE_LOCAL__RACK\fR\.
.
.SH "LIST OF AVAILABLE KEYS"
The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
.
.IP "\(bu" 4
\fBallow_deployment_source_credential_changes\fR (\fBBUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES\fR): When in deployment mode, allow changing the credentials to a gem\'s source\. Ex: \fBhttps://some\.host\.com/gems/path/\fR \-> \fBhttps://user_name:password@some\.host\.com/gems/path\fR
.
.IP "\(bu" 4
\fBallow_offline_install\fR (\fBBUNDLE_ALLOW_OFFLINE_INSTALL\fR): Allow Bundler to use cached data when installing without network access\.
.
.IP "\(bu" 4
\fBauto_clean_without_path\fR (\fBBUNDLE_AUTO_CLEAN_WITHOUT_PATH\fR): Automatically run \fBbundle clean\fR after installing when an explicit \fBpath\fR has not been set and Bundler is not installing into the system gems\.
.
.IP "\(bu" 4
\fBauto_install\fR (\fBBUNDLE_AUTO_INSTALL\fR): Automatically run \fBbundle install\fR when gems are missing\.
.
.IP "\(bu" 4
\fBbin\fR (\fBBUNDLE_BIN\fR): Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
.
.IP "\(bu" 4
\fBcache_all\fR (\fBBUNDLE_CACHE_ALL\fR): Cache all gems, including path and git gems\. This needs to be explicitly configured on bundler 1 and bundler 2, but will be the default on bundler 3\.
.
.IP "\(bu" 4
\fBcache_all_platforms\fR (\fBBUNDLE_CACHE_ALL_PLATFORMS\fR): Cache gems for all platforms\.
.
.IP "\(bu" 4
\fBcache_path\fR (\fBBUNDLE_CACHE_PATH\fR): The directory that bundler will place cached gems in when running \fBbundle package\fR, and that bundler will look in when installing gems\. Defaults to \fBvendor/cache\fR\.
.
.IP "\(bu" 4
\fBclean\fR (\fBBUNDLE_CLEAN\fR): Whether Bundler should run \fBbundle clean\fR automatically after \fBbundle install\fR\.
.
.IP "\(bu" 4
\fBconsole\fR (\fBBUNDLE_CONSOLE\fR): The console that \fBbundle console\fR starts\. Defaults to \fBirb\fR\.
.
.IP "\(bu" 4
\fBdefault_install_uses_path\fR (\fBBUNDLE_DEFAULT_INSTALL_USES_PATH\fR): Whether a \fBbundle install\fR without an explicit \fB\-\-path\fR argument defaults to installing gems in \fB\.bundle\fR\.
.
.IP "\(bu" 4
\fBdeployment\fR (\fBBUNDLE_DEPLOYMENT\fR): Disallow changes to the \fBGemfile\fR\. When the \fBGemfile\fR is changed and the lockfile has not been updated, running Bundler commands will be blocked\.
.
.IP "\(bu" 4
\fBdisable_checksum_validation\fR (\fBBUNDLE_DISABLE_CHECKSUM_VALIDATION\fR): Allow installing gems even if they do not match the checksum provided by RubyGems\.
.
.IP "\(bu" 4
\fBdisable_exec_load\fR (\fBBUNDLE_DISABLE_EXEC_LOAD\fR): Stop Bundler from using \fBload\fR to launch an executable in\-process in \fBbundle exec\fR\.
.
.IP "\(bu" 4
\fBdisable_local_branch_check\fR (\fBBUNDLE_DISABLE_LOCAL_BRANCH_CHECK\fR): Allow Bundler to use a local git override without a branch specified in the Gemfile\.
.
.IP "\(bu" 4
\fBdisable_local_revision_check\fR (\fBBUNDLE_DISABLE_LOCAL_REVISION_CHECK\fR): Allow Bundler to use a local git override without checking if the revision present in the lockfile is present in the repository\.
.
.IP "\(bu" 4
\fBdisable_shared_gems\fR (\fBBUNDLE_DISABLE_SHARED_GEMS\fR): Stop Bundler from accessing gems installed to RubyGems\' normal location\.
.
.IP "\(bu" 4
\fBdisable_version_check\fR (\fBBUNDLE_DISABLE_VERSION_CHECK\fR): Stop Bundler from checking if a newer Bundler version is available on rubygems\.org\.
.
.IP "\(bu" 4
\fBforce_ruby_platform\fR (\fBBUNDLE_FORCE_RUBY_PLATFORM\fR): Ignore the current machine\'s platform and install only \fBruby\fR platform gems\. As a result, gems with native extensions will be compiled from source\.
.
.IP "\(bu" 4
\fBfrozen\fR (\fBBUNDLE_FROZEN\fR): Disallow changes to the \fBGemfile\fR\. When the \fBGemfile\fR is changed and the lockfile has not been updated, running Bundler commands will be blocked\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
.
.IP "\(bu" 4
\fBgem\.github_username\fR (\fBBUNDLE_GEM__GITHUB_USERNAME\fR): Sets a GitHub username or organization to be used in \fBREADME\fR file when you create a new gem via \fBbundle gem\fR command\. It can be overridden by passing an explicit \fB\-\-github\-username\fR flag to \fBbundle gem\fR\.
.
.IP "\(bu" 4
\fBgem\.push_key\fR (\fBBUNDLE_GEM__PUSH_KEY\fR): Sets the \fB\-\-key\fR parameter for \fBgem push\fR when using the \fBrake release\fR command with a private gemstash server\.
.
.IP "\(bu" 4
\fBgemfile\fR (\fBBUNDLE_GEMFILE\fR): The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
.
.IP "\(bu" 4
\fBglobal_gem_cache\fR (\fBBUNDLE_GLOBAL_GEM_CACHE\fR): Whether Bundler should cache all gems globally, rather than locally to the installing Ruby installation\.
.
.IP "\(bu" 4
\fBignore_funding_requests\fR (\fBBUNDLE_IGNORE_FUNDING_REQUESTS\fR): When set, no funding requests will be printed\.
.
.IP "\(bu" 4
\fBignore_messages\fR (\fBBUNDLE_IGNORE_MESSAGES\fR): When set, no post install messages will be printed\. To silence a single gem, use dot notation like \fBignore_messages\.httparty true\fR\.
.
.IP "\(bu" 4
\fBinit_gems_rb\fR (\fBBUNDLE_INIT_GEMS_RB\fR): Generate a \fBgems\.rb\fR instead of a \fBGemfile\fR when running \fBbundle init\fR\.
.
.IP "\(bu" 4
\fBjobs\fR (\fBBUNDLE_JOBS\fR): The number of gems Bundler can install in parallel\. Defaults to the number of available processors\.
.
.IP "\(bu" 4
\fBno_install\fR (\fBBUNDLE_NO_INSTALL\fR): Whether \fBbundle package\fR should skip installing gems\.
.
.IP "\(bu" 4
\fBno_prune\fR (\fBBUNDLE_NO_PRUNE\fR): Whether Bundler should leave outdated gems unpruned when caching\.
.
.IP "\(bu" 4
\fBonly\fR (\fBBUNDLE_ONLY\fR): A space\-separated list of groups to install only gems of the specified groups\.
.
.IP "\(bu" 4
\fBpath\fR (\fBBUNDLE_PATH\fR): The location on disk where all gems in your bundle will be located regardless of \fB$GEM_HOME\fR or \fB$GEM_PATH\fR values\. Bundle gems not found in this location will be installed by \fBbundle install\fR\. Defaults to \fBGem\.dir\fR\. When \-\-deployment is used, defaults to vendor/bundle\.
.
.IP "\(bu" 4
\fBpath\.system\fR (\fBBUNDLE_PATH__SYSTEM\fR): Whether Bundler will install gems into the default system path (\fBGem\.dir\fR)\.
.
.IP "\(bu" 4
\fBpath_relative_to_cwd\fR (\fBBUNDLE_PATH_RELATIVE_TO_CWD\fR) Makes \fB\-\-path\fR relative to the CWD instead of the \fBGemfile\fR\.
.
.IP "\(bu" 4
\fBplugins\fR (\fBBUNDLE_PLUGINS\fR): Enable Bundler\'s experimental plugin system\.
.
.IP "\(bu" 4
\fBprefer_patch\fR (BUNDLE_PREFER_PATCH): Prefer updating only to next patch version during updates\. Makes \fBbundle update\fR calls equivalent to \fBbundler update \-\-patch\fR\.
.
.IP "\(bu" 4
\fBprint_only_version_number\fR (\fBBUNDLE_PRINT_ONLY_VERSION_NUMBER\fR): Print only version number from \fBbundler \-\-version\fR\.
.
.IP "\(bu" 4
\fBredirect\fR (\fBBUNDLE_REDIRECT\fR): The number of redirects allowed for network requests\. Defaults to \fB5\fR\.
.
.IP "\(bu" 4
\fBretry\fR (\fBBUNDLE_RETRY\fR): The number of times to retry failed network requests\. Defaults to \fB3\fR\.
.
.IP "\(bu" 4
\fBsetup_makes_kernel_gem_public\fR (\fBBUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC\fR): Have \fBBundler\.setup\fR make the \fBKernel#gem\fR method public, even though RubyGems declares it as private\.
.
.IP "\(bu" 4
\fBshebang\fR (\fBBUNDLE_SHEBANG\fR): The program name that should be invoked for generated binstubs\. Defaults to the ruby install name used to generate the binstub\.
.
.IP "\(bu" 4
\fBsilence_deprecations\fR (\fBBUNDLE_SILENCE_DEPRECATIONS\fR): Whether Bundler should silence deprecation warnings for behavior that will be changed in the next major version\.
.
.IP "\(bu" 4
\fBsilence_root_warning\fR (\fBBUNDLE_SILENCE_ROOT_WARNING\fR): Silence the warning Bundler prints when installing gems as root\.
.
.IP "\(bu" 4
\fBssl_ca_cert\fR (\fBBUNDLE_SSL_CA_CERT\fR): Path to a designated CA certificate file or folder containing multiple certificates for trusted CAs in PEM format\.
.
.IP "\(bu" 4
\fBssl_client_cert\fR (\fBBUNDLE_SSL_CLIENT_CERT\fR): Path to a designated file containing a X\.509 client certificate and key in PEM format\.
.
.IP "\(bu" 4
\fBssl_verify_mode\fR (\fBBUNDLE_SSL_VERIFY_MODE\fR): The SSL verification mode Bundler uses when making HTTPS requests\. Defaults to verify peer\.
.
.IP "\(bu" 4
\fBsystem_bindir\fR (\fBBUNDLE_SYSTEM_BINDIR\fR): The location where RubyGems installs binstubs\. Defaults to \fBGem\.bindir\fR\.
.
.IP "\(bu" 4
\fBtimeout\fR (\fBBUNDLE_TIMEOUT\fR): The seconds allowed before timing out for network requests\. Defaults to \fB10\fR\.
.
.IP "\(bu" 4
\fBupdate_requires_all_flag\fR (\fBBUNDLE_UPDATE_REQUIRES_ALL_FLAG\fR): Require passing \fB\-\-all\fR to \fBbundle update\fR when everything should be updated, and disallow passing no options to \fBbundle update\fR\.
.
.IP "\(bu" 4
\fBuser_agent\fR (\fBBUNDLE_USER_AGENT\fR): The custom user agent fragment Bundler includes in API requests\.
.
.IP "\(bu" 4
\fBwith\fR (\fBBUNDLE_WITH\fR): A \fB:\fR\-separated list of groups whose gems bundler should install\.
.
.IP "\(bu" 4
\fBwithout\fR (\fBBUNDLE_WITHOUT\fR): A \fB:\fR\-separated list of groups whose gems bundler should not install\.
.
.IP "" 0
.
.P
In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR or bundle cache(1) \fIbundle\-cache\.1\.html\fR command\.
.
.P
You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
.
.SH "LOCAL GIT REPOS"
Bundler also allows you to work against a git repository locally instead of using the remote version\. This can be achieved by setting up a local override:
.
.IP "" 4
.
.nf

bundle config set \-\-local local\.GEM_NAME /path/to/local/git/repository
.
.fi
.
.IP "" 0
.
.P
For example, in order to use a local Rack repository, a developer could call:
.
.IP "" 4
.
.nf

bundle config set \-\-local local\.rack ~/Work/git/rack
.
.fi
.
.IP "" 0
.
.P
Now instead of checking out the remote git repository, the local override will be used\. Similar to a path source, every time the local git repository change, changes will be automatically picked up by Bundler\. This means a commit in the local git repo will update the revision in the \fBGemfile\.lock\fR to the local git repo revision\. This requires the same attention as git submodules\. Before pushing to the remote, you need to ensure the local override was pushed, otherwise you may point to a commit that only exists in your local machine\. You\'ll also need to CGI escape your usernames and passwords as well\.
.
.P
Bundler does many checks to ensure a developer won\'t work with invalid references\. Particularly, we force a developer to specify a branch in the \fBGemfile\fR in order to use this feature\. If the branch specified in the \fBGemfile\fR and the current branch in the local git repository do not match, Bundler will abort\. This ensures that a developer is always working against the correct branches, and prevegems/gems/bundler-2.4.19/lib/bundler/man/bundle-cache.1000064400000006632150403133230016167 0ustar00
.
.fi
.
.IP "" 0
.
.P
Each mirror also provides a fallback timeout setting\. If the mirror does not respond within the fallback timeout, Bundler will try to use the original server instead of the mirror\.
.
.IP "" 4
.
.nf

bundle config set \-\-global mirror\.SOURCE_URL\.fallback_timeout TIMEOUT
.
.fi
.
.IP "" 0
.
.P
For example, to fall back to rubygems\.org after 3 seconds:
.
.IP "" 4
.
.nf

bundle config set \-\-global mirror\.https://rubygems\.org\.fallback_timeout 3
.
.fi
.
.IP "" 0
.
.P
The default fallback timeout is 0\.1 seconds, but the setting can currently only accept whole seconds (for example, 1, 15, or 30)\.
.
.SH "CREDENTIALS FOR GEM SOURCES"
Bundler allows you to configure credentials for any gem source, which allows you to avoid putting secrets into your Gemfile\.
.
.IP "" 4
.
.nf

bundle config set \-\-global SOURCE_HOSTNAME USERNAME:PASSWORD
.
.fi
.
.IP "" 0
.
.P
For example, to save the credentials of user \fBclaudette\fR for the gem source at \fBgems\.longerous\.com\fR, you would run:
.
.IP "" 4
.
.nf

bundle config set \-\-global gems\.longerous\.com claudette:s00pers3krit
.
.fi
.
.IP "" 0
.
.P
Or you can set the credentials as an environment variable like this:
.
.IP "" 4
.
.nf

export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
.
.fi
.
.IP "" 0
.
.P
For gems with a git source with HTTP(S) URL you can specify credentials like so:
.
.IP "" 4
.
.nf

bundle config set \-\-global https://github\.com/rubygems/rubygems\.git username:password
.
.fi
.
.IP "" 0
.
.P
Or you can set the credentials as an environment variable like so:
.
.IP "" 4
.
.nf

export BUNDLE_GITHUB__COM=username:password
.
.fi
.
.IP "" 0
.
.P
This is especially useful for private repositories on hosts such as GitHub, where you can use personal OAuth tokens:
.
.IP "" 4
.
.nf

export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x\-oauth\-basic
.
.fi
.
.IP "" 0
.
.P
Note that any configured credentials will be redacted by informative commands such as \fBbundle config list\fR or \fBbundle config get\fR, unless you use the \fB\-\-parseable\fR flag\. This is to avoid unintentionally leaking credentials when copy\-pasting bundler output\.
.
.P
Also note that to guarantee a sane mapping between valid environment variable names and valid host names, bundler makes the following transformations:
.
.IP "\(bu" 4
Any \fB\-\fR characters in a host name are mapped to a triple dash (\fB___\fR) in the corresponding environment variable\.
.
.IP "\(bu" 4
Any \fB\.\fR characters in a host name are mapped to a double dash (\fB__\fR) in the corresponding environment variable\.
.
.IP "" 0
.
.P
This means that if you have a gem server named \fBmy\.gem\-host\.com\fR, you\'ll need to use the \fBBUNDLE_MY__GEM___HOST__COM\fR variable to configure credentials for it through ENV\.
.
.SH "CONFIGURE BUNDLER DIRECTORIES"
Bundler\'s home, config, cache and plugin directories are able to be configured through environment variables\. The default location for Bundler\'s home directory is \fB~/\.bundle\fR, which all directories inherit from by default\. The following outlines the available environment variables and their default values
.
.IP "" 4
.
.nf

BUNDLE_USER_HOME : $HOME/\.bundle
BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache
BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config
BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin
.
.fi
.
.IP "" 0

gems/gems/bundler-2.4.19/lib/bundler/man/bundle-config.1.ronn000064400000045536150403133230017352 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CACHE" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
.
.SH "SYNOPSIS"
\fBbundle cache\fR
.
.P
alias: \fBpackage\fR, \fBpack\fR
.
.SH "DESCRIPTION"
Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
.
.SH "GIT AND PATH GEMS"
The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
.
.SH "SUPPORT FOR MULTIPLE PLATFORMS"
When using gems that have different packages for different platforms, Bundler supports caching of gems for other platforms where the Gemfile has been resolved (i\.e\. present in the lockfile) in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
.
.SH "REMOTE FETCHING"
By default, if you run \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
.
.P
For instance, consider this Gemfile(5):
.
.IP "" 4
.
.nf

source "https://rubygems\.org"

gem "nokogiri"
.
.fi
.
.IP "" 0
.
.P
If you run \fBbundle cache\fR under C Ruby, bundler will retrieve the version of \fBnokogiri\fR for the \fB"ruby"\fR platform\. If you deploy to JRuby and run \fBbundle install\fR, bundler is forced to check to see whether a \fB"java"\fR platformed \fBnokogiri\fR exists\.
.
.P
Even though the \fBnokogiri\fR gem for the Ruby platform is \fItechnically\fR acceptable on JRuby, it has a C extension that does not run on JRuby\. As a result, bundler will, by default, still connect to \fBrubygems\.org\fR to check whether it has a version of one of your gems more specific to your platform\.
.
.P
This problem is also not limited to the \fB"java"\fR platform\. A similar (common) problem can happen when developing on Windows and deploying to Linux, or even when developing on OSX and deploying to Linux\.
.
.P
If you know for sure that the gems packaged in \fBvendor/cache\fR are appropriate for the platform you are on, you can run \fBbundle install \-\-local\fR to skip checking for more appropriate gems, and use the ones in \fBvendor/cache\fR\.
.
.P
One way to be sure that you have the right platformed versions of all your gems is to run \fBbundle cache\fR on an identical machine and check in the gems\. For instance, you can run \fBbundle cache\fR on an identical staging box during your staging process, and check in the \fBvendor/cache\fR before deploying to production\.
.
.P
By default, bundle cache(1) \fIbundle\-cache\.1\.html\fR fetches and also installs the gems to the default location\. To package the dependencies to \fBvendor/cache\fR without installing them to the local install location, you can run \fBbundle cache \-\-no\-install\fR\.
.
.SH "HISTORY"
In Bundler 2\.1, \fBcache\fR took in the functionalities of \fBpackage\fR and now \fBpackage\fR and \fBpack\fR are aliases of \fBcache\fR\.
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-config.1.ronn000064400000045536150403133230017352 0ustar00bundle-config(1) -- Set bundler configuration options
=====================================================

## SYNOPSIS

`bundle config` list<br>
`bundle config` [get] NAME<br>
`bundle config` [set] NAME VALUE<br>
`bundle config` unset NAME

## DESCRIPTION

This command allows you to interact with Bundler's configuration system.

Bundler loads configuration settings in this order:

1. Local config (`<project_root>/.bundle/config` or `$BUNDLE_APP_CONFIG/config`)
2. Environmental variables (`ENV`)
3. Global config (`~/.bundle/config`)
4. Bundler default config

Executing `bundle config list` will print a list of all bundler
configuration for the current bundle, and where that configuration
was set.

Executing `bundle config get <name>` will print the value of that configuration
settingems/gems/bundler-2.4.19/lib/bundler/man/bundle-cache.1000064400000006632150403133230016167 0ustar00fig`. If <name> already
is set, <name> will be overridden and user will be warned.

Executing `bundle config unset <name>` will delete the configuration in both
local and global sources.

Executing `bundle config unset --global <name>` will delete the configuration
only from the user configuration.

Executing `bundle config unset --local <name>` will delete the configuration
only from the local application.

Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will
cause it to ignore all configuration.

## REMEMBERING OPTIONS

Flags passed to `bundle install` or the Bundler runtime, such as `--path foo` or
`--without production`, are remembered between commands and saved to your local
application's configuration (normally, `./.bundle/config`).

However, this will be changed in bundler 3, so it's better not to rely on this
behavior. If these options must be remembered, it's better to set them using
`bundle config` (e.g., `bundle config set --local path foo`).

The options that can be configured are:

* `bin`:
   Creates a directory (defaults to `~/bin`) and place any executables from the
   gem there. These executables run in Bundler's context. If used, you might add
   this directory to your environment's `PATH` variable. For instance, if the
   `rails` gem comes with a `rails` executable, this flag will create a
   `bin/rails` executable that ensures that all referred dependencies will be
   resolved using the bundled gems.

* `deployment`:
   In deployment mode, Bundler will 'roll-out' the bundle for
   `production` use. Please check carefully if you want to have this option
   enabled in `development` or `test` environments.

* `only`:
   A space-separated list of groups to install only gems of the specified groups.

* `path`:
   The location to install the specified gems to. This defaults to Rubygems'
   setting. Bundler shares this location with Rubygems, `gem install ...` will
   have gem installed there, too. Therefore, gems installed without a
   `--path ...` setting will show up by calling `gem list`. Accordingly, gems
   installed to other locations will not get listed.

* `without`:
   A space-separated list of groups referencing gems to skip during installation.

* `with`:
  A space-separated list of **optional** groups referencing gems to include during installation.

## BUILD OPTIONS

You can use `bundle config` to give Bundler the flags to pass to the gem
installer every time bundler tries to install a particular gem.

A very common example, the `mysql` gem, requires Snow Leopard users to
pass configuration flags to `gem install` to specify where to find the
`mysql_config` executable.

    gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Since the specific location of that executable can change from machine
to machine, you can specify these flags on a per-machine basis.

    bundle config set --global build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config

After running this command, every time bundler needs to install the
`mysql` gem, it will pass along the flags you specified.

## CONFIGURATION KEYS

Configuration keys in bundler have two forms: the canonical form and the
environment variable form.

For instance, passing the `--without` flag to [bundle install(1)](bundle-install.1.html)
prevents Bundler from installing certain groups specified in the Gemfile(5). Bundler
persists this value in `app/.bundle/config` so that calls to `Bundler.setupgems/gems/bundler-2.4.19/lib/bundler/man/bundle-config.1.ronn000064400000045536150403133230017352 0ustar00LOCAL__RACK`.

## LIST OF AVAILABLE KEYS

The following is a list of all configuration keys and their purpose. You can
learn more about their operation in [bundle install(1)](bundle-install.1.html).

* `allow_deployment_source_credential_changes` (`BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES`):
   When in deployment mode, allow changing the credentials to a gem's source.
   Ex: `https://some.host.com/gems/path/` -> `https://user_name:password@some.host.com/gems/path`
* `allow_offline_install` (`BUNDLE_ALLOW_OFFLINE_INSTALL`):
   Allow Bundler to use cached data when installing without network access.
* `auto_clean_without_path` (`BUNDLE_AUTO_CLEAN_WITHOUT_PATH`):
   Automatically run `bundle clean` after installing when an explicit `path`
   has not been set and Bundler is not installing into the system gems.
* `auto_install` (`BUNDLE_AUTO_INSTALL`):
   Automatically run `bundle install` when gems are missing.
* `bin` (`BUNDLE_BIN`):
   Install executables from gems in the bundle to the specified directory.
   Defaults to `false`.
* `cache_all` (`BUNDLE_CACHE_ALL`):
   Cache all gems, including path and git gems. This needs to be explicitly
   configured on bundler 1 and bundler 2, but will be the default on bundler 3.
* `cache_all_platforms` (`BUNDLE_CACHE_ALL_PLATFORMS`):
   Cache gems for all platforms.
* `cache_path` (`BUNDLE_CACHE_PATH`):
   The directory that bundler will place cached gems in when running
   <code>bundle package</code>, and that bundler will look in when installing gems.
   Defaults to `vendor/cache`.
* `clean` (`BUNDLE_CLEAN`):
   Whether Bundler should run `bundle clean` automatically after
   `bundle install`.
* `console` (`BUNDLE_CONSOLE`):
   The console that `bundle console` starts. Defaults to `irb`.
* `default_install_uses_path` (`BUNDLE_DEFAULT_INSTALL_USES_PATH`):
   Whether a `bundle install` without an explicit `--path` argument defaults
   to installing gems in `.bundle`.
* `deployment` (`BUNDLE_DEPLOYMENT`):
   Disallow changes to the `Gemfile`. When the `Gemfile` is changed and the
   lockfile has not been updated, running Bundler commands will be blocked.
* `disable_checksum_validation` (`BUNDLE_DISABLE_CHECKSUM_VALIDATION`):
   Allow installing gems even if they do not match the checksum provided by
   RubyGems.
* `disable_exec_load` (`BUNDLE_DISABLE_EXEC_LOAD`):
   Stop Bundler from using `load` to launch an executable in-process in
   `bundle exec`.
* `disable_local_branch_check` (`BUNDLE_DISABLE_LOCAL_BRANCH_CHECK`):
   Allow Bundler to use a local git override without a branch specified in the
   Gemfile.
* `disable_local_revision_check` (`BUNDLE_DISABLE_LOCAL_REVISION_CHECK`):
   Allow Bundler to use a local git override without checking if the revision
   present in the lockfile is present in the repository.
* `disable_shared_gems` (`BUNDLE_DISABLE_SHARED_GEMS`):
   Stop Bundler from accessing gems installed to RubyGems' normal location.
* `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`):
   Stop Bundler from checking if a newer Bundler version is available on
   rubygems.org.
* `force_ruby_platform` (`BUNDLE_FORCE_RUBY_PLATFORM`):
   Ignore the current machine's platform and install only `ruby` platform gems.
   As a result, gems with native extensions will be compiled from source.
* `frozen` (`BUNDLE_FROZEN`):
   Disallow changes to the `Gemfile`. When the `Gemfile` is changed and the
   lockfile has not been updated, running Bundler commands will be blocked.
   Defaults to `true` when `--deployment` is used.
* `gem.github_username` (`BUNDLE_GEM__GITHUB_USERNAME`):
   Sets a GitHub username or organization to be used in `README` file when you
   create a new gem via `bundle gem` command. It can be overridden by passing an
   explicit `--github-username` flag to `bundle gem`.
* `gem.push_key` (`BUNDLE_GEM__PUSH_KEY`):
   Sets the `--key` parameter for `gem push` when using the `rake release`
   command with a private gemstash server.
* `gemfile` (`BUNDLE_GEMFILE`):
   The name of the file that bundler should use as the `Gemfile`. This location
   of this file also sets the root of the project, which is used to resolve
   relative paths in the `Gemfile`, among other things. By default, bundler
   will search up from the current working directory until it finds a
   `Gemfile`.
* `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`):
   Whether Bundler should cache all gems globally, rather than locally to the
   installing Ruby installation.
* `ignore_funding_requests` (`BUNDLE_IGNORE_FUNDING_REQUESTS`):
   When set, no funding requests will be printed.
* `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`):
   When set, no post install messages will be printed. To silence a single gem,
   use dot notation like `ignore_messages.httparty true`.
* `init_gems_rb` (`BUNDLE_INIT_GEMS_RB`):
   Generate a `gems.rb` instead of a `Gemfile` when running `bundle init`.
* `jobs` (`BUNDLE_JOBS`):
   The number of gems Bundler can install in parallel. Defaults to the number of
   available processors.
* `no_install` (`BUNDLE_NO_INSTALL`):
   Whether `bundle package` should skip installing gems.
* `no_prune` (`BUNDLE_NO_PRUNE`):
   Whether Bundler should leave outdated gems unpruned when caching.
* `only` (`BUNDLE_ONLY`):
   A space-separated list of groups to install only gems of the specified groups.
* `path` (`BUNDLE_PATH`):
   The location on disk where all gems in your bundle will be located regardless
   of `$GEM_HOME` or `$GEM_PATH` values. Bundle gems not found in this location
   will be installed by `bundle install`. Defaults to `Gem.dir`. When --deployment
   is used, defaults to vendor/bundle.
* `path.system` (`BUNDLE_PATH__SYSTEM`):
   Whether Bundler will install gems into the default system path (`Gem.dir`).
* `path_relative_to_cwd` (`BUNDLE_PATH_RELATIVE_TO_CWD`)
   Makes `--path` relative to the CWD instead of the `Gemfile`.
* `plugins` (`BUNDLE_PLUGINS`):
   Enable Bundler's experimental plugin system.
* `prefer_patch` (BUNDLE_PREFER_PATCH):
   Prefer updating only to next patch version during updates. Makes `bundle update` calls equivalent to `bundler update --patch`.
* `print_only_version_number` (`BUNDLE_PRINT_ONLY_VERSION_NUMBER`):
   Print only version number from `bundler --version`.
* `redirect` (`BUNDLE_REDIRECT`):
   The number of redirects allowed for network requests. Defaults to `5`.
* `retry` (`BUNDLE_RETRY`):
   The number of times to retry failed network requests. Defaults to `3`.
* `setup_makes_kernel_gem_public` (`BUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC`):
   Have `Bundler.setup` make the `Kernel#gem` method public, even though
   RubyGems declares it as private.
* `shebang` (`BUNDLE_SHEBANG`):
   The program name that should be invoked for generated binstubs. Defaults to
   the ruby install name used to generate the binstub.
* `silence_deprecations` (`BUNDLE_SILENCE_DEPRECATIONS`):
   Whether Bundler should silence deprecation warnings for behavior that will
   be changed in the next major version.
* `silence_root_warning` (`BUNDLE_SILENCE_ROOT_WARNING`):
   Silence the warning Bundler prints when installing gems as root.
* `ssl_ca_cert` (`BUNDLE_SSL_CA_CERT`):
   Path to a designated CA certificate file or folder containing multiple
   certificates for trusted CAs in PEM format.
* `ssl_client_cert` (`BUNDLE_SSL_CLIENT_CERT`):
   Path to a designated file containing a X.509 client certificate
   and key in PEM format.
* `ssl_verify_mode` (`BUNDLE_SSL_VERIFY_MODE`):
   The SSL verification mode Bundler uses when making HTTPS requests.
   Defaults to verify peer.
* `system_bindir` (`BUNDLE_SYSTEM_BINDIR`):
   The location where RubyGems installs binstubs. Defaults to `Gem.bindir`.
* `timeout` (`BUNDLE_TIMEOUT`):
   The seconds allowed before timing out for network requests. Defaults to `10`.
* `update_requires_all_flag` (`BUNDLE_UPDATE_REQUIRES_ALL_FLAG`):
   Require passing `--all` to `bundle update` when everything should be updated,
   and disallow passing no options to `bundle update`.
* `user_agent` (`BUNDLE_USER_AGENT`):
   The custom user agent fragment Bundler includes in API requests.
* `with` (`BUNDLE_WITH`):
   A `:`-separated list of groups whose gems bundler should install.
* `without` (`BUNDLE_WITHOUT`):
   A `:`-separated list of groups whose gems bundler should not install.

In general, you should set these settings per-application by using the applicable
flag to the [bundle install(1)](bundle-install.1.html) or [bundle cache(1)](bundle-cache.1.html) command.

You can set them globally either via environment variables or `bundle config`,
whichever is preferable for your setup. If you use both, environment variables
will take preference over global settings.

## LOCAL GIT REPOS

Bundler also allows you to work against a git repository locally
instead of using the remote version. This can be achieved by setting
up a local override:

    bundle config set --local local.GEM_NAME /path/to/local/git/repository

For example, in order to use a local Rack repository, a developer could call:

    bundle config set --local local.rack ~/Work/git/rack

Now instead of checking out the remote git repository, the local
override will be used. Similar to a path source, every time the local
git repository change, changes will be automatically picked up by
Bundler. This means a commit in the local git repo will update the
revision in the `Gemfile.lock` to the local git repo revision. This
requires the same attention as git submodules. Before pushing to
the remote, you need to ensure the local override was pushed, otherwise
you mgems/gems/bundler-2.4.19/lib/bundler/man/bundle-info.1.ronn000064400000000622150403133230017023 0ustar00git repository. By doing this, Bundler
forces you to fetch the latest changes in the remotes.

## MIRRORS OF GEM SOURCES

Bundler supports overriding gem sources with mirrors. This allows you to
configure rubygems.org as the gem source in your Gemfile while still using your
mirror to fetch gems.

    bundle config set --global mirror.SOURCE_URL MIRROR_URL

For example, to use a mirror of https://rubgems/gems/bundler-2.4.19/lib/bundler/man/bundle-update.1000064400000033124150403133230016402 0ustar00r example, 1, 15, or 30).

## CREDENTIALS FOR GEM SOURCES

Bundler allows you to configure credentials for any gem source, which allows
you to avoid putting secrets into your Gemfile.

    bundle config set --global SOURCE_HOSTNAME USERNAME:PASSWORD

For example, to save the credentials of user `claudette` for the gem source at
`gems.longerous.com`, you would run:

    bundle config set --global gems.longerous.com claudette:s00pers3krit

Or you can set the credentials as an environment variable like this:

    export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"

For gems with a git source with HTTP(S) URL you can specify credentials like so:

    bundle config set --global https://github.com/rubygems/rubygems.git username:password

Or you can set the credentials as an environment variable like so:

    export BUNDLE_GITHUB__COM=username:password

This is especially useful for private repositories on hosts such as GitHub,
where you can use personal OAuth tokens:

    export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x-oauth-basic

Note that any configured credentials will be redacted by informative commands
such as `bundle config list` or `bundle config get`, unless you use the
`--parseable` flag. This is to avoid unintentionally leaking credentials when
copy-pasting bundler output.

Also note that to guarantee a sane mapping between valid environment variable
names and valid host names, bundler makes the following transformations:

* Any `-` characters in a host name are mapped to a triple dash (`___`) in the
  corresponding environment variable.

* Any `.` characters in a host name are mapped to a double dash (`__`) in the
  corresponding environment variable.

This means that if you have a gem server named `my.gem-host.com`, you'll need to
use the `BUNDLE_MY__GEM___HOST__COM` variable to configure credentials for it
through ENV.

## CONFIGURE BUNDLER DIRECTORIES

Bundler's home, config, cache and plugin directories are able to be configured
through environment variables. The default location for Bundler's home directory is
`~/.bundle`, which all directories inherit from by default. The following
outlines the available environment variables and their default values

    BUNDLE_USER_HOME : $HOME/.bundle
    BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache
    BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config
    BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-info.1.ronn000064400000000622150403133230017023 0ustar00bundle-info(1) -- Show information for the given gem in your bundle
=========================================================================

## SYNOPSIS

`bundle info` [GEM_NAME]
              [--path]

## DESCRIPTION

Given a gem name present in your bundle, print the basic information about it
 such as homepage, version, path and summary.

## OPTIONS

* `--path`:
Print the path of the given gem
gems/gems/bundler-2.4.19/lib/bundler/man/bundle-update.1000064400000033124150403133230016402 0ustar00.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-UPDATE" "1" "August 2023" "" ""
.
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions
.
.SH "SYNOPSIS"
\fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-jobs=JOBS] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-redownload] [\-\-strict] [\-\-conservative]
.
.SH "DESCRIPTION"
Update the gems specified (all gems, if \fB\-\-all\fR flag is used), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
.
.P
You would use \fBbundle update\fR to explicitly update the version of a gem\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-all\fR
Update all gems specified in Gemfile\.
.
.TP
\fB\-\-group=<name>\fR, \fB\-g=[<name>]\fR
Only update the gems in the specified group\. For instance, you can update all gems in the development group with \fBbundle update \-\-group development\fR\. You can also call \fBbundle update rails \-\-group test\fR to update the rails gem and all gems in the test group, for example\.
.
.TP
\fB\-\-source=<name>\fR
The name of a \fB:git\fR or \fB:path\fR source used in the Gemfile(5)\. For instance, with a \fB:git\fR source of \fBhttp://github\.com/rails/rails\.git\fR, you would call \fBbundle update \-\-source rails\fR
.
.TP
\fB\-\-local\fR
Do not attempt to fetch gems remotely and use the gem cache instead\.
.
.TP
\fB\-\-ruby\fR
Update the locked version of Ruby to the current version of Ruby\.
.
.TP
\fB\-\-bundler\fR
Update the locked version of bundler to the invoked bundler version\.
.
.TP
\fB\-\-full\-index\fR
Fall back to using the single\-file index of all gems\.
.
.TP
\fB\-\-jobs=[<number>]\fR, \fB\-j[<number>]\fR
Specify the number of jobs to run in parallel\. The default is the number of available processors\.
.
.TP
\fB\-\-retry=[<number>]\fR
Retry failed network or git requests for \fInumber\fR times\.
.
.TP
\fB\-\-quiet\fR
Only output warnings and errors\.
.
.TP
\fB\-\-redownload\fR
Force downloading every gem\.
.
.TP
\fB\-\-patch\fR
Prefer updating only to next patch version\.
.
.TP
\fB\-\-minor\fR
Prefer updating only to next minor version\.
.
.TP
\fB\-\-major\fR
Prefer updating to next major version (default)\.
.
.TP
\fB\-\-strict\fR
Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
.
.TP
\fB\-\-conservative\fR
Use bundle install conservative update behavior and do not allow indirect dependencies to be updated\.
.
.SH "UPDATING ALL GEMS"
If you run \fBbundle update \-\-all\fR, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
.
.P
Consider the following Gemfile(5):
.
.IP "" 4
.
.nf

source "https://rubygems\.org"

gem "rails", "3\.0\.0\.rc"
gem "nokogiri"
.
.fi
.
.IP "" 0
.
.P
When you run bundle install(1) \fIbundle\-install\.1\.html\fR the first time, bundler will resolve all of the dependencies, all the way down, and install what you need:
.
.IP "" 4
.
.nf

Fetching gem metadata from https://rubygems\.org/\.\.\.\.\.\.\.\.\.
Resolving dependencies\.\.\.
Installing builder 2\.1\.2
Installing abstract 1\.0\.0
Installing rack 1\.2\.8
Using bundler 1\.7\.6
Installing rake 10\.4\.0
Installing polyglot 0\.3\.5
Installing mime\-types 1\.25\.1
Installing i18n 0\.4\.2
Installing mini_portile 0\.6\.1
Installing tzinfo 0\.3\.42
Installing rack\-mount 0\.6\.14
Installing rack\-test 0\.5\.7
Installing treetop 1\.4\.15
Installing thor 0\.14\.6
Installing activesupport 3\.0\.0\.rc
Installing erubis 2\.6\.6
Installing activemodel 3\.0\.0\.rc
Installing arel 0\.4\.0
Installing mail 2\.2\.20
Installing activeresource 3\.0\.0\.rc
Installingems/gems/bundler-2.4.19/lib/bundler/man/bundle-info.1.ronn000064400000000622150403133230017023 0ustar00as it installed last time\.
.
.P
After checking in the \fBGemfile\.lock\fR into version control and cloning it on another machine, running bundle install(1) \fIbundle\-install\.1\.html\fR will \fIstill\fR install the gems that you installed last time\. You don\'t need to worry that a new release of \fBerubis\fR or \fBmail\fR changes the gems you use\.
.
.P
However, from time to time, you might want gems/gems/bundler-2.4.19/lib/bundler/man/bundle-update.1000064400000033124150403133230016402 0ustar00n the \fBGemfile\.lock\fR\.
.
.P
For instance, in the scenario above, imagine that \fBnokogiri\fR releases version \fB1\.4\.4\fR, and you want to update it \fIwithout\fR updating Rails and all of its dependencies\. To do this, run \fBbundle update nokogiri\fR\.
.
.P
Bundler will update \fBnokogiri\fR and any of its dependencies, but leave alone Rails and its dependencies\.
.
.SH "OVERLAPPING DEPENDENCIES"
Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same second\-level dependency\. For instance, consider the case of \fBthin\fR and \fBrack\-perftools\-profiler\fR\.
.
.IP "" 4
.
.nf

source "https://rubygems\.org"

gem "thin"
gem "rack\-perftools\-profiler"
.
.fi
.
.IP "" 0
.
.P
The \fBthin\fR gem depends on \fBrack >= 1\.0\fR, while \fBrack\-perftools\-profiler\fR depends on \fBrack ~> 1\.0\fR\. If you run bundle install, you get:
.
.IP "" 4
.
.nf

Fetching source index for https://rubygems\.org/
Installing daemons (1\.1\.0)
Installing eventmachine (0\.12\.10) with native extensions
Installing open4 (1\.0\.1)
Installing perftools\.rb (0\.4\.7) with native extensions
Installing rack (1\.2\.1)
Installing rack\-perftools_profiler (0\.0\.2)
Installing thin (1\.2\.7) with native extensions
Using bundler (1\.0\.0\.rc\.3)
.
.fi
.
.IP "" 0
.
.P
In this case, the two gems have their own set of dependencies, but they share \fBrack\fR in common\. If you run \fBbundle update thin\fR, bundler will update \fBdaemons\fR, \fBeventmachine\fR and \fBrack\fR, which are dependencies of \fBthin\fR, but not \fBopen4\fR or \fBperftools\.rb\fR, which are dependencies of \fBrack\-perftools_profiler\fR\. Note that \fBbundle update thin\fR will update \fBrack\fR even though it\'s \fIalso\fR a dependency of \fBrack\-perftools_profiler\fR\.
.
.P
In short, by default, when you update a gem using \fBbundle update\fR, bundler will update all dependencies of that gem, including those that are also dependencies of another gem\.
.
.P
To prevent updating indirect dependencies, prior to version 1\.14 the only option was the \fBCONSERVATIVE UPDATING\fR behavior in bundle install(1) \fIbundle\-install\.1\.html\fR:
.
.P
In this scenario, updating the \fBthin\fR version manually in the Gemfile(5), and then running bundle install(1) \fIbundle\-install\.1\.html\fR will only update \fBdaemons\fR and \fBeventmachine\fR, but not \fBrack\fR\. For more information, see the \fBCONSERVATIVE UPDATING\fR section of bundle install(1) \fIbundle\-install\.1\.html\fR\.
.
.P
Starting with 1\.14, specifying the \fB\-\-conservative\fR option will also prevent indirect dependencies from being updated\.
.
.SH "PATCH LEVEL OPTIONS"
Version 1\.14 introduced 4 patch\-level options that will influence how gem versions are resolved\. One of the following options can be used: \fB\-\-patch\fR, \fB\-\-minor\fR or \fB\-\-major\fR\. \fB\-\-strict\fR can be added to further influence resolution\.
.
.TP
\fB\-\-patch\fR
Prefer updating only to next patch version\.
.
.TP
\fB\-\-minor\fR
Prefer updating only to next minor version\.
.
.TP
\fB\-\-major\fR
Prefer updating to next major version (default)\.
.
.TP
\fB\-\-strict\fR
Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
.
.P
When Bundler is resolving what versions to use to satisfy declared requirements in the Gemfile or in parent gems, it looks up all available versions, filters out any versions that don\'t satisfy the requirement, and then, by default, sorts them from newest to oldest, considering them in that order\.
.
.P
Providing one of the patch level options (e\.g\. \fB\-\-patch\fR) changes the sort order of the satisfying versions, causing Bundler to consider the latest \fB\-\-patch\fR or \fB\-\-minor\fR version available before other versions\. Note that versions outside the stated patch level could still be resolved to if necessary to find a suitable dependency graph\.
.
.P
For example, if gem \'foo\' is locked at 1\.0\.2, with no gem requirement defined in the Gemfile, and versions 1\.0\.3, 1\.0\.4, 1\.1\.0, 1\.1\.1, 2\.0\.0 all exist, the default order of preference by default (\fB\-\-major\fR) will be "2\.0\.0, 1\.1\.1, 1\.1\.0, 1\.0\gems/gems/bundler-2.4.19/lib/bundler/version.rb000064400000000404150403133230015021 0ustar00foo\fR in the Gemfile is \'~> 1\.0\', that will accomplish the same thing as providing the \fB\-\-minor\fR and \fB\-\-strict\fR options\.
.
.SH "PATCH LEVEL EXAMPLES"
Given the following gem specifications:
.
.IP "" 4
.
.nf

foo 1\.4\.3, requires: ~> bar 2\.0
gems/gems/bundler-2.4.19/lib/bundler/ui.rb000064400000000377150403133230013762 0ustar00.1\', \'bar 3\.0\.0\'
4  bundle update \-\-minor \-\-strict   \'foo 1\.5\.0\', \'bar 2\.1\.1\'
5  bundle update \-\-patch \-\-strict   \'foo 1\.4\.4\', \'bar 2\.0\.4\'
.
.fi
.
.IP "" 0
.
.P
In case 1, bar is upgraded to 2\.1\.1, a minor version increase, gems/gems/bundler-2.4.19/lib/bundler/cli/init.rb000064400000002437150403133240015057 0ustar00king with an application managed with bundler, you should use the following workflow:
.
.IP "\(bu" 4
After you create your Gemfile(5) for the first time, run
.
.IP
$ bundle install
.
.IP "\(bu" 4
Check the resulting \fBGemfile\.lock\fR into version control
.
.IP
$ git add Gemfile\.lock
.
.IP "\(bu" 4
When checking out this repository on another development machine, run
.
.IP
$ bundle install
.
.IP "\(bu" 4
When checking out this repository on a deployment machine, run
.
.IP
$ bundle install \-\-deployment
.
.IP "\(bu" 4
After changing the Gemfile(5) to reflect a new or update dependency, run
.
.IP
$ bundle install
.
.IP "\(bu" 4
Make sure to check the updated \fBGemfile\.lock\fR into version control
.
.IP
$ git add Gemfile\.lock
.
.IP "\(bu" 4
If bundle install(1) \fIbundle\-install\.1\.html\fR reports a conflict, manually update the specific gems that you changed in the Gemfile(5)
.
.IP
$ bundle update rails thin
.
.IP "\(bu" 4
If you want to update all the gems to the latest possible versions that still match the gems listed in the Gemfile(5), run
.
.IP
$ bundle update \-\-all
.
.IP "" 0

gems/gems/bundler-2.4.19/lib/bundler/cli/platform.rb000064400000002422150403133240015732 0ustar00# frozen_string_literal: false

module Bundler
  VERSION = "2.4.19".freeze

  def self.bundler_major_version
    @bundler_major_version ||= VERSION.split(".").first.to_i
  end

  def self.gem_version
    @gem_version ||= Gem::Version.create(VERSION)
  end
end
gems/gems/bundler-2.4.19/lib/bundler/ui.rb000064400000000377150403133230013762 0ustar00# frozen_string_literal: true

module Bundler
  module UI
    autoload :RGProxy, File.expand_path("ui/rg_proxy", __dir__)
    autoload :Shell,   File.expand_path("ui/shell", __dir__)
    autoload :Silent,  File.expand_path("ui/silent", __dir__)
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/fund.rb000064400000001604150403133240015043 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Init
    attr_reader :options
    def initialize(options)
      @options = options
    end

    def run
      if File.exist?(gemfile)
        Bundler.ui.error "#{gemfile} already exists at #{File.expand_path(gemfile)}"
        exit 1
      end

      unless File.writable?(Dir.pwd)
        Bundler.ui.error "Can not create #{gemfile} as the current directory is not writable."
        exit 1
      end

      if options[:gemspec]
        gemspec = File.expand_path(options[:gemspec])
        unless File.exist?(gemspec)
          Bundler.ui.error "Gem specification #{gemspec} doesn't exist"
          exit 1
        end

        spec = Bundler.load_gemspec_uncached(gemspec)

        File.open(gemfile, "wb") do |file|
          file << "# Generated from #{gemspec}\n"
          file << spec.to_gemfile
        end
      else
        File.ogems/gems/bundler-2.4.19/lib/bundler/cli/list.rb000064400000004014150403133240015060 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/platform.rb000064400000002422150403133240015732 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Platform
    attr_reader :options
    def initialize(options)
      @options = options
    end

    def run
      ruby_version = if Bundler.locked_gems
        Bundler.locked_gems.ruby_version&.gsub(/p\d+\Z/, "")
      else
        Bundler.definition.ruby_version&.single_version_string
      end

      output = []

      if options[:ruby]
        if ruby_version
          output << ruby_version
        else
          output << "No ruby version specified"
        end
      else
        platforms = Bundler.definition.platforms.map {|gems/gems/bundler-2.4.19/lib/bundler/version.rb000064400000000404150403133230015021 0ustar00gems/gems/bugems/gems/bundler-2.4.19/lib/bundler/cli/outdated.rb000064400000022241150403133240015720 0ustar00.name].first
        if spec.metadata.key?("funding_uri")
          arr << "* #{spec.name} (#{spec.version})\n  Funding: #{spec.metadata["funding_uri"]}"
        end
      end

      if fund_info.empty?
        Bundler.ui.info "None of the installed gems gems/gems/bundler-2.4.19/lib/bundler/cli/init.rb000064400000002437150403133240015057 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::List
    def initialize(options)
      @options = options
      @without_group = options["without-group"].map(&:to_sym)
      @only_group = options["only-group"].map(&:to_sym)
    end

    def run
      raise InvalidOption, "The `--only-group` and `--without-group` options cannot be used together" if @only_group.any? && @without_group.any?

      raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options[:paths]

      specs = if @only_group.any? || @without_group.any?
        filtered_specs_by_groups
      else
        begin
          Bundler.load.specs
        rescue GemNotFound => e
          Bundler.ui.error e.message
          Bundler.ui.warn "Install missing gems with `bundle install`."
          exit 1
        end
      end.reject {|s| s.name == "bundler" }.sort_by(&:name)

      return Bundler.ui.info "No gems in the Gemfile" if specs.empty?

      return specs.each {|s| Bundler.ui.info s.name } if @options["name-only"]
      return specs.each {|s| Bundler.ui.info s.full_gem_path } if @options["paths"]

      Bundler.ui.info "Gems included by the bundle:"

      specs.each {|s| Bundler.ui.info "  * #{s.name} (#{s.version}#{s.git_version})" }

      Bundler.ui.igems/gems/bundler-2.4.19/lib/bundler/cli/platform.rb000064400000002422150403133240015732 0ustar00d
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/outdated.rb000064400000022241150403133240015720 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Outdated
    attr_reader :options, :gems, :options_include_groups, :filter_options_patch, :sources, :strict
    attr_accessor :outdated_gems

    def initialize(options, gems)
      @options = options
      @gems = gems/gems/bundler-2.4.19/lib/bundler/cli/fund.rb000064400000001604150403133240015043 0ustar00_dependencies = Bundler.ui.silence do
        Bundler.load.dependencies.map {|dep| [dep.name, dep] }.to_h
      end

      definition = if gems.empty? && sources.empty?
        # We're doing a full update
        Bundler.definition(true)
      else
        Bundler.definition(:gems => gems, :sources => sources)
      end

      Bundler::CLI::Common.configure_gem_version_promoter(
        Bundler.definition,
        options.merge(:strict => @strict)
      )

      definition_resolution = proc do
        options[:local] ? definition.resolve_with_cache! : definition.resolve_remotely!
      end

      if options[:parseable]
        Bundler.ui.silence(&definition_resolution)
      else
        definition_resolution.call
      end

      Bundler.ui.info ""

      # Loop through the current specs
      gemfile_specs, dependency_specs = current_specs.partition do |spec|
        current_dependencigems/gems/bundler-2.4.19/lib/bundler/cli/list.rb000064400000004014150403133240015060 0ustar00gem_outdated || (current_spec.git_version != active_spec.git_version)

        dependency = current_dependencies[current_spec.name]
        groups = ""
        if dependency && !options[:parseable]
          groups = dependency.groups.join(", ")
        end

        outdated_gems << {
          :active_spec => active_spec,
          :current_spec => current_spec,
          :dependency => dependency,
          :groups => groups,
        }
      end

      if outdated_gems.empty?
        unless options[:parseable]
          Bundler.ui.info(nothing_outdated_message)
        end
      else
        if options_include_groups
          relevant_outdated_gems = outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems|
            contains_group = groups.split(", ").include?(options[:group])
            next unless options[:groups] || contains_group

            gems
          end.compact

          if options[:parseable]
            print_gems(relevant_outdated_gems)
          else
            print_gems_table(relevant_outdated_gems)
          end
        elsif options[:parseable]
          print_gems(outdated_gems)
        else
          print_gems_table(outdated_gems)
        end

        exit 1
      end
    end

    private

    def loaded_from_for(spec)
      return unless spec.respond_to?(:loaded_from)

      spec.loaded_from
    end

    def groups_text(group_text, groups)
      "#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\""
    end

    def nothing_outdated_message
      if filter_options_patch.any?
        display = filter_options_patch.map do |o|
          o.sub("filter-", "")
        end.join(" or ")

        "No #{display} updates to display.\n"
      else
        "Bundle up to date!\n"
      end
    end

    def retrieve_active_spec(definition, current_spec)
      active_spec = definition.resolve.find_by_name_and_platform(current_spec.name, current_spec.platform)
      return unless active_spec

      return active_spec if strict

      active_specs = active_spec.source.specs.searchgems/gems/bundler-2.4.19/lib/bundler/cli/outdated.rb000064400000022241150403133240015720 0gems/gems/bundler-2.4.19/lib/bundler/cli/show.rb000064400000004344150403133250015074 0ustar00ptions_include_groups || groups.empty?
        "  * #{spec_outdated_info}"
      else
        "  * #{spec_outdated_info} in #{groups_text("group", groups)}"
      end

      Bundler.ui.info output_message.rstrip
    end

    def gem_column_for(current_spec, active_spec, dependency, groups)
      current_version = "#{current_spec.version}#{current_spec.git_version}"
      spec_version = "#{active_spec.version}#{active_spec.git_version}"
      dependency = dependency.requirement if dependency

      ret_val = [active_spec.name, current_version, spec_version, dependency.to_s, groups.to_s]
      ret_val << loaded_from_for(active_spec).to_s if Bundler.ui.debug?
      ret_val
    end

    def check_for_deployment_mode!
      return unless Bundler.frozen_bundle?
      suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
        "bundle config unset frozen"
      elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
        "bundle config unset deployment"
      end
      raise ProductionError, "You are trying to check outdated gems in " \
        "deployment mode. Run `bundle outdated` elsewhere.\n" \
        "\nIf this is a development machine, remove the " \
        "#{Bundler.default_gemfile} freeze" \
        "\nby running `#{suggested_command}`."
    end

    def update_present_via_semver_portions(current_spec, active_spec, options)
      current_major = current_spec.version.segments.first
      active_major = active_spec.version.segments.first

      update_present = false
      update_present = active_major > current_major if options["filter-major"]

      if !update_present && (options["filter-minor"] || options["filter-patch"]) && current_major == active_major
        current_minor = get_version_semver_portion_value(current_spec, 1)
        active_minor = get_version_semver_portion_value(active_spec, 1)

        update_present = active_minor > current_minor if options["filter-minor"]

        if !update_present && options["filter-patch"] && current_minor == active_minor
          current_patch = get_version_semver_portion_value(current_spec, 2)
          active_patch = get_version_semver_portion_value(active_spec, 2)

          update_present = active_patch > current_patch
gems/gems/bundler-2.4.19/lib/bundler/cli/gem.rb000064400000040537150403133250014670 0ustar00ef justify(row, sizes)
      row.each_with_index.map do |element, index|
        element.ljust(sizes[index])
      end.join("  ").strip + "\n"
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/show.rb000064400000004344150403133250015074 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Show
    attr_reader :options, :gem_name, :latest_specs
    def initialize(options, gem_name)
      @options = options
      @gem_name = gem_name
      @verbose = options[:verbose] || options[:outdated]
      @latest_specs = fetch_latest_specs if @verbose
    end

    def run
      Bundler.ui.silence do
        Bundler.definition.validate_runtime!
        Bundler.load.lock
      end

      if gem_name
        if gem_name == "bundler"
          path = File.expand_path("../../..", __dir__)
        else
          spec = Bundler::CLI::Common.select_spec(gem_name, :regex_match)
          return unless spec
          path = spec.full_gem_path
          unless File.directory?(path)
            return Bundler.ui.warn "The gem #{gem_name} has been deleted. It was installed at: #{path}"
          end
        end
        return Bundler.ui.info(path)
      end

      if options[:paths]
        Bundler.load.specs.sort_by(&:name).map do |s|
          Bundler.ui.info s.full_gem_path
        end
      else
        Bundler.ui.info "Gems included by the bundle:"
        Bundler.load.specs.sort_by(&:name).each do |s|
          desc = "  * #{s.name} (#{s.version}#{s.git_version})"
          if @verbose
            latest = latest_specs.find {|l| l.name == s.name }
            Bundler.ui.info <<-END.gsub(/^ +/, "")
              #{desc}
              \tSummary:  #{s.summary || "No description available."}
              \tHomepage: #{s.homepage || "No website available."}
              \tStatus:   #{outdated?(s, latest) ? "Outdated - #{s.version} < #{latest.version}" : "Up to date"}
            END
          else
            Bundler.ui.info desc
          end
        end
      end
    end

    private

    def fetch_latest_specs
      definition = Bundler.definition(true)
      if options[:outdated]
        Bundler.ui.info "Fetching remote specs for outdated check...\n\n"
        Bundler.ui.silence { definition.resolve_remotely! }
      else
        definition.resolve_with_cache!
      end
      Bundler.reset!
      definition.specs
    end

    def outdated?(current, latest)
      return false unless latest
      Gem::Version.new(current.version) < Gem::Version.new(latest.version)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/gem.rb000064400000040537150403133250014670 0ustar00# frozen_string_literal: true

require "pathname"

module Bundler
  class CLI
    Bundler.require_thor_actions
    include Thor::Actions
  end

  class CLI::Gem
    TEST_FRAMEWORK_VERSIONS = {
      "rspec" => "3.0",
      "minitest" => "5.0",
      "test-unit" => "3.0",
    }.freeze

    attr_reader :options, :gem_name, :thor, :name, :target, :extension

    def initialize(options, gem_name, thor)
      @options = options
      @gem_name = resolve_name(gem_name)

      @thor = thor
      thor.behavior = :invoke
      thor.destination_root = nil

      @name = @gem_name
      @target = SharedHelpers.pwd.join(gem_name)

      @extension = options[:ext]

      validate_ext_name if @extension
      validate_rust_builder_rubygems_version if @extension == "rust"
      travis_removal_info
    end

    def run
      Bundler.ui.confirm "Creating gem '#{name}'..."

      underscored_name = name.tr("-", "_")
      namespaced_path = name.tr("-", "/")
      constant_name = name.gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
      constant_array = constant_name.split("::")
      minitest_constant_name = constant_array.clone.tap {|a| a[-1] = "Test#{a[-1]}" }.join("::") # Foo::Bar => Foo::TestBar

      use_git = Bundler.git_present? && options[:git]

      git_author_name = use_git ? `git config user.name`.chomp : ""
      git_username = use_git ? `git config github.user`.chomp : ""
      git_user_email = use_git ? `git config user.email`.chomp : ""

      github_username = if options[:github_username].nil?
        git_username
      elsif options[:github_username] == false
        ""
      else
        options[:github_username]
      end

    gems/gems/bundler-2.4.19/lib/bundler/cli/show.rb000064400000004344150403133250015074 0ustar00n,
        :minitest_constant_name => minitest_constant_name,
      }
      ensure_safe_gem_name(name, constant_array)

      templates = {
        "#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
        "lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
        "lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
        "sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
        "newgem.gemspec.tt" => "#{name}.gemspec",
        "Rakefile.tt" => "Rakefile",
        "README.md.tt" => "README.md",
        "bin/console.tt" => "bin/console",
        "bin/setup.tt" => "bin/setup",
      }

      executables = %w[
        bin/console
        bin/setup
      ]

      templates.merge!("gitignore.tt" => ".gitignore") if use_git

      if test_framework = ask_and_set_test_framework
        config[:test] = test_framework
        config[:test_framework_version] = TEST_FRAMEWORK_VERSIONS[test_framework]

        case test_framework
        when "rspec"
          templates.merge!(
            "rspec.tt" => ".rspec",
            "spec/spec_helper.rb.tt" => "spec/spec_helper.rb",
            "spec/newgem_spec.rb.tt" => "spec/#{namespaced_path}_spec.rb"
          )
          config[:test_task] = :spec
        when "minitest"
          # Generate path for minitest target file (FileList["test/**/test_*.rb"])
          #   foo     => test/test_foo.rb
          #   foo-bar => test/foo/test_bar.rb
          #   foo_bar => test/test_foo_bar.rb
          paths = namespaced_path.rpartition("/")
          paths[2] = "test_#{paths[2]}"
          minitest_namespaced_path = paths.join("")

          templates.merge!(
            "test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
            "test/minitest/test_newgem.rb.tt" => "test/#{minitest_namespaced_path}.rb"
          )
          config[:test_task] = :test
        when "test-unit"
          templates.merge!(
            "test/test-unit/test_helper.rb.tt" => "test/test_helper.rb",
            "test/test-unit/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
          )
          config[:test_task] = :test
        end
      end

      config[:ci] = ask_and_set_ci
      case config[:ci]
      when "github"
        templates.merge!("github/workflows/main.ymgems/gems/bundler-2.4.19/lib/bundler/cli/gem.rb000064400000040537150403133250014670 0ustar00ode of conduct in gems you generate?",
        "Codes of conduct can increase contributions to your project by contributors who " \
        "prefer collaborative, safe spaces. You can read more about the code of conduct at " \
        "contributor-covenant.org. Having a code of conduct means agreeing to the responsibility " \
        "of enforcing it, so be sure that you are prepared to do that. Be sure that your email " \
        "address is specified as a contact in the generated code of conduct so that people know " \
        "who to contact in case of a violation. For suggestions about " \
        "how to enforce codes of conduct, see https://bit.ly/coc-enforcement.")
        config[:coc] = true
        Bundler.ui.info "Code of conduct enabled in config"
        templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
      end

      if ask_and_set(:changelog, "Do you want to include a changelog?",
        "A changelog is a file which contains a curated, chronologically ordered list of notable " \
        "changes for each version of a project. To make it easier for users and contributors to" \
        " see precisely what notable changes have been made between each release (or version) of" \
        " the project. Whether consumers or developers, the end users of software are" \
        " human beings who care about what's in the software. When the software changes, people " \
        "want to know why and how. see https://keepachangelog.com")
        config[:changelog] = true
        Bundler.ui.info "Changelog enabled in config"
        templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
      end

      config[:linter] = ask_and_set_linter
      case config[:linter]
      when "rubocop"
        config[:linter_version] = rubocop_version
        Bundler.ui.info "RuboCop enabled in config"
        templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
      when "standard"
        config[:linter_version] = standard_version
        Bundler.ui.info "Standard enabled in config"
        templates.merge!("standard.yml.tt" => ".standard.yml")
      end

      templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]

      if extension == "c"
        templates.merge!(
          "ext/newgem/extconf-c.rb.tt" => "ext/#{name}/extconf.rb",
          "ext/newgem/newgem.h.tt" => "ext/#{name}/#{underscored_name}.h",
          "ext/newgem/newgem.c.tt" => "ext/#{name}/#{underscored_name}.c"
        )
      end

      if extension == "rust"
        templates.merge!(
          "Cargo.toml.tt" => "Cargo.toml",
          "ext/newgem/Cargo.toml.tt" => "ext/#{name}/Cargo.toml",
          "ext/newgem/extconf-rust.rb.tt" => "ext/#{name}/extconf.rb",
          "ext/newgem/src/lib.rs.tt" => "ext/#{name}/src/lib.rs",
        )
      end

      if target.exist? && !target.directory?
        Bundler.ui.error "Couldn't create a new gem named `#{gem_name}` because there's an existing file named `#{gem_name}`."
        exit Bundler::BundlerError.all_errors[Bundler::GenericSystemCallError]
      end

      if use_git
        Bundler.ui.info "Initializing git repo in #{target}"
        require "shellwords"
        `git init #{target.to_s.shellescape}`

        config[:git_default_branch] = File.read("#{target}/.git/HEAD").split("/").last.chomp
      end

      templates.each do |src, dst|
        destination = target.join(dst)
        thor.template("newgem/#{src}", destination, config)
      end

      executables.each do |file|
        path = target.join(file)
        executable = (path.stat.mode | 0o111)
        path.chmod(executable)
      end

      if use_git
        Dir.chdir(target) do
          `git add .`
        end
      end

      # Open gemspec in editor
      open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit]

      Bundler.ui.info "Gem '#{name}' was successfully created. " \
        "For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html"
    end

    private

    def resolve_name(name)
      SharedHelpers.pwd.join(name).basename.to_s
    end

    def ask_and_set(key, header, message)
      choice = options[key]
      choice = Bundler.settings["gem.#{key}"] if choice.nil?

      if choice.nil?
        Bundler.ui.confirm header
        choice = Bundler.ui.yes? "#{message} y/(n):"
        Bundler.settings.set_global("gem.#{key}", choice)
      end

      choice
    end

    def validate_ext_name
      return unless gem_name.index("-")

      Bundler.ui.error "You have specified a gem name which does not conform to the \n" \
                       "naming guidelines for C extensions. For more information, \n" \
                       "see the 'Extension Naming' section at the following URL:\n" \
                       "https://guides.rubygems.org/gems-with-extensions/\n"
      exit 1
    end

    def ask_and_set_test_framework
      test_framework = options[:test] || Bundler.settings["gem.test"]

      if test_framework.to_s.empty?
        Bundler.ui.confirm "Do you want to generate tests with your gem?"
        Bundler.ui.info hint_text("test")

        result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
        if /rspec|minitest|test-unit/.match?(result)
          test_framework = result
        else
          test_framework = false
        end
      end

      if Bundler.settings["gem.test"].nil?
        Bundler.settings.set_global("gem.test", test_framework)
      end

      if options[:test] == Bundler.settings["gem.test"]
        Bundler.ui.info "#{options[:test]} is already configured, ignoring --test flag."
      end

      test_framework
    end

    def hint_text(setting)
      if Bundler.settings["gem.#{setting}"] == false
        "Your choice will only be applied to this gem."
      else
        "Future `bundle gem` calls will use your choice. " \
        "This setting can be changed anytime with `bundle config gem.#{setting}`."
      end
    end

    def ask_and_set_ci
      ci_template = options[:ci] || Bundler.settings["gem.ci"]

      if ci_template.to_s.empty?
        Bundler.ui.confirm "Do you want to set up continuous integration for your gem? " \
          "Supported services:\n" \
          "* CircleCI:       https://circleci.com/\n" \
          "* GitHub Actions: https://github.com/features/actions\n" \
          "* GitLab CI:      https://docs.gitlab.com/ee/ci/\n" \
          "\n"
        Bundler.ui.info hint_text("ci")

        result = Bundler.ui.ask "Enter a CI service. github/gitlab/circle/(none):"
        if /github|gitlab|circle/.match?(result)
          ci_template = result
        else
          ci_template = false
        end
      end

      if Bundler.settings["gem.ci"].nil?
        Bundler.settings.set_global("gem.ci", ci_template)
      end

      if options[:ci] == Bundler.settings["gem.ci"]
        Bundler.ui.info "#{options[:ci]} is already configured, ignoring --ci flag."
      end

      ci_template
    end

    def ask_and_set_linter
    gems/gems/bundler-2.4.19/lib/bundler/cli/doctor.rb000064400000010544150403133260015406 0ustar00linter_template = false
        end
      end

      if Bundler.settings["gem.linter"].nil?
        Bundler.settings.set_global("gem.linter", linter_template)
      end

      # Once gem.linter safely set, unset the deprecated gem.rubocop
      unless Bundler.settings["gem.rubocop"].nil?
        Bundler.settings.set_global("gem.rubocop", nil)
      end

      if options[:linter] == Bundler.settings["gem.linter"]
        Bundler.ui.info "#{options[:linter]} is already configured, ignoring --linter flag."
      end

      linter_template
    end

    def deprecated_rubocop_option
      if !options[:rubocop].nil?
        if options[:rubocop]
          Bundler::SharedHelpers.major_deprecation 2, "--rubocop is deprecated, use --linter=rubocop"
          "rubocop"
        else
          Bundler::SharedHelpers.major_deprecation 2, "--no-rubocop is deprecated, use --linter"
          false
        end
      elsif !Bundler.settings["gem.rubocop"].nil?
        Bundler::SharedHelpers.major_deprecation 2,
          "config gem.rubocop is deprecated; we've updated your config to use gem.linter instead"
        Bundler.settings["gem.rubocop"] ? "rubocop" : false
      end
    end

    def bundler_dependency_version
      v = Gem::Version.new(Bundler::VERSION)
      req = v.segments[0..1]
      req << "a" if v.prerelease?
      req.join(".")
    end

    def ensure_safe_gem_name(name, constant_array)
      if /^\d/.match?(name)
        Bundler.ui.error "Invalid gem name #{name} Please give a name which does not start with numbers."
        exit 1
      end

      constant_name = constant_array.join("::")

      existing_constant = constant_array.inject(Object) do |c, s|
        defined = begin
          c.const_defined?(s)
        rescue NameError
          Bundler.ui.error "Invalid gem name #{name} -- `#{constant_name}` is an invalid constant name"
          exit 1
        end
        (defined && c.const_get(s)) || break
      end

      return unless existing_constant
      Bundler.ui.error "Invalid gem name #{name} constant #{constant_name} is already in use. Please choose another gem name."
      exit 1
    end

    def open_editor(editor, file)
      thor.run(%(#{editor} "#{file}"))
    end

    def rust_builder_required_rubygems_version
      "3.3.11"
    end

    def required_ruby_version
      "2.6.0"
    end

    def rubocop_version
      "1.21"
    end

    def standard_version
      "1.3"
    end

    # TODO: remove at next minor release
    def travis_removal_info
      if options[:ci] == "travis"
        Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator."
        exit 1
      end

      if Bundler.settings["gem.ci"] == "travis"
        Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator, but it is present in bundle config. Please configure another provider using `bundle config set gem.ci SERVICE` (where SERVICE is one of github/gitlab/circle) or unset configuration using `bundle config unset gem.ci`."
        exit 1
      end
    end

    def validate_rust_builder_rubygems_version
      if Gem::Version.new(rust_builder_required_rubygems_version) > Gem.rubygems_version
        Bundler.ui.error "Your RubyGems version (#{Gem.rubygems_version}) is too old to build Rust extension. Please update your RubyGems using `gem update --system` or any other way and try again."
        exit 1
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/doctor.rb000064400000010544150403133260015406 0ustar00# frozen_string_literal: true

require "rbconfig"
require "shellwords"
require "fiddle"

module Bundler
  class CLI::Doctor
    DARWIN_REGEX = /\s+(.+) \(compatibility /.freeze
    LDD_REGEX = /\t\S+ => (\S+) \(\S+\)/.freeze

    attr_reader :options

    def initialize(options)
      @options = options
    end

    def otool_available?
      Bundler.whigems/gems/bundler-2.4.19/lib/bundler/cli/check.rb000064400000002431150403133270015166 0ustar00        return [] unless otool_available?
        dylibs_darwin(path)
      when /(linux|solaris|bsd)/
        return [] unless ldd_available?
        dylibs_ldd(path)
      else # Windows, etc.
        Bundler.ui.warn("Dynamic library check not supported on this platform.")
        []
      end
    end

    def bundles_for_gem(spec)
      Dir.glob("#{spec.full_gem_path}/**/*.bundle")
    end

    def check!
      require_relative "check"
      Bundler::CLI::Check.new({}).run
    end

    def run
      Bundler.ui.level = "warn" if options[:quiet]
      Bundler.settings.validate!
      check!

      definition = Bundler.definition
      broken_links = {}

      definition.specs.each do |spec|
        bundles_for_gem(spec).each do |bundle|
          bad_paths = dylibs(bundle).select do |f|
            Fiddle.dlopen(f)
            false
          rescue Fiddle::DLError
            true
          end
          if bad_paths.any?
            broken_links[spec] ||= []
            broken_links[spec].concat(bad_paths)
          end
        end
      end

      permissions_valid = check_home_permissions

      if broken_links.any?
        message = "The following gems are missing OS dependencies:"
        broken_links.map do |spec, paths|
          paths.uniq.map do |path|
            "\n * #{sgems/gems/bundler-2.4.19/lib/bundler/cli/binstubs.rb000064400000003442150403133270015745 0ustar00user << f
          else
            files_not_readable_or_writable << f
          end
        elsif File.stat(f).uid != Process.uid
          files_not_owned_by_current_user_but_still_rw << f
        end
      end

      ok = true

      if broken_symlinks.any?
        Bundler.ui.warn "Broken links exist in the Bundler home. Please report them to the offending gem's upstream repo. These files are:\n - #{broken_symlinks.join("\n - ")}"

        ok = false
      end

      if files_not_owned_by_current_user_but_still_rw.any?
        Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
          "user, but are still readable/writable. These files are:\n - #{files_not_owned_by_current_user_but_still_rw.join("\n - ")}"

        ok = false
      end

      if files_not_rw_and_owned_by_different_user.any?
        Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
          "user, and are not readable/writable. These files are:\n - #{files_not_rw_and_owned_by_different_user.join("\n - ")}"

        ok = false
      end

      if files_not_readable_or_writable.any?
        Bundler.ui.warn "Files exist in the Bundler home that are not " \
          "readable/writable by the current user. These files are:\n - #{files_not_readable_or_writable.join("\n - ")}"

        ok = false
      end

      ok
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/check.rb000064400000002431150403133270015166 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/info.rb000064400000006550150403133300015044 0ustar00le's dependencies."
        Bundler.ui.warn "Install missing gems with `bundle install`."
        exit 1
      end

      if not_installed.any?
        Bundler.ui.error "The following gems are missing"
        not_installed.each {|s| Bundler.ui.error " * #{s.name} (#{s.version})" }
        Bundler.ui.warn "Install missing gems with `bundle install`"
        exit 1
      elsif !Bundler.default_lockfile.file? && Bundler.frozen_bundle?
        Bundler.ui.error "This bundle has been frozen, but there is no #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} present"
        exit 1
      else
        Bundler.load.lock(:preserve_unknown_sections => true) unless options[:"dry-run"]
        Bundler.ui.info "The Gemfile's dependencies are satisfied"
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/binstubs.rb000064400000003442150403133270015745 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Binstubs
    attr_reader :options, :gems
    def initialize(options, gems)
      @options = options
      @gems = gems
    end

    def run
      Bundler.definition.validate_runtime!
      path_option = options["path"]
      path_option = nil if path_option&.empty?
      Bundler.settings.set_command_option :bin, path_option if options["path"]
      Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
      installer = Installer.new(Bundler.root, Bundler.definition)

      installer_opts = {
        :force => options[:force],
        :binstubs_cmd => true,
        :all_platforms => options["all-platforms"],
      }

      if options[:all]
        raise InvalidOption, "Cannot specify --all with specific gems" unless gems.empty?
        @gems = Bundler.definition.specs.map(&:name)
        installer_opts.delete(:binstubs_cmd)
      elsif gems.empty?
        Bundler.ui.error "`bundle binstubs` needs at least one gem to run."
        exit 1
      end

      gems.each do |gem_name|
        spec = Bundler.definition.specs.find {|s| s.name == gem_name }
        unless spec
          raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(
            gem_name, Bundler.definition.specs
          )
        end

        if options[:standalone]
          if gem_name == "bundler"
            Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") unless options[:all]
            next
          end

          Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do
            installer.generate_standalone_bundler_executable_stubs(spec, installer_opts)
          end
        else
          installer.generate_bundler_executable_stubs(spec, installer_opts)
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/exec.rb000064400000004542150403133310015035 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Info
    attr_reader :gem_name, :options
    def initialize(options, gem_name)
      @options = options
      @gem_name = gem_name
    end

    def run
      Bundler.ui.silence do
        Bundler.definition.validate_runtime!
        Bundler.load.lock
      end

      spec = spec_for_gem(gem_name)gems/gems/bundler-2.4.19/lib/bundler/cli/check.rb000064400000002431150403133270015166 0ustar00    raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies)
    end

    def print_gem_version(spec)
      Bundler.ui.info spec.version.to_s
    end

    def print_gem_path(spec)
      name = spec.name
      if name == "bundler"
        path = File.expand_path("../../..", __dir__)
      else
        path = spec.full_gem_path
        if spec.deleted_gem?
          return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
        end
      end

      Bundler.ui.info path
    end

    def print_gem_info(spec)
      metadata = spec.metadata
      name = spec.name
      gem_info = String.new
      gem_info << "  * #{name} (#{spec.version}#{spec.git_version})\n"
      gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
      gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
      gem_info << "\tDocumentation: #{metadata["documentation_uri"]}\n" if metadata.key?("documentation_uri")
      gem_info << "\tSource Code: #{metadata["source_code_uri"]}\n" if metadata.key?("source_code_uri")
      gem_info << "\tFunding: #{metadata["funding_uri"]}\n" if metadata.key?("funding_uri")
      gem_info << "\tWiki: #{metadata["wiki_uri"]}\n" if metadata.key?("wiki_uri")
      gem_info << "\tChangelog: #{metadgems/gems/bundler-2.4.19/lib/bundler/cli/console.rb000064400000002066150403133310015552 0ustar00nfo
    end

    def gem_dependencies
      @gem_dependencies ||= Bundler.definition.specs.map do |spec|
        dependency = spec.dependencies.find {|dep| dep.name == gem_name }
        next unless dependency
        "#{spec.name} (#{spec.version}) depends on #{gem_name} (#{dependency.requirements_list.join(", ")})"
      end.compact.sort
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/exec.rb000064400000004542150403133310015035 0ustar00# frozen_string_literal: true

require_relative "../cugems/gems/bundler-2.4.19/lib/bundler/cli/clean.rb000064400000001140150403133310015162 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/info.rb000064400000006550150403133300015044 0ustar00NALS.each {|s| trap(s, "DEFAULT") }
      Kernel.load(file)
    rescue SystemExit, SignalExceptigems/gems/bundler-2.4.19/lib/bundler/cli/plugin.rb000064400000003343150403133320015406 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/console.rb000064400000002066150403133310015552 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Console
    attr_reader :options, :group
    def initialize(options, group)
      @options = options
      @group = group
    end

    def run
      Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
                           "by `bin/console` generated by `bundle gem <name>`"

      group ? Bundler.require(:default, *group.split(" ").map!(&:to_sym)) : Bundler.require
      ARGV.clear

      console = get_console(Bundler.settings[:console] || "irb")
      console.start
    end

    def get_console(name)
      require name
      get_constant(name)
    rescue LoadError
      Bundler.ui.error "Couldn't load console #{name}, falling back to irb"
      require "irb"
      get_constant("irb")
    end

    def get_constant(name)
      const_name = {
        "pry" => :Pry,
        "ripl" => :Ripl,
        "irb" => :IRB,
      }[name]
      Object.const_get(const_name)
    rescue NameError
      Bundler.ui.error "Could not find constant #{const_name}"
      exit 1
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/viz.rb000064400000002112150403133330014712 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/exec.rb000064400000004542150403133310015035 0ustar00very system gem not in this " \
        "bundle, run `bundle clean --force`."
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/plugin.rbgems/gems/bundler-2.4.19/lib/bundler/cli/open.rb000064400000002255150403133330015053 0ustar00f the RubyGems source to fetch the plugin from"
    method_option "version", :type => :string, :default => nil, :banner =>
      "The version of the plugin to fetch"
    method_option "git", :type => :string, :default => nil, :banner =>
      "URL of the git repo to fetch from"
    method_option "local_git", :type => :string, :default => nil, :banner =>
      "Path of the local git repo to fetch from"
    method_option "branch", :type => :string, :default => nil, :banner =>
      "The git branch to checkout"
    method_option "ref", :type => :string, :default => nil, :banner =>
      "The git revision to check out"
    def install(*plugins)
      Bundler::Plugin.install(plugins, options)
    end

    desc "uninstall PLUGINS", "Uninstall the plugins"
    long_desc <<-D
      Uninstall given list of plugins. To uninstall all the plugins, use -all option.
 gems/gems/bundler-2.4.19/lib/bundler/cli/console.rb000064400000002066150403133310015552 0gems/gems/bundler-2.4.19/lib/bundler/cli/issue.rb000064400000002506150403133340015242 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Viz
    attr_reader :options, :gem_name
    def initialize(options)
      @options = options
    end

    def run
      # make sure we get the right `graphviz`. There is also a `graphviz`
      # gem we're not built to support
      gem "ruby-graphviz"
      require "graphviz"

      options[:without] = options[:without].join(":").tr(" ", ":").split(":")
      output_file = File.expand_path(options[:file])

      graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], opgems/gems/bundler-2.4.19/lib/bundler/cli/clean.rb000064400000001140150403133310015162 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/common.rb000064400000011127150403133350015402 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Open
    attr_reader :options, :name,gems/gems/bundler-2.4.19/lib/bundler/cli/plugin.rb000064400000003343150403133320015406 0ustar00  Bundler.with_original_env do
            system(*command)
          end || Bundler.ui.info("Could not run '#{command.join(" ")}'")
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/issue.rb000064400000002506150403133340015242 0ustar00# frozen_string_literal: true

require "rbconfig"

module Bundler
  class CLI::Issue
    def run
      Bundler.ui.info <<-EOS.gsub(/^ {8}/, "")
        Did you find an issue with Bundler? Before filing a new issue,
        be sure to check out these resources:

        1. Check out our troubleshooting guide for quick fixes to common issues:
        https://github.com/rubygems/rubygems/blob/master/bundler/doc/TROUBLESHOOTING.md

        2. Instructions for common Bundler uses can be found on the documentation
        site: https://bundler.io/

        3. Information about each Bundler command can be found in the Bundler
        man pages: https://bundler.io/man/bundle.1.html

        Hopefully the troubleshooting steps above resolgems/gems/bundler-2.4.19/lib/bundler/cli/viz.rb000064400000002112150403133330014712 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/common.rb000064400000011127150403133350015402 0ustar00# frozen_string_literal: true

module Bundler
  module CLI::Common
    def self.output_post_install_messages(messages)
      return if Bundler.settings["ignore_messages"]
      messages.to_a.each do |name, msg|
        print_post_install_message(name, msg) unless Bundler.settings["ignore_messages.#{name}"]
      end
    end

    def self.print_post_install_message(name, msg)
      Bundler.ui.confirm "Post-install message from #{name}:"
      Bundler.ui.info msg
    end

    def self.output_fund_metadata_summary
      return if Bundler.settings["ignore_funding_requests"]
      defgems/gems/bundler-2.4.19/lib/bundler/cli/remove.rb000064400000000537150403133360015413 0ustar00def self.verbalize_groups(groups)
      groups.map! {|g| "'#{g}'" }
      group_list = [groups[0...-1].join(", "), groups[-1..-1]].
        reject {|s| s.to_s.empty? }.join(" and ")
      group_str = groups.size == 1 ? "group" : "groups"
      "#{group_str} #{group_list}"
    end

    def self.select_spec(name, regex_match = nil)
      specs = []
  gems/gems/bundler-2.4.19/lib/bundler/cli/pristine.rb000064400000003215150403133370015750 0ustar00 else
        ask_for_spec_from(specs)
      end
    rescue RegexpError
      raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
    end

    degems/gems/bundler-2.4.19/lib/bundler/cli/issue.rb000064400000002506150403133340015242 0ustar00s = locked_gems.specs.map(&:name).uniq
      names.-(locked_names).each do |g|
        raise GemNotFound, gem_not_found_message(g, locked_names)
      end
    end

    def self.configure_gem_version_promoter(definition, options)
      patch_level = patch_level_options(options)
      patch_level << :patch if patch_level.empty? && Bundler.settings[:prefer_patch]
      raise InvalidOption, "Provide only one of the following options: #{patch_level.join(", ")}" unless patch_level.length <= 1

      definition.gem_version_promoter.tap do |gvp|
        gvp.level = patch_level.first || :major
        gvp.strict = options[:strict] || options["filter-strigems/gems/bundler-2.4.19/lib/bundler/cli/update.rb000064400000010173150403133370015376 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/common.rb000064400000011127150403133350015402 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Remove
    def initialize(gems, options)
      @gems = gems
      @options = options
    end

    def run
      raise InvalidOption, "Please specify gems to remove." if @gems.empty?

      Injector.remove(@gems, {})
      Installer.install(Bundler.root, Bundler.definition)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/pristine.rb000064400000003215150403133370015750 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Pristine
    def initialize(gems)
      @gems = gems
    end

    def run
      CLI::Common.ensure_all_gems_in_lockfile!(@gems)
      definition = Bundler.definition
      definition.validate_runtime!
      installer = Bundler::Installer.new(Bundler.root, definition)

      Bundler.load.specs.each do |spec|
        next if spec.name == "bundler" # Source::Rubygems doesn't install bundler
        next if !@gems.empty? && !@gems.include?(spec.name)

        gem_name = "#{spec.name} (#{spec.version}#{spec.git_version})"
        gem_name += " (#{spec.platform})" if !spec.platform.nil? && spec.platform != Gem::Platform::RUBY

        case source = spec.source
        when Source::Rubygems
          cached_gem = spec.cache_file
          unless File.exist?(cached_gem)
            Bundler.ui.error("Failed to pristine #{gem_name}. Cached gem #{cached_gem} does not exist.")
            next
          end

          FileUtils.rm_rf spec.full_gem_path
        when Source::Git
          if source.local?
            Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is locally overridden.")
            next
          end

          source.remote!
          if extension_cache_path = source.extension_cache_path(spec)
            FileUtils.rm_rf extension_cache_path
          end
          FileUtils.rm_rf spec.extension_dir
          FileUtils.rm_rf spec.full_gem_path
        else
          Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is sourced from local path.")
          next
        end

        Bundler::GemInstaller.new(spec, installer, false, 0, true).install_from_spec
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/update.rb000064400000010173150403133370015376 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Update
    attr_reader :options, :gems
    def initialize(optiongems/gems/bundler-2.4.19/lib/bundler/cli/cache.rb000064400000002151150403133400015146 0ustar00 InvalidOption, "Cannot specify --all along with specific options."
      end

      cogems/gems/bundler-2.4.19/lib/bundler/cli/remove.rb000064400000000537150403133360015413 0ustar00finition, options)

      Bundler::Fetcher.disable_endpoint = options["full-index"]

      opts = optionsgems/gems/bundler-2.4.19/lib/bundler/cli/config.rb000064400000014022150403133400015350 0ustar00ecs[name].first
          unless new_spec
            unless locked_spec.match_platform(Bundler.local_platform)
              Bundler.ui.warn "Bundler attempted to update #{name} but it was not considered because it is for a different platform from the current one"
            end

            next
          end

          locked_source = locked_info[:source]
          new_source = new_spec.source.identifier
          next if locked_source != new_source

          new_version = new_spec.version
          locked_version = locked_info[:version]
          if new_version < locked_version
            Bundler.ui.warn "Note: #{name} version regressed from #{locked_version} to #{new_version}"
          elsif new_version == locked_version
            Bundler.ui.warn "Bundler attempted to update #{name} but its version stayed the same"
          end
        end
      end

      Bundler.ui.confirm "Bundle updated!"
      Bundler::CLI::Common.output_without_groups_message(:update)
      Bundler::CLI::Common.output_post_install_messages installer.post_install_messages

      Bundler::CLI::Common.output_fund_metadata_summary
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/cache.rb00006440000000215115040gems/gems/bundler-2.4.19/lib/bundler/cli/update.rb000064400000010173150403133370015376 0ustar00settings[:path] if options[:path]

      Bundler.settings.temporary(:cache_all_platforms => options["all-platforms"]) do
        Bundler.load.cache(custom_path)
      end
    end

    private

    def install
      require_relative "install"
      options = self.options.dup
      options["local"] = false if Bundler.settings[:cache_all_platforms]
      options["no-cache"] = true
      Bundler::CLI::Install.new(options).run
    end

    def setup_cache_all
      all = options.fetch(:all, Bundler.feature_flag.cache_all? || nil)

      Bundler.settings.set_command_option_if_given :cache_all, all
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/config.rb000064400000014022150403133400015350 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Config < Thor
    class_option :parseable, :type => :boolean, :banner => "Use minimal formatting for more parseable output"

    def self.scope_options
      method_option :global, :type => :boolean, :banner => "Only change the global config"
      method_option :local, :type => :boolean, :banner => "Only change the local config"
    end
    private_class_method :scope_options

    desc "base NAME [VALUE]", "The Bundler 1 config interface", :hide => true
    scope_options
    method_option :delete, :type => :boolean, :banner => "delete"
    def base(name = nil, *value)
      new_args =
        if ARGV.size == 1
          ["config", "list"]
        elsif ARGV.include?("--delete")
          ARGV.map {|arg| arg == "--delete" ? "unset" : arg }
        elsif ARGV.include?("--global") || ARGV.include?("--local") || ARGV.size == 3
          ["config", "set", *ARGV[1..-1]]
        else
          ["config", "get", ARGV[1]]
        end

      SharedHelpers.major_deprecation 3,
        "Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle #{new_args.join(" ")}` instead."

      Base.new(options, name, value, self).run
    end

    desc "list", "List out all configured settings"
    def list
      Base.new(options, nil, nil, self).run
    end

    desc "get NAME", "Returns the value for the given key"
    def get(name)
      Base.new(options, name, nil, self).run
    end

    desc "set NAME VALUE", "Sets the given value for the given key"
    scope_options
    def set(name, value, *value_)
      Base.new(options, name, value_.unshift(value), self).run
    end

    desc "unset NAME", "Unsets the value for the given key"
    scope_options
    def unset(name)
      options[:delete] = true
      Base.new(options, name, nil, self).run
    end

    default_task :base

    class Base
      attr_reader :name, :value, :options, :scope, :thor

      def initialize(options, name, value, thor)
        @options = optiogems/gems/bundler-2.4.19/lib/bundler/cli/inject.rb000064400000004167150403133410015371 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/cache.rb000064400000002151150403133400015146 0ustar00   show_pretty_values_for(setting)
            Bundler.ui.confirm ""
          end
        end
      end

      def confirm(name)
        Bundler.ui.confirm "Settings for `#{name}` in order of priority. The top value will be used"
        show_pretty_values_for(name)
      end

      def new_value
        pathname = Pathname.new(value)
        if name.start_with?("local.") && pathname.directory?
          pathname.expand_path.to_s
        else
          value
        end
      end

      def message
        locations = Bundler.settings.locations(name)
        if @options[:parseable]
          "#{name}=#{new_value}" if new_value
        elsif scope == "global"
          if !locations[:local].nil?
            "Your application has set #{name} to #{locations[:local].inspect}. " \
              "This will override the global value you are currently setting"
          elsif locations[:env]
            "You have a bundler environment variable for #{name} set to " \
              "#{locations[:env].inspect}. This will take precedence over the global value you are setting"
          elsif !locations[:global].nil? && locgems/gems/bundler-2.4.19/lib/bundler/cli/config.rb0000644gems/gems/bundler-2.4.19/lib/bundler/cli/lock.rb000064400000004023150403133410015034 0ustar00    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/inject.rb000064400000004167150403133410015371 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Inject
    attr_reader :options, :name, :version, :group, :source, :gems
    def initialize(options, name, version)
      @options = options
      @name = name
      @version = version || last_version_number
      @group = options[:group].split(",") unless options[:group].nil?
      @source = options[:source]
      @gems = []
    end

    def run
      # The required arguments allow Thor to give useful feedback when the arguments
      # are incorrect. This adds those first two arguments onto the list as a whole.
      gems.unshift(source).unshift(group).unshift(version).unshift(name)

      # Build an array of Dependency objects out of the arguments
      deps = []
      # when `inject` support addition of more than one gem, then this loop will
      # help. Currently this loop is running once.
      gems.each_slice(4) do |gem_name, gem_version, gem_group, gem_source|
        ops = Gem::Requirement::OPS.map {|key, _val| key }
        has_op = ops.any? {|op| gem_versiongems/gems/bundler-2.4.19/lib/bundler/cli/add.rb000064400000002736150403133410014645 0ustar00d_to?(:version) && b.version.prerelease? }
      end
      spec = specs.last
      spec.version.to_s
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/lock.rb000064400000004023150403133410015034 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Lock
    attr_reader :options

    def initialize(options)
      @options = options
    end

    def run
      unless Bundler.default_gemfile
        Bundler.ui.error "Unable to find a Gemfile to lock"
        exit 1
      end

      print = options[:print]
      previous_ui_level = Bundler.ui.level
      Bundler.ui.level = "silent" if print

      Bundler::Fetcher.disable_endpoint = options["full-index"]

      updgems/gems/bundler-2.4.19/lib/bundler/cli/install.rb000064400000016702150403133410015561 0ustar00version_promoter(Bundler.definition, options) if options[:update]

      options["remove-platform"].each do |platform|
        definition.remove_platform(platform)
      end

      options["add-platform"].each do |platform_string|
        platform = Gem::Platform.new(platform_string)
        if platform.to_s == "unknown"
          Bundler.ui.warn "The platform `#{platform_string}` is unknown to RubyGems " \
            "and adding it will likely lead to resolution errors"
        end
        definition.add_platform(platform)gems/gems/bundler-2.4.19/lib/bundler/cli/inject.rb000064400000004167150403133410015371 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/add.rb000064400000002736150403133410014645 0ustar00# frozen_string_literal: true

module Bundler
  class CLI::Add
    attr_reader :gems, :options, :version

    def initialize(options, gems)
      @gems = gems
      @options = options
      @options[:group] = options[:group].split(",").map(&:strip) unless options[:group].nil?
      @version = options[:version].split(",").map(&:strip) unless options[:version].nil?
    end

    def run
      validate_options!
      inject_dependencies
      perform_bundle_install unless options["skip-install"]
    end

    private

    def perform_bundle_install
      Installer.install(Bundler.root, Bundler.definition)
      Bundler.load.cache if Bundler.app_cache.exist?
    end

    def inject_dependencies
      dependencies = gems.map {|g| Bundler::Dependency.new(g, version, options) }

      Injector.inject(dependencies,
        :conservative_versioning => options[:version].nil?, # Perform conservative versioning only when version is not specified
        :optimistic => options[:optimistic],
        :strict => options[:strict])
    end

    def validate_options!
      raise InvalidOption, "You can not specify `--strict` and `--optimistic` at the same time." if options[:strict] && options[:optimistic]

      # raise error when no gems are specified
      raise InvalidOption, "Please specify gems to add." if gems.empty?

      version.to_a.each do |v|
        raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN.match?(v.to_s)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/cli/install.rb0000644gems/gems/bundler-2.4.19/lib/bundler/cli/lock.rb000064400000004023150403133410015034 0ustar00

      check_for_options_conflicts

      check_trust_policy

      if options[:deployment] || options[:frozen] || Bundler.frozen_bundle?
        unless Bundler.default_lockfile.exist?
          flag   = "--deployment flag" if options[:deployment]
          flag ||= "--frozen flag"     if options[:frozen]
          flag ||= "deployment setting"
          raise ProductionError, "The #{flag} requires a #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}. Please make " \
                                 "sure you have checked your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} into version control " \
                                 "before deploying."
        end

        options[:local] = true if Bundler.app_cache.exist?

        Bundler.settings.set_command_option :deployment, true if options[:deployment]
        Bundler.settings.set_command_option :frozen, true if options[:frozen]
      end

      # When install is called with --no-deployment, disable deployment mode
      if options[:deployment] == false
        Bundler.settings.set_command_option :frozen, nil
        options[:system] = true
      end

      normalize_settings

      Bundler::Fetcher.disable_endpoint = options["full-index"]

      if options["binstubs"]
        Bundler::SharedHelpers.major_deprecation 2,
          "The --binstubs option will be removed in favor of `bundle binstubs --all`"
      end

      Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?

      definition = Bundler.definition
      definition.validate_runtime!

      installer = Installer.install(Bundler.root, definition, options)

      Bundler.settings.temporary(:cache_all_platforms => options[:local] ? false : Bundler.settings[:cache_all_platforms]) do
        Bundler.load.cache(nil, options[:local]) if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
      end

      Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
      Bundler::CLI::Commgems/gems/bundler-2.4.19/lib/bundler/cli/add.rb000064400000002736150403133410014645 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendored_pub_grub.rb000064400000000143150403133410017027 0ustar00conflicting_groups = Array(options[:without]) & Array(options[:with])
      return if conflicting_ggems/gems/bundler-2.4.19/lib/bundler/plugin/events.rb000064400000004104150403133410016137 0ustar00gems/gems/bundler-2.4.19/lib/bundler/cli/install.rb000064400000016702150403133410015561 0ustar00ut]
      Bundler.settings.set_command_option :with,    options[:with]
    end

    def normalize_settings
      Bundler.settings.set_command_option :path, nil if options[:system]
      Bundler.settings.set_command_option_if_given :path, options[:path]

      if options["standalone"] && Bundler.settings[:path].nil? && !options["local"]
        Bundler.settings.temporary(:path_relative_to_cwd => false) do
          Bundler.settings.set_command_option :path, "bundle"
        end
      end

      bin_option = options["binstubs"]
      bin_option = nil if bin_option&.empty?
      Bundler.settings.set_command_option :bin, bin_option if options["binstubs"]

      Bundler.settings.set_command_option_if_given :shebang, options["shebang"]

      Bundler.settings.set_command_option_if_given :jobs, options["jobs"]

      Bundler.settings.set_command_option_if_given :no_prune, options["no-prune"]

      Bundler.settings.set_command_option_if_given :no_install, options["no-install"]

      Bundler.settings.set_command_option_if_given :clean, options["clean"]

      normalize_groups if options[:without] || options[:with]

      options[:force] = options[:redownload]
    end

    def warn_ambiguous_gems
      # TODO: remove this when we drop Bundler 1.x support
      Installer.ambiguous_gems.to_a.each do |name, installed_from_uri, *also_found_in_uris|
        Bundler.ui.warn "Warning: the gem '#{name}' was found in multiple sources."
        Bundler.ui.warn "Installed from: #{installed_from_uri}"
        Bundler.ui.warn "Also found in:"
        also_found_in_uris.each {|uri| Bundler.ui.warn "gems/gems/bundler-2.4.19/lib/bundler/plugin/dsl.rb000064400000003311150403133410015414 0ustar00# frozen_string_literal: true

module Bundler; end
require_relative "vendor/pub_grub/lib/pub_grub"
gems/gems/bundler-2.4.19/lib/bundler/plugin/events.rb000064400000004104150403133410016137 0ustar00# frozen_string_literal: true

module Bundler
  module Plugin
    module Events
      def self.define(const, event)
        const = const.to_sym.freeze
        if const_defined?(const) && const_get(const) != event
          raise ArgumentError, "Attempting to reassign #{const} to a different value"
        end
        const_set(const, event) unless const_defined?(const)
        @events ||= {}
        @events[event] = const
      end
      private_class_method :define

      def self.reset
        @events.each_value do |const|
          remove_const(const)
        end
        @events = nil
      end
      private_class_method :reset

      # Check if an event has been defined
      # @param event [String]gems/gems/bundler-2.4.19/lib/bundler/plugin/source_list.rb000064400000001501150403133410017164 0ustar00  GEM_AFTER_INSTALL = "after-install"
      define :GEM_AFTER_INSTALL,  "after-install"

      # @!parse
      #   A hook called before any gems install
      #   Includes an Array of Bundler::Dependency objects
      #   GEM_BEFORE_INSTALL_ALL = "before-install-all"
      define :GEM_BEFORE_INSTALL_ALL, "before-install-all"

      # @!parse
      #   A hook called after any gems install
      #   Includes an Array of Bundler::Dependency objects
      #   GEM_AFTER_INSTALL_ALL = "after-install-all"
      define :GEM_AFTER_INSTALL_ALL,  "after-install-all"
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/plugin/installer.rb000064400000007030150403133410016631 0ustar00# frozen_string_literal: true

module Bundler
  module Plugin
    # Dsl to parse the Gemfile looking for plugins to install
    class DSL < Bundler::Dsl
      class PluginGemfileError < PluginError; end
      alias_method :_gem, :gem # To use for plugin installation as gem

      # So that we don't have to override all there methods to dummy ones
      # explicitly.
      # They will be handled by method_missing
      [:gemspec, :gem, :install_if, :platforms, :env].each {|m| undef_method m }

      # This lists the plugins that was added automatically and not specified by
      # the user.
      #
      # When we encounter :type attribute with a source block, we add a plugin
      # by name bundler-source-<type> to list of plugins to be installed.
      #
      # These plugins are optional and are not installed when there is conflict
      # with any other plugin.
      attr_reader :inferred_plugins

      def initialize
        super
        @sourgems/gems/bundler-2.4.19/lib/bundler/vendored_pub_grub.rb000064400000000143150403133410017027 0ustar00"bundler-source-#{options["type"]}"

        return if @dependencies.any? {|d| d.name == plugin_namgems/gems/bundler-2.4.19/lib/bundler/plugin/events.rb000064400000004104150403133410016137 0ustar00# frozen_string_literal: true

module Bundler
  # SourceList object to be used while parsing the Gemfile, setting the
  # approptiate options to be used with Source classes for plugin installation
  module Plugin
    class SourceList < Bundler::SourceList
      def add_git_source(options = {})
        add_source_to_list Plugin::Installer::Git.new(options), git_sources
      end

      def add_rubygems_source(options = {})
        add_source_to_list Plugin::Installer::Rubygems.new(options), @rubygems_sources
      end

      def all_sources
        path_sources + git_sources + rubygems_sources + [metadata_source]
      end

      def default_source
        git_sources.first || global_rubygems_source
      end

      private

      def rubygems_aggregate_class
        Plugin::Installer::Rubygems
      end
    end
  end
end
gems/gems/bundler-2.4.19gems/gems/bundler-2.4.19/lib/bundler/plugin/installer/git.rb000064400000001411150403133420017412 0ustar00ir__)

      def install(names, options)
        check_sources_consigems/gems/bundler-2.4.19/lib/bundler/plugin/dsl.rb000064400000003311150403133410015414 0ustar00gems/gems/bundler-2.4.19/lib/bundler/plugin/installer/rubygems.rb000064400000000446150403133420020473 0ustar00talls the plugin from rubygems source and returns the path where the
      # plugin was installed
      #
      # @param [String] name of the plugin gem to search in the source
      # @param [Array] version of the gem to install
      # @param [String, Array<String>] source(s) to resolve the gems/gems/bundler-2.4.19/lib/bundler/plugin/index.rb000064400000012563150403133420015753 0ustar00inition = Definition.new(nil, deps, source_list, true)

          install_definition(definition)
        end
      end

      # Installs the plugins and deps from the provided specs and returns map of
gems/gems/bundler-2.4.19/lib/bundler/plugin/source_list.rb000064400000001501150403133410017164 0ustar00gems/gems/bundler-2.4.19/lib/bundler/plugin/installer/git.rb000064400000001411150403133420017412 0ustar00# frozen_string_literal: true

module Bundler
  module Plugin
    class Installer
      class Git < Bundler::Source::Git
        def cache_path
          @cache_path ||= begin
            git_scope = "#{base_name}-#{uri_hash}"

            Plugin.cache.join("bundler", "git", git_scope)
          end
        end

       gems/gems/bundler-2.4.19/lib/bundler/plugin/installer.rb000064400000007030150403133410016631 0ustar00gems/gems/bundler-2.4.19/lib/bundler/plugin/installer/rubygems.rb000064400000000446150403133420020473 0ustar00# frozen_string_literal: true

module Bundler
  module Plugin
    class Installer
      class Rubygems < Bundler::Source::Rubygems
        private

        def rubygems_dir
          Plugin.root
        end

        def cache_path
          Plugin.cache
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/plugin/index.rb000064400000012563150403133420015753 0ustar00# frozen_string_literal: true

module Bundler
  # Manages which plugins are installed and their sources. This also is supposed to map
  # which plugin does what (currently the features are not implemented so this class is
  # now a stub class).
  module Plugin
    class Index
      class CommandConflict < PluginError
        def initialize(plugin, commands)
          msg = "Command(s) `#{commands.join("`, `")}` declared by #{plugin} are already registered."
          super msg
        end
      end

      class SourceConflict < PluginError
        def initialize(plugin, sources)
          msg = "Source(s) `#{sources.join("`, `")}` declared by #{plugin} are already registered."
          super msg
        end
      end

      attr_reader :commands

      def initialize
        @plugin_paths = {}
        @commands = {}
        @sources = {}
        @hooks = {}
        @load_paths = {}

        begin
          load_index(global_index_file, true)
        rescue GenericSystemCallError
          # no need to fail when on a read-only FS, for example
          nil
        end
        load_index(local_index_file) if SharedHelpers.in_bundle?
      end

      # This function is to be called when a new plugin is installed. This
      # function shall add the functions of the plugin to existing maps and also
      # the name to source location.
      #
      # @param [String] name of tgems/gems/bundler-2.4.19/lib/bundler/plugin/api.rb000064400000005520150403133420015410 0ustar00s common.empty?
        gems/gems/bundler-2.4.19/lib/bundler/plugin/installer/git.rb000064400000001411150403133420017412 0ustar00ile
        Plugin.local_root.join("index")
      end

      def plugin_path(name)
        Pathname.new @plugin_paths[name]
      end

      def load_paths(name)
        @load_paths[name]
      end

      # Fetch the name of plugin handling the command
      def command_plugin(command)
        @commands[command]
      end

      def installed?(name)
        @plugin_paths[name]
      end

      def installed_plugins
        @plugin_paths.keys
      end

      def plugin_commands(plugin)
        @commands.find_all {|_, n| n == plugin }.map(&:first)
      end

      def source?(source)
        @sources.key? source
      end

      def source_plugin(name)
        @sources[name]
      end

      # Returns the list of plugin names handling the passed event
      def hook_pgems/gems/bundler-2.4.19/lib/bundler/plugin/installer/rubygems.rb000064400000000446150403133420020473 0ustar00      @load_paths.merge!(index["load_paths"])
          @plugin_paths.merge!(index["plugin_paths"])
          @sources.merge!(index["sources"]) unless global
        end
      end

      # Should be called when any of the instance variables change. Stores the
      # instance variables in YAMLgems/gems/bundler-2.4.19/lib/bundler/plugin/api/source.rb000064400000027262150403133420016717 0ustar00gems/gems/bundler-2.4.19/lib/bundler/plugin/api.rb000064400000005520150403133420015410 0ustar00# frozen_string_literal: true

module Bundler
  # This is the interfacing class represents the API that we intend to provide
  # the plugins to use.
  #
  # For plugins to be independent of the Bundler internals they shall limit their
  # interactions to methods of this class only. This will save them from breaking
  # when some internal change.
  #
  # Currently we are delegating the methods defined in Bundler class to
  # itself. So, this class acts as a buffer.
  #
  # If there is some change in the Bundler class that is incompatible to its
  # previous behavior or if otherwise desired, we can reimplement(or implement)
  # the method to preserve compatibility.
  #
  # To use this, either the class can inherit this class or use it directly.
  # For example of both types of use, refer the file `spec/plugins/command.rb`
  #
  # To use it without inheriting, you will have to create an object of this
  # to use the functions (except for declaration functions like command, source,
  # and hooks).
  module Plugin
    class API
      autoload :Source, File.expand_path("api/source", __dir__)

      # The plugins should declare that they handle a command through this helper.
      #
      # @param [String] command being handled by them
      # @param [Class] (optional) class that handles the command. If not
      #                 provided, the `self` class will be used.
      def self.command(command, cls = self)
        Plugin.add_command command, cls
      end

      # The plugins should declare that they provide a installation source
      # through this helper.
      #
      # @param [String] the source type they provide
      # @param [Class] (optional) class that handles the source. If not
      #                 provided, the `self` class will be used.
      def self.source(source, cls = self)
        cls.send :include, Bundler::Plugin::API::Source
        Plugin.add_source source, cls
      end

      def self.hook(event, &block)
        Plugin.add_hook(event, &block)
      end

      # The cache dir to be used by the plugins for storage
      #
      # @return [Pathname] path of the cache dir
      def cache_dir
        Plugin.cache.join("plugins")
      end

      # A tmp dir to be used by plugins
      # Accepts names that get concatenated as suffix
      #
      # @return [Pathname] object for the new directory created
      def tmp(*names)
        Bundler.tmp(["plugin", *names].join("-"))
      end

      def method_missing(name, *args, &blk)
        return Bundler.send(name, *args, &blk) if Bundler.respond_to?(name)

        return SharedHelpers.send(name, *args, &blk) if SharedHelpers.respond_to?(name)

        super
      end

      def respond_to_missing?(name, include_private = false)
        SharedHelpers.respond_to?(name, include_private) ||
          Bundler.respond_to?(name, include_private) || super
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/plugin/api/source.rb000064400000027262150403133420016717 0ustar00# frozen_string_literal: true

module Bundler
  module Plugin
    class API
      # This class provides the base to build source plugins
      # All the method here are required to build a source plugin (except
      # `uri_hash`, `gem_install_dir`; they are helpers).
      #
      # Defaults for methods, where ever possible are provided which is
      # expected to work. But, all source plugins have to override
      # `fetch_gemspec_files` and `install`. Defaults are also not provided for
      # `remote!`, `cache!` and `unlock!`.
      #
      # The defaults shall work for most situations but nevertheless they can
      # be (preferably should be) overridden as per the plugins' needs safely
      # (as long as they behave as expected).
      # On overriding `initialize` you should call super first.
      #
      # If required plugin should override `hash`, `==` and `eql?` methods to be
      # able to match objects representing same sources, but may be created in
      # different situation (like form gemfile and lockfile). The default ones
      # checks only for class and uri, but elaborate source plugins may need
      # more comparisons (e.g. git checking on branch or tag).
      #
      # @!attribute [r] uri
      #   @return [String] the remote specified with `source` block in Gemfile
      #
      # @!attribute [r] options
      #   @return [String] options passegems/gems/bundler-2.4.19/lib/bundler/plugin/api.rb000064400000005520150403133420015410 0ustar00pts
          @dependency_names = []
          @uri = opts["uri"]
          @type = opts["type"]
          @name = opts["name"] || "#{@type} at #{@uri}"
        end

        # This is used by the default `spec` method to constructs the
        # Specification objects for the gems and versions that can be installed
        # by this source plugin.
        #
        # Note: If the spec method is overridden, this function is not necessary
        #
        # @return [Array<String>] paths of the gemspec files for gems that can
        #                         be installed
        def fetch_gemspec_files
          []
        end

        # Options to be saved in the lockfile so that the source plugin is able
        # to check out same version of gem later.
        #
        # There options are passed when the source plugin is created from the
        # lock file.
        #
        # @return [Hash]
        def options_to_lock
          {}
        end

        # Install the gem specified by the spec at appropriate path.
        # `install_path` provides a sufficient default, if the source can only
        # satisfy one gem,  but is not binding.
        #
        # @return [String] post installation message (if any)
        def install(spec, opts)
          raise MalformattedPlugin, "Source plugins need to override the install method."
        end

        # It builds extensions, generates bins and installs them for the spec
        # provided.
        #
        # It depends on `spec.loaded_from` to get full_gem_path. The source
        # plugins should set that.
        #
        # It should be called in `install` after the plugin is done placing the
        # gem at correct install location.
        #
        # It also runs Gem hooks `pre_install`, `post_build` and `post_install`
        #
        # Note: Do not override if you don't know what you are doing.
        def post_install(spec, disable_exts = false)
          opts = { :env_shebang => false, :disable_extensions => disable_exts }
          installer = Bundler::Source::Path::Installer.new(spec, opts)
          installer.post_install
        end

        # A default installation path to install a single gem. If the source
        # servers multiple gems, it's not of much use and the source should one
        # of its own.
        def install_path
          @install_path ||=
            begin
              base_name = File.basename(Bundler::URI.parse(uri).normalize.path)

              gem_install_dir.join("#{base_name}-#{uri_hash[0..11]}")
            end
        end

        # Parses the gemspec files to find the specs for the gems that can be
        # satisfied by the source.
        #
        # Few important points to keep in mind:
        #   - If the gems are not installed then it shall return specs for all
        #   the gems it can satisfy
        #   - If gem is installed (that is gems/gems/bundler-2.4.19/lib/bundler/plugin/api/source.rb000064400000027262150403133420016717 0ustar00end
        end

        # Set internal representation to fetch the gems/specs locally.
        #
        # When this is called, the source should try to fetch the specs and
        # install from the local system.
        def local!
        end

        # Set internal representation to fetch the gems/specs from remote.
        #
        # When this is called, the source should try to fetch the specs and
        # install from remote path.
        def remote!
        end

        # Set internal representation to fetch the gems/specs from app cache.
        #
        # When this is called, the source should try to fetch the specs and
        # install from the path provided by `app_cache_path`.
        def cached!
        end

        # This is called to update the spec and installation.
        #
        # If the source plugin is loaded from lockfile or otherwise, it shall
        # refresh the cache/specs (e.g. git sources can make a fresh clone).
        def unlock!
        end

        # Name of directory where plugin the is expected to cache the gems when
        # #cache is called.
        #
        # Also this name is matched against the directories in cache for pruning
        #
        # This is used by `app_cache_path`
        def app_cache_dirname
          base_name = File.basename(Bundler::URI.parse(uri).normalize.path)
          "#{base_name}-#{uri_hash}"
        end

        # This method is called while caching to save copy of the gems that the
        # source can resolve to path provided by `app_cache_app`so that they can
        # be reinstalled from the cache without querying the remote (i.e. an
        # alternative to remote)
        #
        # This is stored with the app and source plugins should try to provide
        # specs and install only from this cache when `cached!` is called.
        #
        # This cache is different from the internal caching that can be done
        # at sub paths of `cache_path` (from API). This can be though as caching
        # by bundler.
        def cache(spec, custom_path = nil)
          new_cache_path = app_cache_path(custom_path)

          FileUtils.rm_rf(new_cache_path)
          FileUtils.cp_r(install_path, new_cache_path)
 gems/gems/bundler-2.4.19/lib/bundler/settings/validator.rb000064400000006054150403133420017171 0ustar00ned in
        # docstring for `==` method.
        alias_method :eql?, :==

        # When overriding `hash` please preserve the behaviour as mentioned in
        # docstring for `==` method, i.e. two methods equal by above comparison
        # should have same hash.
        def hash
          [self.class, uri].hash
        end

        # A helper method, not necessary if not used internally.
        def installed?
          File.directory?(install_path)
        end

        # The full path where the plugin should cache the gem so that it can be
        # installed latter.
        #
        # Note: Do not override if you don't know what you are doing.
        def app_cache_path(custom_path = nil)
          @app_cache_path ||= Bundler.app_cache(custom_path).join(app_cache_dirname)
        end

        # Used by definition.
        #
        # Note: Do not override if you don't know what you are doing.
        def unmet_deps
          specs.unmet_dependency_names
        end

        # Used by definition.
        #
        # Note: Do not override if you don't know what you are doing.
        def spec_names
          specs.spec_names
        end

        # Used by definition.
        #
        # Note: Do not override if you don't know what you are doing.
        def add_dependency_names(names)
          @dependencies |= Array(names)
        end

        # NOTE: Do not override if you don't know what you are doing.
        def can_lock?(spec)
          spec.source == self
        end

        # Generates the content to be entered into the lockfile.
        # Saves type and remote and also calls to `options_to_lock`.
        #
        # Plugin should use `options_to_lock` to save information in lockfile
        # and not override this.
        #
        # Note: Do not override if you don't know what you are doing.
        def to_lock
          out = String.new("#{LockfileParser::PLUGIN}\n")
          out << "  remote: #{@uri}\n"
          out << "  type: #{@type}\n"
          options_to_lock.each do |opt, value|
            out << "  #{opt}: #{value}\n"
          end
          out << "  specs:\n"
        end

        def to_s
          "plugin source for #{@type} with uri #{@uri}"
        end
        alias_method :identifier, :to_s

        # NOTE: Do not override if you don't know what you are doing.
        def include?(other)
          other == self
        end

        def uri_hash
          SharedHelpers.digest(:SHA1).hexdigest(uri)
        end

        # NOTE: Do not override if you don't know what you are doing.
        def gem_install_dir
          Bundler.install_path
        end

        # It is used to obtain the full_gem_path.
        #
        # spec's loaded_from path is expanded against this to get full_gem_path
        #
        # Note: Do not override if you don't know what you are doing.
        def root
          Bundler.root
        end

        # @private
        # This API on source might not be stable, and for now we expect plugins
        # to download all specs in `#specs`, so we implement the method for
        # compatibility purposes angems/gems/bundler-2.4.19/lib/bundler/env.rb000064400000012012150403133420014123 0ustar00# frozen_string_literal: true

module Bundler
  class Settings
    class Validator
      class Rule
        attr_reader :description

        def initialize(keys, description, &validate)
          @keys = keys
          @description = description
          @validate = validate
        end

        def validate!(key, value, settings)
          instance_exec(key, value, settings, &@validate)
        end

        def fail!(key, value, *reasons)
          reasons.unshift @description
          raise InvalidOption, "Setting `#{key}` to #{value.inspect} failed:\n#{reasons.map {|r| " - #{r}" }.join("\n")}"
        end

        def set(settings, key, value, *reasons)
          hash_key = k(key)
          return if settings[hash_key] == value
          reasons.unshift @description
          Bundler.ui.info "Setting `#{key}` to #{value.inspect}, since #{reasons.join(", ")}"
          if value.nil?
            settings.delete(hash_key)
          else
            settings[hash_key] = value
          end
        end

        def k(key)
          Bundler.settings.key_for(key)
        end
      end

      def self.rules
        @rules ||= Hash.new {|h, k| h[k] = [] }
      end
      private_class_method :rules

      def self.rule(keys, description, &blk)
        rule = Rule.new(keys, description, &blk)
        keys.each {|k| rules[k] << rule }
      end
      private_class_method :rule

      def self.validate!(key, value, settings)
        rules_to_validate = rules[key]
        rules_to_validate.each {|rule| rule.validate!(key, value, settings) }
      end

      rule %w[path path.system], "path and path.system are mutually exclusive" do |key, value, settings|
        if key == "path" && value
          set(settings, "path.system", nil)
        elsif key == "path.system" && value
          set(settings, :path, nil)
        end
      end

      rule %w[with without], "a group cannot be in both `with` & `without` simultaneously" do |key, value, settings|
        with = settings.fetch(k(:with), "").split(":").map(&:to_sym)
        without = settings.fetch(k(:without), "").split(":").map(&:to_sym)

        other_key = key == "with" ? :without : :with
        other_setting = key == "with" ? without : with

        conflicting = with & without
        if conflicting.any?
          fail!(key, value, "`#{other_key}` is current set to #{other_setting.inspect}", "the `#{conflicting.join("`, `")}` groups conflict")
        end
      end

      rule %w[path], "relative paths are expanded relative to the current working directory" do |key, value, settings|
        next if value.nil?

        path = Pathname.new(value)
        next if !path.relative? || !Bundler.feature_flag.path_relative_to_cwd?

        path = path.expand_path

        root = begin
                 Bundler.root
               rescue GemfileNotFound
                 Pathname.pwd.expand_path
               end

        path = begin
                 path.relative_path_from(root)
               rescue ArgumentError
                 path
               end

        set(settings, key, path.to_s)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/env.rb000064400000012012150403133420014123 0ustar00# frozen_string_literal: true

require_relative "rubygems_integration"
require_relative "source/git/git_proxy"

module Bundler
  class Env
    def self.write(io)
      io.write report
    end

    def self.report(options = {})
      print_gemfile = options.delete(:print_gemfile) { true }
      print_gemspecs = options.delete(:print_gemspecs) { true }

      out = String.new
      append_formatted_table("Environment", environment, out)
      append_formatted_table("Bundler Build Metadata", BuildMetadata.to_h, out)

      unless Bundler.settings.all.empty?
        out << "\n## Bundler settings\n\n```\n"
        Bundler.settings.all.each do |setting|
          out << setting << "\n"
 gems/gems/gems/gems/bundler-2.4.19/lib/bundler/rubygems_integration.rb000064400000037511150403133420017606 0ustar00Error => e
      "#{e.class}: #{e.message}"
    end

    def self.ruby_version
      str = String.new(RUBY_VERSION)
      str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
      str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{Gem::Platform.local}]"
    end

    def self.git_version
      Bundler::Source::Git::GitProxy.new(nil, nil).full_version
    rescue Bundler::Source::Git::GitNotInstalledError
      "not installed"
    end

    def self.version_of(script)
      return "not installed" unless Bundler.which(script)
      `#{script} --version`.chomp
    end

    def self.chruby_version
      return "not installed" unless Bundler.which("chruby-exec")
      `chruby-exec -- chruby --version`.
        sub(/.*^chruby: (#{Gem::Version::VERSION_PATTERN}).*/m, '\1')
    end

    def self.environment
      out = []

      out << ["Bundler", Bundler::VERSION]
      out << ["  Platforms", Gem.platforms.join(", ")]
      out << ["Ruby", ruby_version]
      out << ["  Full Path", Gem.ruby]
      out << ["  Config Dir", Pathname.new(Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE).dirname]
      out << ["RubyGems", Gem::VERSION]
      out << ["  Gem Home", Gem.dir]
      out << ["  Gem Path", Gem.path.join(File::PATH_SEPARATOR)]
      out << ["  User Home", Gem.user_home]
      out << ["  User Path", Gem.user_dir]
      out << ["  Bin Dir", Gem.bindir]
      if defined?(OpenSSL::SSL)
        out << ["OpenSSL"]
        out << ["  Compiled", OpenSSL::OPENSSL_VERSION] if defined?(OpenSSL::OPENSSL_VERSION)
        out << ["  Loaded", OpenSSL::OPENSSL_LIBRARY_VERSION] if defined?(OpenSSL::OPENSSL_LIBRARY_VERSION)
        out << ["  Cert File", OpenSSL::X509::DEFAULT_CERT_FILE] if defined?(OpenSSL::X509::DEFAULT_CERT_FILE)
        out << ["  Cert Dir", OpenSSL::X509::DEFAULT_CERT_DIR] if defined?(OpenSSL::X509::DEFAULT_CERT_DIR)
      end
      out << ["Tools"]
      out << ["  Git", git_version]
      out << ["  RVM", ENV.fetch("rvm_version") { version_of("rvm") }]
      out << ["  rbenv", version_of("rbenv")]
      out << ["  chruby", chruby_version]

      %w[rubygems-bundler open_gem].each do |name|
        specs = Bundler.rubygems.find_name(name)
        out << ["  #{name}", "(#{specs.map(&:version).join(",")})"] unless specs.empty?
      end
      if (exe = caller.last.split(":").first)&.match? %r{(exe|bin)/bundler?\z}
        shebang = File.read(exe).lines.first
        shebang.sub!(/^#!\s*/, "")
        unless shebang.start_with?(Gem.ruby, "/usr/bin/env ruby")
          out << ["Gem.ruby", Gem.ruby]
          out << ["bundle #!", shebang]
        end
      gems/gems/bundler-2.4.19/lib/bundler/env.rb000064400000012012150403133420014123 0ustar00gems/gems/bundler-2.4.19/lib/bundler/rubygems_integration.rb000064400000037511150403133420017606 0ustar00# frozen_string_literal: true

require "rubygems" unless defined?(Gem)

module Bundler
  class RubygemsIntegration
    if defined?(Gem::Ext::Builder::CHDIR_MONITOR)
      EXT_LOCK = Gem::Ext::Builder::CHDIR_MONITOR
    else
      require "monitor"

      EXT_LOCK = Monitor.new
    end

    def initialize
      @replaced_methods = {}
      backport_ext_builder_monitor
    end

    def version
      @version ||= Gem.rubygems_version
    end

    def provides?(req_str)
      Gem::Requirement.new(req_str).satisfied_by?(version)
    end

    def supports_bundler_trampolining?
      provides?(">= 3.3.0.a")
    end

    def build_args
      require "rubygems/command"
      Gem::Command.build_args
    end

    def build_args=(args)
      require "rubygems/command"
      Gem::Command.build_args = args
    end

    def loaded_specs(name)
      Gem.loaded_specs[name]
    end

    def add_to_load_path(paths)
      return Gem.add_to_load_path(*paths) if Gem.respond_to?(:add_to_load_path)

      if insert_index = Gem.load_path_insert_index
        # Gem directories must come after -I and ENV['RUBYLIB']
        $LOAD_PATH.insert(insert_index, *paths)
      else
        # We are probably testing in core, -I and RUBYLIB don't apply
        $LOAD_PATH.unshift(*paths)
      end
    end

    def mark_loaded(spec)
      if spec.respond_to?(:activated=)
        current = Gem.loaded_specs[spec.name]
        current.activated = false if current
        spec.activated = true
      end
      Gem.loaded_specs[spec.name] = spec
    end

    def validate(spec)
      Bundler.ui.silence { spec.validate(false) }
    rescue Gem::InvalidSpecificationException => e
      error_message = "The gemspec at #{spec.loaded_from} is not valid. Please fix this gemspec.\n" \
        "The validation error was '#{e.message}'\n"
      raise Gem::InvalidSpecificationException.new(error_message)
    rescue Errno::ENOENT
      nil
    end

    def set_installed_by_version(spec, installed_by_version = Gem::VERSION)
      return unless spec.respond_to?(:installed_by_version=)
      spec.installed_by_version = Gem::Version.create(installed_by_version)
    end

    def spec_missing_extensions?(spec, default = true)
      return spec.missing_extensions? if spec.respond_to?(:missing_extensions?)

      return false if spec.default_gem?
      return false if spec.extensions.empty?

      default
    end

    def spec_matches_for_glob(spec, glob)
      return spec.matches_for_glob(glob) if spec.respond_to?(:matches_for_glob)

      spec.load_paths.map do |lp|
        Dir["#{lp}/#{glob}#{suffix_pattern}"]
      end.flatten(1)
    end

    def stub_set_spec(stub, spec)
      stub.instance_variable_set(:@spec, spec)
    end

    def path(obj)
      obj.to_s
    end

    def ruby_engine
      Gem.ruby_engine
    end

    def read_binary(path)
      Gem.read_binary(path)
    end

    def inflate(obj)
      Gem::Util.inflate(obj)
    end

    def correct_for_windows_path(path)
      if Gem::Util.respond_to?(:correct_for_windows_path)
        Gem::Util.correct_for_windows_path(path)
      elsif path[0].chr == "/" && path[1].chr =~ /[a-z]/i && path[2].chr == ":"
        path[1..-1]
      else
        path
      end
    end

    def gem_dir
      Gem.dir
    end

    def gem_bindir
      Gem.bindir
    end

    def user_home
      Gem.user_home
    end

    def gem_path
      Gem.path
    end

    def reset
      Gem::Specification.reset
    end

    def post_reset_hooks
      Gem.post_reset_hooks
    end

    def suffix_pattern
      Gem.suffix_pattern
    end

    def gem_cache
      gem_path.map {|p| File.expand_path("cache", p) }
    end

    def spec_cache_dirs
      @spec_cache_dirs ||= begin
        dirs = gem_path.map {|dir| File.join(dir, "specifications") }
        dirs << Gem.spec_cache_dir if Gem.respond_to?(:spec_cache_dir) # Not in RubyGems 2.0.3 or earlier
        dirs.uniq.select {|dir| File.directory? dir }
      end
    end

    def marshal_spec_dir
      Gem::MARSHAL_SPEC_DIR
    end

    def clear_paths
      Gem.clear_paths
    end

    def bin_path(gem, bin, ver)
      Gem.bin_path(gem, bin, ver)
    end

    def loaded_gem_paths
      loaded_gem_paths = Gem.loaded_specs.map {|_, s| s.full_require_paths }
      loaded_gem_paths.flatten
    end

    def load_plugins
      Gem.load_plugins if Gem.respond_to?(:load_plugins)
    end

    def load_plugin_files(files)
      Gem.load_plugin_files(files) if Gem.respond_to?(:load_plugin_files)
    end

    def load_env_plugins
      Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
    end

    def ui=(obj)
      Gem::DefaultUsgems/gems/bundler-2.4.19/lib/bundler/rubygems_integration.rb000064400000037511150403133420017606 0ustar00  def replace_gem(specs, specs_by_name)
      reverse_rubygems_kernel_mixin

      executables = nil

      kernel = (class << ::Kernel; self; end)
      [kernel, ::Kernel].each do |kernel_class|
        redefine_method(kernel_class, :gem) do |dep, *reqs|
          if executables&.include?(File.basename(caller.first.split(":").first))
            break
          end

          reqs.pop if reqs.last.is_a?(Hash)

          unless dep.respond_to?(:name) && dep.respond_to?(:requirement)
            dep = Gem::Dependency.new(dep, reqs)
          end

          if spec = specs_by_name[dep.name]
            return true if dep.matches_spec?(spec)
          end

          message = if spec.nil?
            target_file = begin
                            Bundler.default_gemfile.basename
                          rescue GemfileNotFound
                            "inline Gemfile"
                          end
            "#{dep.name} is not part of the bundle." \
            " Add it to your #{target_file}."
          else
            "can't activate #{dep}, already activated #{spec.full_name}. " \
            "Make sure all dependencies are added to Gemfile."
          end

          e = Gem::LoadError.new(message)
          e.name = dep.name
          e.requirement = dep.requirement
          raise e
        end

        # backwards compatibility shim, see https://github.com/rubygems/bundler/issues/5102
        kernel_class.send(:public, :gem) if Bundler.feature_flag.setup_makes_kernel_gem_public?
      end
    end

    # Used to make bin stubs that are not created by bundler work
    # under bundler. The new Gem.bin_path only considers gems in
    # +specs+
    def replace_bin_path(specs_by_name)
      gem_class = (class << Gem; self; end)

      redefine_method(gem_class, :find_spec_for_exe) do |gem_name, *args|
        exec_name = args.first
        raise ArgumentError, "you must supply exec_name" unless exec_name

        spec_with_name = specs_by_name[gem_name]
        matching_specs_by_exec_name = specs_by_name.values.select {|s| s.executables.include?(exec_name) }
        spec = matching_specs_by_exec_name.delete(spec_with_name)

        unless spec || !matching_specs_by_exec_name.empty?
          message = "can't find executable #{exec_name} for gem #{gem_name}"
          if spec_with_name.nil?
            message += ". #{gem_name} is not currently included in the bundle, " \
                       "perhaps you meant to add it to your #{Bundler.default_gemfile.basename}?"
          end
          raise Gem::Exception, message
        end

        unless spec
          spec = matching_specs_by_exec_name.shift
          warn \
            "Bundler is using a binstub that was created for a different gem (#{spec.name}).\n" \
            "You should run `bundle binstub #{gem_name}` " \
            "to work around a system/bundle conflict."
        end

        unless matching_specs_by_exec_name.empty?
          conflicting_names = matching_specs_by_exec_name.map(&:name).join(", ")
          warn \
            "The `#{exec_name}` executable in the `#{spec.name}` gem is being loaded, but it's also present in other gems (#{conflicting_names}).\n" \
            "If you meant to run the executable for another gem, make sure you use a project specific binstub (`bundle binstub <gem_name>`).\n" \
            "If you plan to use multiple conflicting executables, generate binstubs for them and disambiguate their names."
        end

        spec
      end

      redefine_method(gem_class, :activate_bin_path) do |name, *args|
        exec_name = args.first
        return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"

        # Copy of Rubygems activate_bin_path impl
        requirement = args.last
        spec = find_spec_for_exe name, exec_name, [requirement]

        gem_bin = File.join(spec.full_gem_path, spec.bindir, exec_name)
        gem_from_path_bin = File.join(File.dirname(spec.loaded_from), spec.bindir, exec_name)
        File.exist?(gem_bin) ? gem_bin : gem_from_path_bin
      end

      redefine_method(gem_class, :bin_path) do |name, *args|
        exec_name = args.first
        return ENV["BUNDLE_BIN_PATH"] if exec_name == "bundle"

        spec = find_spec_for_exe(name, *args)
        exec_name ||= spec.default_executable

        gem_bin = File.join(spec.full_gem_path, spec.bindir, exec_name)
        gem_from_path_bin = File.join(File.dirname(spec.loaded_from), spec.bindir, exec_name)
        File.exist?(gem_bin) ? gem_bin : gem_from_path_bin
      end
    end

    # Replace or hook into RubyGems to provide a bundlerized view
    # of the world.
    def replace_entrypoints(specs)
      specs_by_name = add_default_gems_to(specs)

      replace_gem(specs, specs_by_name)
      stub_rubygems(specs)
      replace_bin_path(specs_by_name)

      Gem.clear_paths
    end

    # Add default gems not already present in specs, and return them as a hash.
    def add_default_gems_to(specs)
      specs_by_name = specs.reduce({}) do |h, s|
        h[s.name] = s
        h
      end

      Bundler.rubygems.default_stubs.each do |stub|
        default_spec = stub.to_spec
        default_spec_name = default_spec.name
        next if specs_by_name.key?(default_spec_name)

        specs << default_spec
        specs_by_name[default_spec_name] = default_spec
      end

      specs_by_name
    end

    def undo_replacements
      @replaced_methods.each do |(sym, klass), method|
        redefine_method(klass, sym, method)
      end
      if Binding.public_method_defined?(:source_location)
        post_reset_hooks.reject! {|proc| proc.binding.source_location[0] == __FILE__ }
      else
        post_reset_hooks.reject! {|proc| proc.binding.eval("__FILE__") == __FILE__ }
      end
      @replaced_methods.clear
    end

    def redefine_method(klass, method, unbound_method = nil, &block)
      visibility = method_visibility(klass, method)
      begin
        if (instance_method = klass.instance_method(method)) && method != :initialize
          # doing this to ensure we also get private methods
          klass.send(:remove_method, method)
        end
      rescue NameError
        # method isn't defined
        nil
      end
      @replaced_methods[[method, klass]] = instance_method
      if unbound_method
        klass.send(:define_method, method, unbound_method)
        klass.send(visibility, method)
      elsif block
        klass.send(:define_method, method, &block)
        klgems/gems/bundler-2.4.19/lib/bundler/vlad.rb000064400000000724150403133420014270 0ustar00"rubygems/remote_fetcher"
      path = remote.uri.to_s + "#{name}.#{Gem.marshal_version}.gz"
      fetcher = gem_remote_fetcher
      fetcher.headers = { "X-Gemfile-Source" => remote.original_uri.to_s } if remote.original_uri
      string = fetcher.fetch_path(path)
      Bundler.safe_load_marshal(string)
    rescue Gem::RemoteFetcher::FetchError
      # it's okay for prerelease to fail
      raise unless name == "prerelease_specs"
    end

    def fetch_all_remotegems/gems/bundler-2.4.19/lib/bundler/cli.rb000064400000122002150403133420014103 0ustar00.join cache_dir, gem_file_name
        return if File.exist? local_gem_path

        begin
          remote_gem_path = uri + "gems/#{gem_file_name}"
          remote_gem_path = remote_gem_path.to_s if provides?("< 3.2.0.rc.1")

          SharedHelpers.filesystem_access(local_gem_path) do
            fetcher.cache_update_path remote_gem_path, local_gem_path
          end
        rescue Gem::RemoteFetcher::FetchError
          raise if spec.original_platform == spec.platform

          original_gem_file_name = "#{spec.original_name}.gem"
          raise if gem_file_name == original_gem_file_name

          gem_file_name = original_gem_file_name
          retry
        end
      end
    rescue Gem::RemoteFetcher::FetchError => e
      raise Bundler::HTTPError, "Could not download gem from #{uri} due to underlying error <#{e.message}>"
    end

    def gem_remote_fetcher
      require "rubygems/remote_fetcher"
      proxy = Gem.configuration[:http_proxy]
      Gem::RemoteFetcher.new(proxy)
    end

    def build(spec, skip_validation = false)
      require "rubygems/package"
      Gem::Package.build(spec, skip_validation)
    end

    def path_separator
      Gem.path_separator
    end

    def all_specs
      Gem::Specification.stubs.map do |stub|
        StubSpecification.from_stub(stub)
      end
    end

    def backport_ext_builder_monitor
      # So we can avoid requiring "rubygems/ext" in its entirety
      Gem.module_eval <<-RUBY, __FILE__, __LINE__ + 1
        module Ext
        end
      RUBY

      require "rubygems/ext/builder"

      Gem::Ext::Builder.class_eval do
        unless const_defined?(:CHDIR_MONITOR)
          const_set(:CHDIR_MONITOR, EXT_LOCK)
        end

        remove_const(:CHDIR_MUTEX) if const_defined?(:CHDIR_MUTEX)
        const_set(:CHDIR_MUTEX, const_get(:CHDIR_MONITOR))
      end
    end

    def find_bundler(version)
      find_name("bundler").find {|s| s.version.to_s == version }
    end

    def find_name(name)
      Gem::Specification.stubs_for(name).map(&:to_spec)
    end

    if Gem::Specification.respond_to?(:default_stubs)
      def default_stubs
        Gem::Specification.default_stubs("*.gemspec")
      end
    else
      def default_stubs
        Gem::Specification.send(:default_stubs, "*.gemspec")
      end
    end
  end

  def self.rubygems
    @rubygems ||= RubygemsIntegration.new
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vlad.rb000064400000000724150403133420014270 0ustar00# frozen_string_literal: true

require_relative "shared_helpers"
Bundler::SharedHelpers.major_deprecation 2,
  "The Bundler task for Vlad"

# Vlad task for Bundler.
#
# Add "require 'bundler/vlad'" in your Vlad deploy.rb, and
# include the vlad:bundle:install task in your vlad:deploy task.
require_relative "deployment"

include Rake::DSL if defined? Rake::DSL

namespace :vlad do
  Bundler::Deployment.define_task(Rake::RemoteTask, :remote_task, :roles => :app)
end
gems/gems/bundler-2.4.19/lib/bundler/cli.rb000064400000122002150403133420014103 0ustar00# frozen_string_literal: true

require_relative "vendored_thor"

module Bundler
  class CLI < Thor
    require_relative "cli/common"

    package_name "Bundler"

    AUTO_INSTALL_CMDS = %w[show binstubs outdated exec open console licenses clean].freeze
    PARSEABLE_COMMANDS = %w[check config help exec platform show version].freeze
    EXTENSIONS = ["c", "rust"].freeze

    COMMAND_ALIASES = {
      "check" => "c",
      "install" => "i",
      "plugin" => "",
      "list" => "ls",
      "exec" => ["e", "ex", "exe"],
      "cache" => ["package", "pack"],
      "version" => ["-v", "--version"],
    }.freeze

    def self.start(*)
      check_deprecated_ext_option(ARGV) if ARGV.include?("--ext")

      super
    ensure
      Bundler::SharedHelpers.print_major_deprecations!
    end

    def self.dispatch(*)
      super do |i|
        i.send(:print_command)
        i.send(:warn_on_outdated_bundler)
      end
    end

    def self.all_aliases
      @all_aliases ||= begin
                         command_aliases = {}

                         COMMAND_ALIASES.each do |name, aliases|
                           Array(aliases).each do |one_alias|
                             command_aliases[one_alias] = name
                           end
                         end

                         command_aliases
                       end
    end

    def self.aliases_for(command_name)
      COMMAND_ALIASES.select {|k, _| k == command_name }.invert
    end

    def initialize(*args)
      super

      custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
      if custom_gemfile && !custom_gemfile.empty?
        Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", File.expand_path(custom_gemfile)
        Bundler.reset_settings_and_root!
      end

      Bundler.self_manager.restart_with_locked_bundler_if_needed

      Bundler.settings.set_command_option_if_given :retry, options[:retry]

      current_cmd = args.last[:current_command].name
      auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
    rescue UnknownArgumentError => e
      raise InvalidOption, e.message
    ensure
      self.options ||= {}
      unprinted_warnings = Bundler.ui.unprinted_warnings
      Bundler.ui = UI::Shell.new(options)
      Bundler.ui.level = "debug" if options["verbose"]
      unprinted_warnings.each {|w| Bundler.ui.warn(w) }
    end

    check_unknown_options!(:except => [:config, :exec])
    stop_on_unknown_option! :exec

    desc "cli_help", "Prints a summary of bundler commands", :hide => true
    def cli_help
      version
      Bundler.ui.info "\n"

      primary_commands = ["install", "update", "cache", "exec", "config", "help"]

      list = self.class.printable_commands(true)
      by_name = list.group_by {|name, _message| name.match(/^bundle (\w+)/)[1] }
      utilities = by_name.keys.sort - primary_commands
      primary_commands.map! {|name| (by_name[name] || raise("no primary command #{name}")).first }
      utilities.map! {|name| by_name[name].first }

      shell.say "Bundler commands:\n\n"

      shell.say "  Primary commands:\n"
      shell.print_table(primary_commands, :indent => 4, :truncate => true)
      shell.say
      shell.say "  Utilities:\n"
      shell.print_table(utilities, :indent => 4, :truncate => true)
      shell.say
      self.class.send(:class_options_help, shell)
    end
    default_task(Bundler.feature_flag.default_cli_command)

    class_option "no-color", :type => :boolean, :desc => "Disable colorization in output"
    class_option "retry",    :type => :numeric, :aliases => "-r", :banner => "NUM",
                             :desc => "Specify the number of times you wish to attempt network commands"
    class_option "verbose", :type => :boolean, :desc => "Enable verbose output mode", :aliases => "-V"

    def help(cli = nil)
      case cli
      when "gemfile" then command = "gemfile"
      when nil       then command = "gems/gems/bundler-2.4.19/lib/bundler/vlad.rb000064400000000724150403133420014270 0ustar00    def self.handle_no_command_error(command, has_namespace = $thor_runner)
      if Bundler.feature_flag.plugins? && Bundler::Plugin.command?(command)
        return Bundler::Plugin.exec_command(command, ARGV[1..-1])
      end

      return super unless command_path = Bundler.which("bundler-#{command}")

      Kernel.exec(command_path, *ARGV[1..-1])
    end

    desc "init [OPTIONS]", "Generates a Gemfile into the current working directory"
    long_desc <<-D
   gems/gems/bundler-2.4.19/lib/bundler/cli.rb000064400000122002150403133420014103 0ustar00run
    end

    desc "check [OPTIONS]", "Checks if the dependencies listed in Gemfile are satisfied by currently installed gems"
    long_desc <<-D
      Check searches the local machine for each of the gems requested in the Gemfile. If
      all gems are found, Bundler prints a success message and exits with a status of 0.
      If not, the first missing gem is listed and Bundler exits status 1.
    D
    method_option "dry-run", :type => :boolean, :default => false, :banner =>
      "Lock the Gemfile"
    method_option "gemfile", :type => :string, :banner =>
      "Use the specified gemfile instead of Gemfile"
    method_option "path", :type => :string, :banner =>
      "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).#{" Bundler will remember this value for future installs on this machine" unless Bundler.feature_flag.forget_cli_options?}"
    def check
      remembered_flag_deprecation("path")

      require_relative "cli/check"
      Check.new(options).run
    end

    map aliases_for("check")

    desc "remove [GEM [GEM ...]]", "Removes gems from the Gemfile"
    long_desc <<-D
      Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If the gem is not found, Bundler prints a error message and if gem could not be removed due to any reason Bundler will display a warning.
    D
    method_option "install", :type => :boolean, :banner =>
      "Runs 'bundle install' after removing the gems from the Gemfile"
    def remove(*gems)
      SharedHelpers.major_deprecation(2, "The `--install` flag has been deprecated. `bundle install` is triggered by default.") if ARGV.include?("--install")
      require_relative "cli/remove"
      Remove.new(gems, options).run
    end

    desc "install [OPTIONS]", "Install the current environment to the system"
    long_desc <<-D
      Install will install all of the gems in the current bundle, making them available
      for use. In a freshly checked out repository, this command will give you the same
      gem versions as the last person who updated the Gemfile and ran `bundle update`.

      Passing [DIR] to install (e.g. vendor) will cause the unpacked gems to be installed
      into the [DIR] directory rather than into system gems.

      If the bundle has already been installed, bundler will tell you so and then exit.
    D
    method_option "binstubs", :type => :string, :lazy_default => "bin", :banner =>
      "Generate bin stubs for bundled gems to ./bin"
    method_option "clean", :type => :boolean, :banner =>
      "Run bundle clean automatically after install"
    method_option "deployment", :type => :boolean, :banner =>
      "Install using defaults tuned for deployment environments"
    method_option "frozen", :type => :boolean, :banner =>
      "Do not allow the Gemfile.lock to be updated after this install"
    method_option "full-index", :type => :boolean, :banner =>
      "Fall back to using the single-file index of all gems"
    method_option "gemfile", :type => :string, :banner =>
      "Use the specified gemfile instead of Gemfile"
    method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
      "Specify the number of jobs to run in parallel"
    method_option "local", :type => :boolean, :banner =>
      "Do not attempt to fetch gems remotely and use the gem cache instead"
    method_option "prefer-local", :type => :boolean, :banner =>
      "Only attempt to fetch gems remotely if not present locally, even if newer versions are available remotely"
    method_option "no-cache", :type => :boolean, :banner =>
      "Don't update the existing gem cache."
    method_option "redownload", :type => :boolean, :aliases => "--force", :banner =>
      "Force downloading every gem."
    method_option "no-prune", :type => :boolean, :banner =>
      "Don't remove stale gems from the cache."
    method_option "path", :type => :string, :banner =>
      "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).#{" Bundler will remember this value for future installs on this machine" unless Bundler.feature_flag.forget_cli_options?}"
    method_option "quiet", :type => :boolean, :banner =>
      "Only output warnings and errors."
    method_option "shebang", :type => :string, :banner =>
      "Specify a different shebang executable name than the default (usually 'ruby')"
    method_option "standalone", :type => :array, :lazy_default => [], :banner =>
      "Make a bundle that can work without the Bundler runtime"
    method_option "system", :type => :boolean, :banner =>
      "Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
    method_option "trust-policy", :alias => "P", :type => :string, :banner =>
      "Gem trust policy (like gem install -P). Must be one of " +
      Bundler.rubygems.security_policy_keys.join("|")
    method_option "without", :type => :array, :banner =>
      "Exclude gems that are part of the specified named group."
    method_option "with", :type => :array, :banner =>
      "Include gems that are part of the specified named group."
    def install
      SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")

      %w[clean deployment frozen no-prune path shebang system without with].each do |option|
        remembered_flag_deprecation(option)
      end

      remembered_negative_flag_deprecation("no-deployment")

      require_relative "cli/install"
      Bundler.settings.temporary(:no_install => false) do
        Install.new(options.dup).run
      end
    end

    map aliases_for("install")

    desc "update [OPTIONS]", "Update the current environment"
    long_desc <<-D
      Update will install the newest versions of the gems listed in the Gemfile. Use
      update when you have changed the Gemfile, or if you want to get the newest
      possible versions of the gems in the bundle.
    D
    method_option "full-index", :type => :boolean, :banner =>
      "Fall back to using the single-file index of all gems"
    method_option "gemfile", :type => :string, :banner =>
      "Use the specified gemfile instead of Gemfile"
    method_option "group", :aliases => "-g", :type => :array, :banner =>
      "Update a specific group"
    method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
      "Specify the number of jobs to run in parallel"
    method_option "local", :type => :boolean, :banner =>
      "Do not attempt to fetch gems remotely and use the gem cache instead"
    method_option "quiet", :type => :boolean, :banner =>
      "Only output warnings and errors."
    method_option "source", :type => :array, :banner =>
      "Update a specific source (and all gems associated with it)"
    method_option "redownload", :type => :boolean, :aliases => "--force", :banner =>
      "Force downloading every gem."
    method_option "ruby", :type => :boolean, :banner =>
      "Update ruby specified in Gemfile.lock"
    method_option "bundler", :type => :string, :lazy_default => "> 0.a", :banner =>
      "Update the locked version of bundler"
    method_option "patch", :type => :boolean, :banner =>
      "Prefer updating only to next patch version"
    method_option "minor", :type => :boolean, :banner =>
      "Prefer updating only to next minor version"
    method_option "major", :type => :boolean, :banner =>
      "Prefer updating to next major version (default)"
    method_option "pre", :type => :boolean, :banner =>
      "Always choose the highest allowed version when updating gems, regardless of prerelease status"
    method_option "strict", :type => :boolean, :banner =>
      "Do not allow any gem to be updated past latest --patch | --minor | --major"
    method_option "conservative", :type => :boolean, :banner =>
      "Use bundle install conservative update behavior and do not allow shared dependencies to be updated."
    method_option "all", :type => :boolean, :banner =>
      "Update everything."
    def update(*gems)
      SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
      require_relative "cli/update"
      Bundler.settings.temporary(:no_install => false) do
        Update.new(options, gems).run
      end
    end

    desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
    long_desc <<-D
      Show lists the names and versions of all gems that are required by your Gemfile.
      Calling show with [GEM] will list the exact location of that gem on your machine.
    D
    method_option "paths", :type => :boolean,
                           :banner => "List the paths of all gems that are required by your Gemfile."
    method_option "outdated", :type => :boolean,
                              :banner => "Show verbose output including whether gems are outdated."
    def show(gem_name = nil)
      SharedHelpers.major_deprecation(2, "the `--outdated` flag to `bundle show` was undocumented and will be removed without replacement") if ARGV.include?("--outdated")
      require_relative "cli/show"
      Show.new(options, gem_name).run
    end

    desc "list", "List all gems in the bundle"
    method_option "name-only", :type => :boolean, :banner => "print only the gem names"
    method_option "only-group", :type => :array, :default => [], :banner => "print gems from a given set of groups"
    method_option "without-group", :type => :array, :default => [], :banner => "print all gems except from a given set of groups"
    method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle"
    def list
      require_relative "cli/list"
      List.new(options).run
    end

    map aliases_for("list")

    desc "info GEM [OPTIONS]", "Show information for the given gem"
    method_option "path", :type => :boolean, :banner => "Print full path to gem"
    method_option "version", :type => :boolean, :banner => "Print gem version"
    def info(gem_name)
      require_relative "cli/info"
      Info.new(options, gem_name).run
    end

    desc "binstubs GEM [OPTIONS]", "Install the binstubs of the listed gem"
    long_desc <<-D
      Generate binstubs for executables in [GEM]. Binstubs are put into bin,
      or the --binstubs directory if one has been set. Calling binstubs with [GEM [GEM]]
      will create binstubs for all given gems.
    D
    method_option "force", :type => :boolean, :default => false, :banner =>
      "Overwrite existing binstubs if they exist"
    method_option "path", :type => :string, :lazy_default => "bin", :banner =>
      "Binstub destination directory (default bin)"
    method_option "shebang", :type => :string, :banner =>
      "Specify a different shebang executable name than the default (usually 'ruby')"
    method_option "standalone", :type => :boolean, :banner =>
      "Make binstubs that can work without the Bundler runtime"
    method_option "all", :type => :boolean, :banner =>
      "Install binstubs for all gems"
    method_option "all-platforms", :type => :boolean, :default => false, :banner =>
      "Install binstubs for all platforms"
    def binstubs(*gems)
      require_relative "cli/binstubs"
      Binstubs.new(options, gems).run
    end

    desc "add GEM VERSION", "Add gem to Gemfile and run bundle install"
    long_desc <<-D
      Adds the specified gem to Gemfile (if valid) and run 'bundle install' in one step.
    D
    method_option "version", :aliases => "-v", :type => :string
    method_option "group", :aliases => "-g", :type => :string
    method_option "source", :aliases => "-s", :type => :string
    method_option "require", :aliases => "-r", :type => :string, :banner => "Adds require path to gem. Provide false, or a path as a string."
    method_option "path", :type => :string
    method_option "git", :type => :string
    method_option "github", :type => :string
    method_option "branch", :type => :string
    method_option "ref", :type => :string
    method_option "skip-install", :type => :boolean, :banner =>
      "Adds gem to the Gemfile but does not install it"
    method_option "optimistic", :type => :boolean, :banner => "Adds optimistic declaration of version to gem"
    method_option "strict", :type => :boolean, :banner => "Adds strict declaration of version to gem"
    def add(*gems)
      require_relative "cli/add"
      Add.new(options.dup, gems).run
    end

    desc "outdated GEM [OPTIONS]", "List installed gems with newer versions available"
    long_desc <<-D
      Outdated lists the names and versions of gems that have a newer version available
      in the given source. Calling outdated with [GEM [GEM]] will only check for newer
      versions of the given gems. Prerelease gems are ignored by default. If your gems
      are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.

      For more information on patch level options (--major, --minor, --patch,
      --strict) see documentation on the same options on the update command.
    D
    method_option "group", :type => :string, :banner => "List gems from a specific group"
    method_option "groups", :type => :boolean, :banner => "List gems organized by groups"
    method_option "local", :type => :boolean, :banner =>
      "Do not attempt to fetch gems remotely and use the gem cache instead"
    method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
    method_option "source", :type => :array, :banner => "Check against a specific source"
    method_option "filter-strict", :type => :boolean, :aliases => "--strict", :banner =>
      "Only list newer versions allowed by your Gemfile requirements"
    method_option "update-strict", :type => :boolean, :banner =>
      "Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major"
    method_option "minor", :type => :boolean, :banner => "Prefer updating only to next minor version"
    method_option "major", :type => :boolean, :banner => "Prefer updating to next major version (default)"
    method_option "patch", :type => :boolean, :banner => "Prefer updating only to next patch version"
    method_option "filter-major", :type => :boolean, :banner => "Only list major newer versions"
    method_option "filter-minor", :type => :boolean, :banner => "Only list minor newer versions"
    method_option "filter-patch", :type => :boolean, :banner => "Only list patch newer versions"
    method_option "parseable", :aliases => "--porcelain", :type => :boolean, :banner =>
      "Use minimal formatting for more parseable output"
    method_option "only-explicit", :type => :boolean, :banner =>
      "Only list gems specified in your Gemfile, not their dependencies"
    def outdated(*gems)
      require_relative "cli/outdated"
      Outdated.new(options, gems).run
    end

    desc "fund [OPTIONS]", "Lists information about gems seeking funding assistance"
    method_option "group", :aliases => "-g", :type => :array, :banner =>
      "Fetch funding information for a specific group"
    def fund
      require_relative "cli/fund"
      Fund.new(options).run
    end

    desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
    method_option "all",  :type => :boolean,
                          :default => Bundler.feature_flag.cache_all?,
                          :banner => "Include all sources (including path and git)."
    method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one"
    method_option "cache-path", :type => :string, :banner =>
      "Specify a different cache path than the default (vendor/cache)."
    method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile"
    method_option "no-install", :type => :boolean, :banner => "Don't install the gems, only update the cache."
    method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
    method_option "path", :type => :string, :banner =>
      "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).#{" Bundler will remember this value for future installs on this machine" unless Bundler.feature_flag.forget_cli_options?}"
    method_option "quiet", :type => :boolean, :banner => "Only output warnings and errors."
    method_option "frozen", :type => :boolean, :banner =>
      "Do not allow the Gemfile.lock to be updated after this bundle cache operation's install"
    long_desc <<-D
      The cache command will copy the .gem files for every gem in the bundle into the
      directory ./vendor/cache. If you then check that directory into your source
      control repository, others who check out your source will be able to install the
      bundle without having to download any additional gems.
    D
    def cache
      SharedHelpers.major_deprecation 2,
        "The `--all` flag is deprecated because it relies on being " \
        "remembered across bundler invocations, which bundler will no longer " \
        "do in future versions. Instead please use `bundle config set cache_all true`, " \
        "and stop using this flag" if ARGV.include?("--all")

      SharedHelpers.major_deprecation 2,
        "The `--path` flag is deprecated because its semantics are unclear. " \
        "Use `bundle config cache_path` to configure the path of your cache of gems, " \
        "and `bundle config path` to configure the path where your gems are installed, " \
        "and stop using this flag" if ARGV.include?("--path")

      require_relative "cli/cache"
      Cache.new(options).run
    end

    map aliases_for("cache")

    desc "exec [OPTIONS]", "Run the command in context of the bundle"
    method_option :keep_file_descriptors, :type => :boolean, :default => true
    method_option :gemfile, :type => :string, :required => false
    long_desc <<-D
      Exec runs a command, providing it access to the gems in the bundle. While using
      bundle exec you can require and call the bundled gems as if they were installed
      into the system wide RubyGems repository.
    D
    def exec(*args)
      if ARGV.include?("--no-keep-file-descriptors")
        SharedHelpers.major_deprecation(2, "The `--no-keep-file-descriptors` has been deprecated. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to")
      end

      require_relative "cli/exec"
      Exec.new(options, args).run
    end

    map aliases_for("exec")

    desc "config NAME [VALUE]", "Retrieve or set a configuration value"
    long_desc <<-D
      Retrieves or sets a configuration value. If only one parameter is provided, retrieve the value. If two parameters are provided, replace the
      existing value with the newly provided one.

      By default, setting a configuration value sets it for all projects
      on the machine.

      If a global setting is superseded by local configuration, this command
      will show the current value, as well as any superseded values and
      where they were specified.
    D
    require_relative "cli/config"
    subcommand "config", Config

    desc "open GEM", "Opens the source directory of the given bundled gem"
    method_option "path", :type => :string, :lazy_default => "", :banner => "Open relative path of the gem source."
    def open(name)
      require_relative "cli/open"
      Open.new(options, name).run
    end

    unless Bundler.feature_flag.bundler_3_mode?
      desc "console [GROUP]", "Opens an IRB session with the bundle pre-loaded"
      def console(group = nil)
        require_relative "cli/console"
        Console.new(options, group).run
      end
    end

    desc "version", "Prints Bundler version information"
    def version
      cli_help = current_command.name == "cli_help"
      if cli_help || ARGV.include?("version")
        build_info = " (#{BuildMetadata.built_at} commit #{BuildMetadata.git_commit_sha})"
      end

      if !cli_help && Bundler.feature_flag.print_only_version_number?
        Bundler.ui.info "#{Bundler::VERSION}#{build_info}"
      else
        Bundler.ui.info "Bundler version #{Bundler::VERSION}#{build_info}"
      end
    end

    map aliases_for("version")

    desc "licenses", "Prints the license of all gems in the bundle"
    def licenses
      Bundler.load.specs.sort_by {|s| s.license.to_s }.reverse_each do |s|
        gem_name = s.name
        license  = s.license || s.licenses

        if license.empty?
          Bundler.ui.warn "#{gem_name}: Unknown"
        else
          Bundler.ui.info "#{gem_name}: #{license}"
        end
      end
    end

    unless Bundler.feature_flag.bundler_3_mode?
      desc "viz [OPTIONS]", "Generates a visual dependency graph", :hide => true
      long_desc <<-D
        Viz generates a PNG file of the current Gemfile as a dependency graph.
        Viz requires the ruby-graphviz gem (and its dependencies).
        The associated gems must also be installed via 'bundle install'.
      D
      method_option :file, :type => :string, :default => "gem_graph", :aliases => "-f", :desc => "The name to use for the generated file. see format option"
      method_option :format, :type => :string, :default => "png", :aliases => "-F", :desc => "This is output format option. Supported format is png, jpg, svg, dot ..."
      method_option :requirements, :type => :boolean, :default => false, :aliases => "-R", :desc => "Set to show the version of each required dependency."
      method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
      method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
      def viz
        SharedHelpers.major_deprecation 2, "The `viz` command has been renamed to `graph` and moved to a plugin. See https://github.com/rubygems/bundler-graph"
        require_relative "cli/viz"
        Viz.new(options.dup).run
      end
    end

    old_gem = instance_method(:gem)

    desc "gem NAME [OPTIONS]", "Creates a skeleton for creating a rubygem"
    method_option :exe, :type => :boolean, :default => false, :aliases => ["--bin", "-b"], :desc => "Generate a binary executable for your library."
    method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config set --global gem.coc true`."
    method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
                         :lazy_default => [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? },
                         :desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
    method_option :ext, :type => :string, :desc => "Generate the boilerplate for C extension code.", :enum => EXTENSIONS
    method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
    method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
    method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
    method_option :changelog, :type => :boolean, :desc => "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
    method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
                         :desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
    method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
                       :desc => "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
    method_option :linter, :type => :string, :lazy_default => Bundler.settings["gem.linter"] || "",
                           :desc => "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
    method_option :github_username, :type => :string, :default => Bundler.settings["gem.github_username"], :banner => "Set your username on GitHub", :desc => "Fill in GitHub username on README so that you don't have to do it manually. Set a default with `bundle config set --global gem.github_username <your_username>`."

    def gem(name)
    end

    commands["gem"].tap do |gem_command|
      def gem_command.run(instance, args = [])
        arity = 1 # name

        require_relative "cli/gem"
        cmd_args = args + [instance]
        cmd_args.unshift(instance.options)

        cmd = begin
          Gem.new(*cmd_args)
        rescue ArgumentError => e
          instance.class.handle_argument_error(self, e, args, arity)
        end

        cmd.run
      end
    end

    undef_method(:gem)
    define_method(:gem, old_gem)
    private :gem

    def self.source_root
      File.expand_path("templates", __dir__)
    end

    desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory", :hide => true
    method_option "dry-run", :type => :boolean, :default => false, :banner =>
      "Only print out changes, do not clean gems"
    method_option "force", :type => :boolean, :default => false, :banner =>
      "Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application."
    def clean
      require_relative "cli/clean"
      Clean.new(options.dup).run
    end

    desc "platform [OPTIONS]", "Displays platform compatibility information"
    method_option "ruby", :type => :boolean, :default => false, :banner =>
      "only display ruby related platform information"
    def platform
      require_relative "cli/platform"
      Platform.new(options).run
    end

    desc "inject GEM VERSION", "Add the named gem, with version requirements, to the resolved Gemfile", :hide => true
    method_option "source", :type => :string, :banner =>
     "Install gem from the given source"
    method_option "group", :type => :string, :banner =>
     "Install gem into a bundler group"
    def inject(name, version)
      SharedHelpers.major_deprecation 2, "The `inject` command has been replaced by the `add` command"
      require_relative "cli/inject"
      Inject.new(options.dup, name, version).run
    end

    desc "lock", "Creates a lockfile without installing"
    method_option "update", :type => :array, :lazy_default => true, :banner =>
      "ignore the existing lockfile, update all gems by default, or update list of given gems"
    method_option "local", :type => :boolean, :default => false, :banner =>
      "do not attempt to fetch remote gemspecs and use the local gem cache only"
    method_option "print", :type => :boolean, :default => false, :banner =>
      "print the lockfile to STDOUT instead of writing to the file system"
    method_option "gemfile", :type => :string, :banner =>
      "Use the specified gemfile instead of Gemfile"
    method_option "lockfile", :type => :string, :default => nil, :banner =>
      "the path the lockfile should be written to"
    method_option "full-index", :type => :boolean, :default => false, :banner =>
      "Fall back to using the single-file index of all gems"
    method_option "add-platform", :type => :array, :default => [], :banner =>
      "Add a new platform to the lockfile"
    method_option "remove-platform", :type => :array, :default => [], :banner =>
      "Remove a platform from the lockfile"
    method_option "patch", :type => :boolean, :banner =>
      "If updating, prefer updating only to next patch version"
    method_option "minor", :type => :boolean, :banner =>
      "If updating, prefer updating only to next minor version"
    method_option "major", :type => :boolean, :banner =>
      "If updating, prefer updating to next major version (default)"
    method_option "pre", :type => :boolean, :banner =>
      "If updating, always choose the highest allowed version, regardless of prerelease status"
    method_option "strict", :type => :boolean, :banner =>
      "If updating, do not allow any gem to be updated past latest --patch | --minor | --major"
    method_option "conservative", :type => :boolean, :banner =>
      "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
    method_option "bundler", :type => :string, :lazy_default => "> 0.a", :banner =>
      "Update the locked version of bundler"
    def lock
      require_relative "cli/lock"
      Lock.new(options).run
    end

    desc "env", "Print information about the environment Bundler is running under"
    def env
      Env.write($stdout)
    end

    desc "doctor [OPTIONS]", "Checks the bundle for common problems"
    long_desc <<-D
      Doctor scans the OS dependencies of each of the gems requested in the Gemfile. If
      missing dependencies are detected, Bundler prints them and exits status 1.
      Otherwise, Bundler prints a success message and exits with a status of 0.
    D
    method_option "gemfile", :type => :string, :banner =>
      "Use the specified gemfile instead of Gemfile"
    method_option "quiet", :type => :boolean, :banner =>
        "Only output warnings and errors."
    def doctor
      require_relative "cli/doctor"
      Doctor.new(options).run
    end

    desc "issue", "Learn how to report an issue in Bundler"
    def issue
      require_relative "cli/issue"
      Issue.new.run
    end

    desc "pristine [GEMS...]", "Restores installed gems to pristine condition"
    long_desc <<-D
      Restores installed gems to pristine condition from files located in the
      gem cache. Gems installed from a git repository will be issued `git
      checkout --force`.
    D
    def pristine(*gems)
      require_relative "cli/pristine"
      Pristine.new(gems).run
    end

    if Bundler.feature_flag.plugins?
      require_relative "cli/plugin"
      desc "plugin", "Manage the bundler plugins"
      subcommand "plugin", Plugin
    end

    # Reformat the arguments passed to bundle that include a --help flag
    # into the corresponding `bundle help #{command}` call
    def self.reformatted_help_args(args)
      bundler_commands = (COMMAND_ALIASES.keys + COMMAND_ALIASES.values).flatten

      help_flags = %w[--help -h]
      exec_commands = ["exec"] + COMMAND_ALIASES["exec"]

      help_used = args.index {|a| help_flags.include? a }
      exec_used = args.index {|a| exec_commands.include? a }

      command = args.find {|a| bundler_commands.include? a }
      command = all_aliases[command] if all_aliases[command]

      if exec_used && help_used
        if exec_used + help_used == 1
          %w[help exec]
        else
          args
        end
      elsif help_used
        args = args.dup
        args.delete_at(help_used)
        ["help", command || args].flatten.compact
      else
        args
      end
    end

    def self.check_deprecated_ext_option(arguments)
      # when deprecated version of `--ext` is called
      # print out deprecation warning and pretend `--ext=c` was provided
      if deprecated_ext_value?(arguments)
        SharedHelpers.major_deprecation 2, "Extensions can now be generated using C or Rust, so `--ext` with no arguments has been deprecated. Please select a language, e.g. `--ext=rust` to generate a Rust extension. This gem will now be generated as if `--ext=c` was used."
        arguments[arguments.index("--ext")] = "--ext=c"
      end
    end

    def self.deprecated_ext_value?(arguments)
      index = arguments.index("--ext")
      next_argument = argumengems/gems/bundler-2.4.19/lib/bundler/endpoint_specification.rb000064400000007232150403133420020063 0ustar00te anything like an
    # `Installer` that'll keep a reference to the old one instead.
    def auto_install
      return unless Bundler.settings[:auto_install]

      begin
        Bundler.definition.specs
      rescue GemNotFound
        Bundler.ui.info "Automatically installing missing gems."
        Bundler.reset!
        invoke :install, []
        Bundler.reset!
      end
    end

    def current_command
      _, _, config = @_initializer
      config[:current_command]
    end

    def print_command
      return unless Bundler.ui.debug?
      cmd = current_command
      command_name = cmd.name
      return if PARSEABLE_COMMANDS.include?(command_name)
      command = ["bundle", command_name] + args
      options_to_print = options.dup
      options_to_print.delete_if do |k, v|
        next unless o = cmd.options[k]
        o.default == v
      end
      command << Thor::Options.to_switches(options_to_print.sort_by(&:first)).strip
      command.reject!(&:empty?)
      Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler::VERSION}"
    end

    def warn_on_outdated_bundler
      return if Bundler.settings[:disable_version_check]

      command_name = current_command.name
      return if PARSEABLE_COMMANDS.include?(command_name)

      return unless SharedHelpers.md5_available?

      latest = Fetcher::CompactIndex.
               new(nil, Source::Rubygems::Remote.new(Bundler::URI("https://rubygems.org")), nil).
               send(:compact_index_client).
               instance_variable_get(:@cache).
               dependencies("bundler").
               map {|d| Gem::Version.new(d.first) }.
               max
      return unless latest

      current = Gem::Version.new(VERSION)
      return if current >= latest

      Bundler.ui.warn \
        "The latest bundler is #{latest}, but you are currently running #{current}.\n" \
        "To update to the most recent version, run `bundle update --bundler`"
    rescue RuntimeError
      nil
    end

    def remembered_negative_flag_deprecation(name)
      positive_name = name.gsub(/\Ano-/, "")
      option = current_command.options[positive_name]
      flag_name = "--no-" + option.switch_name.gsub(/\A--/, "")

      flag_deprecation(positive_name, flag_name, option)
    end

    def remembered_flag_deprecation(name)
      option = current_command.options[name]
      flag_name = option.switch_name

      flag_deprecation(name, flag_name, option)
    end

    def flag_deprecation(name, flag_name, option)
      name_index = ARGV.find {|arg| flag_name == arg.split("=")[0] }
      return unless name_index

      value = options[name]
      value = value.join(" ").to_s if option.type == :array

      Bundler::SharedHelpers.major_deprecation 2,
        "The `#{flag_name}` flag is deprecated because it relies on being " \
        "remembered across bundler invocations, which bundler will no longer " \
        "do in future versions. Instead please use `bundle config set --local #{name.tr("-", "_")} " \
        "'#{value}'`, and stop using this flag"
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/endpoint_specification.rb00006440000000723215040313342002006gems/gems/bundler-2.4.19/lib/bundler/vendored_thor.rb000064400000000264150403133420016203 0ustar00rm.new(platform)
      @spec_fetcher = spec_fetcher
      @dependencies = dependencies.map {|dep, reqs| build_dependency(dep, reqs) }

      @loaded_from          = nil
      @remogems/gems/bundler-2.4.19/lib/bundler/remote_specification.rb000064400000007326150403133420017542 0ustar00
      else
        super
      end
    end

    # needed for bundle clean
    def bindir
      if @remote_specification
        @remote_specification.bindir
      elsif _local_specification
        _local_specification.bindir
      else
        super
      end
    end

    # needed for post_install_messages during install
    def post_install_message
      if @remote_specification
        @remote_specification.post_install_message
      elsif _local_specification
        _local_specification.post_install_message
      else
        super
      end
    end

    # needed for "with native extensions" during install
    def extensions
      if @remote_specification
        @remote_specification.extensions
      elsif _local_specification
        _local_specification.extensions
      else
        super
      end
    end

    def _local_specification
      return unless @loaded_from && File.exist?(local_specification_path)
      eval(File.read(local_specification_path)).tap do |spec|
        spec.loaded_from = @loaded_from
      end
    end

    def __swap__(spec)
      SharedHelpers.ensure_same_dependencies(self, dependencies, spec.dependencies)
      @remote_specification = spec
    end

    private

    def _remote_specification
      @_remote_specification ||= @spec_fetcher.fetch_spec([@name, @version, @platform])
    end

    def local_specification_path
      "#{base_dir}/specifications/#{full_name}.gemspec"
    end

    def parse_metadata(data)
      unless data
        @required_ruby_version = nil
        @required_rubygems_version = nil
        return
      end

      data.each do |k, v|
        next unless v
        case k.to_s
        when "checksum"
          @checksum = v.last
        when "rubygems"
          @required_rubygems_version = Gem::Requirement.new(v)
        when "ruby"
          @required_ruby_version = Gem::Requirement.new(v)
        end
      end
    rescue StandardError => e
      raise GemspecError, "There was an error parsing the metadata for the gem #{name} (#{version}): #{e.class}\n#{e}\nThe metadata was #{data.inspect}"
    end

    def build_dependency(name, requirements)
      Gem::Dependency.new(name, requirements)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendored_thor.rb000064400000000264150403133420016203 0ustar00# gems/gems/bundler-2.4.19/lib/bundler/endpoint_specification.rb000064400000007232150403133420020063 0gems/gems/bundler-2.4.19/lib/bundler/ruby_version.rb000064400000010261150403133430016066 0ustar00dependencies
    attr_accessor :source, :remote

    def initialize(name, version, platform, spec_fetcher)
      @name         = name
      @version      = Gem::Version.create version
      @original_platform = platform || Gem::Platform::RUBY
      @platform     = Gem::Platform.new(platform)
      @spec_fetcher = spec_fetcher
      @dependencies = nil
    end

    # Needed before installs, since the arch matters then and quick
    # specs don't bother to include the arch in the platform string
    def fetch_platform
      @platform = _remote_specification.platform
    end

    def full_name
      @full_name ||= if @platform == Gem::Platform::RUBY
        "#{@name}-#{@version}"
      else
        "#{@name}-#{@version}-#{@platform}"
      end
    end

    # Compare this specification against another object. Using sort_obj
    # is compatible with Gem::Specification and other Bundler or RubyGems
    # objects. Otherwise, use the default Object comparison.
    def <=>(other)
      if other.respond_to?(:sort_obj)
        sort_obj <=> other.sort_obj
      else
        super
      end
    end

    # Because Rubyforge cannot be trusted to provide valid specifications
    # once the remote gem is downloaded, the backend specification will
    # be swapped out.
    def __swap__(spec)
      raise APIResponseInvalidDependenciesError unless spec.dependencies.all? {|d| d.is_a?(Gem::Dependency) }

      SharedHelpers.ensure_same_dependencies(self, dependencies, spec.dependencies)
      @_remote_specification = spec
    end

    # Create a delegate used for sorting. This strategy is copied from
    # RubyGems 2.23 and ensures that Bundler's specifications can be
    # compared and sorted with RubyGems' own specifications.
    #
    # @see #<=>
    # @see Gem::Specification#sort_obj
    #
    # @return [Array] an object you can use to compare and sort this
    #   specification against other specifications
    def sort_obj
      [@name, @version, @platform == Gem::Platform::RUBY ? -1 : 1]
    end

    def to_s
      "#<#{self.class} name=#{name} version=#{version} platform=#{platform}>"
    end

    def dependencies
      @dependencies ||= begin
        deps = method_missing(:dependencies)

        # allow us to handle when the specs dependencies are an array of array of string
        # in order to delay the crash to `#__swap__` where it results in a friendlier error
        # see https://github.com/rubygems/bundler/issues/5797
        deps = deps.map {|d| d.is_a?(Gem::Dependency) ? d : Gem::Dependency.new(*d) }

        deps
      end
    end

    def git_version
      return unless loaded_from && source.is_a?(Bundler::Source::Git)
      " #{source.revision[0..6]}"
    end

    private

    def to_ary
      nil
    end

    def _remote_specification
      @_remote_specification ||= @spec_fetcher.fetch_spec([@name, @version, @original_platform])
      @_remote_specification || raise(GemspecError, "Gemspec data for #{full_name} was" \
        " missing from the server!")
    end

    def method_missing(method, *args, &blk)
      _remote_specification.send(method, *args, &blk)
    end

    def respond_to?(method, include_all = false)
      super || _remote_specification.respond_to?(metgems/gems/bundler-2.4.19/lib/bundler/vendored_thor.rb000064400000000264150403133420016203 0ustar00# frozen_string_literal: true

module Bundler
  class RubyVersion
    attr_reader :versions,
      :patchlevel,
      :engine,
      :engine_versions,
      :gem_version,
      gems/gems/bundler-2.4.19/lib/bundler/errors.rb000064400000012251150403133430014655 0ustar00  = engine&.to_s || "ruby"
      @engine_versions    = (engine_version && Array(engine_version)) || @versions
      @engine_gem_version = Gem::Requirement.create(@engine_versions.first).requirements.first.last
      @patchlevel         = patchlevel || (@gem_version.prerelease? ? "-1" : nil)
    end

    def to_s(versions = self.versions)
      output = String.new("ruby #{versions_string(versions)}")
      output << "p#{patchlevel}" if patchlevel && patchlevel != "-1"
      output << " (#{engine} #{versions_string(engine_versions)})" unless engine == "ruby"

      output
    end

    # @private
    PATTERN = /
      ruby\s
      (\d+\.\d+\.\d+(?:\.\S+)?) # ruby version
      (?:p(-?\d+))? # optional patchlevel
      (?:\s\((\S+)\s(.+)\))? # optional engine info
    /xo.freeze

    # Returns a RubyVersion from the given string.
    # @param [String] the version string to match.
    # @return [RubyVersion,Nil] The version if the string is a valid RubyVersion
    #         description, and nil otherwise.
    def self.from_string(string)
      new($1, $2, $3, $4) if string =~ PATTERN
    end

    def single_version_string
      to_s(gem_version)
    end

    def ==(other)
      versions == other.versions &&
        engine == other.engine &&
        engine_versions == other.engine_versions &&
        patchlevel == other.patchlevel
    end

    def host
      @host ||= [
        RbConfig::CONFIG["host_cpu"],
        RbConfig::CONFIG["host_vendor"],
        RbConfig::CONFIG["host_os"],
      ].join("-")
    end

    # Returns a tuple of these things:
    #   [diff, this, other]
    #   The priority of attributes are
    #   1. engine
    #   2. ruby_version
    #   3. engine_version
    def diff(other)
      raise ArgumentError, "Can only diff with a RubyVersion, not a #{other.class}" unless other.is_a?(RubyVersion)
      if engine != other.engine && @input_engine
        [:engine, engine, other.engine]
      elsif versions.empty? || !matches?(versions, other.gem_version)
        [:version, versions_string(versions), versions_string(other.versions)]
      elsif @input_engine && !matches?(engine_versions, other.engine_gem_version)
        [:engine_version, versions_string(engine_versions), versions_string(other.engine_versions)]
      elsif patchlevel && (!patchlevel.is_a?(String) || !other.patchlevel.is_a?(String) || !matches?(patchlevel, other.patchlevel))
        [:patchlevel, patchlevel, other.patchlevel]
      end
    end

    def versions_string(versions)
      Array(versions).join(", ")
    end

    def self.system
      ruby_engine = RUBY_ENGINE.dup
      ruby_version = Gem.ruby_version.to_s
      ruby_engine_version = RUBY_ENGINE == "ruby" ? ruby_version : RUBY_ENGINE_VERSION.dup
      patchlevel = RUBY_PATCHLEVEL.to_s

      @system ||= RubyVersion.new(ruby_version, patchlevel, ruby_engine, ruby_engine_version)
    end

    private

    def matches?(requirements, version)
      # Handles RUBY_PATCHLEVEL of -1 for instances like ruby-head
      return requirements == version if requirements.to_s == "-1" || version.to_s == "-1"

      Array(requirements).all? do |requirement|
        Gem::Requirement.create(requirement).satisfied_by?(Gem::Version.create(version))
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/errors.rb000064400000012251150403133430014655 0gems/gems/bundler-2.4.19/lib/bundler/ruby_version.rb000064400000010261150403133430016066 0ustar00mfileError < BundlerError; status_code(4); end
  class InstallError < BundlerError; status_code(5); end

  # Internal error, should be rescued
  class SolveFailure < BundlerError; status_code(6); end

  class GemNotFound < BundlerError; status_code(7); end
  class InstallHookError < BundlerError; status_code(8); end
  class GemfileNotFound < BundlerError; status_code(10); end
  class GitError < BundlerError; status_code(11); end
  class DeprecatedError < BundlerError; status_code(12); end
  class PathError < BundlerError; status_code(13); end
  class GemspecError < BundlerError; status_code(14); end
  class InvalidOption < BundlerError; status_code(15); end
  class Productgems/gems/bundler-2.4.19/lib/bundler/self_manager.rb000064400000011407150403133430015766 0ustar00dardError; end

  class PermissionError < BundlerError
    def initialize(path, permission_type = :write)
      @path = path
      @permission_type = permission_type
    end

    def action
      case @permission_type
      when :read then "read from"
      when :write then "write to"
      when :executable, :exec then "execute"
      else @permission_type.to_s
      end
    end

    def permission_type
      case @permission_type
      when :create
        "executable permissions for all parent directories and write permissions for `#{parent_folder}`"
      else
        "#{@permission_type} permissions for that path"
      end
    end

    def parent_folder
      File.dirname(@path)
    end

    def message
      "There was an error while trying to #{action} `#{@path}`. " \
      "It is likely that you need to grant #{permission_type}."
    end

    status_code(23)
  end

  class GemRequireError < BundlerError
    attr_reader :orig_exception

    def initialize(orig_exception, msg)
      full_message = msg + "\nGem Load Error is: #{orig_exception.message}\n"\
                      "Backtrace for gem load error is:\n"\
                      "#{orig_exception.backtrace.join("\n")}\n"\
                      "Bundler Error Backtrace:\n"
      super(full_message)
      @orig_exception = orig_exception
    end

    status_code(24)
  end

  class YamlSyntaxError < BundlerError
    attr_reader :orig_exception

    def initialize(orig_exception, msg)
      super(msg)
      @orig_exception = orig_exception
    end

    status_code(25)
  end

  class TemporaryResourceError < PermissionError
    def message
      "There was an error while trying to #{action} `#{@path}`. " \
      "Some resource was temporarily unavailable. It's suggested that you try" \
      "the operation again."
    end

    status_code(26)
  end

  class VirtualProtocolError < BundlerError
    def message
      "There was an error relating to virtualization and file access. " \
      "It is likely that you need to grant access to or mount some file system correctly."
    end

    status_code(27)
  end

  class OperationNotSupportedError < PermissionError
    def message
      "Attempting to #{action} `#{@path}` is unsupported by your OS."
    end

    status_code(28)
  end

  class NoSpaceOnDeviceError < PermissionError
    def message
      "There was an error while trying to #{action} `#{@path}`. " \
      "There was insufficient space remaining on the device."
    end

    status_code(31)
  end

  class GenericSystemCallError < BundlerError
    attr_reader :underlying_error

    def initialize(underlying_error, message)
      @underlying_error = underlying_error
      super("#{message}\nThe underlying system error is #{@undergems/gems/bundler-2.4.19/lib/bundler/errors.rb000064400000012251150403133430014655 0ustar00gems/gems/bundler-2.4.19/lib/bundler/self_manager.rb000064400000011407150403133430015766 0ustar00# frozen_string_literal: true

module Bundler
  #
  # This class handles installing and switching to the version of bundler needed
  # by an application.
  #
  class SelfManager
    def restart_with_locked_bundler_if_needed
      return unless needs_switching? && installed?

      restart_with(lockfile_version)
    end

    def install_locked_bundler_and_restart_with_it_if_needed
      return unless needs_switching?

      Bundler.ui.info \
        "Bundler #{current_version} is running, but your lockfile was generated with #{lockfile_version}. " \
        "Installing Bundler #{lockfile_version} and restarting using that version."

      install_and_restart_with(lockfile_version)
    end

    def update_bundler_and_restart_with_it_if_needed(target)
      return unlgems/gems/bundler-2.4.19/lib/bundler/feature_flag.rb000064400000003453150403133440015772 0ustar00ked bundler version (#{lockfile_version}), rerun with the `--verbose` flag for more details. Going on using bundler #{current_version}."
    else
      restart_with(version)
    end

    def install(spec)
      spec.source.install(spec)
    end

    def restart_with(version)
      configured_gem_home = ENV["GEM_HOME"]
      configured_gem_path = ENV["GEM_PATH"]

      cmd = [$PROGRAM_NAME, *ARGV]
      cmd.unshift(Gem.ruby) unless File.executable?($PROGRAM_NAME)

      Bundler.with_original_env do
        Kernel.exec(
          { "GEM_HOME" => configured_gem_home, "GEM_PATH" => configured_gem_path, "BUNDLER_VERSION" => version.to_s },
          *cmd
        )
      end
    end

    def needs_switching?
      autoswitching_applies? &&
        released?(lockfile_version) &&
        !running?(lockfile_version) &&
        !updating?
    end

    def autoswitching_applies?
      ENV["BUNDLER_VERSION"].nil? &&
        Bundler.rubygems.supports_bundler_trampolining? &&
        SharedHelpers.in_bundle? &&
        lockfile_version
    end

    def resolve_update_version_from(target)
      requirement = Gem::Requirement.new(target)
      update_candidate = find_latest_matching_spec(requirement)

      if update_candidate.nil?
        raise InvalidOption, "The `bundle update --bundler` target version (#{target}) does not exist"
      end

      resolved_version = update_candidate.version
      needs_update = requirement.specific? ? !running?(resolved_version) : running_older_than?(resolved_version)

      return unless needs_update

      update_candidate
    end

    def local_specs
      @local_specs ||= Bundler::Source::Rubygems.new("allow_local" => true).specs.select {|spec| spec.name == "bundler" }
    end

    def remote_specs
      @remote_specs ||= begin
        source = Bundler::Source::Rubygems.new("remotgems/gems/bundler-2.4.19/lib/bundler/setup.rb000064400000001703150403133440014502 0ustar00     version == current_version
    end

    def running_older_than?(version)
      current_version < version
    end

    def released?(version)
      !version.to_s.end_with?(".dev")
    end

    def updating?
      "update".start_with?(ARGV.first || " ") && ARGV[1..-1].any? {|a| a.start_with?("--bundler") }
    end

    def installed?
      Bundler.configure

      Bundler.rubygems.find_bundler(lockfile_version.to_s)
    end

    def current_version
      @current_version ||= Gem::Version.new(Bundler::VERSION)
    end

    def lockfile_version
      return @lockfile_version if defined?(@lockfile_version)

      parsed_version = Bundler::LockfileParser.bundled_with
      gems/gems/bundler-2.4.19/lib/bundler/runtime.rb000064400000024231150403133440015026 0ustar00# frozen_string_literal: true

module Bundler
  class FeatureFlag
    def self.settings_flag(flag, &default)
      unless Bundler::Settings::BOOL_KEYS.include?(flag.to_s)
        raise "Cannot use `#{flag}` as a settings feature flag since it isn't a bool key"
      end

      settings_method("#{flag}?", flag, &default)
    end
    private_class_method :settings_flag

    def self.settings_option(key, &default)
      settings_method(key, key, &default)
    end
    private_class_method :settings_option

    def self.settings_method(name, key, &default)
      define_method(name) do
        value = Bundler.settings[key]
        value = instance_eval(&default) if value.nil?
        value
      end
    end
    private_class_method :settings_method

    (1..10).each {|v| define_method("bundler_#{v}_mode?") { major_version >= v } }

    settings_flag(:allow_offline_install) { bundler_3_mode? }
    settings_flag(:auto_clean_without_path) { bundler_3_mode? }
    settings_flag(:cache_all) { bundler_3_mode? }
    settings_flag(:default_install_uses_path) { bundler_3_mode? }
    settings_flag(:forget_cli_options) { bundler_3_mode? }
    settings_flag(:global_gem_cache) { bundler_3_mode? }
    settings_flag(:path_relative_to_cwd) { bundler_3_mode? }
    settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
    settings_flag(:print_only_version_number) { bundler_3_mode? }
    settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? }
    settings_flag(:update_requires_all_flag) { bundler_4_mode? }

    settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }

    def initialize(bundler_version)
      @bundler_version = Gem::Version.create(bundler_version)
    end

    def major_version
      @bundler_version.segments.first
    end
    private :major_version
  end
end
gems/gems/bundler-2.4.19/lib/bundler/setup.rb000064400000001703150403133440014502 0ustar00# frozen_string_literal: true

require_relative "shared_helpers"

if Bundler::SharedHelpers.in_bundle?
  require_relative "../bundler"

  if STDOUT.tty? || ENV["BUNDLER_FORCE_TTY"]
    begin
      Bundler.ui.silence { Bundler.setup }
    rescue Bundler::BundlerError => e
      Bundler.ui.error e.message
      Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"]
      if e.is_a?(Bundler::GemNotFound)
        suggested_cmd = "bundle install"
        original_gemfile = Bundler.original_env["BUNDLE_GEMFILE"]
        suggested_cmd += " --gemfile #{original_gemfile}" if original_gemfile
        Bundler.ui.warn "Run `#{suggested_cmd}` to install missing gems."
      end
      exit e.status_code
    end
  else
    Bundler.ui.silence { Bundler.setup }
  end

  # We might be in the middle of shelling out to rubygems
  # (RUBYOPT=-rbundler/setup), so we need to give rubygems the opportunity of
  # not being silent.
  Gem::DefaultUserInteraction.ui = nil
end
gems/gems/bundler-2.4.19/lib/bundler/runtime.rb000064400000024231150403133440015026 0ustar00# frozen_string_literal: true

module Bundler
  class Runtime
    include SharedHelpers

    def initialize(root, definition)
      @root = root
      @definition = definition
    end

    def setup(*groups)
      @definition.ensure_equivalent_gemfile_and_lockfile if Bundler.frozen_bundle?

      # Has to happen first
      clean_load_path

      specs = @definition.specs_for(groups)

      SharedHelpers.set_bundle_environment
      Bundler.rubygems.replace_entrypoints(specs)

      # Activate the specs
      load_paths = specs.map do |spec|
        check_for_activated_spec!(spec)

        Bundler.rubygems.mark_loaded(spec)
        spec.load_paths.reject {|path| $LOAD_PATH.include?(path) }
      end.reverse.flatten

      Bundler.rubygems.add_to_load_path(load_pathgems/gems/bundler-2.4.19/lib/bundler/feature_flag.rb000064400000003453150403133440015772 0ustar00rue` as an alias for `require: <name>`
            file = dep.name if file == true
            required_file = file
            begin
              Kernel.require file
            rescue RuntimeError => e
              raise e if e.is_a?(LoadError) # we handle this a little later
              raise Bundler::GemRequireError.new e,
                "There was an error while trying to load the gem '#{file}'."
            end
          end
        rescue LoadError => e
          raise if dep.autorequire || e.path != required_file

          if dep.autorequire.nil? && dep.name.include?("-")
            begin
              namespaced_file = dep.name.tr("-", "/")
              Kernel.require namespaced_file
            rescue LoadError => e
              raise if e.path != namespaced_file
            end
          end
        end
      end
    end

    def self.definition_method(meth)
      define_method(meth) do
        raise ArgumentError, "no definition when calling Runtime##{meth}" unless @definition
        @definition.send(meth)
      end
    end
    private_class_method :definition_method

    definition_method :requested_specs
    definition_method :specs
    definition_method :dependencies
    definition_method :current_dependencies
    definition_method :requires

    def lock(opts = {})
      return if @definition.no_resolve_needed?
      @definition.lock(Bundler.default_lockfile, opts[:preserve_unknown_sections])
    end

    alias_method :gems, :specs

    def cache(custom_path = nil, local = false)
      cache_path = Bundler.app_cache(custom_path)
      SharedHelpers.filesystem_access(cache_path) do |p|
        FileUtils.mkdir_p(p)
      end unless File.exist?(cache_path)

      Bundler.ui.info "Updating files in #{Bundler.settings.app_cache_path}"

      specs_to_cache = if Bundler.settings[:cachgems/gems/bundler-2.4.19/lib/bundler/setup.rb000064400000001703150403133440014502 0ustar00rune_cache(cache_path) unless Bundler.settings[:no_prune]
    end

    def prune_cache(cache_path)
      SharedHelpers.filesystem_access(cache_path) do |p|
        FileUtils.mkdir_p(p)
      end unless File.exist?(cache_path)
      resolve = @definition.resolve
      prune_gem_cache(resolve, cache_path)
      prune_git_and_path_cache(resolve, cache_path)
    end

    def clean(dry_run = false)
      gem_bins             = Dir["#{Gem.dir}/bin/*"]
      git_dirs             = Dir["#{Gem.dir}/bundler/gems/*"]
      git_cache_dirs       = Dir["#{Gem.dir}/cache/bundler/git/*"]
      gem_dirs             = Dir["#{Gem.dir}/gems/*"]
      gem_files            = Dir["#{Gem.dir}/cache/*.gem"]
      gemspec_files        = Dir["#{Gem.dir}/specifications/*.gemspec"]
      extension_dirs       = Dir["#{Gem.dir}/extensions/*/*/*"] + Dir["#{Gem.dir}/bundler/gems/extensions/*/*/*"]
      spec_gem_paths       = []
      # need to keep git sources around
      spec_gigems/gems/bundler-2.4.19/lib/bundler/runtime.rb000064400000024231150403133440015026 0ustar00 do |executable|
          e = "#{Bundler.rubygems.gem_bindir}/#{executable}"
          [e, "#{e}.bat"]
        end
        spec_cache_paths << spec.cache_file
        spec_gemspec_paths << spec.spec_file
        spec_extension_paths << spec.extension_dir if spec.respond_to?(:extension_dir)
        spec_git_cache_dirs << spec.source.cache_path.to_s if spec.source.is_a?(Bundler::Source::Git)
      end
      spec_gem_paths.uniq!
      spec_gem_executables.flatten!

      stale_gem_bins       = gem_bins - spec_gem_executables
      stale_git_dirs       = git_dirs - spec_git_paths - ["#{Gem.dir}/bundler/gems/extensions"]
      stale_git_cache_dirs = git_cache_dgems/gems/bundler-2.4.19/lib/bundler/force_platform.rb000064400000001055150403133440016344 0ustar00_dirs.each do |stale_dir|
          SharedHelpers.filesystem_access(stale_dir) do |dir|
            FileUtils.rm_rf(dir) if File.exist?(dir)
          end
        end
      end

      output
    end

    private

    def prune_gem_cache(resolve, cache_path)
      cached = Dir["#{cache_path}/*.gem"]

      cached = cached.delete_if do |path|
        spec = Bundler.rubygems.spec_from_gem path

        resolve.any? do |s|
          s.name == spec.name && s.version == spec.version && !s.source.is_a?(Bundler::Source::Git)
        end
      end

      if cagems/gems/bundler-2.4.19/lib/bundler/dsl.rb000064400000047737150403133450014146 0ustar00activated bundles to MANPATH for man(1)
      manuals = $LOAD_PATH.map do |path|
        man_subdir = path.sub(/lib$/, "man")
        man_subdir unless Dir[man_subdir + "/man?/"].empty?
      end.compact

      return if manuals.empty?
      Bundler::SharedHelpers.set_env "MANPATH", manuals.concat(
        ENV["MANPATH"] ? ENV["MANPATH"].to_s.split(File::PATH_SEPARATOR) : [""]
      ).uniq.join(File::PATH_SEPARATOR)
    end

    def remove_dir(dir, dry_run)
      full_name = Pathname.new(dir).basename.to_s

      parts    = full_name.split("-")
      name     = parts[0..-2].join("-")
      version  = parts.last
      output   = "#{name} (#{version})"

      if dry_run
        Bundler.ui.info "Would have removed #{output}"
      else
        Bundler.ui.info "Removing #{output}"
        FileUtils.rm_rf(dir)
      end

      output
    end

    def check_for_activated_spec!(spec)
      return unless activated_spec = Bundler.rubygems.loaded_specs(spec.name)
      return if activated_spec.version == spec.version

      suggestion = if activated_spec.default_gem?
        "Since #{spec.name} is a default gem, you can either remove your dependency on it" \
        " or try updating to a newer version of bundler that supports #{spec.name} as a default gem."
      else
        "Prepending `bundle exec` to your command may solve this."
      end

      e = Gem::LoadError.new "You have already activated #{activated_spec.name} #{activated_spec.version}, " \
                             "but your Gemfile requires #{spec.name} #{spec.version}. #{suggestion}"
      e.name = spec.name
      e.requirement = Gem::Requirement.new(spec.version.to_s)
      raise e
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/force_platform.rb000064400000001055150403133440016344 0ustar00# frozen_string_literal: true

module Bundler
  module ForcePlatform
    private

    # The `:force_ruby_platform` value used by dependencies for resolution, and
    # by locked specifications for materialization is `false` by default, except
    # for TruffleRuby. TruffleRuby generally needs to force the RUBY platform
    # variant unless the name is explicitly allowlisted.

    def default_force_ruby_platform
      return false unless RUBY_ENGINE == "truffleruby"

      !Gem::Platform::REUSE_AS_BINARY_ON_TRUFFLERUBY.include?(name)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/dsl.rb000064400000047737150403133450014146 0ustar00# frozen_string_literal: true

require_relative "dependency"
require_relative "ruby_dsl"

module Bundler
  class Dsl
    include RubyDsl

    def self.evaluate(gemfile, lockfile, unlock)
      builder = new
      builder.eval_gemfile(gemfile)
      builder.to_definition(lockfile, unlock)
    end

    VALID_PLATFORMS = Bundler::Dependency::PLATFORM_MAP.keys.freeze

    VALID_KEYS = %w[group groups git path glob name branch ref tag require submodules
                    platform platforms type source install_if gemfile force_ruby_platform].freeze

    GITHUB_PULL_REQUEST_URL = %r{\Ahttps://github\.com/([A-Za-z0-9_\-\.]+/[A-Za-z0-9_\-\.]+)/pull/(\d+)\z}.freeze

    attr_reader :gemspecs
    attr_accessor :dependencies

    def initialize
      @source               = nil
      @sources              = SourceList.new
      @git_sources          = {}
      @dependencies         = []
      @groups               = []
      @install_conditionals = []
      @optional_groups      = []
      @platforms            = []
      @env                  = nil
      @ruby_version         = nil
      @gemspecs             = []
      @gemfile              = nil
      @gemfiles             = []
      add_git_sources
    end

    def eval_gemfile(gemfile, contents = nil)
      expanded_gemfile_path = Pathname.new(gemfile).expand_path(@gemfile&.parent)
      original_gemfile = @gemfile
      @gemfile = expanded_gemfile_path
      @gemfiles << expanded_gemfile_path
      contents ||= Bundler.read_file(@gemfile.to_s)
      instance_eval(contents.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
    rescue Exception => e # rubocop:disable Lint/RescueException
      message = "There was an error " \
        "#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
        "`#{File.basename gemfile.to_s}`: #{e.message}"

      raise DSLError.new(message, gemfile, e.backtrace, contents)
    ensure
      @gemfile = original_gemfile
    end

    def gemspec(opts = nil)
      opts ||= {}
      path              = opts[:path] || "."
      glob              = opts[:glob]
      name              = opts[:name]
      development_group = opts[:development_group] || :development
      expanded_path     = gemfile_root.join(path)

      gemspecs = Gem::Util.glob_files_in_dir("{,*}.gemspec", expanded_path).map {|g| Bundler.load_gemspec(g) }.compact
      gemspecs.reject! {|s| s.name != name } if name
      specs_by_name_and_version = gemspecs.group_by {|s| [s.name, s.version] }

      case specs_by_name_and_version.size
      when 1
        specs = specs_by_name_and_version.values.first
        spec = specs.find {|s| s.match_platform(Bundler.local_platform) } || specs.first

        @gemspecs << spec

        gem spec.name, :name => spec.name, :path => path, :glob => glob

        group(development_group) do
          spec.development_dependencies.each do |dep|
            gem dep.name, *(dep.requirement.as_list + [:type => :development])
          end
        end
      when 0
        raise InvalidOption, "There are no gemspecs at #{expanded_path}"
      else
        raise InvalidOption, "There are multiple gemspecs at #{expanded_path}. " \
          "Please use the :name option to specify wgems/gems/bundler-2.4.19/lib/bundler/force_platform.rb000064400000001055150403133440016344 0ustar00te_prompt = ". Gem already added"
              else
                update_prompt = ". If you want to update the gem version, run `bundle update #{current.name}`"

                update_prompt += ". You may also need to change the version requirement specified in the Gemfile if it's too restrictive." unless current.requirements_list.include?(">= 0")
              end
            end

            raise GemfileError, "You cannot specify the same gem twice with different version requirements.\n" \
                            "You specified: #{current.ngems/gems/bundler-2.4.19/lib/bundler/dsl.rb000064400000047737150403133450014146 0ustar00 end

      @dependencies << dep
    end

    def source(source, *args, &blk)
      options = args.last.is_a?(Hash) ? args.pop.dup : {}
      options = normalize_hash(options)
      source = normalize_source(source)

      if options.key?("type")
        options["type"] = options["type"].to_s
        unless Plugin.source?(options["type"])
          raise InvalidOption, "No plugin sources available for #{options["type"]}"
        end

        unless block_given?
          raise InvalidOption, "You need to pass a block to #source with :type option"
        end

        source_opts = options.merge("uri" => source)
        with_source(@sources.add_plugin_source(options["type"], source_opts), &blk)
      elsif block_given?
        with_source(@sources.add_rubygems_source("remotes" => source), &blk)
      else
        @sources.add_global_rubygems_remote(source)
      end
    end

    def git_source(name, &block)
      unless block_given?
        raise InvalidOption, "You need to pass a block to #git_source"
      end

      if valid_keys.include?(name.to_s)
        raise InvalidOption, "You cannot use #{name} as a git source. It " \
          "is a reserved key. Reserved keys are: #{valid_keys.join(", ")}"
      end

      @git_sources[name.to_s] = block
    end

    def path(path, options = {}, &blk)
      source_options = normalize_hash(options).merge(
        "path" => Pathname.new(path),
        "root_path" => gemfile_root,
        "gemspec" => gemspecs.find {|g| g.name == options["name"] }
      )

      source_options["global"] = true unless block_given?

      source = @sources.add_path_source(source_options)
      with_source(source, &blk)
    end

    def git(uri, options = {}, &blk)
      unless block_given?
        msg = "You can no longer specify a git source by itself. Instead, \n" \
              "either use the :git option on a gem, or specify the gems that \n" \
              "bundler should find in the git source by passing a block to \n" \
              "the git method, like: \n\n" \
              "  git 'git://github.com/rails/rails.git' do\n" \
              "    gem 'rails'\n" \
              "  end"
        raise DeprecatedError, msg
      end

      with_source(@sources.add_git_source(normalize_hash(options).merge("uri" => uri)), &blk)
    end

    def github(repo, options = {})
      raise ArgumentError, "GitHub sources require a block" unless block_given?
      github_uri  = @git_sources["github"].call(repo)
      git_options = normalize_hash(options).merge("uri" => github_uri)
      git_source  = @sources.add_git_source(git_options)
      with_source(git_source) { yield }
    end

    def to_definition(lockfile, unlock)
      check_primary_source_safety
      Definition.new(lockfile, @dependencies, @sources, unlock, @ruby_version, @optional_groups, @gemfiles)
    end

    def group(*args, &blk)
      options = args.last.is_a?(Hash) ? args.pop.dup : {}
      normalize_group_options(options, args)

      @groups.concat args

      if options["optional"]
        optional_groups = args - @optional_groups
        @optional_groups.concat optional_groups
      end

      yield
    ensure
      args.each { @groups.pop }
    end

    def install_if(*args)
      @install_conditionals.concat args
      yield
    ensure
      args.each { @install_conditionals.pop }
    end

    def platforms(*platforms)
      @platforms.concat platforms
      yield
    ensure
      platforms.each { @platforms.pop }
    end
    alias_method :platform, :platforms

    def env(name)
      old = @env
      @env = name
      yield
    ensure
      @env = old
    end

    def plugin(*args)
      # Pass on
    end

    def method_missing(name, *args)
      raise GemfileError, "Undefined local variable or method `#{name}' for Gemfile"
    end

    def check_primary_source_safety
      check_path_source_safety
      check_rubygems_source_safety
    end

    private

    def add_git_sources
      git_source(:github) do |repo_name|
        if repo_name =~ GITHUB_PULL_REQUEST_URL
          {
            "git" => "https://github.com/#{$1}.git",
            "branch" => nil,
            "ref" => "refs/pull/#{$2}/head",
            "tag" => nil,
          }
        else
          repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
          "https://github.com/#{repo_name}.git"
        end
      end

      git_source(:gist) do |repo_name|
        "https://gist.github.com/#{repo_name}.git"
      end

      git_source(:bitbucket) do |repo_name|
        user_name, repo_name = repo_name.split("/")
        repo_name ||= user_name
        "https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
      end
    end

    def with_source(source)
      old_source = @source
      if block_given?
        @source = source
        yield
      end
      source
    ensure
      @source = old_source
    end

    def normalize_hash(opts)
      opts.keys.each do |k|
        opts[k.to_s] = opts.delete(k) unless k.is_a?(String)
      end
      opts
    end

    def valid_keys
      @valid_keys ||= VALID_KEYS
    end

    def normalize_options(name, version, opts)
      if name.is_a?(Symbol)
        raise GemfileError, %(You need to specify gem names as Strings. Use 'gem "#{name}"' instead)
      end
      if /\s/.match?(name)
        raise GemfileError, %('#{name}' is not a valid gem name because it contains whitespace)
      end
      raise GemfileError, %(an empty gem name is not valid) if name.empty?

      normalize_hash(opts)

      git_names = @git_sources.keys.map(&:to_s)
      validate_keys("gem '#{name}'", opts, valid_keys + git_names)

      groups = @groups.dup
      opts["group"] = opts.delete("groups") || opts["group"]
      groups.concat Array(opts.delete("group"))
      groups = [:default] if groups.empty?

      install_if = @install_conditionals.dup
      install_if.concat Array(opts.delete("install_if"))
      install_if = install_if.reduce(true) do |memo, val|
        memo && (val.respond_to?(:call) ? val.call : val)
      end

      platforms = @platforms.dup
      opts["platforms"] = opts["platform"] || opts["platforms"]
      platforms.concat Array(opts.delete("platforms"))
      platforms.map!(&:to_sym)
      platforms.each do |p|
        next if VALID_PLATFORMS.include?(p)
        raise GemfileError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"
      end

      # Save sources passed in a key
      if opts.key?("source")
        source = normalize_source(opts["source"])
        opts["source"] = @sources.add_rubygems_source("remotes" => source)
      end

      git_name = (git_names & opts.keys).last
      if @git_sources[git_name]
        git_opts = @git_sources[git_name].call(opts[git_name])
        git_opts = { "git" => git_opts } if git_opts.is_a?(String)
        opts.merge!(git_opts) do |key, _gemfile_value, _git_source_value|
          raise GemfileError, %(The :#{key} option can't be used with `#{git_name}: #{opts[git_name].inspect}`)
        end
      end

      %w[git path].each do |type|
        next unless param = opts[type]
        if version.first && version.first =~ /^\s*=?\s*(\d[^\s]*)\s*$/
          options = opts.merge("name" => name, "version" => $1)
        else
          options = opts.dup
        end
        source = send(type, param, options) {}
        opts["source"] = source
      end

      opts["source"]         ||= @source
      opts["env"]            ||= @env
      opts["platforms"]      = platforms.dup
      opts["group"]          = groups
      opts["should_include"] = install_if
    end

    def normalize_group_options(opts, groups)
      normalize_hash(opts)

      groups = groups.map {|group| ":#{group}" }.join(", ")
      validate_keys("group #{groups}", opts, %w[optional])

      opts["optional"] ||= false
    end

    def validate_keys(command, opts, valid_keys)
      invalid_keys = opts.keys - valid_keys

      git_source = opts.keys & @git_sources.keys.map(&:to_s)
      if opts["branch"] && !(opts["git"] || opts["github"] || git_source.any?)
        raise GemfileError, %(The `branch` option for `#{command}` is not allowed. Only gems with a git source can specify a branch)
      end

      return true unless invalid_keys.any?

      message = String.new
      message << "You passed #{invalid_keys.map {|k| ":" + k }.join(", ")} "
      message << if invalid_keys.size > 1
        "as options for #{command}, but they are invalid."
      else
        "as an option for #{command}, but it is invalid."
      end

      message << " Valid options are: #{valid_keys.join(", ")}."
      message << " You may be able to resolve this by upgrading Bundler to the newest version."
      raise InvalidOption, message
    end

    def normalize_source(source)
      case source
      when :gemcutter, :rubygems, :rubyforge
        Bundler::SharedHelpers.major_deprecation 2, "The source :#{source} is deprecated because HTTP " \
          "requests are insecure.\nPlease change your source to 'https://" \
          "rubygems.org' if possible, or 'http://rubygems.org' if not."
        "http://rubygems.org"
      when String
        source
      else
        raise GemfileError, "Unknown source '#{source}'"
      end
    end

    def check_path_source_safety
      return if @sources.global_path_source.nil?

      msg = "You can no longer specify a path source by itself. Instead, \n" \
              "either use the :path option on a gem, or specify the gems that \n" \
              "bundler should find in the path source by passing a block to \n" \
              "the path method, like: \n\n" \
              "    path 'dir/containing/rails' do\n" \
              "      gem 'rails'\n" \
              "    end\n\n"

      SharedHelpers.major_deprecation(2, msg.strip)
    end

    def check_rubygems_source_safety
      if @sources.implicit_global_source?
        implicit_global_source_warning
      elsif @sources.aggregate_global_source?
        multiple_global_source_warning
      end
    end

    def implicit_global_source_warning
      Bundler::SharedHelpers.major_deprecation 2, "This Gemfile does not include an explicit global source. " \
        "Not using an explicit global source may result in a different lockfile being generated depending on " \
        "the gems you have installed locally before bundler is run. " \
        "Instead, define a global source in your Gemfile like this: source \"https://rubygems.org\"."
    end

    def multiple_global_source_warning
      if Bundler.feature_flag.bundler_3_mode?
        msg = "This Gemfile contains multiple global sources. " \
          "Each source after the first must include a block to indicate which gems " gems/gems/bundler-2.4.19/lib/bundler/deprecate.rb000064400000001554150403133450015303 0ustar00 should be presented to the user.
      #
      attr_reader :description

      # @return [String] the path of the dsl file that raised the exception.
      #
      attr_reader :dsl_path

      # @return [Exception] the backtrace of the exception raised by the
      #         evaluation of the dsl file.
      #
      attr_reader :backtrace

      # @param [Exception] backtrace @see backtrace
      # @param [String]    dsl_path  @see dsl_path
      #
      def initialize(description, dsl_path, backtrace, contents = nil)
        @status_code = $!.respond_to?(:status_code) && $!.status_code

        @description = description
        @dsl_path    = dsl_path
        @backtrace   = backtrace
        @contents    = contents
      end

      def status_code
        @status_code || super
      end

      # @return [String] the contents of the DSL that cause the exception gems/gems/bundler-2.4.19/lib/bundler/match_platform.rb000064400000001107150403133450016341 0ustar00 break: #import <CoreData/CoreData.h>
      #    >      ns.exclude_header_search_paths = 'Code/RestKit.h'
      #         end
      #       -------------------------------------------
      #
      # @return [String] the message of the exception.
      #
      def to_s
        @to_s ||= begin
          trace_line, description = parse_line_number_from_description

          m = String.new("\n[!] ")
          m << description
          m << ". Bundler cannot continue.\n"

          return m unless backtrace && dsl_path && contents

          trace_line = backtrace.find {|l| l.ingems/gems/bundler-2.4.19/lib/bundler/shared_helpers.rb000064400000025412150403133460016337 0ustar00lf.description
        if dsl_path && description =~ /((#{Regexp.quote File.expand_path(dsl_path)}|#{Regexp.quote dsl_path.to_s}):\d+)/
          trace_line = Regexp.last_match[1]
          description = description.sub(/\n.*\n(\.\.\.)? *\^~+$/, "").sub(/#{Regexp.quote trace_line}:\s*/, "").sub("\n", " - ")
        end
        [trace_line, description]
      end
    end

    def gemfile_root
      @gemfile ||= Bundler.default_gemfile
      @gemfile.dirname
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/deprecate.rb000064400000001554150403133450015303 0ustar00# frozen_string_literal: true

begin
  require "rubygems/deprecate"
rescue LoadError
  # it's fine if it doesn't exist on the current RubyGems...
  nil
end

module Bundler
  # If Bundler::Deprecate is an autoload constant, we need to define it
  if defined?(Bundler::Deprecate) && !autoload?(:Deprecate)
    # nothing to do!
  elsif defined? ::Deprecate
    Deprecate = ::Deprecate
  elsif defined? Gem::Deprecate
    Deprecate = Gem::Deprecate
  else
    class Deprecate
    end
  end

  unless Deprecate.respond_to?(:skip_during)
    def Deprecate.skip_during
      original = skip
      self.skip = true
      yield
    ensure
      self.skip = original
    end
  end

  unless Deprecate.respond_to?(:skip)
    def Deprecate.skip
      @skip ||= false
    end
  end

  unless Deprecate.respond_to?(:skip=)
    def Deprecate.skip=(skip)
      @skip = skip
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/match_platform.rb000064400000001107150403133450016341 0ustar00# frozen_string_literal: true

require_relative "gem_helpers"

module Bundler
  module MatchPlatform
    include GemHelpers

    def match_platform(p)
      MatchPlatform.platforms_match?(platform, p)
    end

    def self.platforms_match?(gemspec_platform, local_platform)
      return true if gemspec_platform.nil?
      return true if Gem::Platform::RUBY == gemspec_platform
      return true if local_platform == gemspec_platform
      gemspec_platform = Gem::Platform.new(gemspec_platform)
      return true if gemspec_platform === local_platform

      false
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/shared_helpers.rb000064400000025412150403133460016337 0ustar00# frozen_string_literal: true

require "pathname"
require "rbconfig"

require_relative "version"
require_relative "constants"
require_relative "rubygems_integration"
require_relative "current_ruby"

module Bundler
  module SharedHelpers
    def root
      gemfile = find_gemfile
      raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
      Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent
    end

    def default_gemfile
      gemfile = find_gemfile
      raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
      Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path
    end

    def default_lockfile
      gemfile = default_gemfile

      case gemfile.basename.to_s
      when "gems.rb" then Pathname.new(gemfile.sub(/.rb$/, ".locked"))
      else Pathname.new("#{gemfile}.lock")
      end.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
    end

    def default_bundle_dir
      bundle_dir = find_directory(".bundle")
      return nil unless bundle_dir

      bundle_dir = Pathname.new(bundle_dir)

      global_bundle_dir = Bundler.user_home.join(".bundle")
      return nil if bundle_dir == global_bundle_dir

      bundle_dir
    end

    def in_bundle?
      find_gemfile
    end

    def chdir(dir, &blk)
      Bundler.rubygems.ext_lock.synchronize do
        Dir.chdir dir, &blk
      end
    end

    def pwd
      Bundler.rubygems.ext_lock.synchronize do
        Pathname.pwd
      end
    end

    def with_clean_git_env(&block)
      keys    = %w[GIT_DIR GIT_WORK_TREE]
      old_env = keys.inject({}) do |h, k|
        h.update(k => ENV[k])
      end

      keys.each {|key| ENV.delete(key) }

      block.call
    ensure
      keys.each {|key| ENV[key] = old_env[key] }
    end

    def set_bundle_environment
      set_bundle_variables
      set_path
      set_rubyopt
      set_rubylib
    end

    # Rescues permissions errors raised by file system operations
    # (ie. Errno:EACCESS, Errno::EAGAIN) and raigems/gems/bundler-2.4.19/lib/bundler/deprecate.rb000064400000001554150403133450015303 0ustar00ileUtils.mkdir_p("vendor/cache")
    #   end
    #
    # @see {Bundler::PermissionError}
    def filesystem_access(path, action = :write, &block)
      yield(path.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" })
    rescue Errno::EACCES
      raise PermissionError.new(path, action)
    rescue Errno::EAGAIN
      raise TemporaryResourceError.new(path, action)
    rescue Errno::EPROTO
      raise VirtualProtocolError.new
    rescue Errno::ENOSPC
      raise NoSpaceOnDeviceError.new(path, action)
    rescue Errno::ENOTSUP
      raise OperationNotSupportedError.new(path, action)
    rescue Errno::EEXIST, Errno::ENOENT
      raise
    rescue SystemCallError => e
      raise GenericSystemCallError.new(e, "There was an error accessing `#{path}`.")
    end

    def major_deprecation(major_version, message, print_caller_location: false)
      if print_caller_location
    gems/gems/bundler-2.4.19/lib/bundler/match_platform.rb000064400000001107150403133450016341 0ustar00_path(gf, dir) }
        next if gemfiles.empty?
        break gemfiles.size != 1
      end
      return unless multiple_gemfiles
      message = "Multiple gemfiles (gems.rb and Gemfile) detected. " \
                "Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.locked."
      Bundler.ui.warn message
    end

    def ensure_same_dependencies(spec, old_deps, new_deps)
      new_deps = new_deps.reject {|d| d.type == :development }
      old_deps = old_deps.reject {|d| d.type == :development }

      without_type = procgems/gems/bundler-2.4.19/lib/bundler/shared_helpers.rb000064400000025412150403133460016337 0ustar00form_string.empty? && platform_string != Gem::Platform::RUBY
      end

      msg
    end

    def md5_available?
      return @md5_available if defined?(@md5_available)
      @md5_available = begin
        require "openssl"
        ::OpenSSL::Digest.digest("MD5", "")
        true
      rescue LoadError
        true
      rescue ::OpenSSL::Digest::DigestError
        false
      end
    end

    def digest(name)
      require "digest"
      Digest(name)
    end

    def write_to_gemfile(gemfile_path, contents)
      filesystem_access(gemfile_path) {|g| File.open(g, "w") {|file| file.puts contents } }
    end

    private

    def validate_bundle_path
      path_separator = Bundler.rubygems.path_separator
      return unless Bundler.bundle_path.to_s.split(path_separator).size > 1
      message = "Your bundle path contains text matching #{path_separator.inspect}, " \
                "which is the path separator for your system. Bundler cannot " \
                "function correctly when the Bundle path contains the " \
                "system's PATH separator. Please change your " \
                "bundle path to not match #{path_separator.inspect}." \
                "\nYour current bundle path is '#{Bundler.bundle_path}'."
      raise Bundler::PathError, message
    engems/gems/bundler-2.4.19/lib/bundler/ruby_dsl.rb000064400000001701150403133460015165 0ustar00directory when testing
          gemspec = if ENV["GEM_COMMAND"]
            # for Ruby Core
            "lib/bundler/bundler.gemspec"
          else
            "bundler.gemspec"
          end

          # avoid stepping above the tmp directory when testing
          return nil if File.file?(File.join(current, gemspec))
        end

        names.each do |name|
          filename = File.join(current, name)
          yield filename
        end
        previous = current
        current = File.expand_path("..", current)
      end
    end

    def set_env(key, value)
      raise ArgumentError, "new key #{key}" unless EnvironmentPreserver::BUNDLER_KEYS.include?(key)
      orig_key = "#{EnvironmentPreserver::BUNDLER_PREFIX}#{key}"
      orig = ENV[key]
      orig ||= EnvironmentPreserver::INTENTIONALLY_NIL
      ENV[orig_key] ||= orig

      ENV[key] = value
    end
    public :set_env

    def set_bundle_variables
      # bundler exe & lib folders hagems/gems/bundler-2.4.19/lib/bundler/resolver/package.rb000064400000003341150403133460016600 0ustar00t_env "BUNDLER_VERSION", Bundler::VERSION
      Bundler::SharedHelpers.set_env "BUNDLER_SETUP", File.expand_path("setup", __dir__) unless RUBY_VERSION < "2.7"
    end

    def set_path
      validate_bundle_path
      paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
      paths.unshift "#{Bundler.bundle_path}/bin"
      Bundler::SharedHelpers.set_env "PATH", paths.uniq.join(File::PATH_SEPARATOR)
    end

    def set_rubyopt
      rubyopt = [ENV["RUBYOPT"]].compact
      setup_require = "-r#{File.expand_path("setup", __dir__)}"
      return if !rubyopt.empty? && rubyopt.first =~ /#{setup_require}/
      rubyopt.unshift setup_require
      Bundler::SharedHelpers.set_env "RUBYOPT", rubyopt.join(" ")
    end

    def set_rubylib
      rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
      rubylib.unshift bundler_ruby_lib unless RbConfig::CONFIG["rubylibdir"] == bundler_ruby_lib
      Bundler::SharedHelpers.set_env "RUBYLIB", rubylib.uniq.join(File::PATH_SEPARATOR)
    end

    def bundler_ruby_lib
      File.expand_path("..", __dir__)
    end

    def clean_load_path
      loaded_gem_paths = Bundler.rubygems.loaded_gem_paths

      $LOAD_PATH.reject! do |p|
        resolved_path = resolve_path(p)
        next if $LOADED_FEATURES.any? {|lf| lf.start_with?(resolved_path) }
        loaded_gem_paths.delete(p)
      end
      $LOAD_PATH.uniq!
    end

    def resolve_path(path)
      expanded = File.expand_path(path)
      return expanded unless File.exist?(expanded)

      File.realpath(expanded)
    end

    def prints_major_deprecations?
      require_relative "../bundler"
      return false if Bundler.settings[:silence_deprecations]
      require_relative "deprecate"
      return false if Bundler::Deprecate.skip
     gems/gems/bundler-2.4.19/lib/bundler/resolver/spec_group.rb000064400000003450150403133460017354 0ustar00# frozen_string_literal: true

module Bundler
  module RubyDsl
    def ruby(*ruby_version)
      options = ruby_version.last.is_a?(Hash) ? ruby_version.pop : {}
      ruby_version.flatten!

      raise GemfileError, "Please define :engine_version" if options[:engine] && options[:engine_version].nil?
      raise GemfileError, "Please define :engine" if options[:engine_version] && options[:engine].nil?

      if options[:file]
        raise GemfileError, "Cannot specify version when using the file option" if ruby_version.any?
        ruby_version << Bundler.read_file(options[:file]).strip
      end

      if options[:engine] == "ruby" && options[:engine_version] &&
         ruby_version != Array(options[:engine_version])
        raise GemfileEvalError, "ruby_version must match the :engine_version for MRI"
      end
      @ruby_version = RubyVersion.new(ruby_version, options[:patchlevel], options[:engine], options[:engine_version])
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/resolver/package.rb000064400000003341150403133460016600 0ustar00# frozen_string_literal: true

module Bundler
  class Resolver
    #
    # Represents a gem being resolved, in a format PubGrub likes.
    #
    # The class holds the following information:
    #
    # * Platforms this gem will be resolved on.
    # * The locked version of this gem resolution shgems/gems/bundler-2.4.19/lib/bundler/resolver/base.rb000064400000004654150403133470016130 0ustar00"\0")
      end

      def root?
        false
      end

      def meta?
        @name.end_with?("\0")
      end

      def ==(other)
        self.class == other.class && @name == other.name
      end

      def hash
        @name.hash
      end

      def unlock?
        @unlock.empty? || @unlock.include?(name)
      end

      def ignores_prereleases?
        @prerelease == :ignore
      end

      def prerelease_specified?
        @prerelease == :consider_first
      end

      def consider_prereleases!
        @prerelease = :consider_last
      end

      def force_ruby_platform?
        @dependency.force_ruby_platform
      end

      def current_platform?
        @dependency.current_platform?
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/resolver/spec_group.rb000064400000003450150403133460017354 0ustar00# frozen_string_literal: true

module Bundler
  class Resolver
    class SpecGroup
      def initialize(specs)
        @specs = specs
      end

      def empty?
        @specs.empty?
      end

      def name
        @name ||= exemplary_spec.name
      end

      def version
        @version ||= exemplary_spec.version
      end

      def source
        @source ||= exemplary_spec.source
      end

      def to_specs(force_ruby_platform)
        @specs.map do |s|
          lazy_spec = LazySpecification.new(name, version, s.platform, source)
          lazy_spec.force_ruby_platform = force_ruby_platform
          lazy_spec.dependencies.replace s.dependencies
          lazy_spec
        end
      end

      def to_s
        sorted_spec_names.join(", ")
      end

      dgems/gems/bundler-2.4.19/lib/bundler/resolver/root.rb000064400000000630150403133470016167 0ustar00ersion),
          metadata_dependency("RubyGems", spec.required_rubygems_version),
        ].compact
      end

      def metadata_dependency(name, requirement)
        return if requirement.nil? || requirement.none?

        Dependency.new("#{name}\0", requirement)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/resolver/candidate.rb000064400000004210150403133500017110 0ustar00gems/gems/bundler-2.4.19/lib/bundler/resolver/package.rb000064400000003341150403133460016600 0ustar00_platforms = dep.gem_platforms(platforms)

          # Dependencies scoped to external platforms are ignored
          next if dep_platforms.empty?

          name = dep.name

          @packages[name] = Package.new(name, dep_platforms, **options.merge(:dependency => dep))

          dep
        end.compact
      end

      def [](name)
        @base[name]
      end

      def delete(specs)
        @base.delete(specs)
      end

      def get_package(name)
        @packages[name]
      end

      def base_requirements
        @base_requirements ||= build_base_requirements
      end

      def unlock_names(names)
        indirect_pins = indirect_pins(names)

        if indirect_pins.any?
          loosen_names(indirect_pins)
        else
          pins = pins(names)

          if pins.any?
            loosen_names(pins)
          else
            unrestrict_names(names)
          end
        end
      end

      def include_prereleases(names)
        names.each do |name|
          get_package(name).consider_prereleases!
        end
      end

      private

      def indirect_pins(names)
        names.select {|name| @base_requirements[name].exact? && @requirements.none? {|dep| dep.name == name } }
      end

      def pins(names)
        names.select {|name| @base_requirements[name].exact? }
      end

      def loosen_names(names)
        names.each do |name|
          version = @base_requirements[name].requirements.first[1]

          @base_requirements[name] = Gem::Requirement.new(">= #{version}")

          @base.delete_by_name(name)
        end
      end

      def unrestrict_names(names)
        names.each do |name|
          @base_requiregems/gems/bundler-2.4.19/lib/bundler/resolver/incompatibility.rb000064400000000630150403133500020376 0ustar00# frozen_string_literal: true

require_relative "package"

module Bundler
  class Resolver
    #
    # Represents the Gemfile from the resolver's perspective. It's the root
    # package and Gemfile entries depend on it.
    #
    class Root < Package
      def initialize(name)
        @name = name
      end

      def meta?
        true
      end

      def root?
        true
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/settings.rb000064400000032305150403133510015202 0ustar00# frozen_string_literal: true

require_relative "spec_group"

module Bundler
  class Resolver
    #
    # This class is a PubGrub compatible "Version" class that takes Bundler
    # resolution complexities into account.
    #
    # Each Resolver::Candidate has a underlying `Gem::Version` plus a set of
    # platforms. For example, 1.1.0-x86_64-linux is a different resolution candidate
    # from 1.1.0 (generic). This is because different platform variants of the
    # same gem version can bring different dependencies, so they need to be
    # considered separately.
    #
    # Some candidates may also keep some information explicitly about the
    # package the refer to. These candidates are referred to as "canonical" and
    # are used when materializing resolution results back into RubyGems
    gems/gems/bundler-2.4.19/lib/bundler/resolver/base.rb000064400000004654150403133470016130 0ustar00
      def prerelease?
        @version.prerelease?
      end

      def segments
        @version.segments
      end

      def sort_obj
        [@version, @ruby_only ? -1 : 1]
      end

      def <=>(other)
        return unless other.is_a?(self.class)

        sort_obj <=> other.sort_obj
      end

      def ==(other)
        return unless other.is_a?(self.class)

        sort_obj == other.sort_obj
      end

      def eql?(other)
        return unless other.is_a?(self.class)

        sort_obj.eql?(other.sort_obj)
      end

      def hash
        sort_obj.hash
      end

      def to_s
        @version.to_s
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/resolver/incompatibility.rb000064400000000630150403133500020376 0ustar00# frozen_string_literal: true

module Bundler
  class Resolver
    class Incompatibility < PubGrub::Incompatibility
      attr_reader :extended_explanation

      def initialize(terms, cause:, custom_explanation: nil, extended_explanation: nil)
        @extended_explanation = extended_explanation

        super(terms, :cause => cause, :custom_explanation => custom_explanation)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/settings.rb000064400000032305150403133510015202 0ustar00gems/gems/bundler-2.4.19/lib/bundler/resolver/root.rb000064400000000630150403133470016167 0ustar00sable_checksum_validation
      disable_exec_load
      disable_local_branch_check
      disable_local_revision_check
      disable_shared_gems
      disable_version_check
      force_ruby_platform
      forget_cli_options
      frozen
      gem.changelog
      gem.coc
      gem.mit
      git.allow_insecure
      global_gem_cache
      ignore_messages
      init_gems_rb
      inline
      no_install
     gems/gems/bundler-2.4.19/lib/bundler/resolver/candidate.rb000064400000004210150403133500017110 0ustar00   shebang
      system_bindir
      trust-policy
    ].freeze

    DEFAULT_CONFIG = {
      "BUNDLE_SILENCE_DEPRECATIONS" => false,
      "BUNDLE_DISABLE_VERSION_CHECK" => true,
      "BUNDLE_PREFER_PATCH" => false,
      "BUNDLE_REDIRECT" => 5,
      "BUNDLE_RETRY" => 3,
      "BUNDLE_TIMEOUT" => 10,
    }.freeze

    def initialize(root = nil)
      @root            = root
      @local_config    = load_config(local_config_file)
      @env_config      = ENV.to_h.select {|key, _value| key =~ /\ABUNDLE_.+/ }
      @global_config   = load_config(global_config_file)
      @temporary       = {}
    end

    def [](name)
      key = key_for(name)
      value = configs.values.map {|config| config[key] }.compact.first

      converted_value(value, name)
    end

    def set_command_option(key, value)
      if Bundler.feature_flag.forget_cli_options?
        temporary(key => value)
        value
      else
        set_local(key, value)
      end
    end

    def set_command_option_if_given(key, value)
      return if value.nil?
      set_command_option(key, value)
    end

    def set_local(key, value)
      local_config_file || raise(GemfileNotFound, "Could not locate Gemfile")

      set_key(key, value, @local_config, local_config_file)
    end

    def temporary(update)
      existing = Hash[update.map {|k, _| [k, @temporary[key_for(k)]] }]
      update.each do |k, v|
        set_key(k, v, @temporary, nil)
      end
      return unless block_given?
      begin
        yield
      ensure
        existing.each {|k, v| set_key(k, v, @temporary, nil) }
      end
    end

    def set_global(key, value)
      set_key(key, value, @global_config, global_config_file)
    end

    def all
      keys = @temporary.keys | @global_config.keys | @local_config.keys | @env_config.keys

      keys.map do |key|
        key.sub(/^BUNDLE_/, "").gsub(/___/, "-").gsub(/__/, ".").downcase
      end.sort
    end

    def local_overrides
      repos = {}
      all.each do |k|
        repos[$'] = self[k] if k =~ /^local\./
      end
      repos
    end

    def mirror_for(uri)
      if uri.is_a?(String)
        require_relative "vendored_uri"
        uri = Bundler::URI(uri)
  gems/gems/bundler-2.4.19/lib/bundler/resolver/incompatibility.rb000064400000000630150403133500020376 0ustar00(#{local_config_file}): #{printable_value(value, exposed_key).inspect}"
      end

      if value = @env_config[key]
        locations << "Set via #{key}: #{printable_value(value, exposed_key).inspect}"
      end

      if value = @global_config[key]
        locations << "Set for the current user (#{global_config_file}): #{printable_value(value, exposed_key).inspect}"
      end

      return ["You have nogems/gems/bundler-2.4.19/lib/bundler/settings.rb000064400000032305150403133510015202 0ustar00(disabled_shared_gems == false)
        return Path.new(path, system_path)
      end

      path = "vendor/bundle" if self[:deployment]

      Path.new(path, false)
    end

    Path = Struct.new(:explicit_path, :system_path) do
      def path
        path = base_path
        path = File.join(path, Bundler.ruby_scope) unless use_system_gems?
        path
      end

      def use_system_gems?
        return true if system_path
        return false if explicit_path
        !Bundler.feature_flag.default_install_uses_path?
      end

      def base_path
        path = explicit_path
        path ||= ".bundle" unless use_system_gems?
        path ||= Bundler.rubygems.gem_dir
        path
      end

      def base_path_relative_to_pwd
        base_path = Pathname.new(self.base_path)
        expanded_base_path = base_path.expand_path(Bundler.root)
        relative_path = expanded_base_path.relative_path_from(Pathname.pwd)
        if relative_path.to_s.start_with?("..")
          relative_path = base_path if base_path.absolute?
        else
          relative_path = Pathname.new(File.join(".", relative_path))
        end
        relative_path
      rescue ArgumentError
        expanded_base_path
      end

      def validate!
        return unless explicit_path && system_path
        path = Bundler.settings.pretty_values_for(:path)
        path.unshift(nil, "path:") unless path.empty?
        system_path = Bundler.settings.pretty_values_for("path.system")
        system_path.unshift(nil, "path.system:") unless system_path.empty?
        disable_shared_gems = Bundler.settings.pretty_values_for(:disable_shared_gems)
        disable_shared_gems.unshift(nil, "disable_shared_gems:") unless disable_shared_gems.empty?
        raise InvalidOption,
          "Using a custom path while using system gems is unsupported.\n#{path.join("\n")}\n#{system_path.join("\n")}\n#{disable_shared_gems.join("\n")}"
      end
    end

    def ignore_config?
      ENV["BUNDLE_IGNORE_CONFIG"]
    end

    def app_cache_path
      @app_cache_path ||= self[:cache_path] || "vendor/cache"
    end

    def validate!
      all.each do |raw_key|
        [@local_config, @env_config, @global_config].each do |settings|
          value = value_for(raw_key, settings)
          Validator.validate!(raw_key, value, settings.dup)
        end
      end
    end

    def key_for(key)
      self.class.key_for(key)
    end

    private

    def configs
      {
        :temporary => @temporary,
        :local => @local_config,
        :env => @env_config,
        :global => @global_config,
        :default => DEFAULT_CONFIG,
      }
    end

    def value_for(name, config)
      converted_value(config[key_for(name)], name)
    end

    def parent_setting_for(name)
      split_specific_setting_for(name)[0]
    end

    def specific_gem_for(name)
      split_specific_setting_for(name)[1]
    end

    def split_specific_setting_for(name)
      name.split(".")
    end

    def is_bool(name)
      BOOL_KEYS.include?(name.to_s) || BOOL_KEYS.include?(parent_setting_for(name.to_s))
    end

    def is_string(name)
      STRING_KEYS.include?(name.to_s) || name.to_s.start_with?("local.") || name.to_s.start_with?("mirror.") || name.to_s.start_with?("build.")
    end

    def to_bool(value)
      case value
      when nil, /\A(false|f|no|n|0|)\z/i, false
        false
      else
        true
      end
    end

    def is_num(key)
      NUMBER_KEYS.include?(key.to_s)
    end

    def is_array(key)
      ARRAY_KEYS.include?(key.to_s)
    end

    def is_credential(key)
      key == "gem.push_key"
    end

    def is_userinfo(value)
      value.include?(":")
    end

    def to_array(value)
      return [] unless value
      value.tr(" ", ":").split(":").map(&:to_sym)
    end

    defgems/gems/bundler-2.4.19/lib/bundler/ui/rg_proxy.rb000064400000000460150403133510015625 0ustar00(key) || value == "false"
        to_bool(value)
      elsif is_num(key)
        value.to_i
      else
        value.to_s
      end
    end

    def printable_value(value, key)
      converted = converted_value(value, key)
      return converted unless converted.is_a?(String)

      if is_string(key)
  gems/gems/bundler-2.4.19/lib/bundler/ui/shell.rb000064400000007247150403133510015075 0ustar00USER_HOME"]).join("config")
      elsif Bundler.rubygems.user_home && !Bundler.rubygems.user_home.empty?
        Pathname.new(Bundler.rubygems.user_home).join(".bundle/config")
      end
    end

    def local_config_file
      Pathname.new(@root).join("config") if @root
    end

    def load_config(config_file)
      return {} if !config_file || ignore_config?
      SharedHelpers.filesystem_access(config_file, :read) do |file|
        valid_file = file.exist? && !file.size.zero?
        return {} unless valid_file
        require_relative "yaml_serializer"
        YAMLSerializer.load(file.read).inject({}) do |config, (k, v)|
          new_k = k

          if k.include?("-")
            Bundler.ui.warn "Your #{file} config includes `#{k}`, which contains the dash character (`-`).\n" \
              "This is deprecated, because configuration through `ENV` should be possible, but `ENV` keys cannot include dashes.\n" \
              "Please edit #{file} and replace any dashes in configuration keys with a triple underscore (`___`)."

            new_k = k.gsub("-", "___")
          end

          config[new_k] = v
          config
        end
      end
    end

    PER_URI_OPTIONS = %w[
      fallback_timeout
    ].freeze

    NORMALIZE_URI_OPTIONS_PATTERN =
      /
        \A
        (\w+\.)? # optional prefix key
        (https?.*?) # URI
        (\.#{Regexp.union(PER_URI_OPTIONS)})? # optional suffix key
        \z
      /ix.freeze

    def self.key_for(key)
      key = normalize_uri(key).to_s if key.is_a?(String) && key.start_with?("http", "mirror.http")
      key = key.to_s.gsub(".", "__").gsub("-", "___").upcase
      "BUNDLE_#{key}"
    end

    # TODO: duplicates Rubygems#normalize_uri
    # TODO: is this the correct place to validate mirror URIs?
    def self.normalize_uri(uri)
      uri = uri.to_s
      if uri =~ NORMALIZE_URI_OPTIONS_PATTERN
        prefix = $1
        uri = $2
        suffix = $3
      end
      uri = URINormalizer.normalize_suffix(uri)
      require_relative "vendored_uri"
      uri = Bundler::URI(uri)
      unless uri.absolute?
        raise ArgumentError, format("Gem sources must be absolute. You provided '%s'.", uri)
      end
      "#{prefix}#{uri}#{suffix}"
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/ui/rg_proxy.rb000064400000000460150403133510015625 0ustar00# frozen_string_literal: true

require_relative "../ui"
require "rubygems/user_interaction"

module Bundler
  module UI
    class RGProxy < ::Gem::SilentUI
      def initialize(ui)
        @ui = ui
        super()
      end

      def say(message)
        @ui&.debug(message)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/ui/shell.rb000064400000007247150403133510015075 0gems/gems/bundler-2.4.19/lib/bundler/ui/silent.rb000064400000002323150403133510015252 0ustar00r)
      end

      def info(msg = nil, newline = nil)
        return unless info?

        tell_me(msg || yield, nil, newline)
      end

      def confirm(msg = nil, newline = nil)
        return unless confirm?

        tell_me(msg || yield, :green, newline)
      end

      def warn(msg = nil, newline = nil, color = :yellow)
        return unless warn?
        return if @warning_history.include? msg
        @warning_history << msg

        tell_err(msg || yield, color, newline)
      end

      def error(msg = nil, newline = nil, color = :red)
        return unless error?

        tell_err(msg || yield, color, newline)
      end

      def debug(msg = nil, newline = nil)
        return unless debug?

        tell_me(msg || yield, nil, newline)
      end

      def info?
        level("info")
      end

      def confirm?
        level("confirm")
      end

      def warn?
        level("warn")
      end

      def error?
        level("error")
      end

      def debug?
        level("debug")
      end

      def quiet?
        level("quiet")
      end

      def ask(msg)
        @shell.ask(msg)
      end

      def yes?(msg)
        @shell.yes?(msg)
      end

      def no?
        @shell.no?(msg)
      end

 gems/gems/bundler-2.4.19/lib/bundler/graph.rb000064400000011761150403133510014446 0ustar00ne[:wrap]
        if newline.nil?
          @shell.say(msg, color)
        else
          @shell.say(msg, color, newline)
        end
      end

      def tell_err(message, color = nil, newline = nil)
        return if @shell.send(:stderr).closed?

        newline ||= message.to_s !~ /( |\t)\Z/
        message = word_wrap(message) if newline.is_a?(Hash) && newline[:wrap]

        color = nil if color && !$stderr.tty?

        buffer = @shell.send(:prepare_message, message, *color)
        buffer << "\n" if newline && !message.to_s.end_with?("\n")

        @shell.send(:stderr).print(buffer)
        @shell.send(:stderr).flush
      end

      def strip_leading_spaces(text)
        spaces = text[/\A\s+/, 0]
        spaces ? text.gsub(/#{spaces}/, "") : text
      end

      def word_wrap(text, line_width = @shell.terminal_width)
        strip_leading_spaces(text).split("\n").collect do |line|
          line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1\n").strip : line
        end * "\n"
      end

      def with_level(level)
        original = @level
        @level = level
        yield
      ensure
        @level = original
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/ui/rg_proxy.rb000064400000000460150403133510015625 0ustar00# frozen_string_literal: true

module Bundler
  module UI
    class Silent
      attr_writer :shell

      def initialize
        @warnings = []
      end

      def add_color(string, color)
        string
      end

      def info(message = nil, newline = nil)
      end

      def confirm(message = nilgems/gems/bundler-2.4.19/lib/bundler/ui/shell.rb000064400000007247150403133510015075 0ustar00vel(name = nil)
      end

      def trace(message, newline = nil, force = false)
      end

      def silence
        yield
      end

      def unprinted_warnings
        @warnings
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/graph.rb000064400000011761150403133510014446 0ustar00# frozen_string_literal: true

require "set"
module Bundler
  class Graph
    GRAPH_NAME = :Gemfile

    def initialize(env, output_file, show_version = false, show_requirements = false, output_format = "png", without = [])
      @env               = env
      @output_file       = output_file
      @show_version      = show_version
      @show_requirements = show_requirements
      @output_format     = output_format
      @without_groups    = without.map(&:to_sym)

      @groups            = []
      @relations         = Hash.new {|h, k| h[k] = Set.new }
      @node_options      = {}
      @edge_options      = {}

      _populate_relations
    end

    attr_reader :groups, :relations, :node_options, :edge_options, :output_file, :output_format

    def viz
      GraphVizClient.new(self).run
    end

    private

    def _populate_relations
      parent_dependencies = _groups.values.to_set.flatten
      loop do
        break if parent_dependencies.empty?

        tmp = Set.new
        parent_depegems/gems/bundler-2.4.19/lib/bundler/compact_index_client.rb000064400000006561150403133510017522 0ustar00      end
    end

    def _groups
      relations = Hash.new {|h, k| h[k] = Set.new }
      @env.current_dependencies.each do |dependency|
        dependency.groups.each do |group|
          next if @without_groups.include?(group)

          relations[group.to_s].add(dependency)
          @relations[group.to_s].add(dependency.name)

          @node_options[group.to_s] ||= _make_label(group, :node)
          @edge_options["#{group}_#{dependency.name}"] = _make_label(dependency, :edge)
        end
      end
      @groups = relations.keys
      relations
    end

    def _make_label(symbol_or_string_or_dependency, element_type)
      case element_type.to_sym
      when :node
        if symbol_or_string_or_dependency.is_a?(Gem::Dependency)
          label = symbol_or_string_or_dependency.name.dup
          label << "\n#{spec_for_dependency(symbol_or_string_or_dependency).version}" if @show_version
        else
          label = symbol_or_string_or_dependency.to_s
        end
      when :edge
        label = nil
        if symbol_or_string_or_dependency.respond_to?(:requirements_list) && @show_requirements
          tmp = symbol_or_string_or_dependency.requirements_list.join("gems/gems/bundler-2.4.19/lib/bundler/ui/silent.rb000064400000002323150403133510015252 0ustar00 do |g|
          g.edge[:weight]   = 2
          g.edge[:fontname] = g.node[:fontname] = "Arial, Helvetica, SansSerif"
          g.edge[:fontsize] = 12
        end
      end

      def run
        @groups.each do |group|
          g.add_nodes(
            group, {
              :style => "filled",
              :fillcolor => "#B9B9D5",
              :shape => "box3d",
              :fontsize => 16,
            }.merge(@node_options[group])
          )
        end

        @relations.each do |parent, children|
          children.each do |child|
            if @groups.include?(parent)
              g.add_nodes(child, { :style => "filled", :fillcolor => "#B9B9D5" }.merge(@node_options[child]))
              g.add_edges(parent, child, { :constraint => false }.merge(@edge_options["#{parent}_#{child}"]))
            else
              g.add_nodes(child, @node_options[child])
              g.add_edges(parent, child, @edge_options["#{parent}_#{child}"])
            end
          end
        end

        if @output_format.to_s == "debug"
          $stdout.puts g.output :none => String
          Bundler.ui.info "debugging bundle viz..."
        else
          begin
            g.output @output_format.to_sym => "#{@output_filgems/gems/bundler-2.4.19/lib/bundler/fetcher/downloader.rb000064400000005776150403133510017134 0ustar00# frozen_string_literal: true

require "pathname"
require "set"

module Bundler
  class CompactIndexClient
    DEBUG_MUTEX = Thread::Mutex.new
    def self.debug
      return unless ENV["DEBUG_COMPACT_INDEX"]
      DEBUG_MUTEX.synchronize { warn("[#{self}] #{yield}") }
    end

    class Error < StandardError; end

    require_relative "compact_index_client/cache"
    require_relative "compact_index_client/updater"

    attr_reader :directory

    def initialize(directory, fetcher)
      @directory = Pathname.new(directory)
      @updater = Updater.new(fetcher)
      @cache = Cache.new(@directory)
      @endpoints = Set.new
      @info_checksums_by_name = {}
      @parsed_checksums = false
      @mutex = Thread::Mutex.new
    end

    def execution_mode=(block)
      Bundler::CompactIndexClient.debug { "execution_mode=" }
      @endpoints = Set.new

      @execution_mode = block
    end

    # @return [Lambda] A lambda that takes an array of inputs and a block, and
    #         maps the inputs with the block in parallel.
    #
    def execution_mode
      @execution_mode || sequentially
    end

    def sequential_execution_mode!
      self.execution_mode = sequentially
    end

    def sequentially
      @sequentially ||= lambda do |inputs, &blk|
        inputs.map(&blk)
      end
    end

    def names
      Bundler::CompactIndexClient.debug { "/names" }
      update(@cache.names_path, "names")
      @cache.names
    end

    def versions
      Bundler::CompactIndexClient.debug { "/versions" }
      update(@cache.versions_path, "versions")
      versions, @info_checksums_by_name = @cache.versions
      versions
    end

    def dependencies(names)
      Bundler::CompactIndexClient.debug { "dependencies(#{names})" }
      execution_mode.call(names) do |name|
        update_info(name)
        @cache.dependencies(name).map {|d| d.unshift(name) }
      end.flatten(1)
    end

    def update_and_parse_checksums!
      Bundler::CompactIndexClient.debug { "update_and_parse_checksums!" }
      return @info_checksums_by_name if @parsed_checksums
      update(@cache.versions_path, "versions")
      @info_checksums_by_name = @cache.checksums
      @parsed_checksums = true
    end

    private

    def update(local_path, remote_path)
      Bundler::CompactIndexClient.debug { "update(#{local_path}, #{remote_path})" }
      unless synchronize { @endpoints.add?(remote_path) }
        Bundler::CompactIndexClient.debug { "already fetched #{remote_path}" }
        return
      end
      @updater.update(local_path, url(remote_path))
    end

    def update_info(name)
      Bundler::CompactIndexClient.debug { "update_info(#{name})" }
      path = @cache.info_path(name)
      checksum = @updater.checksum_for_file(path)
      unless existing = @info_checksums_by_name[name]
        Bundler::CompactIndexClient.debug { "skipping updating info for #{name} since it is missing from versions" }
        return
      end
      if checksum == existing
        Bundler::CompactIndexClient.debug { "skipping updating info for #{name} since the vergems/gems/bundler-2.4.19/lib/bundler/fetcher/base.rb000064400000001663150403133510015677 0ustar00gems/gems/bundler-2.4.19/lib/bundler/fetcher/downloader.rb000064400000005776150403133510017134 0ustar00# frozen_string_literal: true

module Bundler
  class Fetcher
    class Downloader
      attr_reader :connection
      attr_reader :redirect_limit

      def initialize(connection, redirect_limit)
        @connection = connection
        @redirect_limit = redirect_limit
      end

      def fetch(uri, headers = {}, counter = 0)
        raise HTTPError, "Too many redirects" if counter >= redirect_limit

        filtered_uri = URICregems/gems/bundler-2.4.19/lib/bundler/fetcher/compact_index.rb000064400000010326150403133510017576 0ustar00gems/gems/bundler-2.4.19/lib/bundler/compact_index_client.rb000064400000006561150403133510017522 0ustar00TTPForbidden
          raise AuthenticationForbiddenError, uri.host
        when Net::HTTPNotFound
          raise FallbackError, "Net::HTTPNotFound: #{filtered_uri}"
        else
          raise HTTPError, "#{response.class}#{": #{response.body}" unless response.body.empty?}"
        end
      end

      def request(uri, headers)
        validate_uri_scheme!(uri)

        filtered_uri = URICredentialsFilter.credential_filtered_uri(uri)

        Bundler.ui.debug "HTTP GET #{filtered_uri}"
        req = Net::HTTP::Get.new uri.request_uri, headers
        if uri.user
          user = CGI.unescape(uri.user)
          password = uri.password ? CGI.unescape(uri.password) : nil
          req.basic_auth(user, password)
        end
        connection.request(uri, req)
      rescue OpenSSL::SSL::SSLError
        raise CertificateFailureError.new(uri)
      rescue *HTTP_ERRORS => e
        Bundler.ui.trace e
        if e.is_a?(SocketError) || e.message.to_s.include?("host down:")
          raise NetworkDownError, "Could not reach host #{uri.host}. Check your network " \
            "connection and try again."
        else
          raise HTTPError, "Network error while fetching #{filtered_uri}" \
            " (#{e})"
        end
      end

      private

      def validate_uri_scheme!(uri)
        return if /\Ahttps?\z/.match?(uri.scheme)
        raise InvalidOption,
          "The request uri `#{uri}` has an invalid scheme (`#{uri.scheme}`). " \
          "Did you mean `http` or `https`?"
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/fetcher/base.rb000064400000001663150403133510015677 0ustar00# frozen_string_literal: true

module Bundler
  class Fetcher
    class Base
      attr_reader :downloader
      attr_reader :display_uri
      attr_reader :remote

      def initialize(downloader, remote, display_uri)
        raise "Abstract class" if self.class == Base
        @downloader = downloader
        @remote = remote
        @display_uri = display_uri
      end

      def remote_uri
        @remote.uri
      end

      def fetch_uri
        @fetch_uri ||= if remote_uri.host == "rubygems.org"
          uri = remote_uri.dup
          uri.host = "index.rubygems.org"
          uri
        else
          remote_uri
        end
      end

      def available?
        true
      end

      def api_fetcher?
        false
      end

      private

      def log_specs(debug_msg)
        if Bundler.ui.debug?
          Bundler.ui.debug debug_msg
        else
          Bundler.ui.info ".", false
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/fetcher/compact_index.rb000064400000010326150403133510017576 0ustar00gems/gems/bundler-2.4.19/lib/bundler/fetcher/downloader.rb000064400000005776150403133510017134 0gems/gems/bundler-2.4.19/lib/bundler/fetcher/index.rb000064400000001360150403133510016066 0ustar00emaining_gems = gem_names.dup

        until remaining_gems.empty?
          log_specs "Looking up gems #{remaining_gems.inspect}"

          deps = begin
                   parallel_compact_index_client.dependencies(remaining_gems)
                 rescue TooManyRequestsError
                   @bundle_worker&.stop
                   @bundle_worker = nil # reset it.  Not sure if necessary
                   serial_compact_index_client.dependencies(remaining_gems)
                 end
          next_gems = deps.map {|d| d[3].map(&:first).flatten(1) }.flatten(1).uniq
          deps.each {|dep| gem_info << dep }
          complete_gems.concat(deps.map(&:first)).uniq!
          remaining_gems = next_gems - complete_gems
        end
        @bundgems/gems/bundler-2.4.19/lib/bundler/fetcher/dependency.rb000064400000004626150403133510017105 0ustar00  def api_fetcher?
        true
      end

      private

      def compact_index_client
        @compact_index_client ||=
          SharedHelpers.filesystem_access(cache_path) do
            CompactIndexClient.new(cache_path, client_fetcher)
          end
      end

      def parallel_compact_index_client
        compact_index_client.execution_mode = lambda do |inputs, &blk|
          func = lambda {|object, _index| blk.call(object) }
          worker = bundle_worker(func)
          inputs.each {|input| worker.enq(input) }
          inputs.map { worker.deq }
        end

        compact_index_client
      end

      def serial_compact_index_client
        compact_index_client.sequential_execution_mode!
        compact_index_client
      end

      def bundle_worker(func = nil)
        @bundle_worker ||= begin
          worker_name = "Compact Index (#{display_uri.host})"
          Bundler::Worker.new(Bundler.settings.processor_count, worker_name, func)
        end
        @bundle_worker.tap do |worker|
    gems/gems/bundler-2.4.19/lib/bundler/fetcher/base.rb000064400000001663150403133510015677 0ustar00l? && headers["If-None-Match"]
          ui.warn "Using the cached data for the new index because of a network error: #{e}"
          Net::HTTPNotModified.new(nil, nil, nil)
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/fetcher/index.rb000064400000001360150403133510016066 0ustar00gems/gems/bundler-2.4.19/lib/bundler/lockfile_generator.rb000064400000004273150403133520017204 0ustar00
        when /403/
          raise AuthenticationForbiddenError, remote_uri
        else
          raise HTTPError, "Could not fetch specs from #{display_uri} due to underlying error <#{e.message}>"
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/fetcher/dependency.rb000064400000004626150403133510017105 0ustar00# frozen_string_literal: true

require_relative "base"
require "cgi"

module Bundler
  class Fetcher
    class Dependency < Base
      def available?
        @available ||= fetch_uri.scheme != "file" && downloader.fetch(dependency_api_uri)
      rescue NetworkDownError => e
        raise HTTPError, e.message
      rescue AuthenticationRequiredError
        # Fail since we got a 401 from the server.
        raise
      rescue HTTPError
        false
      end

      def api_fetcher?
        true
      end

      def specs(gem_names, full_dependency_list = [], last_spec_list = [])
        query_list = gem_names.uniq - full_dependency_list

        log_specs "Query List: #{query_list.inspect}"

        return last_spec_list if query_list.empty?

        spec_list, deps_list = Bundler::Retry.new("dependency api", FAIL_ERRORS).attempts do
          dependency_specs(query_list)
        end

        returned_gems = spec_list.map(&:first).uniq
        specs(deps_list, full_dependency_list + returned_gems, spec_list + last_spec_list)
      rescue MarshalError, HTTPError, GemspecError
        Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
        Bundler.ui.debug "cougems/gems/bundler-2.4.19/lib/bundler/digest.rb000064400000004237150403133520014625 0ustar00        deps = s[:dependencies].map {|n, d| [n, d.split(", ")] }
          spec_list.push([s[:name], s[:number], s[:platform], deps])
        end
        [spec_list, deps_list]
      end

      def dependency_api_uri(gem_names = [])
        uri = fetch_uri + "api/v1/dependencies"
        uri.query = "gems=#{CGI.escape(gem_names.sort.join(","))}" if gem_names.any?
        uri
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/lockfile_generator.rb000064400000004273150403133520017204 0ustar00# frozen_string_literal: true

module Bundler
  class LockfileGenerator
    attr_reader :definition
    attr_reader :out

    # @private
    def initialize(definition)
      @definition = definition
      @out = Stgems/gems/bundler-2.4.19/lib/bundler/fetcher/index.rb000064400000001360150403133510016066 0ustar00.each do |spec|
        next if spec.name == "bundler"
        out << spec.to_lock
      end
    end

    def add_platforms
      add_section("PLATFORMS", defigems/gems/bundler-2.4.19/lib/bundler/injector.rb000064400000024125150403133520015161 0ustar00gems/gems/bundler-2.4.19/lib/bundler/fetcher/dependency.rb000064400000004626150403133510017105 0ustar00gems/gems/bundler-2.4.19/lib/bundler/digest.rb000064400000004237150403133520014625 0ustar00# frozen_string_literal: true

# This code was extracted from https://github.com/Solistra/ruby-digest which is under public domain
module Bundler
  module Digest
    # The initial constant values for the 32-bit constant words A, B, C, D, and
    # E, respectively.
    SHA1_WORDS = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0].freeze

    # The 8-bit field used for bitwise `AND` masking. Defaults to `0xFFFFFFFF`.
    SHA1_MASK = 0xFFFFFFFF

    class << self
      def sha1(string)
        unless string.is_a?(String)
          raise TypeError, "can't convert #{string.class.inspect} into String"
        end

        buffer = string.b

        words = SHA1_WORDS.dup
        generate_split_buffer(buffer) do |chunk|
          w = []
          chunk.each_slice(4) do |a, b, c, d|
            w << (((a << 8 | b) << 8 | c) << 8 | d)
          end
          a, b, c, d, e = *words
          (16..79).each do |i|
            w[i] = SHA1_MASK & rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1)
          end
          0.upto(79) do |i|
            case i
            when  0..19
              f = ((b & c) | (~b & d))
              k = 0x5A827999
            when 20..39
              f = (b ^ c ^ d)
              k = 0x6ED9EBA1
            when 40..59
              f = ((b & c) | (b & d) | (c & d))
              k = 0x8F1BBCDC
            when 60..79
              f = (b ^ c ^ d)
              k = 0xCA62C1D6
            end
            t = SHA1_MASK & rotate(a, 5) + f + e + k + w[i]
            a, b, c, d, e = t, a, SHA1_MASK & rotate(b, 30), c, d # rubocop:disable Style/ParallelAssignment
          end
          mutated = [a, b, c, d, e]
          words.map!.with_index {|word, index| SHA1_MASK & (word + mutated[index]) }
        end

        words.pack("N*").unpack("H*").first
      end

      private

      def generate_split_buffer(string, &block)
        size   = string.bytesize * 8
        buffer = string.bygems/gems/bundler-2.4.19/lib/bundler/lockfile_generator.rb000064400000004273150403133520017204 0ustar00gems/gems/bundler-2.4.19/lib/bundler/injector.rb000064400000024125150403133520015161 0ustar00# frozen_string_literal: true

module Bundler
  class Injector
    INJECTED_GEMS = "injected gems"

    def self.inject(new_deps, options = {})
      injector = new(new_deps, options)
      injector.inject(Bundler.default_gemfile, Bundler.default_lockfile)
    end

    def self.remove(gems, options = {})
      injector = new(gems, options)
      injector.remove(Bundler.default_gemfile, Bundler.default_lockfile)
    end

    def initialize(deps, options = {})
      @deps = deps
      @options = options
    end

    # @param [Pathname] gemfile_path The Gemfile in which to inject the new dependency.
    # @param [Pathname] lockfile_path The lockfile in which to inject the new dependency.
    # @return [Array]
    def inject(gemfile_path, lockfile_path)
      if Bundler.frozen_bundle?
        # ensure the lock and Gemfile are synced
        Bundler.definition.ensure_equivalent_gemfile_and_lockfile(true)
      end

      # temporarily unfreeze
      Bundler.settings.temporary(:deployment => false, :frozen => false) do
        # evaluate the Gemfile we have now
        builder = Dsl.new
        builder.eval_gemfile(gemfile_path)

        # don't inject any gems that are already in the Gemfile
        @deps -= builder.dependencies

        # add new deps to the end of the in-memory Gemfile
        # Set conservative versioning to false because
        # we want to let the resolver resolve the version first
        builder.eval_gemfile(INJECTED_GEMS, build_gem_lines(false)) if @deps.any?

        # resolve to see if the new deps broke anything
        @definition = builder.to_definition(lockfile_path, {})
        @definition.resolve_remotely!

        # since nothing broke, we can add those gems to thegems/gems/bundler-2.4.19/lib/bundler/digest.rb000064400000004237150403133520014625 0ustar00        deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep)} was removed." }
      end

      # Invalidate the cached Bundler.definition.
      # This prevents e.g. `bundle remove ...` from using outdated information.
      Bundler.reset_paths!
    end

    private

    def conservative_version(spec)
      version = spec.version
      return ">= 0" if version.nil?
      segments = version.segments
      seg_end_index = version >= Gem::Version.new("1.0") ? 1 : 2

      prerelease_suffix = version.to_s.gsub(version.release.to_s, "") if version.prerelease?
      "#{version_prefix}#{segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
    end

    def version_prefix
      if @options[:strict]
        "= "
      elsif @options[:optimistic]
        ">= "
      else
        "~> "
      end
    end

    def build_gem_lines(conservative_versioning)
      @deps.map do |d|
        name = d.name.dump

        requirement = if conservative_versioning
          ", \"#{conservative_version(@definition.specs[d.name][0])}\""
        else
          ", #{d.requirement.as_list.map(&:dump).join(", ")}"
        end

        if d.groups != Array(:default)
          group = d.groups.size == 1 ? ", :group => #{d.groups.first.inspect}" : ", :groups => #{d.groups.inspect}"
        end

        source = ", :source => \"#{d.source}\"" unless d.source.nil?
        path = ", :path => \"#{d.path}\"" unless d.path.nil?
        git = ", :git => \"#{d.git}\"" unless d.git.nil?
        github = ", :github => \"#{d.github}\"" unless d.github.nil?
        branch = ", :branch => \"#{d.branch}\"" unless d.branch.nil?
        ref = ", :ref => \"#{d.ref}\"" unless d.ref.nil?
        require_path = ", :require => #{convert_autorequire(d.autorequire)}" unless d.autorequire.nil?

        %(gem #{name}#{requirement}#{group}#{source}#{path}#{git}#{github}#{branch}#{ref}#{require_path})
      end.join("\n")
    end

    def append_to(gemfile_path, new_gem_lines)
      gemfile_path.open("a") do |f|
        f.puts
        f.puts new_gem_lines
      end
    end

    # evaluates a gemfile to remove the specified gem
    # from it.
    def remove_deps(gemfile_path)
      initial_gemfile = Figems/gems/bundler-2.4.19/lib/bundler/injector.rb000064400000024125150403133520015161 0ustar00le.
    # @param [Array]    gems Array of names of gems to be removed.
    # @param [Pathname] gemfile_path Path of the Gemfile.
    # @return [Array]   Array of removed dependencies.
    def remove_gems_from_dependencies(builder, gems, gemfile_path)
      removed_deps = []

      gems.each do |gem_name|
        deleted_dep = builder.dependencies.find {|d| d.name == gem_name }

        if deleted_dep.nil?
          raise GemfileError, "`#{gem_name}` is not specified in #{gemfile_path} so it could not be removed."
        end

        builder.dependencies.delete(deleted_dep)

        removedgems/gems/bundler-2.4.19/lib/bundler/source_map.rb000064400000004254150403133520015502 0ustar00 append them with other strings
      new_gemfile.each_with_index do |_line, index|
        if new_gemfile[index + 1] == "\n"
          new_gemfile[index] += new_gemfile[index + 1]
          new_gemfile.delete_at(index + 1)
        end
      end

      %w[group source env install_if].each {|block| remove_nested_blocks(new_gemfile, block) }

      new_gemfile.join.chomp
    end

    # @param [String] line          Individual line of gemfile content.
    # @param [MatchData] match_data Data about Regex match.
    def is_not_within_comment?(line, match_data)
      match_start_index = match_data.offset(0).first
      !line[0..match_start_index].include?("#")
    end

    # @param [Array] gemfile       Array of gemfile contents.
    # @param [String] block_name   Name of block name to look for.
    def remove_nested_blocks(gemfile, block_name)
      nested_blocks = 0

      # count number of nested blocks
      gemfile.each_with_index {|line, index| nested_blocks += 1 if !gemfile[index + 1].nil? && gemfile[index + 1].include?(block_name) && line.include?(block_name) }

      while nested_blocks >= 0
        nested_blocks -= 1

        gemfile.each_with_index do |line, index|
          next unless !line.nil? && line.strip.start_with?(block_name)
          if /^\s*end\s*$/.match?(gemfile[index + 1])
            gemfile[index] = nil
            gemfile[index + 1] = nil
          end
        end

        gemfile.compact!
      end
    end

    # @param [Pathname] gemfile_path   The Gemfile from which to remove dependencies.
    # @param [Array] original_deps     Array of original dependencies.
    # @param [Array] removed_deps      Array of removed dependencies.
    # @param [Array] initial_gemfile   Contents of original Gemfile before any operation.
    def cross_check_for_errors(gemfile_path, original_deps, removed_deps, initial_gemfile)
      # evaluate the new gemfile to look for any failure cases
      builder = Dsl.new
      builder.eval_gemfile(gemfile_path)

      # record gems which were removed but not requested
      extra_removed_gems = original_deps - builder.dependencies

      # if some extra gems were removed then raise error
      # and revert Gemfile to original
      unlegems/gems/bundler-2.4.19/lib/bundler/gem_helper.rb000064400000015613150403133520015455 0ustar00rn autorequire if autorequire == "false"
      autorequire.inspect
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source_map.rb000064400000004254150403133520015502 0ustar00# frozen_string_literal: true

module Bundler
  class SourceMap
    attr_reader :sources, :dependencies, :locked_specs

    def initialize(sources, dependencies, locked_specs)
      @sources = sources
      @dependencies = dependencies
      @locked_specs = locked_specs
    end

    def pinned_spec_names(skip = nil)
      direct_requirements.reject {|_, source| source == skip }.keys
    end

    def all_requirements
      requirements = direct_requirements.dup

      unmet_deps = sources.non_default_explicit_sources.map do |source|
        (source.spec_names - pinned_spec_names).each do |indirect_dependency_name|
          previous_source = requirements[indirect_dependency_name]
          if previous_source.nil?
            requirements[indirect_dependency_name] = source
          else
            no_ambiguous_sources = Bundler.feature_flag.bundler_3_mode?

            msg = ["The gem '#{indirect_dependency_name}' was found in multiple relevant sources."]
            msg.concat [previous_source, source].map {|s| "  * #{s}" }.sort
            msg << "You #{no_ambiguous_sources ? :must : :should} add this gem to the source block for the source you wish it to be installed from."
            msg = msg.join("\n")

            raise SecurityError, msg if no_ambiguous_sources
            Bundler.ui.warn "Warning: #{msg}"
          end
        end

        source.unmet_deps
      end

      sources.default_source.add_dependency_names(unmet_deps.flatten - requirements.keys)

      requirements
    end

    def direct_requirements
      @direct_requirements ||= begin
        requirements = {}
        default = sources.default_source
        dependencies.each do |dep|
          dep_source = dep.source || default
          dep_source.add_dependency_names(dep.name)
          requirements[dep.name] = dep_source
        end
        requirements
      end
    end

    def locked_requirements
      @locked_requirements ||= begin
        requirements = {}
        locked_specs.each do |locked_spec|
          source = locked_spec.source
          source.add_dependency_names(locked_spec.name)
          requirements[locked_spec.name] = source
        end
        requirements
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/gem_helper.rb000064400000015613150403133520015455 0ustar00# frozen_string_literal: true

require_relative "../bundler"
require "shellwords"

module Bundler
  class GemHelper
    include Rake::DSL if defined? Rake::DSL

    class << self
      # set when install'd.
      attr_accessor :instance

      def install_tasks(opts = {})
        new(opts[:dir], opts[:name]).install
      end

      def tag_prefix=(prefix)
        instance.tag_prefix = prefix
      end

      def gemspec(&block)
        gemspec = instance.gemspec
        block&.call(gemspec)
        gemspec
      end
    end

    attr_reader :spec_path, :base, :gemspec

    attr_writer :tag_prefix

    def initialize(base = nil, name = nil)
      @base = File.expand_path(base || SharedHelpers.pwd)
      gemspecs = name ? [File.join(@base, "#{name}.gemspec")] : Gem::Util.glob_files_in_dir("{,*}.gemspec", @base)
      raise "Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it." unless gemspecs.size == 1
      @spec_path = gemspecs.first
      @gemspec = Bundler.load_gemspec(@spec_path)
      @tag_prefix = ""
    end

    def install
      built_gem_path = nil

      desc "Build #{name}-#{version}.gem into the pkg directory."
      task "build" do
        built_gem_path = build_gem
      end

      desc "Generate SHA512 checksum if #{name}-#{version}.gem into the checksums directory."
      task "build:checksum" => "build" do
        build_checksum(built_gem_path)
      end

      desc "Build and install #{name}-#{version}.gem into system gems."
      task "install" => "build" do
        install_gem(built_gem_path)
      end

      desc "Builgems/gems/bundler-2.4.19/lib/bundler/source_map.rb000064400000004254150403133520015502 0ustar00  sh([*gem_command, "build", "-V", spec_path]) do
        file_name = File.basename(built_gem_path)
        SharedHelpers.filesystem_access(File.join(base, "pkg")) {|p| FileUtils.mkdir_p(p) }
        FileUtils.mv(built_gem_path, "pkg")
        Bundler.ui.confirm "#{name} #{version} built to pkg/#{file_name}."
      end
      File.join(base, "pkg", file_name)
    end

    def install_gem(builtgems/gems/bundler-2.4.19/lib/bundler/fetcher.rb000064400000026277150403133520014776 0ustar00 File.write(target, checksum + "\n")
      Bundler.ui.confirm "#{name} #{version} checksum written to checksums/#{file_name}."
    end

    protected

    def rubygem_push(path)
      cmd = [*gem_command, "push", path]
      cmd << "--key" << gem_key if gem_key
      cmd << "--host" << allowed_push_host if allowed_push_host
      sh_with_input(cmd)
      Bundler.ui.confirm "Pushed #{name} #{version} to #{gem_push_host}"
    end

    def built_gem_path
      Gem::Util.glob_files_in_dir("#{name}-*.gem", base).sort_by {|f| File.mtime(f) }.last
    end

    def git_push(remote = nil)
      remote ||= default_remote
      sh("git push #{remote} refs/heads/#{current_branch}".shellsplit)
      sh("git push #{remote} refs/tags/#{version_tag}".shellsplit)
      Bundler.ui.confirm "Pushed git commits and release tag."
    end

    def default_remote
      remote_for_branch, status = sh_with_status(%W[git config --get branch.#{current_branch}.remote])
      return "origin" unless status.success?

      remote_for_branch.strip
    end

    def current_branch
      # We can replace this with `git branch --show-current` once we drop support for git < 2.22.0
      sh(%w[git rev-parse --abbrevgems/gems/bundler-2.4.19/lib/bundler/gem_helper.rb000064400000015613150403133520015455 0ustar00    end

    def tag_version
      sh %W[git tag -m Version\ #{version} #{version_tag}]
      Bundler.ui.confirm "Tagged #{version_tag}."
      yield if block_given?
    rescue RuntimeError
      Bundler.ui.error "Untagging #{version_tag} due to error."
      sh_with_status %W[git tag -d #{version_tag}]
      raise
    end

    def version
      gemspec.version
    end

    def version_tag
      "#{@tag_prefix}v#{version}"
    end

    def name
      gemspec.name
    end

    def sh_with_input(cmd)
      Bundler.ui.debug(cmd)
      SharedHelpers.chdir(base) do
        abort unless Kernel.system(*cmd)
      end
    end

    def sh(cmd, &block)
      out, status = sh_with_status(cmd, &block)
      unless status.success?
        raise("Running `#{cmd.shelljoin}` failed with the following output:\n\n#{out}\n")
      end
      out
    end

    def sh_with_status(cmd, &block)
      Bundler.ui.debug(cmd)
      SharedHelpers.chdir(base) do
        outbuf = IO.popen(cmd, :err => [:child, :out], &:read)
        status = $?
        block&.call(outbuf) if status.success?
        [outbuf, status]
      end
    end

    def gem_key
      Bundler.settings["gem.push_key"].to_s.downcase if Bundler.settings["gem.push_key"]
    end

    def gem_push?
      !%w[n no nil false off 0].include?(ENV["gem_push"].to_s.downcase)
    end

    def gem_command
      ENV["GEM_COMMAND"]&.shellsplit || ["gem"]
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/fetcher.rb000064400000026277150403133520014776 0ustar00# frozen_string_literal: true

require_relative "vendored_persistent"
require "cgi"
require "securerandom"
require "zlib"
require "rubygems/request"

module Bundler
  # Handles all the fetching with the rubygems server
  class Fetcher
    autoload :CompactIndex, File.expand_path("fetcher/compact_index", __dir__)
    autoload :Downloader, File.expand_path("fetcher/downloader", __dir__)
    autoload :Dependency, File.expand_path("fetcher/dependency", __dir__)
    autoload :Index, File.expand_path("fetcher/index", __dir__)

    # This error is raised when it looks like the network is down
    class NetworkDownError < HTTPError; end
    # This error is raised if we should rate limit our requests to the API
    class TooManyRequestsError < HTTPError; end
    # This error is raised if the API returns a 413 (only printed in verbose)
    class FallbackError < HTTPError; end

    # This is the error raised if OpenSSL fails the cert verification
    class CertificateFailureError < HTTPError
      def initialize(remote_uri)
        remote_uri = filter_uri(remote_uri)
        super "Could not verify the SSL certificate for #{remote_uri}.\nThere" \
          " is a chance you are experiencing a man-in-the-middle attack, but" \
          " most likely your system doesn't have the CA certificates needed" \
          " for verification. For information about OpenSSL certificates, see" \
          " https://railsapps.github.io/openssl-certificate-verify-failed.html."
      end
    end

    # This is the error raised when a source is HTTPS and OpenSSL didn't load
    class SSLError < HTTPError
      def initialize(msg = nil)
        super msg || "Could not load OpenSSL.\n" \
            "You must recompile Ruby with OpenSSL support."
      end
    end

    # This error is raised if HTTP authentication is required, but not provided.
    class AuthenticationRequiredError < HTTPError
      def initialize(remote_uri)
        remote_uri = filter_uri(remote_uri)
        super "Authentication is required for #{remote_uri}.\n" \
          "Please supply credentials for this source. You can do this by running:\n" \
          "`bundle config set --global #{remote_uri} username:password`\n" \
          "or by storing the credentials in the `#{Settings.key_for(remote_uri)}` environment variable"
      end
    end

    # This error is raised if HTTP authentication is provided, but incorrect.
    class BadAuthenticationError < HTTPError
      def initialize(remote_uri)
        remote_uri = filter_uri(remote_uri)
        super "Bad username or password for #{remote_uri}.\n" \
          "Please double-check your credentials and correct them."
      end
    end

    # This error is raised if HTTP authentication is correct, but lacks
    # necessary permissions.
    class AuthenticationForbiddenError < HTTPError
      def initialize(remote_uri)
        remote_uri = filter_uri(remote_uri)
        super "Access token could not be authenticated for #{remote_uri}.\n" \
          "Make sure it's valid and has the necessary scopes configured."
      end
    end

    # Exceptions classes that should bypass retry attempts. If your password didn't work the
    # first time, it's not going to the third time.
    NET_ERRORS = [:HTTPBadGateway, :HTTPBadRequest, :HTTPFailedDependency,
                  :HTTPForbidden, :HTTPInsufficientStorage, :HTTPMethodNotAllowed,
                  :HTTPMovedPermanently, :HTTPNoContent, :HTTPNotFound,
                  :HTTPNotImplemented, :HTTPPreconditionFailed, :HTTPRequestEntityTooLarge,
                  :HTTPRequestURITooLong, :HTTPUnauthorized, :HTTPUnprocessableEntity,
                  :HTTPUnsupportedMediaType, :HTTPVersionNotSupported].freeze
    FAIL_ERRORS = begin
      fail_errors = [AuthenticationRequiredError, BadAuthenticationError, AuthenticationForbiddenError, FallbackError]
      fail_errors << Gem::Requirement::BadRequirementError
      fail_errors.concat(NET_ERRORS.map {|e| Net.const_get(e) })
    end.freeze

    class << self
      attr_accessor :disable_endpoint, :api_timeout, :redirect_limit, :max_retries
    end

    self.redirect_limit = Bundler.settings[:redirect] # How many redirects to allow in one request
    self.api_timeout    = Bundler.settings[:timeout] # How long to wait for each API call
    self.max_retries    = Bundler.settings[:retry] # How many retries for the API call

    def initialize(remote)
      @remote = remote

      Socket.do_not_reverse_lookup = true
      connection # create persistent connection
    end

    def uri
      @remote.anonymized_uri
    end

    # fetch a gem specification
    def fetch_spec(spec)
      spec -= [nil, "ruby", ""]
      spec_file_name = "#{spec.join "-"}.gemspec"

      uri = Bundler::URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
      if uri.scheme == "file"
        path = Bundler.rubygems.correct_for_windows_path(uri.path)
        Bundler.safe_load_marshal Bundler.rubygems.inflate(Gem.read_binary(path))
      elsif cgems/gems/bundler-2.4.19/lib/bundler/fetcher.rb000064400000026277150403133520014776 0ustar00 the specs in the bundler format as an index
    def specs(gem_names, source)
      index = Bundler::Index.new

      if Bundler::Fetcher.disable_endpoint
        @use_api = false
        specs = fetchers.last.specs(gem_names)
      else
        specs = []
        @fetchers = fetchers.drop_while do |f|
          !f.available? || (f.api_fetcher? && !gem_names) || !specs = f.specs(gem_names)
        end
        @use_api = false if fetchers.none?(&:api_fetcher?)
      end

      specs.each do |name, version, platform, dependencies, metadata|
        spec = if dependencies
          EndpointSpecification.new(name, version, platform, self, dependencies, metadata)
        else
          RemoteSpecification.new(name, version, platform, self)
        end
        spec.source = source
        spec.remote = @remote
        index << spec
      end

      index
    rescue CertificateFailureError
      Bundler.ui.info "" if gem_names && use_api # newline after dots
      raise
    end

    def use_api
      return @use_api if defined?(@use_api)

      fetchers.shift until fetchers.first.available?

      @use_api = if remote_uri.scheme == "file" || Bundler::Fetcher.disable_endpoint
        false
      else
        fetchers.first.api_fetcher?
      end
    end

    def user_agent
      @user_agent ||= begin
        ruby = Bundler::RubyVersion.system

        agent = String.new("bundler/#{Bundler::VERSION}")
        agent << " rubygems/#{Gem::VERSION}"
        agent << " ruby/#{ruby.versions_string(ruby.versions)}"
        agent << " (#{ruby.host})"
        agent << " command/#{ARGV.first}"

        if ruby.engine != "ruby"
          # engine_version raises on unknown engines
          engine_version = begin
     gems/gems/bundler-2.4.19/lib/bundler/constants.rb000064400000000340150403133520015351 0ustar00_s
    end

    def inspect
      "#<#{self.class}:0x#{object_id} uri=#{uri}>"
    end

    private

    FETCHERS = [CompactIndex, Dependency, Index].freeze

    def cis
      env_cis = {
        "TRAVIS" => "travis",
      gems/gems/bundler-2.4.19/lib/bundler/match_metadata.rb000064400000000442150403133520016274 0ustar00
          con.proxy = Bundler::URI.parse(gem_proxy) if gem_proxy != :no_proxy
        end

        if remote_uri.scheme == "https"
          con.verify_mode = (Bundler.settings[:ssl_verify_mode] ||
            OpenSSL::SSL::VERIFY_PEER)
          con.cert_store = bundler_cert_store
      gems/gems/bundler-2.4.19/lib/bundler/plugin.rb000064400000026374150403133520014652 0ustar00    def gemspec_cached_path(spec_file_name)
      paths = Bundler.rubygems.spec_cache_dirs.map {|dir| File.join(dir, spec_file_name) }
      paths.find {|path| File.file? path }
    end

    HTTP_ERRORS = [
      Timeout::Error, EOFError, SocketError, Errno::ENETDOWN, Errno::ENETUNREACH,
      Errno::EINVAL, Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EAGAIN,
      Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
      PersistentHTTP::Error, Zlib::BufError, Errno::EHOSTUNREACH
    ].freeze

    def bundler_cert_store
      store = OpenSSL::X509::Store.new
      ssl_ca_cert = Bundler.settings[:ssl_ca_cert] ||
                    (Gem.configuration.ssl_ca_cert if
                      Gem.configuration.respond_to?(:ssl_ca_cert))
      if ssl_ca_cert
        if File.directory? ssl_ca_cert
          store.add_path ssl_ca_cert
        else
          store.add_file ssl_ca_cert
        end
      else
        store.set_default_paths
        Gem::Request.get_cert_files.each {|c| store.add_file c }
      end
      store
    end

    def remote_uri
      @remote.uri
    end

    def downloader
      @downloader ||= Downloader.new(connection, self.class.redirect_limit)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/constants.rb000064400000000340150403133520015351 0ustar00# frozen_string_literal: true

module Bundler
  WINDOWS = RbConfig::CONFIG["host_os"] =~ /(msdos|mswin|djgpp|mingw)/
  FREEBSD = RbConfig::CONFIG["host_os"].to_s.include?("bsd")
  NULL    = WINDOWS ? "NUL" : "/dev/null"
end
gems/gems/bundler-2.4.19/lib/bundler/match_metadata.rb000064400000000442150403133520016274 0ustar00# frozen_string_literal: true

module Bundler
  module MatchMetadata
    def matches_current_ruby?
      @required_ruby_version.satisfied_by?(Gem.ruby_version)
    end

    def matches_current_rubygems?
      @required_rubygems_version.satisfied_by?(Gem.rubygems_version)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/plugin.rb000064400000026374150403133520014652 0ustar00# frozen_string_literal: true

require_relative "plugin/api"

module Bundler
  module Plugin
    autoload :DSL,        File.expand_path("plugin/dsl", __dir__)
    autoload :Events,     File.expand_path("plugin/events", __dir__)
    autoload :Index,      File.expand_path("plugin/index", __dir__)
    autoload :Installer,  File.expand_path("plugin/installer", __dir__)
    autoload :SourceList, File.expand_path("plugin/source_list", __dir__)

    class MalformattedPlugin < PluginError; end
    class UndefinedCommandError < PluginError; end
    class UnknownSourceError < PluginError; end
    class PluginInstallError < PluginError; end

    PLUGIN_FILE_NAME = "plugins.rb"

    module_function

    def reset!
      instance_variables.each {|i| remove_instance_variable(i) }

      @sources = {}
      @commands = {}
      @hooks_by_event = Hash.new {|h, k| h[k] = [] }
      @loaded_plugin_names = []
    end

    reset!

    # Installs a new plugin by the given name
    #
    # @param [Array<String>] names the name of plugin to be installed
    # @param [Hash] options various parameters as described in description.
    #               Refer to cli/plugin for available options
    def install(names, options)
      raise InvalidOption, "You cannot specify `--branch` and `--ref` at the same time." if options["branch"] && options["ref"]

      specs = Installer.new.install(names, options)

      save_plugins names, specs
    rescue PluginError
      specs_to_delete = specs.select {|k, _v| names.include?(k) && !index.commands.values.include?(k) }
      specs_to_delete.each_value {|spec| Bundler.rm_rf(spec.full_gem_path) }

      raise
    end

    # Uninstalls plugins by the given names
    #
    # @param [Array<String>] names the names of plugins to be uninstalled
    def uninstall(names, options)
      if names.empty? && !options[:all]
        Bundler.ui.error "No plugins to uninstall. Specify at least 1 plugin to uninstall.\n"\
          "Use --all option to uninstall all the installed plugins."
        return
      end

      names = index.installed_plugins if options[:all]
      if names.any?
        names.each do |name|
          if index.installed?(name)
            Bundler.rm_rf(index.plugin_path(name))
            index.unregister_plugin(name)
            Bundler.ui.info "Uninstalled plugin #{name}"
          else
            Bundler.ui.error "Plugin #{name} is not installed \n"
          end
        end
      else
        Bundler.ui.info "No plugins installed"
      end
    end

    # List installed plugins and commands
    #
    def list
      installed_plugins = index.installed_plugins
      if installed_plugins.any?
        output = String.new
        installed_plugins.each do |plugin|
          output <gems/gems/bundler-2.4.19/lib/bundler/constants.rb000064400000000340150403133520015351 0ustar00
        definition = builder.to_definition(nil, true)

        return if definition.dependencies.empty?

        plugins = definition.dependencies.map(&:name).reject {|p| index.installed? p }
        installed_specs = Instagems/gems/bundler-2.4.19/lib/bundler/match_metadata.rb000064400000000442150403133520016274 0ustar00in("plugin")
    end

    # The global directory root for all plugin related data
    def global_root
      Bundler.user_bundle_path("plugin")
    end

    # The cache directory for plugin stuffs
    def cache
      @cache ||= root.join("cache")
    end

    # To be called via the API to rgems/gems/bundler-2.4.19/lib/bundler/plugin.rb000064400000026374150403133520014652 0ustar00  # Checks if any plugin declares the source
    def source?(name)
      !index.source_plugin(name.to_s).nil?
    end

    # @return [Class] that handles the source. The class includes API::Source
    def source(name)
      raise UnknownSourceError, "Source #{name} not found" unless source? name

      load_plugin(index.source_plugin(name)) unless @sources.key? name

      @sources[name]
    end

    # @param [Hash] The options that are present in the lock file
    # @return [API::Source] the instance of the class that handles the source
    #                       type passed in locked_opts
    def source_from_lock(locked_opts)
      src = source(locked_opts["type"])

      src.new(locked_opts.merge("uri" => locked_opts["remote"]))
    end

    # To be called via the API to register a hooks and corresponding block that
    # will be called to handle the hook
    def add_hook(event, &block)
      unless Events.defined_event?(event)
        raise ArgumentError, "Event '#{event}' not defined in Bundler::Plugin::Events"
      end
      @hooks_by_event[event.to_s] << block
    end

    # Runs all the hooks that are registered for the passed event
    #
    # It passes the passed arguments and block to the block registered with
    # the api.
    #
    # @param [String] event
    def hook(event, *args, &arg_blk)
      return unless Bundler.feature_flag.plugins?
      unless Events.defined_event?(event)
        raise ArgumentError, "Event '#{event}' not defined in Bundler::Plugin::Events"
      end

      plugins = index.hook_plugins(event)
      return unless plugins.any?

      (plugins - @loaded_plugin_names).each {|name| load_plugin(name) }

      @hooks_by_event[event].each {|blk| blk.call(*args, &arg_blk) }
    end

    # currently only intended for specs
  gems/gems/bundler-2.4.19/lib/bundler/source.rb000064400000005756150403133530014656 0ustar00
    # At present it only checks whether it contains plugins.rb file
    #
    # @param [Pathname] plugin_path the path plugin is installed at
    # @raise [MalformattedPlugin] if plugins.rb file is not found
    def validate_plugin!(plugin_path)
      plugin_file = plugin_path.join(PLUGIN_FILE_NAME)
      raise MalformattedPlugin, "#{PLUGIN_FILE_NAME} was not found in the plugin." unless plugin_file.file?
    end

    # Validates and registers a plugin.
    #
    # @param [String] name the name of the plugin
    # @param [Specification] spec of installed plugin
    # @param [Boolean] optional_plugin, removed if there is conflict with any
    #                     other plugin (used for default source plugins)
    #
    # @raise [PluginInstallError] if validation or registration raises any error
    def save_plugin(name, spec, optional_plugin = false)
      validate_plugin! Pathname.new(spec.full_gem_path)
      installed = register_plugin(name, spec, optional_plugin)
      Bundler.ui.info "Installed plugin #{name}" if installed
    rescue PluginError => e
      raise PluginInstallError, "Failed to install plugin `#{spec.name}`, due to #{e.class} (#{e.message})"
    end

    # Runs the plugins.rb file in an isolated namespace, records the plugin
    # actions it registers for and then passes the data to index to be stored.
    #
    # @param [String] name the name of the plugin
    # @param [Specification] spec of installed plugin
    # @param [Boolean] optional_plugin, removed if there is conflict with any
    #                     other plugin (used for default source plugins)
    #
    # @raise [MalformattedPlugin] if plugins.rb raises any error
    def register_plugin(name, spec, optional_plugin = false)
      commands = @commands
      sources = @sources
      hooks = @hooks_by_event

      @commands = {}
      @sources = {}
      @hooks_by_event = Hash.new {|h, k| h[k] = [] }

      load_paths = spec.load_paths
      Bundler.rubygems.add_to_load_path(load_paths)
      path = Pathname.new spec.full_gem_path

      begin
        load path.join(PLUGIN_FILE_NAME), true
      rescue StandardError => e
        raise MalformattedPlugin, "#{e.class}: #{e.message}"
      end

      if optional_plugin && @sources.keys.any? {|s| source? s }
        Bundler.rm_rf(path)
        false
      else
        index.register_plugin(name, path.to_s, load_paths, @commands.keys,
          @sources.keys, @hooks_by_event.keys)
        true
      end
    ensure
      @commands = commands
      @sources = sources
      @hooks_by_event = hooks
    end

    # Executes the plugins.rb file
    #
    # @param [String] name of the plugin
    def load_plugin(name)
      return unless name && !name.empty?

      # Need to ensure before this that plugin root where the rest of gems
      # are installed to be on load path to support plugin deps. Currently not
      # done to avoid conflicts
      path = index.plugin_path(name)

      Bundler.rubygems.add_to_load_path(index.load_paths(name))

      load path.join(PLUGIN_FILE_NAME)
gems/gems/bundler-2.4.19/lib/bundler/source_list.rb000064400000014271150403133530015701 0ustar00gems/gems/bundler-2.4.19/lib/bundler/source.rb000064400000005756150403133530014656 0ustar00# frozen_string_literal: true

module Bundler
  class Source
    autoload :Gemspec,  File.expand_path("source/gemspec", __dir__)
    autoload :Git,      File.expand_path("source/git", __dir__)
    autoload :Metadata, File.expand_path("source/metadata", __dir__)
    autoload :Path,     File.expand_path("source/path", __dir__)
    autoload :Rubygems, File.expand_path("source/rubygems", __dir__)
    autoload :RubygemsAggregate, File.expand_path("source/rubygems_aggregate", __dir__)

    attr_accessor :dependency_names

    def unmet_deps
      specs.unmet_dependency_names
    end

    def version_message(spec, locked_spec = nil)
      message = "#{spec.name} #{spec.version}"
      message += " (#{spec.platform})" if spec.platform != Gem::Platform::RUBY && !spec.platform.nil?

      if locked_spec
        locked_spec_version = locked_spec.version
        if locked_spec_version && spec.version != locked_spec_version
          message += Bundler.ui.add_color(" (was #{locked_spec_version})", version_color(spec.version, locked_spec_version))
        end
      end

      message
    end

    def can_lock?(spec)
      spec.source == self
    end

    def local!; end

    def local_only!; end

    def cached!; end

    def remote!; end

    def add_dependency_names(names)
      @dependency_names = Array(dependency_names) | Array(names)
    end

    # it's possible that gems from one source depend on gems from some
    # other source, so now we download gemspecs and iterate over those
    # dependencies, looking for gems we don't have info on yet.
    def double_check_for(*); end

    def dependency_names_to_double_check
      specs.dependency_names
    end

    def spec_names
      specs.spec_names
    end

    def include?(other)
      other == self
    end

    def inspect
      "#<#{self.class}:0x#{object_id} #{self}>"
    end

    def identifier
      to_s
    end

    def path?
      instance_of?(Bundler::Source::Path)
    end

    def extension_cache_path(spec)
      return unless Bundler.feature_flag.global_gem_cache?
      return unless source_slug = extension_cache_slug(spec)
      Bundler.user_cache.join(
        "extensions", Gem::Platform.local.to_s, Bundler.ruby_scope,
        source_slug, spec.full_name
      )
    end

    private

    def version_color(spec_version, locked_spec_version)
      if Gem::Version.correct?(spec_version) && Gem::Version.correct?(locked_spec_version)
        # display yellow if there appears to be a regression
        earlier_version?(spec_version, locked_spec_version) ? :yellow : :green
      else
        # default to green if the versions cannot be directly compared
        :green
      end
    end

    def earlier_version?(spec_version, locked_spec_version)
      Gem::Version.new(spec_version) < Gem::Version.new(locked_spec_version)
    end

    def print_using_message(message)
      if !message.include?("(was ")
        Bundler.ui.debug message
      else
        Bundler.ui.info message
      end
    end

    def extension_cache_slug(_)
      nil
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source_list.rb000064400000014271150403133530015701 0ustar00# frozen_string_literal: true

module Bundler
  class SourceList
    attr_reader :path_sources,
      :git_sources,
      :plugin_sources,
      :global_path_source,
      :metadata_source

    def global_rubygems_source
      @global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true)
    end

    def initialize
      @path_sources           = []
      @git_sources            = []
      @plugin_sources         = []
      @global_rubygems_source = nil
      @global_path_source     = nil
      @rubygems_sources       = []
      @metadata_source        = Source::Metadata.new

      @merged_gem_lockfile_sections = false
    end

    def merged_gem_lockfile_sections?
      @merged_gem_lockfile_sections
    end

    def merged_gem_lockfile_sections!(replacement_source)
      @merged_gem_lockfile_sections = true
      @global_rubygems_source = replacement_source
    end

    def aggregate_global_source?
      global_rubygems_source.multiple_remotes?
    end

    def implicit_global_source?
      global_rubygems_source.no_remotes?
    end

    def add_path_source(options = {})
      if options["gemspec"]
        add_source_to_list Source::Gemspec.new(options), path_sources
      else
        path_source = add_source_to_list Source::Path.new(opgems/gems/bundler-2.4.19/lib/bundler/source.rb000064400000005756150403133530014656 0ustar00_source
    end

    def default_source
      global_path_source || global_rubygems_source
    end

    def rubygems_sources
      non_global_rubygems_sources + [global_rubygems_source]gems/gems/bundler-2.4.19/lib/bundler/resolver.rb000064400000035167150403133530015216 0ustar00 end
    end

    # Returns true if there are changes
    def replace_sources!(replacement_sources)
      return false if replacement_sources.empty?

      @rubygems_sources, @path_sources, @git_sources, @plugin_sources = map_sources(replacement_sources)
      @global_rubygems_source = global_replacement_source(replacement_sources)

      different_sources?(lock_sources, replacement_sources)
    end

    # Returns true if there are changes
    def expired_sources?(replacement_sources)
      return false if replacement_sources.empty?

      lock_sources = dup_with_replaced_sources(replacement_sources).lock_sources

      different_sources?(lock_sources, replacement_sources)
    end

    def local_only!
      all_sources.each(&:local_only!)
    end

    def cached!
      all_sources.each(&:cached!)
    end

    def remote!
      all_sources.each(&:remote!)
    end

    private

    def dup_with_replaced_sources(replacement_sources)
      new_source_list = dup
      new_source_list.replace_sources!(replacement_sources)
      new_source_list
    end

    def map_sources(replacement_sources)
      rubygems, git, plugin = [@rubygems_sources, @git_sources, @plugin_sources].map do |sources|
        sources.map do |source|
          replacement_sources.find {|s| s == source } || source
        end
      end

      path = @path_sources.map do |source|
        replacement_sources.find {|s| s == (source.is_a?(Source::Gemspec) ? source.as_path_source : source) } || source
      end

      [rubygems, path, git, plugin]
    end

    def global_replacement_source(replacement_sources)
      replacement_source = replacement_sources.find {|s| s == global_rubygems_source }
      return global_rubygems_source unless replacement_source

      replacement_source.local!
      replacement_source
    end

    def different_sources?(lock_sources, replacement_sources)
      !equivalent_sources?(lock_sources, replacement_sources)
    end

    def rubygems_aggregate_class
      Source::Rubygems
    end

    def add_source_togems/gems/bundler-2.4.19/lib/bundler/source_list.rb000064400000014271150403133530015701 0ustar00on_git_protocol(source)
      return if Bundler.settings["git.allow_insecure"]

      if /^git\:/.match?(source.uri)
        Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
          "which transmits data without encryption. Disable this warning with " \
          "`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
          "protocol to keep your data secure."
      end
    end

    def equivalent_sources?(lock_sources, replacement_sources)
      lock_sources.sort_by(&:identifier) == replacement_sources.sort_by(&:identifier)
    end

    def equivalent_source?(source, other_source)
      source == other_source
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/resolver.rb000064400000035167150403133530015216 0ustar00# frozen_string_literal: true

module Bundler
  #
  # This class implements the interface needed by PubGrub for resolution. It is
  # equivalent to the `PubGrub::BasicPackageSource` class provided by PubGrub by
  # default and used by the most simple PubGrub consumers.
  #
  class Resolver
    require_relative "vendored_pub_grub"
    require_relative "resolver/base"
    require_relative "resolver/candidate"
    require_relative "resolver/incompatibility"
    require_relative "resolver/root"

    include GemHelpers

    def initialize(base, gem_version_promoter)
      @source_requirements = base.source_requirements
      @base = base
      @gem_version_promoter = gem_version_promoter
    end

    def start
      @requirements = @base.requirements
      @packages = @base.packages

      root, logger = setup_solver

      Bundler.ui.info "Resolving dependencies...", true

      solve_versions(:root => root, :logger => logger)
    end

    def setup_solver
      root = Resolver::Root.new(name_for_explicit_dependency_source)
      root_version = Resolver::Candidate.new(0)

      @all_specs = Hash.new do |specs, name|
        specs[name] = source_for(name).specs.search(name).reject do |s|
          s.dependencies.any? {|d| d.name == name && !d.requirement.satisfied_by?(s.version) } # ignore versions that depend on themselves incorrectly
        end.sort_by {|s| [s.version, s.platform.to_s] }
      end

      @sorted_versions = Hash.new do |candidates, package|
        candidates[package] = if package.root?
          [root_version]
        else
          all_versions_for(package).sort
        end
      end

      root_dependencies = prepare_dependencies(@requirements, @packages)

      @cached_dependencies = Hash.new do |dependencies, package|
        dependencies[package] = if package.root?
          { root_version => root_dependencies }
        else
          Hash.new do |versions, version|
            versions[version] = to_dependency_hash(version.dependencies.reject {|d| d.name == package.name }, @packages)
          end
        end
      end

      logger = Bundler::UI::Shell.new
      logger.level = debug? ? "debug" : "warn"

      [root, logger]
    end

    def solve_versions(root:, logger:)
      solver = PubGrub::VersionSolver.new(:source => self, :root => root, :logger => logger)
      result = solver.solve
      result.map {|package, version| version.to_specs(package) }.flatten.uniq
    rescue PubGrub::SolveFailure => e
      incompatibility = e.incompatibility

      names_to_unlock, names_to_allow_prereleases_for, extended_explanation = find_names_to_relax(incompatibility)

      names_to_relax = names_to_unlock + names_to_allow_prereleases_for

      if names_to_relax.any?
        if names_to_unlock.any?
          Bundler.ui.debug "Found conflicts with locked dependencies. Will retry with #{names_to_unlock.join(", ")} unlocked...", true

          @base.unlock_names(names_to_unlock)
        end

        if names_to_allow_prereleases_for.any?
          Bundler.ui.debug "Found conflicts with dependencies with prereleases. Will retrying considering prereleases for #{names_to_allow_prereleases_for.join(", ")}...", true

          @base.include_prereleases(names_to_allow_prereleases_for)
        end

        root, logger = setup_solver

        Bundler.ui.debug "Retrying resolution...", true
        retry
      end

      explanation = e.message

      if extended_explanation
        explanation << "\n\n"
        explanation << extended_explanation
      end

      raise SolveFailure.new(explanation)
    end

    def find_names_to_relax(incompatibility)
      names_to_unlock = []
      names_to_allow_prereleases_for = []
      extended_explanation = nil

      while incompatibility.conflict?
        cause = incompatibility.cause
        incompatibility = cause.incompatibility

        incompatibility.terms.each do |term|
          package = term.package
          name = package.name

          if base_requirements[name]
            names_to_unlock << name
          elsif package.ignores_prereleases?
            names_to_allow_prereleases_for << name
          end

          no_versions_incompat = [cause.incompatibility, cause.satisfier].find {|incompat| incompat.cause.is_a?(PubGrub::Incompatibility::NoVersions) }
          next unless no_versions_incompat

          extended_explanation = no_versions_incompat.extended_explanation
        end
      end

      [names_to_unlock.uniq, names_to_allow_prereleases_for.uniq, extended_explanation]
    end

    def parse_dependency(package, dependency)
      range = if repository_for(package).is_a?(Source::Gemspec)
        PubGrub::VersionRange.any
      else
        requirement_to_range(dependency)
      end

      PubGrub::VersionConstraint.new(package, :ranggems/gems/bundler-2.4.19/lib/bundler/resolver.rb000064400000035167150403133530015216 0ustar00hing_other_platforms = filter_matching_specs(@all_specs[name], requirements)

        platforms_explanation = specs_matching_other_platforms.any? ? " for any resolution platforms (#{package.platforms.join(", ")})" : ""
        custom_explanation = "#{constraint} could not be found in #{repository_for(package)}#{platforms_explanation}"

        label = "#{name} (#{constraint_string})"
        extended_explanation = other_specs_matching_message(specs_matching_other_platforms, label) if specs_matching_other_platforms.any?
      end

      Incompatibility.new([unsatisfied_term], :cause => cause, :custom_explanation => custom_explanation, :extended_explanation => extended_explanation)
    end

    def debug?
      ENV["BUNDLER_DEBUG_RESOLVER"] ||
        ENV["BUNDLER_DEBUG_RESOLVER_TREE"] ||
        ENV["DEBUG_RESOLVER"] ||
        ENV["DEBUG_RESOLVER_TREE"] ||
        false
    end

    def incompatibilities_for(package, version)
      package_deps = @cached_dependencies[package]
      sorted_versions = @sorted_versions[package]
      package_deps[version].map do |dep_package, dep_constraint|
        low = high = sorted_versions.index(version)

        # find version low such that all >= low share the same dep
        while low > 0 && package_deps[sorted_versions[low - 1]][dep_package] == dep_constraint
          low -= 1
        end
        low =
          if low == 0
            nil
          else
            sorted_versions[low]
          end

        # find version high such that all < high share the same dep
        while high < sorted_versions.length && package_deps[sorted_versions[high]][dep_package] == dep_constraint
          high += 1
        end
        high =
          if high == sorted_versions.length
            nil
          else
            sorted_versions[high]
          end

        range = PubGrub::VersionRange.new(:min => low, :max => high, :include_min => true)

        self_constraint = PubGrub::VersionConstraint.new(package, :range => range)

        dep_term = PubGrub::Term.new(dep_constraint, false)
        self_term = PubGrub::Term.new(self_constraint, true)

        custom_explanation = if dep_package.meta? && package.root?
          "current #{dep_package} version is #{dep_constraint.constraint_string}"
        end

        PubGrub::Incompatibility.new([self_term, dep_term], :cause => :dependency, :custom_explanation => custom_explanation)
      end
    end

    def all_versions_for(package)
      name = package.name
      results = (@base[name] + filter_prereleases(@all_specs[name], package)).uniq {|spec| [spec.version.hash, spec.platform] }

      if name == "bundler" && !bundler_pinned_to_current_version?
        bundler_spec = Gem.loaded_specs["bundler"]
        results << bundler_spec if bundler_spec
      end

      locked_requirement = base_requirements[name]
      results = filter_matching_specs(results, locked_requirement) if locked_requirement

      versions = results.group_by(&:version).reduce([]) do |groups, (version, specs)|
        platform_specs = package.platforms.flat_map {|platform| select_best_platform_match(specs, platform) }
        next groups if platform_specs.empty?

        ruby_specs = select_best_platform_match(specs, Gem::Platform::RUBY)
        groups << Resolver::Candidate.new(version, :specs => ruby_specs) if ruby_specs.any?

        next groups if platform_specs == ruby_specs || package.force_ruby_platform?

        groups << Resolver::Candidate.new(version, :specs => platform_specs)

        groups
      end

      sort_versions(package, versions)
    end

    def source_for(name)
      @source_requirements[name] || @source_requirements[:default]
    end

    def default_bundler_source
      @source_requirements[:default_bundler]
    end

    def bundler_pinned_to_current_version?
      !default_bundler_source.nil?
    end

    def name_for_explicit_dependency_source
      Bundler.default_gemfile.basename.to_s
    rescue StandardError
      "Gemfile"
    end

    def raise_not_found!(package)
      name = package.name
      source = source_for(name)
      specs = @all_specs[name]
      matching_part = name
      requirement_label = SharedHelpers.pretty_dependency(package.dependency)
      cache_message = begin
                          " or in gems cached in #{Bundler.settings.app_cache_path}" if Bundler.app_cache.exist?
                        rescue GemfileNotFound
                          nil
                        end
      specs_matching_requirement = filter_matching_specs(specs, package.dependency.requirement)

      if specs_matching_requirement.any?
        specs = specs_matching_requirement
        matching_part = requirement_label
        platforms = package.platforms
        platform_label = platforms.size == 1 ? "platform '#{platforms.first}" : "platforms '#{platforms.join("', '")}"
        requirement_label = "#{requirement_label}' with #{platform_label}"
      end

      message = String.new("Could not find gem '#{requirement_label}' in #{source}#{cache_message}.\n")

      if specs.any?
        message << "\n#{other_specs_matching_message(specs, matching_part)}"
      end

      raise GemNotFound, message
    end

    private

    def filter_matching_specs(specs, requgems/gems/bundler-2.4.19/lib/bundler/source/rubygems_aggregate.rb000064400000004134150403133530020506 0ustar00p do |dep_package, dep_constraint|
        name = dep_package.name

        next [dep_package, dep_constraint] if name == "bundler"

        versions = versions_for(dep_package, dep_constraint.range)
        if versions.empty? && dep_package.ignores_prereleases?
          @sorted_versions.delete(dep_package)
          dep_package.consider_prereleases!
          versions = versions_for(dep_package, dep_constraint.range)
        end
        next [dep_package, dep_constraint] unless versions.empty?

        next unless dep_package.current_platform?

        raise_not_found!(dep_package)
      end.compact.to_h
    end

    def other_specs_matching_message(specs, requirement)
      message = String.new("The source contains the following gems matching '#{requirement}':\n")
      message << specs.map {|s| "  * #{s.full_name}" }.join("\n")
      message
    end

    def requirement_to_range(requirement)
      ranges = requirement.requirements.map do |(op, version)|
        ver = Resolver::Candidate.new(version).generic!
        platform_ver = Resolver::Candidate.new(version).platform_specific!

        case op
        when "~>"
          name = "~> #{ver}"
          bump = Resolver::Candidate.new(version.bump.to_s + ".A")
          PubGrub::VersionRange.new(:name => name, :min => ver, :max => bump, :include_min => true)
        when ">"
          PubGrub::VersionRange.new(:min => platform_ver)
        when ">="
          PubGrub::VersionRange.new(:min => ver, :include_min => true)
        when "<"
          PubGrub::VersionRange.new(:max => ver)
        when "<="
          PubGrub::VersionRange.new(:max => platform_ver, :include_max => true)
        when "="
          PubGrub::VersionRange.new(:min => ver, :max => platform_ver, :include_min => true, :include_max => true)
        when "!="
          PubGrub::VersionRange.new(:min => ver, :max => platform_ver, :include_min => true, :include_max => true).invert
        else
          raise "bad version specifier: #{op}"
        end
      end

      ranges.inject(&:intersect)
    end

    def to_dependency_hash(dependencies, packages)
      dependencies.inject({}) gems/gems/bundler-2.4.19/lib/bundler/source/gemspec.rb000064400000000436150403133530016267 0ustar00nt version of Bundler than the one you're running, and that version could not be found.\n"
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/path.rb000064400000017514150403133530015605 0ustar00# frozen_string_literal: true

module Bundler
  class Source
    class RubygemsAggregate
      attr_reader :source_map, :sources

      def initialize(sources, source_map)
        @sources = sources
        @source_map = source_map

        @index = build_index
      end

      def specs
        @index
      end

      def identifier
        to_s
      end

      def to_s
        "any of the sources"
      end

      private

      def build_index
        Index.build do |idx|
          dependency_names = source_map.pinned_spec_names

          sources.all_sources.each do |source|
            source.dependency_names = dependency_names - source_map.pinned_spec_names(source)
            idx.add_source source.specs
            dependency_names.concat(source.unmet_deps).uniq!
          end

          double_check_for_index(idx, dependency_names)
        end
      end

      # Suppose the gem Foo depends on the gem Bar.  Foo exists in Source A.  Bar has some versions that exist in both
      # sources A and B.  At this point, the API request will have found all the versions of Bar in source A,
      # but will not have found any versions of Bar from source B, which is a problem if the requested version
      # of Foo specifically depends on a version of Bar that is only found in source B. This ensures that for
      # each spec we found, we add all possible versions from all sources to the index.
      def double_check_for_index(idx, dependency_names)
        pinned_names = source_map.pinned_spec_names

        names = :names # do this so we only have to traverse to get dependency_names from the index once
        unmet_dependency_names = lambda do
          return names unless names == :names
          new_names = sources.all_sources.map(&:dependency_names_to_double_check)
          return names = nil if new_names.compact!
          names = new_names.flatten(1).concat(dependency_names)
          names.uniq!
          names -= pinned_names
          names
        end

        sources.all_sources.each do |source|
          source.double_check_for(unmet_dependency_names)
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/gemspec.rb000064400000000436150403133530016267 0ustar00# frozen_string_literal: true

module Bundler
  class Source
    class Gemspec < Path
      attr_reader :gemspec

      def initialize(options)
        super
        @gemspec = options["gemspec"]
      end

      def as_path_source
        Path.new(options)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/path.rb000064400000017514150403133530015605 0ustar00# frozen_string_literal: true

module Bundler
  class Source
    class Path < Source
      autoload :Installer, File.expand_path("path/installer", __dir__)

      attr_reader :path, :options, :root_path, :original_path
      attr_writer :name
      attr_accessor :version

      protected :original_path

      DEFAULT_GLOB = "{,*,*/*}.gemspec"

      def initialize(options)
        @options = options.dup
        @glob = options["glob"] || DEFAULT_GLOB

        @allow_cached = false
        @allow_remote = false

        @root_path = options["root_path"] || root

        if options["path"]
          @path = Pathname.new(optiogems/gems/bundler-2.4.19/lib/bundler/source/rubygems_aggregate.rb000064400000004134150403133530020506 0ustar00ob == DEFAULT_GLOB
        out << "  specs:\n"
      end

      def to_s
        "source at `#{@path}`"
      end

      def hash
        [self.class, expanded_path, version].hash
      end

      def eql?(other)
        return unless other.class == self.class
        expanded_original_path == other.expanded_original_path &&
          version == other.version
      end

      alias_method :==, :eql?

      def name
        File.basename(expanded_path.to_s)
      end

      def install(spec, options = {})
        using_message = "Using #{version_message(spec, options[:previous_spec])} from #{self}"
        using_message += " and installing its executables" unless spec.executables.empty?
        print_using_message using_message
        generate_bin(spec, :disable_extensions => true)
        nil # no post-install message
      end

      def cache(spec, custom_path = nil)
        app_cache_path = app_cache_path(custom_path)
        return unless Bundler.feature_flag.cache_all?
        return if expand(@original_path).to_s.index(root_path.to_s + "/") == 0

        unless @original_path.exist?
          raise GemNotFound, "Can't cache gem #{version_message(spec)} because #{self} is missing!"
        end

        FileUtils.rm_rf(app_cache_path)
        FileUtils.cp_r("#{@original_path}/.", app_cache_path)
        FileUtils.touch(app_cache_path.join(".bundlecache"))
      end

      def local_specs(*)
        @local_specs ||= load_spec_files
      end

      def specs
        if has_app_cache?
          @path = app_cache_path
          @expanded_path = nil # Invalidate
        end
        local_specs
      end

      def app_cache_dirname
        name
      end

      def root
        Bundler.root
      end

      def expanded_original_path
        @expanded_original_path ||= expand(original_path)
      end

      private

      def expanded_path
        @expanded_path ||= expand(path)
      end

      def expand(somepath)
        if Bundler.current_ruby.jruby? # TODO: Unify when https://github.com/rubygems/bundler/issues/7598 fixed upstream and all supported jrubies include the fix
          somepath.expand_gems/gems/bundler-2.4.19/lib/bundler/source/git/git_proxy.rb000064400000033127150403133530017456 0ustar00pec)
      end

      def load_spec_files
        index = Index.new

        if File.directory?(expanded_path)
          # We sort depth-first since `<<` will override the earlier-found specs
          Gem::Util.glob_files_in_dir(@glob, expanded_path).sort_by {|p| -p.split(File::SEPARAgems/gems/bundler-2.4.19/lib/bundler/source/path.rb000064400000017514150403133530015605 0ustar00one"]
              if expanded_path.join("bin").exist?
                executables = expanded_path.join("bin").children
                executables.reject! {|p| File.directory?(p) }
                s.executables = executables.map {|c| c.basename.to_s }
              end
            end
          end
        else
          message = String.new("The path `#{expanded_path}` ")
          message << if File.exist?(expanded_path)
            "is not a directory."
          else
            "does not exist."
          end
          raise PathError, message
        end

        index
      end

      def relative_path(path = self.path)
        if path.to_s.start_with?(root_path.to_s)
          return path.relative_path_from(root_path)
        end
        path
      end

      def generate_bin(spec, options = {})
        gem_dir = Pathname.new(spec.full_gem_path)

        # Some gem authors put absolute paths in their gemspec
        # and we have to save them from themselves
        spec.files = spec.files.map do |path|
          next path unless /\A#{Pathname::SEPARATOR_PAT}/.match?(path)
          next if File.directory?(path)
          begin
            Pathname.new(path).relative_path_from(gem_dir).to_s
          rescue ArgumentError
            path
          end
        end.compact

        installer = Path::Installer.new(
          spec,
          :env_shebang => false,
          :disable_extensions => options[:disable_extensions],
          :build_args => options[:build_args],
          :bundler_extension_cache_path => extension_cache_path(spec)
        )
        installer.post_install
      rescue Gem::InvalidSpecificationException => e
        Bundler.ui.warn "\n#{spec.name} at #{spec.full_gem_path} did not have a valid gemspec.\n" \
                        "This prevents bundler from installing bins or native extensions, but " \
                        "that may not affect its functionality."

        if !spec.extensions.empty? && !spec.email.empty?
          Bundler.ui.warn "If you need to use this package without installing it from a gem " \
                          "repository, please contact #{spec.email} and ask them " \
                          "to modify their .gemspec so it can work with `gem build`."
        end

        Bundler.ui.warn "The validation message from RubyGems was:\n  #{e.message}"
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/git/git_proxy.rb000064400000033127150403133530017456 0ustar00# frozen_string_literal: true

module Bundler
  class Source
    class Git
      class GitNotInstalledError < GitError
        def initialize
          msg = String.new
          msg << "You need to install git to be able to use gems from git repositories. "
          msg << "For help installing git, please refer to GitHub's tutorial at https://help.github.com/articles/set-up-git"
          super msg
        end
      end

      class GitNotAllowedError < GitError
        def initialize(command)
          msg = String.new
          msg << "Bundler is trying to run `#{command}` at runtime. You probably need to run `bundle install`. However, "
          msg << "this error message could probably be more useful. Please submit a ticket at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md "
          msg << "with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"
          super msg
        end
      end

      class GitCommandError < GitError
        attr_reader :command

        def initialize(command, path, extra_info = nil)
          @command = command

          msg = String.new("Git error: command `#{command}`")
          msg << " in directory #{path}" if path
          msg << " has failed."
          msg << "\n#{extra_info}" if extra_info
          super msg
        end
      end

      class MissingGitRevisionError < GitCommandError
        def initialize(command, destination_path, ref, repo)
          msg = "Revision #{ref} does not exist in the repository #{repo}. Maybe you misspelled it?"
          super command, destination_path, msg
        end
      end

      # The GitProxy is responsible to interact with git repositories.
      # All actions required by the Git source is encapsulated in this
      # object.
      class GitProxy
        attr_accessor :path, :uri, :branch, :tag, :ref, :explicit_ref
        attr_writer :revision

        def initialize(path, uri, options = {}, revision = nil, git = nil)
          @path     = path
          @uri      = uri
          @branch   = options["branch"]
          @tag      = options["tag"]
          @ref      = options["ref"]
          @explicit_ref = branch || tag || ref
          @revision = revision
          @git      = git
          @commit_ref = nil
        end

        def revision
          @revision ||= allowed_with_path { find_local_revision }
        end

        def current_branch
          @current_branch ||= with_path do
            git_local("rev-parse", "--abbrev-ref", "HEAD", :dir => path).strip
          end
        end

        def contains?(commit)
          allowed_with_path do
            result, status = git_null("branch", "--contains", commit, :dir => path)
            status.success? && result =~ /^\* (.*)$/
          end
        end

        def version
          @version ||= full_version.match(/((\.?\d+)+).*/)[1]
        end

        def full_version
          @full_version ||= git_local("--version").sub(/git version\s*/, "").strip
        end

        def checkout
          return if has_revision_cached?

          Bundler.ui.info "Fetching #{credential_filtered_uri}"

          extra_fetch_needed = clone_needs_extra_fetch?
          unshallow_needed = clone_needs_unshallow?
          return unless extra_fetch_needed || unshallow_needed

          git_remote_fetch(unshallow_needed ? ["--unshallow"] : depth_args)
        end

        def copy_to(destination, submodules = false)
          unless File.exist?(destination.join(".git"))
            begin
              SharedHelpers.filesystem_access(destination.dirname) do |p|
                FileUtils.mkdir_p(p)
              end
              SharedHelpers.filesystem_access(destination) do |p|
                FileUtils.rm_rf(p)
              end
              git "clone", "--no-checkout", "--quiet", path.to_s, destination.to_s
              File.chmod(((File.stat(destination).mode | 0o777) & ~File.umask), destination)
            rescue Errno::EEXIST => e
              file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1]
              raise GitError, "Bundler could not install a gem because it needs to " \
                "create a directory, but a file exists - #{file_path}. Please delete " \
                "this file and try again."
            end
          end

          git "fetch", "--force", "--quiet", *extra_fetch_args, :dir => destination if @commit_ref

          git "reset", "--hard", @revision, :dir => destination

          if submodules
            git_retry "submodule", "update", "--init", "--recursive", :dir => destination
          elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
            inner_command = "git -C $toplevel submodule deinit --force $sm_path"
            git_retry "submodule", "foreach", "--quiet", inner_command, :dir => destination
          end
        end

        private

        def git_remote_fetcgems/gems/bundler-2.4.19/lib/bundler/source/git/git_proxy.rb000064400000033127150403133530017456 0ustar00ntials, path, err)
            end
          end
        end

        def clone_needs_extra_fetch?
          return true if path.exist?

          SharedHelpers.filesystem_access(path.dirname) do |p|
            FileUtils.mkdir_p(p)
          end

          command = ["clone", "--bare", "--no-hardlinks", "--quiet", *extra_clone_args, "--", configured_uri, path.to_s]
          command_with_no_credentials = check_allowed(command)

          Bundler::Retry.new("`#{command_with_no_credentials}`", [MissingGitRevisionError]).attempts do
            _, err, status = capture(command, nil)
            return extra_ref if status.success?

            if err.include?("Could not find remote branch") || # git up to 2.49
               err.include?("Remote branch #{branch_option} not found") # git 2.49 or higher
              raise MissingGitRevisionError.new(command_with_no_credentials, nil, explicit_ref, credential_filtered_uri)
            else
              raise GitCommandError.new(command_with_no_credentials, path, err)
            end
          end
        end

        def clone_needs_unshallow?
          return false unless path.join("shallow").exist?
          return true if full_clone?

          @revision && @revision != head_revision
        end

        def extra_ref
          return false if not_pinned?
          return true unless full_clone?

          ref.start_with?("refs/")
        end

        def depth
          return @depth if defined?(@depth)

          @depth = if !supports_fetching_unreachable_refs?
            nil
          elsif not_pinned? || pinned_to_full_sha?
            1
          elsif ref.include?("~")
            parsed_depth = ref.split("~").last
            parsed_depth.to_i + 1
          end
        end

        def refspec
          if commit
            @commit_ref = "refs/#{commit}-sha"
            return "#{commit}:#{@commit_ref}"
          end

          reference = fully_qualified_ref

          reference ||= if ref.include?("~")
            ref.split("~").first
          elsif ref.start_with?("refs/")
            ref
          else
            "refs/*"
          end

          "#{reference}:#{reference}"
        end

        def commit
          @commit ||= pinned_to_full_sha? ? ref : @revision
        end

        def fully_qualified_ref
          if branch
            "refs/heads/#{branch}"
          elsif tag
            "refs/tags/#{tag}"
          elsif ref.nil?
            "refs/heads/#{current_branch}"
          end
        end

        def not_pinned?
          branch_option || ref.nil?
        end

        def pinned_to_full_sha?
          ref =~ /\A\h{40}\z/
        end

        def git_null(*command, dir: nil)
          check_allowed(command)

          capture(command, dir, :ignore_err => true)
        end

        def git_retry(*command, dir: nil)
          command_with_no_credentials = check_allowed(command)

          Bundler::Retry.new("`#{command_with_no_credentials}` at #{dir || SharedHelpers.pwd}").attempts do
            git(*command, :dir => dir)
          end
        end

        def git(*command, dir: nil)
          run_command(*command, :dir => dir) do |unredacted_command|
            check_allowed(unredacted_command)
          end
        end

        def git_local(*command, dir: nil)
          run_command(*command, :dir => dir) do |unredacted_command|
            redact_and_check_presence(unredacted_command)
          end
        end

        def has_revision_cached?
          return unless @revision && path.exist?
          git("cat-file", "-e", @revision, :dir => path)
          true
        rescue GitError
          false
        end

        def find_local_revision
          return head_revision if explicit_ref.nil?

          find_revision_for(explicit_ref)
        end

        def head_revision
          verify("HEAD")
        end

        def find_revision_for(reference)
          verify(reference)
        rescue GitCommandError => e
          raise MissingGitRevisionError.new(e.command, path, reference, credential_filtered_uri)
        end

        def verify(reference)
          git("rev-parse", "--verify", reference, :dir => path).strip
 gems/gems/bundler-2.4.19/lib/bundler/source/git.rb000064400000026151150403133530015431 0ustar00low?
          raise GitError, "The git source #{uri} is not yet checked out. Please run `bundle install` before trying to start your application"
        end

        def check_allowed(command)
          command_with_no_credentials = redact_and_check_presence(command)
          raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
          command_with_no_credentials
        end

        def redact_and_check_presence(command)
          raise GitNotInstalledError.new unless Bundler.git_present?

          require "shellwords"
          URICredentialsFilter.credential_filtered_string("git #{command.shelljoin}", uri)
        end

        def run_command(*command, dir: nil)
          command_with_no_credentials = yield(command)

          out, err, status = capture(command, dir)

          raise GitCommandError.new(command_with_no_credentials, dir || SharedHelpers.pwd, err) unless status.success?

          Bundler.ui.warn err unless err.empty?

          out
        end

        def capture(cmd, dir, ignore_err: false)
          SharedHelpers.with_clean_git_env do
            require "open3"
            out, err, status = Open3.capture3(*capture3_args_for(cmd, dir))

            filtered_out = URICredentialsFilter.credential_filtered_string(out, uri)
            return [filtered_out, status] if ignore_err

            filtered_err = URICredentialsFilter.credential_filtered_string(err, uri)
            [filtered_out, filtered_err, status]
          end
        end

        def capture3_args_for(cmd, dir)
          return ["git", *cmd] unless dir

          if Bundler.feature_flag.bundler_3_mode? || supports_minus_c?
            ["git", "-C", dir.to_s, *cmd]
          else
            ["git", *cmd, { :chdir => dir.to_s }]
          end
        end

        def extra_clone_args
          args = depth_args
          return [] if args.empty?

          args += ["--single-branch"]
          args.unshift("--no-tags") if supports_cloning_with_no_tags?

          # If there's a locked revision, no need to clone any specific branch
          # or tag, since we will end up checking out that locked revision
          # anyways.
          return args if @revision

          args += ["--branch", branch_option] if branch_option
          args
        end

        def depth_args
          return [] if full_clone?

          ["--depth", depth.to_s]
        end

        def extra_fetch_args
          extra_args = [path.to_s, *depth_args]
          extra_args.push(@commit_ref)
          extra_args
        end

        def branch_option
          branch || tag
        end

        def full_clone?
          depth.nil?
        end

        def supports_minus_c?
          @supports_minus_c ||= Gem::Version.new(version) >= Gem::Version.new("1.8.5")
        end

        def supports_fetching_unreachable_refs?
          @supports_fetching_unreachable_refs ||= Gem::Version.new(version) >= Gem::Version.new("2.5.0")
        end

        def supports_cloning_with_no_tags?
          @supports_cloning_with_no_tags ||= Gem::Version.new(version) >= Gem::Version.new("2.14.0-rc0")
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/git.rb000064400000026151150403133530015431 0ustar00# frozen_string_literal: true

require_relative "../vendored_fileutils"

module Bundler
  class Source
    class Git < Path
      autoload :GitProxy, File.expand_path("git/git_proxy", __dir__)

      attr_reader :uri, :ref, :branch, :options, :glob, :submodules

      def initialize(options)
        @options = options
        @glob = options["glob"] || DEFAULT_GLOB

        @allow_cached = false
        @allow_remote = false

        # Stringify options that could be set as symbols
        %w[ref branch tag revision].each {|k| options[k] = options[k].to_s if options[k] }

        @uri        = URINormalizer.normalize_suffix(options["uri"] || "", :trailing_slash => false)
        @safe_uri   = URICredentialsFilter.credential_filtered_uri(@uri)
        @branch     = options["branch"]
        @ref        = options["ref"] || options["branch"] || options["tag"]
        @submodules = options["submodules"]
        @name       = options["name"]
        @version    = options["version"].to_s.strip.gsub("-", ".pre.")

        @copied     = false
        @local      = false
      end

      def self.from_lock(options)
        new(options.merge("uri" => options.delete("remote")))
      end

      def to_lock
        out = String.new("GIT\n")
        out << "  remote: #{@uri}\n"
        out << "  revision: #{revision}\n"
        %w[ref branch tag submodules].each do |opt|
          out << "  #{opt}: #{options[opt]}\n" if options[opt]
        end
        out << "  glob: #{@glob}\n" unless default_glob?
        out << "  specs:\n"
      end

      def to_gemfile
        specifiers = %w[ref branch tag submodules glob].map do |opt|
          "#{opt}: #{options[opt]}" if options[opt]
        end

        uri_with_specifiers(specifiers)
      end

      def hash
        [self.class, uri, ref, branch, name, version, glob, submodules].hash
      end

      def eql?(other)
        other.is_a?(Git) && uri == other.uri && ref == other.ref &&
          branch == other.branch && name == other.name &&
          version == other.version && glob == other.glob &&
          submodules == other.submodules
      end

      alias_method :==, :eql?

      def include?(other)
        other.is_a?(Git) && uri == other.uri &&
          name == other.name &&
          glob == other.glob &&
          submodules == other.submodules
      end

      def to_s
        begin
          at = humanized_ref || current_branch

          rev = "at #{at}@#{shortref_for_display(revision)}"
        rescue GitError
          ""
        end

        uri_with_specifiers([rev, glob_for_display])
      end

      def identifier
        uri_with_specifiers([humanized_ref, cached_revision, glob_for_display])
      end

      def uri_with_specifiers(specifiers)
        specifiers.compact!

        suffix =
          if specifiers.any?
            " (#{specifiers.join(", ")})"
          else
            ""
          end

        "#{@safe_uri}#{suffix}"
      end

      def name
        File.basename(@uri, ".git")
      end

      # This is the path which is going to contain a specific
      # checkout of the git repository. When using local git
      # repos, this is set to the local repo.
      def install_path
        @install_path ||= begin
          git_scope = "#{base_name}-#{shortref_for_path(revision)}"

          Bundler.install_path.join(git_scope)
        end
      end

      alias_method :path, :install_path

      def extension_dir_name
        "#{base_name}-#{shortref_for_path(revision)}"
      end

      def unlock!
        git_proxy.revision = nil
        options["revision"] = nil

        @unlocked = true
      end

      def local_override!(path)
        return false if local?

        original_path = path
        path = Pathname.new(path)
        path = path.expand_path(Bundler.root) unless path.relative?

        unless branch || Bundler.settings[:disable_local_branch_check]
          raise GitError, "Cannot use local override for #{name} at #{path} because " \
            ":branch is not specified in Gemfile. Specify a branch or run " \
            "`bundle config unset local.#{override_for(original_path)}` to remove the local override"
        end

        unless path.exist?
          raise GitError, "Cannot use local override for #{name} because #{path} " \
            "does not exist. Run `bundle config unset local.#{override_for(original_path)}` to remove the local override"
        end

        set_local!(path)

        # Create a new git proxy without the cached revision
        # so the Gemfile.lock always picks up the new revision.
        @git_proxy = GitProxy.new(path, uri, options)

        if current_branch != branch && !Bundler.settings[:dgems/gems/bundler-2.4.19/lib/bundler/source/git.rb000064400000026151150403133530015431 0ustar00)
          @copied = true
        end

        local_specs
      end

      def install(spec, options = {})
        return if Bundler.settings[:no_install]
        force = options[:force]

        print_using_message "Using #{version_message(spec, options[:previous_spec])} from #{self}"

        if (requires_checkout? && !@copied) || force
          Bundler.ui.debug "  * Checking out revision: #{ref}"
          git_proxy.copy_to(install_path, submodules)
          serialize_gemspecs_in(install_path)
          @copied = true
        end

        generate_bin_options = { :disable_extensions => !Bundler.rubygems.spec_missing_extensions?(spec), :build_args => options[:build_args] }
        generate_bin(spec, generate_bin_options)

        requires_checkout? ? spec.post_install_message : nil
      end

      def cache(spec, custom_path = nil)
        app_cache_path = app_cache_path(custom_path)
        return unless Bundler.feature_flag.cache_all?
        return if path == app_cache_path
        cached!
        FileUtils.rm_rf(app_cache_path)
        git_proxy.checkout if requires_checkout?
        git_proxy.copy_to(app_cache_path, @submodules)
        serialize_gemspecs_in(app_cache_path)
      end

      def load_spec_files
        super
      rescue PathError => e
        Bundler.ui.trace e
        raise GitError, "#{self} is not yet checked out. Run `bundle install` first."
      end

      # This is the path which is going to contain a cache
      # of the git repository. When using the same git repository
      # across different projects, this cache will be shared.
      # When using local git repos, this is segems/gems/bundler-2.4.19/lib/bundler/source/rubygems.rb000064400000036265150403133530016512 0ustar00ef serialize_gemspecs_in(destination)
        destination = destination.expand_path(Bundler.root) if destination.relative?
        Dir["#{destination}/#{@glob}"].each do |spec_path|
          # Evaluate gemspecs and cache the result. Gemspecs
          # in git might require git or other dependencies.
          # The gemspecs we cache should already be evaluated.
          spec = Bundler.load_gemspec(spec_path)
          next unless spec
          Bundler.rubygems.set_installed_by_version(spec)
          Bundler.rubygems.validate(spec)
          File.open(spec_path, "wb") {|file| file.write(spec.to_ruby) }
        end
      end

      def set_local!(path)
        @local       = true
        @local_specs = @git_proxy = nil
        @cache_path  = @install_path = path
      end

      def has_app_cache?
        cached_revision && super
      end

      def requires_checkout?
        allow_git_ops? && !local? && !cached_revision_checked_out?
      end

      def cached_revision_checked_out?
        cached_revision && cached_revision == revision && install_path.exist?
      end

      def base_name
        File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)?(//\w*/)?(\w*/)*}, ""), ".git")
      end

      def shortref_for_display(ref)
        ref[0..6]
      end

      def shortref_for_path(ref)
        ref[0..11]
      end

      def glob_for_display
        default_glob? ? nil : "glob: #{@glob}"
      end

      def default_glob?
        @glob == DEFAULT_GLOB
      end

      def uri_hash
        if %r{^\w+://(\w+@)?}.match?(uri)
          # Downcase the domain component of the URI
          # and strip off a trailing slash, if one is present
          input = Bundler::URI.parse(uri).normalize.to_s.sub(%r{/$}, "")
        else
          # If there is no URI scheme, assume it is an ssh/git URI
          input = uri
        end
        # We use SHA1 here for historical reason and to preserve backward compatibility.
        # But a transition to a simpler mangling algorithm would be welcome.
        Bundler::Digest.sha1(input)
      end

      def cached_revision
        options["revision"]
      end

      def cached?
        cache_path.exist?
      end

      def git_proxy
        @git_proxy ||= GitProxy.new(cache_path, uri, options, cached_revision, self)
      end

      def fetch
        git_proxy.checkout
      rescue GitError => e
        raise unless Bundler.feature_flag.allow_offline_install?
        Bundler.ui.warn "Using cached git data because of network errors:\n#{e}"
      end

      # no-op, since we validate when re-serializing the gemspec
      def validate_spec(_spec); end

      def load_gemspec(file)
        stub = Gem::StubSpecification.gemspec_stub(file, install_path.parent, install_path.parent)
        stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
        StubSpecification.from_stub(stub)
      end

      def git_scope
        "#{base_name}-#{uri_hash}"
      end

      def extension_cache_slug(_)
        extension_dir_name
      end

      def override_for(path)
        Bundler.settings.local_overrides.key(path)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/rubygems.rb000064400000036265150403133530016512 0ustar00# frozen_string_literal: true

require "rubygems/user_interaction"

module Bundler
  class Source
    class Rubygems < Source
      autoload :Remote, File.expand_path("rubygems/remote", __dir__)

      # Ask for X gems per API request
      API_REQUEST_SIZE = 50

      attr_reader :remotes

      def initialize(options = {})
        @options = options
        @remotes = []
        @dependency_names = []
        @allow_remote = false
        @allow_cached = false
        @allow_local = options["allow_local"] || false

        Array(options["remotes"]).reverse_each {|r| add_remote(r) }
      end

      def caches
        @caches ||= [cache_path, *Bundler.rubygems.gem_cache]
      end

      def local_only!
        @specs = nil
        @allow_local = true
        @allow_cached = false
        @allow_remote = false
      end

      def local!
        return if @allow_local

        @specs = nil
        @allow_local = true
      end

      def remote!
        return if @allow_remote

        @specs = nil
        @allow_remote = true
      end

      def cached!
        return if @allow_cached

        @specs = nil
        @allow_local = true
        @allow_cached = true
      end

      def hash
        @remotes.hash
      end

      def eql?(other)
        other.is_a?(Rubygems) && other.credless_remotes == credless_remotes
      end

      alias_method :==, :eql?

      def include?(o)
        o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
      end

      def multiple_remotes?
        @remotes.size > 1
      end

      def no_remotes?
        @remotes.size == 0
      end

      def can_lock?(spec)
        return super unless multiple_remotes?
        include?(spec.source)
      end

      def options
        { "remotes" => @remotes.map(&:to_s) }
      end

      def self.from_lock(options)
        new(options)
      end

      def to_lock
        out = String.new("GEM\n")
        remotes.reverse_each do |remote|
          out << "  remote: #{suppress_configured_credentials remote}\n"
        end
        out << "  specs:\n"
      end

      def to_s
        if remotes.empty?
          "locally installed gems"
        elsif @allow_remote && @allow_cached && @allow_local
          "rubygems repository #{remote_names}, cached gems or installed locally"
        elsif @allow_remote && @allow_local
          "rubygems repository #{remote_names} or installed locally"
        elsif @allow_remote
          "rubygems repository #{remote_names}"
        elsif @allow_cached && @allow_local
          "cached gems or installed locally"
        else
          "locally installed gems"
        end
      end

      def identifier
        if remotes.empty?
          "locally installed gems"
        else
          "rubygems repository #{remote_names}"
        end
      end
      alias_method :name, :identifier
      alias_method :to_gemfile, :identifier

      def specs
        @specs ||= begin
          # remote_specs usually generates a way larger Index than the other
          # sources, and large_idx.use small_idx is way faster than
          # small_idx.use large_idx.
          idx = @allow_remote ? remote_specs.dup : Index.new
          idx.use(cached_specs, :override_dupes) if @allow_cached || @allow_remote
          idx.use(installed_specs, :override_dupes) if @allow_local
          idx
        end
      end

      def install(spec, options = {})
        force = options[:force]
        ensure_builtin_gems_cached = options[:ensure_builtin_gems_cached]

        if ensure_builtin_gems_cached && spec.default_gem? && !cached_path(spec)
          cached_built_in_gem(spec) unless spec.remote
          force = true
        end

        if installed?(spec) && !force
          print_using_message "Using #{version_message(spec, options[:previous_spec])}"
          return nil # no post-install message
        end

        if spec.remote
          # Check for this spec from other sources
          uris = [spec.remote, *remotes_for_spec(spec)].map(&:anonymized_uri).uniq
          Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
        end

        path = fetch_gem_if_possible(spec, options[:previous_spec])
        raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path

        return if Bundler.settings[:no_install]

        install_path = rubygems_dir
        bin_path     = Bundler.system_bindir

        require_relative "../rubygems_gem_installer"

        installer = Bundler::RubyGemsGemInstaller.at(
          path,
          :security_policy => Bundler.rubygems.security_policies[Bundler.settings["trust-policy"]],
          :install_dir => install_path.to_s,
          :bin_dir => bin_pagems/gems/bundler-2.4.19/lib/bundler/source/rubygems.rb000064400000036265150403133530016512 0ustar00pec.extensions.any?
        Bundler.ui.confirm message

        installed_spec = installer.install

        spec.full_gem_path = installed_spec.full_gem_path
        spec.loaded_from = installed_spec.loaded_from

        spec.post_install_message
      end

      def cache(spec, custom_path = nil)
        cached_path = Bundler.settings[:cache_all_platforms] ? fetch_gem_if_possible(spec) : cached_gem(spec)
        raise GemNotFound, "Missing gem file '#{spec.file_name}'." unless cached_path
        return if File.dirname(cached_path) == Bundler.app_cache.to_s
        Bundler.ui.info "  * #{File.basename(cached_path)}"
        FileUtils.cp(cached_path, Bundler.app_cache(custom_path))
      rescue Errno::EACCES => e
        Bundler.ui.debug(e)
        raise InstallError, e.message
      end

      def cached_built_in_gem(spec)
        cached_path = cached_path(spec)
        if cached_path.nil?
          remote_spec = remote_specs.search(spec).first
          if remote_spec
            cached_path = fetch_gem(remote_spec)
          else
            Bundler.ui.warn "#{spec.full_name} is built in to Ruby, and can't be cached because your Gemfile doesn't have any sources that contain it."
          end
        end
        cached_path
      end

      def add_remote(source)
        uri = normalize_uri(source)
        @remotes.unshift(uri) unless @remotes.include?(uri)
      end

      def spec_names
        if @allow_remote && dependency_api_available?
          remote_specs.spec_names
        else
          []
        end
      end

      def unmet_deps
        if @allow_remote && dependency_api_available?
          remote_specs.unmet_dependency_names
        else
          []
        end
      end

      def fetchers
        @fetchers ||= remotes.map do |uri|
          remote = Source::Rubygems::Remote.new(uri)
          Bundler::Fetcher.new(remote)
        end
      end

      def double_check_for(unmet_dependency_names)
        return unless @allow_remote
        return unless dependency_api_available?

        unmet_dependency_names = unmet_dependency_names.call
        unless unmet_dependency_names.nil?
          if api_fetchers.size <= 1
            # can't do this when there are multiple fetchers because then we might not fetch from _all_
            # of them
            unmet_dependency_names -= remote_specs.spec_names # avoid re-fetching things we've already gotten
          end
          return if unmet_dependency_names.empty?
        end

        Bundler.ui.debug "Double checking for #{unmet_dependency_names || "all specs (due to the size of the request)"} in #{self}"

        fetch_names(api_fetchers, unmet_dependency_names, specs, false)
      end

      def dependency_names_to_double_check
        names = []
        remote_specs.each do |spec|
          case spec
          when EndpointSpecification, Gem::Specification, StubSpecification, LazySpecification
            names.concat(spec.runtime_dependencies.map(&:name))
          when RemoteSpecification # from the full index
            return nil
          else
            raise "unhandled spec type (#{spec.inspect})"
          end
        end
        names
      end

      def dependency_api_available?
        @allow_remote && api_fetchers.any?
      end

      protected

      def remote_names
        remotes.map(&:to_s).join(", ")
      end

      def credless_remotes
        if Bundler.settings[:allow_deployment_source_credential_changes]
          remotes.map(&method(:remove_auth))
        else
          remotes.map(&method(:suppress_configured_credentials))
        end
      end

      def remotes_for_spec(spec)
        specs.search_all(spec.name).inject([]) do |uris, s|
          uris << s.remote if s.remote
          uris
        end
      end

      def cached_gem(spec)
        if spec.default_gem?
          cached_built_in_gem(spec)
        else
          cached_path(spec)
        end
      end

      def cached_path(spec)
        global_cache_path = download_cache_path(spec)
        caches << global_cache_path if global_cache_path

        possibilities = caches.map {|p| package_path(p, spec) }
        possibilities.find {|p| File.exist?(p) }
      end

      def package_path(cache_path, spec)
        "#{cache_path}/#{spec.file_name}"
      end

      def normalize_uri(uri)
        uri = URINormalizer.normalize_suffix(uri.to_s)
        require_relative "../vendored_uri"
        uri = Bundler::URI(uri)
        raise ArgumentError, "The source must be an absolute URI. For example:\n" \
          "source 'https://rubygems.org'" if !uri.absolute? || (uri.is_a?(Bundler::URI::HTTP) && uri.host.nil?)
        uri
      end

      def suppress_configured_credentials(remote)
        remote_nouser = remove_auth(remote)
        if remote.userinfo && remote.userinfo == Bundler.settings[remote_nouser]
          remote_nouser
        else
          remote
        end
      end

      def remove_auth(remote)
        if remote.user || remote.password
          remote.dup.tap {|uri| uri.user = uri.password = nil }.to_s
        else
          remote.to_s
        end
      end

      def installed_specs
        @installed_specs ||= Index.build do |idx|
          Bundler.rubygems.all_specs.reverse_each do |spec|
            spec.source = self
            if Bundler.rubygems.spec_missing_extensions?(spec, false)
              Bundler.ui.debug "Source #{self} is ignoring #{spec} because it is missing extensions"
              next
            end
            idx << spec
          end
        end
      end

      def cached_specs
        @cached_specs ||= begin
          idx = @allow_local ? installed_specs.dup : Index.new

          Dir["#{cache_path}/*.gem"].each do |gemfile|
            s ||= Bundler.rubygems.spec_from_gem(gemfile)
            s.source = gems/gems/bundler-2.4.19/lib/bundler/source/rubygems/remote.rb000064400000003447150403133530020001 0ustar00ames(fetchers, dependency_names, index, override_dupes)
        fetchers.each do |f|
          if dependency_names
            Bundler.ui.info "Fetching gem metadata from #{URICredentialsFilter.credential_filtered_uri(f.uri)}", Bundler.ui.debug?
            index.use f.specs_with_retry(dependency_names, self), override_dupes
            Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
          else
            Bundler.ui.info "Fetching source index from #{URICredentialsFilter.credential_filtered_uri(f.uri)}"
            index.use f.specs_with_retry(nil, self), override_dupes
          end
        end
      end

      def fetch_gem_if_possible(spec, previous_spec = nil)
        if spec.remote
          fetch_gem(spec, previous_spec)
        else
          cached_gem(spec)
        end
      end

      def fetch_gem(spec, previous_spec = nil)
        spec.fetch_platform

        cache_path = download_cache_path(spec) || default_cache_path_for(rubygems_dir)
        gem_path = package_path(cache_path, spec)
        return gem_path if File.exist?(gem_path)

        SharedHelpers.filesystem_access(cache_path) do |p|
          FileUtils.mkdir_p(p)
        end
        download_gem(spec, cache_path, previous_spec)

        gem_path
      end

      def installed?(spec)
        installed_specs[spec].any? && !spec.deleted_gem?
      end

      def rubygems_dir
        Bundler.bundle_path
      end

      def default_cache_path_for(dir)
        "#{dir}/cache"
      end

      def cache_path
        Bundler.app_cache
      end

      private

      # Checks if the requested spec exists in the global cache. If it does,
      # we copy it to the download path, and if it does not, we download it.
      #
      # @param  [Specification] spec
      #         the spec we want to downloagems/gems/bundler-2.4.19/lib/bundler/source/metadata.rb000064400000003057150403133530016426 0ustar00ms with the same name
      # -- and possibly different versions -- from different sources are saved
      # to their respective subdirectories and do not override one another.
      #
      # @param  [Gem::Specification] specification
      #
      # @return [Pathname] The global cache path.
      #
      def download_cache_path(spec)
        return unless Bundler.feature_flag.global_gem_cache?
        return unless remote = spec.remote
        return unless cache_slug = remote.cache_slug

        Bundler.user_cache.join("gems", cache_slug)
      end

      def extension_cache_slug(spec)
        return unless remote = spec.remote
        remote.cache_slug
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/rubygems/remote.rb000064400000003447150403133530020001 0ustar00# frozen_string_literal: true

module Bundler
 gems/gems/bundler-2.4.19/lib/bundler/source/path/installer.rb000064400000003054150403133530017574 0ustar00          uri_parts[-1] = uri_digest
            uri_parts.compact.join(".")
          end
        end

        def to_s
          "rubygems remote at #{anonymized_uri}"
        end

        private

        def apply_auth(uri, auth)
          if auth && uri.userinfo.nil?
            uri = uri.dup
            uri.userinfo = auth
          end

          uri
        rescue Bundler::URI::InvalidComponentError
          error_message = "Please CGI escape your usernames and passwords before " \
                          "setting them for authentication."
          raise HTTPError.new(error_message)
        end

        def remove_auth(uri)
          if uri.userinfo
            uri = uri.dup
            uri.user = uri.password = nil
          end

          uri
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/metadata.rb000064400000003057150403133530016426 0ustar00# frozen_string_literal: true

module Bundlegems/gems/bundler-2.4.19/lib/bundler/retry.rb000064400000003165150403133540014514 0ustar00local_spec
          end

          idx.each {|s| s.source = self }
        end
      end

      def options
        {}
      end

      def install(spec, _opts = {})
        print_using_message "Using #{version_message(spec)}"
        nil
      end

      def to_s
        "the local ruby installation"
      end

      def ==(other)
        self.class == other.class
      end
      alias_method :eql?, :==

      def hash
        self.class.hash
      end

      def version_message(spec)
        "#{spec.name} #{spec.version}"
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/source/path/installer.rb000064400000003054150403133530017574 0gems/gems/bundler-2.4.19/lib/bundler/source/rubygems/remote.rb0000644gems/gems/bundler-2.4.19/lib/bundler/process_lock.rb000064400000001256150403133540016034 0ustar00empty?

          run_hooks(:post_install)
        end

        private

        def run_hooks(type)
          hooks_meth = "#{type}_hooks"
          return unless Gem.respond_to?(hooks_meth)
          Gem.send(hooks_meth).each do |hook|
            result = hook.call(self)
            next unless result == false
            location = " at #{$1}" if hook.inspect =~ /@(.*:\d+)/
            message = "#{type} hook#{location} failed for #{spec.full_name}"
            raise InstallHookError, message
          end
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/rubygems_gem_installer.rb000064400000012370150403133550020110 0ustar00gems/gems/bundler-2.4.19/lib/bundler/source/metadata.rb000064400000003057150403133530016426 0ustar00exceptions = Array(exceptions) || []
      @total_runs = @retries + 1 # will run once, then upto attempts.times
    end

    def attempt(&block)
      @current_run = 0
      @failed      = false
      @error       = nil
      run(&block) while keep_trying?
      @result
    end
    alias_method :attempts, :attempt

    private

    def run(&block)
      @failed = false
      @current_run += 1
      @result = block.call
    rescue StandardError => e
      fail_attempt(e)
    end

    def fail_attempt(e)
      @failed = true
      if last_attempt? || @exceptions.any? {|k| e.is_a?(k) }
        Bundler.ui.info "" unless Bundler.ui.debug?
        raise e
      end
      return true unless name
      Bundler.ui.info "" unless Bundler.ui.debug? # Add new line in case dots preceded this
      Bundler.ui.warn "Retrying #{name} due to error (#{current_run.next}/#{total_runs}): #{e.class} #{e.message}", Bundler.ui.debug?
    end

    def keep_trying?
      return true  if current_run.zero?
      return false if last_attempt?
      return true  if @failed
    end

    def last_attempt?
      current_run >= total_runs
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/process_logems/gems/bundler-2.4.19/lib/bundler/source/path/installer.rb000064400000003054150403133530017574 0ustar00he lock file or is using NFS where
      # locks are not available we skip locking.
      yield
    ensure
      FileUtils.rm_f(lock_file_path) if has_lock
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/rubygems_gem_installer.rb000064400000012370150403133550020110 0ustar00# frozen_string_literal: true

require "rubygems/installer"

module Bundler
  class RubyGemsGemInstaller < Gem::Installer
    def check_executable_overwrite(filename)
      # Bundler needs to install gems regardless of binstub overwriting
    end

    def install
      pre_install_checks

      run_pre_install_hooks

      spec.loaded_from = spec_file

      # Completely remove any previous gem files
      strict_rm_rf gem_dir
      strict_rm_rf spec.extension_dir

      SharedHelpers.filesystem_access(gem_dir, :create) do
        FileUtils.mkdir_p ggems/gems/bundler-2.4.19/lib/bundler/retry.rb000064400000003165150403133540014514 0gems/gems/bundler-2.4.19/lib/bundler/capistrano.rb000064400000001563150403133550015513 0ustar00|p|
          FileUtils.mkpath p
        end
        SharedHelpers.filesystem_access(extension_cache_path) do
          FileUtils.cp_r extension_cache_path, extension_dir
        end
      else
        prepare_extension_build(extension_dir)
        super
        SharedHelpers.filesystem_access(extension_cache_path.parent, &:mkpath)
        SharedHelpers.filesystem_access(extension_cache_path) do
          FileUtils.cp_r extension_dir, extension_cache_path
        end
      end
    end

    def spec
      if Bundler.rubygems.provides?("< 3.3.12") # RubyGems implementation rescues and re-raises errors before 3.3.12 and we don't want that
        @package.spec
      else
        super
      end
    end

    private

    def prepare_extension_build(extension_dir)
      SharedHelpers.filesystem_access(extension_dir, :create) do
        FileUtils.mkdir_p extension_dir
      engems/gems/bundler-2.4.19/lib/bundler/gem_helpers.rb000064400000010126150403133550015635 0ustar00gems/gems/bundler-2.4.19/lib/bundler/process_lock.rb000064400000001256150403133540016034 0ustar00ded to the server, and could be a potential security issue.

          To resolve this issue:
          1. delete the downloaded gem located at: `#{spec.gem_dir}/#{spec.full_name}.gem`
          2. run `bundle install`

          If you wish to continue installing the downloaded gem, and are certain it does not pose a \
          security issue despite the mismatching checksum, do the following:
          1. run `bundle config set --local disable_checksum_validation true` to turn off checksum verification
          2. run `bundle install`

          (More info: The expected SHA256 checksum was #{checksum.inspect}, but the \
          checksum for the downloaded gem was #{digestgems/gems/bundler-2.4.19/lib/bundler/rubygems_gem_installer.rb000064400000012370150403133550020110 0ustar00gems/gems/bundler-2.4.19/lib/bundler/capistrano.rb000064400000001563150403133550015513 0ustar00# frozen_string_literal: true

require_relative "shared_helpers"
Bundler::SharedHelpers.major_deprecation 2,
  "The Bundler task for Capistrano. Please use https://github.com/capistrano/bundler"

# Capistrano task for Bundler.
#
# Add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
# Bundler will be activated after each new deployment.
require_relative "deployment"
require "capistrano/version"

if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0")
  raise "For Capistrano 3.x integration, please use https://github.com/capistrano/bundler"
end

Capistrano::Configuration.instance(:must_exist).load do
  before "deploy:finalize_update", "bundle:install"
  Bundler::Deployment.define_task(self, :task, :except => { :no_release => true })
  set :rake, lambda { "#{fetch(:bundle_cmd, "bundle")} exec rake" }
end
gems/gems/bundler-2.4.19/lib/bundler/gem_helpers.rb000064400000010126150403133550015635 0ustar00# frozen_string_literal: true

module Bundler
  module GemHelpers
    GENERIC_CACHE = gems/gems/bundler-2.4.19/lib/bundler/vendored_persistent.rb000064400000000416150403133560017433 0ustar00 end
    end
    module_function :generic

    def generic_local_platform
      generic(local_platform)
    end
    module_function :generic_local_platform

    def local_platform
      Bundler.local_platform
    end
    module_function :local_platform

    def platformgems/gems/bundler-2.4.19/lib/bundler/vendored_tsort.rb000064400000000135150403133570016405 0ustar00g.first

      sorted_matching.take_while {|spec| same_specificity(platform, spec, exemplary_gems/gems/bundler-2.4.19/lib/bundler/build_metadata.rb000064400000002316150403133570016306 0ustar00     elsif spec_platform.cpu.nil? || spec_platform.cpu == "universal"
          1
        else
          2
        end
      end

      def self.platform_version_match(spec_platform, user_platform)
        if spec_platform.version == user_platform.gems/gems/bundler-2.4.19/lib/bundler/capistrano.rb000064400000001563150403133550015513 0ustar00e_runtime_deps && same_metadata_deps
    end
    module_function :same_deps
  end
end
gems/gems/bundler-2.4.19/lib/bundler/gem_tasks.rb000064400000000212150403133570015315 0ustar00gems/gems/bundler-2.4.19/lib/bundler/gem_helpers.rb00006440000001012615gems/gems/bundler-2.4.19/lib/bundler/current_ruby.rb000064400000004672150403133600016073 0ustar00# frozen_string_literal: true

module Bundler; end
require_relative "vendor/tsort/lib/tsort"
gems/gems/bundler-2.4.19/lib/bundler/build_metadata.rb000064400000002316150403133570016306 0ustar00# frozen_string_literal: true

module Bundler
  # Represents metadata from when the Bundler gem was built.
  module BuildMetadata
    # begin ivars
    @release = false
    # end ivars

    # A hash representation of the build metadata.
    def self.to_h
      {
        "Built At" => built_at,
        "Git SHA" => git_commit_sha,
        "Released Version" => release?,
      }
    end

    # A string representing the date the bundler gem was built.
    def self.built_at
      @built_at ||= Time.now.utc.strftime("%Y-%m-%d").freeze
    end

    # The SHA for the git commit the bundler gem was built from.
    def self.git_commit_sha
      return @git_commit_sha if instance_variable_defined? :@git_commit_sha

      # If Bundler has been installed without its .git directory and without a
      # commit instance variable then we can't determine its commits SHA.
      git_dir = File.expand_path("../../../.git", __dir__)
      if File.directory?(git_dir)
        return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
      end

      @git_commit_sha ||= "unknown"
    end

    # Whether this is an official release build of Bundler.
    def self.release?
      @release
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/mirror.rb000064400000013440150403133610014654 0ustar00# frozen_string_literal: true

require "rake/clean"
CLOBBER.include "pkg"

require_relative "gem_helper"
Bundler::GemHelper.install_tasks
gems/gems/bundler-2.4.19/lib/bundler/current_ruby.rbgems/gems/bundler-2.4.19/lib/bundler/vendored_persistent.rb000064400000000416150403133560017433 0ustar00N_PLATFORMS = %w[
      jruby
      maglev
      mingw
      mri
      mswin
      mswin64
      rbx
      ruby
      truffleruby
      windows
      x64_mingw
    ].freeze

    def ruby?
      return true if Bundler::GemHelpers.generic_local_platform == Gem::Platform::gems/gems/bundler-2.4.19/lib/bundler/vendored_tsort.rb000064400000000135150403133570016405 0ustar00f mswin64?
      windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_pgems/gems/bundler-2.4.19/lib/bundler/build_metadata.rb000064400000002316150403133570016306 0ustar00gems/gems/bundler-2.4.19/lib/bundler/mirror.rb000064400000013440150403133610014654 0ustar00# frozen_string_literal: true

require "socket"

module Bundler
  class Settings
    # Class used to build the mirror set and then find a mirror for a given URI
    #
    # @param prober [Prober object, nil] by default a TCPSocketProbe, this object
    #   will be used to probe the mirror address to validate that the mirror replies.
    class Mirrors
      def initialize(prober = nil)
        @all = Mirror.new
        @prober = prober || TCPSocketProbe.new
        @mirrors = {}
      end

      # Returns a mirror for the given uri.
      #
      # Depending on the uri having a valid mirror or not, it may be a
      #   mirror that points to the provided uri
      def for(uri)
        if @all.validate!(@probergems/gems/bundler-2.4.19/lib/bundler/gem_tasks.rb000064400000000212150403133570015315 0ustar00uri that should be used as a mirror and the
    #   fallback timeout which will be used for probing if the mirror
    #   replies on time gems/gems/bundler-2.4.19/lib/bundler/yaml_serializer.rb000064400000004556150403133610016545 0ustar00    return @valid unless @valid.nil?
        false
      end

      def validate!(probe = nil)
        @valid = false if uri.nil?
        if @valid.nil?
          @valid = fallback_timeout == 0 || (probe || TCPSocketProbe.new).replies?(self)
        end
        self
      end
    end

    # Class used to parse one configuration line
    #
    # Gets the configuration line and the value.
    #   This object provides a `update_mirror` method
    #   used to setup the given mirror value.
    class MirrorConfig
      attr_accessor :uri, :value

      def initialize(config_line, value)
        uri, fallback =
          config_line.match(%r{\Amirror\.(all|.+?)(\.fallback_timeout)?\/?\z}).captures
        @fallback = !fallback.nil?
        @all = false
        if uri == "all"
          @all = true
        else
          @uri = Bundler::URI(uri).absolute? ? Settings.normalize_uri(uri) : uri
        end
        @value = value
      end

      def all?
        @all
      end

      def update_mirror(mirror)
        if @fallback
          mirror.fallback_timeout = @value
        else
          mirror.uri = Settings.normalize_uri(@value)
        end
      end
    end

    # Class used for probing TCP availability for a given mirror.
    class TCPSocketProbe
      def replies?(mirror)
        MirrorSockets.new(mirror).any? do |socket, address, timeout|
          socket.connect_nonblock(address)
        rescue Errno::EINPROGRESS
          wait_for_writtable_socket(socket, address, timeout)
        rescue RuntimeError # Connection failed somehow, again
          false
        end
      end

      private

      def wait_for_writtable_socket(socket, address, timeout)
        if IO.select(nil, [socket], nil, timeout)
          probe_writtable_socket(socket, address)
        else # TCP Handshake timed out, or there is something dropping packets
          false
        end
      end

      def probe_writtable_socket(socket, address)
        socket.connect_nonblock(address)
      rescue Errno::EISCONN
        true
      rescue StandardError # Connection failed
        false
      end
    end
  end

  # Class used to build the list of sockets that correspond to
  #   a given mirror.
  #
  # One mirror may correspond to many different addresses, both
  #   because of it having many dns entries or because
  #   the network interface is both ipv4 and ipv5
  class MirrorSockets
    def initializegems/gems/bundler-2.4.19/lib/bundler/inline.rb000064400000004745150403133610014630 0ustar00des a method to build sockaddr string
  class SocketAddress
    attr_reader :type, :host, :port

    def initialize(type, host, port)
      @type = type
      @host = host
      @port = port
    end

    def to_socket_address
      Socket.pack_sockaddr_in(@port, @host)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/yaml_serializer.rb000064400000004556150403133610016545 0ustar00# frozen_string_literal: true

module Bundler
  # A stub yaml serializer that can handle only hashes and strings (as of now).
  module YAMLSerializer
    module_function

    def dump(hash)
      yaml = String.new("---")
      yaml << dump_hash(hash)
    end

    def dump_hash(hash)
      yaml = String.new("\n")
      hash.each do |k, v|
        yaml << k << ":"
        if v.is_a?(Hash)
          yaml << dump_hash(v).gsub(/^(?!$)/, "  ") # indent all non-empty lines
        elsif v.is_a?(Array) # Expected to be array of strings
          yaml << "\n- " << v.map {|s| s.to_s.gsub(/\s+/, " ").inspect }.join("\n- ") << "\n"
        else
          yaml << " " << v.to_s.gsub(/\s+/, " ").inspect << "\n"
        end
      end
      yaml
    end

    ARRAY_REGEX = /
      ^
      (?:[ ]*-[ ]) # '- ' before array items
      (['"]?) # optional opening quote
      (.*) # value
      \1 # matching closing quote
      $
    /xo.freeze

    HASH_REGEX = /
      ^
      ([ ]*) # indentations
      (.+) # key
      (?::(?=(?:\s|$))) # :  (without the lookahead the #key includes this when : is present in value)
      [ ]?
      (['"]?) # optional opening quote
      (.*) # value
      \3 # matching closing quote
      $
    /xo.freeze

    def load(str)
      res = {}
      stack = [res]
      last_hash = nil
      last_empty_key = nil
      str.split(/\r?\n/).each do |line|
        if match = HASH_REGEX.match(line)
          indent, key, quote, val = match.captures
          key = convert_to_backwardgems/gems/bundler-2.4.19/lib/bundler/compact_index_client/gem_parser.rb000064400000001633150403133610021642 0ustar00empty_key].push(val)
        end
      end
      res
    end

    # for settings' keys
    def convert_to_backward_compatible_key(key)
      key = "#{key}/" if key =~ /https?:/i && key !~ %r{/\Z}
      key = key.gsub(".", "__") if key.include?(".")
      key
    end

    class << self
      private :dump_hash, :convert_to_backward_compatible_key
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/inline.rb000064400000004745150403133610014630 0ustar00gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/cache.rb000064400000004635150403133610020566 0ustar00eady installed on the
#                          user's system should be installed.
#                          Defaults to `false`.
#
# @param gemfile [Proc]    a block that is evaluated as a `Gemfile`.
#
# @example Using an inline Gemfile
#
#          #!/opt/alt/ruby32/bin/ruby
#
#          require 'bundler/inline'
#
#          gemfile do
#            source 'https://rubygems.org'
#            gem 'json', require: false
#            gem 'nap', require: 'rest'
#            gem 'cocoapods', '~> 0.34.1'
#          end
#
#          puts Pod::VERSION # => "0.34.4"
#
def gemfile(install = false, options = {}, &gemfile)
  require_relative "../bundler"
  Bundler.reset!

  opts = options.dup
  ui = opts.delete(:ui) { Bundler::UI::Shell.new }
  ui.level = "silent" if opts.delete(:quiet) || !install
  Bundler.ui = ui
  raise ArgumentError, "Unknown options: #{opts.keys.join(", ")}" unless opts.empty?

  Bundler.with_unbundled_env do
    Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
    Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"

    Bundler::Plugin.gemfile_install(&gemfile) if Bundler.feature_flag.plugins?
    builder = Bundler::Dsl.new
    builder.instance_eval(&gemfile)
    builder.check_primary_source_safety

    Bundler.settings.temporary(:deployment => false,gems/gems/bundler-2.4.19/lib/bundler/yaml_serializer.rb000064400000004556150403133610016545 0ustar00gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/gem_parser.rb000064400000001633150403133610021642 0ustar00gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/updater.rb000064400000007147150403133610021170 0ustar00pendency(d) } : []
          requirements = requirements ? requirements.map {|d| parse_dependency(d) } : []
          [version, platform, dependencies, requirements]
        end

        private

        def parse_dependency(string)
          dependency = string.split(":")
          dependency[-1] = dependency[-1].split("&") if dependency.size > 1
          dependency
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/cache.rb000064400000004635150403133610020566 0ustar00# frozen_string_literal: true

require_relative "gem_parser"

module Bundler
  class CompactIndexClient
    class Cache
      attr_reader :directory

      def initialize(directory)
        @directory = Pathname.new(directory).expand_path
        info_roots.each do |dir|
          SharedHelpers.filesystem_access(dir) do
            FileUtils.mkdir_p(dir)
         gems/gems/bundler-2.4.19/lib/bundler/inline.rb000064400000004745150403133610014630 0ustar00         else
              version = version.split("-", 2).unshift(name)
              versions_by_name[name] << version
            end
          end
        end

        [versions_by_name, info_checksums_by_name]
      end

      def versions_path
        directory.join("versions")
      end

      def checksums
        checksums = {}

        lines(versions_path).each do |line|
          name, _, checksum = line.split(" ", 3)
          checksums[name] = checksum
        end

        checksums
      end

      def dependencies(name)
        lines(info_path(name)).map do |line|
          parse_gem(line)
        end
      end

      def info_path(name)
        name = name.to_s
        if /[^a-z0-9_-]/.match?(name)
          name += "-#{SharedHelpers.digest(:MD5).hexdigest(name).downcase}"
          info_roots.last.join(name)
        else
          info_roots.first.join(name)
        end
      end

      private

      def lines(path)
        return [] unless path.file?
        lines = SharedHelpers.filesystem_access(path, :read, &:read).split("\n")
        header = lines.index("---")
        header ? lines[header + 1..-1] : lines
      end

      def parse_gem(line)
        @dependency_parser ||= GemParser.new
        @dependency_parser.parse(line)
      end

      def info_roots
        [
          directory.join("info"),
          directory.join("info-special-characters"),
        ]
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/updater.rb000gems/gems/bundler-2.4.19/lib/bundler/safe_marshal.rb000064400000001125150403133610015764 0ustar00gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/gem_parser.rb000064400000001633150403133610021642 0ustar00le
        if retrying.nil? && local_path.file?
          copy_file local_path, localgems/gems/bundler-2.4.19/lib/bundler/vendored_fileutils.rb000064400000000145150403133610017226 0ustar00gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/cache.rb0gems/gems/bundler-2.4.19/lib/bundler/uri_credentials_filter.rb000064400000002434150403133610020064 0ustar00eed to preserve \n line endings on windows when calculating
        # the checksum
        SharedHelpers.filesystem_access(path, :read) do
          SharedHelpers.digest(:MD5).hexdigest(File.read(path))
        end
      end

      private

      def copy_file(source, dest)
        SharedHelpers.filesystem_access(source, :read) do
          File.open(source, "r") do |s|
            SharedHelpers.filesystem_access(dest, :write) do
              File.open(dest, "wb", s.stat.mode) do |f|
                IO.copy_stream(s, f)
              end
            end
          end
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/safe_marshal.rb000064400000001125150403133610015764 0ustar00gems/gems/bundler-2.4.19/lib/bundler/installer.rb000064400000024374150403133610015347 0ustar00gems/gems/bundler-2.4.19/lib/bundler/compact_index_client/updater.rb000064400000007147150403133610021170 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendored_fileutils.rb000064400000000145150403133610017226 0ustar00# frozen_string_literal: true

module Bundler; end
require_relative "vendor/fileutils/lib/fileutils"
gems/gems/bundler-2.4.19/lib/bundler/uri_credentials_filter.rb000064400000002434150403133610020064 0ustar00# frozen_string_literal: true

module Bundler
  module URICredentialsFilter
    module_function

    def credential_filtered_uri(uri_to_anonymize)
      return uri_to_anonymize if uri_to_anonymize.nil?
      uri = uri_to_anonymize.dup
      if uri.is_a?(String)
        return uri if File.exist?(uri)

        require_relative "vendored_uri"
        uri = Bundler::URI(uri)
      end

      if uri.userinfo
        # oauth authentication
        if uri.password == "x-oauth-basic" || uri.password == "x"
          # URI as string does not display with password if no user is set
          oauth_designation = uri.password
          uri.user = oauth_designation
        end
        uri.password = nil
      end
      return uri.to_s if uri_to_anonymize.is_a?(String)
      uri
    rescue Bundler::URI::InvalidURIError # uri is not canonical uri scheme
      uri
    end

    def credential_filtered_string(str_to_filter, uri)
      return str_to_filter if uri.nil? || str_to_filter.nil?
      str_with_no_credentials = str_to_filter.dup
      anonymous_uri_str = credential_filtered_uri(uri).to_s
      uri_str = uri.to_s
      if anonymous_uri_str != uri_str
        str_with_no_credentials = str_with_no_credentials.gsub(uri_str, anonymous_uri_str)
      end
      str_with_no_credentials
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/installer.rb000064400000024374150403133610015347 0ustar00# frozen_string_literal: true

require_relative "worker"
require_relative "installer/parallel_installergems/gems/bundler-2.4.19/lib/bundler/safe_marshal.rb000064400000001125150403133610015764 0ustar00l check to see if `Bundler.bundle_path` exists
    # and if not then Bundler will create the directory. This is usually the same
    # location as RubyGems which typically is the `~/.gem` directory
    # unless other specified.
    #
    # Secondly, it checks if Bundler has been configured to be "frozen".
    # Frozen ensures that the Gemfile and the Gemfile.lock file are matching.
    # This stops a situation where a developer may update the Gemfile but may not run
    # `bundle install`, which leads to the Gemfile.lock file not being correctly updated.
    # If this file is not correctly gems/gems/bundler-2.4.19/lib/bundler/vendored_fileutils.rb000064400000000145150403133610017226 0ustar00  # earlier.
    #
    # Sixthly, a new Gemfile.lock is created from the installed gems to ensure thagems/gems/bundler-2.4.19/lib/bundler/uri_credentials_filter.rb000064400000002434150403133610020064 0ustar00install(options)

        Gem::Specification.reset # invalidate gem specification cache so that installed gems are immediately available

        lock
        Standalone.new(options[:standalone], @definition).generate if options[:standalone]
      end
    end

    def generate_bundler_executable_stubs(spec, options = {})
      if options[:binstubs_cmd] && spec.executables.empty?
        options = {}
        spec.runtime_dependencies.each do |dep|
          bins = @definition.specs[dep].first.executables
          options[dep.name] = bins unless bins.empty?
        end
        if options.any?
          Bundler.ui.warn "#{spec.name} has no executables, but you may want " \
            "one from a gem it depends on."
          options.each {|name, bins| Bundler.ui.warn "  #{name} has: #{bins.join(", ")}" }
        else
          Bundler.ui.warn "There are no executables for the gem #{spec.name}."
        end
        return
      end

      # double-assignment to avoid warnings about variables that will be used by ERB
      bin_path = Bundler.bin_path
      bin_path = bin_path
      relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
      relative_gemfile_path = relative_gemfile_path
      ruby_command = Thor::Util.ruby_command
      ruby_command = ruby_command
    gems/gems/bundler-2.4.19/lib/bundler/installer.rb000064400000024374150403133610015347 0ustar00ms]
          prefix = "@ruby -x \"%~f0\" %*\n@exit /b %ERRORLEVEL%\n\n"
          File.write("#{binstub_path}.cmd", prefix + content, :mode => mode)
        end
      end

      if options[:binstubs_cmd] && exists.any?
        case exists.size
        when 1
          Bundler.ui.warn "Skipped #{exists[0]} since it already exists."
        when 2
          Bundler.ui.warn "Skipped #{exists.join(" and ")} since they already exist."
        else
          items = exists[0...-1].empty? ? nil : exists[0...-1].join(", ")
          skipped = [items, exists[-1]].compact.join(" and ")
          Bundler.ui.warn "Skipped #{skipped} since they already exist."
        end
        Bundler.ui.warn "If you want to overwrite skipped stubs, use --force."
      end
    engems/gems/bundler-2.4.19/lib/bundler/uri_normalizer.rb000064400000001313150403133610016377 0ustar00e_path_from(bin_path)
        executable_path = executable_path

        mode = Gem.win_platform? ? "wb:UTF-8" : "w"
        require "erb"
        content = ERB.new(template, :trim_mode => "-").result(binding)

        File.write("#{bin_path}/#{executable}", content, :mode => mode, :perm => 0o755)
        if Gem.win_platform? || options[:all_platforms]
          prefix = "@ruby -x \"%~f0\" %*\n@exit /b %ERRORLEVEL%\n\n"
          File.write("#{bin_path}/#{executable}.cmd", prefix + content, :mode => mode)
        end
      end
    end

    private

    # the order that the resolver provides is significant, since
    # dependencies might affect the installation of a gem.
    # that said, it's a rare situatigems/gems/bundler-2.4.19/lib/bundler/templates/Gemfile000064400000000114150403133610016300 0ustar00attern}")
      rescue TypeError
        error_message = "#{spec.name} #{spegems/gems/bundler-2.4.19/lib/bundler/templates/Executable.standalone000064400000000654150403133610021151 0ustar00n.specs, size, standalone, force)
      spec_installations.each do |installation|
        post_install_messages[installation.name] = installation.post_install_message if installation.has_post_install_message?
      end
    end

    # returns whether or not a re-resolve was needed
    def resolve_if_needed(options)
      @definition.resolution_mode = options

      if !@definition.unlocking? && !options["force"] && !Bundler.sgems/gems/bundler-2.4.19/lib/bundler/templates/Executable000064400000001544150403133610017021 0ustar00gems/gems/bundler-2.4.19/lib/bundler/uri_normalizer.rb000064400000001313150403133610016377 0ustar00# frozen_string_literal: true

module Bundler
  module URINormalizer
    module_function

    # Normalizes uri to a consistent version, either with or without trailing
    # slash.
    #
    # TODO: Currently gem sources are locked with a trailing slash, while git
    # sources are locked without a trailing slash. This should be normalized but
    # the gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/circleci/config.yml.tt000064400000001340150403133620022465 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/Gemfile000064400000000114150403133610016300 0ustar00# frozen_string_literal: true

source "https://rubygems.org"

# gem "rails"
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/bin/console.tt000064400000000470150403133620021060 0ustar00#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %>
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application '<%= executable %>' is installed as part of a gem, and
# this file is here to facilitate running it.
#

$:.unshift File.expand_pathgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/bin/setup.tt000064400000000203150403133630020551 0ustar00#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %>
# frozen_string_literal: true

#
# This fgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/LICENSE.txt.tt000064400000002121150403133630020542 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/circleci/config.yml.tt000064400000001340150403133620022465 0gems/gems/bundler-2.4.19/lib/bundler/uri_normalizer.rb000064400000001313150403133610016377 0ustar00:Gem.rubygems_version %>'
<%- end -%>
      - run:
          name: Run the defaulgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/exe/newgem.tt000064400000000106150403133630020706 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/Gemfilegems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt000064400000000414150403133630022432 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/Executable.standalone000064400000000654150403133610021151 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt000064400000000436150403133630022740 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/Executable000064400000001544150403133610017021 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt000064400000000514150403133630023220 0ustar00OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt000064400000000570150403133630022712 0ustar00#!/opt/alt/ruby32/bin/ruby

require "<%= config[:namespaced_path] %>"
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt000064400000000201150403133630023764 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/bin/console.tt000064400000gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt000064400000000261150403133630022437 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/bin/setup.tt000064400000000203150403133630020551 0gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Cargo.toml.tt000064400000000377150403133630020662 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/LICENSE.txt.tt000064400000002121150403133630020542 0gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/rubocop.yml.tt000064400000000453150403133630021121 0ustar00use magnus::{function, prelude::*, Error, Ruby};

fn hello(subject: String) -> String {
    format!("Hello from Rust, {subject}!")
}

#[magnus::init]
fn init(ruby: &Ruby) -> Result<(), Error> {
    let module = ruby.<%= config[:constant_array].map {|c| "define_module(#{c.dump})?"}.join(".") %>;
   gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/standard.yml.tt000064400000000270150403133630021245 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/exe/newgem.tt000064400000000106150403133630020706 0gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/github/workflows/main.yml.tt000064400000001431150403133630023710 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt000064400000000414150403133630022432 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Cargo.toml.tt000064400000000377150403133630020662 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/README.md.tt000064400000005453150403133630020211 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/rubocop.yml.tt000064400000000453150403133630021121 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt000064400000000514150403133630023220 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/standard.yml.tt000064400000000270150403133630021245 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt000064400000000570150403133630022712 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/github/workflows/main.yml.tt000064400000001431150403133630023710 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt000064400000000201150403133630023764 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/rspec.tt000064400000000065150403133630017763 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgemgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Gemfile.tt000064400000001127150403133630020217 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Cargo.toml.tt000064400000000377150403133630020662 0ustar00ODO: Write usage instructions here

## Development

After checking out the repo, run `bgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt000064400000000432150403133630024403 0ustar00t is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/<%= config[:git_default_branch] %>/CODE_OF_CONDUCT.md).<% end %>
<% end -%>
<gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt000064400000000234150403133630024400 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/rspec.tt000064400000000065150403133630017763 gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt000064400000000463150403133630024507 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Gemfile.tt000064400000001127150403133630020217 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt000064400000000225150403133630024500 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/README.md.tt000064400000005453150403133630gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt000064400000012143150403133630021523 0ustar00# frozen_string_literal: true

require "test_helper"

class <%= config[:minitest_constant_name] %> < Minitest::Test
  def test_that_it_has_a_version_number
    refute_nil ::<%= config[:constant_name] %>::VERSION
  end

  def test_it_does_something_useful
    assert false
  end
end
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt000064400000000234150403133630024400 0ustar00# frozen_string_literal: true

$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require "<%= config[:namespaced_path] %>"

require "minitest/autorun"
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt000064400000000463150403133630024507 0ustar00# frozen_string_literal: true

require "test_helper"

class <%= config[:constant_name] %>Test < Test::Unit::TestCase
  test "VERSION" do
    assert do
      ::<%= config[:constant_name] %>.const_defined?(:VERSION)
    end
  end

  test "something useful" do
    assert_equal("expected", "actual")
  gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/rspec.tt000064400000000065150403133630017763 0ustar00# frozen_string_literal: true

$LOAD_PATH.unshift Filgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Gemfile.tt000064400000001127150403133630020217 0ustar00# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examplgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.ttgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/CHANGELOG.md.tt000064400000000120150403133630020525 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/minitest/test_helper.gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/spec/spec_helper.rb.tt000064400000000612150403133630022472 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt000064400000000463150403133630024507 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt000064400000000376150403133630022504 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt000064400000000225150403133630024500 0gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/gitlab-ci.yml.tt000064400000000672150403133630021306 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt000064400000012143150403133630021523 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Rakefile.tt000064400000003031150403133640020366 0ustar00## [Unreleased]

## [0.1.0] - <%= Time.now.strftime('%F') %>

- Initial release
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/spec/spec_helper.rb.tt000064400000000612150403133630022472 0ustar00# frozen_string_literal: true

require "<%= config[:namespaced_path] %>"

RSpec.configure do |config|
  # Enable flags like --only-failures and --next-failure
  config.example_status_persistence_file_path = ".rspec_status"

  # Disable RSpec exposing methods globally on `Module` and `main`
  config.disable_monkey_patching!

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
end
gems/gems/bundler-2.4.19/gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/lib/newgem.rb.tt000064400000001075150403133650021305 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/gitlab-ci.yml.tt000064400000000672150403133630021306 0ustar00default:
  image: ruby:<%= RUBY_VERSION %>

  before_script:
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/lib/newgem/version.rb.tt000064400000000431150403133650022765 0ustar00# frozen_string_literal: true

require "bundler/gem_tasks"
<% default_task_names = [config[:test_task]].compact -%>
<% case config[:test] -%>
<% when "minitest" -%>
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = Filegems/gems/bundler-2.4.19/lib/bundler/templates/newgem/newgem.gemspec.tt000064400000004116150403133660021557 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/CHANGELOG.md.tt000064400000000120150403133630020525 0ustar00join(" ") %>]
<% end -%>
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/spec/spec_helper.rb.tt000064400000000612150403133630022472 0ustar00# frozen_string_literal: true

require_relative "<%= File.basename(config[:namespaced_path]) %>/version"
<%- if config[:ext] -%>
require_relative "<%= File.basename(config[:namespaced_path]) %>/<%= config[:underscored_name] %>"
<%- end -%>

<%- config[:constant_array].each_with_index do |c, i| -%>
<%= "  " * i %>module <%= c %>
<%- end -%>
<%= "  " * config[:constant_array].size %>class Errogems/gems/bundler-2.4.19/lib/bundler/templates/newgem/spec/newgem_spec.rb.ttgems/gems/bundler-2.4.19/lib/bundler/templates/newgem/sig/newgem.rbs.tt000064400000000545150403133660021506 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/gitlab-ci.yml.tt000064400000000672150403133630021306 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/gitignore.tt000064400000000432150403133670020640 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/Rakefile.tt000064400000003031150403133640020366 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/Executable.bundler000064400000005543150403133670020464 0ustar00m's public repo URL here."
  spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."

  # Specify which files should be added to the gem when it is released.
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
  spec.files = Dir.chdir(__dir__) do
    `git ls-files -z`.split("\x0").reject do |f|
      (File.expand_path(f) == __FILE__) ||
        f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
    end
  end
  spec.bindir = "exe"
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
  spec.require_paths = ["lib"]
<%- if config[:ext] == 'c' -%>
  spec.extensions = ["ext/<%= config[:underscored_name] %>/extconf.rb"]
<%- end -%>
<%- if config[:ext] == 'rust' -%>
  spec.extensions = ["ext/<%= config[:underscored_name] %>/Cargo.toml"]
<%- end -%>

  # Uncomment to register a new dependency of your gem
  # spec.add_dependency "example-gem", "~> 1.0"

  # For more information and examples about making a new gem, check out our
  # guidegems/gems/bundler-2.4.19/lib/bundler/templates/newgem/lib/newgem.rb.tt000064400000001075150403133650021305 0ustar00<%- config[:constant_array].each_with_index do |c, i| -%>
<%= "  " * i %>module <%= c %>
<%- end -%>
<%= "  " * config[:constant_array].size %>VERSION: String
<%= "  " * config[:constant_array].size %># See the writing guide of rbs: https://github.com/ruby/rbs#guides
<%- (config[:constant_array].size-1).downto(0) do |i| -%>
<%= "  " * i %>end
<%- end -%>
gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/gitignogems/gems/bundler-2.4.19/lib/bundler/installer/gem_installer.rb000064400000005041150403133700020162 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/Executable.bundler000064400000005543150403133670020464 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/newgem.gemspec.tt000064400000004116150403133660021557 0ustar00eturn unless invoked_as_script? # don't want to hijack other binstubs
    return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
    bundler_version = nil
    update_index = nil
    ARGV.each_with_index do |a, i|
      if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
        bundler_version = a
      end
      next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
      bundler_version = $1
      update_index = i
    end
    bundler_version
  end

  def gemfile
    gemfile = ENV["BUNDLE_GEMFILE"]
    return gemfile if gemfile && !gemfile.empty?

    File.expand_path("<%= relative_gemfile_path %>", __dir__)
  end

  def lockfile
    lockfile =
      case File.basename(gemfile)
      when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
      else "#{gemfile}.lock"
      end
    File.expand_path(lockfile)
  end

  def lockfile_version
    return unless File.file?(lockfile)
    lockfile_contents = File.read(lockfile)
    return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
    Regexp.last_match(1)
  end

  def bundler_requirement
    @bundler_requirement ||=
      env_var_version ||
      cli_arg_version ||
      bundler_requirement_for(lockfile_version)
  end

  def bundler_requirement_for(version)
    return "#{Gem::Requirement.default}.a" unless version

    bundler_gem_version = Gem::Version.new(version)

    bundler_gem_version.approximate_recommendation
  end

  def load_bundler!
    ENV["BUNDLE_GEMFILE"] gems/gems/bundler-2.4.19/lib/bundler/installer/parallel_installer.rb000064400000014210150403133700021204 0ustar00gems/gems/bundler-2.4.19/lib/bundler/templates/newgem/sig/newgem.rbs.tt000064400000000545150403133660021506 0ustar00# frozen_string_literal: true

module Bundler
  class GemInstaller
    attr_reader :spec, :standalone, :worker, :force, :installer

    def initialize(spec, installer, standalone = false, worker = 0, force = false)
      @spec = spec
      @installer = installer
      @standalone = standalone
      @worker = worker
      @force = force
    end

    def ingems/gems/bundler-2.4.19/lib/bundler/templates/newgem/gitignore.tt000064400000000432150403133670020640 0ustar00 + e.backtrace.join("\n  ") + "\n\n"
      message = message.lines.first + Bundler.ui.add_color(message.lines.drop(1).join, :clear)
      message + Bundler.ui.add_color(failure_message, :red)
    end

    def failure_message
      install_error_message
    end

    def install_errogems/gems/bundler-2.4.19/lib/bundler/templates/Executable.bundler000064400000005543150403133670020464 0ustar00
    end

    def out_of_space_message
      "#{install_error_message}\nYour disk is out of space. Free some space to be able to install your bundle."
    end

    def generate_executable_stubs
      return if Bundler.feature_flag.forget_cli_options?
      return if Bundler.settings[:inline]
      if Bundler.settings[:bin] && standalone
        installer.generate_standalone_bundler_executable_stubs(spec)
      elsif Bundler.settings[:bin]
        installer.generate_bundler_executable_stubs(spec, :force => true)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/installer/parallel_installer.rb000064400000014210150403133700021204 0ustar00# frozen_string_literal: true

require_relative "../worker"
require_relative "gem_installer"

module Bundler
  class ParallelInstaller
    class SpecInstallation
      attr_accessor :spec, :name, :full_name, :post_install_message, :state, :error
      def initialize(spec)
        @spec = spec
        @name = spec.name
        @full_name = spec.full_name
        @state = :none
        @post_install_message = ""
        @error = nil
      end

      def installed?
        state == :installed
      end

      def enqueued?
        state == :enqueued
      end

      def failed?
        state == :failed
      end

      def ready_to_enqueue?
        state == :none
      end

      def has_post_install_message?
        !post_install_message.empty?
      end

      def ignorable_dependency?(dep)
        dep.type == :development || dep.name == @name
      end

      # Checks installed dependencies against spec's dependencies to make
      # sure needed dependencies have been installed.
      def dependencies_installed?(all_specs)
        installed_specs = all_specs.select(&:installed?).map(&:name)
        dependencies.all? {|d| installed_specs.include? d.name }
      end

      # Represents only the non-development dependencies, the ones that are
      # itself and are in the total list.
      def dependencies
        @dependencies ||= all_dependencies.reject {|degems/gems/bundler-2.4.19/lib/bundler/installer/gem_installer.rb000064400000005041150403133700020162 0ustar00ake, 0)
        Gem::Specification.reset
      end

      if @size > 1
        install_with_worker
      else
        install_serially
 gems/gems/bundler-2.4.19/lib/bundler/installer/standalone.rb000064400000005777150403133700017505 0ustar00me == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }
          warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name}, unsatisfied by #{found.full_name}"
        end
      end

      Bundler.ui.warn(warning.join("\n"))
    end

    private

    def failed_specs
      @specs.select(&:failed?)
    end

    def install_with_worker
      enqueue_specs
      process_specs until finished_installing?
    end

    def install_serially
      until finished_installing?
        raise "failed to find a spec to enqueue while installing serially" unless spec_install = @specs.find(&:ready_to_enqueue?)
        spec_install.state = :enqueued
        do_install(spec_install, 0)
      end
    end

    def worker_pool
      @worker_pool ||= Bundler::Worker.new @size, "Parallel Installer", lambda {|spec_install, worker_num|
        do_install(spec_install, worker_num)
      }
    end

    def do_install(spec_install, worker_num)
      Plugin.hook(Plugin::Events::GEM_BEFORE_INSTALL, spec_install)
      gem_installer = Bundler::GemInstaller.new(
        spec_install.spec, @installer, @standalone, worker_num, @force
      )
      success, message = gem_installer.install_from_spec
      if success
        spec_install.state = :installed
        spec_install.post_install_message = message unless message.nil?
      else
        spec_install.error = "#{message}\n\n#{require_tree_for_spec(spec_install.spec)}"
        spec_install.state = :failed
      end
      Plugin.hook(Plugin::Events::GEM_AFTER_INSTALL, spec_install)
    gems/gems/bundler-2.4.19/lib/bundler/installer/parallel_installer.rb000064400000014210150403133700021204 0ustar00          t << %( was resolved to #{s.version}, which depends on)
        end
        t << %(\n)
      end
      t
    end

    # Keys in the remains hash represent uninstalled gems specs.
    # We enqueue all gem specs that do not have any dependencies.
    # Later we call this lambda again to install specs that depended on
    # previously installed specifications. We continue until all specs
    # are installed.
    def enqueue_specs
      @specs.select(&:ready_to_enqueue?).each do |spec|
        if spegems/gems/bundler-2.4.19/lib/bundler/vendored_uri.rb000064400000000131150403133700016020 0ustar00gems/gems/bundler-2.4.19/lib/bundler/installer/standalone.rbgems/gems/bundler-2.4.19/lib/bundler/similarity_detector.rb000064400000003534150403133700017424 0ustar00me.new(path).absolute?
            file.puts %($:.unshift "#{path}")
          else
            file.puts %($:.unshift File.expand_path("\#{__dir__}/#{path}"))
          end
        end
      end
    end

    private

    def paths
      @specs.map do |spec|
        next if spec.name == "bundler"
        Array(spec.require_paths).map do |path|
          gem_path(path, spec).
            sub(version_dir, '#{RUBY_ENGINE}/#{Gem.ruby_api_version}').
            sub(extensions_dir, 'extensions/\k<platform>/#{Gem.extension_api_version}')
          # This is a static string intentionally. It's interpolated at a later time.
        end
      end.flatten.compact
    end

    def version_dir
      "#{RUBY_ENGINE}/#{Gem.ruby_api_version}"
    end

    def extensions_dir
      %r{extensions/(?<platform>[^/]+)/#{Regexp.escape(Gem.extension_api_version)}}
    end

    def bundler_path
      Bundler.root.join(Bundler.settings[:path].to_s, "bundler")
    end

    def gem_path(path, spec)
      full_path = Pathname.new(path).absolute? ? path : File.join(spec.full_gem_path, path)
      if spec.source.instance_of?(Source::Path) && spec.source.path.absolute?
        full_path
      else
        Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s
      end
    rescue TypeError
      error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
      raise Gem::InvalidSpecificationException.new(error_message)
    end

    def define_path_helpers
      <<~'END'
        unless defined?(Gem)
          module Gem
            def self.ruby_api_version
              RbConfig::CONFIG["ruby_version"]
            end

            def self.extension_api_version
              if 'no' == RbConfig::CONFIG['ENABLE_SHARED']
                "#{ruby_api_version}-static"
              else
                ruby_api_version
              end
            endgems/gems/bundler-2.4.19/lib/bundler/gem_version_promoter.rb000064400000011412150403133700017603 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendored_uri.rb000064400000000131150403133700016020 0ustar00# frozen_string_literal: true

module Bundler; end
require_relative "vendor/uri/lib/uri"
gems/gems/bundler-2.4.19/lib/bundler/similarity_detector.rb000064400000003534150403133700017424 0ustar00# frozen_string_literal: true

module Bundler
  class SimilarityDetector
    SimilarityScore = Struct.new(:string, :distance)

    # inigems/gems/bundler-2.4.19/lib/bundler/installer/standalone.rb000064400000005777150403133700017505 0ustar00= 2, sub = 1)
      # ins, del, sub are weighted costs
      return nil if this.nil?
      return nil if that.nil?
      dm = [] # distance matrix

      # Initialize first row values
      dm[0] = (0..this.length).collect {|i| i * ins }
      fill = [0] * (this.length - 1)

      # Initialize first column values
      (1..that.length).each do |i|
        dm[i] = [i * del, fill.flatten]
      end

      # populate matrix
      (1..that.length).each do |i|
        (1..this.length).each do |j|
          # critical comparison
          dm[i][j] = [
            dm[i - 1][j - 1] + (this[j - 1] == that[i - 1] ? 0 : sub),
            dm[i][j - 1] + ins,
            dm[i - 1][j] + del,
          ].min
        end
      end

      # The last value in matrix is the Levenshtein distance between the strings
      dm[that.length][this.length]
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/gem_version_promoter.rb000064400000011412150403133700017603 0ustar00# frozen_string_literal: true

module Bundler
  # This class contains all of the logic for determining the next version of a
  # Gem to update to based on the requested level (patch, minor, major).
  # Primarily designed to work with Resolver which will provide it the list of
  # available dependency versions as found in its index, before returning it to
  # to the resolution engine to select the best version.
  class GemVersionPromoter
    attr_reader :level
    attr_accessor :pre

    # By default, strict is false, meaning every available version of a gem
    # is returned from sort_versions. The order gives preference to the
    # requested level (:patch, :minor, :major) but in complicated requirement
    # cases some gems will by necessity be promoted past the reqgems/gems/bundler-2.4.19/lib/bundler/spec_set.rb000064400000012120150403133700015141 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendored_uri.rb000064400000000131150403133700016020 0ustar00ciding what versions best resolve all dependencies in the bundle.
    # @param package [Rgems/gems/bundler-2.4.19/lib/bundler/similarity_detector.rb000064400000003534150403133700017424 0ustar00spec.version

        must_match = minor? ? [0] : [0, 1]

        all_match = must_match.all? {|idx| gsv.segments[idx] == locked_version.segments[idx] }
        all_match && gsv >= locked_version
      end
    end

    def sort_dep_specs(specs, package)
      locked_version = package.locked_version

      result = specs.sort do |a, b|
        unless package.prerelease_specified? || pre?
          a_pre = a.prerelease?
          b_pre = b.prerelease?

          next -1 if a_pre && !b_pre
          next  1 if b_pre && !a_pre
        end

        if major?
          a <=> b
        elsif either_version_older_than_locked?(a, b, locked_version)
          a <=> b
        elsif segments_do_not_match?(a, b, :major)
          b <=> a
        elsif !minor? && segments_do_not_match?(a, b, :minor)
          b <=> a
        else
          a <=> b
        end
      end
      post_sort(result, package.unlock?, locked_version)
    end

    def either_version_older_than_locked?(a, b, locked_version)
      locked_version && (a.version < locked_version || b.version < locked_version)
    end

    def segments_do_not_match?(a, b, level)
      index = [:major, :minor].index(level)
      a.segments[index] != b.segments[index]
    end

    # Specific version moves can't always reliably be done during sorting
    # as not all elements are compared against each other.
    def post_sort(result, unlock, locked_version)
      # default :major behavior in Bundler does not do this
      return result if major?
      if unlock || locked_version.nil?
        result
      else
        move_version_to_end(result, locked_version)
      end
    end

    def move_version_to_end(result, version)
      move, keep = result.partition {|s| s.version.to_s == version.to_s }
      keep.concat(move)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/gem_version_promoter.rb000064400000011412150403133700017603 0ustar00# frozen_string_literal: true

require_relative "vendored_tsort"

module Bundler
  class SpecSet
    include Enumerable
    include TSort

    attr_reader :incomplete_specs

    def initialize(specs, incomplete_specs = [])
      @specs = specs
      @incomplete_specs = incomplete_specs
    end

    def for(dependencies, check = false, platforms = [nil])
      handled = ["bundler"].product(platforms).map {|k| [k, true] }.to_h
      deps = dependencies.product(platforms)
      specs = []

      loop do
        break unless dep = deps.shift

        name = dep[0].name
        platform = dep[1]
        incomplete = false

        key = [name, platform]
        next if handled.key?(key)

        handled[key] = true

        specs_for_dep = specs_for_dependency(*dep)
        if specs_for_dep.any?
          specs.concat(specs_for_dep)

          specs_for_dep.first.dependencies.each do |d|
            next if d.type == :development
            incomplete = true if d.name != "bundler" && lookup[d.name].empty?
            deps << [d, dep[1]]
          end
        else
          incomplete = true
gems/gems/bundler-2.4.19/lib/bundler/index.rb000064400000010215150403133700014446 0ustar00`materialize` calls `for` only for the current platform)
    # @return [Array<Gem::Specification>]
    def materialized_for_all_platforms
      @specs.map do |s|
        next s unless s.is_a?(LazySpecification)
        s.source.remote!
        spec = s.materialize_for_installation
        raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
        spec
      end
    end

    def incomplete_ruby_specs?(deps)
      return false if @specs.empty?

      @incomplete_specs = []

      self.for(deps, true, [Gem::Platform::RUBY])

      @incomplete_specs.any?
    end

    def missing_specs
      @specs.select {|s| s.is_a?(LazySpecification) }
    end

    def merge(set)
      arr = sorted.dup
      set.each do |set_spec|
        full_name = set_spec.full_name
        next if arr.any? {|spec| spec.full_name == full_name }
        arr << set_spec
      end
      SpecSet.new(arr)
    end

    def -(other)
      SpecSet.new(to_a - other.to_a)
    end

    def find_by_name_and_platform(name, platform)
      @specs.detect {|spec| spec.name == name && spec.match_platform(platform) }
    end

    def delete_by_name(name)
      @specs.reject! {|spec| spec.name == name }
      @lookup = nil
      @sorted = nil
    end

    def what_required(spec)
      unless req = find {|s| s.dependencies.any? {|d| d.type == :runtime && d.name == spec.name } }
        return [spec]
      end
      what_required(req) << spec
    end

    def <<(spec)
      @specs << spec
    end

    def length
      @specs.length
    end

    def size
      @specs.size
    end

    def empty?
      @specs.empty?
    end

    def each(&b)
      sorted.each(&b)
    end

    private

    def sorted
      rake = @specs.find {|s| s.name == "rake" }
      begin
        @sorted ||= ([rake] + tsort).compact.uniq
      rescue TSort::Cyclic => error
        cgems = extract_circular_gems(error)
        raise CyclicDependencyError, "Your bundle requires gems that depend" \
          " on each other, creating an infinite loop. Please remove either" \
          " gem '#{cgems[0]}' or gem '#{cgems[1]}' and try again."
      end
    end

    def extract_circular_gems(error)
      error.message.scan(/@name="(.*?)"/).flatten
    end

    def lookup
      @lookup ||= begin
        lookup = Hash.new {|h, k| h[k] = [] }
        @specs.each do |s|
          lookup[s.name] << s
        end
        lookup
      end
    end

    def tsort_each_node
      # MUST sort by name for backwards compatibility
      @specs.sort_by(&:name).each {|s| yield s }
    end

    def specs_for_dependency(dep, platform)
      specs_for_name = lookup[dep.name]
      target_platform = dep.force_ruby_platform ? Gem::Platform::RUBY : (platform || Bundler.local_platform)
      matching_specs = GemHelpers.select_best_platform_match(specs_for_gems/gems/bundler-2.4.19/lib/bundler/spec_set.rb000064400000012120150403133700015141 0ustar00gems/gems/bundler-2.4.19/lib/bundler/index.rb000064400000010215150403133700014446 0ustar00# frozen_string_literal: true

module Bundler
  class Index
    include Enumerable

    def self.build
      i = new
      yield i
      i
  gems/gems/bundler-2.4.19/lib/bundler/worker.rb000064400000005550150403133700014656 0ustar00ch(name) + @all_specs[name]
      @sources.each do |source|
        all_matches.concat(source.search_all(name))
      end
      all_matches
    end

    # Search this index's specs, and any source indexes that this index knows
    # about, returning all of the results.
    def search(query)
      results = local_search(query)
      return results unless @sources.any?

      @sources.each do |source|
        results.concat(source.search(query))
      end
      results.uniq(&:full_name)
    end

    def local_search(query)
      case query
      when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query)
      when String then specs_by_name(query)
      when Array then specs_by_name_and_version(*query)
      else
        raise "You can't search for a #{query.inspect}."
      end
    end

    alias_method :[], :search

    def <<(spec)
      @specs[spec.name][spec.full_name] = spec
      spec
    end

    def each(&blk)
      return enum_for(:each) unless blk
      specs.values.each do |spec_sets|
        spec_sets.values.each(&blk)
      end
      sources.each {|s| s.each(&blk) }
      self
    end

    def spec_names
      names = specs.keys + sources.map(&:spec_names)
      names.uniq!
      names
    end

    def unmet_dependency_names
      dependency_names.select do |name|
        search(name).empty?
      end
    end

    def dependency_names
      names = []
      each do |spec|
        spec.dependencies.each do |dep|
          next if dep.type == :development
          names << dep.name
        end
      end
      names.uniq
    end

    def use(other, override_dupes = false)
      return unless other
      other.each do |s|
        if (dupes = search_by_spec(s)) && !dupes.empty?
          # safe to << since it's a new array when it has contents
          @all_specs[s.name] = dupes << s
          next unless override_dupes
        end
        self << s
      end
      self
    end

    def size
      @sources.inject(@specs.size) do |size, source|
        size += source.size
      end
    end

    # Whether all the specs in self are in other
    # TODO: rename to #include?
    def ==(other)
      all? do |spec|
        other_spec = other[spec].first
        other_spec && dependencies_eql?(spec, other_spec) && spec.source == other_spec.source
      end
    end

    def dependencies_eql?(spec, other_spec)
      deps       = spec.dependencies.select {|d| d.type != :development }
      other_deps = other_spec.dependencies.select {|d| d.type != :development }
      deps.sort == other_deps.sort
    end

    def add_source(index)
      raise ArgumentError, "Source must be an index, not #{index.class}" unless index.is_a?(Index)
      @sources << index
      @sources.uniq! # need to use uniq! here instead of checking for the item before adding
    end

    private

    def specs_by_name_and_version(name, version)
     gems/gems/bundler-2.4.19/lib/bundler/deployment.rb000064400000006305150403133710015525 0ustar00gems/gems/bundler-2.4.19/lib/bundler/worker.rbgems/gems/bundler-2.4.19/lib/bundler/index.rb000064400000010215150403133700014446 0ustar00ef initialize(size, name, func)
      @name = name
      @request_queue = Thread::Queue.new
      @response_queue = Thread::Queue.new
      @func = func
      @size = size
      @threads = nil
      @previous_interrupt_handler = nil
    end

    # Enqueue a request to be executed in the worker pool
    #
    # @param obj [String] mostly it is name of spec that should be downloaded
    def enq(obj)
      create_threads unless @threads
      @request_queue.enq obj
    end

    # Retrieves results of job function being executed in worker pool
    def deq
      result = @response_queue.deq
      raise result.exception if result.is_a?(WrappedException)
      result
    end

    def stop
      stop_threads
    end

    private

    def process_queue(i)
      loop do
        obj = @request_queue.deq
        break if obj.equal? POISON
        @response_queue.enq apply_func(obj, i)
      end
    end

    def apply_func(obj, i)
      @func.call(obj, i)
    rescue Exception => e # rubocop:disable Lint/RescueException
      WrappedException.new(e)
    end

    # Stop the worker threads by sending a poison object down the request queue
    # so as worker threads after retrieving it, shut themselves down
    def stop_threads
      return unless @threads

      @threads.each { @request_queue.enq POISON }
      @threads.each(&:join)

      remove_interrupt_handler

      @threads = nil
    end

    def abort_threads
      Bundler.ui.debug("\n#{caller.join("\n")}")
      @threads.each(&:exit)
      exit 1
    end

    def create_threads
      creation_errors = []

      @threads = Array.new(@size) do |i|
        Thread.start { process_queue(i) }.tap do |thread|
          thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
        end
      rescue ThreadError => e
        creation_errors << e
        nil
      end.compact

      add_interrupt_handler unless @threads.empty?

      return if creation_errors.empty?

      message = "Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}"
      raise ThreadCreationError, message if @threads.empty?
      Bundler.ui.info message
    end

    def add_interrupt_handler
      @previous_interrupt_handler = trap("INT") { abort_thgems/gems/bundler-2.4.19/lib/bundler/lazy_specification.rb000064400000012544150403133710017226 0ustar00# frozen_string_literal: true

require_relative "shared_helpers"
Bundler::SharedHelpers.major_deprecation 2, "Bundler no longer integrates with " \
  "Capistrano, but Capistrano provides its own integration with " \
  "Bundler via the capistrano-bundler gem. Use it instead."

module Bundler
  class Deployment
    def self.define_task(context, task_method = :task, opts = {})
      if defined?(Capistrano) && context.is_a?(Capistrano::Configuration)
        context_name = "capistrano"
        role_default = "{:except => {:no_release => true}}"
        error_type = ::Capistrano::CommandError
      else
        context_name = "vlad"
        role_default = "[:app]"
        error_type = ::Rake::CommandFailedError
      end

      roles = context.fetch(:bundle_roles, false)
      opts[:roles] = roles if roles

      context.send :namespace, :bundle do
        send :desc, <<-DESC
          Install the current Bundler environment. By default, gems will be \
          installed to the shared/bundle path. Gems in the development and \
          test group will not be installed. The install command is executed \
          with the --deployment and --quiet flaggems/gems/bundler-2.4.19/lib/bundler/worker.rb000064400000005550150403133700014656 0ustar00pp, :batch]
        DESC
        send task_method, :install, opts do
          bundle_cmd     = context.fetch(:bundle_cmd, "bundle")
          bundle_flags   = context.fetch(:bundle_flags, "--deployment --quiet")
          bundle_dir     = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), "bundle"))
          bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
          bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
          bundle_with    = [*context.fetch(:bundle_with, [])].compact
          app_path = context.fetch(:latest_release)
          if app_path.to_s.empty?
            raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.")
          end
          args = ["--gemfile #{File.join(app_path, bundle_gemfile)}"]
          args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
          args << bundle_flags.to_s
          args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
          args << "--with #{bundle_with.join(" ")}" unless bundle_with.empty?

          run "cd #{app_path} && #{bundle_cmd} install #{args.join(" ")}"
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/lazy_specification.rb000064400000012544150403133710017226 0ustar00# frozen_string_literal: true

require_relative "force_platform"

module Bundler
  class LazySpecification
    include MatchPlatform
    include ForcePlatform

    attr_reader :name, :version, :dependencies, :platform
    attr_accessor :source, :remote, :force_ruby_platform

    def initialize(name, version, platform, source = nil)
      @name          = name
      @version       = version
      @dependencies  = []
      @platform      = platform || Gem::Platform::RUBY
      @source        = source
      @force_ruby_platform = default_force_ruby_platform
    end

    def full_name
      @full_name ||= if platform == Gem::Platform::RUBY
        "#{@name}-#{@version}"
      else
        "#{@name}-#{@version}-#{platform}"
      end
    end

    def ==(other)
      full_name == other.full_name
    end

    def eql?(other)
      full_name.eql?(other.full_name)
    gems/gems/bundler-2.4.19/lib/bundler/deployment.rb000064400000006305150403133710015525 0ustar00gems/gems/bundler-2.4.19/lib/bundler/rubygems_ext.rb000064400000025601150403133720016063 0ustar00ion})\n"
      else
        out << "    #{name} (#{version}-#{platform})\n"
      end

      dependencies.sort_by(&:to_s).uniq.each do |dep|
        next if dep.type == :development
        out << "    #{dep.to_lock}\n"
      end

      out
    end

    def materialize_for_installation
      source.local!

      matching_specs = source.specs.search(use_exact_resolved_specifications? ? self : [name, version])
      return self if matching_specs.empty?

      candidates = if use_exact_resolved_specifications?
        matching_specs
      else
        target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform

        installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)

        specification = __materialize__(installable_candidates, :fallback_to_non_installable => false)
        return specification unless specification.nil?

        if target_platform != platform
          installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)
        end

        installable_candidates
      end

      __materialize__(candidates)
    end

    # If in frozen mode, we fallback to a non-installable candidate because by
    # doing this we avoid re-resolving and potentially end up changing the
    # lock file, which is not allowed. In that case, we will give a proper error
    # about the mismatch higher up the stack, right before trying to install the
    # bad gem.
    def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)
      search = candidates.reverse.find do |spec|
        spec.is_a?(StubSpecification) ||
          (spec.matches_current_ruby? &&
            spec.matches_current_rubygems?)
      end
      if search.nil? && fallback_to_non_installable
        search = candidates.last
      else
        search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
      end
      search
    end

    def to_s
      @to_s ||= if platform == Gem::Platform::RUBY
        "#{name} (#{version})"
      else
        "#{name} (#{version}-#{platform})"
      end
    end

    def git_version
      return unless source.is_a?(Bundler::Source::Git)
      " #{source.revision[0..6]}"
    end

    private

    def use_exact_resolved_specifications?
      @use_exact_resolved_specifications ||= !source.is_a?(Source::Path) && ruby_platform_materializes_to_ruby_platform?
    end

    #
    # For backwards compatibility with existing lockfiles, if the most specific
    # locked platform is not a specific platform like x86_64-linux or
    # universal-java-11, then we keep the previous behaviour of resolving the
    # bgems/gems/bundler-2.4.19/lib/bundler/lazy_specification.rb000064400000012544150403133710017226 0ustar00gems/gems/bundler-2.4.19/lib/bundler/rubygems_ext.rb000064400000025601150403133720016063 0ustar00# frozen_string_literal: true

require "pathname"

require "rubygems/specification"

# We can't let `Gem::Source` be autoloaded in the `Gem::Specification#source`
# redefinition below, so we need to load it upfront. The reason is that if
# Bundler monkeypatches are loaded before RubyGems activates an executable (for
# example, through `ruby -rbundler -S irb`), gem activation might end up calling
# the redefined `Gem::Specification#source` and triggering the `Gem::Source`
# autoload. That would result in requiring "rubygems/source" inside another
# require, which would trigger a monitor error and cause the `autoload` to
# eventually fail. A better solution is probably to completely avoid autoloading
# `Gem::Source` from the redefined `Gem::Specification#source`.
require "rubygems/source"

require_relative "match_metadata"
require_relative "force_platform"
require_relative "match_platform"

# Cherry-pick fixes to `Gem.ruby_version` to be useful for modern Bundler
# versions and ignore patchlevels
# (https://github.com/rubygems/rubygems/pull/5472,
# https://github.com/rubygems/rubygems/pull/5486). May be removed once RubyGems
# 3.3.12 support is dropped.
unless Gem.ruby_version.to_s == RUBY_VERSION || RUBY_PATCHLEVEL == -1
  Gem.instance_variable_set(:@ruby_version, Gem::Version.new(RUBY_VERSION))
end

module Gem
  class Specification
    include ::Bundler::MatchMetadata
    include ::Bundler::MatchPlatform

    attr_accessor :remote, :location, :relative_loaded_from

    remove_method :source
    attr_writer :source
    def source
      (defined?(@source) && @source) || Gem::Source::Installed.new
    end

    alias_method :rg_full_gem_path, :full_gem_path
    alias_method :rg_loaded_from,   :loaded_from

    def full_gem_path
      if source.respond_to?(:root)
        Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
      else
        rg_full_gem_path
      end
    end

    def loaded_from
      if relative_loaded_from
        source.path.join(relative_loaded_from).to_s
      else
        rg_loaded_from
      end
    end

    def load_paths
      full_require_paths
    end

    alias_method :rg_extension_dir, :extension_dir
    def extension_dir
      # following instance variable is already used in original method
      # and that is the reason to prefix it with bundler_ and add rubocop exception
      @bundler_extension_dir ||= if source.respond_to?(:extension_dir_name) # rubocop:disable Naming/MemoizedInstanceVariableName
        unique_extension_dir = [source.extension_dir_name, File.basename(full_gem_path)].uniq.join("-")
        File.expand_path(File.join(extensions_dir, unique_extension_dir))
      else
        rg_extension_dir
      end
    end

    remove_method :gem_dir if instance_methods(false).include?(:gem_dir)
    def gem_dir
      full_gem_path
    end

    unless const_defined?(:LATEST_RUBY_WITHOUT_PATCH_VERSIONS)
      LATEST_RUBY_WITHOUT_PATCH_VERSIONS = Gem::Version.new("2.1")

      alias_method :rg_required_ruby_version=, :required_ruby_version=
      def required_ruby_version=(req)
        self.rg_required_ruby_version = req

        @required_ruby_version.requirements.map! do |op, v|
          if v >= LATEST_RUBY_WITHOUT_PATCH_VERSIONS && v.release.segments.size == 4
            [op == "~>" ? "=" : op, Gem::Version.new(v.segments.tap {|s| s.delete_at(3) }.join("."))]
          else
            [op, v]
          end
        end
      end
    end

    def groups
      @groups ||= []
    end

    def git_version
      return unless loaded_from && source.is_a?(Bundler::Source::Git)
      " #{source.revision[0..6]}"
    end

    def to_gemfile(path = nil)
      gemfile = String.new("source 'https://rubygems.org'\n")
      gemfile << dependencies_to_gemfile(nondevelopment_dependencies)
      unless development_dependencies.empty?
        gemfile << "\n"
        gemfile << dependencies_to_gemfile(development_dependencies, :development)
      end
      gemfile
    end

    # Backfill missing YAML require when not defined. Fixed since 3.1.0.pre1.
    module YamlBackfiller
      def to_yaml(opts = {})
        Gem.load_yaml unless defined?(::YAML)

        super(opts)
      end
    end

    prepend YamlBackfiller

    def nondevelopment_dependencies
      dependencies - development_dependencies
    end

    def deleted_gem?
      !default_gem? && !File.directory?(full_gem_path)
    end

    private

    def dependencies_to_gemfile(dependencies, group = nil)
      gemfile = String.new
      if dependencies.any?
        gemfile << "group :#{group} do\n" if group
        dependencies.each do |dependency|
          gemfile << "  " if group
          gemfile << %(gem "#{dependency.name}")
          req = dependency.requirements_list.first
          gemfile << %(, "#{req}") if req
          gemfile << "\n"
        end
        gemfile << "end\n" if group
      end
      gemfile
    end
  end

  class Dependengems/gems/bundler-2.4.19/lib/bundler/rubygems_ext.rb000064400000025601150403133720016063 0ustar00equirement.requirements.map {|o, v| "#{o} #{v}" }.sort.reverse
        out << " (#{reqs.join(", ")})"
      end
      out
    end
  end

  # comparison is done order independently since rubygems 3.2.0.rc.2
  unless Gem::Requirement.new("> 1", "< 2") == Gem::Requirement.new("< 2", "> 1")
    class Requirement
      module OrderIndependentComparison
        def ==(other)
          return unless Gem::Requirement === other

          if _requirements_sorted? && other._requirements_sorted?
            super
          else
            _with_sorted_requirements == other._with_sorted_requirements
          end
        end

        protected

        def _requirements_sorted?
          return @_requirements_sorted if defined?(@_requirements_sorted)
          strings = as_list
          @_requirements_sorted = strings == strings.sort
        end

        def _with_sorted_requirements
          @_with_sorted_requirements ||= _requirements_sorted? ? self : self.class.new(as_list.sort)
        end
      end

      prepend OrderIndependentComparison
    end
  end

  if Gem::Requirement.new("~> 2.0").hash == Gem::Requirement.new("~> 2.0.0").hash
    class Requirement
      module CorrectHashForLambdaOperator
        def hash
          if requirements.any? {|r| r.first == "~>" }
            requirements.map {|r| r.first == "~>" ? [r[0], r[1].to_s] : r }.sort.hash
          else
            super
      gems/gems/bundler-2.4.19/lib/bundler/stub_specification.rb000064400000005450150403133720017223 0ustar00_method :===

      def ===(other)
        return nil unless Gem::Platform === other

        # universal-mingw32 matches x64-mingw-ucrt
        return true if (@cpu == "universal" || other.cpu == "universal") &&
                       @os.start_with?("mingw") && other.os.start_with?("mingw")

        # cpu
        ([nil,"universal"].include?(@cpu) || [nil, "universal"].include?(other.cpu) || @cpu == other.cpu ||
        (@cpu == "arm" && other.cpu.start_with?("arm"))) &&

          # os
          @os == other.os &&

          # version
          (
            (@os != "linux" && (@version.nil? || other.version.nil?)) ||
            (@os == "linux" && (normalized_linux_version_ext == other.normalized_linux_version_ext || ["musl#{@version}", "musleabi#{@version}", "musleabihf#{@version}"].include?(other.version))) ||
            @version == other.version
          )
      end

      # This is a copy of RubyGems 3.3.23 or higher `normalized_linux_method`.
      # Once only 3.3.23 is supported, we can use the method in RubyGems.
      def normalized_linux_version_ext
        return nil unless @version

        without_gnu_nor_abi_modifiers = @version.sub(/\Agnu/, "").sub(/eabi(hf)?\Z/, "")
        return nil if without_gnu_nor_abi_modifiers.empty?

        without_gnu_nor_abi_modifiers
      end
    end

    if RUBY_ENGINE == "truffleruby" && !defined?(REUSE_AS_BINARY_ON_TRUFFLERUBY)
      REUSE_AS_BINARY_ON_TRUFFLERUBY = %w[libv8 libv8-node sorbet-static].freeze
    end
  end

  Platform.singleton_class.module_eval do
    unless Platform.singleton_methods.include?(:match_spec?)
      def match_spec?(spec)
        match_gem?(spec.platform, spec.name)
      end

      def match_gem?(platform, gem_name)
        match_platforms?(platform, Gem.platforms)
      end
    end

    match_platforms_defined = Gem::Platform.respond_to?(:match_platforms?, true)

    if !match_platforms_defined || Gem::Platform.send(:match_platforms?, Gem::Platform::X64_LINUX_MUSL, [Gem::Platform::X64_LINUX])

      private

      remove_method :match_platforms? if match_platforms_defined

      def match_platforms?(platform, platforms)
        platforms.any? do |local_platform|
          platform.nil? ||
            local_platform == platform ||
            (local_platform != Gem::Platform::RUBY && platform =~ local_platform)
        end
      end
    end
  end

  # On universal Rubies, resolve the "universal" arch to the real CPU arch, without changing the extension directory.
  class Specification
    if /^universal\.(?<arch>.*?)-/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
      local_platform = Platform.local
      if local_platform.cpu == "universal"
        ORIGINAL_LOCAL_PLATFORM = local_platform.to_s.freeze

        local_platform.cpu = if arch == "arm64e" # arm64e is only permitted for Apple system binaries
          "arm64"
        egems/gems/bundler-2.4.19/lib/bundler/match_remote_metadata.rb000064400000001537150403133720017657 0ustar00gems/gems/bundler-2.4.19/lib/bundler/stub_specification.rb000064400000005450150403133720017223 0ustar00# frozen_string_literal: true

module Bundler
  class StubSpecification < RemoteSpecification
    def self.from_stub(stub)
      return stub if stub.is_a?(Bundler::StubSpecification)
      spec = new(stub.name, stub.version, stub.platform, nil)
      spec.stub = stub
      spec
    end

    attr_accessor :stub, :ignored

    def source=(source)
    gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb000064400000014021150403133720025131 0ustar00     # the gem specification using the instructions provided by `gem help install`
      installed_by_version == Gem::Version.new(0)
    end

    # This is defined directly to avoid having to loading the full spec
    def missing_extensions?
      return false if default_gem?
      return false if extensions.empty?
      return false if File.exist? gem_build_complete_path
      return false if manually_installed?

      true
    end

    def activated
      stub.activated
    end

    def activated=(activated)
      stub.instance_variable_set(:@activated, activated)
    end

    def extensions
      stub.extensions
    end

    def gem_build_complete_path
      File.join(extension_dir, "gem.build_complete")
    end

    def default_gem?
      stub.default_gem?
    end

    def full_gem_path
      stub.full_gem_path
    end

    def full_gem_path=(path)
      stub.full_gem_path = path
    end

    def full_require_paths
      stub.full_require_paths
    end

    def load_paths
      full_require_paths
    end

    def loaded_from
      stub.loaded_from
    end

    def matches_for_glob(glob)
      stub.matches_for_glob(glob)
    end

    def raw_require_paths
      stub.raw_require_paths
    end

    private

    def _remote_specification
      @_remote_specification ||= begin
        rs = stub.to_spec
        if rs.equal?(self) # happens when to_spec gets the spec from Gem.loaded_specs
          rs = Gem::Specification.load(loaded_from)
          Bundler.rubygems.stub_set_spec(stub, rs)
        end

        unless rs
          raise GemspecError, "The gemspec for #{full_name} at #{loaded_from}" \
            " was missing or broken. Try running `gem pristine #{name} -v #{version}`" \
            " to fix the cached spec."
        end

        rs.source = source

        rs
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/match_remote_metadata.rb000064400000001537150403133720017657 0ustar00# frozen_string_literal: true

module Bundler
  module FetchMetadata
    # A fallback is included because the original version of the specification
    # API didn't include that field, so some marshalled specs in the index have it
    # set to +nil+.
    def matches_current_ruby?
      @required_ruby_version ||= _remote_specification.required_ruby_version || Gem::Requirement.default

      super
    end

    def matches_current_rubygems?
      # A fallback is included because the original version of the specification
      # API didn't include that field, so some marshalled specs in the index have it
      # set to +nil+.
      @required_rubygems_version ||= _remote_specification.required_rubygems_version || Gem::Requirement.default

      super
    end
  end

  module MatchRemoteMetadata
    include MatchMetadata

    prepend FetchMetadata
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb000064400000014021150403133720025131 0ustar00gems/gems/bundler-2.4.19/lib/bundler/stub_specification.rb000064400000005450150403133720017223 0ustar00ses: String ("rails")
  #
  #
  # ## "Version":
  #
  # This class will be used to represent a single version number.
  #
  # Versions don't need to store their associated package, however they will
  # only be compared against other versions of the same package.
  #
  # It must be Comparible (and implement <=> reasonably)
  #
  # Example classes: Gem::Version, Integer
  #
  #
  # ## "Dependency"
  #
  # This class represents the requirement one package has on another. It is
  # returned by dependencies_for(package, version) and will be passed to
  # parse_dependency to convert it to a format Bundler::PubGrub understands.
  #
  # It must also have a reasonable definition of #==
  #
  # Example classes: String ("~> 1.0"), Gem::Requirement
  #
  class BasicPackageSource
    # Override me!
    #
    # This is called per package to find all possible versions of a package.
    #
    # It is called at most once per-package
    #
    # Returns: Array of versions for a package, in preferred order of selection
    def all_versions_for(package)
      raise NotImplementedError
    end

    # Override me!
    #
    # Returns: Hash in the form of { package => requirement, ... }
    def dependencies_for(package, version)
      raise NotImplementedError
    end

    # Override me!
    #
    # Convert a (user-defined) dependency into a format Bundler::PubGrub understands.
    #
    # Package is passed to this method but for many implementations is not
    # needed.
    #
    # Returns: either a Bundler::PubGrub::VersionRange, Bundler::PubGrub:gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb000064400000000060150403133720022500 0ustar00h[k] = all_versions_for(k)
        end
      endgems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb000064400000005325150403133730024415 0ustar00     cause = Incompatibility::NoVersions.new(unsatisfied_term)

      Incompatibility.new([unsatisfied_term], cause: cause)
    end

    def incompatibilities_for(package, version)
      package_deps = @cached_dependencies[package]
      sorted_versions = @sorted_versions[package]
      package_deps[version].map do |dep_package, dep_constraint_name|
        low = high = sorted_versions.index(version)

        # find version low such that all >= low share the same dep
        while low > 0 &&
            package_deps[sorted_versions[low - 1]][dep_package] == dep_constraint_name
          low -= 1
        end
        low =
          if low == 0
            nil
          else
            sorted_versions[low]
          end

        # find version high such that all < high share the same dep
        while high < sorted_versions.length &&
            packaggems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb000064400000014021150403133720025131 0ustar00Bundler::PubGrub::Incompatibility::InvalidDependency.new(dep_package, dep_constraint_name)
          return [Incompatibility.new([Term.new(self_constraint, true)], cause: cause)]
        elsif !dep_constraint.is_a?(VersionConstraint)
          # Upgrade range/union to VersionConstraint
          dep_constraint = VersionConstraint.new(dep_package, range: dep_constraint)
        end

        Incompatibility.new([Term.new(self_constraint, true), Term.new(dep_constraint, false)], cause: :dependency)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb000064400000000060150403133720022500 0gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb000064400000001130150403133730022406 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb000064400000005325150403133730024415 0ustar00require_relative 'assignment'

module Bundler::PubGrub
  class PartialSolution
    attr_gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb000064400000004604150403133740021774 0ustar00package|
        @decisions.key?(package)
      end.map do |package|
        @terms[package]
      end
    end

    def decide(package, version)
      @attempted_solutions += 1 if @backtracking
      @backtracking = false;

      decisions[package] = version
      assignment = Assignment.decision(package, version, decision_level, assignments.length)
      add_assignment(assignment)
    end

    def backtrack(previous_level)
      @backtracking = true

      new_assignments = assignments.select do |assignment|
        assignment.decision_level <= previous_level
      end

      new_decisions = Hash[decisions.first(previous_level)]

      reset!

      @decisions = new_decisions

      new_assignments.each do |assignment|
        add_assignment(assignment)
      end
    end

    private

    def reset!
      # { Array<Assignment> }
      @assignments = []

      # { Package => Array<Assignment> }
      @assignments_by = Hash.new { |h,k| h[k] = [] }
      @cumulative_assignments = {}.compare_by_identity

      # { Package => Package::Version }
      @decisions = {}

      # { Package => Term }
      @terms = {}
      @relation_cache = Hash.new { |h,k| h[k] = {} }

      # { Package => Boolean }
      @required = {}
    end

    def add_assignment(assignment)
      term = assignment.term
      package = term.package

      @assignments << assignment
      @assignments_by[package] << assignment

      @required[package] = true if term.positive?

      if @terms.key?(package)
        old_term = @terms[package]
        @terms[package] = old_term.intersect(term)
      else
        @terms[package] = term
      end
      @relation_cache[package].clear

      @cumulative_assignments[assignment] = @terms[package]
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb000064400000001130150403133730022406 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb000064400000001004150403133740023164 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb000064400000000060150403133720022500 0ustar00gemsgems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb000064400000002513150403133740022657 0ustar00     constraint.eql?(other.constraint)
    end

    def invert
      self.class.new(@constraint, !@positive)
    end
    alias_method :inverse, :invert

    def intersect(other)
      raise ArgumentError, "packages must match" if package != other.package

      if positive? && other.positive?
        self.class.new(constraint.intersect(other.constraint), true)
      elsif negative? && other.negative?
        self.class.new(constraint.union(other.constraint), false)
      else
        positive = positive? ? self : other
        negative = negative? ? self : other
        self.class.new(positive.constraint.intersect(negative.constraint.invert), true)
      end
    end

    def difference(other)
      intersect(other.invert)
    end

    def relation(other)
      if positive? && other.positive?
        constraint.relation(other.constraint)
      elsif negative? && other.positive?
        if constraint.allows_all?(other.constraint)
          :disjoint
        else
          :overlap
        end
      elsif positive? && other.negative?
        if !other.constraint.allows_any?(constraint)
          :subset
        elsif other.constraint.allows_all?(constraint)
          :disjoint
        else
          :overlap
        end
      elsif negative? && other.negative?
        if constraint.allows_all?(other.constraint)
          :subset
       gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb000064400000005042150403133750024754 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb000064400000001004150403133740023164 0ustar00module Bundler::PubGrub
  class Assignment
    attr_reader :term, :cause, :decision_level, :index
    def initialize(term, cause, decision_level, index)
      @term = term
      @cause = cause
      @decision_levegems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb000064400000001130150403133730022406 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb000064400000002513150403133740022657 0ustar00module Bundler::PubGrub
  module RubyGems
    extend self

    def requirement_to_range(gems/gems/bundler-2.4.19/lib/bundlgems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb000064400000000622150403133750023661 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb000064400000005042150403133750024754 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb000064400000016041150403133750024103 0ustar00&&
        range.eql?(other.range)
    end

    class << self
      def exact(package, version)
        range = VersionRange.new(min: version, max: version, include_min: true, include_max: true)
        new(package, range: range)
      end

      def any(package)
        new(package, range: VersionRange.any)
      end

      def empty(package)
        new(package, range: VersionRange.empty)
      end
    end

    def intersect(other)
      unless package == other.package
        raise ArgumentError, "Can only intersect between VersionConstraint of the same package"
      end

      self.class.new(package, range: range.intersect(other.range))
    end

    def union(other)
      unless package == other.package
        raise ArgumentError, "Can only intersect between VersionConstraint of the same package"
      end

      self.class.new(package, range: range.union(other.range))
    end

   gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb000064400000001004150403133740023164 0ustar00 end
    end

    def to_s(allow_every: false)
      if Package.root?(package)
        package.to_s
      elsif allow_every && any?
        "every version of #{package}"
      else
        "#{package} #{constraint_string}"
      end
    end

    def constraint_string
      if any?
        ">= 0"
      else
        range.to_s
      end
    end

    def empty?
      range.empty?
    end

    # Does this match every version of the package
    def any?
      range.any?
    end

    def inspect
      "#<#{self.classgems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb000064400000002513150403133740022657 0ustar00require_relative 'failure_writer'

module Bundler::PubGrub
  class SolveFailure < StandardError
    attr_reader :incompatibility

    def initialize(incompatibility)
      @incompatibility = incompatibility
    end

    def to_s
      "Could not find compatible versions\n\n#{explanation}"
    end

    def explanation
      @explanation ||= FailureWriter.new(@incompatibility).write
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb000064400000016041150403133750024103 0ustar00require_relative 'partial_solution'
require_relative 'term'
require_relative 'incompatibility'
require_relative 'solve_failure'

module Bundler::PubGrub
  class VersionSolver
    attr_reader :logger
    attr_reader :source
    attr_reader :solution

    def initialize(source:, root: Package.root, logger: Bundler::PubGrub.logger)
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb000064400000005042150403133750024754 0ustar00n found after #{solution.attempted_solutions} attempts:" }
        solution.decisions.each do |package, version|
          next if Package.root?(package)
          logger.info { "* #{package} #{version}" }
        end

        false
      else
        true
      end
    end

    def solve
      work until solved?

      solution.decisions
    end

    alias_method :result, :solve

    private

    def propagate(initial_package)
      changed = [initial_package]
      while package = changed.shift
        @incompatibilities[package].reverse_each do |incompatibility|
          result = propagate_incompatibility(incompatibility)
          if result == :conflict
            root_cause = resolve_conflict(incompatibility)
            changed.clear
            changed << propagate_incompatibility(root_cause)
          elsif result # should be a Package
            changed << result
          end
        end
        changed.uniq!
      end
    end

    def propagate_incompatibility(incompatibility)
      unsatisfied = nil
      incompatibility.terms.each do |term|
        relation = solution.relation(term)
        if relation == :disjoint
          return nil
        elsif relation == :overlap
          # If more than one term is inconclusive, we can't deduce anything
          return nil if unsatisfied
          unsatisfied = term
        end
      end

      if !unsatisfied
        return :conflict
      end

      logger.debug { "derived: #{unsatisfied.invert}" }

      solution.derive(unsatisfied.invert, incompatibility)

      unsatisfied.package
    end

    def next_package_to_try
      solution.unsatisfied.min_by do |term|
        package = term.package
        range = term.constraint.range
        matching_versions = source.versions_for(package, range)
        higher_versions = source.versions_for(package, range.upper_invert)

        [matching_versions.count <= 1 ? 0 : 1, higher_versions.count]
      end.package
    end

    def choose_package_version
      if solution.unsatisfied.empty?
        logger.info "No packages unsatisfied. Solving cogems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb000064400000007527150403133750023732 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb000064400000000622150403133750023661 0ustar00    satisfier = solution.satisfier(term)

          if most_recent_satisfier.nil?
            most_recent_term = term
            most_recent_satisfier = satisfier
          elsif most_recent_satisfier.index < satisfier.index
            previous_level = [previous_level, most_recent_satisfier.decision_level].max
            most_recent_term = term
            most_recent_satisfier = satisfier
      gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb000064400000016041150403133750024103 0ustar00recent_satisfier.decision?

          logger.info { "backtracking to #{previous_level}" }
          solution.backtrack(previous_level)

          if new_incompatibility
            add_incompatibility(new_incompatibility)
          end

          return incompatibility
        end

        new_terms = []
        new_terms += incompatibility.terms - [most_recent_term]
        new_terms += most_recent_satisfier.cause.terms.reject { |term|
          term.package == most_recent_satisfier.term.package
        }
        if difference
          new_terms << difference.invert
        end

        new_incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause))

        if incompatibility.to_s == new_incompatibility.to_s
          logger.info { "!! failed to resolve conflicts, this shouldn't have happened" }
          break
        end

        incompatibility = new_incompatibility

        partially = difference ? " partially" : ""
        logger.info { "! #{most_recent_term} is#{partially} satisfied by #{most_recent_satisfier.term}" }
        logger.info { "! which is caused by #{most_recent_satisfier.cause}" }
        logger.info { "! thus #{incompatibility}" }
      end

      raise SolveFailure.new(incompatibility)
    end

    def add_incompatibility(incompatibility)
      logger.debug { "fact: #{incompatibility}" }
      incompatibility.terms.each do |term|
        package = term.package
        @incompatibilities[package] << incompatibility
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb000064400000007527150403133750023732 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb000064400000010110150403133750024213 0ustar00last.contiguous_to?(range)
          ranges << ranges.pop.span(range)
        else
          ranges << range
        end
      end

      ranges
    end

    def self.union(ranges, normalize: true)
      ranges = normalize_ranges(ranges) if normalize

      if ranges.size == 0
        VersionRange.empty
      elsif ranges.size == 1
        ranges[0]
      else
        new(ranges)
      end
    end

    def initialize(ranges)
      raise ArgumentError unless ranges.all? { |r| r.instance_of?(VersionRange) }
      @ranges = ranges
    end

    def hash
      ranges.hash
    end

    def eql?(other)
      ranges.eql?(other.ranges)
    end

    def include?(version)
      !!ranges.bsearch {|r| r.compare_version(version) }
    end

    def select_versions(all_versions)
      versions = []
      ranges.inject(all_versions) do |acc, range|
        _, matching, higher = range.partition_versions(acc)
        versions.concat matching
        higher
      end
      versions
    end

    def intersects?(other)
      my_ranges = ranges.dup
      other_ranges = other.ranges.dup

      my_range = my_ranges.shift
      other_range = other_ranges.shift
      while my_range && other_range
        if my_range.intersects?(other_range)
          return true
        end

        if !my_range.max || other_range.empty? || (other_range.max && other_range.max < my_range.max)
          other_range = other_ranges.shift
        else
          my_range = my_ranges.shift
        end
      end
    end
    alias_method :allows_any?, :intersects?

    def allows_all?(other)
      my_ranges = ranges.dup

      my_range = my_ranges.shift

      other.ranges.all? do |other_range|
        while my_range
          break if my_range.allows_all?(other_range)
          my_range = my_ranges.shift
        end

        !!my_range
      end
    end

    def empty?
      false
    end

    def any?
      false
    end

    def intersect(other)
      my_ranges = ranges.dup
      other_ranges = other.ranges.dup
      new_ranges = []

      my_range = my_ranges.shift
      other_range = other_ranges.shift
      while my_range && other_range
        new_ranges << my_range.intersect(other_range)

        if !my_range.max || other_range.empty? || (other_range.max && other_range.max < my_range.max)
          other_range = other_ranges.shift
        else
          my_range = my_ranges.shift
        end
      end
      new_ranges.reject!(&:empty?)
      VersionUnion.union(new_ranges, normalize: false)
    end

    def upper_invert
      ranges.last.upper_invert
    end

    def invert
      ranges.map(&:invert).inject(:intersect)
    end

    def union(other)
      VersionUnion.union([self, other])
    end

    def to_s
      output = []

      ranges = self.ranges.dup
      while !ranges.empty?
        ne = []
        range = ranges.shift
        while !ranges.empty? && ranges[0].min.to_s == range.max.to_s
          ne << range.max
          range = range.span(ranges.shift)
        end

        ne.map! {|x| "!= #{x}" }
        if ne.empty?
          output << range.to_s
        elsif range.any?
          output << ne.join(', ')
        else
          output << "#{range}, #{ne.join(', ')}"
        end
      end

      output.join(" OR ")
    end

    def inspect
      "#<#{self.class} #{to_s}>"
    end

    def ==(other)
      self.class == other.class &&
        self.ranges == other.ranges
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb000064400000010110150403133750024213 0ustar00module Bundler::PubGrub
  class Igems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb000064400000020257150403133750023671 0ustar00e
    end

    # Returns all external incompatibilities in this incompatibility's
    # derivation graph
    def external_incompatibilities
      if conflict?
        [
          cause.conflict,
          cause.other
        ].flat_map(&:external_incompatibilities)
      else
        [this]
      end
    end

    def to_s
      return @custom_explanation if @custom_explanation

      case cause
      when :root
        "(root dependency)"
      when :dependency
        "#{terms[0].to_s(allow_every: true)} depends on #{terms[1].invert}"
      when Bundler::PubGrub::Incompatibility::InvalidDependency
        "#{terms[0].to_s(allow_every: true)} depends on unknown package #{cause.package}"
      when Bundler::PubGrub::Incompatibility::NoVersions
        "no versions satisfy #{cause.constraint}"
      when Bundler::PubGrub::Incompatibility::ConflictCause
        if failure?
          "version solving has failed"
        elsif terms.length == 1
          term = terms[0]
          if term.positive?
            if term.constraint.any?
              "#{term.package} cannot be used"
            else
              "#{term.to_s(allow_every: true)} cannot be used"
            end
          else
            "#{term.invert} is required"
          end
        else
          if terms.all?(&:positive?)
            if terms.length == 2
              "#{terms[0].to_s(allow_every: true)} is incompatible with #{terms[1]}"
            else
              "one of #{terms.map(&:to_s).join(" or ")} must be false"
            end
          elsif terms.all?(&:negative?)
            if terms.length == 2
              "either #{terms[0].invert} or #{terms[1].invert}"
            else
              "one of #{terms.map(&:invert).join(" or ")} must be true";
            end
          else
            positive = terms.select(&:positive?)
            negative = terms.select(&:negative?).map(&:invert)

            if positive.length == 1
              "#{positive[0].to_s(allow_every: true)} requires #{negative.join(" or ")}"
            else
              "if #{positive.join(" and ")} then #{negative.join(" or ")}"
            end
          end
        end
      else
        raise "unhandled cause: #{cause.inspect}"
      end
    end

    def inspect
      "#<#{self.class} #{to_s}>"
    end

    def pretty_print(q)
      q.group 2, "#<#{self.class}", ">" do
        q.breakable
        q.text to_s

        q.breakable
        q.text " caused by "
        q.pp @cause
      end
    end

    private

    def cleanup_terms(terms)
      terms.each do |term|
        raise "#{term.inspect} must be a term" unless term.is_a?(Term)
      end

      if terms.length != 1 && ConflictCause === cause
        terms = terms.reject do |term|
          term.positive? && Package.root?(term.package)
        end
      end

      # Optimized simple cases
      return terms if terms.length <= 1
      return terms if terms.length == 2 && terms[0].package != terms[1].package

      terms.group_by(&:package).map do |package, common_terms|
        common_terms.inject do |acc, term|
          acc.intersect(term)
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb000064400000020257150403133750023671 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb000064400000010110150403133750024213 0ustar00def hash
        [].hash
      end

      def intersects?(_)
        false
      end

      def intersect(other)
        self
      end

      def allows_all?(other)
        other.empty?
      end

      def include?(_)
        false
      end

      def any?
        false
      end

      def to_s
        "(no versions)"
      end

      def ==(other)
        other.class == self.class
      end

      def invert
        VersionRange.any
      end

      def select_versions(_)
        []
      end
    end

    EMPTY = Empty.new
    Empty.singleton_class.undef_method(:new)

    def self.empty
      EMPTY
    end

    def self.any
      new
    end

    def initialize(min: nil, max: nil, include_min: false, include_max: false, name: nil)
      @min = min
      @max = max
      @include_min = include_min
      @include_max = include_max
      @name = name
    end

    def hash
      @hash ||= min.hash ^ max.hash ^ include_min.hash ^ include_max.hash
    end

    def eql?(other)
      if other.is_a?(VersionRange)
        !other.empty? &&
          min.eql?(other.min) &&
          max.eql?(other.max) &&
          include_min.eql?(other.include_min) &&
          include_max.eql?(other.include_max)
      else
        ranges.eql?(other.ranges)
      end
    end

    def ranges
      [self]
    end

    def include?(version)
      compare_version(version) == 0
    end

    # Partitions passed versions into [lower, within, higher]
    #
    # versions must be sorted
    def partition_versions(versions)
      min_index =
        if !min || versions.empty?
          0
        elsif include_min?
          (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] >= min }
        else
          (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] > min }
        end

      lower = versions.slice(0, min_index)
      versions = versions.slice(min_index, versions.size)

      max_index =
        if !max || versions.empty?
          versions.size
        elsif include_max?
          (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] > max }
        else
          (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] >= max }
        end

      [
        lower,
        versions.slice(0, max_index),
        versions.slice(max_index, versions.size)
      ]
    end

    # Returns versions which are included by this range.
    #
    # versions must be sorted
    def select_versions(versions)
      return versions if any?

      partition_versions(versions)[1]
    end

    def compare_version(version)
      if min
        case version <=> min
        when -1
          return -1
        when 0
          return -1 if !include_min
        when 1
        end
      end

      if max
        case version <=> max
        when -1
        when 0
          return 1 if !include_max
        when 1
          return 1
        end
      end

      0
    end

    def strictly_lower?(other)
      return false if !max || !other.min

      case max <=> other.min
      when 0
        !include_max || !other.include_min
      when -1
        true
      when 1
        false
      end
    end

    def strictly_higher?(other)
      other.strictly_lower?(self)
    end

    def intersects?(other)
      return false if other.empty?
      return other.intersects?(self) if other.is_a?(VersionUnion)
      !strictly_lower?(other) && !strictly_higher?(other)
    end
    alias_method :allows_any?, :intersects?

    def intersect(other)
      return other if other.empty?
      return other.intersect(self) if other.is_a?(VersionUnion)

      min_range =
        if !min
          other
        elsif !other.min
          self
        else
          case min <=> other.min
          when 0
            include_gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb000064400000002704150403133750025347 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb000064400000020257150403133750023671 0ustar00  self
          when 1
            other
          end
        end

      max_range =
        if !max
          self
        elsif !other.max
          other
        else
          case max <=> other.max
          when 0
            include_max ? self : other
          when -1
            other
          when 1
            self
          end
        end

      VersionRange.new(
        min: min_range.min,
        include_min: min_range.include_min,
        max: max_range.max,
        include_max: max_range.include_max
      )
    end

    def union(other)
      return other.union(self) if other.is_a?(VersionUnion)

      if contiguous_to?(other)
        span(other)
      else
        VersionUnion.union([self, other])
      end
    end

    def contiguous_to?(other)
      return false if other.empty?

      intersects?(other) ||
        (min == other.max && (include_min || other.include_max)) ||
        (max == other.min && (include_max || other.inclgems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb000064400000013130150403133750024043 0ustar00eturn false if !include_max && other.include_max
        when 1
        end
      end

      true
    end

    def any?
      !min && !max
    end

    def empty?
      false
    end

    def to_s
      @name ||= constraints.join(", ")
    end

    def inspect
      "#<#{self.class} #{to_s}>"
    end

    def upper_invert
      return self.class.empty unless max

      VersionRange.new(min: max, include_min: !include_max)
    end

    def invert
      return self.class.empty if any?

      low = VersionRange.new(max: min, include_max: !include_min)
      high = VersionRange.new(min: max, include_min: !include_max)

      if !min
        high
      elsif !max
        low
      else
        low.union(high)
      end
    end

    def ==(other)
      self.class == other.class &&
        min == other.min &&
        max == other.max &&
        include_min == other.include_min &&
        include_max == other.include_max
    end

    private

    def constraints
      return ["any"] if any?
      return ["= #{min}"] if min.to_s == max.to_s

      c = []
      c << "#{include_min ? ">=" : ">"} #{min}" if min
      c << "#{include_max ? "<=" : "<"} #{max}" if max
      c
    end

  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb000064400000002704150403133750025347 0ustar00require_relative 'package'
require_relative 'version_constraint'
require_relative 'incompatibility'
require_relative 'basic_package_source'

module Bundler::PubGrub
  class StaticPackageSource < BasicPackageSource
    class DSL
      def initialize(packages, root_deps)
        @packages = packages
        @root_deps = root_deps
      end

      def root(deps:)
        @root_deps.update(deps)
      end

      def add(name, version, deps: {})
        version = Gem::Version.new(version)
        @packages[name] ||= {}
        raise ArgumentError, "#{name} #{version} declared twice" if @packages[name].key?(version)
        @packages[name][version] = clean_deps(name, version, deps)
      end

      private

      # Exclude redundant self-referencing dependencies
      def clean_deps(name, version, deps)
        deps.reject {|dep_name, req| name == dep_name && Bundler::PubGrub::RubyGems.parse_range(req).include?(version) }
      end
    end

    def initialize
      @root_deps = {}
      @packages = {}

      yield DSL.new(@packages, @root_deps)

      super()
    end

    def all_versions_for(package)
      @packages[package].keys
    end

    def root_dependencies
      @root_deps
    end

    def dependencies_for(package, version)
      @packages[package][version]
    end

    def parse_dependency(package, dependency)
      return false unless @packages.key?(package)

      Bundler::PubGrub::RubyGems.parse_constraint(package, dependency)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb000064400000013130150403133750024043 0ustar00module Bundler::PubGrub
  class FailureWriter
    def initialize(root)
      @root = root

      # { Incompatibility => Integer }
      @derivations = {}

      # [ [ String, Integer or nil ] ]
      @lines = []

      # { Incompatibility => Integer }
      @line_numbers = {}

      count_derivations(root)
    end

    def write
      return @root.to_s unless @root.conflict?

      visit(@root)

      padding = @line_numbers.empty? ? 0 : "(#{@line_numbers.values.last}) ".length

      @lines.map do |message, number|
        next "" if message.empty?

        lead = number ? "(#{number}) " : ""
        lead = lead.ljust(padding)
        message = message.gsub("\n", "\n" + " " * (padding + 2))
        "#{lead}#{message}"
      end.join("\n")
    end

    private

    def write_line(incompatibility, message, numbered:)
      if numbered
        number = @line_numbers.length + 1
        @line_numbers[incompatibility] = number
      end

      @lines << [message, number]
    end

    def visit(incompatibility, conclusion: false)
      raise unless incompatibility.conflict?

      numbered = conclusion || @derivations[incompatibility] > 1;
      conjunction = conclusion || incompatibility == @root ? "So," : "And"

      cause = incompatibility.cause

      if cause.conflict.conflict? && cause.other.conflict?
        conflict_line = @line_numbers[cause.conflict]
        other_line = @line_numbers[cause.other]

        if conflict_line && other_line
          write_line(
            incompatibility,
            "Because #{cause.conflict} (#{conflict_line})\nand #{cause.other} (#{other_line}),\n#{incompatigems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub.rb000064400000001414150403133750021022 0ustar00             "Thus, #{incompatibility}.",
              numbered: numbered
            )
          else
            visit(cause.conflict, conclusion: true)
            @lines gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb000064400000002704150403133750025347 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/fileutils/lib/fileutils.rb000064400000241673150403133750021425 0ustar00d)
          write_line(
            incompatibility,
            "#{conjunction} because #{ext},\n#{incompatibility}.",
            numbered: numbered
          )
        end
      else
        write_line(
          incompatibility,
          "Because #{cause.conflict}\nand #{cause.other},\n#{incompatibility}.",
          numbered: numbered
        )
      end
    end

    def single_line?(cause)
      !cause.conflict.conflict? && !cause.other.conflict?
    end

    def collapsible?(incompatibility)
      return false if @derivations[incompatibility] > 1

      cause = incompatibility.cause
      # If incompatibility is derived from two derived incompatibilities,
      # there are too many transitive causes to display concisely.
      return false if cause.conflict.conflict? && cause.other.conflict?

      # If incompatibility is derived from two external incompatibilities, it
      # tends to be confusing to collapse it.
      return false unless cgems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb000064400000013130150403133750024043 0ustar00flict)
          count_derivations(cause.other)
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub.rb000064400000001414150403133750021022 0ustar00require_relative "pub_grub/package"
require_relative "pub_grub/static_package_source"
require_relative "pub_grub/term"
require_relative "pub_grub/version_range"
require_relative "pub_grub/version_constraint"
require_relative "pub_grub/version_union"
require_relative "pub_grub/version_solver"
require_relative "pub_grub/incompatibility"
require_relative 'pub_grub/solve_failure'
require_relative 'pub_grub/failure_writer'
require_relative 'pub_grub/version'

module Bundler::PubGrub
  class << self
    attr_writer :logger

    def logger
      @logger || default_logger
    end

    private

    def default_logger
      require "logger"

      logger = ::Logger.new(STDERR)
      logger.level = $DEBUG ? ::Logger::DEBUG : ::Logger::WARN
      @logger = logger
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/fileutils/lib/fileutils.rb000064400000241673150403133750021425 0ustar00# frozen_string_literal: true

begin
  require 'rbconfig'
rescue LoadError
  # for make rjit-headers
end

# Namespace for file utility methods for copying, moving, removing, etc.
#
# == What's Here
#
# First, what’s elsewhere. \Module \Bundler::FileUtils:
#
# - Inherits from {class Object}[rdoc-ref:Object].
# - Supplements {class File}[rdoc-ref:File]
#   (but is not included or extended there).
#
# Here, module \Bundler::FileUtils provides methods that are useful for:
#
# - {Creating}[rdoc-ref:FileUtils@Creating].
# - {Deleting}[rdoc-ref:FileUtils@Deleting].
# - {Querying}[rdoc-ref:FileUtils@Querying].
# - {Setting}[rdoc-ref:FileUtils@Setting].
# - {Comparing}[rdoc-ref:FileUtils@Comparing].
# - {Copying}[rdoc-ref:FileUtils@Copying].
# - {Moving}[rdoc-ref:FileUtils@Moving].
# - {Options}[rdoc-ref:FileUtils@Options].
#
# === Creating
#
# - ::mkdir: Creates directories.
# - ::mkdir_p, ::makedirs, ::mkpath: Creates directories,
#   also creating ancestor directories as needed.
# - ::link_entry: Creates a hard link.
# - ::ln, ::link: Creates hard links.
# - ::ln_s, ::symlink: Creates symbolic links.
# - ::ln_sf: Creates symbolic links, overwriting if necessary.
# - ::ln_sr: Creates symbolic links relative to targets
#
# === Deleting
#
# - ::remove_dir: Removes a directory and its descendants.
# - ::remove_entry: Removes an entry, including its descendants if it is a directory.
# - ::remove_entry_secure: Like ::remove_entry, but removes securely.
# - ::remove_file: Removes a file entry.
# - ::rm, ::remove: Removes entries.
# - ::rm_f, ::safe_unlink: Like ::rm, but removes forcibly.
# - ::rm_r: Removes entries and their descendants.
# - ::rm_rf, ::rmtree: Like ::rm_r, but removes forcibly.
# - ::rmdir: Removes directories.
#
# === Querying
#
# - ::pwd, ::getwd: Returns the path to the working directory.
# - ::uptodate?: Returns whether a given entry is newer than given other entries.
#
# === Setting
#
# - ::cd, ::chdir: Sets the working directory.
# - ::chmod: Sets permissions for an entry.
# - ::chmod_R: Sets permissions for an entry and its descendants.
# - ::chown: Sets the owner and group for entries.
# - ::chown_R: Sets the owner and group for entries and their descendants.
# - ::touch: Sets modification and access times for entries,
#   creating if necessary.
#
# === Comparing
#
# - ::compare_file, ::cmp, ::identical?: Returns whether two entries are identical.
# - ::compare_stream: Returns whether two streams are identical.
#
# === Copying
#
# - ::copy_entry: Recursively copies an entry.
# - ::copy_file: Copies an entry.
# - ::copy_stream: Copies a stream.
# - ::cp, ::copy: Copies files.
# - ::cp_lr: Recursively creates hard links.
# - ::cp_r: Recursively copies files, retaining mode, owner, and group.
# - ::install: Recursively copies files, optionally setting mode,
#   owner, and group.
#
# === Moving
#
# - ::mv, ::move: Moves entries.
#
# === Options
#
# - ::collect_method: Returns the names of methods that accept a given option.
# - ::commands: Returns the names of methods that accept options.
# - ::have_option?: Returns whether a given method accepts a given option.
# - ::options: Returns all optgems/gems/bundler-2.4.19/lib/bundler/vendor/pub_grub/lib/pub_grub.rb000064400000001414150403133750021022 0ustar00ommand)
#   end
#
# To illustrate:
#
#   tree('src0')
#   # => src0
#   #    |-- sub0
#   #    |   |-- src0.txt
#   #    |   `-- src1.txt
#   #    `-- sub1
#   #        |-- src2.txt
#   #        `-- src3.txt
#
# == Avoiding the TOCTTOU Vulnerability
#
# For certain methods that recursively remove entries,
# there is a potential vulnerability called the
# {Time-of-check to time-of-use}[https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use],
# or TOCTTOU, vulnerability that can exist when:
#
# - An ancestor directory of the entry at the target path is world writable;
#   such directories include <tt>/tmp</tt>.
# - The directory tree at the target path includes:
#
#   - A world-writable descendant directory.
#   - A symbolic link.
#
# To avoid that vulnerability, you gems/gems/bundler-2.4.19/lib/bundler/vendor/fileutils/lib/fileutils.rb000064400000241673150403133750021425 0ustar00# by applying a special pre-process:
#
# - If the target path points to a directory, this method uses methods
#   {File#chown}[rdoc-ref:File#chown]
#   and {File#chmod}[rdoc-ref:File#chmod]
#   in removing directories.
# - The owner of the target directory should be either the current process
#   or 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 is set.
#
# For details of this security vulnerability, see Perl cases:
#
# - {CVE-2005-0448}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448].
# - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452].
#
module Bundler::FileUtils
  VERSION = "1.7.0"

  def self.private_module_function(name)   #:nodoc:
    module_function name
    private_class_method name
  end

  #
  # Returns a string containing the path to the current directory:
  #
  #   Bundler::FileUtils.pwd # => "/rdoc/fileutils"
  #
  # Bundler::FileUtils.getwd is an alias for Bundler::FileUtils.pwd.
  #
  # Related: Bundler::FileUtils.cd.
  #
  def pwd
    Dir.pwd
  end
  module_function :pwd

  alias getwd pwd
  module_function :getwd

  # Changes the working directory to the given +dir+, which
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments]:
  #
  # With no block given,
  # changes the current directory to the directory at +dir+; returns zero:
  #
  #   Bundler::FileUtils.pwd # => "/rdoc/fileutils"
  #   Bundler::FileUtils.cd('..')
  #   Bundler::FileUtils.pwd # => "/rdoc"
  #   Bundler::FileUtils.cd('fileutils')
  #
  # With a block given, changes the current directory to the directory
  # at +dir+, calls the block with argument +dir+,
  # and restores the original current directory; returns the block's value:
  #
  #   Bundler::FileUtils.pwd                                     # => "/rdoc/fileutils"
  #   Bundler::FileUtils.cd('..') { |arg| [arg, Bundler::FileUtils.pwd] } # => ["..", "/rdoc"]
  #   Bundler::FileUtils.pwd                                     # => "/rdoc/fileutils"
  #
  # Keyword arguments:
  #
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.cd('..')
  #     Bundler::FileUtils.cd('fileutils')
  #
  #   Output:
  #
  #     cd ..
  #     cd fileutils
  #
  # Bundler::FileUtils.chdir is an alias for Bundler::FileUtils.cd.
  #
  # Related: Bundler::FileUtils.pwd.
  #
  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 the file at path +new+
  # is newer than all the files at paths in array +old_list+;
  # +false+ otherwise.
  #
  # Argument +new+ and the elements of +old_list+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]:
  #
  #   Bundler::FileUtils.uptodate?('Rakefile', ['Gemfile', 'README.md']) # => true
  #   Bundler::FileUtils.uptodate?('Gemfile', ['Rakefile', 'README.md']) # => false
  #
  # A non-existent file is considered to be infinitely old.
  #
  # Related: Bundler::FileUtils.touch.
  #
  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 directories at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, creates a directory at each +path+ in +list+
  # by calling: <tt>Dir.mkdir(path, mode)</tt>;
  # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
  #
  #   Bundler::FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"]
  #   Bundler::FileUtils.mkdir('tmp4')        # => ["tmp4"]
  #
  # Keyword arguments:
  #
  # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
  #   see {File.chmod}[rdoc-ref:File.chmod].
  # - <tt>noop: true</tt> - does not create directories.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.mkdir(%w[tmp0 tmp1], verbose: true)
  #     Bundler::FileUtils.mkdir(%w[tmp2 tmp3], mode: 0700, verbose: true)
  #
  #   Output:
  #
  #     mkdir tmp0 tmp1
  #     mkdir -m 700 tmp2 tmp3
  #
  # Raises an exception if any path points to an existing
  # file or directory, or if for any reason a directory cannot be created.
  #
  # Related: Bundler::FileUtils.mkdir_p.
  #
  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 directories at the paths in the given +list+
  # (a single path or an array of paths),
  # also creating ancestor directories as needed;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, creates a directory at each +path+ in +list+,
  # along with any needed ancestor directories,
  # by calling: <tt>Dir.mkdir(path, mode)</tt>;
  # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
  #
  #   Bundler::FileUtils.mkdir_p(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
  #   Bundler::FileUtils.mkdir_p('tmp4/tmp5')             # => ["tmp4/tmp5"]
  #
  # Keyword arguments:
  #
  # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
  #   see {File.chmod}[rdoc-ref:File.chmod].
  # - <tt>noop: true</tt> - does not create directories.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.mkdir_p(%w[tmp0 tmp1], verbose: true)
  #     Bundler::FileUtils.mkdir_p(%w[tmp2 tmp3], mode: 0700, verbose: true)
  #
  #   Output:
  #
  #     mkdir -p tmp0 tmp1
  #     mkdir -p -m 700 tmp2 tmp3
  #
  # Raises an exception if for any reason a directory cannot be created.
  #
  # Bundler::FileUtils.mkpath and Bundler::FileUtils.makedirs are aliases for Bundler::FileUtils.mkdir_p.
  #
  # Related: Bundler::FileUtils.mkdir.
  #
  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)

      stack = []
      until File.directory?(path) || File.dirname(path) == path
        stack.push path
        path = File.dirname(path)
      end
      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 directories at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, removes the directory at each +path+ in +list+,
  # by calling: <tt>Dir.rmdir(path)</tt>;
  # see {Dir.rmdir}[rdoc-ref:Dir.rmdir]:
  #
  #   Bundler::FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
  #   Bundler::FileUtils.rmdir('tmp4/tmp5')             # => ["tmp4/tmp5"]
  #
  # Keyword arguments:
  #
  # - <tt>parents: true</tt> - removes successive ancestor directories
  #   if empty.
  # - <tt>noop: true</tt> - does not remove directories.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3], parents: true, verbose: true)
  #     Bundler::FileUtils.rmdir('tmp4/tmp5', parents: true, verbose: true)
  #
  #   Output:
  #
  #     rmdir -p tmp0/tmp1 tmp2/tmp3
  #     rmdir -p tmp4/tmp5
  #
  # Raises an exception if a directory does not exist
  # or if for any reason a directory cannot be removed.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # When +src+ is the path to an existing file
  # and +dest+ is the path to a non-existent file,
  # creates a hard link at +dest+ pointing to +src+; returns zero:
  #
  #   Dir.children('tmp0/')                    # => ["t.txt"]
  #   Dir.children('tmp1/')                    # => []
  #   Bundler::FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk') # => 0
  #   Dir.children('tmp1/')                    # => ["t.lnk"]
  #
  # When +src+ is the path to an existing file
  # and +dest+ is the path to an existing directory,
  # creates a hard link at <tt>dest/src</tt> pointing to +src+; returns zero:
  #
  #   Dir.children('tmp2')               # => ["t.dat"]
  #   Dir.children('tmp3')               # => []
  #   Bundler::FileUtils.ln('tmp2/t.dat', 'tmp3') # => 0
  #   Dir.children('tmp3')               # => ["t.dat"]
  #
  # When +src+ is an array of paths to existing files
  # and +dest+ is the path to an existing directory,
  # then for each path +target+ in +src+,
  # creates a hard link at <tt>dest/target</tt> pointing to +target+;
  # returns +src+:
  #
  #   Dir.children('tmp4/')                               # => []
  #   Bundler::FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/') # => ["tmp0/t.txt", "tmp2/t.dat"]
  #   Dir.children('tmp4/')                               # => ["t.dat", "t.txt"]
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - overwrites +dest+ if it exists.
  # - <tt>noop: true</tt> - does not create links.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk', verbose: true)
  #     Bundler::FileUtils.ln('tmp2/t.dat', 'tmp3', verbose: true)
  #     Bundler::FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/', verbose: true)
  #
  #   Output:
  #
  #     ln tmp0/t.txt tmp1/t.lnk
  #     ln tmp2/t.dat tmp3
  #     ln tmp0/t.txt tmp2/t.dat tmp4/
  #
  # Raises an exception if +dest+ is the path to an existing file
  # and keyword argument +force+ is not +true+.
  #
  # Bundler::FileUtils#link is an alias for Bundler::FileUtils#ln.
  #
  # Related: Bundler::FileUtils.link_entry (has different options).
  #
  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

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # creates links +dest+ and descendents pointing to +src+ and its descendents:
  #
  #   tree('src0')
  #   # => src0
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   File.exist?('dest0') # => false
  #   Bundler::FileUtils.cp_lr('src0', 'dest0')
  #   tree('dest0')
  #   # => dest0
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # If +src+ and +dest+ are both paths to directories,
  # creates links <tt>dest/src</tt> and descendents
  # pointing to +src+ and its descendents:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   Bundler::FileUtils.mkdir('dest1')
  #   Bundler::FileUtils.cp_lr('src1', 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    `-- src1
  #   #        |-- sub0
  #   #        |   |-- src0.txt
  #   #        |   `-- src1.txt
  #   #        `-- sub1
  #   #            |-- src2.txt
  #   #            `-- src3.txt
  #
  # If +src+ is an array of paths to entries and +dest+ is the path to a directory,
  # for each path +filepath+ in +src+, creates a link at <tt>dest/filepath</tt>
  # pointing to that path:
  #
  #   tree('src2')
  #   # => src2
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   Bundler::FileUtils.mkdir('dest2')
  #   Bundler::FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2')
  #   tree('dest2')
  #   # => dest2
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
  #   does not dereference it.
  # - <tt>noop: true</tt> - does not create links.
  # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.cp_lr('src0', 'dest0', noop: true, verbose: true)
  #     Bundler::FileUtils.cp_lr('src1', 'dest1', noop: true, verbose: true)
  #     Bundler::FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2', noop: true, verbose: true)
  #
  #   Output:
  #
  #     cp -lr src0 dest0
  #     cp -lr src1 dest1
  #     cp -lr src2/sub0 src2/sub1 dest2
  #
  # Raises an exception if +dest+ is the path to an existing file or directory
  # and keyword argument <tt>remove_destination: true</tt> is not given.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Creates {symbolic links}[https://en.wikipedia.org/wiki/Symbolic_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to an existing file:
  #
  # - When +dest+ is the path to a non-existent file,
  #   creates a symbolic link at +dest+ pointing to +src+:
  #
  #     Bundler::FileUtils.touch('src0.txt')
  #     File.exist?('dest0.txt')   # => false
  #     Bundler::FileUtils.ln_s('src0.txt', 'dest0.txt')
  #     File.symlink?('dest0.txt') # => true
  #
  # - When +dest+ is the path to an existing file,
  #   creates a symbolic link at +dest+ pointing to +src+
  #   if and only if keyword argument <tt>force: true</tt> is given
  #   (raises an exception otherwise):
  #
  #     Bundler::FileUtils.touch('src1.txt')
  #     Bundler::FileUtils.touch('dest1.txt')
  #     Bundler::FileUtils.ln_s('src1.txt', 'dest1.txt', force: true)
  #     FileTest.symlink?('dest1.txt') # => true
  #
  #     Bundler::FileUtils.ln_s('src1.txt', 'dest1.txt') # Raises Errno::EEXIST.
  #
  # If +dest+ is the path to a directory,
  # creates a symbolic link at <tt>dest/src</tt> pointing to +src+:
  #
  #   Bundler::FileUtils.touch('src2.txt')
  #   Bundler::FileUtils.mkdir('destdir2')
  #   Bundler::FileUtils.ln_s('src2.txt', 'destdir2')
  #   File.symlink?('destdir2/src2.txt') # => true
  #
  # If +src+ is an array of paths to existing files and +dest+ is a directory,
  # for each child +child+ in +src+ creates a symbolic link <tt>dest/child</tt>
  # pointing to +child+:
  #
  #   Bundler::FileUtils.mkdir('srcdir3')
  #   Bundler::FileUtils.touch('srcdir3/src0.txt')
  #   Bundler::FileUtils.touch('srcdir3/src1.txt')
  #   Bundler::FileUtils.mkdir('destdir3')
  #   Bundler::FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3')
  #   File.symlink?('destdir3/src0.txt') # => true
  #   File.symlink?('destdir3/src1.txt') # => true
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - overwrites +dest+ if it exists.
  # - <tt>relative: false</tt> - create links relative to +dest+.
  # - <tt>noop: true</tt> - does not create links.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.ln_s('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.ln_s('src1.txt', 'destdir1', noop: true, verbose: true)
  #     Bundler::FileUtils.ln_s('src2.txt', 'dest2.txt', force: true, noop: true, verbose: true)
  #     Bundler::FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3', noop: true, verbose: true)
  #
  #   Output:
  #
  #     ln -s src0.txt dest0.txt
  #     ln -s src1.txt destdir1
  #     ln -sf src2.txt dest2.txt
  #     ln -s srcdir3/src0.txt srcdir3/src1.txt destdir3
  #
  # Bundler::FileUtils.symlink is an alias for Bundler::FileUtils.ln_s.
  #
  # Related: Bundler::FileUtils.ln_sf.
  #
  def ln_s(src, dest, force: nil, relative: false, target_directory: true, noop: nil, verbose: nil)
    if relative
      return ln_sr(src, dest, force: force, noop: noop, verbose: verbose)
    end
    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

  # Like Bundler::FileUtils.ln_s, but always with keyword argument <tt>force: true</tt> given.
  #
  def ln_sf(src, dest, noop: nil, verbose: nil)
    ln_s src, dest, force: true, noop: noop, verbose: verbose
  end
  module_function :ln_sf

  # Like Bundler::FileUtils.ln_s, but create links relative to +dest+.
  #
  def ln_sr(src, dest, target_directory: true, force: nil, noop: nil, verbose: nil)
    options = "#{force ? 'f' : ''}#{target_directory ? '' : 'T'}"
    dest = File.path(dest)
    srcs = Array(src)
    link = proc do |s, target_dir_p = true|
      s = File.path(s)
      if target_dir_p
        d = File.join(destdirs = dest, File.basename(s))
      else
        destdirs = File.dirname(d = dest)
      end
      destdirs = fu_split_path(File.realpath(destdirs))
      if fu_starting_path?(s)
        srcdirs = fu_split_path((File.realdirpath(s) rescue File.expand_path(s)))
        base = fu_relative_components_from(srcdirs, destdirs)
        s = File.join(*base)
      else
        srcdirs = fu_clean_components(*fu_split_path(s))
        base = fu_relative_components_from(fu_split_path(Dir.pwd), destdirs)
        while srcdirs.first&. == ".." and base.last&.!=("..") and !fu_starting_path?(base.last)
          srcdirs.shift
          base.pop
        end
        s = File.join(*base, *srcdirs)
      end
      fu_output_message "ln -s#{options} #{s} #{d}" if verbose
      next if noop
      remove_file d, true if force
      File.symlink s, d
    end
    case srcs.size
    when 0
    when 1
      link[srcs[0], target_directory && File.directory?(dest)]
    else
      srcs.each(&link)
    end
  end
  module_function :ln_sr

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link]; returns +nil+.
  #
  # Arguments +src+ and +dest+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file and +dest+ does not exist,
  # creates a hard link at +dest+ pointing to +src+:
  #
  #   Bundler::FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   Bundler::FileUtils.link_entry('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # recursively creates hard links at +dest+ pointing to paths in +src+:
  #
  #   Bundler::FileUtils.mkdir_p(['src1/dir0', 'src1/dir1'])
  #   src_file_paths = [
  #     'src1/dir0/t0.txt',
  #     'src1/dir0/t1.txt',
  #     'src1/dir1/t2.txt',
  #     'src1/dir1/t3.txt',
  #     ]
  #   Bundler::FileUtils.touch(src_file_paths)
  #   File.directory?('dest1')        # => true
  #   Bundler::FileUtils.link_entry('src1', 'dest1')
  #   File.file?('dest1/dir0/t0.txt') # => true
  #   File.file?('dest1/dir0/t1.txt') # => true
  #   File.file?('dest1/dir1/t2.txt') # => true
  #   File.file?('dest1/dir1/t3.txt') # => true
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: true</tt> - dereferences +src+ if it is a symbolic link.
  # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
  #
  # Raises an exception if +dest+ is the path to an existing file or directory
  # and keyword argument <tt>remove_destination: true</tt> is not given.
  #
  # Related: Bundler::FileUtils.ln (has different options).
  #
  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 files.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file and +dest+ is not the path to a directory,
  # copies +src+ to +dest+:
  #
  #   Bundler::FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   Bundler::FileUtils.cp('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a file and +dest+ is the path to a directory,
  # copies +src+ to <tt>dest/src</tt>:
  #
  #   Bundler::FileUtils.touch('src1.txt')
  #   Bundler::FileUtils.mkdir('dest1')
  #   Bundler::FileUtils.cp('src1.txt', 'dest1')
  #   File.file?('dest1/src1.txt') # => true
  #
  # If +src+ is an array of paths to files and +dest+ is the path to a directory,
  # copies from each +src+ to +dest+:
  #
  #   src_file_paths = ['src2.txt', 'src2.dat']
  #   Bundler::FileUtils.touch(src_file_paths)
  #   Bundler::FileUtils.mkdir('dest2')
  #   Bundler::FileUtils.cp(src_file_paths, 'dest2')
  #   File.file?('dest2/src2.txt') # => true
  #   File.file?('dest2/src2.dat') # => true
  #
  # Keyword arguments:
  #
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>noop: true</tt> - does not copy files.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.cp('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.cp('src1.txt', 'dest1', noop: true, verbose: true)
  #     Bundler::FileUtils.cp(src_file_paths, 'dest2', noop: true, verbose: true)
  #
  #   Output:
  #
  #     cp src0.txt dest0.txt
  #     cp src1.txt dest1
  #     cp src2.txt src2.dat dest2
  #
  # Raises an exception if +src+ is a directory.
  #
  # Bundler::FileUtils.copy is an alias for Bundler::FileUtils.cp.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Recursively copies files.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # The mode, owner, and group are retained in the copy;
  # to change those, use Bundler::FileUtils.install instead.
  #
  # If +src+ is the path to a file and +dest+ is not the path to a directory,
  # copies +src+ to +dest+:
  #
  #   Bundler::FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   Bundler::FileUtils.cp_r('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a file and +dest+ is the path to a directory,
  # copies +src+ to <tt>dest/src</tt>:
  #
  #   Bundler::FileUtils.touch('src1.txt')
  #   Bundler::FileUtils.mkdir('dest1')
  #   Bundler::FileUtils.cp_r('src1.txt', 'dest1')
  #   File.file?('dest1/src1.txt') # => true
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # recursively copies +src+ to +dest+:
  #
  #   tree('src2')
  #   # => src2
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #    |-- src2.txt
  #   #    `-- src3.txt
  #   Bundler::FileUtils.exist?('dest2') # => false
  #   Bundler::FileUtils.cp_r('src2', 'dest2')
  #   tree('dest2')
  #   # => dest2
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #    |-- src2.txt
  #   #    `-- src3.txt
  #
  # If +src+ and +dest+ are paths to directories,
  # recursively copies +src+ to <tt>dest/src</tt>:
  #
  #   tree('src3')
  #   # => src3
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #    |-- src2.txt
  #   #    `-- src3.txt
  #   Bundler::FileUtils.mkdir('dest3')
  #   Bundler::FileUtils.cp_r('src3', 'dest3')
  #   tree('dest3')
  #   # => dest3
  #   #    `-- src3
  #   #      |-- dir0
  #   #      |   |-- src0.txt
  #   #      |   `-- src1.txt
  #   #      `-- dir1
  #   #          |-- src2.txt
  #   #          `-- src3.txt
  #
  # If +src+ is an array of paths and +dest+ is a directory,
  # recursively copies from each path in +src+ to +dest+;
  # the paths in +src+ may point to files and/or directories.
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
  #   does not dereference it.
  # - <tt>noop: true</tt> - does not copy files.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.cp_r('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.cp_r('src1.txt', 'dest1', noop: true, verbose: true)
  #     Bundler::FileUtils.cp_r('src2', 'dest2', noop: true, verbose: true)
  #     Bundler::FileUtils.cp_r('src3', 'dest3', noop: true, verbose: true)
  #
  #   Output:
  #
  #     cp -r src0.txt dest0.txt
  #     cp -r src1.txt dest1
  #     cp -r src2 dest2
  #     cp -r src3 dest3
  #
  # Raises an exception of +src+ is the path to a directory
  # and +dest+ is the path to a file.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Recursively copies files from +src+ to +dest+.
  #
  # Arguments +src+ and +dest+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file, copies +src+ to +dest+:
  #
  #   Bundler::FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   Bundler::FileUtils.copy_entry('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is a directory, recursively copies +src+ to +dest+:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   Bundler::FileUtils.copy_entry('src1', 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # The recursive copying preserves file types for regular files,
  # directories, and symbolic links;
  # other file types (FIFO streams, device files, etc.) are not supported.
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: true</tt> - if +src+ is a symbolic link,
  #   follows the link.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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 from +src+ to +dest+, which should not be directories.
  #
  # Arguments +src+ and +dest+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Examples:
  #
  #   Bundler::FileUtils.touch('src0.txt')
  #   Bundler::FileUtils.copy_file('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt') # => true
  #
  # Keyword arguments:
  #
  # - <tt>dereference: false</tt> - if +src+ is a symbolic link,
  #   does not follow the link.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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 \IO stream +src+ to \IO stream +dest+ via
  # {IO.copy_stream}[rdoc-ref:IO.copy_stream].
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  def copy_stream(src, dest)
    IO.copy_stream(src, dest)
  end
  module_function :copy_stream

  # Moves entries.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ and +dest+ are on different file systems,
  # first copies, then removes +src+.
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # If +src+ is the path to a single file or directory and +dest+ does not exist,
  # moves +src+ to +dest+:
  #
  #   tree('src0')
  #   # => src0
  #   #    |-- src0.txt
  #   #    `-- src1.txt
  #   File.exist?('dest0') # => false
  #   Bundler::FileUtils.mv('src0', 'dest0')
  #   File.exist?('src0')  # => false
  #   tree('dest0')
  #   # => dest0
  #   #    |-- src0.txt
  #   #    `-- src1.txt
  #
  # If +src+ is an array of paths to files and directories
  # and +dest+ is the path to a directory,
  # copies from each path in the array to +dest+:
  #
  #   File.file?('src1.txt') # => true
  #   tree('src1')
  #   # => src1
  #   #    |-- src.dat
  #   #    `-- src.txt
  #   Dir.empty?('dest1')    # => true
  #   Bundler::FileUtils.mv(['src1.txt', 'src1'], 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    |-- src1
  #   #    |   |-- src.dat
  #   #    |   `-- src.txt
  #   #    `-- src1.txt
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - if the move includes removing +src+
  #   (that is, if +src+ and +dest+ are on different file systems),
  #   ignores raised exceptions of StandardError and its descendants.
  # - <tt>noop: true</tt> - does not move files.
  # - <tt>secure: true</tt> - removes +src+ securely;
  #   see details at Bundler::FileUtils.remove_entry_secure.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.mv('src0', 'dest0', noop: true, verbose: true)
  #     Bundler::FileUtils.mv(['src1.txt', 'src1'], 'dest1', noop: true, verbose: true)
  #
  #   Output:
  #
  #     mv src0 dest0
  #     mv src1.txt src1 dest1
  #
  # Bundler::FileUtils.move is an alias for Bundler::FileUtils.mv.
  #
  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

  # Removes entries at the paths in the given +list+
  # (a single path or an array of paths)
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, removes files at the paths given in +list+:
  #
  #   Bundler::FileUtils.touch(['src0.txt', 'src0.dat'])
  #   Bundler::FileUtils.rm(['src0.dat', 'src0.txt']) # => ["src0.dat", "src0.txt"]
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - ignores raised exceptions of StandardError
  #   and its descendants.
  # - <tt>noop: true</tt> - does not remove files; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.rm(['src0.dat', 'src0.txt'], noop: true, verbose: true)
  #
  #   Output:
  #
  #     rm src0.dat src0.txt
  #
  # Bundler::FileUtils.remove is an alias for Bundler::FileUtils.rm.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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:
  #
  #   Bundler::FileUtils.rm(list, force: true, **kwargs)
  #
  # Argument +list+ (a single path or an array of paths)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # See Bundler::FileUtils.rm for keyword arguments.
  #
  # Bundler::FileUtils.safe_unlink is an alias for Bundler::FileUtils.rm_f.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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

  # Removes entries at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # For each file path, removes the file at that path:
  #
  #   Bundler::FileUtils.touch(['src0.txt', 'src0.dat'])
  #   Bundler::FileUtils.rm_r(['src0.dat', 'src0.txt'])
  #   File.exist?('src0.txt') # => false
  #   File.exist?('src0.dat') # => false
  #
  # For each directory path, recursively removes files and directories:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   Bundler::FileUtils.rm_r('src1')
  #   File.exist?('src1') # => false
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - ignores raised exceptions of StandardError
  #   and its descendants.
  # - <tt>noop: true</tt> - does not remove entries; returns +nil+.
  # - <tt>secure: true</tt> - removes +src+ securely;
  #   see details at Bundler::FileUtils.remove_entry_secure.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.rm_r(['src0.dat', 'src0.txt'], noop: true, verbose: true)
  #     Bundler::FileUtils.rm_r('src1', noop: true, verbose: true)
  #
  #   Output:
  #
  #     rm -r src0.dat src0.txt
  #     rm -r src1
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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:
  #
  #   Bundler::FileUtils.rm_r(list, force: true, **kwargs)
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # See Bundler::FileUtils.rm_r for keyword arguments.
  #
  # Bundler::FileUtils.rmtree is an alias for Bundler::FileUtils.rm_rf.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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

  # Securely removes the entry given by +path+,
  # which should be the entry for a regular file, a symbolic link,
  # or a directory.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Avoids a local vulnerability that can exist in certain circumstances;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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, Bundler::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?

  # Removes the entry given by +path+,
  # which should be the entry for a regular file, a symbolic link,
  # or a directory.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: Bundler::FileUtils.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 the file entry given by +path+,
  # which should be the entry for a regular file or a symbolic link.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  def remove_file(path, force = false)
    Entry_.new(path).remove_file
  rescue
    raise unless force
  end
  module_function :remove_file

  # Recursively removes the directory entry given by +path+,
  # which should be the entry for a regular file, a symbolic link,
  # or a directory.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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 files +a+ and +b+ are identical,
  # +false+ otherwise.
  #
  # Arguments +a+ and +b+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Bundler::FileUtils.identical? and Bundler::FileUtils.cmp are aliases for Bundler::FileUtils.compare_file.
  #
  # Related: Bundler::FileUtils.compare_stream.
  #
  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 streams +a+ and +b+ are identical,
  # +false+ otherwise.
  #
  # Arguments +a+ and +b+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Related: Bundler::FileUtils.compare_file.
  #
  def compare_stream(a, b)
    bsize = fu_stream_blksize(a, b)

    sa = String.new(capacity: bsize)
    sb = String.new(capacity: bsize)

    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

  # Copies a file entry.
  # See {install(1)}[https://man7.org/linux/man-pages/man1/install.1.html].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments];
  #
  # If the entry at +dest+ does not exist, copies from +src+ to +dest+:
  #
  #   File.read('src0.txt')    # => "aaa\n"
  #   File.exist?('dest0.txt') # => false
  #   Bundler::FileUtils.install('src0.txt', 'dest0.txt')
  #   File.read('dest0.txt')   # => "aaa\n"
  #
  # If +dest+ is a file entry, copies from +src+ to +dest+, overwriting:
  #
  #   File.read('src1.txt')  # => "aaa\n"
  #   File.read('dest1.txt') # => "bbb\n"
  #   Bundler::FileUtils.install('src1.txt', 'dest1.txt')
  #   File.read('dest1.txt') # => "aaa\n"
  #
  # If +dest+ is a directory entry, copies from +src+ to <tt>dest/src</tt>,
  # overwriting if necessary:
  #
  #   File.read('src2.txt')       # => "aaa\n"
  #   File.read('dest2/src2.txt') # => "bbb\n"
  #   Bundler::FileUtils.install('src2.txt', 'dest2')
  #   File.read('dest2/src2.txt') # => "aaa\n"
  #
  # If +src+ is an array of paths and +dest+ points to a directory,
  # copies each path +path+ in +src+ to <tt>dest/path</tt>:
  #
  #   File.file?('src3.txt') # => true
  #   File.file?('src3.dat') # => true
  #   Bundler::FileUtils.mkdir('dest3')
  #   Bundler::FileUtils.install(['src3.txt', 'src3.dat'], 'dest3')
  #   File.file?('dest3/src3.txt') # => true
  #   File.file?('dest3/src3.dat') # => true
  #
  # Keyword arguments:
  #
  # - <tt>group: <i>group</i></tt> - changes the group if not +nil+,
  #   using {File.chown}[rdoc-ref:File.chown].
  # - <tt>mode: <i>permissions</i></tt> - changes the permissions.
  #   using {File.chmod}[rdoc-ref:File.chmod].
  # - <tt>noop: true</tt> - does not copy entries; returns +nil+.
  # - <tt>owner: <i>owner</i></tt> - changes the owner if not +nil+,
  #   using {File.chown}[rdoc-ref:File.chown].
  # - <tt>preserve: true</tt> - preserve timestamps
  #   using {File.utime}[rdoc-ref:File.utime].
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.install('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.install('src1.txt', 'dest1.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.install('src2.txt', 'dest2', noop: true, verbose: true)
  #
  #   Output:
  #
  #     install -c src0.txt dest0.txt
  #     install -c src1.txt dest1.txt
  #     install -c src2.txt dest2
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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 permissions on the entries at the paths given in +list+
  # (a single path or an array of paths)
  # to the permissions given by +mode+;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
  #
  # - Modifies each entry that is a regular file using
  #   {File.chmod}[rdoc-ref:File.chmod].
  # - Modifies each entry that is a symbolic link using
  #   {File.lchmod}[rdoc-ref:File.lchmod].
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Argument +mode+ may be either an integer or a string:
  #
  # - \Integer +mode+: represents the permission bits to be set:
  #
  #     Bundler::FileUtils.chmod(0755, 'src0.txt')
  #     Bundler::FileUtils.chmod(0644, ['src0.txt', 'src0.dat'])
  #
  # - \String +mode+: represents the permissions to be set:
  #
  #   The string is of the form <tt>[targets][[operator][perms[,perms]]</tt>, where:
  #
  #   - +targets+ may be any combination of these letters:
  #
  #     - <tt>'u'</tt>: permissions apply to the file's owner.
  #     - <tt>'g'</tt>: permissions apply to users in the file's group.
  #     - <tt>'o'</tt>: permissions apply to other users not in the file's group.
  #     - <tt>'a'</tt> (the default): permissions apply to all users.
  #
  #   - +operator+ may be one of these letters:
  #
  #     - <tt>'+'</tt>: adds permissions.
  #     - <tt>'-'</tt>: removes permissions.
  #     - <tt>'='</tt>: sets (replaces) permissions.
  #
  #   - +perms+ (may be repeated, with separating commas)
  #     may be any combination of these letters:
  #
  #     - <tt>'r'</tt>: Read.
  #     - <tt>'w'</tt>: Write.
  #     - <tt>'x'</tt>: Execute (search, for a directory).
  #     - <tt>'X'</tt>: Search (for a directories only;
  #       must be used with <tt>'+'</tt>)
  #     - <tt>'s'</tt>: Uid or gid.
  #     - <tt>'t'</tt>: Sticky bit.
  #
  #   Examples:
  #
  #     Bundler::FileUtils.chmod('u=wrx,go=rx', 'src1.txt')
  #     Bundler::FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby')
  #
  # Keyword arguments:
  #
  # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.chmod(0755, 'src0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.chmod(0644, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     Bundler::FileUtils.chmod('u=wrx,go=rx', 'src1.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby', noop: true, verbose: true)
  #
  #   Output:
  #
  #     chmod 755 src0.txt
  #     chmod 644 src0.txt src0.dat
  #     chmod u=wrx,go=rx src1.txt
  #     chmod u=wrx,go=rx /usr/bin/ruby
  #
  # Related: Bundler::FileUtils.chmod_R.
  #
  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

  # Like Bundler::FileUtils.chmod, but changes permissions recursively.
  #
  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 the owner and group on the entries at the paths given in +list+
  # (a single path or an array of paths)
  # to the given +user+ and +group+;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
  #
  # - Modifies each entry that is a regular file using
  #   {File.chown}[rdoc-ref:File.chown].
  # - Modifies each entry that is a symbolic link using
  #   {File.lchown}[rdoc-ref:File.lchown].
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # User and group:
  #
  # - Argument +user+ may be a user name or a user id;
  #   if +nil+ or +-1+, the user is not changed.
  # - Argument +group+ may be a group name or a group id;
  #   if +nil+ or +-1+, the group is not changed.
  # - The user must be a member of the group.
  #
  # Examples:
  #
  #   # One path.
  #   # User and group as string names.
  #   File.stat('src0.txt').uid # => 1004
  #   File.stat('src0.txt').gid # => 1004
  #   Bundler::FileUtils.chown('user2', 'group1', 'src0.txt')
  #   File.stat('src0.txt').uid # => 1006
  #   File.stat('src0.txt').gid # => 1005
  #
  #   # User and group as uid and gid.
  #   Bundler::FileUtils.chown(1004, 1004, 'src0.txt')
  #   File.stat('src0.txt').uid # => 1004
  #   File.stat('src0.txt').gid # => 1004
  #
  #   # Array of paths.
  #   Bundler::FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'])
  #
  #   # Directory (not recursive).
  #   Bundler::FileUtils.chown('user2', 'group1', '.')
  #
  # Keyword arguments:
  #
  # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.chown('user2', 'group1', 'src0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.chown(1004, 1004, 'src0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     Bundler::FileUtils.chown('user2', 'group1', path, noop: true, verbose: true)
  #     Bundler::FileUtils.chown('user2', 'group1', '.', noop: true, verbose: true)
  #
  #   Output:
  #
  #     chown user2:group1 src0.txt
  #     chown 1004:1004 src0.txt
  #     chown 1006:1005 src0.txt src0.dat
  #     chown user2:group1 src0.txt
  #     chown user2:group1 .
  #
  # Related: Bundler::FileUtils.chown_R.
  #
  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

  # Like Bundler::FileUtils.chown, but changes owner and group recursively.
  #
  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 times (mtime) and access times (atime)
  # of the entries given by the paths in +list+
  # (a single path or an array of paths);
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # By default, creates an empty file for any path to a non-existent entry;
  # use keyword argument +nocreate+ to raise an exception instead.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Examples:
  #
  #   # Single path.
  #   f = File.new('src0.txt') # Existing file.
  #   f.atime # => 2022-06-10 11:11:21.200277 -0700
  #   f.mtime # => 2022-06-10 11:11:21.200277 -0700
  #   Bundler::FileUtils.touch('src0.txt')
  #   f = File.new('src0.txt')
  #   f.atime # => 2022-06-11 08:28:09.8185343 -0700
  #   f.mtime # => 2022-06-11 08:28:09.8185343 -0700
  #
  #   # Array of paths.
  #   Bundler::FileUtils.touch(['src0.txt', 'src0.dat'])
  #
  # Keyword arguments:
  #
  # - <tt>mtime: <i>time</i></tt> - sets the entry's mtime to the given time,
  #   instead of the current time.
  # - <tt>nocreate: true</tt> - raises an exception if the entry does not exist.
  # - <tt>noop: true</tt> - does not touch entries; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     Bundler::FileUtils.touch('src0.txt', noop: true, verbose: true)
  #     Bundler::FileUtils.touch(['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     Bundler::FileUtils.touch(path, noop: true, verbose: true)
  #
  #   Output:
  #
  #     touch src0.txt
  #     touch src0.txt src0.dat
  #     touch src0.txt
  #
  # Related: Bundler::FileUtils.uptodate?.
  #
  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 = Dir.children(path, **opts)

      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?
        begin
          children = entries()
        rescue Errno::EACCES
          # Failed to get the list of children.
          # Assuming there is no children, try to process the parent directory.
          yield self
          return
        end

        children.each do |ent|
          ent.postorder_traverse do |e|
            yield e
          end
        end
      end
      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, target_directory = true)   #:nodoc:
    if tmp = Array.try_convert(src)
      tmp.each do |s|
        s = File.path(s)
        yield s, (target_directory ? File.join(dest, File.basename(s)) : dest)
      end
    else
      src = File.path(src)
      if target_directory and 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

  def fu_split_path(path)
    path = File.path(path)
    list = []
    until (parent, base = File.split(path); parent == path or parent == ".")
      list << base
      path = parent
    end
    list << path
    list.reverse!
  end
  private_module_function :fu_split_path

  def fu_relative_components_from(target, base) #:nodoc:
    i = 0
    while target[i]&.== base[i]
      i += 1
    end
    Array.new(base.size-i, '..').concat(target[i..-1])
  end
  private_module_function :fu_relative_components_from

  def fu_clean_components(*comp)
    comp.shift while comp.first == "."
    return comp if comp.empty?
    clean = [comp.shift]
    path = File.join(*clean, "") # ending with File::SEPARATOR
    while c = comp.shift
      if c == ".." and clean.last != ".." and !(fu_have_symlink? && File.symlink?(path))
        clean.pop
        path.chomp!(%r((?<=\A|/)[^/]+/\z), "")
      else
        clean << c
        path << c << "/"
      end
    end
    clean
  end
  private_module_function :fu_clean_components

  if fu_windows?
    def fu_starting_path?(path)
      path&.start_with?(%r(\w:|/))
    end
  else
    def fu_starting_path?(path)
      path&.start_with?("/")
    end
  end
  private_module_function :fu_starting_path?

  # This hash table holds command options.
  OPT_TABLE = {}    #:nodoc: internal use only
  (private_instance_methods & methods(false)).inject(OPT_TABLEgems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool.rb000064400000006627150403133750024003 0ustar00m.to_s }
  end

  # Returns +true+ if method +mid+ accepts the given option +opt+, +false+ otherwise;
  # the arguments may be strings or symbols:
  #
  #   Bundler::FileUtils.have_option?(:chmod, :noop) # => true
  #   Bundler::FileUtils.have_option?('chmod', 'secure') # => 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 the string keyword name for method +mid+;
  # the argument may be a string or a symbol:
  #
  #   Bundler::FileUtils.options_of(:rm) # => ["force", "noop", "verbose"]
  #   Bundler::FileUtils.options_of('mv') # => ["force", "noop", "verbose", "secure"]
  #
  def self.options_of(mid)
    OPT_TABLE[mid.to_s].map {|sym| sym.to_s }
  end

  # Returns an array of the string method names of the methods
  # that accept the given keyword option +opt+;
  # the argument must be a symbol:
  #
  #   Bundler::FileUtils.collect_method(:preserve) # => ["cp", "copy", "cp_r", "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
    ::Bundler::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 Bundler::FileUtils module, but it outputs messages
  # before acting.  This equates to passing the <tt>:verbose</tt> flag to
  # methods in Bundler::FileUtils.
  #
  module Verbose
    include Bundler::FileUtils
    names = ::Bundler::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(*::Bundler::FileUtils::METHODS)
    end
  end

  #
  # This module has all methods of Bundler::FileUtils module, but never changes
  # files/directories.  This equates to passing the <tt>:noop</tt> flag
  # to methods in Bundler::FileUtils.
  #
  module NoWrite
    include Bundler::FileUtils
    include LowMethods
    names = ::Bundler::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(*::Bundler::FileUtils::METHODS)
    end
  end

  #
  # This module has all methods of Bundler::FileUtils module, but never changes
  # files/directories, with printing message before acting.
  # This equates to passing the <tt>:noop</tt> and <tt>:verbose</tt> flag
  # to methods in Bundler::FileUtils.
  #
  module DryRun
    include Bundler::FileUtils
    include LowMethods
    names = ::Bundler::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(*::Bundler::Filgems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb000064400000000066150403133750025457 0ustar00require "timeout"
require_relative "connection_pool/vegems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb000064400000002467150403133750025461 0ustar00e - number of connections to pool, defaults to 5
# - :timeout - amount of time to wait for a connection if none currently available, defaults to 5 seconds
#
class Bundler::ConnectionPool
  DEFAULTS = {size: 5, timeout: 5}

  def self.wrap(options, &block)
    Wrapper.new(options, &block)
  end

  def initialize(options = {}, &block)
    raise ArgumentError, "Connection pool requires a block" unless block

    options = DEFAULTS.merge(options)

    @size = Integer(options.fetch(:size))
    @timeout = options.fetch(:timeout)

    @available = TimedStack.new(@size, &block)
    @key = :"pool-#{@available.object_id}"
    @key_count = :"pool-#{@available.object_id}-count"
  end

  def with(options = {})
    Thread.handle_interrupt(Exception => :never) do
      conn = checkout(options)
      begin
        Thread.handle_interrupt(Exception => :immediate) do
          yield conn
        end
      ensure
        checkin
      end
    end
  end
  alias_method :then, :with

  def checkout(options = {})
    if ::Thread.current[@key]
      ::Thread.current[@key_count] += 1
      ::Thread.current[@key]
    else
      ::Thread.current[@key_count] = 1
      ::Thread.current[@key] = @available.pop(options[:timeout] || @timeout)
    end
  end

  def checkin
    if ::Thread.current[@key]
      if ::Thread.current[@key_count] == 1
   gems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb000064400000010573150403133750026265 0ustar00e pool. Subsequent checkouts will create new connections as
  # needed.

  def reload(&block)
    @available.shutdown(reload: true, &block)
  end

  # Size of this connection pool
  attr_reader :size

  # Number of pool entries available for checkout at this instant.
  def available
    @available.length
  end
end

require_relative "connection_pool/timed_stack"
require_relative "connection_pool/wrapper"
gems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb000064400000000066150403133750025457 0ustar00class Bundler::ConnectionPool
  VERSION = "2.3.0"
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb000064400000002467150403133750025461 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool.rb000064400000006627150403133750024003 0ustar00d

    def respond_to?(id, *args)
      METHODS.include?(id) || with { |c| c.respond_to?(id, *args) }
    end

    # rubocop:disable Style/MissingRespondToMissing
    if ::RUBY_VERSION >= "3.0.0"
      def method_missing(name, *args, **kwargs, &block)
        with do |connection|
          connection.send(name, *args, **kwargs, &block)
        end
      end
    elsif ::RUBY_VERSION >= "2.7.0"
      ruby2_keywords def method_missing(name, *args, &block)
        with do |connection|
          connection.send(name, *args, &block)
        end
      end
    else
      def method_missing(name, *args, &block)
        with do |connection|
          connection.send(name, *args, &block)
        end
      end
    end
    # rubocop:enable Style/MethodMissingSuper
    # rubocop:enable Style/MissingRespondToMissing
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb000064400000010573150403133750026265 0ustar00##
# The TimedStack manages a pool of homogeneous connections (or any resource
# you wish to manage).  Connections are created lazily up to a given maximum
# number.

# Examples:
#
#    ts = TimedStack.new(1) { MyConnection.new }
#
#    # fetch a connection
#    conn = ts.pop
#
#    # return a connection
#    ts.push conn
#
#    conn = ts.pop
#    ts.pop timeout: 5
#    #=> ragems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri.rb000064400000006615150403133760017017 0ustar00block
        @shutdown_block.call(obj)
      else
        store_connection obj, options
      end

      @resource.broadcast
    end
  end
  alias_method :<<, :push

  ##
  # Retrieves a connection from the stack.  If a connection is available it is
  # immediately returned.  If no connection is available within the given
  # timeout a Bundler::ConnectionPool::TimeoutError is raised.
  #
  # +:timeout+ is the only checked entry in +options+ and is preferred over
  # the +timeout+ argument (which will be removed in a future release).  Other
  # options may be used by subclasses that extend TimedStack.

  def pop(timeout = 0.5, options = {})
    options, timeout = timeout, 0.5 if Hash === timeout
    timeout = options.fetch :timeout, timeout

    deadline = current_time + timeout
    @mutex.synchronize do
      loop do
        raise Bundler::ConnectionPool::PoolShuttingDownError if @shutdown_block
        rgems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb000064400000000066150403133750025457 0ustar00eload+ is +true+.

  def shutdown(reload: false, &blocgems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb000064400000002467150403133750025461 0ustar00que.pop
  end

  ##
  # This is an extension point for TimedStack and is called with a mutex.
  #
  # This method must shut down all connections on the stack.

  def shutdown_connections(options = nil)
    while connection_stored?(options)
      conn = fetch_connection(options)
      @shutdown_block.call(conn)
    end
    @created = 0
  end

  ##
  # This is an extension point for TimedStack and is called with a mutex.
  #
  # This method must return +obj+ to the stack.

  def store_connection(obj, options = nil)
    @que.push obj
  end

  ##
  # This is an extension point for TimedStack and is called with a mutex.
  #
  # This method must create a connection if and only if the total number of
  # connections allowed has not been met.

  def try_create(options = nil)
    unless @created == @max
      object = @create_block.call
      @created += 1
      object
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/version.rb000064400000000237150403133760020476 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb000064400000010573150403133750026265 0gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/https.rb000064400000001122150403133770020146 0ustar00ndler::URI::RSYNC
#
#   Bundler::URI.scheme_list
#   #=> {"FILE"=>Bundler::URI::File, "FTP"=>Bundler::URI::FTP, "HTTP"=>Bundler::URI::HTTP,
#   #    "HTTPS"=>Bundler::URI::HTTPS, "LDAP"=>Bundler::URI::LDAP, "LDAPS"=>Bundler::URI::LDAPS,
#   #    "MAILTO"=>Bundler::URI::MailTo, "RSYNC"=>Bundler::URI::RSYNC}
#
#   uri = Bundler::URI("rsync://rsync.foo.com")
#   #=> #<Bundler::URI::RSYNC 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]
# - gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb000064400000042662150403133770021474 0ustar00/common.rb)
#   - Bundler::URI::InvalidURIError - (in uri/common.rb)
#   - Bundler::URI::InvalidComponentError - (in uri/common.rb)
#   - Bundler::URI::BadURIError - (in uri/common.rb)
#
# == Copyright Info
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# Documentation::
#   Akira Yamada <akira@ruby-lang.org>
#   Dmitry V. Sabanin <sdmitry@lrn.ru>
#   Vincent Batts <vbatts@hashbangbash.com>
# License::
#  Copyright (c) 2001 akira yamada <akira@ruby-lang.org>
#  You can redistribute it and/or modify it under the same term as Ruby.
#

module Bundler::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'
require_relative 'uri/ws'
require_relative 'uri/wss'
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/version.rb000064400000000237150403133760020476 0ustar00module Bundler::URI
  # :stopdoc:
  VERSION_CODE = '001203'.freeze
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
  # :startdoc:
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/https.rb000064400000001122150403133770020146 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri.rb000064400000006615150403133760017017 0ustar00er::URI::HTTPS
    DEFAULT_PORT = 443
  end

  register_scheme 'HTTPS', HTTPS
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb000064400000042662150403133770021474 0ustar00# frozen_string_literal: false
#--
# = uri/common.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License::
#   You can redistribute it and/or modify it under the same term as Ruby.
#
# See Bundler::URI for general documentation
#

module Bundler::URI
  #
  # Includes Bundler::URI::REGEXP::PATTERN
  #
  module RFC2396_REGEXP
    #
    # Patterns used to parse Bundler::URI's
    #
    module PATTERN
      # :stopdoc:

      # RFC 2396 (Bundler::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 Bundler::URI's.
  #
  # It contains a Hash set of patterns and Regexp's that match and validate.
  #
  class RFC2396_Parser
    include RFC2396_REGEXP

    #
    # == Synopsis
    #
    #   Bundler::URI::Parser.new([opts])
    #
    # == Args
    #
    # The constructor accepts a hash as options for parser.
    # Keys of options are pattern names of Bundler::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 (Bundler::URgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/version.rb000064400000000237150403133760020476 0ustar00/ABCD"
    #   u1 = p.parse(s) #=> #<Bundler::URI::HTTP http://example.com/ABCD>
    #   u2 = Bundler::URI.parse(s) #=> #<Bundler::URI::HTTP http://example.comgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/https.rb000064400000001122150403133770020146 0ustar00"#" 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 Bundler::URI(absolute but no scheme): #{uri}"
        end
        if !opaque && (!path && (!host && !registry))
          raise Invagems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb000064400000042662150403133770021474 0ustar00?): #{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 Bundler::URI scheme object
    # (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or Bundler::URI::Generic.
    #
    # == Usage
    #
    #   p = Bundler::URI::Parser.new
    #   p.parse("ldap://ldap.example.com/dc=example?user=john")
    #   #=> #<Bundler::URI::LDAP ldap://ldap.example.com/dc=example?user=john>
    #
    def parse(uri)
      Bundler::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 Bundler::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)
    if @@to_s.respond_to?(:bind_call)
      def inspect
        @@to_s.bind_call(self)
      end
    else
      def inspect
        @@to_s.bind(self).call
      end
    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 (Bundler::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      = "/"  gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ldaps.rb000064400000001043150403134000020074 0ustar00heme ":" ( 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})?"

      # Bundler::URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
      ret[:URI_REF] = "(?:#{abs_uri}|#{rel_uri})?(?:##{fragment})?"

      ret[:X_ABS_URI] = "
        (#{scheme}):                           (?# 1: scheme)
        (?:
           (#{opaque_gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb000064400000013712150403134000021457 0ustar00ent)
        )?
        (#{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 Bundler::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 Bundler::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 Bundler::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?(Bundler::URI::Generic)
        uri
      elsif uri = String.try_convert(uri)
        parse(uri)
      else
        raise ArgumentError,
          "bad argument (expected Bundler::URI object or Bundler::URI string)"
      end
    end

  end # class Parser
end # module Bundler::URI
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ldaps.rb000064400000001043150403134000020074 0ustar00# frozen_string_literal: false
# = uri/ldap.rb
#
# License:: You can redistribute it and/or modify it under the same term as Ruby.
#
# See Bundler::URI for general documentation
#

require_relative 'ldap'

module Bundler::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 Bundler::URI::LDAP.
  class LDAPS < LDAP
    # A Default port of 636 for Bundler::URI::LDAPS
    DEFAULT_PORT = 636
  end

  register_scheme 'LDAPS', LDAPS
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb000064400000013712150403134000021457 0ustar00# frozen_string_literal: false
module Bundler::URI
  class RFC3986_Parser # :nodoc:
    # Bundler::URI defined in RFC3986
    RFC3986_URI = /\A(?<Bundler::URI>(?<scheme>[A-Za-z][+\-.0-9A-Za-z]*+):(?<hier-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+))(?::(?<port>\d*+))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g<segment>)*+)?)|(?<path-rootless>\g<segment-nz>(?:\/\g<segment>)*+)|(?<path-empty>))(?:\?(?<query>[^#]*+))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
    RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])++))?(?::(?<porgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/mailto.rb000064400000020052150403134000020257 0ustar00  raise InvalidURIError, "bad Bundler::URI(is not Bundler::URI?): #{uri.inspect}"
      end
      uri.ascii_only? or
        raise InvalidURIError, "Bundler::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, # opgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ldaps.rb000064400000001043150403134000020074 0ustar00r::URI?): #{uri.inspect}"
      end
    end

    def parse(uri) # :nodoc:
      Bundler::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)
    if @@to_s.respond_to?(:bind_call)
      def inspect
        @@to_s.bind_call(self)
      end
    else
      def inspect
        @@to_s.bind(self).call
      end
    end

    private

    def default_regexp # :nodoc:
      {
        SCHEME: /\A[A-Za-z][A-Za-z0-9+\-.gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb000064400000013712150403134000021457 0ustar00\/?])*\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?(Bundler::URI::Generic)
        uri
      elsif uri = String.try_convert(uri)
        parse(uri)
      else
        raise ArgumentError,
          "bad argument (expected Bundler::URI object or Bundler::URI string)"
      end
    end

  end # class Parser
end # module Bundler::URI
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/mailto.rb000064400000020052150403134000020257 0ustar00# frozen_string_literal: false
# = uri/mailto.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
#
# See Bundler::URI for general documentation
#

require_relative 'generic'

module Bundler::URI

  #
  # RFC6068, the mailto URL scheme.
  #
  class MailTo < Generic
    include RFC2396_REGEXP

    # A Default port of nil for Bundler::URI::MailTo.
    DEFAULT_PORT = nil

    # An Array of the available components for Bundler::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(?<hfield>(?:%\h\h|[!$'-.0-;@-Z_a-z~])*=(?:%\h\h|[!$'-.0-;@-Z_a-z~])*)(?:&\g<hfield>)*\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 Bundler::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 <code>[to, headers]</code>.
    #
    # 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
    # <code>"subject=subscribe&cc=address"</code>, or as an Array of Arrays
    # like <code>[['subject', 'subscribe'], ['cc', 'address']]</code>.
    #
    # Examples:
    #
    #    require 'bundler/vendor/uri/lib/uri'
    #
    #    m1 = Bundler::URI::MailTo.build(['joe@example.com', 'subject=Ruby'])
    #    m1.to_s  # => "mailto:joe@example.com?subject=Ruby"
    #
    #    m2 = Bundler::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 = Bundler::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
 gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/http.rb000064400000007501150403134010017756 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/mailto.rb000064400000020052150403134000020257 0ustar00o' is invalid as Bundler::URI #{addr.dump}"
        end

        # check addr-spec
        # don't s/\+/ /g
        addr.gsub!(/%\h\h/, Bundler::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 Bundler::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 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 = Bundler::URI.decode_www_form_component(@to)
      head = ''
      body = ''
      @headers.each do |x|
        case x[0]
        when 'body'
          body = Bundler::URI.decode_www_form_component(x[1])
        when 'to'
          to << ', ' + Bundler::URI.decode_www_form_component(x[1])
        else
          head << Bundler::URI.decode_www_form_component(x[0]).capitalize + ': ' +
            Bundler::URI.decode_www_form_component(x[1])  + "\n"
        end
      end

      "To: #{to}
#{head}
#{body}
"
    end
    alias to_rfc822text to_mailtext
  end

  register_scheme 'MAILTO', MailTo
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/http.rb000064400000007501150403134010017756 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ftp.rb000064400000016430150403134010017571 0ustar00n Internet Explorer 5 and 6, before the MS04-004 security
  # update. See <URL:http://support.microsoft.com/kb/834489>.
  #
  class HTTP < Generic
    # A Default port of 80 for Bundler::URI::HTTP.
    DEFAULT_PORT = 80

    # An Array of the available components for Bundler::URI::HTTP.
    COMPONENT = %i[
      scheme
      userinfo host port
      path
      query
      fragment
    ].freeze

    #
    # == Description
    #
    # Creates a new Bundler::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 <code>[userinfo, host, port, path, query, fragment]</code>.
    #
    # Example:
    #
    #     uri = Bundler::URI::HTTP.build(host: 'www.example.com', path: '/foo/bar')
    #
    #     uri = Bundler::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 Bundler::URI contains a query, the full path is Bundler::URI#path + '?' + Bundler::URI#query.
    # Otherwise, the path is simply Bundler::URI#path.
    #
    # Example:
    #
    #     uri = Bundler::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

    #
    # == Description
    #
    # Returns the authority for an HTTP uri, as defined in
    # https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.
    #
    #
    # Example:
    #
    #     Bundler::URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com"
    #     Bundler::URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000"
    #     Bundler::URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com"
    #
    def authority
      if port == default_port
        host
      else
        "#{host}:#{port}"
      end
    end

    #
    # == Description
    #
    # Returns the origin for an HTTP uri, as defined in
    # https://datatracker.ietf.org/doc/html/rfc6454.
    #
    #
    # Example:
    #
    #     Bundler::URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com"
    #     Bundler::URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000"
    #     Bundler::URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com"
    #     Bundler::URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com"
    #
    def origin
      "#{scheme}://#{authority}"
    end
  end

  register_scheme 'HTTP', HTTP
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ftp.rb000064400000016430150403134010017571 0ustar00# frozen_string_literal: false
# = uri/ftpgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/http.rb000064400000007501150403134010017756 0ustar00FTP 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 Bundler::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 <code>[userinfo, host, port, path, typecode]</code>.
    #
    # If the path supplied is absolute, it will be escaped in order to
    # make it absolute in the Bundler::URI.
    #
    # Examples:
    #
    #     require 'bundler/vendor/uri/lib/uri'
    #
    #     uri1 = Bundler::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 = Bundler::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')
   gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ws.rb000064400000004563150403134010017435 0ustar00 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 Bundler::URI::FTP::COMPONENT.
    attr_reader :typecode

    # Validates typecode +v+,
   gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ftp.rb000064400000016430150403134010017571 0ustar00bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::URI.parse("ftp://john@ftp.example.com/my_file.img")
    #   #=> #<Bundler::URI::FTP ftp://john@ftp.example.com/my_file.img>
    #   uri.typecode = "i"
    #   uri
    #   #=> #<Bundler::URI::FTP ftp://john@ftp.example.com/my_file.img;type=i>
    #
    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 Bundler::URI.
    #
    # RFC 1738 specifically states that the path for an FTP Bundler::URI does not
    # include the / which separates the Bundler::URI path from the Bundler::URI host. Example:
    #
    # <code>ftp://ftp.example.com/pub/ruby</code>
    #
    # The above Bundlergems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/common.rb000064400000050546150403134010020276 0ustar00   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

  register_scheme 'FTP', FTP
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ws.rb000064400000004563150403134010017435 0ustar00# frozen_string_literal: false
# = uri/ws.rb
#
# Author:: Matt Muller <mamuller@amazon.com>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
#
# See Bundler::URI for general documentation
#

require_relative 'generic'

module Bundler::URI

  #
  # The syntax of WS URIs is defined in RFC6455 section 3.
  #
  # Note that the Ruby Bundler::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 <URL:http://support.microsoft.com/kb/834489>.
  #
  class WS < Generic
    # A Default port of 80 for Bundler::URI::WS.
    DEFAULT_PORT = 80

    # An Array of the available components for Bundler::URI::WS.
    COMPONENT = %i[
      scheme
      userinfo host port
      path
      query
    ].freeze

    #
    # == Description
    #
    # Creates a new Bundler::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 <code>[userinfo, host, port, path, query]</code>.
    #
    # Example:
    #
    #     uri = Bundler::URI::WS.build(host: 'www.example.com', path: '/foo/bar')
    #
    #     uri = Bundler::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 Bundler::URI, as required by Net::HTTP::Get.
    #
    # If the Bundler::URI contains a query, the full path is Bundler::URI#path + '?' + Bundler::URI#query.
    # Otherwise, the path is simply Bundler::URI#path.
    #
    # Example:
    #
    #     uri = Bundler::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

  register_scheme 'WS', WS
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/common.rb000064400000050546150403134010020276 0ustar00# frozen_string_literal: true
#--
# = uri/common.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License::
#   You can redistribute it and/or modify it under the same term as Ruby.
#
# See Bundler::URI for general documentation
#

require_relative "rfc2396_parser"
require_relative "rfc3986_parser"

module Bundler::URI
  include RFC2396_REGEXP

  REGEXP = RFC2396_REGEXP
  Parser = RFC2396_Parser
  RFC3986_PARSER = RFC3986_Parser.new
  Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)

  # Bundler::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
  Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)

  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

  module Schemes
  end
  private_constant :Schemegems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ws.rb000064400000004563150403134010017435 0ustar00me_list+.
  #
  def self.for(scheme, *arguments, default: Generic)
    const_name = scheme.to_s.upcase

    uri_class = INITIAL_SCHEMES[const_name]
    uri_class ||= if /\A[A-Z]\w*\z/.match?(const_name) && Schemes.const_defined?(const_name, false)
      Schemes.const_get(const_name, false)
    end
    uri_class ||= default

    return uri_class.new(scheme, *arguments)
  end

  #
  # Base class for all Bundler::URI exceptions.
  #
  class Error < StandardError; end
  #
  # Not a Bundler::URI.
  #
  class InvalidURIError < Error; end
  #
  # Not a Bundler::URI component.
  #
  class InvalidComponentError < Error; end
  #
  # Bundler::URI is valid, bad usage is not.
  #
  class BadURIError < Error; end

  #
  # == Synopsis
  #
  #   Bundler::URI::split(uri)
  #
  # == Args
  #
  # +uri+::
  #   String with Bundler::URI.
  #
  # == Description
  #
  # Splits the string on following parts and returns array with result:
  #
  # * Scheme
  # * Userinfo
  # * Host
  # * Port
  # * Registry
  # * Path
  # * Opaque
  # * Query
  # * Fragment
  #
  # == Usage
  #
  #   require 'bundler/vendor/uri/lib/uri'
  #
  #   Bundler::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
  #
  #   Bundler::URI::parse(uri_str)
  #
  # == Args
  #
  # +uri_str+::
  #   String with Bundler::URI.
  #
  # == Description
  #
  # Creates one of the Bundler::URI's subclasses instance from the string.
  #
  # == Raises
  #
  # Bundler::URI::InvalidURIError::
  #   Raised if Bundler::URI given is not a correct one.
  #
  # == Usage
  #
  #   require 'bundler/vendor/uri/lib/uri'
  #
  #   uri = Bundler::URI.parse("http://www.ruby-lang.org/")
  #   # => #<Bundler::URI::HTTP 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 Bundler::URI characters.
  #
  def self.parse(uri)
    RFC3986_PARSER.parse(uri)
  end

  #
  # == Synopsis
  #
  #   Bundler::URI::join(str[, str, ...])
  #
  # == Args
  #
  # +str+::
  #   String(s) to work with, will be converted to RFC3986 URIs before merging.
  #
  # == Description
  #
  # Joins URIs.
  #
  # == Usage
  #
  #   require 'bundler/vendor/uri/lib/uri'
  #
  #   Bundler::URI.join("hgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/common.rb000064400000050546150403134010020276 0ustar00psis
  #
  #   Bundler::URI::extract(str[, schemes][,&blk])
  #
  # == Args
  #
  # +str+::
  #   String to extract URIs from.
  # +schemes+::
  #   Limit Bundler::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 "bundler/vendor/uri/lib/uri"
  #
  #   Bundler::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 "Bundler::URI.extract is obsolete", uplevel: 1 if $VERBOSE
    DEFAULT_PARSER.extract(str, schemes, &block)
  end

  #
  # == Synopsis
  #
  #   Bundler::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 Bundler::URI-like strings.
  # The Regexp object returned by this method includes arbitrary
  # number of capture group (parentheses).  Never rely on its number.
  #
  # == Usage
  #
  #   require 'bundler/vendor/uri/lib/uri'
  #
  #   # extract first Bundler::URI from html_string
  #   html_string.slice(Bundler::URI.regexp)
  #
  #   # remove ftp URIs
  #   html_string.sub(Bundler::URI.regexp(['ftp']), '')
  #
  #   # You should not rely on the number of parentheses
  #   html_string.scan(Bundler::URI.regexp) do |*matches|
  #     p $&
  #   end
  #
  def self.regexp(schemes = nil)
    warn "Bundler::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
  TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze
  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 Bundler::URI.decode_www_form_component, Bundler::URI.encode_www_form.
  def self.encode_www_form_component(str, enc=nil)
    _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_, str, enc)
  end

  # Decodes given +str+ of URL-encoded form data.
  #
  # This decodes + to SP.
  #
  # See Bundler::URI.encode_www_form_component, Bundler::URI.decode_www_form.
  def self.decode_www_form_component(str, enc=Encoding::UTF_8)
    _decode_uri_component(/\+|%\h\h/, str, enc)
  end

  # Encodes +str+ using URL encoding
  #
  # This encodes SP to %20 instead of +.
  def self.encode_uri_component(str, enc=nil)
    _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCURICOMP_, str, enc)
  end

  # Decodes given +str+ of URL-encoded data.
  #
  # This does not decode + to SP.
  def self.decode_uri_component(str, enc=Encoding::UTF_8)
    _decode_uri_component(/%\h\h/, str, enc)
  end

  def self._encode_uri_component(regexp, table, str, enc)
    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!(regexp, table)
    str.force_encoding(Encoding::US_ASCII)
  end
  private_class_method :_encode_uri_component

  def self._decode_uri_component(regexp, str, enc)
    raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/.match?(str)
    str.b.gsub(regexp, TBLDECWWWCOMP_).force_encoding(enc)
  end
  private_class_method :_decode_uri_component

  # 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 Bundler::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
  #
  #    Bundler::URI.encode_www_form([["q", "ruby"], ["lang", "en"]])
  #    #=> "q=ruby&lang=en"
  #    Bundler::URI.encode_www_form("q" => "ruby", "lang" => "en")
  #    #=> "q=ruby&lang=en"
  #    Bundler::URI.encode_www_form("q" => ["ruby", "perl"], "lang" => "en")
  #    #=> "q=ruby&q=perl&lang=en"
  #    Bundler::URI.encode_www_form([["q", "ruby"], ["q", "perl"], ["lang", "en"]])
  #    #=> "q=ruby&q=perl&lang=en"
  #
  # See Bundler::URI.encode_www_form_component, Bundler::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 = Bundler::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 Bundler::URI.decode_www_form_component, Bundler::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",
    "isgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/wss.rb000064400000001067150403134010017614 0ustar00s-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",
    "gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/file.rb000064400000004637150403134010017725 0ustar00s-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:
  Ractor.make_shareable(WEB_ENCODINGS_) if defined?(Ractor)

  # :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 Bundler::URI

module Bundler

  #
  # Returns +uri+ converted to an Bundler::URI object.
  #
  def URI(uri)
    if uri.is_a?(Bundler::URI::Generic)
      uri
    elsif uri = String.try_convert(uri)
      Bundler::URI.parse(uri)
    else
      raise ArgumentError,
        "bad argument (expected Bundler::URI object or Bundler::URI string)"
    end
  end
  module_function :URI
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/wss.rb000064400000001067150403134010017614 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ldap.rb000064400000013646150403134010017726 0ustar00ULT_PORT = 443
  end

  register_scheme 'WSS', WSS
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/file.rb000064400000004637150403134010017725 0ustar00# frozen_string_literal: true

require_relative 'generic'

module Bundler::URI

  #
  # The "file" Bundler::URI is defined by RFC8089.
  #
  class File < Generic
    # A Default port of nil for Bundler::URI::File.
    DEFAULT_PORT = nil

    #
    # An Array of the available components for Bundler::URI::File.
    #
    COMPONENT = [
      :scheme,
      :host,
      :path
    ].freeze

    #
    # == Description
    #
    # Creates a new Bundler::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 <code>[host, path]</code>.
    #
    # A path from e.g. the File class should be escaped before
    # being passed.
    #
    # Examples:
    #
    #     require 'bundler/vendor/uri/lib/uri'
    #
    #     uri1 = Bundler::URI::File.build(['host.example.com', '/path/file.zip'])
    #     uri1.to_s  # => "file://host.example.com/path/file.zip"
    #
    #     uri2 = Bundler::URI::File.build({:host => 'host.example.com',
    #       :path => '/ruby/src'})
    #     uri2.to_s  # => "file://host.example.com/ruby/src"
    #
    #     uri3 = Bundler::URI::File.build({:path => Bundler::URI::escape('/path/my file.txt')})
    #     uri3.to_s  # => "file:///path/my%20file.txt"
    #
    def self.build(args)
      tmp = Util::make_components_hash(self, args)
      super(tmp)
    end

    # Protected setter for the host component +v+.
    #
    # See also Bundler::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 Bundler::URI::InvalidURIError, "can not set userinfo for file Bundler::URI"
    end

    # raise InvalidURIError
    def check_user(user)
      raise Bundler::URI::InvalidURIError, "can not set user for file Bundler::URI"
    end

    # raise InvalidURIError
    def check_password(user)
      raise Bundler::URI::InvalidURIError, "can not set password for file Bundler::URI"
    end

    # do nothing
    def set_userinfo(v)
    end

    # do nothing
    def set_user(v)
    end

    # do nothing
    def set_password(v)
    end
  end

  register_scheme 'FILE', File
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ldap.rb000064400000013646150403134010017726 0ustar00# frozen_string_literal: false
# = uri/ldap.rb
#
# Author::
#  Takaaki Tateishi <ttate@jaist.ac.jp>
#  Akira Yamada <akira@ruby-lang.org>
# License::
#   Bundler::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 Bundler::URI for general documentatigems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/wss.rb000064400000001067150403134010017614 0ustar00 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 Bundler::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 componegems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/generic.rb000064400000115037150403134010020417 0ustar00ific syntax checking is performed.
    #
    # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+,
    # +opaque+, +query+, and +fragment+, in that order.
    #
    # Example:
    #
    #     uri = Bundler::URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil,
    #       "/dc=example;dc=com", nil, "query", nil)
    #
    # See also Bundler::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 setgems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/ldap.rb000064400000013646150403134010017726 0ustar00al+.
    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 Bundler::URI has a path.
    # For Bundler::URI::LDAP this will return +false+.
    def hierarchical?
      false
    end
  end

  register_scheme 'LDAP', LDAP
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/generic.rb000064400000115037150403134010020417 0ustar00# frozen_string_literal: true

# = uri/generic.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
#
# See Bundler::URI for general documentation
#

require_relative 'common'
autoload :IPSocket, 'socket'
autoload :IPAddr, 'ipaddr'

module Bundler::URI

  #
  # Base class for all Bundler::URI classes.
  # Implements generic Bundler::URI syntax as per RFC 2396.
  #
  class Generic
    include Bundler::URI

    #
    # A Default port of nil for Bundler::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 Bundler::URI::Generic.
    #
    COMPONENT = [
      :scheme,
      :userinfo, :host, :port, :registry,
      :path, :opaque,
      :query,
      :fragment
    ].freeze

    #
    # Components of the Bundler::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 Bundler::URI::Generic instance using
    # Bundler::URI::Generic::build. But, if exception Bundler::URI::InvalidComponentError is raised,
    # then it does Bundler::URI::Escape.escape all Bundler::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 Bundler::URI::Generic instance from components of Bundler::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 == ::Bundler::URI::Generic::COMPONENT.size
        tmp = args.dup
      elsif args.kind_of?(Hash)
        tmp = ::Bundler::URI::Generic::COMPONENT.collect do |c|
          if args.include?(c)
            args[c]
          else
            nil
          end
        end
      else
        component = self.class.component rescue ::Bundler::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 Bundler::URI after '#' character.
    # +parser+::
    #   Parser for internal use [Bundler::URI::DEFAULT_PARSER by default].
    # +arg_check+::
    #   Check arguments [false by default].
    #
    # == Description
    #
    # Creates a new Bundler::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)gems/gems/bundler-2.4.19/lib/bundler/vendor/uri/lib/uri/generic.rb000064400000115037150403134010020417 0ustar00").host #=> "foo"
    #
    # It returns nil if no host component exists.
    #
    #   Bundler::URI("mailto:foo@example.org").host #=> nil
    #
    # The component does not contain the port number.
    #
    #   Bundler::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.
    #
    #   Bundler::URI("http://[::1]/bar/baz").host     #=> "[::1]"
    #   Bundler::URI("http://[::1]/bar/baz").hostname #=> "::1"
    #
    attr_reader :host

    # Returns the port component of the Bundler::URI.
    #
    #   Bundler::URI("http://foo/bar/baz").port      #=> 80
    #   Bundler::URI("http://foo:8080/bar/baz").port #=> 8080
    #
    attr_reader :port

    def registry # :nodoc:
      nil
    end

    # Returns the path component of the Bundler::URI.
    #
    #   Bundler::URI("http://foo/bar/baz").path #=> "/bar/baz"
    #
    attr_reader :path

    # Returns the query component of the Bundler::URI.
    #
    #   Bundler::URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar"
    #
    attr_reader :query

    # Returns the opaque part of the Bundler::URI.
    #
    #   Bundler::URI("mailto:foo@example.org").opaque #=> "foo@example.org"
    #   Bundler::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 Bundler::URI.
    #
    #   Bundler::URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies"
    #
    attr_reader :fragment

    # Returns the parser to be used.
    #
    # Unless a Bundler::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 Bundler::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 Bundler::URI in the order.
    #
    def component
      self.class.component
    end

    #
    # Checks the scheme +v+ component against the Bundler::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 Bundler::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 Bundler::URI::Generic.check_scheme.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::URI::Generic.split_userinfo, to
    # pull +user+ and +password.
    #
    # See also Bundler::URI::Generic.check_user, Bundler::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 Bundler::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 Bundler::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 Bundler::URI::Generic.check_user.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::URI::Generic.check_password.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::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 Bundler::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 Bundler::URI::Generic.password=.
    #
    def set_password(v)
      @password = v
      # returns v
    end
    protected :set_password

    # Returns the userinfo +ui+ as <code>[user, password]</code>
    # 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 (without Bundler::URI decoding).
    def user
      @user
    end

    # Returns the password component (without Bundler::URI decoding).
    def password
      @password
    end

    # Returns the user component after Bundler::URI decoding.
    def decoded_user
      Bundler::URI.decode_uri_component(@user) if @user
    end

    # Returns the password component after Bundler::URI decoding.
    def decoded_password
      Bundler::URI.decode_uri_component(@password) if @password
    end

    #
    # Checks the host +v+ component for RFC2396 compliance
    # and against the Bundler::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 Bundler::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 Bundler::URI::Generic.check_host.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::URI and unwrap brackets for IPv6 addresses.
    #
    # This method is the same as Bundler::URI::Generic#host except
    # brackets for IPv6 (and future IP) addresses are removed.
    #
    #   uri = Bundler::URI("http://[::1]/bar")
    #   uri.hostname      #=> "::1"
    #   uri.host          #=> "[::1]"
    #
    def hostname
      v = self.host
      v&.start_with?('[') && v.end_with?(']') ? v[1..-2] : v
    end

    # Sets the host part of the Bundler::URI as the argument with brackets for IPv6 addresses.
    #
    # This method is the same as Bundler::URI::Generic#host= except
    # the argument can be a bare IPv6 address.
    #
    #   uri = Bundler::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 !(v&.start_with?('[') && v&.end_with?(']')) && v&.index(':')
      self.host = v
    end

    #
    # Checks the port +v+ component for RFC2396 compliance
    # and against the Bundler::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 Bundler::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 Bundler::URI::Generic.check_port.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::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 Bundler::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 Bundler::URI::Generic.check_path.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::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 Bundler::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 Bundler::URI::Generic.check_opaque.
    #
    def opaque=(v)
      check_opaque(v)
      set_opaque(v)
      v
    end

    #
    # Checks the fragment +v+ component against the Bundler::URI::Parser Regexp for :FRAGMENT.
    #
    #
    # == Args
    #
    # +v+::
    #    String
    #
    # == Description
    #
    # Public setter for the fragment component +v+
    # (with validation).
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::URI is hierarchical.
    #
    # == Description
    #
    # Bundler::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 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::URI.parse("http://my.example.com/")
    #   uri.hierarchical?
    #   #=> true
    #   uri = Bundler::URI.parse("mailto:joe@example.com")
    #   uri.hierarchical?
    #   #=> false
    #
    def hierarchical?
      if @path
        true
      else
        false
      end
    end

    #
    # Returns true if Bundler::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 Bundler::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+::
    #    Bundler::URI or String
    #
    # == Description
    #
    # Destructive form of #merge.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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+::
    #    Bundler::URI or String
    #
    # == Description
    #
    # Merges two URIs.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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 Bundler::URI are absolute" if absolute?
        # hmm... should return oth for usability?
        return rel
      end

      unless self.absolute?
        raise BadURIError, "both Bundler::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 Bundler::URI: #{self}"
      end
      if oth.relative?
        raise BadURIError,
          "relative Bundler::URI: #{oth}"
      end

      if self.scheme != oth.scheme
        return self, self.dup
      end
      rel = Bundler::URI::Generic.new(nil, # it is relative Bundler::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+::
    #    Bundler::URI or String
    #
    # == Description
    #
    # Calculates relative path from oth to self.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::URI.parse('http://my.example.com/main.rbx?page=1')
    #   uri.route_from('http://my.example.com')
    #   #=> #<Bundler::URI::Generic /main.rbx?page=1>
    #
    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+::
    #    Bundler::URI or String
    #
    # == Description
    #
    # Calculates relative path to oth from self.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::URI.parse('http://my.example.com')
    #   uri.route_to('http://my.example.com/main.rbx?page=1')
    #   #=> #<Bundler::URI::Generic /main.rbx?page=1>
    #
    def route_to(oth)
      parser.__send__(:convert_to_uri, oth).route_from(self)
    end

    #
    # Returns normalized Bundler::URI.
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   Bundler::URI("HTTP://my.EXAMPLE.com").normalize
    #   #=> #<Bundler::URI::HTTP http://my.example.com/>
    #
    # 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 Bundler::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

--- Bundler::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 Bundler::URI::HTTP.
    #
    # == Description
    #
    # Selects specified components from Bundler::URI.
    #
    # == Usage
    #
    #   require 'bundler/vendor/uri/lib/uri'
    #
    #   uri = Bundler::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+::
    #    Bundler::URI or String
    #
    # == Description
    #
    # Attempts to parse other Bundler::URI +oth+,
    # returns [parsed_oth, segems/gems/bundler-2.4.19/lib/bundler/vendor/tsort/lib/tsort.rb000064400000035205150403134010017731 0ustar00_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 Bundler::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'
        if RUBY_ENGINE == 'jruby' && p_addr = ENV_JAVA['http.proxyHost']
          p_port = ENV_JAVA['http.proxyPort']
          if p_user = ENV_JAVA['http.proxyUser']
            p_pass = ENV_JAVA['http.proxyPass']
            proxy_uri = "http://#{p_user}:#{p_pass}@#{p_addr}:#{p_port}"
          else
            proxy_uri = "http://#{p_addr}:#{p_port}"
          end
        else
          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
        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 Bundler::URI::Generic.use_proxy?(self.hostname, addr, self.port, no_proxy)
      end
      Bundler::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
gems/gems/bundler-2.4.19/lib/bundler/vendor/tsort/lib/tsort.rb000064400000035205150403134010017731 0ustar00# frozen_string_literal: true

#--
# tsort.rb - provides a module for topological sorting and strongly connected components.
#++
#

#
# Bundler::TSort implements topological sorting using Tarjan's algorithm for
# strongly connected components.
#
# Bundler::TSort is designed to be able to be used with any object which can be
# interpreted as a directed graph.
#
# Bundler::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
# Bundler::TSort uses Hash internally.
#
# == A Simple Example
#
# The following example demonstrates how to mix the Bundler::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 'bundler/vendor/tsort/lib/tsort'
#
#   class Hash
#     include Bundler::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 'bundler/vendor/tsort/lib/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 Bundler::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 Bundler::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",
# <em>SIAM Journal on Computing</em>, Vol. 1, No. 2, pp. 146-160, June 1972.
#

module Bundler::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, Bundler::TSort::Cyclic is raised.
  #
  #   class G
  #     include Bundler::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 Bundler::TSort::Cyclic
  #
  def tsort
    each_node = method(:tsort_each_node)
    each_child = method(:tsort_each_child)
    Bundler::TSort.tsort(eagems/gems/bundler-2.4.19/lib/bundler/vendor/tsort/lib/tsort.rb000064400000035205150403134010017731 0ustar00h_node, each_child)
    tsort_each(each_node, each_child).to_a
  end

  # The iterator version of the #tsort method.
  # <tt><em>obj</em>.tsort_each</tt> is similar to <tt><em>obj</em>.tsort.each</tt>, but
  # modification of _obj_ during the iteration may lead to unexpected results.
  #
  # #tsort_each returns +nil+.
  # If there is a cycle, Bundler::TSort::Cyclic is raised.
  #
  #   class G
  #     include Bundler::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)
    Bundler::TSort.tsort_each(each_node, each_child, &block)
  end

  # The iterator version of the Bundler::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) }
  #   Bundler::TSort.tsort_each(each_node, each_child) {|n| p n }
  #   #=> 4
  #   #   2
  #   #   3
  #   #   1
  #
  def self.tsort_each(each_node, each_child) # :yields: node
    return to_enum(__method__, each_node, each_child) unless block_given?

    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 Bundler::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)
    Bundler::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 Bundler::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 Bundler::TSort.strongly_connected_components(each_node, each_child)
  #   #=> [[4], [2, 3], [1]]
  #
  def self.strongly_connected_components(each_node, each_child)
    each_strongly_connected_component(each_node, each_child).to_a
  end

  # The iterator version of the #strongly_connected_components method.
  # <tt><em>obj</em>.each_strongly_connected_component</tt> is similar to
  # <tt><em>obj</em>.strongly_connected_components.each</tt>, but
  # modification of _obj_ during the iteration may lead to unexpected results.
  #
  # #each_strongly_connected_component returns +nil+.
  #
  #   class G
  #     include Bundler::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)
    Bundler::TSort.each_strongly_connected_component(each_node, each_child, &block)
  end

  # The iterator version of the Bundler::TSort.strongly_connected_components method.
  #
  # The graph is represented by _each_node_ and _each_child_.
  # _each_node_ should have +call+ method which yields for gems/gems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb000064400000066704150403134010025321 0ustar00}
    stack = []
    each_node.call {|node|
      unless id_map.include? node
        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 Bundler::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
    Bundler::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.
  #
  # #Bundler::TSort.each_strongly_connected_component_from is a class method and
  # it doesn't need a class to represent a graph which includes Bundler::TSort.
  #
  #   graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
  #   each_child = lambda {|n, &b| graph[n].each(&b) }
  #   Bundler::TSort.each_strongly_connected_component_from(1, each_child) {|scc|
  #     p scc
  #   }
  #   #=> [4]
  #   #   [2, 3]
  #   #   [1]
  #
  def self.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 =
          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
gems/gems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb000064400000066704150403134010025321 0ustar00require 'net/http'
require_relative '../../../../uri/lib/uri'
require 'cgi' # for escaping
require_relative '../../../../connection_pool/lib/connection_pool'

autoload :OpenSSL, 'openssl'

##
# Persistent connections for Net::HTTP
#
# Bundler::Persistent::Net::HTTP::Persistent maintains persistent connections across all the
# servers you wish to talk to.  For each host:port you communicate with a
# single persistent connection is created.
#
# Connections will be shared across threads through a connection pool to
# increase reuse of connections.
#
# You can shut down any remaining HTTP connections when done by calling
# #shutdown.
#
# Example:
#
#   require 'bundler/vendor/net-http-persistent/lib/net/http/persistent'
#
#   uri = Bundler::URI 'http://example.com/awesome/web/service'
#
#   http = Bundler::Persistent::Net::HTTP::Persistent.new
#
#   # perform a GET
#   response = http.request uri
#
#   # or
#
#   get = Net::HTTP::Get.new uri.request_uri
#   response = http.request get
#
#   # create a POST
#   post_uri = uri + 'create'
#   post = Net::HTTP::Post.new post_uri.path
#   post.set_form_data 'some' => 'cool data'
#
#   # perform the POST, the Bundler::URI is always required
#   response http.request post_uri, post
#
# Note that for GET, HEAD and other requests that do not have a body you want
# to use Bundler::URI#request_uri not Bundler::URI#path.  The request_uri contains the query
# params which are sent in the body for other requests.
#
# == TLS/SSL
#
# TLS connections are automatically created depending upon the scheme of the
# Bundler::URI.  TLS connections are automatically verified against the default
# certificate store for your computer.  You can override this by changing
# verify_mode or by specifying an alternate cert_store.
#
# Here are the TLS settings, see the individual methods for documentation:
#
# #certificate        :: This client's certificate
# #ca_file            :: The certificate-authorities
# #ca_path            :: Directory with certificate-authorities
# #cert_store         :: An SSL certificate store
# #ciphers            :: List of SSl ciphers allowed
# #private_key        :: The client's SSL private key
# #reuse_ssl_sessions :: Reuse a previously opened SSL session for a new
#                        connection
# #ssl_timeout        :: Session lifetime
# #ssl_version        :: Which specific SSL version to use
# #verify_callback    :: For server certificate verification
# #verify_depth       :: Depth of certificate verification
# #verify_mode        :: How connections should be verified
#
# == Proxies
#
# A proxy can be set through #proxy= or at initialization time by providing a
# second argument to ::new.  The proxy may be the Bundler::URI of the proxy server or
# <code>:ENV</code> which will consult environment variables.
#
# See #proxy= and #proxy_from_env for details.
#
# == Headers
#
# Headers may be specified for use in every request.  #headers are appended to
# any headers on the request.  #override_headers replace existing headers on
# the request.
#
# The difference between the two can be seen in setting the User-Agent.  Using
# <code>http.headers['User-Agent'] = 'MyUserAgent'</code> will send "Ruby,
# MyUserAgent" while <code>http.override_headers['User-Agent'] =
# 'MyUserAgent'</code> will send "MyUserAgent".
#
# == Tuning
#
# === Segregation
#
# Each Bundler::Persistent::Net::HTTP::Persistent instance has its own pool of connections.  There
# is no sharing with other instances (as was true in earlier versions).
#
# === Idle Timeout
#
# If a connection hasn't been used for this number of seconds it will
# automatically be reset upon the next use to avoid attempting to send to a
# closed connection.  The default value is 5 seconds. nil means no timeout.
# Set through #idle_timeout.
#
# Reducing this value may help avoid the "too many connection resets" error
# when sending non-idempotent requests while increasing this value will cause
# fewer round-trips.
#
# === Read Timeout
#
# The amount of time allowed between reading two chunks from the socket.  Set
# through #read_timeout
#
# === Max Requests
#
# The number of requests that should be made before opening a new connection.
# Typically many keep-alive capable servers tune this to 100 or less, so the
# 101st request will fail with ECONNRESET. If unset (default), this value has
# no effect, if set, connections will be reset on the request after
# max_requests.
#
# === Open Timeout
#
# The amount of time to wait for a connection to be opened.  Set through
# #open_timeout.
#
# === Socket Options
#
# Socket options may be set on newly-created connections.  See #socket_options
# for details.
#
# === Connection Termination
#
# If you are done using the Bundler:gems/gems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb000064400000066704150403134010025321 0ustar00le
  # limits (typically windows).

  if Process.const_defined? :RLIMIT_NOFILE
    open_file_limits = Process.getrlimit(Process::RLIMIT_NOFILE)

    # Under JRuby on Windows Process responds to `getrlimit` but returns something that does not match docs
    if open_file_limits.respond_to?(:first)
      DEFAULT_POOL_SIZE = open_file_limits.first / 4
    else
      DEFAULT_POOL_SIZE = 256
    end
  else
    DEFAULT_POOL_SIZE = 256
  end

  ##
  # The version of Bundler::Persistent::Net::HTTP::Persistent you are using

  VERSION = '4.0.1'

  ##
  # Error class for errors raised by Bundler::Persistent::Net::HTTP::Persistent.  Various
  # SystemCallErrors are re-raised with a human-readable message under this
  # class.

  class Error < StandardError; end

  ##
  # Use this method to detect the idle timeout of the host at +uri+.  The
  # value returned can be used to configure #idle_timeout.  +max+ controls the
  # maximum idle timeout to detect.
  #
  # After
  #
  # Idle timeout detection is performed by creating a connection then
  # performing a HEAD request in a loop until the connection terminates
  # waiting one additional second per loop.
  #
  # NOTE:  This may not work on ruby > 1.9.

  def self.detect_idle_timeout uri, max = 10
    uri = Bundler::URI uri unless Bundler::URI::Generic === uri
    uri += '/'

    req = Net::HTTP::Head.new uri.request_uri

    http = new 'net-http-persistent detect_idle_timeout'

    http.connection_for uri do |connection|
      sleep_time = 0

      http = connection.http

      loop do
        response = http.request req

        $stderr.puts "HEAD #{uri} => #{response.code}" if $DEBUG

        unless Net::HTTPOK === response then
          raise Error, "bad response code #{response.code} detecting idle timeout"
        end

        break if sleep_time >= max

        sleep_time += 1

        $stderr.puts "sleeping #{sleep_time}" if $DEBUG
        sleep sleep_time
      end
    end
  rescue
    # ignore StandardErrors, we've probably found the idle timeout.
  ensure
    return sleep_time unless $!
  end

  ##
  # This client's OpenSSL::X509::Certificate

  attr_reader :certificate

  ##
  # For Net::HTTP parity

  alias cert certificate

  ##
  # An SSL certificate authority.  Setting this will set verify_mode to
  # VERIFY_PEER.

  attr_reader :ca_file

  ##
  # A directory of SSL certificates to be used as certificate authorities.
  # Setting this will set verify_mode to VERIFY_PEER.

  attr_reader :ca_path

  ##
  # An SSL certificate store.  Setting this will override the default
  # certificate store.  See verify_mode for more information.

  attr_reader :cert_store

  ##
  # The ciphers allowed for SSL connections

  attr_reader :ciphers

  ##
  # Sends debug_output to this IO via Net::HTTP#set_debug_output.
  #
  # Never use this method in production code, it causes a serious security
  # hole.

  attr_accessor :debug_output

  ##
  # Current connection generation

  attr_reader :generation # :nodoc:

  ##
  # Headers that are added to every request using Net::HTTP#add_field

  attr_reader :headers

  ##
  # Maps host:port to an HTTP version.  This allows us to enable version
  # specific features.

  attr_reader :http_versions

  ##
  # Maximum time an unused connection can remain idle before being
  # automatically closed.

  attr_accessor :idle_timeout

  ##
  # Maximum number of requests on a connection before it is considered expired
  # and automatically closed.

  attr_accessor :max_requests

  ##
  # Number of retries to perform if a request fails.
  #
  # See also #max_retries=, Net::HTTP#max_retries=.

  attr_reader :max_retries

  ##
  # The value sent in the Keep-Alive header.  Defaults to 30.  Not needed for
  # HTTP/1.1 servers.
  #
  # This may not work correctly for HTTP/1.0 servers
  #
  # This method may be removed in a future version as RFC 2616 does not
  # require this header.

  attr_accessor :keep_alive

  ##
  # The name for this collection of persistent connections.

  attr_reader :name

  ##
  # Seconds to wait until a connection is opened.  See Net::HTTP#open_timeout

  attr_accessor :open_timeout

  ##
  # Headers that are added to every request using Net::HTTP#[]=

  attr_reader :override_headers

  ##
  # This client's SSL private key

  attr_reader :private_key

  ##
  # For Net::HTTP parity

  alias key private_key

  ##
  # The URL through which requests will be proxied

  attr_reader :proxy_uri

  ##
  # List of host suffixes which will not be proxied

  attr_reader :no_proxy

  ##
  # Test-only accessor for the connection pool

  attr_reader :pool # :nodoc:

  ##
  # Seconds to wait until reading one block.  See Net::HTTP#read_timeout

  attr_accessor :read_timeout

  ##
  # Seconds to wait until writing one block.  See Net::HTTP#write_timeout

  attr_accessor :write_timeout

  ##
  # By default SSL sessions are reused to avoid extra SSL handshakes.  Set
  # this to false if you have problems communicating with an HTTPS server
  # like:
  #
  #   SSL_connect [...] read finished A: unexpected message (OpenSSL::SSL::SSLError)

  attr_accessor :reuse_ssl_sessions

  ##
  # An array of options for Socket#setsockopt.
  #
  # By default the TCP_NODELAY option is set on sockets.
  #
  # To set additional options append them to this array:
  #
  #   http.socket_options << [Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, 1]

  attr_reader :socket_options

  ##
  # Current SSL connection generation

  attr_reader :ssl_generation # :nodoc:

  ##
  # SSL session lifetime

  attr_reader :ssl_timeout

  ##
  # SSL version to use.
  #
  # By default, the version will be negotiated automatically between client
  # and server.  Ruby 1.9 and newer only. Deprecated since Ruby 2.5.

  attr_reader :ssl_version

  ##
  # Minimum SSL version to use, e.g. :TLS1_1
  #
  # By default, the version will be negotiated automatically between client
  # and server.  Ruby 2.5 and newer only.

  attr_reader :min_version

  ##
  # Maximum SSL version to use, e.g. :TLS1_2
  #
  # By default, the version will be negotiated automatically between client
  # and server.  Ruby 2.5 and newer only.

  attr_reader :max_version

  ##
  # Where this instance's last-use times live in the thread local variables

  attr_reader :timeout_key # :nodoc:

  ##
  # SSL verification callback.  Used when ca_file or ca_path is set.

  attr_reader :verify_callback

  ##
  # Sets the depth of SSL certificate verification

  attr_reader :verify_depth

  ##
  # HTTPS verify mode.  Defaults to OpenSSL::SSL::VERIFY_PEER which verifies
  # the server certificate.
  #
  # If no ca_file, ca_path or cert_store is set the default system certificate
  # store is used.
  #
  # You can use +verify_mode+ to override any default values.

  attr_reader :verify_mode

  ##
  # Creates a new Bundler::Persistent::Net::HTTP::Persistent.
  #
  # Set a +name+ for fun.  Your library name should be good enough, but this
  # otherwise has no purpose.
  #
  # +proxy+ may be set to a Bundler::URI::HTTP or :ENV to pick up proxy options from
  # the environment.  See proxy_from_env for details.
  #
  # In order to use a Bundler::URI for the proxy you may need to do some extra work
  # beyond Bundler::URI parsing if the proxy requires a password:
  #
  #   proxy = Bundler::URI 'http://proxy.example'
  #   proxy.user     = 'AzureDiamond'
  #   proxy.password = 'hunter2'
  #
  # Set +pool_size+ to limit the maximum number of connections allowed.
  # Defaults to 1/4 the number of allowed file handles or 256 if your OS does
  # not support a limit on allowed file handles.  You can have no more than
  # this many threads with active HTTP transactions.

  def initialize name: nil, proxy: nil, pool_size: DEFAULT_POOL_SIZE
    @name = name

    @debug_output     = nil
    @proxy_uri        = nil
    @no_proxy         = []
    @headers          = {}
    @override_headers = {}
    @http_versions    = {}
    @keep_alive       = 30
    @open_timeout     = nil
    @read_timeout     = nil
    @write_timeout    = nil
    @idle_timeout     = 5
    @max_requests     = nil
    @max_retries      = 1
    @socket_options   = []
    @ssl_generation   = 0 # incremented when SSL session variables change

    @socket_options << [Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1] if
      Socket.const_defined? :TCP_NODELAY

    @pool = Bundler::Persistent::Net::HTTP::Persistent::Pool.new size: pool_size do |http_args|
      Bundler::Persistent::Net::HTTP::Persistent::Connection.new Net::HTTP, http_args, @ssl_generation
    end

    @certificate        = nil
    @ca_file            = nil
    @ca_path            = nil
    @ciphers            = nil
    @private_key        = nil
    @ssl_timeout        = nil
    @ssl_version        = nil
    @min_version        = nil
    @max_version        = nil
    @verify_callback    = nil
    @verify_depth       = nil
    @verify_mode        = nil
    @cert_store         = nil

    @generation         = 0 # incremented when proxy Bundler::URI changes

    if HAVE_OPENSSL then
      @verify_mode        = OpenSSL::SSL::VERIFY_PEER
      @reuse_ssl_sessions = OpenSSL::SSL.const_defined? :Session
    end

    self.proxy = proxy if proxy
  end

  ##
  # Sets this client's OpenSSL::X509::Certificate

  def certificate= certificate
    @certificate = certificate

    reconnect_ssl
  end

  # For Net::HTTP parity
  alias cert= certificate=

  ##
  # Sets the SSL certificate authority file.

  def ca_file= file
    @ca_file = file

    reconnect_ssl
  end

  ##
  # Sets the SSL certificate authority path.

  def ca_path= path
    @ca_path = path

    reconnect_ssl
  end

  ##
  # Overrides the default SSL certificate store used for verifying
  # connections.

  def cert_store= store
    @cert_store = store

    reconnect_ssl
  end

  ##
  # The ciphers allowed for SSL connections

  def ciphers= ciphers
    @ciphers = ciphers

    reconnect_ssl
  end

  ##
  # Creates a new connection for +uri+

  def connection_for uri
    use_ssl = uri.scheme.downcase == 'https'

    net_http_args = [uri.hostname, uri.port]

    # I'm unsure if uri.host or uri.hostname should be checked against
    # the proxy bypass list.
    if @proxy_uri and not proxy_bypass? uri.host, uri.port then
      net_http_args.concat @proxy_args
    else
      net_http_args.concat [nil, nil, nil, nil]
    end

    connection = @pool.checkout net_http_args

    http = connection.http

    connection.ressl @ssl_generation if
      connection.ssl_generation != @ssl_generation

    if not http.started? then
      ssl   http if use_ssl
      start http
    elsif expired? connection then
      reset connection
    end

    http.keep_alive_timeout = @idle_timeout  if @idle_timeout
    http.max_retries        = @max_retries   if http.respond_to?(:max_retries=)
    http.read_timeout       = @read_timeout  if @read_timeout
    http.write_timeout      = @write_timeout if
      @write_timeout && http.respond_to?(:write_timeout=)

    return yield connection
  rescue Errno::ECONNREFUSED
    address = http.proxy_address || http.address
    port    = http.proxy_port    || http.port

    raise Error, "connection refused: #{address}:#{port}"
  rescue Errno::EHOSTDOWN
    address = http.proxy_address || http.address
    port    = http.proxy_port    || http.port

    raise Error, "host down: #{address}:#{port}"
  ensure
    @pool.checkin net_http_args
  end

  ##
  # CGI::escape wrapper

  def escape str
    CGI.escape str if str
  end

  ##
  # CGI::unescape wrapper

  def unescape str
    CGI.unescape str if str
  end


  ##
  # Returns true if the connection should be reset due to an idle timeout, or
  # maximum request count, false otherwise.

  def expired? connection
    return true  if     @max_requests && connection.requests >= @max_requests
    return false unless @idle_timeout
    return true  if     @idle_timeout.zero?

    Time.now - connection.last_use > @idle_timeout
  end

  ##
  # Starts the Net::HTTP +connection+

  def start http
    http.set_debug_output @debug_output if @debug_output
    http.open_timeout = @open_timeout if @open_timeout

    http.start

    socket = http.instance_variable_get :@socket

    if socket then # for fakeweb
      @socket_options.each do |option|
        socket.io.setsockopt(*option)
      end
    end
  end

  ##
  # Finishes the Net::HTTP +connection+

  def finish connection
    connection.finish

    connection.http.instance_variable_set :@last_communicated, nil
    connection.http.instance_variable_set :@ssl_session, nil unless
      @reuse_ssl_sessions
  end

  ##
  # Returns the HTTP protocol version for +uri+

  def http_version uri
    @http_versions["#{uri.hostname}:#{uri.port}"]
  end

  ##
  # Adds "http://" to the String +uri+ if it is missing.

  def normalize_uri uri
    (uri =~ /^https?:/) ? uri : "http://#{uri}"
  end

  ##
  # Set the maximum number of retries for a request.
  #
  # Defaults to one retry.
  #
  # Set this to 0 to disable retries.

  def max_retries= retries
    retries = retries.to_int

    raise ArgumentError, "max_retries must be positive" if retries < 0

    @max_retries = retries

    reconnect
  end

  ##
  # Sets this client's SSL private key

  def private_key= key
    @private_key = key

    reconnect_ssl
  end

  # For Net::HTTP parity
  alias key= private_key=

  ##
  # Sets the proxy server.  The +proxy+ may be the Bundler::URI of the proxy server,
  # the symbol +:ENV+ which will read the proxy from the environment or nil to
  # disable use of a proxy.  See #proxy_from_env for details on setting the
  # proxy from the environment.
  #
  # If the proxy Bundler::URI is set after requests have been made, the next request
  # will shut-down and re-open all connections.
  #
  # The +no_proxy+ query parameter can be used to specify hosts which shouldn't
  # be reached via proxy; if set it should be a comma separated list of
  # hostname suffixes, optionally with +:port+ appended, for example
  # <tt>example.com,some.host:8080</tt>.

  def proxy= proxy
    @proxy_uri = case proxy
                 when :ENV      then proxy_from_env
                 when Bundler::URI::HTTP then proxy
                 when nil       then # ignore
                 else raise ArgumentError, 'proxy must be :ENV or a Bundler::URI::HTTP'
                 end

    @no_proxy.clear

    if @proxy_uri then
      @proxy_args = [
        @proxy_uri.hostname,
        @proxy_uri.port,
        unescape(@proxy_uri.user),
        unescape(@proxy_uri.password),
      ]

      @proxy_connection_id = [nil, *@proxy_args].join ':'

      if @proxy_uri.query then
        @no_proxy = CGI.parse(@proxy_uri.query)['no_proxy'].join(',').downcase.split(',').map { |x| x.strip }.reject { |x| x.empty? }
      end
    end

    reconnect
    reconnect_ssl
  end

  ##
  # Creates a Bundler::URI for an HTTP proxy server from ENV variables.
  #
  # If +HTTP_PROXY+ is set a proxy will be returned.
  #
  # If +HTTP_PROXY_USER+ or +HTTP_PROXY_PASS+ are set the Bundler::URI is given the
  # indicated user and password unless HTTP_PROXY contains either of these in
  # the Bundler::URI.
  #
  # The +NO_PROXY+ ENV variable can be used to specify hosts which shouldn't
  # be reached via proxy; if set it should be a comma separated list of
  # hostname suffixes, optionally with +:port+ appended, for example
  # <tt>example.com,some.host:8080</tt>. When set to <tt>*</tt> no proxy will
  # be returned.
  #
  # For Windows users, lowercase ENV variables are preferred over uppercase ENV
  # variables.

  def proxy_from_env
    env_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']

    return nil if env_proxy.nil? or env_proxy.empty?

    uri = Bundler::URI normalize_uri env_proxy

    env_no_proxy = ENV['no_proxy'] || ENV['NO_PROXY']

    # '*' is special case for always bypass
    return nil if env_no_proxy == '*'

    if env_no_proxy then
      uri.query = "no_proxy=#{escape(env_no_proxy)}"
    end

    unless uri.user or uri.password then
      uri.user     = escape ENV['http_proxy_user'] || ENV['HTTP_PROXY_USER']
      uri.password = escape ENV['http_proxy_pass'] || ENV['HTTP_PROXY_PASS']
    end

    uri
  end

  ##
  # Returns true when proxy should by bypassed for host.

  def proxy_bypass? host, port
    host = host.downcase
    host_port = [host, port].join ':'

    @no_proxy.each do |name|
      return true if host[-name.length, name.length] == name or
         host_port[-name.length, name.length] == name
    end

    false
  end

  ##
  # Forces reconnection of all HTTP connections, including TLS/SSL
  # connections.

  def reconnect
    @generation += 1
  end

  ##
  # Forces reconnection of only TLS/SSL connections.

  def reconnect_ssl
    @ssl_generation += 1
  end

  ##
  # Finishes then restarts the Net::HTTP +connection+

  def reset connection
    http = connection.http

    finish connection

    start http
  rescue Errno::ECONNREFUSED
    e = Error.new "connection refused: #{http.address}:#{http.port}"
    e.set_backtrace $@
    raise e
  rescue Errno::EHOSTDOWN
    e = Error.new "host down: #{http.address}:#{http.port}"
    e.set_backtrace $@
    raise e
  end

  ##
  # Makes a request on +uri+.  If +req+ is nil a Net::HTTP::Get is performed
  # against +uri+.
  #
  # If a block is passed #request behaves like Net::HTTP#request (the body of
  # the response will not have been read).
  #
  # +req+ must be a Net::HTTPGenericRequest subclass (see Net::HTTP for a list).

  def request uri, req = nil, &block
    uri      = Bundler::URI uri
    req      = request_setup req || uri
    response = nil

    connection_for uri do |connection|
      http = connection.http

      begin
        connection.requests += 1

        response = http.request req, &block

        if req.connection_close? or
          (response.http_version <= '1.0' and
            not response.connection_keep_alive?) or
            response.connection_close? then
          finish connection
        end
      rescue Exception # make sure to close the connection when it was interrupted
        finish connection

        raise
      ensure
        connection.last_use = Time.now
      end
    end

    @http_versions["#{uri.hostname}:#{uri.port}"] ||= response.http_version

    response
  end

  ##
  # Creates a GET request if +req_or_uri+ is a Bundler::URI and adds headers to the
  # request.
  #
  # gems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb000064400000001310150403134010027357 0ustar00gemsling shutdown for can be dangerous!
  #
  # If any thread is still using a connection it may cause an error!  Call
  # #shutdown when you are completely done making requests!

  def shutdown
    @pool.shutdown { |http| http.finish }
  end

  ##
  # Enables SSL on +connection+

  def ssl connection
    connection.use_ssl = true

    connection.ciphers     = @ciphers     if @ciphers
    connection.ssl_timeout = @ssl_timeout if @ssl_timeout
    connection.ssl_version = @ssl_version if @ssl_version
    connection.min_version = @min_version if @min_version
    connection.max_version = @max_version if @max_version

    connection.verify_depth = @verify_depth
    connection.verify_mode  = @verify_mode

    if gems/gems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb000064400000002205150403134010026254 0ustar00NSSL_VERIFY_PEER_EQUALS_VERIFY_NONE_IS_WRONG = nil

      WARNING
    end

    connection.ca_file = @ca_file if @ca_file
    connection.ca_path = @ca_path if @ca_path

    if @ca_file or @ca_path then
      connection.verify_mode = OpenSSL::SSL::VERIFY_PEER
      connection.verify_callback = @verify_callback if @verify_callback
    end

    if @certificate and @private_key then
      connection.cert = @certificate
      connection.key  = @private_key
    end

    connection.cert_store = if @cert_store then
                              @cert_store
                            else
                              store = OpenSSL::X509::Store.new
                              store.set_default_paths
                              store
                            end
  end

  ##
  # SSL session lifetime

  def ssl_timeout= ssl_timeout
    @ssl_timeout = ssl_timeout

    reconnect_ssl
  end

  ##
  # SSL version to use

  def ssl_version= ssl_version
    @ssl_version = ssl_version

    reconnect_ssl
  end

  ##
  # Minimum SSL version to use

  def min_version= min_version
    @min_version = min_version

    reconnect_ssl
  end

  ##
  # maximum bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb000064400000003146150403134010030732 0ustar00gems/gemsgems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb000064400000001310150403134010027357 0ustar00gems##
# A Net::HTTP connection wrapper that holds extra information for managing the
# connection's lifetime.

class Bundler::Persistent::Net::HTTP::Persistent::Connection # :nodoc:

  attr_accessor :http

  attr_accessor :last_use

  attr_accessor :requests

  attr_accessor :ssl_generation

  def initialize http_class, http_args, ssl_generation
    @http           = http_class.new(*http_args)
    @ssl_generation = ssl_generation

    reset
  end

  def finish
    @http.finish
  rescue IOError
  ensure
    reset
  end

  def reset
    @last_use = Bundler::Persistent::Net::HTTP::Persistent::EPOCH
    @requests = 0
  end

  def ressl ssl_generation
    @ssl_generation = ssl_generation

    finish
  end

end
gems/gems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb00gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor.rb000064400000040161150403134010017330 0ustar00' if
      stack.empty?

    conn = stack.pop

    if stack.empty?
      @available.push conn, connection_args: net_http_args

      Thread.current[@key].delete(net_http_args)
      Thread.current[@key] = nil if Thread.current[@key].empty?
    end

    nil
  end

  def checkout net_http_args
    stacks = Thread.current[@key] ||= {}
    stack  = stacks[net_http_args] ||= []

    if stack.empty? then
      conn = @available.pop connection_args: net_http_args
    else
      conn = stack.last
    end

    stack.push conn

    conn
  end

  def shutdown
    Thread.current[@key] = nil
    super
  end
end

require_relative 'timed_stack_multi'

bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb000064400000003146150403134010030732 0ustar00gems/gemsclass Bundler::Persistent::Net::HTTP::Persistent::TimedStackMulti < Bundler::ConnectionPool::TimedStack # :nodoc:

  ##
  # Returns a new hash that has arrays for keys
  #
  # Using a class method to limit the bindings referenced by the hash's
  # default_proc

  def self.hash_of_arrays # :nodoc:
    Hash.new { |h,k| h[k] = [] }
  end

  def initialize(size = 0, &block)
    super

    @enqueued = 0
    @ques = self.class.hash_of_arrays
    @lru = {}
    @key = :"connection_args-#{object_id}"
  end

  def empty?
    (@created - @enqueued) >= @max
  end

  def length
    @max - @created + @enqueued
  end

  private

  def connection_stored? options = {} # :nodoc:
    !@ques[options[:connection_args]].empty?
  end

  def fetch_connection options = {} # :nodoc:
    connection_args = options[:connection_args]

    @enqueued -= 1
    lru_update connection_args
    @ques[connection_args].pop
  end

  def lru_update connection_args # :nodoc:
    @lru.delete connection_args
    @lru[connection_args] = true
  end

  def shutdown_connections # :nodoc:
    @ques.each_key do |key|
      super connection_args: key
    end
  end

  def store_connection obj, options = {} # :nodoc:
    @ques[options[:connection_args]].push obj
    @enqueued += 1
  end

  def try_create options = {} # :nodoc:
    connection_args = options[:connection_args]

    if @created >= @max && @enqueued >= 1
      oldest, = @lru.first
      @lru.delete oldest
      @ques[oldest].pop

      @creatgems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb000064400000001310150403134010027357 0ustar00gemsgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor.rb000064400000040161150403134010017330 0ustar00require_relative "thor/base"

class Bundler::Thor
  $thor_runner ||= false
  class << self
    # Allows for custom "Command" package naming.
    #
    # === Parameters
    # name<String>
    # optionsgems/gems/bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb000064400000002205150403134010026254 0ustar00g>:: Description for the subcommand
    def register(klass, subcommand_name, usage, description, options = {})
      if klass <= Bundler::Thor::Group
        desc usage, description, options
        define_method(subcommand_name) { |*args| invoke(klass, args) }
      else
        desc usage, description, options
        subcommand subcommand_name, klass
      end
    end

    # Defines the usage and the description of the next command.
    #
    # ==== Parameters
    # usage<String>
    # description<String>
    # options<String>
    #
    def desc(usage, description, options = {})
      if options[:for]
        command = find_and_refresh_command(options[:for])
        command.usage = usage             if usage
        command.description = description if description
      else
        @usage = usage
        @desc = description
        @hide = options[:hide] || false
      end
    end

    # Defines the long description of the next command.
    #
    # ==== Parameters
    # long description<String>
    #
    def long_desc(long_description, options = {})
      if options[:for]
        command = find_and_refresh_command(options[:for])
      bundler-2.4.19/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb000064400000003146150403134010030732 0ustar00gems/gemses the options for the next command to be declared.
    #
    # ==== Parameters
    # Hash[Symbol => Object]:: The hash key is the name of the option and the value
    # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
    # or :required (string). If you give a value, the type of the value is used.
    #
    def method_options(options = nil)
      @method_options ||= {}
      build_options(options, @method_options) if options
      @method_options
    end

    alias_method :options, :method_options

    # Adds an option to the set of method options. If :for is given as option,
    # it allows you to change the options from a previous defined command.
    #
    #   def previous_command
    #     # magic
    #   end
    #
    #   method_option :foo => :bar, :for => :previous_command
    #
    #   def next_command
    #     # magic
    #   end
    #
    # ==== Parameters
    # name<Symbol>:: The name of the argument.
    # options<Hash>:: Described below.
    #
    # ==== Options
    # :desc     - Description for the argument.
    # :required - If the argument is required or not.
    # :default  - Default value for this argument. It cannot be required and have default values.
    # :aliases  - Aliases for this option.
    # :type     - The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
    # :banner   - String to show on usage notes.
    # :hide     - If you want to hide this option from the help.
    #
    def method_option(name, options = {})
      scope = if options[:for]
        find_and_refresh_command(options[:for]).options
      else
        method_optgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor.rb000064400000040161150403134010017330 0ustar00    # shell<Bundler::Thor::Shell>
    #
    def help(shell, subcommand = false)
      list = printable_commands(true, subcommand)
      Bundler::Thor::Util.thor_classes_in(self).each do |klass|
        list += klass.printable_commands(false)
      end
      list.sort! { |a, b| a[0] <=> b[0] }

      if defined?(@package_name) && @package_name
        shell.say "#{@package_name} commands:"
      else
        shell.say "Commands:"
      end

      shell.print_table(list, :indent => 2, :truncate => true)
      shell.say
      class_options_help(shell)
    end

    # Returns commands ready to be printed.
    def printable_commands(all = true, subcommand = false)
      (all ? all_commands : commands).map do |_, command|
        next if command.hidden?
        item = []
        item << banner(command, false, subcommand)
        item << (command.description ? "# #{command.description.gsub(/\s+/m, ' ')}" : "")
        item
      end.compact
    end
    alias_method :printable_tasks, :printable_commands

    def subcommands
      @subcommands ||= from_superclass(:subcommands, [])
    end
    alias_method :subtasks, :subcommands

    def subcommand_classes
      @subcommand_classes ||= {}
    end

    def subcommand(subcommand, subcommand_class)
      subcommands << subcommand.to_s
      subcommand_class.subcommand_help subcommand
      subcommand_classes[subcommand.to_s] = subcommand_class

      define_method(subcommand) do |*args|
        args, opts = Bundler::Thor::Arguments.split(args)
        invoke_args = [args, opts, {:invoked_via_subcommand => true, :class_options => options}]
        invoke_args.unshift "help" if opts.delete("--help") || opts.delete("-h")
        invoke subcommand_class, *invoke_args
      end
      subcommand_class.commands.each do |_meth, command|
        command.ancestor_name = subcommand
      end
    end
    alias_method :subtask, :subcommand

    # Extend check unknown options to accept a hash of conditions.
    #
    # === Parameters
    # options<Hash>: A hash containing :only and/or :except keys
    def check_unknown_options!(options = {})
      @check_unknown_options ||= {}
      options.each do |key, value|
        if value
          @check_unknown_options[key] = Array(value)
        else
          @check_unknown_options.delete(key)
        end
      end
      @check_unknown_options
    end

    # Overwrite check_unknown_options? to take subcommands and options into account.
    def check_unknown_options?(config) #:nodoc:
      options = check_unknown_options
      return false unless options

      command = config[:current_command]
      return true unless command

      name = command.name

      if subcommands.include?(name)
        false
      elsif options[:except]
        !options[:except].include?(name.to_sym)
      elsif options[:only]
        options[:only].include?(name.to_sym)
      else
        true
      end
    end

    # Stop parsing of options as soon as an unknown option or a regular
    # argument is encountered.  All remaining arguments are passed to the command.
    # This is useful if you have a command that can receive arbitrary additional
    # options, and where those additional options should not be handled by
    # Bundler::Thor.
    #
    # ==== Example
    #
    # To better understand how this is useful, let's consider a command that calls
    # an external command.  A user may want to pass arbitrary options and
    # arguments to that command.  The command itself also accepts some options,
    # which should be handled by Bundler::Thor.
    #
    #   class_option "verbose",  :type => :boolean
    #   stop_on_unknown_option! :exec
    #   check_unknown_options!  :except => :exec
    #
    #   desc "exec", "Run a shell command"
    #   def exec(*args)
    #     puts "diagnostic output" if options[:verbose]
    #     Kernel.exec(*args)
    #   end
    #
    # Here +exec+ can be called with +--verbose+ to get diagnostic output,
    # e.g.:
    #
    #   $ thor exec --verbose echo foo
    #   diagnostic output
    #   foo
    #
    # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead:
    #
    #   $ thor exec echo --verbose foo
    #   --verbose foo
    #
    # ==== Parameters
    # Symbol ...:: A list of commands that should be affected.
    def stop_on_unknown_option!(*command_names)
      @stop_on_unknown_option = stop_on_unknown_option | command_names
    end

    def stop_on_unknown_option?(command) #:nodoc:
      command && stop_on_unknown_option.include?(command.name.to_sym)
    end

    # Disable the check for required options for the given commands.
    # This is useful if you have a command that does not need the required options
    # to work, like help.
    #
    # ==== Parameters
    # Symbol ...:: A list of commands that should be affected.
    def disable_required_check!(*command_names)
      @disable_required_check = disable_required_check | command_names
    end

    def disable_required_check?(command) #:nodoc:
      command && disable_required_check.include?(command.name.to_sym)
    end

  protected

    def stop_on_unknown_option #:nodoc:
      @stop_on_unknown_option ||= []
    end

    # help command has the required check disabled by default.
    def disable_required_check #:nodoc:
      @disable_required_check ||= [:help]
    end

    # The method responsible for dispatching given the args.
    def dispatch(meth, given_args, given_opts, config) #:nodoc: # rubocop:disable MethodLength
      meth ||= retrieve_command_name(given_args)
      command = all_commands[normalize_command_name(meth)]

      if !command && config[:invoked_via_subcommand]
        # We're a subcommand and our first argument didn't match any of our
        # commands. So we put it back and call our default command.
        given_args.unshift(meth)
        command = all_commands[normalize_command_name(default_command)]
      end

      if command
        args, opts = Bundler::Thor::Options.split(given_args)
        if stop_on_unknown_option?(command) && !args.empty?
          # given_args starts with a non-option, so we treat everything as
          # ordinary arguments
          args.concat opts
          opts.clear
        end
      else
        args = given_args
        opts = nil
        command = dynamic_command_class.new(meth)
      end

      opts = given_opts || opts || []
      config[:current_command] = command
      config[:command_options] = command.options

      instance = new(args, opts, config)
      yield instance if block_given?
      args = instance.args
      trailing = args[Range.new(arguments.size, -1)]
      instance.invoke_command(command, trailing || [])
    end

    # The banner for this class. You can customize it if you are invoking the
    # thor gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/version.rb000064400000000054150403134010021012 0ustar00   @usage, @desc, @long_desc, @method_optiongems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions.rb000064400000025040150403134010020767 0ustar00ses, this logic
    # will determine if a shortened command is an unambiguous substring of
    # a command or alias.
    #
    # +normalize_command_name+ also converts names like +animal-prison+
    # into +animal_prison+.
    def normalize_command_name(meth) #:nodoc:
      return default_command.to_s.tr("-", "_") unless meth

      possibilities = find_command_possibilities(meth)
      raise AmbiguousTaskError, "Ambiguous command #{meth} matches [#{possibilities.join(', ')}]" if possibilities.size > 1

      if possibilities.empty?
        meth ||= default_command
      elsif map[meth]
        meth = map[meth]
      else
        meth = possibilities.first
      end

      meth.to_s.tr("-", "_") # treat foo-bar as foo_bar
    end
    alias_method :normalize_task_name, :normalize_command_name

    # this is the logic that takes the command name passed in by the user
    # and determines whether it is an unambiguous substrings of a command or
    # alias name.
    def find_command_possibilities(meth)
      len = meth.to_s.length
      possibilities = all_commands.merge(map).keys.select { |n| meth == n[0, len] }.sort
      unique_possibilities = possibilities.map { |k| map[k] || k }.uniq

      if possibilities.include?(meth)
        [meth]
      elsif unique_possibilities.size == 1
        unique_possibilities
      else
        possibilities
      end
    end
    alias_method :find_task_possibilities, :find_command_possibilities

    def subcommand_help(cmd)
      desc "help [COMMAND]", "Describe subcommands or one specific subcommand"
      class_eval "
        def help(command = nil, subcommand = true); super; end
"
    end
    alias_method :subtask_help, :subcommand_help
  end

  include Bundler::Thor::Base

  map HELP_MAPPINGS => :help

  desc "help [COMMAND]", "Describe available commands or one specific command"
  def help(command = nil, subcommand = false)
    if command
      if self.class.subcommands.include? command
        self.class.subcommand_classes[command].help(shell, true)
      else
        self.class.command_help(shell, command)
      end
    else
      self.class.help(shell, subcommand)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/version.rb000064400000000054150403134010021012 0ustar00class Bundler::Thor
  VERSION = "1.2.1"
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions.rb000064400000025040150403134010020767 0ustar00require_relative "actions/create_file"
require_relative "actions/create_link"
require_relative "actions/directory"
require_relative "actions/empty_directory"
require_relative "actions/file_manipulation"
require_relative "actions/inject_into_file"

class Bundler::Thor
  module Actions
    attr_accessor :behavior

    def self.included(base) #:nodoc:
      super(base)
      base.extend ClassMethods
    end

    module ClassMethods
      # Hold source paths for one Bundler::Thor instance. source_paths_for_search is the
      # method responsible to gather source_paths from this current class,
      # inherited paths and the source root.
      #
      def source_paths
        @_source_paths ||= []
      end

      # Stores and return the source root for this class
      def source_root(path = nil)
        @_source_root = path if path
        @_source_root ||= nil
      end

      # Returns the source paths in the following order:
      #
      #   1) This class source paths
      #   2) Source root
      #   3) Parents source paths
      #
      def source_paths_for_search
        paths = []
        paths += source_paths
        paths << source_root if source_root
        paths += from_superclass(:source_paths, [])
        paths
      end

      # Add runtime options that help actions execution.
      #
      def add_runtime_options!
        class_option :force, :type => :boolean, :aliases => "-f", :group => :runtime,
                             :desc => "Overwrite files that already exist"

        class_option :pretend, :type => :boolean, :aliases => "-p", :group => :runtime,
                               :desc => "Run but do not make any changes"

        class_option :quiet, :type => :boolean, :aliases => "-q", :group => :runtime,
                             :desc => "Suppress status output"

        class_option :skip, :type => :boolean, :aliases => "-s", :group => :runtime,
                            :desc => "Skip files that already exist"
      end
    end

    # Extends initializer to add more configuration options.
    #
    # ==== Configuration
    # behavior<Symbol>:: The actions default behavior. Can be :invoke or :revoke.
    #                    It also accepts :force, :skip and :pretend to set the behavior
    #                    and the respective option.
    #
    # destination_root<String>:: The root directory needed for some actions.
    #
    def initialize(args = [], options = {}, config = {})
      self.behavior = case config[:behavior].to_s
      when "force", "skip"
        _cleanup_options_and_set(options, config[:behavior])
        :invoke
      when "revoke"
        :revoke
      else
        :invoke
      end

      super
      self.destination_root = config[:destination_root]
    end

    # Wraps an action object and call it accordingly to the thor class behavior.
    #
    def action(instance) #:nodoc:
      if behavior == :revoke
        instance.revoke!
      else
        instance.invoke!
      end
    end

    # Returns the root for this thor class (also aliased as destination root).
    #
    def destination_root
      @destination_stack.last
    end

    # Sets the root for this thor class. Relatives path are added to the
    # directory where the script was invoked and expanded.
    #
    def destination_root=(root)
      @destination_stack ||= []
      @destination_stack[0] = File.expand_path(root || "")
    end

    # Returns the given path relative to the absolute root (ie, root where
    # the script started).
    #
    def relative_to_original_destination_root(path, remove_dot = true)
      root = @destination_stack[0]
      if path.start_with?(root) && [File::SEPARATOR, File::ALT_SEPARAgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/version.rb000064400000000054150403134010021012 0ustar00rce paths. ".dup

      unless self.class.sogems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions.rb000064400000025040150403134010020767 0ustar00     say_status :inside, dir, verbose
      shell.padding += 1 if verbose
      @destination_stack.push File.expand_path(dir, destination_root)

      # If the directory doesnt exist and we're not pretending
      if !File.exist?(destination_root) && !pretend
        require "fileutils"
        FileUtils.mkdir_p(destination_root)
      end

      result = nil
      if pretend
        # In pretend mode, just yield down to the block
        result = block.arity == 1 ? yield(destination_root) : yield
      else
        require "fileutils"
        FileUtils.cd(destination_root) { result = block.arity == 1 ? yield(destination_root) : yield }
      end

      @destination_stack.pop
      shell.padding -= 1 if verbose
      result
    end

    # Goes to the root and execute the given block.
    #
    def in_root
      inside(@destination_stack.first) { yield }
    end

    # Loads an external file and execute it in the instance binding.
    #
    # ==== Parameters
    # path<String>:: The path to the file to execute. Can be a web address or
    # gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb000064400000031621150403134010024470 0ustar00 to command execution.
    #
    # ==== Example
    #
    #   inside('vendor') do
    #     run('ln -s ~/edge rails')
    #   end
    #
    def run(command, config = {})
      return unless behavior == :invoke

      destination = relative_to_original_destination_root(destination_root, false)
      desc = "#{command} from #{destination.inspect}"

      if config[:with]
        desc = "#{File.basename(config[:with].to_s)} #{desc}"
        command = "#{config[:with]} #{command}"
      end

      say_status :run, desc, config.fetch(:verbose, true)

      return if options[:pretend]

      env_splat = [config[:env]] if config[:env]

      if config[:capture]
        require "open3"
        result, status = Open3.capture2e(*env_splat, command.to_s)
        success = status.success?
      else
        result = system(*env_splat, command.to_s)
        success = result
      end

      abort if !success && config.fetch(:abort_on_failure, self.class.exit_on_failure?)

      result
    end

    # Executes a ruby script (taking into account WIN32 platform quirks).
    #
    # ==== Parameters
    # command<String>:: the command to be executed.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    def run_ruby_script(command, config = {})
      return unless behavior == :invoke
      run command, config.merge(:with => Bundler::Thor::Util.ruby_command)
    end

    # Run a thor command. A hash of options can be given and it's converted to
    # switches.
    #
    # ==== Parameters
    # command<String>:: the command to be invoked
    # args<Array>:: arguments to the command
    # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output.
    #                Other options are given as parameter to Bundler::Thor.
    #
    #
    # ==== Examples
    #
    #   thor :install, "http://gist.github.com/103208"
    #   #=> thor install http://gist.github.com/103208
    #
    #   thor :list, :all => true, :substring => 'rails'
    #   #=> thor list --all --substring=rails
    #
    def thor(command, *args)
      config  = args.last.is_a?(Hash) ? args.pop : {}
      verbose = config.key?(:verbose) ? config.delete(:verbose) : true
      pretend = config.key?(:pretend) ? config.delete(:pretend) : false
      capture = config.key?(:capture) ? config.delete(:capture) : false

      args.unshift(command)
      args.push Bundler::Thor::Options.to_switches(config)
      command = args.join(" ").strip

      run command, :with => :thor, :verbose => verbose, :pretend => pretend, :capture => capture
    end

  protected

    # Allow current root to be shared between invocations.
    #
    def _shared_configuration #:nodoc:
      super.merge!(:destination_root => destination_root)
    end

    def _cleanup_options_and_set(options, key) #:nodoc:
      case options
      when Array
        %w(--force -f --skip -s).each { |i| options.delete(i) }
        options << "--#{key}"
      when Hash
        [:force, :skip, "force", "skip"].each { |i| options.delete(i) }
        options.merge!(key => true)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb000064400000031621150403134010024470 0ustar00require "erb"

class Bundler::Thor
  module Actions
    # Copies the file from the relative source to the relative destination. If
    # the destination is not given it's assumed to be equal to the source.
    #
    # ==== Parameters
    # source<String>:: the relative path to the source root.
    # destination<String>:: the relative path to the destination root.
    # config<Hash>:: give :verbose => false to not log the status, and
    #                :mode => :preserve, to preserve the file mode from the source.

    #
    # ==== Examples
    #
    #   copy_file "README", "doc/README"
    #
    #   copy_file "doc/README"
    #
    def copy_file(source, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      destination = args.first || source
      source = File.expand_path(find_in_source_paths(source.to_s))

      resulting_destination = create_file destination, nil, config do
        content = File.binread(source)
        content = yield(content) if block
        content
      end
      if config[:mode] == :preserve
        mode = File.stat(source).mode
        chmod(resulting_destination, mode, config)
      end
    end

    # Links the file from the relative source to the relative destination. If
    # the destination is not given it's assumed to be equal to the source.
    #
    # ==== Parameters
    # source<String>:: the relative path to the source root.
    # destination<String>:: the relative path to the destination root.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Examples
    #
    #   link_file "README", "doc/README"
    #
    #   link_file "doc/README"
    #
    def link_file(source, *args)
      config = args.last.is_a?(Hash) ? args.pop : {}
      destination = args.first || source
      source = File.expand_path(find_in_source_paths(source.to_s))

      create_link destination, source, config
    end

    # Gets the content at the given address and places it at the given relative
    # destination. If a block is given instead of destination, the content of
    # the url is yielded and used as location.
    #
    # +get+ relies on open-uri, so passing application user input would provide
    # a command injection attack vector.
    #
    # ==== Parameters
    # source<String>:: the address of the given content.
    # destination<String>:: the relative path to the destination root.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Examples
    #
    #   get "http://gist.github.com/103208", "doc/README"
    #
    #   get "http://gist.github.com/103208" do |content|
    #     content.split("\n").first
    #   end
    #
    def get(source, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      destination = args.first

      render = if source =~ %r{^https?\://}
        require "open-uri"
        URI.send(:open, source) { |input| input.binmode.read }
      else
        source = File.expand_path(find_in_source_paths(source.to_s))
        open(source) { |input| input.binmode.read }
      end

      destination ||= if block_given?
        block.arity == 1 ? yield(render) : yield
      else
        File.basename(source)
      end

      create_file destination, render, config
    end

    # Gets an ERB template at the relative source, executes it and makes a copy
    # at the relative destination. If the destination is not given it's assumed
    # to be equal to the source removing .tt from the filename.
    #
    # ==== Parameters
    # source<String>:: the relative path to the source root.
    # destination<String>:: the relative path to the destination root.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Examples
    #
    #   template "README", "doc/README"
    #
    #   template "doc/README"
    #
    def template(source, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      destination = args.first || source.sub(/#{TEMPLATE_EXTNAME}$/, "")

      source  = File.expand_path(find_in_source_paths(source.to_s))
      context = config.delete(:context) || instance_eval("binding")

      create_file destination, nil, config do
        match = ERB.version.match(/(\d+\.\d+\.\d+)/)
        capturable_erb = if match && match[1] >= "2.2.0" # Ruby 2.6+
          CapturableERB.new(::File.binread(source), :trim_mode => "-", :eoutvar => "@output_buffer")
        else
          CapturableERB.new(::File.binread(source), nil, "-", "@output_buffer")
        end
        content = capturable_erb.tap do |erb|
          erb.filename = source
        end.result(context)
        content = yield(contengems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb000064400000031621150403134010024470 0ustar00se => false to not log the status.
    #
    # ==== Example
    #
    #   prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"'
    #
    #   prepend_to_file 'config/environments/test.rb' do
    #     'config.gem "rspec"'
    #   end
    #
    def prepend_to_file(path, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      config[:after] = /\A/
      insert_into_file(path, *(args << config), &block)
    end
    alias_method :prepend_file, :prepend_to_file

    # Append text to a file. Since it depends on insert_into_file, it's reversible.
    #
    # ==== Parameters
    # path<String>:: path of the file to be changed
    # data<String>:: the data to append to the file, can be also given as a block.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Example
    #
    #   append_to_file 'config/environments/test.rb', 'config.gem "rspec"'
    #
    #   append_to_file 'config/environments/test.rb' do
    #     'config.gem "rspec"'
    #   end
    #
    def append_to_file(path, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      config[:before] = /\z/
      insert_into_file(path, *(args << config), &block)
    end
    alias_method :append_file, :append_to_file

    # Injects text right after the class definition. Since it depends on
    # insert_into_file, it's reversible.
    #
    # ==== Parameters
    # path<String>:: path of the file to be changed
    # klass<String|Class>:: the class to be manipulated
    # data<String>:: the data to append to the class, can be also given as a block.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Examples
    #
    #   inject_into_class "app/controllers/application_controller.rb", "ApplicationController", "  filter_parameter :password\n"
    #
    #   inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do
    #     "  filter_parameter :password\n"
    #   end
    #
    def inject_into_class(path, klass, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      config[:after] = /class #{klass}\n|class #{klass} .*\n/
      insert_into_file(path, *(args << config), &block)
    end

    # Injects text right after the module definition. Since it depends on
    # insert_into_file, it's reversible.
    #
    # ==== Parameters
    # path<String>:: path of the file to be changed
    # module_name<String|Class>:: the module to be manipulated
    # data<String>:: the data to append to the class, can be also given as a block.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Examples
    #
    #   inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", "  def help; 'help'; end\n"
    #
    #   inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do
    #     "  def help; 'help'; end\n"
    #   end
    #
    def inject_into_module(path, module_name, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      config[:after] = /module #{module_name}\n|module #{module_name} .*\n/
      insert_into_file(path, *(args << config), &block)
    end

    # Run a regular expression replacement on a file.
    #
    # ==== Parameters
    # path<String>:: path of the file to be changed
    # flag<Regexp|String>:: the regexp or string to be replaced
    # replacement<String>:: the replacement, can be also given as a block
    # config<Hash>:gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb000064400000006766150403134010024311 0ustar00n_root)
      say_status :gsub, relative_to_original_destination_root(path), config.fetch(:verbose, true)

      unless options[:pretend]
        content = File.binread(path)
        content.gsub!(flag, *args, &block)
        File.open(path, "wb") { |file| file.write(content) }
      end
    end

    # Uncomment all lines matching a given regex.  It will leave the space
    # which existed before the comment hash in tact but will remove any spacing
    # between the comment hash and the beginning of the line.
    #
    # ==== Parameters
    # path<String>:: path of the file to be changed
    # flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Example
    #
    #   uncomment_lines 'config/initializers/session_store.rb', /active_record/
    #
    def uncomment_lines(path, flag, *args)
      flag = flag.respond_to?(:source) ? flag.source : flag

      gsub_file(path, /^(\s*)#[[:blank:]]*(.*#{flag})/, '\1\2', *args)
    end

    # Comment all lines matching a given regex.  It will leave the space
    # which existed before the beginning of the line in tact and will insert
    # a single space after the comment hash.
    #
    # ==== Parameters
    # path<String>:: path of the file to be changed
    # flag<Regexp|String>:: the regexp or string used to decide which lines to comment
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Example
    #
    #   comment_lines 'config/initializers/session_store.rb', /cookie_store/
    #
    def comment_lines(path, flag, *args)
      flag = flag.respond_to?(:source) ? flag.source : flag

      gsub_file(path, /^(\s*)([^#\n]*#{flag})/, '\1# \2', *args)
    end

    # Removes a file at the given location.
    #
    # ==== Parameters
    # path<String>:: path of the file to be changed
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Example
    #
    #   remove_file 'README'
    #   remove_file 'app/controllers/application_controller.rb'
    #
    def remove_file(path, config = {})
      return unless behavior == :invoke
      path = File.expand_path(path, destination_root)

      say_status :remove, relative_to_original_destination_root(path), config.fetch(:verbose, true)
      if !options[:pretend] && (File.exist?(path) || File.symlink?(path))
        require "fileutils"
        ::FileUtils.rm_rf(path)
      end
    end
    alias_method :remove_dir, :remove_file

    attr_accessor :output_buffer
    private :output_buffer, :output_buffer=

  private

    def concat(string)
      @output_buffer.concat(string)
    end

    def capture(*args)
      with_output_buffer { yield(*args) }
    end

    def with_output_buffer(buf = "".dup) #:nodoc:
      raise ArgumentError, "Buffer can not be a frozen object" if buf.frozen?
      old_buffer = output_buffer
      self.output_buffer = buf
      yield
      output_buffer
    ensure
      self.output_buffer = old_buffer
    end

    # Bundler::Thor::Actions#capture depends on what kind of buffer is used in ERB.
    # Thus CapturableERB fixes ERB to use String buffer.
    class CapturableERB < ERB
      def set_eoutvar(compiler, eoutvar = "_erbout")
        compiler.put_cmd = "#{eoutvar}.concat"
        compiler.insert_cmd = "#{eoutvar}.concat"
        compiler.pre_cmd = ["#{eoutvar} = ''.dup"]
        compiler.post_cmd = [eoutvar]
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb000064400000006051150403134010023232 0ustar00require_relative "empty_directory"

class Bundler::Thor
  module Actions
    # Injects the given content into a file. Different from gsub_file, this
    # method is reversible.
    #
    # ==== Parameters
    # destination<String>:: Relative path to the destination root
    # data<String>:: Data to add to the file. Can be given as a block.
    # config<Hash>:: give :verbose => false to not log the status and the flag
    #                for injection (:after or :before) or :force => true for
    #                insert two or more times the same content.
    #
    # ==== Examples
    #
    #   insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n"
    #
    #   insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do
    #     gems = ask "Which gems would you like to add?"
    #     gems.split(" ").map{ |gem| "  config.gem :#{gem}" }.join("\n")
    #   end
    #
    WARNINGS = { unchanged_no_flag: 'File unchanged! The supplied flag value not found!' }

    def insert_into_file(destination, *args, &block)
      data = block_given? ? block : args.shift

      config = args.shift || {}
      config[:after] = /\z/ unless config.key?(:before) || config.key?(:after)

      action InjectIntoFile.new(self, destination, data, config)
    end
    alias_method :inject_into_file, :insert_into_file

    class InjectIntoFile < EmptyDirectory #:nodoc:
      attr_reader :replacement, :flag, :behavior

      def initialize(base, destination, data, config)
        super(base, destination, {:verbose => true}.merge(config))

        @behavior, @flag = if @config.key?(:after)
          [:after, @config.delete(:after)]
        else
          [:before, @config.delete(:before)]
        end

        @replacement = data.is_a?(Proc) ? data.call : data
        @flag = Regexp.escape(@flag) unless @flag.is_a?(Regexp)
      end

      def invoke!
        content = if @behavior == :after
          '\0' + replacement
        else
          replacement + '\0'
        end

        if exists?
          if replace!(/#{flag}/, content, config[:force])
            say_status(:invoke)
          else
            say_status(:unchanged, warning: WARNINGS[:unchanged_no_flag], color: :red)
          end
        else
          unless pretend?
            raise Bundler::Thor::Error, "The file #{ destination } does not appear to exist"
          end
        end
      end

      def revoke!
        say_status :revoke

        regexp = if @behavior == :after
          content = '\1\2'
          /(#{flag})(.*)(#{Regexp.escape(replacement)})/m
        else
          content = '\2\3'
          /(#{Regexp.escape(replacement)})(.*)(#{flag})/m
        end

        replace!(regexp, content, true)
      end

    protected

      def say_status(behavior, warning: nil, color: nil)
        status = if behavior == :invoke
          if flag == /\A/
            :prepend
          elsif flag == /\z/
            :append
          else
            :insert
          end
        elsif warning
          warning
        else
         gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/directory.rb000064400000007411150403134010022775 0ustar00require_relative "empty_directory"

class Bundler::Thor
  module Actions
    # Create a new file relative to the destination root with the given data,
    # which is the return value of a block or a data string.
    #
    # ==== Parameters
    # destination<String>:: the relative path to the destination root.
    # data<String|NilClass>:: the data to append to the file.
    # config<Hash>:: give :verbose => false to not log the status.
    #
    # ==== Examples
    #
    #   create_file "lib/fun_party.rb" do
    #     hostname = ask("What is the virtual hostname I should use?")
    #     "vhost.name = #{hostname}"
    #   end
    #
    #   create_file "config/apache.conf", "your apache config"
    #
    def create_file(destination, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      data = args.first
      action CreateFile.new(self, destination, block || data.to_s, config)
    gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb000064400000006766150403134010024311 0ustar00binread(destination) == render
      end

      # Holds the content to be added to the file.
      #
      def render
        @render ||= if data.is_a?(Proc)
          data.call
        else
          data
        end
      end

      def invoke!
        invoke_with_conflict_check do
          require "fileutils"
          FileUtils.mkdir_p(File.dirname(destination))
          File.open(destination, "wb") { |f| f.write render }
        end
        given_destination
      end

    protected

      # Now on conflict we check if the file is identical or not.
      #
      def on_conflict_behavior(&block)
        if identical?
          say_status :identical, :blue
        else
          options = base.options.merge(config)
          force_or_skip_or_conflict(options[:force], options[:skip], &block)
        end
      end

      # If force is true, run the action, otherwise check if it's not being
      # skipped. If both are false, show the file_collision menu, if the menu
      # returns true, force it, otherwise skip.
      #
      def force_or_skip_or_conflict(force, skip, &block)
        if force
          say_status :force, :yellow
          yield unless pretend?
        elsif skip
          say_status :skip, :yellow
        else
          say_status :conflict, :red
          force_or_skip_or_conflict(force_on_collision?, true, &block)
        end
      end

      # Shows the file collision menu to the user and gets the result.
      #
      def force_on_collision?
        base.shell.file_collision(destination) { render }
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/directory.rb000064400000007411150403134010022775 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb000064400000010374150403134010024215 0ustar00d with the returned
    # value. Let's suppose a doc directory with the following files:
    #
    #   doc/
    #     components/.empty_directory
    #     README
    #     rdoc.rb.tt
    #     %app_name%.rb
    #
    # When invoked as:
    #
    #   directory "doc"
    #
    # It will create a doc directory in the destination with the following
    # files (assuming that the `app_name` method returns the value "blog"):
    #
    #   doc/
    #     components/
    #     README
    #     rdoc.rb
  gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb000064400000006051150403134010023232 0ustar00 log the status.
    #                If :recursive => false, does not look for paths recursively.
    #                If :mode => :preserve, preserve the file mode from the source.
    #                If :exclude_pattern => /regexp/, prevents copying files that match that regexp.
    #
    # ==== Examples
    #
    #   directory "doc"
    #   directory "doc", "docs", :recursive => false
    #
    def directory(source, *args, &block)
      config = args.last.is_a?(Hash) ? args.pop : {}
      destination = args.first || source
      action Directory.new(self, source, destination || source, config, &block)
    end

    class Directory < EmptyDirectory #:nodoc:
      attr_reader :source

      def initialize(base, source, destination = nil, config = {}, &block)
        @source = File.expand_path(Dir[Util.escape_globs(base.find_in_source_paths(source.to_s))].first)
        @block  = block
        super(base, destination, {:recursive => true}.merge(config))
      end

      def invoke!
        base.empty_directory given_destination, config
        execute!
      end

      def revoke!
        execute!
      end

    protected

      def execute!
        lookup = Util.escape_globs(source)
        lookup = config[:recursive] ? File.join(lookup, "**") : lookup
        lookup = file_level_lookup(lookup)

        files(lookup).sort.each do |file_source|
          next if File.directory?(file_source)
          next if config[:exclude_pattern] && file_source.match(config[:exclude_pattern])
          file_destination = File.join(given_destination, file_source.gsub(source, "."))
          file_destination.gsub!("/./", "/")

          case file_source
          when /\.empty_directory$/
            dirname = File.dirname(file_destination).gsub(%r{/\.$}, "")
            next if dirname == given_destination
            base.empty_directory(dirname, config)
          when /#{TEMPLATE_EXTNAME}$/
            base.template(file_source, file_destination[0..-4], config, &@block)
          else
            base.copy_file(file_source, file_destination, config, &@block)
          end
        end
      end

      def file_level_lookup(previous_lookup)
        File.join(previous_lookup, "*")
      end

      def files(lookup)
        Dir.glob(lookup, File::FNM_DOTMATCH)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb000064400000010374150403134010024215 0ustar00class Bundler::Thor
  module Actions
    gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb000064400000003555150403134020023257 0ustar00f this file
      # destination<String>:: Relative path to the destination of this file
      # config<Hash>:: give :verbose => false to not log the status.
      #
      def initialize(base, destination, config = {})
        @base = base
        @config = {:verbose => true}.merge(config)
        self.destination = destination
      end

      # Checks if the destination file already exists.
      #
      # ==== Returns
      # Boolean:: true if the file exists, false otherwise.
      #
      def exists?
        ::File.exist?(destination)
      end

      def invoke!
        invoke_with_conflict_check do
          require "fileutils"
          ::FileUtils.mkdir_p(destination)
        end
      end

      def revoke!
        say_status :remove, :red
        require "fileutils"
        ::FileUtils.rm_rf(destination) if !pretend? && exists?
        given_destination
      end

    protected

      # Shortcut for pretend.
      #
      def pretend?
        base.options[:pretend]
      end

      # Sets the absolute destination value from a relative destination value.
      # It also stores the given and relative destination. Let's suppose our
      # script is being executed on "dest", it sets the destination root to
      # "dest". The destination, given_destination and relative_destination
      # are related in the following way:
      #
      #   inside "bar" do
      #     empty_directory "baz"
      #   end
      #
      #   destination          #=> dest/bar/baz
      #   relative_destination #=> bar/baz
      #   given_destination    #=> baz
      #
      def destination=(destination)
        return unless destination
        @given_destination = convert_encoded_instructions(destination.to_s)
        @destination = ::File.expand_path(@given_destination, base.destination_root)
        @relative_destination = base.relative_to_original_destination_root(@destination)
  gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/error.rb000064400000006776150403134020020500 0ustar00    # conditions are met.
      #
      def invoke_with_conflict_check(&block)
        if exists?
          on_conflict_behavior(&block)
        else
          yield unless pretend?
          say_status :create, :green
        end

        destination
      rescue Errno::EISDIR, Errno::EEXIST
        on_file_clash_behavior
      end

      def on_file_clash_behavior
        say_status :file_clash, :red
      end

      # What to do when the destination file already exists.
      #
      def on_conflict_behavior
        say_status :exist, :blue
      end

      # Shortcut to say_status shell method.
      #
      def say_status(status, color)
        base.shell.say_status status, relative_destination, color if config[:verbose]
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb000064400000003555150403134020023257 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb000064400000010374150403134010024215 0ustar00tc/apache.conf"
    #
    def create_link(destination, *args)
      config = args.last.is_a?(Hash) ? args.pop : {}
      source = args.first
      action CreateLink.new(self, destination, source, config)
    end
    alias_method :add_link, :create_link

    # CreateLink is a subset of CreateFile, which instead of taking a block of
    # data, just takes a source string from the user.
    #
    class CreateLink < CreateFile #:nodoc:
      attr_reader :data

      # Checks if the content of the file at the destination is identical to the rendered result.
      #
      # ==== Returns
      # Boolean:: true if it is identical, false otherwise.
      #
      def identical?
        source = File.expand_path(render, File.dirname(destination))
        exists? && File.identical?(source, destination)
      end

      def invoke!
        invoke_with_conflict_check do
          require "fileutils"
          FileUtils.mkdir_p(File.dirname(destination))
          # Create a symlink by default
          config[:symbolic] = true if config[:symbolic].nil?
          File.unlink(destination) if exists?
          if config[:symbolic]
            File.symlink(render, destination)
          else
            File.link(render, destination)
          end
        end
        given_destination
      end

      def exists?
        super || File.symlink?(destination)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb000064400000001175150403134020022711 0ustar00class Bundler::Thor
  Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # rubocop:disable Naming/ConstantName
                  # In order to support versions of Ruby that don't have keyword
                  # arguments, we need our own spell checker class that doesn't take key
                  # words. Even though this code wouldn't be hit because of the check
                  # above, it's still necessary because the interpreter would otherwise be
                  # unable to parse the file.
                  class NoKwargSpellChecker < DidYouMean::SpellChecker # :nodoc:
              gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb000064400000003467150403134020023421 0ustar00(&:inspect)
      end

      def spell_checker
        NoKwargSpellChecker.new(error.all_commands)
      end
    end

    attr_reader :command, :all_commands

    def initialize(command, all_commands, namespace)
      @command = command
      @all_commands = all_commands

      message = "Could not find command #{command.inspect}"
      message = namespace ? "#{message} in #{namespace.inspect} namespace." : "#{message}."

      super(message)
    end

    prepend Correctable if Correctable
  end
  UndefinedTaskError = UndefinedCommandError

  class AmbiguousCommandError < Error
  end
  AmbiguousTaskError = AmbiguousCommandError

  # Raised when a command was found, but not invoked properly.
  class InvocationError < Error
  end

  class UnknownArgumentErgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb000064400000003555150403134020023257 0ustar00ctable
    if DidYouMean.respond_to?(:correct_error)
      DidYouMean.correct_error(Bundler::Thor::UndefinedCommandError, UndefinedCommandError::SpellChecker)
      DidYouMean.correct_error(Bundler::Thor::UnknownArgumentError, UnknownArgumentError::SpellChecker)
    else
      DidYouMean::SPELL_CHECKERS.merge!gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/util.rb000064400000021530150403134030020306 0ustar00class Bundler::Thor
  module LineEditor
    class Basic
      attr_reader :prompt, :options

      def self.available?
        true
      end

      def initialize(prompt, options)
        @prompt = prompt
        @options = options
      end

      def readline
        $stdout.print(prompt)
        get_input
      end

    private

      def get_input
        if echo?
          $stdin.gets
        else
          # Lazy-load io/console since it is gem-ified as of 2.3
          require "io/console"
          $stdin.noecho(&:gets)
        end
      end

      def echo?
        options.fetch(:echo, true)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/error.rb000064400000006776150403134020020500 0ustar00class Bundler::Thor
  module LineEditor
    class Readline < Basic
      def self.available?
        begin
          require "readline"
        rescue LoadError
        end

        Object.const_defined?(:Readline)
      end

      def readline
        if echo?
          ::Readline.completion_append_character = nil
          # rb-readline does not allow Readline.completion_proc= to receive nil.
          if complete = completion_proc
            ::Readline.completion_proc = complete
          end
          ::Readline.readline(prompt, add_to_history?)
        else
          super
        end
      end

    private

      def add_to_history?
        options.fetch(:add_to_history, true)
      end

      def completion_proc
        if use_path_completion?
          proc { |text| PathCompletion.new(text).matches }
        elsif completion_options.any?
          proc do |text|
            completion_options.select { |option| option.start_with?(text) }
          end
        end
      end

      def completion_options
        options.fetch(:limited_to, [])
      end

      def use_path_completion?
        options.fetch(:path, false)
      end

      class PathCompletion
        attr_reader :text
        private :text

        def initialize(text)
          @text = text
        end

        def matches
          relative_matches
        end

      private

        def relative_matches
          absolute_matches.map { |path| path.sub(base_path, "") }
        end

        def absolute_matches
          Dir[glob_pattern].map do |path|
            if File.directory?(path)
              "#{path}/"
            else
              path
            end
          end
        end

        def glob_pattern
          "#{base_path}#{text}*"
        end

        def base_path
          "#{Dir.pwd}/"
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/util.rb000064400000021530150403134030020306 0ustar00require "rbconfig"

class Bundler::Thor
  module Sandbox #:nodoc:
  end

  # This module holds several utilities:
  #
  # 1) Methods to convert thor namespaces to constants and vice-versa.
  #
  #   Bundler::Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz"
  #
  # 2) Loading thor files and sandboxing:
  #
  #   Bundler::Thor::Util.load_thorfile("~/.thor/foo")
  #
  module Util
    class << self
      # Receives a namespace and search for it in the Bundler::Thor::Base subclasses.
      #
      # ==== Parameters
      # namespace<String>:: The namespace to search for.
      #
      def find_by_namespace(namespace)
        namespace = "default#{namespace}" if namespace.empty? || namespace =~ /^:/
        Bundler::Thor::Base.subclasses.detect { |klass| klass.namespace == namespace }
      end

      # Receives a constant and converts it to a Bundler::Thor namespace. Since Bundler::Thor
      # commands can be added to a sandbox, this method is also responsible for
      # removing the sandbgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb000064400000001175150403134020022711 0ustar00constant = constant.to_s.gsub(/^Bundler::Thor::Sandbox::/, "")
        constant = snake_case(constant).squeeze(":")
        constant
      end

      # Given the contents, evaluate it inside the sandbox and returns the
      # namespaces defined in the sandbox.
      #
      # ==== Parameters
      # contents<String>
      #
      # ==== Returns
      # Array[Object]
      #
      def namespaces_in_content(contents, file = __FILE__)
        old_constants = Bundler::Thor::Base.subclasses.dup
        Bundler::Thor::Base.subclasses.clear

        load_thorfile(file, contents)

        new_constants = Bundler::Thor::Base.subclasses.dgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb000064400000003467150403134020023421 0ustar00eceives a string and convert it to camel case. camel_case returns CamelCase.
      #
      # ==== Parameters
      # String
      #
      # ==== Returns
      # String
      #
      def camel_case(str)
        return str if str !~ /_/ && str =~ /[A-Z]+.*/
        str.split("_").map(&:capitalize).join
      end

      # Receives a namespace and tries to retrieve a Bundler::Thor or Bundler::Thor::Group class
      # from it. It first searches for a class using the all the given namespace,
      # if it's not found, removes the highest entry and searches for the class
      # again. If found, returns the highest entry as the class name.
      #
      # ==== Examples
      #
      #   class Foo::Bar < Bundler::Thor
      #     def baz
      #     end
      #   end
      #
      #   class Baz::Foo < Bundler::Thor::Group
      #   end
      #
      #   Bundler::Thor::Util.namespace_to_thor_class("foo:bar")     #=> Foo::Bar, nil # will invoke default command
      #   Bundler::Thor::Util.namespace_to_thor_class("baz:foo")     #=> Baz::Foo, nil
      #   Bundler::Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz"
      #
      # ==== Parameters
      # namespace<String>
      #
      def find_class_and_command_by_namespace(namespace, fallback = true)
        if namespace.include?(":") # look for a namespaced command
          pieces  = namespace.split(":")
          command = pieces.pop
          klass   = Bundler::Thor::Util.find_by_namespace(pieces.join(":"))
        end
        unless klass # look for a Bundler::Thor::Group with the right name
          klass = Bundler::Thor::Util.find_by_namespace(namespace)
          command = nil
        end
        if !klass && fallback # try a command in the default namespace
          command = namespace
          klass   = Bundler::Thor::Util.find_by_namespace("gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/base.rb000064400000060266150403134040020255 0ustar00 end
        end
      end

      def user_home
        @@user_home ||= if ENV["HOME"]
          ENV["HOME"]
        elsif ENV["USERPROFILE"]
          ENV["USERPROFILE"]
        elsif ENV["HOMEDRIVE"] && ENV["HOMEPATH"]
          File.join(ENV["HOMEDRIVE"], ENV["HOMEPATH"])
        elsif ENV["APPDATA"]
          ENV["APPDATA"]
        else
          begin
            File.expand_path("~")
          rescue
            if File::ALT_SEPARATOR
              "C:/"
            else
              "/"
            end
          end
        end
      end

      # Returns the root where thor files are located, depending on the OS.
      #
      def thor_root
        File.join(user_home, ".thor").tr('\\', "/")
      end

      # Returns the files in the thor root. On Windows thor_root will be something
      # like this:
      #
      #   C:\Documents and Settings\james\.thor
      #
      # If we don't #gsub the \ character, Dir.glob will fail.
      #
      def thor_root_glob
        files = Dir["#{escape_globs(thor_root)}/*"]

        files.map! do |file|
          File.directory?(file) ? File.join(file, "main.thor") : file
        end
      end

      # Where to look for Bundler::Thor files.
      #
      def globs_for(path)
        path = escape_globs(path)
        ["#{path}/Thorfile", "#{path}/*.thor", "#{path}/tasks/*.thor", "#{path}/lib/tasks/**/*.thor"]
      end

      # Return the path to the ruby interpreter taking into account multiple
      # installations and windows extensions.
      #
      def ruby_command
        @ruby_command ||= begin
          ruby_name = RbConfig::CONFIG["ruby_install_name"]
          ruby = File.join(RbConfig::CONFIG["bindir"], ruby_name)
          ruby << RbConfig::CONFIG["EXEEXT"]

          # avoid using different name than ruby (on platforms supporting links)
          if ruby_name != "ruby" && File.respond_to?(:readlink)
            begin
              alternate_ruby = File.join(RbConfig::CONFIG["bindir"], "ruby")
              alternate_ruby << RbConfig::CONFIG["EXEEXT"]

              # ruby is a symlink
              if File.symlink? alternate_ruby
                linked_ruby = File.readlink alternate_ruby

                # symlink points to 'ruby_install_name'
                ruby = alternate_ruby if linked_ruby == ruby_name || linked_ruby == ruby
              end
            rescue NotImplementedError # rubocop:disable HandleExceptions
              # just ignore on windows
            end
          end

          # escape string in case path to ruby executable contain spaces.
          ruby.sub!(/.*\s.*/m, '"\&"')
          ruby
        end
      end

      # Returns a string that has had any glob characters escaped.
      # The glob characters are `* ? { } [ ]`.
      #
      # ==== Examples
      #
      #   Bundler::Thor::Util.escape_globs('[apps]')   # => '\[apps\]'
      #
      # ==== Parameters
      # String
      #
      # ==== Returns
      # String
      #
      def escape_globs(path)
        path.to_s.gsub(/[*?{}\[\]]/, '\\\\\\&')
      end

      # Returns a string that has had any HTML characters escaped.
      #
      # ==== Examples
      #
      #   Bundler::Thor::Util.escape_html('<div>')   # => "&lt;div&gt;"
      #
      # ==== Parameters
      # String
      #
      # ==== Returns
      # String
      #
      def escape_html(string)
        CGI.escapeHTML(string)
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/base.rb000064400000060266150403134040020255 0ustar00require_relative "command"
require_relative "core_ext/hash_with_indifferent_access"
require_relative "error"
require_relative "invocation"
require_relative "nested_context"
require_relative "parser"
require_relative "shell"
require_relative "line_editor"
require_relative "util"

class Bundler::Thor
  autoload :Actions,    File.expand_path("actions", __dir__)
  autoload :RakeCompat, File.expand_path("rake_compat", __dir__)
  autoload :Group,      File.expand_path("group", __dir__)

  # Shortcuts for help.
  HELP_MAPPINGS       = %w(-h -? --help -D)

  # Bundler::Thor methods that should not be overwritten by the user.
  THOR_RESERVED_WORDS = %w(invoke shell options behavior root destination_root relative_root
                           action add_file create_file in_root inside run run_ruby_script)

  TEMPLATE_EXTNAME = ".tt"

  class << self
    def deprecation_warning(message) #:nodoc:
      unless ENV['THOR_SILENCE_DEPRECATION']
        warn "Deprecation warning: #{message}\n" +
          'You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.'
      end
    end
  end

  module Base
    attr_accessor :options, :parent_options, :args

    # It receives arguments in an Array and two hashes, one for options and
    # other for configuration.
    #
    # Notice that it does not check if all required arguments were supplied.
    # It should be done by the parser.
    #
    # ==== Parameters
    # args<Array[Object]>:: An array of objects. The objects are applied to their
    #                       respective accessors declared with <tt>argument</tt>.
    #
    # options<Hash>:: An options hash that will be available as self.options.
    #                 The hash given is converted to a hash with indifferent
    #                 access, magic predicates (options.skip?) and then frozen.
    #
    # config<Hash>:: Configuration for this Bundler::Thor class.
    #
    def initialize(args = [], local_options = {}, config = {})
      parse_options = self.class.class_options

      # The start method splits inbound arguments at the first argument
      # that looks like an option (starts with - or --). It then calls
      # new, passing in the two halves of the arguments Array as the
      # first two parameters.

      command_options = config.delete(:command_options) # hook for start
      parse_options = parse_options.merge(command_options) if command_options
      if local_options.is_a?(Array)
        array_options = local_options
        hash_options = {}
      else
        # Handle the case where the class was explicitly instantiated
        # with pre-parsed options.
        array_options = []
        hash_options = local_options
      end

      # Let Bundler::Thor::Options parse the options first, so it can remove
      # declared options from the array. This will leave us with
      # a list of arguments that weren't declared.
      stop_on_unknown = self.class.stop_on_unknown_option? config[:current_command]
      disable_required_check = self.class.disable_required_check? config[:current_command]
      opts = Bundler::Thor::Options.new(parse_options, hash_options, stop_on_unknown, disable_required_check)
      self.options = opts.parse(array_options)
      self.options = config[:class_options].merge(options) if config[:class_options]

      # If unknown options are disallowed, make sure that none of the
      # remaining arguments looks like an option.
      opts.check_unknown! if self.class.check_unknown_options?(config)

      # Add the remaining arguments from the options parser to the
      # arguments passed in to initialize. Then remove any positional
      # arguments declared using #argument (this is primarily used
      # by Bundler::Thor::Group). Tis will leave us with the remaining
      # positional arguments.
      to_parse  = args
      to_parse += opts.remaining unless self.class.strict_args_position?(config)

      thor_args = Bundler::Thor::Arguments.new(self.class.arguments)
      thor_args.parse(to_parse).each { |k, v| __send__("#{k}=", v) }
      @args = thor_args.remaining
    end

    class << self
      def included(base) #:nodoc:
        super(base)
        base.extend ClassMethods
        base.send :include, Invocation
        base.send :include, Shell
      end

      # Returns the classes that inherits from Bundler::Thor or Bundler::Thor::Group.
      #
      # ==== Returns
      # Array[Class]
      #
      def subclasses
        @subclasses ||= []
      end

      # Returns the files where the subclasses are kept.
      #
      # ==== Returns
      # Hash[path<String> => Class]
      #
      def subclass_files
        @subclass_files ||= Hash.new { |h, k| h[k] = [] }
      end

      # Whenever a class inherits from Bundler::Thor or Bundler::Thor::Group, we should track the
      # class and the file on Bundler::Thor::Base. This is the method responsible for it.
      #
      def reggems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/base.rb000064400000060266150403134040020255 0ustar00nknown_options!
      # This is disabled by default to allow dynamic invocations.
      def check_unknown_options!
        @check_unknown_options = true
      end

      def check_unknown_options #:nodoc:
        @check_unknown_options ||= from_superclass(:check_unknown_options, false)
      end

      def check_unknown_options?(config) #:nodoc:
        !!check_unknown_options
      end

      # If you want to raise an error when the default value of an option does not match
      # the type call check_default_type!
      # This will be the default; for compatibility a deprecation warning is issued if necessary.
      def check_default_type!
        @check_default_type = true
      end

      # If you want to use defaults that don't match the type of an option,
      # either specify `check_default_type: false` or call `allow_incompatible_default_type!`
      def allow_incompatible_default_type!
        @check_default_type = false
      end

      def check_default_type #:nodoc:
        @check_default_type = from_superclass(:check_default_type, nil) unless defined?(@check_default_type)
        @check_default_type
      end

      # If true, option parsing is suspended as soon as an unknown option or a
      # regular argument is encountered.  All remaining arguments are passed to
      # the command as regular arguments.
      def stop_on_unknown_option?(command_name) #:nodoc:
        false
      end

      # If true, option set will not suspend the execution of the command when
      # a required option is not provided.
      def disable_required_check?(command_name) #:nodoc:
        false
      end

      # If you want only strict string args (useful when cascading thor classes),
      # call strict_args_position! This is disabled by default to allow dynamic
      # invocations.
      def strict_args_position!
        @strict_args_position = true
      end

      def strict_args_position #:nodoc:
        @strict_args_position ||= from_superclass(:strict_args_position, false)
      end

      def strict_args_position?(config) #:nodoc:
        !!strict_args_position
      end

      # Adds an argument to the class and creates an attr_accessor for it.
      #
      # Arguments are different from options in several aspects. The first one
      # is how they are parsed from the command line, arguments are retrieved
      # from position:
      #
      #   thor command NAME
      #
      # Instead of:
      #
      #   thor command --name=NAME
      #
      # Besides, arguments are used inside your code as an accessor (self.argument),
      # while options are all kept in a hash (self.options).
      #
      # Finally, arguments cannot have type :default or :boolean but can be
      # optional (supplying :optional => :true or :required => false), although
      # you cannot have a required argument after a non-required argument. If you
      # try it, an error is raised.
      #
      # ==== Parameters
      # name<Symbol>:: The name of the argument.
      # options<Hash>:: Described below.
      #
      # ==== Options
      # :desc     - Description for the argument.
      # :required - If the argument is required or not.
      # :optional - If the argument is optional or not.
      # :type     - The type of the argument, can be :string, :hash, :array, :numeric.
      # :default  - Default value for this argument. It cannot be required and have default values.
      # :banner   - String to show on usage notes.
      #
      # ==== Errors
      # ArgumentError:: Raised if you supply a required argument after a non required one.
      #
      def argument(name, options = {})
        is_thor_reserved_word?(name, :argument)
        no_commands { attr_accessor name }

        required = if options.key?(:optional)
          !options[:optional]
        elsif options.key?(:required)
          options[:required]
        else
          options[:default].nil?
        end

        remove_argument name

        if required
          arguments.each do |argument|
            next if argument.required?
            raise ArgumentError, "You cannot have #{name.to_s.inspect} as required argument after " \
                                "the non-required argument #{argument.human_name.inspect}."
          end
        end

        options[:required] = required

        arguments << Bundler::Thor::Argument.new(name, options)
      end

      # Returns this class arguments, looking up in the ancestors chain.
      #
      # ==== Returns
      # Array[Bundler::Thor::Argument]
      #
      def arguments
        @arguments ||= from_superclass(:arguments, [])
      end

      # Adds a bunch of options to the set of class options.
      #
      #   class_options :foo => false, :bar => :required, :baz => :string
      #
      # If you prefer more detailed declaration, check class_option.
      #
      # ==== Parameters
      # Hash[Symbol => Object]
      #
      def class_options(options = nil)
        @class_options ||= from_superclass(:class_options, {})
        build_options(options, @class_options) if options
        @class_options
      end

      # Adds an option to the set of class options
      #
      # ==== Parameters
      # name<Symbol>:: The name of the argument.
      # options<Hash>:: Described below.
      #
      # ==== Options
      # :desc::     -- Description for the argument.
      # :required:: -- If the argument is required or not.
      # :default::  -- Default value for this argument.
      # :group::    -- The group for this options. Use by class options to output options in different levels.
      # :aliases::  -- Aliases for this option. <b>Note:</b> Bundler::Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead.
      # :type::     -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
      # :banner::   -- String to show on usage notes.
      # :hide::     -- If you want to hide this option from the help.
      #
      def class_option(name, options = {})
        build_option(name, options, class_options)
      end

      # Removes a previous defined argument. If :undefine is given, undefine
      # accessors as well.
      #
      # ==== Parameters
      # names<Array>:: Arguments to be removed
      #
      # ==== Examples
      #
      #   remove_argument :foo
      #   remove_argument :foo, :bar, :baz, :undefine => true
      #
      def remove_argument(*names)
        options = names.last.is_a?(Hash) ? names.pop : {}

        names.each do |name|
          arguments.delete_if { |a| a.name == name.to_s }
          undef_method name, "#{name}=" if options[:undefine]
        end
      end

      # Removes a previous defined class option.
      #
      # ==== Parameters
      # names<Array>:: Class options to be removed
      #
      # ==== Examples
      #
      #   remove_class_option :foo
      #   remove_class_option :foo, :bar, :baz
      #
      def remove_class_option(*names)
        names.each do |name|
          class_options.delete(name)
        end
      end

      # Defines the group. This is used when thor list is invoked so you can specify
      # that only commands from a pre-defined group will be shown. Defaults to standard.
      #
      # ==== Parameters
      # name<String|Symbol>
      #
      def group(name = nil)
        if name
          @group = name.to_s
        else
          @group ||= from_superclass(:group, "standard")
        end
      end

      # Returns the commands for this Bundler::Thor class.
      #
      # ==== Returns
      # Hash:: An ordered hash with commands names as keys and Bundler::Thor::Command
      #        objects as values.
      #
      def commands
        @commands ||= Hash.new
      end
      alias_method :tasks, :commands

      # Returns the commands for this Bundler::Thor class and all subclasses.
      #
      # ==== Returns
      # Hash:: An ordered hash with commands names as keys and Bundler::Thor::Command
      #        objects as values.
      #
      def all_commands
        @all_commands ||= from_superclass(:all_commands, Hash.new)
        @all_commands.merge!(commands)
      end
      alias_method :all_tasks, :all_commands

      # Removes a given command from this Bundler::Thor class. This is usually done if you
      # are inheriting from another class and don't want it to be available
      # anymore.
      #
      # By default it only remove the mapping to the command. But you can supply
      # :undefine => true to undefine the method from the class as well.
      #
      # ==== Parameters
      # name<Symbol|String>:: The name of the command to be removed
      # options<Hash>:: You can give :undefine => true if you want commands the method
      #                 to be undefined from the class as well.
      #
      def remove_command(*names)
        options = names.last.is_a?(Hash) ? names.pop : {}

        names.each do |name|
          commands.delete(name.to_s)
          all_commands.delete(name.to_s)
          undef_method name if options[:undefine]
        end
      end
      alias_method :remove_task, :remove_command

      # All methods defined inside the given block are not added as commands.
      #
      # So you can do:
      #
      #   class MyScript < Bundler::Thor
      #     no_commands do
      #       def this_is_not_a_command
      #       end
      #     end
      #   end
      #
      # You can also add the method and remove it from the command list:
      #
      #   class MyScript < Bundler::Thor
      #     def this_is_not_a_command
      #     end
      #     remove_command :this_is_not_a_command
      #   end
      #
      def no_commands(&block)
        no_commands_context.enter(&block)
      end

      alias_method :no_tasks, :no_commands

      def no_commands_context
        @no_commands_context ||= NestedContext.new
      end

      def no_commands?
        no_commands_context.entered?
      end

      # Sets the namespace for the Bundler::Thor or Bundler::Thor::Group class. By default the
      # namespace is retrieved from the class name. If your Bundler::Thor class is named
      # Scripts::MyScript, the help method, for example, will be called as:
      #
      #   thor scripts:my_script -h
      #
      # If you change the namespace:
      #
      #   namespace :my_scripts
      #
      # You change how your commands are invoked:
      #
      #   thor my_scripts -h
      #
      # Finally, if you change your namespace to default:
      #
      #   namespace :default
      #
      # Your commands can be invoked with a shortcut. Instead of:
      #
      #   thor :my_command
      #
      def namespace(name = nil)
        if name
          @namespace = name.to_s
        else
          @namespace ||= Bundler::Thor::Util.namespace_from_thor_class(self)
        end
      end

      # Parses the command and options from the given args, instantiate the class
      # and invoke the command. This method is used when the arguments must be parsed
      # from an array. If you are inside Ruby and want to use a Bundler::Thor class, you
      # can simply initialize it:
      #
      #   script = MyScript.new(args, options, config)
      #   script.invoke(:command, first_arg, second_arg, third_arg)
      #
      def start(given_args = ARGV, config = {})
        config[:shell] ||= Bundler::Thor::Base.shell.new
        dispatch(nil, given_args.dup, nil, config)
      rescue Bundler::Thor::Error => e
        config[:debug] || ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message)
        exit(false) if exit_on_failure?
      rescue Errno::EPIPE
        # This happens if a thor command is piped to something like `head`,
        # which closes the pipe when it's done reading. This will also
        # mean that if the pipe is closed, further unnecessary
        # computation will not occur.
        exit(true)
      end

      # Allows to use private methods from parent in child classes as commands.
      #
      # ==== Parameters
      #   names<Array>:: Method names to be used as commands
      #
      # ==== Examples
      #
      #   public_command :foo
      #   public_command :foo, :bar, :baz
      #
      def public_command(*names)
        names.each do |name|
          class_eval "def #{name}(*); super end"
        end
      end
      alias_method :public_task, :public_command

      def handle_no_command_error(command, has_namespace = $thor_runner) #:nodoc:
        raise UndefinedCommandError.new(command, all_commands.keys, (namespace if has_namespace))
      end
      alias_method :handle_no_task_error, :handle_no_command_error

      def handle_argument_error(command, error, args, arity) #:nodoc:
        name = [command.ancestor_name, command.name].compact.join(" ")
        msg = "ERROR: \"#{basename} #{name}\" was called with ".dup
        msg << "no arguments"               if     args.empty?
        msg << "arguments " << args.inspect unless args.empty?
        msg << "\nUsage: \"#{banner(command).split("\n").join("\"\n       \"")}\""
        raise InvocationError, msg
      end

      # A flag that makes the process exit with status 1 if any error happens.
      def exit_on_failure?
        Bundler::Thor.deprecation_warning "Bundler::Thor exit with status 0 on errors. To keep this behavior, you must define `exit_on_failure?` in `#{self.name}`"
        false
      end

    protected

      # Prints the class options per group. If an option does not belong to
      # any group, it's printed as Class option.
      #
      def class_options_help(shell, groups = {}) #:nodoc:
        # Group options by group
        class_options.each do |_, value|
          groups[value.group] ||= []
          groups[value.group] << value
        end

        # Deal with default group
        global_options = groups.delete(nil) || []
        print_options(shell, global_options)

        # Print all others
        groups.each do |group_name, options|
          print_options(shell, options, group_name)
        end
      end

      # Receives a set of options and print them.
      def print_options(shell, options, group_name = nil)
        return if options.empty?

        list = []
        padding = options.map { |o| o.aliases.size }.max.to_i * 4

        options.each do |option|
          next if option.hide
          item = [option.usage(padding)]
          item.push(option.description ? "# #{option.description}" : "")

          list << item
          list << ["", "# Default: #{option.default}"] if option.show_default?
          list << ["", "# Possible values: #{option.enum.join(', ')}"] if option.enum
        end

        shell.say(group_name ? "#{group_name} options:" : "Options:")
        shell.print_table(list, :indent => 2)
        shell.say ""
      end

      # Raises an error if the word given is a Bundler::Thor reserved word.
      def is_thor_reserved_word?(word, type) #:nodoc:
        return false unless gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/rake_compat.rb000064400000004166150403134040021625 0ustar00Hash[Symbol => Object]
      def build_options(options, scope) #:nodoc:
        options.each do |key, value|
          scope[key] = Bundler::Thor::Option.parse(key, value)
        end
      end

      # Finds a command with the given name. If the command belongs to the current
      # class, just return it, otherwise dup it and add the fresh copy to the
      # current command hash.
      def find_and_refresh_command(name) #:nodoc:
        if commands[name.to_s]
          commands[name.to_s]
        elsif command = all_commands[name.to_s] # rubocop:disable AssignmentInCondition
          commands[name.to_s] = command.clone
        else
          raise ArgumentError, "You supplied :for => #{name.inspect}, but the command #{name.inspect} could not be found."
        end
      end
      alias_method :find_and_refresh_task, :find_and_refresh_command

      # Everytime someone inherits from a Bundler::Thor class, register the klass
      # and file into baseclass.
      def inherited(klass)
        super(klass)
        Bundler::Thor::Base.register_klass_file(klass)
        klass.instance_variable_set(:@no_commands, 0)
      end

      # Fire this callback whenever a method is added. Added methods are
      # tracked as commands by invoking the create_command method.
      def method_added(meth)
        super(meth)
        meth = meth.to_s

        if meth == "initialize"
          initialize_added
          return
        end

        # Return if it's not a public instance method
        return unless public_method_defined?(meth.to_sym)

        return if no_commands? || !create_command(meth)

        is_thor_reserved_word?(meth, :command)
        Bundler::Thor::Base.register_klass_file(self)
      end

      # Retrieves a value from superclass. If it reaches the baseclass,
      # returns default.
      def from_superclass(method, default = nil)
        if self == baseclass || !superclass.respond_to?(method, true)
          default
        else
          value = superclass.send(method)

          # Ruby implements `dup` on Object, but raises a `TypeError`
          # if the method is called on immediates. As a result, we
          #gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb000064400000004404150403134040027017 0ustar00end

      # SIGNATURE: The hook invoked by start.
      def dispatch(command, given_args, given_opts, config) #:nodoc:
        raise NotImplementedError
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/rake_compat.rb000064400000004166150403134040021625 0ustar00require "rake"
require "rake/dsl_definition"

class Bundler::Thor
  # Adds a compatibility layer to your Bundler::Thor classes which allows you to use
  # rake package tasks. For example, to use rspec rake tasks, one can do:
  #
  #   require 'bundler/vendor/thor/lib/thor/rake_compat'
  #   require 'rspec/core/rake_task'
  #
  #   class Default < Bundler::Thor
  #     include Bundler::Thor::RakeCompat
  #
  #     RSpec::Core::RakeTask.new(:spec) do |t|
  #       t.spec_opts = ['--options', './.rspec']
  #       t.spec_files = FileList['spec/**/*_spec.rb']
  #     end
  #   end
  #
  module RakeCompat
    include Rake::DSL if defined?(Rake::DSL)

    def self.rake_classes
      @rake_classes ||= []
    end

    def self.included(base)
      super(base)
      # Hack. Make rakefile point to invoker, so rdoc task is generated properly.
      rakefile = File.basename(caller[0].match(/(.*):\d+/)[1])
      Rake.application.instance_variable_set(:@rakefile, rakefile)
      rake_classes << base
    end
  end
end

# override task on (main), for compatibility with Rake 0.9
instance_eval do
  alias rake_namespace namespace

  def task(*)
    task = super

    if klass = Bundler::Thor::RakeCompat.rake_classes.last # rubocop:disable AssignmentInCondition
      non_namespaced_nagems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/runner.rb000064400000023542150403134040020650 0ustar00hor::RakeCompat.rake_classes << new_klass
    end

    super
    Bundler::Thor::RakeCompat.rake_classes.pop
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb000064400000004404150403134040027017 0ustar00class Bundler::Thor
  module CoreExt #:nodoc:
    # A hash with indifferent access and magic predicates.
    #
    #   hash = Bundler::Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true
    #
    #   hash[:foo]  #=> 'bar'
    #   hash['foo'] #=> 'bar'
    #   hash.foo?   #=> true
    #
    class HashWithIndifferentAccess < ::Hash #:nodoc:
      def initialize(hash = {})
        super()
        hash.each do |key, value|
          self[convert_key(key)] = value
        end
      end

      def [](key)
        super(convert_key(key))
      end

      def []=(key, value)
        super(convert_key(key), value)
      end

      def delete(key)
        super(convert_key(key))
      end

      def except(*keys)
        dup.tap do |hash|
          keys.each { |key| hash.delete(convert_key(key)) }
        end
      end

      def fetch(key, *args)
        super(convert_key(key), *args)
      end

      def key?(key)
        super(convert_key(key))
      end

      def values_at(*indices)
        indices.map { |key| self[convert_key(key)] }
      end

      def merge(other)
        dup.merge!(other)
      end

      def merge!(other)
        other.each do |key, value|
          self[convert_key(key)] = value
        end
        self
      end

      def reverse_merge(other)
        self.class.new(other).merge(self)
      end

      def reverse_merge!(other_hash)
        replace(reverse_merge(other_hash))
      end

      def replace(other_hash)
        super(other_hash)
      end

      # Convert to a Hash with String keys.
      def to_hash
        Hash.new(default).merge!(self)
      end

    protected

      def convert_key(key)
        key.is_a?(Symbol) ?gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/rake_compat.rb000064400000004166150403134040021625 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/runner.rb000064400000023542150403134040020650 0ustar00require_relative "../thor"
require_relative "group"

require "yaml"
require "digest/md5"
require "pathname"

class Bundler::Thor::Runner < Bundler::Thor #:nodoc: # rubocop:disable ClassLength
  autoload :OpenURI, "open-uri"

  map "-T" => :list, "-i" => :install, "-u" => :update, "-v" => :version

  def self.banner(command, all = false, subcommand = false)
    "thor " + command.formatted_usage(self, all, subcommand)
  end

  def self.exit_on_failure?
    true
  end

  # Override Bundler::Thor#help so it can give information about any class and any method.
  #
  def help(meth = nil)
    if meth && !respond_to?(meth)
      initialize_thorfiles(meth)
      klass, command = Bundler::Thor::Util.find_class_and_command_by_namespace(meth)
      self.class.handle_no_command_error(command, false) if klass.nil?
      klass.start(["-h", command].compact, :shell => shell)
    else
      super
    end
  end

  # If a command is not found on Bundler::Thor::Runner, method missing is invoked and
  # Bundler::Thor::Runner is then responsible for finding the command in all classes.
  #
  def method_missing(meth, *args)
    meth = meth.to_s
    initialize_thorfiles(meth)
    klass, command = Bundler::Thor::Util.find_class_and_command_by_namespace(meth)
    self.class.handle_no_command_error(command, false) if klass.nil?
    args.unshift(command) if command
    klass.start(args, :shell => shell)
  end

  desc "install NAME", "Install an optionally named Bundler::Thor file into your system commands"
  method_options :as => :string, :relative => :boolean, :force => :boolean
  def install(name) # rubocop:disable MethodLength
    initialize_thorfiles
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb000064400000004404150403134040027017 0ustar00name(name)
      as = ask("Please specify a name for #{name} in the system repository [#{basename}]:")
      as = basename if as.empty?
    end

    location = if options[:relative] || name =~ %r{^https?://}
      name
    else
      File.expand_path(name)
    end

    thor_yaml[as] = {
      :filename   => Digest::MD5.hexdigest(name + as),
      :location   => location,
      :namespaces => Bundler::Thor::Util.namespaces_in_content(contents, base)
    }

    save_yaml(thor_yaml)
    say "Storing thor file in your system repository"
    destination = File.join(thor_root, thor_yaml[as][:filename])

    if package == :file
      File.open(destination, "w") { |f| f.puts contents }
    else
      require "fileutils"
      FileUtils.cp_r(name, destination)
    end

    thor_yaml[as][:filename] # Indicate success
  end

  desc "version", "Show Bundler::Thor version"
  def version
    require_relative "version"
    say "Bundler::Thor #{Bundler::Thor::VERSION}"
  end

  desc "uninstall NAME", "Uninstall a named Bundler::Thor module"
  def uninstall(name)
    raise Error, "Can't find module '#{name}'" unless thor_yaml[name]
    say "Uninstalling #{name}."
    require "fileutils"
    FileUtils.rm_rf(File.join(thor_root, (thor_yaml[name][:filename]).to_s))

    thor_yaml.delete(name)
    save_yaml(thor_yaml)

    puts "Done."
  end

  desc "update NAME", "Update a Bundler::Thor file from its original location"
  def update(name)
    raise Error, "Can't find module '#{name}'" if !thor_yaml[name] || !thor_yaml[name][:location]

    say "Updating '#{name}' from #{thor_yaml[name][:location]}"

    old_filename = thor_yaml[name][:filename]
    self.options = options.merge("as" => name)

    if File.directory? File.expand_path(name)
      require "fileutils"
      FileUtils.rm_rf(File.join(thor_root, old_filename))

      thor_yaml.delete(old_filename)
      save_yaml(thor_yaml)

      filename = install(name)
    else
      filename = install(thor_yaml[name][:location])
    end

    File.delete(File.join(thor_root, old_filename)) unless filename == old_filename
  end

  desc "installed", "List the installed Bundler::Thor modules and commands"
  method_options :internal => :boolean
  def installed
    initialize_thorfiles(nil, true)
    display_klasses(true, options["internal"])
  endgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/runner.rb000064400000023542150403134040020650 0ustar00ile)
      yaml || {}
    end
  end

  # Save the yaml file. If none exists in thor root, creates one.
  #
  def save_yaml(yaml)
    yaml_file = File.join(thor_root, "thor.yml")

    unless File.exist?(yaml_file)
      require "fileutils"
      FileUtils.mkdir_p(thor_root)
      yaml_file = File.join(thor_root, "thor.yml")
      FileUtils.touch(yaml_figems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/line_editor.rb000064400000000607150403134040021631 0ustar00Finds Thorfiles by traversing from your current directory down to the root
  # directory of your system. If at any time we find a Bundler::Thor file, we stop.
  #
  # We also ensure that system-wide Thorfiles are loaded first, so local
  # Thorfiles can override them.
  #
  # ==== Example
  #
  # If we start at /Users/wycats/dev/thor ...
  #
  # 1. /Users/wycats/dev/thor
  # 2. /Users/wycgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/invocation.rb000064400000014111150403134040021500 0ustar00 = (relevant_to ? thorfiles_relevant_to(relevant_to) : Bundler::Thor::Util.thor_root_glob)
    files += thorfiles
    files -= ["#{thor_root}/thor.yml"]

    files.map! do |file|
      File.directory?(file) ? File.join(file, "main.thor") : file
    end
  end

  # Load Thorfiles relevant to the given method. If you provide "foo:bar" it
  # will load all thor files in the thor.yaml that has "foo" e "foo:bar"
  # namespaces registered.
  #
  def thorfiles_relevant_to(meth)
    lookup = [meth, meth.split(":")[0...-1].join(":")]

    files = thor_yaml.select do |_, v|
      v[:namespaces] && !(v[:namespaces] & lookup).empty?
    end

    files.map { |_, v| File.join(thor_root, (v[:filename]).to_s) }
  end

  # Display information about the given klasses. If with_module is given,
  # it shows a table with information extracted from the yaml file.
  #
  def display_klasses(with_modules = false, show_internal = false, klasses = Bundler::Thor::Base.subclasses)
    klasses -= [Bundler::Thor, Bundler::Thor::Runner, Bundler::Thor::Group] unless show_internal

    raise Error, "No Bundler::Thor commands available" if klasses.empty?
    show_modules if with_modules && !thor_yaml.empty?

    list = Hash.new { |h, k| h[k] = [] }
    groups = klasses.select { |k| k.ancestors.include?(Bundler::Thor::Group) }

    # Get classes which inherit from Bundler::Thor
    (klasses - groups).each { |k| list[k.namespace.split(":").first] += k.printable_commands(false) }

    # Get classes which inherit from Bundler::Thor::Base
    groups.map! { |k| k.printable_commands(false).first }
    list["root"] = groups

    # Order namespaces with default coming first
    list = list.sort { |a, b| a[0].sub(/^default/, "") <=> b[0].sub(/^default/, "") }
    list.each { |n, commands| display_commands(n, commands) unless commands.empty? }
  end

  def display_commands(namespace, list) #:nodoc:
    list.sort! { |a, b| a[0] <=> b[0] }

    say shell.set_color(namespace, :blue, true)
    say "-" * namespace.size

    print_table(list, :truncate => true)
    say
  end
  alias_method :display_tasks, :display_commands

  def show_modules #:nodoc:
    info = []
    labels = %w(Modules Namespaces)

    info << labels
    info << ["-" * labels[0].size, "-" * labels[1].size]

    thor_yaml.each do |name, hash|
      info << [name, hash[:namespaces].join(", ")]
    end

    print_table info
    say ""
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/line_editor.rb000064400000000607150403134040021631 0ustar00require_relative "line_editor/basic"
require_relative "line_editor/readline"

class Bundler::Thor
  module LineEditor
    def self.readline(prompt, options = {})
      best_available.new(prompt, options).readline
    end

    def self.best_available
      [
        Bundler::Thor::LineEditor::Readline,
        Bundler::Thor::LineEditor::Basic
      ].detect(&:available?)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/invocation.rb000064400000014111150403134040021500 0ustar00class Bundler::Thor
  module Invocation
    def self.included(base) #:nodoc:
      super(base)
      base.extend ClassMethods
    end

    module ClassMethods
      # This method is responsible for receiving a name and find the proper
      # class and command for it. The key is an optional parameter which is
      # available only in class methods invocations (i.e. in Bundler::Thor::Group).
      def prepare_for_invocation(key, name) #:nodoc:
        case name
        when Symbol, String
          Bundler::Thor::Util.find_class_and_command_by_namespace(name.to_s, !key)
        else
          name
        end
      end
    end

    # Make initializer aware of invocations and the initialization args.
    def initialize(args = [], options = {}, config = {}, &block) #:nodoc:
      @_invocations = config[:invocations] || Hash.new { |h, k| h[k] = [] }
      @_initializer = [args, options, config]
      super
    end

    # Make the current command chain accessible with in a Bundler::Thor-(sub)command
    def current_command_chain
      @_invocations.values.flatten.map(&:to_sym)
    end

    # Receives a name and invokes it. The name can be a string (either "command" or
    # "namespace:command"), a Bundler::Thor::Command, a Class or a Bundler::Thor instance. If the
    # command cannot be guessed by name, it can also be supplied as second argument.
    #
    # You can also supply the arguments, options and configuration values for
    # the command to be invoked, if none is given, the same values used to
    # initialize the invoker are used to initialize the invoked.
    #
    # When no name is given, it will invoke the default command of the current class.
    #
    # ==== Examples
    #
    #   class A < Bundler::Thor
    #     def foo
    #       invoke :bar
    #       invoke "b:hello", ["Erik"]
    #     end
    #
    #     def bar
    #       invoke "b:hello", ["Erik"]
    #     end
    #   end
    #
    #   class B < Bundler::Thor
    #     def hello(name)
    #       puts "hello #{name}"
    #     end
    #   end
    #
    # You can notice that the method "foo" above invokes two cgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell.rb000064400000004461150403134040020445 0ustar00ing, :default => :mock
    #   end
    #
    # Since it's not rspec concern to parse mock framework options, when RR
    # is invoked all options are parsed again, so RR can extract only the options
    # that it's going to use.
    #
    # If you want Rspec::RR to be initialized with its own set of options, you
    # have to do that explicitly:
    #
    #   invoke "rspec:rr", [], :style => :foo
    #
    # Besides giving an instance, you can also give a class to invoke:
    #
    #   invoke Rspec::RR, [], :style => :foo
    #
    def invoke(name = nil, *args)
      if name.nil?
        warn "[Bundler::Thor] Calling invoke() without argument is deprecated. Please use invoke_all instead.\n#{caller.join("\n")}"
        return invoke_all
      end

      args.unshift(nil) if args.first.is_a?(Array) || args.first.nil?
      command, args, opts, config = arggems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/line_editor.rb000064400000000607150403134040021631 0ustar00 command.run(self, *args)
      end
    end
    alias_method :invoke_task, :invoke_command

    # Invoke all commands for the current instance.
    def invoke_all #:nodoc:
      self.class.all_commands.map { |_, command| invoke_command(command) }
    end

    # Invokes using shell padding.
    def invoke_with_padding(*args)
      with_padding { invoke(*args) }
    end

  protected

    # gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/invocation.rb000064400000014111150403134040021500 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/html.rb000064400000010627150403134040021412 0ustar00figuration).merge!(config)

      [args, opts, config]
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell.rb000064400000004461150403134040020445 0ustar00require "rbconfig"

class Bundler::Thor
  module Base
    class << self
      attr_writer :shell

      # Returns the shell used in all Bundler::Thor classes. If you are in a Unix platform
      # it will use a colored log, otherwise it will use a basic one without color.
      #
      def shell
        @shell ||= if ENV["THOR_SHELL"] && !ENV["THOR_SHELL"].empty?
          Bundler::Thor::Shell.const_get(ENV["THOR_SHELL"])
        elsif RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ && !ENV["ANSICON"]
          Bundler::Thor::Shell::Basic
        else
          Bundler::Thor::Shell::Color
        end
      end
    end
  end

  module Shell
    SHELL_DELEGATED_METHODS = [:ask, :error, :set_color, :yes?, :no?, :say, :say_error, :say_status, :print_in_columns, :print_table, :print_wrapped, :file_collision, :terminal_width]
    attr_writer :shell

    autoload :Basic, File.expand_path("shell/basic", __dir__)
    autoload :Color, File.expand_path("shell/color", __dir__)
    autoload :HTML,  File.expand_path("shell/html", __dir__)

    # Add shell to initialize config values.
    #
    # ==== Configuration
    # shell<Object>:: An instance of the shell to be used.
    #
    # ==== Examples
    #
    #   class MyScript < Bundler::Thor
    #     argument :first, :type => :numeric
    #   end
    #
    #   MyScript.new [1.0], { :foo => :bar }, :shell => Bundler::Thor::Shell::Basic.new
    #
    def initialize(args = [], options = {}, config = {})
      super
      self.shell = config[:shell]
      shell.base ||= self if shell.respond_to?(:base)
    end

    # Holds the shell for the given Bundler::Thor instance. If no shell is given,
    # it gets a default shell from Bundler::Thor::Base.shell.
    def shell
      @shell ||= Bundler::Thor::Base.shell.new
    end

    # Common methods that are delegated to the shell.
    SHELL_DELEGATED_METHODS.each do |method|
      module_eval <<-METHOD, __FILE__, __LINE__ + 1
        def #{method}(*args,&block)
          shell.#{method}(*args,&block)
        end
      METHOD
    end

    # Yields the given block with padding.
    def with_padding
      shell.padding += 1
      yield
    ensure
      shell.padding -= 1
    end

  protected

    # Allow shell to be shared between invocations.
    #
    def _shared_configuration #:nodoc:
      super.merge!(:shell => shell)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/html.rb000064400000010627150403134040021412 0ustar00require_relative "basic"

class Bundler::Thor
  module Shell
    # Inherit from Bundler::Thor::Shell::Basic and add set_color behavior. Check
    # Bundler::Thor::Shell::Basic to see all available methods.
    #
    class HTML < Basic
      # The start of an HTML bold sequence.
      BOLD       = "font-weight: bold"

      # Set the terminal's foreground HTML color to black.
      BLACK      = "color: blgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/color.rb000064400000011530150403134040021556 0ustar00e.
      WHITE      = "color: white"

      # Set the terminal's background HTML color to black.
      ON_BLACK   = "background-color: black"
      # Set the terminal's background HTML color to red.
      ON_RED     = "background-color: red"
      # Set the terminal's background HTML color to green.
      ON_GREEN   = "background-color: green"
      # Set the terminal's background HTML color to yellow.
      ON_YELLOW  = "background-color: yellow"
      # Set the terminal's background HTML color to blue.
      ON_BLUE    = "background-color: blue"
      # Set the terminal's backgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell.rb000064400000004461150403134040020445 0ustar00case) if color.is_a?(Symbol)
          styles = [html_color]
          styles << BOLD if bold
          "<span style=\"#{styles.join('; ')};\">#{Bundler::Thor::Util.escape_html(string)}</span>"
        end
      end

      # Ask something to the user and receives a response.
      #
      # ==== Example
      # ask("What is your name?")
      #
      # TODO: Implement #ask for Bundler::Thor::Shell::HTML
      def ask(statement, color = nil)
        raise NotImplementedError, "Implement #ask for Bundler::Thor::Shell::HTML"
      end

    protected

      def can_display_colors?
        true
      end

      # Overwrite show_diff to show diff with colors if Diff::LCS is
      # available.
      #
      def show_diff(destination, content) #:nodoc:
        if diff_lcs_loaded? && ENV["THOR_DIFF"].nil? && ENV["RAILS_DIFF"].nil?
          actual  = File.binread(destination).to_s.split("\n")
          content = content.to_s.split("\n")

          Diff::LCS.sdiff(actual, content).each do |diff|
            output_diff_line(diff)
          end
        else
          super
        end
      end

      def output_diff_line(diff) #:nodoc:
        case diff.action
        when "-"
          say "- #{diff.old_element.chomp}", :red, true
        when "+"
          say "+ #{diff.new_element.chomp}", :green, true
        when "!"
          say "- #{diff.old_element.chomp}", :red, true
          say "+ #{diff.new_element.chomp}", :green, true
        else
          say "  #{diff.old_element.chomp}", nil, true
        end
      end

      # Check if Diff::LCS is loaded. If it is, use it to create pretty output
      # for diff.
      #
      def diff_lcs_loaded? #:nodoc:
        return true if defined?(Diff::LCS)
        return @diff_lcs_loaded unless @diff_lcs_loaded.nil?

        @diff_lcs_loaded = begin
          require "diff/lcs"
          true
        rescue LoadError
          false
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/color.rb000064400000011530150403134040021556 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/html.rb000064400000010627150403134040021412 0ustar00 foreground ANSI color to red.
      RED        = "\e[31m"
      # Set the terminal's foreground ANSI color to green.
      GREEN      = "\e[32m"
      # Set the terminal's foreground ANSI color to yellow.
      YELLOW     = "\e[33m"
      # Set the terminal's foreground ANSI color to blue.
      BLUE       = "\e[34m"
      # Set the terminalgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/basic.rb000064400000036117150403134040021531 0ustar00Set the terminal's background ANSI color to magenta.
      ON_MAGENTA = "\e[45m"
      # Set the terminal's background ANSI color to cyan.
      ON_CYAN    = "\e[46m"
      # Set the terminal's background ANSI color to white.
      ON_WHITE   = "\e[47m"

      # Set color by using a string or one of the defined constants. If a third
      # option is set to true, it also adds bold to the string. This is based
      # on Highline implementation and it automatically appends CLEAR to the end
      # of the returned String.
      #
      # Pass foreground, background and bold options to this method as
      # symbols.
      #
      # Example:
      #
      #   set_color "Hi!", :red, :on_white, :bold
      #
      # The available colors are:
      #
      #   :bold
      #   :black
      #   :red
      #   :green
      #   :yellow
      #   :blue
      #   :magenta
      #   :cyan
      #   :white
      #   :on_black
      #   :on_red
      #   :on_green
      #   :on_yellow
      #   :on_blue
      #   :on_magenta
      #   :on_cyan
      #   :on_white
      def set_color(string, *colors)
        if colors.compact.empty? || !can_display_colors?
          string
        elsif colors.all? { |color| color.is_a?(Symbol) || color.is_a?(String) }
          ansi_colors = colors.map { |color| lookup_color(color) }
          "#{ansi_colors.join}#{string}#{CLEAR}"
        else
          # The old API was `set_color(color, bold=boolean)`. We
          # continue to support the old API because you should never
          # break old APIs unnecessarily :P
          foreground, bold = colors
          foreground = self.class.const_get(foreground.to_s.upcase) if foreground.is_a?(Symbol)

          bold       = bold ? BOLD : ""
          "#{bold}#{foreground}#{string}#{CLEAR}"
        end
      end

    protected

      def can_display_colors?
        are_colors_supported? && !are_colors_disabled?
      end

      def are_colors_supported?
        stdout.tty? && ENV["TERM"] != "dumb"
      end

      def are_colors_disabled?
        !ENV['NO_COLOR'].nil?
      end

      # Overwrite show_diff to show diff with colors if Diff::LCS is
      # available.
      #
      def show_diff(destination, content) #:nodoc:
        if diff_lcs_loaded? && ENV["THOR_DIFF"].nil? && ENV["RAILS_DIFF"].nil?
          actual  = File.binread(destination).to_s.split("\n")
          content = content.to_s.split("\n")

          Diff::LCS.sdiff(actual, content).each do |diff|
            output_diff_line(diff)
          end
        else
          super
        end
      end

      def output_diff_line(diff) #:nodoc:
        case diff.action
        when "-"
          say "- #{diff.old_element.chomp}", :red, true
        when "+"
          say "+ #{diff.new_element.chomp}", :green, true
        when "!"
          say "- #{diff.old_element.chomp}", :red, true
          say "+ #{diff.new_element.chomp}", :green, true
        else
          say "  #{diff.old_element.chomp}", nil, true
        end
      end

      # Check if Diff::LCS is loaded. If it is, use it to create pretty output
      # for diff.
      #
      def diff_lcs_loaded? #:nodoc:
        return true if defined?(Diff::LCS)
        return @diff_lcs_loaded unless @diff_lcs_loaded.nil?

        @diff_lcs_loaded = begin
          require "diff/lcs"
          true
        rescue LoadError
          false
        end
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/color.rb000064400000011530150403134040021556 0ustar00class Bundler::Thor
  module Shell
    class Basic
      DEFAULT_TERMINAL_WIDTH = 80

      attr_accessor :base
      attr_reader   :padding

      # Initialize base, mute and padding to nil.
      #
      def initialize #:nodoc:
        @base = nil
        @mute = false
        @padding = 0
        @always_force = false
      end

      # Mute everything that's inside given block
      #
      def mute
        @mute = true
        yield
      ensure
        @mute = false
      end

      # Check if base is muted
      #
      def mute?
        @mute
      end

      # Sets the output padding, not allowing less than zero values.
      #
      def padding=(value)
        @padding = [0, value].max
      end

      # Sets the output padding while executing a block and resets it.
      #
      def indent(count = 1)
        orig_padding = padding
        self.padding = padding + count
        yield
        self.padding = orig_padding
      end

      # Asks something to the user and receives a response.
      #
      # If a default value is specified it will be presented to the user
      # and allows them to select that value with an empty response. This
      # option is ignored when limited answers are supplied.
      #
      # If asked to limit the correct responses, you can pass in an
      # array of acceptable answers.  If one of those is not supplied,
      # they will be shown a message stating that one of those answers
      # must be given and re-asked the question.
      #
      # If asking for sensitive information, the :echo option can be set
      # to false to mask user input from $stdin.
      #
      # If the required input is a path, then set the path option to
      # true. This will enable tab completion for file paths relative
      # to the current working directory on systems that support
      # Readline.
      #
      # ==== Example
      # ask("What is your name?")
      #
      # ask("What is the planet furthest from the sun?", :default => "Pluto")
      #
      # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"])
      #
      # ask("What is your password?", :echo => false)
      #
      # ask("Where should the file be saved?", :path => true)
      #
      def ask(statement, *args)
        options = args.last.is_a?(Hash) ? args.pop : {}
        color = args.first

        if options[:limited_to]
          ask_filtered(statement, color, options)
        else
          ask_simply(statement, color, options)
        end
      end

      # Say (print) something to the user. If the sentence ends with a whitespace
      # or tab character, a new line is not appended (print + flush). Otherwise
      # are passed straight to puts (behavior got from Highline).
      #
      # ==== Example
      # say("I know you knew that.")
      #
      def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
        return if quiet?

        buffer = prepare_message(message, *color)
        buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")

        stdout.print(buffer)
        stdout.flush
      end

      # Say (print) an error to the user. If the sentence ends with a whitespace
      # or tab character, a new line is not appended (print + flush). Otherwise
      # are passed straight to puts (behavior got from Highline).
      #
      # ==== Example
      # say_error("error: something went wrong")
      #
      def say_error(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
        return if quiet?

        buffer = prepare_message(message, *color)
        buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")

        stderr.print(buffer)
        stderr.flush
      end

      # Say a status with the given color and appends the message. Since this
      # method is used frequently by actions, it allows nil or false to be given
      # in log_status, avoiding the message from being shown. If a Symbol is
      # given in log_status, it's used as the color.
      #
      def say_status(status, message, log_status = true)
        return if quiet? || log_status == false
        spaces = "  " * (padding + 1)
        status = status.to_s.rjust(12)
        margin = " " * status.length + spaces

        color  = log_status.is_a?(Symbol) ? log_status : :green
        status = set_color status, color, true if color

        message = message.to_s.chomp.gsub(/(?<!\A)^/, margin)
        buffer = "#{status}#{spaces}#{message}\n"

        stdout.print(buffer)
        stdout.flush
      end

      # Make a question the to user and returns true if the user replies "y" or
      # "yes".
      #
      def yes?(statement, color = nil)
        !!(ask(statement, color, :add_to_history => false) =~ is?(:yes))
      end

      # Make a question the to user and returns true if the user replies "n" or
      # "no".
      #
      def no?(statement, color = nigems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/shell/basic.rb000064400000036117150403134040021531 0ustar00    end

      # Prints a table.
      #
      # ==== Parameters
      # Array[Array[String, String, ...]]
      #
      # ==== Options
      # indent<Integer>:: Indent the first column by indent value.
      # colwidth<Integer>:: Force the first column to colwidth spaces wide.
      #
      def print_table(array, options = {}) # rubocop:disable MethodLength
        return if array.empty?

        formats = []
        indent = options[:indent].to_i
        colwidth = options[:colwidth]
        options[:truncate] = terminal_width if options[:truncate] == true

        formats << "%-#{colwidth + 2}s".dup if colwidth
        start = colwidth ? 1 : 0

        colcount = array.max { |a, b| a.size <=> b.size }.size

        maximas = []

        start.upto(colcount - 1) do |index|
          maxima = array.map { |row| row[index] ? row[index].to_s.size : 0 }.max
          maximas << maxima
          formats << if index == colcount - 1
                       # Don't output 2 trailing spaces when printing the last column
                       "%-s".dup
                     else
                       "%-#{maxima + 2}s".dup
                     end
        end

        formats[0] = formats[0].insert(0, " " * indent)
        formats << "%s"

        array.each do |row|
          sentence = "".dup

          row.each_with_index do |column, index|
            maxima = maximas[index]

            f = if column.is_a?(Numeric)
              if index == row.size - 1
                # Don't output 2 trailing spaces when printing the last column
                "%#{maxima}s"
              else
                "%#{maxima}s  "
              end
            else
              formats[index]
            end
            sentence << f % column.to_s
          end

          sentence = truncate(sentence, options[:truncate]) if options[:truncate]
          stdout.puts sentence
        end
      end

      # Prints a long string, word-wrapping the text to the current width of the
      # terminal display. Ideal for printing heredocs.
      #
      # ==== Parameters
      # String
      #
      # ==== Options
      # indent<Integer>:: Indent each line of the printed paragraph by indent value.
      #
      def print_wrapped(message, options = {})
        indent = options[:indent] || 0
        width = terminal_width - indent
        paras = message.split("\n\n")

        paras.map! do |unwrapped|
          words = unwrapped.split(" ")
          counter = words.first.length
          words.inject do |memo, word|
            word = word.gsub(/\n\005/, "\n").gsub(/\005/, "\n")
            counter = 0 if word.include? "\n"
            if (counter + word.length + 1) < width
              memo = "#{memo} #{word}"
              counter += (word.length + 1)
            else
              memo = "#{memo}\n#{word}"
              counter = word.length
            end
            memo
          end
        end.compact!

        paras.each do |para|
          para.split("\n").each do |line|
            stdout.puts line.insert(0, " " * indent)
          end
          stdout.puts unless para == paras.last
        end
      end

      # Deals with file collision and returns true if the file should be
      # overwritten and false otherwise. If a block is given, it uses the block
      # response as the content for the diff.
      #
      # ==== Parameters
      # destination<String>:: the destination file to solve conflicts
      # block<Proc>:: an optional block that returns the value to be used in diff and merge
      #
      def file_collision(destination)
        return true if @always_force
        options = block_given? ? "[Ynaqdhm]" : "[Ynaqh]"

        loop do
          answer = ask(
            %[Overwrite #{destination}? (enter "h" for help) #{options}],
            :add_to_history => false
          )

          case answer
          when nil
            say ""
            return true
          when is?(:yes), is?(:force), ""
            return true
          when is?(:no), is?(:skip)
            return false
          when is?(:always)
            return @always_force = true
          when is?(:quit)
            say "Aborting..."
            raise SystemExit
          when is?(:diff)
            show_diff(destination, yield) if block_given?
            say "Retrying..."
          when is?(:merge)
            if block_given? && !merge_tool.empty?
              merge(destination, yield)
              return nil
            end

            say "Please specify merge tool to `THOR_MERGE` env."
          else
            say file_collision_help
          end
        end
      end

      # This code was copied from Rake, available under MIT-LICENSE
      # Copyright (c) 2003, 2004 Jim Weirich
      def terminal_width
        result = if ENV["THOR_COLUMNS"]
          ENV["THOR_COLUMNS"].to_i
        else
          unix? ? dynamic_width : DEFAULT_TERMINAL_WIDTH
        end
        result < 10 ? DEFAULT_TERMINAL_WIDTH : result
      rescue
        DEFAULT_TERMINAL_WIDTH
      end

      # Called if something goes wrong during the execution. This is used by Bundler::Thor
      # internally and should not be used inside your scripts. If something went
      # wrong, you can always raise an exception. If you raise a Bundler::Thor::Error, it
      # will be rescued and wrapped in the method below.
      #
      def error(statement)
        stderr.puts statement
      end

      # Apply color to the given string with optional bold. Disabled in the
      # Bundler::Thor::Shell::Basic class.
      #
      def set_color(string, *) #:nodoc:
        string
      end

    protected

      def prepare_message(message, *color)
        spaces = "  " * padding
 gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/group.rb000064400000021551150403134040020471 0ustar00V["THOR_DIFF"] || ENV["RAILS_DIFF"] || "diff -u"

        require "tempfile"
        Tempfile.open(File.basename(destination), File.dirname(destination)) do |temp|
          temp.write content
          temp.rewind
          system %(#{diff_cmd} "#{destination}" "#{temp.path}")
        end
      end

      def quiet? #:nodoc:
        mute? || (base && base.options[:quiet])
      end

      # Calculate the dynamic width of the terminal
      def dynamic_width
        @dynamic_width ||= (dynamic_width_stty.nonzero? || dynamic_width_tput)
      end

      def dynamic_width_stty
        `stty size 2>/dev/null`.split[1].to_i
      end

      def dynamic_width_tput
        `tput cols 2>/dev/null`.to_i
      end

      def unix?
        RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris)/i
      end

      def truncate(string, width)
        as_unicode do
          chars = string.chars.to_a
          if chars.length <= width
            chars.join
          else
            chars[0, width - 3].join + "..."
          end
        end
      end

      if "".respond_to?(:encode)
        def as_unicode
          yield
        end
      else
        def as_unicode
          old = $KCODE
          $KCODE = "U"
          yield
        ensure
          $KCODE = old
        end
      end

      def ask_simply(statement, color, options)
        default = options[:default]
        message = [statement, ("(#{default})" if default), nil].uniq.join(" ")
        message = prepare_message(message, *color)
        result = Bundler::Thor::LineEditor.readline(message, options)

        return unless result

        result = result.strip

        if default && result == ""
          default
        else
          result
        end
      end

      def ask_filtered(statement, color, options)
        answer_set = options[:limited_to]
        case_insensitive = options.fetch(:case_insensitive, false)
        correct_answer = nil
        until correct_answer
          answers = answer_set.join(", ")
          answer = ask_simply("#{statement} [#{answers}]", color, options)
          correct_answer = answer_match(answer_set, answer, case_insensitive)
          say("Your response must be one of: [#{answers}]. Please try again.") unless correct_answer
        end
        correct_answer
      end

      def answer_match(possibilities, answer, case_insensitive)
        if case_insensitive
          possibilities.detect{ |possibility| possibility.downcase == answer.downcase }
        else
          possibilities.detect{ |possibility| possibility == answer }
        end
      end

      def merge(destination, content) #:nodoc:
        require "tempfile"
        Tempfile.open([File.basename(destination), File.extname(destination)], File.dirname(destination)) do |temp|
          temp.write content
          temp.rewind
          system %(#{merge_tool} "#{temp.path}" "#{destination}")
        end
      end

      def merge_tool #:nodoc:
        @merge_tool ||= ENV["THOR_MERGE"] || git_merge_tool
      end

      def git_merge_tool #:nodoc:
        `git config merge.tool`.rstrip rescue ""
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/group.rb000064400000021551150403134040020471 0ustar00require_relative "base"

# Bundler::Thor has a special class called Bundler::Thor::Group. The main difference to Bundler::Thor class
# is that it invokes all commands at once. It also include some methods that allows
# invocations to be done at the class method, which are not available to Bundler::Thor
# commands.
class Bundler::Thor::Group
  class << self
    # The description for this Bundler::Thor::Group. If none is provided, but a source root
    # exists, tries to find the USAGE one folder above it, otherwise searches
    # in the superclass.
    #
    # ==== Parameters
    # description<String>:: The description for this Bundler::Thor::Group.
    #
    def desc(description = nil)
      if description
        @desc = description
      else
        @desc ||= from_superclass(:desc, nil)
      end
    end

    # Prints help information.
    #
    # ==== Options
    # short:: When true, shows only usage.
    #
    def help(shell)
      shell.say "Usage:"
      shell.say "  #{banner}\n"
      shell.say
      class_options_help(shell)
      shell.say desc if desc
    end

    # Stores invocations for this class merging with superclass values.
    #
    def invocations #:nodoc:
      @invocations ||= from_superclass(:invocations, {})
    end

    # Stores invocation blocks used on invoke_from_option.
    #
    def invocation_blocks #:nodoc:
      @invocation_blocks ||= from_superclass(:invocation_blocks, {})
    end

    # Invoke the given namespace or class given. It adds an instance
    # method that will invoke the klass and command. You can give a block to
    # configure how it will be invoked.
    #
    # The namespace/class given will have its options showed on the help
    # usage. Check invoke_from_option for more information.
    #
    def invoke(*names, &block)
      options = names.last.is_a?(Hash) ? names.pop : {}
      verbose = options.fetch(:verbose, true)

      names.each do |name|
        invocations[name] = false
        invocation_blocks[name] = block if block_given?

        class_eval <<-METHOD, __FILE__, __LINE__ + 1
          def _invoke_#{name.to_s.gsub(/\W/, '_')}
            klass, command = self.class.prepare_for_invocation(nil, #{name.inspect})

            if klass
              say_status :invoke, #{name.inspect}, #{verbose.inspect}
              block = self.class.invocation_blocks[#{name.inspect}]
              _invoke_for_class_method klass, command, &block
            else
              say_status :error, %(#{name.inspect} [not found]), :red
            end
          end
        METHOD
      end
    end

    # Invoke a thor class based on the value supplied by the user to the
    # given option named "name". A class option must be created before this
    # method is invoked for each name given.
    #
    # ==== Examples
    #
    #   class GemGenerator < Bundler::Thor::Group
    #     class_option :test_framework, :type => :string
    #     invoke_from_option :test_framework
    #   end
    #
    # ==== Boolean options
    #
    # In some cases, you want to invoke a thor class if some option is true or
    # false. This is automatically handled by invoke_from_option. Then the
    # option name is used to invoke the generator.
    #
    # ==== Preparing for invocation
    #
    # In some cases you want to customize how a specified hook is going to be
    # invoked. You can do that by overwriting the class method
    # prepare_for_invocation. The class method must necessarily return a klass
    # and an optional command.
    #
    # ==== Custom invocations
    #
    # You can also supply a block to customize how the option is going to be
    # invoked. The block receives two parameters, an instance of the current
    # class and the klass to be invoked.
    #
    def invoke_from_option(*names, &block)
      options = names.last.is_a?(Hash) ? names.pop : {}
      verbose = options.fetch(:verbose, :white)

      names.each do |name|
        unless class_options.key?(name)
          raise ArgumentError, "You have to define the option #{name.inspect} " \
                              "before setting invoke_from_option."
        end

        invocations[name] = true
        invocation_blocks[name] = block if block_given?

        class_eval <<-METHOD, __FILE__, __LINE__ + 1
          def _invoke_from_option_#{name.to_s.gsub(/\W/, '_')}
            return unless options[#{name.inspect}]

            value = options[#{name.inspect}]
            value = #{name.inspect} if TrueClass === value
            klass, command = self.class.prepare_for_invocation(#{name.inspect}, value)

            if klass
              say_status :invoke, value, #{verbose.inspect}
              blockgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/options.rb000064400000016012150403134040022320 0ustar00per(shell, groups)
    end

    # Get invocations array and merge options from invocations. Those
    # options are added to group_options hash. Options that already exists
    # in base_options are not added twice.
    #
    def get_options_from_invocations(group_options, base_options) #:nodoc: # rubocop:disable MethodLength
      invocations.each do |name, from_option|
        value = if from_option
          option = class_options[name]
          option.type == :boolean ? name : option.default
        else
          name
        end
        next unless value

        klass, _ = prepare_for_invocation(name, value)
        next unless klass && klass.respond_to?(:class_options)

        value = value.to_s
        human_name = value.respond_to?(:classify) ? value.classify : value

        group_options[human_name] ||= []
        group_options[human_name] += klass.class_options.values.select do |class_option|
          base_options[class_option.name.to_sym].nil? && class_option.group.nil? &&
            !group_options.values.flatten.any? { |i| i.name == class_option.name }
        end

        yield klass if block_given?
      end
    end

    # Returns commands ready to be printed.
    def printable_commands(*)
      item = []
      item << banner
      item << (desc ? "# #{desc.gsub(/\s+/m, ' ')}" : "")
      [item]
    end
    alias_method :printable_tasks, :printable_commands

    def handle_argument_error(command, error, _args, arity) #:nodoc:
      msg = "#{basename} #{command.name} takes #{arity} argument".dup
      msg << "s" if arity > 1
      msg << ", but it should not."
      raise error, msg
    end

  protected

    # The method responsible for dispatching given the args.
    def dispatch(command, given_args, given_opts, config) #:nodoc:
      if Bundler::Thor::HELP_MAPPINGS.include?(given_args.first)
        help(config[:shell])
        return
      end

      args, opts = Bundler::Thor::Options.split(given_args)
      opts = given_opts || opts

      instance = new(args, opts, config)
      yield instance if block_given?

      if command
        instance.invoke_command(all_commands[command])
      else
        instance.invoke_all
      end
    end

    # The banner for this class. You can customize it if you are invoking the
    # thor class by another ways which is not the Bundler::Thor::Runner.
    def banner
      "#{basename} #{self_command.formatted_usage(self, false)}"
    end

    # Represents the whole class as a command.
    def self_command #:nodoc:
      Bundler::Thor::DynamicCommand.new(namespace, class_options)
    end
    alias_method :self_task, :self_command

    def baseclass #:nodoc:
      Bundler::Thor::Group
    end

    def create_command(meth) #:nodoc:
      commands[meth.to_s] = Bundler::Thor::Command.new(meth, nil, nil, nil, nil)
      true
    end
    alias_method :create_task, :create_command
  end

  include Bundler::Thor::Base

protected

  # Shortcut to invoke with padding and block handling. Use internally by
  # invoke and invoke_from_option class methods.
  def _invoke_for_class_method(klass, command = nil, *args, &block) #:nodoc:
    with_padding do
      if block
        case block.arity
        when 3
          yield(self, klass, command)
        when 2
          yield(self, klass)
        when 1
          instance_exec(klass, &block)
        end
      else
        invoke klass, command, *args
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/options.rb000064400000016012150403134040022320 0ustar00class Bundler::Thor
  class Options < Arguments #:nodoc: # rubocop:disable ClassLength
    LONG_RE     = /^(--\w+(?:-\w+)*)$/
    SHORT_RE    = /^(-[a-z])$/i
    EQ_RE       = /^(--\w+(?:-\w+)*|-[a-z])=(.*)$/i
    SHORT_SQ_RE = /^-([a-z]{2,})$/i # Allow either -x -v or -xv style for single char args
    SHORT_NUM   = /^(-[a-z])#{NUMERIC}$/i
    OPTS_END    = "--".freeze

    # Receives a hash and makes it switches.
    def self.to_switches(options)
      options.map do |key, value|
        case value
        when true
          "--#{key}"
        when Array
          "--#{key} #{value.map(&:inspect).join(' ')}"
        when Hash
          "--#{key} #{value.map { |k, v| "#{k}:#{v}" }.join(' ')}"
        when nil, false
          nil
        else
          "--#{key} #{value.inspect}"
        end
      end.compact.join(" ")
    end

    # Takes a hash of Bundler::Thor::Option and a hash with defaults.
    #
    # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters
    # an unknown option or a regular argument.
    def initialize(hash_options = {}, defaults = {}, stop_on_unknown = false, disable_required_check = false)
      @stop_on_unknown = stop_on_unknown
      @disable_required_check = disable_required_check
      options = hash_options.values
      super(options)

      # Add defaults
      defaults.each do |key, value|
        @assigns[key.to_s] = value
        @non_assigned_required.delete(hash_options[key])
      end

      @shorts = {}
      @switches = {}
      @extra = []
      @stopped_parsing_after_extra_index = nil
      @is_treated_as_value = false

      options.each do |option|
        @switches[option.switch_name] = option

        option.aliases.each do |short|
          name = short.to_s.sub(/^(?!\-)/, "-")
          @shorts[name] ||= option.switch_name
        end
      end
    end

    def remaining
      @extra
    end

    def peek
      return super unless @parsing_options

      result = super
      if result == OPTS_END
        shift
        @parsing_options = false
        @stopped_parsing_after_extra_index ||= @extra.size
        super
      else
        result
      end
    end

    def shift
      @is_treated_as_value = false
      super
    end

    def unshift(arg, is_value: false)
      @is_treated_as_value = is_value
      super(arg)
    end

    def parse(args) # rubocop:disable MethodLength
      @pile = args.dup
      @is_treated_as_value = false
      @parsing_options = true

      while peek
        if parsing_options?
          match, is_switch = current_is_switch?
          shifted = shift

          if is_switch
            case shifted
            when SHORT_SQ_RE
              unshift($1.split("").map { |f| "-#{f}" })
              next
            when EQ_RE
              unshift($2, is_value: true)
              switch = $1
            when SHORT_NUM
              unshift($2)
              switch = $1
            when LONG_RE, SHORT_RE
              switch = $1
            end

            switch = normalize_switch(switch)
            option = switch_option(switchgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/argument.rb000064400000003404150403134040022450 0ustar00 UnknownArgumentError.new(@switches.keys, unknown) unless unknown.empty?
    end

  protected

    def assign_result!(option, result)
      if option.repeatable && option.type == :hash
        (@assigns[option.human_name] ||= {}).merge!(result)
      elsif option.repeatable
        (@assigns[option.human_name] ||= []) << result
      else
        @assigns[option.human_name] = result
      end
    end

    # Check if the current value in peek is a registered switch.
    #
    # Two booleans are returned.  The first is true if the current value
    # starts with a hyphen; the second is true if it is a registered switch.
    def current_is_switch?
      return [false, false] if @is_treated_as_value
      case peek
      when LONG_RE, SHORT_RE, EQ_RE, SHORT_NUM
        [true, switch?($1)]
      when SHORT_SQ_RE
        [true, $1.split("").any? { |f| switch?("-#{f}"gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/options.rb000064400000016012150403134040022320 0ustar00d
    end

    # Check if the given argument is actually a shortcut.
    #
    def normalize_switch(arg)
      (@shorts[arg] || arg).tr("_", "-")
    end

    def parsing_options?
      peek
      @parsing_options
    end

    # Parse boolean values which can gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb000064400000011154150403134040022634 0ustar00 nil # User set value to nil
        elsif option.string? && !option.required?
          # Return the default if there is one, else the human name
          return option.lazy_default || option.default || option.human_name
        elsif option.lazy_default
          return option.lazy_default
        else
          raise MalformattedArgumentError, "No value provided for option '#{switch}'"
        end
      end

      @non_assigned_required.delete(option)
      send(:"parse_#{option.type}", switch)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/argument.rb000064400000003404150403134040022450 0ustar00class Bundler::Thor
  class Argument #:nodoc:
    VALID_TYPES = [:numeric, :hash, :array, :string]

    attr_reader :name, :description, :enum, :required, :type, :default, :banner
    alias_method :human_name, :name

    def initialize(name, options = {})
      class_name = self.class.name.split("::").last

      type = options[:type]

      raise ArgumentError, "#{class_name} name can't be nil."                         if name.nil?
      raise ArgumentError, "Type :#{type} is not valid for #{class_name.downcase}s."  if type && !valid_type?(type)

      @name        = name.to_s
      @description = options[:desc]
      @required    = options.key?(:required) ? options[:required] : true
      @type        = (type || :string).to_sym
      @default     = options[:default]
      @banner      = options[:banner] || default_banner
      @enum        = options[:enum]

      validate! # Trigger specific validations
    end

    def usage
      required? ? banner : "[#{banner}]"
    end

    def required?
      required
    end

    def show_default?
      case default
      when Array, String, Hash
        !default.empty?
      else
        default
      end
    end

  protected

    def validate!
      raise ArgumentError, "An argument cannot be required and have default value." if required? && !default.nil?
      raise ArgumentError, "An argument cannot have an enum other than an array." if @enum && !@enum.is_a?(Array)
    end

    def valid_type?(type)
      self.class::VALID_TYPES.include?(type.to_sym)
    end

    def default_banner
      case type
      when :boolean
        nil
      when :string, :default
        human_name.upcase
      when :numeric
        "N"
      when :hash
        "key:value"
      when :array
        "one two three"
      end
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb000064400000011154150403134040022634 0ustar00class Bundler::Thor
  class Arguments #:nodoc: # rubocop:disable ClassLength
    NUMERIC = /[-+]?(\d*\.\d+|\d+)/

    # Receives an array of args and returns two arrays, one with arguments
    # and one with switches.
    #
    def self.split(args)
      arguments = []

      args.each do |item|
        break if item.is_a?(String) && item =~ /^-/
        arguments << item
      end

      [arguments, args[Range.new(arguments.size, -1)]]
    end

    def self.parse(*args)
      to_parse = args.pop
      new(*args).parse(to_parse)
    end

    # Takes an array of Bundler::Thor::Argument objects.
    #
    def initigems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/option.rb000064400000010633150403134040022140 0ustar00=~ /^--(no|skip)-([-\w]+)$/
      $2
    end

    def last?
      @pile.empty?
    end

    def peek
      @pile.first
    end

    def shift
      @pile.shift
    end

    def unshift(arg)
      if arg.is_a?(Array)
        @pile = arg + @pile
      else
        @pile.unshift(arg)
      end
    end

    def current_is_value?
      peek && peek.to_s !~ /^-{1,2}\S+/
    end

    # Runs through the argument array getting strings that contains ":" and
    # mark it as a hash:
    #
    #   [ "name:string", "age:integer" gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/argument.rb000064400000003404150403134040022450 0ustar00an error.
    #
    def parse_numeric(name)
      return shift if peek.is_a?(Numeric)

      unless peek =~ NUMERIC && $& == peek
        raise MalformattedArgumentError, "Expected numeric value for '#{name}'; got #{peek.inspect}"
      end

      value = $&.index(".") ? shift.to_f : shift.to_i
      if @switches.is_a?(Hash) && switch = @switches[name]
        if switch.enum && !switch.enum.include?(value)
          raise MalformattedArgumentError, "Expected '#{name}' to be one of #{switch.enum.join(', ')}; got #{value}"
        end
      end
      value
    end

    # Parse string:
    # for --string-arg, just return the current value in the pile
    # for --no-string-arg, nil
    # Check if the peek is included in enum if enum is provided. Otherwise raises an error.
    #
    def parse_string(name)
      if no_or_skip?(name)
        nil
      else
        value = shift
        if @switches.is_a?(Hash) && switch = @switches[name]
          if switch.enum && !switch.enum.include?(value)
            raise MalformattedArgumentError, "Expected '#{name}' to be one of #{switch.enum.join(', ')}; got #{value}"
          end
        end
        value
      end
    end

    # Raises an error if @non_assigned_required array is not empty.
    #
    def check_requirement!
      return if @non_assigned_required.empty?
      names = @non_assigned_required.map do |o|
        o.respond_to?(:switch_name) ? o.switch_name : o.human_name
      end.join("', '")
      class_name = self.class.name.split("::").last.downcase
      raise RequiredArgumentMissingError, "No value provided for required #{class_name} '#{names}'"
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb000064400000011154150403134040022634 0ustar00class Bundler::Thor
  class Option < Argument #:nodoc:
    attr_reader :aliases, :group, :lazy_default, :hide, :repeatable

    VALID_TYPES = [:boolean, :numeric, :hash, :array, :string]

    def initialize(name, options = {})
      @check_default_type = options[:check_default_type]
      options[:required] = false unless options.key?(:required)
      @repeatable     = options.fetch(:repeatable, false)
     gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/command.rb000064400000011204150403134040020745 0ustar00 option foo without default value
    #
    #   parse :foo => 2
    #   #=> Option foo with default value 2 and type numeric
    #
    #   parse :foo => :numeric
    #   #=> Option foo without default value and type numeric
    #
    #   parse :foo => true
    #   #=> Option foo with default value true and type boolean
    #
    # The valid types are :boolean, :numeric, :hash, :array and :string. If none
    # is given a default type is assumed. This default type accepts arguments as
    # string (--foo=value) or booleans (just --foo).
    #
    # By default all options are optional, unless :required is given.
    #
    def self.parse(key, value)
      if key.is_a?(Array)
        name, *aliases = key
      else
        name = key
        aliases = []
      end

      name    = name.to_s
      default = value

      type = case value
      when Symbol
        default = nil
        if VALID_TYPES.include?(value)
          value
        elsif required = (value == :required) # rubocop:disable AssignmentInCondition
          :string
        end
      when TrueClass, FalseClass
        :boolean
      when Numeric
        :numeric
      when Hash, Array, String
        value.class.name.downcase.to_sym
      end

      new(name.to_s, :required => required, :type => type, :default => default, :aliases => aliases)
    end

    def switch_name
      @switch_name ||= dasherized? ? name : dasherize(name)
    end

    def human_name
      @human_name ||= dasherized? ? undasherize(name) : name
    end

    def usage(padding = 0)
      sample = if banner && !banner.to_s.empty?
        "#{switch_name}=#{banner}".dup
      else
        switch_name
      end

      sample = "[#{sample}]".dup unless required?

      if boolean?
        sample << ", [#{dasherize('no-' + human_name)}]" unless (name == "force") || name.start_with?("no-")
      end

      if aliases.empty?
        (" " * padding) << sample
      else
        "#{aliases.join(', ')}, #{sample}"
      end
    end

    VALID_TYPES.each do |type|
      class_eval <<-RUBY, __FILE__, __LINE__ + 1
        def #{type}?
          self.type == #{type.inspect}
        end
      RUBY
    end

  protected

    def validate!
      raise ArgumentError, "An option cannot be boolean and required." if boolean? && required?
      validate_default_type!
    end

    def validate_default_type!
      default_type = case @default
      when nil
        return
      when TrueClass, FalseClass
        required? ? :string : :boolean
      when Numeric
        :numeric
      when Symbol
        :string
      when Hash, Array, String
        @default.class.name.downcase.to_sym
      end

      expected_type = (@repeatable && @type != :hash) ? :array : @type

      if default_type != expected_type
        err = "Expected #{expected_type} default value for '#{switch_name}'; got #{@default.inspect} (#{default_type})"

        if @check_default_type
          raise ArgumentError, err
        elsif @check_default_type == nil
          Bundler::Thor.deprecation_warning "#{err}.\n" +
            'This will be rejected in the future unless you explicitly pass the options `check_default_type: false`' +
            ' or call `allow_incompatible_default_type!` in your code'
        end
      end
    end

    def dasherized?
      name.index("-") == 0
    end

    def undasherize(str)
      str.sub(/^-{1,2}/, "")
    end

    def dasherize(str)
      (str.length > 1 ? "--" : "-") + str.tr("_", "-")
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/command.rb0000644gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser/option.rb000064400000010633150403134040022140 0ustar00  # By default, a command invokes a method in the thor class. You can change this
    # implementation to create custom commands.
  gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/nested_context.rb000064400000000453150403134040022361 0ustar00ge(klass, namespace = true, subcommand = false)
      if ancestor_name
        formatted = "#{ancestor_name} ".dup # add space
      elsif namespace
        namespace = klass.namespace
        formatted = "#{namespace.gsub(/^(default)/, '')}:".dup
      end
      formatted ||= "#{klass.namespace.spgems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser.rb000064400000000212150403134040020620 0ustar00   end
    end

    def not_debugging?(instance)
      !(instance.class.respond_to?(:debugging) && instance.class.debugging)
    end

    gems/gems/bundler-2.4.19/lib/bundler/dependency.rb000064400000006161150403134040015460 0ustar00    def handle_argument_error?(instance, error, caller)
      not_debugging?(instance) && (error.message =~ /wrong number of arguments/ || error.message =~ /given \d*, expected \d*/) && begin
        saned = sans_backtrace(error.backtrace, caller)
        saned.empty? || saned.size == 1
      end
    end

    def handle_no_method_error?(instance, error, caller)
      not_debugging?(instance) &&
        error.message =~ /^undefined method `#{name}' for #{Regexp.escape(instance.to_s)}$/
    end
  end
  Task = Command

  # A command that is hidden in help messages but still invocable.
  class HiddenCommand < Command
    def hidden?
      true
    end
  end
  HiddenTask = HiddenCommand

  # A dynamic command that handles method missing scenarios.
  class DynamicCommand < Command
    def initialize(name, options = nil)
      super(name.to_s, "A dynamically-generated command", name.to_s, name.to_s, options)
    end

    def run(instance, args = [])
      if (instance.methods & [name.to_s, name.to_sym]).empty?
        super
      else
        instance.class.handle_no_command_error(name)
      end
    end
  end
  DynamicTask = DynamicCommand
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/command.rb000064400000011204150403134040020745 0ustar00class Bundler::Thor
  class NestedContext
    def initialize
      @depth = 0
    end

    def enter
      push

      yield
    ensure
      pop
    end

    def entered?
      @depth > 0
    end

    private

    def push
      @depth += 1
    end

    def pop
      @depth -= 1
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser.rb000064400000000212150403134040020620 0ustar00require_relative "parser/argument"
require_relative "parser/arguments"
require_relative "parser/option"
require_rgems/gems/bundler-2.4.19/lib/bundler/definition.rb000064400000100515150403134040015470 0ustar00# frozen_string_literal: true

require "rubygems/dependency"
require_relative "shared_helpers"
require_relative "rubygems_ext"

module Bundler
  class Dependency < Gem::Dependency
    attr_reader :autorequire
    attr_reader :groups, :platforms, :gemfile, :path, :git, :github, :branch, :ref

    ALL_RUBY_VERSIONS = ((18..27).to_a + (30..33).to_a).freeze
    PLATFORM_MAP = {
      :ruby => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
      :mri => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
      :rbx => [Gem::Platform::RUBY],
      :truffleruby => [Gem::Platform::RUBY],
      :jruby => [Gem::Platform::JAVA, [18, 19]],
      :windows => [Gem::Platform::WINDOWS, ALL_RUBY_VERSIONS],
      :mswin => [Gem::Platform::MSWIN,     ALL_RUBY_VERSIONS],
      :mswin64 => [Gem::Platform::MSWIN64, ALL_RUBY_VERSIONS - [18]],
      :mingw => [Gem::Platform::MINGW, ALL_RUBY_VERSIONS],
      :x64_mingw => [Gem::Platform::X64_MINGW, ALL_RUBY_VERSIONS - [18, 19]],
    }.each_with_object({}) do |(platform, spec), hash|
      hash[platform] = spec[0]
      spec[1]&.each {|version| hash[:"#{platform}_#{version}"] = spec[0] }
    end.freeze

    def initialize(name, version, options = {}, &blk)
      type = options["type"] || :runtime
      super(name, version, type)

      @autorequire    = nil
      @groups         = Array(options["group"] || :default).map(&:to_sym)
      @source         = options["source"]
      @path           = options["path"]
      @git            = options["git"]
      @github         = options["github"]
      @branch         = options["branch"]
      @ref            = options["ref"]
      @platforms      = Array(options["platforms"])
      @env            = options["env"]
      @should_include = options.fetch("should_include", true)
      @gemfile        = options["gemfile"]
      @force_ruby_platform = options["force_ruby_platform"] if options.key?("force_ruby_platform")

      @autorequire = Array(options["require"] || []) if options.key?("require")
    end

    # Returns the platforms this dependency is valid for, in the same order as
    # passed in the `valid_platforms` parameter
    def gem_platforms(valid_platforms)
      return [Gem::Platform::RUBY] if force_ruby_platform
      return valid_platforms if @platforms.empty?

      valid_platforms.select {|p| expanded_platforms.include?(GemHelpers.generic(p)) }
    end

    def expanded_platforms
      @expanded_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.flatten.uniq
    end

    def should_include?
      @should_include && current_env? && current_platform?
    end

    def current_env?
      return true unless @env
      if @env.is_a?(Hash)
        @env.all? do |key, val|
  gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/nested_context.rb000064400000000453150403134040022361 0ustar00gems/gems/bundler-2.4.19/lib/bundler/definition.rb000064400000100515150403134040015470 0ustar00gems/gems/bundler-2.4.19/lib/bundler/vendor/thor/lib/thor/parser.rb000064400000000212150403134040020620 0ustar00Gemfile
    # @param lockfile [Pathname,nil] Path to Gemfile.lock
    # @param unlock [Hash, Boolean, nil] Gems that have been requested
 gems/gems/bundler-2.4.19/lib/bundler/dependency.rb000064400000006161150403134040015460 0ustar00ram sources [Bundler::SourceList]
    # @param unlock [Hash, Boolean, nil] Gems that have been requested
    #   to be updated or true if all gems should be updated
    # @param ruby_version [Bundler::RubyVersion, nil] Requested Ruby Version
    # @param optional_groups [Array(String)] A list of optional groups
    def initialize(lockfile, dependencies, sources, unlock, ruby_version = nil, optional_groups = [], gemfiles = [])
      if [true, false].include?(unlock)
        @unlocking_bundler = false
        @unlocking = unlock
      else
        @unlocking_bundler = unlock.delete(:bundler)
        @unlocking = unlock.any? {|_k, v| !Array(v).empty? }
      end

      @dependencies    = dependencies
      @sources         = sources
      @unlock          = unlock
      @optional_groups = optional_groups
      @remote          = false
      @prefer_local    = false
      @specs           = nil
      @ruby_version    = ruby_version
      @gemfiles        = gemfiles

      @lockfile               = lockfile
      @lockfile_contents      = String.new

      @locked_bundler_version = nil
      @resolved_bundler_version = nil

      @locked_ruby_version = nil
      @new_platform = nil
      @removed_platform = nil

      if lockfile && File.exist?(lockfile)
        @lockfile_contents = Bundler.read_file(lockfile)
        @locked_gems = LockfileParser.new(@lockfile_contents)
        @locked_platforms = @locked_gems.platforms
        @platforms = @locked_platforms.dup
        @locked_bundler_version = @locked_gems.bundler_version
        @locked_ruby_version = @locked_gems.ruby_version
        @originally_locked_specs = SpecSet.new(@locked_gems.specs)

        if unlock != true
          @locked_deps    = @locked_gems.dependencies
          @locked_specs   = @originally_locked_specs
          @locked_sources = @locked_gems.sources
        else
          @unlock         = {}
          @locked_deps    = {}
          @locked_specs   = SpecSet.new([])
          @locked_sources = []
        end
      else
        @unlock         = {}
        @platforms      = []
        @locked_gems    = nil
        @locked_deps    = {}
        @locked_specs   = SpecSet.new([])
        @originally_locked_specs = @locked_specs
        @locked_sources = []
        @locked_platforms = []
      end

      locked_gem_sources = @locked_sources.select {|s| s.is_a?(Source::Rubygems) }
      @multisource_allowed = locked_gem_sources.size == 1 && locked_gem_sources.first.multiple_remotes? && Bundler.frozen_bundle?

      if @multisource_allowed
        unless sources.aggregate_global_source?
          msg = "Your lockfile contains a single rubygems source section with multiple remotes, which is insecure. Make sure you run `bundle install` in non frozen mode and commit the result to make your lockfile secure."

          Bundler::SharedHelpers.major_deprecation 2, msg
        end

        @sources.merged_gem_lockfile_sections!(locked_gem_sources.first)
      end

      @unlock[:sources] ||= []
      @unlock[:ruby] ||= if @ruby_version && locked_ruby_version_object
        @ruby_version.diff(locked_ruby_version_object)
      end
      @unlocking ||= @unlock[:ruby] ||= (!gems/gems/bundler-2.4.19/lib/bundler/definition.rb000064400000100515150403134040015470 0ustar00
      resolve
    end

    def resolve_remotely!
      @remote = true
      sources.remote!
      resolve
    end

    def resolution_mode=(options)
      if options["local"]
        @remote = false
      else
        @remote = true
        @prefer_local = options["prefer-local"]
      end
    end

    def setup_sources_for_resolve
      if @remote == false
        sources.cached!
      else
        sources.remote!
      end
    end

    # For given dependency list returns a SpecSet with Gemspec of all the required
    # dependencies.
    #  1. The method first resolves the dependencies specified in Gemfile
    #  2. After that it tries and fetches gemspec of resolved dependencies
    #
    # @return [Bundler::SpecSet]
    def specs
      @specs ||= materialize(requested_dependencies)
    end

    def new_specs
      specs - @locked_specs
    end

    def removed_specs
      @locked_specs - specs
    end

    def missing_specs
      resolve.materialize(requested_dependencies).missing_specs
    end

    def missing_specs?
      missing = missing_specs
      return false if missing.empty?
      Bundler.ui.debug "The definition is missing #{missing.map(&:full_name)}"
      true
    rescue BundlerError => e
      @resolve = nil
      @resolver = nil
      @resolution_packages = nil
      @specs = nil
      @gem_version_promoter = nil

      Bundler.ui.debug "The definition is missing dependencies, failed to resolve & materialize locally (#{e})"
      true
    end

    def requested_specs
      specs_for(requested_groups)
    end

    def requested_dependencies
      dependencies_for(requested_groups)
    end

    def current_dependencies
      filter_relevant(dependencies)
    end

    def current_locked_dependencies
      filter_relevant(locked_dependencies)
    end

    def filter_relevant(dependencies)
      dependencies.select do |d|
        d.should_include? && !d.gem_platforms([generic_local_platform]).empty?
      end
    end

    def locked_dependencies
      @locked_deps.values
    end

    def new_deps
      @new_deps ||= @dependencies - locked_dependencies
    end

    def deleted_deps
      @deleted_deps ||= locked_dependencies - @dependencies
    end

    def specs_for(groups)
      return specs if groups.empty?
      deps = dependencies_for(groups)
      materialize(deps)
    end

    def dependencies_for(groups)
      groups.map!(&:to_sym)
      current_dependencies.reject do |d|
        (d.groups & groups).empty?
      end
    end

    # Resolve all the dependencies specified in Gemfile. It ensures that
    # dependencies that have been already resolved via locked file and are fresh
    # are reused when resolving dependencies
    #
    # @return [SpecSet] resolved dependencies
    def resolve
      @resolve ||= if Bundler.frozen_bundle?
        Bundler.ui.debug "Frozen, using resolution from the lockfile"
        @locked_specs
      elsif no_resolve_needed?
        if deleted_deps.any?
          Bundler.ui.debug "Some dependencies were deleted, using a subset of the resolution from the lockfile"
          SpecSet.new(filter_specs(@locked_specs, @dependencies - deleted_deps))
        else
          Bundler.ui.debug "Found no changes, using resolution from the lockfile"
          if @removed_platform || @locked_gems.may_include_redundant_platform_specific_gems?
            SpecSet.new(filter_specs(@locked_specs, @dependencies))
          else
            @locked_specs
          end
        end
      else
        Bundler.ui.debug "Found changes from the lockfile, re-resolving dependencies because #{change_reason}"
        start_resolution
      end
    end

    def spec_git_paths
      sources.git_sources.map {|s| File.realpath(s.path) if File.exist?(s.path) }.compact
    end

    def groups
      dependencies.map(&:groups).flatten.uniq
    end

    def lock(file, preserve_unknown_sections = false)
      return if Definition.no_lock

      contents = to_lock

      # Convert to \r\n if the existing lock has them
      # i.e., Windows with `git config core.autocrlf=true`
      contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match?("\r\n")

      if @locked_bundler_version
        locked_major = @locked_bundler_version.segments.first
        current_major = bundler_version_to_lock.segments.first

        updating_major = locked_major < current_major
      end

      preserve_unknown_sections ||= !updating_major && (Bundler.frozen_bundle? || !(unlocking? || @unlocking_bundler))

      return if file && File.exist?(file) && lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections)

      if Bundler.frozen_bundle?
        Bundler.ui.error "Cannot write a changed lockfile while frozen."
        return
      end

      SharedHelpers.filesystem_access(file) do |p|
        File.open(p, "wb") {|f| f.puts(contents) }
      end
    end

    def locked_ruby_version
      return unless ruby_version
      if @unlock[:ruby] || !@locked_ruby_version
        Bundler::RubyVersion.system
      else
        @locked_ruby_version
      end
    end

    def locked_ruby_version_object
      return unless @locked_ruby_version
      @locked_ruby_version_object ||= begin
        unless version = RubyVersion.from_string(@locked_ruby_version)
          raise LockfileError, "The Ruby version #{@locked_ruby_version} from " \
            "#{@lockfile} could not be parsed. " \
            "Try running bundle update --ruby to resolve this."
        end
        version
      end
    end

    def bundler_version_to_lock
      @resolved_bundler_version || Bundler.gem_version
    end

    def to_lock
      require_relative "lockfile_generator"
      LockfileGenerator.generate(self)
    end

    def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
      added =   []
      deleted = []
      changed = []

      new_platforms = @platforms - @locked_platforms
      deleted_platforms = @locked_platforms - @platforms
      added.concat new_platforms.map {|p| "* platform: #{p}" }
      deleted.concat deleted_platforms.map {|p| "* platform: #{p}" }

      added.concat new_deps.map {|d| "* #{pretty_dep(d)}" } if new_deps.any?
      deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" } if deleted_deps.any?

      both_sources = Hash.new {|h, k| h[k] = [] }
      current_dependencies.each {|d| both_sources[d.name][0] = d }
      current_locked_dependencies.each {|d| both_sources[d.name][1] = d }

      both_sources.each do |name, (dep, lock_dep)|
        next if dep.nil? || lock_dep.nil?

        gemfile_source = dep.source || default_source
        lock_source = lock_dep.source || default_source
        next if lock_source.include?(gemfile_source)

        gemfile_source_name = dep.source ? gemfile_source.to_gemfile : "no specified source"
        lockfile_source_name = lock_dep.source ? lock_source.to_gemfile : "no specified source"
        changed << "* #{name} from `#{lockfile_source_name}` to `#{gemfile_source_name}`"
      end

      reason = change_reason
      msg = String.new
      msg << "#{reason.capitalize.strip}, but the lockfile can't be updated because frozen mode is set"
      msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
      msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any?
      msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any?
      msg << "\n\nRun `bundle install` elsewhere and add the updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control.\n"

      unless explicit_flag
        suggested_command = unless Bundler.settings.locations("frozen").keys.include?(:env)
          "bundle config set frozen false"
        end
        msg << "If this is a development machine, remove the #{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)} " \
               "freeze by running `#{suggested_command}`." if suggested_command
      end

      raise ProductionError, msg if added.any? || deleted.any? || changed.any? || !nothing_changed?
    end

    def validate_runtime!
      validate_ruby!
      validate_platforms!
    end

    def validate_ruby!
      return unless ruby_version

      if diff = ruby_version.diff(Bundler::RubyVersion.system)
        problem, expected, actual = diff

        msg = case problem
              when :engine
                "Your Ruby engine is #{actual}, but your Gemfile specified #{expected}"
              when :version
                "Your Ruby version is #{actual}, but your Gemfile specified #{expected}"
              when :engine_version
                "Your #{Bundler::RubyVersion.system.engine} version is #{actual}, but your Gemfile specified #{ruby_version.engine} #{expected}"
              when :patchlevel
                if !expected.is_a?(String)
                  "The Ruby patchlevel in your Gemfile must be a string"
                else
                  "Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}"
                end
        end

        raise RubyVersionMismatch, msg
      end
    end

    def validate_platforms!
      return if current_platform_locked?

      raise ProductionError, "Your bundle only supports platforms #{@platforms.map(&:to_s)} " \
        "but your local platform is #{Bundler.local_platform}. " \
        "Add the current platform to the lockfile with\n`bundle lock --add-platform #{Bundler.local_platform}` and try again."
    end

    def add_platform(platform)
      @new_platform ||= !@platforms.include?(platform)
      @platforms |= [platform]
    end

    def remove_platform(platform)
      removed_platform = @platforms.delete(Gem::Platform.new(platform))
      @removed_platform ||= removed_platform
      return if removed_platform
      raise InvalidOption, "Unable to remove the platform `#{platform}` since the only platforms are #{@platforms.join ", "}"
    end

    def most_specific_locked_platform
      @platforms.min_by do |bundle_platform|
        platform_specificity_match(bundle_platform, local_platform)
      end
    end

    attr_reader :sources
    private :sources

    def nothing_changed?
      !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@missing_lockfile_dep && !@unlocking_bundler
    end

    def no_resolve_needed?
      !unlocking? && nothing_changed?
    end

    def unlocking?
      @unlocking
    end

    private

    def resolver
      @resolver ||= Resolver.new(resolution_packages, gem_version_promoter)
    end

    def expanded_dependencies
      dependencies_with_bundler + metadata_dependencies
    end

    def dependencies_with_bundler
      return dependencies unless @unlocking_bundler
      return dependencies if dependencies.map(&:name).include?("bundler")

      [Dependency.new("bundler", @unlocking_bundler)] + dependencies
    end

    def resolution_packages
      @resolution_packages ||= begin
        last_resolve = converge_locked_specs
        remove_ruby_from_platforms_if_necessary!(current_dependencies)
        packages = Resolver::Base.new(source_requirements, expanded_dependencies, last_resolve, @platforms, :locked_specs => @originally_locked_specs, :unlock => @unlock[:gems], :prerelease => gem_version_promoter.pre?)
        additional_base_requirements_for_resolve(packages, last_resolve)
      end
    end

    def filter_specs(specs, deps)
      SpecSet.new(specs).for(deps, false, platforms)
    end

    def materialize(dependencies)
      specs = resolve.materialize(dependencies)
      missing_specs = specs.missing_specs

      if missing_specs.any?
        missing_specs.each do |s|
          locked_gem = @locked_specs[s.name].last
          next if locked_gem.nil? || locked_gem.version != s.version || !@remote
          raise GemNotFound, "Your bundle is locked to #{locked_gem} from #{locked_gem.source}, but that version can " \
                             "no longer be found in that source. That means the author of #{locked_gem} has removed it. " \
                             "You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
                             "removed in order to install."
        end

        missing_specs_list = missing_specs.group_by(&:source).map do |source, missing_specs_for_source|
          "#{missing_specs_for_source.map(&:full_name).join(", ")} in #{source}"
        end

        raise GemNotFound, "Could not find #{missing_specs_list.join(" nor ")}"
      end

      incomplete_specs = specs.incomplete_specs
      loop do
        break if incomplete_specs.empty?

        Bundler.ui.debug("The lockfile does not have all gems needed for the current platform though, Bundler will still re-resolve dependencies")
        setup_sources_for_resolve
        resolution_packages.delete(incomplete_specs)
        @resolve = start_resolution
        specs = resolve.materialize(dependencies)

        still_incomplete_specs = specs.incomplete_specs

        if still_incomplete_specs == incomplete_specs
          package = resolution_packages.get_package(incomplete_specs.first.name)
          resolver.raise_not_found! package
        end

        incomplete_specs = still_incomplete_specs
      end

      bundler = sources.metadata_source.specs.search(["bundler", Bundler.gem_version]).last
      specs["bundler"] = bundler

      specs
    end

    def start_resolution
      result = resolver.start

      @resolved_bundler_version = result.find {|spec| spec.name == "bundler" }&.version

      SpecSet.new(SpecSet.new(result).for(dependencies, false, @platforms))
    end

    def precompute_source_requirements_for_indirect_dependencies?
      sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && !sources.aggregate_global_source?
    end

    def pin_locally_available_names(source_requirements)
      source_requirements.each_with_object({}) do |(name, original_source), new_source_requirements|
        local_source = original_source.dup
        local_source.local_only!

        new_source_requirements[name] = if local_source.specs.search(name).any?
          local_source
        else
          original_source
        end
      end
    end

    def current_ruby_platform_locked?
      return false unless generic_local_platform == Gem::Platform::RUBY
      return false if Bundler.settings[:force_ruby_platform] && !@platforms.include?(Gem::Platform::RUBY)

      current_platform_locked?
    end

    def current_platform_locked?
      @platforms.any? do |bundle_platform|
        MatchPlatform.platforms_match?(bundle_platform, Bundler.local_platform)
      end
    end

    def add_current_platform
      return if current_ruby_platform_locked?

      add_platform(local_platform)
    end

    def change_reason
      if unlocking?
        unlock_reason = @unlock.reject {|_k, v| Array(v).empty? }.map do |k, v|
          if v == true
            k.to_s
          else
            v = Array(v)
            "#{k}: (#{v.join(", ")})"
          end
        end.join(", ")
        return "bundler is unlocking #{unlock_reason}"
      end
      [
        [@source_changes, "the list of sources changed"],
        [@dependency_changes, "the dependencies in your gemfile changed"],
        [@new_platform, "you added a new platform to your gemfile"],
        [@path_changes, "the gemspecs for path gems changed"],
        [@local_changes, "the gemspecs for git local gems changed"],
        [@missing_lockfile_dep, "your lock file is missing \"#{@missing_lockfile_dep}\""],
        [@unlocking_bundler, "an update to the version of Bundler itself was requested"],
      ].select(&:first).map(&:last).join(", ")
    end

    def pretty_dep(dep)
      SharedHelpers.pretty_dependency(dep)
    end

    # Check if the specs of the given source changed
    # according to the locked source.
    def specs_changed?(source)
      locked = @locked_sources.find {|s| s == source }

      !locked || dependencies_for_source_changed?(source, locked) || specs_for_source_changed?(source)
    end

    def dependencies_for_source_changed?(source, locked_source = source)
      deps_for_source = @dependencies.select {|s| s.source == source }
      locked_deps_for_source = locked_dependencies.select {|dep| dep.source == locked_source }

      deps_for_source.uniq.sort != locked_deps_for_source.sort
    end

    def specs_for_source_changed?(source)
      locked_index = Index.new
      locked_index.use(@locked_specs.select {|s| source.can_lock?(s) })

      # order here matters, since Index#== is checking source.specs.include?(locked_index)
      locked_index != source.specs
    rescue PathError, GitError => e
      Bundler.ui.debug "Assuming that #{source} has not changed since fetching its specs errored (#{e})"
      false
    end

    # Get all locals and override their matching sources.
    # Return true if any of the locals changed (for example,
    # they point to a new revision) or depend on new specs.
    def converge_locals
      locals = []

      Bundler.settings.local_overrides.map do |k, v|
        spec   = @dependencies.find {|s| s.name == k }
        source = spec&.source
        if source&.respond_to?(:local_override!)
          source.unlock! if @unlock[:gems].include?(spec.name)
          locals << [source, source.local_override!(v)]
        end
      end

      sources_with_changes = locals.select do |source, changed|
        changed || specs_changed?(source)
      end.map(&:first)
      !sources_with_changes.each {|source| @unlock[:sources] << source.name }.empty?
    end

    def check_missing_lockfile_dep
      all_locked_specs = @locked_specs.map(&:name) << "bundler"

      missing = @locked_specs.select do |s|
        s.dependencies.any? {|dep| !all_locked_specs.include?(dep.name) }
      end

      if missing.any?
        @locked_specs.delete(missing)

        return missing.first.name
      end

      return if @dependency_changes

      current_dependencies.find do |d|
        @locked_specs[d.name].empty? && d.name != "bundler"
      end&.name
    end

    def converge_paths
      sources.path_sources.any? do |source|
        specs_changed?(source)
      end
    end

    def converge_path_source_to_gemspec_source(source)
      return source unless source.instance_of?(Source::Path)
      gemspec_source = sources.path_sources.find {|s| s.is_a?(Source::Gemspec) && s.as_path_source == source }
      gemspec_source || source
    end

    def converge_path_sources_to_gemspec_sources
      @locked_sources.map! do |source|
        converge_path_source_to_gemspec_source(source)
      end
      @locked_specs.each do |spec|
        spec.source &&= converge_path_source_to_gemspec_source(spec.source)
      end
      @locked_deps.each do |_, dep|
        dep.source &&= converge_path_source_to_gemspec_source(dep.source)
      end
    end

    def converge_sources
      # Replace the sources from the Gemfile with the sources from the Gemfile.lock,
      # if they exist in the Gemfile.lock and are `==`. If you can't find an equivalent
      # source in the Gemfile.lock, use the one from the Gemfile.
      changes = sources.replace_sources!(@locked_sources)

      sources.all_sources.each do |source|
        # If the source is unlockable and the current command allows an unlock of
        # the source (for example, you are doing a `bundle update <foo>` of a git-pinned
        # gem), unlock it. For git sources, this means to unlock the revision, which
        # will cause the `ref` used to be the most recent for the branch (or master) if
        # an explicit `ref` is not used.
        if source.respond_to?(:unlock!) && @unlock[:sources].include?(source.name)
          source.unlock!
          changes = true
        end
      end

      changes
    end

    def converge_dependencies
      changes = false

      @dependencies.each do |dep|
        if dep.source
          dep.source = sources.get(dep.source)
        end

        next if unlocking?

        unless locked_dep = @locked_deps[dep.name]
          changes = true
          next
        end

        # Gem::Dependency#== matches Gem::Dependency#type. As the lockfile
        # doesn't carry a notion of the dependency type, if you use
        # add_development_dependency in a gemspec that's loaded with the gemspec
        # directive, the lockfile dependencies and resolved dependencies end up
        # with a mismatch on #type. Work around that by setting the type on the
        # dep from the lockfile.
        locked_dep.instance_variable_set(:@type, dep.type)

        # We already know the name matches from the hash lookup
        # so we only need to check the requirement now
        changes ||= dep.requirement != locked_dep.requirement
      end

      changes
    end

    # Remove elements from the locked specs that are expired. This will most
    # commonly happen if the Gemfile has changed since the lockfile was last
    # generated
    def converge_locked_specs
      converged = converge_specs(@locked_specs)

      resolve = SpecSet.new(converged.reject {|s| @unlock[:gems].include?(s.name) })

      diff = nil

      # Now, we unlock any sources that do not have anymore gems pinned to it
      sources.all_sources.each do |source|
        next unless source.respond_to?(:unlock!)

        unless resolve.any? {|s| s.source == source }
          diff ||= @locked_specs.to_a - resolve.to_a
          source.unlock! if diff.any? {|s| s.source == source }
        end
      end

      resolve
    end

    def converge_specs(specs)
      converged = []
      deps = []

      @specs_that_changed_sources = []

      specs.each do |s|
        name = s.name
        dep = @dependencies.find {|d| s.satisfies?(d) }
        lockfile_source = s.source

        if dep
          gemfile_source = dep.source || default_source

          @specs_that_changed_sources << s if gemfile_source != lockfile_source
          deps << dep if !dep.source || lockfile_source.include?(dep.source)
          @unlock[:gems] << name if lockfile_source.include?(dep.source) && lockfile_source != gemfile_source

          # Replace the locked dependency's source with the equivalent source from the Gemfile
          s.source = gemfile_source
        else
          # Replace the locked dependency's source with the default source, if the locked source is no longer in the Gemfile
          s.source = default_source unless sources.get(lockfile_source)
        end

        next if @unlock[:sources].include?(s.source.name)

        # Path sources have special logic
        if s.source.instance_of?(Source::Path) || s.source.instance_of?(Source::Gemspec)
          new_specs = begin
            s.source.specs
          rescue PathError
            # if we won't need the source (according to the lockfile),
            # don't error if the path source isn't available
            next if specs.
                    for(requested_dependencies, false).
                    none? {|locked_spec| locked_spec.source == s.source }

            raise
          end

          new_spec = new_specs[s].first
          if new_spec
            s.dependencies.replace(new_spec.dependencies)
          else
            # If the spec is no longer in the path source, unlock it. This
            # commonly happens if the version changed in the gemspec
            @unlock[:gems] << gems/gems/bundler-2.4.19/lib/bundler/friendly_errors.rb000064400000007402150403134040016551 0ustar00pute_source_requirements_for_indirect_dependencies?
        all_requirements = source_map.all_requirements
        all_requirements = pin_locally_available_names(all_requirements) if @prefer_local
        { :default => default_source }.merge(all_requirements)
      else
        { :default => Source::RubygemsAggregate.new(sources, source_map) }.merge(source_map.direct_requirements)
      end
      source_requirements.merge!(source_map.locked_requirements) unless @remote
      metadata_dependencies.each do |dep|
        source_requirements[dep.name] = sources.metadata_source
      end

      default_bundler_source = source_requirements["bundler"] || default_source

      if @unlocking_bundler
        default_bundler_source.add_dependency_names("bundler")
      else
        source_requirements[:default_bundler] = default_bundler_source
        source_requirements["bundler"] = sources.metadata_source # needs to come last to override
      end

      verify_changed_sources!
      source_requirements
    end

    def default_source
      sources.default_source
    end

    def verify_changed_sources!
      @specs_that_changed_sources.each do |s|
        if s.source.specs.search(s.name).empty?
          raise GemNotFound, "Could not find gem '#{s.name}' in #{s.source}"
        end
      end
    end

    def requested_groups
      values = groups - Bundler.settings[:without] - @optional_groups + Bundler.settings[:with]
      values &= Bundler.settings[:only] unless Bundler.settings[:only].empty?
      values
    end

    def lockfiles_equal?(current, proposed, preserve_unknown_sections)
      if preserve_unknown_sections
        sections_to_ignore = LockfileParser.sections_to_ignore(@locked_bundler_version)
        sections_to_ignore += LockfileParser.unknown_sections_in_lockfile(current)
        sections_to_ignore << LockfileParser::RUBY
        sections_to_ignore << LockfileParser::BUNDLED unless @unlocking_bundler
        pattern = /#{Regexp.union(sections_to_ignore)}\n(\s{2,}.*\n)+/
        whitespace_cleanup = /\n{2,}/
        current = current.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
        proposed = proposed.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
      end
      current == proposed
    end

    def additional_base_requirements_for_resolve(resolution_packages, last_resolve)
      return resolution_packages unless @locked_gems && !sources.expired_sources?(@locked_gems.sources)
      converge_specs(@originally_locked_specs - last_resolve).each do |locked_spec|
        next if locked_spec.source.is_a?(Source::Path)
        resolution_packages.base_requirements[locked_spec.name] = Gem::Requirement.new(">= #{locked_spec.version}")
      end
      resolution_packages
    end

    def remove_ruby_from_platforms_if_necessary!(dependencies)
      return if Bundler.frozen_bundle? ||
                Bundler.local_platform == Gem::Platform::RUBY ||
                !platforms.include?(Gem::Platform::RUBY) ||
                (@new_platform && platforms.last == Gem::Platform::RUBY) ||
                @path_changes ||
                @dependency_changes ||
                !@originally_locked_specs.incomplete_ruby_specs?(dependencies)

      remove_platform(Gem::Platform::RUBY)
      add_current_platform
    end

    def source_map
      @source_map ||= SourceMap.new(sources, dependencies, @locked_specs)
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler/friendly_errors.rb000064400000007402150403134040016551 0ugems/gems/bundler-2.4.19/lib/bundler/lockfile_parser.rb000064400000016012150403134040016502 0ustar00RequireError
        Bundler.ui.error error.message
        Bundler.ui.trace error.orig_exception
      when BundlerError
        if Bundler.ui.debug?
          Bundler.ui.trace error
        else
          Bundler.ui.error error.message, :wrap => true
        end
      when Thor::Error
        Bundler.ui.error error.message
      when Interrupt
        Bundler.ui.error "\nQuitting..."
        Bundler.ui.trace error
      when Gem::InvalidSpecificationException
        Bundler.ui.error error.message, :wrap => true
      when SystemExit
      when *[defined?(Java::JavaLang::OutOfMemoryError) && Java::JavaLang::OutOfMemoryError].compact
        Bundler.ui.error "\nYour JVM has run out of memory, and Bundler cannot continue. " \
          "You can decrease the amount of memory Bundler needs by removing gems from your Gemfile, " \
          "especially large gems. (Gems can be as large as hundreds of megabytes, and Bundler has to read those files!). " \
          "Alternatively, you can increase the amount of memory the JVM is able to use by running Bundler with jruby -J-Xmx1024m -S bundle (JRuby defaults to 500MB)."
      else request_issue_report_for(error)
      end
    end

    def exit_status(error)
      case error
      when BundlerError then error.status_code
      when Thor::Error then 15
      when SystemExit then error.status
      else 1
      end
    end

    def request_issue_report_for(e)
      Bundler.ui.error <<-EOS.gsub(/^ {8}/, ""), nil, nil
        --- ERROR REPORT TEMPLATE -------------------------------------------------------

        ```
        #{exception_message(e)}
        ```

        #{Bundler::Env.report}
        --- TEMPLATE END ----------------------------------------------------------------

      EOS

      Bundler.ui.error "Unfortunately, an unexpected error occurred, and Bundler cannot continue."

      Bundler.ui.error <<-EOS.gsub(/^ {8}/, ""), nil, :yellow

        First, try this link to see if there are any existing issue reports for this error:
        #{issues_url(e)}

        If there aren't any reports for this error yet, please fill in the new issue form located at #{new_issue_url}, and copy and paste the report template above in there.
      EOS
    end

    def exception_message(error)
      message = serialized_exception_for(error)
      cause = error.cause
      return message unless cause

      message + serialized_exception_for(cause)
    end

    def serialized_exception_for(e)
      <<-EOS.gsub(/^ {8}/, "")
        #{e.class}: #{e.message}
          #{e.backtrace&.join("\n          ")&.chomp}
      EOS
    end

    def issues_url(exception)
      message = exception.message.lines.first.tr(":", " ").chomp
      message = message.split("-").first if exception.is_a?(Errno)
      require "cgi"
      "https://github.com/rubygems/rubygems/search?q=" \
        "#{CGI.escape(message)}&type=Issues"
    end

    def new_issue_url
      "https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md"
    end
  end

  def self.with_friendly_errors
    FriendlyErrors.enable!
    yield
  rescue SignalException
    raise
  rescue Exception => e # rubocop:disable Lint/RescueException
    raise if FriendlyErrors.disabled?

    FriendlyErrors.log_error(e)
    exit FriendlyErrors.exit_status(e)
  end
end
gems/gems/bundler-2.4.19/lib/bundler/lockfile_parser.rb000064400000016012150403134040016502 0ustar00# frozen_string_literal: true

module Bundler
  class LockfileParser
    attr_reader :sources, :dependencies, :specs, :platforms, :bundler_version, :ruby_version

    BUNDLED      = "BUNDLED WITH"
    DEPENDENCIES = "DEPENDENCIES"
    PLATFORMS    = "PLATFORMS"
    RUBY         = "RUBY VERSION"
    GIT          = "GIT"
    GEM     gems/gems/bundler-2.4.19/lib/bundler/friendly_errors.rb000064400000007402150403134040016551 0ustar00
    def self.sections_in_lockfile(lockfile_contents)
      lockfile_contents.scan(/^\w[\w ]*$/).uniq
    end

    def self.unknown_sections_in_lockfile(lockfile_contents)
      sections_in_lockfile(lockfile_contents) - KNOWN_SECTIONS
    end

    def self.sections_to_ignore(base_version = nil)
      base_version &&= base_version.release
      base_version ||= Gem::Version.create("1.0".dup)
      attributes = []
      SECTIONS_BY_VERSION_INTRODUCED.each do |version, introduced|
        next if version <= base_version
        attributes += introduced
      end
      attributes
    end

    def self.bundled_with
      lockfile = Bundler.default_lockfile
      return unless lockfile.file?

      lockfile_contents = Bundler.read_file(lockfile)
      return unless lockfile_contents.include?(BUNDLED)

      lockfile_contents.split(BUNDLED).last.strip
    end

    def initialize(lockfile)
      @platforms    = []
      @sources      = []
      @dependencies = {}
      @state        = nil
      @specs        = {}

      if lockfile.match?(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
        raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
          "Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
      end

      lockfile.split(/(?:\r?\n)+/).each do |line|
        if SOURCE.include?(line)
          @state = :source
          parse_source(line)
        elsif line == DEPENDENCIES
          @state = :dependency
        elsif line == PLATFORMS
          @state = :platform
        elsif line == RUBY
          @state = :ruby
        elsif line == BUNDLED
          @state = :bundled_with
        elsif /^[^\s]/.match?(line)
          @state = nil
        elsif @state
          send("parse_#{@state}", line)
        end
      end
      @specs = @specs.values.sort_by(&:full_name)
    rescue ArgumentError => e
      Bundler.ui.debug(e)
      raise LockfileError, "Your lockfile is unreadable. Run `rm gems/gems/bundler-2.4.19/lib/bundler.rb000064400000053553150403134040013351 0ustar00e_from_lock(@opts)
          @sources << @current_source
        end
      when OPTIONS
        value = $2
        value = true if value == "true"
        value = false if value == "false"

        key = $1

        if @opts[key]
          @opts[key] = Array(@opts[key])
          @opts[key] << value
        else
          @opts[key] = value
        end
      when *SOURCE
        @current_source = nil
        @opts = {}
        @type = line
      else
        parse_spec(line)
      end
    end

    space = / /
    NAME_VERSION = /
      ^(#{space}{2}|#{space}{4}|#{space}{6})(?!#{space}) # Exactly 2, 4, or 6 spaces at the start of the line
      (.*?)                                              # Name
      (?:#{space}\(([^-]*)                               # Sgems/gems/bundler-2.4.19/lib/bundler/lockfile_parser.rb000064400000016012150403134040016502 0ustar00version
        # to use in the case that there are no gemspecs present. A fake
        # gemspec is created based on the version set on the dependency
        # TODO: Use the version from the spec instead of from the dependency
        if version && version.size == 1 && version.first =~ /^\s*= (.+)\s*$/ && dep.source.is_a?(Bundler::Source::Path)
          dep.source.name    = name
          dep.source.version = $1
        end
      end

      @dependencies[dep.name] = dep
    end

    def parse_spec(line)
      return unless line =~ NAME_VERSION
      spaces = $1
      name = $2
      version = $3
      platform = $4

      if spaces.size == 4
        version = Gem::Version.new(version)
        platform = platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
        @current_spec = LazySpecification.new(name, version, platform)
        @current_spec.source = @current_source
        @current_source.add_dependency_names(name)

        @specs[@current_spec.full_name] = @current_spec
      elsif spaces.size == 6
        version = version.split(",").map(&:strip) if version
        dep = Gem::Dependency.new(name, version)
        @current_spec.dependencies << dep
      end
    end

    def parse_platform(line)
      @platforms << Gem::Platform.new($1) if line =~ /^  (.*)$/
    end

    def parse_bundled_with(line)
      line = line.strip
      return unless Gem::Version.correct?(line)
      @bundler_version = Gem::Version.create(line)
    end

    def parse_ruby(line)
      @ruby_version = line.strip
    end
  end
end
gems/gems/bundler-2.4.19/lib/bundler.rb000064400000053553150403134040013351 0ustar00# frozen_string_literal: true

require_relative "bundler/vendored_fileutils"
require "pathname"
require "rbconfig"

require_relative "bundler/errors"
require_relative "bundler/environment_preserver"
require_relative "bundler/plugin"
require_relative "bundler/rubygems_ext"
require_relative "bundler/rubygems_integration"
require_relative "bundler/version"
require_relative "bundler/constants"
require_relative "bundler/current_ruby"
require_relative "bundler/build_metadata"

# Bundler provides a consistent environment for Ruby projects by
# tracking and installing the exact gems and versions that are needed.
#
# Since Ruby 2.6, Bundler is a part of Ruby's standard library.
#
# Bundler is used by creating _gemfiles_ listing all the project dependencies
# and (optionally) their versions and then using
#
#   require 'bundler/setup'
#
# or Bundler.setup to setup environment where only specified gems and their
# specified versions could be used.
#
# See {Bundler website}[https://bundler.io/docs.html] for extensive documentation
# on gemfiles creation and Bundler usage.
#
# As a standard library inside project, Bundler could be used for introspection
# of loaded and required modules.
#
module Bundler
  environment_preserver = EnvironmentPreserver.from_env
  ORIGINAL_ENV = environment_preserver.restore
  environment_preserver.replace_with_backup
  SUDO_MUTEX = Thread::Mutex.new

  autoload :Definition,             File.expand_path("bundler/definition", __dir__)
  autoload :Dependency,             File.expand_path("bundler/dependency", __dir__)
  autoload :Deprecate,              File.expand_path("bundler/deprecate", __dir__)
  autoload :Digest,                 File.expand_path("bundler/digest", __dir__)
  autoload :Dsl,                    File.expand_path("bundler/dsl", __dir__)
  autoload :EndpointSpecification,  File.expand_path("bundler/endpoint_specification", __dir__)
  autoload :Env,                    File.expand_path("bundler/env", __dir__)
  autoload :Fetcher,                File.expand_path("bundler/fetcher", __dir__)
  autoload :FeatureFlag,            File.expand_path("bundler/feature_flag", __dir__)
  autoload :GemHelper,              File.expand_path("bundler/gem_helper", __dir__)
  autoload :GemHelpers,             File.expand_path("bundler/gem_helpers", __dir__)
  autoload :GemVersionPromoter,     File.expand_path("bundler/gem_version_promoter", __dir__)
  autoload :Graph,                  File.expand_path("bundler/graph", __dir__)
  autoload :Index,                  File.expand_path("bundler/index", __dir__)
  autoload :Injector,               File.expand_path("bundler/injector", __dir__)
  autoload :Installer,              File.expand_path("bundler/installer", __dir__)
  autoload :LazySpecification,      File.expand_path("bundler/lazy_specification", __dir__)
  autoload :LockfileParser,         File.expand_path("bundler/lockfile_parser", __dir__)
  autoload :MatchRemoteMetadata,    File.expand_path("bundler/match_remote_metadata", __dir__)
  autoload :ProcessLock,            File.expand_path("bundler/process_lock", __dir__)
  autoload :RemoteSpecification,    File.expand_path("bundler/remote_specification", __dir__)
  autoload :Resolver,               File.expand_path("bundler/resolver", __dir__)
  autoload :Retry,                  File.expand_path("bundler/retry", __dir__)
  autoload :RubyDsl,                File.expand_path("bundler/ruby_dsl", __dir__)
  autoload :RubyVersion,            File.expand_path("bundler/ruby_version", __dir__)
  autoload :Runtime,                File.expand_path("bundler/runtime", __dir__)
  autoload :SelfManager,            File.expand_path("bundler/self_manager", __dir__)
  autoload :Settings,               File.expand_path("bundler/settings", __dir__)
  autoload :SharedHelpers,          File.expand_path("bundler/shared_helpers", __dir__)
  autoload :Source,                 File.expand_path("bundler/source", __dir__)
  autoload :SourceList,             File.expand_path("bundler/source_list", __dir__)
  autoload :SourceMap,              File.expand_path("bundler/source_map", __dir__)
  autoload :SpecSet,                File.expand_path("bundler/spec_set", __dir__)
  autoload :StubSpecification,      File.expand_path("bundler/stub_specification", __dir__)
  autoload :UI,                     File.expand_path("bundler/ui", __dir__)
  autoload :URICredentialsFilter,   File.expand_path("bundler/uri_credentials_filter", __dir__)
  autoload :URINormalizer,          File.expand_path("bundler/uri_normalizer", __dir__)
  autoload :SafeMarshal,            File.expand_path("bundler/safe_marshal", __dir__)

 gems/gems/bundler-2.4.19/lib/bundler.rb000064400000053553150403134040013351 0ustar00e installed to.
    def bin_path
      @bin_path ||= begin
        path = settings[:bin] || "bin"
        path = Pathname.new(path).expand_path(root).expand_path
        SharedHelpers.filesystem_access(path) {|p| FileUtils.mkdir_p(p) }
        path
      end
    end

    # Turns on the Bundler runtime. After +Bundler.setup+ call, all +load+ or
    # +require+ of the gems would be allowed only if they are part of
    # the Gemfile or Ruby's standard library. If the versions specified
    # in Gemfile, only those versions would be loaded.
    #
    # Assuming Gemfile
    #
    #    gem 'first_gem', '= 1.0'
    #    group :test do
    #      gem 'second_gem', '= 1.0'
    #    end
    #
    # The code using Bundler.setup works as follows:
    #
    #    require 'third_gem' # allowed, required from global gems
    #    require 'first_gem' # allowed, loads the last installed version
    #    Bundler.setup
    #    require 'fourth_gem' # fails with LoadError
    #    require 'second_gem' # loads exactly version 1.0
    #
    # +Bundler.setup+ can be called only once, all subsequent calls are no-op.
    #
    # If _groups_ list is provided, only gems from specified groups would
    # be allowed (gems specified outside groups belong to special +:default+ group).
    #
    # To require all gems from Gemfile (or only some groups), see Bundler.require.
    #
    def setup(*groups)
      # Return if all groups are already loaded
      return @setup if defined?(@setup) && @setup

      definition.validate_runtime!

      SharedHelpers.print_major_deprecations!

      if groups.empty?
        # Load all groups, but only once
        @setup = load.setup
      else
        load.setup(*groups)
      end
    end

    # Setups Bundler environment (see Bundler.setup) if it is not already set,
    # and loads all gems from groups specified. Unlike ::setup, can be called
    # multiple times with different groups (if they were allowed by setup).
    #
    # Assuming Gemfile
    #
    #    gem 'first_gem', '= 1.0'
    #    group :test do
    #      gem 'second_gem', '= 1.0'
    #    end
    #
    # The code will work as follows:
    #
    #    Bundler.setup # allow all groups
    #    Bundler.require(:default) # requires only first_gem
    #    # ...later
    #    Bundler.require(:test)   # requires second_gem
    #
    def require(*groups)
      setup(*groups).require(*groups)
    end

    def load
      @load ||= Runtime.new(root, definition)
    end

    def environment
      SharedHelpers.major_deprecation 2, "Bundler.environment has been removed in favor of Bundler.load", :print_caller_location => true
      load
    end

    # Returns an instance of Bundler::Definition for given Gemfile and lockfile
    #
    # @param unlock [Hash, Boolean, nil] Gems that have been requested
    #   to be updated or true if all gems should be updated
    # @return [Bundler::Definition]
    def definition(unlock = nil)
      @definition = nil if unlock
      @definition ||= begin
        configure
        Definition.build(default_gemfile, default_lockfile, unlock)
      end
    end

    def frozen_bundle?
      frozen = settings[:frozen]
      return frozen unless frozen.nil?

      settings[:deployment]
    end

    def locked_gems
      @locked_gems ||=
        if defined?(@definition) && @definition
          definition.locked_gems
        elsif Bundler.default_lockfile.file?
          lock = Bundler.read_file(Bundler.default_lockfile)
          LockfileParser.new(lock)
        end
    end

    def most_specific_locked_platform?(platform)
      return false unless defined?(@definition) && @definition

      definition.most_specific_locked_platform == platform
    end

    def ruby_scope
      "#{Bundler.rubygems.ruby_engine}/#{RbConfig::CONFIG["ruby_version"]}"
    end

    def user_home
      @user_home ||= begin
        home = Bundler.rubygems.user_home
        bundle_home = home ? File.join(home, ".bundle") : nil

        warning = if home.nil?
          "Your home directory is not set."
        elsif !File.directory?(home)
          "`#{home}` is not a directory."
        elsif !File.writable?(home) && (!File.directory?(bundle_home) || !File.writable?(bundle_home))
          "`#{home}` is not writable."
        end

        if warning
          Bundler.ui.warn "#{warning}\n"
          user_home = tmp_home_path
          Bundler.ui.warn "Bundler will use `#{user_home}' as your home directory temporarily.\n"
          user_home
        else
          Pathname.new(home)
        end
      end
    end

    def user_bundle_path(dir = "home")
      env_var, fallback = case dir
                          when "home"
                            ["BUNDLE_USER_HOME", proc { Pathname.new(user_home).join(".bundle") }]
                          when "cache"
                            ["BUNDLE_USER_CACHE", proc { user_bundle_path.join("cache") }]
                          when "config"
                            ["BUNDLE_USER_CONFIG", proc { user_bundle_path.join("config") }]
                          when "plugin"
                            ["BUNDLE_USER_PLUGIN", proc { user_bundle_path.join("plugin") }]
                          else
                            raise BundlerError, "Unknown user path requested: #{dir}"
      end
      # `fallback` will already be a Pathname, but Pathname.new() is
      # idempotent so it's OK
      Pathname.new(ENV.fetch(env_var, &fallback))
    end

    def user_cache
      user_bundle_path("cache")
    end

    def home
      bundle_path.join("bundler")
    end

    def install_path
      home.join("gems")
    end

    def specs_path
      bundle_path.join("specifications")
    end

    def root
      @root ||= begin
                  SharedHelpers.root
                rescue GemfileNotFound
                  bundle_dir = default_bundle_dir
                  raise GemfileNotFound, "Could not locate Gemfile or .bundle/ directory" unless bundle_dir
                  Pathname.new(File.expand_path("..", bundle_dir))
                end
    end

    def app_config_path
      if app_config = ENV["BUNDLE_APP_CONFIG"]
        app_config_pathname = Pathname.new(app_config)

        if app_config_pathname.absolute?
          app_config_pathname
        else
          app_config_pathname.expand_path(root)
        end
      else
        root.join(".bundle")
      end
    end

    def app_cache(custom_path = nil)
      path = custom_path || root
      Pathname.new(path).join(settings.app_cache_path)
    end

    def tmp(name = Process.pid.to_s)
      Kernel.send(:require, "tmpdir")
      Pathname.new(Dir.mktmpdir(["bundler", name]))
    end

    def rm_rf(path)
      FileUtils.remove_entry_secure(path) if path && File.exist?(path)
    rescue ArgumentError
      message = <<EOF
It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
Please refer to https://ruby-doc.org/stdlib-3.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
EOF
      File.world_writable?(path) ? Bundler.ui.warn(message) : raise
      raise PathError, "Please fix the world-writable issue with your #{path} directory"
    end

    def settings
      @settings ||= Settings.new(app_config_path)
    rescue GemfileNotFound
      @settings = Settings.new(Pathname.new(".bundle").expand_path)
    end

    # @return [Hash] Environment present before Bundler was activated
    def original_env
      ORIGINAL_ENV.clone
    end

    # @deprecated Use `unbundled_env` instead
    def clean_env
      Bundler::SharedHelpers.major_deprecation(
        2,
        "`Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \
        "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`",
        :print_caller_location => true
      )

      unbundled_env
    end

    # @return [Hash] Environment with all bundler-related variables removed
    def unbundled_env
      env = original_env

      if env.key?("BUNDLER_ORIG_MANPATH")
        env["MANPATH"] = env["BUNDLER_ORIG_MANPATH"]
      end

      env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }

      if env.key?("RUBYOPT")
        rubyopt = env["RUBYOPT"].split(" ")
        rubyopt.delete("-r#{File.expand_path("bundler/setup", __dir__)}")
        rubyopt.delete("-rbundler/setup")
        env["RUBYOPT"] = rubyopt.join(" ")
      end

      if env.key?("RUBYLIB")
        rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
        rubylib.delete(__dir__)
        env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
      end

      env
    end

    # Run block with environment present before Bundler was activated
    def with_original_env
      with_env(original_env) { yield }
    end

    # @deprecated Use `with_unbundled_env` instead
    def with_clean_env
      Bundler::SharedHelpers.major_deprecation(
        2,
        "`Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \
        "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`",
        :print_caller_location => true
      )

      with_env(unbundled_env) { yield }
    end

    # Run block with all bundler-related variables removed
    def with_unbundled_env
      with_env(unbundled_env) { yield }
    end

    # Run subcommand with the environment present before Bundler was activated
    def original_system(*args)
      with_original_env { Kernel.system(*args) }
    end

    # @deprecated Use `unbundled_system` instead
    def clean_system(*args)
      Bundler::SharedHelpers.major_deprecation(
        2,
        "`Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. " \
        "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`",
        :print_caller_location => true
      )

      with_env(unbundled_env) { Kernel.system(*args) }
    end

    # Run subcommand in an environment with all bundler related variables removed
    def unbundled_system(*args)
      with_unbundled_env { Kernel.system(*args) }
    end

    # Run a `Kernel.exec` to a subcommand with the environment present before Bundler was activated
    def original_exec(*args)
      with_original_env { Kernel.exec(*args) }
    end

    # @deprecated Use `unbundled_exec` instead
    def clean_exec(*args)
      Bundler::SharedHelpers.major_deprecation(
        2,
        "`Bundler.clean_exec` has been deprecated in favor of `Bundler.unbundled_exec`. " \
        "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`",
        :print_caller_location => true
      )

      with_env(unbundled_env) { Kernel.exec(*args) }
    end

    # Run a `Kernel.exec` to a subcommand in an environment with all bundler related variables removed
    def unbundled_exec(*args)
      with_env(unbundled_env) { Kernel.exec(*args) }
    end

    def local_platform
      return Gem::Platform::RUBY if settings[:force_ruby_platform]
      Gem::Platform.local
    end

    def default_gemfile
      SharedHelpers.default_gemfile
    end

    def default_lockfile
      SharedHelpers.default_lockfile
    end

    def default_bundle_dir
      SharedHelpers.default_bundle_dir
    end

    def system_bindir
      # Gem.bindir doesn't always return the location that RubyGems will install
      # system binaries. If you put '-n foo' in your .gemrc, RubyGems will
      # install binstubs there instead. Unfortunately, RubyGems doesn't expose
      # that directory at all, so rather than parse .gemrc ourselves, we allow
      # the directory to be set as well, via `bundle config set --local bindir foo`.
      Bundler.settings[:system_bindir] || Bundler.rubygems.gem_bindir
    end

    def preferred_gemfile_name
      Bundler.settings[:init_gems_rb] ? "gems.rb" : "Gemfile"
    end

    def use_system_gems?
      configured_bundle_path.use_system_gems?
    end

    def mkdir_p(path, options = {})
      SharedHelpers.filesystem_access(path, :write) do |p|
        FileUtils.mkdir_p(p)
      end
    end

    def which(executable)
      if File.file?(executable) && File.executable?(executable)
        executable
      elsif paths = ENV["PATH"]
        quote = '"'
        paths.split(File::PATH_SEPARATOR).find do |path|
          path = path[1..-2] if path.start_with?(quote) && path.end_with?(quote)
          executable_path = File.expand_path(executable, path)
          rgems/gems/rackup-2.1.0/bin/rackup000075500000000151150403134050012326 0ustar00key]&.dup
    end

    def load_gemspec_uncached(file, validate = false)
      path = Pathname.new(file)
gems/gems/rackup-2.1.0/license.md000064400000006243150403134050012317 0ustar00d_root!
      @settings = nil
      @root = nil
    end

    def reset_paths!
      @bin_path = nil
      @bundler_major_version = nil
      @bundle_path = nil
      @configure = nil
      @configured_bundle_path = nil
      @definition = nil
      @load = nil
      @locked_gems = nil
      @root = nil
      @settings = nil
      @setup = nil
      @user_home = nil
    end

    def reset_rubygems!
      return unless defined?(@rubygems) && @rubygems
      rubygems.undo_replacements
      rubygems.reset
      @rubygems = nil
    end

    def configure_gem_home_and_path(path = bundle_path)
      configure_gem_path
      configure_gem_home(path)
      Bundler.rubygems.clear_paths
    end

    def self_manager
      @self_manager ||= begin
                          require_relative "bundler/self_manager"
                          Bundler::SelfManager.new
                        end
    end

    private

    def load_marshal(data, marshal_proc: nil)
      Marshal.load(data, marshal_proc)
    rescue TypeError => e
      raise MarshalError, "#{e.class}: #{e.message}"
    end

    def eval_yaml_gemspec(path, contents)
      Kernel.require "psych"

      Gem::Specification.from_yaml(contents)
    rescue ::Psych::SyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
      eval_gemspec(path, contents)
    end

    def eval_gemspec(path, contents)
      eval(contents, TOPLEVEL_BINDING.dup, path.expand_path.to_s)
    rescue ScriptError, StandardError => e
      msg = "There was an error while loading `#{path.basename}`: #{e.message}"

      raise GemspecError, Dsl::DSLError.new(msg, path, e.backtrace, contents)
    end

    def configure_gem_path
      unless use_system_gems?
        # this needs to be empty string to cause
        # PathSupport.split_gem_path to only load up the
        # Bundler --path setting as the GEM_PATH.
        Bundler::SharedHelpers.set_env "GEM_PATH", ""
      end
    end

    def configure_gem_home(path)
      Bundler::SharedHelpers.set_env "GEM_HOME", path.to_s
    end

    def tmp_home_path
      Kernel.send(:require, "tmpdir")
      SharedHelpers.filesystem_access(Dir.tmpdir) do
        path = Bundler.tmp
        at_exit { Bundler.rm_rf(path) }
        path
      end
    end

    # @param env [Hash]
    def with_env(env)
      backup = ENV.to_hash
      ENV.replace(env)
      yield
    ensure
      ENV.replace(backup)
    end
  end
end
gems/gems/rackup-2.1.0/bin/rackup000075500000000151150403134050012326 0ustar00#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative "../lib/rackup"
Rackup::Server.start
gems/gems/rackup-2.1.0/readme.md000064400000001365150403134050012132 0ustar00# MIT License

Copyright, 2007-2009, by Leah Neukirchen.  
Copyright, 2008, by Marc-André Cournoyer.  
Copyright, 2009, by Aaron Pfeifer.  
Copyright, 2009-2010, by Megan Batty.  
Copyright, 2009-2010, by Michael Fellinger.  
Copyright, 2009, by Genki Takiuchi.  
Copyright, 2009, by Joshua Peek.  
Copyright, 2009, by Yehuda Katz + Carl Lerche.  
Copyright, 2009, by Carl Lerche.  
Copyright, 2010, by Julik Tarkhanov.  
Copyright, 2010-2016, by James Tucker.  
Copyright, 2010, by Timur Batyrshin.  
Copyright, 2010, by Loren Segal.  
Copyright, 2010, by Andrew Bortz.  
Copyright, 2010, by John Barnette.  
Copyright, 2010, by John Sumsion.  
Copyright, 2011-2018, by Aaron Patterson.  
Copyright, 2011, by Konstantin Haase.  
Copyright, 2011, by Blake gems/gems/rackup-2.1.0/lib/rackup/version.rb000064400000000224150403134050014411 0ustar00o.  
Copyright, 2015, by deepj.  
Copyright, 2015, by Zachary Scott.  
Copyright, 2016, by Sophie Deziel.  
Copyright, 2016, by Kazuya Hotta.  
Copygems/gems/rackup-2.1.0/lib/rackup/handler/cgi.rb000064400000002510150403134050015103 0ustar00ons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.
gems/gems/rackup-2.1.0/readme.md000064400000001365150403134050012132 0ustar00gems/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb000064400000010372150403134050015774 0ustar00#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative "../lib/rackup"
Rackup::Server.start
gems/gems/rackup-2.1.0/license.md000064400000006243150403134050012317 0ustar00# MIT License

Copyright, 2007-2009, by Leah Neukirchen.  
Copyright, 2008, by Marc-André Cournoyer.  
Copyright, 2009, by Aaron Pfeifer.  
Copyright, 2009-2010, by Megan Batty.  
Copyright, 2009-2010, by Michael Fellinger.  
Copyright, 2009, by Genki Takiuchi.  
Copyright, 2009, by Joshua Peek.  
Copyright, 2009, by Yehuda Katz + Carl Lerche.  
Copyright, 2009, by Carl Lerche.  
Copyright, 2010, by Julik Tarkhanov.  
Copyright, 2010-2016, by James Tucker.  
Copyright, 2010, by Timur Batyrshin.  
Copyright, 2010, by Loren Segal.  
Copyright, 2010, by Andrew Bortz.  
Copyright, 2010, by John Barnette.  
Copyright, 2010, by John Sumsion.  
Copyright, 2011-2018, by Aaron Patterson.  
Copyright, 2011, by Konstantin Haase.  
Copyright, 2011, by Blake Mizerany.  
Copyright, 2011, by Tsutomu Kuroda.  
Copyright, 2012, by Jean Boussier.  
Copyright, 2012, by Trevor Wennblom.  
Copyright, 2012, by Anurag Priyam.  
Copyright, 2012, by Hrvoje Šimić.  
Copyright, 2013, by Uchio KONDO.  
Copyright, 2013, by Tim Moore.  
Copyright, 2013, by Postmodern.  
Copyright, 2013, by Bas Vodde.  
Copyright, 2013, by Joe Fiorini.  
Copyright, 2014, by Wyatt Pan.  
Copyright, 2014, by Lenny Marks.  
Copyright, 2014, by Igor Bochkariov.  
Copyright, 2014, by Max Cantor.  
Copyright, 2014, by David Celis.  
Copyright, 2014, by Rafael Mendonça França.  
Copyright, 2014, by Jeremy Kemper.  
Copyright, 2014, by Richard Schneeman.  
Copyright, 2015, by Peter Wilmott.  
Copyright, 2015, by Sean McGivern.  
Copyright, 2015, by Tadashi Saito.  
Copyright, 2015, by deepj.  
Copyright, 2015, by Zachary Scott.  
Copyright, 2016, by Sophie Deziel.  
Copyright, 2016, by Kazuya Hotta.  
Copyright, 2017, by Ryunosuke Sato.  
Copyright, 2017-2023, by Samuel Williams.  
Copyright, 2018, by Dillon Welch.  
Copyright, 2018, by Yoshiyuki Hirano.  
Copyright, 2018, by Nick LaMuro.  
Copyright, 2019, by Rafael França.  
Copyright, 2019, by Krzysztof Rybka.  
Copyright, 2019, by Misaki Shioi.  
Copyright, 2020-2022, by Jeremy Evans.  
Copyright, 2021, by Katsuhiko YOSHIDA.  
Copyright, 2021, by KS.  
Copyright, 2021, by Stephen Paul Weber.  
Copyright, 2022, by Akira Matsuda.  
Copyright, 2022, by Andrew Hoglund.  

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.
gems/gems/rackup-2.1.0/lib/rackup/stream.rb000064400000012212150403134050014217 0ustar00# Rackup

`rackup` provides a command line interface for running a Rack-compatible application.

[![Development Status](https://github.com/rack/rackup/workflows/Test/badge.svg)](https://github.com/rack/rackup/actions?workflow=Test)

## Installation

``` bash
$ gem install rackup
```

## Usage

In a directory with your `config.ru` simply run the command:

``` bash
$ rackup
```

Your application should now be available locally, typically `http://localhost:9292`.

## Contributing

We welcome contributions to this project.

1.  Fork it.
2.  Create your feature branch (`git checkout -b my-new-feature`).
3.  Commit your changes (`git commit -am 'Add some feature'`).
4.  Push to the branch (`git push origin my-new-feature`).
5.  Create new Pull Request.
gems/gems/rackup-2.1.0/lib/rackup/version.rb000064400000000224150403134050014411 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2023, by Samuel Williams.

module Rackup
  VERSION = "2.1.0"
end
gems/gems/rackup-2.1.0/lib/rackup/handler/cgi.rb000064400000002510150403134050015103 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2023, by Samuel Williams.

module Rackup
  module Handler
    class CGI
      include Rack

      def self.run(app, **options)
        $stdin.binmode
        serve app
      end

      def self.serve(app)
        env = ENV.to_hash
        env.delete "HTTP_CONTENT_LENGTH"

        env[SCRIPT_NAME] = ""  if env[SCRIPT_NAME] == "/"

        env.update(
          RACK_INPUT        => $stdin,
          RACK_ERRORS       => $stderr,
          RACK_URL_SCHEME   => ["yes", "on", "1"].include?(ENV[HTTPS]) ? "https" : "http"
        )

        env[QUERY_STRING] ||= ""
        env[REQUEST_PATH] ||= "/"

        status, headers, body = app.call(env)
        begin
          send_headers status, headers
          send_body body
        ensure
          body.close  if body.respond_to? :close
        end
      end

      def self.send_headers(status, headers)
        $stdout.print "Status: #{status}\r\n"
        headers.each { |k, vs|
          vs.split("\n").each { |v|
            $stdout.print "#{k}: #{v}\r\n"
          }
        }
        $stdout.print "\r\n"
        $stdout.flush
      end

      def self.send_body(body)
        body.each { |part|
          $stdout.print part
          $stdout.flush
        }
      end
    end

    register :cgi, CGI
  end
end
gems/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb000064400000010372150403134050015774 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2023, by Samuel Williams.
# Copyright, 2022, by Jeremy Evans.

require 'webrick'
require 'stringio'

require 'rack/constants'
require_relative '../handler'
require_relative '../version'

require_relative '../stream'

module Rackup
  module Handler
    class WEBrick < ::WEBrick::HTTPServlet::AbstractServlet
      def self.run(app, **options)
        environment  = ENV['RACK_ENV'] || 'development'
        default_host = environment == 'development' ? 'localhost' : nil

        if !options[:BindAddress] || options[:Host]
          options[:BindAddress] = options.dgems/gems/rackup-2.1.0/lib/rackup/handler.rb000064400000005473150403134050014354 0ustar00es mapping the WEBrick request to a Rack input stream.
      class Input
        include Stream::Reader

        def initialize(request)
          @request = request

          @reader = Fiber.new do
            @request.body do |chunk|
              Fiber.yield(chunk)
            end

            Fiber.yield(nil)

            # End of stream:
            @reader = nil
          end
        end

        def close
          @request = nil
          @reader = nil
        end

        private

        # Read one chunk from the request body.
        def read_next
          @reader&.resume
        end
      end

      def service(req, res)
        env = req.meta_vars
        env.delete_if { |k, v| v.nil? }

        input = Input.new(req)

        env.update(
          ::Rack::RACK_INPUT => input,
          ::Rack::RACK_ERRORS => $stderr,
          ::Rack::RACK_URL_SCHEME => ["yes", "on", "1"].include?(env[::Rack::HTTPS]) ? "https" : "http",
          ::Rack::RACK_IS_HIJACK => true,
        )

        env[::Rack::QUERY_STRING] ||= ""
        unless env[::Rack::PATH_INFO] == ""
          path, n = req.request_uri.path, env[::Rack::SCRIPT_NAME].length
          env[::Rack::PATH_INFO] = path[n, path.length - n]
        end
        env[::Rack::REQUEST_PATH] ||= [env[::Rack::SCRIPT_NAME], env[::Rack::PATH_INFO]].join

        status, headers, body = @app.call(env)
        begin
          res.status = status

          if value = headers[::Rack::RACK_HIJACK]
            io_lambda = value
            body = nil
          elsif !body.respond_to?(:to_path) && !body.respond_to?(:each)
            io_lambda = body
            body = nil
          end

          if value = headers.delete('set-cookie')
            res.cookies.concat(Array(value))
          end

          headers.each do |key, value|
            # Skip keys starting with rack., per Rack SPEC
            next if key.start_with?('rack.')

            # Since WEBrick won't accept repeated headers,
            # merge the values per RFC 1945 section 4.2.
            value = value.join(", ") if Array === value
            res[key] = value
          end

          if io_lambda
            protocol = headers['rack.protocol'] || headers['upgrade']

            if protocol
              # Set all the headers correctly for an upgrade response:
              res.upgrade!(protocol)
            end
            res.body = io_lambda
          elsif body.respond_to?(:to_path)
            res.body = ::File.open(body.to_path, 'rb')
          else
            buffer = String.new
            body.each do |part|
              buffer << part
            end
            res.body = buffer
          end
        ensure
          body.close if body.respond_to?(:close)
        end
      end
    end

    register :webrick, WEBrick
  end
end
gems/gems/rackup-2.1.0/lib/rackup/server.rb000064400000032327150403134050014243 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2022, by Samuel Williams.

module Rackup
  # The input stream is an IO-like object which contains the raw HTTP POST data. When applicable, its external encoding must be “ASCII-8BIT” and it must be opened in binary mode, for Ruby 1.9 compatibility. The input stream must respond to gets, each, read and rewind.
  class Stream
    def initialize(input = nil, output = Buffered.new)
      @input = input
      @output = output

      raise ArgumentError, "Non-writable output!" unless output.respond_to?(:write)

      # Will hold remaining data in `#read`.
      @buffer = nil
      @closed = false
    end

    attr :input
    attr :output

    # This provides a read-only interface for data, which is surprisingly tricky to implement correctly.
    module Reader
      # rack.hijack_io must respond to:
      # read, write, read_nonblock, write_nonblock, flush, close, close_read, close_write, closed?

      # read behaves like IO#read. Its signature is read([length, [buffer]]). If given, length must be a non-negative Integer (>= 0) or nil, and buffer must be a String and may not be nil. If length is given and not nil, then this method reads at most length bytes from the input stream. If length is not given or nil, then this method reads all data until EOF. When EOF is reached, this method returns nil if length is given and not nil, or “” if length is not given or is nil. If buffer is given, then the read data will be placed into buffer instead of a newly created String object.
      # @param length [Integer] the amount of data to read
      # @param buffer [String] the buffer which will receive the data
      # @return a buffer containing the data
      def read(length = nil, buffer = nil)
        return '' if length == 0

        buffer ||= String.new.force_encoding(Encoding::BINARY)

        # Take any previously buffered data and replace it into the given buffer.
        if @buffer
          buffer.replace(@buffer)
          @buffer = nil
        else
          buffer.clear
        end

        if length
          while buffer.bytesize < length and chunk = read_next
            buffer << chunk
          end

          # This ensures the subsequent `slice!` works correctly.
          buffer.force_encoding(Encoding::BINARY)

          # This will be at least one copy:
          @buffer = buffer.byteslice(length, buffer.bytesize)

          # This should be zero-copy:
          buffer.slice!(length, buffer.bytesize)

          if buffer.empty?
            return nil
          else
            return buffer
          end
        else
          while chunk = read_next
            buffer << chunk
          end

          return buffer
        end
      end

      # Read at most `length` bytes from the stream. Will avoid reading from the underlying stream if possible.
      def read_partial(length = nil)
        if @buffer
          buffer = @buffer
          @buffer = nil
        else
          buffer = read_next
        end

        if buffer and length
          if buffer.bytesize > length
            # This ensures the subsequent `slice!` works correctly.
            buffer.force_encoding(Encoding::BINARY)

            @buffer = buffer.byteslice(length, buffer.bytesize)
            buffer.slice!(length, buffer.bytesize)
          end
        end

        return buffer
      end

      def gets
        read_partial
      end

      def each
        while chunk = read_partial
          yield chunk
        end
      end

      def read_nonblock(length, buffer = nil)
        @buffer ||= read_next
        chunk = nil

        unless @buffer
          buffer&.clear
          return
        end

        if @buffer.bytesize > length
          chunk = @buffer.byteslice(0, length)
          @buffer = @buffer.byteslice(length, @buffer.bytesize)
        else
          chunk = @buffer
          @buffer = nil
        end

        if buffer
          buffer.replace(chunk)
        else
          buffer = chunk
        end

        return buffer
      end
    end

    include Reader

    def write(buffer)
      if @output
        @output.write(buffer)
        return buffer.bytesize
      else
        raise IOError, "Stream is not writable, output has been closed!"
      end
    end

    def write_nonblock(buffer)
      write(buffer)
    end

    def <<(buffer)
      write(buffer)
    end

    def flush
    end

    def close_read
      @input&.close
      @input = nil
    end

    # close must never be called on the input stream. huh?
    def close_write
      if @output.respond_to?(:close)
        @output&.close
      end

      @output = nil
    end

    # Close the input and output bodies.
    def close(error = nil)
      self.close_read
      self.close_write

      return nil
    ensure
      @closed = true
    end

    # Whether the stream has been closed.
    def closed?
      @closed
    end

    # Whether there are any output chunks remaining?
    def empty?
      @output.empty?
    end

    private

    def read_next
      if @input
        return @input.read
      else
        @input = nil
        raise IOError, "Stream is not readable, input has been closed!"
      end
    end
  end
end
gems/gems/rackup-2.1.0/lib/rackup/handler.rb000064400000005473150403134050014354 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2023, by Samuel Williams.

module Rackup
  # *Handlers* connect web servers with Rack.
  #
  # Rackup includes Handlers for WEBrick and CGI.
  #
  # Handlers usually are activated by calling <tt>MyHandler.run(myapp)</tt>.
  # A second optional hash can be passed to include server-specific
  # configuration.
  module Handler
    @handlers = {}

    # Register a named handler class.
    def self.register(name, klass)
      if klass.is_a?(String)
        warn "Calling Rackup::Handler.register with a string is deprecated, use the class/module itself.", uplevel: 1

        klass = self.const_get(klass, false)
      end

      name = name.to_sym

      @handlers[name] = klass
    end

    def self.[](name)
      name = name.to_sym

      begin
        @handlers[name] || self.const_get(name, false)
      rescue NameError
        # Ignore.
      end
    end

    def self.get(name)
      return nil unless name

      name = name.to_sym

      if server = self[name]
        return server
      end

      begin
        require_handler("rackup/handler", name)
      rescue LoadError
        require_handler("rack/handler", name)
      end

      return self[name]
    end

    RACK_HANDLER = 'RACK_HANDLER'
    RACKUP_HANDLER = 'RACKUP_HANDLER'

    SERVER_NAMES = %i(puma falcon webrick).freeze
    private_constant :SERVER_NAMES

    # Select first available Rack handler given an `Array` of server names.
    # Raises `LoadError` if no handler was found.
    #
    #   > pick ['puma', 'webrick']
    #   => Rackup::Handler::WEBrick
    def self.pick(server_names)
      server_names = Array(server_names)

      server_names.each do |server_name|
        begin
          server = self.get(server_name)
         return server if server
        rescue LoadError
          # Ignore.
        end
      end

      raise LoadError, "Couldn't find handler for: #{server_names.join(', ')}."
    end

    def self.default
      if rack_handler = ENV[RACKUP_HANDLER]
        self.get(rack_handler)
      elsif rack_handler = ENV[RACK_HANDLER]
        warn "RACK_HANDLER is deprecated, use RACKUP_HANDLER."
        self.get(rack_handler)
      else
        pick SERVER_NAMES
      end
    end

    # Transforms server-name constants to their canonical form as filenames,
    # then tries to require them but silences the LoadError if not found
    #
    # Naming convention:
    #
    #   Foo # => 'foo'
    #   FooBar # => 'foo_bar.rb'
    #   FooBAR # => 'foobar.rb'
    #   FOObar # => 'foobar.rb'
    #   FOOBAR # => 'foobar.rb'
    #   FooBarBaz # => 'foo_bar_baz.rb'
    def self.require_handler(prefix, const_name)
      file = const_name.to_s.gsub(/^[A-Z]+/) { |pre| pre.downcase }.
        gsub(/[A-Z]+[^A-Z]/, '_\&').downcase

      require(::File.join(prefix, file))
    end
  end
end
gems/gems/rackup-2.1.0/lib/rackup/server.rb000064400000032327150403134050014243 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2023, by Samuel Williams.

require 'optparse'
require 'fileutils'

require 'rack/builder'
require 'rack/common_logger'
require 'rack/content_length'
require 'rack/show_exceptions'
require 'rack/lint'
require 'rack/tempfile_reaper'

require 'rack/version'

require_relative 'version'
require_relative 'handler'

module Rackup
  class Server
    class Options
      def parse!(args)
        options = {}
        opt_parser = OptionParser.new("", 24, '  ') do |opts|
          opts.banner = "Usage: rackup [ruby options] [rack options] [rackup config]"

          opts.separator ""
          opts.separator "Ruby options:"

          lineno = 1
          opts.on("-e", "--eval LINE", "evaluate a LINE of code") { |line|
            eval line, TOPLEVEL_BINDING, "-e", lineno
            lineno += 1
          }

          opts.on("-d", "--debug", "set debugging flags (set $DEBUG to true)") {
            options[:debug] = true
          }
          opts.on("-w", "--warn", "turn warnings on for your script") {
            options[:warn] = true
          }
          opts.on("-q", "--quiet", "turn off logging") {
            options[:quiet] = true
          }

          opts.on("-I", "--include PATH",
                  "specify $LOAD_PATH (may be used more than once)") { |path|
            (options[:include] ||= []).concat(path.split(":"))
          }

          opts.on("-r", "--require LIBRARY",
                  "require the library, before executing your script") { |library|
            (options[:require] ||= []) << library
          }

          opts.separator ""
          opts.separator "Rack options:"
          opts.on("-b", "--builder BUILDER_LINE", "evaluate a BUILDER_LINE of code as a builder script") { |line|
            options[:builder] = line
          }

          opts.on("-s", "--server SERVER", "serve using SERVER (thin/puma/webrick)") { |s|
            options[:server] = s
          }

          opts.on("-o", "--host HOST", "listen on HOST (default: localhost)") { |host|
            options[:Host] = host
          }

          opts.on("-p", "--port PORT", "use PORT (default: 9292)") { |port|
            options[:Port] = port
          }

          opts.on("-O", "--option NAME[=VALUE]", "pass VALUE to the server as option NAME. If no VALUE, sets it to true. Run '#{$0} -s SERVER -h' to get a list of options for SERVER") { |name|
            name, value = name.split('=', 2)
            value = true if value.nil?
            options[name.to_sym] = value
          }

          opts.on("-E", "--env ENVIRONMENT", "use ENVIRONMENT for defaults (default: development)") { |e|
            options[:environment] = e
          }

          opts.on("-D", "--daemonize", "run daemonized in the background") { |d|
            options[:daemonize] ||= true
          }

          opts.on("--daemonize-noclose", "run daemonized in the background without closing stdout/stderr") {
            options[:daemonize] = :noclose
          }

          opts.on("-P", "--pid FILE", "file to store PID") { |f|
            options[:pid] = ::File.expand_path(f)
          }

          opts.separator ""
          opts.separator "Profiling options:"

          opts.on("--heap HEAPFILE", "Build the application, then dump the heap to HEAPFILE") do |e|
            options[:heapfile] = e
          end

          opts.on("--profile PROFILE", "Dump CPU or Memory profile to PROFILE (defaults to a tempfile)") do |e|
            options[:profile_file] = e
          end

          opts.on("--profile-mode MODE", "Profile mode (cpu|wall|object)") do |e|
            unless %w[cpu wall object].include?(e)
              raise OptionParser::InvalidOption, "unknown profile mode: #{e}"
            end
        gems/gems/rackup-2.1.0/lib/rackup/lobster.rb000064400000004305150403134050014402 0ustar00ndler.default
        if server && server.respond_to?(:valid_options)
          info << ""
          info << "Server-specific options for #{server.name}:"

          has_options = false
          server.valid_options.each do |name, description|
            next if /^(Host|Port)[^a-zA-Z]/.match?(name.to_s) # ignore handler's host and port options, we do our own.
            info << sprintf("  -O %-21s %s", name, description)
            has_options = true
          end
          return "" if !has_options
        end
        info.join("\n")
      rescue NameError, LoadError
        return "Warning: Could not find handler specified (#{options[:server] || 'default'}) to determine handler-specific options"
      end
    end

    # Start a new rack server (like running rackup). This will parse ARGV and
    # provide standard ARGV rackup options, defaulting to load 'config.ru'.
    #
    # Providing an options hash will prevent ARGV parsing and will not include
    # any default options.
    #
    # This method can be used to very easily launch a CGI application, for
    # example:
    #
    #  Rack::Server.start(
    #    :app => lambda do |e|
    #      [200, {'content-type' => 'text/html'}, ['hello world']]
    #    end,
    #    :server => 'cgi'
    #  )
    #
    # Further options available here are documented on Rack::Server#initialize
    def self.start(options = nil)
      new(options).start
    end

    attr_writer :options

    # Options may include:
    # * :app
    #     a rack application to run (overrides :config and :builder)
    # * :builder
    #     a string to evaluate a Rack::Builder from
    # * :config
    #     a rackup configuration file path to load (.ru)
    # * :environment
    #     this selects the middleware that will be wrapped around
    #     your application. Default options available are:
    #       - development: CommonLogger, ShowExceptions, and Lint
    #       - deployment: CommonLogger
    #       - none: no extra middleware
    #     note: when the server is a cgi server, CommonLogger is not included.
    # * :server
    #     choose a specific Rackup::Handler, e.g. cgi, fcgi, webrick
    # * :daemonize
    #     if truthy, the server will daemonize itself (fork, detach, gems/gems/rackup-2.1.0/lib/rackup.rb000064400000000444150403134050012730 0ustar00mory (StackProf) profile output (defaults to a tempfile)
    # * :profile_mode
    #     StackProf profile mode (cpu|wall|object)
    def initialize(options = nil)
      @ignore_options = []

      if options
        @use_default_options = false
        @options = options
        @app = optigems/gems/rackup-2.1.0/security.md000064400000000145150403134050012537 0ustar00ions_from_config
    end

    class << self
      def logging_middleware
        lambda { |server|
  gems/gems/rack-3.0.8/CHANGELOG.md000064400000143361150403134050011632 0ustar00e library
      end

      if options[:debug]
        $DEBUG = true
        require 'pp'
        p options[:server]
        pp wrapped_app
        pp app
      end

      check_pid! if options[:pid]

      # Touch the wrapped app, so that the config.ru is loaded before
      # daemonization (i.e. before chdir, etc).
      handle_profiling(options[:heapfile], options[:profile_mode], options[:profile_file]) do
        wrapped_app
      end

      daemonize_app if options[:daemonize]

      write_pid if options[:pid]

      trap(:INT) do
        if server.respond_to?(:shutdown)
          server.shutdown
        else
          exit
        end
      end

      server.run(wrapped_app, **options, &block)
    end

    def server
      @_server ||= Handler.get(options[:server]) || Handler.default
    end

    private
      def build_app_and_options_from_config
        if !::File.exist? options[:config]
          abort "configuration #{options[:config]} not found"
        end

        return Rack::Builder.parse_file(self.options[:config])
      end

      def handle_profiling(heapfile, profile_mode, filename)
        if heapfile
          require "objspace"
          ObjectSpace.trace_object_allocations_start
          yield
          GC.start
          ::File.open(heapfile, "w") { |f| ObjectSpace.dump_all(output: f) }
          exit
        end

        if profile_mode
          require "stackprof"
          require "tempfile"

          make_profile_name(filename) do |filename|
            ::File.open(filename, "w") do |f|
              StackProf.run(mode: profile_mode, out: f) do
                yield
              end
              puts "Profile written to: #{filename}"
            end
          end
          exit
        end

        yield
      end

      def make_profile_name(filename)
        if filename
          yield filename
        else
          ::Dir::Tmpname.create("profile.dump") do |tmpname, _, _|
            yield tmpname
          end
        end
      end

      def build_app_from_string
        Rack::Builder.new_from_string(self.options[:builder])
      end

      def parse_options(args)
        # Don't evaluate CGI ISINDEX parameters.
        args.clear if ENV.include?(Rack::REQUEST_METHOD)

        @options = opt_parser.parse!(args)
        @options[:config] = ::File.expand_path(options[:config])
        ENV["RACK_ENV"] = options[:environment]
        @options
      end

      def opt_parser
        Options.new
      end

      def build_app(app)
        middleware[options[:environment]].reverse_each do |middleware|
          middleware = middleware.call(self) if middleware.respond_to?(:call)
          next unless middleware
          klass, *args = middleware
          app = klass.new(app, *args)
        end
        app
      end

      def wrapped_app
        @wrapped_app ||= build_app app
      end

      def daemonize_app
        # Cannot be covered as it forks
        # :nocov:
        Process.daemon(true, options[:daemonize] == :noclose)
        # :nocov:
      end

      def write_pid
        ::File.open(options[:pid], ::File::CREAT | ::File::EXCL | ::File::WRONLY ){ |f| f.write("#{Process.pid}") }
        at_exit { ::FileUtils.rm_f(options[:pid]) }
      rescue Errno::EEXIST
        check_pid!
        retry
      end

      def check_pid!
        return unless ::File.exist?(options[:pid])

        pid = ::File.read(options[:pid]).to_i
        raise Errno::ESRCH if pid == 0

        Process.kill(0, pid)
        exit_with_pid(pid)
      rescue Errno::ESRCH
        ::File.delete(options[:pid])
      rescue Errno::EPERM
        exit_with_pid(pid)
      end

      def exit_with_pid(pid)
        $stderr.puts "A server is already running (pid: #{pid}, file: #{options[:pid]})."
        exit(1)
      end
  end

end
gems/gems/rackup-2.1.0/lib/rackup/lobster.rb000064400000004305150403134050014402 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2023, by Samuel Williams.

require 'zlib'

require 'rack/constants'
require 'rack/request'
require 'rack/response'

module Rackup
  # Paste has a Pony, Rack has a Lobster!
  class Lobster
    include Rack

    LobsterString = Zlib::Inflate.inflate("eJx9kEEOwyAMBO99xd7MAcytUhPlJyj2
    P6jy9i4k9EQyGAnBarEXeCBqSkntNXsi/ZCvC48zGQoZKikGrFMZvgS5ZHd+aGWVuWwhVF0
    t1drVmiR42HcWNz5w3QanT+2gIvTVCiE1lm1Y0eU4JGmIIbaKwextKn8rvW+p5PIwFl8ZWJ
    I8jyiTlhTcYXkekJAzTyYN6E08A+dk8voBkAVTJQ==".delete("\n ").unpack("m*")[0])

    LambdaLobster = lambda { |env|
      if env[QUERY_STRING].include?("flip")
        lobster = LobsterString.split("\n").
          map { |line| line.ljust(42).reverse }.
          join("\n")
        href = "?"
      else
        lobster = LobsterString
        href = "?flip"
      end

      content = ["<title>Lobstericious!</title>",
                 "<pre>", lobster, "</pre>",
                 "<a href='#{href}'>flip!</a>"]
      length = content.inject(0) { |a, e| a + e.size }.to_s
      [200, { CONTENT_TYPE => "text/html", CONTENT_LENGTH => length }, content]
    }

    def call(env)
      req = Request.new(env)
      if req.GET["flip"] == "left"
        lobster = LobsterString.split("\n").map do |line|
          line.ljust(42).reverse.
            gsub('\\', 'TEMP').
            gsub('/', '\\').
            gsub('TEMP', '/').
            gsub('{', '}').
            gsub('(', ')')
        end.join("\n")
        href = "?flip=right"
      elsif req.GET["flip"] == "crash"
        raise "Lobster crashed"
      else
        lobster = LobsterString
        href = "?flip=left"
      end

      res = Response.new
      res.write "<title>Lobstericious!</title>"
      res.write "<pre>"
      res.write lobster
      res.write "</pre>"
      res.write "<p><a href='#{href}'>flip!</a></p>"
      res.write "<p><a href='?flip=crash'>crash!</a></p>"
      res.finish
    end

  end
end

if $0 == __FILE__
  # :nocov:
  require_relative 'server'
  require_relative 'show_exceptions'
  require_relative 'lint'
  Rackup::Server.start(
    app: Rack::ShowExceptions.new(Rack::Lint.new(Rackup::Lobster.new)), Port: 9292
  )
  # :nocov:
end
gems/gems/rackup-2.1.0/lib/rackup.rb000064400000000444150403134050012730 0ustar00# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2023, by Samuel Williams.

require_relative 'rackup/handler'
require_relative 'rackup/server'
require_relative 'rackup/version'

require_relative 'rackup/handler/webrick'
require_relative 'rackup/handler/cgi'
gems/gems/rackup-2.1.0/security.md000064400000000145150403134050012537 0ustar00# Security Policy

Please see our main security policy: https://github.com/rack/rack/security/policy
gems/gems/rack-3.0.8/CHANGELOG.md000064400000143361150403134050011632 0ustar00# Changelog

All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).

## [3.0.7] - 2023-03-16

- Make query parameters without `=` have `nil` values. ([#2059](https://github.com/rack/rack/pull/2059), [@jeremyevans])

## [3.0.6.1] - 2023-03-13

- [CVE-2023-27539] Avoid ReDoS in header parsing

## [3.0.6] - 2023-03-13

- Add `QueryParser#missing_value` for handling missing values + tests. ([#2052](https://github.com/rack/rack/pull/2052), [@ioquatix])

## [3.0.5] - 2023-03-13

- Split form/query parsing into two steps. ([#2038](https://github.com/rack/rack/pull/2038), [@matthewd](https://github.com/matthewd))

## [3.0.4.1] - 2023-03-02

- [CVE-2023-27530] Introduce multipart_total_part_limit to limit total parts

## [3.0.4.1] - 2023-01-17

- [CVE-2022-44571] Fix ReDoS vulnerability in multipart parser
- [CVE-2022-44570] Fix ReDoS in Rack::Utils.get_byte_ranges
- [CVE-2022-44572] Forbid control characters in attributes (also ReDoS)

## [3.0.4] - 2023-01-17

- `Rack::Request#POST` should consistently raise errors. Cache errors that occur when invoking `Rack::Request#POST` so they can be raised again later. ([#2010](https://github.com/rack/rack/pull/2010), [@ioquatix])
- Fix `Rack::Lint` error message for `HTTP_CONTENT_TYPE` and `HTTP_CONTENT_LENGTH`. ([#2007](https://github.com/rack/rack/pull/2007), [@byroot](https://github.com/byroot))
- Extend `Rack::MethodOverride` to handle `QueryParser::ParamsTooDeepError` error. ([#2006](https://github.com/rack/rack/pull/2006), [@byroot](https://github.com/byroot))

## [3.0.3] - 2022-12-27

### Fixed

- `Rack::URLMap` uses non-deprecated form of `Regexp.new`. ([#1998](https://github.com/rack/rack/pull/1998), [@weizheheng](https://github.com/weizheheng))

## [3.0.2] - 2022-12-05

### Fixed

- `Utils.build_nested_query` URL-encodes nested field names including the square brackets.
- Allow `Rack::Response` to pass through streaming bodies. ([#1993](https://github.com/rack/rack/pull/1993), [@ioquatix])

## [3.0.1] - 2022-11-18

### Fixed

- `MethodOverride` does not look for an override if a request does not include form/parseable data.
- `Rack::Lint::Wrapper` correctly handles `respond_to?` with `to_ary`, `each`, `call` and `to_path`, forwarding to the body. ([#1981](https://github.com/rack/rack/pull/1981), [@ioquatix])

## [3.0.0] - 2022-09-06

- No changes

## [3.0.0.rc1] - 2022-09-04

### SPEC Changes

- Stream argument must implement `<<` https://github.com/rack/rack/pull/1959
- `close` may be called on `rack.input` https://github.com/rack/rack/pull/1956
- `rack.response_finished` may be used for executing code after the response has been finished https://github.com/rack/rack/pull/1952

## [3.0.0.beta1] - 2022-08-08

### Security

- Do not use semicolon as GET parameter separator. ([#1733](https://github.com/rack/rack/pull/1733), [@jeremyevans])

### SPEC Changes

- Response array must now be non-frozen.
- Response `status` must now be an integer greater than or equal to 100.
- Response `headers` must now be an unfrozen hash.
- Response header keys can no longer include uppercase characters.
- Response header values can be an `Array` to handle multiple values (and no longer supports `\n` encoded headers).
- Response body can now respond to `#call` (streaming body) instead of `#each` (enumerable body), for the equivalent of response hijacking in previous versions.
- Middleware must no longer call `#each` on the body, but they can call `#to_ary` on the body if it responds to `#to_ary`.
- `rack.input` is no longer required to be rewindable.
- `rack.multithread`/`rack.multiprocess`/`rack.run_once`/`rack.version` are no longer required environment keys.
- `SERVER_PROTOCOL` is now a required environment key, matching the HTTP protocol used in the request.
- `rack.hijack?` (partial hijack) and `rack.hijack` (full hijack) are now independently optional.
- `rack.hijack_io` has been removed completely.
- `rack.response_finished` is an optional environment key which contains an array of callable objects that must accept `#call(env, status, headers, error)` and are invoked after the response is finished (either successfully or unsuccessfully).
- It is okay to call `#close` on `rack.input` to indicate that you no longer need or care about the input.
- The stream argument supplied to the streaming body and hijack must support `#<<` for writing output.

### Removed

- Remove `rack.multithread`/`rack.multiprocess`/`rack.run_once`. These variables generally come too late to be useful. ([#1720](https://github.com/rack/rack/pull/1720), [@ioquatix], [@jeremyevans]))
- Remove deprecated Rack::Request::SCHEME_WHITELIST. ([@jeremyevans])
- Remove internal cookie deletion using pattern matching, there are very few practical cases where it would be useful and browsers handle it correctly without us doing anything special. ([#1844](https://github.com/rack/rack/pull/1844), [@ioquatix])
- Remove `rack.version` as it comes too late to be useful. ([#1938](https://github.com/rack/rack/pull/1938), [@ioquatix])
- Extract `rackup` command, `Rack::Server`, `Rack::Handler` and related code into a separate gem. ([#1937](https://github.com/rack/rack/pull/1937), [@ioquatix])

### Added

- `Rack::Headers` added to support lower-case header keys. ([@jeremyevans])
- `Rack::Utils#set_cookie_header` now supports `escape_key: false` to avoid key escaping.  ([@jeremyevans])
- `Rack::RewindableInput` supports size. ([@ahorek](https://github.com/ahorek))
- `Rack::RewindableInput::Middleware` added for making `rack.input` rewindable. ([@jeremyevans])
- The RFC 7239 Forwarded header is now supported and considered by default when looking for information on forwarding, falling back to the X-Forwarded-* headers. `Rack::Request.forwarded_priority` accessor has been added for configuring the priority of which header to check.  ([#1423](https://github.com/rack/rack/issues/1423), [@jeremyevans])
- Allow response headers to contain array of values. ([#1598](https://github.com/rack/rack/issues/1598), [@ioquatix])
- Support callable body for explicit streaming support and clarify streaming response body behaviour. ([#1745](https://github.com/rack/rack/pull/1745), [@ioquatix], [#1748](https://github.com/rack/rack/pull/1748), [@wjordan])
- Allow `Rack::Builder#run` to take a block instead of an argument. ([#1942](https://github.com/rack/rack/pull/1942), [@ioquatix])
- Add `rack.response_finished` to `Rack::Lint`. ([#1802](https://github.com/rack/rack/pull/1802), [@BlakeWilliams], [#1952](https://github.com/rack/rack/pull/1952), [@ioquatix])
- The stream argument must implement `#<<`. ([#1959](https://github.com/rack/rack/pull/1959), [@ioquatix])

### Changed

- BREAKING CHANGE: Require `status` to be an Integer. ([#1662](https://github.com/rack/rack/pull/1662), [@olleolleolle](https://github.com/olleolleolle))
- BREAKING CHANGE: Query parsing now treats parameters without `=` as having the empty string value instead of nil value, to conform to the URL spec. ([#1696](https://github.com/rack/rack/issues/1696), [@jeremyevans])
- Relax validations around `Rack::Request#host` and `Rack::Request#hostname`. ([#1606](https://github.com/rack/rack/issues/1606), [@pvande](https://github.com/pvande))
- Removed antiquated handlers: FCGI, LSWS, SCGI, Thin. ([#1658](https://github.com/rack/rack/pull/1658), [@ioquatix])
- Removed options from `Rack::Builder.parse_file` and `Rack::Builder.load_file`. ([#1663](https://github.com/rack/rack/pull/1663), [@ioquatix])
- `Rack::HTTP_VERSION` has been removed and the `HTTP_VERSION` env setting is no longer set in the CGI and Webrick handlers. ([#970](https://github.com/rack/rack/issues/970), [@jeremyevans])
- `Rack::Request#[]` and `#[]=` now warn even in non-verbose mode. ([#1277](https://github.com/rack/rack/issues/1277), [@jeremyevans])
- Decrease default allowed parameter recursion level from 100 to 32. ([#1640](https://github.com/rack/rack/issues/1640), [@jeremyevans])
- Attempting to parse a multipart response with an empty body now raises Rack::Multipart::EmptyContentError. ([#1603](https://github.com/rack/rack/issues/1603), [@jeremyevans])
- `Rack::Utils.secure_compare` uses OpenSSL's faster implementation if available. ([#1711](https://github.com/rack/rack/pull/1711), [@bdewater](https://github.com/bdewater))
- `Rack::Request#POST` now caches an empty hash if input content type is not parseable. ([#749](https://github.com/rack/rack/pull/749), [@jeremyevans])
- BREAKING CHANGE: Updated `trusted_proxy?` to match full 127.0.0.0/8 network. ([#1781](https://github.com/rack/rack/pull/1781), [@snbloch](https://github.com/snbloch))
- Explicitly deprecate `Rack::File` which was an alias for `Rack::Files`. ([#1811](https://github.com/rack/rack/pull/1720), [@ioquatix]).
- Moved `Rack::Session` into [separate gem](https://github.com/rack/rack-session). ([#1805](https://github.com/rack/rack/pull/1805), [@ioquatix])
- `rackup -D` option to daemonizes no longer changes the working directory to the root. ([#1813](https://github.com/rack/rack/pull/1813), [@jeremyevans])
- The `x-forwarded-proto` header is now considered before the `x-forwarded-scheme` header for determining the forwarded protocol. `Rack::Request.x_forwarded_proto_priority` accessor has been added for configuring the priority of which header to check.  ([#1809](https://github.com/rack/rack/issues/1809), [@jeremyevans])
- `Rack::Request.forwarded_authority` (and methods that call it, such as `host`) now returns the last authority in the forwarded header, instead of the first, as earlier forwarded authorities can be forged by clients. This restores the Rack 2.1 behavior. ([#1829](https://github.com/rack/rack/issues/1809), [@jeremyevans])
- Use lower case cookie attributes when creating cookies, and fold cookie attributes to lower case when reading cookies (specifically impacting `secure` and `httponly` attributes). ([#1849](https://github.com/rack/rack/pull/1849), [@ioquatix])
- The response array must now be mutable (non-frozen) so middleware can modify it without allocating a new Array,therefore reducing object allocations. ([#1887](https://github.com/rack/rack/pull/1887), [#1927](https://github.com/rack/rack/pull/1927), [@amatsuda], [@ioquatix])
- `rack.hijack?` (partial hijack) and `rack.hijack` (full hijack) are now independently optional. `rack.hijack_io` is no longer required/specified. ([#1939](https://github.com/rack/rack/pull/1939), [@ioquatix])
- Allow calling close on `rack.input`. ([#1956](https://github.com/rack/rack/pull/1956), [@ioquatix])

### Fixed

- Make Rack::MockResponse handle non-hash headers. ([#1629](https://github.com/rack/rack/issues/1629), [@jeremyevans])
- TempfileReaper now deletes temp files if application raises an exception. ([#1679](https://github.com/rack/rack/issues/1679), [@jeremyevans])
- Handle cookies with values that end in '=' ([#1645](https://github.com/rack/rack/pull/1645), [@lukaso](https://github.com/lukaso))
- Make `Rack::NullLogger` respond to `#fatal!` [@jeremyevans])
- Fix multipart filename generation for filenames that contain spaces. Encode spaces as "%20" instead of "+" which will be decoded properly by the multipart parser. ([#1736](https://github.com/rack/rack/pull/1645), [@muirdm](https://github.com/muirdm))
- `Rack::Request#scheme` returns `ws` or `wss` when one of the `X-Forwarded-Scheme` / `X-Forwarded-Proto` headers is set to `ws` or `wss`, respectively. ([#1730](https://github.com/rack/rack/issues/1730), [@erwanst](https://github.com/erwanst))

## [2.2.4] - 2022-06-30

- Better support for lower case headers in `Rack::ETag` middleware. ([#1919](https://github.com/rack/rack/pull/1919), [@ioquatix](https://github.com/ioquatix))
- Use custom exception on params too deep error. ([#1838](https://github.com/rack/rack/pull/1838), [@simi](https://github.com/simi))

## [2.2.3.1] - 2022-05-27

- [CVE-2022-30123] Fix shell escaping issue in Common Logger
- [CVE-2022-30122] Restrict parsing of broken MIME attachments

## [2.2.3] - 2020-06-15

### Security

- [[CVE-2020-8184](https://nvd.nist.gov/vuln/detail/CVE-2020-8184)] Do not allow percent-encoded cookie name to override existing cookie names. BREAKING CHANGE: Accessing cookie names that require URL encoding with decoded name no longer works. ([@fletchto99](https://github.com/fletchto99))

## [2.2.2] - 2020-02-11

### Fixed

- Fix incorrect `Rack::Request#host` value. ([#1591](https://github.com/rack/rack/pull/1591), [@ioquatix])
- Revert `Rack::Handler::Thin` implementation. ([#1583](https://github.com/rack/rack/pull/1583), [@jeremyevans])
- Double assignment is still needed to prevent an "unused variable" warning. ([#1589](https://github.com/rack/rack/pull/1589), [@kamipo](https://github.com/kamipo))
- Fix to handle same_site option for session pool. ([#1587](https://github.com/rack/rack/pull/1587), [@kamipo](https://github.com/kamipo))

## [2.2.1] - 2020-02-09

### Fixed

- Rework `Rack::Request#ip` to handle empty `forwarded_for`. ([#1577](https://github.com/rack/rack/pull/1577), [@ioquatix])

## [2.2.0] - 2020-02-08

### SPEC Changes

- `rack.session` request environment entry must respond to `to_hash` and return unfrozen Hash. ([@jeremyevans])
- Request environment cannot be frozen. ([@jeremyevans])
- CGI values in the request environment with non-ASCII characters must use ASCII-8BIT encoding. ([@jeremyevans])
- Improve SPEC/lint relating to SERVER_NAME, SERVER_PORT and HTTP_HOST. ([#1561](https://github.com/rack/rack/pull/1561), [@ioquatix])

### Added

- `rackup` supports multiple `-r` options and will require all arguments. ([@jeremyevans])
- `Server` supports an array of paths to require for the `:require` option. ([@khotta](https://github.com/khotta))
- `Files` supports multipart range requests. ([@fatkodima](https://github.com/fatkodima))
- `Multipart::UploadedFile` supports an IO-like object instead of using the filesystem, using `:filename` and `:io` options. ([@jeremyevans])
- `Multipart::UploadedFile` supports keyword arguments `:path`, `:content_type`, and `:binary` in addition to positional arguments. ([@jeremyevans])
- `Static` supports a `:cascade` option for calling the app if there is no matching file. ([@jeremyevans])
- `Session::Abstract::SessionHash#dig`. ([@jeremyevans])
- `Response.[]` and `MockResponse.[]` for creating instances using status, headers, and body. ([@ioquatix])
- Convenient cache and content type methods for `Rack::Response`. ([#1555](https://github.com/rack/rack/pull/1555), [@ioquatix])

### Changed

- `Request#params` no longer rescues EOFError. ([@jeremyevans])
- `Directory` uses a streaming approach, significantly improving time to first byte for large directories. ([@jeremyevans])
- `Directory` no longer includes a Parent directory link in the root directory index. ([@jeremyevans])
- `QueryParser#parse_nested_query` uses original backtrace when reraising exception with new class. ([@jeremyevans])
- `ConditionalGet` follows RFC 7232 precedence if both If-None-Match and If-Modified-Since headers are provided. ([@jeremyevans])
- `.ru` files supports the `frozen-string-literal` magic comment. ([@eregon](https://github.com/eregon))
- Rely on autoload to load constants instead of requiring internal files, make sure to require 'rack' and not just 'rack/...'. ([@jeremyevans])
- BREAKING CHANGE: `Etag` will continue sending ETag even if the response should not be cached. Streaming no longer works without a workaround, see [#1619](https://github.com/rack/rack/issues/1619#issuecomment-848460528). ([@henm](https://github.com/henm))
- `Request#host_with_port` no longer includes a colon for a missing or empty port. ([@AlexWayfer](https://github.com/AlexWayfer))
- All handlers uses keywords arguments instead of an options hash argument. ([@ioquatix])
- `Files` handling of range requests no longer return a body that supports `to_path`, to ensure range requests are handled correctly. ([@jeremyevans])
- `Multipart::Generator` only includes `Content-Length` for files with paths, and `Content-Disposition` `filename` if the `UploadedFile` instance has one. ([@jeremyevans])
- `Request#ssl?` is true for the `wss` scheme (secure websockets). ([@jeremyevans])
- `Rack::HeaderHash` is memoized by default. ([#1549](https://github.com/rack/rack/pull/1549), [@ioquatix])
- `Rack::Directory` allow directory traversal inside root directory. ([#1417](https://github.com/rack/rack/pull/1417), [@ThomasSevestre](https://github.com/ThomasSevestre))
- Sort encodings by server preference. ([#1184](https://github.com/rack/rack/pull/1184), [@ioquatix], [@wjordan](https://github.com/wjordan))
- Rework host/hostname/authority implementation in `Rack::Request`. `#host` and `#host_with_port` have been changed to correctly return IPv6 addresses formatted with square brackets, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-3.2.2). ([#1561](https://github.com/rack/rack/pull/1561), [@ioquatix])
- `Rack::Builder` parsing options on first `#\` line is deprecated. ([#1574](https://github.com/rack/rack/pull/1574), [@ioquatix])

### Removed

- `Directory#path` as it was not used and always returned nil. ([@jeremyevans])
- `BodyProxy#each` as it was only needed to work around a bug in Ruby <1.9.3. ([@jeremyevans])
- `URLMap::INFINITY` and `URLMap::NEGATIVE_INFINITY`, in favor of `Float::INFINITY`. ([@ch1c0t](https://github.com/ch1c0t))
- Deprecation of `Rack::File`. It will be deprecated again in rack 2.2 or 3.0. ([@rafaelfranca](https://github.com/rafaelfranca))
- Support for Ruby 2.2 as it is well past EOL. ([@ioquatix])
- Remove `Rack::Files#response_body` as the implementation was broken. ([#1153](https://github.com/rack/rack/pull/1153), [@ioquatix])
- Remove `SERVER_ADDR` which was never part of the original SPEC. ([#1573](https://github.com/rack/rack/pull/1573), [@ioquatix])

### Fixed

- `Directory` correctly handles root paths containing glob metacharacters. ([@jeremyevans])
- `Cascade` uses a new response object for each call if initialized with no apps. ([@jeremyevans])
- `BodyProxy` correctly delegates keyword arguments to the body object on Ruby 2.7+. ([@jeremyevans])
- `BodyProxy#method` correctly handles methods delegated to the body object. ([@jeremyevans])
- `Request#host` and `Request#host_with_port` handle IPv6 addresses correctly. ([@AlexWayfer](https://github.com/AlexWayfer))
- `Lint` checks when response hijacking that `rack.hijack` is called with a valid object. ([@jeremyevans])
- `Response#write` correctly updates `Content-Length` if initialized with a body. ([@jeremyevans])
- `CommonLogger` includes `SCRIPT_NAME` when logging. ([@Erol](https://github.com/Erol))
- `Utils.parse_nested_query` correctly handles empty queries, using an empty instance of the params class instead of a hash. ([@jeremyevans])
- `Directory` correctly escapes paths in links. ([@yous](https://github.com/yous))
- `Request#delete_cookie` and related `Utils` methods handle `:domain` and `:path` options in same call. ([@jeremyevans])
- `Request#delete_cookie` and related `Utils` methods do an exact match on `:domain` and `:path` options. ([@jeremyevans])
- `Static` no longer adds headers when a gzipped file request has a 304 response. ([@chooh](https://github.com/chooh))
- `ContentLength` sets `Content-Length` response header even for bodies not responding to `to_ary`. ([@jeremyevans])
- Thin handler supports options passed directly to `Thin::Controllers::Controller`. ([@jeremyevans])
- WEBrick handler no longer ignores `:BindAddress` option. ([@jeremyevans])
- `ShowExceptions` handles invalid POST data. ([@jeremyevans])
- Basic authentication requires a password, even if the password is empty. ([@jeremyevans])
- `Lint` checks response is array with 3 elements, per SPEC. ([@jeremyevans])
- Support for using `:SSLEnable` option when using WEBrick handler. (Gregor Melhorn)
- Close response body after buffering it when buffering. ([@ioquatix])
- Only accept `;` as delimiter when parsing cookies. ([@mrageh](https://github.com/mrageh))
- `Utils::HeaderHash#clear` clears the name mapping as well. ([@raxoft](https://github.com/raxoft))
- Support for passing `nil` `Rack::Files.new`, which notably fixes Rails' current `ActiveStorage::FileServer` implementation. ([@ioquatix])

### Documentation

- CHANGELOG updates. ([@aupajo](https://github.com/aupajo))
- Added [CONTRIBUTING](CONTRIBUTING.md). ([@dblock](https://github.com/dblock))

## [2.0.9] - 2020-02-08

- Handle case where session id key is requested but missing ([@jeremyevans])
- Restore support for code relying on `SessionId#to_s`. ([@jeremyevans])
- Add support for `SameSite=None` cookie value. ([@hennikul](https://github.com/hennikul))

## [2.1.2] - 2020-01-27

- Fix multipart parser for some files to prevent denial of service ([@aiomaster](https://github.com/aiomaster))
- Fix `Rack::Builder#use` with keyword arguments ([@kamipo](https://github.com/kamipo))
- Skip deflating in Rack::Deflater if Content-Length is 0 ([@jeremyevans])
- Remove `SessionHash#transform_keys`, no longer needed ([@pavel](https://github.com/pavel))
- Add to_hash to wrap Hash and Session classes ([@oleh-demyanyuk](https://github.com/oleh-demyanyuk))
- Handle case where session id key is requested but missing ([@jeremyevans])

## [2.1.1] - 2020-01-12

- Remove `Rack::Chunked` from `Rack::Server` default middleware. ([#1475](https://github.com/rack/rack/pull/1475), [@ioquatix])
- Restore support for code relying on `SessionId#to_s`. ([@jeremyevans])

## [2.1.0] - 2020-01-10

### Added

- Add support for `SameSite=None` cookie value. ([@hennikul](https://github.com/hennikul))
- Add trailer headers. ([@eileencodes](https://github.com/eileencodes))
- Add MIME Types for video streaming. ([@styd](https://github.com/styd))
- Add MIME Type for WASM. ([@buildrtech](https://github.com/buildrtech))
- Add `Early Hints(103)` to status codes. ([@egtra](https://github.com/egtra))
- Add `Too Early(425)` to status codes. ([@y-yagi]((https://github.com/y-yagi)))
- Add `Bandwidth Limit Exceeded(509)` to status codes. ([@CJKinni](https://github.com/CJKinni))
- Add method for custom `ip_filter`. ([@svcastaneda](https://github.com/svcastaneda))
- Add boot-time profiling capabilities to `rackup`. ([@tenderlove](https://github.com/tenderlove))
- Add multi mapping support for `X-Accel-Mappings` header. ([@yoshuki](https://github.com/yoshuki))
- Add `sync: false` option to `Rack::Deflater`. (Eric Wong)
- Add `Builder#freeze_app` to freeze application and all middleware instances. ([@jeremyevans])
- Add API to extract cookies from `Rack::MockResponse`. ([@petercline](https://github.com/petercline))

### Changed

- Don't propagate nil values from middleware. ([@ioquatix])
- Lazily initialize the response body and only buffer it if required. ([@ioquatix])
- Fix deflater zlib buffer errors on empty body part. ([@felixbuenemann](https://github.com/felixbuenemann))
- Set `X-Accel-Redirect` to percent-encoded path. ([@diskkid](https://github.com/diskkid))
- Remove unnecessary buffer growing when parsing multipart. ([@tainoe](https://github.com/tainoe))
- Expand the root path in `Rack::Static` upon initialization. ([@rosenfeld](https://github.com/rosenfeld))
- Make `ShowExceptions` work with binary data. ([@axyjo](https://github.com/axyjo))
- Use buffer string when parsing multipart requests. ([@janko-m](https://github.com/janko-m))
- Support optional UTF-8 Byte Order Mark (BOM) in config.ru. ([@mikegee](https://github.com/mikegee))
- Handle `X-Forwarded-For` with optional port. ([@dpritchett](https://github.com/dpritchett))
- Use `Time#httpdate` format for Expires, as proposed by RFC 7231. ([@nanaya](https://github.com/nanaya))
- Make `Utils.status_code` raise an error when the status symbol is invalid instead of `500`. ([@adambutler](https://github.com/adambutler))
- Rename `Request::SCHEME_WHITELIST` to `Request::ALLOWED_SCHEMES`.
- Make `Multipart::Parser.get_filename` accept files with `+` in their name. ([@lucaskanashiro](https://github.com/lucaskanashiro))
- Add Falcon to the default handler fallbacks. ([@ioquatix])
- Update codebase to avoid string mutations in preparation for `frozen_string_literals`. ([@pat](https://github.com/pat))
- Change `MockRequest#env_for` to rely on the input optionally responding to `#size` instead of `#length`. ([@janko](https://github.com/janko))
- Rename `Rack::File` -> `Rack::Files` and add deprecation notice. ([@postmodern](https://github.com/postmodern))
- Prefer Base64 “strict encoding” for Base64 cookies. ([@ioquatix])

### Removed

- BREAKING CHANGE: Remove `to_ary` from Response ([@tenderlove](https://github.com/tenderlove))
- Deprecate `Rack::Session::Memcache` in favor of `Rack::Session::Dalli` from dalli gem ([@fatkodima](https://github.com/fatkodima))

### Fixed

- Eliminate warnings for Ruby 2.7. ([@osamtimizer](https://github.com/osamtimizer]))

### Documentation

- Update broken example in `Session::Abstract::ID` documentation. ([tonytonyjan](https://github.com/tonytonyjan))
- Add Padrino to the list of frameworks implementing Rack. ([@wikimatze](https://github.com/wikimatze))
- Remove Mongrel from the suggested server options in the help output. ([@tricknotes](https://github.com/tricknotes))
- Replace `HISTORY.md` and `NEWS.md` with `CHANGELOG.md`. ([@twitnithegirl](https://github.com/twitnithegirl))
- CHANGELOG updates. ([@drenmi](https://github.com/Drenmi), [@p8](https://github.com/p8))

## [2.0.8] - 2019-12-08

### Security

- [[CVE-2019-16782](https://nvd.nist.gov/vuln/detail/CVE-2019-16782)] Prevent timing attacks targeted at session ID lookup. BREAKING CHANGE: Session ID is now a SessionId instance instead of a String. ([@tenderlove](https://github.com/tenderlove), [@rafaelfranca](https://github.com/rafaelfranca))

## [1.6.12] - 2019-12-08

### Security

- [[CVE-2019-16782](https://nvd.nist.gov/vuln/detail/CVE-2019-16782)] Prevent timing attacks targeted at session ID lookup. BREAKING CHANGE: Session ID is now a SessionId instance instead of a String. ([@tenderlove](https://github.com/tenderlove), [@rafaelfranca](https://github.com/rafaelfranca))

## [2.0.7] - 2019-04-02

### Fixed

- Remove calls to `#eof?` on Rack input in `Multipart::Parser`, as this breaks the specification. ([@matthewd](https://github.com/matthewd))
- Preserve forwarded IP addresses for trusted proxy chains. ([@SamSaffron](https://github.com/SamSaffron))

## [2.0.6] - 2018-11-05

### Fixed

- [[CVE-2018-16470](https://nvd.nist.gov/vuln/detail/CVE-2018-16470)] Reduce buffer size of `Multipart::Parser` to avoid pathological parsing. ([@tenderlove](https://github.com/tenderlove))
- Fix a call to a non-existing method `#accepts_html` in the `ShowExceptions` middleware. ([@tomelm](https://github.com/tomelm))
- [[CVE-2018-16471](https://nvd.nist.gov/vuln/detail/CVE-2018-16471)] Whitelist HTTP and HTTPS schemes in `Request#scheme` to prevent a possible XSS attack. ([@PatrickTulskie](https://github.com/PatrickTulskie))

## [2.0.5] - 2018-04-23

### Fixed

- Record errors originating from invalid UTF8 in `MethodOverride` middleware instead of breaking. ([@mclark](https://github.com/mclark))

## [2.0.4] - 2018-01-31

### Changed

- Ensure the `Lock` middleware passes the original `env` object. ([@lugray](https://github.com/lugray))
- Improve performance of `Multipart::Parser` when uploading large files. ([@tompng](https://github.com/tompng))
- Increase buffer size in `Multipart::Parser` for better performance. ([@jkowens](https://github.com/jkowens))
- Reduce memory usage of `Multipart::Parser` when uploading large files. ([@tompng](https://github.com/tompng))
- Replace ConcurrentRuby dependency with native `Queue`. ([@devmchakan](https://github.com/devmchakan))

### Fixed

- Require the correct digest algorithm in the `ETag` middleware. ([@matthewd](https://github.com/matthewd))

### Documentation

- Update homepage links to use SSL. ([@hugoabonizio](https://github.com/hugoabonizio))

## [2.0.3] - 2017-05-15

### Changed

- Ensure `env` values are ASCII 8-bit encoded. ([@eileencodes](https://github.com/eileencodes))

### Fixed

- Prevent exceptions when a class with mixins inherits from `Session::Abstract::ID`. ([@jnraine](https://github.com/jnraine))

## [2.0.2] - 2017-05-08

### Added

- Allow `Session::Abstract::SessionHash#fetch` to accept a block with a default value. ([@yannvanhalewyn](https://github.com/yannvanhalewyn))
- Add `Builder#freeze_app` to freeze application and all middleware. ([@jeremyevans])

### Changed

- Freeze default session options to avoid accidental mutation. ([@kirs](https://github.com/kirs))
- Detect partial hijack without hash headers. ([@devmchakan](https://github.com/devmchakan))
- Update tests to use MiniTest 6 matchers. ([@tonytonyjan](https://github.com/tonytonyjan))
- Allow 205 Reset Content responses to set a Content-Length, as RFC 7231 proposes setting this to 0. ([@devmchakan](https://github.com/devmchakan))

### Fixed

- Handle `NULL` bytes in multipart filenames. ([@casperisfine](https://github.com/casperisfine))
- Remove warnings due to miscapitalized global. ([@ioquatix])
- Prevent exceptions caused by a race condition on multi-threaded servers. ([@sophiedeziel](https://github.com/sophiedeziel))
- Add RDoc as an explicit dependency for `doc` group. ([@tonytonyjan](https://github.com/tonytonyjan))
- Record errors originating from `Multipart::Parser` in the `MethodOverride` middleware instead of letting them bubble up. ([@carlzulauf](https://github.com/carlzulauf))
- Remove remaining use of removed `Utils#bytesize` method from the `File` middleware. ([@brauliomartinezlm](https://github.com/brauliomartinezlm))

### Removed

- Remove `deflate` encoding support to reduce caching overhead. ([@devmchakan](https://github.com/devmchakan))

### Documentation

- Update broken example in `Deflater` documentation. ([@mwpastore](https://github.com/mwpastore))

## [2.0.1] - 2016-06-30

### Changed

- Remove JSON as an explicit dependency. ([@mperham](https://github.com/mperham))


# History/News Archive
Items below this line are from the previously maintained HISTORY.md and NEWS.md files.

## [2.0.0.rc1] 2016-05-06
- Rack::Session::Abstract::ID is deprecated. Please change to use Rack::Session::Abstract::Persisted

## [2.0.0.alpha] 2015-12-04
- First-party "SameSite" cookies. Browsers omit SameSite cookies from third-party requests, closing the door on many CSRF attacks.
- Pass `same_site: true` (or `:strict`) to enable: response.set_cookie 'foo', value: 'bar', same_site: true or `same_site: :lax` to use Lax enforcement: response.set_cookie 'foo', value: 'bar', same_site: :lax
- Based on version 7 of the Same-site Cookies internet draft:
	https://tools.ietf.org/html/draft-west-first-party-cookies-07
- Thanks to Ben Toews (@mastahyeti) and Bob Long (@bobjflong) for updating to drafts 5 and 7.
- Add `Rack::Events` middleware for adding event based middleware: middleware that does not care about the response body, but only cares about doing work at particular points in the request / response lifecycle.
- Add `Rack::Request#authority` to calculate the authority under which the response is being made (this will be handy for h2 pushes).
- Add `Rack::Response::Helpers#cache_control` and `cache_control=`. Use this for setting cache control headers on your response objects.
- Add `Rack::Response::Helpers#etag` and `etag=`.  Use this for setting etag values on the response.
- Introduce `Rack::Response::Helpers#add_header` to add a value to a multi-valued response header. Implemented in terms of other `Response#*_header` methods, so it's available to any response-like class that includes the `Helpers` module.
- Add `Rack::Request#add_header` to match.
- `Rack::Session::Abstract::ID` IS DEPRECATED.  Please switch to `Rack::Session::Abstract::Persisted`. `Rack::Session::Abstract::Persisted` uses a request object rather than the `env` hash.
- Pull `ENV` access inside the request object in to a module.  This will help with legacy Request objects that are ENV based but don't want to inherit from Rack::Request
- Move most methods on the `Rack::Request` to a module `Rack::Request::Helpers` and use public API to get values from the request object.  This enables users to mix `Rack::Request::Helpers` in to their own objects so they can implement `(get|set|fetch|each)_header` as they see fit (for example a proxy object).
- Files and directories with + in the name are served correctly. Rather than unescaping paths like a form, we unescape with a URI parser using `Rack::Utils.unescape_path`. Fixes #265
- Tempfiles are automatically closed in the case that there were too
	many posted.
- Added methods for manipulating response headers that don't assume
	they're stored as a Hash. Response-like classes may include the
	Rack::Response::Helpers module if they define these methods:
    - Rack::Response#has_header?
	- Rack::Response#get_header
	- Rack::Response#set_header
	- Rack::Response#delete_header
- Introduce Util.get_byte_ranges that will parse the value of the HTTP_RANGE string passed to it without depending on the `env` hash. `byte_ranges` is deprecated in favor of this method.
- Change Session internals to use Request objects for looking up session information. This allows us to only allocate one request object when dealing with session objects (rather than doing it every time we need to manipulate cookies, etc).
- Add `Rack::Request#initialize_copy` so that the env is duped when the request gets duped.
- Added methods for manipulating request specific data.  This includes
	data set as CGI parameters, and just any arbitrary data the user wants
	to associate with a particular request.  New methods:
	 - Rack::Request#has_header?
	 - Rack::Request#get_header
	 - Rack::Request#fetch_header
	 - Rack::Request#each_header
	 - Rack::Request#set_header
	 - Rack::Request#delete_header
- lib/rack/utils.rb: add a method for constructing "delete" cookie
	headers.  This allows us to construct cookie headers without depending
	on the side effects of mutating a hash.
- Prevent extremely deep parameters from being parsed. CVE-2015-3225

## [1.6.1] 2015-05-06
  - Fix CVE-2014-9490, denial of service attack in OkJson
  - Use a monotonic time for Rack::Runtime, if available
  - RACK_MULTIPART_LIMIT changed to RACK_MULTIPART_PART_LIMIT (RACK_MULTIPART_LIMIT is deprecated and will be removed in 1.7.0)

## [1.5.3] 2015-05-06
  - Fix CVE-2014-9490, denial of service attack in OkJson
  - Backport bug fixes to 1.5 series

## [1.6.0] 2014-01-18
  - Response#unauthorized? helper
  - Deflater now accepts an options hash to control compression on a per-request level
  - Builder#warmup method for app preloading
  - Request#accept_language method to extract HTTP_ACCEPT_LANGUAGE
  - Add quiet mode of rack server, rackup --quiet
  - Update HTTP Status Codes to RFC 7231
  - Less strict header name validation according to RFC 2616
  - SPEC updated to specify headers conform to RFC7230 specification
  - Etag correctly marks etags as weak
  - Request#port supports multiple x-http-forwarded-proto values
  - Utils#multipart_part_limit configures the maximum number of parts a request can contain
  - Default host to localhost when in development mode
  - Various bugfixes and performance improvements

## [1.5.2] 2013-02-07
  - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
  - Fix CVE-2013-0262, symlink path traversal in Rack::File
  - Add various methods to Session for enhanced Rails compatibility
  - Request#trusted_proxy? now only matches whole strings
  - Add JSON cookie coder, to be default in Rack 1.6+ due to security concerns
  - URLMap host matching in environments that don't set the Host header fixed
  - Fix a race condition that could result in overwritten pidfiles
  - Various documentation additions

## [1.4.5] 2013-02-07
  - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie
  - Fix CVE-2013-0262, symlink path traversal in Rack::File

## [1.1.6, 1.2.8, 1.3.10] 2013-02-07
  - Fix CVE-2013-0263, timing attack against Rack::Session::Cookie

## [1.5.1] 2013-01-28
  - Rack::Lint check_hijack now conforms to other parts of SPEC
  - Added hash-like methods to Abstract::ID::SessionHash for compatibility
  - Various documentation corrections

## [1.5.0] 2013-01-21
  - Introduced hijack SPEC, for before-response and after-response hijacking
  - SessionHash is no longer a Hash subclass
  - Rack::File cache_control parameter is removed, in place of headers options
  - Rack::Auth::AbstractRequest#scheme now yields strings, not symbols
  - Rack::Utils cookie functions now format expires in RFC 2822 format
  - Rack::File now has a default mime type
  - rackup -b 'run Rack::Files.new(".")', option provides command line configs
  - Rack::Deflater will no longer double encode bodies
  - Rack::Mime#match? provides convenience for Accept header matching
  - Rack::Utils#q_values provides splitting for Accept headers
  - Rack::Utils#best_q_match provides a helper for Accept headers
  - Rack::Handler.pick provides convenience for finding available servers
  - Puma added to the list of default servers (preferred over Webrick)
  - Various middleware now correctly close body when replacing it
  - Rack::Request#params is no longer persistent with only GET params
  - Rack::Request#update_param and #delete_param provide persistent operations
  - Rack::Request#trusted_proxy? now returns true for local unix sockets
  - Rack::Response no longer forces Content-Types
  - Rack::Sendfile provides local mapping configuration options
  - Rack::Utils#rfc2109 provides old netscape style time output
  - Updated HTTP status codes
  - Ruby 1.8.6 likely no longer passes tests, and is no longer fully supported

## [1.4.4, 1.3.9, 1.2.7, 1.1.5] 2013-01-13
  - [SEC] Rack::Auth::AbstractRequest no longer symbolizes arbitrary strings
  - Fixed erroneous test case in the 1.3.x series

## [1.4.3] 2013-01-07
  - Security: Prevent unbounded reads in large multipart boundaries

## [1.3.8] 2013-01-07
  - Security: Prevent unbounded reads in large multipart boundaries

## [1.4.2] 2013-01-06
  - Add warnings when users do not provide a session secret
  - Fix parsing performance for unquoted filenames
  - Updated URI backports
  - Fix URI backport version matching, and silence constant warnings
  - Correct parameter parsing with empty values
  - Correct rackup '-I' flag, to allow multiple uses
  - Correct rackup pidfile handling
  - Report rackup line numbers correctly
  - Fix request loops caused by non-stale nonces with time limits
  - Fix reloader on Windows
  - Prevent infinite recursions from Response#to_ary
  - Various middleware better conforms to the body close specification
  - Updated language for the body close specification
  - Additional notes regarding ECMA escape compatibility issues
  - Fix the parsing of multiple ranges in range headers
  - Prevent errors from empty parameter keys
  - Added PATCH verb to Rack::Request
  - Various documentation updates
  - Fix session merge semantics (fixes rack-test)
  - Rack::Static :index can now handle multiple directories
  - All tests now utilize Rack::Lint (special thanks to Lars Gierth)
  - Rack::File cache_control parameter is now deprecated, and removed by 1.5
  - Correct Rack::Directory script name escaping
  - Rack::Static supports header rules for sophisticated configurations
  - Multipart parsing now works without a Content-Length header
  - New logos courtesy of Zachary Scott!
  - Rack::BodyProxy now explicitly defines #each, useful for C extensions
  - Cookies that are not URI escaped no longer cause exceptions

## [1.3.7] 2013-01-06
  - Add warnings when users do not provide a session secret
  - Fix parsing performance for unquoted filenames
  - Updated URI backports
  - Fix URI backport version matching, and silence constant warnings
  - Correct parameter parsing with empty values
  - Correct rackup '-I' flag, to allow multiple uses
  - Correct rackup pidfile handling
  - Report rackup line numbers correctly
  - Fix request loops caused by non-stale nonces with time limits
  - Fix reloader on Windows
  - Prevent infinite recursions from Response#to_ary
  - Various middleware better conforms to the body close specification
  - Updated language for the body close specification
  - Additional notes regarding ECMA escape compatibility issues
  - Fix the parsing of multiple ranges in range headers

## [1.2.6] 2013-01-06
  - Add warnings when users do not provide a session secret
  - Fix parsing performance for unquoted filenames

## [1.1.4] 2013-01-06
  - Add warnings when users do not provide a session secret

## [1.4.1] 2012-01-22
  - Alter the keyspace limit calculations to reduce issues with nested params
  - Add a workaround for multipart parsing where files contain unescaped "%"
  - Added Rack::Response::Helpers#method_not_allowed? (code 405)
  - Rack::File now returns 404 for illegal directory traversals
  - Rack::File now returns 405 for illegal methods (non HEAD/GET)
  - Rack::Cascade now catches 405 by default, as well as 404
  - Cookies missing '--' no longergems/gems/rack-3.0.8/README.md000064400000026212150403134050011273 0ustar00ce variables
  - Rack::Utils.build_query no longer outputs '=' for nil query values
  - Various mime types added
  - Rack::MockRequest now supports HEAD
  - Rack::Directory now supports files that contain RFC3986 reserved chars
  - Rack::File now only supports GET and HEAD requests
  - Rack::Server#start now passes the block to Rack::Handler::<h>#run
  - Rack::Static now supports an index option
  - Added the Teapot status code
  - rackup now defaults to Thin instead of Mongrel (if installed)
  - Support added for HTTP_X_FORWARDED_SCHEME
  - Numerous bug fixes, including many fixes for new and alternate rubies

## [1.1.3] 2011-12-28
  - Security fix. http://www.ocert.org/advisories/ocert-2011-003.html
    Further information here: http://jruby.org/2011/12/27/jruby-1-6-5-1

## [1.3.5] 2011-10-17
  - Fix annoying warnings caused by the backport in 1.3.4

## [1.3.4] 2011-10-01
  - Backport security fix from 1.9.3, also fixes some roundtrip issues in URI
  - Small documentation update
  - Fix an issue where BodyProxy could cause an infinite recursion
  - Add some supporting files for travis-ci

## [1.2.4] 2011-09-16
  - Fix a bug with MRI regex engine to prevent XSS by malformed unicode

## [1.3.3] 2011-09-16
  - Fix bug with broken query parameters in Rack::ShowExceptions
  - Rack::Request#cookies no longer swallows exceptions on broken input
  - Prevents XSS attacks enabled by bug in Ruby 1.8's regexp engine
  - Rack::ConditionalGet handles broken If-Modified-Since helpers

## [1.3.2] 2011-07-16
  - Fix for Rails and rack-test, Rack::Utils#escape calls to_s

## [1.3.1] 2011-07-13
  - Fix 1.9.1 support
  - Fix JRuby support
  - Properly handle $KCODE in Rack::Utils.escape
  - Make method_missing/respond_to behavior consistent for Rack::Lock,
    Rack::Auth::Digest::Request and Rack::Multipart::UploadedFile
  - Reenable passing rack.session to session middleware
  - Rack::CommonLogger handles streaming responses correctly
  - Rack::MockResponse calls close on the body object
  - Fix a DOS vector from MRI stdlib backport

## [1.2.3] 2011-05-22
  - Pulled in relevant bug fixes from 1.3
  - Fixed 1.8.6 support

## [1.3.0] 2011-05-22
  - Various performance optimizations
  - Various multipart fixes
  - Various multipart refactors
  - Infinite loop fix for multipart
  - Test coverage for Rack::Server returns
  - Allow files with '..', but not path components that are '..'
  - rackup accepts handler-specific options on the command line
  - Request#params no longer merges POST into GET (but returns the same)
  - Use URI.encode_www_form_component instead. Use core methods for escaping.
  - Allow multi-line comments in the config file
  - Bug L#94 reported by Nikolai Lugovoi, query parameter unescaping.
  - Rack::Response now deletes Content-Length when appropriate
  - Rack::Deflater now supports streaming
  - Improved Rack::Handler loading and searching
  - Support for the PATCH verb
  - env['rack.session.options'] now contains session options
  - Cookies respect renew
  - Session middleware uses SecureRandom.hex

## [1.2.2, 1.1.2] 2011-03-13
  - Security fix in Rack::Auth::Digest::MD5: when authenticator
    returned nil, permission was granted on empty password.

## [1.2.1] 2010-06-15
  - Make CGI handler rewindable
  - Rename spec/ to test/ to not conflict with SPEC on lesser
    operating systems

## [1.2.0] 2010-06-13
  - Removed Camping adapter: Camping 2.0 supports Rack as-is
  - Removed parsing of quoted values
  - Add Request.trace? and Request.options?
  - Add mime-type for .webm and .htc
  - Fix HTTP_X_FORWARDED_FOR
  - Various multipart fixes
  - Switch test suite to bacon

## [1.1.0] 2010-01-03
  - Moved Auth::OpenID to rack-contrib.
  - SPEC change that relaxes Lint slightly to allow subclasses of the
    required types
  - SPEC change to document rack.input binary mode in greater detail
  - SPEC define optional rack.logger specification
  - File servers support X-Cascade header
  - Imported Config middleware
  - Imported ETag middleware
  - Imported Runtime middleware
  - Imported Sendfile middleware
  - New Logger and NullLogger middlewares
  - Added mime type for .ogv and .manifest.
  - Don't squeeze PATH_INFO slashes
  - Use Content-Type to determine POST params parsing
  - Update Rack::Utils::HTTP_STATUS_CODES hash
  - Add status code lookup utility
  - Response should call #to_i on the status
  - Add Request#user_agent
  - Request#host knows about forwarded host
  - Return an empty string for Request#host if HTTP_HOST and
    SERVER_NAME are both missing
  - Allow MockRequest to accept hash params
  - Optimizations to HeaderHash
  - Refactored rackup into Rack::Server
  - Added Utils.build_nested_query to complement Utils.parse_nested_query
  - Added Utils::Multipart.build_multipart to complement
    Utils::Multipart.parse_multipart
  - Extracted set and delete cookie helpers into Utils so they can be
    used outside Response
  - Extract parse_query and parse_multipart in Request so subclasses
    can change their behavior
  - Enforce binary encoding in RewindableInput
  - Set correct external_encoding for handlers that don't use RewindableInput

## [1.0.1] 2009-10-18
  - Bump remainder of rack.versions.
  - Support the pure Ruby FCGI implementation.
  - Fix for form names containing "=": split first then unescape components
  - Fixes the handling of the filename parameter with semicolons in names.
  - Add anchor to nested params parsing regexp to prevent stack overflows
  - Use more compatible gzip write api instead of "<<".
  - Make sure that Reloader doesn't break when executed via ruby -e
  - Make sure WEBrick respects the :Host option
  - Many Ruby 1.9 fixes.

## [1.0.0] 2009-04-25
  - SPEC change: Rack::VERSION has been pushed to [1,0].
  - SPEC change: header values must be Strings now, split on "\n".
  - SPEC change: Content-Length can be missing, in this case chunked transfer
    encoding is used.
  - SPEC change: rack.input must be rewindable and support reading into
    a buffer, wrap with Rack::RewindableInput if it isn't.
  - SPEC change: rack.session is now specified.
  - SPEC change: Bodies can now additionally respond to #to_path with
    a filename to be served.
  - NOTE: String bodies break in 1.9, use an Array consisting of a
    single String instead.
  - New middleware Rack::Lock.
  - New middleware Rack::ContentType.
  - Rack::Reloader has been rewritten.
  - Major update to Rack::Auth::OpenID.
  - Support for nested parameter parsing in Rack::Response.
  - Support for redirects in Rack::Response.
  - HttpOnly cookie support in Rack::Response.
  - The Rakefile has been rewritten.
  - Many bugfixes and small improvements.

## [0.9.1] 2009-01-09
  - Fix directory traversal exploits in Rack::File and Rack::Directory.

## [0.9] 2009-01-06
  - Rack is now managed by the Rack Core Team.
  - Rack::Lint is stricter and follows the HTTP RFCs more closely.
  - Added ConditionalGet middleware.
  - Added ContentLength middleware.
  - Added Deflater middleware.
  - Added Head middleware.
  - Added MethodOverride middleware.
  - Rack::Mime now provides popular MIME-types and their extension.
  - Mongrel Header now streams.
  - Added Thin handler.
  - Official support for swiftiplied Mongrel.
  - Secure cookies.
  - Made HeaderHash case-preserving.
  - Many bugfixes and small improvements.

## [0.4] 2008-08-21
  - New middleware, Rack::Deflater, by Christoffer Sawicki.
  - OpenID authentication now needs ruby-openid 2.
  - New Memcache sessions, by blink.
  - Explicit EventedMongrel handler, by Joshua Peek <josh@joshpeek.com>
  - Rack::Reloader is not loaded in rackup development mode.
  - rackup can daemonize with -D.
  - Many bugfixes, especially for pool sessions, URLMap, thread safety
    and tempfile handling.
  - Improved tests.
  - Rack moved to Git.

## [0.3] 2008-02-26
  - LiteSpeed handler, by Adrian Madrid.
  - SCGI handler, by Jeremy Evans.
  - Pool sessions, by blink.
  - OpenID authentication, by blink.
  - :Port and :File options for opening FastCGI sockets, by blink.
  - Last-Modified HTTP header for Rack::File, by blink.
  - Rack::Builder#use now accepts blocks, by Corey Jewett.
    (See example/protectedlobster.ru)
  - HTTP status 201 can contain a Content-Type and a body now.
  - Many bugfixes, especially related to Cookie handling.

## [0.2] 2007-05-16
  - HTTP Basic authentication.
  - Cookie Sessions.
  - Static file handler.
  - Improved Rack::Request.
  - Improved Rack::Response.
  - Added Rack::ShowStatus, for better default error messages.
  - Bug fixes in the Camping adapter.
  - Removed Rails adapter, was too alpha.

## [0.1] 2007-03-03

[@ioquatix]: https://github.com/ioquatix "Samuel Williams"
[@jeremyevans]: https://github.com/jeremyevans "Jeremy Evans"
[@amatsuda]: https://github.com/amatsuda "Akira Matsuda"
[@wjordan]: https://github.com/wjordan "Will Jordan"
[@BlakeWilliams]: https://github.com/BlakeWilliams "Blake Williams"
gems/gems/rack-3.0.8/README.md000064400000026212150403134050011273 0ustar00# ![Rack](contrib/logo.webp)

> **_NOTE:_** Rack v3.0.0 was recently released. Please check the [Upgrade
> Guide](UPGRADE-GUIDE.md) for more details about migrating your existing
> servers, middlewares and applications. For detailed information on specific
> changes, check the [Change Log](CHANGELOG.md).

Rack provides a minimal, modular, and adaptable interface for developing web
applications in Ruby. By wrapping HTTP requests and responses in the simplest
way possible, it unifies and distills the bridge between web servers, web
frameworks, and web application into a single method call.

The exact details of this are described in the [Rack Specification], which all
Rack applications should conform to.

## Installation

Add the rack gem to your application bundle, or follow the instructions provided
by a [supported web framework](#supported-web-frameworks):

```bash
# Install it generally:
$ gem install rack --pre

# or, add it to your current application gemfile:
$ bundle add rack --version 3.0.0
```

If you need features from `Rack::Session` or `bin/rackup` please add those gems separately.

```bash
$ gem install rack-session rackup
```

## Usage

Create a file called `config.ru` with the following contents:

```ruby
run do |env|
  [200, {}, ["Hello World"]]
end
```

Run this using the rackup gem or another [supported web
server](#supported-web-servers).

```bash
$ gem install rackup
$ rackup
$ curl http://localhost:9292
Hello World
```

## Supported web servers

Rack is supported by a wide range of servers, including:

* [Agoo](https://github.com/ohler55/agoo)
* [Falcon](https://github.com/socketry/falcon) **(Rack 3 Compatible)**
* [Iodine](htgems/gems/rack-3.0.8/MIT-LICENSE000064400000002124150403134050011444 0ustar00ny others support the [Rack Specification]:

* [Camping](https://github.com/camping/camping)
* [Hanami](https://hanamirb.org/)
* [Padrino](https://padrinorb.com/)
* [Roda](https://github.com/jeremyevans/roda) **(Rack 3 Compatible)**
* [Ruby on Rails](https://rubyonrails.org/)
* [Sinatra](https://sinatrarb.com/)
* [Utopia](https://github.com/socketry/utopia) **(Rack 3 Compatible)**
* [WABuR](https://github.com/ohler55/wabur)

### Older (possibly unsupported) web frameworks

* [Ramaze](http://ramaze.net/)
* [Rum](https://github.com/leahneukirchen/rum)

## Available middleware shipped with Rack

Between the server and the framework, Rack can be customized to your
applications needs using middleware. Rack itself ships with the following
middleware:

* `Rack::CommonLogger` for creating Apache-style logfiles.
* `Rack::ConditionalGet` for returning [Not
  Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304)
  responses when the response has not changed.
* `Rack::Config` for modifying the environment before processing the request.
* `Rack::ContentLength` for setting a `content-lengems/gems/rack-3.0.8/lib/rack.rb000064400000004722150403134050012031 0ustar00uding a response header with the time taken to process
  the request.
* `Rack::Sendfile` for working with web servers that can use optimized file
  serving for file system paths.
* `Rack::ShowException` for catching unhandled exceptions and presenting them in
  a nice and helpful way with clickable backtrace.
* `Rack::ShowStatus` for using nice error pages for empty client error
  responses.
* `Rack::Static` for more configurable serving of static files.
* `Rack::TempfileReaper` for removing temporary files creating during a request.

All these components use the same interface, which is described in detail in the
[Rack Specification]. These optional components can be used in any way you wish.

### Convenience interfaces

If you want to develop outside of existing frameworks, implement your own ones,
or develop middleware, Rack provides many helpers to create Rack applications
quickly and without doing the same web stuff all over:

* `Rack::Request` which also provides query string parsing and multipart
  handling.
* `Rack::Response` for convenient generation of HTTP replies and cookie
  handling.
* `Rack::MockRequest` and `Rack::MockResponse` for efficient and quick testing
  of Rack application without real HTTP round-trips.
* `Rack::Cascade` for trying additional Rack applications if an application
  returns a not found or method not supported response.
* `Rack::Directory` for serving files under a given directory, with directory
  indexes.
* `Rack::MediaType` for parsing content-type headers.
* `Rack::Mime` for determining content-type based on file extension.
* `Rack::RewindableInput` for making any IO object rewindable, using a temporary
  file buffer.
* `Rack::URLMap` to route to multiple applications inside the same process.

## Configuration

Rack exposes several configuration parameters to control various features of the
implementation.

### `param_depth_limit`

```ruby
Rack::Utils.param_depth_limit = 32 # default
```

The maximum amount of nesting allowed in parameters. For example, if set to 3,
this query string would be allowed:

```
?a[b][c]=d
```

but this query string would not be allowed:

```
?a[b][c][d]=e
```

Limiting the depth prevents a possible stack overflow when parsing parameters.

### `multipart_file_limit`

```ruby
Rack::Utils.multipart_file_limit = 128 # default
```

The maximum number of parts with a filename a request can contain. Accepting
too many parts can lead to the server running out of file handles.

The default is 128, which means gems/gems/rack-3.0.8/lib/rack/files.rb000064400000013245150403134060013134 0ustar00K_MULTIPART_TOTAL_PART_LIMIT` environment variable.


## Changelog

See [CHANGELOG.md](CHANGELOG.md).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for specific details about how to make a
contribution to Rack.

Please post bugs, suggestions and patches to [GitHub
Issues](https://github.com/rack/rack/issues).

Please check our [Security Policy](https://github.com/rack/rack/security/policy)
for responsible disclosure and security bug reporting process. Due to wide usage
of the library, it is strongly preferred that we manage timing in order to
provide viable patches at the time of disclosure. Your assistance in this matter
is greatly appreciated.

## See Also

### `rack-contrib`

The plethora of useful middleware created the need for a project that collects
fresh Rack middleware. `rack-contrib` includes a variety of add-on components
for Rack and it is easy to contribute new modules.

* https://github.com/rack/rack-contrib

### `rack-session`

Provides convenient session management for Rack.

* https://github.com/rack/rack-session

## Thanks

The Rack Core Team, consisting of

* Aaron Patterson [tenderlove](https://github.com/tenderlove)
* Samuel Williams [ioquatix](https://github.com/ioquatix)
* Jeremy Evans [jeremyevans](https://github.com/jeremyevans)
* Eileen Uchitelle [eileencodes](https://github.com/eileencodes)
* Matthew Draper [matthewd](https://github.com/matthewd)
* Rafael França [rafaelfranca](https://github.com/rafaelfranca)

and the Rack Alumni

* Ryan Tomayko [rtomayko](https://github.com/rtomayko)
* Scytrin dai Kinthra [scytrin](https://github.com/scytrin)
* Leah Neukirchen [leahneukirchen](https://github.com/leahneukirchen)
* James Tucker [raggi](https://github.com/raggi)
* Josh Peek [josh](https://github.com/josh)
* José Valim [josevalim](https://github.com/josevalim)
* Michael Fellinger [manveru](https://github.com/manveru)
* Santiago Pastorino [spastorino](https://github.com/spastorino)
* Konstantin Haase [rkh](https://github.com/rkh)

would like to thank:

* Adrian Madrid, for the LiteSpeed handler.
* Christoffer Sawicki, for the first Rails adapter and `Rack::Deflater`.
* Tim Fletcher, for the HTTP authentication code.
* Luc Heinrich for the Cookie sessions, the static file handler and bugfixes.
* Armin Ronacher, for the logo and racktools.
* Alex Beregszaszi, Alexander Kahn, Anil Wadghule, Aredridel, Ben Alpert, Dan
  Kubb, Daniel Roethlisberger, Matt Todd, Tom Robinson, Phil Hagelberg, S. Brent
  Faulkner, Bosko Milekic, Daniel Rodríguez Troitiño, Genki Takiuchi, Geoffrey
  Grosenbach, Julien Sanchez, Kamal Fariz Mahyuddin, Masayoshi Takahashi,
  Patrick Aljordm, Mig, Kazuhiro Nishiyama, Jon Bardin, Konstantin Haase, Larry
  Siden, Matias Korhonen, Sam Ruby, Simon Chiang, Tim Connor, Timur Batyrshin,
  and Zach Brock for bug fixing and other improvements.
* Eric Wong, Hongli Lai, Jeremy Kemper for their continuous support and API
  improvements.
* Yehuda Katz and Carl Lerche for refactoring rackup.
* Brian Candler, for `Rack::ContentType`.
* Graham Batty, for improved handler loading.
* Stephen Bannasch, for bug reports and documentation.
* Gary Wright, for proposing a better `Rack::Response` interface.
* Jonathan Buch, for improvements regarding `Rack::Response`.
* Armin Röhrl, for tracking down bugs in the Cookie generator.
* Alexander Kellett for testing the Gem and reviewing the announcement.
* Marcus Rückert, for help with configuring and debugging lighttpd.
* The WSGI team for the well-done and documented work they've done and Rack
  builds up on.
* All bug reporters and patch contributors not mentioned above.

## License

Rack is released under the [MIT License](MIT-LICENSE).

[Rack Specification]: SPEC.rdoc
gems/gems/rack-3.0.8/MIT-LICENSE000064400000002124150403134050011444 0ustar00The MIT License (MIT)

Copyright (C) 2007-2021 Leah Neukirchen <http://leahneukirchen.org/infopage.html>

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:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

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 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.
gems/gems/rack-3.0.8/lib/rack/version.rb000064400000001676150403134060013524 0ustar00# frozen_string_literal: true

# Copyright (C) 2007-2019 Leah Neukirchen <http://leahneukirchen.org/infopage.html>
#
# Rack is freely distributable under the terms of an MIT-style license.
# See MIT-LICENSE or https://opensource.org/licenses/MIT.

# The Rack main module, serving as a namespace for all core Rack
# modules and classes.
#
# All modules meant for use in your application are <tt>autoload</tt>ed here,
# so it should be enough just to <tt>require 'rack'</tt> in your code.

require_relative 'rack/version'
require_relative 'rack/constants'

module Rack
  autoload :Builder, "rack/builder"
  autoload :BodyProxy, "rack/body_proxy"
  autoload :Cascade, "rack/cascade"
  autoload :Chunked, "rack/chunked"
  autoload :CommonLogger, "rack/common_logger"
  autoload :ConditionalGet, "rack/conditional_get"
  autoload :Config, "rack/config"
  autoload :ContentLength, "rack/content_length"
  autoload :ContentType, "rack/content_type"
  autoload :ETaggems/gems/rack-3.0.8/lib/rack/method_override.rb000064400000002710150403134060015204 0ustar00ck/null_logger"
  autoload :QueryParser, "rack/query_parser"
  autoload :Recursive, "rack/recursive"
  autoload :Reloader, "rack/reloader"
  autoload :RewindableInput, "rack/rewindable_input"
  autoload :Runtime, "rack/runtime"
  autoload :Sendfile, "rack/sendfile"
  autoload :Server, "rack/server"
  autoload :ShowExceptions, "rack/show_exceptions"
  autoload :ShowStatus, "rack/show_status"
  autoload :Static, "rack/static"
  autoload :TempfileReaper, "rack/tempfile_reaper"
  autoload :URLMap, "rack/urlmap"
  autoload :Utils, "rack/utils"
  autoload :Multipart, "rack/multipart"

  autoload :MockRequest, "rack/mock_request"
  autoload :MockResponse, "rack/mock_response"

  autoload :Request, "rack/request"
  autoload :Response, "rack/response"

  module Auth
    autoload :Basic, "rack/auth/basic"
    autoload :AbstractRequest, "rack/auth/abstract/request"
    autoload :AbstractHandler, "rack/auth/abstract/handler"
    autoload :Digest, "rack/auth/digest"
  end
end
gems/gems/rack-3.0.8/lib/rack/files.rb000064400000013245150403134060013134 0ustar00gems/gems/rack-3.0.8/lib/rack/chunked.rb000064400000006464150403134060013460 0ustar00 the +path+.

  class Files
    ALLOWED_VERBS = %w[GET HEAD OPTIONS]
    ALLOW_HEADER = ALLOWED_VERBS.join(', ')
    MULTIPART_BOUNDARY = 'AaB03x'

    attr_reader :root

    def initialize(root, headers = {}, default_mime = 'text/plain')
      @root = (::File.expand_path(root) if root)
      @headers = headers
      @default_mime = default_mime
      @head = Rack::Head.new(lambda { |env| get env })
    end

    def call(env)
      # HEAD requests drop the response body, including 4xx error messages.
      @head.call env
    end

    def get(env)
      request = Rack::Request.new env
      unless ALLOWED_VERBS.include? request.request_method
        return fail(405, "Method Not Allowed", { 'allow' => ALLOW_HEADER })
      end

      path_info = Utils.unescape_path request.path_info
      return fail(400, "Bad Request") unless Utils.valid_path?(path_info)

      clean_path_info = Utils.clean_path_info(path_info)
      path = ::File.join(@root, clean_path_info)

      available = begin
        ::File.file?(path) && ::File.readable?(path)
      rescue SystemCallError
        # Not sure in what conditions this exception can occur, but this
        # is a safe way to handle such an error.
        # :nocov:
        false
        # :nocov:
      end

      if available
        serving(request, path)
      else
        fail(404, "File not found: #{path_info}")
      end
    end

    def serving(request, path)
      if request.options?
        return [200, { 'allow' => ALLOW_HEADER, CONTENT_LENGTH => '0' }, []]
      end
      last_modified = ::File.mtime(path).httpdate
      return [304, {}, []] if request.get_header('HTTP_IF_MODIFIED_SINCE') == last_modified

      headers = { "last-modified" => last_modified }
      mime_type = mime_type path, @default_mime
      headers[CONTENT_TYPE] = mime_type if mime_type

      # Set custom headers
      headers.merge!(@headers) if @headers

      status = 200
      size = filesize path

      ranges = Rack::Utils.get_byte_ranges(request.get_header('HTTP_RANGE'), size)
      if ranges.nil?
        # No ranges:
        ranges = [0..size - 1]
      elsif ranges.empty?
        # Unsatisfiable. Return error, and file size:
        response = fail(416, "Byte range unsatisfiable")
        response[1]["content-range"] = "bytes */#{size}"
        return response
      else
        # Partial content
        partial_content = true

        if ranges.size == 1
          range = ranges[0]
          headers["content-range"] = "bytes #{range.begin}-#{range.end}/#{size}"
        else
          headers[CONTENT_TYPE] = "multipart/byteranges; boundary=#{MULTIPART_BOUNDARY}"
        end

        status = 206
        body = BaseIterator.new(path, ranges, mime_type: mime_type, size: size)
        size = body.bytesize
      end

      headers[CONTENT_LENGTH] = size.to_s

      if request.head?
        body = []
      elsif !partial_content
        body = Iterator.new(path, ranges, mime_type: mime_type, size: size)
      end

      [status, headers, body]
    end

    class BaseIterator
      attr_reader :path, :ranges, :options

      def initialize(path, ranges, options)
        @path = path
        @ranges = ranges
        @options = options
      end

      def each
        ::File.open(path, "rb") do |file|
          ranges.each do |range|
            yield multipart_heading(range) if multipart?

        gems/gems/rack-3.0.8/lib/rack/events.rb000064400000011464150403134060013337 0ustar00ions[:size]}\r
\r
EOF
      end

      def each_range_part(file, range)
        file.seek(range.begin)
        remaining_len = range.end - range.begin + 1
        while remaining_len > 0
          part = file.read([8192, remaining_len].min)
          break unless part
          remaining_len -= part.length

          yield part
        end
      end
    end

    class Iterator < BaseIterator
      alias :to_path :path
    end

    private

    def fail(status, body, headers = {})
      body += "\n"

      [
        status,
        {
          CONTENT_TYPE   => "text/plain",
          CONTENT_LENGTH => body.size.to_s,
          "x-cascade" => "pass"
        }.merge!(headers),
        [body]
      ]
    end

    # The MIME type for the contents of the file located at @path
    def mime_type(path, default_mime)
      Mime.mime_type(::File.extname(path), default_mime)
    end

    def filesize(path)
      #   We check via File::size? whether this file provides size info
      #   via stat (e.g. /proc files often don't), otherwise we have to
      #   figure it out by reading the whole file into memory.
      ::File.size?(path) || ::File.read(path).bytesize
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/version.rb000064400000001676150403134060013524 0ustar00# frozen_string_literal: true

# Copyright (C) 2007-2019 Leah Neukirchen <http://leahneukirchen.org/infopage.html>
#
# Rack is freely distributable under the terms of an MIT-style license.
# See MIT-LICENSE or https://opensource.org/licenses/MIT.

# The Rack main module, serving as a namespace for all core Rack
# modules and classes.
#
# All modules meant for use in your application are <tt>autoload</tt>ed here,
# so it should be enough just to <tt>require 'rack'</tt> in your code.

module Rack
  # The Rack protocol version number implemented.
  VERSION = [1, 3].freeze
  deprecate_constant :VERSION

  VERSION_STRING = "1.3".freeze
  deprecate_constant :VERSION_STRING

  # The Rack protocol version number implemented.
  def self.version
    warn "Rack.version is deprecated and will be removed in Rack 3.1!", uplevel: 1
    VERSION
  end

  RELEASE = "3.0.8"

  # Return the Rack release as a dotted string.
  def self.release
    RELEASE
  end
end
gems/gems/rack-3.0.8/lib/rack/method_override.rb000064400000002710150403134060015204 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'request'
require_relative 'utils'

module Rack
  class MethodOverride
    HTTP_METHODS = %w[GET HEAD PUT POST DELETE OPTIONS PATCH LINK UNLINK]

    METHOD_OVERRIDE_PARAM_KEY = "_method"
    HTTP_METHOD_OVERRIDE_HEADER = "HTTP_X_HTTP_METHOD_OVERRIDE"
    ALLOWED_METHODS = %w[POST]

    def initialize(app)
      @app = app
    end

    def call(env)
      if allowed_methods.include?(env[REQUEST_METHOD])
        method = method_override(env)
        if HTTP_METHODS.include?(method)
          env[RACK_METHODOVERRIDE_ORIGINAL_METHOD] = env[REQUEST_METHOD]
          env[REQUEST_METHOD] = method
        end
      end

      @app.call(env)
    end

    def method_override(env)
      req = Request.new(env)
      method = method_override_param(req) ||
        env[HTTP_METHOD_OVERRIDE_HEADER]
      begin
        method.to_s.upcase
      rescue ArgumentError
        env[RACK_ERRORS].puts "Invalid string for method"
      end
    end

    private

    def allowed_methods
      ALLOWED_METHODS
    end

    def method_override_param(req)
      req.POST[METHOD_OVERRIDE_PARAM_KEY] if req.form_data? || req.parseable_data?
    rescue Utils::InvalidParameterError, Utils::ParameterTypeError, QueryParser::ParamsTooDeepError
      req.get_header(RACK_ERRORgems/gems/rack-3.0.8/lib/rack/request.rb000064400000061107150403134060013522 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'

module Rack
  warn "Rack::Chunked is deprecated and will be removed in Rack 3.1", uplevel: 1

  # Middleware that applies chunked transfer encoding to response bodies
  # when the response does not include a content-length header.
  #
  # This supports the trailer response header to allow the use of trailing
  # headers in the chunked encoding.  However, using this requires you manually
  # specify a response body that supports a +trailers+ method.  Example:
  #
  #   [200, { 'trailer' => 'expires'}, ["Hello", "World"]]
  #   # error raised
  #
  #   body = ["Hello", "World"]
  #   def body.trailers
  #     { 'expires' => Time.now.to_s }
  #   end
  #   [200, { 'trailer' => 'expires'}, body]
  #   # No exception raised
  class Chunked
    include Rack::Utils

    # A body wrapper that emits chunked responses.
    class Body
      TERM = "\r\n"
      TAIL = "0#{TERM}"

      # Store the response body to be chunked.
      def initialize(body)
        @body = body
      end

      # For each element yielded by the response body, yield
      # the element in chunked encoding.
      def each(&block)
        term = TERM
        @body.each do |chunk|
          size = chunk.bytesize
          next if size == 0

          yield [size.to_s(16), term, chunk.b, term].join
        end
        yield TAIL
        yield_trailers(&block)
        yield term
      end

      # Close the response body if the response body supports it.
      def close
        @body.close if @body.respond_to?(:close)
      end

      private

      # Do nothing as this class does not support trailer headers.
      def yield_trailers
      end
    end

    # A body wrapper that emits chunked responses and also supports
    # sending Trailer headers.  Note that the response body provided to
    # initialize must have a +trailers+ method that returns a hash
    # of trailer headers, and the rack response itself should have a
    # Trailer header listing the headers that the +trailers+ method
    # will return.
    class TrailerBody < Body
      private

      # Yield strings for each trailer header.
      def yield_trailers
        @body.trailers.each_pair do |k, v|
          yield "#{k}: #{v}\r\n"
        end
      end
    end

    def initialize(app)
      @app = app
    end

    # Whether the HTTP version supports chunked encoding (HTTP 1.1 does).
    def chunkable_version?(ver)
      case ver
      # pre-HTTP/1.0 (informally "HTTP/0.9") HTTP requests did not have
      # a version (nor response headers)
      when 'HTTP/1.0', nil, 'HTTP/0.9'
        false
      else
        true
      end
    end

    # If the rack app returns a response that should have a body,
    # but does not have content-length or transfer-encoding headers,
    # modify the response to use chunked transfer-encoding.
    def call(env)
      status, headers, body = response = @app.call(env)

      if chunkable_version?(env[SERVER_PROTOCOL]) &&
         !STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) &&
         !headers[CONTENT_LENGTH] &&
         !headers[TRANSFER_ENCODING]

        headers[TRANSFER_ENCODING] = 'chunked'
        if headers['trailer']
          response[2] = TrailerBody.new(body)
        else
          response[2] = Body.new(body)
        end
      end

      response
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/events.rb000064400000011464150403134060013337 0ustar00# frozen_string_literal: true

require_relative 'body_proxy'
require_relative 'request'
require_relative 'response'

module Rack
  ### This middleware provides hooks to certain places in the request /
  # response lifecycle.  This is so that middleware that don't need to filter
  # the response data can safely leave it alone and not have to send messages
  # down the traditional "rack stack".
  #
  # The events are:
  #
  # * on_start(request, response)
  #
  #   This event is sent at the start of the request, before the next
  #   middleware in the chain is called.  This method is called with a request
  #   object, and a response object.  Right now, the response object is always
  #   nil, but in the future it may actually be a real response object.
  #
  # * on_commit(request, response)
  #
  #   The response has been committed.  The application has returned, but the
  #   response has not been sent to the webserver yet.  This method is always
  #   called with a request object and the response object.  The response
  #   object is constructed from the rack triple that the application returned.
  #   Changes may still be made to the response object at this point.
  #
  # * on_send(request, response)
  #
  #   The webserver has started iterating over the response body and presumably
  #   has started sending data over the wire. This method is always called with
  #   a request object and the response object.  The response object is
  #   constructed from the rack triple that the application returned.  Changes
  #   SHOULD NOT be made to the response object as the webserver has already
  #   started sending data.  Any mutations will likely result in an exception.
  #
  # * on_finish(request, response)
  #
  #   The webserver has closed the response, and all data has been written to
  #   the response socket.  The request and response object should both be
  #   read-only at this point.  The body MAY NOT be available on the response
  #   object as it may have been flushed to the socket.
  #
  # * on_error(request, response, error)
  #
  #   An exception has occurred in the application or an `on_commit` event.
  #   This method will get the request, the response (if available) and the
  #   exception that was raised.
  #
  # ## Order
  #
  # `on_start` is called on the handlers in the order that they were passed to
  # the constructor.  `on_commit`, on_send`, `on_finish`, and `on_error` are
  # called in the reverse order.  `on_finish` handlers are called inside an
  # `ensure` block, so they are guaranteed to be called even if something
  # raises an exception.  If something raises an exception in a `on_finish`
  # method, then nothing is guaranteed.

  class Events
    module Abstract
      def on_start(req, res)
      end

      def on_commit(req, res)
      end

      def on_send(req, res)
      end

      def on_finish(req, res)
      end

      def on_error(req, res, e)
      end
    end

    class EventedBodyProxy < Rack::BodyProxy # :nodoc:
      attr_reader :request, :response

      def initialize(body, request, response, handlers, &block)
        super(body, &block)
        @request  = request
        @response = response
        @handlers = handlers
      end

      def each
        @handlers.reverse_each { |handler| handler.on_send request, response }
        super
      end
    end

    class BufferedResponse < Rack::Response::Raw # :nodoc:
      attr_reader :body

      def initialize(status, headers, body)
        super(status, headers)
        @body = body
      end

      def to_a; [status, headers, body]; end
    end

    def initialize(app, handlers)
      @app      = app
      @handlers = handlers
    end

    def call(env)
      request = make_request env
      on_start request, nil

      begin
        status, headers, body = @app.call request.env
        response = make_response status, headers, body
        on_commit request, response
      rescue StandardError => e
        on_error request, response, e
        on_finish request, response
        raise
      end

      body = EventedBodyProxy.new(body, request, response, @handlers) do
        on_finish request, response
      end
      [response.status, response.headers, body]
    end

    private

    def on_error(request, response, e)
      @handlers.reverse_each { |handler| handler.on_error request, response, e }
    end

    def on_commit(request, response)
      @handlers.reverse_each { |handler| handler.on_commit request, response }
    end

    def on_start(request, response)
      @handlers.each { |handler| handler.on_start request, nil }
    end

    def on_finish(request, response)
      @handlers.reverse_each { |handler| handler.on_finish request, response }
    end

    def make_request(env)
      Rack::Request.new env
    end

    def make_response(status, headers, body)
      BufferedResponse.new status, headers, body
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/request.rb000064400000061107150403134060013522 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'
require_relative 'media_type'

module Rack
  # Rack::Request provides a convenient interface to a Rack
  # environment.  It is stateless, the environment +env+ passed to the
  # constructor will be directly modified.
  #
  #   req = Rack::Request.new(env)
  #   req.post?
  #   req.params["data"]

  class Request
    class << self
      attr_accessor :ip_filter

      # The priority when checking forwarded headers. The default
      # is <tt>[:forwarded, :x_forwarded]</tt>, which means, check the
      # +Forwarded+ header first, followed by the appropriate
      # <tt>X-Forwarded-*</tt> header.  You can revert the priority by
      # reversing the priority, or remove checking of either
      # or both headers by removing elements from the array.
      #
      # This should be set as appropriate in your environment
      # based on what reverse proxies are in use.  If you are not
      # using reverse proxies, you should probably use an empty
      # array.
      attr_accessor :forwarded_priority

      # The priority when checking either the <tt>X-Forwarded-Proto</tt>
      # or <tt>X-Forwarded-Scheme</tt> header for the forwarded protocol.
      # The default is <tt>[:proto, :scheme]</tt>, to try the
      # <tt>X-Forwarded-Proto</tt> header before the
      # <tt>X-Forwarded-Scheme</tt> header.  Rack 2 had behavior
      # similar to <tt>[:scheme, :proto]</tt>.  You can remove either or
      # both of the entries in array to ignore that respective header.
      attr_accessor :x_forwarded_proto_priority
    end

    @forwarded_priority = [:forwarded, :x_forwarded]
    @x_forwarded_proto_priority = [:proto, :scheme]

    valid_ipv4_octet = /\.(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/

    trusted_proxies = Regexp.union(
      /\A127#{valid_ipv4_octet}{3}\z/,                          # localhost IPv4 range 127.x.x.x, per RFC-3330
      /\A::1\z/,                                                # localhost IPv6 ::1
      /\Af[cd][0-9a-f]{2}(?::[0-9a-f]{0,4}){0,7}\z/i,           # private IPv6 range fc00 .. fdff
      /\A10#{valid_ipv4_octet}{3}\z/,                           # private IPv4 range 10.x.x.x
      /\A172\.(1[6-9]|2[0-9]|3[01])#{valid_ipv4_octet}{2}\z/,   # private IPv4 range 172.16.0.0 .. 172.31.255.255
      /\A192\.168#{valid_ipv4_octet}{2}\z/,                     # private IPv4 range 192.168.x.x
      /\Alocalhost\z|\Aunix(\z|:)/i,                            # localhost hostname, and unix domain sockets
    )

    self.ip_filter = lambda { |ip| trusted_proxies.match?(ip) }

    ALLOWED_SCHEMES = %w(https http wss ws).freeze

    def initialize(env)
      @env = env
      @params = nil
    end

    def params
      @params ||= super
    end

    def update_param(k, v)
      super
      @params = nil
    end

    def delete_param(k)
      v = super
      @params = nil
      v
    end

    module Env
      # The environment of the request.
      attr_reader :env

      def initialize(env)
        @env = env
        # This module is included at least in `ActionDispatch::Request`
        # The call to `super()` allows additional mixed-in initializers are called
        super()
      end

      # Predicate method to test to see if `name` has been set as request
      # specific data
      def has_header?(name)
        @env.key? name
      end

      # Get a request specific value for `name`.
      def get_header(name)
        @env[name]
      end

      # If a block is given, it yields to the block if the value hasn't been set
      # on the request.
      def fetch_header(name, &block)
        @env.fetch(name, &block)
      end

      # Loops through each key / value pair in the request specific data.
      def each_header(&block)
        @env.each(&block)
      end

      # Set a request specific value for `name` to `v`
      def set_header(name, v)
        @env[name] = v
      end

      # Add a header that may have multiple values.
      #
      # Example:
      #   request.add_header 'Accept', 'image/png'
      #   request.add_header 'Accept', '*/*'
      #
      #   assert_equal 'image/png,*/*', request.get_header('Accept')
      #
      # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
      def add_header(key, v)
        if v.nil?
          get_header key
        elsif has_header? key
          set_header key, "#{get_header key},#{v}"
        else
          set_header key, v
        end
      end

      # Delete a request specific value for `name`.
      def delete_header(name)
        @env.delete name
      end

      def initialize_copy(other)
        @env = other.env.dup
      end
    end

    module Helpers
      # The set of form-data media-types. Requests that do not indicate
      # one of the media types present in this list will not be eligible
      # for form-data / param parsing.
      FORM_DATA_MEDIA_TYPES = [
        'application/x-www-form-urlencoded',
        'multipart/form-data'
      ]

      # The set of media-types. Requests that do not indicate
      # one of the media types present in this list will not be eligible
      # for param parsing like soap attachments or generic multiparts
      PARSEABLE_DATA_MEDIA_TYPES = [
        'multipart/related',
        'multipart/mixed'
      ]

      # Default ports depending on scheme. Used to decide whether or not
      # to include the port in a generated URI.
      DEFAULT_PORTS = { 'http' => 80, 'https' => 443, 'coffee' => 80 }

      # The address of the client which connected to the proxy.
      HTTP_X_FORWARDED_FOR = 'HTTP_X_FORWARDED_FOR'

      # The contents of the host/:authority header sent to the proxy.
      HTTP_X_FORWARDED_HOST = 'HTTP_X_FORWARDED_HOST'

      HTTP_FORWARDED          = 'HTTP_FORWARDED'

      # The value of the scheme sent to the proxy.
      HTTP_X_FORWARDED_SCHEME = 'HTTP_X_FORWARDED_SCHEME'

      # The protocol used to connect to the proxy.
      HTTP_X_FORWARDED_PROTO = 'HTTP_X_FORWARDED_PROTO'

      # The port used to connect to the proxy.
      HTTP_X_FORWARDED_PORT = 'HTTP_X_FORWARDED_PORT'

      # Another way for specifying https scheme was used.
      HTTP_X_FORWARDED_SSL = 'HTTP_X_FORWARDED_SSL'

      def body;            get_header(RACK_INPUT)                         end
      def script_name;     get_header(SCRIPT_NAME).to_s                   end
      def script_name=(s); set_header(SCRIPT_NAME, s.to_s)                end

      def path_info;       get_header(PATH_INFO).to_s                     end
      def path_info=(s);   set_header(PATH_INFO, s.to_s)                  end

      def request_method;  get_header(REQUEST_METHOD)                     end
      def query_string;    get_header(QUERY_STRING).to_s                  end
      def content_length;  get_header('CONTENT_LENGTH')                   end
      def logger;          get_header(RACK_LOGGER)                        end
      def user_agent;      get_header('HTTP_USER_AGENT')                  end

      # the referer of the client
      def referer;         get_header('HTTP_REFERER')                     end
      alias referrer referer

      def session
        fetch_header(RACK_SESSION) do |k|
          set_header RACK_SESSION, default_session
        end
      end

      def session_options
        fetch_header(RACK_SESSION_OPTIONS) do |k|
          set_header RACK_SESSION_OPTIONS, {}
        end
      end

      # Checks the HTTP request method (or verb) to see if it was of type DELETE
      def delete?;  request_method == DELETE  end

      # Checks the HTTP request method (or verb) to see if it was of type GET
      def get?;     request_method == GET     end

      # Checks the HTTP request method (or verb) to see if it was of type HEAD
      def head?;    request_method == HEAD    end

      # Checks the HTTP request method (or verb) to see if it was of type OPTIONS
      def options?; request_method == OPTIONS end

      # Checks the HTTP request method (or verb) to see if it was of type LINK
      def link?;    request_method == LINK    end

      # Checks the HTTP request method (or verb) to see if it was of type PATCH
      def patch?;   request_method == PATCH   end

      # Checks the HTTP request method (or verb) to see if it was of type POST
      def post?;    request_method == POST    end

      # Checks the HTTP request method (or verb) to see if it was of type PUT
      def put?;     request_method == PUT     end

      # Checks the HTTP request method (or verb) to see if it was of type TRACE
      def trace?;   request_method == TRACE   end

      # Checks the HTTP request method (or verb) to see if it was of type UNLINK
      def unlink?;  request_method == UNLINK  end

      def scheme
        if get_header(HTTPS) == 'on'
          'https'
        elsif get_header(HTTP_X_FORWARDED_SSL) == 'on'
          'https'
        elsif forwarded_scheme
          forwarded_scheme
        else
          get_header(RACK_URL_SCHEME)
        end
      end

      # The authority of the incoming request as defined by RFC3976.
      # https://tools.ietf.org/html/rfc3986#section-3.2
      #
      # In HTTP/1, this is the `host` header.
      # In HTTP/2, this is the `:authority` pseudo-header.
      def authority
        forwarded_authority || host_authority || server_authority
      end

      # The authority as defined by the `SERVER_NAME` and `SERVER_PORT`
      # variables.
      def server_authority
        host = self.server_name
        port = self.server_port

        if host
          if port
            "#{host}:#{port}"
          else
            host
          end
        end
      end

      def server_name
        get_header(SERVER_NAME)
      end

      def server_port
        get_header(SERVER_PORT)
      end

      def cookies
        hash = fetch_header(RACK_REQUEST_COOKIE_HASH) do |key|
          set_header(key, {})
        end

        string = get_header(HTTP_COOKIE)

        unless string == get_header(RACK_REQUEST_COOKIE_STRING)
          hash.replace Utils.parse_cookies_header(string)
          set_header(RACK_REQUEST_COOKIE_STRING, string)
        end

        hash
      end

      def content_type
        content_type = get_header('CONTENT_TYPE')
        content_type.nil? || content_type.empty? ? nil : content_type
      end

      def xhr?
        get_header("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest"
      end

      # The `HTTP_HOST` header.
      def host_authority
        get_header(HTTP_HOST)
      end

      def host_with_port(authority = self.authority)
        host, _, port = split_authority(authority)

        if port == DEFAULT_PORTS[self.scheme]
          host
        else
          authority
        end
      end

      # Returns a formatted host, suitable for being used in a URI.
      def host
        split_authority(self.authority)[0]
      end

      # Returns an address suitable for being to resolve to an address.
      # In the case of a domain name or IPv4 address, the result is the same
      # as +host+. In the case of IPv6 or future address formats, the square
      # brackets are removed.
      def hostname
        split_authority(self.authority)[1]
      end

      def port
        if authority = self.authority
          _, _, port = split_authority(authority)
        end

        port || forwarded_port&.last || DEFAULT_PORTS[scheme] || server_port
      end

      def forwarded_for
        forwarded_priority.each do |type|
          case type
          when :forwarded
            if forwarded_for = get_http_forwarded(:for)
              return(forwarded_for.map! do |authority|
                split_authority(authority)[1]
              end)
            end
          when :x_forwarded
            if value = get_header(HTTP_X_FORWARDED_FOR)
              return(split_header(value).map do |authority|
                split_authority(wrap_ipv6(authority))[1]
              end)
            end
          end
        end

        nil
      end

      def forwarded_port
        forwarded_priority.each do |type|
          case type
          when :forwarded
            if forwarded = get_http_forwarded(:for)
              return(forwarded.map do |authority|
                split_authority(authority)[2]
              end.compact)
            end
          when :x_forwarded
            if value = get_header(HTTP_X_FORWARDED_PORT)
              return split_header(value).map(&:to_i)
            end
          end
        end

        nil
      end

      def forwarded_authority
        forwarded_priority.each do |type|
          case type
          when :forwarded
            if forwarded = get_http_forwarded(:host)
              return forwarded.last
            end
          when :x_forwarded
            if value = get_header(HTTP_X_FORWARDED_HOST)
              return wrap_ipv6(split_header(value).last)
            end
          end
        end

        nil
      end

      def ssl?
        scheme == 'https' || scheme == 'wss'
      end

      def ip
        remote_addresses = split_header(get_header('REMOTE_ADDR'))
        external_addresses = reject_trusted_ip_addresses(remote_addresses)

        unless external_addresses.empty?
          return external_addresses.last
        end

        if (forwarded_for = self.forwarded_for) && !forwarded_for.empty?
          # The forwarded for addresses are ordered: client, proxy1, proxy2.
          # So we reject all the trusted addresses (proxy*) and return the
          # last client. Or if we trust everyone, we just return the first
          # address.
          return reject_trusted_ip_addresses(forwarded_for).last || forwarded_for.first
        end

        # If all the addresses are trusted, and we aren't forwarded, just return
        # the first remote address, which represents the source of the request.
        remote_addresses.first
      end

      # The media type (type/subtype) portion of the CONTENT_TYPE header
      # without any media type parameters. e.g., when CONTENT_TYPE is
      # "text/plain;charset=utf-8", the media-type is "text/plain".
      #
      # For more information on the use of media types in HTTP, see:
      # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
      def media_type
        MediaType.type(content_type)
      end

      # The media type parameters provided in CONTENT_TYPE as a Hash, or
      # an empty Hash if no CONTENT_TYPE or media-type parameters were
      # provided.  e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8",
      # this method responds with the following Hash:
      #   { 'charset' => 'utf-8' }
      def media_type_params
        MediaType.params(content_type)
      end

      # The character set of the request body if a "charset" media type
      # parameter was given, or nil if no "charset" was specified. Note
      # that, per RFC2616, text/* media types that specify no explicit
      # charset are to be considered ISO-8859-1.
      def content_charset
        media_type_params['charset']
      end

      # Determine whether the request body contains form-data by checking
      # the request content-type for one of the media-types:
      # "application/x-www-form-urlencoded" or "multipart/form-data". The
      # list of form-data media types can be modified through the
      # +FORM_DATA_MEDIA_TYPES+ array.
      #
      # A request body is also assumed to contain form-data when gems/gems/rack-3.0.8/lib/rack/deflater.rb000064400000013006150403134060013613 0ustar00received in the request body.
      #
      # This method support both application/x-www-form-urlencoded and
      # multipart/form-data.
      def POST
        if error = get_header(RACK_REQUEST_FORM_ERROR)
          raise error.class, error.message, cause: error.cause
        end

        begin
          rack_input = get_header(RACK_INPUT)

          # If the form hash was already memoized:
          if form_hash = get_header(RACK_REQUEST_FORM_HASH)
            # And it was memoized from the same input:
            if get_header(RACK_REQUEST_FORM_INPUT).equal?(rack_input)
              return form_hash
            end
          end

          # Otherwise, figure out how to parse the input:
          if rack_input.nil?
            set_header RACK_REQUEST_FORM_INPUT, nil
            set_header(RACK_REQUEST_FORM_HASH, {})
          elsif form_data? || parseable_data?
            unless set_header(RACK_REQUEST_FORM_HASH, parse_multipart)
              form_vars = get_header(RACK_INPUT).read

              # Fix for Safari Ajax postings that always append \0
              # form_vars.sub!(/\0\z/, '') # performance replacement:
              form_vars.slice!(-1) if form_vars.end_with?("\0")

              set_header RACK_REQUEST_FORM_VARS, form_vars
              set_header RACK_REQUEST_FORM_HASH, parse_query(form_vars, '&')
            end

            set_header RACK_REQUEST_FORM_INPUT, get_header(RACK_INPUT)
            get_header RACK_REQUEST_FORM_HASH
          else
            set_header RACK_REQUEST_FORM_INPUT, get_header(RACK_INPUT)
            set_header(RACK_REQUEST_FORM_HASH, {})
          end
        rescue => error
          set_header(RACK_REQUEST_FORM_ERROR, error)
          raise
        end
      end

      # The union of GET and POST data.
      #
      # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params.
      def params
        self.GET.merge(self.POST)
      end

      # Destructively update a parameter, whether it's in GET and/or POST. Returns nil.
      #
      # The parameter is updated wherever it was previous defined, so GET, POST, or both. If it wasn't previously defined, it's inserted into GET.
      #
      # <tt>env['rack.input']</tt> is not touched.
      def update_param(k, v)
        found = false
        if self.GET.has_key?(k)
          found = true
          self.GET[k] = v
        end
        if self.POST.has_key?(k)
          found = true
          self.POST[k] = v
        end
        unless found
          self.GET[k] = v
        end
      end

      # Destructively delete a parameter, whether it's in GET or POST. Returns the value of the deleted parameter.
      #
      # If the parameter is in both GET and POST, the POST value takes precedence since that's how #params works.
      #
      # <tt>env['rack.input']</tt> is not touched.
      def delete_param(k)
        post_value, get_value = self.POST.delete(k), self.GET.delete(k)
        post_value || get_value
      end

      def base_url
        "#{scheme}://#{host_with_port}"
      end

      # Tries to return a remake of the original request URL as a string.
      def url
        base_url + fullpath
      end

      def path
        script_name + path_info
      end

      def fullpath
        query_string.empty? ? path : "#{path}?#{query_string}"
      end

      def accept_encoding
        parse_http_accept_header(get_header("HTTP_ACCEPT_ENCODING"))
      end

      def accept_language
        parse_http_accept_header(get_header("HTTP_ACCEPT_LANGUAGE"))
      end

      def trusted_proxy?(ip)
        Rack::Request.ip_filter.call(ip)
      end

      # shortcut for <tt>request.params[key]</tt>
      def [](key)
        warn("Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead", uplevel: 1)

        params[key.to_s]
      end

      # shortcut for <tt>request.params[key] = value</tt>
      #
      # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params.
      def []=(key, value)
        warn("Request#[]= is deprecated and will be removed in a future version of Rack. Please use request.params[]= instead", uplevel: 1)

        params[key.to_s] = value
      end

      # like Hash#values_at
      def values_at(*keys)
        keys.map { |key| params[key] }
      end

      private

      def default_session; {}; end

      # Assist with compatibility when processing `X-Forwarded-For`.
      def wrap_ipv6(host)
        # Even thought IPv6 addresses should be wrapped in square brackets,
        # sometimes this is not done in various legacy/underspecified headers.
        # So we try to fix this situation for compatibility reasons.

        # Try to detect IPv6 addresses which aren't escaped yet:
        if !host.start_with?('[') && host.count(':') > 1
          "[#{host}]"
        else
          host
        end
      end

      def parse_http_accept_header(header)
        header.to_s.split(",").each(&:strip!).map do |part|
          attribute, parameters = part.split(";", 2).each(&:strip!)
          quality = 1.0
          if parameters and /\Aq=([\d.]+)/ =~ parameters
            quality = $1.to_f
          end
          [attribute, quality]
        end
      end

      # Get an array of values set in the RFC 7239 `Forwarded` request header.
      def get_http_forwarded(token)
        Utils.forwarded_values(get_header(HTTP_FORWARDED))&.[](token)
      end

      def query_parser
        Utils.default_query_parser
      end

   gems/gems/rack-3.0.8/lib/rack/runtime.rb000064400000001546150403134060013516 0ustar00       :(?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?
         )?
         :[0-9A-Fa-f]{1,4}%[-0-9A-Za-z._~]+/x)

      AUTHORITY = /
        \A
        (?<host>
          # Match IPv6 as a string of hex digits and colons in square brackets
          \[(?<address>#{ipv6})\]
          |
          # Match any other printable string (except square brackets) as a hostname
          (?<address>[[[:graph:]&&[^\[\]]]]*?)
        )
        (:(?<port>\d+))?
        \z
      /x

      private_constant :AUTHORITY

      def split_authority(authority)
        return [] if authority.nil?
        return [] unless match = AUTHORITY.match(authority)
        return match[:host], match[:address], match[:port]&.to_i
      end

      def reject_trusted_ip_addresses(ip_addresses)
        ip_addresses.reject { |ip| trusted_proxy?(ip) }
      end

      FORWARDED_SCHEME_HEADERS = {
gems/gems/rack-3.0.8/lib/rack/null_logger.rb000064400000002275150403134060014344 0ustar00f allowed_scheme(scheme)
                    return scheme
                  end
                end
              end
            end
          end
        end

        nil
      end

      def allowed_scheme(header)
        header if ALLOWED_SCHEMES.include?(header)
      end

      def forwarded_priority
        Request.forwarded_priority
      end

      def x_forwarded_proto_priority
        Request.x_forwarded_proto_priority
      end
    end

    include Env
    include Helpers
  end
end

# :nocov:
require_relative 'multipart' unless defined?(Rack::Multipart)
# :nocov:
gems/gems/rack-3.0.8/lib/rack/deflater.rb000064400000013006150403134060013613 0gems/gems/rack-3.0.8/lib/rack/show_status.rb000064400000007116150403134060014415 0ustar00ng is made when a cache
  # directive of 'no-transform' is present, when the response status
  # code is one that doesn't allow an entity body, or when the body
  # is empty.
  #
  # Note that despite the name, Deflater does not support the +deflate+
  # encoding.
  class Deflater
    # Creates Rack::Deflater middleware. Options:
    #
    # :if :: a lambda enabling / disabling deflation based on returned boolean value
    #        (e.g <tt>use Rack::Deflater, :if => lambda { |*, body| sum=0; body.each { |i| sum += i.length }; sum > 512 }</tt>).
    #        However, be aware that calling `body.each` inside the block will break cases where `body.each` is not idempotent,
    #        such as when it is an +IO+ instance.
    # :include :: a list of content types that should be compressed. By default, all content types are compressed.
    # :sync :: determines if the stream is going to be flushed after every chunk.  Flushing after every chunk reduces
    #          latency for time-sensitive streaming applications, but hurts compression and throughput.
    #          Defaults to +true+.
    def initialize(app, options = {})
      @app = app
      @condition = options[:if]
      @compressible_types = options[:include]
      @sync = options.fetch(:sync, true)
    end

    def call(env)
      status, headers, body = response = @app.call(env)

      unless should_deflate?(env, status, headers, body)
        return response
      end

      request = Request.new(env)

      encoding = Utils.select_best_encoding(%w(gzip identity),
                                            request.accept_encoding)

      # Set the Vary HTTP header.
      vary = headers["vary"].to_s.split(",").map(&:strip)
      unless vary.include?("*") || vary.any?{|v| v.downcase == 'accept-encoding'}
        headers["vary"] = vary.push("Accept-Encoding").join(",")
      end

      case encoding
      when "gzip"
        headers['content-encoding'] = "gzip"
        headers.delete(CONTENT_LENGTH)
        mtime = headers["last-modified"]
        mtime = Time.httpdate(mtime).to_i if mtime
        response[2] = GzipStream.new(body, mtime, @sync)
        response
      when "identity"
        response
      else # when nil
        # Only possible encoding values here are 'gzip', 'identity', and nil
        message = "An acceptable encoding for the requested resource #{request.fullpath} could not be found."
        bp = Rack::BodyProxy.new([message]) { body.close if body.respond_to?(:close) }
        [406, { CONTENT_TYPE => "text/plain", CONTENT_LENGTH => message.length.to_s }, bp]
      end
    end

    # Body class used for gzip encoded responses.
    class GzipStream

      BUFFER_LENGTH = 128 * 1_024

      # Initialize the gzip stream.  Arguments:
      # body :: Response body to compress with gzip
      # mtime :: The modification time of the body, used to set the
      #          modification time in the gzip header.
      # sync :: Whether to flush each gzip chunk as soon as it is ready.
      def initialize(body, mtime, sync)
        @body = body
        @mtime = mtime
        @sync = sync
      end

      # Yield gzip compressed strings to the given block.
      def each(&block)
        @writer = block
        gzip = ::Zlib::GzipWriter.new(self)
        gzip.mtime = @mtime if @mtime
        # @body.each is equivalent to @body.gets (slow)
        if @body.is_a? ::File # XXX: Should probably be ::IO
          while part = @body.read(BUFFER_LENGTH)
            gzip.write(part)
            gzip.flush if @sync
          end
        else
          @body.each { |part|
            # Skip empty strings, as they would result in no output,
  gems/gems/rack-3.0.8/lib/rack/utils.rb000064400000052143150403134060013172 0ustar00 given and does not include request's content type
      return false if @compressible_types && !(headers.has_key?(CONTENT_TYPE) && @compressible_types.include?(headers[CONTENT_TYPE][/[^;]*/]))

      # Skip if @condition lambda is given and evaluates to false
      return false if @condition && !@condition.call(env, status, headers, body)

      # No point in compressing empty body, also handles usage with
      # Rack::Sendfile.
      return false if headers[CONTENT_LENGTH] == '0'

      true
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/runtime.rb000064400000001546150403134060013516 0ustar00# frozen_string_literal: true

require_relative 'utils'

module Rack
  # Sets an "x-runtime" response header, indicating the response
  # time of the request, in seconds
  #
  # You can put it right before the application to see the processing
  # time, or before all the other middlewares to include time for them,
  # too.
  class Runtime
    FORMAT_STRING = "%0.6f" # :nodoc:
    HEADER_NAME = "x-runtime" # :nodoc:

    def initialize(app, name = nil)
      @app = app
      @header_name = HEADER_NAME
      @header_name += "-#{name.to_s.downcase}" if name
    end

    def call(env)
      start_time = Utils.clock_time
      _, headers, _ = response = @app.call(env)

      request_time = Utils.clock_time - start_time

      unless headers.key?(@header_name)
        headers[@header_name] = FORMAT_STRING % request_time
      end

      response
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/null_logger.rb000064400000002275150403134060014344 0ustar00# frozen_string_literal: true

require_relative 'constants'

module Rack
  class NullLogger
    def initialize(app)
      @app = app
    end

    def call(env)
      env[RACK_LOGGER] = self
      @app.call(env)
    end

    def info(progname = nil, &block); end
    def debug(progname = nil, &block); end
    def warn(progname = nil, &block); end
    def error(progname = nil, &block); end
    def fatal(progname = nil, &block); end
    def unknown(progname = nil, &block); end
    def info? ;  end
    def debug? ; end
    def warn? ;  end
    def error? ; end
    def fatal? ; end
    def debug! ; end
    def error! ; end
    def fatal! ; end
    def info! ; end
    def warn! ; end
    def level ; end
    def progname ; end
    def datetime_format ; end
    def formatter ; end
    def sev_threshold ; end
    def level=(level); end
    def progname=(progname); end
    def datetime_format=(datetime_format); end
    def formatter=(formatter); end
    def sev_threshold=(sev_threshold); end
    def close ; end
    def add(severity, message = nil, progname = nil, &block); end
    def log(severity, message = nil, progname = nil, &block); end
    def <<(msg); end
    def reopen(logdev = nil); end
  end
end
gems/gems/rack-3.0.8/lib/rack/show_status.rb000064400000007116150403134060014415 0ustar00# frozen_string_literal: true

require 'erb'

require_relative 'constants'
require_relative 'utils'
require_relative 'request'
require_relative 'body_proxy'

module Rack
  # Rack::ShowStatus catches all empty responses and replaces them
  # with a site explaining the error.
  #
  # Additional details can be put into <tt>rack.showstatus.detail</tt>
  # and will be shown as HTML.  If such details exist, the error page
  # is always rendered, even if the reply was not empty.

  class ShowStatus
    def initialize(app)
      @app = app
      @template = ERB.new(TEMPLATE)
    end

    def call(env)
      status, headers, body = response = @app.call(env)
      empty = headers[CONTENT_LENGTH].to_i <= 0

      # client or server error, or explicit message
      if (status.to_i >= 400 && empty) || env[RACK_SHOWSTATUS_DETAIL]
        # This double assignment is to prevent an "unused variable" warning.
        # Yes, it is dumb, but I don't like Ruby yelling at me.
        req = req = Rack::Request.new(env)

        message = Rack::Utils::HTTP_STATUS_CODES[status.to_i] || status.to_s

        # This double assignment is to prevent an "unused variable" warning.
        # Yes, it is dumb, but I don't like Ruby yelling at me.
        detail = detail = env[RACK_SHOWSTATUS_DETAIL] || message

        html = @template.result(binding)
        size = html.bytesize

        response[2] = Rack::BodyProxy.new([html]) do
          body.close if body.respond_to?(:close)
        end

        headers[CONTENT_TYPE] = "text/html"
        headers[CONTENT_LENGTH] = size.to_s
      end

      response
    end

    def h(obj)                  # :nodoc:
      case obj
      when String
        Utils.escape_html(obj)
      else
        Utils.escape_html(obj.inspect)
      end
    end

    # :stopdoc:

# adapted from Django <www.djangoproject.com>
# Copyright (c) Django Software Foundation and individual contributors.
# Used under the modified BSD license:
# http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5
TEMPLATE = <<'HTML'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title><%=h message %> at <%=h req.script_name + req.path_info %></title>
  <meta name="robots" content="NONE,NOARCHIVE" />
  <style type="text/css">
    html * { padding:0; margin:0; }
    body * { padding:10px 20px; }
    body * * { padding:0; }
    body { font:small sans-serif; background:#eee; }
    body>div { border-bottom:1px solid #ddd; }
    h1 { font-weight:normal; margin-bottom:.4em; }
    h1 span { font-size:60%; color:#666; font-weight:normal; }
    table { border:none; border-collapse: collapse; width:100%; }
    td, th { vertical-align:top; padding:2px 3px; }
    th { width:12em; text-align:right; color:#666; padding-right:.5em; }
    #info { background:#f6f6f6; }
    #info ol { margin: 0.5em 4em; }
    #info ol li { font-family: monospace; }
    #summary { background: #ffc; }
    #explanation { background:#eee; border-bottom: 0px none; }
  </style>
</head>
<body>
  <div id="summary">
    <h1><%=h message %> <span>(<%= status.to_i %>)</span></h1>
    <table class="meta">
      <tr>
        <th>Request Method:</th>
        <td><%=h req.request_method %></td>
      </tr>
      <tr>
        <th>Request URL:</th>
      <td><%=h req.url %></td>
      </tr>
    </table>
  </div>
  <div id="info">
    <p><%=h detail %></p>
  </div>

  <div id="explanation">
    <p>
    You're seeing this error because you use <code>Rack::ShowStatus</code>.
    </p>
  </div>
</body>
</html>
HTML

    # :startdoc:
  end
end
gems/gems/rack-3.0.8/lib/rack/utils.rb000064400000052143150403134060013172 0ustar00# -*- encoding: binary -*-
# frozen_string_literal: true

require 'uri'
require 'fileutils'
require 'set'
require 'tempfile'
require 'time'

require_relative 'query_parser'
require_relative 'mime'
require_relative 'headers'
require_relative 'constants'

module Rack
  # Rack::Utils contains a grab-bag of useful methods for writing web
  # applications adopted from all kinds of Ruby libraries.

  module Utils
    ParameterTypeError = QueryParser::ParameterTypeError
    InvalidParameterError = QueryParser::InvalidParameterError
    ParamsTooDeepError = QueryParser::ParamsTooDeepError
    DEFAULT_SEP = QueryParser::DEFAULT_SEP
    COMMON_SEP = QueryParser::COMMON_SEP
    KeySpaceConstrainedParams = QueryParser::Params

    class << self
      attr_accessor :default_query_parser
    end
    # The default amount of nesting to allowed by hash parameters.
    # This helps prevent a rogue client from triggering a possible stack overflow
    # when parsing parameters.
    self.default_query_parser = QueryParser.make_default(32)

    module_function

    # URI escapes. (CGI style space to +)
    def escape(s)
      URI.encode_www_form_component(s)
    end

    # Like URI escaping, but with %20 instead of +. Strictly speaking this is
    # true URI escaping.
    def escape_path(s)
      ::URI::DEFAULT_PARSER.escape s
    end

    # Unescapes the **path** component of a URI.  See Rack::Utils.unescape for
    # unescaping query parameters or form components.
    def unescape_path(s)
      ::URI::DEFAULT_PARSER.unescape s
    end

    # Unescapes a URI escaped string with +encoding+. +encoding+ will be the
    # target encoding of the string returned, and it defaults to UTF-8
    def unescape(s, encoding = Encoding::UTF_8)
      URI.decode_www_form_component(s, encoding)
    end

    class << self
      attr_accessor :multipart_total_part_limit

      attr_accessor :multipart_file_limit

      # multipart_part_limit is the original name of multipart_file_limit, but
      # the limit only counts parts with filenames.
      alias multipart_part_limit multipart_file_limit
      alias multipart_part_limit= multipart_file_limit=
    end

    # The maximum number of file parts a request can contain. Accepting too
    # many parts can lead to the server running out of file handles.
    # Set to `0` for no limit.
    self.multipart_file_limit = (ENV['RACK_MULTIPART_PART_LIMIT'] || ENV['RACK_MULTIPART_FILE_LIMIT'] || 128).to_i

    # The maximum total number of parts a request can contain. Accepting too
    # many can lead to excessive memory use and parsing time.
    self.multipart_total_part_limit = (ENV['RACK_MULTIPART_TOTAL_PART_LIMIT'] || 4096).to_i

    def self.param_depth_limit
      default_query_parser.param_depth_limit
    end

    def self.param_depth_limit=(v)
      self.default_query_parser = self.default_query_parser.new_depth_limit(v)
    end

    def self.key_space_limit
      warn("`Rack::Utils.key_space_limit` is deprecated as this value no longer has an effect. It will be removed in Rack 3.1", uplevel: 1)
      65536
    end

    def self.key_space_limit=(v)
      warn("`Rack::Utils.key_space_limit=` is deprecated and no longer has an effect. It will be removed in Rack 3.1", uplevel: 1)
    end

    if defined?(Process::CLOCK_MONOTONIC)
      def clock_time
        Process.clock_gettime(Process::CLOCK_MONOTONIC)
      end
    else
      # :nocov:
      def clock_time
        Time.now.to_f
      end
      # :nocov:
    end

    def parse_query(qs, d = nil, &unescaper)
      Rack::Utils.default_query_parser.parse_query(qs, d, &unescaper)
    end

    def parse_nested_query(qs, d = nil)
      Rack::Utils.default_query_parser.parse_nested_query(qs, d)
    end

    def build_query(params)
      params.map { |k, v|
        if v.class == Array
          build_query(v.map { |x| [k, x] })
        else
          v.nil? ? escape(k) : "#{escape(k)}=#{escape(v)}"
        end
      }.join("&")
    end

    def build_nested_query(value, prefix = nil)
      case value
      when Array
        value.map { |v|
          build_nested_query(v, "#{prefix}[]")
        }.join("&")
      when Hash
        value.map { |k, v|
          build_nested_query(v, prefix ? "#{prefix}[#{k}]" : k)
        }.delete_if(&:empty?).join('&')
      when nil
        escape(prefix)
      else
        raise ArgumentError, "value must be a Hash" if prefix.nil?
        "#{escape(prefix)}=#{escape(value)}"
      end
    end

    def q_values(q_value_header)
      q_value_header.to_s.split(/\s*,\s*/).map do |part|
        value, parameters = part.split(/\s*;\s*/, 2)
        quality = 1.0
        if parameters && (md = /\Aq=([\d.]+)/.match(parameters))
          quality = md[1].to_f
        end
        [value, quality]
      end
    end

    def forwarded_values(forwarded_header)
      return nil unless forwarded_header
      forwarded_header = forwarded_header.to_s.gsub("\n", ";")

      forwarded_header.split(/\s*;\s*/).each_with_object({}) do |field, values|
        field.split(/\s*,\s*/).each do |pair|
          return nil unless pair =~ /\A\s*(by|for|host|proto)\s*=\s*"?([^"]+)"?\s*\Z/i
          (values[$1.downcase.to_sym] ||= []) << $2
        end
      end
    end
    module_function :forwarded_values

    # Return best accept value to use, based on the algorithm
    # in RFC 2616 Section 14.  If there are multiple best
    # matches (same specificity and quality), the value returned
    # is arbitrary.
    def best_q_match(q_value_header, available_mimes)
      values = q_values(q_value_header)

      matches = values.map do |req_mime, quality|
        match = available_mimes.find { |am| Rack::Mime.match?(am, req_mime) }
        next unless match
        [match, quality]
      end.compact.sort_by do |match, quality|
        (match.split('/', 2).count('*') * -10) + quality
      end.last
      matches&.first
    end

    ESCAPE_HTML = {
      "&" => "&amp;",
      "<" => "&lt;",
      ">" => "&gt;",
      "'" => "&#x27;",
      '"' => "&quot;",
      "/" => "&#x2F;"
    }

    ESCAPE_HTML_PATTERN = Regexp.union(*ESCAPE_HTML.keys)

    # Escape ampersands, brackets and quotes to their HTML/XML entities.
    def escape_html(string)
      string.to_s.gsub(ESCAPE_HTML_PATTERN){|c| ESCAPE_HTML[c] }
    end

    def select_best_encoding(available_encodings, accept_encoding)
      # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

      expanded_accept_encoding = []

      accept_encoding.each do |m, q|
        preference = available_encodings.index(m) || available_encodings.size

        if m == "*"
          (available_encodings - accept_encoding.map(&:first)).each do |m2|
            expanded_accept_encoding << [m2, q, preference]
          end
        else
          expanded_accept_encoding << [m, q, preference]
        end
      end

      encoding_candidates = expanded_accept_encoding
        .sort_by { |_, q, p| [-q, p] }
        .map!(&:first)

      unless encoding_candidates.include?("identity")
        encoding_candidates.push("identity")
      end

      expanded_accept_encoding.each do |m, q|
        encoding_candidates.delete(m) if q == 0.0
      end

      (encoding_candidates & available_encodings)[0]
    end

    # :call-seq:
    #   parse_cookies_header(value) -> hash
    #
    # Parse cookies from the provided header +value+ according to RFC6265. The
    # syntax for cookie headers only supports semicolons. Returns a map of
    # cookie +key+ to cookie +value+.
    #
    #   parse_cookies_header('myname=myvalue; max-age=0')
    #   # => {"myname"=>"myvalue", "max-age"=>"0"}
    #
    def parse_cookies_header(value)
      return {} unless value

      value.split(/; */n).each_with_object({}) do |cookie, cookies|
        next if cookie.empty?
        key, value = cookie.split('=', 2)
        cookies[key] = (unescape(value) rescue value) unless cookies.key?(key)
      end
    end

    def add_cookie_to_header(header, key, value)
      warn("add_cookie_to_header is deprecated and will be removed in Rack 3.1", uplevel: 1)

      case header
      when nil, ''
        return set_cookie_header(key, value)
      when String
        [header, set_cookie_header(key, value)]
      when Array
        header + [set_cookie_header(key, value)]
      else
        raise ArgumentError, "Unrecognized cookie header value. Expected String, Array, or nil, got #{header.inspect}"
      end
    end

    # :call-seq:
    #   parse_cookies(env) -> hash
    #
    # Parse cookies from the provided request environment using
    # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+.
    #
    #   parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'})
    #   # => {'myname' => 'myvalue'}
    #
    def parse_cookies(env)
      parse_cookies_header env[HTTP_COOKIE]
    end

    # :call-seq:
    #   set_cookie_header(key, value) -> encoded string
    #
    # Generate an encoded string using the provided +key+ and +value+ suitable
    # for the +set-cookie+ header according to RFC6265. The +value+ may be an
    # instance of either +String+ or +Hash+.
    #
    # If the cookie +value+ is an instance of +Hash+, it considers the following
    # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance
    # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more
    # details about the interpretation of these fields, consult
    # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2).
    #
    # An extra cookie attribute +escape_key+ can be provided to control whether
    # or not the cookie key is URL encoded. If explicitly set to +false+, the
    # cookie key name will not be url encoded (escaped). The default is +true+.
    #
    #   set_cookie_header("myname", "myvalue")
    #   # => "myname=myvalue"
    #
    #   set_cookie_header("myname", {value: "myvalue", max_age: 10})
    #   # => "myname=myvalue; max-age=10"
    #
    def set_cookie_header(key, value)
      case value
      when Hash
        key = escape(key) unless value[:escape_key] == false
        domain  = "; domain=#{value[:domain]}"   if value[:domain]
        path    = "; path=#{value[:path]}"       if value[:path]
        max_age = "; max-age=#{value[:max_age]}" if value[:max_age]
        expires = "; expires=#{value[:expires].httpdate}" if value[:expires]
        secure = "; secure"  if value[:secure]
        httponly = "; httponly" if (value.key?(:httponly) ? value[:httponly] : value[:http_only])
        same_site =
          case value[:same_site]
          when false, nil
            nil
          when :none, 'None', :None
            '; SameSite=None'
          when :lax, 'Lax', :Lax
            '; SameSite=Lax'
          when true, :strict, 'Strict', :Strict
            '; SameSite=Strict'
          else
            raise ArgumentError, "Invalid SameSite value: #{value[:same_site].inspect}"
          end
        value = value[:value]
      else
        key = escape(key)
      end

      value = [value] unless Array === value

      return "#{key}=#{value.map { |v| escape v }.join('&')}#{domain}" \
        "#{path}#{max_age}#{expires}#{secure}#{httponly}#{same_site}"
    end

    # :call-seq:
    #   set_cookie_header!(headers, key, value) -> header value
    #
    # Append a cookie in the specified headers with the given cookie +key+ and
    # +value+ using set_cookie_header.
    #
    # If the headers already contains a +set-cookie+ key, it will be converted
    # to an +Array+ if not already, and appended to.
    def set_cookie_header!(headers, key, value)
      if header = headers[SET_COOKIE]
        if header.is_a?(Array)
          header << set_cookie_header(key, value)
        else
          headers[SET_COOKIE] = [header, set_cookie_header(key, value)]
        end
      else
        headers[SET_COOKIE] = set_cookie_header(key, value)
      end
    end

    # :cagems/gems/rack-3.0.8/lib/rack/head.rb000064400000001014150403134060012722 0ustar00ke_delete_cookie_header is deprecated and will be removed in Rack 3.1, use delete_set_cookie_header! instead", uplevel: 1)

      delete_set_cookie_header!(header, key, value)
    end

    def delete_cookie_header!(headers, key, value = {})
      headers[SET_COOKIE] = delete_set_cookie_header!(headers[SET_COOKIE], key, value)

      return nil
    end

    def add_remove_cookie_to_header(header, key, value = {})
      warn("add_remove_cookie_to_header is deprecated and will be removed in Rack 3.1, use delete_set_cookiegems/gems/rack-3.0.8/lib/rack/mock_request.rb000064400000012573150403134060014536 0ustar00     else
        header = delete_set_cookie_header(key, value)
      end

      return header
    end

    def rfc2822(time)
      time.rfc2822
    end

    # Parses the "Range:" header, if present, into an array of Range objects.
    # Returns nil if the header is missing or syntactically invalid.
    # Returns an empty array if none of the ranges are satisfiable.
    def byte_ranges(env, size)
      get_byte_ranges env['HTTP_RANGE'], size
    end

    def get_byte_ranges(http_range, size)
      # See <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35>
      return nil unless http_range && http_range =~ /bytes=([^;]+)/
      ranges = []
      $1.split(/,\s*/).each do |range_spec|
        return nil unless range_spec.include?('-')
        range = range_spec.split('-')
        r0, r1 = range[0], range[1]
        if r0.nil? || r0.empty?
          return nil if r1.nil?
          # suffix-byte-range-spec, represents trailing suffix of file
          r0 = size - r1.to_i
          r0 = 0  if r0 < 0
          r1 = size - 1
        else
          r0 = r0.to_i
          if r1.nil?
            r1 = size - 1
          else
            r1 = r1.to_i
            return nil  if r1 < r0  # backwards range is syntactically invalid
            r1 = size - 1  if r1 >= size
          end
        end
        ranges << (r0..r1)  if r0 <= r1
      end
      ranges
    end

    # :nocov:
    if defined?(OpenSSL.fixed_length_secure_compare)
      # Constant time string comparison.
      #
      # NOTE: the values compared should be of fixed length, such as strings
      # that have already been processed by HMAC. This should not be used
      # on variable length plaintext strings because it could leak length info
      # via timing attacks.
      def secure_compare(a, b)
        return false unless a.bytesize == b.bytesize

        OpenSSL.fixed_length_secure_compare(a, b)
      end
    # :nocov:
    else
      def secure_compare(a, b)
        return false unless a.bytesize == b.bytesize

        l = a.unpack("C*")

        r, i = 0, -1
        b.each_byte { |v| r |= v ^ l[i += 1] }
        r == 0
      end
    end

    # Context allows the use of a compatible middleware at different points
    # in a request handling stack. A compatible middleware must define
    # #context which should take the arguments env and app. The first of which
    # would be the request environment. The second of which would be the rack
    # application that the request would be forwarded to.
    class Context
      attr_reader :for, :app

      def initialize(app_f, app_r)
        raise 'running context does not respond to #context' unless app_f.respond_to? :context
        @for, @app = app_f, app_r
      end

      def call(env)
        @for.context(env, @app)
      end

      def recontext(app)
        self.class.new(@for, app)
      end

      def context(env, app = @app)
        recontext(app).call(env)
      end
    end

    # A wrapper around Headers
    # header when set.
    #
    # @api private
    class HeaderHash < Hash # :nodoc:
      def self.[](headers)
        warn "Rack::Utils::HeaderHash is deprecated and will be removed in Rack 3.1, switch to Rack::Headers", uplevel: 1
        if headers.is_a?(Headers) && !headers.frozen?
          return headers
        end

        new_headers = Headers.new
        headers.each{|k,v| new_headers[k] = v}
        new_headers
      end

      def self.new(hash = {})
        warn "Rack::Utils::HeaderHash is deprecated and will be removed in Rack 3.1, switch to Rack::Headers", uplevel: 1
        headers = Headers.new
        hash.each{|k,v| headers[k] = v}
        headers
      end

      def self.allocate
        raise TypeError, "cannot allocate HeaderHash"
      end
    end

    # Every standard HTTP code mapped to the appropriate message.
    # Generated with:
    #   curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \
    #     ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \
    #               puts "#{m[1]} => \x27#{m[2].strip}\x27,"'
    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',
      306 => '(Unused)',
      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',
   gems/gems/rack-3.0.8/lib/rack/directory.rb000064400000014030150403134060014027 0ustar00Required'
    }

    # Responses with HTTP status codes that should not have an entity body
    STATUS_WITH_NO_ENTITY_BODY = Hash[((100..199).to_a << 204 << 304).product([true])]

    SYMBOL_TO_STATUS_CODE = Hash[*HTTP_STATUS_CODES.map { |code, message|
      [message.downcase.gsub(/\s|-|'/, '_').to_sym, code]
    }.flatten]

    def status_code(status)
      if status.is_a?(Symbol)
        SYMBOL_TO_STATUS_CODE.fetch(status) { raise ArgumentError, "Unrecognized status code #{status.inspect}" }
      else
        status.to_i
      end
    end

    PATH_SEPS = Regexp.union(*[::File::SEPARATOR, ::File::ALT_SEPARATOR].compact)

    def clean_path_info(path_info)
      parts = path_info.split PATH_SEPS

      clean = []

      parts.each do |part|
        next if part.empty? || part == '.'
        part == '..' ? clean.pop : clean << part
      end

      clean_path = clean.join(::File::SEPARATOR)
      clean_path.prepend("/") if parts.empty? || parts.first.empty?
      clean_path
    end

    NULL_BYTE = "\0"

    def valid_path?(path)
      path.valid_encoding? && !path.include?(NULL_BYTE)
    end

  end
end
gems/gems/rack-3.0.8/lib/rack/head.rb000064400000001014150403134060012722 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'body_proxy'

module Rack
  # Rack::Head returns an empty body for all HEAD requests. It leaves
  # all other requests unchanged.
  class Head
    def initialize(app)
      @app = app
    end

    def call(env)
      _, _, body = response = @app.call(env)

      if env[REQUEST_METHOD] == HEAD
        response[2] = Rack::BodyProxy.new([]) do
          body.close if body.respond_to? :close
        end
      end

      response
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/mock_request.rb000064400000012573150403134060014536 0ustar00# frozen_string_literal: true

require 'uri'
require 'stringio'

require_relative 'constants'
require_relative 'mock_response'

module Rack
  # Rack::MockRequest helps testing your Rack application without
  # actually using HTTP.
  #
  # After performing a request on a URL with get/post/put/patch/delete, it
  # returns a MockResponse with useful helper methods for effective
  # testing.
  #
  # You can pass a hash with additional configuration to the
  # get/post/put/patch/delete.
  # <tt>:input</tt>:: A String or IO-like to be used as rack.input.
  # <tt>:fatal</tt>:: Raise a FatalWarning if the app writes to rack.errors.
  # <tt>:lint</tt>:: If true, wrap the application in a Rack::Lint.

  class MockRequest
    class FatalWarning < RuntimeError
    end

    class FatalWarner
      def puts(warning)
        raise FatalWarning, warning
      end

      def write(warning)
        raise FatalWarning, warning
      end

      def flush
      end

      def string
        ""
      end
    end

    DEFAULT_ENV = {
      RACK_INPUT        => StringIO.new,
      RACK_ERRORS       => StringIO.new,
    }.freeze

    def initialize(app)
      @app = app
    end

    # Make a GET request and return a MockResponse. See #request.
    def get(uri, opts = {})     request(GET, uri, opts)     end
    # Make a POST request and return a MockResponse. See #request.
    def post(uri, opts = {})    request(POST, uri, opts)    end
    # Make a PUT request and return a MockResponse. See #request.
    def put(uri, opts = {})     request(PUT, uri, opts)     end
    # Make a PATCH request and return a MockResponse. See #request.
    def patch(uri, opts = {})   request(PATCH, uri, opts)   end
    # Make a DELETE request and return a MockResponse. See #request.
    def delete(uri, opts = {})  request(DELETE, uri, opts)  end
    # Make a HEAD request and return a MockResponse. See #request.
    def head(uri, opts = {})    request(HEAD, uri, opts)    end
    # Make an OPTIONS request and return a MockResponse. See #request.
    def options(uri, opts = {}) request(OPTIONS, uri, opts) end

    # Make a request using the given request method for the given
    # uri to the rack application and return a MockResponse.
    # Options given are passed to MockRequest.env_for.
    def request(method = GET, uri = "", opts = {})
      env = self.class.env_for(uri, opts.merge(method: method))

      if opts[:lint]
        app = Rack::Lint.new(@app)
      else
        app = @app
      end

      errors = env[RACK_ERRORS]
      status, headers, body = app.call(env)
      MockResponsgems/gems/rack-3.0.8/lib/rack/reloader.rb000064400000006027150403134060013627 0ustar00  env[SERVER_NAME]     = (uri.host || "example.org").b
      env[SERVER_PORT]     = (uri.port ? uri.port.to_s : "80").b
      env[SERVER_PROTOCOL] = opts[:http_version] || 'HTTP/1.1'
      env[QUERY_STRING]    = (uri.query.to_s).b
      env[PATH_INFO]       = (uri.path).b
      env[RACK_URL_SCHEME] = (uri.scheme || "http").b
      env[HTTPS]           = (env[RACK_URL_SCHEME] == "https" ? "on" : "off").b

      env[SCRIPT_NAME] = opts[:script_name] || ""

      if opts[:fatal]
        env[RACK_ERRORS] = FatalWarner.new
      else
        env[RACK_ERRORS] = StringIO.new
      end

      if params = opts[:params]
        if env[REQUEST_METHOD] == GET
          params = Utils.parse_nested_query(params) if params.is_a?(String)
          params.update(Utils.parse_nested_query(env[QUERY_STRING]))
          env[QUERY_STRING] = Utils.build_nested_query(params)
        elsif !opts.has_key?(:input)
          opts["CONTENT_TYPE"] = "application/x-www-form-urlencoded"
          if params.is_a?(Hash)
            if data = Rack::Multipart.build_multipart(params)
              opts[:input] = data
              opts["CONTENT_LENGTH"] ||= data.length.to_s
              opts["CONTENT_TYPE"] = "multipart/form-data; boundary=#{Rack::Multipart::MULTIPART_BOUNDARY}"
            else
              opts[:input] = Utils.build_nested_query(params)
            end
          else
            opts[:input] = params
          end
        end
      end

      opts[:input] ||= String.new
      if String === opts[:input]
        rack_input = StringIO.new(opts[:input])
      else
        rack_input = opts[:input]
      end

      rack_input.set_encoding(Encoding::BINARY)
      env[RACK_INPUT] = rack_input

      env["CONTENT_LENGTH"] ||= env[RACK_INPUT].size.to_s if env[RACK_INPUT].respond_to?(:size)

      opts.each { |field, value|
        env[field] = value  if String === field
      }

      env
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/directory.rb000064400000014030150403134060014027 0ustar00# frozen_string_literal: true

require 'time'

require_relative 'constants'
require_relative 'utils'
require_relative 'head'
require_relative 'mime'
require_relative 'files'

module Rack
  # Rack::Directory serves entries below the +root+ given, according to the
  # path info of the Rack request. If a directory is found, the file's contents
  # will be presented in an html based index. If a file is found, the env will
  # be passed to the specified +app+.
  #
  # If +app+ is not specified, a Rack::Files of the same +root+ will begems/gems/rack-3.0.8/lib/rack/etag.rb000064400000003567150403134060012760 0ustar00html(path.sub(/^#{root}/, ''))
        yield(DIR_PAGE_HEADER % [ show_path, show_path ])

        unless path.chomp('/') == root
          yield(DIR_FILE % DIR_FILE_escape(files.call('..')))
        end

        Dir.foreach(path) do |basename|
          next if basename.start_with?('.')
          next unless f = files.call(basename)
          yield(DIR_FILE % DIR_FILE_escape(f))
        end

        yield(DIR_PAGE_FOOTER)
      end

      private

      # Escape each element in the array of html strings.
      def DIR_FILE_escape(htmls)
        htmls.map { |e| Utils.escape_html(e) }
      end
    end

    # The root of the directory hierarchy.  Only requests for files and
    # directories inside of the root directory are supported.
    attr_reader :root

    # Set the root directory and application for serving files.
    def initialize(root, app = nil)
      @root = ::File.expand_path(root)
      @app = app || Files.new(@root)
      @head = Head.new(method(:get))
    end

    def call(env)
      # strip body if this is a HEAD call
      @head.call env
    end

    # Internals of request handling.  Similar to call but does
    # not remove body for HEAD requests.
    def get(env)
      script_name = env[SCRIPT_NAME]
      path_info = Utils.unescape_path(env[PATH_INFO])

      if client_error_response = check_bad_request(path_info) || check_forbidden(path_info)
        client_error_response
      else
        path = ::File.join(@root, path_info)
        list_path(env, path, path_info, script_name)
      end
    end

    # Rack response to use for requests with invalid paths, or nil if path is valid.
    def check_bad_request(path_info)
      return if Utils.valid_path?(path_info)

      body = "Bad Request\n"
      [400, { CONTENT_TYPE => "text/plain",
        CONTENT_LENGTH => body.bytesize.to_s,
        "x-cascade" => "pass" }, [body]]
    end

    # Rack response to use for regems/gems/rack-3.0.8/lib/rack/static.rb000064400000013777150403134060013333 0ustar00ing not safe as path could contain glob metacharacters
      body = DirectoryBody.new(@root, path, ->(basename) do
        stat = stat(::File.join(path, basename))
        next unless stat

        url = ::File.join(*url_head + [Utils.escape_path(basename)])
        mtime = stat.mtime.httpdate
        if stat.directory?
          type = 'directory'
          size = '-'
          url << '/'
          if basename == '..'
            basename = 'Parent Directory'
          else
            basename << '/'
          end
        else
          type = Mime.mime_type(::File.extname(basename))
          size = filesize_format(stat.size)
        end

        [ url, basename, size, type, mtime ]
      end)

      [ 200, { CONTENT_TYPE => 'text/html; charset=utf-8' }, body ]
    end

    # File::Stat for the given path, but return nil for missing/bad entries.
    def stat(path)
      ::File.stat(path)
    rescue Errno::ENOENT, Errno::ELOOP
      return nil
    end

    # Rack response to use for files and directories under the root.
    # Unreadable and non-file, non-directory entries will get a 404 response.
    def list_path(env, path, path_info, script_name)
      if (stat = stat(path)) && stat.readable?
        return @app.call(env) if stat.file?
        return list_directory(path_info, path, script_name) if stat.directory?
      end

      entity_not_found(path_info)
    end

    # Rack response to use for unreadable and non-file, non-directory entries.
    def entity_not_found(path_info)
      body = "Entity not found: #{path_info}\n"
      [404, { CONTENT_TYPE => "text/plain",
        CONTENT_LENGTH => body.bytesize.to_s,
        "x-cascade" => "pass" }, [body]]
    end

    # Stolen from Ramaze
    FILESIZE_FORMAT = [
      ['%.1fT', 1 << 40],
      ['%.1fG', 1 << 30],
      ['%.1fM', 1 << 20],
      ['%.1fK', 1 << 10],
    ]

    # Provide human readable file sizes
    def filesize_format(int)
      FILESIZE_FORMAT.each do |format, size|
        return format % (int.to_f / size) if int >= size
      end

      "#{int}B"
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/reloader.rb000064400000006027150403134060013627 0ustar00# frozen_string_literal: true

# Copyright (C) 2009-2018 Michael Fellinger <m.fellinger@gmail.com>
# Rack::Reloader is subject to the terms of an MIT-style license.
# See MIT-LICENSE or https://opensource.org/licenses/MIT.

require 'pathname'

module Rack

  # High performant source reloader
  #
  # This class acts as Rack middleware.
  #
  # What makes it especially suited for use in a production environment is that
  # any file will only be checked once and there will only be made one system
  # call stat(2).
  #
  # Please note that this will not reload files in the background, it does so
  # only when actively called.
  #
  # It is performing a check/reload cycle at the start of every request, but
  # also respects a cool down time, during which nothing will be done.
  class Reloader
    def initialize(app, cooldown = 10, backend = Stat)
      @app = app
      @cooldown = cooldown
      @last = (Time.now - cooldown)
      @cache = {}
      @mtimes = {}
      @reload_mutex = Mutex.new

      extend backend
    end

    def call(env)
      if @cooldown and Time.now > @last + @cooldown
        if Thread.list.size > 1
          @reload_mutex.synchronize{ reload! }
        else
          reload!
        end

        @last = Time.now
      end

      @app.call(env)
    end

    def reload!(stderr = $stderr)
      rotation do |file, mtime|
        previous_mtime = @mtimes[file] ||= mtime
        safe_load(file, mtime, stderr) if mtime > previous_mtime
      end
    end

    # A safe Kernel::load, issuing the hooks depending on the results
    def safe_load(file, mtime, stderr = $stderr)
      load(file)
      stderr.puts "#{self.class}: reloaded `#{file}'"
      file
    rescue LoadError, SyntaxError => ex
      stderr.puts ex
    ensure
      @mtimes[file] = mtime
    end

    module Stat
      def rotation
        files = [$0, *$LOADED_FEATURES].uniq
        paths = ['./', *$LOAD_PATH].uniq

        files.map{|file|
          next if /\.(so|bundle)$/.match?(file) # cannot reload compiled files

          found, stat = figure_path(file, paths)
          next unless found && stat && mtime = stat.mtime

          @cache[file] = found

          yield(found, mtime)
        }.compact
      end

      # Takes a relative or absolute +file+ name, a couple possible +paths+ that
      # the +file+ might reside in. Returns the full path and File::Stat for the
      # path.
      def figure_path(file, paths)
        found = @cache[file]
        found = file if !found and Pathname.new(file).absolute?
        found, stat = safe_stat(found)
        return found, stat if found

        paths.find do |possible_path|
          path = ::File.join(possible_path, file)
          found, stat = safe_stat(path)
          return ::File.expand_path(found), stat if found
        end

        return false, false
      end

      def safe_stat(file)
        return unless file
        stat = ::File.stat(file)
        return file, stat if stat.file?
      rescue Errno::ENOENT, Errno::ENOTDIR, Errno::ESRCH
        @cache.delete(file) and false
    gems/gems/rack-3.0.8/lib/rack/multipart/generator.rb000064400000004706150403134060016043 0ustar00gems/gems/rack-3.0.8/lib/rack/etag.rb000064400000003567150403134060012760 0ustar00# frozen_string_literal: true

require 'digest/sha2'

require_relative 'constants'
require_relative 'utils'

module Rack
  # Automatically sets the etag header on all String bodies.
  #
  # The etag header is skipped if etag or last-modified headers are sent or if
  # a sendfile body (body.responds_to :to_path) is given (since such cases
  # should be handled by apache/nginx).
  #
  # On initialization, you can pass two parameters: a cache-control directive
  # used when etag is absent and a directive when it is present. The first
  # defaults to nil, while the second defaults to "max-age=0, private, must-revalidate"
  class ETag
    ETAG_STRING = Rack::ETAG
    DEFAULT_CACHE_CONTROL = "max-age=0, private, must-revalidate"

    def initialize(app, no_cache_control = nil, cache_control = DEFAULT_CACHE_CONTROL)
      @app = app
      @cache_control = cache_control
      @no_cache_control = no_cache_control
    end

    def call(env)
      status, headers, body = response = @app.call(env)

      if etag_status?(status) && body.respond_to?(:to_ary) && !skip_caching?(headers)
        body = body.to_ary
        digest = digest_body(body)
        headers[ETAG_STRING] = %(W/"#{digest}") if digest
      end

      unless headers[CACHE_CONTROL]
        if digest
          headers[CACHE_CONTROL] = @cache_control if @cache_control
        else
          headers[CACHE_CONTROL] = @no_cache_control if @no_cache_control
        end
      end

      response
    end

    private

      def etag_status?(status)
        status == 200 || status == 201
      end

      def skip_caching?(headers)
        headers.key?(ETAG_STRING) || headers.key?('last-modified')
      end

      def digest_body(body)
        digest = nil

        body.each do |part|
          (digest ||= Digest::SHA256.new) << part unless part.empty?
        end

        digest && digest.hexdigest.byteslice(0,32)
      end
  end
end
gems/gems/rack-3.0.8/lib/rack/multipart/uploaded_file.rb000064400000002444150403134060016646 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'files'
require_relative 'mime'

module Rack

  # The Rack::Static middleware intercepts requests for static files
  # (javascript files, images, stylesheets, etc) based on the url prefixes or
  # route mappings passed in the options, and serves them using a Rack::Files
  # object. This allows a Rack stack to serve both static and dynamic content.
  #
  # Examples:
  #
  # Serve all requests beginning with /media from the "media" folder located
  # in the current directory (ie media/*):
  #
  #     use Rack::Static, :urls => ["/media"]
  #
  # Same as previous, but instead of returning 404 for missing files under
  # /media, call the next middleware:
  #
  #     use Rack::Static, :urls => ["/media"], :cascade => true
  #
  # Serve all requests beginning with /css or /images from the folder "public"
  # in the current directory (ie public/css/* and public/images/*):
  #
  #     use Rack::Static, :urls => ["/css", "/images"], :root => "public"
  #
  # Serve all requests to / with "index.html" from the folder "public" in the
  # current directory (ie public/index.html):
  #
  #     use Rack::Static, :urls => {"/" => 'index.html'}, :root => 'public'
  #
  # Serve all requests normally from the folder "public" in the currentgems/gems/rack-3.0.8/lib/rack/multipart/parser.rb000064400000032311150403134060015342 0ustar00e the file extensions as an array
  #     ['css', 'js'] or %w(css js) => Matches files ending in .css or .js
  #
  #  4) Regular Expressions / Regexp
  #     Provide a regular expression
  #     %r{\.(?:css|js)\z} => Matches files ending in .css or .js
  #     /\.(?:eot|ttf|otf|woff2|woff|svg)\z/ => Matches files ending in
  #       the most common web font formats (.eot, .ttf, .otf, .woff2, .woff, .svg)
  #       Note: This Regexp is available as a shortcut, using the :fonts rule
  #
  #  5) Font Shortcut
  #     Provide the :fonts symbol
  #     :fonts => Uses the Regexp rule stated right above to match all common web font endings
  #
  #  Rule Ordering:
  #    Rules are applied in the order that they are provided.
  #    List rather general rules above special ones.
  #
  #  Complete example use case including HTTP header rules:
  #
  #     use Rack::Static, :root => 'public',
  #         :header_rules => [
  #           # Cache all static files in public caches (e.g. Rack::Cache)
  #           #  as well as in the browser
  #           [:all, {'cache-control' => 'public, max-age=31536000'}],
  #
  #           # Provide web fonts with cross-origin access-control-headers
  #           #  Firefox requires this when serving assets using a Content Delivery Network
  #           [:fonts, {'access-control-allow-origin' => '*'}]
  #         ]
  #
  class Static
    def initialize(app, options = {})
      @app = app
      @urls = options[:urls] || ["/favicon.ico"]
      @index = options[:index]
      @gzip = options[:gzip]
      @cascade = options[:cascade]
      root = options[:root] || Dir.pwd

      # HTTP Headers
      @header_rules = options[:header_rules] || []
      # Allow for legacy :cache_control option while prioritizing global header_rules setting
      @header_rules.unshift([:all, { CACHE_CONTROL => options[:cache_control] }]) if options[:cache_control]

      @file_server = Rack::Files.new(root)
    end

    def add_index_root?(path)
      @index && route_file(path) && path.end_with?('/')
    end

    def overwrite_file_path(path)
      @urls.kind_of?(Hash) && @urls.key?(path) || add_index_root?(path)
    end

    def route_file(path)
      @urls.kind_of?(Array) && @urls.any? { |url| path.index(url) == 0 }
    end

    def can_serve(path)
      route_file(path) || overwrite_file_path(path)
    end

    def call(env)
      path = env[PATH_INFO]

      if can_serve(path)
        if overwrite_file_path(path)
          env[PATH_INFO] = (add_index_root?(path) ? path + @index : @urls[path])
        elsif @gzip && env['HTTP_ACCEPT_ENCODING'] && /\bgzip\b/.match?(env['HTTP_ACCEPT_ENCODING'])
          path = env[PATH_INFO]
          env[PATH_INFO] += '.gz'
          response = @file_server.call(env)
          env[PATH_INFO] = path

          if response[0] == 404
            response = nil
          elsif response[0] == 304
            # Do nothing, leave headers as is
          else
            response[1][CONTENT_TYPE] = Mime.mime_type(::File.extname(path), 'text/plain')
            response[1]['content-encoding'] = 'gzip'
          end
        end

        path = env[PATH_INFO]
        response ||= @file_server.call(env)

        if @cascade && response[0] == 404
          return @app.call(env)
        end

        headers = response[1]
        applicable_rules(path).each do |rule, new_headers|
          new_headers.each { |field, content| headers[field] = content }
        end

        response
      else
        @app.call(env)
      end
    end

    # Convert HTTP header rules to HTTP headers
    def applicable_rules(path)
      @header_rules.find_all do |rule, new_headers|
        case rule
        when :all
          true
        when :fonts
          /\.(?:ttf|otf|eot|woff2|woff|svg)\z/.match?(path)
        when String
          path = ::Rack::Utils.unescape(path)
          path.start_with?(rule) || path.start_with?('/' + rule)
        when Array
          /\.(#{rule.join('|')})\z/.match?(path)
        when Regexp
          rule.match?(path)
        else
          false
        end
      end
    end

  end
end
gems/gems/rack-3.0.8/lib/rack/multipart/generator.rb000064400000004706150403134060016043 0ustar00# frozen_string_literal: true

require_relative 'uploaded_file'

module Rack
  module Multipart
    class Generator
      def initialize(params, first = true)
        @params, @first = params, first

        if @first && !@params.is_a?(Hash)
          raise ArgumentError, "value must be a Hash"
        end
      end

      def dump
        return nil if @first && !multipart?
        return flattened_params unless @first

        flattened_params.map do |name, file|
          if file.respond_to?(:original_filename)
            if file.path
              ::File.open(file.path, 'rb') do |f|
                f.set_encoding(Encoding::BINARY)
                content_for_tempfile(f, file, name)
              end
            else
              content_for_tempfile(file, file, name)
            end
          else
            content_for_other(file, name)
          end
        end.join << "--#{MULTIPART_BOUNDARY}--\r"
      end

      private
      def multipart?
        query = lambda { |value|
          case value
          when Array
            value.any?(&query)
          when Hash
            value.values.any?(&query)
          when Rack::Multipart::UploadedFile
            true
          end
        }

        @params.values.any?(&query)
      end

      def flattened_params
        @flattened_params ||= begin
          h = Hash.new
          @params.each do |key, value|
            k = @first ? key.to_s : "[#{key}]"

            case value
            when Array
              value.map { |v|
                Multipart.build_multipart(v, false).each { |subkey, subvalue|
                  h["#{k}[]#{subkey}"] = subvalue
                }
              }
            when Hash
              Multipart.build_multipart(value, false).each { |subkey, subvalue|
                h[k + subkey] = subvalue
              }
            else
              h[k] = value
            end
          end
          h
        end
      end

      def content_for_tempfile(io, file, name)
        length = ::File.stat(file.path).size if file.path
        filename = "; filename=\"#{Utils.escape_path(file.original_filename)}\""
<<-EOF
--#{MULTIPART_BOUNDARY}\r
content-disposition: form-data; name="#{name}"#{filename}\r
content-type: #{file.content_type}\r
#{"content-length: #{length}\r\n" if length}\r
#{io.read}\r
EOF
      end

      def content_for_other(file, name)
<<-EOF
--#{MULTIPART_BOUNDARY}\r
content-disposition: form-data; name="#{name}"\r
\r
#{file}\r
EOF
      end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/multipart/uploaded_file.rb000064400000002444150403134060016646 0ustar00# frozen_string_literal: true

require 'tempfile'
require 'fileutils'

module Rack
  module Multipart
    class UploadedFile

      # The filename, *not* including the path, of the "uploaded" file
      attr_reader :original_filename

      # The content type of the "uploaded" file
      attr_accessor :content_type

      def initialize(filepath = nil, ct = "text/plain", bin = false,
                     path: filepath, content_type: ct, binary: bin, filename: nil, io: nil)
        if io
          @tempfile = io
          @original_filename = filename
        else
          raise "#{path} file does not exist" unless ::File.exist?(path)
          @original_filename = filename || ::File.basename(path)
          @tempfile = Tempfile.new([@original_filename, ::File.extname(path)], encoding: Encoding::BINARY)
          @tempfile.binmode if binary
          FileUtils.copy_file(path, @tempfile.path)
        end
        @content_type = content_type
      end

      def path
        @tempfile.path if @tempfile.respond_to?(:path)
      end
      alias_method :local_path, :path

      def respond_to?(*args)
        super or @tempfile.respond_to?(*args)
      end

      def method_missing(method_name, *args, &block) #:nodoc:
        @tempfile.__send__(method_name, *args, &block)
      end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/multipart/parser.rb000064400000032311150403134060015342 0ustar00# frozen_string_literal: true

require 'strscan'

require_relative '../utils'

module Rack
  module Multipart
    class MultipartPartLimitError < Errno::EMFILE; end

    class MultipartTotalPartLimitError < StandardError; end

    # Use specific error class when parsing multipart request
    # that ends early.
    class EmptyContentError < ::EOFError; end

    # Base class for multipart exceptions that do not subclass from
    # other exception classes for backwards compatibility.
    class Error < StandardError; end

    EOL = "\r\n"
    MULTIPART = %r|\Amultipart/.*boundary=\"?([^\";,]+)\"?|ni
    TOKEN = /[^\s()<>,;:\\"\/\[\]?=]+/
    CONDISP = /Content-Disposition:\s*#{TOKEN}\s*/i
    VALUE = /"(?:\\"|[^"])*"|#{TOKEN}/
    BROKEN = /^#{CONDISP}.*;\s*filename=(#{VALUE})/i
    MULTIPART_CONTENT_TYPE = /Content-Type: (.*)#{EOL}/ni
    MULTIPART_CONTENT_DISPOSITION = /Content-Disposition:[^:]*;\s*name=(#{VALUE})/ni
    MULTIPART_CONTENT_ID = /Content-ID:\s*([^#{EOL}]*)/ni
    # Updated definitions from RFC 2231
    ATTRIBUTE_CHAR = %r{[^ \x00-\x1f\x7f)(><@,;:\\"/\[\]?='*%]}
    ATTRIBUTE = /#{ATTRIBUTE_CHAR}+/
    SECTION = /\*[0-9]+/
    REGULAR_PARAMETER_NAME = /#{ATTRIBUTE}#{SECTION}?/
    REGULAR_PARAMETER = /(#{REGULAR_PARAMETER_NAME})=(#{VALUE})/
    EXTENDED_OTHER_NAME = /#{ATTRIBUTE}\*[1-9][0-9]*\*/
    EXTENDED_OTHER_VALUE = /%[0-9a-fA-F]{2}|#{ATTRIBUTE_CHAR}/
    EXTENDED_OTHER_PARAMETER = /(#{EXTENDED_OTHER_NAME})=(#{EXTENDED_OTHER_VALUE}*)/
    EXTENDED_INITIAL_NAME = /#{ATTRIBUTE}(?:\*0)?\*/
    EXTENDED_INITIAL_VALUE = /[a-zA-Z0-9\-]*'[a-zA-Z0-9\-]*'#{EXTENDED_OTHER_VALUE}*/
    EXTENDED_INITIAL_PARAMETER = /(#{EXTENDED_INITIAL_NAME})=(#{EXTENDED_INITIAL_VALUE})/
    EXTENDED_PARAMETER = /#{EXTENDED_INITIAL_PARAMETER}|#{EXTENDED_OTHER_PARAMETER}/
    DISPPARM = /;\s*(?:#{REGULAR_PARAMETER}|#{EXTENDED_PARAMETER})\s*/
    RFC2183 = /^#{CONDISP}(#{DISPPARM})+$/i

    class Parser
      BUFSIZE = 1_048_576
      TEXT_PLAIN = "text/plain"
      TEMPFILE_FACTORY = lambda { |filename, content_type|
        Tempfile.new(["RackMultipart", ::File.extname(filename.gsub("\0", '%00'))])
      }

      class BoundedIO # :nodoc:
        def initialize(io, content_length)
          @io             = io
          @content_length = content_length
          @cursor = 0
        end

        def read(size, outbuf = nil)
          return if @cursor >= @content_length

          left = @content_length - @cursor

          str = if left < size
                  @io.read left, outbuf
                else
                  @io.read size, outbuf
                end

          if str
            @cursor += str.bytesize
          else
            # Raise an error for mismatching content-length and actual contents
            raise EOFError, "bad content body"
          end

          str
        end
      end

      MultipartInfo = Struct.new :params, :tmp_files
      EMPTY         = MultipartInfo.new(nil, [])

      def self.parse_boundary(content_type)
        return unless content_type
        data = content_type.match(MULTIPART)
        return unless data
        data[1]
      end

      def self.parse(io, content_length, content_type, tmpfile, bufsize, qp)
        return EMPTY if 0 == content_length

        boundary = parse_boundary content_type
        return EMPTY unless boundary

        if boundary.length > 70
          # RFC 1521 Section 7.2.1 imposes a 70 character maximum for the boundary.
          # Most clients use no more than 55 characters.
          raise Error, "multipart boundary size too large (#{boundary.length} characters)"
        end

        io = BoundedIO.new(io, content_length) if content_length

        parser = new(boundary, tmpfile, bufsize, qp)
        parser.parse(io)

        parser.result
      gems/gems/rack-3.0.8/lib/rack/mock_response.rb000064400000006433150403134060014702 0ustar00            yield data
          end
        end

        class BufferPart < MimePart
          def file?; false; end
          def close; end
        end

        class TempfilePart < MimePart
          def file?; true; end
          def close; body.close; end
        end

        include Enumerable

        def initialize(tempfile)
          @tempfile = tempfile
          @mime_parts = []
          @open_files = 0
        end

        def each
          @mime_parts.each { |part| yield part }
        end

        def on_mime_head(mime_index, head, filename, content_type, name)
          if filename
            body = @tempfile.call(filename, content_type)
            body.binmode if body.respond_to?(:binmode)
            klass = TempfilePart
            @open_files += 1
          else
            body = String.new
            klass = BufferPart
          end

          @mime_parts[mime_index] = klass.new(body, head, filename, content_type, name)

          check_part_limits
        end

        def on_mime_body(mime_index, content)
          @mime_parts[mime_index].body << content
        end

        def on_mime_finish(mime_index)
        end

        private

        def check_part_limits
          file_limit = Utils.multipart_file_limit
          part_limit = Utils.multipart_total_part_limit

          if file_limit && file_limit > 0
            if @open_files >= file_limit
              @mime_parts.each(&:close)
              raise MultipartPartLimitError, 'Maximum file multiparts in content reached'
            end
          end

          if part_limit && part_limit > 0
            if @mime_parts.size >= part_limit
              @mime_parts.each(&:close)
              raise MultipartTotalPartLimitError, 'Maximum total multiparts in content reached'
            end
          end
        end
      end

      attr_reader :state

      def initialize(boundary, tempfile, bufsize, query_parser)
        @query_parser   = query_parser
        @params         = query_parser.make_params
        @bufsize        = bufsize

        @state = :FAST_FORWARD
        @mime_index = 0
        @collector = Collector.new tempfile

        @sbuf = StringScanner.new("".dup)
        @body_regex = /(?:#{EOL}|\A)--#{Regexp.quote(boundary)}(?:#{EOL}|--)/m
        @rx_max_size = boundary.bytesize + 6 # (\r\n-- at start, either \r\n or -- at finish)
        @head_regex = /(.*?#{EOL})#{EOL}/m
      end

      def parse(io)
        outbuf = String.new
        read_data(io, outbuf)

        loop do
          status =
            case @state
            when :FAST_FORWARD
              handle_fast_forward
            when :CONSUME_TOKEN
              handle_consume_token
            when :MIME_HEAD
              handle_mime_head
            when :MIME_BODY
              handle_mime_body
            else # when :DONE
              return
            end

          read_data(io, outbuf) if status == :want_read
        end
      end

      def result
        @collector.each do |part|
          part.get_data do |data|
            tag_multipart_encoding(part.filename, part.content_type, part.name, data)
            @query_parser.normalize_params(@params, part.name, data)
          end
        end
        MultipartInfo.new @params.to_params_hash, @collector.find_all(&:file?).map(&:body)
      end

      private

      def dequgems/gems/rack-3.0.8/lib/rack/conditional_get.rb000064400000005765150403134060015204 0ustar00uld have to deliberately craft a response
      # with the opening boundary beyond the buffer size for that to happen.
      def handle_fast_forward
        while true
          case consume_boundary
          when :BOUNDARY
            # found opening boundary, transition to next state
            @state = :MIME_HEAD
            return
          when :END_BOUNDARY
            # invalid multipart upload, but retry for opening boundary
          else
            # no boundary found, keep reading data
            return :want_read
          end
        end
      end

      def handle_consume_token
        tok = consume_boundary
        # break if we're at the end of a buffer, but not if it is the end of a field
        @state = if tok == :END_BOUNDARY || (@sbuf.eos? && tok != :BOUNDARY)
          :DONE
        else
          :MIME_HEAD
        end
      end

      def handle_mime_head
        if @sbuf.scan_until(@head_regex)
          head = @sbuf[1]
          content_type = head[MULTIPART_CONTENT_TYPE, 1]
          if name = head[MULTIPART_CONTENT_DISPOSITION, 1]
            name = dequote(name)
          else
            name = head[MULTIPART_CONTENT_ID, 1]
          end

          filename = get_filename(head)

          if name.nil? || name.empty?
            name = filename || "#{content_type || TEXT_PLAIN}[]".dup
          end

          @collector.on_mime_head @mime_index, head, filename, content_type, name
          @state = :MIME_BODY
        else
          :want_read
        end
      end

      def handle_mime_body
        if (body_with_boundary = @sbuf.check_until(@body_regex)) # check but do not advance the pointer yet
          body = body_with_boundary.sub(/#{@body_regex}\z/m, '') # remove the boundary from the string
          @collector.on_mime_body @mime_index, body
          @sbuf.pos += body.length + 2 # skip \r\n after the content
          @state = :CONSUME_TOKEN
          @mime_index += 1
        else
          # Save what we have so far
          if @rx_max_size < @sbuf.rest_size
            delta = @sbuf.rest_size - @rx_max_size
            @collector.on_mime_body @mime_index, @sbuf.peek(delta)
            @sbuf.pos += delta
            @sbuf.string = @sbuf.rest
          end
          :want_read
        end
      end

      # Scan until the we find the start or end of the boundary.
      # If we find it, return the appropriate symbol for the start or
      # end of the boundary.  If we don't find the start or end of the
      # boundary, clear the buffer and return nil.
      def consume_boundary
        if read_buffer = @sbuf.scan_until(@body_regex)
          read_buffer.end_with?(EOL) ? :BOUNDARY : :END_BOUNDARY
        else
          @sbuf.terminate
          nil
        end
      end

      def get_filename(head)
        filename = nil
        case head
        when RFC2183
          params = Hash[*head.scan(DISPPARM).flat_map(&:compact)]

          if filename = params['filename*']
            encoding, _, filename = filename.split("'", 3)
          elsif filename = params['filgems/gems/rack-3.0.8/lib/rack/constants.rb000064400000004745150403134060014053 0ustar00ding ::Encoding.find(encoding)
        end

        filename
      end

      CHARSET = "charset"
      deprecate_constant :CHARSET

      def tag_multipart_encoding(filename, content_type, name, body)
        name = name.to_s
        encoding = Encoding::UTF_8

        name.force_encoding(encoding)

        return if filename

        if content_type
          list         = content_type.split(';')
          type_subtype = list.first
          type_subtype.strip!
          if TEXT_PLAIN == type_subtype
            rest = list.drop 1
            rest.each do |param|
              k, v = param.split('=', 2)
              k.strip!
              v.strip!
              v = v[1..-2] if v.start_with?('"') && v.end_with?('"')
              if k == "charset"
                encoding = begin
                  Encoding.find v
                rescue ArgumentError
                  Encoding::BINARY
                end
              end
            end
          end
        end

        name.force_encoding(encoding)
        body.force_encoding(encoding)
      end

      def handle_empty_content!(content)
        if content.nil? || content.empty?
          raise EmptyContentError
        end
      end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/mock_response.rb000064400000006433150403134060014702 0ustar00# frozen_string_literal: true

require 'cgi/cookie'
require 'time'

require_relative 'response'

module Rack
  # Rack::MockResponse provides useful helpers for testing your apps.
  # Usually, you don't create the MockResponse on your own, but use
  # MockRequest.

  class MockResponse < Rack::Response
    class << self
      alias [] new
    end

    # Headers
    attr_reader :original_headers, :cookies

    # Errors
    attr_accessor :errors

    def initialize(status, headers, bgems/gems/rack-3.0.8/lib/rack/cascade.rb000064400000004401150403134060013407 0ustar00ockResponse#body to be a string.  However, the real response object
      # returns the body as a list.
      #
      # See spec_showstatus.rb:
      #
      #   should "not replace existing messages" do
      #     ...
      #     res.body.should == "foo!"
      #   end
      buffer = @buffered_body = String.new

      @body.each do |chunk|
        buffer << chunk
      end

      return buffer
    end

    def empty?
      [201, 204, 304].include? status
    end

    def cookie(name)
      cookies.fetch(name, nil)
    end

    private

    def parse_cookies_from_header
      cookies = Hash.new
      if headers.has_key? 'set-cookie'
        set_cookie_header = headers.fetch('set-cookie')
        Array(set_cookie_header).each do |header_value|
          header_value.split("\n").each do |cookie|
            cookie_name, cookie_filling = cookie.split('=', 2)
            cookie_attributes = identify_cookie_attributes cookie_filling
            parsed_cookie = CGI::Cookie.new(
              'name' => cookie_name.strip,
              'value' => cookie_attributes.fetch('value'),
              'path' => cookie_attributes.fetch('path', nil),
              'domain' => cookie_attributes.fetch('domain', nil),
              'expires' => cookie_attributes.fetch('expires', nil),
              'secure' => cookie_attributes.fetch('secure', false)
            )
            cookies.store(cookie_name, parsed_cookie)
          end
        end
      end
      cookies
    end

    def identify_cookie_attributes(cookie_filling)
      cookie_bits = cookie_filling.split(';')
      cookie_attributes = Hash.new
      cookie_attributes.store('value', cookie_bits[0].strip)
      cookie_bits.drop(1).each do |bit|
        if bit.include? '='
          cookie_attribute, attribute_value = bit.split('=', 2)
          cookie_attributes.store(cookie_attribute.strip.downcase, attribute_value.strip)
        end
        if bit.include? 'secure'
          cookie_attributes.store('secure', true)
        end
      end

      if cookie_attributes.key? 'max-age'
        cookie_attributes.store('expires', Time.now + cookie_attributes['max-age'].to_i)
      elsif cookie_attributes.key? 'expires'
        cookie_attributes.store('expires', Time.httpdate(cookie_attributes['expires']))
      end

      cookie_attrgems/gems/rack-3.0.8/lib/rack/show_exceptions.rb000064400000033360150403134060015253 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'
require_relative 'body_proxy'

module Rack

  # Middleware that enables conditional GET using if-none-match and
  # if-modified-since. The application should set either or both of the
  # last-modified or etag response headers according to RFC 2616. When
  # either of the conditions is met, the response body is set to be zero
  # length and the response status is set to 304 Not Modified.
  #
  # Applications that defer response body generation until the body's each
  # message is received will avoid response body generation completely when
  # a conditional GET matches.
  #
  # Adapted from Michael Klishin's Merb implementation:
  # https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb
  class ConditionalGet
    def initialize(app)
      @app = app
    end

    # Return empty 304 response if the response has not been
    # modified since the last request.
    def call(env)
      case env[REQUEST_METHOD]
      when "GET", "HEAD"
        status, headers, body = response = @app.call(env)

        if status == 200 && fresh?(env, headers)
          response[0] = 304
          headers.delete(CONTENT_TYPE)
          headers.delete(CONTENT_LENGTH)
          response[2] = Rack::BodyProxy.new([]) do
            body.close if body.respond_to?(:close)
          end
        end
        response
      else
        @app.call(env)
      end
    end

  private

    # Return whether the response has not been modified since the
    # last request.
    def fresh?(env, headers)
      # if-none-match has priority over if-modified-since per RFC 7232
      if none_match = env['HTTP_IF_NONE_MATCH']
        etag_matches?(none_match, headers)
      elsif (modified_since = env['HTTP_IF_MODIFIED_SINCE']) && (modified_since = to_rfc2822(modified_since))
        modified_since?(modified_since, headers)
      end
    end

    # Whether the etag response header matches the if-none-match request header.
    # If so, the request has not been modified.
    def etag_matches?(none_match, headers)
      headers[ETAG] == none_match
    end

    # Whether the last-modified response header matches the if-modified-since
    # request header.  If so, the request has not been modified.
    def modified_since?(modified_since, headers)
      last_modified = to_rfc2822(headers['last-modified']) and
        modified_since >= last_modified
    end

    # Return a Time object for the given string (which should be in RFC2822
    # format), or nil if the string cannot be parsed.
    def to_rfc2822(since)
      # shortest possible valid date is the obsolete: 1 Nov 97 09:55 A
      # anything shorter is invalid, this avoids exceptions for common cases
      # most common being the empty string
      if since && since.length >= 16
        # NOTE: there is no trivial way to write this in a non exception way
        #   _rfc2822 returns a hash but is not that usable
        Time.rfc2822(since) rescue nil
      end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/constants.rb000064400000004745150403134060014053 0ustar00# frozen_string_literal: true

module Rack
  # Request env keys
  HTTP_HOST         = 'HTTP_HOST'
  HTTP_PORT         = 'HTTP_PORT'
  HTTPS             = 'HTTPS'
  PATH_INFO         = 'PATH_INFO'
  REQUEST_METHOD    = 'REQUEST_METHOD'
  REQUEST_PATH      = 'REQUEST_PATH'
  SCRIPT_NAME       = 'SCRIPT_NAME'
  QUERY_STRING      = 'QUERY_STRING'
  SERVER_PROTOCOL   = 'SERVER_PROTOCOL'
  SERVER_NAME       = 'SERVER_NAME'
  SERVER_PORT       = 'SERVER_PORT'
  HTTP_COOKIE       = 'HTTP_COOKIE'

  # Response Header Keys
  CACHE_CONTROL     = 'cache-control'
  CONTENT_LENGTH    = 'content-length'
  CONTENT_TYPE      = 'content-type'
  ETAG              = 'etag'
  EXPIRES           = 'expires'
  SET_COOKIE        = 'set-cookie'
  TRANSFER_ENCODING = 'transfer-encoding'

  # HTTP method verbs
  GET     = 'GET'
  POST    = 'POST'
  PUT     = 'PUT'
  PATCH   = 'PATCH'
  DELETE  = 'DELETE'
  HEAD    = 'HEAD'
  OPTIONS = 'OPTIONS'
  LINK    = 'LINK'
  UNLINK  = 'UNLINK'
  TRACE   = 'TRACE'

  # Rack environment variables
  RACK_VERSION                        = 'rack.version'
  RACK_TEMPFILES                      = 'rack.tempfiles'
  RACK_ERRORS                         = 'rack.errors'
  RACK_LOGGER                         = 'rack.logger'
  RACK_INPUT                          = 'rack.input'
  RACK_SESSION                        = 'rack.session'
  RACK_SESSION_OPTIONS                = 'rack.session.options'
  RACK_SHOWSTATUS_DETAIL              = 'rack.showstatus.detail'
  RACK_URL_SCHEME                     = 'rack.url_scheme'
  RACK_HIJACK                         = 'rack.hijack'
  RACK_IS_HIJACK                      = 'rack.hijack?'
  RACK_RECURSIVE_INCLUDE              = 'rack.recursive.include'
  RACK_MULTIPART_BUFFER_SIZE          = 'rack.multipart.buffer_size'
  RACK_MULTIPART_TEMPFILE_FACTORY     = 'rack.multipart.tempfile_factory'
  RACK_RESPONSE_FINISHED              = 'rack.response_finished'
  RACK_REQUEST_FORM_INPUT             = 'rack.request.form_input'
  RACK_REQUEST_FORM_HASH              = 'rack.request.form_hash'
  RACK_REQUEST_FORM_VARS              = 'rack.request.form_vars'
  RACK_REQUEST_FORM_ERROR             = 'rack.request.form_error'
  RACK_REQUEST_COOKIE_HASH            = 'rack.request.cookie_hash'
  RACK_REQUEST_COOKIE_STRING          = 'rack.request.cookie_string'
  RACK_REQUEST_QUERY_HASH             = 'rack.request.query_hash'
  RACK_REQUEST_QUERY_STRING           = 'rack.request.query_string'
  RACK_METHODOVERRIDE_ORIGINAL_METHOD = 'rack.methodoverride.original_method'
end
gems/gems/rack-3.0.8/lib/rack/cascade.rb000064400000004401150403134060013407 0ustar00# frozen_string_literal: true

require_relative 'constants'

module Rack
  # Rack::Cascade tries a request on several apps, and returns the
  # first response that is not 404 or 405 (or in a list of configured
  # status codes).  If all applications tried return one of the configured
  # status codes, return the last response.

  class Cascade
    # deprecated, no longer used
    NotFound = [404, { CONTENT_TYPE => "text/plain" }, []]

    # An array of applications to try in order.
    attr_reader :apps

    # Set the apps to send requests to, and what statuses result in
    # cascading.  Arguments:
    #
    # apps: An enumerable of rack applications.
    # cascade_for: The statuses to use cascading for.  If a response is received
    #              from an app, the next app is tried.
    def initialize(apps, cascade_for = [404, 405])
      @apps = []
      apps.each { |app| add app }

      @cascade_for = {}
      [*cascade_for].each { |status| @cascade_for[status] = true }
    end

    # Call each app in order.  If the responses uses a status that requires
    # cascading, try the next app.  If all responses require cascading,
    # return the response from the last app.
    def call(env)
      return [404, { CONTENT_TYPE => "text/plain" }, []] if @apps.empty?
      result = nil
      last_body = nil

      @apps.each do |app|
        # The SPEC says that the body must be closed after it has been iterated
        # by the server, or if it is replaced by a middleware action. Cascade
        # replaces the body each time a cascade happens. It is assumed that nil
        # does not respond to close, otherwise the previous application body
        # will be closed. The final application body will not be closed, as it
        # will be passed to the server as a result.
        last_body.close if last_body.respond_to? :close

        result = app.call(env)
        return result unless @cascade_for.include?(result[0].to_i)
        last_body = result[2]
      end

      result
    end

    # Append an app to the list of apps to cascade.  This app will
    # be tried last.
    def add(app)
      @apps << app
    end

    # Whether the given app is one of the apps to cascade to.
    def include?(app)
      @apps.include?(app)
    end

    alias_method :<<, :add
  end
end
gems/gems/rack-3.0.8/lib/rack/show_exceptions.rb000064400000033360150403134060015253 0ustar00# frozen_string_literal: true

require 'ostruct'
require 'erb'

require_relative 'constants'
require_relative 'utils'
require_relative 'request'

module Rack
  # Rack::ShowExceptions catches all exceptions raised from the app it
  # wraps.  It shows a useful backtrace with the sourcefile and
  # clickable context, the whole Rack environment and the request
  # data.
  #
  # Be careful when you use this on public-facing sites as it could
  # reveal information helpful to attackers.

  class ShowExceptions
    CONTEXT = 7

    def initialize(app)
      @app = app
    end

    def call(env)
      @app.call(env)
    rescue StandardError, LoadError, SyntaxError => e
      exception_string = dump_exception(e)

      env[RACK_ERRORS].puts(exception_string)
      env[RACK_ERRORS].flush

      if accepts_html?(env)
        content_type = "text/html"
        body = pretty(env, e)
      else
        content_type = "text/plain"
        body = exception_string
      end

      [
        500,
        {
          CONTENT_TYPE => content_type,
          CONTENT_LENGTH => body.bytesize.to_s,
        },
        [body],
      ]
    end

    def prefers_plaintext?(env)
      !accepts_html?(env)
    end

    def accepts_html?(env)
      Rack::Utils.best_q_match(env["HTTP_ACCEPT"], %w[text/html])
    end
    private :accepts_html?

    def dump_exception(exception)
      if exception.respond_to?(:detailed_message)
        message = exception.detailed_message(highlight: false)
      else
        message = exception.message
      end
      string = "#{exception.class}: #{message}\n".dup
      string << exception.backtrace.map { |l| "\t#{l}" }.join("\n")
      string
    end

    def pretty(env, exception)
      req = Rack::Request.new(env)

      # This double assignment is to prevent an "unused variable" warning.
      # Yes, it is dumb, but I don't like Ruby yelling at me.
      path = path = (req.script_name + req.path_info).squeeze("/")

      # This double assignment is to prevent an "unused variable" warning.
      # Yes, it is dumb, but I don't like Ruby yelling at me.
      frames = frames = exception.backtrace.map { |line|
        frame = OpenStruct.new
        if line =~ /(.*?):(\d+)(:in `(.*)')?/
          frame.filename = $1
          frame.lineno = $2.to_i
          frame.function = $4

          begin
            lineno = frame.lineno - 1
            lines = ::File.readlines(frame.filename)
            frame.pre_context_lineno = [lineno - CONTEXT, 0].max
            frame.pre_context = lines[frame.pre_context_lineno...lineno]
            frame.context_line = lines[lineno].chomp
            frame.post_context_lineno = [lineno + CONTEXT, lines.size].min
            frame.post_context = lines[lineno + 1..frame.post_context_lineno]
          rescue
          end

          frame
        else
          nil
        end
      }.compact

      template.result(binding)
    end

    def template
      TEMPLATE
    end

    def h(obj)                  # :nodoc:
      case obj
      when String
        Utils.escape_html(obj)
      else
        Utils.escape_html(obj.inspect)
      end
    end

    # :stopdoc:

    # adapted from Django <www.djangoproject.com>
    # Copyright (c) Django Software Foundation and individual contributors.
    # Used under the modified BSD license:
    # http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5
    TEMPLATE = ERB.new(<<-'HTML'.gsub(/^      /, ''))
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <html lang="en">
      <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="robots" content="NONE,NOARCHIVE" />
        <title><%=h exception.class %> at <%=h path %></title>
        <style type="text/css">
          html * { padding:0; margin:0; }
          body * { padding:10px 20px; }
          body * * { padding:0; }
          body { font:small sans-serif; }
          body>div { border-bottom:1px solid #ddd; }
          h1 { font-weight:normal; }
          h2 { margin-bottom:.8em; }
          h2 span { font-size:80%; color:#666; font-weight:normal; }
          h3 { margin:1em 0 .5em 0; }
          h4 { margin:0 0 .5em 0; font-weight: normal; }
          table {
              border:1px solid #ccc; border-collapse: collapse; backgroundgems/gems/rack-3.0.8/lib/rack/recursive.rb000064400000003436150403134060014042 0ustar00}
          div.context { margin: 10px 0; }
          div.context ol {
              padding-left:30px; margin:0 10px; list-style-position: inside; }
          div.context ol li {
              font-family:monospace; white-space:pre; color:#666; cursor:pointer; }
          div.context ol.context-line li { color:black; background-color:#ccc; }
          div.context ol.context-line li span { float: right; }
          div.commands { margin-left: 40px; }
          div.commands a { color:black; text-decoration:none; }
          #summary { background: #ffc; }
          #summary h2 { font-family: monospace; font-weight: normal; color: #666; white-space: pre-wrap; }
          #summary ul#quicklinks { list-style-type: none; margin-bottom: 2em; }
          #summary ul#quicklinks li { float: left; padding: 0 1em; }
          #summary ul#quicklinks>li+li { border-left: 1px #666 solid; }
          #explanation { background:#eee; }
          #template, #template-not-exist { background:#f6f6f6; }
          #template-not-exist ul { margin: 0 0 0 20px; }
          #traceback { background:#eee; }
          #requestinfo { background:#f6f6f6; padding-left:120px; }
          #summary table { border:none; background:transparent; }
          #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
          #requestinfo h3 { margin-bottom:-1em; }
          .error { background: #ffc; }
          .specific { color:#cc3300; font-weight:bold; }
        </style>
        <script type="text/javascript">
        //<!--
          function getElementsByClassName(oElm, strTagName, strClassName){
              // Written by Jonathan Snook, http://www.snook.ca/jon;
              // Add-ons by Robert Nyman, http://www.robertnyman.com
              var arrElements = (strTagName == "*" && document.all)? documengems/gems/rack-3.0.8/lib/rack/tempfile_reaper.rb000064400000001412150403134070015167 0ustar00       }
          window.onload = function() {
            hideAll(getElementsByClassName(document, 'table', 'vars'));
            hideAll(getElementsByClassName(document, 'ol', 'pre-context'));
            hideAll(getElementsByClassName(document, 'ol', 'post-context'));
          }
          function toggle() {
            for (var i = 0; i < arguments.length; i++) {
              var e = document.getElementById(arguments[i]);
              if (e) {
                e.style.display = e.style.display == 'none' ? 'block' : 'none';
              }
            }
            return false;
          }
          function varToggle(link, id) {
            toggle('v' + id);
            var s = link.getElementsByTagName('span')[0];
            var uarr = String.fromCharCode(0xgems/gems/rack-3.0.8/lib/rack/rewindable_input.rb000064400000006176150403134070015373 0ustar00location
      <% end %>
          </td>
        </tr><tr>
          <th>Web</th>
          <td><code><%=h req.request_method %> <%=h(req.host + path)%></code></td>
        </tr></table>

        <h3>Jump to:</h3>
        <ul id="quicklinks">
          <li><a href="#get-info">GET</a></li>
          <li><a href="#post-info">POST</a></li>
          <li><a href="#cookie-info">Cookies</a></li>
          <li><a href="#env-info">ENV</a></li>
        </ul>
      </div>

      <div id="traceback">
        <h2>Traceback <span>(innermost first)</span></h2>
        <ul class="traceback">
      <% frames.each { |frame| %>
            <li class="frame">
              <code><%=h frame.filename %></code>: in <code><%=h frame.function %></code>

                <% if frame.context_line %>
                <div class="context" id="c<%=h frame.object_id %>">
                    <% if frame.pre_context %>
                    <ol start="<%=h frame.pre_context_lineno+1 %>" class="pre-context" id="pre<%=h frame.object_id %>">
                      <% frame.pre_context.each { |line| %>
                      <li onclick="toggle('pre<%=h frame.object_id %>', 'post<%=h frame.object_id %>')"><%=h line %></li>
                      <% } %>
                    </ol>
                    <% end %>

                  <ol start="<%=h frame.lineno %>" class="context-line">
                    <li onclick="toggle('pre<%=h frame.object_id %>', 'post<%=h frame.object_id %>')"><%=h frame.context_line %><span>...</span></li></ol>

                    <% if frame.post_context %>
                    <ol start='<%=h frame.lineno+1 %>' class="post-context" id="post<%=h frame.object_id %>">
                      <% frame.post_context.each { |line| %>
                      <li onclick="toggle('pre<%=h frame.object_id %>', 'post<%=h frame.object_id %>')"><%=h line %></li>
                      <% } %>
                    </ol>
                    <% end %>
                </div>
                <% end %>
            </li>
      <% } %>
        </ul>
      </div>

      <div id="requestinfo">
        <h2>Request information</h2>

        <h3 id="get-info">GET</h3>
        <% if req.GET and not req.GET.empty? %>
          <table class="req">
            <thead>
              <tr>
                <th>Variable</th>
                <th>Value</th>
              </tr>
            </thead>
            <tbody>
                <% req.GET.sort_by { |k, v| k.to_s }.each { |key, val| %>
                <tr>
                  <td><%=h key %></td>
                  <td class="code"><div><%=h val.inspect %></div></td>
                </tr>
                <% } %>
            </tbody>
          </table>
        <% else %>
          <p>No GET data.</p>
        <% end %>

        <h3 id="post-info">POST</h3>
        <% if ((req.POST and not req.POST.empty?) rescue (no_post_data = "Invalid POST data"; nil)) %>
          <table class="req">
            <thead>
              <tr>
                <th>Variable</th>
                <th>Value</th>
              </tr>
            </thead>
            <tbody>
                <% req.POST.sort_by { |k, v| k.to_s }.each { |key, val| %>
                <tr>
          gems/gems/rack-3.0.8/lib/rack/sendfile.rb000064400000013070150403134070013620 0ustar00    <h3 id="env-info">Rack ENV</h3>
          <table class="req">
            <thead>
              <tr>
                <th>Variable</th>
                <th>Value</th>
              </tr>
            </thead>
            <tbody>
                <% env.sort_by { |k, v| k.to_s }.each { |key, val| %>
                <tr>
                  <td><%=h key %></td>
                  <td class="code"><div><%=h val.inspect %></div></td>
                </tr>
                <% } %>
            </tbody>
          </table>

      </div>

      <div id="explanation">
        <p>
          You're seeing this error because you use <code>Rack::ShowExceptions</code>.
        </p>
      </div>

      </body>
      </html>
    HTML

    # :startdoc:
  end
end
gems/gems/rack-3.0.8/lib/rack/recursive.rb000064400000003436150403134060014042 0ustar00# frozen_string_literal: true

require 'uri'

require_relative 'constants'

module Rack
  # Rack::ForwardRequest gets caught by Rack::Recursive and redirects
  # the current request to the app at +url+.
  #
  #   raise ForwardRequest.new("/not-found")
  #

  class ForwardRequest < Exception
    attr_reader :url, :env

    def initialize(url, env = {})
      @url = URI(url)
      @env = env

      @env[PATH_INFO]       = @url.path
      @env[QUERY_STRING]    = @url.query  if @url.query
      @env[HTTP_HOST]       = @url.host   if @url.host
      @env[HTTP_PORT]       = @url.port   if @url.port
      @env[RACK_URL_SCHEME] = @url.scheme if @url.scheme

      super "forwarding to #{url}"
    end
  end

  # Rack::Recursive allows applications called down the chain to
  # include data from other applications (by using
  # <tt>rack['rack.recursive.include'][...]</tt> or raise a
  # ForwardRequest to redirect internally.

  class Recursive
    def initialize(app)
      @app = app
    end

    def call(env)
      dup._call(env)
    end

    def _call(env)
      @script_name = env[SCRIPT_NAME]
      @app.call(env.merge(RACK_RECURSIVE_INCLUDE => method(:include)))
    rescue ForwardRequest => req
      call(env.merge(req.env))
    end

    def include(env, path)
      unless path.index(@script_name) == 0 && (path[@script_name.size] == ?/ ||
                                               path[@script_name.size].nil?)
        raise ArgumentError, "can only include below #{@script_name}, not #{path}"
      end

      env = env.merge(PATH_INFO => path,
                      SCRIPT_NAME => @script_name,
                      REQUEST_METHOD => GET,
                      "CONTENT_LENGTH" => "0", "CONTENT_TYPE" => "",
                      RACK_INPUT => StringIO.new(""))
      @app.call(env)
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/tempfile_reaper.rb000064400000001412150403134070015167 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'body_proxy'

module Rack

  # Middleware tracks and cleans Tempfiles created throughout a request (i.e. Rack::Multipart)
  # Ideas/strategy based on posts by Eric Wong and Charles Oliver Nutter
  # https://groups.google.com/forum/#!searchin/rack-devel/temp/rack-devel/brK8eh-MByw/sw61oJJCGRMJ
  class TempfileReaper
    def initialize(app)
      @app = app
    end

    def call(env)
      env[RACK_TEMPFILES] ||= []

      begin
        _, _, body = response = @app.call(env)
      rescue Exception
        env[RACK_TEMPFILES]&.each(&:close!)
        raise
      end

      response[2] = BodyProxy.new(body) do
        env[RACK_TEMPFILES]&.each(&:close!)
      end

      response
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/rewindable_input.rb000064400000006176150403134070015373 0ustar00# -*- encoding: binary -*-
# frozen_string_literal: truegems/gems/rack-3.0.8/lib/rack/mock.rb000064400000000077150403134070012763 0ustar00ewindable_io.gets
    end

    def read(*args)
      make_rewingems/gems/rack-3.0.8/lib/rack/logger.rb000064400000000636150403134070013312 0ustar00leInput object, we chmod it so that nobody else can read or write
      # it. On POSIX filesystems we also unlink the file so that it doesn't
      # even have a file entry on the filesystem anymore, though we can still
      # access it because we have the file handle open.
      @rewindable_io = Tempfile.new('RackRewindableInput')
      @rewindable_io.chmod(0000)
      @rewindable_io.set_encoding(Encoding::BIgems/gems/rack-3.0.8/lib/rack/multipart.rb000064400000002252150403134070014050 0ustar00.rewind
    end

    def filesystem_has_posix_semantics?
      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/sendfile.rb000064400000013070150403134070013620 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'
require_relative 'body_proxy'

module Rack

  # = Sendfile
  #
  # The Sendfile middlgems/gems/rack-3.0.8/lib/rack/common_logger.rb000064400000006170150403134070014661 0ustar00This is similar to x-sendfile
  # but requires parts of the filesystem to be mapped into a private URL
  # hierarchy.
  #
  # The following example shows the Nginx configuration required to create
  # a private "/files/" area, enable x-accel-redirect, and pass the special
  # x-sendfile-type and x-accel-mapping headers to the backend:
  #
  #   location ~ /files/(.*) {
  #     internal;
  #     alias /var/www/$1;
  #   }
  #
  #   location / {
  #     proxy_redirect     off;
  #
  #     proxy_set_header   Host                $host;
  #     proxy_set_header   X-Real-IP           $remote_addr;
  #     proxy_set_header   X-Forwarded-For     $proxy_add_x_forwarded_for;
  #
  #     proxy_set_header   x-sendfile-type     x-accel-redirect;
  #     proxy_set_header   x-accel-mapping     /var/www/=/files/;
  #
  #     proxy_pass         http://127.0.0.1:8080/;
  #   }
  #
  # Note that the x-sendfile-type header must be set exactly as shown above.
  # The x-accel-mapping header should specify the location on the file system,
  # followed by an equals sign (=), followed name of the private URL pattern
  # that it maps to. The middleware performs a simple substitution on the
  # resulting path.
  #
  # See Also: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile
  #
  # === lighttpd
  #
  # Lighttpd has supported some variation of the x-sendfile header for some
  # time, although only recent version support x-sendfile in a reverse proxy
  # configuration.
  #
  #   $HTTP["host"] == "example.com" {
  #      proxy-core.protocol = "http"
  #      proxy-core.balancer = "round-robin"
  #      proxy-core.backends = (
  #        "127.0.0.1:8000",
  #        "127.0.0.1:8001",
  #        ...
  #      )
  #
  #      proxy-core.allow-x-sendfile = "enable"
  #      proxy-core.rewrite-request = (
  #        "x-sendfile-type" => (".*" => "x-sendfile")
  #      )
  #    }
  #
  # See Also: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore
  #
  # === Apache
  #
  # x-sendfile is supported under Apache 2.x using a separate module:
  #
  # https://tn123.org/mod_xsendfile/
  #
  # Once the module is compiled and installed, you can enable it using
  # XSendFile config directive:
  #
  #   RequestHeader Set x-sendfile-type x-sendfile
  #   ProxyPassReverse / http://localhost:8001/
  #   XSendFile on
  #
  # === Mapping parameter
  #
  # The third parameter allows for an overriding extension of the
  # x-accel-mapping header. Mappings should be provided in tuples of internal to
  # external. The internal values may contain regular expression syntax, they
  # will be matched with case indifference.

  class Sendfile
    def initialize(app, variation = nil, mappings = [])
      @app = app
      @variation = variation
      @mappings = mappings.map do |internal, external|
        [/^#{internal}/i, external]
      end
    end

    def call(env)
      _, headers, body = response = @app.call(env)

      if body.respond_to?(:to_path)
        case type = variation(env)
        when /x-accel-redirect/i
          path = ::File.expand_path(body.to_path)
          if url = map_accel_path(env, path)
            headers[CONTENT_LENGTH] = '0'
          gems/gems/rack-3.0.8/lib/rack/builder.rb000064400000021077150403134070013463 0ustar00def variation(env)
      @variation ||
        env['sendfile.type'] ||
        env['HTTP_X_SENDFILE_TYPE']
    end

    def map_accel_path(env, path)
      if mapping = @mappings.find { |internal, _| internal =~ path }
        path.sub(*mapping)
      elsif mapping = env['HTTP_X_ACCEL_MAPPING']
        mapping.split(',').map(&:strip).each do |m|
          internal, external = m.split('=', 2).map(&:strip)
          new_path = path.sub(/^#{internal}/i, external)
          return new_path unless path == new_path
        end
        path
      end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/mock.rb000064400000000077150403134070012763 0ustar00# frozen_string_literal: true

require_relative 'mock_request'
gems/gems/rack-3.0.8/lib/rack/logger.rb000064400000000636150403134070013312 0ustar00# frozen_string_literal: true

require 'logger'

require_relative 'constants'

module Rack
  # Sets up rack.logger to write to rack.errors stream
  class Logger
    def initialize(app, level = ::Logger::INFO)
      @app, @level = app, level
    end

    def call(env)
      logger = ::Logger.new(env[RACK_ERRORS])
      logger.level = @level

      env[RACK_LOGGER] = logger
      @app.call(env)
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/multipart.rb000064400000002252150403134070014050 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'

require_relative 'multipart/parser'
require_relative 'multipart/generator'

module Rack
  # A multipart form data parser, adapted from IOWA.
  #
  # Usually, Rack::Request#POST takes care of calling this.
  module Multipart
    MULTIPART_BOUNDARY = "AaB03x"

    class << self
      def parse_multipart(env, params = Rack::Utils.default_query_parser)
        io = env[RACK_INPUT]

        if content_length = env['CONTENT_LENGTH']
          content_length = content_length.to_i
        end

        content_type = env['CONTENT_TYPE']

        tempfile = env[RACK_MULTIPART_TEMPFILE_FACTORY] || Parser::TEMPFILE_FACTORY
        bufsize = env[RACK_MULTIPART_BUFFER_SIZE] || Parser::BUFSIZE

        info = Parser.parse(io, content_length, content_type, tempfile, bufsize, params)
        env[RACK_TEMPFILES] = info.tmp_files

        return info.params
      end

      def extract_multipart(request, params = Rack::Utils.default_query_parser)
        parse_multipart(request.env)
      end

      def build_multipart(params, first = true)
        Generator.new(params, first).dump
      end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/common_logger.rb000064400000006170150403134070014661 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'
require_relative 'body_proxy'
require_relative 'request'

module Rack
  # Rack::CommonLogger forwards every request to the given +app+, and
  # logs a line in the
  # {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common]
  # to the configured logger.
  class CommonLogger
    # Common Log Format: http://httpd.apache.org/docs/1.3/logs.html#common
    #
    #   lilith.local - - [07/Aug/2006 23:58:02 -0400] "GET / HTTP/1.1" 500 -
    #
    #   %{%s - %s [%s] "%s %s%s %s" %d %s\n} %
    #
    # The actual format is slightly different than the above due to the
    # separation of SCRIPT_NAME and PATH_INFO, and because the elapsed
    # time in seconds is included at the end.
    FORMAT = %{%s - %s [%s] "%s %s%s%s %s" %d %s %0.4f\n}

    # +logger+ can be any object that supports the +write+ or +<<+ methods,
    # which includes the standard library Logger.  These methods are called
    # with a single string argument, the log message.
    # If +logger+ is nil, CommonLogger will fall back <tt>env['rack.errors']</tt>.
    def initialize(app, logger = nil)
      @app = app
      @logger = logger
    end

    # Log all requests in common_log format after a response has been
    # returned.  Note that if the app raises an exception, the request
    # will not be logged, so if exception handling middleware are used,
    # they should be loaded after this middleware.  Additionally, because
    # the logging happens after the request body has been fully sent, any
    # exceptions raised during the sending of the response body will
    # cause the request not to be logged.
    def call(env)
      began_at = Utils.clock_time
      status, headers, body = response = @app.call(env)

      response[2] = BodyProxy.new(body) { log(env, status, headers, began_at) }
      response
    end

    private

    # Log the request to the configured logger.
    def log(env, status, response_headers, began_at)
      request = Rack::Request.new(env)
      length = extract_content_length(response_headers)

      msg = sprintf(FORMAT,
        request.ip || "-",
        request.get_header("REMOTE_USER") || "-",
        Time.now.strftime("%d/%b/%Y:%H:%M:%S %z"),
        request.request_method,
        request.script_name,
        request.path_info,
        request.query_string.empty? ? "" : "?#{request.query_string}",
        request.get_header(SERVER_PROTOCOL),
        status.to_s[0..3],
        length,
        Utils.clock_time - began_at)

      msg.gsub!(/[^[:print:]\n]/) { |c| sprintf("\\x%x", c.ord) }

      logger = @logger || request.get_header(RACK_ERRORS)
      # Standard library logger doesn't support write but it supports << which actually
      # calls to write on the log device without formatting
      if logger.respond_to?(:write)
        logger.write(msg)
      else
        logger << msg
      end
    end

    # Attempt to determine the content length for the response to
    # include it in the logged data.
    def extract_content_length(headers)
      value = headers[CONTENT_LENGTH]
      !vagems/gems/rack-3.0.8/lib/rack/auth/digest/md5.rb000064400000000035150403134100014723 0ustar00# frozen_string_literal: truegems/gems/rack-3.0.8/lib/rack/auth/digest/request.rb000064400000000035150403134100015726 0ustar00_8_BOM = '\xef\xbb\xbf'

    gems/gems/rack-3.0.8/lib/rack/auth/digest/nonce.rb000064400000000035150403134100015340 0ustar00th)
      if path.end_with?('gems/gems/rack-3.0.8/lib/rack/auth/digest/params.rb000064400000000035150403134100015521 0ustar00 the context of
    # a Rack:gems/gems/rack-3.0.8/lib/rack/auth/digest.rb000064400000014012150403134100014236 0ustar00lf.app(default_app = nil, &block)
      self.new(default_app, &block).to_app
    end

    # Specifies middleware to use in a stack.
    #
    #   class Middleware
    #     def initialize(app)
    #       @app = app
    #     end
    #
    #     def call(env)
    #       env["rack.some_header"] = "setting an example"
    #       @app.call(env)
    #     end
    #   end
    #
    #   use Middleware
    #   run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] }
    #
    # All requests through to this application will first be processed by the middleware class.
    # The +call+ method in this example sets an additional environment key which then can be
    # referenced in the application if required.
    def use(middleware, *args, &block)
      if @map
        mapping, @map = @map, nil
        @use << proc { |app| generate_map(app, mapping) }
      end
      @use << proc { |app| middleware.new(app, *args, &block) }
    end
    # :nocov:
    ruby2_keywords(:use) if respond_to?(:ruby2_keywords, true)
    # :nocov:

    # Takes a block or argument that is an object that responds to #call and
    # returns a Rack response.
    #
    # You can use a block:
    #
    #   run do |env|
    #     [200, { "content-type" => "text/plain" }, ["Hello World!"]]
    #   end
    #
    # You can also provide a lambda:
    #
    #   run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] }
    #
    # You can also provide a class instance:
    #
    #   class Heartbeat
    #     def call(env)
    #      [200, { "content-type" => "text/plain" }, ["OK"]]
    #     end
    #   end
    #
    #   run Heartbeat.new
    #
    def run(app = nil, &block)
      raise ArgumentError, "Both app and block given!" if app && block_given?

      @run = app || block
    end

    # Takes a lambda or block that is used to warm-up the application. This block is called
    # before the Rack application is returned by to_app.
    #
    #   warmup do |app|
    #     client = Rack::MockRequest.new(app)
    #     client.get('/')
    #   end
    #
    #   use SomeMiddleware
    #   run MyApp
    def warmup(prc = nil, &block)
      @warmup = prc || block
    end

    # Creates a route within the application.  Routes under the mapped path will be sent to
    # the Rack application specified by run inside the block.  Other requests will be sent to the
    # default application specified by run outside the block.
    #
    #   class App
    #     def call(env)
    #       [200, {'content-type' => 'text/plain'}, ["Hello World"]]
    #     end
    #   end
    #
    #   class Heartbeat
    #     def call(env)
    #       [200, { "content-type" => "text/plain" }, ["OK"]]
    #     end
    #   end
    #
    #   app = Rack::Builder.app do
    #     map '/heartbeat' do
    #       run Heartbeat.new
    #     end
    #     run App.new
    #   end
    #
    #   run app
    #
    # The +use+ method can also be used inside the block to specify middleware to run under a specific path:
    #
    #   app = Rack::Builder.app do
    #     map '/heartbeat' do
    #       use Middleware
    #       run Heartbeat.new
    #     end
    #     run App.new
    #   end
    #
    # This example includes a piece of middleware which will run before +/heartbeat+ requests hit +Heartbeat+.
    #
    # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement
    # outside the block.
    def map(path, &block)
      @map ||= {}
      @map[path] = block
    end

    # Freeze the app (set using run) and all middleware instances when building the application
    # in to_app.
    def freeze_app
      @freeze_app = true
    end

    # Return the Rack application generated by this instance.
    def to_app
      app = @map ? generate_map(@run, @map) : @run
      fail "missing run or map statement" unless app
      app.freeze if @freeze_app
      app = @use.reverse.inject(app) { |a, e| e[a].tap { |x| x.freeze if @freeze_app } }
      @warmup.call(app) if @warmup
      app
    end

    # Call the Rack application generated by this builder instance. Note that
    # this rebuilds the Rack application and runs the warmup code (if any)
    # every time it is called, so it should not be used if performance is important.
    def call(env)
      to_app.call(env)
    end

    private

    # Generate a URLMap instance by generating new Rack applications for each
    # map block in this instance.
    def generate_map(default_app, mapping)
      mapped = default_app ? { '/' => default_app } : {}
      mapping.each { |r, b| mapped[r] = self.class.new(default_app, &b).to_app }
      URLMap.new(mapped)
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/auth/digest/md5.rb000064400000000035150403134100014723 0ustar00require_relative '../digest'
gems/gems/gems/gems/rack-3.0.8/lib/rack/auth/basic.rb000064400000002261150403134100014043 0ustar00gems/gems/rack-3.0.8/lib/rack/auth/digest/nonce.rb000064400000000035150403134100015340 0ustar00require_relative '../digest'
gems/gems/rack-3.0.8/lib/rack/auth/digest/params.rb000064400000000035150403134100015521 0gems/gems/rack-3.0.8/lib/rack/auth/abstract/request.rb000064400000001525150403134100016257 0ustar00gems/gems/rack-3.0.8/lib/rack/auth/digest.rb000064400000014012150403134100014236 0ustar00# frozen_string_literal: true

require_relative 'abstract/handler'
require_relative 'abstract/request'
require 'digest/md5'
require 'base64'

module Rack
  warn "Rack::Auth::Digest is deprecated and will be removed in Rack 3.1", uplevel: 1

  module Auth
    module Digest
      # Rack::Auth::Digest::Nonce is the default nonce generator forgems/gems/rack-3.0.8/lib/rack/auth/abstract/handler.rb000064400000001522150403134100016201 0ustar00).strip
        end

        def digest
          ::Digest::MD5.hexdigest("#{@timestamp}:#{self.class.private_key}")
        end

        def valid?
          digest == @given_digest
        end

        def stale?
          !self.class.time_limit.nil? && (Time.now.to_i - @timestamp) > self.class.time_limit
        end

        def fresh?
          !stale?
        end

      end

      class Params < Hash

        def self.parse(str)
          Params[*split_header_value(str).map do |param|
            k, v = param.split('=', 2)
            [k, dequote(v)]
          end.flatten]
        end

        def self.dequote(str) # From WEBrick::HTTPUtils
          ret = (/\A"(.*)"\Z/ =~ str) ? $1 : str.dup
          ret.gsub!(/\\(.)/, "\\1")
          ret
        end

        def self.split_header_value(str)
          str.scan(/\w+\=(?:"[^\"]+"|[^gems/gems/rack-3.0.8/lib/rack/lint.rb000075500000110133150403134100012770 0ustar00

        def digest?
          "digest" == scheme
        end

        def correct_uri?
          request.fullpath == uri
        end

        def nonce
          @nonce ||= Nonce.parse(params['nonce'])
        end

        def params
          @params ||= Params.parse(parts.last)
        end

        def respond_to?(sym, *)
          super or params.has_key? sym.to_s
        end

        def method_missing(sym, *args)
          return super unless params.has_key?(key = sym.to_s)
          return params[key] if args.size == 0
          raise ArgumentError, "wrong number of arguments (#{args.size} for 0)"
        end
      end

      # Rack::Auth::Digest::MD5 implements the MD5 algorithm version of
      # HTTP Digest Authentication, as per RFC 2617.
      #
      # Initialize with the [Rack] application that you want protecting,
      # and a block that looks up a plaintext password for a given username.
      #
      # +opaque+ needs to be set to a constant base64/hexadecimal string.
      #
      class MD5 < AbstractHandler

        attr_accessor :opaque

        attr_writer :passwords_hashed

        def initialize(app, realm = nil, opaque = nil, &authenticator)
          @passwords_hashed = nil
          if opaque.nil? and realm.respond_to? :values_at
            realm, opaque, @passwords_hashed = realm.values_at :realm, :opaque, :passwords_hashed
          end
          super(app, realm, &authenticator)
          @opaque = opaque
        end

        def passwords_hashed?
          !!@passwords_hashed
        end

        def call(env)
          auth = Request.new(env)

          unless auth.provided?
            return unauthorized
          end

          if !auth.digest? || !auth.correct_uri? || !valid_qop?(auth)
            return bad_request
          end

          if valid?(auth)
            if auth.nonce.stale?
              return unauthorized(challenge(stale: true))
            else
              env['REMOTE_USER'] = auth.username

              return @app.call(env)
            end
          end

          unauthorized
        end


        private

        QOP = 'auth'

        def params(hash = {})
          Params.new do |params|
            params['realm'] = realm
            params['nonce'] = Nonce.new.to_s
            params['opaque'] = H(opaque)
            params['qop'] = QOP

            hash.each { |k, v| params[k] = v }
          end
        end

        def challenge(hash = {})
          "Digest #{params(hash)}"
        end

        def valid?(auth)
          valid_opaque?(auth) && valid_nonce?(auth) && valid_digest?(auth)
        end

        def valid_qop?(auth)
          QOP == auth.qop
        end

        def valid_opaque?(auth)
          H(opaque) == auth.opaque
        end

        def valid_nonce?(auth)
          auth.nonce.valid?
        end

        def valid_digest?(auth)
          pw = @authenticator.call(auth.username)
          pw && Rack::Utils.secure_compare(digest(auth, pw), auth.response)
        end

        def md5(data)
          ::Digest::MD5.hexdigest(data)
        end

        alias :H :md5

        def KD(secret, data)
          H "#{secret}:#{data}"
        end

        def A1(auth, password)
          "#{auth.username}:#{auth.realm}:#{password}"
        end

        def A2(auth)
          "#{auth.method}:#{auth.uri}"
        end

        def digest(auth, password)
          password_hash = passwords_hashed? ? password : H(A1(auth, password))

          KD password_hash, "#{auth.nonce}:#{auth.nc}:#{auth.cnonce}:#{QOP}:#{H A2(auth)}"
        end

      end
    end
  end
end

gems/gems/rack-3.0.8/lib/rack/auth/basic.rb000064400000002261150403134100014043 0ustar00# frozen_string_literal: true

require_relative 'abstract/handler'
require_relative 'abstract/request'
require 'base64'

module Rack
  module Auth
    # Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617.
    #
    # Initialize with the Rack application that you want protecting,
    # and a block that checks if a username and password pair are valid.

    class Basic < AbstractHandler

      def call(env)
        auth = Basic::Request.new(env)

        return unauthorized unless auth.provided?

        return bad_request unless auth.basic?

        if valid?(auth)
          env['REMOTE_USER'] = auth.username

          return @app.call(env)
        end

        unauthorized
      end


      private

      def challenge
        'Basic realm="%s"' % realm
      end

      def valid?(auth)
        @authenticator.call(*auth.credentials)
      end

      class Request < Auth::AbstractRequest
        def basic?
          "basic" == scheme && credentials.length == 2
        end

        def credentials
          @credentials ||= Base64.decode64(params).split(':', 2)
        end

        def username
          credentials.first
        end
      end

    end
  end
end
gems/gems/rack-3.0.8/lib/rack/auth/abstract/request.rb000064400000001525150403134100016257 0ustar00# frozen_string_literal: true

require_relative '../../request'

module Rack
  module Auth
    class AbstractRequest

      def initialize(env)
        @env = env
      end

      def request
        @request ||= Request.new(@env)
      end

      def provided?
        !authorization_key.nil? && valid?
      end

      def valid?
        !@env[authorization_key].nil?
      end

      def parts
        @parts ||= @env[authorization_key].split(' ', 2)
      end

      def scheme
        @scheme ||= parts.first&.downcase
      end

      def params
        @params ||= parts.last
      end


      private

      AUTHORIZATION_KEYS = ['HTTP_AUTHORIZATION', 'X-HTTP_AUTHORIZATION', 'X_HTTP_AUTHORIZATION']

      def authorization_key
        @authorization_key ||= AUTHORIZATION_KEYS.detect { |key| @env.has_key?(key) }
      end

    end

  end
end
gems/gems/rack-3.0.8/lib/rack/auth/abstract/handler.rb000064400000001522150403134100016201 0ustar00# frozen_string_literal: true

require_relative '../../constants'

module Rack
  module Auth
    # Rack::Auth::AbstractHandler implements common authentication functionality.
    #
    # +realm+ should be set for all handlers.

    class AbstractHandler

      attr_accessor :realm

      def initialize(app, realm = nil, &authenticator)
        @app, @realm, @authenticator = app, realm, authenticator
      end


      private

      def unauthorized(www_authenticate = challenge)
        return [ 401,
          { CONTENT_TYPE => 'text/plain',
            CONTENT_LENGTH => '0',
            'www-authenticate' => www_authenticate.to_s },
          []
        ]
      end

      def bad_request
        return [ 400,
          { CONTENT_TYPE => 'text/plain',
            CONTENT_LENGTH => '0' },
          []
        ]
      end

    end
  end
end
gems/gems/rack-3.0.8/lib/rack/lint.rb000075500000110133150403134100012770 0ustar00# frozen_string_literal: true

require 'forwardable'

require_relative 'constants'
require_relative 'utils'

module Rack
  # Rack::Lint validates your application and the requests and
  # responses according to the Rack spec.

  class Lint
    def initialize(app)
      @app = app
    end

    # :stopdoc:

    class LintError < RuntimeError; end
    # AUTHORS: n.b. The trailing whitespace between paragraphs is important and
    # should not be removed. The whitespace creates paragraphs in the RDoc
    # output.
    #
    ## This specification aims to formalize the Rack protocol. You
    ## can (and should) use Rack::Lint to enforce it.
    ##
    ## When you develop middleware, be sure to add a Lint before and
    ## after to catch all mistakes.
    ##
    ## = Rack applications
    ##
    ## A Rack application is a Ruby object (not a class) that
    ## responds to +call+.
    def call(env = nil)
      Wrapper.new(@app, env).response
    end

    class Wrapper
      def initialize(app, env)
        @app = app
        @env = env
        @response = nil
        @head_request = false

        @status = nil
        @headers = nil
        @body = nil
        @invoked = nil
        @content_length = nil
        @closed = false
        @size = 0
      end

      def response
        ## It takes exactly one argument, the *environment*
        raise LintError, "No env given" unless @env
        check_environment(@env)

        @env[RACK_INPUT] = InputWrapper.new(@env[RACK_INPUT])
        @env[RACK_ERRORS] = ErrorWrapper.new(@env[RACK_ERRORS])

        ## and returns a non-frozen Array of exactly three values:
        @response = @app.call(@env)
        raise LintError, "response is not an Array, but #{@response.class}" unless @response.kind_of? Array
        raise LintError, "response is frozen" if @response.frozen?
        raise LintError, "response array has #{@response.size} elements instead of 3" unless @response.size == 3

        @status, @headers, @body = @response
        ## The *status*,
        check_status(@status)

        ## the *headers*,
        check_headers(@headers)

        hijack_proc = check_hijack_response(@headers, @env)
        if hijack_proc
          @headers[RACK_HIJACK] = hijack_proc
        end

        ## and the *body*.
        check_content_type(@status, @headers)
        check_content_length(@status, @headers)
        @head_request = @env[REQUEST_METHOD] == HEAD

        @lint = (@env['rack.lint'] ||= []) << self

        if (@env['rack.lint.body_iteration'] ||= 0) > 0
          raise LintError, "Middleware must not call #each directly"
        end

        return [@status, @headers, self]
      end

      ##
      ## == The Environment
      ##
      def check_environment(env)
        ## The environment must be an unfrozen instance of Hash that includes
        ## CGI-like headers. The Rack application is free to modify the
        ## environment.
        raise LintError, "env #{env.inspect} is not a Hash, but #{env.class}" unless env.kind_of? Hash
        raise LintError, "env should not be frozen, but is" if env.frozen?

        ##
        ## The environment is required to include these variables
        ## (adopted from {PEP 333}[https://peps.python.org/pep-0333/]), except when they'd be empty, but see
        ## below.

        ## <tt>REQUEST_METHOD</tt>:: The HTTP request method, such as
        ##                           "GET" or "POST". This cannot ever
        ##                           be an empty string, and so is
        ##                           always required.

        ## <tt>SCRIPT_NAME</tt>:: The initial portion of the request
        ##                        URL's "path" that corresponds to the
        ##                        application object, so that the
        ##                        application knows its virtual
        ##                        "location". This may be an empty
        ##                        string, if the application corresponds
        ##                        to the "root" of the server.

        ## <tt>PATH_INFO</tt>:: The remainder of the request URL's
        ##                      "path", designating the virtual
        ##                      "location" of the request's target
        ##                      within the application. This may be an
        ##                      empty string, if the request URL targets
        ##                      the application root and does not have a
        ##                      trailing slash. This value may be
        ##                      percent-encoded when originating from
        ##                      a URL.

        ## <tt>QUERY_STRING</tt>:: The portion of the request URL that
        ##                         follows the <tt>?</tt>, if any. May be
        ##                         empty, but is always required!

        ## <tt>SERVER_NAME</tt>:: When combined with <tt>SCRIPT_NAME</tt> and
        ##                        <tt>PATH_INFO</tt>, these variables can be
        ##                        used to complete the URL. Note, however,
        ##                        that <tt>HTTP_HOST</tt>, if present,
        ##                        should be used in preference to
        ##                        <tt>SERVER_NAME</tt> for reconstructing
        ##                        the request URL.
        ##                        <tt>SERVER_NAME</tt> can never be an empty
        ##                        string, and so is always required.

        ## <tt>SERVER_PORT</tt>:: An optional +Integer+ which is the port the
        ##                        server is running on. Should be specified if
        ##                        the server is running on a non-standard port.

        ## <tt>SERVER_PROTOCOL</tt>:: A string representing the HTTP version used
        ##                            for the request.

        ## <tt>HTTP_</tt> Variables:: Variables corresponding to the
        ##                            client-supplied HTTP request
        ##                            headers (i.e., variables whose
        ##                            names begin with <tt>HTTP_</tt>). The
        ##                            presence or absence of these
        ##                            variables should correspond with
        ##                            the presence or absence of the
        ##                            appropriate HTTP header in the
        ##                            request. See
        ##                            {RFC3875 section 4.1.18}[https://tools.ietf.org/html/rfc3875#section-4.1.18]
        ##                            for specific behavior.

        ## In addition to this, the Rack environment must include these
        ## Rack-specific variables:

        ## <tt>rack.url_scheme</tt>:: +http+ or +https+, depending on the
        ##                            request URL.

        ## <tt>rack.input</tt>:: See below, the input stream.

        ## <tt>rack.errors</tt>:: See below, the error stream.

        ## <tt>rack.hijack?</tt>:: See below, if present and true, indicates
        ##                         that the server supports partial hijacking.

        ## <tt>rack.hijack</tt>:: See below, if present, an object responding
        ##                        to +call+ that is used to perform a full
        ##                        hijack.

        ## Additional environment specifications have approved to
        ## standardized middleware APIs. None of these are required to
        ## be implemented by the server.

        ## <tt>rack.session</tt>:: A hash-like interface for storing
        ##                         request session data.
        ##                         The store must implement:
        if session = env[RACK_SESSION]
          ##                         store(key, value)         (aliased as []=);
          unless session.respond_to?(:store) && session.respond_to?(:[]=)
            raise LintError, "session #{session.inspect} must respond to store and []="
          end

          ##                         fetch(key, default = nil) (aliased as []);
          unless session.respond_to?(:fetch) && session.respond_to?(:[])
            raise LintError, "session #{session.inspect} must respond to fetch and []"
          end

          ##                         delete(key);
          unless session.respond_to?(:delete)
            raise LintError, "session #{session.inspect} must respond to delete"
          end

          ##                         clear;
          unless session.respond_to?(:clear)
            raise LintError, "session #{session.inspect} must respond to clear"
          end

          ##                         to_hash (returning unfrozen Hash instance);
          unless session.respond_to?(:to_hash) && session.to_hash.kind_of?(Hash) && !session.to_hash.frozen?
            raise LintError, "session #{session.inspect} must respond to to_hash and return unfrozen Hash instance"
          end
        end

        ## <tt>rack.logger</tt>:: A common object interface for logging messages.
        ##                        The object must implement:
        if logger = env[RACK_LOGGER]
          ##                         info(message, &block)
          unless logger.respond_to?(:info)
            raise LintError, "logger #{logger.inspect} must respond to info"
          end

          ##                         debug(message, &block)
          unless logger.respond_to?(:debug)
            raise LintError, "logger #{logger.inspect} must respond to debug"
          end

          ##                         warn(message, &block)
          unless logger.respond_to?(:warn)
            raise LintError, "logger #{logger.inspect} must respond to warn"
          end

          ##                         error(message, &block)
          unless logger.respond_to?(:error)
            raise LintError, "logger #{logger.inspect} must respond to error"
          end

          ##                         fatal(message, &block)
          unless logger.respond_to?(:fatal)
            raise LintError, "logger #{logger.inspect} must respond to fatal"
          end
        end

        ## <tt>rack.multipart.buffer_size</tt>:: An Integer hint to the multipart parser as to what chunk size to use for reads and writes.
        if bufsize = env[RACK_MULTIPART_BUFFER_SIZE]
          unless bufsize.is_a?(Integer) && bufsize > 0
            raise LintError, "rack.multipart.buffer_size must be an Integer > 0 if specified"
          end
        end

        ## <tt>rack.multipart.tempfile_factory</tt>:: An object responding to #call with two arguments, the filename and content_type given for the multipart form field, and returning an IO-like object that responds to #<< and optionally #rewind. This factory will be used to instantiate the tempfile for each multipart form file upload field, rather than the default class of Tempfile.
        if tempfile_factory = env[RACK_MULTIPART_TEMPFILE_FACTORY]
          raise LintError, "rack.multipart.tempfile_factory must respond to #call" unless tempfile_factory.respond_to?(:call)
          env[RACK_MULTIPART_TEMPFILE_FACTORY] = lambda do |filename, content_type|
            io = tempfile_factory.call(filename, content_type)
            raise LintError, "rack.multipart.tempfile_factory return value must respond to #<<" unless io.respond_to?(:<<)
            io
          end
        end

        ## The server or the application can store their own data in the
        ## environment, too.  The keys must contain at least one dot,
        ## and should be prefixed uniquely.  The prefix <tt>rack.</tt>
        ## is reserved for use with the Rack core distribution and other
        ## accepted specifications and must not be used otherwise.
        ##

        %w[REQUEST_METHOD SERVER_NAME QUERY_STRING SERVER_PROTOCOL
           rack.input rack.errors].each { |header|
          raise LintError, "env missing required key #{header}" unless env.include? header
        }

        ## The <tt>SERVER_PORT</tt> must be an Integer if set.
        server_port = env["SERVER_PORT"]
        unless server_port.nil? || (Integer(server_port) rescue false)
          raise LintError, "env[SERVER_PORT] is not an Integer"
        end

        ## The <tt>SERVER_NAME</tt> must be a valid authority as defined by RFC7540.
        unless (URI.parse("http://#{env[SERVER_NAME]}/") rescue false)
          raise LintError, "#{env[SERVER_NAME]} must be a valid authority"
        end

        ## The <tt>HTTP_HOST</tt> must be a valid authority as defined by RFC7540.
        unless (URI.parse("http://#{env[HTTP_HOST]}/") rescue false)
          raise LintError, "#{env[HTTP_HOST]} must be a valid authority"
        end

        ## The <tt>SERVER_PROTOCOL</tt> must match the regexp <tt>HTTP/\d(\.\d)?</tt>.
        server_protocol = env['SERVER_PROTOCOL']
        unless %r{HTTP/\d(\.\d)?}.match?(server_protocol)
          raise LintError, "env[SERVER_PROTOCOL] does not match HTTP/\\d(\\.\\d)?"
        end

        ## If the <tt>HTTP_VERSION</tt> is present, it must equal the <tt>SERVER_PROTOCOL</tt>.
        if env['HTTP_VERSION'] && env['HTTP_VERSION'] != server_protocol
          raise LintError, "env[HTTP_VERSION] does not equal env[SERVER_PROTOCOL]"
        end

        ## The environment must not contain the keys
        ## <tt>HTTP_CONTENT_TYPE</tt> or <tt>HTTP_CONTENT_LENGTH</tt>
        ## (use the versions without <tt>HTTP_</tt>).
        %w[HTTP_CONTENT_TYPE HTTP_CONTENT_LENGTH].each { |header|
          if env.include? header
            raise LintError, "env contains #{header}, must use #{header[5..-1]}"
          end
        }

        ## The CGI keys (named without a period) must have String values.
        ## If the string values for CGI keys contain non-ASCII characters,
        ## they should use ASCII-8BIT encoding.
        env.each { |key, value|
          next  if key.include? "."   # Skip extensions
          unless value.kind_of? String
            raise LintError, "env variable #{key} has non-string value #{value.inspect}"
          end
          next if value.encoding == Encoding::ASCII_8BIT
          unless value.b !~ /[\x80-\xff]/n
            raise LintError, "env variable #{key} has value containing non-ASCII characters and has non-ASCII-8BIT encoding #{value.inspect} encoding: #{value.encoding}"
          end
        }

        ## There are the following restrictions:

        ## * <tt>rack.url_scheme</tt> must either be +http+ or +https+.
        unless %w[http https].include?(env[RACK_URL_SCHEME])
          raise LintError, "rack.url_scheme unknown: #{env[RACK_URL_SCHEME].inspect}"
        end

        ## * There must be a valid input stream in <tt>rack.input</tt>.
        check_input env[RACK_INPUT]
        ## * There must be a valid error stream in <tt>rack.errors</tt>.
        check_error env[RACK_ERRORS]
        ## * There may be a valid hijack callback in <tt>rack.hijack</tt>
        check_hijack env

        ## * The <tt>REQUEST_METHOD</tt> must be a valid token.
        unless env[REQUEST_METHOD] =~ /\A[0-9A-Za-z!\#$%&'*+.^_`|~-]+\z/
          raise LintError, "REQUEST_METHOD unknown: #{env[REQUEST_METHOD].dump}"
        end

        ## * The <tt>SCRIPT_NAME</tt>, if non-empty, must start with <tt>/</tt>
        if env.include?(SCRIPT_NAME) && env[SCRIPT_NAME] != "" && env[SCRIPT_NAME] !~ /\A\//
          raise LintError, "SCRIPT_NAME must start with /"
        end
        ## * The <tt>PATH_INFO</tt>, if non-empty, must start with <tt>/</tt>
        if env.include?(PATH_INFO) && env[PATH_INFO] != "" && env[PATH_INFO] !~ /\A\//
          raise LintError, "PATH_INFO must start with /"
        end
        ## * The <tt>CONTENT_LENGTH</tt>, if given, must consist of digits only.
        if env.include?("CONTENT_LENGTH") && env["CONTENT_LENGTH"] !~ /\A\d+\z/
          raise LintError, "Invalid CONTENT_LENGTH: #{env["CONTENT_LENGTH"]}"
        end

        ## * One of <tt>SCRIPT_NAME</tt> or <tt>PATH_INFO</tt> must be
        ##   set. <tt>PATH_INFO</tt> should be <tt>/</tt> if
        ##   <tt>SCRIPT_NAME</tt> is empty.
        unless env[SCRIPT_NAME] || env[PATH_INFO]
          raise LintError, "One of SCRIPT_NAME or PATH_INFO must be set (make PATH_INFO '/' if SCRIPT_NAME is empty)"
        end
        ##   <tt>SCRIPT_NAME</tt> never should be <tt>/</tt>, but instead be empty.
        unless env[SCRIPT_NAME] != "/"
          raise LintError, "SCRIPT_NAME cannot be '/', make it '' and PATH_INFO '/'"
        end

        ## <tt>rack.response_finished</tt>:: An array of callables run by the server after the response has been
        ## processed. This would typically be invoked after sending the response to the client, but it could also be
        ## invoked if an error occurs while generating the response or sending the response; in that case, the error
        ## argument will be a subclass of +Exception+.
        ## The callables are invoked with +env, status, headers, error+ arguments and should not raise any
        ## exceptions. They should be invoked in reverse order of registration.
        if callables = env[RACK_RESPONSE_FINISHED]
          raise LintError, "rack.response_finished must be an array of callable objects" unless callables.is_a?(Array)

          callables.each do |callable|
            raise LintError, "rack.response_finished values must respond to call(env, status, headers, error)" unless callable.respond_to?(:call)
          end
        end
      end

      ##
      ## === The Input Stream
      ##
      ## The input stream is an IO-like object which contains the raw HTTP
      ## POST data.
      def check_input(input)
        ## When applicable, its external encoding must be "ASCII-8BIT" and it
        ## must be opened in binary mode, for Ruby 1.9 compatibility.
        if input.respond_to?(:external_encoding) && input.external_encoding != Encoding::ASCII_8BIT
          raise LintError, "rack.input #{input} does not have ASCII-8BIT as its external encoding"
        end
        if input.respond_to?(:binmode?) && !input.binmode?
          raise LintError, "rack.input #{input} is not opened in binary mode"
        end

        ## The input stream must respond to +gets+, +each+, and +read+.
        [:gets, :each, :read].each { |method|
          unless input.respond_to? method
            raise LintError, "rack.input #{input} does not respond to ##{method}"
          end
        }
      end

      class InputWrapper
        def initialize(input)
          @input = input
        end

        ## * +gets+ must be called without arguments and return a string,
        ##   or +nil+ on EOF.
        def gets(*args)
          raise LintError, "rack.input#gets called with arguments" unless args.size == 0
          v = @input.gets
          unless v.nil? or v.kind_of? String
            raise LintError, "rack.input#gets didn't return a String"
          end
          v
        end

        ## * +read+ behaves like IO#read.
        ##   Its signature is <tt>read([length, [buffer]])</tt>.
        ##
        ##   If given, +length+ must be a non-negative Integer (>= 0) or +nil+,
        ##   and +buffer+ must be a String and may not be nil.
        ##
        ##   If +length+ is given and not nil, then this method reads at most
        ##   +length+ bytes from the input stream.
        ##
        ##   If +length+ is not given or nil, then this method reads
        ##   all data until EOF.
        ##
        ##   When EOF is reached, this method returns nil if +length+ is given
        ##   and not nil, or "" if +length+ is not given or is nil.
        ##
        ##   If +buffer+ is given, then the read data will be placed
        ##   into +buffer+ instead of a newly created String object.
        def read(*args)
          unless args.size <= 2
            raise LintError, "rack.input#read called with too many arguments"
          end
          if args.size >= 1
            unless args.first.kind_of?(Integer) || args.first.nil?
              raise LintError, "rack.input#read called with non-integer and non-nil length"
            end
            unless args.first.nil? || args.first >= 0
              raise LintError, "rack.input#read called with a negative length"
            end
          end
          if args.size >= 2
            unless args[1].kind_of?(String)
              raise LintError, "rack.input#read called with non-String buffer"
            end
          end

          v = @input.read(*args)

          unless v.nil? or v.kind_of? String
            raise LintError, "rack.input#read didn't return nil or a String"
          end
          if args[0].nil?
            unless !v.nil?
              raise LintError, "rack.input#read(nil) returned nil on EOF"
            end
          end

          v
        end

        ## * +each+ must be called without arguments and only yield Strings.
        def each(*args)
          raise LintError, "rack.input#each called with arguments" unless args.size == 0
          @input.each { |line|
            unless line.kind_of? String
              raise LintError, "rack.input#each didn't yield a String"
            end
            yield line
          }
        end

        ## * +close+ can be called on the input stream to indicate that the
        ## any remaining input is not needed.
        def close(*args)
          @input.close(*args)
        end
      end

      ##
      ## === The Error Stream
      ##
      def check_error(error)
        ## The error stream must respond to +puts+, +write+ and +flush+.
        [:puts, :write, :flush].each { |method|
          unless error.respond_to? method
            raise LintError, "rack.error #{error} does not respond to ##{method}"
          end
        }
      end

      class ErrorWrapper
        def initialize(error)
          @error = error
        end

        ## * +puts+ must be called with a single argument that responds to +to_s+.
        def puts(str)
          @error.puts str
        end

        ## * +write+ must be called with a single argument that is a String.
        def write(str)
          raise LintError, "rack.errors#write not called with a String" unless str.kind_of? String
          @error.write str
        end

        ## * +flush+ must be called without arguments and must be called
        ##   in order to make the error appear for sure.
        def flush
          @error.flush
        end

        ## * +close+ must never be called on the error stream.
        def close(*args)
          raise LintError, "rack.errors#close must not be called"
        end
      end

      ##
      ## === Hijacking
      ##
      ## The hijacking interfaces provides a means for an application to take
      ## control of the HTTP connection. There are two distinct hijack
      ## interfaces: full hijacking where the application takes over the raw
      ## connection, and partial hijacking where the application takes over
      ## just the response body stream. In both cases, the application is
      ## responsible for closing the hijacked stream.
      ##
      ## Full hijacking only works with HTTP/1. Partial hijacking is functionally
      ## equivalent to streaming bodies, and is still optionally supported for
      ## backwards compatibility with older Rack versions.
      ##
      ## ==== Full Hijack
      ##
      ## Full hijack is used to completely take over an HTTP/1 connection. It
      ## occurs before any headers are written and causes the request to
      ## ignores any response generated by the application.
      ##
      ## It is intended to be used when applications need access to raw HTTP/1
      ## connection.
      ##
      def check_hijack(env)
        ## If +rack.hijack+ is present in +env+, it must respond to +call+
        if original_hijack = env[RACK_HIJACK]
          raise LintError, "rack.hijack must respond to call" unless original_hijack.respond_to?(:call)

          env[RACK_HIJACK] = proc do
            io = original_hijack.call

            ## and return an +IO+ instance which can be used to read and write
            ## to the underlying connection using HTTP/1 semantics and
            ## formatting.
            raise LintError, "rack.hijack must return an IO instance" unless io.is_a?(IO)

            io
          end
        end
      end

      ##
      ## ==== Partial Hijack
      ##
      ## Partial hijack is used for bi-directional streaming of the request and
      ## response body. It occurs after the status and headers are written by
      ## the server and causes the server to ignore the Body of the response.
      ##
      ## It is intended to be used when applications need bi-directional
      ## streaming.
      ##
      def check_hijack_response(headers, env)
        ## If +rack.hijack?+ is present in +env+ and truthy,
        if env[RACK_IS_HIJACK]
          ## an application may set the special response header +rack.hijack+
          if original_hijack = headers[RACK_HIJACK]
            ## to an object that responds to +call+,
            unless original_hijack.respond_to?(:call)
              raise LintError, 'rack.hijack header must respond to #call'
            end
            ## accepting a +stream+ argument.
            return proc do |io|
              original_hijack.call StreamWrapper.new(io)
            end
          end
          ##
          ## After the response status and headers have been sent, this hijack
          ## callback will be invoked with a +stream+ argument which follows the
          ## same interface as outlined in "Streaming Body". Servers must
          ## ignore the +body+ part of the response tuple when the
          ## +rack.hijack+ response header is present. Using an empty +Array+
          ## instance is recommended.
        else
          ##
          ## The special response header +rack.hijack+ must only be set
          ## if the request +env+ has a truthy +rack.hijack?+.
          if headers.key?(RACK_HIJACK)
            raise LintError, 'rack.hijack header must not be present if server does not support hijacking'
          end
        end

        nil
      end

      ## == The Response
      ##
      ## === The Status
      ##
      def check_status(status)
        ## This is an HTTP status. It must be an Integer greater than or equal to
        ## 100.
        unless status.is_a?(Integer) && status >= 100
          raise LintError, "Status must be an Integer >=100"
        end
      end

      ##
      ## === The Headers
      ##
      def check_headers(headers)
        ## The headers must be a unfrozen Hash.
        unless headers.kind_of?(Hash)
          raise LintError, "headers object should be a hash, but isn't (got #{headers.class} as headers)"
        end

        if headers.frozen?
          raise LintError, "headers object should not be frozen, but is"
        end

        headers.each do |key, value|
          ## The header keys must be Strings.
          unless key.kind_of? String
            raise LintError, "header key must be a string, was #{key.class}"
          end

          ## Special headers starting "rack." are for communicating with the
          ## server, and must not be sent back gems/gems/rack-3.0.8/lib/rack/query_parser.rb000064400000020573150403134100014550 0ustar00   raise LintError, "a header value must be a String or Array of Strings, but the value of '#{key}' is a #{value.class}"
          end
        end
      end

      def check_header_value(key, value)
        ## such that each String instance must not contain characters below 037.
        if value =~ /[\000-\037]/
          raise LintError, "invalid header value #{key}: #{value.inspect}"
        end
      end

      ##
      ## === The content-type
      ##
      def check_content_type(status, headers)
        headers.each { |key, value|
          ## There must not be a <tt>content-type</tt> header key when the +Status+ is 1xx,
          ## 204, or 304.
          if key == "content-type"
            if Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.key? status.to_i
              raise LintError, "content-type header found in #{status} response, not allowed"
            end
            return
          end
        }
      end

      ##
      ## === The content-length
      ##
      def check_content_length(status, headers)
        headers.each { |key, value|
          if key == 'content-length'
            ## There must not be a <tt>content-length</tt> header key when the
            ## +Status+ is 1xx, 204, or 304.
            if Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.key? status.to_i
              raise LintError, "content-length header found in #{status} response, not allowed"
            end
            @content_length = value
          end
        }
      end

      def verify_content_length(size)
        if @head_request
          unless size == 0
            raise LintError, "Response body was given for HEAD request, but should be empty"
          end
        elsif @content_length
          unless @content_length == size.to_s
            raise LintError, "content-length header was #{@content_length}, but should be #{size}"
          end
        end
      end

      ##
      ## === The Body
      ##
      ## The Body is typically an +Array+ of +String+ instances, an enumerable
      ## that yields +String+ instances, a +Proc+ instance, or a File-like
      ## object.
      ##
      ## The Body must respond to +each+ or +call+. It may optionally respond
      ## to +to_path+ or +to_ary+. A Body that responds to +each+ is considered
      ## to be an Enumerable Body. A Body that responds to +call+ is considered
      ## to be a Streaming Body.
      ##
      ## A Body that responds to both +each+ and +call+ must be treated as an
      ## Enumerable Body, not a Streaming Body. If it responds to +each+, you
      ## must call +each+ and not +call+. If the Body doesn't respond to
      ## +each+, then you can assume it responds to +call+.
      ##
      ## The Body must either be consumed or returned. The Body is consumed by
      ## optionally calling either +each+ or +call+.
      ## Then, if the Body responds to +close+, it must be called to release
      ## any resources associated with the generation of the body.
      ## In other words, +close+ must always be called at least once; typically
      ## after the web server has sent the response to the client, but also in
      ## cases where the Rack application makes internal/virtual requests and
      ## discards the response.
      ##
      def close
        ##
        ## After calling +close+, the Body is considered closed and should not
        ## be consumed again.
        @closed = true

        ## If the original Body is replaced by a new Body, the new Body must
        ## also consume the original Body by calling +close+ if possible.
        @body.close if @body.respond_to?(:close)

        index = @lint.index(self)
        unless @env['rack.lint'][0..index].all? {|lint| lint.instance_variable_get(:@closed)}
          raise LintError, "Body has not been closed"
        end
      end

      def verify_to_path
        ##
        ## If the Body responds to +to_path+, it must return a +String+
        ## path for the local file system whose contents are identical
        ## to that produced by calling +each+; this may be used by the
        ## server as an alternative, possibly more efficient way to
        ## transport the response. The +to_path+ method does not consume
        ## the body.
        if @body.respond_to?(:to_path)
          unless ::File.exist? @body.to_path
            raise LintError, "The file identified by body.to_path does not exist"
          end
        end
      end

      ##
      ## ==== Enumerable Body
      ##
      def each
        ## The Enumerable Body must respond to +each+.
        raise LintError, "Enumerable Body must respond to each" unless @body.respond_to?(:each)

        ## It must only be called once.
        raise LintError, "Response body must only be invoked once (#{@invoked})" unless @invoked.nil?

        ## It must not be called after being closed.
        raise LintError, "Response body is already closed" if @closed

        @invoked = :each

        @body.each do |chunk|
          ## and must only yield String values.
          unless chunk.kind_of? String
            raise LintError, "Body yielded non-string value #{chunk.inspect}"
          end

          ##
          ## The Body itself should not be an instance of String, as this will
          ## break in Ruby 1.9.
          ##
          ## Middleware must not call +each+ directly on the Body.
          ## Instead, middleware can return a new Body that calls +each+ on the
          ## original Body, yielding at least once per iteration.
          if @lint[0] == self
            @env['rack.lint.body_iteration'] += 1
          else
            if (@env['rack.lint.body_iteration'] -= 1) > 0
              raise LintError, "New body must yield at least once per iteration of old body"
            end
          end

          @size += chunk.bytesize
          yield chunk
        end

        verify_content_length(@size)

        verify_to_path
      end

      BODY_METHODS = {to_ary: true, each: true, call: true, to_path: true}

      def to_path
        @body.to_path
      end

      def respond_to?(name, *)
        if BODY_METHODS.key?(name)
          @body.respond_to?(name)
        else
          super
        end
      end

      ##
      ## If the Body responds to +to_ary+, it must return an +Array+ whose
      ## contents are identical to that produced by calling +each+.
      ## Middleware may call +to_ary+ directly on the Body and return a new
      ## Body in its place. In other words, middleware can only process the
      ## Body directly if it responds to +to_ary+. If the Body responds to both
      ## +to_ary+ and +close+, its implementation of +to_ary+ must call
      ## +close+.
      def to_ary
        @body.to_ary.tap do |content|
          unless content == @body.enum_for.to_a
            raise LintError, "#to_ary not identical to contents produced by calling #each"
          end
        end
      ensure
        close
      end

      ##
      ## ==== Streaming Body
      ##
      def call(stream)
        ## The Streaming Body must respond to +call+.
        raise LintError, "Streaming Body must respond to call" unless @body.respond_to?(:call)

        ## It must only be called once.
        raise LintError, "Response body must only be invoked once (#{@invoked})" unless @invoked.nil?

        ## It must not be called after being closed.
        raise LintError, "Response body is already closed" if @closed

        @invoked = :call

        ## It takes a +stream+ argument.
        ##
        ## The +stream+ argument must implement:
        ## <tt>read, write, <<, flush, close, close_read, close_write, closed?</tt>
        ##
        @body.call(StreamWrapper.new(stream))
      end

      class StreamWrapper
        extend Forwardable

        ## The semantics of these IO methods must be a best effort match to
        ## those of a normal Ruby IO or Socket object, using standard arguments
        ## and raising standard exceptions. Servers are encouraged to simply
        ## pass on real IO objects, although it is recognized that this approach
        ## is not directly compatible with HTTP/2.
        REQUIRED_METHODS = [
          :read, :write, :<<, :flush, :close,
          :close_read, :close_write, :closed?
        ]

        def_delegators :@stream, *REQUIRED_METHODS

        def initialize(stream)
          @stream = stream

          REQUIRED_METHODS.each do |method_name|
            raise LintError, "Stream must respond to #{method_name}" unless stream.respond_to?(method_name)
          end
        end
      end

      # :startdoc:
    end
 gems/gems/rack-3.0.8/lib/rack/urlmap.rb000064400000005475150403134100013333 0ustar00gems/gems/rack-3.0.8/lib/rack/query_parser.rb000064400000020573150403134100014550 0ustar00# frozen_string_literal: true

require 'uri'

module Rack
  class QueryParser
    DEFAULT_SEP = /[&] */n
    COMMON_SEP = { ";" => /[;] */n, ";," => /[;,] */n, "&" => /[&] */n }

    # ParameterTypeError is the error that is raised when incoming structural
    # parameters (parsed by parse_nested_query) contain conflicting types.
    class ParameterTypeError < TypeError; end

    # InvalidParameterError is the error that is raised when incoming structural
    # parameters (parsed by parse_nested_query) contain invalid format or byte
    # sequence.
    class InvalidParameterError < ArgumentError; end

    # ParamsTooDeepError is the error that is raised when params are recursively
    # nested over the specified limit.
    class ParamsTooDeepError < RangeError; end

    def self.make_default(_key_space_limit=(not_deprecated = true; nil), param_depth_limit)
      unless not_deprecated
        warn("`first argument `key_space limit` is deprecated and no longer has an effect. Please call with only one argument, which will be required in a future version of Rack", uplevel: 1)
      end

      new Params, param_depth_limit
    end

    attr_reader :param_depth_limit

    def initialize(params_class, _key_space_limit=(not_deprecated = true; nil), param_depth_limit)
      unless not_deprecated
        warn("`second argument `key_space limit` is deprecated and no longer has an effect. Please call with only two arguments, which will be required in a future version of Rack", uplevel: 1)
      end

      @params_class = params_class
      @param_depth_limit = param_depth_limit
    end

    # Stolen from Mongrel, with some small modifications:
    # Parses a query string by breaking it up at the '&'.  You can also use this
    # to parse cookies by changing the characters used in the second parameter
    # (which defaults to '&').
    def parse_query(qs, separator = nil, &unescaper)
      unescaper ||= method(:unescape)

      params = make_params

      (qs || '').split(separator ? (COMMON_SEP[separator] || /[#{separator}] */n) : DEFAULT_SEP).each do |p|
        next if p.empty?
        k, v = p.split('=', 2).map!(&unescaper)

        if cur = params[k]
          if cur.class == Array
            params[k] << v
          else
            params[k] = [cur, v]
          end
        else
          params[k] = v
        end
      end

   gems/gems/rack-3.0.8/lib/rack/headers.rb000064400000005724150403134100013443 0ustar00    return params.to_h
    rescue ArgumentError => e
      raise InvalidParameterError, e.message, e.backtrace
    end

    # normalize_params recursively expands parameters into structural types. If
    # the structural types represented by two different parameter names are in
    # conflict, a ParameterTypeError is raised.  The depth argument is deprecated
    # and should no longer be used, it is kept for backwards compatibility with
    # earlier versions of rack.
    def normalize_params(params, name, v, _depth=nil)
      _normalize_params(params, name, v, 0)
    end

    private def _normalize_params(params, name, v, depth)
      raise ParamsTooDeepError if depth >= param_depth_limit

      if !name
        # nil name, treat same as empty string (required by tests)
        k = after = ''
      elsif depth == 0
        # Start of parsing, don't treat [] or [ at start of string specially
        if start = name.index('[', 1)
          # Start of parameter nesting, use part before brackets as key
          k = name[0, start]
          after = name[start, name.length]
        else
          # Plain parameter with no nesting
          k = name
          after = ''
        end
      elsif name.start_with?('[]')
        # Array nesting
        k = '[]'
        after = name[2, name.length]
      elsif name.start_with?('[') && (start = name.index(']', 1))
        # Hash nesting, use the part inside brackets as the key
        k = name[1, start-1]
        after = name[start+1, name.length]
      else
        # Probably malformed input, nested but not starting with [
        # treat full name as key for backwards compatibility.
        k = name
        after = ''
      end

      return if k.empty?

      if after == ''
        if k == '[]' && depth != 0
          return [v]
        else
          params[k] = v
        end
      elsif after == "["
        params[name] = v
      elsif after == "[]"
        params[k] ||= []
        raise ParameterTypeError, "expected Array (got #{params[k].class.name}) for param `#{k}'" unless params[k].is_a?(Array)
        params[k] << v
      elsif after.start_with?('[]')
        # Recognize x[][y] (hash inside array) parameters
        unless after[2] == '[' && after.end_with?(']') && (child_key = after[3, after.length-4]) && !child_key.empty? && !child_key.index('[') && !child_key.index(']')
          # Handle other nested array parameters
          child_key = after[2, after.length]
        end
        params[k] ||= []
        raise ParameterTypeError, "expected Array (got #{params[k].class.name}) for param `#{k}'" unless params[k].is_a?(Array)
        if params_hash_type?(params[k].last) && !params_hash_has_key?(params[k].last, child_key)
          _normalize_params(params[k].last, child_key, v, depth + 1)
        else
          params[k] << _normalize_params(make_params, child_key, v, depth + 1)
        end
      else
        params[k] ||= make_params
        raise ParameterTypeError, "expected Hash (got #{params[k].class.name}) for param `gems/gems/rack-3.0.8/lib/rack/file.rb000064400000000247150403134100012742 0ustar00        return false unless params_hash_type?(h) && h.key?(part)
        h[part]
      end

      true
    end

    def unescape(string, encoding = Encoding::UTF_8)
  gems/gems/rack-3.0.8/lib/rack/content_type.rb000064400000001267150403134100014541 0ustar00     representation, not a copy.
      #
      #   3. Because the `Params` object's internal representation is mutable
      #      through the `#[]=` method, it is not thread safe. The result of
      #      getting the hash representation while another thread is adding a
      #      key to it is non-deterministic.
      #
      def to_h
        @params.each do |key, value|
          case value
          when self
            # Handle circular references gracefully.
            @params[key] = @params
          when Params
            @params[key] = value.to_h
          when Array
            value.map! { |v| v.kind_of?(Params) ? v.to_h : v }
          else
            # Ignore anythingems/gems/rack-3.0.8/lib/rack/body_proxy.rb000064400000002463150403134110014224 0ustar00# frozen_string_literal: true

require 'set'

require_relative 'constants'

module Rack
  # Rack::URLMap takes a hash mapping urls or paths to apps, and
  # dispatches accordingly.  Support for HTTP/1.1 host names exists if
  # the URLs start with <tt>http://</tt> or <tt>https://</tt>.
  #
  # URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part
  # relevant for dispatch is in the SCRIPT_NAME, and the rest in the
  # PATH_INFO.  This should be taken care of when you need to
  # reconstruct the URL in order to create links.
  #
  # URLMap dispatches in such a way that the longest paths are tried
  # first, since they are most specific.

  class URLMap
    def initialize(map = {})
      remap(map)
    end

    def remap(map)
      @known_hosts = Set[]
      @mapping = map.map { |location, app|
        if location =~ %r{\Ahttps?://(.*?)(/.*)}
          host, location = $1, $2
          @known_hosts << host
        else
          host = nil
        end

        unless location[0] == ?/
          raise ArgumentError, "paths need to start with /"
        end

        location = location.chomp('/')
        match = Regexp.new("^#{Regexp.quote(location).gsub('/', '/+')}(.*)", Regexp::NOENCODING)

        [host, location, match, app]
      }.sort_by do |(host, location, _, _)|
        [host ? -host.size : Flgems/gems/rack-3.0.8/lib/rack/config.rb000064400000000632150403134110013267 0ustar00irst without a specified host
          next
        end

        next unless m = match.match(path.to_s)

        rest = m[1]
        next unless !rest || rest.empty? || rest[0] == ?/

        env[SCRIPT_NAME] = (script_name + location)
        env[PATH_INFO] = rest

        return app.call(env)
      end

      [404, { CONTENT_TYPE => "text/plain", "x-cascade" => "pass" }, ["Not Found: #{path}"]]

    ensugems/gems/rack-3.0.8/lib/rack/media_type.rb000064400000002631150403134110014143 0ustar00gems/gems/rack-3.0.8/lib/rack/headers.rb000064400000005724150403134100013443 0ustar00module Rack
  # Rack::Headers is a Hash subclass that downcases all keys.  It's designed
  # to be used by rack applications that don't implement the Rack 3 SPEC
  # (by using non-lowercase response header keys), automatically handling
  # the downcasing of keys.
  class Headers < Hash
    def self.[](*items)
      if items.length % 2 != 0
        if items.length == 1 && items.first.is_a?(Hash)
          new.merge!(items.first)
        else
          raise ArgumentError, "odd number of arguments for Rack::Headers"
        end
      else
        hash = new
        loop do
          break if items.length == 0
          key = items.shift
          value = items.shift
          hash[key] = value
        end
        hash
      end
    end

    def [](key)
      super(downcase_key(key))
    end

    def []=(key, value)
      super(key.downcase.freeze, value)
    end
    alias store []=

    def assoc(key)
      sugems/gems/rack-3.0.8/lib/rack/lock.rb000064400000001075150403134110012754 0ustar00self.class.new
      each{|key, value| hash[value] = key}
      hash
    end

    def merge(hash, &block)
      dup.merge!(hash, &block)
    end

    def reject(&block)
      hash = dup
      hash.reject!(&block)
      hash
    end

    def replace(hash)
      clear
      update(hash)
    end

    def select(&block)
      hash = dup
      hash.select!(&block)
      hash
    end

    def to_proc
      lambda{|x| self[x]}
    end

    def transform_values(&block)
      dup.transform_values!(&block)
    end

    def update(hash, &block)
      hash.each do |key, value|
 gems/gems/rack-3.0.8/lib/rack/content_length.rb000064400000001446150403134110015041 0ustar00gems/gems/rack-3.0.8/lib/rack/file.rb000064400000000247150403134100012742 0ustar00# frozen_string_literal: true

require_relative 'files'

module Rack
  warn "Rack::File is deprecated and will be removed in Rack 3.1", uplevel: 1

  File = Files
end
gems/gems/rack-3.0.8/lib/rack/response.rb000064400000025345150403134110013670 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'

module Rack

  # Sets the content-type header on responses which don't have one.
  #
  # Builder Usage:
  #   use Rack::ContentType, "text/plain"
  #
  # When no content type argument is provided, "text/html" is the
  # default.
  class ContentType
    include Rack::Utils

    def initialize(app, content_type = "text/html")
      @app = app
      @content_type = content_type
    end

    def call(env)
      status, headers, _ = response = @app.call(env)

      unless STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i)
        headers[CONTENT_TYPE] ||= @content_type
      end

      response
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/body_proxy.rb000064400000002463150403134110014224 0ustar00# frozen_string_literal: true

module Rack
  # Proxy for response bodies allowing calling a block when
  # the response body is closed (after the response has been fully
  # sent to the client).
  class BodyProxy
    # Set the response body to wrap, and the block to call when the
    # response has been fully sent.
    def initialize(body, &block)
      @body = body
      @block = block
      @closed = false
    end

    # Return whether the wrapped body responds to the method.
    def respond_to_missing?(method_name, include_all = false)
      super or @body.respond_to?(method_name, include_all)
    end

    # If not already closed, close the wrapped body and
    # then call the block the proxy was initialized with.
    def close
      return if @closed
      @closed = true
      begin
        @body.close if @body.respond_to?(:close)
      ensure
        @block.call
      end
    end

    # Whether the proxy is closed.  The proxy starts as not closed,
    # and becomes closed on the first call to close.
    def closed?
      @closed
    end

    # Delegate missing methods to the wrapped body.
    def method_missing(method_name, *args, &block)
      @body.__send__(method_name, *args, &block)
    end
    # :nocov:
    ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
    # :nocov:
  end
end
gems/gems/rack-3.0.8/lib/rack/config.rb000064400000000632150403134110013267 0ustar00# frozen_string_literal: true

module Rack
  # Rack::Config modifies the environment using the block given during
  # initialization.
  #
  # Example:
  #     use Rack::Config do |env|
  #       env['my-key'] = 'some-value'
  #     end
  class Config
    def initialize(app, &block)
      @app = app
      @block = block
    end

    def call(env)
      @block.call(env)
      @app.call(env)
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/media_type.rb000064400000002631150403134110014143 0ustar00# frozen_string_literal: true

module Rack
  # Rack::MediaType parse media type and parameters out of content_type string

  class MediaType
    SPLIT_PATTERN = %r{\s*[;,]\s*}

    class << self
      # The media type (type/subtype) portion of the CONTENT_TYPE header
      # without any media type parameters. e.g., when CONTENT_TYPE is
      # "text/plain;charset=utf-8", the media-type is "text/plain".
      #
      # For more information on the use of media types in HTTP, see:
      # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
      def type(content_type)
        return nil unless content_type
        content_type.split(SPLIT_PATTERN, 2).first.tap(&:downcase!)
      end

      # The media type parameters provided in CONTENT_TYPE as a Hash, or
      # an empty Hash if no CONTENT_TYPE or media-type parameters were
      # provided.  e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8",
      # this method responds with the following Hash:
      #   { 'charset' => 'utf-8' }
      def params(content_type)
        return {} if content_type.nil?

        content_type.split(SPLIT_PATTERN)[1..-1].each_with_object({}) do |s, hsh|
          k, v = s.split('=', 2)

          hsh[k.tap(&:downcase!)] = strip_doublequotes(v)
        end
      end

      private

        def strip_doublequotes(str)
          (str.start_with?('"') && str.end_with?('"')) ? str[1..-2] : str
        end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/lock.rb000064400000001075150403134110012754 0ustar00# frozen_string_literal: true

require_relative 'body_proxy'

module Rack
  # Rack::Lock locks every request inside a mutex, so that every request
  # will effectively be executed synchronously.
  class Lock
    def initialize(app, mutex = Mutex.new)
      @app, @mutex = app, mutex
    end

    def call(env)
      @mutex.lock
      begin
        response = @app.call(env)
        returned = response << BodyProxy.new(response.pop) { unlock }
      ensure
        unlock unless returned
      end
    end

    private

    def unlock
      @mutex.unlock
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/content_length.rb000064400000001446150403134110015041 0ustar00# frozen_string_literal: true

require_relative 'constants'
require_relative 'utils'

module Rack

  # Sets the content-length header on responses that do not specify
  # a content-length or transfer-encoding header.  Note that this
  # does not fix responses that have an invalid content-length
  # header specified.
  class ContentLength
    include Rack::Utils

    def initialize(app)
      @app = app
    end

    def call(env)
      status, headers, body = response = @app.call(env)

      if !STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) &&
         !headers[CONTENT_LENGTH] &&
         !headers[TRANSFER_ENCODING] &&
         body.respond_to?(:to_ary)

        response[2] = body = body.to_ary
        headers[CONTENT_LENGTH] = body.sum(&:bytesize).to_s
      end

      response
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/response.rb000064400000025345150403134110013670 0ustar00# frozen_string_literal: true

require 'time'

require_relative 'constants'
require_relative 'utils'
require_relative 'media_type'
require_relative 'headers'

module Rack
  # Rack::Response provides a convenient interface to create a Rack
  # response.
  #
  # It allows setting of headers and cookies, and provides useful
  # defaults (an OK response with empty headers and body).
  #
  # You can use Response#write to iteratively generate your response,
  # but note that this is buffered by Rack::Response until you call
  # +finish+.  +finish+ however can take a block inside which calls to
  # +write+ are synchronous with the Rack response.
  #
  # Your application's +call+ should end returning Response#finish.
  class Response
    def self.[](status, headers, body)
      self.new(body, status, headers)
    end

    CHUNKED = 'chunked'
    STATUS_WITH_NO_ENTITY_BODY = Utils::STATUS_WITH_NO_ENTITY_BODY

    attr_accessor :length, :status, :body
    attr_reader :headers

    # Deprecated, use headers instead.
    def header
      warn 'Rack::Response#header is deprecated and will be removed in Rack 3.1', uplevel: 1

      headers
    end

    # Initialize the response object with the specified +body+, +status+
    # and +headers+.
    #
gems/gems/rack-3.0.8/lib/rack/mime.rb000064400000101301150403134110012744 0ustar00 # instance and the value can be either a +String+ or +Array+ instance.
    def initialize(body = nil, status = 200, headers = {})
      @status = status.to_i

      unless headers.is_a?(Hash)
        warn "Providing non-hash headers to Rack::Response is deprecated and will be removed in Rack 3.1", uplevel: 1
      end

      @headers = Headers.new
      # Convert headers input to a plain hash with lowercase keys.
      headers.each do |k, v|
        @headers[k] = v
      end

      @writer = self.method(:append)

      @block = nil

      # Keep track of whether we have expanded the user supplied body.
      if body.nil?
        @body = []
        @buffered = true
        @length = 0
      elsif body.respond_to?(:to_str)
        @body = [body]
        @buffered = true
        @length = body.to_str.bytesize
      else
        @body = body
        @buffered = nil # undetermined as of yet.
        @length = 0
      end

      yield self if block_given?
    end

    def redirect(target, status = 302)
      self.status = status
      self.location = target
    end

    def chunked?
      CHUNKED == get_header(TRANSFER_ENCODING)
    end

    def no_entity_body?
      # The response body is an enumerable body and it is not allowed to have an entity body.
      @body.respond_to?(:each) && STATUS_WITH_NO_ENTITY_BODY[@status]
    end
    
    # Generate a response array consistent with the requirements of the SPEC.
    # @return [Array] a 3-tuple suitable of `[status, headers, body]`
    # which is suitable to be returned from the middleware `#call(env)` method.
    def finish(&block)
      if no_entity_body?
        delete_header CONTENT_TYPE
        delete_header CONTENT_LENGTH
        close
        return [@status, @headers, []]
      else
        if block_given?
          @block = block
          return [@status, @headers, self]
        else
          return [@status, @headers, @body]
        end
      end
    end

    alias to_a finish           # For *response

    def each(&callback)
      @body.each(&callback)
      @buffered = true

      if @block
        @writer = callback
        @block.call(self)
      end
    end

    # Append to body and update content-length.
    #
    # NOTE: Do not mix #write and direct #body access!
    #
    def write(chunk)
      buffered_body!

      @writer.call(chunk.to_s)
    end

    def close
      @body.close if @body.respond_to?(:close)
    end

    def empty?
      @block == nil && @body.empty?
    end

    def has_header?(key)
      raise ArgumentError unless key.is_a?(String)
      @headers.key?(key)
    end
    def get_header(key)
      raise ArgumentError unless key.is_a?(String)
      @headers[key]
    end
    def set_header(key, value)
      raise ArgumentError unless key.is_a?(String)
      @headers[key] = value
    end
    def delete_header(key)
      raise ArgumentError unless key.is_a?(String)
      @headers.delete key
    end

    alias :[] :get_header
    alias :[]= :set_header

    module Helpers
      def invalid?;             status < 100 || status >= 600;        end

      def informational?;       status >= 100 && status < 200;        end
      def successful?;          status >= 200 && status < 300;        end
      def redirection?;         status >= 300 && status < 400;        end
      def client_error?;        status >= 400 && status < 500;        end
      def server_error?;        status >= 500 && status < 600;        end

      def ok?;                  status == 200;                        end
      def created?;             status == 201;                        end
      def accepted?;            status == 202;                        end
      def no_content?;          status == 204;                        end
      def moved_permanently?;   status == 301;                        end
      def bad_request?;         status == 400;                        end
      def unauthorized?;        status == 401;                        end
      def forbidden?;           status == 403;                        end
      def not_found?;           status == 404;                        end
      def method_not_allowed?;  status == 405;                        end
      def not_acceptable?;      status == 406;                        end
      def request_timeout?;     status == 408;                        end
      def precondition_failed?; status == 412;                        end
      def unprocessable?;       status == 422;                        end

      def redirect?;            [301, 302, 303, 307, 308].include? status; end

      def include?(header)
        has_header?(header)
      end

      # Add a header that may have multiple values.
      #
      # Example:
      #   response.add_header 'vary', 'accept-encoding'
      #   response.add_header 'vary', 'cookie'
      #
      #   assert_equal 'accept-encoding,cookie', response.get_header('vary')
      #
      # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
      def add_header(key, value)
        raise ArgumentError unless key.is_a?(String)

        if value.nil?
          return get_header(key)
        end

        value = value.to_s

        if header = get_header(key)
          if header.is_a?(Array)
            header << value
          else
            set_header(key, [header, value])
          end
        else
          set_header(key, value)
        end
      end

      # Get the content type of the response.
      def content_type
        get_header CONTENT_TYPE
      end

      # Set the content type of the response.
      def content_type=(content_type)
        set_header CONTENT_TYPE, content_type
      end

      def media_type
        MediaType.type(content_type)
      end

      def media_type_params
        MediaType.params(content_type)
      end

      def content_length
        cl = get_header CONTENT_LENGTH
        cl ? cl.to_i : cl
      end

      def location
        get_header "location"
      end

      def location=(location)
        set_header "location", location
      end

      def set_cookie(key, value)
        add_header SET_COOKIE, Utils.set_cookie_header(key, value)
      end

      def delete_cookie(key, value = {})
        set_header(SET_COOKIE,
          Utils.delete_set_cookie_header!(
            get_header(SET_COOKIE), key, value
          )
        )
      end

      def set_cookie_header
        get_header SET_COOKIE
      end

      def set_cookie_header=(value)
        set_header SET_COOKIE, value
      end

      def cache_control
        get_header CACHE_CONTROL
      end

      def cache_control=(value)
        set_header CACHE_CONTROL, value
      end

      # Specifies that the content shouldn't be cached. Overrides `cache!` if already called.
      def do_not_cache!
        set_header CACHE_CONTROL, "no-cache, must-revalidate"
        set_header EXPIRES, Time.now.httpdate
      end

      # Specify that the content should be cached.
      # @param duration [Integer] The number of seconds until the cache expires.
      # @option directive [String] The cache control directive, one of "public", "private", "no-cache" or "no-store".
      def cache!(duration = 3600, directive: "public")
        unless headers[CACHE_CONTROL] =~ /no-cache/
          set_header CACHE_CONTROL, "#{directive}, max-age=#{duration}"
          set_header EXPIRES, (Time.now + duration).httpdate
        end
      end

      def etag
        get_header ETAG
      end

      def etag=(value)
        set_header ETAG, value
      end

    protected

      def buffered_body!
        if @buffered.nil?
          if @body.is_a?(Array)
            # The user supplied body was an array:
            @body = @body.compact
            @body.each do |part|
              @length += part.to_s.bytesize
            end
          elsif @body.respond_to?(:each)
            # Turn the user supplied body into a buffered array:
            body = @body
            @body = Array.new

            body.each do |part|
              @writer.call(part.to_s)
            end

            body.close if body.respond_to?(:close)

            @buffered = true
          else
            @buffered = false
          end
        end

        return @buffered
      end

      def append(chunk)
        @body << chunk

        unless chunked?
          @length += chunk.bytesize
          set_header(CONTENT_LENGTH, @length.to_s)
        end

        return chunk
      end
    end

    include Helpers

    class Raw
      include Helpers

      attr_reader :headers
      attr_accessor :status

      def initialize(status, headers)
        @status = status
        @headers = headers
      end

      def has_header?(key)
        headers.key?(key)
      end

      def get_header(key)
        headers[key]
      end

      def set_header(key, value)
        headers[key] = value
      end

      def delete_header(key)
        headers.delete(key)
      end
    end
  end
end
gems/gems/rack-3.0.8/lib/rack/mime.rb000064400000101301150403134110012744 0ustar00# frozen_string_literal: true

module Rack
  module Mime
    # Returns String with mime type if found, otherwise use +fallback+.
    # +ext+ should be filename extension in the '.ext' format that
    #       File.extname(file) returns.
    # +fallback+ may be any object
    #
    # Also see the documentation for MIME_TYPES
    #
    # Usage:
    #     Rack::Mime.mime_type('.foo')
    #
    # This is a shortcut for:
    #     Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream')

    def mime_type(ext, fallback = 'application/octet-stream')
      MIME_TYPES.fetch(ext.to_s.downcase, fallback)
    end
    module_function :mime_type

    # Returns true if the given value is a mime match for the given mime match
    # specification, false otherwise.
    #
    #    Rack::Mime.match?('text/html', 'text/*') => true
    #    Rack::Mime.match?('text/plain', '*') => true
    #    Rack::Mime.match?('text/html', 'application/json') => false

    def match?(value, matcher)
      v1, v2 = value.split('/', 2)
      m1, m2 = matcher.split('/', 2)

      (m1 == '*' || v1 == m1) && (m2.nil? || m2 == '*' || m2 == v2)
    end
    module_function :match?

    # List of most common mime-types, selected various sources
    # according to their usefulness in a webserving scope for Ruby
    # users.
    #
    # To amend this list with your local mime.types list you can use:
    #
    #     require 'webrick/httputils'
    #     list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types')
    #     Rack::Mime::MIME_TYPES.merge!(list)
    #
    # N.B. On Ubuntu the mime.types file does not include the leading period, so
    # users may need to modify the data before merging into the hash.

    MIME_TYPES = {
      ".123"       => "application/vnd.lotus-1-2-3",
      ".3dml"      => "text/vnd.in3d.3dml",
      ".3g2"       => "video/3gpp2",
      ".3gp"       => "video/3gpp",
      ".a"         => "application/octet-stream",
      ".acc"       => "application/vnd.americandynamics.acc",
      ".ace"       => "application/x-ace-compressed",
      ".acu"       => "application/vnd.acucobol",
      ".aep"       => "application/vnd.audiograph",
      ".afp"       => "application/vnd.ibm.modcap",
      ".ai"        => "application/postscript",
      ".aif"       => "audio/x-aiff",
      ".aiff"      => "audio/x-aiff",
      ".ami"       => "application/vnd.amiga.ami",
      ".apng"      => "image/apng",
      ".appcache"  => "text/cache-manifest",
      ".apr"       => "application/vnd.lotus-approach",
      ".asc"       => "application/pgp-signature",
      ".asf"       => "video/x-ms-asf",
      ".asm"       => "text/x-asm",
      ".aso"       => "application/vnd.accpac.simply.aso",
      ".asx"       => "video/x-ms-asf",
      ".atc"       => "application/vnd.acucorp",
      ".atom"      => "application/atom+xml",
      ".atomcat"   => "application/atomcat+xml",
      ".atomsvc"   => "application/atomsvc+xml",
      ".atx"       => "application/vnd.antix.game-component",
      ".au"        => "audio/basic",
      ".avi"       => "video/x-msvideo",
      ".avif"      => "image/avif",
      ".bat"       => "application/x-msdownload",
      ".bcpio"     => "application/x-bcpio",
      ".bdm"       => "application/vnd.syncml.dm+wbxml",
      ".bh2"       => "application/vnd.fujitsu.oasysprs",
      ".bin"       => "application/octet-stream",
      ".bmi"       => "application/vnd.bmi",
      ".bmp"       => "image/bmp",
      ".box"       => "application/vnd.previewsystems.box",
      ".btif"      => "image/prs.btif",
      ".bz"        => "application/x-bzip",
      ".bz2"       => "application/x-bzip2",
      ".c"         => "text/x-c",
      ".c4g"       => "application/vnd.clonk.c4group",
      ".cab"       => "application/vnd.ms-cab-compressed",
      ".cc"        => "text/x-c",
      ".ccxml"     => "application/ccxml+xml",
      ".cdbcmsg"   => "application/vnd.contact.cmsg",
      ".cdkey"     => "application/vnd.mediastation.cdkey",
      ".cdx"       => "chemical/x-cdx",
      ".cdxml"     => "application/vnd.chemdraw+xml",
      ".cdy"       => "application/vnd.cinderella",
      ".cer"       => "application/pkix-cert",
      ".cgm"       => "image/cgm",
      ".chat"      => "application/x-chat",
      ".chm"       => "application/vnd.ms-htmlhelp",
      ".chrt"      => "application/vnd.kde.kchart",
      ".cif"       => "chemical/x-cif",
      ".cii"       => "application/vnd.anser-web-certificate-issue-initiation",
      ".cil"       => "application/vnd.ms-artgalry",
      ".cla"       => "application/vnd.claymore",
      ".class"     => "application/octet-stream",
      ".clkk"      => "application/vnd.crick.clicker.keyboard",
      ".clkp"      => "application/vnd.crick.clicker.palette",
      ".clkt"      => "application/vnd.crick.clicker.template",
      ".clkw"      => "application/vnd.crick.clicker.wordbank",
      ".clkx"      => "application/vnd.crick.clicker",
      ".clp"       => "application/x-msclip",
      ".cmc"       => "application/vnd.cosmocaller",
      ".cmdf"      => "chemical/x-cmdf",
      ".cml"       => "chemical/x-cml",
      ".cmp"       => "application/vnd.yellowriver-custom-menu",
      ".cmx"       => "image/x-cmx",
      ".com"       => "application/x-msdownload",
      ".conf"      => "text/plain",
      ".cpio"      => "application/x-cpio",
      ".cpp"       => "text/x-c",
      ".cpt"       => "application/mac-compactpro",
      ".crd"       => "application/x-mscardfile",
      ".crl"       => "application/pkix-crl",
      ".crt"       => "application/x-x509-ca-cert",
      ".csh"       => "application/x-csh",
      ".csml"      => "chemical/x-csml",
      ".csp"       => "application/vnd.commonspace",
      ".css"       => "text/css",
      ".csv"       => "text/csv",
      ".curl"      => "application/vnd.curl",
      ".cww"       => "application/prs.cww",
      ".cxx"       => "text/x-c",
      ".daf"       => "application/vnd.mobius.daf",
      ".davmount"  => "application/davmount+xml",
      ".dcr"       => "application/x-director",
      ".dd2"       => "application/vnd.oma.dd2+xml",
      ".ddd"       => "application/vnd.fujixerox.ddd",
      ".deb"       => "application/x-debian-package",
      ".der"       => "application/x-x509-ca-cert",
      ".dfac"      => "application/vnd.dreamfactory",
      ".diff"      => "text/x-diff",
      ".dis"       => "application/vnd.mobius.dis",
      ".djv"       => "image/vnd.djvu",
      ".djvu"      => "image/vnd.djvu",
      ".dll"       => "application/x-msdownload",
      ".dmg"       => "application/octet-stream",
      ".dna"       => "application/vnd.dna",
      ".doc"       => "application/msword",
      ".docm"      => "application/vnd.ms-word.document.macroEnabled.12",
      ".docx"      => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      ".dot"       => "application/msword",
      ".dotm"      => "application/vnd.ms-word.template.macroEnabled.12",
      ".dotx"      => "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
      ".dp"        => "application/vnd.osgi.dp",
      ".dpg"       => "application/vnd.dpgraph",
      ".dsc"       => "text/prs.lines.tag",
      ".dtd"       => "application/xml-dtd",
      ".dts"       => "audio/vnd.dts",
      ".dtshd"     => "audio/vnd.dts.hd",
      ".dv"        => "video/x-dv",
      ".dvi"       => "application/x-dvi",
      ".dwf"       => "model/vnd.dwf",
      ".dwg"       => "image/vnd.dwg",
      ".dxf"       => "image/vnd.dxf",
      ".dxp"       => "application/vnd.spotfire.dxp",
      ".ear"       => "application/java-archive",
      ".ecelp4800" => "audio/vnd.nuera.ecelp4800",
      ".ecelp7470" => "audio/vnd.nuera.ecelp7470",
      ".ecelp9600" => "audio/vnd.nuera.ecelp9600",
      ".ecma"      => "application/ecmascript",
      ".edm"       => "application/vnd.novadigm.edm",
      ".edx"       => "application/vnd.novadigm.edx",
      ".efif"      => "application/vnd.picsel",
      ".ei6"       => "application/vnd.pg.osasli",
      ".eml"       => "message/rfc822",
      ".eol"       => "audio/vnd.digital-winds",
      ".eot"       => "application/vnd.ms-fontobject",
      ".eps"       => "application/postscript",
      ".es3"       => "application/vnd.eszigno3+xml",
      ".esf"       => "application/vnd.epson.esf",
      ".etx"       => "text/x-setext",
      ".exe"       => "application/x-msdownload",
      ".ext"       => "application/vnd.novadigm.ext",
      ".ez"        => "application/andrew-inset",
      ".ez2"       => "application/vnd.ezpix-album",
      ".ez3"       => "application/vnd.ezpix-package",
      ".f"         => "text/x-fortran",
      ".f77"       => "text/x-fortran",
      ".f90"       => "text/x-fortran",
      ".fbs"       => "image/vnd.fastbidsheet",
      ".fdf"       => "application/vnd.fdf",
      ".fe_launch" => "application/vnd.denovo.fcselayout-link",
      ".fg5"       => "application/vnd.fujitsu.oasysgp",
      ".fli"       => "video/x-fli",
      ".flif"      => "image/flif",
      ".flo"       => "application/vnd.micrografx.flo",
      ".flv"       => "video/x-flv",
      ".flw"       => "application/vnd.kde.kivio",
      ".flx"       => "text/vnd.fmi.flexstor",
      ".fly"       => "text/vnd.fly",
      ".fm"        => "application/vnd.framemaker",
      ".fnc"       => "application/vnd.frogans.fnc",
      ".for"       => "text/x-fortran",
      ".fpx"       => "image/vnd.fpx",
      ".fsc"       => "application/vnd.fsc.weblaunch",
      ".fst"       => "image/vnd.fst",
      ".ftc"       => "application/vnd.fluxtime.clip",
      ".fti"       => "application/vnd.anser-web-funds-transfer-initiation",
      ".fvt"       => "video/vnd.fvt",
      ".fzs"       => "application/vnd.fuzzysheet",
      ".g3"        => "image/g3fax",
      ".gac"       => "application/vnd.groove-account",
      ".gdl"       => "model/vnd.gdl",
      ".gem"       => "application/octet-stream",
      ".gemspec"   => "text/x-script.ruby",
      ".ghf"       => "application/vnd.groove-help",
      ".gif"       => "image/gif",
      ".gim"       => "application/vnd.groove-identity-message",
      ".gmx"       => "application/vnd.gmx",
      ".gph"       => "application/vnd.flographit",
      ".gqf"       => "application/vnd.grafeq",
      ".gram"      => "application/srgs",
      ".grv"       => "application/vnd.groove-injector",
      ".grxml"     => "application/srgs+xml",
      ".gtar"      => "application/x-gtar",
      ".gtm"       => "application/vnd.groove-tool-message",
      ".gtw"       => "model/vnd.gtw",
      ".gv"        => "text/vnd.graphviz",
      ".gz"        => "application/x-gzip",
      ".h"         => "text/x-c",
      ".h261"      => "video/h261",
      ".h263"      => "video/h263",
      ".h264"      => "video/h264",
      ".hbci"      => "application/vnd.hbci",
      ".hdf"       => "application/x-hdf",
      ".heic"      => "image/heic",
      ".heics"     => "image/heic-sequence",
      ".heif"      => "image/heif",
      ".heifs"     => "image/heif-sequence",
      ".hh"        => "text/x-c",
      ".hlp"       => "application/winhlp",
      ".hpgl"      => "application/vnd.hp-hpgl",
      ".hpid"      => "application/vnd.hp-hpid",
      ".hps"       => "application/vnd.hp-hps",
      ".hqx"       => "application/mac-binhex40",
      ".htc"       => "text/x-component",
      ".htke"      => "application/vnd.kenameaapp",
      ".htm"       => "text/html",
      ".html"      => "text/html",
      ".hvd"       => "application/vnd.yamaha.hv-dic",
      ".hvp"       => "application/vnd.yamaha.hv-voice",
      ".hvs"       => "application/vnd.yamaha.hv-script",
      ".icc"       => "application/vnd.iccprofile",
      ".ice"       => "x-conference/x-cooltalk",
      ".ico"       => "image/vnd.microsoft.icon",
      ".ics"       => "text/calendar",
      ".ief"       => "image/ief",
      ".ifb"       => "text/calendar",
      ".ifm"       => "application/vnd.shana.informed.formdata",
      ".igl"       => "application/vnd.igloader",
      ".igs"       => "model/iges",
      ".igx"       => "application/vnd.micrografx.igx",
      ".iif"       => "application/vnd.shana.informed.interchange",
      ".imp"       => "application/vnd.accpac.simply.imp",
      ".ims"       => "application/vnd.ms-ims",
      ".ipk"       => "application/vnd.shana.informed.package",
      ".irm"       => "application/vnd.ibm.rights-management",
      ".irp"       => "application/vnd.irepository.package+xml",
      ".iso"       => "application/octet-stream",
      ".itp"       => "application/vnd.shana.informed.formtemplate",
      ".ivp"       => "application/vnd.immervision-ivp",
      ".ivu"       => "application/vnd.immervision-ivu",
      ".jad"       => "text/vnd.sun.j2me.app-descriptor",
      ".jam"       => "application/vnd.jam",
      ".jar"       => "application/java-archive",
      ".java"      => "text/x-java-source",
      ".jisp"      => "application/vnd.jisp",
      ".jlt"       => "application/vnd.hp-jlyt",
      ".jnlp"      => "application/x-java-jnlp-file",
      ".joda"      => "application/vnd.joost.joda-archive",
      ".jp2"       => "image/jp2",
      ".jpeg"      => "image/jpeg",
      ".jpg"       => "image/jpeg",
      ".jpgv"      => "video/jpeg",
      ".jpm"       => "video/jpm",
      ".js"        => "application/javascript",
      ".json"      => "application/json",
      ".karbon"    => "application/vnd.kde.karbon",
      ".kfo"       => "application/vnd.kde.kformula",
      ".kia"       => "application/vnd.kidspiration",
      ".kml"       => "application/vnd.google-earth.kml+xml",
      ".kmz"       => "application/vnd.google-earth.kmz",
      ".kne"       => "application/vnd.kinar",
      ".kon"       => "application/vnd.kde.kontour",
      ".kpr"       => "application/vnd.kde.kpresenter",
      ".ksp"       => "application/vnd.kde.kspread",
      ".ktz"       => "application/vnd.kahootz",
      ".kwd"       => "application/vnd.kde.kword",
      ".latex"     => "application/x-latex",
      ".lbd"       => "application/vnd.llamagraphics.life-balance.desktop",
      ".lbe"       => "application/vnd.llamagraphics.life-balance.exchange+xml",
      ".les"       => "application/vnd.hhe.lesson-player",
      ".link66"    => "application/vnd.route66.link66+xml",
      ".log"       => "text/plain",
      ".lostxml"   => "application/lost+xml",
      ".lrm"       => "application/vnd.ms-lrm",
      ".ltf"       => "application/vnd.frogans.ltf",
      ".lvp"       => "audio/vnd.lucent.voice",
      ".lwp"       => "application/vnd.lotus-wordpro",
      ".m3u"       => "audio/x-mpegurl",
      ".m3u8"      => "application/x-mpegurl",
      ".m4a"       => "audio/mp4a-latm",
      ".m4v"       => "video/mp4",
      ".ma"        => "application/mathematica",
      ".mag"       => "application/vnd.ecowin.chart",
      ".man"       => "text/troff",
      ".manifest"  => "text/cache-manifest",
      ".mathml"    => "application/mathml+xml",
      ".mbk"       => "application/vnd.mobius.mbk",
      ".mbox"      => "application/mbox",
      ".mc1"       => "application/vnd.medcalcdata",
      ".mcd"       => "application/vnd.mcd",
      ".mdb"       => "application/x-msaccess",
      ".mdi"       => "image/vnd.ms-modi",
      ".mdoc"      => "text/troff",
      ".me"        => "text/troff",
      ".mfm"       => "application/vnd.mfmp",
      ".mgz"       => "application/vnd.proteus.magazine",
      ".mid"       => "audio/midi",
      ".midi"      => "audio/midi",
      ".mif"       => "application/vnd.mif",
      ".mime"      => "message/rfc822",
      ".mj2"       => "video/mj2",
      ".mlp"       => "application/vnd.dolby.mlp",
      ".mmd"       => "application/vnd.chipnuts.karaoke-mmd",
      ".mmf"       => "application/vnd.smaf",
      ".mml"       => "application/mathml+xml",
      ".mmr"       => "image/vnd.fujixerox.edmics-mmr",
      ".mng"       => "video/x-mng",
      ".mny"       => "application/x-msmoney",
      ".mov"       => "video/quicktime",
      ".movie"     => "video/x-sgi-movie",
      ".mp3"       => "audio/mpeg",
      ".mp4"       => "video/mp4",
      ".mp4a"      => "audio/mp4",
      ".mp4s"      => "application/mp4",
      ".mp4v"      => "video/mp4",
      ".mpc"       => "application/vnd.mophun.certificate",
      ".mpd"       => "application/dash+xml",
      ".mpeg"      => "video/mpeg",
      ".mpg"       => "video/mpeg",
      ".mpga"      => "audio/mpeg",
      ".mpkg"      => "application/vnd.apple.installer+xml",
      ".mpm"       => "application/vnd.blueice.multipass",
      ".mpn"       => "application/vnd.mophun.application",
      ".mpp"       => "application/vnd.ms-project",
      ".mpy"       => "application/vnd.ibm.minipay",
      ".mqy"       => "application/vnd.mobius.mqy",
      ".mrc"       => "application/marc",
      ".ms"        => "text/troff",
      ".mscml"     => "application/mediaservercontrol+xml",
      ".mseq"      => "application/vnd.mseq",
      ".msf"       => "application/vnd.epson.msf",
      ".msh"       => "model/mesh",
      ".msi"       => "application/x-msdownload",
      ".msl"       => "application/vnd.mobius.msl",
      ".msty"      => "application/vnd.muvee.style",
      ".mts"       => "model/vnd.mts",
      ".mus"       => "application/vnd.musician",
      ".mvb"       => "application/x-msmediaview",
      ".mwf"       => "application/vnd.mfer",
      ".mxf"       => "application/mxf",
      ".mxl"       => "application/vnd.recordare.musicxml",
      ".mxml"      => "application/xv+xml",
      ".mxs"       => "application/vnd.triscape.mxs",
      ".mxu"       => "video/vnd.mpegurl",
      ".n"         => "application/vnd.nokia.n-gage.symbian.install",
      ".nc"        => "application/x-netcdf",
      ".ngdat"     => "application/vnd.nokia.n-gage.data",
      ".nlu"       => "application/vnd.neurolanguage.nlu",
      ".nml"       => "application/vnd.enliven",
      ".nnd"       => "application/vnd.noblenet-directory",
      ".nns"       => "application/vnd.noblenet-sealer",
      ".nnw"       => "application/vnd.noblenet-web",
      ".npx"       => "image/vnd.net-fpx",
      ".nsf"       => "application/vnd.lotus-notes",
      ".oa2"       => "application/vnd.fujitsu.oasys2",
      ".oa3"       => "application/vnd.fujitsu.oasys3",
      ".oas"       => "application/vnd.fujitsu.oasys",
      ".obd"       => "application/x-msbinder",
      ".oda"       => "application/oda",
      ".odc"       => "application/vnd.oasis.opendocument.chart",
      ".odf"       => "application/vnd.oasis.opendocument.formula",
      ".odg"       => "application/vnd.oasis.opendocument.graphics",
      ".odi"       => "application/vnd.oasis.opendocument.image",
      ".odp"       => "application/vnd.oasis.opendocument.presentation",
      ".ods"       => "application/vnd.oasis.opendocument.spreadsheet",
      ".odt"       => "application/vnd.oasis.opendocument.text",
      ".oga"       => "audio/ogg",
      ".ogg"       => "application/ogg",
      ".ogv"       => "video/ogg",
      ".ogx"       => "application/ogg",
      ".org"       => "application/vnd.lotus-organizer",
      ".otc"       => "application/vnd.oasis.opendocument.chart-template",
      ".otf"       => "application/vnd.oasis.opendocument.formula-template",
      ".otg"       => "application/vnd.oasis.opendocument.graphics-template",
      ".oth"       => "application/vnd.oasis.opendocument.text-web",
      ".oti"       => "application/vnd.oasis.opendocument.image-template",
      ".otm"       => "application/vnd.oasis.opendocument.text-master",
      ".ots"       => "application/vnd.oasis.opendocument.spreadsheet-template",
      ".ott"       => "application/vnd.oasis.opendocument.text-template",
      ".oxt"       => "application/vnd.openofficeorg.extension",
      ".p"         => "text/x-pascal",
      ".p10"       => "application/pkcs10",
      ".p12"       => "application/x-pkcs12",
      ".p7b"       => "application/x-pkcs7-certificates",
      ".p7m"       => "application/pkcs7-mime",
      ".p7r"       => "application/x-pkcs7-certreqresp",
      ".p7s"       => "application/pkcs7-signature",
      ".pas"       => "text/x-pascal",
      ".pbd"       => "application/vnd.powerbuilder6",
      ".pbm"       => "image/x-portable-bitmap",
      ".pcl"       => "application/vnd.hp-pcl",
      ".pclxl"     => "application/vnd.hp-pclxl",
      ".pcx"       => "image/x-pcx",
      ".pdb"       => "chemical/x-pdb",
      ".pdf"       => "application/pdf",
      ".pem"       => "application/x-x509-ca-cert",
      ".pfr"       => "application/font-tdpfr",
      ".pgm"       => "image/x-portable-graymap",
      ".pgn"       => "application/x-chess-pgn",
      ".pgp"       => "application/pgp-encrypted",
      ".pic"       => "image/x-pict",
      ".pict"      => "image/pict",
      ".pkg"       => "application/octet-stream",
      ".pki"       => "application/pkixcmp",
      ".pkipath"   => "application/pkix-pkipath",
      ".pl"        => "text/x-script.perl",
      ".plb"       => "application/vnd.3gpp.pic-bw-large",
      ".plc"       => "application/vnd.mobius.plc",
      ".plf"       => "application/vnd.pocketlearn",
      ".pls"       => "application/pls+xml",
      ".pm"        => "text/x-script.perl-module",
      ".pml"       => "application/vnd.ctc-posml",
      ".png"       => "image/png",
      ".pnm"       => "image/x-portable-anymap",
      ".pntg"      => "image/x-macpaint",
      ".portpkg"   => "application/vnd.macports.portpkg",
      ".pot"       => "application/vnd.ms-powerpoint",
      ".potm"      => "application/vnd.ms-powerpoint.template.macroEnabled.12",
      ".potx"      => "application/vnd.openxmlformats-officedocument.presentationml.template",
      ".ppa"       => "application/vnd.ms-powerpoint",
      ".ppam"      => "application/vnd.ms-powerpoint.addin.macroEnabled.12",
      ".ppd"       => "application/vnd.cups-ppd",
      ".ppm"       => "image/x-portable-pixmap",
      ".pps"       => "application/vnd.ms-powerpoint",
      ".ppsm"      => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
      ".ppsx"      => "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
      ".ppt"       => "application/vnd.ms-powerpoint",
      ".pptm"      => "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
      ".pptx"      => "application/vnd.openxmlformats-officedocument.presentationml.presentation",
      ".prc"       => "application/vnd.palm",
      ".pre"       => "application/vnd.lotus-freelance",
      ".prf"       => "application/pics-rules",
      ".ps"        => "application/postscript",
      ".psb"       => "application/vnd.3gpp.pic-bw-small",
      ".psd"       => "image/vnd.adobe.photoshop",
      ".ptid"      => "application/vnd.pvi.ptid1",
      ".pub"       => "application/x-mspublisher",
      ".pvb"       => "application/vnd.3gpp.pic-bw-var",
      ".pwn"       => "application/vnd.3m.post-it-notes",
      ".py"        => "text/x-script.python",
      ".pya"       => "audio/vnd.ms-playready.media.pya",
      ".pyv"       => "video/vnd.ms-playready.media.pyv",
      ".qam"       => "application/vnd.epson.quickanime",
      ".qbo"       => "application/vnd.intu.qbo",
      ".qfx"       => "application/vnd.intu.qfx",
      ".qps"       => "application/vnd.publishare-delta-tree",
      ".qt"        => "video/quicktime",
      ".qtif"      => "image/x-quicktime",
      ".qxd"       => "application/vnd.quark.quarkxpress",
      ".ra"        => "audio/x-pn-realaudio",
      ".rake"      => "text/x-script.ruby",
      ".ram"       => "audio/x-pn-realaudio",
      ".rar"       => "application/x-rar-compressgems/gems/rack-3.0.8/SPEC.rdoc000064400000036403150403134110011417 0ustar00t/troff",
      ".rpm"       => "application/x-redhat-package-manager",
      ".rpss"      => "application/vnd.nokia.radio-presets",
      ".rpst"      => "application/vnd.nokia.radio-preset",
      ".rq"        => "application/sparql-query",
      ".rs"        => "application/rls-services+xml",
      ".rsd"       => "application/rsd+xml",
      ".rss"       => "application/rss+xml",
      ".rtf"       => "application/rtf",
      ".rtx"       => "text/richtext",
      ".ru"        => "text/x-script.ruby",
      ".s"         => "text/x-asm",
      ".saf"       => "application/vnd.yamaha.smaf-audio",
      ".sbml"      => "application/sbml+xml",
      ".sc"        => "application/vnd.ibm.secure-container",
      ".scd"       => "application/x-msschedule",
      ".scm"       => "application/vnd.lotus-screencam",
      ".scq"       => "application/scvp-cv-request",
      ".scs"       => "application/scvp-cv-response",
      ".sdkm"      => "application/vnd.solent.sdkm+xml",
      ".sdp"       => "application/sdp",
      ".see"       => "application/vnd.seemail",
      ".sema"      => "application/vnd.sema",
      ".semd"      => "application/vnd.semd",
      ".semf"      => "application/vnd.semf",
      ".setpay"    => "application/set-payment-initiation",
      ".setreg"    => "application/set-registration-initiation",
      ".sfd"       => "application/vnd.hydrostatix.sof-data",
      ".sfs"       => "application/vnd.spotfire.sfs",
      ".sgm"       => "text/sgml",
      ".sgml"      => "text/sgml",
      ".sh"        => "application/x-sh",
      ".shar"      => "application/x-shar",
      ".shf"       => "application/shf+xml",
      ".sig"       => "application/pgp-signature",
      ".sit"       => "application/x-stuffit",
      ".sitx"      => "application/x-stuffitx",
      ".skp"       => "application/vnd.koan",
      ".slt"       => "application/vnd.epson.salt",
      ".smi"       => "application/smil+xml",
      ".snd"       => "audio/basic",
      ".so"        => "application/octet-stream",
      ".spf"       => "application/vnd.yamaha.smaf-phrase",
      ".spl"       => "application/x-futuresplash",
      ".spot"      => "text/vnd.in3d.spot",
      ".spp"       => "application/scvp-vp-response",
      ".spq"       => "application/scvp-vp-request",
      ".src"       => "application/x-wais-source",
      ".srt"       => "text/srt",
      ".srx"       => "application/sparql-results+xml",
      ".sse"       => "application/vnd.kodak-descriptor",
      ".ssf"       => "application/vnd.epson.ssf",
      ".ssml"      => "application/ssml+xml",
      ".stf"       => "application/vnd.wt.stf",
      ".stk"       => "application/hyperstudio",
      ".str"       => "application/vnd.pg.format",
      ".sus"       => "application/vnd.sus-calendar",
      ".sv4cpio"   => "application/x-sv4cpio",
      ".sv4crc"    => "application/x-sv4crc",
      ".svd"       => "application/vnd.svd",
      ".svg"       => "image/svg+xml",
      ".svgz"      => "image/svg+xml",
      ".swf"       => "application/x-shockwave-flash",
      ".swi"       => "application/vnd.arastra.swi",
      ".t"         => "text/troff",
      ".tao"       => "application/vnd.tao.intent-module-archive",
      ".tar"       => "application/x-tar",
      ".tbz"       => "application/x-bzip-compressed-tar",
      ".tcap"      => "application/vnd.3gpp2.tcap",
      ".tcl"       => "application/x-tcl",
      ".tex"       => "application/x-tex",
      ".texi"      => "application/x-texinfo",
      ".texinfo"   => "application/x-texinfo",
      ".text"      => "text/plain",
      ".tif"       => "image/tiff",
      ".tiff"      => "image/tiff",
      ".tmo"       => "application/vnd.tmobile-livetv",
      ".torrent"   => "application/x-bittorrent",
      ".tpl"       => "application/vnd.groove-tool-template",
      ".tpt"       => "application/vnd.trid.tpt",
      ".tr"        => "text/troff",
      ".tra"       => "application/vnd.trueapp",
      ".trm"       => "application/x-msterminal",
      ".ts"        => "video/mp2t",
      ".tsv"       => "text/tab-separated-values",
      ".ttf"       => "application/octet-stream",
      ".twd"       => "application/vnd.simtech-mindmapper",
      ".txd"       => "application/vnd.genomatix.tuxedo",
      ".txf"       => "application/vnd.mobius.txf",
      ".txt"       => "text/plain",
      ".ufd"       => "application/vnd.ufdl",
      ".umj"       => "application/vnd.umajin",
      ".unityweb"  => "application/vnd.unity",
      ".uoml"      => "application/vnd.uoml+xml",
      ".uri"       => "text/uri-list",
      ".ustar"     => "application/x-ustar",
      ".utz"       => "application/vnd.uiq.theme",
      ".uu"        => "text/x-uuencode",
      ".vcd"       => "application/x-cdlink",
      ".vcf"       => "text/x-vcard",
      ".vcg"       => "application/vnd.groove-vcard",
      ".vcs"       => "text/x-vcalendar",
      ".vcx"       => "application/vnd.vcx",
      ".vis"       => "application/vnd.visionary",
      ".viv"       => "video/vnd.vivo",
      ".vrml"      => "model/vrml",
      ".vsd"       => "application/vnd.visio",
      ".vsf"       => "application/vnd.vsf",
      ".vtt"       => "text/vtt",
      ".vtu"       => "model/vnd.vtu",
      ".vxml"      => "application/voicexml+xml",
      ".war"       => "application/java-archive",
      ".wasm"      => "application/wasm",
      ".wav"       => "audio/x-wav",
      ".wax"       => "audio/x-ms-wax",
      ".wbmp"      => "image/vnd.wap.wbmp",
      ".wbs"       => "application/vnd.criticaltools.wbs+xml",
      ".wbxml"     => "application/vnd.wap.wbxml",
      ".webm"      => "video/webm",
      ".webp"      => "image/webp",
      ".wm"        => "video/x-ms-wm",
      ".wma"       => "audio/x-ms-wma",
      ".wmd"       => "application/x-ms-wmd",
      ".wmf"       => "application/x-msmetafile",
      ".wml"       => "text/vnd.wap.wml",
      ".wmlc"      => "application/vnd.wap.wmlc",
      ".wmls"      => "text/vnd.wap.wmlscript",
      ".wmlsc"     => "application/vnd.wap.wmlscriptc",
      ".wmv"       => "video/x-ms-wmv",
      ".wmx"       => "video/x-ms-wmx",
      ".wmz"       => "application/x-ms-wmz",
      ".woff"      => "application/font-woff",
      ".woff2"     => "application/font-woff2",
      ".wpd"       => "application/vnd.wordperfect",
      ".wpl"       => "application/vnd.ms-wpl",
      ".wps"       => "application/vnd.ms-works",
      ".wqd"       => "application/vnd.wqd",
      ".wri"       => "application/x-mswrite",
      ".wrl"       => "model/vrml",
      ".wsdl"      => "application/wsdl+xml",
      ".wspolicy"  => "application/wspolicy+xml",
      ".wtb"       => "application/vnd.webturbo",
      ".wvx"       => "video/x-ms-wvx",
      ".x3d"       => "application/vnd.hzn-3d-crossword",
      ".xar"       => "application/vnd.xara",
      ".xbd"       => "application/vnd.fujixerox.docuworks.binder",
      ".xbm"       => "image/x-xbitmap",
      ".xdm"       => "application/vnd.syncml.dm+xml",
      ".xdp"       => "application/vnd.adobe.xdp+xml",
      ".xdw"       => "application/vnd.fujixerox.docuworks",
      ".xenc"      => "application/xenc+xml",
      ".xer"       => "application/patch-ops-error+xml",
      ".xfdf"      => "application/vnd.adobe.xfdf",
      ".xfdl"      => "application/vnd.xfdl",
      ".xhtml"     => "application/xhtml+xml",
      ".xif"       => "image/vnd.xiff",
      ".xla"       => "application/vnd.ms-excel",
      ".xlam"      => "application/vnd.ms-excel.addin.macroEnabled.12",
      ".xls"       => "application/vnd.ms-excel",
      ".xlsb"      => "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
      ".xlsx"      => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      ".xlsm"      => "application/vnd.ms-excel.sheet.macroEnabled.12",
      ".xlt"       => "application/vnd.ms-excel",
      ".xltx"      => "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
      ".xml"       => "application/xml",
      ".xo"        => "application/vnd.olpc-sugar",
      ".xop"       => "application/xop+xml",
      ".xpm"       => "image/x-xpixmap",
      ".xpr"       => "application/vnd.is-xpr",
      ".xps"       => "application/vnd.ms-xpsdocument",
      ".xpw"       => "application/vnd.intercon.formnet",
      ".xsl"       => "application/xml",
      ".xslt"      => "application/xslt+xml",
      ".xsm"       => "application/vnd.syncml+xml",
      ".xspf"      => "application/xspf+xml",
      ".xul"       => "application/vnd.mozilla.xul+xml",
      ".xwd"       => "image/x-xwindowdump",
      ".xyz"       => "chemical/x-xyz",
      ".yaml"      => "text/yaml",
      ".yml"       => "text/yaml",
      ".zaz"       => "application/vnd.zzazz.deck+xml",
      ".zip"       => "application/zip",
      ".zmm"       => "application/vnd.handheld-entertainment+xml",
    }
  end
end
gems/gems/rack-3.0.8/SPEC.rdoc000064400000036403150403134110011417 0ustar00This specification aims to formalize the Rack protocol. You
can (and should) use Rack::Lint to enforce it.

When you develop middleware, be sure to add a Lint before and
after to catch all mistakes.

= Rack applications

A Rack application is a Ruby object (not a class) that
responds to +call+.
It takes exactly one argument, the *environment*
and returns a non-frozen Array of exactly three values:
The *status*,
the *headers*,
and the *body*.

== The Environment

The environment must be an unfrozen instance of Hash that includes
CGI-like headers. The Rack application is free to modify the
environment.

The environment is required to include these variables
(adopted from {PEP 333}[https://peps.python.org/pep-0333/]), except when they'd be empty, but see
below.
<tt>REQUEST_METHOD</tt>:: The HTTP request method, such as
                          "GET" or "POST". This cannot ever
                          be an empty string, and so is
                          always required.
<tt>SCRIPT_NAME</tt>:: The initial portion of the request
                       URL's "path" that corresponds to the
                       application object, so that the
                       application knows its virtual
                       "location". This may be an empty
                       string, if the application corresponds
                       to the "root" of the server.
<tt>PATH_INFO</tt>:: The remainder of the request URL's
                     "path", designating the virtual
                     "location" of the request's target
                     within the application. This may be an
                     empty string, if the request URL targets
                     the application root and does not have a
                     trailing slash. This value may be
                     percent-encoded when originating from
                     a URL.
<tt>QUERY_STRING</tt>:: The portion of the request URL that
                        follows the <tt>?</tt>, if any. May be
                        empty, but is always required!
<tt>SERVER_NAME</tt>:: When combined with <tt>SCRIPT_NAME</tt> and
                       <tt>PATH_INFO</tt>, these variables can be
                       used to complete the URL. Note, however,
                       that <tt>HTTP_HOST</tt>, if present,
                       should be used in preference to
                       <tt>SERVER_NAME</tt> for reconstructing
                       the request URL.
                       <tt>SERVER_NAME</tt> can never be an empty
                       string, and so is always required.
<tt>SERVER_PORT</tt>:: An optional +Integer+ which is the port the
                       server is running on. Should be specified if
                       the server is running on a non-standard port.
<tt>SERVER_PROTOCOL</tt>:: A string representing the HTTP version used
                           for the request.
<tt>HTTP_</tt> Variables:: Variables corresponding to the
                           client-supplied HTTP request
                           headers (i.e., variables whose
                           names begin with <tt>HTTP_</tt>). The
                           presence or absence of these
                           variables should correspond with
                           the presence or absence of the
                           appropriate HTTP header in the
                           request. See
                           {RFC3875 section 4.1.18}[https://tools.ietf.org/html/rfc3875#section-4.1.18]
                           for specific behavior.
In addition to this, the Rack environment must include these
Rack-specific variables:
<tt>rack.url_scheme</tt>:: +http+ or +https+, depending on the
                           request URL.
<tt>rack.input</tt>:: See below, the input stream.
<tt>rack.errors</tt>:: See below, the error stream.
<tt>rack.hijack?</tt>:: See below, if present and true, indicates
                        that the server supports partial hijacking.
<tt>rack.hijack</tt>:: See below, if present, an object responding
                       to +call+ that is used to perform a full
                       hijack.
Additional environment specifications have approved to
standardized middleware APIs. None of these are required to
be implemented by the server.
<tt>rack.session</tt>:: A hash-like interface for storing
                        request session data.
                        The store must implement:
                        store(key, value)         (aliased as []=);
                        fetch(key, default = nil) (aliased as []);
                        delete(key);
                        clear;
                        to_hash (returning unfrozen Hash instance);
<tt>rack.logger</tt>:: A common object interface for logging messages.
                       The object must implement:
                        info(message, &block)
                        debug(message, &block)
                        warn(message, &block)
                        error(message, &block)
                        fatal(message, &block)
<tt>rack.multipart.buffer_size</tt>:: An Integer hint to the multipart parser as to what chunk size to use for reads and writes.
<tt>rack.multipart.tempfile_factory</tt>:: An object responding to #call with two arguments, the filename and content_type given for the multipart form field, and returning an IO-like object that responds to #<< and optionally #rewind. This factory will be used to instantiate the tempfile for each multipart form file upload field, rather than the default class of Tempfile.
The server or the application can store their own data in the
environment, too.  The keys must contain at least one dot,
and should be prefixed uniquely.  The prefix <tt>rack.</tt>
is reserved for use with the Rack core distribution and other
accepted specifications and must not be used otherwise.

Tgems/gems/rack-3.0.8/CONTRIBUTING.md000064400000005452150403134110012245 0ustar00* There must be a valid input stream in <tt>rack.input</tt>.
* There must be a valid error stream in <tt>rack.errors</tt>.
* There may be a valid hijack callback in <tt>rack.hijack</tt>
* The <tt>REQUEST_METHOD</tt> must be a valid token.
* The <tt>SCRIPT_NAME</tt>, if non-empty, must start with <tt>/</tt>
* The <tt>PATH_INFO</tt>, if non-empty, must start with <tt>/</tt>
* The <tt>CONTENT_LENGTH</tt>, if given, must consist of digits only.
* One of <tt>SCRIPT_NAME</tt> or <tt>PATH_INFO</tt> must be
  set. <tt>PATH_INFO</tt> should be <tt>/</tt> if
  <tt>SCRIPT_NAME</tt> is empty.
  <tt>SCRIPT_NAME</tt> never should be <tt>/</tt>, but instead be empty.
<tt>rack.response_finished</tt>:: An array of callables run by the server after the response has been
processed. This would typically be invoked after sending the response to the client, but it could also be
invoked if an error occurs while generating the response or sending the response; in that case, the error
argument will be a subclass of +Exception+.
The callables are invoked with +env, status, headers, error+ arguments and should not raise any
exceptions. They should be invoked in reverse order of registration.

=== The Input Stream

The input stream is an IO-like object which contains the raw HTTP
POST data.
When applicable, its external encoding must be "ASCII-8BIT" and it
must be opened in binary mode, for Ruby 1.9 compatibility.
The input stream must respond to +gets+, +each+, and +read+.
* +gets+ must be called without arguments and return a string,
  or +nil+ on EOF.
* +read+ behaves like IO#read.
  Its signature is <tt>read([length, [buffer]])</tt>.

  If given, +length+ must be a non-negative Integer (>= 0) or +nil+,
  and +buffer+ must be a String and may not be nil.

  If +length+ is given and not nil, then this method reads at most
  +length+ bytes from the input stream.

  If +length+ is not given or nil, then this method reads
  all data until EOF.

  When EOF is reached, this method returns nil if +length+ is given
  and not nil, or "" if +length+ is not given or is nil.

  If +buffer+ is given, then the read data will be placed
  into +buffer+ instead of a newly created String object.
* +each+ must be called without arguments and only yield Strings.
* +close+ can be called on the input stream to indicate that the
any remaining input is not needed.

=== The Error Stream

The error stream must respond to +puts+, +write+ and +flush+.
* +puts+ must be called with a single argument that responds to +to_s+.
* +write+ must be called with a single argument that is a String.
* +flush+ must be called without arguments and must be called
  in order to make the error appear for sure.
* +close+ must never be called on the error stream.

=== Hijacking

The hijacking interfaces provides a means for an application to take
control of the HTTP connection. gems/gems/json-2.6.3/lib/json.rb000064400000046455150403134110012121 0ustar00ss to raw HTTP/1
connection.

If +rack.hijack+ is present in +env+, it must respond to +call+
and return an +IO+ instance which can be used to read and write
to the underlying connection using HTTP/1 semantics and
formatting.

==== Partial Hijack

Partial hijack is used for bi-directional streaming of the request and
response body. It occurs after the status and headers are written by
the server and causes the server to ignore the Body of the response.

It is intended to be used when applications need bi-directional
streaming.

If +rack.hijack?+ is present in +env+ and truthy,
an application may set the special response header +rack.hijack+
to an object that responds to +call+,
accepting a +stream+ argument.

After the response status and headers have been sent, this hijack
callback will be invoked with a +stream+ argument which follows the
same interface as outlined in "Streaming Body". Servers must
ignore the +body+ part of the response tuple when the
+rack.hijack+ response header is present. Using an empty +Array+
instance is recommended.

The special response header +rack.hijack+ must only be set
if the request +env+ has a truthy +rack.hijack?+.
== The Response

=== The Status

This is an HTTP status. It must be an Integer greater than or equal to
100.

=== The Headers

The headers must be a unfrozen Hash.
The header keys must be Strings.
Special headers starting "rack." are for communicating with the
server, and must not be sent back to the client.
The header must not contain a +Status+ key.
Header keys must conform to RFC7230 token specification, i.e. cannot
contain non-printable ASCII, DQUOTE or "(),/:;<=>?@[\]{}".
Header keys must not contain uppercase ASCII characters (A-Z).
Header values must be either a String instance,
or an Array of String instances,
such that each String instance must not contain characters below 037.

=== The content-type

There must not be a <tt>content-type</tt> header key when the +Status+ is 1xx,
204, or 304.

=== The content-length

There must not be a <tt>content-length</tt> header key when the
+Status+ is 1xx, 204, or 304.

=== The Body

The Body is typically an +Array+ of +String+ instances, an enumerable
that yields +String+ instances, a +Proc+ instance, or a File-like
object.

The Body must respond to +each+ or +call+. It may optionally respond
to +to_path+ or +to_ary+. A Body that responds to +each+ is considered
to be an Enumerable Body. A Body that responds to +call+ is considered
to be a Streaming Body.

A Body that responds to both +each+ and +call+ must be treated as an
Enumerable Body, not a Streaming Body. If it responds to +each+, you
must call +each+ and not +call+. If the Body doesn't respond to
+each+, then you can assume it responds to +call+.

The Body must either be consumed or returned. The Body is consumed by
optionally calling either +each+ or +call+.
Then, if the Body responds to +close+, it must be called to release
any resources associated with the generation of the body.
In other words, +close+ must always be called at least once; typically
after the web server has sent the response to the client, but also in
cases where the Rack application makes internal/virtual requests and
discards the response.


After calling +close+, the Body is considered closed and should not
be consumed again.
If the original Body is replaced by a new Body, the new Body must
also consume the original Body by calling +close+ if possible.

If the Body responds to +to_path+, it must return a +String+
path for the local file system whose contents are identical
to that produced by calling +each+; this may be used by the
server as an alternative, possibly more efficient way to
transport the response. The +to_path+ method does not consume
the body.

==== Enumerable Body

The Enumerable Body must respond to +each+.
It must only be called once.
It must not be called after being closed.
and must only yield String values.

The Body itself should not be an instance of String, as this will
break in Ruby 1.9.

Middleware must not call +each+ directly on the Body.
Instead, middleware can return a new Body that calls +each+ on the
original Body, yielding at least once per iteration.

If the Body responds to +to_ary+, it must return an +Array+ whose
contents are identical to that produced by calling +each+.
Middleware may call +to_ary+ directly on the Body and return a new
Body in its place. In other words, middleware can only process the
Body directly if it responds to +to_ary+. If the Body responds to both
+to_ary+ and +close+, its implementation of +to_ary+ must call
+close+.

==== Streaming Body

The Streaming Body must respond to +call+.
It must only be called once.
It must not be called after being closed.
It takes a +stream+ argument.

The +stream+ argument must implement:
<tt>read, write, <<, flush, close, close_read, close_write, closed?</tt>

The semantics of these IO methods must be a best effort match to
those of a normal Ruby IO or Socket object, using standard arguments
and raising standard exceptions. Servers are encouraged to simply
pass on real IO objects, although it is recognized that this approach
is not directly compatible with HTTP/2.

== Thanks
Some parts of this specification are adopted from {PEP 333 – Python Web Server Gateway Interface v1.0}[https://peps.python.org/pep-0333/]
I'd like to thank everyone involved in that effort.
gems/gems/rack-3.0.8/CONTRIBUTING.md000064400000005452150403134110012245 0ustar00# Contributing to Rack

Rack is work of [hundreds of
contributors](https://github.com/rack/rack/graphs/contributors). You're
encouraged to submit [pull requests](https://github.com/rack/rack/pulls) and
[propose features and discuss issues](https://github.com/rack/rack/issues).

## Fork the Project

Fork the [project on GitHub](https://github.com/rack/rack) and check out your
copy.

```
git clone https://github.com/(your-github-username)/rack.git
cd rack
git remote add upstream https://github.com/rack/rack.git
```

## Create a Topic Branch

Make sure your fork is up-to-date and create a topic branch for your feature or
bug fix.

```
git checkout main
git pull upstream main
git checkout -b my-feature-branch
```

## Bundle Install and Quick Test

Ensure that you can build the project and run quick tests.

```
bundle install --without extra
bundle exec rake test
```

## Running All Tests

Install all dependencies.

```
bundle install
```

Run all tests.

```
rake test
```

## Write Tests

Try to write a test that reproduces the problem you're trying to fix or
describes a feature that you want to build.

We definitely appreciate pull requests that highlight or reproduce a problem,
even without a fix.

## Write Code

Implement your feature or bug fix.

Make sure that all tests pass:

```
bundle exec rake test
```

## Write Documentation

Document any external behavior in the [README](README.md).

## Update Changelog

Add a line to [CHANGELOG](CHANGELOG.md).

## Commit Changes

Make sure git knows your name and email address:

```
git config --global user.name "Your Name"
git config --global user.email "contributor@example.com"
```

Writing good commit logs is important. A commit log should describe what changed
and why.

```
git add ...
git commit
```

## Push

```
git push origin my-feature-branch
```

## Make a Pull Request

Go to your fork of rack on GitHub and select your feature branch. Click the
'Pull Request' button and fill out the form. Pull requests are usually
reviewed within a few days.

## Rebase

If you've been working on a change for a while, rebase with upstream/main.

```
git fetch upstream
git rebase upstream/main
git push origin my-feature-branch -f
```

## Make Required Changes

Amend your previous commit and force push the changes.

```
git commit --amend
git push origin my-feature-branch -f
```

## Check on Your Pull Request

Go back to your pull request after a few minutes and see whether it passed
tests with GitHub Actions. Everything should look green, otherwise fix issues and
amend your commit as described above.

## Be Patient

It's likely that your change will not be merged and that the nitpicky
maintainers will ask you to do more, or fix seemingly benign problems. Hang in
there!

## Thank You

Please do know that we really appreciate and value your time and work. We love
you, really.
gems/gems/json-2.6.3/lib/json.rb000064400000046455150403134110012121 0ustar00 ruby = JSON.parse(source)
#   ruby.class # => Array
# Use class \Set:
#   ruby = JSON.parse(source, {array_class: Set})
#   ruby # => #<Set: {"foo", 1.0, true, false, nil}>
#
# ---
#
# 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 <tt>JSON.generate(source, opts)</tt>, 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('.')) # => '"#<Dir>"'
#
# ==== Generating Options
#
# ====== Input Options
#
# Option +allow_nan+ (boolean) specifies whether
# +NaN+, +Infinity+, and <tt>-Infinity</tt> 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, <tt>''</tt>.
# - Option +object_nl+ (\String) specifies a string (usually a newline)
#   to be inserted after each \JSON object; defaults to the empty \String, <tt>''</tt>.
# - Option +indent+ (\String) specifies the string (usually spaces) to be
#   used for indentation; defaults to the empty \String, <tt>''</tt>;
#   defaults to the empty \String, <tt>''</tt>;
#   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, <tt>''</tt>.
# - 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, <tt>''</tt>.
#
# 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 = <<EOT
#   Generated JSON:
#     Without addition:  #{json0} (#{json0.class})
#     With addition:     #{json1} (#{json1.class})
#   Parsed JSON:
#     Without addition:  #{ruby0.inspect} (#{ruby0.class})
#     With addition:     #{ruby1.inspect} (#{ruby1.class})
#   EOT
#   puts display
#
# This output shows the different results:
#   Generated JSON:
#     Without addition:  "0..2" (String)
#     With addition:     {"json_class":"Range","a":[0,2,false]} (String)
#   Parsed JSON:
#     Without addition:  "0..2" (String)
#     With addition:     0..2 (Range)
#
# The \JSON module includes additions for certain classes.
# You can also craft custom additions.
# See {Custom \JSON Additions}[#module-JSON-label-Custom+JSON+Additions].
#
# === Built-in Additions
#
# The \JSON module includes additions for certain classes.
# To use an addition, +require+ its source:
# - BigDecimal: <tt>require 'json/add/bigdecimal'</tt>
# - Complex: <tt>require 'json/add/complex'</tt>
# - Date: <tt>require 'json/add/date'</tt>
# - DateTime: <tt>require 'json/add/date_time'</tt>
# - Exception: <tt>require 'json/add/exception'</tt>
# - OpenStruct: <tt>require 'json/add/ostruct'</tt>
# - Range: <tt>require 'json/add/range'</tt>
# - Rational: <tt>require 'json/add/rational'</tt>
# - Regexp: <tt>require 'json/add/regexp'</tt>
# - Set: <tt>require 'json/add/set'</tt>
# - Struct: <tt>require 'json/add/struct'</tt>
# - Symbol: <tt>require 'json/add/symbol'</tt>
# - Time: <tt>require 'json/add/time'</tt>
#
# 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') # #<OpenStruct name="Matz", language="Ruby">
#   json = JSON.generate(ruby0) # {"json_class":"OpenStruct","tgems/gems/json-2.6.3/lib/json/version.rb000064400000000456150403134110013575 0ustar00   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]) # #<Set: {0, 1, 2}>
#   json = JSON.generate(ruby0) # {"json_class":"gems/gems/json-2.6.3/lib/json/ext.rb000064400000000607150403134110012706 0ustar00ruby1.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 cgems/gems/json-2.6.3/lib/json/generic_object.rb000064400000002624150403134110015051 0ustar00ructing 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 = <<EOT
#   Generated JSON:
#     Without custom addition:  #{json0} (#{json0.class})
#     With custom addition:     #{json1} (#{json1.class})
#   Parsed JSON:
#     Without custom addition:  #{obj0.inspect} (#{obj0.class})
#     With custom addition:     #{obj1.inspect} (#{obj1.class})
#   EOT
#   puts display
#
# Output:
#
#   Generated JSON:
#     Without custom addition:  "#<Foo:0x0000000006534e80>" (String)
#     With custom addition:     {"json_class":"Foo","a":[0,1]} (String)
#   Parsed JSON:
#     Without custom addition:  "#<Foo:0x0000000006534e80>" (String)
#     With custom addition:     #<Foo:0x0000000006473bb8 @bar=0, @baz=1> (Foo)
#
module JSON
  require 'json/version'

  begin
    require 'json/ext'
  rescue LoadError
    require 'json/pure'
  end
end
gems/gems/json-2.6.3/lib/json/common.rb000064400000051551150403134110013402 0ustar00# frozen_string_literal: false
module JSON
  # JSON version
  VERSION         = '2.6.3'
  VERSION_ARRAY   = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
  VERSION_MAJOR   = VERSION_ARRAY[0] # :nodoc:
  VERSION_MINOR   = VERSION_ARRAY[1] # :nodoc:
  VERSION_BUILD   = VERSION_ARRAY[2] # :nodoc:
end
gems/gems/json-2.6.3/lib/json/ext.rb000064400000000607150403134110012706 0ustar00require 'json/common'

module JSON
  # This module holds all the modules/classes that implement JSON's
  # functionality as C extensions.
  module Ext
    require 'json/ext/parser'
    require 'json/ext/generator'
    $DEBUG and warn "Using Ext extension for JSON."
    JSON.parser = Parser
    JSON.generator = Generator
  end

  JSON_LOADED = true unless defined?(::JSON::JSON_LOADED)
end
gems/gems/json-2.6.3/lib/json/generic_object.rb000064400000002624150403134110015051 0ustar00#frozen_string_literal: false
require 'ostruct'

module JSON
  class GenericObject < OpenStruct
    class << self
      alias [] new

      def json_creatable?
        @json_creatable
      end

      attr_writer :json_creatable

      def json_create(data)
        data = data.dup
        data.delete JSON.create_id
        self[data]
      end

      def from_hash(object)
        case
        when object.respond_to?(:to_hash)
          result = new
          object.to_hash.each do |key, value|
            result[key] = from_hash(value)
          end
          result
        when object.respond_to?(:to_ary)
          object.to_ary.map { |a| from_hash(a) }
        else
          object
        end
      end

      def load(source, proc = nil, opts = {})
        result = ::JSON.load(source, proc, opts.merge(:object_class => self))
        result.nil? ? new : result
      end

      def dump(obj, *args)
        ::JSON.dump(obj, *args)
      end
    end
    self.json_creatable = false

    def to_hash
      table
    end

    def [](name)
      __send__(name)
    end unless method_defined?(:[])

    def []=(name, value)
      __send__("#{name}=", value)
    end unless method_defined?(:[]=)

    def |(other)
      self.class[other.to_hash.merge(to_hash)]
    end

    def as_json(*)
      { JSON.create_id => self.class.name }.merge to_hash
    end

    def to_json(*a)
      as_json.to_json(*a)
    end
  end
end
gems/gems/json-2.6.3/lib/json/common.rb000064400000051551150403134110013402 0ustar00#frozen_string_literal: false
require 'json/version'
require 'json/generic_object'

module JSON
  class << self
    # :call-seq:
    #   JSON[object] -> new_array or new_string
    #
    # If +object+ is a \String,
    # calls JSON.parse with +object+ and +opts+ (see method #parse):
    #   json = '[0, 1, null]'
    #   JSON[json]# => [0, 1, nil]
    #
    # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate):
    #   ruby = [0, 1, nil]
    #   JSON[ruby] # => '[0,1,null]'
    def [](object, opts = {})
      if object.respond_to? :to_str
        JSON.parse(object.to_str, opts)
      else
        JSON.generate(object, opts)
      end
    end

    # Returns the JSON parser class that is used by JSON. This is either
    # JSON::Ext::Parser or JSON::Pure::Parser:
    #   JSON.pargems/gems/json-2.6.3/lib/json/version.rb000064400000000456150403134110013575 0ustar00st_defined?(c, true) then p.const_get(c)
        else
          begin
            p.const_missing(c)
          rescue NameError => e
            raise ArgumentError, "can't get const #{path}: #{e}"
          end
        end
      end
    end

    # Set the module _generator_ to be used by JSON.
    degems/gems/json-2.6.3/lib/json/ext.rb000064400000000607150403134110012706 0ustar00te
    ensure
      $VERBOSE = old
    end

    def create_fast_state
      State.new(
        :indent         => '',
        :space          => '',
        :object_nl      => "",
        :array_nl       => "",
        :max_nesting    => false
      )
    end

    def create_pretty_state
      State.new(
        :indent         => '  ',
        :space          => ' ',
        :object_nl  gems/gems/json-2.6.3/lib/json/generic_object.rb000064400000002624150403134110015051 0ustar00eze
  private_constant :CREATE_ID_TLS_KEY

  # Sets create identifier, which is used to decide if the _json_create_
  # hook of a class should be called; initial value is +json_class+:
  #   JSON.create_id # => 'json_class'
  def self.create_id=(new_value)
    Thread.current[CREATE_ID_TLS_KEY] = new_value.dup.freeze
  end

  # Returns the current create identifier.
  # See also JSON.create_id=.
  def self.create_id
    Thread.current[CREATE_ID_TLS_KEY] || DEFAULT_CREATE_ID
  end

  NaN           = 0.0/0

  Infinity      = 1.0/0

  MinusInfinity = -Infinity

  # The base exception for JSON errors.
  class JSONError < StandardError
    def self.wrap(exception)
      obj = new("Wrapped(#{exception.class}): #{exception.message.inspect}")
      obj.set_backtrace exception.backtrace
      obj
    end
  end

  # This exception is raised if a parser error occurs.
  class ParserError < JSONError; end

  # This exception is raised if the nesting of parsed data structures is too
  # deep.
  class NestingError < ParserError; end

  # :stopdoc:
  class CircularDatastructure < NestingError; end
  # :startdoc:

  # This exception is raised if a generator or unparser error occurs.
  class GeneratorError < JSONError; end
  # For backwards compatibility
  UnparserError = GeneratorError # :nodoc:

  # This exception is raised if the required unicode support is missing on the
  # system. Usually this means that the iconv libgems/gems/json-2.6.3/lib/json/common.rb000064400000051551150403134110013402 0ustar00nil]
  #   ruby.class # => Array
  #
  # When +source+ is a \JSON object, returns a Ruby \Hash:
  #   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}
  #   ruby.class # => Hash
  #
  # For examples of parsing for all \JSON data types, see
  # {Parsing \JSON}[#module-JSON-label-Parsing+JSON].
  #
  # Parses nested JSON objects:
  #   source = <<-EOT
  #   {
  #   "name": "Dave",
  #     "age" :40,
  #     "hats": [
  #       "Cattleman's",
  #       "Panama",
  #       "Tophat"
  #     ]
  #   }
  #   EOT
  #   ruby = JSON.parse(source)
  #   ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
  #
  # ---
  #
  # Raises an exception if +source+ is not valid JSON:
  #   # Raises JSON::ParserError (783: unexpected token at ''):
  #   JSON.parse('')
  #
  def parse(source, opts = {})
    Parser.new(source, **(opts||{})).parse
  end

  # :call-seq:
  #   JSON.parse!(source, opts) -> object
  #
  # Calls
  #   parse(source, opts)
  # with +source+ and possibly modified +opts+.
  #
  # Differences from JSON.parse:
  # - Option +max_nesting+, if not provided, defaults to +false+,
  #   which disables checking for nesting depth.
  # - Option +allow_nan+, if not provided, defaults to +true+.
  def parse!(source, opts = {})
    opts = {
      :max_nesting  => false,
      :allow_nan    => true
    }.merge(opts)
    Parser.new(source, **(opts||{})).parse
  end

  # :call-seq:
  #   JSON.load_file(path, opts={}) -> object
  #
  # Calls:
  #   parse(File.read(path), opts)
  #
  # See method #parse.
  def load_file(filespec, opts = {})
    parse(File.read(filespec), opts)
  end

  # :call-seq:
  #   JSON.load_file!(path, opts = {})
  #
  # Calls:
  #   JSON.parse!(File.read(path, opts))
  #
  # See method #parse!
  def load_file!(filespec, opts = {})
    parse!(File.read(filespec), opts)
  end

  # :call-seq:
  #   JSON.generate(obj, opts = nil) -> new_string
  #
  # Returns a \String containing the generated \JSON data.
  #
  # See also JSON.fast_generate, JSON.pretty_generate.
  #
  # Argument +obj+ is the Ruby object to be converted to \JSON.
  #
  # Argument +opts+, if given, contains a \Hash of options for the generation.
  # See {Generating Options}[#module-JSON-label-Generating+Options].
  #
  # ---
  #
  # When +obj+ is an \Array, returns a \String containing a \JSON array:
  #   obj = ["foo", 1.0, true, false, nil]
  #   json = JSON.generate(obj)
  #   json # => '["foo",1.0,true,false,null]'
  #
  # When +obj+ is a \Hash, returns a \String containing a \JSON object:
  #   obj = {foo: 0, bar: 's', baz: :bat}
  #   json = JSON.generate(obj)
  #   json # => '{"foo":0,"bar":"s","baz":"bat"}'
  #
  # For examples of generating from other Ruby objects, see
  # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects].
  #
  # ---
  #
  # Raises an exception if any formatting option is not a \String.
  #
  # Raises an exception if +obj+ contains circular references:
  #   a = []; b = []; a.push(b); b.push(a)
  #   # Raises JSON::NestingError (nesting of 100 is too deep):
  #   JSON.generate(a)
  #
  def generate(obj, opts = nil)
    if State === opts
      state, opts = opts, nil
    else
      state = State.new
    end
    if opts
      if opts.respond_to? :to_hash
        opts = opts.to_hash
      elsif opts.respond_to? :to_h
        opts = opts.to_h
      else
        raise TypeError, "can't convert #{opts.class} into Hash"
      end
      state = state.configure(opts)
    end
    state.generate(obj)
  end

  # :stopdoc:
  # I want to deprecate these later, so I'll first be silent about them, and
  # later delete them.
  alias unparse generate
  module_function :unparse
  # :startdoc:

  # :call-seq:
  #   JSON.fast_generate(obj, opts) -> new_string
  #
  # Arguments +obj+ and +opts+ here are the same as
  # arguments +obj+ and +opts+ in JSON.generate.
  #
  # By default, generates \JSON data without checking
  # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled).
  #
  # Raises an exception if +obj+ contains circular references:
  #   a = []; b = []; a.push(b); b.push(a)
  #   # Raises SystemStackError (stack level too deep):
  #   JSON.fast_generate(a)
  def fast_generate(obj, opts = nil)
    if State === opts
      state, opts = opts, nil
    else
      state = JSON.create_fast_state
    end
    if opts
      if opts.respond_to? :to_hash
        opts = opts.to_hash
      elsif opts.respond_to? :to_h
        opts = opts.to_h
      else
        raise TypeError, "can't convert #{opts.class} into Hash"
      end
      state.configure(opts)
    end
    state.generate(obj)
  end

  # :stopdoc:
  # I want to deprecate these later, so I'll first be silent about them, and later delete them.
  alias fast_unparse fast_generate
  module_function :fast_unparse
  # :startdoc:

  # :call-seq:
  #   JSON.pretty_generate(obj, opts = nil) -> new_string
  #
  # Arguments +obj+ and +opts+ here are the same as
  # arguments +obj+ and +opts+ in JSON.generate.
  #
  # Default options are:
  #   {
  #     indent: '  ',   # Two spaces
  #     space: ' ',     # One space
  #     array_nl: "\n", # Newline
  #     object_nl: "\n" # Newline
  #   }
  #
  # Example:
  #   obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}}
  #   json = JSON.pretty_generate(obj)
  #   puts json
  # Output:
  #   {
  #     "foo": [
  #       "bar",
  #       "baz"
  #     ],
  #     "bat": {
  #       "bam": 0,
  #       "bad": 1
  #     }
  #   }
  #
  def pretty_generate(obj, opts = nil)
    if State === opts
      state, opts = opts, nil
    else
      state = JSON.create_pretty_state
    end
    if opts
      if opts.respond_to? :to_hash
        opts = opts.to_hash
      elsif opts.respond_to? :to_h
        opts = opts.to_h
      else
        raise TypeError, "can't convert #{opts.class} into Hash"
      end
      state.configure(opts)
    end
    state.generate(obj)
  end

  # :stopdoc:
  # I want to deprecate these later, so I'll first be silent about them, and later delete them.
  alias pretty_unparse pretty_generate
  module_function :pretty_unparse
  # :startdoc:

  class << self
    # Sets or returns default options for the JSON.load method.
    # Initially:
    #   opts = JSON.load_default_options
    #   opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
    attr_accessor :load_default_options
  end
  self.load_default_options = {
    :max_nesting      => false,
    :allow_nan        => true,
    :allow_blank       => true,
    :create_additions => true,
  }

  # :call-seq:
  #   JSON.load(source, proc = nil, options = {}) -> object
  #
  # Returns the Ruby objects created by parsing the given +source+.
  #
  # - Argument +source+ must be, or be convertible to, a \String:
  #   - If +source+ responds to instance method +to_str+,
  #     <tt>source.to_str</tt> becomes the source.
  #   - If +source+ responds to instance method +to_io+,
  #     <tt>source.to_io.read</tt> becomes the source.
  #   - If +source+ responds to instance method +read+,
  #     <tt>source.read</tt> becomes the source.
  #   - If both of the following are true, source becomes the \String <tt>'null'</tt>:
  #     - Option +allow_blank+ specifies a truthy value.
  #     - The source, as defined above, is +nil+ or the empty \String <tt>''</tt>.
  #   - Otherwise, +source+ remains the source.
  # - Argument +proc+, if given, must be a \Proc that accepts one argument.
  #   It will be called recursively with each result (depth-first order).
  #   See details below.
  #   BEWARE: This method is meant to serialise data from trusted user input,
  #   like from your own database server or clients under your control, it could
  #   be dangerous to allow untrusted users to pass JSON sources into it.
  # - Argument +opts+, if given, contains a \Hash of options for the parsing.
  #   See {Parsing Options}[#module-JSON-label-Parsing+Options].
  #   The default options can be changed via method JSON.load_default_options=.
  #
  # ---
  #
  # When no +proc+ is given, modifies +source+ as above and returns the result of
  # <tt>parse(source, opts)</tt>;  see #parse.
  #
  # Source for following examples:
  #   source = <<-EOT
  #   {
  #   "name": "Dave",
  #     "age" :40,
  #     "hats": [
  #       "Cattleman's",
  #       "Panama",
  #       "Tophat"
  #     ]
  #   }
  #   EOT
  #
  # Load a \String:
  #   ruby = JSON.load(source)
  #   ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
  #
  # Load an \IO object:
  #   require 'stringio'
  #   object = JSON.load(StringIO.new(source))
  #   object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
  #
  # Load a \File object:
  #   path = 't.json'
  #   File.write(path, source)
  #   File.open(path) do |file|
  #     JSON.load(file)
  #   end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
  #
  # ---
  #
  # When +proc+ is given:
  # - Modifies +source+ as above.
  # - Gets the +result+ from calling <tt>parse(source, opts)</tt>.
  # - Recursively calls <tt>proc(result)</tt>.
  # - Returns the final result.
  #
  # Example:
  #   require 'json'
  #
  #   # Some classes for the example.
  #   class Base
  #     def initialize(attributes)
  #       @attributes = attributes
  #     end
  #   end
  #   class User    < Base; end
  #   class Account < Base; end
  #   class Admin   < Base; end
  #   # The JSON source.
  #   json = <<-EOF
  #   {
  #     "users": [
  #         {"type": "User", "username": "jane", "email": "jane@example.com"},
  #         {"type": "User", "username": "john", "email": "john@example.com"}
  #     ],
  #     "accounts": [
  #         {"account": {"type": "Account", "paid": true, "account_id": "1234"}},
  #         {"account": {"type": "Account", "paid": false, "account_id": "1235"}}
  #     ],
  #     "admins": {"type": "Admin", "password": "0wn3d"}
  #   }
  #   EOF
  #   # Deserializer method.
  #   def deserialize_obj(obj, safe_types = %w(User Account Admin))
  #     type = obj.is_a?(Hash) && obj["type"]
  #     safe_types.include?(type) ? Object.const_get(type).new(obj) : obj
  #   end
  #   # Call to JSON.load
  #   ruby = JSON.load(json, proc {|obj|
  #     case obj
  #     when Hash
  #       obj.each {|k, v| obj[k] = deserialize_obj v }
  #     when Array
  #       obj.map! {|v| deserialize_obj v }
  #     end
  #   })
  #   pp ruby
  # Output:
  #   {"users"=>
  #      [#<User:0x00000000064c4c98
  #        @attributes=
  #          {"type"=>"User", "username"=>"jane", "email"=>"jane@example.com"}>,
  #        #<User:0x00000000064c4bd0
  #        @attributes=
  #          {"type"=>"User", "username"=>"john", "email"=>"john@example.com"}>],
  #    "accounts"=>
  #      [{"account"=>
  #          #<Account:0x00000000064c4928
  #          @attributes={"type"=>"Account", "paid"=>true, "account_id"=>"1234"}>},
  #       {"account"=>
  #          #<Account:0x00000000064c4680
  #          @attributes={"type"=>"Account", "paid"=>false, "account_id"=>"1235"}>}],
  #    "admins"=>
  #      #<Admin:0x00000000064c41f8
  #      @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
  #
  def load(source, proc = nil, options = {})
    opts = load_default_options.merge options
    if source.respond_to? :to_str
      source = source.to_str
    elsif source.respond_to? :to_io
      source = source.to_io.read
    elsif source.respond_to?(:read)
      source = source.read
    end
  gems/gems/json-2.6.3/lib/json/add/rational.rb000064400000001354150403134110014447 0ustar00default options for the JSON.dump method.
    # Initially:
    #   opts = JSON.dump_default_options
    #   opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false}
    attr_accessor :dump_default_options
  end
  self.dump_default_options = {
    :max_nesting => false,
    :allow_nan   => true,
    :escape_slash => false,
  }

  # :call-seq:
  #   JSON.dump(obj, io = nil, limit = nil)
  #
  # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result.
  #
  # The default options can be changed via method JSON.dump_default_options.
  #
  # - Argument +io+, if given, should respond to method +write+;
  #   the \JSON \String is written to +io+, and +io+ is returned.
  #   If +io+ is not given, the gems/gems/json-2.6.3/lib/json/add/exception.rb000064400000001437150403134110014636 0ustar00nIO.respond_to?(:to_io)
      unless anIO.respond_to?(:write)
        limit = anIO
        anIO = nil
      end
    end
    opts = JSON.dump_default_options
    opts = opts.merge(:max_nesting => limit) if limit
    result = generate(obj, opts)
    if anIO
      anIO.write result
      anIO
    else
      result
    end
  rescue JSON::NestingError
    raise ArgumentError, "exceed depth limit"
  end

  # Encodes string using String.encode.
  def self.iconv(to, from, string)
    string.encode(to, from)
  end
end

module ::Kernel
  private

  # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in
  # one line.
  def j(*objs)
    objs.each do |obj|
      puts JSON::generate(obj, :allow_nan => true, :max_nesting => false)
    end
    nil
  end

  # Outputs _objs_ to STDOUT gems/gems/json-2.6.3/lib/json/add/set.rb000064400000001041150403134110013422 0ustar00 to include _json_creatable?_ method.
class ::Class
  # Returns true if this class can be used to create an instance
  # from a serialised JSON string. The class has to implement a class
  # method _json_create_ that expects a hash as first parameter. The hash
  # should include the required data.
  def json_creatable?
    respond_to?(:json_create)
  end
end
gems/gems/json-2.6.3/lib/json/addgems/gems/json-2.6.3/lib/json/add/symbol.rb000064400000001146150403134110014142 0ustar00merator,
      'd'            => denominator,
    }
  end

  # Stores class name (Rational) along with numerator value <tt>n</tt> and denominator value <tt>d</tt> as JSON string
  def to_json(*args)
    as_json.to_json(*args)
  end
end
gems/gems/json-2.6.3/lib/json/add/exception.rb00gems/gems/json-2.6.3/lib/json/add/complex.rb000064400000001317150403134110014304 0ustar00     JSON.create_id => self.class.name,
      'm'            => message,
      'b'            => backtrace,
    }
  end

  # Stores class name (Exception) with message <tt>m</tt> and backtrace array
  # <tt>b</tt> as JSON string
  def to_json(*args)
    as_json.to_json(*args)
  end
end
gems/gems/json-2.6.3/lib/json/add/set.rb000064400000001041150403134110013422 0gems/gems/json-2.6.3/lib/json/add/date.rb000064400000001561150403134110013553 0ustar00s_json.to_json(*args)
  end
end

gems/gems/json-2.6.3/lib/json/add/symbol.rb000064400000001146150403134110014142 0ustar00gems/gems/json-2.6.3/lib/json/add/time.rb000064400000001770150403134110013576 0ustar00gems/gems/json-2.6.3/lib/json/add/rational.rb000064400000001354150403134110014447 0ustar00gems/gems/json-2.6.3/lib/json/add/complex.rb000064400000001317150403134110014304 0ustar00gems/gems/json-2.6.3/lib/json/add/regexp.rb000064400000001403150403134110014123 0ustar00gems/gems/json-2.6.3/lib/json/add/exception.rb000064400000001437150403134110014636 0ustar00gems/gems/json-2.6.3/lib/json/add/date.rb000064400000001561150403134110013553 0usgems/gems/json-2.6.3/lib/json/add/bigdecimal.rb000064400000001141150403134110014710 0ustar00gems/gems/json-2.6.3/lib/json/add/set.rb000064400000001041150403134110013422 0ustar00gems/gems/json-2.6.3/lib/json/add/time.rbgems/gems/json-2.6.3/lib/json/add/date_time.rb000064400000002460150403134110014570 0ustar00gems/gems/json-2.6.3/lib/json/add/symbol.rb000064400000001146150403134110014142 0ustar00gems/gems/json-2.6.3/lib/json/add/regexp.rb000064400000001403150403134110014123 0ustar00#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  require 'gems/gems/json-2.6.3/lib/json/add/struct.rb000064400000001422150403134110014156 0ustar00gems/gems/json-2.6.3/lib/json/add/bigdecimal.rb000064400000001141150403134110014710 0ustar00#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  require 'json'
end
defined?(::BigDecimal) or require 'bigdecimal'

class BigDecimal
  # Import a JSON Marshalled ogems/gems/json-2.6.3/lib/json/add/range.rb000064400000001422150403134110013726 0ustar00gems/gems/json-2.6.3/lib/json/add/date_time.rb000064400000002460150403134110014570 0ustar00#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  require 'json'
end
require 'date'

class DateTime

  # Deserializes JSON string by converting year <tt>y</tt>, month <tt>m</tt>,
  # day <tt>d</tt>, hour <tt>H</tt>, minute <tt>M</tgems/gems/json-2.6.3/lib/json/add/core.rb000064400000000534150403134110013565 0ustar00   }
  end

  # Stores class name (DateTime) with Julian year <tt>y</tt>, month <tt>m</tt>,
  # day <tt>d</tt>, hour <tt>H</tt>, minute <tt>M</tt>, second <tt>S</tt>,
  # offset <tt>of</tt> and Day of Calendar Reform <tt>sg</tt> as JSON string
  def to_json(*args)
    as_json.to_json(*args)
  end
end


gems/gems/json-2.6.3/lib/json/add/ostruct.rb000064400000001435150403134110014341 0ustar00gems/gems/json-2.6.3/lib/json/add/regexp.rb000064400000001403150403134110014123 0ustar00 are supported!"
    {
      JSON.create_id => klass,
      'v'            => values,
    }
  end

  # Stores class name (Struct) with Struct values <tt>v</tt> as a JSON string.
  # Only named structs are supported.
  def to_json(*args)
    as_json.to_json(*args)
  end
end
gems/gems/rdoc-6.5.1.1/exe/rdoc000075500000001660150403134110011616 0ustar00gems/gems/json-2.6.3/lib/json/add/bigdecimal.rb000064400000001141150403134110014710 0ustar00_end? ]
    }
  end

  # Stores class name (Range) with JSON array of arguments <tt>a</tt> which
  # include <tt>first</tt> (integer), <tt>last</tt> (integer), and
  # <tt>exclude_end?</tt> (boolean) as JSON string.
  def to_json(*args)
    as_json.to_json(*args)
  end
end
gems/gems/rdoc-6.5.1.1/exe/ri000075500000000303150403134110011272 0ustar00gems/gems/json-2.6.3/lib/json/add/date_time.rb000064400000002460150403134110014570 0gems/gems/rdoc-6.5.1.1/lib/rdoc/version.rb000064400000000154150403134110013664 0ustar00#frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  require 'json'
gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/heading.rb000064400000002760150403134110015102 0ustar00gems/gems/json-2.6.3/lib/json/add/struct.rb000064400000001422150403134110014156 0ustar00#!/opt/alt/ruby32/bin/ruby
#
#  RDoc: Documentation tool for source code
#        (see lib/rdoc/rdoc.rb for more information)
#
#  Copyright (c) 2003 Dave Thomas
#  Released under the same terms as Ruby

begin
  gem 'rdoc'
rescue NameError => e # --disable-gems
  raise unless e.name == :gem
rescue Gem::LoadError
end

require 'rdoc/rdoc'

begin
  r = RDoc::RDoc.new
  r.document ARGV
rescue Errno::ENOSPC
  $stderr.puts 'Ran out of space creating documentation'
  $stderr.puts
  $stderr.puts 'Please free up some space and try again'
rescue SystemExit
  raise
rescue Exception => e
  if $DEBUG_RDOC then
    $stderr.puts e.message
    $stderr.puts "#{e.backtrace.join "\n\t"}"
    $stderr.puts
  elsif Interrupt === e then
    $stderr.puts
    $stderr.puts 'Interrupted'
  else
    $stgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attributes.rb000064400000002375150403134110015673 0ustar00#!/opt/alt/ruby32/bin/ruby

begin
  gem 'rdoc'
rescue NameError => e # --disable-gems
  raise unless e.name == :gem
rescue Gem::LoadError
end

require 'rdoc/ri/driver'

RDoc::RI::Driver.run ARGV
gems/gems/rdoc-6.5.1.1/lib/rdoc/version.rb000064400000000154150403134110013664 0ustar00gems/gems/json-2.6.3/lib/json/add/core.rb000064400000000534150403134110013565 0gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/list.rb000064400000003505150403134110014454 0ustar00gems/gems/json-2.6.3/lib/json/add/ostruct.rb000064400000001435150403134110014341 0ustar00d_regexp_handling RDoc::CrossReference::CROSSREF_REGEXP, :CROSSREF

    @to_html = RDoc::Markup::ToHtml.new nil

    def @to_html.handle_regexp_CROSSREF target
      target.text.sub(/^\\/, '')
    end

    @to_html
  end

  ##
  # Calls #accept_heading on +visitor+

  def accept visitor
    visitor.accept_heading self
  end

  ##
  # An HTML-safe anchor reference for this header.

  def aref
    "label-#{self.class.to_label.convert text.dup}"
  end

  ##
  # Creates a fully-qualified label which will include the label from
  # +context+.  This helps keep ids unique in HTML.

  def label context = nil
    label = aref

    label = [context.aref, label].compact.join '-' if
      context and context.respond_to? :aref

    label
  end

  ##
  # HTML markup of the text of this label without gems/gems/rdoc-6.5.1.1/exe/rdoc000075500000001660150403134110011616 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_joined_paragraph.rb000064400000002213150403134110017473 0ustar00me+

  def bitmap_for name
    bitmap = @name_to_bitmap.assoc name

    unless bitmap then
      bitmap = @next_bitmap
      @next_bitmap <<= 1
      @name_to_bitmap << [name, bitmap]
    else
      bitmap = bitmap.last
    end

    bitmap
  end

  ##
  # Returns a string representation of +bitmap+

  def as_string bitmap
    return 'none' if bitmap.zero?
    res = []

    @name_to_bitmap.each do |name, bit|
      res << name ifgems/gems/rdoc-6.5.1.1/exe/ri000075500000000303150403134110011272 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/list.rb000064400000003505150gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html.rb000064400000023670150403134110015154 0ustar00lists behave like HTML definition lists.  Each list item can
# describe multiple terms.  See RDoc::Markup::Lgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/heading.rb000064400000002760150403134110015102 0ustar00 end

  ##
  # Returns the last item in the list

  def last
    @items.last
  end

  def pretty_print q # :nodoc:
    q.group 2, "[list: #{@type} ", ']' do
      q.seplist @items do |item|
        q.pp item
      end
    end
  end

  ##
  # Appends +items+ to the list

  def push *items
    @items.concat items
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_joined_paragraph.rb000064400000002213150403134110017473 0ustar00# frozen_string_literal: true
##
# Joins the parts of an RDoc::Markup::Paragraph into a single String.
#
# This allows for easier maintenance and testing of Markdown support.
#
# This formatter only works on Paragraph instances.  Attempting to process
# other markup syntax items will not work.

class RDoc::Markup::ToJoinedParagraph < RDoc::Markup::Formatter

  def initialize # :nodoc:
    super nil
  end

  def start_accepting # :nodoc:
  end

  def end_accepting # :nodoc:
  end

  ##
  # Cogems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attributes.rb000064400000002375150403134110015673 0ustar00            ignore
  alias accept_rule            ignore
  alias accept_verbatim        ignore
  alias accept_table           ignore

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html.rb000064400000023670150403134110015154 0ustar00# frozen_string_literal: true
require 'cgi/util'

##
# Outputs RDoc markup as HTML.

class RDoc::Markup::ToHtml < RDoc::Markup::Formatter

  include RDoc::Text

  # :section: Utilities

  ##
  # Maps RDoc::Markup::Parser::LIST_TOKENS types to HTML tags
gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/list.rb000064400000003505150403134110014454 0ustar00m_path

  # :section:

  ##
  # Creates a new formatter that will output HTML

  def initialize options, markup = nil
    super

    @code_object = nil
    @from_path = ''
    @in_list_entry = nil
    @list = nil
    @th = nil
    @hard_break = "<br>\n"

    init_regexp_handlings

    init_tags
  end

  # :section: Regexp Handling
  #
  # These methods are used by regexp handling markup added by RDoc::Markup#add_regexp_handling.

  URL_CHARACTERS_REGEXP_STR = /[A-Za-z0-9\-._~:\/\?#\[\]@!$&'\(\)*+,;%=]/.source

  ##
  # Adds regexp handlings.

  def init_regexp_handlings
    # external links
    @markup.add_regexp_handling(/(?:link:|https?:|mailto:|ftp:|irc:|www\.)#{URL_CHARACTERS_REGEXP_STR}+\w/,
                                :HYPERLINK)
    init_link_notation_regexp_handlings
  end

  ##
  # Adds regexp handlings about link notations.

  def init_link_notation_regexp_handlings
    add_regexp_handling_RDOCLINK
    add_regexp_handling_TIDYLINK
  end

  def handle_RDOCLINK url # :nodoc:
    case url
    when /^rdoc-ref:/
      CGI.escapeHTML($')
    when /^rdoc-label:/
      text = $'

      text = case text
             when /\Alabel-/    then $'
             when /\Afootmark-/ then $'
             when /\Afoottext-/ then $'
             else                    text
             end

      gen_url CGI.escapeHTML(url), CGI.escapeHTML(text)
    when /^rdoc-image:/
      %[<img src=\"#{CGI.escapeHTML($')}\">]
    when /\Ardoc-[a-z]+:/
      CGI.escapeHTML($')
    end
  end

  ##
  # +target+ is a <code><br></code>

  def handle_regexp_HARD_BREAK target
    '<br>'
  end

  ##
  # +target+ is a potential link.  The following schemes are handled:
  #
  # <tt>mailto:</tt>::
  #   Inserted as-is.
  # <tt>http:</tt>::
  #   Links are checked to see if they reference an image. If so, that image
  #   gets inserted using an <tt><img></tt> gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_joined_paragraph.rb000064400000002213150403134110017473 0ustar00 where the label is different from the URL
  # <tt>label[url]</tt> or <tt>{long label}[url]</tt>

  def handle_regexp_TIDYLINK(target)
    text = target.text

    return text unless
      text =~ /^\{(.*)\}\[(.*?)\]$/ or text =~ /^(\S+)\[(.*?)\]$/

    label = $1
    url   = CGI.escapeHTML($2)

    if /^rdoc-image:/ =~ label
      label = handle_RDOCLINK(label)
    else
      label = CGI.escapeHTML(label)
    end

    gen_url url, label
  end

  # :section: Visitor
  #
  # These methods implement the HTML visitor.

  ##
  # Prepares the visitor for HTML generation

  def start_accepting
    @res = []
    @in_list_entry = []
    @list = []
  end

  ##
  # Returns the generated output

  def end_accepting
    @res.join
  end

  ##
  # Adds +block_quote+ to the output

  def accept_block_quote block_quote
    @res << "\n<blockquote>"

    block_quote.parts.each do |part|
      part.accept self
    end

    @res << "</blockquote>\n"
  end

  ##
  # Adds +paragraph+ to the output

  def accept_paragraph paragraph
    @res << "\n<p>"
    text = paragraph.text @hard_break
    text = text.gsub(/\r?\n/, ' ')
    @res << to_html(text)
    @res << "</p>\n"gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html.rb000064400000023670150403134110015154 0ustar00
  # Prepares the visitor for consuming +list+

  def accept_list_start(list)
    @list << list.type
    @res << html_list_name(list.type, true)
    @in_list_entry.push false
  end

  ##
  # Finishes consumption of +list+

  def accept_list_end(list)
    @list.pop
    if tag = @in_list_entry.pop
      @res << tag
    end
    @res << html_list_name(list.type, false) << "\n"
  end

  ##
  # Prepares the visitor for consuming +list_item+

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_bs.rb000064400000003223150403134110014604 0ustar00

    label = heading.label @code_object

    @res << if @options.output_decoration
              "\n<h#{level} id=\"#{label}\">"
            else
              "\n<h#{level}>"
            end
    @res << to_html(heading.text)
    unless @options.pipe then
      @res << "<span><a href=\"##{label}\">&para;</a>"
      @res << " <a href=\"#top\">&uarr;</a></span>"
    end
    @res << "</h#{level}>\n"
  end

  ##
  # Adds +raw+ to the output

  def accept_raw raw
    @res << raw.parts.join("\n")
  end

  ##
  # Adds +table+ to the output

  def accept_table header, body, aligns
    @res << "\n<table role=\"table\">\n<thead>\n<tr>\n"
    header.zip(aligns) do |text, align|
      @res << '<th'
      @res << ' align="' << align << '"' if align
      @res << '>' << to_html(text) << "</th>\n"
    end
    @res << "</tr>\n</thead>\n<tbody>\n"
    body.each do |row|
      @res << "<tr>\n"
      row.zip(aligns) do |text, align|
        @res << '<td'
        @res << ' align="' << align << '"' if align
        @res << '>' << to_html(text) << "</td>\n"
      end
      @res << "</tr>\n"
    end
    @res << "</tbody>\n</table>\n"
  end

  # :section: Utilities

  ##
  # CGI-escapes +text+

  def convert_string(text)
    CGI.escapeHTML text
  end

  ##
  # Generate a link to +url+ with content +text+.  Handles the special cases
  # for img: and link: described under handle_regexp_HYPERLINK

  def gen_url url, text
    scheme, url, id = parse_url url

    if %w[http https link].include?(scheme) and
       url =~ /\.(gif|png|jpg|jpeg|bmp)$/ then
      "<img src=\"#{url}\" />"
    else
      if scheme != 'link' and %r%\A((?!https?:)(?:[^/#]*/)*+)([^/#]+)\.(rb|rdoc|md)(?=\z|#)%gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_test.rb000064400000002216150403134110015160 0ustar00pe)
    case list_type
    when :BULLET, :LALPHA, :NUMBER, :UALPHA then
      "<li>"
    when :LABEL, :NOTE then
      Array(list_item.label).map do |label|
        "<dt>#{to_html label}\n"
      end.join << "<dd>"
    else
      raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
    end
  end

  ##
  # Returns the HTML end-tag for +list_type+

  def list_end_for(list_type)
    case list_type
    when :BULLET, :LALPHA, :NUMBER, :UALPHA then
      "</li>"
    when :LABEL, :NOTE then
      "</dd>"
    else
      raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
    end
  end

  ##
  # Returns true if text is valid ruby syntax

  def parseable? text
    verbose, $VERBOSE = $VERBOSE, nil
    eval("BEGIN {return true}\n#{text}")
  rescue SyntaxError
    false
  ensure
    $VERBOSE = verbose
  end

  ##
  # Converts +item+ to HTML using RDoc::Text#to_html

  def to_html item
    super convert_flow @am.flow item
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_bs.rb000064400000003223150403gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/table.rb000064400000001744150403134120014574 0ustar00ng

  def init_tags
    add_tag :BOLD, '+b', '-b'
    add_tag :EM,   '+_', '-_'
    add_tag :TT,   ''  , ''   # we need in_tt information maintained
  end

  ##
  # Makes heading text bold.

  def accept_heading heading
    use_prefix or @res << ' ' * @indent
    @res << @headings[heading.level][0]
    @in_b = true
    @res << attributes(heading.text)
    @in_b = false
    @res << @headings[heading.level][1]
    @res << "\n"
  end

  ##
  # Turns on or off regexp handling for +convert_string+

  def annotate tag
    case tag
    when '+b' then @in_b = true
    when '-b' then @in_b = false
    when '+_' then @in_em = true
    when '-_' then @in_em = false
    end
    ''
  end

  ##
  # Calls convert_string on the result of convert_regexp_handling

  def convert_regexp_handling target
    convert_string super
  end

  ##
  # Adds bold or underline mixed with backspaces

  def convert_string string
    return string unless @in_b or @in_em
    chars = if @in_b then
              stringgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html_snippet.rb000064400000012731150403134120016713 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_test.rb000064400000002216150403134110015160 0ustar00# frozen_string_literal: true
##
# This Markup outputter is used for testing purposes.

class RDoc::Markup::ToTest < RDoc::Markup::Formatter

  # :stopdoc:

  ##
  # :section: Visitor

  def start_accepting
    @res = []
    @list = []
  end

  def end_accepting
    @res
  end

  def accept_paragraph(paragraph)
    @res << convert_flow(@am.flow(paragraph.text))
  end

  def accept_raw raw
    @res << raw.parts.join
  end

  def accept_verbatim(verbatim)
    @res << verbatim.text.gsub(/^(\S)/, '  \1')
  end

  def accept_list_start(list)
    @list << case list.type
             when :BULLET then
               '*'
             when :NUMBER then
               '1'
             else
               list.type
             end
  end

  def accept_list_end(list)
    @list.pop
  end

  def accept_list_item_start(list_item)
    @res << "#{' ' * (@list.size - 1)}#{@list.last}: "
  end

  def accept_list_item_end(list_item)
  end

  def accept_blank_line(blank_line)
    @res << "\n"
  end

  def accept_heading(heading)
    @res << "#{'=' * heading.level} #{heading.text}"
  end

  def accept_rule(rule)
    @res << '-' * rule.weight
  end

  # :startdoc:

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/table.rb000064400000001744150403134120014574 0ustar00# frozen_string_literal: true
##
# A section of table

class RDoc::Markup::Table
  attr_accessor :header, :align, :body

  def initialize header, align, body
    @header, @align, @body = header, align, body
  end

  def == other
    self.class == other.class and
      @header == other.header and
      @align == other.align and
      @body == other.body
  end

  def accept visitor
    visitor.accept_table @header, @body, @align
  end

  gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_bs.rb000064400000003223150403134110014604 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html_snippet.rb000064400000012731150403134120016713 0ustar00# frozen_string_literal: true
##
# Outputs RDoc markup as paragraphs with inline markup only.

class RDoc::Markup::ToHtmlSnippet < RDoc::Markup::ToHtml

  ##
  # After this many characters the input will be cut off.

  attr_reader :character_limit

  ##
  # The number of characters seen so far.

  attr_reader :characters # :nodoc:

  ##
  # The attribute bitmask

  attr_reader :mask

  ##
  # After this many paragraphs the input will be cut off.

  attr_reader :paragraph_limit

  ##
  # Count of paragraphs found

  attr_reader :paragraphs

  ##
  # Creates a new ToHtmlSnippet formatter that will cut off the input on the
  # next word boundary after the given number of +characters+ or +paragraphs+
  # of text have been encountered.

  def initialize options, characters = 100, paragraphs = 3, markup = nil
    super options, markup

    @character_limit = characters
    @paragraph_limit = paragraphs

    @characters = 0
    @mask       = 0
    @paragraphs = 0

    @markup.add_regexp_handling RDoc::CrossReference::CROSSREF_REGEXP, :CROSSREF
  end

  ##
  # Adds +heading+ to the output as a paragraph

  def accept_heading heading
    @res << "<p>#{to_html hegems/gems/rdoc-6.5.1.1/lib/rdoc/markup/indented_paragraph.rb000064400000001612150403134120017316 0ustar00s >= @character_limit
    input = verbatim.text.rstrip

    text = truncate input
    text << ' ...' unless text == input

    super RDoc::Markup::Verbatim.new text

    add_paragraph
  end

  ##
  # Prepares the visitor for HTML snippet generation

  def start_accepting
    super

    @characters = 0
  end

  ##
  # Removes escaping from the cross-references in +target+

  def handle_regexp_CROSSREF target
    target.text.sub(/\A\\/, '')
  end

  ##
  # +target+ is a <code><br></code>

  def handle_regexp_HARD_BREAK target
    @characters -= 4
    '<br>'
  end

  ##
  # Lists are paragraphs, but notes and labels have a separator

  def list_item_start list_item, list_type
    throw :done if @characters >= @character_limit

    case list_type
    when :BULLET, :LALPHA, :NUMBER, :UALPHA then
      "<p>"
    when :LABEL, :NOTE then
      labels = Array(list_item.label).map do |label|
        to_gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_markdown.rb000064400000007154150403134120016032 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/table.rb000064400000001744150403134120014574 0ustar00rts flow items +flow+

  def convert_flow flow
    throw :done if @characters >= @character_limit

    res = []
    @mask = 0

    flow.each do |item|
      case item
      when RDoc::Markup::AttrChanger then
        off_tags res, item
        on_tags  res, item
      when String then
        text = convert_string item
        res << truncate(text)
      when RDoc::Markup::RegexpHandling then
        text = convert_regexp_handling item
        res << truncate(text)
      else
        raise "Unknown flow element: #{item.inspect}"
      end

      if @characters >= @character_limit then
        off_tags res, RDoc::Markup::AttrChanger.new(0, @mask)
        break
      end
    end

    res << ' ...' if @characters >= @character_limit

    res.join
  end

  ##
  # Maintains a bitmask to allow HTML elements to be closed properly.  See
  # RDoc::Markup::Formatter.

  def on_tags res, item
    @mask ^= item.turn_on

    super
  end

  ##
  # Maintains a bitmask to allow HTML elements to begems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html_snippet.rb000064400000012731150403134120016713 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/indented_paragraph.rb000064400000001612150403134120017316 0ustar00# frozen_string_literal: true
##
# An Indented Paragraph of text

class RDoc::Markup::IndentedParagraph < RDoc::Markup::Raw

  ##
  # The indent in number of spaces

  attr_reader :indent

  ##
  # Creates a new IndentedParagraph containing +parts+ indented with +indent+
  # spaces

  def initialize indent, *parts
    @indent = indent

    super(*parts)
  end

  def == other # :nodoc:
    super and indent == other.indent
  end

  ##
  # Calls #accept_indented_paragraph on +visitor+

  def accept visitor
    visitor.accept_indented_paragraph self
  end

  ##
  # Joins the raw paragraph text and converts inline HardBreaks to the
  # +hard_break+ text followed by the indent.

  def text hard_break = nil
    @parts.map do |part|
      if RDoc::Markup::HardBreak === part then
        '%1$s%3$*2$s' % [hard_break, @indent, ' '] if hard_break
      else
        part
      end
    end.join
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_markdown.rb0000644gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_ansi.rb000064400000004066150403134120015141 0ustar00egexp_handling_TIDYLINK

    @hard_break = "  \n"
  end

  ##
  # Maps attributes to HTML sequences

  def init_tags
    add_tag :BOLD, '**', '**'
    add_tag :EM,   '*',  '*'
    add_tag :TT,   '`',  '`'
  end

  ##
  # Adds a newline to the output

  def handle_regexp_HARD_BREAK target
    "  \n"
  end

  ##
  # Finishes consumption of `list`

  def accept_list_end list
    @res << "\n"

    super
  end

  ##
  # Finishes consumption of `list_item`

  def accept_list_item_end list_item
    width = case @list_type.last
            when :BULLET then
              4
            when :NOTE, :LABEL then
              use_prefix

              4
            else
              @list_index[-1] = @list_index.last.succ
              4
            end

    @indent -= width
  end

  ##
  # Prepares the visitor for consuming `list_item`

  def accept_list_item_start list_item
    type = @list_type.last

    case type
    when :NOTE, :LABEL then
      bullets = Array(list_item.label).map do |label|
        attributes(label).strip
      end.join "\n"

      bullets << "\n:"

      @prefix = ' ' * @indent
      @indent += 4
      @prefix << bullets + (' ' * (@indent - 1))
    else
      bullet = type == :BULLET ? '*' : @list_index.last.to_s + '.'
      @prefix = (' ' * @indent) + bullet.ljust(4)

      @indent += 4
    end
  end

  ##
  # Prepares the visitor for consuming `list`

  def accept_list_start list
    case list.type
    when :BULLET, :LABEL, :NOTE then
      @list_index << nil
    when :LALPHA, :NUMBER, :UALPHA then
      @list_index << 1
    else
      raise RDoc::Error, "invalid list type #{list.type}"
    end

    @list_width << 4
    @list_type << list.type
  end

  ##
  # Adds `rule` to the output

  def accept_rule rule
    use_prefix or @res << ' ' * @indent
    @res << '-' * 3
    @res << "\n"
  end

  ##
  # Outputs `verbatim` indented 4 columns

  def accept_verbatim verbatim
    indent = ' ' * (@indent + 4)

    verbatim.parts.each do |part|
      @res << indent unless part == "\n"
      @res << part
    end

    @res << "\n"
  end

  ##
  # Creates a Markdgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_label.rb000064400000003533150403134120015264 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/indented_paragraph.rb000064400000001612150403134120017316 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_ansi.rb000064400000004066150403134120015141 0ustar00# frozen_string_literal: true
##
# Outputs RDoc markup with vibrant ANSI color!

class RDoc::Markup::ToAnsi < RDoc::Markup::ToRdoc

  ##
  # Creates a new ToAnsi visitor that is ready to output vibrant ANSI color!

  def initialize markup = nil
    super

    @headings.clear
    @headings[1] = ["\e[1;32m", "\e[m"] # bold
    @headings[2] = ["\e[4;32m", "\e[m"] # underline
    @headings[3] = gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_markdown.rb000064400000007154150403134120016032 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/include.rb000064400000001475150403134120015131 0ustar00end.join "\n"

               labels << ":\n" unless labels.empty?

               labels
             else
               @list_index.last.to_s + '.'
             end

    case @list_type.last
    when :NOTE, :LABEL then
      @indent += 2
      @prefix = bullet + (' ' * @indent)
    else
      @prefix = (' ' * @indent) + bullet.ljust(bullet.length + 1)

      width = bullet.gsub(/\e\[[\d;]*m/, '').length + 1

      @indent += width
    end
  end

  ##
  # Starts accepting with a reset screen

  def start_accepting
    super

    @res = ["\e[0m"]
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/document.rb000064400000006230150403134120015316 0ustar00# frozen_string_literal: true
require 'cgi/util'

##
# Creates HTML-safe labels suitable for use in id attributes.  Tidylinks are
# converted to their link part and cross-reference links have the suppression
# marks removed (\\SomeClass is converted to SomeClass).

class RDoc::Markup::ToLabel < RDoc::Markup::Formatter

  attr_reader :res # :nodoc:

  ##
  # Creates a new formatter that will output HTML-safe labels

  def initialize markup = nil
    super nil, markup

    @markup.add_regexp_handling RDoc::CrossReference::CROSSREF_REGEXP, :CROSSREF
    @markup.add_regexp_handling(/(((\{.*?\})|\b\S+?)\[\S+?\])/, :TIDYLINK)

    add_tag :BOLD, '', ''
    add_tag :TT,   '', ''
    add_tag :EM,   '', ''

    @res = []
  end

  ##
  # Converts +text+ to an HTML-safe label

  def convert text
    label = convert_flow @am.flow text

    CGI.escape(label).gsub('%', '-').sub(/^-/, '')
  end

  ##
  # Converts the CROSSREF +target+ to plain text, removing the suppression
  # marker, if any

  def handle_regexp_CROSSREF target
    text = target.text

    text.sub(/^\\/, '')
  end

  ##
  # Converts the TIDYLINK +target+ to just the text part

  def handle_regexp_TIDYLINK target
    text = target.text

    return text unless text =~ /\{(.*?)\}\[(.*?)\]/ or text =~ /(\S+)\[(.*?)\]/

    $1
  end

  alias accept_blank_line         ignore
  alias accept_block_quote        ignore
  alias accept_heading            ignore
  alias accept_list_end           ignore
  alias accept_list_item_end      ignore
  alias accept_list_item_start    ignore
  alias accept_list_start         ignore
  alias accept_paragraph          ignore
  alias accepgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_ansi.rb000064400000004066150403134120015141 0ustar00# frozen_string_literal: true
##
# A file included at generation time.  Objects of this class are created by
# RDoc::RD for an extension-less include.
#
# This implementation in incomplete.

class RDoc::Markup::Include

  ##
  # The filename to be included, without extension

  attr_reader :file

  ##
  # Directories to search for #file

  attr_reader :include_path

  ##
  # Creates a new include that will import +file+ from +include_path+

  def initialize file, include_path
    @file = file
    @include_path = include_path
  end

  def == other # :nodoc:
    self.class === other and
      @file == other.file and @include_path == other.include_path
  end
gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/list_item.rb000064400000003332150403134120015471 0ustar00# frozen_string_literal: true
##
# A Document containing lists, headings, paragraphs, etc.

class RDoc::Markup::Document

  include Enumerable

  ##
  # The file this document was created from.  See also
  # RDoc::ClassModule#add_comment

  attr_reader :file

  ##
  # If a heading is below the given level it will be omitted from the
  # table_of_contents

  attr_accessor :omit_headings_below

  ##
  # The parts of the Document

  attr_reader :parts

  ##
  # Creates a new Document with +parts+

  def initialize *parts
    @parts = []
    @parts.concat parts

 gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_label.rb000064400000003533150403134120015264 0ustar00 &block
    @parts.each(&block)
  end

  ##
  # Does this document have no parts?

  def empty?
    @parts.empty? or (@parts.length == 1 and merged? and @parts.first.empty?)
  end

  ##
  # The file this Document was cgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/rule.rb000064400000000473150403134120014452 0ustar00  self.parts << other_part
    end

    self
  end

  ##
  # Does this Document contain other Documents?

  def merged?
    RDoc::Markup::Document === @parts.first
  end

  def pretty_print q # :nodoc:
    start = @file ? "[doc (#{@file}): " : '[doc: '

    q.group 2, start, ']' do
      q.seplist @parts do |part|gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attr_changer.rb000064400000000650150403134120016141 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/include.rb000064400000001475150403134120015131 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/formatter.rb000064400000012720150403134120015504 0ustar00arts of the ListItem

  attr_reader :parts

  ##
  # Creates a new ListItem with an optional +label+ containing +parts+

  def initialize label = nil, *parts
    @label = label
    @parts = []
    @parts.concat parts
  end

  ##
  # Appends +part+ to the ListItem

  def << part
    @parts << part
  end

  def == othgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/document.rb000064400000006230150403134120015316 0ustar00       q.text ';'
        q.breakable
      end

      q.seplist @parts do |part|
        q.pp part
      end
    end
  end

  ##
  # Adds +parts+ to the ListItem

  def push *parts
    @parts.concat parts
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/rule.rb000064400000000473150403134120014452 0ustar00# frozen_string_literal: true
##
# A horizontal rule with a weight

class RDoc::Markup::Rule < Struct.new :weight

  ##
  # Calls #accept_rule on +visitor+

  def accept visitor
    visitor.accept_rule self
  end

  def pretty_print q # :nodoc:
    q.group 2, '[rule:', ']' do
      q.pp weight
    end
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attr_changer.rb000064400000000650150403134120016141 0ustar00# frozen_string_literal: true
class RDoc::Markup

  AttrChanger = Struct.new :turn_on, :turn_off # :nodoc:

end

##
# An AttrChanger records a change in attributes. It contains a bitmap of the
# attributes to turn on, and a bitmap of those to turn off.

class RDoc::Markup::AttrChanger

  def to_s # :nodoc:
    "Attr: +#{turn_on}/-#{turn_off}"
  end

  def inspect # :nodoc:
    '+%d/-%d' % [turn_on, turn_off]
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/formatter.rb000064400000012720150403134120015504 0ustar00# frozen_string_literal: true
##
# Base class for RDoc markup formatters
#
# Formatters are a visitor that converts an RDoc::Markup tree (from a commentgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/list_item.rb000064400000003332150403134120015471 0ustar00 from.shift
      to.shift
    end

    from.fill ".."
    from.concat to
    from << to_file
    File.join(*from)
  end

  ##
  # Creates a new Formatter

  def initialize options, markup = nil
    @options = options

    @markup = markup || RDoc::Markup.new
    @am     = @markup.attribute_manager
    @am.add_regexp_handling(/<br>/, :HARD_BREAK)

    @attributes = @am.attributes

    @attr_tags = []

    @in_tt = 0
    @tt_bit = @attributes.bitmap_for :TT

  gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_rdoc.rb000064400000015033150403134120015132 0ustar00d>[<url>]

  def add_regexp_handling_TIDYLINK
    @markup.add_regexp_handling(/(?:
                                  \{.*?\} |    # multi-word label
                                  \b[^\s{}]+? # single-word label
                                 )

                                 \[\S+?\]     # link target
                                /x, :TIDYLINK)
  end

  ##
  # Add a new set of tags for an attribute. We allow separate start and end
  # tags for flexibility

  def add_tag(name, start, stop)
    attr = @attributes.bitmap_for name
    @attr_tags << InlineTag.new(attr, start, stop)
  end

  ##
  # Allows +tag+ to be decorated with additional information.

  def annotate(tag)
    tag
  end

  ##
  # Marks up +contengems/gems/rdoc-6.5.1.1/lib/rdoc/markup/rule.rb000064400000000473150403134120014452 0ustar00f respond_to? method_name then
        target.text = public_send method_name, target
        handled = true
      end
    end

    unless handled then
      target_name = @attributes.as_string target.type

      raise RDoc::Error, "Unhandled regexp handling #{target_name}: #{target}"
    end

    target.text
  endgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attr_changer.rb000064400000000650150403134120016141 0ustar00ags res, item
    attr_mask = item.turn_off
    return if attr_mask.zero?

    @attr_tags.reverse_each do |tag|
      if attr_mask & tag.bit != 0 then
        @in_tt -= 1 if tt? tag
        res << annotate(tag.off)
      end
    end
  end

  ##
  # Extracts and a scheme, url and an anchor id from +url+ and returns them.

  def parse_url url
    case url
    when /^rdoc-label:([^:]*)(?::(.*))?/ then
      scheme = 'link'
gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/formatter.rb000064400000012720150403134120015504 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_rdoc.rb000064400000015033150403134120015132 0ustar00# frozen_string_literal: true
##
# Outputs RDoc markup as RDoc markup! (mostly)

class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter

  ##
  # Current indent amount for output in characters

  attr_accessor :indent

  ##
  # Output width in characters

  attr_accessor :width

  ##
  # Stack of current list indexes for alphabetic and numeric lists

  attr_reader :list_index

  ##
  # Stack of list types

  attr_reader :list_type

  ##
  # Stack of list widths for indentation

  attr_reader :list_width

  ##
  # Prefix for the next list item.  See #use_prefix

  attr_reader :prefix

  ##
  # Output accumulator

  attr_reader :res

  ##
  # Creates a new formatter that will output (mostly) \RDoc markup

  def initialize markup = nil
    super nil, markup

    @markup.add_regexp_handling(/\\\S/, :SUPPRESSED_CROSSREF)
    @width = 78
    init_tags

    @headings = {}
    @headings.default = []

    @headings[1] = ['= ',      '']
    @headings[2] = ['== ',     '']
    @headings[3] = ['=== ',    '']
    @headings[4] = ['==== ',   '']
    @headings[5] = ['===== ',  '']
    @headings[6] = ['====== ', '']

    @hard_break = "\n"
  end

  ##
  # Maps attributes to HTML sequences

  def init_tags
    add_tag :BOLD, "<b>", "</b>"
    add_tag :TT,   "<tt>", "</tt>"
    add_tag :EM,   "<em>", "</em>"
  end

  ##
  # Adds +blank_line+ to the output

  def accept_blank_line blank_line
    @res << "\n"
  end

  ##
  # Adds +paragraph+ to the output

  def accept_block_quote block_quote
    @indent += 2

    block_quote.parts.each do |part|
      @prefix = '> '

      part.accept self
    end

    @indent -= 2
  end

  ##
  # Adds +heading+ to the output

  def accept_heading heading
    use_prefix or @res << ' ' * @indent
    @res << @headings[heading.level][0]
    @res << attributes(heading.text)
    @res << @headings[heading.level][1]
    @res << "\n"
  end

  ##
  # Finishes consumption of +list+

  def accept_list_end list
    @list_index.pop
    @list_type.pop
    @list_width.pop
  end

  ##
  # Finishes consumption of +list_item+

  def accept_list_item_end list_item
    width = case @list_type.last
            when :BULLET then
              2
            when :NOTE, :LABEL then
              if @prefix then
                @res << @prefix.strip
                @prefix = nil
              end

              @res << "\n"
              2
            else
              bullet = @list_index.last.to_s
              @list_index[-1] = @list_index.last.succ
              bullet.length + 2
            end

    @indent -= width
  end

  ##
  # Prepares the visigems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_tt_only.rb000064400000004436150403134120015700 0ustar00t_width << list.items.length.to_s.length
    when :UALPHA then
      @list_index << 'A'
      @list_width << list.items.length.to_s.length
    else
      raise RDoc::Error, "invalid list type #{list.type}"
    end

    @list_type << list.type
  end

  ##
  # Adds +paragraph+ to the output

  def accept_paragraph paragraph
    text = paragraph.text @hard_break
    wrap attributes text
  end

  ##
  # Adds +paragraph+ to the output

  def accept_indented_paragraph paragraph
    @indent += paragraph.indent
    text = paragraph.text @hard_break
    wrap attributes text
    @indent -= paragraph.indent
  end

  ##
  # Adds +raw+ to the output

  def accept_raw raw
    @res << raw.parts.join("\n")
  end

  ##
  # Adds +rule+ to the output

  def accept_rule rule
    use_prefix or @res << ' ' * @indent
    @res << '-' * (@width - @indent)
    @res << "\n"
  end

  ##
  # Outputs +verbatim+ indented 2 columns

  def accept_verbatim verbatim
    indent = ' ' * (@indent + 2)

    verbatim.parts.each do |part|
      @res << indent unless part == "\n"
      @res << part
    end

    @res << "\n"
  end

  ##
  # Adds +table+ to the output

  def accept_table header, body, aligns
    widths = header.zip(body) do |h, b|
      [h.size, b.size].max
    end
    aligns = aligns.map do |a|
      case a
      when nil
        :center
      when :left
        :ljust
      when :right
        :rjust
      end
    end
    @res << header.zip(widths, aligns) do |h, w, a|
      h.__send__(a,gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_rdoc.rb000064400000015033150403134120015132 0ustar00handle_regexp_SUPPRESSED_CROSSREF target
    text = target.text
    text = text.sub('\\', '') unless in_tt?
    text
  end

  ##
  # Adds a newline to the output

  def handle_regexp_HARD_BREAK target
    "\n"
  end

  ##
  # Prepares the visitor for text generation

  def start_acceptgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/raw.rb000064400000001750150403134120014273 0ustar00prefix
    end
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_tt_only.rb000064400000004436150403134120015700 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attribute_manager.rb000064400000023744150403134120017206 0ustar00ote
    tt_sections block_quote.text
  end

  ##
  # Pops the list type for +list+ from #list_type

  def accept_list_end list
    @list_type.pop
  end

  ##
  # Pushes the list type for +list+ onto #list_type

  def accept_list_start list
    @list_type << list.type
  end

  ##
  # Prepares the visitor for consuming +list_item+

  def accept_list_item_start list_item
    case @list_type.last
    when :NOTE, :LABEL then
      Array(list_item.label).map do |label|
        tt_sections label
      end.flatten
    end
  end

  ##
  # Adds +paragraph+ to the output

  def accept_paragraph paragraph
    tt_sections(paragraph.text)
  end

  ##
  # Does nothing to +markup_item+ because it doesn't have any user-built
  # content

  def do_nothing markup_item
  end

  alias accept_blank_line    do_nothing # :nodoc:
  alias accept_heading       do_nothing # :nodoc:
  alias accept_list_item_end do_nothing # :nodoc:
  alias accept_raw           do_nothing # :nodoc:
  alias accept_rule          do_nothing # :nodoc:
  alias accept_verbatim      do_nothing # :nodoc:

  ##
  # Extracts tt sections from +text+

  def tt_sections text
    flow = @am.flow text.dup

    flow.each do |item|
      case item
      when String then
        @res << item if in_tt?
      when RDoc::Markup::AttrChanger then
        off_tags res, item
        on_tags res, item
      when RDoc::Markup::RegexpHandling then
        @res << convert_regexp_handling(item) if in_tt? # TODO can this happen?
      else
        raise "Unknown flow element: #{item.inspect}"
      end
    end

    res
  end

  ##
  # Returns an Array of items that were wrapped in plus, tt or code.

  def end_accepting
    @res.compact
  end

  ##
  # Prepares the visitor for gathering tt sections

  def start_accepting
    @res = []

    @list_type = []
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/raw.rb000064400000001750150403134120014273 0ustar00# frozen_string_literal: true
##
# A section of text that is added to the output document as-is

class RDoc::Markup::Raw

  ##
  # The component parts of the list

  attr_reader :parts

  ##
  # Creates a new Raw containing +parts+

  def initialize *parts
    @parts = []
    @parts.concat parts
  end

  ##
  # Appends +text+

  def << text
    @parts << text
  end

  def == other # :nodoc:
    self.class == other.class and @parts == other.parts
  end

  ##
  # Calls #accept_raw+ on +visitor+

  def accept visitor
    visitor.accept_raw self
  end

  ##
  # Appends +other+'s parts

  def merge other
    @parts.concat other.parts
  end

  def pretty_print q # :nodoc:
    self.class.name =~ /.*::(\w{1,4})/i

    q.group 2, "[#{$1.downcase}: ", ']' do
      q.seplist @parts do |part|
        q.pp part
      end
    end
  end

  ##
  # Appends +texts+ onto this Paragraph

  def push *texts
    self.parts.concat texts
  end

  ##
  # The raw text

  def text
    @parts.join ' '
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attribute_manager.rb000064400000023744150403134120017206 0ustar00# frozen_string_literal: trgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_tt_only.rb000064400000004436150403134120015700 0ustar00er :matching_word_pairs

  ##
  # And this is used when the delimiters aren't the same. In this case the
  # hash maps a pattern to the attribute character

  attr_reader :word_pair_map

  ##
  # This maps HTML tags to the corresponding attribute char

  attr_reader :html_tags

  ##
  # A \ in front of a character that would normally be processed turns off
  # processing. We do this by turning \< into <#{PROTECT}

  attr_reader :protectable

  ##
  # And this maps _regexp handling_ sequences to a name. A regexp handling
  # sequence is something like a WikiWord

  attr_reader :regexp_handlings

  ##
  # A bits of exclusive maps
  attr_reader :exclusive_bitmap

  ##
  # Creates a new attribute manager that understands bold, emphasized and
  # teletype text.

  def initialize
    @html_tags = {}
    @matching_word_pairs = {}
    @protectable = %w[<]
    @regexp_handlings = []
    @word_pair_map = {}
    @exclusive_bitmap = 0
    @attributes = RDoc::Markup::Attributes.new

    add_word_pair "*", "*", :BOLD, true
    add_word_pair "_", "_", :EM, true
    add_word_pair "+", "+", :TT, true

    add_html "em", :EM, true
    add_html "i",  :EM, true
    add_html "b",  :BOLD, true
    add_html "tt",   :TT, true
    add_html "code", :TT, true
  end

  ##
  # Return an attribute object with the given turn_on and turn_off bits set

  def attribute(turn_on, turn_off)
    RDoc::Markup::AttrChanger.new turn_on, turn_off
  end

  ##
  # Changes the current attribute from +current+ to +new+

  def change_attribute current, new
    diff = current ^ new
    attribute(new & diff, current & diff)
  end

  ##
  # Used by the tests to change attributes by name from +current_set+ to
  # +new_set+

  def changed_attribute_by_name current_set, new_set
    current = new = 0
    current_set.each do |name|
      current |= @attributes.bitmap_for(name)
    end

    new_set.each do |name|
      new |= @attributes.bitmap_for(name)
    end

    change_attribute(current, new)
  end

  ##
  # Copies +start_pos+ to +end_pos+ from the current string

  def copy_string(start_pos, end_pos)
    res = @str[start_pos...end_pos]
    res.gsub!(/\000/, '')
    res
  end

  def exclusive?(attr)
    (attr & @exclusive_bitmap) != 0
  end

  NON_PRINTING_START = "\1" # :nodoc:
  NON_PRINTING_END = "\2" # :nodoc:

  ##
  # Map attributes likegems/gems/rdoc-6.5.1.1/lib/rdoc/markup/raw.rb000064400000001750150403134120014273 0ustar00?=#{all_tags}|\W|$)/

    1 while str.gsub!(re) { |orig|
      a, w = (m = $~).values_at(1, 2)
      attr = @matching_word_pairs[a]
      if attrs.set_attrs(m.begin(2), w.length, attr)
        a = NULL * a.length
      else
        a = NON_PRINTING_START + a + NON_PRINTING_END
      end
      a + w + a
    }
    str.delete!(NON_PRINTING_START + NON_PRINTING_END)
  end

  def convert_attrs_word_pair_map(str, attrs, exclusive)
    # then non-matching
    unless @word_pair_map.empty? then
      @word_pair_map.each do |regexp, attr|
        next unless exclusive == exclusive?(attr)
        1 while str.gsub!(regexp) { |orig|
          w = (m = ($~))[2]
          updated = attrs.set_attrs(m.begin(2), w.length, attr)
          if updated
            NULL * m.match_length(1) + w + NULL * m.match_length(3)
          else
            orig
          end
        }
      end
    end
  end

  ##
  # Converts HTML tags to RDoc attributes

  def convert_html(str, attrs, exclusive = false)
    tags = @gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attribute_manager.rb000064400000023744150403134120017206 0ustar00egexp, attribute|
      next unless exclusive == exclusive?(attribute)
      str.scan(regexp) do
        capture = $~.size == 1 ? 0 : 1

        s, e = $~.offset capture

        attrs.set_attrs s, e - s, attribute | @attributes.regexp_handling
      end
    end
  end

  ##
  # Escapes regexp handling sequences of text to prevent conversion to RDoc

  def mask_protected_sequences
    # protect __send__, __FILE__, etc.
    @str.gsub!(/__([a-z]+)__/i,
      "_#{PROTECT_ATTR}_#{PROTgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/hard_break.rb000064400000000676150403134120015572 0ustar00'*', '*', :BOLD

  def add_word_pair(start, stop, name, exclusive = false)
    raise ArgumentError, "Word flags may not start with '<'" if
      start[0,1] == '<'

    bitmap = @attributes.bitmap_for name

    if start == stop then
      @matching_word_pairs[start] = bitmap
    else
      pattern = /(#{Regexp.escape start})(\S+)(#{Regexp.escape stop})/
      @word_pair_map[pattern] = bitmap
    end

    @protectable << start[0,1]
    @protectgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/blank_line.rb000064400000000607150403134120015600 0ustar00n, name, exclusive = false
    bitmap = @attributes.bitmap_for(name)
    @regexp_handlings << [pattern, bitmap]
    @exclusive_bitmap |= bitmap if exclusive
  end

  ##
  # Processes +str+ converting attributes, HTML and regexp handlings

  def flow str
    @str = str.dup

    mask_protected_sequences

    @attrs = RDoc::Markup::AttrSpan.new @str.length, @exclusive_bitmap

    convert_attgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/block_quote.rb000064400000000374150403134120016012 0ustar00ine << "S"
          else
            line << ("%d" % (bno+1))
          end
        end
      end
      puts(line) unless line =~ /^ *$/
      bit <<= 1
    end
  end

  ##
  # Splits the string into chunks by attribute change

  def split_into_flow
 gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_table_of_contents.rb000064400000003335150403134120017675 0ustar00                      copy_string(start_pos, i))
          start_pos = i
          next
        end
      end

      # move on, skipping any invisible characters
      begin
        i += 1
      end while i < str_len and @str[i].chr == "\0"
    end

    # tidy up trailing text
    if start_pos < str_len
      res << copy_string(start_pos, str_len)
    end

    # and reset to all attributes off
    res << change_attribute(current_attr, 0) if current_attr != 0

    res
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/hard_break.rb000064400000000676150403134120015572 0ustar00# frozen_string_literal: true
##
# A hard-break in the middle of a paragraph.

class RDoc::Markup::HardBreak

  @instance = new

  ##
  # RDoc::Markup::HardBreak is a singleton

  def self.new
    @instance
  end

  ##
  # Calls #accept_hard_break on +visitor+

  def accept visitor
    visitor.accept_hard_break self
  end

  def == other # :nodoc:
    self.class === other
  end

  def pretty_print q # :nodoc:
    q.text "[break]"
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/blank_line.rb000064400000000607150403134120015600 0gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html_crossref.rb000064400000011573150403134120017062 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/block_quote.rb000064400000000374150403134120016012 0ustar00# frozen_string_literal: true
##
# A quoted section which contains markup items.

class RDoc::Markup::BlockQuote < RDoc::Markup::Raw

  ##
  # Calls #accept_block_quote on +visitor+

  def accept visitor
    visitor.accept_block_quote self
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_table_of_contents.rb000064400000003335150403134120017675 0ustar00# frozen_string_literal: true
##
# Extracts just the RDoc::Markup::Heading elements from a
# RDoc::Markup::Document to help build a table of contents

class RDoc::Markup::ToTableOfContents < RDoc::Markup::Formatter

  @to_toc = nil

  ##
  # Singleton for table-of-contents generation

  def self.to_toc
    @to_toc ||= new
  end

  ##
  # Output accumulator

  attr_reader :res

  ##
  # Omits headings with a level less than the given level.

  attr_accessor :omit_headings_below

  def initialize # :nodoc:
    super nil

    @omit_headings_below = nil
  end

  ##
  # Adds +document+ to the output, using its heading cutoff if present

  def accept_document document
    @omit_headings_below = document.omit_headings_below

    super
  end

  ##
  # Adds +heading+ to the table of contents

  def accept_heading heading
    @res << heading unless suppressed? heading
  end

  ##
  # Returns the table of contents

  def end_accepting
    @res
  end

  ##
  # Prepares the visitor for text generation

  def start_accepting
    @omit_headings_below = nil
    @res = []
  end

  ##
  # Returns true if +heading+ is below the display threshold

  def suppressed? heading
    return false unless @omit_headings_below

    heading.level > @omit_headings_below
  end

  # :stopdoc:
  alias accept_block_quote     ignore
  alias accept_raw             ignore
  alias accept_rule            ignore
  alias accept_blank_line      ignore
  alias accept_paragraph       ignore
  alias accept_verbatim        ignore
  alias accept_list_end        ignore
  alias accept_list_item_start ignore
  alias accept_list_item_end   ignore
  alias accept_list_end_bullet ignore
  alias accept_list_start      ignore
  alias accept_table           ignore
  # :startdoc:

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/hard_break.rb000064400000000676150403134120015572 0ustar00# frozen_string_literal: true
##
# Subclass of the RDoc::Markup::ToHtml class that supports looking up method
# names, classes, etc to create links.  RDoc::CrossReference is used to
# generate those links based on the current context.

class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml

  # :stopdoc:
  ALL_CROSSREF_REGEXP = RDoc::CrossReference::ALL_CROSSREF_REGEXP
  CLASS_REGEXP_STR    = RDoc::CrossReference::CLASS_REGEXP_STR
  CROSSRgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/blank_line.rb000064400000000607150403134120015600 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/verbatim.rb000064400000002443150403134120015313 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/block_quote.rb000064400000000374150403134120016012 0ustar00[1..-1] unless @show_hash if name[0, 1] == '#'

    if !(name.end_with?('+@', '-@')) and name =~ /(.*[^#:])@/
      text ||= "#{CGI.unescape $'} at <code>#{$1}</code>"
      code = false
    else
      text ||= name
    end

    link lookup, text, codegems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_table_of_contents.rb000064400000003335150403134120017675 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/regexp_handling.rb000064400000001316150403134120016636 0ustar00dled by
  # {the superclass}[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK]

  def handle_regexp_RDOCLINK target
    url = target.text

    case url
    when /\Ardoc-ref:/ then
      cross_reference $'
    else
      super
    end
  end

  ##
  # Generates links for <tt>rdoc-ref:</tt> scheme URLs and allows
  # RDoc::Markup::ToHtml to handle other schemes.

  def gen_url url, text
    return super unless url =~ /\Ardoc-ref:/

    name = $'
    cross_reference name, text, name == text
  end

  ##
  # Creates an HTML link to +name+ with the given +text+.

  def link name, text, code = true
    if !(name.end_with?('+@', '-@')) and name =~ /(.*[^#:])@/
      name = $1
      label = $'
    end

    ref = @cgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/paragraph.rb000064400000000755150403134120015453 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/to_html_crossref.rb000064400000011573150403134120017062 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/pre_process.rb000064400000020652150403134120016030 0ustar00 newlines = 0

    @parts.each do |part|
      case part
      when /^\s*\n/ then
        newlines += 1
        parts << part if newlines == 1
      else
        newlines = 0
        parts << part
      end
    end

    parts.pop if parts.last =~ /\A\r?\n\z/

    @parts = parts
  end

  def pretty_print q # :nodoc:
    self.class.name =~ /.*::(\w{1,4})/i

    q.group 2, "[#{$1.downcase}: ", ']' do
      if @format then
        q.text "format: #{@format}"
        q.breakable
      end

      q.seplist @parts do |part|
        q.pp part
      end
    end
  end

  ##
  # Is this verbatim section Ruby code?

  def ruby?
    @format ||= nil # TODO for older ri data, switch the tree to marshal_dump
    @format == :ruby
  end

  ##
  # The text of the section

  def text
    @parts.join
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/regexp_handling.rb000064400000001316150403134120016636 0ustar00# frozen_string_literal: true
##
# Hold details of a regexp handling sequence

class RDoc::Markup::RegexpHandling

  ##
  # Regexp handling type

  attr_reader   :type

  ##
  # Regexp handling text

  attr_accessor :text

  ##
  # Creates a new regexp handling sequence of +type+ with +text+

  def initialize(type, text)
    @type, @text = type, text
  end

  ##
  # Regexp handlings are equal when the have the same text and type

  def ==(o)
    self.text == o.text && self.type == o.type
  end

  def inspect # :nodoc:
    "#<RDoc::Markup::RegexpHandling:0x%x @type=%p, @text=%p>" % [
      object_id, @type, text.dump]
  end

  def to_s # :nodoc:
    "RegexpHandling: type=#{type} text=#{text.dump}"
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/paragraph.rb000064400000000755150403134120015453 0ustar00# frozen_string_literal: true
##
# A Paragraph of text

class RDoc::Markup::Paragraph < RDoc::Markup::Raw

  ##
  # Calls #accept_paragraph on +visitor+

  def accept visitor
    visitor.accept_paragraph self
  end

  ##
  # Joins the raw paragraph text and converts inline HardBreaks to the
  # +hard_break+ text.

  def text hard_break = ''
    @parts.map do |part|
      if RDoc::Markup::HardBreak === part then
        hard_break
      else
        part
      end
    end.join
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/pre_process.rb000064400000020652150403134120016030 0ustar00# frozen_string_literal: true
##
# Handle common directives that can occur in a block of text:
#
#   \:include: filename
#
# Directives can be escaped by preceding them with a backslash.
#
# RDoc plugin authors can register additional directives to be handled by
# using RDoc::Markup::PreProcess::register.
#
# Any directive that is not built-in to RDoc (including those registergems/gems/rdoc-6.5.1.1/lib/rdoc/markup/verbatim.rb000064400000002443150403134120015313 0ustar00st_processors
  end

  ##
  # Registers +directive+ as one handled by RDoc.  If a block is given the
  # directive will be replaced by the result of the block, otherwise the
  # directive will be removed from the processed text.
  #
  # The block will be called with the directive name and the directive
  # parameter:
  #
  #   RDoc::Markup::PreProcess.register 'my-directive' do |directive, param|
  #     # replace text, etc.
  #   end

  def self.register directive, &block
    @registered[directive] = block
  end

  ##
  # Registered directives

  def self.registered
    @registered
  end

  ##
  # Clears all registered directives and post-processors

  def self.reset
    @post_processors = []
    @registered = {}
  end

  reset

  ##
  # Creates a new pre-processor for +input_file_name+ that will look for
  # included files in +include_path+

  def initialize(input_file_name, include_path)
    @input_file_name = input_file_name
    @include_path = include_path
    @options = nil
  end

  ##
  # Look for directives in the given +text+.
  #
  # Options that we don't handle are yielded.  If the block returns false the
  # directive is restored to the text.  If the block returns nil or no block
  # was given the directive is handled according to the registered directives.
  # If a String was returgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/regexp_handling.rb000064400000001316150403134120016636 0ustar00next $& if $4.empty? and $5 and $5[0, 1] == ':'

      # skip if escaped
      next "#$1:#$3:#$4#$5\n" unless $2.empty?

      # This is not in handle_directive because I didn't want to pass another
      # argument into it
      if comment and $3 == 'markup' then
        next "#{$1.strip}\n" unless $5
        comment.format = $5.downcase
        next "#{$1.strip}\n"
      end

      handle_directive $1, $3, $5, code_object, text.encoding, &block
    end

    if comment then
      comment.text = text
    else
      comment = text
    end

    self.class.post_processors.each do |handler|
      handler.call comment, code_object
    end

    text
  end

  ##
  # Performs the actions described by +directive+ and gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/paragraph.rb000064400000000755150403134120015453 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attr_span.rb000064400000001240150403134120015467 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/pre_process.rb000064400000020652150403134120016030 0ustar00turn blankline unless RDoc::AnyMethod === code_object

      code_object.dont_rename_initialize = true

      blankline
    when 'startdoc' then
      return blgems/gems/rdoc-6.5.1.1/lib/rdoc/markup/parser.rb000064400000034636150403134120015007 0ustar00up::PreProcess.registered[directive]
          result = handler.call directive, param if handler
        else
          result = "#{prefix}:#{directive}: #{param}\n"
        end
      when false then
        result = "#{prefix}:#{directive}: #{param}\n"
      end

      result
    end
  end

  ##
  # Handles the <tt>:include: _filename_</tt> directive.
  #
  # If the first line of the included file starts with '#', and contains
  # an encoding information in the form 'coding:' or 'coding=', it is
  # removed.
  #
  # If all lines in the included file start with a '#', this leading '#'
  # is removed before inclusion. The included content is indented like
  # the <tt>:include:</tt> directive.
  #--
  # so all content will be verbatim because of the likely space after '#'?
  # TODO shift left the whole file content in that case
  # TODO comment stop/start #-- and #++ in included file must be processed here

  def include_file name, indent, encoding
    full_name = find_include_file name

    unless full_name then
      warn "Couldn't find file to include '#{name}' from #{@input_file_name}"
      return ''
    end

    content = RDoc::Encoding.read_file full_name, encoding, true
    content = RDoc::Encoding.remove_magic_comment content

    # strip magic comment
    content = content.sub(/\A# .*coding[=:].*$/, '').lstrip

    # strip leading '#'s, but only if all lines start with them
    if content =~ /^[^#]/ then
      content.gsub(/^/, indent)
    else
      content.gsub(/^#?/, indent)
    end
  end

  ##
  # Look for the given file in the directory containing the current file,
  # and then in each of the directories specified in the RDOC_INCLUDE path

  def find_include_file(name)
    to_search = [File.dirname(@input_file_name)].concat @include_path
    to_search.each do |dir|
      full_name = File.join(dir, name)
      stat = File.stat(full_name) rescue next
      return full_name if stat.readable?
    end
    nil
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attr_span.rb000064400000001240150403134120015467 0ustar00# frozen_string_literal: true
##
# An array of attributes which parallels the characters in a string.

class RDoc::Markup::AttrSpan

  ##
  # Creates a new AttrSpan for +length+ characters

  def initialize(length, exclusive)
    @attrs = Array.new(length, 0)
    @exclusive = exclusive
  end

  ##
  # Toggles +bits+ from +start+ to +length+
  def set_attrs(start, length, bits)
    updated = false
    for i in start ... (start+length)
      if (@exclusive & @attrs[i]) == 0 || (@exclusive & bits) != 0
        @attrs[i] |= bits
        updated = true
      end
    end
    updated
  end

  ##
  # Accesses flags for character +n+

  def [](n)
    @attrs[n]
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/parser.rb000064400000034636150403134120015007 0ustar00# frozen_string_literal: true
require 'strscan'

##
# A recursive-descent parser for RDoc markup.
#
# The parser tokenizes an input string then parses the tokens into a Document.
# Documents can be converted into output formats by writing a visitor like
# RDoc::Markup::ToHTML.
#
# The parser only handles the block-level constructs Paragraph, List,
# ListItem, Heading, Verbatim, BlankLine, Rule and BlockQuote.
# Inline markup such as <tt>\+blah\+</tt> is handled separately by
# RDoc::Markup::AttributeManager.
#
# To see what markup the Parser implements read RDoc.  To see how to use
# RDoc markup to format text in your program read RDoc::Markup.

class RDoc::Markup::Parser

  include RDoc::Text

  ##
  # List token types

  LIST_TOKENS = [
    :BULLET,
    :LABEL,
    :LALPHA,
    :NOTE,
    :NUMBER,
    :UALPHA,
  ]

  ##
  # Parser error subclass

  class Error < RuntimeError; end

  ##
  # Raised when the parser is unable to handle the given markup

  class ParseError < Error; end

  ##
  # Enables display of debugging information

  attr_accessor :debug

  ##
  # Token accessor

  attr_reader :tokens

  ##
  # Parses +str+ into a Document.
  #
  # Use RDoc::Markup#parse instead of this method.

  def self.parse str
    parser = new
    parser.tokenize str
    doc = RDoc::Markup::Document.new
    parser.parse doc
  end

  ##
  # Returns a token stream for +str+, for testing

  def self.tokenize str
    parser = new
    parser.tokenize str
    parser.tokens
  end

  ##
  # Creates a new Parser.  See also ::parse

  def initialize
    @binary_input   = nil
    @current_token  = nil
    @debug          = false
    @s              = nil
    @tokens         = []
  end

  ##
  # Builds a Heading of +level+

  def build_heading level
    type, text, = get

    text = case type
           when :TEXT then
             skip :NEWLINE
             text
           else
             unget
             ''
           end

    RDoc::Markup::Heading.new level, text
  end

  ##
  # Builds a List flush to +margin+

  def build_list margin
    p :list_start => margin if @debug

    list = RDoc::Markup::List.new
    label = nil

    until @tokens.empty? do
      type, data, column, = get

      case type
      when *LIST_TOKENS then
        if column < margin || (list.type && list.type != type) then
          unget
          break
        end

        list.type = type
        peek_type, _, column, = peek_token

        case type
        when :NOTE, :LABEL then
          label = [] unless label

          if peek_type == :NEWLINE then
            # description not on the same line as LABEL/NOTE
            # skip the trailing newline & any blank lines below
            while peek_type == :NEWLINE
              get
              peek_type, _, column, = peek_token
            end

            # we may be:
            #   - at end of stream
            #   - at a column < margin:
            #         [text]
            #       blah blah blah
            #   - at the same column, but with a different type of list item
            #       [text]
            #       * blah blah
            #   - at the same column, with the same type of list item
            #       [one]
            #       [two]
            # In all cases, we have an empty description.
            # In the last case only, we continue.
            if peek_type.nil? || column < margin then
              empty = true
            elsif column == margin then
              case peek_type
         gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/attr_span.rb000064400000001240150403134120015467 0ustar00lumn
        list << list_item

      else
        unget
        break
      end
    end

    p :list_end => margin if @debug

    if list.empty? then
      return nil unless label
      return nil unless [:LABEL, :NOTE].include? list.type

      list_item = RDoc::Markup::ListItem.new label, RDoc::Markup::BlankLine.new
      list << list_item
    end

    list
  end

  ##
  # Builds a Paragraph that is flush to +margin+

  def build_paragraph margin
    p :paragraph_start => margin if @debug

    paragraph = RDoc::Markup::Paragraph.new

    until @tokens.empty? do
      type, data, column, = get

      if type == :TEXT and column == margin then
        paragraph <gems/gems/rdoc-6.5.1.1/lib/rdoc/markup/parser.rb000064400000034636150403134120015007 0ustar00umn, = get

      if type == :NEWLINE then
        line << data
        verbatim << line
        line = ''.dup
        generate_leading_spaces = true
        next
      end

      if column <= margin
        unget
        break
      end

      if generate_leading_spaces then
        indent = column - margin
        line << ' ' * indent
        min_indent = indent if min_indent.nil? || indent < min_indent
        generate_leading_spaces = false
      end

      case type
      when :HEADER then
        line << '=' * data
        _, _, peek_column, = peek_token
        peek_column ||= column + data
        indent = peek_column - column - data
        line << ' ' * indent
      when :RULE then
        width = 2 + data
        line << '-' * width
        _, _, peek_column, = peek_token
        peek_column ||= column + width
        indent = peek_column - column - width
        line << ' ' * indent
      when :BREAK, :TEXT then
        line << data
      when :BLOCKQUOTE then
        line << '>>>'
        peek_type, _, peek_column = peek_token
        if peek_type != :NEWLINE and peek_column
          line << ' ' * (peek_column - column - 3)
        end
      else # *LIST_TOKENS
        list_marker = case type
                      when :BULLET then data
                      when :LABEL  then "[#{data}]"
                      when :NOTE   then "#{data}::"
                      else # :LALPHA, :NUMBER, :UALPHA
                        "#{data}."
                      end
        line << list_marker
        peek_type, _, peek_column = peek_token
        unless peek_type == :NEWLINE then
          peek_column ||= column + list_marker.length
          indent = peek_column - column - list_marker.length
          line << ' ' * indent
        end
      end

    end

    verbatim << line << "\n" unless line.empty?
    verbatim.parts.each { |p| p.slice!(0, min_indent) unless p == "\n" } if min_indent > 0
    verbatim.normalize

    p :verbatim_end => margin if @debug

    verbatim
  end

  ##
  # Pulls the next token from the stream.

  def get
    @current_token = @tokens.shift
    p :get => @current_token if @debug
    @current_token
  end

  ##
  # Parses the tokens into an array of RDoc::Markup::XXX objects,
  # and appends them to the passed +parent+ RDoc::Markup::YYY object.
  #
  # Exits at the end of the token stream, or when it encounters a token
  # in a column less than +indent+ (unless it is a NEWLINE).
  #
  # Returns +parent+.

  def parse parent, indent = 0
    p :parse_start => indent if @debug

    until @tokens.empty? do
      type, data, column, = get

      case type
      when :BREAK then
        parent << RDoc::Markup::BlankLine.new
        skip :NEWLINE, false
        next
      when :NEWLINE then
        # trailing newlines are skipped below, so this is a blank line
        parent << RDoc::Markup::BlankLine.new
        skip :NEWLINE, false
        next
      end

      # indentation change: break or verbatim
      if column < indent then
        unget
        break
      elsif column > indent then
        unget
        parent << build_verbatim(indent)
        next
      end

      # indentation is the same
      case type
      when :HEADER then
        parent << build_heading(data)
      when :RULE then
        parent << RDoc::Markup::Rule.new(data)
        skip :NEWLINE
      when :TEXT then
        unget
        parse_text parent, indent
      when :BLOCKQUOTE then
        nil while (type, = get; type) and type != :NEWLINE
        _, _, column, = peek_token
        bq = RDoc::Markup::BlockQuote.new
        p :blockquote_start => [data, column] if @debug
        parse bq, column
        p :blockquote_end => indent if @debug
        parent << bq
      when *LIST_TOKENS then
        unget
        parent << build_list(indent)
      else
        type, data, column, line = @current_token
        raise ParseError, "Unhandled token #{type} (#{data.inspect}) at #{line}:#{column}"
      end
    end

    p :parse_end => indent if @debug

    parent

  end

  ##
  # Small hook that is overridden by RDoc::TomDoc

  def parse_text parent, indent # :nodoc:
    parent << build_paragraph(indent)
  end

  ##
  # Returns the next token on the stream without modifying the stream

  def peek_token
    token = @tokens.first || []
    p :peek => token if @debug
    token
  end

  ##
  # A simple wrapper of StringScanner that is aware of the current column and lineno

  class MyStringScanner
    def initialize(input)
      @line = @column = 0
      @s = StringScanner.new input
    end

    def scan(re)
      ret = @s.scan(re)
      @column += ret.length if ret
      ret
    end

    def unscan(s)
      @s.pos -= s.bytesize
      @column -= s.length
    end

    def pos
      [@column, @line]
    end

    def newline!
      @column = 0
      @line += 1
    end

    def eos?
      @s.eos?
    end

    def matched
      @s.matched
    end

    def [](i)
      @s[i]
    end
  end

  ##
  # Creates the StringScanner

  def setup_scanner input
gems/gems/rdoc-6.5.1.1/lib/rdoc/erbio.rb000064400000002006150403134120013276 0ustar00the column of the next token
      # the only thing we loose are trailing spaces at the end of the file
      next if @s.scan(/ +/)

      # note: after BULLET, LABEL, etc.,
      # indent will be the column of the next non-newline token

      @tokens << case
                 # [CR]LF => :NEWLINE
                 when @s.scan(/\r?\n/) then
                   token = [:NEWLINE, @s.matched, *pos]
                   @s.newline!
                   token
                 # === text => :HEADER then :TEXT
                 when @s.scan(/(=+)(\s*)/) then
                   level = @s[1].length
                   header = [:HEADER, level, *pos]

                   if @s[2] =~ /^\r?\n/ then
                     @s.unscan(@s[2])
                     header
                   else
                     pos = @s.pos
                     @s.scan(/.*/)
                     @tokens << header
                     [:TEXT, @s.matched.sub(/\r$/, ''), *pos]
                   end
                 # --- (at least 3) and nothing else on tgems/gems/rdoc-6.5.1.1/lib/rdoc/rd.rb000064400000007126150403134120012613 0ustar00          when /\d/    then :NUMBER
                     else
                       raise ParseError, "BUG token #{list_label}"
                     end
                   [list_type, list_label, *pos]
                 # [text] followed by spaces or end of line => :LABEL
                 when @s.scan(/\[(.*?)\]( +|\r?$)/) then
                   [:LABEL, @s[1], *pos]
                 # text:: followed by spaces or end of line => :NOTE
                 when @s.scan(/(.*?)::( +|\r?$)/) then
                   [:NOTE, @s[1], *pos]
                 # >>> followed by end of line => :BLOCKQUOTE
                 when @s.scan(/>>> *(\w+)?$/) then
                   if word = @s[1]
                     @s.unscan(word)
                   end
                   [:BLOCKQUOTE, word, *pos]
                 # anything else: :TEXT
                 else
                   @s.scan(/(.*?)(  )?\r?$/)
                   token = [:TEXT, @s[1], *pos]

                   if @s[2] then
                     @tokens << token
                     [:BREAK, @s[2], pos[0] + @s[1].length, pos[1]]
                   else
                     token
                   end
                 end
    end

    self
  end

  ##
  # Returns the current token to the token stream

  def unget
    token = @current_token
    p :unget => token if @debug
    raise Error, 'too many #ungets' if token == @tokens.first
    @tokens.unshift token if token
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/erbio.rb000064400000002006150403134120013276 0ustar00# frozen_string_literal: true
require 'erb'

##
# A subclass of ERB that writes directly to an IO.  Credit to Aaron Patterson
# and Masatoshi SEKI.
#
# To use:
#
#   erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil
#
#   File.open 'hello.txt', 'w' do |io|
#     erbio.result binding
#   end
#
# Note that binding must enclose the io you wish to output on.

class RDoc::ERBIO < ERB

  ##
  # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize

  def initialize str, safe_level = nil, legacy_trim_mode = nil, legacy_eoutvar = 'io', trim_mode: nil, eoutvar: 'io'
    if RUBY_VERSION >= '2.6'
      super(str, trim_mode: trim_mode, eoutvar: eoutvar)
    else
      super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
    end
  end

  ##
  # Instructs +compiler+ how to write to +io_variable+

  def set_eoutvar compiler, io_variable
    compiler.put_cmd    = "#{io_variable}.write"
    compiler.insert_cmd = "#{io_variable}.write"
    compiler.pre_cmd    = []
    compiler.post_cmd   = []
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/rd.rbgems/gems/rdoc-6.5.1.1/lib/rdoc/text.rb000064400000017206150403134120013172 0ustar00e-distribute or change these files under Ruby's License or GPL.
#
# 1. You may make and give away verbatim copies of the source form of the
#    software without restriction, provided that you duplicate all of the
#    original copyright notices and associated disclaimers.
#
# 2. You may modify your copy of the software in any way, provided that
#    you do at least ONE of the following:
#
#    a. place your modifications in the Public Domain or otherwise
#       make them Freely Available, such as by posting said
#       modifications to Usenet or an equivalent medium, or by allowing
#       the author to include your modifications in the software.
#
#    b. use the modified software only within your corporation or
#       organization.
#
#    c. give non-standard binaries non-standard names, with
#       instructions on where to get the original software distribution.
#
#    d. make other distribution arrangements with the author.
#
# 3. You may distribute the software in object code or binary form,
#    provided that you do at least ONE of the following:
#
#    a. distribute the binaries and library files of the software,
#       together with instructions (in the manual page or equivalent)
#       on where to get the original distribution.
#
#    b. accompany the distribution with the machine-readable source of
#       the software.
#
#    c. give non-standard binaries non-standard names, with
#       instructions on where to get the original software distribution.
#
#    d. make other distribution arrangements with the author.
#
# 4. You may modify and include the part of the software into any other
#    software (possibly commercial).  But some files in the distribution
#    are not written by the author, so that they are not under these terms.
#
#    For the list of those files and their copying conditions, see the
#    file LEGAL.
#
# 5. The scripts and library files supplied as input to or produced as
#    output from the software do not automatically fall under the
#    copyright of the software, but belong to whomever generated them,
#    and may be sold commercially, and may be aggregated with this
#    software.
#
# 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
#    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
#    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#    PURPOSE.

class RDoc::RD

  ##
  # Parses +rd+ source and returns an RDoc::Markup::Document.  gems/gems/rdoc-6.5.1.1/lib/rdoc/erbio.rb000064400000002006150403134120013276 0ustar00, "#{__dir__}/rd/inline_parser"
  autoload :Inline,       "#{__dir__}/rd/inline"

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/text.rb000064400000017206150403134120013172 0ustar00# frozgems/gems/rdoc-6.5.1.1/lib/rdoc/rd.rb000064400000007126150403134120012613 0ustar00ack('–', encoding, '--'),
      :open_dquote  => encode_fallback('“', encoding, '"'),
      :open_squote  => encode_fallback('‘', encoding, '\''),
      :trademark    => encode_fallback('®', encoding, '(r)'),
    }
  end

  ##
  # Transcodes +character+ to +encoding+ with a +fallback+ character.

  def self.encode_fallback character, encoding, fallback
    character.encode(encoding, :fallback => { character => fallback },
                     :undef => :replace, :replace => fallback)
  end

  ##
  # Expands tab characters in +text+ to eight spaces

  def expand_tabs text
    expanded = []

    text.each_line do |line|
      nil while line.gsub!(/(?:\G|\r)((?:.{8})*?)([^\t\r\n]{0,7})\t/) do
        r = "#{$1}#{$2}#{' ' * (8 - $2.size)}"
        r = RDoc::Encoding.change_encoding r, text.encoding
        r
      end

      expanded << line
    end

    expanded.join
  end

  ##
  # Flush +text+ left based on the shortest line

  def flush_left text
    indent = 9999

    text.each_line do |line|
      line_indent = line =~ /\S/ || 9999
      indent = line_indent if indent > line_indent
    end

    empty = ''
    empty = RDoc::Encoding.change_encoding empty, text.encoding

    text.gsub(/^ {0,#{indent}}/, empty)
  end

  ##
  # Convert a string in markup format into HTML.
  #
  # Requires the including class to implement #formatter

  def markup text
    if @store.rdoc.options
      locale = @store.rdoc.options.locale
    else
      locale = nil
    end
    if locale
      i18n_text = RDoc::I18n::Text.new(text)
      text = i18n_text.translate(locale)
    end
    parse(text).accept formatter
  end

  ##
  # Strips hashes, expands tabs then flushes +text+ to the left

  def normalize_comment text
    return text if text.empty?

    case language
    when :ruby
      text = strip_hashes text
    when :c
      text = strip_stars text
    end
    text = expand_tabs    text
    text = flush_left     text
    text = strip_newlines text
    text
  end

  ##
  # Normalizes +text+ then builds a RDoc::Markup::Document from it

  def parse text, format = 'rdoc'
    return text if RDoc::Markup::Document === text
    return text.parse if RDoc::Comment === text

    text = normalize_comment text # TODO remove, should not be necessary

    return RDoc::Markup::Document.new if text =~ /\A\n*\z/

    MARKUP_FORMAT[format].parse text
  end

  ##
  # The first +limit+ characters of +text+ as HTML

  def snippet text, limit = 100
    document = parse text

    RDoc::Markup::ToHtmlSnippet.new(options, limit).convert document
  end

  ##
  # Strips leading # characters from +text+

  def strip_hashes text
    return text if text =~ /^(?>\s*)[^\#]/

    empty = ''gems/gems/rdoc-6.5.1.1/lib/rdoc/anon_class.rb000064400000000254150403134120014321 0ustar00$/, empty)
  end

  ##
  # Converts ampersand, dashes, ellipsis, quotes, copyright andgems/gems/rdoc-6.5.1.1/lib/rdoc/options.rb000064400000103371150403134120013700 0ustar00]
        after_word = nil
      when s.scan(/\(r\)/i) then
        html << encoded[:trademark]
        after_word = nil
      when s.scan(/---/) then
        html << encoded[:em_dash]
        after_word = nil
      when s.scan(/--/) then
        html << encoded[:en_dash]
        after_word = nil
      when s.scan(/&quot;|"/) then
        html << encoded[indquotes ? :close_dquote : :open_dquote]
        indquotes = !indquotes
        after_word = nil
      when s.scan(/``/) then # backtick double quote
        html << encoded[:open_dquote]
        after_word = nil
      when s.scan(/(?:&#39;|'){2}/) then # tick double quote
        html << encoded[:close_dquote]
        after_word = nil
      when s.scan(/`/) then # backtick
        if insquotes or after_word
          html << '`'
          after_word = false
        else
          html << encoded[:open_squote]
          insquotes = true
        end
      when s.scan(/&#39;|'/) then # single quote
        if insquotes
          html << encoded[:close_squote]
          insquotes = false
        elsif after_word
          # Mary's dog, my parents' house: do not start paired quotes
          html << encoded[:close_squote]
        else
          html << encoded[:open_squote]
          insquotes = true
        end

        after_word = nil
      else # advance to the next potentially significant character
        match = s.scan(/.+?(?=[<\\.("'`&-])/) #"

        if match then
          html << match
          after_word = match =~ /\w$/
        else
          html << s.rest
          break
        end
      end
    end

    html
  end

  ##
  # Wraps +txt+ to +line_len+

  def wrap(txt, line_len = 76)
    res = []
    sp = 0
    ep = txt.length

    while sp < ep
      # scan back for a space
      p = sp + line_len - 1
      if p >= ep
        p = ep
      else
        while p > sp and txt[p] != ?\s
          p -= 1
        end
        if p <= sp
          p = sp + line_len
          while p < ep and txt[p] != ?\s
            p += 1
          end
        end
      end
      res << txt[sp...p] << "\n"
      sp = p
      sp += 1 while sp < ep and txt[sp] == ?\s
    end

    res.join.strip
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/anon_class.rb000064400000000254150403134120014321 0ustar00# frozen_string_literal: true
##
# An anonymous class like:
#
#   c = Class.new do end
#
# AnonClass is currently not used.

class RDoc::AnonClass < RDoc::ClassModule
end

gems/gems/rdoc-6.5.1.1/lib/rdoc/options.rb000064400000103371150403134120013700 0ustar00# frozen_string_literal: true
require 'optparse'
require 'pathname'

##
# RDoc::Options handles the parsing and storage of options
#
# == Saved Options
#
# You can save some options like the markup format in the
# <tt>.rdoc_options</tt> file in your gem.  The easiest way to do this is:
#
#   rdoc --markup tomdoc --write-options
#
# Which will automatically create the file and fill it with the options you
# specified.
#
# The following options will not be saved since they interfere with the user's
# preferences or with the normal operation of RDoc:
#
# * +--coverage-report+
# * +--dry-run+
# * +--encoding+
# * +--force-update+
# * +--format+
# * +--pipe+
# * +--quiet+
# * +--template+
# * +--verbose+
#
# == Custom Options
#
# Generators can hook into RDoc::Options to add generator-specific command
# line options.
#
# When <tt>--format</tt> is encountered in ARGV, RDoc calls ::setup_options on
# the generator class to add extra options to the option parser.  Options for
# custom generators must occur after <tt>--format</tt>.  <tt>rdoc --help</tt>
# will list options for all installed generators.
#
# Example:
#
#   class RDoc::Generator::Spellcheck
#     RDoc::RDoc.add_generator self
#
#     def self.setup_options rdoc_options
#       op = rdoc_options.option_parser
#
#       op.on('--spell-dictionary DICTIONARY',
#             RDoc::Options::Path) do |dictionary|
#         rdoc_options.spell_dictionary = dictionary
#       end
#     end
#   end
#
# Of course, RDoc::Options does not respond to +spell_dictionary+ by default
# so you will need to add it:
#
#   class RDoc::Options
#
#     ##
#     # The spell dictionary used by the spell-checking plugin.
#
#     attr_accessor :spell_dictionary
#
#   end
#
# == Option Validators
#
# OptionParser validators will validate and cast user input values.  In
# addition to the validators that ship with OptionParser (String, Integer,
# Float, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.),
# RDoc::Options adds Path, PathArray and Template.

class RDoc::Options

  ##
  # The deprecated options.

  DEPRECATED = {
    '--accessor'      => 'support discontinued',
    '--diagram'       => 'support discontinued',
    '--help-output'   => 'support discontinued',
    '--image-format'  => 'was an option for --diagram',
    '--inline-source' => 'source code is now always inlined',
    '--merge'         => 'ri now always merges class information',
    '--one-file'      => 'support discontinued',
    '--op-name'       => 'support discontinued',
    '--opname'        => 'support discontinued',
    '--promiscuous'   => 'files always only document their content',
    '--ri-system'     => 'Ruby installers use other techniques',
  }

  ##
  # RDoc options ignored (or handled specially) by --write-options

  SPECIAL = %w[
    coverage_report
    dry_run
    encoding
    files
    force_output
    force_update
    generator
    generator_name
    generator_options
    generators
    op_dir
    page_dir
    option_parser
    pipe
    rdoc_include
    root
    static_path
    stylesheet_url
    template
    template_dir
    update_output_dir
    verbosity
    write_options
  ]

  ##
  # Option validator for OptionParser that matches a directory that exists on
  # the filesystem.

  Directory = Object.new

  ##
  # Option validator for OptionParser that matches a file or directory that
  # exists on the filesystem.

  Path = Object.new

  ##
  # Option validator for OptionParser that matches a comma-separated list of
  # files or directories that exist on the filesystem.

  PathArray = Object.new

  ##
  # Option validator for OptionParser that matches a template directory for an
  # installed generator that lives in
  # <tgems/gems/rdoc-6.5.1.1/lib/rdoc/anon_class.rb000064400000000254150403134120014321 0ustar00ription of the output generator (set with the <tt>--format</tt> option)

  attr_accessor :generator

  ##
  # For #==

  attr_reader :generator_name # :nodoc:

  ##
  # Loagems/gems/rdoc-6.5.1.1/lib/rdoc/options.rb000064400000103371150403134120013700 0ustar00

  attr_accessor :coverage_report

  ##
  # The name of the output directory

  attr_accessor :op_dir

  ##
  # The OptionParser for this instance

  attr_accessor :option_parser

  ##
  # Output heading decorations?
  attr_accessor :output_decoration

  ##
  # Directory where guides, FAQ, and other pages not associated with a class
  # live.  You may leave this unset if these are at the root of your project.

  attr_accessor :page_dir

  ##
  # Is RDoc in pipe mode?

  attr_accessor :pipe

  ##
  # Array of directories to search for files to satisfy an :include:

  attr_accessor :rdoc_include

  ##
  # Root of the source documentation will be generated for.  Set this when
  # building documentation outside the source directory.  Defaults to the
  # current directory.

  attr_accessor :root

  ##
  # Include the '#' at the front of hyperlinked instance method names

  attr_accessor :show_hash

  ##
  # Directory to copy static files from

  attr_accessor :static_path

  ##
  # The number of columns in a tab

  attr_accessor :tab_width

  ##
  # Template to be used when generating output

  attr_accessor :template

  ##
  # Directory the template lives in

  attr_accessor :template_dir

  ##
  # Additional template stylesheets

  attr_accessor :template_stylesheets

  ##
  # Documentation title

  attr_accessor :title

  ##
  # Should RDoc update the timestamps in the output dir?

  attr_accessor :update_output_dir

  ##
  # Verbosity, zero means quiet

  attr_accessor :verbosity

  ##
  # URL of web cvs frontend

  attr_accessor :webcvs

  ##
  # Minimum visibility of a documented method. One of +:public+, +:protected+,
  # +:private+ or +:nodoc+.
  #
  # The +:nodoc+ visibility ignores all directives related to visibility.  The
  # other visibilities may be overridden on a per-method basis with the :doc:
  # directive.

  attr_reader :visibility

  ##
  # Indicates if files of test suites should be skipped
  attr_accessor :skip_tests

  def initialize loaded_options = nil # :nodoc:
    init_ivars
    override loaded_options if loaded_options
  end

  def init_ivars # :nodoc:
    @dry_run = false
    @exclude = %w[
      ~\z \.orig\z \.rej\z \.bak\z
      \.gemspec\z
    ]
    @files = nil
    @force_output = false
    @force_update = true
    @generator = nil
    @generator_name = nil
    @generator_options = []
    @generators = RDoc::RDoc::GENERATORS
    @hyperlink_all = false
    @line_numbers = false
    @locale = nil
    @locale_name = nil
    @locale_dir = 'locale'
    @main_page = nil
    @markup = 'rdoc'
    @coverage_report = false
    @op_dir = nil
    @page_dir = nil
    @pipe = false
    @output_decoration = true
    @rdoc_include = []
    @root = Pathname(Dir.pwd)
    @show_hash = false
    @static_path = []
    @stylesheet_url = nil # TODO remove in RDoc 4
    @tab_width = 8
    @template = nil
    @template_dir = nil
    @template_stylesheets = []
    @title = nil
    @update_output_dir = true
    @verbosity = 1
    @visibility = :protected
    @webcvs = nil
    @write_options = false
    @encoding = Encoding::UTF_8
    @charset = @encoding.name
    @skip_tests = true
  end

  def init_with map # :nodoc:
    init_ivars

    encoding = map['encoding']
    @encoding = encoding ? Encoding.find(encoding) : encoding

    @charset        = map['charset']
    @exclude        = map['exclude']
    @generator_name = map['generator_name']
    @hyperlink_all  = map['hyperlink_all']
    @line_numbers   = map['line_numbers']
    @locale_name    = map['locale_name']
    @locale_dir     = map['locale_dir']
    @main_page      = map['main_page']
    @markup         = map['markup']
    @op_dir         = map['op_dir']
    @show_hash      = map['show_hash']
    @tab_width      = map['tab_width']
    @template_dir   = map['template_dir']
    @title          = map['title']
    @visibility     = map['visibility']
    @webcvs         = map['webcvs']

    @rdoc_include = sanitize_path map['rdoc_include']
    @static_path  = sanitize_path map['static_path']
  end

  def yaml_initialize tag, map # :nodoc:
    init_with map
  end

  def override map # :nodoc:
    if map.has_key?('encoding')
      encoding = map['encoding']
      @encoding = encoding ? Encoding.find(encoding) : encoding
    end

    @charset        = map['charset']        if map.has_key?('charset')
    @exclude        = map['exclude']        if map.has_key?('exclude')
    @generator_name = map['generator_name'] if map.has_key?('generator_name')
    @hyperlink_all  = map['hyperlink_all']  if map.has_key?('hyperlink_all')
    @line_numbers   = map['line_numbers']   if map.has_key?('line_numbers')
    @locale_name    = map['locale_name']    if map.has_key?('locale_name')
    @locale_dir     = map['locale_dir']     if map.has_key?('locale_dir')
    @main_page      = map['main_page']      if map.has_key?('main_page')
    @markup         = map['markup']         if map.has_key?('markup')
    @op_dir         = map['op_dir']         if map.has_key?('op_dir')
    @page_dir       = map['page_dir']       if map.has_key?('page_dir')
    @show_hash      = map['show_hash']      if map.has_key?('show_hash')
    @tab_width      = map['tab_width']      if map.has_key?('tab_width')
    @template_dir   = map['template_dir']   if map.has_key?('template_dir')
    @title          = map['title']          if map.has_key?('title')
    @visibility     = map['visibility']     if map.has_key?('visibility')
    @webcvs         = map['webcvs']         if map.has_key?('webcvs')

    if map.has_key?('rdoc_include')
      @rdoc_include = sanitize_path map['rdoc_include']
    end
    if map.has_key?('static_path')
      @static_path  = sanitize_path map['static_path']
    end
  end

  def == other # :nodoc:
    self.class === other and
      @encoding       == other.encoding       and
      @generator_name == other.generator_name and
      @hyperlink_all  == other.hyperlink_all  and
      @line_numbers   == other.line_numbers   and
      @locale         == other.locale         and
      @locale_dir     == other.locale_dir and
      @main_page      == other.main_page      and
      @markup         == other.markup         and
      @op_dir         == other.op_dir         and
      @rdoc_include   == other.rdoc_include   and
      @show_hash      == other.show_hash      and
      @static_path    == other.static_path    and
      @tab_width      == other.tab_width      and
      @template       == other.template       and
      @title          == other.title          and
      @visibility     == other.visibility     and
      @webcvs         == other.webcvs
  end

  ##
  # Check that the files on the command line exist

  def check_files
    @files.delete_if do |file|
      if File.exist? file then
        if File.readable? file then
          false
        else
          warn "file '#{file}' not readable"

          true
        end
      else
        warn "file '#{file}' not found"

        true
      end
    end
  end

  ##
  # Ensure only one generator is loaded

  def check_generator
    if @generator then
      raise OptionParser::InvalidOption,
        "generator already set to #{@generator_name}"
    end
  end

  ##
  # Set the title, but only if not already set. Used to set the title
  # from a source file, so that a title set from the command line
  # will have the priority.

  def default_title=(string)
    @title ||= string
  end

  ##
  # For dumping YAML

  def to_yaml(*options) # :nodoc:
    encoding = @encoding ? @encoding.name : nil

    yaml = {}
    yaml['encoding'] = encoding
    yaml['static_path'] = sanitize_path(@static_path)
    yaml['rdoc_include'] = sanitize_path(@rdoc_include)
    yaml['page_dir'] = (sanitize_path([@page_dir]).first if @page_dir)

    ivars = instance_variables.map { |ivar| ivar.to_s[1..-1] }
    ivars -= SPECIAL

    ivars.sort.each do |ivar|
      yaml[ivar] = instance_variable_get("@#{ivar}")
    end
    yaml.to_yaml
  end

  ##
  # Create a regexp for #exclude

  def exclude
    if @exclude.nil? or Regexp === @exclude then
      # done, #finish is being re-run
      @exclude
    elsif @exclude.empty? then
      nil
    else
      Regexp.new(@exclude.join("|"))
    end
  end

  ##
  # Completes any unfinished option setup business such as filtering for
  # existent files, creating a regexp for #exclude and setting a default
  # #template.

  def finish
    if @write_options then
      write_options
      exit
    end

    @op_dir ||= 'doc'

    @rdoc_include << "." if @rdoc_include.empty?
    root = @root.to_s
    @rdoc_include << root unless @rdoc_include.include?(root)

    @exclude = self.exclude

    finish_page_dir

    check_files

    # If no template was specified, use the default template for the output
    # formatter

    unless @template then
      @template     = @generator_name
      @template_dir = template_dir_for @template
    end

    if @locale_name
      @locale = RDoc::I18n::Locale[@locale_name]
      @locale.load(@locale_dir)
    else
      @locale = nil
    end

    self
  end

  ##
  # Fixes the page_dir to be relative to the root_dir and adds the page_dir to
  # the files list.

  def finish_page_dir
    return unless @page_dir

    @files << @page_dir

    page_dir = Pathname(@page_dir)
    begin
      page_dir = page_dir.expand_path.relative_path_from @root
    rescue ArgumentError
      # On Windows, sometimes crosses different drive letters.
      page_dir = page_dir.expand_path
    end

    @page_dir = page_dir
  end

  ##
  # Returns a properly-space list of generators and their descriptions.

  def generator_descriptions
    lengths = []

    generators = RDoc::RDoc::GENERATORS.map do |name, generator|
      lengths << name.length

      description = generator::DESCRIPTION if
        generator.const_defined? :DESCRIPTION

      [name, description]
    end

    longest = lengths.max

    generators.sort.map do |name, description|
      if description then
        "  %-*s - %s" % [longest, name, description]
      else
        "  #{name}"
      end
    end.join "\n"
  end

  ##
  # Parses command line options.

  def parse argv
    ignore_invalid = true

    argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT']

    opts = OptionParser.new do |opt|
      @option_parser = opt
      opt.program_name = File.basename $0
      opt.version = RDoc::VERSION
      opt.release = nil
      opt.summary_indent = ' ' * 4
      opt.banner = <<-EOF
Usage: #{opt.program_name} [options] [names...]

  Files are parsed, and the information they contain collected, before any
  output is produced. This allows cross references between all files to be
  resolved. If a name is a directory, it is traversed. If no names are
  specified, all Ruby files in the current directory (and subdirectories) are
  processed.

  How RDoc generates output depends on the output formatter being used, and on
  the options you give.

  Options can be specified via the RDOCOPT environment variable, which
  functions similar to the RUBYOPT environment variable for ruby.

    $ export RDOCOPT="--show-hash"

  will make rdoc show hashes in method links by default.  Command-line options
  always will override those in RDOCOPT.

  Available formatters:

#{generator_descriptions}

  RDoc understands the following file formats:

      EOF

      parsers = Hash.new { |h,parser| h[parser] = [] }

      RDoc::Parser.parsers.each do |regexp, parser|
        parsers[parser.name.sub('RDoc::Parser::', '')] << regexp.source
      end

      parsers.sort.each do |parser, regexp|
        opt.banner += "  - #{parser}: #{regexp.join ', '}\n"
      end
      opt.banner += "  - TomDoc:  Only in ruby files\n"

      opt.banner += "\n  The following options are deprecated:\n\n"

      name_length = DEPRECATED.keys.sort_by { |k| k.length }.last.length

      DEPRECATED.sort_by { |k,| k }.each do |name, reason|
        opt.banner += "    %*1$2$s  %3$s\n" % [-name_length, name, reason]
      end

      opt.accept Template do |template|
        template_dir = template_dir_for template

        unless template_dir then
          $stderr.puts "could not find template #{template}"
          nil
        else
          [template, template_dir]
        end
      end

      opt.accept Directory do |directory|
        directory = File.expand_path directory

        raise OptionParser::InvalidArgument unless File.directory? directory

        directory
      end

      opt.accept Path do |path|
        path = File.expand_path path

        raise OptionParser::InvalidArgument unless File.exist? path

        path
      end

      opt.accept PathArray do |paths,|
        paths = if paths then
                  paths.split(',').map { |d| d unless d.empty? }
                end

        paths.map do |path|
          path = File.expand_path path

          raise OptionParser::InvalidArgument unless File.exist? path

          path
        end
      end

      opt.separator nil
      opt.separator "Parsing options:"
      opt.separator nil

      opt.on("--encoding=ENCODING", "-e", Encoding.list.map { |e| e.name },
             "Specifies the output encoding.  All files",
             "read will be converted to this encoding.",
             "The default encoding is UTF-8.",
             "--encoding is preferred over --charset") do |value|
               @encoding = Encoding.find value
               @charset = @encoding.name # may not be valid value
             end

      opt.separator nil

      opt.on("--locale=NAME",
             "Specifies the output locale.") do |value|
        @locale_name = value
      end

      opt.on("--locale-data-dir=DIR",
             "Specifies the directory where locale data live.") do |value|
        @locale_dir = value
      end

      opt.separator nil

      opt.on("--all", "-a",
             "Synonym for --visibility=private.") do |value|
        @visibility = :private
      end

      opt.separator nil

      opt.on("--exclude=PATTERN", "-x", Regexp,
             "Do not process files or directories",
             "matching PATTERN.") do |value|
        @exclude << value
      end

      opt.separator nil

      opt.on("--no-skipping-tests", nil,
             "Don't skip generating documentation for test and spec files") do |value|
        @skip_tests = false
      end

      opt.separator nil

      opt.on("--extension=NEW=OLD", "-E",
             "Treat files ending with .new as if they",
             "ended with .old. Using '-E cgi=rb' will",
             "cause xxx.cgi to be parsed as a Ruby file.") do |value|
        new, old = value.split(/=/, 2)

        unless new and old then
          raise OptionParser::InvalidArgument, "Invalid parameter to '-E'"
        end

        unless RDoc::Parser.alias_extension old, new then
          raise OptionParser::InvalidArgument, "Unknown extension .#{old} to -E"
        end
      end

      opt.separator nil

      opt.on("--[no-]force-update", "-U",
             "Forces rdoc to scan all sources even if",
             "no files are newer than the flag file.") do |value|
        @force_update = value
      end

      opt.separator nil

      opt.on("--pipe", "-p",
             "Convert RDoc on stdin to HTML") do
        @pipe = true
      end

      opt.separator nil

      opt.on("--tab-width=WIDTH", "-w", Integer,
             "Set the width of tab characters.") do |value|
        raise OptionParser::InvalidArgument,
              "#{value} is an invalid tab width" if value <= 0
        @tab_width = value
      end

      opt.separator nil

      opt.on("--visibility=VISIBILITY", "-V", RDoc::VISIBILITIES + [:nodoc],
             "Minimum visibility to document a method.",
             "One of 'public', 'protected' (the default),",
             "'private' or 'nodoc' (show everything)") do |value|
        @visibility = value
      end

      opt.separator nil

      markup_formats = RDoc::Text::MARKUP_FORMAT.keys.sort

      opt.on("--markup=MARKUP", markup_formats,
             "The markup format for the named files.",
             "The default is rdoc.  Valid values are:",
             markup_formats.join(', ')) do |value|
        @markup = value
      end

      opt.separator nil

      opt.on("--root=ROOT", Directory,
             "Root of the source tree documentation",
             "will be generated for.  Set this when",
             "building documentation outside the",
             "source directory.  Default is the",
             "current directory.") do |root|
        @root = Pathname(root)
      end

      opt.separator nil

      opt.on("--page-dir=DIR", Directory,
             "Directory where guides, your FAQ or",
             "other pages not associated with a class",
             "live.  Set this when you don't store",
             "such files at your project root.",
             "NOTE: Do not use the same file name in",
             "the page dir and the root of your project") do |page_dir|
        @page_dir = page_dir
      end

      opt.separator nil
      opt.separator "Common generator options:"
      opt.separator nil

      opt.on("--force-output", "-O",
             "Forces rdoc to write the output files,",
             "even if the output directory exists",
             "and does not seem to have been created",
             "by rdoc.") do |value|
        @force_output = value
      end

      opt.separator nil

      generator_text = @generators.keys.map { |name| "  #{name}" }.sort

      opt.on("-f", "--fmt=FORMAT", "--format=FORMAT", @generators.keys,
             "Set the output formatter.  One of:", *generator_text) do |value|
        check_generator

        @generator_name = value.downcase
        setup_generator
      end

      opt.separator nil

      opt.on("--include=DIRECTORIES", "-i", PathArray,
             "Set (or add to) the list of directories to",
             "be searched when satisfying :include:",
             "requests. Can be used more than once.") do |value|
        @rdoc_include.concat value.map { |dir| dir.strip }
      end

      opt.separator nil

      opt.on("--[no-]coverage-report=[LEVEL]", "--[no-]dcov", "-C", Integer,
             "Prints a report on undocumented items.",
             "Does not generate files.") do |value|
        value = 0 if value.nil? # Integer converts -C to nil

        @coverage_report = value
        @force_update = true if value
      end

      opt.separator nil

      opt.on("--output=DIR", "--op", "-o",
             "Set the output directory.") do |value|
        @op_dir = value
      end

      opt.separator nil

      opt.on("-d",
             "Deprecated --diagram option.",
             "Prevents firing debug mode",
             "with legacy invocation.") do |value|
      end

      opt.separator nil
      opt.separator 'HTML generator options:'
      opt.separator nil

      opt.on("--charset=CHARSET", "-c",
             "Specifies the output HTML character-set.",
             "Use --encoding instead of --charset if",
             "available.") do |value|
        @charset = value
      end

      opt.separator nil

      opt.on("--hyperlink-all", "-A",
             "Generate hyperlinks for all words that",
             "correspond to known methods, even if they",
             "do not start with '#' or '::' (legacy",
             "behavior).") do |value|
        @hyperlink_all = value
      end

      opt.separator nil

      opt.on("--main=NAME", "-m",
             "NAME will be the initial page displayed.") do |value|
        @main_page = value
      end

      opt.separator nil

      opt.on("--[no-]line-numbers", "-N",
             "Include line numbers in the source code.",
             "By default, only the number of the first",
             "line is displayed, in a leading comment.") do |value|
        @line_numbers = value
      end

      opt.separator nil

      opt.on("--show-hash", "-H",
             "A name of the form #name in a comment is a",
             "possible hyperlink to an instance method",
             "name. When displayed, the '#' is removed",
             "unless this option is specified.") do |value|
        @show_hash = value
      end

      opt.separator nil

      opt.on("--template=NAME", "-T", Template,
             "Set the template used when generating",
             "output. The default depends on the",
             "formatter used.") do |(template, template_dir)|
        @template     = template
        @template_dir = template_dir
      end

      opt.separator nil

      opt.on("--template-stylesheets=FILES", PathArray,
             "Set (or add to) the list of files to",
             "include with the html template.") do |value|
        @template_stylesheets.concat value
      end

      opt.separator nil

      opt.on("--title=TITLE", "-t",
             "Set TITLE as the title for HTML output.") do |value|
        @title = value
      end

      opt.separator nil

      opt.on("--copy-files=PATH", Path,
             "Specify a file or directory to copy static",
             "files from.",
             "If a file is given it will be copied into",
             "the output dir.  If a directory is given the",
             "entire directory will be copied.",
             "You can use this multiple times") do |value|
        @static_path << value
      end

      opt.separator nil

      opt.on("--webcvs=URL", "-W",
             "Specify a URL for linking to a web frontend",
             "to CVS. If the URL contains a '\%s', the",
             "name of the current file will be",
             "substituted; if the URL doesn't contain a",
             "'\%s', the filename will be appended to it.") do |value|
        @webcvs = value
      end

      opt.separator nil
      opt.separator "ri generator options:"
      opt.separator nil

      opt.on("--ri", "-r",
             "Generate output for use by `ri`. The files",
             "are stored in the '.rdoc' directory under",
             "your home directory unless overridden by a",
             "subsequent --op parameter, so no special",
             "privileges are needed.") do |value|
        check_generator

        @generator_name = "ri"
        @op_dir ||= RDoc::RI::Paths::HOMEDIR
        setup_generator
      end

      opt.separator nil

      opt.on("--ri-site", "-R",
             "Generate output for use by `ri`. The files",
             "are stored in a site-wide directory,",
             "making them accessible to others, so",
             "special privileges are needed.") do |value|
        check_generator

        @generator_name = "ri"
        @op_dir = RDoc::RI::Paths.site_dir
        setup_generator
      end

      opt.separator nil
      opt.separator "Generic options:"
      opt.separator nil

      opt.on("--write-options",
             "Write .rdoc_options to the current",
             "directory with the given options.  Not all",
             "options will be used.  See RDoc::Options",
             "for details.") do |value|
        @write_options = true
      end

      opt.separator nil

      opt.on("--[no-]dry-run",
             "Don't write any files") do |value|
        @dry_run = value
      end

      opt.separator nil

      opt.on("-D", "--[no-]debug",
             "Displays lots on internal stuff.") do |value|
        $DEBUG_RDOC = value
      end

      opt.separator nil

      opt.on("--[no-]ignore-invalid",
             "Ignore invalid options and continue",
             "(default true).") do |value|
        ignore_invalid = value
      end

      opt.separator nil

      opt.on("--quiet", "-q",
             "Don't show progress as we parse.") do |value|
        @verbosity = 0
      end

      opt.separator nil

      opt.on("--verbose", "-V",
             "Display extra progress as RDoc parses") do |value|
        @verbosity = 2
      end

      opt.separator nil

      opt.on("--version", "-v", "print the version") do
        puts opt.version
        exit
      end

      opt.separator nil

      opt.on("--help", "-h", "Display this help") do
        RDoc::RDoc::GENERATORS.each_key do |generator|
          setup_generator generator
        end

        puts opt.help
        exit
      end

      opt.separator nil
    end

    setup_generator 'darkfish' if
      argv.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty?

    deprecated = []
    invalid = []

    begin
      opts.parse! argv
    rescue OptionParser::ParseError => e
      if DEPRECATED[e.args.first] then
        deprecated << e.args.first
      elsif %w[--format --ri -r --ri-site -R].include? e.args.first then
        raise
      else
        invalid << e.args.join(' ')
      end

      retry
    end

    unless @generator then
      @generator = RDoc::Generator::Darkfish
      @generator_name = 'darkfish'
    end

    if @pipe and not argv.empty? then
      @pipe = falsegems/gems/rdoc-6.5.1.1/lib/rdoc/stats.rb000064400000024772150403134120013352 0ustar00y = bool ? 0 : 1
  end

  ##
  # Removes directories from +path+ that are outside the current directory

  def sanitize_path path
    require 'pathname'
    dot = Pathname.new('.').expand_path

    path.reject do |item|
      path = Pathname.new(item).expand_path
      is_reject = nil
      relative = nil
      begin
        relative = path.relative_path_from(dot).to_s
      rescue ArgumentError
        # On Windows, sometimes crosses different drive letters.
        is_reject = true
      else
        is_reject = relative.start_with? '..'
      end
      is_reject
    end
  end

  ##
  # Set up an output generator for the named +generator_name+.
  #
  # If the found generator responds to :setup_options it will be called with
  # the options instance.  This allows generators to add custom options or set
  # default options.

  def setup_generator generator_name = @generator_name
    @generator = @generators[generator_name]

    unless @generator then
      raise OptionParser::InvalidArgument,
            "Invalid output formatter #{generator_name}"
    end

    return if @generator_options.include? @generator

    @generator_name = generator_name
    @generator_options << @generator

    if @generator.respond_to? :setup_options then
      @option_parser ||= OptionParser.new
      @generator.setup_options self
    end
  end

  ##
  # Finds the template dir for +template+

  def template_dir_for template
    template_path = File.join 'rdoc', 'generator', 'template', template

    $LOAD_PATH.map do |path|
      File.join File.expand_path(path), template_path
    end.find do |dir|
      File.directory? dir
    end
  end

  # Sets the minimum visibility of a documented method.
  #
  # Accepts +:public+, +:protected+, +:private+, +:nodoc+, or +:all+.
  #
  # When +:all+ is passed, visibility is set to +:private+, similarly to
  # RDOCOPT="--all", see #visibility for more information.

  def visibility= visibility
    case visibility
    when :all
      @visibility = :private
    else
      @visibility = visibility
    end
  end

  ##
  # Displays a warning using Kernel#warn if we're being verbose

  def warn message
    super message if @verbosity > 1
  end

  ##
  # Writes the YAML file .rdoc_options to the current directory containing the
  # parsed options.

  def write_options
    RDoc.load_yaml

    File.open '.rdoc_options', 'w' do |io|
      io.set_encoding Encoding::UTF_8

      io.print to_yaml
    end
  end

  ##
  # Loads options from .rdoc_options if the file exists, otherwise creates a
  # new RDoc::Options instance.

  def self.load_options
    options_file = File.expand_path '.rdoc_options'
    return RDoc::Options.new unless File.exist? options_file

    RDoc.load_yaml

    begin
      options = YAML.safe_load File.read('.rdoc_options'), permitted_classes: [RDoc::Options, Symbol]
    rescue Psych::SyntaxError
      raise RDoc::Error, "#{options_file} is not a valid rdoc options file"
    end

    return RDoc::Options.new unless options # Allow empty file.

    raise RDoc::Error, "#{options_file} is not a valid rdoc options file" unless
      RDoc::Options === options or Hash === options

    if Hash === options
      # Override the default values with the contents of YAML file.
      options = RDoc::Options.new options
    end

    options
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/stats.rb000064400000024772150403134120013352 0ustar00# frozen_string_literal: true
##
# RDoc statistics collector which prints a summary and report of a project's
# documentation totals.

class RDoc::Stats

  include RDoc::Text

  ##
  # Output level for the coverage report

  attr_reader :coverage_level

  ##
  # Count of files parsed during parsing

  attr_reader :files_so_far

  ##
  # Total number of files found

  attr_reader :num_files

  ##
  # Creates a new Stats that will have +num_files+.  +verbosity+ defaults to 1
  # which will create an RDoc::Stats::Normal outputter.

  def initialize store, num_files, verbosity = 1
    @num_files = num_files
    @store     = store

    @coverage_level   = 0
    @doc_items        = nil
    @files_so_far     = 0
    @fully_documented = false
    @num_params       = 0
    @percent_doc      = nil
    @start            = Time.now
    @undoc_params     = 0

    @display = case verbosity
               when 0 then Quiet.new   num_files
               when 1 then Normal.new  num_files
               else        Verbose.new num_files
               end
  end

  ##
  # Records the parsing of an alias +as+.

  def add_alias as
    @display.print_alias as
  end

  ##
  # Records the parsing of an attribute +attribute+

  def add_attribute attribute
    @display.print_attribute attribute
  end

  ##
  # Records the parsing of a class +klass+

  def add_class klass
    @display.print_class klass
  end

  ##
  # Records the parsing of +constant+

  def add_constant constant
    @display.print_constant constant
  end

  ##
  # Records the parsing of +file+

  def add_file(file)
    @files_so_far += 1
    @display.print_file @files_so_far, file
  end

  ##
  # Records the parsing of +method+

  def add_method(method)
    @display.print_method method
  end

  ##
  # Records the parsing of a module +mod+

  def add_module(mod)
    @display.print_module mod
  end

  ##
  # Call this to mark the beginning of parsing for display purposes

  def begin_adding
    @display.begin_adding
  end

  ##
  # Calculates documentation totals and percentages for classes, modules,
  # constants, attributes and methods.

  def calculate
    return if @doc_items

    ucm = @store.unique_classes_and_modules

    classes = @store.unique_classes.reject { |cm| cm.full_name == 'Object' }

    constants = []
    ucm.each { |cm| constants.concat cm.constants }

    methods = []
    ucm.each { |cm| methods.concat cm.method_list }

    attributes = []
    ucm.each { |cm| attributes.concat cm.attributes }

    @num_attributes, @undoc_attributes = doc_stats attributes
    @num_classes,    @undoc_classes    = doc_stats classes
    @num_constants,  @undoc_constants  = doc_stats constants
    @num_methods,    @undoc_methods    = doc_stats methods
    @num_modules,    @undoc_modules    = doc_stats @store.unique_modules

    @num_items =
      @num_attributes +
      @num_classes +
      @num_constants +
      @num_methods +
      @num_modules +
      @num_params

    @undoc_items =
      @undoc_attributes +
      @undoc_classes +
      @undoc_constants +
      @undoc_methods +
      @undoc_modules +
      @undoc_params

    @doc_items = @num_items - @undoc_items
  end

  ##
  # Sets coverage report level.  Accepted values are:
  #
  # false or nil:: No report
  # 0:: Classes, modules, constants, attributes, methods
  # 1:: Level 0 + method parameters

  def coverage_level= level
    level = -1 unless level

    @coverage_level = level
  end

  ##
  # Returns the length and number of undocumented items in +collection+.

  def doc_stats collection
    visible = collection.select { |item| item.display? }
    [visible.length, visible.count { |item| not item.documented? }]
  end

  ##
  # Call this to mark the end of parsing for display purposes

  def done_adding
    @display.done_adding
  end

  ##
  # The documentation status of this project.  +true+ when 100%, +false+ when
  # less than 100% and +nil+ when unknown.
  #
  # Set by calling #calculate

  def fully_documented?
    @fully_documented
  end

  ##
  # A report that says you did a great job!

  def great_job
    report = RDoc::Markup::Document.new

    report << RDoc::Markup::Paragraph.new('100% documentation!')
    report << RDoc::Markup::Paragraph.new('Great Job!')

    report
  end

  ##
  # Calculates the percentage of items documented.

  def percent_doc
    return @percent_doc if @percent_doc

    @fully_documented = (@num_items - @doc_items) == 0

    @percent_doc = @doc_items.to_f / @num_items * 100 if @num_items.nonzero?
    @percent_doc ||= 0

    @percent_doc
  end

  ##
  # Returns a report on which items are not documented

  def report
    if @coverage_level > 0 then
      extend RDoc::Text
    end

    if @coverage_level.zero? then
      calculate

      return great_job if @num_items == @doc_items
    end

    ucm = @store.unique_classes_and_modules

gems/gems/rdoc-6.5.1.1/lib/rdoc/stats.rb000064400000024772150403134120013352 0ustar00{attr.line}" : nil
      report << "  #{attr.definition} :#{attr.name} # in file #{attr.file.full_name}#{line}\n"
      report << "\n"
    end

    report
  end

  ##
  # Returns a report on undocumented items in ClassModule +cm+

  def report_class_module cm
    return if cm.fully_documented? and @coverage_level.zero?
    return unless cm.display?

    report = RDoc::Markup::Document.new

    if cm.in_files.empty? then
      report << RDoc::Markup::Paragraph.new("#{cm.definition} is referenced but empty.")
      report << RDoc::Markup::Paragraph.new("It probably came from another project.  I'm sorry I'm holding it against you.")

      return report
    elsif cm.documented? then
      documented = true
      klass = RDoc::Markup::Verbatim.new("#{cm.definition} # is documented\n")
    else
      report << RDoc::Markup::Paragraph.new('In files:')

      list = RDoc::Markup::List.new :BULLET

      cm.in_files.each do |file|
        para = RDoc::Markup::Paragraph.new file.full_name
        list << RDoc::Mgems/gems/rdoc-6.5.1.1/lib/rdoc/i18n.rb000064400000000264150403134120012761 0ustar00onstants cm
    return if cm.constants.empty?

    report = []

    cm.each_constant do |constant|
      # TODO constant aliases are listed in the summary but not reported
      # gems/gems/rdoc-6.5.1.1/lib/rdoc/require.rb000064400000001705150403134120013657 0ustar00ented\n"
        end
      end

      next if method.documented? and not param_report

      line = method.line ? ":#{method.line}" : nil
      scope = method.singleton ? 'self.' : nil

      report << "  # in file #{method.file.full_name}#{line}\n"
      report << param_report if param_report
      report << "  def #{scope}#{method.name}#{method.params}; end\n"
      report << "\n"
    end

    report
  end

  ##
  # Returns a summary of the collected statistics.

  def summary
    calculate

    num_width = [@num_files, @num_items].max.to_s.length
    undoc_width = [
      @undoc_attributes,
      @undoc_classes,
      @undoc_constants,
      @undoc_items,
      @undoc_methods,
      @undoc_modules,
      @undoc_params,
    ].max.to_s.length

    report = RDoc::Markup::Verbatim.new

    report << "Files:      %*d\n" % [num_width, @num_files]

    report << "\n"

    report << "Classes:    %*d (%*d undocumented)\n" % [
      num_width, @num_classes, gems/gems/rdoc-6.5.1.1/lib/rdoc/mixin.rb000064400000005402150403134120013325 0ustar00um_width, @num_params, undoc_width, @undoc_params] if
        @coverage_level > 0

    report << "\n"

    report << "Total:      %*d (%*d undocumented)\n" % [
      num_width, @num_items, undoc_width, @undoc_items]

    report << "%6.2f%% documented\n" % percent_doc
    report << "\n"
    report << "Elapsed: %0.1fs\n" % (Time.now - @start)

    RDoc::Markup::Document.new report
  end

  ##
  # Determines which parameters in +method+ were not documented.  Returns a
  # total parameter count and an Array of undocumented methods.

  def undoc_params method
    @formatter ||= RDoc::Markup::ToTtOnly.new

    params = method.param_list

    params = params.map { |param| param.gsub(/^\*\*?/, '') }

    return 0, [] if params.empty?

    document = parse method.comment

    tts = document.accept @formatter

    undoc = params - tts

    [params.length, undoc]
  end

  autoload :Quiet,   "#{__dir__}/stats/quiet"
  autoload :Normal,  "#{__dir__}/stats/normal"
  autoload :Verbose, "#{__dir__}/stats/verbose"

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/i18n.rb000064400000000264150403134120012761 0ustar00# frozen_string_literal: true
##
# This module provides i18n related features.

module RDoc::I18n

  autoload :Locale, "#{__dir__}/i18n/locale"
  require_relative 'i18n/text'

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/require.rb000064400000001705150403134120013657 0ustar00# frozen_string_literal: true
##
# A file loaded by \#require

class RDoc::Require < RDoc::CodeObject

  ##
  # Name of the required file

  attr_accessor :name

  ##
  # Creates a new Require that loads +name+ with +comment+

  def initialize(name, comment)gems/gems/rdoc-6.5.1.1/lib/rdoc/context.rb000064400000074420150403134120013673 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/mixin.rb000064400000005402150403134120013325 0ustar00# frozen_string_literal: true
##
# A Mixin adds features from a module into another context.  RDoc::Include and
# RDoc::Extend are both mixins.

class RDoc::Mixin < RDoc::CodeObject

  ##
  # Name of included module

  attr_accessor :name

  ##
  # Creates a new Mixin for +name+ with +comment+

  def initialize(name, comment)
    super()
    @name = name
    self.comment = comment
    @module = nil # cache for module if found
  end

  ##
  # Mixins are sorted by name

  def <=> other
    return unless self.class === other

    name <=> other.name
  end

  def == other # :nodoc:
    self.class === other and @name == other.name
  end

  alias eql? == # :nodoc:

  ##
  # Full name based on #module

  def full_name
    m = self.module
    RDoc::ClassModule === m ? m.full_name : @name
  end

  def hash # :nodoc:
    [@name, self.module].hash
  end

  def inspect # :nodoc:
    "#<%s:0x%x %s.%s %s>" % [
      self.class,
      object_id,
      parent_name, self.class.name.downcase, @name,
    ]
  end

  ##
  # Attempts to locate the included module object.  Returns the name if not
  # known.
  #
  # The scoping rules of Ruby to resolve the name of an included module are:
  # - first look into the children of the current context;
  # - if not found, look into the children of included modules,
  #   in reverse inclusion order;
  # - if still not found, go up the hierarchy of names.
  #
  # This method has <code>O(n!)</code> behavior when the module calling
  # include is referencing nonexistent modules.  Avoid calling #module until
  # after all the files are parsed.  This behavior is due to ruby's constant
  # lookup behavior.
  #
  # As of the beginning of October, 2011, no gem includes nonexistent modules.

  def module
    return @module if @module

    # search the current context
    return @name unless parent
    full_name = parent.child_name(@name)
    @module = @store.modules_hash[full_name]
    return @module if @module
    return @name if @name =~ /^::/

    # search the includes before this one, in reverse order
    searched = parent.includes.take_while { |i| i != self }.reverse
    searched.each do |i|
      inc = i.module
      next if String === inc
      full_name = inc.child_name(@name)
      @module = @store.modules_hash[full_name]
      return @module if @module
    end

    # go up the hierarchy of names
    up = parent.parent
    while up
      full_name = up.child_name(@name)
      @module = @store.modules_hash[full_name]
      return @module if @module
      up = up.parent
    end

    @name
  egems/gems/rdoc-6.5.1.1/lib/rdoc/i18n.rb000064400000000264150403134120012761 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/context.rb000064400000074420150403134120013673 0gems/gems/rdoc-6.5.1.1/lib/rdoc/require.rb000064400000001705150403134120013657 0ustar00title.to_s } # :nodoc:

  ##
  # Class/module aliases

  attr_reader :aliases

  ##
  # All attr* methods

  attr_reader :attributes

  ##
  # Block params to be used in the next MethodAttr parsed under this context

  attr_accessor :block_params

  ##
  # Constants defined

  attr_reader :constants

  ##
  # Sets the current documentation section of documentation

  attr_writer :current_section

  ##
  # Files this context is found in

  attr_reader :in_files

  ##
  # Modules this context includes

  attr_reader :includes

  ##
  # Modules this context is extended with

  attr_reader :extends

  ##
  # Methods defined in this context

  attr_reader :method_list

  ##
  # Name of this class excluding namespace.  See also full_name

  attr_reader :name

  ##
  # Files this context requires

  attr_reader :requires

  ##
  # Use this section for the next method, attribute or constant added.

  attr_accessor :temporary_section

  ##
  # Hash <tt>old_namgems/gems/rdoc-6.5.1.1/lib/rdoc/mixin.rb000064400000005402150403134120013325 0ustar00s to be used in the next MethodAttr parsed under this context

  attr_accessor :params

  ##
  # Hash of registered constants.

  attr_reader :constants_hash

  ##
  # Creates an unnamed empty context with public current visibility

  def initialize
    super

    @in_files = []

    @name    ||= "unknown"
    @parent  = nil
    @visibility = :public

    @current_section = Section.new self, nil, nil
    @sections = { nil => @current_section }
    @temporary_section = nil

    @classes = {}
    @modules = {}

    initialize_methods_etc
  end

  ##
  # Sets the defaults for methods and so-forth

  def initialize_methods_etc
    @method_list = []
    @attributes  = []
    @aliases     = []
    @requires    = []
    @includes    = []
    @extends     = []
    @constants   = []
    @external_aliases = []
    @current_line_visibility = nil

    # This Hash maps a method name to a list of unmatched aliases (aliases of
    # a method not yet encountered).
    @unmatched_alias_lists = {}

    @methods_hash   = {}
    @constants_hash = {}

    @params = nil

    @store ||= nil
  end

  ##
  # Contexts are sorted by full_name

  def <=>(other)
    return nil unless RDoc::CodeObject === other

    full_name <=> other.full_name
  end

  ##
  # Adds an item of type +klass+ with the given +name+ and +comment+ to the
  # context.
  #
  # Currently only RDoc::Extend and RDoc::Include are supported.

  def add klass, name, comment
    if RDoc::Extend == klass then
      ext = RDoc::Extend.new name, comment
      add_extend ext
    elsif RDoc::Include == klass then
      incl = RDoc::Include.new name, comment
      add_include incl
    else
      raise NotImplementedError, "adding a #{klass} is not implemented"
    end
  end

  ##
  # Adds +an_alias+ that is automatically resolved

  def add_alias an_alias
    return an_alias unless @document_self

    method_attr = find_method(an_alias.old_name, an_alias.singleton) ||
                  find_attribute(an_alias.old_name, an_alias.singleton)

    if method_attr then
      method_attr.add_alias an_alias, self
    else
      add_to @external_aliases, an_alias
      unmatched_alias_list =
        @unmatched_alias_lists[an_alias.pretty_old_name] ||= []
      unmatched_alias_list.push an_alias
    end

    an_alias
  end

  ##
  # Adds +attribute+ if not already there. If it is (as method(s) or attribute),
  # updates the comment if it was empty.
  #
  # The attribute is registered only if it defines a new method.
  # For instance, <tt>attr_reader :foo</tt> will not be registered
  # if method +foo+ exists, but <tt>attr_accessor :foo</tt> will be registered
  # if method +foo+ exists, but <tt>foo=</tt> does not.

  def add_attribute attribute
    return attribute unless @document_self

    # mainly to check for redefinition of an attribute asgems/gems/rdoc-6.5.1.1/lib/rdoc/context.rb000064400000074420150403134120013673 0ustar00ash[attribute.pretty_name] and
            RDoc::Attr === registered then
        registered.rw = 'RW'
      else
        @methods_hash[key] = attribute
        register = true
      end
    end

    if register then
      attribute.visibility = @visibility
      add_to @attributes, attribute
      resolve_aliases attribute
    end

    attribute
  end

  ##
  # Adds a class named +given_name+ with +superclass+.
  #
  # Both +given_name+ and +superclass+ may contain '::', and are
  # interpreted relative to the +self+ context. This allows handling correctly
  # examples like these:
  #   class RDoc::Gauntlet < Gauntlet
  #   module Mod
  #     class Object   # implies < ::Object
  #     class SubObject < Object  # this is _not_ ::Object
  #
  # Given <tt>class Container::Item</tt> RDoc assumes +Container+ is a module
  # unless it later sees <tt>class Container</tt>.  +add_class+ automatically
  # upgrades +given_name+ to a class in this case.

  def add_class class_type, given_name, superclass = '::Object'
    # superclass +nil+ is passed by the C parser in the following cases:
    # - registering Object in 1.8 (correct)
    # - registering BasicObject in 1.9 (correct)
    # - registering RubyVM in 1.9 in iseq.c (incorrect: < Object in vm.c)
    #
    # If we later find a superclass for a registered class with a nil
    # superclass, we must honor it.

    # find the name & enclosing context
    if given_name =~ /^:+(\w+)$/ then
      full_name = $1
      enclosing = top_level
      name = full_name.split(/:+/).last
    else
      full_name = child_name given_name

      if full_name =~ /^(.+)::(\w+)$/ then
        name = $2
        ename = $1
        enclosing = @store.classes_hash[ename] || @store.modules_hash[ename]
        # HACK: crashes in actionpack/lib/action_view/helpers/form_helper.rb (metaprogramming)
        unless enclosing then
          # try the given name at top level (will work for the above example)
          enclosing = @store.classes_hash[given_name] ||
                      @store.modules_hash[given_name]
          return enclosing if enclosing
          # not found: create the parent(s)
          names = ename.split('::')
          enclosing = self
          names.each do |n|
            enclosing = enclosing.classes_hash[n] ||
                        enclosing.modules_hash[n] ||
                        enclosing.add_module(RDoc::NormalModule, n)
          end
        end
      else
        name = full_name
        enclosing = self
      end
    end

    # fix up superclass
    if full_name == 'BasicObject' then
      superclass = nil
    elsif full_name == 'Object' then
      superclass = '::BasicObject'
    end

    # find the superclass full name
    if superclass then
      if superclass =~ /^:+/ then
        superclass = $' #'
      else
        if superclass =~ /^(\w+):+(.+)$/ then
          suffix = $2
          mod = find_module_named($1)
          superclass = mod.full_name + '::' + suffix if mod
        else
          mod = find_module_named(superclass)
          superclass = mod.full_name if mod
        end
      end

      # did we believe it was a module?
      mod = @store.modules_hash.delete superclass

      upgrade_to_class mod, RDoc::NormalClass, mod.parent if mod

      # e.g., Object < Object
      superclass = nil if superclass == full_name
    end

    klass = @store.classes_hash[full_name]

    if klass then
      # if TopLevel, it may not be registered in the classes:
      enclosing.classes_hash[name] = klass

      # update the superclass if needed
      if superclass then
        existing = klass.superclass
        existing = existing.full_name unless existing.is_a?(String) if existing
        if existing.nil? ||
           (existing == 'Object' && superclass != 'Object') then
          klass.superclass = superclass
        end
      end
    else
      # this is a new class
      mod = @store.modules_hash.delete full_name

      if mod then
        klass = upgrade_to_class mod, RDoc::NormalClass, enclosing

        klass.superclass = superclass unless superclass.nil?
      else
        klass = class_type.new name, superclass

        enclosing.add_class_or_module(klass, enclosing.classes_hash,
                                      @store.classes_hash)
      end
    end

    klass.parent = self

    klass
  end

  ##
  # Adds the class or module +mod+ to the modules or
  # classes Hash +self_hash+, and to +all_hash+ (either
  # <tt>TopLevel::modules_hash</tt> or <tt>TopLevel::classes_hash</tt>),
  # unless #done_documenting is +true+. Sets the #parent of +mod+
  # to +self+, and its #section to #current_section. Returns +mod+.

  def add_class_or_module mod, self_hash, all_hash
    mod.section = current_section # TODO declaring context? something is
                                  # wrong here...
    mod.parent = self
    mod.full_name = nil
    mod.store = @store

    unless @done_documenting then
      self_hash[mod.name] = mod
      # this must be done AFTER adding mod to its parent, so that the full
      # name is correct:
      all_hash[mod.full_name] = mod
      if @store.unmatched_constant_alias[mod.full_name] then
        to, file = @store.unmatched_constant_alias[mod.full_name]
        add_module_alias mod, mod.name, to, file
      end
    end

    mod
  end

  ##
  # Adds +constant+ if not already there. If it is, updates the comment,
  # value and/or is_alias_for of the known constant if they were empty/nil.

  def add_constant constant
    return constant unless @document_self

    # HACK: avoid duplicate 'PI' & 'E' in math.c (1.8.7 source code)
    # (this is a #ifdef: should be handled by the C parser)
    known = @constants_hash[constant.name]

    if known then
      known.comment = constant.comment if known.comment.empty?

      known.value = constant.value if
        known.value.nil? or known.value.strip.empty?

      known.is_alias_for ||= constant.is_alias_for
    else
      @constants_hash[constant.name] = constant
      add_to @constants, constant
    end

    constant
  end

  ##
  # Adds included module +include+ which should be an RDoc::Include

  def add_include include
    add_to @includes, include

    include
  end

  ##
  # Adds extension module +ext+ which should be an RDoc::Extend

  def add_extend ext
    add_to @extends, ext

    ext
  end

  ##
  # Adds +method+ if not already there. If it is (as method or attribute),
  # updates the comment if it was empty.

  def add_method method
    return method unless @document_self

    # HACK: avoid duplicate 'new' in io.c & struct.c (1.8.7 source code)
    key = method.pretty_name
    known = @methods_hash[key]

    if known then
      if @store then # otherwise we are loading
        known.comment = method.comment if known.comment.empty?
        previously = ", previously in #{known.file}" unless
          method.file == known.file
        @store.rdoc.options.warn \
          "Duplicate method #{known.full_name} in #{method.file}#{previously}"
      end
    else
      @methods_hash[key] = method
      if @current_line_visibility
        method.visibility, @current_line_visibility = @current_line_visibility, nil
      else
        method.visibility = @visibility
      end
      add_to @method_list, method
      resolve_aliases method
    end

    method
  end

  ##
  # Adds a module named +name+.  If RDoc already knows +name+ is a class then
  # that class is returned instead.  See also #add_class.

  def add_module(class_type, name)
    mod = @classes[name] || @modules[name]
    return mod if mod

    full_name = child_name name
    mod = @store.modules_hash[full_name] || class_type.new(name)

    add_class_or_module mod, @modules, @store.modules_hash
  end

  ##
  # Adds a module by +RDoc::NormalModule+ instance. See also #add_module.

  def add_module_by_normal_module(mod)
    add_class_or_module mod, @modules, @store.modules_hash
  end

  ##
  # Adds an alias from +from+ (a class or module) to +name+ which was defined
  # in +file+.

  def add_module_alias from, from_name, to, file
    return from if @done_documenting

    to_full_name = child_name to.name

    # if we already know this name, don't register an alias:
    # see the metaprogramming in lib/active_support/basic_object.rb,
    # where we already know BasicObject is a class when we find
    # BasicObject = BlankSlate
    return from if @store.find_class_or_module to_full_name

    unless from
      @store.unmatched_constant_alias[child_name(from_name)] = [to, file]
      return to
    end

    new_to = from.dup
    new_to.name = to.name
    new_to.full_name = nil

    if new_to.module? then
      @store.modules_hash[to_full_name] = new_to
      @modules[to.name] = new_to
    else
      @store.classes_hash[to_full_name] = new_to
      @classes[to.name] = new_to
    end

    # Registers a constant for this alias.  The constant value and comment
    # will be updated later, when the Ruby parser adds the constant
    const = RDoc::Constant.new to.name, nil, new_to.comment
    const.record_location file
    const.is_alias_for = from
    add_constant const

    new_to
  end

  ##
  # Adds +require+ to this context's top level

  def add_require(require)
    return require unless @document_self

    if RDoc::TopLevel === self then
      add_to @requires, require
    else
      parent.add_require require
    end
  end

  ##
  # Returns a section with +title+, creating it if it doesn't already exist.
  # +comment+ will be appended to the section's comment.
  #
  # A section with a +title+ of +nil+ will return the default section.
  #
  # See also RDoc::Context::Section

  def add_section title, comment = nil
    if section = @sections[title] then
      section.add_comment comment if comment
    else
      section = Section.new self, title, comment
      @sections[title] = section
    end

    section
  end

  ##
  # Adds +thing+ to the collection +array+

  def add_to array, thing
    array << thing if @document_self

    thing.parent  = self
    thing.store   = @store if @store
    thing.section = current_section
  end

  ##
  # Is there any content?
  #
  # This means any of: comment, aliases, methods, attributes, external
  # aliases, require, constant.
  #
  # Includes and extends are also checked unless <tt>includes == false</tt>.

  def any_content(includes = true)
    @any_content ||= !(
      @comment.empty? &&
      @method_list.empty? &&
      @attributes.empty? &&
      @aliases.empty? &&
      @external_aliases.empty? &&
      @requires.empty? &&
      @constants.empty?
    )
    @any_content || (includes && !(@includes + @extends).empty? )
  end

  ##
  # Creates the full name for a child with +name+

  def child_name name
    if name =~ /^:+/
      $'  #'
    elsif RDoc::TopLevel === self then
      name
    else
      "#{self.full_name}::#{name}"
    end
  end

  ##
  # Class attributes

  def class_attributes
    @class_attributes ||= attributes.select { |a| a.singleton }
  end

  ##
  # Class methods

  def class_method_list
    @class_method_list ||= method_list.select { |a| a.singleton }
  end

  ##
  # Array of classes in this context

  def classes
    @classes.values
  end

  ##
  # All classes and modules in this namespace

  def classes_and_modules
    classes + modules
  end

  ##
  # Hash of classes keyed by class name

  def classes_hash
    @classes
  end

  ##
  # The current documentation section that new items will be added to.  If
  # temporary_section is available it will be used.

  def current_section
    if section = @temporary_section then
      @temporary_section = nil
    else
      section = @current_section
    end

    section
  end

  ##
  # Is part of this thing was defined in +file+?

  def defined_in?(file)
    @in_files.include?(file)
  end

  def display(method_attr) # :nodoc:
    if method_attr.is_a? RDoc::Attr
      "#{method_attr.definition} #{method_attr.pretty_name}"
    else
      "method #{method_attr.pretty_name}"
    end
  end

  ##
  # Iterator for ancestors for duck-typing.  Does nothing.  See
  # RDoc::ClassModule#each_ancestor.
  #
  # This method exists to make it easy to work with Context subclasses that
  # aren't part of RDoc.

  def each_ancestor # :nodoc:
  end

  ##
  # Iterator for attributes

  def each_attribute # :yields: attribute
    @attributes.each { |a| yield a }
  end

  ##
  # Iterator for classes and modules

  def each_classmodule(&block) # :yields: module
    classes_and_modules.sort.each(&block)
  end

  ##
  # Iterator for constants

  def each_constant # :yields: constant
    @constants.each {|c| yield c}
  end

  ##
  # Iterator for included modules

  def each_include # :yields: include
    @includes.each do |i| yield i end
  end

  ##
  # Iterator for extension modules

  def each_extend # :yields: extend
    @extends.each do |e| yield e end
  end

  ##
  # Iterator for methods

  def each_method # :yields: method
    return enum_for __method__ unless block_given?

    @method_list.sort.each { |m| yield m }
  end

  ##
  # Iterator for each section's contents sorted by title.  The +section+, the
  # section's +constants+ and the sections +attributes+ are yielded.  The
  # +constants+ and +attributes+ collections are sorted.
  #
  # To retrieve methods in a section use #methods_by_type with the optional
  # +section+ parameter.
  #
  # NOTE: Do not edit collections yielded by this method

  def each_section # :yields: section, constants, attributes
    return enum_for __method__ unless block_given?

    constants  = @constants.group_by  do |constant|  constant.section end
    attributes = @attributes.group_by do |attribute| attribute.section end

    constants.default  = []
    attributes.default = []

    sort_sections.each do |section|
      yield section, constants[section].select(&:display?).sort, attributes[section].select(&:display?).sort
    end
  end

  ##
  # Finds an attribute +name+ with singleton value +singleton+.

  def find_attribute(name, singleton)
    name = $1 if name =~ /^(.*)=$/
    @attributes.find { |a| a.name == name && a.singleton == singleton }
  end

  ##
  # Finds an attribute with +name+ in this context

  def find_attribute_named(name)
    case name
    when /\A#/ then
      find_attribute name[1..-1], false
    when /\A::/ then
      find_attribute name[2..-1], true
    else
      @attributes.find { |a| a.name == name }
    end
  end

  ##
  # Finds a class method with +name+ in this context

  def find_class_method_named(name)
    @method_list.find { |meth| meth.singleton && meth.name == name }
  end

  ##
  # Finds a constant with +name+ in this context

  def find_constant_named(name)
    @constants.find do |m|
      m.name == name || m.full_name == name
    end
  end

  ##
  # Find a module at a higher scope

  def find_enclosing_module_named(name)
    parent && parent.find_module_named(name)
  end

  ##
  # Finds an external alias +name+ with singleton value +singleton+.

  def find_external_alias(name, singleton)
    @external_aliases.find { |m| m.name == name && m.singleton == singleton }
  end

  ##
  # Finds an external alias with +name+ in this context

  def find_external_alias_named(name)
    case name
    when /\A#/ then
      find_external_alias name[1..-1], false
    when /\A::/ then
      find_external_alias name[2..-1], true
    else
      @external_aliases.find { |a| a.name == name }
    end
  end

  ##
  # Finds a file with +name+ in this context

  def find_file_named name
    @store.find_file_named name
  end

  ##
  # Finds an instance method with +name+ in this context

  def find_instance_method_named(name)
    @method_list.find { |meth| !meth.singleton && meth.name == name }
  end

  ##
  # Finds a method, constant, attribute, external alias, module or file
  # named +symbol+ in this context.

  def find_local_symbol(symbol)
    find_method_named(symbol) or
    find_constant_named(symbol) or
    find_attribute_named(symbol) or
    find_external_alias_named(symbol) or
    find_module_named(symbol) or
    find_file_named(symbol)
  end

  ##
  # Finds a method named +name+ with singleton value +singleton+.

  def find_method(name, singleton)
    @method_list.find { |m|
      if m.singleton
        m.name == name && m.singleton == singleton
      else
        m.name == name && !m.singleton && !singleton
      end
    }
  end

  ##
  # Finds a instance or module method with +name+ in this context

  def find_method_named(name)
    case name
    when /\A#/ then
      find_method name[1..-1], false
    when /\A::/ then
      find_method name[2..-1], true
    else
      @method_list.find { |meth| meth.name == name }
    end
  end

  ##
  # Find a module with +name+ using ruby's scoping rules

  def find_module_named(name)
    res = @modules[name] || @classes[name]
    return res if res
    return self if self.name == name
    find_enclosing_module_named name
  end

  ##
  # Look up +symbol+, first as a module, then as a local symbol.

  def find_symbol(symbol)
    find_symbol_module(symbol) || find_local_symbol(symbol)
  end

  ##
  # Look up a module named +symbol+.

  def find_symbol_module(symbol)
    result = nil

    # look for a class or module 'symbol'
    case symbol
    when /^::/ then
      result = @store.find_class_or_module symbol
    when /^(\w+):+(.+)$/
      suffix = $2
      top = $1
      searched = self
      while searched do
        mod = searched.find_module_named(top)
        break unless mod
        result = @store.find_class_or_module "#{mod.full_name}::#{suffix}"
        break if result || searched.is_a?(RDoc::TopLevel)
        searched = searched.parent
      end
    else
      searched = self
      while searched do
        result = searched.find_module_named(symbol)
        break if result || searched.is_a?(RDoc::TopLevel)
        searched = searched.parent
      end
    end

    result
  end

  ##
  # The full name for this context.  This method is overridden by subclasses.

  def full_name
    '(unknown)'
  end

  ##
  # Does this context and its methods and constants all have documentation?
  #
  # (Yes, fully documented doesn't mean everything.)

  def fully_documented?
    documented? and
      attributes.all? { |a| a.documented? } and
      method_list.all? { |m| m.documented? } and
      constants.all? { |c| c.documented? }
  end

  ##
  # URL for this with a +prefix+

  def http_url(prefix)
    path = name_for_path
    path = path.gsub(/<<\s*(\w*)/, 'from-\1') if path =~ /<</
    path = [prefix] + path.split('::')

    File.join(*path.compact) + '.html'
  end

  ##
  # Instance attributes

  def instance_attributes
    @instance_attributes ||= attributes.reject { |a| a.singleton }
  end

  ##
  # Instance methods

  def instance_methods
    @instance_methods ||= method_list.reject { |a| a.singleton }
  end

  ##
  # Instance methods
  #--
  # TODO remove this later

  def instance_method_list
    warn '#instance_method_list is obsoleted, please use #instance_methods'
    @instance_methods ||= method_list.reject { |a| a.singleton }
  end

  ##
  # Breaks method_list into a nested hash by type (<tt>'class'</tt> or
  # <tt>'instance'</tt>) and visibility (+:public+, +:protected+, +:private+).
  #
  # If +section+ is provided only methods in that RDoc::Context::Section will
  # be returned.

  def methods_by_type section = nil
    methods = {}

    TYPES.each do |type|
      visibilities = {}
      RDoc::VISIBILITIES.each do |vis|
        visibilities[vis] = []
      end

      methods[type] = visibilities
    end

    each_method do |method|
      next if section and not method.section == section
      methods[method.type][method.visibility] << method
    end

    methods
  end

  ##
  # Yields AnyMethod and Attr entries matching the list of names in +methods+.

  def methods_matching(methods, singleton = false, &block)
    (@method_list + @attributes).each do |m|
      yield m if methods.include?(m.name) and m.singleton == singleton
    end

    each_ancestor do |parent|
      parent.methods_matching(methods, singleton, &block)
    end
  end

  ##
  # Array of modules in this context

  def modules
    @modules.values
  end

  ##
  # Hash of modules keyed by module name

  def modules_hash
    @modules
  end

  ##
  # Name to use to generate the url.
  # <tt>#full_name</tt> by default.

  def name_for_path
    full_name
  end

  ##
  # Changes the visibility for new methods to +visibility+

  def ongoing_visibility=(visibility)
    @visibility = visibility
  end

  ##
  # Record +top_level+ as a file +self+ is in.

  def record_location(top_level)
    @in_files << top_level unless @in_files.include?(top_level)
  end

  ##
  # Should we remove this context from the documentation?
  #
  # The answer is yes if:
  # * #received_nodoc is +true+
  # * #any_content is +false+ (not counting includes)
  # * All #includes are modules (not a string), and their module has
  #   <tt>#remove_from_documentation? == true</tt>
  # * All classes and modules have <tt>#remove_from_documentation? == true</tt>

  def remove_from_documentation?
    @remove_from_documentation ||=
      @received_nodoc &&
      !any_content(false) &&
      @includes.all? { |i| !i.module.is_a?(String) && i.module.remove_from_documentation? } &gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot/message_extractor.rb000064400000003037150403134120020512 0ustar00on
      }
    else
      array.reject! { |e|
        e.visibility == :private and not e.force_documentation
      }
    end
  end

  ##
  # Tries to resolve unmatched aliases when a method or attribute has just
  # been added.

  def resolve_aliases added
    # resolve any pending unmatched aliases
    key = added.pretty_name
    unmatched_alias_list = @unmatched_alias_lists[key]
    return unless unmatched_alias_list
    unmatched_alias_list.each do |unmatched_alias|
      added.add_alias unmatched_alias, self
      @external_aliases.delete unmatched_alias
    end
    @unmatched_alias_lists.delete key
  end

  ##
  # Returns RDoc::Context::Section objects referenced in this context for use
  # in a table of contents.

  def section_contents
    used_sections = {}

    each_method do |method|
      next unless method.display?

      used_sections[method.section] = true
    end

    # order found sections
    sections = sort_sections.select do |section|
      used_sections[section]
    end

    # only the default section is used
    return [] if
      sections.length == 1 and not sections.first.title

    sections
  end

  ##
  # Sections in this context

  def sections
    @sections.values
  end

  def sections_hash # :nodoc:
    @sections
  end

  ##
  # Sets the current section to a section with +title+.  See also #add_section

  def set_current_section title, comment
    @current_section = add_section title, comment
  end

  ##
  # Given an array +methods+ of method names, set the visibility of each to
  # +visibility+

  def set_visibilgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot/po_entry.rb000064400000006371150403134120016636 0ustar00 Return the TopLevel that owns us
  #--
  # FIXME we can be 'owned' by several TopLevel (see #record_location &
  # #in_files)

  def top_level
    return @top_level if defined? @top_level
    @top_level = self
    @top_level = @top_level.parent until RDoc::TopLevel === @top_level
    @top_level
  end

  ##
  # Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+

  def upgrade_to_class mod, class_type, enclosing
    enclosing.modules_hash.delete mod.name

    klass = RDoc::ClassModule.from_module class_type, mod
    klass.store = @store

    # if it was there, then we keep it even if done_documenting
    @store.classes_hash[mod.full_name] = klass
    enclosing.classes_hash[mod.name]   = klass

    klass
  end

  autoload :Section, "#{__dir__}/context/section"

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot/message_extractor.rb000064400000003037150403134120020512 0ustar00# frozen_string_literal: true
##
# Extracts message from RDoc::Store

class RDoc::Generator::POT::MessageExtractor

  ##
  # Creates a message extractor for +store+.

  def initialize store
    @store = store
    @po = RDoc::Generator::POT::PO.new
  end

  ##
  # Extracts messages from +store+, stores them into
  # RDoc::Generator::POT::PO and returns it.

  def extract
    @store.all_classes_and_modules.each do |klass|
      extract_from_klass(klass)
    end
    @po
  end

  private

  def extract_from_klass klass
    extract_text(klass.comment_location, klass.full_name)

    klass.each_section do |section, constants, attributes|
      extract_text(section.title ,"#{klass.full_name}: section title")
      section.comments.each do |comment|
        extract_text(comment, "#{klass.full_name}: #{section.title}")
      end
    end

    klass.each_constant do |constant|
      extract_text(constant.comment, constant.full_name)
    end

    klass.each_attribute do |attribute|
      extract_text(attribute.comment, attribute.full_name)
    end

    klass.each_method do |method|
      extract_text(method.comment, method.full_name)
    end
  end

  def extract_text text, comment, location = nil
    return if text.nil?

    options = {
      :extracted_comment => comment,
      :references => [location].compact,
    }
    i18n_text = RDoc::I18n::Text.new(text)
    i18n_text.extract_messages do |part|
      @po.add(entry(part[:paragraph], options))
    end
  end

  def entry msgid, options
    RDoc::Generator::POT::POEntry.new(msgid, options)
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot/po.rb000064400000003233150403134120015407 0ustar00# frozen_string_literal: true
##
# A PO entry in PO

class RDoc::Generator::POT::POEntry

  # The msgid content
  attr_reader :msgid

  # The msgstr content
  attr_reader :msgstr

  # The comment content created by translator (PO editor)
  attr_reader :translator_comment

  # The comment content extracted from source file
  attr_reader :extracted_comment

  # The locations where the PO entry is extracted
  attr_reader :references

  # The flags of the PO entry
  attr_reader :flags

  ##
  # Creates a PO entry for +msgid+. Other valus can be specified by
  # +options+.

  def initialize msgid, options = {}
    @msgid = msgid
    @msgstr = options[:msgstr] || ""
    @translator_comment = options[:translator_comment]
    @extracted_comment = options[:extracted_comment]
    @references = options[:references] || []
    @flags = options[:flags] || []
  end

  ##
  # Returns the PO entry in PO format.

  def to_s
    entry = ''
    entry += format_translator_comment
    entry += format_extracted_comment
    entry += format_references
    entry += format_flags
    entry += <<-ENTRY
msgid #{format_message(@msgid)}
msgstr #{format_message(@msgstr)}
    ENTRY
  end

  ##
  # Merges the PO entry with +other_entry+.

  def merge other_entry
    options = {
      :extracted_comment  => merge_string(@extracted_comment,
                                          other_entry.extracted_comment),
      :translator_comment => merge_string(@translator_comment,
                                          other_entry.translator_comment),
      :references         => merge_array(@references,
                                         other_entry.references),
      :flags              => merggems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot.rb000064400000004377150403134120015003 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot/message_extractor.rb000064400000003037150403134120020512 0ustar00en "\n"
        "\\n"
      else
        "\\#{special_character}"
      end
    end
  end

  def merge_string string1, string2
    [string1, string2].compact.join("\n")
  end

  def merge_array array1, array2
      (array1 + array2).uniq
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot/po.rb000064400000003233150403134120015407 0ustar00# frozen_string_literal: true
##
# Generates a PO format text

class RDoc::Generator::POT::PO

  ##
  # Creates an object that represents PO format.

  def initialize
    @entries = {}
    add_header
  end

  ##
  # Adds a PO entry to the PO.

  def add entry
    existing_entry = @entries[entry.msgid]
    if existing_entry
      entry = existing_entry.merge(entry)
    end
    @entries[entry.msgid] = entry
  end

  ##
  # Returns PO format text for the PO.

  def to_s
    po = ''
    sort_entries.each do |entry|
      po += "\n" unless pogems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/json_index/js/navigation.js000064400000005244150403134120022732 0ustar00
    end
    # TODO: sort by location
    sorted_messages = messages.sort_by do |entry|
      entry.msgid
    end
    headers + sorted_messages
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot.rb000064400000004377150403134120015003 0ustar00# frozen_string_literal: true
##
# Generates a POT file.
#
# Here is a translator work flow with the generator.
#
# == Create .pot
#
# You create .pot file by pot formatter:
#
#   % rdoc --format pot
#
# It generates doc/rdoc.pot.
#
# == Create .po
#
# You create .po file from doc/rdoc.pot. This operation is needed only
# the first time. This work flow assumes that you are a translator
# for Japanese.
#
# You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit
# provided by GNU gettext or rmsginit provided by gettext gem. This
# work flow uses gettext gem because it is more portable than GNU
# gettext for Rubyists. Gettext gem is implemented by pure Ruby.
#
#   % gem install gettext
#   % mkdir -p locale/ja
#   % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja
#
# Translate messages in .po
#
# You translate messages in .po by a PO file editor. po-mode.el exists
# for Emacs users. There are some GUI tools such as GTranslator.
# There are some Web services such as POEditor and Tansifex. You can
# edit by your favorite text editor because .po is a text file.
# Generate localized documentation
#
# You can generate localized documentation with locale/ja/rdoc.po:
#
#   % rdoc --locale ja
#
# You can find documentation in Japanese in doc/. Yay!
#
# == Update translation
#
# You need to update translation when your application is added or
# modified messages.
#
# You can update .po by the following command lines:
#
#   % rdoc --format pot
#   % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot
#
# You edit locale/ja/rdoc.po to translate new messages.

class RDoc::Generator::POT

  RDoc::RDoc.add_generator self

  ##
  # Description of this generatgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/json_index/js/searcher.js000064400000014704150403134120022370 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot/po.rb000064400000003233150403134120015407 0ustar00/*
 * Navigation allows movement using the arrow keys through the search results.
 *
 * When using this library you will need to set scrollIntoView to the
 * appropriate function for your layout.  Use scrollInWindow if the container
 * is not scrollable and scrollInElement if the container is a separate
 * scrolling region.
 */
Navigation = new function() {
  this.initNavigation = function() {
    var _this = this;

    document.addEventListener('keydown', function(e) {
      _this.onkeydown(e);
    });

    this.navigationActive = true;
  }

  this.setNavigationActive = function(state) {
    this.navigationActive = state;
  }

  this.onkeydown = function(e) {
    if (!this.navigationActive) return;
    switch(e.keyCode) {
      case 37: //Event.KEY_LEFT:
        if (this.moveLeft()) e.preventDefault();
        break;
      case 38: //Event.KEY_UP:
        if (e.keyCode == 38 || e.ctrlKey) {
          if (this.moveUp()) e.preventDefault();
        }
        break;
      case 39: //Event.KEY_RIGHT:
        if (this.moveRight()) e.preventDefault();
        break;
      case 40: //Event.KEY_DOWN:
        if (e.keyCode == 40 || e.ctrlKey) {
          if (this.moveDown()) e.preventDefault();
        }
        break;
      case 13: //Event.KEY_RETURN:
        if (this.current) e.preventDefault();
        this.select(this.current);
        break;
    }
    if (e.ctrlKey && e.shiftKey) this.select(this.current);
  }

  this.moveRight = function() {
  }

  this.moveLeft = function() {
  }

  this.move = function(isDown) {
  }

  this.moveUp = function() {
    return this.move(false);
  }

  this.moveDown = function() {
    return this.move(true);
  }

  /*
   * Scrolls togems/gems/rdoc-6.5.1.1/lib/rdoc/generator/pot.rb000064400000004377150403134120015003 0ustar00    window.scrollTo(window.scrollX, offset - viewHeight + height);
    }
    if (offset < viewScroll) {
      window.scrollTo(window.scrollX, offset);
    }
  }
}

gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/json_index/js/searcher.js000064400000014704150403134120022370 0ustar00Searcher = function(data) {
  this.data = data;
  this.handlers = [];
}

Searcher.prototype = new function() {
  // search is performed in chunks of 1000 for non-blocking user input
  var CHUNK_SIZE = 1000;
  // do not try to find more than 100 results
  var MAX_RESULTS = 100;
  var huid = 1;
  var suid = 1;
  var runs = 0;

  this.find = function(query) {
    var queries = splitQuery(query);
    var regexps = buildRegexps(queries);
    var highlighters = buildHilighters(queries);
    var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++};
    var _this = this;

    this.currentSuid = state.n;

    if (!query) return;

    var run = function() {
      // stop current search thread if new search started
      if (state.n != _this.currentSuid) return;

      var results =
        performSearch(_this.data, regexps, queries, highlighters, state);
      var hasMore = (state.limit > 0 && state.pass < 4);

      triggerResults.call(_this, results, !hasMore);
      if (hasMore) {
        setTimeout(run, 2);
      }
      runs++;
    };
    runs = 0;

    // start search thread
    run();
  }

  /*  ----- Events ------  */
  this.ready = function(fn) {
    fn.huid = huid;
    this.handlers.push(fn);
  }

  /*  ----- Utilities ------  */
  function splitQuery(qgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/json_index/js/navigation.js000064400000005244150403134120022732 0ustar00s ------  */

  /*
   * This record matches if the index starts with queries[0] and the record
   * matches all of the regexps
   */
  function matchPassBeginning(index, longIndex, queries, regexps) {
    if (index.indexOf(queries[0]) != 0) return false;
    for (var i=1, l = regexps.length; i < l; i++) {
      if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
        return false;
    };
    return true;
  }

  /*
   * This record matcgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml000064400000002237150403134120025643 0ustar00f(queries[0]) == -1) return false;
    for (var i=1, l = regexps.length; i < l; i++) {
      if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
        return false;
    };
    return true;
  }

  /*
   * This record matches if regexps[0] matches the index and the record
   * matches all of the regexps
   */
  function matchPassRegexp(index, longIndex, queries, regexps) {
    if (!index.match(regexps[0])) return false;
    for (var i=1, l = regexps.length; i < l; i++) {
      if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
        return false;
    };
    return true;
  }


  /*  ----- Highlighters ------  */
  function highlightRegexp(info, queries, regexps, highlighters) {
    var result = createResult(info);
    for (var i=0, l = regexps.length; i < l; i++) {
      result.title = result.title.replace(regexps[i], highlighters[i]);
      result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
    };
    return result;
  }

  function hltSubstring(string, pos, length) {
    return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length);
  }

  function highlightgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf000064400000270714150403134130023077 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/json_index/js/searcher.js000064400000014704150403134120022370 0ustar00e if (state.pass == 1) {
        matchFunc = matchPassLongIndex;
        hltFunc = highlightQuery;
      } else if (state.pass == 2) {
        matchFunc = matchPassContains;
        hltFunc = highlightQuery;
      } else if (state.pass == 3) {
        matchFunc = matchPassRegexp;
        hltFunc = highlightRegexp;
      }

      for (; togo > 0 && i < l && state.limit > 0; i++, togo--) {
        if (info[i].n == state.n) continue;
        if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) {
          info[i].n = state.n;
          result.push(hltFunc(info[i], queries, regexps, highlighters));
          state.limit--;
        }
      };
      if (searchIndex.length <= i) {
        state.pass++;
        i = state.from = 0;
      } else {
        state.from = i;
      }
    }
    return result;
  }

  function triggerResults(results, isLast) {
    this.handlers.forEach(function(fn) {
      fn.call(this, results, isLast)
    });
  }
}

gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml000064400000002237150403134120025643 0ustar00<%- comment = if current.respond_to? :comment_location then
               current.comment_location
             else
               current.comment
             end
   table = current.parse(comment).table_of_contents.dup

   if table.length > 1 then %>
<div class="nav-section">
  <h3>Table of Contents</h3>

    <%- display_link = proc do |heading| -%>
      <a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
    <%- end -%>

    <%- list_siblings = proc do -%>
      <%- level = table.first&.level -%>
      <%- while table.first && table.first.level >= level -%>
        <%- heading = table.shift -%>
        <%- if table.first.nil? || table.first.level <= heading.level -%>
          <li><% display_link.call heading -%>
        <%- else -%>
          <li>
            <details open>
              <summary><%- display_link.call heading -%></summary>
              <ul class="link-list" role="directory">
                <% list_siblings.call %>
              </ul>
            </details>
          </li>
        <%- end -%>
      <%- end -%>
    <%- end -%>

  <ul class="link-list" role="directory">
    <% list_siblings.call %>
  </ul>
</div>
<%- end -%>
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf000064400000270714150403134130023077 0ustar00GPOS�jN�K�GSUBV.TL�OS/2�8�M�`cmapRԟ�N@�cvt &�7g|8fpgm�zAg�	�gaspgtglyf�i�S(��head�DeJ޼6hheaix��$hmtxESvJ�Tkern�2���ll�locaK�p�PP,maxp>
�R| name�
U�R�:post:�\�c��prep�x9�qH�
0JDFLTlatn����kernkernJnv�$R�
�^�	h
B
l�&��rj����Z���j��L��*|�DV�:�� �!.!�##L#�$4$~%�&J'$'�(�)�*�+f+�,6,�-�.(.�/t/�/�0:0|2"2�33T3�3�4&4l4�55b5�66L6�6�7B7�7�888�9d9�9�:&:�:�;@<�=�>j?,?�@hA�B�CzD�E�F�G*G�HfI�K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��VK	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V"#��&��*��2��4��F��G��H��R��T���������������������������������������������������������������������K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V-�
�
��v#��&��*��2��4��7�L9�L:��<�y?�LY��Z��\��l�m�vo�vr�y�v|�}�v�����������������������y�����y�v�v�����v�v�v��'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���-�
�
��v#��&��*��2��4��7�L9�L:��<�y?�LY��Z��\��l�m�vo�vr�y�v|�}�v�����������������������y�����y�v�v�����v�v�v��k7	��
7
7�G���G������"<#��$��&��*��-�o2��4��D��F��G��H��I��J�{P��Q��R��S��T��U��V��W��X��Y��[��\��]��l7m��o��r7tFuFw��y��{F|7}���������������������������������������������������������������������������������������������������������������������������������������7�7�G�7�7�G����7���)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V
�em�eo�eygems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml000064400000002237150403134120025643 0ustar00�������������������������������������������������������������I��
��
��4�$4"��#��&��*��2��4��7�[9�V:�y<�=?�VF��G��H��R��T��Y��Z��\��l��m�$o�$r��t�Bu�By�${�B|��}�$�����������������������=�����������������������������������������������=�$�$�����4�����4�$�$�$���)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������.	������$��-�VD��F��G��H��R��T�����������������������������������������������������������������������������������������������)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������#��&��*��2��4��7��8���������������������������������������[	���L�L�L���`�`#��$��&��*��-�82��4��D�F�)G�)H�)J�>P�`Q�`R�)S�`T�)U�`V�DX�`Y�LZ�t[�g\�L]��m�Lo�Lw�`y�L}�L���������������������������������gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf000064400000270714150403134130023077 0ustar00���������������������������������7�7��7�7��������7���1��#��&��*��2��4��F��G��H��I��R��T��W��Y��Z��\��m��o��y��}�������������������������������������������������������������������������������i	�t

�y�`�y�t����"%#��$�t&��*��-�82��4��D��F�`G�`H�`J�[P��Q��R�`S��T�`U��V��X��Y��Z��[��\��lm�`o�`rt-u-w��y�`{-|}�`��t��t��t��t��t��t��t��������������������������������������������`��`��`��`��`��`�����`��`��`��`��`��`�������������t�����`�`�����`�`�`���y���y�`�`�`���t0��"%#��&��*��2��4��F��G��H��R��T��V��Y��\��m��o��y��}��������������������������������������������������������������������������"#��&��*��2��4��F��G��H��R��T���������������������������������������������������������������������6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V��
��
��Y��Z��\��l��r��t��u��{��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|���������K
K
K�y�ylKrKtdud{d|K�K�K�y�K�K�y�K��
��
��Y��Z��\��l��r��t��u��{��|���������F��G��H��R��T����������������������������������������������
��
��Y��Z��\��l��r��t��u��{��|�����������
��
��Y��Z��\��l��r��t��u��{��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|���������
����D���������������������������$	��������$��F��G��H��R��T��������������������������������������������������������������������������������F��G��H��R��T��������������������������������������������$	��������$��F��G��H��R��T������������������������������������������������������������������������"#��&��*��2��4��F��G��H��R��T���������������������������������������������������������������������K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V	�`�`$�`9F:F<(?F��`��`��`��`��`��`��`�(�`�(��`	�`�`$�`9F:F<(?F��`��`��`��`��`��`��`�(�`�(��`'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���	�`�`$�`9F:F<(?F��`��`��`��`��`��`��`�(�`�(��`K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V
�em�eo�ey�e}�e�e�e�e�e�e)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|������������������������������������������������������	��������$��������������������������������	��������$��������������������������������	��������$��������������������������������	��������$��������������������������������i	�t

�y�`�y�t����"%#��$�t&��*��-�82��4��D��F�`G�`H�`J�[P��Q��R�`S��T�`U��V��X��Y��Z��[��\��lm�`o�`rt-u-w��y�`{-|}�`��t��t��t��t��t��t��t��������������������������������������������`��`��`��`��`��`�����`��`��`��`��`��`�������������t�����`�`�����`�`�`���y���y�`�`�`���t)��	��
����
��������$��7��9��;��<��=��?��@��`��l��r��|��������������������������������������������������������
��
��Y��Z��\��l��r��t��u��{��|�����������
��
��Y��Z��\��l��r��t��u��{��|�����������
��
��Y��Z��\��l��r��t��u��{��|�����������
��
��Y��Z��\��l��r��t��u��{��|�����������
��
��Y��Z��\��l��r��t��u��{��|�����������
��
��Y��Z��\��l��r��t��u��{��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
��
��Y��Z��\��l��r��t��u��{��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|���������6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������V��
��
��Y��Z��\��l��r��t��u��{��|���������
�em�eo�ey�e}�e�e�e�e�e�e��
����
��9��:��?��@��Y��[��\��`��l��r��|��������� �t
�t
�t�o9�j:��<�y?�jY��\��l�tm�oo�or�tt��u��y�o{��|�t}�o��y�y�o�o�t�t�t�t�o�o�o��t��
��
��Y��Z��\��l��r��t��u��{��|�����������
����
��9��:��?��@��Y��[��\��`��l��r��|���������i	�t

�y�`�y�t����"%#��$�t&��*��-�82��4��D��F�`G�`H�`J�[P��Q��R�`S��T�`U��V��X��Y��Z��[��\��lm�`o�`rt-u-w��y�`{-|}�`��t��t��t��t��t��t��t��������������������������������������������`��`��`��`��`��`�����`��`��`��`��`��`�������������t�����`�`�����`�`�`���y���y�`�`�`���t0��"%#��&��*��2��4��F��G��H��R��T��V��Y��\��m��o��y��}��������������������������������������������������������������������������0��"%#��&��*��2��4��F��G��H��R��T��V��Y��\��m��o��y��}��������������������������������������������������������������������������0��"%#��&��*��2��4��F��G��H��R��T��V��Y��\��m��o��y��}��������������������������������������������������������������������������'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��VK	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V-�
�
��v#��&��*��2��4��7�L9�L:��<�y?�LY��Z��\��l�m�vo�vr�y�v|�}�v�����������������������y�����y�v�v�����v�v�v��K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��VK	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V-�
�
��v#��&��*��2��4��7�L9�L:��<�y?�LY��Z��\��l�m�vo�vr�y�v|�}�v�����������������������y�����y�v�v�����v�v�v��'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���'�B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B���K	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V6�V
�V
�V��"��#��&��*��--2��4��7��8��9��:��<�t?��Y��\��l�Vm��o��r�Vt�`u�`y��{�`|�V}�������������������������������������t�����t�����V�V�V�V��������Vv

#$&')-./2345789:;<=>?DEHIKNPQRSUYZ[\^lmoprtuy{|}��������������������������������������������������������������
8�DFLTlatn����case&case,liga2liga8sups>supsD,>B	

@LO,{tuCjqv�������I�,xx�D���P`KtyPL@�J�z��� ��� �&
	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a���������������������������������rdei�x�pk�vj���sgw�����l|����cn���m}�b�������������������y���������������������q���z���`T@
~�1DS[a~�����    " & 0 : D �!"!&"""""""+"H"`"e%�&i���
 �1ARZ`x�����      & 0 9 D �!"!&"""""""+"H"`"d%�&i����������������{�u�q�[�H����$��������������I�����������������޸ޡޞ�:ڜ`T@
~�1DS[a~�����    " & 0 : D �!"!&"""""""+"H"`"e%�&i���
 �1ARZ`x�����      & 0 9 D �!"!&"""""""+"H"`"d%�&i����������������{�u�q�[�H����$��������������I�����������������޸ޡޞ�:ڜ/��'37;��BK�	PX@3	`f[[		QCQ
D@4hf[[		QCQ
DY@
;:$$#,$
+>32#'&>54.#"#"'4632#"&!!7!!3<G*6]E'!1:3%
A 1;2"/?#.B.{,! ,, !,����]#[��n$;S47O;-('rz/**5C/$8'�� ..  ..��y$?����
&@#QCSD

+#.54>32#"&tA1!""'5���-PS\88\SP-<��""!5��)�
,@)
BQD

$+#"&/!#"&/		u		��ܙ�$�ܙ�$V<�6:��5BK�-PX@(
Y	CQ
C
D@&
Z
Y	C
DY@:98766421/-,(&#"!#!+#"&547!+#"&5<?3#76;>;!323+32%!!�^)V��V*^��R�(�W*_*_*W�(�R���*R����E��m�
	
�&!��F��p&!�{,F����
\;FQ�@)
!
LA*7BK�PX@2j

h
f_

SC	TD@1j

h
fk

SC	TDY@NMCB;965$#$+.'7632.54>?>;#".'+4.'>��H	&4EX8 D�e>4e�_	$e�?
'?]A/_WJ7:m�f
$�2Tm<P}U,��,Lc8LqL&bP'!'#|4QwZE�e>��K?"!(%�� (4G[<V�sF�
�B\@+��7Yu�>X?-(0K`W����'0DX?@<[	[CSC
C		SDUS((%"&((($
+#".54>324.#"32>>;+#".54>324.#"32>�0Rl<>mP..Pm>>lQ/L#=Q--P<##<P--Q=#eC�
D�0Ql<>mP..Pm>>lQ.L#<Q--Q<##<Q--Q<#3W�X--X�WX�Y--Y�XMnG!!GnMMmF!!Fm�
��PW�X--X�WX�Y--Y�XMoG!!GoMMmF  Fmj��T�@RS@PN9K*$BhfSC
CSDGE0.'%!
@@+2#"&'.#">7>;#"&/#".54>7.54>32>7&'�CxY5
":W;<bF'TX�-57C>*Y�-l~�OK�sG4Z|HGG3^���;^s8F}m[&�5BkJ(�.Ng8D<*%C\7R�V�HH�I
^�[���4X?$2a�ZH�mVP�VFwX2��MrM& 9N/�N_n���
@BQD

$+#"&/		��ܙ�$������(+.54>7�yx*Mi@@iM*
wyv�e�
v���uu���v
��eb�����(+4'&54?'&5476Zyw
*Lj@@jL*xyv���
v���uu���v
��{���51@.1-,($#
	BMQE55+5467'7>7./7.=3>?'.'t����4����
��	m,n
n-n
��	m-m	
n-n	�m��,@)MYQE+!!#!5!i��QN�R���=I�;�I�n��@B?S
D"+74632'&5467>7#"&n0'+/(8"
	%/U#2;0)URL 	

'5@$2d)5z@MQE+!!d�/zQi��"�@SD($+74>32#"&i!""'5M""!5������@kD""++6;[ 'n')-�%I��?�'@SCSD((($+#".54>324.#"32>?P��ii��OO��ii��PdBo�RR�pBBp�RR�oB�WW����WW����HH���GG����*@'
BhCR
D%+%!47#"/3!!5E��
	�J5�'J|"&��	(i��J��2>@;.BhSCQ
D-,+)$"
22+2>3!2!5467>54.#"#"&#'>ZQ�pB1To=�E E#c�o�<fK+4Wq>CqW9
0Kr��/_�`P�~w>�<8"�=rtzENsJ$)Ie<#[�b3����HU@RD
Bhh[SCSDB@;910/.&$HH	+2#".'763232>54.#5>54.#"#"/>eQ�m?+Kf<��Fz�ay�h:&#4KeBZ�[-)`�s\�^02Tp=CpV:1
Jr��-Z�XEoT9��W�l=Ah�@
599-<]s6ApQ/E-NlAKnH"(He>#[�b3?^� @[C
D!#+!+#!"&/3467![
�V�e	�UV��^�4
�j�
/��&�������/@@=-,Bh[QCSD(#&(#"+#!>32#".'763232>54.#"'!��UCx7n�q:N��d;j^N

1MiFR�i;-[�^9�H>o|^�(?q�\p�|B#.'$5d�]L�[3s����02@/B[CSD-+#!	+2#".54676;>32>54.#"t[�o?E{�gc�u@T`�"T�Z4;���1Z�QV�a43]�NX�`2N<m�``�vB@x�mSт��)H#=E�]O�a66_�MQ�[1=a|�/�@QC
D#'++67!"&=/�wA�
���+	��=x���';OD@A
B[SCSD=<)(GE<O=O31(;);''	+".54>7.54>32'2>54.#"2>54.#"Df�yD-RqD>`A"9j�_^�k9"B`>DqR.Dy�fQ�`4Dj�<<�jD4_�QQwN%*QuKKvQ*%Nw6f�ZNzZ<>Vi<K�b88b�K<iV><ZzNZ�f6L-StG]|JJ|]GtS-�1Sj9=iN,,Ni=9jS1��22@/B[SC
D/-%#	+".54>32+>74.#"32>=W�k<Cx�b^�q?-@)��"V�3:�"2Z{IN�]40W{KU�\/Z9j�\[�rA@u�d7ddi<��H*K#@F�M�[32Z}KN}W.:^u���J�#;K�#PX@SCSD@[SDY�(&($+74>32#"&4>32#"&�!""'5!""'5M""!5D""!5��J�-H@
(B?K�#PX@SCS
D@[S
DY�,*$($+4>32#"&4632'&5467>7#"&�!""'50'+/(8"
	%/j""!5�#2;0)URL 	

'5@$2�	�5�(+����!'*)���A��		��A����e!@YMQE+!!!!�;��;��,J�J�	�5�(+546767.'&=�*("���	A	
A�)!����(:9@6BhfSCSD(&#-$+>32#'54>54.#"#"'4>32#"&!DQ`8F|]7/HTI3A0GSG0*H^3BaB&�!""'52'*NqFLnS?78"��)>:<KbC6U;#+#�i""!5l�3Naf@c
U
8Bh[

[	[OSGPOYWOaPaFD<:641/'%NN
+%"&'#".54>3232>54.#"3267632#"$&546$32%2>7.#"�XY8�R8R6A}�t5]%[%09hP/a��}���mq����d
p����zv�����q:e���$MG>P3"Z�g9(;�]W]S'D\5U��V��.I,7 <o�b�ݒHj�������]DA%JPi�%���wS��m��HF?kS6Iv�K(E2��
$@!BZC
D# +!#"&'!+3!.'�O��I�NCf��z����e��{�++�z�*=@:B[SCS
D*(" !+3!2#!2654.#%!2>54&#!��y�t9'JkE��@z�q��c��3`�Y��3b�Y*�����0]�U8hXA��Z�d5�����CkK(K2Rh7��|���2D@ABhfSCSD,*" 	22+%2#".54>32#".#"32>7>�
(,h{�X���be���M�ob/	+=TnF�؜WV��yLwdV*	�+/K5g���
�i+@*-%Y�뒖�W(:'�y�@SCS
D!(!$+#!!24.#!!2>yb��������bjR�Ҁ�c��ҕRĤ���b�b������T�T���"�.@+YQCQ
D+!!!!!"�l����U��S��U��"�	(@%YQC
D		+!!!#"���{g�U��U�v�|��C�4H@E!
Bh[SCSD,*%#44+%2>7!"&=!#".546$32#"'.#"2Ixg]/���5r��Y���dd��Q�vf/		9a�h�ޝUV��C+}	8�	%:'g����g+?),,0&X�쓖�X�� @YC
D+!#!#3!3g��ggvg��Z��l��^�@C
D+!#3^gg�Y����'@$BhCSD#'$+#"&'>7>3232>53�;m�b-\1	#-LzV-g�w�|?	0c�f���"&@#B[C
D'(' +32>7>;#"&'.+#3VT;S��!�S�� [ff�	K
���Xd�V����@CR
D+%!!38���fWW��H� %@"BhC
D!5(+>7>;#47+"'#32z
,GZ����YF;� �
�y��#��J�
�(��@C
D!+2&53#"'#3	�Z1�hY2��6��y��Y�{����'@SCSD((($+#".54>324.#"32>�b������cc������bjR�Ҁ~їSS��~�ҕRĤ���gg����hg������WW�씕�VV���S�*@'[SC
D
!+#!2#%!2>54&#!Vfm��E��u��^�g7���:�����]�q?R4\}J��{����0T@
BK�PX@SCSCD@kSCSDY�(((%&+#"&'#".54>324.#"32>�+PsHpV ��?�N���cc������bjR�Ҁ~їSS��~�ҕR�k��~-�vFg����hg������WW�씕�VV�����"2@/B[SC
D" *!+#!2#"&'.#'32>54&#!Vfi��8i�]�Y�;')��^�g6ƽ��������Q�eA
��>L-TvJ��W����==@:=BhfSCSD;9(&!#!+#".#"#"&'763232>54.54>32~	
)FiMMuO)=d�d==t�l��L	(8J`=T�[0=d�d=6h�bn�H�%-&,Ld7H^B-,5PuWY�tCcV,#)#3XyEKaA,*4Qy[G�e=FH#n� @QC
D+!#!5n�f��W��0W����#@ CSD+%2>53#".53�f�p;fJ��||NjJg;o�IG~�ck��u˗VV��uk��c�~H��@BC
D* +3267>;#Q��P��[��j.46,��y��' @#BC
D,; +32>7>;2>7>;#&'#Ue	
��eN�C\�^�][��u..��u,-��y��4��@BC
D(")!+	32>7>;	#"&'+�e
��
b��e�B
�J]����L
�T�%���	��@BC
D,"+#32>7>;�g��Y��ZH��H?
�v++�s��
$@!QCQ
D

+!!547!5��~�������#�U%�U�����
'@$[OQE

!#+!+32�>�����$
��
$������@kD" +32#"&')'n' �%�"k����
!@[OQE!"+46;#"&=!!k��=���
s
$�� ��@
BkD,!+3#"&'.'+ <UD�	
	�
G���
��L���3@MQE+!5���DDV���	@kD		+2#"&/��6���
�k��C�'7T@Q-Bh[SC
C	SD)(/.(7)7" 	''
+!"/#".54>754&#"#"/>32%2>7)QXf=3`J-H��wuHeF,
N�mPxO(�J:aSH#�ͅ?!6H(@,>aD?lP0h��(0(NP3_�S�x5->$#<S52I/�����#�K�%PX@
B@
BYK�%PX@CSCSD@!CSC
CSDY@##&#+33>32#"&'#"32>54&�`B�m��9o�ih�6hc�?9�ZX�Y-����Xf��m��PQOz�f[��VE@u�b��X��X�,9@6,BhfSCSD(&#(#"+#".#"32>32#".54>321	
#:W>V�[01Z�NHa?%
FXg8_�q?<s�la�8^ =r�ei�o:"("
 4&E��yr��K>5W����#q@
BK�%PX@CSCS
D@!CSC
CSDY@##
+!"/#"&54>323%267.#"c
B�n��9o�ie�6`�^c�?:�XX�Y-��Zj��m��PKHN�Q@f[
UF@u�b��X����%0H@EBh[SCSD'&,+&0'0	%%	+2#!32>32#".54>"!4.T�i;
�14`�TKnK,

Oao8f�xA=s�kMzY7	�,Pp�:o�ip�s:!)!
 4%G��k��JG0Z~NPX/n�_�BK�!PX@SCQC
D@[SC
DY@!$%!	+3'&=354>32#"&#"!!nj�,PqD?)1S<!C��{	'~U�V+
.@gK{G��K����:Pd�@3B+BK�PX@,
[[CS	CSD@/h
[[S	CSDY@RQ\ZQdRdMKA?$"::+23#"'#".5467.54>7.54>4.'32>2>54.#"�Ao,��4]�OVF*0<c�c<>u�gi�k6h[2; -GO3]��1Rkuv3&A.-W~RL�a7��@dD#$Ec??dE$$Ed� !&_6HuS.B+.-QC>rX5+I`6Or@9.-()�[HuT.��/9 
	'1;#,K7 ">V.%B\88]B$$B]88\B%���-@*BCSC
D##+33>32#4&#"�_E�nR}R*_��b�B���Ue4b�W��|��eX��G�&@#SCC
D
+##".54>32_�    ��W!!���G�'4@1	BSCCSD$"!$%+#"&'76323265#".54>32;Y<.
QN�    �4XA%
0XQbW!!���0@-B[CC
D%(%!+3267>;#"&'.+#.�T�I
�S�^-`���{�_

�
�
�
���@C
D+#_��Q����,8@5+
BCSC
D,,##&&!	+332>32>32#4&#"#4&#"�4	BKU/m�ATc4JvS,`~u4_I+_toQ�6��)D1q>Z;1`�Z��|��&KpJ��|��aV����1@.BCSC
D#$!+332>32#4&#"�4	D�oR}R*_��b�B��Vi4b�W��|��eX�W����',@)SCSD''	+2#".54>2>54.#"k�t==t�kk�u==u�kY�Y,,Y�YY�Y--Y��I��uu��HH��uu��I�K=r�dc�s>>s�cd�r=�����$D@ABCSCSCD$$&%!+32>32#"&'"32>54&�4
	B�n��9n�if�6Bc�>9�YX�Y-���C�Zj��m��PJI�g\��VF@u�b��W����#D@ABCSCSCD##&#+##"&54>32763267.#"�`B�l��9o�ig�6	��c�?6�YX�Y-��Xf��m��PNLp�]f[RH@u�b�����8@5BhCSC
D#$%!+332>32#".#"�20�u-L"
!0q�-��y�B
���yY����<=@:<BhfSCSD:8'%" #!+#".#"#"&'7>3232>54.54>32�#9S<6Y?#0NchcN0/Y�Si�<
&=[C?`@!0NcicN0.UzL[�;h4E&/>,  ':T<ApR0C6" % #<Q-2B.  &:S>5bJ,464���@#x@
!BK�PX@%jhQCSD@#jh[SDY@
	##	+"&5#"&=7>;!!32>32�eq��
-9��%2$4&&upu�%d	��G�]);&
**3�����-@*BC
CSD$!#+32673#"/#".5逃a�C`5	E�oS|R*���cX��Vh4b�W|��@
BC
D,!+!#32>7>;T�\KH

	JH�	��*+
��* @#BC
D*!); +32>76;2>76;#"'.'+I�'		�F��F����C�	��**��-*+�(��#v�@BC
D("(!+	3267>;	#"&'+���[
$

X��j[��
��U���Z�	�����h	����@BCD,""++32>7>;{D��[OO	KI����	��
J:�
@QCQ
D+!!547!5!:��d�)q������K&MK?����H3@0*B[[OSG@>;83-+4.#52>54.54>;+";2#".54>�):##:)&HiB7!+G3)55)3G+!7BiH&�!7)=)7!7hhi8=hM+*8P19lii5%>./=%5ijl81P8*+Mh=8ihh��Q�@QD+3#KK�i���H5@2B[[OSGEDCB530-3)++546;2>54.54>7.54>54.+"&=323"}&HiB7	!+G3)55)3G+!	7BiH&)9##9)�7hhi8=hM+*8P18lji5%=/.>%5iil91P8*+Mh=8ihh7!7)=)7����9@6jk[OSG
+2>53#".#"#4>32%=*N <X83kib+&;*M <W84khb70B'7^F('0'0B'7^F('0'���
&@#SCQD

+4>734632#"&A�5'""'5��&-PS\88\SP-���'5""7����0;U@R6&,BjhfkSCTD##'#	+.54>?>;#".'>32+M`�r>@{�s
$W�5		!7P8+KfC'EXh:
$��/Y}N,\�a3J��tp��M�
�:.!��"' 1%�
�b�o@i?q�CQ�:@@=3)Bh[SCS
D#&#%&%"	+46;4>32#"'.#"!#!>3!#!5>5#C�4g�fLtW>&	

->V<NuP(�
�?H?+�6"@2��&]�uC%@V0;.4]�O��'��Yy+(A
(:N4F���D#79@6!B
@ ?WSD42*((+467'7>327'#"&''7.732>54.#"�($�1�-n?>m-�1�$*)$�2�-n>>m-�1�$)H+Ic88cJ++Jc88cI+�>m-�2�$*)$�2�-n?>m-�2�$)($�2�-n?8bI++Ib88cJ++JcU(� 8@5	B
Z	YC
D *!+!3267>;!!!!#!5!5!�Z�ZO
Z
	YP�Y[��n��_��n��h�g#!'���:v:��~:v��Q�@YQD+3#3#KKKK������}k�H\A@>HZP=#BhfWSDFD-+(&!#!+#".#"#"&'7>3232>54.5467.54>32>54.'(#9S<8[@#2RhmhR2TR6C/Y�Si�<
&>\D>`B"4VmqmV4[g7E.UzL[�;��'CX`c-G>$=QZ]+YJ
5F'.D7.07F]>S{#&bEApR0C6" % "<Q/3L;004EY=M{%%cJ6aK,55��)A5-*+ `=-F7,)'&^'�"W'3K�PX@
SD@OSGY�((($+#".54>32#".54>32�

W









U����,H\�@
BK�PX@4hf[[		SCSDK�PX@4hf[[		SCSD@4hf[[		SCSDYY@
YW*,((#&(%!
+632#".54>32#".#"3264>32#".732>54.#"8;�t`�s@Cx�c4WJ@
!:[DS�a55^�MU{�S4]���dd���]44]���dc���]4;g���hh���g�
;FAv�fd�wB)!5b�WZ�a3)Pc���^44^���cd���^44^���d��hh���ii��j>5�&4B@? ,Bh[WSD('.-'4(4$##' 	+#"&/#".54>754&#"#"/>322>755 

15=$!<.*]�iDI+;(0jCeh��!81+��!*GD$
%9'$A13LO
0-ub��"�D8'����%�%(+55���
	
���
	
�
z
��	��
{
z
��	��
�S��=K�	PX@_MQE@kMQEY�+!#!�=R���'d)5z@MQE+!!d�/zQU����/FO��:BK�PX@/h		[
[SCSDK�PX@/h		[
[SCSD@/h		[
[SCSDYY@00OMIG0F0E)!(*,&+4>32#".732>54.#"#32#"&'.#'32654&+U4]���dd���]44]���dc���]4;g���hh���g�U����u	P
��n�ywlv��c���^44^���cd���^44^���d��hh���ii��yusvd���
_
@a[\T�5%@MQE+!!!��%A[D��'@WSD((($+4>32#".732>54.#"[/Qn??nQ//Qn??nQ/G$>T00T=$$=T00T>$n>mQ..Qm>>lQ//Ql>0T>$$>T00T?$$?TmP�7@4YYMQE
	+!!#!5!!!i��QN�R��R��U��jI�n�I��Ia�;W-g@
+BK�#PX@h[SD@!h[OQEY@(&#!
--+2>3!2!546?>54.#"#"&/>V,N9!*8�'�&�1%'4>H|W1I0(E?;�*�89< #4"G7`fb|=W?�@=BK�PX@,hh[[SD@1hh[[OSGY@;964.-,+#!??	+2#".'7>3232>54.#5>54.#"#"/>\,L7 H<IM%@V0<Q7!$;-)>).J5[Y'3?I{W/C+BWTB0M73C$
(%*4!4%1K?"2!A;`f���	@kD	#++7>3�9���
������0@-BCS
CD&$!#+32673#"/#"&'#"&5逃a�C`5	F�fb�%0���cX��X\MH+X$��6�B��*@'hiSD+##!#".54>3��U��Vg�r==r�g�R�
�
y8b�MP�\2��o�@OSG($+4>32#".�$&&$P&&%%����V@
BK�	PX@^jTD@jjTDY@+232654.'73#"&'76�(390A'*=Y]1D()N
��
,&!�`<;0!��5RO�	BK�PX@jjQD@jjMRFY�$+37#"/733!����:����%~	��c1W;��)@&WSD	+2#".54>2654&#"wBjJ''JjBDjK''KjDhiihkii�*OoEEoO**OoEEoO*��rq��qr�����)�'(+7'&547>7.'&54?'&547>7.'&54?�������	&

%	��
��	&

%	��
�q�#-O@L!	Bh		Z
[CS
D-+(&#"$!"
+%3+#5!"/3%37#"/733!47!+>;�~m?��`C�����:�������( 
*�$�� �#%~	��c1w�}�
d�K�-=Ge@b710+Bhh		Z[CS

DGEB@=<;:9853/.(&#!
--
+2>3!2!546?>54.#"#"&/>%37#"/733!+>;f,N9!*8�'�&�1%'4>I|�����:����( 
*�1I0(E?;�*�89< #4"@>`f%~	��c1�b
dSq�PU_]@N	
$SBK�	PX@B

h		h
	
	[[
\SCS
DK�PX@B

h		h
	
	[[
\SCS
DK�
PX@B

h		h
	
	[[
\SCS
D@B

h		h
	
	[[
\SCS
DYYY@!_]ZXUTKHEC=<;:20)' PP!"+%3+#5!"/32#".'7>3232>54.#5>54.#"#*.'>47!+>;�~m?��`C�Z,L7 H<IM%@V0<Q7!$;-)>).J5[Y'3>J	{�����( 
*�$�� ��/C+BWTB0M73C$
(%*4!4%1K?"2!G5`f���}�
d*����);5@2BhfSCTD('#-$+#".54>?332>324>32#"&�DQ`8E}]70GTJ3A0GTG0*H^3E_@$
		��!""'5�2')MoGLkM924#��*<45E]B6U;#+#O""!5����&$	[����&$[����&$
`����&$`����&$
`����&$`����4@1YYQCS
D"	+!!!!!!!+!����Hj��K��8���
O� i�U��S��U��c7.|���Oh@e<B
M	Bhf
hSCSC	S			DKIA@:820(&!OO+232654.'7.54>32#".#"32>7>32#"&'76�(390A'$��Ze���M�ob/	+=TnF�؜WV��yLwdV*	
(,ey�UY]1D()N
��
,&!sn���
�i+@*-%Y�뒖�W(:'+.J5K<;0!���"�&(	Z���"�&(Z���"�&(
_���"�&(
_����&,	���N�&,��E�&,
	��N�&,
	1��!,@)YSCS
D!%(!+3!2#!#%4.#!!!!2>1����bb������R�Ҁ�c��l��ҕR��b��������b���T��@��T������&1���{����&2	���{����&2���{����&2
���{����&2���{����&2
����D�	(+		'	7	�t3����4u��5pn����4t��4vp6��o{����!-9b@
21&%BK�PX@kCSCSD@jkSCSDY�**%(%$+#"&'+7&54>327>;.#"4&'32>�b���s�Q�
 ,�lwc���y�So7�eo�$^U�G�j~їSrVN�E�d�ҕRĤ���g=9��`���hC?��`�갠�R�9<W�씘�R�35V��������&8	�������&8�������&8
�������&8
�����&</�S�.@+[[C
D
!+#3!2#%!2>54&#!Vff��E��u��^�g7����������]�q?R4\}J����'�J>@;BhSC
CSDED?='%" JJ+2#"&'7>3232>54.54>54.#"#4>�U�Z./GRG/!7EIE7!2Z~Me�<

%<Y?;\?!;XfX;0ITI0?fIG}^6_Bu��3Qd2>\G87:%$1$!)<S;DrR-C6" % #=R/CQ4&1K?1H>:DS8I?*+X�^��e�o;��k��C�&DC���k��C�&Dv���k��C�&D����k��Ci&D����k��CW&Dj���k��C�&D��k����BR]�@:@BK�1PX@5hh

[S	CSD@?hh

[S	CSCSDY@&TSYXS]T]NLDC><7520-,$"
	BB+2#!32>32#"&'#".54>754&#"#"&/>32>32>5"!4.�K�`7
�l0X|LGdD&
JZe4��/Uly7?lP.H��wuHeF,M�k~�/���ͅ?!<R1BtW2�HsR1V(He�<s�op�r:!'!
4%��MjBBhI@qV6E��)0)
NP�po��(BY58O2,U|O+4^�RU�]1X��X�Gh@e6:
E	Bhf
hSCSC	S			DCA9842/-%# GG+232654.'7.54>32#".#"32>32#"&'76�(390A'%W�g8<s�la�8	
#:W>V�[01Z�NHa?%
-�jY]1D()N
��
,&!vK��sr��K>5" =r�ei�o:"("
 :NO<;0!��X����&HC���X����&Hv���X����&H����X���W&Hj���"V�&�C������&�v�������&��������W&�j�Y���}6J6@3<2B65@[SD87B@7J8J.,$"+&54?.'.546?7#".54>32.'2>7.#"�~<�J
Z�N�
r?iM*9r�s[�wD:o�g5kcV �n�9X�\2;XvLX�Y-7_}.

m!/<0�d/z��u��WAy�l`�I9X<��K��-E��t3fP2<j�R]�d5����i&Q���W����&RC���W����&Rv���W����&R����W���i&R����W���W&Rj�m�_#+@([YOSG($(#+!!4632#"&4632#"&m��Uy5'""'55'""'5�I�'7#!5�_'7#!5W���& ,6=@:54%$
BjkSCSD.--6.6'%($'+#"'+7.54>327>;.#"2>54'h<>=t�k�lQ
!&�DF=u�kX�7W2��/0�-vKY�[.iY�Z.P�
WiC�vu��HOm�C�u��I1-t��h�9�*,?s���>r�d�s�]E�������&XC��������&Xv��������&X��������W&Xj�������&\v������!@@=BCSCSCD!!&#+3>32#"&'"32>54&�_B�m��9n�if�6Bc�>9�YX�Y-�����Xg��m��PNL�g\��VF@u�b�������W&\j���c�&/O@L,BAhZC
CSD('#!&&	+2#"&54>7&'!+3"32>!.'F
T/L^'1��I�NCfC23&@2&�z���"KB92*��e��y/A'05��++k����BRn@k-H	6Bh
h		[SCSCSDDCJICRDR?=1/*(%# BB+2#"&54>7&/#".54>754&#"#"&/>3232>2>7�
T/L^)4
)QXf=3`J-H��wuHeF,N�mPxO(.(@2&��:aSH#�ͅ?!6H�"KB ;3+	(@,>aD?lP0h��(0(
NP3_�S�x"-705(->$#<S52I/��|���&&��X��X�&Fv���A�'T@Q	B
		hYQCQ
C		SD$"''+2#"&54>7!!!!!!#32>$
T/L^&1�RP�l���[.(@2&�"KB82+�U��S��U"-705X����CNg@d2Bhh

[		SCSCSDEDJIDNEN@>0.+)$"CC
+2#"&54>7"#".54>32#!32>3232>"!4.�
T/L^!+
f�xA=s�jT�i;
�14`�TKnK,

7EP*,&@2&�MzY7	�,Pp�"KB4/)G��k��J:o�ip�s:!)!
 *"",505�0Z~NPX/��@C
D+#_��:�#@ BCR
D+%!!54?3c��r�����f��?��WKeB
]�9�#@ 
BC
D+7#54?[��_�����Y2T���Z4Tv����&1������&Qv{��7� 4�@

BK�PX@+YSCQC	S
DK�%PX@)YSCQC	S
DK�)PX@3YSCQC	Q
C	SD@1YSCQCQ
C		SDYYY@
1/%(%
+!!!!!#".54>32!4.#"32>7�l���%k��]�ߠYY�߇]��k%E��J��sr��KK��rs��J2��S��UNR�Y/f�
���h0Z�RM�=��XX�씕�WW��W��W�2FQa@^.
Bh

[
	SCSDHG43MLGQHQ><3F4F,*" 
	22+2#!32>32#"&'#".54>32>2>54.#""!4.�K�`7�l0Y|LCcE)JZe4��,*Ĕb�m::m�c��*E^x�ZR{R))R{RS|S))S|?HsR1W(Ie�<s�op�r:!)!
 4%����H��uu��I��BjL)�K=r�dc�s>>s�cd�r=n4^�RU�]1��W����&6��Y����&Vv���W����&6��Y����&V������&<
4��s��&=h��J:�&]v���s��&=k��J:�&]����s��&=k��J:�&]��v����#2@/YSCSD##""	+#543>7'&=37>3#"!{`Dl�X$3`N7
_��ض$5`N7
e��b�\+0 FpR

'���3FpR�G �(�@BkD* +#"/&'+73(A��C�U���� �(�
@BkD' +32?>;# C��A�U��

�����5%q5�� @WD
+".5332>53$B[9E(A00A)E9[�'DZ2%B22B%2ZD'��}�@SD($+#".54>32}    F!!xs��=K�'PX@WSD@[OSGY�$&($+4>32#".732654&#"x/?##?//?##?/:@32@@23@$<++<$$;,,;$2@@22@@����
+@(B@jSD+2#"&54>732>�
T/L^-81.(@2&�"KB"=6,
"-705&�*iQK�PX@WSD@[OSGY@
+2673#".#"#4>32�+,;%6"!;63*,=&6"";537/$?.!'!9-$?.!'!|���	#@ SD




	#++7>3!+7>3��*�R�/�
��
��
�.��s�\�BK�1PX@SCS
D@SC
CSDY@!$##	++#!#"&'7632325#5463s�_�,mi4
	���$�e��=nt	'��"
��f@MQE+!!���fG��f@MQE+!!���fG�!.��(+.5467�L=&2#!&K&N�;3d6;=n��(+'&547>54'&547�L=&2#�&K&N�;2e6:=n���(+7'&547>54'&547�L=&2#�&K&N�;2e6:=�!;�)�(+.5467.5467�L=&2#�L=&2#!&K&N�;3d6;=&K&N�;3d6;=n'�)�(+'&547>54'&547%'&547>54'&547�L=&2#JL=&2#�&K&N�;2e6:=&K&N�;2e6:=n�'�)�(+7'&547>54'&547%'&547>54'&547�L=&2#JL=&2#�&K&N�;2e6:=&K&N�;2e6:=������@BK�PX@CCSCDK�%PX@ZCCD@`ZCDYY@
#!""+463632>72!#"'!�M�S

R�N��

����

� ��

�������-�@&"	BK�PX@/
	

	`
	
[CCSCDK�%PX@-
	

	`Z
	
[CCD@/`
	

	`Z
	
[CDYY@+)('%#! !"#+7!!5463632>72!!#.'#"'"&5�|��M�S

R�N��}N�R

S�M�� �

� �B �

�1i|@OSG($+4>32#"..Pj<=lP..Pl=<jP.T=lQ..Ql=<iP..Pii����#5@SD(&(&($+74>32#"&%4>32#"&%4>32#"&i!""'5�!""'5�!""'5M""!5'""!5'""!5W��z�'0DXl�K@H[	[CSC
C
		S
D}{sqig_]US((%"&((($+#".54>324.#"32>>;+#".54>324.#"32>%#".54>324.#"32>�0Rl<>mP..Pm>>lQ/L#=Q--P<##<P--Q=#eC�
D�0Ql<>mP..Pm>>lQ.L#<Q--Q<##<Q--Q<# 0Ql<>mP..Pm>>lQ.L#<Q--Q<##<Q--Q<#3W�X--X�WX�Y--Y�XMnG!!GnMMmF!!Fm�
��PW�X--X�WX�Y--Y�XMoG!!GoMMmF  FmMW�X--X�WX�Y--Y�XMoG!!GoMMmF  Fm�����(+5���
	
�
z
��	��
�����(+7'&547>7.'&54?����	&

%	��
�6��	@C
D#"+'+>;k( 
*
d��o�N[@X;	Bh		h
[	[SC
S


DNMHGFEA?97$##%'$+3>32#".#"!#!!#!32>32#".'#53.547#�Z��n@m]Q%
"1CY:Z�qJZ���
Hp�Z>_H4$	
	%$TfxFq��T���_�ҒN,A+#%?z�v/2'|�~@%+%	#.K5N�ً;'10HH�#C@@
BhS	CS	D##!4%
+67>;#7+"'#32###5��	
9>��?9
	�W�G��
l���,��z*�E?��x;��;h}�71@.1BSCS
D76***+!>54.#"!"&=!5.54>32!#c`�r>V��ooŔV>q�`��b�yDe�뇇�eDx�b�kOw�g~�~??~�~g�wO��4�\��m�ؖOO�؉m��\�4{���.BC@@4Bh[SCSD0/:8/B0B#+(($+>32#".54>32>54&#"#"&'2>7.#"�$CCG(W�_2G�ԌQ�`5I��q5cVD��1K8%
MR�oO
+GeEb�k9(If=#H��~����6f�[rɖV9W;;5-��
�&G��y3cN/I�dKvR+�@BCR
D+3!7!&'^\M�
��*
��ySz!+&M���$@!QCD+##!##5�b��b��R�k��k�RW����&@#
BQCQD+!!!!547	&5W�����{�[��`�R����R$1.
�z��@MQE+!!�=���I(��"@Bj[
D*# +#"&=!267>;#5�:�
�:��O�
��.)%'�
�IJ
�';OL@IK-B[
	O
	SG=<)(GE<O=O31(;);	''+".'#".54>32>32%2>7.#"!2>54.#"�7\NCCN[79hO//Oh97[NCCN\79hO//Oh�F,KB;;BK,,M:!!:M�+M9!!9M+-KB;;BK(BW//VC(+PsGGrP+(CW..WC(+PrGGsP+N&@S--T@&:V78V::V87V:&@T--S@&����K�)*@'BSCSD!%)U$+>32#"&#"#"&'7>3232>7�
:Vo@'9
4XC-	�?]xE!A

"<`G/
>W�U+
+
 DgH��c�Z*	'	 GqQ����/d@a('B[[[	O	SG,*%# //

+267#".#"'>32267#".#"'>32
4Xd84ec`.7Wc<4fc_.4Xd84ec`.7Wc<4fc_*-:+/$,$-8-0$,$��-:+.$,$-8-/$,$���pkK�	PX@)^_	ZMQE@'jk	ZMQEY@

+!3!!!!#!5!7!��uGt��h��@vHv��Th�De��J�J��J��P�O!@	@MQE+!!��
��''%���v>����	?x��I�P�O!@
@MQE+5467>7.'.=!5!�
&&&��
���(��?>�I��f��"@
BMQE+3	#	>7	.'��B��nB��L		N��	
�@����@�S�������@CD+3#���k�a�BK�!PX@SCQC	
D@[SC	
DY@!$%!
+3'&=354>32#"&#"!#!nj�6g�_!G
+!��G`�{	'U\�g7
0
��R�<}����"�K�!PX@SCQC	
DK�1PX@[SC	
D@![CSC	
DYY@""A15!
+3'&=354>32;#.#"!!nj�4d�`"IE<H_6w0KvQ+ ��{	'AX�n>�nO/Y~NAG����R��
@jD


+2+:	 0["6M6
��	@ja		+2#"&'%t�G
���	
��2E�%@OSG&(($+#".54>32#".54632�

�

0!
�





!1
U5�q@MQE+!!U��aq<�J�	@ja	#++7>3J��
F����
	<�@Bja, +#"&/.'+73<I��J�Z{{�<�@Bja, +32>?>;#J�	�I�Z�{{�2��
(@%jOSG


+"&5332653$|v@R``R@v�pfGQQGbt�8{�@OSG($+#".54>32{  �}���!@[OSG$&($+4>32#".732654&#"}-="">-->""=-5@32@@23@^";**;"#:**:#2@@22@@*)�1@.[OSG
+2673#".#"#4>32�*,6"5"!<85*+8$4""<84P7+#;- % 8*"<- % j��	+@(OSG




	#++7>3!+7>3��/�
q�4���	��	���m�
@kD


+2+U	 3�#;U<.���U_<��ʓ^p�ӡ�6��z�	��V�6�:z/������V���Wgj��X�Xb {�m�n�d�i���I�������?�������x�������������!kl	�|����x��|��V��Y(������;{��;{��W�#��	����sX���Xk��IV�kD��XDW�X��K:���������7�:�:W.�DW�\Y�4:����#��JX?XXi��������C���UX��I'MU�jj����dMUI[�m�a�bI�:��6�I����Wj������S�*						7��|��������VV�VV'1��;{;{;{;{;{��;{��������������k�k�k�k�k�kIk�X�X�X�X�X�"������0Y:�:W:W:W:W:W�m:W:�:�:�:��.��	�k|�X���X��*:X9��:��{�W:W\YW\Y��s�J�s�J�s�J�vI I II5I�IxI�I&I|�.:�7����n�n���n�n�����`i�Wk�k��6��H�h�{TMTW��c(TJ��������������*lI�IIIUI�III2I�I}I*IjI�l�#`�	�V��B��V#��$�V&��*��2��4��97:7<?7D��F��G��H��R��T��m�Bo�By�B}�B��V��V��V��V��V��V��V��������������������������������������������������������������������������������V��������������B�B���B�B�B��V
	�V
�
�B
�
�V
#��
$�V
&��
*��
2��
4��
97
:7
<
?7
D��
F��
G��
H��
R��
T��
m�B
o�B
y�B
}�B
��V
��V
��V
��V
��V
��V
��V
���
���
���
���
���
���
���
�
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
�V
��
��
��
��
��
��
�
�B
�B
�
�
�B
�B
�B
��V#��&��*��2��4��F��G��H��R��T���������������������������������������������������������������������
	�V
�
�B
�
�V
#��
$�V
&��
*��
2��
4��
97
:7
<
?7
D��
F��
G��
H��
R��
T��
m�B
o�B
y�B
}�B
��V
��V
��V
��V
��V
��V
��V
���
���
���
���
���
���
���
�
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
�V
��
��
��
��
��
��
�
�B
�B
�
�
�B
�B
�B
��V�
�
��v#��&��*��2��4��7�L9�L:��<�y?�LY��Z��\��l�m�vo�vr�y�v|�}�v�����������������������y�����y�v�v�����v�v�v���B	��
�B
�B�v�v��$��7�L9��:��;��<�`=��?��l�Br�B|�B�����������������������`���`�������B�B�v�B�B�v��B����
�
��v#��&��*��2��4��7�L9�L:��<�y?�LY��Z��\��l�m�vo�vr�y�v|�}�v�����������������������y�����y�v�v�����v�v�v��7	��
7
7�G���G������"<#��$��&��*��-�o2��4��D��F��G��H��I��J�{P��Q��R��S��T��U��V��W��X��Y��[��\��]��l7m��o��r7tFuFw��y��{F|7}���������������������������������������������������������������������������������������������������������������������������������������7�7�G�7�7�G����7���#��#	��#
��#��#
��#��#��#��#$��#7��#9��#;��#<��#=��#?��#@��#`��#l��#r��#|��#���#���#���#���#���#���#���#���#��#��#��#��#��#��#��#��#��#��#��#���#���$�V$
�V$
�V$��$"��$#��$&��$*��$--$2��$4��$7��$8��$9��$:��$<�t$?��$Y��$\��$l�V$m��$o��$r�V$t�`$u�`$y��${�`$|�V$}��$���$���$���$���$���$���$���$���$���$���$���$��t$��$��$�t$��$��$�V$�V$�V$�V$��$��$��$��V&�e&m�e&o�e&y�e&}�e&�e&�e&�e&�e&�e'��'	��'
��'��'
��'��'��'��'$��'7��'9��';��'<��'=��'?��'@��'`��'l��'r��'|��'���'���'���'���'���'���'���'���'��'��'��'��'��'��'��'��'��'��'��'���'���)	��)�L)�L)��)��)��)")$��)-�.)F��)G��)H��)P��)Q��)R��)S��)T��)U��)X��)w��)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)��)��)��)��)��)�L)�L)���-	��-��-��-��-$��-���-���-���-���-���-���-���-��-��-��-���.��.#��.&��.*��.2��.4��.F��.G��.H��.I��.R��.T��.W��.Y��.Z��.\��.m��.o��.y��.}��.���.���.���.���.���.���.���.���.���.���.���.���.���.���.���.���.���.���.���.��.��.��.��.��.��.��.��.��.��/��/
��/
��/4/�$/4/"��/#��/&��/*��/2��/4��/7�[/9�V/:�y/<�=/?�V/F��/G��/H��/R��/T��/Y��/Z��/\��/l��/m�$/o�$/r��/t�B/u�B/y�$/{�B/|��/}�$/���/���/���/���/���/���/���/��=/���/���/���/���/���/���/���/���/���/���/���/���/��/��/��/��/��/�=/�$/�$/��/��/�4/��/��/�4/�$/�$/�$/���2��2	��2
��2��2
��2��2��2��2$��27��29��2;��2<��2=��2?��2@��2`��2l��2r��2|��2���2���2���2���2���2���2���2���2��2��2��2��2��2��2��2��2��2��2��2���2���3	��3�3�3��3$��3-�V3D��3F��3G��3H��3R��3T��3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3��3��3��3��3��3�3�3���4��4	��4
��4��4
��4��4��4��4$��47��49��4;��4<��4=��4?��4@��4`��4l��4r��4|��4���4���4���4���4���4���4���4���4��4��4��4��4��4��4��4��4��4��4��4���4���5#��5&��5*��52��54��57��58��5���5���5���5���5���5���5���5���5���5���5���5��5��7	��7�L7�L7�L7��7�`7�`7#��7$��7&��7*��7-�872��74��7D�7F�)7G�)7H�)7J�>7P�`7Q�`7R�)7S�`7T�)7U�`7V�D7X�`7Y�L7Z�t7[�g7\�L7]��7m�L7o�L7w�`7y�L7}�L7���7���7���7���7���7���7���7���7���7���7���7���7���7���7��7��7��7��7��7��7��7��)7��)7��)7��)7��)7��)7��`7��)7��)7��)7��)7��)7��)7��`7��`7��`7��`7��7�7��7�)7�)7�`7��7�)7�L7�L7�L7�L7�L7�L7�L7���8	��8��8��8��8$��8���8���8���8���8���8���8���8��8��8��8���979	��9
79
79�G9��9�G9��9��9��9"<9#��9$��9&��9*��9-�o92��94��9D��9F��9G��9H��9I��9J�{9P��9Q��9R��9S��9T��9U��9V��9W��9X��9Y��9[��9\��9]��9l79m��9o��9r79tF9uF9w��9y��9{F9|79}��9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9��9��9��9��9��9��9��9��9�9�9�79�79�G9�79�79�G9�9�9�9�79���:7:	��:
7:
7:��:��:��:��:"%:$��:-��:D��:F��:G��:H��:J��:R��:T��:V��:l7:m��:o��:r7:t7:u7:y��:{7:|7:}��:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:��:��:��:��:��:��:��:�7:�7:�:�7:�7:�:��:��:��:�7:���;��;#��;&��;*��;2��;4��;F��;G��;H��;I��;R��;T��;W��;Y��;Z��;\��;m��;o��;y��;}��;���;���;���;���;���;���;���;���;���;���;���;���;���;���;���;���;���;���;���;��;��;��;��;��;��;��;��;��;��<<	�t<
<
<�y<�`<�y<�t<��<��<"%<#��<$�t<&��<*��<-�8<2��<4��<D��<F�`<G�`<H�`<J�[<P��<Q��<R�`<S��<T�`<U��<V��<X��<Y��<Z��<[��<\��<l<m�`<o�`<r<t-<u-<w��<y�`<{-<|<}�`<��t<��t<��t<��t<��t<��t<��t<���<���<���<���<���<���<���<���<���<���<���<���<���<���<��`<��`<��`<��`<��`<��`<���<��`<��`<��`<��`<��`<��`<���<���<���<���<�t<��<��<�`<�`<��<��<�`<�`<�`<�<�<�y<�<�<�y<�`<�`<�`<�<��t=��="%=#��=&��=*��=2��=4��=F��=G��=H��=R��=T��=V��=Y��=\��=m��=o��=y��=}��=���=���=���=���=���=���=���=���=���=���=���=���=���=���=���=���=���=���=���=��=��=��=��=��=�=�=�=�=�>#��>&��>*��>2��>4��>F��>G��>H��>R��>T��>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>��>��>��>��>��?�V?
�V?
�V?��?"��?#��?&��?*��?--?2��?4��?7��?8��?9��?:��?<�t??��?Y��?\��?l�V?m��?o��?r�V?t�`?u�`?y��?{�`?|�V?}��?���?���?���?���?���?���?���?���?���?���?���?��t?��?��?�t?��?��?�V?�V?�V?�V?��?��?��?��VD��D
��D
��DY��DZ��D\��Dl��Dr��Dt��Du��D{��D|��D�D�D�D�D���E��E
��E��E
��E9��E:��E?��E@��EY��E[��E\��E`��El��Er��E|��E�E�E�E�E���H��H
��H��H
��H9��H:��H?��H@��HY��H[��H\��H`��Hl��Hr��H|��H�H�H�H�H���IKI
KI
KI�yI�yIlKIrKItdIudI{dI|KI�KI�KI�yI�KI�KI�yI�KK��K
��K
��KY��KZ��K\��Kl��Kr��Kt��Ku��K{��K|��K�K�K�K�K���NF��NG��NH��NR��NT��N���N���N���N���N���N���N���N���N���N���N���N���N��N��N��P��P
��P
��PY��PZ��P\��Pl��Pr��Pt��Pu��P{��P|��P�P�P�P�P���Q��Q
��Q
��QY��QZ��Q\��Ql��Qr��Qt��Qu��Q{��Q|��Q�Q�Q�Q�Q���R��R
��R��R
��R9��R:��R?��R@��RY��R[��R\��R`��Rl��Rr��R|��R�R�R�R�R���S��S
��S��S
��S9��S:��S?��S@��SY��S[��S\��S`��Sl��Sr��S|��S�S�S�S�S���U��U��UD��U���U���U���U���U���U���U���U��U�U�Y	��Y��Y��Y��Y$��YF��YG��YH��YR��YT��Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y��Y��Y��Y��Y�Y�Y���Z��Z��Z��Z��[F��[G��[H��[R��[T��[���[���[���[���[���[���[���[���[���[���[���[���[��[��[��\	��\��\��\��\$��\F��\G��\H��\R��\T��\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\��\��\��\��\�\�\���^#��^&��^*��^2��^4��^F��^G��^H��^R��^T��^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^��^��^��^��^��l	�Vl�l�Bl�l�Vl#��l$�Vl&��l*��l2��l4��l97l:7l<l?7lD��lF��lG��lH��lR��lT��lm�Blo�Bly�Bl}�Bl��Vl��Vl��Vl��Vl��Vl��Vl��Vl���l���l���l���l���l���l���l�l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l�Vl��l��l��l��l��l��l�l�Bl�Bl�l�l�Bl�Bl�Bl��Vm�Bm	��m
�Bm
�Bm�vm�vm��m$��m7�Lm9��m:��m;��m<�`m=��m?��ml�Bmr�Bm|�Bm���m���m���m���m���m���m���m��`m��m�`m��m��m��m�Bm�Bm�vm�Bm�Bm�vm��Bm���o�Bo	��o
�Bo
�Bo�vo�vo��o$��o7�Lo9��o:��o;��o<�`o=��o?��ol�Bor�Bo|�Bo���o���o���o���o���o���o���o��`o��o�`o��o��o��o�Bo�Bo�vo�Bo�Bo�vo��Bo���p��p	��p
��p��p
��p��p��p��p$��p7��p9��p;��p<��p=��p?��p@��p`��pl��pr��p|��p���p���p���p���p���p���p���p���p��p��p��p��p��p��p��p��p��p��p��p���p���r	�Vr�r�Br�r�Vr#��r$�Vr&��r*��r2��r4��r97r:7r<r?7rD��rF��rG��rH��rR��rT��rm�Bro�Bry�Br}�Br��Vr��Vr��Vr��Vr��Vr��Vr��Vr���r���r���r���r���r���r���r�r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r�Vr��r��r��r��r��r��r�r�Br�Br�r�r�Br�Br�Br��Vt	�`t�`t$�`t9Ft:Ft<(t?Ft��`t��`t��`t��`t��`t��`t��`t�(t�`t�(t��`u	�`u�`u$�`u9Fu:Fu<(u?Fu��`u��`u��`u��`u��`u��`u��`u�(u�`u�(u��`y�By	��y
�By
�By�vy�vy��y$��y7�Ly9��y:��y;��y<�`y=��y?��yl�Byr�By|�By���y���y���y���y���y���y���y��`y��y�`y��y��y��y�By�By�vy�By�By�vy��By���{	�`{�`{$�`{9F{:F{<({?F{��`{��`{��`{��`{��`{��`{��`{�({�`{�({��`|	�V|�|�B|�|�V|#��|$�V|&��|*��|2��|4��|97|:7|<|?7|D��|F��|G��|H��|R��|T��|m�B|o�B|y�B|}�B|��V|��V|��V|��V|��V|��V|��V|���|���|���|���|���|���|���|�|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|�V|��|��|��|��|��|��|�|�B|�B|�|�|�B|�B|�B|��V}�B}	��}
�B}
�B}�v}�v}��}$��}7�L}9��}:��};��}<�`}=��}?��}l�B}r�B}|�B}���}���}���}���}���}���}���}��`}��}�`}��}��}��}�B}�B}�v}�B}�B}�v}��B}�����V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V��V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V��V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V��V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V��V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V��V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V��e�m�e�o�e�y�e�}�e��e��e��e��e��e����	���
������
������������$���7���9���;���<���=���?���@���`���l���r���|�������������������������������������������������������������������������������	���
������
������������$���7���9���;���<���=���?���@���`���l���r���|�������������������������������������������������������������������������������	���
������
������������$���7���9���;���<���=���?���@���`���l���r���|�������������������������������������������������������������������������������	���
������
������������$���7���9���;���<���=���?���@���`���l���r���|�������������������������������������������������������������������������������	���
������
������������$���7���9���;���<���=���?���@���`���l���r���|�������������������������������������������������������������������������������	���
������
������������$���7���9���;���<���=���?���@���`���l���r���|����������������������������������������������������������������������������	������������$��������������������������������������������	������������$��������������������������������������������	������������$��������������������������������������������	������������$���������������������������������������������	�t�
�
��y��`��y��t�������"%�#���$�t�&���*���-�8�2���4���D���F�`�G�`�H�`�J�[�P���Q���R�`�S���T�`�U���V���X���Y���Z���[���\���l�m�`�o�`�r�t-�u-�w���y�`�{-�|�}�`���t���t���t���t���t���t���t�����������������������������������������������������������`���`���`���`���`���`�������`���`���`���`���`���`������������������t��������`��`��������`��`��`������y������y��`��`��`�����t����	���
������
������������$���7���9���;���<���=���?���@���`���l���r���|�������������������������������������������������������������������������������
���
���Y���Z���\���l���r���t���u���{���|������������������
���
���Y���Z���\���l���r���t���u���{���|������������������
���
���Y���Z���\���l���r���t���u���{���|������������������
���
���Y���Z���\���l���r���t���u���{���|������������������
���
���Y���Z���\���l���r���t���u���{���|������������������
���
���Y���Z���\���l���r���t���u���{���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
���
���Y���Z���\���l���r���t���u���{���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|����������������V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V����
���
���Y���Z���\���l���r���t���u���{���|����������������e�m�e�o�e�y�e�}�e��e��e��e��e��e����
������
���9���:���?���@���Y���[���\���`���l���r���|����������������t�
�t�
�t��o�9�j�:���<�y�?�j�Y���\���l�t�m�o�o�o�r�t�t���u���y�o�{���|�t�}�o���y��y��o��o��t��t��t��t��o��o��o���t����
���
���Y���Z���\���l���r���t���u���{���|������������������
������
���9���:���?���@���Y���[���\���`���l���r���|����������������	�t�
�
��y��`��y��t�������"%�#���$�t�&���*���-�8�2���4���D���F�`�G�`�H�`�J�[�P���Q���R�`�S���T�`�U���V���X���Y���Z���[���\���l�m�`�o�`�r�t-�u-�w���y�`�{-�|�}�`���t���t���t���t���t���t���t�����������������������������������������������������������`���`���`���`���`���`�������`���`���`���`���`���`������������������t��������`��`��������`��`��`������y������y��`��`��`�����t����"%�#���&���*���2���4���F���G���H���R���T���V���Y���\���m���o���y���}�����������������������������������������������������������������������������������������������������������"%�#���&���*���2���4���F���G���H���R���T���V���Y���\���m���o���y���}�����������������������������������������������������������������������������������������������������������"%�#���&���*���2���4���F���G���H���R���T���V���Y���\���m���o���y���}���������������������������������������������������������������������������������������������������������B�	���
�B�
�B��v��v����$���7�L�9���:���;���<�`�=���?���l�B�r�B�|�B�������������������������������`�����`�����������B��B��v��B��B��v���B������B�	���
�B�
�B��v��v����$���7�L�9���:���;���<�`�=���?���l�B�r�B�|�B�������������������������������`�����`�����������B��B��v��B��B��v���B�����	�V����B����V�#���$�V�&���*���2���4���97�:7�<�?7�D���F���G���H���R���T���m�B�o�B�y�B�}�B���V���V���V���V���V���V���V������������������������������������������������������������������������������������������������������������V����������������������B��B������B��B��B���V�	�V����B����V�#���$�V�&���*���2���4���97�:7�<�?7�D���F���G���H���R���T���m�B�o�B�y�B�}�B���V���V���V���V���V���V���V������������������������������������������������������������������������������������������������������������V����������������������B��B������B��B��B���V���
��
���v�#���&���*���2���4���7�L�9�L�:���<�y�?�L�Y���Z���\���l��m�v�o�v�r��y�v�|��}�v�������������������������������y��������y��v��v����������v��v��v����	�V����B����V�#���$�V�&���*���2���4���97�:7�<�?7�D���F���G���H���R���T���m�B�o�B�y�B�}�B���V���V���V���V���V���V���V������������������������������������������������������������������������������������������������������������V����������������������B��B������B��B��B���V�	�V����B����V�#���$�V�&���*���2���4���97�:7�<�?7�D���F���G���H���R���T���m�B�o�B�y�B�}�B���V���V���V���V���V���V���V������������������������������������������������������������������������������������������������������������V����������������������B��B������B��B��B���V���
��
���v�#���&���*���2���4���7�L�9�L�:���<�y�?�L�Y���Z���\���l��m�v�o�v�r��y�v�|��}�v�������������������������������y��������y��v��v����������v��v��v�����B�	���
�B�
�B��v��v����$���7�L�9���:���;���<�`�=���?���l�B�r�B�|�B�������������������������������`�����`�����������B��B��v��B��B��v���B������B�	���
�B�
�B��v��v����$���7�L�9���:���;���<�`�=���?���l�B�r�B�|�B�������������������������������`�����`�����������B��B��v��B��B��v���B������B�	���
�B�
�B��v��v����$���7�L�9���:���;���<�`�=���?���l�B�r�B�|�B�������������������������������`�����`�����������B��B��v��B��B��v���B�����	�V����B����V�#���$�V�&���*���2���4���97�:7�<�?7�D���F���G���H���R���T���m�B�o�B�y�B�}�B���V���V���V���V���V���V���V������������������������������������������������������������������������������������������������������������V����������������������B��B������B��B��B���V��V�
�V�
�V����"���#���&���*���--�2���4���7���8���9���:���<�t�?���Y���\���l�V�m���o���r�V�t�`�u�`�y���{�`�|�V�}�������������������������������������������������t��������t��������V��V��V��V������������V�����"��"��J��"<b��n�6�2�	(	z	�

,
R
�~����

�
�
�Zv��@~�F��F��Fr���*�z�T����T��V�`����P���r�NN���Jl 
 ^!B!�!�"$">##&#n#�$"$�$�%.%d%�%�&.&t&�'0'�))r)~)�)�)�)�)�**�*�*�*�*�*�*�*�++T+`+l+x+�+�+�+�,P,\,h,t,�,�,�-P-\-h-t-�-�-�.x///(/4/@/L/X/d/p/�0000&020>0�1111$101<1�1�22�2�2�3<3�3�4*4\4h4t5<5�5�5�6666(646@6L6X6d6�6�777D7n7�7�8R8�8�8�99>9d9�9�::V:�;t;�;�<�<�= =>=�>4>�??F?p?�?�?�@�@�A^A�A�B6BxB�B�CbC�C�C�DD.D\D�D�D�E$EhE�E��`"/n�	� ��
��(�
�(�
�0�%	%
�42(
�Z	6	J	^	Pl	�	P�	�	` 	�		�	
��	0
V	d
�	
�
�	4n	�	
�Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1.Lato LightRegulartyPolandLukaszDziedzic: Lato Light: 2013Version 1.105; Western+Polish opensourceLato-LightLato is a trademark of tyPoland Lukasz Dziedzic.Lukasz DziedzicLato is a sanserif typeface family designed in the Summer 2010 by Warsaw-based designer Lukasz Dziedzic ("Lato" means "Summer" in Polish). It tries to carefully balance some potentially conflicting priorities: it should seem quite "transparent" when used in body text but would display some original traits when used in larger sizes. The classical proportions, particularly visible in the uppercase, give the letterforms familiar harmony and elegance. At the same time, its sleek sanserif look makes evident the fact that Lato was designed in 2010, even though it does not follow any current trend. The semi-rounded details of the letters give Lato a feeling of warmth, while the strong structure provides stability and seriousness.http://www.typoland.com/http://www.typoland.com/designers/Lukasz_Dziedzic/Copyright (c) 2013-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).http://scripts.sil.org/OFLCopyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1.Lato LightRegulartyPolandLukaszDziedzic: Lato Light: 2013Lato-LightVersion 1.105; Western+Polish opensourceLato is a trademark of tyPoland Lukasz Dziedzic.Lukasz DziedzicLato is a sanserif typeface family designed in the Summer 2010 by Warsaw-based designer Lukasz Dziedzic ("Lato" means "Summer" in Polish). It tries to carefully balance some potentially conflicting priorities: it should seem quite "transparent" when used in body text but would display some original traits when used in larger sizes. The classical proportions, particularly visible in the uppercase, give the letterforms familiar harmony and elegance. At the same time, its sleek sanserif look makes evident the fact that Lato was designed in 2010, even though it does not follow any current trend. The semi-rounded details of the letters give Lato a feeling of warmth, while the strong structure provides stability and seriousness.http://www.typoland.com/http://www.typolangems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf000064400000272124150403134130024554 0ustar00	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a��������������������������������bc�d�e�������f����g�����h���jikmln�oqprsutvw�xzy{}|��~�������	
�����
����������������������������������������������� !"#NULLuni00A0uni00ADmacronperiodcenteredAogonekaogonekEogonekeogonekNacutenacuteSacutesacuteZacutezacute
Zdotaccent
zdotaccentuni02C9EuroDeltauni2669undercommaaccent
grave.case
dieresis.casemacron.case
acute.casecircumflex.case
caron.case
breve.casedotaccent.case	ring.case
tilde.casehungarumlaut.case
caron.salt��bKbK�������V��������V�,� `f-�, d ��P�&Z�E[X!#!�X �PPX!�@Y �8PX!�8YY �Ead�(PX!�E �0PX!�0Y ��PX f ��a �
PX` � PX!�
` �6PX!�6``YYY�+YY#�PXeYY-�, E �%ad �CPX�#B�#B!!Y�`-�,#!#! d�bB �#B�*! �C � ��+�0%�QX`PaRYX#Y! �@SX�+!�@Y#�PXeY-�,�C+�C`B-�,�#B# �#Ba��b�`�*-�,  E �Ec�Eb`D�`-�,  E �+#�%` E�#a d � PX!��0PX� �@YY#�PXeY�%#aDD�`-�,�E�aD-�	,�`  �	CJ�PX �	#BY�
CJ�RX �
#BY-�
, �b �c�#a�C` �` �#B#-�,KTX�DY$�
e#x-�,KQXKSX�DY!Y$�e#x-�
,�CUX�C�aB�
+Y�C�%B�	%B�
%B�# �%PX�C`�%B�� �#a�	*!#�a �#a�	*!�C`�%B�%a�	*!Y�	CG�
CG`��b �Ec�Eb`�#D�C�>�C`B-�,�ETX�#B `�a�

BB�`�
+�m+"Y-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�	+-�,�+�ETX�#B `�a�

BB�`�
+�m+"Y-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-� ,�+-�!,�+-�",�+-�#,�	+-�$, <�`-�%, `�
` C#�`C�%a�`�$*!-�&,�%+�%*-�',  G  �Ec�Eb`#a8# �UX G  �Ec�Eb`#a8!Y-�(,�ETX��'*�0"Y-�),�+�ETX��'*�0"Y-�*, 5�`-�+,�Ec�Eb�+�Ec�Eb�+��D>#8�**-�,, < G �Ec�Eb`�Ca8-�-,.<-�., < G �Ec�Eb`�Ca�Cc8-�/,�% . G�#B�%I��G#G#a Xb!Y�#B�.*-�0,��%�%G#G#a�E+e�.#  <�8-�1,��%�% .G#G#a �#B�E+ �`PX �@QX�  �&YBB# �C �#G#G#a#F`�C��b` �+ ��a �C`d#�CadPX�Ca�C`Y�%��ba#  �&#Fa8#�CF�%�CG#G#a` �C��b`# �+#�C`�+�%a�%��b�&a �%`d#�%`dPX!#!Y#  �&#Fa8Y-�2,�   �& .G#G#a#<8-�3,� �#B   F#G�+#a8-�4,��%�%G#G#a�TX. <#!�%�%G#G#a �%�%G#G#a�%�%I�%a�Ec# Xb!Yc�Eb`#.#  <�8#!Y-�5,� �C .G#G#a `� `f��b#  <�8-�6,# .F�%FRX <Y.�&+-�7,# .F�%FPX <Y.�&+-�8,# .F�%FRX <Y# .F�%FPX <Y.�&+-�9,�0+# .F�%FRX <Y.�&+-�:,�1+�  <�#B�8# .F�%FRX <Y.�&+�C.�&+-�;,��%�& .G#G#a�E+# < .#8�&+-�<,�%B��%�% .G#G#a �#B�E+ �`PX �@QX�  �&YBB# G�C��b` �+ ��a �C`d#�CadPX�Ca�C`Y�%��ba�%Fa8# <#8!  F#G�+#a8!Y�&+-�=,�0+.�&+-�>,�1+!#  <�#B#8�&+�C.�&+-�?,� G�#B�.�,*-�@,� G�#B�.�,*-�A,��-*-�B,�/*-�C,�E# . F�#a8�&+-�D,�#B�C+-�E,�<+-�F,�<+-�G,�<+-�H,�<+-�I,�=+-�J,�=+-�K,�=+-�L,�=+-�M,�9+-�N,�9+-�O,�9+-�P,�9+-�Q,�;+-�R,�;+-�S,�;+-�T,�;+-�U,�>+-�V,�>+-�W,�>+-�X,�>+-�Y,�:+-�Z,�:+-�[,�:+-�\,�:+-�],�2+.�&+-�^,�2+�6+-�_,�2+�7+-�`,��2+�8+-�a,�3+.�&+-�b,�3+�6+-�c,�3+�7+-�d,�3+�8+-�e,�4+.�&+-�f,�4+�6+-�g,�4+�7+-�h,�4+�8+-�i,�5+.�&+-�j,�5+�6+-�k,�5+�7+-�l,�5+�8+-�m,+�e�$Px�0-K�KRX��Y�c �#D�#p�E  �(`f �UX�%a�Ec#b�#D�*�*�*Y�(	ERD�*�D�$�QX�@�X�D�&�QX��X�DYYYY������Dgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf000064400000272124150403134130024554 0ustar00 DSIGtLGPOS�,HPGSUBV.TI|OS/2ٮ��J�`cmapRԟ�J��cvt '�i�8fpgm�zAj4	�gaspi�glyfmr��O��>head��d��6hhea�`�L$hmtx4W��pTkern@�B���g�loca�E�/R�,maxpC
�T� name��UTpost:�]fX�prep�x9�s��
0JDFLTlatn����kernkernGr�����T��v		�

����
V
��8�,^$^�0��
D��J��J���J�L F �!z"##P#�$4$~%x&&�'�(�)�*�+�+�,J,�-n..�/$/V/�/�/�1�242n2�2�33V3�3�44J4�4�4�5�5�6�7�7�7�8~8�8�:�;";�;�<�=2>,?&?�@�A�B�C8C�D�E.F(>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U-#��&��*��2��4��D��F��G��H��R��T��k��p��������������������������������������������������������������������������������������������>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U0��
��
���;#��&��*��2��4��7�59�,:�|<�;?�,Y�rZ��\�|k��l��m�;o�;p��r��y�;|��}�;�����������������������;��r��r�����;�;�;�����;�;�;&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���0��
��
���;#��&��*��2��4��7�59�,:�|<�;?�,Y�rZ��\�|k��l��m�;o�;p��r��y�;|��}�;�����������������������;��r��r�����;�;�;�����;�;�;q6	��
6
6�A���A������":#��$��&��*��-�i2��4��D��F��G��H��P��Q��R��S��T��U��V��X��Y��Z��\��]��k��l6m��o��p��r6tPuPw��y��{P|6}�������������������������������������������������������������������������������������������������������������������������������������������������������6�6�A�6�6�A��A�����$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������
��m��o��y��}�������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������>	�|�L�L�|����"$�|-�:D��F��G��H��P��Q��R��S��T��U��X��w����|��|��|��|��|��|��|�������������������������������������������������������������������������|�����������L�L�L��|	����$����������������������������+

��#��&��*��2��4��I��W��Y��Z��\��k��lm��o��p��ry��|}������������������������������������������3��
��
���;#��&��*��2��4��7�89�J:�h<�,?�JY�|Z��\�|k��l��m�;o�;p��r��t�,u�,y�;{�,|��}�;�����������������������,��|��|�����,�;�;�����;�;�;$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������/	�v�C�C�v$�v-�JD��F��G��H��R��T����v��v��v��v��v��v��v����������������������������������������������������������v���������C�C�C��v$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������#��&��*��2��4��7��8��k��p���������������������������������������f	�|�L�L�L�|�f�f"'#��$�|&��*��-�82��4��D�/F�/G�/H�/J�EP�fQ�fR�/S�fT�/U�fV�JX�fY�WZ�[�Z\�L]�_k��m�Lo�Lp��w�fy�L}�L��|��|��|��|��|��|��|�����������������������/��/��/��/��/��/��/��/��/��/��/��/��/��f��/��/��/��/��/��/��f��f��f��f��W��W�|�/���/�/�f���/�J�J�_�_�_�L�L�L�L�L�L�L�L��|	����$����������������������������q6	��
6
6�A���A������":#��$��&��*��-�i2��4��D��F��G��H��P��Q��R��S��T��U��V��X��Y��Z��\��]��k��l6m��o��p��r6tPuPw��y��{P|6}������������������������������������gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf000064400000272124150403134130024554 0ustar00��4��I��W��Y��Z��\��k��lm��o��p��ry��|}������������������������������������������m7	�r
7
7�'�J�'�r����"2#��$�r&��*��-�82��4��D�AF�AG�AH�AJ�WP��Q��R�AS��T�AU��V�AX��]��k��l7m�Jo�Jp��r7t>u>w��y�J{>|7}�J��r��r��r��r��r��r��r�����������������������A��A��A��A��A��A��A��A��A��A��A��A��A�����A��A��A��A��A��A�������������r�A���A�A�����A�A�A�������J�J�7�7�'�7�7�'�J�'�J�J��r��"##��&��*��2��4��k��m��o��p��y��}��������������������������������-#��&��*��2��4��D��F��G��H��R��T��k��p��������������������������������������������������������������������������������������������:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|������E
E
E��lErEtdud{d|E�E�E��E�E����
��
��Y��\��l��r��t��u��{��|����������������D��F��G��H��R��T���������������������������������������������������������������������
��
��Y��\��l��r��t��u��{��|������������������
��
��Y��\��l��r��t��u��{��|������������������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|������"�h�hD��F��G��H��R��T��������������������������������������������������������������������h�h�h.	���r�r��$��D��F��G��H��R��T�������������������������������������������������������������������������������������������r�r�r���	��������$�������������������������������D��F��G��H��R��T�������������������������������������������������������������������.	���h�h��$��D��F��G��H��R��T�������������������������������������������������������������������������������������������h�h�h���-#��&��*��2��4��D��F��G��H��R��T��k��p��������������������������������������������������������������������������������������������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U	�T�T$�T9:::<(?:��T��T��T��T��T��T��T�(�T�(��T	�T�T$�T9:::<(?:��T��T��T��T��T��T��T�(�T�(��T&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���	�T�T$�T9:::<(?:��T��T��T��T��T��T��T�(�T�(��T>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������
��m��o��y��}�������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�����������������������������������������������	����$����������������������������	����$����������������������������	����$����������������������������	����$����������������������������m7	�r
7
7�'�J�'�r����"2#��$�r&��*��-�82��4��D�AF�AG�AH�AJ�WP��Q��R�AS��T�AU��V�AX��]��k��l7m�Jo�Jp��r7t>u>w��y�J{>|7}�J��r��r��r��r��r��r��r�����������������������A��A��A��A��A��A��A��A��A��A��A��A��A�����A��A��A��A��A��A�������������r�A���A�A�����A�A�A�������J�J�7�7�'�7�7�'�J�'�J�J��r$��	��
����
����$��7��9��;��<��=��?��@��`��l��r��|�������������������������������������������������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
��
��Y��\��l��r��t��u��{��|������������������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|��������
����
��@��[��`��l��r��|������.	���r�r��$��D��F��G��H��R��T�������������������������������������������������������������������������������������������r�r�r�����
����
��@��[��`��l��r��|������.	���r�r��$��D��F��G��H��R��T�������������������������������������������������������������������������������������������r�r�r���:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������
��m��o��y��}���������
����
��@��[��`��l��r��|������"�i
�i
�i��9�^:��<�h?�^Y��Z��\��l�im��o��r�it�}u�}y��{�}|�i}����h�������h���i�i�i�i�����
��
��Y��\��l��r��t��u��{��|������������������
����
��@��[��`��l��r��|������m7	�r
7
7�'�J�'�r����"2#��$�r&��*��-�82��4��D�AF�AG�AH�AJ�WP��Q��R�AS��T�AU��V�AX��]��k��l7m�Jo�Jp��r7t>u>w��y�J{>|7}�J��r��r��r��r��r��r��r�����������������������A��A��A��A��A��A��A��A��A��A��A��A��A�����A��A��A��A��A��A�������������r�A���A�A�����A�A�A�������J�J�7�7�'�7�7�'�J�'�J�J��r��"##��&��*��2��4��k��m��o��p��y��}����������������������������������"##��&��*��2��4��k��m��o��p��y��}����������������������������������"##��&��*��2��4��k��m��o��p��y��}��������������������������������&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U0��
��
���;#��&��*��2��4��7�59�,:�|<�;?�,Y�rZ��\�|k��l��m�;o�;p��r��y�;|��}�;�����������������������;��r��r�����;�;�;�����;�;�;>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U0��
��
���;#��&��*��2��4��7�59�,:�|<�;?�,Y�rZ��\�|k��l��m�;o�;p��r��y�;|��}�;�����������������������;��r��r�����;�;�;�����;�;�;&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���0��
��
���;#��&��*��2��4��7�59�,:�|<�;?�,Y�rZ��\�|k��l��m�;o�;p��r��y�;|��}�;�����������������������;��r��r�����;�;�;�����;�;�;&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���&��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^���>	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U:�J
�J
�J��#��&��*��->2��4��7�|8��9��:��<�h?��W��Y��Z��\��k��l�Jm��o��p��r�Jt�Iu�Iy��{�I|�J}�������������������������������������h�����������h�����J�J�J�J������r

#$&')-./2345789:;<=>?EHIKNPQRSUYZ[\^klmoprtuy{|}����������������������������������������������������������
8�DFLTlatn����case&case,liga2liga8sups>supsD,>B	

@LO,{tuCjqv�������I��xx�t���P`KtyPL�J�z��� ��� �&
	

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a���������������������������������rdei�x�pk�vj���sgw�����l|����cn���m}�b�������������������y���������������������q���z���`T@
~�1DS[a~�����    " & 0 : D �!"!&"""""""+"H"`"e%�&i���
 �1ARZ`x�����      & 0 9 D �!"!&"""""""+"H"`"d%�&i����������������{�u�q�[�H����$��������������I�����������������޸ޡޞ�:ڜ`T@
~�1DS[a~�����    " & 0 : D �!"!&"""""""+"H"`"e%�&i���
 �1ARZ`x�����      & 0 9 D �!"!&"""""""+"H"`"d%�&i����������������{�u�q�[�H����$��������������I�����������������޸ޡޞ�:ڜ-��(8<@J@GBhf[[		QCQ
D@?($#-$
+>32#'.54>54&#"#"'4632#"&!!7!!�9DO.?gI)-60#z
-5-I9)8(c>0((0>���22c��u&#@[87P;+&%ia/(&.8'3<��/@)(?��g6,����
!&@#QCSD

+#>74>32#".FuF�!-."".-!���-UV\44\VU->��."".-""-����
*@'	BQD

$+#"&=!#"&=�$"%�$"%��ߛ""�!�ߛ""�!6��<@H@E
Y	CQ
C
D@?>=<<6431.-(&##!#!+#"&547#+#"546?3#7>;>;3323+32%3#�Nq�t0M��+�j�'&�v
-N���Mv�&%�j����j���X]��#�(
7KGk �X�	��G��
7KG�bf8CN�@J)?BAK�	PX@$jhfkCDK�
PX@$jhfkCD@$jhfkCDYY�#'#%+.'7632.54>?>;#".'+4.'>�w�?=+A\Dg>w]9B|�o@&g�30%6I2]@~c>F��u"@�":N,`JsP)�5H)WHkG"aKN&1/1KoRS�xL��Q;@"!�2IlO_��S��,A0#�2Oh�*?1%�-DUZ����'1EY�K�PX@'[	[SC		S
DK� PX@+[	[SC
C		SD@/[	[CSC
C		SDYY@
VT((%#&((($
+#".54>324.#"32>>;+#".54>324.#"32>�;`{A8^C%6]}F8^C&�$1(G4$1'G5w|��
~:`|A8]C%6]}F8]D%�$1(G5$1'G6xc�j7)MoFc�k8)NpH2H."JsQ1E-!GqU��
�c�i7)MnFc�l8)NpH2G."JrQ1F-!Hr9����BN�@;LK.&BK�PX@*hSCS
CS
D@(hSCS
CSDY@IG20)'#!
BB+2#"'.#">7>;#"./#".54>7.54>3267�FrR-e)<)3R; /2B)6w[G�`^�R�b65]}H'%9i��q#=T1_�F��sr�,Nj>!8-&C[49x?�gB�Gs�`��zWf1[�QO�u\ B�?R�j>��8W<VF�>�����
@	BQD

$+#"&=�$"%��ߛ""�!z��S
�(+.547*Q*;& U�uGJrN)�J���C.V���S�	�/r�������
�(+4.'&546?
'.547>9)R);& T�uFIsN)1I���C/W���T������.r��a��6C@0,+'$#	BK�PX@kD@
jaY@
66+7>7'767&/7&546?3>?'.'i�!�$$$�3�T
	� �# �2�a�!

dIefIe��!
dIefHd
�s�A�.@+jkMRF+!!#!7!�5��f5�5�i�6��S��Q���2��$�@
?S
D"+74632'&54>7#"&2A6.1F-
 *'4A{/B'3-a_Z&&5E*Ea<�@MQE+!!s��8��-��'�@SD($+74>32#".-"--""--"n."".-""-����.�	@kD#"++>;]:I�4 I "�!O��j�',@)SCSD''	+2#".54>2>54.#"�_�sAb��~`�sAb�� T�qB-Le8T�qB-Le�I�ے���kI�ۓ�J�k��Y��x�j0Y���x�i0���*@'
BhCR
D$+7!7#"&/3!!�6{��,֌����M�
Kq��/J�4;@80BhSCQ
D-+'%
44+2>3!2!7>7>54.#"#"&/>�S�f99b�J�Q)R&��HIrO)#>U2p�%#Wc���/Z�R[��~C�x
"5;)�AusxE6R6ufb�f4]��X�CU@R?
Bhh[SCSD<:64.-,+#!CC	+2#".'763232>54.#7>54.#"#"&/>�T�b6*MmCz{V��jd�jBP,B\AR�W.N�f��">T2r�&#Xc���.UxIOyZ;#�pl�{B.\�_:W:8Zr;0Q;"{��5P5veb�f4-f�'@$
B\C
D!#+3+#!"&/3>7!���.�/��"+����b��{W���7�9D��F�.@@=,+Bh[QCSD(#&(""+#!632#".'763232>54.#"'!<37�9so\i�i4]��u?p_N=/C_CS�d7$HnK2sDg��M$/�9d�Q~͐O)6J%8e�V9]C$�h��0�22@/B[CSD/-%#	+2#".54>7>;>32>54.#"�O�e:T��vb�l99W<�3��.%7���$Dd@O�a6'Ge>O�^5l2`�Wo��P<n�_>wy}E���3,$)�!;cH(5^�L=cE%8_~���$@!BQC
D$'++>7!"&=7�
	�'����D-�+�)uR��>�3GD@AB[SCSD54! ?=4G5G+) 3!3	+".5467.54>32'2>54.#"2>54.#"c�r>��aaH�iZ�e6��t|Q��cN~Z0-Lc5Bz_9$Fd�QqG :X;HoL'9Y3^�Q��)&�bX�q@4[{F��-#�ui�w?�.RtF@Z9$LwS5W?#�4Sf3-N;"-Lh:+P=%�w�12@/B[SC
D.,&$	+".54>32+>74.#"32>5K�`7R��p^�h8;T6�c0��.=�P%D_:I{Z3�xO~Y0M0\�Ti��N;j�XH}vvB�<6-/�:_D%2Y{Ju�5Zv-����';K�$PX@SCSD@[SDY�((($+74>32#".4>32#".-"--""--"d"--""--"n."".-""-	."".-""-.����,D�
?K�$PX@SCS
D@[S
DY@	)'"+74632'&54>7#"&4>32#"..A6.1F-
 *'4Ai"--""--"{/B'3-a_Z&&5E*E."".-""-���W�(+�6�#/+��-��
�
�'0����!@YMQE+!!!!�Z��:X��=�Ѓ}��X�(+	7>7%>7.'%.54>7����/+�Z�|�o
�
�'0�n����%95@2BhfSCSD(&#*$+>32#7>54&#"#"'4>32#".�!KWc8FqP*/HWO=
%w5LWI1_Q8R;'

!-."".-!4(*Je;TvW?;@+��0JA>H[=NZ$��."".-""-M��MTdf@c
[
<Bh[

[	[OSGVU^\UdVdLJ@>9731)'TT
+%"&'#".54>3232>54.#"3267>32#".54>32%2>7&#"FR?�H0G. ?[w�T?[)�!3aK.Dz�e��lP��v��Lk�����_<k���muϛZEv��1<:8k#)I�a92�JMPE#<R0<~uhN-��4L#F�it�v<u�્ړL>03HR_����ɥu@O�؊םYu3WC(	Gr�I9H����
$@!BZC
D# +!#"&'!+3!.'��N���	%����>�
^����zQB&&Cae�*=@:B[SCS
D*(" !+3!2#!2>54&#%32>54&+a��p�h2%JoJ��G��y�?OxP(�����QyQ(|���-SwI@tbL�pc�xB��*NnE_q�+MlAggd����/D@ABhfSCSD'%" 
//+%2>32#".546$32#".#"�BfN7)	A^���̍Kt��L|fS$@(EmWtʔU:g�� ' Qfq\�䉻6�{2F+N

(/(]���o�{Ba=�@SCS
D!(!$+#!!24.#!!2>=q����ՔP�7g�]�Ό2xƎO1����v�Z��l�yA��[��aA�(@%YQCQ
D+!!!!!!.��<��=u�ϱ/�����aA�	"@YQC
D+!!!#!.��?��L��/�����d��%�:G@D&
Bh[SCSD20+)" ::+%2>7#"&50>17!#".546$32#"'.#"�4ZOI$'�	�C6s��R�ӖQs��S�nY%<
5KjK{͓R;l��D

O��':']�芹3�z2D(N


)%^���q�~CaE� @ZC
D+!#!#3!3��Q�EP���O�O���r��}����@C
D+!#3=���������QK�PX�B�BYK�PX@CSD@hCSDY�#%"+#"&'7>3232>73���6^0
!+4\J3u���m"N~\�r%� &@#
B\C
D'(% +3267>;#".'.+#3�B#-�,���%#����'+QQ���" ��	
#�Y
	<�n�af�@CR
D+%!!3/7������av�"&@#BhC
D!6(+67>;#>7+"'#3243����	��/.������[�'*'�	�g#.�~++�.���	�{aE�@BC
D!+2>73#"&'#3rj���^�����`���)�gH���d����)@SCSD(((&+#".546$324.#"32>�4_���k�ӕOr���ӕO�8g�]vƎP8g�]xƎO2zڹ�h8^�扷3�|_��m�|D_���m�|C^��ri�/@,[SC
D
!+#!2#32>54.#nB���r�m6J�υtJ�U�X."DhE���6d�Vq��M�4]�L:\A#d����0P�BK�PX@SCSCD@kSCSDY�(((%&+#"&'#".546$324.#"32>�3^�R!�"5�6q<�ӕOr���ӕO�8g�]vƎP8g�]xƎO2yظ�4�w^�扷3�|_��m�|D_���m�|C^��rU�#7@4B[SC
D#",!+#!2#"'.#32>54&#vJ��yr�m54b�W 5�1��
"%/D�U�Y-��Y���0YNW�wS&��(���0WwGms����==@:=BhfSCSD;9(&#!#"+#".#"#"&'7>3232>54.54>32�&;T?@dE$0NeheN0F��t��AB,DdKEoM*0NcicN0@x�ln�9�#)#(E\54G3')2JhJf��PeVY-7-,NmB7I2%&0JlOX�|JTI{�� @QC
D+!#!7��Y����W��������$�#@ CSD+%2>73#".5473vP�eAk�jc��{o�w>j�k'Ko�>m�Zi��{ӛXH��j-/i��&K|Z1|W�@BC
D, +32>7>;#|���%��7��� M**L!�g���,!@'
BC
D,> +32>7>;2>7>;#.'#���
�$+�

�'�����
�/���
( <��
:  :��gO&&������@BC
D'"(!+	3267>;	#"&'+�	
l��z���
�Q$�������l��
q
��$y��@BC
D,"+#32>7>;�G�G����
}!�=��;^��44>��$@!QCQ
D+!!7>7!7�	����"	l�7�<�l�;��!��W�'@$[OQE!#+!+32!�W�ř��C��	l��q�	@kD# +32#"&'lI +iH2�"�9" ���)�'@$
B[OQE!#+!!7>;#"&57�X�	����C80��@
BkD+!+3#"&'.'+>rg��
����z`+,+��������X@MQE+!7��+�ttM���	@kD		+2#"&'�
kc���0���+^@ BK�"PX@SCS
D@SC
CSDY@
$!++*' +!#"&57#".54>322>7.#"0\#$S]f7<bE&-St��ZA{<��1^TI++<pbP9 $�@hI(/[�VZ��]3��=l�Y\'Fat�E�O����,�K�"PX@ B@ BYK�	PX@CSCTDK�"PX@CSCTD@!CSC
CTDYY@$",,(%+33>32#"&'#"32>54&O��X&X`h6��"?Ym�FQ�*
�0b[P &j74\L<)V��4=eF'��R���_6D?Au<j�W��6-,Kes{<w|<��b/d�BK�	PX@$hfSCSD@$hfSCSDY�%(#%($+%#".54>32#".#"32>3234]^e:X�[/M��rd�38+A3E{\58Q6-F6)!,�9L-<m�\{�hGDC
K��f>eG'!65���*s@ BK�"PX@CSCS
D@!CSC
CSDY@$"**
+!"&57#"&54>323%2>7.#"�#&Zck7��"?Ym�FJ{+E���90a[O!&j6OY0V$�AjK)��R���^6:6-�?�;i�V5,^��Yw};��q*9b@
0BK�	PX@hSCSD@hSCSDY@,++9,9*&%*+32>32#".54>32%">54.q6���uv0K;-& ,3afo@W�`4!?[u�QMpH#��?jR:��d #8BoYB��#75K2:k�^N��xW2,DRB4[{G19B$' ?���#g@
BK�2PX@"SCQCQD@MWSDY@
##T%#++'.5737>32#"&#"3ve.KF�d�AcI>3	+I8&�a���KW
NbW�]0\8ZA]������;K^�@9$BK�PX@+	[[CSCSD@.h	[[SCSDY@=<[YSQEC<K=K4320(&
+#".54>32.5467#".54>32!2>54&#"4&'.#"32>0"(")1)Bz�mW�e7R��Y$G#	&^<:eL,5f�bnQ~	
�~6R9YN6R8W
6_*RxN&yoBmM+�2PD<<?%*DHU:Gb9$B]8OrJ")B)&JoJH�mB4;9��/M`1XZ,J^3Z^�-	0?"HL#:NO��,@)BCSC
D&#+33>32#>54&#"O��SO�es|L�L=B-_ZNA��Tvy��+�{�%RP1ZN��_��GK�	PX@SCC
D@SCC
DY@

+##".54>32�z�z�#,,!",,#���>-##-.##/�g����(Y�	BK�	PX@SCCSD@SCCSDY@%#U%+#"&'7>323267#".54>32��-LiC#2GE
��#-+!"+,#���=iN-

`
IQ@>-##-.##/N��0@-B\CC
D%(%!+3267>;#"&'.+#�jO��y0���
";�����W�s
 ����X��@C
D+33X�����?G�0Z@BK�"PX@SC
D@CSC
DY@00&%$$!	+332>32>32#654&#"#>54&#"GzY<K�cgbL�hpoL�L2;+VPEA�M/;0YOD?�<�~�������2�{�1(KG+S{P���0GD0[�R��G�P@
BK�"PX@SC
D@CSC
DY@&$!+332>32#>54&#"GyY<Q�mq}L�L=A0c\O:�<���*�{�%RO4_�S��7���#NK�	PX@SCSD@SCSDY@##	+%2>54&#"".54>32�IxT.nhJwT.mYS�d8P��nS�d8P��}P��_��O��_���9l�d��b9l�c�c���+�@BK�	PX@SCSCDK�"PX@SCSCD@!CSCSCDYY@#!++(&!+32>32#"&'"32>54&�Y<&Zcl8��"?Ym�FK|*6�0c\O &k74\L<)V��M<�BkL)��R���_6;7�E�<l�W��7-,Kes{<w|0���0b@%
	BK�	PX@SCSCD@SCSCDY@
 )&0 0*, +#"&54>5#".54>322>7.#"p ;#PZb4<bE&-St��ZA{<��0]TH-+<pbP9 ��%�;^C$/[�VZ��]3��<j�Wc'Fat�E�G��,@)
BSC
D#*!+332>32&#"GzY A�Y** /,a�38��������*
��99@69BhfSCSD/#%/#"+#".#"#"&'7>3232>54.54>32�!/D0-J6>^m^>7g�Za�/, 0I81O7>^l^>3`�V[�2S,;!/8)&:ZHF�a:E6D
#2C&3<(#7XI@w\7=4_���>0b�+BK�2PX@#jhQCSD@!jh\SDY@	%#(+&+74>7#"&54>?>;!!32>32#"&�?q
�K^,
��=/)(	%0}?ap�$:/�9����)231	U+1j`����#L�BK�"PX@CT
D@C
CTDY@##*!&+32>73#"&54>57#"&5467bL=B.a[N?�zX"Q�jq}L��|$RP2\�P�"("Q����*�K��@BC
D, +32>7>;#K��:�����t%J$$I&��Q��. @'BC
D*!,< +32>7>;2>7>;#"'.'+Q�]Jq
��W�{
�����t#A  A#��p#B! C#��"�! �R"����@BC
D(")!+32>7>;	#"&'+h���
�����
��
�!���/�+�����Q����@
BCD,"!++32>7>;<)�����	@���)����*+Y�@QCQ
D+!!7>7!7!P����6	K���#�&�J
#ߌ1��Y�E7@4&:B[[OSG=;303++4&#72654.54>;+";2#".54>�85
JI-Y�V1	
'B/"3;5@#C=
2EfC" & �4Bhw|575a�i7MEoQ;?<MgA![?<rsu?FU%(Gb:Bxsq���5�@QD+3#����������G7@4<(B[[OSG?=525++3"+7>;2>5<&454>7.54>54&+"&54>5732�85
JI-Y�V1	

'B/"3;5@#C=
2EfC" & 4Bhw|575a�i7M

	EoQ<?;LhA![?<rsu?FU%(Gb:Bxsq9��9@6jkO[SG
+2673#".#"#4>32�AI�%Ef@4f_V$AI�%EeA4f_VeUFCpP, '!TGCpP-!'!����
!&@#SCQD

+>734>32#".�C

hB."--""--"��-UW\45\VU-���."".-""-��&�/8�@%BK�	PX@.jhfkSCSD@.jhfkSCSDY@
##'#+.54>?>;#".'>32+�R�`4M�ф"@-R}04+=*�@[?*	'!S`i6!@�tj�Z�]0
	Dq�`~מ\��?1<	��"<#6&����Dv���>?@<+Bh[SCS
D&&%#%&"	+#!>3!#!7>7#7>;>32#"&'.#"!z�Y	60<�	
�;#9+$�q!P��mT{X9K#2H4AkQ3 ���Kj*I
p
/C..F	^�zF&B[5,

0$+OpE��F��+`#7?@<!B
@ ?WSD42*((+467'7>327'#"&''7.732>54.#"!�[�,h:9f+�Y�"!�[�,h99e,�Z�!�#>Q//S=$$=S//Q>#�9e,�Z�"!�[�,g:9f+�\�!!�[�,g:.Q=$$=Q./R>##>R~��"8@5
B
Z	YC
D"! ,!+!32>7>;!!!!#!7!7!�6�ʐ�
	_"��6��
V��'�'��
V
��p'��!:; =��cic��Aci���5�@YQD+3#3#����������;���FVA@>FTL;!BhfWSDDB+)&$#!+#".#"#"&'7>3232>54.5467.54>32>54.'R!/B0/K6DfvfDY_%-6f�^a�00	!0I:2O7)BUYUB)ag%.3a�W[�/��:Zn3:26Ug1E9�.>".A88JdH[�)!U9J�`7D6B
"3E))<0(*0?R8Y�'"X>AvZ5>6��/B82V51D70#P^���'@SD((($+#".54>32#".54>32? )(() g))))((**((**]���+Ga�@
BK�	PX@5h
f[[		SCSD@5h
f[[		SCSDY@\ZPNB@42(&+++2#".54>32#".#"32>%4>32#".732>54.#";		<9�tb�s?Dz�bm�9.2M:GpP**Kg>?V9!�.4`���ee���_44_���ed���`4e,Qs��XX��sR-c��X��sQ,�@BIDz�de�yCC8A-TxKMyR+�e���`44`���ed���`44`���eY��tS--St��Y��e.Sv���?��-9L@I!Bh[	WSD/.32.9/9%#
--
+"&/#"&54>?6454&#"#"&/>32'26?.04AR%V�j(0"0$6xD,D//�.G$
B\9*H	1 ED(K;&&.6
(2.4G(��P&#m*"����%�%(+77�4�

o ;]4�

o ;���
��
 ����
��
 �>�=K�	PX@_MQE@kMQEY�+!#!�[4�$�9�^ a<�@MQE+!!s��8��^���3IV��>BK�	PX@/h		[
[SCSD@/h		[
[SCSDY@44VTLJ4I4H)!*,,&+4>32#".732>54.#"#!2#"'.#'32>54.+^4`���ee���`44`���ee���`4e,Rr��XX��sR-c�焄�b� ��kj
�!�	Ps8M/+F4��e���`44`���ed���`44`���eY��tS--St��Y��ee���|}z^�
��.
r(:&%8$p��A@MQE+!!~��Aq�'�'@WSD((($+4>32#".732>54.#"�3XvDEwX22XwEDvX3}6I**I66I**I6hCvW22WvCBuW33WuA*I66I**J77J3PK�<@9jhZMQE
	+!!#!7!!!�/��e-�-�j�/����D������r�{�$����d-9@6+	Bh[SD(&#!
--+26;2!7>?>54&#"#"&/>�`m0?"�2*��
�6(6**A!C�ddS,HA<�*�89:-0+2ji�|�d:S@P6Bhh[[SD31.,('&%::	+2#".'763232>54&#7>54&#"#"&/>�.K5�980Nd48Q7"	:
+!"5%FV[S5,2=@5HWd->$�-E7<]?!1G/!%011Y=>,-.+4P4���	@kD	#++7>3��f�"��������%2@/BCT
CD%%'%!&+32673#"&=#"&'#"&5<7\SVQF�=]�|gF�PA^#U %��Y
RYJB�
lHC/+$H �� k�7��*@'hiSD+##!#".54>3�ܵ���붝j]�i9H��q���7�7]2Z~MZ�tC����@OSG($+4>32#".�)67((76)Q8((86))6��w
�K�PX@B@BYK�	PX@^TDK�PX@jTD@jjTDYY@
+232654&'73#"&'76E(+GB:k JC!;Q0&B�	(#	�R?.$9'5��z^N�
BK�2PX@jjQD@jjMRFY�$+37#"&/733!�6
y �hNy�u��,\		6���]�<��!)@&WSD!!	+2#".54>2654&#"�:]A"0UxH;^A#0Wy
ZYA?2E+@�%Ea<R�]2%Eb<Q�]2���uKU&C^8KTw���%�%(+'&54767&'&54?'&54767&'&54?���5
�
	p!;���5
�
	p!;�{

 �|�{

 �k�+1V@S%/
Bhh
Z\	C
D10+*)('&$##!#
+3+#7!"&/3+>;37#"&/733!>73�n
Uj���w��/F�1!G�u�6
y �hNy�u����I��>�] [���,\		6���]�,���\�	7Hb@_B;5Bhh
Z[	CT
D
HGFEDC?=9820,*
77#"
+%+>;26;2!7>?>54&#"#"&/>%37#"&/733!�/F�1!G�`m3C$�2*��
�6(6*/=	
+����6
y �hNy�u5 [�IdS-LC>!�8*�89:-04)
ji<�,\		6���]�z�TZ~@{P
"/
	X
B

h	
	
h

h	[

[\

SC
DZYMKGEA@?>8631+)TT##!#+3+#7!"&/3+>;%2#".'763232>54&#7>54&#"#"&/>>73n
Uj���w��/F�1!G�u.K5�980Nd48Q7"	:
46"5%FV[S5,2@15HW
���I��>�] [->$�-E7<]?!1G/,2%011Y=>,-0%	4P4�c,����u';5@2BhfSCSD(&#,$+#".54>?332>324>32#".u!LWb8DoQ,/IWN:	$u	1HSF/-;!7S<'��!-."".-!�4''HgAQsS<56$��-B:8CV;)?+$."".-""-������&$	O������&$_������&$
O������&$O������&$
O�����-&$P����9@6AYYQCS
D#	+!!!!!!!+!��L�*�:��&�������������$@d����J�K�PX@9=HB@9=HBYK�	PX@0hfSCSC	SDK�PX@0hfSCSC	SD@7hf	hSCSCSDYY@FD<;64/-%# JJ
+232654&'7.546$32#".#"32>32#"&'76�(+GB0r�~Bt��L|fS$@(EmWtʔU:g�UBfN7)	AWߒJC!;Q0&B�	(#	vd�ڀ�6�{2F+N

(/(]���o�{B ' Q^o:?.$9'5��aA�&(	$��aA�&($��aA�&(
$��aA�&(
$��V
�&,	����&,��g��&,
�����&,
E��!,@)YSCS
D!%(!+3!2#!#%4.#!!!!2>S�P�ԕOp��Q�{7f�]��>\
��?2xŎN	�Z�㈷���v��l�yA�n��[����aE�&1���d����&2	���d����&2���d����&2
���d����&2���d����&2
�l�9W�	(+		'	7	9�|8f��nP���g0������]d��]e[]��Z0����%1=g@5*)#
BK� PX@kCSCSD@jkSCSDY�**'(%&+#"&'+.546$327>;.#"%4&'32>�4_���ka�Cm=J�MRr��h�EY`�EJ��+)�2�OvƎP�$"�<0wHxƎO2zڹ�h82/�	T錷3�|;6p�T��a�<.1_��*X�;��&'^�������$�&8	������$�&8������$�&8
������$�&8
���y��&<<��	�����++���,@)\[C
D"( +32+#332>54&#��r�n6J�΅�!���3J�U�X.���6c�Uq��L����a��4]�Lt�3�&�P}@JGBAK�,PX@(hSCSCQD@%hWSCSDY@LKFD=;%# PP+2#"&'7>3232>54.54>54.#"+'&573>�Y~Q&/FQF/+@K@+>i�OY�10	"-@0*G3.DQD.1JWJ1-I4>mU:
l.KF�n(�^���6Se/D`H638&#/)+=XAV�_3E6B"6I*0?.(4H8>XE:@P8;0Ct�U���KW!M\��K��0����&DCi��0����&Dv+��0����&D�"��0����&D�"��0����&Dj"��0����&D�6���GUbG@E?"BK�	PX@5hh

[S	CSDK�PX@5hh

[S	CSDK�,PX@?hh

[S	CSCSD@Jhh

[S	CS	CSCSDYYY@&WV\[VbWbQOIHCA<:75/.(& 
	GG+232>32#"&'#"&54>7>54#"#"&/>32>32>7">54&]<fK*7��zl1K;-&,3afo@i�' Ydj1��@���<U?0W�hlz<���x�g-NA4]K4	�<bI2��c(K%BY39lU7

��#74L1rr>W8wxG�c>(�!)!7QP`UT^��%<Q2HE%JoJ�-TvH$3@$9D<��bI�K�PX@6<GB@6<GBYK�	PX@0hfSCSC	SDK�PX@0hfSCSC	SD@7hf	hSCSCSDYY@EC;:42-+#!II
+232654&'7.54>32#".#"32>32#"&'76(+GB2JqL'M��rd�38+A3E{\58Q6-F6)!,/TTW1JC!;Q0&B�	(#	y
Ck�T{�hGDC
K��f>eG'!63H-<?.$9'5��;��q�&HC���;����&Hv���;��q�&H����;����&Hj���=��&�C���_u�&�v���"^�&�����/w�&�j�<����1E6@37-B10@[SD32=;2E3E+)!+.54?.'&54?7#".54>32.'2>7.#"��)`7%X�F�qQ^F�ȂR�e8E}�ia�0LL�!AoX>	&<U9KwR+"=S)		^%
7@3|9	ST���k9k�_l��U[\��E���3l�v,Q?&<i�QCjI'��G��&Q����++��7����&RC����++��7����&Rv����++��7����&R�����++��7����&R�����++��7����&Rj����++s�A~'+@([YOSG(&(%+!!4>32#"&4>32#"&���B�&2'&21;X&2'&20<��2&(1$>�f2&(1$>���%)4�@32#"BK�	PX@!CSCSCDK�PX@!CSCSCDK�PX@!kCSCSD@!jkSCSDYYY@+**4+4&$+"'+7.54>327>;&#"2>54&'�|Z$:C�(+P��n}["  Z�'+P�����8NJzY1�I{Y1
�F7=1�5�X��b@.�5�W�c�YBZ-L���sM��g,K ��,��`����&XC����++��`����&Xv����++��`����&X�����++��`����&Xj����++��Q����&\v����++%����,p@ BK�	PX@!CSCSCD@!CSCSCDY@$",,(%+3>32#"&'#"32>54&%ݰY&X`h6��"?Ym�FK{+.'0b\O!&k74\L<)V���4=eF'��R���_6;6��&�<j�W��6,,Kes{<w|��Q����&\j����++������'0�K�PX@
-B@
-BYK�PX@!ZC
C	SD@(	hZC
CSDY@)($"''
+2#"&5467#"&'!+3#32>!.'�
Y0LRVB
N���	%���_-&( ���
�@F:?n)^����g!*3 '	�QB&&C0���4F(K�PX@&;BK�"PX@&;B@&;BYYK�	PX@#SC	SCSDK�PX@#SC	SCSDK�"PX@*hSC	SCSD@.hSC
C	SCSDYYY@65?<5F6F1/('$"44
+2#"&54>7.57#".54>32#32>2>7.#">
Y0LR*:"$S]f7<bE&-St��ZA{<y-&( �C1^TI++<pbP9 �@F: =81�@hI(/[�VZ��]3�,!*3 '	\=l�Y\'Fat�E���d����&&���<��o�&Fv����++a��A�%�K�PX�B�	BYK�PX@*YQCQ
C	
SD@1
		hYQCQ
C		SDY@" 
%%+2#"&5467!!!!!!#32>G
Y0LRVB���/��<��=ui-&( �@F:?n)������!*3 '	;��qAP�K�PX@G2B@G2BYK�	PX@*h	SCSCSDK�PX@*h	SCSCSD@1hh	SCSCSDYY@CBBPCP><0.)'
AA
+2#"&5467.54>3232>3232>">54.I
Y0LRI9U�_2!?[u�QMpH#6���uv0K;-& ,M�T+$( ?jR:��d #8�@F::f(<j�]N��xW2,DR%BoYB��#7P]!)2 '	Y4[{G19B$' _��@C
D+#�z�z�����!@
BCR
D+%!!76?3�m��=7�E��Y�&�}���-`�
W�Lb�@BC
D+4?37#L�N�F��\�T��D��Jf!I��E��aE�&1���G��&Qv���++d����2'@
BK�PX@"YS
C	S
DK�PX@-YS
CS
C	S
DK� PX@*YSCQ
C	S
DK�"PX@4YSCQ
CS
C		S
D@2YSCQ
CQ
C		SDYYYY@/-%#(#+!!!!!7#".54>324.#"32>���;��=q��Z��u��Fh���K�kS h/Z�Sm��I0[�Sm��H�������r~\�ㇹ6�~&Ge?��j�|Dc���k�|Cb��.���4FU�@
L2"BK�	PX@$hS	C
SD@$hS	C
SDY@ HG65GUHU><5F6F0.&$ 44+232>32#"&'#".54>32>2>54&#"">54.�AhJ'8\��~ym0K;-&,2afp@i�'E΁QzQ)U��kk�#?��IQ}U+]aN|X/.JH;fP8��h&'="?X5)LC;0&
��#74L1tsny;e�H���Xe[Zf�vN��qs�L��y/VB(.YQ3:A!*!�����&6���
��#�&Vv���++������&6���
��,�&V�~���++��y��&<
<��	�����++����&=8��Y�&]v����++���&=8��Y�&]�����++����&=8��Y�&]�����++��i�'6@3
BYSCSD''#"+#763>7'.546767376$3#"!��2���:.UH8���*0�/UI9+G�!˹[7:^E�	
�ſ_;^E�}Q���@BkD, +#"&/.'+3�rd�w����	q���@BkD( +32?>;#qxd
�s��������p��Aq���� @WD
	+".5467332>73r>V6y4B'6#z&Eg�!:M-
3?)9!6aI+��@SD($+#".54>32#.-""-.#:-""-/##/�kJ�=K�PX@WSD@[OSGY�$&($+4>32#".732654&#"� 7H()I8  8I)(H7 d6/-77-/6#*D22D*)D00D),88,-88/��t
YK�PX@B@@B@YK�PX@
SD@jSDY@+2#"&54>732>R
Y0LR.@%W-&( �@F:"@:2
!*3 '	h���QK�*PX@WSD@O[SGY@	+273#".#"#>32�Ai!2B% 5-) (j"3A%!4-()X/M7#-,.N8#��)�	#@ SD




	#++7>3!+7>3�H�"��S� ������������!Y�BK�(PX@SCS
D@SC
CSDY@! 6##++#!#"&'7>3267#7>3�"|l�k��O�z=<;N��D#��u�}w�H	?C�?
���@MQE+!!����}�o�@MQE+!!���7�}�����(+.5467�j^/	!

�%J%d�L	
09@"6
�����(+'&5467>54&'&547pj^0	!

�%J%d�L	
08@#6
����(+7'&5467>54&'&547�j^0	!

�%J%d�L	
08@#6
����1�(+.5467.5467�j^/	!

�j^/	!

�%J%d�L	
09@"6
*%J%d�L	
09@"6
����1�(+'&5467>54&'&547%'&5467>54&'&547yj^0	!

�j^0	!

�%J%d�L	
08@#6
*%J%d�L	
08@#6
�����1�(+7'&5467>54&'&547%'&5467>54&'&547�j^0	!

�j^0	!

�%J%d�L	
08@#6
*%J%d�L	
08@#6
�����%,@)BCSCD$&$"+>3632>32!#"&'!�,*?�G#)33#P$KIF &!��6H0+u6���/��,
	)
�D���B����9E@B)!("B[C	SCD98'%#&$"
+>3632>32!!#.'#"&'#"&5<>7!!�,*?�G#)33#P$KIF &"��Pj.*?�G!0+O$KIG&!kP���/��,
	'(�v:/�/�
(�����,K�PX@SD@OSGY�($+4>32#".�:e�LM�e;;e�ML�e:SM�e;;e�MM�d;;d�-��,�';@SD((((($+74>32#".%4>32#".%4>32#".-"--""--""--""--"!..""..!n."".-""-."".-""-."".-""-Z����'1EYm��K�PX@+[	[SC
		S

DK� PX@/[	[SC
C
		S
D@3[	[CSC
C
		S
DYY@~|trjh`^VT((%#&((($+#".54>324.#"32>>;+#".54>324.#"32>%#".54>324.#"32>�;`{A8^C%6]}F8^C&�$1(G4$1'G5w|��
~:`|A8]C%6]}F8]D%�$1(G5$1'G6):`{A8^C%6]}F8]D%�$1(F5#1'F6xc�j7)MoFc�k8)NpH2H."JsQ1E-!GqU��
�c�i7)MnFc�l8)NpH2G."JrQ1F-!HrRc�i7)MnFc�l8)NpH2G."JrQ1F-!Hr�����(+7�4�

o ;���
��
 w����(+'&54767&'&54?���5
�
	p!;�{

 �c�	@C
D#"+'+>;?/F�1!G5 [*����B[@X	4	Bh		h
[	[SC
S


DBA?>=<861/"##%%$+3>32#".#"!#!!#!32>32#".'#7367#T�!w��p��;C&6J3M�oT0����d��RoI.ASގq�v>����̎LcWB 4f�`7#H&6��-6-DeqR�ҀcJG�I6�%B@?BhS	CS	D%%!4(
+>7>;#7+"'#32'###7�
�	fGk.�
}.iGg�
�<x;�P

3��rG��RH��Ne��eA�=/@,!BSCS
D=<,**+!>54.#"!"&546767!7.54>32!�5T�i<5a�Re��H*Lj@4�/LxR,0X|��`zȎNAw�f~
(�Jx�pZ�_0B��zMyY:�O%�Tv�Ta��tQ+L��prěl�a A���3HB@?"Bh[SCSD54?=4H5H#*++$+>32#".5467>32>7>54&#"#"&'2>7.#"�'JMT0ItQ,n�݉HwT._��g^�"	e\'C7)
:qdU .I5K{\:]9*8l�c?!���/X~P#sʔVRQ"=9����7o�r-S@'>m�Wgp����@	BCR
D+)3!.'��ԩ���

����9 !9�����$@!QCD+##!##7��Ȳ�ɱȼ����]��]����$@!BQCQD+!!!!7>7	&5<7�R�����A��
��!
���;4�;�A��^�@MQE+!!�[���Ll�"@Bj[
D,'!+!##"&5<>7!2>7>;p���"Ne[n� 
�[ A 7Q=���';OL@IK-B[
	O
	SG=<)(GE<O=O31(;);	''+%".'#".54>32>32%2>7.#"!2>54.#"{3P?1DNX35[C'7\xB3O@2DMX35\D'7]y��!<86$,4!&A1$1S%B1$1!;86%+4�!8K))K8!(KhAR�i=!9K))K9!(KiAR�i<�5E''E4!<T4&:&!<T4'9&4E''E5�{����!(@%BSCSD6'%"+>32#"#"&'7>32>7�)��#A*\n�Og}F D
6Q=,C��Wnu��f�_-
L
:^B����7^@[0!/"B[[	O[	SG42+)&$77

+2>7#".#"'>322>7#".#"'>32@80%(u=4c_\-90%
)wB4d^\81%
'v=4c_\-81%
)wB5c_[W
l0."("i31!)!��
m/-!(!
h31!)!��}kK�PX@)^_	ZMQE@'jk	ZMQEY@

+!733!!!#7!7!7!��}����w��5�}���Pw�S���ʃ����ZP�� @	@MQE+!!�3�-2/��*>��yz�
�z{�
�iP��@
@MQE+%!7!7>7%>7.'%.54657n��>���2/�a�P����z�
�z������"@
BMQE+3	#>7	&'��|��y|�	��
�5���4��&&EF,#&���~�-K�PX@kD@
jaY@	+3v���0>���'s@

BK�2PX@(SCQC
CQD@MWSC
DY@''W%#+#!+'&5737>32#"&#"�y�k�}f.KF�c(�Iz�k''#
SzU1	�`���KX#O8]�n=Z$HnK5>��!�@	BK�	PX@(SCQC
CQDK�&PX@(SCQC
CQDK�2PX@,CSCQC
CQD@$MWCSC
DYYY@!!#!%#	++'&5737>32;#.#"3wg.KF�b(�
Bn�aG�5w���-_+u��a���KX!Q7T�pA
�Z$
��7�G��2��5K�0PX@QD@MQEY@	+#2~mQR��U
	�	@ja		+2#"&/����
�
����'@OSG((($+#".54>32#".54>32P%##%X$$$$�$$%%$$%%�(��@MQE+!!�4���f
�@ja
#++7>3����
��
�	
f
��@Bja& +#"&/+73ǃr�	���
kk��
��@Bja!+#'327>3�ƒr�	���kk����(@%jOSG
+"&547332673�syo�NOp,Ie�^^c><4T< *@OSG($+#".54>32"-,!!,-"�,!!,,"",��V-!@[OSG$&($+4>32#".732654&#"�4D&'E44E'&D4Y6/-77-/6{'B//B'&@..@&+99+-88���1@.O[SG
+2673#".#"#>32)^.>% 82.'a.>%!82-|*%*G5 -%*H5 �
b�	+@(OSG




	#++7>3!+7>3(�S�'��]�)����

�}��
@kD


+2+�+$<]�

9^I
D��{��_<�	�ʓ^p�ӡ���-	��VO������'-�{����6�G�Z9��(z(�����s�2�a�-����O���/�]�-�D�h���R���-�.+���+}���M���a�dia+aaEdpa6�1���r�a�aoa�dhr�d�r�?{?��|Z�����y|(!�l(������8M�0Ob<5�;]?���$O�_�g�N�XGG�7�0�G

�_`�K�Q����QZ(1X�(���9�{�������~X��;8^=]x�k����a=^8p��3����8;k#�8����kw������������������������d+a+a+a+a6V6�6g6��Eoa�d�d�d�d�d�l�0?�?�?�?��yh�I3�0�0�0�0�0�0�b<�;�;�;�;�=�_�"�/�<G�7�7�7�7�7�s�````�Q%�Q���0�db<+a�;�_�YLoaG�d.�

�

�y|Z|Z|Z�8Q8q8p8�88�8/8h8�x�����������������,�,B���-OZV�VwA��*/�]+A��Y�����xL�=�{����+Z+i����>G>8G8U8�8�88f8�8�8*8�8�8�8g�P`�	�U�������U$�U96:0<-?6D��F��G��H��R��T��m��o��y��}����U��U��U��U��U��U��U�-����������������������������������������������������������U���������-����������U
	�U
��
��
��
�U
$�U
96
:0
<-
?6
D��
F��
G��
H��
R��
T��
m��
o��
y��
}��
��U
��U
��U
��U
��U
��U
��U
�-
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
�U
��
��
��
��
�-
�
�
�
�
�
�
�
�
��U#��&��*��2��4��D��F��G��H��R��T��k��p��������������������������������������������������������������������������������������������
	�U
��
��
��
�U
$�U
96
:0
<-
?6
D��
F��
G��
H��
R��
T��
m��
o��
y��
}��
��U
��U
��U
��U
��U
��U
��U
�-
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
�U
��
��
��
��
�-
�
�
�
�
�
�
�
�
��U��
��
���;#��&��*��2��4��7�59�,:�|<�;?�,Y�rZ��\�|k��l��m�;o�;p��r��y�;|��}�;�����������������������;��r��r�����;�;�;�����;�;�;��	��
��
���^�^��$��7�A9��;��<�@=��?��l��r��|�������������������������@���@���������^���^�^�����
��
���;#��&��*��2��4��7�59�,:�|<�;?�,Y�rZ��\�|k��l��m�;o�;p��r��y�;|��}�;�����������������������;��r��r�����;�;�;�����;�;�;6	��
6
6�A���A������":#��$��&��*��-�i2��4��D��F��G��H��P��Q��R��S��T��U��V��X��Y��Z��\��]��k��l6m��o��p��r6tPuPw��y��{P|6}�������������������������������������������������������������������������������������������������������������������������������������������������������6�6�A�6�6�A��A�����#��#	��#
��#��#
��#��#$��#7��#9��#;��#<��#=��#?��#@��#`��#l��#r��#|��#���#���#���#���#���#���#���#���#��#��#��#��#��#��#��#��#��#���$�J$
�J$
�J$��$#��$&��$*��$->$2��$4��$7�|$8��$9��$:��$<�h$?��$W��$Y��$Z��$\��$k��$l�J$m��$o��$p��$r�J$t�I$u�I$y��${�I$|�J$}��$���$���$���$���$���$���$���$���$���$���$���$��h$���$���$��$��$�h$��$��$�J$�J$�J$�J$��$��$��&��&m��&o��&y��&}��&�&�&�&�&�'��'	��'
��'��'
��'��'$��'7��'9��';��'<��'=��'?��'@��'`��'l��'r��'|��'���'���'���'���'���'���'���'���'��'��'��'��'��'��'��'��'��'���)	�|)�L)�L)�|)��)��)")$�|)-�:)D��)F��)G��)H��)P��)Q��)R��)S��)T��)U��)X��)w��)��|)��|)��|)��|)��|)��|)��|)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)���)�|)��)��)��)��)��)�L)�L)�L)��|-	��-��-$��-���-���-���-���-���-���-���-��-���..
.
.��.#��.&��.*��.2��.4��.I��.W��.Y��.Z��.\��.k��.l.m��.o��.p��.r.y��.|.}��.���.���.���.���.���.���.���.���.���.��.��.�.�.�.�.�.�.�.�.�/��/
��/
��/�;/#��/&��/*��/2��/4��/7�8/9�J/:�h/<�,/?�J/Y�|/Z��/\�|/k��/l��/m�;/o�;/p��/r��/t�,/u�,/y�;/{�,/|��/}�;/���/���/���/���/���/���/���/��,/��|/��|/��/��/�,/�;/�;/�/�/�/�/�;/�;/�;2��2	��2
��2��2
��2��2$��27��29��2;��2<��2=��2?��2@��2`��2l��2r��2|��2���2���2���2���2���2���2���2���2��2��2��2��2��2��2��2��2��2���3	�v3�C3�C3�v3$�v3-�J3D��3F��3G��3H��3R��3T��3��v3��v3��v3��v3��v3��v3��v3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3���3�v3��3��3��3��3�C3�C3�C3��v4��4	��4
��4��4
��4��4$��47��49��4;��4<��4=��4?��4@��4`��4l��4r��4|��4���4���4���4���4���4���4���4���4��4��4��4��4��4��4��4��4��4���5#��5&��5*��52��54��57��58��5k��5p��5���5���5���5���5���5���5���5���5���5���5���5��5��7	�|7�L7�L7�L7�|7�f7�f7"'7#��7$�|7&��7*��7-�872��74��7D�/7F�/7G�/7H�/7J�E7P�f7Q�f7R�/7S�f7T�/7U�f7V�J7X�f7Y�W7Z�7[�Z7\�L7]�_7k��7m�L7o�L7p��7w�f7y�L7}�L7��|7��|7��|7��|7��|7��|7��|7���7���7���7���7���7���7���7��/7��/7��/7��/7��/7��/7��/7��/7��/7��/7��/7��/7��/7��f7��/7��/7��/7��/7��/7��/7��f7��f7��f7��f7��W7��W7�|7�/7��7�/7�/7�f7��7�/7�J7�J7�_7�_7�_7�L7�L7�L7�L7�L7�L7�L7�L7��|8	��8��8$��8���8���8���8���8���8���8���8��8���969	��9
69
69�A9��9�A9��9��9��9":9#��9$��9&��9*��9-�i92��94��9D��9F��9G��9H��9P��9Q��9R��9S��9T��9U��9V��9X��9Y��9Z��9\��9]��9k��9l69m��9o��9p��9r69tP9uP9w��9y��9{P9|69}��9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9���9��9��9��9��9��9��9��9��9��9��9��9��9��9�9�9�69�69�A9�69�69�A9�9�A9�9�9���:::	��:
::
::��:��:��:��:��:$��:-��:D��:F��:G��:H��:J��:P��:Q��:R��:S��:T��:U��:V��:X��:l::r::t<:u<:w��:{<:|::���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:���:��:��:��:��:��:��:��:��:�::�::�:�::�::�:�:���;;
;
;��;#��;&��;*��;2��;4��;I��;W��;Y��;Z��;\��;k��;l;m��;o��;p��;r;y��;|;}��;���;���;���;���;���;���;���;���;���;��;��;�;�;�;�;�;�;�;�;�<7<	�r<
7<
7<�'<�J<�'<�r<��<��<"2<#��<$�r<&��<*��<-�8<2��<4��<D�A<F�A<G�A<H�A<J�W<P��<Q��<R�A<S��<T�A<U��<V�A<X��<]��<k��<l7<m�J<o�J<p��<r7<t><u><w��<y�J<{><|7<}�J<��r<��r<��r<��r<��r<��r<��r<���<���<���<���<���<���<���<��A<��A<��A<��A<��A<��A<��A<��A<��A<��A<��A<��A<��A<���<��A<��A<��A<��A<��A<��A<���<���<���<���<�r<�A<��<�A<�A<��<��<�A<�A<�A<��<��<��<�J<�J<�7<�7<�'<�7<�7<�'<�J<�'<�J<�J<��r=��="#=#��=&��=*��=2��=4��=k��=m��=o��=p��=y��=}��=���=���=���=���=���=���=���=��=��=�=�=�=�=�>#��>&��>*��>2��>4��>D��>F��>G��>H��>R��>T��>k��>p��>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>���>��>��>��>��>��>��?�J?
�J?
�J?��?#��?&��?*��?->?2��?4��?7�|?8��?9��?:��?<�h??��?W��?Y��?Z��?\��?k��?l�J?m��?o��?p��?r�J?t�I?u�I?y��?{�I?|�J?}��?���?���?���?���?���?���?���?���?���?���?���?��h?���?���?��?��?�h?��?��?�J?�J?�J?�J?��?��?��E��E
��E��E
��E@��E[��E`��El��Er��E|��E�E�E�E�H��H
��H��H
��H@��H[��H`��Hl��Hr��H|��H�H�H�H�IEI
EI
EI�I�IlEIrEItdIudI{dI|EI�EI�EI�I�EI�EI�I�K��K
��K
��KY��K\��Kl��Kr��Kt��Ku��K{��K|��K���K���K��K��K��K��ND��NF��NG��NH��NR��NT��N���N���N���N���N���N���N���N���N���N���N���N���N���N���N���N���N���N���N���N��N��N��N��P��P
��P
��PY��P\��Pl��Pr��Pt��Pu��P{��P|��P���P���P��P��P��P��Q��Q
��Q
��QY��Q\��Ql��Qr��Qt��Qu��Q{��Q|��Q���Q���Q��Q��Q��Q��R��R
��R��R
��R@��R[��R`��Rl��Rr��R|��R�R�R�R�S��S
��S��S
��S@��S[��S`��Sl��Sr��S|��S�S�S�S�U�hU�hUD��UF��UG��UH��UR��UT��U���U���U���U���U���U���U���U���U���U���U���U���U���U���U���U���U���U���U���U��U��U��U��U�hU�hU�hY	��Y�rY�rY��Y$��YD��YF��YG��YH��YR��YT��Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y���Y��Y��Y��Y��Y��Y�rY�rY�rY���Z	��Z��Z��Z��Z$��Z���Z���Z���Z���Z���Z���Z���Z��Z�Z�Z�Z���[D��[F��[G��[H��[R��[T��[���[���[���[���[���[���[���[���[���[���[���[���[���[���[���[���[���[���[���[��[��[��[��\	��\�h\�h\��\$��\D��\F��\G��\H��\R��\T��\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\���\��\��\��\��\��\�h\�h\�h\���^#��^&��^*��^2��^4��^D��^F��^G��^H��^R��^T��^k��^p��^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^���^��^��^��^��^��^��k��k	��k
��k��k
��k��k$��k7��k9��k;��k<��k=��k?��k@��k`��kl��kr��k|��k���k���k���k���k���k���k���k���k��k��k��k��k��k��k��k��k��k���l	�Ul��l��l��l�Ul$�Ul96l:0l<-l?6lD��lF��lG��lH��lR��lT��lm��lo��ly��l}��l��Ul��Ul��Ul��Ul��Ul��Ul��Ul�-l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l���l�Ul��l��l��l��l�-l�l�l�l�l�l�l�l�l��Um��m	��m
��m
��m�^m�^m��m$��m7�Am9��m;��m<�@m=��m?��ml��mr��m|��m���m���m���m���m���m���m���m��@m��m�@m��m��m��m�m�m�^m�m�m�^m�^m���o��o	��o
��o
��o�^o�^o��o$��o7�Ao9��o;��o<�@o=��o?��ol��or��o|��o���o���o���o���o���o���o���o��@o��o�@o��o��o��o�o�o�^o�o�o�^o�^o���p��p	��p
��p��p
��p��p$��p7��p9��p;��p<��p=��p?��p@��p`��pl��pr��p|��p���p���p���p���p���p���p���p���p��p��p��p��p��p��p��p��p��p���r	�Ur��r��r��r�Ur$�Ur96r:0r<-r?6rD��rF��rG��rH��rR��rT��rm��ro��ry��r}��r��Ur��Ur��Ur��Ur��Ur��Ur��Ur�-r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r�Ur��r��r��r��r�-r�r�r�r�r�r�r�r�r��Ut	�Tt�Tt$�Tt9:t::t<(t?:t��Tt��Tt��Tt��Tt��Tt��Tt��Tt�(t�Tt�(t��Tu	�Tu�Tu$�Tu9:u::u<(u?:u��Tu��Tu��Tu��Tu��Tu��Tu��Tu�(u�Tu�(u��Ty��y	��y
��y
��y�^y�^y��y$��y7�Ay9��y;��y<�@y=��y?��yl��yr��y|��y���y���y���y���y���y���y���y��@y��y�@y��y��y��y�y�y�^y�y�y�^y�^y���{	�T{�T{$�T{9:{::{<({?:{��T{��T{��T{��T{��T{��T{��T{�({�T{�({��T|	�U|��|��|��|�U|$�U|96|:0|<-|?6|D��|F��|G��|H��|R��|T��|m��|o��|y��|}��|��U|��U|��U|��U|��U|��U|��U|�-|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|���|�U|��|��|��|��|�-|�|�|�|�|�|�|�|�|��U}��}	��}
��}
��}�^}�^}��}$��}7�A}9��};��}<�@}=��}?��}l��}r��}|��}���}���}���}���}���}���}���}��@}��}�@}��}��}��}�}�}�^}�}�}�^}�^}�����J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J�����������J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J�����������J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J�����������J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J�����������J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J�����������J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J�������������m���o���y���}����������������	���
������
������$���7���9���;���<���=���?���@���`���l���r���|���������������������������������������������������������������������	���
������
������$���7���9���;���<���=���?���@���`���l���r���|���������������������������������������������������������������������	���
������
������$���7���9���;���<���=���?���@���`���l���r���|���������������������������������������������������������������������	���
������
������$���7���9���;���<���=���?���@���`���l���r���|���������������������������������������������������������������������	���
������
������$���7���9���;���<���=���?���@���`���l���r���|���������������������������������������������������������������������	���
������
������$���7���9���;���<���=���?���@���`���l���r���|������������������������������������������������������������������	������$��������������������������������������	������$��������������������������������������	������$��������������������������������������	������$��������������������������������������7�	�r�
7�
7��'��J��'��r�������"2�#���$�r�&���*���-�8�2���4���D�A�F�A�G�A�H�A�J�W�P���Q���R�A�S���T�A�U���V�A�X���]���k���l7�m�J�o�J�p���r7�t>�u>�w���y�J�{>�|7�}�J���r���r���r���r���r���r���r�������������������������������A���A���A���A���A���A���A���A���A���A���A���A���A�������A���A���A���A���A���A������������������r��A�����A��A��������A��A��A�����������J��J��7��7��'��7��7��'��J��'��J��J���r����	���
������
������$���7���9���;���<���=���?���@���`���l���r���|���������������������������������������������������������������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
���
���Y���\���l���r���t���u���{���|��������������������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|��������������
������
���@���[���`���l���r���|�����������	����r��r����$���D���F���G���H���R���T���������������������������������������������������������������������������������������������������������������������������r��r��r��������
������
���@���[���`���l���r���|�����������	����r��r����$���D���F���G���H���R���T���������������������������������������������������������������������������������������������������������������������������r��r��r������J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J�������������m���o���y���}����������������
������
���@���[���`���l���r���|������������i�
�i�
�i����9�^�:���<�h�?�^�Y���Z���\���l�i�m���o���r�i�t�}�u�}�y���{�}�|�i�}�����h����������h������i��i��i��i����������
���
���Y���\���l���r���t���u���{���|��������������������������
������
���@���[���`���l���r���|�����������7�	�r�
7�
7��'��J��'��r�������"2�#���$�r�&���*���-�8�2���4���D�A�F�A�G�A�H�A�J�W�P���Q���R�A�S���T�A�U���V�A�X���]���k���l7�m�J�o�J�p���r7�t>�u>�w���y�J�{>�|7�}�J���r���r���r���r���r���r���r�������������������������������A���A���A���A���A���A���A���A���A���A���A���A���A�������A���A���A���A���A���A������������������r��A�����A��A��������A��A��A�����������J��J��7��7��'��7��7��'��J��'��J��J���r����"#�#���&���*���2���4���k���m���o���p���y���}��������������������������������������������������"#�#���&���*���2���4���k���m���o���p���y���}��������������������������������������������������"#�#���&���*���2���4���k���m���o���p���y���}��������������������������������������������������	���
���
����^��^����$���7�A�9���;���<�@�=���?���l���r���|���������������������������������@�����@���������������^������^��^��������	���
���
����^��^����$���7�A�9���;���<�@�=���?���l���r���|���������������������������������@�����@���������������^������^��^�����	�U�����������U�$�U�96�:0�<-�?6�D���F���G���H���R���T���m���o���y���}�����U���U���U���U���U���U���U��-������������������������������������������������������������������������������U��������������-�������������������U�	�U�����������U�$�U�96�:0�<-�?6�D���F���G���H���R���T���m���o���y���}�����U���U���U���U���U���U���U��-������������������������������������������������������������������������������U��������������-�������������������U����
���
����;�#���&���*���2���4���7�5�9�,�:�|�<�;�?�,�Y�r�Z���\�|�k���l���m�;�o�;�p���r���y�;�|���}�;�������������������������������;���r���r��������;��;��;����������;��;��;�	�U�����������U�$�U�96�:0�<-�?6�D���F���G���H���R���T���m���o���y���}�����U���U���U���U���U���U���U��-������������������������������������������������������������������������������U��������������-�������������������U�	�U�����������U�$�U�96�:0�<-�?6�D���F���G���H���R���T���m���o���y���}�����U���U���U���U���U���U���U��-������������������������������������������������������������������������������U��������������-�������������������U����
���
����;�#���&���*���2���4���7�5�9�,�:�|�<�;�?�,�Y�r�Z���\�|�k���l���m�;�o�;�p���r���y�;�|���}�;�������������������������������;���r���r��������;��;��;����������;��;��;����	���
���
����^��^����$���7�A�9���;���<�@�=���?���l���r���|���������������������������������@�����@���������������^������^��^��������
���
����;�#���&���*���2���4���7�5�9�,�:�|�<�;�?�,�Y�r�Z���\�|�k���l���m�;�o�;�p���r���y�;�|���}�;�������������������������������;���r���r��������;��;��;����������;��;��;����	���
���
����^��^����$���7�A�9���;���<�@�=���?���l���r���|���������������������������������@�����@���������������^������^��^��������	���
���
����^��^����$���7�A�9���;���<�@�=���?���l���r���|���������������������������������@�����@���������������^������^��^�����	�U�����������U�$�U�96�:0�<-�?6�D���F���G���H���R���T���m���o���y���}�����U���U���U���U���U���U���U��-������������������������������������������������������������������������������U��������������-�������������������U��J�
�J�
�J����#���&���*���->�2���4���7�|�8���9���:���<�h�?���W���Y���Z���\���k���l�J�m���o���p���r�J�t�I�u�I�y���{�I�|�J�}�������������������������������������������������h����������������h��������J��J��J��J���������������Z,�
Bz�(Zt��J�B��N�		r	�
.
^
�
��z�
 
P
z
�2���>|���Lr��F���(Hx���X�d�`���(���t�(�.l�R��@���f|�@@�   �!!l!�"&"l#<#�#�$,$F%%%b%�&&�&�&�'2'^'�((Z(�)")�*�*�++++$+0+<+�,n,z,�,�,�,�,�,�,�--*-6-B-N-Z-f-�. .,.8.D.P.b.�/R/^/j/v/�/�/�0�1�1�1�1�1�1�1�1�2
2�2�2�2�2�2�2�3L444*4<4N4`4�4�5�6|6�6�7"7�88P8~8�8�9~:8:D:T:`:p:�:�:�:�:�:�:�;8;h;�;�;�;�<J<�<�=,=�=�=�=�>>H>�>�?4?�@@:@�A�A�A�BB�CCxDD0D\D�D�D�E�E�FRF�F�G0GpG�HH�H�IIJIdI�I�I�JJ:JzJ�J�K�b"/n�	�n���)��(��0�+	C
�R.2F
�x:	T	h	p	R|	�	P�	�	`4	0�		�	
��	0
�	d
�	
�.	4�Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1.LatoItalictyPolandLukaszDziedzic: Lato Italic: 2013Lato ItalicVersion 1.105; Western+Polish opensourceLato-ItalicLato is a trademark of tyPoland Lukasz Dziedzic.tyPoland Lukasz DziedzicLukasz DziedzicLato is a sanserif typeface family designed in the Summer 2010 by Warsaw-based designer Lukasz Dziedzic ("Lato" means "Summer" in Polish). It tries to carefully balance some potentially conflicting priorities: it should seem quite "transparent" when used in body text but would display some original traits when used in larger sizes. The classical proportions, particularly visible in the uppercase, give the letterforms familiar harmony and elegance. At the same time, its sleek sanserif look makes evident the fact that Lato was designed in 2010, even though it does not follow any current trend. The semi-rounded details of the letters give Lato a feeling of warmth, while the strong structure provides stability and seriousness.http://www.typoland.com/http://www.typoland.com/designers/Lukasz_Dziedzic/Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).http://scripts.sil.org/OFLCopyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1.LatoItalictyPolandLukaszDziedzic: Lato Italic: 2013Lato-ItalicVersion 1.105; Western+Polish opensourceLato is a trademark of tyPoland Lukasz Dziedzic.tyPoland Lukasz DziedzicLukasz DziedzicLato is a sanserif typeface family designed in the Summer 2010 by Warsaw-based designer Lukasz Dziedzic ("Lato" means "Summer" in Polish). It tries to carefully balance some potentially conflicting priorities: it should seem quite "transparent" when used in body text but would display some original traits when used in larger sizes. The classical proportions, particularly visible in the uppercase, give the letterforms familiar harmony and elegance. At the same time, its sleek sanserif look makes evident the fact that Lato was designed in 2010, even though it does not follow any current trend. The semi-rounded details of the letters give Lato a feeling of warmth, while the strong structure provides stability and seriousness.http://www.typoland.com/http://www.tgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf000064400000416034150403134130024522 0ustar00��	
�����
����������������������������������������������� !"#NULLuni00A0uni00ADmacronperiodcenteredAogonekaogonekEogonekeogonekNacutenacuteSacutesacuteZacutezacute
Zdotaccent
zdotaccentuni02C9EuroDeltauni2669undercommaaccent
grave.case
dieresis.casemacron.case
acute.casecircumflex.case
caron.case
breve.casedotaccent.case	ring.case
tilde.casehungarumlaut.case
caron.salt�������������V��������V�,� `f-�, d ��P�&Z�E[X!#!�X �PPX!�@Y �8PX!�8YY �Ead�(PX!�E �0PX!�0Y ��PX f ��a �
PX` � PX!�
` �6PX!�6``YYY�+YY#�PXeYY-�, E �%ad �CPX�#B�#B!!Y�`-�,#!#! d�bB �#B�*! �C � ��+�0%�QX`PaRYX#Y! �@SX�+!�@Y#�PXeY-�,�C+�C`B-�,�#B# �#Ba��b�`�*-�,  E �Ec�Eb`D�`-�,  E �+#�%` E�#a d � PX!��0PX� �@YY#�PXeY�%#aDD�`-�,�E�aD-�	,�`  �	CJ�PX �	#BY�
CJ�RX �
#BY-�
, �b �c�#a�C` �` �#B#-�,KTX�DY$�
e#x-�,KQXKSX�DY!Y$�e#x-�
,�CUX�C�aB�
+Y�C�%B�	%B�
%B�# �%PX�C`�%B�� �#a�	*!#�a �#a�	*!�C`�%B�%a�	*!Y�	CG�
CG`��b �Ec�Eb`�#D�C�>�C`B-�,�ETX�#B `�a�

BB�`�
+�m+"Y-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-�,�	+-�,�+�ETX�#B `�a�

BB�`�
+�m+"Y-�,�+-�,�+-�,�+-�,�+-�,�+-�,�+-� ,�+-�!,�+-�",�+-�#,�	+-�$, <�`-�%, `�
` C#�`C�%a�`�$*!-�&,�%+�%*-�',  G  �Ec�Eb`#a8# �UX G  �Ec�Eb`#a8!Y-�(,�ETX��'*�0"Y-�),�+�ETX��'*�0"Y-�*, 5�`-�+,�Ec�Eb�+�Ec�Eb�+��D>#8�**-�,, < G �Ec�Eb`�Ca8-�-,.<-�., < G �Ec�Eb`�Ca�Cc8-�/,�% . G�#B�%I��G#G#a Xb!Y�#B�.*-�0,��%�%G#G#a�E+e�.#  <�8-�1,��%�% .G#G#a �#B�E+ �`PX �@QX�  �&YBB# �C �#G#G#a#F`�C��b` �+ ��a �C`d#�CadPX�Ca�C`Y�%��ba#  �&#Fa8#�CF�%�CG#G#a` �C��b`# �+#�C`�+�%a�%��b�&a �%`d#�%`dPX!#!Y#  �&#Fa8Y-�2,�   �& .G#G#a#<8-�3,� �#B   F#G�+#a8-�4,��%�%G#G#a�TX. <#!�%�%G#G#a �%�%G#G#a�%�%I�%a�Ec# Xb!Yc�Eb`#.#  <�8#!Y-�5,� �C .G#G#a `� `f��b#  <�8-�6,# .F�%FRX <Y.�&+-�7,# .F�%FPX <Y.�&+-�8,# .F�%FRX <Y# .F�%FPX <Y.�&+-�9,�0+# .F�%FRX <Y.�&+-�:,�1+�  <�#B�8# .F�%FRX <Y.�&+�C.�&+-�;,��%�& .G#G#a�E+# < .#8�&+-�<,�%B��%�% .G#G#a �#B�E+ �`PX �@QX�  �&YBB# G�C��b` �+ ��a �C`d#�CadPX�Ca�C`Y�%��ba�%Fa8# <#8!  F#G�+#a8!Y�&+-�=,�0+.�&+-�>,�1+!#  <�#B#8�&+�C.�&+-�?,� G�#B�.�,*-�@,� G�#B�.�,*-�A,��-*-�B,�/*-�C,�E# . F�#a8�&+-�D,�#B�C+-�E,�<+-�F,�<+-�G,�<+-�H,�<+-�I,�=+-�J,�=+-�K,�=+-�L,�=+-�M,�9+-�N,�9+-�O,�9+-�P,�9+-�Q,�;+-�R,�;+-�S,�;+-�T,�;+-�U,�>+-�V,�>+-�W,�>+-�X,�>+-�Y,�:+-�Z,�:+-�[,�:+-�\,�:+-�],�2+.�&+-�^,�2+�6+-�_,�2+�7+-�`,��2+�8+-�a,�3+.�&+-�b,�3+�6+-�c,�3+�7+-�d,�3+�8+-�e,�4+.�&+-�f,�4+�6+-�g,�4+�7+-�h,�4+�8+-�i,�5+.�&+-�j,�5+�6+-�k,�5+�7+-�l,�5+�8+-�m,+�e�$Px�0-K�KRX��Y�c �#D�#p�E  �(`f �UX�%a�Ec#b�#D�*�*�*Y�(	ERD�*�D�$�QX�@�X�D�&�QX��X�DYYYY������Dgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf000064400000416034150403134130024522 0ustar00�pBASEe]��0FDSIGGDEF����x�GPOS#f�8�dbGSUB�]��JOS/2���x`cmapspB3fglyfc��[M�Ovhead�ʹ�6hhea3y4$hmtx�s�p�Bloca�ny�A�BmaxpT^X name��s�@�post+���$9	�7
��_<���
��s�0�:($��X�0�0( �*bX��XK�X^2)	 �8ADBO  ����`��� X#	J6F\i,@J;Dk:B&K&F2@8=HC/7R4HO*L2#H/H/t51>%F																							������	J66666FFFF\\\\\\\\^\\\\F\\\\,,,,,,,,,@@@@JJJJJJJJJJJJ;DDD[kkk*k��k:::BBBBBBBB&&&&&&&&&&&&&&&&&&&&&&&&FFFFFFF22222222@@@@@@@@@@@@@@@@@@@@@@@@888888I2AJ&.=============='========HCCCCC"////7777777777777777744444444���HH HOOOOOOOOOOOO*LLLL2222222###HHHHHHHH��/////////////////////////tRttaa/55555555=R1111111>>>>>>>>>>>>>>>>>>>>>>>FFFFFF/HH*A��BHHH4C//6/n7F0/*1/@<HHHOO2)2)y#��HJ/444ttJJ5++21��'>!FF4��2E29C/B////////////////////////////////QQQQQQQQQQQQQQOQOQQQQQQQQQ��QQ	Jl\8@&JD:BB&@K?������J����*H5FVA7=I"@;3
H/2>)IH9*FA==3>>=>I0Jt)�������h�������jijs��noh������}����	JJl\.@@E��:@&@K6@-"J\\l72JJ;��E@?&l2.E@6,>J	��\2@&&=<Tt70IIM%H/HHC2%H@##&Q5"77tC5OO*��$MIK /%x/0MHC %@H2=77I////CQQQ��8O3*#.<>=58O8O3*#.<>=58O8O3*#.<>=58O��������bg�R��3E�E���*;FFFPP��v��zZ��zZ|Y�<<>�c�~�hjiJ�J�@YYG0w><@\�h�h�h�h�he��FT|||@���������������������������������������������������������������������0��������t&|���������������>$@C-`.OC[C5OY##4

5FFTF�FFtbFFFVF44FFIF����p�@<��}!	B,;J
]>Gf
��J<9'H55AADDAA00
��,7����5�����������.���J#��������Z}�uu���}�nm�������.}�����u�nf�������z��mt��wx����u��B9���������"������m���������u��n�J���k�nf�0�c��h��o�������/����������������uzsi�jj�������!!��������������������������������������������������������������������������������������������������������������������KK����^�^^�������^^�������^^������������������������������������������,����
,,5��>A����$�,$
��	����Rkl���������mnopqrstuv�������	

������ !"#$%&'()*+,-./012345����:=R^���
*)+-KJLNipoqsr������VS����������M�����T������&(u�����W�����o69�������������hU������l8_7a]��~������U�������������/9@Z`z~�������������7C\ghnv{~������������������ *,14=E_auz~���������������/_cu��������������CIMPRX[���!+;IScgo���������    " & 0 3 5 : ? D I q y  � � � � � � � � � � � � �!!!! !"!&!.!^!�!�!�!�""""""""")"+"7"H"a"e###!%�%�%�%�%�%�%�%�%�%�&&&<&@&B&`&c&f&k''R'd'�..%������ 0:A[a{�������������7CP^hjox}���������������gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf000064400000416034150403134130024522 0ustar00^bfprxzz||xz�����������������������������������������Rkl��������������������������o�VSQT����&���������������(�mno�6789:=MR]^_a~������������������
)*+-JKLN�iopqrs���������;<	@
S T!V#U"W$[(b.c/d1e0`,p<q=r>s?xC}I�M�O�T�Q�U��V�WZ�[�]�\�b�a�f�j�hn���t��u����������������������������������������������Ww����?�P�v����������Ot@�wo;�g>N�����������������������������2:?A��������H4;@I��	
 "-./02467�C#JE��v�wxy|~�z}�������������������JKLMNOPQRS	T
UVW
XYZ[\]^_`abcd*,-358<=QX%Y&Z'n:uAzEyD{G|H�X�Y�^�_�`�c�d�e�k�l�m������������������������������������F�ABCDEFGHIJKLf2g3h4i5j6k7l8m9�R�S�x�y�z�{�|�}�~����������������������������������������������������������������l��������1��6gY]Uebck�x}~pqrstuvwyz{|����������������������������������������������������������$�  !!�""�##�$$R%%k&&l''�()�**�++�,,�--�..�//�09m:;�<<�==�>>�??�@@�AZ[[�\\�]]�^^�__�``�az{{�||�}}�~~���o�����V��S��Q��T��������������&��������������������������������������������(�����m�����6��=��M��R��]��a��~�������������������������������������
������)��-��J��N�����i��o���������������������;<	@
S T		!

V#U

"W$[(b.c/d1e0`,p<q=  r!!>""s##?$$x%%C&&}''I((�))M**�++O,,�--T..�//Q00�11U2233�44�55V66�77W88Z99�::[;;�<<]==�>>\??�@@bAA�BBaCC�DDfEE�FFjGG�HHhIInJJ�KK�LL�MMtNN�OOPP�QQuRR�SS�TT�UU�VV�WW�XX�YY�ZZ�[[�\\�]]�^^�__�``�aa�bb�cc�dd�ee�ff�gg�hh�ii�jj�kk�ll�mm�nn�oo�pp�qq�rr�ss�tt�uu�vv�ww�xx�yy�zz�{{�||�}}�~~������\�����W��w����������������?�������P�����v��������������������������������O����t��@�����w��o��;�����g��>����N������������77�CCPPP�QQ�RX�Y\�^g�hh�jj�kn�ov�x{�}~����������������������������0��2��:��?��A�����������������������������������������H��4��;��@��I��	
		

 " $#&-''2((4)*6,,8.1944=9=>@@�AABBCCC#DDJEEE__FaaGtu�zz�~~���������v�����w��{��|��~�����^��o��z��}������������������������������������������������/�0_bb�ccJrrssKttuuL����M����N����O����P����Q����R����S��	��T��
��U����V����W��
��X����Y����Z��[����\����]����^����_����`����a����b����c����dCC)GG*HI,MM/OO3PP5RR7VV8WX<[[>��+��.��BQX

%Y&Z'n:  u!!A$$z%%E&&y''D(({))G**|++H22�33X44�55Y66�77^88�99_::�;;`>>�??c@@�AAdBB�CCeDD�EEkFF�GGlHH�IImRR�SS�XX�YY�ZZ�[[�\\�]]�^^�__�``�aa�bb�cc�ff�gg�ll�mm�nn�oo�~~����������������������������������������������F��������A����B����C����D����E����F����G����H����I����J����K����L����f��2��g��3��h��4��i��5��j��6��k��7��l��8��m��9�����R�����S�����x�����y�����z�����{�����|�����}�����~���������������������������������������������������������������������������������������������������������������������������������������������  p  �  �  �  �  �  �  �  �  �  �  �   !� " "� & &� / / 0 0l 2 3� 5 5� 9 :� < <� = =� > ?� D Dh G G� H H� I I� p p� q q1 t y� } ~�  6 � �� � � � �F � �X � �g � �Y � �Z � �\ � �] � �U � �d � �^ � �` � �e � �b � �f!!�!!�!!k!!�! ! �!"!"�!&!&�!.!.�!P!Px!Q!R}!S!Zp![!^y!�!�!�!��!�!��!�!��!�!��!�!��""�""�""�""�""�""�""�""i""�""�""�""�")")�"+"+�"7"7�"H"H�"`"`�"a"a�"d"e�##�##�##�# #!�%%�s%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��%�%��&&�&&�&:&;�&<&<�&@&@�&B&B�&`&`�&c&c�&e&e�&f&f�&j&k�''�'R'R�'d'd�'�'��..�.".%����������������������**M�����'<Qp����4p���W����J}��<_ju����)X���0K�����&1<G������		
		&	1	<	G	R	`	�	�	�	�	�	�	�



$
/
:
E
M
~
�
�
�
�
�
�
�
�	*5@KVdoz�������$/;Fit��������



)
4
?
J
V
a
l
z
�
�
�
�
�
�
�
�
�
�$/:EP[fq|������
Xcny�����*5@KYdoz��������
 +EP[fq|�������"-]hs~�����������
#.9DOZe���;br}�������*5�����������r}�������@KVa��������4?JU`kv������������	 +7Bmx�����������!9DP[ft��������"-hs~������%0;FT_j������ +������������(q�������%0;FQ\gr������� ! , 7 B M X c n y � � � � � � � � � � � �!	!!!*!s!�!�!�">"�"�"�#$#g#�#�$$_$�$�$�%%O%�%�%�%�&P&�&�''H'k'�'�'�'�(((/(:(u(�(�(�))7)w)�)�**-*d*�*�*�++E+d+�+�+�,(,^,�,�,�-
-6-S-�-�-�-�.6.f.�.�/G/o/�/�/�00O0�0�0�0�0�0�0�0�0�0�1=1H1S1^1i1t11�1�1�1�1�1�1�2 2(232>2I2T2_2j2u2�2�2�2�2�2�2�2�2�2�2�3333"3J3w3�3�3�3�3�4
44 4.494V4b4�4�4�4�4�4�5
555%5V5^5f5�5�5�5�5�5�5�5�5�5�6)616R6�6�6�6�777E7k7s7�7�8=8i8�8�9(9R9�9�9�::;:]:�:�;
;=;p;�;�<<<U<�<�==a=i=�=�=�=�=�=�=�=�>>>>$>c>�>�>�??? ?)?8?F?N?]?e?m?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�@@!@=@K@S@v@�@�@�AASA[A�A�A�A�A�BBLBmBxB�B�B�B�B�B�B�B�CC*C\CdC{C�C�C�C�DD;DiD�D�D�D�E	EECEKESE[EcE�E�E�E�FFF)FSF�F�F�F�G&GfG�G�G�H
HH7HhH�H�H�H�H�H�H�H�H�H�IIII%IjI�I�I�I�J#J_J�J�J�J�KK)K1KCKKKSKdKlK�K�K�K�LL/LQLwL�L�L�MMM'MdMoM�M�M�M�M�M�N"N*N5N@NKNaN�N�N�N�N�O,OkO�O�O�PP#PHPyP�P�P�P�P�P�P�P�P�P�P�Q	QQQ'QqQyQ�Q�Q�RKR�R�R�SS,S^S�S�TTIT�T�T�T�UURUvU�U�U�U�VVJV_V�V�V�WW@WtW�W�XX_X�X�X�X�X�X�Y,YMYnY�Y�Y�Y�ZZ>ZKZXZaZnZ�Z�Z�Z�Z�Z�Z�Z�Z�Z�[[[[3[_[l[[�[�[�[�[�[�\\\;\G\S\f\s\�\�\�\�\�]*]k]z]�]�]�]�]�^^_^|^�^�^�_P_�_�``+`:`I`X`p`�`�`�`�`�aaha�a�b0b�b�cc&c2c:cBc�c�c�c�c�c�c�c�c�c�c�c�c�ddd7dNdpd�d�d�e,eDe�e�e�fff3fYflf�f�f�g
gBgZg�g�g�h	hh<hEhNhWh`hihrh{h�h�h�h�h�h�h�h�h�h�ii7idi�i�i�jMjnj�j�j�j�k%kFkrk�k�k�l/lSltl�l�l�mm$m]m�m�nnEn�n�n�oo=oJoVocopo�o�p)pTp�p�q
qgq�q�rr^r�r�ssgs�s�s�t"t;tjt�t�t�t�t�u%u4uDuSucusu�u�u�u�u�u�u�u�vvv#v3vyv�v�v�v�v�v�www(w;wVwqw�w�w�w�w�xxx1x@x�x�x�x�x�x�y.ybyy�y�y�y�y�zzz-z@z�z�{!{9{Q{h{�{�{�{�{�{�||<|\|{|�|�|�}}}.}F}V}f}{}�}�}�}�}�}�}�~~I~�~�~�~�.b�����������������7�����ȃЃ؃��
�3�G�U�t�|���������������ȄЄ؄������υ݅����$�7�J�p�����������܆���0�G�^�����Ň�
�8�^���������Ԉ��
�(�C�a�}�������É҉�	��*�?�K�T�]�f�������Պ���(�8�A�J�S�\�e�������ċ�	���8�D�a�������>�k���َ�7�i�������ю�� �K�y�������5�e���Ӑ��!�5�I�l�����Ւ�.�Q�������������������Ӓ��&�C�d�������ēԓ����&�6�F�U�e�u���������ʔߔ���1�D�W�j��������ӕ���$�7�I�^�r�������Ö֖���#�;�T�l�������̗���2�J�b�z�������Ϙ��
�!�6�K�e�z�������љ���-�E�^�}�����͚���6�M�l�����ۛ���*�D�T�e�����������ŜҜߜ���%�7�D�P�]�j�w�����������ŝҝߝ������F�ߥ����!�1�E�V�g�u��������������"�M�p�x��������#5�	3!%3''#7'377##���(()|__�+�u^��l[Mbb
��p_;;��s	O�	3'&&'#3#'#��
�˰˜'�(J<<1m44m����t��J2�"332#32654&##3254&##J�Dl?6:FHBqG[A6014BOv9=O�F?+S
KACT)�+%$�ZX+&6��:�"&&546632&&#"3267dQ�TS�W>d!Q7$E[]I#;QQL�ml�Q3 [pbdp Y`F4�
332#'326654&&##F�_�NM�[)3M++M3�D�pp�Gw(\NNY%\�3!!3#!\�����&�|�{�|i�	3!!3#i������|�|�,��#�"&&546632&&#"32675#53WS�PP�TB^Q2'@UNM#
_�!mL�mm�P3 [pbdp

px��0@�33353##@���������t��J�353#5!#3J��Ę�|�||�l|;���"&'73265#5!6u+U9C23��.k0<[H4C'{�R@j@DR�3333#D����֣�K������wc�k �33!k�"���|:�333773#54>7##''#:�@@�|22H3/��ZZ�t�QXP����PXQ�B�333&&553#'#B��8���8����4:�tE�6|:�&��2�"&&546632'2654&#",MwBBwMNvBBvN3<<33<<N�om�MM�mo�NljekkejlK1�332##3254&##K�GsEFtETKx=;K�'\OLb/�Rh3*&�NG�&%2654&#""&'&&5466323267,3<<33<<�_�XjBwMNvB`QC#
0llqekkeql��bL��m�MM�m��"n	FH�332#'#3254&##F�ErE@4��}MHw<;H�%XNH]����`a0&2��'�*"&'732654&''.546632&&#"*B�5U%Y//-6/T$@'=lF;r,K"D0%-</OAK;q0.e& #$/F/6X4,*]"TE6\89�3#5!#���||��@���"&5332653.ww�-./-�s���`:??:��o�I�
3336673�ŜNM�����5f66f50�tT�!3336677336673#'&&'#[W�,^)�P�&
&���*N,,O)��(O--O([�t�@@�F�33366773#'&'#���?
:����GDO={44{�����0;3�H�353366773�ҞBB�����%I''I%��P�8#�	35!5!!81����5Y�{Y�I|=���%"&&5467&&#"'6632#'#'2675�2I(��42$I*43u@hxx%[!:IQ &(D*SX
"&`&nr��8(rR"H��)�"'##336632'2654#"RH?s�H$]k=bY)8[/-.B6��N�rUy?xFL�.�C��#�"&&546632&#"3267WN}IP�L;`D77@PN='A;-l=uRSt=&['LA@M]%$/���!"&5466323'53#'#52675&&#"^s=a6);�xH+)(<2�yQu>M��C3$x�CGIE7��#�"3&"&&546632!3267>+<�KN|IJvBMh5��L="=!1+h�./]�h=uRRt>?kD%	62YRI�3#57546632&&#"3#Ճ�.cM+L4]��}m
9]6l	
Ws��4�-<�0<J"&&5475&&54675&&5466323##"&'3322654&#"2654&##"'@f;M!&;a8.$�d7\:"T\bgH�R,,++,;K,+>3#D�9,=&
)2B+<P(l#9I$
%:C4Q.�*('**'(*��#H�3336632#4&#"H�Q8SN� )-��_-l^��2.����O��&U
-��*�<��&�
-LI�33373#'L����̟�I��k����N}2�� �"&5#5!3267�]`�/2&!'?p^�t��.#	l
#>�33366326632#4#"#4#"#o
2+D5+5:�s
�=+Q"/VJ��R-0��R-��H�3336632#4&#"Hx T7TN� )-�B .l^��2.��/��)�"&&546632'2654&#",BsHHsBBsHHsB3333333=uRSt==tSRu=wM@ALLA@MH�H)�336632#"'#2654#"HxN(]j=b8D6U)9[/--��2#�sUx?6Q�$FL�.�/�H�!57##"&5466323732675&&#"}D#^s=a6*As�+)(<2��P �yQu>!3�X$�CGIEt$�3336632&&#"tx%i;!)%.Y �l=;

{6C��5���'"&'732654&&'&&54632&&#"(C�/?.e5)&41eXzjCm'B%T)"#4?MT"}-\
K:EV+X+:)C]1��&�"&&55#57733#3267�O^)}�y��270!O7bA�m��s�80j
>��
�"&5332673#'#�UL�),�x!Ql^2��1/!F�G%.9�
33366773ڻ�NN����%M''M%�T� 33366773366773#'&&'#UQ�k �L�	��%H&&J#��%H&&H%�� H+:Y�%2�3'3366773#'&&'#%���3


,����9
1�P+,P��R,+R�>;�"&'7326773366773�&+1
גS
I��<U�p$��#K'%K%�>U*F�	35#5!!F����O.sN��s��	O~&���	O~&���	OC&��	OT&��	ON&��	O/&��	OP&��	O~&	O�
+"&54773'&&'#3#'#2654&#",3?+�;S"@j�
�˰˜'�(��6-5�R(
/ -6��<<1m44m����t�����	OT&	�g�	%3'&&'#"&54667#'##33267��
�1D(('�(�˰�*3
#;J<<1m44m��2. 4%
����t9 
J��	�
O�&-��	Ov&��	O&T��	O&V��	O�&X��	O�&Z��	�
OC&&-��	O�&\��	O�&^��	O�&`��	O�&b��	�
OP&&-��S�3#!#3#3!5#�T
���s�vv���v-d]1]�q�|�|�|������S~&M�[����S/&M[	4�!*35#5732#'3254&##3#532654&##TKK�Dk>59FHBrGRFu8=Fjj95233:�E�E;*K
OEDY*lf3-<K�)'$��J�D2�&<	��6�:�&3+��6��:~&�5��6��:C&5��6��:T&5��6��:d&5��F4T&��F�
4�&-���F�D4�&<���F�4�&3���4��E�3&&546632#7326654&'�&"74:9za��DxO
!2?<5""+^UCDi<��s�Hw)^Qm_��\~&���\~&���\C&��\T&��\N&��\/&��\P&��\d&^�-�!"&54667!!!3#!#3267�1D&�������%)#;�2.3&�|�{�|)J��\�
�&-��\v&��\T&��\D&T��F&V��\@�&X��\�&Z��\�
C&&-��\�&f��,��#~&���,��#C&��,��#P&��,��#d&��,�#�&0��,��#T&��,��#/&��,��#T&,��`21&&#"32675#53#"&&546632&&54632&&#"Q2'@UNM#
_�!m>S�PP�TKB'
E[pbdp

px��0L�mm�P7Nm!��@C&	��@N&	��@�
�&	-����&	3�_��@��&	9U�3#57533533###35#@==���==�����E^]]]K����S��J~&
���J~&
���JC&
��JT&
��JN&
��J/&
��Jd&
��JT&
J�� "&54667#53#5!#3#326731C#�����*#";�2. 3%|�||�l|1J��Jv&
��J�
�&
-��JP&
��;��C&��D�R�&0��D�
R�&-��D�DR�&<��[ ~&
����k &
����k� �&
0#��k�
 �&
-#��*�
 /&
&�-#��k�D �&
<#�� �
35'737!k@2r��1�"�&X@J��dX~�|��k=�&

����:~&���:d&��:�
�&-��B~&�
��B~&�
��BT&
��BT&
��B��&0��Bd&
��B�
�&-��B�D�&<��&��2~&���&��2~&���&��2C&��&��2T&��&��2N&��&��2/&��&��2y&��&��2P&��&��2T&&�2�!-"&5467.54663232672654&#"B1C+Oh3BwMNvB`P(!#;33<<33<<�2.)=
^�Xk�OO�j��#5JSipekkepi��&�
2�&-��&��2v&��&��2&T��&��2&V��&��2�&X��&��2�&Z��&�
2C&&-&��S?("&&5466326654&'7'2654&#",MwBBwM?4
ms'+BvN3<<33<<N�om�M	'$#,5r+�Wo�Nljekkejl��&��S~&����&��S~&����&��Sv&���&��ST&����&�
S?&�-��&��2�&f��D� )77&&5466327#"'7&#"2654&'EBwMV=5PDBvNT?6Z�(3<o3<�
b)oEm�M-K4a(mCo�N.Ls$� k��lj"�!����D~&��S�!"&&54663!#3#3%3#"MzEH}O"�yy���!00G�pp�D{�{�|w�%XOO\'��FH~&���FHT&��FHd&��F�H�&0��F�
H�&-��F�
H/&&-��F�DH�&<��2��'~&���2��'C&��2��'T&��2��'�&h��2�'�&3��2�'�&0��2��'d&��2�
'�&-@��D�$"&'732654&''7&&#"#46632�1P<!)6@V
+\�3iQ\vRG=(S$Y"$ 8V} ��b�Cg<eRx%ZA3R0��9T&���9�&3���9�&0���
9�&-���D9�&<9�3#5735#5!#3#�^'��E�||�K��@��~&���@��~&���@��C&��@��T&��@��N&��@��/&��@��P&��@��~&��@��y&��@��T&@��$"&54667&&53326533267B1C	fi�,./.��<##;�2.1!�w��`:??:��o�;1J��@���&P��@���&I��@���&R��@���&L��@�
�&-��@��v&@���B#"&53326536654&'7swww�-./-F,
mAV������`:??:�.",4=B��@���~&����@���~&����@���v&���@���T&���@�
�B&�-���
I�&-��T~&���T~&���TC&��TN&��H~&���H~&���HC&��HN&��Hd&���
H�&-��Hv&��HT&��8#~&���8#T&��8#d&��8#C&��8�
#�&-
��8�D#�&<
4�3#5732#'326654&&##3#FFF�^�NM�Z)3M++M3ll*ED�pp�Gw(\NNY%�KI6�3332##53254&##I�[GsEFtE[Rw<;R�c'[OMb.{�h3)2��0�"&&547!&&#"'6632'267#/JrAg?7"7D"]>NuABsL);�9P�iVOe )P�kj�Q@UU@A��,�"&'7326654&#"#36632i0 
0+7��G+:\6X	�!YTq]&$�1�>#'A�z��J�J�33"&'732653J�y"+ �!P��t�
m')~��6[7&A�333"&5463233&�i ))  ((6�i���|)* ** *�����|��.�JW~&'��h����=��/&���=��/&���=���&��=���&��=���&��=���&��=���&	��=��&=��n)4@"&54677"&&5467&&#"'6632#'#'26752654&#"@AC�;M)*C�2I(��42$I*43u@hxx%[!:IQ &P8=++{J#
6!+=��(D*SX
"&`&nr��8(rR"	��=���&=�.�,7"&54667'##"&&5467&&#"'66323272675�1D(%[02I(��42$I*43u@hx83!?�!:IQ &�21 1#
:((D*SX
"&`&nr��4AIR"��=�
�&-��=��&��=��U)&S��'��)&U��=��>2&W��=��F&Y��=�
�&&-��=��t&[��=��t&]��=��y&_��=��E&a��=�
�&&	-��Q�3@"3&&"&'#"&5467&&#"'66326632#327%3267&&55�({1M%F%;Jos"/4)Q(&;@$4F#�4$%'3I��
7)�-65.�h("("P>NZ.` )) AmA"32_�
-	,����Q/&�
����Q�&
��)�&"'###57533#36632'2654#"RH?sBB���I#]k=bY)8[/--B6)FHGL1I�nRt=x@H|.���H�D)�&<
��C�#�&2*��C��#/&�*��C��#�&*��C��#�&*��C��#�&
*"��z6!&"&5466323'53#'#72675&&#"3�Te6V/#2�o? "2+"��yQu>M��C3&x�CGIE�b���/�
�&-��/�D�&<��/��&2�/��R�("&5466323'5#53533#'#52675&#"_s=b5*;���BBxH+'**<2�uNp<M*LGGF��3$x�!?BC@��7��#/& ���7��#/& ���7��#�& ��7��#�& ��7��#�& ��7��#�& ��7��#�& 	7�#�2"3&"&5467#"&&546632!3267327>+<�
3B# N|IJvBMh5��L="=!138 ?�./]��21#8=uRRt>?kD%	62Y".&B��7��#�& 
��7�
#�& -��7��#& ��7��#�& ��7��M)& S����#)& U��7��62& W��7��#F& Y��7�
#�& &-��7��#n& e��4�-</&"���4�-<�&"��4�-<�&"	��4�-<�&"
��4�-<�&"1��4�-<�&"��4�-<�&"��4�-<�&"����&#�e<�����&#�e<��H�
�&#-��H�D�&#<�� ��&#2�e��H��&#9�3#57533#36632#4&#"HBB���	Q8SN� )-)FHGL+`-l^��2.���O�/&U�-��O/&U�-��O�&U-��O�&U-��O�&U-��O��&U-��O�&U-��O���&M
-��O�&U-��O�
��&$--��O�&U	-O��!#5!�Z}s���*�<�&�-��L�I�&&0��L�
I�&&-��L�DI�&&<LI�33773#'L����˟�J������H{��2�� �&'��<��2�� 6&'���2� �&'0C��2�
 �&'-C��2�
 k&'&�<-C��2�D �&'<C2�� �"&55'75#5!73267�]`U2��/z2�2&!'?p^U1[K�t�D\^�.#	l
������&'�
����#>2&(���#>�&(
��#�
>�&(-��H/&)���H/&)���H�&)��H�&)��H��&)0��H�&)
��H�
�&)-��H�D�&)<����&3336632#4&#"'667#"&54632�xH1JE�!��'48	
(47)8=W�@-k]��!1-��"NE/3).7UKR}��/��)/&*���/��)/&*���/��)�&*��/��)�&*��/��)�&*��/��)�&*��/��)
&*��/��)�&*/�)�!-"&5467.54663232672654&#"@0B+<e=GtBBsH`M&$  @43333333�21)<AoKSt==tScr"5	AJNCALLACN��/�
)�&*-��/��)&*��/��A)&*S����))&*U��/��*2&*W��/��)F&*Y��/�
)�&*&-��/��)�&*	��/��)n&*e/��Q�)"&&5466326654&'7'2654&#",BsHHsB71%l
B4#+HsB3333333=uRSt=
.+#
07=M!a>Ru=wM@ALLA@M��/��Q/&����/��Q/&����/��Q&���/��Q�&����/�
Q�&�-/��)
 (77&#"'7&&5466327#"&'72654'��!33P9. HsBK=.9/ HsB%F�33���Q��.7!W6St=&7/8 X6Ru=KR@!���/��)/&����Q�872654&#""3&&"&&5466326632#3267#"&'��%w�2S12T3'=D"3E#�5!#3H$K>kM@AMMA@M!.55.�h=uRSt=*11*AmA"41
_'//'��t$/&-�1��R�$�&-0���t$�&-1��t$�&-
1��a�
$�&--���a�
$�&-&1-���/�D$�&-<���5��/&.���5���&.��5���&.��5��R&.g��5��&.2��5��&.0��5���&.
��5�
�&.-=��;�4"&'732654.54>54&#"#46632�)@"1*./('�2eLAS)./'Nd
 $3(,(+#<3��>c91M+$2%"&9,-K,RI�3#57546632&&#"Ճ�.cM+L4]}m
9]6l	
W���1��&6&/���1�&�&/2K��1�&�&/0D��1�
&�&/-D��1�D&�&/<D��1��&j&/���1��&� "&&55#575#57733#3#3267�O^)||}�y�Ҿ�270!O7bAFXm��sXL
80j
��>��
/&0����>��
/&0����>��
�&0���>��
�&0���>��
�&0���>��
�&0���>��
�&0	���>��
&0���>��
&0���>��
�&0�>�$�&"&54667'##"&5332673327�1D(!Q5UL�),�:1!?�210#J%.l^2��1/!F�4A��>��
9&0O���>��
r&0H���>��
i&0Q���>��
r&0K���>�

�&0-��>��
&0�>��n�!"&5332673>54'7#'#�UL�),!)m
7*x!Ql^2��1/!F'&+/77D�7G%.��>��n/&�����>��n/&�����>��n&����>��n�&����>�
n�&�-���
9�&1-��T/&2���T/&2���T�&2��T�&2���>;/&4����>;/&4����>;�&4���>;�&4���>;�&4
���H�&4-����>;&4���>;�&4��F/&5���F�&5��F�&5
��F�&5��F�
�&5-��F�D�&5</��&�/7326544'&&#""&&546632&&''7&'77�F13>9 6?rCqD>e:$C
0#�(w*2@&H"�(o@M<r�;>LK	:��;lIHe6-IKD<Y)ED8<�qP~HH�H)�"336632#"&'#2654&#"H�G%\k>b6%>U(:,0..�u�M�sUx?Q�$FLCC�H�E� "&'73254&#"#336632q)

/ )-�x T7TN!J�	mQ2.���B .l^��7\7*�<��"&'73265#5!�.K +15'�Z(d�i
36es�.<g?A�<#� ,33"&54632"&'732653"&54632M�I%11%&00�)

� M$%11%&00�9,"#++#",�l')�6Z7�,"#++#",���z�."&5#53327"&54632"&5#533267�RU\�$!& ((  ))�RU\�$
 %p^�s�.#	l
5* ** *��p^�s�.#l
B�<u/33"&'732653'7'7M��)

� M��H�d�H�d��l')�6Z7�H�b�H�bH��"�%"&53366323267>54&#"(hxx&Z02I(��42$I*43u�IQ % !:nr8'(C*TW"&a&#H��)� "&'##336632'2654#"Q"FsxN+>Y0=cZ):^,," 6�3$>pLVy?xDH��H��'� ,"&'##46632&&#"36632'2654#"S"Gs+_N$:"+*G$\j=`Y(8Z-.!!6�:`;l(.L�oSt=xAI}�4���"&'732654&#"'6632�4j+<=%AQM8: D i>I}LK$%]M@AL[&=tSRu=C��-�+%"32654'67&&546632&#"6632#"'�*8!"')�r!!$P�L=] @2@AW/b*DO.V>F;�@!��1A5!Y7St=%X+PD%-.E=*F*//�Vm�"/"&&57##"&&5466323'5332672675&&#"7H#B#>]4=`5)9�$��),%83�*E(? >uQQu>M��S%"l�CGIE/��l� -"&5466323'546632&#"#'#72675&&#"�]p<`4';"K?


x
H)-$72�yQu>M,H,l#%��3$x�CGIE6��!�"3&&"&'73267!&&546632X�
::1i*0!="=M
��:mLBqEI}�]/.�hX26	&Dk?>uQRt>/���!"&&546632373#'#72675&&#">_4=b8&CsxK+)(<2>uQQu>!3�3$x�CGIE��n=�7��"�"&&5467!&&#"'6632'267##Mj5S
G9"=!0+h1LwEHtH-:
�@mC%	51X>tRQu>p/1`��o�(2"&&'7&&#"'663273267#"&'744'326�BW,�
+-1&S%DbKC	
#">$4]	�( )>h?y"]:6$8(F	$:Jq@�	H(6F��"�*"&&54675&&546632&&#"33#"3267=FpA>5.0>nF7j+5 H&91eCR75>E+I:.k#E326
;2=],c]%��0���!/��"�+"&&546632'2654&##532654&#"<LzGLyE:`:(/39<h=$-,# ##9FD9tVXs:?2":
:22E"pcHMRA*�<.�"&'732655#575#5!3#�.K +15'���Z��(d�i
36�Fvs�L�<g?1�>n�,9"&'732677##"&&5466323'46632&#"2675&&#")g,1#I82A">\3>a4&8"L@ 

�b(,%83�a."?>oGLq>#(K0m%#�3afE�C>=C/�<�,"&'732677##"&&5466323732675&&#")k,1#M79H#>_4<b9N9s�g+*%?7�d0"?>oGLq>?3� dpG�C>=C@��� "&&54>32&&#"3275#53QI|L.Oc5DX"B/(#@'H9$\� j8rW?bC#%X B5ELSb�&�-9�%"&54673366773'2654&'#/IW#��R

R��$WJ�PB&A0�� 4##4 �h1B&BP\) +��9�#/"&5467&&#"'66326632&#"'2654&',Zn7.**>)R%%S(>*(/6nZ""#"^X,\*k

%**%

k*\,X^w$99$<�H�57#"&5332673}S8SN�!(-���_.l^2��1/K�XH�!346632&&#"36632#4&#"H+_N$:"++	Q8SN� )-�:`;l(.]-l^��2-��H�E�."&'732654&#"#46632&&#"36632i+
 )-�+_N$:"++	Q8SN!N�	m'*2-���:`;l(.]-l^��7\7��H�'��O.�&O
-O	�353#5!#3O�����s
ss��s����&Q
-�H�##73753y��Ͽ�F������G}�X��2�� �&'=�w)�� �	)354&#""&55#"&546325#5!3#3267��]`	RJ;.$�/��2&!'?]&��p^O?.,8zt��LU.#	l
2�E �"&5#5!327�^_�/1!-!'?�p^6t�P.#l)�<W�!33!#"&'732654&#"'7#)���WU?i>Hd#B=&,85+1����N�
lIIf5/"[82,1G��y�33!y��s��5�#'##"'#"&53327332675o

3+D
6+5:�s
�=+Q"/VJ\��-0O��-O�H5� 57##"'#"&53327332673�
-)D
6*4;�s
���a,Q"/VJ\��-0O��-O�X#�E>�+"&'732654#"#4#"#3366326632�%
s
�o
2+D6*4;A�m Z-0��R-���>+Q"/VJ��0O0��E� "&'73265336632#4&#">$x O4TL� #*H�l!%�B .l^��7)��4W4H�Et� "&&54&#"#336632327&@I #*�x P4SL
%�4W47)���B .l^��%!lJ�333&&553#'&&'#J��
	���
 	��<.\%���<.[&�/��)�"&&546632"3&27#,BtGGtBCsGGsCY�Y_�;tUVs;;sVUt;�``��jj��Q�%"&&5466323#3#3#'27&&#"�8f@@f8,"힀���/!3&8sXXs:tMcXtsBM7?�G?�#5.54667534&'66�8b;;b8|9a;;a9�.&&.$.&&.��=oOOo=��=oOOo=��CJ"IDDI��J4����#'##"&'73267�x%i;!)%.Z�l=;

{6C4����"&'732673#'#�!)%.Z�x%i

|6C�Cl<<4�E2�"&&55##"&'73266733267�=FY0+!$40�
.�/O/m56

|0(�("k
t�E$�"&&5336632&&#"3267IN^)x%i;!)%.Y 170!P�7bA�l=;

{6C�9/
k
t$�346632.#"t8v]5T!!A-GqC	{D;�J6�332#'#32654##J�9]79)��mGV('OV�G>:H���$<J6�73254&#3##33�VO'(^��)97]9��G�<$�H:=H�5�E�5"'3267#"&55732654&&'&&54632&&#"(99
)XI?.e5)&41eXzjCm'B%T)"#4?MT"} ij^3\
K:EV+X+:)C]+�<1�"&'7326546632&&#"�1A*&&%XL.=%"+""R�
f	+,�9^8i	
+,�9^8+�<1�%"&'732655#57546632&&#"3#�1A*&&��%XL.=%"+"��"R�
f	+,�E�9^8i	
+,�K�9^82�h'�23#5#5354&#"'66�O^)}�y��27/!P�7bA�m��s�80
j
1�E&�"&&5#57733#3267�O^)}�y��260!Q�7bA^m��s��9/
k
����X� "&55#57533533##'#'32675#�PIRR���VVx
K9'�k]NE����K��E%,�5)b'��1�#"&&54675#5332654&'53#,Op:/W�!2451!�W.:o>b5<Ys_%K94II49K%_sY<5b>>��)�"&5332654&#"'632*l��2-/3
-Kd9qyv
��@:\P;8mcl^�N9�
#'&&'##~��NN����&L''L&��T� #'&&'##'&&'##33677Q�k 
�L�	��%I%%K#��%I%%I%�� H+:Y�9�3>32&#"#'&&'#�;S=%(/גS

I	>V,p(-��#K'%K%�!9�353366773�Û64�–Zk#?&&?#k���F�Ez�"&&55!5#5!!327-@I������
%�3P+
O.sN��t%!lF��M�
%%"2232654'67#5#5!6632##� 	�J	�����*G+1:U\� $��5.O.sO��EL76<V94�<�"&'732654&#"'7#5!2Oo(CH,5EA70���=[3Es�7%\&:4.4
G�sN�3U4Jh6���<j�0;"&&5466323'53!#"&'732654&#"'7##'#7275&#"�,F')F+2 sk=D+P9.C9 #'$.nzY,!" @uOOtA.[��O�kO?e;^29/.	Q���,x3�!EFFG��N�0"&55#57733632&&#"'2654.5445#K�wDJz�!)(I1$'"12"1qSB2#44#A@l[�m��O#+>.1G'm#!(6(�4)�<��4"&'73265#327#"&55#57733546632&&#"r)
�4$YMDKz�"PD#
!K�l')~�*%
kjV�m��3X6l')��6Z72�3>54&#"'6632�BM A8*FI$pMDsE+O59(:5 /3)]'9/]G6QF'��E#�3.546632&&#"�5O,FsDMo%IG)7B MB'FQ6G]/9'])3/ 5:(��2�35#5736654&#"'66323#͗L]PM=4,JI&tOBoCG0���E0\*/3)\(8.]G7`%K�9#�35#573&&546632&&#"3#��L80GCoBPt%IJ,4=MP���E%`7G].8(\)3/*\0K�C�H�#575#5733#3#㠠��������<FyF)��KyK��/��*�+"&&546632'26654&&#"7"&54632,IrBBrIIsBBsI6!!65!!5****P�zz�OO�zz�Pw,k^\i--i\^k,�( ++ (B�J�!"&'73265#'##33&&553z)		
�8���8�D�m'E�6|:�����4:�6[7��/������/��/&���/��/&���/���&��/���&��/���&��/���&��/���&	��/��&/��n#0<"&54677"&&546632373#'#72675&&#"2654&#"4AC�;M)*Cu>_4=b8&CsxK+)(<2<8=++{J#
6!+=��>uQQu>!3�3$x�CGIE��/���&��/�
�&-��/��&��/��I)&S����)&U��/��22&W��/��F&Y��/�
�&&-��/��t&[��/��t&]��/��y&_��/��E&a��/�
�&&	-/�(�'4"&54667'##"&&54663237332672675&&#"�-?!
K$>_4=b8&Cs3';�+)(<2�211$	6$>uQQu>!3�4	AO�CGIE��/�<����/�</&6�
��/�<�&6
��/�<�&6	
��/�<�&6
��/�<�&61
��/�<�&6
��/�<�&6
��/�<�&6
��Q4�&@
Q4�	353#5!3Q��/�s
s��s��Q4/&@���Q4/&@���Q4�&@��Q4�&@��Q4�&@��Q4�&@��Q4�&@��Q�4�&N
��Q4&@��Q�
4�&?-��Q4�&@	��Q4�&P
O���"&5467##5!3267_1D6 *�Z2* 

?�21.?}s�3AQ�4�"&5467#53#5!3#3267N0D4۱�/��2(
@�21.?s
s��s3AO.�
!5#575#5!3#���Z���Evs�K�Q4�3535#575#5!3#3Q����/���seEZs�Kes��
#3267&#"&&'#"&54632#5!�" $),Q5T_WO,*�Z6-�/!V><I
5s�%P3Q4�	353#5!3Q��/�s�t��s��Q4�&R�<��QP6&R���Q�4�&R0��Q�
4�&R-��Q�
4k&R&<-��Q�D4�&R<QA�3535'75#5!73Q�T2��/z2��s�1[K�t�E\^�s����&R�
�����i�	#53#533353#533"&54632`\�NP\�^��&&&&s�t��ss�t��s.''''��Q4�&R=wQ4�
#354&#"535#"&546325#5!3#3�x�OH;-�/���[&

��s�=+*8	|t��G�s��	O���J2�l�3!!l����|��9�353%3'&&'#������9

Y3��Y|�1n44n1��\���8#���@�	&��2�"&&546632'2654&#"'53,NvBBvNNvBBvN3<<33<<�R�jk�OO�jj�Rtbbnnbbt�����J�
��DR�I�
33#&&'#ıŜNM��t05f66f5���:���B�B�35!5!%5!B�pL�z�||{{�||��&��2�@�3!##@ؓ���t����K1�?�357'5!!!?�������%Y��Y|��|��9���H���H�5&&5467534&'66�g{{gtg{{g�5++544,,4U
�ww�
TT
�ww�
U_?Q
0	O>>O	��
Q��F�C�35&&55336553�et�Q|Q�te�tm�n=��n��mt�9�'3535.5466323#5>54&#"d+AvOPuA*d�9669wEZ6[�NN�[6ZEwj&FN3UmmU3NF&jO�	3'&&'#3#'#'
p

鳰�� �!p^-~J<<1X99X����t��[F���3!#3#3'�:�����G^-~�|�{�|[F��(�33353##'Ń^��^�^-~����t��[F���353#5!#3'�YYFYY�O^-~|�||�l|[F��JN�����2�"&&54632'2654&&#"''b=^5t\\tt\ %&�^-~Q�l������`vOZ''ZOv`�Fp�!53366773'\��(		
)����^-~���(G&&G(��P�[F��HN���:�%)3535&&5466323#5>54&#"'�R)3]??\3)R�$  %�^-~w2wTU�II�UTw2wj+GL1a__a1LG+j[F*��N�,"&546632373327#"&'#'2677&&#"�Xl;`5,I�

,4>30 3/!7+�yRu?+8W9�v&l
%-Rx?,V,+CJHCH�O.�246632#"&'2654&#"'6654&#"H/aK7b>+*:O:Z0%O#b'8+*5),%'9��Dl?'P?2J`FI^-&;t923'8k>*)'HDI�I$�O1�>54.'736673� 9I*�42)0�-D2�$-"/���9 "j�GP�Z?nn|L.f*5��#�!-"&&54667&&54632&&#"'32654&')BoC-I+-D]a:{8!9j)2W@3E#<p�A,.:4'8B6gG5O9P91Im9) AO6Fj;�698=,>
EF��"�,"&&54675&&546632&&#"327&#"3267JNuA>4./>nF5j+6 H$82d"$++63<FL%:9g"D326:2>_+i^(V�E�&'6654&'.54675!#�s0D&H;"��=GE�?hM)=4VI�&'5T=_�RttVa`((2
7:ZA�O�>54&#"#4&'336632&0��"M7VE�N��96(!%��XS(T*6k]�7��!�"&54632"3.2667#,n��nn��n,�++�,��������^SOOS�!VNNV!=���"&&55#5!3267�HR!�%+,+ H2]?�s3th%.#	lI��J�!34&'33>7&&'U�&Yi=(I)DK"�E#XT'?#]:a@�$#1kb&&jDH8"��@�''&&#"'6632##���
3  2-Wh!��c�'%w
bn�N@�<I�&3326733267#"&'##"&'@�"!/�%19
>$%
����5+")4:�v*m./+-	<b8/�3.'736673�?O)�+''0�1M9^��= "Zb_)V�UW��];�E�7'6654&'.546675&&54675!#"3267&&#"�s0D8^7(C'051)ԍ1<81(.:P B3=A�&&*L>+H5
E-2ss/)"8t8-"%
0'Y3��%�"&&546632'2654&#",BqFFqBBqFFqB2002111=uRSt==tSRu=wM@ALLA@M
��N�""&54665#'665#57!#3267�SAz�
bK�R
&]MJ\)X�c	e�Rnt+bKl	H�O)�46632#"&'2654#"H@nEp~=a6"FV'8\+81��^x9�wUx? 9l7FL�J?g/��@� "&&54663!&&''2654&#"Al@Fp>(?'&);gA).-*(0/;qRVq7yV8Gh8wB=;T?H@G2��&�"&55#57!#3267�YF�J�� >cR�ms=r+ n
>��� "&&54654&'332654&'7&Nd/�1%/1�}9dB!C!S(>#c/-/LR-g@9x;���O?t#5.54667534&'66�8b;;b8|9a;;a9�.&&.$.&&.��=oOOo=}}=oOOo=��CJ"IDDI��J)�CD�
'7373'#�����w[��ɑ~�V7 ����� ��OEt%5.554&'3336654&'7�N[(�",{)*
�ol��@h>{R)>#><*@
��FQ2hB:|>�����B�-"&54673254&'332654&&'7#"&'#�O_,"�%&-|�!)XQ":4��>�74>l>4A]"6++6"4)HC)BC'15yM��#**#I�F�$'6654&'.54>32&&#"�s&5*QC(/Pg79\C0?RJC>E�&+
#8W><]@"# [H<=8#6)\H��.�)6".5546632'2654&#">54&#"G/[I,0cL5a=/)'?&?iD&6++:/#4R@B,*#<_D�Dk>&O?2O2M/G].0-(8
4=V%$2")'K9��!�
,7&&"&&54&'332667.546632�.RAC/*/lMa,�U*UwO-9b=Xy?z,"
	hT/��4V4"1
4\#\U
-<>7X3X�n�����O?t��OA*6654&#"5.5467546632i'/{:b;:.b%%*-,N1PX<`8,Y-GJH>3���?tSA�4U/Y3:L�Zn2�tSvA+U*��*��N>&��F��">&� ��A�O>&���=��>&����=���&����3��%>&���>��>&����>���&������B>&���=��>&�J���>��>&�J�I�DJ�(34&'33>7'667&&'U�&Yi=(I)DK"0,�%GD"XT'?#]:a@�$#1kb&#H=(W)&iCH80�O(� %2654&#"5.546632,42244223T1GsBBsG0Q3dPDALLADP��BgDSt==tSCfC-U-J�F�!'6654&&'.546633&"#"�r&)9iCKM�(Z$>NBI>E�&*
8_HUp7y>G.8#6)\t�O�!!3#t�������s�aL�S)�K*�'6654''7&&''7&'7�		4h9<�
x�<�Er_��
�2Z-"5 {p/6H{oeLlv���1d����'�"����$��0������������3��/�*��p*3773�/`�����.�>�[~�'1^-~[F��h:�>J���(���E����"&533267gR?�'[L.bZ!m	���8�#���8�#���8�!���+b����.�>��j-�m��i-�j��j-�l��s-�i���3�Pn���3�Pk��n=����o7�!M��h:�>J���;�GN����'6654&'7�$+\L&?�:J9,)4����.5467Z%@&L\+$�4),9J��t�'7<}�����[~������'6654&'7'7�%LH$6�<}�:J90#1��}���.5467'7�7$IL$
~<}�1#09J7������'6654&'7'7�%LH$6�^}�:J90#1�����.54677�7$IL%
C}<�1#09J&������#"&&#"'66323267'6654&'7_!?)%!?){	&
SAE8	3$	4#�/		;!%&����
#&&54677"&&#"'66323267O0EBR
%
!?)%!?)�&%!;		v	3$	4#��	O�J2�3!!32#'32654&##J���[EqDBoE_P;:;;O�|�#SHJ\)s+..%��J2���l�`�DL�	3#'53667>7!3#5!��U�%
YO���JBg%�(9:���\ev:Y^>��\ܼ���\�W�-3'&&#"'6632353376632&&#"####q	-C&x&B-	q�B%x%B[��.C����C.��������.��,�*"&'732654&##532654&#"'6632%B�5N&S.6C=@WC>47,(B"K-r=tz*)1AEw,1f#!.*)&m'#&"b(+^Q/K
P;C[.@�33373#5467#@�8���8���:4�D�t�:|6�����@C&�ER�33376632&&#"##E�:L"S7
!;˞�<���D2�#w���������"&'732667667!##G"
[�W
2C�BGb�b�tE{Fmy0��:���@�	��&��2���@�m��K1���6��:���9���F�"&'7327733773�(	.	ݜL64E��_�⾜���JV��H�5&&5467534&'6�lvvltlvvl�`1/4/1`Z~rq{XX{qr~ZU{	C>>C	����F�@�D^�33333#5@���K
z�����\ܼ-�!#"&&55332673�-!Mo;�:='�.iX��D6�t:�333333�OxO�������t�D^�3333333#5~KtK~;s�������\ܼ9�3#5!32#'32654##��>h?<e? .0c|�*XGN^)u,2V"6�3332#'32654##3"�;[47\:

&+R���)XHN^)u,2V����tJ2�3332#'32654##J�VJsBEtISJ:A{J��)XHN^)u,2V��!�"'73267#53&&#"'6632��ZNE+>M
��M>%;N$n@S�NP�`\$KT{IC^"3K�ts�G��D�"%26654&&#""&'##336632�I\1��2
[G]ees%]TTZ""ZTT]%�������~�����!5##&&54663335#"�I���8FDrE��LL:==��^LNX%�t`�&001��\~]��\Na��:�""'732654&#"##5!#6632�*
+$����%3Y6)F
p631��||�+_NNY%��l~&��7��9�"&&546632&&#"3#3267gU�QT�T?d!N8#;V��
SC(?NRG�st�K3"^CI{UJ$\`��2��'���J�
��JN���;������E�#+"&'732667667!32###%32654##+
7U15[8|2!9%$'L�6;i�Z�(XHO^).VfFYh+�,3UE�3335332###732654&##�V�7U13V6�V� #!#����(XHO^)��u(7/&8�5!#6632#54#"#��#Wh�H�||�Ye��H����ER~&����@~&������FC&�?�D�3333##5?����z����t��<�3#53533#32#'32654&##�ww���%GsEBqG*!8;:>�u``u_"OBN\'r(2+%&��2�"&&546632"3&&267#,MwBBwMNvBBvN-;	�	;-/<�;N�no�KL�nn�N+KJJK�NVRSUo�33366776632&&#"�ŜO
%NH	y���6e66e6�\S�#�2l83!73!l�������2�
3#57!!3#~LL�����F(|�K���De�23'&&#"'6632353376632&&#"3#5####q	-C&x&B-	I6
b'B%x%B[��.C����C.���\ܼ����.�D,�,5&&'732654&##532654&#"'6632�3`)N&S.6C=@WC>47,(B"K-r=tz*)1AdP��+&f#!.*)&m'#&"b(+^Q/K
P;Qb�E�D]�33376632&&#"3#5##E�:L"S7
!;�Ss*�<���D2�#w�\ܼ��X�3#5!37>32&"#"##��13'3 



,��p1|��03�$|����@�D^�333533#5##@���K
pa������\ܼ��6�D:�5.546632&&#"3267!Bj?S�W>d!Q7$E[]I#;Q7T��S�^l�Q3 [pbdp YB���H�H�35#57333667733#�_��BB��r��Fq�%I''I%���K��DU�333667733#5#'&'#���?
:��vWp7GDO={44{���\ܼ�0;3�,�D\�!#"&&553326733#5~+Lm:�8:&�K
{.iX��D6��\ܼ>*�336632#54&#">�+!Mn;�8>'��.hX��D5����J�
��WC&���	OC&�����S�M��\C&���2��0����@/&���&��2N&���&��2�����F/&�����Fy&���=���<���-32654&#""&54>76676632�91+*.(8kv�.TsF.2@#4I-L*5W5<jTTI>B7#
�ګ�o�T*

�803fLLs?T#�#332#32654&##32654&##T�;_8(,/8;b;gQ*$$)R^-%',]�92;623?/��t�3!!t����s���TF�3#'53>77!3#5!��n�
uO~��
1J
�׿` KF��`�����7��#� V�-3'&&#"'6632353376632&&#"#'##5#q

-C$p$C-q�A*p*A<�);i��i;)�<������0���)"&'732654##53254&#"'6632=o;9)T"F>[xoS2>+H)62m=Hn=%375Dv*]0c/_!>2:
722E"I�33366773#5467#I�#���	"��%].;��&\.=��I�&"
MF�33376632&#"#'#M�N.I5
��vO�[?)	� ;������
�"&'73267667!##I
v�o

R�"(J�J�}7o7SY%3�#33366773#54667##'&&'#%�;	7��
6Q9�66��OP!J �� LPOH�33353#5#H����������/��)�*H�3!##Hȓ��}����H�H)�+��C��#�2&�3#5!#��}ss�����>;�4�HB�#/:57#"&546632'536632#"&'275&&#"32654&#"�&CO*C%#|->J*D'$�!� �K�yQu>H��L�sUx?H$�DGIDFLCC���%2�3H�TI�33333#5H���O~�}��`��@�!5#"&&55332753u(#>`6�-4$��'YJ��.)�#5�333333#�IxI��}��}�#�T_�3333333#5#�FuF�;q�}��}��`��3�3#5!32#'3254##��&<`88`<&NN}s� H>@L p<9&2�3332#'3254##3&�$3Q00Q3$??�� H>@L p<9��Q*�3332#'3254##Q�i?d::d?icVVc� H>@L p<95���"&'73267#53&&#"'6632�4m'7F#>R��
L:F2?g:NLI$V17c2+#U#9sXVt:��D�%2654&#""&'##336632�!C^4��5]ATddk=PP>>PP=wec��_a����"�!5##7&&54663335#"{Gm��)97]9��VVO'���H:>G�<$��7��#/)��7��#�-�<&�*"&'7326654&&#"##57533#36632=%

,*(�BB���	H1\a9h�l)j`MX$��*EHGK,^-����E��t/&�#C��!�"&&546632&&#"3#3267[PIP�O9[!?;"8N��R>%D4*j:tVWs:Y,1c71Y%��5���.��O��$��O�N��*�<��%���@� '"&'73267667!32###%3254##.	4S11S4�3

DJJ�-G�P� H>@L }>}>EK|<9$?�3335332##5#73254##$�O�6S//S6�O�CC𳳞 H>@L ��p<9���I��MF/&$���I/&"����>;�&-
K�T
�3333##'K����~�}��� 2t3#53533#32#'3254##������&<a88a<&OO�tWWtW I>@K p<9��/��)��%K�33366776632&&#"ֱ�K
	EA	]��%M''M%HXV|#��x�3!73#xw	���/�
35#575!#3#�SS�����E�srK��Tc�23'&&#"'6632353376632&&#"3#5#'##5#q

-C$p$C-@>a%A*p*A<�);i��i;)�<�`������0�T�+'&&'732654##53254&#"'6632�+S,9)T"F>[xoS2>+H)62m=Hn=%375bO�� ]0c/_!>2:
72=J�M�TR�33376632&#"3#5#'#M�N.I5
_Xl3vO�[?)	� ;�`����S�3#5!376632&&#"#'#��3 E0

��h3}s�[A'� E���H�TI�333533#5#5#H���O~V���`����C�T#�'&&546632&#"3267YsP�L;`D77@PN='A;B#���hSt=&['LA@M] ��H9�53366773�ǔP



P������'F$$F'�� �H8�5#57333667733#�M'��P



P��n���E��'F$$F'�[K�%�TA�3'33667733#5#'&&'#%���3


,��Za|#9
1�P+,P�~`��R,+R@�TJ�!5#"&&5533267533#5h% <]5�*1�O}�'UF��('��`����H�#��V�& 
��2�� �'��=���&
����Q���7��#�&
��7��"����I�&"��/��)�&(��/��)�����>;�&-���>;
&-��/�����/���&e
C���$0"&&5467&&54667>7'32654&'%?f=]G+D5bB:@$C"CA!;%DL<l�:'(;-#4@6dDTd H-49	�


,jQEj<�49;>+;
F��Q4�?��Q4�E��Q4�R���u�)5AE"&''26533&&554632"#&&'#"&54632'2654&#"53
�e


-1
�a-�1JJ11II1J�q�{3[z1_@Cq��/[z1_@COXWQQWXOZ"+,"",+"�NN��J�2=6654&#""&&5467&&5466326673&''327&&'�
	%D]0?*'I1JS%8= 	�, 3(#CG%Y}1(  "@
�%.'��3U2AS&G/M/PD)A4; K+;n3 	w."�%.C$%8�� �'"&54632'26654&&#"7"&54632,n��nn��n 33 44,, ++��������r(`RS\&&\SR`(�*"#))#"*O{353#566733O��AN%l�wo[
��w3�35>54&#"'66326633:[�L62&?O2hICd9Aj>?�TM}i-/1'O232[=5oo6|*���*"&'732654&&#52654&#"'6632Rv%D P+4C"SK^M2,%A!J/l=Ej;@9<RFs2(]$'$)h/&!%Z&+)M81FM>;S+#.{	35467#5!533#��$D��	�PPkO6�n�e~��p�.��{"&'732654&#"'!!632Rt'B I-6EB2, A���(,;c<Fq4%]%2102*A|w*WDFd4<��!�+"32654&".54>32&&#"6632=<B%&;4*1\I+.Mc4Df M< 'C*"S$8X4?h%"L9161+��$LwTY�T)-X&WK!$*WCB_4>{3>7!5!�+D2���<K(P�wt?|ZCv{�]=���&3"&54675&&546632654&#"2654&&'+n�G1(58a?_q5&2E8k"0.,#1G,8'D.#BaM;IH26O*_O,GLA2P.~,1%-$%',��'(%3*/5���*3267&&#""&'732667#"&&546632�4+=A&%<NCg!N='B+"T#7Z4?h=BuJ-Na�1+"K91�.X&XK!%*WCB`3A�pY�T)8�� �!"&54632"6654&&267,n��nn��n(�3 '�4��������*��*Va'�@	)Uc*O{
353'733O�`H�t�wBCQ���w8�� N'"&54632'26654&&#"7"&54632,n��nn��n 33 44,, ++��������r$TGGP!!PGGT$u*""**""*OB353#566733O��AN%l�w6[
�5w3N356654&#"'66326633:��62&?O2hICd96^;?}TY�8/2'P222\>0\W+|*��N*"&'732654&&#52654&#"'6632Rv%D P+4C"SK^M2,%A!J/l=Ej;@9<RFsZ2(]%,(*h2*!(Z&+*O84IMA=W-#��.B	735467#5!533#��#C��	�PP�wN7�Z�e���p�.��B "&'732654&#"'!!6632Rt'B I-6EB2, A���&;c<FqZ4%]&7552*I{�	*YGIg6��<��!�s>��B
>7!5!�%NC���<K)Nm��V{ZD{��`��=���u5��N+3267.#""&'732667#"&&546632�4+>$0%<NCg!N=%A,#S#7Z4?h=BuJ-Nas55$9@2��-X%YM"$.^FEb4A�p_�Y+8�� N"&54632"654&&267',n��nn��n%�3 %�4���������
�#.JS#�y�!-JX%OB
353'733O�^H�t�wAQ��5w8�� �'"&54632'26654&&#"7"&54632,n��nn��n 33 44,, ++��������r*dUV`''`VUd*�*"#**#"*O�353#566733O��AN%l�w�[
��w3�35>54&#"'66326633:\�L62&?O2hICd9Aj>?�TMk.47'O235`A6qp7|*���*"&'732654&&#52654&#"'6632Rv%D P+4C"SK^M2,%A!J/l=Ej;@9<RFs2(]$)'*h2'$&Y&,*O93IP?=T,#.�	35467#5!533#��%D��	�PPq O7�_�f���p�.��� "&'732654&#"'!!6632Rt'B I-6EB2, A���&;c<Fq4%d*4424+I|+YEHe5<��!�+"32654&".54>32&&#"6632=<B%&;4*1\I+.Mc4Df M< 'C*#S$8X4?h."O>383.��%NzV\�V*.X([N!%+YECb4>�3>7!5!�+D3���=K(R�|x@|[Cz�`=���&3"&54675&&546632654&#"2654&&'+n�G1(58a?_q5&2E8k"0.,#1G,8'D."BdO<KK38P,bP.JPB3Q0�,6'/''(.��)*&6 +25���*3267&&#""&'732667#"&&546632�4+=B&%<NCg!N='B+"T#7Z4?h=BuJ-Na�3."P;2��.X'\N!%+YEDa4B�s[�W*8�� �!"&54632"6654&&267,n��nn��n'�3 '�4��������:��-Yc)�0,Yg+O�
353'733O�^H�t�wUBQ���w�����"&54632,4@@44@@D12DD21D��'��'66'#"&54632�%CA*BB.>>j�VI.51/8[Q_�������"'�C�����'�"'�C�����Y�#"&546323"&546323"&54632[)33)*22�)33))33�*22*)338()77)(88()77)(88()77)(8����7'3"&54632��0+99++99�����9-,88,-9�R��73"&54632�`I+99++99�����8,-99-,8b����&7&>54&#"'6632"&54632�+. * 0R$c;:\7!/.<+99++99�(<.'& K(2$H7(7+)2#��9-,88,-9g�F��&"&&54>'33267"&5463249]7!/.�+. +1R$c5+99++99�$H7(7+)2#(<.'& J(3�8,-99-,8�/��''3�#�#/푑�R/�'��{���"��"&5467632-7>WX&48
(36"TLR}(ND02).7�"��'667#"&54632�'48	
(47)8=W"NE/3).7UKR}��3"�'��{����E"$�'��{������������E�$�'��{�������"��&&54632#"'gWW=8)73)
	84"(}RKU7.)3/E���%'57Z��>���7�����7'7'7�>>�7��7����*�'��{����;.�'��{����F~���F~���F~�P�675!P��oo�X655!X�ooP�675!P��oo���X6����������e��%"&&546632,.K++K./J++Je*I..I**I..I*vS��%"&&546632'2654&#",4S//S45R//R5,77,+88S/R23Q//Q32R/K:..::..:�r��7!�.r(���`��7!%35#�R����`L��F�zr��753z��rD��Z`��753%3'Z��ղY`x��F��T��73�D��Td���4��7377'�y��C��4���yYZzR��%5!*�d�RD��Z0��%5!'7#*���Y�0x����|T��%%5%3���DT����Y4��%%5%3'5��yF�4��\y�Z�k��7!'26654&&#"�<�*B&&B**B&&Bk6��%A))A%%A))A%�XJ55!X���<�\��5!<�nn<����5!5!<� �^^�^^>I�5!>�ISS�c����"&'732667,x�g&A��??��A&g��=?C$++$C?=��M��
&&5467�arraRYQQY�V捍�VAW�wv�W~�M��
'6654&'7�RYQQYRbqq�AW�vw�WAV捍��h��!#3�(���\N�@Nh�h��53#5!h��(�N�N��j�h��/"&546654&&'5>54&&54633#"33�`Z<66<Z`M)>(/55/(>)�=Q$53!V"36#Q=N*(O,93		39.L)*Ni�h��/532654&54675&&54654&##532#i)>'.66.'>)M`Z<66<Z`�N*)L.93		39,O(*N=Q#63"V!35$Q=J�`�3JI{���f���m�3��J�`�3���{I�f���m�33낂����H0��H@[67'7'7737'�@a��N��a@t[,�DG+��+GD�,�Y����5'37'�	��	v	��	Pv	��	v��Y����75'75'37'7'�	��		��	v	��		��	P�	v~~v	��	v~~v	�G���1>"&'732654.5467&&54632&&#"654&&'7j"T3<&=C=&-%
^T:]D86'?E?'+)b� 4=$6O(%T)+K3+A/&D)DU)\' -@-,A&C[�!% ( 0���
%"&&5466333 AnAAlA*4��4hLTb)�9���$��w���&Ȍ�t��>���'��v����D�$=I7&>54&#"'6632"&54632&>54&#"'6632"&54632N	%AJ'?V! 4+99++99�	%AJ'?V! 4+99++99�/G;7
TI>+@314!��9-,88,-9/G;7
TI>+@314!��9-,88,-9<��D�$*6%&>54&#"'6632"&54632'3"&54632f	%AJ'?V! 4+99++99���0+99++99�/G;7
TI>+@314!��9-,88,-9����9-,88,-9���$*67&>54&#"'6632"&54632'3"&54632N	%AJ'?V! 4+99++99��0+99++99�/G;7
TI>+@314!��9-,88,-9����9-,88,-9@����(7''36654&#"'6632"&54632�
v%<,&<Q(v<Af;$54"8(44('44��\\(1((+K.1(J41D1%$��7))77))7\�F�(%#753267#"&&54>'2#"&546q
v%<,&<Q(v<Af;$54#8(44('44�\\(1)(+K.1(K31D1%$7)(88()7���3!#�(��N��h��!#5! �(qN�A�z�{33�p���MNh�z�{533h�p�N�����h��!#3%3#�\����11�\N�@NN�h�h��53#5!'3#h��\�11�N�N��N����!#�'��N��h��#5! �(\N�V�h�33�p�����Nh�h�533h�p�N`�R��E�;"&&546632'26654&&#"7"&&546632&&#"3267,L�MM�LL�MM�LAb66bAAb66bM2N-1O-'57%'&!/7	Q�gh�OO�hg�Q=D{RRyCCyRR{DK0Y<;V/=
>,3<
D��E�,4"&&546632'26654&&#"'32##53254&##,L�MM�LL�MM�LAb66bAAb66b:�+F)*F*<	Q�gh�OO�hg�Q=D{RRyCCyRR{DWm901@[�@e7��)2"&&546632'2654&#"'532#'#532654&##+6Z66Z67Z55Z7?QQ??QQY#.*<74[;;[44[;;[41SFFSSFFS8� "M<<d��jR�5#53#333773#57##'#BO�Nqg""gT5:6j�WW�:^GG^��`s��s`��^R�&:"&'73254&''&&54632&&#"733773#57##'#k!72#*%>7 8,") Bng""gT5:6^<	*&);=
	

(%(?:^GG^��`s��s`�m&�/9".546632#'##"&&5466754&&#"32672675S<oV3R�QLa.N<)$:!=pL:-/Z;=a6-;**U$F9�1b�f��SAoE��3#&?'6E(	%@'>�nh�CIK\$!��&�0:".54>32#'##"&&5466754&#"32672675S<oV31Vo=I^-N<)$:!=pL?>#G<$=a6-;**U$F9*T�W\�T(;c<��2#&?'6E'
)?=eHTo6I[
$"F�37#7#537#53733733#3##7#�i
h�KW
P\TiTOZT_Uhn�y�^n^����^n^���T�'7'7737'�@R��N��R@e,�8H �� H8�,~|��675!|`�oo��|��6���|��6�@���'-3'7&&'77.54632237&&'#74&'27"W'L@3)N2wdX"7I*O47iM`J�Es
�
#dr)@1L[�
�$Th*A11P.�
a,	Z��l�
�2���x���2���x�
�2���l�
�2���x�
2���l��2���l�
2���x��2���l�
2���l�
2����X2���}X2���ol�2����v�	2�:��"&54632'2654&#",KbbKKbbK))**�nbbllbbnR8FE66EF8��F��535#566733�ym08Ui�Z�C��Z��F��'6654&#"'6323�Yf# -$=>aEUD8��9A]$!08QF>0S1Z��:��'"&'732654&#52654&#"'6632*7XA.&25*/!&= I1'B(B&+-I�''3>7# 0"<1#$6��F��53533##5��Ok\_::_d6'�ddGVV��:��"&'732654&#"'7!#6632*7WA.&. -�
%>&[�''3" �[79(:M��:��
$"32654"&54632&&#"66321$)"4T]f[/:*$.01=G'C

)$6�p\^tD

71B9'>$��F��>7#5!�2#�:.3�=_[4[::fkA��:��$0"&54675&&54632'6654&#"2654&',HX,%#!V=@SE()X7""/!"�@."3*299293%.A��
��:��%73267&&#""&'73267#"&546632�!#(#%.=*%/.1=G'D*T\dQ
)$��D71B9'?$q\]t���&.54667J'11'O/))/��/U]<<]V.(?uA@v?���}&'6654&'7P/))/P'00��(?v@Au?(.V]<<]U�=l��"&54632,%%%%�$%%$��v��'66'#"&54632�&(''HA��7
#"a9Q����D"&54632'2654&#",@TT@@TT@\MNYYNM\O'33%%33'��8!5#56673Q&*S�@����D356654&#"'66323�>T>A(;G2\7)L#8$:3"AW����D%"&'732654&#52654#"'6632-F#)-#& '#*E(2E#NB7	>1(!
&,8��D7573533##5�`LMA^33^=3��XXB==����8"&'732654&#"'73#6632."D#)++Յ
2;LB�X#3..@����D"%"3254"&546632&&#"66321
$GO%I6 7*
&"'.6G� �^I-M/=."0..B��83>7#5!�&�&(-HE'W8+MS5����D$/"&54675&&54632'654&#"2654&',;K'J35I#K.
6% !)22)
$$%6�

�

����D	#%3267&&#""&'73267#"&54632%
	#!6)
&!'-6G6GO%I���<
-!
0./A^J,M/����&&5467B3993OS+(Y8xOOx70am7i/����'6654'7O)*SO399Y0/i7ma07xOOx�lz"&54632,%%%%	%&&%�}vz'66'#"&54632�&(''#%A�8$#3/9P���+�{
7���7�o7���7�{7���+�{
7���7�{7���+�o7���+�{7���7�o7���+�{7���+�{7������7������7���.l�7����v�7���o��)���o��J���o��7�o��""&5467&#"'6632#'#'2675�2<ep93%#Q*DNS:#?2o<(3?+DIM�$N8�o�K"'##36632'2654#"O0)	Qh/>H)A>#8
o+#�u2\L8P*T+1U�
	�o��"&&546632&&#"3267[2P/4U1"50

'//$ )@o)M67M*@1)(1@�o�K "&546632'53#'#72675&&#"@L)A$&gT0
$ o\P6N*1t�, T�	)./+�p��"3&&"&&546632#3278*�#3T10N-ON�5%**"Gz  ��(M74M+\B">�w�R5#5754632&&#"3#JJGO3#<oow�M
8LK3
Q�����+7F%"&5475&&54675&&5466323##"'3322654&#"2654&##"&'@W4(B%�AP;
6<BGlV&1(	,�(+' 
,(5K:4
(,4C0�	
�w�K36632#54&#"�h5$83hw�u=I>˾��w�k5#53"&54632&}�7&&''w�Q��v"$$"���k7"&'732655#53"&54632�0"~�D)&&''�
I	 #�Q��(E*�"$$"�w�K3373#'�hqr|�pQ-w��~��~-Q�o�K"&5#533267zC=E�

&oL>Q��P0w"�!3366326632#54&#"#54&#"0T.""-
2"73hhwJ+"J=˾ܾ��w��336632#54&#"�U5%83hwJ+I>˾��o��"&&546632'2654&#",,L//L,,L//L,  o)M67M**M76M)S1()11)(1����7336632#"&'72654#"�U3>G)A%(4#8
��!\L8P*3_�+1U�
	���� %57#"&546632373'2675&&#"]-@L)A$*Q�
$ �c0\P6N*"�>��	)./+�w��336632&&#"�V@#
6wJI)(W#,��o��&"&'732654&'.54632&&#",)T/504"PF+E/,0-5#Ro?		&/:=
	%.>�o�""&55#57733#327mPBEJ
W��!"4oQAoMaaQn%J�o��"&553326753#'#�83hhU5oH=���.tw��
3366773�yh0

0cuwJ�33���&w�337733773#''#xRf&S(_OxwI�dd��dd���ZZ|w��7'3366773#'&&'#|oholioo"		w��4

4��44����7"&'7326773366773��h/(ctC�M@�//���@>�w��	57#5!3���#��w7�Q7�Q�p��
"'7"3&&"&&546632#327:}Fl7*�#3T10N-ON�5%**"G�nD��  ��(M74M+\B">�p��
"'7"3&&"&&546632#32704kGv*�#3T10N-ON�5%**"G�2�D�  ��(M74M+\B">����2"3&&"&5467#"&&546632#326732678*�#'".3T10N-ON�5%("1 
	*z  �d""&(M74M+\B" 
=(/
�p��"&54673&&#"'6632'267#'OP�/#)"G1N//M0&�%p]C">)M74M+N!!�w�N4632&&#"6632#54&#"�CI.5$83hwR:KL?H>�� �����%%"&54673366773'2654&'#/1:hh*
)ce91





�6,-�""��� -,6@�w�M5&&546632&&#"1@/M-3H3+ +3?w�$I7.<"A!7$��o��"&546632373#'#72675&&#">M)B%2&	PT2
$!o\P6N))!�� T�	)./+����+%"&'732677#"&546632373'2675&&#"H#3$#->M+B#,S\A
%"�C
&\F2K)��@D�
p	)(')�w�k	535#533"&54632�tf�j�&&''wQ�Q�Qv"$$"���ol�'2���@53ب�HH���=5!�
�AA>�=5!>��AA$?4S)7'7&547'76327'#"'72654&#"mIQ"!PIY0642YIQ"RIZ46/e$22$$22?JR.A?.RJZZJR-@!7RJ[N5-,66,-5@���+773254.546753&&#"#5&&@@/W/J*CJC*XLb4MI#?)E*BKB*WSb1hsd!-*>.AV��+ T.)>.?]��)C&�)356654'#57&&546632&&#"3#!C4BpT;gB>Y#O,07��#[P5
V)?\2*'P.0$[
$4|9{35#535#5333667733#3#⩩����==�������F7F%�!B !B ���F7F�-��G�1"&'#57445447#576632&&#"3!3#3267}f�?67A�j3_%Q4 2B�����D1#6Q(evqDEny(&O<8J
J8=L,0`���!5&&5466753&'66757av8a>Q'?C$;E"�%#$$)_
�mGhB
a]Z��]_\-A�@.��&�&"&'7>77#5737>32&&#"3#�!2
 WK/VE;&'s'Q`	l=9�e+I[+n+#7k�<a9O��3�/5"&7&&5467722327&&'667'7&&'o	13�JY�m23
7(Q
0)Q%X534")%&�c���s!�u��h\fl*O�kL(.c\j�a8]eC&�035667#573&&'#57&546632&&#"3#3#!C.?pOZC;gB>Y#O,07����#[B,D

E?\2*'P.0J
J*|<{#'+3'5#575#57533533#3##'#73'#'3'#3'#�"*SFFFF�TPjEEEE�TP�#�>1�0=
zz���626����<2<���m|<222K{3#575323###3&&#3267#eQQ�;dC
CB
De:,�
6,"",7
�|U� G=[9I#�H&"�'"P{!'3'#573373333###'377#377#*� KD �#w&w?E�A
�ꉉ�"9������?��"��h�((��(([2�)-%"&5466323'5#53533#'#'2675&&#"5!N]4P+$0��yHHd	;#"2*��tc[8P+CJ11D�n%ao+&/-�JJK{',13#575#575323#3###4&'#364'3&#327#eQQQQ�O|K??K}N,����|>"">}Y5.5�9F;
	;C?��
-	}##�&C���#5.5466753&&#"3275#53&Bf;9gCbU=Q4 AGK@#L�I)nfP�_\�U
he@Pqegm
zx��$f5gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf000064400000273670150403134130023435 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf000064400000267764150403134130024240 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf000064400000416670150403134130025251 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml000064400000000260150403134130023736 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/index.rhtml000064400000001100150403134130021417 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_footer.rhtml000064400000000536150403134130021761 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/class.rhtml000064400000012751150403134130021433 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml000064400000000535150403134130024132 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml000064400000000516150403134130024061 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml000064400000000503150403134130023775 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml000064400000003011150403134130024003 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml000064400000002143150403134130023605 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml000064400000000640150403134130023613 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml000064400000000703150403134130023756 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/js/search.js000064400000006031150403134130021467 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/js/darkfish.js000064400000004504150403134130022020 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml000064400000000671150403134130023622 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/servlet_root.rhtml000064400000003405150403134130023051 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/tag_green.png000064400000001145150403134130023157 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png000064400000000317150403134130025267 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bug.png000064400000001406150403134130022001 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/brick.png000064400000000704150403134130022316 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png000064400000000317150403134130023240 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_green.png000064400000001155150403134130023321 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_white_text.png000064400000000526150403134130024406 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_green.png000064400000001155150403134130023321 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/delete.png000064400000001313150403134130022463 0ustar00��C�9�A��x�y���轍y3t�-�;��w^�t'I����WM����eС*>��W����i!�Gc��{s��ގl6�IEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_white_text.png000064400000000526150403134130024406 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/add.png000064400000001335150403134130021755 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/delete.png000064400000001313150403134130022463 0ustar00�PNG


IHDR�agAMA��7��tEXtSoftwareAdobe ImageReadyq�e<]IDAT8˥��KSa�[���n��QP��2w��ܦγL�[,bi��a�A��\�C��v��_2Ml�ZFjס���NMjm��kʷ�`&.#z�����<ϓ ���bV��P�T3�%�I��{G��qRiv��gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/package.png000064400000001525150403134130022621 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/add.png000064400000001335150403134130021755 0ustar00�PNG


IHDR�agAMA��7��tEXtSoftwareAdobe ImageReadyq�e<oIDAT8˥��K�a��[�/���Y(�)%X(o�l��Nۖsk��n.���-����h�;8�f���E��P��"jï��MGˈ�}yພ羹�$I���.t�u���lu���	AX��:�𼂒Z�H�h1�D�nZJ�OJB��{�Z����?�`2`��S���=�N$��ő�=;��a��&j�w��q�JG�#�<"N���2h8�޵`��6���x�ցn_+~��Zto��}`���xgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_black.png000064400000000323150403134130023644 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/package.png000064400000001525150403134130022621 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/tag_blue.png000064400000003530150403134130023006 0ustar00p���#�LRi4�Q�j��h�]��G�S\���;Q���Ƥ��B�H��`�1����@<Ѐd�^�{�9�]� �!���"���dlǁD�	@|0mp��
���Q���
a+��k��K7����
�"$���� h$?$�B�r�N#&Cif
�N�7�S���V[�6��l�a�L/Hb�F�6�t����X�=�ֽɕد}��GO�|뻗zU�C5r���h�8�D>��)4V�w���ͦ�|�"������L\>2�FΫ�[�^y�jW��?�'q{�g�Bi��o�.��ȧ��T��c��t�ܲ^&��IEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_black.png000064400000000323150403134130023644 0ustar00�PNG


IHDR��7�gAMA��7��tEXtSoftwareAdobe ImageReadyq�e<eIDAT(�c�π2.�R�
�We��7JaWА�����\
X�]��?���XH^��?���
��7��3`��[����*60H
ڐ��s���VIEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/tag_blue.png000064400000003530150403134130023006 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/transparent.png000064400000000141150403134130023560 0ustar00����%׎��ŷ��Q�麲�ua��n�7��m�Q���H^e�O�Q�u6�S��u�2��%vX���^�*l
O�—����ޭˀq,gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif000064400000013376150403134130024473 0ustar00�F��_�Z�>���lhR���lޢl�k1��<\�ؼ
��*��q:����Z�UB:������{ے�ܡP�@M���elۀ^��z�>�:�D"1�iX��Z
{�e<��)iJl�
E�n)�ev��`PO�y����db=;;C��X��.�c���k�1k&8�j���ר_���d��{~?j�c�fi�R�ԡs�b��O����A����9��&�yd�V;�8�����$�p.r�=�XL���v�}�@!Oa�X,*�C�;���z�����J��n���Y�T��a�B��!�^�L{n�7��k���IEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/transparent.png000064400000000141150403134130023560 0ustar00�PNG


IHDR%=m"PLTE������tRNS@��fIDATc` 
0���zIEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif000064400000013376150403134130024473 0ustar00GIF89a�
���������������������������������������������������������������!�NETSCAPE2.0!�
,�
� �@Ri�h��l�p,�tm�#6N���+�r��rD4�h��@F�Cjz]L�����j�]﹬�R���3-���H$w�Py���|KI��������\K�������Q\���]P��I������������~$�
~�	
��������������������������J�������������������%:`���@X�P@AO	2|�(�D��**�H�E�}l�F�=��$��Ƌ@\9��L�J(��)?�

``��C�=�4�RO@�>}5�TDU�^=�U�Q�H�~���X�e���֫��:<��!���b`�^O�v��y':<�/%Ƅ��E��n`ʎ3A�����Ɗ�~�`�۸Rf*�4�L����E3��DZ�[�����FU��պ�g*>|Ao��G��4Q�]���V;��ޙ
<��G)��}����SvO�<}��&p���y��]�Xg
X�
�`�"1���A� fJh!�B2�8'�m
��uљtbj)򖜊��H	s6.7�L;jԣJ?���p6���l�@k[���-)��P��V�X���fQ9�{f�ĥZ^v	&��0�
l���p�)g9P!�
,�� EMb��T��5+��k��sl�y���[�J;��w3iH�ʒ:�Q��X�R$�Á��511��@��eg;=��(g�ڙ��n%pf�"�|��w}��zv[xE%`	+�%		�����1"	
��������1������������������Ʒ�1��++�'i1֘~���~������%�t����"�����������ݫ'�$|dЉ'N�7o%p�Dz�:�)�D����H�$��D��E��tl���̑5żlP�4	#��y��5��S�RzC>� j��U���z�ҧ]�$�j�QM
ʆķ��772�1@ܒ�DH�;܋%Ѕ���q��ۛX���M�g����Nά�g�MWz!`���d���ѥ]���uj��a��}�aݸ�6;�5լD�zT�h,5�~�z~�@y[�:�3M�7�g�G�]�����q�=@c5

4�u����흃�5_���_9���_A�Mt�B\���Kⵘ}" @l��D�i��Qu�+b�aq&��{#'�L�H�jz��"$&�� �$B!�
,�� EI���@*�P�R*;ò[������L���l7DҎ�%�G�I�0)���m��IԲ�����`��I��}>ă�}-R�wFu�}y�|O�(p�*�"�rt�{R��A>(
�^(		�"��4���	
����3������������3��3���.�.����Чɞ

v.*o3��u���z���z����(�	����D���.��z�Ha ���р�P����*6���=�%������8��A%ϤH�]J��Q&����2�L��z�녆Aɔ>50j�(�]�T�.�s
�*�I�@m:n�Tx^7�}�v(�H�y�!8�/�
��4^ֹ��Gi`z��A�"��?l�8�]�'STҧX�*3��@X��MS<@�蜮-�.���/A��y5��|��U�v�۬�ϰ�V�r�4<A:\�4��bm��dv�i��{˿�ӛ�W��'7��n�����a��q{�"8V�_��u_^���2���_��[k��o�Tpbp
:��M
�s�k�x_"Vؓ��!�
,�� %R�4�y�ԬԢ���\�K���٩��l'#���Q�<�P:��A*�4� G����Z����L���nq�,���I�\��EoI�Uzqx#)��_"�"
����0��0���+�0�#��#�I�"����'�����2�0��	q�+��t�'����k���`���n�����܀�#�����|�2�aq�Vk������oE�f
NC��})Tǐ`���R8��ć=��5��&�D9�ۦZ�{�@滗1M�۴��͇)�Ty��N39]Ʊ�A�o���V
j�>Z0ՠV�T�y����ïe�]U���4�f!P�c0z��kW+_��^��ў`v�"�Ŋa@x:@O,��Ȭt�K5�z�sR�tH5�y3�ʥ�>yz=�3[/�Z|��&�����x@��7n��Gd�n� �B�^��|{Z�C�N�3�Z�&$�p�{f�;^C}C���o� ���%!�
,�� %�$5��,%�:��k��.]�#>�����	�B"�ZRp�]2�S���hk�9�E�-�e<ͩ��k�Gj6�-��t������wsz|m���OQti����x��41
)
�U"		���	�B������Q
��������B������)��������#����B+u���	�)�ێ����#��������"�����p��g�߿=�Q�Ǎ��P�aQ��*֑X�b<88����l$�����Q,?�	y2��=0յT#r�Η5��
�9`jLmgT�J�2��M�Wy6�jukիK�y�0�i��P0J�Cg&(`���oq]�혗']u}C* ���^\sx�a��GtKpeÈa�@��j�v�l�g�V�D�z$�ͣQ�>m�b��1�����6�}�4 @�l�`Ѫ�zvs�Gt�2y֐��/V+��S��NJ=^����"�+Y �	09ڛ>0}���Lj��`���ab�q�O
��'8^�X�d����|5 [��ahW�Y��7֑W6!��i���!��qHX�&�(@�3�&B!�
,�� Q$�@RS��"��	�k;��	S�]�3X'���+�ζS
���tUi���k���`��m��0���c�]���w��l��dt$v}��k~zq,l��ryu�x��?)B��		����
�����;	�0��0�����;�����+	��­�����G�0-g��+�	���.z�����%�������$��z��������+�l�(jx�9hN����t�<�; 8O��7�y�xH#�|�����bH�$ѼLip�ȅѐ�
��2"��-��A��(���P�$��tj�@{��s(W��$( ��=�!u�5��(�jm�nwmĸo����A���@w/��������d�1+:'���l��1�f��#�|,z2�0Hg�������@1}�թٯ�[��3�S�+|�7U�ǃ�.�{��P卵0ʶc=+PL�0�3�:~���p��'����v{��O��n<����~)�@��u�P6
��k(����àK'v�K
V�`I�9(Z�L�G!!�
,�� �PeRN*�'�,Ԣ���v*�o<�����bK�s M��3�k>o�����R��sAE1f�m):��k��v���v�M{w�l
��r�tqPm�|��uF~�?W	a3�&
���A�6��������6	�-�����3���-	����.�,����6o3/hgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/find.png000064400000001223150403134130022141 0ustar00�4O���P4�u8S
g֥_�n�;Ө՞�(�բQ�)����wǮ<.�(��ʳ2?�����eG��|L�Յ"x�/��-���/�y��+,�p=E��1�� �d�Q��ٷ�~��2Kꔛ$���r
`m*Ys�C
zFn� ak}��nn��I#�����Q!�
,�� %R�4��Ԝ"CA,���(~ں8׼د��DA֐���2hs��݌�+�p]���ˤ�Ob��K��w8^>��u�z�`�H~htkv"x�m��|1Z,
���-���#�5��1"�1�����'���'�[�#����,�
��,},�'�	p�#��h�1�w���a�������"��������w��#�p�"b�1��V-��ak�c���B�)��P@�;�]Xq�Č#N�-A�"߲Syr����L�4eM�ʚph�\@�e�q/o��	���D2(𯘳q��s:g��u@��Fu+��Q�AU���ӯZ��#xbR����4�v�G1��
M�����ɻ���;8F�P`B۩3he�11O~�	�˟��>z�(�C�3���A=��\���Z-�ڇ�A����a��-qiS�R�����Ym�G�(�1���;��Ž��gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/plugin.png000064400000001117150403134130022521 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/find.png000064400000001223150403134130022141 0ustar00�PNG


IHDR�agAMA��7��tEXtSoftwareAdobe ImageRegems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png000064400000000321150403134130025112 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/plugin.png000064400000001117150403134130022521 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/wrench_orange.png000064400000001110150403134130024035 0ustar00�`�!w������2/��L.�\��c�Ie��صf|��Ĕ�b��`���M �o��w=��_��m�6E�XIEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullegems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/zoom.png000064400000001264150403134130022212 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/wrench_orange.png000064400000001110150403134130024035 0ustar00�PNG


IHDR�agAMA��7��tEXtSoftwareAdobe ImageReadyq�e<�IDAT8˕��kSQ��8H)N]uA,����w��j�azcbb6���&�	Qcn^b4b2e	�l� x�W�
}$�����9gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_white_width.png000064400000000465150403134130024543 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/zoom.png000064400000001264150403134130022212 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/arrow_up.png000064400000000564150403134130023066 0ustar00����������A�!C�:����̼�}�nAH��~0b�M���36��+�/痗����s�IĢ̾�����Ek����J{�v��!���=_�M�yK�b]�ö�a��{6W�03�<U��=�c�@_��@,�/fg�kM�q�?)�+��H�IEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/brick_link.png000064400000001374150403134130023337 0ustar00�PNG


IHDR��7�gAMA��7��tEXtSoftwareAdobe ImageReadyq�e<�IDAT(υ�A�0E��֕n\x���qob♼��R�w(���g�I�u2�U��5�S����6�VX���ʲJ6Yhl�Oe<�Ƥj�56�S&����5���n�2 ��,��be�%,r�[;�z�ֳ��
X`���<�Ɛ�dz�B����7|�!A��/�n2=V����Y����r�o� v��ZdIEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/arrow_up.png000064400000000564150403134130023066 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/wrench.png000064400000001142150403134130022507 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/brick_link.png000064400000001374150403134130023337 0ustar00�PNG


IHDR�agAMA��7��tEXtSoftwareAdobe ImageReadyq�e<�IDAT8�mRgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/date.png000064400000001162150403134130022140 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/wrench.png000064400000001142150403134130022507 0ustar00�PNG


IHDR�agAMA��7��tEXtSoftwareAdobe ImageReadyq�e<�IDAT8˕��oQ�_�[�c�+Wgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/ruby.png000064400000001120150403134130022176 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/date.png000064400000001162150403134130022140 0ustar00�PNG


IHDR�agAMA��7��tEXtSoftwareAdobe ImageReagems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml000064400000000572150403134130023445 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/ruby.png000064400000001120150403134130022176 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml000064400000000671150403134130024313 0ustar00��P�DP��y5�@Y�?i�܅��Sg��@'�˼Zj��_M�5���̻��w��.�;�'5�ڿ_���IEND�B`�gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml000064400000000705150403134130023624 0ustar00<%- if klass.type == 'class' then %>
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <%- if klass.superclass and not String === klass.superclass then -%>
  <p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a>
  <%- else -%>
  <p class="link"><%= klass.superclass %>
  <%- end -%>
</div>
<%- end -%>
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/css/rdoc.css000064400000024633150403134130021511 0ustar00<div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="<%= rel_prefix %>/index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="<%= rel_prefix %>/table_of_contents.html#pages">Pages</a>
    <a href="<%= rel_prefix %>/table_of_contents.html#classes">Classes</a>
    <a href="<%= rel_prefix %>/table_of_contents.html#methods">Methods</a>
  </div>
</div>
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml000064400000000705150403134130023624 0ustar00<%- unless klass.extends.empty? then %>
<div id="extends-section" class="nav-section">
  <h3>Extended With Modules</h3>

  <ul class="link-list">
    <%- klass.each_extend do |ext| -%>
  <%- unless String === ext.module then -%>
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf000064400000273670150403134130023435 0ustar00

.hide { display: none !important; }

* { padding: 0; margin: 0; }

body {
  background: #fafafa;
  font-family: Lato, sans-serif;
  font-weight: 300;
}

h1 span,
h2 span,
h3 span,
h4 span,
h5 span,
h6 span {
  position: relative;

  display: none;
  padding-left: 1em;
  line-height: 0;
  vertical-align: baseline;
  font-size: 10px;
}

h1 span { top: -1.3em; }
h2 span { top: -1.2em; }
h3 span { top: -1.0em; }
h4 span { top: -0.8em; }
h5 span { top: -0.5em; }
h6 span { top: -0.5em; }

h1:hover span,
h2:hover span,
h3:hover span,
h4:hover span,
h5:hover span,
h6:hover span {
  display: inline;
}

h1:target,
h2:target,
h3:target,
h4:target,
h5:target,
h6:target {
  margin-left: -10px;
  border-left: 10px solid #f1edba;
}

:link,
:visited {
  color: #6C8C22;
  text-decoration: none;
}

:link:hover,
:visited:hover {
  border-bottom: 1px dotted #6C8C22;
}

code,
pre {
  font-family: "Source Code Pro", Monaco, monospace;
  background-color: rgba(27,31,35,0.05);
  padding: 0em 0.2em;
  border-radius: 0.2em;
}

table {
  margin: 0;
  border-spacing: 0;
  border-collapse: collapse;
}

table tr th, table tr td {
  padding: 0.2em 0.4em;
  border: 1px solid #ccc;
}

table tr th {
  background-color: #eceaed;
}

table tr:nth-child(even) td {
  background-color: #f5f4f6;
}

/* @group Generic Classes */

.initially-hidden {
  display: none;
}

#search-field {
  width: 98%;
  background: white;
  border: none;
  height: 1.5em;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  text-align: left;
}
#search-field:focus {
  background: #f1edba;
}
#search-field:-moz-placeholder,
#search-field::-webkit-input-placeholder {
  font-weight: bold;
  color: #666;
}

.missing-docs {
  font-size: 120%;
  background: white url(../images/wrench_orange.png) no-repeat 4px center;
  color: #ccc;
  line-height: 2em;
  border: 1px solid #d00;
  opacity: 1;
  padding-left: 20px;
  text-indent: 24px;
  letter-spacing: 3px;
  font-weight: bold;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
}

.target-section {
  border: 2px solid #dcce90;
  border-left-width: 8px;
  padding: 0 1em;
  background: #fff3c2;
}

/* @end */

/* @group Index Page, Standalone file pages */
.table-of-contents ul {
  margin: 1em;
  list-style: none;
}

.table-of-contents ul ul {
  margin-top: 0.25em;
}

.table-of-contents ul :link,
.table-of-contents ul :visited {
  font-size: 16px;
}

.table-of-contents li {
  margin-bottom: 0.25em;
}

.table-of-contents li .toc-toggle {
  width: 16px;
  height: 16px;
  background: url(../images/add.png) no-repeat;
}

.table-of-contents li .toc-toggle.open {
  background: url(../images/delete.png) no-repeat;
}

/* @end */

/* @group Top-Level Structure */

nav {
  float: left;
  width: 260px;
  font-family: Helvetica, sans-serif;
  font-size: 14px;
  border-right: 1px solid #ccc;
  position: sticky;
  top: 0;
  overflow: auto;
  height: calc(100vh - 100px); /* reduce the footer height */
}

main {
  display: block;
  margin: 0 2em 5em 260px;
  padding-left: 20px;
  min-width: 340px;
  font-size: 16px;
}

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  font-family: Helvetica, sans-serif;
}

.table-of-contents main {
  margin-left: 2em;
}

#validator-badges {
  clear: both;
  margin: 1em 1em 2em;
  font-size: smaller;
}

/* @end */

/* @group navigation */
nav {
  margin-bottom: 1em;
}

nav .nav-section {
  margin-top: 2em;
  border-top: 2px solid #aaa;
  font-size: 90%;
  overflow: hidden;
}

nav h2 {
  margin: 0;
  padding: 2px 8px 2px 8px;
  background-color: #e8e8e8;
  color: #555;
  font-size: 125%;
  text-align: center;
}

nav h3,
#table-of-contents-navigation {
  margin: 0;
  padding: 2px 8px 2px 8px;
  text-align: right;
  background-color: #e8e8e8;
  color: #555;
}

nav ul,
nav dl,
nav p {
  padding: 4px 8px 0;
  list-style: none;
}

#project-navigation .nav-section {
  margin: 0;
  border-top: 0;
}

#home-section h2 {
  text-align: center;
}

#table-of-contents-navigation {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
}

#search-section {
  margin-top: 0;
  border-top: 0;
}

#search-field-wrapper {
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  padding: 3px 8px;
  background-color: #e8e8e8;
  color: #555;
}

ul.link-list li {
  white-space: nowrap;
  line-height: 1.4em;
}

ul.link-list .type {
  font-size: 8px;
  text-transform: uppercase;
  color: white;
  background: #969696;
  padding: 2px 4px;
  -webkit-border-radius: 5px;
}

dl.note-list dt {
  float: left;
  margin-right: 1em;
}

.calls-super {
  background: url(../images/arrow_up.png) no-repeat right center;
}

.nav-section details summary {
  display: block;
}

.nav-section details summary::-webkit-details-marker {
  display: none;
}

.nav-section details summary:before {
  content: "";
}

.nav-section details summary:after {
  content: "  \25B6"; /* BLACK RIGHT-POINTING TRIANGLE */
}
.nav-section details[open] > summary:after {
  content: "  \25BD"; /* WHITE DOWN-POINTING TRIANGLE */
}

/* @end */

/* @group Documentation Section */
main {
  color: #333;
}

main > h1:first-child,
main > h2:first-child,
main > h3:first-child,
main > h4:first-child,
main > h5:first-child,
main > h6:first-child {
  margin-top: 0px;
}

main sup {
  vertical-align: super;
  font-size: 0.8em;
}

/* The heading with the class name */
main h1[class] {
  margin-top: 0;
  margin-bottom: 1em;
  font-size: 2em;
  color: #6C8C22;
}

main h1 {
  margin: 2em 0 0.5em;
  font-size: 1.7em;
}

main h2 {
  margin: 2em 0 0.5em;
  font-size: 1.5em;
}

main h3 {
  margin: 2em 0 0.5em;
  font-size: 1.2em;
}

main h4 {
  margin: 2em 0 0.5em;
  font-size: 1.1em;
}

main h5 {
  margin: 2em 0 0.5em;
  font-size: 1em;
}

main h6 {
  margin: 2em 0 0.5em;
  font-size: 1em;
}

main p {
  margin: 0 0 0.5em;
  line-height: 1.4em;
}

main pre {
  margin: 1.2em 0.5em;
  padding: 1em;
  font-size: 0.8em;
}

main hr {
  margin: 1.5em 1em;
  border: 2px solid #ddd;
}

main blockquote {
  margin: 0 2em 1.2em 1.2em;
  padding-left: 0.5em;
  border-left: 2px solid #ddd;
}

main ol,
main ul {
  margin: 1em 2em;
}

main li > p {
  margin-bottom: 0.5em;
}

main dl {
  margin: 1em 0.5em;
}

main dt {
  margin-bottom: 0.5em;
  font-weight: bold;
}

main dd {
  margin: 0 1em 1em 0.5em;
}

main header h2 {
  margin-top: 2em;
  border-width: 0;
  border-top: 4px solid #bbb;
  font-size: 130%;
}

main header h3 {
  margin: 2em 0 1.5em;
  border-width: 0;
  border-top: 3px solid #bbb;
  font-size: 120%;
}

.documentation-section-title {
  position: relative;
}
.documentation-section-title .section-click-top {
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 10px;
  color: #9b9877;
  visibility: hidden;
  padding-left: 0.5px;
}

.documentation-section-title:hover .section-click-top {
  visibility: visible;
}

.constants-list > dl {
  margin: 1em 0 2em;
  border: 0;
}

.constants-list > dl dt {
  margin-bottom: 0.75em;
  padding-left: 0;
  font-family: "Source Code Pro", Monaco, monospace;
  font-size: 110%;
}

.constants-list > dl dt a {
  color: inherit;
}

.constants-list > dl dd {
  margin: 0 0 2em 0;
  padding: 0;
  color: #666;
}

.documentation-section h2 {
  position: relative;
}

.documentation-section h2 a {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 12px;
  color: #9b9877;
  visibility: hidden;
}

.documentation-section h2:hover a {
  visibility: visible;
}

/* @group Method Details */

main .method-source-code {
  max-height: 0;
  overflow: auto;
  transition-duration: 200ms;
  transition-delay: 0ms;
  transition-property: all;
  transition-timing-function: ease-in-out;
}

main .method-source-code.active-menu {
  max-height: 100vh;
}

main .method-description .method-calls-super {
  color: #333;
  font-weight: bold;
}

main .method-detail {
  margin-bottom: 2.5em;
  cursor: pointer;
}

main .method-detail:target {
  margin-left: -10px;
  border-left: 10px solid #f1edba;
}

main .method-heading {
  position: relative;
  font-family: "Source Code Pro", Monaco, monospace;
  font-size: 110%;
  font-weight: bold;
  color: #333;
}
main .method-heading :link,
main .method-heading :visited {
  color: inherit;
}
main .method-click-advice {
  position: absolute;
  top: 2px;
  right: 5px;
  font-size: 12px;
  color: #9b9877;
  visibility: hidden;
  padding-right: 20px;
  line-height: 20px;
  background: url(../images/zoom.png) no-repeat right top;
}
main .methogems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/css/fonts.css000064400000014364150403134130021713 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf000064400000273670150403134130023435 0ustar00t-family: Lato, sans-serif;
  font-weight: 300;
}

#search-results .search-match {
  font-family: Helvetica, sans-serif;
  font-weight: normal;
}

#search-results .search-selected {
  background: #e8e8e8;
  border-bottom: 1px solid transparent;
}

#search-results li {
  list-style: none;
  border-bottom: 1px solid #aaa;
  margin-bottom: 0.5em;
}

#search-results li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

#search-results li p {
  padding: 0;
  margin: 0.5em;
}

#search-results .search-namespace {
  font-weight: bold;
}

#search-results li em {
  background: yellow;
  font-style: normal;
}

#search-results pre {
  margin: 0.5em;
  font-family: "Source Code Pro", Monaco, monospace;
}

/* @end */

gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/css/fonts.css000064400000014364150403134130021713 0ustar00/*
 * Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
 * with Reserved Font Name "Source". All Rights Reserved. Source is a
 * trademark of Adobe Systems Incorporated in the United States and/or other
 * countries.
 *
 * This Font Software is licensed under the SIL Open Font License, Version
 * 1.1.
 *
 * This license is copied below, and is also available with a FAQ at:
 * http://scripts.sil.org/OFL
 */

@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 400;
  src: local("Source Code Pro"),
       local("SourceCodePro-Regular"),
       url("../fonts/SourceCodePro-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 700;
  src: local("Source Code Pro Bold"),
       local("SourceCodePro-Bold"),
       url("../fonts/SourceCodePro-Bold.ttf") format("truetype");
}

/*
 * Copyright (c) 2010, Łukasz Dziedzic (dziedzic@typoland.com),
 * with Reserved Font Name Lato.
 *
 * This Font Software is licensed under the SIL Open Font License, Version
 * 1.1.
 *
 * This license is copied below, and is also available with a FAQ at:
 * http://scripts.sil.org/OFL
 */

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 300;
  src: local("Lato Light"),
       local("Lato-Light"),
       url("../fonts/Lato-Light.ttf") format("truetype");
}

@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 300;
  src: local("Lato Light Italic"),
       local("Lato-LightItalic"),
       url("../fonts/Lato-LightItalic.ttf") format("truetype");
}

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  src: local("Lato Regular"),
       local("Lato-Regular"),
       url("../fonts/Lato-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 700;
  src: local("Lato Italic"),
       local("Lato-Italic"),
       url("../fonts/Lato-RegularItalic.ttf") format("truetype");
}

/*
 * -----------------------------------------------------------
 * SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
 * -----------------------------------------------------------
 *
 * PREAMBLE
 * The goals of the Open Font License (OFL) are to stimulate worldwide
 * development of collaborative font projects, to support the font creation
 * efforts of academic and linguistic communities, and to provide a free and
 * open framework in which fonts may be shared and improved in partnership
 * with others.
 *
 * The OFL allows the licensed fonts to be used, studied, modified and
 * redistributed freely as long as they are not sold by themselves. The
 * fonts, including any derivative works, can be bundled, embedded,
 * redistributed and/or sold with any software provided that any reserved
 * names are not used by derivative works. The fonts and derivatives,
 * however, cannot be released under any other type of license. The
 * requirement for fonts to remain under this license does not apply
 * to any document created using the fonts or their derivatives.
 *
 * DEFINITIONS
 * "Font Software" refers to the set of files released by the Copyright
 * Holder(s) under this license and clearly marked as such. This may
 * include source files, build scripts and documentation.
 *
 * "Reserved Font Name" refers to any names specified as such after the
 * copyright statement(s).
 *
 * "Original Version" refers to the collection of Font Software components as
 * distributed by the Copyright Holder(s).
 *
 * "Modified Version" refers to any derivative made by adding to, deleting,
 * or substituting -- in part or in whole -- any of the components of the
 * Original Version, by changing formats or by porting the Font Software to a
 * new environment.
 *
 * "Author" refers to any designer, engineer, programmer, technical
 * writer or other person who contributed to the Font Software.
 *
 * PERMISSION & CONDITIONS
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of the Font Software, to use, study, copy, merge, embed, modify,
 * redistribute, and sell modified and unmodified copies of the Font
 * Software, subject to the following conditions:
 *
 * 1) Neither the Font Software nor any of its individual components,
 * in Original or Modified Versions, may be sold by itselgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/page.rhtml000064400000000657150403134130021244 0ustar00tware shall not be used to promote, endorse or advertise any
 * Modified Version, except to acknowledge the contribution(s) of the
 * Copyright Holder(s) and the Author(s) or with their explicit written
 * permission.
 *
 * 5) The Font Software, modified or unmodified, in part or in whole,
 * must be distributed entirely under this license, and must not be
 * distributed under any other license. The requirement for fonts to
 * gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml000064400000002005150403134130023244 0ustar00ENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
 * DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
 * OTHER DEALINGS IN THE FONT SOFTWARE.
 */

gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/page.rhtml000064400000000657150403134130021244 0ustar00<bodygems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_head.rhtml000064400000001561150403134130021363 0ustar00<%- simple_files = @files.select { |f| f.text? } %>
<%- if defined?(current) -%>
  <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%>
<%- end -%>
<%- unless simple_files.empty? then -%>
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
  <%- simple_files.group_by do |f| -%>
    <%- f.full_name[%r{\A[^/]+(?=/)}] || f.page_name -%>
  <%- end.each do |n, files| -%>
    <%- f = files.shift -%>
    <%- if files.empty? -%>
    <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a>
      <%- next -%>
    <%- end -%>
    <li><details<% if dir == n %> open<% end %>><summary><%
    if n == f.page_name
      %><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h n %></a><%
    else
      %><%= h n %><% files.unshift(f)
    end %></summary>
    <ul class="link-list">
    <%- files.each do |f| -%>
      <lgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml000064400000001221150403134130023411 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_head.rhtml000064400000001561150403134130021363 0ustar00<meta charset="<%= @options.charset %>">

<title><%= h @title %></title>

<script type="text/javascript">
  var rdoc_rel_prefix = "<%= h asset_regems/gems/rdoc-6.5.1.1/lib/rdoc/generator/markup.rb000064400000006412150403134130015471 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml000064400000001221150403134130023411 0ustar00<div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/markup.rb000064400000006412150403134130015471 0ustar00# frozen_string_literal: true
##
# Handle common RDoc::Markup tasks for various CodeObjects
#
# This module is loaded by generators.  It allows RDoc's CodeObject tree to
# avoid loading generator code to improve startup time for +ri+.

module RDoc::Generator::Markup

  ##
  # Generates a relative URL from this object's path to +target_path+

  def aref_to(target_path)
    RDoc::Markup::ToHtml.gen_relative_url path, target_path
  end

  ##
  # Generates a relative URL from +from_path+ to this object's path

  def as_href(from_path)
    RDoc::Markup::ToHtml.gen_relative_url from_path, path
  end

  ##
  # Handy wrapper for marking up this object's comment

  def description
    markup @comment
  end

  ##
  # Creates an RDoc::Markup::ToHtmlCrossref formatter

  def formatter
    return @formatter if defined? @formatter

    options = @store.rdoc.options
    this = RDoc::Context === self ? self : @parent

    @formatter = RDoc::Markup::ToHtmlCrossref.new options, this.path, this
    @formatter.code_object = self
    @formatter
  end

  ##
  # Build a webcvs URL starting for the given +url+ with +full_path+ appended
  # as the destination path.  If +url+ contains '%s' +full_path+ will be
  # will replace the %s using sprintf on the +url+.

  def cvs_url(url, full_path)
    gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/json_index.rb000064400000017205150403134140016335 0ustar00
              "<span class=\"line-num\">%2$*1$d</span> " % [size, line]
            end

      line += 1
      res
    end
  end

  ##
  # Turns the method's token stream into HTML.
  #
  # Prepends line numbers if +options.line_numbers+ is true.

  def markup_code
    return '' unless @token_stream

    src = RDoc::TokenStream.to_html @token_stream

    # dedent the source
    indent = src.length
    lines = src.lines.to_a
    lines.shift if src =~ /\A.*#\ *File/i # remove '# File' comment
    lines.each do |line|
      if line =~ /^ *(?=\S)/
        n = $~.end(0)
        indent = n if n < indent
        break if n == 0
      end
    end
    src.gsub!(/^#{' ' * indent}/, '') if indent > 0

    add_line_numbers(src) if options.line_numbers

    src
  end

end

class RDoc::ClassModule

  ##
  # Handy wrapper for marking up this class or module's comment

  def description
    markup @comment_location
  end

end

class RDoc::Context::Section

  include RDoc::Generator::Markup

end

class RDoc::TopLevel

  ##
  # Returns a URL for this source file on some web repository.  Use the -W
  # command line option to set.

  def cvs_url
    url = @store.rdoc.options.webcvs

    if /%s/ =~ url then
      url % @relative_name
    else
      url + @relative_name
    end
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/json_index.rb000064400000017205150403134140016335 0ustar00# frozen_string_literal: true
require 'json'
begin
  require 'zlib'
rescue LoadError
end

##
# The JsonIndex generator is designed to complement an HTML generator and
# produces a JSON search index.  This generator is derived from sdoc by
# Vladimir Kolesnikov and contains verbatim code written by him.
#
# This generator is designed to be used with a regular HTML generator:
#
#   class RDoc::Generator::Darkfish
#     def initialize options
#       # ...
#       @base_dir = Pathname.pwd.expand_path
#
#       @json_index = RDoc::Generator::JsonIndex.new self, options
#     end
#
#     def generate
#       # ...
#       @json_index.generate
#     end
#   end
#
# == Index Format
#
# The index is output as a JSON file assigned to the global variable
# +search_data+.  The structure is:
#
#   var search_data = {
#     "index": {
#       "searchIndex":
#         ["a", "b", ...],
#       "longSearchIndex":
#         ["a", "a::b", ...],
#       "info": [
#         ["A", "A", "A.html", "", ""],
#         ["B", "A::B", "A::B.html", "", ""],
#         ...
#       ]
#     }
#   }
#
# The same item is described across the +searchIndex+, +longSearchIndex+ and
# +info+ fields.  The +searchIndex+ field contains the item's short name, the
# +longSearchIndex+ field contains the full_name (when appropriate) and the
# +info+ field contains the item's name, full_name, path, parameters and a
# snippet of the item's comment.
#
# == LICENSE
#
# Copyright (c) 2009 Vladimir Kolesnikov
#
# 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:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# 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.

class RDoc::Generator::JsonIndex

  include RDoc::Text

  ##
  # Where the search index lives in the generated output

  SEARCH_INDEX_FILE = File.join 'js', 'search_index.js'

  attr_reader :index # :nodoc:

  ##
  # Creates a new generator.  +parent_generator+ is used to determine the
  # class_dir and file_dir of links in the output index.
  #
  # +options+ are the same options passed to the parent generator.

  def initialize parent_generator, options
    @parent_generator = parent_generator
    @store            = parent_generator.store
    @options          = options

    @template_dir = File.expand_path '../template/json_index', __FILE__
    @base_dir = @parent_generator.base_dir

    @classes = nil
    @files   = nil
    @index   = nil
  end

  ##
  # Builds the JSON index as a Hash.

  def build_index
    reset @store.all_files.sort, @store.all_classes_and_modules.sort

    index_classes
    index_methods
    index_pages

    { :index => @index }
  end

  ##
  # Output progress information if debugging is enabled

  def debug_msg *msg
    return unless $DEBUG_RDOC
    $stderr.puts(*msg)
  end

  ##
  # Writes the JSON index to disk

  def generate
    debug_msg "Generating JSON index"

    debug_msg "  writing search index to %s" % SEARCH_INDEX_FILE
    data = build_index

    return if @options.dry_run

    out_dir = @base_dir + @options.op_dir
    index_file = out_dir + SEARCH_INDEX_FILE

    FileUtils.mkdir_p index_file.dirname, :verbose => $DEBUG_RDOC

    index_file.open 'w', 0644 do |io|
      io.set_encoding Encoding::UTF_8
      io.write 'var search_data = '

      JSON.dump data, io, 0
    end
    unless ENV['SOURCE_DATE_EPOCH'].nil?
      index_file.utime index_file.atime, Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime
    end

    Dir.chdir @template_dir do
      Dir['**/*.js'].each do |source|
        dest = File.join out_dir, source

        FileUtils.install source, dest, :mode => 0644, :preserve => true, :verbose => $DEBUG_RDOC
      end
    end
  end

  ##
  # Compress the search_index.js file using gzip

  def generate_gzipped
    return if @options.dry_run or not defined?(Zlib)

    debug_msg "Compressing generated JSON index"
    out_dir = @base_dir + @options.op_dir

    search_index_file = out_dir + SEARCH_INDEX_FILE
    outfile           = out_dir + "#{search_index_file}.gz"

    debug_msg "Reading the JSON index file from %s" % search_index_file
    search_index = search_index_file.read(mode: 'r:utf-8')

    debug_msg "Writing gzipped search index to %s" % outfile

    Zlib::GzipWriter.open(outfile) do |gz|
      gz.mtime = File.mtime(search_index_file)
      gz.orig_name = search_index_file.basename.to_s
      gz.write search_index
      gz.close
    end

    # GZip the rest of the js files
    Dir.chdir @template_dir do
      Dir['**/*.js'].each do |source|
        dest = out_dir + source
        outfile = out_dir + "#{dest}.gz"

        debug_msg "Reading the original js file from %s" % dest
        data = dest.read

        debug_msg "Writing gzipped file to %s" % outfile

        Zlib::GzipWriter.open(outfile) do |gz|
          gz.mtime = File.mtime(dest)
          gz.orig_name = dest.basename.to_s
          gz.write data
        gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/darkfish.rb000064400000050412150403134140015765 0ustar00ethod.search_record
      @index[:searchIndex]     << "#{search_string record.shift}()"
      @index[:longSearchIndex] << "#{search_string record.shift}()"
      @index[:info]            << record
    end
  end

  ##
  # Adds pages to the index

  def index_pages
    debug_msg "  generating pages search index"

    pages = @files.select do |file|
      file.text?
    end

    pages.each do |page|
      debug_msg "    #{page.page_name}"
      record = page.search_record
      @index[:searchIndex]     << search_string(record.shift)
      @index[:longSearchIndex] << ''
      record.shift
      @index[:info]            << record
    end
  end

  ##
  # The directory classes are written to

  def class_dir
    @parent_generator.class_dir
  end

  ##
  # The directory files are written to

  def file_dir
    @parent_generator.file_dir
  end

  def reset files, classes # :nodoc:
    @files   = files
    @classes = classes

    @index = {
      :searchIndex => [],
      :longSearchIndex => [],
      :info => []
    }
  end

  ##
  # Removes whitespace and downcases +string+

  def search_string string
    string.downcase.gsub(/\s/, '')
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/darkfish.rb000064400000050412150403134140015765 0ustar00# frozen_string_literal: true
# -*- mode: ruby; ruby-indent-level: 2; tab-width: 2 -*-

require 'erb'
require 'fileutils'
require 'pathname'
require_relative 'markup'

##
# Darkfish RDoc HTML Generator
#
# $Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $
#
# == Author/s
# * Michael Granger (ged@FaerieMUD.org)
#
# == Contributors
# * Mahlon E. Smith (mahlon@martini.nu)
# * Eric Hodel (drbrain@segment7.net)
#
# == License
#
# Copyright (c) 2007, 2008, Michael Granger. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
#   this list of conditions and the following disclaimer.
#
# * 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.
#
# * Neither the name of the author/s, nor the names of the project's
#   contributors may be used to endorse or promote products derived from this
#   software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.
#
# == Attributions
#
# Darkfish uses the {Silk Icons}[http://www.famfamfam.com/lab/icons/silk/] set
# by Mark James.

class RDoc::Generator::Darkfish

  RDoc::RDoc.add_generator self

  include ERB::Util

  ##
  # Stylesheets, fonts, etc. that are included in RDoc.

  BUILTIN_STYLE_ITEMS = # :nodoc:
    %w[
      css/fonts.css
      fonts/Lato-Light.ttf
      fonts/Lato-LightItalic.ttf
      fonts/Lato-Regular.ttf
      fonts/Lato-RegularItalic.ttf
      fonts/SourceCodePro-Bold.ttf
      fonts/SourceCodePro-Regular.ttf
      css/rdoc.css
  ]

  ##
  # Path to this file's parent directory. Used to find templates and other
  # resources.

  GENERATOR_DIR = File.join 'rdoc', 'generator'

  ##
  # Release Version

  VERSION = '3'

  ##
  # Description of this generator

  DESCRIPTION = 'HTML generator, written by Michael Granger'

  ##
  # The relative path to style sheets and javascript.  By default this is set
  # the same as the rel_prefix.

  attr_accessor :asset_rel_path

  ##
  # The path to generate files into, combined with <tt>--op</tt> from the
  # options for a full path.

  attr_reader :base_dir

  ##
  # Classes and modules to be used by this generator, not necessarily
  # displayed.  See also #modsort

  attr_reader :classes

  ##
  # No files will be written when dry_run is true.

  attr_accessor :dry_run

  ##
  # When false the generate methods return a String instead of writing to a
  # file.  The default is true.

  attr_accessor :file_output

  ##
  # Files to be displayed by this generator

  attr_reader :files

  ##
  # The JSON index generator for this Darkfish generator

  attr_reader :json_index

  ##
  # Methods to be displayed by this generator

  attr_reader :methods

  ##
  # Sorted list of classes and modules to be displayed by this generator

  attr_reader :modsort

  ##
  # The RDoc::Store that is the source of the generated content

  attr_reader :store

  ##
  # The directory where the template files live

  attr_reader :template_dir # :nodoc:

  ##
  # The output directory

  attr_reader :outputdir

  ##
  # Initialize a few instance variables before we start

  def initialize store, options
    @store   = store
    @options = options

    @asset_rel_path = ''
    @base_dir       = Pathname.pwd.expand_path
    @dry_run        = @options.dry_run
    @file_output    = true
    @template_dir   = Pathname.new options.template_dir
    @template_cache = {}

    @classes = nil
    @context = nil
    @files   = nil
    @methods = nil
    @modsort = nil

    @json_index = RDoc::Generator::JsonIndex.new self, options
  end

  ##
  # Output progress information if debugging is enabled

  def debug_msg *msg
    return unless $DEBUG_RDOC
    $stderr.puts(*msg)
  end

  ##
  # Directory where generated class HTML files live relative to the output
  # dir.

  def class_dir
    nil
  end

  ##
  # Directory where generated class HTML files live relative to the output
  # dir.

  def file_dir
    nil
  end

  ##
  # Create the directories the generated docs will live in if they don't
  # already exist.

  def gen_sub_directories
    @outputdir.mkpath
  end

  ##
  # Copy over the stylesheet into the appropriate place in the output
  # directory.

  def write_style_sheet
    debug_msg "Copying static files"
    options = { :verbose => $DEBUG_RDOC, :noop => @dry_run }

    BUILTIN_STYLE_ITEMS.each do |item|
      install_rdoc_static_file @template_dir + item, "./#{item}", options
    end

    unless @options.template_stylesheets.empty?
      FileUtils.cp @options.template_stylesheets, '.', **options
    end

    Dir[(@template_dir + "{js,images}/**/*").to_s].each do |path|
      next if File.directory? path
      next if File.basename(path) =~ /^\./

      dst = Pathname.new(path).relative_path_from @template_dir

      install_rdoc_static_file @template_dir + path, dst, options
    end
  end

  ##
  # Build the initial indices and output objects based on an array of TopLevel
  # objects containing the extracted information.

  def generate
    setup

    write_style_sheet
    generate_index
    generate_class_files
    generate_file_files
    generate_table_of_contents
    @json_index.generate
    @json_index.generate_gzipped

    copy_static

  rescue => e
    debug_msg "%s: %s\n  %s" % [
      e.class.name, e.message, e.backtrace.join("\n  ")
    ]

    raise
  end

  ##
  # Copies static files from the static_path into the output directory

  def copy_static
    return if @options.static_path.empty?

    fu_options = { :verbose => $DEBUG_RDOC, :noop => @dry_run }

    @options.static_path.each do |path|
      unless File.directory? path then
        FileUtils.install path, @outputdir, **fu_options.merge(:mode => 0644)
        next
      end

      Dir.chdir path do
        Dir[File.join('**', '*')].each do |entry|
          dest_file = @outputdir + entry

          if File.directory? entry then
            FileUtils.mkdir_p entry, **fu_options
          else
            FileUtils.install entry, dest_file, **fu_options.merge(:mode => 0644)
          end
        end
      end
    end
  end

  ##
  # Return a list of the documented modules sorted by salience first, then
  # by name.

  def get_sorted_module_list classes
    classes.select do |klass|
      klass.display?
    end.sort
  end

  ##
  # Generate an index page which lists all the classes which are documented.

  def generate_index
    setup

    template_file = @template_dir + 'index.rhtml'
    return unless template_file.exist?

    debug_msg "Rendering the index page..."

    out_file = @base_dir + @options.op_dir + 'index.html'
    rel_prefix = @outputdir.relative_path_from out_file.dirname
    search_index_rel_prefix = rel_prefix
    search_index_rel_prefix += @asset_rel_path if @file_output

    asset_rel_prefix = rel_prefix + @asset_rel_path

    @title = @options.title

    render_template template_file, out_file do |io|
      here = binding
      # suppress 1.9.3 warning
      here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
      here
    end
  rescue => e
    error = RDoc::Error.new \
      "error generating index.html: #{e.message} (#{e.class})"
    error.set_backtrace e.backtrace

    raise error
  end

  ##
  # Generates a class file for +klass+

  def generate_class klass, template_file = nil
    setup

    current = klass

    template_file ||= @template_dir + 'class.rhtml'

    debug_msg "  working on %s (%s)" % [klass.full_name, klass.path]
    out_file   = @outputdir + klass.path
    rel_prefix = @outputdir.relative_path_from out_file.dirname
    search_index_rel_prefix = rel_prefix
    search_index_rel_prefix += @asset_rel_path if @file_output

    asset_rel_prefix = rel_prefix + @asset_rel_path
    svninfo          = get_svninfo(current)

    @title = "#{klass.type} #{klass.full_name} - #{@options.title}"

    debug_msg "  rendering #{out_file}"
    render_template template_file, out_file do |io|
      here = binding
      # suppress 1.9.3 warning
      here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
      here.local_variable_set(:svninfo, svninfo)
      here
    end
  end

  ##
  # Generate a documentation file for each class and module

  def generate_class_files
    setup

    template_file = @template_dir + 'class.rhtml'
    template_file = @template_dir + 'classpage.rhtml' unless
      template_file.exist?
    return unless template_file.exist?
    debug_msg "Generating class documentation in #{@outputdir}"

    current = nil

    @classes.each do |klass|
      current = klass

      generate_class klass, template_file
    end
  rescue => e
    error = RDoc::Error.new \
      "error generating #{current.path}: #{e.message} (#{e.class})"
    error.set_backtrace e.backtrace

    raise error
  end

  ##
  # Generate a documentation file for each file

  def generate_file_files
    setup

    page_file     = @template_dir + 'page.rhtml'
    fileinfo_file = @template_dir + 'fileinfo.rhtml'

    # for legacy templates
    filepage_file = @template_dir + 'filepage.rhtml' unless
      page_file.exist? or fileinfo_file.exist?

    return unless
      page_file.exist? or fileinfo_file.exist? or filepage_file.exist?

    debug_msg "Generating file documentation in #{@outputdir}"

    out_file = nil
    current = nil

    @files.each do |file|
      current = file

      if file.text? and page_file.exist? then
        generate_page file
        next
      end

      template_file = nil
      out_file = @outputdir + file.path
      debug_msg "  working on %s (%s)" % [file.full_name, out_file]
      rel_prefix = @outputdir.relative_path_from out_file.dirname
      search_index_rel_prefix = rel_prefix
      search_index_rel_prefix += @asset_rel_path if @file_output

      asset_rel_prefix = rel_prefix + @asset_rel_path

      unless filepage_file then
        if file.text? then
          next unless page_file.exist?
          template_file = page_file
          @title = file.page_name
        else
          next unless fileinfo_file.exist?
          template_file = fileinfo_file
          @title = "File: #{file.base_name}"
        end
      end

      @title += " - #{@options.title}"
      template_file ||= filepage_file

      render_template template_file, out_file do |io|
        here = binding
        # suppress 1.9.3 warning
        here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
        here.local_variable_set(:current, current)
        here
      end
    end
  rescue => e
    error =
      RDoc::Error.new "error generating #{out_file}: #{e.message} (#{e.class})"
    error.set_backtrace e.backtrace

    raise error
  end

  ##
  # Generate a page file for +file+

  def generate_page file
    setup

    template_file = @template_dir + 'page.rhtml'

    out_file = @outputdir + file.path
    debug_msg "  working on %s (%s)" % [file.full_name, out_file]
    rel_prefix = @outputdir.relative_path_from out_file.dirname
    search_index_rel_prefix = rel_prefix
    search_index_rel_prefix += @asset_rel_path if @file_output

    current          = file
    asset_rel_prefix = rel_prefix + @asset_rel_path

    @title = "#{file.page_name} - #{@options.title}"

    debug_msg "  rendering #{out_file}"
    render_template template_file, out_file do |io|
      here = binding
      # suppress 1.9.3 warning
      here.local_variable_set(:current, current)
      here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
      here
    end
  end

  ##
  # Generates the 404 page for the RDoc servlet

  def generate_servlet_not_found message
    setup

    template_file = @template_dir + 'servlet_not_found.rhtml'
    return unless template_file.exist?

    debug_msg "Rendering the servlet 404 Not Found page..."

    rel_prefix = rel_prefix = ''
    search_index_rel_prefix = rel_prefix
    search_index_rel_prefix += @asset_rel_path if @file_output

    asset_rel_prefix = ''

    @title = 'Not Found'

    render_template template_file do |io|
      here = binding
      # suppress 1.9.3 warning
      here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
      here
    end
  rescue => e
    error = RDoc::Error.new \
      "error generating servlet_not_found: #{e.message} (#{e.class})"
    error.set_backtrace e.backtrace

    raise error
  end

  ##
  # Generates the servlet root page for the RDoc servlet

  def generate_servlet_root installed
    setup

    template_file = @template_dir + 'servlet_root.rhtml'
    return unless template_file.exist?

    debug_msg 'Rendering the servlet root page...'

    rel_prefix = '.'
    asset_rel_prefix = rel_prefix
    search_index_rel_prefix = asset_rel_prefix
    search_index_rel_prefix += @asset_rel_path if @file_output

    @title = 'Local RDoc Documentation'

    render_template template_file do |io| binding end
  rescue => e
    error = RDoc::Error.new \
      "error generating servlet_root: #{e.message} (#{e.class})"
    error.set_backtrace e.backtrace

    raise error
  end

  ##
  # Generate an index page which lists all the classes which are documented.

  def generate_table_of_contents
    setup

    template_file = @template_dir + 'table_of_contents.rhtml'
    return unless template_file.exist?

    debug_msg "Rendering the Table of Contents..."

    out_file = @outputdir + 'table_of_contents.html'
    rel_prefix = @outputdir.relative_path_from out_file.dirname
    search_index_rel_prefix = rel_prefix
    search_index_rel_prefix += @asset_rel_path if @file_output

    asset_rel_prefix = rel_prefix + @asset_rel_path

    @title = "Table of Contents - #{@options.title}"

    render_template template_file, out_file do |io|
      here = binding
      # suppress 1.9.3 warning
      here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
      here
    end
  rescue => e
    error = RDoc::Error.new \
      "error generating table_of_contents.html: #{e.message} (#{e.class})"
    error.set_backtrace e.backtrace

    raise error
  end

  def install_rdoc_static_file source, destination, options # :nodoc:
    return unless source.exist?

    begin
      FileUtils.mkdir_p File.dirname(destination), **options

      begin
        FileUtils.ln source, destination, **options
      rescue Errno::EEXIST
        FileUtils.rm destination
        retry
      end
    rescue
      FileUtils.cp source, destination, **options
    end
  end

  ##
  # Prepares for generation of output from the current directory

  def setup
    return if instance_variable_defined? :@outputdir

    @outputdir = Pathname.new(@options.op_dir).expand_path @base_dir

    return unless @store

    @classes = @store.all_classes_and_modules.sort
    @files   = @store.all_files.sort
    @methods = @classes.map { |m| m.method_list }.flatten.sort
    @modsort = get_sorted_module_list @classes
  end

  ##
  # Return a string describing the amount of time in the given number of
  # seconds in terms a human can understand easily.

  def time_delta_string seconds
    return 'less than a minute'          if seconds < 60
    return "#{seconds / 60} minute#{seconds / 60 == 1 ? '' : 's'}" if
                                            seconds < 3000     # 50 minutes
    return 'about one hour'              if seconds < 5400     # 90 minutes
    return "#{seconds / 3600} hours"     if seconds < 64800    # 18 hours
    return 'one day'                     if seconds < 86400    #  1 day
    return 'about one day'               if seconds < 172800   #  2 days
    return "#{seconds / 86400} days"     if seconds < 604800   #  1 week
    return 'about one week'              if seconds < 1209600  #  2 week
    return "#{seconds / 604800} weeks"   if seconds < 7257600  #  3 months
    return "#{seconds / 2419200} months" if seconds < 31536000 #  1 year
    return "#{seconds / 31536000} years"
  end

  # %q$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $"
  SVNID_PATTERN = /
    \$Id:\s
    (\S+)\s                # filename
    (\d+)\s                # rev
    (\d{4}-\d{2}-\d{2})\s  # Date (YYYY-MM-DD)
    (\d{2}:\d{2}:\d{2}Z)\s # Time (HH:MM:SSZ)
    (\w+)\s                # committer
    \$$
  /x

  ##
  # Try to extract Subversion information out of the first constant whose
  # value looks like a subversion Id tag. If no matching constant is found,
  # and empty hash is returned.

  def get_svninfo klass
    constants = klass.constants or return {}

    constants.find { |c| c.value =~ SVNID_PATTERN } or return {}

    filename, rev, date, time, committer = $~.captures
    commitdate = Time.parse "#{date} #{time}"

    return {
      :filename    => filename,
      :rev         => Integer(rev),
      :commitdate  => commitdate,
      :commitdelta => time_delta_string(Time.now - commitdate),
      :committer   => committer,
    }
  end

  ##
  # Creates a template from its components and the +body_file+.
  #
  # For backwards compatibility, if +body_file+ contains "<html" the body is
  # used directly.

  def assemble_template body_file
    body = body_file.read
    return body if body =~ /<html/

    head_file = @template_dir + '_head.rhtml'
    footer_file = @template_dir + '_footer.rhtml'

    <<-TEMPLATE
<!DOCTYPE html>

<html>
<head>
#{head_file.read}

#{body}

#{footer_file.read}
    TEMPLATE
  end

  ##
  # Renders the ERb contained in +file_name+ relative to the template
  # directory and returns the result based on the current context.

  def render file_name
    template_file = @template_dir + file_name

    template = template_for template_file, false, RDoc::ERBPartial

    template.filename = template_file.to_s

    template.result @context
  end

  ##
  # Load and render the erb template in the given +template_file+ and write
  # it out to +out_file+.
  #
  # Both +template_file+ and +gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/ri.rb000064400000000720150403134140014601 0ustar00 "  would have written %d characters to %s" % [
        output.length, out_file.expand_path
      ] if @dry_run

      output
    end
  end

  ##
  # Creates the result for +template+ with +context+.  If an error is raised a
  # Pathname +template_file+ will indicate the file where the error occurred.

  def template_result template, context, template_file
    template.filename = template_file.to_s
    template.result context
  rescue NoMethodError => e
    ragems/gems/rdoc-6.5.1.1/lib/rdoc/method_attr.rb000064400000022050150403134140014513 0ustar00ut = "_erbout_#{file_var}"
    end

    if RUBY_VERSION >= '2.6'
      template = klass.new template, trim_mode: '-', eoutvar: erbout
    else
      template = klass.new template, nil, '-', erbout
    end
    @template_cache[file] = template
    template
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/ri.rb000064400000000720150403134140014601 0ustar00# frozen_string_literal: true
##
# Generates ri data files

class RDoc::Generator::RI

  RDoc::RDoc.add_generator self

  ##
  # Description of this generator

  DESCRIPTION = 'creates ri data files'

  ##
  # Set up a new ri generator

  def initialize store, options #:not-new:
    @options    = options
    @store      = store
    @store.path = '.'
  end

  ##
  # Writes the parsed data store to disk for use by ri.

  def generate
    @store.save
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/method_attr.rb000064400000022050150403134140014513 0ustar00# frozen_string_literal: true
##
# Abstract class representing either a method or an attribute.

class RDoc::MethodAttr < RDoc::CodeObject

  include Comparable

  ##
  # Name of this method/attribute.

  attr_accessor :name

  ##
  # public, protected, private

  attr_accessor :visibility

  ##
  # Is this a singleton method/attribute?

  attr_accessor :singleton

  ##
  # Source file token stream

  attr_reader :text

  ##
  # Array of other names for this method/attribute

  attr_reader :aliases

  ##
  # The method/attribute we're aliasing

  attr_accessor :is_alias_for

  #--
  # The attributes below are for AnyMethod only.
  # They are left here for the time being to
  # allow ri to operate.
  # TODO modify ri to avoid calling these on attributes.
  #++

  ##
  # Parameters yielded by the called block

  attr_reader :block_params

  ##
  # Parameters for this method

  attr_accessor :params

  ##
  # Different ways to call this method

  attr_accessor :call_seq

  ##
  # The call_seq or the param_seq with method name, if there is no call_seq.

  attr_reader :arglists

  ##
  # Pretty parameter list for this method

  attr_reader :param_seq


  ##
  # Creates a new MethodAttr from token stream +text+ and method or attribute
  # name +name+.
  #
  # Usually this is called by super from a subclass.

  def initialize text, name
    super()

    @text = text
    @name = name

    @aliases      = []
    @is_alias_for = nil
    @parent_name  = nil
    @singleton    = nil
    @visibility   = :public
    @see = false

    @arglists     = nil
    @block_params = nil
    @call_seq     = nil
    @param_seq    = nil
    @params       = nil
  end

  ##
  # Resets cached data for the object so it can be rebuilt by accessor methods

  def initialize_copy other # :nodoc:
    @full_name = nil
  end

  def initialize_visibility # :nodoc:
    super
    @see = nil
  end

  ##
  # Order by #singleton then #name

  def <=>(other)
    return unless other.respond_to?(:singleton) &&
                  other.respond_to?(:name)

    [     @singleton ? 0 : 1,       name] <=>
    [other.singleton ? 0 : 1, other.name]
  end

  def == other # :nodoc:
    equal?(other) or self.class == other.class and full_name == other.full_name
  end

  ##
  # A method/attribute is documented if any of the following is true:
  # - it was marked with :nodoc:;
  # - it has a comment;
  # - it is an alias for a documented method;
  # - it has a +#see+ method that is documented.

  def documented?
    super or
      (is_alias_for and is_alias_for.documented?) or
      (see and see.documented?)
  end

  ##
  # A method/attribute to look at,
  # in particular if this method/attribute has no documentation.
  #
  # It can be a method/attribute of the superclass or of an included module,
  # including the Kernel module, which is always appended to the included
  # modules.
  #
  # Returns +nil+ if there is no such method/attribute.
  # The +#is_alias_for+ method/attribute, if any, is not included.
  #
  # Templates may generate a "see also ..." if this method/attribute
  # has documentation, and "see ..." if it does not.

  def see
    @see = find_see if @see == false
    @see
  end

  ##
  # Sets the store for this class or module and its contained code objects.

  def store= store
    super

    @file = @store.add_file @file.full_name if @file
  end

  def find_see # :nodoc:
    return nil if singleton || is_alias_for

    # look for the method
    other = find_method_or_attribute name
    return other if other

    # if it is a setter, look for a getter
    return nil unless name =~ /[a-z_]=$/i   # avoid == or ===
    return find_method_or_attribute name[0..-2]
  end

  def find_method_or_attribute name # :nodoc:
    return nil unless parent.respond_to? :ancestors

    searched = parent.ancestors
    kernel = @store.modules_hash['Kernel']

    searched << kernel if kernel &&
      parent != kernel && !searched.include?(kernel)

    searched.each do |ancestor|
      next if String === ancestor
      next if parent == ancestor

      other = ancestor.find_method_named('#' + name) ||
              ancestor.find_attribute_named(name)

      return other if other
    end

    nil
  end

  ##
  # Abstract method. Contexts in their building phase call this
  # to register a new alias for this known method/attribute.
  #
  # - creates a new AnyMethod/Attribute named <tt>an_alias.new_name</tt>;
  # - adds +self+ as an alias for the new method or attribute
  # - adds the method or attribute to #aliases
  # - adds the method or attribute to +context+.

  def add_alias(an_alias, context)
    raise NotImplementedError
  end

  ##
  # HTML fragment reference for this method

  def aref
    type = singleton ? 'c' : 'i'
    # % characters are not allowed in html names => dash instead
    "#{aref_prefix}-#{type}-#{html_name}"
  end

  ##
  # Prefix for +aref+, defined by subclasses.

  def aref_prefix
    raise NotImplementedError
  end

  ##
  # Attempts to sanitize the content passed by the Ruby parser:
  # remove outer parentheses, etc.

  def block_params=(value)
    # 'yield.to_s' or 'assert yield, msg'
    return @block_params = '' if value =~ /^[\.,]/

    # remove trailing 'if/unless ...'
    return @block_params = '' if value =~ /^(if|unless)\s/

    value = $1.strip if value =~ /^(.+)\s(if|unless)\s/

    # outer parentheses
    value = $1 if value =~ /^\s*\((.*)\)\s*$/
    value = value.strip

    # proc/lambda
    return @block_params = $1 if value =~ /^(proc|lambda)(\s*\{|\sdo)/

    # surrounding +...+ or [...]
    value = $1.strip if value =~ /^\+(.*)\+$/
    value = $1.strip if value =~ /^\[(.*)\]$/

    return @block_params = '' if value.empty?

    # global variable
    return @block_params = 'str' if value =~ /^\$[&0-9]$/

    # wipe out array/hash indices
    value.gsub!(/(\w)\[[^\[]+\]/, '\1')

    # remove @ from class/instance variables
    value.gsub!(/@@?([a-z0-9_]+)/, '\1')

    # method calls => method name
    value.gsub!(/([A-Z:a-z0-9_]+)\.([a-z0-9_]+)(\s*\(\s*[a-z0-9_.,\s]*\s*\)\s*)?/) do
      case $2
      when 'to_s'      then $1
      when 'const_get' then 'const'
      when 'new' then
        $1.split('::').last.  # ClassName => class_name
          gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
          gsub(/([a-z\d])([A-Z])/,'\1_\2').
          downcase
      else
        $2
      end
    end

    # class prefixes
    value.gsub!(/[A-Za-z0-9_:]+::/, '')

    # simple expressions
    value = $1 if value =~ /^([a-z0-9_]+)\s*[-*+\/]/

    @block_params = value.strip
  end

  ##
  # HTML id-friendly method/attribute name

  def html_name
    require 'cgi/util'

    CGI.escape(@name.gsub('-', '-2D')).gsub('%','-').sub(/^-/, '')
  end

  ##
  # Full method/attribute name including namespace

  def full_name
    @full_name ||= "#{parent_name}#{pretty_name}"
  end

  def inspect # :nodoc:
    alias_for = @is_alias_for ? " (alias for #{@is_alias_for.name})" : nil
    visibility = self.visibility
    visibility = "forced #{visibility}" if force_documentation
    "#<%s:0x%x %s (%s)%s>" % [
      self.class, object_id,
      full_name,
      visibility,
      alias_for,
    ]
  end

  ##
  # '::' for a class method/attgems/gems/rdoc-6.5.1.1/lib/rdoc/tom_doc.rb000064400000014726150403134140013640 0ustar00nd

  def pretty_print q # :nodoc:
    alias_for =
      if @is_alias_for.respond_to? :name then
        "alias for #{@is_alias_for.name}"
      elsif Array === @is_alias_for then
        "alias for #{@is_alias_for.last}"
      end

    q.group 2, "[#{self.class.name} #{full_name} #{visibility}", "]" do
      if alias_for then
        q.breakable
        q.text alias_for
      end

      if text then
        q.breakable
        q.text "text:"
        q.breakable
        q.pp @text
      end

      unless comment.empty? then
        q.breakable
        q.text "comment:"
        q.breakable
        q.pp @comment
      end
    end
  end

  ##
  # Used by RDoc::Generator::JsonIndex to create a record for the search
  # engine.

  def search_record
    [
      @name,
      full_name,
      @name,
      @parent.full_name,
      path,
      params,
      snippet(@comment),
    ]
  end

  def to_s # :nodoc:
    if @is_alias_for
      "#{self.class.name}: #{full_name} -> #{is_alias_for}"
    else
      "#{self.class.name}: #{full_name}"
    end
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/tom_doc.rb000064400000014726150403134140013640 0ustar00# frozen_string_literal: true
# :markup: tomdoc

# A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a)
#
# The TomDoc specification can be found at:
#
# http://tomdoc.org
#
# The latest version of the TomDoc specification can be found at:
#
# https://github.com/mojombo/tomdoc/blob/master/tomdoc.md
#
# To choose TomDoc as your only default format see RDoc::Options@Saved+Options
# for instructions on setting up a <code>.rdoc_options</code> file to store
# your project default.
#
# There are a few differences between this parser and the specification.  A
# best-effort was made to follow the specification as closely as possible but
# some choices to deviate were made.
#
# A future version of RDoc will warn when a MUST or MUST NOT is violated and
# may warn when a SHOULD or SHOULD NOT is violated.  RDoc will always try
# to emit documentation even if given invalid TomDoc.
#
# Here are some implementation choices this parser currently makes:
#
# This parser allows rdoc-style inline markup but you should not depended on
# it.
#
# This parser allows a space between the comment and the method body.
#
# This parser does not require the default value to be described for an
# optional argument.
#
# This parser does not examine the order of sections.  An Examples section may
# precede the Arguments section.
#
# This class is documented in TomDoc format.  Since this is a subclass of the
# RDoc markup parser there isn't much to see here, unfortunately.

class RDoc::TomDoc < RDoc::Markup::Parser

  # Internal: Token accessor

  attr_reader :tokens

  # Internal: Adds a post-processor which sets the RDoc section based on the
  # comment's status.
  #
  # Returns nothing.

  def self.add_post_processor # :nodoc:
    RDoc::Markup::PreProcess.post_process do |comment, code_object|
      next unless code_object and
                  RDoc::Comment === comment and comment.format == 'tomdoc'

      comment.text.gsub!(/(\A\s*# )(Public|Internal|Deprecated):\s+/) do
        section = code_object.add_section $2
        code_object.temporary_section = section

        $1
      end
    end
  end

  add_post_processor

  # Public: Parses TomDoc from text
  #
  # text - A String containing TomDoc-format text.
  #
  # Examples
  #
  #   RDoc::TomDoc.parse <<-TOMDOC
  #   This method does some things
  #
  #   Returns nothing.
  #   TOMDOC
  #   # => #<RDoc::Markup::Document:0xXXX @parts=[...], @file=nil>
  #
  # Returns an RDoc::Markup::Document representing the TomDoc format.

  def self.parse text
    parser = new

    parser.tokenize text
    doc = RDoc::Markup::Document.new
    parser.parse doc
    doc
  end

  # Internal: Extracts the Signature section's method signature
  #
  # comment - An RDoc::Comment that will be parsed and have the signature
  #           extracted
  #
  # Returns a String containing the signature and nil if not

  def self.signature comment
    return unless comment.tomdoc?

    document = comment.parse

    signature = nil
    found_heading = false
    found_signature = false

    document.parts.delete_if do |part|
      next false if found_signature

      found_heading ||=
        RDoc::Markup::Heading === part && part.text == 'Signature'

      next false unless found_heading

      next true if RDoc::Markup::BlankLine === part

      if RDoc::Markup::Verbatim === part then
        signature = part
        found_signature = true
      end
    end

    signature and signature.text
  end

  # Public: Creates a new TomDoc parser.  See also RDoc::Markup::parse

  def initialize
    super

    @section      = nil
    @seen_returns = false
  end

  # Internal: Builds a heading from the token stream
  #
  # level - The level of heading to create
  #
  # Returns an RDoc::Markup::Heading

  def build_heading level
    heading = super

    @section = heading.text

    heading
  end

  # Internal: Builds a verbatim from the token stream.  A verbatim in the
  # Examples section will be marked as in Ruby format.
  #
  # margin - The indentation from the margin for lines that belong to this
  #          verbatim section.
  #
  # Returns an RDoc::Markup::Verbatim

  def build_verbatim margin
    verbatim = super

    verbatim.format = :ruby if @section == 'Examples'

    verbatim
  end

  # Internal: Builds a paragraph from the token stream
  #
  # margin - Unused
  #
  # Returns an RDoc::Markup::Paragraph.

  def build_paragraph margin
    p :paragraph_start => margin if @debug

    paragraph = RDoc::Markup::Paragraph.new

    until @tokens.empty? do
      type, data, = get

      case tgems/gems/rdoc-6.5.1.1/lib/rdoc/task.rb000064400000017307150403134140013154 0ustar00   end

    p :paragraph_end => margin if @debug

    paragraph
  end

  ##
  # Detects a section change to "Returns" and adds a heading

  def parse_text parent, indent # :nodoc:
    paragraph = build_paragraph indent

    if false == @seen_returns and 'Returns' == @section then
      @seen_returns = true
      parent << RDoc::Markup::Heading.new(3, 'Returns')
      parent << RDoc::Markup::BlankLine.new
    end

    parent << paragraph
  end

  # Internal: Turns text into an Array of tokens
  #
  # text - A String containing TomDoc-format text.
  #
  # Returns self.

  def tokenize text
    text = text.sub(/\A(Public|Internal|Deprecated):\s+/, '')

    setup_scanner text

    until @s.eos? do
      pos = @s.pos

      # leading spaces will be reflected by the column of the next token
      # the only thing we loose are trailing spaces at the end of the file
      next if @s.scan(/ +/)

      @tokens << case
                 when @s.scan(/\r?\n/) then
                   token = [:NEWLINE, @s.matched, *pos]
                   @s.newline!
                   token
                 when @s.scan(/(Examples|Signature)$/) then
                   @tokens << [:HEADER, 3, *pos]

                   [:TEXT, @s[1], *pos]
                 when @s.scan(/([:\w][\w\[\]]*)[ ]+- /) then
                   [:NOTE, @s[1], *pos]
                 else
                   @s.scan(/.*/)
                   [:TEXT, @s.matched.sub(/\r$/, ''), *pos]
                 end
    end

    self
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/task.rb000064400000017307150403134140013154 0ustar00# frozen_string_literal: true
#--
# Copyright (c) 2003, 2004 Jim Weirich, 2009 Eric Hodel
#
# 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:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# 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.
#++

begin
  gem 'rdoc'
rescue Gem::LoadError
end unless defined?(RDoc)

begin
  gem 'rake'
rescue Gem::LoadError
end unless defined?(Rake)

require_relative '../rdoc'
require 'rake'
require 'rake/tasklib'

##
# RDoc::Task creates the following rake tasks to generate and clean up RDoc
# output:
#
# [rdoc]
#   Main task for this RDoc task.
#
# [clobber_rdoc]
#   Delete all the rdoc files.  This target is automatically added to the main
#   clobber target.
#
# [rerdoc]
#   Rebuild the rdoc files from scratch, even if they are not out of date.
#
# Simple Example:
#
#   require 'rdoc/task'
#
#   RDoc::Task.new do |rdoc|
#     rdoc.main = "README.rdoc"
#     rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb")
#   end
#
# The +rdoc+ object passed to the block is an RDoc::Task object. See the
# attributes list for the RDoc::Task class for available customization options.
#
# == Specifying different task names
#
# You may wish to give the task a different name, such as if you are
# generating two sets of documentation.  For instance, if you want to have a
# development set of documentation including private methods:
#
#   require 'rdoc/task'
#
#   RDoc::Task.new :rdoc_dev do |rdoc|
#     rdoc.main = "README.rdoc"
#     rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb")
#     rdoc.options << "--all"
#   end
#
# The tasks would then be named :<em>rdoc_dev</em>,
# :clobber_<em>rdoc_dev</em>, and :re<em>rdoc_dev</em>.
#
# If you wish to have completely different task names, then pass a Hash as
# first argument. With the <tt>:rdoc</tt>, <tt>:clobber_rdoc</tt> and
# <tt>:rerdoc</tt> options, you can customize the task names to your liking.
#
# For example:
#
#   require 'rdoc/task'
#
#   RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean",
#                  :rerdoc => "rdoc:force")
#
# This will create the tasks <tt>:rdoc</tt>, <tt>:rdoc:clean</tt> and
# <tt>:rdoc:force</tt>.

class RDoc::Task < Rake::TaskLib

  ##
  # Name of the main, top level task.  (default is :rdoc)

  attr_accessor :name

  ##
  # Comment markup format.  rdoc, rd and tomdoc are supported.  (default is
  # 'rdoc')

  attr_accessor :markup

  ##
  # Name of directory to receive the html output files. (default is "html")

  attr_accessor :rdoc_dir

  ##
  # Title of RDoc documentation. (defaults to rdoc's default)

  attr_accessor :title

  ##
  # Name of file to be used as the main, top level file of the RDoc. (default
  # is none)

  attr_accessor :main

  ##
  # Name of template to be used by rdoc. (defaults to rdoc's default)

  attr_accessor :template

  ##
  # Name of format generator (<tt>--format</tt>) used by rdoc. (defaults to
  # rdoc's default)

  attr_accessor :generator

  ##
  # List of files to be included in the rdoc generation. (default is [])

  attr_accessor :rdoc_files

  ##
  # Additional list of options to be passed rdoc.  (default is [])

  attr_accessor :options

  ##
  # Whether to run the rdoc process as an external shell (default is false)

  attr_accessor :external

  ##
  # Create an RDoc task with the given name. See the RDoc::Task class overview
  # for documentation.

  def initialize name = :rdoc # :yield: self
    defaults

    check_names name

    @name = name

    yield self if block_given?

    define
  end

  ##
  # Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and
  # :rerdoc.  If other names are given an ArgumentError is raised.

  def check_names names
    return unless Hash === names

    invalid_options =
      names.keys.map { |k| k.to_sym } - [:rdoc, :clobber_rdoc, :rerdoc]

    unless invalid_options.empty? then
      raise ArgumentError, "invalid options: #{invalid_options.join ', '}"
    end
  end

  ##
  # Task description for the clobber rdoc task or its renamed equivalent

  def clobber_task_description
    "Remove RDoc HTML files"
  end

  ##
  # Sets default task values

  def defaults
    @name = :rdoc
    @rdoc_files = Rake::FileList.new
    @rdoc_dir = 'html'
    @main = nil
    @title = nil
    @template = nil
    @generator = nil
    @options = []
  end

  ##
  # All source is inline now.  This method is deprecated

  def inline_source # :nodoc:
    warn "RDoc::Task#inline_source is deprecated"
    true
  end

  ##
  # All source is inline now.  This method is deprecated

  def inline_source=(value) # :nodoc:
    warn "RDoc::Task#inline_source is deprecated"
  end

  ##
  # Create the tasks defined by this task lib.

  def define
    desc rdoc_task_description
    task rdoc_task_name

    desc rerdoc_task_description
    task rerdoc_task_name => [clobber_task_name, rdoc_task_name]

    desc clobber_task_description
    task clobber_task_namgems/gems/rdoc-6.5.1.1/lib/rdoc/code_object.rb000064400000022413150403134140014444 0ustar00T"       << template  if template
    result << '-f'       << generator if generator
    result
  end

  ##
  # The block passed to this method will be called just before running the
  # RDoc generator. It is allowed to modify RDoc::Task attributes inside the
  # block.

  def before_running_rdoc(&block)
    @before_running_rdoc = block
  end

  ##
  # Task description for the rdoc task or its renamed equivalent

  def rdoc_task_description
    'Build RDoc HTML files'
  end

  ##
  # Task description for the rerdoc task or its renamed description

  def rerdoc_task_description
    "Rebuild RDoc HTML files"
  end

  private

  def rdoc_target
    "#{rdoc_dir}/created.rid"
  end

  def rdoc_task_name
    case name
    when Hash then (name[:rdoc] || "rdoc").to_s
    else           name.to_s
    end
  end

  def clobber_task_name
    case name
    when Hash then (name[:clobber_rdoc] || "clobber_rdoc").to_s
    else           "clobber_#{name}"
    end
  end

  def rerdoc_task_name
    case name
    when Hash then (name[:rerdoc] || "rerdoc").to_s
    else           "re#{name}"
    end
  end

end

# :stopdoc:
module Rake

  ##
  # For backwards compatibility

  RDocTask = RDoc::Task # :nodoc:

end
# :startdoc:
gems/gems/rdoc-6.5.1.1/lib/rdoc/code_object.rb000064400000022413150403134140014444 0ustar00# frozen_string_literal: true
##
# Base class for the RDoc code tree.
#
# We contain the common stuff for contexts (which are containers) and other
# elements (methods, attributes and so on)
#
# Here's the tree of the CodeObject subclasses:
#
# * RDoc::Context
#   * RDoc::TopLevel
#   * RDoc::ClassModule
#     * RDoc::AnonClass (never used so far)
#     * RDoc::NormalClass
#     * RDoc::NormalModule
#     * RDoc::SingleClass
# * RDoc::MethodAttr
#   * RDoc::Attr
#   * RDoc::AnyMethod
#     * RDoc::GhostMethod
#     * RDoc::MetaMethod
# * RDoc::Alias
# * RDoc::Constant
# * RDoc::Mixin
#   * RDoc::Require
#   * RDoc::Include

class RDoc::CodeObject

  include RDoc::Text

  ##
  # Our comment

  attr_reader :comment

  ##
  # Do we document our children?

  attr_reader :document_children

  ##
  # Do we document ourselves?

  attr_reader :document_self

  ##
  # Are we done documenting (ie, did we come across a :enddoc:)?

  attr_reader :done_documenting

  ##
  # Which file this code object was defined in

  attr_reader :file

  ##
  # Force documentation of this CodeObject

  attr_reader :force_documentation

  ##
  # Line in #file where this CodeObject was defined

  attr_accessor :line

  ##
  # Hash of arbitrary metadata for this CodeObject

  attr_reader :metadata

  ##
  # Sets the parent CodeObject

  attr_writer :parent

  ##
  # Did we ever receive a +:nodoc:+ directive?

  attr_reader :received_nodoc

  ##
  # Set the section this CodeObject is in

  attr_writer :section

  ##
  # The RDoc::Store for this object.

  attr_reader :store

  ##
  # We are the model of the code, but we know that at some point we will be
  # worked on by viewers. By implementing the Viewable protocol, viewers can
  # associated themselves with these objects.

  attr_accessor :viewer

  ##
  # Creates a new CodeObject that will document itself and its children

  def initialize
    @metadata         = {}
    @comment          = ''
    @parent           = nil
    @parent_name      = nil # for loading
    @parent_class     = nil # for loading
    @section          = nil
    @section_title    = nil # for loading
    @file             = nil
    @full_name        = nil
    @store            = nil
    @track_visibility = true

    initialize_visibility
  end

  ##
  # Initializes state for visibility of this CodeObject and its children.

  def initialize_visibility # :nodoc:
    @document_children   = true
    @document_self       = true
    @done_documenting    = false
    @force_documentation = false
    @received_nodoc      = false
    @ignored             = false
    @suppressed          = false
    @track_visibility    = true
  end

  ##
  # Replaces our comment with +comment+, unless it is empty.

  def comment=(comment)
    @comment = case comment
               when NilClass               then ''
               when RDoc::Markup::Document then comment
               when RDoc::Comment          then comment.normalize
               else
                 if comment and not comment.empty? then
                   normalize_comment comment
                 else
                   # HACK correct fix is to have #initialize create @comment
                   #      with the correct encoding
                   if String === @comment and @comment.empty? then
                     @comment = RDoc::Encoding.change_encoding @comment, comment.encoding
                   end
                   @comment
                 end
               end
  end

  ##
  # Should this CodeObject be displayed in output?
  #
  # A code object should be displayed if:
  #
  # * The item didn't have a nodoc or wasn't in a container that had nodoc
  # * The item wasn't ignored
  # * The item has documentation and was not suppressed

  def display?
    @document_self and not @ignored and
      (documented? or not @suppressed)
  end

  ##
  # Enables or disables documentation of this CodeObject's children unless it
  # has been turned off by :enddoc:

  def document_children=(document_children)
    return unless @track_visibility

    @document_children = document_children unless @done_documenting
  end

  ##
  # Enables or disables documentation of this CodeObject unless it has been
  # turned off by :enddoc:.  If the argument is +nil+ it means the
  # documentation is turned off by +:nodoc:+.

  def document_self=(document_self)
    return unless @track_visibility
    return if @done_documenting

    @document_self = document_self
    @received_nodoc = true if document_self.nil?
  end

  ##
  # Does this object have a comment with content or is #received_nodoc true?

  def documented?
    @received_nodoc or !@comment.empty?
  end

  ##
  # Turns documentation on/off, and turns on/off #document_self
  # and #document_children.
  #
  # Once documentation has been turned off (by +:enddoc:+),
  # the object will refuse to turn #document_self or
  # #document_children on, so +:doc:+ and +:start_doc:+ directives
  # will have no effect in the current file.

  def done_documenting=(value)
    return unless @track_visibility
    @done_documenting  = value
    @document_self     = !value
    @document_children = @document_self
  end

  ##
  # Yields each parent of this CodeObject.  See also
  # RDoc::ClassModule#each_ancestor

  def each_parent
    code_object = self

    while code_object = code_object.parent do
      yield code_object
    end

    self
  end

  ##
  # File name where this CodeObject was found.
  #
  # See also RDoc::Context#in_files

  def file_name
    return unless @file

    @file.absolute_name
  end

  ##
  # Force the documentation of this object unless documentation
  # has been turned off by :enddoc:
  #--
  # HACK untested, was assigning to an ivar

  def force_documentation=(value)
    @force_documentation = value unless @done_documenting
  end

  ##
  # Sets the full_name overriding any computed full name.
  #
  # Set to +nil+ to clear RDoc's cached value

  def full_name= full_name
    @full_name = full_name
  end

  ##
  # Use this to ignore a CodeObject and all its children until found again
  # (#record_location is called).  An ignored item will not be displayed in
  # documentation.
  #
  # See github issue #55
  #
  # The ignored status is temporary in order to allow implementation details
  # to be hidden.  At the end of processing a file RDoc allows all classes
  # and modules to add new documentation to previously created classes.
  #
  # If a class was ignored (via stopdoc) then reopened later with additional
  # documentation it should be displayed.  If a class was ignored and never
  # reopened it should not be displayed.  The ignore flag allows this to
  # occur.

  def ignore
    return unless @track_visibility

    @ignored = true

    stop_doc
  end

  ##
  # Has this class been ignored?
  #
  # See also #ignore

  def ignored?
    @ignored
  end

  ##
  # The options instance from the store this CodeObject is attached to, or a
  # default options instance if the CodeObject is not attached.
  #
  # This is used by Text#snippet

  def options
    if @store and @store.rdoc then
      @store.rdoc.options
    else
      RDoc::Options.new
    end
  end

  ##
  # Our parent CodeObject.  The parent may be missing for classes loaded from
  # legacy RI data stores.

  def parent
    return @parent if @parent
    return nil unless @parent_name

    if @parent_class == RDoc::TopLevel then
      @parent = @store.add_file gems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/text.rb000064400000005602150403134140013750 0ustar00nd methods inside a class or module.

  def section
    return @section if @section

    @section = parent.add_section @section_title if parent
  end

  ##
  # Enable capture of documentation unless documentation has been
  # turned off by :enddoc:

  def start_doc
    return if @done_documenting

    @document_self = true
    @document_children = true
    @ignored    = false
    @suppressed = false
  end

  ##
  # Disable capture of documentation

  def stop_doc
    return unless @track_visibility

    @document_self = false
    @document_children = false
  end

  ##
  # Sets the +store+ that contains this CodeObject

  def store= store
    @store = store

    return unless @track_visibility

    if :nodoc == options.visibility then
      initialize_visibility
      @track_visibility = false
    end
  end

  ##
  # Use this to suppress a CodeObject and all its children until the next file
  # it is seen in or documentation is discovered.  A suppressed item with
  # documentation will be displayed while an ignored item with documentation
  # may not be displayed.

  def suppress
    return unless @track_visibility

    @suppressed = true

    stop_doc
  end

  ##
  # Has this class been suppressed?
  #
  # See also #suppress

  def suppressed?
    @suppressed
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/text.rb000064400000005602150403134140013750 0ustar00# frozen_string_literal: true
##
# An i18n supported text.
#
# This object provides the following two features:
#
#   * Extracts gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf000064400000267764150403134130024240 0ustar00f the :paragraph is started.)
  #
  # The above content may be added in the future.

  def extract_messages
    parse do |part|
      case part[:type]
      when :empty_line
        # igems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/locale.rb000064400000004546150403134140014231 0ustar00en /\A\s*\z/
        if paragraph.empty?
          emit_empty_line_event(line, line_no, &block)
        else
          paragraph += line
          emit_paragraph_event(paragraph, paragraph_start_line, line_no,
                               &block)
          paragraph = ''
        end
      else
        paragraph_start_line = line_no if paragraph.empty?
        paragraph += line
      end
    end

    unless paragraph.empty?
      emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block)
    end
  end

  def each_line(raw, &block)
    case raw
    when RDoc::Comment
      raw.text.each_line(&block)
    when Array
      raw.each do |comment, location|
        each_line(comment, &block)
      end
    else
      raw.each_line(&block)
    end
  end

  def emit_empty_line_event(line, line_no)
    part = {
      :type => :empty_line,
      :line => line,
      :line_no => line_no,
    }
    yield(part)
  end

  def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block)
    paragraph_part = {
      :type => :paragraph,
      :line_no => paragraph_start_line,
    }
    match_data = /(\s*)\z/.match(paragraph)
    if match_data
      paragraph_part[:paragraph] = match_data.pre_match
      yield(paragraph_part)
      emit_empty_line_event(match_data[1], line_no, &block)
    else
      paragraph_part[:paragraph] = paragraph
      yield(paragraph_part)
    end
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/locale.rb000064400000004546150403134140014231 0ustar00# frozen_string_literal: true
##
# A message container for a locale.
#
# This object provides the following two features:
#
#   * Loads translated messages from .po file.
#   * Translates a message into the locale.

class RDoc::I18n::Locale

  @@locales = {} # :nodoc:

  class << self

    ##
    # Returns the locale object for +locale_name+.

    def [](lgems/gems/rdoc-6.5.1.1/lib/rdoc/store.rb000064400000055257150403134140013354 0ustar00ze(name)
    @name = name
    @messages = {}
  end

  ##
  # Loads translation messages from +locale_directory+/+@name+/rdoc.po
  # or +locale_directory+/+@name+.po. The former has high priority.
  #
  # This method requires gettext gem for parsing .po file. If you
  # don't have gettext gem, this method doesn't load .po file. This
  # method warns and returns +false+.
  #
  # Returns +true+ if succeeded, +false+ otherwise.

  def load(locale_directory)
    return false if @name.nil?

    po_file_candidates = [
      File.join(locale_directory, @name, 'rdoc.po'),
      File.join(locale_directory, "#{@name}.po"),
    ]
    po_file = po_file_candidates.find do |po_file_candidate|
      File.exist?(po_file_candidate)
    end
    return false unless po_file

    begin
      require 'gettext/po_parser'
      require 'gettext/mo'
    rescue LoadError
      warn('Need gettext gem for i18n feature:')
      warn('  gem install gettext')
      return false
    end

    po_parser = GetText::POParser.new
    messages = GetText::MO.new
    po_parser.report_warning = false
    po_parser.parse_file(po_file, messages)

    @messages.merge!(messages)

    true
  end

  ##
  # Translates the +message+ into locale. If there is no translation
  # messages for +message+ in locale, +message+ itself is returned.

  def translate(message)
    @messages[message] || message
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/store.rb000064400000055257150403134140013354 0ustar00# frozen_string_literal: true
require 'fileutils'

##
# A set of rdoc data for a single project (gem, path, etc.).
#
# The store manages reading and writing ri data for a project and maintains a
# cache of methods, classes and ancestors in the store.
#
# The store maintains a #cache of its contents for faster lookup.  After
# adding items to the store it must be flushed using #save_cache.  The cache
# contains the following structures:
#
#    @cache = {
#      :ancestors        => {}, # class name => ancestor names
#      :attributes       => {}, # class name => attributes
#      :class_methods    => {}, # class name => class methods
#      :instance_methods => {}, # class name => instance methods
#      :modules          => [], # classes and modules in this store
#      :pages            => [], # page names
#    }
#--
# TODO need to prune classes

class RDoc::Store

  ##
  # Errors raised from loading or saving the store

  class Error < RDoc::Error
  end

  ##
  # Raised when a stored file for a class, module, page or method is missing.

  class MissingFileError < Error

    ##
    # The store the file should exist in

    attr_reader :store

    ##
    # The file the #name should be saved as

    attr_reader :file

    ##
    # The name of the object the #file would be loaded from

    attr_reader :name

    ##
    # Creates a new MissingFileError for the missing +file+ for the given
    # +name+ that should have been in the +store+.

    def initialize store, file, name
      @store = store
      @file  = file
      @name  = name
    end

    def message # :nodoc:
      "store at #{@store.path} missing file #{@file} for #{@name}"
    end

  end

  ##
  # Stores the name of the C variable a class belongs to.  This helps wire up
  # classes defined from C across files.

  attr_reader :c_enclosure_classes # :nodoc:

  attr_reader :c_enclosure_names # :nodoc:

  ##
  # Maps C variables to class or module names for each parsed C file.

  attr_reader :c_class_variables

  ##
  # Maps C variables to singleton class names for each parsed C file.

  attr_reader :c_singleton_class_variables

  ##
  # If true this Store will not write any files

  attr_accessor :dry_run

  ##
  # Path this store reads or writes

  attr_accessor :path

  ##
  # The RDoc::RDoc driver for this parse tree.  This allows classes consulting
  # the documentation tree to access user-set options, for example.

  attr_accessor :rdoc

  ##
  # Type of ri datastore this was loaded from.  See RDoc::RI::Driver,
  # RDoc::RI::Paths.

  attr_accessor :type

  ##
  # The contents of the Store

  attr_reader :cache

  ##
  # The encoding of the contents in the Store

  attr_accessor :encoding

  ##
  # The lazy constants alias will be discovered in passing

  attr_reader :unmatched_constant_alias

  ##
  # Creates a new Store of +type+ that will load or save to +path+

  def initialize path = nil, type = nil
    @dry_run  = false
    @encoding = nil
    @path     = path
    @rdoc     = nil
    @type     = type

    @cache = {
      :ancestors                   => {},
      :attributes                  => {},
      :class_methods               => {},
      :c_class_variables           gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf000064400000267764150403134130024240 0ustar00ique_modules = nil

    @unmatched_constant_alias = {}
  end

  ##
  # Adds +module+ as an enclosure (namespace) for the given +variable+ for C
  # files.

  def add_c_enclosure variable, namespace
    @c_enclosure_classes[variable] = namespace
  end

  ##
  # Adds C variables from an RDoc::Parser::C

  def add_c_variables c_parser
    filename = c_parser.top_level.relative_name

    @c_class_variables[filename] = make_variable_map c_parser.classes

    @c_singleton_class_variables[filename] = c_parser.singleton_classes
  end

  ##
  # Adds the file with +name+ as an RDoc::TopLevel to the store.  Returns the
  # created RDoc::TopLevel.

  def add_file absolute_name, relative_name: absolute_name, parser: nil
    unless top_level = @files_hash[relative_name] then
      top_level = RDoc::TopLevel.new absolute_name, relative_name
      top_level.parser = parser if parser
      top_level.store = self
      @files_hash[relative_name] = top_level
      @text_files_hash[relative_name] = top_level if top_level.text?
    end

    top_level
  end

  def update_parser_of_file(absolute_name, parser)
    if top_level = @files_hash[absolute_name] then
      @text_files_hash[absolute_name] = top_level if top_level.text?
    end
  end

  ##
  # Returns all classes discovered by RDoc

  def all_classes
    @classes_hash.values
  end

  ##
  # Returns all classes and modules discovered by RDoc

  def all_classes_and_modules
    @classes_hash.values + @modules_hash.values
  end

  ##
  # All TopLevels known to RDoc

  def all_files
    @files_hash.values
  end

  ##
  # Returns all modules discovered by RDoc

  def all_modules
    modules_hash.values
  end

  ##
  # Ancestors cache accessor.  Maps a klass name to an Array of its ancestors
  # in this store.  If Foo in this store inherits from Object, Kernel won't be
  # listed (it will be included from ruby's ri store).

  def ancestors
    @cache[:ancestors]
  end

  ##
  # Attributes cache accessor.  Maps a class to an Array of its attributes.

  def attributes
    @cache[:attributes]
  end

  ##
  # Path to the cache file

  def cache_path
    File.join @path, 'cache.ri'
  end

  ##
  # Path to the ri data for +klass_name+

  def class_file klass_name
    name = klass_name.split('::').last
    File.join class_path(klass_name), "cdesc-#{name}.ri"
  end

  ##
  # Class methods cache accessor.  Maps a class to an Array of its class
  # methods (not full name).

  def class_methods
    @cache[:class_methods]
  end

  ##
  # Path where data for +klass_name+ will be stored (methods or class data)

  def class_path klass_name
    File.join @path, *klass_name.split('::')
  end

  ##
  # Hash of all classes known to RDoc

  def classes_hash
    @classes_hash
  end

  ##
  # Removes empty items and ensures item in each collection are unique and
  # sorted

  def clean_cache_collection collection # :nodoc:
    collection.each do |name, item|
      if item.empty? then
        collection.delete name
      else
        # HACK mongrel-1.1.5 documents its files twice
        item.uniq!
        item.sort!
      end
    end
  end

  ##
  # Prepares the RDoc code object tree for use by a generator.
  #
  # It finds unique classes/modules defined, and replaces classes/modules that
  # are aliases for another one by a copy with RDoc::ClassModule#is_alias_for
  # set.
  #
  # It updates the RDoc::ClassModule#constant_aliases attribute of "real"
  # classes or modules.
  #
  # It also completely removes the classes and modules that should be removed
  # from the documentation and the methods that have a visibility below
  # +min_visibility+, which is the <tt>--visibility</tt> option.
  #
  # See also RDoc::Context#remove_from_documentation?

  def complete min_visibility
    fix_basic_object_inheritance

    # cache included modules before they are removed from the documentation
    all_classes_and_modules.each { |cm| cm.ancestors }

    unless min_visibility == :nodoc then
      remove_nodoc @classes_hash
      remove_nodoc @modules_hash
    end

    @unique_classes = find_unique @classes_hash
    @unique_modules = find_unique @modules_hash

    unique_classes_and_modules.each do |cm|
      cm.complete min_visibility
    end

    @files_hash.each_key do |file_name|
      tl = @files_hash[file_name]

      unless tl.text? then
        tl.modules_hash.clear
        tl.classes_hash.clear

        tl.classes_or_modules.each do |cm|
          name = cm.full_name
          if cm.type == 'class' then
            tl.classes_hash[name] = cm if @classes_hash[name]
          else
            tl.modules_hash[name] = cm if @modules_hash[name]
          end
        end
      end
    end
  end

  ##
  # Hash of all files known to RDoc

  def files_hash
    @files_hash
  end

  ##
  # Finds the enclosure (namespace) for the given C +variable+.

  def find_c_enclosure variable
    @c_enclosure_classes.fetch variable do
      break unless name = @c_enclosure_names[variable]

      mod = find_class_or_module name

      unless mod then
        loaded_mod = load_class_data name

        file = loaded_mod.in_files.first

        return unless file # legacy data source

        file.store = self

        mod = file.add_module RDoc::NormalModule, name
      end

      @c_enclosure_classes[variable] = mod
    end
  end

  ##
  # Finds the class with +name+ in all discovered classes

  def find_class_named name
    @classes_hash[name]
  end

  ##
  # Finds the class with +name+ starting in namespace +from+

  def find_class_named_from name, from
    from = find_class_named from unless RDoc::Context === from

    until RDoc::TopLevel === from do
      return nil unless from

      klass = from.find_class_named name
      return klass if klass

      from = from.parent
    end

    find_class_named name
  end

  ##
  # Finds the class or module with +name+

  def find_class_or_module name
    name = $' if name =~ /^::/
    @classes_hash[name] || @modules_hash[name]
  end

  ##
  # Finds the file with +name+ in all discovered files

  def find_file_named name
    @files_hash[name]
  end

  ##
  # Finds the module with +name+ in all discovered modules

  def find_module_named name
    @modules_hash[name]
  end

  ##
  # Returns the RDoc::TopLevel that is a text file and has the given
  # +file_name+

  def find_text_page file_name
    @text_files_hash.each_value.find do |file|
      file.full_name == file_name
    end
  end

  ##
  # Finds unique classes/modules defined in +all_hash+,
  # and returns them as an array. Performs the alias
  # updates in +all_hash+: see ::complete.
  #--
  # TODO  aliases should be registered by Context#add_module_alias

  def find_unique all_hash
    unique = []

    all_hash.each_pair do |full_name, cm|
      unique << cm if full_name == cm.full_name
    end

    unique
  end

  ##
  # Fixes the erroneous <tt>BasicObject < Object</tt> in 1.9.
  #
  # Because we assumed all classes without a stated superclass
  # inherit from Object, we have the above wrong inheritance.
  #
  # We fix BasicObject right away if we are running in a Ruby
  # version >= 1.9.

  def fix_basic_object_inheritance
    basic = classes_hash['BasicObject']
    return unless basic
    basic.superclass = nil
  end

  ##
  # Friendly rendition of #path

  def friendly_path
    case type
    when :gem    then
      parent = File.expand_path '..', @path
      "gem #{File.basename parent}"
    when :home   then RDoc.home
    when :site   then 'ruby site'
    when :system then 'ruby core'
    else @path
    end
  end

  def inspect # :nodoc:
    "#<%s:0x%x %s %p>" % [self.class, object_id, @path, module_names.sort]
  end

  ##
  # Instance methods cache accessor.  Maps a class to an Array of its
  # instance methods (not full name).

  def instance_methods
    @cache[:instance_methods]
  end

  ##
  # Loads all items from this store into memory.  This recreates a
  # documentation tree for use by a generator

  def load_all
    load_cache

    module_names.each do |module_name|
      mod = find_class_or_module(module_name) || load_class(module_name)

      # load method documentation since the loaded class/module does not have
      # it
      loaded_methods = mod.method_list.map do |method|
        load_method module_name, method.full_name
      end

      mod.method_list.replace loaded_methods

      loaded_attributes = mod.attributes.map do |attribute|
        load_method module_name, attribute.full_name
      end

      mod.attributes.replace loaded_attributes
    end

    all_classes_and_modules.each do |mod|
      descendent_re = /^#{mod.full_name}::[^:]+$/

      module_names.each do |name|
        next unless name =~ descendent_re

        descendent = find_class_or_module name

        case descendent
        when RDoc::NormalClass then
          mod.classes_hash[name] = descendent
        when RDoc::NormalModule then
          mod.modules_hash[name] = descendent
        end
      end
    end

    @cache[:pages].each do |page_name|
      page = load_page page_name
      @files_hash[page_name] = page
      @text_files_hash[page_name] = page if page.text?
    end
  end

  ##
  # Loads cache file for this store

  def load_cache
    #orig_enc = @encoding

    @cache = marshal_load(cache_path)

    load_enc = @cache[:encoding]

    # TODO this feature will be time-consuming to add:
    # a) Encodings may be incompatible but transcodeable
    # b) Need to warn in the appropriate spots, wherever they may be
    # c) Need to handle cross-cache differences in encodings
    # d) Need to warn when generating into a cache with different encodings
    #
    #if orig_enc and load_enc != orig_enc then
    #  warn "Cached encoding #{load_enc} is incompatible with #{orig_enc}\n" \
    #       "from #{path}/cache.ri" unless
    #    Encoding.compatible? orig_enc, load_enc
    #end

    @encoding = load_enc unless @encoding

    @cache[:pages]                       ||= []
    @cache[:main]                        ||= nil
    @cache[:c_class_variables]           ||= {}
    @cache[:c_singleton_class_variables] ||= {}

    @cache[:c_class_variables].each do |_, map|
      map.each do |variable, name|
        @c_enclosure_names[variable] = name
      end
    end

    @cache
  rescue Errno::ENOENT
  end

  ##
  # Loads ri data for +klass_name+ and hooks it up to this store.

  def load_class klass_name
    obj = load_class_data klass_name

    obj.store = self

    case obj
    when RDoc::NormalClass then
      @classes_hash[klass_name] = obj
    when RDoc::SingleClass then
      @classes_hash[klass_name] = obj
    when RDoc::NormalModule then
      @modules_hash[klass_name] = obj
    end
  end

  ##
  # Loads ri data for +klass_name+

  def load_class_data klass_name
    file = class_file klass_name

    marshal_load(file)
  rescue Errno::ENOENT => e
    error = MissingFileError.new(self, file, klass_name)
    error.set_backtrace e.backtrace
    raise error
  end

  ##
  # Loads ri data for +method_name+ in +klass_name+

  def load_method klass_name, method_name
    file = method_file klass_name, method_name

    obj = marshal_load(file)
    obj.store = self
    obj.parent ||= find_class_or_module(klass_name) || load_class(klass_name)
    obj
  rescue Errno::ENOENT => e
    error = MissingFileError.new(self, file, klass_name + method_name)
    error.set_backtrace e.backtrace
    raise error
  end

  ##
  # Loads ri data for +page_name+

  def load_page page_name
    file = page_file page_name

    obj = marshal_load(file)
    obj.store = self
    obj
  rescue Errno::ENOENT => e
    error = MissingFileError.new(self, file, page_name)
    error.set_backtrace e.backtrace
    raise error
  end

  ##
  # Gets the main page for this RDoc store.  This page is used as the root of
  # the RDoc server.

  def main
    @cache[:main]
  end

  ##
  # Sets the main page for this RDoc store.

  def main= page
    @cache[:main] = page
  end

  ##
  # Converts the variable => ClassModule map +variables+ from a C parser into
  # a variable => class name map.

  def make_variable_map variables
    map = {}

    variables.each { |variable, class_module|
      map[variable] = class_module.full_name
    }

    map
  end

  ##
  # Path to the ri data for +method_name+ in +klass_name+

  def method_file klass_name, method_name
    method_name = method_name.split('::').last
    method_name =~ /#(.*)/
    method_type = $1 ? 'i' : 'c'
    method_name = $1 if $1
    method_name = method_name.gsub(/\W/) { "%%%02x" % $&[0].ord }

    File.join class_path(klass_name), "#{method_name}-#{method_type}.ri"
  end

  ##
  # Modules cache accessor.  An Array of all the module (and class) names in
  # the store.

  def module_names
    @cache[:modules]
  end

  ##
  # Hash of all modules known to RDoc

  def modules_hash
    @modules_hash
  end

  ##
  # Returns the RDoc::TopLevel that is a text file and has the given +name+

  def page name
    @text_files_hash.each_value.find do |file|
      file.page_name == name or file.base_name == name
    end
  end

  ##
  # Path to the ri data for +page_name+

  def page_file page_name
    file_name = File.basename(page_name).gsub('.', '_')

    File.join @path, File.dirname(page_name), "page-#{file_name}.ri"
  end

  ##
  # Removes from +all_hash+ the contexts that are nodoc or have no content.
  #
  # See RDoc::Context#remove_from_documentation?

  def remove_nodoc all_hash
    all_hash.keys.each do |name|
      context = all_hash[name]
      all_hash.delete(name) if context.remove_from_documentation?
    end
  end

  ##
  # Saves all entries in the store

  def save
    load_cache

    all_classes_and_modules.each do |klass|
      save_class klass

      klass.each_method do |method|
        save_method klass, method
      end

      klass.each_attribute do |attribute|
        save_method klass, attribute
      end
    end

    all_files.each do |file|
      save_page file
    end

    save_cache
  end

  ##
  # Writes the cache file for this store

  def save_cache
    clean_cache_collection @cache[:ancestors]
    clean_cache_collection @cache[:attributes]
    clean_cache_collection @cache[:class_methods]
    clean_cache_collection @cache[:instance_methods]

    @cache[:modules].uniq!
    @cache[:modules].sort!

    @cache[:pages].uniq!
    @cache[:pages].sort!

    @cache[:encoding] = @encoding # this gets set twice due to assert_cache

    @cache[:c_class_variables].merge!           @c_class_variables
    @cache[:c_singleton_class_variables].merge! @c_singleton_class_variables

    return if @dry_run

    File.open cache_path, 'wb' do |io|
      Marshal.dump @cache, io
    end
  end

  ##
  # Writes the ri data for +klass+ (or module)

  def save_class klass
    full_name = klass.full_name

    FileUtils.mkdir_p class_path(full_name) unless @dry_run

    @cache[:modules] << full_name

    path = class_file full_name

    begin
      disk_klass = load_class full_name

      klass = disk_klass.merge klass
    rescue MissingFileError
    end

    # BasicObject has no ancestors
    ancestors = klass.direct_ancestors.compact.map do |ancestor|
      # HACK for classes we don't know about (class X < RuntimeError)
      String === ancestor ? ancestor : ancestor.full_name
    end

    @cache[:ancestors][full_name] ||= []
    @cache[:ancestors][full_name].concat ancestors

    attribute_definitions = klass.attributes.map do |attribute|
      "#{attribute.definition} #{attribute.name}"
    end

    unless attribute_definitions.empty? then
      @cache[:attributes][full_name] ||= []
      @cache[:attributes][full_name].concat attribute_definitions
    end

    to_delete = []

    unless klass.method_list.empty? then
      @cache[:class_methods][full_name]    ||= []
      @cache[:instance_methods][full_name] ||= []

      class_methods, instance_methods =
        klass.method_list.partition { |meth| meth.singleton }

      class_methods    = class_methods.   map { |method| method.name }
      instance_methods = instance_methods.map { |method| method.name }
      attribute_names  = klass.attributes.map { |attr|   attr.name }

      old = @cache[:class_methods][full_name] - class_methods
      to_delete.concat old.map { |method|
        method_file full_name, "#{full_name}::#{method}"
      }

      old = @cache[:instance_methods][full_name] -
        instance_methods - attribute_names
      to_delete.concat old.map { |method|
        method_file full_name, "#{full_name}##{method}"
      }

      @cache[:class_methods][full_name]    = class_methods
      @cache[:instance_methods][full_name] = instance_methods
    end

    return if @dry_run

    FileUtils.rm_f to_delete

    File.open path, 'wb' do |io|
      Marshal.dump klass, io
    end
  end

  ##
  # Writes the ri data for +method+ on +klass+

  def save_method klass, method
    full_name = klass.full_name

    FileUtils.mkdir_p class_path(full_name) unless @dry_run

    cache = if method.singleton then
              @cache[:class_methods]
            else
              @cache[:instance_methods]
            end
    cache[full_name] ||= []
    cache[full_name] << method.name

    return if @dry_run

    File.open method_file(full_name, method.full_name), 'wb' do |io|
      Marshal.dump method, io
    end
  end

  ##
  # Writes the ri data for +page+

  def save_page page
    return unless page.text?

    path = page_file page.full_gems/gems/rdoc-6.5.1.1/lib/rdoc/markup.rb000064400000017616150403134140013514 0ustar00s is used as the title in each
  # page on the RDoc server

  def title
    @cache[:title]
  end

  ##
  # Sets the title page for this RDoc store.

  def title= title
    @cache[:title] = title
  end

  ##
  # Returns the unique classes discovered by RDoc.
  #
  # ::complete must have been called prior to using this method.

  def unique_classes
    @unique_classes
  end

  ##
  # Returns the unique classes and modules discovered by RDoc.
  # ::complete must have been called prior to using this method.

  def unique_classes_and_modules
    @unique_classes + @unique_modules
  end

  ##
  # Returns the unique modules discovered by RDoc.
  # ::complete must have been called prior to using this method.

  def unique_modules
    @unique_modules
  end

  private
  def marshal_load(file)
    File.open(file, 'rb') {|io| Marshal.load(io, MarshalFilter)}
  end

  MarshalFilter = proc do |obj|
    case obj
    when true, false, nil, Array, Class, Encoding, Hash, Integer, String, Symbol, RDoc::Text
    else
      unless obj.class.name.start_with?("RDoc::")
        raise TypeError, "not permitted class: #{obj.class.name}"
      end
    end
    obj
  end
  private_constant :MarshalFilter

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/markup.rb000064400000017616150403134140013514 0ustar00# frozen_string_literal: true
##
# RDoc::Markup parses plain text documents and attempts to decompose them into
# their constituent parts.  Some of these parts are high-level: paragraphs,
# chunks of verbatim text, list entries and the like.  Other parts happen at
# the character level: a piece of bold text, a word in code font.  This markup
# is similar in spirit to that used on WikiWiki webs, where folks create web
# pages using a simple set of formatting rules.
#
# RDoc::Markup and other markup formats do no output formatting, this is
# handled by the RDoc::Markup::Formatter subclasses.
#
# = Supported Formats
#
# Besides the RDoc::Markup format, the following formats are built in to RDoc:
#
# markdown::
#   The markdown format as described by
#   http://daringfireball.net/projects/markdown/.  See RDoc::Markdown for
#   details on the parser and supported extensions.
# rd::
#   The rdtool format.  See RDoc::RD for details on the parser and format.
# tomdoc::
#   The TomDoc format as described by http://tomdoc.org/.  See RDoc::TomDoc
#   for details on the parser and supported extensions.
#
# You can choose a markup format using the following methods:
#
# per project::
#   If you build your documentation with rake use RDoc::Task#markup.
#
#   If you build your documentation by hand run:
#
#      rdoc --markup your_favorite_format --write-options
#
#   and commit <tt>.rdoc_options</tt> and ship it with your packaged gem.
# per file::
#   At the top of the file use the <tt>:markup:</tt> directive to set the
#   default format for the rest of the file.
# per comment::
#   Use the <tt>:markup:</tt> directive at the top of a comment you want
#   to write in a different format.
#
# = RDoc::Markup
#
# RDoc::Markup is extensible at runtime: you can add \new markup elements to
# be recognized in the documents that RDoc::Markup parses.
#
# RDoc::Markup is intended to be the basis for a family of tools which share
# the common requirement that simple, plain-text should be rendered in a
# variety of different output formats and media.  It is envisaged that
# RDoc::Markup could be the basis for formatting RDoc style comment blocks,
# Wiki entries, and online FAQs.
#
# == Synopsis
#
# This code converts +input_string+ to HTML.  The conversion takes place in
# the +convert+ method, so you can use the same RDoc::Markup converter to
# convert multiple input strings.
#
#   require 'rdoc'
#
#   h = RDoc::Markup::ToHtml.new(RDoc::Options.new)
#
#   puts h.convert(input_string)
#
# You can extend the RDoc::Markup parser to recognize new markup
# sequences, and to add regexp handling. Here we make WikiWords significant to
# the parser, and also make the sequences {word} and \<no>text...</no> signify
# strike-through text.  We then subclass the HTML output class to deal
# with these:
#
#   require 'rdoc'
#
#   class WikiHtml < RDoc::Markup::ToHtml
#     def handle_regexp_WIKIWORD(target)
#       "<font color=red>" + target.text + "</font>"
#     end
#   end
#
#   markup = RDoc::Markup.new
#   markup.add_word_pair("{", "}", :STRIKE)
#   markup.add_html("no", :STRIKE)
#
#   markup.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)
#
#   wh = WikiHtml.new RDoc::Options.new, markup
#   wh.add_tag(:STRIKE, "<strike>", "</strike>")
#
#   puts "<body>#{wh.convert ARGF.read}</body>"
#
# == Encoding
#
# Where Encoding support is available, RDoc will automatically convert all
# documents to the same output encoding.  The output encoding can be set via
# RDoc::Options#encoding and defaults to Encoding.default_external.
#
# = \RDoc Markup Reference
#
# See RDoc::MarkupReference.
#
#--
# Original Author:: Dave Thomas,  dave@pragmaticprogrammer.com
# License:: Ruby license

class RDoc::Markup

  ##
  # An AttributeManager which handles inline markup.

  attr_reader :attribute_manager

  ##
  # Parses +str+ into an RDoc::Markup::Document.

  def self.parse str
    RDoc::Markup::Parser.parse str
  rescue RDoc::Markup::Parser::Error => e
    $stderr.puts <<-EOF
While parsing markup, RDoc encountered a #{e.class}:

#{e}
\tfrom #{e.backtrace.join "\n\tfrom "}

---8<---
#{text}
---8<---

RDoc #{RDoc::VERSION}

Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} #{RUBY_RELEASE_DATE}

Please file a bug report with the above information at:

https://github.com/ruby/rdoc/issues

    EOF
    raise
  end

  ##
  # Take a block of text and use various heuristics to determine its
  # structure (paragraphs, lists, and so on).  Invoke an event handler as we
  # identify significant chunks.

  def initialize attribute_manager = nil
    @attribute_manager = attribute_manager || RDoc::Markup::AttributeManager.new
    @output = nil
  end

  ##
  # Add to the sequences used to add formatting to an individual word (such
  # as *bold*).  Matching entries will generate attributes that the output
  # formatters can recognize by their +name+.

  def add_word_pair(start, stop, name)
    @attribute_manager.add_word_pair(start, stop, name)
  end

  ##
  # Add to the sequences recognized as general markup.

  def add_html(tag, name)
    @attribute_manager.add_html(tag, name)
  end

  ##
  # Add to other inline sequences.  For example, we could add WikiWords using
  # something like:
  #
  #    parser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)
  #
  # Each wiki word will be presented to the output formatter.

  def add_regexp_handling(pattern, name)
    @attribute_manager.add_regexp_handling(pattern, name)
  end

  ##
  # We take +input+, parse it if necessary, then invoke the output +formatter+
  # using a Visitor to render the result.

  def convert input, formatter
    document = case input
               when RDoc::Markup::Document then
                 input
               else
                 RDoc::Markup::Parser.parse input
               end

    document.accept formatter
  end

  autoload :Parser,                "#{__dir__}/markup/parser"
  autoload :PreProcess,            "#{__dir__}/markup/pre_process"

  # Inline markup classes
  autoload :AttrChanger,      gems/gems/rdoc-6.5.1.1/lib/rdoc/class_module.rb000064400000047504150403134140014666 0ustar00       "#{__dir__}/markup/heading"
  autoload :Include,               "#{__dir__}/markup/include"
  autoload :IndentedParagraph,     "#{__dir__}/markup/indented_paragraph"
  autoload :List,                  "#{__dir__}/markup/list"
  autoload :ListItem,              "#{__dir__}/markup/list_item"
  autoload :Paragraph,             "#{__dir__}/markup/paragraph"
  autoload :Table,                 "#{__dir__}/markup/table"
  autoload :Raw,                   "#{__dir__}/markup/raw"
  autoload :Rule,                  "#{__dir__}/markup/rule"
  autoload :Verbatim,              "#{__dir__}/markup/verbatim"

  # Formatters
  autoload :Formatter,             "#{__dir__}/markup/formatter"

  autoload :ToAnsi,                "#{__dir__}/markup/to_ansi"
  autoload :ToBs,                  "#{__dir__}/markup/to_bs"
  autoload :ToHtml,                "#{__dir__}/markup/to_html"
  autoload :ToHtmlCrossref,        "#{__dir__}/markup/to_html_crossref"
  autoload :ToHtmlSnippet,         "#{__dir__}/markup/to_html_snippet"
  autoload :ToLabel,               "#{__dir__}/markup/to_label"
  autoload :ToMarkdown,            "#{__dir__}/markup/to_markdown"
  autoload :ToRdoc,                "#{__dir__}/markup/to_rdoc"
  autoload :ToTableOfContents,     "#{__dir__}/markup/to_table_of_contents"
  autoload :ToTest,                "#{__dir__}/markup/to_test"
  autoload :ToTtOnly,              "#{__dir__}/markup/to_tt_only"

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/class_module.rb000064400000047504150403134140014666 0ustar00# frozen_string_literal: true
##
# ClassModule is the base class for objects representing either a class or a
# module.

class RDoc::ClassModule < RDoc::Context

  ##
  # 1::
  #   RDoc 3.7
  #   * Added visibility, singleton and file to attributes
  #   * Added file to constants
  #   * Added file to includes
  #   * Added file to methods
  # 2::
  #   RDoc 3.13
  #   * Added extends
  # 3::
  #   RDoc 4.0
  #   * Added sections
  #   * Added in_files
  #   * Added parent name
  #   * Complete Constant dump

  MARSHAL_VERSION = 3 # :nodoc:

  ##
  # Constants that are aliases for this class or module

  attr_accessor :constant_aliases

  ##
  # Comment and the location it came from.  Use #add_comment to add comments

  attr_accessor :comment_location

  attr_accessor :diagram # :nodoc:

  ##
  # Class or module this constant is an alias for

  attr_accessor :is_alias_for

  ##
  # Return a RDoc::ClassModule of class +class_type+ that is a copy
  # of module +module+. Used to promote modules to classes.
  #--
  # TODO move to RDoc::NormalClass (I think)

  def self.from_module class_type, mod
    klass = class_type.new mod.name

    mod.comment_location.each do |comment, location|
      klass.add_comment comment, location
    end

    klass.parent = mod.parent
    klass.section = mod.section
    klass.viewer = mod.viewer

    klass.attributes.concat mod.attributes
    klass.method_list.concat mod.method_list
    klass.aliases.concat mod.aliases
    klass.external_aliases.concat mod.external_aliases
    klass.constants.concat mod.constants
    klass.includes.concat mod.includes
    klass.extends.concat mod.extends

    klass.methods_hash.update mod.methods_hash
    klass.constants_hash.update mod.constants_hash

    klass.current_section = mod.current_section
    klass.in_files.concat mod.in_files
    klass.sections.concat mod.sections
    klass.unmatched_alias_lists = mod.unmatched_alias_lists
    klass.current_section = mod.current_section
    klass.visibility = mod.visibility

    klass.classes_hash.update mod.classes_hash
    klass.modules_hash.update mod.modules_hash
    klass.metadata.update mod.metadata

    klass.document_self = mod.received_nodoc ? nil : mod.document_self
    klass.document_children = mod.document_children
    klass.force_documentation = mod.force_documentation
    klass.done_documenting = mod.done_documenting

    # update the parent of all children

    (klass.attributes +
     klass.method_list +
     klass.aliases +
     klass.external_aliases +
     klass.constants +
     klass.includes +
     klass.extends +
     klass.classes +
     klass.modules).each do |obj|
      obj.parent = klass
      obj.full_name = nil
    end

    klass
  end

  ##
  # Creates a new ClassModule with +name+ with optional +superclass+
  #
  # This is a constructor for subclasses, and must never be called directly.

  def initialize(name, superclass = nil)
    @constant_aliases = []
    @diagram          = nil
    @is_alias_for     = nil
    @name             = name
    @superclass       = superclass
    @comment_location = [] # [[comment, location]]

    super()
  end

  ##
  # Adds +comment+ to this ClassModule's list of comments at +location+.  This
  # method is preferred over #comment= since it allows ri data to be updated
  # across multiple runs.

  def add_comment comment, location
    return unless document_self

    original = comment

    comment = case comment
              when RDoc::Comment then
                comment.normalize
              else
                normalize_comment comment
              end

    if location.parser == RDoc::Parser::C
      @comment_location.delete_if { |(_, l)| l == location }
    end

    @comment_location << [comment, location]

    self.comment = original
  end

  def add_things my_things, other_things # :nodoc:
    other_things.each do |group, things|
      my_things[group].each { |thing| yield false, thing } if
        my_things.include? group

      things.each do |thing|
        yield true, thing
      end
    end
  end

  ##
  # Ancestors list for this ClassModule: the list of included modules
  # (classes will add their superclass if any).
  #
  # Returns the included classes or modules, not the includes
  # themselves. The returned values are either String or
  # RDoc::NormalModule instances (see RDoc::Include#module).
  #
  # The values are returned in reverse order of their inclusion,
  # which is the order suitable for searching methods/attributes
  # in the ancestors. The superclass, if any, comes last.

  def ancestors
    includes.map { |i| i.module }.reverse
  end

  def aref_prefix # :nodoc:
    raise NotImplementedError, "missing aref_prefix for #{self.class}"
  end

  ##
  # HTML fragment reference for this module or class.  See
  # RDoc::NormalClass#aref and RDoc::NormalModule#aref

  def aref
    "#{aref_prefix}-#{full_name}"
  end

  ##
  # Ancestors of this class or module only

  alias direct_ancestors ancestors

  ##
  # Clears the comment. Used by the Ruby parser.

  def clear_comment
    @comment = ''
  end

  ##
  # This method is deprecated, use #add_comment instead.
  #
  # Appends +comment+ to the current comment, but separated by a rule.  Works
  # more like <tt>+=</tt>.

  def comment= comment # :nodoc:
    comment = case comment
              when RDoc::Comment then
                comment.normalize
              else
                normalize_comment comment
              end

    comment = "#{@comment.to_s}\n---\n#{comment.to_s}" unless @comment.empty?

    super comment
  end

  ##
  # Prepares this ClassModule for use by a generator.
  #
  # See RDoc::Store#complete

  def complete min_visibility
    update_aliases
    remove_nodoc_children
    update_includes
    remove_invisible min_visibility
  end

  ##
  # Does this ClassModule or any of its methods have document_self set?

  def document_self_or_methods
    document_self || method_list.any?{ |m| m.document_self }
  end

  ##
  # Does this class or module have a comment with content or is
  # #received_nodoc true?

  def documented?
    return true if @received_nodoc
    return false if @comment_location.empty?
    @comment_location.any? { |comment, _| not comment.empty? }
  end

  ##
  # Iterates the ancestors of this class or module for which an
  # RDoc::ClassModule exists.

  def each_ancestor # :yields: module
    return enum_for __method__ unless block_given?

    ancestors.each do |mod|
      next if String === mod
      next if self == mod
      yield mod
    end
  end

  ##
  # Looks for a symbol in the #ancestors. See Context#find_local_symbol.

  def find_ancestor_local_symbol symbol
    each_ancestor do |m|
      res = m.find_local_symbol(symbol)
      return res if res
    end

    nil
  end

  ##
  # Finds a class or module with +name+ in this namespace or its descendants

  def find_class_named name
    return self if full_name == name
    return self if @name == name

    @classes.values.find do |klass|
      next if klass == self
      klass.find_class_named name
    end
  end

  ##
  # Return the fully qualified name of this class or module

  def full_name
    @full_name ||= if RDoc::ClassModule === parent then
                     "#{parent.full_name}::#{@name}"
                   else
                     @name
                   end
  end

  ##
  # TODO: filter included items by #display?

  def marshal_dump # :nodoc:
    attrs = attributes.sort.map do |attr|
      next unless attr.display?
      [ attr.name, attr.rw,
        attr.visibility, attr.singleton, attr.file_name,
      ]
    end.compact

    method_types = methods_by_type.map do |type, visibilities|
      visibilities = visibilities.map do |visibility, methods|
        method_names = methods.map do |method|
          next unless method.display?
          [method.name, method.file_name]
        end.compact

        [visibility, method_names.uniq]
      end

      [type, visibilities]
    end

    [ MARSHAL_VERSION,
      @name,
      full_name,
      @superclass,
      parse(@comment_location),
      attrs,
      constants.select { |constant| constant.display? },
      includes.map do |incl|
        next unless incl.display?
        [incl.name, parse(incl.comment), incl.file_name]
      end.compact,
      method_types,
      extends.map do |ext|
        next unless ext.display?
        [ext.name, parse(ext.comment), ext.file_name]
      end.compact,
      @sections.values,
      @in_files.map do |tl|
        tl.relative_name
      end,
      parent.full_name,
      parent.class,
    ]
  end

  def marshal_load array # :nodoc:
    initialize_visibility
    initialize_methods_etc
    @current_section   = nil
    @document_self     = true
    @done_documenting  = false
    @parent            = nil
    @temporary_section = nil
    @visibility        = nil
    @classes           = {}
    @modules           = {}

    @name       = array[1]
    @full_name  = array[2]
    @superclass = array[3]
    @comment    = array[4]

    @comment_location = if RDoc::Markup::Document === @comment.parts.first then
                          @comment
                        else
                          RDoc::Markup::Document.new @comment
                        end

    array[5].each do |name, rw, visibility, singleton, file|
      singleton  ||= false
      visibility ||= :public

      attr = RDoc::Attr.new nil, name, rw, nil, singleton

      add_attribute attr
      attr.visibility = visibility
      attr.record_location RDoc::TopLevel.new file
    end

    array[6].each do |constant, comment, file|
      case constant
      when RDoc::Constant then
        add_constant constant
      else
        constant = add_constant RDoc::Constant.new(constant, nil, comment)
        constant.record_location RDoc::TopLevel.new file
      end
    end

    array[7].each do |name, comment, file|
      incl = add_include RDoc::Include.new(name, comment)
      incl.record_location RDoc::TopLevel.new file
    end

    array[8].each do |type, visibilities|
      visibilities.each do |visibility, methods|
        @visibility = visibility

        methods.each do |name, file|
          method = RDoc::AnyMethod.new nil, name
          method.singleton = true if type == 'class'
          method.record_location RDoc::TopLevel.new file
          add_method method
        end
      end
    end

    array[9].each do |name, comment, file|
      ext = add_extend RDoc::Extend.new(name, comment)
      ext.record_location RDoc::TopLevel.new file
    end if array[9] # Support Marshal version 1

    sections = (array[10] || []).map do |section|
      [section.title, section]
    end

    @sections = Hash[*sections.flatten]
    @current_section = add_section nil

    @in_files = []

    (array[11] || []).each do |filename|
      record_location RDoc::TopLevel.new filename
    end

    @parent_name  = array[12]
    @parent_class = array[13]
  end

  ##
  # Merges +class_module+ into this ClassModule.
  #
  # The data in +class_module+ is preferred over the receiver.

  def merge class_module
    @parent      = class_module.parent
    @parent_name = class_module.parent_name

    other_document = parse class_module.comment_location

    if other_document then
      document = parse @comment_location

      document = document.merge other_document

      @comment = @comment_location = document
    end

    cm = class_module
    other_files = cm.in_files

    merge_collections attributes, cm.attributes, other_files do |add, attr|
      if add then
        add_attribute attr
      else
        @attributes.delete attr
        @methods_hash.delete attr.pretty_name
      end
    end

    merge_collections constants, cm.constants, other_files do |add, const|
      if add then
        add_constant const
      else
        @constants.delete const
        @constants_hash.delete const.name
      end
    end

    merge_collections includes, cm.includes, other_files do |add, incl|
      if add then
        add_include incl
      else
        @includes.delete incl
      end
    end

    @includes.uniq! # clean up

    merge_collections extends, cm.extends, other_files do |add, ext|
      if add then
        add_extend ext
      else
        @extends.delete ext
      end
    end

    @extends.uniq! # clean up

    merge_collections method_list, cm.method_list, other_files do |add, meth|
      if add then
        add_method meth
      else
        @method_list.delete meth
        @methods_hash.delete meth.pretty_name
      end
    end

    merge_sections cm

    self
  end

  ##
  # Merges collection +mine+ with +other+ preferring other.  +other_files+ is
  # used to help determine which items should be deleted.
  #
  # Yields whether the item should be added or removed (true or false) and the
  # item to be added or removed.
  #
  #   merge_collections things, other.things, other.in_files do |add, thing|
  #     if add then
  #       # add the thing
  #     else
  #       # remove the thing
  #     end
  #   end

  def merge_collections mine, other, other_files, &block # :nodoc:
    my_things    = mine. group_by { |thing| thing.file }
    other_things = other.group_by { |thing| thing.file }

    remove_things my_things, other_files,  &block
    add_things    my_things, other_things, &block
  end

  ##
  # Merges the comments in this ClassModule with the comments in the other
  # ClassModule +cm+.

  def merge_sections cm # :nodoc:
    my_sections    =    sections.group_by { |section| section.title }
    other_sections = cm.sections.group_by { |section| section.title }

    other_files = cm.in_files

    remove_things my_sections, other_files do |_, section|
      @sections.delete section.title
    end

    other_sections.each do |group, sections|
      if my_sections.include? group
        my_sections[group].each do |my_section|
          other_section = cm.sections_hash[group]

          my_comments    = my_section.comments
          other_comments = other_section.comments

          other_files = other_section.in_files

          merge_collections my_comments, other_comments, other_files do |add, comment|
            if add then
              my_section.add_comment comment
            else
              my_section.remove_comment comment
            end
          end
        end
      else
        sections.each do |section|
          add_section group, section.comments
        end
      end
    end
  end

  ##
  # Does this object represent a module?

  def module?
    false
  end

  ##
  # Allows overriding the initial name.
  #
  # Used for modules and classes that are constant aliases.

  def name= new_name
    @name = new_name
  end

  ##
  # Parses +comment_location+ into an RDoc::Markup::Document composed of
  # multiple RDoc::Markup::Documents with their file set.

  def parse comment_location
    case comment_location
    when String then
      super
    when Array then
      docs = comment_location.map do |comment, location|
        doc = super comment
        doc.file = location
        doc
      end

      RDoc::Markup::Document.new(*docs)
    when RDoc::Comment then
      doc = super comment_location.text, comment_location.format
      doc.file = comment_location.location
      doc
    when RDoc::Markup::Document then
      return comment_location
    else
      raise ArgumentError, "unknown comment class #{comment_location.class}"
    end
  end

  ##
  # Path to this class or module for use with HTML generator output.

  def path
    http_url @store.rdoc.generator.class_dir
  end

  ##
  # Name to use to generate the url:
  # modules and classes that are aliases for another
  # module or class return the name of the latter.

  def name_for_path
    is_alias_for ? is_alias_for.full_name : full_name
  end

  ##
  # Returns the classes and modules that are not constants
  # aliasing another class or module. For use by formatters
  # only (caches its result).

  def non_aliases
    @non_aliases ||= classes_and_modules.reject { |cm| cm.is_alias_for }
  end

  ##
  # Updates the child modules or classes of class/module +parent+ by
  # deleting the ones that have been removed from the documentation.
  #
  # +parent_hash+ is either <tt>parent.modules_hash</tt> or
  # <tt>parent.classes_hash</tt> and +all_hash+ is ::all_modules_hash or
  # ::all_classes_hash.

  def remove_nodoc_children
    prefix = self.full_name + '::'

    modules_hash.each_key do |name|
      full_name = prefix + name
      modules_hash.delete name unless @store.modules_hash[full_name]
    end

    classes_hash.each_key do |name|
      full_name = prefix + name
      classes_hash.delete name unless @store.classes_hash[full_name]
    end
  end

  def remove_things my_things, other_files # :nodoc:
    my_things.delete_if do |file, things|
      next false unless other_files.include? file

      things.each do |thing|
        yield false, thing
      end

      true
    end
  end

  ##
  # Search record used by RDoc::Generator::JsonIndex

  def search_record
    [
      name,
      full_name,
      full_name,
      '',
      path,
      '',
      snippet(@comment_location),
    ]
  end

  ##
  # Sets the store for this class or module and its contained code objects.

  def store= store
    super

    @attributes .each do |attr|  attr.store  = store end
    @constants  .each do |const| const.store = store end
    @includes   .each do |incl|  incl.store  = store end
    @extends    .each do |ext|   ext.store   = store end
    @method_list.each do |meth|  meth.store  = store end
  end

  ##
  # Get the superclass of this class.  Attempts to retrieve the superclass
  # object, returns the name if it is not known.

  def superclass
    @store.find_class_named(@superclass) || @superclass
  end

  ##
  # Set the superclass of this class to +superclass+

  def superclass=(superclass)
    raise NoMethodError, "#{full_name} is a module" if module?
    @superclass = superclass
  end

  def to_s # :nodoc:
    if is_alias_for then
      "#{self.class.name} #{self.full_name} -> #{is_alias_for}"
    else
      super
    end
  end

  ##
  # 'module' or 'class'

  def type
    module? ? 'module' : 'class'
  end

  ##
  # Updates the child modules & classes by replacing the ones thgems/gems/rdoc-6.5.1.1/lib/rdoc/generator.rb000064400000003513150403134140014172 0ustar00lias = cm.dup
      cm_alias.name = const.name

      # Don't move top-level aliases under Object, they look ugly there
      unless RDoc::TopLevel === cm_alias.parent then
        cm_alias.parent = self
        cm_alias.full_name = nil # force update for new parent
      end

      cm_alias.aliases.clear
      cm_alias.is_alias_for = cm

      if cm.module? then
        @store.modules_hash[cm_alias.full_name] = cm_alias
        modules_hash[const.name] = cm_alias
      else
        @store.classes_hash[cm_alias.full_name] = cm_alias
        classes_hash[const.name] = cm_alias
      end

      cm.aliases << cm_alias
    end
  end

  ##
  # Deletes from #includes those whose module has been removed from the
  # documentation.
  #--
  # FIXME: includes are not reliably removed, see _possible_bug test case

  def update_includes
    includes.reject! do |include|
      mod = include.module
      !(String === mod) && @store.modules_hash[mod.full_name].nil?
    end

    includes.uniq!
  end

  ##
  # Deletes from #extends those whose module has been removed from the
  # documentation.
  #--
  # FIXME: like update_includes, extends are not reliably removed

  def update_extends
    extends.reject! do |ext|
      mod = ext.module

      !(String === mod) && @store.modules_hash[mod.full_name].nil?
    end

    extends.uniq!
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/generator.rb000064400000003513150403134140014172 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/include.rb000064400000000254150403134140013626 0ustar00fore option processing in +rdoc+, RDoc::Options will call ::setup_options
# on the generator class with an RDoc::Options instance.  The generator can
# use RDoc::Options#opgems/gems/rdoc-6.5.1.1/lib/rdoc/extend.rb000064400000000252150403134140013470 0ustar00create
# your desired output format.

module RDoc::Generator

  autoload :Markup,   "#{__dir__}/generator/markup"

  autoload :Darkfish,  "#{__dir__}/generator/darkfish"
gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown.rb000064400001412356150403134140014040 0ustar00# frozen_string_literal: true
##
# A Module included in a class with \#include
#
#   RDoc::Include.new 'Enumerable', 'comment ...'

class RDoc::Include < RDoc::Mixin

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/extend.rb000064400000000252150403134140013470 0ustar00# frozen_string_literal: true
##
# A Module extension to a class with \#extend
#
#   RDoc::Extend.new 'Enumerable', 'comment ...'

class RDoc::Extend < RDoc::Mixin

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown.rb000064400001412356150403134140014040 0ustar00# coding: UTF-8
# frozen_string_literal: true
# :markup: markdown

##
# RDoc::Markdown as described by the [markdown syntax][syntax].
#
# 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.
#
# ## Usage
#
# Here is a brief example of using this parse to read a markdown file by hand.
#
#     data = File.read("README.md")
#     formatter = RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
#     html = RDoc::Markdown.parse(data).accept(formatter)
#
#     # do something with html
#
# ## Extensions
#
# The following markdown extensions are supported by the parser, but not all
# are used in RDoc output by default.
#
# ### RDoc
#
# The RDoc Markdown parser has the following built-in behaviors that cannot be
# disabled.
#
# Underscores embedded in words are never interpreted as emphasis.  (While the
# [markdown dingus][dingus] emphasizes in-word underscores, neither the
# Markdown syntax nor MarkdownTest mention this behavior.)
#
# For HTML output, RDoc always auto-links bare URLs.
#
# ### Break on Newline
#
# The break_on_newline extension converts all newlines into hard line breaks
# as in [Github Flavored Markdown][GFM].  This extension is disabled by
# default.
#
# ### CSS
#
# 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.
#
# Example:
#
#     <style type="text/css">
#     h1 { font-size: 3em }
#     </style>
#
# ### Definition Lists
#
# The definition_lists extension allows definition lists using the [PHP
# Markdown Extra syntax][PHPE], but only one label and definition are supported
# at this time.  This extension is enabled by default.
#
# Example:
#
# ```
# cat
# :   A small furry mammal
# that seems to sleep a lot
#
# ant
# :   A little insect that is known
# to enjoy picnics
#
# ```
#
# Produces:
#
# cat
# :   A small furry mammal
# that seems to sleep a lot
#
# ant
# :   A little insect that is known
# to enjoy picnics
#
# ### Strike
#
# Example:
#
# ```
# This is ~~striked~~.
# ```
#
# Produces:
#
# This is ~~striked~~.
#
# ### Github
#
# The #github extension enables a partial set of [Github Flavored Markdown]
# [GFM].  This extension is enabled by default.
#
# Supported github extensions include:
#
# #### Fenced code blocks
#
# Use ` ``` ` around a block of code instead of indenting it four spaces.
#
# #### Syntax highlighting
#
# Use ` ``` ruby ` as the start of a code fence to add syntax highlighting.
# (Currently only `ruby` syntax is supported).
#
# ### HTML
#
# Enables raw HTML to be included in the output.  This extension is enabled by
# default.
#
# Example:
#
#     <table>
#     ...
#     </table>
#
# ### Notes
#
# The #notes extension enables footnote support.  This extension is enabled by
# default.
#
# Example:
#
#     Here is some text[^1] including an inline footnote ^[for short footnotes]
#
#     ...
#
#     [^1]: With the footnote text down at the bottom
#
# Produces:
#
# Here is some text[^1] including an inline footnote ^[for short footnotes]
#
# [^1]: With the footnote text down at the bottom
#
# ## Limitations
#
# * Link titles are not used
# * Footnotes are collapsed into a single paragraph
#
# ## Author
#
# This markdown parser is a port to kpeg from [peg-markdown][pegmarkdown] by
# John MacFarlane.
#
# It is used under the MIT license:
#
# 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:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# 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.
#
# The port to kpeg was performed by Eric Hodel and Evan Phoenix
#
# [dingus]: http://daringfireball.net/projects/markdown/dingus
# [GFM]: https://github.github.com/gfm/
# [pegmarkdown]: https://github.com/jgm/peg-markdown
# [PHPE]: http://michelf.com/projects/php-markdown/extra/#def-list
# [syntax]: http://daringfireball.net/projects/markdown/syntax
#--
# Last updated to jgm/peg-markdown commit 8f8fc22ef0
class RDoc::Markdown
  # :stopdoc:

    # This is distinct from setup_parser so that a standalone parser
    # can redefine #initialize and still have access to the proper
    # parser setup code.
    def initialize(str, debug=false)
      setup_parser(str, debug)
    end



    # Prepares for parsing +str+.  If you define a custom initialize you must
    # call this method before #parse
    def setup_parser(str, debug=false)
      set_string str, 0
      @memoizations = Hash.new { |h,k| h[k] = {} }
      @result = nil
      @failed_rule = nil
      @failing_rule_offset = -1
      @line_offsets = nil

      setup_foreign_grammar
    end

    attr_reader :string
    attr_reader :failing_rule_offset
    attr_accessor :result, :pos

    def current_column(target=pos)
      if string[target] == "\n" && (c = string.rindex("\n", target-1) || -1)
        return target - c
      elsif c = string.rindex("\n", target)
        return target - c
      end

      target + 1
    end

    def position_line_offsets
      unless @position_line_offsets
        @position_line_offsets = []
        total = 0
        string.each_line do |line|
          total += line.size
          @position_line_offsets << total
        end
      end
      @position_line_offsets
    end

    if [].respond_to? :bsearch_index
      def current_line(target=pos)
        if line = position_line_offsets.bsearch_index {|x| x > target }
          return line + 1
        end
        raise "Target position #{target} is outside of string"
      end
    else
      def current_line(target=pos)
        if line = position_line_offsets.index {|x| x > target }
          return line + 1
        end

        raise "Target position #{target} is outside of string"
      end
    end

    def current_character(target=pos)
      if target < 0 || target >= string.size
        raise "Target position #{target} is outside of string"
      end
      string[target, 1]
    end

    KpegPosInfo = Struct.new(:pos, :lno, :col, :line, :char)

    def current_pos_info(target=pos)
      l = current_line target
      c = current_column target
      ln = get_line(l-1)
      chr = string[target,1]
      KpegPosInfo.new(target, l, c, ln, chr)
    end

    def lines
      string.lines
    end

    def get_line(no)
      loff = position_line_offsets
      if no < 0
        raise "Line No is out of range: #{no} < 0"
      elsif no >= loff.size
        raise "Line No is out of range: #{no} >= #{loff.size}"
      end
      lend = loff[no]-1
      lstart = no > 0 ? loff[no-1] : 0
      string[lstart..lend]
    end



    def get_text(start)
      @string[start..@pos-1]
    end

    # Sets the string and current parsing position for the parser.
    def set_string string, pos
      @string = string
      @string_size = string ? string.size : 0
      @pos = pos
      @position_line_offsets = nil
    end

    def show_pos
      width = 10
      if @pos < width
        "#{@pos} (\"#{@string[0,@pos]}\" @ \"#{@string[@pos,width]}\")"
      else
        "#{@pos} (\"... #{@string[@pos - width, width]}\" @ \"#{@string[@pos,width]}\")"
      end
    end

    def failure_info
      l = current_line @failing_rule_offset
      c = current_column @failing_rule_offset

      if @failed_rule.kind_of? Symbol
        info = self.class::Rules[@failed_rule]
        "line #{l}, column #{c}: failed rule '#{info.name}' = '#{info.rendered}'"
      else
        "line #{l}, column #{c}: failed rule '#{@failed_rule}'"
      end
    end

    def failure_caret
      p = current_pos_info @failing_rule_offset
      "#{p.line.chomp}\n#{' ' * (p.col - 1)}^"
    end

    def failure_character
      current_character @failing_rule_offset
    end

    def failure_oneline
      p = current_pos_info @failing_rule_offset

      if @failed_rule.kind_of? Symbol
        info = self.class::Rules[@failed_rule]
        "@#{p.lno}:#{p.col} failed rule '#{info.name}', got '#{p.char}'"
      else
        "@#{p.lno}:#{p.col} failed rule '#{@failed_rule}', got '#{p.char}'"
      end
    end

    class ParseError < RuntimeError
    end

    def raise_error
      raise ParseError, failure_oneline
    end

    def show_error(io=STDOUT)
      error_pos = @failing_rule_offset
      p = current_pos_info(error_pos)

      io.puts "On line #{p.lno}, column #{p.col}:"

      if @failed_rule.kind_of? Symbol
        info = self.class::Rules[@failed_rule]
        io.puts "Failed to match '#{info.rendered}' (rule '#{info.name}')"
      else
        io.puts "Failed to match rule '#{@failed_rule}'"
      end

      io.puts "Got: #{p.char.inspect}"
      io.puts "=> #{p.line}"
      io.print(" " * (p.col + 2))
      io.puts "^"
    end

    def set_failed_rule(name)
      if @pos > @failing_rule_offset
        @failed_rule = name
        @failing_rule_offset = @pos
      end
    end

    attr_reader :failed_rule

    def match_string(str)
      len = str.size
      if @string[pos,len] == str
        @pos += len
        return str
      end

      return nil
    end

    def scan(reg)
      if m = reg.match(@string, @pos)
        @pos = m.end(0)
        return true
      end

      return nil
    end

    if "".respond_to? :ord
      def get_byte
        if @pos >= @string_size
          return nil
        end

        s = @string[@pos].ord
        @pos += 1
        s
      end
    else
      def get_byte
        if @pos >= @string_size
          return nil
        end

        s = @string[@pos]
        @pos += 1
        s
      end
    end

    def parse(rule=nil)
      # We invoke the rules indirectly via apply
      # instead of by just calling them as methods because
      # if the rules use left recursion, apply needs to
      # manage that.

      if !rule
        apply(:_root)
      else
        method = rule.gsub("-","_hyphen_")
        apply :"_#{method}"
      end
    end

    class MemoEntry
      def initialize(ans, pos)
        @ans = ans
        @pos = pos
        @result = nil
        @set = false
        @left_rec = false
      end

      attr_reader :ans, :pos, :result, :set
      attr_accessor :left_rec

      def move!(ans, pos, result)
        @ans = ans
        @pos = pos
        @result = result
        @set = true
        @left_rec = false
      end
    end

    def external_invoke(other, rule, *args)
      old_pos = @pos
      old_string = @string

      set_string other.string, other.pos

      begin
        if val = __send__(rule, *args)
          other.pos = @pos
          other.result = @result
        else
          other.set_failed_rule "#{self.class}##{rule}"
        end
        val
      ensure
        set_string old_string, old_pos
      end
    end

    def apply_with_args(rule, *args)
      @result = nil
      memo_key = [rule, args]
      if m = @memoizations[memo_key][@pos]
        @pos = m.pos
        if !m.set
          m.left_rec = true
          return nil
        end

        @result = m.result

        return m.ans
      else
        m = MemoEntry.new(nil, @pos)
        @memoizations[memo_key][@pos] = m
        start_pos = @pos

        ans = __send__ rule, *args

        lr = m.left_rec

        m.move! ans, @pos, @result

        # Don't bother trying to grow the left recursion
        # if it's failing straight away (thus there is no seed)
        if ans and lr
          return grow_lr(rule, args, start_pos, m)
        else
          return ans
        end
      end
    end

    def apply(rule)
      @result = nil
      if m = @memoizations[rule][@pos]
        @pos = m.pos
        if !m.set
          m.left_rec = true
          return nil
        end

        @result = m.result

        return m.ans
      else
        m = MemoEntry.new(nil, @pos)
        @memoizations[rule][@pos] = m
        start_pos = @pos

        ans = __send__ rule

        lr = m.left_rec

        m.move! ans, @pos, @result

        # Don't bother trying to grow the left recursion
        # if it's failing straight away (thus there is no seed)
        if ans and lr
          return grow_lr(rule, nil, start_pos, m)
        else
          return ans
        end
      end
    end

    def grow_lr(rule, args, start_pos, m)
      while true
        @pos = start_pos
        @result = m.result

        if args
          ans = __send__ rule, *args
        else
          ans = __send__ rule
        end
        return nil unless ans

        break if @pos <= m.pos

        m.move! ans, @pos, @result
      end

      @result = m.result
      @pos = m.pos
      return m.ans
    end

    class RuleInfo
      def initialize(name, rendered)
        @name = name
        @rendered = rendered
      end

      attr_reader :name, :rendered
    end

    def self.rule_info(name, rendered)
      RuleInfo.new(name, rendered)
    end


  # :startdoc:



  require_relative '../rdoc'
  require_relative 'markup/to_joined_paragraph'
  require_relative 'markdown/entities'

  require_relative 'markdown/literals'

  ##
  # Supported extensions

  EXTENSIONS = []

  ##
  # Extensions enabled by default

  DEFAULT_EXTENSIONS = [
    :definition_lists,
    :github,
    :html,
    :notes,
    :strike,
  ]

  # :section: Extensions

  ##
  # Creates extension methods for the `name` extension to enable and disable
  # the extension and to query if they are active.

  def self.extension name
    EXTENSIONS << name

    define_method "#{name}?" do
      extension? name
    end

    define_method "#{name}=" do |enable|
      extension name, enable
    end
  end

  ##
  # Converts all newlines into hard breaks

  extension :break_on_newline

  ##
  # Allow style blocks

  extension :css

  ##
  # Allow PHP Markdown Extras style definition lists

  extension :definition_lists

  ##
  # Allow Github Flavored Markdown

  extension :github

  ##
  # Allow HTML

  extension :html

  ##
  # Enables the notes extension

  extension :notes

  ##
  # Enables the strike extension

  extension :strike

  # :section:

  ##
  # Parses the `markdown` document into an RDoc::Document using the default
  # extensions.

  def self.parse markdown
    parser = new

    parser.parse markdown
  end

  # TODO remove when kpeg 0.10 is released
  alias orig_initialize initialize # :nodoc:

  ##
  # Creates a new markdown parser that enables the given +extensions+.

  def initialize extensions = DEFAULT_EXTENSIONS, debug = false
    @debug      = debug
    @formatter  = RDoc::Markup::ToJoinedParagraph.new
    @extensions = extensions

    @references          = nil
    @unlinked_references = nil

    @footnotes       = nil
    @note_order      = nil
  end

  ##
  # Wraps `text` in emphasis for rdoc inline formatting

  def emphasis text
    if text =~ /\A[a-z\d.\/]+\z/i then
      "_#{text}_"
    else
      "<em>#{text}</em>"
    end
  end

  ##
  # :category: Extensions
  #
  # Is the extension `name` enabled?

  def extension? name
    @extensions.include? name
  end

  ##
  # :category: Extensions
  #
  # Enables or disables the extension with `name`

  def extension name, enable
    if enable then
      @extensions |= [name]
    else
      @extensions -= [name]
    end
  end

  ##
  # Parses `text` in a clone of this parser.  This is used for handling nested
  # lists the same way as markdown_parser.

  def inner_parse text # :nodoc:
    parser = clone

    parser.setup_parser text, @debug

    parser.peg_parse

    doc = parser.result

    doc.accept @formatter

    doc.parts
  end

  ##
  # 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).

  def link_to content, label = content, text = nil
    raise ParseError, 'enable notes extension' if
      content.start_with? '^' and label.equal? content

    if ref = @references[label] then
      "{#{content}}[#{ref}]"
    elsif label.equal? content then
      "[#{content}]#{text}"
    else
      "[#{content}]#{text}[#{label}]"
    end
  end

  ##
  # Creates an RDoc::Markup::ListItem by parsing the `unparsed` content from
  # the first parsing pass.

  def list_item_from unparsed
    parsed = inner_parse unparsed.join
    RDoc::Markup::ListItem.new nil, *parsed
  end

  ##
  # Stores `label` as a note and fills in previously unknown note references.

  def note label
    #foottext = "rdoc-label:foottext-#{label}:footmark-#{label}"

    #ref.replace foottext if ref = @unlinked_notes.delete(label)

    @notes[label] = foottext

    #"{^1}[rdoc-label:footmark-#{label}:foottext-#{label}] "
  end

  ##
  # 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.

  def note_for ref
    @note_order << ref

    label = @note_order.length

    "{*#{label}}[rdoc-label:foottext-#{label}:footmark-#{label}]"
  end

  ##
  # The internal kpeg parse method

  alias peg_parse parse # :nodoc:

  ##
  # Creates an RDoc::Markup::Paragraph from `parts` and including
  # extension-specific behavior

  def paragraph parts
    parts = parts.map do |part|
      if "\n" == part then
        RDoc::Markup::HardBreak.new
      else
        part
      end
    end if break_on_newline?

    RDoc::Markup::Paragraph.new(*parts)
  end

  ##
  # Parses `markdown` into an RDoc::Document

  def parse markdown
    @references          = {}
    @unlinked_references = {}

    markdown += "\n\n"

    setup_parser markdown, @debug
    peg_parse 'References'

    if notes? then
      @footnotes       = {}

      setup_parser markdown, @debug
      peg_parse 'Notes'

      # using note_order on the first pass would be a bug
      @note_order      = []
    end

    setup_parser markdown, @debug
    peg_parse

    doc = result

    if notes? and not @footnotes.empty? then
      doc << RDoc::Markup::Rule.new(1)

      @note_order.each_with_index do |ref, index|
        label = index + 1
        note = @footnotes[ref] or raise ParseError, "footnote [^#{ref}] not found"

        link = "{^#{label}}[rdoc-label:footmark-#{label}:foottext-#{label}] "
        note.parts.unshift link

        doc << note
      end
    end

    doc.accept @formatter

    doc
  end

  ##
  # Stores `label` as a reference to `link` and fills in previously unknown
  # link references.

  def reference label, link
    if ref = @unlinked_references.delete(label) then
      ref.replace link
    end

    @references[label] = link
  end

  ##
  # Wraps `text` in strong markup for rdoc inline formatting

  def strong text
    if text =~ /\A[a-z\d.\/-]+\z/i then
      "*#{text}*"
    else
      "<b>#{text}</b>"
    end
  end

  ##
  # Wraps `text` in strike markup for rdoc inline formatting

  def strike text
    if text =~ /\A[a-z\d.\/-]+\z/i then
      "~#{text}~"
    else
      "<s>#{text}</s>"
    end
  end


  # :stopdoc:
  def setup_foreign_grammar
    @_grammar_literals = RDoc::Markdown::Literals.new(nil)
  end

  # root = Doc
  def _root
    _tmp = apply(:_Doc)
    set_failed_rule :_root unless _tmp
    return _tmp
  end

  # Doc = BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) }
  def _Doc

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = apply(:_BOM)
      unless _tmp
        _tmp = true
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      _ary = []
      while true
        _tmp = apply(:_Block)
        _ary << @result if _tmp
        break unless _tmp
      end
      _tmp = true
      @result = _ary
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::Document.new(*a.compact) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Doc unless _tmp
    return _tmp
  end

  # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain)
  def _Block

    _save = self.pos
    while true # sequence
      while true
        _tmp = _BlankLine()
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end

      _save2 = self.pos
      while true # choice
        _tmp = apply(:_BlockQuote)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_Verbatim)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_CodeFence)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_Table)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_Note)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_Reference)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_HorizontalRule)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_Heading)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_OrderedList)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_BulletList)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_DefinitionList)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_HtmlBlock)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_StyleBlock)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_Para)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_Plain)
        break if _tmp
        self.pos = _save2
        break
      end # end choice

      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Block unless _tmp
    return _tmp
  end

  # Para = @NonindentSpace Inlines:a @BlankLine+ { paragraph a }
  def _Para

    _save = self.pos
    while true # sequence
      _tmp = _NonindentSpace()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Inlines)
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = _BlankLine()
      if _tmp
        while true
          _tmp = _BlankLine()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  paragraph a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Para unless _tmp
    return _tmp
  end

  # Plain = Inlines:a { paragraph a }
  def _Plain

    _save = self.pos
    while true # sequence
      _tmp = apply(:_Inlines)
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  paragraph a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Plain unless _tmp
    return _tmp
  end

  # AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline
  def _AtxInline

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = _Newline()
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos

      _save3 = self.pos
      while true # sequence
        _tmp = _Sp()
        unless _tmp
          self.pos = _save3
          break
        end
        _tmp = scan(/\G(?-mix:#*)/)
        unless _tmp
          self.pos = _save3
          break
        end
        _tmp = _Sp()
        unless _tmp
          self.pos = _save3
          break
        end
        _tmp = _Newline()
        unless _tmp
          self.pos = _save3
        end
        break
      end # end sequence

      _tmp = _tmp ? nil : true
      self.pos = _save2
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Inline)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_AtxInline unless _tmp
    return _tmp
  end

  # AtxStart = < /\#{1,6}/ > { text.length }
  def _AtxStart

    _save = self.pos
    while true # sequence
      _text_start = self.pos
      _tmp = scan(/\G(?-mix:\#{1,6})/)
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  text.length ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_AtxStart unless _tmp
    return _tmp
  end

  # AtxHeading = AtxStart:s @Sp AtxInline+:a (@Sp /#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) }
  def _AtxHeading

    _save = self.pos
    while true # sequence
      _tmp = apply(:_AtxStart)
      s = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _ary = []
      _tmp = apply(:_AtxInline)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_AtxInline)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save1
      end
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos

      _save3 = self.pos
      while true # sequence
        _tmp = _Sp()
        unless _tmp
          self.pos = _save3
          break
        end
        _tmp = scan(/\G(?-mix:#*)/)
        unless _tmp
          self.pos = _save3
          break
        end
        _tmp = _Sp()
        unless _tmp
          self.pos = _save3
        end
        break
      end # end sequence

      unless _tmp
        _tmp = true
        self.pos = _save2
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::Heading.new(s, a.join) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_AtxHeading unless _tmp
    return _tmp
  end

  # SetextHeading = (SetextHeading1 | SetextHeading2)
  def _SetextHeading

    _save = self.pos
    while true # choice
      _tmp = apply(:_SetextHeading1)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_SetextHeading2)
      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_SetextHeading unless _tmp
    return _tmp
  end

  # SetextBottom1 = /={1,}/ @Newline
  def _SetextBottom1

    _save = self.pos
    while true # sequence
      _tmp = scan(/\G(?-mix:={1,})/)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_SetextBottom1 unless _tmp
    return _tmp
  end

  # SetextBottom2 = /-{1,}/ @Newline
  def _SetextBottom2

    _save = self.pos
    while true # sequence
      _tmp = scan(/\G(?-mix:-{1,})/)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_SetextBottom2 unless _tmp
    return _tmp
  end

  # SetextHeading1 = &(@RawLine SetextBottom1) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom1 { RDoc::Markup::Heading.new(1, a.join) }
  def _SetextHeading1

    _save = self.pos
    while true # sequence
      _save1 = self.pos

      _save2 = self.pos
      while true # sequence
        _tmp = _RawLine()
        unless _tmp
          self.pos = _save2
          break
        end
        _tmp = apply(:_SetextBottom1)
        unless _tmp
          self.pos = _save2
        end
        break
      end # end sequence

      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save3 = self.pos

      _save4 = self.pos
      while true # sequence
        _save5 = self.pos
        _tmp = _Endline()
        _tmp = _tmp ? nil : true
        self.pos = _save5
        unless _tmp
          self.pos = _save4
          break
        end
        _tmp = apply(:_Inline)
        b = @result
        unless _tmp
          self.pos = _save4
          break
        end
        @result = begin;  a << b ; end
        _tmp = true
        unless _tmp
          self.pos = _save4
        end
        break
      end # end sequence

      if _tmp
        while true

          _save6 = self.pos
          while true # sequence
            _save7 = self.pos
       gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf000064400000416670150403134130025251 0ustar00      break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save3
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_SetextBottom1)
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::Heading.new(1, a.join) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_SetextHeading1 unless _tmp
    return _tmp
  end

  # SetextHeading2 = &(@RawLine SetextBottom2) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom2 { RDoc::Markup::Heading.new(2, a.join) }
  def _SetextHeading2

    _save = self.pos
    while true # sequence
      _save1 = self.pos

      _save2 = self.pos
      while true # sequence
        _tmp = _RawLine()
        unless _tmp
          self.pos = _save2
          break
        end
        _tmp = apply(:_SetextBottom2)
        unless _tmp
          self.pos = _save2
        end
        break
      end # end sequence

      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save3 = self.pos

      _save4 = self.pos
      while true # sequence
        _save5 = self.pos
        _tmp = _Endline()
        _tmp = _tmp ? nil : true
        self.pos = _save5
        unless _tmp
          self.pos = _save4
          break
        end
        _tmp = apply(:_Inline)
        b = @result
        unless _tmp
          self.pos = _save4
          break
        end
        @result = begin;  a << b ; end
        _tmp = true
        unless _tmp
          self.pos = _save4
        end
        break
      end # end sequence

      if _tmp
        while true

          _save6 = self.pos
          while true # sequence
            _save7 = self.pos
            _tmp = _Endline()
            _tmp = _tmp ? nil : true
            self.pos = _save7
            unless _tmp
              self.pos = _save6
              break
            end
            _tmp = apply(:_Inline)
            b = @result
            unless _tmp
              self.pos = _save6
              break
            end
            @result = begin;  a << b ; end
            _tmp = true
            unless _tmp
              self.pos = _save6
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save3
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_SetextBottom2)
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::Heading.new(2, a.join) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_SetextHeading2 unless _tmp
    return _tmp
  end

  # Heading = (SetextHeading | AtxHeading)
  def _Heading

    _save = self.pos
    while true # choice
      _tmp = apply(:_SetextHeading)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_AtxHeading)
      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_Heading unless _tmp
    return _tmp
  end

  # BlockQuote = BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) }
  def _BlockQuote

    _save = self.pos
    while true # sequence
      _tmp = apply(:_BlockQuoteRaw)
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::BlockQuote.new(*a) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_BlockQuote unless _tmp
    return _tmp
  end

  # BlockQuoteRaw = @StartList:a (">" " "? Line:l { a << l } (!">" !@BlankLine Line:c { a << c })* (@BlankLine:n { a << n })*)+ { inner_parse a.join }
  def _BlockQuoteRaw

    _save = self.pos
    while true # sequence
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos

      _save2 = self.pos
      while true # sequence
        _tmp = match_string(">")
        unless _tmp
          self.pos = _save2
          break
        end
        _save3 = self.pos
        _tmp = match_string(" ")
        unless _tmp
          _tmp = true
          self.pos = _save3
        end
        unless _tmp
          self.pos = _save2
          break
        end
        _tmp = apply(:_Line)
        l = @result
        unless _tmp
          self.pos = _save2
          break
        end
        @result = begin;  a << l ; end
        _tmp = true
        unless _tmp
          self.pos = _save2
          break
        end
        while true

          _save5 = self.pos
          while true # sequence
            _save6 = self.pos
            _tmp = match_string(">")
            _tmp = _tmp ? nil : true
            self.pos = _save6
            unless _tmp
              self.pos = _save5
              break
            end
            _save7 = self.pos
            _tmp = _BlankLine()
            _tmp = _tmp ? nil : true
            self.pos = _save7
            unless _tmp
              self.pos = _save5
              break
            end
            _tmp = apply(:_Line)
            c = @result
            unless _tmp
              self.pos = _save5
              break
            end
            @result = begin;  a << c ; end
            _tmp = true
            unless _tmp
              self.pos = _save5
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
        unless _tmp
          self.pos = _save2
          break
        end
        while true

          _save9 = self.pos
          while true # sequence
            _tmp = _BlankLine()
            n = @result
            unless _tmp
              self.pos = _save9
              break
            end
            @result = begin;  a << n ; end
            _tmp = true
            unless _tmp
              self.pos = _save9
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
        unless _tmp
          self.pos = _save2
        end
        break
      end # end sequence

      if _tmp
        while true

          _save10 = self.pos
          while true # sequence
            _tmp = match_string(">")
            unless _tmp
              self.pos = _save10
              break
            end
            _save11 = self.pos
            _tmp = match_string(" ")
            unless _tmp
              _tmp = true
              self.pos = _save11
            end
            unless _tmp
              self.pos = _save10
              break
            end
            _tmp = apply(:_Line)
            l = @result
            unless _tmp
              self.pos = _save10
              break
            end
            @result = begin;  a << l ; end
            _tmp = true
            unless _tmp
              self.pos = _save10
              break
            end
            while true

              _save13 = self.pos
              while true # sequence
                _save14 = self.pos
                _tmp = match_string(">")
                _tmp = _tmp ? nil : true
                self.pos = _save14
                unless _tmp
                  self.pos = _save13
                  break
                end
                _save15 = self.pos
                _tmp = _BlankLine()
                _tmp = _tmp ? nil : true
                self.pos = _save15
                unless _tmp
                  self.pos = _save13
                  break
                end
                _tmp = apply(:_Line)
                c = @result
                unless _tmp
                  self.pos = _save13
                  break
                end
                @result = begin;  a << c ; end
                _tmp = true
                unless _tmp
                  self.pos = _save13
                end
                break
              end # end sequence

              break unless _tmp
            end
            _tmp = true
            unless _tmp
              self.pos = _save10
              break
            end
            while true

              _save17 = self.pos
              while true # sequence
                _tmp = _BlankLine()
                n = @result
                unless _tmp
                  self.pos = _save17
                  break
                end
                @result = begin;  a << n ; end
                _tmp = true
                unless _tmp
                  self.pos = _save17
                end
                break
              end # end sequgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf000064400000416670150403134130025251 0ustar00nce

    set_failed_rule :_BlockQuoteRaw unless _tmp
    return _tmp
  end

  # NonblankIndentedLine = !@BlankLine IndentedLine
  def _NonblankIndentedLine

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = _BlankLine()
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_IndentedLine)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_NonblankIndentedLine unless _tmp
    return _tmp
  end

  # VerbatimChunk = @BlankLine*:a NonblankIndentedLine+:b { a.concat b }
  def _VerbatimChunk

    _save = self.pos
    while true # sequence
      _ary = []
      while true
        _tmp = _BlankLine()
        _ary << @result if _tmp
        break unless _tmp
      end
      _tmp = true
      @result = _ary
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _ary = []
      _tmp = apply(:_NonblankIndentedLine)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_NonblankIndentedLine)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save2
      end
      b = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a.concat b ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_VerbatimChunk unless _tmp
    return _tmp
  end

  # Verbatim = VerbatimChunk+:a { RDoc::Markup::Verbatim.new(*a.flatten) }
  def _Verbatim

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _ary = []
      _tmp = apply(:_VerbatimChunk)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_VerbatimChunk)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save1
      end
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::Verbatim.new(*a.flatten) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Verbatim unless _tmp
    return _tmp
  end

  # HorizontalRule = @NonindentSpace ("*" @Sp "*" @Sp "*" (@Sp "*")* | "-" @Sp "-" @Sp "-" (@Sp "-")* | "_" @Sp "_" @Sp "_" (@Sp "_")*) @Sp @Newline @BlankLine+ { RDoc::Markup::Rule.new 1 }
  def _HorizontalRule

    _save = self.pos
    while true # sequence
      _tmp = _NonindentSpace()
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice

        _save2 = self.pos
        while true # sequence
          _tmp = match_string("*")
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = match_string("*")
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = match_string("*")
          unless _tmp
            self.pos = _save2
            break
          end
          while true

            _save4 = self.pos
            while true # sequence
              _tmp = _Sp()
              unless _tmp
                self.pos = _save4
                break
              end
              _tmp = match_string("*")
              unless _tmp
                self.pos = _save4
              end
              break
            end # end sequence

            break unless _tmp
          end
          _tmp = true
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1

        _save5 = self.pos
        while true # sequence
          _tmp = match_string("-")
          unless _tmp
            self.pos = _save5
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save5
            break
          end
          _tmp = match_string("-")
          unless _tmp
            self.pos = _save5
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save5
            break
          end
          _tmp = match_string("-")
          unless _tmp
            self.pos = _save5
            break
          end
          while true

            _save7 = self.pos
            while true # sequence
              _tmp = _Sp()
              unless _tmp
                self.pos = _save7
                break
              end
              _tmp = match_string("-")
              unless _tmp
                self.pos = _save7
              end
              break
            end # end sequence

            break unless _tmp
          end
          _tmp = true
          unless _tmp
            self.pos = _save5
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1

        _save8 = self.pos
        while true # sequence
          _tmp = match_string("_")
          unless _tmp
            self.pos = _save8
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save8
            break
          end
          _tmp = match_string("_")
          unless _tmp
            self.pos = _save8
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save8
            break
          end
          _tmp = match_string("_")
          unless _tmp
            self.pos = _save8
            break
          end
          while true

            _save10 = self.pos
            while true # sequence
              _tmp = _Sp()
              unless _tmp
                self.pos = _save10
                break
              end
              _tmp = match_string("_")
              unless _tmp
                self.pos = _save10
              end
              break
            end # end sequence

            break unless _tmp
          end
          _tmp = true
          unless _tmp
            self.pos = _save8
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      _save11 = self.pos
      _tmp = _BlankLine()
      if _tmp
        while true
          _tmp = _BlankLine()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save11
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::Rule.new 1 ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HorizontalRule unless _tmp
    return _tmp
  end

  # Bullet = !HorizontalRule @NonindentSpace /[+*-]/ @Spacechar+
  def _Bullet

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = apply(:_HorizontalRule)
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _NonindentSpace()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = scan(/\G(?-mix:[+*-])/)
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _tmp = _Spacechar()
      if _tmp
        while true
          _tmp = _Spacechar()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save2
      end
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Bullet unless _tmp
    return _tmp
  end

  # BulletList = &Bullet (ListTight | ListLoose):a { RDoc::Markup::List.new(:BULLET, *a) }
  def _BulletList

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = apply(:_Bullet)
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end

      _save2 = self.pos
      while true # choice
        _tmp = apply(:_ListTight)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_ListLoose)
        break if _tmp
        self.pos = _save2
        break
      end # end choice

      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::List.new(:BULLET, *a) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_BulletList unless _tmp
    return _tmp
  end

  # ListTight = ListItemTight+:a @BlankLine* !(Bullet | Enumerator) { a }
  def _ListTight

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _ary = []
      _tmp = apply(:_ListItemTight)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_ListItemTight)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save1
      end
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = _BlankLine()
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _save3 = self.pos

      _save4 = self.pos
      while true # choice
        _tmp = apply(:_Bullet)
        break if _tmp
        self.pos = _save4
        _tmp = apply(:_Enumerator)
        break if _tmp
        self.pos = _save4
        break
      end # end choice

      _tmp = _tmp ? nil : true
      self.pos = _save3
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ListTight unless _tmp
    return _tmp
  end

  # ListLoose = @StartList:a (ListItem:b @BlankLine* { a << b })+ { a }
  def _ListLoose

    _save = self.pos
    while true # sequence
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos

      _save2 = self.pos
      while true # sequence
        _tmp = apply(:_ListItem)
        b = @result
        unless _tmp
          self.pos = _save2
          break
        end
        while true
          _tmp = _BlankLine()
          break unless _tmp
        end
        _tmp = true
        unless _tmp
          self.pos = _save2
          break
        end
        @result = begin;  a << b ; end
        _tmp = true
        unless _tmp
          self.pos = _save2
        end
        break
      end # end sequence

      if _tmp
        while true

          _save4 = self.pos
          while true # sequence
            _tmp = apply(:_ListItem)
            b = @result
            unless _tmp
              self.pos = _save4
              break
            end
            while true
              _tmp = _BlankLine()
              break unless _tmp
            end
            _tmp = true
            unless _tmp
              self.pos = _save4
              break
            end
            @result = begin;  a << b ; end
            _tmp = true
            unless _tmp
              self.pos = _save4
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ListLoose unless _tmp
    return _tmp
  end

  # ListItem = (Bullet | Enumerator) @StartList:a ListBlock:b { a << b } (ListContinuationBlock:c { a.push(*c) })* { list_item_from a }
  def _ListItem

    _save = self.pos
    while true # sequence

      _save1 = self.pos
      while true # choice
        _tmp = apply(:_Bullet)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_Enumerator)
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_ListBlock)
      b = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a << b ; end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save3 = self.pos
        while true # sequence
          _tmp = apply(:_ListContinuationBlock)
          c = @result
          unless _tmp
            self.pos = _save3
            break
          end
          @result = begin;  a.push(*c) ; end
          _tmp = true
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  list_item_from a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ListItem unless _tmp
    return _tmp
  end

  # ListItemTight = (Bullet | Enumerator) ListBlock:a (!@BlankLine ListContinuationBlock:b { a.push(*b) })* !ListContinuationBlock { list_item_from a }
  def _ListItemTight

    _save = self.pos
    while true # sequence

      _save1 = self.pos
      while true # choice
        _tmp = apply(:_Bullet)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_Enumerator)
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_ListBlock)
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save3 = self.pos
        while true # sequence
          _save4 = self.pos
          _tmp = _BlankLine()
          _tmp = _tmp ? nil : true
          self.pos = _save4
          unless _tmp
            self.pos = _save3
            break
          end
          _tmp = apply(:_ListContinuationBlock)
          b = @result
          unless _tmp
            self.pos = _save3
            break
          end
          @result = begin;  a.push(*b) ; end
          _tmp = true
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _save5 = self.pos
      _tmp = apply(:_ListContinuationBlock)
      _tmp = _tmp ? nil : true
      self.pos = _save5
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  list_item_from a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ListItemTight unless _tmp
    return _tmp
  end

  # ListBlock = !@BlankLine Line:a ListBlockLine*:c { [a, *c] }
  def _ListBlock

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = _BlankLine()
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Line)
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _ary = []
      while true
        _tmp = apply(:_ListBlockLine)
        _ary << @result if _tmp
        break unless _tmp
      end
      _tmp = true
      @result = _ary
      c = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  [a, *c] ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ListBlock unless _tmp
    return _tmp
  end

  # ListContinuationBlock = @StartList:a @BlankLine* { a << "\n" } (Indent ListBlock:b { a.concat b })+ { a }
  def _ListContinuationBlock

    _save = self.pos
    while true # sequence
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = _BlankLine()
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a << "\n" ; end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos

      _save3 = self.pos
      while true # sequence
        _tmp = apply(:_Indent)
        unless _tmp
          self.pos = _save3
          break
        end
        _tmp = apply(:_ListBlock)
        b = @result
        unless _tmp
          self.pos = _save3
          break
        end
        @result = begin;  a.concat b ; end
        _tmp = true
        unless _tmp
          self.pos = _save3
        end
        break
      end # end sequence

      if _tmp
        while true

          _save4 = self.pos
          while true # sequence
            _tmp = apply(:_Indent)
            unless _tmp
              self.pos = _save4
              break
            end
            _tmp = apply(:_ListBlock)
            b = @result
            unless _tmp
              self.pos = _save4
              break
            end
            @result = begin;  a.concat b ; end
            _tmp = true
            unless _tmp
              self.pos = _save4
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save2
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ListContinuationBlock unless _tmp
    return _tmp
  end

  # Enumerator = @NonindentSpace [0-9]+ "." @Spacechar+
  def _Enumerator

    _save = self.pos
    while true # sequence
      _tmp = _NonindentSpace()
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _save2 = self.pos
      _tmp = get_byte
      if _tmp
        unless _tmp >= 48 and _tmp <= 57
          self.pos = _save2
          _tmp = nil
        end
      end
      if _tmp
        while true
          _save3 = self.pos
          _tmp = get_byte
          if _tmp
            unless _tmp >= 48 and _tmp <= 57
              self.pos = _save3
              _tmp = nil
            end
          end
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(".")
      unless _tmp
        self.pos = _save
        break
      end
      _save4 = self.pos
      _tmp = _Spacechar()
      if _tmp
        while true
          _tmp = _Spacechar()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save4
      end
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Enumerator unless _tmp
    return _tmp
  end

  # OrderedList = &Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) }
  def _OrderedList

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = apply(:_Enumerator)
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end

      _save2 = self.pos
      while true # choice
        _tmp = apply(:_ListTight)
        break if _tmp
        self.pos = _save2
        _tmp = apply(:_ListLoose)
        break if _tmp
        self.pos = _save2
        break
      end # end choice

      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::List.new(:NUMBER, *a) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_OrderedList unless _tmp
    return _tmp
  end

  # ListBlockLine = !@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine
  def _ListBlockLine

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = _BlankLine()
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos

      _save3 = self.pos
      while true # sequence
        _save4 = self.pos
        _tmp = apply(:_Indent)
        unless _tmp
          _tmp = true
          self.pos = _save4
        end
        unless _tmp
          self.pos = _save3
          break
        end

        _save5 = self.pos
        while true # choice
          _tmp = apply(:_Bullet)
          break if _tmp
          self.pos = _save5
          _tmp = apply(:_Enumerator)
          break if _tmp
          self.pos = _save5
          break
        end # end choice

        unless _tmp
          self.pos = _save3
        end
        break
      end # end sequence

      _tmp = _tmp ? nil : true
      self.pos = _save2
      unless _tmp
        self.pos = _save
        break
      end
      _save6 = self.pos
      _tmp = apply(:_HorizontalRule)
      _tmp = _tmp ? nil : true
      self.pos = _save6
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_OptionallyIndentedLine)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ListBlockLine unless _tmp
    return _tmp
  end

  # HtmlOpenAnchor = "<" Spnl ("a" | "A") Spnl HtmlAttribute* ">"
  def _HtmlOpenAnchor

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("a")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("A")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlOpenAnchor unless _tmp
    return _tmp
  end

  # HtmlCloseAnchor = "<" Spnl "/" ("a" | "A") Spnl ">"
  def _HtmlCloseAnchor

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("a")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("A")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlCloseAnchor unless _tmp
    return _tmp
  end

  # HtmlAnchor = HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor
  def _HtmlAnchor

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlOpenAnchor)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlAnchor)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlCloseAnchor)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlCloseAnchor)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlAnchor unless _tmp
    return _tmp
  end

  # HtmlBlockOpenAddress = "<" Spnl ("address" | "ADDRESS") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenAddress

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("address")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("ADDRESS")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenAddress unless _tmp
    return _tmp
  end

  # HtmlBlockCloseAddress = "<" Spnl "/" ("address" | "ADDRESS") Spnl ">"
  def _HtmlBlockCloseAddress

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("address")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("ADDRESS")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseAddress unless _tmp
    return _tmp
  end

  # HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress
  def _HtmlBlockAddress

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenAddress)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockAddress)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseAddress)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseAddress)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockAddress unless _tmp
    return _tmp
  end

  # HtmlBlockOpenBlockquote = "<" Spnl ("blockquote" | "BLOCKQUOTE") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenBlockquote

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("blockquote")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("BLOCKQUOTE")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenBlockquote unless _tmp
    return _tmp
  end

  # HtmlBlockCloseBlockquote = "<" Spnl "/" ("blockquote" | "BLOCKQUOTE") Spnl ">"
  def _HtmlBlockCloseBlockquote

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("blockquote")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("BLOCKQUOTE")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseBlockquote unless _tmp
    return _tmp
  end

  # HtmlBlockBlockquote = HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote
  def _HtmlBlockBlockquote

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenBlockquote)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockBlockquote)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseBlockquote)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseBlockquote)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockBlockquote unless _tmp
    return _tmp
  end

  # HtmlBlockOpenCenter = "<" Spnl ("center" | "CENTER") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenCenter

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("center")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("CENTER")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenCenter unless _tmp
    return _tmp
  end

  # HtmlBlockCloseCenter = "<" Spnl "/" ("center" | "CENTER") Spnl ">"
  def _HtmlBlockCloseCenter

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("center")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("CENTER")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseCenter unless _tmp
    return _tmp
  end

  # HtmlBlockCenter = HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter
  def _HtmlBlockCenter

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenCenter)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockCenter)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseCenter)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseCenter)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCenter unless _tmp
    return _tmp
  end

  # HtmlBlockOpenDir = "<" Spnl ("dir" | "DIR") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenDir

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dir")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DIR")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenDir unless _tmp
    return _tmp
  end

  # HtmlBlockCloseDir = "<" Spnl "/" ("dir" | "DIR") Spnl ">"
  def _HtmlBlockCloseDir

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dir")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DIR")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseDir unless _tmp
    return _tmp
  end

  # HtmlBlockDir = HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir
  def _HtmlBlockDir

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenDir)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockDir)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseDir)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseDir)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockDir unless _tmp
    return _tmp
  end

  # HtmlBlockOpenDiv = "<" Spnl ("div" | "DIV") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenDiv

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("div")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DIV")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenDiv unless _tmp
    return _tmp
  end

  # HtmlBlockCloseDiv = "<" Spnl "/" ("div" | "DIV") Spnl ">"
  def _HtmlBlockCloseDiv

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("div")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DIV")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseDiv unless _tmp
    return _tmp
  end

  # HtmlBlockDiv = HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv
  def _HtmlBlockDiv

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenDiv)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockDiv)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseDiv)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseDiv)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockDiv unless _tmp
    return _tmp
  end

  # HtmlBlockOpenDl = "<" Spnl ("dl" | "DL") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenDl

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dl")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DL")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenDl unless _tmp
    return _tmp
  end

  # HtmlBlockCloseDl = "<" Spnl "/" ("dl" | "DL") Spnl ">"
  def _HtmlBlockCloseDl

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dl")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DL")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseDl unless _tmp
    return _tmp
  end

  # HtmlBlockDl = HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl
  def _HtmlBlockDl

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenDl)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockDl)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseDl)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseDl)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockDl unless _tmp
    return _tmp
  end

  # HtmlBlockOpenFieldset = "<" Spnl ("fieldset" | "FIELDSET") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenFieldset

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("fieldset")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("FIELDSET")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenFieldset unless _tmp
    return _tmp
  end

  # HtmlBlockCloseFieldset = "<" Spnl "/" ("fieldset" | "FIELDSET") Spnl ">"
  def _HtmlBlockCloseFieldset

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("fieldset")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("FIELDSET")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseFieldset unless _tmp
    return _tmp
  end

  # HtmlBlockFieldset = HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset
  def _HtmlBlockFieldset

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenFieldset)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockFieldset)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseFieldset)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseFieldset)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockFieldset unless _tmp
    return _tmp
  end

  # HtmlBlockOpenForm = "<" Spnl ("form" | "FORM") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenForm

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("form")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("FORM")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenForm unless _tmp
    return _tmp
  end

  # HtmlBlockCloseForm = "<" Spnl "/" ("form" | "FORM") Spnl ">"
  def _HtmlBlockCloseForm

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("form")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("FORM")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseForm unless _tmp
    return _tmp
  end

  # HtmlBlockForm = HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm
  def _HtmlBlockForm

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenForm)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockForm)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseForm)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseForm)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockForm unless _tmp
    return _tmp
  end

  # HtmlBlockOpenH1 = "<" Spnl ("h1" | "H1") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenH1

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h1")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H1")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenH1 unless _tmp
    return _tmp
  end

  # HtmlBlockCloseH1 = "<" Spnl "/" ("h1" | "H1") Spnl ">"
  def _HtmlBlockCloseH1

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h1")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H1")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseH1 unless _tmp
    return _tmp
  end

  # HtmlBlockH1 = HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1
  def _HtmlBlockH1

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenH1)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockH1)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseH1)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseH1)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockH1 unless _tmp
    return _tmp
  end

  # HtmlBlockOpenH2 = "<" Spnl ("h2" | "H2") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenH2

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h2")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H2")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenH2 unless _tmp
    return _tmp
  end

  # HtmlBlockCloseH2 = "<" Spnl "/" ("h2" | "H2") Spnl ">"
  def _HtmlBlockCloseH2

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h2")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H2")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseH2 unless _tmp
    return _tmp
  end

  # HtmlBlockH2 = HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2
  def _HtmlBlockH2

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenH2)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockH2)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseH2)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseH2)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockH2 unless _tmp
    return _tmp
  end

  # HtmlBlockOpenH3 = "<" Spnl ("h3" | "H3") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenH3

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h3")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H3")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenH3 unless _tmp
    return _tmp
  end

  # HtmlBlockCloseH3 = "<" Spnl "/" ("h3" | "H3") Spnl ">"
  def _HtmlBlockCloseH3

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h3")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H3")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseH3 unless _tmp
    return _tmp
  end

  # HtmlBlockH3 = HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3
  def _HtmlBlockH3

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenH3)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockH3)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseH3)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseH3)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockH3 unless _tmp
    return _tmp
  end

  # HtmlBlockOpenH4 = "<" Spnl ("h4" | "H4") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenH4

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h4")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H4")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenH4 unless _tmp
    return _tmp
  end

  # HtmlBlockCloseH4 = "<" Spnl "/" ("h4" | "H4") Spnl ">"
  def _HtmlBlockCloseH4

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h4")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H4")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseH4 unless _tmp
    return _tmp
  end

  # HtmlBlockH4 = HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4
  def _HtmlBlockH4

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenH4)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockH4)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseH4)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseH4)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockH4 unless _tmp
    return _tmp
  end

  # HtmlBlockOpenH5 = "<" Spnl ("h5" | "H5") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenH5

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h5")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H5")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenH5 unless _tmp
    return _tmp
  end

  # HtmlBlockCloseH5 = "<" Spnl "/" ("h5" | "H5") Spnl ">"
  def _HtmlBlockCloseH5

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h5")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H5")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseH5 unless _tmp
    return _tmp
  end

  # HtmlBlockH5 = HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5
  def _HtmlBlockH5

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenH5)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockH5)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseH5)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseH5)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockH5 unless _tmp
    return _tmp
  end

  # HtmlBlockOpenH6 = "<" Spnl ("h6" | "H6") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenH6

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h6")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H6")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenH6 unless _tmp
    return _tmp
  end

  # HtmlBlockCloseH6 = "<" Spnl "/" ("h6" | "H6") Spnl ">"
  def _HtmlBlockCloseH6

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("h6")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("H6")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseH6 unless _tmp
    return _tmp
  end

  # HtmlBlockH6 = HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6
  def _HtmlBlockH6

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenH6)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockH6)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseH6)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseH6)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockH6 unless _tmp
    return _tmp
  end

  # HtmlBlockOpenMenu = "<" Spnl ("menu" | "MENU") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenMenu

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("menu")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("MENU")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenMenu unless _tmp
    return _tmp
  end

  # HtmlBlockCloseMenu = "<" Spnl "/" ("menu" | "MENU") Spnl ">"
  def _HtmlBlockCloseMenu

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("menu")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("MENU")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseMenu unless _tmp
    return _tmp
  end

  # HtmlBlockMenu = HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu
  def _HtmlBlockMenu

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenMenu)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockMenu)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseMenu)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseMenu)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockMenu unless _tmp
    return _tmp
  end

  # HtmlBlockOpenNoframes = "<" Spnl ("noframes" | "NOFRAMES") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenNoframes

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("noframes")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("NOFRAMES")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenNoframes unless _tmp
    return _tmp
  end

  # HtmlBlockCloseNoframes = "<" Spnl "/" ("noframes" | "NOFRAMES") Spnl ">"
  def _HtmlBlockCloseNoframes

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("noframes")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("NOFRAMES")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseNoframes unless _tmp
    return _tmp
  end

  # HtmlBlockNoframes = HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes
  def _HtmlBlockNoframes

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenNoframes)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockNoframes)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseNoframes)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseNoframes)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockNoframes unless _tmp
    return _tmp
  end

  # HtmlBlockOpenNoscript = "<" Spnl ("noscript" | "NOSCRIPT") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenNoscript

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("noscript")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("NOSCRIPT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenNoscript unless _tmp
    return _tmp
  end

  # HtmlBlockCloseNoscript = "<" Spnl "/" ("noscript" | "NOSCRIPT") Spnl ">"
  def _HtmlBlockCloseNoscript

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("noscript")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("NOSCRIPT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseNoscript unless _tmp
    return _tmp
  end

  # HtmlBlockNoscript = HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript
  def _HtmlBlockNoscript

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenNoscript)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockNoscript)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseNoscript)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseNoscript)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockNoscript unless _tmp
    return _tmp
  end

  # HtmlBlockOpenOl = "<" Spnl ("ol" | "OL") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenOl

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("ol")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("OL")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenOl unless _tmp
    return _tmp
  end

  # HtmlBlockCloseOl = "<" Spnl "/" ("ol" | "OL") Spnl ">"
  def _HtmlBlockCloseOl

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("ol")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("OL")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseOl unless _tmp
    return _tmp
  end

  # HtmlBlockOl = HtmlBlockOpenOl (HtmlBlockOl | !HtmlBlockCloseOl .)* HtmlBlockCloseOl
  def _HtmlBlockOl

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenOl)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockOl)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseOl)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseOl)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOl unless _tmp
    return _tmp
  end

  # HtmlBlockOpenP = "<" Spnl ("p" | "P") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenP

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("p")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("P")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenP unless _tmp
    return _tmp
  end

  # HtmlBlockCloseP = "<" Spnl "/" ("p" | "P") Spnl ">"
  def _HtmlBlockCloseP

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("p")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("P")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseP unless _tmp
    return _tmp
  end

  # HtmlBlockP = HtmlBlockOpenP (HtmlBlockP | !HtmlBlockCloseP .)* HtmlBlockCloseP
  def _HtmlBlockP

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenP)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockP)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseP)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseP)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockP unless _tmp
    return _tmp
  end

  # HtmlBlockOpenPre = "<" Spnl ("pre" | "PRE") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenPre

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("pre")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("PRE")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenPre unless _tmp
    return _tmp
  end

  # HtmlBlockClosePre = "<" Spnl "/" ("pre" | "PRE") Spnl ">"
  def _HtmlBlockClosePre

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("pre")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("PRE")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockClosePre unless _tmp
    return _tmp
  end

  # HtmlBlockPre = HtmlBlockOpenPre (HtmlBlockPre | !HtmlBlockClosePre .)* HtmlBlockClosePre
  def _HtmlBlockPre

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenPre)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockPre)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockClosePre)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockClosePre)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockPre unless _tmp
    return _tmp
  end

  # HtmlBlockOpenTable = "<" Spnl ("table" | "TABLE") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenTable

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("table")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TABLE")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenTable unless _tmp
    return _tmp
  end

  # HtmlBlockCloseTable = "<" Spnl "/" ("table" | "TABLE") Spnl ">"
  def _HtmlBlockCloseTable

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("table")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TABLE")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseTable unless _tmp
    return _tmp
  end

  # HtmlBlockTable = HtmlBlockOpenTable (HtmlBlockTable | !HtmlBlockCloseTable .)* HtmlBlockCloseTable
  def _HtmlBlockTable

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenTable)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockTable)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseTable)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseTable)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockTable unless _tmp
    return _tmp
  end

  # HtmlBlockOpenUl = "<" Spnl ("ul" | "UL") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenUl

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("ul")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("UL")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenUl unless _tmp
    return _tmp
  end

  # HtmlBlockCloseUl = "<" Spnl "/" ("ul" | "UL") Spnl ">"
  def _HtmlBlockCloseUl

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("ul")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("UL")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseUl unless _tmp
    return _tmp
  end

  # HtmlBlockUl = HtmlBlockOpenUl (HtmlBlockUl | !HtmlBlockCloseUl .)* HtmlBlockCloseUl
  def _HtmlBlockUl

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenUl)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockUl)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseUl)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseUl)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockUl unless _tmp
    return _tmp
  end

  # HtmlBlockOpenDd = "<" Spnl ("dd" | "DD") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenDd

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dd")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DD")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenDd unless _tmp
    return _tmp
  end

  # HtmlBlockCloseDd = "<" Spnl "/" ("dd" | "DD") Spnl ">"
  def _HtmlBlockCloseDd

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dd")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DD")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseDd unless _tmp
    return _tmp
  end

  # HtmlBlockDd = HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd
  def _HtmlBlockDd

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenDd)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockDd)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseDd)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseDd)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockDd unless _tmp
    return _tmp
  end

  # HtmlBlockOpenDt = "<" Spnl ("dt" | "DT") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenDt

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dt")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenDt unless _tmp
    return _tmp
  end

  # HtmlBlockCloseDt = "<" Spnl "/" ("dt" | "DT") Spnl ">"
  def _HtmlBlockCloseDt

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("dt")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("DT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseDt unless _tmp
    return _tmp
  end

  # HtmlBlockDt = HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt
  def _HtmlBlockDt

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenDt)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockDt)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseDt)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseDt)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockDt unless _tmp
    return _tmp
  end

  # HtmlBlockOpenFrameset = "<" Spnl ("frameset" | "FRAMESET") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenFrameset

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("frameset")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("FRAMESET")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenFrameset unless _tmp
    return _tmp
  end

  # HtmlBlockCloseFrameset = "<" Spnl "/" ("frameset" | "FRAMESET") Spnl ">"
  def _HtmlBlockCloseFrameset

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("frameset")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("FRAMESET")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseFrameset unless _tmp
    return _tmp
  end

  # HtmlBlockFrameset = HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset
  def _HtmlBlockFrameset

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenFrameset)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockFrameset)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseFrameset)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseFrameset)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockFrameset unless _tmp
    return _tmp
  end

  # HtmlBlockOpenLi = "<" Spnl ("li" | "LI") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenLi

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("li")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("LI")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenLi unless _tmp
    return _tmp
  end

  # HtmlBlockCloseLi = "<" Spnl "/" ("li" | "LI") Spnl ">"
  def _HtmlBlockCloseLi

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("li")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("LI")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseLi unless _tmp
    return _tmp
  end

  # HtmlBlockLi = HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi
  def _HtmlBlockLi

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenLi)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockLi)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseLi)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseLi)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockLi unless _tmp
    return _tmp
  end

  # HtmlBlockOpenTbody = "<" Spnl ("tbody" | "TBODY") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenTbody

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("tbody")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TBODY")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenTbody unless _tmp
    return _tmp
  end

  # HtmlBlockCloseTbody = "<" Spnl "/" ("tbody" | "TBODY") Spnl ">"
  def _HtmlBlockCloseTbody

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("tbody")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TBODY")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseTbody unless _tmp
    return _tmp
  end

  # HtmlBlockTbody = HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody
  def _HtmlBlockTbody

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenTbody)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockTbody)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseTbody)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseTbody)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockTbody unless _tmp
    return _tmp
  end

  # HtmlBlockOpenTd = "<" Spnl ("td" | "TD") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenTd

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("td")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TD")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenTd unless _tmp
    return _tmp
  end

  # HtmlBlockCloseTd = "<" Spnl "/" ("td" | "TD") Spnl ">"
  def _HtmlBlockCloseTd

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("td")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TD")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseTd unless _tmp
    return _tmp
  end

  # HtmlBlockTd = HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd
  def _HtmlBlockTd

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenTd)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockTd)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseTd)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseTd)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockTd unless _tmp
    return _tmp
  end

  # HtmlBlockOpenTfoot = "<" Spnl ("tfoot" | "TFOOT") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenTfoot

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("tfoot")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TFOOT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenTfoot unless _tmp
    return _tmp
  end

  # HtmlBlockCloseTfoot = "<" Spnl "/" ("tfoot" | "TFOOT") Spnl ">"
  def _HtmlBlockCloseTfoot

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("tfoot")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TFOOT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseTfoot unless _tmp
    return _tmp
  end

  # HtmlBlockTfoot = HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot
  def _HtmlBlockTfoot

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenTfoot)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockTfoot)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseTfoot)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseTfoot)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockTfoot unless _tmp
    return _tmp
  end

  # HtmlBlockOpenTh = "<" Spnl ("th" | "TH") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenTh

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("th")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TH")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenTh unless _tmp
    return _tmp
  end

  # HtmlBlockCloseTh = "<" Spnl "/" ("th" | "TH") Spnl ">"
  def _HtmlBlockCloseTh

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("th")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TH")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseTh unless _tmp
    return _tmp
  end

  # HtmlBlockTh = HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh
  def _HtmlBlockTh

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenTh)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockTh)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
   gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml000064400000000260150403134130023736 0ustar00      end
      _tmp = apply(:_HtmlBlockCloseTh)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockTh unlegems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/index.rhtml000064400000001100150403134130021417 0ustar00)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenThead unless _tmp
    return _tmp
  end

  # HtmlBlockCloseThead = "<" Spnl "/" ("thead" | "THEAD") Spnl ">"
  def _HtmlBlockCloseThead

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = appgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_footer.rhtml000064400000000536150403134130021761 0ustar00uence
      _tmp = apply(:_HtmlBlockOpenThead)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockThead)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
          gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/class.rhtml000064400000012751150403134130021433 0ustar00
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockThead unless _tmp
    return _tmp
  end

  # HtmlBlockOpenTr = "<" Spnl ("tr" | "TR") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenTr

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("tr")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TR")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenTr unless _tmp
    return _tmp
  end

  # HtmlBlockCloseTr = "<" Spnl "/" ("tr" | "TR") Spnl ">"
  def _HtmlBlockCloseTr

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("tr")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("TR")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockCloseTr unless _tmp
    return _tmp
  end

  # HtmlBlockTr = HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr
  def _HtmlBlockTr

    _save = self.pos
    while true # sequence
      _tmp = apply(:_HtmlBlockOpenTr)
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # choice
          _tmp = apply(:_HtmlBlockTr)
          break if _tmp
          self.pos = _save2

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = apply(:_HtmlBlockCloseTr)
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break if _tmp
          self.pos = _save2
          break
        end # end choice

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlBlockCloseTr)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockTr unless _tmp
    return _tmp
  end

  # HtmlBlockOpenScript = "<" Spnl ("script" | "SCRIPT") Spnl HtmlAttribute* ">"
  def _HtmlBlockOpenScript

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("script")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("SCRIPT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = apply(:_HtmlAttribute)
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockOpenScript unless _tmp
    return _tmp
  end

  # HtmlBlockCloseScript = "<" Spnl "/" ("script" | "SCRIPT") Spnl ">"
  def _HtmlBlockCloseScript

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice
        _tmp = match_string("script")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("SCRIPT")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = matchgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml000064400000000535150403134130024132 0ustar00ckCloseScript)
          _tmp = _tmp ? nil : true
          self.pos = _save3
          unless _tmp
            self.pos = _save2
            break
          end
          _tmpgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml000064400000000516150403134130024061 0ustar00tmp = match_string("head")
        break if _tmp
        self.pos = _save1
        _tmp = match_string("HEAD")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml000064400000000503150403134130023775 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_footer.rhtml000064400000000536150403134130021761 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml000064400000003011150403134130024003 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/class.rhtml000064400000012751150403134130021433 0ustar00     break
      end
      _tmp = apply(:_HtmlBlockCloseHead)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlBlockHead unless _tmp
    return _tmp
  end

  # HtmlBlockInTags = (HtmlAnchor | HtmlBlockAddress | HtmlBlockBlockquote | HtmlBlockCenter | HtmlBlockDir | HtmlBlockDiv | HtmlBlockDl | HtmlBlockFieldset | HtmlBlockForm | HtmlBlockH1 | HtmlBlockH2 | HtmlBlockH3 | HtmlBlockH4 | HtmlBlockH5 | HtmlBlockH6 | HtmlBlockMenu | HtmlBlockNoframes | HtmlBlockNoscript | HtmlBlockOl | HtmlBlockP | HtmlBlockPre | HtmlBlockTable | HtmlBlockUl | HtmlBlockDd | HtmlBlockDt | HtmlBlockFrameset | HtmlBlockLi | HtmlBlockTbody | HtmlBlockTd | HtmlBlockTfoot | HtmlBlockTh | HtmlBlockThead | HtmlBlockTr | HtmlBlockScript | HtmlBlockHead)
  def _HtmlBlockInTags

    _save = self.pos
    while true # choice
      _tmp = apply(:_HtmlAnchor)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockAddress)
      break if _tmp
      self.pos = _save
      _tgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml000064400000002143150403134130023605 0ustar00      _tmp = apply(:_HtmlBlockMenu)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockNoframes)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockNoscript)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockOl)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockP)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockPre)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockTable)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockUl)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockDd)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockDt)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockFrameset)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockLi)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockTbody)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_HtmlBlockTd)
      break if _tmp
      self.pos = _save
      _tmp = apply(gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml000064400000000640150403134130023613 0ustar00s)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_HtmlComment)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_HtmlBlockSelfClosing)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_HtmlUnclosed)
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      if _tmp
        text = get_text(_text_start)
      end
    gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml000064400000000703150403134130023756 0ustar00  return _tmp
  end

  # HtmlUnclosed = "<" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl ">"
  def _HtmlUnclosed

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_HtmlUnclosedType)
      unless _tmp
        self.pos = _save
        break
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/js/search.js000064400000006031150403134130021467 0ustar00nclosedType = ("HR" | "hr")
  def _HtmlUnclosedType

    _save = self.pos
    while true # choice
      _tmp = match_string("HR")
      break if _tmp
      self.pos = _save
      _tmp = match_string("hr")
      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_HtmlUnclosedType unless _tmp
    return _tmp
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml000064400000000516150403134130024061 0ustar00s _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
      end
  gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml000064400000000503150403134130023775 0ustar00 "table" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "ul")
  def _HtmlBlockType

    _save = self.pos
    while true # choice
      _tmp = match_string("ADDRESS")
      break if _tmp
      self.pos = _save
      _tmp = match_string("BLOCKQUOTE")
      break if _tmp
      self.pos = _save
      _tmp = match_stringgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml000064400000003011150403134130024003 0ustar00
      break if _tmp
    gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/js/darkfish.js000064400000004504150403134130022020 0ustar00.pos = _save
      _tmp = match_string("PRE")
      break if _tmp
      self.pos = _save
      _tmp = match_string("SCRIPT")
      break if _tmp
      self.pos = _save
      _tmp = match_string("TABLE")
      break if _tmp
      self.pos = _save
      _tmp = match_string("TBODY")
      break if _tmp
      self.pos = _save
      _tmp = match_string("TD")
      break if _tmp
      self.pos = _save
      _tmp = match_string("TFOOT")
      break if _tmp
      self.pos = _save
      _tmp = match_string("TH")
      break gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml000064400000002143150403134130023605 0ustar00    self.pos = _save
      _tmp = match_string("frameset")
      break if _tmp
      self.pos = _save
      _tmp = match_string("h1")
      break if _tmp
      self.pos = _save
      _tmp = match_string("h2")
      break if _tmp
      self.pos = _save
      _tmp = match_string("h3")
      break if _tmp
      self.pos = _save
      _tmp = match_string("h4")
      break if _tmp
      self.pos = _save
      _tmp = match_string("h5")
      break if _tmp
      self.pos = _save
      _tmp = match_string("h6")
      break if _tmp
      self.pos = _save
      _tmp = match_string("hr")
      break if _tmp
      self.pos = _save
      _tmp = match_string("isindex")
      break if _tmp
      self.pos = _save
      _tmp = match_string("li")
      break if _tmp
      self.pos = _save
      _tmp = match_string("menu")
      break if _tmp
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml000064400000000671150403134130023622 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml000064400000000640150403134130023613 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/servlet_root.rhtml000064400000003405150403134130023051 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml000064400000000703150403134130023756 0ustar00d sequence

    set_failed_rule :_StyleOpen unless _tmp
    return _tmp
  end

  # StyleClose = "<" Spnl "/" ("style" | "STYLE") Spnl ">"
  def _StyleClose

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("/")
      unless _tmp
      gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/js/search.js000064400000006031150403134130021467 0ustar00sequence

    set_failed_rule :_StyleClose unless _tmp
    return _tmp
  end

  # InStyleTags = StyleOpen (!StyleClose .)* StyleClose
  def _InStyleTags

    _save = self.pos
    while true # sequence
      _tmp = apply(:_StyleOpen)
      unless _tmp
        segems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/tag_green.png000064400000001145150403134130023157 0ustar00mp
  end

  # StyleBlock = < InStyleTags > @BlankLine* { if css? then                     RDoc::Markup::Raw.new text                   end }
  def _StyleBlock

    _save = self.pos
    while true # sequence
      _text_start = self.pos
      _tmp = apply(:_InStyleTags)
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = _BlankLine()
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  if css? then
            gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png000064400000000317150403134130025267 0ustar00         @result = begin;  i ; end
          _tmp = true
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        break if _tmp
        self.pos =gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bug.png000064400000001406150403134130022001 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/js/darkfish.js000064400000004504150403134130022020 0ustar00 end # end choice

      if _tmp
        _ary << @result
        while true

          _save10 = self.pos
          while true # choice

            _save11 = self.pos
            while true # sequence
              _save12 = self.pos
              _tmp = _Endligems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/brick.png000064400000000704150403134130022316 0ustar00self.pos = _save13
                break
              end
              _save14 = self.pos

              _save15 = self.pos
              while true # sequence
                _save16 = self.pos
                _tmp = begin;  github? ; end
                self.pos = _save16
                unless _tmp
                  self.pos = _save15
                  break
                end
                _tmp = apply(:_Ticks3)
                unless _tmpgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png000064400000000317150403134130023240 0ustar00mp
                self.pos = _save13
                break
              end
              @result = begin;  c ; end
              _tmp = true
              unless _tmp
                self.pos = _save13
  gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_green.png000064400000001155150403134130023321 0ustar00
  end

  # Inline = (Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol)
  def _Inline

    _save = self.pos
    while true # choice
      _tmp = apply(:_Str)
      break if _tmp
      self.pos = _save
      _tmp = _Endline()
      break if _tmp
      self.pos = _save
      _tmp = apply(:_UlOrStarLine)
      break if _tmp
      selfgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/servlet_root.rhtml0000644gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_white_text.png000064400000000526150403134130024406 0ustar00
    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = _Spacechar()
      if _tmp
        while true
          _tmp = _Spacechar()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      @gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/delete.png000064400000001313150403134130022463 0ustar00 = _save1
      end
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a = text ; end
      _tmp = true
      unless _tmp
        self.pos = _save
        breakgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/tag_green.png000064400000001145150403134130023157 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/add.png000064400000001335150403134130021755 0ustar00          self.pos = _save4
          unless _tmp
            self.pos = _save3
          end
       gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png000064400000000317150403134130025267 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/package.png000064400000001525150403134130022621 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bug.png000064400000001406150403134130022001 0ustar00nd
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_EscapedChar unless _tmp
    return _tmp
  end

  # Entity = (HexEntity | DecEntity | CharEntity):a { a }
  def _Entity

    _save = self.pos
    while true # sequence

      _save1 = self.pos
      while true gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_black.png000064400000000323150403134130023644 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/brick.png000064400000000704150403134130022316 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/tag_blue.png000064400000003530150403134130023006 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png000064400000000317150403134130023240 0ustar00e()
        unless _tmp
          self.pos = _save5
        end
        break
      end # end sequence

      _tmp = _tmp ? nil : true
      self.pos = _save4
      unless _tmp
        self.pos = _save
     gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_green.png000064400000001155150403134130023321 0ustar00e true # sequence
      _tmp = match_string("  ")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _NormalEndline()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::HardBreak.new ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
 gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/transparent.png000064400000000141150403134130023560 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_white_text.pnggems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif000064400000013376150403134130024473 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/delete.png000064400000001313150403134130022463 0ustar00      break
          end
          _save4 = self.pos
          _tmp = _Spacechar()
          self.pos = _save4
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        if _tmp
          text = get_text(_text_start)
        end
        unless _tmp
          self.pos = _save2
          break
        end
        @result = begin;  text ; end
        _tmp = true
        unless _tmp
          self.pos = _save2
        end
        break
      end # end sequence

      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_StarLine unless _tmp
    return _tmp
  end

  # UlLine = (< /_{4,}/ > { text } | < @Spacechar gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/add.png000064400000001335150403134130021755 0ustar00tmp = scan(/\G(?-mix:_+)/)
          unless _tmp
            self.pos = _save3
            break
          end
          _save4 = self.pos
          _tmp = _Spacechar()
          self.pos = _save4
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        if _tmp
          text = get_text(_text_start)
        end
        unless _tmp
          self.pos = _save2
          break
        end
        @result = begin;  text ; end
        _tmp = true
        unless _tmp
          self.pos = _save2
        end
        break
      end # end sequence

      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_UlLine unless _tmp
    retugems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/package.png000064400000001525150403134130022621 0ustar00a.join }
  def _EmphStar

    _save = self.pos
    while true # sequence
      _tmp = match_string("*")
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = _Whitespace()
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos

      _save3 = self.pos
      while true # choice

        _save4 = self.pos
        while true # sequence
          _save5 = self.pos
          _tmp = match_string("*")
          _tmp = _tmp ? nil : true
          self.pos = _save5
          unless _tmp
            self.pos = _save4
            break
          end
          _tmp = apply(:_Inline)
          b = @result
 gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_black.png000064400000000323150403134130023644 0ustar00  break if _tmp
        self.pos = _save3
        break
      end # end choice

      if _tmp
        while true

          _save7 = self.pos
          while true # choice

            _save8 = self.pos
        gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/tag_blue.png000064400000003530150403134130023006 0gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/find.png000064400000001223150403134130022141 0ustar00    end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("*")
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  emphasis a.join ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_EmphStar unless _tmp
    return _tmp
  end

  # EmphUl = "_" !@Whitespace @StartList:a (!"_" Inline:b { a << b } | StrongUl:b { a << b })+ "_" { emphasis a.join }
  def _EmphUl

    _save = self.pos
    while true # sequence
      _tmp = match_string("_")
      unless _tmp
        self.pos = _save
        breagems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/plugin.png000064400000001117150403134130022521 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/transparent.png000064400000000141150403134130023560 0ustar00p
        self.pos = _save3
        break
      end # end choice

      if _tmpgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png000064400000000321150403134130025112 0ustar00      unless _tmp
                self.pos = _save10
                break
              end
              @result = begin;  a << b ; end
              _tmp = true
              unless _tmp
                selgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/wrench_orange.png000064400000001110150403134130024035 0ustar00eak if _tmp
      self.pos = _save
      _tmp = apply(:_StrongUl)
      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_Strong unless _tmp
    return _tmp
  end

  # StrongStar = "**" !@Whitespace @StartList:a (!"**" Inline:b { a << b })+ "**" { strong a.join }
  def _StrongStar

    _save = self.pos
    while true # sequence
      _tmp = match_string("**")
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = _Whitespace()
      _tmp = _tmp ? nil : true
      self.pos = _save1
      gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/zoom.png000064400000001264150403134130022212 0ustar00_save6
            unless _tmp
              self.pos = _save5
              break
            end
            _tmp = apply(:_Inline)
            b = @result
            unless _tmp
              self.pos = _save5
              break
            end
            @result = begin;  a << b ; end
            _tmp = true
            unless _tmp
              self.pos = _save5
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save2
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("**")
      unless _tmp
        self.pos = _save
      gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_white_width.png000064400000000465150403134130024543 0ustar00rue # sequence
        _save4 = self.pos
        _tmp = match_string("__")
        _tmp = _tmp ? nil : true
        self.pos = _save4
        unless _tmp
          self.pos = _save3
          break
        end
        _tmp = apply(:_Inline)
        b = @result
        unless _tmp
          self.pos = _save3
gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/arrow_up.png000064400000000564150403134130023066 0ustar00tmp = true
            unless _tmp
              self.pos = _save5
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save2
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("__")
      unless _tmp
        self.pos gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/brick_link.png000064400000001374150403134130023337 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/find.png000064400000001223150403134130022141 0ustar00_tmp
          self.pos = _save4
          break
        end
        _tmp = apply(:_Inline)
        b = @result
        unless _tmp
          self.pos = _save4
          break
        end
        @result = begin;  a << b ; end
        _tmp = true
     gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/wrench.png000064400000001142150403134130022507 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/plugin.png000064400000001117150403134130022521 0ustar00ink):a { "rdoc-image:#{a[/\[(.*)\]/, 1]}" }
  def _Image

    _save = self.pos
    while true # segems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/date.png000064400000001162150403134130022140 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png000064400000000321150403134130025112 0ustar00end # end choice

    set_failed_rule :_ReferenceLink unless _tmp
    return _tmp
  end

  # ReferenceLinkDouble =gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/ruby.png000064400000001120150403134130022176 0ustar00ce

    set_failed_rule :_ReferenceLinkDouble unless _tmp
    return _tmp
  end

  # ReferenceLinkSingle = Label:content < (Spnl "[]")? > { link_to content, content, text }
  def _ReferenceLinkSingle

    _save = self.pos
    while true # sequence
      _tmp = apply(:_Label)
      content = @result
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = self.pos
      _save1 = self.pos

      _save2 = self.pos
      while true # sequence
        _tmp = apply(:_Spnl)
        unless _tmp
          self.pos = _save2
          break
        end
      gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml000064400000000572150403134130023445 0ustar00()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Source)
      s = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Title)
      unless _tmp
        self.pos = _save
        break
      end
     gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml000064400000000671150403134130024313 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/page_white_width.png000064400000000465150403134130024543 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml000064400000000705150403134130023624 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/arrow_up.png000064400000000564150403134130023066 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/css/rdoc.css000064400000024633150403134130021511 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/brick_link.png000064400000001374150403134130023337 0ustar00      unless _tmp
                self.pos = _save7
                break
              end
              _save10 = self.pos
              _tmp = match_string(">")
              _tmp = _tmp ? nil : true
              self.pos = _save10
              unless _tmp
                self.pos = _save7
                break
              end
              _tmp = apply(:_Nonspacechar)
              unless _tmp
                self.pos = _save7
              end
              break
            end # end sequence

            break unless _tmp
          end
          _tmp = true
        else
          self.pos = _save2
        end
        break if _tmp
        self.pos = _save1

        _save11 = self.pos
        while true # sequence
          _tmp = match_string(gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/wrench.png000064400000001142150403134130022507 0ustar00     break if _tmp
        self.pos = _save1
        _tmp = apply(:_TitleDouble)
        break if _tmp
        self.pos = _save1
        _tmp = match_string("")
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Title unless _tmp
    return _tmp
  end

  # TitleSingle = "'" (!("'" @Sp (")" | @Newline)) .)* "'"
  def _TitleSinglgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/date.png000064400000001162150403134130022140 0ustar00   end
            break
          end # end sequence

          _tmp = _tmp ? nil : true
          self.pos = _save3
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = get_byte
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("'")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TitleSingle unless _tmp
 gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/images/ruby.png000064400000001120150403134130022176 0ustar00ve5
              break
            end # end choice

            unless _tmp
              self.pos = _save4
            end
            break
          end # end sequence

          _tmp = _tmp ? nil : true
          self.pos = _save3
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = get_byte
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = mgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml000064400000000572150403134130023445 0ustar00 = _save1
          break
        end
        _tmp = match_string("://")
        unless _tmp
          self.pos = _save1
          break
        end
        _save2 = self.pos

        _save3 = self.pos
        while true # sequence
          _save4 = self.pos
          _tmp = _Newline()
          _tmp = _tmp ? nil : true
          self.pos = _save4
          unless _tmp
     gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml000064400000000671150403134130024313 0ustar00        unless _tmp
                self.pos = _save6
                break
              end
              _save8 = self.pos
              _tmp = match_string(">")
              _tmp = _tmp ? nil : true
              self.pos = _save8
              unless _tmp
                self.pos = _save6
                break
              end
              _tmp = get_byte
              unless _tmp
                self.pos = _save6
              egems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml000064400000000705150403134130023624 0ustar00.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_AutoLinkUrl unless _tmp
    return _tmp
  end

  # AutoLinkEmail = "<" "mailto:"? < /[\w+.\/!%~$-]+/i "@" (!@Newline !">" .)+ > ">" { "mailto:#{text}" }
  def _AutoLinkEmail

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = match_string("mgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/css/rdoc.css000064400000024633150403134130021511 0ustar00.pos
          _tmp = _Newline()
          _tmp = _tmp ? nil : true
          self.pos = _save5
          unless _tmp
            self.pos = _save4
            break
          end
          _save6 = self.pos
          _tmp = match_string(">")
          _tmp = _tmp ? nil : true
          self.pos = _save6
          unless _tmp
            self.pos = _save4
            break
          end
          _tmp = get_byte
          unless _tmp
            self.pos = _save4
          end
          break
        end # end sequence

        if _tmp
          while true

            _save7 = self.pos
            while true # sequence
              _save8 = self.pos
              _tmp = _Newline()
              _tmp = _tmp ? nil : true
              self.pos = _save8
              unless _tmp
                self.pos = _save7
                break
              end
              _save9 = self.pos
              _tmp = match_sgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/css/fonts.css000064400000014364150403134130021713 0ustar00     end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(">")
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  "mailto:#{text}" ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_AutoLinkEmail unless _tmp
    return _tmp
  end

  # Reference = @NonindentSpace !"[]" Label:label ":" Spnl RefSrc:link RefTitle @BlankLine+ { # TODO use title               reference label, link               nil             }
  def _Reference

    _save = self.pos
    while true # sequence
      _tmp = _NonindentSpace()
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = match_string("[]")
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Label)
      label = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(":")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_RefSrc)
      link = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_RefTitle)
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _tmp = _BlankLine()
      if _tmp
        while true
          _tmp = _BlankLine()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save2
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  # TODO use title
              reference label, link
              nil
            ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Reference unless _tmp
    return _tmp
  end

  # Label = "[" (!"^" &{ notes? } | &. &{ !notes? }) @StartList:a (!"]" Inline:l { a << l })* "]" { a.join.gsub(/\s+/, ' ') }
  def _Label

    _save = self.pos
    while true # sequence
      _tmp = match_string("[")
      unless _tmp
        self.pos = _save
        break
      end

      _save1 = self.pos
      while true # choice

        _save2 = self.pos
        while true # sequence
          _save3 = self.pos
          _tmp = match_string("^")
          _tmp = _tmp ? nil : true
          self.pos = _save3
          unless _tmp
            self.pos = _save2
            break
          end
          _save4 = self.pos
          _tmp = begin;  notes? ; end
          self.pos = _save4
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1

        _save5 = self.pos
        while true # sequence
          _save6 = self.pos
          _tmp = get_byte
          self.pos = _save6
          unless _tmp
            self.pos = _save5
            break
          end
          _save7 = self.pos
          _tmp = begin;  !notes? ; end
          self.pos = _save7
          unless _tmp
            self.pos = _save5
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save9 = self.pos
        while true # sequence
          _save10 = self.pos
          _tmp = match_string("]")
          _tmp = _tmp ? nil : true
          self.pos = _save10
          unless _tmp
            self.pos = _save9
            break
          end
          _tmp = apply(:_Inline)
          l = @result
          unless _tmp
            self.pos = _save9
            break
          end
          @result = begin;  a << l ; end
          _tmp = true
          unless _tmp
            self.pos = _save9
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("]")
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a.join.gsub(/\s+/, ' ') ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Label unless _tmp
    return _tmp
  end

  # RefSrc = < Nonspacechar+ > { text }
  def _RefSrc

    _save = self.pos
    while true # sequence
      _text_start = self.pos
      _save1 = self.pos
      _tmp = apply(:_Nonspacechar)
      if _tmp
        while true
          _tmp = apply(:_Nonspacechar)
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  text ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_RefSrc unless _tmp
    return _tmp
  end

  # RefTitle = (RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle)
  def _RefTitle

    _save = self.pos
    while true # choice
      _tmp = apply(:_RefTitleSingle)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_RefTitleDouble)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_RefTitleParens)
      break if _tmp
      self.pos = _save
      _tmp = apply(:_EmptyTitle)
      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_RefTitle unless _tmp
    return _tmp
  end

  # EmptyTitle = ""
  def _EmptyTitle
    _tmp = match_string("")
    set_failed_rule :_EmptyTitle unless _tmp
    return _tmp
  end

  # RefTitleSingle = Spnl "'" < (!("'" @Sp @Newline | @Newline) .)* > "'" { text }
  def _RefTitleSingle

    _save = self.pos
    while true # sequence
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("'")
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = self.pos
      while trugems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/page.rhtml000064400000000657150403134130021244 0ustar00
            break
          end # end choice

          _tmp = _tmp ? nil : true
          self.pos = _save3
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = get_byte
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      if _tmp
        text = get_text(_text_stagems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml000064400000002005150403134130023244 0ustar00
        self.pos = _save
        break
      end
      _tmp = match_string("\"")
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = self.pos
      while true

        _save2 = self.pos
        while true # sequence
          _save3 = self.pos

          _save4 = self.pos
          while true # choice

            _save5 = self.pos
            while true # sequence
              _tmp = match_string("\"")
              unless _tmp
                self.pos = _save5
                break
              end
              _tmp = _Sp()
              unless _tmp
                self.pos = _save5
                break
              end
              _tmp = _Newline()
              unless _tmp
                self.pos = _save5
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save4
            _tmp = _Newline()
    gems/gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_head.rhtml000064400000001561150403134130021363 0ustar00    _tmp = match_string("(")
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = self.pos
      while true

        _save2 = self.pos
        while true # sequence
          _save3 = self.pos

          _save4 = self.pos
          while true # choice

            _save5 = self.pos
            while true # sequence
              _tmp = match_string(")")
              unless _tmp
                self.pos = _save5
                break
              end
              _tmp = _Sp()
              unless _tmp
                self.pos = _save5
                break
              end
              _tmp = _Newline()
              unless _tmp
                self.pos = _save5
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save4
            _tmp = _Newline()
            breagems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml000064400000001221150403134130023411 0ustar00@result = begin;  text ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_RefTitleParens unless _tmp
    return _tmp
  end

  # References = (Reference | SkipBlock)*
  def _References
    while true

      _save1 = self.pos
      while true # choice
        _tmp = apply(:_Reference)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_SkipBlock)
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      break unless _tmp
    end
    _tmp = true
    set_failed_rule :_References unless _tmp
    return _tmp
  end

  # Tgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/markup.rb000064400000006412150403134130015471 0ustar00
  end

  # Ticks3 = "```" !"`"
  def _Ticks3

    _save = self.pos
    while true # sequence
      _tmp = match_string("```")
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = match_string("`")
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Ticks3 unless _tmp
    return _tmp
  end

  # Ticks4 = "````" !"`"
  def _Ticks4

    _save = self.pos
    while true # sequence
      _tmp = match_string("````")
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = match_string("`")
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Ticks4 unless _tmp
    return _tmp
  end

  # Ticks5 = "`````" !"`"
  def _Ticks5

    _save = self.pos
    while true # sequence
      _tmp = match_string("`````")
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = match_string("`")
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Ticks5 unless _tmp
    return _tmp
  end

  # Code = (Ticks1 @Sp < ((!"`" Nonspacechar)+ | !Ticks1 /`+/ | !(@Sp Ticks1) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks1 | Ticks2 @Sp < ((!"`" Nonspacechar)+ | !Ticks2 /`+/ | !(@Sp Ticks2) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks2 | Ticks3 @Sp < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | !(@Sp Ticks3) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks3 | Ticks4 @Sp < ((!"`" Nonspacechar)+ | !Ticks4 /`+/ | !(@Sp Ticks4) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks4 | Ticks5 @Sp < ((!"`" Nonspacechar)+ | !Ticks5 /`+/ | !(@Sp Ticks5) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks5) { "<code>#{text}</code>" }
  def _Code

    _save = self.pos
    while true # sequence

      _save1 = self.pos
      while true # choice

        _save2 = self.pos
        while true # sequence
          _tmp = apply(:_Ticks1)
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save2
            break
          end
          _text_start = self.pos
          _save3 = self.pos

          _save4 = self.pos
          while true # choice
            _save5 = self.pos

            _save6 = self.pos
            while true # sequence
              _save7 = self.pos
              _tmp = match_string("`")
              _tmp = _tmp ? nil : true
              self.pos = _save7
              unless _tmp
                self.pos = _save6
 gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/page.rhtml000064400000000657150403134130021244 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/json_index.rb000064400000017205150403134140016335 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml000064400000002005150403134130023244 0ustar00               break
                end
                _tmp = apply(:_Ticks1)
                unless _tmp
                  self.pos = _save14
                end
                break
              end # end sequence

              _tmp = _tmp ? nil : true
              self.pos = _save13
              unless _tmp
                self.pos = _save12
                break
              end

              _save15 = self.pos
              while true # choice
                _tmp = _Spacechar()
                break if _tmp
                self.pos = _save15

                _save16 = self.pos
                while true # sequence
                  _tmp = _Newline()
                  unless _tmp
                    self.pos = _save16
                    break
                  end
                  _save17 = self.pos
                  _tmp = _BlankLine()
                  _tmp = _tmp ? nil : true
                  self.pos = _save17
                  unless _tmp
                    self.pos = _save16
               gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_head.rhtml000064400000001561150403134130021363 0ustar00 = _save20
                  end
                  break
                end # end sequence

                if _tmp
                  while true

                    _save22 = self.pos
                    while true # sequence
                      _save23 = self.pos
                      _tmp = match_string("`")
                      _tmp = _tmp ? nil : true
                      self.pos = _save23
                      unless _tmp
                        self.pos = _save22
                        break
                      end
                      _tmp = apply(:_Nonspacechar)
                      unless _tmp
                        self.pos = _save22
                      end
                      break
                    end # end sequence

                    break unless _tmp
                  end
                  _tmp = true
                else
           gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml000064400000001221150403134130023411 0ustar00

                break if _tmp
                self.pos = _save18

                _save26 = self.pos
                while true # sequence
                  _save27 = self.pos

                  _save28 = self.pos
                  while true # sequence
                    _tmp = _Sp()
                    unless _tmp
                      self.pos = _save28
                      break
                    end
                    _tmp = apply(:_Ticks1)
                    unless _tmp
                      self.pos = _save28
                    end
                    break
                  end # end sequence

                  _tmp = _tmp ? nil : tgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/markup.rb000064400000006412150403134130015471 0ustar00                   break
                    end # end sequence

                    break if _tmp
                    self.pos = _save29
                    break
                  end # end choice

                  unless _tmp
                    self.pos = _save26
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save18
                break
              end # end choice

              break unless _tmp
            end
            _tmp = true
          else
            self.pos = _save3
          end
          if _tmp
            text = get_text(_text_start)
          end
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = apply(:_Ticks1)
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1

        _save32 = self.pos
        while true # sequence
          _tmp = apply(:_Ticks2)
          unless _tmp
            self.pos = _save32
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save32
            break
          end
          _text_start = self.pos
          _save33 = self.pos

          _save34 = self.pos
          while true # choice
            _save35 = self.pos

            _save36 = self.pos
            while true # sequence
              _save37 = self.pos
              _tmp = match_string("`")
              _tmp = _tmp ? nil : true
              self.pos = _save37
              unless _tmp
                self.pos = _save36
                break
              end
              _tmp = apply(:_Nonspacechar)
              unless _tmp
                self.pos = _save36
              end
              break
            end # end sequence

            if _tmp
              while true

                _save38 = self.pos
                while true # sequence
                  _save39 = self.pos
                  _tmp = match_string("`")
    gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/darkfish.rb000064400000050412150403134140015765 0ustar00      end
              _tmp = scan(/\G(?-mix:`+)/)
              unless _tmp
                self.pos = _save40
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save34

            _save42 = selgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/json_index.rb000064400000017205150403134140016335 0ustar00k if _tmp
                self.pos = _save45

                _save46 = self.pos
                while true # sequence
                  _tmp = _Newline()
                  unless _tmp
                    self.pos = _save46
                    break
                  end
                  _save47 = self.pos
                  _tmp = _BlankLine()
                  _tmp = _tmp ? nil : true
                  self.pos = _save47
                  unless _tmp
                    self.pos = _save46
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save45
                break
              end # end choice

              unless _tmp
                self.pos = _save42
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save34
            break
          end # end choice

          if _tmp
            while true

              _save48 = self.pos
              while true # choice
                _save49 = self.pos

                _save50 = self.pos
                while true # sequence
                  _save51 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save51
                  unless _tmp
                    self.pos = _save50
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save50
                  end
                  break
                end # end sequence

                if _tmp
                  while true

                    _save52 = self.pos
                    while true # sequence
                      _save53 = self.pos
                      _tmp = match_string("`")
                      _tmp = _tmp ? nil : true
                      self.pos = _save53
                      unless _tmp
                        self.pos = _save52
                        break
                      end
                      _tmp = apply(:_Nonspacechar)
                      unless _tmp
                        self.pos = _save52
                      end
                      break
                    end # end sequence

                    break unless _tmp
                  end
                  _tmp = true
                else
                  self.pos = _save49
                end
                break if _tmp
                self.pos = _save48

                _save54 = self.pos
                while true # sequence
                  _save55 = self.pos
                  _tmp = apply(:_Ticks2)
                  _tmp = _tmp ? nil : true
                  self.pos = _save55
                  unless _tmp
                    self.pos = _save54
                    break
                  end
                  _tmp = scan(/\G(?-mix:`+)/)
                  unless _tmp
                    self.pos = _save54
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save48

                _save56 = self.pos
                while true # sequence
                  _save57 = self.pos

                  _save58 = self.pos
                  while true # sequence
                    _tmp = _Sp()
                    unless _tmp
                      self.pos = _save58
                      break
                    end
                    _tmp = apply(:_Ticks2)
                    unless _tmp
                      self.pos = _save58
                    end
                    break
                  end # end sequence

                  _tmp = _tmp ? nil : true
                  self.pos = _save57
                  unless _tmp
                    self.pos = _save56
                    break
                  end

                  _save59 = self.pos
                  while true # choice
                    _tmp = _Spacechar()
                    break if _tmp
                    self.pos = _save59

                    _save60 = self.pos
                    while true # sequence
                      _tmp = _Newline()
                      unless _tmp
                        self.pos = _save60
                        break
                      end
                      _save61 = self.pos
                      _tmp = _BlankLine()
                      _tmp = _tmp ? nil : true
                      self.pos = _save61
                      unless _tmp
                        self.pos = _save60
                      end
                      break
                    end # end sequence

                    break if _tmp
                    self.pos = _save59
                    break
                  end # end choice

                  unless _tmp
                    self.pos = _save56
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save48
                break
              end # end choice

              break unless _tmp
            end
            _tmp = true
          else
            self.pos = _save33
          end
          if _tmp
            text = get_text(_text_start)
          end
          unless _tmp
            self.pos = _save32
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save32
            break
          end
          _tmp = apply(:_Ticks2)
          unless _tmp
            self.pos = _save32
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1

        _save62 = self.pos
        while true # sequence
          _tmp = apply(:_Ticks3)
          unless _tmp
            self.pos = _save62
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save62
            break
          end
          _text_start = self.pos
          _save63 = self.pos

          _save64 = self.pos
          while true # choice
            _save65 = self.pos

            _save66 = self.pos
            while true # sequence
              _save67 = self.pos
              _tmp = match_string("`")
              _tmp = _tmp ? nil : true
              self.pos = _save67
              unless _tmp
                self.pos = _save66
                break
              end
              _tmp = apply(:_Nonspacechar)
              unless _tmp
                self.pos = _save66
              end
              break
            end # end sequence

            if _tmp
              while true

                _save68 = self.pos
                while true # sequence
                  _save69 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save69
                  unless _tmp
                    self.pos = _save68
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save68
                  end
                  break
                end # end sequence

                break unless _tmp
              end
              _tmp = true
            else
              self.pos = _save65
            end
            break if _tmp
            self.pos = _save64

            _save70 = self.pos
            while true # sequence
              _save71 = self.pos
              _tmp = apply(:_Ticks3)
              _tmp = _tmp ? nil : true
              self.pos = _save71
              unless _tmp
                self.pos = _save70
                break
              end
              _tmp = scan(/\G(?-mix:`+)/)
              unless _tmp
                self.pos = _save70
              end
   gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/darkfish.rb000064400000050412150403134140015765 0ustar00 if _tmp
                self.pos = _save75

                _save76 = self.pos
                while true # sequence
                  _tmp = _Newline()
                  unless _tmp
                    self.pos = _save76
                    break
                  end
                  _save77 = self.pos
                  _tmp = _BlankLine()
                  _tmp = _tmp ? nil : true
                  self.pos = _save77
                  unless _tmp
                    self.pos = _save76
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save75
                break
              end # end choice

              unless _tmp
                self.pos = _save72
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save64
            break
          end # end choice

          if _tmp
            while true

              _save78 = self.pos
              while true # choice
                _save79 = self.pos

                _save80 = self.pos
                while true # sequence
                  _save81 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save81
                  unless _tmp
                    self.pos = _save80
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save80
                  end
                  break
                end # end sequence

                if _tmp
                  while true

                    _save82 = self.pos
                    while true # sequence
                      _save83 = self.pos
                      _tmp = match_string("`")
                      _tmp = _tmp ? nil : true
                      self.pos = _save83
                      unless _tmp
                        self.pos = _save82
                        break
                      end
                      _tmp = apply(:_Nonspacechar)
                      unless _tmp
                        self.pos = _save82
                      end
                      break
                    end # end sequence

                    break unless _tmp
                  end
                  _tmp = true
                else
                  self.pos = _save79
                end
                break if _tmp
                self.pos = _save78

                _save84 = self.pos
                while true # sequence
                  _save85 = self.pos
                  _tmp = apply(:_Ticks3)
                  _tmp = _tmp ? nil : true
                  self.pos = _save85
                  unless _tmp
                    self.pos = _save84
                    break
                  end
                  _tmp = scan(/\G(?-mix:`+)/)
                  unless _tmp
                    self.pos = _save84
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save78

                _save86 = self.pos
                while true # sequence
                  _save87 = self.pos

                  _save88 = self.pos
                  while true # sequence
                    _tmp = _Sp()
                    unless _tmp
                      self.pos = _save88
                      break
                    end
                    _tmp = apply(:_Ticks3)
                    unless _tmp
                      self.pos = _save88
                    end
                    break
                  end # end sequence

                  _tmp = _tmp ? nil : true
                  self.pos = _save87
                  unless _tmp
                    self.pos = _save86
                    break
                  end

                  _save89 = self.pos
                  while true # choice
                    _tmp = _Spacechar()
                    break if _tmp
                    self.pos = _save89

                    _save90 = self.pos
                    while true # sequence
                      _tmp = _Newline()
                      unless _tmp
                        self.pos = _save90
                        break
                      end
                      _save91 = self.pos
                      _tmp = _BlankLine()
                      _tmp = _tmp ? nil : true
                      self.pos = _save91
                      unless _tmp
                        self.pos = _save90
                      end
                      break
                    end # end sequence

                    break if _tmp
                    self.pos = _save89
                    break
                  end # end choice

                  unless _tmp
                    self.pos = _save86
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save78
                break
              end # end choice

              break unless _tmp
            end
            _tmp = true
          else
            self.pos = _save63
          end
          if _tmp
            text = get_text(_text_start)
          end
          unless _tmp
            self.pos = _save62
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save62
            break
          end
          _tmp = apply(:_Ticks3)
          unless _tmp
            self.pos = _save62
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1

        _save92 = self.pos
        while true # sequence
          _tmp = apply(:_Ticks4)
          unless _tmp
            self.pos = _save92
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save92
            break
          end
          _text_start = self.pos
          _save93 = self.pos

          _save94 = self.pos
          while true # choice
            _save95 = self.pos

            _save96 = self.pos
            while true # sequence
              _save97 = self.pos
              _tmp = match_string("`")
              _tmp = _tmp ? nil : true
              self.pos = _save97
              unless _tmp
                self.pos = _save96
                break
              end
              _tmp = apply(:_Nonspacechar)
              unless _tmp
                self.pos = _save96
              end
              break
            end # end sequence

            if _tmp
              while true

                _save98 = self.pos
                while true # sequence
                  _save99 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save99
                  unless _tmp
                    self.pos = _save98
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save98
                  end
                  break
                end # end sequence

                break unless _tmp
              end
              _tmp = true
            else
              self.pos = _save95
            end
            break if _tmp
            self.pos = _save94

            _save100 = self.pos
            while true # sequence
              _save101 = self.pos
              _tmp = apply(:_Ticks4)
              _tmp = _tmp ? nil : true
              self.pos = _save101
              unless _tmp
                self.pos = _save100
                break
              end
              _tmp = scan(/\G(?-mix:`+)/)
              unless _tmp
                self.pos = _save100
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save94

            _save102 = self.pos
            while true # sequence
              _save103 = self.pos

              _save104 = self.pos
              while true # sequence
                _tmp = _Sp()
                unless _tmp
                  self.pos = _save104
                  break
                end
                _tmp = apply(:_Ticks4)
                unless _tmp
                  self.pos = _save104
                end
                break
              end # end sequence

              _tmp = _tmp ? nil : true
              self.pos = _save103
              unless _tmp
                self.pos = _save102
                break
              end

              _save105 = self.pos
              while true # choice
                _tmp = _Spacechar()
                break if _tmp
                self.pos = _save105

                _save106 = self.pos
                while true # sequence
                  _tmp = _Newline()
                  unless _tmp
                    self.pos = _save106
                    break
                  end
                  _save107 = self.pos
                  _tmp = _BlankLine()
                  _tmp = _tmp ? nil : true
                  self.pos = _save107
                  unless _tmp
                    self.pos = _save106
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save105
                break
              end # end choice

              unless _tmp
                self.pos = _save102
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save94
            break
          end # end choice

          if _tmp
            while true

              _save108 = self.pos
              while true # choice
                _save109 = self.pos

                _save110 = self.pos
                while true # sequence
                  _save111 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save111
                  unless _tmp
                    self.pos = _save110
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save110
                  end
                  break
                end # end sequence

                if _tmp
                  while true

                    _save112 = self.pos
                    while true # sequence
                      _save113 = self.pos
                      _tmp = match_string("`")
                      _tmp = _tmp ? nil : true
                      self.pos = _save113
                      unless _tmp
                        self.pos = _save112
                        break
                      end
                      _tmp = apply(:_Nonspacechar)
                      unless _tmp
                        self.pos = _save112
                      end
                      break
                    end # end seqgems/gems/rdoc-6.5.1.1/lib/rdoc/generator/ri.rb000064400000000720150403134140014601 0ustar00               end # end sequence

                break if _tmp
                self.pos = _save108

                _save116 = self.pos
                while true # sequence
                  _save117 = self.pos

                  _save118 = self.pos
                  while true # sequence
                    _tmp = _Sp()
                    unless _tmp
                      self.pos = _save118
                      break
                    end
            gems/gems/rdoc-6.5.1.1/lib/rdoc/method_attr.rb000064400000022050150403134140014513 0ustar00   self.pos = _save119

                    _save120 = self.pos
                    while true # sequence
                      _tmp = _Newline()
                      unless _tmp
                        self.pos = _save120
                        break
                      end
                      _save121 = self.pos
                      _tmp = _BlankLine()
                      _tmp = _tmp ? nil : true
                      self.pos = _save121
                      unless _tmp
                        self.pos = _save120
                      end
                      break
                    end # end sequence

                    break if _tmp
                    self.pos = _save119
                    break
                  end # end choice

                  unless _tmp
                    self.pos = _save116
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save108
                break
              end # end choice

              break unless _tmp
            end
            _tmp = true
          else
            self.pos = _save93
          end
          if _tmp
            text = get_text(_text_start)
          end
          unless _tmp
            self.pos = _save92
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save92
            break
          end
          _tmp = apply(:_Ticks4)
          unless _tmp
            self.pos = _save92
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1

        _save122 = self.pos
        while true # sequence
          _tmp = apply(:_Ticks5)
          unless _tmp
            self.pos = _save122
            break
          end
          _tmp = _Sp()
          unless _tmp
            self.pos = _save122
            break
          end
          _text_start = self.pos
          _save123 = self.pos

          _save124 = self.pos
          while true # choice
            _save125 = self.pos

            _save126 = self.pos
            while true # sequence
              _save127 = self.pos
              _tmp = match_string("`")
              _tmp = _tmp ? nil : true
              self.pos = _save127
              unless _tmp
                self.pos = _save126
                break
              end
              _tmp = apply(:_Nonspacechar)
              unless _tmp
                self.pos = _save126
              end
              break
            end # end sequence

            if _tmp
              while true

                _save128 = self.pos
                while true # sequence
                  _save129 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save129
                  unless _tmp
                    self.pos = _save128
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save128
                  end
                  break
                end # end sequence

                break unless _tmp
              end
              _tmp = true
            else
              self.pos = _save125
            end
            break if _tmp
            self.pos = _save124

            _save130 = self.pos
            while true # sequence
              _save131 = self.pos
              _tmp = apply(:_Ticks5)
              _tmp = _tmp ? nil : true
              self.pos = _save131
              unless _tmp
                self.pos = _save130
                break
              end
              _tmp = scan(/\G(?-mix:`+)/)
              unless _tmp
                self.pos = _save130
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save124

            _save132 = self.pos
            while true # sequence
              _save133 = self.pos

              _save134 = self.pos
              while true # sequence
                _tmp = _Sp()
                unless _tmp
                  self.pos = _save134
                  break
                end
                _tmp = apply(:_Ticks5)
                unless _tmp
                  self.pos = _save134
                end
                break
              end # end sequence

              _tmp = _tmp ? nil : true
              self.pos = _save133
              unless _tmp
                self.pos = _save132
                break
              end

              _save135 = self.pos
              while true # choice
                _tmp = _Spacechar()
                break if _tmp
                self.pos = _save135

                _save136 = self.pos
                while true # sequence
                  _tmp = _Newline()
                  unless _tmp
                    self.pos = _save136
                    break
                  end
                  _save137 = self.pos
                  _tmp = _BlankLine()
                  _tmp = _tmp ? nil : true
                  self.pos = _save137
                  unless _tmp
                    self.pos = _save136
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save135
                break
              end # end choice

              unless _tmp
                self.pos = _save132
              end
              break
            end # end sequence

            break if _tmp
            self.pos = _save124
            break
          end # end choice

          if _tmp
            while true

              _save138 = self.pos
              while true # choice
                _save139 = self.pos

                _save140 = self.pos
                while true # sequence
                  _save141 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save141
                  unless _tmp
                    self.pos = _save140
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save140
                  end
                  break
                end # end sequence

                if _tmp
                  while true

                    _save142 = self.pos
                    while true # sequence
                      _save143 = self.pos
                      _tmp = match_string("`")
                      _tmp = _tmp ? nil : true
                      self.pos = _save143
                      unless _tmp
                        self.pos = _save142
                        break
                      end
                      _tmp = apply(:_Nonspacechar)
                      unless _tmp
                        self.pos = _save142
                      end
                      break
                    end # end sequence

                    break unless _tmp
                  end
                  _tmp = true
                else
                  self.pos = _save139
                end
                break if _tmp
                self.pos = _save138

                _save144 = self.pos
                while true # sequence
                  _save145 = self.pos
                  _tmp = apply(:_Ticks5)
                  _tmp = _tmp ? nil : true
                  self.pos = _save145
                  unless _tmp
                    self.pos = _save144
                    break
                  end
                  _tmp = scan(/\G(?-mix:`+)/)
                  unless _tmp
                    self.pos = _save144
                  end
                  break
                end # end sequence

                break if _tmp
                self.pos = _save138

                _save146 = self.pos
                while true # sequence
             gems/gems/rdoc-6.5.1.1/lib/rdoc/generator/ri.rb000064400000000720150403134140014601 0ustar00      _tmp = _Spacechar()
                    break if _tmp
                    self.pos = _save149

                    _save150 = self.pos
                    while true # sequence
                      _tmp = _Newline()
                      unless _tmp
                        self.pos = _save150
                        break
                      end
                      _save151 = self.pos
                      _tmp = _BlankLine()
                      _gems/gems/rdoc-6.5.1.1/lib/rdoc/method_agems/gems/rdoc-6.5.1.1/lib/rdoc/tom_doc.rb000064400000014726150403134140013640 0ustar00Ticks5)
          unless _tmp
            self.pos = _save122
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  "<code>#{text}</code>" ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Code unless _tmp
    return _tmp
  end

  # RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end }
  def _RawHtml

    _save = self.pos
    while true # sequence
      _text_start = self.pos

      _save1 = self.pos
      while true # choice
        _tmp = apply(:_HtmlComment)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_HtmlBlockScript)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_HtmlTag)
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  if html? then text else '' end ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_RawHtml unless _tmp
    return _tmp
  end

  # BlankLine = @Sp @Newline { "\n" }
  def _BlankLine

    _save = self.pos
    while true # sequence
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  "\n" ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_BlankLine unless _tmp
    return _tmp
  end

  # Quoted = ("\"" (!"\"" .)* "\"" | "'" (!"'" .)* "'")
  def _Quoted

    _save = self.pos
    while true # choice

      _save1 = self.pos
      while true # sequence
        _tmp = match_string("\"")
        unless _tmp
          self.pos = _save1
          break
        end
        while true

          _save3 = self.pos
          while true # sequence
            _save4 = self.pos
            _tmp = match_string("\"")
            _tmp = _tmp ? nil : true
            self.pos = _save4
            unless _tmp
              self.pos = _save3
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save3
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
        unless _tmp
          self.pos = _save1
          break
        end
        _tmp = match_string("\"")
        unless _tmp
          self.pos = _save1
        end
        break
      end # end sequence

      break if _tmp
      self.pos = _save

      _save5 = self.pos
      while true # sequence
        _tmp = match_string("'")
        unless _tmp
          self.pos = _save5
          break
        end
        while true

          _save7 = self.pos
          while true # sequence
            _save8 = self.pos
            _tmp = match_string("'")
            _tmp = _tmp ? nil : true
            self.pos = _save8
            unless _tmp
              self.pos = _save7
              break
            end
            _tmp = get_byte
            unless _tmp
              self.pos = _save7
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
        unless _tmp
          self.pos = _save5
          break
        end
        _tmp = match_string("'")
        unless _tmp
          self.pos = _save5
        end
        break
      end # end sequence

      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_Quoted unless _tmp
    return _tmp
  end

  # HtmlAttribute = (AlphanumericAscii | "-")+ Spnl ("=" Spnl (Quoted | (!">" Nonspacechar)+))? Spnl
  def _HtmlAttribute

    _save = self.pos
    while true # sequence
      _save1 = self.pos

      _save2 = self.pos
      while true # choice
        _tmp = apply(:_AlphanumericAscii)
        break if _tmp
        self.pos = _save2
        _tmp = match_string("-")
        break if _tmp
        self.pos = _save2
        break
      end # end choice

      if _tmp
        while true

          _save3 = self.pos
          while true # choice
            _tmp = apply(:_AlphanumericAscii)
            break if _tmp
            self.pos = _save3
            _tmp = match_string("-")
            break if _tmp
            self.pos = _save3
            break
          end # end choice

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _save4 = self.pos

      _save5 = self.pos
      while true # sequence
        _tmp = match_string("=")
        unless _tmp
          self.pos = _save5
          break
        end
        _tmp = apply(:_Spnl)
        unless _tmp
          self.pos = _save5
          break
        end

        _save6 = self.pos
        while true # choice
          _tmp = apply(:_Quoted)
          break if _tmp
          self.pos = _save6
          _save7 = self.pos

          _save8 = self.pos
          while true # sequence
            _save9 = self.pos
            _tmp = match_string(">")
            _tmp = _tmp ? nil : true
            self.pos = _save9
            unless _tmp
              self.pos = _save8
              break
            end
            _tmp = apply(:_Nonspacechar)
            unless _tmp
              self.pos = _save8
            end
            break
          end # end sequence

          if _tmp
            while true

              _save10 = self.pos
              while true # sequence
                _save11 = self.pos
                _tmp = match_string(">")
                _tmp = _tmp ? nil : true
                self.pos = _save11
                unless _tmp
                  self.pos = _save10
                  break
                end
                _tmp = apply(:_Nonspacechar)
                unless _tmp
                  self.pos = _save10
                end
                break
              end # end sequence

              break unless _tmp
            end
            _tmp = true
          else
            self.pos = _save7
          end
          break igems/gems/rdoc-6.5.1.1/lib/rdoc/task.rb000064400000017307150403134140013154 0ustar00_HtmlComment

    _save = self.pos
    while true # sequence
      _tmp = match_string("<!--")
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save2 = self.pos
        while true # sequence
          _save3 = self.pos
          _tmp = match_string("-->")
          _tmp = _tmp ? nil : true
          self.pos = _save3
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = get_byte
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("-->")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HtmlComment unless _tmp
    return _tmp
  end

  # HtmlTag = "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">"
  def _HtmlTag

    _save = self.pos
    while true # sequence
      _tmp = match_string("<")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Spnl)
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = match_string("/")
      unless _tmp
        _tmp = true
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _tmp = apply(:_AlphanumericAscii)
      if _tmp
        while true
          _tmp = apply(:_AlphanumericAscii)
       gems/gems/rdoc-6.5.1.1/lib/rdoc/tom_doc.rb000064400000014726150403134140013640 0ustar00p = _tmp ? nil : true
    self.pos = _save
    set_failed_rule :_Eof unless _tmp
    return _tmp
  end

  # Nonspacechar = !@Spacechar !@Newline .
  def _Nonspacechar

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = _Spacechar()
      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _tmp = _Newline()
      _tmp = _tmp ? nil : true
      self.pos = _save2
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = get_byte
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Nonspacechar unless _tmp
    return _tmp
  end

  # Sp = @Spacechar*
  def _Sp
    while true
      _tmp = _Spacechar()
      break unless _tmp
    end
    _tmp = true
    set_failed_rule :_Sp unless _tmp
    return _tmp
  end

  # Spnl = @Sp (@Newline @Sp)?
  def _Spnl

    _save = self.pos
    while true # sequence
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos

      _save2 = self.pos
      while true # sequence
        _tmp = _Newline()
        unless _tmp
          self.pos = _save2
          break
        end
        _tmp = _Sp()
        unless _tmp
          self.pos = _save2
        end
        break
      end # end sequence

      unless _tmp
        _tmp = true
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Spnl unless _tmp
    return _tmp
  end

  # SpecialChar = (/[~*_`&\[\]()<!#\\'"]/ | @ExtendedSpecialChar)
  def _SpecialChar

    _save = self.pos
    while true # choice
      _tmp = scan(/\G(?-mix:[~*_`&\[\]()<!#\\'"])/)
      break if _tmp
      self.pos = _save
      _tmp = _ExtendedSpecialChar()
      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_SpecialChar unless _tmp
    return _tmp
  end

  # NormalChar = !(@SpecialChar | @Spacechar | @Newline) .
  def _NormalChar

    _save = self.pos
    while true # sequence
      _save1 = self.pos

      _save2 = self.pos
      while true # choice
        _tmp = _SpecialChar()
        break if _tmp
        self.pos = _save2
        _tmp = _Spacechar()
        break if _tmp
        self.pos = _save2
        _tmp = _Newline()
        break if _tmp
        self.pos = _save2
        break
      end # end choice

      _tmp = _tmp ? nil : true
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = get_byte
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_NormalChar unless _tmp
    return _tmp
  end

  # Digit = [0-9]
  def _Digit
    _save = self.pos
    _tmp = get_byte
    if _tmp
      unless _tmp >= 48 and _tmp <= 57
        self.pos = _save
        _tmp = nil
      end
    end
    set_failed_rule :_Digit unless _tmp
    return _tmp
  end

  # Alphanumeric = %literals.Alphanumeric
  def _Alphanumeric
    _tmp = @_grammar_literals.external_invoke(self, :_Alphanumeric)
    set_failed_rule :_Alphanumeric unless _tmp
    return _tmp
  end

  # AlphanumericAscii = %literals.AlphanumericAscii
  def _AlphanumericAscii
    _tmp = @_grammar_literals.external_invoke(self, :_AlphanumericAscii)
    set_failed_rule :_AlphanumericAscii unless _tmp
    return _tmp
  end

  # BOM = %literals.BOM
  def _BOM
    _tmp = @_grammar_literals.external_invoke(self, :_BOM)
    set_failed_rule :_BOM unless _tmp
    return _tmp
  end

  # Newline = %literals.Newline
  def _Newline
    _tmp = @_grammar_literals.external_invoke(self, :_Newline)
    set_failed_rule :_Newline unless _tmp
    return _tmp
  end

  # Spacechar = %literals.Spacechar
  def _Spacechar
    _tmp = @_grammar_literals.external_invoke(self, :_Spacechar)
    set_failed_rule :_Spacechar unless _tmp
    return _tmp
  end

  # HexEntity = /&#x/i < /[0-9a-fA-F]+/ > ";" { [text.to_i(16)].pack 'U' }
  def _HexEntity

    _save = self.pos
    while true # sequence
      _tmp = scan(/\G(?i-mx:&#x)/)
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = self.pos
      _tmp = scan(/\G(?-mix:[0-9a-fA-F]+)/)
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(";")
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  [text.to_i(16)].pack 'U' ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_HexEntity unless _tmp
    return _tmp
  end

  # DecEntity = "&#" < /[0-9]+/ > ";" { [text.to_i].pack 'U' }
  def _DecEntity

    _save = self.pos
    while true # sequence
      _tmp = match_string("&#")
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = self.pos
      _tmp = scan(/\G(?-mix:[0-9]+)/)
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(";")
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  [text.to_i].pack 'U' ;gems/gems/rdoc-6.5.1.1/lib/rdoc/code_object.rb000064400000022413150403134140014444 0ustar00 break
      end
      @result = begin;  if entity = HTML_ENTITIES[text] then
                 entity.pack 'U*'
               else
                 "&#{text};"
               end
             ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_CharEntity unless _tmp
    return _tmp
  end

  # NonindentSpace = / {0,3}/
  def _NonindentSpace
    _tmp = scan(/\G(?-mix: {0,3})/)
    set_gems/gems/rdoc-6.5.1.1/lib/rdoc/task.rb000064400000017307150403134140013154 0ustar00 _tmp
    return _tmp
  end

  # OptionallyIndentedLine = Indent? Line
  def _OptionallyIndentedLine

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = apply(:_Indent)
      unless _tmp
        _tmp = true
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Line)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_OptionallyIndentedLine unless _tmp
    return _tmp
  end

  # StartList = &. { [] }
  def _StartList

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = get_byte
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  [] ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_StartList unless _tmp
    return _tmp
  end

  # Line = @RawLine:a { a }
  def _Line

    _save = self.pos
    while true # sequence
      _tmp = _RawLine()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Line unless _tmp
    return _tmp
  end

  # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text }
  def _RawLine

    _save = self.pos
    while true # sequence

      _save1 = self.pos
      while true # choice
        _text_start = self.pos

        _save2 = self.pos
        while true # sequence
          _tmp = scan(/\G(?-mix:[^\r\n]*)/)
          unless _tmp
            self.pos = _save2
            break
          end
          _tmp = _Newline()
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        if _tmp
          text = get_text(_text_start)
        end
        break if _tmp
        self.pos = _save1

        _save3 = self.pos
        while true # sequence
          _text_start = self.pos
          _save4 = self.pos
          _tmp = get_byte
          if _tmp
            while true
              _tmp = get_byte
              break unless _tmp
            end
            _tmp = true
          else
            self.pos = _save4
          end
          if _tmp
            text = get_text(_text_start)
          end
          unless _tmp
            self.pos = _save3
            break
          end
          _tmp = _Eof()
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  text ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_RawLine unless _tmp
    return _tmp
  end

  # SkipBlock = (HtmlBlock | (!"#" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine)
  def _SkipBlock

    _save = self.pos
    while true # choice
      _tmp = apply(:_HtmlBlock)
      break if _tmp
      self.pos = _save

      _save1 = self.pos
      while true # sequence
        _save2 = self.pos

        _save3 = self.pos
        while true # sequence
          _save4 = self.pos
          _tmp = match_string("#")
          _tmp = _tmp ? nil : true
          self.pos = _save4
          unless _tmp
            self.pos = _save3
            break
          end
          _save5 = self.pos
          _tmp = apply(:_SetextBottom1)
          _tmp = _tmp ? nil : true
          self.pos = _save5
          unless _tmp
            self.pos = _save3
            break
          end
          _save6 = self.pos
          _tmp = apply(:_SetextBottom2)
          _tmp = _tmp ? nil : true
          self.pos = _save6
          unless _tmp
            self.pos = _save3
            break
          end
          _save7 = self.pos
          _tmp = _BlankLine()
          _tmp = _tmp ? nil : true
          self.pos = _save7
          unless _tmp
            self.pos = _save3
            break
          end
          _tmp = _RawLine()
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        if _tmp
          while true

            _save8 = self.pos
            while true # sequence
              _save9 = self.pos
              _tmp = match_string("#")
              _tmp = _tmp ? nil : true
              self.pos = _save9
              unless _tmp
                self.pos = _save8
                break
              end
              _save10 = self.pos
              _tmp = apply(:_SetextBottom1)
              _tmp = _tmp ? nil : true
              self.pos = _save10
              unless _tmp
                self.pos = _save8
                break
              end
              _save11 = self.pos
              _tmp = apply(:_SetextBottom2)
              _tmp = _tmp ? nil : true
              self.pos = _save11
              unless _tmp
                self.pos = _save8
                break
              end
              _save12 = self.pos
              _tmp = _BlankLine()
              _tmp = _tmp ? nil : true
              self.pos = _save12
              unless _tmp
                self.pos = _save8
                break
              end
              _tmp = _RawLine()
              unless _tmp
                self.pos = _save8
              end
              break
            end # end sequence

            break unless _tmp
          end
          _tmp = true
        else
          self.pos = _save2
        end
        unless _tmp
          self.pos = _save1
          break
        end
        while true
          _tmp = _BlankLine()
          break unless _tmp
        end
        _tmp = true
        unless _tmp
          self.pos = _save1
        end
        break
      end # end sequence

      break if _tmp
      self.pos = _save
      _save14 = self.pos
      _tmp = _BlankLine()
      if _tmp
        while true
          _tmp = _BlankLine()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save14
      end
      break if _tmp
      self.pos = _save
      _tmp = _RawLine()
      break if _tmp
      self.pos = _save
      break
    end # end choice

    set_failed_rule :_SkipBlock unless _tmp
    return _tmp
  end

  # ExtendedSpecialChar = &{ notes? } "^"
  def _ExtendedSpecialChar

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = begin;  notes? ; end
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("^")
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_ExtendedSpecialChar unless _tmp
    return _tmp
  end

  # NoteReference = &{ notes? } RawNoteReference:ref { note_for ref }
  def _NoteReference

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = begin;  notes? ; end
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_RawNoteReference)
      ref = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  note_for ref ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_NoteReference unless _tmp
    return _tmp
  end

  # RawNoteReference = "[^" < (!@Newline !"]" .)+ > "]" { text }
  def _RawNoteReference

    _save = self.pos
    while true # sequence
      _tmp = match_string("[^")
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = selfgems/gems/rdoc-6.5.1.1/lib/rdoc/code_object.rb000064400000022413150403134140014444 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/text.rb000064400000005602150403134140013750 0ustar00   else
        self.pos = _save1
      end
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("]")
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  text ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_RawNoteReference unless _tmp
    return _tmp
  end

  # Note = &{ notes? } @NonindentSpace RawNoteReference:ref ":" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a                    nil                 }
  def _Note

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = begin;  notes? ; end
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _NonindentSpace()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_RawNoteReference)
      ref = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(":")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_RawNoteBlock)
      i = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a.concat i ; end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      while true

        _save3 = self.pos
        while true # sequence
          _save4 = self.pos
          _tmp = apply(:_Indent)
          self.pos = _save4
          unless _tmp
            self.pos = _save3
            break
          end
          _tmp = apply(:_RawNoteBlock)
          i = @result
          unless _tmp
            self.pos = _save3
            break
          end
          @result = begin;  a.concat i ; end
          _tmp = true
          unless _tmp
            self.pos = _save3
          end
          break
        end # end sequence

        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  @footnotes[ref] = paragraph a

                  nil
                ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Note unless _tmp
    return _tmp
  end

  # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { ref = [:inline, @note_order.length]                @footnotes[ref] = paragraph a                 note_for ref              }
  def _InlineNote

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _gems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/locale.rb000064400000004546150403134140014231 0ustar00l = @result
        unless _tmp
          self.pos = _save3
          break
        end
        @result = begin;  a << l ; end
        _tmp = true
        unless _tmp
          self.pos = _save3
        end
        break
      end # end sequence

      if _tmp
        while true

          _save5 = self.pos
          while true # sequence
            _save6 = self.pos
            _tmp = match_string("]")
            _tmp = _tmp ? nil : true
            self.pos = _save6
            unless _tmp
              self.pos = _save5
              break
            end
            _tmp = apply(:_Inline)
            l = @result
            unless _tmp
              self.pos = _save5
              break
            end
            @result = begin;  a << l ; end
            _tmp = true
            unless _tmp
              self.pos = _save5
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save2
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string("]")
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  ref = [:inline, @note_order.length]
               @footnotes[ref] = paragraph a

               note_for ref
             ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_InlineNote unless _tmp
    return _tmp
  end

  # Notes = (Note | SkipBlock)*
  def _Notes
    while true

      _save1 = self.pos
      while true # choice
        _tmp = apply(:_Note)
        break if _tmp
        self.pos = _save1
        _tmp = apply(:_SkipBlock)
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      break unless _tmp
    end
    _tmp = true
    set_failed_rule :_Notes unless _tmp
    return _tmp
  end

  # RawNoteBlock = @StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }
  def _RawNoteBlock

    _save = self.pos
    while true # sequence
      _tmp = _StartList()
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos

      _save2 = self.pos
      while true # sequence
        _save3 = self.pos
        _tmp = _BlankLine()
        _tmp = _tmp ? nil : true
  gems/gems/rdoc-6.5.1.1/lib/rdoc/store.rb000064400000055257150403134140013354 0ustar00          while true # sequence
            _save6 = self.pos
            _tmp = _BlankLine()
            _tmp = _tmp ? nil : true
            self.pos = _save6
            unless _tmp
              self.pos = _save5
              break
            end
            _save7 = self.pos
            _tmp = apply(:_RawNoteReference)
            _tmp = _tmp ? nil : true
            self.pos = _save7
            unless _tmp
              self.pos = _save5
              break
            end
            _tmp = apply(:_OptionallyIndentedLine)
            l = @result
            unless _tmp
              self.pos = _save5
              break
            end
            @result = begin;  a << l ; end
            _tmp = true
            unless _tmp
              self.pos = _save5
            end
            break
          end # end sequence

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      _text_start = self.pos
      while true
        _tmp = _BlankLine()
        break unless _tmp
      end
      _tmp = true
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a << text ; end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_RawNoteBlock unless _tmp
    return _tmp
  end

  # CodeFence = &{ github? } Ticks3 (@Sp StrChunk:format)? Spnl < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text               verbatim.format = format.intern if format.instance_of?(String)               verbatim             }
  def _CodeFence

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = begin;  github? ; end
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Ticks3)
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos

      _save3 = self.pos
      while true # sequence
        _tmpgems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/text.rb000064400000005602150403134140013750 0ustar00 true
          self.pos = _save8
          unless _tmp
            self.pos = _save7
            break
          end
          _tmp = apply(:_Nonspacechar)
          unless _tmp
            self.pos = _save7
          end
          break
        end # end sequence

        if _tmp
          while true

            _save9 = self.pos
            while true # sequence
              _save10 = self.pos
              _tmp = match_string("`")
              _tmp = _tmp ? nil : true
              self.pos = _save10
              unless _tmp
                self.pos = _save9
                break
              end
              _tmp = apply(:_Nonspacechar)
              unless _tmp
                self.pos = _save9
              end
              break
            end # end sequence

            break unless _tmp
          end
          _tmp = true
        else
          self.pos = _save6
        end
        break if _tmp
        self.pos = _save5

        _save11 = self.pos
        while true # sequence
          _save12 = self.pos
          _tmp = apply(:_Ticks3)
          _tmp = _tmp ? nil : true
          self.pos = _save12
          unless _tmp
            self.pos = _save11
            break
          end
          _tmp = scan(/\G(?-mix:`+)/)
          unless _tmp
            self.pos = _save11
          end
          break
        end # end sequence

        break if _tmp
        self.pos = _save5
        _tmp = apply(:_Spacechar)
        break if _tmp
        self.pos = _save5
        _tmp = _Newline()
        break if _tmp
        self.pos = _save5
        break
      end # end choice

      if _tmp
        while true

          _save13 = self.pos
          while true # choice
            _save14 = self.pos

            _save15 = self.pos
            while true # sequence
              _save16 = self.pos
              _tmp = match_string("`")
              _tmp = _tmp ? nil : true
              self.pos = _save16
              unless _tmp
                self.pos = _save15
                break
              end
              _tmp = apply(:_Nonspacechar)
              unless _tmp
                self.pos = _save15
              end
              break
            end # end sequence

            if _tmp
              while true

                _save17 = self.pos
                while true # sequence
                  _save18 = self.pos
                  _tmp = match_string("`")
                  _tmp = _tmp ? nil : true
                  self.pos = _save18
                  unless _tmp
                    self.pos = _save17
                    break
                  end
                  _tmp = apply(:_Nonspacechar)
                  unless _tmp
                    self.pos = _save17
                  end
                  break
                end # end sequence

                break unless _tmp
              end
              _tmp = true
            else
              self.pos = _save14
  gems/gems/rdoc-6.5.1.1/lib/rdoc/i18n/locale.rb000064400000004546150403134140014231 0ustar00pacechar)
            break if _tmp
            self.pos = _save13
            _tmp = _Newline()
            break if _tmp
            self.pos = _save13
            break
          end # end choice

          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save4
      end
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Ticks3)
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      while true
        _tmp = _Newline()
        break unless _tmp
      end
      _tmp = true
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  verbatim = RDoc::Markup::Verbatim.new text
              verbatim.format = format.intern if format.instance_of?(String)
              verbatim
            ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_CodeFence unless _tmp
    return _tmp
  end

  # Table = &{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) }
  def _Table

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = begin;  github? ; end
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_TableHead)
      header = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_TableLine)
      line = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _ary = []
      _tmp = apply(:_TableRow)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_TableRow)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save2
      end
      body = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  table = RDoc::Markup::Table.new(header, line, body) ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_Table unless _tmp
    return _tmp
  end

  # TableHead = Tagems/gems/rdoc-6.5.1.1/lib/rdoc/store.rb000064400000055257150403134140013354 0ustar00 _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  items ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TableHead unless _tmp
    return _tmp
  end

  # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row }
  def _TableRow

    _save = self.pos
    while true # sequence

      _save1 = self.pos
      while true # choice

        _save2 = self.pos
        while true # sequence
          _tmp = apply(:_TableItem)
          item1 = @result
          unless _tmp
            self.pos = _save2
            break
          end
          _ary = []
          while true
            _tmp = apply(:_TableItem2)
            _ary << @result if _tmp
            break unless _tmp
          end
          _tmp = true
          @result = _ary
          items = @result
          unless _tmp
            self.pos = _save2
            break
          end
          @result = begin;  [item1, *items] ; end
          _tmp = true
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        row = @result
        break if _tmp
        self.pos = _save1
        _save4 = self.pos
        _ary = []
        _tmp = apply(:_TableItem2)
        if _tmp
          _ary << @result
          while true
            _tmp = apply(:_TableItem2)
            _ary << @result if _tmp
            break unless _tmp
          end
          _tmp = true
          @result = _ary
        else
          self.pos = _save4
        end
        row = @result
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _save5 = self.pos
      _tmp = match_string("|")
      unless _tmp
        _tmp = true
        self.pos = _save5
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  row ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TableRow unless _tmp
    return _tmp
  end

  # TableItem2 = "|" TableItem
  def _TableItem2

    _save = self.pos
    while true # sequence
      _tmp = match_string("|")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_TableItem)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TableItem2 unless _tmp
    return _tmp
  end

  # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1')  }
  def _TableItem

    _save = self.pos
    while true # sequence
      _text_start = self.pos
      _tmp = scan(/\G(?-mix:(?:\\.|[^|\n])+)/)
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  text.strip.gsub(/\\(.)/, '\1')  ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TableItem unless _tmp
    return _tmp
  end

  # TableLine = ((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) "|"? @Newline { line }
  def _TableLine

    _save = self.pos
    while true # sequence

      _save1 = self.pos
      while true # choice

        _save2 = self.pos
        while true # sequence
          _tmp = apply(:_TableAlign)
          align1 = @result
          unless _tmp
            self.pos = _save2
            break
          end
          _ary = []
          while true
            _tmp = apply(:_TableAlign2)
            _ary << @result if _tmp
            break unless _tmp
          end
          _tmp = true
          @result = _ary
          aligns = @result
          unless _tmp
            self.pos = _save2
            break
          end
          @result = begin; [align1, *aligns] ; end
          _tmp = true
          unless _tmp
            self.pos = _save2
          end
          break
        end # end sequence

        line = @result
        break if _tmp
        self.pos = _save1
        _save4 = self.pos
        _ary = []
        _tmp = apply(:_TableAlign2)
        if _tmp
          _ary << @result
          while true
            _tmp = apply(:_TableAlign2)
            _ary << @result if _tmp
            break unless _tmp
          end
          _tmp = true
          @result = _ary
        else
          self.pos = _save4
        end
        line = @result
        break if _tmp
        self.pos = _save1
        break
      end # end choice

      unless _tmp
        self.pos = _save
        break
      end
      _save5 = self.pos
      _tmp = match_string("|")
      unless _tmp
        _tmp = true
        self.pos = _save5
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  line ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TableLine unless _tmp
    return _tmp
  end

  # TableAlign2 = "|" @Sp TableAlign
  def _TableAlign2

    _save = self.pos
    while true # sequence
      _tmp = match_string("|")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_TableAlign)
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TableAlign2 unless _tmp
    return _tmp
  end

  # TableAlign = < /:?-+:?/ > @Sp {                 text.start_with?(":") ?                 (text.end_with?(":") ? :center : :left) :                 (text.end_with?(":") ? :right : nil)               }
  def _TableAlign

    _save = self.pos
    while true # sequence
      _text_start = self.pos
      _tmp = scan(/\G(?-mix::?-+:?)/)
      if _tmp
        text = get_text(_text_start)
      end
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;
                text.start_with?(":") ?
                (text.end_with?(":") ? :center : :left) :
                (text.end_with?(":") ? :right : nil)
              ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_TableAlign unless _tmp
    return _tmp
  end

  # DefinitionList = &{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten }
  def _DefinitionList

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _tmp = begin;  definition_lists? ; end
      self.pos = _save1
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _ary = []
      _tmp = apply(:_DefinitionListItem)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_DefinitionListItem)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save2
      end
      list = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  RDoc::Markup::List.new :NOTE, *list.flatten ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_DefinitionList unless _tmp
    return _tmp
  end

  # DefinitionListItem = DefinitionListLabel+:label DefinitionListDefinition+:defns { list_items = []                        list_items <<                          RDoc::Markup::ListItem.new(label, defns.shift)                         list_items.concat defns.map { |defn|                          RDoc::Markup::ListItem.new nil, defn                        } unless list_items.empty?                         list_items                      }
  def _DefinitionListItem

    _save = self.pos
    while true # sequence
      _save1 = self.pos
      _ary = []
      _tmp = apply(:_DefinitionListLabel)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_DefinitionListLabel)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save1
      end
      label = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save2 = self.pos
      _ary = []
      _tmp = apply(:_DefinitionListDefinition)
      if _tmp
        _ary << @result
        while true
          _tmp = apply(:_DefinitionListDefinition)
          _ary << @result if _tmp
          break unless _tmp
        end
        _tmp = true
        @result = _ary
      else
        self.pos = _save2
      end
      defns = @result
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  list_items = []
                       list_items <<
                         RDoc::Markup::ListItem.new(label, defns.shift)

                       list_items.concat defns.map { |defn|
                         RDoc::Markup::ListItem.new nil, defn
                       } unless list_items.empty?

                       list_items
                     ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_DefinitionListItem unless _tmp
    return _tmp
  end

  # DefinitionListLabel = StrChunk:label @Sp @Newline { label }
  def _DefinitionListLabel

    _save = self.pos
    while true # sequence
      _tmp = apply(:_StrChunk)
      label = @result
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Sp()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Newline()
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  label ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_DefinitionListLabel unless _tmp
    return _tmp
  end

  # DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+ { paragraph a }
  def _DefinitionListDefinition

    _save = self.pos
    while true # sequence
      _tmp = _NonindentSpace()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = match_string(":")
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = _Space()
      unless _tmp
        self.pos = _save
        break
      end
      _tmp = apply(:_Inlines)
      a = @result
      unless _tmp
        self.pos = _save
        break
      end
      _save1 = self.pos
      _tmp = _BlankLine()
      if _tmp
        while true
          _tmp = _BlankLine()
          break unless _tmp
        end
        _tmp = true
      else
        self.pos = _save1
      end
      unless _tmp
        self.pos = _save
        break
      end
      @result = begin;  paragraph a ; end
      _tmp = true
      unless _tmp
        self.pos = _save
      end
      break
    end # end sequence

    set_failed_rule :_DefinitionListDefinition unless _tmp
    return _tmp
  end

  Rules = {}
  Rules[:_root] = rule_info("root", "Doc")
  Rules[:_Doc] = rule_info("Doc", "BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) }")
  Rules[:_Block] = rule_info("Block", "@BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain)")
  Rules[:_Para] = rule_info("Para", "@NonindentSpace Inlines:a @BlankLine+ { paragraph a }")
  Rules[:_Plain] = rule_info("Plain", "Inlines:a { paragraph a }")
  Rules[:_AtxInline] = rule_info("AtxInline", "!@Newline !(@Sp /\#*/ @Sp @Newline) Inline")
  Rules[:_AtxStart] = rule_info("AtxStart", "< /\\\#{1,6}/ > { text.length }")
  Rules[:_AtxHeading] = rule_info("AtxHeading", "AtxStart:s @Sp AtxInline+:a (@Sp /\#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) }")
  Rules[:_SetextHeading] = rule_info("SetextHeading", "(SetextHeading1 | SetextHeading2)")
  Rules[:_SetextBottom1] = rule_info("SetextBottom1", "/={1,}/ @Newline")
  Rules[:_SetextBottom2] = rule_info("SetextBottom2", "/-{1,}/ @Newline")
  Rules[:_SetextHeading1] = rule_info("SetextHeading1", "&(@RawLine SetextBottom1) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom1 { RDoc::Markup::Heading.new(1, a.join) }")
  Rules[:_SetextHeading2] = rule_info("SetextHeading2", "&(@RawLine SetextBottom2) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom2 { RDoc::Markup::Heading.new(2, a.join) }")
  Rules[:_Heading] = rule_info("Heading", "(SetextHeading | AtxHeading)")
  Rules[:_BlockQuote] = rule_info("BlockQuote", "BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) }")
  Rules[:_BlockQuoteRaw] = rule_info("BlockQuoteRaw", "@StartList:a (\">\" \" \"? Line:l { a << l } (!\">\" !@BlankLine Line:c { a << c })* (@BlankLine:n { a << n })*)+ { inner_parse a.join }")
  Rules[:_NonblankIndentedLine] = rule_info("NonblankIndentedLigems/gems/rdoc-6.5.1.1/lib/rdoc/markup.rb000064400000017616150403134140013514 0ustar00 = rule_info("ListLoose", "@StartList:a (ListItem:b @BlankLine* { a << b })+ { a }")
  Rules[:_ListItem] = rule_info("ListItem", "(Bullet | Enumerator) @StartList:a ListBlock:b { a << b } (ListContinuationBlock:c { a.push(*c) })* { list_item_from a }")
  Rules[:_ListItemTight] = rule_info("ListItemTight", "(Bullet | Enumerator) ListBlock:a (!@BlankLine ListContinuationBlock:b { a.push(*b) })* !ListContinuationBlock { list_item_from a }")
  Rules[:_ListBlock] = rule_info("ListBlock", "!@BlankLine Line:a ListBlockLine*:c { [a, *c] }")
  Rules[:_ListContinuationBlock] = rule_info("ListContinuationBlock", "@StartList:a @BlankLine* { a << \"\\n\" } (Indent ListBlock:b { a.concat b })+ { a }")
  Rules[:_Enumerator] = rule_info("Enumerator", "@NonindentSpace [0-9]+ \".\" @Spacechar+")
  Rules[:_OrderedList] = rule_info("OrderedList", "&Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) }")
  Rules[:_ListBlockLine] = rule_info("ListBlockLine", "!@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine")
  Rules[:_HtmlOpenAnchor] = rule_info("HtmlOpenAnchor", "\"<\" Spnl (\"a\" | \"A\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlCloseAnchor] = rule_info("HtmlCloseAnchor", "\"<\" Spnl \"/\" (\"a\" | \"A\") Spnl \">\"")
  Rules[:_HtmlAnchor] = rule_info("HtmlAnchor", "HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor")
  Rules[:_HtmlBlockOpenAddress] = rule_info("HtmlBlockOpenAddress", "\"<\" Spnl (\"address\" | \"ADDRESS\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseAddress] = rule_info("HtmlBlockCloseAddress", "\"<\" Spnl \"/\" (\"address\" | \"ADDRESS\") Spnl \">\"")
  Rules[:_HtmlBlockAddress] = rule_info("HtmlBlockAddress", "HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress")
  Rules[:_HtmlBlockOpenBlockquote] = rule_info("HtmlBlockOpenBlockquote", "\"<\" Spnl (\"blockquote\" | \"BLOCKQUOTE\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseBlockquote] = rule_info("HtmlBlockCloseBlockquote", "\"<\" Spnl \"/\" (\"blockquote\" | \"BLOCKQUOTE\") Spnl \">\"")
  Rules[:_HtmlBlockBlockquote] = rule_info("HtmlBlockBlockquote", "HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote")
  Rules[:_HtmlBlockOpenCenter] = rule_info("HtmlBlockOpenCenter", "\"<\" Spnl (\"center\" | \"CENTER\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseCenter] = rule_info("HtmlBlockCloseCenter", "\"<\" Spnl \"/\" (\"center\" | \"CENTER\") Spnl \">\"")
  Rules[:_HtmlBlockCenter] = rule_info("HtmlBlockCenter", "HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter")
  Rules[:_HtmlBlockOpenDir] = rule_info("HtmlBlockOpenDir", "\"<\" Spnl (\"dir\" | \"DIR\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseDir] = rule_info("HtmlBlockCloseDir", "\"<\" Spnl \"/\" (\"dir\" | \"DIR\") Spnl \">\"")
  Rules[:_HtmlBlockDir] = rule_info("HtmlBlockDir", "HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir")
  Rules[:_HtmlBlockOpenDiv] = rule_info("HtmlBlockOpenDiv", "\"<\" Spnl (\"div\" | \"DIV\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseDiv] = rule_info("HtmlBlockCloseDiv", "\"<\" Spnl \"/\" (\"div\" | \"DIV\") Spnl \">\"")
  Rules[:_HtmlBlockDiv] = rule_info("HtmlBlockDiv", "HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv")
  Rules[:_HtmlBlockOpenDl] = rule_info("HtmlBlockOpenDl", "\"<\" Spnl (\"dl\" | \"DL\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseDl] = rule_info("HtmlBlockCloseDl", "\"<\" Spnl \"/\" (\"dl\" | \"DL\") Spnl \">\"")
  Rules[:_HtmlBlockDl] = rule_info("HtmlBlockDl", "HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl")
  Rules[:_HtmlBlockOpenFieldset] = rule_info("HtmlBlockOpenFieldset", "\"<\" Spnl (\"fieldset\" | \"FIELDSET\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseFieldset] = rule_info("HtmlBlockCloseFieldset", "\"<\" Spnl \"/\" (\"fieldset\" | \"FIELDSET\") Spnl \">\"")
  Rules[:_HtmlBlockFieldset] = rule_info("HtmlBlockFieldset", "HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset")
  Rules[:_HtmlBlockOpenForm] = rule_info("HtmlBlockOpenForm", "\"<\" Spnl (\"form\" | \"FORM\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseForm] = rule_info("HtmlBlockCloseForm", "\"<\" Spnl \"/\" (\"form\" | \"FORM\") Spnl \">\"")
  Rules[:_HtmlBlockForm] = rule_info("HtmlBlockForm", "HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm")
  Rules[:_HtmlBlockOpenH1] = rule_info("HtmlBlockOpenH1", "\"<\" Spnl (\"h1\" | \"H1\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseH1] = rule_info("HtmlBlockCloseH1", "\"<\" Spnl \"/\" (\"h1\" | \"H1\") Spnl \">\"")
  Rules[:_HtmlBlockH1] = rule_info("HtmlBlockH1", "HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1")
  Rules[:_HtmlBlockOpenH2] = rule_info("HtmlBlockOpenH2", "\"<\" Spnl (\"h2\" | \"H2\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseH2] = rule_info("HtmlBlockCloseH2", "\"<\" Spnl \"/\" (\"h2\" | \"H2\") Spnl \">\"")
  Rules[:_HtmlBlockH2] = rule_info("HtmlBlockH2", "HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2")
  Rules[:_HtmlBlockOpenH3] = rule_info("HtmlBlockOpenH3", "\"<\" Spnl (\"h3\" | \"H3\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseH3] = rule_info("HtmlBlockCloseH3", "\"<\" Spnl \"/\" (\"h3\" | \"H3\") Spnl \">\"")
  Rules[:_HtmlBlockH3] = rule_info("HtmlBlockH3", "HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3")
  Rules[:_HtmlBlockOpenH4] = rule_info("HtmlBlockOpenH4", "\"<\" Spnl (\"h4\" | \"H4\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseH4] = rule_info("HtmlBlockCloseH4", "\"<\" Spnl \"/\" (\"h4\" | \"H4\") Spnl \">\"")
  Rules[:_HtmlBlockH4] = rule_info("HtmlBlockH4", "HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4")
  Rules[:_HtmlBlockOpenH5] = rule_info("HtmlBlockOpenH5", "\"<\" Spnl (\"h5\" | \"H5\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseH5] = rule_info("HtmlBlockCloseH5", "\"<\" Spnl \"/\" (\"h5\" | \"H5\") Spnl \">\"")
  Rules[:_HtmlBlockH5] = rule_info("HtmlBlockH5", "HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5")
  Rules[:_HtmlBlockOpenH6] = rule_info("HtmlBlockOpenH6", "\"<\" Spnl (\"h6\" | \"H6\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseH6] = rule_info("HtmlBlockCloseH6", "\"<\" Spnl \"/\" (\"h6\" | \"H6\") Spnl \">\"")
  Rules[:_HtmlBlockH6] = rule_info("HtmlBlockH6", "HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6")
  Rules[:_HtmlBlockOpenMenu] = rule_info("HtmlBlockOpenMenu", "\"<\" Spnl (\"menu\" | \"MENU\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseMenu] = rule_info("HtmlBlockCloseMenu", "\"<\" Spnl \"/\" (\"menu\" | \"MENU\") Spnl \">\"")
  Rules[:_HtmlBlockMenu] = rule_info("HtmlBlockMenu", "HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu")
  Rules[:_HtmlBlockOpenNoframes] = rule_info("HtmlBlockOpenNoframes", "\"<\" Spnl (\"noframes\" | \"NOFRAMES\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseNoframes] = rule_info("HtmlBlockCloseNoframes", "\"<\" Spnl \"/\" (\"noframes\" | \"NOFRAMES\") Spnl \">\"")
  Rules[:_HtmlBlockNoframes] = rule_info("HtmlBlockNoframes", "HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes")
  Rules[:_HtmlBlockOpenNoscript] = rule_info("HtmlBlockOpenNoscript", "\"<\" Spnl (\"noscript\" | \"NOSCRIPT\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseNoscript] = rule_info("HtmlBlockCloseNoscript", "\"<\" Spnl \"/\" (\"noscript\" | \"NOSCRIPT\") Spnl \">\"")
  Rules[:_HtmlBlockNoscript] = rule_info("HtmlBlockNoscript", "HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript")
  Rules[:_HtmlBlockOpenOl] = rule_info("HtmlBlockOpenOl", "\"<\" Spnl (\"ol\" | \"OL\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseOl] = rule_info("HtmlBlockCloseOl", "\"<\" Spnl \"/\"gems/gems/rdoc-6.5.1.1/lib/rdoc/class_module.rb000064400000047504150403134140014666 0ustar00ckClosePre] = rule_info("HtmlBlockClosePre", "\"<\" Spnl \"/\" (\"pre\" | \"PRE\") Spnl \">\"")
  Rules[:_HtmlBlockPre] = rule_info("HtmlBlockPre", "HtmlBlockOpenPre (HtmlBlocgems/gems/rdoc-6.5.1.1/lib/rdoc/markup.rb000064400000017616150403134140013514 0ustar00<\" Spnl (\"dd\" | \"DD\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseDd] = rule_info("HtmlBlockCloseDd", "\"<\" Spnl \"/\" (\"dd\" | \"DD\") Spnl \">\"")
  Rules[:_HtmlBlockDd] = rule_info("HtmlBlockDd", "HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd")
  Rules[:_HtmlBlockOpenDt] = rule_info("HtmlBlockOpenDt", "\"<\" Spnl (\"dt\" | \"DT\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseDt] = rule_info("HtmlBlockCloseDt", "\"<\" Spnl \"/\" (\"dt\" | \"DT\") Spnl \">\"")
  Rules[:_HtmlBlockDt] = rule_info("HtmlBlockDt", "HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt")
  Rules[:_HtmlBlockOpenFrameset] = rule_info("HtmlBlockOpenFrameset", "\"<\" Spnl (\"frameset\" | \"FRAMESET\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseFrameset] = rule_info("HtmlBlockCloseFrameset", "\"<\" Spnl \"/\" (\"frameset\" | \"FRAMESET\") Spnl \">\"")
  Rules[:_HtmlBlockFrameset] = rule_info("HtmlBlockFrameset", "HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset")
  Rules[:_HtmlBlockOpenLi] = rule_info("HtmlBlockOpenLi", "\"<\" Spnl (\"li\" | \"LI\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseLi] = rule_info("HtmlBlockCloseLi", "\"<\" Spnl \"/\" (\"li\" | \"LI\") Spnl \">\"")
  Rules[:_HtmlBlockLi] = rule_info("HtmlBlockLi", "HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi")
  Rules[:_HtmlBlockOpenTbody] = rule_info("HtmlBlockOpenTbody", "\"<\" Spnl (\"tbody\" | \"TBODY\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseTbody] = rule_info("HtmlBlockCloseTbody", "\"<\" Spnl \"/\" (\"tbody\" | \"TBODY\") Spnl \">\"")
  Rules[:_HtmlBlockTbody] = rule_info("HtmlBlockTbody", "HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody")
  Rules[:_HtmlBlockOpenTd] = rule_info("HtmlBlockOpenTd", "\"<\" Spnl (\"td\" | \"TD\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseTd] = rule_info("HtmlBlockCloseTd", "\"<\" Spnl \"/\" (\"td\" | \"TD\") Spnl \">\"")
  Rules[:_HtmlBlockTd] = rule_info("HtmlBlockTd", "HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd")
  Rules[:_HtmlBlockOpenTfoot] = rule_info("HtmlBlockOpenTfoot", "\"<\" Spnl (\"tfoot\" | \"TFOOT\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseTfoot] = rule_info("HtmlBlockCloseTfoot", "\"<\" Spnl \"/\" (\"tfoot\" | \"TFOOT\") Spnl \">\"")
  Rules[:_HtmlBlockTfoot] = rule_info("HtmlBlockTfoot", "HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot")
  Rules[:_HtmlBlockOpenTh] = rule_info("HtmlBlockOpenTh", "\"<\" Spnl (\"th\" | \"TH\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseTh] = rule_info("HtmlBlockCloseTh", "\"<\" Spnl \"/\" (\"th\" | \"TH\") Spnl \">\"")
  Rules[:_HtmlBlockTh] = rule_info("HtmlBlockTh", "HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh")
  Rules[:_HtmlBlockOpenThead] = rule_info("HtmlBlockOpenThead", "\"<\" Spnl (\"thead\" | \"THEAD\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseThead] = rule_info("HtmlBlockCloseThead", "\"<\" Spnl \"/\" (\"thead\" | \"THEAD\") Spnl \">\"")
  Rules[:_HtmlBlockThead] = rule_info("HtmlBlockThead", "HtmlBlockOpenThead (HtmlBlockThead | !HtmlBlockCloseThead .)* HtmlBlockCloseThead")
  Rules[:_HtmlBlockOpenTr] = rule_info("HtmlBlockOpenTr", "\"<\" Spnl (\"tr\" | \"TR\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseTr] = rule_info("HtmlBlockCloseTr", "\"<\" Spnl \"/\" (\"tr\" | \"TR\") Spnl \">\"")
  Rules[:_HtmlBlockTr] = rule_info("HtmlBlockTr", "HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr")
  Rules[:_HtmlBlockOpenScript] = rule_info("HtmlBlockOpenScript", "\"<\" Spnl (\"script\" | \"SCRIPT\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseScript] = rule_info("HtmlBlockCloseScript", "\"<\" Spnl \"/\" (\"script\" | \"SCRIPT\") Spnl \">\"")
  Rules[:_HtmlBlockScript] = rule_info("HtmlBlockScript", "HtmlBlockOpenScript (!HtmlBlockCloseScript .)* HtmlBlockCloseScript")
  Rules[:_HtmlBlockOpenHead] = rule_info("HtmlBlockOpenHead", "\"<\" Spnl (\"head\" | \"HEAD\") Spnl HtmlAttribute* \">\"")
  Rules[:_HtmlBlockCloseHead] = rule_info("HtmlBlockCloseHead", "\"<\" Spnl \"/\" (\"head\" | \"HEAD\") Spnl \">\"")
  Rules[:_HtmlBlockHead] = rule_info("HtmlBlockHead", "HtmlBlockOpenHead (!HtmlBlockCloseHead .)* HtmlBlockCloseHead")
  Rules[:_HtmlBlockInTags] = rule_info("HtmlBlockInTags", "(HtmlAnchor | HtmlBlockAddress | HtmlBlockBlockquote | HtmlBlockCenter | HtmlBlockDir | HtmlBlockDiv | HtmlBlockDl | HtmlBlockFieldset | HtmlBlockForm | HtmlBlockH1 | HtmlBlockH2 | HtmlBlockH3 | HtmlBlockH4 | HtmlBlockH5 | HtmlBlockH6 | HtmlBlockMenu | HtmlBlockNoframes | HtmlBlockNoscript | HtmlBlockOl | HtmlBlockP | HtmlBlockPre | HtmlBlockTable | HtmlBlockUl | HtmlBlockDd | HtmlBlockDt | HtmlBlockFrameset | HtmlBlockLi | HtmlBlockTbody | HtmlBlockTd | HtmlBlockTfoot | HtmlBlockTh | HtmlBlockThead | HtmlBlockTr | HtmlBlockScript | HtmlBlockHead)")
  Rules[:_HtmlBlock] = rule_info("HtmlBlock", "< (HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing | HtmlUnclosed) > @BlankLine+ { if html? then                 RDoc::Markup::Raw.new text               end }")
  Rules[:_HtmlUnclosed] = rule_info("HtmlUnclosed", "\"<\" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl \">\"")
  Rules[:_HtmlUnclosedType] = rule_info("HtmlUnclosedType", "(\"HR\" | \"hr\")")
  Rules[:_HtmlBlockSelfClosing] = rule_info("HtmlBlockSelfClosing", "\"<\" Spnl HtmlBlockType Spnl HtmlAttribute* \"/\" Spnl \">\"")
  Rules[:_HtmlBlockType] = rule_info("HtmlBlockType", "(\"ADDRESS\" | \"BLOCKQUOTE\" | \"CENTER\" | \"DD\" | \"DIR\" | \"DIV\" | \"DL\" | \"DT\" | \"FIELDSET\" | \"FORM\" | \"FRAMESET\" | \"H1\" | \"H2\" | \"H3\" | \"H4\" | \"H5\" | \"H6\" | \"HR\" | \"ISINDEX\" | \"LI\" | \"MENU\" | \"NOFRAMES\" | \"NOSCRIPT\" | \"OL\" | \"P\" | \"PRE\" | \"SCRIPT\" | \"TABLE\" | \"TBODY\" | \"TD\" | \"TFOOT\" | \"TH\" | \"THEAD\" | \"TR\" | \"UL\" | \"address\" | \"blockquote\" | \"center\" | \"dd\" | \"dir\" | \"div\" | \"dl\" | \"dt\" | \"fieldset\" | \"form\" | \"frameset\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"hr\" | \"isindex\" | \"li\" | \"menu\" | \"noframes\" | \"noscript\" | \"ol\" | \"p\" | \"pre\" | \"script\" | \"table\" | \"tbody\" | \"td\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"ul\")")
  Rules[:_StyleOpen] = rule_info("StyleOpen", "\"<\" Spnl (\"style\" | \"STYLE\") Spnl HtmlAttribute* \">\"")
  Rules[:_StyleClose] = rule_info("StyleClose", "\"<\" Spnl \"/\" (\"style\" | \"STYLE\") Spnl \">\"")
  Rules[:_InStyleTags] = rule_info("InStyleTags", "StyleOpen (!StyleClose .)* StyleClose")
  Rules[:_StyleBlock] = rule_info("StyleBlock", "< InStyleTags > @BlankLine* { if css? then                     RDoc::Markup::Raw.new text                   end }")
  Rules[:_Inlines] = rule_info("Inlines", "(!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\\n]*$/) &Inline { c })+:chunks @Endline? { chunks }")
  Rules[:_Inline] = rule_info("Inline", "(Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol)")
  Rules[:_Space] = rule_info("Space", "@Spacechar+ { \" \" }")
  Rules[:_Str] = rule_info("Str", "@StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a }")
  Rules[:_StrChunk] = rule_info("StrChunk", "< (@NormalChar | /_+/ &Alphanumeric)+ > { text }")
  Rules[:_EscapedChar] = rule_info("EscapedChar", "\"\\\\\" !@Newline < /[:\\\\`|*_{}\\[\\]()\#+.!><-]/ > { text }")
  Rules[:_Entity] = rule_info("Entity", "(HexEntity | DecEntity | CharEntity):a { a }")
  Rules[:_Endline] = rule_info("Endline", "(@LineBreak | @TerminalEndline | @NormalEndline)")
  Rules[:_NormalEndline] = rule_info("NormalEndline", "@Sp @Newline !@BlankLine !\">\" !AtxStart !(Line /={1,}|-{1,}/ @Newline) { \"\\n\" }")
  Rules[:_TerminalEndline] = rule_info("TerminalEndline", "@Sp @Newline @Eof")
  Rules[:_LineBreak] = rule_info("LineBreak", "\"  \" @NormalEndline { RDoc::Markup::HardBreak.new gems/gems/rdoc-6.5.1.1/lib/rdoc/class_module.rb000064400000047504150403134140014666 0ustar00ongStar:b { a << b })+ \"*\" { emphasis a.join }")
  Rules[:_EmphUl] = rule_info("EmphUl", "\"_\" !@Whitespace @StartList:a (!\"_\" Inline:b { a << b } | StrongUl:b { a << b })+ \"_\" { emphasis a.join }")
  Rules[:_Strong] = rule_info("Strong", "(StrongStar | StrongUl)")
  Rules[:_StrongStar] = rule_info("StrongStar", "\"**\" !@Whitespace @StartList:a (!\"**\" Inline:b { a << b })+ \"**\" { strong a.join }")
  Rules[:_StrongUl] = rule_info("StrongUl", "\"__\" !@Whitespace @StartList:a (!\"__\" Inline:b { a << b })+ \"__\" { strong a.join }")
  Rules[:_Strike] = rule_info("Strike", "&{ strike? } \"~~\" !@Whitespace @StartList:a (!\"~~\" Inline:b { a << b })+ \"~~\" { strike a.join }")
  Rules[:_Image] = rule_info("Image", "\"!\" (ExplicitLink | ReferenceLink):a { \"rdoc-image:\#{a[/\\[(.*)\\]/, 1]}\" }")
  Rules[:_Link] = rule_info("Link", "(ExplicitLink | ReferenceLink | AutoLink)")
  Rules[:_ReferenceLink] = rule_info("ReferenceLink", "(ReferenceLinkDouble | ReferenceLinkSingle)")
  Rules[:_ReferenceLinkDouble] = rule_info("ReferenceLinkDouble", "Label:content < Spnl > !\"[]\" Label:label { link_to content, label, text }")
  Rules[:_ReferenceLinkSingle] = rule_info("ReferenceLinkSingle", "Label:content < (Spnl \"[]\")? > { link_to content, content, text }")
  Rules[:_ExplicitLink] = rule_info("ExplicitLink", "Label:l \"(\" @Sp Source:s Spnl Title @Sp \")\" { \"{\#{l}}[\#{s}]\" }")
  Rules[:_Source] = rule_info("Source", "(\"<\" < SourceContents > \">\" | < SourceContents >) { text }")
  Rules[:_SourceContents] = rule_info("SourceContents", "((!\"(\" !\")\" !\">\" Nonspacechar)+ | \"(\" SourceContents \")\")*")
  Rules[:_Title] = rule_info("Title", "(TitleSingle | TitleDouble | \"\"):a { a }")
  Rules[:_TitleSingle] = rule_info("TitleSingle", "\"'\" (!(\"'\" @Sp (\")\" | @Newline)) .)* \"'\"")
  Rules[:_TitleDouble] = rule_info("TitleDouble", "\"\\\"\" (!(\"\\\"\" @Sp (\")\" | @Newline)) .)* \"\\\"\"")
  Rules[:_AutoLink] = rule_info("AutoLink", "(AutoLinkUrl | AutoLinkEmail)")
  Rules[:_AutoLinkUrl] = rule_info("AutoLinkUrl", "\"<\" < /[A-Za-z]+/ \"://\" (!@Newline !\">\" .)+ > \">\" { text }")
  Rules[:_AutoLinkEmail] = rule_info("AutoLinkEmail", "\"<\" \"mailto:\"? < /[\\w+.\\/!%~$-]+/i \"@\" (!@Newline !\">\" .)+ > \">\" { \"mailto:\#{text}\" }")
  Rules[:_Reference] = rule_info("Reference", "@NonindentSpace !\"[]\" Label:label \":\" Spnl RefSrc:link RefTitle @BlankLine+ { \# TODO use title               reference label, link               nil             }")
  Rules[:_Label] = rule_info("Label", "\"[\" (!\"^\" &{ notes? } | &. &{ !notes? }) @StartList:a (!\"]\" Inline:l { a << l })* \"]\" { a.join.gsub(/\\s+/, ' ') }")
  Rules[:_RefSrc] = rule_info("RefSrc", "< Nonspacechar+ > { text }")
  Rules[:_RefTitle] = rule_info("RefTitle", "(RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle)")
  Rules[:_EmptyTitle] = rule_info("EmptyTitle", "\"\"")
  Rules[:_RefTitleSingle] = rule_info("RefTitleSingle", "Spnl \"'\" < (!(\"'\" @Sp @Newline | @Newline) .)* > \"'\" { text }")
  Rules[:_RefTitleDouble] = rule_info("RefTitleDouble", "Spnl \"\\\"\" < (!(\"\\\"\" @Sp @Newline | @Newline) .)* > \"\\\"\" { text }")
  Rules[:_RefTitleParens] = rule_info("RefTitleParens", "Spnl \"(\" < (!(\")\" @Sp @Newline | @Newline) .)* > \")\" { text }")
  Rules[:_References] = rule_info("References", "(Reference | SkipBlock)*")
  Rules[:_Ticks1] = rule_info("Ticks1", "\"`\" !\"`\"")
  Rules[:_Ticks2] = rule_info("Ticks2", "\"``\" !\"`\"")
  Rules[:_Ticks3] = rule_info("Ticks3", "\"```\" !\"`\"")
  Rules[:_Ticks4] = rule_info("Ticks4", "\"````\" !\"`\"")
  Rules[:_Ticks5] = rule_info("Ticks5", "\"`````\" !\"`\"")
  Rules[:_Code] = rule_info("Code", "(Ticks1 @Sp < ((!\"`\" Nonspacechar)+ | !Ticks1 /`+/ | !(@Sp Ticks1) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks1 | Ticks2 @Sp < ((!\"`\" Nonspacechar)+ | !Ticks2 /`+/ | !(@Sp Ticks2) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks2 | Ticks3 @Sp < ((!\"`\" Nonspacechar)+ | !Ticks3 /`+/ | !(@Sp Ticks3) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks3 | Ticks4 @Sp < ((!\"`\" Nonspacechar)+ | !Ticks4 /`+/ | !(@Sp Ticks4) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks4 | Ticks5 @Sp < ((!\"`\" Nonspacechar)+ | !Ticks5 /`+/ | !(@Sp Ticks5) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks5) { \"<code>\#{text}</code>\" }")
  Rules[:_RawHtml] = rule_info("RawHtml", "< (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end }")
  Rules[:_BlankLine] = rule_info("BlankLine", "@Sp @Newline { \"\\n\" }")
  Rules[:_Quoted] = rule_info("Quoted", "(\"\\\"\" (!\"\\\"\" .)* \"\\\"\" | \"'\" (!\"'\" .)* \"'\")")
  Rules[:_HtmlAttribute] = rule_info("HtmlAttribute", "(AlphanumericAscii | \"-\")+ Spnl (\"=\" Spnl (Quoted | (!\">\" Nonspacechar)+))? Spnl")
  Rules[:_HtmlComment] = rule_info("HtmlComment", "\"<!--\" (!\"-->\" .)* \"-->\"")
  Rules[:_HtmlTag] = rule_info("HtmlTag", "\"<\" Spnl \"/\"? AlphanumericAscii+ Spnl HtmlAttribute* \"/\"? Spnl \">\"")
  Rules[:_Eof] = rule_info("Eof", "!.")
  Rules[:_Nonspacechar] = rule_info("Nonspacechar", "!@Spacechar !@Newline .")
  Rules[:_Sp] = rule_info("Sp", "@Spacechar*")
  Rules[:_Spnl] = rule_info("Spnl", "@Sp (@Newline @Sp)?")
  Rules[:_SpecialChar] = rule_info("SpecialChar", "(/[~*_`&\\[\\]()<!\#\\\\'\"]/ | @ExtendedSpecialChar)")
  Rules[:_NormalChar] = rule_info("NormalChar", "!(@SpecialChar | @Spacechar | @Newline) .")
  Rules[:_Digit] = rule_info("Digit", "[0-9]")
  Rules[:_Alphanumeric] = rule_info("Alphanumeric", "%literals.Alphanumeric")
  Rules[:_AlphanumericAscii] = rule_info("AlphanumericAscii", "%literals.AlphanumericAscii")
  Rules[:_BOM] = rule_info("BOM", "%literals.BOM")
  Rules[:_Newline] = rule_info("Newline", "%literals.Newline")
  Rules[:_Spacechar] = rule_info("Spacechar", "%literals.Spacechar")
  Rules[:_HexEntity] = rule_info("HexEntity", "/&\#x/i < /[0-9a-fA-F]+/ > \";\" { [text.to_i(16)].pack 'U' }")
  Rules[:_DecEntity] = rule_info("DecEntity", "\"&\#\" < /[0-9]+/ > \";\" { [text.to_i].pack 'U' }")
  Rules[:_CharEntity] = rule_info("CharEntity", "\"&\" < /[A-Za-z0-9]+/ > \";\" { if entity = HTML_ENTITIES[text] then                  entity.pack 'U*'                else                  \"&\#{text};\"                end              }")
  Rules[:_NonindentSpace] = rule_info("NonindentSpace", "/ {0,3}/")
  Rules[:_Indent] = rule_info("Indent", "/\\t|    /")
  Rules[:_IndentedLine] = rule_info("IndentedLine", "Indent Line")
  Rules[:_OptionallyIndentedLine] = rule_info("OptionallyIndentedLine", "Indent? Line")
  Rules[:_StartList] = rule_info("StartList", "&. { [] }")
  Rules[:_Line] = rule_info("Line", "@RawLine:a { a }")
  Rules[:_RawLine] = rule_info("RawLine", "(< /[^\\r\\n]*/ @Newline > | < .+ > @Eof) { text }")
  Rules[:_SkipBlock] = rule_info("SkipBlock", "(HtmlBlock | (!\"\#\" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine)")
  Rules[:_ExtendedSpecialChar] = rule_info("ExtendedSpecialChar", "&{ notes? } \"^\"")
  Rules[:_NoteReference] = rule_info("NoteReference", "&{ notes? } RawNoteReference:ref { note_for ref }")
  Rules[:_RawNoteReference] = rule_info("RawNoteReference", "\"[^\" < (!@Newline !\"]\" .)+ > \"]\" { text }")
  Rules[:_Note] = rule_info("Note", "&{ notes? } @NonindentSpace RawNoteReference:ref \":\" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a                    nil                 }")
  Rules[:_InlineNote] = rule_info("InlineNote", "&{ notes? } \"^[\" @StartList:a (!\"]\" Inline:l { a << l })+ \"]\" { ref = [:inline, @note_order.length]                @footnotes[ref] = paragraph a                 note_for ref              }")
  Rules[:_Notes] = rule_info("Notes", "(Note | SkipBlock)*")
  Rules[:_RawNoteBlock] = rule_info("RawNoteBlock", "@StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }")
  Rules[:_CodeFence] = rule_info("CodeFence", "&{ github? } Ticks3 (@Sp StrChunk:format)? Spnl < ((!\"`\" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text               verbatim.format = format.gems/gems/rdoc-6.5.1.1/lib/rdoc/token_stream.rb000064400000006240150403134140014677 0ustar00:line) \"|\"? @Newline { line }")
  Rules[:_TableAlign2] = rule_info("TableAlign2", "\"|\" @Sp TableAlign")
  Rules[:_TableAlign] = rule_info("TableAlign", "< /:?-+:?/ > @Sp {                 text.start_with?(\":\") ?                 (text.end_with?(\":\") ? :center : :left) :                 (text.end_with?(\":\") ? :right : nil)               }")
  Rules[:_DefinitionList] = rule_info("DefinitionList", "&{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten }")
  Rules[:_DefinitionListItem] = rule_info("DefinitionListItem", "DefinitionListLabel+:label DefinitionListDefinition+:defns { list_items = []                        list_items <<                          RDoc::Markup::ListItem.new(label, defns.shift)                         list_items.concat defns.map { |defn|                          RDoc::Markup::ListItem.new nil, defn                        } unless list_items.empty?                         list_items                      }")
  Rules[:_DefinitionListLabel] = rule_info("DefinitionListLabel", "StrChunk:label @Sp @Newline { label }")
  Rules[:_DefinitionListDefinition] = rule_info("DefinitionListDefinition", "@NonindentSpace \":\" @Space Inlines:a @BlankLine+ { paragraph a }")
  # :startdoc:
end
gems/gems/rdogems/gems/rdoc-6.5.1.1/lib/rdoc/generator.rb000064400000003513150403134140014172 0ustar00y class can collect tokens by including TokenStream. From the
# outside, you use such an object by calling the start_collecting_tokens
# method, followed by calls to add_token and pop_token.

module RDoc::TokenStream

  ##
  # Converts +token_stream+ to HTML wrapping various tokens with
  # <tt><span></tt> elements. Some tokens types are wrapped in spans
  # with the given class names. Other token types are not wrapped in spans.

  def self.to_html token_stream
    starting_title = false

    token_stream.map do |t|
      next unless t

      style = case t[:kind]
              when :on_const   then 'ruby-constant'
              when :on_kw      then 'ruby-keyword'
              when :on_ivar    then 'ruby-ivar'
              when :on_cvar    then 'ruby-identifier'
              when :on_gvar    then 'ruby-identifier'
              when '=' != t[:text] && :on_op
                               then 'ruby-operator'
              when :on_tlambda then 'ruby-operator'
    gems/gems/rdoc-6.5.1.1/lib/rdoc/top_level.rb000064400000013055150403134140014177 0ustar00][-1]
        text =gems/gems/rdoc-6.5.1.1/lib/rdoc/include.rb000064400000000254150403134140013626 0ustar00end

  ##
  # Starts collecting tokens

  def collect_tokens
    @token_stream = []
  end

  alias start_collecting_tokens collect_tokens

  ##
  # Remove the last token frgems/gems/rdoc-6.5.1.1/lib/rdoc/extend.rb000064400000000252150403134140013470 0ustar00ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown.rb000064400001412356150403134140014040 0ustar00 ##
  # Creates a new TopLevel for the file at +absolute_name+.  If documentation
  # is being generated outside the source dir +relative_name+ is relative to
  # the source directory.

  def initialize absolute_name, relative_name = absolute_name
    super()
    @name = nil
    @absolute_name = absolute_name
    @relative_name = relative_name
    @file_stat     = File.stat(absolute_name) rescue nil # HACK for testing
    @diagram       = nil
    @parser        = nil

    @classes_or_modules = []
  end

  def parser=(val)
    @parser = val
    @store.update_parser_of_file(absolute_name, val) if @store
    @parser
  end

  ##
  # An RDoc::TopLevel is equal to another with the same relative_name

  def == other
    self.class === other and @relative_name == other.relative_name
  end

  alias eql? ==

  ##
  # Adds +an_alias+ to +Object+ instead of +self+.

  def add_alias(an_alias)
    object_class.record_location self
    return an_alias unless @document_self
    object_class.add_alias an_alias
  end

  ##
  # Adds +constant+ to +Object+ instead of +self+.

  def add_constant constant
    object_class.record_location self
    return constant unless @document_self
    object_class.add_constant constant
  end

  ##
  # Adds +include+ to +Object+ instead of +self+.

  def add_include(include)
    object_class.record_location self
    return include unless @document_self
    object_class.add_include include
  end

  ##
  # Adds +method+ to +Object+ instead of +self+.

  def add_method(method)
    object_class.record_location self
    return method unless @document_self
    object_class.add_method method
  end

  ##
  # Adds class or module +mod+. Used in the building phase
  # by the Ruby parser.

  def add_to_classes_or_modules mod
    @classes_or_modules << mod
  end

  ##
  # Base name of this file

  def base_name
    File.basename @relative_name
  end

  alias name base_name

  ##
  # Only a TopLevel that contains text file) will be displayed.  See also
  # RDoc::CodeObject#display?

  def display?
    text? and super
  end

  ##
  # See RDoc::TopLevel::find_class_or_module
  #--
  # TODO Why do we search through all classes/modules found, not just the
  #       ones of this instance?

  def find_class_or_module name
    @store.find_class_or_module name
  end

  ##
  # Finds a class or module named +symbol+

  def find_local_symbol(symbol)
    find_class_or_module(symbol) || super
  end

  ##
  # Finds a module or class with +name+

  def find_module_named(name)
    find_class_or_module(name)
  end

  ##
  # Returns the relative name of this file

  def full_name
    @relative_name
  end

  ##
  # An RDoc::TopLevel has the same hash as another with the same
  # relative_name

  def hash
    @relative_name.hash
  end

  ##
  # URL for this with a +prefix+

  def http_url(prefix)
    path = [prefix, @relative_name.tr('.', '_')]

    File.join(*path.compact) + '.htmlgems/gems/rdoc-6.5.1.1/lib/rdoc/stats/quiet.rb000064400000001500150403134140014463 0ustar00n self
      oc
    end
  end

  ##
  # Base name of this file without the extension

  def page_name
    basename = File.basename @relative_name
    basename =~ /\.(rb|rdoc|txt|md)$/i

    $` || basename
  end

  ##
  # Path to this file for use with HTML generator output.

  def path
    http_url @store.rdoc.generator.file_dir
  end

  def pretty_print q # :nodoc:
    q.group 2, "[#{self.class}: ", "]" do
      q.text "base name: #{base_name.inspect}"
      q.breakable

      items = @modules.map { |n,m| m }
      itegems/gems/rdoc-6.5.1.1/lib/rdoc/generator.rb000064400000003513150403134140014172 0ustar00ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/stats/quiet.rb000064400000001500150403134140014463 0ustar00# frozen_string_literal: true
##
# Stats printer that prints nothing

class RDoc::Stats::Quiet

  ##
  # Creates a new Quiet that will print nothing

  def initialize num_files
    @num_files = num_files
  end

  ##
  # Prints a message at the beginning of parsing

  def begin_adding(*) end

  ##
  # Prints when an alias is added

  def print_alias(*) end

  ##
  # Prints when an attribute is added

  def print_attribute(*) end

  ##
  # Prints when a class is added

  def print_class(*) end

  gems/gems/rdoc-6.5.1.1/lib/rdoc/stats/normal.rb000064400000003060150403134140014627 0ustar00gems/gems/rdoc-6.5.1gems/gems/rdoc-6.5.1.1/lib/rdoc/include.rb000064400000000254150403134140013626 0ustar00oc::CodeObject +co+ being undocumented

  def nodoc co
    " (undocumented)" unless co.documented?
  end

  def print_alias as # :nodoc:
    puts "    alias #{as.new_name} gems/gems/rdoc-6.5.1.1/lib/rdoc/extend.rb000064400000000252150403134140013470 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown.rb000064400001412356150403134140014040 0ustar00e
      # will be truncated if necessary.
      size = IO.respond_to?(:console_size) ? IO.console_size : IO.console.winsize
      terminal_width = size[1].to_i.nonzero? || 80
      max_filename_size = (terminal_width - progress_bar.size) - 1

      if filename.size > max_filename_size then
        # Turn "some_long_filename.rb" to "...ong_filename.rb"
        filename = filename[(filename.size - max_filename_size) .. -1]
        filename[0..2] = "..."
      end

      # Clean the line with whitespaces so that leftover output from the
      # previous line doesn't show up.
      $stdout.print("\r\e[K") if @last_width && @last_width > 0
      @last_width = progress_bar.size + filename.size
      term = "\r"
    else
      term = "\n"
    end
    $stdout.print(progress_bar, filename, term)
    $stdout.flush
  end

  def done_adding # :nodoc:
    puts
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/context/section.rb000064400000011301150403134140015326 0ustar00# frozen_string_literal: true
require 'cgi/util'

##
# A section of documentation like:
#
#   # :section: The title
#   # The body
#
# Sections can be referenced multiple times and will be collapsed into a
# single section.

class RDoc::Context::Section

  include RDoc::Text

  MARSHAL_VERSION = 0 # :nodoc:

  ##
  # Section comment

  attr_reader :comment

  ##
  # Section comments

  attr_reader :comments

  ##
  # Context this Section lives in

  attr_reader :parent

  ##
  # Section title

  attr_reader :title

  ##
  # Creates a new section with +title+ and +comment+

  def initialize parent, title, comment
    @parent = parent
    @title = title ? title.strip : title

    @comments = []

    add_comment comment
  end

  ##
  # Sections are equal when they have the same #title

  def == other
    self.class === other and @title == other.title
  end

  alias eql? ==

  ##
  # Adds +comment+ to this section

  def add_comment comment
    comment = extract_comment comment

    return if comment.empty?

    case comment
    when RDoc::Comment then
      @comments << comment
    when RDoc::Markup::Document then
      @comments.concat comment.parts
    when Array then
      @comments.concat comment
    else
      raise TypeError, "unknown comment type: #{comment.inspect}"
    end
  end

  ##
  # Anchor reference for linking to this section

  def aref
    title = @title || '[untitled]'

    CGI.escape(title).gsub('%', '-').sub(/^-/, '')
  end

  ##
  # Extracts the comment for this section from the original comment block.
  # If the first line contains :section:, strip it and use the rest.
  # Otherwise remove lines up to the line containing :section:, and look
  # for those lines again at the end and remove them. This lets us write
  #
  #   # :section: The title
  #   # The body

  def extract_comment comment
    case comment
    when Array then
      comment.map do |c|
        extract_comment c
      end
    when nil
      RDoc::Comment.new ''
    when RDoc::Comment then
      if comment.text =~ /^#[ \t]*:section:.*\n/ then
        start = $`
        rest = $'

        comment.text = if start.empty? then
                         rest
                       else
                         rest.sub(/#{start.chomp}\Z/, '')
                       end
      end

      comment
    when RDoc::Markup::Document then
      comment
    else
      raise TypeError, "unknown comment #{comment.inspect}"
    end
  end

  def inspect # :nodoc:
    "#<%s:0x%x %p>" % [self.class, object_id, title]
  end

  def hash # :nodoc:
    @title.hash
  end

  ##
  # The files comments in this section come from

  def in_files
    return [] if @comments.empty?

    case @comments
    when Array then
      @comments.map do |comment|
 gems/gems/rdoc-6.5.1.1/lib/rdoc/code_objects.rb000064400000000242150403134140014623 0ustar00ng then
      super
    when Array then
      docs = @comments.map do |comment, location|
        doc = super comment
        doc.file = location if location
    gems/gems/rdoc-6.5.1.1/lib/rdoc/ghost_method.rb000064400000000220150403134140014660 0ustar00omments.parts.delete_if do |document|
        document.file == comment.file.name
      end
    else
      raise RDoc::Error, "BUG: unknown commegems/gems/rdoc-6.5.1.1/lib/rdoc/any_method.rb000064400000020305150403134140014331 0ustar00# frozen_string_literal: true
# This file was used to load all the RDoc::CodeObject subclasses at once.  Now
# autoload handles this.

require_relative '../rdoc'
gems/gems/rdoc-6.5.1.1/lib/rdoc/ghost_method.rb000064400000000220150403134140014660 0ustar00# frozen_string_literal: true
##
# GhostMethod represents a method referenced only by a comment

class RDoc::GhostMethod < RDoc::AnyMethod
end

gems/gems/rdoc-6.5.1.1/lib/rdoc/any_method.rb000064400000020305150403134140014331 0ustar00# frozen_string_literal: true
##
# AnyMethod is the base class for objects representing methods

class RDoc::AnyMethod < RDoc::MethodAttr

  ##
  # 2::
  #   RDoc 4
  #   Added calls_super
  #   Added parent name and class
  #   Added section title
  # 3::
  #   RDoc 4.1
  #   Added is_alias_for

  MARSHAL_VERSION = 3 # :nodoc:

  ##
  # Don't rename \#initialize to \::new

  attr_accessor :dont_rename_initialize

  ##
  # The C function that implements this method (if it was defined in a C file)

  attr_accessor :c_function

  # The section title of the method (if defined in a C file via +:category:+)
  attr_accessor :section_title

  # Parameters for this method

  attr_accessor :params

  ##
  # If true this method uses +super+ to call a superclass version

  attr_accessor :calls_super

  include RDoc::TokenStream

  ##
  # Creates a new AnyMethod with a token stream +text+ and +name+

  def initialize text, name
    super

    @c_function = nil
    @dont_rename_initialize = false
    @token_stream = nil
    @calls_super = false
    @superclass_method = nil
  end

  ##
  # Adds +an_alias+ as an alias for this method in +context+.

  def add_alias an_alias, context = nil
    method = self.class.new an_alias.text, an_alias.new_name

    method.record_location an_alias.file
    method.singleton = self.singleton
    method.params = self.params
    method.visibility = self.visibility
    method.comment = an_alias.comment
    method.is_alias_for = self
    @aliases << method
    context.add_method method if context
    method
  end

  ##
  # Prefix for +aref+ is 'method'.

  def aref_prefix
    'method'
  end

  ##
  # The call_seq or the param_seq with method name, if there is no call_seq.
  #
  # Use this for displaying a method's argument lists.

  def arglists
    if @call_seq then
      @call_seq
    elsif @params then
      "#{name}#{param_seq}"
    end
  end

  ##
  # Different ways to call this method

  def call_seq
    unless call_seq = _call_seq
      call_seq = is_alias_for._call_seq if is_alias_for
    end

    return unless call_seq

    deduplicate_call_seq(call_seq)
  end

  ##
  # Sets the different ways you can call this method.  If an empty +call_seq+
  # is given nil is assumed.
  #
  # See also #param_seq

  def call_seq= call_seq
    return if call_seq.empty?

    @call_seq = call_seq
  end

  ##
  # Loads is_alias_for from the internal name.  Returns nil if the alias
  # cannot be found.

  def is_alias_for # :nodoc:
    case @is_alias_for
    when RDoc::MethodAttr then
      @is_alias_for
    when Array then
      return nil unless @store

      klass_name, singleton, method_name = @is_alias_for

      return nil unless klass = @store.find_class_or_module(klass_name)

      @is_alias_for = klass.find_method method_name, singleton
    end
  end

  ##
  # Dumps this AnyMethod for use by ri.  See also #marshal_load

  def marshal_dump
    aliases = @aliases.map do |a|
      [a.name, parse(a.comment)]
    end

    is_alias_for = [
      @is_alias_for.parent.full_name,
      @is_alias_for.singleton,
      @is_alias_for.name
    ] if @is_alias_for

    [ MARSHAL_VERSION,
      @name,
      full_name,
      @singleton,
      @visibility,
      parse(@comment),
      @call_seq,
      @block_params,
      aliases,
      @params,
      @file.relative_name,
      @calls_super,
      @parent.name,
      @parent.class,
      @section.title,
      is_alias_for,
    ]
  end

  ##
  # Loads this AnyMethod from +array+.  For a loaded AnyMethod the following
  # methods will return cached values:
  #
  # * #full_name
  # * #parent_name

  def marshal_load array
    initialize_visibility

    @dont_rename_initialize = nil
    @token_stream           = nil
    @aliases                = []
    @parent                 = nil
    @parent_name            = nil
    @parent_class           = nil
    @section                = nil
    @file                   = nil

    version        = array[0]
    @name          = array[1]
    @full_name     = array[2]
    @singleton     = array[3]
    @visibility    = array[4]
    @comment       = array[5]
    @call_seq      = array[6]
    @block_params  = array[7]
    #                      8 handled below
    @params        = array[9]
    #                      10 handled below
    @calls_super   = array[11]
    @parent_name   = array[12]
    @parent_title  = array[13]
    @section_title = array[14]
    @is_alias_for  = array[15]

    array[8].each do |new_name, comment|
      add_alias RDoc::Alias.new(nil, @name, new_name, comment, @singleton)
    end

    @parent_name ||= if @full_name =~ /#/ then
                       $`
                     else
                       name = @full_name.split('::')
                       name.pop
                       name.join '::'
                     end

    @file = RDoc::TopLevel.new array[10] if version > 0
  end

  ##
  # Method name
  #
  # If the method has no assigned name, it extracts it from #call_seq.

  def name
    return @name if @name

    @name =
      @call_seq[/^.*?\.(\w+)/, 1] ||
      @call_seq[/^.*?(\w+)/, 1] ||
      @call_seq if @call_seq
  end

  ##
  # A list of this method's method and yield parameters.  +call-seq+ params
  # are preferred over parsed method and block params.

  def param_list
    if @call_seq then
      params = @call_seq.split("\n").last
      params = params.sub(/.*?\((.*)\)/, '\1')
      params = params.sub(/(\{|do)\s*\|([^|]*)\|.*/, ',\2')
    elsif @params then
      params = @params.sub(/\((.*)\)/, '\1')

      params << ",#{@block_params}" if @block_params
    elsif @block_params then
      params = @block_params
    else
      return []
    end

    if @block_params then
      # If this method has explicit block parameters, remove any explicit
      # &block
      params = params.sub(/,?\s*&\w+/, '')
    else
      params = params.sub(/\&(\w+)/, '\1')
    end

    params = params.gsub(/\s+/, '').split(',').reject(&:empty?)

    params.map { |param| param.sub(/=.*/, '') }
  end

  ##
  # Pretty parameter list for this method.  If the method's parameters were
  # given by +call-seq+ it is preferred over the parsed values.

  def param_seq
    if @call_seq then
      params = @call_seq.split("\n").last
      params = params.sub(/[^( ]+/, '')
      params = params.sub(/(\|[^|]+\|)\s*\.\.\.\s*(end|\})/, '\gems/gems/rdoc-6.5.1.1/lib/rdoc/comment.rb000064400000013362150403134140013651 0ustar00    return unless @calls_super
    return @superclass_method if @superclass_method

    parent.each_ancestor do |ancestor|
      if method = ancestor.method_list.find { |m| m.name == @name } then
        @superclass_method = method
        break
      end
    end

    @superclass_method
  end

  protected

  ##
  # call_seq without deduplication and alias lookup.

  def _call_seq
    @call_seq if defined?(@call_seq) && @call_seq
  end

  private

  ##
  # call_seq with alias examples information removed, if this
  # method is an alias method.

  def deduplicate_call_seq(call_seq)
    return call_seq unless is_alias_for || !aliases.empty?

    method_name = self.name
    method_name = method_name[0, 1] if method_name =~ /\A\[/

    entries = call_seq.split "\n"

    ignore = aliases.map(&:name)
    if is_alias_for
      ignore << is_alias_for.name
      ignore.concat is_alias_for.aliases.map(&:name)
    end
    ignore.map! { |n| n =~ /\A\[/ ? /\[.*\]/ : n}
    ignore.delete(method_name)
    ignore = Regexp.union(ignore)

    matching = entries.reject do |entry|
      entry =~ /^\w*\.?#{ignore}[$\(\s]/ or
        entry =~ /\s#{ignore}\s/
    end

    matching.empty? ? nil : matching.join("\n")
  end
end
gems/gems/rdoc-6.5.1.1/lib/rdoc/comment.rb000064400000013362150403134140013651 0ustar00# frozen_string_literal: true
##
# A comment holds the text comment for a RDoc::CodeObject and provides a
# unified way of cleaning it up and parsing it into an RDoc::Markup::Document.
#
# Each comment may have a different markup format set by #format=.  By default
# 'rdoc' is used.  The :markup: directive tells RDoc which format to use.
#
# See RDoc::Markup@Other+directives for instructions on adding an alternate
# format.

class RDoc::Comment

  include RDoc::Text

  ##
  # The format of this comment.  Defaults to RDoc::Markup

  attr_reader :format

  ##
  # The RDoc::TopLevel this comment was found in

  attr_accessor :location

  ##
  # Line where this Comment was written

  attr_accessor :line

  ##
  # For duck-typing when merging classes at load time

  alias file location # :nodoc:

  ##
  # The text for this comment

  attr_reader :text

  ##
  # Alias for text

  alias to_s text

  ##
  # Overrides the content returned by #parse.  Use when there is no #text
  # source for this comment

  attr_writer   :document

  ##
  # Creates a new comment with +text+ that is found in the RDoc::TopLevel
  # +location+.

  def initialize text = nil, location = nil, language = nil
    @location = location
    @text     = text.nil? ? nil : text.dup
    @language = language

    @document   = nil
    @format     = 'rdoc'
    @normalized = false
  end

  ##
  #--
  # TODO deep copy @document

  def initialize_copy copy # :nodoc:
    @text = copy.text.dup
  end

  def == other # :nodoc:
    self.class === other and
      other.text == @text and other.location == @location
  end

  ##
  # Look for a 'call-seq' in the comment to override the normal parameter
  # handling.  The :call-seq: is indented from the baseline.  All lines of the
  # same indentation level and prefix are consumed.
  #
  # For example, all of the following will be used as the :call-seq:
  #
  #   # :call-seq:
  #   #   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

  def extract_call_seq method
    # we must handle situations like the above followed by an unindented first
    # comment.  The difficulty is to make sure not to match lines starting
    # with ARGF at the same indent, but that are after the first description
    # paragraph.
    if @text =~ /^\s*:?call-seq:(.*?(?:\S).*?)^\s*$/m then
      all_start, all_stop = $~.offset(0)
      seq_start, seq_stop = $~.offset(1)

      # we get the following lines that start with the leading word at the
      # same indent, even if they have blank lines before
      if $1 =~ /(^\s*\n)+^(\s*\w+)/m then
        leading = $2 # ' *    ARGF' in the example above
        re = %r%
          \A(
             (^\s*\n)+
             (^#{Regexp.escape leading}.*?\n)+
            )+
          ^\s*$
        %xm

        if @text[seq_stop..-1] =~ re then
          all_stop = seq_stop + $~.offset(0).last
          seq_stop = seq_stop + $~.offset(1).last
        end
      end

      seq = @text[seq_start..seq_stop]
      seq.gsub!(/^\s*(\S|\n)/m, '\1')
      @text.slice! all_start...all_stop

      method.call_seq = seq.chomp

    else
      regexp = /^\s*:?call-seq:(.*?)(^\s*$|\z)/m
      if regexp =~ @text then
        @text = @text.sub(regexp, '')
        seq = $1
        seq.gsub!(/^\s*/, '')
        method.call_seq = seq
      end
    end

    method
  end

  ##
  # A comment is empty if its text String is empty.

  def empty?
    @text.empty?
  end

  ##
  # HACK dubious

  def encode! encoding
    # TODO: Remove this condition after Ruby 2.2 EOL
    if RUBY_VERSION < '2.3.0'
      @text = @text.force_encoding encoding
    else
      @text = String.gems/gems/rdoc-6.5.1.1/lib/rdoc/single_class.rb000064400000001000150403134140014637 0ustar00arsed document is
  # cached until the text is changed.

  def parse
    return @document if @document

    @document = super @text, @format
    @document.file = @location
    @document
  end

  ##
  # Removes private sections from this comment.  Private sections are flush to
  # the comment marker and start with <tt>--</tt> and end with <tt>++</tt>.
  # For C-style comments, a private marker may not start at the opening of the
  # comment.
  #
  #   /*
  #    *--
  #    * private
  #    *++
  #    * publicgems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/entities.rb000064400000154041150403134140015655 0ustar00nt-only comment is not allowed' if
      @text.nil? and @document

    @document = nil
    @text = text.nil? ? nil : text.dup
  end

  ##
  # Returns true if this comment is in TomDoc format.

  def tomdoc?
    @format == 'tomdoc'
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/single_class.rb000064400000001000150403134140014637 0ustar00# frozen_string_literal: true
##
# A singleton class

class RDoc::SingleClass < RDoc::ClassModule

  ##
  # Adds the superclass to the included modules.

  def ancestors
    superclass ? super + [superclass] : super
  end

  def aref_prefix # :nodoc:
    'sclass'
  end

  ##
  # The definition of this singleton class, <tt>class << MyClassName</tt>

  def definition
    "class << #{full_name}"
  end

  def pretty_print q # :nodoc:
    q.group 2, "[class << #{full_name}", "]" do
      next
    end
  end
end

gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/entities.rb000064400000154041150403134140015655 0ustar00# frozen_string_literal: true
##
# HTML entity name map for RDoc::Markdown

RDoc::Markdown::HTML_ENTITIES = {
  "AElig" => [0x000C6],
  "AMP" => [0x00026],
  "Aacute" => [0x000C1],
  "Abreve" => [0x00102],
  "Acirc" => [0x000C2],
  "Acy" => [0x00410],
  "Afr" => [0x1D504],
  "Agrave" => [0x000C0],
  "Alpha" => [0x00391],
  "Amacr" => [0x00100],
  "And" => [0x02A53],
  "Aogon" => [0x00104],
  "Aopf" => [0x1D538],
  "ApplyFunction" => [0x02061],
  "Aring" => [0x000C5],
  "Ascr" => [0x1D49C],
  "Assign" => [0x02254],
  "Atilde" => [0x000C3],
  "Auml" => [0x000C4],
  "Backslash" => [0x02216],
  "Barv" => [0x02AE7],
  "Barwed" => [0x02306],
  "Bcy" => [0x00411],
  "Because" => [0x02235],
  "Bernoullis" => [0x0212C],
  "Beta" => [0x00392],
  "Bfr" => [0x1D505],
  "Bopf" => [0x1D539],
  "Breve" => [0x002D8],
  "Bscr" => [0x0212C],
  "Bumpeq" => [0x0224E],
  "CHcy" => [0x00427],
  "COPY" => [0x000A9],
  "Cacute" => [0x00106],
  "Cap" => [0x022D2],
  "CapitalDifferentialD" => [0x02145],
  "Cayleys" => [0x0212D],
  "Ccaron" => [0x0010C],
  "Ccedil" => [0x000C7],
  "Ccirc" => [0x00108],
  "Cconint" => [0x02230],
  "Cdot" => [0x0010A],
  "Cedilla" => [0x000B8],
  "CenterDot" => [0x000B7],
  "Cfr" => [0x0212D],
  "Chi" => [0x003A7],
  "CircleDot" => [0x02299],
  "CircleMinus" => [0x02296],
  "CirclePlus" => [0x02295],
  "CircleTimes" => [0x02297],
  "ClockwiseContourIntegral" => [0x02232],
  "CloseCurlyDoubleQuote" => [0x0201D],
  "CloseCurlyQuote" => [0x02019],
  "Colon" => [0x02237],
  "Colone" => [0x02A74],
  "Congruent" => [0x02261],
  "Conint" => [0x0222F],
  "ContourIntegral" => [0x0222E],
  "Copf" => [0x02102],
  "Coproduct" => [0x02210],
  "CounterClockwiseContourIntegral" => [0x02233],
  "Cross" => [0x02A2F],
  "Cscr" => [0x1D49E],
  "Cup" => [0x022D3],
  "CupCap" => [0x0224D],
  "DD" => [0x02145],
  "DDotrahd" => [0x02911],
  "DJcy" => [0x00402],
  "DScy" => [0x00405],
  "DZcy" => [0x0040F],
  "Dagger" => [0x02021],
  "Darr" => [0x021A1],
  "Dashv" => [0x02AE4],
  "Dcaron" => [0x0010E],
  "Dcy" => [0x00414],
  "Del" => [0x02207],
  "Delta" => [0x00394],
  "Dfr" => [0x1D507],
  "DiacriticalAcute" => [0x000B4],
  "DiacriticalDot" => [0x002D9],
  "DiacriticalDoubleAcute" => [0x002DD],
  "DiacriticalGrave" => [0x00060],
  "DiacriticalTilde" => [0x002DC],
  "Diamond" => [0x022C4],
  "DifferentialD" => [0x02146],
  "Dopf" => [0x1D53B],
  "Dot" => [0x000A8],
  "DotDot" => [0x020DC],
  "DotEqual" => [0x02250],
  "DoubleContourIntegral" => [0x0222F],
  "DoubleDot" => [0x000A8],
  "DoubleDownArrow" => [0x021D3],
  "DoubleLeftArrow" => [0x021D0],
  "DoubleLeftRightArrow" => [0x021D4],
  "DoubleLeftTee" => [0x02AE4],
  "DoubleLongLeftArrow" => [0x027F8],
  "DoubleLongLeftRightArrow" => [0x027FA],
  "DoubleLongRightArrow" => [0x027F9],
  "DoubleRightArrow" => [0x021D2],
  "DoubleRightTee" => [0x022A8],
  "DoubleUpArrow" => [0x021D1],
  "DoubleUpDownArrow" => [0x021D5],
  "DoubleVerticalBar" => [0x02225],
  "DownArrow" => [0x02193],
  "DownArrowBar" => [0x02913],
  "DownArrowUpArrow" => [0x021F5],
  "DownBreve" => [0x00311],
  "DownLeftRightVector" => [0x02950],
  "DownLeftTeeVector" => [0x0295E],
  "DownLeftVector" => [0x021BD],
  "DownLeftVectorBar" => [0x02956],
  "DownRightTeeVector" => [0x0295F],
  "DownRightVector" => [0x021C1],
  "DownRightVectorBar" => [0x02957],
  "DownTee" => [0x022A4],
  "DownTeeArrow" => [0x021A7],
  "Downarrow" => [0x021D3],
  "Dscr" => [0x1D49F],
  "Dstrok" => [0x00110],
  "ENG" => [0x0014A],
  "ETH" => [0x000D0],
  "Eacute" => [0x000C9],
  "Ecaron" => [0x0011A],
  "Ecirc" => [0x000CA],
  "Ecy" => [0x0042D],
  "Edot" => [0x00116],
  "Efr" => [0x1D508],
  "Egrave" => [0x000C8],
  "Element" => [0x02208],
  "Emacr" => [0x00112],
  "EmptySmallSquare" => [0x025FB],
  "EmptyVerySmallSquare" => [0x025AB],
  "Eogon" => [0x00118],
  "Eopf" => [0x1D53C],
  "Epsilon" => [0x00395],
  "Equal" => [0x02A75],
  "EqualTilde" => [0x02242],
  "Equilibrium" => [0x021CC],
  "Escr" => [0x02130],
  "Esim" => [0x02A73],
  "Eta" => [0x00397],
  "Euml" => [0x000CB],
  "Exists" => [0x02203],
  "ExponentialE" => [0x02147],
  "Fcy" => [0x00424],
  "Ffr" => [0x1D509],
  "FilledSmallSquare" => [0x025FC],
  "FilledVerySmallSquare" => [0x025AA],
  "Fopf" => [0x1D53D],
  "ForAll" => [0x02200],
  "Fouriertrf" => [0x02131],
  "Fscr" => [0x02131],
  "GJcy" => [0x00403],
  "GT" => [0x0003E],
  "Gamma" => [0x00393],
  "Gammad" => [0x003DC],
  "Gbreve" => [0x0011E],
  "Gcedil" => [0x00122],
  "Gcirc" => [0x0011C],
  "Gcy" => [0x00413],
  "Gdot" => [0x00120],
  "Gfr" => [0x1D50A],
  "Gg" => [0x022D9],
  "Gopf" => [0x1D53E],
  "GreaterEqual" => [0x02265],
  "GreaterEqualLess" => [0x022DB],
  "GreaterFullEqual" => [0x02267],
  "GreaterGreater" => [0x02AA2],
  "GreaterLess" => [0x02277],
  "GreaterSlantEqual" => [0x02A7E],
  "GreaterTilde" => [0x02273],
  "Gscr" => [0x1D4A2],
  "Gt" => [0x0226B],
  "HARDcy" => [0x0042A],
  "Hacek" => [0x002C7],
  "Hat" => [0x0005E],
  "Hcirc" => [0x00124],
  "Hfr" => [0x0210C],
  "HilbertSpace" => [0x0210B],
  "Hopf" => [0x0210D],
  "HorizontalLine" => [0x02500],
  "Hscr" => [0x0210B],
  "Hstrok" => [0x00126],
  "HumpDownHump" => [0x0224E],
  "HumpEqual" => [0x0224F],
  "IEcy" => [0x00415],
  "IJlig" => [0x00132],
  "IOcy" => [0x00401],
  "Iacute" => [0x000CD],
  "Icirc" => [0x000CE],
  "Icy" => [0x00418],
  "Idot" => [0x00130],
  "Ifr" => [0x02111],
  "Igrave" => [0x000CC],
  "Im" => [0x02111],
  "Imacr" => [0x0012A],
  "ImaginaryI" => [0x02148],
  "Implies" => [0x021D2],
  "Int" => [0x0222C],
  "Integral" => [0x0222B],
  "Intersection" => [0x022C2],
  "InvisibleComma" => [0x02063],
  "InvisibleTimes" => [0x02062],
  "Iogon" => [0x0012E],
  "Iopf" => [0x1D540],
  "Iota" => [0x00399],
  "Iscr" => [0x02110],
  "Itilde" => [0x00128],
  "Iukcy" => [0x00406],
  "Iuml" => [0x000CF],
  "Jcirc" => [0x00134],
  "Jcy" => [0x00419],
  "Jfr" => [0x1D50D],
  "Jopf" => [0x1D541],
  "Jscr" => [0x1D4A5],
  "Jsercy" => [0x00408],
  "Jukcy" => [0x00404],
  "KHcy" => [0x00425],
  "KJcy" => [0x0040C],
  "Kappa" => [0x0039A],
  "Kcedil" => [0x00136],
  "Kcy" => [0x0041A],
  "Kfr" => [0x1D50E],
  "Kopf" => [0x1D542],
  "Kscr" => [0x1D4A6],
  "LJcy" => [0x00409],
  "LT" => [0x0003C],
  "Lacute" => [0x00139],
  "Lambda" => [0x0039B],
  "Lang" => [0x027EA],
  "Laplacetrf" => [0x02112],
  "Larr" => [0x0219E],
  "Lcaron" => [0x0013D],
  "Lcedil" => [0x0013B],
  "Lcy" => [0x0041B],
  "LeftAngleBracket" => [0x027E8],
  "LeftArrow" => [0x02190],
  "LeftArrowBar" => [0x021E4],
  "LeftArrowRightArrow" => [0x021C6],
  "LeftCeiling" => [0x02308],
  "LeftDoubleBracket" => [0x027E6],
  "LeftDownTeeVector" => [0x02961],
  "LeftDownVector" => [0x021C3],
  "LeftDownVectorBar" => [0x02959],
  "LeftFloor" => [0x0230A],
  "LeftRightArrow" => [0x02194],
  "LeftRightVector" => [0x0294E],
  "LeftTee" => [0x022A3],
  "LeftTeeArrow" => [0x021A4],
  "LeftTeeVector" => [0x0295A],
  "LeftTriangle" => [0x022B2],
  "LeftTriangleBar" => [0x029CF],
  "LeftTriangleEqual" => [0x022B4],
  "LeftUpDownVector" => [0x02951],
  "LeftUpTeeVector" => [0x02960],
  "LeftUpVector" => [0x021BF],
  "LeftUpVectorBar" => [0x02958],
  "LeftVector" => [0x021BC],
  "LeftVectorBar" => [0x02952],
  "Leftarrow" => [0x021D0],
  "Leftrightarrow" => [0x021D4],
  "LessEqualGreater" => [0x022DA],
  "LessFullEqual" => [0x02266],
  "LessGreater" => [0x02276],
  "LessLess" => [0x02AA1],
  "LessSlantEqual" => [0x02A7D],
  "LessTilde" => [0x02272],
  "Lfr" => [0x1D50F],
  "Ll" => [0x022D8],
  "Lleftarrow" => [0x021DA],
  "Lmidot" => [0x0013F],
  "LongLeftArrow" => [0x027F5],
  "LongLeftRightArrow" => [0x027F7],
  "LongRightArrow" => [0x027F6],
  "Longleftarrow" => [0x027F8],
  "Longleftrightarrow" => [0x027FA],
  "Longrightarrow" => [0x027F9],
  "Lopf" => [0x1D543],
  "LowerLeftArrow" => [0x02199],
  "LowerRightArrow" => [0x02198],
  "Lscr" => [0x02112],
  "Lsh" => [0x021B0],
  "Lstrok" => [0x00141],
  "Lt" => [0x0226A],
  "Map" => [0x02905],
  "Mcy" => [0x0041C],
  "MediumSpace" => [0x0205F],
  "Mellintrf" => [0x02133],
  "Mfr" => [0x1D510],
  "MinusPlus" => [0x02213],
  "Mopf" => [0x1D544],
  "Mscr" => [0x02133],
  "Mu" => [0x0039C],
  "NJcy" => [0x0040A],
  "Nacute" => [0x00143],
  "Ncaron" => [0x00147],
  "Ncedil" => [0x00145],
  "Ncy" => [0x0041D],
  "NegativeMediumSpace" => [0x0200B],
  "NegativeThickSpace" => [0x0200B],
  "NegativeThinSpace" => [0x0200B],
  "NegativeVeryThinSpace" => [0x0200B],
  "NestedGreaterGreater" => [0x0226B],
  "NestedLessLess" => [0x0226A],
  "NewLine" => [0x0000A],
  "Nfr" => [0x1D511],
  "NoBreak" => [0x02060],
  "NonBreakingSpace" => [0x000A0],
  "Nopf" => [0x02115],
  "Not" => [0x02AEC],
  "NotCongruent" => [0x02262],
  "NotCupCap" => [0x0226D],
  "NotDoubleVerticalBar" => [0x02226],
  "NotElement" => [0x02209],
  "NotEqual" => [0x02260],
  "NotEqualTilde" => [0x02242, 0x00338],
  "NotExists" => [0x02204],
  "NotGreater" => [0x0226F],
  "NotGreaterEqual" => [0x02271],
  "NotGreaterFullEqual" => [0x02267, 0x00338],
  "NotGreaterGreater" => [0x0226B, 0x00338],
  "NotGreaterLess" => [0x02279],
  "NotGreaterSlantEqual" => [0x02A7E, 0x00338],
  "NotGreaterTilde" => [0x02275],
  "NotHumpDownHump" => [0x0224E, 0x00338],
  "NotHumpEqual" => [0x0224F, 0x00338],
  "NotLeftTriangle" => [0x022EA],
  "NotLeftTriangleBar" => [0x029CF, 0x00338],
  "NotLeftTriangleEqual" => [0x022EC],
  "NotLess" => [0x0226E],
  "NotLessEqual" => [0x02270],
  "NotLessGreater" => [0x02278],
  "NotLessLess" => [0x0226A, 0x00338],
  "NotLessSlantEqual" => [0x02A7D, 0x00338],
  "NotLessTilde" => [0x02274],
  "NotNestedGreaterGreater" => [0x02AA2, 0x00338],
  "NotNestedLessLess" => [0x02AA1, 0x00338],
  "NotPrecedes" => [0x02280],
  "NotPrecedesEqual" => [0x02AAF, 0x00338],
  "NotPrecedesSlantEqual" => [0x022E0],
  "NotReverseElement" => [0x0220C],
  "NotRightTriangle" => [0x022EB],
  "NotRightTriangleBar" => [0x029D0, 0x00338],
  "NotRightTriangleEqual" => [0x022ED],
  "NotSquareSubset" => [0x0228F, 0x00338],
  "NotSquareSubsetEqual" => [0x022E2],
  "NotSquareSuperset" => [0x02290, 0x00338],
  "NotSquareSupersetEqual" => [0x022E3],
  "NotSubset" => [0x02282, 0x020D2],
  "NotSubsetEqual" => [0x02288],
  "NotSucceeds" => [0x02281],
  "NotSucceedsEqual" => [0x02AB0, 0x00338],
  "NotSucceedsSlantEqual" => [0x022E1],
  "NotSucceedsTilde" => [0x0227F, 0x00338],
  "NotSuperset" => [0x02283, 0x020D2],
  "NotSupersetEqual" => [0x02289],
  "NotTilde" => [0x02241],
  "NotTildeEqual" => [0x02244],
  "NotTildeFullEqual" => [0x02247],
  "NotTildeTilde" => [0x02249],
  "NotVerticalBar" => [0x02224],
  "Nscr" => [0x1D4A9],
  "Ntilde" => [0x000D1],
  "Nu" => [0x0039D],
  "OElig" => [0x00152],
  "Oacute" => [0x000D3],
  "Ocirc" => [0x000D4],
  "Ocy" => [0x0041E],
  "Odblac" => [0x00150],
  "Ofr" => [0x1D512],
  "Ograve" => [0x000D2],
  "Omacr" => [0x0014C],
  "Omega" => [0x003A9],
  "Omicron" => [0x0039F],
  "Oopf" => [0x1D546],
  "OpenCurlyDoubleQuote" => [0x0201C],
  "OpenCurlyQuote" => [0x02018],
  "Or" => [0x02A54],
  "Oscr" => [0x1D4AA],
  "Oslash" => [0x000D8],
  "Otilde" => [0x000D5],
  "Otimes" => [0x02A37],
  "Ouml" => [0x000D6],
  "OverBar" => [0x0203E],
  "OverBrace" => [0x023DE],
  "OverBracket" => [0x023B4],
  "OverParenthesis" => [0x023DC],
  "PartialD" => [0x02202],
  "Pcy" => [0x0041F],
  "Pfr" => [0x1D513],
  "Phi" => [0x003A6],
  "Pi" => [0x003A0],
  "PlusMinus" => [0x000B1],
  "Poincareplane" => [0x0210C],
  "Popf" => [0x02119],
  "Pr" => [0x02ABB],
  "Precedes" => [0x0227A],
  "PrecedesEqual" => [0x02AAF],
  "PrecedesSlantEqual" => [0x0227C],
  "PrecedesTilde" => [0x0227E],
  "Prime" => [0x02033],
  "Product" => [0x0220F],
  "Proportion" => [0x02237],
  "Proportional" => [0x0221D],
  "Pscr" => [0x1D4AB],
  "Psi" => [0x003A8],
  "QUOT" => [0x00022],
  "Qfr" => [0x1D514],
  "Qopf" => [0x0211A],
  "Qscr" => [0x1D4AC],
  "RBarr" => [0x02910],
  "REG" => [0x000AE],
  "Racute" => [0x00154],
  "Rang" => [0x027EB],
  "Rarr" => [0x021A0],
  "Rarrtl" => [0x02916],
  "Rcaron" => [0x00158],
  "Rcedil" => [0x00156],
  "Rcy" => [0x00420],
  "Re" => [0x0211C],
  "ReverseElement" => [0x0220B],
  "ReverseEquilibrium" => [0x021CB],
  "ReverseUpEquilibrium" => [0x0296F],
  "Rfr" => [0x0211C],
  "Rho" => [0x003A1],
  "RightAngleBracket" => [0x027E9],
  "RightArrow" => [0x02192],
  "RightArrowBar" => [0x021E5],
  "RightArrowLeftArrow" => [0x021C4],
  "RightCeiling" => [0x02309],
  "RightDoubleBracket" => [0x027E7],
  "RightDownTeeVector" => [0x0295D],
  "RightDownVector" => [0x021C2],
  "RightDownVectorBar" => [0x02955],
  "RightFloor" => [0x0230B],
  "RightTee" => [0x022A2],
  "RightTeeArrow" => [0x021A6],
  "RightTeeVector" => [0x0295B],
  "RightTriangle" => [0x022B3],
  "RightTriangleBar" => [0x029D0],
  "RightTriangleEqual" => [0x022B5],
  "RightUpDownVector" => [0x0294F],
  "RightUpTeeVector" => [0x0295C],
  "RightUpVector" => [0x021BE],
  "RightUpVectorBar" => [0x02954],
  "RightVector" => [0x021C0],
  "RightVectorBar" => [0x02953],
  "Rightarrow" => [0x021D2],
  "Ropf" => [0x0211D],
  "RoundImplies" => [0x02970],
  "Rrightarrow" => [0x021DB],
  "Rscr" => [0x0211B],
  "Rsh" => [0x021B1],
  "RuleDelayed" => [0x029F4],
  "SHCHcy" => [0x00429],
  "SHcy" => [0x00428],
  "SOFTcy" => [0x0042C],
  "Sacute" => [0x0015A],
  "Sc" => [0x02ABC],
  "Scaron" => [0x00160],
  "Scedil" => [0x0015E],
  "Scirc" => [0x0015C],
  "Scy" => [0x00421],
  "Sfr" => [0x1D516],
  "ShortDownArrow" => [0x02193],
  "ShortLeftArrow" => [0x02190],
  "ShortRightArrow" => [0x02192],
  "ShortUpArrow" => [0x02191],
  "Sigma" => [0x003A3],
  "SmallCircle" => [0x02218],
  "Sopf" => [0x1D54A],
  "Sqrt" => [0x0221A],
  "Square" => [0x025A1],
  "SquareIntersection" => [0x02293],
  "SquareSubset" => [0x0228F],
  "SquareSubsetEqual" => [0x02291],
  "SquareSuperset" => [0x02290],
  "SquareSupersetEqual" => [0x02292],
  "SquareUnion" => [0x02294],
  "Sscr" => [0x1D4AE],
  "Star" => [0x022C6],
  "Sub" => [0x022D0],
  "Subset" => [0x022D0],
  "SubsetEqual" => [0x02286],
  "Succeeds" => [0x0227B],
  "SucceedsEqual" => [0x02AB0],
  "SucceedsSlantEqual" => [0x0227D],
  "SucceedsTilde" => [0x0227F],
  "SuchThat" => [0x0220B],
  "Sum" => [0x02211],
  "Sup" => [0x022D1],
  "Superset" => [0x02283],
  "SupersetEqual" => [0x02287],
  "Supset" => [0x022D1],
  "THORN" => [0x000DE],
  "TRADE" => [0x02122],
  "TSHcy" => [0x0040B],
  "TScy" => [0x00426],
  "Tab" => [0x00009],
  "Tau" => [0x003A4],
  "Tcaron" => [0x00164],
  "Tcedil" => [0x00162],
  "Tcy" => [0x00422],
  "Tfr" => [0x1D517],
  "Therefore" => [0x02234],
  "Theta" => [0x00398],
  "ThickSpace" => [0x0205F, 0x0200A],
  "ThinSpace" => [0x02009],
  "Tilde" => [0x0223C],
  "TildeEqual" => [0x02243],
  "TildeFullEqual" => [0x02245],
  "TildeTilde" => [0x02248],
  "Topf" => [0x1D54B],
  "TripleDot" => [0x020DB],
  "Tscr" => [0x1D4AF],
  "Tstrok" => [0x00166],
  "Uacute" => [0x000DA],
  "Uarr" => [0x0219F],
  "Uarrocir" => [0x02949],
  "Ubrcy" => [0x0040E],
  "Ubreve" => [0x0016C],
  "Ucirc" => [0x000DB],
  "Ucy" => [0x00423],
  "Udblac" => [0x00170],
  "Ufr" => [0x1D518],
  "Ugrave" => [0x000D9],
  "Umacr" => [0x0016A],
  "UnderBar" => [0x0005F],
  "UnderBrace" => [0x023DF],
  "UnderBracket" => [0x023B5],
  "UnderParenthesis" => [0x023DD],
  "Union" => [0x022C3],
  "UnionPlus" => [0x0228E],
  "Uogon" => [0x00172],
  "Uopf" => [0x1D54C],
  "UpArrow" => [0x02191],
  "UpArrowBar" => [0x02912],
  "UpArrowDownArrow" => [0x021C5],
  "UpDownArrow" => [0x02195],
  "UpEquilibrium" => [0x0296E],
  "UpTee" => [0x022A5],
  "UpTeeArrow" => [0x021A5],
  "Uparrow" => [0x021D1],
  "Updownarrow" => [0x021D5],
  "UpperLeftArrow" => [0x02196],
  "UpperRightArrow" => [0x02197],
  "Upsi" => [0x003D2],
  "Upsilon" => [0x003A5],
  "Uring" => [0x0016E],
  "Uscr" => [0x1D4B0],
  "Utilde" => [0x00168],
  "Uuml" => [0x000DC],
  "VDash" => [0x022AB],
  "Vbar" => [0x02AEB],
  "Vcy" => [0x00412],
  "Vdash" => [0x022A9],
  "Vdashl" => [0x02AE6],
  "Vee" => [0x022C1],
  "Verbar" => [0x02016],
  "Vert" => [0x02016],
  "VerticalBar" => [0x02223],
  "VerticalLine" => [0x0007C],
  "VerticalSeparator" => [0x02758],
  "VerticalTilde" => [0x02240],
  "VeryThinSpace" => [0x0200A],
  "Vfr" => [0x1D519],
  "Vopf" => [0x1D54D],
  "Vscr" => [0x1D4B1],
  "Vvdash" => [0x022AA],
  "Wcirc" => [0x00174],
  "Wedge" => [0x022C0],
  "Wfr" => [0x1D51A],
  "Wopf" => [0x1D54E],
  "Wscr" => [0x1D4B2],
  "Xfr" => [0x1D51B],
  "Xi" => [0x0039E],
  "Xopf" => [0x1D54F],
  "Xscr" => [0x1D4B3],
  "YAcy" => [0x0042F],
  "YIcy" => [0x00407],
  "YUcy" => [0x0042E],
  "Yacute" => [0x000DD],
  "Ycirc" => [0x00176],
  "Ycy" => [0x0042B],
  "Yfr" => [0x1D51C],
  "Yopf" => [0x1D550],
  "Yscr" => [0x1D4B4],
  "Yuml" => [0x00178],
  "ZHcy" => [0x00416],
  "Zacute" => [0x00179],
  "Zcaron" => [0x0017D],
  "Zcy" => [0x00417],
  "Zdot" => [0x0017B],
  "ZeroWidthSpace" => [0x0200B],
  "Zeta" => [0x00396],
  "Zfr" => [0x02128],
  "Zopf" => [0x02124],
  "Zscr" => [0x1D4B5],
  "aacute" => [0x000E1],
  "abreve" => [0x00103],
  "ac" => [0x0223E],
  "acE" => [0x0223E, 0x00333],
  "acd" => [0x0223F],
  "acirc" => [0x000E2],
  "acute" => [0x000B4],
  "acy" => [0x00430],
  "aelig" => [0x000E6],
  "af" => [0x02061],
  "afr" => [0x1D51E],
  "agrave" => [0x000E0],
  "alefsym" => [0x02135],
  "aleph" => [0x02135],
  "alpha" => [0x003B1],
  "amacr" => [0x00101],
  "amalg" => [0x02A3F],
  "amp" => [0x00026],
  "and" => [0x02227],
  "andand" => [0x02A55],
  "andd" => [0x02A5C],
  "andslope" => [0x02A58],
  "andv" => [0x02A5A],
  "ang" => [0x02220],
  "ange" => [0x029A4],
  "angle" => [0x02220],
  "angmsd" => [0x02221],
  "angmsdaa" => [0x029A8],
  "angmsdab" => [0x029A9],
  "angmsdac" => [0x029AA],
  "angmsdad" => [0x029AB],
  "angmsdae" => [0x029AC],
  "angmsdaf" => [0x029AD],
  "angmsdag" => [0x029AE],
  "angmsdah" => [0x029AF],
  "angrt" => [0x0221F],
  "angrtvb" => [0x022BE],
  "angrtvbd" => [0x0299D],
  "angsph" => [0x02222],
  "angst" => [0x000C5],
  "angzarr" => [0x0237C],
  "aogon" => [0x00105],
  "aopf" => [0x1D552],
  "ap" => [0x02248],
  "apE" => [0x02A70],
  "apacir" => [0x02A6F],
  "ape" => [0x0224A],
  "apid" => [0x0224B],
  "apos" => [0x00027],
  "approx" => [0x02248],
  "approxeq" => [0x0224A],
  "aring" => [0x000E5],
  "ascr" => [0x1D4B6],
  "ast" => [0x0002A],
  "asymp" => [0x02248],
  "asympeq" => [0x0224D],
  "atilde" => [0x000E3],
  "auml" => [0x000E4],
  "awconint" => [0x02233],
  "awint" => [0x02A11],
  "bNot" => [0x02AED],
  "backcong" => [0x0224C],
  "backepsilon" => [0x003F6],
  "backprime" => [0x02035],
  "backsim" => [0x0223D],
  "backsimeq" => [0x022CD],
  "barvee" => [0x022BD],
  "barwed" => [0x02305],
  "barwedge" => [0x02305],
  "bbrk" => [0x023B5],
  "bbrktbrk" => [0x023B6],
  "bcong" => [0x0224C],
  "bcy" => [0x00431],
  "bdquo" => [0x0201E],
  "becaus" => [0x02235],
  "because" => [0x02235],
  "bemptyv" => [0x029B0],
  "bepsi" => [0x003F6],
  "bernou" => [0x0212C],
  "beta" => [0x003B2],
  "beth" => [0x02136],
  "between" => [0x0226C],
  "bfr" => [0x1D51F],
  "bigcap" => [0x022C2],
  "bigcirc" => [0x025EF],
  "bigcup" => [0x022C3],
  "bigodot" => [0x02A00],
  "bigoplus" => [0x02A01],
  "bigotimes" => [0x02A02],
  "bigsqcup" => [0x02A06],
  "bigstar" => [0x02605],
  "bigtriangledown" => [0x025BD],
  "bigtriangleup" => [0x025B3],
  "biguplus" => [0x02A04],
  "bigvee" => [0x022C1],
  "bigwedge" => [0x022C0],
  "bkarow" => [0x0290D],
  "blacklozenge" => [0x029EB],
  "blacksquare" => [0x025AA],
  "blacktriangle" => [0x025B4],
  "blacktriangledown" => [0x025BE],
  "blacktriangleleft" => [0x025C2],
  "blacktriangleright" => [0x025B8],
  "blank" => [0x02423],
  "blk12" => [0x02592],
  "blk14" => [0x02591],
  "blk34" => [0x02593],
  "block" => [0x02588],
  "bne" => [0x0003D, 0x020E5],
  "bnequiv" => [0x02261, 0x020E5],
  "bnot" => [0x02310],
  "bopf" => [0x1D553],
  "bot" => [0x022A5],
  "bottom" => [0x022A5],
  "bowtie" => [0x022C8],
  "boxDL" => [0x02557],
  "boxDR" => [0x02554],
  "boxDl" => [0x02556],
  "boxDr" => [0x02553],
  "boxH" => [0x02550],
  "boxHD" => [0x02566],
  "boxHU" => [0x02569],
  "boxHd" => [0x02564],
  "boxHu" => [0x02567],
  "boxUL" => [0x0255D],
  "boxUR" => [0x0255A],
  "boxUl" => [0x0255C],
  "boxUr" => [0x02559],
  "boxV" => [0x02551],
  "boxVH" => [0x0256C],
  "boxVL" => [0x02563],
  "boxVR" => [0x02560],
  "boxVh" => [0x0256B],
  "boxVl" => [0x02562],
  "boxVr" => [0x0255F],
  "boxbox" => [0x029C9],
  "boxdL" => [0x02555],
  "boxdR" => [0x02552],
  "boxdl" => [0x02510],
  "boxdr" => [0x0250C],
  "boxh" => [0x02500],
  "boxhD" => [0x02565],
  "boxhU" => [0x02568],
  "boxhd" => [0x0252C],
  "boxhu" => [0x02534],
  "boxminus" => [0x0229F],
  "boxplus" => [0x0229E],
  "boxtimes" => [0x022A0],
  "boxuL" => [0x0255B],
  "boxuR" => [0x02558],
  "boxul" => [0x02518],
  "boxur" => [0x02514],
  "boxv" => [0x02502],
  "boxvH" => [0x0256A],
  "boxvL" => [0x02561],
  "boxvR" => [0x0255E],
  "boxvh" => [0x0253C],
  "boxvl" => [0x02524],
  "boxvr" => [0x0251C],
  "bprime" => [0x02035],
  "breve" => [0x002D8],
  "brvbar" => [0x000A6],
  "bscr" => [0x1D4B7],
  "bsemi" => [0x0204F],
  "bsim" => [0x0223D],
  "bsime" => [0x022CD],
  "bsol" => [0x0005C],
  "bsolb" => [0x029C5],
  "bsolhsub" => [0x027C8],
  "bull" => [0x02022],
  "bullet" => [0x02022],
  "bump" => [0x0224E],
  "bumpE" => [0x02AAE],
  "bumpe" => [0x0224F],
  "bumpeq" => [0x0224F],
  "cacute" => [0x00107],
  "cap" => [0x02229],
  "capand" => [0x02A44],
  "capbrcup" => [0x02A49],
  "capcap" => [0x02A4B],
  "capcup" => [0x02A47],
  "capdot" => [0x02A40],
  "caps" => [0x02229, 0x0FE00],
  "caret" => [0x02041],
  "caron" => [0x002C7],
  "ccaps" => [0x02A4D],
  "ccaron" => [0x0010D],
  "ccedil" => [0x000E7],
  "ccirc" => [0x00109],
  "ccups" => [0x02A4C],
  "ccupssm" => [0x02A50],
  "cdot" => [0x0010B],
  "cedil" => [0x000B8],
  "cemptyv" => [0x029B2],
  "cent" => [0x000A2],
  "centerdot" => [0x000B7],
  "cfr" => [0x1D520],
  "chcy" => [0x00447],
  "check" => [0x02713],
  "checkmark" => [0x02713],
  "chi" => [0x003C7],
  "cir" => [0x025CB],
  "cirE" => [0x029C3],
  "circ" => [0x002C6],
  "circeq" => [0x02257],
  "circlearrowleft" => [0x021BA],
  "circlearrowright" => [0x021BB],
  "circledR" => [0x000AE],
  "circledS" => [0x024C8],
  "circledast" => [0x0229B],
  "circledcirc" => [0x0229A],
  "circleddash" => [0x0229D],
  "cire" => [0x02257],
  "cirfnint" => [0x02A10],
  "cirmid" => [0x02AEF],
  "cirscir" => [0x029C2],
  "clubs" => [0x02663],
  "clubsuit" => [0x02663],
  "colon" => [0x0003A],
  "colone" => [0x02254],
  "coloneq" => [0x02254],
  "comma" => [0x0002C],
  "commat" => [0x00040],
  "comp" => [0x02201],
  "compfn" => [0x02218],
  "complement" => [0x02201],
  "complexes" => [0x02102],
  "cong" => [0x02245],
  "congdot" => [0x02A6D],
  "conint" => [0x0222E],
  "copf" => [0x1D554],
  "coprod" => [0x02210],
  "copy" => [0x000A9],
  "copysr" => [0x02117],
  "crarr" => [0x021B5],
  "cross" => [0x02717],
  "cscr" => [0x1D4B8],
  "csub" => [0x02ACF],
  "csube" => [0x02AD1],
  "csup" => [0x02AD0],
  "csupe" => [0x02AD2],
  "ctdot" => [0x022EF],
  "cudarrl" => [0x02938],
  "cudarrr" => [0x02935],
  "cuepr" => [0x022DE],
  "cuesc" => [0x022DF],
  "cularr" => [0x021B6],
  "cularrp" => [0x0293D],
  "cup" => [0x0222A],
  "cupbrcap" => [0x02A48],
  "cupcap" => [0x02A46],
  "cupcup" => [0x02A4A],
  "cupdot" => [0x0228D],
  "cupor" => [0x02A45],
  "cups" => [0x0222A, 0x0FE00],
  "curarr" => [0x021B7],
  "curarrm" => [0x0293C],
  "curlyeqprec" => [0x022DE],
  "curlyeqsucc" => [0x022DF],
  "curlyvee" => [0x022CE],
  "curlywedge" => [0x022CF],
  "curren" => [0x000A4],
  "curvearrowleft" => [0x021B6],
  "curvearrowright" => [0x021B7],
  "cuvee" => [0x022CE],
  "cuwed" => [0x022CF],
  "cwconint" => [0x02232],
  "cwint" => [0x02231],
  "cylcty" => [0x0232D],
  "dArr" => [0x021D3],
  "dHar" => [0x02965],
  "dagger" => [0x02020],
  "daleth" => [0x02138],
  "darr" => [0x02193],
  "dash" => [0x02010],
  "dashv" => [0x022A3],
  "dbkarow" => [0x0290F],
  "dblac" => [0x002DD],
  "dcaron" => [0x0010F],
  "dcy" => [0x00434],
  "dd" => [0x02146],
  "ddagger" => [0x02021],
  "ddarr" => [0x021CA],
  "ddotseq" => [0x02A77],
  "deg" => [0x000B0],
  "delta" => [0x003B4],
  "demptyv" => [0x029B1],
  "dfisht" => [0x0297F],
  "dfr" => [0x1D521],
  "dharl" => [0x021C3],
  "dharr" => [0x021C2],
  "diam" => [0x022C4],
  "diamond" => [0x022C4],
  "diamondsuit" => [0x02666],
  "diams" => [0x02666],
  "die" => [0x000A8],
  "digamma" => [0x003DD],
  "disin" => [0x022F2],
  "div" => [0x000F7],
  "divide" => [0x000F7],
  "divideontimes" => [0x022C7],
  "divonx" => [0x022C7],
  "djcy" => [0x00452],
  "dlcorn" => [0x0231E],
  "dlcrop" => [0x0230D],
  "dollar" => [0x00024],
  "dopf" => [0x1D555],
  "dot" => [0x002D9],
  "doteq" => [0x02250],
  "doteqdot" => [0x02251],
  "dotminus" => [0x02238],
  "dotplus" => [0x02214],
  "dotsquare" => [0x022A1],
  "doublebarwedge" => [0x02306],
  "downarrow" => [0x02193],
  "downdownarrows" => [0x021CA],
  "downharpoonleft" => [0x021C3],
  "downharpoonright" => [0x021C2],
  "drbkarow" => [0x02910],
  "drcorn" => [0x0231F],
  "drcrop" => [0x0230C],
  "dscr" => [0x1D4B9],
  "dscy" => [0x00455],
  "dsol" => [0x029F6],
  "dstrok" => [0x00111],
  "dtdot" => [0x022F1],
  "dtri" => [0x025BF],
  "dtrif" => [0x025BE],
  "duarr" => [0x021F5],
  "duhar" => [0x0296F],
  "dwangle" => [0x029A6],
  "dzcy" => [0x0045F],
  "dzigrarr" => [0x027FF],
  "eDDot" => [0x02A77],
  "eDot" => [0x02251],
  "eacute" => [0x000E9],
  "easter" => [0x02A6E],
  "ecaron" => [0x0011B],
  "ecir" => [0x02256],
  "ecirc" => [0x000EA],
  "ecolon" => [0x02255],
  "ecy" => [0x0044D],
  "edot" => [0x00117],
  "ee" => [0x02147],
  "efDot" => [0x02252],
  "efr" => [0x1D522],
  "eg" => [0x02A9A],
  "egrave" => [0x000E8],
  "egs" => [0x02A96],
  "egsdot" => [0x02A98],
  "el" => [0x02A99],
  "elinters" => [0x023E7],
  "ell" => [0x02113],
  "els" => [0x02A95],
  "elsdot" => [0x02A97],
  "emacr" => [0x00113],
  "empty" => [0x02205],
  "emptyset" => [0x02205],
  "emptyv" => [0x02205],
  "emsp" => [0x02003],
  "emsp13" => [0x02004],
  "emsp14" => [0x02005],
  "eng" => [0x0014B],
  "ensp" => [0x02002],
  "eogon" => [0x00119],
  "eopf" => [0x1D556],
  "epar" => [0x022D5],
  "eparsl" => [0x029E3],
  "eplus" => [0x02A71],
  "epsi" => [0x003B5],
  "epsilon" => [0x003B5],
  "epsiv" => [0x003F5],
  "eqcirc" => [0x02256],
  "eqcolon" => [0x02255],
  "eqsim" => [0x02242],
  "eqslantgtr" => [0x02A96],
  "eqslantless" => [0x02A95],
  "equals" => [0x0003D],
  "equest" => [0x0225F],
  "equiv" => [0x02261],
  "equivDD" => [0x02A78],
  "eqvparsl" => [0x029E5],
  "erDot" => [0x02253],
  "erarr" => [0x02971],
  "escr" => [0x0212F],
  "esdot" => [0x02250],
  "esim" => [0x02242],
  "eta" => [0x003B7],
  "eth" => [0x000F0],
  "euml" => [0x000EB],
  "euro" => [0x020AC],
  "excl" => [0x00021],
  "exist" => [0x02203],
  "expectation" => [0x02130],
  "exponentiale" => [0x02147],
  "fallingdotseq" => [0x02252],
  "fcy" => [0x00444],
  "female" => [0x02640],
  "ffilig" => [0x0FB03],
  "fflig" => [0x0FB00],
  "ffllig" => [0x0FB04],
  "ffr" => [0x1D523],
  "filig" => [0x0FB01],
  "fjlig" => [0x00066, 0x0006A],
  "flat" => [0x0266D],
  "fllig" => [0x0FB02],
  "fltns" => [0x025B1],
  "fnof" => [0x00192],
  "fopf" => [0x1D557],
  "forall" => [0x02200],
  "fork" => [0x022D4],
  "forkv" => [0x02AD9],
  "fpartint" => [0x02A0D],
  "frac12" => [0x000BD],
  "frac13" => [0x02153],
  "frac14" => [0x000BC],
  "frac15" => [0x02155],
  "frac16" => [0x02159],
  "frac18" => [0x0215B],
  "frac23" => [0x02154],
  "frac25" => [0x02156],
  "frac34" => [0x000BE],
  "frac35" => [0x02157],
  "frac38" => [0x0215C],
  "frac45" => [0x02158],
  "frac56" => [0x0215A],
  "frac58" => [0x0215D],
  "frac78" => [0x0215E],
  "frasl" => [0x02044],
  "frown" => [0x02322],
  "fscr" => [0x1D4BB],
  "gE" => [0x02267],
  "gEl" => [0x02A8C],
  "gacute" => [0x001F5],
  "gamma" => [0x003B3],
  "gammad" => [0x003DD],
  "gap" => [0x02A86],
  "gbreve" => [0x0011F],
  "gcirc" => [0x0011D],
  "gcy" => [0x00433],
  "gdot" => [0x00121],
  "ge" => [0x02265],
  "gel" => [0x022DB],
  "geq" => [0x02265],
  "geqq" => [0x02267],
  "geqslant" => [0x02A7E],
  "ges" => [0x02A7E],
  "gescc" => [0x02AA9],
  "gesdot" => [0x02A80],
  "gesdoto" => [0x02A82],
  "gesdotol" => [0x02A84],
  "gesl" => [0x022DB, 0x0FE00],
  "gesles" => [0x02A94],
  "gfr" => [0x1D524],
  "gg" => [0x0226B],
  "ggg" => [0x022D9],
  "gimel" => [0x02137],
  "gjcy" => [0x00453],
  "gl" => [0x02277],
  "glE" => [0x02A92],
  "gla" => [0x02AA5],
  "glj" => [0x02AA4],
  "gnE" => [0x02269],
  "gnap" => [0x02A8A],
  "gnapprox" => [0x02A8A],
  "gne" => [0x02A88],
  "gneq" => [0x02A88],
  "gneqq" => [0x02269],
  "gnsim" => [0x022E7],
  "gopf" => [0x1D558],
  "grave" => [0x00060],
  "gscr" => [0x0210A],
  "gsim" => [0x02273],
  "gsime" => [0x02A8E],
  "gsiml" => [0x02A90],
  "gt" => [0x0003E],
  "gtcc" => [0x02AA7],
  "gtcir" => [0x02A7A],
  "gtdot" => [0x022D7],
  "gtlPar" => [0x02995],
  "gtquest" => [0x02A7C],
  "gtrapprox" => [0x02A86],
  "gtrarr" => [0x02978],
  "gtrdot" => [0x022D7],
  "gtreqless" => [0x022DB],
  "gtreqqless" => [0x02A8C],
  "gtrless" => [0x02277],
  "gtrsim" => [0x02273],
  "gvertneqq" => [0x02269, 0x0FE00],
  "gvnE" => [0x02269, 0x0FE00],
  "hArr" => [0x021D4],
  "hairsp" => [0x0200A],
  "half" => [0x000BD],
  "hamilt" => [0x0210B],
  "hardcy" => [0x0044A],
  "harr" => [0x02194],
  "harrcir" => [0x02948],
  "harrw" => [0x021AD],
  "hbar" => [0x0210F],
  "hcirc" => [0x00125],
  "hearts" => [0x02665],
  "heartsuit" => [0x02665],
  "hellip" => [0x02026],
  "hercon" => [0x022B9],
  "hfr" => [0x1D525],
  "hksearow" => [0x02925],
  "hkswarow" => [0x02926],
  "hoarr" => [0x021FF],
  "homtht" => [0x0223B],
  "hookleftarrow" => [0x021A9],
  "hookrightarrow" => [0x021AA],
  "hopf" => [0x1D559],
  "horbar" => [0x02015],
  "hscr" => [0x1D4BD],
  "hslash" => [0x0210F],
  "hstrok" => [0x00127],
  "hybull" => [0x02043],
  "hyphen" => [0x02010],
  "iacute" => [0x000ED],
  "ic" => [0x02063],
  "icirc" => [0x000EE],
  "icy" => [0x00438],
  "iecy" => [0x00435],
  "iexcl" => [0x000A1],
  "iff" => [0x021D4],
  "ifr" => [0x1D526],
  "igrave" => [0x000EC],
  "ii" => [0x02148],
  "iiiint" => [0x02A0C],
  "iiint" => [0x0222D],
  "iinfin" => [0x029DC],
  "iiota" => [0x02129],
  "ijlig" => [0x00133],
  "imacr" => [0x0012B],
  "image" => [0x02111],
  "imagline" => [0x02110],
  "imagpart" => [0x02111],
  "imath" => [0x00131],
  "imof" => [0x022B7],
  "imped" => [0x001B5],
  "in" => [0x02208],
  "incare" => [0x02105],
  "infin" => [0x0221E],
  "infintie" => [0x029DD],
  "inodot" => [0x00131],
  "int" => [0x0222B],
  "intcal" => [0x022BA],
  "integers" => [0x02124],
  "intercal" => [0x022BA],
  "intlarhk" => [0x02A17],
  "intprod" => [0x02A3C],
  "iocy" => [0x00451],
  "iogon" => [0x0012F],
  "iopf" => [0x1D55A],
  "iota" => [0x003B9],
  "iprod" => [0x02A3C],
  "iquest" => [0x000BF],
  "iscr" => [0x1D4BE],
  "isin" => [0x02208],
  "isinE" => [0x022F9],
  "isindot" => [0x022F5],
  "isins" => [0x022F4],
  "isinsv" => [0x022F3],
  "isinv" => [0x02208],
  "it" => [0x02062],
  "itilde" => [0x00129],
  "iukcy" => [0x00456],
  "iuml" => [0x000EF],
  "jcirc" => [0x00135],
  "jcy" => [0x00439],
  "jfr" => [0x1D527],
  "jmath" => [0x00237],
  "jopf" => [0x1D55B],
  "jscr" => [0x1D4BF],
  "jsercy" => [0x00458],
  "jukcy" => [0x00454],
  "kappa" => [0x003BA],
  "kappav" => [0x003F0],
  "kcedil" => [0x00137],
  "kcy" => [0x0043A],
  "kfr" => [0x1D528],
  "kgreen" => [0x00138],
  "khcy" => [0x00445],
  "kjcy" => [0x0045C],
  "kopf" => [0x1D55C],
  "kscr" => [0x1D4C0],
  "lAarr" => [0x021DA],
  "lArr" => [0x021D0],
  "lAtail" => [0x0291B],
  "lBarr" => [0x0290E],
  "lE" => [0x02266],
  "lEg" => [0x02A8B],
  "lHar" => [0x02962],
  "lacute" => [0x0013A],
  "laemptyv" => [0x029B4],
  "lagran" => [0x02112],
  "lambda" => [0x003BB],
  "lang" => [0x027E8],
  "langd" => [0x02991],
  "langle" => [0x027E8],
  "lap" => [0x02A85],
  "laquo" => [0x000AB],
  "larr" => [0x02190],
  "larrb" => [0x021E4],
  "larrbfs" => [0x0291F],
  "larrfs" => [0x0291D],
  "larrhk" => [0x021A9],
  "larrlp" => [0x021AB],
  "larrpl" => [0x02939],
  "larrsim" => [0x02973],
  "larrtl" => [0x021A2],
  "lat" => [0x02AAB],
  "latail" => [0x02919],
  "late" => [0x02AAD],
  "lates" => [0x02AAD, 0x0FE00],
  "lbarr" => [0x0290C],
  "lbbrk" => [0x02772],
  "lbrace" => [0x0007B],
  "lbrack" => [0x0005B],
  "lbrke" => [0x0298B],
  "lbrksld" => [0x0298F],
  "lbrkslu" => [0x0298D],
  "lcaron" => [0x0013E],
  "lcedil" => [0x0013C],
  "lceil" => [0x02308],
  "lcub" => [0x0007B],
  "lcy" => [0x0043B],
  "ldca" => [0x02936],
  "ldquo" => [0x0201C],
  "ldquor" => [0x0201E],
  "ldrdhar" => [0x02967],
  "ldrushar" => [0x0294B],
  "ldsh" => [0x021B2],
  "le" => [0x02264],
  "leftarrow" => [0x02190],
  "leftarrowtail" => [0x021A2],
  "leftharpoondown" => [0x021BD],
  "leftharpoonup" => [0x021BC],
  "leftleftarrows" => [0x021C7],
  "leftrightarrow" => [0x02194],
  "leftrightarrows" => [0x021C6],
  "leftrightharpoons" => [0x021CB],
  "leftrightsquigarrow" => [0x021AD],
  "leftthreetimes" => [0x022CB],
  "leg" => [0x022DA],
  "leq" => [0x02264],
  "leqq" => [0x02266],
  "leqslant" => [0x02A7D],
  "les" => [0x02A7D],
  "lescc" => [0x02AA8],
  "lesdot" => [0x02A7F],
  "lesdoto" => [0x02A81],
  "lesdotor" => [0x02A83],
  "lesg" => [0x022DA, 0x0FE00],
  "lesges" => [0x02A93],
  "lessapprox" => [0x02A85],
  "lessdot" => [0x022D6],
  "lesseqgtr" => [0x022DA],
  "lesseqqgtr" => [0x02A8B],
  "lessgtr" => [0x02276],
  "lesssim" => [0x02272],
  "lfisht" => [0x0297C],
  "lfloor" => [0x0230A],
  "lfr" => [0x1D529],
  "lg" => [0x02276],
  "lgE" => [0x02A91],
  "lhard" => [0x021BD],
  "lharu" => [0x021BC],
  "lharul" => [0x0296A],
  "lhblk" => [0x02584],
  "ljcy" => [0x00459],
  "ll" => [0x0226A],
  "llarr" => [0x021C7],
  "llcorner" => [0x0231E],
  "llhard" => [0x0296B],
  "lltri" => [0x025FA],
  "lmidot" => [0x00140],
  "lmoust" => [0x023B0],
  "lmoustache" => [0x023B0],
  "lnE" => [0x02268],
  "lnap" => [0x02A89],
  "lnapprox" => [0x02A89],
  "lne" => [0x02A87],
  "lneq" => [0x02A87],
  "lneqq" => [0x02268],
  "lnsim" => [0x022E6],
  "loang" => [0x027EC],
  "loarr" => [0x021FD],
  "lobrk" => [0x027E6],
  "longleftarrow" => [0x027F5],
  "longleftrightarrow" => [0x027F7],
  "longmapsto" => [0x027FC],
  "longrightarrow" => [0x027F6],
  "looparrowleft" => [0x021AB],
  "looparrowright" => [0x021AC],
  "lopar" => [0x02985],
  "lopf" => [0x1D55D],
  "loplus" => [0x02A2D],
  "lotimes" => [0x02A34],
  "lowast" => [0x02217],
  "lowbar" => [0x0005F],
  "loz" => [0x025CA],
  "lozenge" => [0x025CA],
  "lozf" => [0x029EB],
  "lpar" => [0x00028],
  "lparlt" => [0x02993],
  "lrarr" => [0x021C6],
  "lrcorner" => [0x0231F],
  "lrhar" => [0x021CB],
  "lrhard" => [0x0296D],
  "lrm" => [0x0200E],
  "lrtri" => [0x022BF],
  "lsaquo" => [0x02039],
  "lscr" => [0x1D4C1],
  "lsh" => [0x021B0],
  "lsim" => [0x02272],
  "lsime" => [0x02A8D],
  "lsimg" => [0x02A8F],
  "lsqb" => [0x0005B],
  "lsquo" => [0x02018],
  "lsquor" => [0x0201A],
  "lstrok" => [0x00142],
  "lt" => [0x0003C],
  "ltcc" => [0x02AA6],
  "ltcir" => [0x02A79],
  "ltdot" => [0x022D6],
  "lthree" => [0x022CB],
  "ltimes" => [0x022C9],
  "ltlarr" => [0x02976],
  "ltquest" => [0x02A7B],
  "ltrPar" => [0x02996],
  "ltri" => [0x025C3],
  "ltrie" => [0x022B4],
  "ltrif" => [0x025C2],
  "lurdshar" => [0x0294A],
  "luruhar" => [0x02966],
  "lvertneqq" => [0x02268, 0x0FE00],
  "lvnE" => [0x02268, 0x0FE00],
  "mDDot" => [0x0223A],
  "macr" => [0x000AF],
  "male" => [0x02642],
  "malt" => [0x02720],
  "maltese" => [0x02720],
  "map" => [0x021A6],
  "mapsto" => [0x021A6],
  "mapstodown" => [0x021A7],
  "mapstoleft" => [0x021A4],
  "mapstoup" => [0x021A5],
  "marker" => [0x025AE],
  "mcomma" => [0x02A29],
  "mcy" => [0x0043C],
  "mdash" => [0x02014],
  "measuredangle" => [0x02221],
  "mfr" => [0x1D52A],
  "mho" => [0x02127],
  "micro" => [0x000B5],
  "mid" => [0x02223],
  "midast" => [0x0002A],
  "midcir" => [0x02AF0],
  "middot" => [0x000B7],
  "minus" => [0x02212],
  "minusb" => [0x0229F],
  "minusd" => [0x02238],
  "minusdu" => [0x02A2A],
  "mlcp" => [0x02ADB],
  "mldr" => [0x02026],
  "mnplus" => [0x02213],
  "models" => [0x022A7],
  "mopf" => [0x1D55E],
  "mp" => [0x02213],
  "mscr" => [0x1D4C2],
  "mstpos" => [0x0223E],
  "mu" => [0x003BC],
  "multimap" => [0x022B8],
  "mumap" => [0x022B8],
  "nGg" => [0x022D9, 0x00338],
  "nGt" => [0x0226B, 0x020D2],
  "nGtv" => [0x0226B, 0x00338],
  "nLeftarrow" => [0x021CD],
  "nLeftrightarrow" => [0x021CE],
  "nLl" => [0x022D8, 0x00338],
  "nLt" => [0x0226A, 0x020D2],
  "nLtv" => [0x0226A, 0x00338],
  "nRightarrow" => [0x021CF],
  "nVDash" => [0x022AF],
  "nVdash" => [0x022AE],
  "nabla" => [0x02207],
  "nacute" => [0x00144],
  "nang" => [0x02220, 0x020D2],
  "nap" => [0x02249],
  "napE" => [0x02A70, 0x00338],
  "napid" => [0x0224B, 0x00338],
  "napos" => [0x00149],
  "napprox" => [0x02249],
  "natur" => [0x0266E],
  "natural" => [0x0266E],
  "naturals" => [0x02115],
  "nbsp" => [0x000A0],
  "nbump" => [0x0224E, 0x00338],
  "nbumpe" => [0x0224F, 0x00338],
  "ncap" => [0x02A43],
  "ncaron" => [0x00148],
  "ncedil" => [0x00146],
  "ncong" => [0x02247],
  "ncongdot" => [0x02A6D, 0x00338],
  "ncup" => [0x02A42],
  "ncy" => [0x0043D],
  "ndash" => [0x02013],
  "ne" => [0x02260],
  "neArr" => [0x021D7],
  "nearhk" => [0x02924],
  "nearr" => [0x02197],
  "nearrow" => [0x02197],
  "nedot" => [0x02250, 0x00338],
  "nequiv" => [0x02262],
  "nesear" => [0x02928],
  "nesim" => [0x02242, 0x00338],
  "nexist" => [0x02204],
  "nexists" => [0x02204],
  "nfr" => [0x1D52B],
  "ngE" => [0x02267, 0x00338],
  "nge" => [0x02271],
  "ngeq" => [0x02271],
  "ngeqq" => [0x02267, 0x00338],
  "ngeqslant" => [0x02A7E, 0x00338],
  "nges" => [0x02A7E, 0x00338],
  "ngsim" => [0x02275],
  "ngt" => [0x0226F],
  "ngtr" => [0x0226F],
  "nhArr" => [0x021CE],
  "nharr" => [0x021AE],
  "nhpar" => [0x02AF2],
  "ni" => [0x0220B],
  "nis" => [0x022FC],
  "nisd" => [0x022FA],
  "niv" => [0x0220B],
  "njcy" => [0x0045A],
  "nlArr" => [0x021CD],
  "nlE" => [0x02266, 0x00338],
  "nlarr" => [0x0219A],
  "nldr" => [0x02025],
  "nle" => [0x02270],
  "nleftarrow" => [0x0219A],
  "nleftrightarrow" => [0x021AE],
  "nleq" => [0x02270],
  "nleqq" => [0x02266, 0x00338],
  "nleqslant" => [0x02A7D, 0x00338],
  "nles" => [0x02A7D, 0x00338],
  "nless" => [0x0226E],
  "nlsim" => [0x02274],
  "nlt" => [0x0226E],
  "nltri" => [0x022EA],
  "nltrie" => [0x022EC],
  "nmid" => [0x02224],
  "nopf" => [0x1D55F],
  "not" => [0x000AC],
  "notin" => [0x02209],
  "notinE" => [0x022F9, 0x00338],
  "notindot" => [0x022F5, 0x00338],
  "notinva" => [0x02209],
  "notinvb" => [0x022F7],
  "notinvc" => [0x022F6],
  "notni" => [0x0220C],
  "notniva" => [0x0220C],
  "notnivb" => [0x022FE],
  "notnivc" => [0x022FD],
  "npar" => [0x02226],
  "nparallel" => [0x02226],
  "nparsl" => [0x02AFD, 0x020E5],
  "npart" => [0x02202, 0x00338],
  "npolint" => [0x02A14],
  "npr" => [0x02280],
  "nprcue" => [0x022E0],
  "npre" => [0x02AAF, 0x00338],
  "nprec" => [0x02280],
  "npreceq" => [0x02AAF, 0x00338],
  "nrArr" => [0x021CF],
  "nrarr" => [0x0219B],
  "nrarrc" => [0x02933, 0x00338],
  "nrarrw" => [0x0219D, 0x00338],
  "nrightarrow" => [0x0219B],
  "nrtri" => [0x022EB],
  "nrtrie" => [0x022ED],
  "nsc" => [0x02281],
  "nsccue" => [0x022E1],
  "nsce" => [0x02AB0, 0x00338],
  "nscr" => [0x1D4C3],
  "nshortmid" => [0x02224],
  "nshortparallel" => [0x02226],
  "nsim" => [0x02241],
  "nsime" => [0x02244],
  "nsimeq" => [0x02244],
  "nsmid" => [0x02224],
  "nspar" => [0x02226],
  "nsqsube" => [0x022E2],
  "nsqsupe" => [0x022E3],
  "nsub" => [0x02284],
  "nsubE" => [0x02AC5, 0x00338],
  "nsube" => [0x02288],
  "nsubset" => [0x02282, 0x020D2],
  "nsubseteq" => [0x02288],
  "nsubseteqq" => [0x02AC5, 0x00338],
  "nsucc" => [0x02281],
  "nsucceq" => [0x02AB0, 0x00338],
  "nsup" => [0x02285],
  "nsupE" => [0x02AC6, 0x00338],
  "nsupe" => [0x02289],
  "nsupset" => [0x02283, 0x020D2],
  "nsupseteq" => [0x02289],
  "nsupseteqq" => [0x02AC6, 0x00338],
  "ntgl" => [0x02279],
  "ntilde" => [0x000F1],
  "ntlg" => [0x02278],
  "ntriangleleft" => [0x022EA],
  "ntrianglelefteq" => [0x022EC],
  "ntriangleright" => [0x022EB],
  "ntrianglerighteq" => [0x022ED],
  "nu" => [0x003BD],
  "num" => [0x00023],
  "numero" => [0x02116],
  "numsp" => [0x02007],
  "nvDash" => [0x022AD],
  "nvHarr" => [0x02904],
  "nvap" => [0x0224D, 0x020D2],
  "nvdash" => [0x022AC],
  "nvge" => [0x02265, 0x020D2],
  "nvgt" => [0x0003E, 0x020D2],
  "nvinfin" => [0x029DE],
  "nvlArr" => [0x02902],
  "nvle" => [0x02264, 0x020D2],
  "nvlt" => [0x0003C, 0x020D2],
  "nvltrie" => [0x022B4, 0x020D2],
  "nvrArr" => [0x02903],
  "nvrtrie" => [0x022B5, 0x020D2],
  "nvsim" => [0x0223C, 0x020D2],
  "nwArr" => [0x021D6],
  "nwarhk" => [0x02923],
  "nwarr" => [0x02196],
  "nwarrow" => [0x02196],
  "nwnear" => [0x02927],
  "oS" => [0x024C8],
  "oacute" => [0x000F3],
  "oast" => [0x0229B],
  "ocir" => [0x0229A],
  "ocirc" => [0x000F4],
  "ocy" => [0x0043E],
  "odash" => [0x0229D],
  "odblac" => [0x00151],
  "odiv" => [0x02A38],
  "odot" => [0x02299],
  "odsold" => [0x029BC],
  "oelig" => [0x00153],
  "ofcir" => [0x029BF],
  "ofr" => [0x1D52C],
  "ogon" => [0x002DB],
  "ograve" => [0x000F2],
  "ogt" => [0x029C1],
  "ohbar" => [0x029B5],
  "ohm" => [0x003A9],
  "oint" => [0x0222E],
  "olarr" => [0x021BA],
  "olcir" => [0x029BE],
  "olcross" => [0x029BB],
  "oline" => [0x0203E],
  "olt" => [0x029C0],
  "omacr" => [0x0014D],
  "omega" => [0x003C9],
  "omicron" => [0x003BF],
  "omid" => [0x029B6],
  "ominus" => [0x02296],
  "oopf" => [0x1D560],
  "opar" => [0x029B7],
  "operp" => [0x029B9],
  "oplus" => [0x02295],
  "or" => [0x02228],
  "orarr" => [0x021BB],
  "ord" => [0x02A5D],
  "order" => [0x02134],
  "orderof" => [0x02134],
  "ordf" => [0x000AA],
  "ordm" => [0x000BA],
  "origof" => [0x022B6],
  "oror" => [0x02A56],
  "orslope" => [0x02A57],
  "orv" => [0x02A5B],
  "oscr" => [0x02134],
  "oslash" => [0x000F8],
  "osol" => [0x02298],
  "otilde" => [0x000F5],
  "otimes" => [0x02297],
  "otimesas" => [0x02A36],
  "ouml" => [0x000F6],
  "ovbar" => [0x0233D],
  "par" => [0x02225],
  "para" => [0x000B6],
  "parallel" => [0x02225],
  "parsim" => [0x02AF3],
  "parsl" => [0x02AFD],
  "part" => [0x02202],
  "pcy" => [0x0043F],
  "percnt" => [0x00025],
  "period" => [0x0002E],
  "permil" => [0x02030],
  "perp" => [0x022A5],
  "pertenk" => [0x02031],
  "pfr" => [0x1D52D],
  "phi" => [0x003C6],
  "phiv" => [0x003D5],
  "phmmat" => [0x02133],
  "phone" => [0x0260E],
  "pi" => [0x003C0],
  "pitchfork" => [0x022D4],
  "piv" => [0x003D6],
  "planck" => [0x0210F],
  "planckh" => [0x0210E],
  "plankv" => [0x0210F],
  "plus" => [0x0002B],
  "plusacir" => [0x02A23],
  "plusb" => [0x0229E],
  "pluscir" => [0x02A22],
  "plusdo" => [0x02214],
  "plusdu" => [0x02A25],
  "pluse" => [0x02A72],
  "plusmn" => [0x000B1],
  "plussim" => [0x02A26],
  "plustwo" => [0x02A27],
  "pm" => [0x000B1],
  "pointint" => [0x02A15],
  "popf" => [0x1D561],
  "pound" => [0x000A3],
  "pr" => [0x0227A],
  "prE" => [0x02AB3],
  "prap" => [0x02AB7],
  "prcue" => [0x0227C],
  "pre" => [0x02AAF],
  "prec" => [0x0227A],
  "precapprox" => [0x02AB7],
  "preccurlyeq" => [0x0227C],
  "preceq" => [0x02AAF],
  "precnapprox" => [0x02AB9],
  "precneqq" => [0x02AB5],
  "precnsim" => [0x022E8],
  "precsim" => [0x0227E],
  "prime" => [0x02032],
  "primes" => [0x02119],
  "prnE" => [0x02AB5],
  "prnap" => [0x02AB9],
  "prnsim" => [0x022E8],
  "prod" => [0x0220F],
  "profalar" => [0x0232E],
  "profline" => [0x02312],
  "profsurf" => [0x02313],
  "prop" => [0x0221D],
  "propto" => [0x0221D],
  "prsim" => [0x0227E],
  "prurel" => [0x022B0],
  "pscr" => [0x1D4C5],
  "psi" => [0x003C8],
  "puncsp" => [0x02008],
  "qfr" => [0x1D52E],
  "qint" => [0x02A0C],
  "qopf" => [0x1D562],
  "qprime" => [0x02057],
  "qscr" => [0x1D4C6],
  "quaternions" => [0x0210D],
  "quatint" => [0x02A16],
  "quest" => [0x0003F],
  "questeq" => [0x0225F],
  "quot" => [0x00022],
  "rAarr" => [0x021DB],
  "rArr" => [0x021D2],
  "rAtail" => [0x0291C],
  "rBarr" => [0x0290F],
  "rHar" => [0x02964],
  "race" => [0x0223D, 0x00331],
  "racute" => [0x00155],
  "radic" => [0x0221A],
  "raemptyv" => [0x029B3],
  "rang" => [0x027E9],
  "rangd" => [0x02992],
  "range" => [0x029A5],
  "rangle" => [0x027E9],
  "raquo" => [0x000BB],
  "rarr" => [0x02192],
  "rarrap" => [0x02975],
  "rarrb" => [0x021E5],
  "rarrbfs" => [0x02920],
  "rarrc" => [0x02933],
  "rarrfs" => [0x0291E],
  "rarrhk" => [0x021AA],
  "rarrlp" => [0x021AC],
  "rarrpl" => [0x02945],
  "rarrsim" => [0x02974],
  "rarrtl" => [0x021A3],
  "rarrw" => [0x0219D],
  "ratail" => [0x0291A],
  "ratio" => [0x02236],
  "rationals" => [0x0211A],
  "rbarr" => [0x0290D],
  "rbbrk" => [0x02773],
  "rbrace" => [0x0007D],
  "rbrack" => [0x0005D],
  "rbrke" => [0x0298C],
  "rbrksld" => [0x0298E],
  "rbrkslu" => [0x02990],
  "rcaron" => [0x00159],
  "rcedil" => [0x00157],
  "rceil" => [0x02309],
  "rcub" => [0x0007D],
  "rcy" => [0x00440],
  "rdca" => [0x02937],
  "rdldhar" => [0x02969],
  "rdquo" => [0x0201D],
  "rdquor" => [0x0201D],
  "rdsh" => [0x021B3],
  "real" => [0x0211C],
  "realine" => [0x0211B],
  "realpart" => [0x0211C],
  "reals" => [0x0211D],
  "rect" => [0x025AD],
  "reg" => [0x000AE],
  "rfisht" => [0x0297D],
  "rfloor" => [0x0230B],
  "rfr" => [0x1D52F],
  "rhard" => [0x021C1],
  "rharu" => [0x021C0],
  "rharul" => [0x0296C],
  "rho" => [0x003C1],
  "rhov" => [0x003F1],
  "rightarrow" => [0x02192],
  "rightarrowtail" => [0x021A3],
  "rightharpoondown" => [0x021C1],
  "rightharpoonup" => [0x021C0],
  "rightleftarrows" => [0x021C4],
  "rightleftharpoons" => [0x021CC],
  "rightrightarrows" => [0x021C9],
  "rightsquigarrow" => [0x0219D],
  "rightthreetimes" => [0x022CC],
  "ring" => [0x002DA],
  "risingdotseq" => [0x02253],
  "rlarr" => [0x021C4],
  "rlhar" => [0x021CC],
  "rlm" => [0x0200F],
  "rmoust" => [0x023B1],
  "rmoustache" => [0x023B1],
  "rnmid" => [0x02AEE],
  "roang" => [0x027ED],
  "roarr" => [0x021FE],
  "robrk" => [0x027E7],
  "ropar" => [0x02986],
  "ropf" => [0x1D563],
  "roplus" => [0x02A2E],
  "rotimes" => [0x02A35],
  "rpar" => [0x00029],
  "rpargt" => [0x02994],
  "rppolint" => [0x02A12],
  "rrarr" => [0x021C9],
  "rsaquo" => [0x0203A],
  "rscr" => [0x1D4C7],
  "rsh" => [0x021B1],
  "rsqb" => [0x0005D],
  "rsquo" => [0x02019],
  "rsquor" => [0x02019],
  "rthree" => [0x022CC],
  "rtimes" => [0x022CA],
  "rtri" => [0x025B9],
  "rtrie" => [0x022B5],
  "rtrif" => [0x025B8],
  "rtriltri" => [0x029CE],
  "ruluhar" => [0x02968],
  "rx" => [0x0211E],
  "sacute" => [0x0015B],
  "sbquo" => [0x0201A],
  "sc" => [0x0227B],
  "scE" => [0x02AB4],
  "scap" => [0x02AB8],
  "scaron" => [0x00161],
  "sccue" => [0x0227D],
  "sce" => [0x02AB0],
  "scedil" => [0x0015F],
  "scirc" => [0x0015D],
  "scnE" => [0x02AB6],
  "scnap" => [0x02ABA],
  "scnsim" => [0x022E9],
  "scpolint" => [0x02A13],
  "scsim" => [0x0227F],
  "scy" => [0x00441],
  "sdot" => [0x022C5],
  "sdotb" => [0x022A1],
  "sdote" => [0x02A66],
  "seArr" => [0x021D8],
  "searhk" => [0x02925],
  "searr" => [0x02198],
  "searrow" => [0x02198],
  "sect" => [0x000A7],
  "semi" => [0x0003B],
  "seswar" => [0x02929],
  "setminus" => [0x02216],
  "setmn" => [0x02216],
  "sext" => [0x02736],
  "sfr" => [0x1D530],
  "sfrown" => [0x02322],
  "sharp" => [0x0266F],
  "shchcy" => [0x00449],
  "shcy" => [0x00448],
  "shortmid" => [0x02223],
  "shortparallel" => [0x02225],
  "shy" => [0x000AD],
  "sigma" => [0x003C3],
  "sigmaf" => [0x003C2],
  "sigmav" => [0x003C2],
  "sim" => [0x0223C],
  "simdot" => [0x02A6A],
  "sime" => [0x02243],
  "simeq" => [0x02243],
  "simg" => [0x02A9E],
  "simgE" => [0x02AA0],
  "siml" => [0x02A9D],
  "simlE" => [0x02A9F],
  "simne" => [0x02246],
  "simplus" => [0x02A24],
  "simrarr" => [0x02972],
  "slarr" => [0x02190],
  "smallsetminus" => [0x02216],
  "smashp" => [0x02A33],
  "smeparsl" => [0x029E4],
  "smid" => [0x02223],
  "smile" => [0x02323],
  "smt" => [0x02AAA],
  "smte" => [0x02AAC],
  "smtes" => [0x02AAC, 0x0FE00],
  "softcy" => [0x0044C],
  "sol" => [0x0002F],
  "solb" => [0x029C4],
  "solbar" => [0x0233F],
  "sopf" => [0x1D564],
  "spades" => [0x02660],
  "spadesuit" => [0x02660],
  "spar" => [0x02225],
  "sqcap" => [0x02293],
  "sqcaps" => [0x02293, 0x0FE00],
  "sqcup" => [0x02294],
  "sqcups" => [0x02294, 0x0FE00],
  "sqsub" => [0x0228F],
  "sqsube" => [0x02291],
  "sqsubset" => [0x0228F],
  "sqsubseteq" => [0x02291],
  "sqsup" => [0x02290],
  "sqsupe" => [0x02292],
  "sqsupset" => [0x02290],
  "sqsupseteq" => [0x02292],
  "squ" => [0x025A1],
  "square" => [0x025A1],
  "squarf" => [0x025AA],
  "squf" => [0x025AA],
  "srarr" => [0x02192],
  "sscr" => [0x1D4C8],
  "ssetmn" => [0x02216],
  "ssmile" => [0x02323],
  "sstarf" => [0x022C6],
  "star" => [0x02606],
  "starf" => [0x02605],
  "straightepsilon" => [0x003F5],
  "straightphi" => [0x003D5],
  "strns" => [0x000AF],
  "sub" => [0x02282],
  "subE" => [0x02AC5],
  "subdot" => [0x02ABD],
  "sube" => [0x02286],
  "subedot" => [0x02AC3],
  "submult" => [0x02AC1],
  "subnE" => [0x02ACB],
  "subne" => [0x0228A],
  "subplus" => [0x02ABF],
  "subrarr" => [0x02979],
  "subset" => [0x02282],
  "subseteq" => [0x02286],
  "subseteqq" => [0x02AC5],
  "subsetneq" => [0x0228A],
  "subsetneqq" => [0x02ACB],
  "subsim" => [0x02AC7],
  "subsub" => [0x02AD5],
  "subsup" => [0x02AD3],
  "succ" => [0x0227B],
  "succapprox" => [0x02AB8],
  "succcurlyeq" => [0x0227D],
  "succeq" => [0x02AB0],
  "succnapprox" => [0x02ABA],
  "succneqq" => [0x02AB6],
  "succnsim" => [0x022E9],
  "succsim" => [0x0227F],
  "sum" => [0x02211],
  "sung" => [0x0266A],
  "sup" => [0x02283],
  "sup1" => [0x000B9],
  "sup2" => [0x000B2],
  "sup3" => [0x000B3],
  "supE" => [0x02AC6],
  "supdot" => [0x02ABE],
  "supdsub" => [0x02AD8],
  "supe" => [0x02287],
  "supedot" => [0x02AC4],
  "suphsol" => [0x027C9],
  "suphsub" => [0x02AD7],
  "suplarr" => [0x0297B],
  "supmult" => [0x02AC2],
  "supnE" => [0x02ACC],
  "supne" => [0x0228B],
  "supplus" => [0x02AC0],
  "supset" => [0x02283],
  "supseteq" => [0x02287],
  "supseteqq" => [0x02AC6],
  "supsetneq" => [0x0228B],
  "supsetneqq" => [0x02ACC],
  "supsim" => [0x02AC8],
  "supsub" => [0x02AD4],
  "supsup" => [0x02AD6],
  "swArr" => [0x021D9],
  "swarhk" => [0x02926],
  "swarr" => [0x02199],
  "swarrow" => [0x02199],
  "swnwar" => [0x0292A],
  "szlig" => [0x000DF],
  "target" => [0x02316],
  "tau" => [0x003C4],
  "tbrk" => [0x023B4],
  "tcaron" => [0x00165],
  "tcedil" => [0x00163],
  "tcy" => [0x00442],
  "tdot" => [0x020DB],
  "telrec" => [0x02315],
  "tfr" => [0x1D531],
  "there4" => [0x02234],
  "therefore" => [0x02234],
  "theta" => [0x003B8],
  "thetasym" => [0x003D1],
  "thetav" => [0x003D1],
  "thickapprox" => [0x02248],
  "thicksim" => [0x0223C],
  "thinsp" => [0x02009],
  "thkap" => [0x02248],
  "thksim" => [0x0223C],
  "thorn" => [0x000FE],
  "tilde" => [0x002DC],
  "times" => [0x000D7],
  "timesb" => [0x022A0],
  "timesbar" => [0x02A31],
  "timesd" => [0x02A30],
  "tint" => [0x0222D],
  "toea" => [0x02928],
  "top" => [0x022A4],
  "topbot" => [0x02336],
  "topcir" => [0x02AF1],
  "topf" => [0x1D565],
  "topfork" => [0x02ADA],
  "tosa" => [0x02929],
  "tprime" => [0x02034],
  "trade" => [0x02122],
  "triangle" => [0x025B5],
  "triangledown" => [0x025BF],
  "triangleleft" => [0x025C3],
  "trianglelefteq" => [0x022B4],
  "triangleq" => [0x0225C],
  "triangleright" => [0x025B9],
  "trianglerighteq" => [0x022B5],
  "tridot" => [0x025EC],
  "trie" => [0x0225C],
  "triminus" => [0x02A3A],
  "triplus" => [0x02A39],
  "trisb" => [0x029CD],
  "tritime" => [0x02A3B],
  "trpezium" => [0x023E2],
  "tscr" => [0x1D4C9],
  "tscy" => [0x00446],
  "tshcy" => [0x0045B],
  "tstrok" => [0x00167],
  "twixt" => [0x0226C],
  "twoheadleftarrow" => [0x0219E],
  "twoheadrightarrow" => [0x021A0],
  "uArr" => [0x021D1],
  "uHar" => [0x02963],
  "uacute" => [0x000FA],
  "uarr" => [0x02191],
  "ubrcy" => [0x0045E],
  "ubreve" => [0x0016D],
  "ucirc" => [0x000FB],
  "ucy" => [0x00443],
  "udarr" => [0x021C5],
  "udblac" => [0x00171],
  "udhar" => [0x0296E],
  "ufisht" => [0x0297E],
  "ufr" => [0x1D532],
  "ugrave" => [0x000F9],
  "uharl" => [0x021BF],
  "uharr" => [0x021BE],
  "uhblk" => [0x02580],
  "ulcorn" => [0x0231C],
  "ulcorner" => [0x0231C],
  "ulcrop" => [0x0230F],
  "ultri" => [0x025F8],
  "umacr" => [0x0016B],
  "uml" => [0x000A8],
  "uogon" => [0x00173],
  "uopf" => [0x1D566],
  "uparrow" => [0x02191],
  "updownarrow" => [0x02195],
  "upharpoonleft" => [0x021BF],
  "upharpoonright" => [0x021BE],
  "uplus" => [0x0228E],
  "upsi" => [0x003C5],
  "upsih" => [0x003D2],
  "upsilon" => [0x003C5],
  "upuparrows" => [0x021C8],
  "urcorn" => [0x0231D],
  "urcorner" => [0x0231D],
  "urcrop" => [0x0230E],
  "uring" => [0x0016F],
  "urtri" => [0x025F9],
  "uscr" => [0x1D4CA],
  "utdot" => [0x022F0],
  "utilde" => [0x00169],
  "utri" => [0x025B5],
  "utrif" => [0x025B4],
  "uuarr" => [0x021C8],
  "uuml" => [0x000FC],
  "uwangle" => [0x029A7],
  "vArr" => [0x021D5],
  "vBar" => [0x02AE8],
  "vBarv" => [0x02AE9],
  "vDash" => [0x022A8],
  "vangrt" => [0x0299C],
  "varepsilon" => [0x003F5],
  "varkappa" => [0x003F0],
  "varnothing" => [0x02205],
  "varphi" => [0x003D5],
  "varpi" => [0x003D6],
  "varpropto" => [0x0221D],
  "varr" => [0x02195],
  "varrho" => [0x003F1],
  "varsigma" => [0x003C2],
  "varsubsetneq" => [0x0228A, 0x0FE00],
  "varsubsetneqq" => [0x02ACB, 0x0FE00],
  "varsupsetneq" => [0x0228B, 0x0FE00],
  "varsupsetneqq" => [0x02ACC, 0x0Fgems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/literals.rb000064400000024367150403134140015657 0ustar00xdtri" => [0x025BD],
  "xfr" => [0x1D535],
  "xhArr" => [0x027FA],
  "xharr" => [0x027F7],
  "xi" => [0x003BE],
  "xlArr" => [0x027F8],
  "xlarr" => [0x027F5],
  "xmap" => [0x027FC],
  "xnis" => [0x022FB],
  "xodot" => [0x02A00],
  "xopf" => [0x1D569],
  "xoplus" => [0x02A01],
  "xotime" => [0x02A02],
  "xrArr" => [0x027F9],
  "xrarr" => [0x027F6],
  "xscr" => [0x1D4CD],
  "xsqcup" => [0x02A06],
  "xuplus" => [0x02A04],
  "xutri" => [0x025B3],
  "xvee" => [0x022C1],
  "xwedge" => [0x022C0],
  "yacute" => [0x000FD],
  "yacy" => [0x0044F],
  "ycirc" => [0x00177],
  "ycy" => [0x0044B],
  "yen" => [0x000A5],
  "yfr" => [0x1D536],
  "yicy" => [0x00457],
  "yopf" => [0x1D56A],
  "yscr" => [0x1D4CE],
  "yucy" => [0x0044E],
  "yuml" => [0x000FF],
  "zacute" => [0x0017A],
  "zcaron" => [0x0017E],
  "zcy" => [0x00437],
  "zdot" => [0x0017C],
  "zeetrf" => [0x02128],
  "zeta" => [0x003B6],
  "zfr" => [0x1D537],
  "zhcy" => [0x00436],
  "zigrarr" => [0x021DD],
  "zopf" => [0x1D56B],
  "zscr" => [0x1D4CF],
  "zwj" => [0x0200D],
  "zwnj" => [0x0200C],
}

gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/literals.rb000064400000024367150403134140015657 0ustar00# coding: UTF-8
# frozen_string_literal: true
# :markup: markdown

##
#--
# This set of literals is for Ruby 1.9 regular expressions and gives full
# unicode support.
#
# Unlike peg-markdown, this set of literals recognizes Unicode alphanumeric
# characters, newlines and spaces.
class RDoc::Markdown::Literals
  # :stopdoc:

    # This is distinct from setup_parser so that a standalone parser
    # can redefine #initialize and still have access to the proper
    # parser setup code.
    def initialize(str, debug=false)
      setup_parser(str, debug)
    end



    # Prepares for parsing +str+.  If you define a custom initialize you must
    # call this method before #parse
    def setup_parser(str, debug=false)
      set_string str, 0
      @memoizations = Hash.new { |h,k| h[k] = {} }
      @result = nil
      @failed_rule = nil
      @failing_rule_offset = -1
      @line_offsets = nil

      setup_foreign_grammar
    end

    attr_reader :string
    attr_reader :failing_rule_offset
    attr_accessor :result, :pos

    def current_column(target=pos)
      if string[target] == "\n" && (c = string.rindex("\n", target-1) || -1)
        return target - c
      elsif c = string.rindex("\n", target)
        return target - c
      end

      target + 1
    end

    def position_line_offsets
      unless @position_line_offsets
        @position_line_offsets = []
        total = 0
        string.each_line do |line|
          total += line.size
          @position_line_offsets << total
        end
      end
      @position_line_offsets
    end

    if [].respond_to? :bsearch_index
      def current_line(target=pos)
        if line = position_line_offsets.bsearch_index {|x| x > target }
          return line + 1
        end
        raise "Target position #{target} is outside of string"
      end
    else
      def current_line(target=pos)
        if line = position_line_offsets.index {|x| x > target }
          return line + 1
        end

        raise "Target position #{target} is outside of string"
      end
    end

    def current_character(target=pos)
      if target < 0 || target >= string.size
        raise "Target position #{target} is outside of string"
      end
      string[target, 1]
    end

    KpegPosInfo = Struct.new(:pos, :lno, :col, :line, :char)

    def current_pos_info(target=pos)
      l = current_line target
      c = current_column target
      ln = get_line(l-1)
      chr = string[target,1]
      KpegPosInfo.new(target, l, c, ln, chr)
    end

    def lines
      string.lines
    end

    def get_line(no)
      loff = position_line_offsets
      if no < 0
        raise "Line No is out of range: #{no} < 0"
      elsif no >= loff.size
        raise "Line No is out of range: #{no} >= #{loff.size}"
      end
      lend = loff[no]-1
      lstart = no > 0 ? loff[no-1] : 0
      string[lstart..lend]
    end



    def get_text(start)
      @string[start..@pos-1]
    end

    # Sets the string and current parsing position for the parser.
    def set_string string, pos
      @string = string
      @string_size = string ? string.size : 0
      @pos = pos
      @position_line_offsets = nil
    end

    def show_pos
      width = 10
      if @pos < width
        "#{@pos} (\"#{@string[0,@pos]}\" @ \"#{@string[@pos,width]}\")"
      else
        "#{@pos} (\"... #{@string[@pos - width, width]}\" @ \"#{@string[@pos,width]}\")"
      end
    end

    def failure_info
      l = current_line @failing_rule_offset
      c = current_column @failing_rule_offset

      if @failed_rule.kind_of? Symbol
        info = self.class::Rules[@failed_rule]
        "line #{l}, column #{c}: failed rule '#{info.name}' = '#{info.rendered}'"
      else
        "line #{l}, column #{c}: failed rule '#{@failed_rule}'"
      end
    end

    def failure_caret
      p = current_pos_info @failing_rule_offset
      "#{p.line.chomp}\n#{' ' * (p.col - 1)}^"
    end

    def failure_character
      current_character @failing_rule_offset
    end

    def failure_oneline
      p = current_pos_info @failing_rule_offset

      if @failed_rule.kind_of? Symbol
        info = self.class::Rules[@failed_rule]
        "@#{p.lno}:#{p.col} failed rule '#{info.name}', got '#{p.char}'"
      else
        "@#{p.lno}:#{p.col} failed rule '#{@failed_rule}', got '#{p.char}'"
      end
    end

    class ParseError < RuntimeError
    end

    def raise_error
      raise ParseError, failure_oneline
    end

    def show_error(io=STDOUT)
      error_pos = @failing_rule_offset
      p = current_pos_info(error_pos)

      io.puts "On line #{p.lno}, column #{p.col}:"

      if @failed_rule.kind_of? Symbol
        info = self.class::Rules[@failed_rule]
        io.puts "Failed to match '#{info.rendered}' (rule '#{info.name}')"
      else
        io.puts "Failed to match rule '#{@failed_rule}'"
      end

      io.puts "Got: #{p.char.inspect}"
      io.puts "=> #{p.line}"
      io.print(" " * (p.col + 2))
      io.puts "^"
    end

    def set_failed_rule(name)
      if @pos > @failing_rule_offset
        @failed_rule = name
        @failing_rule_offset = @pos
      end
    end

    attr_reader :failed_rule

    def match_string(str)
      len = str.size
      if @string[pos,len] == str
        @pos += len
        return str
      end

      return nil
    end

    def scan(reg)
      if m = reg.match(@string, @pos)
        @pos = m.end(0)
        return true
      end

      return nil
    end

    if "".respond_to? :ord
      def get_byte
        if @pos >= @string_size
          return nil
        end

        s = @string[@pos].ord
        @pos += 1
        s
      end
    else
      def get_byte
        if @pos >= @string_size
          return nil
        end

        s = @string[@pos]
        @pos += 1
        s
      end
    end

    def parse(rule=nil)
      # We invoke the rules indirectly via apply
      # instead of by just calling them as methods because
      # if the rules use left recursion, apply needs to
      # manage that.

      if !rule
        apply(:_root)
      else
        method = rule.gsub("-","_hyphen_")
        apply :"_#{method}"
      end
    end

    class MemoEntry
      def initialize(ans, pos)
        @ans = ans
        @pos = pos
        @result = nil
        @set = false
        @left_rec = false
      end

      attr_reader :ans, :pos, :result, :set
      attr_accessor :left_rec

      def move!(ans, pos, result)
        @ans = ans
        @pos = pos
        @result = result
        @set = true
        @left_rec = false
      end
    end

    def external_invoke(other, rule, *args)
      old_pos = @pos
      old_string = @string

      set_string other.string, other.pos

      begin
        if val = __send__(rule, *args)
          other.pos = @pos
          other.result = @result
        else
          other.set_failed_rule "#{self.class}##{rule}"
        end
        val
      ensure
        set_string old_string, old_pos
      end
    end

    def apply_with_args(rule, *args)
      @result = nil
      memo_key = [rule, args]
      if m = @memoizations[memo_key][@pos]
        @pos = m.pos
        if !m.set
          m.left_rec = true
          return nil
        end

        @result = m.result

        return m.ans
      else
        m = MemoEntry.new(nil, @pos)
        @memoizations[memo_key][@pos] = m
        start_pos = @pos

        ans = __send__ rule, *args

        lr = m.left_rec

        m.move! ans, @pos, @result

        # Don't bother trying to grow the left recursion
        # if it's failing straight away (thus there is no seed)
        if ans and lr
          return grow_lr(rule, args, start_pos, m)
        else
          return ans
        end
      end
    end

    def apply(rule)
      @result = nil
      if m = @memoizations[rule][@pos]
        @pos = m.pos
        if !m.set
          m.left_rec = true
          return nil
        end

        @result = m.result

        return m.ans
      else
        m = MemoEntry.new(nil, @pos)
        @memoizations[rule][@pos] = m
        start_pos = @pos

        ans = __send__ rule

        lr = m.left_rec

        m.move! ans, @pos, @result

        # Don't bother trying to grow the left recursion
        # if it's failing straight away (thus there is no seed)
        if ans and lr
          return grow_lr(rule, nil, start_pos, m)
        else
          return ans
        end
      end
    end

    def grow_lr(rule, args, start_pos, m)
      wgems/gems/rdoc-6.5.1.1/lib/rdoc/alias.rb000064400000004175150403134140013302 0ustar00meric unless _tmp
    return _tmp
  end

  # AlphanumericAscii = /[A-Za-z0-9]/
  def _AlphanumericAscii
    _tmp = scan(/\G(?-mix:[A-Za-z0-9])/)
    set_failed_rule :_AlphanumericAscii unless _tmp
    return _tmp
  end

  # BOM = "uFEFF"
  def _BOM
    _tmp = match_string("uFEFF")
    set_failed_rule :_BOM unless _tmp
    return _tmp
  end

  # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/
  def _Newline
    _tmp = scan(/\G(?-mix:\n|\r\n?|\p{Zl}|\p{Zp})/)
    set_failed_rule :_Newline unless _tmp
    return _tmp
  end

  # NonAlphanumeric = /\p{^Word}/
  def _NonAlphanumeric
    _tmp = scan(/\G(?-mix:\p{^Word})/)
    set_failed_rule :_NonAlphanumeric unless _tmp
    return _tmp
  end

  # Spacechar = /\t|\p{Zs}/
  def _Spacechar
    _tmp = scan(/\G(?-mix:\t|\p{Zs})/)
    set_failed_rule :_Spacechar unless _tmp
    return _tmp
  end

  Rules = {}
  Rules[:_Alphanumeric] = rule_info("Alphanumeric", "/\\p{Word}/")
  Rules[:_AlphanumericAscii] = rule_info("AlphanumericAscii", "/[A-Za-z0-9]/")
  Rules[:_BOM] = rule_info("BOM", "\"uFEFF\"")
  Rules[:_Newline] = rule_info("Newline", "/\\n|\\r\\n?|\\p{Zl}|\\p{Zp}/")
  Rules[:_NonAlphanumeric] = rule_info("NonAlphanumeric", "/\\p{^Word}/")
  Rules[:_Spacechar] = rule_info("Spacechar", "/\\t|\\p{Zs}/")
  # :startdoc:
end
gems/gems/rdoc-6.5.1.1/lib/rdoc/alias.rb000064400000004175150403134140013302 0ustar00# frozen_string_literal: true
##
# Represent an alias, which is an old_name/new_name pair associated with a
# particular contgems/gems/rdoc-6.5.1.1/lib/rdoc/meta_method.rb000064400000000201150403134140014461 0ustar00 : 1, other.new_name]
  end

  ##
  # HTML fragment reference for this alias

  def aref
    type = singleton ? 'c' : 'i'
    "#agems/gems/rdoc-6.5.1.1/lib/rdoc/normal_class.rb000064400000004206150403134140014661 0ustar00ame pretty_new_name

  def to_s # :nodoc:
    "alias: #{self.new_name} -> #{self.pretty_old_name} in: #{parent}"
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/meta_method.rb000064400000000201150403134140014461 0ustar00# frozen_string_literal: true
##
# MetaMethod represents a meta-programmed method

class RDoc::MetaMethod < RDoc::AnyMethod
end

gems/gems/rdoc-6.5.1.1/lib/rdoc/normal_class.rb000064400000004206150403134140014661 0ustar00# frozen_string_literal: true
##
# A normal class, neither singleton nor anonymous

class RDoc::NormalClass < RDoc::ClassModule

  ##
gems/gems/rdoc-6.5.1.1/lib/rdoc/rubygems_hook.rb000064400000012325150403134140015062 0ustar00erclass, @includes, @extends, @attributes, @method_list, @aliases
    ]
  end

  def to_s # :nodoc:
    display = "#{self.class.name} #{self.full_name}"
    if superclass
      display += ' < ' + (superclass.is_a?(String) ? superclass : superclass.full_name)
    end
    display += ' -> ' + is_alias_for.to_s if is_alias_for
    display
  end

  def pretty_print q # :nodoc:
    superclass = @superclass ? " < #{@superclass}" : nil

    q.group 2, "[class #{full_name}#{superclass}", "]" do
      q.breakable
      q.text "includes:"
      q.breakable
      q.seplist @includes do |inc| q.pp inc end

      q.breakable
      q.text "constants:"
      q.breakable
      q.seplist @constants do |const| q.pp const end

      q.breakable
      q.text "attributes:"
      q.breakable
      q.seplist @attributes do |attr| q.pp attr end

      q.breakable
      q.text "methods:"
      q.breakable
      q.seplist @method_list do |meth| q.pp meth end

      q.breakable
      q.text "aliases:"
      q.breakable
      q.seplist @aliases do |aliaz| q.pp aliaz end

      q.breakable
      q.text "comment:"
      q.breakable
      q.pp comment
    end
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/rubygems_hook.rb000064400000012325150403134140015062 0ustar00# frozen_string_literal: true
require 'rubygems/user_interaction'
require 'fileutils'
require_relative '../rdoc'

##
# Gem::RDoc provides methods to generate RDoc and ri data for installed gems
# upon gem installation.
#
# This file is automatically required by RubyGems 1.9 and newer.

class RDoc::RubygemsHook

  include Gem::UserInteraction
  extend  Gem::UserInteraction

  @rdoc_version = nil
  @specs = []

  ##
  # Force installation of documentation?

  attr_accessor :force

  ##
  # Generate rdoc?

  attr_accessor :generate_rdoc

  ##
  # Generate ri data?

  attr_accessor :generate_ri

  class << self

    ##
    # Loaded version of RDoc.  Set by ::load_rdoc

    attr_reader :rdoc_version

  end

  ##
  # Post installs hook that generates documentation for each specification in
  # +specs+

  def self.generation_hook installer, specs
    start = Time.now
    types = installer.document

    generate_rdoc = types.include? 'rdoc'
    generate_ri   = types.include? 'ri'

    specs.each do |spec|
      new(spec, generate_rdoc, generate_ri).generate
    end

    return unless generate_rdoc or generate_ri

    duration = (Time.now - start).to_i
    names    = specs.map(&:name).join ', '

    say "Done installing documentation for #{names} after #{duration} seconds"
  end

  ##
  # Loads the RDoc generator

  def self.load_rdoc
    return if @rdoc_version

    require_relative 'rdoc'

    @rdoc_version = Gem::Version.new ::RDoc::VERSION
  end

  ##
  # Creates a new documentation generator for +spec+.  RDoc and ri data
  # generation can be enabled or disabled through +generate_rdoc+ and
  # +generate_ri+ respectively.
  #
  # Only +generate_ri+ is enabled by default.

  def initialize spec, generate_rdoc = false, generate_ri = true
    @doc_dir   = spec.doc_dir
    @force     = false
    @rdoc      = nil
    @spec      = spec

    @generate_rdoc = generate_rdoc
    @generate_ri   = generate_ri

    @rdoc_dir = spec.doc_dir 'rdoc'
    @ri_dir   = spec.doc_dir 'ri'
  end

  ##
  # Removes legacy rdoc arguments from +args+
  #--
  # TODO move to RDoc::Options

  def delete_legacy_args args
    args.delete '--inline-source'
    args.delete '--promiscuous'
    args.delete '-p'
    args.delete '--one-file'
  end

  ##
  # Generates documentation using the named +generator+ ("darkfish" or "ri")
  # and following the given +options+.
  #
  # Documentation will be generated into +destination+

  def document generator, options, destination
    generator_name = generator

    options = options.dup
    options.exclude ||= [] # TODO maybe move to RDoc::Options#finish
    options.setup_generator generator
    options.op_dir = destination
    Dir.chdir @spec.full_gem_path do
      options.finish
    end

    generator = options.generator.new @rdoc.store, options

    @rdoc.options = options
    @rdoc.generator = generator

    say "Installing #{generator_name} documentation for #{@spec.full_name}"

    FileUtils.mkdir_p options.op_dir

    Dir.chdir options.op_dir do
      begin
        @rdoc.class.current = @rdoc
        @rdoc.generator.generate
      ensure
        @rdoc.class.current = nil
      end
    end
  end

  ##
  # Generates RDoc and ri data

  def generate
    return if @spec.default_gem?
    return unless @generate_ri or @genergems/gems/rdoc-6.5.1.1/lib/rdoc/rdoc.rb000064400000033272150403134140013140 0ustar00
    @rdoc.store = store

    say "Parsing documentation for #{@spec.full_name}"

    Dir.chdir @spec.full_gem_path do
      @rdoc.parse_files options.files
    end

    document 'ri',       options, @ri_dir if
      @generate_ri   and (@force or not File.exist? @ri_dir)

    document 'darkfish', options, @rdoc_dir if
      @generate_rdoc and (@force or not File.exist? @rdoc_dir)
  end

  ##
  # #new_rdoc creates a new RDoc instance.  This method is provided only to
  # make testing easier.

  def new_rdoc # :nodoc:
    ::RDoc::RDoc.new
  end

  ##
  # Is rdoc documentation installed?

  def rdoc_installed?
    File.exist? @rdoc_dir
  end

  ##
  # Removes generated RDoc and ri data

  def remove
    base_dir = @spec.base_dir

    raise Gem::FilePermissionError, base_dir unless File.writable? base_dir

    FileUtils.rm_rf @rdoc_dir
    FileUtils.rm_rf @ri_dir
  end

  ##
  # Is ri data installed?

  def ri_installed?
    File.exist? @ri_dir
  end

  ##
  # Prepares the spec for documentation generation

  def setup
    self.class.load_rdoc

    raise Gem::FilePermissionError, @doc_dir if
      File.exist?(@doc_dir) and not File.writable?(@doc_dir)

    FileUtils.mkdir_p @doc_dir unless File.exist? @doc_dir
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/rdoc.rb000064400000033272150403134140013140 0ustar00# frozen_string_literal: true
require_relative '../rdoc'

require 'find'
require 'fileutils'
require 'pathname'
require 'time'

##
# This is the driver for generating RDoc output.  It handles file parsing and
# generation of output.
#
# To use this class to generate RDoc output via the API, the recommended way
# is:
#
#   rdoc = RDoc::RDoc.new
#   options = RDoc::Options.load_options # returns an RDoc::Options instance
#   # set extra options
#   rdoc.document options
#
# You can also generate output like the +rdoc+ executable:
#
#   rdoc = RDoc::RDoc.new
#   rdoc.document argv
#
# Where +argv+ is an array of strings, each corresponding to an argument you'd
# give rdoc on the command line.  See <tt>rdoc --help</tt> for details.

class RDoc::RDoc

  @current = nil

  ##
  # This is the list of supported output generators

  GENERATORS = {}

  ##
  # List of directory names always skipped

  UNCONDITIONALLY_SKIPPED_DIRECTORIES = %w[CVS .svn .git].freeze

  ##
  # List of directory names skipped if test suites should be skipped

  TEST_SUITE_DIRECTORY_NAMES = %w[spec test].freeze


  ##
  # Generator instance used for creating output

  attr_accessor :generator

  ##
  # Hash of files and their last modified times.

  attr_reader :last_modified

  ##
  # RDoc options

  attr_accessor :options

  ##
  # Accessor for statistics.  Available after each call to parse_files

  attr_reader :stats

  ##
  # The current documentation store

  attr_reader :store

  ##
  # Add +klass+ that can generate output after parsing

  def self.add_generator(klass)
    name = klass.name.sub(/^RDoc::Generator::/, '').downcase
    GENERATORS[name] = klass
  end

  ##
  # Active RDoc::RDoc instance

  def self.current
    @current
  end

  ##
  # Sets the active RDoc::RDoc instance

  def self.current= rdoc
    @current = rdoc
  end

  ##
  # Creates a new RDoc::RDoc instance.  Call #document to parse files and
  # generate documentation.

  def initialize
    @current       = nil
    @generator     = nil
    @last_modified = {}
    @old_siginfo   = nil
    @options       = nil
    @stats         = nil
    @store         = nil
  end

  ##
  # Report an error message and exit

  def error(msg)
    raise RDoc::Error, msg
  end

  ##
  # Gathers a set of parseable files from the files and directories listed in
  # +files+.

  def gather_files files
    files = ["."] if files.empty?

    file_list = normalized_file_list files, true, @options.exclude

    file_list = remove_unparseable(file_list)

    if file_list.count {|name, mtime|
         file_list[name] = @last_modified[name] unless mtime
         mtime
       } > 0
      @last_modified.replace file_list
      file_list.keys.sort
    else
      []
    end
  end

  ##
  # Turns RDoc from stdin into HTML

  def handle_pipe
    @html = RDoc::Markup::ToHtml.new @options

    parser = RDoc::Text::MARKUP_FORMAT[@options.markup]

    document = parser.parse $stdin.read

    out = @html.convert document

    $stdout.write out
  end

  ##
  # Installs a siginfo handler that prints the current filename.

  def install_siginfo_handler
    return unless Signal.list.include? 'INFO'

    @old_siginfo = trap 'INFO' do
      puts @current if @current
    end
  end

  ##
  # Create an output dir if it doesn't exist. If it does exist, but doesn't
  # contain the flag file <tt>created.rid</tt> then we refuse to use it, as
  # we may clobber some manually generated documentation

  def setup_output_dir(dir, force)
    flag_file = output_flag_file dir

    last = {}

    if @options.dry_run then
      # do nothing
    elsif File.exist? dir then
      error "#{dir} exists and is not a directory" unless File.directory? dir

      begin
        File.open flag_file do |io|
          unless force then
            Time.parse io.gets

            io.each do |line|
              file, time = line.split "\t", 2
              time = Time.parse(time) rescue next
              last[file] = time
            end
          end
        end
      rescue SystemCallError, TypeError
        error <<-ERROR

Directory #{dir} already exists, but it looks like it isn't an RDoc directory.

Because RDoc doesn't want to risk destroying any of your existing files,
you'll need to specify a different output directory name (using the --op <dir>
option)

        ERROR
      end unless @options.force_output
    else
      FileUtils.mkdir_p dir
      FileUtils.touch flag_file
    end

    last
  end

  ##
  # Sets the current documentation tree to +store+ and sets the store's rdoc
  # driver to this instance.

  def store= store
    @store = store
    @store.rdoc = self
  end

  ##
  # Update the flag file in an output directory.

  def update_output_dir(op_dir, time, last = {})
    return if @options.dry_run or not @options.update_output_dir
    unless ENV['SOURCE_DATE_EPOCH'].nil?
      time = Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime
    end

    File.open output_flag_file(op_dir), "w" do |f|
      f.puts time.rfc2822
      last.each do |n, t|
        f.puts "#{n}\t#{t.rfc2822}"
      end
    end
  end

  ##
  # Return the path name of the flag file in an output directory.

  def output_flag_file(op_dir)
    File.join op_dir, "created.rid"
  end

  ##
  # The .document file contains a list of file and directory name patterns,
  # representing candidates for documentation. It may also contain comments
  # (starting with '#')

  def parse_dot_doc_file in_dir, filename
    # read and strip comments
    patterns = File.read(filename).gsub(/#.*/, '')

    result = {}

    patterns.split(' ').each do |patt|
      candidates = Dir.glob(File.join(in_dir, patt))
      result.update normalized_file_list(candidates, false, @options.exclude)
    end

    result
  end

  ##
  # Given a list of files and directories, create a list of all the Ruby
  # files they contain.
  #
  # If +force_doc+ is true we always add the given files, if false, only
  # add files that we guarantee we can parse.  It is true when looking at
  # files given on the command line, false when recursing through
  # subdirectories.
  #
  # The effect of this is that if you want a file with a non-standard
  # extension parsed, you must name it explicitly.

  def normalized_file_list(relative_files, force_doc = false,
                           exclude_pattern = nil)
    file_list = {}

    relative_files.each do |rel_file_name|
      rel_file_name = rel_file_name.sub(/^\.\//, '')
      next if rel_file_name.end_with? 'created.rid'
      next if exclude_pattern && exclude_pattern =~ rel_file_name
      stat = File.stat rel_file_name rescue next

      case type = stat.ftype
      when "file" then
        mtime = (stat.mtime unless (last_modified = @last_modified[rel_file_name] and
                                    stat.mtime.to_i <= last_modified.to_i))

        if force_doc or RDoc::Parser.can_parse(rel_file_name) then
          file_list[rel_file_name] = mtime
        end
      when "directory" then
        next if UNCONDITIONALLY_SKIPPED_DIRECTORIES.include?(rel_file_name)

        basename = File.basename(rel_file_name)
        next if options.skip_tests && TEST_SUITE_DIRECTORY_NAMES.include?(basename)

        created_rid = File.join rel_file_name, "created.rid"
        next if File.file? created_rid

        dot_doc = File.join rel_file_name, RDoc::DOT_DOC_FILENAME

        if File.file? dot_doc then
          file_list.update(parse_dot_doc_file(rel_file_name, dot_doc))
        else
          file_list.update(list_files_in_directory(rel_file_name))
        end
      else
        warn "rdoc can't parse the #{type} #{rel_file_name}"
      end
    end

    file_list
  end

  ##
  # Return a list of the files to be processed in a directory. We know that
  # this directory doesn't have a .document file, so we're looking for real
  # files. However we may well contain subdirectories which must be tested
  # for .document files.

  def list_files_in_directory dir
    files = Dir.glob File.join(dir, "*")

    normalized_file_list files, false, @options.exclude
  end

  ##
  # Parses +filename+ and returns an RDoc::TopLevel

  def parse_file filename
    encoding = @options.encoding
    filename = filename.encode encoding

    @stats.add_file filename

    return if RDoc::Parser.binary? filename

    content = RDoc::Encoding.read_file filename, encoding

    return unless content

    filename_path = Pathname(filename).expand_path
    begin
      relative_path = filename_path.relative_path_from @options.root
    rescue ArgumentError
      relative_path = filename_path
    end

    if @options.page_dir and
       relative_path.to_s.start_with? @options.page_dir.to_s then
      relative_path =
        relative_path.relative_path_from @options.page_dir
    end

    top_level = @store.add_file filename, relative_name: relative_path.to_s

    parser = RDoc::Parser.for top_level, filename, content, @options, @stats

    return unless parser

    parser.scan

    # restart documentation for the classes & modules found
    top_level.classes_or_modules.each do |cm|
      cm.done_documenting = false
    end

    top_level

  rescue Errno::EACCES => e
    $stderr.puts <<-EOF
Unable to read #{filename}, #{e.message}

Please check the permissions for this file.  Perhaps you do not have access to
it or perhaps the original author's permissions are to restrictive.  If the
this is not your library please report a bug to the author.
    EOF
  rescue => e
    $stderr.puts <<-EOF
Before reporting this, could you check that the file you're documenting
has proper syntax:

  #{Gem.ruby} -c #{filename}

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

\t(#{e.class}) #{e.message}

    EOF

    $stderr.puts e.backtrace.join("\n\t") if $DEBUG_RDOC

    raise e
    nil
  end

  ##
  # Parse each file on the command line, recursively entering directories.

  def parse_files files
    file_list = gather_files files
    @stats = RDoc::Stats.new @store, file_list.length, @options.verbosity

    return [] if file_list.empty?

    original_options = @options.dup
    @stats.begin_adding

    file_info = file_list.map do |filename|
      @current = filename
      parse_file filename
    end.compact

    @stats.done_adding
    @options = original_options

    file_info
  end

  ##
  # Removes file extensions known to be unparseable from +files+ and TAGS
  # files for emacs and vim.

  def remove_unparseable files
    files.reject do |file, *|
      file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
        (file =~ /tags$/i and
         File.open(file, 'rb') { |io|
           io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
         })
    end
  end

  ##
  # Generates documentation or a coverage report depending upon the settings
  # in +options+.
  #
  # +options+ can be either an RDoc::Options instance or an array of strings
  # equivalent to the strings that would be passed on the command line like
  # <tt>%w[-q -o doc -t My\ Doc\ Title]</tt>.  #document will automatically
  # call RDoc::Options#finish if an options instance was given.
  #
  # For a list of options, see either RDoc::Options or <tt>rdoc --help</tt>.
  #
  # By default, output will be stored in a directory called "doc" below the
  # current directory, so make sure you're somewhere writable before invoking.

  def document options
    self.store = RDoc::Store.new

    if RDoc::Options === options then
      @options = options
    else
      @options = RDoc::Options.load_options
      @options.parse options
    end
    @options.finish

    if @options.pipe then
      handle_pipe
      exit
    end

    unless @options.coverage_report then
      @last_modified = setup_output_dir @options.op_dir, @options.force_update
    end

    @store.encoding = @options.encoding
    @store.dry_run  = @options.dry_run
    @store.main     = @options.main_page
    @store.title    = @options.title
    @store.path     = @options.op_dirgems/gems/rdoc-6.5.1.1/lib/rdoc/cross_reference.rb000064400000016113150403134140015353 0ustar00#parse_files) into the
  # output dir using the generator selected
  # by the RDoc options

  def generate
    if @options.dry_run then
      # do nothing
      @generator.generate
    else
      Dir.chdir @options.op_dir do
        unless @options.quiet then
          $stderr.puts "\nGenerating #{@generator.class.name.sub(/^.*::/, '')} format into #{Dir.pwd}..."
        end

        @generator.generate
        update_output_dir '.', @start_time, @last_modified
      end
    end
  end

  ##
  # Removes a siginfo handler and replaces the previous

  def remove_siginfo_handler
    return unless Signal.list.key? 'INFO'

    handler = @old_siginfo || 'DEFAULT'

    trap 'INFO', handler
  end

end

begin
  require 'rubygems'

  rdoc_extensions = Gem.find_files 'rdoc/discover'

  rdoc_extensions.each do |extension|
    begin
      load extension
    rescue => e
      warn "error loading #{extension.inspect}: #{e.message} (#{e.class})"
      warn "\t#{e.backtrace.join "\n\t"}" if $DEBUG
    end
  end
rescue LoadError
end

# require built-in generators after discovery in case they've been replaced
require_relative 'generator/darkfish'
require_relative 'generator/ri'
require_relative 'generator/pot'
gems/gems/rdoc-6.5.1.1/lib/rdoc/cross_reference.rb000064400000016113150403134140015353 0ustar00# frozen_string_literal: true

require_relative 'markup/attribute_manager' # for PROTECT_ATTR

##
# RDoc::CrossReference is a reusable way to create cross references for names.

class RDoc::CrossReference

  ##
  # Regular expression to match class references
  #
  # 1. There can be a '\\' in front of text to suppress the cross-reference
  # 2. There can be a '::' in front of class names to reference from the
  #    top-level namespace.
  # 3. The method can be followed by parenthesis (not recommended)

  CLASS_REGEXP_STR = '\\\\?((?:\:{2})?[A-Z]\w*(?:\:\:\w+)*)'

  ##
  # Regular expression to match a single method argument.

  METHOD_ARG_REGEXP_STR = '[\w.+*/=<>-]+'

  ##
  # Regular expression to match method arguments.

  METHOD_ARGS_REGEXP_STR = /(?:\((?:#{METHOD_ARG_REGEXP_STR}(?:,\s*#{METHOD_ARG_REGEXP_STR})*)?\))?/.source

  ##
  # Regular expression to match method references.
  #
  # See CLASS_REGEXP_STR

  METHOD_REGEXP_STR = /(
    (?!\d)[\w#{RDoc::Markup::AttributeManager::PROTECT_ATTR}]+[!?=]?|
    %|=(?:==?|~)|![=~]|\[\]=?|<(?:<|=>?)?|>[>=]?|[-+!]@?|\*\*?|[\/%\`|&^~]
  )#{METHOD_ARGS_REGEXP_STR}/.source.delete("\n ").freeze

  ##
  # Regular expressions matching text that should potentially have
  # cross-reference links generated are passed to add_regexp_handling. Note
  # that these expressions are meant to pick up text for which cross-references
  # have been suppressed, since the suppression characters are removed by the
  # code that is triggered.

  CROSSREF_REGEXP = /(?:^|[\s()])
                     (
                      (?:
                       # A::B::C.meth
                       #{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR}

                       # A::B::C
                       # The stuff after CLASS_REGEXP_STR is a
                       # nasty hack.  CLASS_REGEXP_STR unfortunately matches
                       # words like dog and cat (these are legal "class"
                       # names in Fortran 95).  When a word is flagged as a
                       # potential cross-reference, limitations in the markup
                       # engine suppress other processing, such as typesetting.
                       # This is particularly noticeable for contractions.
                       # In order that words like "can't" not
                       # be flagged as potential cross-references, only
                       # flag potential class cross-references if the character
                       # after the cross-reference is a space, sentence
                       # punctuation, tag start character, or attribute
                       # marker.
                       | #{CLASS_REGEXP_STR}(?=[@\s).?!,;<\000]|\z)

                       # Stand-alone method (preceded by a #)
                       | \\?\##{METHOD_REGEXP_STR}

                       # Stand-alone method (preceded by ::)
                       | ::#{METHOD_REGEXP_STR}

                       # Things that look like filenames
                       # The key thing is that there must be at least
                       # one special character (period, slash, or
                       # underscore).
                       | (?:\.\.\/)*[-\/\w]+[_\/.][-\w\/.]+

                       # Things that have markup suppressed
                       # Don't process things like '\<' in \<tt>, though.
                       # TODO: including < is a hack, not very satisfying.
                       | \\[^\s<]
                      )

                      # labels for headings
                      (?:@[\w+%-]+(?:\.[\w|%-]+)?)?
                     )/x

  ##
  # Version of CROSSREF_REGEXP used when <tt>--hyperlink-all</tt> is specified.

  ALL_CROSSREF_REGEXP = /
                     (?:^|[\s()])
                     (
                      (?:
                       # A::B::C.meth
                       #{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR}

                       # A::B::C
                       | #{CLASS_REGEXP_STR}(?=[@\s).?!,;<\000]|\z)

                       # Stand-alone method
                       | \\?#{METHOD_REGEXP_STR}

                       # Things that look like filenames
                       | (?:\.\.\/)*[-\/\w]+[_\/.][-\w\/.]+

                       # Things that have markup suppressed
                       | \\[^\s<]
                      )

                      # labels for headings
                      (?:@[\w+%-]+)?
                     )/x

  ##
  # Hash of references that have been looked-up to their replacements

  attr_accessor :seen

  ##
  # Allows cross-references to be created based on the given +context+
  # (RDoc::Context).

  def initialize context
    @context = context
    @store   = context.store

    @seen = {}
  end

  def resolve_method name
    ref = nil

    if /#{CLASS_REGEXP_STR}([.#]|::)#{METHOD_REGEXP_STR}/o =~ name then
      type = $2
      if '.' == type # will find either #method or ::method
        method = $3
      else
        method = "#{type}#{$3}"
      end
      container = @context.find_symbol_module($1)
    elsif /^([.#]|::)#{METHOD_REGEXP_STR}/o =~ name then
      type = $1
      if '.' == type
        method = $2
      else
   gems/gems/rdoc-6.5.1.1/lib/rdoc/normal_module.rb000064400000002672150403134140015046 0ustar00o +name+.
  #
  # If the reference is found and +name+ is not documented +text+ will be
  # returned.  If +name+ is escaped +name+ is returned.  If +name+ is not
  # found +text+ is returned.

  def resolve name, text
    return @seen[name] if @seen.include? name

    ref = case name
          when /^\\(#{CLASS_REGEXP_STR})$/o then
            @context.find_symbol $1
          else
            @context.find_symbol name
          end

    ref = resolve_method name unless ref

    # Try a page name
    ref = @store.page name if not ref and name =~ /^[\w.]+$/

    ref = nil if RDoc::Alias === ref # external alias, can't link to it

    out = if name == '\\' then
            name
          elsif name =~ /^\\/ then
            # we remove the \ only in front of what we know:
            # other backslashes are treated later, only outside of <tt>
            ref ? $' : name
          elsif ref then
            if ref.display? then
              ref
            else
              text
            end
          else
            text
          end

    @seen[name] = out

    out
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/encoding.rb000064400000007376150403134140014005 0ustar00# frozen_string_literal: true
##
# A normal module, like NormalClass

class RDoc::NormalModule < RDoc::ClassModule

  def aref_prefix # :nodoc:
    'module'
  end

  def inspect # :nodoc:
    "#<%s:0x%x module %s includes: %p extends: %p attributes: %p methods: %p aliases: %p>" % [
      self.class, object_id,
      full_name, @includes, @extends, @attributes, @method_list, @aliases
    ]
  end

  ##
  # The definition of this module, <tt>module MyModuleName</tt>

  def definition
    "module #{full_name}"
  end

  ##
  # This is a module, returns true

  def module?
    true
  end

  def pretty_print q # :nodoc:
    q.group 2, "[module #{full_name}:", "]" do
      q.breakable
      q.text "includes:"
      q.breakable
      q.seplist @includes do |inc| q.pp inc end
      q.breakable

      q.breakable
      q.text "constants:"
      q.breakable
      q.seplist @constants do |const| q.pp const end

      q.text "attributes:"
      q.breakable
      q.seplist @attributes do |attr| q.pp attr end
      q.breakable

      q.text "methods:"
      q.breakable
      q.seplist @method_list do |meth| q.pp meth end
      q.breakable

      q.text "aliases:"
      q.breakable
      q.seplist @aliases do |aliaz| q.pp aliaz end
      q.breakable

      q.text "comment:"
      q.breakable
      q.pp comment
    end
  end

  ##
  # Modules don't have one, raises NoMethodError

  def superclass
    raise NoMethodError, "#{full_name} is a module"
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/encoding.rb000064400000007376150403134140014005 0ustar00# coding: US-ASCII
# frozen_string_literal: true

##
# This class is a wrapper around File IO and Encoding that helps RDoc load
# files and convert them to the correct encoding.

module RDoc::Encoding

  HEADER_REGEXP = /^
    (?:
      \A\#!.*\n
      |
      ^\#\s+frozen[-_]string[-_]literal[=:].+\n
      |
      ^\#[^\n]+\b(?:en)?coding[=:]\s*(?<name>[^\s;]+).*\n
      |
      <\?xml[^?]*encoding=(?<quote>["'])(?<name>.*?)\k<quote>.*\n
    )+
  /xi # :nodoc:

  ##
  # Reads the contents of +filename+ and handles any encoding directives in
  # the file.
  #
  # The content will be converted to the +encoding+.  If the file cannot be
  # converted a warning will be printed and nil will be returned.
  #
  # If +force_transcode+ is true the document will be transcoded and any
  # unknown character in the target encoding will be replaced with '?'

  def self.read_file filename, encoding, force_transcode = false
    content = File.open filename, "rb" do |f| f.read end
    content.gsub!("\r\n", "\n") if RUBY_PLATFORM =~ /mswin|mingw/

    utf8 = content.sub!(/\A\xef\xbb\xbf/, '')

    enc = RDoc::Encoding.detect_encoding content
    content = RDoc::Encoding.change_encoding content, enc if enc

    begin
      encoding ||= Encoding.default_external
      orig_encoding = content.encoding

      if not orig_encoding.ascii_compatible? then
        content = content.encode encoding
      elsif utf8 then
        content = RDoc::Encoding.change_encoding content, Encoding::UTF_8
        content = content.encode encoding
      else
        # assume the content is in our output encoding
        content = RDoc::Encoding.change_encoding content, encoding
      end

      unless content.valid_encoding? then
        # revert and try to transcode
        content = RDoc::Encoding.gems/gems/rdoc-6.5.1.1/lib/rdoc/constant.rb000064400000007135150403134140014041 0ustar00d
    end

    content
  rescue ArgumentError => e
    raise unless e.message =~ /unknown encoding name - (.*)/
    warn "unknown encoding name \"#{$1}\" for #{filename}, skipping"
    nil
  rescue Errno::EISDIR, Errno::ENOENT
    nil
  end

  def self.remove_frozen_string_literal string
    string =~ /\A(?:#!.*\n)?(.*\n)/
    first_line = $1

    if first_line =~ /\A# +frozen[-_]string[-_]literal[=:].+$/i
      string = string.sub first_line, ''
    end

    string
  end

  ##
  # Detects the encoding of +string+ based on the magic comment

  def self.detect_encoding string
    result = HEADER_REGEXP.match string
    name = result && result[:name]

    name ? Encoding.find(name) : nil
  end

  ##
  # Removes magic comments and shebang

  def self.remove_magic_comment string
    string.sub HEADER_REGEXP do |s|
      s.gsub(/[^\n]/, '')
    end
  end

  ##
  # Changes encoding based on +encoding+ without converting and returns new
  # string

  def self.change_encoding text, encoding
    if text.kind_of? RDoc::Comment
      text.encode! encoding
    else
      # TODO: Remove this condition after Ruby 2.2 EOL
      if RUBY_VERSION < '2.3.0'
        text.force_encoding encoding
      else
        String.new text, encoding: encoding
      end
    end
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/constant.rb000064400000007135150403134140014041 0ustar00# frozen_string_literal: true
##
# A constant

class RDoc::Constant < RDoc::CodeObject

  MARSHAL_VERSION = 0 # :nodoc:

  ##
  # Sets the module or class this is constant is an alias for.

  attr_writer :is_alias_for

  ##
  # The constant's name

  attr_accessor :name

  ##
  # The constant's value

  attr_accessor :value

  ##
  # The constant's visibility

  attr_accessor :visibility

  ##
  # Creates a new constant with +name+, +value+ and +comment+

  def initialize(name, value, comment)
    super()

    @name  = name
    @value = value

    @is_alias_for = nil
    @visibility   = :public

    self.comment = comment
  end

  ##
  # Constants are ordered by name

  def <=> other
    return unless self.class === other

    [parent_name, name] <=> [other.parent_name, other.name]
  end

  ##
  # Constants are equal when their #parent and #name is the same

  def == other
    self.class == other.class and
      @parent == other.parent and
      @name == other.name
  end

  ##
  # A constant is documented if it has a comment, or is an alias
  # for a documented class or module.

  def documented?
    return true if super
    return false unless @is_alias_for
    case @is_alias_for
    when String then
      found = @store.find_class_or_module @is_alias_for
      return false unless found
      @is_alias_for = found
    end
    @is_alias_for.documented?
  end

  ##
  # Full constant name including namespace

  def full_name
    @full_name ||= "#{parent_name}::#{@name}"
  end

  ##
  # The module or class this constant is an alias for

  def is_alias_for
    case @is_alias_for
    when String then
      gems/gems/rdoc-6.5.1.1/lib/rdoc/erb_partial.rb000064400000000621150403134140014465 0ustar00
    initialize array[1], nil, array[5]

    @full_name     = array[2]
    @visibility    = array[3] || :public
    @is_alias_for  = array[4]
    #                      5 handled above
    #                      6 handled below
    @parent_name   = array[7]
    @parent_class  = array[8]
    @section_title = array[9]

    @file = RDoc::TopLevel.new array[6]
  end

  ##
  # Path to this constant for gems/gems/rdoc-6.5.1.1/lib/rdoc/attr.rb000064400000007411150403134140013157 0ustar00ame -> #{is_alias_for}"
    else
      "constant #{parent_name}::#@name"
    end
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/erb_partial.rb000064400000000621150403134140014465 0ustar00# frozen_string_literal: true
##
# Allows an ERB template to be rendered in the context (binding) of an
# existing ERB template evaluation.

class RDoc::ERBPartial < ERB

  ##
  # Overrides +compiler+ startup to set the +eoutvar+ to an empty string only
  # if it isn't already set.

  def set_eoutvar compiler, eoutvar = '_erbout'
    super

    compiler.pre_cmd = ["#{eoutvar} ||= +''"]
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/attr.rb000064400000007411150403134140013157 0ustar00# frozen_string_literal: true
##
# An attribute created by \#attr, \#attr_reader, \#attr_writer or
# \#attr_accessor

class RDoc::Attr < RDoc::MethodAttr

  ##
  # 3::
  #   RDoc 4
  #    Added parent name and class
  #    Added section title

  MARSHAL_VERSION = 3 # :nodoc:

  ##
  # Is the attribute readable ('R'), writable ('W') or both ('RW')?

  attr_accessor :rw

  ##
  # Creates a new Attr with body +text+, +name+, read/write status +rw+ and
  # +comment+.  +singleton+ marks this as a class attribute.

  def initialize(text, name, rw, comment, singleton = false)
    super text, name

    @rw = rw
    @singleton = singleton
    self.comment = comment
  end

  ##
  # Attributes are equal when their names, singleton and rw are identical

  def == other
    self.class == other.class and
      self.name == other.name and
      self.rw == other.rw and
      self.singleton == other.singleton
  end

  ##
  # Add +an_alias+ as an attribute in +context+.

  def add_alias(an_alias, context)
    new_attr = self.class.new(self.text, an_alias.new_name, self.rw,
                              self.comment, self.singleton)

    new_attr.record_location an_alias.file
    new_attr.visibility = self.visibility
    new_attr.is_alias_for = self
    @aliases << new_attr
    context.add_attribute new_attr
    new_attr
  end

  ##
  # The #aref prefix for attributes

  def aref_prefix
    'attribute'
  end

  ##
  # Attributes never call super.  See RDoc::AnyMethod#calls_super
  #
  # An RDoc::Attr can show up in the method list in some situations (see
  # Gem::ConfigFile)

  def calls_super # :nodoc:
    false
  end

  ##
  # Returns attr_reader, attr_writer or attr_accessor as appropriate.

  def definition
    case @rw
    when 'RW' then 'attr_accessor'
    when 'R'  then 'attr_reader'gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/rd.rb000064400000000666150403134140014113 0ustar00ollowing
  # methods will return cached values:
  #
  # * #full_name
  # * #parent_name

  def marshal_load array
    initialize_visibility

    @aliases      = []
    @parent       = nil
    @parent_name  = nil
    @parent_class = nil
    @section      = nil
    @file         = nil

    version        = array[0]
    @name          = array[1]
    @full_name     = array[2]
    @rw            = array[3]
    @visibility    = array[4]
   gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/c.rb000064400000105715150403134140013731 0ustar00
  end

  def to_s # :nodoc:
    "#{definition} #{name} in: #{parent}"
  end

  ##
  # Attributes do not have token streams.
  #
  # An RDoc::Attr can show up in the method list in some situations (see
  # Gem::ConfigFile)

  def token_stream # :nodoc:
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/rd.rb000064400000000666150403134140014113 0ustar00# frozen_string_literal: true
##
# Parse a RD format file.  The parsed RDoc::Markup::Document is attached as a
# file comment.

class RDoc::Parser::RD < RDoc::Parser

  include RDoc::Parser::Text

  parse_files_matching(/\.rd(?:\.[^.]+)?$/)

  ##
  # Creates an rd-format TopLevel for the given file.

  def scan
    comment = RDoc::Comment.new @content, @top_level
    comment.format = 'rd'

    @top_level.comment = comment
  end

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/c.rb000064400000105715150403134140013731 0ustar00# frozen_string_literal: true
require 'tsort'

##
# RDoc::Parser::C attempts to parse C extension files.  It looks for
# the standard patterns that you find in extensions: +rb_define_class+,
# +rb_define_method+ and so on.  It tries to find the corresponding
# C source for the methods and extract comments, but if we fail
# we don't worry too much.
#
# The comments associated with a Ruby method are extracted from the C
# comment block associated with the routine that _implements_ that
# method, that is to say the method whose name is given in the
# +rb_define_method+ call. For example, you might write:
#
#   /*
#    * Returns a new array that is a one-dimensional flattening of this
#    * array (recursively). That is, for every element that is an array,
#    * extract its elements into the new array.
#    *
#    *    s = [ 1, 2, 3 ]           #=> [1, 2, 3]
#    *    t = [ 4, 5, 6, [7, 8] ]   #=> [4, 5, 6, [7, 8]]
#    *    a = [ s, t, 9, 10 ]       #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]
#    *    a.flatten                 #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
#    */
#    static VALUE
#    rb_ary_flatten(VALUE ary)
#    {
#        ary = rb_obj_dup(ary);
#        rb_ary_flatten_bang(ary);
#        return ary;
#    }
#
#    ...
#
#    void
#    Init_Array(void)
#    {
#      ...
#      rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
#
# Here RDoc will determine from the +rb_define_method+ line that there's a
# method called "flatten" in class Array, and will look for the implementation
# in the method +rb_ary_flatten+. It will then use the comment from that
# method in the HTML output. This method must be in the same source file
# as the +rb_define_method+.
#
# The comment blocks may include special directives:
#
# [Document-class: +name+]
#   Documentation for the named class.
#
# [Document-module: +name+]
#   Documentation for the named module.
#
# [Document-const: +name+]
#   Documentation for the named +rb_define_const+.
#
#   Constant values can be supplied on the first line of the comment like so:
#
#     /* 300: The highest possible score in bowling */
#     rb_define_const(cFoo, "PERFECT", INT2FIX(300));
#
#   The value can contain internal colons so long as they are escaped with a \
#
# [Document-global: +name+]
#   Documentation for the named +rb_define_global_const+
#
# [Document-variable: +name+]
#   Documentation for the named +rb_define_variable+
#
# [Document-method\: +method_name+]
#   Documentation for the named method.  Use this when the method name is
#   unambiguous.
#
# [Document-method\: <tt>ClassName::method_name</tt>]
#   Documentation for a singleton method in the given class.  Use this when
#   the method name alone is ambiguous.
#
# [Document-method\: <tt>ClassName#method_name</tt>]
#   Documentation for a instance method in the given class.  Use this when the
#   method name alone is ambiguous.
#
# [Document-attr: +name+]
#   Documentation for the named attribute.
#
# [call-seq:  <i>text up to an empty line</i>]
#   Because C source doesn't give descriptive names to Ruby-level parameters,
#   you need to document the calling sequence explicitly
#
# In addition, RDoc assumes by default that the C method implementing a
# Ruby function is in the same source file as the rb_define_method call.
# If this isn't the case, add the comment:
#
#   rb_define_method(....);  // in filename
#
# As an example, we might have an extension that defines multiple classes
# in its Init_xxx method. We could document them using
#
#   /*
#    * Document-class:  MyClass
#    *
#    * Encapsulate the writing and reading of the configuration
#    * file. ...
#    */
#
#   /*
#    * Document-method: read_value
#    *
#    * call-seq:
#    *   cfg.read_value(key)            -> value
#    *   cfg.read_value(key} { |key| }  -> value
#    *
#    * Return the value corresponding to +key+ from the configuration.
#    * In the second form, if the key isn't found, invoke the
#    * block and return its value.
#    */

class RDoc::Parser::C < RDoc::Parser

  parse_files_matching(/\.(?:([CcHh])\1?|c([+xp])\2|y)\z/)

  include RDoc::Text

  # :stopdoc:
  BOOL_ARG_PATTERN = /\s*+\b([01]|Q?(?:true|false)|TRUE|FALSE)\b\s*/
  TRUE_VALUES = ['1', 'TRUE', 'true', 'Qtrue'].freeze
  # :startdoc:

  ##
  # Maps C variable names to names of Ruby classes or modules

  attr_reader :classes

  ##
  # C file the parser is parsing

  attr_accessor :content

  ##
  # Dependencies from a missing enclosing class to the classes in
  # missing_dependencies that depend upon it.

  attr_reader :enclosure_dependencies

  ##
  # Maps C variable names to names of Ruby classes (and singleton classes)

  attr_reader :known_classes

  ##
  # Classes found while parsing the C file that were not yet registered due to
  # a missing enclosing class.  These are processed by do_missing

  attr_reader :missing_dependencies

  ##
  # Maps C variable names to names of Ruby singleton classes

  attr_reader :singleton_classes

  ##
  # The TopLevel items in the parsed file belong to

  attr_reader :top_level

  ##
  # Prepares for parsing a C file.  See RDoc::Parser#initialize for details on
  # the arguments.

  def initialize top_level, file_name, content, options, stats
    super

    @known_classes = RDoc::KNOWN_CLASSES.dup
    @content = handle_tab_width handle_ifdefs_in @content
    @file_dir = File.dirname @file_name

    @classes           = load_variable_map :c_class_variables
    @singleton_classes = load_variable_map :c_singleton_class_variables

    @markup = @options.markup

    # class_variable => { function => [method, ...] }
    @methods = Hash.new { |h, f| h[f] = Hash.new { |i, m| i[m] = [] } }

    # missing variable => [handle_class_module arguments]
    @missing_dependencies = {}

    # missing enclosure variable => [dependent handle_class_module arguments]
    @enclosure_dependencies = Hash.new { |h, k| h[k] = [] }
    @enclosure_dependencies.instance_variable_set :@missing_dependencies,
                                                  @missing_dependencies

    @enclosure_dependencies.extend TSort

    def @enclosure_dependencies.tsort_each_node &block
      each_key(&block)
    rescue TSort::Cyclic => e
      cycle_vars = e.message.scan(/"(.*?)"/).flatten

      cycle = cycle_vars.sort.map do |var_name|
        delete var_name

        var_name, type, mod_name, = @missing_dependencies[var_name]

        "#{type} #{mod_name} (#{var_name})"
      end.join ', '

      warn "Unable to create #{cycle} due to a cyclic class or module creation"

      retry
    end

    def @enclosure_dependencies.tsort_each_child node, &block
      fetch(node, []).each(&block)
    end
  end

  ##
  # Scans #content for rb_define_alias

  def do_aliases
    @content.scan(/rb_define_alias\s*\(
                   \s*(\w+),
                   \s*"(.+?)",
                   \s*"(.+?)"
                   \s*\)/xm) do |var_name, new_name, old_name|
      class_name = @known_classes[var_name]

      unless class_name then
        @options.warn "Enclosing class or module %p for alias %s %s is not known" % [
          var_name, new_name, old_name]
        next
      end

      class_obj = find_class var_name, class_name
      comment = find_alias_comment var_name, new_name, old_name
      comment.normalize
      if comment.to_s.empty? and existing_method = class_obj.method_list.find { |m| m.name == old_name}
        comment = existing_method.comment
      end
      add_alias(var_name, class_obj, old_name, new_name, comment)
    end
  end

  ##
  # Add alias, either from a direct alias definition, or from two
  # method that reference the same function.

  def add_alias(var_name, class_obj, old_name, new_name, comment)
    al = RDoc::Alias.new '', old_name, new_name, ''
    al.singleton = @singleton_classes.key? var_name
    al.comment = comment
    al.record_location @top_level
    class_obj.add_alias al
    @stats.add_alias al
    al
  end

  ##
  # Scans #content for rb_attr and rb_define_attr

  def do_attrs
    @content.scan(/rb_attr\s*\(
                   \s*(\w+),
                   \s*([\w"()]+),
                   #{BOOL_ARG_PATTERN},
                   #{BOOL_ARG_PATTERN},
                   \s*\w+\);/xmo) do |var_name, attr_name, read, write|
      handle_attr var_name, attr_name, read, write
    end

    @content.scan(%r%rb_define_attr\(
                             \s*([\w\.]+),
                             \s*"([^"]+)",
                             #{BOOL_ARG_PATTERN},
                             #{BOOL_ARG_PATTERN}\);
                %xmo) do |var_name, attr_name, read, write|
      handle_attr var_name, attr_name, read, write
    end
  end

  ##
  # Scans #content for boot_defclass

  def do_boot_defclass
    @content.scan(/(\w+)\s*=\s*boot_defclass\s*\(\s*"(\w+?)",\s*(\w+?)\s*\)/) do
      |var_name, class_name, parent|
      parent = nil if parent == "0"
      handle_class_module(var_name, :class, class_name, parent, nil)
    end
  end

  ##
  # Scans #content for rb_define_class, boot_defclass, rb_define_class_under
  # and rb_singleton_class

  def do_classes_and_modules
    do_boot_defclass if @file_name == "class.c"

    @content.scan(
      %r(
        (?<open>\s*\(\s*) {0}
        (?<close>\s*\)\s*) {0}
        (?<name>\s*"(?<class_name>\w+)") {0}
        (?<parent>\s*(?:
          (?<parent_name>[\w\*\s\(\)\.\->]+) |
          rb_path2class\s*\(\s*"(?<path>[\w:]+)"\s*\)
        )) {0}
        (?<under>\w+) {0}

        (?<var_name>[\w\.]+)\s* =
        \s*rb_(?:
          define_(?:
            class(?: # rb_define_class(name, parent_name)
              \(\s*
                \g<name>,
                \g<parent>
              \s*\)
            |
              _under\g<open> # rb_define_class_under(under, name, parent_name...)
                \g<under>,
                \g<name>,
                \g<parent>
              \g<close>
            )
          |
            (?<module>)
            module(?: # rb_define_module(name)
              \g<open>
                \g<name>
              \g<close>
            |
              _under\g<open> # rb_define_module_under(under, name)
                \g<under>,
                \g<name>
              \g<close>
            )
          )
      |
        (?<attributes>(?:\s*"\w+",)*\s*NULL\s*) {0}
        struct_define(?:
          \g<open> # rb_struct_define(name, ...)
            \g<name>,
        |
          _under\g<open> # rb_struct_define_under(under, name, ...)
            \g<under>,
            \g<name>,
        |
          _without_accessor(?:
            \g<open> # rb_struct_define_without_accessor(name, parent_name, ...)
          |
            _under\g<open> # rb_struct_define_without_accessor_under(under, name, parent_name, ...)
              \g<under>,
          )
            \g<name>,
            \g<parent>,
            \s*\w+,        # Allocation function
        )
          \g<attributes>
        \g<close>
      |
        singleton_class\g<open> # rb_singleton_class(target_class_name)
          (?<target_class_name>\w+)
        \g<close>
        )
      )mx
    ) do
      if target_class_name = $~[:target_class_name]
        # rb_singleton_class(target_class_name)
        handle_singleton $~[:var_name], target_class_name
        next
      end

      var_name = $~[:var_name]
      type = $~[:module] ? :module : :class
      class_name = $~[:class_name]
      parent_name = $~[:parent_name] || $~[:path]
      under = $~[:under]
      attributes = $~[:attributes]

      handle_class_module(var_name, type, class_name, parent_name, under)
      if attributes and !parent_name # rb_struct_define *not* without_accessor
        true_flag = 'Qtrue'
        attributes.scan(/"\K\w+(?=")/) do |attr_name|
          handle_attr var_name, attr_name, true_flag, true_flag
        end
      end
    end
  end

  ##
  # Scans #content for rb_define_variable, rb_define_readonly_variable,
  # rb_define_const and rb_define_global_const

  def do_constants
    @content.scan(%r%\Wrb_define_
                   ( variable          |
                     readonly_variable |
                     const             |
                     global_const        )
               \s*\(
                 (?:\s*(\w+),)?
                 \s*"(\w+)",
                 \s*(.*?)\s*\)\s*;
                 %xm) do |type, var_name, const_name, definition|
      var_name = "rb_cObject" if !var_name or var_name == "rb_mKernel"
      handle_constants type, var_name, const_name, definition
    end

    @content.scan(%r%
                  \Wrb_curses_define_const
                  \s*\(
                    \s*
                    (\w+)
                    \s*
                  \)
                  \s*;%xm) do |consts|
      const = consts.first

      handle_constants 'const', 'mCurses', const, "UINT2NUM(#{const})"
    end

    @content.scan(%r%
                  \Wrb_file_const
                  \s*\(
                    \s*
                    "([^"]+)",
                    \s*
                    (.*?)
                    \s*
                  \)
                  \s*;%xm) do |name, value|
      handle_constants 'const', 'rb_mFConst', name, value
    end
  end


  ##
  # Scans #content for rb_include_module

  def do_includes
    @content.scan(/rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/) do |c,m|
      next unless cls = @classes[c]
      m = @known_classes[m] || m

      comment = new_comment '', @top_level, :c
      incl = cls.add_include RDoc::Include.new(m, comment)
      incl.record_location @top_level
    end
  end

  ##
  # Scans #content for rb_define_method, rb_define_singleton_method,
  # rb_define_module_function, rb_define_private_method,
  # rb_define_global_function and define_filetest_function

  def do_methods
    @content.scan(%r%rb_define_
                   (
                      singleton_method |
                      method           |
                      module_function  |
                      private_method
                   )
                   \s*\(\s*([\w\.]+),
                     \s*"([^"]+)",
                     \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\(|\(METHOD\))?(\w+)\)?,
                     \s*(-?\w+)\s*\)
                   (?:;\s*/[*/]\s+in\s+(\w+?\.(?:cpp|c|y)))?
                 %xm) do |type, var_name, meth_name, function, param_count, source_file|

      # Ignore top-object and weird struct.c dynamic stuff
      next if var_name == "ruby_top_self"
      next if var_name == "nstr"

      var_name = "rb_cObject" if var_name == "rb_mKernel"
      handle_method(type, var_name, meth_name, function, param_count,
                    source_file)
    end

    @content.scan(%r%rb_define_global_function\s*\(
                             \s*"([^"]+)",
                             \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
                             \s*(-?\w+)\s*\)
                (?:;\s*/[*/]\s+in\s+(\w+?\.[cy]))?
                %xm) do |meth_name, function, param_count, source_file|
      handle_method("method", "rb_mKernel", meth_name, function, param_count,
                    source_file)
    end

    @content.scan(/define_filetest_function\s*\(
                     \s*"([^"]+)",
                     \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
                     \s*(-?\w+)\s*\)/xm) do |meth_name, function, param_count|

      handle_method("method", "rb_mFileTest", meth_name, function, param_count)
      handle_method("singleton_method", "rb_cFile", meth_name, function,
                    param_count)
    end
  end

  ##
  # Creates classes and module that were missing were defined due to the file
  # order being different than the declaration order.

  def do_missing
    return if @missing_dependencies.empty?

    @enclosure_dependencies.tsort.each do |in_module|
      arguments = @missing_dependencies.delete in_module

      next unless arguments # dependency on existing class

      handle_class_module(*arguments)
    end
  end

  ##
  # Finds the comment for an alias on +class_name+ from +new_name+ to
  # +old_name+

  def find_alias_comment class_name, new_name, old_name
    content =~ %r%((?>/\*.*?\*/\s+))
                  rb_define_alias\(\s*#{Regexp.escape class_name}\s*,
                                   \s*"#{Regexp.escape new_name}"\s*,
                                   \s*"#{Regexp.escape old_name}"\s*\);%xm

    new_comment($1 || '', @top_level, :c)
  end

  ##
  # Finds a comment for rb_define_attr, rb_attr or Document-attr.
  #
  # +var_name+ is the C class variable the attribute is defined on.
  # +attr_name+ is the attribute's name.
  #
  # +read+ and +write+ are the read/write flags ('1' or '0').  Either both or
  # neither must be provided.

  def find_attr_comment var_name, attr_name, read = nil, write = nil
    attr_name = Regexp.escape attr_name

    rw = if read and write then
           /\s*#{read}\s*,\s*#{write}\s*/xm
         else
           /.*?/m
         end

    comment = if @content =~ %r%((?>/\*.*?\*/\s+))
                                rb_define_attr\((?:\s*#{var_name},)?\s*
                                                "#{attr_name}"\s*,
                                                #{rw}\)\s*;%xm then
                $1
              elsif @content =~ %r%((?>/\*.*?\*/\s+))
                                   rb_attr\(\s*#{var_name}\s*,
                                            \s*#{attr_name}\s*,
                                            #{rw},.*?\)\s*;%xm then
                $1
              elsif @content =~ %r%(/\*.*?(?:\s*\*\s*)?)
                                   Document-attr:\s#{attr_name}\s*?\n
                                   ((?>(.|\n)*?\*/))%x then
                "#{$1}\n#{$2}"
              else
                ''
              end

    new_comment comment, @top_level, :c
  end

  ##
  # Generate a Ruby-method table

  def gen_body_table file_content
    table = {}
    file_content.scan(%r{
      ((?>/\*.*?\*/\s*)?)
      ((?:(?:\w+)\s+)?
        (?:intern\s+)?VALUE\s+(\w+)
        \s*(?:\([^)]*\))(?:[^\);]|$))
    | ((?>/\*.*?\*/\s*))^\s*(\#\s*define\s+(\w+)\s+(\w+))
    | ^\s*\#\s*define\s+(\w+)\s+(\w+)
    }xm) do
      case
      when $1
        table[$3] = [:func_def, $1, $2, $~.offset(2)] if !table[$3] || table[$3][0] != :func_def
      when $4
        table[$6] = [:macro_def, $4, $5, $~.offset(5), $7] if !table[$6] || table[$6][0] == :macro_alias
      when $8
        table[$8] ||= [:macro_alias, $9]
      end
    end
    table
  end

  ##
  # Find the C code corresponding to a Ruby method

  def find_body class_name, meth_name, meth_obj, file_content, quiet = false
    if file_content
      @body_table ||= {}
      @body_table[file_content] ||= gen_body_table file_content
      type, *args = @body_table[file_content][meth_name]
    end

    case type
    when :func_def
      comment = new_comment args[0], @top_level, :c
      body = args[1]
      offset, = args[2]

      comment.remove_private if comment

      # try to find the whole body
      body = $& if /#{Regexp.escape body}[^(]*?\{.*?^\}/m =~ file_content

      # The comment block may have been overridden with a 'Document-method'
      # block. This happens in the interpreter when multiple methods are
      # vectored through to the same C method but those methods are logically
      # distinct (for example Kernel.hash and Kernel.object_id share the same
      # implementation

      override_comment = find_override_comment class_name, meth_obj
      comment = override_comment if override_comment

      comment.normalize
      find_modifiers comment, meth_obj if comment

      #meth_obj.params = params
      meth_obj.start_collecting_tokens
      tk = { :line_no => 1, :char_no => 1, :text => body }
      meth_obj.add_token tk
      meth_obj.comment = comment
      meth_obj.line    = file_content[0, offset].count("\n") + 1

      body
    when :macro_def
      comment = new_comment args[0], @top_level, :c
      body = args[1]
      offset, = args[2]

      find_body class_name, args[3], meth_obj, file_content, true

      comment.normalize
      find_modifiers comment, meth_obj

      meth_obj.start_collecting_tokens
      tk = { :line_no => 1, :char_no => 1, :text => body }
      meth_obj.add_token tk
      meth_obj.comment = comment
      meth_obj.line    = file_content[0, offset].count("\n") + 1

      body
    when :macro_alias
      # with no comment we hope the aliased definition has it and use it's
      # definition

      body = find_body(class_name, args[0], meth_obj, file_content, true)

      return body if body

      @options.warn "No definition for #{meth_name}"
      false
    else # No body, but might still have an override comment
      comment = find_override_comment class_name, meth_obj

      if comment then
        comment.normalize
        find_modifiers comment, meth_obj
        meth_obj.comment = comment

        ''
      else
        @options.warn "No definition for #{meth_name}"
        false
      end
    end
  end

  ##
  # Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+

  def find_class(raw_name, name, base_name = nil)
    unless @classes[raw_name]
      if raw_name =~ /^rb_m/
        container = @top_level.add_module RDoc::NormalModule, name
      else
        container = @top_level.add_class RDoc::NormalClass, name
      end
      container.name = base_name if base_name

      container.record_location @top_level
      @classes[raw_name] = container
    end
    @classes[raw_name]
  end

  ##
  # Look for class or module documentation above Init_+class_name+(void),
  # in a Document-class +class_name+ (or module) comment or above an
  # rb_define_class (or module).  If a comment is supplied above a matching
  # Init_ and a rb_define_class the Init_ comment is used.
  #
  #   /*
  #    * This is a comment for Foo
  #    */
  #   Init_Foo(void) {
  #       VALUE cFoo = rb_define_class("Foo", rb_cObject);
  #   }
  #
  #   /*
  #    * Document-class: Foo
  #    * This is a comment for Foo
  #    */
  #   Init_foo(void) {
  #       VALUE cFoo = rb_define_class("Foo", rb_cObject);
  #   }
  #
  #   /*
  #    * This is a comment for Foo
  #    */
  #   VALUE cFoo = rb_define_class("Foo", rb_cObject);

  def find_class_comment class_name, class_mod
    comment = nil

    if @content =~ %r%
        ((?>/\*.*?\*/\s+))
        (static\s+)?
        void\s+
        Init(?:VM)?_(?i:#{class_name})\s*(?:_\(\s*)?\(\s*(?:void\s*)?\)%xm then
      comment = $1.sub(%r%Document-(?:class|module):\s+#{class_name}%, '')
    elsif @content =~ %r%Document-(?:class|module):\s+#{class_name}\s*?
                         (?:<\s+[:,\w]+)?\n((?>.*?\*/))%xm then
      comment = "/*\n#{$1}"
    elsif @content =~ %r%((?>/\*.*?\*/\s+))
                         ([\w\.\s]+\s* = \s+)?rb_define_(class|module)[\t (]*?"(#{class_name})"%xm then
      comment = $1
    elsif @content =~ %r%((?>/\*.*?\*/\s+))
                         ([\w\. \t]+ = \s+)?rb_define_(class|module)_under[\t\w, (]*?"(#{class_name.split('::').last})"%xm then
      comment = $1
    else
      comment = ''
    end

    comment = new_comment comment, @top_level, :c
    comment.normalize

    look_for_directives_in class_mod, comment

    class_mod.add_comment comment, @top_level
  end

  ##
  # Generate a const table

  def gen_const_table file_content
    table = {}
    @content.scan(%r{
      ((?>^\s*/\*.*?\*/\s+))
        rb_define_(\w+)\((?:\s*(?:\w+),)?\s*
                           "(\w+)"\s*,
                           .*?\)\s*;
    | Document-(?:const|global|variable):\s
        ((?:\w+::)*\w+)
        \s*?\n((?>.*?\*/))
    }mxi) do
      case
      when $1 then table[[$2, $3]] = $1
      when $4 then table[$4] = "/*\n" + $5
      end
    end
    table
  end

  ##
  # Finds a comment matching +type+ and +const_name+ either above the
  # comment or in the matching Document- section.

  def find_const_comment(type, const_name, class_name = nil)
    @const_table ||= {}
    @const_table[@content] ||= gen_const_table @content
    table = @const_table[@content]

    comment =
      table[[type, const_name]] ||
      (class_name && table[class_name + "::" + const_name]) ||
      table[const_name] ||
      ''

    new_comment comment, @top_level, :c
  end

  ##
  # Handles modifiers in +comment+ and updates +meth_obj+ as appropriate.

  def find_modifiers comment, meth_obj
    comment.normalize
    comment.extract_call_seq meth_obj

    look_for_directives_in meth_obj, comment
  end

  ##
  # Finds a <tt>Document-method</tt> override for +meth_obj+ on +class_name+

  def find_override_comment class_name, meth_obj
    name = Regexp.escape meth_obj.name
    prefix = Regexp.escape meth_obj.name_prefix

    comment = if @content =~ %r%Document-method:
                                \s+#{class_name}#{prefix}#{name}
                                \s*?\n((?>.*?\*/))%xm then
                "/*#{$1}"
              elsif @content =~ %r%Document-method:
                                   \s#{name}\s*?\n((?>.*?\*/))%xm then
                "/*#{$1}"
              end

    return unless comment

    new_comment comment, @top_level, :c
  end

  ##
  # Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either
  # +read+, +write+ or both

  def handle_attr(var_name, attr_name, read, write)
    rw = ''
    rw += 'R' if TRUE_VALUES.include?(read)
    rw += 'W' if TRUE_VALUES.include?(write)

    class_name = @known_classes[var_name]

    return unless class_name

    class_obj = find_class var_name, class_name

    return unless class_obj

    comment = find_attr_comment var_name, attr_name
    comment.normalize

    name = attr_name.gsub(/rb_intern(?:_const)?\("([^"]+)"\)/, '\1')

    attr = RDoc::Attr.new '', name, rw, comment

    attr.record_location @top_level
    class_obj.add_attribute attr
    @stats.add_attribute attr
  end

  ##
  # Creates a new RDoc::NormalClass or RDoc::NormalModule based on +type+
  # named +class_name+ in +parent+ which was assigned to the C +var_name+.

  def handle_class_module(var_name, type, class_name, parent, in_module)
    parent_name = @known_classes[parent] || parent

    if in_module then
      enclosure = @classes[in_module] || @store.find_c_enclosure(in_module)

      if enclosure.nil? and enclosure = @known_classes[in_module] then
        enc_type = /^rb_m/ =~ in_module ? :module : :class
        handle_class_module in_module, enc_type, enclosure, nil, nil
        enclosure = @classes[in_module]
      end

      unless enclosure then
        @enclosure_dependencies[in_module] << var_name
        @missing_dependencies[var_name] =
          [var_name, type, class_name, parent, in_module]

        return
      end
    else
      enclosure = @top_level
    end

    if type == :class then
      full_name = if RDoc::ClassModule === enclosure then
                    enclosure.full_name + "::#{class_name}"
                  else
                    class_name
                  end

      if @content =~ %r%Document-class:\s+#{full_name}\s*<\s+([:,\w]+)% then
        parent_name = $1
      end

      cm = enclosure.add_class RDoc::NormalClass, class_name, parent_name
    else
      cm = enclosure.add_module RDoc::NormalModule, class_name
    end

    cm.record_location enclosure.top_level

    find_class_comment cm.full_name, cm

    case cm
    when RDoc::NormalClass
      @stats.add_class cm
    when RDoc::NormalModule
      @stats.add_module cm
    end

    @classes[var_name] = cm
    @known_classes[var_name] = cm.full_name
    @store.add_c_enclosure var_name, cm
  end

  ##
  # Adds constants.  By providing some_value: at the start of the comment you
  # can override the C value of the comment to give a friendly definition.
  #
  #   /* 300: The perfect score in bowling */
  #   rb_define_const(cFoo, "PERFECT", INT2FIX(300));
  #
  # Will override <tt>INT2FIX(300)</tt> with the value +300+ in the output
  # RDoc.  Values may include quotes and escaped colons (\:).

  def handle_constants(type, var_name, const_name, definition)
    class_name = @known_classes[var_name]

    return unless class_name

    class_obj = find_class var_name, class_name, class_name[/::\K[^:]+\z/]

    unless class_obj then
      @options.warn 'Enclosing class or module %p is not known' % [const_name]
      return
    end

    comment = find_const_comment type, const_name, class_name
    comment.normalize

    # In the case of rb_define_const, the definition and comment are in
    # "/* definition: comment */" form.  The literal ':' and '\' characters
    # can be escaped with a backslash.
    if type.downcase == 'const' then
      no_match, new_definition, new_comment = comment.text.split(/(\A.*):/)

      if no_match and no_match.empty? then
        if new_definition.empty? then # Default to literal C definition
          new_definition = definition
        else
          new_definition = new_definition.gsub("\:", ":")
          new_definition = new_definition.gsub("\\", '\\')
        end

        new_definition.sub!(/\A(\s+)/, '')

        new_comment = "#{$1}#{new_comment.lstrip}"

        new_comment = self.new_comment(new_comment, @top_level, :c)

        con = RDoc::Constant.new const_name, new_definition, new_comment
      else
        con = RDoc::Constant.new const_name, definition, comment
      end
    else
      con = RDoc::Constant.new const_name, definition, comment
    end

    con.record_location @top_level
    @stats.add_constant con
    class_obj.add_constant con
  end

  ##
  # Removes #ifdefs that would otherwise confuse us

  def handle_ifdefs_in(body)
    body.gsub(/^#ifdef HAVE_PROTOTYPES.*?#else.*?\n(.*?)#endif.*?\n/m, '\1')
  end

  ##
  # Adds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned
  # to +var_name+.  +type+ is the type of method definition function used.
  # +singleton_method+ and +module_function+ create a singleton method.

  def handle_method(type, var_name, meth_name, function, param_count,
                    source_file = nil)
    class_name = @known_classes[var_name]
    singleton  = @singleton_classes.key? var_name

    @methods[var_name][function] << meth_name

    return unless class_name

    class_obj = find_class var_name, class_name

    if existing_method = class_obj.method_list.find { |m| m.c_function == function }
      add_alias(var_name, class_obj, existing_method.name, meth_name, existing_method.comment)
    end

    if class_obj then
      if meth_name == 'initialize' then
        meth_name = 'new'
        singleton = true
        type = 'method' # force public
      end

      meth_obj = RDoc::AnyMethod.new '', meth_name
      meth_obj.c_function = function
      meth_obj.singleton =
        singleton || %w[singleton_method module_function].include?(type)

      p_count = Integer(param_count) rescue -1

      if source_file then
        file_name = File.join @file_dir, source_file

        if File.exist? file_name then
          file_content = File.read file_name
        else
          @options.warn "unknown source #{source_file} for #{meth_name} in #{@file_name}"
        end
      else
        file_content = @content
      end

      body = find_body class_name, function, meth_obj, file_content

      if body and meth_obj.document_self then
        meth_obj.params = if p_count < -1 then # -2 is Array
                            '(*args)'
                          elsif p_count == -1 then # argc, argv
                            rb_scan_args body
                          else
                            args = (1..p_count).map { |i| "p#{i}" }
                            "(#{args.join ', '})"
                          end


        meth_obj.record_location @top_level

        if meth_obj.section_title
          class_obj.temporary_section = class_obj.add_section(meth_obj.section_title)
        end
        class_obj.add_method meth_obj

        @stats.add_method meth_obj
        meth_obj.visibility = :private if 'private_method' == type
      end
    end
  end

  ##
  # Registers a singleton class +sclass_var+ as a singleton of +class_var+

  def handle_singleton sclass_var, class_var
    class_name = @known_classes[class_var]

    @known_classes[sclass_var]     = class_name
    @singleton_classes[sclass_var] = class_name
  end

  ##
  # Loads the variable map with the given +name+ from the RDoc::Store, if
  # present.

  def load_variable_map map_name
    return {} unless files = @store.cache[map_name]
    return {} unless name_map = files[@file_name]

    class_map = {}

    name_map.each do |variable, name|
      next unless mod = @store.find_class_or_module(name)

      class_map[variable] = if map_name == :c_class_variables then
                              mod
                            else
                              name
                            end
      @known_classes[variable] = name
    end

    class_map
  end

  ##
  # Look for directives in a normal comment block:
  #
  #   /*
  #    * :title: My Awesome Project
  #    */
  #
  # This method modifies the +comment+

  def look_for_directives_in context, comment
    @preprocess.handle comment, context do |directive, param|
      case directive
      when 'main' then
        @options.main_page = param
        ''
      when 'title' then
        @options.default_title = param if @options.respond_to? :default_title=
        ''
      end
    end

    comment
  end

  ##
  # Extracts parameters from the +method_body+ and returns a method
  # parameter string.  Follows 1.9.3dev's scan-arg-spec, see README.EXT

  def rb_scan_args method_body
    method_body =~ /rb_scan_args\((.*?)\)/m
    return '(*args)' unless $1

    $1.split(/,/)[2] =~ /"(.*?)"/ # format argument
    format = $1.split(//)

    leagems/gems/rdoc-6.5.1.1/lib/rdoc/parser/text.rb000064400000000463150403134140014465 0ustar00.shift
    end

    if format.first == '&' then
      block = true
      format.shift
    end

    # if the format string is not empty there's a bug in the C code, ignore it

    args = []
    position = 1

    (1...(position + lead)).each do |index|
      args << "p#{index}"
    end

    position += lead
gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ripper_state_lex.rb000064400000037321150403134140017055 0ustar00ases
  # from a C file and returns an RDoc::TopLevel for this file

  def scan
    remove_commented_out_lines

    do_classes_and_modules
    do_missing

    do_constants
    do_methods
    do_includes
    do_aliases
    do_attrs

    @store.add_c_variables self

    @top_level
  end

  def new_comment text = nil, location = nil, language = nil
    RDoc::Comment.new(text, location, language).tap do |comment|
      comment.format = @markup
    end
  end
end
gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/text.rb000064400000000463150403134140014465 0ustar00# frozen_string_literal: true
##
# Indicates this parser is text and doesn't contain code constructs.
#
# Include this module in a RDoc::Parser subclass to make it show up as a file,
# not as part of a class or module.
#--
# This is not named File to avoid overriding ::File

module RDoc::Parser::Text
end

gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ripper_state_lex.rb000064400000037321150403134140017055 0ustar00# frozen_string_literal: true
require 'ripper'

class RDoc::Parser::RipperStateLex
  # TODO: Remove this constants after Ruby 2.4 EOL
  RIPPER_HAS_LEX_STATE = Ripper::Filter.method_defined?(:state)

  Token = Struct.new(:line_no, :char_no, :kind, :text, :state)

  EXPR_NONE = 0
  EXPR_BEG = 1
  EXPR_END = 2
  EXPR_ENDARG = 4
  EXPR_ENDFN = 8
  EXPR_ARG = 16
  EXPR_CMDARG = 32
  EXPR_MID = 64
  EXPR_FNAME = 128
  EXPR_DOT = 256
  EXPR_CLASS = 512
  EXPR_LABEL = 1024
  EXPR_LABELED = 2048
  EXPR_FITEM = 4096
  EXPR_VALUE = EXPR_BEG
  EXPR_BEG_ANY  =  (EXPR_BEG | EXPR_MID | EXPR_CLASS)
  EXPR_ARG_ANY  =  (EXPR_ARG | EXPR_CMDARG)
  EXPR_END_ANY  =  (EXPR_END | EXPR_ENDARG | EXPR_ENDFN)

  class InnerStateLex < Ripper::Filter
    attr_accessor :lex_state

    def initialize(code)
      @lex_state = EXPR_BEG
      @in_fname = false
      @continue = false
      reset
      super(code)
    end

    def reset
      @command_start = false
      @cmd_state = @command_start
    end

    def on_nl(tok, data)
      case @lex_state
      when EXPR_FNAME, EXPR_DOT
        @continue = true
      else
        @continue = false
        @lex_state = EXPR_BEG unless (EXPR_LABEL & @lex_state) != 0
      end
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_ignored_nl(tok, data)
      case @lex_state
      when EXPR_FNAME, EXPR_DOT
        @continue = true
      else
        @continue = false
        @lex_state = EXPR_BEG unless (EXPR_LABEL & @lex_state) != 0
      end
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_op(tok, data)
      case tok
      when '&', '|', '!', '!=', '!~'
        case @lex_state
        when EXPR_FNAME, EXPR_DOT
          @lex_state = EXPR_ARG
        else
          @lex_state = EXPR_BEG
        end
      when '<<'
        # TODO next token?
        case @lex_state
        when EXPR_FNAME, EXPR_DOT
          @lex_state = EXPR_ARG
        else
          @lex_state = EXPR_BEG
        end
      when '?'
        @lex_state = EXPR_BEG
      when '&&', '||', '+=', '-=', '*=', '**=',
           '&=', '|=', '^=', '<<=', '>>=', '||=', '&&='
        @lex_state = EXPR_BEG
      when '::'
        case @lex_state
        when EXPR_ARG, EXPR_CMDARG
          @lex_state = EXPR_DOT
        when EXPR_FNAME, EXPR_DOT
          @lex_state = EXPR_ARG
        else
          @lex_state = EXPR_BEG
        end
      else
        case @lex_state
        when EXPR_FNAME, EXPR_DOT
          @lex_state = EXPR_ARG
        else
          @lex_state = EXPR_BEG
        end
      end
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_kw(tok, data)
      case tok
      when 'class'
        @lex_state = EXPR_CLASS
        @in_fname = true
      when 'def'
        @lex_state = EXPR_FNAME
        @continue = true
        @in_fname = true
      when 'if', 'unless', 'while', 'until'
        if ((EXPR_MID | EXPR_END | EXPR_ENDARG | EXPR_ENDFN | EXPR_ARG | EXPR_CMDARG) & @lex_state) != 0 # postfix if
          @lex_state = EXPR_BEG | EXPR_LABEL
        else
          @lex_state = EXPR_BEG
        end
      when 'begin', 'case', 'when'
        @lex_state = EXPR_BEG
      when 'return', 'break'
        @lex_state = EXPR_MID
      else
        if @lex_state == EXPR_FNAME
          @lex_state = EXPR_END
        else
          @lex_state = EXPR_END
        end
      end
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_tstring_beg(tok, data)
      @lex_state = EXPR_BEG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_tstring_end(tok, data)
      @lex_state = EXPR_END | EXPR_ENDARG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_CHAR(tok, data)
      @lex_state = EXPR_END
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_period(tok, data)
      @lex_state = EXPR_DOT
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_int(tok, data)
      @lex_state = EXPR_END | EXPR_ENDARG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_float(tok, data)
      @lex_state = EXPR_END | EXPR_ENDARG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_rational(tok, data)
      @lex_state = EXPR_END | EXPR_ENDARG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_imaginary(tok, data)
      @lex_state = EXPR_END | EXPR_ENDARG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_symbeg(tok, data)
      @lex_state = EXPR_FNAME
      @continue = true
      @in_fname = true
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    private def on_variables(event, tok, data)
      if @in_fname
        @lex_state = EXPR_ENDFN
        @in_fname = false
        @continue = false
      elsif @continue
        case @lex_state
        when EXPR_DOT
          @lex_state = EXPR_ARG
        else
          @lex_state = EXPR_ENDFN
          @continue = false
        end
      else
        @lex_state = EXPR_CMDARG
      end
      data << Token.new(lineno, column, event, tok, @lex_state)
    end

    def on_ident(tok, data)
      on_variables(__method__, tok, data)
    end

    def on_ivar(tok, data)
      @lex_state = EXPR_END
      on_variables(__method__, tok, data)
    end

    def on_cvar(tok, data)
      @lex_state = EXPR_END
      on_variables(__method__, tok, data)
    end

    def on_gvar(tok, data)
      @lex_state = EXPR_END
      on_variables(__method__, tok, data)
    end

    def on_backref(tok, data)
      @lex_state = EXPR_END
      on_variables(__method__, tok, data)
    end

    def on_lparen(tok, data)
      @lex_state = EXPR_LABEL | EXPR_BEG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_rparen(tok, data)
      @lex_state = EXPR_ENDFN
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_lbrace(tok, data)
      @lex_state = EXPR_LABEL | EXPR_BEG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_rbrace(tok, data)
      @lex_state = EXPR_ENDARG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_lbracket(tok, data)
      @lex_state = EXPR_LABEL | EXPR_BEG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_rbracket(tok, data)
      @lex_state = EXPR_ENDARG
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_const(tok, data)
      case @lex_state
      when EXPR_FNAME
        @lex_state = EXPR_ENDFN
      when EXPR_CLASS, EXPR_CMDARG, EXPR_MID
        @lex_state = EXPR_ARG
      else
        @lex_state = EXPR_CMDARG
      end
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_sp(tok, data)
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_comma(tok, data)
      @lex_state = EXPR_BEG | EXPR_LABEL if (EXPR_ARG_ANY & @lex_state) != 0
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_comment(tok, data)
      @lex_state = EXPR_BEG unless (EXPR_LABEL & @lex_state) != 0
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_ignored_sp(tok, data)
      @lex_state = EXPR_BEG unless (EXPR_LABEL & @lex_state) != 0
      data << Token.new(lineno, column, __method__, tok, @lex_state)
    end

    def on_heredoc_beg(tok, data)
      data << Token.new(lineno, column, __method__, tok, @lex_state)
      @lex_state = EXPR_END
      data
    end

    def on_heredoc_end(tok, data)
      data << Token.new(lineno, column, __method__, tok, @lex_state)
      @lex_state = EXPR_BEG
      data
    end

    def on_default(event, tok, data)
      reset
      data << Token.new(lineno, column, event, tok, @lex_state)
    end
  end unless RIPPER_HAS_LEX_STATE

  class InnerStateLex < Ripper::Filter
    def initialize(code)
      super(code)
    end

    def on_default(event, tok, data)
      data << Token.new(lineno, column, event, tok, state)
    end
  end if RIPPER_HAS_LEX_STATE

  def get_squashed_tk
    if @buf.empty?
      tk = @tokens.shift
    else
      tk = @buf.shift
    end
    return nil if tk.nil?
    case tk[:kind]
    when :on_symbeg then
      tk = get_symbol_tk(tk)
    when :on_tstring_beg then
      tk = get_string_tk(tk)
    when :on_backtick then
      if (tk[:state] & (EXPR_FNAME | EXPR_ENDFN)) != 0
        @inner_lex.lex_state = EXPR_ARG unless RIPPER_HAS_LEX_STATE
        tk[:kind] = :on_ident
        tk[:state] = Ripper::Lexer.const_defined?(:State) ? Ripper::Lexer::State.new(EXPR_ARG) : EXPR_ARG
      else
        tk = get_string_tk(tk)
      end
    when :on_regexp_beg then
      tk = get_regexp_tk(tk)
    when :on_embdoc_beg then
      tk = get_embdoc_tk(tk)
    when :on_heredoc_beg then
      @heredoc_queue << retrieve_heredoc_info(tk)
      @inner_lex.lex_state = EXPR_END unless RIPPER_HAS_LEX_STATE
    when :on_nl, :on_ignored_nl, :on_comment, :on_heredoc_end then
      if !@heredoc_queue.empty?
        get_heredoc_tk(*@heredoc_queue.shift)
      elsif tk[:text].nil? # :on_ignored_nl sometimes gives nil
        tk[:text] = ''
      end
    when :on_words_beg then
      tk = get_words_tk(tk)
    when :on_qwords_beg then
      tk = get_words_tk(tk)
    when :on_symbols_beg then
      tk = get_words_tk(tk)
    when :on_qsymbols_beg then
      tk = get_words_tk(tk)
    when :on_op then
      if '&.' == tk[:text]
        tk[:kind] = :on_period
      else
        tk = get_op_tk(tk)
      end
    end
    tk
  end

  private def get_symbol_tk(tk)
    is_symbol = true
    symbol_tk = Token.new(tk.line_no, tk.char_no, :on_symbol)
    if ":'" == tk[:text] or ':"' == tk[:text]
      tk1 = get_string_tk(tk)
      symbol_tk[:text] = tk1[:text]
      symbol_tk[:state] = tk1[:state]
    else
      case (tk1 = get_squashed_tk)[:kind]
      when :on_ident
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      when :on_tstring_content
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = get_squashed_tk[:state] # skip :on_tstring_end
      when :on_tstring_end
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      when :on_op
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      when :on_ivar
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      when :on_cvar
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      when :on_gvar
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      when :on_const
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      when :on_kw
        symbol_tk[:text] = ":#{tk1[:text]}"
        symbol_tk[:state] = tk1[:state]
      else
        is_symbol = false
        tk = tk1
      end
    end
    if is_symbol
      tk = symbol_tk
    end
    tk
  end

  private def get_string_tk(tk)
    string = tk[:text]
    state = nil
    kind = :on_tstring
    loop do
      inner_str_tk = get_squashed_tk
      if inner_str_tk.nil?
        break
      elsif :on_tstring_end == inner_str_tk[:kind]
        string = string + inner_str_tk[:text]
        state = inner_str_tk[:state]
        break
      elsif :on_label_end == inner_str_tk[:kind]
        string = string + inner_str_tk[:text]
        state = inner_str_tk[:state]
        kind = :on_symbol
        break
      else
        string = string + inner_str_tk[:text]
        if :on_embexpr_beg == inner_str_tk[:kind] then
          kind = :on_dstring if :on_tstring == kind
        end
      end
    end
    Token.new(tk.line_no, tk.char_no, kind, string, state)
  end

  private def get_regexp_tk(tk)
    string = tk[:text]
    state = nil
    loop do
      inner_str_tk = get_squashed_tk
      if inner_str_tk.nil?
        break
      elsif :on_regexp_end == inner_str_tk[:kind]
        string = string + inner_str_tk[:text]
        state = inner_str_tk[:state]
        break
      else
        string = string + inner_str_tk[:text]
      end
    end
    Token.new(tk.line_no, tk.char_no, :on_regexp, string, state)
  end

  private def get_embdoc_tk(tk)
    string = tk[:text]
    until :on_embdoc_end == (embdoc_tk = get_squashed_tk)[:kind] do
      string = string + embdoc_tk[:text]
    end
    string = string + embdoc_tk[:text]
    Token.new(tk.line_no, tk.char_no, :on_embdoc, string, embdoc_tk.state)
  end

  private def get_heredoc_tk(heredoc_name, indent)
    string = ''
    start_tk = nil
    prev_tk = nil
    until heredoc_end?(heredoc_name, indent, tk = @tokens.shift) do
      start_tk = tk unless start_tk
      if (prev_tk.nil? or "\n" == prev_tk[:text][-1]) and 0 != tk[:char_no]
        string = string + (' ' * tk[:char_no])
      end
      string = string + tk[:text]
      prev_tk = tk
    end
    start_tk = tk unless start_tk
    prev_tk = tk unless prev_tk
    @buf.unshift tk # closing heredoc
    heredoc_tk = Token.new(start_tk.line_no, start_tk.char_no, :on_heredoc, string, prev_tk.state)
    @buf.unshift heredoc_tk
  end

  private def retrieve_heredoc_info(tk)
    name = tk[:text].gsub(/\A<<[-~]?(['"`]?)(.+)\1\z/, '\2')
    indent = tk[:text] =~ /\A<<[-~]/
    [name, indent]
  end

  private def heredoc_end?(name, indent, tk)
    result = false
    if :on_heredoc_end == tk[:kind] then
      tk_name = tk[:text].chomp
      tk_name.lstrip! if indent
      if name == tk_name
        result = true
      end
    end
    result
  end

  private def get_words_tk(tk)
    string = ''
    start_token = tk[:text]
    start_quote = tk[:text].rstrip[-1]
    line_no = tk[:line_no]
    char_no = tk[:char_no]
    state = tk[:state]
    end_quote =
      case start_quote
      when ?( then ?)
    gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/simple.rb000064400000002653150403134140014775 0ustar00` | ~]
    if redefinable_operators.include?(tk[:text]) and tk[:state] == EXPR_ARG then
      @inner_lex.lex_state = EXPR_ARG unless RIPPER_HAS_LEX_STATE
      tk[:state] = Ripper::Lexer.const_defined?(:State) ? Ripper::Lexer::State.new(EXPR_ARG) : EXPR_ARG
      tk[:kind] = :on_ident
    elsif tk[:text] =~ /^[-+]$/ then
      tk_ahead = get_squashed_tk
      case tk_ahead[:kind]
      when :on_int, :on_float, :on_rational, :on_imaginary then
        tk[:text] += tk_ahead[:text]
        tk[:kind] = tk_ahead[:kind]
        tk[:state] = tk_ahead[:state]
      when :on_heredoc_beg, :on_tstring, :on_dstring # frozen/non-frozen string literal
        tk[:text] += tk_ahead[:text]
        tk[:kind] = tk_ahead[:kind]
        tk[:state] = tk_ahead[:state]
      else
        @buf.unshift tk_ahead
      end
    end
    tk
  end

  def initialize(code)
    @buf = []
    @heredoc_queue = []
    @inner_lex = InnerStateLex.new(code)
    @tokens = @inner_lex.parse([])
  end

  def self.parse(code)
    lex = self.new(code)
    tokens = []
    begin
      while tk = lex.get_squashed_tk
        tokens.push tk
      end
    rescue StopIteration
    end
    tokens
  end

  def self.end?(token)
    (token[:state] & EXPR_END)
  end
end
gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby_tools.rb000064400000005206150403134140015702 0ustar00# frozen_string_literal: true
##
# Parse a non-source file. We basically take the whole thing as one big
# comment.

class RDoc::Parser::Simple < RDoc::Parser

  include RDoc::Parser::Text

  parse_files_matching(//)

  attr_reader :content # :nodoc:

  ##
  # Prepare to parse a plain file

  def initialize(top_level, file_name, content, options, stats)
    super

    preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include

    @content = preprocess.handle @content, @top_level
  end

  ##
  # Extract the file contents and attach them to the TopLevel as a comment

  def scan
    comment = remove_coding_comment @content
    comment = remove_private_comment comment

    comment = RDoc::Comment.new comment, @top_level

    @top_level.comment = comment
    @top_level
  end

  ##
  # Removes the encoding magic comment from +text+

  def remove_coding_comment text
    text.sub(/\A# .*coding[=:].*$/, '')
  end

  ##
  # Removes private comments.
  #
  # Unlike RDoc::Comment#remove_private this implementation only looks for two
  # dashes at the beginning of the line.  Three or more dashes are considered
  # to be a rule and ignored.

  def remove_private_comment comment
    # Workaround for gsub encoding for Ruby 1.9.2 and earlier
    empty = ''
    empty = RDoc::Encoding.change_encoding empty, comment.encoding

    comment = comment.gsub(%r%^--\n.*?^\+\+\n?%m, empty)
    comment.sub(%r%^--\n.*%m, empty)
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby_tools.rb000064400000005206150403134140015702 0ustar00# frozen_string_literal: true
##
# Collection of methods for writing parsers

module RDoc::Parser::RubyTools

  ##
  # Adds a token listener +obj+, but you should probably use token_listener

  def add_token_listener(obj)
    @token_listeners ||= []
    @token_listeners << obj
  end

  ##
  # Fetches the next token from the scanner

  def get_tk
    tk = nil

    if @tokens.empty? then
      if @scanner_point >= @scanner.size
        return nil
      else
        tk = @scanner[@scanner_point]
        @scanner_point += 1
        @read.push tk[:text]
      end
    else
      @read.push @unget_read.shift
      tk = @tokens.shift
    end

   gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/markdown.rb000064400000000732150403134140015322 0ustar00
  end

  ##
  # Removes the token listener +obj+

  def remove_token_listener(obj)
    @token_listeners.delete(obj)
  end

  ##
  # Resets the tools

  def reset
    @read       = []
    @tokens     = []
    @unget_read = []
    @nest = 0
    @scanner_point = 0
  end

  ##
  # Skips whitespace tokens including newlines

  def skip_tkspace
    tokens = []

    while (tk = get_tk) and (:on_sp == tk[:kind] or :on_nl == tk[:kind] or :on_ignored_nl == tk[:kind]) do
      togems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby.rb000064400000166156150403134140014476 0ustar00his token from any listeners
    @token_listeners.each do |obj|
      obj.pop_token
    end if @token_listeners

    nil
  end

end


gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/markdown.rb000064400000000732150403134140015322 0ustar00# frozen_string_literal: true
##
# Parse a Markdown format file.  The parsed RDoc::Markup::Document is attached
# as a file comment.

class RDoc::Parser::Markdown < RDoc::Parser

  include RDoc::Parser::Text

  parse_files_matching(/\.(md|markdown)(?:\.[^.]+)?$/)

  ##
  # Creates an Markdown-format TopLevel for the given file.

  def scan
    comment = RDoc::Comment.new @content, @top_level
    comment.format = 'markdown'

    @top_level.comment = comment
  end

end


gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby.rb000064400000166156150403134140014476 0ustar00# frozen_string_literal: true
##
# This file contains stuff stolen outright from:
#
#   rtags.rb -
#   ruby-lex.rb - ruby lexcal analyzer
#   ruby-token.rb - ruby tokens
#       by Keiju ISHITSUKA (Nippon Rational Inc.)
#

##
# Extracts code elements from a source file returning a TopLevel object
# containing the constituent file elements.
#
# This file is based on rtags
#
# RubyParser understands how to document:
# * classes
# * modules
# * methods
# * constants
# * aliases
# * private, public, protected
# * private_class_function, public_class_function
# * private_constant, public_constant
# * module_function
# * attr, attr_reader, attr_writer, attr_accessor
# * extra accessors given on the command line
# * metaprogrammed methods
# * require
# * include
#
# == Method Arguments
#
#--
# NOTE: I don't think this works, needs tests, remove the paragraph following
# this block when known to work
#
# The parser extracts the arguments from the method definition.  You can
# override this with a custom argument definition using the :args: directive:
#
#   ##
#   # This method tries over and over until it is tired
#
#   def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try
#     puts thing_to_try
#     go_go_go thing_to_try, tries - 1
#   end
#
# If you have a more-complex set of overrides you can use the :call-seq:
# directive:
#++
#
# The parser extracts the arguments from the method definition.  You can
# override this with a custom argument definition using the :call-seq:
# directive:
#
#   ##
#   # This method can be called with a range or an offset and length
#   #
#   # :call-seq:
#   #   my_method(Range)
#   #   my_method(offset, length)
#
#   def my_method(*args)
#   end
#
# The parser extracts +yield+ expressions from method bodies to gather the
# yielded argument names.  If your method manually calls a block instead of
# yielding or you want to override the discovered argument names use
# the :yields: directive:
#
#   ##
#   # My method is awesome
#
#   def my_method(&block) # :yields: happy, times
#     block.call 1, 2
#   end
#
# == Metaprogrammed Methods
#
# To pick up a metaprogrammed method, the parser looks for a comment starting
# with '##' before an identifier:
#
#   ##
#   # This is a meta-programmed method!
#
#   add_my_method :meta_method, :arg1, :arg2
#
# The parser looks at the token after the identifier to determine the name, in
# this example, :meta_method.  If a name cannot be found, a warning is printed
# and 'unknown is used.
#
# You can force the name of a method using the :method: directive:
#
#   ##
#   # :method: some_method!
#
# By default, meta-methods are instance methods.  To indicate that a method is
# a singleton method instead use the :singleton-method: directive:
#
#   ##
#   # :singleton-method:
#
# You can also use the :singleton-method: directive with a name:
#
#   ##
#   # :singleton-method: some_method!
#
# You can define arguments for metaprogrammed methods via either the
# :call-seq:, :arg: or :args: directives.
#
# Additionally you can mark a method as an attribute by
# using :attr:, :attr_reader:, :attr_writer: or :attr_accessor:.  Just like
# for :method:, the name is optional.
#
#   ##
#   # :attr_reader: my_attr_name
#
# == Hidden methods and attributes
#
# You can provide documentation for methods that don't appear using
# the :method:, :singleton-method: and :attr: directives:
#
#   ##
#   # :attr_writer: ghost_writer
#   # There is an attribute here, but you can't see it!
#
#   ##
#   # :method: ghost_method
#   # There is a method here, but you can't see it!
#
#   ##
#   # this is a comment for a regular method
#
#   def regular_method() end
#
# Note that by default, the :method: directive will be ignored if there is a
# standard rdocable item following it.

require 'ripper'
require_relative 'ripper_state_lex'

class RDoc::Parser::Ruby < RDoc::Parser

  parse_files_matching(/\.rbw?$/)

  include RDoc::TokenStream
  include RDoc::Parser::RubyTools

  ##
  # RDoc::NormalClass type

  NORMAL = "::"

  ##
  # RDoc::SingleClass type

  SINGLE = "<<"

  ##
  # Creates a new Ruby parser.

  def initialize(top_level, file_name, content, options, stats)
    super

    content = handle_tab_width(content)

    @size = 0
    @token_listeners = nil
    content = RDoc::Encoding.remove_magic_comment content
    @scanner = RDoc::Parser::RipperStateLex.parse(content)
    @content = content
    @scanner_point = 0
    @prev_seek = nil
    @markup = @options.markup
    @track_visibility = :nodoc != @options.visibility
    @encoding = @options.encoding

    reset
  end

  def tk_nl?(tk)
    :on_nl == tk[:kind] or :on_ignored_nl == tk[:kind]
  end

  ##
  # Retrieves the read token stream and replaces +pattern+ with +replacement+
  # using gsub.  If the result is only a ";" returns an empty string.

  def get_tkread_clean pattern, replacement # :nodoc:
    read = get_tkread.gsub(pattern, replacement).strip
    return '' if read == ';'
    read
  end

  ##
  # Extracts the visibility information for the visibility token +tk+
  # and +single+ class type identifier.
  #
  # Returns the visibility type (a string), the visibility (a symbol) and
  # +singleton+ if the methods following should be converted to singleton
  # methods.

  def get_visibility_information tk, single # :nodoc:
    vis_type  = tk[:text]
    singleton = single == SINGLE

    vis =
      case vis_type
      when 'private'   then :private
      when 'protected' then :protected
      when 'public'    then :public
      when 'private_class_method' then
        singleton = true
        :private
      when 'public_class_method' then
        singleton = true
        :public
      when 'module_function' then
        singleton = true
        :public
      else
        raise RDoc::Error, "Invalid visibility: #{tk.name}"
      end

    return vis_type, vis, singleton
  end

  ##
  # Look for the first comment in a file that isn't a shebang line.

  def collect_first_comment
    skip_tkspace
    comment = ''.dup
    comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
    first_line = true
    first_comment_tk_kind = nil
    line_no = nil

    tk = get_tk

    while tk && (:on_comment == tk[:kind] or :on_embdoc == tk[:kind])
      comment_body = retrieve_comment_body(tk)
      if first_line and comment_body =~ /\A#!/ then
        skip_tkspace
        tk = get_tk
      elsif first_line and comment_body =~ /\A#\s*-\*-/ then
        first_line = false
        skip_tkspace
        tk = get_tk
      else
        break if first_comment_tk_kind and not first_comment_tk_kind === tk[:kind]
        first_comment_tk_kind = tk[:kind]

        line_no = tk[:line_no] if first_line
        first_line = false
        comment << comment_body
        tk = get_tk

        if :on_nl === tk then
          skip_tkspace_without_nl
          tk = get_tk
        end
      end
    end

    unget_tk tk

    new_comment comment, line_no
  end

  ##
  # Consumes trailing whitespace from the token stream

  def consume_trailing_spaces # :nodoc:
    skip_tkspace_without_nl
  end

  ##
  # Creates a new attribute in +container+ with +name+.

  def create_attr container, single, name, rw, comment # :nodoc:
    att = RDoc::Attr.new get_tkread, name, rw, comment, single == SINGLE
    record_location att

    container.add_attribute att
    @stats.add_attribute att

    att
  end

  ##
  # Creates a module alias in +container+ at +rhs_name+ (or at the top-level
  # for "::") with the name from +constant+.

  def create_module_alias container, constant, rhs_name # :nodoc:
    mod = if rhs_name =~ /^::/ then
            @store.find_class_or_module rhs_name
          else
            container.find_module_named rhs_name
          end

    container.add_module_alias mod, rhs_name, constant, @top_level
  end

  ##
  # Aborts with +msg+

  def error(msg)
    msg = make_message msg

    abort msg
  end

  ##
  # Looks for a true or false token.

  def get_bool
    skip_tkspace
    tk = get_tk
    if :on_kw == tk[:kind] && 'true' == tk[:text]
      true
    elsif :on_kw == tk[:kind] && ('false' == tk[:text] || 'nil' == tk[:text])
      false
    else
      unget_tk tk
      true
    end
  end

  ##
  # Look for the name of a class of module (optionally with a leading :: or
  # with :: separated named) and return the ultimate name, the associated
  # container, and the given name (with the ::).

  def get_class_or_module container, ignore_constants = false
    skip_tkspace
    name_t = get_tk
    given_name = ''.dup

    # class ::A -> A is in the top level
    if :on_op == name_t[:kind] and '::' == name_t[:text] then # bug
      name_t = get_tk
      container = @top_level
      given_name << '::'
    end

    skip_tkspace_without_nl
    given_name << name_t[:text]

    is_self = name_t[:kind] == :on_op && name_t[:text] == '<<'
    new_modules = []
    while !is_self && (tk = peek_tk) and :on_op == tk[:kind] and '::' == tk[:text] do
      prev_container = container
      container = container.find_module_named name_t[:text]
      container ||=
        if ignore_constants then
          c = RDoc::NormalModule.new name_t[:text]
          c.store = @store
          new_modules << [prev_container, c]
          c
        else
          c = prev_container.add_module RDoc::NormalModule, name_t[:text]
          c.ignore unless prev_container.document_children
          @top_level.add_to_classes_or_modules c
          c
        end

      record_location container

      get_tk
      skip_tkspace
      if :on_lparen == peek_tk[:kind] # ProcObjectInConstant::()
        parse_method_or_yield_parameters
        break
      end
      name_t = get_tk
      unless :on_const == name_t[:kind] || :on_ident == name_t[:kind]
        raise RDoc::Error, "Invalid class or module definition: #{given_name}"
      end
      if prev_container == container and !ignore_constants
        given_name = name_t[:text]
      else
        given_name << '::' + name_t[:text]
      end
    end

    skip_tkspace_without_nl

    return [container, name_t, given_name, new_modules]
  end

  ##
  # Skip opening parentheses and yield the block.
  # Skip closing parentheses too when exists.

  def skip_parentheses(&block)
    left_tk = peek_tk

    if :on_lparen == left_tk[:kind]
      get_tk

      ret = skip_parentheses(&block)

      right_tk = peek_tk
      if :on_rparen == right_tk[:kind]
        get_tk
      end

      ret
    else
      yield
    end
  end

  ##
  # Return a superclass, which can be either a constant of an expression

  def get_class_specification
    tk = peek_tk
    if tk.nil?
      return ''
    elsif :on_kw == tk[:kind] && 'self' == tk[:text]
      return 'self'
    elsif :on_gvar == tk[:kind]
      return ''
    end

    res = get_constant

    skip_tkspace_without_nl

    get_tkread # empty out read buffer

    tk = get_tk
    return res unless tk

    case tk[:kind]
    when :on_nl, :on_comment, :on_embdoc, :on_semicolon then
      unget_tk(tk)
      return res
    end

    res += parse_call_parameters(tk)
    res
  end

  ##
  # Parse a constant, which might be qualified by one or more class or module
  # names

  def get_constant
    res = ""
    skip_tkspace_without_nl
    tk = get_tk

    while tk && ((:on_op == tk[:kind] && '::' == tk[:text]) || :on_const == tk[:kind]) do
      res += tk[:text]
      tk = get_tk
    end

    unget_tk(tk)
    res
  end

  ##
  # Get an included module that may be surrounded by parens

  def get_included_module_with_optional_parens
    skip_tkspace_without_nl
    get_tkread
    tk = get_tk
    end_token = get_end_token tk
    return '' unless end_token

    nest = 0
    continue = false
    only_constant = true

    while tk != nil do
      is_element_of_constant = false
      case tk[:kind]
      when :on_semicolon then
        break if nest == 0
      when :on_lbracket then
        nest += 1
      when :on_rbracket then
        nest -= 1
      when :on_lbrace then
        nest += 1
      when :on_rbrace then
        nest -= 1
        if nest <= 0
          # we might have a.each { |i| yield i }
          unget_tk(tk) if nest < 0
          break
        end
      when :on_lparen then
        nest += 1
      when end_token[:kind] then
        if end_token[:kind] == :on_rparen
          nest -= 1
          break if nest <= 0
        else
          break if nest <= 0
        end
      when :on_rparen then
        nest -= 1
      when :on_comment, :on_embdoc then
        @read.pop
        if :on_nl == end_token[:kind] and "\n" == tk[:text][-1] and
          (!continue or (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) != 0) then
          break if !continue and nest <= 0
        end
      when :on_comma then
        continue = true
      when :on_ident then
        continue = false if continue
      when :on_kw then
        case tk[:text]
        when 'def', 'do', 'case', 'for', 'begin', 'class', 'module'
          nest += 1
        when 'if', 'unless', 'while', 'until', 'rescue'
          # postfix if/unless/while/until/rescue must be EXPR_LABEL
          nest += 1 unless (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) != 0
        when 'end'
          nest -= 1
          break if nest == 0
        end
      when :on_const then
        is_element_of_constant = true
      when :on_op then
        is_element_of_constant = true if '::' == tk[:text]
      end
      only_constant = false unless is_element_of_constant
      tk = get_tk
    end

    if only_constant
      get_tkread_clean(/\s+/, ' ')
    else
      ''
    end
  end

  ##
  # Little hack going on here. In the statement:
  #
  #   f = 2*(1+yield)
  #
  # We see the RPAREN as the next token, so we need to exit early.  This still
  # won't catch all cases (such as "a = yield + 1"

  def get_end_token tk # :nodoc:
    case tk[:kind]
    when :on_lparen
      token = RDoc::Parser::RipperStateLex::Token.new
      token[:kind] = :on_rparen
      token[:text] = ')'
      token
    when :on_rparen
      nil
    else
      token = RDoc::Parser::RipperStateLex::Token.new
      token[:kind] = :on_nl
      token[:text] = "\n"
      token
    end
  end

  ##
  # Retrieves the method container for a singleton method.

  def get_method_container container, name_t # :nodoc:
    prev_container = container
    container = container.find_module_named(name_t[:text])

    unless container then
      constant = prev_container.constants.find do |const|
        const.name == name_t[:text]
      end

      if constant then
        parse_method_dummy prev_container
        return
      end
    end

    unless container then
      # TODO seems broken, should starting at Object in @store
      obj = name_t[:text].split("::").inject(Object) do |state, item|
        state.const_get(item)
      end rescue nil

      type = obj.class == Class ? RDoc::NormalClass : RDoc::NormalModule

      unless [Class, Module].include?(obj.class) then
        warn("Couldn't find #{name_t[:text]}. Assuming it's a module")
      end

      if type == RDoc::NormalClass then
        sclass = obj.superclass ? obj.superclass.name : nil
        container = prev_container.add_class type, name_t[:text], sclass
      else
        container = prev_container.add_module type, name_t[:text]
      end

      record_location container
    end

    container
  end

  ##
  # Extracts a name or symbol from the token stream.

  def get_symbol_or_name
    tk = get_tk
    case tk[:kind]
    when :on_symbol then
      text = tk[:text].sub(/^:/, '')

      next_tk = peek_tk
      if next_tk && :on_op == next_tk[:kind] && '=' == next_tk[:text] then
        get_tk
        text << '='
      end

      text
    when :on_ident, :on_const, :on_gvar, :on_cvar, :on_ivar, :on_op, :on_kw then
      tk[:text]
    when :on_tstring, :on_dstring then
      tk[:text][1..-2]
    else
      raise RDoc::Error, "Name or symbol expected (got #{tk})"
    end
  end

  ##
  # Marks containers between +container+ and +ancestor+ as ignored

  def suppress_parents container, ancestor # :nodoc:
    while container and container != ancestor do
      container.suppress unless container.documented?
      container = container.parent
    end
  end

  ##
  # Look for directives in a normal comment block:
  #
  #   # :stopdoc:
  #   # Don't display comment from this point forward
  #
  # This routine modifies its +comment+ parameter.

  def look_for_directives_in container, comment
    @preprocess.handle comment, container do |directive, param|
      case directive
      when 'method', 'singleton-method',
           'attr', 'attr_accessor', 'attr_reader', 'attr_writer' then
        false # handled elsewhere
      when 'section' then
        break unless container.kind_of?(RDoc::Context)
        container.set_current_section param, comment.dup
        comment.text = ''
        break
      end
    end

    comment.remove_private
  end

  ##
  # Adds useful info about the parser to +message+

  def make_message message
    prefix = "#{@file_name}:".dup

    tk = peek_tk
    prefix << "#{tk[:line_no]}:#{tk[:char_no]}:" if tk

    "#{prefix} #{message}"
  end

  ##
  # Creates a comment with the correct format

  def new_comment comment, line_no = nil
    c = RDoc::Comment.new comment, @top_level, :ruby
    c.line = line_no
    c.format = @markup
    c
  end

  ##
  # Creates an RDoc::Attr for the name following +tk+, setting the comment to
  # +comment+.

  def parse_attr(context, single, tk, comment)
    line_no = tk[:line_no]

    args = parse_symbol_arg 1
    if args.size > 0 then
      name = args[0]
      rw = "R"
      skip_tkspace_without_nl
      tk = get_tk

      if :on_comma == tk[:kind] then
        rw = "RW" if get_bool
      else
        unget_tk tk
      end

      att = create_attr context, single, name, rw, comment
      att.line   = line_no

      read_documentation_modifiers att, RDoc::ATTR_MODIFIERS
    else
      warn "'attr' ignored - looks like a variable"
    end
  end

  ##
  # Creates an RDoc::Attr for each attribute listed after +tk+, setting the
  # comment for each to +comment+.

  def parse_attr_accessor(context, single, tk, comment)
    line_no = tk[:line_no]

    args = parse_symbol_arg
    rw = "?"

    tmp = RDoc::CodeObject.new
    read_documentation_modifiers tmp, RDoc::ATTR_MODIFIERS
    # TODO In most other places we let the context keep track of document_self
    # and add found items appropriately but here we do not.  I'm not sure why.
    return if @track_visibility and not tmp.document_self

    case tk[:text]
    when "attr_reader"   then rw = "R"
    when "attr_writer"   then rw = "W"
    when "attr_accessor" then rw = "RW"
    else
      rw = '?'
    end

    for name in args
      att = create_attr context, single, name, rw, comment
      att.line   = line_no
    end
  end

  ##
  # Parses an +alias+ in +context+ with +comment+

  def parse_alias(context, single, tk, comment)
    line_no = tk[:line_no]

    skip_tkspace

    if :on_lparen === peek_tk[:kind] then
      get_tk
      skip_tkspace
    end

    new_name = get_symbol_or_name

    skip_tkspace
    if :on_comma === peek_tk[:kind] then
      get_tk
      skip_tkspace
    end

    begin
      old_name = get_symbol_or_name
    rescue RDoc::Error
      return
    end

    al = RDoc::Alias.new(get_tkread, old_name, new_name, comment,
                         single == SINGLE)
    record_location al
    al.line   = line_no

    read_documentation_modifiers al, RDoc::ATTR_MODIFIERS
    context.add_alias al
    @stats.add_alias al

    al
  end

  ##
  # Extracts call parameters from the token stream.

  def parse_call_parameters(tk)
    end_token = case tk[:kind]
                when :on_lparen
                  :on_rparen
                when :on_rparen
                  return ""
                else
                  :on_nl
                end
    nest = 0

    loop do
      break if tk.nil?
      case tk[:kind]
      when :on_semicolon
        break
      when :on_lparen
        nest += 1
      when end_token
        if end_token == :on_rparen
          nest -= 1
          break if RDoc::Parser::RipperStateLex.end?(tk) and nest <= 0
        else
          break if RDoc::Parser::RipperStateLex.end?(tk)
        end
      when :on_comment, :on_embdoc
        unget_tk(tk)
        break
      when :on_op
        if tk[:text] =~ /^(.{1,2})?=$/
          unget_tk(tk)
          break
        end
      end
      tk = get_tk
    end

    get_tkread_clean "\n", " "
  end

  ##
  # Parses a class in +context+ with +comment+

  def parse_class container, single, tk, comment
    line_no = tk[:line_no]

    declaration_context = container
    container, name_t, given_name, = get_class_or_module container

    if name_t[:kind] == :on_const
      cls = parse_class_regular container, declaration_context, single,
        name_t, given_name, comment
    elsif name_t[:kind] == :on_op && name_t[:text] == '<<'
      case name = skip_parentheses { get_class_specification }
      when 'self', container.name
        read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS
        parse_statements container, SINGLE
        return # don't update line
      else
        cls = parse_class_singleton container, name, comment
      end
    else
      warn "Expected class name or '<<'. Got #{name_t[:kind]}: #{name_t[:text].inspect}"
      return
    end

    cls.line   = line_no

    # after end modifiers
    read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS

    cls
  end

  ##
  # Parses and creates a regular class

  def parse_class_regular container, declaration_context, single, # :nodoc:
                          name_t, given_name, comment
    superclass = '::Object'

    if given_name =~ /^::/ then
      declaration_context = @top_level
      given_name = $'
    end

    tk = peek_tk
    if tk[:kind] == :on_op && tk[:text] == '<' then
      get_tk
      skip_tkspace
      superclass = get_class_specification
      superclass = '(unknown)' if superclass.empty?
    end

    cls_type = single == SINGLE ? RDoc::SingleClass : RDoc::NormalClass
    cls = declaration_context.add_class cls_type, given_name, superclass
    cls.ignore unless container.document_children

    read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS
    record_location cls

    cls.add_comment comment, @top_level

    @top_level.add_to_classes_or_modules cls
    @stats.add_class cls

    suppress_parents container, declaration_context unless cls.document_self

    parse_statements cls

    cls
  end

  ##
  # Parses a singleton class in +container+ with the given +name+ and
  # +comment+.

  def parse_class_singleton container, name, comment # :nodoc:
    other = @store.find_class_named name

    unless other then
      if name =~ /^::/ then
        name = $'
        container = @top_level
      end

      other = container.add_module RDoc::NormalModule, name
      record_location other

      # class << $gvar
      other.ignore if name.empty?

      other.add_comment comment, @top_level
    end

    # notify :nodoc: all if not a constant-named class/module
    # (and remove any comment)
    unless name =~ /\A(::)?[A-Z]/ then
      other.document_self = nil
      other.document_children = false
      other.clear_comment
    end

    @top_level.add_to_classes_or_modules other
    @stats.add_class other

    read_documentation_modifiers other, RDoc::CLASS_MODIFIERS
    parse_statements(other, SINGLE)

    other
  end

  ##
  # Parses a constant in +context+ with +comment+.  If +ignore_constants+ is
  # true, no found constants will be added to RDoc.

  def parse_constant container, tk, comment, ignore_constants = false
    line_no = tk[:line_no]

    name = tk[:text]
    skip_tkspace_without_nl

    return unless name =~ /^\w+$/

    new_modules = []
    if :on_op == peek_tk[:kind] && '::' == peek_tk[:text] then
      unget_tk tk

      container, name_t, _, new_modules = get_class_or_module container, true

      name = name_t[:text]
    end

    is_array_or_hash = false
    if peek_tk && :on_lbracket == peek_tk[:kind]
      get_tk
      nest = 1
      while bracket_tk = get_tk
        case bracket_tk[:kind]
        when :on_lbracket
          nest += 1
        when :on_rbracket
          nest -= 1
          break if nest == 0
        end
      end
      skip_tkspace_without_nl
      is_array_or_hash = true
    end

    unless peek_tk && :on_op == peek_tk[:kind] && '=' == peek_tk[:text] then
      return false
    end
    get_tk

    unless ignore_constants
      new_modules.each do |prev_c, new_module|
        prev_c.add_module_by_normal_module new_module
        new_module.ignore unless prev_c.document_children
        @top_level.add_to_classes_or_modules new_module
      end
    end

    value = ''
    con = RDoc::Constant.new name, value, comment

    body = parse_constant_body container, con, is_array_or_hash

    return unless body

    con.value = body
    record_location con
    con.line   = line_no
    read_documentation_modifiers con, RDoc::CONSTANT_MODIFIERS

    return if is_array_or_hash

    @stats.add_constant con
    container.add_constant con

    true
  end

  def parse_constant_body container, constant, is_array_or_hash # :nodoc:
    nest     = 0
    rhs_name = ''.dup

    get_tkread

    tk = get_tk

    body = nil
    loop do
      break if tk.nil?
      if :on_semicolon == tk[:kind] then
        break if nest <= 0
      elsif [:on_tlambeg, :on_lparen, :on_lbrace, :on_lbracket].include?(tk[:kind]) then
        nest += 1
      elsif (:on_kw == tk[:kind] && 'def' == tk[:text]) then
        nest += 1
      elsif (:on_kw == tk[:kind] && %w{do if unless case begin}.include?(tk[:text])) then
        if (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) == 0
          nest += 1
        end
      elsif [:on_rparen, :on_rbrace, :on_rbracket].include?(tk[:kind]) ||
            (:on_kw == tk[:kind] && 'end' == tk[:text]) then
        nest -= 1
      elsif (:on_comment == tk[:kind] or :on_embdoc == tk[:kind]) then
        unget_tk tk
        if nest <= 0 and RDoc::Parser::RipperStateLex.end?(tk) then
          body = get_tkread_clean(/^[ \t]+/, '')
          read_documentation_modifiers constant, RDoc::CONSTANT_MODIFIERS
          break
        else
          read_documentation_modifiers constant, RDoc::CONSTANT_MODIFIERS
        end
      elsif :on_const == tk[:kind] then
        rhs_name << tk[:text]

        next_tk = peek_tk
        if nest <= 0 and (next_tk.nil? || :on_nl == next_tk[:kind]) then
          create_module_alias container, constant, rhs_name unless is_array_or_hash
          break
        end
      elsif :on_nl == tk[:kind] then
        if nest <= 0 and RDoc::Parser::RipperStateLex.end?(tk) then
          unget_tk tk
          break
        end
      elsif :on_op == tk[:kind] && '::' == tk[:text]
        rhs_name << '::'
      end
      tk = get_tk
    end

    body ? body : get_tkread_clean(/^[ \t]+/, '')
  end

  ##
  # Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for
  # :method: or :attr: directives in +comment+.

  def parse_comment container, tk, comment
    return parse_comment_tomdoc container, tk, comment if @markup == 'tomdoc'
    column  = tk[:char_no]
    line_no = comment.line.nil? ? tk[:line_no] : comment.line

    comment.text = comment.text.sub(/(^# +:?)(singleton-)(method:)/, '\1\3')
    singleton = !!$~

    co =
      if (comment.text = comment.text.sub(/^# +:?method: *(\S*).*?\n/i, '')) && !!$~ then
        line_no += $`.count("\n")
        parse_comment_ghost container, comment.text, $1, column, line_no, comment
      elsif (comment.text = comment.text.sub(/# +:?(attr(_reader|_writer|_accessor)?): *(\S*).*?\n/i, '')) && !!$~ then
        parse_comment_attr container, $1, $3, comment
      end

    if co then
      co.singleton = singleton
      co.line      = line_no
    end

    true
  end

  ##
  # Parse a comment that is describing an attribute in +container+ with the
  # given +name+ and +comment+.

  def parse_comment_attr container, type, name, comment # :nodoc:
    return if name.empty?

    rw = case type
         when 'attr_reader' then 'R'
         when 'attr_writer' then 'W'
         else 'RW'
         end

    create_attr container, NORMAL, name, rw, comment
  end

  def parse_comment_ghost container, text, name, column, line_no, # :nodoc:
                          comment
    name = nil if name.empty?

    meth = RDoc::GhostMethod.new get_tkread, name
    record_location meth

    meth.start_collecting_tokens
    indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
    position_comment = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
    position_comment[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
    newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
    meth.add_tokens [position_comment, newline, indent]

    meth.params =
      if text.sub!(/^#\s+:?args?:\s*(.*?)\s*$/i, '') then
        $1
      else
        ''
      end

    comment.normalize
    comment.extract_call_seq meth

    return unless meth.name

    container.add_method meth

    meth.comment = comment

    @stats.add_method meth

    meth
  end

  ##
  # Creates an RDoc::Method on +container+ from +comment+ if there is a
  # Signature section in the comment

  def parse_comment_tomdoc container, tk, comment
    return unless signature = RDoc::TomDoc.signature(comment)
    column  = tk[:char_no]
    line_no = tk[:line_no]

    name, = signature.split %r%[ \(]%, 2

    meth = RDoc::GhostMethod.new get_tkread, name
    record_location meth
    meth.line      = line_no

    meth.start_collecting_tokens
    indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
    position_comment = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
    position_comment[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
    newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
    meth.add_tokens [position_comment, newline, indent]

    meth.call_seq = signature

    comment.normalize

    return unless meth.name

    container.add_method meth

    meth.comment = comment

    @stats.add_method meth
  end

  ##
  # Parses an +include+ or +extend+, indicated by the +klass+ and adds it to
  # +container+ # with +comment+

  def parse_extend_or_include klass, container, comment # :nodoc:
    loop do
      skip_tkspace_comment

      name = get_included_module_with_optional_parens

      unless name.empty? then
        obj = container.add klass, name, comment
        record_location obj
      end

      return if peek_tk.nil? || :on_comma != peek_tk[:kind]

      get_tk
    end
  end

  ##
  # Parses an +included+ with a block feature of ActiveSupport::Concern.

  def parse_included_with_activesupport_concern container, comment # :nodoc:
    skip_tkspace_without_nl
    tk = get_tk
    unless tk[:kind] == :on_lbracket || (tk[:kind] == :on_kw && tk[:text] == 'do')
      unget_tk tk
      return nil # should be a block
    end

    parse_statements container

    container
  end

  ##
  # Parses identifiers that can create new methods or change visibility.
  #
  # Returns true if the comment was not consumed.

  def parse_identifier container, single, tk, comment # :nodoc:
    case tk[:text]
    when 'private', 'protected', 'public', 'private_class_method',
         'public_class_method', 'module_function' then
      parse_visibility container, single, tk
      return true
    when 'private_constant', 'public_constant'
      parse_constant_visibility container, single, tk
      return true
    when 'attr' then
      parse_attr container, single, tk, comment
    when /^attr_(reader|writer|accessor)$/ then
      parse_attr_accessor container, single, tk, comment
    when 'alias_method' then
      parse_alias container, single, tk, comment
    when 'require', 'include' then
      # ignore
    else
      if comment.text =~ /\A#\#$/ then
        case comment.text
        when /^# +:?attr(_reader|_writer|_accessor)?:/ then
          parse_meta_attr container, single, tk, comment
        else
          method = parse_meta_method container, single, tk, comment
          method.params = container.params if
            container.params
          method.block_params = container.block_params if
            container.block_params
        end
      end
    end

    false
  end

  ##
  # Parses a meta-programmed attribute and creates an RDoc::Attr.
  #
  # To create foo and bar attributes on class C with comment "My attributes":
  #
  #   class C
  #
  #     ##
  #     # :attr:
  #     #
  #     # My attributes
  #
  #     my_attr :foo, :bar
  #
  #   end
  #
  # To create a foo attribute on class C with comment "My attribute":
  #
  #   class C
  #
  #     ##
  #     # :attr: foo
  #     #
  #     # My attribute
  #
  #     my_attr :foo, :bar
  #
  #   end

  def parse_meta_attr(context, single, tk, comment)
    args = parse_symbol_arg
    rw = "?"

    # If nodoc is given, don't document any of them

    tmp = RDoc::CodeObject.new
    read_documentation_modifiers tmp, RDoc::ATTR_MODIFIERS

    regexp = /^# +:?(attr(_reader|_writer|_accessor)?): *(\S*).*?\n/i
    if regexp =~ comment.text then
      comment.text = comment.text.sub(regexp, '')
      rw = case $1
           when 'attr_reader' then 'R'
           when 'attr_writer' then 'W'
           else 'RW'
           end
      name = $3 unless $3.empty?
    end

    if name then
      att = create_attr context, single, name, rw, comment
    else
      args.each do |attr_name|
        att = create_attr context, single, attr_name, rw, comment
      end
    end

    att
  end

  ##
  # Parses a meta-programmed method

  def parse_meta_method(container, single, tk, comment)
    column  = tk[:char_no]
    line_no = tk[:line_no]

    start_collecting_tokens
    add_token tk
    add_token_listener self

    skip_tkspace_without_nl

    comment.text = comment.text.sub(/(^# +:?)(singleton-)(method:)/, '\1\3')
    singleton = !!$~

    name = parse_meta_method_name comment, tk

    return unless name

    meth = RDoc::MetaMethod.new get_tkread, name
    record_location meth
    meth.line   = line_no
    meth.singleton = singleton

    remove_token_listener self

    meth.start_collecting_tokens
    indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
    position_comment = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
    position_comment[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
    newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
    meth.add_tokens [position_comment, newline, indent]
    meth.add_tokens @token_stream

    parse_meta_method_params container, single, meth, tk, comment

    meth.comment = comment

    @stats.add_method meth

    meth
  end

  ##
  # Parses the name of a metaprogrammed method.  +comment+ is used to
  # determine the name while +tk+ is used in an error message if the name
  # cannot be determined.

  def parse_meta_method_name comment, tk # :nodoc:
    if comment.text.sub!(/^# +:?method: *(\S*).*?\n/i, '') then
      return $1 unless $1.empty?
    end

    name_t = get_tk

    if :on_symbol == name_t[:kind] then
      name_t[:text][1..-1]
    elsif :on_tstring == name_t[:kind] then
      name_t[:text][1..-2]
    elsif :on_op == name_t[:kind] && '=' == name_t[:text] then # ignore
      remove_token_listener self

      nil
    else
      warn "unknown name token #{name_t.inspect} for meta-method '#{tk[:text]}'"
      'unknown'
    end
  end

  ##
  # Parses the parameters and block for a meta-programmed method.

  def parse_meta_method_params container, single, meth, tk, comment # :nodoc:
    token_listener meth do
      meth.params = ''

      look_for_directives_in meth, comment
      comment.normalize
      comment.extract_call_seq meth

      container.add_method meth

      last_tk = tk

      while tk = get_tk do
        if :on_semicolon == tk[:kind] then
          break
        elsif :on_nl == tk[:kind] then
          break unless last_tk and :on_comma == last_tk[:kind]
        elsif :on_sp == tk[:kind] then
          # expression continues
        elsif :on_kw == tk[:kind] && 'do' == tk[:text] then
          parse_statements container, single, meth
          break
        else
          last_tk = tk
        end
      end
    end
  end

  ##
  # Parses a normal method defined by +def+

  def parse_method(container, single, tk, comment)
    singleton = nil
    added_container = false
    name = nil
    column  = tk[:char_no]
    line_no = tk[:line_no]

    start_collecting_tokens
    add_token tk

    token_listener self do
      prev_container = container
      name, container, singleton = parse_method_name container
      added_container = container != prev_container
    end

    return unless name

    meth = RDoc::AnyMethod.new get_tkread, name
    look_for_directives_in meth, comment
    meth.singleton = single == SINGLE ? true : singleton

    record_location meth
    meth.line   = line_no

    meth.start_collecting_tokens
    indent = RDoc::Parser::RipperStateLex::Token.new(1, 1, :on_sp, ' ' * column)
    token = RDoc::Parser::RipperStateLex::Token.new(line_no, 1, :on_comment)
    token[:text] = "# File #{@top_level.relative_name}, line #{line_no}"
    newline = RDoc::Parser::RipperStateLex::Token.new(0, 0, :on_nl, "\n")
    meth.add_tokens [token, newline, indent]
    meth.add_tokens @token_stream

    parse_method_params_and_body container, single, meth, added_container

    comment.normalize
    comment.extract_call_seq meth

    meth.comment = comment

    # after end modifiers
    read_documentation_modifiers meth, RDoc::METHOD_MODIFIERS

    @stats.add_method meth
  end

  ##
  # Parses the parameters and body of +meth+

  def parse_method_params_and_body container, single, meth, added_container
    token_listener meth do
      parse_method_parameters meth

      if meth.document_self or not @track_visibility then
        container.add_method meth
      elsif added_container then
        container.document_self = false
      end

      # Having now read the method parameters and documentation modifiers, we
      # now know whether we have to rename #initialize to ::new

      if meth.name == "initialize" && !meth.singleton then
        if meth.dont_rename_initialize then
          meth.visibility = :protected
        else
          meth.singleton = true
          meth.name = "new"
          meth.visibility = :public
        end
      end

      parse_statements container, single, meth
    end
  end

  ##
  # Parses a method that needs to be ignored.

  def parse_method_dummy container
    dummy = RDoc::Context.new
    dummy.parent = container
    dummy.store  = container.store
    skip_method dummy
  end

  ##
  # Parses the name of a method in +container+.
  #
  # Returns the method name, the container it is in (for def Foo.name) and if
  # it is a singleton or regular method.

  def parse_method_name container # :nodoc:
    skip_tkspace
    name_t = get_tk
    back_tk = skip_tkspace_without_nl
    singleton = false

    dot = get_tk
    if dot[:kind] == :on_period || (dot[:kind] == :on_op && dot[:text] == '::') then
      singleton = true

      name, container = parse_method_name_singleton container, name_t
    else
      unget_tk dot
      back_tk.reverse_each do |token|
        unget_tk token
      end

      name = parse_method_name_regular container, name_t
    end

    return name, container, singleton
  end

  ##
  # For the given +container+ and initial name token +name_t+ the method name
  # is parsed from the token stream for a regular method.

  def parse_method_name_regular container, name_t # :nodoc:
    if :on_op == name_t[:kind] && (%w{* & [] []= <<}.include?(name_t[:text])) then
      name_t[:text]
    else
      unless [:on_kw, :on_const, :on_ident].include?(name_t[:kind]) then
        warn "expected method name token, . or ::, got #{name_t.inspect}"
        skip_method container
        return
      end
      name_t[:text]
    end
  end

  ##
  # For the given +container+ and initial name token +name_t+ the method name
  # and the new +container+ (if necessary) are parsed from the token stream
  # for a singleton method.

  def parse_method_name_singleton container, name_t # :nodoc:
    skip_tkspace
    name_t2 = get_tk

    if (:on_kw == name_t[:kind] && 'self' == name_t[:text]) || (:on_op == name_t[:kind] && '%' == name_t[:text]) then
      # NOTE: work around '[' being consumed early
      if :on_lbracket == name_t2[:kind]
        get_tk
        name = '[]'
      else
        name = name_t2[:text]
      end
    elsif :on_const == name_t[:kind] then
      name = name_t2[:text]

      container = get_method_container container, name_t

      return unless container

      name
    elsif :on_ident == name_t[:kind] || :on_ivar == name_t[:kind] || :on_gvar == name_t[:kind] then
      parse_method_dummy container

      name = nil
    elsif (:on_kw == name_t[:kind]) && ('true' == name_t[:text] || 'false' == name_t[:text] || 'nil' == name_t[:text]) then
      klass_name = "#{name_t[:text].capitalize}Class"
      container = @store.find_class_named klass_name
      container ||= @top_level.add_class RDoc::NormalClass, klass_name

      name = name_t2[:text]
    else
      warn "unexpected method name token #{name_t.inspect}"
      # break
      skip_method container

      name = nil
    end

    return name, container
  end

  ##
  # Extracts +yield+ parameters from +method+

  def parse_method_or_yield_parameters(method = nil,
                                       modifiers = RDoc::METHOD_MODIFIERS)
    skip_tkspace_without_nl
    tk = get_tk
    end_token = get_end_token tk
    return '' unless end_token

    nest = 0
    continue = false

    while tk != nil do
      case tk[:kind]
      when :on_semicolon then
        break if nest == 0
      when :on_lbracket then
        nest += 1
      when :on_rbracket then
        nest -= 1
      when :on_lbrace then
        nest += 1
      when :on_rbrace then
        nest -= 1
        if nest <= 0
          # we might have a.each { |i| yield i }
          unget_tk(tk) if nest < 0
          break
        end
      when :on_lparen then
        nest += 1
      when end_token[:kind] then
        if end_token[:kind] == :on_rparen
          nest -= 1
          break if nest <= 0
        else
          break
        end
      when :on_rparen then
        nest -= 1
      when :on_comment, :on_embdoc then
        @read.pop
        if :on_nl == end_token[:kind] and "\n" == tk[:text][-1] and
          (!continue or (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) != 0) then
          if method && method.block_params.nil? then
            unget_tk tk
            read_documentation_modifiers method, modifiers
          end
          break if !continue and nest <= 0
        end
      when :on_comma then
        continue = true
      when :on_ident then
        continue = false if continue
      end
      tk = get_tk
    end

    get_tkread_clean(/\s+/, ' ')
  end

  ##
  # Capture the method's parameters. Along the way, look for a comment
  # containing:
  #
  #    # yields: ....
  #
  # and add this as the block_params for the method

  def parse_method_parameters method
    res = parse_method_or_yield_parameters method

    res = "(#{res})" unless res =~ /\A\(/
    method.params = res unless method.params

    return if  method.block_params

    skip_tkspace_without_nl
    read_documentation_modifiers method, RDoc::METHOD_MODIFIERS
  end

  ##
  # Parses an RDoc::NormalModule in +container+ with +comment+

  def parse_module container, single, tk, comment
    container, name_t, = get_class_or_module container

    name = name_t[:text]

    mod = container.add_module RDoc::NormalModule, name
    mod.ignore unless container.document_children
    record_location mod

    read_documentation_modifiers mod, RDoc::CLASS_MODIFIERS
    mod.add_comment comment, @top_level
    parse_statements mod

    # after end modifiers
    read_documentation_modifiers mod, RDoc::CLASS_MODIFIERS

    @stats.add_module mod
  end

  ##
  # Parses an RDoc::Require in +context+ containing +comment+

  def parse_require(context, comment)
    skip_tkspace_comment
    tk = get_tk

    if :on_lparen == tk[:kind] then
      skip_tkspace_comment
      tk = get_tk
    end

    name = tk[:text][1..-2] if :on_tstring == tk[:kind]

    if name then
      @top_level.add_require RDoc::Require.new(name, comment)
    else
      unget_tk tk
    end
  end

  ##
  # Parses a rescue

  def parse_rescue
    skip_tkspace_without_nl

    while tk = get_tk
      case tk[:kind]
      when :on_nl, :on_semicolon, :on_comment then
        break
      when :on_comma then
        skip_tkspace_without_nl

        get_tk if :on_nl == peek_tk[:kind]
      end

      skip_tkspace_without_nl
    end
  end

  ##
  # Retrieve comment body without =begin/=end

  def retrieve_comment_body(tk)
    if :on_embdoc == tk[:kind]
      tk[:text].gsub(/\A=begin.*\n/, '').gsub(/=end\n?\z/, '')
    else
      tk[:text]
    end
  end

  ##
  # The core of the Ruby parser.

  def parse_statements(container, single = NORMAL, current_method = nil,
                       comment = new_comment(''))
    raise 'no' unless RDoc::Comment === comment
    comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding

    nest = 1
    save_visibility = container.visibility

    non_comment_seen = true

    while tk = get_tk do
      keep_comment = false
      try_parse_comment = false

      non_comment_seen = true unless (:on_comment == tk[:kind] or :on_embdoc == tk[:kind])

      case tk[:kind]
      when :on_nl, :on_ignored_nl, :on_comment, :on_embdoc then
        if :on_nl == tk[:kind] or :on_ignored_nl == tk[:kind]
          skip_tkspace
          tk = get_tk
        else
          past_tokens = @read.size > 1 ? @read[0..-2] : []
          nl_position = 0
          past_tokens.reverse.each_with_index do |read_tk, i|
            if read_tk =~ /^\n$/ then
              nl_position = (past_tokens.size - 1) - i
              break
            elsif read_tk =~ /^#.*\n$/ then
              nl_position = ((past_tokens.size - 1) - i) + 1
              break
            end
          end
          comment_only_line = past_tokens[nl_position..-1].all?{ |c| c =~ /^\s+$/ }
          unless comment_only_line then
            tk = get_tk
          end
        end

        if tk and (:on_comment == tk[:kind] or :on_embdoc == tk[:kind]) then
          if non_comment_seen then
            # Look for RDoc in a comment about to be thrown away
            non_comment_seen = parse_comment container, tk, comment unless
              comment.empty?

            comment = ''
            comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
          end

          line_no = nil
          while tk and (:on_comment == tk[:kind] or :on_embdoc == tk[:kind]) do
            comment_body = retrieve_comment_body(tk)
            line_no = tk[:line_no] if comment.empty?
            comment += comment_body
            comment << "\n" unless comment_body =~ /\n\z/

            if comment_body.size > 1 && comment_body =~ /\n\z/ then
              skip_tkspace_without_nl # leading spaces
            end
            tk = get_tk
          end

          comment = new_comment comment, line_no

          unless comment.empty? then
            look_for_directives_in container, comment

            if container.done_documenting then
              throw :eof if RDoc::TopLevel === container
              container.ongoing_visibility = save_visibility
            end
          end

          keep_comment = true
        else
          non_comment_seen = true
        end

        unget_tk tk
        keep_comment = true
        container.current_line_visibility = nil

      when :on_kw then
        case tk[:text]
        when 'class' then
          parse_class container, single, tk, comment

        when 'module' then
          parse_module container, single, tk, comment

        when 'def' then
          parse_method container, single, tk, comment

        when 'alias' then
          parse_alias container, single, tk, comment unless current_method

        when 'yield' then
          if current_method.nil? then
            warn "Warning: yield outside of method" if container.document_self
          else
            parse_yield container, single, tk, current_method
          end

        when 'until', 'while' then
          if (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) == 0
            nest += 1
            skip_optional_do_after_expression
          end

        # Until and While can have a 'do', which shouldn't increase the nesting.
        # We can't solve the general case, but we can handle most occurrences by
        # ignoring a do at the end of a line.

        # 'for' is trickier
        when 'for' then
          nest += 1
          skip_for_variable
          skip_optional_do_after_expression

        when 'case', 'do', 'if', 'unless', 'begin' then
          if (tk[:state] & RDoc::Parser::RipperStateLex::EXPR_LABEL) == 0
            nest += 1
          end

        when 'super' then
          current_method.calls_super = true if current_method

        when 'rescue' then
          parse_rescue

        when 'end' then
          nest -= 1
          if nest == 0 then
            container.ongoing_visibility = save_visibility

            parse_comment container, tk, comment unless comment.empty?

            return
          end
        end

      when :on_const then
        unless parse_constant container, tk, comment, current_method then
          try_parse_comment = true
        end

      when :on_ident then
        if nest == 1 and current_method.nil? then
          keep_comment = parse_identifier container, single, tk, comment
        end

        case tk[:text]
        when "require" then
          parse_require container, comment
        when "include" then
          parse_extend_or_include RDoc::Include, container, comment
        when "extend" then
          parse_extend_or_include RDoc::Extend, container, comment
        when "included" then
          parse_included_with_activesupport_concern container, comment
        end

      else
        try_parse_comment = nest == 1
      end

      if try_parse_comment then
        non_comment_seen = parse_comment container, tk, comment unless
          comment.empty?

        keep_comment = false
      end

      unless keep_comment then
        comment = new_comment ''
        comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
        container.params = nil
        container.block_params = nil
      end

      consume_trailing_spaces
    end

    container.params = nil
    container.block_params = nil
  end

  ##
  # Parse up to +no+ symbol arguments

  def parse_symbol_arg(no = nil)
    skip_tkspace_comment

    tk = get_tk
    if tk[:kind] == :on_lparen
      parse_symbol_arg_paren no
    else
      parse_symbol_arg_space no, tk
    end
  end

  ##
  # Parses up to +no+ symbol arguments surrounded by () and places them in
  # +args+.

  def parse_symbol_arg_paren no # :nodoc:
    args = []

    loop do
      skip_tkspace_comment
      if tk1 = parse_symbol_in_arg
        args.push tk1
        break if no and args.size >= no
      end

      skip_tkspace_comment
      case (tk2 = get_tk)[:kind]
      when :on_rparen
        break
      when :on_comma
      else
        warn("unexpected token: '#{tk2.inspect}'") if $DEBUG_RDOC
        break
      end
    end

    args
  end

  ##
  # Parses up to +no+ symbol arguments separated by spaces and places them in
  # +args+.

  def parse_symbol_arg_space no, tk # :nodoc:
    args = []

    unget_tk tk
    if tk = parse_symbol_in_arg
      args.push tk
      return args if no and args.size >= no
    end

    loop do
      skip_tkspace_without_nl

      tk1 = get_tk
      if tk1.nil? || :on_comma != tk1[:kind] then
        unget_tk tk1
        break
      end

      skip_tkspace_comment
      if tk = parse_symbol_in_arg
        args.push tk
        break if no and args.size >= no
      end
    end

    args
  end

  ##
  # Returns symbol text from the next token

  def parse_symbol_in_arg
    tk = get_tk
    if :on_symbol == tk[:kind] then
      tk[:text].sub(/^:/, '')
    elsif :on_tstring == tk[:kind] then
      tk[:text][1..-2]
    elsif :on_dstring == tk[:kind] or :on_ident == tk[:kind] then
      nil # ignore
    else
      warn("Expected symbol or string, got #{tk.inspect}") if $DEBUG_RDOC
      nil
    end
  end

  ##
  # Parses statements in the top-level +container+

  def parse_top_level_statements container
    comment = collect_first_comment

    look_for_directives_in container, comment

    throw :eof if container.done_documenting

    @markup = comment.format

    # HACK move if to RDoc::Context#comment=
    container.comment = comment if container.document_self unless comment.empty?

    parse_statements container, NORMAL, nil, comment
  end

  ##
  # Determines the visibility in +container+ from +tk+

  def parse_visibility(container, single, tk)
    vis_type, vis, singleton = get_visibility_information tk, single

    skip_tkspace_comment false

    ptk = peek_tk
    # Ryan Davis suggested the extension to ignore modifiers, because he
    # often writes
    #
    #   protected unless $TESTING
    #
    if [:on_nl, :on_semicolon].include?(ptk[:kind]) || (:on_kw == ptk[:kind] && (['if', 'unless'].include?(ptk[:text]))) then
      container.ongoing_visibility = vis
    elsif :on_kw == ptk[:kind] && 'def' == ptk[:text]
      container.current_line_visibility = vis
    else
      update_visibility container, vis_type, vis, singleton
    end
  end

  ##
  # Parses a Module#private_constant or Module#public_constant call from +tk+.

  def parse_constant_visibility(container, single, tk)
    args = parse_symbol_arg
    case tk[:text]
    when 'private_constant'
      vis = :private
    when 'public_constant'
      vis = :public
    else
      raise RDoc::Error, 'Unreachable'
    end
    container.set_constant_visibility_for args, vis
  end

  ##
  # Determines the block parameter for +context+

  def parse_yield(context, single, tk, method)
    return if method.block_params

    get_tkread
    method.block_params = parse_method_or_yield_parameters
  end

  ##
  # Directives are modifier comments that can appear after class, module, or
  # method names. For example:
  #
  #   def fred # :yields: a, b
  #
  # or:
  #
  #   class MyClass # :nodoc:
  #
  # We return the directive name and any parameters as a two element array if
  # the name is in +allowed+.  A directive can be found anywhere up to the end
  # of the current line.

  def read_directive allowed
    tokens = []

    while tk = get_tk do
      tokens << tk

      if :on_nl == tk[:kind] or (:on_kw == tk[:kind] && 'def' == tk[:text]) then
        return
      elsif :on_comment == tk[:kind] or :on_embdoc == tk[:kind] then
        return unless tk[:text] =~ /\s*:?([\w-]+):\s*(.*)/

        directive = $1.downcase

        return [directive, $2] if allowed.include? directive

        return
      end
    end
  ensure
    unless tokens.length == 1 and (:on_comment == tokens.first[:kind] or :on_embdoc == tokens.first[:kind]) then
      tokens.reverse_each do |token|
        unget_tk token
      end
    end
  end

  ##
  # Handles directives following the definition for +context+ (any
  # RDoc::CodeObject) if the directives are +allowed+ at this point.
  #
  # See also RDoc::Markup::PreProcess#handle_directive

  def read_documentation_modifiers context, allowed
    skip_tkspace_without_nl
    directive, value = read_directive allowed

    return unless directive

    @preprocess.handle_directive '', directive, value, context do |dir, param|
      if %w[notnew not_new not-new].include? dir then
        context.dont_rename_initialize = true

        true
      end
    end
  end

  ##
  # Records the location of this +container+ in the file for this parser and
  # adds it to the list of classes and modules in the file.

  def record_location container # :nodoc:
    case container
    when RDoc::ClassModule then
      @top_level.add_to_classes_or_modules container
    end

    container.record_location @top_level
  end

  ##
  # Scans this Ruby file for Ruby constructs

  def scan
    reset

    catch :eof do
      begin
        parse_top_level_statements @top_level

      rescue StandardError => e
        if @content.include?('<%') and @content.include?('%>') then
          # Maybe, this is ERB.
          $stderr.puts "\033[2KRDoc detects ERB file. Skips it for compatibility:"
          $stderr.puts @file_name
          return
        end

        if @scanner_point >= @scanner.size
          now_line_no = @scanner[@scanner.size - 1][:line_no]
        else
          now_line_no = peek_tk[:line_no]
        end
        first_tk_index = @scanner.find_index { |tk| tk[:line_no] == now_line_no }
        last_tk_index = @scanner.find_index { |tk| tk[:line_no] == now_line_no + 1 }
        last_tk_index = last_tk_index ? last_tk_index - 1 : @scanner.size - 1
        code = @scanner[first_tk_index..last_tk_index].map{ |t| t[:text] }.join

        $stderr.puts <<-EOF

#{self.class} failure around line #{now_line_no} of
#{@file_name}

        EOF

        unless code.empty? then
          $stderr.puts code
          $stderr.puts
        end

        raise e
      end
    end

    @top_level
  end

  ##
  # while, until, and for have an optional do

  def skip_optional_do_after_expression
    skip_tkspace_without_nl
    tk = get_tk

    b_nest = 0
    nest = 0

    loop do
      break unless tk
      case tk[:kind]
      when :on_semicolon, :on_nl, :on_ignored_nl then
        break if b_nest.zero?
      when :on_lparen then
        nest += 1
      when :on_rparen then
        nest -= 1
      when :on_kw then
        case tk[:text]
        when 'begin'
          b_nest += 1
        when 'end'
          b_nest -= 1
        when 'do'
          break if nest.zero?
        end
      when :on_comment, :on_embdoc then
        if b_nest.zero? and "\n" == tk[:text][-1] then
          break
        end
      end
      tk = get_tk
    end

    skip_tkspace_without_nl

    get_tk if peek_gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/changelog.rb000064400000020473150403134140015433 0ustar00_type, vis, singleton # :nodoc:
    new_methods = []

    case vis_type
    when 'module_function' then
      args = parse_symbol_arg
      container.set_visibility_for args, :private, false

      container.methods_matching args do |m|
        s_m = m.dup
        record_location s_m
        s_m.singleton = true
        new_methods << s_m
      end
    when 'public_class_method', 'private_class_method' then
      args = parse_symbol_arg

      container.methods_matching args, true do |m|
        if m.parent != container then
          m = m.dup
          record_location m
          new_methods << m
        end

        m.visibility = vis
      end
    else
      args = parse_symbol_arg
      container.set_visibility_for args, vis, singleton
    end

    new_methods.each do |method|
      case method
      when RDoc::AnyMethod then
        container.add_method method
      when RDoc::Attr then
        container.add_attribute method
      end
      method.visibility = vis
    end
  end

  ##
  # Prints +message+ to +$stderr+ unless we're being quiet

  def warn message
    @options.warn make_message message
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/changelog.rb000064400000020473150403134140015433 0ustar00# frozen_string_literal: true

##
# A ChangeLog file parser.
#
# This parser converts a ChangeLog into an RDoc::Markup::Document.  When
# viewed as HTML a ChangeLog page will have an entry for each day's entries in
# the sidebar table of contents.
#
# This parser is meant to parse the MRI ChangeLog, but can be used to parse any
# {GNU style Change
# Log}[http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html].

class RDoc::Parser::ChangeLog < RDoc::Parser

  include RDoc::Parser::Text

  parse_files_matching(/(\/|\\|\A)ChangeLog[^\/\\]*\z/)

  ##
  # Attaches the +continuation+ of the previous line to the +entry_body+.
  #
  # Continued function listings are joined together as a single entry.
  # Continued descriptions are joined to make a single paragraph.

  def continue_entry_body entry_body, continuation
    return unless last = entry_body.last

    if last =~ /\)\s*\z/ and continuation =~ /\A\(/ then
      last.sub!(/\)\s*\z/, ',')
      continuation = continuation.sub(/\A\(/, '')
    end

    if last =~ /\s\z/ then
      last << continuation
    else
      last << ' ' + continuation
    end
  end

  ##
  # Creates an RDoc::Markup::Document given the +groups+ of ChangeLog entries.

  def create_document groups
    doc = RDoc::Markup::Document.new
    doc.omit_headings_below = 2
    doc.file = @top_level

    doc << RDoc::Markup::Heading.new(1, File.basename(@file_name))
    doc << RDoc::Markup::BlankLine.new

    groups.sort_by do |day,| day end.reverse_each do |day, entries|
      doc << RDoc::Markup::Heading.new(2, day.dup)
      doc << RDoc::Markup::BlankLine.new

      doc.concat create_entries entries
    end

    doc
  end

  ##
  # Returns a list of ChangeLog entries an RDoc::Markup nodes for the given
  # +entries+.

  def create_entries entries
    out = []

    entries.each do |entry, items|
      out << RDoc::Markup::Heading.new(3, entry)
      out << RDoc::Markup::BlankLine.new

      out << create_items(items)
    end

    out
  end

  ##
  # Returns an RDoc::Markup::List containing the given +items+ in the
  # ChangeLog

  def create_items items
    list = RDoc::Markup::List.new :NOTE

    items.each do |item|
      item =~ /\A(.*?(?:\([^)]+\))?):\s*/

      title = $1
      body = $'

      paragraph = RDoc::Markup::Paragraph.new body
      list_item = RDoc::Markup::ListItem.new title, paragraph
      list << list_item
    end

    list
  end

  ##
  # Groups +entries+ by date.

  def group_entries entries
    @time_cache ||= {}
    entries.group_by do |title, _|
      begin
        time = @time_cache[title]
        (time || parse_date(title)).strftime '%Y-%m-%d'
      rescue NoMethodError, ArgumentError
        time, = title.split '  ', 2
        parse_date(time).strftime '%Y-%m-%d'
      end
    end
  end

  ##
  # Parse date in ISO-8601, RFC-2822, or default of Git

  def parse_date(date)
    case date
    when /\A\s*(\d+)-(\d+)-(\d+)(?:[ T](\d+):(\d+):(\d+) *([-+]\d\d):?(\d\d))?\b/
      Time.new($1, $2, $3, $4, $5, $6, ("#{$7}:#{$8}" if $7))
    when /\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/
      Time.new($3, $2, $1, $4, $5, $6, ("#{$7}:#{$8}" if $7))
    when /\A\s*\w{3} (\w{3}) +(\d+) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/
      Time.new($3, $1, $2, $4, $5, $6, ("#{$7}:#{$8}" if $7))
    when /\A\s*\w{3} (\w{3}) +(\d+) (\d+):(\d+):(\d+) (\d+)\b/
      Time.new($6, $1, $2, $3, $4, $5)
    else
      raise ArgumentError, "bad date: #{date}"
    end
  end

  ##
  # Parses the entries in the ChangeLog.
  #
  # Returns an Array of each ChangeLog entry in order of parsing.
  #
  # A ChangeLog entry is an Array containing the ChangeLog title (date and
  # committer) and an Array of ChangeLog items (file and function changed with
  # description).
  #
  # An example result would be:
  #
  #    [ 'Tue Dec  4 08:33:46 2012  Eric Hodel  <drbrain@segment7.net>',
  #      [ 'README.EXT:  Converted to RDoc format',
  #        'README.EXT.ja:  ditto']]

  def parse_entries
    @time_cache ||= {}

    if /\A((?:.*\n){,3})commit\s/ =~ @content
      class << self; prepend Git; end
      parse_info($1)
      return parse_entries
    end

    entries = []
    entry_name = nil
    entry_body = []

    @content.each_line do |line|
      case line
      when /^\s*$/ then
        next
      when /^\w.*/ then
        entries << [entry_name, entry_body] if entry_name

        entry_name = $&

        begin
          time = parse_date entry_name
          @time_cache[entry_name] = time
        rescue ArgumentError
          entry_name = nil
        end

        entry_body = []
      when /^(\t| {8})?\*\s*(.*)/ then # "\t* file.c (func): ..."
        entry_body << $2.dup
      when /^(\t| {8})?\s*(\(.*)/ then # "\t(func): ..."
        entry = $2

        if entry_body.last =~ /:/ then
          entry_body << entry.dup
        else
          continue_entry_body entry_body, entry
        end
      when /^(\t| {8})?\s*(.*)/ then
        continue_entry_body entry_body, $2
      end
    end

    entries << [entry_name, entry_body] if entry_name

    entries.reject! do |(entry,_)|
      entry == nil
    end

    entries
  end

  ##
  # Converts the ChangeLog into an RDoc::Markup::Document

  def scan
    @time_cache = {}

    entries = parse_entries
    grouped_entries = group_entries entries

    doc = create_document grouped_entries

    @top_level.comment = doc

    @top_level
  end

  module Git
    def parse_info(info)
      /^\s*base-url\s*=\s*(.*\S)/ =~ info
      @base_url = $1
    end

    def parse_entries
      entries = []

      @content.scan(/^commit\s+(\h{20})\h*\n((?:.+\n)*)\n((?: {4}.*\n+)*)/) do
        entry_name, header, entry_body = $1, $2, $3.gsub(/^ {4}/, '')
        # header = header.scan(/^ *(\S+?): +(.*)/).to_h
        # date = header["CommitDate"] || header["Date"]
        date = header[/^ *(?:Author)?Date: +(.*)/, 1]
        author = header[/^ *Author: +(.*)/, 1]
        begin
          time = parse_date(header[/^ *CommitDate: +(.*)/, 1] || date)
          @time_cache[entry_name] = time
          author.sub!(/\s*<(.*)>/, '')
          email = $1
          entries << [entry_name, [author, email, date, entry_body]]
        rescue ArgumentError
        end
      end

      entries
    end

    def create_entries entries
      # git log entries have no strictly itemized style like the old
      # style, just assume Markdown.
      entries.map do |commit, egems/gems/rdoc-6.5.1.1/lib/rdoc/servlet.rb000064400000030365150403134150013676 0ustar00 def level
        HEADING_LEVEL
      end

      def aref
        "label-#{commit}"
      end

      def label context = nil
        aref
      end

      def text
        case base
        when nil
          "#{date}"
        when /%s/
          "{#{date}}[#{base % commit}]"
        else
          "{#{date}}[#{base}#{commit}]"
        end + " {#{author}}[mailto:#{email}]"
      end

      def accept visitor
        visitor.accept_heading self
        begin
          if visitor.respond_to?(:code_object=)
            code_object = visitor.code_object
            visitor.code_object = self
          end
          contents.each do |body|
            body.accept visitor
          end
        ensure
          if visitor.respond_to?(:code_object)
            visitor.code_object = code_object
          end
        end
      end

      def pretty_print q # :nodoc:
        q.group(2, '[log_entry: ', ']') do
          q.text commit
          q.text ','
          q.breakable
          q.group(2, '[date: ', ']') { q.text date }
          q.text ','
          q.breakable
          q.group(2, '[author: ', ']') { q.text author }
          q.text ','
          q.breakable
          q.group(2, '[email: ', ']') { q.text email }
          q.text ','
          q.breakable
          q.pp contents
        end
      end
    end
  end
end

gems/gems/rdoc-6.5.1.1/lib/rdoc/servlet.rb000064400000030365150403134150013676 0ustar00# frozen_string_literal: true
require_relative '../rdoc'
require 'erb'
require 'time'
require 'json'

begin
  require 'webrick'
rescue LoadError
  abort "webrick is not found. You may need to `gem install webrick` to install webrick."
end

##
# This is a WEBrick servlet that allows you to browse ri documentation.
#
# You can show documentation through either `ri --server` or, with RubyGems
# 2.0 or newer, `gem server`.  For ri, the server runs on port 8214 by
# default.  For RubyGems the server runs on port 8808 by default.
#
# You can use this servlet in your own project by mounting it on a WEBrick
# server:
#
#   require 'webrick'
#
#   server = WEBrick::HTTPServer.new Port: 8000
#
#   server.mount '/', RDoc::Servlet
#
# If you want to mount the servlet some other place than the root, provide the
# base path when mounting:
#
#   server.mount '/rdoc', RDoc::Servlet, '/rdoc'

class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet

  @server_stores = Hash.new { |hash, server| hash[server] = {} }
  @cache         = Hash.new { |hash, store|  hash[store]  = {} }

  ##
  # Maps an asset type to its path on the filesystem

  attr_reader :asset_dirs

  ##
  # An RDoc::Options instance used for rendering options

  attr_reader :options

  ##
  # Creates an instance of this servlet that shares cached data between
  # requests.

  def self.get_instance server, *options # :nodoc:
    stores = @server_stores[server]

    new server, stores, @cache, *options
  end

  ##
  # Creates a new WEBrick servlet.
  #
  # Use +mount_path+ when mounting the servlet somewhere other than /.
  #
  # Use +extra_doc_dirs+ for additional documentation directories.
  #
  # +server+ is provided automatically by WEBrick when mounting.  +stores+ and
  # +cache+ are provided automatically by the servlet.

  def initialize server, stores, cache, mount_path = nil, extra_doc_dirs = []
    super server

    @cache      = cache
    @mount_path = mount_path
    @extra_doc_dirs = extra_doc_dirs
    @stores     = stores

    @options = RDoc::Options.new
    @options.op_dir = '.'

    darkfish_dir = nil

    # HACK dup
    $LOAD_PATH.each do |path|
      darkfish_dir = File.join path, 'rdoc/generator/template/darkfish/'
      next unless File.directory? darkfish_dir
      @options.template_dir = darkfish_dir
      break
    end

    @asset_dirs = {
      :darkfish   => darkfish_dir,
      :json_index =>
        File.expand_path('../generator/template/json_index/', __FILE__),
    }
  end

  ##
  # Serves the asset at the path in +req+ for +generator_name+ via +res+.

  def asset generator_name, req, res
    asset_dir = @asset_dirs[generator_name]

    asset_path = File.join asset_dir, req.path

    if_modified_since req, res, asset_path

    res.body = File.read asset_path

    res.content_type = case req.path
                       when /\.css\z/ then 'text/css'
                       when /\.js\z/  then 'application/javascript'
                       else                'application/octet-stream'
                       end
  end

  ##
  # GET request entry point.  Fills in +res+ for the path, etc. in +req+.

  def do_GET req, res
    req.path.sub!(/\A#{Regexp.escape @mount_path}/, '') if @mount_path

    case req.path
    when '/' then
      root req, res
    when '/js/darkfish.js', '/js/jquery.js', '/js/search.js',
         %r%^/css/%, %r%^/images/%, %r%^/fonts/% then
      asset :darkfish, req, res
    when '/js/navigation.js', '/js/searcher.js' then
      asset :json_index, req, res
    when '/js/search_index.js' then
      root_search req, res
    else
      show_documentation req, res
    end
  rescue WEBrick::HTTPStatus::NotFound => e
    generator = generator_for RDoc::Store.new

    not_found generator, req, res, e.message
  rescue WEBrick::HTTPStatus::Status
    raise
  rescue => e
    error e, req, res
  end

  ##
  # Fills in +res+ with the class, module or page for +req+ from +store+.
  #
  # +path+ is relative to the mount_path and is used to determine the class,
  # module or page name (/RDoc/Servlet.html becomes RDoc::Servlet).
  # +generator+ is used to create the page.

  def documentation_page store, generator, path, req, res
    text_name = path.chomp '.html'
    name = text_name.gsub '/', '::'

    if klass = store.find_class_or_module(name) then
      res.body = generator.generate_class klass
    elsif page = store.find_text_page(name.sub(/_([^_]*)\z/, '.\1')) then
      res.body = generator.generate_page page
    elsif page = store.find_text_page(text_name.sub(/_([^_]*)\z/, '.\1')) then
      res.body = generator.generate_page page
    else
      not_found generator, req, res
    end
  end

  ##
  # Creates the JSON search index on +res+ for the given +store+.  +generator+
  # must respond to \#json_index to build.  +req+ is ignored.

  def documentation_search store, generator, req, res
    json_index = @cache[store].fetch :json_index do
      @cache[store][:json_index] =
        JSON.dump generator.json_index.build_index
    end

    res.content_type = 'application/javascript'
    res.body = "var search_data = #{json_index}"
  end

  ##
  # Returns the RDoc::Store and path relative to +mount_path+ for
  # documentation at +path+.

  def documentation_source path
    _, source_name, path = path.split '/', 3

    store = @stores[source_name]
    return store, path if store

    store = store_for source_name

    store.load_all

    @stores[source_name] = store

    return store, path
  end

  ##
  # Generates an error page for the +exception+ while handling +req+ on +res+.

  def error exception, req, res
    backtrace = exception.backtrace.join "\n"

    res.content_type = 'text/html'
    res.status = 500
    res.body = <<-BODY
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

<title>Error - #{ERB::Util.html_escape exception.class}</title>

<link type="text/css" media="screen" href="#{@mount_path}/css/rdoc.css" rel="stylesheet">
</head>
<body>
<h1>Error</h1>

<p>While processing <code>#{ERB::Util.html_escape req.request_uri}</code> the
RDoc (#{ERB::Util.html_escape RDoc::VERSION}) server has encountered a
<code>#{ERB::Util.html_escape exception.class}</code>
exception:

<pre>#{ERB::Util.html_escape exception.message}</pre>

<p>Please report this to the
<a href="https://github.com/ruby/rdoc/issues">RDoc issues tracker</a>.  Please
include the RDoc version, the URI above and exception class, message and
backtrace.  If you're viewing a gem's documentation, include the gem name and
version.  If you're viewing Ruby's documentation, include the version of ruby.

<p>Backtrace:

<pre>#{ERB::Util.html_escape backtrace}</pre>

</body>
</html>
    BODY
  end

  ##
  # Instantiates a Darkfish generator for +store+

  def generator_for store
    generator = RDoc::Generator::Darkfish.new store, @options
    generator.file_output = false
    generator.asset_rel_path = '..'

    rdoc = RDoc::RDoc.new
    rdoc.store     = store
    rdoc.generator = generator
    rdoc.options   = @options

    @options.main_page = store.main
    @options.title     = store.title

    generator
  end

  ##
  # Handles the If-Modified-Since HTTP header on +req+ for +path+.  If the
  # file has not been modified a Not Modified response is returned.  If the
  # file has been modified a Last-Modified header is added to +res+.

  def if_modified_since req, res, path = nil
    last_modified = File.stat(path).mtime if path

    res['last-modified'] = last_modified.httpdate

    return unless ims = req['if-modified-since']

    ims = Time.parse ims

    unless ims < last_modified then
      res.body = ''
      raise WEBrick::HTTPStatus::NotModified
    end
  end

  ##
  # Returns an Array of installed documentation.
  #
  # Each entry contains the documentation name (gem name, 'Ruby
  # Documentation', etc.), the path relative to the mount point, whether the
  # documentation exists, the type of documentation (See RDoc::RI::Paths#each)
  # and the filesystem to the RDoc::Store for the documentation.

  def installed_docs
    extra_counter = 0
    ri_paths.map do |path, type|
      store = RDoc::Store.new path, type
      exists = File.exist? store.cache_path

      case type
      when :gem then
        gem_path = path[%r%/([^/]*)/ri$%, 1]
        [gem_path, "#{gem_path}/", exists, type, path]
      when :system then
        ['Ruby Documentation', 'ruby/', exists, type, path]
      when :site then
        ['Site Documentation', 'site/', exists, type, path]
      when :home then
        ['Home Documentation', 'home/', exists, type, path]
      when :extra then
        extra_counter += 1
        store.load_cache if exists
        title = store.title || "Extra Documentation"
        [title, "extra-#{extra_counter}/", exists, type, path]
      end
    end
  end

  ##
  # Returns a 404 page built by +generator+ for +req+ on +res+.

  def not_found generator, req, res, message = nil
    message ||= "The page <kbd>#{ERB::Util.h req.path}</kbd> was not found"
    res.body = generator.generate_servlet_not_found message
    res.status = 404
  end

  ##
  # Enumerates the ri paths.  See RDoc::RI::Paths#each

  def ri_paths &block
    RDoc::RI::Paths.each true, true, true, :all, *@extra_doc_dirs, &block #TODO: pass extra_dirs
  end

  ##
  # Generates the root page on +res+.  +req+ is ignored.

  def root req, res
    generator = RDoc::Generator::Darkfish.new nil, @options

    res.body = generator.generate_servlet_root installed_docs

    res.content_type = 'text/html'
  end

  ##
  # Generates a search index for the root page on +res+.  +req+ is ignored.

  def root_search req, res
    search_index = []
    info         = []

    installed_docs.map do |name, href, exists, type, path|
      next unless exists

      search_index << name

      case type
      when :gem
        gemspec = path.gsub(%r%/doc/([^/]*?)/ri$%,
                            '/specifications/\1.gemspec')

        spec = Gem::Specification.load gemspec

        path    = spec.full_name
        comment = spec.summary
      when :system then
        path    = 'ruby'
        comment = 'Documentation for the Ruby standard library'
      when :site then
        path    = 'site'
        comment = 'Documentation for non-gem libraries'
      when :home then
        path    = 'home'
        comment = 'Documentation from your home directory'
      when :extra
        comment = name
      end

      info << [name, '', path, '', comment]
    end

gems/gems/rdoc-6.5.1.1/lib/rdoc/ri.rb000064400000000566150403134150012624 0ustar00earch store, generator, req, res
    else
      documentation_page store, generator, path, req, res
    end
  ensure
    res.content_type ||= 'text/html'
  end

  ##
  # Returns an RDoc::Store for the given +source_name+ ('ruby' or a gem name).

  def store_for source_name
    case source_name
    when 'home' then
      RDoc::Store.new RDoc::RI::Paths.home_dir, :home
    gems/gems/rdoc-6.5.1.1/lib/rdoc/rd/inline_parser.rb000064400000076646150403134150015465 0ustar00pe

      return store if File.exist? store.cache_path

      raise WEBrick::HTTPStatus::NotFound,
            "Could not find documentation for \"#{ERB::Util.html_escape(source_name)}\". Please run `gem rdoc --ri gem_name`"

    end
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/ri.rb000064400000000566150403134150012624 0ustar00# frozen_string_literal: true
require_relative '../rdoc'

##
# Namespace for the ri command line tool's implementation.
#
# See <tt>ri --help</tt> for details.

module RDoc::RI

  ##
  # Base RI error class

  class Error < RDoc::Error; end

  autoload :Driver, "#{__dir__}/ri/driver"
  autoload :Paths,  "#{__dir__}/ri/paths"
  autoload :Store,  "#{__dir__}/ri/store"

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/rd/inline_parser.rb000064400000076646150403134150015465 0ustar00# frozen_string_literal: true
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.6.0
# from Racc grammar file "".
#

require 'racc/parser.rb'

require 'strscan'

class RDoc::RD

##
# RD format parser for inline markup such as emphasis, links, footnotes, etc.

class InlineParser < Racc::Parser


# :stopdoc:

EM_OPEN = '((*'
EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/
EM_CLOSE = '*))'
EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/
CODE_OPEN = '(({'
CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/
CODE_CLOSE = '}))'
CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/
VAR_OPEN = '((|'
VAR_OPEN_RE = /\A#{Regexp.quote(VAR_OPEN)}/
VAR_CLOSE = '|))'
VAR_CLOSE_RE = /\A#{Regexp.quote(VAR_CLOSE)}/
KBD_OPEN = '((%'
KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/
KBD_CLOSE = '%))'
KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/
INDEX_OPEN = '((:'
INDEX_OPEN_RE = /\A#{Regexp.quote(INDEX_OPEN)}/
INDEX_CLOSE = ':))'
INDEX_CLOSE_RE = /\A#{Regexp.quote(INDEX_CLOSE)}/
REF_OPEN = '((<'
REF_OPEN_RE = /\A#{Regexp.quote(REF_OPEN)}/
REF_CLOSE = '>))'
REF_CLOSE_RE = /\A#{Regexp.quote(REF_CLOSE)}/
FOOTNOTE_OPEN = '((-'
FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/
FOOTNOTE_CLOSE = '-))'
FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/
VERB_OPEN = "(('"
VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/
VERB_CLOSE = "'))"
VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/

BAR = "|"
BAR_RE = /\A#{Regexp.quote(BAR)}/
QUOTE = '"'
QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/
SLASH = "/"
SLASH_RE = /\A#{Regexp.quote(SLASH)}/
BACK_SLASH = "\\"
BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/
URL = "URL:"
URL_RE = /\A#{Regexp.quote(URL)}/

other_re_mode = Regexp::EXTENDED
other_re_mode |= Regexp::MULTILINE

OTHER_RE = Regexp.new(
  "\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}|
              #{Regexp.quote(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}|
              #{Regexp.quote(VAR_OPEN)}|#{Regexp.quote(VAR_CLOSE)}|
              #{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}|
              #{Regexp.quote(INDEX_OPEN)}|#{Regexp.quote(INDEX_CLOSE)}|
              #{Regexp.quote(REF_OPEN)}|#{Regexp.quote(REF_CLOSE)}|
            #{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}|
              #{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}|
              #{Regexp.quote(BAR)}|
              #{Regexp.quote(QUOTE)}|
              #{Regexp.quote(SLASH)}|
              #{Regexp.quote(BACK_SLASH)}|
              #{Regexp.quote(URL)})", other_re_mode)

# :startdoc:

##
# Creates a new parser for inline markup in the rd format.  The +block_parser+
# is used to for footnotes and labels in the inline text.

def initialize block_parser
  @block_parser = block_parser
end

##
# Parses the +inline+ text from RD format into RDoc format.

def parse inline
  @inline = inline
  @src = StringScanner.new inline
  @pre = "".dup
  @yydebug = true
  do_parse.to_s
end

##
# Returns the next token from the inline text

def next_token
  return [false, false] if @src.eos?
#  p @src.rest if @yydebug
  if ret = @src.scan(EM_OPEN_RE)
    @pre << ret
    [:EM_OPEN, ret]
  elsif ret = @src.scan(EM_CLOSE_RE)
    @pre << ret
    [:EM_CLOSE, ret]
  elsif ret = @src.scan(CODE_OPEN_RE)
    @pre << ret
    [:CODE_OPEN, ret]
  elsif ret = @src.scan(CODE_CLOSE_RE)
    @pre << ret
    [:CODE_CLOSE, ret]
  elsif ret = @src.scan(VAR_OPEN_RE)
    @pre << ret
    [:VAR_OPEN, ret]
  elsif ret = @src.scan(VAR_CLOSE_RE)
    @pre << ret
    [:VAR_CLOSE, ret]
  elsif ret = @src.scan(KBD_OPEN_RE)
    @pre << ret
    [:KBD_OPEN, ret]
  elsif ret = @src.scan(KBD_CLOSE_RE)
    @pre << ret
    [:KBD_CLOSE, ret]
  elsif ret = @src.scan(INDEX_OPEN_RE)
    @pre << ret
    [:INDEX_OPEN, ret]
  elsif ret = @src.scan(INDEX_CLOSE_RE)
    @pre << ret
    [:INDEX_CLOSE, ret]
  elsif ret = @src.scan(REF_OPEN_RE)
    @pre << ret
    [:REF_OPEN, ret]
  elsif ret = @src.scan(REF_CLOSE_RE)
    @pre << ret
    [:REF_CLOSE, ret]
  elsif ret = @src.scan(FOOTNOTE_OPEN_RE)
    @pre << ret
    [:FOOTNOTE_OPEN, ret]
  elsif ret = @src.scan(FOOTNOTE_CLOSE_RE)
    @pre << ret
    [:FOOTNOTE_CLOSE, ret]
  elsif ret = @src.scan(VERB_OPEN_RE)
    @pre << ret
    [:VERB_OPEN, ret]
  elsif ret = @src.scan(VERB_CLOSE_RE)
    @pre << ret
    [:VERB_CLOSE, ret]
  elsif ret = @src.scan(BAR_RE)
    @pre << ret
    [:BAR, ret]
  elsif ret = @src.scan(QUOTE_RE)
    @pre << ret
    [:QUOTE, ret]
  elsif ret = @src.scan(SLASH_RE)
    @pre << ret
    [:SLASH, ret]
  elsif ret = @src.scan(BACK_SLASH_RE)
    @pre << ret
    [:BACK_SLASH, ret]
  elsif ret = @src.scan(URL_RE)
    @pre << ret
    [:URL, ret]
  elsif ret = @src.scan(OTHER_RE)
    @pre << ret
    [:OTHER, ret]
  else
    ret = @src.rest
    @pre << ret
    @src.terminate
    [:OTHER, ret]
  end
end

##
# Raises a ParseError when invalid formatting is found

def on_error(et, ev, values)
  lines_of_rest = @src.rest.lines.to_a.length
  prev_words = prev_words_on_error(ev)
  at = 4 + prev_words.length

  message = <<-MSG
RD syntax error: line #{@block_parser.line_index - lines_of_rest}:
...#{prev_words} #{(ev||'')} #{next_words_on_error()} ...
  MSG

  message << " " * at + "^" * (ev ? ev.length : 0) + "\n"
  raise ParseError, message
end

##
# Returns words before the error

def prev_words_on_error(ev)
  pre = @pre
  if ev and /#{Regexp.quote(ev)}$/ =~ pre
    pre = $`
  end
  last_line(pre)
end

##
# Returns the last line of +src+

def last_line(src)
  if n = src.rindex("\n")
    src[(n+1) .. -1]
  else
    src
  end
end
private :last_line

##
# Returns words following an error

def next_words_on_error
  if n = @src.rest.index("\n")
    @src.rest[0 .. (n-1)]
  else
    @src.rest
  end
end

##
# Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+

def inline rdoc, reference = rdoc
  RDoc::RD::Inline.new rdoc, reference
end

# :stopdoc:
##### State transition tables begin ###

racc_action_table = [
   104,   103,   102,   100,   101,    99,   115,   116,   117,    29,
   105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
    84,   118,   119,    63,    64,    65,    61,    81,    62,    76,
    78,    79,    85,    66,    67,    68,    69,    70,    71,    72,
    73,    74,    75,    77,    80,   149,    63,    64,    65,   153,
    81,    62,    76,    78,    79,    86,    66,    67,    68,    69,
    70,    71,    72,    73,    74,    75,    77,    80,   152,   104,
   103,   102,   100,   101,    99,   115,   116,   117,    87,   105,
   106,   107,   108,   109,   110,   111,   112,   113,   114,    88,
   118,   119,   104,   103,   102,   100,   101,    99,   115,   116,
   117,    89,   105,   106,   107,   108,   109,   110,   111,   112,
   113,   114,    96,   118,   119,   104,   103,   102,   100,   101,
    99,   115,   116,   117,   124,   105,   106,   107,   108,   109,
   110,   111,   112,   113,   114,   137,   118,   119,    22,    23,
    24,    25,    26,    21,    18,    19,   176,   177,    13,   148,
    14,   154,    15,   137,    16,   161,    17,   164,   173,    20,
    22,    23,    24,    25,    26,    21,    18,    19,   175,   177,
    13,   nil,    14,   nil,    15,   nil,    16,   nil,    17,   nil,
   nil,    20,    22,    23,    24,    25,    26,    21,    18,    19,
   nil,   nil,    13,   nil,    14,   nil,    15,   nil,    16,   nil,
    17,   nil,   nil,    20,    22,    23,    24,    25,    26,    21,
    18,    19,   nil,   nil,    13,   nil,    14,   nil,    15,   nil,
    16,   nil,    17,   nil,   nil,    20,    22,    23,    24,    25,
    26,    21,    18,    19,   nil,   nil,    13,   nil,    14,   nil,
    15,   nil,    16,   nil,    17,   nil,   nil,    20,    22,    23,
    24,    25,    26,    21,    18,    19,   nil,   nil,    13,   nil,
    14,   nil,    15,   nil,    16,   nil,    17,   nil,   nil,    20,
    22,    23,    24,    25,    26,    21,    18,    19,   nil,   nil,
    13,   nil,    14,   nil,    15,   nil,    16,   nil,    17,    42,
   nil,    20,    54,    38,    53,    55,    56,    57,   nil,    13,
   nil,    14,   nil,    15,   nil,    16,   nil,    17,   nil,   nil,
    20,    22,    23,    24,    25,    26,    21,    18,    19,   nil,
   nil,    13,   nil,    14,   nil,    15,   nil,    16,   nil,    17,
   nil,   nil,    20,    63,    64,    65,    61,    81,    62,    76,
    78,    79,   nil,    66,    67,    68,    69,    70,    71,    72,
    73,    74,    75,    77,    80,   122,   nil,   nil,    54,   nil,
    53,    55,    56,    57,   nil,    13,   nil,    14,   nil,    15,
   nil,    16,   nil,    17,   145,   nil,    20,    54,   133,    53,
    55,    56,    57,   nil,    13,   nil,    14,   nil,    15,   nil,
    16,   nil,    17,   145,   nil,    20,    54,   133,    53,    55,
    56,    57,   nil,    13,   nil,    14,   nil,    15,   nil,    16,
   nil,    17,   145,   nil,    20,    54,   133,    53,    55,    56,
    57,   nil,    13,   nil,    14,   nil,    15,   nil,    16,   nil,
    17,   145,   nil,    20,    54,   133,    53,    55,    56,    57,
   nil,    13,   nil,    14,   nil,    15,   nil,    16,   nil,    17,
   nil,   nil,    20,   135,   136,    54,   133,    53,    55,    56,
    57,   nil,    13,   nil,    14,   nil,    15,   nil,    16,   nil,
    17,   nil,   nil,    20,   135,   136,    54,   133,    53,    55,
    56,    57,   nil,    13,   nil,    14,   nil,    15,   nil,    16,
   nil,    17,   nil,   nil,    20,   135,   136,    54,   133,    53,
    55,    56,    57,   nil,    13,   nil,    14,   nil,    15,   nil,
    16,   nil,    17,    95,   nil,    20,    54,    91,    53,    55,
    56,    57,   145,   nil,   nil,    54,   133,    53,    55,    56,
    57,   158,   nil,   nil,    54,   nil,    53,    55,    56,    57,
   165,   135,   136,    54,   133,    53,    55,    56,    57,   145,
   nil,   nil,    54,   133,    53,    55,    56,    57,   172,   135,
   136,    54,   133,    53,    55,    56,    57,   174,   135,   136,
    54,   133,    53,    55,    56,    57,   178,   135,   136,    54,
   133,    53,    55,    56,    57,   135,   136,    54,   133,    53,
    55,    56,    57,   135,   136,    54,   133,    53,    55,    56,
    57,   135,   136,    54,   133,    53,    55,    56,    57,    22,
    23,    24,    25,    26,    21 ]

racc_action_check = [
    38,    38,    38,    38,    38,    38,    38,    38,    38,     1,
    38,    38,    38,    38,    38,    38,    38,    38,    38,    38,
    29,    38,    38,    59,    59,    59,    59,    59,    59,    59,
    59,    59,    31,    59,    59,    59,    59,    59,    59,    59,
    59,    59,    59,    59,    59,    59,    61,    61,    61,    61,
    61,    61,    61,    61,    61,    32,    61,    61,    61,    61,
    61,    61,    61,    61,    61,    61,    61,    61,    61,    91,
    91,    91,    91,    91,    91,    91,    91,    91,    33,    91,
    91,    91,    91,    91,    91,    91,    91,    91,    91,    34,
    91,    91,    97,    97,    97,    97,    97,    97,    97,    97,
    97,    35,    97,    97,    97,    97,    97,    97,    97,    97,
    97,    97,    37,    97,    97,   155,   155,   155,   155,   155,
   155,   155,   155,   155,    41,   155,   155,   155,   155,   155,
   155,   155,   155,   155,   155,    43,   155,   155,     0,     0,
     0,     0,     0,     0,     0,     0,   165,   165,     0,    58,
     0,    90,     0,    94,     0,   100,     0,   125,   162,     0,
     2,     2,     2,     2,     2,     2,     2,     2,   164,   172,
     2,   nil,     2,   nil,     2,   nil,     2,   nil,     2,   nil,
   nil,     2,    13,    13,    13,    13,    13,    13,    13,    13,
   nil,   nil,    13,   nil,    13,   nil,    13,   nil,    13,   nil,
    13,   nil,   nil,    13,    14,    14,    14,    14,    14,    14,
    14,    14,   nil,   nil,    14,   nil,    14,   nil,    14,   nil,
    14,   nil,    14,   nil,   nil,    14,    15,    15,    15,    15,
    15,    15,    15,    15,   nil,   nil,    15,   nil,    15,   nil,
    15,   nil,    15,   nil,    15,   nil,   nil,    15,    16,    16,
    16,    16,    16,    16,    16,    16,   nil,   nil,    16,   nil,
    16,   nil,    16,   nil,    16,   nil,    16,   nil,   nil,    16,
    17,    17,    17,    17,    17,    17,    17,    17,   nil,   nil,
    17,   nil,    17,   nil,    17,   nil,    17,   nil,    17,    18,
   nil,    17,    18,    18,    18,    18,    18,    18,   nil,    18,
   nil,    18,   nil,    18,   nil,    18,   nil,    18,   nil,   nil,
    18,    19,    19,    19,    19,    19,    19,    19,    19,   nil,
   nil,    19,   nil,    19,   nil,    19,   nil,    19,   nil,    19,
   nil,   nil,    19,    20,    20,    20,    20,    20,    20,    20,
    20,    20,   nil,    20,    20,    20,    20,    20,    20,    20,
    20,    20,    20,    20,    20,    39,   nil,   nil,    39,   nil,
    39,    39,    39,    39,   nil,    39,   nil,    39,   nil,    39,
   nil,    39,   nil,    39,    44,   nil,    39,    44,    44,    44,
    44,    44,    44,   nil,    44,   nil,    44,   nil,    44,   nil,
    44,   nil,    44,    45,   nil,    44,    45,    45,    45,    45,
    45,    45,   nil,    45,   nil,    45,   nil,    45,   nil,    45,
   nil,    45,   138,   nil,    45,   138,   138,   138,   138,   138,
   138,   nil,   138,   nil,   138,   nil,   138,   nil,   138,   nil,
   138,   146,   nil,   138,   146,   146,   146,   146,   146,   146,
   nil,   146,   nil,   146,   nil,   146,   nil,   146,   nil,   146,
   nil,   nil,   146,    42,    42,    42,    42,    42,    42,    42,
    42,   nil,    42,   nil,    42,   nil,    42,   nil,    42,   nil,
    42,   nil,   nil,    42,   122,   122,   122,   122,   122,   122,
   122,   122,   nil,   122,   nil,   122,   nil,   122,   nil,   122,
   nil,   122,   nil,   nil,   122,   127,   127,   127,   127,   127,
   127,   127,   127,   nil,   127,   nil,   127,   nil,   127,   nil,
   127,   nil,   127,    36,   nil,   127,    36,    36,    36,    36,
    36,    36,    52,   nil,   nil,    52,    52,    52,    52,    52,
    52,    92,   nil,   nil,    92,   nil,    92,    92,    92,    92,
   126,   126,   126,   126,   126,   126,   126,   126,   126,   142,
   nil,   nil,   142,   142,   142,   142,   142,   142,   159,   159,
   159,   159,   159,   159,   159,   159,   159,   163,   163,   163,
   163,   163,   163,   163,   163,   163,   171,   171,   171,   171,
   171,   171,   171,   171,   171,    95,    95,    95,    95,    95,
    95,    95,    95,   158,   158,   158,   158,   158,   158,   158,
   158,   168,   168,   168,   168,   168,   168,   168,   168,    27,
    27,    27,    27,    27,    27 ]

racc_action_pointer = [
   135,     9,   157,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   179,   201,   223,   245,   267,   286,   308,
   330,   nil,   nil,   nil,   nil,   nil,   nil,   606,   nil,    20,
   nil,    18,    39,    60,    69,    79,   510,    89,    -3,   352,
   nil,   120,   449,   130,   371,   390,   nil,   nil,   nil,   nil,
   nil,   nil,   519,   nil,   nil,   nil,   nil,   nil,   138,    20,
   nil,    43,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   128,    66,   528,   nil,   148,   581,   nil,    89,   nil,   nil,
   149,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   470,   nil,   nil,   154,   537,   491,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   409,   nil,
   nil,   nil,   546,   nil,   nil,   nil,   428,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   112,   nil,   nil,   589,   555,
   nil,   nil,   155,   564,   164,   142,   nil,   nil,   597,   nil,
   nil,   573,   164,   nil,   nil,   nil,   nil,   nil,   nil ]

racc_action_default = [
  -138,  -138,    -1,    -3,    -4,    -5,    -6,    -7,    -8,    -9,
   -10,   -11,   -12,  -138,  -138,  -138,  -138,  -138,  -138,  -138,
  -138,  -103,  -104,  -105,  -106,  -107,  -108,  -111,  -110,  -138,
    -2,  -138,  -138,  -138,  -138,  -138,  -138,  -138,  -138,   -27,
   -26,   -35,  -138,   -58,   -41,   -40,   -47,   -48,   -49,   -50,
   -51,   -52,   -63,   -66,   -67,   -68,   -69,   -70,  -138,  -138,
  -112,  -138,  -116,  -117,  -118,  -119,  -120,  -121,  -122,  -123,
  -124,  -125,  -126,  -127,  -128,  -129,  -130,  -131,  -132,  -133,
  -134,  -135,  -137,  -109,   179,   -13,   -14,   -15,   -16,   -17,
  -138,  -138,   -23,   -22,   -33,  -138,   -19,   -24,   -79,   -80,
  -138,   -82,   -83,   -84,   -85,   -86,   -87,   -88,   -89,   -90,
   -91,   -92,   -93,   -94,   -95,   -96,   -97,   -98,   -99,  -100,
   -25,   -35,  -138,   -58,   -28,  -138,   -59,   -42,   -46,   -55,
   -56,   -65,   -71,   -72,   -75,   -76,   -77,   -31,   -38,   -44,
   -53,   -54,   -57,   -61,   -73,   -74,   -39,   -62,  -101,  -102,
  -136,  -113,  -114,  -115,   -18,   -20,   -21,   -33,  -138,  -138,
   -78,   -81,  -138,   -59,   -36,   -37,   -64,   -45,   -59,   -43,
   -60,  -138,   -34,   -36,   -37,   -29,   -30,   -32,   -34 ]

racc_goto_table = [
   126,    44,   125,    43,   144,   144,   160,    93,    97,    52,
   166,    82,   144,    40,    41,    39,   138,   146,   169,    30,
    36,    94,    44,     1,   123,   129,   169,    52,    90,    37,
    52,   167,   147,    92,   120,   121,    31,    32,    33,    34,
    35,   170,    58,   166,    59,    83,   170,   166,   151,   nil,
   150,   nil,   166,   159,     4,   166,     4,   nil,   nil,   nil,
   nil,   155,   nil,   156,   160,   nil,   nil,     4,     4,     4,
     4,     4,   nil,     4,     5,   nil,     5,   157,   nil,   nil,
   163,   nil,   162,    52,   nil,   168,   nil,     5,     5,     5,
     5,     5,   nil,     5,   nil,   nil,   nil,   nil,   144,   nil,
   nil,   nil,   144,   nil,   nil,   129,   144,   144,   nil,     6,
   129,     6,   nil,   nil,   nil,   nil,   171,     7,   nil,     7,
   nil,   nil,     6,     6,     6,     6,     6,     8,     6,     8,
     7,     7,     7,     7,     7,    11,     7,    11,   nil,   nil,
     8,     8,     8,     8,     8,   nil,     8,   nil,    11,    11,
    11,    11,    11,   nil,    11 ]

racc_goto_check = [
    22,    24,    21,    23,    36,    36,    37,    18,    16,    34,
    35,    41,    36,    19,    20,    17,    25,    25,    28,     3,
    13,    23,    24,     1,    23,    24,    28,    34,    14,    15,
    34,    29,    32,    17,    19,    20,     1,     1,     1,     1,
     1,    33,     1,    35,    38,    39,    33,    35,    42,   nil,
    41,   nil,    35,    22,     4,    35,     4,   nil,   nil,   nil,
   nil,    16,   nil,    18,    37,   nil,   nil,     4,     4,     4,
     4,     4,   nil,     4,     5,   nil,     5,    23,   nil,   nil,
    22,   nil,    21,    34,   nil,    22,   nil,     5,     5,     5,
     5,     5,   nil,     5,   nil,   nil,   nil,   nil,    36,   nil,
   nil,   nil,    36,   nil,   nil,    24,    36,    36,   nil,     6,
    24,     6,   nil,   nil,   nil,   nil,    22,     7,   nil,     7,
   nil,   nil,     6,     6,     6,     6,     6,     8,     6,     8,
     7,     7,     7,     7,     7,    11,     7,    11,   nil,   nil,
     8,     8,     8,     8,     8,   nil,     8,   nil,    11,    11,
    11,    11,    11,   nil,    11 ]

racc_goto_pointer = [
   nil,    23,   nil,    17,    54,    74,   109,   117,   127,   nil,
   nil,   135,   nil,     2,    -8,    11,   -30,    -3,   -29,    -5,
    -4,   -40,   -42,   -15,   -17,   -28,   nil,   nil,  -120,   -96,
   nil,   nil,   -20,  -101,    -9,  -116,   -40,   -91,    24,    18,
   nil,    -9,   -13 ]

racc_goto_default = [
   nil,   nil,     2,     3,    46,    47,    48,    49,    50,     9,
    10,    51,    12,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   140,   nil,    45,   127,   139,   128,
   141,   130,   142,   143,   132,   131,   134,    98,   nil,    28,
    27,   nil,    60 ]

racc_reduce_table = [
  0, 0, :racc_error,
  1, 27, :_reduce_none,
  2, 28, :_reduce_2,
  1, 28, :_reduce_3,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  1, 29, :_reduce_none,
  3, 30, :_reduce_13,
  3, 31, :_reduce_14,
  3, 32, :_reduce_15,
  3, 33, :_reduce_16,
  3, 34, :_reduce_17,
  4, 35, :_reduce_18,
  3, 35, :_reduce_19,
  2, 40, :_reduce_20,
  2, 40, :_reduce_21,
  1, 40, :_reduce_22,
  1, 40, :_reduce_23,
  2, 41, :_reduce_24,
  2, 41, :_reduce_25,
  1, 41, :_reduce_26,
  1, 41, :_reduce_27,
  2, 39, :_reduce_none,
  4, 39, :_reduce_29,
  4, 39, :_reduce_30,
  2, 43, :_reduce_31,
  4, 43, :_reduce_32,
  1, 44, :_reduce_33,
  3, 44, :_reduce_34,
  1, 45, :_reduce_none,
  3, 45, :_reduce_36,
  3, 45, :_reduce_37,
  2, 46, :_reduce_38,
  2, 46, :_reduce_39,
  1, 46, :_reduce_40,
  1, 46, :_reduce_41,
  1, 47, :_reduce_none,
  2, 51, :_reduce_43,
  1, 51, :_reduce_44,
  2, 53, :_reduce_45,
  1, 53, :_reduce_46,
  1, 50, :_reduce_none,
  1, 50, :_reduce_none,
  1, 50, :_reduce_none,
  1, 50, :_reduce_none,
  1, 50, :_reduce_none,
  1, 50, :_reduce_none,
  1, 54, :_reduce_none,
  1, 54, :_reduce_none,
  1, 55, :_reduce_none,
  1, 55, :_reduce_none,
  1, 56, :_reduce_57,
  1, 52, :_reduce_58,
  1, 57, :_reduce_59,
  2, 58, :_reduce_60,
  1, 58, :_reduce_none,
  2, 49, :_reduce_62,
  1, 49, :_reduce_none,
  2, 48, :_reduce_64,
  1, 48, :_reduce_none,
  1, 60, :_reduce_none,
  1, 60, :_reduce_none,
  1, 60, :_reduce_none,
  1, 60, :_reduce_none,
  1, 60, :_reduce_none,
  1, 62, :_reduce_none,
  1, 62, :_reduce_none,
  1, 59, :_reduce_none,
  1, 59, :_reduce_none,
  1, 61, :_reduce_none,
  1, 61, :_reduce_none,
  1, 61, :_reduce_none,
  2, 42, :_reduce_78,
  1, 42, :_reduce_none,
  1, 63, :_reduce_none,
  2, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  1, 63, :_reduce_none,
  3, 36, :_reduce_101,
  3, 37, :_reduce_102,
  1, 65, :_reduce_none,
  1, 65, :_reduce_none,
  1, 65, :_reduce_none,
  1, 65, :_reduce_none,
  1, 65, :_reduce_none,
  1, 65, :_reduce_none,
  2, 66, :_reduce_109,
  1, 66, :_reduce_none,
  1, 38, :_reduce_111,
  1, 67, :_reduce_none,
  2, 67, :_reduce_113,
  2, 67, :_reduce_114,
  2, 67, :_reduce_115,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  1, 68, :_reduce_none,
  2, 64, :_reduce_136,
  1, 64, :_reduce_none ]

racc_reduce_n = 138

racc_shift_n = 179

racc_token_table = {
  false => 0,
  :error => 1,
  :EX_LOW => 2,
  :QUOTE => 3,
  :BAR => 4,
  :SLASH => 5,
  :BACK_SLASH => 6,
  :URL => 7,
  :OTHER => 8,
  :REF_OPEN => 9,
  :FOOTNOTE_OPEN => 10,
  :FOOTNOTE_CLOSE => 11,
  :EX_HIGH => 12,
  :EM_OPEN => 13,
  :EM_CLOSE => 14,
  :CODE_OPEN => 15,
  :CODE_CLOSE => 16,
  :VAR_OPEN => 17,
  :VAR_CLOSE => 18,
  :KBD_OPEN => 19,
  :KBD_CLOSE => 20,
  :INDEX_OPEN => 21,
  :INDEX_CLOSE => 22,
  :REF_CLOSE => 23,
  :VERB_OPEN => 24,
  :VERB_CLOSE => 25 }

racc_nt_base = 26

racc_use_result_var = true

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 ]

Racc_token_to_s_table = [
  "$end",
  "error",
  "EX_LOW",
  "QUOTE",
  "BAR",
  "SLASH",
  "BACK_SLASH",
  "URL",
  "OTHER",
  "REF_OPEN",
  "FOOTNOTE_OPEN",
  "FOOTNOTE_CLOSE",
  "EX_HIGH",
  "EM_OPEN",
  "EM_CLOSE",
  "CODE_OPEN",
  "CODE_CLOSE",
  "VAR_OPEN",
  "VAR_CLOSE",
  "KBD_OPEN",
  "KBD_CLOSE",
  "INDEX_OPEN",
  "INDEX_CLOSE",
  "REF_CLOSE",
  "VERB_OPEN",
  "VERB_CLOSE",
  "$start",
  "content",
  "elements",
  "element",
  "emphasis",
  "code",
  "var",
  "keyboard",
  "index",
  "reference",
  "footnote",
  "verb",
  "normal_str_ele",
  "substitute",
  "ref_label",
  "ref_label2",
  "ref_url_strings",
  "filename",
  "element_label",
  "element_label2",
  "ref_subst_content",
  "ref_subst_content_q",
  "ref_subst_strings_q",
  "ref_subst_strings_first",
  "ref_subst_ele2",
  "ref_subst_eles",
  "ref_subst_str_ele_first",
  "ref_subst_eles_q",
  "ref_subst_ele",
  "ref_subst_ele_q",
  "ref_subst_str_ele",
  "ref_subst_str_ele_q",
  "ref_subst_strings",
  "ref_subst_string3",
  "ref_subst_string",
  "ref_subst_string_q",
  "ref_subst_string2",
  "ref_url_string",
  "verb_strings",
  "normal_string",
  "normal_strings",
  "verb_string",
  "verb_normal_string" ]

Racc_debug_parser = false

##### State transition tables end #####

# reduce 0 omitted

# reduce 1 omitted

def _reduce_2(val, _values, result)
 result.append val[1]
    result
end

def _reduce_3(val, _values, result)
 result = val[0]
    result
end

# reduce 4 omitted

# reduce 5 omitted

# reduce 6 omitted

# reduce 7 omitted

# reduce 8 omitted

# reduce 9 omitted

# reduce 10 omitted

# reduce 11 omitted

# reduce 12 omitted

def _reduce_13(val, _values, result)
      content = val[1]
      result = inline "<em>#{content}</em>", content

    result
end

def _reduce_14(val, _values, result)
      content = val[1]
      result = inline "<code>#{content}</code>", content

    result
end

def _reduce_15(val, _values, result)
      content = val[1]
      result = inline "+#{content}+", content

    result
end

def _reduce_16(val, _values, result)
      content = val[1]
      result = inline "<tt>#{content}</tt>", content

    result
end

def _reduce_17(val, _values, result)
      label = val[1]
      @block_parser.add_label label.reference
      result = "<span id=\"label-#{label}\">#{label}</span>"

    result
end

def _reduce_18(val, _values, result)
      result = "{#{val[1]}}[#{val[2].join}]"

    result
end

def _reduce_19(val, _values, result)
      scheme, inline = val[1]

      result = "{#{inline}}[#{scheme}#{inline.reference}]"

    result
end

def _reduce_20(val, _values, result)
      result = [nil, inline(val[1])]

    result
end

def _reduce_21(val, _values, result)
      result = [
        'rdoc-label:',
        inline("#{val[0].reference}/#{val[1].reference}")
      ]

    result
end

def _reduce_22(val, _values, result)
      result = ['rdoc-label:', val[0].reference]

    result
end

def _reduce_23(val, _values, result)
      result = ['rdoc-label:', "#{val[0].reference}/"]

    result
end

def _reduce_24(val, _values, result)
      result = [nil, inline(val[1])]

    result
end

def _reduce_25(val, _values, result)
      result = [
        'rdoc-label:',
        inline("#{val[0].reference}/#{val[1].reference}")
      ]

    result
end

def _reduce_26(val, _values, result)
      result = ['rdoc-label:', val[0]]

    result
end

def _reduce_27(val, _values, result)
      ref = val[0].reference
      result = ['rdoc-label:', inline(ref, "#{ref}/")]

    result
end

# reduce 28 omitted

def _reduce_29(val, _values, result)
 result = val[1]
    result
end

def _reduce_30(val, _values, result)
 result = val[1]
    result
end

def _reduce_31(val, _values, result)
      result = inline val[0]

    result
end

def _reduce_32(val, _values, result)
      result = inline "\"#{val[1]}\""

    result
end

def _reduce_33(val, _values, result)
      result = inline val[0]

    result
end

def _reduce_34(val, _values, result)
      result = inline "\"#{val[1]}\""

    result
end

# reduce 35 omitted

def _reduce_36(val, _values, result)
 result = val[1]
    result
end

def _reduce_37(val, _values, result)
 result = inline val[1]
    result
end

def _reduce_38(val, _values, result)
      result = val[0].append val[1]

    result
end

def _reduce_39(val, _values, result)
      result = val[0].append val[1]

    result
end

def _reduce_40(val, _values, result)
      result = val[0]

    result
end

def _reduce_41(val, _values, result)
      result = inline val[0]

    result
end

# reduce 42 omitted

def _reduce_43(val, _values, result)
      result = val[0].append val[1]

    result
end

def _reduce_44(val, _values, result)
      result = inline val[0]

    result
end

def _reduce_45(val, _values, result)
      result = val[0].append val[1]

    result
end

def _reduce_46(val, _values, result)
      result = val[0]

    result
end

# reduce 47 omitted

# reduce 48 omitted

# reduce 49 omitted

# reduce 50 omitted

# reduce 51 omitted

# reduce 52 omitted

# reduce 53 omitted

# reduce 54 omitted

# reduce 55 omitted

# reduce 56 omitted

def _reduce_57(val, _values, result)
      result = val[0]

    result
end

def _reduce_58(val, _values, result)
      result = inline val[0]

    result
end

def _reduce_59(val, _values, result)
      result = inline val[0]

    result
end

def _reduce_60(val, _values, result)
 result << val[1]
    result
end

# reduce 61 omitted

def _reduce_62(val, _values, result)
      result << val[1]

    result
end

# reduce 63 omitted

def _reduce_64(val, _values, result)
      result << val[1]

    result
end

# reduce 65 omitted

# reduce 66 omitted

# reduce 67 omitted

# reduce 68 omitted

# reduce 69 omitted

# reduce 70 omitted

# reduce 71 omitted

# reduce 72 omitted

# reduce 73 omitted

# reduce 74 omitted

# regems/gems/rdoc-6.5.1.1/lib/rdoc/rd/inline.rb000064400000002613150403134150014070 0ustar00ce_101(val, _values, result)
      index = @block_parser.add_footnote val[1].rdoc
      result = "{*#{index}}[rdoc-label:foottext-#{index}:footmark-#{index}]"

    result
end

def _reduce_102(val, _values, result)
      result = inline "<tt>#{val[1]}</tt>", val[1]

    result
end

# reduce 103 omitted

# reduce 104 omitted

# reduce 105 omitted

# reduce 106 omitted

# reduce 107 omitted

# reduce 108 omitted

def _reduce_109(val, _values, result)
 result << val[1]
    result
end

# reduce 110 omitted

def _reduce_111(val, _values, result)
      result = inline val[0]

    result
end

# reduce 112 omitted

def _reduce_113(val, _values, result)
 result = val[1]
    result
end

def _reduce_114(val, _values, result)
 result = val[1]
    result
end

def _reduce_115(val, _values, result)
 result = val[1]
    result
end

# reduce 116 omitted

# reduce 117 omitted

# reduce 118 omitted

# reduce 119 omitted

# reduce 120 omitted

# reduce 121 omitted

# reduce 122 omitted

# reduce 123 omitted

# reduce 124 omitted

# reduce 125 omitted

# reduce 126 omitted

# reduce 127 omitted

# reduce 128 omitted

# reduce 129 omitted

# reduce 130 omitted

# reduce 131 omitted

# reduce 132 omitted

# reduce 133 omitted

# reduce 134 omitted

# reduce 135 omitted

def _reduce_136(val, _values, result)
 result << val[1]
    result
end

# reduce 137 omitted

def _reduce_none(val, _values, result)
  val[0]
end

end  gems/gems/rdoc-6.5.1.1/lib/rdoc/rd/block_parser.rb000064400000054447150403134150015274 0ustar00# frozen_string_literal: true
##
# Inline keeps track of markup and labels to create proper links.

class RDoc::RD::Inline

  ##
  # The text of the reference

  attr_reader :reference

  ##
  # The markup of this reference in RDoc format

  attr_reader :rdoc

  ##
  # Creates a new Inline for +rdoc+ and +reference+.
  #
  # +rdoc+ may be another Inline or a String.  If +reference+ is not given it
  # will use the text from +rdoc+.

  def self.new rdoc, reference = rdoc
    if self === rdoc and reference.equal? rdoc then
      rdoc
    else
      super
    end
  end

  ##
  # Initializes the Inline with +rdoc+ and +inline+

  def initialize rdoc, reference # :not-new:
    @reference = reference.equal?(rdoc) ? reference.dup : reference

    # unpack
    @reference = @reference.reference if self.class === @reference
    @rdoc      = rdoc
  end

  def == other # :nodoc:
    self.class === other and
      @reference == other.reference and @rdoc == other.rdoc
  end

  ##
  # Appends +more+ to this inline.  +more+ may be a String or another Inline.

  def append more
    case more
    when String then
      @reference += more
      @rdoc      += more
    when RDoc::RD::Inline then
      @reference += more.reference
      @rdoc      += more.rdoc
    else
      raise "unknown thingy #{more}"
    end

    self
  end

  def inspect # :nodoc:
    "(inline: #{self})"
  end

  alias to_s rdoc # :nodoc:

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/rd/block_parser.rb000064400000054447150403134150015274 0ustar00# frozen_string_literal: true
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.6.0
# from Racc grammar file "".
#

require 'racc/parser.rb'

class RDoc::RD

##
# RD format parser for headings, paragraphs, lists, verbatim sections that
# exist as blocks.

class BlockParser < Racc::Parser


# :stopdoc:

MARK_TO_LEVEL = {
  '='    => 1,
  '=='   => 2,
  '==='  => 3,
  '====' => 4,
  '+'    => 5,
  '++'   => 6,
}

# :startdoc:

##
# Footnotes for this document

attr_reader :footnotes

##
# Labels for items in this document

attr_reader :labels

##
# Path to find included files in

attr_accessor :include_path

##
# Creates a new RDoc::RD::BlockParser.  Use #parse to parse an rd-format
# document.

def initialize
  @inline_parser = RDoc::RD::InlineParser.new self
  @include_path = []

  # for testing
  @footnotes = []
  @labels    = {}
end

##
# Parses +src+ and returns an RDoc::Markup::Document.

def parse src
  @src = src
  @src.push false

  @footnotes = []
  @labels    = {}

  # @i: index(line no.) of src
  @i = 0

  # stack for current indentation
  @indent_stack = []

  # how indented.
  @current_indent = @indent_stack.join("")

  # RDoc::RD::BlockParser for tmp src
  @subparser = nil

  # which part is in now
  @in_part = nil
  @part_content = []

  @in_verbatim = false

  @yydebug = true

  document = do_parse

  unless @footnotes.empty? then
    blankline = document.parts.pop

    document.parts << RDoc::Markup::Rule.new(1)
    document.parts.concat @footnotes

    document.parts.push blankline
  end

  document
end

##
# Returns the next token from the document

def next_token # :nodoc:
  # preprocessing
  # if it is not in RD part
  # => method
  while @in_part != "rd"
    line = @src[@i]
    @i += 1 # next line

    case line
    # src end
    when false
      return [false, false]
    # RD part begin
    when /^=begin\s*(?:\bRD\b.*)?\s*$/
      if @in_part # if in non-RD part
        @part_content.push(line)
      else
        @in_part = "rd"
        return [:WHITELINE, "=begin\n"] # <= for textblockand
      end
    # non-RD part begin
    when /^=begin\s+(\w+)/
      part = $1
=begin # not imported to RDoc
      if @in_part # if in non-RD part
        @part_content.push(line)
      else
        @in_part = part if @tree.filter[part] # if filter exists
#  p "BEGIN_PART: #{@in_part}" # DEBUG
      end
=end
      @in_part = part
    # non-RD part end
    when /^=end(?:$|[\s\0\C-d\C-z])/
      if @in_part # if in non-RD part
=begin # not imported to RDoc
#  p "END_PART: #{@in_part}" # DEBUG
        # make Part-in object
        part = RDoc::RD::Part.new(@part_content.join(""), @tree, "r")
        @part_content.clear
        # call filter, part_out is output(Part object)
        part_out = @tree.filter[@in_part].call(part)

        if @tree.filter[@in_part].mode == :rd # if output is RD formatted
          subtree = parse_subtree(part_out.to_a)
        else # if output is target formatted
          basename = Tempfile.create(["rdtmp", ".#{@in_part}"], @tree.tmp_dir) do |tmpfile|
            tmpfile.print(part_out)
            File.basename(tmpfile.path)
          end
          subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"])
        end
        @in_part = nil
        return [:SUBTREE, subtree]
=end
      end
    else
=begin # not imported to RDoc
      if @in_part # if in non-RD part
        @part_content.push(line)
      end
=end
    end
  end

  @current_indent = @indent_stack.join("")
  line = @src[@i]
  case line
  when false
    if_current_indent_equal("") do
      [false, false]
    end
  when /^=end/
    if_current_indent_equal("") do
      @in_part = nil
      [:WHITELINE, "=end"] # MUST CHANGE??
    end
  when /^\s*$/
    @i += 1 # next line
    return [:WHITELINE, ':WHITELINE']
  when /^\#/  # comment line
    @i += 1 # next line
    self.next_token()
  when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/
    rest = $'                    # '
    rest.strip!
    mark = $1
    if_current_indent_equal("") do
      return [:HEADLINE, [MARK_TO_LEVEL[mark], rest]]
    end
  when /^<<<\s*(\S+)/
    file = $1
    if_current_indent_equal("") do
      suffix = file[-3 .. -1]
      if suffix == ".rd" or suffix == ".rb"
        subtree = parse_subtree(get_included(file))
        [:SUBTREE, subtree]
      else
        [:INCLUDE, file]
      end
    end
  when /^(\s*)\*(\s*)/
    rest = $'                   # '
    newIndent = $2
    if_current_indent_equal($1) do
      if @in_verbatim
        [:STRINGLINE, line]
      else
        @indent_stack.push("\s" + newIndent)
        [:ITEMLISTLINE, rest]
      end
    end
  when /^(\s*)(\(\d+\))(\s*)/
    rest = $'                     # '
    mark = $2
    newIndent = $3
    if_current_indent_equal($1) do
      if @in_verbatim
        [:STRINGLINE, line]
      else
        @indent_stack.push("\s" * mark.size + newIndent)
        [:ENUMLISTLINE, rest]
      end
    end
  when /^(\s*):(\s*)/
    rest = $'                    # '
    newIndent = $2
    if_current_indent_equal($1) do
      if @in_verbatim
        [:STRINGLINE, line]
      else
        @indent_stack.push("\s#{$2}")
        [:DESCLISTLINE, rest]
      end
    end
  when /^(\s*)---(?!-|\s*$)/
    indent = $1
    rest = $'
    /\s*/ === rest
    term = $'
    new_indent = $&
    if_current_indent_equal(indent) do
      if @in_verbatim
        [:STRINGLINE, line]
      else
        @indent_stack.push("\s\s\s" + new_indent)
        [:METHODLISTLINE, term]
      end
    end
  when /^(\s*)/
    if_current_indent_equal($1) do
      [:STRINGLINE, line]
    end
  else
    raise "[BUG] parsing error may occurred."
  end
end

##
# Yields to the given block if +indent+ matches the current indent, otherwise
# an indentation token is processed.

def if_current_indent_equal(indent)
  indent = indent.sub(/\t/, "\s" * 8)
  if @current_indent == indent
    @i += 1 # next line
    yield
  elsif indent.index(@current_indent) == 0
    @indent_stack.push(indent[@current_indent.size .. -1])
    [:INDENT, ":INDENT"]
  else
    @indent_stack.pop
    [:DEDENT, ":DEDENT"]
  end
end
private :if_current_indent_equal

##
# Cuts off excess whitespace in +src+

def cut_off(src)
  ret = []
  whiteline_buf = []

  line = src.shift
  /^\s*/ =~ line

  indent = Regexp.quote($&)
  ret.push($')

  while line = src.shift
    if /^(\s*)$/ =~ line
      whiteline_buf.push(line)
    elsif /^#{indent}/ =~ line
      unless whiteline_buf.empty?
        ret.concat(whiteline_buf)
        whiteline_buf.clear
      end
      ret.push($')
    else
      raise "[BUG]: probably Parser Error while cutting off.\n"
    end
  end
  ret
end
private :cut_off

def set_term_to_element(parent, term)
#  parent.set_term_under_document_struct(term, @tree.document_struct)
  parent.set_term_without_document_struct(term)
end
private :set_term_to_element

##
# Raises a ParseError when invalid formatting is found

def on_error(et, ev, _values)
  prv, cur, nxt = format_line_num(@i, @i+1, @i+2)

  raise ParseError, <<Msg

RD syntax error: line #{@i+1}:
  #{prv}  |#{@src[@i-1].chomp}
  #{cur}=>|#{@src[@i].chomp}
  #{nxt}  |#{@src[@i+1].chomp}

Msg
end

##
# Current line number

def line_index
  @i
end

##
# Parses subtree +src+

def parse_subtree src
  @subparser ||= RDoc::RD::BlockParser.new

  @subparser.parse src
end
private :parse_subtree

##
# Retrieves the content for +file+ from the include_path

def get_included(file)
  included = []

  @include_path.each do |dir|
    file_name = File.join dir, file

    if File.exist? file_name then
      included = IO.readlines file_name
      break
    end
  end

  included
end
private :get_included

##
# Formats line numbers +line_numbers+ prettily

def format_line_num(*line_numbers)
  width = line_numbers.collect{|i| i.to_s.length }.max
  line_numbers.collect{|i| sprintf("%#{width}d", i) }
end
private :format_line_num

##
# Retrieves the content of +values+ as a single String

def content values
 values.map { |value| value.content }.join
end

##
# Creates a paragraph for +value+

def paragraph value
  content = cut_off(value).join(' ').rstrip
  contents = @inline_parser.parse content

  RDoc::Markup::Paragraph.new(*contents)
end

##
# Adds footnote +content+ to the document

def add_footnote content
  index = @footnotes.length / 2 + 1

  footmark_link = "{^#{index}}[rdoc-label:footmark-#{index}:foottext-#{index}]"

  @footnotes << RDoc::Markup::Paragraph.new(footmark_link, ' ', *content)
  @footnotes << RDoc::Markup::BlankLine.new

  index
end

##
# Adds label +label+ to the document

def add_label label
  @labels[label] = true

  label
end

# :stopdoc:

##### State transition tables begin ###

racc_action_table = [
    34,    35,    30,    33,    40,    34,    35,    30,    33,    40,
    65,    34,    35,    30,    33,    14,    73,    36,    38,    34,
    15,    88,    34,    35,    30,    33,    14,     9,    10,    11,
    12,    15,    34,    35,    30,    33,    14,     9,    10,    11,
    12,    15,    34,    35,    30,    33,    35,    47,    30,    54,
    33,    15,    34,    35,    30,    33,    54,    47,    14,    14,
    59,    15,    34,    35,    30,    33,    14,    73,    67,    76,
    77,    15,    34,    35,    30,    33,    14,    73,    54,    81,
    38,    15,    34,    35,    30,    33,    14,    73,    38,    40,
    83,    15,    34,    35,    30,    33,    14,    73,   nil,   nil,
   nil,    15,    34,    35,    30,    33,    14,    73,   nil,   nil,
   nil,    15,    34,    35,    30,    33,    14,    73,   nil,   nil,
   nil,    15,    34,    35,    30,    33,    14,    73,   nil,   nil,
   nil,    15,    34,    35,    30,    33,    14,    73,   nil,   nil,
   nil,    15,    34,    35,    30,    33,    14,    73,    61,    63,
   nil,    15,    14,    62,    60,    61,    63,    79,    61,    63,
    62,    87,   nil,    62,    34,    35,    30,    33 ]

racc_action_check = [
    41,    41,    41,    41,    41,    15,    15,    15,    15,    15,
    41,    86,    86,    86,    86,    86,    86,     1,    13,    22,
    86,    86,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    24,    24,    24,    24,    25,    24,    28,    30,
    31,    24,    27,    27,    27,    27,    33,    27,    34,    35,
    36,    27,    45,    45,    45,    45,    45,    45,    44,    49,
    51,    45,    46,    46,    46,    46,    46,    46,    54,    56,
    57,    46,    47,    47,    47,    47,    47,    47,    58,    62,
    66,    47,    68,    68,    68,    68,    68,    68,   nil,   nil,
   nil,    68,    74,    74,    74,    74,    74,    74,   nil,   nil,
   nil,    74,    75,    75,    75,    75,    75,    75,   nil,   nil,
   nil,    75,    78,    78,    78,    78,    78,    78,   nil,   nil,
   nil,    78,    79,    79,    79,    79,    79,    79,   nil,   nil,
   nil,    79,    85,    85,    85,    85,    85,    85,    39,    39,
   nil,    85,    52,    39,    39,    82,    82,    52,    64,    64,
    82,    82,   nil,    64,    20,    20,    20,    20 ]

racc_action_pointer = [
    19,    17,    29,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,    11,   nil,     2,   nil,   nil,   nil,   nil,
   161,   nil,    16,   nil,    39,    42,   nil,    49,    43,   nil,
    41,    44,   nil,    48,    51,    52,    60,   nil,   nil,   141,
   nil,    -3,   nil,   nil,    55,    59,    69,    79,   nil,    56,
   nil,    57,   145,   nil,    70,   nil,    66,    73,    81,   nil,
   nil,   nil,    82,   nil,   151,   nil,    77,   nil,    89,   nil,
   nil,   nil,   nil,   nil,    99,   109,   nil,   nil,   119,   129,
   nil,   nil,   148,   nil,   nil,   139,     8,   nil,   nil ]

racc_action_default = [
    -2,   -73,    -1,    -4,    -5,    -6,    -7,    -8,    -9,   -10,
   -11,   -12,   -13,   -14,   -16,   -73,   -23,   -24,   -25,   -26,
   -27,   -31,   -32,   -34,   -72,   -36,   -38,   -72,   -40,   -42,
   -59,   -44,   -46,   -59,   -63,   -65,   -73,    -3,   -15,   -73,
   -22,   -73,   -30,   -33,   -73,   -69,   -70,   -71,   -37,   -73,
   -41,   -73,   -51,   -58,   -61,   -45,   -73,   -62,   -64,    89,
   -17,   -19,   -73,   -21,   -18,   -28,   -73,   -35,   -66,   -53,
   -54,   -55,   -56,   -57,   -67,   -68,   -39,   -43,   -49,   -73,
   -60,   -47,   -73,   -29,   -52,   -48,   -73,   -20,   -50 ]

racc_goto_table = [
     4,    39,     4,    68,    74,    75,     5,     6,     5,     6,
    44,    42,    51,    49,     3,    56,    37,    57,    58,     1,
     2,    66,    84,    41,    43,    48,    50,    64,    84,    84,
    45,    46,    42,    45,    46,    55,    85,    86,    80,    84,
    84,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    82,   nil,
   nil,   nil,    78 ]

racc_goto_check = [
     4,    10,     4,    31,    31,    31,     5,     6,     5,     6,
    21,    12,    27,    21,     3,    27,     3,     9,     9,     1,
     2,    11,    32,    17,    19,    23,    26,    10,    32,    32,
     5,     6,    12,     5,     6,    29,    31,    31,    33,    32,
    32,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    10,   nil,
   nil,   nil,     4 ]

racc_goto_pointer = [
   nil,    19,    20,    14,     0,     6,     7,   nil,   nil,   -17,
   -14,   -20,    -9,   nil,   nil,   nil,   nil,     8,   nil,     2,
   nil,   -14,   nil,     0,   nil,   nil,    -2,   -18,   nil,     4,
   nil,   -42,   -46,   -16 ]

racc_goto_default = [
   nil,   nil,   nil,   nil,    70,    71,    72,     7,     8,    13,
   nil,   nil,    21,    16,    17,    18,    19,    20,    22,    23,
    24,   nil,    25,    26,    27,    28,    29,   nil,    31,    32,
    52,   nil,    69,    53 ]

racc_reduce_table = [
  0, 0, :racc_error,
  1, 15, :_reduce_1,
  0, 15, :_reduce_2,
  2, 16, :_reduce_3,
  1, 16, :_reduce_4,
  1, 17, :_reduce_5,
  1, 17, :_reduce_6,
  1, 17, :_reduce_none,
  1, 17, :_reduce_8,
  1, 17, :_reduce_9,
  1, 17, :_reduce_10,
  1, 17, :_reduce_11,
  1, 21, :_reduce_12,
  1, 22, :_reduce_13,
  1, 18, :_reduce_14,
  2, 23, :_reduce_15,
  1, 23, :_reduce_16,
  3, 19, :_reduce_17,
  1, 25, :_reduce_18,
  2, 24, :_reduce_19,
  4, 24, :_reduce_20,
  2, 24, :_reduce_21,
  1, 24, :_reduce_22,
  1, 26, :_reduce_none,
  1, 26, :_reduce_none,
  1, 26, :_reduce_none,
  1, 26, :_reduce_none,
  1, 20, :_reduce_27,
  3, 20, :_reduce_28,
  4, 20, :_reduce_29,
  2, 31, :_reduce_30,
  1, 31, :_reduce_31,
  1, 27, :_reduce_32,
  2, 32, :_reduce_33,
  1, 32, :_reduce_34,
  3, 33, :_reduce_35,
  1, 28, :_reduce_36,
  2, 36, :_reduce_37,
  1, 36, :_reduce_38,
  3, 37, :_reduce_39,
  1, 29, :_reduce_40,
  2, 39, :_reduce_41,
  1, 39, :_reduce_42,
  3, 40, :_reduce_43,
  1, 30, :_reduce_44,
  2, 42, :_reduce_45,
  1, 42, :_reduce_46,
  3, 43, :_reduce_47,
  3, 41, :_reduce_48,
  2, 41, :_reduce_49,
  4, 41, :_reduce_50,
  1, 41, :_reduce_51,
  2, 45, :_reduce_52,
  1, 45, :_reduce_none,
  1, 46, :_reduce_54,
  1, 46, :_reduce_55,
  1, 46, :_reduce_none,
  1, 46, :_reduce_57,
  1, 44, :_reduce_none,
  0, 44, :_reduce_none,
  2, 47, :_reduce_none,
  1, 47, :_reduce_none,
  2, 34, :_reduce_62,
  1, 34, :_reduce_63,
  2, 38, :_reduce_64,
  1, 38, :_reduce_65,
  2, 35, :_reduce_66,
  2, 35, :_reduce_67,
  2, 35, :_reduce_68,
  1, 35, :_reduce_69,
  1, 35, :_reduce_none,
  1, 35, :_reduce_71,
  0, 35, :_reduce_72 ]

racc_reduce_n = 73

racc_shift_n = 89

racc_token_table = {
  false => 0,
  :error => 1,
  :DUMMY => 2,
  :ITEMLISTLINE => 3,
  :ENUMLISTLINE => 4,
  :DESCLISTLINE => 5,
  :METHODLISTLINE => 6,
  :STRINGLINE => 7,
  :WHITELINE => 8,
  :SUBTREE => 9,
  :HEADLINE => 10,
  :INCLUDE => 11,
  :INDENT => 12,
  :DEDENT => 13 }

racc_nt_base = 14

racc_use_result_var = true

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 ]

Racc_token_to_s_table = [
  "$end",
  "error",
  "DUMMY",
  "ITEMLISTLINE",
  "ENUMLISTLINE",
  "DESCLISTLINE",
  "METHODLISTLINE",
  "STRINGLINE",
  "WHITELINE",
  "SUBTREE",
  "HEADLINE",
  "INCLUDE",
  "INDENT",
  "DEDENT",
  "$start",
  "document",
  "blocks",
  "block",
  "textblock",
  "verbatim",
  "lists",
  "headline",
  "include",
  "textblockcontent",
  "verbatimcontent",
  "verbatim_after_lists",
  "list",
  "itemlist",
  "enumlist",
  "desclist",
  "methodlist",
  "lists2",
  "itemlistitems",
  "itemlistitem",
  "first_textblock_in_itemlist",
  "other_blocks_in_list",
  "enumlistitems",
  "enumlistitem",
  "first_textblock_in_enumlist",
  "desclistitems",
  "desclistitem",
  "description_part",
  "methodlistitems",
  "methodlistitem",
  "whitelines",
  "blocks_in_list",
  "block_in_list",
  "whitelines2" ]

Racc_debug_parser = false

##### State transition tables end #####

# reduce 0 omitted

def _reduce_1(val, _values, result)
 result = RDoc::Markup::Document.new(*val[0])
    result
end

def _reduce_2(val, _values, result)
 raise ParseError, "file empty"
    result
end

def _reduce_3(val, _values, result)
 result = val[0].concat val[1]
    result
end

def _reduce_4(val, _values, result)
 result = val[0]
    result
end

def _reduce_5(val, _values, result)
 result = val
    result
end

def _reduce_6(val, _values, result)
 result = val
    result
end

# reduce 7 omitted

def _reduce_8(val, _values, result)
 result = val
    result
end

def _reduce_9(val, _values, result)
 result = val
    result
end

def _reduce_10(val, _values, result)
 result = [RDoc::Markup::BlankLine.new]
    result
end

def _reduce_11(val, _values, result)
 result = val[0].parts
    result
end

def _reduce_12(val, _values, result)
      # val[0] is like [level, title]
      title = @inline_parser.parse(val[0][1])
      result = RDoc::Markup::Heading.new(val[0][0], title)

    result
end

def _reduce_13(val, _values, result)
      result = RDoc::Markup::Include.new val[0], @include_path

    result
end

def _reduce_14(val, _values, result)
      # val[0] is Array of String
      result = paragraph val[0]

    result
end

def _reduce_15(val, _values, result)
 result << val[1].rstrip
    result
end

def _reduce_16(val, _values, result)
 result = [val[0].rstrip]
    result
end

def _reduce_17(val, _values, result)
      # val[1] is Array of String
      content = cut_off val[1]
      result = RDoc::Markup::Verbatim.new(*content)

      # imform to lexer.
      @in_verbatim = false

    result
end

def _reduce_18(val, _values, result)
      # val[0] is Array of String
      content = cut_off val[0]
      result = RDoc::Markup::Verbatim.new(*content)

      # imform to lexer.
      @in_verbatim = false

    result
end

def _reduce_19(val, _values, result)
      result << val[1]

    result
end

def _reduce_20(val, _values, result)
      result.concat val[2]

    result
end

def _reduce_21(val, _values, result)
      result << "\n"

    result
end

def _reduce_22(val, _values, result)
      result = val
      # inform to lexer.
      @in_verbatim = true

    result
end

# reduce 23 omitted

# reduce 24 omitted

# reduce 25 omitted

# reduce 26 omitted

def _reduce_27(val, _values, result)
      result = val[0]

    result
end

def _reduce_28(val, _values, result)
      result = val[1]

    result
end

def _reduce_29(val, _values, result)
      result = val[1].push(val[2])

    result
end

def _reduce_30(val, _values, result)
 result = val[0] << val[1]
    result
end

def _reduce_31(val, _values, result)
 result = [val[0]]
    result
end

def _reduce_32(val, _values, result)
      result = RDoc::Markup::List.new :BULLET, *val[0]

    result
end

def _reduce_33(val, _values, result)
 result.push(val[1])
    result
end

def _reduce_34(val, _values, result)
 result = val
    result
end

def _reduce_35(val, _values, result)
      result = RDoc::Markup::ListItem.new nil, val[0], *val[1]

    result
end

def _reduce_36(val, _values, result)
      result = RDoc::Markup::List.new :NUMBER, *val[0]

    result
end

def _reduce_37(val, _values, result)
 result.push(val[1])
    result
end

def _reduce_38(val, _values, result)
 result = val
    result
end

def _reduce_39(val, _values, result)
      result = RDoc::Markup::ListItem.new nil, val[0], *val[1]

    result
end

def _reduce_40(val, _values, result)
      result = RDoc::Markup::List.new :NOTE, *val[0]

    result
end

def _reduce_41(val, _values, result)
 result.push(val[1])
    result
end

def _reduce_42(val, _values, result)
 result = val
    result
end

def _reduce_43(val, _values, result)
      term = @inline_parser.parse val[0].strip

      result = RDoc::Markup::ListItem.new term, *vgems/gems/rdoc-6.5.1.1/lib/rdoc/known_classes.rb000064400000005276150403134150015066 0ustar00educe_52(val, _values, result)
 result.concat val[1]
    result
end

# reduce 53 omitted

def _reduce_54(val, _values, result)
 result = val
    result
end

def _reduce_55(val, _values, result)
 result = val
    result
end

# reduce 56 omitted

def _reduce_57(val, _values, result)
 result = []
    result
end

# reduce 58 omitted

# reduce 59 omitted

# reduce 60 omitted

# reduce 61 omitted

def _reduce_62(val, _values, result)
      result = paragraph [val[0]].concat(val[1])

    result
end

def _reduce_63(val, _values, result)
      result = paragraph [val[0]]

    result
end

def _reduce_64(val, _values, result)
      result = paragraph [val[0]].concat(val[1])

    result
end

def _reduce_65(val, _values, result)
      result = paragraph [val[0]]

    result
end

def _reduce_66(val, _values, result)
      result = [val[0]].concat(val[1])

    result
end

def _reduce_67(val, _values, result)
 result.concat val[1]
    result
end

def _reduce_68(val, _values, result)
 result = val[1]
    result
end

def _reduce_69(val, _values, result)
 result = val
    result
end

# reduce 70 omitted

def _reduce_71(val, _values, result)
 result = []
    result
end

def _reduce_72(val, _values, result)
 result = []
    result
end

def _reduce_none(val, _values, result)
  val[0]
end

end   # class BlockParser

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/known_classes.rb000064400000005276150403134150015066 0ustar00# frozen_string_literal: true
module RDoc

  ##
  # Ruby's built-in classes, modules and exceptions

  KNOWN_CLASSES = {
    "rb_cArray"            => "Array",
    "rb_cBasicObject"      => "BasicObject",
    "rb_cBignum"           => "Bignum",
    "rb_cClass"            => "Class",
    "rb_cData"             => "Data",
    "rb_cDir"              => "Dir",
    "rb_cEncoding"         => "Encoding",
    "rb_cFalseClass"       => "FalseClass",
    "rb_cFile"             => "File",
    "rb_cFixnum"           => "Fixnum",
    "rb_cFloat"            => "Float",
    "rb_cHash"             => "Hash",
    "rb_cIO"               => "IO",
    "rb_cInteger"          => "Integer",
    "rb_cModule"         gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/task.rb000064400000002475150403134150013567 0ustar00Error",
    "rb_eIOError"          => "IOError",
    "rb_eIndexError"       => "IndexError",
    "rb_eInterrupt"        => "Interrupt",
    "rb_eLoadError"        => "LoadError",
    "rb_eNameError"        => "NameError",
    "rb_eNoMemError"       => "NoMemoryError",
    "rb_eNotImpError"      => "NotImplementedError",
    "rb_eRangeError"       => "RangeError",
    "rb_eRuntimeError"     => "RuntimeError",
    "rb_eScriptError"      => "ScriptError",
    "rb_eSecurityError"    => "SecurityError",
    "rb_eSignal"           => "SignalException",
    "rb_eStandardError"    => "StandardError",
    "rb_eSyntaxError"      => "SyntaxError",
    "rb_eSystemCallError"  => "SystemCallError",
    "rb_eSystemExit"       => "SystemExit",
    "rb_eTypeError"        => "TypeError",
    "rb_eZeroDivError"     => "ZeroDivisionError",

    "rb_mComparable"       => "Comparable",
    "rb_mEnumerable"       => "Enumerable",
    "rb_mErrno"            => "Errno",
    "rb_mFConst"           => "File::Constants",
    "rb_mFileTest"         => "FileTest",
    "rb_mGC"               => "GC",
    "rb_mKernel"           => "Kernel",
    "rb_mMath"             => "Math",
    "rb_mProcess"          => "Process"
  }

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/store.rb000064400000000125150403134150013747 0ustar00# frozen_string_literal: true
begin
  gem 'rdoc'
rescue Gem::LoadError
end unless defgems/gems/rdoc-6.5.1.1/lib/rdoc/ri/formatter.rb000064400000000162150403134150014617 0ustar00
  def clobber_task_description # :nodoc:
    "Remove RI data files"
  end

  ##
  # Sets default task values

  dgems/gems/rdoc-6.5.1.1/lib/rdoc/ri/paths.rb000064400000010536150403134150013741 0ustar00# frozen_string_literal: true
module RDoc::RI

  Store = RDoc::Store # :nodoc:

end

gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/formatter.rb000064400000000162150403134150014617 0ustar00# frozen_string_literal: true
##
# For RubyGems backwards compatibility

module RDoc::RI::Formatter # :nodoc:
end
gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/paths.rb000064400000010536150403134150013741 0ustar00# frozen_string_literal: true
require_relative '../rdoc'

##
# The directories where ri data lives.  Paths can be enumerated via ::each, or
# queried individually via ::system_dir, ::site_dir, ::home_dir and ::gem_dir.

module RDoc::RI::Paths

  #:stopdoc:
  require 'rbconfig'

  version = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']

  BASE    = File.join RbConfig::CONFIG['ridir'], version

  HOMEDIR = RDoc.home
  #:startdoc:

  ##
  # Iterates over each selected path yielding the directory and type.
  #
  # Yielded types:
  # :system:: Where Ruby's ri data is stored.  Yielded when +system+ is
  #           true
  # :site:: Where ri for installed libraries are stored.  Yielded when
  #         +site+ is true.  Normally no ri data is stored here.
  # :home:: ~/.rdoc.  Yielded when +home+ is true.
  # :gem:: ri data for an installed gem.  Yielded when +gems+ is true.
  # :extra:: ri data directory from the command line.  Yielded for each
  #          entry in +extra_dirs+

  def self.each system = true, site = true, home = true, gems = :latest, *extra_dirs # :yields: directory, type
    return enum_for __method__, system, site, home, gems, *extra_dirs unless
      block_given?

    extra_dirs.each do |dir|
      yield dir, :extra
    end

    yield system_dir,  :system if system
    yield site_dir,    :site   if site
    yield home_dir,    :home   if home and HOMEDIR

    gemdirs(gems).each do |dir|
      yield dir, :gem
    end if gems

    nil
  end

  ##
  # The ri directory for the gem with +gem_name+.

  def self.gem_dir name, version
    req = Gem::Requirement.new "= #{version}"

    spec = Gem::Specification.find_by_name name, req

    File.join spec.doc_dir, 'ri'
  end

  ##
  # The latest installed gems' ri directories.  +filter+ can be :all or
  # :latest.
  #
  # A +filter+ :all includes all versions of gems and includes gems without
  # ri documentation.

  def self.gemdirs filter = :latest
    ri_paths = {}

    all = Gem::Specification.map do |spec|
      [File.join(spec.doc_dir, 'ri'), spec.name, spec.version]
    end

    if filter == :all then
      gemdirs = []

      all.group_by do |_, name, _|
        name
      end.sort_by do |group, _|
        group
      end.map do |group, items|
        items.sort_by do |_, _, version|
          version
        end.reverse_each do |dir,|
          gemdirs << dir
    gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/driver.rb000064400000107400150403134150014112 0ustar00e selected documentation directories
  # as an Array.
  #
  # See also ::each

  def self.path(system = true, site = true, home = true, gems = :latest, *extra_dirs)
    path = raw_path system, site, home, gems, *extra_dirs

    path.select { |directory| File.directory? directory }
  end

  ##
  # Returns selected documentation directories including nonexistent
  # directories.
  #
  # See also ::each

  def self.raw_path(system, site, home, gems, *extra_dirs)
    path = []

    each(system, site, home, gems, *extra_dirs) do |dir, type|
      path << dir
    end

    path.compact
  end

  ##
  # The location of ri data installed into the site dir.
  #
  # Historically this was available for documentation installed by Ruby
  # libraries predating RubyGems.  It is unlikely to contain any content for
  # modern Ruby installations.

  def self.site_dir
    File.join BASE, 'site'
  end

  ##
  # The location of the built-in ri data.
  #
  # This data is built automatically when `make` is run when Ruby is
  # installed.  If you did not install Ruby by hand you may need to install
  # the documentation yourself.  Please consult the documentation for your
  # package manager or Ruby installer for details.  You can also use the
  # rdoc-data gem to install system ri data for common versions of Ruby.

  def self.system_dir
    File.join BASE, 'system'
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/driver.rb000064400000107400150403134150014112 0ustar00# frozen_string_literal: true
require 'optparse'

require_relative '../../rdoc'

require_relative 'formatter' # For RubyGems backwards compatibility
# TODO: Fix weird documentation with `require_relative`

##
# The RI driver implements the command-line ri tool.
#
# The driver supports:
# * loading RI data from:
#   * Ruby's standard library
#   * RubyGems
#   * ~/.rdoc
#   * A user-supplied directory
# * Paging output (uses RI_PAGER environment variable, PAGER environment
#   variable or the less, more and pager programs)
# * Interactive mode with tab-completion
# * Abbreviated names (ri Zl shows Zlib documentation)
# * Colorized output
# * Merging output from multiple RI data sources

class RDoc::RI::Driver

  ##
  # Base Driver error class

  class Error < RDoc::RI::Error; end

  ##
  # Raised when a name isn't found in the ri data stores

  class NotFoundError < Error

    def initialize(klass, suggestions = nil) # :nodoc:
      @klass = klass
      @suggestions = suggestions
    end

    ##
    # Name that wasn't found

    def name
      @klass
    end

    def message # :nodoc:
      str = "Nothing known about #{@klass}"
      if @suggestions and !@suggestions.empty?
        str += "\nDid you mean?  #{@suggestions.join("\n               ")}"
      end
      str
    end
  end

  ##
  # Show all method documentation following a class or module

  attr_accessor :show_all

  ##
  # An RDoc::RI::Store for each entry in the RI path

  attr_accessor :stores

  ##
  # Controls the user of the pager vs $stdout

  attr_accessor :use_stdout

  ##
  # Default options for ri

  def self.default_options
    options = {}
    options[:interactive] = false
    options[:profile]     = false
    options[:show_all]    = false
    options[:use_stdout]  = !$stdout.tty?
    options[:width]       = 72

    # By default all standard paths are used.
    options[:use_system]     = true
    options[:use_site]       = true
    options[:use_home]       = true
    options[:use_gems]       = true
    options[:extra_doc_dirs] = []

    return options
  end

  ##
  # Dump +data_path+ using pp

  def self.dump data_path
    require 'pp'

    File.open data_path, 'rb' do |io|
      pp Marshal.load(io.read)
    end
  end

  ##
  # Parses +argv+ and returns a Hash of options

  def self.process_args argv
    options = default_options

    opts = OptionParser.new do |opt|
      opt.accept File do |file,|
        File.readable?(file) and not File.directory?(file) and file
      end

      opt.program_name = File.basename $0
      opt.version = RDoc::VERSION
      opt.release = nil
      opt.summary_indent = ' ' * 4

      opt.banner = <<-EOT
Usage: #{opt.program_name} [options] [name ...]

Where name can be:

  Class | Module | Module::Class

  Class::method | Class#method | Class.method | method

  gem_name: | gem_name:README | gem_name:History

  ruby: | ruby:NEWS | ruby:globals

All class names may be abbreviated to their minimum unambiguous form.
If a name is ambiguous, all valid options will be listed.

A '.' matches either class or instance methods, while #method
matches only instance and ::method matches only class methods.

README and other files may be displayed by prefixing them with the gem name
they're contained in.  If the gem name is followed by a ':' all files in the
gem will be shown.  The file name extension may be omitted where it is
unambiguous.

'ruby' can be used as a pseudo gem name to display files from the Ruby
core documentation. Use 'ruby:' by itself to get a list of all available
core documentation files.

For example:

    #{opt.program_name} Fil
    #{opt.program_name} File
    #{opt.program_name} File.new
    #{opt.program_name} zip
    #{opt.program_name} rdoc:README
    #{opt.program_name} ruby:comments

Note that shell quoting or escaping may be required for method names
containing punctuation:

    #{opt.program_name} 'Array.[]'
    #{opt.program_name} compact\\!

To see the default directories #{opt.program_name} will search, run:

    #{opt.program_name} --list-doc-dirs

Specifying the --system, --site, --home, --gems, or --doc-dir options
will limit ri to searching only the specified directories.

ri options may be set in the RI environment variable.

The ri pager can be set with the RI_PAGER environment variable
or the PAGER environment variable.
      EOT

      opt.separator nil
      opt.separator "Options:"

      opt.separator nil

      opt.on("--[no-]interactive", "-i",
             "In interactive mode you can repeatedly",
             "look up methods with autocomplete.") do |interactive|
        options[:interactive] = interactive
      end

      opt.separator nil

      opt.on("--[no-]all", "-a",
             "Show all documentation for a class or",
             "module.") do |show_all|
        options[:show_all] = show_all
      end

      opt.separator nil

      opt.on("--[no-]list", "-l",
             "List classes ri knows about.") do |list|
        options[:list] = list
      end

      opt.separator nil

      opt.on("--[no-]pager",
             "Send output to a pager,",
             "rather than directly to stdout.") do |use_pager|
        options[:use_stdout] = !use_pager
      end

      opt.separator nil

      opt.on("-T",
             "Synonym for --no-pager.") do
        options[:use_stdout] = true
      end

      opt.separator nil

      opt.on("--width=WIDTH", "-w", OptionParser::DecimalInteger,
             "Set the width of the output.") do |width|
        options[:width] = width
      end

      opt.separator nil

      opt.on("--server[=PORT]", Integer,
             "Run RDoc server on the given port.",
             "The default port is 8214.") do |port|
        options[:server] = port || 8214
      end

      opt.separator nil

      formatters = RDoc::Markup.constants.grep(/^To[A-Z][a-z]+$/).sort
      formatters = formatters.sort.map do |formatter|
        formatter.to_s.sub('To', '').downcase
      end
      formatters -= %w[html label test] # remove useless output formats

      opt.on("--format=NAME", "-f",
             "Use the selected formatter.  The default",
             "formatter is bs for paged output and ansi",
             "otherwise.  Valid formatters are:",
             "#{formatters.join(', ')}.", formatters) do |value|
        options[:formatter] = RDoc::Markup.const_get "To#{value.capitalize}"
      end

      opt.separator nil

      opt.on("--help", "-h",
             "Show help and exit.") do
        puts opts
        exit
      end

      opt.separator nil

      opt.on("--version", "-v",
             "Output version information and exit.") do
        puts "#{opts.program_name} #{opts.version}"
        exit
      end

      opt.separator nil
      opt.separator "Data source options:"
      opt.separator nil

      opt.on("--[no-]list-doc-dirs",
             "List the directories from which ri will",
             "source documentation on stdout and exit.") do |list_doc_dirs|
        options[:list_doc_dirs] = list_doc_dirs
      end

      opt.separator nil

      opt.on("--doc-dir=DIRNAME", "-d", Array,
             "List of directories from which to source",
             "documentation in addition to the standard",
             "directories.  May be repeated.") do |value|
        value.each do |dir|
          unless File.directory? dir then
            raise OptionParser::InvalidArgument, "#{dir} is not a directory"
          end

          options[:extra_doc_dirs] << File.expand_path(dir)
        end
      end

      opt.separator nil

      opt.on("--no-standard-docs",
             "Do not include documentation from",
             "the Ruby standard library, site_lib,",
             "installed gems, or ~/.rdoc.",
             "Use with --doc-dir.") do
        options[:use_system] = false
        options[:use_site] = false
        options[:use_gems] = false
        options[:use_home] = false
      end

      opt.separator nil

      opt.on("--[no-]system",
             "Include documentation from Ruby's",
             "standard library.  Defaults to true.") do |value|
        options[:use_system] = value
      end

      opt.separator nil

      opt.on("--[no-]site",
             "Include documentation from libraries",
             "installed in site_lib.",
             "Defaults to true.") do |value|
        options[:use_site] = value
      end

      opt.separator nil

      opt.on("--[no-]gems",
             "Include documentation from RubyGems.",
             "Defaults to true.") do |value|
        options[:use_gems] = value
      end

      opt.separator nil

      opt.on("--[no-]home",
             "Include documentation stored in ~/.rdoc.",
             "Defaults to true.") do |value|
        options[:use_home] = value
      end

      opt.separator nil
      opt.separator "Debug options:"
      opt.separator nil

      opt.on("--[no-]profile",
             "Run with the ruby profiler.") do |value|
        options[:profile] = value
      end

      opt.separator nil

      opt.on("--dump=CACHE", File,
             "Dump data from an ri cache or data file.") do |value|
        options[:dump_path] = value
      end
    end

    argv = ENV['RI'].to_s.split(' ').concat argv

    opts.parse! argv

    options[:names] = argv

    options[:use_stdout] ||= !$stdout.tty?
    options[:use_stdout] ||= options[:interactive]
    options[:width] ||= 72

    options

  rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
    puts opts
    puts
    puts e
    exit 1
  end

  ##
  # Runs the ri command line executable using +argv+

  def self.run argv = ARGV
    options = process_args argv

    if options[:dump_path] then
      dump options[:dump_path]
      return
    end

    ri = new options
    ri.run
  end

  ##
  # Creates a new driver using +initial_options+ from ::process_args

  def initialize initial_options = {}
    @paging = false
    @classes = nil

    options = self.class.default_options.update(initial_options)

    @formatter_klass = options[:formatter]

    require 'profile' if options[:profile]

    @names = options[:names]
    @list = options[:list]

    @doc_dirs = []
    @stores   = []

    RDoc::RI::Paths.each(options[:use_system], options[:use_site],
                         options[:use_home], options[:use_gems],
                         *options[:extra_doc_dirs]) do |path, type|
      @doc_dirs << path

      store = RDoc::RI::Store.new path, type
      store.load_cache
      @stores << store
    end

    @list_doc_dirs = options[:list_doc_dirs]

    @interactive = options[:interactive]
    @server      = options[:server]
    @use_stdout  = options[:use_stdout]
    @show_all    = options[:show_all]
    @width       = options[:width]
  end

  ##
  # Adds paths for undocumented classes +also_in+ to +out+

  def add_also_in out, also_in
    return if also_in.empty?

    out << RDoc::Markup::Rule.new(1)
    out << RDoc::Markup::Paragraph.new("Also found in:")

    paths = RDoc::Markup::Verbatim.new
    also_in.each do |store|
      paths.parts.push store.friendly_path, "\n"
    end
    out << paths
  end

  ##
  # Adds a class header to +out+ for class +name+ which is described in
  # +classes+.

  def add_class out, name, classes
    heading = if classes.all? { |klass| klass.module? } then
                name
              else
                superclass = classes.map do |klass|
                  klass.superclass unless klass.module?
                end.compact.shift || 'Object'

                superclass = superclass.full_name unless String === superclass

                "#{name} < #{superclass}"
              end

    out << RDoc::Markup::Heading.new(1, heading)
    out << RDoc::Markup::BlankLine.new
  end

  ##
  # Adds "(from ...)" to +out+ for +store+

  def add_from out, store
    out << RDoc::Markup::Paragraph.new("(from #{store.friendly_path})")
  end

  ##
  # Adds +extends+ to +out+

  def add_extends out, extends
    add_extension_modules out, 'Extended by', extends
  end

  ##
  # Adds a list of +extensions+ to this module of the given +type+ to +out+.
  # add_includes and add_extends call this, so you should use those directly.

  def add_extension_modules out, type, extensions
    return if extensions.empty?

    out << RDoc::Markup::Rule.new(1)
    out << RDoc::Markup::Heading.new(1, "#{type}:")

    extensions.each do |modules, store|
      if modules.length == 1 then
        add_extension_modules_single out, store, modules.first
      else
        add_extension_modules_multiple out, store, modules
      end
    end
  end

  ##
  # Renders multiple included +modules+ from +store+ to +out+.

  def add_extension_modules_multiple out, store, modules # :nodoc:
    out << RDoc::Markup::Paragraph.new("(from #{store.friendly_path})")

    wout, with = modules.partition { |incl| incl.comment.empty? }

    out << RDoc::Markup::BlankLine.new unless with.empty?

    with.each do |incl|
      out << RDoc::Markup::Paragraph.new(incl.name)
      out << RDoc::Markup::BlankLine.new
      out << incl.comment
    end

    unless wout.empty? then
      verb = RDoc::Markup::Verbatim.new

      wout.each do |incl|
        verb.push incl.name, "\n"
      end

      out << verb
    end
  end

  ##
  # Adds a single extension module +include+ from +store+ to +out+

  def add_extension_modules_single out, store, include # :nodoc:
    name = include.name
    path = store.friendly_path
    out << RDoc::Markup::Paragraph.new("#{name} (from #{path})")

    if include.comment then
      out << RDoc::Markup::BlankLine.new
      out << include.comment
    end
  end

  ##
  # Adds +includes+ to +out+

  def add_includes out, includes
    add_extension_modules out, 'Includes', includes
  end

  ##
  # Looks up the method +name+ and adds it to +out+

  def add_method out, name
    filtered   = lookup_method name

    method_out = method_document name, filtered

    out.concat method_out.parts
  end

  ##
  # Adds documentation for all methods in +klass+ to +out+

  def add_method_documentation out, klass
    klass.method_list.each do |method|
      begin
        add_method out, method.full_name
      rescue NotFoundError
        next
      end
    end
  end

  ##
  # Adds a list of +methods+ to +out+ with a heading of +name+

  def add_method_list out, methods, name
    return if methods.empty?

    out << RDoc::Markup::Heading.new(1, "#{name}:")
    out << RDoc::Markup::BlankLine.new

    if @use_stdout and !@interactive then
      out.concat methods.map { |method|
        RDoc::Markup::Verbatim.new method
      }
    else
      out << RDoc::Markup::IndentedParagraph.new(2, methods.join(', '))
    end

    out << RDoc::Markup::BlankLine.new
  end

  ##
  # Returns ancestor classes of +klass+

  def ancestors_of klass
    ancestors = []

    unexamined = [klass]
    seen = []

    loop do
      break if unexamined.empty?
      current = unexamined.shift
      seen << current

      stores = classes[current]

      next unless stores and not stores.empty?

      klasses = stores.flat_map do |store|
        store.ancestors[current] || []
      end.uniq

      klasses = klasses - seen

      ancestors.concat klasses
      unexamined.concat klasses
    end

    ancestors.reverse
  end

  ##
  # For RubyGems backwards compatibility

  def class_cache # :nodoc:
  end

  ##
  # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+

  def class_document name, found, klasses, includes, extends
    also_in = []

    out = RDoc::Markup::Document.new

    add_class out, name, klasses

    add_includes out, includes
    add_extends  out, extends

    found.each do |store, klass|
      render_class out, store, klass, also_in
    end

    add_also_in out, also_in

    out
  end

  ##
  # Adds the class +comment+ to +out+.

  def class_document_comment out, comment # :nodoc:
    unless comment.empty? then
      out << RDoc::Markup::Rule.new(1)

      if comment.merged? then
        parts = comment.parts
        parts = parts.zip [RDoc::Markup::BlankLine.new] * parts.length
        parts.flatten!
        parts.pop

        out.concat parts
      else
        out << comment
      end
    end
  end

  ##
  # Adds the constants from +klass+ to the Document +out+.

  def class_document_constants out, klass # :nodoc:
    return if klass.constants.empty?

    out << RDoc::Markup::Heading.new(1, "Constants:")
    out << RDoc::Markup::BlankLine.new
    list = RDoc::Markup::List.new :NOTE

    constants = klass.constants.sort_by { |constant| constant.name }

    list.items.concat constants.map { |constant|
      parts = constant.comment.parts if constant.comment
      parts << RDoc::Markup::Paragraph.new('[not documented]') if
        parts.empty?

      RDoc::Markup::ListItem.new(constant.name, *parts)
    }

    out << list
    out << RDoc::Markup::BlankLine.new
  end

  ##
  # Hash mapping a known class or module to the stores it can be loaded from

  def classes
    return @classes if @classes

    @classes = {}

    @stores.each do |store|
      store.cache[:modules].each do |mod|
        # using default block causes searched-for modules to be added
        @classes[mod] ||= []
        @classes[mod] << store
      end
    end

    @classes
  end

  ##
  # Returns the stores wherein +name+ is found along with the classes,
  # extends and includes that match it

  def classes_and_includes_and_extends_for name
    klasses = []
    extends = []
    includes = []

    found = @stores.map do |store|
      begin
        klass = store.load_class name
        klasses  << klass
        extends  << [klass.extends,  store] if klass.extends
        includes << [klass.includes, store] if klass.includes
        [store, klass]
      rescue RDoc::Store::MissingFileError
      end
    end.compact

    extends.reject!  do |modules,| modules.empty? end
    includes.reject! do |modules,| modules.empty? end

    [found, klasses, includes, extends]
  end

  ##
  # Completes +name+ based on the caches.  For Readline

  def complete name
    completions = []

    klass, selector, method = parse_name name

    complete_klass  name, klass, selector, method, completions
    complete_method name, klass, selector,         completions

    completions.sort.uniq
  end

  def complete_klass name, klass, selector, method, completions # :nodoc:
    klasses = classes.keys

    # may need to include Foo when given Foo::
    klass_name = method ? name : klass

    if name !~ /#|\./ then
      completions.replace klasses.grep(/^#{Regexp.escape klass_name}[^:]*$/)
      completions.concat klasses.grep(/^#{Regexp.escape name}[^:]*$/) if
        name =~ /::$/

      completions << klass if classes.key? klass # to complete a method name
    elsif selector then
      completions << klass if classes.key? klass
    elsif classes.key? klass_name then
      completions << klass_name
    end
  end

  def complete_method name, klass, selector, completions # :nodoc:
    if completions.include? klass and name =~ /#|\.|::/ then
      methods = list_methods_matching name

      if not methods.empty? then
        # remove Foo if given Foo:: and a method was found
        completions.delete klass
      elsif selector then
        # replace Foo with Foo:: as given
        completions.delete klass
        completions << "#{klass}#{selector}"
      end

      completions.concat methods
    end
  end

  ##
  # Converts +document+ to text and writes it to the pager

  def display document
    page do |io|
      f = formatter(io)
      f.width = @width if @width and f.respond_to?(:width)
      text = document.accept f

      io.write text
    end
  end

  ##
  # Outputs formatted RI data for class +name+.  Groups undocumented classes

  def display_class name
    return if name =~ /#|\./

    found, klasses, includes, extends =
      classes_and_includes_and_extends_for name

    return if found.empty?

    out = class_document name, found, klasses, includes, extends

    display out
  end

  ##
  # Outputs formatted RI data for method +name+

  def display_method name
    out = RDoc::Markup::Document.new

    add_method out, name

    display out
  end

  ##
  # Outputs formatted RI data for the class or method +name+.
  #
  # Returns true if +name+ was found, false if it was not an alternative could
  # be guessed, raises an error if +name+ couldn't be guessed.

  def display_name name
    if name =~ /\w:(\w|$)/ then
      display_page name
      return true
    end

    return true if display_class name

    display_method name if name =~ /::|#|\./

    true
  rescue NotFoundError
    matches = list_methods_matching name if name =~ /::|#|\./
    matches = classes.keys.grep(/^#{Regexp.escape name}/) if matches.empty?

    raise if matches.empty?

    page do |io|
      io.puts "#{name} not found, maybe you meant:"
      io.puts
      io.puts matches.sort.join("\n")
    end

    false
  end

  ##
  # Displays each name in +name+

  def display_names names
    names.each do |name|
      name = expand_name name

      display_name name
    end
  end

  ##
  # Outputs formatted RI data for page +name+.

  def display_page name
    store_name, page_name = name.split ':', 2

    store = @stores.find { |s| s.source == store_name }

    return display_page_list store if page_name.empty?

    pages = store.cache[:pages]

    unless pages.include? page_name then
      found_names = pages.select do |n|
        n =~ /#{Regexp.escape page_name}\.[^.]+$/
      end

      if found_names.length.zero? then
        return display_page_list store, pages
      elsif found_names.length > 1 then
        return display_page_list store, found_names, page_name
      end

      page_name = found_names.first
    end

    page = store.load_page page_name

    display page.comment
  end

  ##
  # Outputs a formatted RI page list for the pages in +store+.

  def display_page_list store, pages = store.cache[:pages], search = nil
    out = RDoc::Markup::Document.new

    title = if search then
              "#{search} pages"
            else
              'Pages'
            end

    out << RDoc::Markup::Heading.new(1, "#{title} in #{store.friendly_path}")
    out << RDoc::Markup::BlankLine.new

    list = RDoc::Markup::List.new(:BULLET)

    pages.each do |page|
      list << RDoc::Markup::Paragraph.new(page)
    end

    out << list

    display out
  end

  def check_did_you_mean # :nodoc:
    if defined? DidYouMean::SpellChecker
      true
    else
      begin
        require 'did_you_mean'
        if defined? DidYouMean::SpellChecker
          true
        else
          false
        end
      rescue LoadError
        false
      end
    end
  end

  ##
  # Expands abbreviated klass +klass+ into a fully-qualified class.  "Zl::Da"
  # will be expanded to Zlib::DataError.

  def expand_class klass
    class_names = classes.keys
    ary = class_names.grep(Regexp.new("\\A#{klass.gsub(/(?=::|\z)/, '[^:]*')}\\z"))
    if ary.length != 1 && ary.first != klass
      if check_did_you_mean
        suggestions = DidYouMean::SpellChecker.new(dictionary: class_names).correct(klass)
        raise NotFoundError.new(klass, suggestions)
      else
        raise NotFoundError, klass
      end
    end
    ary.first
  end

  ##
  # Expands the class portion of +name+ into a fully-qualified class.  See
  # #expand_class.

  def expand_name name
    klass, selector, method = parse_name name

    return [selector, method].join if klass.empty?

    case selecgems/gems/rdoc-6.5.1.1/lib/rdoc/token_stream.rb000064400000006240150403134140014677 0ustar00e

    types = method_type selector

    klasses = nil
    ambiguous = klass.empty?

    if ambiguous then
      klasses = classes.keys
    else
      klasses = ancestors_of klass
      klasses.unshift klass
    end

    methods = []

    klasses.each do |ancestor|
      ancestors = classes[ancestor]

      next unless ancestors

      klass = ancestor if ambiguous

      ancestors.each do |store|
        methods << [store, klass, ancestor, types, method]
      end
    end

    methods = methods.sort_by do |_, k, a, _, m|
      [k, a, m].compact
    end

    methods.each do |item|
      yield(*item) # :yields: store, klass, ancestor, types, method
    end

    self
  end

  ##
  # Finds a store that matches +name+ which can be the name of a gem, "ruby",
  # "home" or "site".
  #
  # See also RDoc::Store#source

  def find_store name
    @stores.each do |store|
      source = store.source

      return source if source == name

      return source if
        store.type == :gem and source =~ /^#{Regexp.escape name}-\d/
    end

    raise RDoc::RI::Driver::NotFoundError, name
  end

  ##
  # Creates a new RDoc::Markup::Formatter.  If a formatter is given with -f,
  # use it.  If we're outputting to a pager, use bs, otherwise ansi.

  def formatter(io)
    if @formatter_klass then
      @formatter_klass.new
    elsif paging? or !io.tty? then
      RDoc::Markup::ToBs.new
    else
      RDoc::Markup::ToAnsi.new
    end
  end

  ##
  # Runs ri interactively using Readline if it is available.

  def interactive
    puts "\nEnter the method name you want to look up."

    begin
      require 'readline'
    rescue LoadError
    end
    if defined? Readline then
      Readline.completion_proc = method :complete
      puts "You can use tab to autocomplete."
    end

    puts "Enter a blank line to exit.\n\n"

    loop do
      name = if defined? Readline then
               Readline.readline ">> "
             else
               print ">> "
               $stdin.gets
             end

      return if name.nil? or name.empty?

      begin
        display_name expand_name(name.strip)
      rescue NotFoundError => e
        puts e.message
      end
    end

  rescue Interrupt
    exit
  end

  ##
  # Lists classes known to ri starting with +names+.  If +names+ is empty all
  # known classes are shown.

  def list_known_classes names = []
    classes = []

    stores.each do |store|
      classes << store.module_names
    end

    classes = classes.flatten.uniq.sort

    unless names.empty? then
      filter = Regexp.union names.map { |name| /^#{name}/ }

      classes = classes.grep filter
    end

    page do |io|
      if paging? or io.tty? then
        if names.empty? then
          io.puts "Classes and Modules known to ri:"
        else
          io.puts "Classes and Modules starting with #{names.join ', '}:"
        end
        io.puts
      end

      io.puts classes.join("\n")
    end
  end

  ##
  # Returns an Array of methods matching +name+

  def list_methods_matching name
    found = []

    find_methods name do |store, klass, ancestor, types, method|
      if types == :instance or types == :both then
        methods = store.instance_methods[ancestor]

        if methods thengems/gems/rdoc-6.5.1.1/lib/rdoc/top_level.rb000064400000013055150403134140014177 0ustar00   method_name == name
    end

    return unless method

    store.load_method klass, "#{type}#{method}"
  rescue RDoc::Store::MissingFileError => e
    comment = RDoc::Comment.new("missing documentation at #{e.file}").parse

    method = RDoc::AnyMethod.new nil, name
    method.comment = comment
    method
  end

  ##
  # Returns an Array of RI data for methods matching +name+

  def load_methods_matching name
    found = []

    find_methods name do |store, klass, ancestor, types, method|
      methods = []

      methods << load_method(store, :class_methods, ancestor, '::',  method) if
        [:class, :both].include? types

      methods << load_method(store, :instance_methods, ancestor, '#',  method) if
        [:instance, :both].include? types

      found << [store, methods.compact]
    end

    found.reject do |path, methods| methods.empty? end
  end

  ##
  # Returns a filtered list of methods matching +name+

  def lookup_method name
    found = load_methods_matching name

    if found.empty?
      if check_did_you_mean
        methods = []
        _, _, method_name = parse_name name
        find_methods name do |store, klass, ancestor, types, method|
          methods.push(*store.class_methods[klass]) if [:class, :both].include? types
          methods.push(*store.instance_methods[klass]) if [:instance, :both].include? types
        end
        methods = methods.uniq
        suggestions = DidYouMean::SpellChecker.new(dictionary: methods).correct(method_name)
        raise NotFoundError.new(name, suggestions)
      else
        raise NotFoundError, name
      end
    end

    filter_methods found, name
  end

  ##
  # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+

  def method_document name, filtered
    out = RDoc::Markup::Document.new

    out << RDoc::Markup::Heading.new(1, name)
    out << RDoc::Markup::BlankLine.new

    filtered.each do |store, methods|
      methods.each do |method|
        render_method out, store, method, name
      end
    end

    out
  end

  ##
  # Returns the type of method (:both, :instance, :class) for +selector+

  def method_type selector
    case selector
    when '.', nil then :both
    when '#'      then :instance
    else               :class
    end
  end

  ##
  # Returns a regular expression for +name+ that will match an
  # RDoc::AnyMethod's name.

  def name_regexp name
    klass, type, name = parse_name name

    case type
    when '#', '::' then
      /^#{klass}#{type}#{Regexp.escape name}$/
    else
      /^#{klass}(#|::)#{Regexp.escape name}$/
    end
  end

  ##
  # Paginates output through a pager program.

  def page
    if pager = setup_pager then
      begin
        yield pager
      ensure
        pager.close
      end
    else
      yield $stdout
    end
  rescue Errno::EPIPE
  ensure
    @paging = false
  end

  ##
  # Are we using a pager?

  def paging?
    @paging
  end

  ##
  # Extracts the class, selector and method name parts from +name+ like
  # Foo::Bar#baz.
  #
  # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a
  # method

  def parse_name name
    parts = name.split(/(::?|#|\.)/)

    if parts.length == 1 then
      if parts.first =~ /^[a-z]|^([%&*+\/<>^`|~-]|\+@|-@|<<|<=>?|===?|=>|=~|>>|\[\]=?|~@)$/ then
        type = '.'
        meth = parts.pop
      else
        type = nil
        meth = nil
      end
    elsif parts.length == 2 or parts.last =~ /::|#|\./ then
      type = parts.pop
      meth = nil
    elsif parts[1] == ':' then
      klass = parts.shift
      type  = parts.shift
      meth  = parts.join
    elsif parts[-2] != '::' or parts.last !~ /^[A-Z]/ then
      meth = parts.pop
      type = parts.pop
    end

    klass ||= parts.join

    [klass, type, meth]
  end

  ##
  # Renders the +klass+ from +store+ to +out+.  If the klass has no
  # documentable items the class is added to +also_in+ instead.

  def render_class out, store, klass, also_in # :nodoc:
    comment = klass.comment
    # TODO the store's cache should always return an empty Array
    class_methods    = store.class_methods[klass.full_name]    || []
    instance_methods = store.instance_methods[klass.full_name] || []
    attributes       = store.attributes[klass.full_name]       || []

    if comment.empty? and
       instance_methods.empty? and class_methods.empty? then
      also_in << store
      return
    end

    add_from out, store

    class_document_comment out, comment

    if class_methods or instance_methods or not klass.constants.empty? then
      out << RDoc::Markup::Rule.new(1)
    end

    class_document_constants out, klass

    add_method_list out, class_methods,    'Class methods'
    add_method_list out, instance_methods, 'Instance methods'
    add_method_list out, attributes,       'Attributes'

    add_method_documentation out, klagems/gems/rdoc-6.5.1.1/lib/rdoc/token_stream.rb000064400000006240150403134140014677 0ustar00s = arglists.chomp.split "\n"
    arglists = gems/gems/rdoc-6.5.1.1/lib/rdoc/stats/quiet.rb000064400000001500150403134140014463 0ustar00ustar00   elsif @interactive or @names.empty? then
      interactive
    else
      display_names @names
    end
  rescue NotFoundError => e
    abort e.message
  end

  ##
  # Sets up a pager program to pass output through.  Tries the RI_PAGER and
  # PAGER environment variables followed by pager, less then more.

  def setup_pager
    return if @use_stdout

    pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less', 'more']

    require 'shellwords'
    pagers.compact.uniq.each do |pager|
      pager = Shellwords.splitgems/gems/rdoc-6.5.1.1/lib/rdoc/stats/verbose.rb000064400000001764150403134140015015 0ustar00M' do server.shutdown end

    server.start
  end

end
gems/gems/rdoc-6.5.1.1/lib/rdoc/parser.rb000064400000016673150403134150013514 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/stats/normal.rb000064400000003060150403134140014627 0ustar00.
#
#   require 'rdoc'
#
#   class RDoc::Parser::Xyz < RDoc::Parser
#     parse_files_matching /\.xyz$/
#
#     def initialize top_level, file_name, content, options, stats
#       super
#
#       # extra initialization if needed
#     end
#
#     def scan
#       # parse file and fill in @top_level
#     end
#   end

class RDoc::Parser

  @parsers = []

  class << self

    ##
    # An Array of arrays that maps file extension (or name) regular
    # expressions to parser classes that will parse matching filenames.
    #
    # Use parse_files_matching to register a parser's file extensions.

    attr_reader :parsers

  end

  ##
  # The name of the file being parsed

  attr_reader :file_name

  ##
  # Alias an extension to another extension. After this call, files ending
  # "new_ext" will be parsed using the same parser as "old_ext"

  def self.alias_extension(old_ext, new_ext)
    old_ext = old_ext.sub(/^\.(.*)/, '\1')
    new_ext = new_ext.sub(/^\.(.*)/, '\1')

    parser = can_parse_by_name "xxx.#{old_ext}"
    return false unless parser

    RDoc::Parser.parsers.unshift [/\.#{new_ext}$/, parser]

    true
  end

  ##
  # Determines if the file is a "binary" file which basically means it has
  # content that an RDoc parser shouldn't try to consume.

  def self.binary?(file)
    return false if file =~ /\.(rdoc|txt)$/

    s = File.read(file, 1024) or return false

    return true if s[0, 2] == Marshal.dump('')[0, 2] or s.index("\x00")

    mode = 'r:utf-8' # default source encoding has been changed to utf-8
    s.sub!(/\A#!.*\n/, '')     # assume shebanggems/gems/rdoc-6.5.1.1/lib/rdoc/context/section.rb000064400000011301150403134140015326 0ustar00

  def self.can_parse_by_name file_name
    _, parser = RDoc::Parser.parsers.find { |regexp,| regexp =~ file_name }

    # The default parser must not parse binary files
    ext_name = File.extname file_name
    return parser if ext_name.empty?

    if parser == RDoc::Parser::Simple and ext_name !~ /txt|rdoc/ then
      case check_modeline file_name
      when nil, 'rdoc' then # continue
      else return nil
      end
    end

    parser
  rescue Errno::EACCES
  end

  ##
  # Returns the file type from the modeline in +file_name+

  def self.check_modeline file_name
    line = File.open file_name do |io|
      io.gets
    end

    /-\*-\s*(.*?\S)\s*-\*-/ =~ line

    return nil unless type = $1

    if /;/ =~ type then
      return nil unless /(?:\s|\A)mode:\s*([^\s;]+)/i =~ type
      type = $1
    end

    return nil if /coding:/i =~ type

    type.downcase
  rescue ArgumentError
  rescue Encoding::InvalidByteSequenceError # invalid byte sequence

  end

  ##
  # Finds and instantiates the correct parser for the given +file_name+ and
  # +content+.

  def self.for top_level, file_name, content, options, stats
    return if binary? file_name

    parser = use_markup content

    unless parser then
      parse_name = file_name

      # If no extension, look for shebang
      if file_name !~ /\.\w+$/ && content =~ %r{\A#!(.+)} then
        shebang = $1
        case shebang
        when %r{env\s+ruby}, %r{/ruby}
          parse_name = 'dummy.rb'
        end
      end

      parser = can_parse parse_name
    end

    return unless parser

    content = remove_modeline content

    parser.new top_level, file_name, content, options, stats
  rescue SystemCallError
    nil
  end

  ##
  # Record which file types this parser can understand.
  #
  # It is ok to call this multiple times.

  def self.parse_files_matching(regexp)
    RDoc::Parser.parsers.unshift [regexp, self]
  end

  ##
  # Removes an emacs-style modeline from the first line of the document

  def self.remove_modeline content
    content.sub(/\A.*-\*-\s*(.*?\S)\s*-\*-.*\r?\n/, '')
  end

  ##
  # If there is a <tt>markup: parser_name</tt> comment at the front of the
  # file, use it to determine the parser.  For example:
  #
  #   # markup: rdoc
  #   # Class comment can go here
  #
  #   clgems/gems/rdoc-6.5.1.1/lib/rdoc.rb000064400000013514150403134150012207 0ustar00selected = RDoc::Parser.parsers.find do |_, parser|
      /^#{markup}$/i =~ parser.name.sub(/.*:/, '')
    end

    selected
  end

  ##
  # Creates a new Parser storing +top_level+, +file_name+, +content+,
  # +options+ and +stats+ in instance vgems/gems/rdoc-6.5.1.1/lib/rdoc/stats/quiet.rb000064400000001500150403134140014463 0ustar00irst in order to show up last in the parsers list
require_relative 'parser/simple'
require_relative 'parser/c'
require_relative 'parser/changelog'
require_relative 'parser/markdown'
require_relative 'parser/rd'
require_relative 'parser/ruby'
gems/gems/rdoc-6.5.1.1/lib/rdoc.rb000064400000013514150403134150012207 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/code_objects.rb000064400000000242150403134140014623 0ustar00line usage.
#
# If you want to set the default markup format see
# RDoc::Markup@Supported+Formats
#
# If you want to store rdoc configuration in your gem (such asgems/gems/rdoc-6.5.1.1/lib/rdoc/ghost_method.rb000064400000000220150403134140014660 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/stats/normal.rb00006440000000306015040313gems/gems/rdoc-6.5.1.1/lib/rdoc/any_method.rb000064400000020305150403134140014331 0ustar00oads the best available YAML library.

  def self.load_yaml
    begin
      gem 'psych'
    rescue NameError => e # --disable-gems
      raise unless e.name == :gem
    rescue Gem::LoadError
    end

    begin
      require 'psych'
    rescue ::LoadError
    ensure
      require 'yaml'
    end
  end

  def self.home
    rdoc_dir = begin
                File.expand_path('~/.rdoc')
              rescue ArgumentError
              end

    if File.directory?(rdoc_dir)
      rdoc_dir
    else
      begin
        # XDG
        xdg_data_home = ENV["XDG_DATA_HOME"] || File.join(File.expand_path("~"), '.local', 'share')
        unless File.exist?(xdg_data_home)
          FileUtils.mkdir_p xdg_data_home
        end
        File.join xdg_data_home, "rdoc"
      rescue Errno::EACCES
      end
    end
  end

  autoload :RDoc,           "#{__dir__}/rdoc/rdoc"

  autoload :CrossReference, "#{__dir__}/rdoc/cross_reference"
  autoload :ERBIO,          "#{__dir__}/rdoc/erbio"
  autoload :ERBPartial,     "#{__dir__}/rdoc/erb_partial"
  autoload :Encoding,       "#{__dir__}/gems/gems/rdoc-6.5.1.1/lib/rdoc/context/section.rb000064400000011301150403134140015326 0ustar00nstructs that appear in Ruby
  # programs: classes, modules, methods, and so on.
  autoload :CodeObject,     "#{__dir__}/rdoc/code_object"

  autoload :Context,        "#{__dir__}/rdoc/context"
  autoload :TopLevel,       "#{__dir__}/rdoc/top_level"

  autoload :AnonClass,      "#{__dir__}/rdoc/anon_class"
  autoload :ClassModule,    "#{__dir__}/rdoc/class_module"
  autoload :NormalClass,    "#{__dir__}/rdoc/normal_class"
  autoload :NormalModule,   "#{__dir__}/rdoc/normal_module"
  autoload :SingleClass,    "#{__dir__}/rdoc/single_class"

  autoload :Alias,          "#{__dir__}/rdoc/alias"
  autoload :AnyMethod,      "#{__dir__}/rdoc/any_method"
  autoload :MethodAttr,     "#{__dir__}/rdoc/method_attr"
  autoload :GhostMethod,    "#{__dir__}/rdoc/ghost_method"
  autoload :MetaMethod,     "#{__dir__}/rdoc/meta_method"
  autoload :Attr,           "#{__dir__}/rdoc/attr"

  autoload :Constant,       "#{__dir__}/rdoc/constant"
  autoload :Mixin,          "#{__dir__}/rdoc/mixin"gems/gems/rake-13.0.6/History.rdoc000064400000215222150403134150012411 0ustar00#!/opt/alt/ruby32/bin/ruby

#--
# Copyright (c) 2003, 2004, 2005, 2006, 2007  Jim Weirich
#
# 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:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# 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.
#++

require "rake"

Rake.application.run
gems/gems/rake-13.0.6/History.rdoc000064400000215222150403134150012411 0ustar00=== 13.0.6

* Additional fix for #389
  Pull request #390 by hsbt

=== 13.0.5

* Fixed the regression of #388
  Pull request #389 by hsbt

=== 13.0.4

* Fix rake test loader swallowing useful error information.
  Pull request #367 by deivid-rodriguez
* Add -C/--directory option the same as GNU make.
  Pull request #376 by nobu

=== 13.0.3

* Fix breaking change of execution order on TestTask.
  Pull request #368 by ysakasin

=== 13.0.2

==== Enhancements

* Fix tests to work with current FileUtils
  Pull Request #358 by jeremyevans
* Simplify default rake test loader
  Pull Request #357 by deivid-rodriguez
* Update rdoc
  Pull Request #366 by bahasalien
* Update broken links to rake articles from Avdi in README
  Pull Request #360 by svl7

=== 13.0.1

==== Bug fixes

* Fixed bug: Reenabled task raises previous exception on second invokation 
  Pull Request #271 by thorsteneckel
* Fix an incorrgems/gems/rdoc-6.5.1.1/lib/rdoc/code_objects.rb000064400000000242150403134140014623 0ustar00 jsm
* Add alias `prereqs`.
  Pull Request #268 by take-cheeze

=== 12.3.1

==== Bug fixes

* Support did_you_mean >= v1.2.0 which has a breaking change on formatgems/gems/rdoc-6.5.1.1/lib/rdoc/ghost_method.rb000064400000000220150403134140014660 0gems/gems/rdoc-6.5.1.1/lib/rdoc/comment.rb000064400000013362150403134140013651 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/any_method.rb000064400000020305150403134140014331 0ustar00contrib` packages. These are extracted to `rake-contrib` gem.
* Removed deprecated method named `last\_comment`.

==== Enhancements:

* Re-use trace option on `cleanup` task. #164 by Brian Henderson
* Actions adore keyword arguments #174 by Josh Cheek
* Rake::TaskArguments#key? alias of #has_key? #175 by Paul Annesley

=== 11.3.0 / 2016-09-20

==== Enhancements:

* Remove to reference `Fixnum` constant. Pull request #160 by nobu

=== 11.2.2 / 2016-06-12

==== Bug fixes

* Fix unexpected behavior with multiple dependencies on Rake::TestTask

=== 11.2.1 / 2016-06-12

==== Bug fixes

* Fix regression of dependencies handling on Rake::TestTask. Report #139

=== 11.2.0 / 2016-06-11

==== Bug fixes

* Fix unexpected cut-out behavior on task description using triple dots
  and exclamation. Report #106 from Stephan Kämper and Pull request #134 by Lee
* Fix empty argument assignment with `with_defaults` option. Pull request #135
  by bakunyo
* Ignore to use `hwprefs` on Darwin platform. Use sysctl now. Report #128

==== Enhancements

* Spawn options for sh Pull equest #138 by Eric Hodel.
* Allow to specify dependencies(prerequisites) for Rake::TestTask
  Pull request #117 by Tim Maslyuchenko
* Use Bundler task instead of hoe for gem release.
* Remove explicitly load to rubygems for Ruby 1.8.
* Unify to declare `Rake::VERSION`.
* Support xz format for PackageTask.

=== 11.1.2 / 2016-03-28

==== Bug fixes

* Remove `-W` option when Rake::TestTask#verbose enabled. It's misunderstanding
  specification change with Rake 11. Partly revert #67

=== 11.1.1 / 2016-03-14

==== Bug fixes

* Use `-W` instead of `--verbose` when Rake::TestTask#verbose enabled.
  JRuby doesn't have `--verbose` option.

=== 11.1.0 / 2016-03-11

==== Compatibility Changes

* Revert to remove `last\_comment`. It will remove Rake 12.

=== 11.0.1 / 2016-03-09

==== Bug fixes

* Fixed packaging manifest.

=== 11.0.0 / 2016-03-09

==== Bug fixes

* Correctly handle bad encoding in exception messages. Pull request #113
  by Tomer Brisker
* Fix verbose option at TestTask. Pull request #67 by Mike Blumtritt

==== Enhancements

* Make FileList#exclude more analogous to FileList#include.
* Use IO.open instead of Open3.popen3 for CPU counter.
* Make Rake::Task#already_invoked publicly accessible.
  Pull request #93 by Joe Rafaniello
* Lookup prerequisites with same name outside of scope instead of
  matching self. Pull request #96 by Sandy Vanderbleek
* Make FileList#pathmap behave like String#pathmap.
  Pull request #61 by Daniel Tamai
* Add fetch method to task arguments.
  Pull request #12 by Chris Keathley
* Use ruby warnings by default. Pull request #97 by Harold Giménez

==== Compatibility Changes

* Removed to support Ruby 1.8.x
* Removed constant named `RAKEVERSION`
* Removed Rake::AltSystem
* Removed Rake::RubyForgePublisher
* Removed Rake::TaskManager#last\_comment. Use last\_description.
* Removed Rake::TaskLib#paste
* Removed Top-level SshDirPublisher, SshFreshDirPublisher, SshFilePublisher
  and CompositePublisher from lib/rake/contrib/publisher.rb
* Removed "rake/runtest.rb"

=== 10.5.0 / 2016-01-13

==== Enhancements

* Removed monkey patching for Ruby 1.8. Pull request #46 by Pablo Herrero.
* Inheritance class of Rake::FileList returns always self class.
  Pull request #74 by Thomas Scholz

=== 10.4.2 / 2014-12-02

==== Bug fixes

* Rake no longer edits ARGV.  This allows you to re-exec rake from a rake
  task.  Pull requset #9 by Matt Palmer.
* Documented how Rake::DSL#desc handles sentences in task descriptions.
  Issue #7 by Raza Sayed.
* Fixed test error on 1.9.3 with legacy RubyGems.  Issue #8 by Matt Palmer.
* Deleted duplicated History entry.  Pull request #10 by Yuji Yamamoto.

=== 10.4.1 / 2014-12-01

==== Bug fixes

* Reverted fix for #277 as it caused numerous issues for rake users.
  rails/spring issue #366 by Gustavo Dutra.

=== 10.4.0 / 2014-11-22

==== Enhancements

* Upgraded to minitest 5.  Pull request #292 by Teo Ljungberg.
* Added support for Pathname in rake tasks.  Pull request #271 by Randy
  Coulman.
* Rake now ignores falsy dependencies which allows for easier programmatic
  creation of tasks.  Pull request #273 by Manav.
* Rake no longer edits ARGV.  This allows you to re-exec rake from a rake
  task.  Issue #277 by Matt Palmer.
* Etc.nprocessors is used for counting the number of CPUs.

==== Bug fixes

* Updated rake manpage.  Issue #283 by Nathan Long, pull request #291 by
  skittleys.
* Add Rake::LATE to allow rebuilding of files that depend on deleted files.
  Bug #286, pull request #287 by David Grayson.
* Fix relinking of files when repackaging.  Bug #276 by Muenze.
* Fixed some typos.  Pull request #280 by Jed Northridge.
* Try counting CPUs via cpuinfo if host_os was not matched.  Pull request
  #282 by Edouard B.

=== 10.3.2 / 2014-05-15

==== Bug fixes

* Rake no longer infinitely loops when showing exception causes that refer to
  each other.  Bug #272 by Chris Bandy.
* Fixed documentation typos.  Bug #275 by Jake Worth.

=== 10.3.1 / 2014-04-17

==== Bug fixes

* Really stop reporting an error when cleaning already-deleted files.  Pull
  request #269 by Randy Coulman
* Fixed infinite loop when cleaning already-deleted files on windows.

=== 10.3 / 2014-04-15

==== Enhancements

* Added --build-all option to rake which treats all file prerequisites as
  out-ofgems/gems/rdoc-6.5.1.1/lib/rdoc/single_class.rb000064400000001000150403134140014637 0ustar00tein.
* Fixed CPU detection for unknown platforms.

=== 10.2.0 / 2014-03-24

==== Enhancements

* Rake now requires Ruby 1.9 or newer.  For me, this is a breaking change, but
  it seems that Jim planned to release it with Rake 10.2.  See also pull
  request #247 by Philip Arndt.
* Rake now allows you to declare tasks under a namespace like:

    task 'a:b' do ... end

  Pull request #232 by Judson Lester.
* Task#source defaults to the first prerequisite in non-rule tasks.  Pull
  request #215 by Avdi Grimm.gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/entities.rb000064400000154041150403134140015655 0ustar00sage.  Pull request #252 by Marco Pfatschbacher.
* Fixed a test failure on windows.  Pull request #231 by Hiroshi Shirosaki.
* Fixed corrupted rake.1.gz.  Pull request #225 by Michel Boaventura.
* Fixed bug in can\_detect\_signals? in test.  Patch from #243 by Alexey
  Borzenkov.

=== 10.1.1

* Use http://github.com/jimweirich/rake instead of http://rake.rubyforge.org for
  canonical project url.

=== 10.1.0

==== Changes

===== New Features

* Add support for variable length task argument lists. If more actual
  arguments are supplied than named arguments, then the extra
  arguments values will be in args.extras.

* Application name is not displayed in the help banner. (Previously
  "rake" was hardcoded, now rake-based applications can display their
  own names).

===== Bug Fixes

Bug fixes include:

* Fix backtrace suppression issues.

* Rules now explicit get task arguments passed to them.

* Rename FileList#exclude? to FileList#exclude\_from\_list? to avoid
  conflict with new Rails method.

* Clean / Clobber tasks now report failure to remove files.

* Plus heaps of internal code cleanup.

==== Thanks

As usual, it was input from users that drove a lot of these changes.
The following people contrigems/gems/rdoc-6.5.1.1/lib/rdoc/comment.rb000064400000013362150403134140013651 0ustar00s compatibility hacks such as top level constants, DSL
methods defined in Object and numerous other features that are just no
longer desired. It's also time to drop the leading zero from the
version number as well and call this new version of rake what it
really is: Version 10.

So, welcome to Rake 10.0!

Rake 10 is actually feature identical to the latest version of Rake 9
(that would be the version spelled 0.9.3), *except* that Rake 10 drops
all the sundry deprecated features that have accumulated over the years.

If your Rakefile is up to date and current with all the new features
of Rake 10, you are ready to go. If your Rakefile still uses a few
deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same
feature set. Just be aware that future features will be in Rake 10
family line.

==== Changes

As mentioned above, there are no new features in Rake 10. However,
there are a number of features missing:

* Classic namespaces are now gone. Rake is no longer able to reflect
  the options settings in the global variables ($rakefile, $show\_tasks,
  $show\_prereqs, $trace, $dryrun and $silent). The
  <tt>--classic-namespace</tt> option is no longer supported.

* Global constants are no longer supported. This includes
  <tt>Task</tt>, <tt>FileTask</tt>, <tt>FileCreationTask</tt> and
  <tt>RakeApp</tt>). The constant missing hook to warn about using
  global rake constants has been removed.

* The Rake DSL methods (task, file, directory, etc) are in their own
  module (Rake::DSL). The stub versions of these methods (that printed
  warnings) in Object have been removed. However, the DSL methods are
  added to the top-level <tt>main</tt> object. Since <tt>main</tt> is
  not in the inheritance tree, the presence of the DSL methods in main
  should be low impact on other libraries.

  If you want to use the Rake DSL commands from your own code, just
  include <tt>Rake::DSL</tt> into your own classes and modules.

* The deprecated syntax for task arguments (the one using
  <tt>:needs</tt>) has been removed.

* The <tt>--reduce-compat</tt> flag has been removed (it's not needed
  anymore).

* The deprecated <tt>rake/sys.rb</tt> library has been removed.

* The deprecated <tt>rake/rdoctask.rb</tt> library has been removed.
  RDoc supplies its own rake task now.

* The deprecated <tt>rake/gempackagetask.rb</tt> library has been
  removed. Gem supplies its own package task now.

There is one small behavioral change:

* Non-file tasks now always report the current time as their time
  stamp. This is different from the previous behavior where non-file
  tasks reported current time only if there were no prerequisites, and
  the max prerequisite timestamp otherwise. This lead to inconsistent
  and surprising behavior when adding prerequisites to tasks that in
  turn were prequisites to file tasks. The new behavior is more
  consistent and predictable.

==== Changes (from 0.9.3, 0.9.4, 0.9.5)

Since Rake 10 includes the changes from the last version of Rake 9,
we'll repeat the changes for versions 0.9.3 through 0.9.5 here.

===== New Features (in 0.9.3)

* Multitask tasks now use a thread pool. Use -j to limit the number of
  available threads.

* Use -m to turn regular tasks into multitasks (use at your own risk).

* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
  programatically add rake task libraries.

* You can specific backtrace suppression patterns (see
  --suppress-backtrace)

* Directory tasks can now take prerequisites and actions

* Use --backtrace to request a full backtrace without the task trace.

* You can say "--backtrace=stdout" and "--trace=stdout" to route trace
  output to standard output rather than standard error.

* Optional 'phony' target (enable with 'require 'rake/phony'") for
  special purpose builds.

* Task#clear now clears task comments as well as actions and
  prerequisites. Task#clear_comment will specifically target comments.

* The --all option will force -T and -D to consider all the tasks,
  with and without descriptions.

===== Bug Fixes (in 0.9.3)

* Semi-colons in windows rakefile paths now work.

* Improved Control-C support when invoking multiple test suites.

* egrep method now reads files in text mode (better support for
  Windows)

* Better deprecation line number reporting.

* The -W option now works with all tasks, whether they have a
  description or not.

* File globs in rake should not be sorted alphabetically, independent
  of file system and platform.

* Numerous internal improvements.

* Documentation typos and fixes.

===== Bug Fixes (in 0.9.4)

* Exit status with failing tests is not correctly set to non-zero.

* Simplified syntax for phony task (for older versions of RDoc).

* Stand alone FileList usage gets glob function (without loading in
  extra dependencies)

===== Bug Fixes (in 0.9.5)

* --trace and --backtrace no longer swallow following task names.

==== Thanks

As usual, it was input from users that drove a lot of these changes. The
following people contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Aaron Patterson
* Dylan Smith
* Jo Liss
* Jonas Pfenniger
* Kazuki Tsujimoto
* Michael Bishop
* Michael Elufimov
* NAKAMURA Usaku
* Ryan Davis
* Sam Grönblom
* Sam Phippen
* Sergio Wong
* Tay Ray Chuan
* grosser
* quix

Also, many thanks to Eric Hodel for assisting with getting this release
out the door.

-- Jim Weirich

=== 10.0.2

==== Changes

===== Bug Fixes

* --trace and --backtrace no longer swallow following task names.

==== Thanks

As usual, it was input from users that drove a lot of these changes. The
following people contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Aaron Patterson
* Dylan Smith
* Jo Liss
* Jonas Pfenniger
* Kazuki Tsujimoto
* Michael Bishop
* Michael Elufimov
* NAKAMURA Usaku
* Ryan Davisgems/gems/rdoc-6.5.1.1/lib/rdoc/single_class.rb000064400000001000150403134140014637 0ustar00Davis
* Sam Grönblom
* Sam Phippen
* Sergio Wong
* Tay Ray Chuan
* grosser
* quix

Also, many thanks to Eric Hodel for assisting with getting this release
out the door.

-- Jim Weirich

=== 10.0.0

  "Jim, when will Rake reach version 1.0?"

Over the past several years I've been asked that question at
conferences, panels and over twitter. Due to historical reasons (or
maybe just plain laziness) Rake has (incorrectly) been treating the
second digit of the version as the major release number. So in my head
Rgems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/entities.rb000064400000154041150403134140015655 0ustar00ersion spelled 0.9.3), *except* that Rake 10 drops
all the sundry deprecated features that have accumulated over the years.

If your Rakefile is up to date and current with all the new features
of Rake 10, you are ready to go. If your Rakefile still uses a few
deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same
feature set. Just be aware that future features will be in Rake 10
family line.

==== Changes in 10.0

As mentioned above, there are no new features in Rake 10. However,
there are a number of features missing:

* Classic namespaces are now gone. Rake is no longer able to reflect
  the options settings in the global variables ($rakefile, $show\_tasks,
  $show\_prereqs, $trace, $dryrun and $silent). The
  <tt>--classic-namespace</tt> option is no longer supported.

* Global constants are no longer supported. This includes
  <tt>Task</tt>, <tt>FileTask</tt>, <tt>FileCreationTask</tt> and
  <tt>RakeApp</tt>). The constant missing hook to warn about using
  global rake constants has been removed.

* The Rake DSL methods (task, file, directory, etc) are in their own
  module (Rake::DSL). The stub versions of these methods (that printed
  warnings) in Object have been removed. However, the DSL methods are
  added to the top-level <tt>main</tt> object. Since <tt>main</tt> is
  not in the inheritance tree, the presence of the DSL methods in main
  should be low impact on other libraries.

  If you want to use the Rake DSL commands from your own code, just
  include <tt>Rake::DSL</tt> into your own classes and modules.

* The deprecated syntax for task arguments (the one using
  <tt>:needs</tt>) has been removed.

* The <tt>--reduce-compat</tt> flag has been removed (it's not needed
  anymore).

* The deprecated <tt>rake/sys.rb</tt> library has been removed.

* The deprecated <tt>rake/rdoctask.rb</tt> library has been removed.
  RDoc supplies its own rake task now.

* The deprecated <tt>rake/gempackagetask.rb</tt> library has been
  removed. Gem supplies its own package task now.

There is one small behavioral change:

* Non-file tasks now always report the current time as their time
  stamp. This is different from the previous behavior where non-file
  tasks reported current time only if there were no prerequisites, and
  the max prerequisite timestamp otherwise. This lead to inconsistent
  and surprising behavior when adding prerequisites to tasks that in
  turn were prequisites to file tasks. The new behavior is more
  consistent and predictable.

==== Changes (from 0.9.3)

Since Rake 10 includes the changes from the last version of Rake 9,
we'll repeat the changes for version 0.9.3 here.

===== New Features

* Multitask tasks now use a thread pool. Use -j to limit the number of
  available threads.

* Use -m to turn regular tasks into multitasks (use at your own risk).

* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
  programatically add rake task libraries.

* You can specific backtrace suppression patterns (see
  --suppress-backtrace)

* Directory tasks can now take prerequisites and actions

* Use --backtrace to request a full backtrace without the task trace.

* You can say "--backtrace=stdout" and "--trace=stdout" to route trace
  output to standard output rather than standard error.

* Optional 'phony' target (enable with 'require 'rake/phony'") for
  special purpose builds.

* Task#clear now clears task comments as well as actions and
  prerequisites. Task#clear_comment will specifically target comments.

* The --all option will force -T and -D to consider all the tasks,
  with and without descriptions.

===== Bug Fixes

* Semi-colons in windows rakefile paths now work.

* Improved Control-C support when invoking multiple test suites.

* egrep method now reads files in text mode (better support for
  Windows)

* Better deprecation line number reporting.

* The -W option now works with all tasks, whether they have a
  description or not.

* File globs in rake should not be sorted alphabetically, independent
  of file system and platform.

* Numerous internal improvements.

* Documentation typos and fixes.


==== Thanks

As usual, it was input from users that drove a lot of these changes. The
following people contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Aaron Patterson
* Dylan Smith
* Jo Liss
* Jonas Pfenniger
* Kazuki Tsujimoto
* Michael Bishop
* Michael Elufimov
* NAKAMURA Usaku
* Ryan Davis
* Sam Grönblom
* Sam Phippen
* Sergio Wong
* Tay Ray Chuan
* grosser
* quix

Also, many thanks to Eric Hodel for assisting with getting this release
out the door.

-- Jim Weirich

=== 0.9.6

Rake version 0.9.6 contains a number of fixes mainly for merging
Rake into the Ruby source tree and fixing tests.

==== Changes

===== Bug Fixes (0.9.6)

* Better trace output when using a multi-threaded Rakefile.
* Arg parsing is now consistent for tasks and multitasks.
* Skip exit code test in versions of Ruby that don't support it well.

Changes for better integration with the Ruby source tree:

* Fix version literal for Ruby source tree build.
* Better loading of libraries for testing in Ruby build.
* Use the ruby version provided by Ruby's tests.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Aaron Patterson
* Dylan Smith
* Jo Liss
* Jonas Pfenniger
* Kazuki Tsujimoto
* Michael Bishop
* Michael Elufimov
* NAKAMURA Usaku
* Ryan Davis
* Sam Grönblom
* Sam Phippen
* Sergio Wong
* Tay Ray Chuan
* grosser
* quix

Also, many thanks to Eric Hodel for assisting with getting this release
out the door.

-- Jim Weirich

=== 0.9.5

Rake version 0.9.5 contains a number of bug fixes.

==== Changes

===== Bug Fixes (0.9.5)

* --trace and --backtrace no longer swallow following task names.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Aaron Patterson
* Dylan Smith
* Jo Liss
* Jonas Pfenniger
* Kazuki Tsujimoto
* Michael Bishop
* Michael Elufimov
* NAKAMURA Usaku
* Ryan Davis
* Sam Grönblom
* Sam Phippen
* Sergio Wong
* Tay Ray Chuan
* grosser
* quix

Also, many thanks to Eric Hodel for assisting with getting this release
out the door.

-- Jim Weirich

=== 0.9.4

Rake version 0.9.4 contains a number of bug fixes.

==== Changes

===== Bug Fixes (0.9.4)

* Exit status with failing tests is not correctly set to non-zero.

* Simplified syntax for phony task (for older versions of RDoc).

* Stand alone FileList usage gets glob function (without loading in
  extra dependencies)

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Aaron Patterson
* Dylan Smith
* Jo Liss
* Jonas Pfenniger
* Kazuki Tsujimoto
* Michael Bishop
* Michael Elufimov
* NAKAMURA Usaku
* Ryan Davis
* Sam Grönblom
* Sam Phippen
* Sergio Wong
* Tay Ray Chuan
* grosser
* quix

Also, many thanks to Eric Hodel for assisting with getting this release
out the door.

-- Jim Weirich

=== 0.9.3

Rake version 0.9.3 contains some new, backwards compatible features and
a number of bug fixes.

==== Changes

===== New Features

* Multitask tasks now use a thread pool. Use -j to limit the number of
  available threads.

* Use -m to turn regular tasks into multitasks (use at your own risk).

* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
  programatically add rake task libraries.

* You can specific backtrace suppression patterns (see
  --suppress-backtrace)

* Directory tasks can now take prerequisites and actions

* Use --backtrace to request a full backtrace without the task trace.

* You can say "--backtrace=stdout" and "--trace=stdout" to route trace
  output to standard output rather than standard error.

* Optional 'phony' target (enable with 'require 'rake/phony'") for
  special purpose builds.

* Task#clear now clears task comments as well as actions and
  prerequisites. Task#clear_comment will specifically target comments.

* The --all option will force -T and -D to consider all the tasks,
  with and without descriptions.

===== Bug Fixes

* Semi-colons in windows rakefile paths now work.

* Improved Control-C support when invoking multiple test suites.

* egrep method now reads files in text mode (better support for
  Windows)

* Better deprecation line number reporting.

* The -W option now works with all tasks, whether they have a
  description or not.

* File globs in rake should not be sorted alphabetically, independent
  of file system and platform.

* Numerous internal improvements.

* Documentation typos and fixes.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Aaron Patterson
* Dylan Smith
* Jo Liss
* Jonas Pfenniger
* Kazuki Tsujimoto
* Michael Bishop
* Michael Elufimov
* NAKAMURA Usaku
* Ryan Davis
* Sam Grönblom
* Sam Phippen
* Sergio Wong
* Tay Ray Chuan
* grosser
* quix

Also, many thanks to Eric Hodel for assisting with getting this release
out the door.

-- Jim Weirich

=== Rake 0.9.2.2

Rake version 0.9.2.2 is mainly bug fixes.

==== Changes

* The rake test loader now removes arguments it has processed.  Issue #51
* Rake::TaskArguments now responds to #values\_at
* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7
* Rake tests are now directory-independent
* Rake tests are no longer require flexmock
* Commands constant is no longer polluting top level namespace.
* Show only the interesting portion of the backtrace by default (James M. Lawrence).
* Added --reduce-compat option to remove backward compatible DSL hacks (James M. Lawrence).

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* James M. Lawrence (quix)
* Roger Pack
* Cezary Baginski
* Sean Scot August Moon
* R.T. Lechow
* Alex Chaffee
* James Tucker
* Matthias Lüdtke
* Santiago Pastorino

Also, bit thanks to Eric Hodel for assisting with getting this release
out the door (where "assisting" includes, but is not by any means
limited to, "pushing" me to get it done).

-- Jim Weirich

=== 0.9.2

Rake version 0.9.2 has a few small fixes.  See below for details.

==== Changes

* Support for Ruby 1.8.6 was fixed.
* Global DSL warnings now honor --no-deprecate

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* James M. Lawrence (quix)
* Roger Pack
* Cezary Baginski
* Sean Scot August Moon
* R.T. Lechow
* Alex Chaffee
* James Tucker
* Matthias Lüdtke
* Santiago Pastorino

Also, bit thanks to Eric Hodel for assisting with getting this release
out the door (where "assisting" includes, but is not by any means
limited to, "pushing" me to get it done).

-- Jim Weirich

=== 0.9.1

Rake version 0.9.1 has a number of bug fixes and enhancments (see
below for more details).  Additionally, the internals have be slightly
restructured and improved.

==== Changes

Rake 0.9.1 adds back the global DSL methods, but with deprecation
messages.  This allows Rake 0.9.1 to be used with older rakefiles with
warning messages.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* James M. Lawrence (quix)
* Roger Pack
* Cezary Baginski
* Sean Scot August Moon
* R.T. Lechow
* Alex Chaffee
* James Tucker
* Matthias Lüdtke
* Santiago Pastorino

Also, bit thanks to Eric Hodel for assisting with getting this release
out the door (where "assisting" includes, but is not by any means
limited to, "pushing" me to get it done).

-- Jim Weirich

=== 0.9.0

Rake version 0.9.0 has a number of bug fixes and enhancments (see
below for more details).  Additionally, the internals have be slightly
restructured and improved.

==== Changes

===== New Features / Enhancements / Bug Fixes in Version 0.9.0

* Rake now warns when the deprecated :needs syntax used (and suggests
  the proper syntax in the warning).

* Moved Rake DSL commands to top level ruby object 'main'.  Rake DSL
  commands are no longer private methods in Object. (Suggested by
  James M. Lawrence/quix)

* Rake now uses case-insensitive comparisons to find the Rakefile on Windows.
  Based on patch by Roger Pack.

* Rake now requires (instead of loads) files in the test task.  Patch by Cezary
  Baginski.

* Fixed typos.  Patches by Sean Scot August Moon and R.T. Lechow.

* Rake now prints the Rakefile directory only when it's different from the
  current directory.  Patch by Alex Chaffee.

* Improved rakefile_location discovery on Windows.  Patch by James Tucker.

* Rake now recognizes "Windows Server" as a windows system.  Patch by Matthias
  Lüdtke

* Rake::RDocTask is deprecated.  Use RDoc::Task from RDoc 2.4.2+ (require
  'rdoc/task')

* Rake::GemPackageTask is deprecated.  Use Gem::PackageTask (require
  'rubygems/package\_task')

* Rake now outputs various messages to $stderr instead of $stdout.

* Rake no longer emits warnings for Config.  Patch by Santiago Pastorino.

* Removed Rake's DSL methods from the top level scope.  If you need to
  call 'task :xzy' in your code, include Rake::DSL into your class, or
  put the code in a Rake::DSL.environment do ... end block.

* Split rake.rb into individual files.

* Support for the --where (-W) flag for showing where a task is defined.

* Fixed quoting in test task.
  (http://onestepback.org/redmine/issues/show/44,
  http://www.pivotaltracker.com/story/show/1223138)

* Fixed the silent option parsing problem.
  (http://onestepback.org/redmine/issues/show/47)

* Fixed :verbose=>false flag on sh and ruby commands.

* Rake command line options may be given by default in a RAKEOPT
  environment variable.

* Errors in Rake will now display the task invocation chain in effect
  at the time of the error.

* Accepted change by warnickr to not expand test patterns in shell
  (allowing more files in the test suite).

* Fixed that file tasks did not perform prereq lookups in scope
  (Redmine #57).

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* James M. Lawrence (quix)
* Roger Pack
* Cezary Baginski
* Sean Scot August Moon
* R.T. Lechow
* Alex Chaffee
* James Tucker
* Matthias Lüdtke
* Santiago Pastorino

Also, bit thanks to Eric Hodel for assisting with getting this release
out the door (where "assisting" includes, but is not by any means
limited to, "pushing" me to get it done).

-- Jim Weirich


=== 0.8.7

Rake version 0.8.5 introduced greatly improved support for executing
commands on Windows.  The "sh" command now has the same semantics on
Windows that it has on Unix based platforms.

Rake version 0.8.6 includes minor fixes the the RDoc generation.
Rake version 0.8.7 includes a minor fix for JRuby running on windows.

==== Changes

===== New Features / Enhancements in Version 0.8.5

* Improved implementation of the Rake system command for Windows.
  (patch from James M. Lawrence/quix)

* Support for Ruby 1.9's improved system command.  (patch from James
  M. Lawrence/quix)

* Rake now includes the configured extension when invoking an
  executable (Config::CONFIG['EXEEXT])

===== Bug Fixes in Version 0.8.5

* Environment variable keys are now correctly cased (it matters in
  some implementations).

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Charles Nutter

-- Jim Weirich

=== 0.8.6

Rake version 0.8.5 introduced greatly improved support for executing
commands on Windows.  The "sh" command now has the same semantics on
Windows that it has on Unix based platforms.

Rake version 0.8.5 includes minor fixes the the RDoc generation.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* James M. Lawrence/quix
* Luis Lavena

-- Jim Weirich

=== 0.8.5

Rake version 0.8.5 is a new release of Rake with greatly improved
support for executing commands on Windows.  The "sh" command now has
the same semantics on Windows that it has on Unix based platforms.

==== Changes

===== New Features / Enhancements in Version 0.8.5

* Improved implementation of the Rake system command for Windows.
  (patch from James M. Lawrence/quix)

* Support for Ruby 1.9's improved system command.  (patch from James
  M. Lawrence/quix)

* Rake now includes the configured extension when invoking an
  executable (Config::CONFIG['EXEEXT])

===== Bug Fixes in Version 0.8.5

* Environment variable keys are now correctly cased (it matters in
  some implementations).

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* James M. Lawrence/quix
* Luis Lavena

-- Jim Weirich

=== 0.8.4

Rake version 0.8.4 is a bug-fix release of rake.

NOTE: The version of Rake that comes with Ruby 1.9 has diverged
      slightly from the core Rake code base.  Rake 0.8.4 will work
      with Ruby 1.9, but is not a strict upgrade for the Rake that
      comes with Ruby 1.9.  A (near) future release of Rake will unify
      those two codebases.

==== Letter Writing Campaign

Thanks to Aaron Patterson (@tenderlove) and Eric Hodel (@drbrain) for
their encouraging support in organizing a letter writing campaign to
lobby for the "Warning Free" release of rake 0.8.4.  A special callout
goes to Jonathan D. Lord, Sr (Dr. Wingnut) whose postcard was the
first to actually reach me. (see
http://tenderlovemaking.com/2009/02/26/we-need-a-new-version-of-rake/
for details)

==== Changes

===== New Features / Enhancements in Version 0.8.4

* Case is preserved on rakefile names. (patch from James
  M. Lawrence/quix)

* Improved Rakefile case insensitivity testing (patch from Luis
  Lavena).

* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH,
  APPDATA, USERPROFILE (patch from Luis Lavena)

* MingGW is now recognized as a windows platform.  (patch from Luis
  Lavena)

===== Bug Fixes in Version 0.8.4

* Removed reference to manage_gem to fix the warning produced by the
  gem package task.

* Fixed stray ARGV option problem that was interfering with
  Test::Unit::Runner. (patch from Pivotal Labs)

===== Infrastructure Improvements in Version 0.8.4

* Numerous fixes to the windows test suite (patch from Luis Lavena).

* Improved Rakefile case insensitivity testing (patch from Luis
  Lavena).

* Better support for windows paths in the test task (patch from Simon
  Chiang/bahuvrihi)

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* James M. Lawrence/quix
* Luis Lavena
* Pivotal Labs
* Simon Chiang/bahuvrihi

-- Jim Weirich

=== 0.8.3

Rake version 0.8.3 is a bug-fix release of rake.

==== Changes

===== Bug Fixes in Version 0.8.3

* Enhanced the system directory detection in windows. We now check
  HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch
  supplied by James Tucker). Rake no long aborts if it can't find the
  directory.

* Added fix to handle ruby installations in directories with spaces in
  their name.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Edwin Pratomo
* Gavin Stark
* Adam Q. Salter
* Adam Majer
* Emanuel Indermühle
* Ittay Dror
* Bheeshmar Redheendran (for spending an afternoon with me debugging
  windows issues)

-- Jim Weirich


=== 0.8.2

Rake version 0.8.2 is a new release of rake that includes a number of
new features and numerous bug fixes.

==== Changes

===== New Features in Version 0.8.2

* Switched from getoptlong to optparse (patches supplied by Edwin
  Pratomo).

* The -T option will now attempt to dynamically sense the size of the
  terminal. The -T output will only self-truncate if the output is a
  tty. However, if RAKE_COLUMNS is explicitly set, it will be honored
  in any case. (Patch provided by Gavin Stark).

* The following public methods have been added to rake task objects:

  * task.clear -- Clear both the prerequisites and actions of the
    target rake task.
  * task.clear_prerequisites -- Clear all the existing prerequisites
    from the target rake task.
  * task.clear_actions -- Clear all the existing actions from the
    target rake task.
  * task.reenable -- Re-enable a task, allowing its actions to be
    executed again if the task is invoked.

* Changed RDoc test task to have no default template. This makes it
  easier for the tempate to pick up the template from the environment.

* Default values for task arguments can easily be specified with the
  :with_defaults method. (Idea for default argument merging supplied
  by (Adam Q. Salter)

===== Bug Fixes in Version 0.8.2

* Fixed bug in package task so that it will include the subdir
  directory in the package for testing. (Bug found by Adam Majer)

* Fixed filename dependency order bug in test\_inspect\_pending and
  test\_to\_s\_pending. (Bug found by Adam Majer)

* Fixed check for file utils options to make them immune to the
  symbol/string differences. (Patch supplied by Edwin Pratomo)

* Fixed bug with rules involving multiple source, where only the first
  dependency of a rule has any effect (Patch supplied by Emanuel
  Indermühle)

* FileList#clone and FileList#dup have better sematics w.r.t. taint
  and freeze.

* Changed from using Mutex to Monitor. Evidently Mutex causes thread
  join errors when Ruby is compiled with -disable-pthreads. (Patch
  supplied by Ittay Dror)

* Fixed bug in makefile parser that had problems with extra spaces in
  file task names. (Patch supplied by Ittay Dror)

==== Other changes in Version 0.8.2

* Added ENV var to rake's own Rakefile to prevent OS X from including
  extended attribute junk in the rake package tar file. (Bug found by
  Adam Majer)

* Added a performance patch for reading large makefile dependency
  files. (Patch supplied by Ittay Dror)

==== Task Argument Examples

Prior to version 0.8.0, rake was only able to handle command line
arguments of the form NAME=VALUE that were passed into Rake via the
ENV hash.  Many folks had asked for some kind of simple command line
arguments, perhaps using "--" to separate regular task names from
argument values on the command line.  The problem is that there was no
easy way to associate positional arguments on the command line with
different tasks.  Suppose both tasks :a and :b expect a command line
argument: does the first value go with :a?  What if :b is run first?
Should it then get the first command line argument.

Rake 0.8.0 solves this problem by explicitly passing values directly
to the tasks that need them.  For example, if I had a release task
that required a version number, I could say:

   rake release[0.8.2]

And the string "0.8.2" will be passed to the :release task.  Multiple
arguments can be passed by separating them with a comma, for example:

   rake name[john,doe]

Just a few words of caution.  The rake task name and its arguments
need to be a single command line argument to rake.  This generally
means no spaces.  If spaces are needed, then the entire rake +
argument string should be quoted.  Something like this:

   rake "name[billy bob, smith]"

(Quoting rules vary between operating systems and shells, so make sure
you consult the proper docs for your OS/shell).

===== Tasks that Expect Parameters

Parameters are only given to tasks that are setup to expect them.  In
order to handle named parameters, the task declaration syntax for
tasks has been extended slightly.

For example, a task that needs a first name and last name might be
declared as:

   task :name, :first_name, :last_name

The first argument is still the name of the task (:name in this case).
The next to argumements are the names of the parameters expected by
:name (:first_name and :last_name in the example).

To access the values of the parameters, the block defining the task
behaviour can now accept a second parameter:

   task :name, :first_name, :last_name do |t, args|
     puts "First name is #{args.first_name}"
     puts "Last  name is #{args.last_name}"
   end

The first argument of the block "t" is always bound to the current
task object.  The second argument "args" is an open-struct like object
that allows access to the task arguments.  Extra command line
arguments to a task are ignored.  Missing command line arguments are
given the nil value.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Edwin Pratomo
* Gavin Stark
* Adam Q. Salter
* Adam Majer
* Emanuel Indermühle
* Ittay Dror
* Bheeshmar Redheendran (for spending an afternoon with me debugging
  windows issues)

-- Jim Weirich

=== 0.8.0/0.8.1

Rake version 0.8.0 is a new release of rake that includes serveral new
features.

==== Changes

===== New Features in Version 0.8.0

* Tasks can now receive command line parameters.  See the examples
  below for more details.

* Comments are limited to 80 columns on output, but full comments can
  be seen by using the -D parameter. (feature suggested by Jamis
  Buck).

* Explicit exit(n) calls will now set the exit status to n. (patch
  provided by Stephen Touset).

* Rake is now compatible with Ruby 1.9.

Version 0.8.1 is a minor update that includes additional Ruby 1.9
compatibility fixes.

==== Task Argument Examples

Prior to version 0.8.0, rake was only able to handle command line
arguments of the form NAME=VALUE that were passed into Rake via the
ENV hash.  Many folks had asked for some kind of simple command line
arguments, perhaps using "--" to separate regular task names from
argument values on the command line.  The problem is that there was no
easy way to associate positional arguments on the command line with
different tasks.  Suppose both tasks :a and :b expect a command line
argument: does the first value go with :a?  What if :b is run first?
Should it then get the first command line argument.

Rake 0.8.0 solves this problem by explicitly passing values directly
to the tasks that need them.  For example, if I had a release task
that required a version number, I could say:

   rake release[0.8.0]

And the string "0.8.0" will be passed to the :release task.  Multiple
arguments can be passed by separating them with a comma, for example:

   rake name[john,doe]

Just a few words of caution.  The rake task name and its arguments
need to be a single command line argument to rake.  This generally
means no spaces.  If spaces are needed, then the entire rake +
argument string should be quoted.  Something like this:

   rake "name[billy bob, smith]"

(Quoting rules vary between operating systems and shells, so make sure
you consult the proper docs for your OS/shell).

===== Tasks that Expect Parameters

Parameters are only given to tasks that are setup to expect them.  In
order to handle named parameters, the task declaration syntax for
tasks has been extended slightly.

For example, a task that needs a first name and last name might be
declared as:

   task :name, :first_name, :last_name

The first argument is still the name of the task (:name in this case).
The next to argumements are the names of the parameters expected by
:name (:first_name and :last_name in the example).

To access the values of the parameters, the block defining the task
behaviour can now accept a second parameter:

   task :name, :first_name, :last_name do |t, args|
     puts "First name is #{args.first_name}"
     puts "Last  name is #{args.last_name}"
   end

The first argument of the block "t" is always bound to the current
task object.  The second argument "args" is an open-struct like object
that allows access to the task arguments.  Extra command line
arguments to a task are ignored.  Missing command line arguments are
given the nil value.

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments.  Thanks to ...

* Jamis Buck (for comment formatting suggestions)
* Stephen Touset (for exit status patch).

-- Jim Weirich


=== 0.7.3

Rake version 0.7.3 is a minor release that includes some refactoring to better
support custom Rake applications.

==== Changes

===== New Features in Version 0.7.3

* Added the +init+ and +top_level+ methods to make the creation of custom Rake applications a bit easier.  E.g.

    gem 'rake', ">= 0.7.3"
    require 'rake'

    Rake.application.init('myrake')

    task :default do
      something_interesting
    end

    Rake.application.top_level

==== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments. Thanks to ...

-- Jim Weirich


=== 0.7.2


Version 0.7.2 supplies a bug fix and a few minor enhancements. In
particular, the new version fixes an incompatibility with the soon to
be released Ruby 1.8.6.  We strongly recommend upgrading to Rake 0.7.2
in order to be compatible with the new version of Ruby.

==== Changes

===== Bug Fixes in 0.7.2

There are quite a number of bug fixes in the new 0.7.2 version of
Rake:

* Removed dependency on internal fu_xxx functions from FileUtils.

* Error messages are now send to stderr rather than stdout (from
  Payton Quackenbush).

* Better error handling on invalid command line arguments (from Payton
  Quackenbush).

* Fixed some bugs where the application object was going to the global
  appliation instead of using its own data.

* Fixed the method name leak from FileUtils (bug found by Glenn
  Vanderburg).

* Added test for noop, bad_option and verbose flags to sh command.

* Added a description to the gem task in GemPackageTask.

* Fixed a bug when rules have multiple prerequisites (patch by Joel
  VanderWerf)

* Added the handful of RakeFileUtils to the private method as well.

===== New Features in 0.7.2

The following new features are available in Rake version 0.7.2:

* Added square and curly bracket patterns to FileList#include (Tilman
  Sauerbeck).

* FileLists can now pass a block to FileList#exclude to exclude files
  based on calculated values.

* Added plain filename support to rule dependents (suggested by Nobu
  Nakada).

* Added pathmap support to rule dependents.  In other words, if a
  pathmap format (beginning with a '%') is given as a Rake rule
  dependent, then the name of the depend will be the name of the
  target with the pathmap format applied.

* Added a 'tasks' method to a namespace to get a list of tasks
  associated with the namespace.

* Added tar_command and zip_command options to the Package task.

* The clean task will no longer delete 'core' if it is a directory.

===== Internal Rake Improvements

The following changes will are mainly internal improvements and
refactorings and have little effect on the end user.  But they may be
of interest to the general public.

* Added rcov task and updated unit testing for better code coverage.

* Added a 'shame' task to the Rakefile.

* Added rake_extension to handle detection of extension collisions.

* Added a protected 'require "rubygems"' to test/test_application to
  unbreak cruisecontrol.rb.

* Removed rake\_dup.  Now we just simply rescue a bad dup.

* Refactored the FileList reject logic to remove duplication.

* Removed if \_\_FILE\_\_ at the end of the rake.rb file.

==== Thanks

As usual, it was input from users that drove a alot of these changes.
The following people either contributed patches, made suggestions or
made otherwise helpful comments.  Thanks to ...

* Payton Quackenbush -- For several error handling improvements.

* Glenn Vanderburg -- For finding and fixing the method name leak from
  FileUtils.

* Joel VanderWerf -- for finding and fixing a bug in the handling of
  multiple prerequisites.

* Tilman Sauerbeck -- For some enhancing FileList to support more
  advanced file globbing.

* Nobu Nakada -- For suggesting plain file name support to rule dependents.

-- Jim Weirich

=== 0.7.1

Version 0.7.1 supplies a bug fix and a few minor enhancements.

==== Changes

===== Bug Fixes in 0.7.1

* Changes in the exception reported for the FileUtils.ln caused
  safe_ln to fail with a NotImplementedError.  Rake 0.7.1 will now
  catch that error or any StandardError and properly fall back to
  using +cp+.

===== New Features in 0.7.1

* You can filter the results of the --task option by supplying an
  optional regular expression.  This allows the user to easily find a
  particular task name in a long list of possible names.

* Transforming procs in a rule may now return a list of prerequisites.
  This allows more flexible rule formation.

* FileList and String now support a +pathmap+ melthod that makes the
  transforming paths a bit easier.  See the API docs for +pathmap+ for
  details.

* The -f option without a value will disable the search for a
  Rakefile.  This allows the Rakefile to be defined entirely in a
  library (and loaded with the -r option).  The current working
  directory is not changed when this is done.

==== Thanks

As usual, it was input from users that drove a alot of these changes.
The following people either contributed patches, made suggestions or
made otherwise helpful comments.  Thanks to ...

* James Britt and Assaph Mehr for reporting and helping to debug the
  safe_ln issue.

-- Jim Weirich


=== 0.7.0

These changes for Rake have been brewing for a long time.  Here they
are, I hope you enjoy them.

==== Changes

===== New Features

* Name space support for task names (see below).
* Prerequisites can be executed in parallel (see below).
* Added safe_ln support for openAFS (via Ludvig Omholt).
* RDoc defaults to internal (in-process) invocation.  The old behavior
  is still available by setting the +external+ flag to true.
* Rakefiles are now loaded with the expanded path to prevent
  accidental pollution from the Ruby load path.
* Task objects my now be used in prerequisite lists directly.
* Task objects (in addition to task names) may now be included in the
  prerequisite list of a task.
* Internals cleanup and refactoring.

===== Bug Fixes

* Compatibility fixes for Ruby 1.8.4 FileUtils changes.

===== Namespaces

Tasks can now be nested inside their own namespaces.  Tasks within one
namespace will not accidentally interfer with tasks named in a different
namespace.

For example:

  namespace "main" do
    task :build do
      # Build the main program
    end
  end

  namespace "samples" do
    task :build do
      # Build the sample programs
    end
  end

  task :build_all => ["main:build", "samples:build"]

Even though both tasks are named :build, they are separate tasks in
their own namespaces.  The :build_all task (defined in the toplevel
namespace) references both build tasks in its prerequisites.

You may invoke each of the individual build tasks with the following
commands:

  rake main:build
  rake samples:build

Or invoke both via the :build_all command:

  rake build_all

Namespaces may be nested arbitrarily.  Since the name of file tasks
correspond to the name of a file in the external file system,
FileTasks are not affected by the namespaces.

See the Rakefile format documentation (in the Rake API documents) for
more information.

===== Parallel Tasks

Sometimes you have several tasks that can be executed in parallel.  By
specifying these tasks as prerequisites to a +multitask+ task.

In the following example the tasks copy\_src, copy\_doc and copy\_bin
will all execute in parallel in their own thread.

  multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do
    puts "All Copies Complete"
  end

==== Thanks

As usual, it was input from users that drove a alot of these changes.
The following people either contributed patches, made suggestions or
made otherwise helpful comments.  Thanks to ...

* Doug Young (inspiration for the parallel task)
* David Heinemeier Hansson (for --trace message enhancement and for
  pushing for namespace support).
* Ludvig Omholt (for the openAFS fix)

-- Jim Weirich

=== 0.6.1

* Rebuilt 0.6.0 gem without signing.

=== 0.6.0

Its time for some long requested enhancements and lots of bug fixes
... And a whole new web page.

==== New Web Page

The primary documentation for rake has moved from the RubyForge based
wiki to its own Hieraki based web site.  Constant spam on the wiki
made it a difficult to keep clean.  The new site will be easier to
update and organize.

Check out the new documentation at: http://docs.rubyrake.org

We will be adding new documentation to the site as time goes on.

In addition to the new docs page, make sure you check out Martin
Fowlers article on rake at http://martinfowler.com/articles/rake.html

==== Changes

===== New Features

* Multiple prerequisites on Rake rules now allowed.  However, keep the
  following in mind:

  1. All the prerequisites of a rule must be available before a rule
     is triggered, where "enabled" means (a) an existing file, (b) a
     defined rule, or (c) another rule which also must be
     trigger-able.
  2. Rules are checked in order of definition, so it is important to
     order your rules properly.  If a file can be created by two
     different rules, put the more specific rule first (otherwise the
     more general rule will trigger first and the specific one will
     never be triggered).
  3. The <tt>source</tt> method now returns the name of the first
     prerequisite listed in the rule.  <tt>sources</tt> returns the
     names of all the rule prerequisites, ordered as they are defined
     in the rule.  If the task has other prerequisites not defined in
     the rule (but defined in an explicit task definition), then they
     will _not_ be included in the sources list.

* FileLists may now use the egrep command.  This popular enhancement
  is now a core part of the FileList object.  If you want to get a
  list of all your to-dos, fixmes and TBD comments, add the following
  to your Rakefile.

    desc "Look for TODO and FIXME tags in the code"
    task :todo do
      FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/
    end

* The <tt>investigation</tt> method was added to task object to dump
  out some important values.  This makes it a bit easier to debug Rake
  tasks.

  For example, if you are having problems with a particular task, just
  print it out:

    task :huh do
      puts Rake::Task['huh'].investigation
    end

* The Rake::TestTask class now supports a "ruby\_opts" option to pass
  arbitrary ruby options to a test subprocess.

===== Some Incompatibilities

* When using the <tt>ruby</tt> command to start a Ruby subprocess, the
  Ruby interpreter that is currently running rake is used by default.
  This makes it easier to use rake in an environment with multiple
  ruby installation.  (Previously, the first ruby command found in the
  PATH was used).

  If you wish to chose a different Ruby interpreter, you can
  explicitly choose the interpreter via the <tt>sh</tt> command.

* The major rake classes (Task, FileTask, FileCreationTask, RakeApp)
  have been moved out of the toplevel scope and are now accessible as
  Rake::Task, Rake::FileTask, Rake::FileCreationTask and
  Rake::Application.  If your Rakefile
  directly references any one of these tasks, you may:

  1. Update your Rakefile to use the new classnames
  2. Use the --classic-namespace option on the rake command to get the
     old behavior,
  3. Add <code>require 'rake/classic_namespace'</code> to the
     Rakefile to get the old behavior.

  <tt>rake</tt> will print a rather annoying warning whenever a
  deprecated class name is referenced without enabling classic
  namespace.

===== Bug Fixes

* Several unit tests and functional tests were fixed to run better
  under windows.

* Directory tasks are now a specialized version of a File task.  A
  directory task will only be triggered if it doesn't exist.  It will
  not be triggered if it is out of date w.r.t. any of its
  prerequisites.

* Fixed a bug in the Rake::GemPackageTask class so that the gem now
  properly contains the platform name.

* Fixed a bug where a prerequisite on a <tt>file</tt> task would cause
  an exception if the prerequisite did not exist.

==== Thanks

As usual, it was input from users that drove a alot of these changes.
The following people either contributed patches, made suggestions or
made otherwise helpful comments.  Thanks to ...

* Greg Fast (better ruby_opt test options)
* Kelly Felkins (requested by better namespace support)
* Martin Fowler (suggested Task.investigation)
* Stuart Jansen (send initial patch for multiple prerequisites).
* Masao Mutch (better support for non-ruby Gem platforms)
* Philipp Neubeck (patch for file task exception fix)

-- Jim Weirich

=== 0.5.4

Time for some minor bug fixes and small enhancements

==== Changes

Here are the changes for version 0.5.4 ...

* Added double quotes to the test runner.  This allows the location of
  the tests (and runner) to be in a directory path that contains
  spaces (e.g. "C:/Program Files/ruby/bin").
* Added .svn to default ignore list.  Now subversion project metadata
  is automatically ignored by Rake's FileList.
* Updated FileList#include to support nested arrays and filelists.
  FileLists are flat lists of file names.  Using a FileList in an
  include will flatten out the nested file names.

== Thanks

As usual, it was input from users that drove a alot of these changes.
Thanks to ...

* Tilman Sauerbeck for the nested FileList suggestion.
* Josh Knowles for pointing out the spaces in directory name problem.

-- Jim Weirich

=== 0.5.3

Although it has only been two weeks since the last release, we have
enough updates to the Rake program to make it time for another
release.

==== Changes

Here are the changes for version 0.5.3 ...

* FileLists have been extensively changed so that they mimic the
  behavior of real arrays even more closely.  In particular,
  operations on FileLists that return a new collection (e.g. collect,
  reject) will now return a FileList rather than an array.  In
  addition, several places where FileLists were not properly expanded
  before use have been fixed.
* A method (+ext+) to simplify the handling of file extensions was
  added to String and to Array.
* The 'testrb' script in test/unit tends to silently swallow syntax
  errors in test suites.  Because of that, the default test loader is
  now a rake-provided script.  You can still use 'testrb' by setting
  the loader flag in the test task to :testrb.  (See the API documents
  for TestTask for all the loader flag values).
* FileUtil methods (e.g. cp, mv, install) are now declared to be
  private.  This will cut down on the interference with user defined
  methods of the same name.
* Fixed the verbose flag in the TestTask so that the test code is
  controlled by the flag.  Also shortened up some failure messages.
  (Thanks to Tobias Luetke for the suggestion).
* Rules will now properly detect a task that can generate a source
  file.  Previously rules would only consider source files that were
  already present.
* Added an +import+ command that allows Rake to dynamically import
  dependendencies into a running Rake session.  The +import+ command
  can run tasks to update the dependency file before loading them.
  Dependency files can be in rake or make format, allowing rake to
  work with tools designed to generate dependencies for make.

==== Thanks

As usual, it was input from users that drove a alot of these changes.
Thanks to ...

* Brian Gernhardt for the rules fix (especially for the patience to
  explain the problem to me until I got what he was talking about).
* Stefan Lang for pointing out problems in the dark corners of the
  FileList implementation.
* Alexey Verkhovsky pointing out the silently swallows syntax errors
  in tests.
* Tobias Luetke for beautifying the test task output.
* Sam Roberts for some of the ideas behind dependency loading.

-- Jim Weirich


=== 0.5.0

It has been a long time in coming, but we finally have a new version
of Rake available.

==== Changes

* Fixed documentation that was lacking the Rake module name (Tilman
  Sauerbeck).
* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck).
* Recursive rules are now supported (Tilman Sauerbeck).
* Added warning option for the Test Task (requested by Eric Hodel).
* The jamis rdoc gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/literals.rb000064400000024367150403134140015657 0ustar00 Rake updates in the 0.4.xx series as new
Ruby-1.8.2 issues become manifest.  Once the codebase stabilizes, I
will release a 0.5.0 version incorporating all the changes.  If you
are not using Ruby-1.8.2 and wish to avoid version churn, I recommend
staying with a release prior to Rake-0.4.14.

=== 0.4.14

Version 0.4.14 is a compatibility fix to allow Rake's test task to
work under Ruby 1.8.2.  A change in the Test::Unit autorun feature
prevented Rake from running any tests.  This release fixes the
problem.

Rake 0.4.14 is the recommended release for anyone using Ruby 1.8.2.

=== 0.4.13

* Fixed the dry-run flag so it is operating again.
* Multiple arguments to sh and ruby commands will not be interpreted
  by the shell (patch provided by Jonathan Paisley).

=== 0.4.12

* Added --silent (-s) to suppress the (in directory) rake message.

=== 0.4.11

* Changed the "don't know how to rake" message (finally)
* Changes references to a literal "Rakefile" to reference the global
  variable $rakefile (which contains the actual name of the rakefile).

=== 0.4.10

* Added block support to the "sh" command, allowing users to take
  special actions on the result of the system call.  E.g.

    sh "shell_command" do |ok, res|
      puts "Program returned #{res.exitstatus}" if ! ok
    end

=== 0.4.9

* Switched to Jamis Buck's RDoc template.
* Removed autorequire from Rake's gem spec.  This prevents the Rake
  libraries from loading while using rails.

=== 0.4.8

* Added support for .rb versions of Rakefile.
* Removed \\\n's from test task.
* Fixed Ruby 1.9 compatibility issue with FileList.

=== 0.4.7

* Fixed problem in FileList that caused Ruby 1.9 to go into infinite
  recursion.  Since to_a was removed from Object, it does not need to
  added back into the list of methods to rewrite in FileList.  (Thanks
  to Kent Sibilev for pointing this out).

=== 0.4.6
* Removed test version of ln in FileUtils that prevented safe_ln from
  using ln.

=== 0.4.5
* Upgraded comments in TestTask.
* FileList to_s and inspect now automatically resolve pending changes.
* FileList#exclude properly returns the FileList.

=== 0.4.4
* Fixed initialization problem with @comment.
* Now using multi -r technique in TestTask.  Switch Rakefile back to
  using the built-in test task macros because the rake runtime is no
  longer needed.
* Added 'TEST=filename' and 'TESTOPTS=options' to the Test Task
  macros.
* Allow a +test_files+ attribute in test tasks.  This allows more
  flexibility in specifying test files.

=== 0.4.3
* Fixed Comment leakage.

=== 0.4.2
* Added safe_ln that falls back to a copy if a file link is not supported.
* Package builder now uses safe\_ln.

=== 0.4.1
* Task comments are now additive, combined with "/".
* Works with (soon to be released) rubygems 0.6.2 (or 0.7.0)

=== 0.4.0
* FileList now uses deferred loading.  The file system is not searched
  until the first call that needs the file names.
* VAR=VALUE options are now accepted on the command line and are
  treated like envgems/gems/rake-13.0.6/doc/command_line_usage.rdoc000064400000013506150403134150015327 0ustar00' attribute added

Package Task Library Issues

* Version (or explicit :noversion) is required.
* +package_file+ attribute is now writable

FileList Issues

* Dropped bang version of exclude.  Now using ant-like include/exclude semantics.
* Enabled the "yield self" idiom in FileList#initialize.

=== 0.2.9

This version contains numerous changes as the RubyConf.new(2003)
presentation was being prepared.  The changes include:

* The monolithic rubyapp task library is in the process of being
  dropped in favor of lighter weight task libraries.

=== 0.2.7

* Added "desc" for task descriptions.
* -T will now display tasks with descriptions.
* -P will display tasks and prerequisites.
* Dropped the Sys module in favor of the 1.8.x FileUtils module.  Sys
  is still supported in the contrib area.

=== 0.2.6

* Moved to RubyForge

=== 0.2.5

* Switched to standard ruby app builder.
* Added no_match option to file matcher.

=== 0.2.4

* Fixed indir, which neglected to actually change directories.

=== 0.2.3

* Added rake module for a help target
* Added 'for\_files' to Sys
* Added a $rakefile constant
* Added test for selecting proper rule with multiple targets.
gems/gems/rake-13.0.6/doc/command_line_usage.rdoc000064400000013506150403134150015327 0ustar00= Rake Command Line Usage

Rake is invoked from the command line using:

    % rake [options ...]  [VAR=VALUE ...]  [targets ...]

Options are:

[<tt><em>name</em>=<em>value</em></tt>]
    Set the environment variable <em>name</em> to <em>value</em>
    during the execution of the <b>rake</b> command.  You can access
    the value by using ENV['<em>name</em>'].

[<tt>--all</tt> (-A)]
    Used in combination with the -T and -D options, will force
    those options to show all the tasks, even the ones without comments.

[<tt>--backtrace</tt>{=_output_} (-n)]
    Enable a full backtrace (i.e. like --trace, but without the task
    tracing details). The _output_ parameter is optional, but if
    specified it controls where the backtrace output is sent. If
    _output_ is <tt>stdout</tt>, then backtrace output is directed to
    standard output. If _output_ is <tt>stderr</tt>, or if it is
    missing, then the backtrace output is sent to standard error.

[<tt>--comments</tt>]
    Used in combination with the -W options to force the output to
    contain commented options only. This is the reverse of
    <tt>--all</tt>.

[<tt>--describe</tt> _pattern_ (-D)]
    Describe the tasks (matching optional PATTERN), then exit.

[<tt>--dry-run</tt> (-n)]
    Do a dry run.  Print the tasks invoked and executed, but do not
    actually execute any of the actions.

[<tt>--execute</tt> _code_ (-e)]
    Execute some Ruby code and exit.

[<tt>--execute-print</tt> _code_ (-p)]
    Execute some Ruby code, print the result, and exit.

[<tt>--execute-continue</tt> _code_ (-E)]
    Execute some Ruby code, then continue with normal task processing.

[<tt>--help</tt>  (-H)]
    Display some help text and exit.

[<tt>--jobs</tt> _number_  (-j)]

    Specifies the maximum number of concurrent threads allowed. Rake
    will allocate threads as needed up to this maximum number.

    If omitted, Rake will attempt to estimate the number of CPUs on
    the system and add 4 to that number.

    The concurrent threads are used to execute the <tt>multitask</tt>
    prerequisites. Also see the <tt>-m</tt> option which turns all
    tasks into multitasks.

    Sample values:
       (no -j)   : Allow up to (# of CPUs + 4) number of threads
       --jobs    : Allow unlimited number of threads
       --jobs=1  : Allow only one thread (the main thread)
       --jobs=16 : Allow up to 16 concurrent threads

[<tt>--job-stats</tt> _level_]

    Display job statistics at the completion of the run. By default,
    this will display the requested number of active threads (from the
    -j options) and the maximum number of threads in play at any given
    time.

    If the optional _level_ is <tt>history</tt>, then a complete trace
    of task history will be displayed on standard output.

[<tt>gems/gems/rdoc-6.5.1.1/lib/rdoc/markdown/literals.rb000064400000024367150403134140015657 0ustar00/tt> _name_ (-r)]
    Require _name_ before executing the Rakefile.

[<tt>--rules</tt>]
    Trace the rules resolution.

[<ttgems/gems/rake-13.0.6/doc/glossary.rdoc000064400000003364150403134150013362 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/alias.rb000064400000004175150403134140013302 0ustar00

[<tt>--verbose</tt> (-v)]
    Echo the Sys commands to standard output.

[<tt>--version</tt> (-V)]
    Display the program version and exit.

[<tt>--where</tt> <em>pattern</em> (-W)]
    Display tasks that match <em>pattern</em> and the file and line
    number where the task is defined. By default this option will
    display all tasks, not just the tasks that have descriptions.

[<tt>--no-deprecation-warnings</tt> (-X)]
    Do not display the deprecation warnings.

In addition, any command line option of the form
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
<tt>ENV</tt> and may be tested in the Rakefile.
gems/gems/rake-13.0.6/doc/glossary.rdoc000064400000003364150403134150013362 0gems/gems/rake-13.0.6/doc/jamis.rb000064400000026165150403134150012302 0ustar00 same
  name as the task).  When invoked, a file task will only execute if one or
  more of the following conditions are true.

  1. The associated file does not exist.
  2. A prerequisite has a later time stamp than the existing file.

  Because normal Tasks always have the current time as timestamp, a FileTask
  that has agems/gems/rdoc-6.5.1.1/lib/rdoc/meta_method.rb000064400000000201150403134140014461 0ustar00es, and a list of actions to be performed.
gems/gems/rdoc-6.5.1.1/lib/rdoc/normal_class.rb000064400000004206150403134140014661 0ustar00 color: #77F;
  text-decoration: underline;
}

body, td, p {
  font-family: %fonts%;
  background: #FFF;
  color: #000;
  margin: 0px;
  font-size: small;
}

#content {
  margin: 2em;
}

#description p {
  margin-bottom: 0.5em;
}

.sectiontitle {
  margin-top: 1em;
  margin-bottom: 1em;
  padding: 0.5em;
  padding-left: 2em;
  background: #005;
  color: #FFF;
  font-weight: bold;
  border: 1px dotted black;
}

.attr-rw {
  padding-left: 1em;
  padding-right: 1em;
  text-align: center;
  color: #055;
}

.attr-name {
  font-weight: bold;
}

.attr-desc {
}

.attr-value {
  font-family: monospace;
}

.file-title-prefix {
  font-size: large;
}

.file-title {
  font-size: large;
  font-weight: bold;
  background: #005;
  color: #FFF;
}

.banner {
  background: #005;
  color: #FFF;
  border: 1px solid black;
  padding: 1em;
}

.banner td {
  background: transparent;
  color: #FFF;
}

h1 a, h2 a, .sectiontitle a, .banner a {
  color: #FF0;
}

h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
  color: #FF7;
}

.dyn-source {
  display: none;
  background: #FFE;
  color: #000;
  border: 1px dotted black;
  margin: 0.5em 2em 0.5em 2em;
  padding: 0.5em;
}

.dyn-source .cmt {
  color: #00F;
  font-style: italic;
}

.dyn-source .kw {
  color: #070;
  font-weight: bold;
}

.method {
  margin-left: 1em;
  margin-right: 1em;
  margin-bottom: 1em;
}

.description pre {
  padding: 0.5em;
  border: 1px dotted black;
  background: #FFE;
}

.method .title {
  font-family: monospace;
  font-size: large;
  border-bottom: 1px dashed black;
  margin-bottom: 0.3em;
  padding-bottom: 0.1em;
}

.method .description, .method .sourcecode {
  margin-left: 1em;
}

.description p, .sourcecode p {
  margin-bottom: 0.5em;
}

.method .sourcecode p.source-link {
  text-indent: 0em;
  margin-top: 0.5em;
}

.method .aka {
  margin-top: 0.3em;
  margin-left: 1em;
  font-style: italic;
  text-indent: 2em;
}

h1 {
  padding: 1em;
  border: 1px solid black;
  font-size: x-large;
  font-weight: bold;
  color: #FFF;
  background: #007;
}

h2 {
  padding: 0.5em 1em 0.5em 1em;
  border: 1px solid black;
  font-size: large;
  font-weight: bold;
  color: #FFF;
  background: #009gems/gems/rdoc-6.5.1.1/lib/rdoc/rubygems_hook.rb000064400000012325150403134140015062 0ustar00t.getElementById( id )
            link = document.getElementById( "l_" + id )
          }
          else if ( document.all )
          {
            elem = eval( "document.all." + id )
            link = eval( "document.all.l_" + id )
          }
          else
            return false;

          if( elem.style.display == "block" )
          {
            elem.style.display = "none"
            link.innerHTML = "show source"
          }
          else
          {
            elem.style.display = "block"
            link.innerHTML = "hide source"
          }
        }

        function openCode( url )
        {
          window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
        }
      // ]]>
    </script>
  </head>

  <body>
ENDHEADER

FILE_PAGE = <<HTML
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
  <tr><td>
    <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
      <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />%short_name%</td>
      <td align="right">
        <table border='0' cellspacing="0" cellpadding="2">
          <tr>
            <td>Path:</td>
            <td>%full_path%
IF:cvsurl
              &nbsp;(<a href="%cvsurl%">CVS</a>)
ENDIF:cvsurl
            </td>
          </tr>
          <tr>
            <td>Modified:</td>
            <td>%dtm_modified%</td>
          </tr>
        </table>
      </td></tr>
    </table>
  </td></tr>
</table><br>
HTML

###################################################################

CLASS_PAGE = <<HTML
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
  <td class="file-title"><span class="file-title-prefix">%classmod%</span><br />%full_name%</td>
  <td align="righgems/gems/rdoc-6.5.1.1/lib/rdoc/alias.rb000064400000004175150403134140013302 0ustar00iv class="description">%description%</div>
ENDIF:description

IF:requires
  <div class="sectiontitle">Required Files</div>
  <ul>
START:requires
  <li>HREF:aref:name:</li>
END:requires
  </ul>
ENDIF:requires

IF:toc
  <div class="sectiontitle">Contents</div>
  <ul>
START:toc
  <li><a href="#%href%">%secname%</a></li>
END:toc
  </ul>
ENDIF:toc

IF:methods
  <div class="sectiontitle">Methods</div>
  <ul>
START:methods
  <li>HREF:aref:name:</li>
END:methods
  </ul>
ENDIF:methods

IF:includes
<div class="sectiontitle">Included Modules</div>
<ul>
START:includes
  <li>HREF:aref:name:</li>
END:includes
</ul>
ENDIF:includes

START:sections
IF:sectitle
<div class="sectiontitle"><a nem="%secsequence%">%sectitle%</a></div>
IF:seccomment
<div class="description">
%seccomment%
</div>
ENDIF:seccomment
ENDIF:sectitle

IF:classlist
  <div class="sectiontitle">Classes and Modules</div>
  %classlist%
ENDIF:classlist

IF:constants
  <div class="sectiontitle">Constants</div>
  <table border='0' cellpadding='5'>
START:constants
  <tr valign='top'>
    <td class="attr-name">%name%</td>
    <td>=</td>
    <td class="attr-value">%value%</td>
  </tr>
IF:desc
  <tr valign='top'>
    <td>&nbsp;</td>
    <td colspan="2" class="attr-desc">%desc%</td>
  </tr>
ENDIF:desc
END:constants
  </table>
ENDIF:constants

IF:attributes
  <div class="sectiontitle">Attributes</div>
  <table border='0' cellpadding='5'>
START:attributes
  <tr valign='top'>
    <td class='attr-rw'>
IF:rw
[%rw%]
ENDIF:rw
    </td>
    <td class='attr-name'>%name%</td>
    <td class='attr-desc'>%a_desc%</td>
  </tr>
END:attributes
  </table>
ENDIF:attributes

IF:method_list
START:method_list
IF:methods
<div class="sectiontitle">%type% %category% methods</div>
START:methods
<div class="method">
  <div class="title">
IF:callseq
    <a name="%aref%"></a><b>%callseq%</b>
ENDIF:callseq
IFNOT:callseq
    <a name="%aref%"></a><b>%name%</b>%params%
ENDIF:callseq
IF:codeurl
[ <a href="javascript:openCode('%codeurl%')">source</a> ]
ENDIF:codeurl
  </div>
IF:m_desc
  <div class="description">
  %m_desc%
  </div>
ENDIF:m_desc
IF:aka
<div class="aka">
  This method is also aliased as
START:aka
  <a href="%aref%"gems/gems/rdoc-6.5.1.1/lib/rdoc/meta_method.rb000064400000000201150403134140014461 0gems/gems/rdoc-6.5.1.1/lib/rdoc/rdoc.rb000064400000033272150403134140013140 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/normal_class.rb000064400000004206150403134140014661 0ustar00ustar00%</div>
<div class="entries">
START:entries
<a href="%href%">%namgems/gems/rake-13.0.6/doc/example/Rakefile1000064400000001236150403134150014023 0ustar00 non-frames
            version of this page.
          </body>
    </noframes>
</frameset>

</html>
HTML

end
end


gems/gems/rake-13.0.6/doc/example/b.c000064400000000101150403134150012650 0gems/gems/rdoc-6.5.1.1/lib/rdoc/rubygems_hook.rb000064400000012325150403134140015062 0ustar00gems/gems/rake-13.0.6/doc/example/Rakefile2000064400000001127150403134150014023 0ustar00n do
  rm_f FileList['*.o']
  Dir['*~'].each { |fn| rm_f fn }
end

task :clobber => [:clean] do
  rm_f "main"
end

task :run => ["main"] do
  sh "./main"
end
gems/gems/rake-13.0.6/doc/example/main.cgems/gems/rake-13.0.6/doc/example/a.c000064400000000101150403134150012647 0ustar00gems/gems/rake-13.0.6/doc/example/Rakefile2gems/gems/rake-13.0.6/doc/proto_rake.rdoc000064400000004716150403134150013666 0ustar00 :clobber => [:clean] do
  rm_f "main"
end

task :run => ["main"] do
  sh "./main"
end
gems/gems/rake-13.0.6/doc/example/a.c000064400000000101150403134150012647 0ustar00#include <stdio.h>

void a()
{
    printf ("In function a\n");
}
gems/gems/rake-13.0.6/doc/proto_rake.rdoc000064400000004716150403134150013666 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/rdoc.rb000064400000033272150403134140013140 0ustar00ustar00ize > 1
 	fail "No Task Name Given" if args.size < 1
 	task_name = args.keys[0]
 	deps = args[task_name]
       else
 	task_name = args
 	deps = []
       end
       deps = deps.collect {|d| intern(d) }
       get(task_name).enhance(deps, &block)
     end

     def get(task_name)
       name = intern(task_name)
       TASKS[name] ||= self.new(name)
     end

     def intern(task_name)
       (Symbol === task_name) ? task_name : task_name.intern
     end
   end
 end

 class FileTask < Task
   def needed?
     return true unless File.exist?(name)
     latest_prereq = @prerequisites.collect{|n| Task[n].timestamp}.max
     return false if latest_prereq.nil?
     timestamp < latest_prereq
   end

   def timestamp
     File.new(name.to_s).mtime
   end
 end

 def task(args, &block)
   Task.define_task(args, &block)
 end

 def file(args, &block)
   FileTask.define_task(args, &block)
 end

 def sys(cmd)
   puts cmd
   system(cmd) or fail "Command Failed: [#{cmd}]"
 end

 def rake
   begin
     here = Dir.pwd
     while ! File.exist?("Rakefile")
       Dir.chdir("..")
       fail "No Rakefile found" if Dir.pwd == here
       here = Dir.pwd
     end
     puts "(in #{Dir.pwd})"
     load "./Rakefile"
     ARGV.push("default") if ARGV.size == 0
     ARGV.each { |task_name| Task[task_name].invoke }
   rescue Exception => ex
     puts "rake aborted ... #{ex.message}"
     puts ex.backtrace.find {|str| str =~ /Rakefile/ } || ""
   end
 end

 if __FILE__ == $0 then
   rake
 end
gems/gems/rake-13.0.6/doc/rational.rdoc000064400000014110150403134150013317 0ustar00= Why rake?

Ok, let me state from the beginning that I never intended to write this
code.  I'm not convinced it is useful, and I'm not convinced anyone
would even be interested in it.  All I can say is that Why's onion truck
must by been passing through the Ohio valley.

What am I talking about? ... A Ruby version of Make.

See, I can sense you cringing already, and I agree.  The world certainly
doesn't need yet another reworking of the "make" program.  I mean, we
already have "ant".  Isn't that enough?

It started yesterday.  I was helping a coworker fix a problem in one of
the Makefiles we use in our project.  Not a particularly tough problem,
but during the course of the conversation I began lamenting some of the
shortcomings of make.  In particular, in one of my makefiles I wanted to
determine the name of a file dynamically and had to resort to some
simple scripting (in Ruby) to make it work.  "Wouldn't it be nice if you
could just use Ruby inside a Makefile" I said.

My coworker (a recent convert to Ruby) agreed, but wondered what it
would look like.  So I sketched the following on the whiteboard...

    "What if you could specify the make tasks in Ruby, like this ..."

      task "build" do
        java_compile(...args, etc ...)
      end

    "The task function would register "build" as a target to be made,
    and the block would be the action executed whenever the build
    system determined that it was time to do the build target."

We agreed that would be cool, but writing make from scratch would be WAY
too much work.  And that was the end of that!

... Except I couldn't get the thought out of my head.  What exactly
would be needed to make the about syntax work as a make file?  Hmmm, you
would need to register the tasks, you need some way of specifying
dependencies between tasks, and some way of kicking off the process.
Hey!  What if we did ... and fifteen minutes later I had a gems/gems/rdoc-6.5.1.1/lib/rdoc/cross_reference.rb000064400000016113150403134140015353 0ustar00st night (during CSI!) I massaged the
code and cleaned it up a bit.  The result is a bare-bones replacement
for make in exactly 100 lines of code.

For the curious, you can see it at ...
* doc/proto_rake.rdoc

Oh, about the name.  When I wrote the example Ruby Make task on my
whiteboard, my coworker exclaimed "Oh! I have the perfect name: Rake ...
Get it?  Ruby-Make. Rake!"  He said he envisioned the tasks as leaves
and Rake would clean them up  ... or something like that.  Anyways, the
name stuck.

Some quick examples ...

A simple task to delete backup files ...

   task :clean do
     Dir['*~'].each {|fn| rm fn rescue nil}
   end

Note that task names are symbols (they are slightly easier to type
than quoted strings ... but you may use quoted string if you would
rather). Rake makes the methods of the FileUtils module directly
available, so we take advantage of the <tt>rm</tt> command.  Also note
the use of "rescue nil" to trap and ignore errors in the <tt>rm</tt>
command.

To run it, just type "rake clean".  Rake will automatically find a
Rakefile in the current directory (or above!) and will invoke the
targets named on the command line.  If there are no targets explicitly
named, rake will invoke the task "default".

Here's another task with dependencies ...

   task :clobber => [:clean] do
     rm_r "tempdir"
   end

Task :clobber depends upon task :clean, so :clean will be run begems/gems/rake-13.0.6/doc/rakefile.rdoc000064400000050342150403134150013277 0ustar00     c_source_file(fn)
   end

where "c_source_file" will create all the tasks need to compile all the
C source files in a directory.  Any number of useful libraries could be
created for rake.

That's it.  There's no documentation (other than whats in this
message).  Does this sound interesting to anyone?  If so, I'll continue
to clean it up and write it up and publish it on RAA.  Otherwise, I'll
leave it as an interesting exercise and a tribute to the power of Ruby.

Why /might/ rake be interesting to Ruby programmers.  I don't know,
perhaps ...

* No weird make syntax (only weird Ruby syntax :-)
* No need to edit or read XML (a la ant)
* Platform independent build scripts.
* Will run anywhere Ruby exists, so no need to have "make" installed.
  If you stay away from the "sys" command and use things like
  'ftools', you can have a perfectly platform independent
  build script.  Also rake is only 100 lines of code, so it can
  easily be packaged along with the rest of your code.

So ... Sorry for the long rambling message.  Like I said, I never
intended to write this code at all.
gems/gems/rake-13.0.6/doc/rakefile.rdoc000064400000050342150403134150013277 0ustar00= Rakefile Format

First of all, there is no special format for a Rakefile.  A Rakefile
contains executable Ruby code.  Anything legal in a ruby script is
allowed in a Rakefile.

Now that we understand there is no special syntax in a Rakefile, there
are some conventions that are used in a Rakefile that are a little
unusual in a typical Ruby program.  Since a Rakefile is tailored to
specifying tasks and actions, the idioms used in a Rakefile are
designed to support that.

So, what goes into a Rakefile?

== Tasks

Tasks are the main unit of work in a Rakefile.  Tasks have a name
(usually given as a symbol or a string), a list of prerequisites (more
symbols or strings) and a list of actions (given as a block).

=== Simple Tasks

A task is declared by using the +task+ method.  +task+ takes a single
parameter that is the name of the task.

  task :name

=== Tasks with Prerequisites

Any prerequisites are given as a list (enclosed in square brackets)
following the name and an arrow (=>).

  task name: [:prereq1, :prereq2]

*NOTE:* Although this syntax looks a little funky, it is legal
Ruby.  We are constructing a hash where the key is :name and the value
for that key is the list of prerequisites.  It is equivalent to the
following ...

  hash = Hash.new
  hash[:name] = [:prereq1, :prereq2]
  task(hash)

You can also use strings for task names and prerequisites, rake doesn't care.
This is the same task definition:

  task 'name' => %w[prereq1 prereq2]

As is this:

  task name: %w[prereq1 prereq2]

We'll prefer this style for regular tasks with prerequisites throughout the
rest of the document.  Using an array of strings for the prerequisites means
you will need to make fewer changes if you need to move tasks into namespaces
or perform other refactorings.

=== Tasks with Actions

Actions are defined by passing a block to the +task+ method.  Any Ruby
code can be placed in the block.  The block may reference the task
object via the block parameter.

  task name: [:prereq1, :prereq2] do |t|
    # actions (may reference t)
  end

=== Multiple Definitions

A task may be specified more than once.  Each specification adds its
prerequisites and actions to the existing definition.  This allows one
part of a rakefile to specify the actions and a different rakefile
(perhaps separately generated) to specify the dependencies.

For example, the following is equivalent to the single task
specification given above.

  task :name
  task name: :prereq1
  task name: %w[prereq2]
  task :name do |t|
    # actions
  end

== File Tasks

Some tasks are designed to create a file from one or more other files.
Tasks that generate these files may be skipped if the file already
exists.  File tasks are used to specify file creation tasks.

File tasks are declared using the +file+ method (instead of the +task+
method).  Ingems/gems/rdoc-6.5.1.1/lib/rdoc/normal_module.rb000064400000002672150403134140015046 0ustar00mple ...

  directory "testdata"
  file "testdata" => ["otherdata"]
  file "testdata" do
    cp Dir["standard_data/*.data"], "testdata"
  end

== Tasks with Parallel Prerequisites

Rake allows parallel execution of prerequisites using the following syntax:

  multitask copy_files: %w[copy_src copy_doc copy_bin] do
    puts "All Copies Complete"
  end

In this example, +copy_files+ is a normal rake task.  Its actions are
executed whenever all of its prerequisites are done.  The big
difference is that the prerequisites (+copy_src+, +copy_bin+ and
+copy_doc+) are executed in parallel.  Each of the prerequisites are
run in their own Ruby thread, possibly allowing faster overall runtime.

=== Sgems/gems/rdoc-6.5.1.1/lib/rdoc/cross_reference.rb000064400000016113150403134140015353 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/encoding.rb000064400000007376150403134140014005 0ustar00d line.  The problem is that there was no
easy way to associate positional arguments on the command line with
different tasks.  Suppose both tasks :a and :b expect a command line
argument: does the first value go with :a?  What if :b is run first?
Should it then get the first command line argument.

Rake 0.8.0 solves this problem by explicitly passing values directly
to the tasks that need them.  For example, if I had a release task
that required a version number, I could say:

   rake release[0.8.2]

And the string "0.8.2" will be passed to the :release task.  Multiple
arguments can be passed by separating them with a comma, for example:

   rake name[john,doe]

Just a few words of caution.  The rake task name and its arguments
need to be a single command line argument to rake.  This generally
means no spaces.  If spaces are needed, then the entire name +
argument string should be quoted.  Something like this:

   rake "name[billy bob, smith]"

(Quoting rules vary between operating systems and shells, so make sure
you consult the proper docs for your OS/shell).

=== Tasks that Expect Parameters

Parameters are only given to tasks that are setup to expect them.  In
order to handle named parameters, the task declaration syntax for
tasks has been extended slightly.

For example, a task that needs a first name and last name might be
declared as:

   task :name, [:first_name, :last_name]

The first argument is still the name of the task (:name in this case).
The next two arguments are the names of the parameters expected by
:name in an array (:first_name and :last_name in the example).

To access the values of the parameters, the block defining the task
behaviour can now accept a second parameter:

   task :name, [:first_name, :last_name] do |t, args|
     puts "First name is #{args.first_name}"
     puts "Last  name is #{args.last_name}"
   end

The first argument of the block "t" is always bound to the current
task object.  The second argument "args" is an open-struct like object
that allows access to the task arguments.  Extra command line
arguments to a task are ignored.

If you wish to specify default values for the arguments, you can use
the with_defaults method in the task body.  Here is the above example
where we specify default values for the first and last names:

   task :name, [:first_name, :last_name] do |t, args|
     args.with_defaults(:first_name => "John", :last_name => "Dough")
     puts "First name is #{args.first_name}"
     puts "Last  name is #{args.last_name}"
   end

=== Tasks that Expect Parameters and Have Prerequisites

Tasks that use parameters have a slightly different format for
prerequisites.  Use the arrow notation to indicate the prerequisites
for tasks with arguments.  For example:

   task :name, [:first_name, :last_name] => [:pre_name] do |t, args|
     args.with_defaults(:first_name => "John", :last_name => "Dough")
     puts "First name is #{args.first_name}"
     puts "Last  name is #{args.last_name}"
   end

=== Tasks that take Variable-length Parameters

Tasks that need to handle a list of values as a parameter can use the
extras method of the args variable.  This allows for tasks that can
loop over a variable number of values, and its compatible with named
parameters as well:

   task :email, [:message] do |t, args|
     mail = Mail.new(args.message)
     recipients = args.extras
     recipients.each do |target|
       mail.send_to(target)
     end
   end

There is also the convenience method to_a that returns all parameters
in the sequential order they were given, including those associated
with named parameters.

=== Deprecated Task Parameters Format

There is an older format for declaring task parameters that omitted
the task argument array and used the :needs keyword to introduce the
dependencies.  That format is still supportgems/gems/rdoc-6.5.1.1/lib/rdoc/constant.rb000064400000007135150403134140014041 0ustar00ammatically manipulate tasks gives rake very
powerful meta-programming capabilities w.r.t. task execution, but
should be used with caution.

== Rules

When a file is named as a prerequisite, but does not have a file task
defined for it, Rake will attempt to synthesize a task by looking at a
list of rules supplied in the Rakefile.

Suppose we were trying to invoke task "mycode.o", but no task is
defined for it.  But the rakefile has a rule that look like this ...

  rule '.o' => ['.c'] do |t|
    sh "cc #{t.source} -c -o #{t.name}"
  end

This rule will synthesize any task that ends in ".o".  It has a
prerequisite a source file with an extension of ".c" must exist.  If
Rake is able to find a file named "mycode.c", it will automatically
create a task that builds "mycode.o" from "mycode.c".

If the file "mycode.c" does not exist, rake will attempt
to recursively synthesize a rule for it.

When a task is synthesized from a rule, the +source+ attribute of the
task is set to the matching source file.  This allows us to write
rules with actions that reference the source file.

=== Advanced Rules

Any regular expression may be used as the rule pattern.  Additionally,
a proc may be used to calculate the name of the source file.  This
allows for complex patterns and sources.

The following rule is equivalent to the example above.

  rule( /\.o$/ => [
    proc {|task_name| task_name.sub(/\.[^.]+$/, '.c') }
  ]) do |t|
    sh "cc #{t.source} -c -o #{t.name}"
  end

*NOTE:* Because of a _quirk_ in Ruby syntax, parenthesis are
required on *rule* when the first argument is a regular expression.

The following rule might be used for Java files ...

  rule '.class' => [
    proc { |tn| tn.sub(/\.class$/, '.java').sub(/^classes\//, 'src/') }
  ] do |t|
    java_compile(t.source, t.name)
  end

*NOTE:* +java_compile+ is a hypothetical method that invokes the
java compiler.

== Importing Dependencies

Any ruby file (including other rakefiles) can be included with a
standard Ruby +require+ command.  The rules and declarations in the
required file are just added to the definitions already accumulated.

Becaugems/gems/rdoc-6.5.1.1/lib/rdoc/normal_module.rb000064400000002672150403134140015046 0ustar00makedepend+ before
loading.

== Comments

Standard Ruby comments (beginning with "#") can be used anywhere it is
legal in Ruby source code, including comments for tasks and rules.
However, if you wish a task to be described using the "-T" switch,
then you need to use the +desc+ command to describe the task.

Example:

  desc "Create a distribution package"
  task package: %w[ ... ] do ... end

The "-T" switch (or "--tasks" if you like to spell things out) will
display a list of tasks that have a description.  If you use +desc+ to
describe your major tasks, you have a semi-automatic way of generatingems/gems/rdoc-6.5.1.1/lib/rdoc/erb_partial.rb000064400000000621150403134140014465 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/encoding.rb000064400000007376150403134140014005 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/attr.rb000064400000007411150403134140013157 0ustar00l file in the file system,
it makes little sense to include file task names in name space.
Directory tasks (created by the +directory+ command) are a type of
file task and are also not affected by namespaces.

=== Name Resolution

When looking up a task name, rake will start with the current
namespace and attempt to find the name there.  If it fails to find a
name in the current namespace, it will search the parent namespaces
until a match is found (or an error occurs if there is no match).

The "rake" namespace is a special implicit namespace that refers to
the toplevel names.

If a task name begins with a "^" character, the name resolution will
start in the parent namespace.  Multiple "^" characters are allowed.

Here is an example file with multiple :run tasks and how various names
resolve in different locations.

  task :run

  namespace "one" do
    task :run

    namespace "two" do
      task :run

      # :run            => "one:two:run"
      # "two:run"       => "one:two:run"
      # "one:two:run"   => "one:two:run"
      # "one:run"       => "one:run"
      # "^run"          => "one:run"
      # "^^run"         => "rake:run" (the top level task)
      # "rake:run"      => "rake:run" (the top level task)
    end

    # :run       => "one:run"
    # "two:run"  => "one:two:run"
    # "^run"     => "rake:run"
  end

  # :run           => "rake:run"
  # "one:run"      => "one:run"
  # "one:two:run"  => "one:two:run"

== FileLists

FileLists are the way Rake manages lists of files.  You can treat a
FileList as an array of strings for the most part, but FileLists
support some additional operations.

=== Creating a FileList

Creating a file list is easy.  Just give it the list of file names:

   fl = FileList['file1.rb', file2.rb']

Or give it a glob pattern:

   fl = FileList['*.rb']

== Odds and Ends

=== do/end versus { }

Blocks may be specified with either a +do+/+end+ pair, or with curly
braces in Ruby.  We _strongly_ recommend using +do+/+end+ to specify the
actions for tasks and rules.  Because the rakefile idiom tends to
leave off parentheses on the task/file/rule methods, unusual
ambiguities can arise when using curly braces.

For example, suppose that the method +object_files+ returns a list of
object files in a project.  Now we use +object_files+ as the
prerequisites in a rule specified with actions in curly braces.

  # DON'T DO THIS!
  file "prog" => object_files {
    # Actions are expected here (but it doesn't work)!
  }

Because curly braces have a higher precedence than +do+/+end+, the
block is associated with the +objegems/gems/rake-13.0.6/README.rdoc000064400000011535150403134150011706 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/constant.rb000064400000007135150403134140014041 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/rd.rb000064400000000666150403134140014113 0ustar00 documentation for Rake.
gems/gems/rake-13.0.6/README.rdoc0000644000gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/c.rb000064400000105715150403134140013731 0ustar00y. Tasks and dependencies are
specified in standard Ruby syntax.

Rake has the following features:

* Rakefiles (rake's version of Makefiles) are completely defined in
  standard Ruby syntax.  No XML files to edit.  No quirky Makefile
  syntax to worry about (is that a tab or a space?)

* Users can specify tasks with prerequisites.

* Rake supports rule patterns to synthesize implicit tasks.

* Flexible FileLists that act like arrays but know about manipulating
  file names and paths.

* A library of prepackaged tasks to make building rakefiles easier. For example,
  tasks for building tarballs. (Formerly
  tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now
  available in RDoc, RubyGems, and rake-contrib respectively.)

* Supports parallel execution of tasks.

== Installation

=== Gem Installation

Download and install rake with the following.

  gem install rake

== Usage

=== Simple Example

First, you must write a "Rakefile" file which contains the build rules. Here's
a simple example:

  task default: %w[test]

  task :test do
    ruby "test/unittest.rb"
  end

This Rakefile has two tasks:

* A task named "test", which -- upon invocation -- will run a unit test file
  in Ruby.
* A task named "default". This task does nothing by itself, but it has exactly
  one dependency, namely the "test" task. Invoking the "default" task will
  cause Rake to invoke the "test" task as well.

Running the "rake" command without any options will cause it to run the
"default" task in the Rakefile:

  % ls
  Rakefile     test/
  % rake
  (in /home/some_user/Projects/rake)
  ruby test/unittest.rb
  ....unit test output here...

Type "rake --help" for all available options.

== Resources

=== Rake Information

* {Rake command-line}[link:doc/command_line_usage.rdoc]
* {Writing Rakefiles}[link:doc/rakefile.rdoc]
* The original {Rake announcement}[link:doc/rational.rdoc]
* Rake {glossary}[link:doc/glossary.rdoc]

=== Presentations and Articles about Rake

* Avdi Grimm's rake series:
  1. {Rake Basics}[https://avdi.codes/rake-part-1-basics/]
  2. {Rake File Lists}[https://avdi.codes/rakegems/gems/rdoc-6.5.1.1/lib/rdoc/erb_partial.rb000064400000000621150403134140014465 0ustar00ustar00i Nakada <nobu@ruby-lang.org></b>] For the initial patch for rule support.

[<b>Tilman Saugems/gems/rdoc-6.5.1.1/lib/rdoc/attr.rb000064400000007411150403134140013157 0ustar00 limitation, the implied warranties of
merchantability and fitness for a particular purpose.

== Historical

Rake was originally created by Jim Weirich, who unfortunately passed away in
February 2014. This repository was originally hosted at
{github.com/jimweirich/rake}[https://github.com/jimweirich/rake/], however
with his passing, hasgems/gems/rake-13.0.6/lib/rake.rb000064400000004162150403134150012113 0ustar00Copyright (c) Jim Weirich

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:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

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.

gems/gems/rake-13.0.6/lib/rake.rb000064400000004162150403134150012113 0ustar00# frozen_string_literal: true
#--
# Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com)
#
# Permission is hgems/gems/rdoc-6.5.1.1/lib/rdoc/parser/rd.rb000064400000000666150403134140014113 0ustar00 "fileutils"
require "singleton"
require "monitor"
require "optparse"
require "ostruct"

require "rake/ext/string"

require "rake/win32"

require "rake/linked_list"
require "rake/cpu_counter"
require "rake/scope"
require "rake/task_argument_error"
require "rake/rule_recursion_overflow_error"
require "rake/rake_module"
require "rake/trace_output"
require "rake/pseudo_status"
require "rake/task_arguments"
require "rake/invocation_chain"gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/c.rb000064400000105715150403134140013731 0ustar00gems/gems/rake-13.0.6/lib/rake/promise.rb000064400000004437150403134150013576 0ustar00# frozen_string_literal: true
module Rake

  # A Promise object represents a promise to do work (a chore) in the
  # future. The promise is created with a block and a list of
  # arguments for the block. Calling value will return the value of
  # the promised chore.
  #
  # Used by Thregems/gems/rake-13.0.6/lib/rake/version.rb000064400000000320150403134150013570 0ustar00    end
      error? ? raise(@error) : @result
    end

    # If no one else is working this promise, go ahead and do the chore.
    def work
      stat :attempting_lock_on, item_id: object_id
      if @mutexgems/gems/rake-13.0.6/lib/rake/private_reader.rb000064400000000612150403134150015103 0ustar00   def complete?
      result? || error?
    end

    # free up these items for the GC
    def discard
      @args = nil
      @block = nil
    end

    # Record execution statistics if there is a recorder
    def stat(*args)
      @recorder.call(*args) if @recorder
    end

  end

end
gems/gems/rake-13.0.6/lib/rake/invocation_exception_mixin.rb000064400000000715150403134150017546 0ustar00# frozen_string_literal: true
module Rake
  VERSION = "13.0.6"

  module Version # :nodoc: all
    MAJOR, MINOR, BUILD, *OTHER = Rake::VERSION.split "."

    NUMBERS = [MAJOR, MINOR, BUILD, *OTHER]
  end
end
gems/gems/rake-13.0.6/lib/rake/dsl_definition.rb000064400000012755150403134150015114 0ustar00# frozen_string_literal: true
module Rake

  # Include PrivateReader to use +private_reader+.
  module PrivateReader           # :nodoc: all

    def self.included(base)
      base.extend(ClassMethods)
    end

    module ClassMethods

      # Declare a list of private accessors
      def private_reader(*names)
        attr_reader(*names)
        private(*names)
      end
    end

  end
end
gems/gems/rake-13.0.6/lib/rake/invocation_exception_mixin.rb000064400000000715150403134150017546 0ustar00# frozen_string_literal: true
module Rake
  module InvocationExceptionMixin
    # Return the invocation chain (list of Rake tasks) that were in
    # effect when this exception was detected by rake.  May be null if
    # no tasks were active.
    def chain
      @rake_invocation_chain ||= nil
    end

    # Set the invocation chain in effect when this exception was
    # detected.
    def chain=(value)
      @rake_invocation_chain = value
    end
  end
end
gems/gems/rake-13.0.6/lib/rake/dsl_definition.rb000064400000012755150403134150015114 0ustar00# frozen_string_literal: true
# Rake DSL functions.
require "rake/file_utils_ext"

module Rake

  ##
  # DSL is a module that provides #task, #desc, #namespace, etc.  Use this
  # when you'd like to use rake outside the top level scope.
  #
  # For a Rakefile you run from the command line this module is automatically
  # included.

  module DSL

    #--
    # Include the FileUtils file manipulation functions in the top
    # level module, but mark them private so that they don't
    # unintentionally define methods on other objects.
    #++

    include FileUtilsExt
    private(*FileUtils.instance_methods(false))
    private(*FileUtilsExt.instance_methods(false))

    private

    # :call-seq:
    #   task(task_name)
    #   task(task_name: dependencies)
    #   task(task_name, arguments => dependencies)
    #
    # Declare a basic task.  The +task_name+ is always the first argument.  If
    # the task name contains a ":" it is defined in that namespace.
    #
    # The +dependencies+ may be a single task name or an Array of task names.
    # The +argument+ (a single name) or +arguments+ (an Array of names) define
    # the arguments provided to the task.
    #
    # The task, argument and dependency names may be either symbols or
    # strings.
    #
    # A task with a single dependency:
    #
    #   task clobber: %w[clean] do
    #     rm_rf "html"
    #   end
    #
    # A task with an argument and a dependency:
    #
    #   task :package, [:version] => :test do |t, args|
    #     # ...
    #   end
    #
    # To invoke this task from the command line:
    #
    #   $ rake package[1.2.3]
    #
    def task(*args, &block) # :doc:
      Rake::Task.define_task(*args, &block)
    end

    # Declare a file task.
    #
    # Example:
    #   file "config.cfg" => ["config.template"] do
    #     open("config.cfg", "w") do |outfile|
    #       open("config.template") do |infile|
    #         while line = infile.gets
    #           outfile.puts line
    #         end
    #       end
    #     end
    #  end
    #
    def file(*args, &block) # :doc:
      Rake::FileTask.define_task(*args, &block)
    end

    # Declare a file creation task.
    # (Mainly used for the directory command).
    def file_create(*args, &block)
      Rake::FileCreationTask.define_task(*args, &block)
    end

    # Declare a set of files tasks to create the given directories on
    # demand.
    #
    # Example:
    #   directory "testdata/doc"
    #
    def directory(*args, &block) # :doc:
      result = file_create(*args, &block)
      dir, _ = *Rake.application.resolve_args(args)
      dir = Rake.from_pathname(dir)
      Rake.each_dir_parent(dir) do |d|
        file_create d do |t|
          mkdir_p t.name unless File.exist?(t.name)
        end
      end
      result
    end

    # Declare a task that performs its prerequisites in
    # parallel. Multitasks does *not* guarantee that its prerequisites
    # will execute in any given order (which is obvious when you think
    # about it)
    #
    # Example:
    #   multitask deploy: %w[deploy_gem deploy_rdoc]
    #
    def multitask(*args, &block) # :doc:
      Rake::MultiTask.define_task(*args, &block)
    end

    # Create a new rake namespace and use it for evaluating the given
    # block.  Returns a NameSpace object that can be used to lookup
    # tasks defined in the namespace.
    #
    # Example:
    #
    #   ns = namespace "nested" do
    #     # the "nested:run" task
    #     task :run
    #   end
    #   task_run = ns[:run] # find :run in the given namespace.gems/gems/rake-13.0.6/lib/rake/rake_module.rb000064400000002770150403134150014405 0ustar00auto-tasks.
    #
    # Example:
    #  rule '.o' => '.c' do |t|
    #    sh 'cc', '-o', t.name, t.source
    #  end
    #
    def rule(*args, &block) # :doc:
      Rake::Task.create_rule(*args, &block)
    end

    # Describes the next rake task.  Duplicate descriptions are discarded.
    # Descriptions are shown with <code>rake -T</code> (up to the first
    # sentence) and <code>rake -D</code> (the entire description).
    #
    # Example:
    #   desc "Run the Unit Tests"
    #   task test: [:build]
    #     # ... run tests
    #   end
    #
    def desc(description) # :doc:
      Rake.application.last_description = description
    end

    # Import the partial Rakefiles +fn+.  Imported files are loaded
    # _after_ the current file is completely loaded.  This allows the
    # import statement to appear anywhere in the importing file, and yet
    # allowing the imported files to depend on objects defined in the
    # importing file.
    #
    # A common use of the import statement is to include files
    # containing dependency declarations.
    #
    # See also the --rakelibdir command line option.
    #
    # Example:
    #   import ".depend", "my_rules"
    #
    def import(*fns) # :doc:
      fns.each do |fn|
        Rake.application.add_import(fn)
      end
    end
  end
  extend FileUtilsExt
end

# Extend the main object with the DSL commands. This allows top-level
# calls to task, etc. to work from a Rakefile without polluting the
# object inheritance tree.
self.extend Rake::DSL
gems/gems/rake-13.0.6/lib/rake/tasklib.rb000064400000000245150403134150013542 0ustar00# frozen_string_literal: true
require "rake/application"

module Rake

  class << self
    # Current Rake Application
    def application
      @application ||= Rakegems/gems/rake-13.0.6/lib/rake/packagetask.rb000064400000014021150403134150014364 0ustar00 rake in a sub-shell.
    #
    # Example:
    #
    #   Dir.chdir 'other/directory'
    #
    #   other_rake = Rake.with_application do |rake|
    #     rake.load_rakefile
    #   end
    #
    #   puts other_rake.tasks

    def with_application(block_application = Rake::Application.new)
      orig_application = Rake.application

      Rake.application = block_application

      yield block_application

      block_application
    ensure
      Rake.application = orig_application
    end
  end

end
gems/gems/rake-13.0.6/lib/rake/tasklib.rb000064400000000245150403134150013542 0ustar00# frozen_string_literal: true
require "rake"

module Rake

  # Base class for Task Libraries.
  class TaskLib
    include Cloneable
    include Rake::DSL
  end

end
gems/gems/rake-13.0.6/lib/rake/packagetask.rb000064400000014021150403134150014364 0ustar00# frozen_string_literal: true
# Define a package task library to aid in the definition of
# redistributable package files.

require "rake"
require "rake/tasklib"

module Rake

  # Create a packaging task that will package the project into
  # distributable files (e.g zip archive or tar files).
  #
  # The PackageTask will create the following targets:
  #
  # +:package+ ::
  #   Create all the requested package files.
  #
  # +:clobber_package+ ::
  #   Delete all the package files.  This target is automatically
  #   added to the main clobber target.
  #
  # +:repackage+ ::
  #   Rebuild the package files from scratch, even if they are not out
  #   of date.
  #
  # <tt>"<em>package_dir</em>/<em>name</em>-<em>version</em>.tgz"</tt> ::
  #   Create a gzipped tar package (if <em>need_tar</em> is true).
  #
  # <tt>"<em>package_dir</em>/<em>name</em>-<em>version</em>.tar.gz"</tt> ::
  #   Create a gzipped tar package (if <em>need_tar_gz</em> is true).
  #
  # <tt>"<em>package_dir</em>/<em>name</em>-<em>version</em>.tar.bz2"</tt> ::
  #   Create a bzip2'd tar package (if <em>need_tar_bz2</em> is true).
  #
  # <tt>"<em>package_dir</em>/<em>name</em>-<em>version</em>.zip"</tt> ::
  #   Create a zip package archive (if <em>need_zip</em> is true).
  #
  # Example:
  #
  #   Rake::PackageTask.new("rake", "1.2.3") do |p|
  #     p.need_tar = true
  #     p.package_files.include("lib/**/*.rb")
  #   end
  #
  class PackageTask < TaskLib
    # Name of the package (from the GEM Spec).
    attr_accessor :name

    # Version of the package (e.g. '1.3.2').
    attr_accessor :version

    # Directory used to store the package files (default is 'pkg').
    attr_accessor :package_dir

    # True if a gzipped tar file (tgz) should be produced (default is
    # false).
    attr_accessor :need_tar

    # True if a gzipped tar file (tar.gz) should be produced (default
    # is false).
    attr_accessor :need_tar_gz

    # True if a bzip2'd tar file (tar.bz2) should be produced (default
    # is false).
    attr_accessor :need_tar_bz2

    # True if a xz'd tar file (tar.xz) should be produced (default is false)
    attr_accessor :need_tar_xz

    # True if a zip file should be produced (default is false)
    attr_accessor :need_zip

    # List of files to be included in the package.
    attr_accessor :package_files

    # Tar command for gzipped or bzip2ed archives.  The default is 'tar'.
    attr_accessor :tar_command

    # Zip command for zipped archives.  The default is 'zip'.
    attr_accessor :zip_command

    # True if parent directory should be omited (default is false)
    attr_accessor :without_parent_dir

    # Create a Package Task with the given name and version.  Use +:noversion+
    # as the version to build a package without a version or to provide a
    # fully-versioned package name.

    def initialize(name=nil, version=nil)
      init(name, version)
      yield self if block_given?
      define unless name.nil?
    end

    # Initialization that bypasses the "yield self" and "define" step.
    def init(name, version)
      @name = name
      @version = version
      @package_files = Rake::FileList.new
      @package_dir = "pkg"
      @need_tar = false
      @need_tar_gz = false
      @need_tar_bz2 = false
      @need_tar_xz = false
      @need_zip = false
      @tar_command = "tar"
      @zip_command = "zip"
      @without_parent_dir = false
    end

    # Create the tasks defined by this task library.
    def define
      fail "Version required (or :noversion)" if @version.nil?
      @version = nil if :noversion == @version

      desc "Build all the packages"
      task :package

      desc "Force a rebuild of the package files"
      task repackage: [:clobber_package, :package]

      desc "Remove package products"
      task :clobber_package do
        rm_r package_dir rescue nil
      end

      task clobber: [:clobber_package]

      [
        [need_tar, tgz_file, "z"],
        [need_tar_gz, tar_gz_file, "z"],
        [need_tar_bz2, tar_bz2_file, "j"],
        [need_tar_xz, tar_xz_file, "J"]
      ].each do |need, file, flag|
       gems/gems/rake-13.0.6/lib/rake/file_creation_task.rb000064400000001273150403134150015740 0ustar00m_f f
            safe_ln(fn, f)
          end
        end
      end
      self
    end

    # The name of this package

    def package_name
      @version ? "#{@name}-#{@version}" : @name
    end

    # The directory this package will be built in

    def package_dir_path
      "#{package_dir}/#{package_name}"
    end

    # The package name with .tgz added

    def tgz_file
      "#{package_name}.tgz"
    end

    # The package name with .tar.gz added

    def tar_gz_file
      "#{package_name}.tar.gz"
    end

    # The package name with .tar.bz2 added

    def tar_bz2_file
      "#{package_name}.tar.bz2"
    end

    # The package name with .tar.xz added

    def tar_xz_file
      "#{pgems/gems/rake-13.0.6/lib/rake/invocation_chain.rb000064400000002276150403134150015432 0ustar00gems/gems/rake-13.0.6/lib/rake/file_creation_task.rb000064400000001273150403134150015740 0ustar00# frozen_string_literal: true
require "rake/file_task"
require "rake/early_time"

module Rake

  # A FileCreationTask is a file task that when used as a dependency will be
  # needed if and only if the file has not been created.  Once created, it is
  # not re-triggered if any of its dependencies are newer, nor does trigger
  # any rebuilds of tasks that depend on it whenever it is updated.
  #
  class FileCreationTask < FileTask
    # Is this file task needed?  Yes if it doesn't exist.
    def needed?
      !File.exist?(name)
    end

    # Time stamp for file creation task.  This time stamp is earlier
    # than any other time stamp.
    def timestamp
      Rake::EARLY
    end
  end

end
gems/gems/rake-13.0.6/lib/rake/application.rb000064400000061375150403134150014427 0ustar00# frozen_string_literal: true
module Rake

  # InvocationChain tracks the chain of task invocations to detect
  # circular dependencies.
  class InvocationChain < LinkedList

    # Is the invocation already in the chain?
    def member?(invocation)
      head == invocation || tail.member?(invocation)
    end

    # Append an invocation to the chain of invocations. It is an error
    # if the invocation already listed.
    def append(invocation)
      if member?(invocation)
        fail RuntimeError, "Circular dependency detected: #{to_s} => #{invocation}"
      end
      conj(invocation)
    end

    # Convert to string, ie: TOP => invocation => invocation
    def to_s
      "#{prefix}#{head}"
    end

    # Class level append.
    def self.append(invocation, chain)
      chain.append(invocation)
    end

    private

    def prefix
      "#{tail} => "
    end

    # Null object for an empty chain.
    class EmptyInvocationChain < LinkedList::EmptyLinkedList
      @parent = InvocationChain

      def member?(obj)
        false
      end

      def append(invocation)
        conj(invocation)
      end

      def to_s
        "TOP"
      end
    end

    EMPgems/gems/rdoc-6.5.1.1/lib/rdoc/parser/text.rb000064400000000463150403134140014465 0ustar00ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ripper_state_lex.rb000064400000037321150403134140017055 0ustar00e

    # Number of columns on the terminal
    attr_accessor :terminal_columns

    # List of the top level task names (task names from the command line).
    attr_reader :top_level_tasks

    # Override the detected TTY output state (mostly for testing)
    attr_writer :tty_output

    DEFAULT_RAKEFILES = [
      "rakefile",
      "Rakefile",
      "rakefile.rb",
      "Rakefile.rb"
    ].freeze

    # Initialize a Rake::Application object.
    def initialize
      super
      @name = "rake"
      @rakefiles = DEFAULT_RAKEFILES.dup
      @rakefile = nil
      @pending_imports = []
      @imported = []
      @loaders = {}
      @default_loader = Rake::DefaultLoader.new
      @original_dir = Dir.pwd
      @top_level_tasks = []
      add_loader("rb", DefaultLoader.new)
      add_loader("rf", DefaultLoader.new)
      add_loader("rake", DefaultLoader.new)
      @tty_output = STDOUT.tty?
      @terminal_columns = ENV["RAKE_COLUMNS"].to_i

      set_default_options
    end

    # Run the Rake application.  The run method performs the following
    # three steps:
    #
    # * Initialize the command line options (+init+).
    # * Define the tasks (+load_rakefile+).
    # * Run the top level tasks (+top_level+).
    #
    # If you wish to build a custom rake command, you should call
    # +init+ on your application.  Then define any tasks.  Finally,
    # call +top_level+ to run your top level tasks.
    def run(argv = ARGV)
      standard_exception_handling do
        init "rake", argv
        load_rakefile
        top_level
      end
    end

    # Initialize the command line parameters and app name.
    def init(app_name="rake", argv = ARGV)
      standard_exception_handling do
        @name = app_name
        begin
          args = handle_options argv
        rescue ArgumentError
          # Backward compatibility for capistrano
          args = handle_options
        end
        collect_command_line_tasks(args)
      end
    end

    # Find the rakefile and then load it and any pending imports.
    def load_rakefile
      standard_exception_handling do
        raw_load_rakefile
      end
    end

    # Run the top level tasks of a Rake application.
    def top_level
      run_with_threads do
        if options.show_tasks
          display_tasks_and_comments
        elsif options.show_prereqs
          display_prerequisites
        else
          top_level_tasks.each { |task_name| invoke_task(task_name) }
        end
      end
    end

    # Run the given block with the thread startup and shutdown.
    def run_with_threads
      thread_pool.gather_history if options.job_stats == :history

      yield

      thread_pool.join
      if options.job_stats
        stats = thread_pool.statistics
        puts "Maximum active threads: #{stats[:max_active_threads]} + main"
        puts "Total threads in play:  #{stats[:total_threads_in_play]} + main"
      end
      ThreadHistoryDisplay.new(thread_pool.history).show if
        options.job_stats == :history
    end

    # Add a loader to handle imported files ending in the extension
    # +ext+.
    def add_loader(ext, loader)
      ext = ".#{ext}" unless ext =~ /^\./
      @loaders[ext] = loader
    end

    # Application options from the command line
    def options
      @options ||= OpenStruct.new
    end

    # Return the thread pool used for multithreaded processing.
    def thread_pool             # :nodoc:
      @thread_pool ||= ThreadPool.new(options.thread_pool_size || Rake.suggested_thread_count-1)
    end

    # internal ----------------------------------------------------------------

    # Invokes a task with arguments that are extracted from +task_string+
    def invoke_task(task_string) # :nodoc:
      name, args = parse_task_string(task_string)
      t = self[name]
      t.invoke(*args)
    end

    def parse_task_string(string) # :nodoc:
      /^([^\[]+)(?:\[(.*)\])$/ =~ string.to_s

      name           = $1
      remaining_args = $2

      return string, [] unless name
      return name,   [] if     remaining_args.empty?

      args = []

      begin
        /\s*((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args

        remaining_args = $2
        args << $1.gsub(/\\(.)/, '\1')
      end while remaining_args

      return name, args
    end

    # Provide standard exception handling for the given block.
    def standard_exception_handling # :nodoc:
      yield
    rescue SystemExit
      # Exit silently with current status
      raise
    rescue OptionParser::InvalidOption => ex
      $stderr.puts ex.message
      exit(false)
    rescue Exception => ex
      # Exit with error message
      display_error_message(ex)
      exit_because_of_exception(ex)
    end

    # Exit the program because of an unhandled exception.
    # (may be overridden by subclasses)
    def exit_because_of_exception(ex) # :nodoc:
      exit(false)
    end

    # Display the error message that caused the exception.
    def display_error_message(ex) # :nodoc:
      trace "#{name} aborted!"
      display_exception_details(ex)
      trace "Tasks: #{ex.chain}" if has_chain?(ex)
      trace "(See full trace by running task with --trace)" unless
         options.backtrace
    end

    def display_exception_details(ex) # :nodoc:
      display_exception_details_seen << ex

      display_exception_message_details(ex)
      display_exception_backtrace(ex)
      display_cause_details(ex.cause) if has_cause?(ex)
    end

    def display_cause_details(ex) # :nodoc:
      return if display_exception_details_seen.include? ex

      trace "\nCaused by:"
      display_exception_details(ex)
    end

    def display_exception_details_seen # :nodoc:
      Thread.current[:rake_display_exception_details_seen] ||= []
    end

    def has_cause?(ex) # :nodoc:
      ex.respond_to?(:cause) && ex.cause
    end

    def display_exception_message_details(ex) # :nodoc:
      if ex.instance_of?(RuntimeError)
        trace ex.message
      else
        trace "#{ex.class.name}: #{ex.message}"
      end
    end

    def display_exception_backtrace(ex) # :nodoc:
      if options.backtrace
        trace ex.backtrace.join("\n")
      else
        trace Backtrace.collapse(ex.backtrace).join("\n")
      end
    end

    # Warn about deprecated usage.
    #
    # Example:
    #    Rake.application.deprecate("import", "Rake.import", caller.first)
    #
    def deprecate(old_usage, new_usage, call_site) # :nodoc:
      unless options.ignore_deprecate
        $stderr.puts "WARNING: '#{old_usage}' is deprecated.  " +
          "Please use '#{new_usage}' instead.\n" +
          "    at #{call_site}"
      end
    end

    # Does the exception have a task invocation chain?
    def has_chain?(exception) # :nodoc:
      exception.respond_to?(:chain) && exception.chain
    end
    private :has_chain?

    # True if one of the files in RAKEFILES is in the current directory.
    # If a match is found, it is copied into @rakefile.
    def have_rakefile # :nodoc:
      @rakefiles.each do |fn|
        if File.exist?(fn)
          others = FileList.glob(fn, File::FNM_CASEFOLD)
          return others.size == 1 ? others.first : fn
        elsif fn == ""
          return fn
        end
      end
      return nil
    end

    # True if we are outputting to TTY, false otherwise
    def tty_output? # :nodoc:
      @tty_output
    end

    # We will truncate output if we are outputting to a TTY or if we've been
    # given an explicit column width to honor
    def truncate_output? # :nodoc:
      tty_output? || @terminal_columns.nonzero?
    end

    # Display the tasks and comments.
    def display_tasks_and_comments # :nodoc:
      displayable_tasks = tasks.select { |t|
        (options.show_all_tasks || t.comment) &&
          t.name =~ options.show_task_pattern
      }
      case options.show_tasks
      when :tasks
        width = displayable_tasks.map { |t| t.name_with_args.length }.max || 10
        if truncate_output?
          max_column = terminal_width - name.size - width - 7
        else
          max_column = nil
        end

        displayable_tasks.each do |t|
          printf("#{name} %-#{width}s  gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/text.rb000064400000000463150403134140014465 0ustar00
      else
        fail "Unknown show task mode: '#{options.show_tasks}'"
      end
    end

    def terminal_width # :nodoc:
      if @terminal_columns.nonzero?
        result = @terminal_columns
      else
        result = unix? ? dynamic_width : 80
      end
      (result < 10) ? 80 : result
    rescuegems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ripper_state_lex.rb000064400000037321150403134140017055 0ustar00] || "") + "..."
      end
    end

    # Display the tasks and prerequisites
    def display_prerequisites # :nodoc:
      tasks.each do |t|
        puts "#{name} #{t.name}"
        t.prerequisites.each { |pre| puts "    #{pre}" }
      end
    end

    def trace(*strings) # :nodoc:
      options.trace_output ||= $stderr
      trace_on(options.trace_output, *strings)
    end

    def sort_options(options) # :nodoc:
      options.sort_by { |opt|
        opt.select { |o| o.is_a?(String) && o =~ /^-/ }.map(&:downcase).sort.reverse
      }
    end
    private :sort_options

    # A list of all the standard options used in rake, suitable for
    # passing to OptionParser.
    def standard_rake_options # :nodoc:
      sort_options(
        [
          ["--all", "-A",
            "Show all tasks, even uncommented ones (in combination with -T or -D)",
            lambda { |value|
              options.show_all_tasks = value
            }
          ],
          ["--backtrace=[OUT]",
            "Enable full backtrace.  OUT can be stderr (default) or stdout.",
            lambda { |value|
              options.backtrace = true
              select_trace_output(options, "backtrace", value)
            }
          ],
          ["--build-all", "-B",
           "Build all prerequisites, including those which are up-to-date.",
           lambda { |value|
             options.build_all = true
           }
          ],
          ["--comments",
            "Show commented tasks only",
            lambda { |value|
              options.show_all_tasks = !value
            }
          ],
          ["--describe", "-D [PATTERN]",
            "Describe the tasks (matching optional PATTERN), then exit.",
            lambda { |value|
              select_tasks_to_show(options, :describe, value)
            }
          ],
          ["--directory", "-C [DIRECTORY]",
            "Change to DIRECTORY before doing anything.",
            lambda { |value|
              Dir.chdir value
              @original_dir = Dir.pwd
            }
          ],
          ["--dry-run", "-n",
            "Do a dry run without executing actions.",
            lambda { |value|
              Rake.verbose(true)
              Rake.nowrite(true)
              options.dryrun = true
              options.trace = true
            }
          ],
          ["--execute", "-e CODE",
            "Execute some Ruby code and exit.",
            lambda { |value|
              eval(value)
              exit
            }
          ],
          ["--execute-print", "-p CODE",
            "Execute some Ruby code, print the result, then exit.",
            lambda { |value|
              puts eval(value)
              exit
            }
          ],
          ["--execute-continue",  "-E CODE",
            "Execute some Ruby code, " +
            "then continue with normal task processing.",
            lambda { |value| eval(value) }
          ],
          ["--jobs",  "-j [NUMBER]",
            "Specifies the maximum number of tasks to execute in parallel. " +
            "(default is number of CPU cores + 4)",
            lambda { |value|
              if value.nil? || value == ""
                value = Float::INFINITY
              elsif value =~ /^\d+$/
                value = value.to_i
              else
                value = Rake.suggested_thread_count
              end
              value = 1 if value < 1
              options.thread_pool_size = value - 1
            }
          ],
          ["--job-stats [LEVEL]",
            "Display job statistics. " +
            "LEVEL=history displays a complete job list",
            lambda { |value|
              if value =~ /^history/i
                options.job_stats = :history
              else
                options.job_stats = true
              end
            }
          ],
          ["--libdir", "-I LIBDIR",
            "Include LIBDIR in the search path for required modules.",
            lambda { |value| $:.push(value) }
          ],
          ["--multitask", "-m",
            "Treat all tasks as multitasks.",
            lambda { |value| options.always_multitask = true }
          ],
          ["--no-search", "--nosearch",
            "-N", "Do not search parent directories for the Rakefile.",
            lambda { |value| options.nosearch = true }
          ],
          ["--prereqs", "-P",
            "Display the tasks and dependencies, then exit.",
            lambda { |value| options.show_prereqs = true }
          ],
          ["--quiet", "-q",
            "Do not log messages to standard output.",
            lambda { |value| Rake.verbose(false) }
          ],
          ["--rakefile", "-f [FILENAME]",
            "Use FILENAME as the rakefile to search for.",
            lambda { |value|
              value ||= ""
              @rakefiles.clear
              @rakefiles << value
            }
          ],
          ["--rakelibdir", "--rakelib", "-R RAKELIBDIR",
            "Auto-import any .rake files in RAKELIBDIR. " +
            "(default is 'rakelib')",
            lambda { |value|
              options.rakelib = value.split(File::PATH_SEPARATOR)
            }
          ],
          ["--require", "-r MODULE",
            "Require MODULE before executing rakefile.",
            lambda { |value|
              begin
                require value
              rescue LoadError => ex
                begin
                  rake_require value
                rescue LoadError
                  raise ex
                end
              end
            }
          ],
          ["--rules",
            "Trace the rules resolution.",
            lambda { |value| options.trace_rules = true }
          ],
          ["--silent", "-s",
            "Like --quiet, but also suppresses the " +
            "'in directory' announcement.",
            lambda { |value|
              Rake.verbose(false)
              options.silent = true
            }
          ],
          ["--suppress-backtrace PATTERN",
            "Suppress backtrace lines matching regexp PATTERN. " +
            "Ignored if --trace is on.",
            lambda { |value|
              options.suppress_backtrace_pattern = Regexp.new(value)
            }
          ],
          ["--system",  "-g",
            "Using system wide (global) rakefiles " +
            "(usually '~/.rake/*.ragems/gems/rdoc-6.5.1.1/lib/rdoc/parser/simple.rb000064400000002653150403134140014775 0ustar00   lambda { |value|
              options.trace = true
              options.backtrace = true
              select_trace_output(options, "trace", value)
              Rake.verbose(true)
            }
          ],
          ["--verbose", "-v",
            "Log message to standard output.",
            lambda { |value| Rake.verbose(true) }
          ],
          ["--version", "-V",
            "Display the program version.",
            lambda { |value|
              puts "rake, version #{Rake::VERSION}"
              exit
            }
          ],
          ["--where", "-W [PATTERN]",
            "Describe the tasks (matching optional PATTERN), then exit.",
            lambda { |value|
              select_tasks_to_show(options, :lines, value)
              options.show_all_tasks = true
            }
          ],
          ["--no-deprecation-warnings", "-X",
            "Disable the deprecation warnings.",
            lambda { |value|
              options.ignore_deprecate = true
            }
          ],
        ])
    end

    def select_tasks_to_show(options, show_tasks, value) # :nodoc:
      options.show_tasks = show_tasks
      options.show_task_pattern = Regexp.new(value || "")
      Rake::TaskManager.record_task_metadata = true
    end
    private :select_tasks_to_show

    def select_trace_output(options, trace_option, value) # :nodoc:
      value = value.strip unless value.nil?
      case value
      when "stdout"
  gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby_tools.rb000064400000005206150403134140015702 0ustar00efile] {options} targets..."
        opts.separator ""
        opts.separator "Options are ..."

        opts.on_tail("-h", "--help", "-H", "Display this help message.") do
          puts opts
          exit
        end

        standard_rake_options.each { |args| opts.on(*args) }
        opts.environment("RAKEOPT")
      end.parse(argv)
    end

    # Similar to the regular Ruby +require+ command, but will check
    # for *.rake files in addition to *.rb files.
    def rake_require(file_name, paths=$LOAD_PATH, loaded=$") # :nodoc:
      fn = file_name + ".rake"
      return false if loaded.include?(fn)
      paths.each do |path|
        full_path = File.join(path, fn)
        if File.exist?(full_path)
          Rake.load_rakefile(full_path)
          loaded << fn
          return true
        end
      end
      fail LoadError, "Can't find #{file_name}"
    end

    def find_rakefile_location # :nodoc:
      here = Dir.pwd
      until (fn = have_rakefile)
        Dir.chdir("..")
        return nil if Dir.pwd == here || options.nosearch
        here = Dir.pwd
      end
      [fn, here]
    ensure
      Dir.chdir(Rake.original_dir)
    end

    def print_rakefile_directory(location) # :nodoc:
      $stderr.puts "(in #{Dir.pwd})" unless
        options.silent or original_dir == location
    end

    def raw_load_rakefile # :nodoc:
      rakefile, location = find_rakefile_location
      if (!options.ignore_system) &&
          (options.load_system || rakefile.nil?) &&
          system_dir && File.directory?(system_dir)
        print_rakefile_directory(location)
        glob("#{system_dir}/*.rake") do |name|
          add_import name
        end
      else
        fail "No Rakefile found (looking for: #{@rakefiles.join(', ')})" if
          rakefile.nil?
        @rakefile = rakefile
        Dir.chdir(location)
        print_rakefile_directory(location)
        Rake.load_rakefile(File.expand_path(@rakefile)) if
          @rakefile && @rakefile != ""
        options.rakelib.each do |rlib|
          glob("#{rlib}/*.rake") do |name|
            add_import name
          end
        end
      end
      load_imports
    end

    def glob(path, &block) # :nodoc:
      FileList.glob(path.tr("\\", "/")).each(&block)
    end
    private :glob

    # The directory path containing the system wide rakefiles.
    def system_dir # :nodoc:
      @system_dir ||=
        begin
          if ENV["RAKE_SYSTEM"]
            ENV["RAKE_SYSTEM"]
          else
            standard_system_dir
          end
        end
    end

    # The standard directory containing system wide rake files.
    if Win32.windows?
      def standard_system_dir #:nodoc:
        Win32.win32_systemgems/gems/rdoc-6.5.1.1/lib/rdoc/parser/markdown.rb000064400000000732150403134140015322 0ustar00sh(default_task_name) if @top_level_tasks.empty?
   gems/gems/rake-13.0.6/lib/rake/multi_task.rb000064400000000531150403134150014263 0gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby.rb000064400000166156150403134140014476 0ustar00|| ""
    end

    def set_default_options # :nodoc:
      options.always_multitask           = false
      options.backtrace                  =gems/gems/rake-13.0.6/lib/rake/ext/string.rb000064400000013562150403134150014225 0ustar00pattern = nil
      options.thread_pool_size           = Rake.suggested_thread_count
      options.trace                      = false
      options.trace_output               = $stderr
      options.trace_rules                = false
    end

  end
end
gems/gems/rake-13.0.6/lib/rake/multi_task.rb000064400000000531150403134150014263 0ustar00# frozen_string_literal: true
module Rake

  # Same as a regular task, but the immediate prerequisites are done in
  # parallel using Ruby threads.
  #
  class MultiTask < Task
    private

    def invoke_prerequisites(task_args, invocation_chain) # :nodoc:
      invoke_prerequisites_concurrently(task_args, invocation_chain)
    end
  end
end
gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/simple.rb000064400000002653150403134140014775 0ustar00 new extension to the end.  If the new extension
    # is not given, or is the empty string, remove any existing extension.
    #
    # +ext+ is a user added method for the String class.
    #
    # This String extension comes from Rake
    def ext(newext="")
      return self.dup if [".", ".."].include? self
      if newext != ""
        newext = "." + newext unless newext =~ /^\./
      end
      self.chomp(File.extname(self)) << newext
    end
  end

  rake_extension("pathmap") do
    # Explode a path into individual components.  Used by +pathmap+.
    #
    # This String extension comes from Rake
    def pathmap_explode
      head, tail = File.split(self)
      return [self] if head == self
      return [tail] if head == "." || tail == "/"
      return [head, tail] if head == "/"
      return head.pathmap_explode + [tail]
    end
    protected :pathmap_explode

    # Extract a partial path from the path.  Include +n+ directories from the
    # front end (left hand side) if +n+ is positive.  Include |+n+|
    # directories from the back end (right hand side) if +n+ is negative.
    #
    # This String extension comes from Rake
    def pathmap_partial(n)
      dirs = File.dirname(self).pathmap_explode
      partial_dirs =
        if n > 0
          dirs[0...n]
        elsif n < 0
          dirs.reverse[0...-n].reverse
        else
          "."
        end
      File.join(partial_dirs)
    end
    protected :pathmap_partial

gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby_tools.rb000064400000005206150403134140015702 0ustar00   end
      end
      result
    end
    protected :pathmap_replace

    # Map the path according to the given specification.  The specification
    # controls the details of the mapping.  The following special patterns are
    # recognized:
    #
    # <tt>%p</tt> :: The complete path.
    # <tt>%f</tt> :: The base file name of the path, with its file extension,
    #                but without any directories.
    # <tt>%n</tt> :: The file name of the path without its file extension.
    # <tt>%d</tt> :: The directory list of the path.
    # <tt>%x</tt> :: The file extension of the path.  An empty string if there
    #                is no extension.
    # <tt>%X</tt> :: Everything *but* the file extension.
    # <tt>%s</tt> :: The alternate file separator if defined, otherwise use #
    #                the standard file separator.
    # <tt>%%</tt> :: A percent sign.
    #
    # The <tt>%d</tt> specifier can also have a numeric prefix (e.g. '%2d').
    # If the number is positive, only return (up to) +n+ directories in the
    # path, starting from the left hand side.  If +n+ is negative, return (up
    # to) +n+ directories from the right hand side of the path.
    #
    # Examples:
    #
    #   'a/b/c/d/file.txt'.pathmap("%2d")   => 'a/b'
    #   'a/b/c/d/file.txt'.pathmap("%-2d")  => 'c/d'
    #
    # Also the <tt>%d</tt>, <tt>%p</tt>, <tt>%f</tt>, <tt>%n</tt>,
    # <tt>%x</tt>, and <tt>%X</tt> operators can take a pattern/replacement
    # argument to perform simple string substitutions on a particular part of
    # the path.  The pattern and replacement are separated by a comma and are
    # enclosed by curly braces.  The replacement spec comes after the %
    # chgems/gems/rake-13.0.6/lib/rake/ext/core.rb000064400000001234150403134150013640 0ustar00block may be provided to perform
    # some arbitrary calculation for the replacement.
    #
    # For example:
    #
    #   "/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext|
    #      ext.downcase
    #   }
    #
    # Returns:
    #
    #  "/path/to/file.txt"
    #
    # This String extension comes from Rake
    def pathmap(spec=gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/markdown.rb000064400000000732150403134140015322 0ustar00ustar00gems/gems/rake-13.0.6/lib/rake/ext/core.rb000064400000001234150403134150013640 0gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/ruby.rb000064400000166156150403134140014476 0ustar00not added.  Otherwise the block is yielded and any definitions in the
  # block will take effect.
  #
  # Usage:
  #
  #   class String
  #     rake_extension("xyz") do
  #       def xyz
  #         ...
  #       end
  #     end
  #   end
  #
  def rake_extension(method) # :nodoc:
    if method_defined?(method)
      $stderr.puts "WARNING: Possible conflict with Rake extension: " +
        "#{self}##{method} already exists"
    else
      yield
    end
  end
end
gems/gems/rake-13.0.6/lib/rake/thread_pool.rb000064400000011265150403134150014415 0ustar00# frozen_string_literal: true

require "rake/promise"

module Rake

  class ThreadPool # :nodoc: all

    # Creates a ThreadPool object.  The +thread_count+ parameter is the size
    # of the pool.
    def initialize(thread_count)
      require "set"
      @max_active_threads = [thread_count, 0].max
      @threads = Set.new
      @threads_mon = Monitor.new
      @queue = Queue.new
      @join_cond = @threads_mon.new_cond

      @history_start_time = nil
      @history = []
      @history_mon = Monitor.new
      @total_threads_in_play = 0
    end

    # Creates a future executed by the +ThreadPool+.
    #
    # The args are passed to the block when executing (similarly to
    # Thread#new) The return value is an object representing
    # a future which has been created and added to the queue in the
    # pool. Sending #value to the object will sleep the
    # current thread until the future is finished and will return the
    # result (or raise an exception thrown from the future)
    def future(*args, &block)
      promise = Promise.new(args, &block)
      promise.recorder = lambda { |*stats| stat(*stats) }

      @queue.enq promise
      stat :queued, item_id: promise.object_id
      start_thread
      promise
    end

    # Waits until the queue of futures is empty and all threads have exited.
    def join
      @threads_mon.synchronize do
        begin
          stat :joining
          @join_cond.wait unless @threads.empty?
          stat :joined
        rescue Exception => e
          stat :joined
          $stderr.puts e
          $stderr.print "Queue contains #{@queue.size} items. " +
            "Thread pool contains #{@threads.count} threads\n"
          $stderr.print "Current Thread #{Thread.current} status = " +
            "#{Thread.current.status}\n"
          $stderr.puts e.backtrace.join("\n")
          @threads.each do |t|
            $stderr.print "Thread #{t} status = #{t.status}\n"
            $stderr.puts t.backtrace.join("\n")
          end
          raise e
        end
      end
    end

    # Enable the gathering of history events.
    def gather_history          #:nodoc:
      @history_start_time = Time.now if @history_start_time.nil?
    end

    # Return a array of history events for the thread pool.
    #
    # History gathering must be enabled to be able to see the events
    # (see #gather_history). Best to call this when the job is
    # complete (i.e. after ThreadPool#join is called).
    def history                 # :nodoc:
      @history_mon.synchronize { @history.dup }.
        sort_by { |i| i[:time] }.
        each { |i| i[:time] -= @history_start_time }
    end

    # Return a hash of always collected statistics for the thread pool.
    def statistics      gems/gems/rake-13.0.6/lib/rake/testtask.rb000064400000012303150403134150013751 0ustar00ynchronize do
        @threads.count
      end
    end

    def start_thread # :nodoc:
      @threads_mon.synchronize do
        next unless @threads.count < @max_active_threads

        t = Thread.new do
          begin
            while safe_thread_count <= @max_active_threads
              break unless process_queue_item
            end
          ensure
            @threads_mon.synchronize do
              @threads.delete Thread.current
              stat :ended, thread_count: @threads.count
              @join_cond.broadcast if @threads.empty?
            end
          end
        end

        @threads << t
        stat(
          :spawned,
          new_thread: t.object_id,
          thread_count: @threads.count)
        @total_threads_in_play = @threads.count if
          @threads.count > @total_threads_in_play
      end
    end

    def stat(event, data=nil) # :nodoc:
      return if @history_start_time.nil?
      info = {
        event: event,
        data: data,
        time: Time.now,
        thread: Thread.current.object_id,
      }
      @history_mon.synchronize { @history << info }
    end

    # for testing only

    def __queue__ # :nodoc:
      @queue
    end
  end

end
gems/gems/rake-13.0.6/lib/rake/testtask.rb000064400000012303150403134150013751 0ustar00# frozen_string_literal: true
require "rake"
require "rake/tasklib"

module Rake

  # Create a task that runs a set of tests.
  #
  # Example:
  #   require "rake/testtask"
  #
  #   Rake::TestTask.new do |t|
  #     t.libs << "test"
  #     t.test_files = FileList['test/test*.rb']
  #     t.verbose = true
  #   end
  #
  # If rake is invoked with a "TEST=filename" command line option,
  # then the list of test files will be overridden to include only the
  # filename specified on the command line.  This provides an easy way
  # to run just one test.
  #
  # If rake is invoked with a "TESTOPTS=options" command line option,
  # then the given options are passed to the test process after a
  # '--'.  This allows Test::Unit options to be passed to the test
  # suite.
  #
  # Examples:
  #
  #   rake test                           # run tests normally
  #   rake test TEST=just_one_file.rb     # run just one test file.
  #   rake test TESTOPTS="-v"             # run in verbose mode
  #   rake test TESTOPTS="--runner=fox"   # use the fox test runner
  #
  class TestTask < TaskLib

    # Name of test task. (default is :test)
    attr_accessor :name

    # List of directories added to $LOAD_PATH before running the
    # tests. (default is 'lib')
    attr_accessor :libs

    # True if verbose test output desired. (default is false)
    attr_accessor :verbose

    # Test options passed to the test suite.  An explicit
    # TESTOPTS=opts on the command line will override this. (default
    # is NONE)
    attr_accessor :options

    # Request that the tests be run with the warning flag set.
    # E.g. warning=true implies "ruby -w" used to run the tests.
    # (default is true)
    attr_accessor :warning

    # Glob pattern to match test files. (default is 'test/test*.rb')
    attr_accessor :pattern

    # Style of test loader to use.  Options are:
    #
    # * :rake -- Rake provided test loading script (default).
    # * :testrb -- Ruby provided test loading script.
    # * :direct -- Load tests using command line loader.
    #
    attr_accessor :loader

    # Array of command line options to pass to ruby when running test loader.
    attr_accessor :ruby_opts

    # Description of the test task. (default is 'Run tests')
    attr_accessor :description

    # Task prerequisites.
    attr_accessor :deps

    # Explicitly define the list of test files to be included in a
    # test.  +list+ is expected to be an array of file names (a
    # FileList is acceptable).  If both +pattern+ and +test_files+ are
    # used, then the list of test files is the union of the two.
    def test_files=(list)
      @test_files = list
    end

    # Create a testing task.
    def initialize(name=:test)
      @name = name
      @libs = ["lib"]
      @pattern = nil
      @options = nil
      @test_files = nil
      @verbose = false
      @warning = true
      @loader = :rake
      @ruby_opts = []
      @description = "Run tests" + (@name == :test ? "" : " for #{@name}")
      @deps = []
      if @name.is_a?(Hash)
        @deps = @name.values.first
        @name = @name.keys.first
      end
      yield self if block_given?
      @pattern = "test/test*.rb" if @pattern.nil? && @test_files.nil?
      define
    end

    # Create the tasks definegems/gems/rake-13.0.6/lib/rake/trace_output.rb000064400000001077150403134150014633 0ustar00              status
                end

              fail message
            end
          end
        end
      end
      self
    end

    def option_list # :nodoc:
      (ENV["TESTOPTS"] ||
        ENV["TESTOPT"] ||
        ENV["TEST_OPTS"] ||
        ENV["TEST_OPT"] ||
        @options ||
        "")
    end

    def ruby_opts_string # :nodoc:
      opts = @ruby_opts.dup
      opts.unshift("-I\"#{lib_path}\"") unless @libs.empty?
      opts.unshift("-w") if @warning
      opts.join(" ")
    end

    def lib_path # :nodoc:
      @libs.join(File::PATH_SEPARATOR)
gems/gems/rake-13.0.6/lib/rake/task.rb000064400000031367150403134150013064 0ustar00gems/gems/rake-13.0.6/lib/rake/trace_output.rb000064400000001077150403134150014633 0ustar00# frozen_string_literal: true
module Rake
  module TraceOutput # :nodoc: all

    # Write trace output to output stream +out+.
    #
    # The write is done as a single IO call (to print) to lessen the
    # chance that the trace output is interrupted by other tasks also
    # producing output.
    def trace_on(out, *strings)
      sep = $\ || "\n"
      if strings.empty?
        output = sep
      else
        output = strings.map { |s|
          next if s.nil?
          s.end_with?(sep) ? s : s + sep
        }.join
      end
      out.print(output)
    end
  end
end
gems/gems/rake-13.0.6/lib/rake/task.rb000064400000031367150403134150013064 0ustar00# frozen_string_literal: true
require "rake/invocation_exception_mixin"

module Rake

  ##
  # A Task is the basic unit of work in a Rakefile.  Tasks have associated
  # actions (possibly more than one) and a list of prerequisites.  When
  # invoked, a task will first ensure that all of its prerequisites have an
  # opportunity to run and then it will execute its own actions.
  #
  # Tasks are not usually created directly using the new method, but rather
  # use the +file+ and +task+ convenience methods.
  #
  class Task
    # List of prerequisites for a task.
    attr_reader :prerequisites
    alias prereqs prerequisites

    # List of order only prerequisites for a task.
    attr_reader :order_only_prerequisites

    # List of actions attached to a task.
    attr_reader :actions

    # Application owning this task.
    attr_accessor :application

    # Array of nested namespaces names used for task lookup by this task.
    attr_reader :scope

    # File/Line locations of each of the task definitions for this
    # task (only valid if the task was defined with the detect
    # location option set).
    attr_reader :locations

    # Has this task already been invoked?  Already invoked tasks
    # will be skipped unless you reenable them.
    attr_reader :already_invoked

    # Return task name
    def to_s
      name
    end

    def inspect # :nodoc:
      "<#{self.class} #{name} => [#{prerequisites.join(', ')}]>"
    end

    # List of sources for task.
    attr_writer :sources
    def sources
      if defined?(@sources)
        @sources
      else
        prerequisites
      end
    end

    # List of prerequisite tasks
    def prerequisite_tasks
      (prerequisites + order_only_prerequisites).map { |pre| lookup_prerequisite(pre) }
    end

    def lookup_prerequisite(prerequisite_name) # :nodoc:
      scoped_prerequisite_task = application[prerequisite_name, @scope]
      if scoped_prerequisite_task == self
        unscoped_prerequisite_task = application[prerequisite_name]
      end
      unscoped_prerequisite_task || scoped_prerequisite_task
    end
    private :lookup_prerequisite

    # List of all unique prerequisite tasks including prerequisite tasks'
    # prerequisites.
    # Includes self when cyclic dependencies are found.
    def all_prerequisite_tasks
      seen = {}
      collect_prerequisites(seen)
      seen.values
    end

    def collect_prerequisites(seen) # :nodoc:
      prerequisite_tasks.each do |pre|
        next if seen[pre.name]
        seen[pre.name] = pre
        pre.collect_prerequisites(seen)
      end
    end
    protected :collect_prerequisites

    # First source from a rule (nil if no sources)
    def source
      sources.first
    end

    # Create a task named +task_name+ with no actions or prerequisites. Use
    # +enhance+ to add actions and prerequisites.
    def initialize(task_name, app)
      @name            = task_name.to_s
      @prerequisites   = []
      @actions         = []
      @already_invoked = false
      @comments        = []
      @lock            = Monitor.new
      @application     = app
      @scope           = app.current_scope
      @arg_names       = nil
      @locations       = []
      @invocation_exception = nil
      @order_only_prerequisites = []
    end

    # Enhance a task with prerequisites or actions.  Returns self.
    def enhance(deps=nil, &block)
      @prerequisites |= deps if deps
      @actions << block if block_given?
      self
    end

    # Name of the task, including any namespace qualifiers.
    def name
      @name.to_s
    end

    # Name of task with argument list description.
    def name_with_args # :nodoc:
      if arg_description
        "#{name}#{arg_description}"
      else
        name
      end
    end

    # Argument description (nil if none).
    def arg_description # :nodoc:
      @arg_names ? "[#{arg_names.join(',')}]" : nil
    end

    # Name of arguments for this task.
    def arg_names
      @arg_names || []
    end

    # Reenable the task, allowing its tasks to be executed if the task
    # is invoked again.
    def reenable
      @already_invoked = false
      @invocation_exception = nil
    end

    # Clear the existing prerequisites, actions, comments, and arguments of a rake task.
    def clear
      clear_prerequisites
      clear_actions
      clear_comments
      clear_args
      self
    end

    # Clear the existing prerequisites of a rake task.
    def clear_prerequisites
      prerequisites.clear
      self
    end

    # Clear the existing actions on a rake task.
    def clear_actions
      actions.clear
      self
    end

    # Clear the existing comments on a rake task.
    def clear_comments
      @comments = []
      self
    end

    # Clear the existing arguments on a rake task.
    def clear_args
      @arg_names = nil
      self
    end

    # Invoke the task if it is needed.  Prerequisites are invoked first.
    def invoke(*args)
      task_args = TaskArguments.new(arg_names, args)
      invoke_with_call_chain(task_args, InvocationChain::EMPTY)
    end

    # Same as invoke, but explicitly pass a call chain to detect
    # circular dependencies.
    #
    # If multiple tasks depend on this
    # one in parallel, they will all fail if the first execution of
    # this task fails.
    def invoke_with_call_chain(task_args, invocation_chain)
      new_chain = Rake::InvocationChain.append(self, invocation_chain)
      @lock.synchronize do
        begin
          if application.options.trace
            application.trace "** Invoke #{name} #{format_trace_flags}"
          end

          if @already_invoked
            if @invocation_exception
              if application.options.trace
                application.trace "** Previous invocation of #{name} failed #{format_trace_flags}"
              end
              raise @invocation_exception
            else
              return
            end
          end

          @already_invoked = true

          invoke_prerequisites(task_args, new_chain)
          execute(task_args) if needed?
        rescue Exception => ex
          add_chain_to(ex, new_chain)
          @invocation_exception = ex
          raise ex
        end
      end
    end
    protected :invoke_with_call_chain

    def add_chain_to(exception, new_chain) # :nodoc:
      exception.extend(InvocationExceptionMixin) unless
        exception.respond_to?(:chain)
      exception.chain = new_chain if exception.chain.nil?
    end
    private :add_chain_to

    # Invoke all the prerequisites of a task.
    def invoke_prerequisites(task_args, invocation_chain) # :nodoc:
      if application.options.always_multitask
        invoke_prerequisites_concurrently(task_args, invocation_chain)
      else
        prerequisite_tasks.each { |p|
          prereq_args = task_args.new_scope(p.arg_names)
          p.invoke_with_call_chain(prereq_args, invocation_chain)
        }
      end
    end

    # Invoke all the prerequisites of a task in parallel.
    def invoke_prerequisites_concurrently(task_args, invocation_chain)# :nodoc:
      futures = prerequisite_tasks.map do |p|
        prereq_args = task_args.new_scope(p.arg_names)
        application.thread_pool.future(p) do |r|
          r.invoke_with_call_chain(prereq_args, invocation_chain)
        end
      end
      # Iterate in reverse to improve performance related to thread waiting and switching
      futures.reverse_each(&:value)
    end

    # Format the trace flags for display.
    def format_trace_flags
      flags = []
      flags << "first_time" unless @already_invoked
      flags << "not_needed" unless needed?
      flags.empty? ? "" : "(" + flags.join(", ") + ")"
    end
    private :format_trace_flags

    # Execute the actions associated with this task.
    def execute(args=nil)
      args ||= EMPTY_TASK_ARGS
      if application.options.dryrun
        application.trace "** Execute (dry run) #{name}"
        return
      end
      application.trace "** Execute #{name}" if application.options.trace
      application.enhance_with_matching_rule(name) if @actions.empty?
      if opts = Hash.try_convert(args) and !opts.empty?
        @actions.each { |act| act.call(self, args, **opts)}
      else
        @actions.each { |act| act.call(self, args)}
      end
    end

    # Is this task needed?
    def needed?
      true
    end

    # Timestamp for this task.  Basic tasks return the current time for their
    # time stamp.  Other tasks can be more sophisticated.
    def timestamp
      Time.now
    end

    # Add a description to the task.  The description can consist of an option
    # argument list (enclosed brackets) and an optional comment.
    def add_description(description)
      return unless description
      comment = description.strip
      add_comment(comment) if comment && !comment.empty?
    end

    def comment=(comment) # :nodoc:
      add_comment(comment)
    end

    def add_comment(comment) # :nodoc:
      return if comment.nil?
      @comments << comment unless @comments.include?(comment)
    end
    private :add_comment

    # Full collection of comments. Multiple comments are separated by
    # newlines.
    def full_comment
      transform_comments("\n")
    end

    # First line (or sentence) of all comments. Multiple comments are
    # separated by a "/".
    def comment
      transform_comments(" / ") { |c| first_sentence(c) }
    end

    # Transform the list of comments as specified by the block and
    # join with the separator.
    def transform_comments(separator, &block)
      if @comments.empty?
        nil
      else
        block ||= lambda { |c| c }
        @comments.map(&block).join(separator)
      end
    end
    private :transform_comments

    # Get the first sentence in a string. The sentence is terminated
    # by the first period, exclamation mark, or the end of the line.
    # Decimal points do not count as periods.
    def first_sentence(string)
      string.split(/(?<=\w)(\.|!)[ \t]|(\.$|!)|\n/).first
    end
    private :first_sentence

    # Set the names of the arguments for this task. +args+ should be
    # an array of symbols, one for each argument name.
    def set_arg_names(args)
      @arg_names = args.map(&:to_sym)
    end

    # Return a string describing the internal state of a task.  Useful for
    # debugging.
    def investigation
      result = "------------------------------\n".dup
      result << "Investigating #{name}\n"
      result << "class: #{self.class}\n"
      result <<  "task needed: #{needed?}\n"
      result <<  "timestamp: #{timestamp}\n"
      result << "pre-requisites: \n"
      prereqs = prerequisite_tasks
      prereqs.sort! { |a, b| a.timestamp <=> b.timestamp }
      prereqs.each do |p|
        result << "--#{p.name} (#{p.timestamp})\n"
      end
      latest_prereq = prerequisite_tasks.map(&:timestamp).max
      result <<  "latest-prerequisite time: #{latest_prereq}\n"
      result << "................................\n\n"
      return regems/gems/rake-13.0.6/lib/rake/task_arguments.rb000064400000004644150403134150015147 0ustar00d

      # Return a task with the given name.  If the task is not currently
      # known, try to synthesize one from the defined rules.  If no rules are
      # found, but an existing file matches the task name, assume it is a file
      # task with no dependencies or actions.
      def [](task_name)
        Rake.application[task_name]
      end

      # TRUE if the task name is already defined.
      def task_defined?(task_name)
        Rake.application.lookup(task_name) != nil
      end

      # Define a task given +args+ and an option block.  If a rule with the
      # given name already exists, the prerequisites and actions are added to
      # the existing task.  Returns the defined task.
      def define_task(*args, &block)
        Rake.application.define_task(self, *args, &block)
      end

      # Define a rule for synthesizing tasks.
      def create_rule(*args, &block)
        Rake.application.create_rule(*args, &block)
      end

      # Apply the scope to the task name according to the rules for
      # this kind of task.  Generic tasks will accept the scope as
      # part of the name.
      def scope_name(scope, task_name)
        scope.path_with_task_name(task_name)
      end

    end # class << Rake::Task
  end # class Rake::Task
end
gems/gems/rake-13.0.6/lib/rake/task_arguments.rb000064400000004644150403134150015147 0ustar00# frozen_string_literal: true
module Rake

  ##
  # TaskArguments manage the arguments passed to a task.
  #
  class TaskArguments
    include Enumerable

    # Argument names
    attr_reader :names

    # Create a TaskArgument object with a list of argument +names+ and a set
    # of associated +values+.  +parent+ is the parent argument object.
    def initialize(names, values, parent=nil)
      @names = names
     gems/gems/rake-13.0.6/lib/rake/default_loader.rb000064400000000411150403134150015056 0ustar00 values + extras, self)
    end

    # Find an argument value by name or index.
    def [](index)
      lookup(index.to_sym)
    end

    # Specify a hash of default values for task arguments. Use the
    # defaults only if there is no specific value for the given
gems/gems/rake-13.0.6/lib/rake/clean.rb000064400000004035150403134150013174 0ustar00true if +key+ is one of the arguments
    def has_key?(key)
      @hash.has_key?(key)
    end
    alias key? has_key?

    def fetch(*args, &block)
      @hash.fetch(*args, &block)
    end

    protected

    def lookup(name) # :nodoc:
      if @hash.has_key?(name)
        @hash[name]
      elsif @parent
        @parent.lookup(name)
      end
    end
  end

  EMPTY_TASK_ARGS = TaskArguments.new([], []) # :nodoc:
end
gems/gems/rake-13.0.6/lib/rake/default_loader.rb000064400000000411150403134150015056 0ustar00# frozen_string_literal: true
module Rake

  # Default Rakefile loader used by +import+.
  class DefaultLoader

    ##
    # Loads a rakefile into the current application from +fn+

    def load(fn)
      Rake.load_rakefile(File.expand_path(fn))
    end
  end

end
gems/gems/rake-13.0.6/lib/rake/clean.rb000064400000004035150403134150013174 0ustar00# frozen_string_literal: truegems/gems/rake-13.0.6/lib/rake/file_list.rb000064400000030720150403134150014064 0ustar00ror => ex
        puts "Failed to remove #{file_name}: #{ex}" unless file_already_gone?(file_name)
      end
    end

    def file_already_gone?(file_name)
      return false if File.exist?(file_name)

      path = file_name
      prev = nil

      while path = File.dirname(path)
        return false if cant_be_deleted?(path)
        break if [prev, "."].include?(path)
        prev = path
      end
      true
    end
    private_class_method :file_already_gone?

    def cant_be_deleted?(path_name)
      File.exist?(path_name) &&
        (!File.readable?(path_name) || !File.executable?(path_name))
    end
    private_class_method :cant_be_deleted?
  end
end

CLEAN = ::Rake::FileList["**/*~", "**/*.bak", "**/core"]
CLEAN.clear_exclude.exclude { |fn|
  fn.pathmap("%f").downcase == "core" && File.directory?(fn)
}

desc "Remove any temporary products."
task :clean do
  Rake::Cleaner.cleanup_files(CLEAN)
end

CLOBBER = ::Rake::FileList.new

desc "Remove any generated files."
task clobber: [:clean] do
  Rake::Cleaner.cleanup_files(CLOBBER)
end
gems/gems/rake-13.0.6/lib/rake/file_list.rb000064400000030720150403134150014064 0ustar00# frozen_string_literal: true
require "rake/cloneable"
require "rake/file_utils_ext"
require "rake/ext/string"

module Rake

  ##
  # A FileList is essentially an array with a few helper methods defined to
  # make file manipulation a bit easier.
  #
  # FileLists are lazy.  When given a list of glob patterns for possible files
  # to be included in the file list, instead of searching the file structures
  # to find the files, a FileList holds the pattern for latter use.
  #
  # This allows us to define a number of FileList to match any number of
  # files, but only search out the actual files when then FileList itself is
  # actually used.  The key is that the first time an element of the
  # FileList/Array is requested, the pending patterns are resolved into a real
  # list of file names.
  #
  class FileList

    include Cloneable

    # == Method Delegation
    #
    # The lazy evaluation magic of FileLists happens by implementing all the
    # array specific methods to call +resolve+ before delegating the heavy
    # lifting to an embedded array object (@items).
    #
    # In addition, there are two kinds of delegation calls.  The regular kind
    # delegates to the @items array and returns the result directly.  Well,
    # almost directly.  It checks if the returned value is the @items object
    # itself, and if so will return the FileList object instead.
    #
    # The second kind of delegation call is used in methods that normally
    # return a new Array object.  We want to capture the return value of these
    # methods and wrap them in a new FileList object.  We enumerate these
    # methods in the +SPECIAL_RETURN+ list below.

    # List of array methods (that are not in +Object+) that need to be
    # delegated.
    ARRAY_METHODS = (Array.instance_methods - Object.instance_methods).map(&:to_s)

    # List of additional methods that must be delegated.
    MUST_DEFINE = %w[inspect <=>]

    # List of methods that should not be delegated here (we define special
    # versions of them explicitly below).
    MUST_NOT_DEFINE = %w[to_a to_ary partition * <<]

    # List of delegated methods that return new array values which need
    # wrapping.
    SPECIAL_RETURN = %w[
      map collect sort sort_by select find_all reject grep
      compact flatten uniq values_at
      + - & |
    ]

    DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).map(&:to_s).sort.uniq

    # Now do the delegation.
    DELEGATING_METHODS.each do |sym|
      if SPECIAL_RETURN.include?(sym)
        ln = __LINE__ + 1
        class_eval %{
          def #{sym}(*args, &block)
            resolve
            result = @items.send(:#{sym}, *args, &block)
            self.class.new.import(result)
          end
        }, __FILE__, ln
      else
        ln = __LINE__ + 1
        class_eval %{
          def #{sym}(*args, &block)
            resolve
            result = @items.send(:#{sym}, *args, &block)
            result.object_id == @items.object_id ? self : result
          end
        }, __FILE__, ln
      end
    end

    GLOB_PATTERN = %r{[*?\[\{]}

    # Create a file list from the globbable patterns given.  If you wish to
    # perform multiple includes or excludes at object build time, use the
    # "yield self" pattern.
    #
    # Example:
    #   file_list = FileList.new('lib/**/*.rb', 'test/test*.rb')
    #
    #   pkg_files = FileList.new('lib/**/*') do |fl|
    #     fl.exclude(/\bCVS\b/)
    #   end
    #
    def initialize(*patterns)
      @pending_add = []
      @pending = false
      @exclude_patterns = DEFAULT_IGNORE_PATTERNS.dup
      @exclude_procs = DEFAULT_IGNORE_PROCS.dup
      @items = []
      patterns.each { |pattern| include(pattern) }
      yield self if block_given?
    end

    # Add file names defined by glob patterns to the file list.  If an array
    # is given, add each element of the array.
    #
    # Example:
    #   file_list.include("*.java", "*.cfg")
    #   file_list.include %w( math.c lib.h *.o )
    #
    def include(*filenames)
      # TODO: check for pending
      filenames.each do |fn|
        if fn.respond_to? :to_ary
          include(*fn.to_ary)
        else
          @pending_add << Rake.from_pathname(fn)
        end
      end
      @pending = true
      self
    end
    alias :add :include

    # Register a list of file name patterns that should be excluded from the
    # list.  Patterns may be regular expressions, glob patterns or regular
    # strings.  In addition, a block given to exclude will remove entries that
    # return true when given to the block.
    #
    # Note that glob patterns are expanded against the file system. If a file
    # is explicitly added to a file list, but does not exist in the file
    # system, then an glob pattern in the exclude list will not exclude the
    # file.
    #
    # Examples:
    #   FileList['a.c', 'b.c'].exclude("a.c") => ['b.c']
    #   FileList['a.c', 'b.c'].exclude(/^a/)  => ['b.c']
    #
    # If "a.c" is a file, then ...
    #   FileList['a.c', 'b.c'].exclude("a.*") => ['b.c']
    #
    # If "a.c" is not a file, then ...
    #   FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c']
    #
    def exclude(*patterns, &block)
      patterns.each do |pat|
        if pat.respond_to? :to_ary
          exclude(*pat.to_ary)
        else
          @exclude_patterns << Rake.from_pathname(pat)
        end
      end
      @exclude_procs << block if block_given?
      resolve_exclude unless @pending
      self
    end

    # Clear all the exclude patterns so that we exclude nothing.
    def clear_exclude
      @exclude_patterns = []
      @exclude_procs = []
      self
    end

    # A FileList is equal through array equality.
    def ==(array)
      to_ary == array
    end

    # Return the internal array object.
    def to_a
      resolve
      @items
    end

    # Return the internal array object.
    def to_ary
      to_a
    end

    # Lie about our class.
    def is_a?(klass)
      klass == Array || super(klass)
    end
    alias kind_of? is_a?

    # Redefine * to return either a string or a new file list.
    def *(other)
      result = @items * other
      case result
      when Array
        self.class.new.import(result)
      else
        result
      end
    end

    def <<(obj)
      resolve
      @items << Rake.from_pathname(obj)
      self
    end

    # Resolve all the pending adds now.
    def resolve
      if @pending
        @pending = false
        @pending_add.each do |fn| resolve_add(fn) end
        @pending_add = []
        resolve_exclude
      end
      self
    end

    def resolve_add(fn) # :nodoc:
      case fn
      when GLOB_PATTERN
        add_matching(fn)
      else
        self << fn
      end
    end
    private :resolve_add

    def resolve_exclude # :nodoc:
      reject! { |fn| excluded_from_list?(fn) }
      self
    end
    private :resolve_exclude

    # Return a new FileList with the results of running +sub+ against each
    # element of the original list.
    #
    # Example:
    #   FileList['a.c', 'b.c'].sub(/\.c$/, '.o')  => ['a.o', 'b.o']
    #
    def sub(pat, rep)
      inject(self.class.new) { |res, fn| res << fn.sub(pat, rep) }
    end

    # Return a new FileList with the results of running +gsub+ against each
    # element of the original list.
    #
    # Example:
    #   FileList['lib/test/file', 'x/y'].gsub(/\//, "\\")
    #      => ['lib\\test\\file', 'x\\y']
    #
    def gsub(pat, rep)
      inject(self.class.new) { |res, fn| res << fn.gsub(pat, rep) }
    end

    # Same as +sub+ except that the original file list is modified.
    def sub!(pat, rep)
      each_with_index { |fn, i| self[i] = fn.sub(pat, rep) }
      self
    end

    # Same as +gsub+ except that the original file list is modified.
    def gsub!(pat, rep)
      each_with_index { |fn, i| self[i] = fn.gsub(pat, rep) }
      self
    end

    # Apply the pathmap spec to each of the included file names, returning a
    # new file list with the modified paths.  (See String#pathmap for
    # details.)
    def pathmap(spec=nil, &block)
      collect { |fn| fn.pathmap(spec, &block) }
    end

    # Return a new FileList with <tt>String#ext</tt> method applied to
    # each member of the array.
    #
    # This method is a shortcut for:
    #
    #    array.collect { |item| item.ext(newext) }
    #
    # +ext+ is a user added method for the Array class.
    def ext(newext="")
      collect { |fn| fn.ext(newext) }
    end

    # Grep each of the files in the filelist using the given pattern. If a
    # block is given, call the block on each matching line, passing the file
    # name, line number, and the matching line of text.  If no block is given,
    # a standard emacs style file:linenumber:line message will be printed to
    # standard out.  Returns the number of matched items.
    def egrep(pattern, *options)
      matched = 0
      each do |fn|
        begin
          File.open(fn, "r", *options) do |inf|
            count = 0
            inf.each do |line|
              count += 1
              if pattern.match(line)
                matched += 1
                if block_given?
                  yield fn, count, line
                else
                  puts "#{fn}:#{count}:#{line}"
                end
              end
            end
          end
        rescue StandardError => ex
          $stderr.puts "Error while processing '#{fn}': #{ex}"
        end
      end
      matched
    end

    # Return a new file list that only contains file names from the current
    # file list that exist on the file system.
    def existing
      select { |fn| File.exist?(fn) }.uniq
    end

    # Modify the current file list so that it contains only file name that
    # exist on the file system.
    def existing!
      resolve
      @items = @items.select { |fn| File.exist?(fn) }.uniq
      self
    end

    # FileList version of partition.  Needed because the nested arrays should
    # be FileLists in this version.
    def partition(&block)       # :nodoc:
      resolve
      result = @items.partition(&block)
      [
        self.class.new.import(result[0]),
        self.class.new.import(result[1]),
      ]
    end

    # Convert a FileList to a string by joining all elements with a space.
    def to_s
      resolve
      self.join(" ")
    end

    # Add matching glob patterns.
    def add_matching(pattern)
      self.class.glob(pattern).each do |fn|
        self << fn unless excluded_from_list?(fn)
      end
    end
    private :add_matching

    # Should the given file name be excluded from the list?
    #
    # NOTE: This method was formerly named "exclude?", but Rails
    # introduced an exclude? methogems/gems/rake-13.0.6/lib/rake/cpu_counter.rb000064400000004515150403134150014443 0ustar00, fn, flags)
        else
          fn == pat
        end
      end
      @exclude_procs.any? { |p| p.call(fn) }
    end

    DEFAULT_IGNORE_PATTERNS = [
      /(^|[\/\\])CVS([\/\\]|$)/,
      /(^|[\/\\])\.svn([\/\\]|$)/,
      /\.bak$/,
      /~$/
    ]
    DEFAULT_IGNORE_PROCS = [
      proc { |fn| fn =~ /(^|[\/\\])core$/ && !File.directory?(fn) }
    ]

    def import(array) # :nodoc:
      @items = array
      self
    end

    class << self
      # Create a new file list including the files listed. Similar to:
      #
      #   FileList.new(*args)
      def [](*args)
        new(*args)
      end

      # Get a sorted list of files matching the pattern. This method
      # should be preferred to Dir[pattern] and Dir.glob(pattern) because
      # the files returned are guaranteed to be sorted.
      def glob(pattern, *args)
        Dir.glob(pattern, *args).sort
      end
    end
  end
end

module Rake
  class << self

    # Yield each file or directory component.
    def each_dir_parent(dir)    # :nodoc:
      old_length = nil
      while dir != "." && dir.length != old_length
        yield(dir)
        old_length = dir.length
        dir = File.dirname(dir)
      end
    end

    # Convert Pathname and Pathname-like objects to strings;
    # leave everything else alone
    def from_pathname(path)    # :nodoc:
      path = path.to_path if path.respond_to?(:to_path)
      path = path.to_str if path.respond_to?(:to_str)
      path
    end
  end
end # module Rake
gems/gems/rake-13.0.6/lib/rake/cpu_counter.rb000064400000004515150403134150014443 0ustar00# frozen_string_literal: true
module Rake

  # Based on a script at:
  #   http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed
  class CpuCounter # :nodoc: all
    def self.count
      new.count_with_default
    end

    def count_with_default(default=4)
      count || default
    rescue StandardError
   gems/gems/rake-13.0.6/lib/rake/rake_test_loader.rb000064400000000735150403134150015424 0ustar00in32 ||
          count_via_sysctl ||
          count_via_cpuinfo
        end
      end
    end

    def count_via_java_runtime
      Java::Java.lang.Runtime.getRuntime.availableProcessors
    rescue StandardError
      nil
    end

    def count_via_win32
      require 'win32ole'
      wmi = WIN32OLE.connect("winmgmts://")
      cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # TODO count hyper-threaded in this
      cpu.to_enum.first.NumberOfCores
    regems/gems/rake-13.0.6/lib/rake/file_utils_ext.rb000064400000007532150403134150015136 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/changelog.rb000064400000020473150403134140015433 0ustar00ustar00# frozen_string_literal: true

require "rake/file_list"

# Load the test files from the command line.
argv = ARGV.select do |argument|
  case argument
  when /^-/ then
    argument
  when /\*/ then
    Rake::FileList[argument].to_a.each do |file|
      require File.expand_path file
    end

    false
  else
    path = File.expand_path argument

    abort "\nFile does not exist: #{path}\n\n" unless File.exist?(path)

    require path

    false
  end
end

ARGV.replace argv
gems/gems/rake-13.0.6/lib/rake/file_utils_ext.rb000064400000007532150403134150015136 0ustar00# frozen_string_literal: true
require "rake/file_utils"

module Rake
  #
  # FileUtilsExt provides a custom version of the FileUtils methods
  # that respond to the <tt>verbose</tt> and <tt>nowrite</tt>
  # commands.
  #
  module FileUtilsExt
    include FileUtils

    class << self
      attr_accessor :verbose_flag, :nowrite_flag
    end

    DEFAULT = Object.new

    FileUtilsExt.verbose_flag = DEFAULT
    FileUtilsExt.nowrite_flag = false

    FileUtils.commands.each do |name|
      opts = FileUtils.options_of name
      default_options = []
      if opts.include?("verbose")
        default_options << "verbose: FileUtilsExt.verbose_flag"
      end
      if opts.include?("noop")
        default_options << "noop: FileUtilsExt.nowrite_flag"
      end

      next if default_options.empty?
      module_eval(<<-EOS, __FILE__, __LINE__ + 1)
      def #{name}(*args, **options, &block)
        super(*args,
            #{default_options.join(', ')},
            **options, &block)
      end
      EOS
    end

    # Get/set the verbose flag controlling output from the FileUtils
    # utilities.  If verbose is true, then the utility method is
    # echoed to standard output.
    #
    # Examples:
    #    verbose              # return the current value of the
    #                         # verbose flag
    #    verbose(v)           # set the verbose flag to _v_.
    #    verbose(v) { code }  # Execute code with the verbose flag set
    #                         # temporarily to _v_.  Return to the
    #                         # original value when code is done.
    def verbose(value=nil)
      oldvalue = FileUtilsExt.verbose_flag
      FileUtilsExt.verbose_flag = value unless value.nil?
      if block_given?
        begin
          yield
        ensure
          FileUtilsExt.verbose_flag = oldvalue
        end
      end
      FileUtilsExt.verbose_flag
    engems/gems/rake-13.0.6/lib/rake/task_argument_error.rb000064400000000225150403134150016164 0ustar00ess value.nil?
      if block_given?
        begin
          yield
        ensure
          FileUtilsExt.nowrite_flag = oldvalue
        end
      engems/gems/rake-13.0.6/lib/rake/file_task.rb000064400000002777150403134150014066 0ustar00 # +optdecl+.  An ArgumentError exception is thrown if non-declared
    # options are found.
    def rake_check_options(options, *optdecl)
      h = options.dup
      optdecl.each do |name|
        h.delete name
      end
      raise ArgumentError, "no such option: #{h.keys.join(' ')}" unless
        h.empty?
    end

    extend self
  end
end
gems/gems/rake-13.0.6/lib/rake/task_argument_error.rb000064400000000225150403134150016164 0ustar00# frozen_string_literal: true
module Rake

  # Error indicating an ill-formed task declaration.
  class TaskArgumentError < ArgumentError
  end

end
gems/gems/rake-13.0.6/lib/rake/backtrace.rb000064400000001600150403134150014024 0ustar00# frozen_string_literal: true
require "rake/task"
require "rake/early_time"

module Rake

  # A FileTask is a task that includes time based dependencies.  If any of a
  # FileTask's prerequisites have a timestamp that is later than the file
  # represented by this task, then the file must be rebuilt (using the
  # supplied actions).
  #
  class FileTask < Task

    # Is this file task needed?  Yes if it doesn't exist, or if its time stamp
    # is out of date.
    def needed?
      !File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
    end

    # Time stamp for file task.
    def timestamp
      if File.exist?(name)
        File.mtime(name.to_s)
      else
        Rake::LATE
      end
    end

    private

    # Are there any prerequisites with a later time than the given time stamp?
    def out_of_date?(stamp)
      all_prerequisite_tasks.any? { |prereq|gems/gems/rake-13.0.6/lib/rake/late_time.rb000064400000000447150403134150014060 0ustar00gemsgems/gems/rdoc-6.5.1.1/lib/rdoc/servlet.rb000064400000030365150403134150013676 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/parser/changelog.rb000064400000020473150403134140015433 0ustar00backtrace)
      pattern = Rake.application.options.suppress_backtrace_pattern ||
                SUPPRESS_PATTERN
      backtrace.reject { |elem| elem =~ pattern }
    end
  end
end
gems/gems/rake-13.0.6/lib/rake/late_time.rb000064400000000447150403134150014060 0ustar00# frozen_string_literal: true
module Rake
  # LateTime is a fake timestamp that occurs _after_ any other time value.
  class LateTime
    include Comparable
    include Singleton

    def <=>(other)
      1
    end

    def to_s
      "<LATE TIME>"
    end
  end

  LATE = LateTime.instance
end
gems/gems/rake-13.0.6/lib/rake/cloneable.rb000064400000000700150403134150014031 0ustar00# frozen_string_literal: true
module Rake

  # Makefile loader to be used with the import file loader.  Use this to
  # import dependencies from make dependency tools:
  #
  #   require 'rake/loaders/makefile'
  #
  #   file ".depends.mf" => [SRC_LIST] do |t|
  #     sh "makedepend -f- -- #{CFLAGS} -- #{t.prerequisites} > #{t.name}"
  #   end
  #
  #   import ".depends.mf"
  #
  # See {Importing Dependencies}[link:doc/rakefile_rdoc.html#label-Igems/gems/rake-13.0.6/lib/rake/early_time.rb000064400000000562150403134150014245 0ustar00l?
      dependents = args.split.map { |d| respace(d) }
      file_tasks.scan(/\S+/) do |file_task|
        file_task = respace(file_task)
        file file_task => dependents
      end
    end

    def respace(str) # :nodoc:
      str.tr SPACE_MARK, " "
    end
  end

  # Install the handler
  Rake.application.add_loader("mf", MakefileLoader.new)
end
gems/gems/rake-13.0.6/lib/rake/phony.rb000064400000000575150403134150013254 0ustar00# frozen_string_literal: true
module Rake
  ##
  # Mixin for creating easily cloned objects.

  module Cloneable # :nodoc:
    # The hook that is invoked by 'clone' and 'dup' methods.
    def initialize_copy(source)
      super
      source.instance_variables.each do |var|
        src_value  = source.instance_variable_get(var)
        value = src_value.clone rescue src_value
   gems/gems/rake-13.0.6/lib/rake/win32.rb000064400000003020150403134160013046 0ustar00# frozen_string_literal: true
module Rake

  # EarlyTime is a fake timestamp that occurs _before_ any other time value.
  class EarlyTime
    include Comparable
    include Singleton

    ##
    # The EarlyTime always comes before +other+!

    def <=>(other)
      -1
    end

    def to_s # :nodoc:
      "<EARLY TIME>"
    end
  end

  EARLY = EarlyTime.instance
end
gems/gems/rake-13.0.6/lib/rake/phony.rb000064400000000575150403134150013254 0ustar00# frozen_string_literal: true
# Defines a :phony task that you can use as a dependency. This allows
# file-based tasks to use non-file-based tasks as prerequisites
# without forcing them to rebuild.
#
# See FileTask#out_of_date? and Task#timestamp for more info.

require "rake"

task :phony

Rake::Task[:phony].tap do |task|
  def task.timestamp # :nodoc:
    Time.at 0
  end
end
gems/gems/rake-1gems/gems/rake-13.0.6/lib/rake/linked_list.rb000064400000005424150403134160014417 0ustar00[Ww]indows)!
      end

      # The standard directory containing system wide rake files on
      # Win 32 systems. Try the following environment variables (in
      # order):
      #
      # * HOME
      # * HOMEDRIVE + HOMEPATH
      # * APPDATA
      # * USERPROFILE
      #
      # If the above are not defined, the return nil.
      def win32_system_dir #:nodoc:
        win32_shared_path = ENV["HOME"]
        if win32_shared_path.nil? && ENV["HOMEDRIVE"] && ENV["HOMEPATH"]
          win32_shared_path = ENV["HOMEDRIVE"] + ENV["HOMEPATH"]
        end

        win32_shared_path ||= ENV["APPDATA"]
        win32_shared_path ||= ENV["USERPROFILE"]
        raise Win32HomeError,
          "Unable to determine home path environment variable." if
            win32_shared_path.nil? or win32_shared_path.empty?
        normalize(File.join(win32_shared_path, "Rake"))
      end

      # Normalize a win32 path so that the slashes are all forward slashes.
      def normalize(path)
        path.gsub(/\\/, "/")
      end

    engems/gems/rdoc-6.5.1.1/lib/rdoc/servlet.rb000064400000030365150403134150013676 0ustar00ustar00# frozen_string_literal: true
module Rake

  # Polylithic linked list structure used to implement several data
  # structures in Rake.
  class LinkedList
    include Enumerable
    attr_reader :head, :tail

    # Polymorphically add a new element to the head of a list. The
    # type of head node will be the same list type as the tail.
    def conj(item)
      self.class.cons(item, self)
    end

    # Is the list empty?
    # .make guards against a list being empty making any instantiated LinkedList
    # object not empty by default
    # You should consider overriding this method if you implement your own .make method
    def empty?
      false
    end

    # Lists are structurally equivalent.
    def ==(other)
      current = self
      while !current.empty? && !other.empty?gems/gems/rake-13.0.6/lib/rake/thread_history_display.rb000064400000002204150403134160016664 0ustar00there are no arguments
      return empty if !args || args.empty?

      # build a LinkedList by starting at the tail and iterating
      # through each argument
      # inject takes an EmptyLinkedList to start
      args.reverse.inject(empty) do |list, item|
        list = cons(item, list)
        list # return the newly created list for each item in the block
      end
    end

    # Cons a new head onto the tail list.
    def self.cons(head, tail)
      new(head, tail)
    end

    # The standard empty list class for the given LinkedList class.
    def self.empty
      self::EMPTY
    end

    protected

    def initialize(head, tail=EMPTY)
      @head = head
      @tail = tail
    end

    # Represent an empty list, using the Null Object Pattern.
    #
    # When inheriting from the LinkedList class, you should implement
    # a type specific Empty class as well. Make sure you set the class
    # instance variable @parent to the associated gems/gems/rdoc-6.5.1.1/lib/rdoc/ri.rb000064400000000566150403134150012624 0ustar00ustar00# frozen_string_literal: true
require "rake/private_reader"

mogems/gems/rdoc-6.5.1.1/lib/rdoc/rd/inline_parser.rb000064400000076646150403134150015465 0ustar00ustar00seq_] = renames[:_seq_].succ
          renames[original] = value
        end
        hash[key] = value
      end
    end
  end

end
gems/gems/rake-13.0.6/lib/rake/rule_recursion_overflow_error.rb000064400000000576150403134160020315 0ustar00gems/gems/rake-13.0.6/lib/rake/task_manager.rb000064400000024031150403134160014545 0ustar00gems/gems/rake-13.0.6/lib/rake/scope.rb000064400000001602150403134160013221 0ustar00# frozen_string_literal: true
module Rake
  class Scope < LinkedList # :nodoc: all

    # Path for the scope.
    def path
      map(&:to_s).reverse.join(":")
    end

    # Path for the scope + the named path.
    def path_with_task_name(task_name)
      "#{path}:#{task_name}"
    end

    # Trim +n+ innermost scope levels from the scope. In no case will
    # this trim beyond the toplevel scope.
    def trim(n)
      result = self
      while n > 0 && !result.empty?
        result = result.tail
        n -= 1
      end
      result
    end

    # Scope lists always end with an EmptyScope object. See Null
    # Object Pattern)
    class EmptyScope < EmptyLinkedList
      @parent = Scope

      def path
        ""
      end

      def path_with_task_name(task_name)
        task_name
      end
    end

    # Singleton null object for an empty scope.
    EMPTY = EmptyScope.new
  end
end
gems/gems/rake-13.0.6/lib/rake/task_manager.rb000064400000024031150403134160014545 0ustar00# frozen_string_literal: true
module Rake

  # The TaskManager module is a mixin for managing tasks.
  module TaskManager
    # Track the last comment made in the Rakefile.
    attr_accessor :last_description

    def initialize # :nodoc:
      super
      @tasks = Hash.new
      @rules = Array.new
      @scope = Scope.make
      @last_description = nil
    end

    def create_rule(*args, &block) # :nodoc:
      pattern, args, deps, order_only = resolve_args(args)
      pattern = Regexp.new(Regexp.quote(pattern) + "$") if String === pattern
      @rules << [pattern, args, deps, order_only, block]
    end

    def define_task(task_class, *args, &block) # :nodoc:
      task_name, arg_names, deps, order_only = resolve_args(args)

      original_scope = @scope
      if String === task_name and
         not task_class.ancestors.include? Rake::FileTask
        task_name, *definition_scope = *(task_name.split(":").reverse)
        @scope = Scope.make(*(definition_scope + @scope.to_a))
      end

      task_name = task_class.scope_name(@scope, task_name)
      task = intern(task_class, task_name)
      task.set_arg_names(arg_names) unless arg_names.empty?
      if Rake::TaskManager.record_task_metadata
        add_location(task)
        task.add_description(get_description(task))
      end
      task.enhance(Task.format_deps(deps), &block)
      task | order_only unless order_only.nil?
      task
    ensure
      @scope = original_scope
    end

    # Lookup a task.  Return an existing task if found, otherwise
    # create a task of the current type.
    def intern(task_class, task_name)
      @tasks[task_name.to_s] ||= task_class.new(task_name, self)
    end

    # Find a matching task for +task_name+.
    def [](task_name, scopes=nil)
      task_name = task_name.to_s
      self.lookup(task_name, scopes) or
        enhance_with_matching_rule(task_name) or
        synthesize_file_task(task_name) or
        fail generate_message_for_undefined_task(task_name)
    end

    def generate_message_for_undefined_task(task_name)
      message = "Don't know how to build task '#{task_name}' "\
                "(See the list of available tasks with `#{Rake.application.name} --tasks`)"
      message + generate_did_you_mean_suggestions(task_name)
    end

    def generate_did_you_mean_suggestions(task_name)
      return "" unless defined?(::DidYouMean::SpellChecker)

      suggestions = ::DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name.to_s)
      if ::DidYouMean.respond_to?(:formatter)# did_you_mean v1.2.0 or later
        ::DidYouMean.formatter.message_for(suggestions)
      elsif defined?(::DidYouMean::Formatter) # before did_you_mean v1.2.0
        ::DidYouMean::Formatter.new(suggestions).to_s
      else
        ""
      end
    end

    def synthesize_file_task(task_name) # :nodoc:
      return nil unless File.exist?(task_name)
      define_task(Rake::FileTask, task_name)
    end

    # Resolve the arguments for a task/rule.  Returns a tuple of
    # [task_name, arg_name_list, prerequisites, order_only_prerequisites].
    def resolve_args(args)
      if args.last.is_a?(Hash)
        deps = args.pop
        resolve_args_with_dependencies(args, deps)
      else
        resolve_args_without_dependencies(args)
      end
    end

    # Resolve task arguments for a task or rule when there are no
    # dependencies declared.
    #
    # The patterns recognized by this argument resolving function are:
    #
    #   task :t
    #   task :t, [:a]
    #
    def resolve_args_without_dependencies(args)
      task_name = args.shift
      if args.size == 1 && args.first.respond_to?(:to_ary)
        arg_names = args.first.to_ary
      else
        arg_names = args
      end
      [task_name, arg_names, [], nil]
    end
    private :resolve_args_without_dependencies

    # Resolve task arguments for a task or rule when there are
    # dependencies declared.
    #
    # The patterns recognized by this argument resolving function are:
    #
    #   task :t, order_onlygems/gems/rdoc-6.5.1.1/lib/rdoc/ri.rb000064400000000566150403134150012624 0ustar00th_dependencies

    # If a rule can be found that matches the task name, enhance the
    # task with the prerequisites and actions from the rule.  Set the
    # source attribute of the task appropriately for the rule.  Return
    # the enhanced task or nil of no rule was found.
    def enhance_with_matching_rule(task_name, level=0)
      fail Rake::RuleRecursionOverflowEgems/gems/rdoc-6.5.1.1/lib/rdoc/rd/inline_parser.rb000064400000076646150403134150015465 0ustar00s
    # sub-scopes).
    def tasks_in_scope(scope)
      prefix = scope.path
      tasks.select { |t|
        /^#{prefix}:/ =~ t.name
      }
    end

    # Clear all tasks in this application.
    def clear
      @tasks.clear
      @rules.clear
    end

    # Lookup a task, using scope and the scope hints in the task name.
    # This method performs straight lookups without trying to
    # synthesize file tasks or rules.  Special scope names (e.g. '^')
    # are recognized.  If no scope argument is supplied, use the
    # current scope.  Return nil if the task cannot be found.
    def lookup(task_name, initial_scope=nil)
      initial_scope ||= @scope
      task_name = task_name.to_s
      if task_name =~ /^rake:/
        scopes = Scope.make
        task_name = task_name.sub(/^rake:/, "")
      elsif task_name =~ /^(\^+)/
        scopes = initial_scope.trim($1.size)
        task_name = task_name.sub(/^(\^+)/, "")
      else
        scopes = initial_scope
      end
      lookup_in_scope(task_name, scopes)
    end

    # Lookup the task name
    def lookup_in_scope(name, scope)
      loop do
        tn = scope.path_with_task_name(name)
        task = @tasks[tn]
        return task if task
        break if scope.empty?
        scope = scope.tail
      end
      nil
    end
    private :lookup_in_scope

    # Return the list of scope names currently active in the task
    # manager.
    def current_scope
      @scope
    end

    # Evaluate the block in a nested namespace named +name+.  Create
    # an anonymous namespace if +name+ is nil.
    def in_namespace(name)
      name ||= generate_name
      @scope = Scope.new(name, @scope)
      ns = NameSpace.new(self, @scope)
      yield(ns)
      ns
    ensure
      @scope = @scope.tail
    end

    private

    # Add a location to the locations field of the given task.
    def add_location(task)
      loc = find_location
      task.locations << loc if loc
      task
    end

    # Find the location that called into the dsl layer.
    def find_location
      locations = caller
      i = 0
      while locations[i]
        return locations[i + 1] if locations[i] =~ /rake\/dsl_definition.rb/
        i += 1
      end
      nil
    end

    # Generate an anonymous namespace name.
    def generate_name
      @seed ||= 0
      @seed += 1
      "_anon_#{@seed}"
    end

    def trace_rule(level, message) # gems/gems/rake-13.0.6/lib/rake/name_space.rb000064400000001276150403134160014212 0ustar00

    # Make a list of sources from the list of file name extensions /
    # translation procs.
    def make_sources(task_name, task_pattern, extensions)
      result = extensions.map { |ext|
        case ext
        when /%/
          task_name.pathmap(ext)
        when %r{/}
          ext
        when /^\./
          source = task_name.sub(task_pattern, ext)
          source == ext ? task_name.ext(ext) : source
        when String, Symbol
          ext.to_s
        when Proc, Method
          if ext.arity == 1
            ext.call(task_name)
          else
            ext.call
          end
        else
          fail "Don't know how to handle rule dependent: #{ext.inspect}"
        end
    gems/gems/rake-13.0.6/lib/rake/pseudo_status.rb000064400000000625150403134160015016 0ustar00gems/gems/rake-13.0.6/lib/rake/name_space.rb000064400000001276150403134160014212 0ustar00gems/gems/rake-13.0.6/lib/rake/file_utils.rb000064400000007511150403134160014254 0ustar00e (a LinkedList)

  def scope
    @scope.dup
  end

  ##
  # Return the list of tasks defined in this and nested namespaces.

  def tasks
    @task_manager.tasks_in_scope(@scope)
  end

end
gems/gems/rake-13.0.6/lib/rake/pseudo_status.rb000064400000000625150403134160015016 0ustar00# frozen_string_literal: true
module Rake

  ##
  # Exit status class for times the system just gives us a nil.
  class PseudoStatus # :nodoc: all
    attr_reader :exitstatus

    def initialize(code=0)
      @exitstatus = code
    end

    def to_i
      @exitstatus << 8
    end

    def >>(n)
      to_i >> n
    end

    def stopped?
      false
    end

    def exited?
      true
    end
  end

end
gems/gems/rake-13.0.6/lib/rake/file_utils.rb000064400000007511150403134160014254 0ustar00# frozen_string_literal: true
require "rbconfig"
require "fileutils"

#--
# This a FileUtils extension that defines several additional commands to be
# added to the FileUtils utility functions.
module FileUtils
  # Path to the currently running Ruby program
  RUBY = ENV["RUBY"] || File.join(
    RbConfig::CONFIG["bindir"],
    RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]).
    sub(/.*\s.*/m, '"\&"')

  # Run the system command +cmd+.  If multiple arguments are given the command
  # is run directly (without the shell, same semantics as Kernel::exec and
  # Kernel::system).
  #
  # It is recommended you use the multiple argument form over interpolating
  # user input for both usability and security reasons.  With the multiple
  # argument form you can easily process files with spaces or other shell
  # reserved characters in them.  With the multiple argument form your rake
  # tasks are not vulnerable to users providing an argument like
  # <code>; rm # -rf /</code>.
  #
  # If a block is given, upon command completion the block is called with an
  # OK flag (true on a zero exit status) and a Process::Status object.
  # Without a block a RuntimeError is raised when the command exits non-zero.
  #
  # Examples:
  #
  #   sh 'ls -ltr'
  #
  #   sh 'ls', 'file with spaces'
  #
  #   # check exit status after command runs
  #   sh %{grep pattern file} do |ok, res|
  #     if !ok
  #       puts "pattern not found (status = #{res.exitstatus})"
  #     end
  #   end
  #
  def sh(*cmd, &block)
    options = (Hash === cmd.last) ? cmd.pop : {}
    shell_runner = block_given? ? block : create_shell_runner(cmd)

    set_verbose_option(options)
    verbose = options.delete :verbose
    noop    = options.delete(:noop) || Rake::FileUtilsExt.nowrite_flag

    Rake.rake_output_message sh_show_command cmd if verbose

    unless noogems/gems/ruby-lsapi-5.6/setup.rb000064400000106502150403134160012515 0ustar00n " "
      cmd[0] = env
    end

    cmd.join " "
  end
  private :sh_show_command

  def set_verbose_option(options) # :nodoc:
    unless options.key? :verbose
      options[:verbose] =
        (Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT) ||
        Rake::FileUtilsExt.verbose_flag
    end
  end
  private :set_verbose_option

  # Run a Ruby interpreter with the given arguments.
  #
  # Example:
  #   ruby %{-pe '$_.upcase!' <README}
  #
  def ruby(*args, **options, &block)
    if args.length > 1
      sh(RUBY, *args, **options, &block)
    else
      sh("#{RUBY} #{args.first}", **options, &block)
    end
  end

  LN_SUPPORTED = [true]

  #  Attempt to do a normal file link, but fall back to a copy if the link
  #  fails.
  def safe_ln(*args, **options)
    if LN_SUPPORTED[0]
      begin
        return options.empty? ? ln(*args) : ln(*args, **options)
      rescue StandardError, NotImplementedError
        LN_SUPPORTED[0] = false
      end
    end
    options.empty? ? cp(*args) : cp(*args, **options)
  end

  # Split a file path into individual directory names.
  #
  # Example:
  #   split_all("a/b/c") =>  ['a', 'b', 'c']
  #
  def split_all(path)
    head, tail = File.split(path)
    return [tail] if head == "." || tail == "/"
    return [head, tail] if head == "/"
    return split_all(head) + [tail]
  end
end
gems/gems/ruby-lsapi-5.6/setup.rb000064400000106502150403134160012515 0ustar00#
# setup.rb
#
# Copyright (c) 2000-2005 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
#

unless Enumerable.method_defined?(:map)   # Ruby 1.4.6
  module Enumerable
    alias map collect
  end
end

unless File.respond_to?(:read)   # Ruby 1.6
  def File.read(fname)
    open(fname) {|f|
      return f.read
    }
  end
end

unless Errno.const_defined?(:ENOTEMPTY)   # Windows?
  module Errno
    class ENOTEMPTY
      # We do not raise this exception, implementation is not needed.
    end
  end
end

def File.binread(fname)
  open(fname, 'rb') {|f|
    return f.read
  }
end

# for corrupted Windows' stat(2)
def File.dir?(path)
  File.directory?((path[-1,1] == '/') ? path : path + '/')
end


class ConfigTable

  include Enumerable

  def initialize(rbconfig)
    @rbconfig = rbconfig
    @items = []
    @table = {}
    # options
    @install_prefix = nil
    @config_opt = nil
    @verbose = true
    @no_harm = false
  end

  attr_accessor :install_prefix
  attr_accessor :config_opt

  attr_writer :verbose

  def verbose?
    @verbose
  end

  attr_writer :no_harm

  def no_harm?
    @no_harm
  end

  def [](key)
    lookup(key).resolve(self)
  end

  def []=(key, val)
    lookup(key).set val
  end

  def names
    @items.map {|i| i.name }
  end

  def each(&block)
    @items.each(&block)
  end

  def key?(name)
    @table.key?(name)
  end

  def lookup(name)
    @table[name] or setup_rb_error "no such config item: #{name}"
  end

  def add(item)
    @items.push item
    @table[item.name] = item
  end

  def remove(name)
    item = lookup(name)
    @items.delete_if {|i| i.name == name }
    @table.delete_if {|name, i| i.name == name }
    item
  end

  def load_script(path, inst = nil)
    if File.file?(path)
      MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path
    end
  end

  def savefile
    '.config'
  end

  def load_savefile
    begin
      File.foreach(savefile()) do |line|
        k, v = *line.split(/=/, 2)
        self[k] = v.strip
      end
    rescue Errno::ENOENT
      setup_rb_error $!.message + "\n#{File.basename($0)} config first"
    end
  end

  def save
    @items.each {|i| i.value }
    File.open(savefile(), 'w') {|f|
      @items.each do |i|
        f.printf "%s=%s\n", i.name, i.value if i.value? and i.value
      end
    }
  end

  def load_standard_entries
    standard_entries(@rbconfig).each do |ent|
      add ent
    end
  end

  def standard_entries(rbconfig)
    c = rbconfig

    rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT'])

    major = c['MAJOR'].to_i
    minor = c['MINOR'].to_i
    teeny = c['TEENY'].to_i
    version = "#{major}.#{minor}"

    # ruby ver. >= 1.4.4?
    newpath_p = ((major >= 2) or
                 ((major == 1) and
                  ((minor >= 5) or
                   ((minor == 4) and (teeny >= 4)))))

    if c['rubylibdir']
      # V > 1.6.3
      libruby         = "#{c['prefix']}/lib/ruby"
      librubyver      = c['rubylibdir']
      librubyverarch  = c['archdir']
      siteruby        = c['sitedir']
      siterubyver     = c['sitelibdir']
      siterubyverarch = c['sitearchdir']
    elsif newpath_p
      # 1.4.4 <= V <= 1.6.3
      libruby         = "#{c['prefix']}/lib/ruby"
      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
      siteruby        = c['sitedir']
      siterubyver     = "$siteruby/#{version}"
      siterubyverarch = "$siterubyver/#{c['arch']}"
    else
      # V < 1.4.4
      libruby         = "#{c['prefix']}/lib/ruby"
      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
      siteruby        = "#{c['prefix']}/lib/ruby/#{version}/site_ruby"
      siterubyver     = siteruby
      siterubyverarch = "$siterubyver/#{c['arch']}"
    end
    parameterize = lambda {|path|
      path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix')
    }

    if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
      makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
    else
      makeprog = 'make'
    end

    [
      ExecItem.new('installdirs', 'std/site/home',
                   'std: install under libruby; site: install under site_ruby; home: install under $HOME')\
          {|val, table|
            case val
            when 'std'
              table['rbdir'] = '$librubyver'
              table['sodir'] = '$librubyverarch'
            when 'site'
              table['rbdir'] = '$siterubyver'
              table['sodir'] = '$siterubyverarch'
            when 'home'
              setup_rb_error '$HOME was not set' unless ENV['HOME']
              table['prefix'] = ENV['HOME']
              table['rbdir'] = '$libdir/ruby'
              table['sodir'] = '$libdir/ruby'
            end
          },
      PathItem.new('prefix', 'path', c['prefix'],
                   'path prefix of target environment'),
      PathItem.new('bindir', 'path', parameterize.call(c['bindir']),
                   'the directory for commands'),
      PathItem.new('libdir', 'path', parameterize.call(c['libdir']),
                   'the directory for libraries'),
      PathItem.new('datadir', 'path', parameterize.call(c['datadir']),
                   'the directory for shared data'),
      PathItem.new('mandir', 'path', parameterize.call(c['mandir']),
                   'the directory for man pages'),
      PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']),
                   'the directory for system configuration files'),
      PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']),
                   'the directory for local state data'),
      PathItem.new('libruby', 'path', libruby,
                   'the directory for ruby libraries'),
      PathItem.new('librubyver', 'path', librubyver,
                   'the directory for standard ruby libraries'),
      PathItem.new('librubyverarch', 'path', librubyverarch,
                   'the directory for standard ruby extensions'),
      PathItem.new('siteruby', 'path', siteruby,
          'the directory for version-independent aux ruby libraries'),
      PathItem.new('siterubyver', 'path', siterubyver,
                   'the directory for aux ruby libraries'),
      PathItem.new('siterubyverarch', 'path', siterubyverarch,
                   'the directory for aux ruby binaries'),
      PathItem.new('rbdir', 'path', '$siterubyver',
                   'the directory for ruby scripts'),
      PathItem.new('sodir', 'path', '$siterubyverarch',
                   'the directory for ruby extentions'),
      PathItem.new('rubypath', 'path', rubypath,
                   'the path to set to #! line'),
      ProgramItem.new('rubyprog', 'name', rubypath,
                      'the ruby program using for installation'),
      ProgramItem.new('makeprog', 'name', makeprog,
                      'the make program to compile ruby extentions'),
      SelectItem.new('shebang', 'all/ruby/never', 'ruby',
                     'shebang line (#!) editing mode'),
      BoolItem.new('without-ext', 'yes/no', 'no',
                   'does not compile/install ruby extentions')
    ]
  end
  private :standard_entries

  def load_multipackage_entries
    multipackage_entries().each do |ent|
      add ent
    end
  end

  def multipackage_entries
    [
      PackageSelectionItem.new('with', 'name,name...', '', 'ALL',
                               'package names that you want to install'),
      PackageSelectionItem.new('without', 'name,name...', '', 'NONE',
                               'package names that you do not want to install')
    ]
  end
  private :multipackage_entries

  ALIASES = {
    'std-ruby'         => 'librubyver',
    'stdruby'          => 'librubyver',
    'rubylibdir'       => 'librubyver',
    'archdir'          => 'librubyverarch',
    'site-ruby-common' => 'siteruby',     # For backward compatibility
    'site-ruby'        => 'siterubyver',  # For backward compatibility
    'bin-dir'          => 'bindir',
    'bin-dir'          => 'bindir',
    'rb-dir'           => 'rbdir',
    'so-dir'           => 'sodir',
    'data-dir'         => 'datadir',
    'ruby-path'        => 'rubypath',
    'ruby-prog'        => 'rubyprog',
    'ruby'             => 'rubyprog',
    'make-prog'        => 'makeprog',
    'make'             => 'makeprog'
  }

  def fixup
    ALIASES.each do |ali, name|
      @table[ali] = @table[name]
    end
    @items.freeze
    @table.freeze
    @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
  end

  def parse_opt(opt)
    m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}"
    m.to_a[1,2]
  end

  def dllext
    @rbconfig['DLEXT']
  end

  def value_config?(name)
    lookup(name).value?
  end

  class Item
    def initialize(name, template, default, desc)
      @name = name.freeze
      @template = template
      @value = default
      @default = default
      @description = desc
    end

    attr_reader :name
    attr_reader :description

    attr_accessor :default
    alias help_default default

    def help_opt
      "--#{@name}=#{@template}"
    end

    def value?
      true
    end

    def value
      @value
    end

    def resolve(table)
      @value.gsub(%r<\$([^/]+)>) { table[$1] }
    end

    def set(val)
      @value = check(val)
    end

    private

    def check(val)
      setup_rb_error "config: --#{name} requires argument" unless val
      val
    end
  end

  class BoolItem < Item
    def config_type
      'bool'
    end

    def help_opt
      "--#{@name}"
    end

    private

    def check(val)
      return 'yes' unless val
      casgems/gems/rdoc-6.5.1.1/lib/rdoc/rd/inline.rb000064400000002613150403134150014070 0ustar00, default, desc)
      super
      @ok = selection.split('/')
    end

    def config_type
      'select'
    end

    private

    def check(val)
      unless @ok.include?(val.strip)
        setup_rb_error "config: use --#{@name}=#{@template} (#{val})"
      end
      val.strip
    end
  end

  class ExecItem < Item
    def initialize(name, selection, desc, &block)
      super name, selection, nil, desc
      @ok = selection.split('/')
      @action = block
    end

    def config_type
      'exec'
    end

    def value?
      false
    end

    def resolve(table)
      setup_rb_error "$#{name()} wrongly used as option value"
    end

    undef set

    def evaluate(val, table)
      v = val.strip.downcase
      unless @ok.include?(v)
        setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})"
      end
      @action.call v, table
    end
  end

  class PackageSelectionItem < Item
    def initialize(name, template, default, help_default, desc)
      super name, template, default, desc
      @help_default = help_default
    end

    attr_reader :help_default

    def config_type
      'package'
    end

    private

    def check(val)
      unless File.dir?("packages/#{val}")
        setup_rb_error "config: no such package: #{val}"
      end
      val
    end
  end

  class MetaConfigEnvironment
    def initialize(config, installer)
      @config = config
      @installer = instgems/gems/rdoc-6.5.1.1/lib/rdoc/rd/block_parser.rb000064400000054447150403134150015274 0ustar00athItem.new(name, 'path', default, desc)
    end

    def set_config_default(name, default)
      @config.lookup(name).default = default
    end

    def remove_config(name)
      @config.remove(name)
    end

    # For only multipackage
    def packages
      raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer
      @installer.packages
    end

    # For only multipackage
    def declare_packages(list)
      raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer
      @installer.packages = list
    end
  end

end   # class ConfigTable


# This module requires: #verbose?, #no_harm?
module FileOperations

  def mkdir_p(dirname, prefix = nil)
    dirname = prefix + File.expand_path(dirname) if prefix
    $stderr.puts "mkdir -p #{dirname}" if verbose?
    return if no_harm?

    # Does not check '/', it's too abnormal.
    dirs = File.expand_path(dirname).split(%r<(?=/)>)
    if /\A[a-z]:\z/i =~ dirs[0]
      disk = dirs.shift
      dirs[0] = disk + dirs[0]
    end
    dirs.each_index do |idx|
      path = dirs[0..idx].join('')
      Dir.mkdir path unless File.dir?(path)
    end
  end

  def rm_f(path)
    $stderr.puts "rm -f #{path}" if verbose?
    return if no_harm?
    force_remove_file path
  end

  def rm_rf(path)
    $stderr.puts "rm -rf #{path}" if verbose?
    return if no_harm?
    remove_tree path
  end

  def remove_tree(path)
    if File.symlink?(path)
      remove_file path
    elsif File.dir?(path)
      remove_tree0 path
    else
      force_remove_file path
    end
  end

  def remove_tree0(path)
    Dir.foreach(path) do |ent|
      next if ent == '.'
      next if ent == '..'
      entpath = "#{path}/#{ent}"
      if File.symlink?(entpath)
        remove_file entpath
      elsif File.dir?(entpath)
        remove_tree0 entpath
      else
        force_remove_file entpath
      end
    end
    begin
      Dir.rmdir path
    rescue Errno::ENOTEMPTY
      # directory may not be empty
    end
  end

  def move_file(src, dest)
    force_remove_file dest
    begin
      File.rename src, dest
    rescue
      File.open(dest, 'wb') {|f|
        f.write File.binread(src)
      }
      File.chmod File.stat(src).mode, dest
      File.unlink src
    end
  end

  def force_remove_file(path)
    begin
      remove_file path
    rescue
    end
  end

  def remove_file(path)
    File.chmod 0777, path
    File.unlink path
  end

  def install(from, dest, mode, prefix = nil)
    $stderr.puts "install #{from} #{dest}" if verbose?
    return if no_harm?

    realdest = prefix ? prefix + File.expand_path(dest) : dest
    realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest)
    str = File.binread(from)
    if diff?(str, realdest)
      verbose_off {
        rm_f realdest if File.exist?(realdest)
      }
      File.open(realdest, 'wb') {|f|
        f.write str
      }
      File.chmod mode, realdest

      File.open("#{objdir_root()}/InstalledFiles", 'a') {|f|
        if prefix
          f.puts realdest.sub(prefix, '')
        else
          f.puts realdest
        end
      }
    end
  end

  def diff?(new_content, path)
    return true unless File.exist?(path)
    new_content != File.binread(path)
  end

  def command(*args)
    $stderr.puts args.join(' ') if verbose?
    system(*args) or raise RuntimeError,
        "system(#{args.map{|a| a.inspect }.join(' ')}) failed"
  end

  def ruby(*args)
    command config('rubyprog'), *args
  end
  
  def make(task = nil)
    command(*[config('makeprog'), task].compact)
  end

  def extdir?(dir)
    File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb")
  end

  def files_of(dir)
    Dir.open(dir) {|d|
      return d.select {|ent| File.file?("#{dir}/#{ent}") }
    }
  end

  DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn )

  def directories_of(dir)
    Dir.open(dir) {|d|
      return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT
    }
  end

end


# This module requires: #srcdir_root, #objdir_root, #relpath
module HookScriptAPI

  def get_config(key)
    @config[key]
  end

  alias config get_config

  # obsolete: use metaconfig to change configuration
  def set_config(key, val)
    @config[key] = val
  end

  #
  # srcdir/objdir (works only in the package directory)
  #

  def curr_srcdir
    "#{srcdir_root()}/#{relpath()}"
  end

  def curr_objdir
    "#{objdir_root()}/#{relpath()}"
  end

  def srcfile(path)
    "#{curr_srcdir()}/#{path}"
  end

  def srcexist?(path)
    File.exist?(srcfile(path))
  end

  def srcdirectory?(path)
    File.dir?(srcfile(path))
  end
  
  def srcfile?(path)
    File.file?(srcfile(path))
  end

  def srcentries(path = '.')
    Dir.open("#{curr_srcdir()}/#{path}") {|d|
      return d.to_a - %w(. ..)
    }
  end

  def srcfiles(path = '.')
    srcentries(path).select {|fname|
      File.file?(File.join(curr_srcdir(), path, fname))
    }
  end

  def srcdirectories(path = '.')
    srcentries(path).select {|fname|
      File.dir?(File.join(curr_srcdir(), path, fname))
    }
  end

end


class ToplevelInstaller

  Version   = '3.4.1'
  Copyright = 'Copyright (c) 2000-2005 Minero Aoki'

  TASKS = [
    [ 'all',      'do config, setup, then install' ],
    [ 'config',   'saves your configurations' ],
    [ 'show',     'shows current configuration' ],
    [ 'setup',    'compiles ruby extentions and others' ],
    [ 'install',  'installs files' ],
    [ 'test',     'run all tests in test/' ],
    [ 'clean',    "does `make clean' for each extention" ],
    [ 'distclean',"does `make distclean' for each extention" ]
  ]

  def ToplevelInstaller.invoke
    config = ConfigTable.new(load_rbconfig())
    config.load_standard_entries
    config.load_multipackage_entries if multipackage?
    config.fixup
    klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller)
    klass.new(File.dirname($0), config).invoke
  end

  def ToplevelInstaller.multipackage?
    File.dir?(File.dirname($0) + '/packages')
  end

  def ToplevelInstaller.load_rbconfig
    if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg }
      ARGV.delete(arg)
      load File.expand_path(arg.split(/=/, 2)[1])
      $".push 'rbconfig.rb'
    else
      require 'rbconfig'
    end
    ::Config::CONFIG
  end

  def initialize(ardir_root, config)
    @ardir = File.expand_path(ardir_root)
    @config = config
    # cache
    @valid_task_re = nil
  end

  def config(key)
    @config[key]
  end

  def inspect
    "#<#{self.class} #{__id__()}>"
  end

  def invoke
    run_metaconfigs
    case task = parsearg_global()
    when nil, 'all'
      parsearg_config
      init_installers
      exec_config
      exec_setup
      exec_install
    else
      case task
      when 'config', 'test'
        ;
      when 'clean', 'distclean'
        @config.load_savefile if File.exist?(@config.savefile)
      else
        @config.load_savefile
      end
      __send__ "parsearg_#{task}"
      init_installers
 gems/gems/rdoc-6.5.1.1/lib/rdoc/rd/inline.rb000064400000002613150403134150014070 0ustar00rbose = false
      when '--verbose'
        @config.verbose = true
      when '--help'
        print_usage $stdout
        exit 0
      when '--version'
        puts "#{File.basename($0)} version #{Version}"
        exit 0
      when '--copyright'
        puts Copyright
        exit 0
      else
        setup_rb_error "unknown global option '#{arg}'"
      end
    end
    nil
  end

  def valid_task?(t)
    valid_task_re() =~ t
  end

  def valid_task_re
    @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/
  end

  def parsearg_no_options
    unless ARGV.empty?
      task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1)
      setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}"
    end
  end

  alias parsearg_show       parsearg_no_options
  alias parsearg_setup      parsearg_no_options
  alias parsearg_test       parsearg_no_options
  alias parsearg_clean      parsearg_no_options
  alias parsearg_distclean  parsearg_no_options

  def parsearg_config
    evalopt = []
    set = []
    @config.config_opt = []
    while i = ARGV.shift
      if /\A--?\z/ =~ i
        @config.config_opt = ARGV.dup
        break
      end
      name, value = *@config.parse_opt(i)
      if @config.value_config?(name)
        @config[name] = value
      else
        evalopt.push [name, value]
      end
      set.push name
    end
    evalopt.each do |name, value|
      @config.lookup(name)gems/gems/rdoc-6.5.1.1/lib/rdoc/rd/block_parser.rb000064400000054447150403134150015274 0ustar00ion Procedure:'
    out.puts "  $ ruby #{File.basename $0} config"
    out.puts "  $ ruby #{File.basename $0} setup"
    out.puts "  # ruby #{File.basename $0} install (may require root privilege)"
    out.puts
    out.puts 'Detailed Usage:'
    out.puts "  ruby #{File.basename $0} <global option>"
    out.puts "  ruby #{File.basename $0} [<global options>] <task> [<task options>]"

    fmt = "  %-24s %s\n"
    out.puts
    out.puts 'Global options:'
    out.printf fmt, '-q,--quiet',   'suppress message outputs'
    out.printf fmt, '   --verbose', 'output messages verbosely'
    out.printf fmt, '   --help',    'print this message'
    out.printf fmt, '   --version', 'print version and quit'
    out.printf fmt, '   --copyright',  'print copyright and quit'
    out.puts
    out.puts 'Tasks:'
    TASKS.each do |name, desc|
      out.printf fmt, name, desc
    end

    fmt = "  %-24s %s [%s]\n"
    out.puts
    out.puts 'Options for CONFIG or ALL:'
    @config.each do |item|
      out.printf fmt, item.help_opt, item.description, item.help_default
    end
    out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's"
    out.puts
    out.puts 'Options for INSTALL:'
    out.printf fmt, '--no-harm', 'only display what to do if given', 'off'
    out.printf fmt, '--prefix=path',  'install path prefix', ''
    out.puts
  end

  #
  # Task Handlers
  #

  def exec_config
    @installer.exec_config
    @config.save   # must be final
  end

  def exec_setup
    @installer.exec_setup
  end

  def exec_install
    @installer.exec_install
  end

  def exec_test
    @installer.exec_test
  end

  def exec_show
    @config.each do |i|
      printf "%-20s %s\n", i.name, i.value if i.value?
    end
  end

  def exec_clean
    @installer.exec_clean
  end

  def exec_distclean
    @installer.exec_distclean
  end

end   # class ToplevelInstaller


class ToplevelInstallerMulti < ToplevelInstaller

  include FileOperations

  def initialize(ardir_root, config)
    super
    @packages = directories_of("#{@ardir}/packages")
    raise 'no package exists' if @packages.empty?
    @root_installer = Installer.new(@config, @ardir, File.expand_path('.'))
  end

  def run_metaconfigs
    @config.load_script "#{@ardir}/metaconfig", self
    @packages.each do |name|
      @config.load_script "#{@ardir}/packages/#{name}/metaconfig"
    end
  end

  attr_reader :packages

  def packages=(list)
    raise 'package list is empty' if list.empty?
    list.each do |name|
      raise "directory packages/#{name} does not exist"\
              unless File.dir?("#{@ardir}/packages/#{name}")
    end
    @packages = list
  end

  def init_installers
    @installers = {}
    @packages.each do |pack|
      @installers[pack] = Installer.new(@config,
                                       "#{@ardir}/packages/#{pack}",
                                       "packages/#{pack}")
    end
    with    = extract_selection(config('with'))
    without = extract_selection(config('without'))
    @selected = @installers.keys.select {|name|
                  (with.empty? or with.include?(name)) \
                      and not without.include?(name)
                }
  end

  def extract_selection(list)
    a = list.split(/,/)
    a.each do |name|
      setup_rb_error "no such package: #{name}"  unless @installers.key?(name)
    end
    a
  end

  def print_usage(f)
    super
    f.puts 'Inluded packages:'
    f.puts '  ' + @packages.sort.join(' ')
    f.puts
  end

  #
  # Task Handlers
  #

  def exec_config
    run_hook 'pre-config'
    each_selected_installers {|inst| inst.exec_config }
    run_hook 'post-config'
    @config.save   # must be final
  end

  def exec_setup
    run_hook 'pre-setup'
    each_selected_installers {|inst| inst.exec_setup }
    run_hook 'post-setup'
  end

  def exec_install
    run_hook 'pre-install'
    each_selected_installers {|inst| inst.exec_install }
    run_hook 'post-install'
  end

  def exec_test
    run_hook 'pre-test'
    each_selected_installers {|inst| inst.exec_test }
    run_hook 'post-test'
  end

  def exec_clean
    rm_f @config.savefile
    run_hook 'pre-clean'
    each_selected_installers {|inst| inst.exec_clean }
    run_hook 'post-clean'
  end

  def exec_distclean
    rm_f @config.savefile
    run_hook 'pre-distclean'
    each_selected_installers {|inst| inst.exec_distclean }
    run_hook 'post-distclean'
  end

  #
  # lib
  #

  def each_selected_installers
    Dir.mkdir 'packages' unless File.dir?('packages')
    @selected.each do |pack|
      $stderr.puts "Processing the package `#{pack}' ..." if verbose?
      Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}")
      Dir.chdir "packages/#{pack}"
      yield @installers[pack]
      Dir.chdir '../..'
    end
  end

  def run_hook(id)
    @root_installer.run_hook id
  end

  # module FileOperations requires this
  def verbose?
    @config.verbose?
  end

  # module FileOperations requires this
  def no_harm?
    @config.no_harm?
  end

end   # class ToplevelInstallerMulti


class Installer

  FILETYPES = %w( bin lib ext data conf man )

  include FileOperations
  include HookScriptAPI

  def initialize(config, srcroot, objroot)
    @config = config
    @srcdir = File.expand_path(srcroot)
    @objdir = File.expand_path(objroot)
    @currdir = '.'
  end

  def inspect
    "#<#{self.class} #{File.basename(@srcdir)}>"
  end

  def noop(rel)
  end

  #
  # Hook Script API base methods
  #

  def srcdir_root
    @srcdir
  end

  def objdir_root
    @objdir
  end

  def relpath
    @currdir
  end

  #
  # Config Access
  #

  # module FileOperations requires this
  def verbose?
    @config.verbose?
  end

  # module FileOperations requires this
  def no_harm?
    @config.no_harm?
  end

  def verbose_off
    begin
      save, @config.verbose = @config.verbose?, false
      yield
    ensure
      @config.verbose = save
    end
  end

  #
  # TASK config
  #

  def exec_config
    exec_task_traverse 'config'
  end

  alias config_dir_bin noop
  alias config_dir_lib noop

  def config_dir_ext(rel)
    extconf if extdir?(curr_srcdir())
  end

  alias config_dir_data noop
  alias config_dir_conf noop
  alias config_dir_man noop

  def extconf
    ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt
  end

  #
  # TASK setup
  #

  def exec_setup
    exec_task_traverse 'setup'
  end

  def setup_dir_bin(rel)
    files_of(curr_srcdir()).each do |fname|
      update_shebang_line "#{curr_srcdir()}/#{fname}"
    end
  end

  alias setup_dir_lib noop

  def setup_dir_ext(rel)
    make if extdir?(curr_srcdir())
  end

  alias setup_dir_data noop
  alias setup_dir_conf noop
  alias setup_dir_man noop

  def update_shebang_line(path)
    return if no_harm?
    return if config('shebang') == 'never'
    old = Shebang.load(path)
    if old
      $stderr.puts "warning: #{path}: Shebang line includes too many args.  It is not portable and your program may not work." if old.args.size > 1
      new = new_shebang(old)
      return if new.to_s == old.to_s
    else
      return unless config('shebang') == 'all'
      new = Shebang.new(config('rubypath'))
    end
    $stderr.puts "updating shebang: #{File.basename(path)}" if verbose?
    open_atomic_writer(path) {|output|
      File.open(path, 'rb') {|f|
        f.gets if old   # discard
        output.puts new.to_s
        output.print f.read
      }
    }
  end

  def new_shebang(old)
    if /\Aruby/ =~ File.basename(old.cmd)
      Shebang.new(config('rubypath'), old.args)
    elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby'
      Shebang.new(config('rubypath'), old.args[1..-1])
    else
      return old unless config('shebang') == 'all'
      Shebang.new(config('rubypath'))
    end
  end

  def open_atomic_writer(path, &block)
    tmpfile = File.basename(path) + '.tmp'
    begin
      File.open(tmpfile, 'wb', &block)
      File.rename tmpfile, File.basename(path)
    ensure
      File.unlink tmpfile if File.exist?(tmpfile)
    end
  end

  class Shebang
    def Shebang.load(path)
      line = nil
      File.open(path) {|f|
        line = f.gets
      }
      return nil unless /\A#!/ =~ line
      parse(line)
    end

    def Shebang.parse(line)
      cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ')
      new(cmd, args)
    end

    def initialize(cmd, args = [])
      @cmd = cmd
      @args = args
    end

    attr_reader :cmd
    attr_reader :args

    def to_s
      "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}")
    end
  end

  #
  # TASK install
  #

  def exec_install
    rm_f 'InstalledFiles'
    exec_task_traverse 'install'
  end

  def install_dir_bin(rel)
    install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755
  end

  def install_dir_lib(rel)
    install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644
  end

  def install_dir_ext(rel)
    return unless extdir?(curr_srcdir())
    install_files rubyextentions('.'),
                  "#{config('sodir')}/#{File.dirname(rel)}",
                  0555
  end

  def install_dir_data(rel)
    install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644
  end

  def install_dir_conf(rel)
    # FIXME: should not remove current config files
    # (rename previous file to .old/.org)
    install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644
  end

  def install_dir_man(rel)
    install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644
  end

  def install_files(list, dest, mode)
    mkdir_p dest, @config.install_prefix
    list.each do |fname|
      install fname, dest, mode, @config.install_prefix
    end
  end

  def libfiles
    glob_reject(%w(*.y *.output), targetfiles())
  end

  def rubyextentions(dir)
    ents = glob_select("*.#{@config.dllext}", targetfiles())
    if ents.empty?
      setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first"
    end
    ents
  end

  def targetfiles
    mapdir(existfiles() - hookfiles())
  end

  def mapdir(ents)
    ents.map {|ent|
      if File.exist?(ent)
      then ent                         # objdir
      else "#{curr_srcdir()}/#{ent}"   # srcdir
      end
    }
  end

  # picked up many entries from cvs-1.11.1/src/ignore.c
  JUNK_FILES = %w( 
    core RCSLOG tags TAGS .make.state
    .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
    *~ *.old *.bak *.BAK *.orig *.rej _$* *$

    *.org *.in .*
  )

  def existfiles
    glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.')))
  end

  def hookfiles
    %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt|
      %w( config setup install clean ).map {|t| sprintf(fmt, t) }
    }.flatten
  end

  def glob_select(pat, ents)
    re = globs2re([pat])
    ents.select {|ent| re =~ ent }
  end

  def glob_reject(pats, ents)
    re = globs2re(pats)
    ents.reject {|ent| re =~ ent }
  end

  GLOB2REGEX = {
    '.' => '\.',
    '$' => '\$',
    '#' => '\#',
    '*' => '.*'
  }

  def globs2re(pats)
    /\A(?:#{
      pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|')
    })\z/
  end

  #
  # TASK test
  #

  TESTDIR = 'test'

  def exec_test
    unless File.directory?('test')
      $stderr.puts 'no test in this package' if verbose?
      return
    end
    $stderr.puts 'Running tests...' if verbose?
    begin
      require 'test/unit'
    rescue LoadError
      setup_rb_error 'test/unit cannot loaded.  You need Ruby 1.8 or later to invoke this task.'
    end
    runner = Test::Unit::AutoRunner.new(true)
    runner.to_run << TESTDIR
    runner.run
  end

  #
  # TASK clean
  #

  def exec_clean
    exec_task_traverse 'clean'
    rm_f @config.savefile
    rm_f 'InstalledFiles'
  end

  alias clean_dir_bin noop
  alias clean_dir_lib noop
  alias clean_dir_data noop
  alias clean_dir_conf noop
  alias clean_dir_man noop

  def clean_dir_ext(rel)
    return unless extdir?(curr_srcdir())
    make 'clean' if File.file?('Makefile')
  end

  #
gems/gems/ruby-lsapi-5.6/scripts/lsruby_runner.rb000075500000002115150403134160015753 0ustar00pe, "#{task}_dir_#{type}"
    end
    run_hook "post-#{task}"
  end

  def traverse(task, rel, mid)
    dive_into(rel) {
      run_hook "pre-#{task}"
      __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '')
      directories_of(curr_srcdir()).each do |d|
        traverse task, "#{rel}/#{d}", mid
      end
      run_hook "post-#{task}"
    }
  end

  def dive_into(rel)
    return unless File.dir?("#{@srcdir}/#{rel}")

    dir = File.basename(rel)
    Dir.mkdir dir unless File.dir?(dir)
    prevdir gems/gems/rdoc-6.5.1.1/lib/rdoc/known_classes.rb000064400000005276150403134150015066 0ustar00gems/gems/ruby-lsapi-5.6/ext/lsapi/Makefile000064400000021765150403134160014407 0ustar00#!/opt/alt/ruby32/bin/ruby

require 'lsapi'

class CodeCache
    def [](filename)
		mtime = File.mtime( filename )		
		
		entry = @cache[filename];
		if entry != nil 
			return entry
						
		end
		code = compile(filename)
		#entry = CodeEntry.new( filename, mtime, code )
		@cache[filename] = code
		return code
    end

    private

    def initialize
      @cache = {}
    end

    def compile(filename)
		open(filename) do |f|
			s = f.read
			s.untaint
			binding = eval_string_wrap("binding")
			return eval(format("Proc.new {\n%s\n}", s), binding, filename, 0)
		end
    end
end


$count = 0;

$cache = CodeCache.new


while true
	$req = LSAPI.accept 
	break if $req == nil 
	
	filename = ENV['SCRIPT_FILENAME']
	filename.untaint

	filename =~ %r{^(\/.*?)\/*([^\/]+)$}
	path   = $1
	Dir.chdir( path )
	#load( filename, true )	
    code = $cache[filename]
    code.call
	
end

class CodeEntry
	public :path, :name, :mtime, :opcode 
	
	def initizlize( filename, mtime, opcode )
		filename =~ %r{^(\/.*?)\/*([^\/]+)$}
		@path   = $1
		@name   = $2
		@mtime  = mtime
		@opcode = opcode
	end

end


gems/gems/ruby-lsapi-5.6/ext/lsapi/Makefile000064400000021765150403134160014407 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/task.rb000064400000002475150403134150013567 0ustar00hhdrdir = $(DESTDIR)/opt/alt/ruby32/include
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
sitehdrdir = $(rubyhdrdir)/site_ruby
rubyhdrdir = $(DESTDIR)/opt/alt/ruby32/include
rubygemsdir = $(DESTDIR)/opt/alt/ruby32/share/rubygems
vendorarchdir = $(DESTDIR)/opt/alt/ruby32/lib64/ruby/vendor_ruby
vendorlibdir = $(vendordir)
vendordir = $(DESTDIR)/opt/alt/ruby32/share/ruby/vendor_ruby
sitearchdir = $(DESTDIR)/opt/alt/ruby32/lib64/ruby/site_ruby
sitelibdir = $(sitedir)
sitedir = $(DESTDIR)/opt/alt/ruby32/share/ruby/site_ruby
rubyarchdir = $(rubyarchprefix)
rubylibdir = $(rubylibprefix)
sitearchincludedir = $(includedir)/$(sitearch)
archincludedir = $(includedir)/$(arch)
sitearchlibdir = $(libdir)/$(sitearch)
archlibdir = $(DESTDIR)/opt/alt/ruby32/lib64
ridir = $(datarootdir)/$(RI_BASE_NAME)
mandir = $(DESTDIR)/opt/alt/ruby32/share/man
localedir = $(datarootdir)/locale
libdir = $(exec_prefix)/lib64
psdir = $(docdir)
pdfdir = $(docdir)
dvidir = $(docdir)
htmldir = $(docdir)
infodir = $(DESTDIR)/opt/alt/ruby32/share/info
docdir = $(datarootdir)/doc/$(PACKAGE)
oldincludedir = $(DESTDIR)/usr/include
includedir = $(exec_prefix)/include
localstatedir = $(DESTDIR)/var
sharedstatedir = $(DESTDIR)/var/lib
sysconfdir = $(DESTDIR)/etc
datadir = $(DESTDIR)/opt/alt/ruby32/share
datarootdir = $(prefix)/share
libexecdir = $(DESTDIR)/opt/alt/ruby3gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/store.rb000064400000000125150403134150013747 0ustar00cit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definitigems/gems/rdoc-6.5.1.1/lib/rdoc/ri/formatter.rb000064400000000162150403134150014617 0ustar00= $(CCDLFLAGS) -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexcegems/gems/rdoc-6.5.1.1/lib/rdoc/ri/paths.rb000064400000010536150403134150013741 0ustar00E)
RUBY = $(ruby)
BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
ruby_headers = $(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 $(arch_hdrdir)/ruby/config.h

RM = rm -f
RM_RF = rm -fr
RMDIRS = rmdir --ignore-fail-on-non-empty -p
MAKEDIRS = /usr/bin/mkdir -p
INSTALL = /usr/bin/install -c
INSTALL_PROG = $(INSTALL) -m 0755
INSTALL_DATA = $(INSTALL) -m 644
COPY = cp
TOUCH = exit >

#### End of system configuration section. ####

preload = 
libpath = . $(archlibdir)
LIBPATH =  -L. -L$(archlibdir) -Wl,-rpath,$(archlibdir)
DEFFILE = 

CLEANFILES = mkmf.log
DISTCLEANFILES = 
DISTCLEANDIRS = 

extout = 
extout_prefix = 
target_prefix = 
LOCAL_LIBS = 
LIBS = $(LIBRUBYARG_SHARED)  -lm -lpthread  -lc
ORIG_SRCS = lsapilib.c lsruby.c
SRCS = $(ORIG_SRCS) 
OBJS = lsapilib.o lsruby.o
HDRS = $(srcdir)/lsapidef.h $(srcdir)/lsapilib.h
LOCAL_HDRS = 
TARGET = lsapi
TARGET_NAME = lsapi
TARGET_ENTRY = Init_$(TARGET_NAME)
DLLIB = $(TARGET).so
EXTSTATIC = 
STATIC_LIB = 

TIMESTAMP_DIR = .
BINDIR        = $(bindir)
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
HDRDIR        = $(sitehdrdir)$(target_prefix)
ARCHHDgems/gems/rdoc-6.5.1.1/lib/rdoc/known_classes.rb000064400000005276150403134150015066 0ustar00) conftest.* mkmf.log
		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true

realclean: distclean
install: install-so install-rb

install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP)
	$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
clean-static::
	-$(Q)$(RM) gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapidef.h000064400000011054150403134160014675 0ustar00iling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.cc.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.mm.o:
	$(ECHO) compiling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.mm.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.cxx.o:
	$(ECHO) compiling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.cxx.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.cpp.o:
	$(ECHO) compiling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.cpp.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.c.o:
	$(ECHO) compiling $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.c.S:
	$(ECHO) translating $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.m.o:
	$(ECHO) compiling $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.m.S:
	$(ECHO) translating $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

$(TARGET_SO): $(OBJS) Makefile
	$(ECHO) linking shared-object $(DLLIB)
	-$(Q)$(RM) $(@)
	$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)



$(OBJS): $(HDRS) $(ruby_headers)
gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapgems/gems/rdoc-6.5.1.1/lib/rdoc/ri/driver.rb000064400000107400150403134150014112 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/task.rb000064400000002475150403134150013567 0ustar00omote
      products derived from this software without specific prior
      written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
OWNER 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.
*/


#ifndef  _LSAPIDEF_H_
#define  _LSAPIDEF_H_

#include <inttypes.h>

#if defined (c_plusplus) || defined (__cplusplus)
extern "C" {
#endif

enum
{
    H_ACCEPT = 0,
    H_ACC_CHARSET,
    H_ACC_ENCODING,
    H_ACC_LANG,
    H_AUTHORIZATION,
    H_CONNECTION,
    H_CONTENT_TYPE,
    H_CONTENT_LENGTH,
    H_COOKIE,
    H_COOKIE2,
    H_HOST,
    H_PRAGMA,
    H_REFERER,
    H_USERAGENT,
    H_CACHE_CTRL,
    H_IF_MODIFIED_SINCE,
    H_IF_MATCH,
    H_IF_NO_MATCH,
    H_IF_RANGE,
  gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/store.rb000064400000000125150403134150013747 0ustar00gems/gems/rdoc-6.5.1.1/lib/rdoc/ri/formatter.rb000064400000000162150403134150014617 0ustar00n;
    int32_t m_reqBodyLen;
    int32_t m_scriptFileOff;   /* path to the script file. */
    int32_t m_scriptNamgems/gems/rdoc-6.5.1.1/lib/rdoc/ri/paths.rb000064400000010536150403134150013741 0ustar00gems/gems/ruby-lsapi-5.6/ext/lsapi/lsruby.c000064400000055563150403134160014436 0ustar00
#include "ruby.h"

#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
#include "util.h"
#else
#include <ruby/util.h>
#include <ruby/version.h>
#endif

#include "lsapilib.h"
#include <errno.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>


#ifndef RUBY_API_VERSION_CODE
#define RUBY_API_VERSION_CODE (RUBY_API_VERSION_MAJOR*10000+RUBY_API_VERSION_MINOR*100+RUBY_API_VERSION_TEENY)
#endif

/* RUBY_EXTERN VALUE ruby_errinfo; */
RUBY_EXTERN VALUE rb_stdin;
RUBY_EXTERN VALUE rb_stdout;
#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
RUBY_EXTERN VALUE rb_defout;
#endif

static VALUE orig_stdin;
static VALUE orig_stdout;
static VALUE orig_stderr;
#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
static VALUE orig_defout;
#endif
static VALUE orig_env;

static VALUE env_copy;

static VALUE lsapi_env;

static int MAX_BODYBUF_LENGTH = (10 * 1024 * 1024);

#if RUBY_API_VERSION_CODE >= 20700
# if defined rb_tainted_str_new
#  undef rb_tainted_str_new
# endif
# define rb_tainted_str_new(p,l)  rb_str_new((p),(l))
#endif

/* static VALUE lsapi_objrefs; */

typedef struct lsapi_data
{
    LSAPI_Request * req;
    VALUE           env;
    ssize_t      (* fn_write)( LSAPI_Request *, const char * , size_t );
}lsapi_data;

static VALUE cLSAPI;

static VALUE s_req = Qnil;
static lsapi_data * s_req_data;

static VALUE s_req_stderr = Qnil;
static lsapi_data * s_stderr_data;
static pid_t s_pid = 0;

typedef struct lsapi_body
{
    char        *bodyBuf;  //we put small one into memory, otherwise, into a memory mapping file, and we still use the bodyBuf to access this mapping
    int	        bodyLen;	//expected length got form content-length
    int	        bodyCurrentLen;	//current length by read() readBodyToReqBuf
    int	        curPos;
}lsapi_body;

static lsapi_body	s_body;
static char sTempFile[1024] = {0};

/*
 * static void lsapi_ruby_setenv(const char *name, const char *value)
 * {
 *    if (!name) return;
 * 
 *    if (value && *value)
 *	    ruby_setenv(name, value);
 *    else
 *        ruby_unsetenv(name);
 } *        *
 */


static void lsapi_mark( lsapi_data * data )
{
    rb_gc_mark( data->env );
}
/*
 * static void lsapi_free_data( lsapi_data * data )
 * {
 *   free( data );
 } *        *
 */
static int add_env_rails( const char * pKey, int keyLen, const char * pValue, int valLen,
                          void * arg )
{
    char * p;
    int len;
    /* Fixup some environment variables for rails */
    switch( *pKey )
    {
        case 'Q':
            if ( strcmp( pKey, "QUERY_STRING" ) == 0 )
            {
                if ( !*pValue )
                    return 1;
            }
            break;
        case 'R':
            if (( *(pKey+8) == 'U' )&&( strcmp( pKey, "REQUEST_URI" ) == 0 ))
            {
                p = strchr( pValue, '?' );
                if ( p )
                {
                    len = valLen - ( p - pValue ) - 1;
                    /* 
                     *                valLen = p - pValue;
                     *p++ = 0;
                     */
                }
                else
                {
                    p = (char *)pValue + valLen;
                    len = 0;
                }
                rb_hash_aset( lsapi_env,rb_tainted_str_new("PATH_INFO", 9),
                              rb_tainted_str_new(pValue, p - pValue));
                rb_hash_aset( lsapi_env,rb_tainted_str_new("REQUEST_PATH", 12),
                              rb_tainted_str_new(pValgems/gems/rdoc-6.5.1.1/lib/rdoc/ri/driver.rb000064400000107400150403134150014112 0ustar00         rb_tainted_str_new(pValue, valLen));
    return 1;
}

static int add_env_no_fix( const char * pKey, int keyLen, const char * pValue, int valLen,
                           void * arg )
{
    rb_hash_aset( lsapi_env,rb_tainted_str_new(pKey, keyLen),
                  rb_tainted_str_new(pValue, valLen));
    return 1;
}

typedef int (*fn_add_env)( const char * pKey, int keyLen, const char * pValue, int valLen,
                           void * arg );

fn_add_env s_fn_add_env = add_env_no_fix;

static void clear_env()
{
    /* rb_funcall( lsapi_env, rb_intern( "clear" ), 0 ); */
    rb_funcall( lsapi_env, rb_intern( "replace" ), 1, env_copy );
}

static void setup_cgi_env( lsapi_data * data )
{
    clear_env();
    
    LSAPI_ForeachHeader_r( data->req, s_fn_add_env, data );
    LSAPI_ForeachEnv_r( data->req, s_fn_add_env, data );
}

static VALUE lsapi_s_accept( VALUE self )
{
    int pid;
    if ( LSAPI_Prefork_Accept_r( &g_req ) == -1 )
        return Qnil;
    else
    {
        if (s_body.bodyBuf != NULL)
            free (s_body.bodyBuf);
        
        s_body.bodyBuf = NULL;
        s_body.bodyLen = -1;
        s_body.bodyCurrentLen = 0;
        s_body.curPos = 0;    
        
        pid = getpid();
        if ( pid != s_pid )
        {
            s_pid = pid;
            rb_funcall( Qnil, rb_intern( "srand" ), 0 );
        }
        
        setup_cgi_env( s_req_data );
        return s_req;
    }
}


static VALUE lsapi_s_accept_new_conn(VALUE self)
{
    if (LSAPI_Accept_Before_Fork(&g_req) == -1 )
        return Qnil;
    else
        return s_req;
}


static VALUE lsapi_s_postfork_child(VALUE self)
{
    LSAPI_Postfork_Child(&g_req);
    return s_req;
}


static VALUE lsapi_s_postfork_parent(VALUE self)
{
    LSAPI_Postfork_Parent(&g_req);
    return s_req;
}


/*
 * static int chdir_file( const char * pFile )
 * {
 *    char * p = strrchr( pFile, '/' );
 *    int ret;
 *    if ( !p )
 *        return -1;
 *p = 0;
 ret = chdir( pFile );
 *p = '/';
 return ret;
 }
 */

static VALUE lsapi_eval_string_wrap(VALUE self, VALUE str)
{
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4)
    {
        Check_Type(str, T_STRING);
    }
    else
#endif
    {
        SafeStringValue(str);
    }
    return rb_eval_string_wrap(StringValuePtr(str), NULL);
}

static VALUE lsapi_process( VALUE self )
{
/*    lsapi_data *data;
    const char * pScriptPath;
    Data_Get_Struct(self,lsapi_data, data);
    pScriptPath = LSAPI_GetScriptFileName_r( data->req );
*/
    /*
     *   if ( chdir_file( pScriptPath ) == -1 )
     *   {
     *       lsapi_send_error( 404 );
     *   }
     *   rb_load_file( pScriptPath );
     */
    return Qnil;
}


static VALUE lsapi_putc(VALUE self, VALUE c)
{
    char ch = NUM2CHR(c);
    lsapi_data *data;
    Data_Get_Struct(self,lsapi_data, data);
    if ( (*data->fn_write)( data->req, &ch, 1 ) == 1 )
        return c;
    else
        return INT2NUM( EOF );
}


static VALUE lsapi_write( VALUE self, VALUE str )
{
    lsapi_data *data;
    int len;
    Data_Get_Struct(self,lsapi_data, data);
    /*    len = LSAPI_Write_r( data->req, RSTRING_PTR(str), RSTRING_LEN(str) ); */
    if (TYPE(str) != T_STRING)
        str = rb_obj_as_string(str);
    len = (*data->fn_write)( data->req, RSTRING_PTR(str), RSTRING_LEN(str) );
    return INT2NUM( len );
}

static VALUE lsapi_print( int argc, VALUE *argv, VALUE out )
{
    int i;
    VALUE line;
    
    /* if no argument given, print `$_' */
    if (argc == 0)
    {
        argc = 1;
        line = rb_lastline_get();
        argv = &line;
    }
    for (i = 0; i<argc; i++)
    {
        if (!NIL_P(rb_output_fs) && i>0)
        {
            lsapi_write(out, rb_output_fs);
        }
        switch (TYPE(argv[i]))
        {
            case T_NIL:
                lsapi_write(out, rb_str_new2("nil"));
                break;
            default:
                lsapi_write(out, argv[i]);
                break;
        }
    }
    if (!NIL_P(rb_output_rs))
    {
        lsapi_write(out, rb_output_rs);
    }
    
    return Qnil;
}

static VALUE lsapi_printf(int argc, VALUE *argv, VALUE out)
{
    lsapi_write(out, rb_f_sprintf(argc, argv));
    return Qnil;
}

static VALUE lsapi_puts _((int, VALUE*, VALUE));

#if RUBY_API_VERSION_CODE >= 10900
static VALUE lsapi_puts_ary(VALUE ary, VALUE out, int recur )
{
    VALUE tmp;
    long i;
    
    if (recur)
    {
        tmp = rb_str_new2("[...]");
        rb_io_puts(1, &tmp, out);
        return Qnil;
    }
    for (i=0; i<RARRAY_LEN(ary); i++) 
    {
        tmp = RARRAY_PTR(ary)[i];
        rb_io_puts(1, &tmp, out);
    }
    return Qnil;
    
}
#else
static VALUE lsapi_puts_ary(VALUE ary, VALUE out)
{
    VALUE tmp;
    int i;
    
    for (i=0; i<RARRAY_LEN(ary); i++)
    {
        tmp = RARRAY_PTR(ary)[i];
        if (rb_inspecting_p(tmp))
        {
            tmp = rb_str_new2("[...]");
        }
        lsapi_puts(1, &tmp, out);
    }
    return Qnil;
}
#endif

static VALUE lsapi_puts(int argc, VALUE *argv, VALUE out)
{
    int i;
    VALUE line;
    
    /* if no argument given, print newline. */
    if (argc == 0)
    {
        lsapi_write(out, rb_default_rs);
        return Qnil;
    }
    for (i=0; i<argc; i++)
    {
        switch (TYPE(argv[i]))
        {
            case T_NIL:
                line = rb_str_new2("nil");
                break;
            case T_ARRAY:
#if RUBY_API_VERSION_CODE >= 10900
                rb_exec_recursive(lsapi_puts_ary, argv[i], out);
#else
                rb_protect_inspect(lsapi_puts_ary, argv[i], out);
#endif
                continue;
            default:
                line = argv[i];
                break;
        }
        line = rb_obj_as_string(line);
        lsapi_write(out, line);
        if (*( RSTRING_PTR(line) + RSTRING_LEN(line) - 1 ) != '\n')
        {
            lsapi_write(out, rb_default_rs);
        }
    }
    
    return Qnil;
}


static VALUE lsapi_addstr(VALUE out, VALUE str)
{
    lsapi_write(out, str);
    return out;
}

static VALUE lsapi_flush( VALUE self )
{
    /*
     *    lsapi_data *data;
     *    Data_Get_Struct(self,lsapi_data, data);
     */
    LSAPI_Flush_r( &g_req ); 
    return Qnil;
}

static VALUE lsapi_getc( VALUE self )
{
    int ch;
    /*
     *    lsapi_data *data;
     *    Data_Get_Struct(self,lsapi_data, data);
     */
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4 && !OBJ_TAINTED(self))
    {
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
    }
#endif
    ch = LSAPI_ReqBodyGetChar_r( &g_req );
    if ( ch == EOF )
        return Qnil;
    return INT2NUM( ch );
}

static inline int isBodyWriteToFile()
{
    return ((s_body.bodyLen >= MAX_BODYBUF_LENGTH)? (1): (0));
}

//create a temp file and open it, if failed, fd = -1
static inline int createTempFile()
{
    int fd = -1;
    char *sfn = strdup(sTempFile);
    
    if ((fd = mkstemp(sfn)) == -1)
    {
        fprintf(stderr, "%s: %s\n", sfn, strerror(errno));
    }
    else
        unlink(sfn);
    
    free(sfn);
    return fd;
}

//return 1 if error occured!
//if already created, always OK (0)
static int createBodyBuf()
{
    int fd = -1;
    if (s_body.bodyLen == -1)
    {
        s_body.bodyLen = LSAPI_GetReqBodyLen_r(&g_req);
        //Error if get a zeor length, should not happen 
        if (s_body.bodyLen < 0)
        {
            //Wrong bode length will be treated as 0
            s_body.bodyLen = 0;
        }
        
        if (s_body.bodyLen > 0) 
        {
            if (isBodyWriteToFile())
            {
                //create file mapping
                fd = createTempFile();
                if (fd == -1)
                {
                    return 1;
                }
                if (ftruncate(fd, s_body.bodyLen) == 0)
                {
                    perror("ftruncate() failed. \n");
                    close(fd);
                    return 1;
                }
                s_body.bodyBuf = mmap(NULL, s_body.bodyLen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
                if (s_body.bodyBuf == MAP_FAILED)
                {
                    perror("File mapping failed. \n");
                    close(fd);
                    return 1;
                }
                close(fd);  //close since needn't it anymore
            }
            else
            {
                s_body.bodyBuf = (char *)calloc(s_body.bodyLen, sizeof(char));
                if (s_body.bodyBuf == NULL)
                {
                    perror("Memory calloc error");
                    return 1;
                }
            }
        }
    }

    return 0;   
}

static inline int isAllBodyRead()
{
    return (s_body.bodyCurrentLen < s_body.bodyLen)? 0 : 1;
}

static inline int isEofBodyBuf()
{
    return (s_body.curPos < s_body.bodyLen) ? 0 : 1;
}
//try to read length as times pagesize (such as 8KB * N)
static int readBodyBuf(const int needRead)
{
    const int blockSize = 8192;
    char *buff = s_body.bodyBuf + s_body.bodyCurrentLen;
    int nRead;
    int readMore = (needRead + blockSize -1) / blockSize * blockSize;
    int remain = LSAPI_GetReqBodyRemain_r( &g_req );
    //Only when not enough left, needReadChange will be changed!!!
    if (remain < readMore) 
        readMore = remain;

    if ( readMore <= 0 )
        return 0;
    
    nRead = LSAPI_ReadReqBody_r(&g_req, buff, readMore);
    if ( nRead > 0 )
        s_body.bodyCurrentLen += nRead;

    return nRead;
}

static VALUE lsapi_gets( VALUE self )
{
    VALUE str;
    const int blkSize = 4096;
    int n;
    char *p = NULL;
    
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4 && !OBJ_TAINTED(self))
    {
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
    }
#endif
    if (createBodyBuf() == 1)
    {
        return Qnil;
    }   
    
    //comment:
    while((p = memmem(s_body.bodyBuf + s_body.curPos, s_body.bodyCurrentLen - s_body.curPos, "\n", 1)) == NULL) 
    {
        if (isAllBodyRead() == 1)
            break;
        //read one page and check, then reply
        readBodyBuf(blkSize);
    }
    
    p = memmem(s_body.bodyBuf + s_body.curPos, s_body.bodyCurrentLen - s_body.curPos, "\n", 1);
    if (p != NULL)
        n = p - s_body.bodyBuf - s_body.curPos + 1;
    else
        n = s_body.bodyCurrentLen - s_body.curPos;
    
    str = rb_str_buf_new( n );
#if RUBY_API_VERSION_CODE < 20700
    OBJ_TAINT(str);
#endif
    
    if (n > 0)
    {
        rb_str_buf_cat( str, s_body.bodyBuf + s_body.curPos, n );
        s_body.curPos += n;
    }
    
    return str;
}

static VALUE lsapi_read(int argc, VALUE *argv, VALUE self)
{
    VALUE str;
    int n;
    int needRead;
    int nRead;
    
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4 && !OBJ_TAINTED(self))
    {
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
    }
#endif
    if (createBodyBuf() == 1)
    {
        return Qnil;
    }
    
    //we need to consider these 4 cases:
    //1, need all data since argc == 0, we may have all data 2, or not
    //3, need a length of data (argv >= 1), we may have enough data already read, 4, or not
    if (argc == 0)
        n = s_body.bodyLen - s_body.curPos;
    else
    {
        n = NUM2INT(argv[0]); //request that length from currentpos
        if (n < 0)
            return Qnil;
        if (n > s_body.bodyLen - s_body.curPos)
            n = s_body.bodyLen - s_body.curPos;            
    }
    needRead = s_body.curPos + n - s_body.bodyCurrentLen;
    if (needRead < 0)
        needRead = 0;
    
    str = rb_str_buf_new( n );
#if RUBY_API_VERSION_CODE < 20700
    OBJ_TAINT(str);
#endif
    if (n == 0)
        return str;
    
    //copy already have part first
    if (n - needRead != 0)
    {
        rb_str_buf_cat( str, s_body.bodyBuf + s_body.curPos, n - needRead);
        s_body.curPos += (n - needRead);
    }
    
    if (needRead > 0)
    {
        //try to read needRead, but may be less (changed) when read the end of the data
        nRead = readBodyBuf(needRead);
        if (nRead > 0)
        {
            n = ((nRead < needRead) ? nRead : needRead);
            rb_str_buf_cat( str, s_body.bodyBuf + s_body.curPos, n );
            s_body.curPos += n;
        }
    }
    
    return str;
}

static VALUE lsapi_rewind(VALUE self)
{  
    s_body.curPos = 0;
    return self;
}

static VALUE lsapi_each(VALUE self)
{
    VALUE str;
    lsapi_rewind(self);
   
    while(isEofBodyBuf() != 1)
    {
        str = lsapi_gets(self);
        rb_yield(str);
    }
    return self;

}

static VALUE lsapi_eof(VALUE self)
{
    return (LSAPI_GetReqBodyRemain_r( &g_req ) <= 0) ? Qtrue : Qfalse;
}

static VALUE lsapi_binmode(VALUE self)
{
    return self;
}

static VALUE lsapi_isatty(VALUE self)
{
    return Qfalse;
}

static VALUE lsapi_sync(VALUE self)
{
    return Qfalse;
}

static VALUE lsapi_setsync(VALUE self,VALUE sync)
{
    return Qfalse;
}

static VALUE lsapi_close(VALUE self)
{
    LSAPI_Flush_r( &g_req );
    if (isBodyWriteToFile())
    {
        //msync(s_body.bodyBuf, s_body.bodyLen, MS_SYNC);
        //sleep(5);
        munmap(s_body.bodyBuf, s_body.bodyLen);
    }
    else
        free(s_body.bodyBuf);
    
    s_body.bodyBuf = NULL;
    s_body.bodyLen = -1;
    s_body.bodyCurrentLen = 0;
    s_body.curPos = 0;    
    //Should the temp be deleted here?!
        
    return Qnil;
}


static VALUE lsapi_reopen( int argc, VALUE *argv, VALUE self)
{
    VALUE orig_verbose;
    if ( self == s_req_stderr )
    {
        /* constant silence hack */
        orig_verbose = (VALUE)ruby_verbose;
        ruby_verbose = Qnil;
        
        rb_define_global_const("STDERR", orig_stderr);
        
        ruby_verbose = (VALUE)orig_verbose;
        
        return rb_funcall2( orig_stderr, rb_intern( "reopen" ), argc, argv );
        
    }
    return self;
}

static void readMaxBodyBufLength()
{
    int n;
    const char *p = getenv( "LSAPI_MAX_BODYBUF_LENGTH" );
    if ( p )
    {
        n = atoi( p );
        if (n > 0)
        {
            if (strstr(p, "M") || strstr(p, "m"))
                MAX_BODYBUF_LENGTH = n * 1024 * 1024;
            else if (strstr(p, "K") || strstr(p, "k"))
                MAX_BODYBUF_LENGTH = n * 1024;
            else
                MAX_BODYBUF_LENGTH = n;
        }
    }
}

static void readTempFileTemplate()
{
    const char *p = getenv( "LSAPI_TEMPFILE" );
    if (p == NULL || strlen(p) > 1024 - 7)
         p = "/tmp/lsapi.XXXXXX";
    
    strcpy(sTempFile, p);
    if (strlen(p) <= 6 || strcmp(p + (strlen(p) - 6), "XXXXXX") != 0)
        strcat(sTempFile, ".XXXXXX");
}

static void initBodyBuf()
{
    s_body.bodyBuf = NULL;
    s_body.bodyLen = -1;
    s_body.bodyCurrentLen = 0;
    s_body.curPos = 0;    
}
void Init_lsapi()
{
    VALUE orig_verbose; 
    char * p;
    int prefork = 0;
    LSAPI_Init();
    initBodyBuf();
    
    readMaxBodyBufLength();
    readTempFileTemplate();
    
    p = getenv("LSAPI_CHILDREN");
    if (p && atoi(p) > 1)
        prefork = 1;

#ifdef rb_thread_select
    LSAPI_Init_Env_Parameters( rb_thread_select );
#else
    LSAPI_Init_Env_Parameters( select );
#endif
    
    s_pid = getpid();
    
    p = getenv( "RACK_ROOT" );
    if ( p )
    {
        if ( chdir( p ) == -1 )
            perror( "chdir()" );
    }
    if ( p || getenv( "RACK_ENV" ) )
        s_fn_add_env = add_env_rails;
    
    orig_stdin = rb_stdin;
    orig_stdout = rb_stdout;
    orig_stderr = rb_stderr;
#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
    orig_defout = rb_defout;
#endif
    orig_env = rb_const_get( rb_cObject, rb_intern("ENV") );
    env_copy = rb_funcall( orig_env, rb_intern( "to_hash" ), 0 );
    
    /* tell the garbage collector it is a global variable, do not recycle it. */
    rb_global_variable(&env_copy);
    
    rb_hash_aset( env_copy,rb_tainted_str_new("GATEWAY_Irewindable_input.rbNTERFACE", 17),
                                              rb_tainted_str_new("CGI/1.2", 7));
        
    rb_define_global_function("eval_string_wrap", lsapi_eval_string_wrap, 1);
    
    cLSAPI = rb_define_class("LSAPI", rb_cObject);
    rb_undef_alloc_func(cLSAPI);
    rb_define_singleton_method(cLSAPI, "accept", lsapi_s_accept, 0);
    if (prefork)
    {
        rb_define_singleton_method(cLSAPI, "accept_new_connection", lsapi_s_accept_new_conn, 0);
        rb_define_singleton_method(cLSAPI, "postfork_child", lsapi_s_postfork_child, 0);
        rb_define_singleton_method(cLSAPI, "postfork_parent", lsapi_s_postfork_parent, 0);
    }

    rb_define_method(cLSAPI, "process", lsapi_process, 0 );
    /* rb_define_method(cLSAPI, "initialize", lsapi_initialize, 0); */
    rb_define_method(cLSAPI, "putc", lsapi_putc, 1);
    rb_define_method(cLSAPI, "write", lsapi_write, 1);
    rb_define_method(cLSAPI, "print", lsapi_print, -1);
    rb_define_method(cLSAPI, "printf", lsapi_printf, -1);
    rb_define_method(cLSAPI, "puts", lsapi_puts, -1);
    rb_define_method(cLSAPI, "<<", lsapi_addstr, 1);
    rb_define_methgems/gems/ruby-lsapi-5.6/ext/lsapi/extconf.rb000064400000000374150403134160014733 0ustar00se, 0);
    /* rb_define_method(cLSAPI, "closed?", lsapi_closed, 0); */
    rb_define_method(cLSAPI, "binmode", lsapi_binmode, 0);
    rb_define_method(cLSAPI, "isatty", lsapi_isatty, 0);
    rb_define_method(cLSAPI, "tty?", lsapi_isatty, 0);
    rb_degems/gems/ruby-lsapi-5.6/ext/lsapi/lsapilib.c000064400000350541150403134160014707 0ustar00 */
    orig_verbose = (VALUE)ruby_verbose;
    ruby_verbose = Qnil;
    
    lsapi_env = rb_hash_new();
    clear_env();
    /* redefine ENV using a hash table, should be faster than char **environment */
    rb_define_global_const("ENV", lsapi_env);
    
    rb_define_global_const("STDERR", rb_stderr);
    
    ruby_verbose = (VALUE)orig_verbose;
    
    return;
}

gems/gems/ruby-lsapi-5.6/ext/lsapi/extconf.rb000064400000000374150403134160014733 0ustar00require 'mkmf'
dir_config( 'lsapi' )
if ( have_library( "socket" ))
    have_library( "nsl" )
end
if RUBY_VERSION =~ /1.9/ then
    $CPPFLAGS += " -DRUBY_19"
end 
if RUBY_VERSION =~ /2/ then
    $CPPFLAGS += " -DRUBY_2"
end 
create_makefile( "lsapi" )
gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapilib.c000064400000350541150403134160014707 0ustar00//#define LSAPI_DEBUG
/*
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * 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.
    * Neither the name of the Lite Speed Technologies Inc nor the
      names of its contributors may be used to endorse or promote
      products derived from this software without specific prior
      written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
OWNER 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.
*/


#include <ctype.h>
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <sys/stat.h>
#include <sched.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <grp.h>
#include <pwd.h>
#include <time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/un.h>

#include "lsapilib.h"

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
#include <sys/prctl.h>
#endif

#if defined(__FreeBSD__ ) || defined(__NetBSD__) || defined(__OpenBSD__) \
    || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
#include <sys/sysctl.h>
#endif

#include <inttypes.h>
#ifndef uint32
#define uint32 uint32_t
#endif

struct lsapi_MD5Context {
    uint32 buf[4];
    uint32 bits[2];
    unsigned char in[64];
};

void lsapi_MD5Init(struct lsapi_MD5Context *context);
void lsapi_MD5Update(struct lsapi_MD5Context *context, unsigned char const *buf,
           unsigned len);
void lsapi_MD5Final(unsigned char digest[16], struct lsapi_MD5Context *context);

/*
 * This is needed to make RSAREF happy on some MS-DOS compilers.
 */
typedef struct lsapi_MD5Context lsapi_MD5_CTX;


#define LSAPI_ST_REQ_HEADER     1
#define LSAPI_ST_REQ_BODY       2
#define LSAPI_ST_RESP_HEADER    4
#define LSAPI_ST_RESP_BODY      8
#define LSAPI_ST_BACKGROUND     16

#define LSAPI_RESP_BUF_SIZE     8192
#define LSAPI_INIT_RESP_HEADER_LEN 4096

enum
{
    LSAPI_STATE_IDLE,
    LSAPI_STATE_CONNECTED,
    LSAPI_STATE_ACCEPTING,
};

typedef struct lsapi_child_status
{
    int     m_pid;
    long    m_tmStart;

    volatile short   m_iKillSent;
    volatile char    m_inProcess;
    volatile char    m_state;
    volatile int     m_iReqCounter;

    volatile long    m_tmWaitBegin;
    volatile long    m_tmReqBegin;
    volatile long    m_tmLastCheckPoint;
}
lsapi_child_status;

static lsapi_child_status * s_worker_status = NULL;

static int g_inited = 0;
static int g_running = 1;
static int s_ppid;
static int s_restored_ppid = 0;
static int s_pid = 0;
static int s_slow_req_msecs = 0;
static int s_keep_listener = 1;
static int s_dump_debug_info = 0;
static int s_pid_dump_debug_info = 0;
static int s_req_processed = 0;
static int s_skip_write = 0;
static int (*pthread_atfork_func)(void (*prepare)(void), void (*parent)(void),
                                  void (*child)(void)) = NULL;

static int *s_busy_workers = NULL;
static int *s_accepting_workers = NULL;
static int *s_global_counter = &s_req_processed;
static int s_max_busy_workers = -1;
static char *s_stderr_log_path = NULL;
static int s_stderr_is_pipe = 0;
static int s_ignore_pid = -1;
static size_t s_total_pages = 1;
static size_t s_min_avail_pages = 256 * 1024;
static size_t *s_avail_pages = &s_total_pages;

LSAPI_Request g_req =
{ .m_fdListen = -1, .m_fd = -1 };

static char         s_secret[24];

static LSAPI_On_Timer_pf s_proc_group_timer_cb = NULL;

void Flush_RespBuf_r( LSAPI_Request * pReq );
static int lsapi_reopen_stderr(const char *p);

static const char *CGI_HEADERS[H_TRANSFER_ENCODING+1] =
{
    "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET",
    "HTTP_ACCEPT_ENCODING",
    "HTTP_ACCEPT_LANGUAGE", "HTTP_AUTHORIZATION",
    "HTTP_CONNECTION", "CONTENT_TYPE",
    "CONTENT_LENGTH", "HTTP_COOKIE", "HTTP_COOKIE2",
    "HTTP_HOST", "HTTP_PRAGMA",
    "HTTP_REFERER", "HTTP_USER_AGENT",
    "HTTP_CACHE_CONTROL",
    "HTTP_IF_MODIFIED_SINCE", "HTTP_IF_MATCH",
    "HTTP_IF_NONE_MATCH",
    "HTTP_IF_RANGE",
    "HTTP_IF_UNMODIFIED_SINCE",
    "HTTP_KEEP_ALIVE",
    "HTTP_RANGE",
    "HTTP_X_FORWARDED_FOR",
    "HTTP_VIA",
    "HTTP_TRANSFER_ENCODING"
};

static int CGI_HEADER_LEN[H_TRANSFER_ENCODING+1] =
{    11, 19, 20, 20, 18, 15, 12, 14, 11, 12, 9, 11, 12, 15, 18,
     22, 13, 18, 13, 24, 15, 10, 20, 8, 22 };


static const char *HTTP_HEADERS[H_TRANSFER_ENCODING+1] =
{
    "Accept", "Accept-Charset",
    "Accept-Encoding",
    "Accept-Language", "Authorization",
    "Connection", "Content-Type",
    "Content-Length", "Cookie", "Cookie2",
    "Host", "Pragma",
    "Referer", "User-Agent",
    "Cache-Control",
    "If-Modified-Since", "If-Match",
    "If-None-Match",
    "If-Range",
    "If-Unmodified-Since",
    "Keep-Alive",
    "Range",
    "X-Forwarded-For",
    "Via",
    "Transfegems/gems/rdoc-6.5.1.1/lib/rdoc/parser.rb000064400000016673150403134150013514 0ustar00+ 1, tm.tm_mday,
                tm.tm_hour, tm.tm_min, tm.tm_sec, (int)tv.tv_usec);
        }
        else if (flag & LSAPI_LOG_TIMESTAMP_HMS)
        {
            p += snprintf(p, 1024, "%02d:%02d:%02d ",
                tm.tm_hour, tm.tm_min, tm.tm_sec);
        }
    }

    int level = flag & LSAPI_LOG_LEVEL_BITS;
    if (level && level <= LSAPI_LOG_FLAG_FATAL)
    {
        p += snprintf(p, 100, "[%s] ", s_log_level_names[level]);
    }

    if (flag & LSAPI_LOG_PID)
    {
        p += snprintf(p, 100, "[UID:%d][%d] ", getuid(), s_pid);
    }

    if (p > buf)
        fprintf(stderr, "%.*s", (int)(p - buf), buf);
    va_list ap;
    va_start(ap, fmt);
    vfprintf(stderr, fmt, ap);
    va_end(ap);
}

#ifdef LSAPI_DEBUG

#define DBGLOG_FLAG (LSAPI_LOG_TIMESTAMP_FULL|LSAPI_LOG_FLAG_DEBUG|LSAPI_LOG_PID)
#define lsapi_dbg(...)   LSAPI_Log(DBGLOG_FLAG, __VA_ARGS__)

#else

#define lsapi_dbg(...)

#endif

#define lsapi_log(...)  LSAPI_Log(LSAPI_LOG_TIMESTAMP_FULL|LSAPI_LOG_PID, __VA_ARGS__)


void lsapi_perror(const char * pMessage, int err_no)
{
    lsapi_log("%s, errno: %d (%s)\n", pMessage, err_no, strerror(err_no));
}


static int lsapi_parent_dead()
{
    // Return non-zero if the parent is dead.  0 if still alive.
    if (!s_ppid) {
        // not checking, so not dead
        return(0);
    }
    if (s_restored_ppid) {
        if (kill(s_restored_ppid,0) == -1) {
            if (errno == EPERM) {
                return(0); // no permission, but it's still there.
            }
            return(1); // Dead
        }
        return(0); // it worked, so it's not dead
    }
    return(s_ppid != getppid());
}


static void lsapi_sigpipe( int sig )
{
}


static void lsapi_siguser1( int sig )
{
    g_running = 0;
}

#ifndef sighandler_t
typedef void (*sighandler_t)(int);
#endif

static void lsapi_signal(int signo, sighandler_t handler)
{
    struct sigaction sa;

    sigaction(signo, NULL, &sa);

    if (sa.sa_handler == SIG_DFL)
    {
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        sa.sa_handler = handler;
        sigaction(signo, &sa, NULL);
    }
}


static int s_enable_core_dump = 0;
static void lsapi_enable_core_dump(void)
{
#if defined(__FreeBSD__ ) || defined(__NetBSD__) || defined(__OpenBSD__) \
    || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
    int  mib[2];
    size_t len;

#if !defined(__OpenBSD__)
    len = 2;
    if ( sysctlnametomib("kern.sugid_coredump", mib, &len) == 0 )
    {
        len = sizeof(s_enable_core_dump);
        if (sysctl(mib, 2, NULL, 0, &s_enable_core_dump, len) == -1)
            perror( "sysctl: Failed to set 'kern.sugid_coredump', "
                    "core dump may not be available!");
    }
#else
    int set = 3;
    len = sizeof(set);
    mib[0] = CTL_KERN;
    mib[1] = KERN_NOSUIDCOREDUMP;
    if (sysctl(mib, 2, NULL, 0, &set, len) == 0) {
        s_enable_core_dump = 1;
    }
#endif


#endif

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    if (prctl(PR_SET_DUMPABLE, s_enable_core_dump,0,0,0) == -1)
        perror( "prctl: Failed to set dumpable, "
                    "core dump may not be available!");
#endif
}


static inline void lsapi_buildPacketHeader( struct lsapi_packet_header * pHeader,
                                char type, int len )
{
    pHeader->m_versionB0 = LSAPI_VERSION_B0;  /* LSAPI protocol version */
    pHeader->m_versionB1 = LSAPI_VERSION_B1;
    pHeader->m_type      = type;
    pHeader->m_flag      = LSAPI_ENDIAN;
    pHeader->m_packetLen.m_iLen = len;
}


static  int lsapi_set_nblock( int fd, int nonblock )
{
    int val = fcntl( fd, F_GETFL, 0 );
    if ( nonblock )
    {
        if (!( val & O_NONBLOCK ))
        {
            return fcntl( fd, F_SETFL, val | O_NONBLOCK );
        }
    }
    else
    {
        if ( val & O_NONBLOCK )
        {
            return fcntl( fd, F_SETFL, val &(~O_NONBLOCK) );
        }
    }
    return 0;
}


static int lsapi_close( int fd )
{
    int ret;
    while( 1 )
    {
        ret = close( fd );
        if (( ret == -1 )&&( errno == EINTR )&&(g_running))
            continue;
        return ret;
    }
}


static void lsapi_close_connection(LSAPI_Request *pReq)
{
    if (pReq->m_fd == -1)
        return;
    lsapi_close(pReq->m_fd);
    pReq->m_fd = -1;
    if (s_busy_workers)
        __atomic_fetch_sub(s_busy_workers, 1, __ATOMIC_SEQ_CST);
    if (s_worker_status)
        __atomic_store_n(&s_worker_status->m_state, LSAPI_STATE_IDLE,
                         __ATOMIC_SEQ_CST);
}


static inline ssize_t lsapi_read( int fd, void * pBuf, size_t len )
{
    ssize_t ret;
    while( 1 )
    {
        ret = read( fd, (char *)pBuf, len );
        if (( ret == -1 )&&( errno == EINTR )&&(g_running))
            continue;
        return ret;
    }
}


/*
static int lsapi_write( int fd, const void * pBuf, int len )
{
   int ret;
   const char * pCur;
   const char * pEnd;
   if ( len == 0 )
       return 0;
   pCur = (const char *)pBuf;
   pEnd = pCur + len;
   while( g_running && (pCur < pEnd) )
   {
       ret = write( fd, pCur, pEnd - pCur );
       if ( ret >= 0)
           pCur += ret;
       else if (( ret == -1 )&&( errno != EINTR ))
           return ret;
   }
   return pCur - (const char *)pBuf;
}
*/


static int lsapi_writev( int fd, struct iovec ** pVec, int count, int totalLen )
{
    int ret;
    int left = totalLen;
    int n = count;

    if (s_skip_write)
        return totalLen;

    while(( left > 0 )&&g_running )
    {
        ret = writev( fd, *pVec, n );
        if ( ret > 0 )
        {
            left -= ret;
            if (( left <= 0)||( !g_running ))
                return totalLen - left;
            while( ret > 0 )
            {
                if ( (*pVec)->iov_len <= (unsigned int )ret )
                {
                    ret -= (*pVec)->iov_len;
                    ++(*pVec);
                }
                else
                {
                    (*pVec)->iov_base = (char *)(*pVec)->iov_base + ret;
                    (*pVec)->iov_len -= ret;
                    break;
                }
            }
        }
        else if ( ret == -1 )
        {
            if ( errno == EAGAIN )
            {
                if ( totalLen - left > 0 )
                    return totalLen - left;
                else
                    return -1;
            }
            else if ( errno != EINTR )
                return ret;
        }
    }
    return totalLen - left;
}


/*
static int getTotalLen( struct iovec * pVec, int count )
{
   struct iovec * pEnd = pVec + count;
   int total = 0;
   while( pVec < pEnd )
   {
       total += pVec->iov_len;
       ++pVec;
   }
   return total;
}
*/


static inline int allocateBuf( LSAPI_Request * pReq, int size )
{
    char * pBuf = (char *)realloc( pReq->m_pReqBuf, size );
    if ( pBuf )
    {
        pReq->m_pReqBuf = pBuf;
        pReq->m_reqBufSize = size;
        pReq->m_pHeader = (struct lsapi_req_header *)pReq->m_pReqBuf;
        return 0;
    }
    return -1;
}


static int allocateIovec( LSAPI_Request * pReq, int n )
{
    struct iovec * p = (struct iovec *)realloc(
                pReq->m_pIovec, sizeof(struct iovec) * n );
    if ( !p )
        return -1;
    pReq->m_pIovecToWrite = p + ( pReq->m_pIovecToWrite - pReq->m_pIovec );
    pReq->m_pIovecCur = p + ( pReq->m_pIovecCur - pReq->m_pIovec );
    pReq->m_pIovec = p;
    pReq->m_pIovecEnd = p + n;
    return 0;
}


static int allocateRespHeaderBuf( LSAPI_Request * pReq, int size )
{
    char * p = (char *)realloc( pReq->m_pRespHeaderBuf, size );
    if ( !gems/gems/rdoc-6.5.1.1/lib/rdoc.rb000064400000013514150403134150012207 0ustar00eader->m_packetLen.m_bytes[0];
        pHeader->m_packetLen.m_bytes[0] = pHeader->m_packetLen.m_bytes[3];
        pHeader->m_packetLen.m_bytes[3] = b;
        b = pHeader->m_packetLen.m_bytes[1];
        pHeader->m_packetLen.m_bytes[1] = pHeader->m_packetLen.m_bytes[2];
        pHeader->m_packetLen.m_bytes[2] = b;
    }
    return pHeader->m_packetLen.m_iLen;
}


static int allocateEnvList( struct LSAPI_key_value_pair ** pEnvList,
                        int *curSize, int newSize )
{
    struct LSAPI_key_value_pair * pBuf;
    if ( *curSize >= newSize )
        return 0;
    if ( newSize > 8192 )
        return -1;
    pBuf = (struct LSAPI_key_value_pair *)realloc( *pEnvList, newSize *
                    sizeof(struct LSAPI_key_value_pair) );
    if ( pBuf gems/gems/rdoc-6.5.1.1/lib/rdoc/parser.rb000064400000016673150403134150013514 0ustar00*pBegin)++));
        keyLen = (keyLen << 8) + *((unsigned char *)((*pBegin)++));
        valLen = *((unsigned char *)((*pBegin)++));
        valLen = (valLen << 8) + *((unsigned char *)((*pBegin)++));
        if ( *pBegin + keyLen + valLen > pEnd )
            return -1;
        if (( !keyLen )||( !valLen ))
            return -1;

        pEnvList->pKey = *pBegin;
        *pBegin += keyLen;
        pEnvList->pValue = *pBegin;
        *pBegin += valLen;

        pEnvList->keyLen = keyLen - 1;
        pEnvList->valLen = valLen - 1;
        ++pEnvList;
    }
    if ( memcmp( *pBegin, "\0\0\0\0", 4 ) != 0 )
        return -1;
    *pBegin += 4;
    return 0;
}


static inline void swapIntEndian( int * pInteger )
{
    char * p = (char *)pInteger;
    register char b;
    b = p[0];
    p[0] = p[3];
    p[3] = b;
    b = p[1];
    p[1] = p[2];
    p[2] = b;

}


static inline void fixEndian( LSAPI_Request * pReq )
{
    struct lsapi_req_header *p= pReq->m_pHeader;
    swapIntEndian( &p->m_httpHeaderLen );
    swapIntEndian( &p->m_reqBodyLen );
    swapIntEndian( &p->m_scriptFileOff );
    swapIntEndian( &p->m_scriptNameOff );
    swapIntEndian( &p->m_queryStringOff );
    swapIntEndian( &p->m_requestMethodOff );
    swapIntEndian( &p->m_cntUnknownHeaders );
    swapIntEndian( &p->m_cntEnv );
    swapIntEndian( &p->m_cntSpecialEnv );
}


static void fixHeaderIndexEndian( LSAPI_Request * pReq )
{
    int i;
    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            register char b;
            char * p = (char *)(&pReq->m_pHeaderIndex->m_headerLen[i]);
            b = p[0];
            p[0] = p[1];
            p[1] = b;
            swapIntEndian( &pReq->m_pHeaderIndex->m_headerOff[i] );
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            swapIntEndian( &pCur->nameOff );
            swapIntEndian( &pCur->nameLen );
            swapIntEndian( &pCur->valueOff );
            swapIntEndian( &pCur->valueLen );
            ++pCur;
        }
    }
}


static int validateHeaders( LSAPI_Request * pReq )
{
    int totalLen = pReq->m_pHeader->m_httpHeaderLen;
    int i;
    for(i = 0; i < H_TRANSFER_ENCODING; ++i)
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            if (pReq->m_pHeaderIndex->m_headerOff[i] > totalLen
                || pReq->m_pHeaderIndex->m_headerLen[i]
                    + pReq->m_pHeaderIndex->m_headerOff[i] > totalLen)
                return -1;
        }
    }
    if (pReq->m_pHeader->m_cntUnknownHeaders > 0)
    {
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            if (pCur->nameOff > totalLen
                || pCur->nameOff + pCur->nameLen > totalLen
                || pCur->valueOff > totalLen
                || pCur->valueOff + pCur->valueLen > totalLen)
                return -1;
            ++pCur;
        }
    }
    return 0;
}


static uid_t s_uid = 0;
static uid_t s_defaultUid;  //web server need set this
static gid_t s_defaultGid;

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)

#define LSAPI_LVE_DISABLED  0
#define LSAPI_LVE_ENABLED   1
#define LSAPI_CAGEFS_ENABLED 2
#define LSAPI_CAGEFS_NO_SUEXEC 3
struct liblve;
static int s_enable_lve = LSAPI_LVE_DISABLED;
static struct liblve * s_lve = NULL;

static void *s_liblve;
static int (*fp_lve_is_available)(void) = NULL;
static int (*fp_lve_instance_init)(struct liblve *) = NULL;
static int (*fp_lve_destroy)(struct liblve *) = NULL;
static int (*fp_lve_enter)(struct liblve *, uint32_t, int32_t, int32_t, uint32_t *) = NULL;
static int (*fp_lve_leave)(struct liblve *, uint32_t *) = NULL;
static int (*fp_lve_jail)( struct passwd *, char *) = NULL;
static int lsapi_load_lve_lib(void)
{
    s_liblve = dlopen("liblve.so.0", RTLD_NOW | RTLD_GLOBAL);
    if (s_liblve)
    {
        fp_lve_is_available = dlsym(s_liblve, "lve_is_available");
        if (dlerror() == NULL)
        {
            if ( !(*fp_lve_is_available)() )
            {
                int uid = getuid();
                if ( uigems/gems/rake-13.0.6/exe/rake000075500000002245150403134150011527 0ustar00LSAPI_CAGEFS_ENABLED )
        fp_lve_jail = dlsym(s_liblve, "jail" );

    if ( s_lve == NULL )
    {
        rc = (*fp_lve_instance_init)(NULL);
        s_lve = malloc(rc);
    }
    rc = (*fp_lve_instance_init)(s_lve);
    if (rc != 0)
    {
        perror( "LSAPI: Unable to initialize LVE" );
        free( s_lve );
        s_lve = NULL;
        return -1;
    }
    return 0;

}

#endif



static int readSecret( const char * pSecretFile )
{
    struct stat st;
    int fd = open( pSecretFile, O_RDONLY , 0600 );
    if ( fd == -1 )
    {
        lsapi_log("LSAPI: failed to open secret file: %s!\n", pSecretFile );
        return -1;
    }
    if ( fstat( fd, &st ) == -1 )
    {
        lsapi_log("LSAPI: failed to check state of file: %s!\n", pSecretFile );
        close( fd );
        return -1;
    }
/*
    if ( st.st_uid != s_uid )
    {
        lsapi_log("LSAPI: file owner check failure: %s!\n", pSecretFile );
        close( fd );
        return -1;
    }
*/
    if ( st.st_mode & 0077 )
    {
        lsapi_log("LSAPI: file permission check failure: %s\n", pSecretFile );
        close( fd );
        return -1;
    }
    if ( read( fd, s_secret, 16 ) < 16 )
    {
      gems/gems/rake-13.0.6/History.rdoc000064400000215222150403134150012411 0ustar00efined(__gnu_linux__)
static int lsapi_lve_error( LSAPI_Request * pReq )
{
    static const char * headers[] =
    {
        "Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0",
        "Pragma: no-cache",
        "Retry-After: 60",
        "Content-Type: text/html",
        NULL
    };
    static const char achBody[] =
        "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
        "<HTML><HEAD>\n<TITLE>508 Rgems/gems/rdoc-6.5.1.1/lib/rdoc.rb000064400000013514150403134150012207 0ustar00s_lve, uid, -1, -1, &cookie);
        if ( ret < 0 )
        {
            //lsapi_log("enter LVE (%d) : result: %d !\n", uid, ret );
            LSAPI_perror_r(pReq, "LSAPI: lve_enter() failure, reached resource limit.", NULL );
            lsapi_lve_error( pReq );
            return -1;
        }
    }

    return 0;
}

static int lsapi_jailLVE( LSAPI_Request * pReq, uid_t uid, struct passwd * pw )
{
    int ret = 0;
    char  error_msg[1024] = "";
    ret = (*fp_lve_jail)( pw, error_msg );
    if ( ret < 0 )
    {
        lsapi_log("LSAPI: LVE jail(%d) result: %d, error: %s !\n",
                  uid, ret, error_msg );
        LSAPI_perror_r( pReq, "LSAPI: jail() failure.", NULL );
        return -1;
    }
    return ret;
}


static int lsapi_initLVE(void)
{
    const char * pEnv;
    if ( (pEnv = getenv( "LSAPI_LVE_ENABLE" ))!= NULL )
    {
        s_enable_lve = atol( pEnv );
        pEnv = NULL;
    }
    else if ( (pEnv = getenv( "LVE_ENABLE" ))!= NULL )
    {
        s_enable_lve = atol( pEnv );
        pEnv = NULL;
    }
    if ( s_enable_lve && !s_uid )
    {
        lsapi_load_lve_lib();
        if ( s_enable_lve )
        {
            return init_lve_ex();
        }

    }
    return 0;
}
#endif


static int setUID_LVE(LSAPI_Request * pReq, uid_t uid, gid_t gid, const char * pChroot)
{
    int rv;
    struct passwd * pw;
    pw = getpwuid( uid );
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    if ( s_lve )
    {
        if( lsapi_enterLVE( pReq, uid ) == -1 )
            return -1;
        if ( pw && fp_lve_jail)
        {
            rv = lsapi_jailLVE( pReq, uid, pw );
            if ( rv == -1 )
                return -1;
            if (( rv == 1 )&&(s_enable_lve == LSAPI_CAGEFS_NO_SUEXEC ))    //this mode only use cageFS, does not use suEXEC
            {
                uid = s_defaultUid;
                gid = s_defaultGid;
                pw = getpwuid( uid );
            }
        }
    }
#endif
    //if ( !uid || !gid )  //do not allow root
    //{
    //    return -1;
    //}

#if defined(__FreeBSD__ ) || defined(__NetBSD__) || defined(__OpenBSD__) \
    || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
    if ( s_enable_core_dump )
        lsapi_enable_core_dump();
#endif

    rv = setgid(gid);
    if (rv == -1)
    {
        LSAPI_perror_r(pReq, "LSAPI: setgid()", NULL);
        return -1;
    }
    if ( pw && (pw->pw_gid == gid ))
    {
        rv = initgroups( pw->pw_name, gid );
        if (rv == -1)
        {
            LSAPI_perror_r(pReq, "LSAPI: initgroups()", NULL);
            return -1;
        }
    }
    else
    {
        rv = setgroups(1, &gid);
        if (rv == -1)
        {
            LSAPI_perror_r(pReq, "LSAPI: setgroups()", NULL);
        }
    }
    if ( pChroot )
    {
        rv = chroot( pChroot );
        if ( rv == -1 )
        {
            LSAPI_perror_r(pReq, "LSAPI: chroot()", NULL);
            return -1;
        }
    }
    rv = setuid(uid);
    if (rv == -1)
    {
        LSAPI_perror_r(pReq, "LSAPI: setuid()", NULL);
        return -1;
    }
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    if ( s_enable_core_dump )
        lsapi_enable_core_dump();
#endif
    return 0;
}

static int lsapi_suexec_auth( LSAPI_Request *pReq,
            char * pAuth, int len, char * pUgid, int ugidLen )
{
    lsapi_MD5_CTX md5ctx;
    unsigned char achMD5[16];
    if ( len < 32 )
        return -1;
    memmove( achMD5, pAuth + 16, 16 );
    memmove( pAuth + 16, s_secret, 16 );
    lsapi_MD5Init( &md5ctx );
    lsapi_MD5Update( &md5ctx, (unsigned char *)pAuth, 32 );
    lsapi_MD5Update( &md5ctx, (unsigned char *)pUgid, 8 );
    lsapi_MD5Final( (unsigned char *)pAuth + 16, &md5ctx);
    if ( memcmp( achMD5, pAuth + 16, 16 ) == 0 )
        return 0;
    return 1;
}


static int lsapi_changeUGid( LSAPI_Request * pReq )
{
    int uid = s_defaultUid;
    int gid = s_defaultGid;
    const char *pStderrLog;
    const char *pChroot = NULL;
    struct LSAPI_key_value_pair * pEnv;
    struct LSAPI_key_value_pair * pAuth;
    int i;
    if ( s_uid )
        return 0;
    //with special ID  0x00
    //authenticate the suEXEC request;
    //first one should be MD5( nonce + lscgid secret )
    //remember to clear the secret after verification
    //it should be set at the end of special env
    i = pReq->m_pHeader->m_cntSpecialEnv - 1;
    if ( i >= 0 )
    {
        pEnv = pReq->m_pSpecialEnvList + i;
        if (( *pEnv->pKey == '\000' )&&
            ( strcmp( pEnv->pKey+1, "SUEXEC_AUTH" ) == 0 ))
        {
            --pReq->m_pHeader->m_cntSpecialEnv;
            pAuth = pEnv--;
            if (( *pEnv->pKey == '\000' )&&
                ( strcmp( pEnv->pKey+1, "SUEXEC_UGID" ) == 0 ))
            {
                --pReq->m_pHeader->m_cntSpecialEnv;
                uid = *(uint32_t *)pEnv->pValue;
                gid = *(((uint32_t *)pEnv->pValue) + 1 );
                //lsapi_log("LSAPI: SUEXEC_UGID set UID: %d, GID: %d\n", uid, gid );
            }
            else
            {
                lsapi_log("LSAPI: missing SUEXEC_UGID env, use default user!\n" );
                pEnv = NULL;
            }
            if ( pEnv&& lsapi_suexec_auth( pReq, pAuth->pValue, pAuth->valLen, pEnv->pValue, pEnv->valLen ) == 0 )
            {
                //read UID, GID from specialEnv

            }
            else
            {
                //authentication error
                lsapi_log("LSAPI: SUEXEC_AUTH authentication failed, use default user!\n" );
                uid = 0;
            }
        }
        else
        {
            //lsapi_log("LSAPI: no SUEXEC_AUTH env, use default user!\n" );
        }
    }


    if ( !uid )
    {
        uid = s_defaultUid;
        gid = s_defaultGid;
    }

    //change uid
    if ( setUID_LVE( pReq, uid, gid, pChroot ) == -1 )
    {
        return -1;
    }

    s_uid = uidgems/gems/rake-13.0.6/exe/rake000075500000002245150403134150011527 0ustar00f + totalLen;
    shouldFixEndian = ( LSAPI_ENDIAN != (
                pReq->m_pHeader->m_pktHeader.m_flag & LSAPI_ENDIAN_BIT ) );
    if ( shouldFixEndian )
    {
        fixEndian( pReq );
    }
    if ( (pReq->m_specialEnvListSize < pReq->m_pHeader->m_cntSpecialEnv )&&
            allocateEnvList( &pReq->m_pSpecialEnvList,
                &pReq->m_specialEnvListSize,
                pReq->m_pHeader->m_cntSpecialEnv ) == -1 )
        return -1;
    if ( (pReq->m_envListSize < pReq->m_pHeader->m_cntEnv )&&
            allocateEnvList( &pReq->m_pEnvList, &pReq->m_envListSize,
                pReq->m_pHeader->m_cntEnv ) == -1 )
        return -1;

    if ( parseEnv( pReq->m_pSpecialEnvList,
                pReq->m_pHeader->m_cntSpecialEnv,
                &pBegin, pEnd ) == -1 )
        return -1;
    if ( parseEnv( pReq->m_pEnvList, pReq->m_pHeader->m_cntEnv,
                &pBegin, pEnd ) == -1 )
        return -1;
    if (pReq->m_pHeader->m_scriptFileOff < 0
        || pReq->m_pHeader->m_scriptFileOff >= totalLen
        || pReq->m_pHeader->m_scriptNameOff < 0
        || pReq->m_pHeader->m_scriptNameOff >= totalLen
        || pReq->m_pHeader->m_queryStringOff < 0
   gems/gems/rake-13.0.6/History.rdoc000064400000215222150403134150012411 0ustar00egin += sizeof( struct lsapi_header_offset) *
                    pReq->m_pHeader->m_cntUnknownHeaders;

    pReq->m_pHttpHeader = pBegin;
    pBegin += pReq->m_pHeader->m_httpHeaderLen;
    if ( pBegin != pEnd )
    {
        lsapi_log("Request header does match total size, total: %d, "
                 "real: %ld\n", totalLen, pBegin - pReq->m_pReqBuf );
        return -1;
    }
    if ( shouldFixEndian )
    {
        fixHeaderIndexEndian( pReq );
    }

    if (validateHeaders(pReq) == -1)
    {
        lsapi_log("Bad request header - ERROR#2\n");
        return -1;
    }

    pReq->m_reqBodyLen = pReq->m_pHeader->m_reqBodyLen;
    if ( pReq->m_reqBodyLen == -2 )
    {
        parseContentLenFromHeader(pReq);
    }

    return 0;
}


//OPTIMIZATION
static char s_accept_notify = 0;
static char s_schedule_notify = 0;
static char s_notify_scheduled = 0;
static char s_notified_pid = 0;

static struct lsapi_packet_header s_ack = {'L', 'S',
                LSAPI_REQ_RECEIVED, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} };
static struct lsapi_packet_header s_conn_close_pkt = {'L', 'S',
                LSAPI_CONN_CLOSE, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} };


static inline int send_notification_pkt( int fd, struct lsapi_packet_header *pkt )
{
    if ( write( fd, pkt, LSAPI_PACKET_HEADER_LEN ) < LSAPI_PACKET_HEADER_LEN )
        return -1;
    return 0;
}


static inline int send_req_received_notification( int fd )
{
    return send_notification_pkt(fd, &s_ack);
}


static inline int send_conn_close_notification( int fd )
{
    return send_notification_pkt(fd, &s_conn_close_pkt);
}


//static void lsapi_sigalarm( int sig )
//{
//    if ( s_notify_scheduled )
//    {
//        s_notify_scheduled = 0;
//        if ( g_req.m_fd != -1 )
//            write_req_received_notification( g_req.m_fd );
//    }
//}


static inline int lsapi_schedule_notify(void)
{
    if ( !s_notify_scheduled )
    {
        alarm( 2 );
        s_notify_scheduled = 1;
    }
    return 0;
}


static inline int notify_req_received( int fd )
{
    if ( s_schedule_notify )
        return lsapi_schedule_notify();
    return send_req_received_notification( fd );

}


static inline int lsapi_notify_pid( int fd )
{
    char achBuf[16];
    lsapi_buildPacketHeader( (struct lsapi_packet_header *)achBuf, LSAPI_STDERR_STREAM,
                        8 + LSAPI_PACKET_HEADER_LEN );
    memmove( &achBuf[8], "\0PID", 4 );
    *((int *)&achBuf[12]) = getpid();

    if ( write( fd, achBuf, 16 ) < 16 )
        return -1;
    return 0;
}

static int readReq( LSAPI_Request * pReq )
{
    int len;
    int packetLen;
    if ( !pReq )
        return -1;
    if ( pReq->m_reqBufSize < 8192 )
    {
        if ( allocateBuf( pReq, 8192 ) == -1 )
            return -1;
    }

    while ( pReq->m_bufRead < LSAPI_PACKET_HEADER_LEN )
    {
        len = lsapi_read( pReq->m_fd, pReq->m_pReqBuf, pReq->m_reqBufSize );
        if ( len <= 0 )
            return -1;
        pReq->m_bufRead += len;
    }
    pReq->m_reqState = LSAPI_ST_REQ_HEADER;

    packetLen = verifyHeader( &pReq->m_pHeader->m_pktHeader, LSAPI_BEGIN_REQUEST );
    if ( packetLen < 0 )
    {
        lsapi_log("packetLen < 0\n");
        return -1;
    }
    if ( packetLen > LSAPI_MAX_HEADER_LEN )
    {
        lsapi_log("packetLen > %d\n", LSAPI_MAX_HEADER_LEN );
        return -1;
    }

    if ( packetLen + 1024 > pReq->m_reqBufSize )
    {
        if ( allocateBuf( pReq, packetLen + 1024 ) == -1 )
            return -1;
    }
    while( packetLen > pReq->m_bufRead )
    {
        len = lsapi_read( pReq->m_fd, pReq->m_pReqBuf + pReq->m_bufRead, packetLen - pReq->m_bufRead );
        if ( len <= 0 )
            return -1;
        pReq->m_bufRead += len;
    }
    if ( parseRequest( pReq, packetLen ) < 0 )
    {
        lsapi_log("ParseRequest error\n");
        return -1;
    }

    pReq->m_reqState = LSAPI_ST_REQ_BODY | LSAPI_ST_RESP_HEADER;

    if ( !s_uid )
    {
        if ( lsapi_changeUGid( pReq ) )
            return -1;
        memset(s_secret, 0, sizeof(s_secret));
    }
    pReq->m_bufProcessed = packetLen;

    //OPTIMIZATION
    if ( !s_accept_notify && !s_notified_pid )
        return notify_req_received( pReq->m_fd );
    else
    {
        s_notified_pid = 0;
        return 0;
    }
}


int LSAPI_Init(void)
{
    if ( !g_inited )
    {
        s_uid = geteuid();
        s_secret[0] = 0;
        lsapi_signal(SIGPIPE, lsapi_sigpipe);
        lsapi_signal(SIGUSR1, lsapi_siguser1);

#if defined(SIGXFSZ) && defined(SIG_IGN)
        signal(SIGXFSZ, SIG_IGN);
#endif
        /* let STDOUT function as STDERR,
           just in case writing to STDOUT directly */
        dup2( 2, 1 );
        if ( LSAPI_InitRequest( &g_req, LSAPI_SOCK_FILENO ) == -1 )
            return -1;
        g_inited = 1;
        s_ppid = getppid();
        void *pthread_lib = dlopen("libpthread.so", RTLD_LAZY);
        if (pthread_lib)
            pthread_atfork_func = dlsym(pthread_lib, "pthread_atfork");

    }
    return 0;
}


void LSAPI_Stop(void)
{
    g_running = 0;
}


int LSAPI_IsRunning(void)
{
    return g_running;
}


void LSAPI_Register_Pgrp_Timer_Callback(LSAPI_On_Timer_pf cb)
{
    s_proc_group_timer_cb = cb;
}


int LSAPI_InitRequest( LSAPI_Request * pReq, int fd )
{
    int newfd;
    if ( !pReq )
        return -1;
    memset( pReq, 0, sizeof( LSAPI_Request ) );
    if ( allocateIovec( pReq, 16 ) == -1 )
        return -1;
    pReq->m_pRespBuf = pReq->m_pRespBufPos = (char *)malloc( LSAPI_RESP_BUF_SIZE );
    if ( !pReq->m_pRespBuf )
        return -1;
    pReq->m_pRespBufEnd = pReq->m_pRespBuf + LSAPI_RESP_BUF_SIZE;
    pReq->m_pIovecCur = pReq->m_pIovecToWrite = pReq->m_pIovec + 1;
    pReq->m_respPktHeaderEnd = &pReq->m_respPktHeader[5];
    if ( allocateRespHeaderBuf( pReq, LSAPI_INIT_RESP_HEADER_LEN ) == -1 )
        return -1;

    if ( fd == STDIN_FILENO )
    {
        fd = dup( fd );
        newfd = open( "/dev/null", O_RDWR );
        dup2( newfd, STDIN_FILENO );
    }

    if ( isPipe( fd ) )
    {
        pReq->m_fdListen = -1;
        pReq->m_fd = fd;
    }
    else
    {
        pReq->m_fdListen = fd;
        pReq->m_fd = -1;
        lsapi_set_nblock( fd, 1 );
    }
    return 0;
}


int LSAPI_Is_Listen( void )
{
    return LSAPI_Is_Listen_r( &g_req );
}


int LSAPI_Is_Listen_r( LSAPI_Request * pReq)
{
    return pReq->m_fdListen != -1;
}


int LSAPI_Accept_r( LSAPI_Request * pReq )
{
    char        achPeer[128];
    socklen_t   len;
    int         nodelay = 1;

    if ( !pReq )
        return -1;
    if ( LSAPI_Finish_r( pReq ) == -1 )
        return -1;
    lsapi_set_nblock( pReq->m_fdListen , 0 );
    while( g_running )
    {
        if ( pReq->m_fd == -1 )
        {
            if ( pReq->m_fdListen != -1)
            {
                len = sizeof( achPeer );
                pReq->m_fd = accept( pReq->m_fdListen,
                            (struct sockaddr *)&achPeer, &len );
                if ( pReq->m_fd == -1 )
                {
                    if (( errno == EINTR )||( errno == EAGAIN))
                        continue;
                    else
                        return -1;
                }
                else
                {
                    if (s_worker_status)
                        __atomic_store_n(&s_worker_status->m_state,
                                       LSAPI_STATE_CONNECTED, __ATOMIC_SEQ_CST);
                    if (s_busy_workers)
                        __atomic_fetch_add(s_busy_workers, 1, __ATOMIC_SEQ_CST);
                    lsapi_set_nblock( pReq->m_fd , 0 );
                    if (((struct sockaddr *)&achPeer)->sa_family == AF_INET )
                    {
                        setsockopt(pReq->m_fd, IPPROTO_TCP, TCP_NODELAY,
                                   (char *)&nodelay, sizeof(nodelay));
                    }
                    //init_conn_key( pReq->m_fd );
                    //OPTIMIZATION
                    if ( s_accept_notify )
                        if ( notify_req_received( pReq->m_fd ) == -1 )
                                return -1;
                }
            }
            else
                return -1;
        }
        if ( !readReq( pReq ) )
            break;
        //abort();
        lsapi_close_connection(pReq);
        LSAPI_Reset_r( pReq );
    }
    return 0;
}


static struct lsapi_packet_header   finish_close[2] =
{
    {'L', 'S', LSAPI_RESP_END, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} },
    {'L', 'S', LSAPI_CONN_CLOSE, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} }
};


int LSAPI_Finish_r( LSAPI_Request * pReq )
{
    /* finish req body */
    if ( !pReq )
        return -1;
    if (pReq->m_reqState)
    {
        if ( pReq->m_fd != -1 )
        {
            if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
            {
                LSAPI_FinalizeRespHeaders_r( pReq );
            }
            if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
            {
                Flush_RespBuf_r( pReq );
            }

            pReq->m_pIovecCur->iov_base = (void *)finish_close;
            pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN;
            pReq->m_totalLen += LSAPI_PACKET_HEADER_LEN;
            ++pReq->m_pIovecCur;
            LSAPI_Flush_r( pReq );
        }
        LSAPI_Reset_r( pReq );
    }
    return 0;
}


int LSAPI_End_Response_r(LSAPI_Request * pReq)
{
    if (!pReq)
        return -1;
    if (pReq->m_reqState & LSAPI_ST_BACKGROUND)
        return 0;
    if (pReq->m_reqState)
    {
        if ( pReq->m_fd != -1 )
        {
            if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
            {
                if ( pReq->m_pRespHeaderBufPos <= pReq->m_pRespHeaderBuf )
                    return 0;

                LSAPI_FinalizeRespHeaders_r( pReq );
            }
            if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
            {
                Flush_RespBuf_r( pReq );
            }

            pReq->m_pIovecCur->iov_base = (void *)finish_close;
            pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN << 1;
            pReq->m_totalLen += LSAPI_PACKET_HEADER_LEN << 1;
            ++pReq->m_pIovecCur;
            LSAPI_Flush_r( pReq );
            lsapi_close_connection(pReq);
        }
        pReq->m_reqState |= LSAPI_ST_BACKGROUND;
    }
    return 0;
}


void LSAPI_Reset_r( LSAPI_Request * pReq )
{
    pReq->m_pRespBufPos         = pReq->m_pRespBuf;
    pReq->m_pIovecCur           = pReq->m_pIovecToWrite = pReq->m_pIovec + 1;
    pReq->m_pRespHeaderBufPos   = pReq->m_pRespHeaderBuf;

    memset( &pReq->m_pHeaderIndex, 0,
            (char *)(pReq->m_respHeaderLen) - (char *)&pReq->m_pHeaderIndex );
}


int LSAPI_Release_r( LSAPI_Request * pReq )
{
    if ( pReq->m_pReqBuf )
        free( pReq->m_pReqBuf );
    if ( pReq->m_pSpecialEnvList )
        free( pReq->m_pSpecialEnvList );
    if ( pReq->m_pEnvList )
        free( pReq->m_pEnvList );
    if ( pReq->m_pRespHeaderBuf )
        free( pReq->m_pRespHeaderBuf );
    return 0;
}


char * LSAPI_GetHeader_r( LSAPI_Request * pReq, int headerIndex )
{
    int off;
    if ( !pReq || ((unsigned int)headerIndex > H_TRANSFER_ENCODING) )
        return NULL;
    off = pReq->m_pHeaderIndex->m_headerOff[ headerIndex ];
    if ( !off )
        return NULL;
    if ( *(pReq->m_pHttpHeader + off
        + pReq->m_pHeaderIndex->m_headerLen[ headerIndex ]) )
    {
        *( pReq->m_pHttpHeader + off
            + pReq->m_pHeaderIndex->m_headerLen[ headerIndex ]) = 0;
    }
    return pReq->m_pHttpHeader + off;
}


static int readBodyToReqBuf( LSAPI_Request * pReq )
{
    off_t bodyLeft;
    ssize_t len = pReq->m_bufRead - pReq->m_bufProcessed;
    if ( len > 0 )
        return len;
    pReq->m_bufRead = pReq->m_bufProcessed = pReq->m_pHeader->m_pktHeader.m_packetLen.m_iLen;

    bodyLeft = pReq->m_reqBodyLen - pReq->m_reqBodyRead;
    len = pReq->m_reqBufSize - pReq->m_bufRead;
    if ( len < 0 )
        return -1;
    if ( len > bodyLeft )
        len = bodyLeft;

    len = lsapi_read( pReq->m_fd, pReq->m_pReqBuf + pReq->m_bufRead, len );
    if ( len > 0 )
        pReq->m_bufRead += len;
    return len;
}


int LSAPI_ReqBodyGetChar_r( LSAPI_Request * pReq )
{
    if (!pReq || (pReq->m_fd ==-1) )
        return EOF;
    if ( pReq->m_bufProcessed >= pReq->m_bufRead )
    {
        if ( readBodyToReqBuf( pReq ) <= 0 )
            return EOF;
    }
    ++pReq->m_reqBodyRead;
    return (unsigned char)*(pReq->m_pReqBuf + pReq->m_bufProcessed++);
}


int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen, int *getLF )
{
    ssize_t len;
    ssize_t left;
    char * pBufEnd = pBuf + bufLen - 1;
    char * pBufCur = pBuf;
    char * pCur;
    char * p;
    if (!pReq || pReq->m_fd == -1 || !pBuf || !getLF)
        return -1;
    *getLF = 0;
    while( (left = pBufEnd - pBufCur ) > 0 )
    {

        len = pReq->m_bufRead - pReq->m_bufProcessed;
        if ( len <= 0 )
        {
            if ( (len = readBodyToReqBuf( pReq )) <= 0 )
            {
                *getLF = 1;
                break;
            }
        }
        if ( len > left )
            len = left;
        pCur = pReq->m_pReqBuf + pReq->m_bufProcessed;
        p = memchr( pCur, '\n', len );
        if ( p )
            len = p - pCur + 1;
        memmove( pBufCur, pCur, len );
        pBufCur += len;
        pReq->m_bufProcessed += len;

        pReq->m_reqBodyRead += len;

        if ( p )
        {
            *getLF = 1;
            break;
        }
    }
    *pBufCur = 0;

    return pBufCur - pBuf;
}


ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen )
{
    ssize_t len;
    off_t total;
    /* char *pOldBuf = pBuf; */
    if (!pReq || pReq->m_fd == -1 || !pBuf || (ssize_t)bufLen < 0)
        return -1;

    total = pReq->m_reqBodyLen - pReq->m_reqBodyRead;

    if ( total <= 0 )
        return 0;
    if ( total < (ssize_t)bufLen )
        bufLen = total;

    total = 0;
    len = pReq->m_bufRead - pReq->m_bufProcessed;
    if ( len > 0 )
    {
        if ( len > (ssize_t)bufLen )
            len = bufLen;
        memmove( pBuf, pReq->m_pReqBuf + pReq->m_bufProcessed, len );
        pReq->m_bufProcessed += len;
        total += len;
        pBuf += len;
        bufLen -= len;
    }
    while( bufLen > 0 )
    {
        len = lsapi_read( pReq->m_fd, pBuf, bufLen );
        if ( len > 0 )
        {
            total += len;
            pBuf += len;
            bufLen -= len;
        }
        else if ( len <= 0 )
        {
            if ( !total)
                return -1;
            break;
        }
    }
    pReq->m_reqBodyRead += total;
    return total;

}


ssize_t LSAPI_Write_r( LSAPI_Request * pReq, const char * pBuf, size_t len )
{
    struct lsapi_packet_header * pHeader;
    const char * pEnd;
    const char * p;
    ssize_t bufLen;
    ssize_t toWrite;
    ssize_t packetLen;
    int skip = 0;

    if (!pReq || !pBuf)
        return -1;
    if (pReq->m_reqState & LSAPI_ST_BACKGROUND)
        return len;
    if (pReq->m_fd == -1)
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
    {
        LSAPI_FinalizeRespHeaders_r( pReq );
/*
        if ( *pBuf == '\r' )
        {
            ++skip;
        }
        if ( *pBuf == '\n' )
        {
            ++skip;
        }
*/
    }
    pReq->m_reqState |= LSAPI_ST_RESP_BODY;

    if ( ((ssize_t)len - skip) < pReq->m_pRespBufEnd - pReq->m_pRespBufPos )
    {
        memmove( pReq->m_pRespBufPos, pBuf + skip, len - skip );
        pReq->m_pRespBufPos += len - skip;
        return len;
    }


    pHeader = pReq->m_respPktHeader;
    p       = pBuf + skip;
    pEnd    = pBuf + len;
    bufLen  = pReq->m_pRespBufPos - pReq->m_pRespBuf;

    while( ( toWrite = pEnd - p ) > 0 )
    {
        packetLen = toWrite + bufLen;
        if ( LSAPI_MAX_DATA_PACKET_LEN < packetLen)
        {
            packetLen = LSAPI_MAX_DATA_PACKET_LEN;
            toWrite = packetLen - bufLen;
        }

        lsapi_buildPacketHeader( pHeader, LSAPI_RESP_STREAM,
                            packetLen + LSAPI_PACKET_HEADER_LEN );
        pReq->m_totalLen += packetLen + LSAPI_PACKET_HEADER_LEN;

        pReq->m_pIovecCur->iov_base = (void *)pHeader;
        pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN;
        ++pReq->m_pIovecCur;
        ++pHeader;
        if ( bufLen > 0 )
        {
            pReq->m_pIovecCur->iov_base = (void *)pReq->m_pRespBuf;
            pReq->m_pIovecCur->iov_len  = bufLen;
            pReq->m_pRespBufPos = pReq->m_pRespBuf;
            ++pReq->m_pIovecCur;
            bufLen = 0;
        }

        pReq->m_pIovecCur->iov_base = (void *)p;
        pReq->m_pIovecCur->iov_len  = toWrite;
        ++pReq->m_pIovecCur;
        p += toWrite;

        if ( pHeader >= pReq->m_respPktHeaderEnd - 1)
        {
            if ( LSAPI_Flush_r( pReq ) == -1 )
                return -1;
            pHeader = pReq->m_respPktHeader;
        }
    }
    if ( pHeader != pReq->m_respPktHeader )
        if ( LSAPI_Flush_r( pReq ) == -1 )
            return -1;
    return p - pBuf;
}


#if defined(__FreeBSD__ )
ssize_t gsendfile( int fdOut, int fdIn, off_t* off, size_t size )
{
    ssize_t ret;
    off_t written;
    ret = sendfile( fdIn, fdOut, *off, size, NULL, &written, 0 );
    if ( written > 0 )
    {
        ret = written;
        *off += ret;
    }
    return ret;
}
#endif

#if defined(__OpenBSD__) || defined(__NetBSD__)
ssize_t gsendfile( int fdOut, int fdIn, off_t* off, size_t size )
{
    ssize_t ret;
    off_t written = 0;
    const size_t bufsiz = 16384;
    unsigned char in[bufsiz] = {0};

    if (lseek(fdIn, *off, SEEK_SET) == -1) {
        return -1;
    }

    while (size > 0) {
        size_t tor = size > sizeof(in) ? sizeof(in) : size;
        ssize_t c = read(fdIn, in, tor);
        if (c <= 0) {
            goto end;
        }

        ssize_t w = write(fdOut, in, c);
        if (w > 0)
            written += w;

        if (w != c) {
            goto end;
        }
        size -= c;
    }

end:
    *off += written;
    return 0;
}
#endif


#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
ssize_t gsendfile( int fdOut, int fdIn, off_t* off, size_t size )
{
    ssize_t ret;
    off_t len = size;
    ret = sendfile( fdIn, fdOut, *off, &len, NULL, 0 );
    if (( ret == 0 )&&( len > 0 ))
    {
        ret = len;
        *off += len;
    }
    return ret;
}
#endif


#if defined(sun) || defined(__sun)
#include <sys/sendfile.h>
ssize_t gsendfile( int fdOut, int fdIn, off_t *off, size_t size )
{
    int n = 0 ;
    sendfilevec_t vec[1];

    vec[n].sfv_fd   = fdIn;
    vec[n].sfv_flag = 0;
    vec[n].sfv_off  = *off;
    vec[n].sfv_len  = size;
    ++n;

    size_t written;
    ssize_t ret = sendfilev( fdOut, vec, n, &written );
    if (( !ret )||( errno == EAGAIN ))
        ret = written;
    if ( ret > 0 )
        *off += ret;
    return ret;
}
#endif


#if defined(linux) || defined(__linux) || defined(__linux__) || \
    defined(__gnu_linux__)
#include <sys/sendfile.h>
#define gsendfile sendfile
#endif


#if defined(HPUX)
ssize_t gsendfile( int fdOut, int fdIn, off_t * off, size_t size )
{
    return sendfile( fdOut, fdIn, off, size, NULL, 0 );
}
#endif


ssize_t LSAPI_sendfile_r( LSAPI_Request * pReq, int fdIn, off_t* off, size_t size )
{
    struct lsapi_packet_header * pHeader = pReq->m_respPktHeader;
    if ( !pReq || (pReq->m_fd == -1) || fdIn == -1 )
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
    {
        LSAPI_FinalizeRespHeaders_r( pReq );
    }
    pReq->m_reqState |= LSAPI_ST_RESP_BODY;

    LSAPI_Flush_r(pReq);

    lsapi_buildPacketHeader( pHeader, LSAPI_RESP_STREAM,
                            size + LSAPI_PACKET_HEADER_LEN );


    if (write(pReq->m_fd,  (const char *) pHeader, LSAPI_PACKET_HEADER_LEN ) != LSAPI_PACKET_HEADER_LEN)
        return -1;

    return gsendfile( pReq->m_fd, fdIn, off, size );
}


void Flush_RespBuf_r( LSAPI_Request * pReq )
{
    struct lsapi_packet_header * pHeader = pReq->m_respPktHeader;
    int bufLen = pReq->m_pRespBufPos - pReq->m_pRespBuf;
    pReq->m_reqState |= LSAPI_ST_RESP_BODY;
    lsapi_buildPacketHeader( pHeader, LSAPI_RESP_STREAM,
                        bufLen + LSAPI_PACKET_HEADER_LEN );
    pReq->m_totalLen += bufLen + LSAPI_PACKET_HEADER_LEN;

    pReq->m_pIovecCur->iov_base = (void *)pHeader;
    pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN;
    ++pReq->m_pIovecCur;
    ++pHeader;
    if ( bufLen > 0 )
    {
        pReq->m_pIovecCur->iov_base = (void *)pReq->m_pRespBuf;
        pReq->m_pIovecCur->iov_len  = bufLen;
        pReq->m_pRespBufPos = pReq->m_pRespBuf;
        ++pReq->m_pIovecCur;
        bufLen = 0;
    }
}


int LSAPI_Flush_r( LSAPI_Request * pReq )
{
    int ret = 0;
    int n;
    if ( !pReq )
        return -1;
    n = pReq->m_pIovecCur - pReq->m_pIovecToWrite;
    if (( 0 == n )&&( pReq->m_pRespBufPos == pReq->m_pRespBuf ))
        return 0;
    if ( pReq->m_fd == -1 )
    {
        pReq->m_pRespBufPos = pReq->m_pRespBuf;
        pReq->m_totalLen = 0;
        pReq->m_pIovecCur = pReq->m_pIovecToWrite = pReq->m_pIovec;
        return -1;
    }
    if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
    {
        LSAPI_FinalizeRespHeaders_r( pReq );
    }
    if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
    {
        Flush_RespBuf_r( pReq );
    }

    n = pReq->m_pIovecCur - pReq->m_pIovecToWrite;
    if ( n > 0 )
    {

        ret = lsapi_writev( pReq->m_fd, &pReq->m_pIovecToWrite,
                  n, pReq->m_totalLen );
        if ( ret < pReq->m_totalLen )
        {
            lsapi_close_connection(pReq);
            ret = -1;
        }
        pReq->m_totalLen = 0;
        pReq->m_pIovecCur = pReq->m_pIovecToWrite = pReq->m_pIovec;
    }
    return ret;
}


ssize_t LSAPI_Write_Stderr_r( LSAPI_Request * pReq, const char * pBuf, size_t len )
{
    struct lsapi_packet_header header;
    const char * pEnd;
    const char * p;
    ssize_t packetLen;
    ssize_t totalLen;
    int ret;
    struct iovec iov[2];
    struct iovec *pIov;

    if ( !pReq )
        return -1;
    if (s_stderr_log_path || pReq->m_fd == -1 || pReq->m_fd == pReq->m_fdListen)
        return write( 2, pBuf, len );
    if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
    {
        LSAPI_Flush_r( pReq );
    }

    p       = pBuf;
    pEnd    = pBuf + len;

    while( ( packetLen = pEnd - p ) > 0 )
    {
        if ( LSAPI_MAX_DATA_PACKET_LEN < packetLen)
        {
            packetLen = LSAPI_MAX_DATA_PACKET_LEN;
        }

        lsapi_buildPacketHeader( &header, LSAPI_STDERR_STREAM,
                            packetLen + LSAPI_PACKET_HEADER_LEN );
        totalLen = packetLen + LSAPI_PACKET_HEADER_LEN;

        iov[0].iov_base = (void *)&header;
        iov[0].iov_len  = LSAPI_PACKET_HEADER_LEN;

        iov[1].iov_base = (void *)p;
        iov[1].iov_len  = packetLen;
        p += packetLen;
        pIov = iov;
        ret = lsapi_writev( pReq->m_fd, &pIov,
                  2, totalLen );
        if ( ret < totalLen )
        {
            lsapi_close_connection(pReq);
            ret = -1;
        }
    }
    return p - pBuf;
}


static char * GetHeaderVar( LSAPI_Request * pReq, const char * name )
{
    int i;
    char * pValue;
    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            if ( strcmp( name, CGI_HEADERS[i] ) == 0 )
            {
                pValue = pReq->m_pHttpHeader
                         + pReq->m_pHeaderIndex->m_headerOff[i];
                if ( *(pValue + pReq->m_pHeaderIndex->m_headerLen[i]) != '\0')
                {
                    *(pValue + pReq->m_pHeaderIndex->m_headerLen[i]) = '\0';
                }
                return pValue;
            }
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        const char *p;
        char *pKey;
        char *pKeyEnd;
        int  keyLen;
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            pKey = pReq->m_pHttpHeader + pCur->nameOff;
            keyLen = pCur->nameLen;
            pKeyEnd = pKey + keyLen;
            p = &name[5];

            while(( pKey < pKeyEnd )&&( *p ))
            {
                char ch = toupper( *pKey );
                if ((ch != *p )||(( *p == '_' )&&( ch != '-')))
                    break;
                ++p; ++pKey;
            }
            if (( pKey == pKeyEnd )&& (!*p ))
            {
                pValue = pReq->m_pHttpHeader + pCur->valueOff;

                if ( *(pValue + pCur->valueLen) != '\0')
                {
                    *(pValue + pCur->valueLen) = '\0';
                }
                return pValue;
            }
            ++pCur;
        }
    }
    return NULL;
}


char * LSAPI_GetEnv_r( LSAPI_Request * pReq, const char * name )
{
    struct LSAPI_key_value_pair * pBegin = pReq->m_pEnvList;
    struct LSAPI_key_value_pair * pEnd = pBegin + pReq->m_pHeader->m_cntEnv;
    if ( !pReq || !name )
        return NULL;
    if ( strncmp( name, "HTTP_", 5 ) == 0 )
    {
        return GetHeaderVar( pReq, name );
    }
    while( pBegin < pEnd )
    {
        if ( strcmp( name, pBegin->pKey ) == 0 )
            return pBegin->pValue;
        ++pBegin;
    }
    return NULL;
}


struct _headerInfo
{
    const char * _name;
    int          _nameLen;
    const char * _value;
    int          _valueLen;
};


int compareValueLocation(const void * v1, const void *v2 )
{
    return ((const struct _headerInfo *)v1)->_value -
           ((const struct _headerInfo *)v2)->_value;
}


int LSAPI_ForeachOrgHeader_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    int i;
    int len = 0;
    char * pValue;
    int ret;
    int count = 0;
    struct _headerInfo headers[512];

    if ( !pReq || !fn )
        return -1;

    if ( !pReq->m_pHeaderIndex )
        return 0;

    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            len = pReq->m_pHeaderIndex->m_headerLen[i];
            pValue = pReq->m_pHttpHeader + pReq->m_pHeaderIndex->m_headerOff[i];
            *(pValue + len ) = 0;
            headers[count]._name = HTTP_HEADERS[i];
            headers[count]._nameLen = HTTP_HEADER_LEN[i];
            headers[count]._value = pValue;
            headers[count]._valueLen = len;
            ++count;

            //ret = (*fn)( HTTP_HEADERS[i], HTTP_HEADER_LEN[i],
            //            pValue, len, arg );
            //if ( ret <= 0 )
            //    return ret;
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        char *pKey;
        int  keyLen;
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            pKey = pReq->m_pHttpHeader + pCur->nameOff;
            keyLen = pCur->nameLen;
            *(pKey + keyLen ) = 0;

            pValue = pReq->m_pHttpHeader + pCur->valueOff;
            *(pValue + pCur->valueLen ) = 0;
            headers[count]._name = pKey;
            headers[count]._nameLen = keyLen;
            headers[count]._value = pValue;
            headers[count]._valueLen = pCur->valueLen;
            ++count;
            if ( count == 512 )
                break;
            //ret = (*fn)( pKey, keyLen,
            //            pValue, pCur->valueLen, arg );
            //if ( ret <= 0 )
            //    return ret;
            ++pCur;
        }
    }
    qsort( headers, count, sizeof( struct _headerInfo ), compareValueLocation );
    for( i = 0; i < count; ++i )
    {
        ret = (*fn)( headers[i]._name, headers[i]._nameLen,
                    headers[i]._value, headers[i]._valueLen, arg );
        if ( ret <= 0 )
            return ret;
    }
    return count;
}


int LSAPI_ForeachHeader_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    int i;
    int len = 0;
    char * pValue;
    int ret;
    int count = 0;
    if ( !pReq || !fn )
        return -1;
    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            len = pReq->m_pHeaderIndex->m_headerLen[i];
            pValue = pReq->m_pHttpHeader + pReq->m_pHeaderIndex->m_headerOff[i];
            *(pValue + len ) = 0;
            ret = (*fn)( CGI_HEADERS[i], CGI_HEADER_LEN[i],
                        pValue, len, arg );
            ++count;
            if ( ret <= 0 )
                return ret;
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        char achHeaderName[256];
        char *p;
        char *pKey;
        char *pKeyEnd ;
        int  keyLen;
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            pKey = pReq->m_pHttpHeader + pCur->nameOff;
            keyLen = pCur->nameLen;
            if ( keyLen > 250 )
                keyLen = 250;
            pKeyEnd = pKey + keyLen;
            memcpy( achHeaderName, "HTTP_", 5 );
            p = &achHeaderName[5];

            while( pKey < pKeyEnd )
            {
                char ch = *pKey++;
                if ( ch == '-' )
                    *p++ = '_';
                else
                    *p++ = toupper( ch );
            }
            *p = 0;
            keyLen += 5;

            pValue = pReq->m_pHttpHeader + pCur->valueOff;
            *(pValue + pCur->valueLen ) = 0;
            ret = (*fn)( achHeaderName, keyLen,
                        pValue, pCur->valueLen, arg );
            if ( ret <= 0 )
                return ret;
            ++pCur;
        }
    }
    return count + pReq->m_pHeader->m_cntUnknownHeaders;
}


static int EnvForeach( struct LSAPI_key_value_pair * pEnv,
            int n, LSAPI_CB_EnvHandler fn, void * arg )
{
    struct LSAPI_key_value_pair * pEnd = pEnv + n;
    int ret;
    if ( !pEnv || !fn )
        return -1;
    while( pEnv < pEnd )
    {
        ret = (*fn)( pEnv->pKey, pEnv->keyLen,
                    pEnv->pValue, pEnv->valLen, arg );
        if ( ret <= 0 )
            return ret;
        ++pEnv;
    }
    return n;
}


int LSAPI_ForeachEnv_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    if ( !pReq || !fn )
        return -1;
    if ( pReq->m_pHeader->m_cntEnv > 0 )
    {
        return EnvForeach( pReq->m_pEnvList, pReq->m_pHeader->m_cntEnv,
                    fn, arg );
    }
    return 0;
}


int LSAPI_ForeachSpecialEnv_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    if ( !pReq || !fn )
        return -1;
    if ( pReq->m_pHeader->m_cntSpecialEnv > 0 )
    {
        return EnvForeach( pReq->m_pSpecialEnvList,
                pReq->m_pHeader->m_cntSpecialEnv,
                    fn, arg );
    }
    return 0;

}


int LSAPI_FinalizeRespHeaders_r( LSAPI_Request * pReq )
{
    if ( !pReq || !pReq->m_pIovec )
        return -1;
    if ( !( pReq->m_reqState & LSAPI_ST_RESP_HEADER ) )
        return 0;
    pReq->m_reqState &= ~LSAPI_ST_RESP_HEADER;
    if ( pReq->m_pRespHeaderBufPos > pReq->m_pRespHeaderBuf )
    {
        pReq->m_pIovecCur->iov_base = (void *)pReq->m_pRespHeaderBuf;
        pReq->m_pIovecCur->iov_len  = pReq->m_pRespHeaderBufPos - pReq->m_pRespHeaderBuf;
        pReq->m_totalLen += pReq->m_pIovecCur->iov_len;
        ++pReq->m_pIovecCur;
    }

    pReq->m_pIovec->iov_len  = sizeof( struct lsapi_resp_header)
            + pReq->m_respHeader.m_respInfo.m_cntHeaders * sizeof( short );
    pReq->m_totalLen += pReq->m_pIovec->iov_len;

    lsapi_buildPacketHeader( &pReq->m_respHeader.m_pktHeader,
                    LSAPI_RESP_HEADER, pReq->m_totalLen  );
    pReq->m_pIovec->iov_base = (void *)&pReq->m_respHeader;
    pReq->m_pIovecToWrite = pReq->m_pIovec;
    return 0;
}


int LSAPI_AppendRespHeader2_r( LSAPI_Request * pReq, const char * pHeaderName,
                              const char * pHeaderValue )
{
    int nameLen, valLen, len;
    if ( !pReq || !pHeaderName || !pHeaderValue )
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_BODY )
        return -1;
    if ( pReq->m_respHeader.m_respInfo.m_cntHeaders >= LSAPI_MAX_RESP_HEADERS )
        return -1;
    nameLen = strlen( pHeaderName );
    valLen = strlen( pHeaderValue );
    if ( nameLen == 0 )
        return -1;
    while( nameLen > 0 )
    {
        char ch = *(pHeaderName + nameLen - 1 );
        if (( ch == '\n' )||( ch == '\r' ))
            --nameLen;
        else
            break;
    }
    if ( nameLen <= 0 )
        return 0;
    while( valLen > 0 )
    {
        char ch = *(pHeaderValue + valLen - 1 );
        if (( ch == '\n' )||( ch == '\r' ))
            --valLen;
        else
            break;
    }
    len = nameLen + valLen + 1;
    if ( len > LSAPI_RESP_HTTP_HEADER_MAX )
        return -1;

    if ( pReq->m_pRespHeaderBufPos + len + 1 > pReq->m_pRespHeaderBufEnd )
    {
        int newlen = pReq->m_pRespHeaderBufPos + len + 4096 - pReq->m_pRespHeaderBuf;
        newlen -= newlen % 4096;
        if ( allocateRespHeaderBuf( pReq, newlen ) == -1 )
            return -1;
    }
    memmove( pReq->m_pRespHeaderBufPos, pHeaderName, nameLen );
    pReq->m_pRespHeaderBufPos += nameLen;
    *pReq->m_pRespHeaderBufPos++ = ':';
    memmove( pReq->m_pRespHeaderBufPos, pHeaderValue, valLen );
    pReq->m_pRespHeaderBufPos += valLen;
    *pReq->m_pRespHeaderBufPos++ = 0;
    ++len;  /* add one byte padding for \0 */
    pReq->m_respHeaderLen[pReq->m_respHeader.m_respInfo.m_cntHeaders] = len;
    ++pReq->m_respHeader.m_respInfo.m_cntHeaders;
    return 0;
}


int LSAPI_AppendRespHeader_r( LSAPI_Request * pReq, const char * pBuf, int len )
{
    if ( !pReq || !pBuf || len <= 0 || len > LSAPI_RESP_HTTP_HEADER_MAX )
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_BODY )
        return -1;
    if ( pReq->m_respHeader.m_respInfo.m_cntHeaders >= LSAPI_MAX_RESP_HEADERS )
        return -1;
    while( len > 0 )
    {
        char ch = *(pBuf + len - 1 );
        if (( ch == '\n' )||( ch == '\r' ))
            --len;
        else
            break;
    }
    if ( len <= 0 )
        return 0;
    if ( pReq->m_pRespHeaderBufPos + len + 1 > pReq->m_pRespHeaderBufEnd )
    {
        int newlen = pReq->m_pRespHeaderBufPos + len + 4096 - pReq->m_pRespHeaderBuf;
        newlen -= newlen % 4096;
        if ( allocateRespHeaderBuf( pReq, newlen ) == -1 )
            return -1;
    }
    memmove( pReq->m_pRespHeaderBufPos, pBuf, len );
    pReq->m_pRespHeaderBufPos += len;
    *pReq->m_pRespHeaderBufPos++ = 0;
    ++len;  /* add one byte padding for \0 */
    pReq->m_respHeaderLen[pReq->m_respHeader.m_respInfo.m_cntHeaders] = len;
    ++pReq->m_respHeader.m_respInfo.m_cntHeaders;
    return 0;
}


int LSAPI_CreateListenSock2( const struct sockaddr * pServerAddr, int backlog )
{
    int ret;
    int fd;
    int flag = 1;
    int addr_len;

    switch( pServerAddr->sa_family )
    {
    case AF_INET:
        addr_len = 16;
        break;
    case AF_INET6:
        addr_len = sizeof( struct sockaddr_in6 );
        break;
    case AF_UNIX:
        addr_len = sizeof( struct sockaddr_un );
        unlink( ((struct sockaddr_un *)pServerAddr)->sun_path );
        break;
    default:
        return -1;
    }

    fd = socket( pServerAddr->sa_family, SOCK_STREAM, 0 );
    if ( fd == -1 )
        return -1;

    fcntl( fd, F_SETFD, FD_CLOEXEC );

    if(setsockopt( fd, SOL_SOCKET, SO_REUSEADDR,
                (char *)( &flag ), sizeof(flag)) == 0)
    {
        ret = bind( fd, pServerAddr, addr_len );
        if ( !ret )
        {
            ret = listen( fd, backlog );
            if ( !ret )
                return fd;
        }
    }

    ret = errno;
    close(fd);
    errno = ret;
    return -1;
}


int LSAPI_ParseSockAddr( const char * pBind, struct sockaddr * pAddr )
{
    char achAddr[256];
    char * p = achAddr;
    char * pEnd;
    struct addrinfo *res, hints;
    int  doAddrInfo = 0;
    int port;

    if ( !pBind )
        return -1;

    while( isspace( *pBind ) )
        ++pBind;

    strncpy(achAddr, pBind, 255);
    achAddr[255] = 0;

    switch( *p )
    {
    case '/':
        pAddr->sa_family = AF_UNIX;
        strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p,
                sizeof(((struct sockaddr_un *)pAddr)->sun_path) );
        return 0;

    case '[':
        pAddr->sa_family = AF_INET6;
        ++p;
        pEnd = strchr( p, ']' );
        if ( !pEnd )
            return -1;
        *pEnd++ = 0;

        if ( *p == '*' )
        {
            strcpy( achAddr, "::" );
            p = achAddr;
        }
        doAddrInfo = 1;
        break;

    default:
        pAddr->sa_family = AF_INET;
        pEnd = strchr( p, ':' );
        if ( !pEnd )
            return -1;
        *pEnd++ = 0;

        doAddrInfo = 0;
        if ( *p == '*' )
        {
            ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = htonl(INADDR_ANY);
        }
        else if (!strcasecmp( p, "localhost" ) )
            ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = htonl( INADDR_LOOPBACK );
        else
        {
#ifdef HAVE_INET_PTON
            if (!inet_pton(AF_INET, p, &((struct sockaddr_in *)pAddr)->sin_addr))
#else
            ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = inet_addr( p );
            if ( ((struct sockaddr_in *)pAddr)->sin_addr.s_addr == INADDR_BROADCAST)
#endif
            {
                doAddrInfo = 1;
            }
        }
        break;
    }
    if ( *pEnd == ':' )
        ++pEnd;

    port = atoi( pEnd );
    if (( port <= 0 )||( port > 65535 ))
        return -1;
    if ( doAddrInfo )
    {

        memset(&hints, 0, sizeof(hints));

        hints.ai_family   = pAddr->sa_family;
        hints.ai_socktype = SOCK_STREAM;
        hints.ai_protocol = IPPROTO_TCP;

        if ( getaddrinfo(p, NULL, &hints, &res) )
        {
            return -1;
        }

        memcpy(pAddr, res->ai_addr, res->ai_addrlen);
        freeaddrinfo(res);
    }

    if ( pAddr->sa_family == AF_INET )
        ((struct sockaddr_in *)pAddr)->sin_port = htons( port );
    else
        ((struct sockaddr_in6 *)pAddr)->sin6_port = htons( port );
    return 0;

}


int LSAPI_CreateListenSock( const char * pBind, int backlog )
{
    char serverAddr[128];
    int ret;
    int fd = -1;
    ret = LSAPI_ParseSockAddr( pBind, (struct sockaddr *)serverAddr );
    if ( !ret )
    {
        fd = LSAPI_CreateListenSock2( (struct sockaddr *)serverAddr, backlog );
    }
    return fd;
}


static fn_select_t g_fnSelect = select;
typedef struct _lsapi_prefork_server
{
    int m_fd;
    int m_iMaxChildren;
    int m_iExtraChildren;
    int m_iCurChildren;
    int m_iMaxIdleChildren;
    int m_iServerMaxIdle;
    int m_iChildrenMaxIdleTime;
    int m_iMaxReqProcessTime;
    int m_iAvoidFork;

    lsapi_child_status * m_pChildrenStatus;
    lsapi_child_status * m_pChildrenStatusCur;
    lsapi_child_status * m_pChildrenStatusEnd;

}lsapi_prefork_server;
static lsapi_prefork_server * g_prefork_server = NULL;


int LSAPI_Init_Prefork_Server( int max_children, fn_select_t fp, int avoidFork )
{
    if ( g_prefork_server )
        return 0;
    if ( max_children <= 1 )
        return -1;
    if ( max_children >= 10000)
        max_children = 10000;

    if (s_max_busy_workers == 0)
        s_max_busy_workers = max_children / 2 + 1;

    g_prefork_server = (lsapi_prefork_server *)malloc( sizeof( lsapi_prefork_server ) );
    if ( !g_prefork_server )
        return -1;
    memset( g_prefork_server, 0, sizeof( lsapi_prefork_server ) );

    if ( fp != NULL )
        g_fnSelect = fp;

    s_ppid = getppid();
    s_pid = getpid();
    setpgid( s_pid, s_pid );
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    s_total_pages = sysconf(_SC_PHYS_PAGES);
#endif
    g_prefork_server->m_iAvoidFork = avoidFork;
    g_prefork_server->m_iMaxChildren = max_children;

    g_prefork_server->m_iExtraChildren = ( avoidFork ) ? 0 : (max_children / 3) ;
    g_prefork_server->m_iMaxIdleChildren = ( avoidFork ) ? (max_children + 1) : (max_children / 3);
    if ( g_prefork_server->m_iMaxIdleChildren == 0 )
        g_prefork_server->m_iMaxIdleChildren = 1;
    g_prefork_server->m_iChildrenMaxIdleTime = 300;
    g_prefork_server->m_iMaxReqProcessTime = 3600;

    setsid();

    return 0;
}


void LSAPI_Set_Server_fd( int fd )
{
    if( g_prefork_server )
        g_prefork_server->m_fd = fd;
}


static int lsapi_accept( int fdListen )
{
    int         fd;
    int         nodelay = 1;
    socklen_t   len;
    char        achPeer[128];

    len = sizeof( achPeer );
    fd = accept( fdListen, (struct sockaddr *)&achPeer, &len );
    if ( fd != -1 )
    {
        if (((struct sockaddr *)&achPeer)->sa_family == AF_INET )
        {
            setsockopt( fd, IPPROTO_TCP, TCP_NODELAY,
                    (char *)&nodelay, sizeof(nodelay));
        }

        //OPTIMIZATION
        //if ( s_accept_notify )
        //    notify_req_received( fd );
    }
    return fd;

}


static unsigned int s_max_reqs = UINT_MAX;
static int s_max_idle_secs = 300;
static int s_stop;

static void lsapi_cleanup(int signal)
{
    s_stop = signal;
}


static lsapi_child_status * find_child_status( int pid )
{
    lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
    lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusEnd;
    while( pStatus < pEnd )
    {
        if ( pStatus->m_pid == pid )
        {
            if (pid == 0)
            {
                memset(pStatus, 0, sizeof( *pStatus ) );
                pStatus->m_pid = -1;
            }
            if ( pStatus + 1 > g_prefork_server->m_pChildrenStatusCur )
                g_prefork_server->m_pChildrenStatusCur = pStatus + 1;
            return pStatus;
        }
        ++pStatus;
    }
    return NULL;
}


void LSAPI_reset_server_state( void )
{
    /*
       Reset child status
    */
    g_prefork_server->m_iCurChildren = 0;
    lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
    lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusEnd;
    while( pStatus < pEnd )
    {
        pStatus->m_pid = 0;
        ++pStatus;
    }
    if (s_busy_workers)
        __atomic_store_n(s_busy_workers, 0, __ATOMIC_SEQ_CST);
    if (s_accepting_workers)
        __atomic_store_n(s_accepting_workers, 0, __ATOMIC_SEQ_CST);

}


static void lsapi_sigchild( int signal )
{
    int status, pid;
    char expect_connected = LSAPI_STATE_CONNECTED;
    char expect_accepting = LSAPI_STATE_ACCEPTING;
    lsapi_child_status * child_status;
    if (g_prefork_server == NULL)
        return;
    while( 1 )
    {
        pid = waitpid( -1, &status, WNOHANG|WUNTRACED );
        if ( pid <= 0 )
        {
            break;
        }
        if ( WIFSIGNALED( status ))
        {
            int sig_num = WTERMSIG( status );
#ifdef WCOREDUMP
            const char * dump = WCOREDUMP( status ) ? "yes" : "no";
#else
            const char * dump = "unknown";
#endif
            lsapi_log("Child process with pid: %d was killed by signal: "
                     "%d, core dumped: %s\n", pid, sig_num, dump );
        }
        if ( pid == s_pid_dump_debug_info )
        {
            pid = 0;
            continue;
        }
        if ( pid == s_ignore_pid )
        {
            pid = 0;
            s_ignore_pid = -1;
            continue;
        }
        child_status = find_child_status( pid );
        if ( child_status )
        {
            if (__atomic_compare_exchange_n(&child_status->m_state,
                                            &expect_connected,
                                            LSAPI_STATE_IDLE, 1,
                                            __ATOMIC_SEQ_CST,
                                            __ATOMIC_SEQ_CST))
            {
                if (s_busy_workers)
                    __atomic_fetch_sub(s_busy_workers, 1, __ATOMIC_SEQ_CST);
            }
            else if (__atomic_compare_exchange_n(&child_status->m_state,
                                                 &expect_accepting,
                                                 LSAPI_STATE_IDLE, 1,
                                                 __ATOMIC_SEQ_CST,
                                                 __ATOMIC_SEQ_CST))
            {
                if (s_accepting_workers)
                    __atomic_fetch_sub(s_accepting_workers, 1, __ATOMIC_SEQ_CST);
            }
            child_status->m_pid = 0;
            --g_prefork_server->m_iCurChildren;
        }
    }
    while(( g_prefork_server->m_pChildrenStatusCur > g_prefork_server->m_pChildrenStatus )
            &&( g_prefork_server->m_pChildrenStatusCur[-1].m_pid == 0 ))
        --g_prefork_server->m_pChildrenStatusCur;

}


static int lsapi_init_children_status(void)
{
    char * pBuf;
    int size = 4096;
    int max_children;
    if (g_prefork_server->m_pChildrenStatus)
        return 0;
    max_children = g_prefork_server->m_iMaxChildren
                        + g_prefork_server->m_iExtraChildren;

    size = max_children * sizeof( lsapi_child_status ) * 2 + 3 * sizeof(int);
    size = (size + 4095) / 4096 * 4096;
    pBuf =( char*) mmap( NULL, size, PROT_READ | PROT_WRITE,
        MAP_ANON | MAP_SHARED, -1, 0 );
    if ( pBuf == MAP_FAILED )
    {
        perror( "Anonymous mmap() failed" );
        return -1;
    }
    memset( pBuf, 0, size );
    g_prefork_server->m_pChildrenStatus = (lsapi_child_status *)pBuf;
    g_prefork_server->m_pChildrenStatusCur = (lsapi_child_status *)pBuf;
    g_prefork_server->m_pChildrenStatusEnd = (lsapi_child_status *)pBuf + max_children;
    s_busy_workers = (int *)g_prefork_server->m_pChildrenStatusEnd;
    s_accepting_workers = s_busy_workers + 1;
    s_global_counter = s_accepting_workers + 1;
    s_avail_pages = (size_t *)(s_global_counter + 1);

    setsid();
    return 0;
}


static void dump_debug_info( lsapi_child_status * pStatus, long tmCur )
{
    char achCmd[1024];
    if ( s_pid_dump_debug_info )
    {
        if ( kill( s_pid_dump_debug_info, 0 ) == 0 )
            return;
    }

    lsapi_log("Possible runaway process, UID: %d, PPID: %d, PID: %d, "
             "reqCount: %d, process time: %ld, checkpoint time: %ld, start "
             "time: %ld\n", getuid(), getppid(), pStatus->m_pid,
             pStatus->m_iReqCounter, tmCur - pStatus->m_tmReqBegin,
             tmCur - pStatus->m_tmLastCheckPoint, tmCur - pStatus->m_tmStart );

    s_pid_dump_debug_info = fork();
    if (s_pid_dump_debug_info == 0)
    {
        snprintf( achCmd, 1024, "gdb --batch -ex \"attach %d\" -ex \"set height 0\" "
                "-ex \"bt\" >&2;PATH=$PATH:/usr/sbin lsof -p %d >&2",
                pStatus->m_pid, pStatus->m_pid );
        if ( system( achCmd ) == -1 )
            perror( "system()" );
        exit( 0 );
    }
}


static void lsapi_check_child_status( long tmCur )
{
    int idle = 0;
    int tobekilled;
    int dying = 0;
    int count = 0;
    lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
    lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusCur;
    while( pStatus < pEnd )
    {
        tobekilled = 0;
        if ( pStatus->m_pid != 0 && pStatus->m_pid != -1)
        {
            ++count;
            if ( !pStatus->m_inProcess )
            {
                if (g_prefork_server->m_iCurChildren - dying
                        > g_prefork_server->m_iMaxChildren
                    || idle > g_prefork_server->m_iMaxIdleChildren)
                {
                    ++pStatus->m_iKillSent;
                    //tobekilled = SIGUSR1;
                }
                else
                {
                    if (s_max_idle_secs> 0
                        && tmCur - pStatus->m_tmWaitBegin > s_max_idle_secs + 5)
                    {
                        ++pStatus->m_iKillSent;
                        //tobekilled = SIGUSR1;
                    }
                }
                if (!pStatus->m_iKillSent)
                    ++idle;
            }
            else
            {
                if (tmCur - pStatus->m_tmReqBegin >
                        g_prefork_server->m_iMaxReqProcessTime)
                {
                    if ((pStatus->m_iKillSent % 5) == 0 && s_dump_debug_info)
                        dump_debug_info( pStatus, tmCur );
                    if ( pStatus->m_iKillSent > 5 )
                    {
                        tobekilled = SIGKILL;
                        lsapi_log("Force killing runaway process PID: %d"
                                 " with SIGKILL\n", pStatus->m_pid );
                    }
                    else
                    {
                        tobekilled = SIGTERM;
                        lsapi_log("Killing runaway process PID: %d with "
                                 "SIGTERM\n", pStatus->m_pid );
                    }
                }
            }
            if ( tobekilled )
            {
                if (( kill( pStatus->m_pid, tobekilled ) == -1 ) &&
                    ( errno == ESRCH ))
                {
                    pStatus->m_pid = 0;
                    --count;
                }
                else
                {
                    ++pStatus->m_iKillSent;
                    ++dying;
                }
            }
        }
        ++pStatus;
    }
    if ( abs( g_prefork_server->m_iCurChildren - count ) > 1 )
    {
        lsapi_log("Children tracking is wrong: Cur Children: %d,"
                  " count: %d, idle: %d, dying: %d\n",
                  g_prefork_server->m_iCurChildren, count, idle, dying );
    }
}


//static int lsapi_all_children_must_die(void)
//{
//    int maxWait;
//    int sec =0;
//    g_prefork_server->m_iMaxReqProcessTime = 10;
//    g_prefork_server->m_iMaxIdleChildren = -1;
//    maxWait = 15;
//
//    while( g_prefork_server->m_iCurChildren && (sec < maxWait) )
//    {
//        lsapi_check_child_status(time(NULL));
//        sleep( 1 );
//        sec++;
//    }
//    if ( g_prefork_server->m_iCurChildren != 0 )
//        kill( -getpgrp(), SIGKILL );
//    return 0;
//}


void set_skip_write(void)
{   s_skip_write = 1;   }


int is_enough_free_mem(void)
{
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    //minimum 1GB or 10% available free memory
    return (*s_avail_pages > s_min_avail_pages
            || (*s_avail_pages * 10) / s_total_pages > 0);
#endif
    return 1;
}


static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer,
                                        LSAPI_Request * pReq )
{
    struct sigaction act, old_term, old_quit, old_int,
                    old_usr1, old_child;
    lsapi_child_status * child_status;
    int             wait_secs = 0;
    int             ret = 0;
    int             pid;
    time_t          lastTime = 0;
    time_t          curTime = 0;
    fd_set          readfds;
    struct timeval  timeout;

    sigset_t mask;
    sigset_t orig_mask;

    lsapi_init_children_status();

    act.sa_flags = 0;
    act.sa_handler = lsapi_sigchild;
    sigemptyset(&(act.sa_mask));
    if( sigaction( SIGCHLD, &act, &old_child ) )
    {
        perror( "Can't set signal handler for SIGCHILD" );
        return -1;
    }

    /* Set up handler to kill children upon exit */
    act.sa_flags = 0;
    act.sa_handler = lsapi_cleanup;
    sigemptyset(&(act.sa_mask));
    if( sigaction( SIGTERM, &act, &old_term ) ||
        sigaction( SIGINT,  &act, &old_int  ) ||
        sigaction( SIGUSR1, &act, &old_usr1 ) ||
        sigaction( SIGQUIT, &act, &old_quit ))
    {
        perror( "Can't set signals" );
        return -1;
    }

    while( !s_stop )
    {
        if (s_proc_group_timer_cb != NULL) {
            s_proc_group_timer_cb(&s_ignore_pid);
        }

        curTime = time( NULL );
        if (curTime != lastTime )
        {
            lastTime = curTime;
            if (lsapi_parent_dead())
                break;
            lsapi_check_child_status(curTime );
            if (pServer->m_iServerMaxIdle)
            {
                if ( pServer->m_iCurChildren <= 0 )
                {
                    ++wait_secs;
                    if ( wait_secs > pServer->m_iServerMaxIdle )
                        return -1;
                }
                else
                    wait_secs = 0;
            }
        }

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
        *s_avail_pages = sysconf(_SC_AVPHYS_PAGES);
//        lsapi_log("Memory total: %zd, free: %zd, free %%%zd\n",
//                  s_total_pages, *s_avail_pages, *s_avail_pages * 100 / s_total_pages);

#endif
        FD_ZERO( &readfds );
        FD_SET( pServer->m_fd, &readfds );
        timeout.tv_sec = 1;
        timeout.tv_usec = 0;
        ret = (*g_fnSelect)(pServer->m_fd+1, &readfds, NULL, NULL, &timeout);
        if (ret == 1 )
        {
            int accepting = 0;
            if (s_accepting_workers)
                accepting = __atomic_load_n(s_accepting_workers, __ATOMIC_SEQ_CST);

            if (pServer->m_iCurChildren > 0
                && accepting > 0)
            {
                usleep(400);
                while(accepting-- > 0)
                    sched_yield();
                continue;
            }
        }
        else if ( ret == -1 )
        {
            if ( errno == EINTR )
                continue;
            /* perror( "select()" ); */
            break;
        }
        else
        {
            continue;
        }

        if (pServer->m_iCurChildren >=
            pServer->m_iMaxChildren + pServer->m_iExtraChildren)
        {
            lsapi_log("Reached max children process limit: %d, extra: %d,"
                     " current: %d, busy: %d, please increase LSAPI_CHILDREN.\n",
                     pServer->m_iMaxChildren, pServer->m_iExtraChildren,
                     pServer->m_iCurChildren,
                     s_busy_workers ? *s_busy_workers : -1 );
            usleep( 100000 );
            continue;
        }

        pReq->m_fd = lsapi_accept( pServer->m_fd );
        if ( pReq->m_fd != -1 )
        {
            wait_secs = 0;
            child_status = find_child_status( 0 );

            sigemptyset( &mask );
            sigaddset( &mask, SIGCHLD );

            if ( sigprocmask(SIG_BLOCK, &mask, &orig_mask) < 0 )
            {
                perror( "sigprocmask(SIG_BLOCK) to block SIGCHLD" );
            }

            pid = fork();

            if ( !pid )
            {
                setsid();
                if (sigprocmask(SIG_SETMASK, &orig_mask, NULL) < 0)
                    perror( "sigprocmask( SIG_SETMASK ) to restore SIGMASK in child" );
                g_prefork_server = NULL;
                s_ppid = getppid();
                s_pid = getpid();
                s_req_processed = 0;
                s_proc_group_timer_cb = NULL;
                s_worker_status = child_status;

                if (pthread_atfork_func)
                    (*pthread_atfork_func)(NULL, NULL, set_skip_write);

                __atomic_store_n(&s_worker_status->m_state,
                                 LSAPI_STATE_CONNECTED, __ATOMIC_SEQ_CST);
                if (s_busy_workers)
                    __atomic_add_fetch(s_busy_workers, 1, __ATOMIC_SEQ_CST);
                lsapi_set_nblock( pReq->m_fd, 0 );
                //keep it open if busy_count is used.
                if (!s_keep_listener && s_busy_workers
                    && *s_busy_workers > (pServer->m_iMaxChildren >> 1))
                    s_keep_listener = 1;
                if ((s_uid == 0 || !s_keep_listener || !is_enough_free_mem())
                    && pReq->m_fdListen != -1 )
                {
                    close( pReq->m_fdListen );
                    pReq->m_fdListen = -1;
                }
                /* don't catch our signals */
                sigaction( SIGCHLD, &old_child, 0 );
                sigaction( SIGTERM, &old_term, 0 );
                sigaction( SIGQUIT, &old_quit, 0 );
                sigaction( SIGINT,  &old_int,  0 );
                sigaction( SIGUSR1, &old_usr1, 0 );
                //init_conn_key( pReq->m_fd );
                lsapi_notify_pid( pReq->m_fd );
                s_notified_pid = 1;
                //if ( s_accept_notify )
                //    return notify_req_received( pReq->m_fd );
                return 0;
            }
            else if ( pid == -1 )
            {
                lsapi_perror("fork() failed, please increase process limit", errno);
                if (child_status)
                    child_status->m_pid = 0;
            }
            else
            {
                ++pServer->m_iCurChildren;
                if ( child_status )
                {
                    child_status->m_pid = pid;
                    child_status->m_tmWaitBegin = curTime;
                    child_status->m_tmStart = curTime;
                }
            }
            close( pReq->m_fd );
            pReq->m_fd = -1;

            if (sigprocmask(SIG_SETMASK, &orig_mask, NULL) < 0)
                perror( "sigprocmask( SIG_SETMASK ) to restore SIGMASK" );

        }
        else
        {
            if (( errno == EINTR )||( errno == EAGAIN))
                continue;
            lsapi_perror("accept() failed", errno);
            return -1;
        }
    }
    sigaction( SIGUSR1, &old_usr1, 0 );
    //kill( -getpgrp(), SIGUSR1 );
    //lsapi_all_children_must_die();  /* Sorry, children ;-) */
    return -1;

}


static struct sigaction old_term, old_quit, old_int,
                    old_usr1, old_child;


int LSAPI_Postfork_Child(LSAPI_Request * pReq)
{
    int max_children = g_prefork_server->m_iMaxChildren;
    s_pid = getpid();
    __atomic_store_n(&pReq->child_status->m_pid, s_pid, __ATOMIC_SEQ_CST);
    s_worker_status = pReq->child_status;

    setsid();
    g_prefork_server = NULL;
    s_ppid = getppid();
    s_req_processed = 0;
    s_proc_group_timer_cb = NULL;

    if (pthread_atfork_func)
        (*pthread_atfork_func)(NULL, NULL, set_skip_write);

    __atomic_store_n(&s_worker_status->m_state,
                     LSAPI_STATE_CONNECTED, __ATOMIC_SEQ_CST);
    if (s_busy_workers)
        __atomic_add_fetch(s_busy_workers, 1, __ATOMIC_SEQ_CST);
    lsapi_set_nblock( pReq->m_fd, 0 );
    //keep it open if busy_count is used.
    if (!s_keep_listener && s_busy_workers
        && *s_busy_workers > (max_children >> 1))
        s_keep_listener = 1;
    if ((s_uid == 0 || !s_keep_listener || !is_enough_free_mem())
        && pReq->m_fdListen != -1 )
    {
        close(pReq->m_fdListen);
        pReq->m_fdListen = -1;
    }

    //init_conn_key( pReq->m_fd );
    lsapi_notify_pid(pReq->m_fd);
    s_notified_pid = 1;
    //if ( s_accept_notify )
    //    return notify_req_received( pReq->m_fd );
    return 0;
}


int LSAPI_Postfork_Parent(LSAPI_Request * pReq)
{
    ++g_prefork_server->m_iCurChildren;
    if (pReq->child_status)
    {
        time_t curTime = time( NULL );
        pReq->child_status->m_tmWaitBegin = curTime;
        pReq->child_status->m_tmStart = curTime;
    }
    close(pReq->m_fd);
    pReq->m_fd = -1;
    return 0;
}


int LSAPI_Accept_Before_Fork(LSAPI_Request * pReq)
{
    time_t          lastTime = 0;
    time_t          curTime = 0;
    fd_set          readfds;
    struct timeval  timeout;
    int             wait_secs = 0;
    int             ret = 0;

    lsapi_prefork_server * pServer = g_prefork_server;

    struct sigaction act;

    lsapi_init_children_status();

    act.sa_flags = 0;
    act.sa_handler = lsapi_sigchild;
    sigemptyset(&(act.sa_mask));
    if (sigaction(SIGCHLD, &act, &old_child))
    {
        perror( "Can't set signal handler for SIGCHILD" );
        return -1;
    }

    /* Set up handler to kill children upon exit */
    act.sa_flags = 0;
    act.sa_handler = lsapi_cleanup;
    sigemptyset(&(act.sa_mask));
    if (sigaction(SIGTERM, &act, &old_term) ||
        sigaction(SIGINT,  &act, &old_int ) ||
        sigaction(SIGUSR1, &act, &old_usr1) ||
        sigaction(SIGQUIT, &act, &old_quit))
    {
        perror( "Can't set signals" );
        return -1;
    }
    s_stop = 0;
    pReq->m_reqState = 0;

    while(!s_stop)
    {
        if (s_proc_group_timer_cb != NULL) {
            s_proc_group_timer_cb(&s_ignore_pid);
        }

        curTime = time(NULL);
        if (curTime != lastTime)
        {
            lastTime = curTime;
            if (lsapi_parent_dead())
                break;
            lsapi_check_child_status(curTime);
            if (pServer->m_iServerMaxIdle)
            {
                if (pServer->m_iCurChildren <= 0)
                {
                    ++wait_secs;
                    if ( wait_secs > pServer->m_iServerMaxIdle )
                        return -1;
                }
                else
                    wait_secs = 0;
            }
        }

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
        *s_avail_pages = sysconf(_SC_AVPHYS_PAGES);
//        lsapi_log("Memory total: %zd, free: %zd, free %%%zd\n",
//                  s_total_pages, *s_avail_pages, *s_avail_pages * 100 / s_total_pages);

#endif
        FD_ZERO(&readfds);
        FD_SET(pServer->m_fd, &readfds);
        timeout.tv_sec = 1;
        timeout.tv_usec = 0;
        ret = (*g_fnSelect)(pServer->m_fd+1, &readfds, NULL, NULL, &timeout);
        if (ret == 1 )
        {
            int accepting = 0;
            if (s_accepting_workers)
                accepting = __atomic_load_n(s_accepting_workers, __ATOMIC_SEQ_CST);

            if (pServer->m_iCurChildren > 0
                && accepting > 0)
            {
                usleep( 400);
                while(accepting-- > 0)
                    sched_yield();
                continue;
            }
        }
        else if (ret == -1)
        {
            if (errno == EINTR)
                continue;
            /* perror( "select()" ); */
            break;
        }
        else
        {
            continue;
        }

        if (pServer->m_iCurChildren >=
            pServer->m_iMaxChildren + pServer->m_iExtraChildren)
        {
            lsapi_log("Reached max children process limit: %d, egems/gems/rake-13.0.6/doc/command_line_usage.rdoc000064400000013506150403134150015327 0ustar00it, 0);
    sigaction(SIGINT,  &old_int,  0);
    sigaction(SIGUSR1, &old_usr1, 0);

    return ret;
}


int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq )
{
    int             fd;
    int             ret;
    int             wait_secs;
    fd_set          readfds;
    struct timeval  timeout;

    if (s_skip_write)
        return -1;

    LSAPI_Finish_r( pReq );

    if ( g_prefork_server )
    {
        if ( g_prefork_server->m_fd != -1 )
            if ( lsapi_prefork_server_accept( g_prefork_server, pReq ) == -1 )
                return -1;
    }
    else if (s_req_processed > 0 && s_max_busy_workers > 0 && s_busy_workers)
    {
        ret = __atomic_load_n(s_busy_workers, __ATOMIC_SEQ_CST);
        if (ret >= s_max_busy_workers)
        {
            send_conn_close_notification(pReq->m_fd);
            lsapi_close_connection(pReq);
        }
    }

    if ( (unsigned int)s_req_processed > s_max_reqs )
        return -1;

    if ( s_worker_status )
    {
        s_worker_status->m_tmWaitBegin = time( NULL );
    }


    while( g_running )
    {
        if ( pReq->m_fd != -1 )
        {
            fd = pReq->m_fd;
        }
        else if ( pReq->m_fdListen != -1 )
            fd = pReq->m_fdListen;
        else
        {
            break;
        }
        wait_secs = 0;
        while( 1 )
        {
            if ( !g_running )
                return -1;
            if (s_req_processed && s_worker_status
                && s_worker_status->m_iKillSent)
                return -1;
            FD_ZERO( &readfds );
            FD_SET( fd, &readfds );
            timeout.tv_sec = 1;
            timeout.tv_usec = 0;
            if (fd == pReq->m_fdListen)
            {
                if (s_worker_status)
                    __atomic_store_n(&s_worker_status->m_state,
                                     LSAPI_STATE_ACCEPTING, __ATOMIC_SEQ_CST);
                if (s_accepting_workers)
                    __atomic_fetch_add(s_accepting_workers, 1, __ATOMIC_SEQ_CST);
            }
            ret = (*g_fnSelect)(fd+1, &readfds, NULL, NULL, &timeout);
            if (fd == pReq->m_fdListen)
            {
                if (s_accepting_workers)
                    __atomic_fetch_sub(s_accepting_workers, 1, __ATOMIC_SEQ_CST);
                if (s_worker_status)
                    __atomic_store_n(&s_worker_status->m_state,
                                     LSAPI_STATE_IDLE, __ATOMIC_SEQ_CST);
            }

            if ( ret == 0 )
            {
                if ( s_worker_status )
                {
                    s_worker_status->m_inProcess = 0;
                    if (fd == pReq->m_fdListen)
                    {
                        if (s_keep_listener == 0 || !is_enough_free_mem())
                            return -1;
                        if (s_keep_listener == 1)
                        {
                            int wait_time = 10;
                            if (s_busy_workers)
                                wait_time += *s_busy_workers * 10;
                            if (s_accepting_workers)
                                wait_time >>= (*s_accepting_workers);
                            if (wait_secs >= wait_time)
                                return -1;
                        }
                    }
                }
                ++wait_secs;
                if (( s_max_idle_secs > 0 )&&(wait_secs >= s_max_idle_secs ))
                    return -1;
                if ( lsapi_parent_dead() )
                    return -1;
            }
            else if ( ret == -1 )
            {
                if ( errno == EINTR )
                    continue;
                else
                    return -1;
            }
            else if ( ret >= 1 )
            {
                if (s_req_processed && s_worker_status
                    && s_worker_status->m_iKillSent)
                    return -1;
                if ( fd == pReq->m_fdListen )
                {
                    pReq->m_fd = lsapi_accept( pReq->m_fdListen );
                    if ( pReq->m_fd != -1 )
                    {
                        if (s_worker_status)
                            __atomic_store_n(&s_worker_status->m_state,
                                             LSAPI_STATE_CONNECTED,
                                             __ATOMIC_SEQ_CST);
                        if (s_busy_workers)
                            __atomic_fetch_add(s_busy_workers, 1, __ATOMIC_SEQ_CST);

                        fd = pReq->m_fd;

                        lsapi_set_nblock( fd, 0 );
                        //init_conn_key( pReq->m_fd );
                        if (!s_keep_listener)
                        {
                            close( pReq->m_fdListen );
                            pReq->m_fdListen = -1;
                        }
                        if ( s_accept_notify )
                            if ( notify_req_received( pReq->m_fd ) == -1 )
                                return -1;
                    }
                    else
                    {
                        if (( errno == EINTR )||( errno == EAGAIN))
                            continue;
                        lsapi_perror( "lsapi_accept() error", errno );
                        return -1;
                    }
                }
                else
                    break;
            }
        }

        if ( !readReq( pReq ) )
        {
            if ( s_worker_status )
            {
                s_worker_status->m_iKillSent = 0;
                s_worker_status->m_inProcess = 1;
                ++s_worker_status->m_iReqCounter;
                s_worker_status->m_tmReqBegin =
                s_worker_status->m_tmLastCheckPoint = time(NULL);
            }
            ++s_req_processed;
            return 0;
        }
        lsapi_close_connection(pReq);
        LSAPI_Reset_r( pReq );
    }
    return -1;

}


void LSAPI_Set_Max_Reqs( intgems/gems/rake-13.0.6/doc/glossary.rdoc000064400000003364150403134150013362 0ustar00ver->m_iMaxIdleChildren = maxIdleChld;
}


void LSAPI_Set_Server_Max_Idle_Secs( int serverMaxIdle )
{
    if ( g_prefork_server )
        g_prefork_server->m_iServerMaxIdle = serverMaxIdle;
}


void LSAPI_Set_Slow_Req_Msecs( int msecs )
{
    s_slow_req_msecs = msecs;
}


int  LSAPI_Get_Slow_Req_Msecs(void)
{
    return s_slow_req_msecs;
}


void LSAPI_No_Check_ppid(void)
{
    s_ppid = 0;
}


int LSAPI_Get_ppid(void)
{
    return(s_ppid);
}


#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
#include <crt_externs.h>
#else
extern char ** environ;
#endif
static void unset_lsapi_envs(void)
{
    char **env;
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
    env = *_NSGetEnviron();
#else
    env = environ;
#endif
    while( env != NULL && *env != NULL )
    {
        if (!strncmp(*env, "LSAPI_", 6) || !strncmp( *env, "PHP_LSAPI_", 10 )
            || (!strncmp( *env, "PHPRC=", 6 )&&(!s_uid)))
        {
            char ** del = env;
            do
                *del = del[1];
            while( *del++ );
        }
        else
            ++env;
    }
}


static int lsapi_initSuEXEC(void)
{
    int i;
    struct passwd * pw;
    s_defaultUid = 0;
    s_defaultGid = 0;
    if ( s_uid == 0 )
    {
        const char * p = getenv( "LSAPI_DEFAULT_UID" );
        if ( p )
        {
            i = atoi( p );
            if ( i > 0 )
                s_defaultUid = i;
        }
        p = getenv( "LSAPI_DEFAULT_GID" );
        if ( p )
        {
            i = atoi( p );
            if ( i > 0 )
                s_defaultGid = i;
        }
        p = getenv( "LSAPI_SECRET" );
        if (( !p )||( readSecret(p) == -1 ))
                return -1;
        if ( g_prefork_server )
        {
            if ( g_preforkgems/gems/rake-13.0.6/doc/jamis.rb000064400000026165150403134150012302 0ustar00gems/gems/rake-13.0.6/doc/command_line_usage.rdoc000064400000013506150403134150015327 0ustar00c/", 5) == 0)
    {
        errno = EPERM;
        return -1;
    }
    return 0;
}


static int lsapi_reopen_stderr2(const char *full_path)
{
    int newfd = open(full_path, O_WRONLY | O_CREAT | O_APPEND, 0644);
    if (newfd == -1)
    {
        LSAPI_perror_r(NULL, "Failed to open custom stderr log", full_path);
        return -1;
    }
    if (newfd != 2)
    {
        dup2(newfd, 2);
        close(newfd);
        dup2(2, 1);
    }
    if (s_stderr_log_path && full_path != s_stderr_log_path)
    {
        free(s_stderr_log_path);
        s_stderr_log_path = NULL;
    }
    s_stderr_log_path = strdup(full_path);
    return 0;
}


static int lsapi_reopen_stderr(const char *p)
{
    char full_path[PATH_MAX];
    if (s_uid == 0)
        return -1;
    if (lsapi_check_path(p, full_path, PATH_MAX) == -1)
    {
        LSAPI_perror_r(NULL, "Invalid custom stderr log path", p);
        return -1;
    }
    return lsapi_reopen_stderr2(full_path);
}


int LSAPI_Init_Env_Parameters( fn_select_t fp )
{
    const char *p;
    char ch;
    int n;
    int avoidFork = 0;

    p = getenv("LSAPI_STDERR_LOG");
    if (p)
    {
        lsapi_reopen_stderr(p);
    }
    if (!s_stderr_log_path)
        s_stderr_is_pipe = isPipe(STDERR_FILENO);

    p = getenv( "PHP_LSAPI_MAX_REQUESTS" );
    if ( !p )
        p = getenv( "LSAPI_MAX_REQS" );
    if ( p )
    {
        n = atoi( p );
        if ( n > 0 )
            LSAPI_Set_Max_Reqs( n );
    }

    p = getenv( "LSAPI_KEEP_LISTEN" );
    if ( p )
    {
        n = atoi( p );
        s_keep_listener = n;
    }

    p = getenv( "LSAPI_AVOID_FORK" );
    if ( p )
    {
        avoidFork = atoi( p );
        if (avoidFork)
        {
            s_keep_listener = 2;
            ch = *(p + strlen(p) - 1);
            if (  ch == 'G' || ch == 'g' )
                avoidFork *= 1024 * 1024 * 1024;
            else if (  ch == 'M' || ch == 'm' )
                avoidFork *= 1024 * 1024;
            if (avoidFork >= 1024 * 10240)
                s_min_avail_pages = avoidFork / 4096;
        }
    }

    p = getenv( "LSAPI_ACCEPT_NOTIFY" );
    if ( p )
    {
        s_accept_notify = atoi( p );
    }

    p = getenv( "LSAPI_SLOW_REQ_MSECS" );
    if ( p )
    {
        n = atoi( p );
        LSAPI_Set_Slow_Req_Msecs( n );
    }

#if defined( RLIMIT_CORE )
    p = getenv( "LSAPI_ALLOW_CORE_DUMP" );
    if ( !p )
    {
        struct rlimit limit = { 0, 0 };
        setrlimit( RLIMIT_CORE, &limit );
    }
    else
        s_enable_core_dump = 1;

#endif

    p = getenv( "LSAPI_MAX_IDLE" );
    if ( p )
    {
        n = atoi( p );
        LSAPI_Set_Max_Idle( n );
    }

    if ( LSAPI_Is_Listen() )
    {
        n = 0;
        p = getenv( "PHP_LSAPI_CHILDREN" );
        if ( !p )
            p = getenv( "LSAPI_CHILDREN" );
        if ( p )
            n = atoi( p );
        if ( n > 1 )
        {
            LSAPI_Init_Prefork_Server( n, fp, avoidFork != 0 );
            LSAPI_Set_Server_fd( g_req.m_fdListen );
        }

        p = getenv( "LSAPI_EXTRA_CHILDREN" );
        if ( p )
            LSAPI_Set_Extra_Children( atoi( p ) );

        p = getenv( "LSAPI_MAX_IDLE_CHILDREN" );
        if ( p )
            LSAPI_Set_Max_Idle_Children( atoi( p ) );

        p = getenv( "LSAPI_PGRP_MAX_IDLE" );
        if ( p )
        {
            LSAPI_Set_Server_Max_Idle_Secs( atoi( p ) );
        }

        p = getenv( "LSAPI_MAX_PROCESS_TIME" );
        if ( p )
            LSAPI_Set_Max_Process_Time( atoi( p ) );

        if ( getenv( "LSAPI_PPID_NO_CHECK" ) )
        {
            LSAPI_No_Check_ppid();
        }

        p = getenv("LSAPI_MAX_BUSY_WORKER");
        if (p)
        {
            n = atoi(p);
            s_max_busy_workers = n;
            if (n >= 0)
                LSAPI_No_Check_ppid();
        }


        p = getenv( "LSAPI_DUMP_DEBUG_INFO" );
        if ( p )
            s_dump_debug_info = atoi( p );

        if ( lsapi_initSuEXEC() == -1 )
            return -1;
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
        lsapi_initLVE();
#endif
    }
    unset_lsapi_envs();
    return 0;
}


int LSAPI_ErrResponse_r( LSAPI_Request * pReq, int code, const char ** pRespHeaders,
                         const char * pBody, int bodyLen )
{
    LSAPI_SetRespStatus_r( pReq, code );
    if ( pRespHeaders )
    {
        while( *pRespHeaders )
        {
            LSAPI_AppendRespHeader_r( pReq, *pRespHeaders, strlen( *pRespHeaders ) );
            ++pRespHeaders;
        }
    }
    if ( pBody &&( bodyLen > 0 ))
    {
        LSAPI_Write_r( pReq, pBody, bodyLen );
    }
    LSAPI_Finish_r( pReq );
    return 0;
}


static void lsapi_MD5Transform(uint32 buf[4], uint32 const in[16]);

/*
 * Note: this code is harmless on little-endian machines.
 */
static void byteReverse(unsigned char *buf, unsigned longs)
{
    uint32 t;
    do {
        t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
            ((unsigned) buf[1] << 8 | buf[0]);
        *(uint32 *) buf = t;
        buf += 4;
    } while (--longs);
}


/*
 * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
 * initialization constants.
 */
void lsapi_MD5Init(struct lsapi_MD5Context *ctx)
{
    ctx->buf[0] = 0x67452301;
    ctx->buf[1] = 0xefcdab89;
    ctx->buf[2] = 0x98badcfe;
    ctx->buf[3] = 0x10325476;

    ctx->bits[0] = 0;
    ctx->bits[1] = 0;
}

/*
 * Update context to reflect the concatenation of another buffer full
 * of bytes.
 */
void lsapi_MD5Update(struct lsapi_MD5Context *ctx, unsigned char const *buf, unsigned len)
{
    register uint32 t;

    /* Update bitcount */

    t = ctx->bits[0];
    if ((ctx->bits[0] = t + ((uint32) len << 3)) < t)
        ctx->bits[1]++;                /* Carry from low to high */
    ctx->bits[1] += len >> 29;

    t = (t >> 3) & 0x3f;        /* Bytes already in shsInfo->data */

    /* Handle any leading odd-sized chunks */

    if (t) {
        unsigned char gems/gems/rake-13.0.6/doc/glossary.rdoc000064400000003364150403134150013362 0ustar00 0* (64-bit count of bits processed, MSB-first)
 */
void lsapi_MD5Final(unsigned char digest[16], struct lsapi_MD5Context *ctx)
{
    unsigned int count;
    unsigned char *p;

    /* Compute number of bytes mod 64 */
    count = (ctx->bits[0] >> 3) & 0x3F;

    /* Set the first char of padding to 0x80.  This is safe since there is
       always at least one byte free */
    p = ctx->in + count;
    *p++ = 0x80;

    /* Bytes of padding needed to make 64 bytes */
    count = 64 - 1 - count;

    /* Pad out to 56 mod 64 */
    if (count < 8) {
        /* Two lots of padding:  Pad the first block to 64 bytes */
        memset(p, 0, count);
        byteReverse(ctx->in, 16);
        lsapi_MD5Transform(ctx->buf, (uint32 *) ctx->in);

        /* Now fill the next block with 56 bytes */
        memset(ctx->in, 0, 56);
    } else {
        /* Pad block to 56 bytes */
        memset(p, 0, count - 8);
    }
    byteReverse(ctx->in, 14);

    /* Append length in bits and transform */
    ((uint32 *) ctx->in)[14] = ctx->bits[0];
    ((uint32 *) ctx->in)[15] = ctx->bits[1];

    lsapi_MD5Transform(ctx->buf, (uint32 *) ctx->in);
    byteReverse((unsigned char *) ctx->buf, 4);
    memmove(digest, ctx->buf, 16);
    memset(ctx, 0, sizeof(*ctx));        /* In case it's sensitive */
}


/* The four core functions - F1 is optimized somewhat */

/* #define F1(x, y, z) (x & y | ~x & z) */
#define F1(x, y, z) (z ^ (x & (y ^ z)))
#define F2(x, y, z) F1(z, x, y)
#define F3(x, y, z) (x ^ y ^ z)
#define F4(x, y, z) (y ^ (x | ~z))

/* This is the central step in the MD5 algorithm. */
#define MD5STEP(f, w, x, y, z, data, s) \
        ( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )

/*
 * The core of the MD5 algorithm, this alters an existing MD5 hash to
 * reflect thgems/gems/rake-13.0.6/doc/jamis.rb000064400000026165150403134150012302 0ustar001, d, a, b, c, in[9] + 0x8b44f7af, 12);
    MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
    MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
    MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
    MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
    MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
    MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);

    MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
    MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
    MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
    MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
    MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
    MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
    MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
    MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
    MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
    MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
    MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
    MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
    MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
    MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
    MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
    MD5STEP(F2, b, cgems/gems/ruby-lsapi-5.6/ext/lsapi/lsapilib.h000064400000027775150403134160014726 0ustar00gems/gems/rake-13.0.6/doc/example/b.c000064400000000101150403134150012650 0ustar00 b, c, in[15] + 0xfe2ce6e0, 10);
    MD5STEP(F4, c, d, a, b, in[6gems/gems/rake-13.0.6/doc/example/Rakefile1000064400000001236150403134150014023 0ustar00ustar00/*
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.gems/gems/rake-13.0.6/doc/example/main.c000064400000000147150403134150013365 0ustar00D TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTgems/gems/rake-13.0.6/doc/example/Rakefile2000064400000001127150403134150014023 0ustar00BufEnd;
    char            * m_pRespBufPos;

    char            * m_pRespHeaderBuf;
    char            * m_pRespHeaderBufEnd;
    char            * m_pRespHeaderBufPos;
    struct lsapi_child_status * child_status;


    struct iovec    * m_pIovec;
    struct iovec    * m_pIovecEnd;
    struct iovec    * m_pIovecCur;
    struct iovec    * m_pIovecToWrite;

    struct lsapi_packet_header      * m_respPktHeaderEnd;

    struct lsapi_req_header         * m_pHeader;
    struct LSAPI_key_value_pair     * m_pEnvList;
    struct LSAPI_key_value_pair     * m_pSpecialEnvList;
    int               gems/gems/rake-13.0.6/doc/example/a.c000064400000000101150403134150012647 0ustar00(*LSAPI_CB_EnvHandler )( const char * pKey, int keyLen,
         gems/gems/rake-13.0.6/doc/proto_rake.rdoc000064400000004716150403134150013666 0ustar00I_Request * pReq, char * pBuf, size_t len );

int LSAPI_ReqBodyGetChar_r( LSAPI_Request * pReq );

int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen, int *getLF );


int LSAPI_FinalizeRespHeaders_r( LSAPI_Request * pReq );

ssize_t LSAPI_Write_r( LSAPI_Request * pReq, const char * pBuf, size_t len );

ssize_t LSAPI_sendfile_r( LSAPI_Request * pReq, int fdIn, off_t* off, size_t size );

ssize_t LSAPI_Write_Stderr_r( LSAPI_Request * pReq, const char * pBuf, size_t len );

int LSAPI_Flush_r( LSAPI_Request * pReq );

int LSAPI_AppendRespHeader_r( LSAPI_Request * pReq, const char * pBuf, int len );

int LSAPI_AppendRespHeader2_r( LSAPI_Request * pReq, const char * pHeaderName,
                              const char * pHeaderValue );

int LSAPI_ErrResponse_r( LSAPI_Request * pReq, int code, const char ** pRespHeaders,
                         const char * pBody, int bodyLen );

static inline int LSAPI_SetRespStatus_r( LSAPI_Request * pReq, int code )
{
    if ( !pReq )
        return -1;
    pReq->m_respHeader.m_respInfo.m_status = code;
    return 0;
}

static inline int LSAPI_SetAppData_r( LSAPI_Request * pReq, void * data )
{
    if ( !pReq )
        return -1;
    pReq->m_pAppData = data;
    return 0;
}

static inline void * LSAPI_GetAppData_r( LSAPI_Request * pReq )
{
    if ( !pReq )
        return NULL;
    return pReq->m_pAppData;
}

static inline char * LSAPI_GetQueryString_r( LSAPI_Request * pReq )
{
    if ( pReq )
        return pReq->m_pQueryString;
    return NULL;
}


static inline char * LSAPI_GetScriptFileName_r( LSAPI_Request * pReq )
{
    if ( pReq )
        return pReq->m_pScriptFile;
    return NULL;
}


static inline char * LSAPI_GetScriptName_r( LSAPI_Request * pReq )
{
    if ( pReq )
        return pReq->m_pScriptName;
    return NULL;
}


static inline char * LSAPI_GetRequestMethod_r( LSAPI_Request * pReq)
{
    if ( pReq )
        return pReq->m_pRequestMethod;
    return NULL;
}



static inline off_t LSAPI_GetReqBodyLen_r( LSAPI_Request * pReq )
{
    if ( pReq )
        return pReq->m_reqBodyLen;
    return -1;
}

static inline off_t LSAPI_GetReqBodyRemain_r( LSAPI_Request * pReq )
{
    if ( pReq )
        return pReq->m_reqBodyLen - pReq->m_reqBodyRead;
    return -1;
}


int LSAPI_End_Response_r(LSAPI_Request * pReq);



int LSAPI_Is_Listen(void);

static inline int LSAPI_Accept( void )
{   return LSAPI_Accept_r( &g_req );                        }

static inline int LSAPI_Finish(void)
{   return LSAPI_Finish_gems/gems/rake-13.0.6/doc/rational.rdoc000064400000014110150403134150013317 0ustar00gems/gems/rake-13.0.6/doc/example/b.c000064400000000101150403134150012650 0ustar00tatic inline char * LSAPI_GetScriptName(void)
{    return LSAPI_Ggems/gems/rake-13.0.6/doc/example/Rakefile1000064400000001236150403134150014023 0ustar00Write_r( &g_req, pBuf, len );              }

static inline ssize_t LSAPI_sendfile( int fdIn, off_t* off, size_t size )
{
    return LSAPI_sendfile_r(&g_req, fdIn, off, size );
}

static inline ssize_t LSAPI_Write_Stderr( const char * pBuf, ssize_t len )
{   return LSAPI_Write_Stderr_r( &g_req, pBuf, len );       }

static inline int LSAPI_Flush(void)
{   return LSAPI_Flush_r( &g_req );                         }

static inline int LSAPI_AppendRespHeader( char * pBuf, int len )
{   return LSAPI_AppendRespHeader_r( &g_req, pBuf, len );   }

static inline int LSAPI_SetRespStatus( int code )
{   return LSAPI_SetRespStatus_r( &g_req, code );           }

static inlingems/gems/rake-13.0.6/doc/example/main.c000064400000000147150403134150013365 0ustar00et_Server_Max_Idle_Secs( int serverMaxIdle );

void LSAPI_Set_Max_Process_Time( int secs );

int LSAPI_gems/gems/rake-13.0.6/doc/example/Rakefile2000064400000001127150403134150014023 0ustar00OG_TIMESTAMP_HMS  (0x200)
#define LSAPgems/gems/ruby-lsapi-5.6/examples/testlsapi.rb000075500000000413150403134160015200 0ustar00gems/gems/rake-13.0.6/doc/example/a.c000064400000000101150403134150012647 0ustar00ustar00gems/gems/rake-13.0.6/doc/proto_rake.rdocgems/gems/rake-13.0.6/doc/rakefile.rdoc000064400000050342150403134150013277 0ustar00ustar00gems/gems/ruby-lsapi-5.6/lsapi.gemspec000064400000001611150403134160013500 0ustar00Gem::Specification.new do |s|
  s.name = %q{ruby-lsapi}
  s.version = "5.6"
  s.date = %q{2024-01-22}
  s.description = "This is a ruby extension for fast communication with LiteSpeed Web Server."
  s.summary = %q{A ruby extension for fast communication with LiteSpeed Web Server.}
  s.has_rdoc = false
  s.authors = ["LiteSpeed Technologies Inc."]
  s.email = "info@litespeedtech.com"
  s.homepage = "http://www.litespeedtech.com/"
  s.rubyforge_project = "ruby-lsapi"
  s.files = ["lsapi.gemspec", "README", "examples", "examples/testlsapi.rb", "examples/lsapi_with_cgi.rb", "ext", "ext/lsapi", "ext/lsapi/extconf.rb", "ext/lsapi/lsapidef.h", "ext/lsapi/lsapilib.c", "ext/lsapi/lsapilib.h", "ext/lsapi/lsruby.c", "rails", "rails/dispatch.lsapi", "scripts", "scripts/lsruby_runner.rb", "setup.rb"]
  s.extra_rdoc_files = ["README"]
  s.extensions << "ext/lsapi/extconf.rb"
  s.require_paths << "lib"
end
gems/gems/ruby-lsapi-5.6/README00006440000001266115040313416001gems/gems/rake-13.0.6/doc/rational.rdoc000064400000014110150403134150013317 0ustar00^^^^^^^^^^^^
The most efficient way to use LSAPI interface is to modify your CGI scripts. 
You need to add the following code to your CGI scripts:

  require 'lsapi'
  
  while LSAPI.accept != nil

     <your CGI script>
     ...

  end

There is no need to change the way that how CGI environment variables 
are being accessed in your scripts.

You can find some examples under examples/ folder.


Ruby Script Runner
^^^^^^^^^^^^^^^^^^
If you don't want to change your existing Ruby CGI code, you can use our 
Ruby script runner under scripts/ folder. You need to configure 
lsruby_runner.rb as a LSAPI application, then add a script handler 
for "rb" suffix.



Rails dispatcher
^^^^^^^^^^^^^^^^

With Ruby LSAPI, we proudly provide a optimum platform for Rails application
deployment. Ruby LSAPI has the following advantages over other solutions.

  * Easy configuration, deploy a Rails application only take a few clicks
    with our Rails easy configuration
  * Fast startup, the expensive Rails framework initialization only takes
    place once when multiple processes need to be started
  * Resource efficience, ruby processes can be started on demand, idle
    process will be stop.
    
To use LSAPI with Ruby on Rails, please check out our toturial
http://www.litespeedtech.com/support/wiki/doku.php

There are a few environment variables that can be tweaked to tune ruby 
LSAPI process.

* LSAPI_CHILDREN                (default: 0)

LSAPI_CHILDREN controls the maximum number of children processes can be
started by the first ruby process started by web server. When set to <=1,
the first ruby process will handle request by itself, without starting any
child process. When LSAPI_CHILDREN is >1, the LSAPI application is stared in
"Self Managed Mode", which will start children processes based on demand.
With Rails easy configuration, LSAPI_CHILDREN is set to the value of
"Max Connections" by web server, no need to set it explicitly.

Usually, there is no need to set value of LSAPI_CHILDREN over 100 in most
server environment.


* LSAPI_AVOID_FORK              (default: 0)

LSAPI_AVOID_FORK specifies the policy of the internal process manager in
"Self Managed Mode". When set to 0, the internal process manager will stop
and start children process on demand to save system resource. This is
preferred in a shared hosting environment. When set to 1, the internal
process manager will try to avoid freqently stopping and starting children
process. This might be preferred in a dedicate hosting environment.


* LSAPI_EXTRA_CHILDREN          (default: 1/3 of LSAPI_CHILDREN or 0)

LSAPI_EXTRA_CHILDREN controls the maximum number of extra children processes
can be started when some or all existing children processes are in
malfunctioning state. Total number of children processes will be reduced to
LSAPI_CHILDREN level as soon as service is back to normal.
When LSAPI_AVOID_FORK is set to 0, the default value is 1/3 of
LSAPI_CHIDLREN, When LSAPI_AVOID_FORK is set to 1, the default value is 0.


* LSAPI_MAX_REQS                (default value: 10000)

LSAPI_MAX_REQS specifies the maximum number of requests each child
process will handle before it exits automatically. This parameter can
help reducing memory usage when there are memory leaks in the application. 


* LSAPI_MAX_IDLEgems/gems/erb-4.0.2/libexec/erb000075500000010754150403134160011756 0ustar00ID_FORK is set to 1, the default value
is LSAPI_CHILDREN.


* LSAPI_MAX_PROCESS_TIME        (default value: 300 seconds)

In Self Managed Mode, LSAPI_MAX_PROCESS_TIME controls the maximum 
processing time allowed when processing a request. If a child process
can not finish processing of a request in the given time period, it 
will be killed by the parent process. This option can help getting rid 
of dead or runaway child process.


* LSAPI_PGRP_MAX_IDLE           (default value: FOREVER )

In Self Managed Mode, LSAPI_PGRP_MAX_IDLE controls how long the parent
process will wait before exiting when there is no child process.
This option help releasing system resources taken by an idle parent 
process.


* LSAPI_PPID_NO_CHECK

By default a LSAPI application check the existence of its parent process
and exits automatically if the parent process died. This is to reduce 
orphan process when web server is restarted. However, it is desireable 
to disable this feature, such as when a LSAPI process was started 
manually from command line. LSAPI_PPID_NO_CHECK should be set when 
you want to disable the checking of existence of parent process.


License
-------

LSAPI library code is under BSD license

LSAPI ruby extension code is under Ruby license

* ((<URL:http://www.ruby-lang.org/ja/LICENSE.txt>)) (Japanese)
* ((<URL:http://www.ruby-lang.org/en/LICENSE.txt>)) (English)


Copyright
---------

Copyright (C) 2006 Lite Speed Technologies Inc.


gems/gems/erb-4.0.2/libexec/erb000075500000010754150403134160011756 0ustar00#!/opt/alt/ruby32/bin/ruby
# Tiny eRuby --- ERB2
# Copyright (c) 1999-2000,2002 Masatoshi SEKI
# You can redistribute it and/or modify it under the same terms as Ruby.

require 'erb'

class ERB
  module Main
    def ARGV.switch
      return nil if self.empty?
      arg = sgems/gems/rake-13.0.6/doc/rakefile.rdoc000064400000050342150403134150013277 0ustar00
      trim_mode = 0
      disable_percent = false
      variables = {}
      begin
        while switch = ARGV.switch
          case switch
          when '-x'                        # ruby source
            output = true
          when '-n'                        # line number
            number = true
          when '-v'                        # verbose
            $VERBOSE = true
          when '--version'                 # version
            STDERR.puts factory.version
            exit
          when '-d', '--debug'             # debug
            $DEBUG = true
          when '-r'                        # require
            require ARGV.req_arg
          when '-T'                        # trim mode
            arg = ARGV.req_arg
            if arg == '-'
              trim_mode = arg
              next
            end
            raise "invalid trim mode #{arg.dump}" unless arg =~ /\A[0-2]\z/
            trim_mode = arg.to_i
          when '-E', '--encoding'
            arg = ARGV.req_arg
            set_encoding(*arg.split(/:/, 2))
          when '-U'
            set_encoding(Encoding::UTF_8, Encoding::UTF_8)
          when '-P'
            disable_percent = true
          when '--help'
            raise "print this help"
          when /\A-/
            raise "unknown switch #{switch.gems/gems/io-console-0.6.0/lib/io/console/size.rb000064400000000657150403134160015263 0ustar00
  -E ex[:in]       set default external/internal encodings
  -U               set default encoding to UTF-8
  -T trim_mode     specify trim_mode (0..2, -)
  -P               disable ruby code evaluation for lines beginning with %
  var=value        set variable
EOU
        exit 1
      end

      $<.set_encoding(Encoding::UTF_8, nil)
      src = $<.read
      filename = $FILENAME
      exit 2 unless src
      trim = trim_mode_gems/cache/rackup-2.1.0.gem000064400000037000150403134160011152 0ustar00ction :run

    def set_encoding(extern, intern = nil)
      verbose, $VERBOSE = $VERBOSE, nil
      Encoding.default_external = extern unless extern.nil? || extern == ""
      Encoding.default_internal = intern unless intern.nil? || intern == ""
      [$stdin, $stdout, $stderr].each do |io|
        io.set_encoding(extern, intern)
      end
    ensure
      $VERBOSE = verbose
    end
    module_function :set_encoding
    class << self; private :set_encoding; end
  end
end

ERB::Main.run
gems/gems/io-console-0.6.0/lib/io/console/size.rb000064400000000657150403134160015263 0ustar00# frozen_string_literal: false
# fallback to console window size
def IO.default_console_size
  [
    ENV["LINES"].to_i.nonzero? || 25,
    ENV["COLUMNS"].to_i.nonzero? || 80,
  ]
end

begin
  require 'io/console'
rescue LoadError
  class << IO
    alias console_size default_console_size
  end
else
  # returns console window size
  def IO.console_size
    console.winsize
  rescue NoMethodError
    default_console_size
  end
end
gems/cache/rackup-2.1.0.gem000064400000037000150403134160011152 0ustar00metadata.gz0000444000000000000000000000127114364637605013455 0ustar00wheelwheel00000000000000��?�c�W]o�0}��0{�S>�
�,1		�@�eC �Pt��&f�cl��B�۹��ڮe�+K+%���>>>��(���拤�?a��B�Y,�Ldc���;(�[���<�bG��C�2iO�Ya�8M�Pm�����'���=!�С^��s0��l~n�C�riJ��;+Ѕ��AR>�1��ӣ(�D�G<ME�����߳-�M!��|{ϖ�j��,4��k觫bJ�H��:$��ɓ�>�����K�	K|�kM�	���R��(�+�
{!|C}�`��_�����O����(�P�5�B�w'�k"�8G�ر�����e��Ȁ>����*�G�S�RM*�Z�B�d�{�ߍ�#o�4�^�+��s����K􅓶�.����m�\
;�qo�MW��J
d�l�l&����mC��^ĕ� ��_gc����*�ګ���+<)*�Ӳq�UN�Fv���R�C�[�(�/H&�u�I�P��ٓ�N�EՍF9��z�$�u��E�QF���zM_�|�4��<�����4>�R�F�Y?%M?�ä���,��o��/�2��]snٴ�Un����[;���g�D���=���|;Ŷ��	�2�T�9.���U�1����?�t���'N��ɑ��{��&���jl�Ǭ[3�^��t��~data.tar.gz0000444000000000000000000002611414364637605013376 0ustar00wheelwheel00000000000000��?�c�}�v7�`�.��2!�Pԇ�/�6%�mIԐ�G��M;jv���9�߾��9�o�>��}��$[U������q�L�4K�(��P�*T�lwͷ���⛯�������o��O���ƃ�o6��?�zx���u�۸�7l��?�'
B�T.g�;��T��?��ʽ�(��F��{��h�,����}��0}�=:v�}�i�Џx����l�}�X�}�Y��Xs�\G�R�~7�}�_p��K���#��y[�Y�ā��G_��nm����o=z�y��_��+��n|�"w�}�8;�؁=�n���-��}6�ls}ss��_g�%�[�;��8�5�ҥ廬����������V��K��c���P�DB��ҧ�GH��+��7�N�K�Mu�͚�Ts%�NJw���a��F��O�Ç[w�����ܒ���/Vp��e/:�Ww�o���*����R����Gw����,��w�B�݅P؞[����K>���y�f��])���g��������������9Z�[a�KM<���=���w2������7�j���v�N4�S
�����l�#v_u�Z1TD��,��sf���I�l��(������b�ȭΗ�bQ{�� k~��y�D�尙̠��8[X�+��r4�����=�6���>�|[�f%m�e����La��>_���ș�,1���z�Pl�@�
���)��L��"h��#H�@���aC�y�O+@2&��]I���7,��bb���\��i�jkr�vH���x���m�wK(��	���3V�u�M-'�
GT��8<����7�sU�O��*
��:9%J�nlv�wc�ӝ|���_��@��8��Jھ�qk+�s�z>oh��GW��4F0k���:��7ɞ�E*	/�#$� Y⛴P��$I�l�/0�&�D�Ϛ�D�m��
�Uc1@���f��:�;h�`���C�=N�$o*��~������}��]]Ds'�I
�֘���TcᓰҚ�ܐ5�6w�Aނ��~2�²k$Ef��g��� ��ǖ�[ˏ̋��,e�J;	�1&�G�h׋��Pl�d�5d=ƞ��ѓ
�Rg�2�� ���2�ٔ��\��RU�7$�Ԭ�4�`d�[��x��K�l̵��eM��UK����~Жc�:Ͳk°����H��l�"g�Vp��D��>�d+��1���n�v�(��Ê�0�hd�>@��ѻs)'G�s���mK�:���
&&rP�A�ǐ�D
*�+l�[n��j3&Y�X1���)��M�smPp��v8�B]6�.�G6�jRN��9E!~��3m�煂�n��;'�\��@3Ō/=~�U��W�_�X~R2Y����^�)�vGz9���'v�O&�O1�����V���.��`F�7,������Y��k;i��t��Z�}f_��/ Vyc�]�c�R�Uƒ^���
����R��M���6�/�s�m
AD�V+%���e�?�y_��o��z�{�����_��˱y�R@�M�c҆��\�.*`��mVg�/L� �ѿ
‰�6F���0��ݠ�f	�i;����P���������`p<��
�G��A���`�\�!O�����+4E�eک�%P�fVmD�	l�UM�=�st�v�ހ㮧�ڽ^��7���g������a[����<u���F��!��yur��ƞ��,A�5�_Ɏ^3I�׷�އa���BK	�`����[�}	��6���qF���h	��@#�
mԮ���PVM7����
� ������ރI��*.<�z�Y�ʮW�u��VM�f.l/
`O�Q�i������nBPY]hͰg���E�E�E����2T��p:L�ӕ��W��E�7ƮJٿR��*�p�D1W�[��	F�+��ꈛ=ciN��s�vF��O<��C֥��gWr�i�~:�����}��S����w���?K`����K־-�%G����U4(:��J�����^�9�b�[��o�^�)�S�4��Q�b�B��A��8�/~�^���{�lE&�pq�U��2�CUo� ���<μ �zz3�mu`3�8�[�
ݵ�d��m��ꤹc���d[^@}��P�T��5��{�BU�^
[����?��=?z����:�1H��v� MG)���H���%'�AI��S�7\~Y�̕�Ԙ���S/<3�k:)cK�;��OT,`>·t�<Ӽ��,�:/,Ǟ%v����ޠ�U�~�f�������ʨ{�#Ԅsp�u�粪���ZYWg˸.���=�>5�G�}u�"2�B<@�ڋ�i�67ih})!_ݨڮ�0���<����,� Z@c)^�Љ�������yc���P(ڕ�B����g϶���-���EH��$Đ�Z� ���%}��#��t�η%��—�H��x���h���'��Y䞛
-���ӪP3�O�������F��T����H"�ϸ)Ό��J��`��l%�u�=�{(i.&�`�h��i	�^H�6�n�.�5��=�V���N|��&6�o�yh
/,?�1���mҌ��.0���Jۜh�n�EIB��dH��0�71�AbP[�"0iP���fR�`P����օu���k��A�^d��j���҃�ãIz�G�ᷰ�Y��r
�*F��%z3�YG���Y83�"�C��ĭ�oY��2����OI+���"t�ݟҩ�ͧ/nw+�!�@����X�iGx.;81fZL�!dlo�X��ĂJT�(���yv�O-���"�k����ܮvn���m��숕JX	x�:��s�W�N����c+�
'"�T��f���qΗu����X���tZ䇸SR�
X� xi���w��())Ƃ/��6�zϫd�4*���b ف/=tZ�1_��)NE��T�9��D�
!X��eO�`�
j~l���0**��o�@�TC�����yk	�~�:�Yh�Y�W����Bo�9�tQB�ˢřVNM�A��BjwGO:��q�,�o�>P�YR���2�.�;��T3��$̽��*�(����7v�s�,WԖ�My��	XCV��
<2�p��E�)�"���&��>C�Zx�4}�v��E�B}��(5�@TT+�0
N�eWgIdŸ�}�{��9�����n�_���|�qw�����f�O��nq�'�2�}-dv%/��؂Ōq�`�{B��ŁX�Jʆ�/J�GY*�'ȵ��f��NؔA{���2���v�{�l�t�<�u��5^�og����/�����_�O��'�._���o��ww���G?��O��[�?����������𧋳����'?X�޿��_�޽�\���7�{[���G�\���~�<�\����
g��a���z�j�錬7����q��X<8�\�t��5��y���8���Ï�u��`���a{�q���o�n���e���vAYhD�(U-Ͽ/�N�O�^s@����Lj�`��^�%	R�xk�<u�E9��Nܘ1!��J�O���sl�a�o�����Y��}�xƄ��$�3LV0t����
�֦�d�aX�!��Q�4�C�?�
�cۋ�{O���r=����Ӆ�%
Pܞ��Wy�a�]Y����*�'�zVVf����^0���T]�`,�/�;?0��OH;�ˑuO6�����߃�d�CXrk�p���g�e�Wuէ��*	mK�R Þ<�A_+�050>_�'b�3��Ӱ����ԅh�h��_F�VM�G���p�A��R�+_�b�-�jP��_�ˮ��D�`�Г׭l��6���Cȱo���"�����J��?�*����ͽ���:�oc�|�O,�y�h�	��_zv
�A��*��gems/gems/rake-13.0.6/README.rdoc000064400000011535150403134150011706 0ustar00]���m� 7w�]����'��ZoۧX�׵=�K`� ��J�u��$A�&�*�`��e`�}�~�V5���
B��'��p	��e�\4^����[��ttJ���6X���\g�{S)>"���%�<?^)�ru/0^�������^����j�ar��N�+Co�ܞ�<-z���v|�%~1a�K3<s��M<�ä����u��dV�FE��m!������A���ؒk���m2�SQCHKv�'�
���j
B��;{�6��@���-�]�&K��{lǾ!%r�=��3���~�u�F�����k-�_Ɣc�.�mN��B��8ܸ��y��#�#��k1����Z�����Bl;�=~�`��0o��)(�D����;ey�n�P�4���\�KR찻GxK��eu���\Z����yp2Z�/�'��	x=���v��	�n��_��U�K�,��]�1�)��W�k��`E"�J~p=}n�Nw��v�C�v��3b��r?��x(�������Bڋ��[i?bpo���t��o\

�Ui�Ƙ��|�����Y�Y�[�vz^�����J�Ն0q����׬t0�L@�yC�Y+�F��h�i���񢒆,��V
��)�'y�ȩ��<.�����̟�$�q�V��i)�� ��oѧuF��O���t 0
u.��b�:Sv`,�웉pUHe<h�fre���
�ɉ%Qɤx0�ܓp�DM����Kn���ߪ��~Aղv�7k�]o̭p<{^�ե[a6�{P�T	H��C���:��ZW �Lg�"I@7Ӧ�2c�]����
��Lob�m�N�")�Ĕ�2�E�L77���a��X�_�NUS�M�"�y/����[��z~9��UW>gLq퀖c媆;�ܟ�ͥZȬ�rq�>:"0S���*����}�(e��<ª5D`��
{I��z�+[����ƄN!����(�G[�K�)���ʚ��
?���V��E��=Dd�X���
E?�����R$��[es��T��7k��b�Us��UE2[�eɸ�Β9V�1���DM匯�\�����U��=u7�
E+ӭ�g*@�"V7rE߮���Pr�؏\����
잎�.=ߙTN��48�u�?%�J�'Kj�/#B?&�u�r�6��Z"C�1�$�̄b�	�ҕ%s��B��x�Za��C賦bV��<�ex%�^���諑�K^�?JX�H��}�ɝ�V�:�%-�7F�2��������S�N�4"��`��4h"��1�T�e4l4�Pk����'��+s{����t��X�>���Iq�
��F��3�H[�jS_�lU�jQ�Bx@n�:3}�u"3�;3-,o�m �z.�.��з�qjp 撒�$�6�y0u�H�K5a��A!ŵ{E�����M��R8�M�A�:k0�$=��V�hl�j����X8[�u�i�bp�:�UA
���
a����q�lI�ٶp�"ȴ?�����v���v�֖Z��_o14�i�ZS���@���:Sk�K�@�y��F���*����p�搓gO[���+ix!���}
��c@V�֪�*
<d/6�Af��k�\:�t��
G�C!^ѩJ�P^�ڨ��T���oW/���m�D�d"��ݓ���<��*��q�m��6Z��-�?�z�">���.����Jlu��!�g�BBs]���k�xv1��v� GI���ְvP�����5yQ-i|�F-���4�Ed�������&
�={�Pʹ��i�Z�����j��:�`���Zd;�H
2���X?��S�J1�ȋt*��Pѵ~I�TpU��j�e}4Ѥ{���Ο�ԛի*,j�c��0�~8Wɽ��\$<�5��3�Nu_���?�]oλ���Z��	]�O�$QI�;��Mɤ,��MX��k�5Y9��=�C��B/-P<�κ���� ������@�OkeM��hq�"��T�u�
����1q���uuk{
��آV����&Ҧ�s���r�ᄚi�X���M׷մ$hG�aZ���Kk�0�^����_����N�Ş��ͭL��xcdɘ9�P�S�Q��c=[} en�O�A��X��+�a*��9�֞��$#ȟ���u�9̕���D�^J��*3�k�-�%a����%(�!�h+(�Q�8��Zc]���*��
f�4�~�*�d��3�Zr���+5��ܛ���H�t�-�be�H�E,2^�h�����^�-��|b�������^F�(��0�J�	C�rQ+1�V��2SLD܊R녶T����&Ƴ���C��c�a��U�N�z�7�^�1N۳D��DY CR7�y�AK:#R���`T.����@ >6�Uj�Z�,6��"u'��	��
PFnU����t~L���ra�J���O��N��U�D@�n?UYsb_���3���C�l�h����U�Q��ﮐg��ٌ��:���K7[��-�-s���L_�8anM�a���@���3��L��&�A�G�1�PO|��ў_�6� �5�d�K���5���j�i�a�,�y1�4�R��BB�r^���?��:W�)5n5�5	y�d�8�!+9d�����n���n5gؓ�H�� �3����͌r	ÑB��
�kݻ���y��I+��ԧQ�L/�lAJ�5�{���|AΣ��閠�֖��P����3gCt%���0�
���B]*%�iQ L#֌D^a{�� >*F�B��9�k��a\!�b�+��t�p�_a��ؼ4�y���=��m���8�ՋGnN(K�hdd����Z>Օ9=r)�a>t�
���
�kf�M�ؓ\�Nխ�a�&U�ŧ�ok"�	.�����JW��*cDr�z����q���}��d�GKЉ"4sfu�(L�w��^����C�Җ�����<Bm��j(��u��%w�䑂��AC�[�>��^I�W���̠��W��}�.��j�[�%~n��{�=��u�>���;��^[���Y�Z�*뻦Q\�n+�x�w>�|85QH�H�s�]h����ӓ�*Е�<{�n��B��$�����*�gA���X)H��S�$����>���6[/e&��[�#����f�@��jE)�`����S�ɭ~����g���pL�4Ć�ҽQn��t�����!��ʋ8_մ�D`��
���w�������������3��x�'�����Z�$��:�U
�6��٠�`P�e����[�S�c��0�B��ޣ�[z�Gh�� t@��>:�;�(�f�5�����V��Y}������O���Τ�q[��#۵�%���3����x8�AQ�G`��Fv8ԖT��UPr8��Q��/�^��L�������P.�m�Cy����K��2	jk�9_�U�槉Z����y�*��� *�+��R<�:m���0g��<G8��C��L!I?���?*��E��*���ԛ��3bd��'��a�`'������:9�b
&���8��"�H��_�6�Zd���%}�����gثU-2���S6���~������A�����2Ŧ��ɖ|�=S��:��
�k(ꋿe+�n�KF��g�Ё��%�7XX$��\� ��'u�Dܛ��1/������U��(ƥ���L\j�q1���ԛƺ�rŕ.g9�(s�`F4I��;�`�>y&�	�=�&-�
1�iFߠ�;Z�0�8�������(��z��XƑ�+kw_J�I
��9������˾ad�?�&�Hv!�vSIU���ż�*J~Zֿ�s��r�NE�$,zqV1Q�#�p#^N/�lW���>7.D�ko*��dY�tU���@Ԕ���d�bkI+Ri�T%�5�4��J\[����uqSK���FxSG���<L��5@�����L�-�h6w:G�އ��ww`�a�&�vbv��H
pA3�#��\%�(�ad��$ړ@���0�,����l�c
�93�[a5�
�?�z���9��sS
��	����"����h`r X�P���&z���1��O`ܩ�(E
�S.eЅ��T�ɁhU��M�)��`F����'�{��Ndb��j�VB#}/����u9%%�)�Jb]�NS���Q��u�6���B�[��Hk�.<[�{�x�`H	v��~��W�������9x����!zj�a\������%o�o%(�c�����,���}����M<s�kKy1u>�J������PJ�0�Y9��S�0t����k��eW���<�����w��D�p����BT���,�u����}/
Wϋµ��T�73l.�ݩO�{v�o\�`��R�^C|h\5��ii%�
a恧0�I�=),�NW٠��T�_e�ƶ/��qЊ��s�|]�iM���"n�}��'�3^'&�a��Яm�Ь��}&�N���nr1�A".�d-�Y4{��0��䵹�%����ƒs��w	�5�p$�D<�>YO�W9}/אD2N+E<�T)W�12M'�
q쒆+�qt(��K,�����5
ʫD�������H2S�Z�fH{�	I)}�g�6��"�#�64r�a��Ex3wbS��ͽ-s���9��7����뛛[��-(�;�����]���t�0��fc��^��8��y�O�^7��ͭ�)�����G��ͥ���돀�ן/pkƎxtn��w��`ء�W[������}�[�Ÿm�,t��)���@�ƺh��Y.۱B�]g�g������_q��ƣX;��"��^0�,v�y�>�&{c���l�� ����u r�#�>���z9`8�֚�
��y�`e{{�H���l���AW���"�Y~�v<?�T��7é�]��Z�~4gems/gems/rake-13.0.6/MIT-LICENSE000064400000002033150403134150011525 0ustar00�/g���JS��l��
��Q��%]�S��6�\�!h�Je������	�*P���dVeQ0��KU�!�8!K�O�%��-��_P�j�`g�۬�}9x��Y����u��{����s���w�ݷ�����d���M�h���?��>�J���N�u�v�b�o�����5w@w�F]�ʦ:�>6v�����ck�s�|��^vG���n���q�7��=h�����q�߆�٣��K�R��6�Wx���0�j�up�]�Zo���v��z�W����L�}���Z;m�j���9����a�U�ju��^	�v�~_a-�ow�f9?�ӃGLy��U�w��:k���+���=����P�K�@���hI͌|~�o�
��v���ce�n�|�<��]�&�����ol�}�����a\�8��L�'6(>��1�*l_$�ZUq���sD�ɽ��$7�-��J��n������P}M|�O�Ec��v�`m;��Ț��FpqV���E�n�\��=��˗VVXmD�!�`�?��o��Sn?�,�:�R���f�0a}�r�}�o�dF�҅yϜ��4�қ��J:��|\���c����X˅M��H�B�ߤ�yH>6i��@*^�+��]oNW�e��C!+�J�o��1�6�a��P�\Ĉ�@��X�#̀�P�*��͗�.�\�pk��}l����h�*T��(Y��ҚL@�e�
V߂��Q0Sچ����<%!��yL�q�Ԫ����(�O�Ǒ���_q�������6��� �ߗ+�{ ��`n��	N�k�7��2����:)��������������ZC
��gems/gems/rake-13.0.6/lib/rake.rb000064400000004162150403134150012113 0ustar00.�4цaB��Z��oN+9p-^�����r.qT�m2K�uB���YN3�5�G�S?�`�R὎��[�I[@8���As��*u_~�
���gems/gems/rake-13.0.6/README.rdoc000064400000011535150403134150011706 0ustar00ustar00wheelwheelgems/gems/rake-13.0.6/lib/rake/promise.rb000064400000004437150403134150013576 0ustar00�[�6
CImI�GY{�6�j)�]U�}4ҳpwppW�����B�(���k��T���п*��#d���h3�8:D�-a'��hhVe"����+9�Q	OY�t��^���lJ.G��A�O�T��z�P��X�n�<�@��������n�o��H�|"�1]���0�5��r#y{��|*(;�a`�o*���\5~��+7N�E�0ᜭ�
ip	�гSZ�AΏ4�5{�ل30���荐�
qF
��Gr��ZBC+$�s��Ҵ�E����6�$�T�0#���GX�8�
���U:�L�
߿Sʭ�D�2|�S&���E�M�8�T�5t��=iG��F���:�j��]9�3Z{SB^jO#��8,�
֪kC̢v��.��l�����`a��,��=���kȾ�����ks�ar�̶AT �$�m
"6���~Y^)$<��Yd����(�^Jj�9�����8�cL��b�S�p�_�u:�(data.tar.gz0000444000000000000000000031257414442217575013403 0ustar00wheelwheel00000000000000�}�d��vٕ6��QT�-2��M��L�)���DIY�_�"@�$GHAU�V��?�{ܫ=�I�z�7�'���%��]]��U�L"��7��^���nO��+����t���#��������t�[�����[�{�{�~gko�A���yf���qM�i�������Qp4�Q4IG���d$i�&Q���H�b�,K��EpS�^�|%E4�D��I�^��2L�4	����4,��z��<��p0��8M���&Q�GA
�,J�Q��(��n����E1�67o�K�7����t3J6�ڝvgs��h<z|ܡ��?�`�����촶�6��mx�G�"��Y8��(�ig�8�A��n0o���ēnpN�Q��?>���=wQ�y�'�����l>�l��F3����h�Et&��
����Ңv���G�;n�O�{;�?��i<.���%�x��(Â�8y�-u8��Ωu�=��9:]�^���a2��o�~�}O�"�����w�����E������.g��`�ش��k���]�E43k�y��5�<�5���nP��|���[����mt>'I���9��t>)bZqq]�[�\�N�)m�Vo���`[E�b���־?�vkwwo���?���'I����Nk�3�E�R��ߝ:\���/�I�E�uoQD�?쥾۟�t{r�{���۠��䲸7'���I��,�9.o�+��������U7��Mx�<�{N��"�˜�}�eiF�~D��E؁PG��ϳ�ppBK�Mo,���D��&�R<� G!�`�^��:��N�[|�:�)AlWVL�<G����룳wW�ﮮ�~<?���*���{}���K��?lI�}^Ro��iQ�E>m`�ǟ�f�o#Bq��[Zp< D@��x *����s`�*M_�=��t�f�O�ԧ^������6=>|x�#�D��8}κ�<'gems/gems/rake-13.0.6/lib/rake/version.rb000064400000000320150403134150013570 0ustar006��j��}����ܛ�:�"> �^�]��m׍o�Qw����>qO�l�\�$���u넋��n�(���4a��	/�/~w|q}~qvuvtv���S�RׯIx��
����H�.��:L�ܾ�ƈ���;����/B=�6�dHO�}������&�p:�pN�3\�iס:�D.�I��dѾ���u��批��c�W概Y2gems/gems/rake-13.0.6/lib/rake/private_reader.rb000064400000000612150403134150015103 0ustar00gems/gems/rake-13.0.6/MIT-LICENSE000064400000002033150403134150011525 0ustar00gems/gems/rake-13.0.6/lib/rake/invocation_exception_mixin.rb000064400000000715150403134150017546 0ustar00n:?�ug�ۀ��ԙvpu��@��JR�p'}9���]���&k7�����Y���z��#�ֳ�iڨ݆ȏ�T�m�����S=���K��%��M�h`T�Zwj�Y�
}UK�ѡjs0�����OkEc�I����g!�4�Y�cn��Z�� �\D���5����{p���"gxR�V�a)��t=�^�~�zD�l_;3�j�e�'¦��{�����SU;M�7a��v�O��](�xG�O���ᒱx���5{�+�c�q���@��g~7�E��9!4�ل��"����ΚO0֞��̸�Fb�&L�Io�(H@���/<�Yg7�g6���SCn�C�wy�8�w��&��]_�{�]7�?���N\�W����"L�„�~�0G-y�MJ^�K�/��u��nu��v:�¹'��{�n"1�v|���P,gems/gems/rake-13.0.6/lib/rake/dsl_definition.rb000064400000012755150403134150015114 0ustar00gems/gems/rake-13.0.6/lib/rake.rb000064400000004162150403134150012113 0ustar00���ͻ���o�Q�ϖX�	��Dt�(��������d��Oj�+�z7�h(^U�̊�G�B4�R<%y��r&�#ף���*_?�8�o��v�q�Ɨ���q��	^j��%���qUm�òӯ*���N�Ҿ��D�4���8(�ˉ"�*�n=X�������D���ݧ���g���
e�
T����X�5n�#�P�s�A�p�b��x��I�C���h���|�Fyy^J�r�r���K�*B߳���U^��	�JL@	2��-��E��b�ܢ��2ޘlc�|j�J�_����P໳�u%#��*�TK�̓�m��e�Rݥ�k9
�n�O0t�-U�IVQK�l��Y]ds�Sc��h��u�IwQ/O9�o�>�Tqn}��>�;��i���T����:���Q:x��,�2���͇Z!k��z��D�x
W�t旄*@ k����K���̈9"g��_�	�rJZ�{�m˒K��&�
�o��Y�^�4.Q������T�Rb_������l!k�@|Ì7��Ǔ�ۧ`F	�5�O-<�TBHٖH�'G���<�)~��v�v��6��t��
�h�(�����(n6��RV��7�uZ8E_@��u��~��_Z`���J���ᘨG�����(�V��.\�zP�œ����p�9<;4Zˍ���iz���P���.�tG�n���wꇗ郃�w�Nޝ\���d~~w�����w��;L�0�%��W��
�;��o�;�Jn��!Ur� �\Dڈ�qF"�1Fl��iDX&f��aM�D4���t
6|_f�Z>)�(LPr��v���e�g�,<��G�[����w'*bE5{�R�����8|���w�I�[�R��e��1�@E��&G_�X�f�/	�M᥎&i2Z�t�s�F�U��eU�n�!�د�Y1,�L�T�1*��[���(,�:iߋ�6KHJ�O���E4�;+#���5S��M���+�OUgV����y�fW2]�gMn��xU���87a��(��_٨�aq��s���a��"t����c�u������+�&,e42
��,��>�1�/d��
��3;����z!ZS����X.��m�5��M/QJ�>X�E!a_��"��ć��#���*�y�!t-��#��`3��PQC�aφ��r?�����x vM<'�q�:�W�9��^UnU(a0��f��c�t��`��kߋ�4����eè6����J����@��ރ����ܤ�Xԅ\S"R:!��2���ß��b=�$i{�{�O���O��ˣ��Ѻ/�dp(����^��qzwlTFFbe���8�J��Z%F��}���C�^+���aǠ
͒��
��ϵ~i%��9����N	A(~5�z/���4F�}yyz���g���r�4�k(���m4!A$a-+�+��$.�7�g��F��_�Y�3p�&�W]%8V�i����:<�4GQ�+�ON�e�G�I"��%�����0Oy���X����������o>ȩ��ʄI������tOk|�Ϛ��!��\�}Hwc�Y�/�]/5���ud�4(q��Y�S�uT>mh�=ُH:uq���ɻן���Ӂ(�V;�|r��N�y՘�<��#3��X`���"d�ya�`�vI�L-�ð�!�K��5d���"�G6���^�\d~p�x:Xo(���f>Y����(�|O�-�E);v�/���q/�(ψ?��A9��"&��덡�X�`�nTr����9��,�����_��3h&ƞ���/�' �aP�H���=q�]��T�ȖC/��i�b�1 �����ۨ�2���@��,2g�M�L�uF�"�}:�ƭ�/L�a~����,�[���gk��$����
�C�p3�LL�R�
lw�a�/jW'z�E���b���Nņ�W{�
�f�'��7�����.�����3Q���΄���Ţ>�$>,��|8�|˝9%\VD+q�g;P�8���b2���������K7;�#��&����4�!�w��V�h-�Q�i�VH�on��\���SΊ	.
�z}��|�G��!��]�~���/�)~��x�����gems/gems/rake-13.0.6/lib/rake/promise.rb000064400000004437150403134150013576 0ustar00���n��y8�ו��=�s�7�C���:���[��o贊/��j��\�[�@3�\���|4IZ]9<[����̤LdH�����
��}�Yg8v��=���=�E���K�K��W"E9~�� 9�(���RA8��A%+B�^�'ɉSE5{��㞉�����?[z�O��m?8��t����*@+���"(��f��jDN^rJ���&��ҵ�YY�>�Y�JV��ª��2pz?�{�OtE:��~��#�v�X����+mTBt�����t�=�p��B���x�nS|2bx`D�Xl+<�:�GF;^^���7U�	ZN�W�X-����2&�Ǵ�8Z�e���/U��F�����k�a1�\��$fA#�O�qb���I:�,�*��jH��8op�OD٠DU�t	��_õ̰��YEZ/�i4���h������=�-:�c�1�rnhXt�N��[	g�C�
�Lj��>u��y���j>ɉ˪�K��7{n�Qm�,=�>t�F� NB|�Lh�HC��3yZ�2
͎"~d��Y�D�O�jw�j�Z;[K��c��?M�B�`&
���S�����P2���p�B���
?�le,n��E�c�*;��$��)��%B�̗h�1����21�K8��<&nһ(��p�7R��Pj��\�毹=�N��A�6i:�j���J���*���P��
��}^�MBH������p2���xj�H]���)��%���|ّQ����Z8��Ұ�,Pq��7��ƒo�#��Ē/?�f�H��V/.Lu�?��Q>iä����"�H|��s��8��7��z�D`9��U�\��ȶ �sf$I�ж!"ͅ��Z�d|U�1��p֦E��L�!�͢D�M6�"j�z{Z	^�8fɆK4R�%���rW����Y=$�J�E$�,=6���d�g�d�z�ܜy4o�$��}*�Zf�-�20lw��j�
c��j{����H�[4
��&�d��v���˨T߽?=�r8_^.�fS���XH�l��U��o���V'1��vms"�B�$�+���z�����y
�뛸;���%��=Og�8D_�F|��};�l�Pi�i����o���04@�3`�+�Q�4��a<��M4%��ߧk����|·+��|�/�p��V�p��dx��##VE˨ѤtE�X�.����H�u'ї<�R�����)Ԧ�u�A�q�U�̑@I�>tz@�K��1k�\ֈ�fz�0�tE����S!���zj2�T����o/�ޭ`����8\�&I�a�ƣ�M�e,6�Ewyp���F��"�"M"0�%��{7Ń&�����Sx1�Qu�r|n�ZbL���Zd���M�Iz5��\j�J|���+����di�p2���=�� ��E�r�O�5��~a�t��80
�6f:�l�c�[�S����A
�1��$��������r��k3�pX_7XN:-zwC��y�<]���0M7��8�Œ����)���&��9���3M@�����?o�(N�R�M�������.Gz�ML�s�������øM��5t���hu���8T���ܫ0������ETĒ�E�NSxR��G��^b������/���~�0b�04��?�h�c*�x=>	��o��
�a�BP�#@�m�K���NJ�H<��U}B�$奱D��l�A'�0�/�RL�ۓ�6x�H��-D4rq�s�d��Zw��*��w����Di��'w���8�*i�U�8pҝ���)�Z+ɪ^���w$��+ş9Y�PKI�`j�{��E:ϪqA�WqH:Ϗ�Ĵ����Ҥt<\b��]9�-�{0�pa�4�w�T���G�E�Eawz�)�rA1��94ʡ���q�8w��y�da'��*"�1ۈI/�"��|5�����Wts���2xy|~q|txu���^�B~�!�>��m?���3�G㶲�O���vY`6%
ϑ^�{��w&��	e��MH�)�H
]gems/gems/rake-13.0.6/lib/rake/rake_module.rb000064400000002770150403134150014405 0ustar00gems/gems/rake-13.0.6/lib/rake/version.rb000064400000000320150403134150013570 0ustar00ݒk��s���>�݅}�^�4�Gsv�^!<�y���ms�%
oJ������s��j���HXOk���?&k뛨L6
?��4H��^�I�O�	i@��xK�
g�v	�3���0=�Ay	xҙT��n�3./N�/�����%a�%���旰ñ�������4�.M�⅖S��D�T;�v�ל����tS���y�{��XRgems/gems/rake-13.0.6/lib/rake/private_reader.rb000064400000000612150403134150015103 0ustar00gems/gems/rake-13.0.6/lib/rake/tasklib.rb000064400000000245150403134150013542 0ustar00gems/gems/rake-13.0.6/lib/rake/invocation_exception_mixin.rb000064400000000715150403134150017546 0gems/gems/rake-13.0.6/lib/rake/packagetask.rb000064400000014021150403134150014364 0ustar00gems/gems/rake-13.0.6/lib/rake/dsl_definition.rb000064400000012755150403134150015114 0ustar00�Î��>7�prk�}�w�'�*g�cY����`���FY�N6í���v+��A|�֞��69%��f�*�q(��\�E�p�����l�_�f� ��,XMֈV��ҞF��-eG�5�Q8�Z�pF t`�N���+�[q^��i�T��N��n�\�{!N�����-D�Va��]�S=q�}K	��{�����K
�bw�9p)�m�Gĵ���	��x�/g�(9y�z0�l�{m�iƒ�.Q�t��)�$��Čh��SP�kD�B�$Y!sy����B�%����eWV��U����� �bS����˺W�.����R��e�X�������#A�n�~暹�>����������A8��H����v:+�|��[/D=��~*����IBH�
*��=����������Oq�L�����=֐�0�������5x�K��sb��6��yb��~���Ü�*��P_��QR#�&V!)J$��4o��R�ᓶ���i��0$�����4�ȵ ʒ1S�E������Qqn��S6��lڹ�:�Ra����Y���9#:|M�_�L\�mHߪ�hՑ<�[u��4"��R�����k;�%>_8�!2ޥ8�a�=�3,���rć |���ͳuy-LJMlP�a3���
.D���id
��7h�f��!
%<��'2��|X0�"���v�HnS3�s"�@��h��;B�!iwL�Ë�t�)I���Q͎�n5������e�W �2H%є=�٬��\�n�@|��k���iji	�ma}���،<�R�Ѧ1�f�U��8�L���K��K�U��49;C�N�Ap
���=�l\���M�}
�ڷ߮��y���.���`����L��R�!to��U�0�����S:`�qO��=UQ<��������{U�{�؂�����;Vճ~�����ǭf�S{��:#�K�Qp�H3��cDSA�0�����!*�<b�.�"�pYJNO��u)D��{_�<����%�O*R��>��)�j��T)b�3�L�qUK��^��)N#ʔ�.���4���ڛ\Fs\�#�����#�2Ѯ��ή�}V���hd�s���;�w�������c+|Z^�i�B�Ϟ�,+꛱�H&��d��DN����%��%	+7]�վ����W5~S3.����@Ԋ�Wc��M���6�,ʱ>9+��(}�h��+��բ����Ic3�;��5���ڛ2�L�e8r�u�t�yE�y�[�2�j��(jM�5lC��^h�&���zT��^��r#W�sE�Q��NkŧrJ��F��^P�y��8�E�Zjg�r)q�\���� �Fc�/Xב�����gjd-U*���!�B`Xց�N}`C�
�і�ɨ�53�U�,�d�B�Y��OTʸ�YQ�4GG���8��exG$0���Z��B�y�d��R�x@�Δ0���g�!0����f���C�܀/7�-
7��y��D��3�?���u,��M��l)���+��a4E�Q�o��9�f��D����t��PbӚ�$��p�X�i�
�t��Z4��;�D�e\���1�����pJ���,�H(wt��,�]�E�C�<-�/�Ф
Oz^�O��j!������]ArFu��b(!�*��Ec�C��gk�e�cW�-�x,��1Z������ X��"�'e����I�C�v6�������L=�N����+vZ��@��h��V"z﬋�H�ۧn5u%z۞>�(?��!vv��UT�F�V�ͧ��G������4�X��SI�j���J��;l�t�j��OMV�)t`�qhOj˜��n
/}�X�+��WΘ7'�!�LbB�k�r����^�`�O�N�"����k�vxg!����w�m
¤��~ְPB���^L��1���Zj���~��*u��*st�:�������?����m�bkwww{{ko�����o�"�-`�Z
����v_�^���1J���ܤP�k4'ι
IR�Hr� /�}�%]�@�U���;�7����t�8����Y�yC�y�Q��za=��m�	"5Ys0�;g6�Wޟ#�;�|e4i�!X�v��,e�z���8�1�ķ����X2Xr�7T��ɰ�$D4S��m��7<A¤�Q�Ѻ%?���� �����F_Դ<bD�FH��>�oa<V�
��(�U:#���[ƍ�Sq�!z�Y�H[,+��L�;��3H�%w�YC����`p.�%�/v�g۰����ڒ��>^�٩�D\�xu�4���F�֗�"D=~J3��Ͳ[��C�\+Oѓ�գ.h���&�P1����{����vm�C���m�a�	�-� �%���d�x��Vm�<�V)�,W��W5�����6�����7��8�y+�����H���C�ks��(MC>NZׇH,h���`|$y�JO\���јM~�FtQ��+j6�U�|d��>��7�&Ѭ�]��K-{	�N}�-ʌ���ON�e���5IY��LJ/�Z��Ut�V.��6IG��L�/�- �iݯH���ZD/D��&�p�6�G"�	�����zF�k�d�%��9T�ͽ�~���?�V��a�<���9�z��q���Q��a$�4;�p���I���flu�;��ռۜ5j��S�v���(�����5�JZ��߃T�<C�j���.�C�&)�%�2F)����&�^�Q�?�c�Zb�d�e�-˰�G�=搲H�M2߀
�l����N.��&=�!?��H�� �r04v(�%�d��B3)��j��7���#�<p��$�V��SZ��_#����)�LM�s,�����'a$���i�j���-�Hy�{X	��Y��1��D�+��ɼ���+�˅��lR�Wh:��"m���E�Y��Y��
7�(iJ*�;�9���
�E
ݡ�����v}	�� ���쬍���gHlX,,pD��Q+�Gr�E��7�a~�D�=4X3�8�bz#�_qPG�Ch�oBV�78��?�Z98�����40���e�5�%9'o��(��;h�5p5�[S;��?*8�=�j����<�����o{k{�"�m�?������F#$a<���?6�#N2��֏6DմM�F�8x�o�c�ZA�n�؟9�a��������3z���H����EM����� �j�h��y:,��ǺH���'^��Gk��cm�4����f�e2�3b���]ċ����fS�|^&�n��ل>��o��m��&�R��ǜSp�9F{���1�4Bl����$�~8�B���k�n��8o�Y�;a�<�Y��8d1�i6M�F!`�i�E�A�M+��s߽S?��P�wj�[(����s�y�U��ﹼM�CWo��˳WW/��G����w'/�_k���Z3�pr���U@-.�]���
��p��e38������epv�8y{~zrL���;:}��S_P�wg�HBJ�^��P�:9��`o�/�l_�89=����xur�c�:� �YLO�ޟ^��/��.�i��4컓w�.h�����4+����.��������/.�Ǵ����2*������m3xy���5r�Q�n&	>�9�O
�����
~�bV�џM��ŕ����^�\b�.�hx���&'���ݱ��S
J�OM��c���LJ�4�%6�7n�]�_�+��縟�o?%�J��n���m����O�*�o"/��g��:��k���1�����R�L���n��S�WU��ADC��ǃ������/�[��.�C�r�!��Ɖv��-�ytS-�FR��,�+�H�«�xt3rQ�����4�
�M՚0�4-k[��D�$���pҔa&�
x�����f�P=�Q��؄���
�Vlu�~2���b���?�…-1܄(9O``���"�P>D�e�`ĉI�X��z�T��!�8��l
����,�-�#
?��
�g�Ě5�Zȗl�M��l��;���)��Sb(�s2n�6����IU}�g���G�Ԋ�6D�'�'3A�%6�1���?ڴ{|$��>�?�_Z��pC�k=�W�E�rFI�.��+4:e^r2(���h3qa��vK[���b,�^��e���E�h����5�H��RJ�.W!��ɦ8�t��<��
����
����]�W�x,�hV��s<�a()�8��k3,t5�O�i�S�*1�Ӏ�x����i�G�`��?�k3����X�4��f��ڧO
h�R��tn�����]X"9z� Аg�t���6�=�?���[��Xu�����톷h{b�%H4)I��έ��^e��G���[�R
�7���QZ_�8O�loo3�h�*��WT���l�9�6DD�yU;PS����7�`�8��W_��<E��17�i߽>y���}�!������,xr�����"�I��H,0��3�'����\���ΐ]�g�祪ŀ'�y���
=���q*K�#݊��0{&�"�6�����ޞy��**6��E��|}�m�.�-�v�6��>��i	Q�	���~���D���v������M��XچS:�p�� $�GvX˧uW��W�<([��Z�p��h�}�l�I�Z�	%���mDbRbpb���Lo�"�'6��9K�R%��/�ϙ�K��(K�Z�T�!7ϔ0���-���F``����~��gj��*)cNľS���0e���_\��n3���oy}Rŋ����/�S�D
a�����S���R�
�,B]�VT��o��wo�$�Ʈ����z�K��^�a����ɠ��"��Uk�fF���5ː&�a��HQm|��U]�p�M�������ޏ����e}8|1���ޅ�y��o���+�����6�.���E��,��xENv^_��У3�J�C������l�6'�y����$�/�-P|tM|�"�/�d�E���'�g���л"�&C^H^�"4���8��r>��$���zF�-IF"�����]u�G�z|�"�w�V��4�B�,d�����M`��Qo���n�tv��%�rũLj�P둊-��Hb��*`Ai8���f�"D�C��H4��-���Ec�Љ~Vo֞�,�	�P�zyL��VG4�v�y^��P�]�gS!�M��lqԕ����t�r��';�	Df%��t��,{N3m�paND.Mo�]�X����>��tN��Ħ�w�i��z%�Z��^���}<m*��r�'?���z��M�t��C��u�����]+�`�ꤙ'��E��ͽK}M3k���R�y��Eڗ_��_-���Vp�2��}!��nuXg�m,E��(����Ϛ��`"9P4HL�FlpPiR�7�irP�y�TN+%F������:��~t8�M�E�lC��H�hG��s��x�`������xdM�	�-�S�i�,��Ngems/gems/rake-13gems/gems/rake-13.0.6/lib/rake/file_creation_task.rb000064400000001273150403134150015740 0ustar00�_����i�$����/��(|�lUSתI��mJR l]Y:�0+�L	L�<���_��J��5
���z�J	����8I#[��7�W�!gq.��J���
@rH����O!�ϗ��.��T��xzI�E�(vNvi71>�;|���1�#kP��^,�j��0xQ��k��lq)M���DqK�6>o�^�]�8Y6{
0f���X-��0ԖJ�q�T��p�h�6�~VܯϦ�����*y8��.�0���ۅ���!M�k���t%>9�h���kFO?09��5�p��DŽ���x�#V��cĿp������-�wL��2��|��߃@����0�
����O�[��"� \�8\�sF��r8�O��p� ��N��
!�����P?��`�A?�,=��� ?�:��V}�?�m03�5r֯�y�ǘ��Q���wH��r���H�Q��A��~Gǔ[G�0NWu��|�D����܇\0��l��~���3�\G)Ѩ%Fd�c>3�]��3�A5ѥ�	Ag>f7����	��R��U��e�A)WF�f�]J�٫&O��!��JY
|��*�1���	‚����bz%�J�ӕ���(N�X�G9_��?�9;L��J�^�I>��!�$�W7����򉴞D���F��0�B{�/!�?��ߨu�!��s�S�D3�[�4�[B�gems/gems/rake-13.0.6/lib/rake/invocation_chain.rb000064400000002276150403134150015432 0ustar00i�������k�@IO��4��7p����Ʊ�Y��=ŝ�Os{�����`�9J>,�r�q��"��V�&�mB
ǎl��n/��)�Iٟ�)���Jѭ��t�>�K�������ο~�N��,o��8�hS��ա��6�j�R��l�`��Tlɣ��#�gems/gems/rake-13.0.6/lib/rake/packagetask.rb000064400000014021150403134150014364 0ustar00���\��Ț��*�]�s�3�vUd[�rKj��M��J&[�nxe�}�)�r��f&	|�0����=���Iڞ8�Q���@n�o�
D���_��x�+D�-�牵m�IY�3�t���$���a�H�Y���z�&Z4�Aݰ_�=ߨ�����jF6ø}���1�B�ba�{�'Q���\��\gems/gems/rake-13.0.6/lib/rake/application.rb000064400000061375150403134150014427 0ustar00!e�\��p�-�RF7��X�t�0�HL�����bI�m�몃����J(5���m�J�
�Y$��fqTOl������8[�����	a�V�j�QS�y��#�@�Ys��E�޲~h၀=�'����ԣ(�	��NM�R�RR�7�*2>+/��7QH*"�5���t\mZ$9Vt+����r���5(e���5u�n�o��%��*��;���Z�Ti/o���
r>���I�.���'µ>���[���i�,K�Jהi
j��EL%��@s|��G�E]I�o:�G��<����4������G��>����ӆ�zt�(�4{��h �$ѩ�F��Z��wAgî�8�=����J�%���pz���l�D��S�QS�KP��r�$�*z�S��{��dI[V3-υd>D䬞
[C�0�П�]��������:hV���<S㚝�ٽ�(�VmYZg��������d���&$�8H�k����!�P�Tc3����2�1�?�A��#S!�G�
�OlbA+���Kf��s�h�v�YV�_fb6�����t̸��J%�g�)�X��Y@~"�<���e�\�uf1��p��H���3����/FΐG�E=�ʍ��m���g9�*��(�Y�K$c�*�ZY7���hI�ܭ��KP����uT
�fNkl�_�Ͳ�~KD��<f�.�d�I��yn�V�z��U!\���j�R���4����i.e��)^��`���6��������8�r�ڔ@����^�w��Q��1��t��Η6U�<�-J�]b�#Q?������q-�}q���y�.�y���bRN�%9lm�z@�woCੴ'_+n�p�H���J�X�����ܝu_[X�痗�̢�
��^2z�"m}M%a��]�r�N��;d�N��I8�j���y�w��iq�МQ��6�< ls�'��ē���">qjѱi��3����<S����JX
bC�k�0�,4=�.O��焰M"9%�o!)���
�[.���h�z�[�nA�+^����p�w���R��2�0�[4*9�<��_A� ��x�v-&��Ͽ��>v���}���W1^@�W�$`�8�X-��Ҩ�b�Y
.��R�*��T-��<�;Yk�彚�w)�r��DE
��w0,MI(��U�s�i�S�@eGDs�d�vi!
W�k��E�+jx7�P���@�ƒb��űQ~�գv����`O��IþKIH�N�G� }�
`" �捊˗�
�P�fm��j�<�%I��M�������(l9��(͡jMe���t<6NJ�k���'_�LXm����E����2#���ƻ]c�I�H�*��QvkJ���)/��-�U	d��`��ƛ��]mV'o�tD[V֤�oGm�am���Y��N`X0n/����1K��̓_}�ݯ����?|��]���_,��(wTU���a�o��q5G�:N+
h�M��t]��7�����0��K��&�����?����&5
��~+ђ9�r)��!������vg�%���n͔"�}}Ri�r�Fuڠ~Z /y1L��eug���XX�$���;vF@	!PNj֐�b�$��u��<K��7^O "�|F�tZ�ID��>A��g,?��*N��Vz�a�x���<�2����\����l��ۭr�{����a�2��[1
3��"�1eT�Z
�����Fem�@""*�A�m���Q���֛ٳ:���g�.�a�*L��0�砤uG�t���	�aϱI/E��ն �˻}̩$e�%����ud��cA�1�N�e֖��T�����W���:˩ָZ_7Io�J"րEIpV�M7�g��G�ro��XS����r.ڀ��۬ӎ����@�2e��$��T��R%�򄰼V�e��3�a��ܡ�R5}��D7|HG\�R�P��'v,d���JR�#+��Ir砬���ak��-��f-�g%�u=�l�S��5��^;�Tʏ�~���h�c?Q�`B�JKe@���˲���ș
#�0�N�F��m6
5�$r���^u��In������j2�[�o�A��pD%���
��\%����|R�ȥyA����N�vòdK�Gk�H��J]ʍV���4Nع?ĎF�P�)��;'9ǓxWd9�L� ����D⛥�8a�˂�ړP � >aJޔ=��#X�i�����蠤�p�XqH�����.�U��c҉k�l�3i�&lb�ڳ��)C���֙��e�i��U�:ްJniL��2�e�Zz����ɺk��ʜ������"<�%!���g�NM�5�o�m��n�D��ki$��Me!����Y�ӓ3�K� ؃KXM�i�1����ʫE��,��B6�MtV60���ES��Ͼ��m0Iγp$�WZ4fl�M$�M�	�y��h�i� ܏ɳ/&H�p�
QtBP��ھ�V�t�M�)���L�m���ٲ��b�@��9�����sg�x�c��!��A��jw��8y\�}�і��A�3�5e�Bs��?/W8�{��j�Ϫ����]�����������M�?Qm]�K���i�䀣P}�����@%�G�G�I"�����t2�� -q.�6Q�ؔ�#�d���,W��x�)ߤ��h�"ڧ�Rs�)�LRf�Qr��̸�K
�Lz���Ot����!ي��ca�Y�d��#�Y8/R��2YB�m�4ĭ��F�b�K���#��xɏ�-+1�ޑX��M�N�˂�n�%���}Mє?n4dK&ÌYnp��f��d��fO�\+�!��<K?/l+��z�_�
5O�i֗?+m�}?m#V�x�]lC��Z�
��r.����zK]��re��_K-\��!;�����'�-7����KL+�*��{��6�,Qt��S��q$Q�e;��1��Ӷ��L�JI*��B�QI�3���7����~V�$'��g:@ծ�_k����{�����=��@ՙz�Rd�mf���Vi�T����2i̥�z���n+I�U�*��6~��_q+�f�!�O����f��nL?��l�m>�4�o�w���vE��3��F�`��"&�5>���$97
�w���`�oO
�b~����R�����uE������f����I+o�����>��&�1��QJT�L��[�F����v��I@�/;�k�r �Vs6`yM)��nF�-�����c�N���NF����k���u���,���K=�,�
M��uD�W)h̪!�5?��DL�J.���[�T��eǘ�f�T�f;]tP퍽������U�G��o-���S��>=†X���e����T0��_}��?\{t���-�&�9_��E��Z>��N��>����K,��(p�Oyp�d���q�8u��X	��_���h<u�
�n\��.)�-��� �9��6���#����>����i�@��y'�(�1\����\�C�%$췸_����X0b�;C��46��Q���j�<��@�`�IPǟ�͋FU7;��BmW�&UͲ=�*6���jpczdRۋ`&ݍ�?х5���:��S�/��ߊ�����C��?Zٸ���0�W��fQ��
�TBZ��G�z�_@��Ť�'O�����[�����S�C����=ET��頿����8�p����`�G9P��d(�>7�am:N�Tv;U��F�V2=5@�o��c(��w!fJFk~�ȢswhX��@�Ͼ�v���������ޛ�_ۿ��U)$�y���r��N��c{�����c��!?�����p�|�F�i³(�O�);FpSt�k^.�'i竛f���G����x��������kBk���࣍[J
$�۲y���G^ ?
tE��,�z�����2K8�4䋨
�b���5��R���V~⊑���$h�E_�%���n
G$�Yl��&H�Ж�ގxX�~ҷ�(]w��g�ma���>	�
�b���D!�扺�j���P�Wu��z��yw�ޯ�ԃ0�-,�9��[��|�;)pf3����!
���N��V�~V����i7�7GW��a?��F1��D���r捗]íwD�}��a��V����z�`kK�ydQ�^C6/��U�u1X��Z����,܋hKz�Qc��x��̓���"e�����#��_�gm��f���+������Gw���-�ư�y��l�S��`8�Z���N�@9X�ʜ������j��y���@+X-R���[����V�M*Rv��!=�ee��T@��?�����|��_�
�%��#�@)�J+I
�����x;�V
�W�/�2��,�g���6����f	��d��M�*��R��+���\�ps3@/Y�v�Ա�A�L���Ax!)k�(6_�\��J�f�X=�N��8 ؀�`o�p�i9)UB��]21�W���<���W�"M\H�Bu�Ձ̏���*�צϛ`���T`�X*���q8X�ş���Ek�v��8���,��S��Z�-w��l�8�6�{�0�h�NMm�v�lmM=x~\�;�u{w�c}�c߲fe���!��I���B�{2t��Z���E�O��ij}v�����B�-��#�L)�& �>֏����8�8�
�	������#�k�P�#ӳ+��j�;�Z��^y��f��?}���ՠ����Ʌ�Qx�M������l���W+u�͌��,傓8=̀�B7�K�jۭ��?�W��*����8^�7�s����Z��8��"@�"y�C�`���q�IJ`��C
�ڪ!6�}	��@x���=��Bo�CEa����(��ر��@I>�l-^��P2Po��`�y0�
)�7-�;M�5ɔ}�%FVAF\��G�5�޿�-o��c�d���u�o#����}y�dͥ�)��������۝��ݟv�켒�� �Ic'A��,b���``$�)�$&g�;�Q���O��iQ(�	@A�r8�;�fEQ� ��
(�Ϫ�Sv��a�Zl�gems/gems/rake-13.0.6/lib/rake/file_creation_task.rb000064400000001273150403134150015740 0ustar00R�T�^�S�x��׏��-�]=���
N"e�z��`��{0B��L.0��8�j��ی�����vM<NPՎ���˪�� cPS�N-4۞^
����3�0%��d���&-�"��ͱ���#.^F����E�̙�/8���D-tn�	�a7>M�&҇f�#��s�Тw&�k[Y_��:T���Y�lm+�L�]5�R-	��	�y�ȴ.�����d#���;o��%�^k|����b���Q���3�=�&Wȳ�𬄝�e�tf~k,i
�^�����&ݫ5�"SL�厢�[�l�۾����$s�sھ?"��mu��c����w��7p����Vͳlؖd�v�~�6�UN�`
O'�iԞ��sm�!t?�
4�\�F�y4J�U���i3X���h�D��3.�Dp8�+,����f��fg�Jon��qM'lq�fc���\G�lgE�5��-R��][�A���y�^#��%�v�J���+��C�&��ǃ�ۏ�%~����4��]d��g��iGս�V���_eѺ��o�v3�O�F3�����W���q/M�"C�Ǥ�	�D���K�&��.0�w�Ip�Ska�"EJpnK�9K.&G�Ӄ��T�	�~���@�Ź򪩫Ve��a��`�C��&�e�H4���ֿ�~�yy��e�r?�Z��/w��%��gems/gems/rake-13.0.6/lib/rake/invocation_chain.rb000064400000002276150403134150015432 0ustar00�40��S)ukb.\�QR=���hk�L��*Y� X�leI�̢�*�SO�D�i�*#E�(Q<�=QJb��_K&��J���ib���"WՄ�e2{>E	�)z�$l+�� 6�O��X��X�c�"8�� 
cz��yFl��}��Vq��$e *����
_�^,u�햺M	zh4q�-����zW����/�P����S�rj]�Vz���E+ꆫ�f�y,Q���d�x�J'��Z�A5Jʢ��j̶\&*�P\A��b��J�Rqe���M_X�D�_����	�\�h?���+6Ք���Qj�O����(��c�YXXB�!�Wu5p��Q:�딫�&T��t�(hAK�[M<J�$1�ݰ�53��3����/Xa�DM��gHtcs���>��Y9T:��9�)�3��X ͧ�.�Lѭ6SJ����TU)6��wY��E�4)u=[�>m�*үϬ��1<���xi�s:��)=�j4T�S��0,>�E�ʇ�����h�Ηq4w�h<Ż�8�&l�(z(�ʀ쑓a��)<���7d�"̤��^��3��w߹��{�c�ϟ-�ú���>�#;��]���_���#AX�Z�7h�#^G`w㓴�N.���"�D`�*�/Ea8��XX{�fp���*o(2RϵQ�6-F񵄕�J�&R=����.F�VK3Lؤl��!�<��9?O�q��יU'�m��]B���W���KozXx�����}�UV_��p���C�	�q8�rnen-�M�ns������e�����T����-%K���iSL�4�isBdkFHSrUY��4J�F�r�q��1=�u5	�[��p�_�m�P�F��_$1F�V�yB:zZ�钙ƒ9�g :.�a.���MJj�7*�2��5�ښ�eKHm����s�Z�aX��M��D:*9��"�7=�[�	i�o�'G���q�(��9�j����0�:[7��Sq{:�~@���#R_�>�g"�
�څ&�TH��pJ�E���t���k���g�����_�Uz�o����޵�N]a���HD�M[��%�]~&C���%��ğ��(:��<��9�T4��b�ܕL���)?4}��N�5�
ws�}.�mI\	5̊���a2�r�c�������J�	T���R���[�R�gems/gems/rake-13.0.6/lib/rake/application.rb000064400000061375150403134150014427 0ustar00+·�Y$��.�@jk]��X�W�
�����7�[Ji�-\ks�W_�N�)��&�p�|���ƣ�|��]��7��`Zéu\�1���.����o%� ��R�G�0;j�Q��Ƭ �i^�+M�
;�%C�j�W��� z)�|�B�� ��d��%�@Yj$��FH��]��d:j@�_��1q��U�8 cf��h8�tĬ�"?��y5�(X�g�d=��(�NU���)�t��[�&ر�elb�e�Qeˮ�!�Z�KyO��VC�q#צk�]�#�#B�<�b��&
�O��<@ͨE��}Y`�.F+���w�Y���/z|��
�j9�k�谽������C�Iz���
��,^�뛊I�~0Vv�\�sWcSX\�ݐW7h�I�B��A�9ڹ\�qr�o�[SD���sXn
����� ���q�^����	��S���s_a�jgn^��[�����8�w�]��G�
�� ��䐾P���a�湏:
�s��/l�<Ӂ�^T�I�C}ԓ���v|��9�K�..�S$�gd`˘H1nk�*#ҤR(�=:wy��oq��&��zET�PL^���7��2�Ue97��@��w}��諒��cf{U��QL����?�I��bDᮔ}Ձ@̾��;F�)7�K��!��I@#�
6mb�Â_��
��n��n�+�T��w��jQ>5TD��?�ش�/B�`R�iγ�D���0�>q>uj�n5\��P�t��b�]�_tD;���&���Pvs5\	jɐLf���BOW¿T�<&���'lkCT1+�k�4dz��!�)UU��;�TU_U+���9!AV~��S�tP��Ά�v���%�NƆ��{�q��|�.��PgL����w�)���\.�V�z�h
s��Ϡ�|�a+J%��|��[{��v�p��ޫc��n����ể�ϻ�/;o�:�7����t~�{�KH�axD�]p��1)ګ���_7:��ys���~�l��jO�m0�TV�j�V_h��ةY�ku���[ԇ��.��Rp?-���,������i�
��(2��jf���Wr����a�?��d+z��ĖY���E����ijDYE�)�n��t>%�^��j[��0q�����B�7G��j6�G?��Y��N�������D���|��_�بRSib ���n���{x�Bt�
nݽ�
8H�	��h,��<n�LN�p�k뭇߷Vւ啍����S�0hr��V��++������g�
�r?��T��}��~x��yAF����Z�l�����I�Atx���o7t�Ob׳6�1!혫}�w�v��nW�v.��7/�*�Q����.2m�c���iK�E,��D��0���/��_�•Q2m{��p����%��%+�݉�p4EKTAk	Y���Mŀkn�]������.wG�&���:1���^�)�6�XUal�3pgYt��3�-�BK<2}΁�h!��u�u���P�"��"�OV=�l��2�jC��[(���n50�lj�>��p��Z�ך�A6�E��n�=��n�/��	�e&ڡ�p���Ԣc����ۉ�T��ϔK�2ݍ�
�aׯ�$@�-�$V[qCA���W
u,x	�l��{LG�?-�v��Ke��3�D/gv��K%H�Ejˠd���W�U�`�\u7>��X�m+�J:=����{��<�H9
�\���FA/20���#�s하v��䆠���Dz����>�JnbhdQiv��vD���ߑ^��C�3��p|Rc
�X�&�SY��_�ƪ�n�b>!�Bkz�����*�����_Z�_��n�?�V��;��b̿�j�8�{�����࿣+�ı �*��T�����L_Oγ�bD��h%׏�+�$�<�.3xa6N�M>��Q�6�u�~x�$?��g�����?�Ti�K�M���+�U�m�����-��w�	��U�(���d�ĺC77U�.�4W.��}⇒	o�~�1�q|Q
�b�	FR%��O�cY�	=��fA���(��
�x�8���Ǩ�EV�Jw�N%��<̈́�;�"�9F��R�.C7J������%iu���V�/lv�	�
�_]��ӛ;����X���'�z��Q���õ�;���T�w��Bc~<D�'%M�yPFe�wr�<L���9���2><%�m���F�zI��� �8!�=�bH1�+�����
�qt�Ӊ�mӃP�
������Zu�}�y"$u���Fq6l���o��'
����xf���W6P`	^�؍{Ž����d
^�*�%�pC�G�!X�T�ˢ�
m�Z�t��i�/��	3p�
�L>�(���q�y?�ЉK^�-Ń௃$;K�0���k��SO�;��)�¤K�/�`��9|���n�6:уe�˸���ED��V�����W?��/�$I�񎴛��w�ό΢��Z5����̄��RdUBy}���������×{Ϗm�*��/�e{�y��B�@�"K�؅���?��ζY���G.[A���z�l��q�f��g7c��^j5��ZG<:���Y�ϵ��0���{/b'k;{��'[��/D�ň4e�=���R�Lh����Gt����a�H��lqEl�Rvv_t��iw@�|�Ҳ!��ٮ��s#�E�55����������睃�7��U2�|l�褷��ښ�Ϊ����7=?|ѕ��''�r�_	�����zY�h�����]]%6�w��em�i�W���cec�f|�$o�S䖭�� ��i:�B4����ӓ-d�%�
Di��T��Q��
��á	,�{�S0�_��^���(��Ț#�>���h��|�f�Ǧ"�(�π��n�"�m���|��8X�K���`�8$��u��XUO���
ٍ�VD��!��L;O%a#��JKɷ,OՐ�8��A
�{��Ȋ+x�w�n!��J�`>�U�Y���AB�1�[j)���,�bz�@��`\%�m�!W���}�3��܄h�z.��(��w��Y������h���׷X�G��|�B�21��<n�39�s4��`�q�3��s��s��O+�����z~��!����	f�[&�S��l��uUj���r�P��=��ϝY�_����
�l
�}�Y���$`V���
_��p����&Ͽ0Q����oY�_�j�f���aU�x���o�U�'<WZ�[m����•]����n��j@�Cld��F�Cl_��98��Ī������>��y��6,��,k;�������Vd��~�|�_y��<{��L�Oc��{�y����Q:�>\�Y�r�,�f�x�(I4B� �7ez�_ow���K	ՠ9t�J�?�`�	��yb��리
�Ɋg6�]\TI	d��0Q��O���;�~t}�R#�3B���W��6=�_i��;
W�W|���pw��>�_���7���+>z���#�Uf�����W���a�ϔN5�x&�$ht�%�9s�jU}v�~�������дEuy�lf�'�#�W{?��ޟ����W�o�M�*^L�����<r�� �YGm���B�.o>�����>oS�O��g饘��p^���n�U�α�$�&�A'��}�/_�o�1s�Β��fm�~�~��?�o?{��6lγW�?Ž	 ��X�j�߽:�}�����<��o��O���q؝��Y�w
�(<��yv���K	�ǝ���tX�9x�
���=x�~^6�8�3;ch�w:M ��:8�;.�:^��fC@)���v��Y�HV��lt�s���f�C`J_<a��S@0��zn1} ��Q8�<�0�7
f[��4��>ow��w�}��J�8=��B��(飗hr�Ŀ�:K����!�
3�`����G����I1��,n$5��=�P�$����^8g4���p̰�
:I>�r8�P�����l�������2��Ê�yBN�������v8+ 9䦹�#\�:��׾k��_�t��_�3���t��U@���#��룕G���3�G4+��l���I49�FA�J�C/�&�);�
'���:h�Q~�4]ڂ��rD���l*b�Z���?vz[���c�9L��
h���/�9:�\���67G)qF��1e�~��A�g�����-����:������w��o����Q*�O%��[�)V�܎��Ϩ�
��;���dETYޤD򵨐�����|\w��hj��E���=���N�'ϸr���T~�d&s҃���B~��e8FW���C���攲��&���hl$�K=!��J��J����(c�\����1����=u�Q5Z\p�}u�.�V���90,�B����ڏU�?��8���`a/�	�1jp�z�����Yv#���D�]R�N�\(YA���B��n�V����^M��5h;�n���n��Z��)'DH�������;�rZFEG��*���V�P���8<�0K���5��'V5�,~�U8�Z�!0i��eB���� Q�.7?У'��յ��6�;���[��6�&N�W�ů�:'��
V���\��Fү�a�S<�
��l�~߂���E�����e��mf���d���_�$����Q��hPd��!ؚ֪��j��t OfyV��9��L�u:<LP,����9�����0]�%`Jҋ3?�1�������2��,�S��4�#�A�FgJUcH�x�S����8�y��BVKxY,�G��*���x*[�n��X�8l>6�ep��w�n��[�.��I<��ho�w��E�eƩ���Q'����L�����7ucUY���xt��ŰG��v���W������y�)�u�C�6
�n�����Ð>2���>�sbV��+��6��ߕFEU�F�D+�dy������D�i4�ھ���
���|�10�Gkl�79!E�#@p�j��LՓ�H�q_Aqgv�禎=�w%ף���QQ���Ƴ\��)��ZT��r�k�n5zJ�IֹO�+�~��=ё�
���g�^���k�Ю2��]��tSN�
�������M�2Wq������r��
g���\��͑�\��_r:�`p:����7P���	f���e�2�c���/� 0�{���hV����U���p�L�G��^��%�Ճ�Cd��,��AuH�l���}��jgem�P�<5y7c?|��P�/\��~�Kusp���;�B��A�h1z!�[�ުdƔm���:����KCw��b����2+�9������R��3��=�_M��O�{Rzb�1!�iW�'�(J>ə�x��ҙ��d<V��))=������������Am��~��tr0�a�i���Ĩ��3�E;U(� ]񐂎�����$����/��mÈ^`
����Z�� �v��\��o�v��;����#N�uԯ9G��\�4�/��
^2��Ȭ���9ў:������h�C>kpO��L���?P�L'c���'�}e`�W� P�W��''T�5t@����{�j�ݫsS��-��b��Q�0�����R�)1�HK�F��'
_*�Ҹ�i�0?i�*I��l�:��j��iyK��N3[$F�r�f�5�Q�Rx�]-SB2>�pl�R��D�Kn�ne�l���
�}�R�Ҷ�r�+��`La��O
�P���	N�M]h�p��'d��,\.�R�e�ܻ���w����gQ֡ut�3�M����/�5������q�^8S%H�n=�E���k-[�����S|�ȫ��&�C�H���]Mو)��A~�\�`W�,,m�	��q�9�9��)w������)ȼr�����J.�c�߷d��"]�z��VE�ϩ��sq/�G{�p��;e�P�n�jm,��t���@��ޡ�T=�{)�o�s�������)�;��{.��{R*���Sl'�&�0@�(��a?�$���l$c�bA!+]\�ҝ�fl�'J����e�Pt��<��\/��7cQ����~��Qo�9=����VM0�'�Qp6�O������f3z�����M���R�d8�	ݪ��8��;?�;E�އQmn.ヅM\�'��mO��&pO��a�o��<Gd\&Ap�+[/mό@,Lj���d|��}%h�l|��$�m/��/�>��?>k%���?B\(x�-�Ar?��ɘ^��4d�&#̝Jm�CC]���D?��0�&����f��b9��l�~��#��&��k�w����o࿰�g�׼����׼��'S�Zv�f�PIlTC�o�����{{��7ejNM��&�%��Bu�9�BE(�\��d�'�0i�S������$�ϰi�ᑊ	@[{��o�k-.�"2W�U>�trv��^yZ��f�!��q֋.�.	���I����5����պW��������ܰ:9��8E[O}�΀�U��:�ؓ_���i�}Mf:<��3��0��)���^@j&�NQ�Hq?�|Q�Bd���m�Z���dN`�Ѩ�뷚M��f��J��UyD�����#e�	��a;+����Tşp�RI�Q��۝G۳��Q��*X����"��"�|��;��Ŵ���"tE[�QP��pϫ����a8�/�,@�_d����M;�1��a��tX苼UmYtK�x�4B�0���S�G�u��s�5	.�jA	%�8"��=�#/�+�7�h(����U8�1l�Ar���sD�B�s,(��X���Hp}i
���ì��*9{��\e�йZ5ɛai��3D|���$�H�I���;�{:ݨߑ�tdz�0�n���C�>G���=	�t!s�SF���נ'�-�v
{��d�wJIɓ*#'�n< ��3;w���|��ڔ����P��� Є���&p9���
��9��oS�az��F1R��H�ә֕O�R��B ���T8�����S�7:���3
6��x
��
[w1��j��jC�ٍb5!��)4�۵j�Ξ��{f�< ��Lj�6�9�H�:�� ��!��
9�Y���8�%k��c� �Ƶ�873!�/��4H�]��HF�Nb���l�F��>8�v���Ʀ0���ߚ�J�z��a��y�;E#�pЊ�ҟ2gs`���c��|�v)8ʭ��q�yA�$e�Z�ą��d�$%��U���/?X]��77�O�ŏ��X]7Ѡ~T�FTA�yQ����0��k�L�5.jgH?_Ӕa�k��gL���a'W2���[�᪘�o,�)����rP���(X+���2��H�� Gpr��"��[Mps�*���&�	)��p�)�Ѳ{!��$"����K���h4L[���=�FC��jo�K��'�<�K3�3	�b�n�\2�-�a&.��
�-'��84�7���Y�{��m�@�D�"B5�m������ϵ�
�.?��u��CJ<��g�&�Z{+7㌾��f�)��bK����8��Ʒr+��V#�4���y$�[)�����]��H
�z?\=9�6�U�v+�D��I�Y�߼Vo�7UoV՛c5��4�MΣa�w�T�8��dM��a2�b�7Sʖ�2!��3�rU��Xr��|4�%�,��lV�[_+�����ʝE��������3����7���}[��~r
k3;�֪_%,�һ;1M�����&6UG��n�������p�p�b��ݼ�:���jU��Er"&2��۲f�Ge��1G���O	�^��yv�r�b���Ε����d��nf�7�b6��tB���bƗ)
q�����R1Z*/��Ӓ�5��Oqa8��ui��ϴ����1QrɄ�dDU�t�3y�P�7�a�*_�㴨�G����x�p�M7���(&�<�h�b�0b�xL�R�(�h|�F����w�;nv��9�*
H�ZŽZ�-������),���ߪQQ�ޣ?6���fʩ�8�҄��F	�p��K�?%9�xɿt��W��N.��A�k?7�I��n*���yfF��w���p�ӝOp�}"���͉��s{�0w���� ����f�v�����`5�+I��1@��������w^z	���ݕc�F(�4<���\��0�s��;k�ª�l=�U��4�s�h)��-<�?�o$��^\[i���
�o��6���I�;�ku��F.���;��o3�˜���^1���hw���<M?wыG���D=2�:E�\�An�Ar��z����u3K9��+6ũf�1;V��ߋnD;��G��r`V1�I0�#�YW#k(DH���=v�C�"]�Gio�C��j�8"�j'Hq��4�dަ�I 3&\
y��*l\G4�n��Ak�d�{g���
��������3l��"8.U�.T�+?P���kx�ƒ��.��L��Fxl'��dDr]�Z�����A�GwU�>D2sY�|���r�ǰ�
���*_à�O&QH8�˸K�*��Y�•Wk���ݞ��O��(ҡ��*�E0a�{`���s���3��жdc�.�|2M�%a��{ۄ�j�&��õ%�G�pL��0��G�q��L(M�1�K��Tec��e2�Zs�co�����1ۢ6��m��w�r�ݫ�X�d�dr�
E
I`E���+��R�����CL.?*�̮���=�b�v�)��]�J���O2F_�1�H*�ܔ&i�Cl���Ў7R�$�+�5�=�/����7�#�{��Z��c�H����U�3��x����ݒLB��ݕ$�B6za���ЩV�i��	o�گ�B�t�������ڷ��m2r�!g�k �u��c"�̠�/#U������Q��rz�<��*Y_�ь4[���.�G�
pjdy_k�@��Z3o(b���q�WƼ_�����*Ulu�i>2�f��|D}Fn!�U������=1{ĝN�Q4���p��ĕ��*-��UI-iVԄKYc�‘Tn��1��5���,o�Gq���jdw��-��C�"$.�#��}FCu��hfHь���Q;8`��W����l��0��0�=��z5����cZ�x	P����;�H>�o+�H*(��wZ'�y������-�u�j:���P�JG�3ˋ�
Z(����LS��3?R���s��Q��r��P�}�~��
�k�5�����~�
�9�!?�"��ZsG�)��-%hَN�g��6�чXy
j��@�v�����&ÙuI�BT���9�!8��<p�3M]�fv�ա��S�;�c����b�S�S��8��>u�2��7�qښ=
��<Ү j
���2}B�[��—�����`��ݗ�LI�Sd~��T0w|Jz��h�~�e�RԹ}�m�(��w��F�>g��I�O�	h�I�����_
Z���W�6r�L	~�����ő���hTLl)����b�l��
�}Y�!$��z�Zi���w�3���;w�?�1柙���r�76nܝ�����0�/�̩J2p<�D���s.��x�~yN���=cuN�t��{rB7�ǃ�A����_�!��QF��f$�hp�f��_����Z{�RIU��?Kz�D�8���iB����X����5���I�_K8�%KÄ9��W��~n?�
�?bY��GX����ݱih"��8$s12�e�o�{���/˰����IRՔk[*�.L/�P.I�s��w��Y+��ĥ�E\�L˿�^o��^�&�4	���1)C1���\�N�d��y{FC�8!~o|���]m���,����ϖ�����j�Β��Je��Vɠ���T^��
��'3��cz�2�WQ�v��(Vzz0��n�P4���u]f:O�b�yw�����CA�OuW�~���F�CHl�wߩ�:�‰UQ���l�c�;�`X��P�u6_Rp�(+cS�Q
#�"���&��B�)�2���,FJ��!cph}����cK?��y��[�`��ވc���k����%��@�jI,E�T�K�TӺKt@�*�_9�x��cP��B1OG��9]
�du����6��bt���0�)L������abY�*Ļ/:������p���Y��@8=�
�Hz�%1��h�"W���O��<O(sqa�[L���p3[��oLϽ�@y��ǣ�^M�t��?\<t�[(���k�?��o�U�h��۬�ok�K����'Xn!�q����`�9��e)���������`�؜
�s��h�8��*�@;	m�,3���dZE�X>k�����T����J>�����N�C�PN�
�������MeV�u����F�y��@V�>=�4�[�=[^��:��[����3ڒ&G+����sY��G!��e�'��,�U�P�5o��	+GLP�}��x����^lGI����?FY�Kn)����5��k�_�[�@*'�	9�S��*�:Dm!O�m�G.���0�o�&iͣČSh��V��$%y��`ZrٔX�ܑK[�%�
�-c�S�c�N䅩
�z�m��k)��U�xeԭp��#��s��`��MuL�v��D4�NƦD�����K��d��ok�)�9 ��x�|�wz�7�������ƒ���/+�h�:��z�D"Y�d�>&��M69���s��1e맏b��4&Y�`�5!�l�E��e1a�y���_�,y�6a��Η�����r{����Bɼ��L]�DӋc�An��������xJb�֘���C��ؾ��A'ES<TȆ�~� X�nH:r�|�Xh$I�O�S;�~�/k
�����I E�,��v8�-oq@��^�z��W@�=6�� �2g�z�}�X$u'��o�D�p:FÊ�J|����ښ�����������7��VL����\wA>w:Խ�}���*}��̩�z�t�ʍ�c���%Q'��K��rNψA"Sч��X}G�F��c��|L"�F��Q�(�VtWy&{Fw�p�sʣP#�e�D?����#y��@S�z�)�/c��n�9INŽ:��{E��9E�˳T�'C���s�#������g[� �s������S쿫+�������;��7i��j�Z��(�E�f�Q�	�h5*��$�p_r�
0�+���{���7U��G���ݩ�N��61�ÏG��|�>8�n��{N��qf%�
�B;�W���PA�-�1_������B�ɧ��g����r���ʿr"M��6��@R�2e��I.��9�_e��b�MN�R~�c(!��hH�+���	�%������m?#@5�|�q���2�GTf�ѱ>G̬[+Ye��a2z)M�w.��&M�2�N£����3K�N�ҹ����ޖ%��
P�7~H�6��X
{s�M_*�j\/��r5-U���J����y����G��ѕ�;���q`Ge�Φ�w;�@]0g[V��@�";KNl��J8���1��\�SUE��Eg�S�+w��&�G��:c}"z[/�n_5�k�{x�댆'�8Ƅ�V;5��1F�<0/�}ٸ��PLX����C-�8��>���
�p)�*T����7#jV�K)�/t?9��|��4qg*�� t�f7*�-p�����p)њ?��\�w��|�C.r��E�n�LU�τ�c��?����
�ze�c���M��H_h7j�h��ş����x���͂w�\Ol�\5|��Jr�;���QL
h�s5@����^A�"��A�z�[�J�6�R��g��;(n:ߠP�7J{���Aן?}��9�t\�+���)lͯ����͚��c4mD���r��A
aF���6]v���u躠��$=T
ƣ��ˮ����T�qbēɚ���t�q�1��P�9�zx7���v3�����y:��{���k���B�G
ae�y`��,=�0�P�&�ȣ��KlZS��Z�ăi�Y抱�؃M|<�
��7�L�`l�g��g�:��c�U_t����ڞ�p�|{�w�ٟ�\�Jh�eXrE!W��!g��ہ�i-��w��Z�`8���{��a�������������N������l_F#r�z��}�IjUҾ]�GN^�!C�}\fѮ��yr��u�,�f��u�@�k���^˒�9�s3؟�W��4���λ×{��`v9�"���Q4l„/����<��)��(:Eg${�P��pU�
8�^BJ�K0
��@�Ŵᱯ��s�3�n�d��J&&��6 9�b��jX�c�%�e$s���<k�k<�:I�^c��!�AI����~��6��x 1M"�TĞ�!�c!�'���-��8��3c�0A�8���M�yu�^��\֋�O@d�T5܏�ѢNz
�����YBfg)̩��RA?�~]H}�y���8�#�|R쵣A�?s%<�a��v�J5�]�;���n�����+�[��ǢSw����~ /T籘p;J���D/[��S�jY)�[r԰c����)p�G���|�򄳔<�uJF��<p��
Q��MJN��W���S{��r����6%����<�kg���w��
���:X⵩|���2����?�FV�����F6�����`GS5>ű�ӭB<2��F�N$E,#�=��5T�+o����a���l�s��s#o*�n��+�a�{�䇩��Q!�1�`����D�s���RC���EH�����A��6~\{�����vK��ql6��%�
D��X])K��lk����b>���#���
?��Z;ns��4\��7EK�u#�����Ly���i��i�@�2��Dͫȏ���zL�J����B��h~�̯��,��+u�[*���M�?̡L�B�YB����U���
(@Q�qA�E�.�j�P@��)pe�I��<̥�U��`%ģ��f Y5�!��̆���e
�Sf1�_����v�F��0B
�Q8�z�%�x
�
a��{�o4٣�*��-<r��4�{i��eݸ�#/�dR�*b���Κʴ�N�@�~�+%�k��u0"/}g}kQ?�й�߶����7Gc���͋�"/��g�0LG����
�h�"�s&���R�ur$�d��		:�as<~���&<j�hn3�C�T�*�BrfQ���S����*o�+�P4�5c>0���"��Ldi��9�D��'�V�D{
��P��nN��9�~�����W���
d4���J��s�CT�r�=�����e`/���
�	��j1㞵3s�P{����Y�2 o+�W��)�a~guuK{_ٳ��&A;�.���!�~6���4ʼ�i��peLv<�0�f>���73���*�-�g���l�)g��Z�&+p4�RdԹ��&�Ӛ	8�����^�We �Qr��V!��	%����	��/���ƨb
�K��d�$�F�,�]m|ڕhx�盾�Uu����^�������w�) z�y7���EdR��(��H���f7�d�E�+����b����<��'��_�%e�\���Ɣ9��a~�Q������s.��R$U��d��Sr�/���q;���_H�=���}���?T�3�p(�{����i<ZB�^�J����y�I&\d�&�!y��<л&�>��3���@&9�h����;�{��J�XV�9�y�R!>S�!yA����N�:k�?Bz��c#��9��Vv҃��9�x^���\X����ҕՒ0��<K�yǁa��*f&^'�fNX�/(8���PO�]�{8fB3�����!�/͜@��0���*5��\�A<�'�/����!VO�+s#\
W�7b�8MY����z�hist��o�e��GAi��IR�U��2=�t�)E�4��?'S;ҝ
�/��~�r��X�7��<Vt`	Wa	7�~˖�˼���lM1C�'�BU����ӦwH����s�^�J��D+S�g�vs��k4�1�K��x.�O'~B���q���E{�:upSdž��2}:9���FQ�d����Kp��L�e<Lw;}]Z��[ǜ�	;�4���!�+,�
^Y%0v��f�f

ᣬK���U9�V�~�&�Ѳgq����ѭ��P	��]��3�k��A؜���XH��z.-��@�
��}�~v
�)�P�W�)�D;����d��h�T��݊e���FPN�u^G�&�x� h�-������X̎8�Jy�4��1�����{����d�_6}ˇt�	�'_q���O���Ł�/�8�gV�u�x�j%9)ƕ�|�m���3��f'w�&�5�
l�{q���d���ٓ4��� �2����n�#���Ϻ6ms��
�)��Ga��W{?��ޟ��R�1U>���j���i;5Y�F���@�6!�/%���N���js h_6	L���s�O��ؗ̀��t���2����0�E�/�}��&A�nM�tz��Ky�;�@`)�D�,��.��A�S*�J������G��
���q*�:��6=����F$+�ɻ/�,n�_U�T|]e�\�V����B���e�
�j�J��;|�_`��|�-k��|�s��ꤏ���:&���R�ކV�Q�Z�J�e6�d��nXwv���c�AFB"�m�[�ܤ���qp,��K��� �ҹ���Ɨ�(T�PV�H>����� ��j��HYDl�Q�/{���u(@<�׻�ۯ߾�}���yv������-�'ׅHi��o�1}д���[��Z!N4�pSK%�N47�*��~��[a��8���^�$u�cs��|γwh4r+*V�K��\��[�ҳp��Tj�a���	]F�w+�
1fԵ��V<h�H>�٘��W���A�C�4�>���L������'�"�N�?4e@p��C�,���:����Q'X'{��Q��/=������0�T�R)=[`�̎M�ҹ~�z2�a�<�2������s�Ƅ��K�K(�IEƗ������c`�,0Ly*���3ZV��)�&��QW\�zYWiv�{�>kQ��N�-I�\�z�
�^z�쉏!�g)\�W�i&ch�*����Í�Пh��nH�D�"	��]����Y��D��s��]K�7c�ϗ����̶������'��c���8����}�Ί�<֋��`~�뢚���k�MH�o�<��#��ul�+x:�v=aW�+�{��h�%�W+s*w"8�h��)ZX�E���!W���-z|o�_ۙaC�V��X�R�Q%g��p��r/gems/gems/rake-13.0.6/lib/rake/multi_task.rb000064400000000531150403134150014263 0ustar008�]�n�B&��N����c����_]HN9��(e�����YL-�*�gaE�,��[A$�w���ZR&9�O�!��������O4�DX�X;�9�C�@hdr��Z.�U�З^�:G#�D�m��������R�"�0*EC��Z���(�+���a��Ek!�-����bN3l�v��>x����y��f��e��&�2��6�&�K=�|Q�r�6Y�:S�z�y~~�"�\I$Aٖ�s��e��O�B�F�r(����jA�C�5��s6.v���:�����9�p&Ĕz����R�
�C���눝
E�RP1W��<q|�Ugems/gems/rake-13.0.6/lib/rake/ext/string.rb000064400000013562150403134150014225 0ustar00�)��(�m�q�mJ\�|�
����/H�RuK��X�/�_5�:H��$�<e��T��g��<�"��Sn��[�o���[�|�,m����qx��G��q�\^�8��}w������[�朔Œ��M�\�='l�`�r�����^b��d0��q[��C��'5�C��*�_&�����Wx��yeOΧ�)�i�Ӽ`"�jU@�pj`��]y���ޒ�b�{�N��p{��Gv����|Lݑ((�0[�Ot&2ӱP�`7M�32[�5c����Qe���;�������#�D#���]#�??v�q9c���¥cnD�Th��p*۫���܎R�Tq�%�>�l��2S�0�
��%:��v��7�P8J*C
��ó!Gԇ���eJζɰ7�,X�y5�)[#�$�W2�M?*�Ct�I�guQ.:{&L�q+����
��n:>#+��I�$�tŗ�Z�xd�b� ��m/�U!��2}`�.v�[
uuk�a#'Þ
C0��c4�9p�{&�6�'8ҭ"@iΊc��wv�6���Xg�Z����ؒ׵rK�qw�g��E��u�c�U�L����0����A�]�Qـt��+� Q��X��h���L8��' �� dª��Q�D��I�
�Kt�°��Rn嗖���ϑ�!��.)��o�����U���|DY�r)Y��7��jɸq�� �ϒ$k�|P,Ӑ��M��"㊾��~��(E�"&�)eXu�.I����5˝\��wK�{K&)��N�V(K����s���Wx.�vJ�.��8��8�eN�,C���c�m�{��dv�LL�}"Qe{����Nf]][���R��i"�4��,sFUNTah��@�,�!�L٩&�PcЖ���W@�U�
�.ِ�(����X�ҌN�
��.ł��C�d&M0م��r:��.$*����;s���A!��\��AF�ZKŁ���94��h��PQ
�ch��E"v�"1}j4Ch��'R�W/W�*��&��K��S��|����7�"b(���<�"٧��,E3��{��@���wI�I�x@>��T��r�Tziǟ�`I�^[�]�Ƒ�tQ����=+����`+<���B�(���%bV}��'��謼.����9�a�.��U�ϹD^KހԕEL�@',+�o�ἇ�Q��X�����l&$�N	)�O�v�[��6Y�{Fpf�aL��E͵D�b�xW牾4u�+Q���w��)��`��r�H��;[�d��Ab7�� \��2T�����fZ]��r	�|��h4��Lϡ�S,�6߂o+���I��)7����e�W�� c�tR��VA㣓�e�Ur�Ϭ(8�y˓ո��t�Ce2Ic�dI
���:(�,1�8�yq����5�E�‡�q^S���`ng-1�}T�F/�����S�_�SKD~�Hm����HR?P�ɐX�CH<�w�ii�����E�x?��48nC�خ�0�����P�{��A�3�0��WdDH�*���K�%7��b���
�1� ��q(~�ޝo�e]����O�����|�wH^ÕZ��l����d�������&�-�в���YR,R�}��A��~���{��
ǣA�9c�e� WEu�r�H���ק��|��C6e�2��p���#�7s,���PLDý�ݘ�B{�M}��fAe`aC�����~Y��+�xc�\�]����h�>�wP���u��;خ20Xo��T��o�M����fSVL��^���7e͑0MzR؃���y����\+�7K�JMfeee�=48n����C\�֔�ùYI屌�<��ȍ��[/��v#W��w�=:��,%:
ذ��SÅ���A�?�+��H�݋kƚ�T\��l�w�t~�=|�y��i�9�=������_��V��8�$3M�v�jZ'�dH2��5���BD�1�D�f�K�,��o����2�~��D�)UwU������g|p>
�a͟�R��"E�Ɲ[�x&�P9�x��\�6=�-vJn9��
�<x�@:&'dHM�*�r��c�̣�K��8��ȏ1�\[4l��l�Kv��i�?t�b,�V���x)�}����#T׳.��r�Z[�8ҙ'���H[��MV�Y��v��̳�_�H1�VX�(�ͱp�9K�:�G.�$�Yc����>���
D�+�x�{��8��$��I��؅�"y[�����TO��:��u)�O�X4��p���{)����7|!,�0P�-O�.�A(����N��?���KOm����U�V�!�79�s�*�N� ���?�����]�B�����B/�G`�0��P�"���������0Y�uX�ȚNF�ˑ��T��K���9]��pO��Іއ��zHq3+_Y/���kHZe}w�r����L]����BG�'��r����W�tаM��rh�$�e~��I;��8��V^m�޲��/|�)�F!zy�5zE� .�g�Tv>!�2B螥`=Y�ɓ\�16V��w�4\vD��?[�ӟf����vٯ�n���O�b�*�#��'t�ڒ�W
:�}�a�j��J��C�vp����ρ�k��R�tN�q�%�鈪�k���YM�lV��*�%Ha��^)A�ݲ���#۝@kԥ��C[��K�
8fv���s���w	��cᛞ[Bm,��.Fi"��w���y��7����U�T�^R�G:����Px�p0���$�%d[x��|<�@^��C�|%6��D�h���_a֦sA	:
̂�Vy�0��d�m����b�9����T��ˆ`��B����&�]�E�w�W�{��0U�
�΂�L����{�0�2�(c��0����e�DA
�nypc���#v�/��(\7&O"��u��˕�)����BQurZ��šHmL��y!�~c�v�����Npni4�='�q�(��,�|5�rʷ��ϼ�%vTA���Z�]p]XoJ����)}�V)�N�)V^�?:DF*��jؕ]�Yմ\�’6a0�4�X`�v���8��mVs��*��ޢ�h��BS�gG0���ĕS��U$z��s9�����s,q�SEHQdF��Cg���aiK0��"�ɂ�A��Mx�*����[�W��C�����5K�-)ʄX�~GDQ�8����@�;�����(s���"�`+��?G���d;�a�-7�_B�=�.5�]�N�aynh��l]	u���7|N���dnH	�ms�GE��K��V(X��$/�kGق����՜Xw����T�'P����?
]$��y���8�્�� xG� 5���0�bƭ���aw@�FP��<l�\��s�9��su+��(�Na笜��u��4eǵ�H�s��ظB6���Qq��TODWr$9(�WV�G�"fD"�67��ˏ7�ߥ)�f�O�����y�G��zY���9I����HG?A*�|z~��K���Hh{!u�YdM&%�+j�t���>`�`aTc��u)xv2ׅgu������iig�R��H�1E�d��V/ý�r%{�E�ƅC�N
���>=C�.~��C*#(Ѣ��Xt��$FT�*0e[A3k�0���~��řYԯ���.�Z�V��M�-�Z���t��;t��u�N�q
��z�8܉?���@I�b"���[�m�>X#f1zu�����8�U��;���lzj��]���E~N���$�[���\�N
?d��Az���&�q���W�~J5(c���`}}=�����7x{#?�]A��h�VgW{\
WL�ً�"/�3�=/���1g���/̎
?ix��1��>�W1�]�����߷�o�t�(6��U8�}����<�����\]y��?V766��V?��WV7��u��g,�O&��,�S��z�O�_�ߢ��vXC���.��‚]�b�YP��>�[��Uua���~�̱��+@%TzȘJh��/�;ǟA&��ӊQ
�3��{*qs5읍�a:�8'.�-��B�M�n�{���5�D6H��zo/8D\s�VtR�A��
���-�%�L��-�xs�x����įi]�EzQ��~��)l�\b���v�Ӻ%�b0s���	Z�܋�|�;��m���ʣ�G>���zG���T=�E7��`Vp!`&��E`UΥ*����"�uZ	�r��K	�.
�D��
6l�(׻K�U#��l��+�*�D��n�Pu�=.,x��R���YE�ŸM`��?��ID��_��8�kx���p����
��b�5��!�DS���p' iIe2y�c�́m�2��A����}�{�y�sx����}����1�s
��e1c�5����M�T�2@���ʩ"唁Z49�W6@3�0��Ӱ���$�K%��4n^�d��d�xk2>Y���?��A��Z����F�{h$CΕ@3a3Ƅuef��qEZ#`�㸥�H������r�d��Rt,k�Nzk�V���Y�[���E��m �h��Z�V
?�б�a�]�՜]oku��8�.jߵ������Ջt+޾[�'ɂH5�l�辤E��s�x,@�~��`v���2����5l4�!���>�hhnbU1iBSd	�l�:9�* ��֓�Jp�Zj��`8�l�^^�P�|{�\%��ͬ�RU4��Q�_�U���:i�0!;��w��2xխ*�����>��u��E��N��T�q��>�H��Ajq
�x���o'~�Z�J��(�?{���6�$
�g�
�<Ӗ����n%nǝ(?��Yۙ�YۣP%1�-$uq�o�
	� %gһ}��>g'Q(�
��BUA�ڲ0� ��ػ���\d�k��t��mS%@��RXu�?�����?�=��C�$i�\�M8��F�4! �pң�@;7]\��;g%oߝ���^��{�����7g��̳�֫�7�޽�����?�;����{��N�^���'�m��7�Fpl�w��T���	��?z���7�f��]�ڨ�cd}��)�L|˂�x�S�;�ٱ�e�S���j�����Y-�c��O�����o�^/���_�鯳�y?���B��'�f�@���)#Y��ª��ӡل��
[~
�z���A�����Y<,����G�2��eU5Q��3��{��IV)H{۟FU��F�+�X��b�m��;�
��P��czv��_H� 7q��!���#+�1~��K�Ϩa����[D�p��<���n,O5�>q3tܔ漥�9��Er?ƛ�lՐ��;yq7�8��t.k
_�o#.����?�;��;���`�џ�?<���z�q��M����Lz	RS�`SS\l���-�B��c��>a�2�/�X��>^��[�=�-|�h����
���<2 ��M�"��ySy����3�d�P�7�#�
��E�Y�V�����irgJ�w�3�J7�7��™a�[�颭�R3Ou��d�Y��Q�����c7N9ʶ�%E`mG���:̲�Ւxv����%�λ��l�K-
v�	M�@(5��E�W��wcC�'�>��≙�:Ms!6�(��D,�+4�Z���ז��S�E:Bpf��=P�@�����&�X�N�D{�R|H���QHK�j���/7�S绠J�8r�Oo3}�K! ��q�f�K����`�ӏ`���f������r(�c���h�^�gO�JD�u%�K�&-6*=e�x�,�x�%���Q�^B�F/A�3��!{L�g�0 ����Q��ϭq��*m�G��9�5��.����yx���F�"�uu:��k�K�鋶9�!P�����t�(`�Tc��b��<),l�����q��Mgems/gems/rake-13.0.6/lib/rake/ext/core.rb000064400000001234150403134150013640 0ustar003�7J�Ei<7�K����[y����Md�4�e�Ǐ�4g&e:�B6XA
�9M]_!�iR�V���5ޔ*
���<�ʆz�rA�od|����/Mg�t��
>����O*��ܠ�Z#Mw�vC���f����/(�@ă�IFj�x��Y�v�:[�:0HP������cp�	���u�+��s*(�Ԋ1�(
"
�S�F2�)Kd@���U�Ԋ�7.^$�{8KA��b<S,�{[Q8V�Q��d�����e$�\�0�U��qc��WJ9�3�C�=��r����]�
�Rï稉�:I��a�'8KL8�V�BTQ�e"IU*I�zZE�M�*WJKS��d��b.C��n'���Z,*'s�C��\����3�e����%י�,��:�H;�Gäz�X�`$��ѨV�A�FF�U���M�%J��AM�܁�X�k��J���T;;Ú�� 0�Y8R�y��#U�y�:��ɔ9�0/s5�ȇ�L��5ց�;2�Q0���2
k,�����'H�HTa�F���lqgb�L�^���#{wO�Tw�F�ݲ˞�a~*7G���t^8A���(
dwV�ΰ�|Q;��� Ќ�JM�H'��j�/(�Lt#�l��[��Ljg��㌲�S/�;X,�e��!KU�gems/gems/rake-13.0.6/lib/rake/thread_pool.rb000064400000011265150403134150014415 0ustar00gems/gems/rake-13.0.6/lib/rake/multi_task.rb000064400000000531150403134150014263 0ustar00,F+[�.��.�<NY�<��� �1�x�7`c�3p||���y�E���J\���n�\>u$�7�}�FY4}>|X���h��r0��hR��n|�l\��c��1Y徇|6^��`R%�`�oH��oWu��_ī���T-؟��`��
�Xy��8e�A��A�
@�1e��SN6u1���Q*�^�CL5c�Β ��%�c�°x�u"�s�՚�]��z
���DU7��\wk��#�I��Jk
K��A�eH��%��
���h�)�Ѱ�jmܲ��S�cA���ɧz_�(sqE������x#�{꘼��X	S贈Xu0����gems/gems/rake-13.0.6/lib/rake/ext/string.rb000064400000013562150403134150014225 0ustar00뮱�(���`�O�5�	�4�V����}�1b�w+F,���Γ�Ib�;�0CG(�ݝ�0�a����ք��|$ŏ�Џ���T���Q'P��Q�NK��a+��LINb'm�3��Wq�p�����|�TLQ����:/��6��_qW�
��&�/��\�,��H)Kd�J.+�k�w���Ǖ���
�l���~��'�h�=	kbb�n
��Dن��.���|�O��
���s�,���`���_{uQ�C�\_��FU�(�j�&�6�1�����)<0KNBg��N�N�?\CG(�θ~����$�����H�`��;,ŝR�vs�!�a��}5}T֓��TfeO�a�x�[
��Tg�y�i'�\pD,3��W�^�։����LY�6�_Ʊ�U����G�F^X7ĸ��`�X�Hq=���R#�8��a��3�A�O�Ѣv��7[ͼ=��m|���Q;�oG�jd�Բ���$qW�T��uɉA�X-"����|U\L��/N�>X�@5����l�qF���i�E@"�V�jݩ�G �}<���B��
�H2��4W�~�E�-�~`�v��d�*�#L�=�@;f�
$v߹���YV+��k�+l���rH��z�Cv!@7���+��A�wl��H5���5Ʋ���G�Uv�3r��|�*r���n��hJ��A��'�Ǚ�\��]R�4�j��	�v�s��@+n���S����0��Ph��8�9���hF�dPC�z�sWz3Uij0�g�	0���u�T+KP���ɨ�y���K�R�D��Y��R�`�\q20�~���=*|�b���+�9�9�v0�pZ�7\�� Q��5�j����G�&�H�9)��U$�A�P|�z�Ø<�)]���.Q���Y|lg�	'"5U'���_�Ut���7�k��M�L��s�|eW�i�Xu=�843(����ٝ*�u?V�`;�G8��\9%��F��>tK�V�Y:*��%�Ն�DqqL9o8Ռ��l}���j&ߴ>��TB������A�
.i�k7#zH��p�`:\ p�j�R��N+N]M;O��j	��uábeI��*��y��;���R��{�[�5��S5��'�6@�Y}��*�R�V·���nP�@�
�z�B���
t��2�1�ȭnP;2G�@�Lu�lK3
P�`\+lMoFID	^��J�v?��ӵ� �TkRu�o�
R
u�A�5N��ʯ�jHEI�#�H�Nor���W�1�f�g*���\>"���Hq�I�#��j�:�ң���PTb���#V��]İ�k N㵙y<�YY��&w�x�� �JA�]���ʰq-���o���յJ̸���,/-���j
N��i��E��/I���ԓ�ȹ6G��̥��\�V�i�H���^d!�W��Oob7���IY�"g3y�U��ᠸc�N�D�X?�*8�3��H���c�l���G}��7}-آ&uB:���g�v��\�g�A�9q����E]�ȜZ�S�2�������|��S}�z�^�W�gF�Mn{H�S�3�6�B3�*Qh��kԀ������
J6�g�(g�D5��=5SS��a���Ǜ;��ɖ>�j�f�!
�L�K5b�D-�k����%ވ`��jW�,q��\5sE��f���$�B�+!K
V� �S�jH��9Pl�q�6=
&˕Y5���#�����2w8�@�G*�ZVo���a�ܜ͖�H���:��3�9[f+�g��<ˋ0>�B�;�7ʠl��b<
�2�`�v��4D�Ff/,�9k��X�\�;�>�J(滋��0�8�H�ש�Ñ��o>v�C����p�C(�J͸K��|X{A0W�i����Q�Rs��
�-0O��1�B�t��y�vW��q���~�!f�,�����)V�����)&N��B5r��d2��ghi�M;�ܺ(�QM�'f�2l-��̏��>�d)�s2�}�5�UqA)��>*0��G	&0�_��PPNդ)��EPk��,C�"�G�d�v�P}qrM��H����KA�+�i�w�
��5V������US�j���S5��b�勦�z�Pr�[����kԃ��z���w��U��W���2�*�h�Z���Q!ˤ6��9t��R[��|����$� �#(�i��Y�^#�u=�M���|1����L]�z駰�?�`:1=#�ҩ�
@��9��uߴ��3Z^��4��.K���u�SgyY�O�Tmqǡɕݰ��a��T�_�Ro'�ӎ���ǣ:�=���y9�ɸKU�^��J�"�C^E���.�U�|�r�dx�+���J���޹��멶e
m@�鲾_�m&Q�Eu�~O뺘�y��o5(��`Y�˫�_T�F�;�l�h˨�Ű����˒�>���vB�_E�axle/V8OQ�8�rC�X�u'��q)B�>C�L�T'W��X�ي�O��;�W\����8D��LQ�7�*�2����qʗ~�M1���'�V���;�ֆ�y�+�)�?��2u���GJ6��HgRc��9y������?�l'��z;���v2�=�����y����wv=������>����`g�?����	 {te߯�[U���6�q}r�~�%^8��$�ߵ�J���7�^�ѵ,�段�t���[�_���ߘ��ݽ�k��������om�o��ŀ�h��!@ƒ9
�t��}0�
��.�S A8�7�n�5@�2Z��-����OhҺ�f	Y��`-�l�2�����7�;O����om,�£1�B�Q�wj˱8�[�Ʊޝ�"d���(�d;�eL������m�c�$n6K�*�޲!�ڳ��|�:4�лQjA��;F�L��*���hf
���U�y�S�5I��[��ݛ̘O��EV6e�*�L��'Y�s����6�ٵ��3ZH:v|��k�
\��rRY�Mu$c's|����`Ԏ�?��$!����)\"�L])�%\d8H%d>h��Ȯ
��X`���b��
�6	�dmI�B�!����u:1L�� (�M�n�Ց;�`�is���6�>�Р�����#ghh���?K��"�'sԍ���?�8z���{�w��N�������sIie�q|b��-�NOON��om�	��6���{�>�MXV1	O�Hp��^nZ��kgems/gems/rake-13.0.6/lib/rake/testtask.rb000064400000012303150403134150013751 0ustar00'WBz��P!���B�?{����!1��	���
�xve�A-3�V?m�45����@|��Z̍D�45 �����я@%i<�SNC-Y�/G�XlC�U���@�h���b�r4�2�O9����>-n�A��6m/�;�M��V	l���_%�=�d$ej}��_ƾ����Hb����yH\Sn�������y��y���o{
lFLY,�۠3K|�T9jHH�x�S���8�\y��b�6eC	���8�n��c��	"ȫޛ_�_6��tEh�=ɦ�?kkS��i���X��1C�̛����H�O��o�N����{���
�-�ҍ[{ye1����a�0W/�����'�ѹ�aY�A���@��,��>;�խܔ��R�RՀ\�j��}�Qh���t����i��8=��	J�m��'��7��H��<��-y~m�N��֗���E�_vH%�E*�'�J9����bY�P7�������`����%���ޟ�(��p�m���s�k����4�s�y�D�;��fsf/W�p
r��l�m�n��p+���7f.�F
v�=�r�A�e\9�T,�-��}»+>H��'OHY�;��='�.�,��%��%S�闓eI?�V��	��s��˦8U{��E5�S@0-]������J;���s�W��$�N��Rar`�|F:��ciL9Q
L��ZX.f@M�ymL9�~�',W��>Pu�%l�1�t;�#���E�<��f��qK�e�G�>��2h�j��B�#��
�*�"��{��6բ|ț֋���uq78
GW]�v�X�^w��L2�#+�d�M���q�������-���Fl-J%�#7bH�����#[��h�L�{}���V�n	�`����Z�}g�#�[�o5�5��:�e۶��l�pt�}��軆UH]l���.�"s	$�$7�"��p:���cnAQ���+S����!�����m[{;��΃+���l���Q��vC�DA�|��c�K�G�+lj7n�!���wW�Q�PeR�is������43��"��1��wV�V��GI��4K�[Œ�}M��,�;&5�f�2lH5�/��[a3��=�'	��ض�`�Z����=8�h���3o|�/�
(�hIF�`y��q��������la���N��ҔȰE��Z0�V�*�Q�k#�R�Q8^X_��T`��HZ�BU�`م�Qp��5v��U�ش�xLF��T�GY��Zʠ����I�������,�*� ��[�B�چ/�8��������@Co�Q��]i7��/�	~,��F�.k[��l�C��z�>�������ǣжZjF����p�Z����ު�xcƇgف�h���bǜ��o��º_���1��ٓ���^�w��Oɢg�-lxҔ����ʳ��s�7w^������?�?|�����h(���u�f����‘�á� `�l����gpT�u|��Q�[���NO��&y�d�5
[x�
Zދ3���
��m��Eټ�z������Qi)(������vq���L���:�� v�EV��!�/��>��s�-Ո�u�8Z�1u���kf7��7�F�-�gU�Q�r��<�~��U�������?邋��w�z��h�5׌�w/^�N�g��S��w�&�Y8�9}+��{Q[���2�v>���X�V�"M��Ұ9;b�ܴ�W
�X�(�|��e�;�H�_�9�d�n4-s���"���$�[U:�U�jROؖ�O��?}�����~+I`�����C���p���y��b|%�VdY���xR�c0�������(~*�x��� �o}����gems/gems/rake-13.0.6/lib/rake/ext/core.rb000064400000001234150403134150013640 0ustar00�?AnZL�x�M��R�u�Ɩz���gl{�n@�O^�����6��!<��tw���C'Q�q�b6�ef�NFxm�������;y�'�I��	���|�<*�}/w��l6/�u�xܾ�߂_Bf&<?�[�
�܆´�z�s�q��q�}yqyuxpu�����y~|��Lv�K��2����P�Ÿ��ߏ^��a�F�q~��W�u��E�2Կ��.�k�3o�־��\s�3a�mq��M�r���j�Z��a�n�ê�����1��U���_�+�ޛJ���e\��q�`X_���5���l�܊<Fcd�`*�wt~~z�˻�^��ˣSZ����.�;;����r�h�j���)[?�|[��zu���nm~V���U>�=�py�b��X��ޯ�^��a�G�{�<ECu���#�=���5`���n[��2b�L�����ˊF����Q���{�z9%������������D���7�����=},�o�֎^G�;��N�4Q)ʅ�t�/�e��ޖ���/X+G(�U�ң҂)
��r\����ˁ��FT�	a�4� *���!1j|�lo��}��������������E@��΃�?<z�KΡ��WGǸu���y�z'��ɩw�t�U
��_4�����F[�gems/gems/rake-13.0.6/lib/rake/thread_pool.rb000064400000011265150403134150014415 0ustar00W1犸*y9�?����K�w}!;a=��U&Kԋ�x�aF���/|e�h��F�}�@9��/̎�d$Զ̚D�������|^X�3�V�&�2�w̼��ծ�n�Q�Vi�AvݭX��?����P-nJ�tQ�2����b뮚w�fw��	q�G�h�z��e�y���p*
lbUV7��t*5�2�Q���[98vwž�1��,�/
ՄYe�M�RSe��u��^�������2��|`�bں���\I��Wa<U���6���#J1w�P��V�Q��IdŘ�_�1Kc!����Ʒ���/����~�>�D����avj�Dݲ���	�G���� �2hy�nɭA���U�ɇ����/���/NN;:}��.m]�`z:�6����I?�O>�
fKa��l�<�L��DG�T ��y�Ps�d�C���ˣ޴�bIl�EY1խ���im�d�m��݄sEH�+���C���ӁEư�$k[�G�#~�L���13��Ȭ���Y/�A`V��&O"�M����T
��t�Q��E�7��J�ֺ�ta^z�@�y2,^��]����7g�^��t
cƀQ U��vC���Ps!���bJU�_N����jI)��֞ax~򦷆2�2I��0c[�T�D�v�ׇ���;�p,"�N;�l����:�dΤp�)|�j!g�OUؠO����Y�Yv�� ����;o� 1�\�l5������c��<E�7G}.�'E���nP���Wz��ޜ.�*i��0�/�~�x賆)�Hf��K��k��W������T��ˮ�%�(�q����;�uٴ[�m�qy��P�aU�ab�["��ɺ�|�9:,�d���k�d@b�HC'�K���x~
�۲~�L#S2��uiPױ��Bߴ�#7'�b~�,qBvy*�!��2���
N�bF�.�C-�@�#�N�/Xʐk׍-��L�h�C�΄E
��GK=	��p�`bK�.��H�q.��zo�,�p@Y��L�7�b���t����d.<�'��\y^p�0������B�:s�=r}o�>ڈ~�8㌒UJ�O�#����7�r����Uf�t(;��m��뎔��X��/q~�\��Wڥ-@��m��
ZR�\.����!���{�_ѝz��՗��2�p�b��*2Sl��i
aXZD���%�yŀ6��k<*Y�W'���%6gems/gems/rake-13.0.6/lib/rake/trace_output.rb000064400000001077150403134150014633 0ustar00����gt@�(�d�WܲJ��Hs��>,9��)�"6ðlSߩ�F�=P�5�ª�
̼�܆�b���z(�uۚ>S����Ŋ�Tw�k۝�+�!q�#f�� hos��o�GJ�N�eFk�#=��&��%���L(�A#���+�k�֤f�v}�YqXe7,�B����%E����45Y�L��P2<|�0�U��@����������=����9�O	��
\�r/��{�J<,��Lp��!H�aI^U�����$t���Z��V�v�?V�����0��6@b��G�*\�A��T��(	�n]��-9R�^�Uc�fU8�������*}�����gz�9��"7%��j�=��I��a����m�^]8��H�R#[ʨK�-�쪝�]�.WI��&{�ѢHP���Q|Cm7ي��Aȧ�S͢k,K�R�����/���܃�}Jj�or�ѐ����TA��α�s�����Ҹ���ܶ�
�5���s�{<u.�k[��_�-kS-*Z�S�
�u��ϊ���|��G��7
�_/�'��Z�χ�y����jgems/gems/rake-13.0.6/lib/rake/task.rb000064400000031367150403134150013064 0ustar00^�gZ@X�:zUuk�֕k���'@�2�wF��Ň�%�Ѽm�9+��YG�`H��3�4;@q茄��zN�
�;���1��q���'G�0�'�܅�mYI���eI��v��2�)�V"c'����k4��&,�O�c=��x9B
��
�a����:��L�[i�S#���U���ϒ�L�GI��/E\��+DڶvZ_E�&w���
���(�-����R�C%��7�˂^�K$j��!��<M�[*�GCa(0&	����	�x���%�r�͜��@���M��t<�"
lA=��B4��ϡ6k�4u�<i�r|���\����|�m*i�]�y�c�@�<�Օv��R�kT�&[
!�T�1�ӟMH��w���&�������V�(��h�n���)$
`+ҝ�0��`�#v�Cr�3J?�;yd�܅�5q�:�EQ������TJz5�.l�N�ܺv��R]��F
�ײ�$�LP��H
�(\�^�/�D��
]�Y��)�x44��y�_U���śn�gt���衡�f��L����?^*9�]\I^_��l,5��!�q�{��U6�<Ϛ�庢��g��>̭�za��5�2y��U��ԑbdʫt�j$�6y�Dg�6+�$
�3\c�]��+��V�BB��R5�|�A�W'#6.|yǕ�(��Gu��yE�`���6.۷�(�*8֋��W��Dy�
�*Q�]�qU�r}Ez��Hb��Զ�oX-F��	,zbpLL�����-Y�񱆭�/��go���F��-��v+��b5	1�dyquqse51b[��C-I�|^�w��ػb�I��ڔ<>��^N�Q$A�/���m�΃+��.���}��n�\p��2���3���C#3
S���S�ye���҇7��`|�O9lu0��HJ�����i�!��"�u_>5+�6u��9��[f	nŊ�Ҳ��ttx�[+g\�>��hN��9�3*CT����+�<ՉR	>�r_�ҊG����z�-���6o��h
���1�D4>l*
��4ϒVH4.�C�@�O�c=�K!@�l(O+@W��[��>�Z�ה���L8S��I;.��+)gJ�xj�]+�zO/bIx�h!�W�PfIn�Dg�6ޝ�#8JFn�XЅyE�(m��G[�*��)���IJ��ܜ���vq�T��S�gܛ����m(sgems/gems/rake-13.0.6/lib/rake/testtask.rb000064400000012303150403134150013751 0ustar00�s��G�
��G������
O�a��Y�{���=;=~{N8]����M&n�h�������{@��^�{���D��ō��Q�&� �yP���j �ܶ�X�\�ͦܰ'�E�<dWD���2�I�p��"/���B������Qp!o!A�h6���I�<$��t�y���<'���*�$�8�ʍVU9��:;�<y��~�W7D&�W�7���$���3Ր��ύ��ގ߼}w�p,�.���h��G�/9�K��&�^�[%�=��{����)���M�Y�$Jk�g-kog������k�O׷^���Ó��O'��0
~�(gFa���3��qAuj�]�����f7>zU�]�6�3ץ�W��zo�zx�N�,N���&�F�d�/RO�y�t�mI�E�Fi�T9��0>|,��A�d�,�%rɒ�?�<v���X�7�*��BC��)Z���
�hB!g�8�.1�8��D�� AUu�y�ܰ�jr%�?pY�=�FC���%Lc ���&��`��V=��*�̝R��py�Vp�W�͇�^3�N�hp�$,ɨ����IT�>Y`����I`E��5��<�_؈87��7C?O��N`�э����f}A�i\t���Q���\0wN���m�\;�&!m�+o�ڄ�PX�;m�LΆ9۝�B�p�S��>�0g%��$�7ħd#����إ������2ѿ��bE���%GA��j)�^7�F�{�3�@�<'ۚM��;JN!��vz�@����w�[5Z�`�z#�R����"`��o��z$����_�Dܘ�&=��-��	w�E��O�Q�a+u��.?Q����c�M	�zP�8���jC�:w
;"����,��ei��؏��F�5�����V�v4���E@D]��s�C�rTl�3ؔ
��t�]�aGxgIo�o	I5���W�೛0s��;����'�,q��—@^�|�ɀ�XNn��[I�F�6������:9�Ga_��ߝ�ή�Y�}ܐE}޲��x�m��E��g"*Y���ۗv3��fhn�%��	'�J�o�<Tyٻ�r&8Ʊ����"�S�Җ��s��h�ZD��_A��fӪ�]E��O;Ֆ��q�&��.��yEc�y:]�[�� �A��Q����}����E^�i���Z���z�<@|��6	xA*=MG)5�b��niFd�,�P�ܐ_'[1�lj�9+��n����-�nH�!b��Ln���5���
�����e�~�Dh���畆�>JA�px���6X���UI�E/�T/"i�����|fi<z��I�L<쟊WN��R�[�F�!?�R��.#�Y�C�jņ�U�]u��7'�����ϏO��g��^n�;������G ���3�ڟ��\�������ݝ�������?|��r!OW.ܑ�Q�=���.<�C�ip��
�2�����u%u�g�>I�֑���F}~܇C)MY�;�7�()TB2ǣ{4�-�z+r�ە����
�γC�7�Oo�-C�J6�
�U����_�B��S���d��/J(B�nҤ�{5hD�O��;�����h\ts���]��_�"�-?F���e��Q�>oϢ�f8^#���j��6���E��=a������.��zp�����I@���=��職§)��-|���T	���(8�xg��|�~2d+�>.��\$g��Bt�Id�,Һ;)YuX�6G��� %4�����@��10,�f�@y�b�f(MF?��!yX��$�3��w�p��e~:VDK-��uFW�2E���0�m�K��"'0 pv�(hYBr��suWEx�M]�r�a��v�gM���Z}A��x��b�e���{�>믲���K����PX�1��MG�&�W�1:#�rl�I�KL�O�)�@���	�J�*Uc���±�(�����h��kl�*�p��������
S�_}��ٽ:�?���
`�Z*6pw��$(�Q��3�}y���h�����}|��]}�iQE�c?~;`%���l��_��@g�h��ݭG�VsA�-��/��+���7���N��m����k+HE��d#wv,۶ƣ�X�����$��|�v�I����^<��c��+�2��'Z5c�g�>�wl��ߵ�~��Oj�'hq�Ᏽ���O���������nل��-uj���<B|\�[�r��CQh��������	#��������ɋ���W�N~�=�ng�ᯋ&���݌�)f���q⺟\����[P���>���S��vU�18�ǘj�y�51.�%{���&S���]���!S�����R���Y�P�L9�%���y5�l.��n�#�̕`�w-x	��������{i�����<<�	%�i������hDo��c���AJ6$z���;!5]l��]d0�Z�`�iͽgR�Lb��S���K��$v%�xM�+�4���cy��>;��w�pɭ�2�|�i���������QLa}���jXs��Xࠩ�cz���M������S���X/`x�,f��B���҅����g��3CpF�篢(Nso�F�m޿��q�X�H\*�kX[���'��xug��[0��{��.��K䕓C>�f�F#�Z`{8c��7�)/�����e��-�ʻ���X4�k�S���]��֖8w;'[kW��}o��*3>��q����F�v�R�h��UB��Cw{{�X؋}���e�t;��>�vRw���f��I�I�Pt���(�s���Eה�j�*m|->>U���
K�t���QuU�ן�z��92we%�h��&�\���㣏�Mr,�"��&�����G~��t��{eg2�%6퐫%Y�:<�?`�ۃx@�ח�UD�y��'���vr��]ߛxr�	Neѓm?�s8��}qr�������������P�)��$��e�CXg�O�h�h��S�*�ț��j�4W��3�̊���8��u�YCl�nT��O,�[|���W��XL�
�f�$	Ì=�>�k��LU�D#�����S�kˊ��b�Y�ެ�
�!i���
C9�H�~�g��r��^M���f�R���~
�����"�[r�i	^$���4��m�!�'<�湉�����j��蔮�ON1����1��UT#���d,Һ9�"�Y�it-7��y�T��Y��X[j��]�E�!s"_�oL[1��m�,v4�Tq�_��Z{{zr~bl�J�Ծ��>s3P �r���K�Ζ�'Ls��pXn��i<{e�óW[򩂏K=��UIB(�t[��mqH��U�?ֱI~�-z��.��i�,�I��%�J[&l��}�`��<�ܻ��kz�rl�k� Q`��Z�s\��Aj��uPܳ[kt�%�fWF����A)U�U��WMX��o[�7�Vke����)��!�Z��`$}�u��q	��wg��ѯ�ǭ�e��z
�k&*�W�����<��N�V-E%2|� G�85�Q��5����Y����
�(p��,�ʐmai���+�k�(��kz�?y�����+Q�]�IV������t�b8�94#ʶ6hIVн�a��;=�{�z罒p~��Ҷ!��0�oއ_{窡��1�&�;���$��=�-+�(�� �����R'8�A?ʝ��ߺ���MfN^x]5
�;L�K?X�S�C��;t�>�x)^1	�{L�;����!C�C΁�,��aV��~�.�{��,�X�.�j�)�Y��	�uFAs[Q�%qe�i6��.F����.ԺgUiV]F(�U[��R�r]��yz~�L��c/d��/���衭��0�%�"?�=7�]
_h
��LJhC���ϭ`�I�8$���m3͞'����{�2���Ӡ����luԪdv0�I.���R#�/ K�Q��0�L�:m�I��J���K|AU�H�2wS���"j;`Q_��R6RR�f��S����pi����汍��궻��nu9/4|�%Y��wYG*�U�@�yNu�t��Y�r`������oǽ�ˣ��-�#�,�13oS����%��Z�R�so]Qᠴ���qeF���N\�������S��l���y8�M�-��2R)�Oi�
/�k�H��+4�I
��ɵ���G�4�r�v�x�r9MM�༟��ߎ�_6��7���K���٨���:�#�S�C�>�ի��F�i��E�`O�#�Z
Ci[�v�90_[ы�TeC�L+�����p�
����x+�/��䏍�x�1P9(����V�%8�T�P���jst�sUۑ0��z@��ȟ3G�V9�H��HF�(.����Ֆ"��)��sϟ�8�����`��!��&�#N?Μ�@V$��'m�ak�O�¹WM�nEj9�{{ґ]"X9���j�HT
x��_��Ĝ�]�gFʒH �XK�q,%u*;�9����k)�'�*�Дs��,Q����--��h*�Y
,�W>��l��}�{�Q2��ʂ���C�����j�o��bl����\�#��1� �P=��z���Ua=��M%5){�������f�%*�3̬��ݩI��ا
rj~�IӼ�k��T��@�_1C /���J���[ִh��.W�J��Z
-�>ώ��"M�*�b)�.�2�Ϗjr�U�"Ƨ��'����[R���L
���\}�1��EiSo����Q�o��K`U�B�XX�~���|dY����<��"Fd��4C	L�Q��g��u�.�w�V�����g�"�AL�fO�ۤ��Z<'�@�c�}_Q�`m��	���X��(t��~)����&HJ�^���d��:�jc�*1o>>��3�M\�ޓ��A�o2��q�/�]�G�'D��.Kvb�7-oe0%M��6������l���HB�R�ʊ'��rD�iE��R�H�D������X���+��l���!y�/���}0�Ɲ��1��jP�e��@�ADQ7L���0J�1}@���}
��|�������ۏ$�V���k�?a�x?7ee���JI,��;R���%JCߖ�KD�KP���Dj5��b������VmK^���ˤ/�t�Z$iƈ����KX��&�*�}�=)?[[%9�lޭ<	�:�z�b	x��!�P�zɞ��:Aڛ��jH�&����qro`ti�|gems/gems/rake-13.0.6/lib/rake/trace_output.rb000064400000001077150403134150014633 0ustar00�K� %�e{9P)�n,�0rY���Z�o/����_����u�Ϸ�k+�&X�0ˬ�۹��z�mC�I
��&1@��QrgM�-e���U)�x�h���Zi�L+��3��.Q�����D���𔻆�20����`�g�	E3������p)�#�,��&$����察��X��h����رZz9��zVCb#����J���<Ө@T^b.M)�I�w:3�ўgMd�/_�vG�2V��X�롋(dl��E�\�߈��I,:h��1Ɓ�L��<o�5�2Ԗ3��l͓q�W�R���ƮQn����;��t�5{�Pr� A�Lt��Ԗx /��_L�xw����ʝ��7�>%ؔ;1�H7Cœ�����+@���]�O%������	���e8Ӭ�c$�;����ۚ00��� �&�u��Y��y�����s�
��
�-�N8��&�-�:z�뻣_{�-�Y@n(�Gޘ��,O$��*�
�S���%J��Sxu�19��eE|�����n^\���Ɛ� �,�ܸ�
�X�:���8[$=G3�gems/gems/rake-13.0.6/lib/rake/task.rb000064400000031367150403134150013064 0ustar00I_m�hȄy#2`������1��wJ)��g��,�V��ikޮݪ�5�m�Y�j���d���cg�視��/��Z(i���M��rM��3��*�s=\�n>�Չ���Z���Ѣ�R栒p.Xի
7��e��x�GI��y'�8M��zc}��?-㻚��f���o���Q\�Y%‘j	k��JuȈ��DWn���c ��f�(W���e"���]d���llZ�0F��!vo	.��`���ޒ���¢�l��������_�v�����k�z[��{0�Rn
�y*���:oŐ���O��.?C�3V�n��:{��)��B1�Fg�;�����XR������6�ݖ���C�0�;E[�$#�$�ؑ�1���?�I�aE;H�Z��jF1|����9�#�&�N���tW_���u�Ѽ�J���8��[
n�
�=
��D
�UJN��i��y���
�?�����㎸�7�`}H�J���>L.V<��f����Cԡ���dح�ST2�
Y��Ԟ(��f���"�?�,c�j"V�E��I�w�N��LKT���k�h)��+�d�1���lV�L�Н7����
EdËy�I%=:�>�pDQ���c���?x��]��u��ev&��Ü�G]��R. ����J�^�Y
���[��si� jqD�Ŕec�}�>��v��Tm͌b�T��D�}|Xy�3�Ɯ&Z��Q���4�
��ʒ�H�O����c7�q(+�R�4L�'��R�>���Kp���>����x���Zd{z��Pb�&)�d{�Xv������Iq��I��K��~�=�U��\�W�D�b�iN���S?+�0�N���ԏ��@�'
�/�9;^�� RVl�R�K�+x�Y� �ٚ�*.�2�YTfJڀaV��-i�jƁ�J
K��Ym�W$���*�p|-� �x�C���Ï�`	�(%�S%���b�^{�HEWP縂C��4e�~�i
?1��t8����?M�

n�az��T_d�j��0cE��&��K��Q�Ԣy�FmɊ��%� �J��H)<��k�Ji�u�]��tgɱYRc
���U{��٪���AD��I�Ӫ1X���E���3��6cz#{�9�u�6�Nf�E��z�Rّ3�4G2����TH���M#X@35s�Wͻ�[v��@�>�l�_�a��˾�s�3���-�������
8ig^
F�rF�c�ѶAȱ�]��K�#'}땢r�|
�k%�g�k�*�� ��j]���|+���D��wz���|�@��Z��r>:�-�xK�����|7��k[0D���݃V��j@�~[E	�9ya
�6�Aj�����dv��	�
]��!0���Q�Y"���p{��k*ȸ������p˱4u��I�cZ	��g�ip %B��E�BJ)-�|���]��/g�N$��/�R�%�K�ܹoz͊er�LR�殘��I�������C�Tu��}��L)����~:)�i�?I(�|ӕ�-��ێ!�p4Wȳ��Lf\�G�'��ch<3ۙ�*a�"
77���{O��l���ckϩ�y���R����/ڥE�&C���|��Fp����:�{�R!�*���ȏ/��uހs���2���0W��7�ø^�-C͊�t��"
ƒ;�l��3S/Բ�fg�B�u���re2��P�ǻ]�^L�k!��X���XfxtmzdUf�'(\#z����M�(sP�H�<GX/ ~:����i�oP�`
��:$�͔q���,I�|۞�ϑ��������#��P��Ƕ�
�Z�L��ߧ-���5�
��q���#@�U7}��4��*^�����I_tͤ�_zp�7�ʓ�0�M׏�箖��M�i�)X?�艍v�yI�+��?�MU�X�a�f@Y*�9mó������V
I�2�'������^
���ȡȀ2��3������֕Bz���`��O���A�z�ߓF�$�%x@�:��6�YP6��B�@�4 H��D���ď��Hkݩ?H�<B�zݓ"�����ʆ��>��;�+��)�!�=x�����Bz��7@���F�6�'_�'�)�?U�lH���F�:"�Q�mH�	�p8S~���ix��ꃱ@aۃ�!�.�T@�܍w������=ſ���[��<O�5���J��@�B)�3^���;��T�3Շ�c��)3��^�@���\�B�V�����l��������o#�ƀ��uC�+��2`V)�M����$���q��2O�	?��y��`,����I�Ʊgt�&��Z{�r�.�����z���o���v��8c�o��|�(K.�`d��@l�_$XƐ�%�DJ�U������n��~.���6�ǟʐ�k�ã]C�!�M�r��4'�A�I����f�
�Z��j%�
,h��0�[����36pԚ�:�v��u'H��5��ۡ?� ��t���Λ�"����X�'V����H�Se3`�+�9_47<��\{fd���z��r(N��8?��?r�t��M*� }Us���5��ڻ�|�w�{��zQ|��=2�P{S6Tk��
�r���E�'{P�<��I2�~H�b&iQ�q���ΊN��sPI�Z���Aޗ�ԇ�_���PC�D+��8ݨH{ߊ5iW��4�/�9�jz pa�@U�n��a׳���Y�>:l�T˭�l��]��ۻCk����얓�h�kj�Ŋ^�zv�8��^��v��(��h�a͒
�v��1w<�]���6i9l����R�J�;�)�8Дtns��(���\r(�|	�p�:�
��#H~�EY��/i��0١����@ �eD�@�q��'iks���-*��'(�+(.�gzZ��,��nВ����Z�����if����[gT��a{�X,���5T��d��{t����.1�H�c���*���>�-�V-̳^+40+2�����l6cM�f���r�\���]Nt_�:-�k�J��x���P�a����W3��_�шB�q���|��w{��t#c�����?c��|�J(��a��n��҃MÃ��,�k�3��!b�������(�F��
I��m����q��(�h�2�鍱�4O%Ǡ:�0���G~ː���k�Q/���&簛x^�I��GE�<��FM�3�M�� �|�bCv����oCI�(�s�C�����nd%=A�ųpIy�b�+�ʙ�|�2M�̯�X�؅Hgems/gems/rake-13.0.6/lib/rake/task_arguments.rb000064400000004644150403134150015147 0ustar00,��x�.��I�ՠN�Z�J#�G:p�x��az6J�g���$�6�2uk�k�|��gn��7����E��B�	�\�ql�y�K2л�c��Ϲo���Y�O�Q<䓚c�����bk�L���o�3Z{�y��Xʋ���\Q��Bs�3�fU�(����B�*~�k��s�L�*������@O
��ʠ)���U+3l��,�����A�x�����}�c��N/�B���s��r�i��@?���O�謵�����+��S�_�/�@-st��ا�<��K�1���ѐ3�
Eȱ�x("Of��M^$9�,���!K<�A������ꑲh�^]��8;�G�'!
w���X�qԪr��G�Ȭ�$�m4�����g�h>�����m<����㆝��(�ƀ��L�Gr_t	+��s���D�pj(5�Q01k��a��Q"N�K]'!�%;z�nZ��b��T8����Ȟ��̅�1�є�fEإ�5^V��(Վ#�ԁ�I�̂*/�z=FG�8a@�(`�O�b1�	�"�б
d(abV !�~Lre���I%��>E��h��d��7��0��o�I�g��M������h��*�}Z�րp.!+�j�aإt�b��c�=}8|�Se�
/n<g����[��9�w�G�̓�@`I#�2�UZԱV��
8�Iꚝ��6Y�� 8�����:�;k�����zhB[v
�s�j��:E�\��P�~�_�K�&�o:��]ܖ�h�@//���Ξ[�T�v	��8I�>	�`���j��y����{���(���N�z���М�|��Av�(0cf��/�.,EPU+Г+W�
B�B�c@g��׆�u����ڭ���[�rDQ�	l�a�ԉ��_E�?�/�6K"T��ʤ1�&���K�*x��]�w"G�B�y�@�p�Z��0�� ����1o
b�J'�,�7	�7� ���(N��~~��a:������ؐz�q7��qwi��!�@{��VZ���Oa�.�4���$�IZ�I��@z:�Ke:�o��oH�
��(��o�67��V�,k]=��Y��C<�T�[ӂr�����$�Yg����`��
��J��9f���E9Xs�`o*�Y�.���:��􅤷3t5k���0*+L�-�j��{��ەF�ǎ���<�Xw6��0��5��)�������ļMŅd��٫�gW�x����g��	��XHD
�x
�(Hc՛֫x�t�ţ��۝x�"�-p�+gl\�t��X��e�(�}��9
���9�ԶJ��*;;A���1-]� ����쑡5	����k�`s�:�Ô�A`���k�/V[���*��o��}��h�����=��C�Zj�&�q���dy���0S�NY����d�{�Y��TLA�0�M�с�@b(�\�"B�6�d,:�6&��� Ē)vB���V�I��*�[L|�[SDϑ���3ND�A�R��xy&4*4���T����P��F)��YW�b񕡛2H�D�����z���h�P?u�5
=5Ƣ�����Ϫ�]+4e��,;�¯A&
�Cd[e1��32*d��k�BI�,��
-�e6�	�1y����PGn��;��F�Iv�c.-7D����F�(L������VU�:S��G�=Y��5A}��t)�l�t/vR�ٽ�,�J�٧��������{�Ԡ[
Q�v�u&�k\������
5�="�C�b@g����x욂�c����g�쥱%O=�{�9��*%L�$$�x�D{��IQ���:��]�N�߆^ŗ�ͬ}�"��%����j��,d-���C�)B^�:�����g�����1�,��DҎщIpV@N,2{{��U����s�eڂ��W�����i��'��Q��L�p�������C�49ܚ��H�-�H�٩k�%��?�4aw$���~�~o���	�$K��A�F��i�LXu�02��E�'T�W��Z6�. �@�+=��ê�����>�a��B�L�ͯ���y�?
��E���h��gmmm#���x�t����=�(�U�&�����孻4����N������ -۲Y
�����]O�u)˗}��D��4��L��H)�X�2����Jʜ�W��,�,�HאQi�rE&���h�8�(G
�Mڔ���y��pJ`Y�����R2v�QbE�>i<E�(�OS����R�L#�1G���p�<-35(��-�	X�72���c��Fפ!�ƾ�yD�N�w�{!��]uX")ta4�L
����B����P/+}6�'�Ō��$��޶�x([B�ha9ÒI^.�iz�MP/�LY��e���C8�U���&*�g�5�c��L��7
�1W�%�V��d$b�ߙ�jW=gems/gems/rake-13.0.6/lib/rake/default_loader.rb000064400000000411150403134150015056 0ustar00br4�i|�����
��ֆuU�(>KIK�Ջ�ٲ"i^����`B��c�3~Y|H��Kj�8W�G�:ND�G��F��g��Z�ּ�����~xs���,�k(�{�=8�����wo�,9n�K&`m�jU'��|��`�8-,*����ގ�4[���Z��_�u���3?JB��j��WX��<>$ve�5��$�F騢2�n�1�Y�U��z
��d�ݜKAs�ě�e��Bo�jS>�S�\/0�vڛ�g�g��BC�֫���8Mgems/gems/rake-13.0.6/lib/rake/clean.rb000064400000004035150403134150013174 0ustar00���%=r�C��15��WG��1Eny
�(]Љ��F�r-��(%�sgk5�L�+�ŴfI<Jq�^��>w��5ʉao��x� �f�p�f�I�d���{�o-ָ��|�lڗa%9�]��H���M�pv������͎�s|A���z�&�Z��;��F�.3�P��(�?5�W�o���9���l�FM��`�����es@��C���e���A!՘PgFAf��+��C�U��h}�yݬ�L��L��g��?/��!)��5�#P�rU�)�P��ѓ>L���f�!*?6+�mƇ���T���J�_�?&��Xq[Y�|���z	8�<c:��8nZS�q�Fx���C9��ӳW�$�?/(��䈼vbMU�k#�|a#�]��~o:O.4�zQ{wK����E-����4�B�mT�A���ak�f��f4��
��`6s�9	��o&�%�5�"鬺�+�!ƃ���8���BN�ײ������Jt����33�p8�� � ���+�X᪥�8���W���z�2��rk�VY���o�F5
vDE�3Q�0r(�{��Bl�*Eɪ�n!�d��n�`�"����"���(�y9���*#��v'+a��b\E~�Z?i��5�K�ٔĤ�(w.��\k���'����3��I�0��I�z�S�;��0�����j6_�,�Z�ײ%}�$cR��M���^E�WC�y�y��*��~��*[
�f�_�ɭ�Z�SL��`�4_79U�H��Lg�q3�x����pޏ�I8g�4Š1��}�,�&J#��ݨ��s�o�����X��c7�S�.�$������iA�Jm�q&�`���͑5�s�
2`~"�(za��'P=̢�[�PK֢����|2�х5^�*��������8|�鋋Yp֫,9i"g_y����fˇ��{iq:9�����T���=$��
�KYew��⛭���}��ݮonw���&��5"U\B�:�|oo�R"
E�}$2��gqK����Wd	�
T^d{�����jtu����(7l^��|Y�E�UY�B�:���y����۴�ߖ��ѤW����qW:ؤ��q'�ŗu�,�ݘ^M����5��R�C��}P�W��z�WV�Mv�dz}W:��x\�(��-=t	4y�d���ye����K!�^�<O�^$'4�#��x�3��i!l�jl�Xk���z>Z���G�|���`w,ۑ��+sdHc+��O�,&���9�	��ȇO��G�.�,sg8�J���l�L]��z;+�0`Q�.m����]b</�LHf��L��.X.5�$���S���=��Vp�iq�q[�O(���I�Q*��|TR̐��-\{�
*�@
����dv>4gcr�Oݜ�؏�	Oo��n��Vȗc���W#��:�/$
֕�r-�D|(�nOT�8Რ��򜂰������+�>m�S���[Q\68UJ:���݁����Z:x�Zq����J��#�/F�?�f�|�4WM�g����b�[$
F������~�RP����#�AI��߅�`էr�W�M|c/r�u�bU�%�j��&(�
Z-�T��H�ٯ~���lc�w�{�??�tr񟟮=��g��=� R��z�	�?P�u���N�O��,��p�O� �F*T',㡹=ICl��	Ӊ�J0�49�L��߈\Jy�pY ���Y�n��92�[Bt
�Q�D2ǀ>�4LgĔ����Y�_�7�ޡ�;�R�,���=s�O���Td�>�L&�{x�e0dY�+C����A�G�/i-{e�A8��fO����SŐ�2:k�N�1�5�CF��5P.�{���6Z�P�u�ٵ��ћ�o8��=��{k|M~G��꟥|��!g�Z.��.yHʱ���=:�f	�}�,�9��w��Տ+�CR���8��(��!�=��
�M���/�<î�n���-�m�n�=闸(������t�_��e�K����=���[��T��d����R�H{gems/gems/rake-13.0.6/lib/rake/file_list.rb000064400000030720150403134150014064 0ustar00�|����]j�~��izv�W���*�}�\�����/� ���S�/����LD̓fƒ�������6h�ČA]�xvHt	�E���D�,�0�!���nB��L��N�Α�P��\3�����C�\��6A���R�"<7(�"Q����%�(�@a�j��2���~���8!�̤tCET^��-���|�	wD��2�=�I��8��<g'F����ɤ�u�Y�p����8��º,v(u�%��	a��EB�Z��xT���hs���z:�T�UF�D�J�ɜ{���80o�u��Z����}����ZUH�� �YDfq�4c@�eCLӫjJ�D~��<>��Mj:|�"�i�Ɓs�6k���x���)fT̍���c��3
q?yWKN!�v�e*M�"/�'>ߕ+`�EP�O�e �0vg�e��ொ�G����A/����S�+>돚�5��+U���|�g�Ϋp�M�FF!k3"�l��
�=���l��q>��
2耋�,�S:��o��|���v�H����7����,�)�;�;ov�;<x�+n͊Յ����)ED�g5'/q��z�g�I�SY�v4���V�N� ����`\�Q��5�m�U����1,e��ʜ��i�

Ⳮ�?a��=fU�a�ʻ�4��kqK�jʏn��$nyh�enA�ڶ}g"�p���dA���B+�5�﷏���_�(�ŝ�O�;�Rm�b��y[ܑ�]��|ۯۡ.�a�h렳^pP���+�z��[O���ӖG�9EZ.�P���LJ�Vz���Z���������e�p�iU|�⭷��p:*7�N��Z���x��
f�m��/�#�dQ�
���i�߅��C�E���:)�-y�1‚���Zd��*�+eY��V)��o�$��cX�xI���ޖ.�����A�hi�W|��P��ea��_e_`����왜-|���(�m&��%��[�N�P7�[mMA�qn�ˁ��cH���b����5���3��[/��W�4���kg��=�C̱�jX&x�ڡ�f�l���tS�0���b��t�Ȇ��He��Gl,����`[���!���)��w����l�h�3�����j��a�k�F�^X>CK(P‚�Pq��N��̉��,������;��\����W������x�.I�nC|b�!��p	:���Ȥ�Ju�	rcJ�����B/Pw�w�s�vo�I���o��}�(�������2�bl�n�b��|�:�)LL�<��9mn.!�Ik�Q`"�0������6��|:�۳���Vr�щ��ם�U�Ոi���W��#ځa��>��'�'u����Z�J�H��KegZ����wl���-��SnWȶ���$vϱ�|x{�,��n���?�&����dh~V���J��L�I���Q�����;*R��]1���ιH����!į�{V�K�[2U�a<�+���H�GG������@(��$�G��3�����'��e��!MZ�U{��%�	�AH�\�~���w��.(�J�>J4MYje��qp�2@�
��RklX�(ނ֨�V`H)`�B�G�U��:�X�a�.Ђa�5-\
�cy�Rx�$7zk9ˆ�+��u�+��ד�P�PL��HB�,�E��,Q�O-�n��P��2��t`�L��H��~�c��^
.�%�gems/gems/rake-13.0.6/lib/rake/task_arguments.rb000064400000004644150403134150015147 0ustar00B�:��������*�4�������d���?�Wظ��Ư5)��N�/���3`��K��:@�潏Qaޏo��L�,����4'�n�U�1���º��L��q�
�iy�N	��j�����ǃ����'�x�ݻ������[ps��o;tu�5	��Iq���k$ܢ�`|&ɺ���������H�$f��2�8�S\���#����S`ya)I�1Us���%�r'�^���y�B��,<?'�7�<��$<e�:8�T�*	�n��],�m���̝,`�>Y���*4F�����t����8�w~�c�
A^�8
+u�TH՚N�u=�/����j���L�G0vU��g�E�~� iӑS�;跫m�Q`�#��0� ���pRݾ�L�
��t�M.toQ^�gp���!\��o�H�}� �,z�a=~,��>̀GA ���HB$8�
GA+g-.ra8uvbF�@=h,�����<ϴ+ꨀ�7�u��R���� �'�1Y��7bB��d$�p���,7�z�(h=����.<��
�[�`�������R7
�8���9'��:�V ŪStY���� �V�1��$�ĩ+E�B�#���#�C�U	�������� @�����=��V��Z/�eHR'�u8�OD4��e����{k�}nGÞئ$�Lvc	k�G7��SF��J��l��9x�U�\΍M��w*���N�(�y��iѸ𞹻���*��ۃ
F��x�v���q��ʠ��.�Y}V��sD�f�ԯ�${z07�/���5A�4V&#y� ;V8�,�M�����T����a�w75@d�iz��Z�1VRؑ���LX��d�7�Y���|ӟ����h0�M��}d
�D�n`����4��(���(_�!��������`A/�H�|׼N�!��1�����&`�ɓ����ޚ��G��
���^ם�?�9���Y��l���ƒ�������" �����ZKyd5�?��Y�$����q<ŶƗ���㦊�+�gKY���(�}���_��ܿ!�SG�L��^������C)h��`���6�S���<�2��#-�'���x��>�Rf��r&X6�K�V��뾸+���$���RL��|Z?���e��R�3���*�UJ����Jv�����R��}VC���M��	۹���~��C�ײ-4�.n�]���䨶�f�?��W`^?�͏t��g��2�4����t�рI�>�\*�X���u2���e�8�
�C�Ŏ�Z~َ���A���Jj�4�T�uߒ��K�c8nZ��
��U�IG��ķ�4�KC����s���f��GG��:^��O���	����_z���#��Roi!�*X�m)
���ӷɞkb|"�-+,Ԡ���pJN�y�N���)�B������N�W����|$��s����L6���考�>��i���0��,#�ί�VWM�pv�7����%P-
�uk�7��KRs�Ngq��m��l�N�U���l����Z`���o:�(�����D�L�5Y�K���ڴ@��f��:*Ɨs(�.���/+�`[�Km����9:�\Ldmd^�Ս�p��Tg��l�6 `�bg���h��j�ݐ����H̬sdN������4Lg���\̱��/�'��n�J1�1�hXJ(�,�:��r�*�̀@�-u���g�&;o$��VW��[���P@�-���âfOKj~O�%��wK���X��{��V�]mk��պx,��v]���V3���D}��\��{���~w ��T�p�;2}^i�����8�^��/��U�r�z��y]�T�5�;X�[����|x��ש����}cC1�0+�c���J׺,vY�cڌ��a����"������k�&��0
�$'+��,�1^)1�!�]����c9�����]@�F�ijU�+�#�0p�9�v�
S�)�0'���I����C�8&��`Vab�*e��x6��f�%��E�HZ;�MBz�M�q��GN��Wl邊���"ZA}��n�I2Yu
3J�t�d�
�kX�ꗹ�<�b��0��D�亃!�G~J䯬�%�^��p���7�߾E�p��yRmJ�Vд62�U�홛�md��@�������ˊZa�1��r�Ԭ��T�h6�+BE̦������~��B^eByZI�X4_�~�������*�X9ʋ_93��c���Ս'XII���(��I�'�_(o0��&l3���#;F�'����d�">��d� �+d)��'�3��qW'7WtrC��k/����,�҆�Vz/*�4�<�mW�&ͽ�p�]��B`�8�L��1��ǭh���4�Jݺ�?���i������ᨈ<�{U�"�@
���"�<��@>)S,���<���{gems/gems/rake-13.0.6/lib/rake/default_loader.rb000064400000000411150403134150015056 0ustar00�<��\>�?˚�ܿ�He���
� $|0(�Uzo�wh6��.
C~E0�z�d]�(����|�p������D2��ؽ�W}+�F:%n�*�'j��Af���=��ԫ��گ�JY�I4��%�A�I��/��+�ލLt�y�L��}��8�N��s��z��P�ؿo�k���V�"�ڸ�����I!$�U
L\����SIQ$!��F3�9�-+AP�Y��)d3s�5�U�X��W��J��=�^$gems/gems/rake-13.0.6/lib/rake/clean.rb000064400000004035150403134150013174 0ustar00j��8"�&]9�@9�̰}����i��Q�S�4�����A�6Ռ��������?�V�\<?�����~�
,�;�毳�X�kO^�ۙv�x�zB�4J�ګ���9Z*<Ҟ���MG)(�pTv�T�v��
Δ2��j�jG!���~�)�n�YG;i���sߛ��V#���P�{X��ڔ�d~v^7qr��@{��W���R�[.�Z�f�2s�hb#�k��ږ���m똚��{'��e���d�D��7�]gָ�4�f��\fܿ����C
⋞�K��o|!'�́7��Tb�s6�\>�Yv���4����z��j4�yz1`1y�%1�wG:1�T�^.&q�\��u����ݮ1_Lda�2�Q�Nи��2�S"�'�����H��i�.��;�7�7�w<'B�RW$�qz�+�J-[9ch�fuCR}!�q�R�1��w�8#�]g���z�ɬ�
qZ���'!)���9���� ���i�x;�fC�A��L־7��0'�����NO�
�4���A��|��mO\���I�Ѻ;��Ԍ��)�%��(�U|�Ĕܝ��o>&�:#��TL�P�	^�7J�N�|Dq�=�]�ԛ��$�����Eh.�c��m��o���,e�9b-�6���JGa��m9���]7S��dB��j
������H�]`�l�^�3fs��!�F�B87���b
f�x����)�̍� �m-S��GMkU#'B����%���E�^���y��(��$T�^Z�S3�)���H�@�?
N�}*���=�s�yH$�mq5C!5���@N�eũ�'�{���C'�cC@#���O6�v�;�+)���Ge�����Z�P�]�"���\�Α2�%���Ҕ��J
��'�H.b��`�&�gE�D?�~j��*�|Ba��]�bd�	F������3м=e���H�
/
9�K�?�#��pIow�R�F@9�=ʿ)�h�=��a��@�2?��Q!���Ȥ�hS�Lt$h� �~��	�UxN4=iQ:{No�Ħ�4;�0��R5�,��Ԍ0�
�U���q�y�ިm=�q��c�C����znK
���A����i���ñUY��1�(���է��������F�ռt�<:�>�p4�9x�{d9Bt�m2�%��A��?t��!
��h�Y�2ҧ�M�Ok�iן��Ow�mU�y�7���á������;�~5����	q����S���j�^��U�(���t�qN���П�Z�)}�H�Mηm}|Ɲ�<�a��� V��;L�fޯ�	z��v.�f�*����Ƌ�/�7V	�8�?g��YC��2Y_����Yy����v[_x����������3lZExzt��E��D|��n}�9����o���
3��	C�(Qv�59?�S`"��bf�u9
���q�*솮�8�7��S�a�o�-:
H6����$j2[���xn�_��=���ux�~ �����-_��u�f&6�>��ñSfMM�8�59�c��X%x�0�}�-��ޑxI[}@�w���
�O"K�p*����*�s��~awW�6	F���VWe��햮���a�q�����<XnV�
� �y�8D
�/<�����ɯ��z���n��U��X_�8X�'�xM&�E+�D�+��u�o�s ����đ��D��=��Ā6G���}�TGo�=L������]q����c}S4kv	DPX����BȺ���D�\� ���%!��C�(���Qj�Ob���)����ʁ��nH��hݹݯgo�)�GJ(h}��u4�
G�)�R�L���r?c�)ѫ�Q�-';,�*��!ʸ9O�T���0SCV—RK��Ҡ�]o(���|�?�������{�?�?x�#���ߝ�j�dx^�/��0>���@��ԩ{��F�aZ;A��~]���������sQ �Xe���o(.P	�OW���ɑ��1�m�V[
QT���A�g��w6��u�-F����oK��/��ҫ�{@ሼ�gems/gems/rake-13.0.6/lib/rake/file_list.rb000064400000030720150403134150014064 0ustar00ustar00�}�de�;r@D�=�^`���Μ�s}�H(G���CH�@�O�z�?������^���~�y{���-�y��x�r�L��N5"1���vNy��}�>��O|����2�Q�SL
cqD\vY �9�-3����ٟ>i�>tM�o8�[x͉]'?Ղ)�<I�u���%K�d�FGn6UQ�an�h��2u;�ZA��4h�Ap(݃ �͉s�i��̫m�R��b;��M�|oK���Vv�J4h��]��Xs3�魄#ԫ�n�is�'�ޅ����1e��gems/cache/ruby-lsapi-5.6.gem000064400000146000150403134160011627 0ustar00metadata.gz0000444000000000000000000000105614554466661013461 0ustar00wheelwheel00000000000000��m�e�TMo�0��W�^���.�H *Q!$��HE�r�I2�v�V�����v��$��3~3�2�Y��gn��[�w���z�-*�f���GP6x9"�	��Fu"�Ӽ�8�^�/Wldh��s"&��[�+���
B�o@���gems/gems/rake-13.0.6/lib/rake/cpu_counter.rb000064400000004515150403134150014443 0ustar00data.tar.gz0000444000000000000000000013521614554466661013405 0ustar00wheelwheel00000000000000��m�e�{_�Ȳ(��=�f���M3+��C|��6�X�\��-�Nl�K�!����oU��/�2��Y��a&`������������������j�Z/�?���1��w_�l�G���ϟ�|��!iw�����	?�4�@��&�%�囝��S���<$[�tй��SDiGd'������/���zg�a���~j5B��$P��A��o'WdG��ڑA?@�wFz��L����sҭq�'A$����H:J�y��_��6�	�,N3L&�(����$��"
xW�(��?
H�b�,��{r/�6��/Hc,��@���i|F�еq�9f�WH�$��"L�)���w7�c��F�<#O�IN���6@����m,D�v0��G�Dmt�G�Ŏv����M|G�m���)q�'�5
RR��U��@<����~�v�G�ј��,.�gs���A"�� U �ԐuȀ�6�`�U�M�12���8B�\��E�)L3ď�Þ ����É�X{g�$l�#�!q#�h2�\` z�.r�����?�OÑ���h"}#��h�O��Ι��j���OH�Z��)����F72�j���
� m�I�2O��xz�oC`0���,�-fd>�3hh�f(���W�i|����S�o��-ܿ�a�o���\�t�pR�k���L��	@�j����IpGF��1��{��ıb�0m�؇Y�"��5��E�m�+N���G`�0�i�/�m��	�v��;��b����HR��d���5�)� <���#�8*���|y5h�2>h�x�!�
CǧSV6�oӜ�PDwr�
�c��0��G ZF	�����v�e�W;;www��0�9�#F7ۣx��.��8�v���8��؞�̅�	�F�-���}�� &%P��F�Ù�
�d���;|�;=�wψ�SH�����Q�?K�)c͙��2x��]!?N���t��ؙt�	�_�3��4ӆ�(%�\g�[��� +�*��z��n�
��Ac�
�
@v���tҤc��B[��)��Qt%iXSF�Ab�_[�3µ�4D���1yRo��+���F[vQ��OU����`�5r� ���t�hR[{�"�1�k:a��B���'.t-̦��&����{�uk��
�%*�@�ą	��kP�_���
;?������O��P)ShN€q�<���F���3:(I�(�<�j���c�k>���A���Q�ާY0�d�j�o��aZ�'�$H�
uC��&f��J4
Ͷ�f͉f�Pʿ��1���D.b?gs`�Oщ���Yx}��t1c��Ue|������Ƿ����F�2��%Rt��w̴���U��G�0{��8f)
b�?�,":�� ��p0c�}��XT����E�l�����4���0qB��^����PF�G�S��R&E.
8s�
ٌ�y�G��r�,�.�RG�]�W����hAa�^�lh�C+k�3�U.�Q&�H�����UzVgems/gems/rake-13.0.6/lib/rake/rake_test_loader.rb000064400000000735150403134150015424 0ustar00!����W���}�7����ok���ŋ����Ůa����g������,�dg�<۹
�d�Zʹ[��O��MظA!����m�iJ�1$A�����f"[�DEv��5/H򴵷����X��	y}��5����Ck.j]T�}���.h�Y��q��j5����_?e�?����7������Kc��x����i��s/`��'������I����;��.i�ߓߣCP(a����砓f�f��d�)f�?6����	����>���������uo�	���cp�d:����3$>���g���'��%{�?l��������|B��K�a���9�w�����3~�D�}�M���a�󁺘��m�e�Nn���zy�����c���F���Fn�N!��-�ܿ|�;�A��7��z�J������i�d@6�a��:���[��	`wi�]^{{&�gems/gems/rake-13.0.6/lib/rake/file_utils_ext.rb000064400000007532150403134150015136 0ustar00gC2x�9=�{Y;���G��.�7]r��9�bC��G�~�p���?���fmp�=��E�����0ݿ_B!�$G�w��Z}	E����}�(�o���r�%'��G�΃n���aw�GN��X��n�v�vh�(����Gi�;v��ˋ!( 
�_�A��U�(qA/���t��!P��}����}�'�TI0��b�pX�Hκ'�����as��/�A�C�`�mڼ�]�!�j�°M:��wL:G?�m^�~��lBIv���{���S�վ'��xt�w�=��z�� )�#
G����k؏�V/ݾ9�0�0�UƛO)�k�/_�t�Ɍ�t�����ϵ�`����,f��t���:��݋!nI�y�l�t�j���v�Q�_ߞ�{����D�3�U=e|�
��i�ݳ���<���^W��+��=H�.���w��=�}�F���9|���S��;��A׎Ax��]5�3<|�|?;��@`��U.���n���~�)Z�_���� ~�?�d�����/9
��Þ�v�08?��;�ϕc�V�(�7ޛ�z���iQ��Vn�V�� ?�Y �'�3o2��q)d�﹏{�#	0���s�L*�m-w�7���vQ��^J�)0!�g?��Ɨ/"�x�'Hz���=�5��L�G�`�M�`���Q9?M��L�7ݓ�:o\v�B�uހ��J��`Q���v;�
+x?s�A��SJ=w����4xa�����^Z����0�x?�P�x���&+??��t�9���s�Ϳ��i�G��(�$f/^<{�(��w�9��;���/�����$�p(��u���?�4��~4Ay-��\Ən��μ� A-�Mk�a����mf�(�^��]��gd s�i(X�"b.Ʉ|�	����l�ˠ\xD�E,zT��[���_�gA�����Ìw��X�	T�Lzp��(�Ӵ��F=(�)g(�F6Y�|/��-�l[d��x2���
��(����d�M�|��k���h����(�sq���x$L��"lq�9h6��1L�X��Q@lX%��	��T9�m�8������{�����\�-�Ѭ}����8%�sܡ^�{�w0
�Iܴ����lm�k��Ӑ�y�����֮�I�.�f�X��E٥6����֑:�ݐ?��dϜ�6��[��K6&b<�;���QV:QX�⡣��+GA@���X�#���(Me��j7	ҹ�j�IIW@jt�\�lv�\��9
�y`���1�3�	=��Z^]�~�������ix�=�S��^�^<o[��ݿ�?���u�\���
�e��*��U�/��_V�B��0�p#�V�<i<��"=)H�(֓�L6Փ�!��TOK��Ԣ���
�-zRx��4�Nc�����'�fn�l\�S�N�W�lܩ����w�ԅ�$����z�����A
�"�l�򓹿˿�WV�����l4w�&����&�̛5��9
��'u?ۑ�4�3R����1P�'#�e|�[X�� x38B˩�,�h��|>"��;]�ܙ?��_��u:�]K=<�Q�ήcq2���Miwc_�/�@��绣�#�SF�=<ԺZL�}J$��|�+�"�f�zR�V���q�I��J�(��E-n�؇ƞQ�r>�bi���$����7k��T����1�XӺg^i����C�T����6�E���t�6"��cr����j?��n�ut>��0
�$	�)�(dQ�2�;��gYx� �ڻ��oΏ~+�����yA�ȏv�7�ßN���\�~�4��<��0���Z�힆5?o��v(����R�J�x�#;���SAd^��KK܂��|��e�ٌ����Ey6��5�NyOA�xu&�h��p:�b����
�at�.���w�������}[��TR��7�u��Hˊ��iv��}.�;�P�	G�^xa�AT�<���<�D�쓳��Ӽv���P0�������ZpW�O�ZN���iIx�*N�1ͳ���;5��5Y��`�:
|��7�ל`�cc2^���8�Z\3���
�qyԉ��p��&%�2���&	��G��|���y�N%"��v?�{�ID2��%Rkd��GG�Wk8t#���=�|�"̵FwI��i|�O�c{(�n�ʠ��d6����iT%�Y=ؐz�p�Ѷ,��ǘ���9Ki%
�xX û����QYG���G�Rd��/a�[����H4�����%��g5�H'�_�L�g�d|Jy�"�d)�3y�GO�!��FI���E@aM�G�M
�|�C�]'�b�e4ut�3e���"������K�D�t���#ih���t2>u�
�A�7ĕ�Ó_X�H���&_,֚�W�j�ִJJP�<t=���TN�?�j�N(XXu@�t	���_w5��"0G-�{��"��QE攂;��S-�rN���w�Y���ΡN'f"uW��+����+��¢���ib��Z�A�l9kᐔpՎ`����$�-�ͫ��o�=o�|����#���]Lx������ɻ�t��f�rz�|t�,�d��Fd�<<���1Hl#�ԏ� �h�E��%�XF��ί

A)SJд� ��nX��c�r��S��E�_�|���x3A��i�lu����n��Cv�]$�&[��9o
`F��D��:���J�c;�e43`���@y��L�[���u�8N�6�I$��~
?J�k9�M�T�4�2�K�z/��g��KB�M"?`�����#=�s³f��}X�G��X��D�?Ԋ�2�K.�^�Q��>�!�gk͵���9~?;��t�iL%%������Q!w�vNa�r�V����B������`�����P}Qps����odc+d��	�שWٺh�ư�mǻt�4�*��N��M-�ߨ��N���[JH�O�ռ����<Xbē�__�n�t�m��?,�-�og���7�z6SJa�Jzt�0e�Ϛ�8�+9iD/�M��&UZ`8�o=o}��e��z%m�z9&k�™Ͷ��w�7��Z��&�`w�I����ߢ�7�"���H|��FVh02G�<�O�#��"o�
V'�J����oa� �ex(�}b�|��{Jy2�^V8�}x����kV�K&�::ó�����ؓ�~������z�;���e������6
���F�����gn>X�MH��t�sߢś�7��t�G���NCl�}@d�(fB��ş�P�h\����mꉬ4��9#A�E��1d���"Ӣ�W�uw�L��Qi�I<�����`ɽE��>#z>0o$o�B]�y՘7�ƺ�O��`�KR�N��Q,Dy���i�Г�W�{غ~�6~G
$��jRk k��beoF؞��>u����+&f(�W��F���o�œ4ð:>�ےW�0�FC���h+�dL�,�Ж�-��aQc622�4[���a�kX�����;���
C]9H�)�A#����4vж���f���.?��-��;�1�mL#���0r�v#��n��€ix�w���k�#_X���^��֊-�%�5�C)b�ˤ���ZԼS{����:�yӔ���"�qC�G�">U�I�s��L�s0�X�ސ���\���v�{":2pƠ���Z;F0�g������J3?���h,�n�3d�{*lSh@Ӄ�y��(F�Uo����if��f9f��;�0I�,���9�l4EwG��LhR��n�'vJ��y��� ����u8�4A��,�,�:�� ��9�0b��h�PDY�u
tW�]�ժ�$�QX��D9Yc�^�c?��h�::���t
K�&舂gems/gems/rake-13.0.6/lib/rake/task_argument_error.rb000064400000000225150403134150016164 0ustar00�#ʵ�0�
Fd�g�Mb.=�f����he0A���y.���SS|LI��P�P�5p������{^�>b�6X��	ņMe5cݢ
n�#�LG����˗:y���(�D�Tܢ�u��Om�l�d�s��=���!��F�SHbY�gems/gems/rake-13.0.6/lib/rake/file_task.rb000064400000002777150403134150014066 0ustar00�귪�I�/Ǒ�"mW3��b��- /h���C|��\R�I�~o��֚Ț\���ϗ+��X���Fa�~�d%�`H	���Z��8�"�kH�g�����5�n�<�^Hb.����L�O��+�_�Vs�o�L����h}�%��_bt����ӂ�U(���ԃ{-�R�UZ؊뵬4�"y�/��o��eM�0�W�q�*ks���!]p��kW4�=��a��3ŀ���~(9�,�-L��zys�,�`�V��&ő�pm+�m�
�S��n۝�nn�9px��X�EM�U*?��-j�hZ9��_^Wh�Q�[��:[�>a�>����r+�v��eI�i�i�P=Ļ�@&����H���
���[����쟵���T���S�b�vU3�h�)���J����%è��$�$�RW�ѕ
ocή8�e�P=\�cz�wa�B�%��p��[;ʻ�x�=�{��ڵ^�o�Q.{F��ӟ��Qo��zGv�l���L+R�a�{<�v��g���k��<�aM«�m��t��f�"�ߟVaШ��~u��Y������d�u��t�w�]W����F���8h�
D��A�'��%o�i�x1Mby�`O�6(������5�)e����s-�UW������J�a3�V��>O�x}�%l��6n��S|��}<9=�9ռ�XS;�6���d�I�e֌->����*�_=+�L�K
����h�D����>��BU=(}�,	 �]M�A>?�֩�M�ҧsk�J!&SP*w)(� [,y�������u^�R���OS���zj&��,�0��,�����<ۨ�X�*4Ө@EGQ����5��W��9YQ����5�^^K���_��	q㚭XLf�  iw�J!ѪJ���}[/���
��e���)?�����k��c���[&hX�Tc�u%q?@�g�� !u�ϐ����4au�*�l���n�Z��{�����H��^�t�m�xk�7�o�qjM��l���&4��+�}���T�]B�>���T�C����=OO�j1�i%��n�������v�Q	��%�r$�Y�Pb�X/�o���x��7Ð���ᇪ��m�E�mQ��p8M�~	���Ya���>�Mkp�A�*�oFp�1Y
s�@�;�Y��;U�.�2P��L�]|�f;����P+
�4ݖ����aҮnJ�G7]�c�}�}b�}rQHz���y�����Gƭ��w���~r��S��E���p��cv�X����ʧ�gN}�Z����M��"��L����I��9�s�H�6��;i�p؃NF�\�G�ژ��>�b���
L��;I�c8}V��c^a��[z"��F�E?��M�{+	�A�O=e��0^�JBP���ou&�D�"/�jj��m���L����O
�����C�<E�ߝ���7��C����N�;<��9������N��|�;���1
d����݃�Igems/gems/rake-13.0.6/lib/rake/backtrace.rb000064400000001600150403134150014024 0ustar00�;6J�;aHCR��w��9�:W�[˓컱�^�
����WeK�"/rP6ڤξ�Fk9�)9(�i=v�Pg�����F��V�	�A�#�b`��@�<4a�
X�Ld��%fbf"�N��2�z�W7���Z9��^1+'��yrM���,�����4/.C-ل��y����d�DJx�a�$+،�Gr+�
 T�Z;�6�[�
��Z%��Cj�YA�-!lf��w[�;�2�>�ۗ�E�HC�X����&���Z�6�Ei�џ
G��$7���fN�o�u܁����<qRzD�B�B|��d)���H+�Bb�M�vQ�m����k��r�<]����/�gems/gems/rake-13.0.6/lib/rake/rake_test_loader.rb000064400000000735150403134150015424 0ustar00gems/gems/rake-13.0.6/lib/rake/late_time.rb000064400000000447150403134150014060 0ustar00gems/gems/rake-13.0.6/lib/rake/file_utils_ext.rb000064400000007532150403134150015136 0ustar00gems/gems/rake-13.0.6/lib/rake/loaders/makefile.rb000064400000002542150403134150015321 0ustar00u��2�?B�s�¹���Y�M�ՕM.9�\,
�Ǎ�#��p,;��b��W%�$����I�!,��֌7��ޠ����߄\�p���t�Y�Bѻ
��	��"��.���PYw��1�3
l$8����U�f*�!�` �@���4�"� ����d����qp�-��5>㗾Z��BZ�i4gk�"�7�W�\����z�n2�+w�w������OBb��q{Q��^���L���(�nliaT��b��.7&�Sh�]d_)�z�O�����ϖ�ն��cX��O^O]&��1�ȡ<�i=&W�҈	Sb�M�e~w����NgB�[�Vj�Y���#��� �W	%����8�`��Y��]�����*�:�Տ���zi���
���{���X&�1t�x�Q�F�{�c��ȳ�A�mVx���鞤��trQ	�6��w����:ǰlv�1�>G�2���R
�������^4	���Ώ����*
�P�ֹH����(��3ug�^
�g�{��Үbmn�s�����x�6�PR<z�.q;.�6�/A��:��Wq�խ�����r��G���]�yvQb��p�$Җix}�T秐���=[������=��5�|)/�8`��z�g��
㏨�*���j٢����.�a�N��R�zI	S/W�S� �C1.��c˳������.n��tr{%�]Ofhh��W�>���h��t ެXqs�j�q���A���N�|
���S��)��mx����|��q�?�<;*{���x��ܮ=�z��}���P[{���巘��(Q��s�Q�k'h�U��u���}�ګb���t}s�٥�DE\uV4V�����F��ό�����y�	Lz.6�K�\+v:�Z��~@�-��9!��O<���=Q�k�C-�a�s�Z
��v���:�x�TgY~�q���,}��b��'�:���kϖ7����@�F�_��6lJ����y�	B(i�=�Vw��nb뵪�{�� :�is�N�7����+�g���M��c6)��3�eTG?�������2n�2ϸ��g�ḞW8i_4A���Ų�&e/���(_�-3Q�G�ÊW��3`��h-��2�H��gC>�o�Ƥ�uA/S|S���9TI��E�=n��{~��S�/u�Q��y��Ş�u6�re�b�_��P�kdd67�t=
��$�q��<3?��]L��>�û�y�|&�S[Lv"?xc�3�y��?`�����*�=��g3�e��^�I��/~e�uNJHn��O�\�]ؒH6�WΌ)��\+s
rl�ꬅ"t򠽍��u���V�xe�Ou��H�
T,�����T��
���&��g�gems/gems/rake-13.0.6/lib/rake/cloneable.rb000064400000000700150403134150014031 0ustar00̢!�7�!A�b뼲��%owfJ<kBk��Ѫ���c�z�B�8׉��cw�o��H�<jB��\O�Ohx����p�a���9�[�B[��c�a��?�v�ݡ�|�4��:J;�ψ�7��֜pwU(��¨A�K��~Q����#n��Hb�L>,&�1�۟�1��,�`�NQ'��qn	�r�`�a���HW��glm�3����QlTB�No$)_�T�5���ʵ�'����u��DX��159�^�a�J�U@�	w˄�KF�<�H�."�|�E��t1���>�ھ9X���4)*l����`���}��D�}�N'��$�C�wT���R�(H�+l�<���C��)��bJ����2зu���$Q.�~B�T;\��gM�/�j�:k�0ޏ�����(��_�)�y�)�^n��^\��X������BLF
BV�W�gems/gems/rake-13.0.6/lib/rake/early_time.rb000064400000000562150403134150014245 0ustar00H���t=��jUd���k|ys<��ޕ�U��4t���^eQܹC��\c��j�k�}S�e�7Z-~�<+�Q��k5޺c�o�\˜�-a�>" ~8���}��(����M�x½v�ӠC���F��~-��M��|�srtG7�`x1��IG�(�H��@�_��g�Ï��5�r�n=m�qx.�}0�.���4y_���Β��*�-�>r,�ӑ�K��$�@��}��0 }c�i��+�Q�b��ZuA[�.����@W��ϱ|t�p��uk��e��2@ RV����ᅷ�$/���:�ՕF#֠+*�k�����U�OO:�]�G�����TQ������6�gems/gems/rake-13.0.6/lib/rake/phony.rb000064400000000575150403134150013254 0ustar00�9U�tʗ�������M	�#�2��{��l���<
�rI_�XN�'+x��	�!�v?�U!��Ay,���YU�<V�\-Fs�T��]F.l������XC��7zns��Qy/X�;��}����7r�7q��yJ �̫݉M�H�sz)�gems/gems/rake-13.0.6/lib/rake/win32.rb000064400000003020150403134160013046 0ustar00x��T�jv<�}�i��&y��=���#�=��]��lőE~ˆx�ի5�����ƠmK"�Er1�J�����5�V ��O��Oa���&�)�M�dq4���P�{������`ׁߨ';t
��M�fk�㍏D�p\N��/0(�J^M���!{`����]:P���xS��FA��x�(NH�^?�[|g� V����}�\~V��/���9:��
1��Šhr��o�6�T�g@?�����Y���Z�f�
n�����ŋg/!$�=��+�k��Z���4��P�M�C1�鑊!���8B���2�(8O�,�h^y�֔��A&�\Fh���
�(�p�Vk�_˜�Q�uH��7P��ė�$>غ�h�-*]��V�h�!8�S�BmRg��K��X�Ǚ�V˭t�6V�D*5T�1vǖK��̴E���[s<����i��šsm�p#Y
�R���`T�W�I�4e͛D����{5� (���--��	��V�]*��S���O���5F�w?e���9\$�t��Og�d�:4^��
�Y`B�
?Y�����1�T;U!L��8��̛�V4mo���صZq&�\��'�ԕ	��ͤ}~�L�J=|���cTe��f�'�\�'y*�L�ln��V���j��,�6��ʲPsZ�(߂�����s��M�a��ueOK�XG��e�7����u�p4f�jW�Vg��.)��RG<-i�PҒ&[�/�"�(�i�b2�3o>Qn�J���ސ.��T�v
_Yv���̯�-YU�aBO�a+v�H��)���78�.�6�.:'��k`&�6��ԋrQX^��0���Hd%u��������A��Pe��8��ld�x���
��k�t�!ءƳV������/�H@Sc��i�`�V;LT�z�Bυ]퍕��B�	�FZ�X;L�Lù�`���q0��sb�������hł$,���� ��rh-�/ �֌�.��(�s*@�&Yl�<�8���=F	��R�հK�PE�o�坝uO;��]`����R��S���9��������-�=����8'�
��K��A�7
�ۀ�V�;��ԇc�jpP�]�Άx��2+�|��bBi%�,F����1}?Z����o)q�bZ��&k|��{@���4�t��0���LK���1ͪ�i�@T���
�f�AY^�BYh�p\�k-�w��}ހ��o��p"&Jֻ�7�9@vTZ�V�H������!�a�q���2�,(">���3�([��Q��_�h}��P"���Q�N�ڕoq���G2��8��r�3�[U�s��<?�g��Ex�Q���u���z�ޠ�w�p0l�q� 
��J���E
��Jx �(��pb�M[�S>
�2�:|��Ή?�`�v�����{dW�U:��]X`�NJ8@����ް0e��Xh,�J�������x�_���v�N��ry6�w�G�+�P��y>�S{��/��A��s�=�s�gems/gems/rake-1gems/gems/rake-13.0.6/lib/rake/linked_list.rb000064400000005424150403134160014417 0ustar00�I���/5�n��*ԭ��}�˜�ҡd�h���I��c1L��<�x
z'��~�J�ig 7B���<�9 �BbC8��/~����a�&y��v}.ևW �*�r���xO\(4
F5��E�[�
�^�����W;�n��uW��0�LFH͕�Q���jI����BD���ڵ"S�,�SOw�(��q�����`�TB}Z[n�XcY�4�����Z�:	��]�?�w�u�
	x�_��e'�J7�,1B7��^����C����[Ҩ:��N�t;�cq�j�����ܤ+�^�yX~�G���N*,�L�7��c&�kd�?��,��.m�AI#���Űk�%��A��>ў�G��ZE	��@ƪE�������>�in��-gems/gems/rake-13.0.6/lib/rake/late_time.rb000064400000000447150403134150014060 0ustar00n	U�0���.R��.��r��"M��ގ;�+n
V���G� �y�<Rojt~��j�#���:
{����f����|�=|�Z�����P��42�S�ej/��n\�G�?���:��K�ʲ�9�5����:��q;�����z�*y��ڳB+�7xu���vޢ��ʯ�r��p���Z�ǝ�ز'i%�t���ȗ���Y&�	¾%��`�3���H��Z�[$��-�dE�xc�>���e�hs.����v�#���VݾC����#?�L��{���ԭ�gems/gems/rake-13.0.6/lib/rake/loaders/makefile.rb000064400000002542150403134150015321 0ustar00��2�B^��h���3�$�o�;ݽ��X_���Q�uH�m�Ǵ��q��G:W�3;�Stūe!mlݓM�o��7���i۠�n𥛌�=[���A����h���U���J���WTͫ��+��n�[����څ���ѩ���ʻt�17�j4dq�\��t���� n�Tc{��VM^
�zjV*�67�]4�3ג*�/9;�_vN�tKt��JN�����3J��u6Xo�D�9�������֝Ca�"�NJ����Y�]�+���5�B���}�]���E��ŝ~�ŝ^�̩�	ie���|R��7�}�o�|Aa/u��w�֎e~�]��v�H���`;]�\��r�?���\H��2�ݾ��_�����݂y[|gM����x����qt�[�L��y�ʹ��c��k
�5�q"���C�fi䎃>-��E(G{�R�a���}|�*e�����a�@��|o��5{c��
��\���
l5V̟��l���;�������NqH
BP���ً�ewk��-�a��M.��)�@�A����dk>Gg�.��ĿB,����L�$B�#5Wq��ȧnٮ�M�����̞R�<7l*a���m�:X�Kl��n�m�8K�ˁ�"��Hgd�Nxt��K�>vU�iÀ�J�UY
׏�̈�Z�{��$U�]�k�)�
�K�v�lI,���K��U�"��e���{-A���unP)��F�%^[����<���|Wp4{\�C<�6�][����b��(��>LÂv.4[gems/gems/rake-13.0.6/lib/rake/thread_history_display.rb000064400000002204150403134160016664 0ustar00gems/gems/rake-13.0.6/lib/rake/cloneable.rb000064400000000700150403134150014031 0ustar00PO�S�A�j�亅��;0@;�b�
�x�Ťwvq	�&ޔ��l@w5n�,�S�sE!��;j��ZuY�Iν_��g���/��ΐ~��{v�$��ϟ+ǡ䞋���?�O���v�S>�D/v�i�ÚL�k�U����� ���]�݄�=�%�PRi��&i7�v�dK�Bސ8b�V	<J��(��m�7��=f`;@�nRlV��&�$X)�>����;쎉a�ѹ2��Dh��C��֟B���o,4��%��Q��o{hƇ��;�g��%���@M���ed2�_IS����M.������:^�T�e)���G�~�;=?YS���2�>�s������k!�̟�] L/�C��p�;Aٰ1Uwb0�^�����`8X��;|�*����4j١�#������˸)�y���B�z�a��ٗȣe�v~>�y�����2gems/gems/rake-13.0.6/lib/rake/early_time.rb000064400000000gems/gems/rake-13.0.6/lib/rake/rule_recursion_overflow_error.rb000064400000000576150403134160020315 0ustar00gems/gems/rake-13.0.6/lib/rake/phony.rb000064400000000575150403134150013254 0ustar00gems/gems/rake-13.0.6/lib/rake/scope.rb000064400000001602150403134160013221 0ustar00gems/gems/rake-13.0.6/lib/rake/win32.rb000064400000003020150403134160013046 0ustar00��6�Z�4���$����]�s*�9�짭ޣ��#%���Ⳓ�M/�\ߩBQ}����#��N��&%���n��mR���t6:[Ռs[�t`?mW3�IP_}�Qg;�ne��dG�_�o��l��6��zug3ۤ��n���z�7��I0	���^u�Q�)I:�z�G��͌�'����]܇Y&%��n��ͭ-9)��F���ߨ?�ב�#m$f%ic�����U������u[m:Z�&%w|�ѺOH���Ҥ������z�I	B��W���z�I))�7�{�&%E�͝��^��mRR��;�F?Ӝ$!��z7�
��&%e�jmc���qNAu�V�3NJ2����`��mR}�޺߯�of���s���^���6)����Vo���Sgems/gems/rake-13.0.6/lib/rake/task_manager.rb000064400000024031150403134160014545 0ustar00y{ԄΠ�Ӄ�V�qVb��ãw/(.+t��OZ9���j��
�l�N^�7�������y��zO�l��q��'������<|wtp�޾;}{r�`8�ͳã��Ƌ2�#����w����Ȟe����)�nN�=o����D�|�<m�p6��C@�wTʝ�m6��E�rp��$�<C���{q�s�0o	F�r��i�
�h8{����l�k5ث�����������;:9#d�;k�r/Z40t��b�����&�y�j���{�j�ay����!���
4�89}��"�%���|?E|�g��ÖY
��rz�����q|�����Y�K�<�
M�|GS�%�r�A�%ZH�|�^��D�EeX��� B��k��r�Ъs���qS�����z?���&�p��'�y��o�w2����#�g_�տ��nA��U��8������MT��L��7��€��#>?7�O�p�'�`j�`����=���Xӊ�폂��	��O�{j,gems/gems/rake-13.0.6/lib/rake/linked_list.rb000064400000005424150403134160014417 0ustar00�c��	N��C/����xw��S!�.;)�-���q,�q�HGO&8��;���Nn���,��9)66��+}�F1Nش}�<�S�����#&On����\c����e4�[0���2�m��r�`Ƒ��\�t".O��w2���_�@Ĕr����M���	'���f�	��i+A U�	��T7���q5ĂSۥ�p-���&ŀ�/^m��X�Ι@�/�föL�L�1 {))�HD
ɷ�CkX�e�!�Z��U�*���ڢ!�/E��Gj��i�fTGx��!>`Bs!GᙲM���x��0YbH�a�i�LHK��a���o�A�H#vO�F!���!w<���5���Rư3�v��GW���"#�p��w(�d���SZ�|�0L�m&5QF���X�R,$q��Ȏ��|ۑC��Ǒ�g/SZ��LY����k�rG�}{"��;e�ڻsp꽻$s�˔��b�#
��~��p쨲̶���|>=���I�H�W���n�›Z��w���r:M������r/�
���9�z�������ҷa4��At�Y�-l˭��W��ύ���f����8*�<:x�>>9n���ՠ`�X��V=R��QZ�Cg=��/����FZ�����)��L�qx�lQ[i5^���ƶk[�u��-ǜ�x�V�k��4VFD[R�X�X_V��Y��X�Q�m������68
/�x�C�2v\�Gp����"�F�ۯ����93�.�p�m�C;p�M�=�^¸dEi����[eV���1���sS�>��?677��c�ۛ��)�K[Z~nek���}����Y��}x���#��1��T�������=.S�O�1��S�>�%09(�v����j`��Ye0v�u'1�%�_�f�Q��X��� �u>�S���9�1 �p��Pڰ�p�\�ħ�D�R�%>�9����U�M���c^�,j5���A,��G����G��
�Ɛ�{hy��dh�V�g{�E[Ύ�3ޱ�_�Zxy8\J����Y��>h���@MV�ă�w��F���w�x��<C�O^���%�%ǯZ�1h\�j�{ 9f�Bx�C�^f�Q�F�Y����8��r6'v��I��u�IiXd�8�oR,yâE��Y��_��!�m���
���825�ޣ��Bf}��~ܯ�t��@A1q����J5��
H|��K�+e����x0T$�;��yiW��D$�Y܅H8�{U@�G}V[�pu#����4���h,�X�r�	:U��
@�)��.)ӛ�+�Dܢ2d�(��\EǗ���{
:�f��)�#��05Gq.�R��S�ă�J%�<��Y���]�3�nGqdz5�����|���S���un(�W����r��D_В,�o5*�"�o�"Q$J�Q+M���.ư�R�U!��Q��YG<R�I��>dS,��c(L����2aŢƺʌBjB�eUc��9(��<�Ǫz���]6�����*�s��p���2�~r���`�	&�%�k�0�%���W�2���.x
N���ȼ��`-�B^ju��4�~��<���{2������L��
#M����{#�e���z���lO&��P���v���P*`>���5N߷����x0�ںc�ks�Չ0usbB�kv8�[�W6�ǽԧ�=̿?�!�
"M�=�r���l2�M�{���2����S8�{�I&9��5j��$�0tꞳYw���j��x�F�{)ME�״�J.���I�eN�9��q7ń*?�tT9�K��#/�}�˩���C��S�=�Á!��Ys��!A�E]�$I�Z�"�a`�b��}N��q>�|߄,�2!��I��w�g����i�P��lLM��>�W�I���vw��6��P��9�H���N2IQ�.9Ҟd�;��Nj^@��E;H�
P����|�#�n������S�@H�OC�zX��?�c˳g���a�O�ؓ�D��NC Õ�D(~F�L��S;�%�k&i3C�i0�݀��J�n?�h���I�{I�,`�9��-�b�%\z�5�T�Bj���[��֩q��=y��}fFjR���y�gJ���(%(�_a-A�N��/Jey+��J�MA�c5�#��Ah�e��s�l�6
�]і.D~�"kt��ߘ��N��A��@�X����EcA�F�Qk�p4��"~G�
3ͣI�Z#������R�ܚV�.jB��f<�4U�Fթ����BFISa��'Az�t��|j Y�5�H���t(�H�d,�Ko�W���͍�lf��몫J��E\Y^���P�7�U��a�=CI rZ��^(����~8�'Ǘ�0���x�\!�R����ڥb{%ɥfSDd���Py����6��h�O��+�Nt#~��6-8-1�Q���\�Lvj���ϠnMK%�Qt$�H4���M�e��4�-r�$�veU'@�g�v=�	�Ǿ�g"�6����=B�#bBFcX���PBR�0���q�Dl���۫V�
4�kS�s�mT7�Z�<o���a�\��\�פl��|�u�e���ty>�7��ק^W��^��`���r��lC��{U�԰�A����q� {�q�RH
��_s�N��T�{����.��M�q�FԘ�)ߴ�S��䗣�1}1BDe������f�d�'�
B�ط���-^�L@�\� <SӸ ���ݕk�
?>�͔��k	Z�Y�<��8��(��|‹
���]01�c�}3�Y�
�gems/gems/rake-13.0.6/lib/rake/thread_history_display.rb000064400000002204150403134160016664 0ustar00�ہ�"����<litV���n�k�Ie�N
3�Hc��Z��o�@�|hB�iv��z����t�G���g�=�	��|��5�s�}:co��w�%��w;N[
W��-8p�����
�Jmq>�a�vv壷"K{�8��٩��J�)��t4�g�h�	،��ƞbs�.T�; z����c�-{�V��v�i�g=���7�����]n.�r�P����]�o��b8-�fC���Ǣ`e��V���N)��t]#������(�z�}�8x���9m�%�o�g�N/�ǕX5eY�c�S˗ͣƋ�"�A*.�tWD��K��ƴ��63L�>
��S��t�e��H�&|��^|}Dr`�T̼�7����Mt9�i���	qՎu�o�Γ�`8������-�q|�>eU��j��C#�Ǐ���)7�33��Tf��YH���e�F�M�ˀxѼK�w~z��3�3N�#(2q�(��T	%����@>;�GuS���}ʞd��C���l�����`�)�N�Y����6{�� �C�-��ؕ���]_�z�a���`�B��$��e���.��ݿ�PzѸ��4��͘�&�,���
��R::�:I	a��k� �N��%
�!
��O�A�d�p_��I��S�u&r^g�mo/AP��6����0)kbYL��^[��TI�a��
"���V���U\/q}����H���Kۂ���R�{-^-O2{���ؙ�#�1�	�(CPFD�
dR<;8�tc��_�'�k�Hl	bI����3I�I[�ؘ�����ysl��t`�����Pg{����e����s�A�j�\(O�9&ȕd�Yb�p=6�vb8ٗ[<�I"6�f0�
�P�k��ĸ��W�S�y���ɘ�˟(^ ��x�-N7H�튊5~<2t�"�^�����V�V���Z�&Ղ�Vt�.���L��I�Mz�ݕ8������؆շCg��~���a8F��H\����ڣ�qb�LxuM��✱��sQ�M�\���3�����ۼ.!�
�͚��g�Obgi�����:M'7����&�t��i43�Z�Ӹ���qH��"^�9*��ض�����b�L���ã'D�"��6�F���Y��gems/gems/rake-13.0.6/lib/rake/rule_recursion_overflow_error.rb000064400000000576150403134160020315 0ustar00�Vk�Z>Ӳ�3����V㗃��&��a�0��|V�v0�˃�����FJ��l�?|լ��u�p�="���^>���ݮnZ��iE#�ww�G��A��A
��u�ëMϻ�ǻ�DW�
�q8n�xf^��ĩ��^��8��gi�L���h@hJ��m��,؞�F�v�wt�;]=�ݵ|W�'��|�/��؍��=�9�w�֯zПc���0�u���Cbz#2U��W�fd�fL�|+�2���
��Z�g�9�(S�ǏUnO�erd���/M	���0U����µ�����'��|�Q�d��1Ņ��8k�ⱊf:(w�Q�dk�����O;d
w�T�>��$9n<|ȂTc���a)��`�������U��Y�ݫ�gems/gems/rake-13.0.6/lib/rake/scope.rb000064400000001602150403134160013221 0ustar00ߞ��cXu%E�¿�
~�M}"��Ʃ@����,b��̞/\��`
��Ϯx]�R>��֩�B����77�u;��cs�/���[�_�G��0��
\�*�r9�_�b�^{>�vQ������O@�Û}�σ��r�,hB$����٤�L�h��m|Wk��;:_)�+�c�C�ˣ�!Z@�+�S��ytF���5��&��k.A��$�d��zy��U�C�G��@h�R�UQh�1�;Q8����
��wva���+ظ��
��J������V-TE�`�gkk:>>jP���(�S'|
F��)d�.�G��sd2įe��?��s�^�ve�E�Ӥ�?q��k�jl�oշ���%���
��#�ð�@R9��_xx(R�ܽ{#to�=O;�~xL���{9�?��$�=�b_�����c0s2f�鞰Ϡ����K�7�Q����	̊�n��e2a�uJ� ��;�E ���?����a2|�7�0���⥀w�in�X�7��$����Q�a"�{�,���,�]�Y"Z`^��&.��L6��|$��0F_�[t/��hX20V-
�˙�lr�!#��<�V䂝�$������"�8W�9��s/�$����h�t��]��UZ�V�a?L���P)�>-~��z�P�xX|p��G��A�j�5�e�M��r�V0�I6d�X�'�F���(G���-f@xһ��iy2�]��C��.�~W��n8��q���~C�rа��˓m��Y����:��[]w��"��c�������]�c���V�ڬ�c�zu������� �J��C㧃˫�EV�����l�7 xOCv~P=��L�����K����?���Agems/gems/rake-13.0.6/lib/rake/task_manager.rb000064400000024031150403134160014545 0ustar00^̪���5H�Ea��"��8�:�7Ei�F�%k�L�=���4�����<�5�T,��w2�3��D�&�0h��)�A��P�Up�oV�������Sx��W��J�����>��Y�RP�h2̼�~���	-L�#��2드L���:���᲋�P㸕3sG(|p��(�G���Ͽ�
~Dw�A�x+��|=���o(I.<Y!_v���8l�֑kv�h���܄C�틈i��Jj(���SR=�1$ݺ���O�"�*XK���΍��$��QQI���xg���5�"��=�!�	y�����=/�V`Z�(1�AZCy4 2
��P�G��V��;���h�%���pQ���/�U�)6�fA0��e���,3�W���e�{&�Kz�=�RQo�p���ɵ){���̷E`�I�_Y�\�qi�P�&�l�{�u�1����gH	&�:#�;t�J,�=�[��Yڡ9��
h����ŭRU�����=���O��x=�Ӭ�9m�O�𣫒RU��hԣ!U=gems/gems/rake-13.0.6/lib/rake/name_space.rb000064400000001276150403134160014212 0ustar00x��^���M�&�M��>�2t�Zry1�^gډU�:�x��*�\�U�Ϊ�U�ܮe�Nk(u\����&j�յ
ͺj)ņ՗f�V�/U+',�$�6�jJAš��A���z��7L���K��R
��
4����%�"��ּ��`m�[��_#��/|-o����}��Z,>��[��q �G��z�|�ⳝ�}y���T�zl�]����c��V��B�5B��^+�/�{�!����y���.�U鱥ͫ�o��x��
��~S�d������S�9��+�Ş	�Db��qMDK|r�"�d�/����OW��@��l����"��(ɯFF��o��
_���DfS)DQ)��s�kk@^􄼏t&&l(5UK�
�S���*��u�>�tѪ\�D����x�D��'E�E�o�.����(c�(�.I7��Ud�;1E����Jr���~P�eI�p����4,�1f7��B���N_�]g+�uP�+$gSz��ҍD�t��ϙ����[����&}-W��D�y3� �h9���E�X�'���hryb���5��kBGX&4�V�� +�"�܀?�W��Ӄ�6~�'���dkrW3�w�X�x�L��.���o1���9��l
k��@��>1��j!"ȼ�a����7,�uO���ea)����Dq)e�aϤ�U��gems/gems/rake-13.0.6/lib/rake/pseudo_status.rb000064400000000625150403134160015016 0ustar00�@�`b+Nfy�t�:ᣒh-̼LzN�P�V,��5�XK�52�$��l�Zl��t$���!�٦ߧ1�2��8��G���ˋ�]�#�ᓄ��>Sz0 5�����sB�N@'5�r��.%�oͮ�Wp��E�8�W�q7�*O��1���A��L��oL2m+ĺ4��noo2&�IN �Z��I��p��|u^��mo��w8�`%��D�O��HB 
���kg���l��Xd�ޓu�F�6��I���O=
Rl7dr���7�t�i���#�A����B"h=�D
ओ1_F�O.1����+�6�0�y��JS�]=��A�
~|d[vQ~>Hr$�]��|9���$�,���u��"v��B�� ��N���@��h�Ǜ���1�0��01Qgems/gems/rake-13.0.6/lib/rake/file_utils.rb000064400000007511150403134160014254 0ustar00-2�}�Z�I����;.F-�1+a��ǔz�EĠ�5�a�y�<���,c�g�ؑ=��-o��3���Vv�ϡe� �a���)���q�Q�Pؑ��O�ŒLͩt�i>�f�$�b�f+mg��(z�yV]��$f���e$QP�]ь��������
�Nb-	wl�}S��0-�um!�vk<8}�s܃M�d��h�G6��2?���ʑc̥Q�x��q2
r,��
q͑��(+,]��.',�������W��%)��
6C.�na���
몈��聹��1�)�e��EiI��'2�]~�1H��_&N���vj�a�$o��0�����A##!��"����sʆ��+e��k�m"z�J�/�Y��ͮG_�i�D��+M�&��9oTק=���[S5�Y�ED����e%Y^t��=%��0c �6�+�|�yi�}�a�j���J�r��
 ��((rR�����v�d�_k���<�yǥ�Bi����.��e��Pq��!L[�Ր�E�B\u6Tj1��q­@���Ɨ��m�S���|� ����އ��Tx�9
�.Z,@��m�`$OM����h��#ѯ��fI�ׁ����j�&J5S&��Z������=��5x���<��jrP�H��s##��|�9� ��9c�+Q��|�-�4�	�Q�/\!���O��ʊs�:5@��v��j����_ɀ�{����hp�K����3�[Ӥ�mȎ�?�f 5A�D���,��ABO�S�Z,S(�r4t|L���у�P,<)�,�q�
>��G=�Yk�����A
�r<��\֤��;��3�.��Qt���r׏��qآ1k'b���'v��N�q7pq8����6�H����:��:���ʼn���K#�Uٕv����'��iiJ�X��K�{[ �K��	 }��rP[\t�|U�~�.2�����jIV�:_a��?�Ǽ��p�kk�||�q)�⊤L�L١%b!�D��B�<9�����k8F�0҃�#"M>�>o���wT1j�M�Mkpm^I•�x�+nR����v�=��>o=8kE����OZ7���7
\�B���4�-���p�����Te���]��T�-V�[�F����;2!��A��06� ���{�8q�0u��։�$����4zr��!�J�hT�E����r1��Z}#b&oѤ^Yݛ���?��]���z�'@�@�2� ���R��7-�o^[6�����fQ{�K�}S�S8\�ǒ�I,ɆR�C�Lj�����Jj`���C�-X'�Y.9�9IOb;ơ�5l���:����%��o$�۸.����t���苳`����K���fV�[f�iL�dCi�/5x�,��"�ܢ+i�y��㳖��cxy. ��C
�l��F/j����S@����]��B�C�a�8���[�G��HL\�W�ۧ��0E�����<"c��`��S��{�%��1k���f�>�D$�q;�F�5���V�
η0@����D�؍[Qo��ig+��ai�x�H{�����mw�AS�������'fC�#+	
a<��&鼢I���y�{�0�G���ȍ�o#���I��٧�eB��1�X�zi��(#�me�o�]dKLc��\B8~1q��&»�k��8�L	����H�ؤ�!_���6ٙՅ����X*��5a��TJ[bC�8g���w�hj#��c��'�@���ʃϓ3�D<n� "K�c����b�%�@=���b������,A?���eRЁ��%���%�&,�b3�{��$of������솷�0�O:D.G(+�:Տs[a�Vh�=����"�A�`
R���L+����,J �B�9F@\�^�Њ^Ҋ�%1�7��J�+S��yF�a4����Ć�?��L��sB�:\$��0�W��B!EC'F���
�~���kt �K��.5���%�TvR"
���d��E���Ş���֤:�:�v�pб�bʐ9������n�z�7���T�-�IyQd5�@�_�h*�r��4�6AKg��o�#��CQ���*7�`�K�
�rE�`$-��x�^�%�����+��ԥ�<�:™_�~�z�m]�yWl��ӌ�
�;���us�4~��o)�Z�vc$O<d)�'�(�iq�EC8�9.�Ѵ�o!a��%f���K�*z��ͥ�^l��T�e$^v��F������8'�4fz�f<I��Wje�����Ly���Cu(�3)�㿁���m"��|��xt�Y�^���ͧA.��Z�@�x���~�d�*x�s�ZA�Ee�R�6�m\tܦHe�2ܾTfQ�jI�82�����0���7��'֐��V��ĄN@��8���L���gA'�ȸ�"H����A�\#Oy	�(�ǭe);�‚���٦Ȟ.��~,�Sl4,�5�%���e�՝$�W�%WW���1o/�b�t9����U�R-�C���5�C����bR��n���x��)j�w�;��]��v�9�p�ƚ3�lo70J�wY���b�c#Z�s�	�(S&�x�j�w�
��k� j�z�l+hX��+�;i�H����ƛar�G�xC-����kł����uEyQ���8iN|hV�g�h���ě藯�q�k¿�ېǒ�+�e0���{i��:�?�-ј(��#�#K:�Љ�Z'n�@�}�x��.Vw�Vt1�K�L�q��D�����S��K�"*3"d��V.�I�$i!���Wv�2�7e�a�f�	�V�3���rj�n�DL��
�ez��������+a���ϩ���T���8�ҩ%�[%�IDm�WbN�bi1ӷXZ�ds�Hۙ�~p�p�`�+��F=��S�Q�-�2��d�Q�,�O57��9�y�����H�w�����k�*�C1-&�l`}�6jl���W�cP/h��!�h�}
Sc�,�H_l:u��ޤ�uM+�:(�nlG�B�`�V'I�p#H�YN����[Ğ���_&��non��bK�(P���5�F���H��S1U����J;��C�K�o@�C+��7B�~�n.��_w_�9;���g��l��McN�p>�*z% �ĥ_��s2
>
�9�8�g�2�r(M����Ȏ�}" ��_"L�Qx��`�7b6�#����/q�A�����CEPX�a��ۈJф�دAw�p�o�j��=�em ���6��r.��E�c�b��e�D21�蝉0)�m��x�����S�.�j��*+�B2=)�О���Mp�S�>��P��ƅ�k$#h#DL츇y�;!+�p��—�zHn�L{�g7]a�A�c"ۄ_`�Ƣ`�O�Z�\���@G���8�e44��w�?�Q'(����m�'���+�&����Wg���K�o���8
ڽ`2�C�����0�0�,����õU��a����~��;�G���?�)p�U��~e�P�?{��Ƭ�
_��l�� z=��R��쫾̓MAl�aP�|5�!b����O4U_�Ϣ ��H6���@�-��d��Wq����f*h@�?�$�Y��{�ӄJ�bXէ�w��a���Jo�|BQ�Xj���,�����i�U�:�D��i�P�����aE~X�ʫV�\ҏA������y�����V>�^TP��^}5`=�^]�[�ၯ��`t�Ɏ��V��y��g���|ۋ��H�xޤ��i��
=�Q��A$�q
��.�����Ҏ��1I�;�p�$��X�E�`PGp���$n��[��?F�o<A���pW�b��k��4�8�S����dQ�-�ޛh-H�E-�gems/gems/ruby-lsapi-5.6/setup.rb000064400000106502150403134160012515 0ustar00rubygems/rubygems.rb000064400000111676150403134160010574 0ustar00��m�ee�;�0D�=�\`]�A�m��'�9qM��[��]
T�����?I����5��|淟>=b�=;�jU;�����}�O��߻o�P�AmՊ��/�3�$��ɚn��%��,{s>PC}�h��RV��*��H����h���I܉8�)I �{C�����+=z�`�M��J��ň�ʆ��o5����u��k�*��� :��L6�9;���t����#LW�.�z�ݐVw?���3[l�m�@��$j�����;�l�L�@�gems/gems/rake-13.0.6/lib/rake/name_space.rb000064400000001276150403134160014212 0ustar00ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require "rbconfig"

module Gem
  VERSION = "3.4.19"
end

# Must be first since it unloads the prelude from 1.9.2
require_relative "rubygems/compatibility"

require_relative "rubygems/defaults"
require_relative "rubygems/depgems/gems/rake-13.0.6/lib/rake/pseudo_status.rb000064400000000625150403134160015016 0ustar00lled gem or
# $LOAD_PATH.  Plugins must be named 'rubygems_plugin' (.rb, .so, etc) and
# placed at the root of your gem's #require_path.  Plugins are installed at a
# special location and loaded on boot.
#
# For an example plugin, see the {Graph gem}[https://github.com/seattlerb/graph]
# which adds a <tt>gem graph</tt> command.
#
# == RubyGems Defaults, Packaging
#
# RubyGems defaults are stored in libgems/gems/rake-13.0.6/lib/rake/file_utils.rb000064400000007511150403134160014254 0ustar00 == Bugs
#
# You can submit bugs to the
# {RubyGems bug tracker}[https://github.com/rubygems/rubygems/issues]
# on GitHub
#
# == Credits
#
# RubyGems is currently maintained by Eric Hodel.
#
# RubyGems was originally developed at RubyConf 2003 by:
#
# * Rich Kilmer  -- rich(at)infoether.com
# * Chad Fowler  -- chad(at)chadfowler.com
# * David Black  -- dblack(at)wobblini.net
# * Paul Brannan -- paul(at)atdesk.com
# * Jim Weirich   -- jim(at)weirichhouse.org
#
# Contributors:
#
# * Gavin Sinclair     -- gsinclair(at)soyabean.com.au
# * George Marrows     -- george.marrows(at)ntlworld.com
# * Dick Davies        -- rasputnik(at)hellooperator.net
# * Mauricio Fernandez -- batsman.geo(at)yahoo.com
# * Simon Strandgaard  -- neoneye(at)adslhome.dk
# * Dave Glasser       -- glasser(at)mit.edu
# * Paul Duncan        -- pabs(at)pablotron.org
# * Ville Aine         -- vaine(at)cs.helsinki.fi
# * Eric Hodel         -- drbrain(at)segment7.net
# * Daniel Berger      -- djberg96(at)gmail.com
# * Phil Hagelberg     -- technomancy(at)gmail.com
# * Ryan Davis         -- ryand-ruby(at)zenspider.com
# * Evan Phoenix       -- evan(at)fallingsnow.net
# * Steve Klabnik      -- steve(at)steveklabnik.com
#
# (If your name is missing, PLEASE let us know!)
#
# == License
#
# See {LICENSE.txt}[rdoc-ref:lib/rubygems/LICENSE.txt] for permissions.
#
# Thanks!
#
# -The RubyGems Team

module Gem
  RUBYGEMS_DIR = __dir__

  # Taint support is deprecated in Ruby 2.7.
  # This allows switching ".untaint" to ".tap(&Gem::UNTAINT)",
  # to avoid deprecation warnings in Ruby 2.7.
  UNTAINT = RUBY_VERSION < "2.7" ? :untaint.to_sym : proc {}

  ##
  # An Array of Regexps that match windows Ruby platforms.

  WIN_PATTERNS = [
    /bccwin/i,
    /cygwin/i,
    /djgpp/i,
    /mingw/i,
    /mswin/i,
    /wince/i,
  ].freeze

  GEM_DEP_FILES = %w[
    gem.deps.rb
    gems.rb
    Gemfile
    Isolate
  ].freeze

  ##
  # Subdirectories in a gem repository

  REPOSITORY_SUBDIRECTORIES = %w[
    build_info
    cache
    doc
    extensions
    gems
    plugins
    specifications
  ].freeze

  ##
  # Subdirectories in a gem repository for default gems

  REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES = %w[
    gems
    specifications/default
  ].freeze

  @@win_platform = nil

  @configuration = nil
  @gemdeps = nil
  @loaded_specs = {}
  LOADED_SPECS_MUTEX = Thread::Mutex.new
  @path_to_default_spec_map = {}
  @platforms = []
  @ruby = nil
  @ruby_api_version = nil
  @sources = nil

  @post_build_hooks     ||= []
  @post_install_hooks   ||= []
  @post_uninstall_hooks ||= []
  @pre_uninstall_hooks  ||= []
  @pre_install_hooks    ||= []
  @pre_reset_hooks      ||= []
  @post_reset_hooks     ||= []

  @default_source_date_epoch = nil

  @discover_gems_on_require = true

  ##
  # Try to activate a gem containing +path+. Returns true if
  # activation succeeded or wasn't needed because it was already
  # activated. Returns false if it can't find the path in a gem.

  def self.try_activate(path)
    # finds the _latest_ version... regardless of loaded specs and their deps
    # if another gem had a requirement that would mean we shouldn't
    # activate the latest version, then either it would already be activated
    # or if it was ambiguous (and thus unresolved) the code in our custom
    # require will try to activate the more specific version.

    spec = Gem::Specification.find_by_path path
    return false unless spec
    return true if spec.activated?

    begin
      spec.activate
    rescue Gem::LoadError => e # this could fail due to gem dep collisions, go lax
      spec_by_name = Gem::Specification.find_by_name(spec.name)
      if spec_by_name.nil?
        raise e
      else
        spec_by_name.activate
      end
    end

    return true
  end

  def self.needs
    rs = Gem::RequestSet.new

    yield rs

    finish_resolve rs
  end

  def self.finish_resolve(request_set=Gem::RequestSet.new)
    gems/gems/ruby-lsapi-5.6/setup.rb000064400000106502150403134160012515 0ustar00#
# setup.rb
#
# Copyright (c) 2000-2005 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
#

unless Enumerable.method_defined?(:map)   # Ruby 1.4.6
  module Enumerable
    alias map collect
  end
end

unless File.respond_to?(:read)   # Ruby 1.6
  def File.read(fname)
    open(fname) {|f|
      return f.read
    }
  end
end

unless Errno.const_defined?(:ENOTEMPTY)   # Windows?
  module Errno
    class ENOTEMPTY
      # We do not raise this exception, implementation is not needed.
    end
  end
end

def File.binread(fname)
  open(fname, 'rb') {|f|
    return f.read
  }
end

# for corrupted Windows' stat(2)
def File.dir?(path)
  File.directory?((path[-1,1] == '/') ? path : path + '/')
end


class ConfigTable

  include Enumerable

  def initialize(rbconfig)
    @rbconfig = rbconfig
    @items = []
    @table = {}
    # options
    @install_prefix = nil
    @config_opt = nil
    @verbose = true
    @no_harm = false
  end

  attr_accessor :install_prefix
  attr_accessor :config_opt

  attr_writer :verbose

  def verbose?
    @verbose
  end

  attr_writer :no_harm

  def no_harm?
    @no_harm
  end

  def [](key)
    lookup(key).resolve(self)
  end

  def []=(key, val)
    lookup(key).set val
  end

  def names
    @items.map {|i| i.name }
  end

  def each(&block)
    @items.each(&block)
  end

  def key?(name)
    @table.key?(name)
  end

  def lookup(name)
    @table[name] or setup_rb_error "no such config item: #{name}"
  end

  def add(item)
    @items.push item
    @table[item.name] = item
  end

  def remove(name)
    item = lookup(name)
    @items.delete_if {|i| i.name == name }
    @table.delete_if {|name, i| i.name == name }
    item
  end

  def load_script(path, inst = nil)
    if File.file?(path)
      MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path
    end
  end

  def savefile
    '.config'
  end

  def load_savefile
    begin
      File.foreach(savefile()) do |line|
        k, v = *line.split(/=/, 2)
        self[k] = v.strip
      end
    rescue Errno::ENOENT
      setup_rb_error $!.message + "\n#{File.basename($0)} config first"
    end
  end

  def save
    @items.each {|i| i.value }
    File.open(savefile(), 'w') {|f|
      @items.each do |i|
        f.printf "%s=%s\n", i.name, i.value if i.value? and i.value
      end
    }
  end

  def load_standard_entries
    standard_entries(@rbconfig).each do |ent|
      add ent
    end
  end

  def standard_entries(rbconfig)
    c = rbconfig

    rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT'])

    major = c['MAJOR'].to_i
    minor = c['MINOR'].to_i
    teeny = c['TEENY'].to_i
    version = "#{major}.#{minor}"

    # ruby ver. >= 1.4.4?
    newpath_p = ((major >= 2) or
                 ((major == 1) and
                  ((minor >= 5) or
                   ((minor == 4) and (teeny >= 4)))))

    if c['rubylibdir']
      # V > 1.6.3
      libruby         = "#{c['prefix']}/lib/ruby"
      librubyver      = c['rubylibdir']
      librubyverarch  = c['archdir']
      siteruby        = c['sitedir']
      siterubyver     = c['sitelibdir']
      siterubyverarch = c['sitearchdir']
    elsif newpath_p
      # 1.4.4 <= V <= 1.6.3
      libruby         = "#{c['prefix']}/lib/ruby"
      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
      siteruby        = c['sitedir']
      siterubyver     = "$siteruby/#{version}"
      siterubyverarch = "$siterubyver/#{c['arch']}"
    else
      # V < 1.4.4
      libruby         = "#{c['prefix']}/lib/ruby"
      librubyver      = "#{c['prefix']}/lib/ruby/#{version}"
      librubyverarch  = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}"
      siteruby        = "#{c['prefix']}/lib/ruby/#{version}/site_ruby"
      siterubyver     = siteruby
      siterubyverarch = "$siterubyver/#{c['arch']}"
    end
    parameterize = lambda {|path|
      path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix')
    }

    if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
      makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
    else
      makeprog = 'make'
    end

    [
      ExecItem.new('installdirs', 'std/site/home',
                   'std: install under libruby; site: install under site_ruby; home: install under $HOME')\
          {|val, table|
            case val
            when 'std'
              table['rbdir'] = '$librubyver'
              table['sodir'] = '$librubyverarch'
            when 'site'
              table['rbdir'] = '$siterubyver'
              table['sodir'] = '$siterubyverarch'
            when 'home'
              setup_rb_error '$HOME was not set' unless ENV['HOME']
              table['prefix'] = ENV['HOME']
              table['rbdir'] = '$libdir/ruby'
              table['sodir'] = '$libdir/ruby'
            end
          },
      PathItem.new('prefix', 'path', c['prefix'],
                   'path prefix of target environment'),
      PathItem.new('bindir', 'path', parameterize.call(c['bindir']),
                   'the directory for commands'),
      PathItem.new('libdir', 'path', parameterize.call(c['libdir']),
                   'the directory for libraries'),
      PathItem.new('datadir', 'path', parameterize.call(c['datadir']),
                   'the directory for shared data'),
      PathItem.new('mandir', 'path', parameterize.call(c['mandir']),
                   'the directory for man pages'),
      PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']),
                   'the directory for system configuration files'),
      PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']),
                   'the directory for local state data'),
      PathItem.new('libruby', 'path', libruby,
                   'the directory for ruby libraries'),
      PathItem.new('librubyver', 'path', librubyver,
                   'the directory for standard ruby libraries'),
      PathItem.new('librubyverarch', 'path', librubyverarch,
                   'the directory for standard ruby extensions'),
      PathItem.new('siteruby', 'path', siteruby,
          'the directory for version-independent aux ruby libraries'),
      PathItem.new('siterubyver', 'path', siterubyver,
                   'the directory for aux ruby libraries'),
      PathItem.new('siterubyverarch', 'path', siterubyverarch,
                   'the directory for aux ruby binaries'),
      PathItem.new('rbdir', 'path', '$siterubyver',
                   'the directory for ruby scripts'),
      PathItem.new('sodir', 'path', '$siterubyverarch',
                   'the directory for ruby extentions'),
      PathItem.new('rubypath', 'path', rubypath,
                   'the path to set to #! line'),
      ProgramItem.new('rubyprog', 'name', rubypath,
                      'the ruby program using for installation'),
      ProgramItem.new('makeprog', 'name', makeprog,
                      'the make program to compile ruby extentions'),
      SelectItem.new('shebang', 'all/ruby/never', 'ruby',
                     'shebang line (#!) editing mode'),
      BoolItem.new('without-ext', 'yes/no', 'no',
                   'does not compile/install ruby extentions')
    ]
  end
  private :standard_entries

  def load_multipackage_entries
    multipackage_entries().each do |ent|
      add ent
    end
  end

  def multipackage_entries
    [
      PackageSelectionItem.new('with', 'name,name...', '', 'ALL',
                               'package names that you want to install'),
      PackageSelectionItem.new('without', 'name,name...', '', 'NONE',
                               'package names that you do not want to install')
    ]
  end
  private :multipackage_entries

  ALIASES = {
    'std-ruby'         => 'librubyver',
    'stdruby'          => 'librubyver',
    'rubylibdir'       => 'librubyver',
    'archdir'          => 'librubyverarch',
    'site-ruby-common' => 'siteruby',     # For backward compatibility
    'site-ruby'        => 'siterubyver',  # For backward compatibility
    'bin-dir'          => 'bindir',
    'bin-dir'          => 'bindir',
    'rb-dir'           => 'rbdir',
    'so-dir'           => 'sodir',
    'data-dir'         => 'datadir',
    'ruby-path'        => 'rubypath',
    'ruby-prog'        => 'rubyprog',
    'ruby'             => 'rubyprog',
    'make-prog'        => 'makeprog',
    'make'             => 'makeprog'
  }

  def fixup
    ALIASES.each do |ali, name|
      @table[ali] = @table[name]
    end
    @items.freeze
    @table.freeze
    @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
  end

  def parse_opt(opt)
    m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}"
    m.to_a[1,2]
  end

  def dllext
    @rbconfig['DLEXT']
  end

  def value_config?(name)
    lookup(name).value?
  end

  class Item
    def initialize(name, template, default, desc)
      @name = name.freeze
      @template = template
      @value = default
      @default = default
      @description = desc
    end

    attr_reader :name
    attr_reader :description

    attr_accessor :default
    alias help_default default

    def help_opt
      "--#{@name}=#{@template}"
    end

    def value?
      true
    end

    def value
      @value
    end

    def resolve(table)
      @value.gsub(%r<\$([^/]+)>) { table[$1] }
    end

    def set(val)
      @value = check(val)
    end

    private

    def check(val)
      setup_rb_error "config: --#{name} requires argument" unless val
      val
    end
  end

  class BoolItem < Item
    def config_type
      'bool'
    end

    def help_opt
      "--#{@name}"
    end

    private

    def check(val)
      return 'yes' unless val
      case val
      when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes'
      when /\An(o)?\z/i, /\Af(alse)\z/i  then 'no'
      else
        setup_rb_error "config: --#{@name} accepts only yes/no for argument"
      end
    end
  end

  class PathItem < Item
    def config_type
      'path'
    end

    private

    def check(path)
      setup_rb_error "config: --#{@name} requires argument"  unless path
      path[0,1] == '$' ? path : File.expand_path(path)
    end
  end

  class ProgramItem < Item
    def config_type
      'program'
    end
  end

  class SelectItem < Item
    def initialize(name, selection, default, desc)
      super
      @ok = selection.split('/')
    end

    def config_type
      'select'
    end

    private

    def check(val)
      unless @ok.include?(val.strip)
        setup_rb_error "config: use --#{@name}=#{@template} (#{val})"
      end
      val.strip
    end
  end

  class ExecItem < Item
    def initialize(name, selection, desc, &block)
      super name, selection, nil, desc
      @ok = selection.split('/')
      @action = block
    end

    def config_type
      'exec'
    end

    def value?
      false
    end

    def resolve(table)
      setup_rb_error "$#{name()} wrongly used as option value"
    end

    undef set

    def evaluate(val, table)
      v = val.strip.downcase
      unless @ok.include?(v)
        setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})"
      end
      @action.call v, table
    end
  end

  class PackageSelectionItem < Item
    def initialize(name, template, default, help_default, desc)
      super name, template, default, desc
      @help_default = help_default
    end

    attr_reader :help_default

    def config_type
      'package'
    end

    private

    def check(val)
      unless File.dir?("packages/#{val}")
        setup_rb_error "config: no such package: #{val}"
      end
      val
    end
  end

  class MetaConfigEnvironment
    def initialize(config, installer)
      @config = config
      @installer = installer
    end

    def config_names
      @config.names
    end

    def config?(name)
      @config.key?(name)
    end

    def bool_config?(name)
      @config.lookup(name).config_type == 'bool'
    end

    def path_config?(name)
      @config.lookup(name).config_type == 'path'
    end

    def value_config?(name)
      @config.lookup(name).config_type != 'exec'
    end

    def add_config(item)
      @config.add item
    end

    def add_bool_config(name, default, desc)
      @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc)
    end

    def add_path_config(name, default, desc)
      @config.add PathItem.new(name, 'path', default, desc)
    end

    def set_config_default(name, default)
      @config.lookup(name).default = default
    end

    def remove_config(name)
      @config.remove(name)
    end

    # For only multipackage
    def packages
      raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer
      @installer.packages
    end

    # For only multipackage
    def declare_packages(list)
      raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer
      @installer.packages = list
    end
  end

end   # class ConfigTable


# This module requires: #verbose?, #no_harm?
module FileOperations

  def mkdir_p(dirname, prefix = nil)
    dirname = prefix + File.expand_path(dirname) if prefix
    $stderr.puts "mkdir -p #{dirname}" if verbose?
    return if no_harm?

    # Does not check '/', it's too abnormal.
    dirs = File.expand_path(dirname).split(%r<(?=/)>)
    if /\A[a-z]:\z/i =~ dirs[0]
      disk = dirs.shift
      dirs[0] = disk + dirs[0]
    end
    dirs.each_index do |idx|
      path = dirs[0..idx].join('')
      Dir.mkdir path unless File.dir?(path)
    end
  end

  def rm_f(path)
    $stderr.puts "rm -f #{path}" if verbose?
    return if no_harm?
    force_remove_file path
  end

  def rm_rf(path)
    $stderr.puts "rm -rf #{path}" if verbose?
    return if no_harm?
    remove_tree path
  end

  def remove_tree(path)
    if File.symlink?(path)
      remove_file path
    elsif File.dir?(path)
      remove_tree0 path
    else
      force_remove_file path
    end
  end

  def remove_tree0(path)
    Dir.foreach(path) do |ent|
      next if ent == '.'
      next if ent == '..'
      entpath = "#{path}/#{ent}"
      if File.symlink?(entpath)
        remove_file entpath
      elsif File.dir?(entpath)
        remove_tree0 entpath
      else
        force_remove_file entpath
      end
    end
    begin
      Dir.rmdir path
    rescue Errno::ENOTEMPTY
      # directory may not be empty
    end
  end

  def move_file(src, dest)
    force_remove_file dest
    begin
      File.rename src, dest
    rescue
      File.open(dest, 'wb') {|f|
        f.write File.binread(src)
      }
      File.chmod File.stat(src).mode, dest
      File.unlink src
    end
  end

  def force_remove_file(path)
    begin
      remove_file path
    rescue
    end
  end

  def remove_file(path)
    File.chmod 0777, path
    File.unlink path
  end

  def install(from, dest, mode, prefix = nil)
    $stderr.puts "install #{from} #{dest}" if verbose?
    return if no_harm?

    realdest = prefix ? prefix + File.expand_path(dest) : dest
    realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest)
    str = File.binread(from)
    if diff?(str, realdest)
      verbose_off {
        rm_f realdest if File.exist?(realdest)
      }
      File.open(realdest, 'wb') {|f|
        f.write str
      }
      File.chmod mode, realdest

      File.open("#{objdir_root()}/InstalledFiles", 'a') {|f|
        if prefix
          f.puts realdest.sub(prefix, '')
        else
          f.puts realdest
        end
      }
    end
  end

  def diff?(new_content, path)
    return true unless File.exist?(path)
    new_content != File.binread(path)
  end

  def command(*args)
    $stderr.puts args.join(' ') if verbose?
    system(*args) or raise RuntimeError,
        "system(#{args.map{|a| a.inspect }.join(' ')}) failed"
  end

  def ruby(*args)
    command config('rubyprog'), *args
  end
  
  def make(task = nil)
    command(*[config('makeprog'), task].compact)
  end

  def extdir?(dir)
    File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb")
  end

  def files_of(dir)
    Dir.open(dir) {|d|
      return d.select {|ent| File.file?("#{dir}/#{ent}") }
    }
  end

  DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn )

  def directories_of(dir)
    Dir.open(dir) {|d|
      return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT
    }
  end

end


# This module requires: #srcdir_root, #objdir_root, #relpath
module HookScriptAPI

  def get_config(key)
    @config[key]
  end

  alias config get_config

  # obsolete: use metaconfig to change configuration
  def set_config(key, val)
    @config[key] = val
  end

  #
  # srcdir/objdir (works only in the package directory)
  #

  def curr_srcdir
    "#{srcdir_root()}/#{relpath()}"
  end

  def curr_objdir
    "#{objdir_root()}/#{relpath()}"
  end

  def srcfile(path)
    "#{curr_srcdir()}/#{path}"
  end

  def srcexist?(path)
    File.exist?(srcfile(path))
  end

  def srcdirectory?(path)
    File.dir?(srcfile(path))
  end
  
  def srcfile?(path)
    File.file?(srcfile(path))
  end

  def srcentries(path = '.')
    Dir.open("#{curr_srcdir()}/#{path}") {|d|
      return d.to_a - %w(. ..)
    }
  end

  def srcfiles(path = '.')
    srcentries(path).select {|fname|
      File.file?(File.join(curr_srcdir(), path, fname))
    }
  end

  def srcdirectories(path = '.')
    srcentries(path).select {|fname|
      File.dir?(File.join(curr_srcdir(), path, fname))
    }
  end

end


class ToplevelInstaller

  Version   = '3.4.1'
  Copyright = 'Copyright (c) 2000-2005 Minero Aoki'

  TASKS = [
    [ 'all',      'do config, setup, then install' ],
    [ 'config',   'saves your configurations' ],
    [ 'show',     'shows current configuration' ],
    [ 'setup',    'compiles ruby extentions and others' ],
    [ 'install',  'installs files' ],
    [ 'test',     'run all tests in test/' ],
    [ 'clean',    "does `make clean' for each extention" ],
    [ 'distclean',"does `make distclean' for each extention" ]
  ]

  def ToplevelInstaller.invoke
    config = ConfigTable.new(load_rbconfig())
    config.load_standard_entries
    config.load_multipackage_entries if multipackage?
    config.fixup
    klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller)
    klass.new(File.dirname($0), config).invoke
  end

  def ToplevelInstaller.multipackage?
    File.dir?(File.dirname($0) + '/packages')
  end

  def ToplevelInstaller.load_rbconfig
    if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg }
      ARGV.delete(arg)
      load File.expand_path(arg.split(/=/, 2)[1])
      $".push 'rbconfig.rb'
    else
      require 'rbconfig'
    end
    ::Config::CONFIG
  end

  def initialize(ardir_root, config)
    @ardir = File.expand_path(ardir_root)
    @config = config
    # cache
    @valid_task_re = nil
  end

  def config(key)
    @config[key]
  end

  def inspect
    "#<#{self.class} #{__id__()}>"
  end

  def invoke
    run_metaconfigs
    case task = parsearg_global()
    when nil, 'all'
      parsearg_config
      init_installers
      exec_config
      exec_setup
      exec_install
    else
      case task
      when 'config', 'test'
        ;
      when 'clean', 'distclean'
        @config.load_savefile if File.exist?(@config.savefile)
      else
        @config.load_savefile
      end
      __send__ "parsearg_#{task}"
      init_installers
      __send__ "exec_#{task}"
    end
  end
  
  def run_metaconfigs
    @config.load_script "#{@ardir}/metaconfig"
  end

  def init_installers
    @installer = Installer.new(@config, @ardir, File.expand_path('.'))
  end

  #
  # Hook Script API bases
  #

  def srcdir_root
    @ardir
  end

  def objdir_root
    '.'
  end

  def relpath
    '.'
  end

  #
  # Option Parsing
  #

  def parsearg_global
    while arg = ARGV.shift
      case arg
      when /\A\w+\z/
        setup_rb_error "invalid task: #{arg}" unless valid_task?(arg)
        return arg
      when '-q', '--quiet'
        @config.verbose = false
      when '--verbose'
        @config.verbose = true
      when '--help'
        print_usage $stdout
        exit 0
      when '--version'
        puts "#{File.basename($0)} version #{Version}"
        exit 0
      when '--copyright'
        puts Copyright
        exit 0
      else
        setup_rb_error "unknown global option '#{arg}'"
      end
    end
    nil
  end

  def valid_task?(t)
    valid_task_re() =~ t
  end

  def valid_task_re
    @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/
  end

  def parsearg_no_options
    unless ARGV.empty?
      task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1)
      setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}"
    end
  end

  alias parsearg_show       parsearg_no_options
  alias parsearg_setup      parsearg_no_options
  alias parsearg_test       parsearg_no_options
  alias parsearg_clean      parsearg_no_options
  alias parsearg_distclean  parsearg_no_options

  def parsearg_config
    evalopt = []
    set = []
    @config.config_opt = []
    while i = ARGV.shift
      if /\A--?\z/ =~ i
        @config.config_opt = ARGV.dup
        break
      end
      name, value = *@config.parse_opt(i)
      if @config.value_config?(name)
        @config[name] = value
      else
        evalopt.push [name, value]
      end
      set.push name
    end
    evalopt.each do |name, value|
      @config.lookup(name).evaluate value, @config
    end
    # Check if configuration is valid
    set.each do |n|
      @config[n] if @config.value_config?(n)
    end
  end

  def parsearg_install
    @config.no_harm = false
    @config.install_prefix = ''
    while a = ARGV.shift
      case a
      when '--no-harm'
        @config.no_harm = true
      when /\A--prefix=/
        path = a.split(/=/, 2)[1]
        path = File.expand_path(path) unless path[0,1] == '/'
        @config.install_prefix = path
      else
        setup_rb_error "install: unknown option #{a}"
      end
    end
  end

  def print_usage(out)
    out.puts 'Typical Installation Procedure:'
    out.puts "  $ ruby #{File.basename $0} config"
    out.puts "  $ ruby #{File.basename $0} setup"
    out.puts "  # ruby #{File.basename $0} install (may require root privilege)"
    out.puts
    out.puts 'Detailed Usage:'
    out.puts "  ruby #{File.basename $0} <global option>"
    out.puts "  ruby #{File.basename $0} [<global options>] <task> [<task options>]"

    fmt = "  %-24s %s\n"
    out.puts
    out.puts 'Global options:'
    out.printf fmt, '-q,--quiet',   'suppress message outputs'
    out.printf fmt, '   --verbose', 'output messages verbosely'
    out.printf fmt, '   --help',    'print this message'
    out.printf fmt, '   --version', 'print version and quit'
    out.printf fmt, '   --copyright',  'print copyright and quit'
    out.puts
    out.puts 'Tasks:'
    TASKS.each do |name, desc|
      out.printf fmt, name, desc
    end

    fmt = "  %-24s %s [%s]\n"
    out.puts
    out.puts 'Options for CONFIG or ALL:'
    @config.each do |item|
      out.printf fmt, item.help_opt, item.description, item.help_default
    end
    out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's"
    out.puts
    out.puts 'Options for INSTALL:'
    out.printf fmt, '--no-harm', 'only display what to do if given', 'off'
    out.printf fmt, '--prefix=path',  'install path prefix', ''
    out.puts
  end

  #
  # Task Handlers
  #

  def exec_config
    @installer.exec_config
    @config.save   # must be final
  end

  def exec_setup
    @installer.exec_setup
  end

  def exec_install
    @installer.exec_install
  end

  def exec_test
    @installer.exec_test
  end

  def exec_show
    @config.each do |i|
      printf "%-20s %s\n", i.name, i.value if i.value?
    end
  end

  def exec_clean
    @installer.exec_clean
  end

  def exec_distclean
    @installer.exec_distclean
  end

end   # class ToplevelInstaller


class ToplevelInstallerMulti < ToplevelInstaller

  include FileOperations

  def initialize(ardir_root, config)
    super
    @packages = directories_of("#{@ardir}/packages")
    raise 'no package exists' if @packages.empty?
    @root_installer = Installer.new(@config, @ardir, File.expand_path('.'))
  end

  def run_metaconfigs
    @config.load_script "#{@ardir}/metaconfig", self
    @packages.each do |name|
      @config.load_script "#{@ardir}/packages/#{name}/metaconfig"
    end
  end

  attr_reader :packages

  def packages=(list)
    raise 'package list is empty' if list.empty?
    list.each do |name|
      raise "directory packages/#{name} does not exist"\
              unless File.dir?("#{@ardir}/packages/#{name}")
    end
    @packages = list
  end

  def init_installers
    @installers = {}
    @packages.each do |pack|
      @installers[pack] = Installer.new(@config,
                                       "#{@ardir}/packages/#{pack}",
                                       "packages/#{pack}")
    end
    with    = extract_selection(config('with'))
    without = extract_selection(config('without'))
    @selected = @installers.keys.select {|name|
                  (with.empty? or with.include?(name)) \
                      and not without.include?(name)
                }
  end

  def extract_selection(list)
    a = list.split(/,/)
    a.each do |name|
      setup_rb_error "no such package: #{name}"  unless @installers.key?(name)
    end
    a
  end

  def print_usage(f)
    super
    f.puts 'Inluded packages:'
    f.puts '  ' + @packages.sort.join(' ')
    f.puts
  end

  #
  # Task Handlers
  #

  def exec_config
    run_hook 'pre-config'
    each_selected_installers {|inst| inst.exec_config }
    run_hook 'post-config'
    @config.save   # must be final
  end

  def exec_setup
    run_hook 'pre-setup'
    each_selected_installers {|inst| inst.exec_setup }
    run_hook 'post-setup'
  end

  def exec_install
    run_hook 'pre-install'
    each_selected_installers {|inst| inst.exec_install }
    run_hook 'post-install'
  end

  def exec_test
    run_hook 'pre-test'
    each_selected_installers {|inst| inst.exec_test }
    run_hook 'post-test'
  end

  def exec_clean
    rm_f @config.savefile
    run_hook 'pre-clean'
    each_selected_installers {|inst| inst.exec_clean }
    run_hook 'post-clean'
  gems/gems/ruby-lsapi-5.6/scripts/lsruby_runner.rb000075500000002115150403134160015753 0ustar00ule FileOperations requires this
  def no_harm?
    @config.no_harm?
  end

end   # class ToplevelInstallerMulti


class Installer

  FILETYPES = %w( bin lib ext data conf man )

  include FileOperations
  include HookScriptAPI

  def initialize(config, srcroot, objroot)
    @config = config
    @srcdir = File.expand_path(srcroot)
    @objdir = File.expand_path(objroot)
    @currdir = '.'
  end

  def inspect
    "#<#{self.class} #{File.basename(@srcdir)}>"
  end

  def noop(rel)
  end

  #
  # Hook Script API base methods
  #

  def srcdir_root
    @srcdir
  end

  def objdir_root
    @objdir
  end

  def relpath
    @currdir
  end

  #
  # Config Access
  #

  # module FileOperations requires this
  def verbose?
    @config.verbose?
  end

  # module FileOperations requires this
  def no_harm?
    @config.no_harm?
  end

  def verbose_off
    begin
      save, @config.verbose = @config.verbose?, false
      yield
    ensure
      @config.verbose = save
    end
  end

  #
  # TASK config
  #

  def exec_config
    exec_task_traverse 'config'
  end

  alias config_dir_bin noop
  aliasgems/gems/ruby-lsapi-5.6/ext/lsapi/Makefile000064400000021765150403134160014407 0ustar00  new = new_shebang(old)
      return if new.to_s == old.to_s
    else
      return unless config('shebang') == 'all'
      new = Shebang.new(config('rubypath'))
    end
    $stderr.puts "updating shebang: #{File.basename(path)}" if verbose?
    open_atomic_writer(path) {|output|
      File.open(path, 'rb') {|f|
        f.gets if old   # discard
        output.puts new.to_s
        output.print f.read
      }
    }
  end

  def new_shebang(old)
    if /\Aruby/ =~ File.basename(old.cmd)
      Shebang.new(config('rubypath'), old.args)
    elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby'
      Shebang.new(config('rubypath'), old.args[1..-1])
    else
      return old unless config('shebang') == 'all'
      Shebang.new(config('rubypath'))
    end
  end

  def open_atomic_writer(path, &block)
    tmpfile = File.basename(path) + '.tmp'
    begin
      File.open(tmpfile, 'wb', &block)
      File.rename tmpfile, File.basename(path)
    ensure
      File.unlink tmpfile if File.exist?(tmpfile)
    end
  end

  class Shebang
    def Shebang.load(path)
      line = nil
      File.open(path) {|f|
        line = f.gets
      }
      return nil unless /\A#!/ =~ line
      parse(line)
    end

    def Shebang.parse(line)
      cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ')
      new(cmd, args)
    end

    def initialize(cmd, args = [])
      @cmd = cmd
      @args = args
    end

    attr_reader :cmd
    attr_reader :args

    def to_s
      "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}")
    end
  end

  #
  # TASK install
  #

  def exec_install
    rm_f 'InstalledFiles'
    exec_task_traverse 'install'
  end

  def install_dir_bin(rel)
    install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755
  end

  def install_dir_lib(rel)
    install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644
  end

  def install_dir_ext(rel)
    return unless extdir?(curr_srcdir())
    install_files rubyextentions('.'),
                  "#{config('sodir')}/#{File.dirname(rel)}",
                  0555
  end

  def install_dir_data(rel)
    install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644
  end

  def install_dir_conf(rel)
    # FIXME: should not remove current config files
    # (rename previous file to .old/.org)
    install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644
  end

  def install_dir_man(rel)
    install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644
  end

  def install_files(list, dest, mode)
    mkdir_p dest, @config.install_prefix
    list.each do |fname|
      install fname, dest, mode, @config.install_prefix
    end
  end

  def libfiles
    glob_reject(%w(*.y *.output), targetfiles())
  end

  def rubyextentions(dir)
    ents = glob_select("*.#{@config.dllext}", targetfiles())
    if ents.empty?
      setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first"
    end
    ents
  end

  def targetfiles
    mapdir(existfiles() - hookfiles())
  end

  def mapdir(ents)
    ents.map {|ent|
      if File.exist?(ent)
      then ent                         # objdir
      else "#{curr_srcdir()}/#{ent}"   # srcdir
      end
    }
  end

  # picked up many entries from cvs-1.11.1/src/ignore.c
  JUNK_FILES = %w( 
    core RCSLOG tags TAGS .make.state
    .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb
    *~ *.old *.bak *.BAK *.orig *.rej _$* *$

    *.org *.in .*
  )

  def existfiles
    glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.')))
  end

  def hookfiles
    %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt|
      %w( config setup install clean ).map {|t| sprintf(fmt, t) }
    }.flatten
  end

  def glob_select(pat, ents)
    re = globs2re([pat])
    ents.select {|ent| re =~ ent }
  end

  def glob_reject(pats, ents)
    re = globs2re(pats)
    ents.reject {|ent| re =~ ent }
  end

  GLOB2REGEX = {
    '.' => '\.',
    '$' => '\$',
    '#' => '\#',
    '*' => '.*'
  }

  def globs2re(pats)
    /\A(?:#{
      pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|')
    })\z/
  end

  #
  # TASK test
  #

  TESTDIR = 'test'

  def exec_test
    unless File.directory?('test')
      $stderr.puts 'no test in this package' if verbose?
      return
    end
    $stderr.puts 'Running tests...' if verbose?
    begin
      require 'test/unit'
    rescue LoadError
      setup_rb_error 'test/unit cannot loaded.  You need Ruby 1.8 or later to invoke this task.'
    end
    runner = Test::Unit::AutoRunner.new(true)
    runner.to_run << TESTDIR
    runner.run
  end

  #
  # TASK clean
  #

  def exec_clean
    exec_task_traverse 'clean'
    rm_f @config.savefile
    rm_f 'InstalledFiles'
  end

  alias clean_dir_bin noop
  alias clean_dir_lib noop
  alias clean_dir_data noop
  alias clean_dir_conf noop
  alias clean_dir_man noop

  def clean_dir_ext(rel)
    return unless extdir?(curr_srcdir())
    make 'clean' if File.file?('Makefile')
  end

  #
  # TASK distclean
  #

  def exec_distclean
    exec_task_traverse 'distclean'
    rm_f @config.savefile
    rm_f 'InstalledFiles'
  end

  alias distclean_dir_bin noop
  alias distclean_dir_lib noop

  def distclean_dir_ext(rel)
    return unless extdir?(curr_srcdir())
    make 'distclean' if File.file?('Makefile')
  end

  alias distclean_dir_data noop
  alias distclean_dir_conf noop
  alias distclean_dir_man noop

  #
  # Traversing
  #

  def exec_task_traverse(task)
    run_hook "pre-#{task}"
    FILETYPES.each do |type|
      if type == 'ext' and config('without-ext') == 'yes'
        $stderr.puts 'skipping ext/* by user option' if verbose?
        next
      end
      traverse task, type, "#{task}_dir_#{type}"
    end
    run_hook "post-#{task}"
  end

  def traverse(task, rel, mid)
    dive_into(rel) {
      run_hook "pre-#{task}"
      __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '')
      directories_of(curr_srcdir()).each do |d|
        traverse task, "#{rel}/#{d}", mid
      end
      run_hook "post-#{task}"
    }
  end

  def dive_into(rel)
    return unless File.dir?("#{@srcdir}/#{rel}")

    dir = File.basename(rel)
    Dir.mkdir dir unless File.dir?(dir)
    prevdir = Dir.pwd
    Dir.chdir dir
    $stderr.puts '---> ' + rel if verbose?
    @currdir = rel
    yield
    Dir.chdir prevdir
    $stderr.puts '<--- ' + rel if verbose?
    @currdir = File.dirname(rel)
  end

  def run_hook(id)
    path = [ "#{curr_srcdir()}/#{id}",
             "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) }
    return unless path
    begin
      instance_eval File.read(path), path, 1
    rescue
      raise if $DEBUG
      setup_rb_error "hook #{path} failed:\n" + $!.message
    end
  end

end   # class Installer


class SetupError < StandardError; end

def setup_rb_error(msg)
  raise SetupError, msg
end

if $0 == __FILE__
  begin
    ToplevelInstaller.invoke
  rescue SetupError
    raise if $DEBUG
    $stderr.puts $!.message
    $stderr.puts "Try 'ruby #{$0} --help' for detailed usage."
    exit 1
  end
end
gems/gems/ruby-lsapi-5.6/scripts/lsruby_runner.rb000075500000002115150403134160015753 0ustar00#!/opt/alt/ruby34/bin/ruby

require 'lsapi'

class CodeCache
    def [](filename)
		mtime = File.mtime( filename )		
		
		entry = @cache[filename];
		if entry != nil 
			return entry
						
		end
		code = compile(filename)
		#entry = CodeEntry.new( filename, mtime, code )
		@cache[filename] = code
		return code
    end

    private

    def initialize
      @cache = {}
    end

    def compile(filename)
		open(filename) do |f|
			s = f.read
			s.untaint
			binding = eval_string_wrap("binding")
			return eval(format("Proc.new {\n%s\n}", s), binding, filename, 0)
		end
    end
end


$count = 0;

$cache = CodeCache.new


while true
	$req = LSAPI.accept 
	break if $req == nil 
	
	filename = ENV['SCRIPT_FILENAME']
	filename.untaint

	filename =~ %r{^(\/.*?)\/*([^\/]+)$}
	path   = $1
	Dir.chdir( path )
	#load( filename, true )	
    code = $cache[filename]
    code.call
	
end

class CodeEntry
	public :path, :name, :mtime, :opcode 
	
	def initizlize( filename, mtime, opcode )
		filename =~ %r{^(\/.*?)\/*([^\/]+)$}
		@path   = $1
		@name   = $2
		@mtime  = mtime
		@opcode = opcode
	end

end


gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapidef.h000064400000011054150403134160014675 0ustar00
SHELL = /bin/sh

# V=0 quiet, V=1 verbose.  other values don't work.
V = 1
V0 = $(V:0=)
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO1 = $(V:1=@ :)
ECHO = $(ECHO1:0=@ echo)
NULLCMD = :

#### Start of system configuration section. ####

srcdir = .
topdir = /opt/alt/ruby34/include
hdrdir = $(topdir)
arch_hdrdir = /opt/alt/ruby34/include
PATH_SEPARATOR = :
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
prefix = $(DESTDIR)/opt/alt/ruby34
rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
rubyarchprefix = $(DESTDIR)/opt/alt/ruby34/lib64/ruby
rubylibprefix = $(exec_prefix)/share/ruby
exec_prefix = $(DESTDIR)/opt/alt/ruby34
vendorarchhdrdir = $(vendorhdrdir)/$(arch)
sitearchhdrdir = $(sitehdrdir)/$(arch)
rubyarchhdrdir = $(DESTDIR)/opt/alt/ruby34/include
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
sitehdrdir = $(rubyhdrdir)/site_ruby
rubyhdrdir = $(DESTDIR)/opt/alt/ruby34/include
rubygemsdir = $(DESTDIR)/opt/alt/ruby34/share/rubygems
vendorarchdir = $(DESTDIR)/opt/alt/ruby34/lib64/ruby/vendor_ruby
vendorlibdir = $(vendordir)
vendordir = $(DESTDIR)/opt/alt/ruby34/share/ruby/vendor_ruby
sitearchdir = $(DESTDIR)/opt/alt/ruby34/lib64/ruby/site_ruby
sitelibdir = $(sitedir)
sitedir = $(DESTDIR)/opt/alt/ruby34/share/ruby/site_ruby
rubyarchdir = $(rubyarchprefix)
rubylibdir = $(rubylibprefix)
sitearchincludedir = $(includedir)/$(sitearch)
archincludedir = $(includedir)/$(arch)
sitearchlibdir = $(libdir)/$(sitearch)
archlibdir = $(DESTDIR)/opt/alt/ruby34/lib64
ridir = $(datarootdir)/$(RI_BASE_NAME)
modular_gc_dir = $(DESTDIR)
mandir = $(DESTDIR)/opt/alt/ruby34/share/man
localedir = $(datarootdir)/locale
libdir = $(exec_prefix)/lib64
psdir = $(docdir)
pdfdir = $(docdir)
dvidir = $(docdir)
htmldir = $(docdir)
infodir = $(DESTDIR)/opt/alt/ruby34/share/info
docdir = $(datarootdir)/doc/$(PACKAGE)
oldincludedir = $(DESTDIR)/usr/include
includedir = $(exec_prefix)/include
localstatedir = $(DESTDIR)/var
sharedstatedir = $(DESTDIR)/var/lib
sysconfdir = $(DESTDIR)/etc
datadir = $(DESTDIR)/opt/alt/ruby34/share
datarootdir = $(prefix)/share
libexecdir = $(DESTDIR)/opt/alt/ruby34/libexec
sbindir = $(DESTDIR)/opt/alt/ruby34/sbin
bindir = $(exec_prefix)/bin
archdir = $(rubyarchdir)


CC_WRAPPER = 
CC = gcc
CXX = g++
LIBRUBY = $(LIBRUBY_SO)
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
LIBRUBYARG_SHARED = -Wl,-rpath,$(archlibdir) -L$(archlibdir) -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -Wl,-rpath,$(archlibdir) -L$(archlibdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS)
empty =
OUTFLAG = -o $(empty)
COUTFLAG = -o $(empty)
CSRCFLAG = $(empty)

RUBY_EXTCONF_H = 
cflags   = $(hardenflags)  $(optflags) $(debugflags) $(warnflags)
cxxflags = 
optflags = -O3 -fno-fast-math
debugflags = -ggdb3
warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef
cppflags = 
CCDLFLAGS = -fPIC
CFLAGS   = $(CCDLFLAGS) -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection $(ARCH_FLAG)
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
DEFS     = 
CPPFLAGS =   $(DEFS) $(cppflags)
CXXFLAGS = $(CCDLFLAGS) -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection $(ARCH_FLAG)
ldflags  = -L. -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
dldflags = -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld 
ARCH_FLAG = -m64
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
LDSHARED = $(CC) -shared
LDSHAREDXX = $(CXX) -shared
POSTLINK = :
AR = gcc-ar
LD = ld
EXEEXT = 

RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
RUBY_SO_NAME = ruby
RUBYW_INSTAgems/gems/ruby-lsapi-5.6/ext/lsapi/lsruby.c000064400000055563150403134160014436 0ustar00_LIBS = 
LIBS = $(LIBRUBYARG_SHARED)  -lm -lpthread  -lc
ORIG_SRCS = lsapilib.c lsruby.c
SRCS = $(ORIG_SRCS) 
OBJS = lsapilib.o lsruby.o
HDRS = $(srcdir)/lsapidef.h $(srcdir)/lsapilib.h
LOCAL_HDRS = 
TARGET = lsapi
TARGET_NAME = lsapi
TARGET_ENTRY = Init_$(TARGET_NAME)
DLLIB = $(TARGET).so
EXTSTATIC = 
STATIC_LIB = 

TIMESTAMP_DIR = .
BINDIR        = $(bindir)
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
HDRDIR        = $(sitehdrdir)$(target_prefix)
ARCHHDRDIR    = $(sitearchhdrdir)$(target_prefix)
TARGET_SO_DIR =
TARGET_SO     = $(TARGET_SO_DIR)$(DLLIB)
CLEANLIBS     = $(TARGET_SO) false
CLEANOBJS     = $(OBJS) *.bak
TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time

all:    $(DLLIB)
static: $(STATIC_LIB)
.PHONY: all install static install-so install-rb
.PHONY: clean clean-so clean-static clean-rb

clean-static::
clean-rb-default::
clean-rb::
clean-so::
clean: clean-so clean-static clean-rb-default clean-rb
		-$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time

distclean-rb-default::
distclean-rb::
distclean-so::
distclean-static::
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
		-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
		-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
		-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true

realclean: distclean
install: install-so install-rb

install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP)
	$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
clean-static::
	-$(Q)$(RM) $(STATIC_LIB)
install-rb: pre-install-rb do-install-rb install-rb-default
install-rb-default: pre-install-rb-default do-install-rb-default
pre-install-rb: Makefile
pre-install-rb-default: Makefile
do-install-rb:
do-install-rb-default:
pre-install-rb-default:
	@$(NULLCMD)
$(TARGET_SO_DIR_TIMESTAMP):
	$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
	$(Q) $(TOUCH) $@

site-install: site-install-so site-install-rb
site-install-so: install-so
site-install-rb: install-rb

.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S

.cc.o:
	$(ECHO) compiling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.cc.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.mm.o:
	$(ECHO) compiling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.mm.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.cxx.o:
	$(ECHO) compiling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.cxx.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.cpp.o:
	$(ECHO) compiling $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.cpp.S:
	$(ECHO) translating $(<)
	$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.c.o:
	$(ECHO) compiling $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.c.S:
	$(ECHO) translating $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

.m.o:
	$(ECHO) compiling $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<

.m.S:
	$(ECHO) translating $(<)
	$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<

$(TARGET_SO): $(OBJS) Makefile
	$(ECHO) linking shared-object $(DLLIB)
	-$(Q)$(RM) $(@)
	$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
	$(Q) $(POSTLINK)



$(OBJS): $(HDRS) $(ruby_headers)
gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapidef.h000064400000011054150403134160014675 0ustar00/*
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * 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.
    * Neither the name of the Lite Speed Technologies Inc nor the
      names of its contributors may be used to endorse or promote
      products derived from this software without specific prior
      written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
OWNER 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.
*/


#ifndef  _LSAPIDEF_H_
#define  _LSAPIDEF_H_

#include <inttypes.h>

#if defined (c_plusplus) || defined (__cplusplus)
extern "C" {
#endif

enum
{
    H_ACCEPT = 0,
    H_ACC_CHARSET,
    H_ACC_ENCODING,
    H_ACC_LANG,
    H_AUTHORIZATION,
    H_CONNECTION,
    H_CONTENT_TYPE,
    H_CONTENT_LENGTH,
    H_COOKIE,
    H_COOKIE2,
    H_HOST,
    H_PRAGMA,
    H_REFERER,
    H_USERAGENT,
    H_CACHE_CTRL,
    H_IF_MODIFIED_SINCE,
    H_IF_MATCH,
    H_IF_NO_MATCH,
    H_IF_RANGE,
    H_IF_UNMOD_SINCE,
    H_KEEP_ALIVE,
    H_RANGE,
    H_X_FORWARDED_FOR,
    H_VIA,
    H_TRANSFER_ENCODING

};
#define LSAPI_SOCK_FILENO           0

#define LSAPI_VERSION_B0            'L'
#define LSAPI_VERSION_B1            'S'

/* Values for m_flag in lsapi_packet_header */
#define LSAPI_ENDIAN_LITTLE         0
#define LSAPI_ENDIAN_BIG            1
#define LSAPI_ENDIAN_BIT            1

#if defined(__i386__)||defined( __x86_64 )||defined( __x86_64__ )
#define LSAPI_ENDIAN                LSAPI_ENDIAN_LITTLE
#else
#define LSAPI_ENDIAN                LSAPI_ENDIAN_BIG
#endif

/* Values for m_type in lsapi_packet_header */
#define LSAPI_BEGIN_REQUEST         1
#define LSAPI_ABORT_REQUEST         2
#define LSAPI_RESP_HEADER           3
#define LSAPI_RESP_STREAM           4
#define LSAPI_RESP_END              5
#define LSAPI_STDERR_STREAM         6
#define LSAPI_REQ_RECEIVED          7
#define LSAPI_CONN_CLOSE            8
#define LSAPI_INTERNAL_ERROR        9


#define LSAPI_MAX_HEADER_LEN        65535
#define LSAPI_MAX_DATA_PACKET_LEN   16384

#define LSAPI_RESP_HTTP_HEADER_MAX  32768
#define LSAPI_PACKET_HEADER_LEN     8


struct lsapi_packet_header
{
    char    m_versionB0;      /* LSAPI protocol version */
    char    m_versionB1;
    char    m_type;
    char    m_flag;
    union
    {
        int32_t m_iLen;       /* include this header */
        char    m_bytes[4];
    }m_packetLen;
};

/*
    LSAPI request header packet

    1. struct lsapi_req_header
    2. struct lsapi_http_header_index
    3. lsapi_header_offset * unknownHeaders
    4. org http request header
    5. request body if available
*/

struct lsapi_req_header
{
    struct lsapi_packet_header m_pktHeader;

    int32_t m_httpHeaderLen;
    int32_t m_reqBodyLen;
    int32_t m_scriptFileOff;   /* path to the script file. */
    int32_t m_scriptNameOff;   /* decrypted URI, without pathinfo, */
    int32_t m_queryStringOff;  /* Query string inside env */
    int32_t m_requestMethodOff;
    int32_t m_cntUnknownHeaders;
    int32_t m_cntEnv;
    int32_t m_cntSpecialEnv;
} ;


struct lsapi_http_header_index
{
    uint16_t m_headerLen[H_TRANSFER_ENCODING+1];
    int32_t m_headerOff[H_TRANSFER_ENCODING+1];
} ;

struct lsapi_header_offset
{
    int32_t nameOff;
    int32_t nameLen;
    int32_t valueOff;
    int32_t valueLen;
} ;

struct lsapi_resp_info
{
    int32_t m_cntHeaders;
    int32_t m_status;
};

struct lsapi_resp_header
{
    struct  lsapi_packet_header  m_pktHeader;
    struct  lsapi_resp_info      m_respInfo;
};

#if defined (c_plusplus) || defined (__cplusplus)
}
#endif


#endif

gems/gems/ruby-lsapi-5.6/ext/lsapi/lsruby.c000064400000055563150403134160014436 0ustar00
#include "ruby.h"

#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
#include "util.h"
#else
#include <ruby/util.h>
#include <ruby/version.h>
#endif

#include "lsapilib.h"
#include <errno.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>


#ifndef RUBY_API_VERSION_CODE
#define RUBY_API_VERSION_CODE (RUBY_API_VERSION_MAJOR*10000+RUBY_API_VERSION_MINOR*100+RUBY_API_VERSION_TEENY)
#endif

/* RUBY_EXTERN VALUE ruby_errinfo; */
RUBY_EXTERN VALUE rb_stdin;
RUBY_EXTERN VALUE rb_stdout;
#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
RUBY_EXTERN VALUE rb_defout;
#endif

static VALUE orig_stdin;
static VALUE orig_stdout;
static VALUE orig_stderr;
#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
static VALUE orig_defout;
#endif
static VALUE orig_env;

static VALUE env_copy;

static VALUE lsapi_env;

static int MAX_BODYBUF_LENGTH = (10 * 1024 * 1024);

#if RUBY_API_VERSION_CODE >= 20700
# if defined rb_tainted_str_new
#  undef rb_tainted_str_new
# endif
# define rb_tainted_str_new(p,l)  rb_str_new((p),(l))
#endif

/* static VALUE lsapi_objrefs; */

typedef struct lsapi_data
{
    LSAPI_Request * req;
    VALUE           env;
    ssize_t      (* fn_write)( LSAPI_Request *, const char * , size_t );
}lsapi_data;

static VALUE cLSAPI;

static VALUE s_req = Qnil;
static lsapi_data * s_req_data;

static VALUE s_req_stderr = Qnil;
static lsapi_data * s_stderr_data;
static pid_t s_pid = 0;

typedef struct lsapi_body
{
    char        *bodyBuf;  //we put small one into memory, otherwise, into a memory mapping file, and we still use the bodyBuf to access this mapping
    int	        bodyLen;	//expected length got form content-length
    int	        bodyCurrentLen;	//current length by read() readBodyToReqBuf
    int	        curPos;
}lsapi_body;

static lsapi_body	s_body;
static char sTempFile[1024] = {0};

/*
 * static void lsapi_ruby_setenv(const char *name, const char *value)
 * {
 *    if (!name) return;
 * 
 *    if (value && *value)
 *	    ruby_setenv(name, value);
 *    else
 *        ruby_unsetenv(name);
 } *        *
 */


static void lsapi_mark( lsapi_data * data )
{
    rb_gc_mark( data->env );
}
/*
 * static void lsapi_free_data( lsapi_data * data )
 * {
 *   free( data );
 } *        *
 */
static int add_env_rails( const char * pKey, int keyLen, const char * pValue, int valLen,
                          void * arg )
{
    char * p;
    int len;
    /* Fixup some environment variables for rails */
    switch( *pKey )
    {
        case 'Q':
            if ( strcmp( pKey, "QUERY_STRING" ) == 0 )
            {
                if ( !*pValue )
                    return 1;
            }
            break;
        case 'R':
            if (( *(pKey+8) == 'U' )&&( strcmp( pKey, "REQUEST_URI" ) == 0 ))
            {
                p = strchr( pValue, '?' );
                if ( p )
                {
                    len = valLen - ( p - pValue ) - 1;
                    /* 
                     *                valLen = p - pValue;
                     *p++ = 0;
                     */
                }
                else
                {
                    p = (char *)pValue + valLen;
                    len = 0;
                }
                rb_hash_aset( lsapi_env,rb_tainted_str_new("PATH_INFO", 9),
                              rb_tainted_str_new(pValue, p - pValue));
                rb_hash_aset( lsapi_env,rb_tainted_str_new("REQUEST_PATH", 12),
                              rb_tainted_str_new(pValue, p - pValue));
                if ( *p == '?' )
                    ++p;
                rb_hash_aset( lsapi_env,rb_tainted_str_new("QUERY_STRING", 12),
                rb_tainted_str_new(p, len));
            }
            break;
        case 'S':
            if ( strcmp( pKey, "SCRIPT_NAME" ) == 0 )
            {
                pValue = "/";
                valLen = 1;
            }
            break;
        case 'P':
            if ( strcmp( pKey, "PATH_INFO" ) == 0 )
                return 1;
        default:
            break;
    }
    
    /* lsapi_ruby_setenv(pKey, pValue ); */
    
    rb_hash_aset( lsapi_env,rb_tainted_str_new(pKey, keyLen),
                  rb_tainted_str_new(pValue, valLen));
    return 1;
}

static int add_env_no_fix( const char * pKey, int keyLen, const char * pValue, int valLen,
                           void * arg )
{
    rb_hash_aset( lsapi_env,rb_tainted_str_new(pKey, keyLen),
                  rb_tainted_str_new(pValue, valLen));
    return 1;
}

typedef int (*fn_add_env)( const char * pKey, int keyLen, const char * pValue, int valLen,
                           void * arg );

fn_add_env s_fn_add_env = add_env_no_fix;

static void clear_env()
{
    /* rb_funcall( lsapi_env, rb_intern( "clear" ), 0 ); */
    rb_funcall( lsapi_env, rb_intern( "replace" ), 1, env_copy );
}

static void setup_cgi_env( lsapi_data * data )
{
    clear_env();
    
    LSAPI_ForeachHeader_r( data->req, s_fn_add_env, data );
    LSAPI_ForeachEnv_r( data->req, s_fn_add_env, data );
}

static VALUE lsapi_s_accept( VALUE self )
{
    int pid;
    if ( LSAPI_Prefork_Accept_r( &g_req ) == -1 )
        return Qnil;
    else
    {
        if (s_body.bodyBuf != NULL)
            free (s_body.bodyBuf);
        
        s_body.bodyBuf = NULL;
        s_body.bodyLen = -1;
        s_body.bodyCurrentLen = 0;
        s_body.curPos = 0;    
        
        pid = getpid();
        if ( pid != s_pid )
        {
            s_pid = pid;
            rb_funcall( Qnil, rb_intern( "srand" ), 0 );
        }
        
        setup_cgi_env( s_req_data );
        return s_req;
    }
}


static VALUE lsapi_s_accept_new_conn(VALUE self)
{
    if (LSAPI_Accept_Before_Fork(&g_req) == -1 )
        return Qnil;
    else
        return s_req;
}


static VALUE lsapi_s_postfork_child(VALUE self)
{
    LSAPI_Postfork_Child(&g_req);
    return s_req;
}


static VALUE lsapi_s_postfork_parent(VALUE self)
{
    LSAPI_Postfork_Parent(&g_req);
    return s_req;
}


/*
 * static int chdir_file( const char * pFile )
 * {
 *    char * p = strrchr( pFile, '/' );
 *    int ret;
 *    if ( !p )
 *        return -1;
 *p = 0;
 ret = chdir( pFile );
 *p = '/';
 return ret;
 }
 */

static VALUE lsapi_eval_string_wrap(VALUE self, VALUE str)
{
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4)
    {
        Check_Type(str, T_STRING);
    }
    else
#endif
    {
        SafeStringValue(str);
    }
    return rb_eval_string_wrap(StringValuePtr(str), NULL);
}

static VALUE lsapi_process( VALUE self )
{
/*    lsapi_data *data;
    const char * pScriptPath;
    Data_Get_Struct(self,lsapi_data, data);
    pScriptPath = LSAPI_GetScriptFileName_r( data->req );
*/
    /*
     *   if ( chdir_file( pScriptPath ) == -1 )
     *   {
     *       lsapi_send_error( 404 );
     *   }
     *   rb_load_file( pScriptPath );
     */
    return Qnil;
}


static VALUE lsapi_putc(VALUE self, VALUE c)
{
    char ch = NUM2CHR(c);
    lsapi_data *data;
    Data_Get_Struct(self,lsapi_data, data);
    if ( (*data->fn_write)( data->req, &ch, 1 ) == 1 )
        return c;
    else
        return INT2NUM( EOF );
}


static VALUE lsapi_write( VALUE self, VALUE str )
{
    lsapi_data *data;
    int len;
    Data_Get_Struct(self,lsapi_data, data);
    /*    len = LSAPI_Write_r( data->req, RSTRING_PTR(str), RSTRING_LEN(str) ); */
    if (TYPE(str) != T_STRING)
        str = rb_obj_as_string(str);
    len = (*data->fn_write)( data->req, RSTRING_PTR(str), RSTRING_LEN(str) );
    return INT2NUM( len );
}

static VALUE lsapi_print( int argc, VALUE *argv, VALUE out )
{
    int i;
    VALUE line;
    
    /* if no argument given, print `$_' */
    if (argc == 0)
    {
        argc = 1;
        line = rb_lastline_get();
        argv = &line;
    }
    for (i = 0; i<argc; i++)
    {
        if (!NIL_P(rb_output_fs) && i>0)
        {
            lsapi_write(out, rb_output_fs);
        }
        switch (TYPE(argv[i]))
        {
            case T_NIL:
                lsapi_write(out, rb_str_new2("nil"));
                break;
            default:
                lsapi_write(out, argv[i]);
                break;
        }
    }
    if (!NIL_P(rb_output_rs))
    {
        lsapi_write(out, rb_output_rs);
    }
    
    return Qnil;
}

static VALUE lsapi_printf(int argc, VALUE *argv, VALUE out)
{
    lsapi_write(out, rb_f_sprintf(argc, argv));
    return Qnil;
}

static VALUE lsapi_puts _((int, VALUE*, VALUE));

#if RUBY_API_VERSION_CODE >= 10900
static VALUE lsapi_puts_ary(VALUE ary, VALUE out, int recur )
{
    VALUE tmp;
    long i;
    
    if (recur)
    {
        tmp = rb_str_new2("[...]");
        rb_io_puts(1, &tmp, out);
        return Qnil;
    }
    for (i=0; i<RARRAY_LEN(ary); i++) 
    {
        tmp = RARRAY_PTR(ary)[i];
        rb_io_puts(1, &tmp, out);
    }
    return Qnil;
    
}
#else
static VALUE lsapi_puts_ary(VALUE ary, VALUE out)
{
    VALUE tmp;
    int i;
    
    for (i=0; i<RARRAY_LEN(ary); i++)
    {
        tmp = RARRAY_PTR(ary)[i];
        if (rb_inspecting_p(tmp))
        {
            tmp = rb_str_new2("[...]");
        }
        lsapi_puts(1, &tmp, out);
    }
    return Qnil;
}
#endif

static VALUE lsapi_puts(int argc, VALUE *argv, VALUE out)
{
    int i;
    VALUE line;
    
    /* if no argument given, print newline. */
    if (argc == 0)
    {
        lsapi_write(out, rb_default_rs);
        return Qnil;
    }
    for (i=0; i<argc; i++)
    {
        switch (TYPE(argv[i]))
        {
            case T_NIL:
                line = rb_str_new2("nil");
                break;
            case T_ARRAY:
#if RUBY_API_VERSION_CODE >= 10900
                rb_exec_recursive(lsapi_puts_ary, argv[i], out);
#else
                rb_protect_inspect(lsapi_puts_ary, argv[i], out);
#endif
                continue;
            default:
                line = argv[i];
                break;
        }
        line = rb_obj_as_string(line);
        lsapi_write(out, line);
        if (*( RSTRING_PTR(line) + RSTRING_LEN(line) - 1 ) != '\n')
        {
            lsapi_write(out, rb_default_rs);
        }
    }
    
    return Qnil;
}


static VALUE lsapi_addstr(VALUE out, VALUE str)
{
    lsapi_write(out, str);
    return out;
}

static VALUE lsapi_flush( VALUE self )
{
    /*
     *    lsapi_data *data;
     *    Data_Get_Struct(self,lsapi_data, data);
     */
    LSAPI_Flush_r( &g_req ); 
    return Qnil;
}

static VALUE lsapi_getc( VALUE self )
{
    int ch;
    /*
     *    lsapi_data *data;
     *    Data_Get_Struct(self,lsapi_data, data);
     */
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4 && !OBJ_TAINTED(self))
    {
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
    }
#endif
    ch = LSAPI_ReqBodyGetChar_r( &g_req );
    if ( ch == EOF )
        return Qnil;
    return INT2NUM( ch );
}

static inline int isBodyWriteToFile()
{
    return ((s_body.bodyLen >= MAX_BODYBUF_LENGTH)? (1): (0));
}

//create a temp file and open it, if failed, fd = -1
static inline int createTempFile()
{
    int fd = -1;
    char *sfn = strdup(sTempFile);
    
    if ((fd = mkstemp(sfn)) == -1)
    {
        fprintf(stderr, "%s: %s\n", sfn, strerror(errno));
    }
    else
        unlink(sfn);
    
    free(sfn);
    return fd;
}

//return 1 if error occured!
//if already created, always OK (0)
static int createBodyBuf()
{
    int fd = -1;
    if (s_body.bodyLen == -1)
    {
        s_body.bodyLen = LSAPI_GetReqBodyLen_r(&g_req);
        //Error if get a zeor length, should not happen 
        if (s_body.bodyLen < 0)
        {
            //Wrong bode length will be treated as 0
            s_body.bodyLen = 0;
        }
        
        if (s_body.bodyLen > 0) 
        {
            if (isBodyWriteToFile())
            {
                //create file mapping
                fd = createTempFile();
                if (fd == -1)
                {
                    return 1;
                }
                if (ftruncate(fd, s_body.bodyLen) == 0)
                {
                    perror("ftruncate() failed. \n");
                    close(fd);
                    return 1;
                }
                s_body.bodyBuf = mmap(NULL, s_body.bodyLen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
                if (s_body.bodyBuf == MAP_FAILED)
                {
                    perror("File mapping failed. \n");
                    close(fd);
                    return 1;
                }
                close(fd);  //close since needn't it anymore
            }
            else
            {
                s_body.bodyBuf = (char *)calloc(s_body.bodyLen, sizeof(char));
                if (s_body.bodyBuf == NULL)
                {
                    perror("Memory calloc error");
                    return 1;
                }
            }
        }
    }

    return 0;   
}

static inline int isAllBodyRead()
{
    return (s_body.bodyCurrentLen < s_body.bodyLen)? 0 : 1;
}

static inline int isEofBodyBuf()
{
    return (s_body.curPos < s_body.bodyLen) ? 0 : 1;
}
//try to read length as tigems/gems/ruby-lsapi-5.6/ext/lsapi/extconf.rb000064400000000374150403134160014733 0ustar00
    VALUE str;
    const int blkSize = 4096;
    int n;
    char *p = NULL;
    
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4 && !OBJ_TAINTED(self))
    {
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
  gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapilib.c000064400000350541150403134160014707 0ustar00        s_body.curPos += n;
    }
    
    return str;
}

static VALUE lsapi_read(int argc, VALUE *argv, VALUE self)
{
    VALUE str;
    int n;
    int needRead;
    int nRead;
    
#if RUBY_API_VERSION_CODE < 20700
    if (rb_safe_level() >= 4 && !OBJ_TAINTED(self))
    {
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
    }
#endif
    if (createBodyBuf() == 1)
    {
        return Qnil;
    }
    
    //we need to consider these 4 cases:
    //1, need all data since argc == 0, we may have all data 2, or not
    //3, need a length of data (argv >= 1), we may have enough data already read, 4, or not
    if (argc == 0)
        n = s_body.bodyLen - s_body.curPos;
    else
    {
        n = NUM2INT(argv[0]); //request that length from currentpos
        if (n < 0)
            return Qnil;
        if (n > s_body.bodyLen - s_body.curPos)
            n = s_body.bodyLen - s_body.curPos;            
    }
    needRead = s_body.curPos + n - s_body.bodyCurrentLen;
    if (needRead < 0)
        needRead = 0;
    
    str = rb_str_buf_new( n );
#if RUBY_API_VERSION_CODE < 20700
    OBJ_TAINT(str);
#endif
    if (n == 0)
        return str;
    
    //copy already have part first
    if (n - needRead != 0)
    {
        rb_str_buf_cat( str, s_body.bodyBuf + s_body.curPos, n - needRead);
        s_body.curPos += (n - needRead);
    }
    
    if (needRead > 0)
    {
        //try to read needRead, but may be less (changed) when read the end of the data
        nRead = readBodyBuf(needRead);
        if (nRead > 0)
        {
            n = ((nRead < needRead) ? nRead : needRead);
            rb_str_buf_cat( str, s_body.bodyBuf + s_body.curPos, n );
            s_body.curPos += n;
        }
    }
    
    return str;
}

static VALUE lsapi_rewind(VALUE self)
{  
    s_body.curPos = 0;
    return self;
}

static VALUE lsapi_each(VALUE self)
{
    VALUE str;
    lsapi_rewind(self);
   
    while(isEofBodyBuf() != 1)
    {
        str = lsapi_gets(self);
        rb_yield(str);
    }
    return self;

}

static VALUE lsapi_eof(VALUE self)
{
    return (LSAPI_GetReqBodyRemain_r( &g_req ) <= 0) ? Qtrue : Qfalse;
}

static VALUE lsapi_binmode(VALUE self)
{
    return self;
}

static VALUE lsapi_isatty(VALUE self)
{
    return Qfalse;
}

static VALUE lsapi_sync(VALUE self)
{
    return Qfalse;
}

static VALUE lsapi_setsync(VALUE self,VALUE sync)
{
    return Qfalse;
}

static VALUE lsapi_close(VALUE self)
{
    LSAPI_Flush_r( &g_req );
    if (isBodyWriteToFile())
    {
        //msync(s_body.bodyBuf, s_body.bodyLen, MS_SYNC);
        //sleep(5);
        munmap(s_body.bodyBuf, s_body.bodyLen);
    }
    else
        free(s_body.bodyBuf);
    
    s_body.bodyBuf = NULL;
    s_body.bodyLen = -1;
    s_body.bodyCurrentLen = 0;
    s_body.curPos = 0;    
    //Should the temp be deleted here?!
        
    return Qnil;
}


static VALUE lsapi_reopen( int argc, VALUE *argv, VALUE self)
{
    VALUE orig_verbose;
    if ( self == s_req_stderr )
    {
        /* constant silence hack */
        orig_verbose = (VALUE)ruby_verbose;
        ruby_verbose = Qnil;
        
        rb_define_global_const("STDERR", orig_stderr);
        
        ruby_verbose = (VALUE)orig_verbose;
        
        return rb_funcall2( orig_stderr, rb_intern( "reopen" ), argc, argv );
        
    }
    return self;
}

static void readMaxBodyBufLength()
{
    int n;
    const char *p = getenv( "LSAPI_MAX_BODYBUF_LENGTH" );
    if ( p )
    {
        n = atoi( p );
        if (n > 0)
        {
            if (strstr(p, "M") || strstr(p, "m"))
                MAX_BODYBUF_LENGTH = n * 1024 * 1024;
            else if (strstr(p, "K") || strstr(p, "k"))
                MAX_BODYBUF_LENGTH = n * 1024;
            else
                MAX_BODYBUF_LENGTH = n;
        }
    }
}

static void readTempFileTemplate()
{
    const char *p = getenv( "LSAPI_TEMPFILE" );
    if (p == NULL || strlen(p) > 1024 - 7)
         p = "/tmp/lsapi.XXXXXX";
    
    strcpy(sTempFile, p);
    if (strlen(p) <= 6 || strcmp(p + (strlen(p) - 6), "XXXXXX") != 0)
        strcat(sTempFile, ".XXXXXX");
}

static void initBodyBuf()
{
    s_body.bodyBuf = NULL;
    s_body.bodyLen = -1;
    s_body.bodyCurrentLen = 0;
    s_body.curPos = 0;    
}
void Init_lsapi()
{
    VALUE orig_verbose; 
    char * p;
    int prefork = 0;
    LSAPI_Init();
    initBodyBuf();
    
    readMaxBodyBufLength();
    readTempFileTemplate();
    
    p = getenv("LSAPI_CHILDREN");
    if (p && atoi(p) > 1)
        prefork = 1;

#ifdef rb_thread_select
    LSAPI_Init_Env_Parameters( rb_thread_select );
#else
    LSAPI_Init_Env_Parameters( select );
#endif
    
    s_pid = getpid();
    
    p = getenv( "RACK_ROOT" );
    if ( p )
    {
        if ( chdir( p ) == -1 )
            perror( "chdir()" );
    }
    if ( p || getenv( "RACK_ENV" ) )
        s_fn_add_env = add_env_rails;
    
    orig_stdin = rb_stdin;
    orig_stdout = rb_stdout;
    orig_stderr = rb_stderr;
#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
    orig_defout = rb_defout;
#endif
    orig_env = rb_const_get( rb_cObject, rb_intern("ENV") );
    env_copy = rb_funcall( orig_env, rb_intern( "to_hash" ), 0 );
    
    /* tell the garbage collector it is a global variable, do not recycle it. */
    rb_global_variable(&env_copy);
    
    rb_hash_aset( env_copy,rb_tainted_str_new("GATEWAY_Irewindable_input.rbNTERFACE", 17),
                                              rb_tainted_str_new("CGI/1.2", 7));
        
    rb_define_global_function("eval_string_wrap", lsapi_eval_string_wrap, 1);
    
    cLSAPI = rb_define_class("LSAPI", rb_cObject);
    rb_undef_alloc_func(cLSAPI);
    rb_define_singleton_method(cLSAPI, "accept", lsapi_s_accept, 0);
    if (prefork)
    {
        rb_define_singleton_method(cLSAPI, "accept_new_connection", lsapi_s_accept_new_conn, 0);
        rb_define_singleton_method(cLSAPI, "postfork_child", lsapi_s_postfork_child, 0);
        rb_define_singleton_method(cLSAPI, "postfork_parent", lsapi_s_postfork_parent, 0);
    }

    rb_define_method(cLSAPI, "process", lsapi_process, 0 );
    /* rb_define_method(cLSAPI, "initialize", lsapi_initialize, 0); */
    rb_define_method(cLSAPI, "putc", lsapi_putc, 1);
    rb_define_method(cLSAPI, "write", lsapi_write, 1);
    rb_define_method(cLSAPI, "print", lsapi_print, -1);
    rb_define_method(cLSAPI, "printf", lsapi_printf, -1);
    rb_define_method(cLSAPI, "puts", lsapi_puts, -1);
    rb_define_method(cLSAPI, "<<", lsapi_addstr, 1);
    rb_define_method(cLSAPI, "flush", lsapi_flush, 0);
    rb_define_method(cLSAPI, "getc", lsapi_getc, 0);
    /* rb_define_method(cLSAPI, "ungetc", lsapi_ungetc, 1); */
    rb_define_method(cLSAPI, "gets", lsapi_gets, 0);
    
    //TEST: adding readline function to make irb happy?
    /*rb_define_method(cLSAPI, "readline", lsapi_gets, 0); */
    
    rb_define_method(cLSAPI, "read", lsapi_read, -1);
    rb_define_method(cLSAPI, "rewind", lsapi_rewind, 0);
    rb_define_method(cLSAPI, "each", lsapi_each, 0);
    
    rb_define_method(cLSAPI, "eof", lsapi_eof, 0);
    rb_define_method(cLSAPI, "eof?", lsapi_eof, 0);
    rb_define_method(cLSAPI, "close", lsapi_close, 0);
    /* rb_define_method(cLSAPI, "closed?", lsapi_closed, 0); */
    rb_define_method(cLSAPI, "binmode", lsapi_binmode, 0);
    rb_define_method(cLSAPI, "isatty", lsapi_isatty, 0);
    rb_define_method(cLSAPI, "tty?", lsapi_isatty, 0);
    rb_define_method(cLSAPI, "sync", lsapi_sync, 0);
    rb_define_method(cLSAPI, "sync=", lsapi_setsync, 1);
    rb_define_method(cLSAPI, "reopen", lsapi_reopen, -1 );
    
    
    s_req = Data_Make_Struct( cLSAPI, lsapi_data, lsapi_mark, free, s_req_data );
    s_req_data->req = &g_req;
    s_req_data->fn_write = LSAPI_Write_r;
    rb_stdin = rb_stdout = s_req;
    
#if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
    rb_defout = s_req;
#endif

    rb_global_variable(&s_req );
    
    s_req_stderr = Data_Make_Struct( cLSAPI, lsapi_data, lsapi_mark, free, s_stderr_data );
    s_stderr_data->req = &g_req;
    s_stderr_data->fn_write = LSAPI_Write_Stderr_r;
    rb_stderr = s_req_stderr;
    rb_global_variable(&s_req_stderr );
    
    /* constant silence hack */
    orig_verbose = (VALUE)ruby_verbose;
    ruby_verbose = Qnil;
    
    lsapi_env = rb_hash_new();
    clear_env();
    /* redefine ENV using a hash table, should be faster than char **environment */
    rb_define_global_const("ENV", lsapi_env);
    
    rb_define_global_const("STDERR", rb_stderr);
    
    ruby_verbose = (VALUE)orig_verbose;
    
    return;
}

gems/gems/ruby-lsapi-5.6/ext/lsapi/extconf.rb000064400000000374150403134160014733 0ustar00require 'mkmf'
dir_config( 'lsapi' )
if ( have_library( "socket" ))
    have_library( "nsl" )
end
if RUBY_VERSION =~ /1.9/ then
    $CPPFLAGS += " -DRUBY_19"
end 
if RUBY_VERSION =~ /2/ then
    $CPPFLAGS += " -DRUBY_2"
end 
create_makefile( "lsapi" )
gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapilib.c000064400000350541150403134160014707 0ustar00//#define LSAPI_DEBUG
/*
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * 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.
    * Neither the name of the Lite Speed Technologies Inc nor the
      names of its contributors may be used to endorse or promote
      products derived from this software without specific prior
      written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
OWNER 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.
*/


#include <ctype.h>
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <sys/stat.h>
#include <sched.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <grp.h>
#include <pwd.h>
#include <time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/un.h>

#include "lsapilib.h"

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
#include <sys/prctl.h>
#endif

#if defined(__FreeBSD__ ) || defined(__NetBSD__) || defined(__OpenBSD__) \
    || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
#include <sys/sysctl.h>
#endif

#include <inttypes.h>
#ifndef uint32
#define uint32 uint32_t
#endif

struct lsapi_MD5Context {
    uint32 buf[4];
    uint32 bits[2];
    unsigned char in[64];
};

void lsapi_MD5Init(struct lsapi_MD5Context *context);
void lsapi_MD5Update(struct lsapi_MD5Context *context, unsigned char const *buf,
           unsigned len);
void lsapi_MD5Final(unsigned char digest[16], struct lsapi_MD5Context *context);

/*
 * This is needed to make RSAREF happy on some MS-DOS compilers.
 */
typedef struct lsapi_MD5Context lsapi_MD5_CTX;


#define LSAPI_ST_REQ_HEADER     1
#define LSAPI_ST_REQ_BODY       2
#define LSAPI_ST_RESP_HEADER    4
#define LSAPI_ST_RESP_BODY      8
#define LSAPI_ST_BACKGROUND     16

#define LSAPI_RESP_BUF_SIZE     8192
#define LSAPI_INIT_RESP_HEADER_LEN 4096

enum
{
    LSAPI_STATE_IDLE,
    LSAPI_STATE_CONNECTED,
    LSAPI_STATE_ACCEPTING,
};

typedef struct lsapi_child_status
{
    int     m_pid;
    long    m_tmStart;

    volatile short   m_iKillSent;
    volatile char    m_inProcess;
    volatile char    m_state;
    volatile int     m_iReqCounter;

    volatile long    m_tmWaitBegin;
    volatile long    m_tmReqBegin;
    volatile long    m_tmLastCheckPoint;
}
lsapi_child_status;

static lsapi_child_status * s_worker_status = NULL;

static int g_inited = 0;
static int g_running = 1;
static int s_ppid;
static int s_restored_ppid = 0;
static int s_pid = 0;
static int s_slow_req_msecs = 0;
static int s_keep_listener = 1;
static int s_dump_debug_info = 0;
static int s_pid_dump_debug_info = 0;
static int s_req_processed = 0;
static int s_skip_write = 0;
static int (*pthread_atfork_func)(void (*prepare)(void), void (*parent)(void),
                                  void (*child)(void)) = NULL;

static int *s_busy_workers = NULL;
static int *s_accepting_workers = NULL;
static int *s_global_counter = &s_req_processed;
static int s_max_busy_workers = -1;
static char *s_stderr_log_path = NULL;
static int s_stderr_is_pipe = 0;
static int s_ignore_pid = -1;
static size_t s_total_pages = 1;
static size_t s_min_avail_pages = 256 * 1024;
static size_t *s_avail_pages = &s_total_pages;

LSAPI_Request g_req =
{ .m_fdListen = -1, .m_fd = -1 };

static char         s_secret[24];

static LSAPI_On_Timer_pf s_proc_group_timer_cb = NULL;

void Flush_RespBuf_r( LSAPI_Request * pReq );
static int lsapi_reopen_stderr(const char *p);

static const char *CGI_HEADERS[H_TRANSFER_ENCODING+1] =
{
    "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET",
    "HTTP_ACCEPT_ENCODING",
    "HTTP_ACCEPT_LANGUAGE", "HTTP_AUTHORIZATION",
    "HTTP_CONNECTION", "CONTENT_TYPE",
    "CONTENT_LENGTH", "HTTP_COOKIE", "HTTP_COOKIE2",
    "HTTP_HOST", "HTTP_PRAGMA",
    "HTTP_REFERER", "HTTP_USER_AGENT",
    "HTTP_CACHE_CONTROL",
    "HTTP_IF_MODIFIED_SINCE", "HTTP_IF_MATCH",
    "HTTP_IF_NONE_MATCH",
    "HTTP_IF_RANGE",
    "HTTP_IF_UNMODIFIED_SINCE",
    "HTTP_KEEP_ALIVE",
    "HTTP_RANGE",
    "HTTP_X_FORWARDED_FOR",
    "HTTP_VIA",
    "HTTP_TRANSFER_ENCODING"
};

static int CGI_HEADER_LEN[H_TRANSFER_ENCODING+1] =
{    11, 19, 20, 20, 18, 15, 12, 14, 11, 12, 9, 11, 12, 15, 18,
     22, 13, 18, 13, 24, 15, 10, 20, 8, 22 };


static const char *HTTP_HEADERS[H_TRANSFER_ENCODING+1] =
{
    "Accept", "Accept-Charset",
    "Accept-Encoding",
    "Accept-Language", "Authorization",
    "Connection", "Content-Type",
    "Content-Length", "Cookie", "Cookie2",
    "Host", "Pragma",
    "Referer", "User-Agent",
    "Cache-Control",
    "If-Modified-Since", "If-Match",
    "If-None-Match",
    "If-Range",
    "If-Unmodified-Since",
    "Keep-Alive",
    "Range",
    "X-Forwarded-For",
    "Via",
    "Transfer-Encoding"
};

static int HTTP_HEADER_LEN[H_TRANSFER_ENCODING+1] =
{   6, 14, 15, 15, 13, 10, 12, 14, 6, 7, 4, 6, 7, 10, //user-agent
    13,17, 8, 13, 8, 19, 10, 5, 15, 3, 17
};


static const char *s_log_level_names[8] =
{
    "", "DEBUG","INFO", "NOTICE", "WARN", "ERROR", "CRIT", "FATAL"
};


void LSAPI_Log(int flag, const char * fmt, ...)
{
    char buf[1024];
    char *p = buf;
    if ((flag & LSAPI_LOG_TIMESTAMP_BITS)
        && !(s_stderr_is_pipe))
    {
        struct timeval  tv;
        struct tm       tm;
        gettimeofday(&tv, NULL);
        localtime_r(&tv.tv_sec, &tm);
        if (flag & LSAPI_LOG_TIMESTAMP_FULL)
        {
            p += snprintf(p, 1024, "%04d-%02d-%02d %02d:%02d:%02d.%06d ",
                tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
                tm.tm_hour, tm.tm_min, tm.tm_sec, (int)tv.tv_usec);
        }
        else if (flag & LSAPI_LOG_TIMESTAMP_HMS)
        {
            p += snprintf(p, 1024, "%02d:%02d:%02d ",
                tm.tm_hour, tm.tm_min, tm.tm_sec);
        }
    }

    int level = flag & LSAPI_LOG_LEVEL_BITS;
    if (level && level <= LSAPI_LOG_FLAG_FATAL)
    {
        p += snprintf(p, 100, "[%s] ", s_log_level_names[level]);
    }

    if (flag & LSAPI_LOG_PID)
    {
        p += snprintf(p, 100, "[UID:%d][%d] ", getuid(), s_pid);
    }

    if (p > buf)
        fprintf(stderr, "%.*s", (int)(p - buf), buf);
    va_list ap;
    va_start(ap, fmt);
    vfprintf(stderr, fmt, ap);
    va_end(ap);
}

#ifdef LSAPI_DEBUG

#define DBGLOG_FLAG (LSAPI_LOG_TIMESTAMP_FULL|LSAPI_LOG_FLAG_DEBUG|LSAPI_LOG_PID)
#define lsapi_dbg(...)   LSAPI_Log(DBGLOG_FLAG, __VA_ARGS__)

#else

#define lsapi_dbg(...)

#endif

#define lsapi_log(...)  LSAPI_Log(LSAPI_LOG_TIMESTAMP_FULL|LSAPI_LOG_PID, __VA_ARGS__)


void lsapi_perror(const char * pMessage, int err_no)
{
    lsapi_log("%s, errno: %d (%s)\n", pMessage, err_no, strerror(err_no));
}


static int lsapi_parent_dead()
{
    // Return non-zero if the parent is dead.  0 if still alive.
    if (!s_ppid) {
        // not checking, so not dead
        return(0);
    }
    if (s_restored_ppid) {
        if (kill(s_restored_ppid,0) == -1) {
            if (errno == EPERM) {
                return(0); // no permission, but it's still there.
            }
            return(1); // Dead
        }
        return(0); // it worked, so it's not dead
    }
    return(s_ppid != getppid());
}


static void lsapi_sigpipe( int sig )
{
}


static void lsapi_siguser1( int sig )
{
    g_running = 0;
}

#ifndef sighandler_t
typedef void (*sighandler_t)(int);
#endif

static void lsapi_signal(int signo, sighandler_t handler)
{
    struct sigaction sa;

    sigaction(signo, NULL, &sa);

    if (sa.sa_handler == SIG_DFL)
    {
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        sa.sa_handler = handler;
        sigaction(signo, &sa, NULL);
    }
}


static int s_enable_core_dump = 0;
static void lsapi_enable_core_dump(void)
{
#if defined(__FreeBSD__ ) || defined(__NetBSD__) || defined(__OpenBSD__) \
    || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
    int  mib[2];
    size_t len;

#if !defined(__OpenBSD__)
    len = 2;
    if ( sysctlnametomib("kern.sugid_coredump", mib, &len) == 0 )
    {
        len = sizeof(s_enable_core_dump);
        if (sysctl(mib, 2, NULL, 0, &s_enable_core_dump, len) == -1)
            perror( "sysctl: Failed to set 'kern.sugid_coredump', "
                    "core dump may not be available!");
    }
#else
    int set = 3;
    len = sizeof(set);
    mib[0] = CTL_KERN;
    mib[1] = KERN_NOSUIDCOREDUMP;
    if (sysctl(mib, 2, NULL, 0, &set, len) == 0) {
        s_enable_core_dump = 1;
    }
#endif


#endif

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    if (prctl(PR_SET_DUMPABLE, s_enable_core_dump,0,0,0) == -1)
        perror( "prctl: Failed to set dumpable, "
                    "core dump may not be available!");
#endif
}


static inline void lsapi_buildPacketHeader( struct lsapi_packet_header * pHeader,
                                char type, int len )
{
    pHeader->m_versionB0 = LSAPI_VERSION_B0;  /* LSAPI protocol version */
    pHeader->m_versionB1 = LSAPI_VERSION_B1;
    pHeader->m_type      = type;
    pHeader->m_flag      = LSAPI_ENDIAN;
    pHeader->m_packetLen.m_iLen = len;
}


static  int lsapi_set_nblock( int fd, int nonblock )
{
    int val = fcntl( fd, F_GETFL, 0 );
    if ( nonblock )
    {
        if (!( val & O_NONBLOCK ))
        {
            return fcntl( fd, F_SETFL, val | O_NONBLOCK );
        }
    }
    else
    {
        if ( val & O_NONBLOCK )
        {
            return fcntl( fd, F_SETFL, val &(~O_NONBLOCK) );
        }
    }
    return 0;
}


static int lsapi_close( int fd )
{
    int ret;
    while( 1 )
    {
        ret = close( fd );
        if (( ret == -1 )&&( errno == EINTR )&&(g_running))
            continue;
        return ret;
    }
}


static void lsapi_close_connection(LSAPI_Request *pReq)
{
    if (pReq->m_fd == -1)
        return;
    lsapi_close(pReq->m_fd);
    pReq->m_fd = -1;
    if (s_busy_workers)
        __atomic_fetch_sub(s_busy_workers, 1, __ATOMIC_SEQ_CST);
    if (s_worker_status)
        __atomic_store_n(&s_worker_status->m_state, LSAPI_STATE_IDLE,
                         __ATOMIC_SEQ_CST);
}


static inline ssize_t lsapi_read( int fd, void * pBuf, size_t len )
{
    ssize_t ret;
    while( 1 )
    {
        ret = read( fd, (char *)pBuf, len );
        if (( ret == -1 )&&( errno == EINTR )&&(g_running))
            continue;
        return ret;
    }
}


/*
static int lsapi_write( int fd, const void * pBuf, int len )
{
   int ret;
   const char * pCur;
   const char * pEnd;
   if ( len == 0 )
       return 0;
   pCur = (const char *)pBuf;
   pEnd = pCur + len;
   while( g_running && (pCur < pEnd) )
   {
       ret = write( fd, pCur, pEnd - pCur );
       if ( ret >= 0)
           pCur += ret;
       else if (( ret == -1 )&&( errno != EINTR ))
           return ret;
   }
   return pCur - (const char *)pBuf;
}
*/


static int lsapi_writev( int fd, struct iovec ** pVec, int count, int totalLen )
{
    int ret;
    int left = totalLen;
    int n = count;

    if (s_skip_write)
        return totalLen;

    while(( left > 0 )&&g_running )
    {
        ret = writev( fd, *pVec, n );
        if ( ret > 0 )
        {
            left -= ret;
            if (( left <= 0)||( !g_running ))
                return totalLen - left;
            while( ret > 0 )
            {
                if ( (*pVec)->iov_len <= (unsigned int )ret )
                {
                    ret -= (*pVec)->iov_len;
                    ++(*pVec);
                }
                else
                {
                    (*pVec)->iov_base = (char *)(*pVec)->iov_base + ret;
                    (*pVec)->iov_len -= ret;
                    break;
                }
            }
        }
        else if ( ret == -1 )
        {
            if ( errno == EAGAIN )
            {
                if ( totalLen - left > 0 )
                    return totalLen - left;
                else
                    return -1;
            }
            else if ( errno != EINTR )
                return ret;
        }
    }
    return totalLen - left;
}


/*
static int getTotalLen( struct iovec * pVec, int count )
{
   struct iovec * pEnd = pVec + count;
   int total = 0;
   while( pVec < pEnd )
   {
       total += pVec->iov_len;
       ++pVec;
   }
   return total;
}
*/


static inline int allocateBuf( LSAPI_Request * pReq, int size )
{
    char * pBuf = (char *)realloc( pReq->m_pReqBuf, size );
    if ( pBuf )
    {
        pReq->m_pReqBuf = pBuf;
        pReq->m_reqBufSize = size;
        pReq->m_pHeader = (struct lsapi_req_header *)pReq->m_pReqBuf;
        return 0;
    }
    return -1;
}


static int allocateIovec( LSAPI_Request * pReq, int n )
{
    struct iovec * p = (struct iovec *)realloc(
                pReq->m_pIovec, sizeof(struct iovec) * n );
    if ( !p )
        return -1;
    pReq->m_pIovecToWrite = p + ( pReq->m_pIovecToWrite - pReq->m_pIovec );
    pReq->m_pIovecCur = p + ( pReq->m_pIovecCur - pReq->m_pIovec );
    pReq->m_pIovec = p;
    pReq->m_pIovecEnd = p + n;
    return 0;
}


static int allocateRespHeaderBuf( LSAPI_Request * pReq, int size )
{
    char * p = (char *)realloc( pReq->m_pRespHeaderBuf, size );
    if ( !p )
        return -1;
    pReq->m_pRespHeaderBufPos   = p + ( pReq->m_pRespHeaderBufPos - pReq->m_pRespHeaderBuf );
    pReq->m_pRespHeaderBuf      = p;
    pReq->m_pRespHeaderBufEnd   = p + size;
    return 0;
}


static inline int verifyHeader( struct lsapi_packet_header * pHeader, char pktType )
{
    if (( LSAPI_VERSION_B0 != pHeader->m_versionB0 )||
        ( LSAPI_VERSION_B1 != pHeader->m_versionB1 )||
        ( pktType != pHeader->m_type ))
        return -1;
    if ( LSAPI_ENDIAN != (pHeader->m_flag & LSAPI_ENDIAN_BIT ))
    {
        register char b;
        b = pHeader->m_packetLen.m_bytes[0];
        pHeader->m_packetLen.m_bytes[0] = pHeader->m_packetLen.m_bytes[3];
        pHeader->m_packetLen.m_bytes[3] = b;
        b = pHeader->m_packetLen.m_bytes[1];
        pHeader->m_packetLen.m_bytes[1] = pHeader->m_packetLen.m_bytes[2];
        pHeader->m_packetLen.m_bytes[2] = b;
    }
    return pHeader->m_packetLen.m_iLen;
}


static int allocateEnvList( struct LSAPI_key_value_pair ** pEnvList,
                        int *curSize, int newSize )
{
    struct LSAPI_key_value_pair * pBuf;
    if ( *curSize >= newSize )
        return 0;
    if ( newSize > 8192 )
        return -1;
    pBuf = (struct LSAPI_key_value_pair *)realloc( *pEnvList, newSize *
                    sizeof(struct LSAPI_key_value_pair) );
    if ( pBuf )
    {
        *pEnvList = pBuf;
        *curSize  = newSize;
        return 0;
    }
    else
        return -1;

}


static inline int isPipe( int fd )
{
    char        achPeer[128];
    socklen_t   len = 128;
    if (( getpeername( fd, (struct sockaddr *)achPeer, &len ) != 0 )&&
        ( errno == ENOTCONN ))
        return 0;
    else
        return 1;
}


static int parseEnv( struct LSAPI_key_value_pair * pEnvList, int count,
            char **pBegin, char * pEnd )
{
    struct LSAPI_key_value_pair * pEnvEnd;
        int keyLen = 0, valLen = 0;
    if ( count > 8192 )
        return -1;
    pEnvEnd = pEnvList + count;
    while( pEnvList != pEnvEnd )
    {
        if ( pEnd - *pBegin < 4 )
            return -1;
        keyLen = *((unsigned char *)((*pBegin)++));
        keyLen = (keyLen << 8) + *((unsigned char *)((*pBegin)++));
        valLen = *((unsigned char *)((*pBegin)++));
        valLen = (valLen << 8) + *((unsigned char *)((*pBegin)++));
        if ( *pBegin + keyLen + valLen > pEnd )
            return -1;
        if (( !keyLen )||( !valLen ))
            return -1;

        pEnvList->pKey = *pBegin;
        *pBegin += keyLen;
        pEnvList->pValue = *pBegin;
        *pBegin += valLen;

        pEnvList->keyLen = keyLen - 1;
        pEnvList->valLen = valLen - 1;
        ++pEnvList;
    }
    if ( memcmp( *pBegin, "\0\0\0\0", 4 ) != 0 )
        return -1;
    *pBegin += 4;
    return 0;
}


static inline void swapIntEndian( int * pInteger )
{
    char * p = (char *)pInteger;
    register char b;
    b = p[0];
    p[0] = p[3];
    p[3] = b;
    b = p[1];
    p[1] = p[2];
    p[2] = b;

}


static inline void fixEndian( LSAPI_Request * pReq )
{
    struct lsapi_req_header *p= pReq->m_pHeader;
    swapIntEndian( &p->m_httpHeaderLen );
    swapIntEndian( &p->m_reqBodyLen );
    swapIntEndian( &p->m_scriptFileOff );
    swapIntEndian( &p->m_scriptNameOff );
    swapIntEndian( &p->m_queryStringOff );
    swapIntEndian( &p->m_requestMethodOff );
    swapIntEndian( &p->m_cntUnknownHeaders );
    swapIntEndian( &p->m_cntEnv );
    swapIntEndian( &p->m_cntSpecialEnv );
}


static void fixHeaderIndexEndian( LSAPI_Request * pReq )
{
    int i;
    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            register char b;
            char * p = (char *)(&pReq->m_pHeaderIndex->m_headerLen[i]);
            b = p[0];
            p[0] = p[1];
            p[1] = b;
            swapIntEndian( &pReq->m_pHeaderIndex->m_headerOff[i] );
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            swapIntEndian( &pCur->nameOff );
            swapIntEndian( &pCur->nameLen );
            swapIntEndian( &pCur->valueOff );
            swapIntEndian( &pCur->valueLen );
            ++pCur;
        }
    }
}


static int validateHeaders( LSAPI_Request * pReq )
{
    int totalLen = pReq->m_pHeader->m_httpHeaderLen;
    int i;
    for(i = 0; i < H_TRANSFER_ENCODING; ++i)
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            if (pReq->m_pHeaderIndex->m_headerOff[i] > totalLen
                || pReq->m_pHeaderIndex->m_headerLen[i]
                    + pReq->m_pHeaderIndex->m_headerOff[i] > totalLen)
                return -1;
        }
    }
    if (pReq->m_pHeader->m_cntUnknownHeaders > 0)
    {
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            if (pCur->nameOff > totalLen
                || pCur->nameOff + pCur->nameLen > totalLen
                || pCur->valueOff > totalLen
                || pCur->valueOff + pCur->valueLen > totalLen)
                return -1;
            ++pCur;
        }
    }
    return 0;
}


static uid_t s_uid = 0;
static uid_t s_defaultUid;  //web server need set this
static gid_t s_defaultGid;

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)

#define LSAPI_LVE_DISABLED  0
#define LSAPI_LVE_ENABLED   1
#define LSAPI_CAGEFS_ENABLED 2
#define LSAPI_CAGEFS_NO_SUEXEC 3
struct liblve;
static int s_enable_lve = LSAPI_LVE_DISABLED;
static struct liblve * s_lve = NULL;

static void *s_liblve;
static int (*fp_lve_is_available)(void) = NULL;
static int (*fp_lve_instance_init)(struct liblve *) = NULL;
static int (*fp_lve_destroy)(struct liblve *) = NULL;
static int (*fp_lve_enter)(struct liblve *, uint32_t, int32_t, int32_t, uint32_t *) = NULL;
static int (*fp_lve_leave)(struct liblve *, uint32_t *) = NULL;
static int (*fp_lve_jail)( struct passwd *, char *) = NULL;
static int lsapi_load_lve_lib(void)
{
    s_liblve = dlopen("liblve.so.0", RTLD_NOW | RTLD_GLOBAL);
    if (s_liblve)
    {
        fp_lve_is_available = dlsym(s_liblve, "lve_is_available");
        if (dlerror() == NULL)
        {
            if ( !(*fp_lve_is_available)() )
            {
                int uid = getuid();
                if ( uid )
                {
                    if (setreuid( s_uid, uid )) {};
                    if ( !(*fp_lve_is_available)() )
                        s_enable_lve = 0;
                    if (setreuid( uid, s_uid )) {};
                }
            }
        }
    }
    else
    {
        s_enable_lve = LSAPI_LVE_DISABLED;
    }
    return (s_liblve)? 0 : -1;
}


static int init_lve_ex(void)
{
    int rc;
    if ( !s_liblve )
        return -1;
    fp_lve_instance_init = dlsym(s_liblve, "lve_instance_init");
    fp_lve_destroy = dlsym(s_liblve, "lve_destroy");
    fp_lve_enter = dlsym(s_liblve, "lve_enter");
    fp_lve_leave = dlsym(s_liblve, "lve_leave");
    if ( s_enable_lve >= LSAPI_CAGEFS_ENABLED )
        fp_lve_jail = dlsym(s_liblve, "jail" );

    if ( s_lve == NULL )
    {
        rc = (*fp_lve_instance_init)(NULL);
        s_lve = malloc(rc);
    }
    rc = (*fp_lve_instance_init)(s_lve);
    if (rc != 0)
    {
        perror( "LSAPI: Unable to initialize LVE" );
        free( s_lve );
        s_lve = NULL;
        return -1;
    }
    return 0;

}

#endif



static int readSecret( const char * pSecretFile )
{
    struct stat st;
    int fd = open( pSecretFile, O_RDONLY , 0600 );
    if ( fd == -1 )
    {
        lsapi_log("LSAPI: failed to open secret file: %s!\n", pSecretFile );
        return -1;
    }
    if ( fstat( fd, &st ) == -1 )
    {
        lsapi_log("LSAPI: failed to check state of file: %s!\n", pSecretFile );
        close( fd );
        return -1;
    }
/*
    if ( st.st_uid != s_uid )
    {
        lsapi_log("LSAPI: file owner check failure: %s!\n", pSecretFile );
        close( fd );
        return -1;
    }
*/
    if ( st.st_mode & 0077 )
    {
        lsapi_log("LSAPI: file permission check failure: %s\n", pSecretFile );
        close( fd );
        return -1;
    }
    if ( read( fd, s_secret, 16 ) < 16 )
    {
        lsapi_log("LSAPI: failed to read secret from secret file: %s\n", pSecretFile );
        close( fd );
        return -1;
    }
    close( fd );
    return 0;
}


int LSAPI_is_suEXEC_Daemon(void)
{
    if (( !s_uid )&&( s_secret[0] ))
        return 1;
    else
        return 0;
}


static int LSAPI_perror_r( LSAPI_Request * pReq, const char * pErr1, const char *pErr2 )
{
    char achError[4096];
    int n = snprintf(achError, sizeof(achError), "[UID:%d][%d] %s:%s: %s\n",
                     getuid(), getpid(),
                     pErr1, (pErr2)?pErr2:"", strerror(errno));
    if (n > (int)sizeof(achError))
        n = sizeof(achError);
    if ( pReq )
        LSAPI_Write_Stderr_r( pReq, achError, n );
    else
        if (write( STDERR_FILENO, achError, n )) {};
    return 0;
}


#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
static int lsapi_lve_error( LSAPI_Request * pReq )
{
    static const char * headers[] =
    {
        "Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0",
        "Pragma: no-cache",
        "Retry-After: 60",
        "Content-Type: text/html",
        NULL
    };
    static const char achBody[] =
        "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
        "<HTML><HEAD>\n<TITLE>508 Resource Limit Is Reached</TITLE>\n"
        "</HEAD><BODY>\n" "<H1>Resource Limit Is Reached</H1>\n"
        "The website is temporarily unable to service your request as it exceeded resource limit.\n"
        "Please try again later.\n"
        "<HR>\n"
        "</BODY></HTML>\n";

    LSAPI_ErrResponse_r( pReq, 508, headers, achBody, sizeof( achBody ) - 1 );
    return 0;
}

static int lsapi_enterLVE( LSAPI_Request * pReq, uid_t uid )
{
    if ( s_lve && uid ) //root user should not do that
    {
        uint32_t cookie;
        int ret = -1;
        ret = (*fp_lve_enter)(s_lve, uid, -1, -1, &cookie);
        if ( ret < 0 )
        {
            //lsapi_log("enter LVE (%d) : result: %d !\n", uid, ret );
            LSAPI_perror_r(pReq, "LSAPI: lve_enter() failure, reached resource limit.", NULL );
            lsapi_lve_error( pReq );
            return -1;
        }
    }

    return 0;
}

static int lsapi_jailLVE( LSAPI_Request * pReq, uid_t uid, struct passwd * pw )
{
    int ret = 0;
    char  error_msg[1024] = "";
    ret = (*fp_lve_jail)( pw, error_msg );
    if ( ret < 0 )
    {
        lsapi_log("LSAPI: LVE jail(%d) result: %d, error: %s !\n",
                  uid, ret, error_msg );
        LSAPI_perror_r( pReq, "LSAPI: jail() failure.", NULL );
        return -1;
    }
    return ret;
}


static int lsapi_initLVE(void)
{
    const char * pEnv;
    if ( (pEnv = getenv( "LSAPI_LVE_ENABLE" ))!= NULL )
    {
        s_enable_lve = atol( pEnv );
        pEnv = NULL;
    }
    else if ( (pEnv = getenv( "LVE_ENABLE" ))!= NULL )
    {
        s_enable_lve = atol( pEnv );
        pEnv = NULL;
    }
    if ( s_enable_lve && !s_uid )
    {
        lsapi_load_lve_lib();
        if ( s_enable_lve )
        {
            return init_lve_ex();
        }

    }
    return 0;
}
#endif


static int setUID_LVE(LSAPI_Request * pReq, uid_t uid, gid_t gid, const char * pChroot)
{
    int rv;
    struct passwd * pw;
    pw = getpwuid( uid );
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    if ( s_lve )
    {
        if( lsapi_enterLVE( pReq, uid ) == -1 )
            return -1;
        if ( pw && fp_lve_jail)
        {
            rv = lsapi_jailLVE( pReq, uid, pw );
            if ( rv == -1 )
                return -1;
            if (( rv == 1 )&&(s_enable_lve == LSAPI_CAGEFS_NO_SUEXEC ))    //this mode only use cageFS, does not use suEXEC
            {
                uid = s_defaultUid;
                gid = s_defaultGid;
                pw = getpwuid( uid );
            }
        }
    }
#endif
    //if ( !uid || !gid )  //do not allow root
    //{
    //    return -1;
    //}

#if defined(__FreeBSD__ ) || defined(__NetBSD__) || defined(__OpenBSD__) \
    || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
    if ( s_enable_core_dump )
        lsapi_enable_core_dump();
#endif

    rv = setgid(gid);
    if (rv == -1)
    {
        LSAPI_perror_r(pReq, "LSAPI: setgid()", NULL);
        return -1;
    }
    if ( pw && (pw->pw_gid == gid ))
    {
        rv = initgroups( pw->pw_name, gid );
        if (rv == -1)
        {
            LSAPI_perror_r(pReq, "LSAPI: initgroups()", NULL);
            return -1;
        }
    }
    else
    {
        rv = setgroups(1, &gid);
        if (rv == -1)
        {
            LSAPI_perror_r(pReq, "LSAPI: setgroups()", NULL);
        }
    }
    if ( pChroot )
    {
        rv = chroot( pChroot );
        if ( rv == -1 )
        {
            LSAPI_perror_r(pReq, "LSAPI: chroot()", NULL);
            return -1;
        }
    }
    rv = setuid(uid);
    if (rv == -1)
    {
        LSAPI_perror_r(pReq, "LSAPI: setuid()", NULL);
        return -1;
    }
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    if ( s_enable_core_dump )
        lsapi_enable_core_dump();
#endif
    return 0;
}

static int lsapi_suexec_auth( LSAPI_Request *pReq,
            char * pAuth, int len, char * pUgid, int ugidLen )
{
    lsapi_MD5_CTX md5ctx;
    unsigned char achMD5[16];
    if ( len < 32 )
        return -1;
    memmove( achMD5, pAuth + 16, 16 );
    memmove( pAuth + 16, s_secret, 16 );
    lsapi_MD5Init( &md5ctx );
    lsapi_MD5Update( &md5ctx, (unsigned char *)pAuth, 32 );
    lsapi_MD5Update( &md5ctx, (unsigned char *)pUgid, 8 );
    lsapi_MD5Final( (unsigned char *)pAuth + 16, &md5ctx);
    if ( memcmp( achMD5, pAuth + 16, 16 ) == 0 )
        return 0;
    return 1;
}


static int lsapi_changeUGid( LSAPI_Request * pReq )
{
    int uid = s_defaultUid;
    int gid = s_defaultGid;
    const char *pStderrLog;
    const char *pChroot = NULL;
    struct LSAPI_key_value_pair * pEnv;
    struct LSAPI_key_value_pair * pAuth;
    int i;
    if ( s_uid )
        return 0;
    //with special ID  0x00
    //authenticate the suEXEC request;
    //first one should be MD5( nonce + lscgid secret )
    //remember to clear the secret after verification
    //it should be set at the end of special env
    i = pReq->m_pHeader->m_cntSpecialEnv - 1;
    if ( i >= 0 )
    {
        pEnv = pReq->m_pSpecialEnvList + i;
        if (( *pEnv->pKey == '\000' )&&
            ( strcmp( pEnv->pKey+1, "SUEXEC_AUTH" ) == 0 ))
        {
            --pReq->m_pHeader->m_cntSpecialEnv;
            pAuth = pEnv--;
            if (( *pEnv->pKey == '\000' )&&
                ( strcmp( pEnv->pKey+1, "SUEXEC_UGID" ) == 0 ))
            {
                --pReq->m_pHeader->m_cntSpecialEnv;
                uid = *(uint32_t *)pEnv->pValue;
                gid = *(((uint32_t *)pEnv->pValue) + 1 );
                //lsapi_log("LSAPI: SUEXEC_UGID set UID: %d, GID: %d\n", uid, gid );
            }
            else
            {
                lsapi_log("LSAPI: missing SUEXEC_UGID env, use default user!\n" );
                pEnv = NULL;
            }
            if ( pEnv&& lsapi_suexec_auth( pReq, pAuth->pValue, pAuth->valLen, pEnv->pValue, pEnv->valLen ) == 0 )
            {
                //read UID, GID from specialEnv

            }
            else
            {
                //authentication error
                lsapi_log("LSAPI: SUEXEC_AUTH authentication failed, use default user!\n" );
                uid = 0;
            }
        }
        else
        {
            //lsapi_log("LSAPI: no SUEXEC_AUTH env, use default user!\n" );
        }
    }


    if ( !uid )
    {
        uid = s_defaultUid;
        gid = s_defaultGid;
    }

    //change uid
    if ( setUID_LVE( pReq, uid, gid, pChroot ) == -1 )
    {
        return -1;
    }

    s_uid = uid;

    if ( pReq->m_fdListen != -1 )
    {
        close( pReq->m_fdListen );
        pReq->m_fdListen = -1;
    }

    pStderrLog = LSAPI_GetEnv_r( pReq, "LSAPI_STDERR_LOG");
    if (pStderrLog)
        lsapi_reopen_stderr(pStderrLog);

    return 0;

}


static int parseContentLenFromHeader(LSAPI_Request * pReq)
{
    const char * pContentLen = LSAPI_GetHeader_r( pReq, H_CONTENT_LENGTH );
    if ( pContentLen )
        pReq->m_reqBodyLen = strtoll( pContentLen, NULL, 10 );
    return 0;
}


static int parseRequest( LSAPI_Request * pReq, int totalLen )
{
    int shouldFixEndian;
    char * pBegin = pReq->m_pReqBuf + sizeof( struct lsapi_req_header );
    char * pEnd = pReq->m_pReqBuf + totalLen;
    shouldFixEndian = ( LSAPI_ENDIAN != (
                pReq->m_pHeader->m_pktHeader.m_flag & LSAPI_ENDIAN_BIT ) );
    if ( shouldFixEndian )
    {
        fixEndian( pReq );
    }
    if ( (pReq->m_specialEnvListSize < pReq->m_pHeader->m_cntSpecialEnv )&&
            allocateEnvList( &pReq->m_pSpecialEnvList,
                &pReq->m_specialEnvListSize,
                pReq->m_pHeader->m_cntSpecialEnv ) == -1 )
        return -1;
    if ( (pReq->m_envListSize < pReq->m_pHeader->m_cntEnv )&&
            allocateEnvList( &pReq->m_pEnvList, &pReq->m_envListSize,
                pReq->m_pHeader->m_cntEnv ) == -1 )
        return -1;

    if ( parseEnv( pReq->m_pSpecialEnvList,
                pReq->m_pHeader->m_cntSpecialEnv,
                &pBegin, pEnd ) == -1 )
        return -1;
    if ( parseEnv( pReq->m_pEnvList, pReq->m_pHeader->m_cntEnv,
                &pBegin, pEnd ) == -1 )
        return -1;
    if (pReq->m_pHeader->m_scriptFileOff < 0
        || pReq->m_pHeader->m_scriptFileOff >= totalLen
        || pReq->m_pHeader->m_scriptNameOff < 0
        || pReq->m_pHeader->m_scriptNameOff >= totalLen
        || pReq->m_pHeader->m_queryStringOff < 0
        || pReq->m_pHeader->m_queryStringOff >= totalLen
        || pReq->m_pHeader->m_requestMethodOff < 0
        || pReq->m_pHeader->m_requestMethodOff >= totalLen)
    {
        lsapi_log("Bad request header - ERROR#1\n");
        return -1;
    }
    pReq->m_pScriptFile     = pReq->m_pReqBuf + pReq->m_pHeader->m_scriptFileOff;
    pReq->m_pScriptName     = pReq->m_pReqBuf + pReq->m_pHeader->m_scriptNameOff;
    pReq->m_pQueryString    = pReq->m_pReqBuf + pReq->m_pHeader->m_queryStringOff;
    pReq->m_pRequestMethod  = pReq->m_pReqBuf + pReq->m_pHeader->m_requestMethodOff;

    pBegin = pReq->m_pReqBuf + (( pBegin - pReq->m_pReqBuf + 7 ) & (~0x7));
    pReq->m_pHeaderIndex = ( struct lsapi_http_header_index * )pBegin;
    pBegin += sizeof( struct lsapi_http_header_index );

    pReq->m_pUnknownHeader = (struct lsapi_header_offset *)pBegin;
    pBegin += sizeof( struct lsapi_header_offset) *
                    pReq->m_pHeader->m_cntUnknownHeaders;

    pReq->m_pHttpHeader = pBegin;
    pBegin += pReq->m_pHeader->m_httpHeaderLen;
    if ( pBegin != pEnd )
    {
        lsapi_log("Request header does match total size, total: %d, "
                 "real: %ld\n", totalLen, pBegin - pReq->m_pReqBuf );
        return -1;
    }
    if ( shouldFixEndian )
    {
        fixHeaderIndexEndian( pReq );
    }

    if (validateHeaders(pReq) == -1)
    {
        lsapi_log("Bad request header - ERROR#2\n");
        return -1;
    }

    pReq->m_reqBodyLen = pReq->m_pHeader->m_reqBodyLen;
    if ( pReq->m_reqBodyLen == -2 )
    {
        parseContentLenFromHeader(pReq);
    }

    return 0;
}


//OPTIMIZATION
static char s_accept_notify = 0;
static char s_schedule_notify = 0;
static char s_notify_scheduled = 0;
static char s_notified_pid = 0;

static struct lsapi_packet_header s_ack = {'L', 'S',
                LSAPI_REQ_RECEIVED, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} };
static struct lsapi_packet_header s_conn_close_pkt = {'L', 'S',
                LSAPI_CONN_CLOSE, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} };


static inline int send_notification_pkt( int fd, struct lsapi_packet_header *pkt )
{
    if ( write( fd, pkt, LSAPI_PACKET_HEADER_LEN ) < LSAPI_PACKET_HEADER_LEN )
        return -1;
    return 0;
}


static inline int send_req_received_notification( int fd )
{
    return send_notification_pkt(fd, &s_ack);
}


static inline int send_conn_close_notification( int fd )
{
    return send_notification_pkt(fd, &s_conn_close_pkt);
}


//static void lsapi_sigalarm( int sig )
//{
//    if ( s_notify_scheduled )
//    {
//        s_notify_scheduled = 0;
//        if ( g_req.m_fd != -1 )
//            write_req_received_notification( g_req.m_fd );
//    }
//}


static inline int lsapi_schedule_notify(void)
{
    if ( !s_notify_scheduled )
    {
        alarm( 2 );
        s_notify_scheduled = 1;
    }
    return 0;
}


static inline int notify_req_received( int fd )
{
    if ( s_schedule_notify )
        return lsapi_schedule_notify();
    return send_req_received_notification( fd );

}


static inline int lsapi_notify_pid( int fd )
{
    char achBuf[16];
    lsapi_buildPacketHeader( (struct lsapi_packet_header *)achBuf, LSAPI_STDERR_STREAM,
                        8 + LSAPI_PACKET_HEADER_LEN );
    memmove( &achBuf[8], "\0PID", 4 );
    *((int *)&achBuf[12]) = getpid();

    if ( write( fd, achBuf, 16 ) < 16 )
        return -1;
    return 0;
}

static int readReq( LSAPI_Request * pReq )
{
    int len;
    int packetLen;
    if ( !pReq )
        return -1;
    if ( pReq->m_reqBufSize < 8192 )
    {
        if ( allocateBuf( pReq, 8192 ) == -1 )
            return -1;
    }

    while ( pReq->m_bufRead < LSAPI_PACKET_HEADER_LEN )
    {
        len = lsapi_read( pReq->m_fd, pReq->m_pReqBuf, pReq->m_reqBufSize );
        if ( len <= 0 )
            return -1;
        pReq->m_bufRead += len;
    }
    pReq->m_reqState = LSAPI_ST_REQ_HEADER;

    packetLen = verifyHeader( &pReq->m_pHeader->m_pktHeader, LSAPI_BEGIN_REQUEST );
    if ( packetLen < 0 )
    {
        lsapi_log("packetLen < 0\n");
        return -1;
    }
    if ( packetLen > LSAPI_MAX_HEADER_LEN )
    {
        lsapi_log("packetLen > %d\n", LSAPI_MAX_HEADER_LEN );
        return -1;
    }

    if ( packetLen + 1024 > pReq->m_reqBufSize )
    {
        if ( allocateBuf( pReq, packetLen + 1024 ) == -1 )
            return -1;
    }
    while( packetLen > pReq->m_bufRead )
    {
        len = lsapi_read( pReq->m_fd, pReq->m_pReqBuf + pReq->m_bufRead, packetLen - pReq->m_bufRead );
        if ( len <= 0 )
            return -1;
        pReq->m_bufRead += len;
    }
    if ( parseRequest( pReq, packetLen ) < 0 )
    {
        lsapi_log("ParseRequest error\n");
        return -1;
    }

    pReq->m_reqState = LSAPI_ST_REQ_BODY | LSAPI_ST_RESP_HEADER;

    if ( !s_uid )
    {
        if ( lsapi_changeUGid( pReq ) )
            return -1;
        memset(s_secret, 0, sizeof(s_secret));
    }
    pReq->m_bufProcessed = packetLen;

    //OPTIMIZATION
    if ( !s_accept_notify && !s_notified_pid )
        return notify_req_received( pReq->m_fd );
    else
    {
        s_notified_pid = 0;
        return 0;
    }
}


int LSAPI_Init(void)
{
    if ( !g_inited )
    {
        s_uid = geteuid();
        s_secret[0] = 0;
        lsapi_signal(SIGPIPE, lsapi_sigpipe);
        lsapi_signal(SIGUSR1, lsapi_siguser1);

#if defined(SIGXFSZ) && defined(SIG_IGN)
        signal(SIGXFSZ, SIG_IGN);
#endif
        /* let STDOUT function as STDERR,
           just in case writing to STDOUT directly */
        dup2( 2, 1 );
        if ( LSAPI_InitRequest( &g_req, LSAPI_SOCK_FILENO ) == -1 )
            return -1;
        g_inited = 1;
        s_ppid = getppid();
        void *pthread_lib = dlopen("libpthread.so", RTLD_LAZY);
        if (pthread_lib)
            pthread_atfork_func = dlsym(pthread_lib, "pthread_atfork");

    }
    return 0;
}


void LSAPI_Stop(void)
{
    g_running = 0;
}


int LSAPI_IsRunning(void)
{
    return g_running;
}


void LSAPI_Register_Pgrp_Timer_Callback(LSAPI_On_Timer_pf cb)
{
    s_proc_group_timer_cb = cb;
}


int LSAPI_InitRequest( LSAPI_Request * pReq, int fd )
{
    int newfd;
    if ( !pReq )
        return -1;
    memset( pReq, 0, sizeof( LSAPI_Request ) );
    if ( allocateIovec( pReq, 16 ) == -1 )
        return -1;
    pReq->m_pRespBuf = pReq->m_pRespBufPos = (char *)malloc( LSAPI_RESP_BUF_SIZE );
    if ( !pReq->m_pRespBuf )
        return -1;
    pReq->m_pRespBufEnd = pReq->m_pRespBuf + LSAPI_RESP_BUF_SIZE;
    pReq->m_pIovecCur = pReq->m_pIovecToWrite = pReq->m_pIovec + 1;
    pReq->m_respPktHeaderEnd = &pReq->m_respPktHeader[5];
    if ( allocateRespHeaderBuf( pReq, LSAPI_INIT_RESP_HEADER_LEN ) == -1 )
        return -1;

    if ( fd == STDIN_FILENO )
    {
        fd = dup( fd );
        newfd = open( "/dev/null", O_RDWR );
        dup2( newfd, STDIN_FILENO );
    }

    if ( isPipe( fd ) )
    {
        pReq->m_fdListen = -1;
        pReq->m_fd = fd;
    }
    else
    {
        pReq->m_fdListen = fd;
        pReq->m_fd = -1;
        lsapi_set_nblock( fd, 1 );
    }
    return 0;
}


int LSAPI_Is_Listen( void )
{
    return LSAPI_Is_Listen_r( &g_req );
}


int LSAPI_Is_Listen_r( LSAPI_Request * pReq)
{
    return pReq->m_fdListen != -1;
}


int LSAPI_Accept_r( LSAPI_Request * pReq )
{
    char        achPeer[128];
    socklen_t   len;
    int         nodelay = 1;

    if ( !pReq )
        return -1;
    if ( LSAPI_Finish_r( pReq ) == -1 )
        return -1;
    lsapi_set_nblock( pReq->m_fdListen , 0 );
    while( g_running )
    {
        if ( pReq->m_fd == -1 )
        {
            if ( pReq->m_fdListen != -1)
            {
                len = sizeof( achPeer );
                pReq->m_fd = accept( pReq->m_fdListen,
                            (struct sockaddr *)&achPeer, &len );
                if ( pReq->m_fd == -1 )
                {
                    if (( errno == EINTR )||( errno == EAGAIN))
                        continue;
                    else
                        return -1;
                }
                else
                {
                    if (s_worker_status)
                        __atomic_store_n(&s_worker_status->m_state,
                                       LSAPI_STATE_CONNECTED, __ATOMIC_SEQ_CST);
                    if (s_busy_workers)
                        __atomic_fetch_add(s_busy_workers, 1, __ATOMIC_SEQ_CST);
                    lsapi_set_nblock( pReq->m_fd , 0 );
                    if (((struct sockaddr *)&achPeer)->sa_family == AF_INET )
                    {
                        setsockopt(pReq->m_fd, IPPROTO_TCP, TCP_NODELAY,
                                   (char *)&nodelay, sizeof(nodelay));
                    }
                    //init_conn_key( pReq->m_fd );
                    //OPTIMIZATION
                    if ( s_accept_notify )
                        if ( notify_req_received( pReq->m_fd ) == -1 )
                                return -1;
                }
            }
            else
                return -1;
        }
        if ( !readReq( pReq ) )
            break;
        //abort();
        lsapi_close_connection(pReq);
        LSAPI_Reset_r( pReq );
    }
    return 0;
}


static struct lsapi_packet_header   finish_close[2] =
{
    {'L', 'S', LSAPI_RESP_END, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} },
    {'L', 'S', LSAPI_CONN_CLOSE, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} }
};


int LSAPI_Finish_r( LSAPI_Request * pReq )
{
    /* finish req body */
    if ( !pReq )
        return -1;
    if (pReq->m_reqState)
    {
        if ( pReq->m_fd != -1 )
        {
            if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
            {
                LSAPI_FinalizeRespHeaders_r( pReq );
            }
            if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
            {
                Flush_RespBuf_r( pReq );
            }

            pReq->m_pIovecCur->iov_base = (void *)finish_close;
            pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN;
            pReq->m_totalLen += LSAPI_PACKET_HEADER_LEN;
            ++pReq->m_pIovecCur;
            LSAPI_Flush_r( pReq );
        }
        LSAPI_Reset_r( pReq );
    }
    return 0;
}


int LSAPI_End_Response_r(LSAPI_Request * pReq)
{
    if (!pReq)
        return -1;
    if (pReq->m_reqState & LSAPI_ST_BACKGROUND)
        return 0;
    if (pReq->m_reqState)
    {
        if ( pReq->m_fd != -1 )
        {
            if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
            {
                if ( pReq->m_pRespHeaderBufPos <= pReq->m_pRespHeaderBuf )
                    return 0;

                LSAPI_FinalizeRespHeaders_r( pReq );
            }
            if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
            {
                Flush_RespBuf_r( pReq );
            }

            pReq->m_pIovecCur->iov_base = (void *)finish_close;
            pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN << 1;
            pReq->m_totalLen += LSAPI_PACKET_HEADER_LEN << 1;
            ++pReq->m_pIovecCur;
            LSAPI_Flush_r( pReq );
            lsapi_close_connection(pReq);
        }
        pReq->m_reqState |= LSAPI_ST_BACKGROUND;
    }
    return 0;
}


void LSAPI_Reset_r( LSAPI_Request * pReq )
{
    pReq->m_pRespBufPos         = pReq->m_pRespBuf;
    pReq->m_pIovecCur           = pReq->m_pIovecToWrite = pReq->m_pIovec + 1;
    pReq->m_pRespHeaderBufPos   = pReq->m_pRespHeaderBuf;

    memset( &pReq->m_pHeaderIndex, 0,
            (char *)(pReq->m_respHeaderLen) - (char *)&pReq->m_pHeaderIndex );
}


int LSAPI_Release_r( LSAPI_Request * pReq )
{
    if ( pReq->m_pReqBuf )
        free( pReq->m_pReqBuf );
    if ( pReq->m_pSpecialEnvList )
        free( pReq->m_pSpecialEnvList );
    if ( pReq->m_pEnvList )
        free( pReq->m_pEnvList );
    if ( pReq->m_pRespHeaderBuf )
        free( pReq->m_pRespHeaderBuf );
    return 0;
}


char * LSAPI_GetHeader_r( LSAPI_Request * pReq, int headerIndex )
{
    int off;
    if ( !pReq || ((unsigned int)headerIndex > H_TRANSFER_ENCODING) )
        return NULL;
    off = pReq->m_pHeaderIndex->m_headerOff[ headerIndex ];
    if ( !off )
        return NULL;
    if ( *(pReq->m_pHttpHeader + off
        + pReq->m_pHeaderIndex->m_headerLen[ headerIndex ]) )
    {
        *( pReq->m_pHttpHeader + off
            + pReq->m_pHeaderIndex->m_headerLen[ headerIndex ]) = 0;
    }
    return pReq->m_pHttpHeader + off;
}


static int readBodyToReqBuf( LSAPI_Request * pReq )
{
    off_t bodyLeft;
    ssize_t len = pReq->m_bufRead - pReq->m_bufProcessed;
    if ( len > 0 )
        return len;
    pReq->m_bufRead = pReq->m_bufProcessed = pReq->m_pHeader->m_pktHeader.m_packetLen.m_iLen;

    bodyLeft = pReq->m_reqBodyLen - pReq->m_reqBodyRead;
    len = pReq->m_reqBufSize - pReq->m_bufRead;
    if ( len < 0 )
        return -1;
    if ( len > bodyLeft )
        len = bodyLeft;

    len = lsapi_read( pReq->m_fd, pReq->m_pReqBuf + pReq->m_bufRead, len );
    if ( len > 0 )
        pReq->m_bufRead += len;
    return len;
}


int LSAPI_ReqBodyGetChar_r( LSAPI_Request * pReq )
{
    if (!pReq || (pReq->m_fd ==-1) )
        return EOF;
    if ( pReq->m_bufProcessed >= pReq->m_bufRead )
    {
        if ( readBodyToReqBuf( pReq ) <= 0 )
            return EOF;
    }
    ++pReq->m_reqBodyRead;
    return (unsigned char)*(pReq->m_pReqBuf + pReq->m_bufProcessed++);
}


int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen, int *getLF )
{
    ssize_t len;
    ssize_t left;
    char * pBufEnd = pBuf + bufLen - 1;
    char * pBufCur = pBuf;
    char * pCur;
    char * p;
    if (!pReq || pReq->m_fd == -1 || !pBuf || !getLF)
        return -1;
    *getLF = 0;
    while( (left = pBufEnd - pBufCur ) > 0 )
    {

        len = pReq->m_bufRead - pReq->m_bufProcessed;
        if ( len <= 0 )
        {
            if ( (len = readBodyToReqBuf( pReq )) <= 0 )
            {
                *getLF = 1;
                break;
            }
        }
        if ( len > left )
            len = left;
        pCur = pReq->m_pReqBuf + pReq->m_bufProcessed;
        p = memchr( pCur, '\n', len );
        if ( p )
            len = p - pCur + 1;
        memmove( pBufCur, pCur, len );
        pBufCur += len;
        pReq->m_bufProcessed += len;

        pReq->m_reqBodyRead += len;

        if ( p )
        {
            *getLF = 1;
            break;
        }
    }
    *pBufCur = 0;

    return pBufCur - pBuf;
}


ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen )
{
    ssize_t len;
    off_t total;
    /* char *pOldBuf = pBuf; */
    if (!pReq || pReq->m_fd == -1 || !pBuf || (ssize_t)bufLen < 0)
        return -1;

    total = pReq->m_reqBodyLen - pReq->m_reqBodyRead;

    if ( total <= 0 )
        return 0;
    if ( total < (ssize_t)bufLen )
        bufLen = total;

    total = 0;
    len = pReq->m_bufRead - pReq->m_bufProcessed;
    if ( len > 0 )
    {
        if ( len > (ssize_t)bufLen )
            len = bufLen;
        memmove( pBuf, pReq->m_pReqBuf + pReq->m_bufProcessed, len );
        pReq->m_bufProcessed += len;
        total += len;
        pBuf += len;
        bufLen -= len;
    }
    while( bufLen > 0 )
    {
        len = lsapi_read( pReq->m_fd, pBuf, bufLen );
        if ( len > 0 )
        {
            total += len;
            pBuf += len;
            bufLen -= len;
        }
        else if ( len <= 0 )
        {
            if ( !total)
                return -1;
            break;
        }
    }
    pReq->m_reqBodyRead += total;
    return total;

}


ssize_t LSAPI_Write_r( LSAPI_Request * pReq, const char * pBuf, size_t len )
{
    struct lsapi_packet_header * pHeader;
    const char * pEnd;
    const char * p;
    ssize_t bufLen;
    ssize_t toWrite;
    ssize_t packetLen;
    int skip = 0;

    if (!pReq || !pBuf)
        return -1;
    if (pReq->m_reqState & LSAPI_ST_BACKGROUND)
        return len;
    if (pReq->m_fd == -1)
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
    {
        LSAPI_FinalizeRespHeaders_r( pReq );
/*
        if ( *pBuf == '\r' )
        {
            ++skip;
        }
        if ( *pBuf == '\n' )
        {
            ++skip;
        }
*/
    }
    pReq->m_reqState |= LSAPI_ST_RESP_BODY;

    if ( ((ssize_t)len - skip) < pReq->m_pRespBufEnd - pReq->m_pRespBufPos )
    {
        memmove( pReq->m_pRespBufPos, pBuf + skip, len - skip );
        pReq->m_pRespBufPos += len - skip;
        return len;
    }


    pHeader = pReq->m_respPktHeader;
    p       = pBuf + skip;
    pEnd    = pBuf + len;
    bufLen  = pReq->m_pRespBufPos - pReq->m_pRespBuf;

    while( ( toWrite = pEnd - p ) > 0 )
    {
        packetLen = toWrite + bufLen;
        if ( LSAPI_MAX_DATA_PACKET_LEN < packetLen)
        {
            packetLen = LSAPI_MAX_DATA_PACKET_LEN;
            toWrite = packetLen - bufLen;
        }

        lsapi_buildPacketHeader( pHeader, LSAPI_RESP_STREAM,
                            packetLen + LSAPI_PACKET_HEADER_LEN );
        pReq->m_totalLen += packetLen + LSAPI_PACKET_HEADER_LEN;

        pReq->m_pIovecCur->iov_base = (void *)pHeader;
        pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN;
        ++pReq->m_pIovecCur;
        ++pHeader;
        if ( bufLen > 0 )
        {
            pReq->m_pIovecCur->iov_base = (void *)pReq->m_pRespBuf;
            pReq->m_pIovecCur->iov_len  = bufLen;
            pReq->m_pRespBufPos = pReq->m_pRespBuf;
            ++pReq->m_pIovecCur;
            bufLen = 0;
        }

        pReq->m_pIovecCur->iov_base = (void *)p;
        pReq->m_pIovecCur->iov_len  = toWrite;
        ++pReq->m_pIovecCur;
        p += toWrite;

        if ( pHeader >= pReq->m_respPktHeaderEnd - 1)
        {
            if ( LSAPI_Flush_r( pReq ) == -1 )
                return -1;
            pHeader = pReq->m_respPktHeader;
        }
    }
    if ( pHeader != pReq->m_respPktHeader )
        if ( LSAPI_Flush_r( pReq ) == -1 )
            return -1;
    return p - pBuf;
}


#if defined(__FreeBSD__ )
ssize_t gsendfile( int fdOut, int fdIn, off_t* off, size_t size )
{
    ssize_t ret;
    off_t written;
    ret = sendfile( fdIn, fdOut, *off, size, NULL, &written, 0 );
    if ( written > 0 )
    {
        ret = written;
        *off += ret;
    }
    return ret;
}
#endif

#if defined(__OpenBSD__) || defined(__NetBSD__)
ssize_t gsendfile( int fdOut, int fdIn, off_t* off, size_t size )
{
    ssize_t ret;
    off_t written = 0;
    const size_t bufsiz = 16384;
    unsigned char in[bufsiz] = {0};

    if (lseek(fdIn, *off, SEEK_SET) == -1) {
        return -1;
    }

    while (size > 0) {
        size_t tor = size > sizeof(in) ? sizeof(in) : size;
        ssize_t c = read(fdIn, in, tor);
        if (c <= 0) {
            goto end;
        }

        ssize_t w = write(fdOut, in, c);
        if (w > 0)
            written += w;

        if (w != c) {
            goto end;
        }
        size -= c;
    }

end:
    *off += written;
    return 0;
}
#endif


#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
ssize_t gsendfile( int fdOut, int fdIn, off_t* off, size_t size )
{
    ssize_t ret;
    off_t len = size;
    ret = sendfile( fdIn, fdOut, *off, &len, NULL, 0 );
    if (( ret == 0 )&&( len > 0 ))
    {
        ret = len;
        *off += len;
    }
    return ret;
}
#endif


#if defined(sun) || defined(__sun)
#include <sys/sendfile.h>
ssize_t gsendfile( int fdOut, int fdIn, off_t *off, size_t size )
{
    int n = 0 ;
    sendfilevec_t vec[1];

    vec[n].sfv_fd   = fdIn;
    vec[n].sfv_flag = 0;
    vec[n].sfv_off  = *off;
    vec[n].sfv_len  = size;
    ++n;

    size_t written;
    ssize_t ret = sendfilev( fdOut, vec, n, &written );
    if (( !ret )||( errno == EAGAIN ))
        ret = written;
    if ( ret > 0 )
        *off += ret;
    return ret;
}
#endif


#if defined(linux) || defined(__linux) || defined(__linux__) || \
    defined(__gnu_linux__)
#include <sys/sendfile.h>
#define gsendfile sendfile
#endif


#if defined(HPUX)
ssize_t gsendfile( int fdOut, int fdIn, off_t * off, size_t size )
{
    return sendfile( fdOut, fdIn, off, size, NULL, 0 );
}
#endif


ssize_t LSAPI_sendfile_r( LSAPI_Request * pReq, int fdIn, off_t* off, size_t size )
{
    struct lsapi_packet_header * pHeader = pReq->m_respPktHeader;
    if ( !pReq || (pReq->m_fd == -1) || fdIn == -1 )
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
    {
        LSAPI_FinalizeRespHeaders_r( pReq );
    }
    pReq->m_reqState |= LSAPI_ST_RESP_BODY;

    LSAPI_Flush_r(pReq);

    lsapi_buildPacketHeader( pHeader, LSAPI_RESP_STREAM,
                            size + LSAPI_PACKET_HEADER_LEN );


    if (write(pReq->m_fd,  (const char *) pHeader, LSAPI_PACKET_HEADER_LEN ) != LSAPI_PACKET_HEADER_LEN)
        return -1;

    return gsendfile( pReq->m_fd, fdIn, off, size );
}


void Flush_RespBuf_r( LSAPI_Request * pReq )
{
    struct lsapi_packet_header * pHeader = pReq->m_respPktHeader;
    int bufLen = pReq->m_pRespBufPos - pReq->m_pRespBuf;
    pReq->m_reqState |= LSAPI_ST_RESP_BODY;
    lsapi_buildPacketHeader( pHeader, LSAPI_RESP_STREAM,
                        bufLen + LSAPI_PACKET_HEADER_LEN );
    pReq->m_totalLen += bufLen + LSAPI_PACKET_HEADER_LEN;

    pReq->m_pIovecCur->iov_base = (void *)pHeader;
    pReq->m_pIovecCur->iov_len  = LSAPI_PACKET_HEADER_LEN;
    ++pReq->m_pIovecCur;
    ++pHeader;
    if ( bufLen > 0 )
    {
        pReq->m_pIovecCur->iov_base = (void *)pReq->m_pRespBuf;
        pReq->m_pIovecCur->iov_len  = bufLen;
        pReq->m_pRespBufPos = pReq->m_pRespBuf;
        ++pReq->m_pIovecCur;
        bufLen = 0;
    }
}


int LSAPI_Flush_r( LSAPI_Request * pReq )
{
    int ret = 0;
    int n;
    if ( !pReq )
        return -1;
    n = pReq->m_pIovecCur - pReq->m_pIovecToWrite;
    if (( 0 == n )&&( pReq->m_pRespBufPos == pReq->m_pRespBuf ))
        return 0;
    if ( pReq->m_fd == -1 )
    {
        pReq->m_pRespBufPos = pReq->m_pRespBuf;
        pReq->m_totalLen = 0;
        pReq->m_pIovecCur = pReq->m_pIovecToWrite = pReq->m_pIovec;
        return -1;
    }
    if ( pReq->m_reqState & LSAPI_ST_RESP_HEADER )
    {
        LSAPI_FinalizeRespHeaders_r( pReq );
    }
    if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
    {
        Flush_RespBuf_r( pReq );
    }

    n = pReq->m_pIovecCur - pReq->m_pIovecToWrite;
    if ( n > 0 )
    {

        ret = lsapi_writev( pReq->m_fd, &pReq->m_pIovecToWrite,
                  n, pReq->m_totalLen );
        if ( ret < pReq->m_totalLen )
        {
            lsapi_close_connection(pReq);
            ret = -1;
        }
        pReq->m_totalLen = 0;
        pReq->m_pIovecCur = pReq->m_pIovecToWrite = pReq->m_pIovec;
    }
    return ret;
}


ssize_t LSAPI_Write_Stderr_r( LSAPI_Request * pReq, const char * pBuf, size_t len )
{
    struct lsapi_packet_header header;
    const char * pEnd;
    const char * p;
    ssize_t packetLen;
    ssize_t totalLen;
    int ret;
    struct iovec iov[2];
    struct iovec *pIov;

    if ( !pReq )
        return -1;
    if (s_stderr_log_path || pReq->m_fd == -1 || pReq->m_fd == pReq->m_fdListen)
        return write( 2, pBuf, len );
    if ( pReq->m_pRespBufPos != pReq->m_pRespBuf )
    {
        LSAPI_Flush_r( pReq );
    }

    p       = pBuf;
    pEnd    = pBuf + len;

    while( ( packetLen = pEnd - p ) > 0 )
    {
        if ( LSAPI_MAX_DATA_PACKET_LEN < packetLen)
        {
            packetLen = LSAPI_MAX_DATA_PACKET_LEN;
        }

        lsapi_buildPacketHeader( &header, LSAPI_STDERR_STREAM,
                            packetLen + LSAPI_PACKET_HEADER_LEN );
        totalLen = packetLen + LSAPI_PACKET_HEADER_LEN;

        iov[0].iov_base = (void *)&header;
        iov[0].iov_len  = LSAPI_PACKET_HEADER_LEN;

        iov[1].iov_base = (void *)p;
        iov[1].iov_len  = packetLen;
        p += packetLen;
        pIov = iov;
        ret = lsapi_writev( pReq->m_fd, &pIov,
                  2, totalLen );
        if ( ret < totalLen )
        {
            lsapi_close_connection(pReq);
            ret = -1;
        }
    }
    return p - pBuf;
}


static char * GetHeaderVar( LSAPI_Request * pReq, const char * name )
{
    int i;
    char * pValue;
    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            if ( strcmp( name, CGI_HEADERS[i] ) == 0 )
            {
                pValue = pReq->m_pHttpHeader
                         + pReq->m_pHeaderIndex->m_headerOff[i];
                if ( *(pValue + pReq->m_pHeaderIndex->m_headerLen[i]) != '\0')
                {
                    *(pValue + pReq->m_pHeaderIndex->m_headerLen[i]) = '\0';
                }
                return pValue;
            }
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        const char *p;
        char *pKey;
        char *pKeyEnd;
        int  keyLen;
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            pKey = pReq->m_pHttpHeader + pCur->nameOff;
            keyLen = pCur->nameLen;
            pKeyEnd = pKey + keyLen;
            p = &name[5];

            while(( pKey < pKeyEnd )&&( *p ))
            {
                char ch = toupper( *pKey );
                if ((ch != *p )||(( *p == '_' )&&( ch != '-')))
                    break;
                ++p; ++pKey;
            }
            if (( pKey == pKeyEnd )&& (!*p ))
            {
                pValue = pReq->m_pHttpHeader + pCur->valueOff;

                if ( *(pValue + pCur->valueLen) != '\0')
                {
                    *(pValue + pCur->valueLen) = '\0';
                }
                return pValue;
            }
            ++pCur;
        }
    }
    return NULL;
}


char * LSAPI_GetEnv_r( LSAPI_Request * pReq, const char * name )
{
    struct LSAPI_key_value_pair * pBegin = pReq->m_pEnvList;
    struct LSAPI_key_value_pair * pEnd = pBegin + pReq->m_pHeader->m_cntEnv;
    if ( !pReq || !name )
        return NULL;
    if ( strncmp( name, "HTTP_", 5 ) == 0 )
    {
        return GetHeaderVar( pReq, name );
    }
    while( pBegin < pEnd )
    {
        if ( strcmp( name, pBegin->pKey ) == 0 )
            return pBegin->pValue;
        ++pBegin;
    }
    return NULL;
}


struct _headerInfo
{
    const char * _name;
    int          _nameLen;
    const char * _value;
    int          _valueLen;
};


int compareValueLocation(const void * v1, const void *v2 )
{
    return ((const struct _headerInfo *)v1)->_value -
           ((const struct _headerInfo *)v2)->_value;
}


int LSAPI_ForeachOrgHeader_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    int i;
    int len = 0;
    char * pValue;
    int ret;
    int count = 0;
    struct _headerInfo headers[512];

    if ( !pReq || !fn )
        return -1;

    if ( !pReq->m_pHeaderIndex )
        return 0;

    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            len = pReq->m_pHeaderIndex->m_headerLen[i];
            pValue = pReq->m_pHttpHeader + pReq->m_pHeaderIndex->m_headerOff[i];
            *(pValue + len ) = 0;
            headers[count]._name = HTTP_HEADERS[i];
            headers[count]._nameLen = HTTP_HEADER_LEN[i];
            headers[count]._value = pValue;
            headers[count]._valueLen = len;
            ++count;

            //ret = (*fn)( HTTP_HEADERS[i], HTTP_HEADER_LEN[i],
            //            pValue, len, arg );
            //if ( ret <= 0 )
            //    return ret;
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        char *pKey;
        int  keyLen;
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            pKey = pReq->m_pHttpHeader + pCur->nameOff;
            keyLen = pCur->nameLen;
            *(pKey + keyLen ) = 0;

            pValue = pReq->m_pHttpHeader + pCur->valueOff;
            *(pValue + pCur->valueLen ) = 0;
            headers[count]._name = pKey;
            headers[count]._nameLen = keyLen;
            headers[count]._value = pValue;
            headers[count]._valueLen = pCur->valueLen;
            ++count;
            if ( count == 512 )
                break;
            //ret = (*fn)( pKey, keyLen,
            //            pValue, pCur->valueLen, arg );
            //if ( ret <= 0 )
            //    return ret;
            ++pCur;
        }
    }
    qsort( headers, count, sizeof( struct _headerInfo ), compareValueLocation );
    for( i = 0; i < count; ++i )
    {
        ret = (*fn)( headers[i]._name, headers[i]._nameLen,
                    headers[i]._value, headers[i]._valueLen, arg );
        if ( ret <= 0 )
            return ret;
    }
    return count;
}


int LSAPI_ForeachHeader_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    int i;
    int len = 0;
    char * pValue;
    int ret;
    int count = 0;
    if ( !pReq || !fn )
        return -1;
    for( i = 0; i < H_TRANSFER_ENCODING; ++i )
    {
        if ( pReq->m_pHeaderIndex->m_headerOff[i] )
        {
            len = pReq->m_pHeaderIndex->m_headerLen[i];
            pValue = pReq->m_pHttpHeader + pReq->m_pHeaderIndex->m_headerOff[i];
            *(pValue + len ) = 0;
            ret = (*fn)( CGI_HEADERS[i], CGI_HEADER_LEN[i],
                        pValue, len, arg );
            ++count;
            if ( ret <= 0 )
                return ret;
        }
    }
    if ( pReq->m_pHeader->m_cntUnknownHeaders > 0 )
    {
        char achHeaderName[256];
        char *p;
        char *pKey;
        char *pKeyEnd ;
        int  keyLen;
        struct lsapi_header_offset * pCur, *pEnd;
        pCur = pReq->m_pUnknownHeader;
        pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
        while( pCur < pEnd )
        {
            pKey = pReq->m_pHttpHeader + pCur->nameOff;
            keyLen = pCur->nameLen;
            if ( keyLen > 250 )
                keyLen = 250;
            pKeyEnd = pKey + keyLen;
            memcpy( achHeaderName, "HTTP_", 5 );
            p = &achHeaderName[5];

            while( pKey < pKeyEnd )
            {
                char ch = *pKey++;
                if ( ch == '-' )
                    *p++ = '_';
                else
                    *p++ = toupper( ch );
            }
            *p = 0;
            keyLen += 5;

            pValue = pReq->m_pHttpHeader + pCur->valueOff;
            *(pValue + pCur->valueLen ) = 0;
            ret = (*fn)( achHeaderName, keyLen,
                        pValue, pCur->valueLen, arg );
            if ( ret <= 0 )
                return ret;
            ++pCur;
        }
    }
    return count + pReq->m_pHeader->m_cntUnknownHeaders;
}


static int EnvForeach( struct LSAPI_key_value_pair * pEnv,
            int n, LSAPI_CB_EnvHandler fn, void * arg )
{
    struct LSAPI_key_value_pair * pEnd = pEnv + n;
    int ret;
    if ( !pEnv || !fn )
        return -1;
    while( pEnv < pEnd )
    {
        ret = (*fn)( pEnv->pKey, pEnv->keyLen,
                    pEnv->pValue, pEnv->valLen, arg );
        if ( ret <= 0 )
            return ret;
        ++pEnv;
    }
    return n;
}


int LSAPI_ForeachEnv_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    if ( !pReq || !fn )
        return -1;
    if ( pReq->m_pHeader->m_cntEnv > 0 )
    {
        return EnvForeach( pReq->m_pEnvList, pReq->m_pHeader->m_cntEnv,
                    fn, arg );
    }
    return 0;
}


int LSAPI_ForeachSpecialEnv_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg )
{
    if ( !pReq || !fn )
        return -1;
    if ( pReq->m_pHeader->m_cntSpecialEnv > 0 )
    {
        return EnvForeach( pReq->m_pSpecialEnvList,
                pReq->m_pHeader->m_cntSpecialEnv,
                    fn, arg );
    }
    return 0;

}


int LSAPI_FinalizeRespHeaders_r( LSAPI_Request * pReq )
{
    if ( !pReq || !pReq->m_pIovec )
        return -1;
    if ( !( pReq->m_reqState & LSAPI_ST_RESP_HEADER ) )
        return 0;
    pReq->m_reqState &= ~LSAPI_ST_RESP_HEADER;
    if ( pReq->m_pRespHeaderBufPos > pReq->m_pRespHeaderBuf )
    {
        pReq->m_pIovecCur->iov_base = (void *)pReq->m_pRespHeaderBuf;
        pReq->m_pIovecCur->iov_len  = pReq->m_pRespHeaderBufPos - pReq->m_pRespHeaderBuf;
        pReq->m_totalLen += pReq->m_pIovecCur->iov_len;
        ++pReq->m_pIovecCur;
    }

    pReq->m_pIovec->iov_len  = sizeof( struct lsapi_resp_header)
            + pReq->m_respHeader.m_respInfo.m_cntHeaders * sizeof( short );
    pReq->m_totalLen += pReq->m_pIovec->iov_len;

    lsapi_buildPacketHeader( &pReq->m_respHeader.m_pktHeader,
                    LSAPI_RESP_HEADER, pReq->m_totalLen  );
    pReq->m_pIovec->iov_base = (void *)&pReq->m_respHeader;
    pReq->m_pIovecToWrite = pReq->m_pIovec;
    return 0;
}


int LSAPI_AppendRespHeader2_r( LSAPI_Request * pReq, const char * pHeaderName,
                              const char * pHeaderValue )
{
    int nameLen, valLen, len;
    if ( !pReq || !pHeaderName || !pHeaderValue )
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_BODY )
        return -1;
    if ( pReq->m_respHeader.m_respInfo.m_cntHeaders >= LSAPI_MAX_RESP_HEADERS )
        return -1;
    nameLen = strlen( pHeaderName );
    valLen = strlen( pHeaderValue );
    if ( nameLen == 0 )
        return -1;
    while( nameLen > 0 )
    {
        char ch = *(pHeaderName + nameLen - 1 );
        if (( ch == '\n' )||( ch == '\r' ))
            --nameLen;
        else
            break;
    }
    if ( nameLen <= 0 )
        return 0;
    while( valLen > 0 )
    {
        char ch = *(pHeaderValue + valLen - 1 );
        if (( ch == '\n' )||( ch == '\r' ))
            --valLen;
        else
            break;
    }
    len = nameLen + valLen + 1;
    if ( len > LSAPI_RESP_HTTP_HEADER_MAX )
        return -1;

    if ( pReq->m_pRespHeaderBufPos + len + 1 > pReq->m_pRespHeaderBufEnd )
    {
        int newlen = pReq->m_pRespHeaderBufPos + len + 4096 - pReq->m_pRespHeaderBuf;
        newlen -= newlen % 4096;
        if ( allocateRespHeaderBuf( pReq, newlen ) == -1 )
            return -1;
    }
    memmove( pReq->m_pRespHeaderBufPos, pHeaderName, nameLen );
    pReq->m_pRespHeaderBufPos += nameLen;
    *pReq->m_pRespHeaderBufPos++ = ':';
    memmove( pReq->m_pRespHeaderBufPos, pHeaderValue, valLen );
    pReq->m_pRespHeaderBufPos += valLen;
    *pReq->m_pRespHeaderBufPos++ = 0;
    ++len;  /* add one byte padding for \0 */
    pReq->m_respHeaderLen[pReq->m_respHeader.m_respInfo.m_cntHeaders] = len;
    ++pReq->m_respHeader.m_respInfo.m_cntHeaders;
    return 0;
}


int LSAPI_AppendRespHeader_r( LSAPI_Request * pReq, const char * pBuf, int len )
{
    if ( !pReq || !pBuf || len <= 0 || len > LSAPI_RESP_HTTP_HEADER_MAX )
        return -1;
    if ( pReq->m_reqState & LSAPI_ST_RESP_BODY )
        return -1;
    if ( pReq->m_respHeader.m_respInfo.m_cntHeaders >= LSAPI_MAX_RESP_HEADERS )
        return -1;
    while( len > 0 )
    {
        char ch = *(pBuf + len - 1 );
        if (( ch == '\n' )||( ch == '\r' ))
            --len;
        else
            break;
    }
    if ( len <= 0 )
        return 0;
    if ( pReq->m_pRespHeaderBufPos + len + 1 > pReq->m_pRespHeaderBufEnd )
    {
        int newlen = pReq->m_pRespHeaderBufPos + len + 4096 - pReq->m_pRespHeaderBuf;
        newlen -= newlen % 4096;
        if ( allocateRespHeaderBuf( pReq, newlen ) == -1 )
            return -1;
    }
    memmove( pReq->m_pRespHeaderBufPos, pBuf, len );
    pReq->m_pRespHeaderBufPos += len;
    *pReq->m_pRespHeaderBufPos++ = 0;
    ++len;  /* add one byte padding for \0 */
    pReq->m_respHeaderLen[pReq->m_respHeader.m_respInfo.m_cntHeaders] = len;
    ++pReq->m_respHeader.m_respInfo.m_cntHeaders;
    return 0;
}


int LSAPI_CreateListenSock2( const struct sockaddr * pServerAddr, int backlog )
{
    int ret;
    int fd;
    int flag = 1;
    int addr_len;

    switch( pServerAddr->sa_family )
    {
    case AF_INET:
        addr_len = 16;
        break;
    case AF_INET6:
        addr_len = sizeof( struct sockaddr_in6 );
        break;
    case AF_UNIX:
        addr_len = sizeof( struct sockaddr_un );
        unlink( ((struct sockaddr_un *)pServerAddr)->sun_path );
        break;
    default:
        return -1;
    }

    fd = socket( pServerAddr->sa_family, SOCK_STREAM, 0 );
    if ( fd == -1 )
        return -1;

    fcntl( fd, F_SETFD, FD_CLOEXEC );

    if(setsockopt( fd, SOL_SOCKET, SO_REUSEADDR,
                (char *)( &flag ), sizeof(flag)) == 0)
    {
        ret = bind( fd, pServerAddr, addr_len );
        if ( !ret )
        {
            ret = listen( fd, backlog );
            if ( !ret )
                return fd;
        }
    }

    ret = errno;
    close(fd);
    errno = ret;
    return -1;
}


int LSAPI_ParseSockAddr( const char * pBind, struct sockaddr * pAddr )
{
    char achAddr[256];
    char * p = achAddr;
    char * pEnd;
    struct addrinfo *res, hints;
    int  doAddrInfo = 0;
    int port;

    if ( !pBind )
        return -1;

    while( isspace( *pBind ) )
        ++pBind;

    strncpy(achAddr, pBind, 255);
    achAddr[255] = 0;

    switch( *p )
    {
    case '/':
        pAddr->sa_family = AF_UNIX;
        strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p,
                sizeof(((struct sockaddr_un *)pAddr)->sun_path) );
        return 0;

    case '[':
        pAddr->sa_family = AF_INET6;
        ++p;
        pEnd = strchr( p, ']' );
        if ( !pEnd )
            return -1;
        *pEnd++ = 0;

        if ( *p == '*' )
        {
            strcpy( achAddr, "::" );
            p = achAddr;
        }
        doAddrInfo = 1;
        break;

    default:
        pAddr->sa_family = AF_INET;
        pEnd = strchr( p, ':' );
        if ( !pEnd )
            return -1;
        *pEnd++ = 0;

        doAddrInfo = 0;
        if ( *p == '*' )
        {
            ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = htonl(INADDR_ANY);
        }
        else if (!strcasecmp( p, "localhost" ) )
            ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = htonl( INADDR_LOOPBACK );
        else
        {
#ifdef HAVE_INET_PTON
            if (!inet_pton(AF_INET, p, &((struct sockaddr_in *)pAddr)->sin_addr))
#else
            ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = inet_addr( p );
            if ( ((struct sockaddr_in *)pAddr)->sin_addr.s_addr == INADDR_BROADCAST)
#endif
            {
                doAddrInfo = 1;
            }
        }
        break;
    }
    if ( *pEnd == ':' )
        ++pEnd;

    port = atoi( pEnd );
    if (( port <= 0 )||( port > 65535 ))
        return -1;
    if ( doAddrInfo )
    {

        memset(&hints, 0, sizeof(hints));

        hints.ai_family   = pAddr->sa_family;
        hints.ai_socktype = SOCK_STREAM;
        hints.ai_protocol = IPPROTO_TCP;

        if ( getaddrinfo(p, NULL, &hints, &res) )
        {
            return -1;
        }

        memcpy(pAddr, res->ai_addr, res->ai_addrlen);
        freeaddrinfo(res);
    }

    if ( pAddr->sa_family == AF_INET )
        ((struct sockaddr_in *)pAddr)->sin_port = htons( port );
    else
        ((struct sockaddr_in6 *)pAddr)->sin6_port = htons( port );
    return 0;

}


int LSAPI_CreateListenSock( const char * pBind, int backlog )
{
    char serverAddr[128];
    int ret;
    int fd = -1;
    ret = LSAPI_ParseSockAddr( pBind, (struct sockaddr *)serverAddr );
    if ( !ret )
    {
        fd = LSAPI_CreateListenSock2( (struct sockaddr *)serverAddr, backlog );
    }
    return fd;
}


static fn_select_t g_fnSelect = select;
typedef struct _lsapi_prefork_server
{
    int m_fd;
    int m_iMaxChildren;
    int m_iExtraChildren;
    int m_iCurChildren;
    int m_iMaxIdleChildren;
    int m_iServerMaxIdle;
    int m_iChildrenMaxIdleTime;
    int m_iMaxReqProcessTime;
    int m_iAvoidFork;

    lsapi_child_status * m_pChildrenStatus;
    lsapi_child_status * m_pChildrenStatusCur;
    lsapi_child_status * m_pChildrenStatusEnd;

}lsapi_prefork_server;
static lsapi_prefork_server * g_prefork_server = NULL;


int LSAPI_Init_Prefork_Server( int max_children, fn_select_t fp, int avoidFork )
{
    if ( g_prefork_server )
        return 0;
    if ( max_children <= 1 )
        return -1;
    if ( max_children >= 10000)
        max_children = 10000;

    if (s_max_busy_workers == 0)
        s_max_busy_workers = max_children / 2 + 1;

    g_prefork_server = (lsapi_prefork_server *)malloc( sizeof( lsapi_prefork_server ) );
    if ( !g_prefork_server )
        return -1;
    memset( g_prefork_server, 0, sizeof( lsapi_prefork_server ) );

    if ( fp != NULL )
        g_fnSelect = fp;

    s_ppid = getppid();
    s_pid = getpid();
    setpgid( s_pid, s_pid );
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    s_total_pages = sysconf(_SC_PHYS_PAGES);
#endif
    g_prefork_server->m_iAvoidFork = avoidFork;
    g_prefork_server->m_iMaxChildren = max_children;

    g_prefork_server->m_iExtraChildren = ( avoidFork ) ? 0 : (max_children / 3) ;
    g_prefork_server->m_iMaxIdleChildren = ( avoidFork ) ? (max_children + 1) : (max_children / 3);
    if ( g_prefork_server->m_iMaxIdleChildren == 0 )
        g_prefork_server->m_iMaxIdleChildren = 1;
    g_prefork_server->m_iChildrenMaxIdleTime = 300;
    g_prefork_server->m_iMaxReqProcessTime = 3600;

    setsid();

    return 0;
}


void LSAPI_Set_Server_fd( int fd )
{
    if( g_prefork_server )
        g_prefork_server->m_fd = fd;
}


static int lsapi_accept( int fdListen )
{
    int         fd;
    int         nodelay = 1;
    socklen_t   len;
    char        achPeer[128];

    len = sizeof( achPeer );
    fd = accept( fdListen, (struct sockaddr *)&achPeer, &len );
    if ( fd != -1 )
    {
        if (((struct sockaddr *)&achPeer)->sa_family == AF_INET )
        {
            setsockopt( fd, IPPROTO_TCP, TCP_NODELAY,
                    (char *)&nodelay, sizeof(nodelay));
        }

        //OPTIMIZATION
        //if ( s_accept_notify )
        //    notify_req_received( fd );
    }
    return fd;

}


static unsigned int s_max_reqs = UINT_MAX;
static int s_max_idle_secs = 300;
static int s_stop;

static void lsapi_cleanup(int signal)
{
    s_stop = signal;
}


static lsapi_child_status * find_child_status( int pid )
{
    lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
    lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusEnd;
    while( pStatus < pEnd )
    {
        if ( pStatus->m_pid == pid )
        {
            if (pid == 0)
            {
                memset(pStatus, 0, sizeof( *pStatus ) );
                pStatus->m_pid = -1;
            }
            if ( pStatus + 1 > g_prefork_server->m_pChildrenStatusCur )
                g_prefork_server->m_pChildrenStatusCur = pStatus + 1;
            return pStatus;
        }
        ++pStatus;
    }
    return NULL;
}


void LSAPI_reset_server_state( void )
{
    /*
       Reset child status
    */
    g_prefork_server->m_iCurChildren = 0;
    lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
    lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusEnd;
    while( pStatus < pEnd )
    {
        pStatus->m_pid = 0;
        ++pStatus;
    }
    if (s_busy_workers)
        __atomic_store_n(s_busy_workers, 0, __ATOMIC_SEQ_CST);
    if (s_accepting_workers)
        __atomic_store_n(s_accepting_workers, 0, __ATOMIC_SEQ_CST);

}


static void lsapi_sigchild( int signal )
{
    int status, pid;
    char expect_connected = LSAPI_STATE_CONNECTED;
    char expect_accepting = LSAPI_STATE_ACCEPTING;
    lsapi_child_status * child_status;
    if (g_prefork_server == NULL)
        return;
    while( 1 )
    {
        pid = waitpid( -1, &status, WNOHANG|WUNTRACED );
        if ( pid <= 0 )
        {
            break;
        }
        if ( WIFSIGNALED( status ))
        {
            int sig_num = WTERMSIG( status );
#ifdef WCOREDUMP
            const char * dump = WCOREDUMP( status ) ? "yes" : "no";
#else
            const char * dump = "unknown";
#endif
            lsapi_log("Child process with pid: %d was killed by signal: "
                     "%d, core dumped: %s\n", pid, sig_num, dump );
        }
        if ( pid == s_pid_dump_debug_info )
        {
            pid = 0;
            continue;
        }
        if ( pid == s_ignore_pid )
        {
            pid = 0;
            s_ignore_pid = -1;
            continue;
        }
        child_status = find_child_status( pid );
        if ( child_status )
        {
            if (__atomic_compare_exchange_n(&child_status->m_state,
                                            &expect_connected,
                                            LSAPI_STATE_IDLE, 1,
                                            __ATOMIC_SEQ_CST,
                                            __ATOMIC_SEQ_CST))
            {
                if (s_busy_workers)
                    __atomic_fetch_sub(s_busy_workers, 1, __ATOMIC_SEQ_CST);
            }
            else if (__atomic_compare_exchange_n(&child_status->m_state,
                                                 &expect_accepting,
                                                 LSAPI_STATE_IDLE, 1,
                                                 __ATOMIC_SEQ_CST,
                                                 __ATOMIC_SEQ_CST))
            {
                if (s_accepting_workers)
                    __atomic_fetch_sub(s_accepting_workers, 1, __ATOMIC_SEQ_CST);
            }
            child_status->m_pid = 0;
            --g_prefork_server->m_iCurChildren;
        }
    }
    while(( g_prefork_server->m_pChildrenStatusCur > g_prefork_server->m_pChildrenStatus )
            &&( g_prefork_server->m_pChildrenStatusCur[-1].m_pid == 0 ))
        --g_prefork_server->m_pChildrenStatusCur;

}


static int lsapi_init_children_status(void)
{
    char * pBuf;
    int size = 4096;
    int max_children;
    if (g_prefork_server->m_pChildrenStatus)
        return 0;
    max_children = g_prefork_server->m_iMaxChildren
                        + g_prefork_server->m_iExtraChildren;

    size = max_children * sizeof( lsapi_child_status ) * 2 + 3 * sizeof(int);
    size = (size + 4095) / 4096 * 4096;
    pBuf =( char*) mmap( NULL, size, PROT_READ | PROT_WRITE,
        MAP_ANON | MAP_SHARED, -1, 0 );
    if ( pBuf == MAP_FAILED )
    {
        perror( "Anonymous mmap() failed" );
        return -1;
    }
    memset( pBuf, 0, size );
    g_prefork_server->m_pChildrenStatus = (lsapi_child_status *)pBuf;
    g_prefork_server->m_pChildrenStatusCur = (lsapi_child_status *)pBuf;
    g_prefork_server->m_pChildrenStatusEnd = (lsapi_child_status *)pBuf + max_children;
    s_busy_workers = (int *)g_prefork_server->m_pChildrenStatusEnd;
    s_accepting_workers = s_busy_workers + 1;
    s_global_counter = s_accepting_workers + 1;
    s_avail_pages = (size_t *)(s_global_counter + 1);

    setsid();
    return 0;
}


static void dump_debug_info( lsapi_child_status * pStatus, long tmCur )
{
    char achCmd[1024];
    if ( s_pid_dump_debug_info )
    {
        if ( kill( s_pid_dump_debug_info, 0 ) == 0 )
            return;
    }

    lsapi_log("Possible runaway process, UID: %d, PPID: %d, PID: %d, "
             "reqCount: %d, process time: %ld, checkpoint time: %ld, start "
             "time: %ld\n", getuid(), getppid(), pStatus->m_pid,
             pStatus->m_iReqCounter, tmCur - pStatus->m_tmReqBegin,
             tmCur - pStatus->m_tmLastCheckPoint, tmCur - pStatus->m_tmStart );

    s_pid_dump_debug_info = fork();
    if (s_pid_dump_debug_info == 0)
    {
        snprintf( achCmd, 1024, "gdb --batch -ex \"attach %d\" -ex \"set height 0\" "
                "-ex \"bt\" >&2;PATH=$PATH:/usr/sbin lsof -p %d >&2",
                pStatus->m_pid, pStatus->m_pid );
        if ( system( achCmd ) == -1 )
            perror( "system()" );
        exit( 0 );
    }
}


static void lsapi_check_child_status( long tmCur )
{
    int idle = 0;
    int tobekilled;
    int dying = 0;
    int count = 0;
    lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
    lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusCur;
    while( pStatus < pEnd )
    {
        tobekilled = 0;
        if ( pStatus->m_pid != 0 && pStatus->m_pid != -1)
        {
            ++count;
            if ( !pStatus->m_inProcess )
            {
                if (g_prefork_server->m_iCurChildren - dying
                        > g_prefork_server->m_iMaxChildren
                    || idle > g_prefork_server->m_iMaxIdleChildren)
                {
                    ++pStatus->m_iKillSent;
                    //tobekilled = SIGUSR1;
                }
                else
                {
                    if (s_max_idle_secs> 0
                        && tmCur - pStatus->m_tmWaitBegin > s_max_idle_secs + 5)
                    {
                        ++pStatus->m_iKillSent;
                        //tobekilled = SIGUSR1;
                    }
                }
                if (!pStatus->m_iKillSent)
                    ++idle;
            }
            else
            {
                if (tmCur - pStatus->m_tmReqBegin >
                        g_prefork_server->m_iMaxReqProcessTime)
                {
                    if ((pStatus->m_iKillSent % 5) == 0 && s_dump_debug_info)
                        dump_debug_info( pStatus, tmCur );
                    if ( pStatus->m_iKillSent > 5 )
                    {
                        tobekilled = SIGKILL;
                        lsapi_log("Force killing runaway process PID: %d"
                                 " with SIGKILL\n", pStatus->m_pid );
                    }
                    else
                    {
                        tobekilled = SIGTERM;
                        lsapi_log("Killing runaway process PID: %d with "
                                 "SIGTERM\n", pStatus->m_pid );
                    }
                }
            }
            if ( tobekilled )
            {
                if (( kill( pStatus->m_pid, tobekilled ) == -1 ) &&
                    ( errno == ESRCH ))
                {
                    pStatus->m_pid = 0;
                    --count;
                }
                else
                {
                    ++pStatus->m_iKillSent;
                    ++dying;
                }
            }
        }
        ++pStatus;
    }
    if ( abs( g_prefork_server->m_iCurChildren - count ) > 1 )
    {
        lsapi_log("Children tracking is wrong: Cur Children: %d,"
                  " count: %d, idle: %d, dying: %d\n",
                  g_prefork_server->m_iCurChildren, count, idle, dying );
    }
}


//static int lsapi_all_children_must_die(void)
//{
//    int maxWait;
//    int sec =0;
//    g_prefork_server->m_iMaxReqProcessTime = 10;
//    g_prefork_server->m_iMaxIdleChildren = -1;
//    maxWait = 15;
//
//    while( g_prefork_server->m_iCurChildren && (sec < maxWait) )
//    {
//        lsapi_check_child_status(time(NULL));
//        sleep( 1 );
//        sec++;
//    }
//    if ( g_prefork_server->m_iCurChildren != 0 )
//        kill( -getpgrp(), SIGKILL );
//    return 0;
//}


void set_skip_write(void)
{   s_skip_write = 1;   }


int is_enough_free_mem(void)
{
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
    //minimum 1GB or 10% available free memory
    return (*s_avail_pages > s_min_avail_pages
            || (*s_avail_pages * 10) / s_total_pages > 0);
#endif
    return 1;
}


static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer,
                                        LSAPI_Request * pReq )
{
    struct sigaction act, old_term, old_quit, old_int,
                    old_usr1, old_child;
    lsapi_child_status * child_status;
    int             wait_secs = 0;
    int             ret = 0;
    int             pid;
    time_t          lastTime = 0;
    time_t          curTime = 0;
    fd_set          readfds;
    struct timeval  timeout;

    sigset_t mask;
    sigset_t orig_mask;

    lsapi_init_children_status();

    act.sa_flags = 0;
    act.sa_handler = lsapi_sigchild;
    sigemptyset(&(act.sa_mask));
    if( sigaction( SIGCHLD, &act, &old_child ) )
    {
        perror( "Can't set signal handler for SIGCHILD" );
        return -1;
    }

    /* Set up handler to kill children upon exit */
    act.sa_flags = 0;
    act.sa_handler = lsapi_cleanup;
    sigemptyset(&(act.sa_mask));
    if( sigaction( SIGTERM, &act, &old_term ) ||
        sigaction( SIGINT,  &act, &old_int  ) ||
        sigaction( SIGUSR1, &act, &old_usr1 ) ||
        sigaction( SIGQUIT, &act, &old_quit ))
    {
        perror( "Can't set signals" );
        return -1;
    }

    while( !s_stop )
    {
        if (s_proc_group_timer_cb != NULL) {
            s_proc_group_timer_cb(&s_ignore_pid);
        }

        curTime = time( NULL );
        if (curTime != lastTime )
        {
            lastTime = curTime;
            if (lsapi_parent_dead())
                break;
            lsapi_check_child_status(curTime );
            if (pServer->m_iServerMaxIdle)
            {
                if ( pServer->m_iCurChildren <= 0 )
                {
                    ++wait_secs;
                    if ( wait_secs > pServer->m_iServerMaxIdle )
                        return -1;
                }
                else
                    wait_secs = 0;
            }
        }

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
        *s_avail_pages = sysconf(_SC_AVPHYS_PAGES);
//        lsapi_log("Memory total: %zd, free: %zd, free %%%zd\n",
//                  s_total_pages, *s_avail_pages, *s_avail_pages * 100 / s_total_pages);

#endif
        FD_ZERO( &readfds );
        FD_SET( pServer->m_fd, &readfds );
        timeout.tv_sec = 1;
        timeout.tv_usec = 0;
        ret = (*g_fnSelect)(pServer->m_fd+1, &readfds, NULL, NULL, &timeout);
        if (ret == 1 )
        {
            int accepting = 0;
            if (s_accepting_workers)
                accepting = __atomic_load_n(s_accepting_workers, __ATOMIC_SEQ_CST);

            if (pServer->m_iCurChildren > 0
                && accepting > 0)
            {
                usleep(400);
                while(accepting-- > 0)
                    sched_yield();
                continue;
            }
        }
        else if ( ret == -1 )
        {
            if ( errno == EINTR )
                continue;
            /* perror( "select()" ); */
            break;
        }
        else
        {
            continue;
        }

        if (pServer->m_iCurChildren >=
            pServer->m_iMaxChildren + pServer->m_iExtraChildren)
        {
            lsapi_log("Reached max children process limit: %d, extra: %d,"
                     " current: %d, busy: %d, please increase LSAPI_CHILDREN.\n",
                     pServer->m_iMaxChildren, pServer->m_iExtraChildren,
                     pServer->m_iCurChildren,
                     s_busy_workers ? *s_busy_workers : -1 );
            usleep( 100000 );
            continue;
        }

        pReq->m_fd = lsapi_accept( pServer->m_fd );
        if ( pReq->m_fd != -1 )
        {
            wait_secs = 0;
            child_status = find_child_status( 0 );

            sigemptyset( &mask );
            sigaddset( &mask, SIGCHLD );

            if ( sigprocmask(SIG_BLOCK, &mask, &orig_mask) < 0 )
            {
                perror( "sigprocmask(SIG_BLOCK) to block SIGCHLD" );
            }

            pid = fork();

            if ( !pid )
            {
                setsid();
                if (sigprocmask(SIG_SETMASK, &orig_mask, NULL) < 0)
                    perror( "sigprocmask( SIG_SETMASK ) to restore SIGMASK in child" );
                g_prefork_server = NULL;
                s_ppid = getppid();
                s_pid = getpid();
                s_req_processed = 0;
                s_proc_group_timer_cb = NULL;
                s_worker_status = child_status;

                if (pthread_atfork_func)
                    (*pthread_atfork_func)(NULL, NULL, set_skip_write);

                __atomic_store_n(&s_worker_status->m_state,
                                 LSAPI_STATE_CONNECTED, __ATOMIC_SEQ_CST);
                if (s_busy_workers)
                    __atomic_add_fetch(s_busy_workers, 1, __ATOMIC_SEQ_CST);
                lsapi_set_nblock( pReq->m_fd, 0 );
                //keep it open if busy_count is used.
                if (!s_keep_listener && s_busy_workers
                    && *s_busy_workers > (pServer->m_iMaxChildren >> 1))
                    s_keep_listener = 1;
                if ((s_uid == 0 || !s_keep_listener || !is_enough_free_mem())
                    && pReq->m_fdListen != -1 )
                {
                    close( pReq->m_fdListen );
                    pReq->m_fdListen = -1;
                }
                /* don't catch our signals */
                sigaction( SIGCHLD, &old_child, 0 );
                sigaction( SIGTERM, &old_term, 0 );
                sigaction( SIGQUIT, &old_quit, 0 );
                sigaction( SIGINT,  &old_int,  0 );
                sigaction( SIGUSR1, &old_usr1, 0 );
                //init_conn_key( pReq->m_fd );
                lsapi_notify_pid( pReq->m_fd );
                s_notified_pid = 1;
                //if ( s_accept_notify )
                //    return notify_req_received( pReq->m_fd );
                return 0;
            }
            else if ( pid == -1 )
            {
                lsapi_perror("fork() failed, please increase process limit", errno);
                if (child_status)
                    child_status->m_pid = 0;
            }
            else
            {
                ++pServer->m_iCurChildren;
                if ( child_status )
                {
                    child_status->m_pid = pid;
                    child_status->m_tmWaitBegin = curTime;
                    child_status->m_tmStart = curTime;
                }
            }
            close( pReq->m_fd );
            pReq->m_fd = -1;

            if (sigprocmask(SIG_SETMASK, &orig_mask, NULL) < 0)
                perror( "sigprocmask( SIG_SETMASK ) to restore SIGMASK" );

        }
        else
        {
            if (( errno == EINTR )||( errno == EAGAIN))
                continue;
            lsapi_perror("accept() failed", errno);
            return -1;
        }
    }
    sigaction( SIGUSR1, &old_usr1, 0 );
    //kill( -getpgrp(), SIGUSR1 );
    //lsapi_all_children_must_die();  /* Sorry, children ;-) */
    return -1;

}


static struct sigaction old_term, old_quit, old_int,
                    old_usr1, old_child;


int LSAPI_Postfork_Child(LSAPI_Request * pReq)
{
    int max_children = g_prefork_server->m_iMaxChildren;
    s_pid = getpid();
    __atomic_store_n(&pReq->child_status->m_pid, s_pid, __ATOMIC_SEQ_CST);
    s_worker_status = pReq->child_status;

    setsid();
    g_prefork_server = NULL;
    s_ppid = getppid();
    s_req_processed = 0;
    s_proc_group_timer_cb = NULL;

    if (pthread_atfork_func)
        (*pthread_atfork_func)(NULL, NULL, set_skip_write);

    __atomic_store_n(&s_worker_status->m_state,
                     LSAPI_STATE_CONNECTED, __ATOMIC_SEQ_CST);
    if (s_busy_workers)
        __atomic_add_fetch(s_busy_workers, 1, __ATOMIC_SEQ_CST);
    lsapi_set_nblock( pReq->m_fd, 0 );
    //keep it open if busy_count is used.
    if (!s_keep_listener && s_busy_workers
        && *s_busy_workers > (max_children >> 1))
        s_keep_listener = 1;
    if ((s_uid == 0 || !s_keep_listener || !is_enough_free_mem())
        && pReq->m_fdListen != -1 )
    {
        close(pReq->m_fdListen);
        pReq->m_fdListen = -1;
    }

    //init_conn_key( pReq->m_fd );
    lsapi_notify_pid(pReq->m_fd);
    s_notified_pid = 1;
    //if ( s_accept_notify )
    //    return notify_req_received( pReq->m_fd );
    return 0;
}


int LSAPI_Postfork_Parent(LSAPI_Request * pReq)
{
    ++g_prefork_server->m_iCurChildren;
    if (pReq->child_status)
    {
        time_t curTime = time( NULL );
        pReq->child_status->m_tmWaitBegin = curTime;
        pReq->child_status->m_tmStart = curTime;
    }
    close(pReq->m_fd);
    pReq->m_fd = -1;
    return 0;
}


int LSAPI_Accept_Before_Fork(LSAPI_Request * pReq)
{
    time_t          lastTime = 0;
    time_t          curTime = 0;
    fd_set          readfds;
    struct timeval  timeout;
    int             wait_secs = 0;
    int             ret = 0;

    lsapi_prefork_server * pServer = g_prefork_server;

    struct sigaction act;

    lsapi_init_children_status();

    act.sa_flags = 0;
    act.sa_handler = lsapi_sigchild;
    sigemptyset(&(act.sa_mask));
    if (sigaction(SIGCHLD, &act, &old_child))
    {
        perror( "Can't set signal handler for SIGCHILD" );
        return -1;
    }

    /* Set up handler to kill children upon exit */
    act.sa_flags = 0;
    act.sa_handler = lsapi_cleanup;
    sigemptyset(&(act.sa_mask));
    if (sigaction(SIGTERM, &act, &old_term) ||
        sigaction(SIGINT,  &act, &old_int ) ||
        sigaction(SIGUSR1, &act, &old_usr1) ||
        sigaction(SIGQUIT, &act, &old_quit))
    {
        perror( "Can't set signals" );
        return -1;
    }
    s_stop = 0;
    pReq->m_reqState = 0;

    while(!s_stop)
    {
        if (s_proc_group_timer_cb != NULL) {
            s_proc_group_timer_cb(&s_ignore_pid);
        }

        curTime = time(NULL);
        if (curTime != lastTime)
        {
            lastTime = curTime;
            if (lsapi_parent_dead())
                break;
            lsapi_check_child_status(curTime);
            if (pServer->m_iServerMaxIdle)
            {
                if (pServer->m_iCurChildren <= 0)
                {
                    ++wait_secs;
                    if ( wait_secs > pServer->m_iServerMaxIdle )
                        return -1;
                }
                else
                    wait_secs = 0;
            }
        }

#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
        *s_avail_pages = sysconf(_SC_AVPHYS_PAGES);
//        lsapi_log("Memory total: %zd, free: %zd, free %%%zd\n",
//                  s_total_pages, *s_avail_pages, *s_avail_pages * 100 / s_total_pages);

#endif
        FD_ZERO(&readfds);
        FD_SET(pServer->m_fd, &readfds);
        timeout.tv_sec = 1;
        timeout.tv_usec = 0;
        ret = (*g_fnSelect)(pServer->m_fd+1, &readfds, NULL, NULL, &timeout);
        if (ret == 1 )
        {
            int accepting = 0;
            if (s_accepting_workers)
                accepting = __atomic_load_n(s_accepting_workers, __ATOMIC_SEQ_CST);

            if (pServer->m_iCurChildren > 0
                && accepting > 0)
            {
                usleep( 400);
                while(accepting-- > 0)
                    sched_yield();
                continue;
            }
        }
        else if (ret == -1)
        {
            if (errno == EINTR)
                continue;
            /* perror( "select()" ); */
            break;
        }
        else
        {
            continue;
        }

        if (pServer->m_iCurChildren >=
            pServer->m_iMaxChildren + pServer->m_iExtraChildren)
        {
            lsapi_log("Reached max children process limit: %d, extra: %d,"
                     " current: %d, busy: %d, please increase LSAPI_CHILDREN.\n",
                     pServer->m_iMaxChildren, pServer->m_iExtraChildren,
                     pServer->m_iCurChildren,
                     s_busy_workers ? *s_busy_workers : -1);
            usleep(100000);
            continue;
        }

        pReq->m_fd = lsapi_accept(pServer->m_fd);
        if (pReq->m_fd != -1)
        {
            wait_secs = 0;
            pReq->child_status = find_child_status(0);

            ret = 0;
            break;
        }
        else
        {
            if ((errno == EINTR) || (errno == EAGAIN))
                continue;
            lsapi_perror("accept() failed", errno);
            ret = -1;
            break;
        }
    }

    sigaction(SIGCHLD, &old_child, 0);
    sigaction(SIGTERM, &old_term, 0);
    sigaction(SIGQUIT, &old_quit, 0);
    sigaction(SIGINT,  &old_int,  0);
    sigaction(SIGUSR1, &old_usr1, 0);

    return ret;
}


int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq )
{
    int             fd;
    int             ret;
    int             wait_secs;
    fd_set          readfds;
    struct timeval  timeout;

    if (s_skip_write)
        return -1;

    LSAPI_Finish_r( pReq );

    if ( g_prefork_server )
    {
        if ( g_prefork_server->m_fd != -1 )
            if ( lsapi_prefork_server_accept( g_prefork_server, pReq ) == -1 )
                return -1;
    }
    else if (s_req_processed > 0 && s_max_busy_workers > 0 && s_busy_workers)
    {
        ret = __atomic_load_n(s_busy_workers, __ATOMIC_SEQ_CST);
        if (ret >= s_max_busy_workers)
        {
            send_conn_close_notification(pReq->m_fd);
            lsapi_close_connection(pReq);
        }
    }

    if ( (unsigned int)s_req_processed > s_max_reqs )
        return -1;

    if ( s_worker_status )
    {
        s_worker_status->m_tmWaitBegin = time( NULL );
    }


    while( g_running )
    {
        if ( pReq->m_fd != -1 )
        {
            fd = pReq->m_fd;
        }
        else if ( pReq->m_fdListen != -1 )
            fd = pReq->m_fdListen;
        else
        {
            break;
        }
        wait_secs = 0;
        while( 1 )
        {
            if ( !g_running )
                return -1;
            if (s_req_processed && s_worker_status
                && s_worker_status->m_iKillSent)
                return -1;
            FD_ZERO( &readfds );
            FD_SET( fd, &readfds );
            timeout.tv_sec = 1;
            timeout.tv_usec = 0;
            if (fd == pReq->m_fdListen)
            {
                if (s_worker_status)
                    __atomic_store_n(&s_worker_status->m_state,
                                     LSAPI_STATE_ACCEPTING, __ATOMIC_SEQ_CST);
                if (s_accepting_workers)
                    __atomic_fetch_add(s_accepting_workers, 1, __ATOMIC_SEQ_CST);
            }
            ret = (*g_fnSelect)(fd+1, &readfds, NULL, NULL, &timeout);
            if (fd == pReq->m_fdListen)
            {
                if (s_accepting_workers)
                    __atomic_fetch_sub(s_accepting_workers, 1, __ATOMIC_SEQ_CST);
                if (s_worker_status)
                    __atomic_store_n(&s_worker_status->m_state,
                                     LSAPI_STATE_IDLE, __ATOMIC_SEQ_CST);
            }

            if ( ret == 0 )
            {
                if ( s_worker_status )
                {
                    s_worker_status->m_inProcess = 0;
                    if (fd == pReq->m_fdListen)
                    {
                        if (s_keep_listener == 0 || !is_enough_free_mem())
                            return -1;
                        if (s_keep_listener == 1)
                        {
                            int wait_time = 10;
                            if (s_busy_workers)
                                wait_time += *s_busy_workers * 10;
                            if (s_accepting_workers)
                                wait_time >>= (*s_accepting_workers);
                            if (wait_secs >= wait_time)
                                return -1;
                        }
                    }
                }
                ++wait_secs;
                if (( s_max_idle_secs > 0 )&&(wait_secs >= s_max_idle_secs ))
                    return -1;
                if ( lsapi_parent_dead() )
                    return -1;
            }
            else if ( ret == -1 )
            {
                if ( errno == EINTR )
                    continue;
                else
                    return -1;
            }
            else if ( ret >= 1 )
            {
                if (s_req_processed && s_worker_status
                    && s_worker_status->m_iKillSent)
                    return -1;
                if ( fd == pReq->m_fdListen )
                {
                    pReq->m_fd = lsapi_accept( pReq->m_fdListen );
                    if ( pReq->m_fd != -1 )
                    {
                        if (s_worker_status)
                            __atomic_store_n(&s_worker_status->m_state,
                                             LSAPI_STATE_CONNECTED,
                                             __ATOMIC_SEQ_CST);
                        if (s_busy_workers)
                            __atomic_fetch_add(s_busy_workers, 1, __ATOMIC_SEQ_CST);

                        fd = pReq->m_fd;

                        lsapi_set_nblock( fd, 0 );
                        //init_conn_key( pReq->m_fd );
                        if (!s_keep_listener)
                        {
                            close( pReq->m_fdListen );
                            pReq->m_fdListen = -1;
                        }
                        if ( s_accept_notify )
                            if ( notify_req_received( pReq->m_fd ) == -1 )
                                return -1;
                    }
                    else
                    {
                        if (( errno == EINTR )||( errno == EAGAIN))
                            continue;
                        lsapi_perror( "lsapi_accept() error", errno );
                        return -1;
                    }
                }
                else
                    break;
            }
        }

        if ( !readReq( pReq ) )
        {
            if ( s_worker_status )
            {
                s_worker_status->m_iKillSent = 0;
                s_worker_status->m_inProcess = 1;
                ++s_worker_status->m_iReqCounter;
                s_worker_status->m_tmReqBegin =
                s_worker_status->m_tmLastCheckPoint = time(NULL);
            }
            ++s_req_processed;
            return 0;
        }
        lsapi_close_connection(pReq);
        LSAPI_Reset_r( pReq );
    }
    return -1;

}


void LSAPI_Set_Max_Reqs( int reqs )
{   s_max_reqs = reqs - 1;      }

void LSAPI_Set_Max_Idle( int secs )
{   s_max_idle_secs = secs;     }


void LSAPI_Set_Max_Children( int maxChildren )
{
    if ( g_prefork_server )
        g_prefork_server->m_iMaxChildren = maxChildren;
}


void LSAPI_Set_Extra_Children( int extraChildren )
{
    if (( g_prefork_server )&&( extraChildren >= 0 ))
        g_prefork_server->m_iExtraChildren = extraChildren;
}


void LSAPI_Set_Max_Process_Time( int secs )
{
    if (( g_prefork_server )&&( secs > 0 ))
        g_prefork_server->m_iMaxReqProcessTime = secs;
}


void LSAPI_Set_Max_Idle_Children( int maxIdleChld )
{
    if (( g_prefork_server )&&( maxIdleChld > 0 ))
        g_prefork_server->m_iMaxIdleChildren = maxIdleChld;
}


void LSAPI_Set_Server_Max_Idle_Secs( int serverMaxIdle )
{
    if ( g_prefork_server )
        g_prefork_server->m_iServerMaxIdle = serverMaxIdle;
}


void LSAPI_Set_Slow_Req_Msecs( int msecs )
{
    s_slow_req_msecs = msecs;
}


int  LSAPI_Get_Slow_Req_Msecs(void)
{
    return s_slow_req_msecs;
}


void LSAPI_No_Check_ppid(void)
{
    s_ppid = 0;
}


int LSAPI_Get_ppid(void)
{
    return(s_ppid);
}


#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
#include <crt_externs.h>
#else
extern char ** environ;
#endif
static void unset_lsapi_envs(void)
{
    char **env;
#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
    env = *_NSGetEnviron();
#else
    env = environ;
#endif
    while( env != NULL && *env != NULL )
    {
        if (!strncmp(*env, "LSAPI_", 6) || !strncmp( *env, "PHP_LSAPI_", 10 )
            || (!strncmp( *env, "PHPRC=", 6 )&&(!s_uid)))
        {
            char ** del = env;
            do
                *del = del[1];
            while( *del++ );
        }
        else
            ++env;
    }
}


static int lsapi_initSuEXEC(void)
{
    int i;
    struct passwd * pw;
    s_defaultUid = 0;
    s_defaultGid = 0;
    if ( s_uid == 0 )
    {
        const char * p = getenv( "LSAPI_DEFAULT_UID" );
        if ( p )
        {
            i = atoi( p );
            if ( i > 0 )
                s_defaultUid = i;
        }
        p = getenv( "LSAPI_DEFAULT_GID" );
        if ( p )
        {
            i = atoi( p );
            if ( i > 0 )
                s_defaultGid = i;
        }
        p = getenv( "LSAPI_SECRET" );
        if (( !p )||( readSecret(p) == -1 ))
                return -1;
        if ( g_prefork_server )
        {
            if ( g_prefork_server->m_iMaxChildren < 100 )
                g_prefork_server->m_iMaxChildren = 100;
            if ( g_prefork_server->m_iExtraChildren < 1000 )
                g_prefork_server->m_iExtraChildren = 1000;
        }
    }
    if ( !s_defaultUid || !s_defaultGid )
    {
        pw = getpwnam( "nobody" );
        if ( pw )
        {
            if ( !s_defaultUid )
                s_defaultUid = pw->pw_uid;
            if ( !s_defaultGid )
                s_defaultGid = pw->pw_gid;
        }
        else
        {
            if ( !s_defaultUid )
                s_defaultUid = 10000;
            if ( !s_defaultGid )
                s_defaultGid = 10000;
        }
    }
    return 0;
}


static int lsapi_check_path(const char *p, char *final, int max_len)
{
    char resolved_path[PATH_MAX+1];
    int len = 0;
    char *end;
    if (*p != '/')
    {
        if (getcwd(final, max_len) == NULL)
            return -1;
        len = strlen(final);
        *(final + len) = '/';
        ++len;
    }
    end = memccpy(&final[len], p, '\0', PATH_MAX - len);
    if (!end)
    {
        errno = EINVAL;
        return -1;
    }
    p = final;
    if (realpath(p, resolved_path) == NULL
        && errno != ENOENT && errno != EACCES)
        return -1;
    if (strncmp(resolved_path, "/etc/", 5) == 0)
    {
        errno = EPERM;
        return -1;
    }
    return 0;
}


static int lsapi_reopen_stderr2(const char *full_path)
{
    int newfd = open(full_path, O_WRONLY | O_CREAT | O_APPEND, 0644);
    if (newfd == -1)
    {
        LSAPI_perror_r(NULL, "Failed to open custom stderr log", full_path);
        return -1;
    }
    if (newfd != 2)
    {
        dup2(newfd, 2);
        close(newfd);
        dup2(2, 1);
    }
    if (s_stderr_log_path && full_path != s_stderr_log_path)
    {
        free(s_stderr_log_path);
        s_stderr_log_path = NULL;
    }
    s_stderr_log_path = strdup(full_path);
    return 0;
}


static int lsapi_reopen_stderr(const char *p)
{
    char full_path[PATH_MAX];
    if (s_uid == 0)
        return -1;
    if (lsapi_check_path(p, full_path, PATH_MAX) == -1)
    {
        LSAPI_perror_r(NULL, "Invalid custom stderr log path", p);
        return -1;
    }
    return lsapi_reopen_stderr2(full_path);
}


int LSAPI_Init_Env_Parameters( fn_select_t fp )
{
    const char *p;
    char ch;
    int n;
    int avoidFork = 0;

    p = getenv("LSAPI_STDERR_LOG");
    if (p)
    {
        lsapi_reopen_stderr(p);
    }
    if (!s_stderr_log_path)
        s_stderr_is_pipe = isPipe(STDERR_FILENO);

    p = getenv( "PHP_LSAPI_MAX_REQUESTS" );
    if ( !p )
        p = getenv( "LSAPI_MAX_REQS" );
    if ( p )
    {
        n = atoi( p );
        if ( n > 0 )
            LSAPI_Set_Max_Reqs( n );
    }

    p = getenv( "LSAPI_KEEP_LISTEN" );
    if ( p )
    {
        n = atoi( p );
        s_keep_listener = n;
    }

    p = getenv( "LSAPI_AVOID_FORK" );
    if ( p )
    {
        avoidFork = atoi( p );
        if (avoidFork)
        {
            s_keep_listener = 2;
            ch = *(p + strlen(p) - 1);
            if (  ch == 'G' || ch == 'g' )
                avoidFork *= 1024 * 1024 * 1024;
            else if (  ch == 'M' || ch == 'm' )
                avoidFork *= 1024 * 1024;
            if (avoidFork >= 1024 * 10240)
                s_min_avail_pages = avoidFork / 4096;
        }
    }

    p = getenv( "LSAPI_ACCEPT_NOTIFY" );
    if ( p )
    {
        s_accept_notify = atoi( p );
    }

    p = getenv( "LSAPI_SLOW_REQ_MSECS"gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapilib.h000064400000027775150403134160014726 0ustar00          LSAPI_Init_Prefork_Server( n, fp, avoidFork != 0 );
            LSAPI_Set_Server_fd( g_req.m_fdListen );
        }

        p = getenv( "LSAPI_EXTRA_CHILDREN" );
        if ( p )
            LSAPI_Set_Extra_Children( atoi( p ) );

        p = getenv( "LSAPI_MAX_IDLE_CHILDREN" );
        if ( p )
            LSAPI_Set_Max_Idle_Children( atoi( p ) );

        p = getenv( "LSAPI_PGRP_MAX_IDLE" );
        if ( p )
        {
            LSAPI_Set_Server_Max_Idle_Secs( atoi( p ) );
        }

        p = getenv( "LSAPI_MAX_PROCESS_TIME" );
        if ( p )
            LSAPI_Set_Max_Process_Time( atoi( p ) );

        if ( getenv( "LSAPI_PPID_NO_CHECK" ) )
        {
            LSAPI_No_Check_ppid();
        }

        p = getenv("LSAPI_MAX_BUSY_WORKER");
        if (p)
        {
            n = atoi(p);
            s_max_busy_workers = n;
            if (n >= 0)
                LSAPI_No_Check_ppid();
        }


        p = getenv( "LSAPI_DUMP_DEBUG_INFO" );
        if ( p )
            s_dump_debug_info = atoi( p );

        if ( lsapi_initSuEXEC() == -1 )
            return -1;
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
        lsapi_initLVE();
#endif
    }
    unset_lsapi_envs();
    return 0;
}


int LSAPI_ErrResponse_r( LSAPI_Request * pReq, int code, const char ** pRespHeaders,
                         const char * pBody, int bodyLen )
{
    LSAPI_SetRespStatus_r( pReq, code );
    if ( pRespHeaders )
    {
        while( *pRespHeaders )
        {
            LSAPI_AppendRespHeader_r( pReq, *pRespHeaders, strlen( *pRespHeaders ) );
            ++pRespHeaders;
        }
    }
    if ( pBody &&( bodyLen > 0 ))
    {
        LSAPI_Write_r( pReq, pBody, bodyLen );
    }
    LSAPI_Finish_r( pReq );
    return 0;
}


static void lsapi_MD5Transform(uint32 buf[4], uint32 const in[16]);

/*
 * Note: this code is harmless on little-endian machines.
 */
static void byteReverse(unsigned char *buf, unsigned longs)
{
    uint32 t;
    do {
        t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
            ((unsigned) buf[1] << 8 | buf[0]);
        *(uint32 *) buf = t;
        buf += 4;
    } while (--longs);
}


/*
 * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
 * initialization constants.
 */
void lsapi_MD5Init(struct lsapi_MD5Context *ctx)
{
    ctx->buf[0] = 0x67452301;
    ctx->buf[1] = 0xefcdab89;
    ctx->buf[2] = 0x98badcfe;
    ctx->buf[3] = 0x10325476;

    ctx->bits[0] = 0;
    ctx->bits[1] = 0;
}

/*
 * Update context to reflect the concatenation of another buffer full
 * of bytes.
 */
void lsapi_MD5Update(struct lsapi_MD5Context *ctx, unsigned char const *buf, unsigned len)
{
    register uint32 t;

    /* Update bitcount */

    t = ctx->bits[0];
    if ((ctx->bits[0] = t + ((uint32) len << 3)) < t)
        ctx->bits[1]++;                /* Carry from low to high */
    ctx->bits[1] += len >> 29;

    t = (t >> 3) & 0x3f;        /* Bytes already in shsInfo->data */

    /* Handle any leading odd-sized chunks */

    if (t) {
        unsigned char *p = (unsigned char *) ctx->in + t;

        t = 64 - t;
        if (len < t) {
            memmove(p, buf, len);
            return;
        }
        memmove(p, buf, t);
        byteReverse(ctx->in, 16);
        lsapi_MD5Transform(ctx->buf, (uint32 *) ctx->in);
        buf += t;
        len -= t;
    }
    /* Process data in 64-byte chunks */

    while (len >= 64) {
        memmove(ctx->in, buf, 64);
        byteReverse(ctx->in, 16);
        lsapi_MD5Transform(ctx->buf, (uint32 *) ctx->in);
        buf += 64;
        len -= 64;
    }

    /* Handle any remaining bytes of data. */

    memmove(ctx->in, buf, len);
}


/*
 * Final wrap-up - pad to 64-byte boundary with the bit pattern
 * 1 0* (64-bit count of bits processed, MSB-first)
 */
void lsapi_MD5Final(unsigned char digest[16], struct lsapi_MD5Context *ctx)
{
    unsigned int count;
    unsigned char *p;

    /* Compute number of bytes mod 64 */
    count = (ctx->bits[0] >> 3) & 0x3F;

    /* Set the first char of padding to 0x80.  This is safe since there is
       always at least one byte free */
    p = ctx->in + count;
    *p++ = 0x80;

    /* Bytes of padding needed to make 64 bytes */
    count = 64 - 1 - count;

    /* Pad out to 56 mod 64 */
    if (count < 8) {
        /* Two lots of padding:  Pad the first block to 64 bytes */
        memset(p, 0, count);
        byteReverse(ctx->in, 16);
        lsapi_MD5Transform(ctx->buf, (uint32 *) ctx->in);

        /* Now fill the next block with 56 bytes */
        memset(ctx->in, 0, 56);
    } else {
        /* Pad block to 56 bytes */
        memset(p, 0, count - 8);
    }
    byteReverse(ctx->in, 14);

    /* Append length in bits and transform */
    ((uint32 *) ctx->in)[14] = ctx->bits[0];
    ((uint32 *) ctx->in)[15] = ctx->bits[1];

    lsapi_MD5Transform(ctx->buf, (uint32 *) ctx->in);
    byteReverse((unsigned char *) ctx->buf, 4);
    memmove(digest, ctx->buf, 16);
    memset(ctx, 0, sizeof(*ctx));        /* In case it's sensitive */
}


/* The four core functions - F1 is optimized somewhat */

/* #define F1(x, y, z) (x & y | ~x & z) */
#define F1(x, y, z) (z ^ (x & (y ^ z)))
#define F2(x, y, z) F1(z, x, y)
#define F3(x, y, z) (x ^ y ^ z)
#define F4(x, y, z) (y ^ (x | ~z))

/* This is the central step in the MD5 algorithm. */
#define MD5STEP(f, w, x, y, z, data, s) \
        ( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )

/*
 * The core of the MD5 algorithm, this alters an existing MD5 hash to
 * reflect the addition of 16 longwords of new data.  MD5Update blocks
 * the data and converts bytes into longwords for this routine.
 */
static void lsapi_MD5Transform(uint32 buf[4], uint32 const in[16])
{
    register uint32 a, b, c, d;

    a = buf[0];
    b = buf[1];
    c = buf[2];
    d = buf[3];

    MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
    MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
    MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
    MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
    MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
    MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
    MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
    MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
    MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
    MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
    MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
    MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
    MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
    MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
    MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
    MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);

    MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
    MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
    MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
    MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
    MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
    MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
    MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
    MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
    MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
    MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
    MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
    MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
    MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
    MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
    MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
    MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);

    MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
    MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
    MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
    MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
    MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
    MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
    MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
    MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
    MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
    MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
    MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
    MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
    MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
    MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
    MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
    MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);

    MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
    MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
    MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
    MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
    MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
    MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
    MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
    MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
    MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
    MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
    MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
    MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
    MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
    MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
    MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
    MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);

    buf[0] += a;
    buf[1] += b;
    buf[2] += c;
    buf[3] += d;
}


int LSAPI_Set_Restored_Parent_Pid(int pid)
{
    int old_ppid = s_ppid;
    s_restored_ppid = pid;
    return old_ppid;
}


int LSAPI_Inc_Req_Processed(int cnt)
{
    return __atomic_add_fetch(s_global_counter, cnt, __ATOMIC_SEQ_CST);
}


gems/gems/ruby-lsapi-5.6/ext/lsapi/lsapilib.h000064400000027775150403134160014726 0ustar00/*
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * 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.
    * Neither the name of the Lite Speed Technologies Inc nor the
      names of its contributors may be used to endorse or promote
      products derived from this software without specific prior
      written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
OWNER 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.
*/


#ifndef  _LSAPILIB_H_
#define  _LSAPILIB_H_

#if defined (c_plusplus) || defined (__cplusplus)
extern "C" {
#endif

#include "lsapidef.h"

#include <stddef.h>
#include <sys/time.h>
#include <sys/types.h>

struct LSAPI_key_value_pair
{
    char * pKey;
    char * pValue;
    int    keyLen;
    int    valLen;
};

struct lsapi_child_status;
#define LSAPI_MAX_RESP_HEADERS  1000

typedef struct lsapi_request
{
    int               m_fdListen;
    int               m_fd;

  gems/gems/ruby-lsapi-5.6/rails/dispatch.lsapi000075500000000770150403134160014776 0ustar00pIovecCur;
    struct iovec    * m_pIovecToWrite;

    struct lsapi_packet_header      * m_respPktHeaderEnd;

    struct lsapi_req_header         * m_pHeader;
    struct LSAPI_key_value_pair     * m_pEnvList;
    struct LSAPI_key_value_pair     * m_pSpecialEnvList;
    int                               m_envListSize;
    int                               m_specialEnvListSize;

    struct lsapi_http_header_index  * m_pHeaderIndex;
    struct lsapi_header_offset      * m_pUnknownHeader;

    char     gems/gems/ruby-lsapi-5.6/examples/lsapi_with_cgi.rb000075500000000357150403134160016164 0ustar00                  m_respHeaderLen[LSAPI_MAX_RESP_HEADERS];
    void            * m_pAppData;

}LSAPI_Request;

extern LSAPI_Request g_req;


/* return: >0 continue, ==0 stop, -1 failed  */
typedef int (*LSAPI_CB_EnvHandler )( const char * gems/gems/ruby-lsapi-5.6/examples/testlsapi.rb000075500000000413150403134160015200 0ustar00 LSAPI_ForeachSpecialEnv_r( LSAPI_Request * pReq,
            LSAPI_CB_EnvHandler fn, void * arg );

char * LSAPI_GetEnv_r( LSAPI_Request * pReq, const char * name );

ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t len );

int LSAPI_ReqBodyGetgems/gems/ruby-lsapi-5.6/lsapi.gemspec000064400000001611150403134160013500 0ustar00, const char ** pRespHeaders,
                         const char * pBody, int bodyLen );

static inline int LSAPI_SetRespStatus_r( LSAPI_Request * pReq, int code )
{
    if ( !pReq )
        return -1;
    pReq->m_respHeader.m_respInfo.m_status = code;
    return 0;
}

static inline int LSAPI_SetAppData_r( LSAPI_Request * pReq, void * data )
{
    if ( !pReq )
        return -1;
    pReq->m_pAppData = data;
    return 0;
}

static inline void * LSAPI_GetAppData_r( LSAPI_Request * pReq )
{
    if ( !pReq )
        return NULL;
    return pReq->m_pAppData;
}

static inline char * LSAPI_GetQueryString_r( LSAPI_Request * pReq )
{
    if ( pReq )
        return pReq->m_pQueryString;
    return NULL;
}


static inline char * LSAPI_GetScriptFileName_r( LSAPI_Request * pReq )
{
    if ( pReq )
        return pReq->m_pScriptFile;
    return NULL;
}


static inline char * LSAPI_GetScriptName_r( LSAPI_gems/gems/ruby-lsapi-5.6/README000064400000012661150403134160011712 0ustar00e int LSAPI_Accept( void )
{   return LSAPI_Accept_r( &g_req );                        }

static inline int LSAPI_Finish(void)
{   return LSAPI_Finish_r( &g_req );                        }

static inline char * LSAPI_GetHeader( int headerIndex )
{   return LSAPI_GetHeader_r( &g_req, headerIndex );        }

static inline int LSAPI_ForeachHeader( LSAPI_CB_EnvHandler fn, void * arg )
{   return LSAPI_ForeachHeader_r( &g_req, fn, arg );        }

static inline int LSAPI_ForeachOrgHeader(
            LSAPI_CB_EnvHandler fn, void * arg )
{   return LSAPI_ForeachOrgHeader_r( &g_req, fn, arg );     }

static inline int LSAPI_ForeachEnv( LSAPI_CB_EnvHandler fn, void * arg )
{   return LSAPI_ForeachEnv_r( &g_req, fn, arg );           }

static inline int LSAPI_ForeachSpecialEnv( LSAPI_CB_EnvHandler fn, void * arg )
{   return LSAPI_ForeachSpecialEnv_r( &g_req, fn, arg );    }

static inline char * LSAPI_GetEnv( const char * name )
{   return LSAPI_GetEnv_r( &g_req, name );                  }

static inline char * LSAPI_GetQueryString(void)
{   return LSAPI_GetQueryString_r( &g_req );                }

static inline char * LSAPI_GetScriptFileName(void)
{   return LSAPI_GetScriptFileName_r( &g_req );             }

static inline char * LSAPI_GetScriptName(void)
{    return LSAPI_GetScriptName_r( &g_req );                }

static inline char * LSAPI_GetRequestMethod(void)
{   return LSAPI_GetRequestMethod_r( &g_req );              }

static inline off_t LSAPI_GetReqBodyLen(void)
{   return LSAPI_GetReqBodyLen_r( &g_req );                 }

static inline off_t LSAPI_GetReqBodyRemain(void)
{   return LSAPI_GetReqBodyRemain_r( &g_req );                 }

static inline ssize_t LSAPI_ReadReqBody( char * pBuf, size_t len )
{   return LSAPI_ReadReqBody_r( &g_req, pBuf, len );        }

static inline int LSAPI_ReqBodyGetChar(void)
{   return LSAPI_ReqBodyGetChar_r( &g_req );        }

static inline int LSAPI_ReqBodyGetLine( char * pBuf, int len, int *getLF )
{   return LSAPI_ReqBodyGetLine_r( &g_req, pBuf, len, getLF );        }



static inline int LSAPI_FinalizeRespHeaders(void)
{   return LSAPI_FinalizeRespHeaders_r( &g_req );           }

static inline ssize_t LSAPI_Write( const char * pBuf, ssize_t len )
{   return LSAPI_Write_r( &g_req, pBuf, len );              }

static inline ssize_t LSAPI_sendfile( int fdIn, off_t* off, size_t size )
{
    return LSAPI_sendfile_r(&g_req, fdIn, off, size );
}

static inline ssize_t LSAPI_Write_Stderr( const char * pBuf, ssize_t len )
{   return LSAPI_Write_Stderr_r( &g_req, pBuf, len );       }

static inline int LSAPI_Flush(void)
{   return LSAPI_Flush_r( &g_req );                         }

static inline int LSAPI_AppendRespHeader( char * pBuf, int len )
{   return LSAPI_AppendRespHeader_r( &g_req, pBuf, len );   }

static inline int LSAPI_SetRespStatus( int code )
{   return LSAPI_SetRespStatus_r( &g_req, code );           }

static inline int LSAPI_ErrResponse( int code, const char ** pRespHeaders, const char * pBody, int bodyLen )
{   return LSAPI_ErrResponse_r( &g_req, code, pRespHeaders, pBody, bodyLen );   }

static inline int LSAPI_End_Response(void)
{   return LSAPI_End_Response_r( &g_req );                         }

int LSAPI_IsRunning(void);

int LSAPI_CreateListenSock( const char * pBind, int backlog );

typedef int (*fn_select_t)( int, fd_set *, fd_set *, fd_set *, struct timeval * );

int LSAPI_Init_Prefork_Server( int max_children, fn_select_t fp, int avoidFork );

void LSAPI_Set_Server_fd( int fd );

int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq );

void LSAPI_No_Check_ppid(void);

void LSAPI_Set_Max_Reqs( int reqs );

void LSAPI_Set_Max_Idle( int secs );

void LSAPI_Set_Max_Children( int maxChildren );

void LSAPI_Set_Max_Idle_Children( int maxIdleChld );

void LSAPI_Set_Server_Max_Idle_Secs( int serverMaxIdle );

void LSAPI_Set_Max_Process_Time( int secs );

int LSAPI_Init_Env_Parameters( fn_select_t fp );

void LSAPI_Set_Slow_Req_Msecs( int msecs );

int  LSAPI_Get_Slow_Req_Msecs(void);

int LSAPI_is_suEXEC_Daemon(void);

int LSAPI_Set_Restored_Parent_Pid(int pid);

typedef void (*LSAPI_On_Timer_pf)(int *forked_child_pid);
void LSAPI_Register_Pgrp_Timer_Callback(LSAPI_On_Timer_pf);

int LSAPI_Inc_Req_Processed(int cnt);

int LSAPI_Accept_Before_Fork(LSAPI_Request * pReq);

int LSAPI_Postfork_Child(LSAPI_Request * pReq);

int LSAPI_Postfork_Parent(LSAPI_Request * pReq);

#define LSAPI_LOG_LEVEL_BITS    0xff
#define LSAPI_LOG_FLAG_NONE     0
#define LSAPI_LOG_FLAG_DEBUG    1
#define LSAPI_LOG_FLAG_INFO     2
#define LSAPI_LOG_FLAG_NOTICE   3
#define LSAPI_LOG_FLAG_WARN     4
#define LSAPI_LOG_FLAG_ERROR    5
#define LSAPI_LOG_FLAG_CRIT     6
#define LSAPI_LOG_FLAG_FATAL    7

#define LSAPI_LOG_TIMESTAMP_BITS (0xff00)
#define LSAPI_LOG_TIMESTAMP_FULL (0x100)
#define LSAPI_LOG_TIMESTAMP_HMS  (0x200)
#define LSAPI_LOG_TIMESTAMP_STDERR  (0x400)

#define LSAPI_LOG_PID            (0x10000)

void LSAPI_Log(int flag, const char * fmt, ...)
#if __GNUC__
        __attribute__((format(printf, 2, 3)))
#endif
;


#if defined (c_plusplus) || defined (__cplusplus)
}
#endif


#endif







gems/gems/ruby-lsapi-5.6/rails/dispatch.lsapi000075500000000770150403134160014776 0ustar00gems/gems/erb-4.0.2/libexec/erb000075500000010754150403134160011756 0ustar00gems/gems/ruby-lsapi-5.6/examples/lsapi_with_cgi.rb000075500000000357150403134160016164 0ustar00#!/opt/alt/ruby34/bin/ruby

require 'lsapi'
require 'cgi'


while LSAPI.accept != nil
    cgi = CGI.new
    name = cgi['name']
    puts cgi.header
    puts "Hello #{name}! <br> " if name
    puts "You are from #{cgi.remote_addr}<br>"

end
gems/gems/ruby-lsapi-5.6/examples/testlsapi.rb000075500000000413150403134160015200 0ustar00#!/opt/alt/ruby34/bin/ruby

require 'lsapi'

$count = 0;

while LSAPI.accept != nil
	print "HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\nHello World! \##{$count}<br>\r\n"
	ENV.each_pair {|key, value| print "#{key} is #{value}<br>\r\n" }
	$count = $count + 1
end
gems/gems/ruby-lsapi-5.6/lsapi.gemspec000064400000001611150403134160013500 0ustar00Gem::Specification.new do |s|
  s.name = %q{ruby-lsapi}
  s.version = "5.6"
  s.date = %q{2024-01-22}
  s.description = "This is a ruby extension for fast communication with LiteSpeed Web Server."
  s.summary = %q{A ruby extension for fast communication with LiteSpeed Web Server.}
  s.has_rdoc = false
  s.authors = ["LiteSpeed Technologies Inc."]
  s.email = "info@litespeedtech.com"
  s.homepage = "http://www.litespeedtech.com/"
  s.rubyforge_project = "ruby-lsapi"
  s.files = ["lsapi.gemspec", "README", "examples", "examples/testlsapi.rb", "examples/lsapi_with_cgi.rb", "ext", "ext/lsapi", "ext/lsapi/extconf.rb", "ext/lsapi/lsapidef.h", "ext/lsapi/lsapilib.c", "ext/lsapi/lsapilib.h", "ext/lsapi/lsruby.c", "rails", "rails/dispatch.lsapi", "scripts", "scripts/lsruby_runner.rb", "setup.rb"]
  s.extra_rdoc_files = ["README"]
  s.extensions << "ext/lsapi/extconf.rb"
  s.require_paths << "lib"
end
gems/gems/ruby-lsapi-5.6/README000064400000012661150403134160011712 0ustar00
lsapi - LSAPI extension for Ruby
================================

INSTALL
-------

  $ ruby setup.rb config
  $ ruby setup.rb setup
  # ruby setup.rb install

USAGE
-----

General CGI scripts
^^^^^^^^^^^^^^^^^^^
The most efficient way to use LSAPI interface is to modify your CGI scripts. 
You need to add the following code to your CGI scripts:

  require 'lsapi'
  
  while LSAPI.accept != nil

     <your CGI script>
     ...

  end

There is no need to change the way that how CGI envirgems/gems/io-console-0.6.0/lib/io/console/size.rb000064400000000657150403134160015263 0ustar00ages over other solutions.

  * Easy configuration, deploy a Rails application only take a few clicks
    with our Rails easy configuration
  * Fast startup, the expensive Rails framework initialization only takes
    place once when multiple processes need to be started
  * Resource efficience, ruby processes can be started on demand, idle
    process will be stop.
    
To use LSAPI with Ruby on Rails, please check out our totgems/cache/rackup-2.1.0.gem000064400000037000150403134160011152 0ustar00, LSAPI_CHILDREN is set to the value of
"Max Connections" by web server, no need to set it explicitly.

Usually, there is no need to set value of LSAPI_CHILDREN over 100 in most
server environment.


* LSAPI_AVOID_FORK              (default: 0)

LSAPI_AVOID_FORK specifies the policy of the internal process manager in
"Self Managed Mode". When set to 0, the internal process manager will stop
and start children process on demand to save system resource. This is
preferred in a shared hosting environment. When set to 1, the internal
process manager will try to avoid freqently stopping and starting children
process. This might be preferred in a dedicate hosting environment.


* LSAPI_EXTRA_CHILDREN          (default: 1/3 of LSAPI_CHILDREN or 0)

LSAPI_EXTRA_CHILDREN controls the maximum number of extra children processes
can be started when some or all existing children processes are in
malfunctioning state. Total number of children processes will be reduced to
LSAPI_CHILDREN level as soon as service is back to normal.
When LSAPI_AVOID_FORK is set to 0, the default value is 1/3 of
LSAPI_CHIDLREN, When LSAPI_AVOID_FORK is set to 1, the default value is 0.


* LSAPI_MAX_REQS                (default value: 10000)

LSAPI_MAX_REQS specifies the maximum number of requests each child
process will handle before it exits automatically. This parameter can
help reducing memory usage when there are memory leaks in the application. 


* LSAPI_MAX_IDLE                (default value: 300 seconds)

In Self Managed Mode, LSAPI_MAX_IDLE controls how long a idle child  
process will wait for a new request before exit. This option help 
releasing system resources taken by idle processes.


* LSAPI_MAX_IDLE_CHILDREN
    (default value: 1/3 of LSAPI_CHILDREN or LSAPI_CHILDREN)

In Self Managed Mode, LSAI_MAX_IDLE_CHILDREN controls how many idle 
children processes are allowed. Excessive idle children processes
will be killed by the parent process.
When LSAPI_AVOID_FORK is set to 0, the default value is 1/3 of
LSAPI_CHIDLREN, When LSAPI_AVOID_FORK is set to 1, the default value
is LSAPI_CHILDREN.


* LSAPI_MAX_PROCESS_TIME        (default value: 300 seconds)

In Self Managed Mode, LSAPI_MAX_PROCESS_TIME controls the maximum 
processing time allowed when processing a request. If a child process
can not finish processing of a request in the given time period, it 
will be killed by the parent process. This option can help getting rid 
of dead or runaway child process.


* LSAPI_PGRP_MAX_IDLE           (default value: FOREVER )

In Self Managed Mode, LSAPI_PGRP_MAX_IDLE controls how long the parent
process will wait before exiting when there is no child process.
This option help releasing system resources taken by an idle parent 
process.


* LSAPI_PPID_NO_CHECK

By default a LSAPI application check the existence of its parent process
and exits automatically if the parent process died. This is to reduce 
orphan process when web server is restarted. However, it is desireable 
to disable this feature, such as when a LSAPI process was started 
manually from command line. LSAPI_PPID_NO_CHECK should be set when 
you want to disable the checking of existence of parent process.


License
-------

LSAPI library code is under BSD license

LSAPI ruby extension code is under Ruby license

* ((<URL:http://www.ruby-lang.org/ja/LICENSE.txt>)) (Japanese)
* ((<URL:http://www.ruby-lang.org/en/LICENSE.txt>)) (English)


Copyright
---------

Copyright (C) 2006 Lite Speed Technologies Inc.


gems/gems/erb-4.0.2/libexec/erb000075500000010754150403134160011756 0ustar00malize_path(destination_dir + "/")

          symlinks << [full_name, link_target, destination, real_destination]
        end

        FileUtils.rm_rf destination

        mkdir_options = {}
        mkdir_options[:mode] = dir_mode ? 0755 : (entry.header.mode if entry.directory?)
        mkdir =
          if entry.directory?
            destination
          else
            File.dirname destination
          end

        unless directories.include?(mkdir)
          FileUtils.mkdir_p mkdir, **mkdir_options
          directories << mkdir
        end

        if entry.file?
          File.open(destination, "wb") {|out| out.write entry.read }
          FileUtils.chmod file_mode(entry.header.mode), destination
        end

        verbose destination
      end
    end

    symlinks.each do |name, target, destination, real_destination|
      if File.exist?(real_destination)
        File.symlink(target, destination)
      else
        alert_warning "#{@spec.full_name} ships with a dangling symlink named #{name} pointing to missing #{target} file. Ignoring"
      end
    end

    if dir_mode
      File.chmod(dir_mode, *directories)
    end
  end

  def file_mode(mode) # :nodoc:
    ((mode & 0111).zero? ? data_mode : prog_mode) ||
      # If we're not using one of the default modes, then we're going to fall
      # back to the mode from the tarball. In this case we need to mask it down
      # to fit into 2^16 bits (the maximum value for a mode in CRuby since it
      # gets put into an unsigned short).
      (mode & ((1 << 16) - 1))
  end

  ##
  # Gzips content written to +gz_io+ to +io+.
  #--
  # Also sets the gzip modification time to the package build time to ease
  # testing.

  def gzip_to(io) # :yields: gz_io
    gz_io = Zlib::GzipWriter.new io, Zlib::BEST_COMPRESSION
    gz_io.mtime = @build_time

    yield gz_io
  ensure
    gz_io.close
  end

  ##
  # Returns the full path for installing +filename+.
  #
  # If +filename+ is not inside +destination_dir+ an exception is raised.

  def install_location(filename, destination_dir) # :nodoc:
    raise Gem::Package::PathError.new(filename, destination_dir) if
      filename.start_with? "/"

    destination_dir = File.realpath(destination_dir)
    destination = File.expand_path(filename, destination_dir)

    raise Gem::Package::PathError.new(destination, destination_dir) unless
      normalize_path(destination).start_with? normalize_path(destination_dir + "/")

    destination.tap(&Gem::UNTAINT)
    destination
  end

  def normalize_path(pathname)
    if Gem.win_platform?
      pathname.downcase
    else
      pathname
    end
  end

  ##
  # Loads a Gem::Specification from the TarEntry +entry+

  def load_spec(entry) # :nodoc:
    case entry.full_name
    when "metadata" then
      @spec = Gem::Specification.from_yaml entry.read
    when "metadata.gz" then
      Zlib::GzipReader.wrap(entry, external_encoding: Encoding::UTF_8) do |gzio|
        @spec = Gem::Specification.from_yaml gzio.read
      end
    end
  end

  ##
  # Opens +io+ as a gzipped tar archive

  def open_tar_gz(io) # :nodoc:
    Zlib::GzipReader.wrap io do |gzio|
      tar = Gem::Package::TarReader.new gzio

      yield tar
    end
  end

  ##
  # Reads and loads checksums.yaml.gz from the tar file +gem+

  def read_checksums(gem)
    Gem.load_yaml

    @checksums = gem.seek "checksums.yaml.gz" do |entry|
      Zlib::GzipReader.wrap entry do |gz_io|
        Gem::SafeYAML.safe_load gz_io.read
      end
    end
  end

  ##
  # Prepares the gem for signing and checksum generation.  If a signing
  # certificate and key are not present only checksum generation is set up.

  def setup_signer(signer_options: {})
    passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
    if @spec.signing_key
      @signer =
        Gem::Security::Signer.new(
          @spec.signing_key,
          @spec.cert_chain,
          passphrase,
          signer_options
        )

      @spec.signing_key = nil
      @spec.cert_chain = @signer.cert_chain.map {|cert| cert.to_s }
    else
      @signer = Gem::Security::Signer.new nil, nil, passphrase
      @spec.cert_chain = @signer.cert_chain.map {|cert| cert.to_pem } if
        @signer.cert_chain
    end
  end

  ##
  # The spec for this gem.
  #
  # If this is a package for a built gem the spec is loaded from the
  # gem and returned.  If this is a package for a gem being built the provided
  # spec is returned.

  def spec
    verify unless @spec

    @spec
  end

  ##
  # Verifies that this gem:
  #
  # * Contains a valid gem specification
  # * Contains a contents archive
  gems/gems/io-console-0.6.0/lib/io/console/size.rb000064400000000657150403134160015263 0ustar00   raise
  rescue Errno::ENOENT => e
    raise Gem::Package::FormatError.new e.message
  rescue Gem::Package::TarInvalidError => e
    raise Gem::Package::FormatError.new e.message, @gem
  end

  ##
  # Verifies the +checksums+ against the +digests+.  This check is not
  # cryptographically secure.  Missing checksums are ignored.

  def verify_checksums(digests, checksums) # :nodoc:
    return unless checksums

    checksums.sogems/cache/rackup-2.1.0.gem000064400000037000150403134160011152 0ustar00metadata.gz0000444000000000000000000000127114364637605013455 0ustar00wheelwheel00000000000000��?�c�W]o�0}��0{�S>�
�,1		�@�eC �Pt��&f�cl��B�۹��ڮe�+K+%���>>>��(���拤�?a��B�Y,�Ldc���;(�[���<�bG��C�2iO�Ya�8M�Pm�����'���=!�С^��s0��l~n�C�riJ��;+Ѕ��AR>�1��ӣ(�D�G<ME�����߳-�M!��|{ϖ�j��,4��k觫bJ�H��:$��ɓ�>�����K�	K|�kM�	���R��(�+�
{!|C}�`��_�����O����(�P�5�B�w'�k"�8G�ر�����e��Ȁ>����*�G�S�RM*�Z�B�d�{�ߍ�#o�4�^�+��s����K􅓶�.����m�\
;�qo�MW��J
d�l�l&����mC��^ĕ� ��_gc����*�ګ���+<)*�Ӳq�UN�Fv���R�C�[�(�/H&�u�I�P��ٓ�N�EՍF9��z�$�u��E�QF���zM_�|�4��<�����4>�R�F�Y?%M?�ä���,��o��/�2��]snٴ�Un����[;���g�D���=���|;Ŷ��	�2�T�9.���U�1����?�t���'N��ɑ��{��&���jl�Ǭ[3�^��t��~data.tar.gz0000444000000000000000000002611414364637605013376 0ustar00wheelwheel00000000000000��?�c�}�v7�`�.��2!�Pԇ�/�6%�mIԐ�G��M;jv���9�߾��9�o�>��}��$[U������q�L�4K�(��P�*T�lwͷ���⛯�������o��O���ƃ�o6��?�zx���u�۸�7l��?�'
B�T.g�;��T��?��ʽ�(��F��{��h�,����}��0}�=:v�}�i�Џx����l�}�X�}�Y��Xs�\G�R�~7�}�_p��K���#��y[�Y�ā��G_��nm����o=z�y��_��+��n|�"w�}�8;�؁=�n���-��}6�ls}ss��_g�%�[�;��8�5�ҥ廬����������V��K��c���P�DB��ҧ�GH��+��7�N�K�Mu�͚�Ts%�NJw���a��F��O�Ç[w�����ܒ���/Vp��e/:�Ww�o���*����R����Gw����,��w�B�݅P؞[����K>���y�f��])���g��������������9Z�[a�KM<���=���w2������7�j���v�N4�S
�����l�#v_u�Z1TD��,��sf���I�l��(������b�ȭΗ�bQ{�� k~��y�D�尙̠��8[X�+��r4�����=�6���>�|[�f%m�e����La��>_���ș�,1���z�Pl�@�
���)��L��"h��#H�@���aC�y�O+@2&��]I���7,��bb���\��i�jkr�vH���x���m�wK(��	���3V�u�M-'�
GT��8<����7�sU�O��*
��:9%J�nlv�wc�ӝ|���_��@��8��Jھ�qk+�s�z>oh��GW��4F0k���:��7ɞ�E*	/�#$� Y⛴P��$I�l�/0�&�D�Ϛ�D�m��
�Uc1@���f��:�;h�`���C�=N�$o*��~������}��]]Ds'�I
�֘���TcᓰҚ�ܐ5�6w�Aނ��~2�²k$Ef��g��� ��ǖ�[ˏ̋��,e�J;	�1&�G�h׋��Pl�d�5d=ƞ��ѓ
�Rg�2�� ���2�ٔ��\��RU�7$�Ԭ�4�`d�[��x��K�l̵��eM��UK����~Жc�:Ͳk°����H��l�"g�Vp��D��>�d+��1���n�v�(��Ê�0�hd�>@��ѻs)'G�s���mK�:���
&&rP�A�ǐ�D
*�+l�[n��j3&Y�X1���)��M�smPp��v8�B]6�.�G6�jRN��9E!~��3m�煂�n��;'�\��@3Ō/=~�U��W�_�X~R2Y����^�)�vGz9���'v�O&�O1�����V���.��`F�7,������Y��k;i��t��Z�}f_��/ Vyc�]�c�R�Uƒ^���
����R��M���6�/�s�m
AD�V+%���e�?�y_��o��z�{�����_��˱y�R@�M�c҆��\�.*`��mVg�/L� �ѿ
‰�6F���0��ݠ�f	�i;����P���������`p<��
�G��A���`�\�!O�����+4E�eک�%P�fVmD�	l�UM�=�st�v�ހ㮧�ڽ^��7���g������a[����<u���F��!��yur��ƞ��,A�5�_Ɏ^3I�׷�އa���BK	�`����[�}	��6���qF���h	��@#�
mԮ���PVM7����
� ������ރI��*.<�z�Y�ʮW�u��VM�f.l/
`O�Q�i������nBPY]hͰg���E�E�E����2T��p:L�ӕ��W��E�7ƮJٿR��*�p�D1W�[��	F�+��ꈛ=ciN��s�vF��O<��C֥��gWr�i�~:�����}��S����w���?K`����K־-�%G����U4(:��J�����^�9�b�[��o�^�)�S�4��Q�b�B��A��8�/~�^���{�lE&�pq�U��2�CUo� ���<μ �zz3�mu`3�8�[�
ݵ�d��m��ꤹc���d[^@}��P�T��5��{�BU�^
[����?��=?z����:�1H��v� MG)���H���%'�AI��S�7\~Y�̕�Ԙ���S/<3�k:)cK�;��OT,`>·t�<Ӽ��,�:/,Ǟ%v����ޠ�U�~�f�������ʨ{�#Ԅsp�u�粪���ZYWg˸.���=�>5�G�}u�"2�B<@�ڋ�i�67ih})!_ݨڮ�0���<����,� Z@c)^�Љ�������yc���P(ڕ�B����g϶���-���EH��$Đ�Z� ���%}��#��t�η%��—�H��x���h���'��Y䞛
-���ӪP3�O�������F��T����H"�ϸ)Ό��J��`��l%�u�=�{(i.&�`�h��i	�^H�6�n�.�5��=�V���N|��&6�o�yh
/,?�1���mҌ��.0���Jۜh�n�EIB��dH��0�71�AbP[�"0iP���fR�`P����օu���k��A�^d��j���҃�ãIz�G�ᷰ�Y��r
�*F��%z3�YG���Y83�"�C��ĭ�oY��2����OI+���"t�ݟҩ�ͧ/nw+�!�@����X�iGx.;81fZL�!dlo�X��ĂJT�(���yv�O-���"�k����ܮvn���m��숕JX	x�:��s�W�N����c+�
'"�T��f���qΗu����X���tZ䇸SR�
X� xi���w��())Ƃ/��6�zϫd�4*���b ف/=tZ�1_��)NE��T�9��D�
!X��eO�`�
j~l���0**��o�@�TC�����yk	�~�:�Yh�Y�W����Bo�9�tQB�ˢřVNM�A��BjwGO:��q�,�o�>P�YR���2�.�;��T3��$̽��*�(����7v�s�,WԖ�My��	XCV��
<2�p��E�)�"���&��>C�Zx�4}�v��E�B}��(5�@TT+�0
N�eWgIdŸ�}�{��9�����n�_���|�qw�����f�O��nq�'�2�}-dv%/��؂Ōq�`�{B��ŁX�Jʆ�/J�GY*�'ȵ��f��NؔA{���2���v�{�l�t�<�u��5^�og����/�����_�O��'�._���o��ww���G?��O��[�?����������𧋳����'?X�޿��_�޽�\���7�{[���G�\���~�<�\����
g��a���z�j�錬7����q��X<8�\�t��5��y���8���Ï�u��`���a{�q���o�n���gems/cache/rack-3.0.8.gem000064400000324000150403134160010614 0ustar00@+�#6#���ju�G�M�d�	�5cTw�������7�o>J���N����"\X>���+���B�	2v�(���潏ͅ��s��wv�WH��P(�Ҍh3��P3߅|�@A�Y�/U~]A\�-�#2&�0L��[O��^\Ԑ������9S��W\�^	�a��1=��-��������7B��1�\�(�
�3�dB|����=�G4��G���N˥t�̬��M�B���u�4ZA����tut�U�'�����r�A稍����!�B��؛�r-�̓.����l�=>h�kw:G{`�`�؃@¨%�D쪔��D`9���x���-O�3�Vŗ��w޾�k��5D��5�|��xRK����)��+�]���=@�9��.��g�طaq�X�ֽ���x��q��tʐ����n�Jn?�uDG��G�N��t���K��A��Gn#V�[K���0�{t���0�� ?��3s�TcDe��tZS�
reIˣY6\c����9���Z�����:����̧�=���#rg�&�>��E����e�kѿ-�k��YΥ�H�@nl�m�`����^������l<���%8�5��y�����הKcz ��[V
g���W�T�\QA2�Q�%�O B�:Z�I��a�h��Y�Ex��F�*�b!�X`��#�ÿ��Q�W��E]���m� 7w�]����'��ZoۧX�׵=�K`� ��J�u��$A�&�*�`��e`�}�~�V5���
B��'��p	��e�\4^����[��ttJ���6X���\g�{S)>"���%�<?^)�ru/0^�������^����j�ar��N�+Co�ܞ�<-z���v|�%~1a�K3<s��M<�ä����u��dV�FE��m!������A���ؒk���m2�SQCHKv�'�
���j
B��;{�6��@���-�]�&K��{lǾ!%r�=��3���~�u�F�����k-�_Ɣc�.�mN��B��8ܸ��y��#�#��k1����Z�����Bl;�=~�`��0o��)(�D����;ey�n�P�4���\�KR찻GxK��eu���\Z����yp2Z�/�'��	x=���v��	�n��_��U�K�,��]�1�)��W�k��`E"�J~p=}n�Nw��v�C�v��3b��r?��x(�������Bڋ��[i?bpo���t��o\

�Ui�Ƙ��|�����Y�Y�[�vz^�����J�Ն0q����׬t0�L@�yC�Y+�F��h�i���񢒆,��V
��)�'y�ȩ��<.�����̟�$�q�V��i)�� ��oѧuF��O���t 0
u.��b�:Sv`,�웉pUHe<h�fre���
�ɉ%Qɤx0�ܓp�DM����Kn���ߪ��~Aղv�7k�]o̭p<{^�ե[a6�{P�T	H��C���:��ZW �Lg�"I@7Ӧ�2c�]����
��Lob�m�N�")�Ĕ�2�E�L77���a��X�_�NUS�M�"�y/����[��z~9��UW>gLq퀖c媆;�ܟ�ͥZȬ�rq�>:"0S���*����}�(e��<ª5D`��
{I��z�+[����ƄN!����(�G[�K�)���ʚ��
?���V��E��=Dd�X���
E?�����R$��[es��T��7k��b�Us��UE2[�eɸ�Β9V�1���DM匯�\�����U��=u7�
E+ӭ�g*@�"V7rE߮���Pr�؏\����
잎�.=ߙTN��48�u�?%�J�'Kj�/#B?&�u�r�6��Z"C�1�$�̄b�	�ҕ%s��B��x�Za��C賦bV��<�ex%�^���諑�K^�?JX�H��}�ɝ�V�:�%-�7F�2��������S�N�4"��`��4h"��1�T�e4l4�Pk����'��+s{����t��X�>���Iq�
��F��3�H[�jS_�lU�jQ�Bx@n�:3}�u"3�;3-,o�m �z.�.��з�qjp 撒�$�6�y0u�H�K5a��A!ŵ{E�����M��R8�M�A�:k0�$=��V�hl�j����X8[�u�i�bp�:�UA
���
a����q�lI�ٶp�"ȴ?�����v���v�֖Z��_o14�i�ZS���@���:Sk�K�@�y��F���*����p�搓gO[���+ix!���}
��c@V�֪�*
<d/6�Af��k�\:�t��
G�C!^ѩJ�P^�ڨ��T���oW/���m�D�d"��ݓ���<��*��q�m��6Z��-�?�z�">���.����Jlu��!�g�BBs]���k�xv1��v� GI���ְvP�����5yQ-i|�F-���4�Ed�������&
�={�Pʹ��i�Z�����j��:�`���Zd;�H
2���X?��S�J1�ȋt*��Pѵ~I�TpU��j�e}4Ѥ{���Ο�ԛի*,j�c��0�~8Wɽ��\$<�5��3�Nu_���?�]oλ���Z��	]�O�$QI�;��Mɤ,��MX��k�5Y9��=�C��B/-P<�κ���� ������@�OkeM��hq�"��T�u�
����1q���uuk{
��آV����&Ҧ�s���r�ᄚi�X���M׷մ$hG�aZ���Kk�0�^����_����N�Ş��ͭL��xcdɘ9�P�S�Q��c=[} en�O�A��X��+�a*��9�֞��$#ȟ���u�9̕���D�^J��*3�k�-�%a����%(�!�h+(�Q�8��Zc]���*��
f�4�~�*�d��3�Zr���+5��ܛ���H�t�-�be�H�E,2^�h�����^�-��|b�������^F�(��0�J�	C�rQ+1�V��2SLD܊R녶T����&Ƴ���C��c�a��U�N�z�7�^�1N۳D��DY CR7�y�AK:#R���`T.����@ >6�Uj�Z�,6��"u'��	��
PFnU����t~L���ra�J���O��N��U�D@�n?UYsb_���3���C�l�h����U�Q��ﮐg��ٌ��:���K7[��-�-s���L_�8anM�a���@���3��L��&�A�G�1�PO|��ў_�6� �5�d�K���5���j�i�a�,�y1�4�R��BB�r^���?��:W�)5n5�5	y�d�8�!+9d�����n���n5gؓ�H�� �3����͌r	ÑB��
�kݻ���y��I+��ԧQ�L/�lAJ�5�{���|AΣ��閠�֖��P����3gCt%���0�
���B]*%�iQ L#֌D^a{�� >*F�B��9�k��a\!�b�+��t�p�_a��ؼ4�y���=��m���8�ՋGnN(K�hdd����Z>Օ9=r)�a>t�
���
�kf�M�ؓ\�Nխ�a�&U�ŧ�ok"�	.�����JW��*cDr�z����q���}��d�GKЉ"4sfu�(L�w��^����C�Җ�����<Bm��j(��u��%w�䑂��AC�[�>��^I�W���̠��W��}�.��j�[�%~n��{�=��u�>���;��^[���Y�Z�*뻦Q\�n+�x�w>�|85QH�H�s�]h����ӓ�*Е�<{�n��B��$�����*�gA���X)H��S�$����>���6[/e&��[�#����f�@��jE)�`����S�ɭ~����g���pL�4Ć�ҽQn��t�����!��ʋ8_մ�D`��
���w�������������3��x�'�����Z�$��:�U
�6��٠�`P�e����[�S�c��0�B��ޣ�[z�Gh�� t@��>:�;�(�f�5�����V��Y}������O���Τ�q[��#۵�%���3����x8�AQ�G`��Fv8ԖT��UPr8��Q��/�^��L�������P.�m�Cy����K��2	jk�9_�U�槉Z����y�*��� *�+��R<�:m���0g��<G8��C��L!I?���?*��E��*���ԛ��3bd��'��a�`'������:9�b
&���8��"�H��_�6�Zd���%}�����gثU-2���S6���~������A�����2Ŧ��ɖ|�=S��:��
�k(ꋿe+�n�KF��g�Ё��%�7XX$��\� ��'u�Dܛ��1/������U��(ƥ���L\j�q1���ԛƺ�rŕ.g9�(s�`F4I��;�`�>y&�	�=�&-�
1�iFߠ�;Z�0�8�������(��z��XƑ�+kw_J�I
��9������˾ad�?�&�Hv!�vSIU���ż�*J~Zֿ�s��r�NE�$,zqV1Q�#�p#^N/�lW���>7.D�ko*��dY�tU���@Ԕ���d�bkI+Ri�T%�5�4��J\[����uqSK���FxSG���<L��5@�����L�-�h6w:G�އ��ww`�a�&�vbv��H
pA3�#��\%�(�ad��$ړ@���0�,����l�c
�93�[a5�
�?�z���9��sS
��	����"����h`r X�P���&z���1��O`ܩ�(E
�S.eЅ��T�ɁhU��M�)��`F����'�{��Ndb��j�VB#}/����u9%%�)�Jb]�NS���Q��u�6���B�[��Hk�.<[�{�x�`H	v��~��W�������9x����!zj�a\������%o�o%(�c�����,���}����M<s�kKy1u>�J������PJ�0�Y9��S�0t����k��eW���<�����w��D�p����BT���,�u����}/
Wϋµ��T�73l.�ݩO�{v�o\�`��R�^C|h\5��ii%�
a恧0�I�=),�NW٠��T�_e�ƶ/��qЊ��s�|]�iM���"n�}��'�3^'&�a��Яm�Ь��}&�N���nr1�A".�d-�Y4{��0��䵹�%����ƒs��w	�5�p$�D<�>YO�W9}/אD2N+E<�T)W�12M'�
q쒆+�qt(��K,�����5
ʫD�������H2S�Z�fH{�	I)}�g�6��"�#�64r�a��Ex3wbS��ͽ-s���9��7����뛛[��-(�;�����]���t�0��fc��^��8��y�O�^7��ͭ�)�����G��ͥ���돀�ן/pkƎxtn��w��`ء�W[������}�[�Ÿm�,t��)���@�ƺh��Y.۱B�]g�g������_q��ƣX;��"��^0�,v�y�>�&{c���l�� ����u r�#�>���z9`8�֚�
��y�`e{{�H���l���AW���"�Y~�v<?�T��7é�]��Z�~4'�#���{���y�Nra	�t��}��"�O����A/�Q��#�&򽉕�R߭�5�EA`��^
|~��{��9/k��o��c�^Z�@����g���s����,��u�‚�؛��^�;�`���� Dg��A�n�ΛL
�x�q��@�Ȳ����_´�ܺE@5�)�AH����g�o��ʖ�K�bL^�E{օ=a�ܱ��YS.���x�o���E���凍߀������'�?���b<s�a��Lͽ0,��<��/r�N
�LA��zE@���d!���8!���bfs��?��)zc}��ۇvr�H�h�^�<���X!U����{�gE0@��K��ؾ
����u��dE䉾p
���z�Z�Bo
���l[�\�����jg�ܴ� �������w�Z�����~��o>�" <�,u�P�X�̑�
Hl1�ޙB��1�O���r��3D'���2�Š<Ä���~����[�+�H�M�Kq����7���2�$	I���Y�/k�ku���rJ2��*��8��H�#�VՇ��	.{ 7=� (A��u�u�*����Ӱ�DӬ�&66=�0�#����Qx�fhէ-؀7�5�N�`@/$h(ID7�/g���JS��l��
��Q��%]�S��6�\�!h�Je������	�*P���dVeQ0��KU�!�8!K�O�%��-��_P�j�`g�۬�}9x��Y����u��{����s���w�ݷ�����d���M�h���?��>�J���N�u�v�b�o�����5w@w�F]�ʦ:�>6v�����ck�s�|��^vG���n���q�7��=h�����q�߆�٣��K�R��6�Wx���0�j�up�]�Zo���v��z�W����L�}���Z;m�j���9����a�U�ju��^	�v�~_a-�ow�f9?�ӃGLy��U�w��:k���+���=����P�K�@���hI͌|~�o�
��v���ce�n�|�<��]�&�����ol�}�����a\�8��L�'6(>��1�*l_$�ZUq���sD�ɽ��$7�-��J��n������P}M|�O�Ec��v�`m;��Ț��FpqV���E�n�\��=��˗VVXmD�!�`�?��o��Sn?�,�:�R���f�0a}�r�}�o�dF�҅yϜ��4�қ��J:��|\���c����X˅M��H�B�ߤ�yH>6i��@*^�+��]oNW�e��C!+�J�o��1�6�a��P�\Ĉ�@��X�#̀�P�*��͗�.�\�pk��}l����h�*T��(Y��ҚL@�e�
V߂��Q0Sچ����<%!��yL�q�Ԫ����(�O�Ǒ���_q�������6��� �ߗ+�{ ��`n��	N�k�7��2����:)��������������ZC
��checksums.yaml.gz0000444000000000000000000000045014364637605014621 0ustar00wheelwheel00000000000000��?�ce�=V@���"�o�[�����Z�Ryz7)��cfn����
e�^�ׯ�NJ{�|��^c$A+���4��2�a���0�h����n)�rm�V��{|?y3=}�kMG�^���Th�LF�W����]����f��)��|"D�e�YK��ljZu-i���P��G��d�u�3�q��/j���RF3�m��.�4цaB��Z��oN+9p-^�����r.qT�m2K�uB���YN3�5�G�S?�`�R὎��[�I[@8���As��*u_~�
���gems/cache/rack-3.0.8.gem000064400000324000150403134160010614 0ustar00metadata.gz0000444000000000000000000000230414442217575013450 0ustar00wheelwheel00000000000000�}�d�X[O�F~����%���-!me�Q	Y$B�>�����=ݹ�saY��o��,��]����9gf�s�s>�1��b���7(]v
2ˮ(����q�"E%d��r݂�(�&�ԩ"B6F/�Y�]���H��DԻZ�E19Z��Kn�TPi�{n �
�7��Q	��eM9n�˯��_ijo⯏�l��?���1h@1P%���1�7�kD�y)���CA�D�rS�^=��x��������Y����ڄ��d��n� ���-��5�U*,<=߂�`��XǕ�9�aٹ����W��#�4���ƾ�	0��߆��%|��G�f`K��
�@�+A�Y�rT�6I���yA
���h�h!�p�,h	��=�VP�4�qm��K��5YT�y{ss��Mʶ��
�CX�Z�\6
Ȋ�I���x��x�3���[Dž���˳��M,��Aja�nV�,�9��z�V�gHn�ȗ�:.��p�^�`�UpZch,��H�a�H�L"����`��n��O��"��ҷ��l�;*�`�hhn�.�� ���y7O$��'o�/N���O��7Wg��9�h%�5O�����M|~v2��������$~�HIL��)
�"��E��Kk���6}V�l
jy9�`�ڱ�Ӥ��ܣUZ��G�P̽�c0���l�㥸[�6
CImI�GY{�6�j)�]U�}4ҳpwppW�����B�(���k��T���п*��#d���h3�8:D�-a'��hhVe"����+9�Q	OY�t��^���lJ.G��A�O�T��z�P��X�n�<�@��������n�o��H�|"�1]���0�5��r#y{��|*(;�a`�o*���\5~��+7N�E�0ᜭ�
ip	�гSZ�AΏ4�5{�ل30���荐�
qF
��Gr��ZBC+$�s��Ҵ�E����6�$�T�0#���GX�8�
���U:�L�
߿Sʭ�D�2|�S&���E�M�8�T�5t��=iG��F���:�j��]9�3Z{SB^jO#��8,�
֪kC̢v��.��l�����`a��,��=���kȾ�����ks�ar�̶AT �$�m
"6���~Y^)$<��Yd����(�^Jj�9�����8�cL��b�S�p�_�u:�(data.tar.gz0000444000000000000000000031257414442217575013403 0ustar00wheelwheel00000000000000�}�d��vٕ6��QT�-2��M��L�)���DIY�_�"@�$GHAU�V��?�{ܫ=�I�z�7�'���%��]]��U�L"��7��^���nO��+����t���#��������t�[�����[�{�{�~gko�A���yf���qM�i�������Qp4�Q4IG���d$i�&Q���H�b�,K��EpS�^�|%E4�D��I�^��2L�4	����4,��z��<��p0��8M���&Q�GA
�,J�Q��(��n����E1�67o�K�7����t3J6�ڝvgs��h<z|ܡ��?�`�����촶�6��mx�G�"��Y8��(�ig�8�A��n0o���ēnpN�Q��?>���=wQ�y�'�����l>�l��F3����h�Et&��
����Ңv���G�;n�O�{;�?��i<.���%�x��(Â�8y�-u8��Ωu�=��9:]�^���a2��o�~�}O�"�����w�����E������.g��`�ش��k���]�E43k�y��5�<�5���nP��|���[����mt>'I���9��t>)bZqq]�[�\�N�)m�Vo���`[E�b���־?�vkwwo���?���'I����Nk�3�E�R��ߝ:\���/�I�E�uoQD�?쥾۟�t{r�{���۠��䲸7'���I��,�9.o�+��������U7��Mx�<�{N��"�˜�}�eiF�~D��E؁PG��ϳ�ppBK�Mo,���D��&�R<� G!�`�^��:��N�[|�:�)AlWVL�<G����룳wW�ﮮ�~<?���*���{}���K��?lI�}^Ro��iQ�E>m`�ǟ�f�o#Bq��[Zp< D@��x *����s`�*M_�=��t�f�O�ԧ^������6=>|x�#�D��8}κ�<'pLҤ5�fY�A��W�tHM�Q�y�N�;9����JЎ�}�_�ݨ�����_g��~y��y<\'���q`7�=���l��Q��$D������O��DG{XuD�X2!rk_E>�&w<s��,��ƄZ�(�b�^:���іwx4;+1���9!�g՝W�o����$Mo��ЛM�s��~ۮ�B$��� 3+���:�*>d�l�ӌ`hF�=�π0��]&�A�H�C��fЍ���}bX����YX�W��.����z�϶v�϶Vb�b�y���ʻ�pc^�v��*5ݕ�<?>Rv)gZ���و�5�!t��8-������<`�{�q��I
���`WA)1z]4m��l^<p���{e
���8��q4���sy�A�9���9�G	��ٛ�t�9� �`y�*���EE��3�?=S�=#��|�2 �҂<��tBۧ�__9f�>�E�[�;{]Ԯ�o\�W��f3:-�ք�?��0K�DI�o�%I����R�� D�#9W�C:t�	��ķ�@Š.�4OdZ�Ƹ�E�כh�3iN�QJ�j^�o��߱uC(���{��i��I��vO�͘�T)1fA�	�5Ƹ>�(͉���SX`��#�
�%d�ؠ��L~1	֣�^^�x�1a��i�x���r�����$wE�q:�B�9$&,�m<��ށ���a]v�4����X#m�8�o�K�n6��j��}����ܛ�:�"> �^�]��m׍o�Qw����>qO�l�\�$���u넋��n�(���4a��	/�/~w|q}~qvuvtv���S�RׯIx��
����H�.��:L�ܾ�ƈ���;����/B=�6�dHO�}������&�p:�pN�3\�iס:�D.�I��dѾ���u��批��c�W概Y2-�i:����~?�� �o�����yQM�7��b���+_F�P���{�8pl�y����@��K������J��v^Q��H�P%(��T^M��1���
MF�����n��[�O�L-�����l<
c��^A���?�����0�q�y0� W�8	t�Ҕe#}��t�J��;#\�9i��m�mx�zI�;8�<zs����Û���ӓ�+,�B�( [�O�c�Q�
h�q�Į�}�M�����:�atG��
�
B���&���XD���W��һ°�j�8K�<"D=H1�,
F%�,�F��|�����v�rg	
N�e%SV֭���;�}T�R���H��L=����N���㾌2ZP����(�7�E�l��X�)"X���?p��5��#(�J"�ä���1�Ĥ(k1���%���4(��`��~]Fݎ���~8��i��`NT�
Y���	&�=s]X�y"ˎ��_"^e8N���������`�(h�R�G�	�[0P�ū�`{�9tG��,'eȭ��>Q�}�?{z�Ð0��u bC�Ce��L��d�&ΕՖ=�Sŷ�o��[��Ӯ(��C��z��)��.��<gu�Uw"��a<"�_��Q���$gѱȻ�_c��<�m�e
�o$���2+��ّfO;���U���x�y�#���a�=/����	�8�f�_�(�p�}�Jt/��a�0���0����DS��{��4��w�
/����GD'��0
�Ao�`y|<3BB�Q�n?Q�n/2��Wqh�=�����æ�v<݋	m�CL�$��rf��⽚�1<U%=��YHЮ����x�����'�^Gl�<.�ow��P9��ae	O�>l�Ԏ��N&���ڎ~ƬK+���hF({�y)qkK4��z�Ƈ�$�ȏME��T�����DԲ�\�����A(��0K�N�l���4/T5���J����Hu�3Zˠ���I��1dGX�� xu��^~�l���Wĉ��>��*l�2�*Y:���6+%�a�,���<IÁ|5���@`�Y^��t`S Y����]�x�UV��v$�V��Q���G#���q�Q/�	-�3�?��<�n�a-�U@��'=1��"z��-[}X�ELf���`J����!�Z�.�e����lؑd�Ω�2(�nZ�D.~��3��֛��<�w���$B�Zf@"��~���šО ������+W���vpp�fG�9�>�Vzq;~�;�]��4r�Qt
e��l�9�E����cz+a���DC�;h�o�xbxL��[ӡS;�-
�����K�qcc�1�և�1w
�%���3�"W,f�<5��5��>��Q��S\�&�g�h�"����$�ϋ�ޱ8�
���֝�gAwiv�G�@3ľ�!�Lϸ��~S[������ͩ�b�'l�](�#�@r���6��jz�U��{�2b��g.�0��}��)Z���0�����T,�q�z�U������|�j=k�����1�i�0�VQsR�Ԯ���u?����b�f�"���YDm#!~��^	v�;v$��p2��՛.Ia��}9,�a�*�=�< ��� S�Ή�����a�NՎ�2.�P_���u�g�PSB1��I5��P�aE�n�,!7���F���0��r!�Ō;C	}��ݧ�	|��vE4��N�
��[FbSB�l�?z��h��%�h�<�������&�Ô�E�=�j�F�Јz݃uV�
��#�E��>�8�T)������gG7�a����l��n:?�ug�ۀ��ԙvpu��@��JR�p'}9���]���&k7�����Y���z��#�ֳ�iڨ݆ȏ�T�m�����S=���K��%��M�h`T�Zwj�Y�
}UK�ѡjs0�����OkEc�I����g!�4�Y�cn��Z�� �\D���5����{p���"gxR�V�a)��t=�^�~�zD�l_;3�j�e�'¦��{�����SU;M�7a��v�O��](�xG�O���ᒱx���5{�+�c�q���@��g~7�E��9!4�ل��"����ΚO0֞��̸�Fb�&L�Io�(H@���/<�Yg7�g6���SCn�C�wy�8�w��&��]_�{�]7�?���N\�W����"L�„�~�0G-y�MJ^�K�/��u��nu��v:�¹'��{�n"1�v|���P,��@\�U�eu���
C�D�H�o���d�=
����=���L�Ny<�����ߎ�l��c7Aߟu����#���8"�7����
�x�N�5�.u�'b��U�������cp$7B�ͽu�:�֭�e���f�N��
n�����_���Mx�nsM��f���'��J�>3����bQ>�������>�Ў7����y�x������s�Ќ��A&<�#�nĬ6$2���z�t��;�vg	��
��Ɖ`�ՓL�i�a�&��S��1����݊BCg{�0����k��9XÐnb$@]P7�Ě	� |"Һ6O�=�X��XqƆFY��.GP�M8�g��O>m��|�r���<&�[�_�/���Y�N�R����/�̖0������UH�g����Nģ�R�mo��+�߯���;�>�w��17J
����g*M�|����TԹ佁K^�;��$y�@n?º�P+�U��*
�,����ɉS��%i={qre�J�'S�Vn#>�M��,P}��{�;|{�4��]\�i��͙x��e>} :x��_�a�����ʺ�R�50�e�(�Ɯ��@}*�оK��Y6���b&�o�)���wğ�!
]u3�{|�V�7tY�a�W�SG���
De����5�o�����O��=h��0m����D�OO��h����hA�b�U�����6u�^��/e���6F�i�����$���
�s��U�ʚ8�� r�o��։Q���A����a/g��E�x4�G��0*k���Ɨ@�W^����
�b��Ւo ;V�}���	ѷX����)㍾�S1۰}�{����׬�]C1����
yX��5�,�K��U�H�K�-f)m���ʊ1c<��X8:V����`*��c��w�%�k���:U��&���X=M�OP�|���9;h9…�M��x���Y�tث�.�xDwp1�W��d�/�uT����3i�R��&���K�4�ɰ��d��[���藷P�Ő&c�5TN|Q-���ͻ���o�Q�ϖX�	��Dt�(��������d��Oj�+�z7�h(^U�̊�G�B4�R<%y��r&�#ף���*_?�8�o��v�q�Ɨ���q��	^j��%���qUm�òӯ*���N�Ҿ��D�4���8(�ˉ"�*�n=X�������D���ݧ���g���
e�
T����X�5n�#�P�s�A�p�b��x��I�C���h���|�Fyy^J�r�r���K�*B߳���U^��	�JL@	2��-��E��b�ܢ��2ޘlc�|j�J�_����P໳�u%#��*�TK�̓�m��e�Rݥ�k9
�n�O0t�-U�IVQK�l��Y]ds�Sc��h��u�IwQ/O9�o�>�Tqn}��>�;��i���T����:���Q:x��,�2���͇Z!k��z��D�x
W�t旄*@ k����K���̈9"g��_�	�rJZ�{�m˒K��&�
�o��Y�^�4.Q������T�Rb_������l!k�@|Ì7��Ǔ�ۧ`F	�5�O-<�TBHٖH�'G���<�)~��v�v��6��t��
�h�(�����(n6��RV��7�uZ8E_@��u��~��_Z`���J���ᘨG�����(�V��.\�zP�œ����p�9<;4Zˍ���iz���P���.�tG�n���wꇗ郃�w�Nޝ\���d~~w�����w��;L�0�%��W��
�;��o�;�Jn��!Ur� �\Dڈ�qF"�1Fl��iDX&f��aM�D4���t
6|_f�Z>)�(LPr��v���e�g�,<��G�[����w'*bE5{�R�����8|���w�I�[�R��e��1�@E��&G_�X�f�/	�M᥎&i2Z�t�s�F�U��eU�n�!�د�Y1,�L�T�1*��[���(,�:iߋ�6KHJ�O���E4�;+#���5S��M���+�OUgV����y�fW2]�gMn��xU���87a��(��_٨�aq��s���a��"t����c�u������+�&,e42
��,��>�1�/d��
��3;����z!ZS����X.��m�5��M/QJ�>X�E!a_��"��ć��#���*�y�!t-��#��`3��PQC�aφ��r?�����x vM<'�q�:�W�9��^UnU(a0��f��c�t��`��kߋ�4����eè6����J����@��ރ����ܤ�Xԅ\S"R:!��2���ß��b=�$i{�{�O���O��ˣ��Ѻ/�dp(����^��qzwlTFFbe���8�J��Z%F��}���C�^+���aǠ
͒��
��ϵ~i%��9����N	A(~5�z/���4F�}yyz���g���r�4�k(���m4!A$a-+�+��$.�7�g��F��_�Y�3p�&�W]%8V�i����:<�4GQ�+�ON�e�G�I"��%�����0Oy���X����������o>ȩ��ʄI������tOk|�Ϛ��!��\�}Hwc�Y�/�]/5���ud�4(q��Y�S�uT>mh�=ُH:uq���ɻן���Ӂ(�V;�|r��N�y՘�<��#3��X`���"d�ya�`�vI�L-�ð�!�K��5d���"�G6���^�\d~p�x:Xo(���f>Y����(�|O�-�E);v�/���q/�(ψ?��A9��"&��덡�X�`�nTr����9��,�����_��3h&ƞ���/�' �aP�H���=q�]��T�ȖC/��i�b�1 �����ۨ�2���@��,2g�M�L�uF�"�}:�ƭ�/L�a~����,�[���gk��$����
�C�p3�LL�R�
lw�a�/jW'z�E���b���Nņ�W{�
�f�'��7�����.�����3Q���΄���Ţ>�$>,��|8�|˝9%\VD+q�g;P�8���b2���������K7;�#��&����4�!�w��V�h-�Q�i�VH�on��\���SΊ	.
�z}��|�G��!��]�~���/�)~��x�����-=U���A�x��4-Zln�e)
�LK8�4���m�� �b�M�����>���0Xn���o�o�z+s㽪�Y>���+$4��?_$}��…$u�[8&.1�@X�]���aE_�kZߖ�Y�����[�6����mA�U�xp���w+�c�!֨Eo=)��7���/��q���!t..�Z'-c�22<
��l\2ꅲ��f�a���Ȭf�p��1A���~��=�Qs����N��qC,���<J�i��!�M��G����Hd7�Y��$,�`�����L��	}�I�o��J��Q�ޱ��[�H�
���7ßLС	`�jF�`b$��(zG���H�I�P�b�z��Uq����F���%�ϋU�7�X�i=
�?��k�Oar�����$�ؤ^�^��/�r�A�6�կ�8{��tD���"~�7�(����s=%�W���ع�	{0�₄ޢ^�r��	u��>B[7]�0���8[���\�S�ޱ�3&a.�Q�|��W����\}�"N��7$y��:�i/���3*?��^�#*�Sb�&��u�Y���ݕ��4��|xzz���4��\|�!�".�7�����ܳw�tչ'�Xr�O�Do��q��
|�XZ�*����Kj�;��_�|J�3��xj�-I�
��z�d%��5np�^s-m�սF9QB+$�:!�}M�Qr���#�66���s6���i����[�8�{ͫ�r�h�֯ˑ�Bl��}-I	����(�!�'
�3�x�vq迢�������pcC���_��������JZ��Ed�j��
Y�����j�ue|M�u�[6cVZ��冷b��F����f-[Ǝ��J� ���}��>�W��S�(	J�Q��}c�
Hߊ��D�C����xs����

�i�������n��y8�ו��=�s�7�C���:���[��o贊/��j��\�[�@3�\���|4IZ]9<[����̤LdH�����
��}�Yg8v��=���=�E���K�K��W"E9~�� 9�(���RA8��A%+B�^�'ɉSE5{��㞉�����?[z�O��m?8��t����*@+���"(��f��jDN^rJ���&��ҵ�YY�>�Y�JV��ª��2pz?�{�OtE:��~��#�v�X����+mTBt�����t�=�p��B���x�nS|2bx`D�Xl+<�:�GF;^^���7U�	ZN�W�X-����2&�Ǵ�8Z�e���/U��F�����k�a1�\��$fA#�O�qb���I:�,�*��jH��8op�OD٠DU�t	��_õ̰��YEZ/�i4���h������=�-:�c�1�rnhXt�N��[	g�C�
�Lj��>u��y���j>ɉ˪�K��7{n�Qm�,=�>t�F� NB|�Lh�HC��3yZ�2
͎"~d��Y�D�O�jw�j�Z;[K��c��?M�B�`&
���S�����P2���p�B���
?�le,n��E�c�*;��$��)��%B�̗h�1����21�K8��<&nһ(��p�7R��Pj��\�毹=�N��A�6i:�j���J���*���P��
��}^�MBH������p2���xj�H]���)��%���|ّQ����Z8��Ұ�,Pq��7��ƒo�#��Ē/?�f�H��V/.Lu�?��Q>iä����"�H|��s��8��7��z�D`9��U�\��ȶ �sf$I�ж!"ͅ��Z�d|U�1��p֦E��L�!�͢D�M6�"j�z{Z	^�8fɆK4R�%���rW����Y=$�J�E$�,=6���d�g�d�z�ܜy4o�$��}*�Zf�-�20lw��j�
c��j{����H�[4
��&�d��v���˨T߽?=�r8_^.�fS���XH�l��U��o���V'1��vms"�B�$�+���z�����y
�뛸;���%��=Og�8D_�F|��};�l�Pi�i����o���04@�3`�+�Q�4��a<��M4%��ߧk����|·+��|�/�p��V�p��dx��##VE˨ѤtE�X�.����H�u'ї<�R�����)Ԧ�u�A�q�U�̑@I�>tz@�K��1k�\ֈ�fz�0�tE����S!���zj2�T����o/�ޭ`����8\�&I�a�ƣ�M�e,6�Ewyp���F��"�"M"0�%��{7Ń&�����Sx1�Qu�r|n�ZbL���Zd���M�Iz5��\j�J|���+����di�p2���=�� ��E�r�O�5��~a�t��80
�6f:�l�c�[�S����A
�1��$��������r��k3�pX_7XN:-zwC��y�<]���0M7��8�Œ����)���&��9���3M@�����?o�(N�R�M�������.Gz�ML�s�������øM��5t���hu���8T���ܫ0������ETĒ�E�NSxR��G��^b������/���~�0b�04��?�h�c*�x=>	��o��
�a�BP�#@�m�K���NJ�H<��U}B�$奱D��l�A'�0�/�RL�ۓ�6x�H��-D4rq�s�d��Zw��*��w����Di��'w���8�*i�U�8pҝ���)�Z+ɪ^���w$��+ş9Y�PKI�`j�{��E:ϪqA�WqH:Ϗ�Ĵ����Ҥt<\b��]9�-�{0�pa�4�w�T���G�E�Eawz�)�rA1��94ʡ���q�8w��y�da'��*"�1ۈI/�"��|5�����Wts���2xy|~q|txu���^�B~�!�>��m?���3�G㶲�O���vY`6%
ϑ^�{��w&��	e��MH�)�H
]~'l�ba]ġ^���c�T�ez��t&�&c�Y����k�k���4�-
���a��oV�E����=bN�K�(*J�Qˇ`v-���Hi���@^�-6�1�ջĞ�_�٫'�N�z���� �o�ž�^.8�Ðk]J���.^&`<��sޯ�'E���l|ٟ7�-'!��g��D�=��*d�fp�&E���8kȆ�2ߴ��m����=/ݪ(u���$�1g������K��E��#m�����!��~�j���ܽ\pH� �0�΍_�������b˸Ꭱ�ˀ�5~�yx������s����?��<�#z�
�7~���0��c~�G�3��>��U��a1.��
�A��Jq�X�{�FS���"$��u_]o�n��.�=0u�ck;oc#4	a�ڥ��$����Ϝ��+˥��Cɵ3瑘��l��j��OV�pb3GZ��N��#kᖠ��}�Ko�+42R؍\�pB+ȗs�$d��R��h�
Ns��=�e�?B�{�+�N����r^��6~�_E�s&=W)H�p<�0��D������4�������`��4�J��dG��~�=#
!�_��W�-}d$��3���}#W��$�I�œ�g�;P.�wG2�l.���d#��bԕ5�k{���Y}��_��dN!x�݉~�S�[��Ҋ��ǝG3�2SZa�u��ǽ����瑠°����j������fM,�Ȯ@g7��ӄ{���2)�2iB`�ϋ]��
�	~i�J�pNjã�߾?�:9?���>=y{r�!�|���v-c1�)�K�~����ow�o��#��xA?��
�5$�U��{����8�Ϻ�a,��0��'*f}��3;H�6R�}2����IK�A�A�̠EXXh��A*\~H��L�������4���t��������9V����g"uxtt|N�C����c��s���d���Mo30�OZ�FL4rl*�Oڣt �k4���\�zj3�c��-͌�%:o?ݒk��s���>�݅}�^�4�Gsv�^!<�y���ms�%
oJ������s��j���HXOk���?&k뛨L6
?��4H��^�I�O�	i@��xK�
g�v	�3���0=�Ay	xҙT��n�3./N�/�����%a�%���旰ñ�������4�.M�⅖S��D�T;�v�ל����tS���y�{��XR�򰌐������C#พE�~�u���2o#&)�>�I�L\ngg��RXQ��(4:]4a��O�A&Wo2\e��2�N�#Wi�yRw/�n�;�`1���a[�9�%��V@�=�9]t�H�Q D!��Q�����9�p�_�������λI���~��:�E�g�eF�jm+���<%��Q����0���#���f ���c�<�-%+��AU�DE{�5�;�>I[���2��ꪂ�3-W�&����1�����*��0I����w��Р�A���q�-�
��J<Q���Ph�7�!k�E*�l��,�h2��#o��WA�a��G?�'r�<�ưD�	��l{[?U7�N�-��"��b&����^�8��p�y	���k��&�O3��R������	�\�"��^�A4����-�u3}�O�{��H����#�Ǫ���תq��3����.
�t��ztq����.v�PY��G�\���d���0yܩWվ�#�ϧ��1�;�;�n�K*B�M�hMU͍����
�"S"��8 P�/�EBnK���*����JMZv&j���4�P�(�X]�w~�F$�_���QN&���{�-�fRc2����L��e���)���֍�#���$�qB{�2���5|�f�[Bdٰ���y�AQ����ʾ�X@��*��+.��@g�q[�g�DD�?wO��(vI{�Qk�
�;�+��P�}�k�Qd�Yvxꏗ�G��Ã~1XFy\��)"|·]Z؉"����yd��X��$����JI��?��<�!�!K��b�D�&�
B�B�u��u\:��Y'ͽ��>�*-恄Vӕ��la��s�l�L�8OM&Ŏ@%��^��b���ү֔k�R����v�<ȑ:Q:�j��Bb�=yƴW��u�8 z2b�W��Z�ƙ�N�g�D�ʉ��	�.���,vv�V8Nә�sڤ�D��??S��roN��&����;��
.q�"�E�
��@�G޶
��/���ٔ�חeRs�VX7y���u80��u��B�����j�2s(E��ih�9S��ޠ*�9I'��>=�Z.�����������i����L{,���]��U����5�j��{/�>[�f��+p҆O8h<8�T�,H��>yv���HV��M|}@	n���z�t�h8E~��q�㍟��Jm=�kj�;Q�1��+��J�� �g1�;�D1���[�2h�|�a-쑗s64��yR��m)���y_��^��Z\�.z��R��9Ѱ�k��w��.�iQ���`�W����2İ�똑A1"��[8�F+Jr�d�b�@�@��"~�^`�ё������
��籍����a�=��UX�O�:۬�VbPDr�j���W]���z����&4脮C6b�jbU\B��rL�LP�C0�ۚG]W9)���}�֊u�w;{u:	#��vvy]�..��2����J��&��7LJ/7I�W�y�EV�+qE�&�#�M�+az�z�q��x	��iUM�Y@�',��)��.$%f�ޟ�b���di>x)|�����!��p�I��޽���`e,��YsKI���$��$����Q:÷���k�]�Z�ȔY�Y��!�%f��W�٭���h9u2�	 �ˮ`�f.�j��D��txV���e�RΥ7���b���j�,E
�v�NJd*����3#�KA�d/S�-)���6M��X3��=�o\�=�q��Js�]�}8͛��DM��)xN��8'�x�\�ڀ�Y��)��1�s:�ѓ8����Ć����KZ�6眓�����#�����iI�3pDPU����|�K� j�Q�_Ei�L�����"kŊ@#�\m�'�������!��{D��R�0T������׏R�^�]�蝼
Q<y�c_E�w�W���gn��OL>�uN�Fh
���Q���%���ׯ�.>^��y��['����P��Mud���$�eh �^����<Ӽ��yg�q��i0�ln��ݵ�>IN�Mn�e�M���Ct:;m���c�+�$�\r�z) �fğh%
�7��7�����V�ik���8�=��Nk˙�P�`Zn�q���f�����p�
��*������D�&y�G�ic�$�v��!�_�p
tW'+{�����G8%f@K��]ˤ�2zM�A�
!�j�c��-w��³D��zK�
�F���b� ߃�u�ۤ#�'1�{�;����f�m����V�F[m(��
�S�!/0��Y����ܐ{a��c�aů�BD�q.�0�s(�����m�3�U�ct�NiۜҾJ�������YRzYA�q\{�ny���Q�[<쯿�m������r����^���#Ӌ�!���ke�65	�53oc>��R;��dB�&c_����e�9(]�/�r�ܢM���G�QV�+]��:a��U�t�@Y�]Έ�w"B���y�C�����2�e�)�O./�rR�{��E�1���n�
�$��jdz�84.���
Pʾ0�$X���r^\��hշ��!v���Z���Z}��r���v #�H.�%�{�n?�0�Ĥ��T�&�9�4��T�x�iv��u�
[I>g�-;�a�!%�|�R� N�άcaֶ6����F[l��Dg�9�]�a"$@��Lо���(��s���1OM�A��c>9u\�����د���7�$���(�M�fm{���zs�] �ɼ�v�<(�:�bC+��Of����?
�]`�e�4fδ������?G����>�h��?�d|B����p��hL�*���-ߣ�W:q4�V�-3����g�ط�<h�Î��>7�prk�}�w�'�*g�cY����`���FY�N6í���v+��A|�֞��69%��f�*�q(��\�E�p�����l�_�f� ��,XMֈV��ҞF��-eG�5�Q8�Z�pF t`�N���+�[q^��i�T��N��n�\�{!N�����-D�Va��]�S=q�}K	��{�����K
�bw�9p)�m�Gĵ���	��x�/g�(9y�z0�l�{m�iƒ�.Q�t��)�$��Čh��SP�kD�B�$Y!sy����B�%����eWV��U����� �bS����˺W�.����R��e�X�������#A�n�~暹�>����������A8��H����v:+�|��[/D=��~*����IBH�
*��=����������Oq�L�����=֐�0�������5x�K��sb��6��yb��~���Ü�*��P_��QR#�&V!)J$��4o��R�ᓶ���i��0$�����4�ȵ ʒ1S�E������Qqn��S6��lڹ�:�Ra����Y���9#:|M�_�L\�mHߪ�hՑ<�[u��4"��R�����k;�%>_8�!2ޥ8�a�=�3,���rć |���ͳuy-LJMlP�a3���
.D���id
��7h�f��!
%<��'2��|X0�"���v�HnS3�s"�@��h��;B�!iwL�Ë�t�)I���Q͎�n5������e�W �2H%є=�٬��\�n�@|��k���iji	�ma}���،<�R�Ѧ1�f�U��8�L���K��K�U��49;C�N�Ap
���=�l\���M�}
�ڷ߮��y���.���`����L��R�!to��U�0�����S:`�qO��=UQ<��������{U�{�؂�����;Vճ~�����ǭf�S{��:#�K�Qp�H3��cDSA�0�����!*�<b�.�"�pYJNO��u)D��{_�<����%�O*R��>��)�j��T)b�3�L�qUK��^��)N#ʔ�.���4���ڛ\Fs\�#�����#�2Ѯ��ή�}V���hd�s���;�w�������c+|Z^�i�B�Ϟ�,+꛱�H&��d��DN����%��%	+7]�վ����W5~S3.����@Ԋ�Wc��M���6�,ʱ>9+��(}�h��+��բ����Ic3�;��5���ڛ2�L�e8r�u�t�yE�y�[�2�j��(jM�5lC��^h�&���zT��^��r#W�sE�Q��NkŧrJ��F��^P�y��8�E�Zjg�r)q�\���� �Fc�/Xב�����gjd-U*���!�B`Xց�N}`C�
�і�ɨ�53�U�,�d�B�Y��OTʸ�YQ�4GG���8��exG$0���Z��B�y�d��R�x@�Δ0���g�!0����f���C�܀/7�-
7��y��D��3�?���u,��M��l)���+��a4E�Q�o��9�f��D����t��PbӚ�$��p�X�i�
�t��Z4��;�D�e\���1�����pJ���,�H(wt��,�]�E�C�<-�/�Ф
Oz^�O��j!������]ArFu��b(!�*��Ec�C��gk�e�cW�-�x,��1Z������ X��"�'e����I�C�v6�������L=�N����+vZ��@��h��V"z﬋�H�ۧn5u%z۞>�(?��!vv��UT�F�V�ͧ��G������4�X��SI�j���J��;l�t�j��OMV�)t`�qhOj˜��n
/}�X�+��WΘ7'�!�LbB�k�r����^�`�O�N�"����k�vxg!����w�m
¤��~ְPB���^L��1���Zj���~��*u��*st�:�������?����m�bkwww{{ko�����o�"�-`�Z
����v_�^���1J���ܤP�k4'ι
IR�Hr� /�}�%]�@�U���;�7����t�8����Y�yC�y�Q��za=��m�	"5Ys0�;g6�Wޟ#�;�|e4i�!X�v��,e�z���8�1�ķ����X2Xr�7T��ɰ�$D4S��m��7<A¤�Q�Ѻ%?���� �����F_Դ<bD�FH��>�oa<V�
��(�U:#���[ƍ�Sq�!z�Y�H[,+��L�;��3H�%w�YC����`p.�%�/v�g۰����ڒ��>^�٩�D\�xu�4���F�֗�"D=~J3��Ͳ[��C�\+Oѓ�գ.h���&�P1����{����vm�C���m�a�	�-� �%���d�x��Vm�<�V)�,W��W5�����6�����7��8�y+�����H���C�ks��(MC>NZׇH,h���`|$y�JO\���јM~�FtQ��+j6�U�|d��>��7�&Ѭ�]��K-{	�N}�-ʌ���ON�e���5IY��LJ/�Z��Ut�V.��6IG��L�/�- �iݯH���ZD/D��&�p�6�G"�	�����zF�k�d�%��9T�ͽ�~���?�V��a�<���9�z��q���Q��a$�4;�p���I���flu�;��ռۜ5j��S�v���(�����5�JZ��߃T�<C�j���.�C�&)�%�2F)����&�^�Q�?�c�Zb�d�e�-˰�G�=搲H�M2߀
�l����N.��&=�!?��H�� �r04v(�%�d��B3)��j��7���#�<p��$�V��SZ��_#����)�LM�s,�����'a$���i�j���-�Hy�{X	��Y��1��D�+��ɼ���+�˅��lR�Wh:��"m���E�Y��Y��
7�(iJ*�;�9���
�E
ݡ�����v}	�� ���쬍���gHlX,,pD��Q+�Gr�E��7�a~�D�=4X3�8�bz#�_qPG�Ch�oBV�78��?�Z98�����40���e�5�%9'o��(��;h�5p5�[S;��?*8�=�j����<�����o{k{�"�m�?������F#$a<���?6�#N2��֏6DմM�F�8x�o�c�ZA�n�؟9�a��������3z���H����EM����� �j�h��y:,��ǺH���'^��Gk��cm�4����f�e2�3b���]ċ����fS�|^&�n��ل>��o��m��&�R��ǜSp�9F{���1�4Bl����$�~8�B���k�n��8o�Y�;a�<�Y��8d1�i6M�F!`�i�E�A�M+��s߽S?��P�wj�[(����s�y�U��ﹼM�CWo��˳WW/��G����w'/�_k���Z3�pr���U@-.�]���
��p��e38������epv�8y{~zrL���;:}��S_P�wg�HBJ�^��P�:9��`o�/�l_�89=����xur�c�:� �YLO�ޟ^��/��.�i��4컓w�.h�����4+����.��������/.�Ǵ����2*������m3xy���5r�Q�n&	>�9�O
�����
~�bV�џM��ŕ����^�\b�.�hx���&'���ݱ��S
J�OM��c���LJ�4�%6�7n�]�_�+��縟�o?%�J��n���m����O�*�o"/��g��:��k���1�����R�L���n��S�WU��ADC��ǃ������/�[��.�C�r�!��Ɖv��-�ytS-�FR��,�+�H�«�xt3rQ�����4�
�M՚0�4-k[��D�$���pҔa&�
x�����f�P=�Q��؄���
�Vlu�~2���b���?�…-1܄(9O``���"�P>D�e�`ĉI�X��z�T��!�8��l
����,�-�#
?��
�g�Ě5�Zȗl�M��l��;���)��Sb(�s2n�6����IU}�g���G�Ԋ�6D�'�'3A�%6�1���?ڴ{|$��>�?�_Z��pC�k=�W�E�rFI�.��+4:e^r2(���h3qa��vK[���b,�^��e���E�h����5�H��RJ�.W!��ɦ8�t��<��
����
����]�W�x,�hV��s<�a()�8��k3,t5�O�i�S�*1�Ӏ�x����i�G�`��?�k3����X�4��f��ڧO
h�R��tn�����]X"9z� Аg�t���6�=�?���[��Xu�����톷h{b�%H4)I��έ��^e��G���[�R
�7���QZ_�8O�loo3�h�*��WT���l�9�6DD�yU;PS����7�`�8��W_��<E��17�i߽>y���}�!������,xr�����"�I��H,0��3�'����\���ΐ]�g�祪ŀ'�y���
=���q*K�#݊��0{&�"�6�����ޞy��**6��E��|}�m�.�-�v�6��>��i	Q�	���~���D���v������M��XچS:�p�� $�GvX˧uW��W�<([��Z�p��h�}�l�I�Z�	%���mDbRbpb���Lo�"�'6��9K�R%��/�ϙ�K��(K�Z�T�!7ϔ0���-���F``����~��gj��*)cNľS���0e���_\��n3���oy}Rŋ����/�S�D
a�����S���R�
�,B]�VT��o��wo�$�Ʈ����z�K��^�a����ɠ��"��Uk�fF���5ː&�a��HQm|��U]�p�M�������ޏ����e}8|1���ޅ�y��o���+�����6�.���E��,��xENv^_��У3�J�C������l�6'�y����$�/�-P|tM|�"�/�d�E���'�g���л"�&C^H^�"4���8��r>��$���zF�-IF"�����]u�G�z|�"�w�V��4�B�,d�����M`��Qo���n�tv��%�rũLj�P둊-��Hb��*`Ai8���f�"D�C��H4��-���Ec�Љ~Vo֞�,�	�P�zyL��VG4�v�y^��P�]�gS!�M��lqԕ����t�r��';�	Df%��t��,{N3m�paND.Mo�]�X����>��tN��Ħ�w�i��z%�Z��^���}<m*��r�'?���z��M�t��C��u�����]+�`�ꤙ'��E��ͽK}M3k���R�y��Eڗ_��_-���Vp�2��}!��nuXg�m,E��(����Ϛ��`"9P4HL�FlpPiR�7�irP�y�TN+%F������:��~t8�M�E�lC��H�hG��s��x�`������xdM�	�-�S�i�,��N
��X�<����8*Q'I� q����X5
�$�P��p�`��>'d��AP�,@��GW�M.(O���y�}���/���b6��=��s+���z�3-Ӕ�!@#�,��G�P��<3����8�����f��-���nӲ�e�h��4jE ��M��ͥhv��N���^��,Fy=f���zvA��p�4��6����_��}ȸ\m�͆��-91�YjRiIKJ�{NZ�N�5���)�ư�"�}���5��<uː0t[gT���b�]�7ժֆ~��e�-C��D��<����T3���@+q/g���"�4'���{)ih�%ʙj	rdUH��B���&I8���n!�6�겎e��F`�)��o
9-+G{0�ജV�r��ob" ˄[ޡ�f'2�����i�M��Q��
���P�}��$k�{YB`rp,u��ѰN�K)dY�Vx�bwprf�pۖMK�-2%��Py�K�״����\����<�e���(�2�^{����pk��_�J%/c�W��T��
�DSMf�x��c\�����_�i(�LwK����E�w��|\d(��h2g.e�.6���R�\).
v�
�u���k�	��X��}����c��w�z�+b}g������w��q�]\�7i�	��BAXg���R���U,�{�uM�з���w��b�Zn�F��glk�)�0rIMn�VQ*������\^ [��[Q0ǒ
�Fab2�ˌ� ���|��Tp�e���"�f ֆ���z:��L�˅�=:�������墮�NN���k�$f�4�4Ժ�B�e<ۭ͐+�ihƪ����rw�%�(�"������??��&'.�;���
N�34A�(>���j���oo���ï�,��_�e�4���ήOK���	�:�#��o%]���L�r�u+� �aWH�d�X���l��
h�0nBgHmқ��_>!���4�<\��Ͷq��b�J6op�m�����+#��3n���t��4Iٙ_����i�$����/��(|�lUSתI��mJR l]Y:�0+�L	L�<���_��J��5
���z�J	����8I#[��7�W�!gq.��J���
@rH����O!�ϗ��.��T��xzI�E�(vNvi71>�;|���1�#kP��^,�j��0xQ��k��lq)M���DqK�6>o�^�]�8Y6{
0f���X-��0ԖJ�q�T��p�h�6�~VܯϦ�����*y8��.�0���ۅ���!M�k���t%>9�h���kFO?09��5�p��DŽ���x�#V��cĿp������-�wL��2��|��߃@����0�
����O�[��"� \�8\�sF��r8�O��p� ��N��
!�����P?��`�A?�,=��� ?�:��V}�?�m03�5r֯�y�ǘ��Q���wH��r���H�Q��A��~Gǔ[G�0NWu��|�D����܇\0��l��~���3�\G)Ѩ%Fd�c>3�]��3�A5ѥ�	Ag>f7����	��R��U��e�A)WF�f�]J�٫&O��!��JY
|��*�1���	‚����bz%�J�ӕ���(N�X�G9_��?�9;L��J�^�I>��!�$�W7����򉴞D���F��0�B{�/!�?��ߨu�!��s�S�D3�[�4�[B�����ee��^���X?ZѩI���N���9���B��G�+���c��
��	�6��v�"�t���i�I�E�ӫ~K;������O��h}	���ī?��i3x%7qpE�����{�"Hܯ3��ǥ�~;�^�J'��I��?��H�Z�x1��u���"�d����9���y�*��G��|L�c�.�v�桻~���K��D�<�\ҡ�l�vrj��AV���!G�Oi��1�4�8#�2���71/�b�Ѭ	���Fq9:�T\:L8�ъ����i��l�R���RL�#TJ�C45�%�t�̹p�)�Ac��BCu��1�b�_��Q�M���V�p�$�s�V��G|d�۠a�%
-_gt=S�C����Iq2.�F��"�g��$�搄��)~ē@���#���E��(w43ʒbѪhی���%�s3�R^���8���5�&MS�B�T�m��ۤ+�DT��f����/4k��T��u4U�K�U�_QdN��T�roìO�~�dK�J`5!�f�@� ���ъ#���h�]���構3�
խZ��o �P5�� ��6`�{ ��䢠�w�	���}?7+p0]p9"P���q�U�%��H�O�^hĤZ��P��h[��O�Ǟ���������R�������6����2c�P�V~�qk�d
KIbf����:k$�{C2���(u���Y��:+Z��dHٱ8�,����<
���,bS�nXv�����8\�A�(Im�,����y�U
M�ʇ�.�Oڍ����8�s5T�16��O[�MC���%�a�~�LT6>�HH�i�������k�@IO��4��7p����Ʊ�Y��=ŝ�Os{�����`�9J>,�r�q��"��V�&�mB
ǎl��n/��)�Iٟ�)���Jѭ��t�>�K�������ο~�N��,o��8�hS��ա��6�j�R��l�`��Tlɣ��#�k7�-�__���˫��Wo�^~�I?����A��������>�Z�ip
I��p|�p8�E��f���)?I�V�M���9�Τ9\������'�����,^𥉽�l����_�>΃5�a��Y�?S��nu��+���dY��C�I��%h*��dU�58ϣ�9xx{Ǻ��9m�)��mtUo��eiZ����܅����D)���ć]?��@��(	-�zﱸC��DWZ �zŵk�ʁT��o��
��+�Y��2�Z�]������~q(@�땔��n$�!��%�=q�Ӥ �z����!�$WM������+���]���(@yV�m?�1��m��¢M����{��F���A�„Y0�k){j|{�P�-RQ��2�7��ޯ�P�������"8gTx%�a���6W�J ,��pG��`+�j���$��H\��t�8U���Y�-+����Ϛ����@~���e
�I��.�h&�]��	���({�<�
��0�ں�s7a�K{�6�=��}GU7�2\`qa6ൔ�rqvuvtvj�c��x��D�ͥ>t���fe�Hxr;�3@OS��=K[4��=�ƥB؃�e�:�<�}�����v�nz/�A|���J���,p��`���P���-����ϭц|��r�	�������+W�̬N���4��}�������a����z��[�I�Q1d�)T6�a}i����5���s�������	�ŪS����P��Y���:``礒�lr����42��	������?ij�C}�;VG_]�
3L���75��3$��E|�W�ݥ>�'��5�	�ؖl� 0,�jV���R�e���\��Ț��*�]�s�3�vUd[�rKj��M��J&[�nxe�}�)�r��f&	|�0����=���Iڞ8�Q���@n�o�
D���_��x�+D�-�牵m�IY�3�t���$���a�H�Y���z�&Z4�Aݰ_�=ߨ�����jF6ø}���1�B�ba�{�'Q���\��\nl��X���⁦�%!��e@�|W&��ϰ��t���RD�����d��Wo>zxsTxk�Eo>$��,7�'<�j���{�0,��S�ub�B��e\�><�c��nΓ���tW�߆1,p�ټ]�S �Z�[����..G��$�.�*7%X��}��vͮ��Gm82���u�kNG�QQ'g�t%� �)8}���g�r�#�kVS7%��Fp`5�&�R	Ɩ�`�w�&�V8�����6�H�ֲ�s#d�%����h��M��@I�A��%,e����Ǒ#-m�k"Ġ�l=���U��҉M��,�<�	�N:��X�`h�fPJKi(M�$R��Ę�i��Ge�mCJ` ��Ly$�!/�k���32UAY'�zS�>ā�]���/�Gc��吲�g��(M�����ݎ�,�����	82ڔ��"�p�:3���h�a�!<Nq3��,��&c!��7bŭDÉ�S��v�VZ��20
bNh�7����x	*����{}�F@h�'�*�6>�*��zP���z8d�%�&(N�Jf^�:������vL�/H���G''���(����R�hn�z����V��5f���xy	��&X�y��Č7���p5;^�8��^��Ww�9�Rg���z�Q;cɩ_8������`�B}���"����ש��bNw��2��‰��ՙ���?c�0�q�~5-����x֎�O��&8>�V/����Fs0fI�jM��݂E	S;
<[������UU�Z�Ҙh<��Q]#�<rXz�Bh�h�Q 7HIЌ�K���m��tdh�x�����s
���!e�\��p�-�RF7��X�t�0�HL�����bI�m�몃����J(5���m�J�
�Y$��fqTOl������8[�����	a�V�j�QS�y��#�@�Ys��E�޲~h၀=�'����ԣ(�	��NM�R�RR�7�*2>+/��7QH*"�5���t\mZ$9Vt+����r���5(e���5u�n�o��%��*��;���Z�Ti/o���
r>���I�.���'µ>���[���i�,K�Jהi
j��EL%��@s|��G�E]I�o:�G��<����4������G��>����ӆ�zt�(�4{��h �$ѩ�F��Z��wAgî�8�=����J�%���pz���l�D��S�QS�KP��r�$�*z�S��{��dI[V3-υd>D䬞
[C�0�П�]��������:hV���<S㚝�ٽ�(�VmYZg��������d���&$�8H�k����!�P�Tc3����2�1�?�A��#S!�G�
�OlbA+���Kf��s�h�v�YV�_fb6�����t̸��J%�g�)�X��Y@~"�<���e�\�uf1��p��H���3����/FΐG�E=�ʍ��m���g9�*��(�Y�K$c�*�ZY7���hI�ܭ��KP����uT
�fNkl�_�Ͳ�~KD��<f�.�d�I��yn�V�z��U!\���j�R���4����i.e��)^��`���6��������8�r�ڔ@����^�w��Q��1��t��Η6U�<�-J�]b�#Q?������q-�}q���y�.�y���bRN�%9lm�z@�woCੴ'_+n�p�H���J�X�����ܝu_[X�痗�̢�
��^2z�"m}M%a��]�r�N��;d�N��I8�j���y�w��iq�МQ��6�< ls�'��ē���">qjѱi��3����<S����JX
bC�k�0�,4=�.O��焰M"9%�o!)���
�[.���h�z�[�nA�+^����p�w���R��2�0�[4*9�<��_A� ��x�v-&��Ͽ��>v���}���W1^@�W�$`�8�X-��Ҩ�b�Y
.��R�*��T-��<�;Yk�彚�w)�r��DE
��w0,MI(��U�s�i�S�@eGDs�d�vi!
W�k��E�+jx7�P���@�ƒb��űQ~�գv����`O��IþKIH�N�G� }�
`" �捊˗�
�P�fm��j�<�%I��M�������(l9��(͡jMe���t<6NJ�k���'_�LXm����E����2#���ƻ]c�I�H�*��QvkJ���)/��-�U	d��`��ƛ��]mV'o�tD[V֤�oGm�am���Y��N`X0n/����1K��̓_}�ݯ����?|��]���_,��(wTU���a�o��q5G�:N+
h�M��t]��7�����0��K��&�����?����&5
��~+ђ9�r)��!������vg�%���n͔"�}}Ri�r�Fuڠ~Z /y1L��eug���XX�$���;vF@	!PNj֐�b�$��u��<K��7^O "�|F�tZ�ID��>A��g,?��*N��Vz�a�x���<�2����\����l��ۭr�{����a�2��[1
3��"�1eT�Z
�����Fem�@""*�A�m���Q���֛ٳ:���g�.�a�*L��0�砤uG�t���	�aϱI/E��ն �˻}̩$e�%����ud��cA�1�N�e֖��T�����W���:˩ָZ_7Io�J"րEIpV�M7�g��G�ro��XS����r.ڀ��۬ӎ����@�2e��$��T��R%�򄰼V�e��3�a��ܡ�R5}��D7|HG\�R�P��'v,d���JR�#+��Ir砬���ak��-��f-�g%�u=�l�S��5��^;�Tʏ�~���h�c?Q�`B�JKe@���˲���ș
#�0�N�F��m6
5�$r���^u��In������j2�[�o�A��pD%���
��\%����|R�ȥyA����N�vòdK�Gk�H��J]ʍV���4Nع?ĎF�P�)��;'9ǓxWd9�L� ����D⛥�8a�˂�ړP � >aJޔ=��#X�i�����蠤�p�XqH�����.�U��c҉k�l�3i�&lb�ڳ��)C���֙��e�i��U�:ްJniL��2�e�Zz����ɺk��ʜ������"<�%!���g�NM�5�o�m��n�D��ki$��Me!����Y�ӓ3�K� ؃KXM�i�1����ʫE��,��B6�MtV60���ES��Ͼ��m0Iγp$�WZ4fl�M$�M�	�y��h�i� ܏ɳ/&H�p�
QtBP��ھ�V�t�M�)���L�m���ٲ��b�@��9�����sg�x�c��!��A��jw��8y\�}�і��A�3�5e�Bs��?/W8�{��j�Ϫ����]�����������M�?Qm]�K���i�䀣P}�����@%�G�G�I"�����t2�� -q.�6Q�ؔ�#�d���,W��x�)ߤ��h�"ڧ�Rs�)�LRf�Qr��̸�K
�Lz���Ot����!ي��ca�Y�d��#�Y8/R��2YB�m�4ĭ��F�b�K���#��xɏ�-+1�ޑX��M�N�˂�n�%���}Mє?n4dK&ÌYnp��f��d��fO�\+�!��<K?/l+��z�_�
5O�i֗?+m�}?m#V�x�]lC��Z�
��r.����zK]��re��_K-\��!;�����'�-7����KL+�*��{��6�,Qt��S��q$Q�e;��1��Ӷ��L�JI*��B�QI�3���7����~V�$'��g:@ծ�_k����{�����=��@ՙz�Rd�mf���Vi�T����2i̥�z���n+I�U�*��6~��_q+�f�!�O����f��nL?��l�m>�4�o�w���vE��3��F�`��"&�5>���$97
�w���`�oO
�b~����R�����uE������f����I+o�����>��&�1��QJT�L��[�F����v��I@�/;�k�r �Vs6`yM)��nF�-�����c�N���NF����k���u���,���K=�,�
M��uD�W)h̪!�5?��DL�J.���[�T��eǘ�f�T�f;]tP퍽������U�G��o-���S��>=†X���e����T0��_}��?\{t���-�&�9_��E��Z>��N��>����K,��(p�Oyp�d���q�8u��X	��_���h<u�
�n\��.)�-��� �9��6���#����>����i�@��y'�(�1\����\�C�%$췸_����X0b�;C��46��Q���j�<��@�`�IPǟ�͋FU7;��BmW�&UͲ=�*6���jpczdRۋ`&ݍ�?х5���:��S�/��ߊ�����C��?Zٸ���0�W��fQ��
�TBZ��G�z�_@��Ť�'O�����[�����S�C����=ET��頿����8�p����`�G9P��d(�>7�am:N�Tv;U��F�V2=5@�o��c(��w!fJFk~�ȢswhX��@�Ͼ�v���������ޛ�_ۿ��U)$�y���r��N��c{�����c��!?�����p�|�F�i³(�O�);FpSt�k^.�'i竛f���G����x��������kBk���࣍[J
$�۲y���G^ ?
tE��,�z�����2K8�4䋨
�b���5��R���V~⊑���$h�E_�%���n
G$�Yl��&H�Ж�ގxX�~ҷ�(]w��g�ma���>	�
�b���D!�扺�j���P�Wu��z��yw�ޯ�ԃ0�-,�9��[��|�;)pf3����!
���N��V�~V����i7�7GW��a?��F1��D���r捗]íwD�}��a��V����z�`kK�ydQ�^C6/��U�u1X��Z����,܋hKz�Qc��x��̓���"e�����#��_�gm��f���+������Gw���-�ư�y��l�S��`8�Z���N�@9X�ʜ������j��y���@+X-R���[����V�M*Rv��!=�ee��T@��?�����|��_�
�%��#�@)�J+I
�����x;�V
�W�/�2��,�g���6����f	��d��M�*��R��+���\�ps3@/Y�v�Ա�A�L���Ax!)k�(6_�\��J�f�X=�N��8 ؀�`o�p�i9)UB��]21�W���<���W�"M\H�Bu�Ձ̏���*�צϛ`���T`�X*���q8X�ş���Ek�v��8���,��S��Z�-w��l�8�6�{�0�h�NMm�v�lmM=x~\�;�u{w�c}�c߲fe���!��I���B�{2t��Z���E�O��ij}v�����B�-��#�L)�& �>֏����8�8�
�	������#�k�P�#ӳ+��j�;�Z��^y��f��?}���ՠ����Ʌ�Qx�M������l���W+u�͌��,傓8=̀�B7�K�jۭ��?�W��*����8^�7�s����Z��8��"@�"y�C�`���q�IJ`��C
�ڪ!6�}	��@x���=��Bo�CEa����(��ر��@I>�l-^��P2Po��`�y0�
)�7-�;M�5ɔ}�%FVAF\��G�5�޿�-o��c�d���u�o#����}y�dͥ�)��������۝��ݟv�켒�� �Ic'A��,b���``$�)�$&g�;�Q���O��iQ(�	@A�r8�;�fEQ� ��
(�Ϫ�Sv��a�Zl��������Ј�8ݮeW��A��`-D�T�4�qŭ�<�0@`G�Ӭ�הp7���B-5�F�a�ײvhJ ��R:_؛�9esۑ0�v�~����%�t@��k
�X�ze�p?�C�~�\�<8�4�g�&Cz��VPD��Ԃ6�\����ǷP�i��J1F��mT�\���o)MI�^Dp�,�_�\��&0epy��sN_R 0�-�<�p���Bj�I��d��;.g��w�;Z���j�����.�)�Nl��8��WnG\1��FagK.�"
�2��Upn��uo��L��^ ف)t����D�=-]���4�Z�\�lJT��*�����I�P�%���}��S:�'��롋T�S�,�g�;�.�0'i�̯���5��U+ut<�B���|�=����7�֬�t�A�{oaTU��Zt�֨�Vp}�Z��l��<����t��m��F�@�7�MӘ��~Y�?�
��L�]h�RH�B��{��)������珙ƌ�e��]�xm-�����9������ڥ�C��{*G�U�a�#����`8����M�fQ���<*&�S6��)^@�Kد"�sD�/`y��!�"��E>�P��(��"4�u�u�)�p�X�<��9�4n;U
	Z/�t{����v��1~G/Q`㗨����ptgU�P�#����"��ǿ�WS�X�m��,��4@��W=���� �jV�Ȝ��s������N8��=��_{�
�8��RϿxj�$�v�;�ڝ��i�3_�8�gee��|�����O�W���hP�#	���揾�����û�w��Sο��������q�ww��s�W������������οI���l<Z����ο���C�b@9��د�|�`,U�R��T6pL+N����`_N�[�R����\�,6��9)q-�I�rLI��A\T
K�0
U���l�O9K�N��0JCa��g��R�T�^�S�x��׏��-�]=���
N"e�z��`��{0B��L.0��8�j��ی�����vM<NPՎ���˪�� cPS�N-4۞^
����3�0%��d���&-�"��ͱ���#.^F����E�̙�/8���D-tn�	�a7>M�&҇f�#��s�Тw&�k[Y_��:T���Y�lm+�L�]5�R-	��	�y�ȴ.�����d#���;o��%�^k|����b���Q���3�=�&Wȳ�𬄝�e�tf~k,i
�^�����&ݫ5�"SL�厢�[�l�۾����$s�sھ?"��mu��c����w��7p����Vͳlؖd�v�~�6�UN�`
O'�iԞ��sm�!t?�
4�\�F�y4J�U���i3X���h�D��3.�Dp8�+,����f��fg�Jon��qM'lq�fc���\G�lgE�5��-R��][�A���y�^#��%�v�J���+��C�&��ǃ�ۏ�%~����4��]d��g��iGս�V���_eѺ��o�v3�O�F3�����W���q/M�"C�Ǥ�	�D���K�&��.0�w�Ip�Ska�"EJpnK�9K.&G�Ӄ��T�	�~���@�Ź򪩫Ve��a��`�C��&�e�H4���ֿ�~�yy��e�r?�Z��/w��%�˓���ˀ���\��H���E�Ώ{�ч���n�wRUC���E�|Ҹ�L�4V��NJ���0���T,#�G�!y��4�����F��*�
���KN�C�5�EB�n(��٬q���WD 9
q_׍�Ȫ�C.��9���N'�.��T���Wan�q��P���<
�I����ת�^V�b�3d	ƒ�>G����G]�'Y4J;�n-�hx�ee��E5�>�D�E\#�aI	
,�;@|�rZ��:�D�J�<��L���@M�.zn	��?�Qf}2!U��q��g}�&��ʞ�	�qd<#\H�yc�\Wd��Pl�|5�؁�!��bUѽ����źh�Y�֢�á:.�Ti�UlZ�J�l��Z��"��W�H�j�^.Z�B�14��	r&}i0�R��@B�=���H!W%H c�^�t�o�w:@X2.m"�N���~ϔ���c�S�+��O\ ��.��S�>��_p�Ʀ��־��d����r.�+�{w..\�+���[��U��73L�};���i�@'M(�w����p	c�������E�|Po����(����+'�5�E����kzrmp LC����[�;>�>xv�L�"�!��~>x���9�}U��yz�!�^�I�q�F��1B�+�+�_鮓�F��xI�B6r~�X��b�n�hX�W|��G���`+���u��b�s�5�_Ag���Gp�޾j��������o~�h���3�\UZ
m�\�R��N�V�ZLu����H7k|�5���j�W
p���%$�`po�!�Q�ݤ�3�40��S)ukb.\�QR=���hk�L��*Y� X�leI�̢�*�SO�D�i�*#E�(Q<�=QJb��_K&��J���ib���"WՄ�e2{>E	�)z�$l+�� 6�O��X��X�c�"8�� 
cz��yFl��}��Vq��$e *����
_�^,u�햺M	zh4q�-����zW����/�P����S�rj]�Vz���E+ꆫ�f�y,Q���d�x�J'��Z�A5Jʢ��j̶\&*�P\A��b��J�Rqe���M_X�D�_����	�\�h?���+6Ք���Qj�O����(��c�YXXB�!�Wu5p��Q:�딫�&T��t�(hAK�[M<J�$1�ݰ�53��3����/Xa�DM��gHtcs���>��Y9T:��9�)�3��X ͧ�.�Lѭ6SJ����TU)6��wY��E�4)u=[�>m�*үϬ��1<���xi�s:��)=�j4T�S��0,>�E�ʇ�����h�Ηq4w�h<Ż�8�&l�(z(�ʀ쑓a��)<���7d�"̤��^��3��w߹��{�c�ϟ-�ú���>�#;��]���_���#AX�Z�7h�#^G`w㓴�N.���"�D`�*�/Ea8��XX{�fp���*o(2RϵQ�6-F񵄕�J�&R=����.F�VK3Lؤl��!�<��9?O�q��יU'�m��]B���W���KozXx�����}�UV_��p���C�	�q8�rnen-�M�ns������e�����T����-%K���iSL�4�isBdkFHSrUY��4J�F�r�q��1=�u5	�[��p�_�m�P�F��_$1F�V�yB:zZ�钙ƒ9�g :.�a.���MJj�7*�2��5�ښ�eKHm����s�Z�aX��M��D:*9��"�7=�[�	i�o�'G���q�(��9�j����0�:[7��Sq{:�~@���#R_�>�g"�
�څ&�TH��pJ�E���t���k���g�����_�Uz�o����޵�N]a���HD�M[��%�]~&C���%��ğ��(:��<��9�T4��b�ܕL���)?4}��N�5�
ws�}.�mI\	5̊���a2�r�c�������J�	T���R���[�R�F3i<�T='XJY�m&�S�l�;?�����X����b1�I���6ϊJ�HqE�^wr�
1Iؾa
;��P���`�O�E�52ۀ<���j?�4��B����.w?��R+�a�"G)q4��PS�R���o�-�V�|�����������w�_ߤ�Wy�7�&%|B�œ$;DyH<���d
K}�	��u�n�J��ace/�A-1�5H2��Al2O-��I�QVK�`�Rq�V�c���v)հ��$��dig���
U��e%�([�x_��ݣ��(([�����=��գG�_v��)ܺ	r:}�T��H��p<Gy|Ʃ�ic��8�BO#Y�83&he*�Y�h��瑂�[8�x�GT�>����w�m�D�;��odeOҨCL/��;b���-���4�!��L7
�J������^��Oi)-����fR�F�~�׭��v����X���|v������6�Hh�
=���][h�E��^.��7��%4'�T��3G7�Fjhs;2G��?U�o��C�4o��j["��mz�{G�7𩽻��B��o�ς,���#)��Oؤ"��\��.!�;��-*�K&%���+=�ab=��#ǭ�ǚ2��զO23&����k0|���<��h\�D���`��9�L����$���&+"�)�
{8$��7�F�}ats��i%�6�0��n�B��y���nb=�#'�$�X~M�<Ź�I��Ț��5�����1%$��F���ZA�L~��ξ�;���Td_q��f�%��Vaˍ�1�Ș�1+·�Y$��.�@jk]��X�W�
�����7�[Ji�-\ks�W_�N�)��&�p�|���ƣ�|��]��7��`Zéu\�1���.����o%� ��R�G�0;j�Q��Ƭ �i^�+M�
;�%C�j�W��� z)�|�B�� ��d��%�@Yj$��FH��]��d:j@�_��1q��U�8 cf��h8�tĬ�"?��y5�(X�g�d=��(�NU���)�t��[�&ر�elb�e�Qeˮ�!�Z�KyO��VC�q#צk�]�#�#B�<�b��&
�O��<@ͨE��}Y`�.F+���w�Y���/z|��
�j9�k�谽������C�Iz���
��,^�뛊I�~0Vv�\�sWcSX\�ݐW7h�I�B��A�9ڹ\�qr�o�[SD���sXn
����� ���q�^����	��S���s_a�jgn^��[�����8�w�]��G�
�� ��䐾P���a�湏:
�s��/l�<Ӂ�^T�I�C}ԓ���v|��9�K�..�S$�gd`˘H1nk�*#ҤR(�=:wy��oq��&��zET�PL^���7��2�Ue97��@��w}��諒��cf{U��QL����?�I��bDᮔ}Ձ@̾��;F�)7�K��!��I@#�
6mb�Â_��
��n��n�+�T��w��jQ>5TD��?�ش�/B�`R�iγ�D���0�>q>uj�n5\��P�t��b�]�_tD;���&���Pvs5\	jɐLf���BOW¿T�<&���'lkCT1+�k�4dz��!�)UU��;�TU_U+���9!AV~��S�tP��Ά�v���%�NƆ��{�q��|�.��PgL����w�)���\.�V�z�h
s��Ϡ�|�a+J%��|��[{��v�p��ޫc��n����ể�ϻ�/;o�:�7����t~�{�KH�axD�]p��1)ګ���_7:��ys���~�l��jO�m0�TV�j�V_h��ةY�ku���[ԇ��.��Rp?-���,������i�
��(2��jf���Wr����a�?��d+z��ĖY���E����ijDYE�)�n��t>%�^��j[��0q�����B�7G��j6�G?��Y��N�������D���|��_�بRSib ���n���{x�Bt�
nݽ�
8H�	��h,��<n�LN�p�k뭇߷Vւ啍����S�0hr��V��++������g�
�r?��T��}��~x��yAF����Z�l�����I�Atx���o7t�Ob׳6�1!혫}�w�v��nW�v.��7/�*�Q����.2m�c���iK�E,��D��0���/��_�•Q2m{��p����%��%+�݉�p4EKTAk	Y���Mŀkn�]������.wG�&���:1���^�)�6�XUal�3pgYt��3�-�BK<2}΁�h!��u�u���P�"��"�OV=�l��2�jC��[(���n50�lj�>��p��Z�ך�A6�E��n�=��n�/��	�e&ڡ�p���Ԣc����ۉ�T��ϔK�2ݍ�
�aׯ�$@�-�$V[qCA���W
u,x	�l��{LG�?-�v��Ke��3�D/gv��K%H�Ejˠd���W�U�`�\u7>��X�m+�J:=����{��<�H9
�\���FA/20���#�s하v��䆠���Dz����>�JnbhdQiv��vD���ߑ^��C�3��p|Rc
�X�&�SY��_�ƪ�n�b>!�Bkz�����*�����_Z�_��n�?�V��;��b̿�j�8�{�����࿣+�ı �*��T�����L_Oγ�bD��h%׏�+�$�<�.3xa6N�M>��Q�6�u�~x�$?��g�����?�Ti�K�M���+�U�m�����-��w�	��U�(���d�ĺC77U�.�4W.��}⇒	o�~�1�q|Q
�b�	FR%��O�cY�	=��fA���(��
�x�8���Ǩ�EV�Jw�N%��<̈́�;�"�9F��R�.C7J������%iu���V�/lv�	�
�_]��ӛ;����X���'�z��Q���õ�;���T�w��Bc~<D�'%M�yPFe�wr�<L���9���2><%�m���F�zI��� �8!�=�bH1�+�����
�qt�Ӊ�mӃP�
������Zu�}�y"$u���Fq6l���o��'
����xf���W6P`	^�؍{Ž����d
^�*�%�pC�G�!X�T�ˢ�
m�Z�t��i�/��	3p�
�L>�(���q�y?�ЉK^�-Ń௃$;K�0���k��SO�;��)�¤K�/�`��9|���n�6:уe�˸���ED��V�����W?��/�$I�񎴛��w�ό΢��Z5����̄��RdUBy}���������×{Ϗm�*��/�e{�y��B�@�"K�؅���?��ζY���G.[A���z�l��q�f��g7c��^j5��ZG<:���Y�ϵ��0���{/b'k;{��'[��/D�ň4e�=���R�Lh����Gt����a�H��lqEl�Rvv_t��iw@�|�Ҳ!��ٮ��s#�E�55����������睃�7��U2�|l�褷��ښ�Ϊ����7=?|ѕ��''�r�_	�����zY�h�����]]%6�w��em�i�W���cec�f|�$o�S䖭�� ��i:�B4����ӓ-d�%�
Di��T��Q��
��á	,�{�S0�_��^���(��Ț#�>���h��|�f�Ǧ"�(�π��n�"�m���|��8X�K���`�8$��u��XUO���
ٍ�VD��!��L;O%a#��JKɷ,OՐ�8��A
�{��Ȋ+x�w�n!��J�`>�U�Y���AB�1�[j)���,�bz�@��`\%�m�!W���}�3��܄h�z.��(��w��Y������h���׷X�G��|�B�21��<n�39�s4��`�q�3��s��s��O+�����z~��!����	f�[&�S��l��uUj���r�P��=��ϝY�_����
�l
�}�Y���$`V���
_��p����&Ͽ0Q����oY�_�j�f���aU�x���o�U�'<WZ�[m����•]����n��j@�Cld��F�Cl_��98��Ī������>��y��6,��,k;�������Vd��~�|�_y��<{��L�Oc��{�y����Q:�>\�Y�r�,�f�x�(I4B� �7ez�_ow���K	ՠ9t�J�?�`�	��yb��리
�Ɋg6�]\TI	d��0Q��O���;�~t}�R#�3B���W��6=�_i��;
W�W|���pw��>�_���7���+>z���#�Uf�����W���a�ϔN5�x&�$ht�%�9s�jU}v�~�������дEuy�lf�'�#�W{?��ޟ����W�o�M�*^L�����<r�� �YGm���B�.o>�����>oS�O��g饘��p^���n�U�α�$�&�A'��}�/_�o�1s�Β��fm�~�~��?�o?{��6lγW�?Ž	 ��X�j�߽:�}�����<��o��O���q؝��Y�w
�(<��yv���K	�ǝ���tX�9x�
���=x�~^6�8�3;ch�w:M ��:8�;.�:^��fC@)���v��Y�HV��lt�s���f�C`J_<a��S@0��zn1} ��Q8�<�0�7
f[��4��>ow��w�}��J�8=��B��(飗hr�Ŀ�:K����!�
3�`����G����I1��,n$5��=�P�$����^8g4���p̰�
:I>�r8�P�����l�������2��Ê�yBN�������v8+ 9䦹�#\�:��׾k��_�t��_�3���t��U@���#��룕G���3�G4+��l���I49�FA�J�C/�&�);�
'���:h�Q~�4]ڂ��rD���l*b�Z���?vz[���c�9L��
h���/�9:�\���67G)qF��1e�~��A�g�����-����:������w��o����Q*�O%��[�)V�܎��Ϩ�
��;���dETYޤD򵨐�����|\w��hj��E���=���N�'ϸr���T~�d&s҃���B~��e8FW���C���攲��&���hl$�K=!��J��J����(c�\����1����=u�Q5Z\p�}u�.�V���90,�B����ڏU�?��8���`a/�	�1jp�z�����Yv#���D�]R�N�\(YA���B��n�V����^M��5h;�n���n��Z��)'DH�������;�rZFEG��*���V�P���8<�0K���5��'V5�,~�U8�Z�!0i��eB���� Q�.7?У'��յ��6�;���[��6�&N�W�ů�:'��
V���\��Fү�a�S<�
��l�~߂���E�����e��mf���d���_�$����Q��hPd��!ؚ֪��j��t OfyV��9��L�u:<LP,����9�����0]�%`Jҋ3?�1�������2��,�S��4�#�A�FgJUcH�x�S����8�y��BVKxY,�G��*���x*[�n��X�8l>6�ep��w�n��[�.��I<��ho�w��E�eƩ���Q'����L�����7ucUY���xt��ŰG��v���W������y�)�u�C�6
�n�����Ð>2���>�sbV��+��6��ߕFEU�F�D+�dy������D�i4�ھ���
���|�10�Gkl�79!E�#@p�j��LՓ�H�q_Aqgv�禎=�w%ף���QQ���Ƴ\��)��ZT��r�k�n5zJ�IֹO�+�~��=ё�
���g�^���k�Ю2��]��tSN�
�������M�2Wq������r��
g���\��͑�\��_r:�`p:����7P���	f���e�2�c���/� 0�{���hV����U���p�L�G��^��%�Ճ�Cd��,��AuH�l���}��jgem�P�<5y7c?|��P�/\��~�Kusp���;�B��A�h1z!�[�ުdƔm���:����KCw��b����2+�9������R��3��=�_M��O�{Rzb�1!�iW�'�(J>ə�x��ҙ��d<V��))=������������Am��~��tr0�a�i���Ĩ��3�E;U(� ]񐂎�����$����/��mÈ^`
����Z�� �v��\��o�v��;����#N�uԯ9G��\�4�/��
^2��Ȭ���9ў:������h�C>kpO��L���?P�L'c���'�}e`�W� P�W��''T�5t@����{�j�ݫsS��-��b��Q�0�����R�)1�HK�F��'
_*�Ҹ�i�0?i�*I��l�:��j��iyK��N3[$F�r�f�5�Q�Rx�]-SB2>�pl�R��D�Kn�ne�l���
�}�R�Ҷ�r�+��`La��O
�P���	N�M]h�p��'d��,\.�R�e�ܻ���w����gQ֡ut�3�M����/�5������q�^8S%H�n=�E���k-[�����S|�ȫ��&�C�H���]Mو)��A~�\�`W�,,m�	��q�9�9��)w������)ȼr�����J.�c�߷d��"]�z��VE�ϩ��sq/�G{�p��;e�P�n�jm,��t���@��ޡ�T=�{)�o�s�������)�;��{.��{R*���Sl'�&�0@�(��a?�$���l$c�bA!+]\�ҝ�fl�'J����e�Pt��<��\/��7cQ����~��Qo�9=����VM0�'�Qp6�O������f3z�����M���R�d8�	ݪ��8��;?�;E�އQmn.ヅM\�'��mO��&pO��a�o��<Gd\&Ap�+[/mό@,Lj���d|��}%h�l|��$�m/��/�>��?>k%���?B\(x�-�Ar?��ɘ^��4d�&#̝Jm�CC]���D?��0�&����f��b9��l�~��#��&��k�w����o࿰�g�׼����׼��'S�Zv�f�PIlTC�o�����{{��7ejNM��&�%��Bu�9�BE(�\��d�'�0i�S������$�ϰi�ᑊ	@[{��o�k-.�"2W�U>�trv��^yZ��f�!��q֋.�.	���I����5����պW��������ܰ:9��8E[O}�΀�U��:�ؓ_���i�}Mf:<��3��0��)���^@j&�NQ�Hq?�|Q�Bd���m�Z���dN`�Ѩ�뷚M��f��J��UyD�����#e�	��a;+����Tşp�RI�Q��۝G۳��Q��*X����"��"�|��;��Ŵ���"tE[�QP��pϫ����a8�/�,@�_d����M;�1��a��tX苼UmYtK�x�4B�0���S�G�u��s�5	.�jA	%�8"��=�#/�+�7�h(����U8�1l�Ar���sD�B�s,(��X���Hp}i
���ì��*9{��\e�йZ5ɛai��3D|���$�H�I���;�{:ݨߑ�tdz�0�n���C�>G���=	�t!s�SF���נ'�-�v
{��d�wJIɓ*#'�n< ��3;w���|��ڔ����P��� Є���&p9���
��9��oS�az��F1R��H�ә֕O�R��B ���T8�����S�7:���3
6��x
��
[w1��j��jC�ٍb5!��)4�۵j�Ξ��{f�< ��Lj�6�9�H�:�� ��!��
9�Y���8�%k��c� �Ƶ�873!�/��4H�]��HF�Nb���l�F��>8�v���Ʀ0���ߚ�J�z��a��y�;E#�pЊ�ҟ2gs`���c��|�v)8ʭ��q�yA�$e�Z�ą��d�$%��U���/?X]��77�O�ŏ��X]7Ѡ~T�FTA�yQ����0��k�L�5.jgH?_Ӕa�k��gL���a'W2���[�᪘�o,�)����rP���(X+���2��H�� Gpr��"��[Mps�*���&�	)��p�)�Ѳ{!��$"����K���h4L[���=�FC��jo�K��'�<�K3�3	�b�n�\2�-�a&.��
�-'��84�7���Y�{��m�@�D�"B5�m������ϵ�
�.?��u��CJ<��g�&�Z{+7㌾��f�)��bK����8��Ʒr+��V#�4���y$�[)�����]��H
�z?\=9�6�U�v+�D��I�Y�߼Vo�7UoV՛c5��4�MΣa�w�T�8��dM��a2�b�7Sʖ�2!��3�rU��Xr��|4�%�,��lV�[_+�����ʝE��������3����7���}[��~r
k3;�֪_%,�һ;1M�����&6UG��n�������p�p�b��ݼ�:���jU��Er"&2��۲f�Ge��1G���O	�^��yv�r�b���Ε����d��nf�7�b6��tB���bƗ)
q�����R1Z*/��Ӓ�5��Oqa8��ui��ϴ����1QrɄ�dDU�t�3y�P�7�a�*_�㴨�G����x�p�M7���(&�<�h�b�0b�xL�R�(�h|�F����w�;nv��9�*
H�ZŽZ�-������),���ߪQQ�ޣ?6���fʩ�8�҄��F	�p��K�?%9�xɿt��W��N.��A�k?7�I��n*���yfF��w���p�ӝOp�}"���͉��s{�0w���� ����f�v�����`5�+I��1@��������w^z	���ݕc�F(�4<���\��0�s��;k�ª�l=�U��4�s�h)��-<�?�o$��^\[i���
�o��6���I�;�ku��F.���;��o3�˜���^1���hw���<M?wыG���D=2�:E�\�An�Ar��z����u3K9��+6ũf�1;V��ߋnD;��G��r`V1�I0�#�YW#k(DH���=v�C�"]�Gio�C��j�8"�j'Hq��4�dަ�I 3&\
y��*l\G4�n��Ak�d�{g���
��������3l��"8.U�.T�+?P���kx�ƒ��.��L��Fxl'��dDr]�Z�����A�GwU�>D2sY�|���r�ǰ�
���*_à�O&QH8�˸K�*��Y�•Wk���ݞ��O��(ҡ��*�E0a�{`���s���3��жdc�.�|2M�%a��{ۄ�j�&��õ%�G�pL��0��G�q��L(M�1�K��Tec��e2�Zs�co�����1ۢ6��m��w�r�ݫ�X�d�dr�
E
I`E���+��R�����CL.?*�̮���=�b�v�)��]�J���O2F_�1�H*�ܔ&i�Cl���Ў7R�$�+�5�=�/����7�#�{��Z��c�H����U�3��x����ݒLB��ݕ$�B6za���ЩV�i��	o�گ�B�t�������ڷ��m2r�!g�k �u��c"�̠�/#U������Q��rz�<��*Y_�ь4[���.�G�
pjdy_k�@��Z3o(b���q�WƼ_�����*Ulu�i>2�f��|D}Fn!�U������=1{ĝN�Q4���p��ĕ��*-��UI-iVԄKYc�‘Tn��1��5���,o�Gq���jdw��-��C�"$.�#��}FCu��hfHь���Q;8`��W����l��0��0�=��z5����cZ�x	P����;�H>�o+�H*(��wZ'�y������-�u�j:���P�JG�3ˋ�
Z(����LS��3?R���s��Q��r��P�}�~��
�k�5�����~�
�9�!?�"��ZsG�)��-%hَN�g��6�чXy
j��@�v�����&ÙuI�BT���9�!8��<p�3M]�fv�ա��S�;�c����b�S�S��8��>u�2��7�qښ=
��<Ү j
���2}B�[��—�����`��ݗ�LI�Sd~��T0w|Jz��h�~�e�RԹ}�m�(��w��F�>g��I�O�	h�I�����_
Z���W�6r�L	~�����ő���hTLl)����b�l��
�}Y�!$��z�Zi���w�3���;w�?�1柙���r�76nܝ�����0�/�̩J2p<�D���s.��x�~yN���=cuN�t��{rB7�ǃ�A����_�!��QF��f$�hp�f��_����Z{�RIU��?Kz�D�8���iB����X����5���I�_K8�%KÄ9��W��~n?�
�?bY��GX����ݱih"��8$s12�e�o�{���/˰����IRՔk[*�.L/�P.I�s��w��Y+��ĥ�E\�L˿�^o��^�&�4	���1)C1���\�N�d��y{FC�8!~o|���]m���,����ϖ�����j�Β��Je��Vɠ���T^��
��'3��cz�2�WQ�v��(Vzz0��n�P4���u]f:O�b�yw�����CA�OuW�~���F�CHl�wߩ�:�‰UQ���l�c�;�`X��P�u6_Rp�(+cS�Q
#�"���&��B�)�2���,FJ��!cph}����cK?��y��[�`��ވc���k����%��@�jI,E�T�K�TӺKt@�*�_9�x��cP��B1OG��9]
�du����6��bt���0�)L������abY�*Ļ/:������p���Y��@8=�
�Hz�%1��h�"W���O��<O(sqa�[L���p3[��oLϽ�@y��ǣ�^M�t��?\<t�[(���k�?��o�U�h��۬�ok�K����'Xn!�q����`�9��e)���������`�؜
�s��h�8��*�@;	m�,3���dZE�X>k�����T����J>�����N�C�PN�
�������MeV�u����F�y��@V�>=�4�[�=[^��:��[����3ڒ&G+����sY��G!��e�'��,�U�P�5o��	+GLP�}��x����^lGI����?FY�Kn)����5��k�_�[�@*'�	9�S��*�:Dm!O�m�G.���0�o�&iͣČSh��V��$%y��`ZrٔX�ܑK[�%�
�-c�S�c�N䅩
�z�m��k)��U�xeԭp��#��s��`��MuL�v��D4�NƦD�����K��d��ok�)�9 ��x�|�wz�7�������ƒ���/+�h�:��z�D"Y�d�>&��M69���s��1e맏b��4&Y�`�5!�l�E��e1a�y���_�,y�6a��Η�����r{����Bɼ��L]�DӋc�An��������xJb�֘���C��ؾ��A'ES<TȆ�~� X�nH:r�|�Xh$I�O�S;�~�/k
�����I E�,��v8�-oq@��^�z��W@�=6�� �2g�z�}�X$u'��o�D�p:FÊ�J|����ښ�����������7��VL����\wA>w:Խ�}���*}��̩�z�t�ʍ�c���%Q'��K��rNψA"Sч��X}G�F��c��|L"�F��Q�(�VtWy&{Fw�p�sʣP#�e�D?����#y��@S�z�)�/c��n�9INŽ:��{E��9E�˳T�'C���s�#������g[� �s������S쿫+�������;��7i��j�Z��(�E�f�Q�	�h5*��$�p_r�
0�+���{���7U��G���ݩ�N��61�ÏG��|�>8�n��{N��qf%�
�B;�W���PA�-�1_������B�ɧ��g����r���ʿr"M��6��@R�2e��I.��9�_e��b�MN�R~�c(!��hH�+���	�%������m?#@5�|�q���2�GTf�ѱ>G̬[+Ye��a2z)M�w.��&M�2�N£����3K�N�ҹ����ޖ%��
P�7~H�6��X
{s�M_*�j\/��r5-U���J����y����G��ѕ�;���q`Ge�Φ�w;�@]0g[V��@�";KNl��J8���1��\�SUE��Eg�S�+w��&�G��:c}"z[/�n_5�k�{x�댆'�8Ƅ�V;5��1F�<0/�}ٸ��PLX����C-�8��>���
�p)�*T����7#jV�K)�/t?9��|��4qg*�� t�f7*�-p�����p)њ?��\�w��|�C.r��E�n�LU�τ�c��?����
�ze�c���M��H_h7j�h��ş����x���͂w�\Ol�\5|��Jr�;���QL
h�s5@����^A�"��A�z�[�J�6�R��g��;(n:ߠP�7J{���Aן?}��9�t\�+���)lͯ����͚��c4mD���r��A
aF���6]v���u躠��$=T
ƣ��ˮ����T�qbēɚ���t�q�1��P�9�zx7���v3�����y:��{���k���B�G
ae�y`��,=�0�P�&�ȣ��KlZS��Z�ăi�Y抱�؃M|<�
��7�L�`l�g��g�:��c�U_t����ڞ�p�|{�w�ٟ�\�Jh�eXrE!W��!g��ہ�i-��w��Z�`8���{��a�������������N������l_F#r�z��}�IjUҾ]�GN^�!C�}\fѮ��yr��u�,�f��u�@�k���^˒�9�s3؟�W��4���λ×{��`v9�"���Q4l„/����<��)��(:Eg${�P��pU�
8�^BJ�K0
��@�Ŵᱯ��s�3�n�d��J&&��6 9�b��jX�c�%�e$s���<k�k<�:I�^c��!�AI����~��6��x 1M"�TĞ�!�c!�'���-��8��3c�0A�8���M�yu�^��\֋�O@d�T5܏�ѢNz
�����YBfg)̩��RA?�~]H}�y���8�#�|R쵣A�?s%<�a��v�J5�]�;���n�����+�[��ǢSw����~ /T籘p;J���D/[��S�jY)�[r԰c����)p�G���|�򄳔<�uJF��<p��
Q��MJN��W���S{��r����6%����<�kg���w��
���:X⵩|���2����?�FV�����F6�����`GS5>ű�ӭB<2��F�N$E,#�=��5T�+o����a���l�s��s#o*�n��+�a�{�䇩��Q!�1�`����D�s���RC���EH�����A��6~\{�����vK��ql6��%�
D��X])K��lk����b>���#���
?��Z;ns��4\��7EK�u#�����Ly���i��i�@�2��Dͫȏ���zL�J����B��h~�̯��,��+u�[*���M�?̡L�B�YB����U���
(@Q�qA�E�.�j�P@��)pe�I��<̥�U��`%ģ��f Y5�!��̆���e
�Sf1�_����v�F��0B
�Q8�z�%�x
�
a��{�o4٣�*��-<r��4�{i��eݸ�#/�dR�*b���Κʴ�N�@�~�+%�k��u0"/}g}kQ?�й�߶����7Gc���͋�"/��g�0LG����
�h�"�s&���R�ur$�d��		:�as<~���&<j�hn3�C�T�*�BrfQ���S����*o�+�P4�5c>0���"��Ldi��9�D��'�V�D{
��P��nN��9�~�����W���
d4���J��s�CT�r�=�����e`/���
�	��j1㞵3s�P{����Y�2 o+�W��)�a~guuK{_ٳ��&A;�.���!�~6���4ʼ�i��peLv<�0�f>���73���*�-�g���l�)g��Z�&+p4�RdԹ��&�Ӛ	8�����^�We �Qr��V!��	%����	��/���ƨb
�K��d�$�F�,�]m|ڕhx�盾�Uu����^�������w�) z�y7���EdR��(��H���f7�d�E�+����b����<��'��_�%e�\���Ɣ9��a~�Q������s.��R$U��d��Sr�/���q;���_H�=���}���?T�3�p(�{����i<ZB�^�J����y�I&\d�&�!y��<л&�>��3���@&9�h����;�{��J�XV�9�y�R!>S�!yA����N�:k�?Bz��c#��9��Vv҃��9�x^���\X����ҕՒ0��<K�yǁa��*f&^'�fNX�/(8���PO�]�{8fB3�����!�/͜@��0���*5��\�A<�'�/����!VO�+s#\
W�7b�8MY����z�hist��o�e��GAi��IR�U��2=�t�)E�4��?'S;ҝ
�/��~�r��X�7��<Vt`	Wa	7�~˖�˼���lM1C�'�BU����ӦwH����s�^�J��D+S�g�vs��k4�1�K��x.�O'~B���q���E{�:upSdž��2}:9���FQ�d����Kp��L�e<Lw;}]Z��[ǜ�	;�4���!�+,�
^Y%0v��f�f

ᣬK���U9�V�~�&�Ѳgq����ѭ��P	��]��3�k��A؜���XH��z.-��@�
��}�~v
�)�P�W�)�D;����d��h�T��݊e���FPN�u^G�&�x� h�-������X̎8�Jy�4��1�����{����d�_6}ˇt�	�'_q���O���Ł�/�8�gV�u�x�j%9)ƕ�|�m���3��f'w�&�5�
l�{q���d���ٓ4��� �2����n�#���Ϻ6ms��
�)��Ga��W{?��ޟ��R�1U>���j���i;5Y�F���@�6!�/%���N���js h_6	L���s�O��ؗ̀��t���2����0�E�/�}��&A�nM�tz��Ky�;�@`)�D�,��.��A�S*�J������G��
���q*�:��6=����F$+�ɻ/�,n�_U�T|]e�\�V����B���e�
�j�J��;|�_`��|�-k��|�s��ꤏ���:&���R�ކV�Q�Z�J�e6�d��nXwv���c�AFB"�m�[�ܤ���qp,��K��� �ҹ���Ɨ�(T�PV�H>����� ��j��HYDl�Q�/{���u(@<�׻�ۯ߾�}���yv������-�'ׅHi��o�1}д���[��Z!N4�pSK%�N47�*��~��[a��8���^�$u�cs��|γwh4r+*V�K��\��[�ҳp��Tj�a���	]F�w+�
1fԵ��V<h�H>�٘��W���A�C�4�>���L������'�"�N�?4e@p��C�,���:����Q'X'{��Q��/=������0�T�R)=[`�̎M�ҹ~�z2�a�<�2������s�Ƅ��K�K(�IEƗ������c`�,0Ly*���3ZV��)�&��QW\�zYWiv�{�>kQ��N�-I�\�z�
�^z�쉏!�g)\�W�i&ch�*����Í�Пh��nH�D�"	��]����Y��D��s��]K�7c�ϗ����̶������'��c���8����}�Ί�<֋��`~�뢚���k�MH�o�<��#��ul�+x:�v=aW�+�{��h�%�W+s*w"8�h��)ZX�E���!W���-z|o�_ۙaC�V��X�R�Q%g��p��r/�O�p�v��Dp�{���
�u7�[s��VJ�V��5��Ʋ{����������y�gG�py���L��_C�~�eƣ�,Z_/B��$�׹2Xp�xׇ��
����Ն��~����.���z���_)��F����q�0 �"�Y��^뢸�ʉӪS,�Z�JX�<���Z���J�j��g�[y��-e{���Pu)���	f���W�xٮ�,��:��r[~o�h�:�Pe����'h�����O''���N��/{�����J���x�6��ߴ�+�d~��U�dY��b�
��מ5�A�=X(oB2"܀9�p�>��o��
��:�\K\�_u��lQ�-��@�6:l�vX�������ۦfU
��~����ӗm�v����~g��T؛�]Jgl�� �.�b�gٗ���
�r}��l��9N?��v�a�y|�s������G˿�{����W}������Y>^z�[s*�xb��(nar~1I
}
���X�i�\�Q{�4��n�������"�J�Z����Ka}�_�R����w���3��|�o����?����F4]�J�tY��ʕ���X<>,�l�Z�s�_�)�g"���A!w�T��c��BGZa]P��5��,^��hbb�<;��4�b��9 ���2u�d���yz����8�a�R�]�Y�
��Uì��W�ؑ�h}�IZ"U��u��Ӭ�M$��ôT��j�gҕيwK(ee㾥o�T8*�:�j8�]�n�B&��N����c����_]HN9��(e�����YL-�*�gaE�,��[A$�w���ZR&9�O�!��������O4�DX�X;�9�C�@hdr��Z.�U�З^�:G#�D�m��������R�"�0*EC��Z���(�+���a��Ek!�-����bN3l�v��>x����y��f��e��&�2��6�&�K=�|Q�r�6Y�:S�z�y~~�"�\I$Aٖ�s��e��O�B�F�r(����jA�C�5��s6.v���:�����9�p&Ĕz����R�
�C���눝
E�RP1W��<q|�U3�c���M����>�����]b5���'�d��]�F��eD5�:g�†�wH�gH�%���xM?o�@'K،��u*�Ŋ�+���͎C�@=��HEU^���e��g	Ŗ@��.�%v	���<ja�F��6Xs^]G�~�+r+x��`�l[��5Û"��E�XXi(L�07��w�(��i��5�c�%�')�� sn�FF*��Pg0LK�C��{:c�^j\V���{<f0�J"<���]�+��[htEl&�1����a?�cb]�6�\�q�f.s���ݽE|깴펱F�R���Y7�����{g�=��d�^Sd�%�v��Q8Ƨ�aJ��jO(߁�q�Tr�6$Q����l�V�#�C�9�s���Kⵆ\��������4(��C!�@�9ǂ#��*L��4�����X
�c�wHW!�`�5�/,t���d1�;���J�wE/F�W���)%��Q{�:�k��y��ߥ��(EeL��%���s~���f>\�BH��,9�����i�6��)`���"B�'<9��}�!tGƙ��߮���z����N��2���ὯL)�V4\e_7�p�+�k���Bcfj�j��
�h��,��z���*��(\��ܜuA��]T|��
��f�W��G+�yD�1��E8Z��)��(�m�q�mJ\�|�
����/H�RuK��X�/�_5�:H��$�<e��T��g��<�"��Sn��[�o���[�|�,m����qx��G��q�\^�8��}w������[�朔Œ��M�\�='l�`�r�����^b��d0��q[��C��'5�C��*�_&�����Wx��yeOΧ�)�i�Ӽ`"�jU@�pj`��]y���ޒ�b�{�N��p{��Gv����|Lݑ((�0[�Ot&2ӱP�`7M�32[�5c����Qe���;�������#�D#���]#�??v�q9c���¥cnD�Th��p*۫���܎R�Tq�%�>�l��2S�0�
��%:��v��7�P8J*C
��ó!Gԇ���eJζɰ7�,X�y5�)[#�$�W2�M?*�Ct�I�guQ.:{&L�q+����
��n:>#+��I�$�tŗ�Z�xd�b� ��m/�U!��2}`�.v�[
uuk�a#'Þ
C0��c4�9p�{&�6�'8ҭ"@iΊc��wv�6���Xg�Z����ؒ׵rK�qw�g��E��u�c�U�L����0����A�]�Qـt��+� Q��X��h���L8��' �� dª��Q�D��I�
�Kt�°��Rn嗖���ϑ�!��.)��o�����U���|DY�r)Y��7��jɸq�� �ϒ$k�|P,Ӑ��M��"㊾��~��(E�"&�)eXu�.I����5˝\��wK�{K&)��N�V(K����s���Wx.�vJ�.��8��8�eN�,C���c�m�{��dv�LL�}"Qe{����Nf]][���R��i"�4��,sFUNTah��@�,�!�L٩&�PcЖ���W@�U�
�.ِ�(����X�ҌN�
��.ł��C�d&M0م��r:��.$*����;s���A!��\��AF�ZKŁ���94��h��PQ
�ch��E"v�"1}j4Ch��'R�W/W�*��&��K��S��|����7�"b(���<�"٧��,E3��{��@���wI�I�x@>��T��r�Tziǟ�`I�^[�]�Ƒ�tQ����=+����`+<���B�(���%bV}��'��謼.����9�a�.��U�ϹD^KހԕEL�@',+�o�ἇ�Q��X�����l&$�N	)�O�v�[��6Y�{Fpf�aL��E͵D�b�xW牾4u�+Q���w��)��`��r�H��;[�d��Ab7�� \��2T�����fZ]��r	�|��h4��Lϡ�S,�6߂o+���I��)7����e�W�� c�tR��VA㣓�e�Ur�Ϭ(8�y˓ո��t�Ce2Ic�dI
���:(�,1�8�yq����5�E�‡�q^S���`ng-1�}T�F/�����S�_�SKD~�Hm����HR?P�ɐX�CH<�w�ii�����E�x?��48nC�خ�0�����P�{��A�3�0��WdDH�*���K�%7��b���
�1� ��q(~�ޝo�e]����O�����|�wH^ÕZ��l����d�������&�-�в���YR,R�}��A��~���{��
ǣA�9c�e� WEu�r�H���ק��|��C6e�2��p���#�7s,���PLDý�ݘ�B{�M}��fAe`aC�����~Y��+�xc�\�]����h�>�wP���u��;خ20Xo��T��o�M����fSVL��^���7e͑0MzR؃���y����\+�7K�JMfeee�=48n����C\�֔�ùYI屌�<��ȍ��[/��v#W��w�=:��,%:
ذ��SÅ���A�?�+��H�݋kƚ�T\��l�w�t~�=|�y��i�9�=������_��V��8�$3M�v�jZ'�dH2��5���BD�1�D�f�K�,��o����2�~��D�)UwU������g|p>
�a͟�R��"E�Ɲ[�x&�P9�x��\�6=�-vJn9��
�<x�@:&'dHM�*�r��c�̣�K��8��ȏ1�\[4l��l�Kv��i�?t�b,�V���x)�}����#T׳.��r�Z[�8ҙ'���H[��MV�Y��v��̳�_�H1�VX�(�ͱp�9K�:�G.�$�Yc����>���
D�+�x�{��8��$��I��؅�"y[�����TO��:��u)�O�X4��p���{)����7|!,�0P�-O�.�A(����N��?���KOm����U�V�!�79�s�*�N� ���?�����]�B�����B/�G`�0��P�"���������0Y�uX�ȚNF�ˑ��T��K���9]��pO��Іއ��zHq3+_Y/���kHZe}w�r����L]����BG�'��r����W�tаM��rh�$�e~��I;��8��V^m�޲��/|�)�F!zy�5zE� .�g�Tv>!�2B螥`=Y�ɓ\�16V��w�4\vD��?[�ӟf����vٯ�n���O�b�*�#��'t�ڒ�W
:�}�a�j��J��C�vp����ρ�k��R�tN�q�%�鈪�k���YM�lV��*�%Ha��^)A�ݲ���#۝@kԥ��C[��K�
8fv���s���w	��cᛞ[Bm,��.Fi"��w���y��7����U�T�^R�G:����Px�p0���$�%d[x��|<�@^��C�|%6��D�h���_a֦sA	:
̂�Vy�0��d�m����b�9����T��ˆ`��B����&�]�E�w�W�{��0U�
�΂�L����{�0�2�(c��0����e�DA
�nypc���#v�/��(\7&O"��u��˕�)����BQurZ��šHmL��y!�~c�v�����Npni4�='�q�(��,�|5�rʷ��ϼ�%vTA���Z�]p]XoJ����)}�V)�N�)V^�?:DF*��jؕ]�Yմ\�’6a0�4�X`�v���8��mVs��*��ޢ�h��BS�gG0���ĕS��U$z��s9�����s,q�SEHQdF��Cg���aiK0��"�ɂ�A��Mx�*����[�W��C�����5K�-)ʄX�~GDQ�8����@�;�����(s���"�`+��?G���d;�a�-7�_B�=�.5�]�N�aynh��l]	u���7|N���dnH	�ms�GE��K��V(X��$/�kGق����՜Xw����T�'P����?
]$��y���8�્�� xG� 5���0�bƭ���aw@�FP��<l�\��s�9��su+��(�Na笜��u��4eǵ�H�s��ظB6���Qq��TODWr$9(�WV�G�"fD"�67��ˏ7�ߥ)�f�O�����y�G��zY���9I����HG?A*�|z~��K���Hh{!u�YdM&%�+j�t���>`�`aTc��u)xv2ׅgu������iig�R��H�1E�d��V/ý�r%{�E�ƅC�N
���>=C�.~��C*#(Ѣ��Xt��$FT�*0e[A3k�0���~��řYԯ���.�Z�V��M�-�Z���t��;t��u�N�q
��z�8܉?���@I�b"���[�m�>X#f1zu�����8�U��;���lzj��]���E~N���$�[���\�N
?d��Az���&�q���W�~J5(c���`}}=�����7x{#?�]A��h�VgW{\
WL�ً�"/�3�=/���1g���/̎
?ix��1��>�W1�]�����߷�o�t�(6��U8�}����<�����\]y��?V766��V?��WV7��u��g,�O&��,�S��z�O�_�ߢ��vXC���.��‚]�b�YP��>�[��Uua���~�̱��+@%TzȘJh��/�;ǟA&��ӊQ
�3��{*qs5읍�a:�8'.�-��B�M�n�{���5�D6H��zo/8D\s�VtR�A��
���-�%�L��-�xs�x����įi]�EzQ��~��)l�\b���v�Ӻ%�b0s���	Z�܋�|�;��m���ʣ�G>���zG���T=�E7��`Vp!`&��E`UΥ*����"�uZ	�r��K	�.
�D��
6l�(׻K�U#��l��+�*�D��n�Pu�=.,x��R���YE�ŸM`��?��ID��_��8�kx���p����
��b�5��!�DS���p' iIe2y�c�́m�2��A����}�{�y�sx����}����1�s
��e1c�5����M�T�2@���ʩ"唁Z49�W6@3�0��Ӱ���$�K%��4n^�d��d�xk2>Y���?��A��Z����F�{h$CΕ@3a3Ƅuef��qEZ#`�㸥�H������r�d��Rt,k�Nzk�V���Y�[���E��m �h��Z�V
?�б�a�]�՜]oku��8�.jߵ������Ջt+޾[�'ɂH5�l�辤E��s�x,@�~��`v���2����5l4�!���>�hhnbU1iBSd	�l�:9�* ��֓�Jp�Zj��`8�l�^^�P�|{�\%��ͬ�RU4��Q�_�U���:i�0!;��w��2xխ*�����>��u��E��N��T�q��>�H��Ajq
�x���o'~�Z�J��(�?{���6�$
�g�
�<Ӗ����n%nǝ(?��Yۙ�YۣP%1�-$uq�o�
	� %gһ}��>g'Q(�
��BUA�ڲ0� ��ػ���\d�k��t��mS%@��RXu�?�����?�=��C�$i�\�M8��F�4! �pң�@;7]\��;g%oߝ���^��{�����7g��̳�֫�7�޽�����?�;����{��N�^���'�m��7�Fpl�w��T���	��?z���7�f��]�ڨ�cd}��)�L|˂�x�S�;�ٱ�e�S���j�����Y-�c��O�����o�^/���_�鯳�y?���B��'�f�@���)#Y��ª��ӡل��
[~
�z���A�����Y<,����G�2��eU5Q��3��{��IV)H{۟FU��F�+�X��b�m��;�
��P��czv��_H� 7q��!���#+�1~��K�Ϩa����[D�p��<���n,O5�>q3tܔ漥�9��Er?ƛ�lՐ��;yq7�8��t.k
_�o#.����?�;��;���`�џ�?<���z�q��M����Lz	RS�`SS\l���-�B��c��>a�2�/�X��>^��[�=�-|�h����
���<2 ��M�"��ySy����3�d�P�7�#�
��E�Y�V�����irgJ�w�3�J7�7��™a�[�颭�R3Ou��d�Y��Q�����c7N9ʶ�%E`mG���:̲�Ւxv����%�λ��l�K-
v�	M�@(5��E�W��wcC�'�>��≙�:Ms!6�(��D,�+4�Z���ז��S�E:Bpf��=P�@�����&�X�N�D{�R|H���QHK�j���/7�S绠J�8r�Oo3}�K! ��q�f�K����`�ӏ`���f������r(�c���h�^�gO�JD�u%�K�&-6*=e�x�,�x�%���Q�^B�F/A�3��!{L�g�0 ����Q��ϭq��*m�G��9�5��.����yx���F�"�uu:��k�K�鋶9�!P�����t�(`�Tc��b��<),l�����q��M&�wMlD�Co�_l�$��
fa6c��bp>��Hq倅�� ��ʞ���}yB��J.s���,�0���Sc�x�o~:�4e*�AW|N�
{wo��Y?l���c��&*�����^g?��5�Q�7�J����G�P����
�e/�ޟ����$���;zOe6+���	tᄣ8�aJ�rm�����Xz�T�5�ms8F�H� Ǎkk�F^4I�x*�����
$2t���U��H��g
�Xi��#��cj�X
x�+�M���JA^�@,ئ�2h}�s҇N���~8YM��T��VRQ<�;�cmJ�q�����ʴ��G���K"N�z����f~�,W]�׍l��f���(h�+`�����6*��OC�t>��E�
������'��i�F!ȡr홺1��N�)�`��R�e�ŏ̀͆��)��xB�5����\�J���n:�+��Qp1P�q0ݫ�8�}�tfGNz��I*����ݘ�%f0~�&?J Q-
��{�ŏ�-��kdܧJ
���S��i�Q+�C�l�@���I��~^#P��^�A]5`a>Ɋó�Oå�t�T����h0�I�j�On��#׺vo�#��Ĕ��V����D�0FK�j �3�7J�Ei<7�K����[y����Md�4�e�Ǐ�4g&e:�B6XA
�9M]_!�iR�V���5ޔ*
���<�ʆz�rA�od|����/Mg�t��
>����O*��ܠ�Z#Mw�vC���f����/(�@ă�IFj�x��Y�v�:[�:0HP������cp�	���u�+��s*(�Ԋ1�(
"
�S�F2�)Kd@���U�Ԋ�7.^$�{8KA��b<S,�{[Q8V�Q��d�����e$�\�0�U��qc��WJ9�3�C�=��r����]�
�Rï稉�:I��a�'8KL8�V�BTQ�e"IU*I�zZE�M�*WJKS��d��b.C��n'���Z,*'s�C��\����3�e����%י�,��:�H;�Gäz�X�`$��ѨV�A�FF�U���M�%J��AM�܁�X�k��J���T;;Ú�� 0�Y8R�y��#U�y�:��ɔ9�0/s5�ȇ�L��5ց�;2�Q0���2
k,�����'H�HTa�F���lqgb�L�^���#{wO�Tw�F�ݲ˞�a~*7G���t^8A���(
dwV�ΰ�|Q;��� Ќ�JM�H'��j�/(�Lt#�l��[��Ljg��㌲�S/�;X,�e��!KU��a��
¹2´1�+0^
ߚ˺�h�0� �>kx�0�Ť�!,��Y�+��
�e�y��Q6�OpE-ש�����p
��\c�уwvڬ�37q�b�ʣ��P�V姇��P�\%p*v���n��(���ț'�Z�YKVݱb^)�f�a��g��=�5�L`:�/��J��}$�d<�qOf,n�Wlo�e��Y�֞*��8
3v�-W�+�H���Mk�a��>"��	!nZ+OA'����*�IHK]�C[�w<^��Z���SmQsB�Q��C��Қ�)���3�n?�T���F�F�'��7�=j����zp�����N�
�Q:u�9�j�`�(�c��;��O2�*�Ǹ'��h�u�Ēu��䇵���ێ}�	}�ld�U6��G��JT�o��K������+@�:�d��枊���h*��e��c���˒�8��P�蕇���a�d��)�I��d=���D��~��!�w�)P��U`W.��WUc���]3
��5�����j�'��q<��dD�ϕ�~J�ɧO7�F��+��fa�?v��8�s0I�h�vБc���o̰@s�;�IP�ڙBg���2YO��5:���'�A�(<a�k�eYѲ�dA�h3Q�o�xZO����S��㊑;c��;�BjJ�I�@��{�A�|L��{lB�6&Y..�e*�a�Y�,�|�Rd�
B�d{�d^���3O��'���n�^�MW��M��6t@�}̾
��@��ٙ�%�jA`ٙ*b������>�0�=G�Ǚ*�I�>6!������. �� �O2�'u��i�!��7ZU�)j>U������>>�����7͆&���a�]�u�v��8���4+{��}�
Rr��A浆�'p�@uF*����#O��y�^Œ��ջ�Aq�D�m��:��� ( ��JD>(��J��,א��F�AB�����.�ݓ�\Ù�%��`-L�zw��:6�vGa�>�2�I�+G���H�ޛ���\S�GH��7��p�q�!|SN ��Ou��?/HWB�����ݲ��%�*W�ěL�}⠪f��zO�č���[Ѷ&x�i⢗�w�7�׫�^��2>tT�8[��|��նt��@�T���،"f}pj��2;�l����;f��2���P��g+N���LMB?��G�ј�h��u*�Ҍ�L����l��\�!v˞��Q�����0�V�	ʺ!~�@�JYg�tLa�B��PQy�$[i�` R�q��܁[p��1]{�7c��(��DW����sbE��N�MVc4��;Ԗ���Э�m����Q�rJ��;S*�{S%���r^�;P�4��r��v*��ie�,F+[�.��.�<NY�<��� �1�x�7`c�3p||���y�E���J\���n�\>u$�7�}�FY4}>|X���h��r0��hR��n|�l\��c��1Y徇|6^��`R%�`�oH��oWu��_ī���T-؟��`��
�Xy��8e�A��A�
@�1e��SN6u1���Q*�^�CL5c�Β ��%�c�°x�u"�s�՚�]��z
���DU7��\wk��#�I��Jk
K��A�eH��%��
���h�)�Ѱ�jmܲ��S�cA���ɧz_�(sqE������x#�{꘼��X	S贈Xu0�����k�
�%����"pC@R���T@`��Y����Dװa�v�zm1P�тj	Ƽ����V#�sG{�AH�^81F�(�OAxSG�A*��Ad`xg��oLT@�m�O'^�I���*"1��U�6~�4L[I���X��u�a=�����I.�J�Jj9�T_U����gb��4A��F���.{<]�K��O�±o��y���R5\c6��J�x�D�Ns�⛕��^�T����:G�G�NR������q�ê��B�`L��H�~�u�S.��u�B�T�ܴl�>>U`�;����Τ��P������k�b@��|a(.q���47K����y�Zɂ���*���s�(��:P܂e�\�k)��I\6
�|�A���r��ڲv��_�]��k��W�e=��f~Bמc��	��vz�G��Z2�aͅ^�fC�+��D���65A4�kͅ�;��
J��"�T����>&ݐ+��z�����r��n�V��u��0\�Uq��ZU� �:����)�!&��*E���{J�����+�ҵ�����*
��G�v3,�kE臗�t�k�Q�O�C���&w�!3
�H���1pK�.nD�􎈘�MwӉF��h���`��&�:\A4�:�rM\�d�^ �R;�*z�nv��+	׌�k)،m�뮱�(���`�O�5�	�4�V����}�1b�w+F,���Γ�Ib�;�0CG(�ݝ�0�a����ք��|$ŏ�Џ���T���Q'P��Q�NK��a+��LINb'm�3��Wq�p�����|�TLQ����:/��6��_qW�
��&�/��\�,��H)Kd�J.+�k�w���Ǖ���
�l���~��'�h�=	kbb�n
��Dن��.���|�O��
���s�,���`���_{uQ�C�\_��FU�(�j�&�6�1�����)<0KNBg��N�N�?\CG(�θ~����$�����H�`��;,ŝR�vs�!�a��}5}T֓��TfeO�a�x�[
��Tg�y�i'�\pD,3��W�^�։����LY�6�_Ʊ�U����G�F^X7ĸ��`�X�Hq=���R#�8��a��3�A�O�Ѣv��7[ͼ=��m|���Q;�oG�jd�Բ���$qW�T��uɉA�X-"����|U\L��/N�>X�@5����l�qF���i�E@"�V�jݩ�G �}<���B��
�H2��4W�~�E�-�~`�v��d�*�#L�=�@;f�
$v߹���YV+��k�+l���rH��z�Cv!@7���+��A�wl��H5���5Ʋ���G�Uv�3r��|�*r���n��hJ��A��'�Ǚ�\��]R�4�j��	�v�s��@+n���S����0��Ph��8�9���hF�dPC�z�sWz3Uij0�g�	0���u�T+KP���ɨ�y���K�R�D��Y��R�`�\q20�~���=*|�b���+�9�9�v0�pZ�7\�� Q��5�j����G�&�H�9)��U$�A�P|�z�Ø<�)]���.Q���Y|lg�	'"5U'���_�Ut���7�k��M�L��s�|eW�i�Xu=�843(����ٝ*�u?V�`;�G8��\9%��F��>tK�V�Y:*��%�Ն�DqqL9o8Ռ��l}���j&ߴ>��TB������A�
.i�k7#zH��p�`:\ p�j�R��N+N]M;O��j	��uábeI��*��y��;���R��{�[�5��S5��'�6@�Y}��*�R�V·���nP�@�
�z�B���
t��2�1�ȭnP;2G�@�Lu�lK3
P�`\+lMoFID	^��J�v?��ӵ� �TkRu�o�
R
u�A�5N��ʯ�jHEI�#�H�Nor���W�1�f�g*���\>"���Hq�I�#��j�:�ң���PTb���#V��]İ�k N㵙y<�YY��&w�x�� �JA�]���ʰq-���o���յJ̸���,/-���j
N��i��E��/I���ԓ�ȹ6G��̥��\�V�i�H���^d!�W��Oob7���IY�"g3y�U��ᠸc�N�D�X?�*8�3��H���c�l���G}��7}-آ&uB:���g�v��\�g�A�9q����E]�ȜZ�S�2�������|��S}�z�^�W�gF�Mn{H�S�3�6�B3�*Qh��kԀ������
J6�g�(g�D5��=5SS��a���Ǜ;��ɖ>�j�f�!
�L�K5b�D-�k����%ވ`��jW�,q��\5sE��f���$�B�+!K
V� �S�jH��9Pl�q�6=
&˕Y5���#�����2w8�@�G*�ZVo���a�ܜ͖�H���:��3�9[f+�g��<ˋ0>�B�;�7ʠl��b<
�2�`�v��4D�Ff/,�9k��X�\�;�>�J(滋��0�8�H�ש�Ñ��o>v�C����p�C(�J͸K��|X{A0W�i����Q�Rs��
�-0O��1�B�t��y�vW��q���~�!f�,�����)V�����)&N��B5r��d2��ghi�M;�ܺ(�QM�'f�2l-��̏��>�d)�s2�}�5�UqA)��>*0��G	&0�_��PPNդ)��EPk��,C�"�G�d�v�P}qrM��H����KA�+�i�w�
��5V������US�j���S5��b�勦�z�Pr�[����kԃ��z���w��U��W���2�*�h�Z���Q!ˤ6��9t��R[��|����$� �#(�i��Y�^#�u=�M���|1����L]�z駰�?�`:1=#�ҩ�
@��9��uߴ��3Z^��4��.K���u�SgyY�O�Tmqǡɕݰ��a��T�_�Ro'�ӎ���ǣ:�=���y9�ɸKU�^��J�"�C^E���.�U�|�r�dx�+���J���޹��멶e
m@�鲾_�m&Q�Eu�~O뺘�y��o5(��`Y�˫�_T�F�;�l�h˨�Ű����˒�>���vB�_E�axle/V8OQ�8�rC�X�u'��q)B�>C�L�T'W��X�ي�O��;�W\����8D��LQ�7�*�2����qʗ~�M1���'�V���;�ֆ�y�+�)�?��2u���GJ6��HgRc��9y������?�l'��z;���v2�=�����y����wv=������>����`g�?����	 {te߯�[U���6�q}r�~�%^8��$�ߵ�J���7�^�ѵ,�段�t���[�_���ߘ��ݽ�k��������om�o��ŀ�h��!@ƒ9
�t��}0�
��.�S A8�7�n�5@�2Z��-����OhҺ�f	Y��`-�l�2�����7�;O����om,�£1�B�Q�wj˱8�[�Ʊޝ�"d���(�d;�eL������m�c�$n6K�*�޲!�ڳ��|�:4�лQjA��;F�L��*���hf
���U�y�S�5I��[��ݛ̘O��EV6e�*�L��'Y�s����6�ٵ��3ZH:v|��k�
\��rRY�Mu$c's|����`Ԏ�?��$!����)\"�L])�%\d8H%d>h��Ȯ
��X`���b��
�6	�dmI�B�!����u:1L�� (�M�n�Ց;�`�is���6�>�Р�����#ghh���?K��"�'sԍ���?�8z���{�w��N�������sIie�q|b��-�NOON��om�	��6���{�>�MXV1	O�Hp��^nZ��k$�_{�ŀ�;m��֙�Z���ۄ-��ն�8Kq��-6��	��V�R&,�ۓ���#M}]@�z�]x���`V?	�|�I8:�����#C/�> z��><������{!:��(u�e���wa�:�:j@쫨!�Nޞ��9��nn`�i�'���'�)�g'-��	�˿���ν��c���sAa�գ�OX�ykH$x^‰���v�y/�-��;v`��6�L��s�S��tJ���ف�L\��ˇ�j	���\�t�]�ܙ1=�0��|*�E�O]
���
�g*C�.$�,�B��Y�&�s�c�nõ� '5��hT�k쑱r����;�%��X���_L����٥����_}L=|e�Z�HN
=����¥�B:�amO_<���z(����q���IR��/A�>��/<�`���r�d<D(\���/_d�8
*CST�rʈ��DT�Z/��z�$*�	Ŷ��4��p�|_lL��dD��XO�o�Ӷ���Ԋ�A��'��,��~�}�(I#�-��|3	k\HóEMn�H"D|�|�2�S7P�,��s��́�z��ߞ���<;y���â�����������RA��yߋ�����y�����~N'��������OӦ ������mÚ���?�ع����
��Hb�=��R��i�?����{�/O�_�f5�a�teZ�o;���=��,y�^�H���\1��¡�S�]`GX
w�����=9=W�bR	��zM7~ܩ@�)�]&�+������%U��8�g���ͯWR��G��́����'WBz��P!���B�?{����!1��	���
�xve�A-3�V?m�45����@|��Z̍D�45 �����я@%i<�SNC-Y�/G�XlC�U���@�h���b�r4�2�O9����>-n�A��6m/�;�M��V	l���_%�=�d$ej}��_ƾ����Hb����yH\Sn�������y��y���o{
lFLY,�۠3K|�T9jHH�x�S���8�\y��b�6eC	���8�n��c��	"ȫޛ_�_6��tEh�=ɦ�?kkS��i���X��1C�̛����H�O��o�N����{���
�-�ҍ[{ye1����a�0W/�����'�ѹ�aY�A���@��,��>;�խܔ��R�RՀ\�j��}�Qh���t����i��8=��	J�m��'��7��H��<��-y~m�N��֗���E�_vH%�E*�'�J9����bY�P7�������`����%���ޟ�(��p�m���s�k����4�s�y�D�;��fsf/W�p
r��l�m�n��p+���7f.�F
v�=�r�A�e\9�T,�-��}»+>H��'OHY�;��='�.�,��%��%S�闓eI?�V��	��s��˦8U{��E5�S@0-]������J;���s�W��$�N��Rar`�|F:��ciL9Q
L��ZX.f@M�ymL9�~�',W��>Pu�%l�1�t;�#���E�<��f��qK�e�G�>��2h�j��B�#��
�*�"��{��6բ|ț֋���uq78
GW]�v�X�^w��L2�#+�d�M���q�������-���Fl-J%�#7bH�����#[��h�L�{}���V�n	�`����Z�}g�#�[�o5�5��:�e۶��l�pt�}��軆UH]l���.�"s	$�$7�"��p:���cnAQ���+S����!�����m[{;��΃+���l���Q��vC�DA�|��c�K�G�+lj7n�!���wW�Q�PeR�is������43��"��1��wV�V��GI��4K�[Œ�}M��,�;&5�f�2lH5�/��[a3��=�'	��ض�`�Z����=8�h���3o|�/�
(�hIF�`y��q��������la���N��ҔȰE��Z0�V�*�Q�k#�R�Q8^X_��T`��HZ�BU�`م�Qp��5v��U�ش�xLF��T�GY��Zʠ����I�������,�*� ��[�B�چ/�8��������@Co�Q��]i7��/�	~,��F�.k[��l�C��z�>�������ǣжZjF����p�Z����ު�xcƇgف�h���bǜ��o��º_���1��ٓ���^�w��Oɢg�-lxҔ����ʳ��s�7w^������?�?|�����h(���u�f����‘�á� `�l����gpT�u|��Q�[���NO��&y�d�5
[x�
Zދ3���
��m��Eټ�z������Qi)(������vq���L���:�� v�EV��!�/��>��s�-Ո�u�8Z�1u���kf7��7�F�-�gU�Q�r��<�~��U�������?邋��w�z��h�5׌�w/^�N�g��S��w�&�Y8�9}+��{Q[���2�v>���X�V�"M��Ұ9;b�ܴ�W
�X�(�|��e�;�H�_�9�d�n4-s���"���$�[U:�U�jROؖ�O��?}�����~+I`�����C���p���y��b|%�VdY���xR�c0�������(~*�x��� �o}����y@%�c%[{�j0�0�`�P�ըװȷ��_9�=_�P��u�1L0)0��ss/���u8;pbҎ�EW����T�|n��"�8��AC�f�v_`	�P7s�����Zԋ���x�;��]_��1[�*�W�z7�웑�*�+.�e�d�o�i��C�(6:���'�N�21\��lArb��v������%�'���W�#p��YR�!2��6�'�-��C�Y��f�_��,Ha
JbE���YDMӥX
u'�J{��ʁl=.���n�V�k���G��]����r�����UcC%7ӺU��X�H�mY��3F��"�
h�a$|>.��ۋ������vD�R�ۍ��f��5��=�^\[�-W���U��^!ulD�5]}��$&n��m�Q��P��[�c���(@%�q�����.=���Jc���l46�<��N^lT0��d��3��HJ)��kI>]�.4���¿�\�����lYC���
��!�_P|6p���E6�����e(s�o<h�@�&ʽ����A��n���X/�������?����b��Ѷg����6�{���<&[O��%����k��<֣4�z�Q��g����#��X��y�2�|����p�t� ͓?AnZL�x�M��R�u�Ɩz���gl{�n@�O^�����6��!<��tw���C'Q�q�b6�ef�NFxm�������;y�'�I��	���|�<*�}/w��l6/�u�xܾ�߂_Bf&<?�[�
�܆´�z�s�q��q�}yqyuxpu�����y~|��Lv�K��2����P�Ÿ��ߏ^��a�F�q~��W�u��E�2Կ��.�k�3o�־��\s�3a�mq��M�r���j�Z��a�n�ê�����1��U���_�+�ޛJ���e\��q�`X_���5���l�܊<Fcd�`*�wt~~z�˻�^��ˣSZ����.�;;����r�h�j���)[?�|[��zu���nm~V���U>�=�py�b��X��ޯ�^��a�G�{�<ECu���#�=���5`���n[��2b�L�����ˊF����Q���{�z9%������������D���7�����=},�o�֎^G�;��N�4Q)ʅ�t�/�e��ޖ���/X+G(�U�ң҂)
��r\����ˁ��FT�	a�4� *���!1j|�lo��}��������������E@��΃�?<z�KΡ��WGǸu���y�z'��ɩw�t�U
��_4�����F[��&"i
l�Φf�r@������j�A�N��������h
�y�
�|�"[
�z��pX^$���R@g	z�X;��,+쌚�2'�e��Xu���i�9Ɵ�~�J���t���#�˰ p�Ǭ�{bк�r݅�DOKpuU�,�\Y��B�(1��Xdn2W�n��"qHȅ1����gQS58�	g�]D�7�l�B�j[��C�3jc�rD�p�jx�!����C��!��Q�k<V	6�?%bU��njj[W-%�G�,����q[�ݘ��e���Y��\����DQ�O	���WyG��sSZ�(����f�l�t������;�`�7���\��<D��z���.N�?��Zg��D�G���ky�s.z<?ڱ�S/f1����Y�'A��+8_c�����ћ�Оg�����.�`�/�|*�ޓE�ĵ�4҆w+an5�ܐ�r6N�k��e�
�f��=XE
�z	�����-�w�;�"߇����5H/pQo$%H��f��t�'�)NͮJ�]ݺϳ��K1�|�I.���
��I�1�����נ�zé��@�;1u���6 ��ix��VK�u
�gk�����
���Q��9f!���:��O�p+���0o�.#��h1�������(j��c�"����:�Ġ��Y�%4��I	]��M�N�r�y�D�Pc%,g�;�%�YK˥yX3��Y����o~��c��AQ�<L�/@彼�n�@��>��T>絺���
�q���a+l�]��ݥ��m��)hY7������n����~[K�؛���2�X3��i��<^ՒT�j�W5MyJj�厹V/�n���7�W1犸*y9�?����K�w}!;a=��U&Kԋ�x�aF���/|e�h��F�}�@9��/̎�d$Զ̚D�������|^X�3�V�&�2�w̼��ծ�n�Q�Vi�AvݭX��?����P-nJ�tQ�2����b뮚w�fw��	q�G�h�z��e�y���p*
lbUV7��t*5�2�Q���[98vwž�1��,�/
ՄYe�M�RSe��u��^�������2��|`�bں���\I��Wa<U���6���#J1w�P��V�Q��IdŘ�_�1Kc!����Ʒ���/����~�>�D����avj�Dݲ���	�G���� �2hy�nɭA���U�ɇ����/���/NN;:}��.m]�`z:�6����I?�O>�
fKa��l�<�L��DG�T ��y�Ps�d�C���ˣ޴�bIl�EY1խ���im�d�m��݄sEH�+���C���ӁEư�$k[�G�#~�L���13��Ȭ���Y/�A`V��&O"�M����T
��t�Q��E�7��J�ֺ�ta^z�@�y2,^��]����7g�^��t
cƀQ U��vC���Ps!���bJU�_N����jI)��֞ax~򦷆2�2I��0c[�T�D�v�ׇ���;�p,"�N;�l����:�dΤp�)|�j!g�OUؠO����Y�Yv�� ����;o� 1�\�l5������c��<E�7G}.�'E���nP���Wz��ޜ.�*i��0�/�~�x賆)�Hf��K��k��W������T��ˮ�%�(�q����;�uٴ[�m�qy��P�aU�ab�["��ɺ�|�9:,�d���k�d@b�HC'�K���x~
�۲~�L#S2��uiPױ��Bߴ�#7'�b~�,qBvy*�!��2���
N�bF�.�C-�@�#�N�/Xʐk׍-��L�h�C�΄E
��GK=	��p�`bK�.��H�q.��zo�,�p@Y��L�7�b���t����d.<�'��\y^p�0������B�:s�=r}o�>ڈ~�8㌒UJ�O�#����7�r����Uf�t(;��m��뎔��X��/q~�\��Wڥ-@��m��
ZR�\.����!���{�_ѝz��՗��2�p�b��*2Sl��i
aXZD���%�yŀ6��k<*Y�W'���%6%H�����Pr�-i�0=����5[s�����tREm�
԰j����M��2}�MI�lii+Ў��ŭ�!/̮,mK��s�ϊ:��V�5őYr�	�����Z��%����#~6]k�<&;�C\n���SQ����l������O����UC9���B�Mj����mg���(ҭN�w2+Eb�;2A�����6.	�-�i���PT�2ګ܉�͝p���qDo�Y7�l঵r�6:lo~�ڸ������բ�CA�-��CQ�I�j�7,��,���������o�[{Ё�ڋ�^���"خn�W�J3�k��-�u�g�OӅ��4��N����>ᣀ�<���Ч�
�$$�u��g�u��Ԅ�1��J�b�WL�[�#��d3��#<q�J�'���T1��n�ҥ�����_+I"�&p�ӛ`����@�c15aq�,�]]����w�D��4��m՗�|{\�(�_��$i���/�eC/i6{'�P�ɏTP��ҐF�U�P��Bd5[3���CFE2�r�%��eJJ��)��
�NS8y�l�3}��p�Y�jc��#����m]iV����~[���/6�mk_;v�[�� A_U�����/��e�b�t1Wۍ
�_ߖr��~*�Mӆa~��l��>��[��$�1A_J����/氙��[R���`�q0���tU�G�����w0��ˋ]^6���M�^w��`�rw��eJ|�(ǀ`������d:i���*�>tr=롫x�JR7k�2N�!l�H �!���n�}�NLbgv�U��q�Jz�|�V���E��
��6;�ll����gt@�(�d�WܲJ��Hs��>,9��)�"6ðlSߩ�F�=P�5�ª�
̼�܆�b���z(�uۚ>S����Ŋ�Tw�k۝�+�!q�#f�� hos��o�GJ�N�eFk�#=��&��%���L(�A#���+�k�֤f�v}�YqXe7,�B����%E����45Y�L��P2<|�0�U��@����������=����9�O	��
\�r/��{�J<,��Lp��!H�aI^U�����$t���Z��V�v�?V�����0��6@b��G�*\�A��T��(	�n]��-9R�^�Uc�fU8�������*}�����gz�9��"7%��j�=��I��a����m�^]8��H�R#[ʨK�-�쪝�]�.WI��&{�ѢHP���Q|Cm7ي��Aȧ�S͢k,K�R�����/���܃�}Jj�or�ѐ����TA��α�s�����Ҹ���ܶ�
�5���s�{<u.�k[��_�-kS-*Z�S�
�u��ϊ���|��G��7
�_/�'��Z�χ�y����j�>;���"2�ʇ�@�=L�gO|u�믽�+�&��I{�R͉��f�D���o����}f��@�� )�m=Pz�m=�YxF�5��3ph=�ʃů��J�4���$��Y�	��T]������#����]_��O��#'s3�>F��L�}ī�{���Ωi�L�4韖����j{s��>�*�w��l����@�ì�7g4�:n�e7m񜆠��hΌÓ'� �h�����;硷�����_q�@�����ã�_;�ϟ�H��%^Ł��H8R&�n�Y��\|e��y��ׯO���V�q��ؾxL m��_����C#�lb��+�Y��²�� �Ag�t����@�Т�R��ʱ�[j5٣fX~"�E*���	ƾG1�dEHm5��޹'V���蘹��5��"��	���n2�r�y�¡+���'��[%���Q��u�5���Z1'{��]� �7!�͹�O��(ʤ�j��[8)�F�N�<Yv�,꧱3�;�0���ֈ'�}�ޒa���l�����D�\ܠ�<�x�B:|"��y�l\�q����?�0n
	Ƅ
�j[o}�|%A2f^�Q��X�*�y`+��\�o�z�:�xt�Z��hL��F'E~�֮AqG�÷:�p�X�ʰ�i����m�tiRw���d�(ǟ���T���)��T@�Yp��i�e�{���^ÈAal����i���ӯ9���tt`����;��"�PzX�b�[��[�e�3������;�r�\m�v��d�k8��.l�E��:b.��G��9���l87���-[{���V-u�bB�pH
z�(�,�K5��k~ќ{���\���7ѡ'쮵h��j'�E��^>ؾ����3�eu�C[zp).�x�%��;q��b��wMy�ʥ�,)R�5GT(�9y��0�t^�gZ@X�:zUuk�֕k���'@�2�wF��Ň�%�Ѽm�9+��YG�`H��3�4;@q茄��zN�
�;���1��q���'G�0�'�܅�mYI���eI��v��2�)�V"c'����k4��&,�O�c=��x9B
��
�a����:��L�[i�S#���U���ϒ�L�GI��/E\��+DڶvZ_E�&w���
���(�-����R�C%��7�˂^�K$j��!��<M�[*�GCa(0&	����	�x���%�r�͜��@���M��t<�"
lA=��B4��ϡ6k�4u�<i�r|���\����|�m*i�]�y�c�@�<�Օv��R�kT�&[
!�T�1�ӟMH��w���&�������V�(��h�n���)$
`+ҝ�0��`�#v�Cr�3J?�;yd�܅�5q�:�EQ������TJz5�.l�N�ܺv��R]��F
�ײ�$�LP��H
�(\�^�/�D��
]�Y��)�x44��y�_U���śn�gt���衡�f��L����?^*9�]\I^_��l,5��!�q�{��U6�<Ϛ�庢��g��>̭�za��5�2y��U��ԑbdʫt�j$�6y�Dg�6+�$
�3\c�]��+��V�BB��R5�|�A�W'#6.|yǕ�(��Gu��yE�`���6.۷�(�*8֋��W��Dy�
�*Q�]�qU�r}Ez��Hb��Զ�oX-F��	,zbpLL�����-Y�񱆭�/��go���F��-��v+��b5	1�dyquqse51b[��C-I�|^�w��ػb�I��ڔ<>��^N�Q$A�/���m�΃+��.���}��n�\p��2���3���C#3
S���S�ye���҇7��`|�O9lu0��HJ�����i�!��"�u_>5+�6u��9��[f	nŊ�Ҳ��ttx�[+g\�>��hN��9�3*CT����+�<ՉR	>�r_�ҊG����z�-���6o��h
���1�D4>l*
��4ϒVH4.�C�@�O�c=�K!@�l(O+@W��[��>�Z�ה���L8S��I;.��+)gJ�xj�]+�zO/bIx�h!�W�PfIn�Dg�6ޝ�#8JFn�XЅyE�(m��G[�*��)���IJ��ܜ���vq�T��S�gܛ����m(sM�=!
���U[/Q O%{.̐�O��l��#}51�y��NMlV�#㾳�a�S'vY��,�V�iˢ�ߐ�Up}�فsT��hbS�e���h[�-p<6i�,;��
�G/U�ijG��q���<�:O����b������0�6�o�"���91�M�]L�����c�J��60��X�F�Vn���
f껉f�HB7���%��	R�>N�W�6��{�fa�:��޷�_ܡ#T�f������I���|6M�ل%y�	��=�ca���Sf*wƮB�XE��	�#��:�r�8!��8V��qGņ̟�F��,,�m��E�	����~�O�r�$͡�g���Z���2v���X�SM�m�տ�y���p�Ӂ�|9�b͋�����s�fu��viHjr<	ѐ�7ٔ���ӆ���^m9S�:�xa	z��{�dTOKo1����T]�V�潔����o��w����������G�;�&��K�t���B���F��34�2�\$�IF�ȐR�2�>�&,y'C4� ��|���q�nn0��T*�a�ar�E�r"Q��͍܍I���'��*�*@{���pntQ�R($i1�v��D~z��W�cb_.�����yqr�c}��F���w�����O��z%��+=����0�]���ٹ�Q����?K�ޞ����vR��?�j���U������ޕ���n����O1,j��3�Ï@��ۆ�K%Z����E���r�����E(���1�`��X�oJ�HnLBP04�bI��*O��g�[t�RpP�k��¶�'��7�,���]�2���'<�s��G�
��G������
O�a��Y�{���=;=~{N8]����M&n�h�������{@��^�{���D��ō��Q�&� �yP���j �ܶ�X�\�ͦܰ'�E�<dWD���2�I�p��"/���B������Qp!o!A�h6���I�<$��t�y���<'���*�$�8�ʍVU9��:;�<y��~�W7D&�W�7���$���3Ր��ύ��ގ߼}w�p,�.���h��G�/9�K��&�^�[%�=��{����)���M�Y�$Jk�g-kog������k�O׷^���Ó��O'��0
~�(gFa���3��qAuj�]�����f7>zU�]�6�3ץ�W��zo�zx�N�,N���&�F�d�/RO�y�t�mI�E�Fi�T9��0>|,��A�d�,�%rɒ�?�<v���X�7�*��BC��)Z���
�hB!g�8�.1�8��D�� AUu�y�ܰ�jr%�?pY�=�FC���%Lc ���&��`��V=��*�̝R��py�Vp�W�͇�^3�N�hp�$,ɨ����IT�>Y`����I`E��5��<�_؈87��7C?O��N`�э����f}A�i\t���Q���\0wN���m�\;�&!m�+o�ڄ�PX�;m�LΆ9۝�B�p�S��>�0g%��$�7ħd#����إ������2ѿ��bE���%GA��j)�^7�F�{�3�@�<'ۚM��;JN!��vz�@����w�[5Z�`�z#�R����"`��o��z$����_�Dܘ�&=��-��	w�E��O�Q�a+u��.?Q����c�M	�zP�8���jC�:w
;"����,��ei��؏��F�5�����V�v4���E@D]��s�C�rTl�3ؔ
��t�]�aGxgIo�o	I5���W�೛0s��;����'�,q��—@^�|�ɀ�XNn��[I�F�6������:9�Ga_��ߝ�ή�Y�}ܐE}޲��x�m��E��g"*Y���ۗv3��fhn�%��	'�J�o�<Tyٻ�r&8Ʊ����"�S�Җ��s��h�ZD��_A��fӪ�]E��O;Ֆ��q�&��.��yEc�y:]�[�� �A��Q����}����E^�i���Z���z�<@|��6	xA*=MG)5�b��niFd�,�P�ܐ_'[1�lj�9+��n����-�nH�!b��Ln���5���
�����e�~�Dh���畆�>JA�px���6X���UI�E/�T/"i�����|fi<z��I�L<쟊WN��R�[�F�!?�R��.#�Y�C�jņ�U�]u��7'�����ϏO��g��^n�;������G ���3�ڟ��\�������ݝ�������?|��r!OW.ܑ�Q�=���.<�C�ip��
�2�����u%u�g�>I�֑���F}~܇C)MY�;�7�()TB2ǣ{4�-�z+r�ە����
�γC�7�Oo�-C�J6�
�U����_�B��S���d��/J(B�nҤ�{5hD�O��;�����h\ts���]��_�"�-?F���e��Q�>oϢ�f8^#���j��6���E��=a������.��zp�����I@���=��職§)��-|���T	���(8�xg��|�~2d+�>.��\$g��Bt�Id�,Һ;)YuX�6G��� %4�����@��10,�f�@y�b�f(MF?��!yX��$�3��w�p��e~:VDK-��uFW�2E���0�m�K��"'0 pv�(hYBr��suWEx�M]�r�a��v�gM���Z}A��x��b�e���{�>믲���K����PX�1��MG�&�W�1:#�rl�I�KL�O�)�@���	�J�*Uc���±�(�����h��kl�*�p��������
S�_}��ٽ:�?���
`�Z*6pw��$(�Q��3�}y���h�����}|��]}�iQE�c?~;`%���l��_��@g�h��ݭG�VsA�-��/��+���7���N��m����k+HE��d#wv,۶ƣ�X�����$��|�v�I����^<��c��+�2��'Z5c�g�>�wl��ߵ�~��Oj�'hq�Ᏽ���O���������nل��-uj���<B|\�[�r��CQh��������	#��������ɋ���W�N~�=�ng�ᯋ&���݌�)f���q⺟\����[P���>���S��vU�18�ǘj�y�51.�%{���&S���]���!S�����R���Y�P�L9�%���y5�l.��n�#�̕`�w-x	��������{i�����<<�	%�i������hDo��c���AJ6$z���;!5]l��]d0�Z�`�iͽgR�Lb��S���K��$v%�xM�+�4���cy��>;��w�pɭ�2�|�i���������QLa}���jXs��Xࠩ�cz���M������S���X/`x�,f��B���҅����g��3CpF�篢(Nso�F�m޿��q�X�H\*�kX[���'��xug��[0��{��.��K䕓C>�f�F#�Z`{8c��7�)/�����e��-�ʻ���X4�k�S���]��֖8w;'[kW��}o��*3>��q����F�v�R�h��UB��Cw{{�X؋}���e�t;��>�vRw���f��I�I�Pt���(�s���Eה�j�*m|->>U���
K�t���QuU�ן�z��92we%�h��&�\���㣏�Mr,�"��&�����G~��t��{eg2�%6퐫%Y�:<�?`�ۃx@�ח�UD�y��'���vr��]ߛxr�	Neѓm?�s8��}qr�������������P�)��$��e�CXg�O�h�h��S�*�ț��j�4W��3�̊���8��u�YCl�nT��O,�[|���W��XL�
�f�$	Ì=�>�k��LU�D#�����S�kˊ��b�Y�ެ�
�!i���
C9�H�~�g��r��^M���f�R���~
�����"�[r�i	^$���4��m�!�'<�湉�����j��蔮�ON1����1��UT#���d,Һ9�"�Y�it-7��y�T��Y��X[j��]�E�!s"_�oL[1��m�,v4�Tq�_��Z{{zr~bl�J�Ծ��>s3P �r���K�Ζ�'Ls��pXn��i<{e�óW[򩂏K=��UIB(�t[��mqH��U�?ֱI~�-z��.��i�,�I��%�J[&l��}�`��<�ܻ��kz�rl�k� Q`��Z�s\��Aj��uPܳ[kt�%�fWF����A)U�U��WMX��o[�7�Vke����)��!�Z��`$}�u��q	��wg��ѯ�ǭ�e��z
�k&*�W�����<��N�V-E%2|� G�85�Q��5����Y����
�(p��,�ʐmai���+�k�(��kz�?y�����+Q�]�IV������t�b8�94#ʶ6hIVн�a��;=�{�z罒p~��Ҷ!��0�oއ_{窡��1�&�;���$��=�-+�(�� �����R'8�A?ʝ��ߺ���MfN^x]5
�;L�K?X�S�C��;t�>�x)^1	�{L�;����!C�C΁�,��aV��~�.�{��,�X�.�j�)�Y��	�uFAs[Q�%qe�i6��.F����.ԺgUiV]F(�U[��R�r]��yz~�L��c/d��/���衭��0�%�"?�=7�]
_h
��LJhC���ϭ`�I�8$���m3͞'����{�2���Ӡ����luԪdv0�I.���R#�/ K�Q��0�L�:m�I��J���K|AU�H�2wS���"j;`Q_��R6RR�f��S����pi����汍��궻��nu9/4|�%Y��wYG*�U�@�yNu�t��Y�r`������oǽ�ˣ��-�#�,�13oS����%��Z�R�so]Qᠴ���qeF���N\�������S��l���y8�M�-��2R)�Oi�
/�k�H��+4�I
��ɵ���G�4�r�v�x�r9MM�༟��ߎ�_6��7���K���٨���:�#�S�C�>�ի��F�i��E�`O�#�Z
Ci[�v�90_[ы�TeC�L+�����p�
����x+�/��䏍�x�1P9(����V�%8�T�P���jst�sUۑ0��z@��ȟ3G�V9�H��HF�(.����Ֆ"��)��sϟ�8�����`��!��&�#N?Μ�@V$��'m�ak�O�¹WM�nEj9�{{ґ]"X9���j�HT
x��_��Ĝ�]�gFʒH �XK�q,%u*;�9����k)�'�*�Дs��,Q����--��h*�Y
,�W>��l��}�{�Q2��ʂ���C�����j�o��bl����\�#��1� �P=��z���Ua=��M%5){�������f�%*�3̬��ݩI��ا
rj~�IӼ�k��T��@�_1C /���J���[ִh��.W�J��Z
-�>ώ��"M�*�b)�.�2�Ϗjr�U�"Ƨ��'����[R���L
���\}�1��EiSo����Q�o��K`U�B�XX�~���|dY����<��"Fd��4C	L�Q��g��u�.�w�V�����g�"�AL�fO�ۤ��Z<'�@�c�}_Q�`m��	���X��(t��~)����&HJ�^���d��:�jc�*1o>>��3�M\�ޓ��A�o2��q�/�]�G�'D��.Kvb�7-oe0%M��6������l���HB�R�ʊ'��rD�iE��R�H�D������X���+��l���!y�/���}0�Ɲ��1��jP�e��@�ADQ7L���0J�1}@���}
��|�������ۏ$�V���k�?a�x?7ee���JI,��;R���%JCߖ�KD�KP���Dj5��b������VmK^���ˤ/�t�Z$iƈ����KX��&�*�}�=)?[[%9�lޭ<	�:�z�b	x��!�P�zɞ��:Aڛ��jH�&����qro`ti�|�"Eu��_J��7��3�ey
!l��{
i���A��]߼�{���8XD9�"z�_Z:>;��?uvm�ъW��4��]�='Yn�³�4�<�o*����,BM��g�x��ɧ;�1׼��+��>
�#`�"3sL�W���K�a_�މG��i��`L�����#��R�T�I�Y�{%Q��K�Wè y��]�'q��J�s���U�=�c�,�M��h��%������wzz���?9=����ѫ����jO��n2�~D��2J(��,Ҁ6+y�](v-b-&�r&X
��	�m?2Q��n��a@��6��.�� ��[u�=�-� q�.0���U�J�

O��Q��+nG�R��R�M�Z�n!�l�#��P^}��j��k����ޮ_�ۖ��Z��[�
2�U5�
��gIY��J���>Gc�|�K������[�}��U�K�Jum���?LIot�0���A��yxݧ���b���jq<1���s��1�%� �>��Ak�WIV�y���@_��[��n"�m��̦��f1	Ն6�Ve�N�	.<J�C��,T�Ѣxՙ]�k���Ҫ�e���ڒ!�~�哮^EJ���ƒ���ʷ���a�&�5��S�s��$GImcC�}�-I�9s�N�YG�%9��K�$�9�¹���3�r��"o�M�����nma6�<�&%Ӥ�R�V��N1{�w��n+��x�q��h�#�]޿���.pݥ�<����hJl�D��Q]�0{LWt�Ή����A��<���CV��&Z��i��:^9���3�8R�4��Ӧ8���9O�G��f��H�K� %�e{9P)�n,�0rY���Z�o/����_����u�Ϸ�k+�&X�0ˬ�۹��z�mC�I
��&1@��QrgM�-e���U)�x�h���Zi�L+��3��.Q�����D���𔻆�20����`�g�	E3������p)�#�,��&$����察��X��h����رZz9��zVCb#����J���<Ө@T^b.M)�I�w:3�ўgMd�/_�vG�2V��X�롋(dl��E�\�߈��I,:h��1Ɓ�L��<o�5�2Ԗ3��l͓q�W�R���ƮQn����;��t�5{�Pr� A�Lt��Ԗx /��_L�xw����ʝ��7�>%ؔ;1�H7Cœ�����+@���]�O%������	���e8Ӭ�c$�;����ۚ00��� �&�u��Y��y�����s�
��
�-�N8��&�-�:z�뻣_{�-�Y@n(�Gޘ��,O$��*�
�S���%J��Sxu�19��eE|�����n^\���Ɛ� �,�ܸ�
�X�:���8[$=G3�֛+<p2��F�����i��T��✮�v��i5%�W4�z�R_���qi�6�Oin��f��d��J��[�`����/��̜V-yI
�*O̊�A	�zR�c-]D��(�l�>����11+�g����_J~��^�5شzs�k��E.�j+�!��uX?f�ż�ro���+��D���¯�s�cEt�Fa�w'��f�Xpq��&��/�)![d�AY%�����
n)uN@�M�L9E
��/7K#dW��j�=I;�n\IG�D�8g���ap*�(�5���IMq߸��W��!T�*��J����N��+R<"��n�x*�.�_�w�Ö�>0�.�
f�ۖ���֙	t�a���#��3O�]{Gs�/p"+ؾ<�xм��W�[����J�Q�e�6ި�']H#൮VI���G$ċ�v�9�KO_<���d���\�)�|���
�Ybㅏk��;��n9��6�
�B��Bt�h�c1��i�mU��!�����`�R�yn������.16*+ I�m+mW/��6��H��Qz���6D�}��� �]�p��2/d|t��m��Ȑ��y$xV�p����Y�^Jl
�W!�C���Z�v���u^P�����n��#��T�x{ٮ�.R���Z�Z�VW��ݡު�����_��_���^]����ŋ��EϽ�qGAYnW���^t�����'���WU8�~�\�k�{��r5���UH�K��)�ų�w�/ON���y:s�G�}��<V.^��ax�N"Ϟ�KkZg�b��rYV��]^@\�y�3��֥�&���8�$� ̅,8�w��҃�z�-�גo?�Q�qqѝ��5�^}��ſ./.��{�S��_MX�'����ے���H&��$ξH�mu�/��Zo��N$��7-�11vwP,7�"Y���/���-~�Y*>�课GQ�ۨ�vQ�'��2�I_m�hȄy#2`������1��wJ)��g��,�V��ikޮݪ�5�m�Y�j���d���cg�視��/��Z(i���M��rM��3��*�s=\�n>�Չ���Z���Ѣ�R栒p.Xի
7��e��x�GI��y'�8M��zc}��?-㻚��f���o���Q\�Y%‘j	k��JuȈ��DWn���c ��f�(W���e"���]d���llZ�0F��!vo	.��`���ޒ���¢�l��������_�v�����k�z[��{0�Rn
�y*���:oŐ���O��.?C�3V�n��:{��)��B1�Fg�;�����XR������6�ݖ���C�0�;E[�$#�$�ؑ�1���?�I�aE;H�Z��jF1|����9�#�&�N���tW_���u�Ѽ�J���8��[
n�
�=
��D
�UJN��i��y���
�?�����㎸�7�`}H�J���>L.V<��f����Cԡ���dح�ST2�
Y��Ԟ(��f���"�?�,c�j"V�E��I�w�N��LKT���k�h)��+�d�1���lV�L�Н7����
EdËy�I%=:�>�pDQ���c���?x��]��u��ev&��Ü�G]��R. ����J�^�Y
���[��si� jqD�Ŕec�}�>��v��Tm͌b�T��D�}|Xy�3�Ɯ&Z��Q���4�
��ʒ�H�O����c7�q(+�R�4L�'��R�>���Kp���>����x���Zd{z��Pb�&)�d{�Xv������Iq��I��K��~�=�U��\�W�D�b�iN���S?+�0�N���ԏ��@�'
�/�9;^�� RVl�R�K�+x�Y� �ٚ�*.�2�YTfJڀaV��-i�jƁ�J
K��Ym�W$���*�p|-� �x�C���Ï�`	�(%�S%���b�^{�HEWP縂C��4e�~�i
?1��t8����?M�

n�az��T_d�j��0cE��&��K��Q�Ԣy�FmɊ��%� �J��H)<��k�Ji�u�]��tgɱYRc
���U{��٪���AD��I�Ӫ1X���E���3��6cz#{�9�u�6�Nf�E��z�Rّ3�4G2����TH���M#X@35s�Wͻ�[v��@�>�l�_�a��˾�s�3���-�������
8ig^
F�rF�c�ѶAȱ�]��K�#'}땢r�|
�k%�g�k�*�� ��j]���|+���D��wz���|�@��Z��r>:�-�xK�����|7��k[0D���݃V��j@�~[E	�9ya
�6�Aj�����dv��	�
]��!0���Q�Y"���p{��k*ȸ������p˱4u��I�cZ	��g�ip %B��E�BJ)-�|���]��/g�N$��/�R�%�K�ܹoz͊er�LR�殘��I�������C�Tu��}��L)����~:)�i�?I(�|ӕ�-��ێ!�p4Wȳ��Lf\�G�'��ch<3ۙ�*a�"
77���{O��l���ckϩ�y���R����/ڥE�&C���|��Fp����:�{�R!�*���ȏ/��uހs���2���0W��7�ø^�-C͊�t��"
ƒ;�l��3S/Բ�fg�B�u���re2��P�ǻ]�^L�k!��X���XfxtmzdUf�'(\#z����M�(sP�H�<GX/ ~:����i�oP�`
��:$�͔q���,I�|۞�ϑ��������#��P��Ƕ�
�Z�L��ߧ-���5�
��q���#@�U7}��4��*^�����I_tͤ�_zp�7�ʓ�0�M׏�箖��M�i�)X?�艍v�yI�+��?�MU�X�a�f@Y*�9mó������V
I�2�'������^
���ȡȀ2��3������֕Bz���`��O���A�z�ߓF�$�%x@�:��6�YP6��B�@�4 H��D���ď��Hkݩ?H�<B�zݓ"�����ʆ��>��;�+��)�!�=x�����Bz��7@���F�6�'_�'�)�?U�lH���F�:"�Q�mH�	�p8S~���ix��ꃱ@aۃ�!�.�T@�܍w������=ſ���[��<O�5���J��@�B)�3^���;��T�3Շ�c��)3��^�@���\�B�V�����l��������o#�ƀ��uC�+��2`V)�M����$���q��2O�	?��y��`,����I�Ʊgt�&��Z{�r�.�����z���o���v��8c�o��|�(K.�`d��@l�_$XƐ�%�DJ�U������n��~.���6�ǟʐ�k�ã]C�!�M�r��4'�A�I����f�
�Z��j%�
,h��0�[����36pԚ�:�v��u'H��5��ۡ?� ��t���Λ�"����X�'V����H�Se3`�+�9_47<��\{fd���z��r(N��8?��?r�t��M*� }Us���5��ڻ�|�w�{��zQ|��=2�P{S6Tk��
�r���E�'{P�<��I2�~H�b&iQ�q���ΊN��sPI�Z���Aޗ�ԇ�_���PC�D+��8ݨH{ߊ5iW��4�/�9�jz pa�@U�n��a׳���Y�>:l�T˭�l��]��ۻCk����얓�h�kj�Ŋ^�zv�8��^��v��(��h�a͒
�v��1w<�]���6i9l����R�J�;�)�8Дtns��(���\r(�|	�p�:�
��#H~�EY��/i��0١����@ �eD�@�q��'iks���-*��'(�+(.�gzZ��,��nВ����Z�����if����[gT��a{�X,���5T��d��{t����.1�H�c���*���>�-�V-̳^+40+2�����l6cM�f���r�\���]Nt_�:-�k�J��x���P�a����W3��_�шB�q���|��w{��t#c�����?c��|�J(��a��n��҃MÃ��,�k�3��!b�������(�F��
I��m����q��(�h�2�鍱�4O%Ǡ:�0���G~ː���k�Q/���&簛x^�I��GE�<��FM�3�M�� �|�bCv����oCI�(�s�C�����nd%=A�ųpIy�b�+�ʙ�|�2M�̯�X�؅H�p��#�"�g���T�D�o5�g7~E��	EX���^I�M�;���	=��LxBw����,
Z,����<��3�d�)�6�e��،L��X��C�zU���6��	��ĉZ3,��¹qn�]4�v���\���zJƘ����s͠��&��\[�Oq̊~CS9h�Qa��c@���gt
Ų��Az #�dɈe���s�t(꧈�F�ɐ>����x!.#`�MK��x*Et�ڄ�F%	[P\d4I9Hr�^�58\�N�E)��x�F8x�,�S��6�}q'۵/�ܬ��>*��`'稃��.�h��t�Q���c�G2�!�˗v�`}+;J1�P����$&k�$��b����9�{%Mt�5AR0O����)���&��$������4h�(���Z
+��Tl��ea�
�H�f���E��W��$
�c���nc��i@a������s�I��+#��j��T ��$j}aWpBk���;�b�j���~���}�cI`���~�k��Y�(܃)P��AL���VF�X���Úp���ȫ�c�u��O(K@X1�U��;(^�x��:���Ux�ΉN{u]<�
Y�>�S�3��1F5���ԃA>*�`{��[��e�l�B�)�)�{H��|��m�y��&ƽ+�d=�z�~��������Y<�?�U�$��q�n�7����[_/��?�.&���}��Γ��I{m����w��]�(�q$*�M�J��3^�Gt��,��x�.��I�ՠN�Z�J#�G:p�x��az6J�g���$�6�2uk�k�|��gn��7����E��B�	�\�ql�y�K2л�c��Ϲo���Y�O�Q<䓚c�����bk�L���o�3Z{�y��Xʋ���\Q��Bs�3�fU�(����B�*~�k��s�L�*������@O
��ʠ)���U+3l��,�����A�x�����}�c��N/�B���s��r�i��@?���O�謵�����+��S�_�/�@-st��ا�<��K�1���ѐ3�
Eȱ�x("Of��M^$9�,���!K<�A������ꑲh�^]��8;�G�'!
w���X�qԪr��G�Ȭ�$�m4�����g�h>�����m<����㆝��(�ƀ��L�Gr_t	+��s���D�pj(5�Q01k��a��Q"N�K]'!�%;z�nZ��b��T8����Ȟ��̅�1�є�fEإ�5^V��(Վ#�ԁ�I�̂*/�z=FG�8a@�(`�O�b1�	�"�б
d(abV !�~Lre���I%��>E��h��d��7��0��o�I�g��M������h��*�}Z�րp.!+�j�aإt�b��c�=}8|�Se�
/n<g����[��9�w�G�̓�@`I#�2�UZԱV��
8�Iꚝ��6Y�� 8�����:�;k�����zhB[v
�s�j��:E�\��P�~�_�K�&�o:��]ܖ�h�@//���Ξ[�T�v	��8I�>	�`���j��y����{���(���N�z���М�|��Av�(0cf��/�.,EPU+Г+W�
B�B�c@g��׆�u����ڭ���[�rDQ�	l�a�ԉ��_E�?�/�6K"T��ʤ1�&���K�*x��]�w"G�B�y�@�p�Z��0�� ����1o
b�J'�,�7	�7� ���(N��~~��a:������ؐz�q7��qwi��!�@{��VZ���Oa�.�4���$�IZ�I��@z:�Ke:�o��oH�
��(��o�67��V�,k]=��Y��C<�T�[ӂr�����$�Yg����`��
��J��9f���E9Xs�`o*�Y�.���:��􅤷3t5k���0*+L�-�j��{��ەF�ǎ���<�Xw6��0��5��)�������ļMŅd��٫�gW�x����g��	��XHD
�x
�(Hc՛֫x�t�ţ��۝x�"�-p�+gl\�t��X��e�(�}��9
���9�ԶJ��*;;A���1-]� ����쑡5	����k�`s�:�Ô�A`���k�/V[���*��o��}��h�����=��C�Zj�&�q���dy���0S�NY����d�{�Y��TLA�0�M�с�@b(�\�"B�6�d,:�6&��� Ē)vB���V�I��*�[L|�[SDϑ���3ND�A�R��xy&4*4���T����P��F)��YW�b񕡛2H�D�����z���h�P?u�5
=5Ƣ�����Ϫ�]+4e��,;�¯A&
�Cd[e1��32*d��k�BI�,��
-�e6�	�1y����PGn��;��F�Iv�c.-7D����F�(L������VU�:S��G�=Y��5A}��t)�l�t/vR�ٽ�,�J�٧��������{�Ԡ[
Q�v�u&�k\������
5�="�C�b@g����x욂�c����g�쥱%O=�{�9��*%L�$$�x�D{��IQ���:��]�N�߆^ŗ�ͬ}�"��%����j��,d-���C�)B^�:�����g�����1�,��DҎщIpV@N,2{{��U����s�eڂ��W�����i��'��Q��L�p�������C�49ܚ��H�-�H�٩k�%��?�4aw$���~�~o���	�$K��A�F��i�LXu�02��E�'T�W��Z6�. �@�+=��ê�����>�a��B�L�ͯ���y�?
��E���h��gmmm#���x�t����=�(�U�&�����孻4����N������ -۲Y
�����]O�u)˗}��D��4��L��H)�X�2����Jʜ�W��,�,�HאQi�rE&���h�8�(G
�Mڔ���y��pJ`Y�����R2v�QbE�>i<E�(�OS����R�L#�1G���p�<-35(��-�	X�72���c��Fפ!�ƾ�yD�N�w�{!��]uX")ta4�L
����B����P/+}6�'�Ō��$��޶�x([B�ha9ÒI^.�iz�MP/�LY��e���C8�U���&*�g�5�c��L��7
�1W�%�V��d$b�ߙ�jW=�~0'g��$י�G%��(]��w���8�.�����o�o�N��ݨ�J��uZ2�"��e�{o)��&6�ܺB��B{�ҵ���M��Ʈ�8UI����,6��d�u��gY��������i����J�<�������]E�y?�aT����?̞�N,PU}�S	���N��S��tϑf�@�s&�!��H;�P��<��AS,q+Q�����X�~� ��z}US�M��`<&�j
��j[�;ʔ����u/��@w+�ʟo0g(�D��h���J:F5��4�����"��f��U��=ުwk�߰�
#�*N��-;����m�tr_`���߬�����h(%�߬�>���y9�
��t�=s��H@Њ�^���2��8���@7v�ۑ�tC��0�׋��������E5$Y�^ēiQ�!����c$3�yP��P��J[�"��<� �erGd��䝎�!_�Up��Ш����,\�=S%e���wh5�[ӷ��\�G
t�F�<�.Y¦#�#PQ����.]tV������P��$���HuY�#�S$��ُ�c��j����br4�i|�����
��ֆuU�(>KIK�Ջ�ٲ"i^����`B��c�3~Y|H��Kj�8W�G�:ND�G��F��g��Z�ּ�����~xs���,�k(�{�=8�����wo�,9n�K&`m�jU'��|��`�8-,*����ގ�4[���Z��_�u���3?JB��j��WX��<>$ve�5��$�F騢2�n�1�Y�U��z
��d�ݜKAs�ě�e��Bo�jS>�S�\/0�vڛ�g�g��BC�֫���8M,�������Ý7{�u�a:^l~ۻ�C|��D'�/6[\�TOқ1�DdG�IR�S�\<��h�ȥ��\L��v�u��	c�촧�b�*,���+�Y������	�h3	f�Y���g(}J�uM��4�t;�tcF���h�V��H�ͫ�8@κ�)�
�x�
��,��
%S�$8$��g�o�S��Ywycc�-�閺�`"��{��dJ��Rm��
]��|�3��-{����s5��1\���P�����L�Wp�δBk����tӵ��^n��Q��s����Z5R�bT7�]�RPk���V�����s�x,�gd����a���!����a�5N�A"��˾7�S׭`�<`6��O��9Z���<�7=";��"���p|ӝ�Q�9�0"y�&�*W�(���
�[^�7*����U��"-u��><1�4��喻d�wMz�?��|�Af��G|5�tl&��H��ZD�*�C�r$��]L�&���D	��%�q�7��k�z�w��z�^��	.li���s8�%�0�I���E��I�06/��ar�=ܔ
-����c��܃�����VTzinv�S��v�ZØ
�
pg9�C��a}�ggÒ�t�ث �e($��%�ka/�d�(�-ij>^ve�	����� x<.���,����Օ�@�W�n�g��y1W��޼L��q���3p�k�D��:������0?�Q�6�k��L�
�_	��|l�6�/�,�hq���%=r�C��15��WG��1Eny
�(]Љ��F�r-��(%�sgk5�L�+�ŴfI<Jq�^��>w��5ʉao��x� �f�p�f�I�d���{�o-ָ��|�lڗa%9�]��H���M�pv������͎�s|A���z�&�Z��;��F�.3�P��(�?5�W�o���9���l�FM��`�����es@��C���e���A!՘PgFAf��+��C�U��h}�yݬ�L��L��g��?/��!)��5�#P�rU�)�P��ѓ>L���f�!*?6+�mƇ���T���J�_�?&��Xq[Y�|���z	8�<c:��8nZS�q�Fx���C9��ӳW�$�?/(��䈼vbMU�k#�|a#�]��~o:O.4�zQ{wK����E-����4�B�mT�A���ak�f��f4��
��`6s�9	��o&�%�5�"鬺�+�!ƃ���8���BN�ײ������Jt����33�p8�� � ���+�X᪥�8���W���z�2��rk�VY���o�F5
vDE�3Q�0r(�{��Bl�*Eɪ�n!�d��n�`�"����"���(�y9���*#��v'+a��b\E~�Z?i��5�K�ٔĤ�(w.��\k���'����3��I�0��I�z�S�;��0�����j6_�,�Z�ײ%}�$cR��M���^E�WC�y�y��*��~��*[
�f�_�ɭ�Z�SL��`�4_79U�H��Lg�q3�x����pޏ�I8g�4Š1��}�,�&J#��ݨ��s�o�����X��c7�S�.�$������iA�Jm�q&�`���͑5�s�
2`~"�(za��'P=̢�[�PK֢����|2�х5^�*��������8|�鋋Yp֫,9i"g_y����fˇ��{iq:9�����T���=$��
�KYew��⛭���}��ݮonw���&��5"U\B�:�|oo�R"
E�}$2��gqK����Wd	�
T^d{�����jtu����(7l^��|Y�E�UY�B�:���y����۴�ߖ��ѤW����qW:ؤ��q'�ŗu�,�ݘ^M����5��R�C��}P�W��z�WV�Mv�dz}W:��x\�(��-=t	4y�d���ye����K!�^�<O�^$'4�#��x�3��i!l�jl�Xk���z>Z���G�|���`w,ۑ��+sdHc+��O�,&���9�	��ȇO��G�.�,sg8�J���l�L]��z;+�0`Q�.m����]b</�LHf��L��.X.5�$���S���=��Vp�iq�q[�O(���I�Q*��|TR̐��-\{�
*�@
����dv>4gcr�Oݜ�؏�	Oo��n��Vȗc���W#��:�/$
֕�r-�D|(�nOT�8Რ��򜂰������+�>m�S���[Q\68UJ:���݁����Z:x�Zq����J��#�/F�?�f�|�4WM�g����b�[$
F������~�RP����#�AI��߅�`էr�W�M|c/r�u�bU�%�j��&(�
Z-�T��H�ٯ~���lc�w�{�??�tr񟟮=��g��=� R��z�	�?P�u���N�O��,��p�O� �F*T',㡹=ICl��	Ӊ�J0�49�L��߈\Jy�pY ���Y�n��92�[Bt
�Q�D2ǀ>�4LgĔ����Y�_�7�ޡ�;�R�,���=s�O���Td�>�L&�{x�e0dY�+C����A�G�/i-{e�A8��fO����SŐ�2:k�N�1�5�CF��5P.�{���6Z�P�u�ٵ��ћ�o8��=��{k|M~G��꟥|��!g�Z.��.yHʱ���=:�f	�}�,�9��w��Տ+�CR���8��(��!�=��
�M���/�<î�n���-�m�n�=闸(������t�_��e�K����=���[��T��d����R�H{�^>G�א��k+�{�k]G�/�\Z�t�w����-v.*1�B?�R��CѺ�u�*9W����[��{�X>
��|������B��z�,/�t�KĎ�5�@�g�H�RszY�~����]L���@�+k�Mu�.1!��Cֆ�F(���o_XvҐ�+�4�x��q�
�Y�t]ِ��ښ�[nR�Ƈ÷Nx��XӒ�iŝ�:K�Ƃb���Uii�F	`~��o���m_�Y���t�X��b�?"�׽�_�>}����o<���0��/�0	'AQ��L,	�_i�"�K�1��O���q�po��)���
�c	,]
A
����,���4#��By�A��y�X��_FZ��`,���$g`ђ�m�#!h*�.]�e@h.�〿)E��896�>��~K~�ȥve�S ;�'���d�^�I0
}�B��w��)e�H���U��10����׻N�u<\�Ul�.�l��N*�t�oz�l���@ �Q:tJ�$���g�
���^�%��jyu��D�v�Ӳc�#�\28�+�	/�r:�[1���L<�p@�S���̷��
Gu��?�\�s�~���p��Y��8���[=*$�h����(��kf�tpr`5o������s�E���r��O�aW��o�F�z���[�(`6]@tg�|�J��X]}�"9��F��x���#�F�Bo��J������)�l�P��.�`gA]�"�`Qϝ�B���,˝��xd��S��܇�~�� ��򆾈C��(�a��Sۀ��'����w�v}39��;����Z��re9�C�j]�&l*+1�|)|J~��^ru[\��dD=����zm5�Ԑ��ދ��������X%��ۺ�,B9�F�?�Aɟ�j{��U
���I=ߩ�d��7O�D�g��S����r��	Px�\���з����V���|����]j�~��izv�W���*�}�\�����/� ���S�/����LD̓fƒ�������6h�ČA]�xvHt	�E���D�,�0�!���nB��L��N�Α�P��\3�����C�\��6A���R�"<7(�"Q����%�(�@a�j��2���~���8!�̤tCET^��-���|�	wD��2�=�I��8��<g'F����ɤ�u�Y�p����8��º,v(u�%��	a��EB�Z��xT���hs���z:�T�UF�D�J�ɜ{���80o�u��Z����}����ZUH�� �YDfq�4c@�eCLӫjJ�D~��<>��Mj:|�"�i�Ɓs�6k���x���)fT̍���c��3
q?yWKN!�v�e*M�"/�'>ߕ+`�EP�O�e �0vg�e��ொ�G����A/����S�+>돚�5��+U���|�g�Ϋp�M�FF!k3"�l��
�=���l��q>��
2耋�,�S:��o��|���v�H����7����,�)�;�;ov�;<x�+n͊Յ����)ED�g5'/q��z�g�I�SY�v4���V�N� ����`\�Q��5�m�U����1,e��ʜ��i�

Ⳮ�?a��=fU�a�ʻ�4��kqK�jʏn��$nyh�enA�ڶ}g"�p���dA���B+�5�﷏���_�(�ŝ�O�;�Rm�b��y[ܑ�]��|ۯۡ.�a�h렳^pP���+�z��[O���ӖG�9EZ.�P���LJ�Vz���Z���������e�p�iU|�⭷��p:*7�N��Z���x��
f�m��/�#�dQ�
���i�߅��C�E���:)�-y�1‚���Zd��*�+eY��V)��o�$��cX�xI���ޖ.�����A�hi�W|��P��ea��_e_`����왜-|���(�m&��%��[�N�P7�[mMA�qn�ˁ��cH���b����5���3��[/��W�4���kg��=�C̱�jX&x�ڡ�f�l���tS�0���b��t�Ȇ��He��Gl,����`[���!���)��w����l�h�3�����j��a�k�F�^X>CK(P‚�Pq��N��̉��,������;��\����W������x�.I�nC|b�!��p	:���Ȥ�Ju�	rcJ�����B/Pw�w�s�vo�I���o��}�(�������2�bl�n�b��|�:�)LL�<�gems/cache/ruby-lsapi-5.6.gem000064400000146000150403134160011627 0ustar00��'d���,��^�����j'��p]��2[��N⌽cZ�▬���$��9q*"{O^m�H��k��|�e�AM�W��[�nl��}	U�r���dN�H�ĝ�7I��	\��/�gk�
��o]�bK4�_�X#��5Ň�����;��!�zԔ��K����T�)�ئ�\Ģ�b���C�7G�Ib8���=t��BDZ�B���@3$�ȱ��?�L�j�
���� 8�je��U����_w&)�+8�]��>+�-37K�}n�>�xs��OE�ſ��3��[S�Li��#Z�����¢�����~ ]�.P��`(�7uVY���f�?�)���,I�a�;�G�aU�'�+9="�� �*HTA>DuG��5�s6�GT����ѐ1�`o	���h��T*,F�vI�X&Si���#��R��760��sV��
���k���~���f�����&�d>�
{+ܤ�㷆�8�F�K8�.W�Z�F.g@��x!J<��Ɯr��:�'�|!Lj5/;�F��K6� $%<���<QC;*�V�R>*���V��U�����+<�cACK�)x3�{ y9]����Д��L���`o�o^��$���ߓ��Z������������57��u�i�c�\z��p>���(�r����Q?)I��������_��f0E/�Y�]y��TPTݍ5%_�8B�:��������*�4�������d���?�Wظ��Ư5)��N�/���3`��K��:@�潏Qaޏo��L�,����4'�n�U�1���º��L��q�
�iy�N	��j�����ǃ����'�x�ݻ������[ps��o;tu�5	��Iq���k$ܢ�`|&ɺ���������H�$f��2�8�S\���#����S`ya)I�1Us���%�r'�^���y�B��,<?'�7�<��$<e�:8�T�*	�n��],�m���̝,`�>Y���*4F�����t����8�w~�c�
A^�8
+u�TH՚N�u=�/����j���L�G0vU��g�E�~� iӑS�;跫m�Q`�#��0� ���pRݾ�L�
��t�M.toQ^�gp���!\��o�H�}� �,z�a=~,��>̀GA ���HB$8�
GA+g-.ra8uvbF�@=h,�����<ϴ+ꨀ�7�u��R���� �'�1Y��7bB��d$�p���,7�z�(h=����.<��
�[�`�������R7
�8���9'��:�V ŪStY���� �V�1��$�ĩ+E�B�#���#�C�U	�������� @�����=��V��Z/�eHR'�u8�OD4��e����{k�}nGÞئ$�Lvc	k�G7��SF��J��l��9x�U�\΍M��w*���N�(�y��iѸ𞹻���*��ۃ
F��x�v���q��ʠ��.�Y}V��sD�f�ԯ�${z07�/���5A�4V&#y� ;V8�,�M�����T����a�w75@d�iz��Z�1VRؑ���LX��d�7�Y���|ӟ����h0�M��}d
�D�n`����4��(���(_�!��������`A/�H�|׼N�!��1�����&`�ɓ����ޚ��G��
���^ם�?�9���Y��l���ƒ�������" �����ZKyd5�?��Y�$����q<ŶƗ���㦊�+�gKY���(�}���_��ܿ!�SG�L��^������C)h��`���6�S���<�2��#-�'���x��>�Rf��r&X6�K�V��뾸+���$���RL��|Z?���e��R�3���*�UJ����Jv�����R��}VC���M��	۹���~��C�ײ-4�.n�]���䨶�f�?��W`^?�͏t��g��2�4����t�рI�>�\*�X���u2���e�8�
�C�Ŏ�Z~َ���A���Jj�4�T�uߒ��K�c8nZ��
��U�IG��ķ�4�KC����s���f��GG��:^��O���	����_z���#��Roi!�*X�m)
���ӷɞkb|"�-+,Ԡ���pJN�y�N���)�B������N�W����|$��s����L6���考�>��i���0��,#�ί�VWM�pv�7����%P-
�uk�7��KRs�Ngq��m��l�N�U���l����Z`���o:�(�����D�L�5Y�K���ڴ@��f��:*Ɨs(�.���/+�`[�Km����9:�\Ldmd^�Ս�p��Tg��l�6 `�bg���h��j�ݐ����H̬sdN������4Lg���\̱��/�'��n�J1�1�hXJ(�,�:��r�*�̀@�-u���g�&;o$��VW��[���P@�-���âfOKj~O�%��wK���X��{��V�]mk��պx,��v]���V3���D}��\��{���~w ��T�p�;2}^i�����8�^��/��U�r�z��y]�T�5�;X�[����|x��ש����}cC1�0+�c���J׺,vY�cڌ��a����"������k�&��0
�$'+��,�1^)1�!�]����c9�����]@�F�ijU�+�#�0p�9�v�
S�)�0'���I����C�8&��`Vab�*e��x6��f�%��E�HZ;�MBz�M�q��GN��Wl邊���"ZA}��n�I2Yu
3J�t�d�
�kX�ꗹ�<�b��0��D�亃!�G~J䯬�%�^��p���7�߾E�p��yRmJ�Vд62�U�홛�md��@�������ˊZa�1��r�Ԭ��T�h6�+BE̦������~��B^eByZI�X4_�~�������*�X9ʋ_93��c���Ս'XII���(��I�'�_(o0��&l3���#;F�'����d�">��d� �+d)��'�3��qW'7WtrC��k/����,�҆�Vz/*�4�<�mW�&ͽ�p�]��B`�8�L��1��ǭh���4�Jݺ�?���i������ᨈ<�{U�"�@
���"�<��@>)S,���<���{:�r��Tr�#f:�
��*��.²���%D�d�Z͚!%A�z!�]��߷5�������Ƀ <�!B������G%Bb4�<�ʃip�����<NŲ��"<�_��Rd������ps�s�4!���<��-������9�p�N�.KjdUX�ZD\\{����)��!�B|��`}��63S���qI�#;Ŭ�7z�x^q��S$���U�;c�6�}jr�VN�8�Ŀ!�Q�/�hZ2$���x[aL^A^A�RfQ�j�Yw�NF8�K�т%��MF��W�$$�Eb���[�+�x�@X��e'�v����MKJ�T��������
�3�G�x��۫�i�̴'^c�x�@�$�i̖�hi��"N��$�W�!�e���j��[�ה�f�"�B$AzF��(R�Zd���r�U�P���v��f~~�V��PIeQF[��	�W7�F�"f�
ɳA!�����S �š�2j\iX�t����A���R턚���=�t�]AK�A��DŌ "����D�� ?S������p>��7dX�N��!Y9$���H緧���S8��I�`�!��ּ��<��\>�?˚�ܿ�He���
� $|0(�Uzo�wh6��.
C~E0�z�d]�(����|�p������D2��ؽ�W}+�F:%n�*�'j��Af���=��ԫ��گ�JY�I4��%�A�I��/��+�ލLt�y�L��}��8�N��s��z��P�ؿo�k���V�"�ڸ�����I!$�U
L\����SIQ$!��F3�9�-+AP�Y��)d3s�5�U�X��W��J��=�^$y���g�v�����d[�Ri�Pu���72l��������?���C�D|���ߩ��Lԣ�β�a�l�=�SL�=�hy��4Y���N9\���%�ŒX�������3��������hH�1r�-�G[�H�к� ���Qe+3�Kg�W~pϢ�夵D*�����:�0�*����P���+�oQ��n|���_�!�|�L�vd�_p�D�����}[�uF_����0�]�77�E�^�;5�.�pTrW(`�9}"����yP
!\3&�'[�ޢ��4�>�^A?0���vO���u�]OuE
�>j�p�D����7��Kӈ���ٺ����b�~6�1P0��q[����Y�C��,a%-1��m�/�
��;y��v��/~xw��4���Ԭ��7	f���,Y�jNh٫.�i�]o�ôZ�X�HSn���}�Қ_&�j�a��<R&��Ұ�j��w_�B�J1���+Ny�_9��b$O�CD�Nw�<���z}�q�tR�4h͋��v���16���=�Y��i�M�ą�2�p�a(���C�ݣ	E������~#��0k�lp�iR�K���aDbL����dЅ�-��N~���n���=4ݷ�5#���K#ǚk�d3�8�����jX������l��lu�����6���Y�AbxtV�NɊa)�@/����WŬ'�:,,ӯhS%~G[�0��*��
@U�2�N
�j��8"�&]9�@9�̰}����i��Q�S�4�����A�6Ռ��������?�V�\<?�����~�
,�;�毳�X�kO^�ۙv�x�zB�4J�ګ���9Z*<Ҟ���MG)(�pTv�T�v��
Δ2��j�jG!���~�)�n�YG;i���sߛ��V#���P�{X��ڔ�d~v^7qr��@{��W���R�[.�Z�f�2s�hb#�k��ږ���m똚��{'��e���d�D��7�]gָ�4�f��\fܿ����C
⋞�K��o|!'�́7��Tb�s6�\>�Yv���4����z��j4�yz1`1y�%1�wG:1�T�^.&q�\��u����ݮ1_Lda�2�Q�Nи��2�S"�'�����H��i�.��;�7�7�w<'B�RW$�qz�+�J-[9ch�fuCR}!�q�R�1��w�8#�]g���z�ɬ�
qZ���'!)���9���� ���i�x;�fC�A��L־7��0'�����NO�
�4���A��|��mO\���I�Ѻ;��Ԍ��)�%��(�U|�Ĕܝ��o>&�:#��TL�P�	^�7J�N�|Dq�=�]�ԛ��$�����Eh.�c��m��o���,e�9b-�6���JGa��m9���]7S��dB��j
������H�]`�l�^�3fs��!�F�B87���b
f�x����)�̍� �m-S��GMkU#'B����%���E�^���y��(��$T�^Z�S3�)���H�@�?
N�}*���=�s�yH$�mq5C!5���@N�eũ�'�{���C'�cC@#���O6�v�;�+)���Ge�����Z�P�]�"���\�Α2�%���Ҕ��J
��'�H.b��`�&�gE�D?�~j��*�|Ba��]�bd�	F������3м=e���H�
/
9�K�?�#��pIow�R�F@9�=ʿ)�h�=��a��@�2?��Q!���Ȥ�hS�Lt$h� �~��	�UxN4=iQ:{No�Ħ�4;�0��R5�,��Ԍ0�
�U���q�y�ިm=�q��c�C����znK
���A����i���ñUY��1�(���է��������F�ռt�<:�>�p4�9x�{d9Bt�m2�%��A��?t��!
��h�Y�2ҧ�M�Ok�iן��Ow�mU�y�7���á������;�~5����	q����S���j�^��U�(���t�qN���П�Z�)}�H�Mηm}|Ɲ�<�a��� V��;L�fޯ�	z��v.�f�*����Ƌ�/�7V	�8�?g��YC��2Y_����Yy����v[_x����������3lZExzt��E��D|��n}�9����o���
3��	C�(Qv�59?�S`"��bf�u9
���q�*솮�8�7��S�a�o�-:
H6����$j2[���xn�_��=���ux�~ �����-_��u�f&6�>��ñSfMM�8�59�c��X%x�0�}�-��ޑxI[}@�w���
�O"K�p*����*�s��~awW�6	F���VWe��햮���a�q�����<XnV�
� �y�8D
�/<�����ɯ��z���n��U��X_�8X�'�xM&�E+�D�+��u�o�s ����đ��D��=��Ā6G���}�TGo�=L������]q����c}S4kv	DPX����BȺ���D�\� ���%!��C�(���Qj�Ob���)����ʁ��nH��hݹݯgo�)�GJ(h}��u4�
G�)�R�L���r?c�)ѫ�Q�-';,�*��!ʸ9O�T���0SCV—RK��Ҡ�]o(���|�?�������{�?�?x�#���ߝ�j�dx^�/��0>���@��ԩ{��F�aZ;A��~]���������sQ �Xe���o(.P	�OW���ɑ��1�m�V[
QT���A�g��w6��u�-F����oK��/��ҫ�{@ሼ��=		F��
k���gզ2��BG
+KY��M!h�v��PO8'Y�_���B��������VLlL�B��(ʫ�_��A�Ș���?ڭ!9��T�v���%(�%��`��#
��^�2�UJ�↼)�ٮlpUF��܁������`n��
��t`�*�J]u4��4a�fW�``�+������?�>�|lW�"���j�饨�Q9n�\�_�Z
�^�c������|������t#�����_Pr?��޵�:�͟6�6��`|���%�J���"үI`�D{��+*�_,-/q�]�m����	�t$v.U_B_&+h컽�&G��L����Zl��vogw�hu�Jf�L�lP'd���=���JV�h�s2
q�.g1��p�˲�Jb�ɦ��>�q��/����,3G���	�<��oM�y�,�fA����.�0+��iLUue��U�g��B6��G:֣�J���@E
�Ҳ���`�NC��=\9Қj��@EV]Yz�T��po�<y:�Z�A�e��_�a-}�Ŗ\Y�z�e�GyA��>�w��n��浽gl��a`2 t:!D�i������bԔ���h���럯~�?����Ke�Bchecksums.yaml.gz0000444000000000000000000000045014442217575014616 0ustar00wheelwheel00000000000000�}�de�;r@D�=�^`���Μ�s}�H(G���CH�@�O�z�?������^���~�y{���-�y��x�r�L��N5"1���vNy��}�>��O|����2�Q�SL
cqD\vY �9�-3����ٟ>i�>tM�o8�[x͉]'?Ղ)�<I�u���%K�d�FGn6UQ�an�h��2u;�ZA��4h�Ap(݃ �͉s�i��̫m�R��b;��M�|oK���Vv�J4h��]��Xs3�魄#ԫ�n�is�'�ޅ����1e��gems/cache/ruby-lsapi-5.6.gem000064400000146000150403134160011627 0ustar00metadata.gz0000444000000000000000000000102014750162533013435 0ustar00wheelwheel00000000000000�[�g�T�n�0��+�^�',�K *Q!$��H 9�dc�v�V�g�d�Kw��h�y~~~oQ��O�}�諸x�F���Q;ˬ4( ��!�Q���ĉ���x�^�;��L��{�`|�iAl�Uo��6����F�V{�f
}�U/5q~��ZIպZ���b�������/��m�V�<
��z�Y�m��#�(���6�R
��3f���ձ?��AO;��ԃm;�f DH�H�D���e3,*V�PTfgK)g;��Su��<^_]��x�ljA���3M�t�j��A�T���O,{�ο-v�?N���t�1:y����4dN�=Y�V�QF2jn�������%����qӰwG���cEYn�[~�{�����u�QR�H�~��ˍ0W=���ǚ���]��.��Y��=
�H��Qt��~uF�<unҵ?;��o	ɼ�*c��~�y�/����?�}����\��qK������li���data.tar.gz0000444000000000000000000013522214750162533013367 0ustar00wheelwheel00000000000000�[�g�{_�Ȳ(��=�f���M3+��C|��6�X�\��-�Nl�K�!����oU��/�2��Y��a&`������������������j�Z/�?���1��w_�l�G��/Z헻/�=���g�AZ��'�,��O��� ���[�ov��Om���l��A�G�OY�a�I����꾶��V�
���������O�@]��b��\�QM�kG����a�2��j���I���Q��Srx�#�(	�YZ����& �8�H0���0�2r�ߓ,&�4�]
�,H&�( a�9�xN��}�HT�ۤ�[� Q���?�?}O��]]C���_!��0	�SJ槐��݄S�Ŷ?�<�'Q8����u������@�k��"��э];��?#7�D�aG3�ĭ����4HI� W��HSF�'��5��Fc�Ƴ�ğ��"����T��SC�!
�(�asT�7���8���ry?(��0�?
{��n�Z�'�c�1����=��č����rT�y�豺ȁ~J|�*�|>
G~��(��=�w<��j8g֒�5�.��>!j}?��d�s?�8�P��f7����&��<���=��
��|ϳp�����Ϡ�����_m̧�=�pL
��Ƿ@p��1��c�r���I)�m����K2q
�&%�uG�s�D�'�A�ǔ���NJ�
,���cf-�d���sI��8I�Yp'�U�,�ῌ�Y{@'��q��p�f�i�"I)���
��d0�8��zBz���xʫ"��ՠ����IB��+�NY�x�MsjCU���(��M@��TF�h%\g����M��_�����mO�,H�Џ,�l���N����$۹?�;��b{~3'<�D�B��-����@�"
jg�7`�
���m���=#�O}L| �+�j�jFY�,���5g�'���bv��8���qcgҽ&�~uϸ:L�L"���p�Inq�������~�Y+�N�Ml*�(�a��I��m�Φ�Fѕ�aM�}�f|m��DxT���y�G0C��H��&���m�E�+?Ur����I�t`�ɃH��L�Im��� GT<��m��3��е0���\�X��i׭�+��L|�l&\�k�A�Q�
6�|�;��?-gC�,L�Q8	Ɖ��Gd�U"�:o��$���X�Y��e<����:5LJ,Daz�f�8�I�m2���im�� a<�+�
姛���*�44�:�5'�YBU(�6� ������́q>!D'jr>Pg�M���@t�qNT���:�w�&��3%�@�H!Љ�1�j�@W�Ac���☥(��f�t���‚*��A�-��bQ.Ft��u�S�b�����	��{�òC��OAD�J��(�\�i��*d3Z�-�B�M�\�\K�w�_�~��U{��������h{T�PG�"�R���W�Y�g ��������3��su�:�<�n�霍�,��0o)�#�"�\�y��S���� ��C'з���@T���8��"bI��	Q�?��1�d��0�������Z�����GF'$�
*��y��$@���.�R��Etq��ٶ��kNN(��zJYM������j�`�M��0ל����#�͕�&Tʤ��o09k�������aw0�w�oÚD��|�\{#Iz6͔L_p�6�'���Q��6Lo�z�$�*��5hĚ�I�Ɵ�jC��l�΍� ��D�j
�����>n�u�R���I��%L��w�����l��w�!��}QS��NX��|�1��Zs����ش{�S���^�c/ϷWl�	K5n�p�Q��#G�3��'��1ΰ���U2�Sl���M氬��R�Dca�6S'��[�e�Zy!g�a�6���8L��[�>l
a$�,f>�,�,���mh��A��g0�3�_N��-A��0����kh�V��m�H��)�`��$J��v�P��W���3�Z(MoG��*�tӖ[-��tS-+l�z��e��}��[S?�ގ�����g��v�);h4H����~�A�B� ��w��)�y��x~���+������~� ���Kr
;z2�-=ž>���5�1�h���_i��J����:�N������/
�ֳ�����󗭿���wOvi�3�A��\���t�fڭ�w����&l\���Gk�6h�4%�� �S���3�-@�"���$y����r��g,��J��[LPʡ5�.*ž�LY��,��8y�zk���㯟�����C��N�J�y�1�_�h�u���4�k�9��r��^��_�$�bko�Ë��v�4r������!(���oe�s�I3X�wn��������t�����w�Y�tc�Z�u�~��ݺ7�Ä|��1�o2���~�P��3��듇����6I��rـ�@�x>�e��O�%����ܜ��Ϟ�5���9�gg���q�x�|�.�>la٭��6�^^'ki<�dk�Ѡ����SȢs*�/��t�;?#��M@2�m��Һ�yxqq|�9��}X䷎h���ְ>q�]Z}����	��l"' �7�-���_���7얷o�d��v�5��?��k��?;�tD���[������hg:%��Y��b��~0��~^Q'z"��!��#uL5���Đ6�_@"�Tk�Gz[�n?�Y��Ղ{C��9���Cz6��j� {�i�@_�*EKG��f<�
2_���[��ufU��,DGjp�M}FOf�F#�3M�p�1nD�A��%5I\8��q�r��9s�x���ډ�+��&����
1ZY���Y�ژOw}�����
�BC�T����<��G�"e�� �!������3��%!0&�Rb��$�C��'��h�d��&�o�4�ݫ
�dp~<�����|�?��w�="o~#÷]rx~�[�w�vHޞ��jE:gG�z6��\���Zg5�hF��7�����y���]��@�wΆ��Izg���G���&��|X;��
���I����c��?|_;oz���o������:>��:���/O;}rqٿ8t	v�78<���u���uh�t�
��m��T�e��nQW�H�t�i��洋
�N����!�&�t��N���E���]�K��[��t�~	� �u�uN�k�%�C��~��d\�{��a����Q:���{��9=Pb]���Qgء
�d��7���Y�l��//���4`x���T=����
<�=�@���M���.�����R$�(v8T�A{@�a-�#9랜�N�g�]�=G(���Uo�z�Y|h�v���я
�6�@��1���C�ya�A��	%��[N����N�V�.�D����Q��{�վ��0
�T(����a?�[�t��� ��Vo>]���A�|��=o$3jh�M"�v�F>׾��NЎ���>�I���v/��%m�)�}��I@�s�2J�iG�~9|{����+a�΀W��!�7��k��v�N�o���z]�ۮ���| ���wN�uķ~�����WE��P��m�;�OEJ��{];�?vՌ������J�q�V�<h:�����s�Y�h�~��C`/���I$�ܓ�v?@��(�j{�{�I���'�D<W��Z5��xoZ���ӧE��Z���Zmg���f���`ϼ�Կƥ�Y��>�i<f�$��:�.ȯΙ3e����ܥ��N���E��z)u��������_��$�y� ��s�J�<�ָ2��I6M��kCG�4ɋ�2y�tOzg�q�	�y2�*�k��E��{��*���U
q��N)��U
:�����Ch�oB{i��;�;��|R�`�B���⚬��h��k�Y�ԃv�e7�V3�
�2R�����x�셣$���E���o�|���á�2����D��20����4sp?���;�n���7�=���F~��ţxJx	d+w�����i��<`i���$�&hKڳ]/�r�iqT��Q3�oQ/�u���X3�m��b&PMN0�y���lO��&��������xd���O�Գm��r���v7����.zK��7��mP��	2��/�sG�xL��[?��0�"��e�-���c�0�c}�G�aY��z&4�Pq�0���p�O&{l�>�i��+w�GsѶF��lR���`���q�z����4�&qӆ�J�������wLCZ��1�R��[�2'���cu#e��:
t�[G�wC��f>�=s��|��o@�/٘��x�X�7��FYy�Day����ʯ1�c%Z�@���4��G��$H���&%]�ѥs���ms��4��]Z��$Ό&��;kyu��A.���_��������O��>{�z�m�����s�;��v�}syR��*��U�/��_VῬ�Y�����;4Zy��t2�� I�XO�2�TO�� �S=-�OwP�6RG7���I�u��l�:���V��\�i��qAOi;U^ųq��v:�!�Sj��.�z�u2��w5l�$�Q�O�,�xH_YIX
�ӳ��ћ���y��2o�t[�4���lG
�<�H��2�@a��8��m�na=N����-�:ȳ ��F�<�x��t]Prg�6~qzc��\\�v-H,���F�Y8��U��̂n7�ݍ}��LѶ��^P��O��P�j1��)�S�H�p���I�Za�%��=&�*���0���1b{F��������ެ)SYhDVSǠbM�:�qx����MRwj�ې=�:3�A�ۈ� `�ɍ?�ӫ��j����[�4�$�8�8�Em��p��e�P��j�n�K�9?���bNKhF��%r ?�%�t:�_rsy���p�������?���k��{:�l�������h�3��;KM+��u��,vzHO�y�#@/-qNn���y8f3�^�b����p;�m<�y�ՙ$�Ÿ��t���^"7���SX��6rs��~��C�m��RYH��XP��a�W\ -+r��!^���C��C�&�{�)Qa�����O�.OO�JصkC}�Ԣ��Z�k�]�>ik9�7��%��8	�4��z��6K�d=K�Q�(�1�ޔ^s�-���x1�{��jq�,tΆ+�B��Q'�ù����ʬo̳�$��
���[�:����K���&��H���?�a^��ЍԻZ��|��A׋0�r�%宧�?�F��кA+�N3���V>ft�TP�@g�`C���G۲P�C8c�p�,��4�W�a��C�GeY`F=K��v_����n�>7K#Ѵ��Z{�|���\#��~�3ٞy��)�a�h�����!=!���?%A�~uQ�5qyC4)x�	28�w�ċ�����U��m����K�o/��
2�����W��c��Pԙ*�q�PW�Oz|a�: M(�ӛ|�Xkj_���Z�*)A����6R98�D��;�`a�E�P$H�sb|��`��,�Q�|�"��;�G�Qt�S
�`�O��9E��)f��;�:����]E����+z�,@����sO���*k�]�嬅CR�]T;�i�[���?4��_��]���������4�G.�w1��w��$��������iС�G�}�:i�	���n4�� ���S?�^����C<h�dcY�2:�*4�L)A�N��:�a��a���;N)��=�Ej��	f\�A�չp�?�	�ٝw�؛l��f�`�5�
m1��R�,�+��A���̀Ų~�a�3
oe�V�׭�8���X�'��s(�5L�(���7yRu�Xʔ/9��1v,	�?4���Y;;����d�	Ϛ�(�a��cIA�P+b˔.�4z�G���T����Q�5�zg���|�c��1���#�rF�G��qg�9e�a�
[]N��:R�>�d2�]�vC�E��1�����9�d��~'�^�^e뢍����.��kА��:yR7�~�&w;�{\8o�)!?�W�f�{6��h`�YO�}}=�m���������������$��L)�]*��1”�?kj�����7�ϛTi���|��}k��"����}�嘬�
g6��f�}D��ja��4��&
\¾B�j�ċD�#�vY���=RH� ?���2��}7X� *�;_�����ᡠ����i���)�ɜ{Ya�L��R�Yyt.�<�������bOj���Z���E�jc���Wߏ?���(�"�M�òۚ����`M8H6!q\�7�5�P|�o��|[�ӝ���;
�Q�-�!��	���C	�q�~�J�E�'��@r��D����/ƐQ_�
�L�_]�Q�I3	�F��&�;^�2@�%�-��������
}t��Uc�(�?����,IM:P�F��9.kߧMBO&^��a�}�5��6�I����
��a{fc��E{;;���`��h�_Aqcht�MHs���lK^}�,
e\�[$���1M@X�PB[��$���9D����,�l�vw�
C�aJF��^t���:*u� ��|�����A����X�;R��Ps�f��ǔR�1�\���ȍ��A��Ǻ1�
��5.�u���	�|aQԖ�zY�Z+���Լ�x�a/��JnkQ�TL�)�~G�h��MS�V�@�
�
��T5'��m�2���bzC�7�r�۩������ck��l���v���*���D\��MϐM�쩰uL�Mz0�q
��V�n�*��uj������x�$�׳�J�p���)�O\h0�I
C���@�)��Y@�k�$�N���I����x�,�"��3��IˣETCe��)�]�w-V�f��FA`�Z�d�A{E��p���}���SP��5,A(��#

�� w~~�&����b��}�l�f� ZU����z?u�gy2��&yg��{�ݣ�w��S*�rҴTA�d�v�����J�n�}o�z�7ti:�l��?k��(S@� cE�5��	�	���
��E8_P_^�[/�vŅ�Znn���M��Gr)�0���dߺE�W��T��yD)Lo�П}�_�P
P=�P�Y�
�mv��Sy�P]ѿ`h��
6��
;3��ES%�B����
�NK{'��1��P$�Rٸ��Y��Y'�h�|sz~���a�r�79`M"�/{G'v�4H<����@EXp �5x4��@��Fs�� � BuҶ��P��!`m}���`���^'���;�i�ԥ��ǣ{3���!�X=�m��͔u�xO'd7Qx�w��cS,�����j^�wXA��r�]=��!{��+�ț���KWF�&�H@-���˜��;*`�,��n��4�(�I�����*�,M���{`c%g6 ��o����H�u�2����l�`�)�?�
w6�E�ws
�M�Fc5P'��E>\$��n��P��I��iY@ٴ�7%�P�Km2��A��Y_��e^�
���62���e,�d���|h(�X�U�����Ī1�`0���@�E"O��l9	�&�z��(��6�
���6���}����
�k��q��&
���RH�NM�0%�B�Bu���z>��y%����`�&6�Ռu�6����2i�k�/_�䉂R���Sq��֡r>���1�]���5�`�<�;�O�b��o <��N!�e��&�=g��M^��~�R��	�u|\�Nx��vަ=<N@H�X��+�����@�N����r��9��Ϊ
��9Y��
GD 7%�^�����5�;4;a{A��!/U7Ė)���2K�
�p���E@Z{�l�%�:a,��&fO��ML��5�e�f�x Q�%	�Hir;޿����X�*���.�:�+�m�AkZgz5��Xg���f&�(�E��
�+�����ޞ����l�A5���=�2*J��#
�<M�bn�5m�)M*J���4z?�k��M8���us��zAN.XLur�a:D��Χ��3�p�&��[<�՗���ȯ��Sj70�g��*ȳ���r�ļ�RX��ϲ2Kqr$��~%;��c��0D�b��8 ���P�$��v�w��QMࠗ���F���b�@��iZ���4lM��$�$,��p��,/�Գ���!�U�lW��^��nUP�
�� /1�J�nt�����و~�=R�mޠk>-Xl�n��E��_���*wJ�PF�}�	s@�匙�x�z5�D8���\ nȞ�6�4�-��r}A�fi
�Dң|u�TS�B.L/�a�b�S=����E$�ۻ?���x��5/��!���T�S���q3����X�@j�7���=U�X�ퟝѽ�!�x�]ݶ�9�A��˘R~���Y����9�s�T�1U�Z�9������u�V����KY��F^l���R=�O�e��\XoxoA�n�T�ٕ��qm6�u����h8���ׯɏ
�}�l��S��.^�B��+����*#�>Oxuf� ���������0W.1A�1��(�*ӰpK�ߪf&��G�a��]�H�ߊ��R�����
��fsI�&Y���[k"krIR4;�><_�Rcmz��{�i���0�!%��6K�kQF��P���!��9Wk��2הV�-�z!u��T�z2	?�^��l�b|�[���3�K�N��9��B~�U�Y2��UZLV�$�UZR�K-�Wia+�ײ��ˊ���ÿ	�5��h_�ƙ���	��t��?�]�@�`Z�k���2bX��䐳`�P0�����a@��a[�'�Gbµ����+pL�n�mw.����Sc��5�V�h��G��5�	h� �
~y]�Y�D�cnQ�lD��]^�T?�+.,ȭP��%q����gB���sU��҂��"�;v�:s+L�o?oճ�R����Re2�OQȊ��U̜�U���f(�6+��Vv�蓴J]9GW*�I�9��x���B�p��߅q]��L/�1:n�(�b�	�|�M��j�z��
�G���N�zG�����1�{�3�H�����@�ug��{����C�L�5	�����ӕ2����\~Z�A��*��u�f�z����9�K\�I�߁w]��G���Q7)�;ɟ�+�
�U�)��4��A�-�=
�۠����(א�����wc�ϵ4W]q��3�+��|Z9�d<ŋ�5����۸��O��_�����M�T�bLa�p�Hz?�u`'i�Y3��诎~�����2;,)`���sk�-�^Ԟ�lU�P��	�$@�Lv5����WX�r?4�J�έ�
(Q��L-@�ܥ��粂l��}�J��+�y)J6K?ilL�{F꩙d�B��K�r�ZH��.f���l�R�cq8��L�Eh�j�����^=�dE��j�׈zyE,lN�~Mx�Z$čk�b1����d���*�D�*݆�O�m�P��S*�"�{�;���{4�s����I��l��-`-S��ו���ѣr@���
?C����D��I���QX*��jMr���N#M�z��}���}�$��ǩ5��
�b������v#PEw	YX��vR��n<�<=u����r�M[X�g�g�iF$p��ˑ�fa3@
,�%b�H�~"�}��C�V�����.�q�z�E�3,��4I�%�k�g��FH��06����i������d),��ul��fq��G�T�����`@��3�v����gB�(P�t[N����I��)��t�{�%�A�����E!�=$����W�?�ڒ�A�L��]�w�N�n���
�]�7���cAܖ�+�&�9��ke2wO7*�$�3ub�,&ER��Ω"-X�`"<�͟�a:5sL�?hcj�P�`���
+0	�$}��H�Y�Ǐy�Q�o�e�(�a�D/O4i<�$=H�?a��D<x�+	A��z{�ՙ����Ԫ��s�W��"��3q�W�ShONd?)��O��1�y;|wJ..ߜ���k[;;���xg�hxIJv�[;;ݳ�����f��84��z��v^�~$}9��b�_�K!{<~��
�`v(���sp���j�7��R��S �l'~N��B�MhX	�=@�/�)^!>�X�O���Z#���)�'�5F��b��m� }�k�S�2R
��:�}��=�`��|V���/�b��	�m��ij&U�AU,���Ŵ�Ϧ����r��N��dO0��b:fW�c�ߘ=�80�q�tv�@5��˜�QM��0|�[g]
^�\4��QVi�������l�`�ӌƋ`�m����Kcc����v�\/A �gM�Zk�=��h"B^Ectf�mQ^h�2�3���;v�	��2K�YD%�^[��0�	��yM��dzL��aDpt(��q%gc�X��(;�p6�G��)�5�e�+��f��;U33os�*���wf
�eiʹ��{�O
�������)�Q���7����?�q�^�q�ʷ:�5��%�lUs�vf[p �Ъ;�@��A�/�����M����6%o�w����=?��(��!
I����\�n-O����z�+��_�-EC��d�A�h�J8���䠈_@���C����>
�Z�'L�9�P���6}�xЄ7`An0��斘���X;m��\�eN\e��Snj���zŬ�X���5gH�GhJ�#�Ӽ��dzg���E)y�!��`3J�ɭ *�P�k��o�+�k����f
,����U��m��<�$��Wl_~De#
	�bUZOv���>k�>؜[��!G*�;���.*�9տ	�9pҶ���I��S
�
�풋���r�#��#
��7a�EE���W�����u�t|
F���n,������we�������>�˵�'�l�b�}r�;(�Og(�&�M��8�ς�,�
�~�a��<_23�QL���{:�����r�;#"�I,�lN)�}����?ZUٛ#��^q��G�'���`�c(�� �c�x×'�J/�)+��u��@��2��i|����IU��x�T�e���Y�w��١�ڥ�G��Л�S���p�>���g���%�E�$L�)�(�����0ҰB#�1?MGH;n�o�jI�~�o��d4Š��	V�G��N�EZS���.A�ED�*�C��z1��u�`�EO)����d�����Hh^I�7�Ľ�}��V��T��î��R�ϋo�r�Ɣ`<MN��lkkY/
W]:��%��-��^
�*=�<��z���W�I��o�/�
��Q��o��EU�*K�8<H4�_��~R��#ju9ar+�u�.�%�&��>=��5<`4馈K+j�Dۏ�S�]�����t����5�i*���Wv_�IT�oⲎ)���G�ᏑƔ�� Q2G�눫	=<Y�jX�1Pf+1@���!�#���b��(F��e%��T�1�eV*�U���H���Vh���[�QH5JP�C��>�*����(jys��a�8a�Se�t�?��3���kң�$�K,�E��G���'�SP^�Դ�7b�r{5�'�u�����4<����ﻔ%�6�����ɻ���s��*0Π���>�6Y<�juD��v�}�ov���,�3�=�ŕ�== 
�$�o�2ٔ�UEw�: �n�у]����8��r�#��p�h�M[����9���A��s<RM����_/W�L=ĺ��^���G�Ř4�P�@̲4�F����b�=�uG#U{��+�̕�+�|]��/������@LҦ��ߤit��kҪ����۷;��K�U�嫷c\]ސQ�zK�
��mYU��JQ�c����O�|��h��8g9v"Ҏ%ɗ���"��������
�A��)T��+.ZJ�z]�n9r�)�N���C����x���~�,����YH�l��z�?��\��B�r_N�“��Vj[��(�R�֛A1y���Yq!T��%�B+���n�}}�c��@���4t�̶ڎ �k�r�l.@��{*�U�}W�u5HB3o�R�}.PMP�.T�B��=7y���aR+���ŬpgA{�W�S��9����#��9ū�^g��^�H���c��%EX�,9.,��0b?n^�s�5C�>B��OO�6��S[��D��v{?w�����$��׋��Oݡ���4V��x�ޠ�WA#y����Jȸ�#�A4��c�
��
��j^wjT䏙@�…:��M�e��hGp��� �
�^Y�88w��5	d�Fis��}uc:4��r���O�d��ك�ـ#XS���E9fcqϬ��F��e��
kK^�^��.�%�W 4��u�p��wS���?�L9z�5N�]�F������j����8���bowgu��2�fd��Q���.��Hh蚋�I�����B�e����Q��Yl0�w;��z`�80\�9�?~�Q�.zG,$�|T��Im4D���w�aWL��J`mޓY&���e�LV8����-d8C-�~
¹Y���Vc�10����f�
WqU{P�+M_-&}4�/���J��	�
�i"v����1�[�}�L�7��x0����/��.��cB����(��e;11�tOzg��;�U	x��V��v׀~�1y��t�\
�C27�eꬁ�&}t��9ƻ"3[�*2�/D��,_���>��S�ݲ�y<7�I��I��2ƻP����0�مWM�5mp�O9��γ�,�&H�V|�/w�i塺yZ��@�$iJ�E��2mc��B�1pmc��ҡ<�cނ�l*<��(��~�z-ي�5��w�[���鍘�}L
�)�A��w��%�Fq��A��4�l�e�دǃ4��J��;9k�/3r�X�ID���̪o�_�d��(��_4��H1��+�8Ѐ�Ţ�8��̦��y3�/�u|"�m��|P��]���T���������W�S�G��F�p�4��<�Aᇗ�h&<c;�E<���?~3:��6^C�~6���X�HP*����\ڝK�WYd�\�i��Su�}��U�eM��>���]\'so���!,\W !�I�y���2�����A�x����h��;��s��
��{gQp7WW6�d��r�h4�7�,���1��0F�m�_�0�0�~&����FX3�\{��?�FLre��]V��fɻ
E�6��'l����#Ceݙ�����(����s��VYn��t�ȂY�%VHӬ���(3cP���3�v��N��N�X��_�ja&
i��ќ�Q�8��^�s%g�m��x����l2.��b?	��j���E�z��Z�3�k�"��q��A�Qu@*�e`�v�ܘP;L�Yv�}���>Y�O<��=[�V�23��a�Ko<y=u�H���"��<���\iDJ#&LA�-7����iO�
J;�	UneZ��f����F��^%�X��~����g5��w��Vz����W?nV����+�K_��N�c�x��=�yG��n�ݏ�"��Y�qP��{�����E%���:�w�Fc��ò�Ą�\).�zSK5�..���soxx�$��;;?�v~�4\BZ�"Q�f�{����ԝz5��A|�]K����u�qs�[��q�%��BI��I�����X�I���`< ���_�IV�v��þ��r �'.w=��E��O��H[��R��B��n�l�Цң�/k�3�8�T�:�!���+�?���:���e���ꋺ4��;M_K��%%hL�\�O��Ÿ�[�'�-�2\��^������E��w=����r�^���sH��Knҁx�b��M�uW�F9;��);BO��S��ӷ�Y�
���� �I����칪��bs��<�����^Bm�����bZ�D�G�MG���W��ƫ_�]3h���R
����'��f�"q�Y�XU�*�3�Oa_t>3�ǚK筫&0�ؠ/�s���Dj�B�
������>�X���D��q��Y�k)���E"���R�e�=�M�b��:,�}:�L,��/��=[�Pk��i�]~]ڰ(khH���'���TZ�喻��ת>�/��Xئ͍:Y��c�w>�\؞u{7E�v:�٤X2���Q�T�J���˸E�<��r��1\��}��_x�[~�~���h�{�P|q��DD���+^�π⢵�ʈ"1k�
�Ծ���b,�2�u�L�MI"�DP%)�K���vH��CpjLq���YDFe���{v����˕�QD8-�GC�?���}��l�4����������w1�^��� �Al�lNm1����!Π��r��M�6��Dž���c{�&i�/ľ��E�9)!��>�s�waK"��^93��*r��5ȱ}���X�Ƀ�6Bv�aN3�[E�?�Ŏ"e$+P�`���2�R
_7f����z�{�T�C��v�1�`�O�~B<��&�n��
�B�!Q���&�Q��h���R#_m�s���B[|��%��\!���}��(L���=a���yΧc�!�H�&�j���kp^�g,\����*x�n����B"��,��J<a_DC��R�%}vM�b�ŁfL�f�ylϧ�y#
1:XS�6c$���r��"���D����sQ�XV�;P؉���!GVY*�P$*�
-'RL����e[�����[P��T)%������x�J���EZ��%z���v>�sE�j��
�?�N;U/���
FX3>�S�Ά��8�v�c�<-d��M$bቜ$Z_J
n|�7���˪��KA9���o��"Dz-���$a.E��M�!c3Lr�&]Tm��^x��QD,!�Z����sb����Y�.�
|��LM���[�[�9e�zgCTڴ�,�W/6u�al�V�LG���3d��r3�DM1�^Ϛ�M(�.��#��.V�a���[~�0�^�����#�4���`��1���1�Z�Lf(��E&�ʇ"R�l99�bO����\.�o�t^��
q	u�_�=�Eڥ���@h��D�;j2������Ê�o1ε=]aHr��]�E�	��̵�|�	/�^�d۵
�#u��]��w��|��"2��GC0��d�Ԇ-"���ʊ���ݙ(�	�U�F���~�����\'�����O"��	U[s=>�9�����%��{V/�|n=(

l!��u������t�"���X~��(�>#��Zs��U�wd��/��+�E���+��u�#���2����ƈnƬ�����:E��ǹ%�����. ]�����ΐVw8�GU�Q	�;���,|USלG�3*�>���?��s���a}����{��E*�W�&�-�.y`	��@#m���a
�F��8 ��tGth��`5�*RФ�x<�E�����u������K�a;�����;=�Q5J��d q0(�<�U�ڞ��0^�)�����@��E�r�D����	�R�p�6�}4E�|�I��U��x?&^?{�� j1����%�Hz�Q{{q�kcU�*��J@
1)Y]_�[��"FH3�(�eI;O�Ff8X�LE\�3�#�%��N��"�`��!�I:4��\�`+�jF��Z1�5L,\�����g��*G�!���\ꖼ�լe�����d���L��]jKp���5��U7 |��p[j
��ϵoe(X�H����t�m�`r�4���"�Y��H�,GD~6�rZT��
�N��|kKO�
n�}~4��٠a��Rh�?g�z�ks�V�+3߸=�?H���*�Ju�/�N�.�5��u?k+�YUsNλι��r]�ӡ������?����N��C���O���ś�PHݥ����
$׊��S�v��^f7E�z�y��j�E�g٦��cgn��������?�i˒�?�h�ʁ���]U���#ez�vR�����PS�o�㒼�2�J��v���
q��l���t�_��c|���\�J.��6��'��b+�w�Ho���jr���t�Pw�T^h��#�!]-��k��h�ay�b���C���xƊ��yx��5�5�=O���vK���ɷY	���u�h����>����jh���3�U"�s<�Pr�U!��S^k����񄟂{WZW5���!�{M�Eq��s
�醪ᮽ�M]���h����G!ĺ��x�E���Vp	cN�������at��2��2� �V6-�	��u�N��G�uV��G7]�����q�Ѓ��|�$բ"u(�A�B���?�S�$�}���Q����(�ts���}��W;K�O��L�ȱ�OG�/-�ʓ����À�e��f^p�l�F���k�mɻ��#�]��?��х��/�Cԭ�O8��7��HY�����Z���W;�4VW�X��8����o>8^V�?=�\v�9/h�0��REp�{�~�$v=mF_춣F�t)��*�96z��{y�Q<��I@;p����Y�m[�K��5�N꼂�#Pyoۍ��2�R�X^kW�2��� �F7���[���чo<�׷~4��<�DM�I?�v�<���`+����t)�@G�����{���g-�X��}�Vp����j;u����܌Ey�Z��ª�S�ާ�ȥ:���$�RT,��:L+Q��qi�[�_�J�,{�/E�C-e,��n)�e}c5�f��l�F}{p��s:{����і��jB�tm�R������SF՚Ŝ�}��WI?[ar�*m�t��h�LHK��k�>�����P�i��o�~U��:��t�.S���b|0A�&�{�|OL]'M�~"6�4Fd�*��L�b�y�i���T�2�ZI.��QԤ��/r�q�@�3��_JJU%E�e�H�
���*Kx��*`�?iM���K��}��e5[��F�������CH8���^z���A�-S��"6=ˤWْGygs���E��� ���|s�P��^�ȺJ%iC�FJ�m�m���b���C*�&��!u�0��`#�*���Vu���`��Kw}���8��NE�U��j�=|h{�����-�bBa�;���BAf_k��e��K���n�S�_�g��Lm�����L�h����T�|"��M�*�}�s�TQ�)_ғ7���7%`���t����W��If����(��%}=b9���aW'Ć�O��dV�x����gU��X�s��-R�v���
ޮ.c
]���͕�FA�<`�6��;�m��B��ȁ��IV�)]��2��u'6�#���83s�3���x��C6��待E2�Z_4ιe��S��a-	/��4;�.���O/}RY���~��	}Z�*���y�z�)�0(qٖE�.S|�F�.�[�f��$P=u���8�\����l�RW1ڔ���G�䎅�kg�;F*��֖���,����ci�(�EN��=�^�{x�8�V� 3�JLd�5%Z�*t�`�e~��	�Ak�����6���8�?o��e���C�����5���:_��Wx��NF�FS��r���=o�a�!��=���{�bķ5��f)F*�.A�%������Q@��A���>�4��{K��sƢ~_]�~P%�(��*����W/,�E�/��'���ϫO�A����*�Vz��|�>b��.[9���@D�$J���Bt̙�� }ܭ͉)q��Ar$�Ƥ>�:���k���M�b��Y��v��`��Pzf��7�>�r2}��?�Jr��Gc�(W"���{�h�E�0z���˳ޯ+�\hw�4�>��tv9ظ�D���P�FiL��4{�$�}M����:��$�b~����x�T�&��S���1F�9>�G��T���!iHm��<�F��O�K��!~�9�Է�|�	�Ny�!��k�y;�m�Wa4f�i�-�4ò0�R��
������Nƶ�^��B�hp��*��X�,��kX�1�@��8��uS��4]"���LTN-�V%�����"���C�$	�In�T���zOh���q��u	3r� Lӹ?
h�IZA��n�a$BS_�}���)��'w�?"!�6��z��4��sS��Q��R,
E�!M{��QDCeY��u��NP���b�Q�Ί�釧�l��g��pn�Z��ftQ��mGE�a,�W��\�'뇓��-����D+%ӫoL&��Z�|6?�?���l��4q��Ѵ�;CQ�u�~k�FD~�]~����5T �7q��Y�7>�q9=?����*y5M�3��a$o;?w�@yC�MM�s�7�u>�8!�zE�`o񝵃X�o�
��s�Y⾠ӛ�y��36DĠr���ẏV�Y�`Sa�M��SHk\p�fqX��jh	��6\���_��/��p����J���q�u�j�cXB�҄FC�k4e�Ō�G*�سK�e�s��+ʘ��<��xc�y��ZS&^�Xp�s����+p�LñX�~-s&G�� �[�@�R8_���`��t��[��9���O9�I�q.H/uP/K`g�[-����X���P���[.�22���o��rގ��+
k���d)pK=��QV\M&���`�a|4o
��?��p��p.�<�D�&���ZUv�x|O���?�z8N����%�3�p�8�Ro<
�yl��K��xq�7g�	6��e+��v��S�Tq�0�3�_3o.Zд���c�jřT~p�žSW&��6���
3u*��!�^�Q�E˛��r	��l3����Z�S��R���.*�B�i��|~�*Z6�U�6��ԇו=-�bt�;d���:���јQ�]]Z1����XNKA�YC]HK�Tls�H���4�I��\lμ�<D�+!~�{C�LVR��5|e�M^
2�6�dATI�	=����u�#�ާ�RL���лx����t�C���D�`.P/�eDayE
T�8��&#���9F�4�W�np�)�C���:<�솳���	�nH7�WD�]��`��Z�����k��"Me�A˟����FX�D0QE�
=bt�7Vfz
E'�?h�c�0E@3
�J�}�7��Կω�:h�^������n.�@�Bʡ����Z3��x���ϩ��,d�i�|�"G�%�K�W�.a�C��I�wv~�=��v��/�r�JYʿ7N
~g�b�{�Gg�Sv���T�G؋�,��+��T,��(oj[-T�T.R���A�w�;���p�D�	�s��	��H�%>O��B��	�h1��b�*���݋i%�B���S�	>������t֛3-	�4���qQ ��*��9e!x
-d���qi�^����_�y�b�!0k�‰�(Y�:��h��QiZ�w ��+V�W��s�XP�U�ysS�,������>��l��F��~��M�rB�0bG�;%kW��Q�����ʩ��nU��Y��,��#I�EFA�Ϟ����z��߽����d�4��+��J5��+E�4�df‰�6maN�4�(�l�i�;'�,�w��ag���κ���]E"lT�va�9;)��kN2{�”}sc���#�+�;?�>X�E�9;�9;����ٰ�9�ٯ�B���O��������i���I�?[wc`��h1�v��r^oOX�9<�w�.�]�
=_Nj.j�d� ]�y-���g�������a���5:eɜ)��.�n����c��|�S૫{Δ��ۣw�1�@%� @����ئ�S���(�:���e�qp����ܰ�lhJN`o�*}QS�/��e�����̕!�M�}���w��?�V�/�����;�k�U�*��tIZ榭���rg�ꪼ��v���S�~]�����0'�$�F7^���V�v��֎�1�=�ڸ���0�zp���0���K�ڡ�:��P:%���2]�}�TD��'W��
5�V�~��a[n[Z�:�����6s�hzF&!RQ��k6��l-�Zqr�H�X]��8�+�Mv�e6�Zq���>� �ؼa�n�����,/��V���&r�h�憺�P��[���h��̟�Q&{��%^��9"_��_��a7���:^������mt�&�u'7�>-�:��NQ/4�� I0��Z'���Y��5�ć91^sx�X�����U[�k&7���^צ9V޾~@lWF�f��<�����*{A��Dk�Y��S�z_�S�ހ�� .Jy�T���<��F�n�B��e�����f��H�;�&�ư��f�X������ۭ��Ը�%Z�a�A������#��{ep�ix5
H���;�^l	��w�����`l֒�H^�+vY8 e�;��`�q#�(�@�$���tq
��5�C��a30�%3�s��d�FdK��fP�F�4`8˞�iv�����>5�-����Ǻfxp�s�Ǧ�<�֙�	t
�'�����W>�%d+�D~_������S��t��7iA���[c�2�=X�ݻ���'�~��H���*��}�	ٚ�^ʬ5����68�}�3ѡ��R���
Mv�¬���ʆƖ�1[iP��4нZ��*`��<m|�l)�ˆT�&F9�%P�(����|h��9���v��Eឞ��7�'m����P�ņ�P�:x�Z��c��J��U�IK�'��� 0	���h�5�\��*ᦝ!�����t瀴
�	ᔏ��a�b$X�E��{��X^�L���M�'�=q��(�P�o�+0{�bF
�_�T��O�]�'��P2m!5W�F!~��%�*.��
!ND0j׊Le��O=H��hS�q2
���˂�R	�im�Qc�Ydy�̞Z���3hi���$@3w%�T�yֱ*$�~U���@*ݬ��
�TpT0B{�w{(���oI��l+;)��D����*�vs���{��a����:���3߰������%��#�l�����W%�ȧ{î��؞�:�D{��sk%���Arp�^��c{�L���k�H3o�����@�e��=%	�^��)����K��XhYa8���d��.c|!�~-�c<!���̖Ώ;�:=�l�)��i���ƹ��0�"Kxd+�[S�|�v�9,&=�p'{��q'�E|�dn��ّ.ԕ�c8gom	�&���C�m�?n�zA/�o<��f�i��?�CrggF�l1#�7$N�M�'�:㣙QA�Z��k�:l�&��M�<�f��f�
h	-���&���7&o�]�*����+��wS�STy�8
�}��l�A��Y��ا.B��&g��	{�6+F�S}���0��3W�]�z��8Ee8�<%o��%-w��"�L� S�Ǔq�]ZE ���A��4�_�4B	�~�ӓ�$��X�B)�y����l���ԿV�Sox�}��C6���=��T�U�����s.���8|{z��P�0��rX�M;��Џ��h�n%'�}@!�N�����M��b.d1�cD*,�h�.K+ц;�=�4�$j���BPL�63�B�l�$jʰ%p���������/{C��Z��U��¸��	��t��S�w6�x1�p2$��J8�7L�VW����vM��(]V���n2e�m9����R�W��D�yZ�>�t@���3(����\���]�%Te�@�ڪjP,�H��2�d����R�4)�z;���q(X-\���P�I�HH���Y��aj�t{��(�5R���=�.�G��j���bB)zH�@�N������Zc�qy����x�.}*�B�;Ԙ�>��(�����֣����-Xfk�
����iԵ�6�y��+���B�/j�w��b˞��8Tґc��"_N�#g�xP'��6
��������#y�j9,l��l��A⍽�0����r���͹�K"|ж����Xu���n�����2;�
�R�N#>�2�Z������Y�Z��Q��1;}��qc�+X†6
g!�7��4����GV���,�[8��(��aT�ݳ��Eq����H5|�K>���SKyE�Pg�����}͖�[����)M��N�y�'�3�d�\�!�"�Ruf��ʲ�_�N��<�)��%Ѱ8r��CA����OMQu]n��u�7��Dv�m�v�j�>
���&N���u�.7���jb`
����'��M�D�.���n�]Oz�3hb1Xs�/`�s�}��(�T���c\�g�&�16ks����g7�O��M�>YD#7����uU�-i
G��5�u�U\m��2���>�f8�J}��q�!}":U����釩A����sX�e�03��)H�`��>2M=�걘l���PE�Vp�lJ�}�VW��.x��l�
�#O|Ro!\U1v�Y��ւf�KB���}�pv)�
��r6��#1��~�h`��#�P/a�0u0���U�LU�=N3Nn�P��Yr�h�:�#,��Jn�
����(�p4��p����Sy���
A�g���D��>�~/X<?�\���ܼ���sc�����s�-��W��\5�x��6�T]f�s���ʾx���U��e�%B�����/+�:�݊�2ǒjeg�4��ʸ�-u���ik��\i���
1<��:'��Y��.Y�,|�"]���(,�]U���:��
y������<��侙�t��b}Qc�*Gu�!ٷ9���)S�\����TO��v����uO6�)���v��m�r���n2�#�lʷ�J*����V�WS�+]L��^Q5��������n=r��k���F�^�G+�
��,�ثUА�	�r�����"r����R��1ZZQ4y)�.�Y�T�ܬvѐ�\K�X���P�9�[�-�M�*9�����#���(���A�`�A����Rz�s|�Zw���|_+^��rg�w�z#�t
�+��9Wtq�V8>yVw�UwzU|3�
&�y���#�I�N߸�ſ����������[;^��]��v���#�.�c��tQ�s���H��o�s!].�<.t��_��[�!�nw�m�m�-4g�/��������n�2���5ӂB��J�5���`lj��;����;�d�{��Jهy�R�񝫔m�6B2Ӈ	������=�+t2op�>��o6��X1���zt��{�z�Fk/�;m�!)A�:�f/j�ݭ�#�3��G��{7�L���q�
�/sl���������
�t�;p(2��-��\ō�#�2�e�26Y��'�7
�3{rH
�ܰ	��}^�n�y�`E/��ﺅ϶
�,�.&�(�w"����:��'/]��U5�
"+�We-(\?
0#�j����Tv��	D��6l.-�1�%�
�/�nW=܋�ڗ����ֹA�X�!�xm}'3�J�]���q�����?tmqW��~���ӣ@��0
ڹt�l1÷��J
��8�x�с
#!T���A25�fu�
F�%-��.m�O��d�����P-����ܷ����8	��쳛���M+�����+�ã���O�F	������P���E��U�?Y	R����BQ�Yz��x�\jG��!�l}YY�z�rUe�R��8.�$S�5y����\��x�a�h���j0*h��Nͭ�R!Tk�$<��Tx����ew�`��j���}�ʠ�K�\��*K�

++.l�,��׸�V��N#)Y�$W��da*-�	��I������~��0�”Wn(W�?/����+�
V��;赹骓��Ԇ�p�Zy=�o���=r����;��[.[N5㜰9��T�9(�-�xU�(yP�?w�Mv,R��t����E1�r�A�����Q�w����#Λ�3����3��^��}��s2�@{SEƅ
>q��80�/��g�G�/��2ސ�C�1X�c�XN@+��f �a�&�6WBN-_G#����YM��z$(�;�|��=�:h7Z�'��.�ʹ1M�ˠt��5ˇ��1p'68��. LpVg�G ��� H'�������V�UQ݌f� ���@Թ�8�ZnE,�������t1��Q�y0s�$J�o�cX,���A��6L�HF{S�/"�LC9׳ �����|t$���@�.í�P�b%L�?o'����u��$͒h4�ױd���A��e�9��l��/�^x�L۴��a��J�pA�	����7
Kc3����z9���z������Ҝ*Xbs����Umn�F�_�,��v5����׹��wc<�>�0��b�]�ڍ�z��r�K�{��)�������.�{ܹ<z�=ݯ���>|Y7�CZ�m=dRء3i]]�.���O��d%,��~wh!��#خ�jX7|U�*b-[MJ�R��5�Q��쩡�[���*z
m�r����u�٦E�.vHHˣ���7���Y�C�����[r�5����w[�;��{e�N�a������#��VE�za}=��{�*��ʼ��~vSW�ڼ�?���O����Oc��8	�xz���{|{_���mG}��
�KC�׍9��Ow��VI`��ݸα��Lq��y��Da�
�B6	��8����ҹ�
}�c�F��}}��}e>4	P��ﭧM"�����FW{�m���KЄ�s�t�u�9sy��sGJ���A�G���ZJw�λgC=	O��"����ZC�c�퀊�_(������%��xS�K�1�ոu��NY�� 
��k�e�&9�~韟��F��GX\:C�	T���Q��^>���{.~6���>�vؽvL}��n��9Z�Y<#k2���V9�K(�#��k�?^�wYv2��k�4CI��w��ݰ�gfء�-EyC�M[%LT�(Ն��n���T�o�e���I�UXE�k��`���^X�;&�%F�����
��[
�[�C(��Ш6��3G%��e��?x�ԟ�"���w5������<%M��"�G7���>��x�R����{B�u�}��dM��s���(�-�~R����x3�v�0��u��q�e��T݉��z���/���`M{��@;�Z^Өe����6;;ph�.�b�x���S�}�
�ݳGbd_"��5���w���Z֦�<ԐE
�4-w�p~h��A�
�'�H۵ɡ�Aa8y�*1�r�ԡ��o���ߨk���WpV-`�S��Ҁ�u^�@+�r��F@$����<!j9�����yg����o���<D�F�����/8��w�k|��*6��H5=��i�]o����N;,�����B�3d$�^��@?㳦-�L� ce4<�d�Ui�~�
���y��Ex��I�ί��JD:�}5}�sSBQ�|IJ=v4[o8[Pv=BZ�ޱ7���.�mqm��2Q]��,��b3ZCEP&@���{�d�@�s��dL}��n����K=v�����:^|p#ɡE`*�G��8����I����
f�e���h\��a'6�w�Ui��C�I�lJ
.`>�����!.�K���E,�ҹ7��߼_`����[bEm�Y57���wD�ΡBfG���3��S��Q����;;>_>T��aYEZ��{�����h��U��ӟ�u����X�6KB�t���s�DE׷����q��v47��
�1�B��\L;��x|�@�I�T9E������y~����tJ�֒$�=���Sg��q^>oZ��Z�	�\
67��.���^A��ܢ����r�85%%U-���Z��]y��ыa�G),�����.�ZL�?��$�+�0z�~�g��F
��,΂W$�	S6b��}6E_�6�a�M�-�Z?"3t�n��Ҵ���}���i�_�bt����4|�8�1�DZP	�J���K�
ګg����G�~�����6�f��V��A3irT6hQt��31as���UR��b}aC¨�B2�`��l1��ٶ	��s����Ə�z������$��?v����i�/Z�
�e���S�Z�L<��,�a�}�������:*��^�������6�
&����ߌ�]������h��Xn��l���^r�̲�,�-�������r>�H4#�	�r��`T�<���&�%cHO5�N�P ��I4�B)��e:Lv��Ip�
c�p����e������Q��4�`w]�������Sq�VI���g��n�C?I��$�g07���
	������^�o=äg
��l����&���1�{z��`��:���P�-
�wm�c����[i�/J�E�1���K�j0!C�̩����+!FN�-;��9�R�75F���Y4f��6@�$��U/�ˮ/��z�K���&�/��C��I�$�������Ü-�� �@x,ұJ�|��x����n�|�^>Wi$�(�@�{�������V_E҃��`���(('�۲��n���e�1=�K���b��T���B��
f�؇�FF����g�σ�ۤ�A�X\�(�`��y�$�o�&a��,��E��qx
� .�MReUP�E�M]s����0����h1�q'�,��c�\B�����$�":����pH!�Q� @�Rɀ��[��QM��S�4�FVKPk�O�{Bx~��8
(z,��m.�.J�7�{���đ,��S42�FF��Wl#@'�fm�,��jG��V�4Z��q���U��iI��
�9k�V]]]]]]��t��T5t�%�H��A��OU#�c�s��͜MM&���B	�t�mnŰF�̨=H*�V�v�����e�Qow<���
��k��*�Մ���>F�C`�H�V���4h,�疫|-� "��thL�f���H�(���d�7�mX��f+rLρ���ƅ��wW޴+�y@��y�9���:��[�A�RJF
Ez��x��}��K�
� �R��Y!�ȷ�h?r�
[H30�V�a�c��Ѐ�e
�|8�
F$D�(���-W��y\�~��g�17 �����m;���+{7��oh���u=h�[��O�|����7��>c�	s^Fm0�����c�F���e�ǫQٜ���o=X�k�Q�3V��>���Ⱦ䡨������@�~��[��EE��?��<�Z$oÊ�I@U�F���0�gDAȰڕ��b/��K
�pe�;�u8�W��(fJF�{�nE؜��n �%����X��0F)7NHK�X��ޜ"�F;�?`ddW@/�j��'~K���]�{���r�_�JF輻�c�!Q��-����)�m��6=����;�����ຣQ�h��Q}�^ݮ��[�5R�h��y�n���APbu�H�)m�F���n��3Mi��lw��~�)m�F��zuc���mJ����֣�j-۔vx��G;�G;�l����ll�
Y�T�Ї��N-ۜj�"vmv{۝��T$��yT���l��.�hg��h=�M�[ۏ6�w��ӒT�Qݩ˵��Փ�nՂ��VͲ�mb��ԭnT;�p�=r��OJT��6�͚.�b�<�lu�}�V�:Ŧ$�۪�k��^�)IR��76j����$G��k��N�9��
�{�Nw'ۜ��ׂZ�le������]��me���؍�f����mJb�oln��
��e�����`=xT��4'��ݠ�w2MI0���~��{�mJr����FwG���l=���!��6�Z�4���$����]�s*�9�짭ޣ��#%���Ⳓ�M/�\ߩBQ}����#��N��&%���n��mR���t6:[Ռs[�t`?mW3�IP_}�Qg;�ne��dG�_�o��l��6��zug3ۤ��n���z�7��I0	���^u�Q�)I:�z�G��͌�'����]܇Y&%��n��ͭ-9)��F���ߨ?�ב�#m$f%ic�����U������u[m:Z�&%w|�ѺOH���Ҥ������z�I	B��W���z�I))�7�{�&%E�͝��^��mRR��;�F?Ӝ$!��z7�
��&%e�jmc���qNAu�V�3NJ2����`��mR}�޺߯�of���s���^���6)����Vo���SN�i��3O}���N���:}��_��d�gI�$3���5&�_�e.��kT'��'�v�W6Lwɪ�TӨ]�c9�:�0]Î?�i�0�h��:�����/�<�Y������=F�VE��U������ۛ�ml�ep�����7��ꟁ�y4��U�[V��ɿ�j�0��L�W3�u� �V�k�j
�ߣ�,`g� �Vн���rD�N9w02j��Z��ʹ�i�D��3�{�=�!F���|�
�;�`�O9�%�J\eN��|��=�X�4�@�l`L����ʒ��p^�����.,�F�Q0��Lk��P�rL�CV�b��/��~'��E-B����@h�Ѐ�1�b��ݡ��Y�)���[!C���k�%'-��B�у�H*F{aw>�����Rp���6��W�]������)jM�H�:L��KDC+Z#|@�"�F�
����%�q�H<�(��8�u&�ɟ�	YQ؟]#Q	rc�$�"�A�A8�3�"��9�EM/�z�<cg'/[��6����������=k�n�Ó��O��^��듣��3vp���N��ߵNN�r��3h�����񏷧��3vrʚo�5�3����l��X������
��V����Z�D�&�����M���5�<x�<j���x/��c���i=8m5�����Nߞ�5N�E�������È��3:Ᵹ>8:�g�;��q���Sd��y��$_4O�-������rgo�M�pр���/�>�Щ�tp�^��0�[��\}w�x� ��=?k5[�Z
�����q�s�q�ǎN�Y���܋��
]���~��I8k����޶�'�EX�_+�4}A�=9Ʃ�4NN�c���}����O���D�`�eV������#;n�:j�j6��{��y�(�R5ϰB���Ň1�єq���il��5_��?7lQ���)ȄPv�Z����G!����>cܔ��������O쯦	('��p���k���@�����e���x�[в|�7>?�f=���vU0(����$�0 9�υ���M��?��?�Z�=���f��3ִ"�C��`l}�����K��YT%�L?����׍��J��!؈y��)7OMI*�X<����|�ᜊ1��A���+��Y�*
�d�:hr�|�OcJ�g�߂ŽD�͢
���0Z67Z]>���|`U��7<k���bw����&��[R��K�r8�.��
����(c�v?�U��'b�����:�l����vrH�Ȃɵeu���Z�����I"e	�
xN�YE�`�[ظ��&����6���A<�A��t ����8�KT��Yw:��^��޲J�hQ��σ��l���^�4�N���� ���Y%a;Z��d*F^�Ԟ9�7!_Z��N����R�w�i'��N:߼p�h�J�������l	��6��s�%^���?�t���c�Aˣ>���v� '�=n���.��IU��,���*ì�%�>��Z ����
W���;�Zd5-z1�8չ�?�K���t���d/�)���\fb��<"Ԟ�
@Wߍ�ҩ0�$Vz�<Ux��d����D6�*�djeݳv��P�4��fk���q�%}�W�7����mI'_����5O�q2��3�����L�]lj���
H�"Bc��&&�a�yAG��
m�D�!w�蒺��~fb���@������`o�����8!Cd�l8P-��ƍ�ʀ^'n��0�T8��]��5aJtp������
��~��H��dV^�rv���&���z�>yu���E~w���)�	��=# �o�ֳ���B;��}�R/%�ο-gQ�?�s�<҉�g�3���T��`zdS�-0K�	cY���:1��K����$>ās����% ,nP�ȉK��z�	����.�]@�ߘ�	��}5�#4�M+U�<��[�L��e�$nd���;c��f䔜�~_X����/�6�&o��sO�58��
���D>b,<x�$~����l�����"u~k��s�c�;���p_��5!9�u��#�bW�,S3o^&�؁���E�ӧ���;��.&ޝ�TȬ�N
p�!k`��C�"�ѓ	}�Np컓��$K`8n@N��
%�J߰Q�6m_&��y{�y��ɓ�=�m��-e��Ce�:�L/q�y���\<�q��3�;�����'��L��{�$1%��&�)��e`�~ m�I-Bb���@u��o�
�EH�Db�%&�
f|�Eu\
���vi,\K�d�I1�9o��W[�=�s&���ˢٰ�*u�^JJ#�BC����hYtH�V%uե�e���h����KQ�8�Q�'e�����v���\��Dx�l6�3^6=L�RqXcZ �R��D�%�w�4҈�S�Q�yg9�y��&� m�~�9�Ԁ1��=����c{��Ȉ&\�5���٪�/�Ԇ�%��!�|�IDM���" `)ĸI5�#):�v�w{�q���˔l/S֯�������Q{ߞ�i�N����z�.ɜ�2�j��D�B�_��(;�,��7��*�OO�4�i{�/R�U$0�ۤ��{!��n���ND�C8Ľ�%���f��z�|���m룷���m�hkݥGVj�r���U���s���:C>�n1�J/�^��O���i5(�#֨��@��G=}�V��YO����1���V�qzzr�56�j�6[��VZ����#�����=k�y�1�!ު��š/1���іT|��*֗U�q֩��uT~�|a��ᩮ�
��K"�п���.�r�H����w��v�̲�-��v���ܟy�e�@���0.YQ�E�����V�U�?�_�c:�ܔ�����b����ͭ������_��?�Җ��[ٚa��=��qz�<9n��h�"f�H~~�j;U���l0��x�:m���Tx�g�������i	LJy��v���dV���g�I�Dxp	�פ�p�9V�?�}����%k�F~�>�o4�6�&\"1�8���y��o���t�x��da�&�Z���{�a���4��j�)��ѻ��i�1d�Z^9�t0��������wі�c�w,��^N�,g5u��l��d�1P�(�>���'�]�8޳2�P��{	r���kW��H��&�5���q���Aj�a�=���͉��e|�+�GoR'���Kްh�c�a�W��DD�ny|?��*k9�L
���h���Y�b���(ݣ?PPLܮb'�R
�vG_�.��JY�a��>I�N�{�G��#/	zw!��^D�Q��V)\�HE���#!M>�;�3V�\l�NU#�P�@�$5�K���ʮ���/J�bW��%���2�^����C�A���GA�/L�EܟK��ƶ�T>��{�R	>O�j�0s�ጻ�QD��l�wvq8��m@���dG����?�Di���!��$�[�J���۽H��s�
F|9ǽ�1�ToU��d.b��o�'��Kf�
c����EX�����2���PjY՘&i���{�-O���^ű:Ek�
�歮�J!�\��G>\m��Ln��\vE-,X{�IpIᚆ1�fI}����c�^���82�?Fˬ��Z/0
�'-�%+����r�y>��2�0:��H�fb���l{1���;[E���h1a���d�"��
�O8��w��m�|;~�)�������\iu"Lݜ��ǚN��ՁM�q/��j�/�w�»�H�nOF��j�;m�,�̄g��^aDz�̅��x���^u�IN.l���1�4���lV�����3����^JS�5���K*�_i��gN!�E�M1��/U�`3�ȋm�rj���f�d��p`�e֜.yH�Fp�AwI�(���HqXD�>|��s��'�7!���L�)iR����Y�vvx���b�,'St���|#j�ݝ����&T7�n�*R������LR�K��'�@�$���禓�P0�k����'�8l���ȣ�uv��"�T&R��P­.&Ə�����"bw�S,�$>ѧ����p%1��7ӱ����C��I���pL�~7����������|��^R'�Xc{z��r	��vM<���o+�Ɩ6�ujdbDO^=�a����T&#}^�R�'2J	J�WXK�Sr�RY�
�RqS��XM�0rZ}�9�cŜ+����B}W��Q�_��]'���7�����qAp��9�'V&�xv�X,�(BF��4M�ƭ�ߑ}�L�hҰ�H�d*ਭT-������5���=MU�Qu�C ����Q�T�&�I��>�9�Hc�<҄?>.J<R.˺����Uo0ms�&�Y�~���~cW����)T��eUnzz�P����.��0��>�B���e9�k`3�-W���p��v��@�^Ir�����|,T�*�}��i1���S0�݈�{�
ENK�|Tb-!�&��y�t�3�[��A�}ɳ���fogSjY�/�m�(	�]Y�	�Y�]�l�Ʊo��ȬM�Fd�@:B�Э;�爘��w�y�:���!�D,/�D\&�=Ǹ�����s��ڔ��c�
źV5�[�<s�=�@�A%��5)[|2�utٵ46]���M�������.�'�y���2ې~�^�05,b�F��<�yܪ�k��R�k��ܬӹ3������˼m�q�5�~�7m�m�Tl$��qL_�Q�z�����y����1��	;��/����9@��#P9�2��4.���G gw��O��D3幁�Z���{�=02�7�"�.��"@�=hL��t�LdV��I&��ơ��W#S*B��Ə$�wQy�
��5x�=�>,:d��ͣ�[�0iء�~D/z�'�4	ˤfhDr�n쒝��T�
}>�(�uOw�V��Mܕ\C�[]���ɻ�21%A�E�9�wi��	�N�DF���FńN!�e�Ȼ�-#o����ۑ��Mc���gk{Y�R���oq�k���ZM��Oo���K��LI�_p�Pۖ�F#|�ض$�`����(��EW��r��̓���`��#4)R��eosc�Ӷ<�`��t�|�2'4�*rB�
��ۜ2�“쮨NA��$������`�Q�0#P{�A�T.�eoc��H�u�Z�d݁�y��԰A9����j~��|SO�ߏ٫�/��3qx�3��n��P��n��D8���I*+��.34�Ļ�uS����PPY2�=�w���F�-��D�>��b�H���%�Q
�В�5�A�,|�"w8��vٹ�ڴ~���Cź6;������M�c�O^D.��y�K��y�]�R���� rvS�ݫ�?v
ߧ�@A����i�0x�.!�A˩?��"8��>��4�n\b��8�/�.'�T$���X<*��I^����[��H}7����΅���Ӊ���Ǥ�^+D��s��N���+>e^��˼j��T�t���l���2V��e��O��C�)v��;�F=�IS��w6ꏹ�7�x���<j9�!`�)
mH|��B��v`��?D����8[��a$�!��bR��GÌ>�X��2��@x�'(�h��]$��}(�o2�5����hO~�e0_�x��\g����[)�]xI(�ݎӖ•v�v��(�~q�F[�{��]����1�(gv꽳R�e�b|
���5��u6�b~Ī��؜�����D,$���i�^��&��c��YO7����6:��zE����m����?p�q��{�N�����P�o���(�E��,��U��0±S��2��C����8>1���j�6^����_N��F	��������q%VMY��X����A���{i�ʟ�1�Q.���1m����Ӡ��i��T#!Y�6Ҥ	_�®_�+3/A�t9��p]g����mB\�c��[��d?e��ĩ�~�}߳OY��Z�����c%6�x�M�̌�+�`m�m�d��х8b�2�@^4�����c�댓f��L�;#����UB�}1�4��N�Qݔ#:�~��'Y4����5c;�1B�3}J8�=0�aV1~���^0(��uD�2v�d<�a�W��x��p~yX��%�	s|�c�K?{���7�^4�c5
�p3fƫ� �$���Ƕ���ΧNRB�!��1H�>�EIa�¼�k7Y?ܗkcR���z����u��K�$���-�*LʚX���)&U�{Xb�H����n8Be�K\_���!�0|0�Ҷ �*���^�W˓�^�>1v�x�qLcB)��с�w���/ݘm(������5[�X���?n�z�L�&@�V96f�3���x�ۼ2c뫧?��'�;F�q�6��{�\h��(ʓ�A�	r%|��2\�M��N��Oj��M�y�,T��&-1�c��sE�d2&����'�Ȭ=�p��
R�F��b��ݱH+ŅW�%/���պ�?�V��I��ݬ�n� �yERr��hw%Nh�$/���%�a����;�_�sX��n#�W/@zG�ƽ�(u���^]�0�8g�>�\sS.��(����(�k?���6�KHs}Cd��f�Y���G���&�N�ɍ"!���?���`͌���4��nR���Wz���1�-�spo�� k��8�)����	���a����� y�=r|U�*�<��!�lؒ�B�Y����u!�9�O��<T׃q̢SR}�Z���u�����c����wCV�o�H�Im%mMC��I���a/ͨ�O#ma�1
y^~e�KR��g�y��l:
m��x���!�|���Mz��CG7��7����K�O�z����)��7�|�[�}5Yˈ��7\R��}����RlG� �x�Ʒ�|�
�ŝ����9~n�~�	������W�#ۤ�`��`��vL���my���i�OAK,�́�?|
��0
e���m���
���ʀP���M7K����"����Q�g��k�:&��qt.l����xJ��F��rE@�ă�HYDg��g�w�� �m����.b4�CZ����G$7Z�M㤵�q��D^�ϲ����$��H�,PYR�L=�I�;��.*o��2��:`g�6d/�ӎ�Sb��wl/����>)8�R�&���ciQSׯ�x�e�a��D�^Ĥa�y�br���mc�r���&<�V��/o���ɍ~�-��1����-1 zuN@|2J���|^t_4�a9Ha�y	I�cm0���?�I��jp�P�-`�,%�{��Lm��,�L)ҵ�TY���l��� A@���G/N�y�~~���qN5z�4�5n7*��\��"�dlB�����2�Z�Ьnk������2˟��>=9i-�rڣ�J�\�K��zE���3�{������l*ҝ���˜�%��?�,B#�}3��Yȃ����"�:�xDZ@R��T fF����+��y>�9ʉ@y��[���O�`���l�Js�Y0�Du�O;�>�C�%����5�3.0�p#%��Mgto�C8Rfe�V�������ڪ�ϴ�� �����}��o`�'Lm2������ఁ���28[�_5+�r:�.�E���xG=���;|A{���ցs�G{Z����Q$xP�dP��d�6��j��.���nt�U��x��#�ـ׃#�;q*(�W�6 f�Y�C1���$�ér�(!����ѳ]�s�NWϼDw-�U�>�/��K�6v#�yOi��݀����'��~i �g]=>�Є�ވ�GU+�����%ߊ���v�~���Yd�.����cՆ��f�Yƪv�KSBz34LU��n�p��c�%�Ip._s�3�cFzLq�n5�Z�x����dT!�*8G�G`��Y��<��);I���՘�?dXJ~6�)���uA�f�~�*��-CM��w���ӻ�!]�jD�2���=��2���S���,s
�fU�3KC������L�i���Ѿn�U�Y���R�,���6�F��<@$�����$�ș�ʹ%ױ�J�w+9�5�/��z_����K5�I��g��\P5@|���^ݯtBJ#S]j�HI�ߎH#��ƥ�эN�B
Fe��Z��œV�B[6_�&̪"LU��BB9
��DdJ�.���Q��;6d3~=6�8I|�4��c�'�`��B�jo<%
��-�h3�BX�2�0
#�X�O��ʨ�`��Y���Wk[�Z<�;|�+�����U0�ݥԅ�A��Xʰa�N�5�
��)��>���_��׈`n�DDkG��fy+O�z�LԮW�k��Z��k���Bh�-��K
��g��zCGK�����c�̮��H6�_��^�|�h>&}��>��N9����^��	�	�>�s8ç��<�붭�{5��� �Xs�-�/�6>�q�;���GX���*dm��f��n�r}}]NԮ��89��e�w?��c;�:��Wp �=��Х/ޠ�#|�G�g�]�Ag�ʹc�� 
c@�ҙ�/�~T�/`�}]We����[�r|� �ݔ�<k~%E����D�S`q��?E��t>ês()��-V��l��5N
U
Ng{�8e�|��SX6v��”�9�d��N���������ۉ����?����<�V�a�V�ZV��ˁ����3��ڳ𩷋*�v(��v:���s}Tv��fA+"� ��&��`�G��n�Z����J�\�3���]�
�J\!�z�ͣ3z`��=��g7�]s	�&'[D��#L�
J<b�B˕¬�Bˏ�߉��|�ffh�8н�c���
\��%\U��Vj���jy�\�*rg�<[[���Q�r�� PE�:�k0��^O!+ot�?
F�#�!~�(s5(���T���B�+�.��&�����^�Uc����W����/�@tV���������ʉ����C�"�����{�y����c��������&I�Y�:�.������1�O��}}��D/=�_J���r�-�L`V�8v�.�	��Sb�L�	-�Qǽ �@�_�ɬ�U���ȼ9��L/�SL�pk7��.�ɆH} Y��獢�ߣ_eam�?`�H����,_4q	�d��<&�#��ˇ1��ߢ3x��DÒ��jQ`^΄f�{�
�=䁜�"�<'���p�Źr����x�$��=ED��(8/���xt`��…���b���a��އJy�i�Ce�;��������=b�z~PC�9-�h
�����qM�!���=a7B� F9���o�0“�E
N˓yg8�]��vy���,w�	���W��R���E]\�l���̚��gԄ~��'��躃�1ľ+Gt �o����'�:��?���f�;�A���S�k%
���!����Ռy�"��T��6���!;?��o&��r�P��`�Q؟]�Ӡއs�ydO�߲�����p����w
{�9����w���ۣ;��S�*�!{�y�Ѡ��I-T�\�as9qUh��#��A9�]���;�'E�t+tO`��Fy�5@7��I7$'�Oi��)K�8��X$�X��)9GC���EU8O���'�;�����g�e�*N|i��A	�ŏ�b�M[�9��I^GO�ib3���CI5�C�@��_��3�Ԁ��T�^ϸ.
�.�������A��Q�Pb�i�`�!��[��
���t:��Ŷ�`��]{����u8��B&I7O=*8_��j���R@�:w��Gq���/�-"��Ԏ��⢠7��k-_�g�'���?yܝG�a��3zѲ�
�
����3�Ѷf���9��6�6���
����#C�)T�K���ջ�X�r=�jL�(�J���O-�b�ʦ:�T�|j�������(B_�����3~
��L��>֡�Ɇ�
�&H���de�_���ט���9�G��P4�ž-`짞����W��8^��_c`}x�~te�xE�q�(�C�f��|���y�o����|2����9�.˛�(4:��V@�UБ)<��c��:`bo�
/fU�G�$��0�\�qAi��_#΁��f&d��|�Z_E�L�{*�i�g�T"Fc����TZ(��*��7+v��X���?<Y�+�k%��|Uma��W)�f4f^e�RbuÄ&u�W�S��IN&��	nu��p��C�q�ʙ�#>��r��C��_�?�����Z���I���t�7�$���/;�N�F6���5;A
4v�enB�!�E�4N`%5Љ��)�ŏ�n]����h�h�%��S�FQ�eHب�$IAT�3�H�G�zߞ��_���H+0-\�� ��<�XO(h���G�pQ䝍�_C4c�JT\�(����
ƪ��e� ��2JTl��+_h��2����%=�y�����T8R_��ڔ=���a��"0ˤ寬A�����`�C�^6ݽ�:��O�H��3��OE��:�m%������zN�,���?�4��t��V���v@�l�K��@l��iV��6ƧJ��UI�*�F4�ѐ��=j0�0.�\A�Z^���FRZ���A���T�eh\�*�*�����$�uu�����B|�1��=�f�)"�7c6I��/ߎo�`&�)�a��Nχ�
�^2}���;^��ʗ��2�<)�{�ϘK����hZ�c���%�,��Ӡ
�"`�$�t�A�a`���U���`
�y���_AU#v"#�a��(��BP(ڒ�y�"NaF��]����Z�s�m��	�VAA�+��z�P��(8]9��.�B��-Y�P-��^��^��i��rubygems/rubygems.rb000064400000111676150403134160010574 0ustar00x/�5�
G�	��8�Y�)��.؉�U�T��#5��I�Jް݄��ԫ����`�w?¡i��\�7��R8WTNe|e`&6�$E��r�\���GG���1.��
o�9��c���[,\8�'Ǎo�G<#&�J[Q'N��Q��q��a9y�[#*�ʇ'�:~U=�ZJ=C	���TG��g�G:,�5���MP]��Z���M:0�k<rq/O��|�`i~��f-	��d�3�ĪPq<	�CWq��*�gU�*Jn׋�F'�5�:.�Z�c����Z�f]��b��K3q]+ٗ��
dpS�s5� a�g��D�E=A�&|�ۥ��g���K�]KC�f~��m
k^�p���|�/������E���W^-�~��b�8�գ_v=��k����<B�b*v=6��.��?���x�f+_����^�?������N�����^�����U̷S�}Q<��M�)_2c���O�)ɜc�Gԕ�bτe"1M��&�%>��?e2ڗ]��⧫�t��_�b����Y�����W���~�7G�/W�p"3�)���_�9���5 /zB�G:6����ZҩHc�dY�:�Q�H�hU._����������"�"�7j�a���c�
��D]����*�ԝ��"DI�H%9T�Z?(���N�R�b�m�����a�U�I�/b����:(����)=IL��"b:����j�y�y�-�f�F����+Ej"ڀ��sD�[�|Ό�"G,Č\��w4�<��\ǚȋM�5�#,�M���p��\en�Ϋ��AA?ѓo�y�5���f�o<Y&�k�zӷ�xg	�IQ6�5G�I _b��PM�d���O@��'�a�{���|���2�gR�*\˾@O��8I�0�3(��'wCp�-1ӈI�%��Ò>���*�]q�Q��S��-Ҧ-˹_��E{�[v��׀�jP�5!��P1.Iᴰ/=Z��1D�~�c���Z�r�#䒋H'�dc�iГ�YT�t�<$&���#�T�쓀6��%�K)�!L�R�c���R��U��>JV�Ŝ���_ۢ�EOQ�/K~9��z�%�QK׾O[+���k���%yM�j�*�U�bU[�hã�N��rR�X��-LI^7��GZ�P�i/jl]���S0EL"[�o��q�/��d�3�p@�lɫv��K�g)��DCybú�<Fg�PXq+՟ܑO�X�˕�Fg	Tg��%���6.�$�]�"��Z�A�Ws>�v��=W�(j*���D��d�_8�p��n��mפvn�@le)���8z����������8�E���'�7�*����LQ��<�^<��&P��H��7M:��9y4�D	�2��@\8��Ípސ�=Ҙ��V�q���GΉ�N��⣏p
�'��/1�y��Ta�,^�0yu�h>�\{��$�1l"��Xlm畨�����4�~A/�����Ҭ�Y2�3F��aY�ICU�B�a��{�_)>Qv�p}<��~�إ�����4�
"�\�c9��g�;բ"���j&�cj���6>m~�ŽϦ��Z.CɅP�)��Q9�rB�H�����F��0�[�ê`y�%!a:�v���g��W\%�a��ǝ�}`1�}�C�Rc`i�݌0Q�m�4+u!ׂ�j���a*n\Kctf���--��k�!j|�1� OBE��V�J0�'��@:H��QɎ	4�f^&='Q�U+�Қr�%��AȋU�t-��bm:�[���l��Ә^	LFM�#I�O��E�.���Ien�)��V=����E��9�c{'��h��A��fW�+8��W�+�
Q�'sG��HL� [s�N�7&��b]�W���
�$'G��y�$K�O8y�ٌI�:�|���x`A�;�V�Cl�ͧ�NO$!�
BP͵���Xb�o�X,2k�ɺE#w��l��$g�
���)�29�v��a��4�@ʑ�� ��ǎQ!����p�ɘ/��'��[�E�iμ�m�)�V _?>�-�(?�9�.�Jd��K�Lk�Kڀ޺w_
�|F���F�F'��_ ^W4����ZyY�T�lz��(r��,dV(&67�����1Ɗ�92���u�O�|��2��&hV~�G�-���1D|�5��
�a�S,Q��HH�Dm	s�(,��~��m5_�Nj2��wg1��yK����XbU�$��V�7_6�ZyB���.6�T��#�9��d܋����"m�L�E9�8��F�<1��i���?��P��X������3vvxx�N��ܴG�}���^~�~h�z,,[3�!�n٩�#8�$G������4�"Z��[�=��P��R��O����������n�E+,Đbz�ָ��I�ZnY��⊉�w�	�k@VhD>�
�1���G�53n8�o�J*R[���i��Aš�D��E�~�*5�#��1μ�1��'G�Û��C�e�+�{�깘hk��'�t�V�E�&��KF��gBN�>���1��YhH{�1����T��4OQoӾi�b���
5��X��i@��@�5�H̸�pBY��J��~N���UX/o�kx��QR�k��)�up��q�s2��_hɤ�Y"ݺ��c�Z	'��I���m�6���Ux-ơ�#���nc5Ax��0̌���J
��$��X�	�Ƙ�0M�cJ=��"bP�GŚ�0�Ǽz�F�E���3i�ȞJ��7�b���l�?����2Qj�0@t�~d�8�(b(�HM���bI��T:�4�o���e1�S���3�H��<����M�y�U�2�((�hFV���b�Iot�c{'���;�y��)�T��˺��m�5���9��p�v�{Q��#S�K��H^�ȿ1��([<��89Hz���H�Z��
��cw����e�U�ƫ�퀒�tc���rT���
��o�uU��g��Fɘ���2��"��$����.��$�`�/'��w�
��{���S[G[KSb������n�G����9eCD
Ā�2VԵ�6�m����,��fף/�4��a|���Q�f�7��Ӟ]KpB�����,�"�\��겒,/��qΞ��m�1�R���V�༴rщ>ݎ�d���c%\�V���v9��Vt�|r���ޯ5GA��Lɼ�Rr��R�K�x�`�2A�M���L����-j�j��"�K!�:*��Uȁ8�V oai�Ks�ضЩ�M�i>v�BY���Cn*��W-��[ӶQ0��&�URll��ڿ���րU�$��V��G5]���)T�
-C
FF�x֞S��<Ǎ��|�X59(
�F�htƹ��LV���v��yW����(�n��Rg��Š����OQ�'NseŹb� ��q;Kk5\G�ׯd��=�]�Br����%|�ʙ��i��6dG��m3�� J"|zP�� ���W-�)Q9�>&�K��n(��t�8~��[�������`�XG\���C9��N.kR����t���(�C}u|�����8lј���1��O�;ۊ'�8��8^[C�b$�A�UXrQ��Q�����ץ���J�S�z|œRM��4%C�Yѥ̽-�ĥ�s����>^M��-.:Q�*F?_�H{G^�$+Y���Cz��c��q8ȵ5��
z>�X���gqER�p����uY"�b�`����f�u��5#y���&w_��B_��5ܦܦ5�6�$�JL<�7)PC�ۏ�Њ��I����"P�|��'
���}���.Z�w��|���y��q�E�e�2�\�.Mh��+�-���O��ʇ���B�ˠhw���i�e��C�8f�:�c�D�����n=�`��{%t4��"�ZD���a��1
��hR����I�X{��}�.Iɏk�� F�]AZ`)�ᛖ�7�-G�ikx��=I�%ᾀ��)��c�$�dC)�&5[�X�y%5����!�����,��b���'��P���^b���Œ��7���m\���bGG:�pt��Y0J��B�J�%��po3+�-3�4��A2
������kJyL�B	nѕ4�<���YKO�1�<�@�s��W\�5���r�) Z
��Ԯ�Q!�԰�D��qح�#�
{
$&.�+����~��"C�@g�h��M0�Gԍ�P�ʒx����e�V3�Do"
p���B�ʚOF]�W�[ �}�q�`�ƭ(��Pⴳ�Y�4u�{���pU�c�S���;͠���Z�S����摕��0��u�t^Q��DYټ�=Cڿ���U�Fշ�`s������2!�ۘR,~�4}b��vζ2�7��%��EwB.!����]�]�U^t���Ђ�?�Q$]l�ѐ/�n�I�����H�ew,~������E*�-���j�3�?o��;I4��C�1��r vgm��I�
b"�D���1Јh���v���N�|Mj���bo��P����U����)�@�’p�b��n@���b�7�RE|w�Zhv��K��'�"�#��~��ǹ��]+4Lj���BX�� I���G�t��VF�o%�u^��# �Y�ahE/i�ؒ�~|���)��<��0�Y]~�pb����
&��9�T.vl�]������T�C?]��5:�ݥHd��rђ~*�)���MI��ŢXV�b�yw�QkR�pZ[�r8�X{1eȜ�RPo��c�`����}*�ؤ��(��i��/q4X�\N�c��%���η����N�~D��A0�%�D�r�"]0��b}�A��B�jF��t��aP�̯b?u=��.�+���i�[���º9`�����O;�1�'�ϓn	���ࢡ�Ɯ�h�巐���3�g��֥N������Q/6�|*�2/�KL#�DX�Pb�o3=O3�$k�+��]�L�LY~�<Uˉǡ:Ι�H���@����6��A�_r<:ǁ,Y���m��� ��v�R�X�F�^g?i2N��9�o� բ�2P)n�6.:nS�2Wn_*���v��K�L��{M�[֛��kH�zM+DVbB'�PyOV�V&��䳠�Rd\I$]xwI�� p����l���ֲ��OaA[D�lSdO�mq?�)����k���2��N�˫˒����똷�p�I������*c�題GQ��!�^�x1�cl7�p�sJ<�5ɻ�vW�����Ì{;Ün�Wc͙L�7�%�û,Y�`�ұ-���P����I<a5�;z��|��D�5c�x�4,�p�����d��B�r��0��#K���r��bA^jm�Ѻ��(F�M���'>4�o��p4�Ls�M��W�8�5�_�m�c�	���2�E�½4�S��wɁ�hL�ӎ��%�t�Dr��^��h�`��;R+��%E&ŸKt�CZ�`���
�%y����	�{^+�פm���Y�+;a�⌛2�W�фL+�����p�5
n7`"&������2��UE�@I�t��0��?���@ni*�F
Wc�E�Ԓ��$�6�+1'O����[,-f��O���L]?8b�H0�`Z��p	ԩ�(֖H��F2��(U�'����ԼP�jdm�㻌�d��U��xᡘ�J6�>R5��C�+�1�4N��y4�T�>���]�g�/6�:meoRtѺ��tj7
��m!U�q���yIB��$�,'�i	��-bO���ү��W�77�G�%m(r
��[#lml��`�?���*�AAV��m�ɥ�7�䡕	J˛!q�
T7�	寻/��ޜ[�R���^6���z8r=�s[�үh�	�9���{�y��J9�&�YgadG�>��/�&�(�|[0�1�����[��8� �}e��"(,�0q��mD�hB\�נ;�~��V�7l����6SLz}[@9���1W1z��2�@"��L��D��ȶ�u<���n�)y�K5�M�X!���Ch�ŀD\�&���[[c��s�Bև�5��"&v�C�<�ȝwOڿf8�r��y=$�l���ӳ���ɠ�1�m�/0҇
cQ��h�V���U����rN�2�ϻ�ڨ��@��6
����`����3V��%�7�By�^0��![Yee�i^�WY	~����*R�C
V�C?z��#�����8�*�a��������X��cV^�/E}6ʅL��N�y)Wv�U_�ɦ ���0�w�	��1R���'�*�/�gQH��
��_���o���+��E�GVE34���\ĬP̽�_�iB%G1,���;�����0X�?D����>��(},5��m�����y�����Y���4|(�h�ć�Ê��"?���U+�.�ǠÀɍ~��<vy�C�Ã+V/*(Ow����w�.ح����z0:�dG�\�q�z�<E�3cs���^O�<oRt�4����(� ��8��
����SaiG~���$щzH�Q���|,�"E0�#��P`7�׭X��́7��Wf�}8��p�S��Z`�)Of��|�(�m�M�$â���=���S*��)�{�ڨ @��Ǐ�:�����W�9����:U���q�Ce��oke����*R��d�C����\U��o��IW)�K�^xe�g��\��we���k!bϿ߹�7����q%�]�=X4\�3`�[�*��$e��&u���(�yD&��b��<�����z���4��5�13b13d��*�뮌<qV}L&��ve�u(�T�ͻ�+�	�p�QG~s]Iy���o��Cl����k�Cu
�� �{�OAĉ��I[�[�Oz���<������S8B+_?�V�0�r�lEӞEzZ3�H�_�@���a4�%p�����֞�c�&�Ru���d�T�i���D��ʄ�b���\�r�ɂ��m�[[[{BF_0^�Ȍl(��O��g1�����}��ʌ%����y{����j���.t��zVX-� �b{Y�c�)���=�mt��Z^�U�Ajjɰ��<���E�W)7V�H�$b��~�B�pSYp8i�}�c����3��~����E�i�@�`+E�<�Τ��M��v;g�iA�!��Nsi��,6�
�5�����ч\6z���&˂%�?uM`��o����_����_������Dchecksums.yaml.gz0000444000000000000000000000045214750162533014613 0ustar00wheelwheel00000000000000�[�ge�;�@�9�\`,��f�9�	hh9�6���nh'H�G��z����,o�����������ۓTycr;�rT��}/ZW]EM[u�����S:a���������\�w��n�d��7aYC<qiϕp�L���ZA+x�B�''/�����
k
nm ���w0oϖU��s!�(i�$�*�I���m�x|�`%:"��a:
w�%��R>5�L��_�������H�ɧSNa�b���D���fZW��Z,��N��#9
78C��.����vL{Jm�����t�rubygems/rubygems.rb000064400000114373150403134160010571 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require "rbconfig"

module Gem
  VERSION = "3.6.7"
end

# Must be first since it unloads the prelude from 1.9.2
require_relative "rubygems/compatibility"

require_relative "rubygems/defaults"
require_relative "rubygems/deprecate"
require_relative "rubygems/errors"
require_relative "rubygems/target_rbconfig"

##
# RubyGems is the Ruby standard for publishing and managing third party
# libraries.
#
# For user documentation, see:
#
# * <tt>gem help</tt> and <tt>gem help [command]</tt>
# * {RubyGems User Guide}[https://guides.rubygems.org/]
# * {Frequently Asked Questions}[https://guides.rubygems.org/faqs]
#
# For gem developer documentation see:
#
# * {Creating Gems}[https://guides.rubygems.org/make-your-own-gem]
# * Gem::Specification
# * Gem::Version for version dependency notes
#
# Further RubyGems documentation can be found at:
#
# * {RubyGems Guides}[https://guides.rubygems.org]
# * {RubyGems API}[https://www.rubydoc.info/github/rubygems/rubygems] (also available from
#   <tt>gem server</tt>)
#
# == RubyGems Plugins
#
# RubyGems will load plugins in the latest version of each installed gem or
# $LOAD_PATH.  Plugins must be named 'rubygems_plugin' (.rb, .so, etc) and
# placed at the root of your gem's #require_path.  Plugins are installed at a
# special location and loaded on boot.
#
# For an example plugin, see the {Graph gem}[https://github.com/seattlerb/graph]
# which adds a <tt>gem graph</tt> command.
#
# == RubyGems Defaults, Packaging
#
# RubyGems defaults are stored in lib/rubygems/defaults.rb.  If you're packaging
# RubyGems or implementing Ruby you can change RubyGems' defaults.
#
# For RubyGems packagers, provide lib/rubygems/defaults/operating_system.rb
# and override any defaults from lib/rubygems/defaults.rb.
#
# For Ruby implementers, provide lib/rubygems/defaults/#{RUBY_ENGINE}.rb and
# override any defaults from lib/rubygems/defaults.rb.
#
# If you need RubyGems to perform extra work on install or uninstall, your
# defaults override file can set pre/post install and uninstall hooks.
# See Gem::pre_install, Gem::pre_uninstall, Gem::post_install,
# Gem::post_uninstall.
#
# == Bugs
#
# You can submit bugs to the
# {RubyGems bug tracker}[https://github.com/rubygems/rubygems/issues]
# on GitHub
#
# == Credits
#
# RubyGems is currently maintained by Eric Hodel.
#
# RubyGems was originally developed at RubyConf 2003 by:
#
# * Rich Kilmer  -- rich(at)infoether.com
# * Chad Fowler  -- chad(at)chadfowler.com
# * David Black  -- dblack(at)wobblini.net
# * Paul Brannan -- paul(at)atdesk.com
# * Jim Weirich   -- jim(at)weirichhouse.org
#
# Contributors:
#
# * Gavin Sinclair     -- gsinclair(at)soyabean.com.au
# * George Marrows     -- george.marrows(at)ntlworld.com
# * Dick Davies        -- rasputnik(at)hellooperator.net
# * Mauricio Fernandez -- batsman.geo(at)yahoo.com
# * Simon Strandgaard  -- neoneye(at)adslhome.dk
# * Dave Glasser       -- glasser(at)mit.edu
# * Paul Duncan        -- pabs(at)pablotron.org
# * Ville Aine         -- vaine(at)cs.helsinki.fi
# * Eric Hodel         -- drbrain(at)segment7.net
# * Daniel Berger      -- djberg96(at)gmail.com
# * Phil Hagelberg     -- technomancy(at)gmail.com
# * Ryan Davis         -- ryand-ruby(at)zenspider.com
# * Evan Phoenix       -- evan(at)fallingsnow.net
# * Steve Klabnik      -- steve(at)steveklabnik.com
#
# (If your name is missing, PLEASE let us know!)
#
# == License
#
# See {LICENSE.txt}[https://github.com/rubygems/rubygems/blob/master/LICENSE.txt] for permissions.
#
# Thanks!
#
# -The RubyGems Team

module Gem
  RUBYGEMS_DIR = __dir__

  ##
  # An Array of Regexps that match windows Ruby platforms.

  WIN_PATTERNS = [
    /bccwin/i,
    /cygwin/i,
    /djgpp/i,
    /mingw/i,
    /mswin/i,
    /wince/i,
  ].freeze

  GEM_DEP_FILES = %w[
    gem.deps.rb
    gems.rb
    Gemfile
    Isolate
  ].freeze

  ##
  # Subdirectories in a gem repository

  REPOSITORY_SUBDIRECTORIES = %w[
    build_info
    cache
    doc
    extensions
    gems
    plugins
    specifications
  ].freeze

  ##
  # Subdirectories in a gem repository for default gems

  REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES = %w[
    gems
    specifications/default
  ].freeze

  ##
  # The default value for SOURCE_DATE_EPOCH if not specified.
  # We want a date after 1980-01-01, to prevent issues with Zip files.
  # This particular timestamp is for 1980-01-02 00:00:00 GMT.

  DEFAULT_SOURCE_DATE_EPOCH = 315_619_200

  @@win_platform = nil

  @configuration = nil
  @gemdeps = nil
  @loaded_specs = {}
  LOADED_SPECS_MUTEX = Thread::Mutex.new
  @path_to_default_spec_map = {}
  @platforms = []
  @ruby = nil
  @ruby_api_version = nil
  @sources = nil

  @post_build_hooks     ||= []
  @post_install_hooks   ||= []
  @post_uninstall_hooks ||= []
  @pre_uninstall_hooks  ||= []
  @pre_install_hooks    ||= []
  @pre_reset_hooks      ||= []
  @post_reset_hooks     ||= []

  @default_source_date_epoch = nil

  @discover_gems_on_require = true

  @target_rbconfig = nil

  ##
  # Try to activate a gem containing +path+. Returns true if
  # activation succeeded or wasn't needed because it was already
  # activated. Returns false if it can't find the path in a gem.

  def self.try_activate(path)
    # finds the _latest_ version... regardless of loaded specs and their deps
    # if another gem had a requirement that would mean we shouldn't
    # activate the latest version, then either it would already be activated
    # or if it was ambiguous (and thus unresolved) the code in our custom
    # require will try to activate the more specific version.

    spec = Gem::Specification.find_by_path path
    return false unless spec
    return true if spec.activated?

    begin
      spec.activate
    rescue Gem::LoadError => e # this could fail due to gem dep collisions, go lax
      spec_by_name = Gem::Specification.find_by_name(spec.name)
      if spec_by_name.nil?
        raise e
      else
        spec_by_name.activate
      end
    end

    true
  end

  def self.needs
    rs = Gem::RequestSet.new

    yield rs

    finish_resolve rs
  end

  def self.finish_resolve(request_set=Gem::RequestSet.new)
    request_set.import Gem::Specification.unresolved_deps.values
    request_set.import Gem.loaded_specs.values.map {|s| Gem::Dependency.new(s.name, s.version) }

    request_set.resolve_current.each do |s|
      s.full_spec.activate
    end
  end

  ##
  # Find the full path to the executable for gem +name+.  If the +exec_name+
  # is not given, an exception will be raised, otherwise the
  # specified executable's path is returned.  +requirements+ allows
  # you to specify specific gem versions.

  def self.bin_path(name, exec_name = nil, *requirements)
    requirements = Gem::Requirement.default if
      requirements.empty?

    find_spec_for_exe(name, exec_name, requirements).bin_file exec_name
  end

  def self.find_spec_for_exe(name, exec_name, requirements)
    raise ArgumentError, "you must supply exec_name" unless exec_name

    dep = Gem::Dependency.new name, requirements

    loaded = Gem.loaded_specs[name]

    return loaded if loaded && dep.matches_spec?(loaded)

    specs = dep.matching_specs(true)

    specs = specs.find_all do |spec|
      spec.executables.include? exec_name
    end if exec_name

    unless spec = specs.first
      msg = "can't find gem #{dep} with executable #{exec_name}"
      raise Gem::GemNotFoundException, msg
    end

    spec
  end
  private_class_method :find_spec_for_exe

  ##
  # Find the full path to the executable for gem +name+.  If the +exec_name+
  # is not given, an exception will be raised, otherwise the
  # specified executable's path is returned.  +requirements+ allows
  # you to specify specific gem versions.
  #
  # A side effect of this method is that it will activate the gem that
  # contains the executable.
  #
  # This method should *only* be used in bin stub files.

  def self.activate_bin_path(name, exec_name = nil, *requirements) # :nodoc:
    spec = find_spec_for_exe name, exec_name, requirements
    Gem::LOADED_SPECS_MUTEX.synchronize do
      spec.activate
      finish_resolve
    end
    spec.bin_file exec_name
  end

  ##
  # The mode needed to read a file as straight binary.

  def self.binary_mode
    "rb"
  end

  ##
  # The path where gem executables are to be installed.

  def self.bindir(install_dir=Gem.dir)
    return File.join install_dir, "bin" unless
      install_dir.to_s == Gem.default_dir.to_s
    Gem.default_bindir
  end

  ##
  # The path were rubygems plugins are to be installed.

  def self.plugindir(install_dir=Gem.dir)
    File.join install_dir, "plugins"
  end

  ##
  # Reset the +dir+ and +path+ values.  The next time +dir+ or +path+
  # is requested, the values will be calculated from scratch.  This is
  # mainly used by the unit tests to provide test isolation.

  def self.clear_paths
    @paths         = nil
    @user_home     = nil
    Gem::Specification.reset
    Gem::Security.reset if defined?(Gem::Security)
  end

  ##
  # The standard configuration object for gems.

  def self.configuration
    @configuration ||= Gem::ConfigFile.new []
  end

  ##
  # Use the given configuration object (which implements the ConfigFile
  # protocol) as the standard configuration object.

  def self.configuration=(config)
    @configuration = config
  end

  ##
  # A Zlib::Deflate.deflate wrapper

  def self.deflate(data)
    require "zlib"
    Zlib::Deflate.deflate data
  end

  # Retrieve the PathSupport object that RubyGems uses to
  # lookup files.

  def self.paths
    @paths ||= Gem::PathSupport.new(ENV)
  end

  # Initialize the filesystem paths to use from +env+.
  # +env+ is a hash-like object (typically ENV) that
  # is queried for 'GEM_HOME', 'GEM_PATH', and 'GEM_SPEC_CACHE'
  # Keys for the +env+ hash should be Strings, and values of the hash should
  # be Strings or +nil+.

  def self.paths=(env)
    clear_paths
    target = {}
    env.each_pair do |k,v|
      case k
      when "GEM_HOME", "GEM_PATH", "GEM_SPEC_CACHE"
        case v
        when nil, String
          target[k] = v
        when Array
          unless Gem::Deprecate.skip
            warn <<-EOWARN
Array values in the parameter to `Gem.paths=` are deprecated.
Please use a String or nil.
An Array (#{env.inspect}) was passed in from #{caller[3]}
            EOWARN
          end
          target[k] = v.join File::PATH_SEPARATOR
        end
      else
        target[k] = v
      end
    end
    @paths = Gem::PathSupport.new ENV.to_hash.merge(target)
    Gem::Specification.dirs = @paths.path
  end

  ##
  # The path where gems are to be installed.

  def self.dir
    paths.home
  end

  def self.path
    paths.path
  end

  def self.spec_cache_dir
    paths.spec_cache_dir
  end

  ##
  # The RbConfig object for the deployment target platform.
  #
  # This is usually the same as the running platform, but may be
  # different if you are cross-compiling.

  def self.target_rbconfig
    @target_rbconfig || Gem::TargetRbConfig.for_running_ruby
  end

  def self.set_target_rbconfig(rbconfig_path)
    @target_rbconfig = Gem::TargetRbConfig.from_path(rbconfig_path)
    Gem::Platform.local(refresh: true)
    Gem.platforms << Gem::Platform.local unless Gem.platforms.include? Gem::Platform.local
    @target_rbconfig
  end

  ##
  # Quietly ensure the Gem directory +dir+ contains all the proper
  # subdirectories.  If we can't create a directory due to a permission
  # problem, then we will silently continue.
  #
  # If +mode+ is given, missing directories are created with this mode.
  #
  # World-writable directories will never be created.

  def self.ensure_gem_subdirectories(dir = Gem.dir, mode = nil)
    ensure_subdirectories(dir, mode, REPOSITORY_SUBDIRECTORIES)
  end

  ##
  # Quietly ensure the Gem directory +dir+ contains all the proper
  # subdirectories for handling default gems.  If we can't create a
  # directory due to a permission problem, then we will silently continue.
  #
  # If +mode+ is given, missing directories are created with this mode.
  #
  # World-writable directories will never be created.

  def self.ensure_default_gem_subdirectories(dir = Gem.dir, mode = nil)
    ensure_subdirectories(dir, mode, REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES)
  end

  def self.ensure_subdirectories(dir, mode, subdirs) # :nodoc:
    old_umask = File.umask
    File.umask old_umask | 0o002

    options = {}

    options[:mode] = mode if mode

    subdirs.each do |name|
      subdir = File.join dir, name
      next if File.exist? subdir

      require "fileutils"

      begin
        FileUtils.mkdir_p subdir, **options
      rescue SystemCallError
      end
    end
  ensure
    File.umask old_umask
  end

  ##
  # The extension API version of ruby.  This includes the static vs non-static
  # distinction as extensions cannot be shared between the two.

  def self.extension_api_version # :nodoc:
    if target_rbconfig["ENABLE_SHARED"] == "no"
      "#{ruby_api_version}-static"
    else
      ruby_api_version
    end
  end

  ##
  # Returns a list of paths matching +glob+ that can be used by a gem to pick
  # up features from other gems.  For example:
  #
  #   Gem.find_files('rdoc/discover').each do |path| load path end
  #
  # if +check_load_path+ is true (the default), then find_files also searches
  # $LOAD_PATH for files as well as gems.
  #
  # Note that find_files will return all files even if they are from different
  # versions of the same gem.  See also find_latest_files

  def self.find_files(glob, check_load_path=true)
    files = []

    files = find_files_from_load_path glob if check_load_path

    gem_specifications = @gemdeps ? Gem.loaded_specs.values : Gem::Specification.stubs

    files.concat gem_specifications.flat_map {|spec|
      spec.matches_for_glob("#{glob}#{Gem.suffix_pattern}")
    }

    # $LOAD_PATH might contain duplicate entries or reference
    # the spec dirs directly, so we prune.
    files.uniq! if check_load_path

    files
  end

  def self.find_files_from_load_path(glob) # :nodoc:
    glob_with_suffixes = "#{glob}#{Gem.suffix_pattern}"
    $LOAD_PATH.flat_map do |load_path|
      Gem::Util.glob_files_in_dir(glob_with_suffixes, load_path)
    end.select {|file| File.file? file }
  end

  ##
  # Returns a list of paths matching +glob+ from the latest gems that can be
  # used by a gem to pick up features from other gems.  For example:
  #
  #   Gem.find_latest_files('rdoc/discover').each do |path| load path end
  #
  # if +check_load_path+ is true (the default), then find_latest_files also
  # searches $LOAD_PATH for files as well as gems.
  #
  # Unlike find_files, find_latest_files will return only files from the
  # latest version of a gem.

  def self.find_latest_files(glob, check_load_path=true)
    files = []

    files = find_files_from_load_path glob if check_load_path

    files.concat Gem::Specification.latest_specs(true).flat_map {|spec|
      spec.matches_for_glob("#{glob}#{Gem.suffix_pattern}")
    }

    # $LOAD_PATH might contain duplicate entries or reference
    # the spec dirs directly, so we prune.
    files.uniq! if check_load_path

    files
  end

  ##
  # Top level install helper method. Allows you to install gems interactively:
  #
  #   % irb
  #   >> Gem.install "minitest"
  #   Fetching: minitest-5.14.0.gem (100%)
  #   => [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]

  def self.install(name, version = Gem::Requirement.default, *options)
    require_relative "rubygems/dependency_installer"
    inst = Gem::DependencyInstaller.new(*options)
    inst.install name, version
    inst.installed_gems
  end

  ##
  # Get the default RubyGems API host. This is normally
  # <tt>https://rubygems.org</tt>.

  def self.host
    @host ||= Gem::DEFAULT_HOST
  end

  ## Set the default RubyGems API host.

  def self.host=(host)
    @host = host
  end

  ##
  # The index to insert activated gem paths into the $LOAD_PATH. The activated
  # gem's paths are inserted before site lib directory by default.

  def self.load_path_insert_index
    $LOAD_PATH.each_with_index do |path, i|
      return i if path.instance_variable_defined?(:@gem_prelude_index)
    end

    index = $LOAD_PATH.index RbConfig::CONFIG["sitelibdir"]

    index || 0
  end

  ##
  # The number of paths in the +$LOAD_PATH+ from activated gems. Used to
  # prioritize +-I+ and <code>ENV['RUBYLIB']</code> entries during +require+.

  def self.activated_gem_paths
    @activated_gem_paths ||= 0
  end

  ##
  # Add a list of paths to the $LOAD_PATH at the proper place.

  def self.add_to_load_path(*paths)
    @activated_gem_paths = activated_gem_paths + paths.size

    # gem directories must come after -I and ENV['RUBYLIB']
    $LOAD_PATH.insert(Gem.load_path_insert_index, *paths)
  end

  @yaml_loaded = false

  ##
  # Loads YAML, preferring Psych

  def self.load_yaml
    return if @yaml_loaded

    require "psych"
    require_relative "rubygems/psych_tree"

    require_relative "rubygems/safe_yaml"

    @yaml_loaded = true
  end

  @safe_marshal_loaded = false

  def self.load_safe_marshal
    return if @safe_marshal_loaded

    require_relative "rubygems/safe_marshal"

    @safe_marshal_loaded = true
  end

  ##
  # The file name and line number of the caller of the caller of this method.
  #
  # +depth+ is how many layers up the call stack it should go.
  #
  # e.g.,
  #
  # def a; Gem.location_of_caller; end
  # a #=> ["x.rb", 2]  # (it'll vary depending on file name and line number)
  #
  # def b; c; end
  # def c; Gem.location_of_caller(2); end
  # b #=> ["x.rb", 6]  # (it'll vary depending on file name and line number)

  def self.location_of_caller(depth = 1)
    caller[depth] =~ /(.*?):(\d+).*?$/i
    file = $1
    lineno = $2.to_i

    [file, lineno]
  end

  ##
  # The version of the Marshal format for your Ruby.

  def self.marshal_version
    "#{Marshal::MAJOR_VERSION}.#{Marshal::MINOR_VERSION}"
  end

  ##
  # Set array of platforms this RubyGems supports (primarily for testing).

  def self.platforms=(platforms)
    @platforms = platforms
  end

  ##
  # Array of platforms this RubyGems supports.

  def self.platforms
    @platforms ||= []
    if @platforms.empty?
      @platforms = [Gem::Platform::RUBY, Gem::Platform.local]
    end
    @platforms
  end

  ##
  # Adds a post-build hook that will be passed an Gem::Installer instance
  # when Gem::Installer#install is called.  The hook is called after the gem
  # has been extracted and extensions have been built but before the
  # executables or gemspec has been written.  If the hook returns +false+ then
  # the gem's files will be removed and the install will be aborted.

  def self.post_build(&hook)
    @post_build_hooks << hook
  end

  ##
  # Adds a post-install hook that will be passed an Gem::Installer instance
  # when Gem::Installer#install is called

  def self.post_install(&hook)
    @post_install_hooks << hook
  end

  ##
  # Adds a post-installs hook that will be passed a Gem::DependencyInstaller
  # and a list of installed specifications when
  # Gem::DependencyInstaller#install is complete

  def self.done_installing(&hook)
    @done_installing_hooks << hook
  end

  ##
  # Adds a hook that will get run after Gem::Specification.reset is
  # run.

  def self.post_reset(&hook)
    @post_reset_hooks << hook
  end

  ##
  # Adds a post-uninstall hook that will be passed a Gem::Uninstaller instance
  # and the spec that was uninstalled when Gem::Uninstaller#uninstall is
  # called

  def self.post_uninstall(&hook)
    @post_uninstall_hooks << hook
  end

  ##
  # Adds a pre-install hook that will be passed an Gem::Installer instance
  # when Gem::Installer#install is called.  If the hook returns +false+ then
  # the install will be aborted.

  def self.pre_install(&hook)
    @pre_install_hooks << hook
  end

  ##
  # Adds a hook that will get run before Gem::Specification.reset is
  # run.

  def self.pre_reset(&hook)
    @pre_reset_hooks << hook
  end

  ##
  # Adds a pre-uninstall hook that will be passed an Gem::Uninstaller instance
  # and the spec that will be uninstalled when Gem::Uninstaller#uninstall is
  # called

  def self.pre_uninstall(&hook)
    @pre_uninstall_hooks << hook
  end

  ##
  # The directory prefix this RubyGems was installed at. If your
  # prefix is in a standard location (ie, rubygems is installed where
  # you'd expect it to be), then prefix returns nil.

  def self.prefix
    prefix = File.dirname RUBYGEMS_DIR

    if prefix != File.expand_path(RbConfig::CONFIG["sitelibdir"]) &&
       prefix != File.expand_path(RbConfig::CONFIG["libdir"]) &&
       File.basename(RUBYGEMS_DIR) == "lib"
      prefix
    end
  end

  ##
  # Refresh available gems from disk.

  def self.refresh
    Gem::Specification.reset
  end

  ##
  # Safely read a file in binary mode on all platforms.

  def self.read_binary(path)
    File.binread(path)
  end

  ##
  # Safely write a file in binary mode on all platforms.

  def self.write_binary(path, data)
    File.binwrite(path, data)
  rescue Errno::ENOSPC
    # If we ran out of space but the file exists, it's *guaranteed* to be corrupted.
    File.delete(path) if File.exist?(path)
    raise
  end

  ##
  # Open a file with given flags

  def self.open_file(path, flags, &block)
    File.open(path, flags, &block)
  end

  ##
  # Open a file with given flags, and protect access with a file lock

  def self.open_file_with_lock(path, &block)
    file_lock = "#{path}.lock"
    open_file_with_flock(file_lock, &block)
  ensure
    require "fileutils"
    FileUtils.rm_f file_lock
  end

  ##
  # Open a file with given flags, and protect access with flock

  def self.open_file_with_flock(path, &block)
    # read-write mode is used rather than read-only in order to support NFS
    mode = IO::RDWR | IO::APPEND | IO::CREAT | IO::BINARY
    mode |= IO::SHARE_DELETE if IO.const_defined?(:SHARE_DELETE)

    File.open(path, mode) do |io|
      begin
        # Try to get a lock without blocking.
        # If we do, the file is locked.
        # Otherwise, explain why we're waiting and get a lock, but block this time.
        if io.flock(File::LOCK_EX | File::LOCK_NB) != 0
          warn "Waiting for another process to let go of lock: #{path}"
          io.flock(File::LOCK_EX)
        end
        io.puts(Process.pid)
      rescue Errno::ENOSYS, Errno::ENOTSUP
      end
      yield io
    end
  end

  ##
  # The path to the running Ruby interpreter.

  def self.ruby
    if @ruby.nil?
      @ruby = RbConfig.ruby

      @ruby = "\"#{@ruby}\"" if /\s/.match?(@ruby)
    end

    @ruby
  end

  ##
  # Returns a String containing the API compatibility version of Ruby

  def self.ruby_api_version
    @ruby_api_version ||= target_rbconfig["ruby_version"].dup
  end

  def self.env_requirement(gem_name)
    @env_requirements_by_name ||= {}
    @env_requirements_by_name[gem_name] ||= begin
      req = ENV["GEM_REQUIREMENT_#{gem_name.upcase}"] || ">= 0"
      Gem::Requirement.create(req)
    end
  end
  post_reset { @env_requirements_by_name = {} }

  ##
  # Returns the latest release-version specification for the gem +name+.

  def self.latest_spec_for(name)
    dependency   = Gem::Dependency.new name
    fetcher      = Gem::SpecFetcher.fetcher
    spec_tuples, = fetcher.spec_for_dependency dependency

    spec, = spec_tuples.last

    spec
  end

  ##
  # Returns the latest release version of RubyGems.

  def self.latest_rubygems_version
    latest_version_for("rubygems-update") ||
      raise("Can't find 'rubygems-update' in any repo. Check `gem source list`.")
  end

  ##
  # Returns the version of the latest release-version of gem +name+

  def self.latest_version_for(name)
    latest_spec_for(name)&.version
  end

  ##
  # A Gem::Version for the currently running Ruby.

  def self.ruby_version
    return @ruby_version if defined? @ruby_version
    version = RUBY_VERSION.dup

    if RUBY_PATCHLEVEL == -1
      if RUBY_ENGINE == "ruby"
        desc = RUBY_DESCRIPTION[/\Aruby #{Regexp.quote(RUBY_VERSION)}([^ ]+) /, 1]
      else
        desc = RUBY_DESCRIPTION[/\A#{RUBY_ENGINE} #{Regexp.quote(RUBY_ENGINE_VERSION)} \(#{RUBY_VERSION}([^ ]+)\) /, 1]
      end
      version << ".#{desc}" if desc
    end

    @ruby_version = Gem::Version.new version
  end

  ##
  # A Gem::Version for the currently running RubyGems

  def self.rubygems_version
    return @rubygems_version if defined? @rubygems_version
    @rubygems_version = Gem::Version.new Gem::VERSION
  end

  ##
  # Returns an Array of sources to fetch remote gems from. Uses
  # default_sources if the sources list is empty.

  def self.sources
    source_list = configuration.sources || default_sources
    @sources ||= Gem::SourceList.from(source_list)
  end

  ##
  # Need to be able to set the sources without calling
  # Gem.sources.replace since that would cause an infinite loop.
  #
  # DOC: This comment is not documentation about the method itself, it's
  # more of a code comment about the implementation.

  def self.sources=(new_sources)
    if !new_sources
      @sources = nil
    else
      @sources = Gem::SourceList.from(new_sources)
    end
  end

  ##
  # Glob pattern for require-able path suffixes.

  def self.suffix_pattern
    @suffix_pattern ||= "{#{suffixes.join(",")}}"
  end

  ##
  # Regexp for require-able path suffixes.

  def self.suffix_regexp
    @suffix_regexp ||= /#{Regexp.union(suffixes)}\z/
  end

  ##
  # Glob pattern for require-able plugin suffixes.

  def self.plugin_suffix_pattern
    @plugin_suffix_pattern ||= "_plugin#{suffix_pattern}"
  end

  ##
  # Regexp for require-able plugin suffixes.

  def self.plugin_suffix_regexp
    @plugin_suffix_regexp ||= /_plugin#{suffix_regexp}\z/
  end

  ##
  # Suffixes for require-able paths.

  def self.suffixes
    @suffixes ||= ["",
                   ".rb",
                   *%w[DLEXT DLEXT2].map do |key|
                     val = RbConfig::CONFIG[key]
                     next unless val && !val.empty?
                     ".#{val}"
                   end].compact.uniq
  end

  ##
  # Suffixes for dynamic library require-able paths.

  def self.dynamic_library_suffixes
    @dynamic_library_suffixes ||= suffixes - [".rb"]
  end

  ##
  # Prints the amount of time the supplied block takes to run using the debug
  # UI output.

  def self.time(msg, width = 0, display = Gem.configuration.verbose)
    now = Time.now

    value = yield

    elapsed = Time.now - now

    ui.say format("%2$*1$s: %3$3.3fs", -width, msg, elapsed) if display

    value
  end

  ##
  # Lazily loads DefaultUserInteraction and returns the default UI.

  def self.ui
    require_relative "rubygems/user_interaction"

    Gem::DefaultUserInteraction.ui
  end

  ##
  # Use the +home+ and +paths+ values for Gem.dir and Gem.path.  Used mainly
  # by the unit tests to provide environment isolation.

  def self.use_paths(home, *paths)
    paths.flatten!
    paths.compact!
    hash = { "GEM_HOME" => home, "GEM_PATH" => paths.empty? ? home : paths.join(File::PATH_SEPARATOR) }
    hash.delete_if {|_, v| v.nil? }
    self.paths = hash
  end

  ##
  # Is this a windows platform?

  def self.win_platform?
    if @@win_platform.nil?
      ruby_platform = RbConfig::CONFIG["host_os"]
      @@win_platform = !WIN_PATTERNS.find {|r| ruby_platform =~ r }.nil?
    end

    @@win_platform
  end

  ##
  # Is this a java platform?

  def self.java_platform?
    RUBY_PLATFORM == "java"
  rubygems/rubygems/request_set.rb000064400000026476150403134160013142 0ustar00or => e
        details = "#{plugin.inspect}: #{e.message} (#{e.class})"
        warn "Error loading RubyGems plugin #{details}"
      end
    end
  end

  ##
  # Find rubygems plugin files in the standard location and load them

  def self.load_plugins
    Gem.path.each do |gem_path|
      load_plugin_files Gem::Util.glob_files_in_dir("*#{Gem.plugin_suffix_pattern}", plugindir(gem_path))
    end
  end

  ##
  # Find all 'rubygems_plugin' files in $LOAD_PATH and load them

  def self.load_env_plugins
    load_plugin_files find_files_from_load_path("rubygems_plugin")
  end

  ##
  # Looks for a gem dependency file at +path+ and activates the gems in the
  # file if found.  If the file is not found an ArgumentError is raised.
  #
  # If +path+ is not given the RUBYGEMS_GEMDEPS environment variable is used,
  # but if no file is found no exception is raised.
  #
  # If '-' is given for +path+ RubyGems searches up from the current working
  # directory for gem dependency files (gem.deps.rb, Gemfile, Isolate) and
  # activates the gems in the first one found.
  #
  # You can run this automatically when rubygems starts.  To enable, set
  # the <code>RUBYGEMS_GEMDEPS</code> environment variable to either the path
  # of your gem dependencies file or "-" to auto-discover in parent
  # directories.
  #
  # NOTE: Enabling automatic discovery on multiuser systems can lead to
  # execution of arbitrary code when used from directories outside your
  # control.

  def self.use_gemdeps(path = nil)
    raise_exception = path

    path ||= ENV["RUBYGEMS_GEMDEPS"]
    return unless path

    path = path.dup

    if path == "-"
      Gem::Util.traverse_parents Dir.pwd do |directory|
        dep_file = GEM_DEP_FILES.find {|f| File.file?(f) }

        next unless dep_file

        path = File.join directory, dep_file
        break
      end
    end

    unless File.file? path
      return unless raise_exception

      raise ArgumentError, "Unable to find gem dependencies file at #{path}"
    end

    ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path)
    require_relative "rubygems/user_interaction"
    require "bundler"
    begin
      Gem::DefaultUserInteraction.use_ui(ui) do
        Bundler.ui.silence do
          @gemdeps = Bundler.setup
        end
      ensure
        Gem::DefaultUserInteraction.ui.close
      end
    rescue Bundler::BundlerError => e
      warn e.message
      warn "You may need to `bundle install` to install missing gems"
      warn ""
    end
  end

  ##
  # If the SOURCE_DATE_EPOCH environment variable is set, returns it's value.
  # Otherwise, returns DEFAULT_SOURCE_DATE_EPOCH as a string.
  #
  # NOTE(@duckinator): The implementation is a tad weird because we want to:
  #   1. Make builds reproducible by default, by having this function always
  #      return the same result during a given run.
  #   2. Allow changing ENV['SOURCE_DATE_EPOCH'] at runtime, since multiple
  #      tests that set this variable will be run in a single process.
  #
  # If you simplify this function and a lot of tests fail, that is likely
  # due to #2 above.
  #
  # Details on SOURCE_DATE_EPOCH:
  # https://reproducible-builds.org/specs/source-date-epoch/

  def self.source_date_epoch_string
    specified_epoch = ENV["SOURCE_DATE_EPOCH"]

    # If it's empty or just whitespace, treat it like it wasn't set at all.
    specified_epoch = nil if !specified_epoch.nil? && specified_epoch.strip.empty?

    epoch = specified_epoch || DEFAULT_SOURCE_DATE_EPOCH.to_s

    epoch.strip
  end

  ##
  # Returns the value of Gem.source_date_epoch_string, as a Time object.
  #
  # This is used throughout RubyGems for enabling reproducible builds.

  def self.source_date_epoch
    Time.at(source_date_epoch_string.to_i).utc.freeze
  end

  # FIX: Almost everywhere else we use the `def self.` way of defining class
  # methods, and then we switch over to `class << self` here. Pick one or the
  # other.
  class << self
    ##
    # RubyGems distributors (like operating system package managers) can
    # disable RubyGems update by setting this to error message printed to
    # end-users on gem update --system instead of actual update.

    attr_accessor :disable_system_update_message

    ##
    # Whether RubyGems should enhance builtin `require` to automatically
    # check whether the path required is present in installed gems, and
    # automatically activate them and add them to `$LOAD_PATH`.

    attr_accessor :discover_gems_on_require

    ##
    # Hash of loaded Gem::Specification keyed by name

    attr_reader :loaded_specs

    ##
    # GemDependencyAPI object, which is set when .use_gemdeps is called.
    # This contains all the information from the Gemfile.

    attr_reader :gemdeps

    ##
    # Register a Gem::Specification for default gem.
    #
    # Two formats for the specification are supported:
    #
    # * MRI 2.0 style, where spec.files contains unprefixed require names.
    #   The spec's filenames will be registered as-is.
    # * New style, where spec.files contains files prefixed with paths
    #   from spec.require_paths. The prefixes are stripped before
    #   registering the spec's filenames. Unprefixed files are omitted.
    #

    def register_default_spec(spec)
      extended_require_paths = spec.require_paths.map {|f| f + "/" }
      new_format = extended_require_paths.any? {|path| spec.files.any? {|f| f.start_with? path } }

      if new_format
        prefix_group = extended_require_paths.join("|")
        prefix_pattern = /^(#{prefix_group})/
      end

      spec.files.each do |file|
        if new_format
          file = file.sub(prefix_pattern, "")
          next unless $~
        end

        spec.activate if already_loaded?(file)

        @path_to_default_spec_map[file] = spec
        @path_to_default_spec_map[file.sub(suffix_regexp, "")] = spec
      end
    end

    ##
    # Find a Gem::Specification of default gem from +path+

    def find_default_spec(path)
      @path_to_default_spec_map[path]
    end

    ##
    # Find an unresolved Gem::Specification of default gem from +path+

    def find_unresolved_default_spec(path)
      default_spec = @path_to_default_spec_map[path]
      default_spec if default_spec && loaded_specs[default_spec.name] != default_spec
    end

    ##
    # Clear default gem related variables. It is for test

    def clear_default_specs
      @path_to_default_spec_map.clear
    end

    ##
    # The list of hooks to be run after Gem::Installer#install extracts files
    # and builds extensions

    attr_reader :post_build_hooks

    ##
    # The list of hooks to be run after Gem::Installer#install completes
    # installation

    attr_reader :post_install_hooks

    ##
    # The list of hooks to be run after Gem::DependencyInstaller installs a
    # set of gems

    attr_reader :done_installing_hooks

    ##
    # The list of hooks to be run after Gem::Specification.reset is run.

    attr_reader :post_reset_hooks

    ##
    # The list of hooks to be run after Gem::Uninstaller#uninstall completes
    # installation

    attr_reader :post_uninstall_hooks

    ##
    # The list of hooks to be run before Gem::Installer#install does any work

    attr_reader :pre_install_hooks

    ##
    # The list of hooks to be run before Gem::Specification.reset is run.

    attr_reader :pre_reset_hooks

    ##
    # The list of hooks to be run before Gem::Uninstaller#uninstall does any
    # work

    attr_reader :pre_uninstall_hooks

    private

    def already_loaded?(file)
      $LOADED_FEATURES.any? do |feature_path|
        feature_path.end_with?(file) && default_gem_load_paths.any? {|load_path_entry| feature_path == "#{load_path_entry}/#{file}" }
      end
    end

    def default_gem_load_paths
      @default_gem_load_paths ||= $LOAD_PATH[load_path_insert_index..-1].map do |lp|
        expanded = File.expand_path(lp)
        next expanded unless File.exist?(expanded)

        File.realpath(expanded)
      end
    end
  end

  ##
  # Location of Marshal quick gemspecs on remote repositories

  MARSHAL_SPEC_DIR = "quick/Marshal.#{Gem.marshal_version}/".freeze

  autoload :ConfigFile,         File.expand_path("rubygems/config_file", __dir__)
  autoload :CIDetector,         File.expand_path("rubygems/ci_detector", __dir__)
  autoload :Dependency,         File.expand_path("rubygems/dependency", __dir__)
  autoload :DependencyList,     File.expand_path("rubygems/dependency_list", __dir__)
  autoload :Installer,          File.expand_path("rubygems/installer", __dir__)
  autoload :Licenses,           File.expand_path("rubygems/util/licenses", __dir__)
  autoload :NameTuple,          File.expand_path("rubygems/name_tuple", __dir__)
  autoload :PathSupport,        File.expand_path("rubygems/path_support", __dir__)
  autoload :RequestSet,         File.expand_path("rubygems/request_set", __dir__)
  autoload :Requirement,        File.expand_path("rubygems/requirement", __dir__)
  autoload :Resolver,           File.expand_path("rubygems/resolver", __dir__)
  autoload :Source,             File.expand_path("rubygems/source", __dir__)
  autoload :SourceList,         File.expand_path("rubygems/source_list", __dir__)
  autoload :SpecFetcher,        File.expand_path("rubygems/spec_fetcher", __dir__)
  autoload :SpecificationPolicy, File.expand_path("rubygems/specification_policy", __dir__)
  autoload :Util,               File.expand_path("rubygems/util", __dir__)
  autoload :Version,            File.expand_path("rubygems/version", __dir__)
end

require_relative "rubygems/exceptions"
require_relative "rubygems/specification"

# REFACTOR: This should be pulled out into some kind of hacks file.
begin
  ##
  # Defaults the operating system (or packager) wants to provide for RubyGems.

  require "rubygems/defaults/operating_system"
rescue LoadError
  # Ignored
rescue StandardError => e
  path = e.backtrace_locations.reverse.find {|l| l.path.end_with?("rubygems/defaults/operating_system.rb") }.path
  msg = "#{e.message}\n" \
    "Loading the #{path} file caused an error. " \
    "This file is owned by your OS, not by rubygems upstream. " \
    "Please find out which OS package this file belongs to and follow the guidelines from your OS to report " \
    "the problem and ask for help."
  raise e.class, msg
end

begin
  ##
  # Defaults the Ruby implementation wants to provide for RubyGems

  require "rubygems/defaults/#{RUBY_ENGINE}"
rescue LoadError
end

##
# Loads the default specs.
Gem::Specification.load_defaults

require_relative "rubygems/core_ext/kernel_gem"

path = File.join(__dir__, "rubygems/core_ext/kernel_require.rb")
# When https://bugs.ruby-lang.org/issues/17259 is available, there is no need to override Kernel#warn
if RUBY_ENGINE == "truffleruby" ||
   RUBY_ENGINE == "ruby"
  file = "<internal:#{path}>"
else
  require_relative "rubygems/core_ext/kernel_warn"
  file = path
end
eval File.read(path), nil, file

require ENV["BUNDLER_SETUP"] if ENV["BUNDLER_SETUP"] && !defined?(Bundler)
rubygems/rubygems/request_set.rb000064400000026446150403134160013137 0ustar00rubygems/rubygems/version.rb000064400000031106150403134160012246 0ustar00nstalled

  attr_accessor :always_install

  attr_reader :dependencies

  attr_accessor :development

  ##
  # Errors fetching gems during resolution.

  attr_reader :errors

  ##
  # Set to true if you want to install only direct development dependencies.

  attr_accessor :development_shallow

  ##
  # The set of git gems imported via load_gemdeps.

  attr_reader :git_set # :nodoc:

  ##
  # When true, dependency resolution is not performed, only the requested gems
  # are installed.

  attr_accessor :ignore_dependencies

  attr_reader :install_dir # :nodoc:

  ##
  # If true, allow dependencies to match prerelease gems.

  attr_accessor :prerelease

  ##
  # When false no remote sets are used for resolving gems.

  attr_accessor :remote

  attr_reader :resolver # :nodoc:

  ##
  # Sets used for resolution

  attr_reader :sets # :nodoc:

  ##
  # Treat missing dependencies as silent errors

  attr_accessor :soft_missing

  ##
  # The set of vendor gems imported via load_gemdeps.

  attr_reader :vendor_set # :nodoc:

  ##
  # The set of source gems imported via load_gemdeps.

  attr_reader :source_set

  ##
  # Creates a RequestSet for a list of Gem::Dependency objects, +deps+.  You
  # can then #resolve and #install the resolved list of dependencies.
  #
  #   nokogiri = Gem::Dependency.new 'nokogiri', '~> 1.6'
  #   pg = Gem::Dependency.new 'pg', '~> 0.14'
  #
  #   set = Gem::RequestSet.new nokogiri, pg

  def initialize(*deps)
    @dependencies = deps

    @always_install      = []
    @conservative        = false
    @dependency_names    = {}
    @development         = false
    @development_shallow = false
    @errors              = []
    @git_set             = nil
    @ignore_dependencies = false
    @install_dir         = Gem.dir
    @prerelease          = false
    @remote              = true
    @requests            = []
    @sets                = []
    @soft_missing        = false
    @sorted_requests     = nil
    @specs               = nil
    @vendor_set          = nil
    @source_set          = nil

    yield self if block_given?
  end

  ##
  # Declare that a gem of name +name+ with +reqs+ requirements is needed.

  def gem(name, *reqs)
    if dep = @dependency_names[name]
      dep.requirement.concat reqs
    else
      dep = Gem::Dependency.new name, *reqs
      @dependency_names[name] = dep
      @dependencies << dep
    end
  end

  ##
  # Add +deps+ Gem::Dependency objects to the set.

  def import(deps)
    @dependencies.concat deps
  end

  ##
  # Installs gems for this RequestSet using the Gem::Installer +options+.
  #
  # If a +block+ is given an activation +request+ and +installer+ are yielded.
  # The +installer+ will be +nil+ if a gem matching the request was already
  # installed.

  def install(options, &block) # :yields: request, installer
    if dir = options[:install_dir]
      requests = install_into dir, false, options, &block
      return requests
    end

    @prerelease = options[:prerelease]

    requests = []
    download_queue = Thread::Queue.new

    # Create a thread-safe list of gems to download
    sorted_requests.each do |req|
      download_queue << req
    end

    # Create N threads in a pool, have them download all the gems
    threads = Array.new(Gem.configuration.concurrent_downloads) do
      # When a thread pops this item, it knows to stop running. The symbol
      # is queued here so that there will be one symbol per thread.
      download_queue << :stop

      Thread.new do
        # The pop method will block waiting for items, so the only way
        # to stop a thread from running is to provide a final item that
        # means the thread should stop.
        while req = download_queue.pop
          break if req == :stop
          req.spec.download options unless req.installed?
        end
      end
    end

    # Wait for all the downloads to finish before continuing
    threads.each(&:value)

    # Install requested gems after they have been downloaded
    sorted_requests.each do |req|
      if req.installed?
        req.spec.spec.build_extensions

        if @always_install.none? {|spec| spec == req.spec.spec }
          yield req, nil if block_given?
          next
        end
      end

      spec =
        begin
          req.spec.install options do |installer|
            yield req, installer if block_given?
          end
        rescue Gem::RuntimeRequirementNotMetError => e
          suggestion = "There are no versions of #{req.request} compatible with your Ruby & RubyGems"
          suggestion += ". Maybe try installing an older version of the gem you're looking for?" unless @always_install.include?(req.spec.spec)
          e.suggestion = suggestion
          raise
        end

      requests << spec
    end

    return requests if options[:gemdeps]

    install_hooks requests, options

    requests
  end

  ##
  # Installs from the gem dependencies files in the +:gemdeps+ option in
  # +options+, yielding to the +block+ as in #install.
  #
  # If +:without_groups+ is given in the +options+, those groups in the gem
  # dependencies file are not used.  See Gem::Installer for other +options+.

  def install_from_gemdeps(options, &block)
    gemdeps = options[:gemdeps]

    @install_dir = options[:install_dir] || Gem.dir
    @prerelease  = options[:prerelease]
    @remote      = options[:domain] != :local
    @conservative = true if options[:conservative]

    gem_deps_api = load_gemdeps gemdeps, options[:without_groups], true

    resolve

    if options[:explain]
      puts "Gems to install:"

      sorted_requests.each do |spec|
        puts "  #{spec.full_name}"
      end

      if Gem.configuration.really_verbose
        @resolver.stats.display
      end
    else
      installed = install options, &block

      if options.fetch :lock, true
        lockfile =
          Gem::RequestSet::Lockfile.build self, gemdeps, gem_deps_api.dependencies
        lockfile.write
      end

      installed
    end
  end

  def install_into(dir, force = true, options = {})
    gem_home = ENV["GEM_HOME"]
    ENV["GEM_HOME"] = dir

    existing = force ? [] : specs_in(dir)
    existing.delete_if {|s| @always_install.include? s }

    dir = File.expand_path dir

    installed = []

    options[:development] = false
    options[:install_dir] = dir
    options[:only_install_dir] = true
    @prerelease = options[:prerelease]

    sorted_requests.each do |request|
      spec = request.spec

      if existing.find {|s| s.full_name == spec.full_name }
        yield request, nil if block_given?
        next
      end

      spec.install options do |installer|
        yield request, installer if block_given?
      end

      installed << request
    end

    install_hooks installed, options

    installed
  ensure
    ENV["GEM_HOME"] = gem_home
  end

  ##
  # Call hooks on installed gems

  def install_hooks(requests, options)
    specs = requests.map do |request|
      case request
      when Gem::Resolver::ActivationRequest then
        request.spec.spec
      else
        request
      end
    end

    require_relative "dependency_installer"
    inst = Gem::DependencyInstaller.new options
    inst.installed_gems.replace specs

    Gem.done_installing_hooks.each do |hook|
      hook.call inst, specs
    end unless Gem.done_installing_hooks.empty?
  end

  ##
  # Load a dependency management file.

  def load_gemdeps(path, without_groups = [], installing = false)
    @git_set    = Gem::Resolver::GitSet.new
    @vendor_set = Gem::Resolver::VendorSet.new
    @source_set = Gem::Resolver::SourceSet.new

    @git_set.root_dir = @install_dir

    lock_file = "#{File.expand_path(path)}.lock"
    begin
      tokenizer = Gem::RequestSet::Lockfile::Tokenizer.from_file lock_file
      parser = tokenizer.make_parser self, []
      parser.parse
    rescue Errno::ENOENT
    end

    gf = Gem::RequestSet::GemDependencyAPI.new self, path
    gf.installing = installing
    gf.without_groups = without_groups if without_groups
    gf.load
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[RequestSet:", "]" do
      q.breakable

      if @remote
        q.text "remote"
        q.breakable
      end

      if @prerelease
        q.text "prerelease"
        q.breakable
      end

      if @development_shallow
        q.text "shallow development"
        q.breakable
      elsif @development
        q.text "development"
        q.breakable
      end

      if @soft_missing
        q.text "soft missing"
      end

      q.group 2, "[dependencies:", "]" do
        q.breakable
        @dependencies.map do |dep|
          q.text dep.to_s
          q.breakable
        end
      end

      q.breakable
      q.text "sets:"

      q.breakable
      q.pp @sets.map(&:class)
    end
  end

  ##
  # Resolve the requested dependencies and return an Array of Specification
  # objects to be activated.

  def resolve(set = Gem::Resolver::BestSet.new)
    @sets << set
    @sets << @git_set
    @sets << @vendor_set
    @sets << @source_set

    set = Gem::Resolver.compose_sets(*@sets)
    set.remote = @remote
    set.prerelease = @prerelease

    resolver = Gem::Resolver.new @dependencies, set
    resolver.development         = @development
    resolver.development_shallow = @development_shallow
    resolver.ignore_dependencies = @ignore_dependencies
    resolver.soft_missing        = @soft_missing

    if @conservative
      installed_gems = {}
      Gem::Specification.find_all do |spec|
        (installed_gems[spec.name] ||= []) << spec
      end
      resolver.skip_gems = installed_gems
    end

    @resolver = resolver

    @requests = resolver.resolve

    @errors = set.errors

    @requests
  end

  ##
  # Resolve the requested dependencies against the gems available via Gem.path
  # and return an Array of Specification objects to be activated.

  def resolve_current
    resolve Gem::Resolver::CurrentSet.new
  end

  def sorted_requests
    @sorted_requests ||= strongly_connected_components.flatten
  end

  def specs
    @specs ||= @requests.map(&:full_spec)
  end

  def specs_in(dir)
    Gem::Util.glob_files_in_dir("*.gemspec", File.join(dir, "specifications")).map do |g|
      Gem::Specification.load g
    end
  end

  def tsort_each_node(&block) # :nodoc:
    @requests.each(&block)
  end

  def tsort_each_child(node) # :nodoc:
    node.spec.dependencies.each do |dep|
      next if dep.type == :development && !@development

      match = @requests.find do |r|
        dep.match?(r.spec.name, r.spec.version, r.spec.is_a?(Gem::Resolver::InstalledSpecification) || @prerelease)
      end

      unless match
        next if dep.type == :development && @development_shallow
        next if @soft_missing
        raise Gem::DependencyError,
              "Unresolved dependency found during sorting - #{dep} (requested by #{node.spec.full_name})"
      end

      yield match
    end
  end
end

require_relative "request_set/gem_dependency_api"
require_relative "request_set/lockfile"
require_relative "request_set/lockfile/tokenizer"
rubygems/rubygems/version.rb000064400000032544150403134160012255 0ustar00# frozen_string_literal: true

require_relative "deprecate"

##
# The Version class processes string versions into comparable
# values. A version string should normally be a series of numbers
# separated by periods. Each part (digits separated by periods) is
# considered its own number, and these are used for sorting. So for
# instance, 3.10 sorts higher than 3.2 because ten is greater than
# two.
#
# If any part contains letters (currently only a-z are supported) then
# that version is considered prerelease. Versions with a prerelease
# part in the Nth part sort less than versions with N-1
# parts. Prerelease parts are sorted alphabetically using the normal
# Ruby string sorting rules. If a prerelease part contains both
# letters and numbers, it will be broken into multiple parts to
# provide expected sort behavior (1.0.a10 becomes 1.0.a.10, and is
# greater than 1.0.a9).
#
# Prereleases sort between real releases (newest to oldest):
#
# 1. 1.0
# 2. 1.0.b1
# 3. 1.0.a.2
# 4. 0.9
#
# If you want to specify a version restriction that includes both prereleases
# and regular releasrubygems/rubygems/text.rb000064400000004105150403134160011544 0ustar00nger compatible.
#
# Some examples are appropriate at this point.  Suppose I have a Stack class
# that supports a <tt>push</tt> and a <tt>pop</tt> method.
#
# === Examples of Category 1 changes:
#
# * Switch from an array based implementation to a linked-list based
#   implementation.
# * Provide an automatic (and transparent) backing store for large stacks.
#
# === Examples of Category 2 changes might be:
#
# * Add a <tt>depth</tt> method to return the current depth of the stack.
# * Add a <tt>top</tt> method that returns the current top of stack (without
#   changing the stack).
# * Change <tt>push</tt> so that it returns the item pushed (previously it
#   had no usable return value).
#
# === Examples of Category 3 changes might be:
#
# * Changes <tt>pop</tt> so that it no longer returns a value (you must use
#   <tt>top</tt> to get the top of the stack).
# * Rename the methods to <tt>push_item</tt> and <tt>pop_item</tt>.
#
# == RubyGems Rational Versioning
#
# * Versions shall be represented by three non-negative integers, separated
#   by periods (e.g. 3.1.4).  The first integers is the "major" version
#   number, the second integer is the "minor" version number, and the third
#   integer is the "build" number.
#
# * A category 1 change (implementation detail) will increment the build
#   number.
#
# * A category 2 change (backwards compatible) will increment the minor
#   version number and reset the build number.
#
# * A category 3 change (incompatible) will increment the major build number
#   and reset the minor and build numbers.
#
# * Any "public" release of a gem should have a different version.  Normally
#   that means incrementing the build number.  This means a developer can
#   generate builds all day long, but as soon as they make a public release,
#   the version must be updated.
#
# === Examples
#
# Let's work through a project lifecycle using our Stack example from above.
#
# Version 0.0.1:: The initial Stack class is release.
# Version 0.0.2:: Switched to a linked=list implementation because it is
#                 cooler.
# Version 0.1.0:: Added a <tt>depth</trubygems/rubygems/request/connection_pools.rb000064400000004611150403134160015625 0ustar00
#
#   gem 'stack', '~> 0.1'
#
# The <tt>depth</tt> method was introduced in version 0.1.0, so that version
# or anything later is fine, as long as the version stays below version 1.0
# where incompatibilities are introduced.  We call Client B pessimistic
# because they are worried about incompatible future changes (it is OK to be
# pessimistic!).
#
# == Preventing Version Catastrophe:
#
# From: https://www.zenspider.com/ruby/2008/10/rubygems-how-to-preventing-catastrophe.html
#
# Let's say you're depending on the fnord gem version 2.y.z. If you
# specify your dependency as ">= 2.0.0" then, you're good, right? What
# happens if fnord 3.0 comes out and it isn't backwards compatible
# with 2.y.z? Your stuff will break as a result of using ">=". The
# better route is to specify your dependency with an "approximate" version
# specifier ("~>"). They're a tad confusing, so here is how the dependency
# specifiers work:
#
#   Specification From  ... To (exclusive)
#   ">= 3.0"      3.0   ... &infin;
#   "~> 3.0"      3.0   ... 4.0
#   "~> 3.0.0"    3.0.0 ... 3.1
#   "~> 3.5"      3.5   ... 4.0
#   "~> 3.5.0"    3.5.0 ... 3.6
#   "~> 3"        3.0   ... 4.0
#
# For the last example, single-digit versions are automatically extended with
# a zero to give a sensible result.

class Gem::Version
  include Comparable

  VERSION_PATTERN = '[0-9]+(?>\.[0-9a-zA-Z]+)*(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?' # :nodoc:
  ANCHORED_VERSION_PATTERN = /\A\s*(#{VERSION_PATTERN})?\s*\z/ # :nodoc:

  ##
  # A string representation of this Version.

  def version
    @version
  end

  alias_method :to_s, :version

  ##
  # True if the +version+ string matches RubyGems' requirements.

  def self.correct?(version)
    nil_versions_are_discouraged! if version.nil?

    ANCHORED_VERSION_PATTERN.match?(version.to_s)
  end

  ##
  # Factory method to create a Version object. Input may be a Version
  # or a String. Intended to simplify client code.
  #
  #   ver1 = Version.create('1.3.17')   # -> (Version object)
  #   ver2 = Version.create(ver1)       # -> (ver1)
  #   ver3 = Version.create(nil)        # -> nil

  def self.create(input)
    if self === input # check yourself before you wreck yourself
      input
    elsif input.nil?
      nil_versions_are_discouraged!

      nil
    else
      new input
    end
  end

  @@all = {}
  @@bump = {}
  @@release = {}

  def self.new(version) # :nodoc:
    return super unless self == Gem::Versrubygems/rubygems/request/https_pool.rb000064400000000353150403134160014444 0ustar00(String) && /\A\s*\Z/.match?(version)

    @version = version.to_s

    # optimization to avoid allocation when given an integer, since we know
    # it's to_s won't have any spaces or dashes
    unless version.is_a?(Integer)
      @verubygems/rubygems/request/http_pool.rb000064400000002020150403134160014252 0ustar00ot the same as version "1".

  def eql?(other)
    self.class === other && @version == other.version
  end

  def hash # :nodoc:
    canonical_segments.hash
  end

  def init_with(coder) # :nodoc:
    yaml_initialize coder.tag, coder.map
  end

  def inspect # :nodoc:
    "#<#{self.class} #{version.inspect}>"
  end

  ##
  # Dump only the raw version string, not the complete object. It's a
  # string for backwards (RubyGems 1.3.5 and earlier) compatibility.

  def marshal_dump
    [@version]
  end

  ##
  # Load custom marshal format. It's a string for backwards (RubyGems
  # 1.3.5 and earlier) compatibility.

  def marshal_load(array)
    string = array[0]
    raise TypeError, "wrong version string" unless string.is_a?(String)

    initialize string
  end

  def yaml_initialize(tag, map) # :nodoc:
    @version = -map["version"]
    @segments = nil
    @hash = nil
  end

  def encode_with(coder) # :nodoc:
    coder.add "version", @version
  end

  ##
  # A version is considered a prerelease if it contains a letter.

  def prrubygems/rubygems/platform.rb000064400000016757150403134160012424 0ustar00ompares this version with +other+ returning -1, 0, or 1 if the
  # other version is larger, the same, or smaller than this
  # one. Attempts to compare to something that's not a
  # <tt>Gem::Version</tt> or a valid version String return +nil+.

  def <=>(other)
    return self <=> self.class.new(other) if (String === other) && self.class.correct?(other)

    return unless Gem::Version === other
    return 0 if @version == other.version || canonical_segments == other.canonical_segments

    lhsegments = canonical_segments
    rhsegments = other.canonical_segments

    lhsize = lhsegments.size
    rhsize = rhsegments.size
    limit  = (lhsize > rhsize ? rhsize : lhsize)

    i = 0

    while i < limit
      lhs = lhsegments[i]
      rhs = rhsegments[i]
      i += 1

      next      if lhs == rhs
      return -1 if String  === lhs && Numeric === rhs
      return  1 if Numeric === lhs && String  === rhs

      return lhs <=> rhs
    end

    lhs = lhsegments[i]

    if lhs.nil?
      rhs = rhsegments[i]

      while i < rhsize
        return 1 if String === rhs
        return -1 unless rhs.zero?
        rhs = rhsegments[i += 1]
      end
    else
      while i < lhsize
        return -1 if String === lhs
        return 1 unless lhs.zero?
        lhs = lhsegments[i += 1]
      end
    end

    0
  end

  # remove trailing zeros segments before first letter or at the end of the version
  def canonical_segments
    @canonical_segments ||= begin
      # remove trailing 0 segments, using dot or letter as anchor
      # may leave a trailing dot which will be ignored by partition_segments
      canonical_version = @version.sub(/(?<=[a-zA-Z.])[.0]+\z/, "")
      # remove 0 segments before the first letter in a prerelease version
      canonical_version.sub!(/(?<=\.|\A)[0.]+(?=[a-zA-Z])/, "") if prerelease?
      partition_segments(canonical_version)
    end
  end

  def freeze
    prerelease?
    _segments
    canonical_segments
    super
  end

  protected

  def _segments
    # segments is lazy so it can pick up version values that come from
    # old marshaled versions, which don't go through marshal_load.
    # since this version object is cached in @@all, its @segments should be frozen
    @segments ||= partition_segments(@version)
  end

  def partition_segments(ver)
    ver.scan(/\d+|[a-z]+/i).map! do |s|
      /\A\d/.match?(s) ? s.to_i : -s
    end.freeze
  end
end
rubygems/rubygems/text.rb000064400000004102150403134160011541 0ustar00# frozen_string_literal: true

##
# A collection of text-wrangling methods

module Gem::Text
  ##
  # Remove any non-printable characters and make the text suitable for
  # printing.
  def clean_text(text)
    text.gsub(/[\000-\b\v-\f\016-\037\177]/, ".")
  end

  def truncate_text(text, description, max_length = 100_000)
    raise ArgumentError, "max_length must be positive" unless max_length > 0
    return text if text.size <= max_length
    "Truncating #{description} to #{max_length.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse} characters:\n" + text[0, max_length]
  end

  ##
  # Wraps +text+ to +wrap+ characters and optionally indents by +indent+
  # characters

  def format_text(text, wrap, indent=0)
    result = []
    work = clean_text(text)

    while work.length > wrap do
      if work =~ /^(.{0,#{wrap}})[ \n]/
        result << $1.rstrip
        work.slice!(0, $&.length)
      else
        result << work.slice!(0, wrap)
      end
    end

    result << work if work.length.nonzero?
    result.join("\n").gsub(/^/, " " * indent)
  end

  def min3(a, b, c) # :nodoc:
    if a < b && a < c
      a
    elsif b < c
      b
    else
      c
    end
  end

  # Returns a value representing the "cost" of transforming str1 into str2
  # Vendored version of DidYouMean::Levenshtein.distance from the ruby/did_you_mean gem @ 1.4.0
  # https://github.com/ruby/did_you_mean/blob/2ddf39b874808685965dbc47d344cf6c7651807c/lib/did_you_mean/levenshtein.rb#L7-L37
  def levenshtein_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
end
rubygems/rubygems/request/connection_pools.rb000064400000004605150403134160015630 0ustar00# frozen_string_literal: true

class Gem::Request::ConnectionPools # :nodoc:
  @client = Gem::Net::HTTP

  class << self
    attr_accessor :client
  end

  def initialize(proxy_uri, cert_files)
    @proxy_uri  = proxy_uri
    @cert_files = cert_files
    @pools      = {}
    @pool_mutex = Thread::Mutex.new
  end

  def pool_for(uri)
    http_args = net_http_args(uri, @proxy_uri)
    key       = http_args + [https?(uri)]
    @pool_mutex.synchronize do
      @pools[key] ||=
        if https? uri
          Gem::Request::HTTPSPool.new(http_args, @cert_files, @proxy_uri)
        else
          Gem::Request::HTTPPool.new(http_args, @cert_files, @proxy_uri)
        end
    end
  end

  def close_all
    @pools.each_value(&:close_all)
  end

  private

  ##
  # Returns list of no_proxy entries (if any) from the environment

  def get_no_proxy_from_env
    env_no_proxy = ENV["no_proxy"] || ENV["NO_PROXY"]

    return [] if env_no_proxy.nil? || env_no_proxy.empty?

    env_no_proxy.split(/\s*,\s*/)
  end

  def https?(uri)
    uri.scheme.casecmp("https").zero?
  end

  def no_proxy?(host, env_no_proxy)
    host = host.downcase

    env_no_proxy.any? do |pattern|
      env_no_proxy_pattern = pattern.downcase.dup

      # Remove dot in front of pattern for wildcard matching
      env_no_proxy_pattern[0] = "" if env_no_proxy_pattern[0] == "."

      host_tokens = host.split(".")
      pattern_tokens = env_no_proxy_pattern.split(".")

      intersection = (host_tokens - pattern_tokens) | (pattern_tokens - horubygems/rubygems/query_utils.rb000064400000020773150403134160013156 0ustar00 = proxy_uri.respond_to?(:hostname) ? proxy_uri.hostname : proxy_uri.host
      net_http_args + [
        proxy_hostname,
        proxy_uri.port,
        Gem::UriFormatter.new(proxy_uri.user).unescape,
        Gem::UriFormatter.new(proxy_uri.password).unescape,
      ]
    elsif no_proxy? hostname, no_proxy
      net_http_args + [nil, nil]
    else
      net_http_args
    end
  end
end
rubygems/rubygems/request/https_pool.rb000064400000000353150403134160014444 0ustar00# frozen_string_literal: true

class Gem::Request::HTTPSPool < Gem::Request::HTTPPool # :nodoc:
  private

  def setup_connection(connection)
    Gem::Request.configure_connection_for_https(connection, @cert_files)
    super
  end
end
rubygems/rubygems/request/http_pool.rb000064400000002020150403134160014252 0ustar00# frozen_string_literal: true

##
# A connection "pool" that only manages one connection for now.  Provides
# thread safe `checkout` and `checkin` methods.  The pool consists of one
# connection that corresponds to `http_args`.  This class is private, do not
# use it.

class Gem::Request::HTTPPool # :nodoc:
  attr_reader :cert_files, :proxy_uri

  def initialize(http_args, cert_files, proxy_uri)
    @http_args  = http_args
    @cert_files = cert_files
    @proxy_uri  = proxy_uri
    @queue      = Thread::SizedQueue.new 1
    @queue << nil
  end

  def checkout
    @queue.pop || make_connection
  end

  def checkin(connection)
    @queue.push connection
  end

  def close_all
    until @queue.empty?
      if (connection = @queue.pop(true)) && connection.started?
        connection.finish
      end
    end
    @queue.push(nil)
  end

  private

  def make_connection
    setup_connection Gem::Request::ConnectionPools.client.new(*@http_args)
  end

  def setup_connection(connection)
    connection.start
    connection
  end
end
rubygems/rubygems/platform.rb000064400000020640150403134160012406 0ustar00# frozen_string_literal: true

require_relative "deprecate"

##
# Available list of platforms for targeting Gem installations.
#
# See `gem help platform` for information on platform matching.

class Gem::Platform
  @local = nil

  attr_accessor :cpu, :os, :version

  def self.local(refresh: false)
    return @local if @local && !refresh
    @local = begin
      arch = Gem.target_rbconfig["arch"]
      arch = "#{arch}_60" if /mswin(?:32|64)$/.match?(arch)
      new(arch)
    end
  end

  def self.match(platform)
    match_platforms?(platform, Gem.platforms)
  end

  class << self
    extend Gem::Deprecate
    rubygems_deprecate :match, "Gem::Platform.match_spec? or match_gem?"
  end

  def self.match_platforms?(platform, platforms)
    platform = Gem::Platform.new(platform) unless platform.is_a?(Gem::Platform)
    platforms.any? do |local_platform|
      platform.nil? ||
        local_platform == platform ||
        (local_platform != Gem::Platform::RUBY && platform =~ local_platform)
    end
  end
  private_class_method :match_platforms?

  def self.match_spec?(spec)
    match_gem?(spec.platform, spec.name)
  end

  if RUBY_ENGINE == "truffleruby"
    def self.match_gem?(platform, gem_name)
      raise "Not a string: #{gem_name.inspect}" unless String === gem_name

      if REUSE_AS_BINARY_ON_TRUFFLERUBY.include?(gem_name)
        match_platforms?(platform, [Gem::Platform::RUBY, Gem::Platform.local])
      else
        match_platforms?(platform, Gem.platforms)
      end
    end
  else
    def self.match_gem?(platform, gem_name)
      match_platforms?(platform, Gem.platforms)
    end
  end

  def self.sort_priority(platform)
    platform == Gem::Platform::RUBY ? -1 : 1
  end

  def self.installable?(spec)
    if spec.respond_to? :installable_platform?
      spec.installable_platform?
    else
      match_spec? spec
    end
  end

  def self.new(arch) # :nodoc:
    case arch
    when Gem::Platform::CURRENT then
      Gem::Platform.local
    when Gem::Platform::RUBY, nil, "" then
      Gem::Platform::RUBY
    else
      super
    end
  end

  def initialize(arch)
    case arch
    when Array then
      @cpu, @os, @version = arch
    when String then
      arch = arch.split "-"

      if arch.length > 2 && !arch.last.match?(/\d+(\.\d+)?$/) # reassemble x86-linux-{libc}
        extra = arch.pop
        arch.last << "-#{extra}"
      end

      cpu = arch.shift

      @cpu = case cpu
             when /i\d86/ then "x86"
             else cpu
      end

      if arch.length == 2 && arch.last.match?(/^\d+(\.\d+)?$/) # for command-line
        @os, @version = arch
        return
      end

      os, = arch
      if os.nil?
        @cpu = nil
        os = cpu
      end # legacy jruby

      @os, @version = case os
                      when /aix(\d+)?/ then             ["aix",       $1]
                      when /cygwin/ then                ["cygwin",    nil]
                      when /darwin(\d+)?/ then          ["darwin",    $1]
                      when /^macruby$/ then             ["macruby",   nil]
                      when /freebsd(\d+)?/ then         ["freebsd",   $1]
                      when /^java$/, /^jruby$/ then     ["java",      nil]
                      when /^java([\d.]*)/ then         ["java",      $1]
                      when /^dalvik(\d+)?$/ then        ["dalvik",    $1]
                      when /^dotnet$/ then              ["dotnet",    nil]
                      when /^dotnet([\d.]*)/ then       ["dotnet",    $1]
                      when /linux-?(\w+)?/ then         ["linux",     $1]
                      when /mingw32/ then               ["mingw32",   nil]
                      when /mingw-?(\w+)?/ then         ["mingw",     $1]
                      when /(mswin\d+)(\_(\d+))?/ then
                        os = $1
                        version = $3
                        @cpu = "x86" if @cpu.nil? && os =~ /32$/
                        [os, version]
                      when /netbsdelf/ then             ["netbsdelf", nil]
                      when /openbsd(\d+\.\d+)?/ then    ["openbsd",   $1]
                      when /solaris(\d+\.\d+)?/ then    ["solaris",   $1]
                      when /wasi/ then                  ["wasi",      nil]
                      # test
                      when /^(\w+_platform)(\d+)?/ then [$1,          $2]
                      else ["unknown", nil]
      end
    when Gem::Platform then
      @cpu = arch.cpu
      @os = arch.os
      @version = arch.version
    else
      raise ArgumentError, "invalid argument #{arch.inspect}"
    end
  end

  def to_a
  rubygems/rubygems/errors.rb000064400000011032150403134160012071 0ustar00on, or either one has no version
  #
  # Additionally, the platform will match if the local CPU is 'arm' and the
  # other CPU starts with "armv" (for generic 32-bit ARM family support).
  #
  # Of note, this method is not commutative. Indeed the OS 'linux' has a
  # special case: the version is the libc name, yet while "no version" stands
  # as a wildcard for a binary gem platform (as for other OSes), for the
  # runtime platform "no version" stands for 'gnu'. To be able to distinguish
  # these, the method receiver is the gem platform, while the argument is
  # the runtime platform.
  #
  #--
  # NOTE: Until it can be removed, changes to this method must also be reflected in `bundler/lib/bundler/rubygems_ext.rb`

  def ===(other)
    return nil unless Gem::Platform === other

    # universal-mingw32 matches x64-mingw-ucrt
    return true if (@cpu == "universal" || other.cpu == "universal") &&
                   @os.start_with?("mingw") && other.os.start_with?("mingw")

    # cpu
    ([nil,"universal"].include?(@cpu) || [nil, "universal"].include?(other.cpu) || @cpu == other.cpu ||
    (@cpu == "arm" && other.cpu.start_with?("armv"))) &&

      # os
      @os == other.os &&

      # version
      (
        (@os != "linux" && (@version.nil? || other.version.nil?)) ||
        (@os == "linux" && (normalized_linux_version == other.normalized_linux_version || ["musl#{@version}", "musleabi#{@version}", "musleabihf#{@version}"].include?(other.version))) ||
        @version == other.version
      )
  end

  #--
  # NOTE: Until it can be removed, changes to this method must also be reflected in `bundler/lib/bundler/rubygems_ext.rb`

  def normalized_linux_version
    return nil unless @version

    without_gnu_nor_abi_modifiers = @version.sub(/\Agnu/, "").sub(/eabi(hf)?\Z/, "")
    return nil if without_gnu_nor_abi_modifiers.empty?

    without_gnu_nor_abi_modifiers
  end

  ##
  # Does +other+ match this platform?  If +other+ is a String it will be
  # converted to a Gem::Platform first.  See #=== for matching rules.

  def =~(other)
    case other
    when Gem::Platform then # nop
    when String then
      # This data is from http://gems.rubyforge.org/gems/yaml on 19 Aug 2007
      other = case other
              when /^i686-darwin(\d)/     then ["x86",       "darwin",  $1]
              when /^i\d86-linux/         then ["x86",       "linux",   nil]
              when "java", "jruby"        then [nil,         "java",    nil]
              when /^dalvik(\d+)?$/       then [nil,         "dalvik",  $1]
              when /dotnet(\-(\d+\.\d+))?/ then ["universal","dotnet",  $2]
              when /mswin32(\_(\d+))?/    then ["x86",       "mswin32", $2]
              when /mswin64(\_(\d+))?/    then ["x64",       "mswin64", $2]
              when "powerpc-darwin"       then ["powerpc",   "darwin",  nil]
              when /powerpc-darwin(\d)/   then ["powerpc",   "darwin",  $1]
              when /sparc-solaris2.8/     then ["sparc",     "solaris", "2.8"]
              when /universal-darwin(\d)/ then ["universal", "darwin",  $1]
              else other
      end

      other = Gem::Platform.new other
    else
      return nil
    end

    self === other
  end

  ##
  # A pure-Ruby gem that may use Gem::Specification#extensions to build
  # binary files.

  RUBY = "ruby"

  ##
  # A platform-specific gem that is built for the packaging Ruby's platform.
  # This will be replaced with Gem::Platform::local.

  CURRENT = "current"
end
rubygems/rubygems/query_utils.rb000064400000020777150403134160013162 0ustar00# frozen_string_literal: true

require_relative "local_remote_options"
require_relative "spec_fetcher"
require_relative "version_option"
require_relative "text"

module Gem::QueryUtils
  include Gem::Text
  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def add_query_options
    add_option("-i", "--[no-]installed",
               "Check for installed gem") do |value, options|
      options[:installed] = value
    end

    add_option("-I", "Equivalent to --no-installed") do |_value, options|
      options[:installed]rubygems/rubygems/gemcutter_utilities.rb000064400000025044150403134160014657 0ustar00

  def execute
    gem_names = if args.empty?
      [options[:name]]
    else
      options[:exact] ? args.map {|arg| /\A#{Regexp.escape(arg)}\Z/ } : args.map {|arg| /#{arg}/i }
    end

    terminate_interaction(check_installed_gems(gem_names)) if check_installed_gems?

    gem_names.each {|n| show_gems(n) }
  end

  private

  def check_installed_gems(gem_names)
    exit_code = 0

    if args.empty? && !gem_name?
      alert_error "You must specify a gem name"
      exit_code = 4
    elsif gem_names.count > 1
      alert_error "You must specify only ONE gem!"
      exit_code = 4
    else
      installed = installed?(gem_names.first, options[:version])
      installed = !installed unless options[:installed]

      say(installed)
      exit_code = 1 unless installed
    end

    exit_code
  end

  def check_installed_gems?
    !options[:installed].nil?
  end

  def gem_name?
    !options[:name].nil?
  end

  def prerelease
    options[:prerelease]
  end

  def show_prereleases?
    prerelease.nil? || prerelease
  end

  def args
    options[:args].to_a
  end

  def display_header(type)
    if (ui.outs.tty? && Gem.configuration.verbose) || both?
      say
      say "*** #{type} GEMS ***"
      say
    end
  end

  # Guts of original execute
  def show_gems(name)
    show_local_gems(name)  if local?
    show_remote_gems(name) if remote?
  end

  def show_local_gems(name, req = Gem::Requirement.default)
    display_header("LOCAL")

    specs = Gem::Specification.find_all do |s|
      name_matches = name ? s.name =~ name : true
      version_matches = show_prereleases? || !s.version.prerelease?

      name_matches && version_matches
    end.uniq(&:full_name)

    spec_tuples = specs.map do |spec|
      [spec.name_tuple, spec]
    end

    output_query_results(spec_tuples)
  end

  def show_remote_gems(name)
    display_header("REMOTE")

    fetcher = Gem::SpecFetcher.fetcher

    spec_tuples = if name.nil?
      fetcher.detect(specs_type) { true }
    else
      fetcher.detect(specs_type) do |name_tuple|
        name === name_tuple.name && options[:version].satisfied_by?(name_tuple.version)
      end
    end

    output_query_results(spec_tuples)
  end

  def specs_type
    if options[:all] || options[:version].specific?
      if options[:prerelease]
        :complete
      else
        :released
      end
    elsif options[:prerelease]
      :prerelease
    else
      :latest
    end
  end

  ##
  # Check if gem +name+ version +version+ is installed.

  def installed?(name, req = Gem::Requirement.default)
    Gem::Specification.any? {|s| s.name =~ name && req =~ s.version }
  end

  def output_query_results(spec_tuples)
    output = []
    versions = Hash.new {|h,name| h[name] = [] }

    spec_tuples.each do |spec_tuple, source|
      versions[spec_tuple.name] << [spec_tuple, source]
    end

    versions = versions.sort_by do |(n,_),_|
      n.downcase
    end

    output_versions output, versions

    say output.join(options[:details] ? "\n\n" : "\n")
  end

  def output_versions(output, versions)
    versions.each do |_gem_name, matching_tuples|
      matching_tuples = matching_tuples.sort_by {|n,_| n.version }.reverse

      platforms = Hash.new {|h,version| h[version] = [] }

      matching_tuples.each do |n, _|
        platforms[n.version] << n.platform if n.platform
      end

      seen = {}

      matching_tuples.delete_if do |n,_|
        if seen[n.version]
          true
        else
          seen[n.version] = true
          false
        end
      end

      output << clean_text(make_entry(matching_tuples, platforms))
    end
  end

  def entry_details(entry, detail_tuple, specs, platforms)
    return unless options[:details]

    name_tuple, spec = detail_tuple

    spec = spec.fetch_spec(name_tuple)if spec.respond_to?(:fetch_spec)

    entry << "\n"

    spec_platforms   entry, platforms
    spec_authors     entry, spec
    spec_homepage    entry, spec
    spec_license     entry, spec
    spec_loaded_from entry, spec, specs
    spec_summary     entry, spec
  end

  def entry_versions(entry, name_tuples, platforms, specs)
    return unless options[:versions]

    list =
      if platforms.empty? || options[:details]
        name_tuples.map(&:version).uniq
      else
        platforms.sort.reverse.map do |version, pls|
          out = version.to_s

          if options[:domain] == :local
            default = specs.any? do |s|
              !s.is_a?(Gem::Source) && s.version == version && s.default_gem?
            end
            out = "default: #{out}" if default
          end

          if pls != [Gem::Platform::RUBY]
            platform_list = [pls.delete(Gem::Platform::RUBY), *pls.sort].compact
            out = platform_list.unshift(out).join(" ")
          end

          out
        end
      end

    entry << " (#{list.join ", "})"
  end

  def make_entry(entry_tuples, platforms)
    detail_tuple = entry_tuples.first

    name_tuples, specs = entry_tuples.flatten.partition do |item|
      Gem::NameTuple === item
    end

    entry = [name_tuples.first.name]

    entry_versions(entry, name_tuples, platforms, specs)
    entry_details(entry, detail_tuple, specs, platforms)

    entry.join
  end

  def spec_authors(entry, spec)
    authors = "Author#{spec.authors.length > 1 ? "s" : ""}: ".dup
    authors << spec.authors.join(", ")
    entry << format_text(authors, 68, 4)
  end

  def spec_homepage(entry, spec)
    return if spec.homepage.nil? || spec.homepage.empty?

    entry << "\n" << format_text("Homepage: #{spec.homepage}", 68, 4)
  end

  def spec_license(entry, spec)
    return if spec.license.nil? || spec.license.empty?

    licenses = "License#{spec.licenses.length > 1 ? "s" : ""}: ".dup
    licenses << spec.licenses.join(", ")
    entry << "\n" << format_text(licenses, 68, 4)
  end

  def spec_loaded_from(entry, spec, specs)
    return unless spec.loaded_from

    if specs.length == 1
      default = spec.default_gem? ? " (default)" : nil
      entry << "\n" << "    Installed at#{default}: #{spec.base_dir}"
    else
      label = "Installed at"
      specs.each do |s|
        version = s.version.to_s
        default = s.default_gem? ? ", default" : ""
        entry << "\n" << "    #{label} (#{version}#{default}): #{s.base_dir}"
        label = " " * label.length
      end
    end
  end

  def spec_platforms(entry, platforms)
    non_ruby = platforms.any? do |_, pls|
      pls.any? {|pl| pl != Gem::Platform::RUBY }
    end

    return unless non_ruby

    if platforms.length == 1
      title = platforms.values.length == 1 ? "Platform" : "Platforms"
      entry << "    #{title}: #{platforms.values.sort.join(", ")}\n"
    else
      entry << "    Platforms:\n"

      sorted_platforms = platforms.sort

      sorted_platforms.each do |version, pls|
        label = "        #{version}: "
        data = format_text pls.sort.join(", "), 68, label.length
        data[0, label.length] = label
        entry << data << "\n"
      end
    end
  end

  def spec_summary(entry, spec)
    summary = truncate_text(spec.summary, "the summary for #{spec.full_name}")
    entry << "\n\n" << format_text(summary, 68, 4)
  end
end
rubygems/rubygems/errors.rb000064400000011033150403134160012072 0ustar00# frozen_string_literal: true

#--
# This file contains all the various exceptions and other errors that are used
# inside of RubyGems.
#
# DOC: Confirm _all_
#++

module Gem
  ##
  # Raised when RubyGems is unable to load or activate a gem.  Contains the
  # name and version requirements of the gem that either conflicts with
  # already activated gems or that RubyGems is otherwise unable to activate.

  class LoadError < ::LoadError
    # Name of gem
    attr_accessor :name

    # Version requirement of gem
    attr_accessor :requirement
  end

  ##
  # Raised when trying to activate a gem, and that gem does not exist on the
  # system.  Instead of rescuing from this class, make sure to rescue from the
  # superclass Gem::LoadError to catch all types of load errors.
  class MissingSpecError < Gem::LoadError
    def initialize(name, requirement, extra_message=nil)
      @name        = name
      @requirement = requirement
      @extra_message = extra_message
      super(message)
    end

    def message # :nodoc:
      build_message +
        "Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information"
    end

    private

    def build_message
      total = Gem::Specification.stubs.size
      "Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\n"
    end
  end

  ##
  # Raised when trying to activate a gem, and the gem exists on the system, but
  # not the requested version. Instead of rescuing from this class, make sure to
  # rescue from the superclass Gem::LoadError to catch all types of load errors.
  class MissingSpecVersionError < MissingSpecError
    attr_reader :specs

    def initialize(name, requirement, specs)
      @specs = specs
      super(name, requirement)
    end

    private

    def build_message
      names = specs.map(&:full_name)
      "Could not find '#{name}' (#{requirement}) - did find: [#{names.join ","}]\n"
    end
  end

  # Raised when there are conflicting gem specs loaded

  class ConflictError < LoadError
    ##
    # A Hash mapping conflicting specifications to the dependencies that
    # caused the conflict

    attr_reader :conflicts

    ##
    # The specification that had the conflict

    attr_reader :target

    def initialize(target, conflicts)
      @target    = target
      @conflicts = conflicts
      @name      = target.name

      reason = conflicts.map do |act, dependencies|
        "#{act.full_name} conflicts with #{dependencies.join(", ")}"
      end.join ", "

      # TODO: improve message by saying who activated `con`

      super("Unable to activate #{target.full_name}, because #{reason}")
    end
  end

  class ErrorReason; end

  # Generated when trying to lookup a gem to indicate that the gem
  # was found, but that it isn't usable on the current platform.
  #
  # fetch and install read these and report them to the user to aid
  # in figuring out why a gem couldn't be installed.
  #
  class PlatformMismatch < ErrorReason
    ##
    # the name of the gem
    attr_reader :name

    ##
    # the version
    attr_reader :verubygems/rubygems/dependency_installer.rb000064400000024020150403134160014751 0ustar00 initialize(source, error)
      @source = source
      @error = error
    end

    ##
    # The source that had the fetch problem.

    attr_reader :source

    ##
    # The fetch error which is an Exception subclass.

    attr_reader :error

    ##
    # An English description of the error.

    def wordy
      "Unable to download data from #{Gem::Uri.redact(@source.uri)} - #{@error.message}"
    end

    ##
    # The "exception" alias allows you to call raise on a SourceFetchProblem.

    alias_method :exception, :error
  end
end
rubygems/rubygems/gemcutter_utilities.rb000064400000026373150403134160014665 0ustar00# frozen_string_literal: true

require_relative "remote_fetcher"
require_relative "text"
require_relative "gemcutter_utilities/webauthn_listener"
require_relative "gemcutter_utilities/webauthn_poller"

##
# Utility methods for using the RubyGems API.

module Gem::GemcutterUtilities
  ERROR_CODE = 1
  API_SCOPES = [:index_rubygems, :push_rubygem, :yank_rubygem, :add_owner, :remove_owner, :access_webhooks].freeze
  EXCLUSIVELY_API_SCOPES = [:show_dashboard].freeze

  include Gem::Text

  attr_writer :host
  attr_writer :scope

  ##
  # Add the --key option

  def add_key_option
    add_option("-k", "--key KEYNAME", Symbol,
               "Use the given API key",
               "from #{Gem.configuration.credentials_path}") do |value,options|
      options[:key] = value
    end
  end

  ##
  # Add the --otp option

  def add_otp_option
    add_option("--otp CODE",
               "Digit code for multifactor authentication",
               "You can also use the environment variable GEM_HOST_OTP_CODE") do |value, options|
      options[:otp] = value
    end
  end

  ##
  # The API key from the command options or from the user's configuration.

  def api_key
    if ENV["GEM_HOST_API_KEY"]
      ENV["GEM_HOST_API_KEY"]
    elsif options[:key]
      verify_api_key options[:key]
    elsif Gem.configuration.api_keys.key?(host)
      Gem.configuration.api_keys[host]
    else
      Gem.configuration.rubygems_api_key
    end
  end

  ##
  # The OTP code from the command options or from the user's configuration.

  def otp
    options[:otp] || ENV["GEM_HOST_OTP_CODE"]
  end

  def webauthn_enabled?
    options[:webauthn]
  end

  ##
  # The host to connect to either from the RUBYGEMS_HOST environment variable
  # or from the user's configuration

  def host
    configured_host = Gem.host unless
      Gem.configuration.disable_default_gem_server

    @host ||=
      begin
        env_rubygems_host = ENV["RUBYGEMS_HOST"]
        env_rubygems_host = nil if env_rubygems_host&.empty?

        env_rubygems_host || configured_host
      end
  end

  ##
  # Creates an RubyGems API to +host+ and +path+ with the given HTTP +method+.
  #
  # If +allowed_push_host+ metadata is present, then it will only allow that host.

  def rubygems_api_request(method, path, host = nil, allowed_push_host = nil, scope: nil, credentials: {}, &block)
    require_relative "vendored_net_http"

    self.host = host if host
    unless self.host
      alert_error "You must specify a gem server"
      terminate_interaction(ERROR_CODE)
    end

    if allowed_push_host
      allowed_host_uri = Gem::URI.parse(allowed_push_host)
      host_uri         = Gem::URI.parse(self.host)

      unless (host_uri.scheme == allowed_host_uri.scheme) && (host_uri.host == allowed_host_uri.host)
        alert_error "#{self.host.inspect} is not allowed by the gemspec, which only allows #{allowed_push_host.inspect}"
        terminate_interaction(ERROR_CODE)
      end
    end

    uri = Gem::URI.parse "#{self.host}/#{path}"
    response = request_with_otp(method, uri, &block)

    if mfa_unauthorized?(response)
      fetch_otp(credentials)
      response = request_with_otp(method, uri, &block)
    end

    if api_key_forbidden?(response)
      update_scope(scope)
      request_with_otp(method, uri, &block)
    else
      response
    end
  end

  def mfa_unauthorized?(response)
    response.is_a?(Gem::Net::HTTPUnauthorized) && response.body.start_with?("You have enabled multifactor authentication")
  end

  def update_scope(scope)
    sign_in_host        = host
    pretty_host         = pretty_host(sign_in_host)
    update_scope_params = { scope => true }

    say "The existing key doesn't have access of #{scope} on #{pretty_host}. Please sign in to update access."

    identifier = ask "Username/email: "
    password   = ask_for_password "      Password: "

    response = rubygems_api_request(:put, "api/v1/api_key",
                                    sign_in_host, scope: scope) do |request|
      request.basic_auth identifier, password
      request.body = Gem::URI.encode_www_form({ api_key: api_key }.merge(update_scope_params))
    end

    with_response response do |_resp|
      say "Added #{scope} scope to the existing API key"
    end
  end

  ##
  # Signs in with the RubyGems API at +sign_in_host+ and sets the rubygems API
  # key.

  def sign_in(sign_in_host = nil, scope: nil)
    sign_in_host ||= host
    return if api_key

    pretty_host = pretty_host(sign_in_host)

    say "Enter your #{pretty_host} credentials."
    say "Don't have an account yet? " \
        "Create one at #{sign_in_host}/sign_up"

    identifier = ask "Username/email: "
    password   = ask_for_password "      Password: "
    say "\n"

    key_name     = get_key_name(scope)
    scope_params = get_scope_params(scope)
    profile      = get_user_profile(identifier, password)
    mfa_params   = get_mfa_params(profile)
    all_params   = scope_params.merge(mfa_params)
    warning      = profile["warning"]
    credentials  = { identifier: identifier, password: password }

    say "#{warning}\n" if warning

    response = rubygems_api_request(:post, "api/v1/api_key",
                                    sign_in_host, credentials: credentials, scope: scope) do |request|
      request.basic_auth identifier, password
      request.body = Gem::URI.encode_www_form({ name: key_name }.merge(all_params))
    end

    with_response response do |resp|
      say "Signed in with API key: #{key_name}."
      set_api_key host, resp.body
    end
  end

  ##
  # Retrieves the pre-configured API key +key+ or terminates interaction with
  # an error.

  def verify_api_key(key)
    if Gem.configuration.api_keys.key? key
      Gem.configuration.api_keys[key]
    else
      alert_error "No such API key. Please add it to your configuration (done automatically on initial `gem push`)."
      terminate_interaction(ERROR_CODE)
    end
  end

  ##
  # If +response+ is an HTTP Success (2XX) response, yields the response if a
  # block was given or shows the response body to the user.
  #
  # If the response was not successful, shows an error to the user including
  # the +error_prefix+ and the response body. If the response was a permanent redirect,
  # shows an error to the user including the redirect location.

  def with_response(response, error_prefix = nil)
    case response
    when Gem::Net::HTTPSuccess then
      if block_given?
        yield response
      else
        say clean_text(response.body)
      end
    when Gem::Net::HTTPPermanentRedirect, Gem::Net::HTTPRedirection then
      message = "The request has redirected permanently to #{response["location"]}. Please check your defined push host URL."
      message = "#{error_prefix}: #{message}" if error_prefix

      say clean_text(message)
      terminate_interaction(ERROR_CODE)
    else
      message = response.body
      message = "#{error_prefix}: #{message}" if error_prefix

      say clean_text(message)
      terminate_interaction(ERROR_CODE)
    end
  end

  ##
  # Returns true when the user has enabled multifactor authentication from
  # +response+ text and no otp provided by options.

  def set_api_key(host, key)
    if default_host?
      Gem.configuration.rubygems_api_key = key
    else
      Gem.configuration.set_api_key host, key
    end
  end

  private

  def request_with_otp(method, uri, &block)
    request_method = Gem::Net::HTTP.const_get method.to_s.capitalize

    Gem::RemoteFetcher.fetcher.request(uri, request_method) do |req|
      req["OTP"] = otp if otp
      block.call(req)
    end
  ensure
    options[:otp] = nil if webauthn_enabled?
  end

  def fetch_otp(credentials)
    options[:otp] = if webauthn_url = webauthn_verification_url(credentials)
      server = TCPServer.new 0
      port = server.addr[1].to_s

      url_with_port = "#{webauthn_url}?port=#{port}"
      say "You have enabled multi-factor authentication. Please visit #{url_with_port} to authenticate via security device. If you can't verify using WebAuthn but have OTP enabled, you can re-run the gem signin command with the `--otp [your_code]` option."

      threads = [WebauthnListener.listener_thread(host, server), WebauthnPoller.poll_thread(options, host, webauthn_url, credentials)]
      otp_thread = wait_for_otp_thread(*threads)

      threads.each(&:join)

      if error = otp_thread[:error]
        alert_error error.message
        terminate_interaction(1)
      end

      options[:webauthn] = true

      say "You are verified with a security device. You may close the browser window."
      otp_thread[:otp]
    else
      say "You have enabled multi-factor authentication. Please enter OTP code."
      ask "Code: "
    end
 rubygems/rubygems/command_manager.rb000064400000013136150403134160013674 0ustar00o customise scopes?", false)
      if customise
        EXCLUSIVELY_API_SCOPES.each do |excl_scope|
          selected = ask_yes_no("#{excl_scope} (exclusive scope, answering yes will not prompt for other scopes)", false)
          next unless selected

          return { excl_scope => true }
        end

        scope_params = {}

        API_SCOPES.each do |s|
          selected = ask_yes_no(s.to_s, false)
          scope_params[s] = true if selected
        end
      end
      say "\n"
    end

    scope_params
  end

  def default_host?
    host == Gem::DEFAULT_HOST
  end

  def get_user_profile(identifier, password)
    return {} unless default_host?

    response = rubygems_api_request(:get, "api/v1/profile/me.yaml") do |request|
      request.basic_auth identifier, password
    end

    with_response response do |resp|
      Gem::ConfigFile.load_with_rubygems_config_hash(clean_text(resp.body))
    end
  end

  def get_mfa_params(profile)
    mfa_level = profile["mfa"]
    params = {}
    if ["ui_only", "ui_and_gem_signin"].include?(mfa_level)
      selected = ask_yes_no("Would you like to enable MFA for this key? (strongly recommended)")
      params["mfa"] = true if selected
    end
    params
  end

  def get_key_name(scope)
    hostname = Socket.gethostname || "unknown-host"
    user = ENV["USER"] || ENV["USERNAME"] || "unknown-user"
    ts = Time.now.strftime("%Y%m%d%H%M%S")
    default_key_name = "#{hostname}-#{user}-#{ts}"

    key_name = ask "API Key name [#{default_key_name}]: " unless scope
    if key_name.nil? || key_name.empty?
      default_key_name
    else
      key_name
    end
  end

  def api_key_forbidden?(response)
    response.is_a?(Gem::Net::HTTPForbidden) && response.body.start_with?("The API key doesn't have access")
  end
end
rubygems/rubygems/dependency_installer.rb000064400000023640150403134160014760 0ustar00# frozen_string_literal: true

require_relative "../rubygems"
require_relative "dependency_list"
require_relative "package"
require_relative "installer"
require_relative "spec_fetcher"
require_relative "user_interaction"
require_relative "available_set"
require_relative "deprecate"

##
# Installs a gem along with all its dependencies from local and remote gems.

class Gem::DependencyInstaller
  include Gem::UserInteraction
  extend Gem::Deprecate

  DEFAULT_OPTIONS = { # :nodoc:
    env_shebang: false,
    document: %w[ri],
    domain: :both, # HACK: dup
    force: false,
    format_executable: false, # HACK: dup
    ignore_dependencies: false,
    prerelease: false,
    security_policy: nil, # HACK: NoSecurity requires OpenSSL. AlmostNo? Low?
    wrappers: true,
    build_args: nil,
    build_docs_in_background: false,
    install_as_default: false,
  }.freeze

  ##
  # Documentation types.  For use by the Gem.done_installing hook

  attr_reader :document

  ##
  # Errors from SpecFetcher while searching for remote specifications

  attr_reader :errors

  ##
  # List of gems installed by #install in alphabetic order

  attr_reader :installed_gems

  ##
  # Creates a new installer instance.
  #
  # Options are:
  # :cache_dir:: Alternate repository path to store .gem files in.
  # :domain:: :local, :remote, or :both.  :local only searches gems in the
  #           current directory.  :remote searches only gems in Gem::sources.
  #           :both searches both.
  # :env_shebang:: See Gem::Installer::new.
  # :force:: See Gem::Installer#install.
  # :format_executable:: See Gem::Installer#initialize.
  # :ignore_dependencies:: Don't install any dependencies.
  # :install_dir:: See Gem::Installer#install.
  # :prerelease:: Allow prerelease versions.  See #install.
  # :security_policy:: See Gem::Installer::new and Gem::Security.
  # :user_install:: See Gem::Installer.new
  # :wrappers:: See Gem::Installer::new
  # :build_args:: See Gem::Installer::new

  def initialize(options = {})
    @only_install_dir = !options[:install_dir].nil?
    @install_dir = options[:install_dir] || Gem.dir
    @build_root = options[:build_root]

    options = DEFAULT_OPTIONS.merge options

    @bin_dir             = options[:bin_dir]
    @dev_shallow         = options[:dev_shallow]
    @development         = options[:development]
    @document            = options[:document]
    @domain              = options[:domain]
    @env_shebang         = options[:env_shebang]
    @force               = options[:force]
    @format_executable   = options[:format_executable]
    @ignore_dependencies = options[:ignore_dependencies]
    @prerelease          = options[:prerelease]
    @security_policy     = options[:security_policy]
    @user_install        = options[:user_install]
    @wrappers            = options[:wrappers]
    @build_args          = options[:build_args]
    @build_docs_in_background = options[:build_docs_in_background]
    @install_as_default = options[:install_as_default]
    @dir_mode = options[:dir_mode]
    @data_mode = options[:data_mode]
    @prog_mode = options[:prog_mode]

    # Indicates that we should not try to updatrubygems/rubygems/install_message.rb000064400000000503150403134160013730 0ustar00t.new

    if consider_local?
      sl = Gem::Source::Local.new

      if spec = sl.find_gem(dep.name)
        if dep.matches_spec? spec
          set.add spec, sl
        end
      end
    end

    if consider_remote?
      begin
        # This is pulled from #spec_for_dependency to allow
        # us to filter tuples berubygems/rubygems/gem_runner.rb000064400000003457150403134160012732 0ustar00       specs << [spec, source]
        end

        if @errors
          @errors += errors
        else
          @errors = errors
        end

        set << specs
      rescue Gem::RemoteFetcher::FetchError => e
        # FIX if there is a problem talking to the network, we either need to always tell
        # the user (no really_verbose) or fail hard, not silently tell them that we just
        # couldn't find their requested gem.
        verbose do
          "Error fetching remote data:\t\t#{e.message}\n" \
            "Falling back to local-only install"
        end
        @domain = :local
      end
    end

    set
  end
  rubygems_deprecate :find_gems_with_sources

  def in_background(what) # :nodoc:
    fork_happened = false
    if @build_docs_in_background && Process.respond_to?(:fork)
      begin
        Process.fork do
          yield
        end
        fork_happened = true
        say "#{what} in a background process."
      rescue NotImplementedError
      end
    end
    yield unless fork_happened
  end

  ##
  # Installs the gem +dep_or_name+ and all its dependencies.  Returns an Array
  # of installed gem specifications.
  #
  # If the +:prerelease+ option is set and there is a prerelease for
  # +dep_or_name+ the prerelease version will be installed.
  #
  # Unless explicitly specified as a prerelease dependency, prerelease gems
  # that +dep_or_name+ depend on will not be installed.
  #
  # If c-1.a depends on b-1 and a-1.a and there is a gem b-1.a available then
  # c-1.a, b-1 and a-1.a will be installed.  b-1.a will need to be installed
  # separately.

  def install(dep_or_name, version = Gem::Requirement.default)
    request_set = resolve_dependencies dep_or_name, version

    @installed_gems = []

    options = {
      bin_dir: @bin_dir,
      build_args: @build_args,
      document:rubygems/rubygems/path_support.rb000064400000003444150403134160013315 0ustar00an be lazy and just say
    # it's documentation. Ideally the hook adder could decide whether to be in
    # the background or not, and what to call it.
    in_background "Installing documentation" do
      Gem.done_installing_hooks.each do |hook|
        hook.call self, @installed_gems
      end
    end unless Gem.done_installing_hooks.empty?

    @installed_gems
  end

  def install_development_deps # :nodoc:
    if @development && @dev_shallow
      :shallow
    elsif @development
      :all
    else
      :none
    end
  end

  def resolve_dependencies(dep_or_name, version) # :nodoc:
    request_set = Gem::RequestSet.new
    request_set.development         = @development
    request_set.development_shallow = @dev_shallow
    request_set.soft_missing = @force
    request_set.prerelease = @prerelease

    installer_set = Gem::Resolver::InstallerSet.new @domain
    installer_set.ignore_installed = (@minimal_deps == false) || @only_install_dir
    installer_set.force = @force

    if consider_local?
      if dep_or_name =~ /\.gem$/ && File.file?(dep_or_name)
        src = Gem::Source::SpecificFile.new dep_or_name
        installer_set.add_local dep_or_name, src.spec, src
        version = src.spec.version if version == Gem::Requirement.default
      elsif dep_or_name =~ /\.gem$/ # rubocop:disable Performance/RegexpMatch
        Dir[dep_or_name].each do |name|
          src = Gem::Source::SpecificFile.new name
          installer_set.add_local dep_or_name, src.spec, src
        rescue Gem::Package::FormatError
        end
        # else This is a dependency. InstallerSet handles this case
      end
    end

    dependency =
      if spec = installer_set.local?(dep_or_name)
        installer_set.remote = nil if spec.dependencies.none?
        Gem::Dependency.new spec.name, version
      elsif Stringrubygems/rubygems/request.rb000064400000021143150403134160012251 0ustar00rubygems/rubygems/command_manager.rb000064400000013222150403134160013670 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "command"
require_relative "user_interaction"
require_relative "text"

##
# The command manager registers and installs all the individual sub-commands
# supported by the gem command.
#
# Extra commands can be provided by writing a rubygems_plugin.rb
# file in an installed gem.  You should register your command against the
# Gem::CommandManager instance, like this:
#
#   # file rubygems_plugin.rb
#   require 'rubygems/command_manager'
#
#   Gem::CommandManager.instance.register_command :edit
#
# You should put the implementation of your command in rubygems/commands.
#
#   # file rubygems/commands/edit_command.rb
#   class Gem::Commands::EditCommand < Gem::Command
#     # ...
#   end
#
# See Gem::Command for instructions on writing gem commands.

class Gem::CommandManager
  include Gem::Text
  include Gem::UserInteraction

  BUILTIN_COMMANDS = [ # :nodoc:
    :build,
    :cert,
    :check,
    :cleanup,
    :contents,
    :dependency,
    :environment,
    :exec,
    :fetch,
    :generate_index,
    :help,
    :info,
    :install,
    :list,
    :lock,
    :mirror,
    :open,
    :outdated,
    :owner,
    :pristine,
    :push,
    :query,
    :rdoc,
    :rebuild,
    :search,
    :server,
    :signin,
    :signout,
    :sources,
    :specification,
    :stale,
    :uninstall,
    :unpack,
    :update,
    :which,
    :yank,
  ].freeze

  ALIAS_COMMANDS = {
    "i" => "install",
    "login" => "signin",
    "logout" => "signout",
  }.freeze

  ##
  # Return the authoritative instance of the command manager.

  def self.instance
    @instance ||= new
  end

  ##
  # Returns self. Allows a CommandManager instance to stand
  # in for the class itself.

  def instance
    self
  end

  ##
  # Reset the authoritative instance of the command manager.

  def self.reset
    @instance = nil
  end

  ##
  # Register all the subcommands supported by the gem command.

  def initialize
    require_relative "vendored_timeout"
    @commands = {}

    BUILTIN_COMMANDS.each do |name|
      register_command name
    end
  end

  ##
  # Register the Symbol +command+ as a gem command.

  def register_command(command, obj=false)
    @commands[command] = obj
  end

  ##
  # Unregister the Symbol +command+ as a gem command.

  def unregister_command(command)
    @commands.delete command
  end

  ##
  # Returns a Command instance for +command_name+

  def [](command_name)
    command_name = command_name.intern
    return nil if @commands[command_name].nil?
    @commands[command_name] ||= load_and_instantiate(command_name)
  end

  ##
  # Return a sorted list of all command names as strings.

  def command_names
    @commands.keys.collect(&:to_s).sort
  end

  ##
  # Run the command specified by +args+.

  def run(args, build_args=nil)
    process_args(args, build_args)
  rescue StandardError, Gem::Timeout::Error => ex
    if ex.respond_to?(:detailed_message)
      msg = ex.detailed_message(highlight: false).sub(/\A(.*?)(?: \(.+?\))/) { $1 }
    else
      msg = ex.message
    end
    alert_error clean_text("While executing gem ... (#{ex.class})\n    #{msg}")
    ui.backtrace ex

    terminate_interaction(1)
  rescue Interrupt
    alert_error clean_text("Interrupted")
    terminate_interaction(1)
  end

  def process_args(args, build_args=nil)
    if args.empty?
      say Gem::Command::HELP
      terminate_interaction 1
    end

    case args.first
    when "-h", "--help" then
      say Gem::Command::HELP
      terminate_interaction 0
    when "-v", "--version" then
      say Gem::VERSION
      terminate_interaction 0
    when "-C" then
      args.shift
      start_point = args.shift
      if Dir.exist?(start_point)
        Dir.chdir(start_point) { invoke_command(args, build_args) }
      else
        alert_error clean_text("#{start_point} isn't a directory.")
        terminate_interaction 1
      end
    when /^-/ then
      alert_error clean_text("Invalid option: #{args.first}. See 'gem --help'.")
      terminate_interaction 1
    else
      invoke_command(args, build_args)
    end
  end

  def find_command(cmd_name)
    cmd_name = find_alias_command cmd_name

    possibilities = find_command_possibilities cmd_name

    if possibilities.size > 1
      raise Gem::CommandLineError,
            "Ambiguous command #{cmd_name} matches [#{possibilities.join(", ")}]"
    elsif possibilities.empty?
      raise Gem::UnknownCommandError.new(cmd_name)
    end

    self[possibilities.first]
  end

  def find_alias_command(cmd_name)
    alias_name = ALIAS_COMMANDS[cmd_name]
    alias_name ? alias_name : cmd_name
  end

  def find_command_possibilities(cmd_name)
    len = cmd_name.length

    found = command_names.select {|name| cmd_name == name[0, len] }

    exact = found.find {|name| name == cmd_name }

    exact ? [exact] : found
  end

  private

  def load_and_instantiate(command_name)
    command_name = command_name.to_s
    const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } << "Command"

    begin
      begin
        require "rubygems/commands/#{command_name}_command"
      rescue LoadError
        # it may have been defined from a rubygems_plugin.rb file
      end

      Gem::Commands.const_get(const_name).new
    rescue StandardError => e
      alert_error clean_text("Loading command: #{command_name} (#{e.class})\n\t#{e}")
      ui.backtrace e
    end
  end

  def invoke_command(args, build_args)
    cmd_name = args.shift.downcase
    cmd = find_command cmd_name
    terminate_interaction 1 unless cmd
    cmd.deprecation_warning if cmd.deprecated?
    cmd.invoke_with_build_args args, build_args
  end
end
rubygems/rubygems/install_message.rb000064400000000503150403134160013730 0ustar00# frozen_string_literal: true

require_relative "../rubygems"
require_relative "user_interaction"

##
# A default post-install hook that displays "Successfully installed
# some_gem-1.0"

Gem.post_install do |installer|
  ui = Gem::DefaultUserInteraction.ui
  ui.say "Successfully installed #{installer.spec.full_name}"
end
rubygems/rubygems/gem_runner.rb000064400000004213150403134160012721 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "../rubygems"
require_relative "command_manager"
require_relative "deprecate"

##
# Run an instance of the gem program.
#
# Gem::GemRunner is only intended for internal use by RubyGems itself.  It
# does not form any public API and may change at any time for any reason.
#
# If you would like to duplicate functionality of `gem` commands, use the
# classes they call directly.

class Gem::GemRunner
  def initialize
    @commarubygems/rubygems/unknown_command_spell_checker.rb000064400000000633150403134160016642 0ustar00n the list.

  def extract_build_args(args) # :nodoc:
    return [] unless offset = args.index("--")

    build_args = args.slice!(offset...args.length)

    build_args.shift

    build_args
  end

  private

  def validate_encoding(args)
    invalid_arg = args.find {|arg| !arg.valid_encoding? }

    if invalid_arg
      raise Gem::OptionParser::InvalidArgument.new("'#{invalid_arg.scrub}' has invalid encodinrubygems/rubygems/optparse/lib/optionparser.rb000064400000000073150403134160015710 0ustar00rubygems/rubygems/path_support.rbrubygems/rubygems/optparse/lib/optparse/version.rb000064400000004027150403134160016510 0ustar00nment.
  #
  def initialize(env)
    @home = normalize_home_dir(env["GEM_HOME"] || Gem.default_dir)
    @path = split_gem_path env["GEM_PATH"], @home

    @spec_cache_dir = env["GEM_SPEC_CACHE"] || Gem.default_spec_cache_dir
  end

  private

  def normalize_home_dir(home)
    if File::ALT_SEPARATOR
      home = home.gsub(File::ALT_SEPARATOR, File::SEPARATOR)
    end

    expand(home)
  end

  ##
  # Split the Gem search path (as reported by Gem.path).

  def split_gem_path(gpaths, home)
    # FIX: it should be [home, *path], not [*path, home]

    gem_path = []

    if gpaths
      gem_path = gpaths.split(Gem.path_separator)
      # Handle the path_separator being set to a regexp, which will cause
      # end_with? to error
      if /#{Gem.path_separator}\z/.match?(gpaths)
        gem_path += default_path
      end

      if File::ALT_SEPARATOR
        gem_path.map! do |this_path|
          this_path.gsub File::ALT_SEPARATOR, File::SEPARATOR
        end
      end

      gem_path << home
    else
      gem_path = default_path
    end

    gem_path.map {|path| expand(path) }.uniq
  end

  # Return the default Gem path
  def default_path
    Gem.default_path + [@home]
  end

  def expand(path)
    if File.directory?(path)
      File.realpath(path)
    else
      path
    end
  end
end
rubygems/rubygems/request.rb000064400000021316150403134160012253 0ustar00# frozen_string_literalrubygems/rubygems/optparse/lib/optparse/kwargs.rb000064400000001047150403134160016320 0ustar00  end

  def cert_files
    @connection_pool.cert_files
  end

  def self.get_cert_files
    pattern = File.expand_path("./ssl_certs/*/*.pem", __dir__)
    Dir.glob(pattern)
  end

  def self.configure_connection_for_https(connection, cert_files)
    raise Gem::Exception.new("OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources") unless Gem::HAVE_OPENSSL

    connection.use_ssl = true
    connection.verify_mode =
      Gem.configuration.ssl_verify_mode || OpenSSL::SSL::VERIFY_PEER
    store = OpenSSL::Xrubygems/rubygems/optparse/lib/optparse/uri.rb000064400000000224150403134160015615 0ustar00 ui.alert_error "SSL verification error at depth #{depth}: #{error} (#{number})"

    extra_message = verify_certificate_message number, cert

    urubygems/rubygems/optparse/lib/optparse/shellwords.rb000064400000000251150403134160017204 0ustar00
    when OpenSSL::X509::V_ERR_INVALID_PURPOSE then
      "Certificate #{cert.subject} has an invalid purpose"
    when OpenSSL::X509::V_ERR_SELF_SIGNED_CERT_IN_CHAIN thrubygems/rubygems/optparse/lib/optparse/date.rb000064400000000604150403134160015735 0ustar00new(@uri.user).unescape,
                         Gem::UriFormatter.new(@uri.password).unescape
    end

    request.add_field "User-Agent", @user_agent
    request.add_field "Connection", "keep-alive"
    request.add_field "Keep-Alive", "30"

    if @last_modified
      require "time"
      request.add_field "If-Modified-Since", @last_modified.httpdate
    end

    yield request if blrubygems/rubygems/optparse/lib/optparse/time.rb000064400000000361150403134160015756 0ustar00nil? && uri.password.nil?
      user     = ENV["#{downcase_scheme}_proxy_user"] || ENV["#{upcase_scheme}_PROXY_USER"]
      password = ENV["#{downcase_scheme}_proxy_pass"] || ENV["#{upcase_scheme}_PROXY_PASS"]

      uri.user     = Gem::UriFrubygems/rubygems/optparse/lib/optparse/ac.rb000064400000003044150403134160015404 0ustar00  data = String.new

            incomplete_response.read_body do |segment|
              data << segment
              downloaded += segment.length
              reporter.update(downloaded)
            end
            reporter.done
            if incomplete_response.respond_to? :body=
              incomplete_response.body = data
            else
              incomplete_response.instance_variable_set(:@body, data)
            end
          end
        end
      else
        response = connection.request request
      end

      verbose "#{response.code} #{response.message}"
    rescue Gem::Net::HTTPBadResponse
      verbose "bad response"

      reset connection

      raise Gem::RemoteFetcher::FetchError.new("too many bad responses", @uri) if bad_response

      bad_response = true
      retry
    rescue Gem::Net::HTTPFatalError
      verbose "fatal error"

      raise Gem::RemoteFetcher::FetchError.new("fatal error", @uri)
    # HACK: work around EOFError bug in Gem::Net::HTTP
    # NOTE Errno::ECONNABORTED raised a lot on Windows, and make impossible
    # to install gems.
    rescue EOFError, Gem::Timeout::Error,
           Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE

      requests = @requests[connection]
      verbose "connection reset after #{requests} requests, retrying"

      raise Gem::RemoteFetcher::FetchError.new("too many connection resets", @uri) if retried

      reset connection

      retried = true
      retry
    end

    response
  ensure
    @connection_pool.checkin connection
  end

  ##
  # Resets HTTP connectiorubygems/rubygems/optparse/lib/optparse.rb000064400000172350150403134160015030 0ustar00rubygems/rubygems/unknown_command_spell_checker.rb000064400000000633150403134160016642 0ustar00# frozen_string_literal: true

class Gem::UnknownCommandSpellChecker
  attr_reader :error

  def initialize(error)
    @error = error
  end

  def corrections
    @corrections ||=
      spell_checker.correct(error.unknown_command).map(&:inspect)
  end

  private

  def spell_checker
    dictionary = Gem::CommandManager.instance.command_names
    DidYouMean::SpellChecker.new(dictionary: dictionary)
  end
end
rubygems/rubygems/optparse/lib/optionparser.rb000064400000000073150403134160015710 0ustar00rom local directory or remote server:

    gem install rakerubygems/rubygems/optparse/lib/optparse/version.rb000064400000004027150403134160016510 0ustar00 with Bundler's Gemfile format.  You can see additional
documentation on the format at:

  http://bundler.io

RubyGems automatically looks for these gem dependencies files:

* gem.deps.rb
* Gemfile
* Isolate

These files are looked up automatically using `gem install -g`, or you can
specify a custom file.

When the RUBYGEMS_GEMDEPS environment variable is set to a gem dependencies
file the gems from that file will be activated at startup time.  Set it to a
specific filename or to "-" to have RubyGems automatically discover the gem
dependencies file by walking up from the current directory.

You can also activate gem dependencies at program startup using
Gem.use_gemdeps.

NOTE: Enabling automatic discovery on multiuser systems can lead to execution
of arbitrary code when used from directories outside your control.

Gem Dependencies
================

Use #gem to declare which gems you directly depend upon:

  gem 'rake'

To depend on a specific set of versions:

  gem 'rake', '~> 10.3', '>= 10.3.2'

RubyGems will require the gem name when activating the gem using
the RUBYGEMS_GEMDEPS environment variable or Gem::use_gemdeps.  Use the
require: option to override this behavior if the gem does not have a file of
that name or you don't want to require those files:

  gem 'my_gem', require: 'other_file'

To prevent RubyGems from requiring any files use:

  gem 'my_gem', require: false

To load dependencies from a .gemspec file:

  gemspec

RubyGems looks for the first .gemspec file in the current directory.  To
override this use the name: option:

  gemspec name: 'specific_gem'

To look in a different directory use the path: option:

  gemspec name: 'specific_gem', path: 'gemspecs'

To depend on a gem unpacked into a local directory:

  gem 'modified_gem', path: 'vendor/modified_gem'

To depend on a gem from git:

  gem 'private_gem', git: 'git@my.company.example:private_gem.git'

To depend on a gem from github:

  gem 'private_gem', github: 'my_company/private_gem'

To depend on a gem from a github gist:

  gem 'bang', gist: '1232884'

Git, rubygems/rubygems/optparse/lib/optparse/kwargs.rb000064400000001047150403134160016320 0ustar00and #platforms methods:

  platform :ruby_21 do
    gem 'debugger'
  end

See the bundler Gemfile manual page for a list of platforms supported in a gem
dependencies file.:

  http://bundler.io/v1.6/man/gemfile.5.html

Ruby Version and Engine Dependency
==================================

You can specify the version, engine and engine version of ruby to use with
your gem dependencies file.  If you are not running the specified version
RubyGems will raise an exception.

To depend on a specific version of ruby:

  ruby '2.1.2'

To depend on a specrubygems/rubygems/optparse/lib/optparse/uri.rb000064400000000224150403134160015615 0ustar00initest-emoji'
  end

The #group method allows multiple groups.

The #gemspec development dependencies are placed in the :development group by
defaurubygems/rubygems/optparse/lib/optparse/shellwords.rb000064400000000251150403134160017204 0ustar00pu}-#{os}-#{version}".  On mswin
platforms, the version is the compiler version, not the OS version.  (Ruby
compiled with VC6 uses "60" as the compiler version, VC8 usesrubygems/rubygems/optparse/lib/optparse/date.rb000064400000000604150403134160015735 0ustar00rectly mark the gem with your ruby's
platform.
  EOF

  # NOTE when updating also update Gem::Command::HELP

  SUBCOMMANDS = [
    ["commands",         :show_commands],
    ["options",          Gem::Command::HELP],
    ["examples",         EXAMPLES],
    ["gem_dependencies", GEM_DEPENDENCIES],
    ["platforms",        PLATFORMS],
  ].freeze
  # :startdoc:

  def initialize
    super "hrubygems/rubygems/optparse/lib/optparse/time.rb000064400000000361150403134160015756 0ustar00ustar00rubygems/rubygems/optparse/lib/optparse/ac.rb000064400000003044150403134160015404 0ustar00ame) # :nodoc:
    command_name = command_name.downcase

    possibilities = @command_manager.find_command_possibilities command_name

    if possibilities.size == 1
      command = @command_manager[possibilities.first]
      command.invoke("--help")
    elsif possibilities.size > 1
      alert_warning "Ambiguous command #{command_name} (#{possibilities.join(', ')})"
    else
      alert_warning "Unknown command #{command_name}. Try: gem help commands"
    end
  end
end
rubygems/rubygems/commands/dependency_command.rb000064400000012205150403134200016170 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../version_option"

class Gem::Commands::DependencyCommand < Gem::Command
  include Gem::LocalRemoteOptions
  inclurubygems/rubygems/optparse/lib/optparse.rb000064400000172350150403134160015030 0ustar00only the reverse dependencies can be shown (which gems depend on
the named gem).

The dependency list can be displayed in a format suitable for piping for
use with other commands.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} REGEXP"
  end

  def fetch_remote_specs(name, requirement, prerelease) # :nodoc:
    fetcher = Gem::SpecFetcher.fetcher

    specs_type = prerelease ? :complete : :released

    ss = if name.nil?
      fetcher.detect(specs_type) { true }
    else
      fetcher.detect(specs_type) do |name_tuple|
        name === name_tuple.name && requirement.satisfied_by?(name_tuple.version)
      end
    end

    ss.map {|tuple, source| source.fetch_spec(tuple) }
  end

  def fetch_specs(name_pattern, requirement, prerelease) # :nodoc:
    specs = []

    if local?
      specs.concat Gem::Specification.stubs.find_all {|spec|
        name_matches = name_pattern ? name_pattern =~ spec.name : true
        version_matches = requirement.satisfied_by?(spec.version)

        name_matches && version_matches
      }.map(&:to_spec)
    end

    specs.concat fetch_remote_specs name_pattern, requirement, prerelease if remote?

    ensure_specs specs

    specs.uniq.sort
  end

  def display_pipe(specs) # :nodoc:
    specs.each do |spec|
      unless spec.dependencies.empty?
        spec.dependencies.sort_by {|dep| dep.name }.each do |dep|
          say "#{dep.name} --version '#{dep.requirement}'"
        end
      end
    end
  end

  def display_readable(specs, reverse) # :nodoc:
    response = String.new

    specs.each do |spec|
      response << print_dependencies(spec)
      unless reverse[spec.full_name].empty?
        response << "  Used by\n"
        reverse[spec.full_name].each do |sp, dep|
          response << "    #{sp} (#{dep})\n"
        end
      end
      response << "\n"
    end

    say response
  end

  def execute
    ensure_local_only_reverse_dependencies

    pattern = name_pattern options[:args]
    requirement = Gem:rubygems/rubygems/commands/pristine_command.rb000064400000014301150403134200015706 0ustar00pec.dependencies.empty?
      spec.dependencies.sort_by {|dep| dep.name }.each do |dep|
        response << "  " * level + "  #{dep}\n"
      end
    end
    response
  end

  def reverse_dependencies(specs) # :nodoc:
    reverse = Hash.new {|h, k| h[k] = [] }

    return reverse unless options[:reverse_dependencies]

    specs.each do |spec|
      reverse[spec.full_name] = find_reverse_dependencies spec
    end

    reverse
  end

  ##
  # Returns an Array of [specification, dep] that are satisfied by +spec+.

  def find_reverse_dependencies(spec) # :nodoc:
    result = []

    Gem::Specification.each do |sp|
      sp.dependencies.each do |dep|
        dep = Gem::Dependency.new(*dep) unless Gem::Dependency === dep

        if spec.name == dep.name &&
           dep.requirement.satisfied_by?(spec.version)
          result << [sp.full_name, dep]
        end
      end
    end

    result
  end

  private

  def name_pattern(args)
    return if args.empty?

    if args.length == 1 && args.first =~ /\A(.*)(i)?\z/m
      flags = $2 ? Regexp::IGNORECASE : nil
      Regexp.new $1, flags
    else
      /\A#{Regexp.union(*args)}/
    end
  end
end
rubygems/rubygems/commands/pristine_command.rb000064400000014301150403134200015706 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../package"
require_relative "../installer"
require_relative "../version_option"

class Gem::Commands::PristineCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "pristine",
          "Restores installed gems to pristine condition from files located in the gem cache",
          :version => Gem::Requirement.default,
          :extensions => true,
          :extensions_set => false,
          :all => false

    add_option("--all",
               "Restore all installed gems to pristine",
               "condition") do |value, options|
      options[:all] = value
    end

    add_option("--skip=gem_name",
               "used on --all, skip if name == gem_name") do |value, options|
      options[:skip] ||= []
      options[:skip] << value
    end

    add_option("--[no-]extensions",
               "Restore gems with extensions",
               "in addition to regular gems") do |value, options|
      options[:extensions_set] = true
      options[:extensions]     = value
    end

    add_option("--only-missing-extensions",
               "Only restore gems with missing extensions") do |value, options|
      options[:only_missing_extensions] = value
    end

    add_option("--only-executables",
               "Only restore executables") do |value, options|
      options[:only_executables] = value
    end

    add_option("--only-plugins",
               "Only restore plugins") do |value, options|
      options[:only_plugins] = value
    end

    add_option("-E", "--[no-]env-shebang",
               "Rewrite executables with a shebang",
               "of /usr/bin/env") do |value, options|
      options[:env_shebang] = value
    end

    add_option("-i", "--install-dir DIR",
               "Gem repository to get binstubs and plugins installed") do |value, options|
      options[:install_dir] = File.expand_path(value)
    end

    add_option("-n", "--bindir DIR",
               "Directory where executables are",
               "located") do |value, options|
      options[:bin_dir] = File.expand_path(value)
    end

    add_version_option("restore to", "pristine condition")
  end

  def arguments # :nodoc:
    "GEMNAME       gem to restore to pristine condition (unless --all)"
  end

  def defaults_str # :nodoc:
    "--extensions"
  end

  def description # :nodoc:
    <<-EOF
The pristine command compares an installed gem with the contents of its
cached .gem file and restores any files that don't match the cached .gem's
copy.

If you have made modifications to an installed gem, the pristine command
will revert them.  All extensions are rebuilt and all bin stubs for the gem
are regenerated after checking for modifications.

If the cached gem cannot be found it will be downloaded.

If --no-extensions is provided pristine will not attempt to restore a gem
with an extension.

If --extensions is given (but not --all or gem names) only gems with
extensions will be restored.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [GEMNAME ...]"
  end

  def execute
    specs = if options[:all]
      Gem::Specification.map

    # `--extensions` must be explicitly given to pristine only gems
    # with extensions.
    elsif options[:extensions_set] &&
          options[:extensions] && options[:args].empty?
      Gem::Specification.select do |spec|
        spec.extensions && !spec.extensions.empty?
      end
    elsif options[:only_missing_extensions]
      Gem::Specification.select do |spec|
        spec.missing_extensions?
      end
    else
      get_all_gem_names.sort.map do |gem_name|
        Gem::Specification.find_all_by_name(gem_name, options[:version]).reverse
      end.flatten
    end

    specs = specs.select {|spec| RUBY_ENGINE == spec.platform || Gem::Platform.local === spec.platform || spec.platform == Gem::Platform::RUBY }

    if specs.to_a.empty?
      raise Gem::Exception,
            "Failed to find gems #{options[:args]} #{options[:version]}"
    end

    say "Restoring gems to pristine condition..."

    specs.each do |spec|
      if spec.default_gem?
        say "Skipped #{spec.full_name}, it is a default gem"
        next
      end

      if options.has_key? :skip
        if options[:skip].include? srubygems/rubygems/commands/environment_command.rb000064400000012454150403134200016424 0ustar00
        end

        spec_candidate, source = found.first
        Gem::RemoteFetcher.fetcher.download spec_candidate, source.uri.to_s, spec.base_dir
      end

      env_shebang =
        if options.include? :env_shebang
          options[:env_shebang]
        else
          install_defaults = Gem::ConfigFile::PLATFORM_DEFAULTS["install"]
          install_defaults.to_s["--env-shebang"]
        end

      bin_dir = options[:bin_dir] if options[:bin_dir]
      install_dir = options[:install_dir] if options[:install_dir]

      installer_options = {
        :wrappers => true,
        :force => true,
        :install_dir => install_dir || spec.base_dir,
        :env_shebang => env_shebang,
        :build_args => spec.build_args,
        :bin_dir => bin_dir,
      }

      if options[:only_executables]
        installer = Gem::Installer.for_spec(spec, installer_options)
        installer.generate_bin
      elsif options[:only_plugins]
        installer = Gem::Installer.for_spec(spec, installer_options)
        installer.generate_plugins
      else
        installer = Gem::Installer.at(gem, installer_options)
        installer.install
      end

      say "Restored #{spec.full_name}"
    end
  end
end
rubygems/rubygems/commands/environment_command.rb000064400000012454150403134200016424 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::EnvironmentCommand < Gem::Command
  def initialize
    super "environment", "Display information about the RubyGems environment"
  end

  def arguments # :nodoc:
    args = <<-EOF
          home            display the path where gems are installed. Aliases: gemhome, gemdir, GEM_HOME
          path            display path used to search for gems. Aliases: gempath, GEM_PATH
          user_gemhome    display the path where gems are installed when `--user-install` is given. Aliases: user_gemdir
          version         display the gem format version
          remotesources   display the remote gem servers
          platform        display the supported gem platforms
          <omitted>       display everything
    EOF
    return args.gsub(/^\s+/, "")
  end

  def description # :nodoc:
    <<-EOF
The environment command lets you query rubygems for its configuration for
use in shell scripts or as a debugging aid.

The RubyGems environment can be controlled through command line arguments,
gemrc files, environment variables and built-in defaults.

Command line argument defaults and some RubyGems defaults can be set in a
~/.gemrc file for individual users and a gemrc in the SYSTEM CONFIGURATION
DIRECTORY for all users. These files are YAML files with the following YAML
keys:

  :sources: A YAML array of remote gem repositories to install gems from
  :verbose: Verbosity of the gem command. false, true, and :really are the
            levels
  :update_sources: Enable/disable automatic updating of repository metadata
  :backtrace: Print backtrace when RubyGems encounters an error
  :gempath: The paths in which to look for gems
  :disable_default_gem_server: Force specification of gem server host on push
  <gem_command>: A string containing arguments for the specified gem command

Example:

  :verbose: false
  install: --no-wrappers
  update: --no-wrappers
  :disable_default_gem_server: true

RubyGems' default local repository can be overridden with the GEM_PATH and
GEM_HOME environment variables. GEM_HOME sets the default repository to
install into. GEM_PATH allows multiple local repositories to be searched for
gems.

If you are behind a proxy server, RubyGems uses the HTTP_PROXY,
HTTP_PROXY_USER and HTTP_PROXY_PASS environment variables to discover the
proxy server.

If you would like to push gems to a private gem server the RUBYGEMS_HOST
environment variable can be set to the URI for that server.

If you are packaging RubyGems all of RubyGems' defaults are in
lib/rubygems/defaults.rb.  You may override these in
lib/rubygems/defaults/operating_system.rb
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [arg]"
  end

  def execute
    out = String.new
    arg = options[:args][0]
    out <<
      case arg
      when /^version/ then
        Gem::VERSION
      when /^gemdir/, /^gemhome/, /^home/, /^GEM_HOME/ then
        Gem.dir
      when /^gempath/, /^path/, /^GEM_PATH/ then
        Gem.path.join(File::PATH_SEPARATOR)
      when /^user_gemdir/, /^user_gemhome/ then
        Gem.user_dir
      when /^remotesources/ then
        Gem.sources.to_a.join("\n")
      when /^platform/ then
        Gem.platforms.join(File::PATH_SEPARATOR)
      when nil then
        show_environment
      else
        raise Gem::CommandLineError, "Unknown envirubygems/rubygems/commands/signin_command.rb000064400000001600150403134200015336 0ustar00ut << "  - GIT EXECUTABLE: #{git_path}\n"

    out << "  - EXECUTABLE DIRECTORY: #{Gem.bindir}\n"

    out << "  - SPEC CACHE DIRECTORY: #{Gem.spec_cache_dir}\n"

    out << "  - SYSTEM CONFIGURATION DIRECTORY: #{Gem::ConfigFile::SYSTEM_CONFIG_PATH}\n"

    out << "  - RUBYGEMS PLATFORMS:\n"
    Gem.platforms.each do |platform|
      out << "     - #{platform}\n"
    end

    out << "  - GEM PATHS:\n"
    out << "     - #{Gem.dir}\n"

    gem_path = Gem.path.dup
    gem_path.delete Gem.dir
    add_path out, gem_path

    out << "  - GEM CONFIGURATION:\n"
    Gem.configuration.each do |name, value|
      value = value.gsub(/./, "*") if name == "gemcutter_key"
      out << "     - #{name.inspect} => #{value.inspect}\n"
    end

    out << "  - REMOTE SOURCES:\n"
    Gem.sources.each do |s|
      out << "     - #{s}\n"
    end

    out << "  - SHELL PATH:\n"

    shell_path = ENV["PATH"rubygems/rubygems/commands/query_command.rb000064400000002355150403134200015224 0ustar00rubygems/rubygems/commands/signin_command.rb000064400000001600150403134200015336 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../gemcutter_utilities"

class Gem::Commands::SigninCommand < Gem::Command
  include Gem::GemcutterUtilities

  def initialize
    super "signin", "Sign in to any gemcutter-compatible host. "\
          "It defaults to https://rubygems.org"

    add_option("--host HOST", "Push to another gemcutter-compatible host") do |value, options|
      options[:host] = value
    end

    add_otp_option
  end

  def description # :nodoc:
    "The signin command executes host sign in for a push server (the default is"\
    " https://rubygems.org). The host can be provided with the host flag or can"\
    " be inferred from the provided gem. Host resolution matches the resolutirubygems/rubygems/commands/specification_command.rb000064400000006635150403134200016704 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"
require_relative "../deprecate"

class Gem::Commands::QueryCommand < Gem::Command
  extend Gem::Deprecate
  rubygems_deprecate_command

  include Gem::QueryUtils

  alias warning_without_suggested_alternatives deprecation_warning
  def deprecation_warning
    warning_without_suggested_alternatives

    message = "It is recommended that you use `gem search` or `gem list` instead.\n"
    alert_warning message unless Gem::Deprecate.skip
  end

  def initialize(name = "query",
                 summary = "Query gem information in local or remote repositories")
    super name, summary,
         :domain => :local, :details => false, :versions => true,
         :installed => nil, :version => Gem::Requirement.default

    add_option("-n", "--name-matches REGEXP",
               "Name of gem(s) to query on matches the",
               "provided REGEXP") do |value, options|
      options[:name] = /#{value}/i
    end

    add_query_options
  end

  def description # :nodoc:
    <<-EOF
The query command is the basis for the list and search commands.

You should really use the list and search commands instead.  This command
is too hard to use.
    EOF
  end
end
rubygems/rubygems/commands/specification_command.rb000064400000006635150403134200016704 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../version_option"
require_relative "../package"

class Gem::Commands::SpecificationCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def initialize
    Gem.load_yaml

    super "specification", "Display gem specification (in yaml)",
          :domain => :local, :version => Gem::Requirement.default,
          :format => :yaml

    add_version_option("examine")
    add_platform_option
    add_prerelease_option

    add_option("--all", "Output specifications for all versions of",
               "the gem") do |value, options|
      options[:all] = true
    end

    add_option("--ruby", "Output ruby format") do |value, options|
      options[:format] = :ruby
    end

    add_option("--yaml", "Output YAML format") do |value, options|
      options[:format] = :yaml
    end

    add_option("--marshal", "Output Marshal format") do |value, options|
      options[:format] = :marshal
    end

    add_local_remote_options
  end

  def arguments # :nodoc:
    <<-ARGS
GEMFILE       name of gem to show the gemspec for
FIELD         name of gemspec field to show
    ARGS
  end

  def defaults_str # :nodoc:
    "--local --version '#{Gem::Requirement.default}' --yaml"
  end

  def description # :nodoc:
    <<-EOF
The specification command allows you to extract the specificarubygems/rubygems/commands/owner_command.rb000064400000006632150403134200015213 0ustar00:Requirement
      req = v
    else
      raise Gem::CommandLineError, "Unsupported version type: '#{v}'"
    end

    if !req.none? && options[:all]
      alert_error "Specify --all or -v, not both"
      terminate_interaction 1
    end

    if options[:all]
      dep = Gem::Dependency.new gem
    else
      dep = Gem::Dependency.new gem, req
    end

    field = get_one_optional_argument

    raise Gem::CommandLineError, "--ruby and FIELD are mutually exclusive" if
      field && options[:format] == :ruby

    if local?
      if File.exist? gem
        specs << Gem::Package.new(gem).spec rescue nil
      end

      if specs.empty?
        specs.push(*dep.matching_specs)
      end
    end

    if remote?
      dep.prerelease = options[:prerelease]
      found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dep

      specs.push(*found.map {|spec,| spec })
    end

    if specs.empty?
      alert_error "No gem matching '#{dep}' found"
      terminate_interaction 1
    end

    platform = get_platform_from_requirements(options)

    if platform
      specs = specs.select {|s| s.platform.to_s == platform }
    end

    unless options[:all]
      specs = [specs.max_by {|s| s.version }]
    end

    specs.each do |s|
      s = s.send field if field

      say case options[:format]
      when :ruby then s.to_ruby
      when :marshal then Marshal.dump s
      else s.to_yaml
      end

      say "\n"
    end
  end
end
rubygems/rubygems/commands/owner_command.rb000064400000006632150403134200015213 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../gemcutter_utilities"
require_relative "../text"

class Gem::Commands::OwnerCommand < Gem::Command
  include Gem::Text
  include Gem::LocalRemoteOptions
  include Gem::GemcutterUtilities

  def description # :nodoc:
    <<-EOF
The owner command lets you add and remove owners of a gem on a push
server (the default is https://rubygems.org). Multiple owners can be
added or removed at the same time, if the flag is given multiple times.

The supported user identifiers are dependent on the push server.
For rubygems.org, both e-mail and handle are supported, even though the
user identifier field is called "email".

The owner of a gem has the permission to push new versions, yank existing
versions or edit the HTML page of the gem.  Be careful of who you give push
permission to.
    EOF
  end

  def arguments # :nodoc:
    "GEM       gem to manage owners for"
  end

  def usage # :nodoc:
    "#{program_name} GEM"
  end

  def initialize
    super "owner", "Manage gem owners of a gem on the push server"
    add_proxy_option
    add_key_option
    add_otp_option
    defaults.merge! :add => [], :remove => []

    add_option "-a", "--add NEW_OWNER", "Add an owner by user identifier" do |value, options|
      options[:add] << value
    end

    add_option "-r", "--remove OLD_OWNER", "Remove an owner by rubygems/rubygems/commands/search_command.rb000064400000001721150403134200015320 0ustar00" do |request|
      request.add_field "Authorization", api_key
    end

    with_response response do |resp|
      owners = Gem::SafeYAML.load clean_text(resp.body)

      say "Owners for gem: #{name}"
      owners.each do |owner|
        say "- #{owner['email'] || owner['handle'] || owner['id']}"
      end
    end
  end

  def add_owners(name, owners)
    manage_owners :post, name, owners
  end

  def remove_owners(name, owners)
    manage_owners :delete, name, owners
  end

  def manage_owners(method, name, owners)
    owners.each do |owner|
      begin
        response = send_owner_request(method, name, owner)
        action = method == :delete ? "Removing" : "Adding"

        with_response response, "#{action} #{owner}"
      rescue Gem::WebauthnVerificationError => e
        raise e
      rescue StandardError
        # ignore early exits to allow for completing the iteration of all owners
      end
    end
  end

  private

  def send_owner_request(method, rubygems/rubygems/commands/which_command.rb000064400000004141150403134200015154 0ustar00rubygems/rubygems/commands/search_command.rb000064400000001721150403134200015320 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"

class Gem::Commands::SearchCommand < Gem::Command
  include Gem::QueryUtils

  def initialize
    super "search", "Display remote gems whose name matches REGEXP",
         :domain => :remote, :details => false, :versions => true,
         :installed => nil, :version => Gem::Requirement.default

    add_query_options
  end

  def arguments # :nodoc:
    "REGEXP        regexp to search for in gem name"
  end

  def defaults_str # :nodoc:
    "--remote --no-details"
  end

  def description # :nodoc:
    <<-EOF
The search command displays remote gems whose name matches the given
regexp.

The --details option displays additional details from the gem but will
take a little longer to complete as it must download the information
individually from the index.

To list local gems use the list command.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [REGEXP]"
  end
end
rubygems/rubygems/commands/which_command.rb000064400000004141150403134200015154 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::WhichCommand <rubygems/rubygems/commands/yank_command.rb000064400000004533150403134200015021 0ustar00ot behave as you expect.
    EOF
  end

  def execute
    found = true

    options[:args].each do |arg|
      arg = arg.sub(/#{Regexp.union(*Gem.suffixes)}$/, "")
      dirs = $LOAD_PATH

      spec = Gem::Specification.find_by_path arg

      if spec
        if options[:search_gems_first]
          dirs = spec.full_require_paths + $LOAD_PATH
        else
          dirs = $LOAD_PATH + spec.full_require_paths
        end
      end

      paths = find_paths arg, dirs

      if paths.empty?
        alert_error "Can't find Ruby library file or shared library #{arg}"
        found = false
      else
        say paths
      end
    end

    terminate_interaction 1 unless found
  end

  def find_paths(package_name, dirs)
    result = []

    dirs.each do |dir|
      Gem.suffixes.each do |ext|
        full_path = File.join dir, "#{package_name}#{ext}"
        if File.exist?(full_path) && !File.directory?(full_path)
          result << full_path
          return result unless options[:show_all]
        end
      end
    end

    result
  end

  def usage # :nodoc:
    "#{program_name} FILE [FILE ...]"
  end
end
rubygems/rubygems/commands/yank_command.rb000064400000004533150403134200015021 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../version_option"
require_relative "../gemcutter_utilities"

class Gem::Commands::YankCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::VersionOption
  include Gem::GemcutterUtilities

  def descriptionrubygems/rubygems/commands/info_command.rb000064400000001524150403134200015007 0ustar00               "Yank from another gemcutter-compatible host",
               "  (e.g. https://rubygems.org)") do |value, options|
      options[:host] = value
    end

    add_key_option
    @host = nil
  end

  def execute
    @host = options[:host]

    sign_in @host, scope: get_yank_scope

    version   = get_version_from_requirements(options[:version])
    platform  = get_platform_from_requirements(options)

    if version
      yank_gem(version, platform)
    else
      say "A version argument is required: #{usage}"
      terminate_interaction
    end
  end

  def yank_gem(version, platform)
    say "Yanking gem from #{self.host}..."
    args = [:delete, version, platform, "api/v1/gems/yank"]
    response = yank_api_request(*args)

    say response.body
  end

  private

  def yank_api_request(method, version, platform, api)
    name =rubygems/rubygems/commands/lock_command.rb000064400000005305150403134200015005 0ustar00rubygems/rubygems/commands/info_command.rb000064400000001524150403134200015007 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"

class Gem::Commands::InfoCommand < Gem::Command
  include Gem::QueryUtils

  def initialize
    super "info", "Show information for the given gem",
         :name => //, :domain => :local, :details => false, :versions => true,
         :installed => nil, :version => Gem::Requirement.default

    add_query_options

    remove_option("-d")

    defaults[:details] = true
    defaults[:exact] = true
  end

  def description # :nodoc:
    "Info prints information about the gem such as name,"\
    " description, website, license and installed paths"
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME"
  end

  def arguments # :nodoc:
    "GEMNAME        name of the gem to print information about"
  end

  def defaults_str
    "--local"
  end
end
rubygems/rubygems/commands/lock_command.rb000064400000005305150403134200015005 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::LockCommand < Gem::Command
  def initialize
    super "lock", "Generate a lockdown list of gems",
          :strict => false

    add_option "-s", "--[no-]strict",
               "fail if unable to satisfy a dependency" do |strict, options|
      options[:strict] = strict
    end
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to lock\nVERSION       version of gem to lock"
  end

  def defaults_str # :nodoc:
    "--no-strict"
  end

  def description # :nodoc:
    <<-EOF
The lock command will generate a list of +gem+ statements that will lock down
the versions for the gem given in the command line.  It rubygems/rubygems/commands/signout_command.rb000064400000001602150403134200015541 0ustar00o the exact version.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME-VERSION [GEMNAME-VERSION ...]"
  end

  def complain(message)
    if options[:strict]
      raise Gem::Exception, message
    else
      say "# #{message}"
    end
  end

  def execute
    say "require 'rubygems'"

    locked = {}

    pending = options[:args]

    until pending.empty? do
      full_name = pending.shift

      spec = Gem::Specification.load spec_path(full_name)

      if spec.nil?
        complain "Could not find gem #{full_name}, try using the full name"
        next
      end

      say "gem '#{spec.name}', '= #{spec.version}'" unless locked[spec.name]
      locked[spec.name] = true

      spec.runtime_dependencies.each do |dep|
        next if locked[dep.name]
        candidates = dep.matching_specs

        if candidates.empty?
          complain "Unable to satisfy '#{dep}' from rubygems/rubygems/commands/list_command.rb000064400000001764150403134200015035 0ustar00rubygems/rubygems/commands/signout_command.rb000064400000001602150403134200015541 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::SignoutCommand < Gem::Command
  def initialize
    super "signout", "Sign out from all the current sessions."
  end

  def description # :nodoc:
    "The `signout` command is used to sign out from all current sessions,"\
    " allowing you to sign in using a different set of credentials."
  end

  def usage # :nodoc:
    program_name
  end

  def execute
    credentials_path = Gem.configuration.credentials_path

 rubygems/rubygems/commands/generate_index_command.rb000064400000005644150403134200017044 0ustar00rubygems/rubygems/commands/list_command.rb000064400000001764150403134200015035 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"

##
# Searches for gems starting with the supplied argument.

class Gem::Commands::ListCommand < Gem::Command
  include Gem::QueryUtils

  def initialize
    super "list", "Display local gems whose name matches REGEXP",
         :domain => :local, :details => false, :versions => true,
         :installed => nil, :version => Gem::Requirement.default

    add_query_options
  end

  def arguments # :nodoc:
    "REGEXP        regexp to look for in gem name"
  end

  def defaults_str # :nodoc:
    "--local --no-details"
  end

  def description # :nodoc:
    <<-EOF
The list command is used to view the gems you have installed locally.

The --details option displays additional details including the summary, the
homepage, the author, the locations of different versions of the gem.

To search for remote gems use the search command.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [REGEXP ...]"
  end
end
rubygems/rubygems/commands/generate_index_command.rb000064400000005644150403134200017044 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../indexer"

##
# Generates a index files for use as a gem server.
#
# See `gem help generate_index`

class Gem::Commands::GenerateIndexCommand < Gem::Command
  def initialize
    super "generate_index",
          "Generates the index files for a gem server directory",
          :directory => ".", :build_modern => true

    add_option "-d", "--directory=DIRNAME",
               "repository base dir containing gems subdir" do |dir, options|
      options[:directory] = File.expand_path dir
    end

    add_option "--[no-]modern",
               "Generate indexes for RubyGems",
               "(always true)" do |value, options|
      options[:build_modern] = value
    end

    deprecate_option("--modern", version: "4.0", extra_msg: "Modern indexes (specs, latest_specs, and prerelease_specs) are always generated, so this option is not needed.")
rubygems/rubygems/commands/mirror_command.rb000064400000001163150403134200015365 0ustar00ory under the path given to
the --directory option.  The given directory will be the directory you serve
as the gem repository.

For `gem generate_index --directory /path/to/repo`, expose /path/to/repo via
your HTTP server configuration (not /path/to/repo/gems).

When done, it will generate a set of files like this:

  gems/*.gem                                   # .gem files you want to
                                               # index

  specs.<version>.gz                           # specs index
  latest_specs.<version>.gz                    # latest specs index
  prerelease_specs.<version>.gz                # prrubygems/rubygems/commands/check_command.rb000064400000004365150403134200015137 0ustar00rubygems/rubygems/package.rb000064400000043310150403134160012154 0ustar00Mirror all gem files (requires rubygems-mirror)")
      begin
        Gem::Specification.find_by_name("rubygems-mirror").activate
      rescue Gem::LoadError
        # no-op
      end
    end

    def description # :nodoc:
      <<-EOF
The mirror command has been moved to the rubygems-mirror gem.
      EOF
    end

    def execute
      alert_error "Install the rubygems-mirror gem for the mirror command"
    end
  end
end
rubygems/rubygems/commands/check_command.rb000064400000004365150403134200015137 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../version_option"
require_relative "../validator"
require_relative "../doctor"

class Gem::Commands::CheckCommand < Gem::Command
  include Gem::VersionOption

  def rubygems/rubygems/commands/outdated_command.rb000064400000001540150403134200015663 0ustar00s for problems") do |value, options|
      options[:gems] = value
    end

    add_version_option "check"
  end

  def check_gems
    say "Checking gems..."
    say
    gems = get_all_gem_names rescue []

    Gem::Validator.new.alien(gems).sort.each do |key, val|
      unless val.empty?
        say "#{key} has #{val.size} problems"
        val.each do |error_entry|
          say "  #{error_entry.path}:"
          say "    #{error_entry.problem}"
        end
      else
        say "#{key} is error-free" if Gem.configuration.verbose
      end
      say
    end
  end

  def doctor
    say "Checking for files from uninstalled gems..."
    say

    Gem.path.each do |gem_repo|
      doctor = Gem::Doctor.new gem_repo, options[:dry_run]
      doctor.doctor
    end
  end

  def execute
    check_gems if options[:gems]
    doctor if options[:doctor]
  end

  defrubygems/rubygems/commands/exec_command.rb000064400000015464150403134200015010 0ustar00rubygems/rubygems/commands/outdated_command.rb000064400000001540150403134200015663 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../spec_fetcher"
require_relative "../version_option"

class Gem::Commands::OutdatedCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def initialize
    super "outdated", "Display all gems that need updates"

    add_local_remote_options
    add_platform_option
  end

  def description # :nodoc:
    <<-EOF
The outdated command lists gems you may wish to upgrade to a newer version.

You can check for dependency mismatches using the dependency command and
update the gems with the update or install commands.
    EOF
  end

  def execute
    Gem::Specification.outdated_and_latest_version.each do |spec, remote_version|
      say "#{spec.name} (#{spec.version} < #{remote_version})"
    end
  end
end
rubygems/rubygems/commands/exec_command.rb000064400000015464150403134200015010 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../dependency_installer"
require_relative "../gem_runner"
require_relative "../package"
require_relative "../version_option"

class Gem::Commands::ExecCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "exec", "Run a command from a gem", {
      version: Gem::Requirement.default,
    }

    add_version_option
    add_prerelease_option "to be installed"

    add_option "-g", "--gem GEM", "run the executable from the given gem" do |value, options|
      options[:gem_name] = value
    end

    add_option(:"Install/Update", "--conservative",
      "Prefer the most recent installed version, ",
      "rather than the latest version overall") do |value, options|
      options[:conservative] = true
    end
  end

  def arguments # :nodoc:
    "COMMAND  the executable command to run"
  end

  def defaults_str # :nodoc:
    "--version '#{Gem::Requirement.default}'"
  end

  def description # :nodoc:
    <<-EOF
The exec command handles installing (if necessary) and running an executable
from a gem, regardless of whether that gem is currently installed.

The exec command can be thought of as a shortcut to running `gem install` and
then the executable from the installed gem.

For example, `gem exec rails new .` will run `rails new .` in the current
directory, without having to manually run `gem install rails`.
Additionally, the exec command ensures the most recent version of the gem
is used (unless run with `--conservative`), and that the gem is not installed
to the same gem path as user-installed gems.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [options --] COMMAND [args]"
  end

  def execute
    gem_paths = { "GEM_HOME" => Gem.paths.home, "GEM_PATH" => Gem.paths.path.join(File::PATH_SEPARATOR), "GEM_SPEC_CACHE" => Gem.paths.spec_cache_dir }.compact

    check_executable

    print_command
    if options[:gem_name] == "gem" && options[:executable] == "gem"
      set_gem_exec_install_paths
      Gem::GemRunner.new.run options[:args]
      return
    elsif options[:conservative]
      install_if_needed
    else
      install
      activate!
    end

    load!
  ensure
    ENV.update(gem_paths) if gem_paths
    Gem.clear_paths
  end

  private

  def handle_options(args)
    args = add_extra_args(args)
    check_deprecated_options(args)
    @options = Marshal.load Marshal.dump @defaults # deep copy
    parser.order!(args) do |v|
      # put the non-option back at the front of the list of arguments
      args.unshift(v)

      # stop parsing once we hit the first non-option,
      # so you can call `gem exec rails --version` and it prints the rails
      # version rather than rubygem's
      break
    end
    @options[:args] = args

    options[:executable], gem_version = extract_gem_name_and_version(options[:args].shift)
    options[:gem_name] ||= options[:executable]

    if gem_version
      if options[:version].none?
        options[:version] = Gem::Requirement.new(gem_version)
      else
        options[:version].concat [gem_version]
      end
    end

    if options[:prerelease] && !options[:version].prerelease?
      if options[:version].none?
        options[:version] = Gem::Requirement.default_prerelease
      else
        options[:version].concat [Gem::Requirement.default_prerelease]
      end
    end
  end

  def check_executable
    if options[:executable].nil?
      raise Gem::CommandLineError,
        "Please specify an executable to run (e.g. #{program_name} COMMAND)"
    end
  end

  def print_command
    verbose "running #{program_name} with:\n"
    opts = options.reject {|_, v| v.nil? || Array(v).empty? }
    max_length = opts.map {|k, _| k.size }.max
    opts.each do |k, v|
      next if v.nil?
      verbose "\t#{k.to_s.rjust(max_length)}: #{v}"
    end
    verbose ""
  end

  def install_if_needed
    activate!
  rescue Gem::MissingSpecError
    verbose "#{Gem::Dependency.new(options[:gem_name], options[:version])} not available locally, installing from remote"
    install
    activate!
  end

  def set_gem_exec_install_paths
    home = File.join(Gem.dir, "gem_exec")

    ENV["GEM_PATH"] = ([home] + Gem.path).join(File::PATH_SEPARATOR)
    ENV["GEM_HOME"] = home
    Gem.clear_paths
  end

  def install
    set_gem_exec_install_paths

    gem_name = options[:gem_name]
    gem_version = options[:version]

    install_options = options.merge(
      minimal_deps: false,
      wrappers: true
    )

    suppress_always_install do
      dep_installer = Gem::DependencyInstaller.new install_options

      request_set = dep_installer.resolve_dependencies gem_name, gem_version

      verbose "Gems to install:"
      request_set.sorted_requests.each do |activation_request|
        verbose "\t#{activation_request.full_name}"
      end

      request_set.install install_options
    end

    Gem::Specification.resrubygems/rubygems/commands/setup_command.rb000064400000044025150403134200015217 0ustar00 exe = executable = options[:executable]

    contains_executable = Gem.loaded_specs.values.select do |spec|
      spec.executables.include?(executable)
    end

    if contains_executable.any? {|s| s.name == executable }
      contains_executable.select! {|s| s.name == executable }
    end

    if contains_executable.empty?
      if (spec = Gem.loaded_specs[executable]) && (exe = spec.executable)
        contains_executable << spec
      else
        alert_error "Failed to load executable `#{executable}`," \
              " are you sure the gem `#{options[:gem_name]}` contains it?"
        terminate_interaction 1
      end
    end

    if contains_executable.size > 1
      alert_error "Ambiguous which gem `#{executable}` should come from: " \
            "the options are #{contains_executable.map(&:name)}, " \
            "specify one via `-g`"
      terminate_interaction 1
    end

    load Gem.activate_bin_path(contains_executable.first.name, exe, ">= 0.a")
  ensure
    ARGV.replace argv
  end

  def suppress_always_install
    name = :always_install
    cls = ::Gem::Resolver::InstallerSet
    method = cls.instance_method(name)
    cls.remove_method(name)
    cls.define_method(name) { [] }

    begin
      yield
    ensure
      cls.remove_method(name)
      cls.define_method(name, method)
    end
  end
end
rubygems/rubygems/package.rb000064400000045521150403134160012162 0ustar00# frozen_string_literal: true

# rubocop:disable Style/AsciiComments

# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See LICENSE.txt for additional licensing information.

# rubocop:enable Style/AsciiComments

require_relative "security"
require_relative "user_interaction"

##
# Example using a Gem::Package
#
# Builds a .gem file given a Gem::Specification. A .gem file is a tarball
# which contains a data.tar.gz, metadata.gz, checksums.yaml.gz and possibly
# signatures.
#
#   require 'rubygems'
#   require 'rubygems/package'
#
#   spec = Gem::Specification.new do |s|
#     s.summary = "Ruby based make-like utility."
#     s.name = 'rake'
#     s.version = PKG_VERSION
#     s.requirements << 'none'
#     s.files = PKG_FILES
#     s.description = <<-EOF
#   Rake is a Make-like program implemented in Ruby. Tasks
#   and dependencies are specified in standard Ruby syntax.
#     EOF
#   end
#
#   Gem::Package.build spec
#
# Reads a .gem file.
#
#   require 'rubygems'
#   require 'rubygems/package'
#
#   the_gem = Gem::Package.new(path_to_dot_gem)
#   the_gem.contents # get the files in the gem
#   the_gem.extract_files destination_directory # extract the gem into a directory
#   the_gem.spec # get the spec out of the gem
#   the_gem.verify # check the gem is OK (contains valid gem specification, contains a not corrupt contents archive)
#
# #files are the files in the .gem tar file, not the Ruby files in the gem
# #extract_files and #contents automatically call #verify

class Gem::Package
  include Gem::UserInteraction

  class Error < Gem::Exception; end

  class FormatError < Error
    attr_reader :path

    def initialize(message, source = nil)
      if source
        @path = source.is_a?(String) ? source : source.path

        message += " in #{path}" if path
      end

      super message
    end
  end

  class PathError < Error
    def initialize(destination, destination_dir)
      super format("installing into parent path %s of %s is not allowed", destination, destination_dir)
    end
  end

  class SymlinkError < Error
    def initialize(name, destination, destination_dir)
      super format("installing symlink '%s' pointing to parent path %s of %s is not allowed", name, destination, destination_dir)
    end
  end

  class NonSeekableIO < Error; end

  class TooLongFileName < Error; end

  ##
  # Raised when a tar file is corrupt

  class TarInvalidError < Error; end

  attr_accessor :build_time # :nodoc:

  ##
  # Checksums for the contents of the package

  attr_reader :checksums

  ##
  # The files in this package.  This is not the contents of the gem, just the
  # files in the top-level container.

  attr_reader :files

  ##
  # Reference to the gem being packaged.

  attr_reader :gem

  ##
  # The security policy used for verifying the contents of this package.

  attr_accessor :security_policy

  ##
  # Sets the Gem::Specification to use to build this package.

  attr_writer :spec

  ##
  # Permission for directories
  attr_accessor :dir_mode

  ##
  # Permission for program files
  attr_accessor :prog_mode

  ##
  # Permission for other files
  attr_accessor :data_mode

  def self.build(spec, skip_validation = false, strict_validation = false, file_name = nil)
    gem_file = file_name || spec.file_name

    package = new gem_file
    package.spec = spec
    package.build skip_validation, strict_validation

    gem_file
  end

  ##
  # Creates a new Gem::Package for the file at +gem+. +gem+ can also be
  # provided as an IO object.
  #
  # If +gem+ is an existing file in the old format a Gem::Package::Old will be
  # returned.

  def self.new(gem, security_policy = nil)
    gem = if gem.is_a?(Gem::Package::Source)
      gem
    elsif gem.respond_to? :read
      Gem::Package::IOSource.new gem
    else
      Gem::Package::FileSource.new gem
    end

    return super unless self == Gem::Package
    return super unless gem.present?

    return super unless gem.start
    return super unless gem.start.include? "MD5SUM ="

    Gem::Package::Old.new gem
  end

  ##
  # Extracts the Gem::Specification and raw metadata from the .gem file at
  # +path+.
  #--

  def self.raw_spec(path, security_policy = nil)
    format = new(path, security_policy)
    spec = format.spec

    metadata = nil

    File.open path,rubygems/rubygems/version_option.rb000064400000004326150403134170013643 0ustar00s this package to +path+ (if possible)

  def copy_to(path)
    FileUtils.cp @gem.path, path unless File.exist? path
  end

  ##
  # Adds a checksum for each entry in the gem to checksums.yaml.gz.

  def add_checksums(tar)
    Gem.load_yaml

    checksums_by_algorithm = Hash.new {|h, algorithm| h[algorithm] = {} }

    @checksums.each do |name, digests|
      digests.each do |algorithm, digest|
        checksums_by_algorithm[algorithm][name] = digest.hexdigest
      end
    end

    tar.add_file_signed "checksums.yaml.gz", 0o444, @signer do |io|
      gzip_to io do |gz_io|
        Psych.dump checksums_by_algorithm, gz_io
      end
    end
  end

  ##
  # Adds the files listed in the packages's Gem::Specification to data.tar.gz
  # and adds this file to the +tar+.

  def add_contents(tar) # :nodoc:
    digests = tar.add_file_signed "data.tar.gz", 0o444, @signer do |io|
      gzip_to io do |gz_io|
        Gem::Package::TarWriter.new gz_io do |data_tar|
          add_files data_tar
        end
      end
    end

    @checksums["data.tar.gz"] = digests
  end

  ##
  # Adds files included the package's Gem::Specification to the +tar+ file

  def add_files(tar) # :nodoc:
    @spec.files.each do |file|
      stat = File.lstat file

      if stat.symlink?
        tar.add_symlink file, File.readlink(file), stat.mode
      end

      next unless stat.file?

      tar.add_file_simple file, stat.mode, stat.size do |dst_io|
        File.open file, "rb" do |src_io|
          copy_stream(src_io, dst_io)
        end
      end
    end
  end

  ##
  # Adds the package's Gem::Specification to the +tar+ file

  def add_metadata(tar) # :nodoc:
    digests = tar.add_file_signed "metadata.gz", 0o444, @signer do |io|
      gzip_to io do |gz_io|
        gz_io.write @spec.to_yaml
      end
    end

    @checksums["metadata.gz"] = digests
  end

  ##
  # Builds this package based on the specification set by #spec=

  def build(skip_validation = false, strict_validation = false)
    raise ArgumentError, "skip_validation = true and strict_validation = true are incompatible" if skip_validation && strict_validation

    Gem.load_yaml

    @spec.validate true, strict_validation unless skip_validation

    setup_signer(
      signer_options: {
        exprubygems/rubygems/deprecate.rb000064400000011617150403134170012523 0ustar00ents_entry|
            @contents << contents_entry.full_name
          end
        end

        return @contents
      end
    end
  rescue Zlib::GzipFile::Error, EOFError, Gem::Package::TarInvalidError => e
    raise Gem::Package::FormatError.new e.message, @gem
  end

  ##
  # Creates a digest of the TarEntry +entry+ from the digest algorithm set by
  # the security policy.

  def digest(entry) # :nodoc:
    algorithms = if @checksums
      @checksums.to_h {|algorithm, _| [algorithm, Gem::Security.create_digest(algorithm)] }
    elsif Gem::Security::DIGEST_NAME
      { Gem::Security::DIGEST_NAME => Gem::Security.create_digest(Gem::Security::DIGEST_NAME) }
    end

    return @digests if algorithms.nil? || algorithms.empty?

    buf = String.new(capacity: 16_384, encoding: Encoding::BINARY)
    until entry.eof?
      entry.readpartial(16_384, buf)
      algorithms.each_value {|digester| digester << buf }
    end
    entry.rewind

    algorithms.each do |algorithm, digester|
      @digests[algorithm][entry.full_name] = digester
    end

    @digests
  end

  ##
  # Extracts the files in this package into +destination_dir+
  #
  # If +pattern+ is specified, only entries matching that glob will be
  # extracted.

  def extract_files(destination_dir, pattern = "*")
    verify unless @spec

    FileUtils.mkdir_p destination_dir, mode: dir_mode && 0o755

    @gem.with_read_io do |io|
      reader = Gem::Package::TarReader.new io

      reader.each do |entry|
        next unless entry.full_name == "data.tar.gz"

        extract_tar_gz entry, destination_dir, pattern

        break # ignore further entries
      end
    end
  rescue Zlib::GzipFile::Error, EOFError, Gem::Package::TarInvalidError => e
    raise Gem::Package::FormatError.new e.message, @gem
  end

  ##
  # Extracts all the files in the gzipped tar archive +io+ into
  # +destination_dir+.
  #
  # If an entry in the archive contains a relative path above
  # +destination_dir+ or an absolute path is encountered an exception is
  # raised.
  #
  # If +pattern+ is specified, only entries matching that glob will be
  # extracted.

  def extract_tar_gz(io, destination_dir, pattern = "*") # :nodoc:
    destination_dir = File.realpath(destination_dir)

    directories = []
    symlinks = []

    open_tar_gz io do |tar|
      tar.each do |entry|
        full_name = entry.full_name
        next unless File.fnmatch pattern, full_name, File::FNM_DOTMATCH

        destination = install_location full_name, destination_dir

        if entry.symlink?
          link_target = entry.header.linkname
          real_destination = link_target.start_with?("/") ? link_target : File.expand_path(link_target, File.dirname(destination))

          raise Gem::Package::SymlinkError.new(full_name, real_destination, destination_dir) unless
            normalize_path(real_destination).start_with? normalize_path(destination_dir + "/")

          symlinks << [full_name, link_target, destination, real_destination]
        end

        FileUtils.rm_rf destination

        mkdir =
          if entry.directory?
            destination
          else
            File.dirname destination
          end

        unless directories.include?(mkdir)
          FileUtils.mkdir_p mkdir, mode: dir_mode ? 0o755 : (entry.header.mode if entry.directory?)
          directories << mkdir
        end

        if entry.file?
          File.open(destination, "wb") {|out| copy_stream(entry, out) }
          FileUtils.chmod file_mode(entry.header.mode) & ~File.umask, destination
        end

        verbose destination
      end
    end

    symlinks.each do |name, target, destination, real_destination|
      if File.exist?(real_destination)
        File.symlink(target, destination)
      else
        alert_warning "#{@spec.full_name} ships with a dangling symlink named #{name} pointing to missing #{target} file. Ignoring"
      end
    end

    if dir_mode
      File.chmod(dir_mode, *directories)
    end
  end

  def file_mode(mode) # :nodoc:
    ((mode & 0o111).zero? ? data_mode : prog_mode) ||
      # If we're not using one of the default modes, then we're going to fall
      # back to the mode from the tarball. In this case we need to mask it down
      # to fit into 2^16 bits (the maximum value for a mode in CRuby since it
      # gets put into an unsigned short).
      (mode & ((1 << 16) - 1))
  end

  ##
  # Gzips content written to +gz_io+ to +io+.
  #--
  # Also sets the gzip modification time to the package build time to ease
  # testing.

  def gzip_to(io) # :yields: gz_io
    gz_io = Zlib::GzipWriter.new io, Zlib::BEST_COMPRESSION
    gz_io.mtime = @build_time

    yield gz_io
  ensure
    gz_io.close
  end

  ##
  # Returns the full path for installing +filename+.
  #
  # If +filename+ is not inside +destination_dir+ an exception is raised.

  def install_location(filename, destination_dir) # :nodoc:
    raise Gem::Package::PathError.new(filename, destination_dir) if
      filename.start_with? "/"

    derubygems/rubygems/security/signer.rb000064400000013416150403134170013724 0ustar00yaml limit_read(entry, "metadata", limit)
    when "metadata.gz" then
      Zlib::GzipReader.wrap(entry, external_encoding: Encoding::UTF_8) do |gzio|
        @spec = Gem::Specification.from_yaml limit_read(gzio, "metadata.gz", limit)
      end
    end
  end

  ##
  # Opens +io+ as a gzipped tar archive

  def open_tar_gz(io) # :nodoc:
    Zlib::GzipReader.wrap io do |gzio|
      tar = Gem::Package::TarReader.new gzio

      yield tar
    end
  end

  ##
  # Reads and loads checksums.yaml.gz from the tar file +gem+

  def read_checksums(gem)
    Gem.load_yaml

    @checksums = gem.seek "checksums.yaml.gz" do |entry|
      Zlib::GzipReader.wrap entry do |gz_io|
        Gem::SafeYAML.safe_load limit_read(gz_io, "checksums.yaml.gz", 10 * 1024 * 1024)
      end
    end
  end

  ##
  # Prepares the gem for signing and checksum generation.  If a signing
  # certificate and key are not present only checksum generation is set up.

  def setup_signer(signer_options: {})
    passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
    if @spec.signing_key
      @signer =
        Gem::Security::Signer.new(
          @spec.signing_key,
          @spec.cert_chain,
          passphrase,
          signer_options
        )

      @spec.signing_key = nil
      @spec.cert_chain = @signer.cert_chain.map(&:to_s)
    else
      @signer = Gem::Security::Signer.new nil, nil, passphrase
      @spec.cert_chain = @signer.cert_chain.map(&:to_pem) if
        @signer.cert_chain
    end
  end

  ##
  # The spec for this gem.
  #
  # If this is a package for a built gem the spec is loaded from the
  # gem and returned.  If this is a package for a gem being built the provided
  # spec is returned.

  def spec
    verify unless @spec

    @spec
  end

  ##
  # Verifies that this gem:
  #
  # * Contains a valid gem specification
  # * Contains a contents archive
  # * The contents archive is not corrupt
  #
  # After verification the gem specification from the gem is available from
  # #spec

  def verify
    @files     = []
    @spec      = nil

    @gem.with_read_io do |io|
      Gem::Package::TarReader.new io do |reader|
        read_checksums reader

        verify_files reader
      end
    end

    verify_checksums @digests, @checksums

    @security_policy&.verify_signatures @spec, @digests, @signatures

    true
  rescue Gem::Security::Exception
    @spec = nil
    @files = []
    raise
  rescue Errno::ENOENT => e
    raise Gem::Package::FormatError.new e.message
  rescue Zlib::GzipFile::Error, EOFError, Gem::Package::TarInvalidError => e
    raise Gem::Package::FormatError.new e.message, @gem
  end

  ##
  # Verifies the +checksums+ against the +digests+.  This check is not
  # cryptographically secure.  Missing checksums are ignored.

  def verify_checksums(digests, checksums) # :nodoc:
    return unless checksums

    checksums.sort.each do |algorithm, gem_digests|
      gem_digests.sort.each do |file_name, gem_hexdigest|
        computed_digest = digests[algorithm][file_name]

        unless computed_digest.hexdigest == gem_hexdigest
          raise Gem::Package::FormatError.new \
            "#{algorithm} checksum mismatch for #{file_name}", @gem
        end
      end
    end
  end

  ##
  # Verifies +entry+ in a .gem file.

  def verify_entry(entry)
    file_name = entry.full_name
    @files << file_name

    case file_name
    when /\.sig$/ then
      @signatures[$`] = limit_read(entry, file_name, 1024 * 1024) if @security_policy
      return
    else
      digest entry
    end

    case file_name
    when "metadata", "metadata.gz" then
      load_spec entry
    when "data.tar.gz" then
      verify_gz entry
    end
  rescue StandardError
    warn "Exception while verifying #{@gem.path}"
    raise
  end

  ##
  # Verifies the files of the +gem+

  def verify_files(gem)
    gem.each do |entry|
      verify_entry entry
    end

    unless @spec
      raise Gem::Package::FormatError.new "package metadata is missing", @gem
    end

    unless @files.include? "data.tar.gz"
      raise Gem::Package::FormatError.new \
        "package content (data.tar.gz) is missing", @gem
    end

    if (duplicates = @files.group_by {|f| f }.select {|_k,v| v.size > 1 }.map(&:first)) && duplicates.any?
      raise Gem::Security::Exception, "duplicate files in the package: (#{duplicates.map(&:inspect).join(", ")})"
    end
  end

  ##
  # Verifies that +entry+ is a valid gzipped file.

  def verify_gz(entry) # :nodoc:
    Zlib::GzipReader.wrap entry do |gzio|
      # TODO: read into a buffer once zlib supports it
      gzio.read 16_384 until gzio.eof? # gzip checksum verification
    end
  rescue Zlib::GzipFile::Error => e
    raise Gem::Package::FormatError.new(e.message, entry.full_name)
  end

  if RUBY_ENGINE == "truffleruby"
    def copy_stream(src, dst) # :nodoc:
      dst.write src.read
    end
  else
    def copy_stream(src, dst) # :nodoc:
      IO.copy_stream(src, dst)
    end
  end

  def limit_read(io, name, limit)
    bytes = io.read(limit + 1)
    raise Gem::Package::FormatError, "#{name} is too big (over #{limit} bytes)" if bytes.size > limit
    bytes
  end
end

require_relative "package/digest_io"
require_relative "package/source"
require_relative "package/file_source"
require_relative "package/io_source"
require_relative "package/old"
require_relative "package/tar_header"
require_relative "package/tar_reader"
require_relative "package/tar_reader/entry"
require_relative "package/tar_writer"
rubygems/rubygems/version_option.rb000064400000004263150403134170013643 0ustar00rubygems/rubygems/security/trust_dir.rb000064400000005035150403134170014452 0ustar00    else
        Gem::Platform.new value
      end
    end

    add_option("--platform PLATFORM", Gem::Platform,
               "Specify the platform of gem to #{task}", *wrap) do |value, options|
      unless options[:added_platform]
        Gem.platforms = [Gem::Platform::RUBY]
        options[:added_platform] = true
      end

      Gem.platforms << value unless Gem.platforms.include? value
    end
  end

  ##
  # Add the --prerelease option to the option parser.

  def add_prerelease_option(*wrap)
    add_option("--[no-]prerelease",
               "Allow prerelease versions of a gem", *wrap) do |value, options|
      options[:prerelease] = value
      options[:explicit_prerelease] = true
    end
  end

  ##
  # Add the --version option to the option parser.

  def add_version_option(task = command, *wrap)
    Gem::OptionParser.accept Gem::Requirement do |value|
      Gem::Requirement.new(*value.split(/\s*,\s*/))
    end

    add_option("-v", "--version VERSION", Gem::Requirement,
               "Specify version of gem to #{task}", *wrap) do |value, options|
      # Allow handling for multiple --version operators
      if options[:version] && !options[:version].none?
        options[:version].concat([value])
      else
        options[:version] = value
      end

      explicit_prerelease_set = !options[:explicit_prerelease].nil?
      options[:explicit_prerelease] = false unless explicit_prerelease_set

      options[:prerelease] = value.prerelease? unless
        options[:explicit_prerelease]
    end
  end

  ##
  # Extract platform given on the command line

  def get_platform_from_requirements(requirements)
    Gem.platforms[1].to_s if requirements.key? :added_platform
  end
end
rubygems/rubygems/deprecate.rb000064400000012047150403134170012521 0ustar00# frozen_string_literal: truerubygems/rubygems/security/policy.rb000064400000017505150403134170013737 0ustar00      end
#
#       extend Gem::Deprecate
#       deprecate :some_instance_method, "X.z", 2011, 4
#       rubygems_deprecate :some_old_method, "Modern#some_new_method"
#
#       class << self
#         extend Gem::Deprecate
#         deprecate :some_class_method, :none, 2011, 4
#       end
#     end
#
#
# Example usage of +rubygems_deprecate_command+:
#
#     class Gem::Commands::QueryCommand < Gem::Command
#       extend Gem::Deprecate
#       rubygems_deprecate_command
#
#       # ...
#     end
#
#
# Example usage of +skip_during+:
#
#     class TestSomething < Gem::Testcase
#       def test_some_thing_with_deprecations
#         Gem::Deprecate.skip_during do
#           actual_stdout, actual_stderr = capture_output do
#             Gem.something_deprecated
#           end
#           assert_empty actual_stdout
#           assert_equal(expected, actual_stderr)
#         end
#       end
#     end

module Gem
  module Deprecate
    def self.skip # :nodoc:
      @skip ||= false
    end

    def self.skip=(v) # :nodoc:
      @skip = v
    end

    ##
    # Temporarily turn off warnings. Intended for tests only.

    def skip_during
      original = Gem::Deprecate.skip
      Gem::Deprecate.skip = true
      yield
    ensure
      Gem::Deprecate.skip = original
    end

    def self.next_rubygems_major_version # :nodoc:
      Gem::Version.new(Gem.rubygems_version.segments.first).bump
    end

    ##
    # Simple deprecation method that deprecates +name+ by wrapping it up
    # in a dummy method. It warns on each call to the dummy method
    # telling the user of +repl+ (unless +repl+ is :none) and the
    # year/month that it is planned to go away.

    def deprecate(name, repl, year, month)
      class_eval do
        old = "_deprecated_#{name}"
        alias_method old, name
        define_method name do |*args, &block|
          klass = is_a? Module
          target = klass ? "#{self}." : "#{self.class}#"
          msg = [
            "NOTE: #{target}#{name} is deprecated",
            repl == :none ? " with no replacement" : "; use #{repl} instead",
            format(". It will be removed on or after %4d-%02d.", year, month),
            "\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
          ]
          warn "#{msg.join}." unless Gem::Deprecate.skip
          send old, *args, &block
        end
        ruby2_keywords name if respond_to?(:ruby2_keywords, true)
      end
    end

    ##
    # Simple deprecation method that deprecates +name+ by wrapping it up
    # in a dummy method. It warns on each call to the dummy method
    # telling the user of +repl+ (unless +repl+ is :none) and the
    # Rubygems version that it is planned to go away.

    def rubygems_deprecate(name, replacement=:none)
      class_eval do
        old = "_deprecated_#{name}"
        alias_method old, name
        define_method name do |*args, &block|
          klass = is_a? Module
          target = klass ? "#{self}." : "#{self.class}#"
          msg = [
            "NOTE: #{target}#{name} is deprecated",
            replacement == :none ? " with no replacement" : "; use #{replacement} instead",
            ". It will be removed in Rubygems #{Gem::Deprecate.next_rubygems_major_version}",
            "\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
          ]
          warn "#{msg.join}." unless Gem::Deprecate.skip
          send old, *args, &block
        end
        ruby2_keywords name if respond_to?(:ruby2_keywords, true)
      end
    end

    # Deprecation method to deprecate Rubygems commands
    def rubygems_deprecate_command(version = Gem::Deprecate.next_rubygems_major_version)
      class_eval do
        define_method "deprecated?" do
          true
        end

        define_method "deprecation_warning" do
          msg = [
            "#{command} command is deprecated",
            ". It will be removed in Rubygems #{version}.\n",
          ]

          alert_warning msg.join.to_s unless Gem::Deprecate.skip
        end
      end
    end

    module_function :rubygems_deprecate, :rubygems_deprecate_command, :skip_during
  end
end
rubygems/rubygems/security/signer.rb000064400000013702150403134170013722 0ustar00# frozen_string_literal: true

##
# Basic OpenSSL-based package signing class.

require_relative "../user_interaction"

class Gem::Security::Signer
  include Gem::UserInteraction

  ##
  # The chain of certificates for signing including the signing certificate

  attr_accessor :cert_chain

  ##
  # The private key for the signing certificate

  attr_accessor :key

  ##
  # The digest algorithm used to create the signature

  attr_reader :digest_algorithm

  ##
  # The name of the digest algorithm, used to pull digests out of the hash by
  # name.

  attr_reader :digest_name # :nodoc:

  ##
  # Gem::Security::Signer options

  attr_reader :options

  DEFAULT_OPTIONS = {
    expiration_length_days: 365,
  }.freeze

  ##
  # Attempts to re-sign an expired cert with a given private key
  def self.re_sign_cert(expired_cert, expired_cert_path, private_key)
    return unless expired_cert.not_after < Time.now

    expiry = expired_cert.not_after.strftime("%Y%m%d%H%M%S")
    expired_cert_file = "#{File.basename(expired_cert_path)}.expired.#{expiry}"
    new_expired_cert_path = File.join(Gem.user_home, ".gem", expired_cert_file)

    Gem::Security.write(expired_cert, new_expired_cert_path)

    re_signed_cert = Gem::Security.re_sign(
      expired_cert,
      private_key,
      (Gem::Security::ONE_DAY * Gem.configuration.cert_expiration_length_days)
    )

    Gem::Security.write(re_signed_cert, expired_cert_path)

    yield(expired_cert_path, new_expired_cert_path) if block_given?
  end

  ##
  # Creates a new signer with an RSA +key+ or path to a key, and a certificate
  # +chain+ containing X509 certificates, encoding certificates or paths to
  # certificates.

  def initialize(key, cert_chain, passphrase = nil, options = {})
    @cert_chain = cert_chain
    @key        = key
    @passphrase = passphrase
    @options = DEFAULT_OPTIONS.merge(options)

    unless @key
      default_key = File.join Gem.default_key_path
      @key = default_key if File.exist? default_key
    end

    unless @cert_chain
      default_cert = File.join Gem.default_cert_path
      @cert_chain = [default_cert] if File.exist? default_cert
    end

    @digest_name      = Gem::Security::DIGEST_NAME
    @digest_algorithm = Gem::Security.create_digest(@digest_name)

    if @key && !@key.is_a?(OpenSSL::PKey::PKey)
      @key = OpenSSL::PKey.read(File.read(@key), @passphrase)
    end

    if @cert_chain
      @cert_chain = @cert_chain.compact.map do |cert|
        next cert if OpenSSL::X509::Certificate === cert

        cert = File.read cert if File.exist? cert

        OpenSSL::X509::Certificate.new cert
      end

      load_cert_chain
    end
  end

  ##
  # Extracts the full name of +cert+.  If the certificate has a subjectAltName
  # this value is preferred, otherwise the subject is used.

  def extract_name(cert) # :nodoc:
    subject_alt_name = cert.extensions.finrubygems/rubygems/security/policies.rb000064400000006255150403134170014247 0ustar00end

  ##
  # Sign data with given digest algorithm

  def sign(data)
    return unless @key

    raise Gem::Security::Exception, "no certs provided" if @cert_chain.empty?

    if @cert_chain.length == 1 && @cert_chain.last.not_after < Time.now
      alert("Your certificate has expired, trying to re-sign it...")

      re_sign_key(
        expiration_length: (Gem::Security::ONE_DAY * options[:expiration_length_days])
      )
    end

    full_name = extract_name @cert_chain.last

    Gem::Security::SigningPolicy.verify @cert_chain, @key, {}, {}, full_name

    @key.sign @digest_algorithm.new, data
  end

  ##
  # Attempts to re-sign the private key if the signing certificate is expired.
  #
  # The key will be re-signed if:
  # * The expired certificate is self-signed
  # * The expired certificate is saved at ~/.gem/gem-public_cert.pem
  #   and the private key is saved at ~/.gem/gem-private_key.pem
  # * There is no file matching the expiry date at
  #   ~/.gem/gem-public_cert.pem.expired.%Y%m%d%H%M%S
  #
  # If the signing certificate can be re-signed the expired certificate will
  # be saved as ~/.gem/gem-public_cert.pem.expired.%Y%m%d%H%M%S where the
  # expiry time (not after) is used for the timestamp.

  def re_sign_key(expiration_length: Gem::Security::ONE_YEAR) # :nodoc:
    old_cert = @cert_chain.last

    disk_cert_path = File.join(Gem.default_cert_path)
    disk_cert = begin
                  File.read(disk_cert_path)
                rescue StandardError
                  nil
                end

    disk_key_path = File.join(Gem.default_key_path)
    disk_key = begin
                 OpenSSL::PKey.read(File.read(disk_key_path), @passphrase)
               rescue StandardError
                 nil
               end

    return unless disk_key

    if disk_key.to_pem == @key.to_pem && disk_cert == old_cert.to_pem
      expiry = old_cert.not_after.strftime("%Y%m%d%H%M%S")
      old_cert_file = "gem-public_cert.pem.expired.#{expiry}"
      old_cert_path = File.join(Gem.user_home, ".gem", old_cert_file)

      unless File.exist?(old_cert_path)
        Gem::Security.write(old_cert, old_cert_path)

        cert = Gem::Security.re_sign(old_cert, @key, expiration_length)

        Gem::Security.write(cert, disk_cert_path)

        alert("Your cert: #{disk_cert_path} has been auto re-signed with the key: #{disk_key_path}")
        alert("Your expired cert will be located at: #{old_cert_path}")

        @cert_chain = [cert]
      end
    end
  end
end
rubygems/rubygems/security/trust_dir.rb000064400000004773150403134170014462 0ustar00# frozen_string_literal: true

##
# The TrustDir manages the trusted certificates for gem signature
# verification.

class Gem::Security::TrustDir
  ##
  # Default permissiorubygems/rubygems/validator.rb000064400000007240150403134170012551 0ustar00certificate certificate_file

      yield certificate, certificate_file
    rescue OpenSSL::X509::CertificateError
      next # HACK: warn
    end
  end

  ##
  # Returns the issuer certificate of the given +certificate+ if it exists in
  # the trust directory.

  def issuer_of(certificate)
    path = name_path certificate.issuer

    return unless File.exist? path

    load_certificate path
  end

  ##
  # Returns the path to the trusted certificate with the given ASN.1 +name+

  def name_path(name)
    digest = @digester.hexdigest name.to_s

    File.join @dir, "cert-#{digest}.pem"
  end

  ##
  # Loads the given +certificate_file+

  def load_certificate(certificate_file)
    pem = File.read certificate_file

    OpenSSL::X509::Certificate.new pem
  end

  ##
  # Add a certificate to trusted certificate list.

  def trust_cert(certificate)
    verify

    destination = cert_path certificate

    File.open destination, "wb", 0o600 do |io|
      io.write certificate.to_pem
      io.chmod(@permissions[:trusted_cert])
    end
  end

  ##
  # Make sure the trust directory exists.  If it does exist, make sure it's
  # actually a directory.  If not, then create it with the appropriate
  # permissions.

  def verify
    require "fileutils"
    if File.exist? @dir
      raise Gem::Security::Exception,
        "trust directory #{@dir} is not a directory" unless
          File.directory? @dir

      FileUtils.chmod 0o700, @dir
    else
      FileUtils.mkdir_p @dir, mode: @permissions[:trust_dir]
    end
  end
end
rubygems/rubygems/security/policy.rb000064400000017461150403134170013740 0ustar00# frozen_string_literal: true

require_relative "../user_interaction"

##
# A Gem::Security::Policy object encapsulates the settings for verifying
# signed gem files.  This is the base class.  You can either declare an
# instance of this or use one of the preset security policies in
# Gem::Security::Policies.

class Gem::Security::Policy
  include Gem::UserInteraction

  attr_reader :name

  attr_accessor :only_signed
  attr_accessor :only_trusted
  attr_accessor :verify_chain
  attr_accessor :verify_data
  attr_accessor :verify_root
  attr_accessor :verify_signer

  ##
  # Create a new Gem::Security::Policy object with the given mode and
  # options.

  def initialize(name, policy = {}, opt = {})
    @name = name

    @opt = opt

    # Default to security
    @only_signed   = true
    @only_trusted  = true
    @verify_chain  = true
    @verify_data   = true
    @verify_root   = true
    @verify_signer = true

    policy.each_pair do |key, val|
      case key
      when :verify_data   then @verify_data   = val
      when :verify_signer then @verify_signer = val
      when :verify_chain  then @verify_chain  = val
      when :verify_root   then @verify_root   = val
      when :only_trusted  then @only_trusted  = val
      when :only_signed   then @only_signed   = val
      end
    end
  end

  ##
  # Verifies each certificate in +chain+ has signed the following certificate
  # and is valid for the given +time+.

  def check_chain(chain, time)
    raise Gem::Security::Exception, "missing signing chain" unless chain
    raise Gem::Security::Exception, "empty signing chain" if chain.empty?

    begin
      chain.each_cons 2 do |issuer, cert|
        check_cert cert, issuerrubygems/rubygems/ext.rb000064400000000762150403134170011366 0ustar00:Exception,
            "#{message} not valid before #{not_before}"
    end

    if (not_after = signer.not_after) && not_after < time
      raise Gem::Security::Exception, "#{message} not valid after #{not_after}"
    end

    if issuer && !signer.verify(issuer.public_key)
      raise Gem::Security::Exception,
            "#{message} was not issued by #{issuer.subject}"
    end

    true
  end

  ##
  # Ensures the public key of +key+ matches the public key in +signer+

  def check_key(signerrubygems/rubygems/dependency_list.rb000064400000013054150403134170013735 0ustar00rst

    raise Gem::Security::Exception, "missing root certificate" unless root

    raise Gem::Security::Exception,
          "root certificate #{root.subject} is not self-signed " \
          "(issuer #{root.issuer})" if
      root.issuer != root.subject

    check_cert root, root, time
  end

  ##
  # Ensures the root of +chain+ has a trusted certificate in +trust_dir+ and
  # the digests of the two certificates match according to +digester+

  def check_trust(chain, digester, trust_dir)
    raise Gem::Security::Exception, "missing signing chain" unless chain

    root = chain.first

    raise Gem::Security::Exception, "missing root certificate" unless root

    path = Gem::Security.trust_dir.cert_path root

    unless File.exist? path
      message = "root cert #{root.subject} is not trusted".dup

      message << " (root of signing cert #{chain.last.subject})" if
        chain.length > 1

      raise Gem::Security::Exception, message
    end

    save_cert = OpenSSL::X509::Certificate.new File.read path
    save_dgst = digester.digest save_cert.public_key.to_pem

    pkey_str = root.public_key.to_pem
    cert_dgst = digester.digest pkey_str

    raise Gem::Security::Exception,
          "trusted root certificate #{root.subject} checksum " \
          "does not match signing root certificate checksum" unless
      save_dgst == cert_dgst

    true
  end

  ##
  # Extracts the email or subject from +certificate+

  def subject(certificate) # :nodoc:
    certificate.extensions.each do |extension|
      next unless extension.oid == "subjectAltName"

      return extension.value
    end

    certificate.subject.to_s
  end

  def inspect # :nodoc:
    format("[Policy: %s - data: %p signer: %p chain: %p root: %p " \
     "signed-only: %p trusted-only: %p]", @name, @verify_chain, @verify_data, @verify_root, @verify_signer, @only_signed, @only_trusted)
  end

  ##
  # For +full_name+, verifies the certificate +chain+ is valid, the +digests+
  # match the signatures +signatures+ created by the signer depending on the
  # +policy+ settings.
  #
  # If +key+ is given it is used to validate the signing certificate.

  def verify(chain, key = nil, digests = {}, signatures = {}, full_name = "(unknown)")
    if signatures.empty?
      if @only_signed
        raise Gem::Security::Exception,
          "unsigned gems are not allowed by the #{name} policy"
      elsif digests.empty?
        # lack of signatures is irrelevant if there is nothing to check
        # against
      else
        alert_warning "#{full_name} is not signed"
        return
      end
    end

    opt       = @opt
    digester  = Gem::Security.create_digest
    trust_dir = opt[:trust_dir]
    time      = Time.now

    _, signer_digests = digests.find do |_algorithm, file_digests|
      file_digests.values.first.name == Gem::Security::DIGEST_NAME
    end

    if @verify_data
      raise Gem::Security::Exception, "no digests provided (probable bug)" if
        signer_digests.nil? || signer_digests.empty?
    else
      signer_digests = {}
    end

    signer = chain.last

    check_key signer, key if key

    check_cert signer, nil, time if @verify_signer

    check_chain chain, time if @verify_chain

    check_root chain, time if @verify_root

    if @only_trusted
      check_trust chain, digester, trust_dir
    elsif signatures.empty? && digests.empty?
      # trust is irrelevant if there's no signatures to verify
    else
      alert_warning "#{subject signer} is not trusted for #{full_name}"
    end

    signatures.each do |file, _|
      digest = signer_digests[file]

      raise Gem::Security::Exception, "missing digest for #{file}" unless
        digest
    end

    signer_digests.each do |file, digest|
      signature = signatures[file]

      raise Gem::Security::Exception, "missing signature for #{file}" unless
        signature

      check_data signer.public_key, digester, signature, digest if @verify_data
    end

    true
  end

  ##
  # Extracts the certificate chain from the +spec+ and calls #verify to ensure
  # the signatures and certificate chain is valid according to the policy..

  def verify_signatures(spec, digests, signatures)
    chain = spec.cert_chain.map do |cert_pem|
      OpenSSL::X509::Certificate.new cert_pem
    end

    verify chain, nil, digests, signatures, spec.full_name

    true
  end

  alias_method :to_s, :name # :nodoc:
end
rubygems/rubygems/security/policies.rb000064400000006077150403134170014251 0ustar00# frozen_string_literal: true

module Gem::Security
  ##
  # No security policy: all package signature checks are disabled.

  NoSecurity = Policy.new(
    "No Security",
    verify_data: false,
    verify_signer: false,
    verify_chain: false,
    verify_root: false,
    only_trusted: false,
    only_signed: false
  )

  ##
  # AlmostNo security policy: only verify that the signing certificate is the
  # one that actually signed the data.  Make no attempt to verify the signing
  # certificate chain.
  #
  # This policy is basically useless. better rubygems/rubygems/spec_fetcher.rb000064400000014563150403134170013224 0ustar00 policy is reasonable, but it allows unsigned packages, so a
  # malicious person could simply delete the package signature and pass the
  # gem off as unsigned.

  MediumSecurity = Policy.new(
    "Medium Security",
    verify_data: true,
    verify_signer: true,
    verify_chain: true,
    verify_root: true,
    only_trusted: true,
    only_signed: false
  )

  ##
  # High security policy: only allow signed gems to be installed, verify the
  # signing certificate, verify the signing certificate chain all the way to
  # the root certificate, and only trust root certificates that we have
  # explicitly allowed trust for.
  #
  # This security policy is significantly more difficult to bypass, and offers
  # a reasonable guarantee that the contents of the gem have not been altered.

  HighSecurity = Policy.new(
    "High Security",
    verify_data: true,
    verify_signer: true,
    verify_chain: true,
    verify_root: true,
    only_trusted: true,
    only_signed: true
  )

  ##
  # Policy used to verify a certificate and key when signing a gem

  SigningPolicy = Policy.new(
    "Signing Policy",
    verify_data: false,
    verify_signer: true,
    verify_chain: true,
    verify_root: true,
    only_trusted: false,
    only_signed: false
  )

  ##
  # Hash of configured security policies

  Policies = {
    "NoSecurity" => NoSecurity,
    "AlmostNoSecurity" => AlmostNoSecurity,
    "LowSecurity" => LowSecurity,
    "MediumSecurity" => MediumSecurity,
    "HighSecurity" => HighSecurity,
    # SigningPolicy is not intended for use by `gem -P` so do not list it
  }.freeze
end
rubygems/rubygems/validator.rb000064400000007205150403134170012552 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "package"
require_relative "installer"

##
# Validator performs various gem file and gem database validation

class Gem::Validator
  include Gem::UserInteraction

  def initialize # :nodoc:
    require "find"
  end

  private

  def find_files_for_gem(gem_directory)
    installed_files = []

    Find.find gem_directory do |file_name|
      fn = file_name[gem_directory.size..file_name.size - 1].sub(%r{^/}, "")
      installed_files << fn unless
        fn.empty? || fn.include?("CVS") || File.directory?(file_name)
    end

    installed_files
  end

  public

  ##
  # Describes a problem with a file in a gem.

  ErrorData = Struct.new :path, :problem do
    def <=>(other) # :nodoc:
      return nil unless self.class === other

      [path, problem] <=> [other.path, other.problem]
    end
  end

  ##
  # Checks the gem directory for the following potential
  # inconsistencies/problems:
  #
  # * Checksum gem itself
  # * For each file in each gem, check consistency of installed versions
  # * Check for files that aren't part of the gem but are in the gems directory
  # * 1 cache - 1 spec - 1 directory.
  #
  # returns a hash of ErrorData objects, keyed on the problem gem's name.
  #--
  # TODO needs further cleanup

  def alien(gems=[])
    errors = Hash.new {|h,k| h[k] = {} }

    Gem::Specification.each do |spec|
      unless gems.empty?
        next unless gems.include? spec.name
      end
      next if spec.default_gem?

      gem_name      = spec.file_name
      gem_path      = spec.cache_file
      spec_path     = spec.spec_file
      gem_directory = spec.full_gem_path

      unless File.directory? gem_directory
        errors[gem_name][spec.full_name] =
          "Gem registered but doesn't exist at #{gem_directory}"
        next
      end

      unless File.exist? spec_path
        errors[gem_name][spec_path] = "Spec file missing for installed gem"
      end

      begin
        unless File.readable?(gem_path)
          raise Gem::VerificationError, "missing gem file #{gem_path}"
        end

        good, gone, unreadable = nil, nil, nil, nil

        File.open gem_path, Gem.binary_mode do |_file|
          package = Gem::Package.new gem_path

          good, gone = package.contents.partition do |file_name|
            File.exist? File.join(gem_directory, file_name)
          end

          gone.sort.each do |path|
            errors[gem_name][path] = "Missing file"
          end

          good, unreadable = good.partition do |file_name|
            File.readable? File.join(gem_directory, file_name)
          end

          unreadable.sort.each do |path|
            errors[gem_name][path] = "Unreadable file"
          end

          good.each do |entry, data|
            next unless data # HACK: `gem check -a mkrf`

            source = File.join gem_directory, entry["path"]

            File.open source, Gem.binary_mode do |f|
              unless f.read == data
                errors[gem_name][entry["path"]] = "Modified from original"
              end
            end
          end
        end

        installed_files = find_files_for_gem(gem_directory)
        extras = installed_files - good - unreadable

        extras.each do |extra|
          errors[gem_name][extra] = "Extra file"
        end
      rescue Gem::VerificationError => e
        errors[gem_name][gem_path] = e.message
      end
    end

    errors.each do |name, subhash|
      errors[name] = subhash.map do |path, msg|
        ErrorData.new path, msg
      end.sort
    end

    errors
  end
end
rubygems/rubygems/resolver/lock_set.rb000064400000003253150403134170014230 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

##
# Classes for building C extensions live here.

module Gem::Ext; end

require_relative "ext/build_error"
require_relative "ext/builder"
require_relative "ext/configure_builder"
require_relative "ext/ext_conf_builder"
require_relative "ext/rake_builder"
require_relative "ext/cmake_builder"
require_relative "ext/cargo_builder"
rubygems/rubygems/dependency_list.rb000064400000013064150403134170013736 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "vendored_tsort"
require_relative "deprecate"

##
# Gem::DependencyList is used for installing and uninstalling gems in the
# correct order to avoid conflicts.
#--
# TODO: It appears that all but topo-sort functionality is being duplicated
# (or is planned to be duplicated) elsewhere in rubygems.  Is the majority of
# this class necessary anymore?  Especially #ok?, #why_not_ok?

class Gem::DependencyList
  attr_reader :specs

  include Enumerable
  include Gem::TSort

  ##
  # Allows enabling/rubygems/rubygems/resolver/dependency_request.rb000064400000004402150403134170016310 0ustar00rder, you don't get into as many dependency
  # issues.
  #
  # If there are circular dependencies (yuck!), then gems will be returned in
  # order until only the circular dependents and anything they reference are
  # left.  Then arbitrary gemspecs will be returned until the circular
  # dependency is broken, after which gems will be returned in dependency
  # order again.

  def dependency_order
    sorted = strongly_connected_components.flatten

    result = []
    seen = {}

    sorted.each do |spec|
      if index = seen[spec.name]
        if result[index].version < spec.version
          result[index] = spec
        end
      else
        seen[spec.name] = result.length
        result << spec
      end
    end

    result.reverse
  end

  ##
  # Iterator over dependency_order

  def each(&block)
    dependency_order.each(&block)
  end

  def find_name(full_name)
    @specs.find {|spec| spec.full_name == full_name }
  end

  def inspect # :nodoc:
    format("%s %p>", super[0..-2], map(&:full_name))
  end

  ##
  # Are all the dependencies in the list satisfied?

  def ok?
    why_not_ok?(:quick).empty?
  end

  def why_not_ok?(quick = false)
    unsatisfied = Hash.new {|h,k| h[k] = [] }
    each do |spec|
      spec.runtime_dependencies.each do |dep|
        inst = Gem::Specification.any? do |installed_spec|
          dep.name == installed_spec.name &&
            dep.requirement.satisfied_by?(installed_spec.version)
        end

        unless inst || @specs.find {|s| s.satisfies_requirement? dep }
          unsatisfied[spec.name] << dep
          return unsatisfied if quick
        end
      end
    end

    unsatisfied
  end

  ##
  # It is ok to remove a gemspec from the dependency list?
  #
  # If removing the gemspec creates breaks a currently ok dependency, then it
  # is NOT ok to remove the gemspec.

  def ok_to_remove?(full_name, check_dev=true)
    gem_to_remove = find_name full_name

    # If the state is inconsistent, at least don't crash
    return true unless gem_to_remove

    siblings = @specs.find_all do |s|
      s.name == gem_to_remove.name &&
        s.full_name != gem_to_remove.full_name
    end

    deps = []

    @specs.each do |spec|
      check = check_dev ? spec.dependencies : spec.runtime_dependencies

      check.each do |dep|
     rubygems/rubygems/resolver/local_specification.rb000064400000001446150403134170016421 0ustar00spec]</tt> is an Array of
  # gemspecs that have a dependency satisfied by the named gemspec.

  def spec_predecessors
    result = Hash.new {|h,k| h[k] = [] }

    specs = @specs.sort.reverse

    specs.each do |spec|
      specs.each do |other|
        next if spec == other

        other.dependencies.each do |dep|
          if spec.satisfies_requirement? dep
            result[spec] << other
          end
        end
      end
    end

    result
  end

  def tsort_each_node(&block)
    @specs.each(&block)
  end

  def tsort_each_child(node)
    specs = @specs.sort.reverse

    dependencies = node.runtime_dependencies
    dependencies.push(*node.development_dependencies) if @development

    dependencies.each do |dep|
      specs.each do |spec|
        if spec.satisfies_requirement? dep
     rubygems/rubygems/resolver/api_specification.rb000064400000005364150403134170016103 0ustar00rubygems/rubygems/spec_fetcher.rb000064400000017274150403134170013226 0ustar00# frozen_string_literal: true

require_relative "remote_fetcher"
require_relative "user_interaction"
require_relative "errors"
require_relative "text"
require_relative "name_tuple"

##
# SpecFetcher handles metadata updates from remote gem repositories.

class Gem::SpecFetcher
  include Gem::UserInteraction
  include Gem::Text

  ##
  # Cache of latest specs

  attr_reader :latest_specs # :nodoc:

  ##
  # Sources for this SpecFetcher

  attr_reader :sources # :nodoc:

  ##
  # Cache of all released specs

  attr_reader :specs # :nodoc:

  ##
  # Cache of prerelease specs

  attr_reader :prerelease_specs # :nodoc:

  @fetcher = nil

  ##
  # Default fetcher instance.  Use this instead of ::new to reduce object
  # allocation.

  def self.fetcher
    @fetcher ||= new
  end

  def self.fetcher=(fetcher) # :nodoc:
    @fetcher = fetcher
  end

  ##
  # Creates a new SpecFetcher.  Ordinarily you want to use the default fetcher
  # from Gem::SpecFetcher::fetcher which uses the Gem.sources.
  #
  # If you need to retrieve specifications from a different +source+, you can
  # send it as an argument.

  def initialize(sources = nil)
    @sources = sources || Gem.sources

    @update_cache =
      begin
        File.stat(Gem.user_home).uid == Process.uid
      rescue Errno::EACCES, Errno::ENOENT
        false
      end

    @specs = {}
    @latest_specs = {}
    @prerelease_specs = {}

    @caches = {
      latest: @latest_specs,
      prerelease: @prerelease_specs,
      released: @specs,
    }

    @fetcher = Gem::RemoteFetcher.fetcher
  end

  ##
  #
  # Find and fetch gem name tuples that match +dependency+.
  #
  # If +matching_platform+ is false, gems for all platforms are returned.

  def search_for_dependency(dependency, matching_platform=true)
    found = {}

    rejected_specs = {}

    list, errors = available_specs(dependency.identity)

    list.each do |source, specs|
      if dependency.name.is_a?(String) && specs.respond_to?(:bsearch)
        start_index = (0...specs.length).bsearch {|i| specs[i].name >= dependency.name }
        end_index   = (0...specs.length).bsearch {|i| specs[i].name > dependency.name }
        specs = specs[start_index...end_index] if start_index && end_index
      end

      found[source] = specs.select do |tup|
        ifrubygems/rubygems/resolver/molinillo.rb000064400000000112150403134170014412 0ustar00e, specs|
      specs.each do |tup|
        if yield(tup)
          tuplesrubygems/rubygems/resolver/stats.rb000064400000001667150403134170013572 0ustar00ty array immediately instead.
    return [] if gem_name.length <= 3

    max   = gem_name.size / 2
    names = available_specs(type).first.values.flatten(1)

    min_length = gem_name.length - max
    max_length = gem_name.length + max

    gem_name_with_postfix = "#{gem_name}ruby"
    gem_name_with_prefix = "ruby#{gem_name}"

    matches = names.filter_map do |n|
      len = n.name.length
      # If the gem doesn't support the current platform, bail early.
      next unless n.match_platform?

      # If the length is min_length or shorter, we've done `max` deletions.
      # This would be rejected later, so we skip it for performance.
      next if len <= min_length

      # The candidate name, normalized the same as gem_name.
      normalized_name = n.name.downcase
      normalized_name.tr!("_-", "")

      # If the gem is "{NAME}-ruby" and "ruby-{NAME}", we want to return it.
      # But we already removed hyphens, so we check "{NAME}rubygems/rubygems/resolver/set.rb000064400000002345150403134170013221 0ustar00e = levenshtein_distance gem_name, normalized_name

      # Skip current candidate, if the edit distance is greater than allowed.
      next if distance >= max

      # If all else fails, return the name and the calculated distance.
      [n.name, distance]
    end

    matches = if matches.empty? && type != :prerelease
      suggest_gems_from_name gem_name, :prerelease
    else
      matches.uniq.sort_by {|_name, dist| dist }
    end

    matches.map {|name, _dist| name }.uniq.first(num_results)
  end

  ##
  # Returns a list of gems available for each source in Gem::sources.
  #
  # +type+ can be one of 3 values:
  # :released   => Return the list of all released specs
  # :complete   => Return the list of all specs
  # :latest     => Return the list of only the highest version of each gem
  # :prerelease => Return the list of all prerelease only specs
  #

  def available_specs(type)
    errors = []
    list = {}

    @sources.each_source do |source|
      names = case type
              when :latest
                tuples_for source, :latest
              when :released
                tuples_for source, :released
              when :complete
                names =
                  tuples_for(source, :prerelease, true) +
      rubygems/rubygems/resolver/index_specification.rb000064400000004562150403134170016440 0ustar00alse) # :nodoc:
    @caches[type][source.uri] ||=
      source.load_specs(type).sort_by(&:name)
  rescue Gem::RemoteFetcher::FetchError
    raise unless gracefully_ignore
    []
  end
end
rubygems/rubygems/resolver/lock_set.rb000064400000003237150403134170014232 0ustar00# frozen_string_literal: true

##
# A set of gems from a gem dependencies lockfile.

class Gem::Resolver::LockSet < Gem::Resolver::Set
  attr_reader :specs # :nodoc:

  ##
  # Creates a new LockSet from the given +sources+

  def initialize(sources)
    super()

    @sources = sources.map do |source|
      Gem::Source::Lock.new source
    end

    @specs = []
  end

  ##
  # Creates a new IndexSpecification in this set using the given +name+,
  # +version+ and +platform+.
  #
  # The specification's set will be the current set, and the source will be
  # the current set's source.

  def add(name, version, platform) # :nodoc:
    version = Gem::Version.new version
    specs = [
      Gem::Resolver::LockSpecification.new(self, name, version, @sources, platform),
    ]

    @specs.concat specs

    specs
  end

  ##
  # Returns an Array of IndexSpecification objects matching the
  # DependencyRequest +req+.

  def find_all(req)
    @specs.select do |spec|
      req.match? spec
    end
  end

  ##
  # Loads a Gem::Specification with the given +name+, +version+ and
  # +platform+.  +source+ is ignored.

  def load_spec(name, version, platform, source) # :nodoc:
    dep = Gem::Dependency.new name, version

    found = @specs.find do |spec|
      dep.matches_spec?(spec) && spec.platform == platform
    end

    tuple = Gem::NameTuple.new found.name, found.version, found.platformrubygems/rubygems/resolver/index_set.rb000064400000002646150403134170014414 0ustar00rubygems/rubygems/resolver/dependency_request.rb000064400000004402150403134170016310 0ustar00# frozen_string_literal: true

##
# Used Internally. Wraps a Dependency object to also track which spec
# contained the Dependency.

class Gem::Resolver::DependencyRequest
  ##
  # The wrapped Gem::Dependency

  attr_reader :dependency

  ##
  # The request for this dependency.

  attr_reader :requester

  ##
  # Creates a new DependencyRequest for +dependency+ from +requester+.
  # +requester may be nil if the request came from a user.

  def initialize(dependency, requester)
    @dependency = dependency
    @requester  = requester
  end

  def ==(other) # :nodoc:
    case other
    when Gem::Dependency
      @dependency == other
    when Gem::Resolver::DependencyRequest
      @dependency == other.dependency
    else
      false
    end
  end

  ##
  # Is this dependency a development dependency?

  def development?
    @dependency.type == :development
  end

  ##
  # Does this dependency request match +spec+?
  #
  # Nrubygems/rubygems/resolver/molinillo/lib/molinillo.rb000064400000000545150403134170017170 0ustar00y requested by the user

  def explicit?
    @requester.nil?
  end

  ##
  # Indicate that the request is for a gem requested as a dependency of
  # another gem

  def implicit?
    !explicit?
  end

  ##
  # Return a String indicating who caused this request to be added (only
  # valid for implicit requests)

  def request_context
    @requester ? @requerubygems/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb000064400000000213150403134170021570 0ustar00rubygems/rubygems/resolver/local_specification.rb000064400000001443150rubygems/rubygems/resolver/molinillo/lib/molinillo/errors.rb000064400000014172150403134170020505 0ustar00name: #{name}"

      q.breakable
      q.text "version: #{version}"

      q.breakable
      q.text "platform: #{platform}"

      q.breakable
      q.text "dependencies:"
      q.breakable
      q.pp dependencies

      q.breakable
      q.text "source: #{@source.path}"
    end
  end
end
rubygems/rubygems/resolver/api_specification.rb000064400000005364150403134170016103 0ustar00# frozen_string_literal: true

##
# Represents a specification retrieved via the rubygems.org API.
#
# This is used to avoid loading the full Specification object when all we need
# is the name, version, and dependencies.

class Gem::Resolver::APISpecification < Gem::Resolver::Specification
  ##
  # We assume that all instances of this class are immutable;
  # so avoid duplicated generation for performance.
  @@cache = {}
  def self.new(set, api_data)
    cache_key = [set, api_data]
    cache = @@cache[cache_key]
    return cache if cache
    @@cache[cache_key] = super
  end

  ##
  # Creates an APISpecification for the given +set+ from the rubygems.org
  # +api_data+.
  #
  # See https://guides.rubygems.org/rubygems-org-api/#misc-methods for the
  # format of the +api_data+.

  def initialize(set, api_data)
    super()

    @set = set
    @name = api_data[:name]
    @version = Gem::Version.new(api_data[:number]).freeze
    @platform = Gem::Platform.new(api_data[:platform]).freeze
    @original_platform = api_data[:platform].freeze
    @dependencies = api_data[:dependencies].map do |name, ver|
      Gem::Dependency.new(name, ver.split(/\s*,\s*/)).freeze
    end.freeze
    @required_ruby_version = Gem::Requirement.new(api_data.dig(:requirements, :ruby)).freeze
    @required_rubygems_version = Gem::Requirement.new(api_data.dig(:requirements, :rubygems)).freeze
  end

  def ==(other) # :nodoc:
    self.class === other &&
      @set          == other.set &&
      @name         == other.name &&
      @version      == other.version &&
      @platform     == other.platform
  end

  def hash
    @set.hash ^ @name.hash ^ @version.hash ^ @platform.hash
  end

  def fetch_development_dependencies # :nodoc:
    spec = source.fetch_spec Gem::NameTuple.new @name, @version, @platform

    @dependencies = spec.dependencies
  end

  def installable_platform? # :nodoc:
    Gem::Platform.match_gem? @platform, @name
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[APISpecification", "]" do
      q.breakable
      q.text "name: #{name}"

      q.breakable
      q.text "version: #{version}"

      q.breakable
      q.text "platform: #{platform}"

      q.breakable
      q.text "dependencies:"
      q.breakable
      q.pp @dependencies

      q.breakable
      q.text "set uri: #{@set.dep_uri}"
    end
  end

  ##
  # Fetches a Gem::Specification for this APISpecification.

  def spec # :nodoc:
    @spec ||=
      begin
        tuple = Gem::NameTuple.new @name, @version, @platform
        source.fetch_spec tuple
      rescue Gem::RemoteFetcher::FetchError
        raise if @original_platform == @platform

        tuple = Gem::NameTuple.new @name, @version, @original_platform
        source.fetch_spec tuple
      end
  end

  def source # :nodoc:
    @set.source
  end
end
rubygems/rubygems/resolver/molinillo.rb000064400000000112150403134170014412 0ustar00ustar00rubygems/rubygems/resolver/stats.rb000064400000001667150403134170013572 0ustar00# frozen_string_literal: true

class Gem::Resolver::Stats
  def initialize
    @max_depth = 0
    @max_requirements = 0
    @requirements = 0
    @backtracking = 0
    @iterations = 0
  end

  def record_depth(stack)
    if stack.size > @max_depth
      @max_depth = stack.size
    end
  end

  def record_requirements(reqs)
    if reqs.size > @max_requirements
      @max_requirements = reqs.size
    end
  end

  def requirement!
    @requirements += 1
  end

  def backtracking!
    @backtracking += 1
  end

  def iteration!
    @iterations += 1
  end

  PATTERN = "%20s: %d\n"

  def display
    $stdout.puts "=== Resolver Statisrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb000064400000001251150403134170023235 0ustar00# frozen_string_literal: true

##
# Resolver sets are used to look up specifications (and their
# dependencies) used in resolution.  This set is abstract.

class Gem::Resolver::Set
  ##
  # Set to true to disable network access for this set

  attr_accessor :remote

  ##
  # Errors encountered when resolving gems

  attr_accessor :errors

  ##
  # When true, allows matching of requests to prerelease gems.

  attr_accessor :prerelease

  def initialize # :nodoc:
    @prerelease = false
    @remote     = true
    @errors     = []
  end

  ##
  # The find_all method must be implemented.  It returns all Resolver
  # Specification objects matching the given DependencyRequest +rrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb000064400000012116150403134170024001 0ustar00rubygems/rubygems/resolver/index_specification.rb000064400000004567150403134170016445 0ustar00# frozen_string_literal: true

##
# Represents a possible Specification object returned from IndexSet.  Used to
# delay needed to download full Specification objects when only the +name+
# and +version+ are needed.

class Gem::Resolver::IndexSpecification < Gem::Resolver::Specification
  ##
  # An IndexSpecification is created from the index format described in `gem
  # help generate_index`.
  #
  # The +set+ contains other specifications for this (URL) +source+.
  #
  # The +name+, +version+ and +platform+ are the name, version and platform of
  # the gem.

  def initialize(set, name, version, source, platform)
    super()

    @set = set
    @name = name
    @version = version
    @source = source
    @platform = Gem::Platform.new(platform.to_s)
    @original_platform = platform.to_s

    @spec = nil
  end

  ##
  # The dependencies of the gem for this specification

  def dependencies
    spec.dependencies
  end

  ##
  # The required_ruby_version constraint for this specification
  #
  # A fallback is included because when generated, some marshalled specs have it
  # set to +nil+.

  def required_ruby_version
    spec.required_ruby_version || Gem::Requirement.default
  end

  ##
  # The required_rubygems_version constraint for this specification
  #
  # A fallback is included because the original version of the specification
  # API didn't include that field, so some marshalled specs in the index have it
  # set to +nil+.

  def required_rubygems_version
    spec.required_rubygems_version || Gem::Requirement.default
  end

  def ==(other)
    self.class === other &&
      @name == other.name &&
      @version == other.version &&
      @platform == other.platform
  end

  def hash
    @name.hash ^ @version.hash ^ @platform.hash
  end

  def inspect # :nodoc:
    format("#<%s %s source %s>", self.class, full_name, @source)
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[Index specification", "]" do
      q.breakable
      q.text full_name

      unless @platform == Gem::Platform::RUBY
        q.breakable
        q.text @platform.to_s
      end

      q.breakable
      q.text "source "
      q.pp @source
    end
  end

  ##
  # Fetches a Gem::Specification for this IndexSpecification from the #source.

  def spec # :nodoc:
    @spec ||=
      begin
        tuple = Gem::NameTuple.new @name, @version, @original_platform

        @source.fetch_spec tuple
      end
  end
end
rubygems/rubygems/resolver/index_set.rb000064400000002645150403134170014413 0ustar00# frozen_string_literal: true

##
# The global rubygems pool represented via the traditional
# source index.

class Gem::Resolver::IndexSet < Gem::Resolver::Set
  def initialize(source = nil) # :nodoc:
    super()

    @f =
      if source
        sources = Gem::SourceList.from [source]

        Gem::SpecFetcher.new sources
      else
        Gem::SpecFetcher.fetcher
      end

    @all = Hash.new {|h,k| h[k] = [] }

    list, errors = @f.available_specs :complete

    @errors.concat errors

    list.each do |uri, specs|
      specs.each do |n|
        @all[n.name] << [uri, n]
      end
    end

    @specs = {}
  end

  ##
  # Return an array of IndexSpecification objects matching
  # DependencyRequest +req+.

  def find_all(req)
    res = []

    return res unless @remote

    name = req.dependency.name

    @all[name].each do |uri, n|
      next unless req.match? n, @prerelease
      res << Gem::Resolver::IndexSpecification.new(
        self, n.name, n.version, uri, n.platform
      )
    end

    res
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[IndexSet", "]" do
      q.breakable
      q.text "sources:"
      q.breakable
      q.pp @f.sources

      q.breakable
      q.text "specs:"

      q.breakable

      names = @all.values.flat_map do |tuples|
        tuples.map do |_, tuple|
          tuple.full_name
        end
      end

      q.seplist names do |name|
        q.text name
      end
    end
  end
end
rubygems/rubygems/resolver/molinillo/lib/molinillo.rbrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb000064400000003151150403134170024610 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb000064400000000213150403134170021570 0ustar00ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/errors.rb000064400000014172150403134170020505 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb000064400000001642150403134170023743 0ustar00X) standard open-source software
  # license identifiers
  LICENSE_IDENTIFIERS = %w[
    0BSD
    AAL
    ADSL
    AFL-1.1
    AFL-1.2
    AFL-2.0
    AFL-2.1
    AFL-3.0
    AGPL-1.0
    AGPL-1.0-only
    AGPL-1.0-or-later
    AGPL-3.0
    AGPL-3.0-only
    AGPL-3.0-or-later
    AMDPLPA
    AML
    AMPAS
    ANTLR-PD
    ANTLR-PD-fallback
    APAFML
    APL-1.0
    APSL-1.0
    APSL-1.1
    APSL-1.2
    APSL-2.0
    Abstyles
    Adobe-2006
    Adobe-Glyph
    Afmparse
    Aladdin
    Apache-1.0
    Apache-1.1
    Apache-2.0
    Artistic-1.0
    Artistic-1.0-Perl
    Artistic-1.0-cl8
    Artistic-2.0
    BSD-1-Clause
    BSD-2-Clause
    BSD-2-Clause-FreeBSD
    BSD-2-Clause-NetBSD
    BSD-2-Clause-Patent
    BSD-2-Clause-Views
    BSD-3-Clause
    BSD-3-Clause-Attribution
    BSD-3-Clause-Clear
    BSD-3-Clause-LBNL
    BSD-3-Clause-Modification
    BSD-3-Clause-No-Military-License
    BSD-3-Clause-No-Nuclear-Licensrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb000064400000003004150403134170026451 0ustar00C-BY-NC-ND-1.0
    CC-BY-NC-ND-2.0
    CC-BY-NC-ND-2.5
    CC-BY-NC-ND-3.0
    CC-BY-NC-ND-3.0-IGO
    CC-BY-NC-ND-4.0
    CC-BY-NC-SA-1.0
    CC-BY-NC-SA-2.0
    CC-BY-NC-SA-2.5
    CC-BY-NC-SA-3.0
    CC-BY-NC-SA-4.0
    CC-BY-ND-1.0
    CC-BY-ND-2.0
    CC-BY-ND-2.5
    CC-BY-ND-3.0
    CC-BY-ND-4.0
    CC-BY-SA-1.0
    CC-BY-SA-2.0
    CC-BY-SA-2.0-UK
    CC-BY-SA-2.1-JP
    CC-BY-SA-2.5
    CC-BY-SA-3.0
    CC-BY-SA-3.0-AT
    CC-BY-SA-4.0
    CC-PDDC
    CC0-1.0
    CDDL-1.0
    CDDL-1.1
    CDL-1.0
    CDLA-Permissive-1.0
    CDLA-Sharing-1.0
    CECILL-1.0
    CECILL-1.1
    CECILL-2.0
    CECILL-2.1
    CECILL-B
    CECILL-C
    CERN-OHL-1.1
    CERN-OHL-1.2
    CERN-OHL-P-2.0
    CERN-OHL-S-2.0
    CERN-OHL-W-2.0
    CNRI-Jython
    CNRI-Python
    CNRI-Python-GPL-Compatible
    CPAL-1.0
    CPL-1.0
    CPOL-1.02
    CUA-OPL-1.0
    Caldera
    ClArtistic
    Condor-1.1
    Crossword
    CrystalStacker
    Cube
    D-FSL-1.0
    DOC
    DRL-1.0
    DSDP
    Dotseqn
    ECL-1.0
    ECL-2.0
    EFL-1.0
    EFL-2.0
    EPICS
    EPL-1.0
    EPL-2.0
    EUDatagrid
    EUPL-1.0
    EUPL-1.1
    EUPL-1.2
    Entessa
    ErlPL-1.1
    Eurosym
    FSFAP
    FSFUL
    FSFULLR
    FTL
    Fair
    Frameworx-1.0
    FreeBSD-DOC
    FreeImage
    GD
    GFDL-1.1
    GFDL-1.1-invariants-only
    GFDL-1.1-invariants-or-later
    GFDL-1.1-no-invariants-only
    GFDL-1.1-no-invariants-or-later
    GFDL-1.1-only
    GFDL-1.1-or-later
    GFDL-1.2
    GFDL-1.2-invariants-only
    GFDL-1.2-invariants-or-later
    GFDL-1.2-nrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb000064400000003450150403134170024713 0ustar00-1.2
    LAL-1.3
    LGPL-2.0
    LGPL-2.0+
    LGPL-2.0-only
    LGPL-2.0-or-later
    LGPL-2.1
    LGPL-2.1+
    LGPL-2.1-only
    LGPL-2.1-or-later
    LGPL-3.0
    LGPL-3.0+
    LGPL-3.0-only
    LGPL-3.0-or-later
    LGPLLR
    LPL-1.0
    LPL-1.02
    LPPL-1.0
    LPPL-1.1
    LPPL-1.2
    LPPL-1.3a
    LPPL-1.3c
    Latex2e
    Leptonica
    LiLiQ-P-1.1
    LiLiQ-R-1.1
    LiLiQ-Rplus-1.1
    Libpng
    Linux-OpenIB
    MIT
    MIT-0
    MIT-CMU
    MIT-Modern-Variant
    MIT-advertising
    MIT-enna
    MIT-feh
    MIT-open-group
    MITNFA
    MPL-1.0
    MPL-1.1
    MPL-2.0
    MPL-2.0-no-copyleft-exception
    MS-PL
    MS-RL
    MTLL
    MakeIndex
    MirOS
    Motosoto
    MulanPSL-1.0
    MulanPSL-2.0
    Multics
    Mup
    NAIST-2003
    NASA-1.3
    NBPL-1.0
    NCGL-UK-2.0
    NCSA
    NGPL
    NIST-PD
    NIST-PD-fallback
    NLOD-1.0
    NLPL
    NOSL
    NPL-1.0
    NPL-1.1
    NPOSL-3.0
    NRL
    NTP
    NTP-0
    Naumen
    Net-SNMP
    NetCDF
    Newsletr
    Nokia
    Noweb
    Nunit
    O-UDA-1.0
    OCCT-PL
    OCLC-2.0
    ODC-By-1.0
    ODbL-1.0
    OFL-1.0
    OFL-1.0-RFN
    OFL-1.0-no-RFN
    OFrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb000064400000001251150403134170023235 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb000064400000003565150403134170026570 0ustar00  W3C-20150513
    WTFPL
    Watcom-1.0
    Wsuipa
    X11
    XFree86-1.1
    XSkat
    Xerox
    Xnet
    YPL-1.0
    YPL-1.1
    ZPL-1.1
    ZPL-2.0
    ZPL-2.1rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb000064400000012116150403134170024001 0ustar00-CC-1.0
    LGPL-3.0-linking-exception
    LLVM-exception
    LZMA-exception
    Libtool-exception
    Linux-syscall-note
    Nokia-Qt-exception-1.1
    OCCT-exception-1.0
    OCaml-LGPL-linking-exception
    OpenJDK-assembly-exception-1.0
    PS-or-PDF-font-exception-20170817
    Qt-GPL-exception-1.0
    Qt-LGPL-exception-1.1
    Qwt-exception-1.0
    SHL-2.0
    SHL-2.1
    Swift-exception
    Universal-FOSS-exception-1.0
    WxWindows-exception-3.1
    eCos-exception-2.0
    freertos-exception-2.0
    gnu-javamail-exception
    i2p-gpl-java-exception
    mif-exception
    openvpn-openssl-exception
    u-boot-exception-2.0
  ].freeze

  REGEXP = %r{
    \A
    (?:
      #{Regexp.union(LICENSE_IDENTIFIERS)}
      \+?
      (?:\s WITH \s #{Regexp.union(EXCEPTION_IDENTIFIERS)})?
      | #{NONSTANDARD}
      | #{LICENSE_REF}
    )
    \Z
  }ox.freeze

  def self.match?(licenrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb000064400000007045150403134170023252 0ustar00ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require "uri"
require_relative "../rubygems"

##
# Mixin methods for local and remote Gem::Command options.

module Gem::LocalRemoteOptions

  ##
  # Allows Gem::OptionParser to handle HTTP URIs.

  def accept_uri_http
    Gem::OptionParser.accept URI::HTTP do |value|
      begin
        uri = URI.parse value
      rescue URI::InvalidURIError
        raise Gem::OptionParser::InvalidArgument, value
      end

      valid_uri_schemes = ["http", "https", "file", "s3"]
      unless valid_uri_schemes.include?(uri.scheme)
        msg = "Invalid uri scheme for #{value}\nPreface URLs with one of #{valid_uri_schemes.map {|s| "#{s}://" }}"
        raise ArgumentError, msg
      end

      value
    end
  end

  ##
  # Add local/remote options to the command line parser.

  def add_local_remote_options
    add_option(:"Local/Remote", "-l", "--local",
               "Restrict operations to the LOCAL domain") do |value, options|
      options[:domain] = :local
    end

    add_option(:"Local/Remote", "-r", "--remote",
      "Restrict operations to the REMOTE domain") do |value, options|
      options[:domain] = :remote
    end

    add_option(:"Local/Remote", "-b", "--both",
               "Allow LOCAL and REMOTE operations") do |value, options|
      options[:domain] = :both
    end

    add_bulk_threshold_option
    add_clear_sources_option
    add_source_option
    add_proxy_option
    add_update_sources_option
  end
rubygems/rubygems/specification_policy.rb000064400000033454150403134210014764 0ustar00options[:http_proxy]
    end
  end

  ##
  # Add the --source option

  def add_source_option
    accept_uri_http

    add_option(:"Local/Remote", "-s", "--source URL", URI::HTTP,
               "Append URL to list of remote gem sources") do |source, options|
      source << "/" if source !~ /\/\z/

      if options.delete :sources_cleared
        Gem.sources = [source]
      else
        Gem.sources << source unless Gem.sources.include?(source)
      end
    end
  end

  ##
  # Add the --update-sources option

  def add_update_sources_option
    add_option(:Deprecated, "-u", "--[no-]update-sources",
               "Update local source cache") do |value, options|
      Gem.configuration.update_sources = value
    end
  end

  ##
  # Is fetcrubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb000064400000002135150403134170024770 0ustar00ustar00# frozen_string_literal: true

require_relative "user_interaction"

class Gem::SpecificationPolicy
  include Gem::UserInteraction

  VALID_NAME_PATTERN = /\A[a-zA-Z0-9\.\-\_]+\z/.freeze # :nodoc:

  SPECIAL_CHARACTERS = /\A[#{Regexp.escape('.-_')}]+/.freeze # :nodoc:

  VALID_URI_PATTERN = %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z}.freeze # :nodoc:

  METADATA_LINK_KEYS = %w[
    bug_tracker_uri
    changelog_uri
    documentation_uri
    homepage_uri
    mailing_list_uri
    source_code_uri
    wiki_uri
    funding_uri
  ].freeze # :nodoc:

  def initialize(specification)
    @warnings = 0

    @specification = specification
  end

  ##
  # If set to true, run packaging-specific checks, as well.

  attr_accessor :packaging

  ##
  # Does a srubygems/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb000064400000006320150403134170025654 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb000064400000001642150403134170023743 0ustar00nd

  ##
  # Implementation for Specification#validate_metadata

  def validate_metadata
    metadata = @specification.metadata

    unless Hash === metadata
      error "metadata must be a hash"
    end

    metadata.each do |key, value|
      entry = "metadata['#{key}']"
      if !key.kind_of?(String)
        error "metadata keys must be a String"
      end

      if key.size > 128
        error "metadata key is too large (#{key.size} > 128)"
      end

      if !value.kind_of?(String)
        error "#{entry} value must be a String"
      end

      if value.size > 1024
        error "#{entry} value is too large (#{value.size} > 1024)"
      end

      if METADATA_LINK_KEYS.include? key
        if value !~ VALID_URI_PATTERN
          error "#{entry} has invalid link: #{value.inspect}"
        end
      end
    end
  end

  ##
  # Checks that no duplicate dependencies are specified.

  def validate_duplicate_dependerubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb000064400000003004150403134170026451 0ustar00messages.join
    end
  end

  ##
  # Checks that the gem does not depend on itself.
  # Checks that dependencies use requirements as we recommend.  Warnings are
  # issued when dependencies are open-ended or overly strict for semantic
  # versioning.

  def validate_dependencies # :nodoc:
    warning_messages = []
    @specification.dependencies.each do |dep|
      if dep.name == @specification.name # warn on self reference
        warning_messages << "Self referencing dependency is unnecessary and strongly discouraged."
      end

      prerelease_dep = dep.requirements_list.any? do |req|
        Gem::Requirement.new(req).prerelease?
      end

      warning_messages << "prerelease dependency on #{dep} is not recommended" if
          prerelease_dep && !@specification.version.prerelease?

      open_ended = dep.requirement.requirements.all? do |op, version|
        !version.prerelease? && (op == ">" || op == ">=")
      end

      if open_ended
        op, dep_version = dep.requirement.requirements.first

        segments = dep_version.segments

        base = segments.first 2

        recommendation = if (op == ">" || op == ">=") && segments == [0]
          "  use a bounded requirement, such as '~> x.y'"
    rubygems/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb000064400000003653150403134170024533 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb000064400000003450150403134170024713 0ustar00      @specification.instance_variable_get("@#{attrname}").nil?
    end
    return if nil_attributes.empty?
    error "#{nil_attributes.join ', '} must not be nil"
  end

  def validate_rubygems_version
    return unless packaging

    rubygems_version = @specification.rubygems_version

    return if rubygems_version == Gem::VERSION

    error "expected RubyGems version #{Gem::VERSION}, was #{rubygems_version}"
  end

  def validate_required_attributes
    Gem::Specification.required_attributes.each do |symbol|
      unless @specification.send symbol
        error "missing value for attribute #{symbol}"
      end
    end
  end

  def validate_name
    name = @specification.name

    if !name.is_a?(String)
      error "invalid value for attribute name: \"#{name.inspect}\" must be a string"
    elsif name !~ /[a-zA-Z]/
      error "invalid value for attribute name: #{name.dump} must include at least one letter"
    elsif name !~ VALID_NAME_PATTERN
      error "invalid value for attribute name: #{name.dump} can only include letters, numbers, dashes, and underscores"
    elsif name =~ SPECIAL_CHARACTERS
      error "invalid value for attribute name: #{name.dump} can not begin with a period, dash, or underscore"
    end
  end

  def validate_require_paths
    return unless @specification.raw_require_paths.empty?

    error "specification must have at least one require_path"
  end

  def validate_non_files
    return unless packagingrubygems/rubygems/resolver/molinillo/lib/molinillo/resolver.rb000064400000003045150403134170021027 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb000064400000003565150403134170026570 0ustar00cies then
      Gem::Dependency
    else
      String
    end

    unless Array === val && val.all? {|x| x.kind_of?(klass) }
      error "#{field} must be an Array of #{klass}"
    end
  end

  def validate_authors_field
    return unless @specification.authors.empty?

    error "authors may not be empty"
  end

  def validate_licenses_length
    licenses = @specification.licenses

    licenses.each do |license|
      if license.length > 64
        error "each license must be 64 characters or less"
      end
    end
  end

  def validate_licenses
    licenses = @specification.licenses

    licenses.each do |license|
      if !Gem::Licenses.match?(license)
        suggestions = Gem::Licenses.suggestions(license)
        message = <<-WARNING
license value '#{license}' is invalid.  Use a license identifier from
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
        WARNING
        message += "Did you mean #{suggestions.map {|s| "'#{s}'" }.join(', ')}?\n" unless suggestions.nil?
        warning(message)
      rubygems/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb000064400000003321150403134170021250 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb000064400000007045150403134170023252 0ustar00 and summary are identical"
    end

    # TODO: raise at some given date
    warning "deprecated autorequire specified" if @specification.autorequire

    @specification.executables.each do |executable|
      validate_shebang_line_in(executable)
    end

    @specification.files.select {|f| File.symlink?(f) }.each do |file|
      warning "#{file} is a symlink, which is not supported on all platforms"
    end
  end

  def validate_attribute_present(attribute)
    value = @specification.send attribute
    warning("no #{attribute} specified") if value.nil? || value.empty?
  end

  def validate_shebang_linerubygems/rubygems/uninstaller.rb000064400000024315150403134210013121 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb000064400000010147150403134170025371 0ustar00e" }

    warning <<-WARNING if rake_extension && !rake_dependency
You have specified rake based extension, but rake is not added as dependency. It is recommended to add rake as a dependency in gemspec since there's no guarantee rake will be already installed.
    WARNING
  end

  def warning(statement) # :nodoc:
    @warnings += 1

    alert_warning statement
  end

  def error(statement) # :nodoc:
    raise Gem::InvalidSpecificationException, statement
  ensure
    alert_warning help_text
  end

  def help_text # :nodoc:
    "See https://guides.rubygems.org/specification-reference/ for help"
  end
end
rubygems/rubygems/uninstaller.rb000064400000024315150403134210013121 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require "fileutils"
require_relative "../rubygems"
require_relative "irubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb000064400000002135150403134170024770 0ustar00      = gem
    @version            = options[:version] || Gem::Requirement.default
    @gem_home           = File.realpath(options[:install_dir] || Gem.dir)
    @plugins_dir        = Gem.plugindir(@gem_home)
    @force_executables  = options[:executables]
    @force_all          = options[:all]
    @force_ignore       = options[:ignore]
    @bin_dir            = options[:bin_dir]
    @format_executable  = options[:format_executable]
    @abort_on_dependent = options[:abort_on_dependent]

    # Indicate if development dependencies should be checked when
    # uninstalling. (default: false)
    #
    @check_dev = options[:check_dev]

    if options[:force]
      @force_all = true
      @force_ignore = true
    end

    # only add user directory if install_dir is not set
    @user_install = false
    @user_install = options[:user_install] unless options[:install_dir]

    # Optimization: populated during #uninstall
    @default_specs_matching_uninstall_params = []
  end

  ##
  # Performs the uninstall of the gem.  This removes the spec, the Gem
  # directory, and the cached .gem file.

  def uninstallrubygems/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb000rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb000064400000103243150403134170021372 0ustar00tall_gem list[index]
      else
        say "Error: must enter a number [1-#{list.size + 1}]"
      end
    else
      uninstall_gem list.first
    end
  end

  ##
  # Uninstalls gem +spec+

  def uninstall_gem(spec)
    @spec = spec

    unless dependencies_ok? spec
      if abort_on_dependent? || !ask_if_ok(spec)
        raise Gem::DependencyRemovalException,
          "Uninstallation aborted due to dependent gem(s)"
      end
    end

    Gem.pre_uninstall_hooks.each do |hook|
      hook.call self
    end

    remove_executables @spec
    remove_plugins @spec
    remove @spec

    regenerate_plugins

    Gem.post_uninstall_hooks.each do |hook|
      hook.call self
    end

    @spec = nil
  end

  ##
  # Removes installed executables and batch files (windows only) for +spec+.

  def remove_executables(spec)
    return if spec.executables.empty?

    executables = spec.executables.clone

    # Leave any executables created by other installed versions
    # of this gem installed.

    list = Gem::Specification.find_all do |s|
      s.name == spec.name && s.version != spec.version
    end

    list.each do |s|
      s.executables.each do |exe_name|
        executables.delete exe_name
      end
    end

    return if executables.empty?

    executables = executables.map {|exec| formatted_program_filename exec }

    remove = if @force_executables.nil?
      ask_yes_no("Remove executables:\n" +
                 "\t#{executables.join ', '}\n\n" +
                 "in addition to the gem?",
                 true)
    else
      @force_executables
    end

    if remove
      bin_dir = @bin_dir || Gem.bindir(spec.base_dir)

      raise Gem::FilePermissionError, bin_dir unless File.writable? bin_dir

      executables.each do |exe_name|
        say "Removing #{exe_name}"

        exe_file = File.join bin_dir, exe_name

        safe_delete { FileUtils.rm exe_file }
        safe_delete { FileUtils.rm "#{exe_file}.bat" }
      end
    else
      say "Executables and scripts will remain installed."
    end
  end

  ##
  # Removes all gems in +list+.
  #
  # NOTE: removes uninstalled gems from +list+.

  def remove_all(list)
    list.each {|spec| uninstall_gem spec }
  end

  ##
  # spec:: the spec of the gem to be uninstalled

  def remove(spec)
    unless path_ok?(@gem_home, spec) ||
           (@user_install && path_ok?(Gem.user_dir, spec))
      e = Gem::GemNotInHomeException.new \
            "Gem '#{spec.full_name}' is not installed in directory #{@gem_home}"
      e.spec = spec

      raise e
    end

    raise Gem::FilePermissionError, spec.base_dir unless
      File.writable?(spec.base_dir)

    safe_delete { FileUtils.rm_r spec.full_gem_path }
    safe_delete { FileUtils.rm_r spec.extension_dir }

    old_platform_name rubygems/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb000064400000003653150403134170024533 0ustar00pec.name)
    return if latest.nil?

    regenerate_plugins_for(latest, @plugins_dir)
  end

  ##
  # Is +spec+ in +gem_dir+?

  def path_ok?(gem_dir, spec)
    full_path     = File.join gem_dir, "gems", spec.full_name
    original_path = File.join gem_dir, "gems", spec.original_name

    full_path == spec.full_gem_path || original_path == spec.full_gem_path
  end

  ##
  # Returns true if it is OK to remove +spec+ or this is a forced
  # uninstallation.

  def dependencies_ok?(spec) # :nodoc:
    return true if @force_ignore

    deplist = Gem::DependencyList.from_specs
    deplist.ok_to_remove?(spec.full_name, @check_dev)
  end

  ##
  # Should the uninstallation abort if a dependency will go unsatisfied?
  #
  # See ::new.

  def abort_on_dependent? # :nodoc:
    @abort_on_dependent
  end

  ##
  # Asks if it is OK to remove +spec+.  Returns true if it is OK.

  def ask_if_ok(spec) # :nodoc:
    msg = [""]
    msg << "You have requested to uninstall the gem:"
    msg << "\t#{spec.full_name}"
    msg << ""

   rubygems/rubygems/uri_formatter.rb000064400000001415150403134210013437 0ustar00staller"
      Gem::Installer.exec_format % File.basename(filename)
    else
      filename
    end
  end

  def safrubygems/rubygems/resolver/molinillo/lib/molinillo/resolver.rb000064400000003045150403134170021027 0ustar00y default gems are `==` to the given `spec`.
  def default_spec_matcrubygems/rubygems/package/tar_reader/entry.rb000064400000010467150403134210015430 0ustar00rubygems/rubygems/uri_formatter.rb000064400000001415150403134210013437 0ustar00# frozen_string_literal: true

##
# The UriFormatter handles URIs from user-input and escaping.
#
#   uf = Gem::UriFormatter.new 'example.com'
#
#   p uf.normalize #=> 'http://example.com'

class Gem::UriFormatter
  ##
  # The URI to be frubygems/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb000064400000003321150403134170021250 0ustar00ustar00# frozen_string_literal: true

#++
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See LICENSE.txt for additional licensing information.
#--

##
# Class for reading entries out of a tar file

class Gem::Package::TarReader::Entry
  ##
  # Creates a new tar entry for +header+ that will be read from +io+
  # If a block is given, the entry is yielded and then closed.

  def self.open(header, io, &block)
    entry = new header, io
    return entry unless block_given?
    begin
      yield entry
    ensure
      entry.close
    end
  end

  ##
  # Header for this tar entry

  attr_reader :header

  ##
  # Creates a new tar entry for +header+ that will be read from +io+

  def initialize(header, io)
    @closed = false
    @header = header
    @io = io
    @orig_pos = @io.pos
    @end_pos = @orig_pos + @header.size
    @read = 0
  end

  def check_closed # :nodoc:
    raise IOError, "closed #{self.class}" if closed?
  end

  ##
  # Number of bytes read out of the tar entry

  def bytes_read
    @read
  end

  ##
  # Closes the tar entry

  def close
    return if closed?
    # Seek to the end of the entry if it wasn't fully read
    seek(0, IO::SEEK_END)
    # discard trailing zeros
    skip = (512 - (@header.size % 512)) % 512
    @io.read(skip)
    @closed = true
    nil
  end

  ##
  # Is the tar entry closed?

  def closed?
    @closed
  end

  ##
  # Are we at the end of the tar entry?

  def eof?
    chrubygems/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb000064400000010147150403134170025371 0ustar00= "2"
  end

  ##
  # The position in the tar entry

  def pos
    check_closed

    bytes_read
  end

  ##
  rubygems/rubygems/package/tar_reader.rb000064400000003300150403134210014253 0ustar00@io.readpartial(max_read, outbuf)
    @read += outbuf.size

    outbuf
  end

  ##
  # Seeks to +offset+ bytes into the tar file entry
  # +whence+ can be IO::SEEK_SET, IO::SEEK_CUR, or IO::SEEK_END

  def seek(offset, whence = IO::SEEK_SET)
    check_closed

    new_pos =
      case whence
      when IO::SEEK_SET then @orig_pos + offset
      when IO::SEEK_CUR then @io.pos + offset
      when IO::SEEK_END then @end_pos + offset
      else
        raise ArgumentError, "invalid whence"
      end

    if new_pos < @orig_pos
      new_pos = @orig_pos
    elsif new_pos > @end_pos
      new_pos = @end_pos
    end

    pending = new_pos - @io.pos

    if @io.respond_to?(:seek)
      begin
        # avoid reading if the @io supports seeking
        @io.seek new_pos, IO::SEEK_SET
        pending = 0
      rescue Errno::EINVAL
      end
    end

    # if seeking isn't supported or failed
    # negative seek requires that we rewind and read
    if pending < 0
      @io.rewind
      pending = new_pos
    end

    while pending > 0 do
      size_read = @io.read([pending, 4096].min).size
      raise UnexpectedEOF if @io.eof?
      pending -= size_read
    end

    @read = @io.pos - @orig_pos

    0
  end

  ##
  # Rewinds to the beginning of the tar file entry

  def rewind
    check_closed
    seek(0, IO::SEEK_SET)
  end
end
rubygems/rubygems/package/tar_reader.rb000064400000003300150403134210014253 0rubygems/rubygems/package/tar_writer.rb000064400000017013150403134210014333 0ustar00k_given?

    begin
      yield reader
    ensure
      reader.close
    end

    nil
  end

  ##
  # Creates a new tar file reader on +io+ which needs to respond to #pos,
  # #eof?, #read, #getc and #pos=

  def initialize(io)
    @io = io
    @init_pos = io.pos
  end

  ##
  # Close the tar file

  def close
  end

  ##
  # Iterates over files in the tarball yielding each entry

  def each
    return enum_for __method__ unless block_given?

    until @io.eof? do
      header = Gem::Package::TarHeader.from @io
      return if header.empty?
      entry = Gem::Package::TarReader::Entry.new header, @io
      yield entry
      entry.close
    end
  end

  alias each_entry each

  ##
  # NOTE: Do not call #rewind during #each

  def rewind
    if @init_pos == 0
      @io.rewind
    else
      @io.pos = @init_rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb000064400000103243150403134170021372 0ustar00ustar00# frozen_string_literal: true

#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See LICENSE.txt for additional licensing information.
#++

##
# Allows writing of tar files

class Gem::Package::TarWriter
  class FileOverflow < StandardError; end

  ##
  # IO wrapper that allows writing a limited amount of data

  class BoundedStream
    ##
    # Maximum number of bytes that can be written

    attr_reader :limit

    ##
    # Number of bytes written

    attr_reader :written

    ##
    # Wraps +io+ and allows up to +limit+ bytes to be written

    def initialize(io, limit)
      @io = io
      @limit = limit
      @written = 0
    end

    ##
    # Writes +data+ onto the IO, raising a FileOverflow exception if the
    # number of bytes will be more than #limit

    def write(data)
      if data.bytesize + @written > @limit
        raise FileOverflow, "You tried to feed more data than fits in the file."
      end
      @io.write data
      @written += data.bytesize
      data.bytesize
    end
  end

  ##
  # IO wrapper that provides only #write

  class RestrictedStream
    ##
    # Creates a new RestrictedStream wrapping +io+

    def initialize(io)
      @io = io
    end

    ##
    # Writes +data+ onto the IO

    def write(data)
      @io.write data
    end
  end

  ##
  # Creates a new TarWriter, yielding it if a block is given

  def self.new(io)
    writer = super

    return writer unless block_given?

    begin
      yield writer
    ensure
      writer.close
    end

    nil
  end

  ##
  # Creates a new TarWriter that will write to +io+

  def initialize(io)
    @io = io
    @closed = false
  end

  ##
  # Adds file +name+ with permissions +mode+, and yields an IO for writing the
  # file to

  def add_file(name, mode) # :yields: io
    check_closed

    name, prefix = split_name name

    init_pos = @io.pos
    @io.write Gem::Package::TarHeader::EMPTY_HEADER # placeholder for the header

    yield RestrictedStream.new(@io) if block_given?

    size = @io.pos - init_pos - 512

    remainder = (512 - (size % 512)) % 512
    @io.write "\0" * remainder

    final_pos = @io.pos
    @io.pos = init_pos

    header = Gem::Package::TarHeader.new :name => name, :mode => mode,
                                         :size => size, :prefix => prefix,
                                         :mtime => Gem.source_date_epoch

    @io.write header
    @io.pos = final_pos

    self
  end

  ##
  # Adds +name+ with permissions +mode+ to the tar, yielding +io+ for writing
  # the file.  The +digest_algorithm+ is written to a read-only +name+.sum
  # file following the given file contents containing the digest name and
  # hexdigest separated by a tab.
  #
  # The created digest object is returned.

  def add_file_digest(name, mode, digest_algorithms) # :yields: io
    digests = digest_algorithms.map do |digest_algorithm|
      digest = digest_algorithm.new
      digest_name =
        if digest.respond_to? :name
          digest.name
        else
          digest_algorithm.class.name[/::([^:]+)\z/, 1]
        end

      [digest_name, digest]
    end

    digests = Hash[*digests.flatten]

    add_file name, mode do |io|
      Gem::Package::DigestIO.wrap io, digests do |digest_io|
        yield digest_io
      end
    end

    digests
  end

  ##
  # Adds +name+ with permissions +mode+ to the tar, yielding +io+ for writing
  # the file.  The +signer+ is used to add a digest file using its
  # digest_algorithm per add_file_digest and a cryptographic signature in
  # +name+.sig.  If the signer has no key only the checksum file is added.
  #
  # Returns the digest.

  def add_file_signed(name, mode, signer)
    digest_algorithms = [
      signer.digest_algorithm,
      Gem::Security.create_digest("SHA512"),
    ].compact.uniq

    digests = add_file_digest name, mode, digest_algorithms do |io|
      yield io
    end

    signature_digest = digests.values.compact.find do |digest|
      digest_name =
        if digest.respond_to? :name
          digest.name
        else
          digest.class.name[/::([^:]+)\z/, 1]
        end

      digest_name == signer.digest_name
    end

    raise "no #{signer.digest_name} in #{digests.values.compact}" unless signature_digest

    if signer.key
      signature = signer.sign signature_digest.digest

      add_file_simple "#{name}.sig", 0444, signature.length do |io|
        io.write signature
      end
    end

    digests
  end

  ##
  # Add file +name+ with permissions +mode+ +size+ bytes long.  Yields an IO
  # to write the file to.

  def add_file_simple(name, mode, size) # :yields: io
    check_closed

    name, prefix = split_name name

    header = Gem::Package::TarHeader.new(:name => name, :mode => mode,
                                         :size => size, :prefix => prefix,
                                         :mtime => Gem.source_date_epoch).to_s

    @io.write header
    os = BoundedStream.new @io, size

    yield os if block_given?

    min_padding = size - os.written
    @io.write("\0" * min_padding)

    remainder = (512 - (size % 512)) % 512
    @io.write("\0" * remainder)

    self
  end

  ##
  # Adds symlink +name+ with permissions +mode+, linking to +target+.

  def add_symlink(name, target, mode)
    check_closed

    name, prefix = split_name name

    header = Gem::Package::TarHeader.new(:name => name, :mode => mode,
                                         :size => 0, :typeflag => "2",
                                         :linkname => target,
                                         :prefix => prefix,
                                         :mtime => Gem.source_date_eprubygems/rubygems/package/source.rb000064400000000110150403134210013437 0ustar00 TarHeader

  def split_name(name) # :nodoc:
    if name.bytesize > 256
rubygems/rubygems/package/file_source.rb000064400000001142150403134210014444 0ustar00
  end
end
rubygems/rubygems/package/source.rbrubygems/rubygems/package/tar_header.rb000064400000013547150403134210014257 0ustar00rubygems/rubygems/package/file_source.rb000064400000001142150403134210014444 0ustar00# frozen_string_literal: true

##
# The primary source of gems is a file on disk, including all usages
# internal to rubygems.
#
# This is a private class, do not depend on it directly. Instead, pass a path
# object to `Gem::Package.new`.

class Gem::Package::FileSource < Gem::Package::Source # :nodoc: all
  attr_reader :path

  def initialize(path)
    @path = path
  end

  def start
    @start ||= File.read path, 20
  end

  def present?
    File.exist? path
  end

  def with_write_io(&block)
    File.open path, "wb", &block
  end

  def with_read_io(&block)
    File.open path, "rb", &block
  end
end
rubygems/rubygems/package/tar_header.rb000064400000013547150403134210014257 0ustar00# frozen_string_literal: true

#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See LICENSE.txt for additional licensing information.
#++

##
#--
# struct tarfile_entry_posix {
#   char name[100];     # ASCII + (Z unless filled)
#   char mode[8];       # 0 padded, octal, null
#   char uid[8];        # ditto
#   char gid[8];        # ditto
#   char size[12];      # 0 padded, octal, null
#   char mtime[12];     # 0 padded, octal, null
#   char checksum[8];   # 0 padded, octal, null, space
#   char typeflag[1];   # file: "0"  dir: "5"
#   char linkname[100]; # ASCII + (Z unless filled)
#   char magic[6];      # "ustar\0"
#   char version[2];    # "00"
#   char uname[32];     # ASCIIZ
#   char gname[32];     # ASCIIZ
#   char devmajor[8];   # 0 padded, octal, null
#   char devminor[8];   # o padded, octal, null
#   char prefix[155];   # ASCII + (Z unless filled)
# };
#++
# A header for a tar file

class Gem::Package::TarHeader
  ##
  # Fields in the tar header

  FIELDS = [
    :checksum,
    :devmajor,
    :devminor,
    :gid,
    :gname,
    :linkname,
    :magic,
    :mode,
    :mtime,
    :name,
    :prefix,
    :size,
    :typeflag,
    :uid,
    :uname,
    :version,
  ].freeze

  ##
  # Pack format for a tar header

  PACK_FORMAT = "a100" + # name
                "a8"   + # mode
                "a8"   + # uid
                "a8"   + # gid
                "a12"  + # size
                "a12"  + # mtime
                "a7a"  + # chksum
                "a"    + # typeflag
                "a100" + # linkname
                "a6"   + # magic
                "a2"   + # version
                "a32"  + # uname
                "a32"  + # gname
                "a8"   + # devmajor
                "a8"   + # devminor
                "a155"   # prefix

  ##
  # Unpack format for a tar header

  UNPACK_FORMAT = "A100" + # name
                  "A8"   + # mode
                  "A8"   + # uid
                  "A8"   + # gid
                  "A12"  + # size
                  "A12"  + # mtime
                  "A8"   + # checksum
                  "A"    + # typeflag
                  "A100" + # linkname
                  "A6"   + # magic
                  "A2"   + # version
                  "A32"  + # uname
                  "A32"  + # gname
                  "A8"   + # devmajor
                  "A8"   + # devminor
                  "A155"   # prefix

  attr_reader(*FIELDS)

  EMPTY_HEADER = ("\0" * 512).freeze # :nodoc:

  ##
  # Creates a tar header from IO +stream+

  def self.from(stream)
    header = stream.read 512
    empty = (EMPTY_HEADER == header)

    fields = header.unpack UNPACK_FORMAT

    new :name => fields.shift,
        :mode => strict_oct(fields.shift),
        :uid => oct_or_256based(fields.shift),
        :gid => oct_or_256based(fields.shift),
        :size => strict_oct(fields.shift),
        :mtime => strict_oct(fields.shift),
        :checksum => strict_oct(fields.shift),
        :typeflag => fields.shift,
        :linkname => fields.shift,
        :magic => fields.shift,
        :version => strict_oct(fields.shift),
        :uname => fields.shift,
        :gname => fields.shift,
        :devmajor => strict_oct(fields.shift),
        :devminor => strict_oct(fields.shift),
        :prefix => fields.shift,

        :empty => empty
  end

  def self.strict_oct(str)
    return str.strip.oct if str.strip =~ /\A[0-7]*\z/

    raise ArgumentError, "#{str.inspect} is not an octal string"
  end

  def self.oct_or_256based(str)
    # \x80 flags a positive 256-based number
    # \ff flags a negative 256-based number
    # In case we have a match, parse it as a signed binary value
    # in big-endian order, except that the high-order bit is ignored.
    return str.unpack("N2").last if str =~ /\A[\x80\xff]/n
    strict_oct(str)
  end

  ##
  # Creates a new TarHeader using +vals+

  def initialize(vals)
    unless vals[:name] && vals[:size] && vals[:prrubygems/rubygems/package/old.rb000064400000007203150403134210012727 0ustar00other &&
      @checksum == other.checksum &&
      @devmajor == other.devmajor &&
      @devminor == other.devminor &&
      @gid      == other.gid      &&
      @gname    == other.gname    &&
      @linkname == other.linkname &&
      @magic    == other.magic    &&
      @mode     == other.mode     &&
      @mtime    == other.mtime    &&
      @name     == other.name     &&
      @prefix   == other.prefix   &&
      @size     == other.size     &&
      @typeflag == other.typeflag &&
      @uid      == other.uid      &&
      @uname    == other.uname    &&
      @version  == other.version
  end

  def to_s # :nodoc:
    update_checksum
    header
  end

  ##
  # Updates the TarHeader's checksum

  def update_checksum
    header = header " " * 8
    @checksum = oct calculate_checksum(header), 6
  end

  private

  def calculate_checksum(header)
    header.sum(0)
  end

  def header(checksum = @checksum)
    header = [
      name,
      oct(mode, 7),
      oct(uid, 7),
      oct(gid, 7),
      oct(size, 11),
      oct(mtime, 11),
      checksum,
      " ",
      typeflag,
      linkname,
      magic,
      oct(version, 2),
      uname,
      gname,
      oct(devmajor, 7),
      oct(devminor, 7),
      prefix,
    ]

    header = header.pack PACK_FORMAT

    header << ("\0" * ((512 - header.size) % 512))
  end

  def oct(num, len)
    "%0#{len}o" % num
  end
end
rubygems/rubygems/package/old.rb000064400000007203150403134210012727 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/state.rb000064400000003456150403134170020314 0ustar00   = nil
  end

  ##
  # A list of file names contained in this gem

  def contents
    verify

    return @contents if @contents

    @gem.with_read_io do |io|
      read_until_dashes io # spec
      header = file_list io

      @contents = header.map {|file| file["path"] }
    end
  end

  ##
  # Extracts the files in this package into +destination_dir+

  def extract_files(destination_dir)
    verify

    errstr = "Error reading files from gem"

    @gem.with_read_io do |io|
      read_until_dashes io # spec
      header = file_list io
      raise Gem::Exception, errstr unless header

      header.each do |entry|
        full_name = entry["path"]

        destination = install_location full_name, destination_dir

        file_data = String.new

        read_until_dashes io do |line|
          file_data << line
        end

        file_data = file_data.strip.unpack("m")[0]
        file_data = Zlib::Inflate.inflate file_data

        raisrubygems/rubygems/package/io_source.rb000064400000001456150403134210014144 0ustar00rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb000064400000020252150403134170022464 0ustar00
    raise Gem::Exception, "Failed to parse gem specification out of gem file"
  end

  ##
  # Raisesrubygems/rubygems/package/digest_io.rb000064400000002524150403134210014120 0ustar00rubygems/rubygems/package/io_source.rb000064400000001456150403134210014144 0ustar00# frozen_string_literal: true

##
# Supports reading and writing gems from/to a generic IO object.  This is
# useful for other applications built on top of rubygems, such as
# rubygems.org.
#
# This is a private class, do not depend on it directly. Instead, pass an IO
# object to `Gem::Package.new`.

class Gem::Package::IOSource < Gem::Package::Source # :nodoc: all
  attr_reader :io

  def initialize(io)
    @io = io
  end

  def start
    @start ||= begin
      if io.pos > 0
        raise Gem::Package::Error, "Cannot read start unless IO is at start"
      end

      value = io.read 20
      io.rewind
      value
    end
  end

  def present?
    true
  end

  def with_read_io
    yield io
  ensure
    io.rewind
  end

  def with_write_io
    yield io
  ensure
    io.rewind
  end

  def path
  end
end
rubygems/rubygems/mock_gem_ui.rb000064400000002605150403134210013035 0ustar00# frozen_string_literal: true

##
# IO wrapper that creates digests of contents written to the IO it wraps.

class Gem::Package::DigestIO
  ##
  # Collected digests for wrapped writes.
  #
  #   {
  #     'SHA1'   => #<OpenSSL::Digest: [...]>,
  #     'SHA512' => #<OpenSSL::Digest: [...]>,
  #   }

  attr_reader :digests

  ##
  # Wraps +io+ and updates digest for each of the digest algorithms in
  # the +digests+ Hash.  Returns the digests hash.  Example:
  #
  #   io = StringIO.new
  #   digests = {
  #     'SHA1'   => OpenSSL::Digest.new('SHA1'),
  #     'SHA512' => OpenSSL::Digest.new('SHA512'),
  #   }
  #
  #   Gem::Package::DigestIO.wrap io, digests do |digest_io|
  #     digest_io.write "hello"
  #   end
  #
  #   digests['SHA1'].hexdigest   #=> "aaf4c61d[...]"
  #   digests['SHA512'].hexdigest #=> "9b71d224[...]"

  def self.wrap(io, digests)
    digest_io = new io, digests

    yield digest_io

    return digests
  end

  ##
  # Creates a new DigestIO instance.  Using ::wrap is recommended, see the
  # ::wrap documentation for documentation of +io+ and +digests+.

  def initialize(io, digests)
    @io = io
    @digests = digests
  end

  ##
  # Writes +data+ to the underlying IO and updates the digests

  def write(data)
    result = @io.write data

    @digests.each do |_, digest|
      digest << data
    end

    result
  end
end
rubygems/rubygems/defaults.rb000064400000015722150403134210012372 0ustar00# frozen_string_literal: true

require_relative "user_interaction"

##
# This Gem::StreamUI subclass records input and output to StringIO for
# retrieval during tests.

class Gem::MockGemUi < Gem::StreamUI
  ##
  # Raised when you haven't provided enough input to your MockGemUi

  class InputEOFError < RuntimeError
    def initialize(question)
      super "Out of input for MockGemUi on #{question.inspect}"
    end
  end

  class TermError < RuntimeError
    attr_reader :exit_code

    def initialize(exit_code)
      super
      @exit_code = exit_code
    end
  end
  class SystemExitException < RuntimeError; end

  module TTY

    attr_accessor :tty

    def tty?()
      @tty = true unless defined?(@tty)
      @tty
    end

    def noecho
      yield self
    end
  end

  def initialize(input = "")
    require "stringio"
    ins = StringIO.new input
    outs = StringIO.new
    errs = StringIO.new

    ins.extend TTY
    outs.extend TTY
    errs.extend TTY

    super ins, outs, errs, true

    @terminated = false
  end

  def ask(question)
    raise InputEOFError, question if @ins.eof?

    super
  end

  def input
    @ins.string
  end

  def output
    @outs.string
  end

  def error
    @errs.string
  end

  def terminated?
    @terminated
  end

  def terminate_interaction(status=0)
    @terminated = true

    raise TermError, status if status != 0
    raise SystemExitException
  end
end
rubygems/rubygems/defaults.rb000064400000015722150403134210012372 0ustar00# frozen_string_literal: true

module Gem
  DEFAULT_HOST = "https://rubygems.org"

  @post_install_hooks ||= []
  @done_installing_hooks ||= []
  @post_uninstall_hooks ||= []
  @pre_uninstall_hooks  ||= []
  @pre_install_hooks    ||= []

  ##
  # An Array of the default sources that come with RubyGems

  def self.default_sources
    %w[https://rubygems.org/]
  end

  ##
  # Default spec directory path to be used if an alternate value is not
  # specified in the environment

  def self.default_spec_cache_dir
    default_spec_cache_dir = File.join Gem.user_home, ".gem", "specs"

    unless File.exist?(default_spec_cache_dir)
      default_spec_cache_dir = File.join Gem.data_home, "gem", "specs"
    end

    default_spec_cache_dir
  end

  ##
  # Default home directory path to be used if an alternate value is not
  # specified in the environment

  def self.default_dir
    @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"])
  end

  ##
  # Returns binary extensions dir for specified RubyGems base dir or nil
  # if such directory cannot be determined.
  #
  # By default, the binary extensions are located side by side with their
  # Ruby counterparts, therefore nil is returned

  def self.default_ext_dir_for(base_dir)
    nil
  end

  ##
  # Paths where RubyGems' .rb files and bin frubygems/rubygems/resolver/api_set/gem_parser.rb000064400000001250150403134170016170 0ustar00ath "/"
    end
  end

  private_class_method :find_home

  ##
  # The home directory for the user.

  def self.user_home
    @user_home ||= find_home.tap(&Gem::UNTAINT)
  end

  ##
  # Path for gems in the user's home directory

  def self.user_dir
    gem_dir = File.join(Gem.user_home, ".gem")
    gem_dir = File.join(Gem.data_home, "gem") unless File.exist?(gem_dir)
    parts = [gem_dir, ruby_engine]
    ruby_version_dir_name = RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]
    parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
    File.join parts
  end

  ##
  # The path to standard location of the user's configuration dirrubygems/rubygems/resolver/activation_request.rb000064400000005631150403134170016340 0ustar00che"))
  end

  ##
  # The path to standard location of the user's data directory.

  def self.data_home
    @data_home ||= (ENV["XDG_DATA_HOME"] || File.join(Gem.user_home, ".local", "share"))
  end

  ##
  # The path to standard location of the user's state directory.

  def self.state_home
    @state_home ||= (ENV["XDG_STATE_HOME"] || File.join(Gem.user_home, ".local", "state"))
  end

  ##
  # How String Gem paths should be split.  Overridable for esoteric platforms.

  def self.path_separator
    File::PATH_SEPARATOR
  end

  ##
  # Default gem load path

  def self.default_path
    path = []
    path << user_dir if user_home && File.exist?(user_home)
    path << default_dir
    path << vendor_dir if vendor_dir && File.directory?(vendor_dir)
    path
  end

  ##
  # Deduce Ruby's --program-prefix and --program-suffix from its install name

  def self.default_exec_format
    exec_format = RbConfig::CONFIG["ruby_install_name"].sub("ruby", "%s") rescue "%s"

    unless exec_format.include?("%s")
      raise Gem::Exception,
        "[BUG] invalid exec_format #{exec_format.inspect}, no %s"
    end

    exec_format
  end

  ##
  # The default directory for binaries

  def self.default_bindir
    RbConfig::CONFIG["bindir"]
  end

  def self.ruby_engine
    RUBY_ENGINE
  rubygems/rubygems/request_set/lockfile.rb000064400000012714150403134210014714 0ustar00ome, "gem", "gem-public_cert.pem"
    end

    default_cert_path
  end

  ##
  # Install extensions into lib as well as into the extension directory.

  def self.install_extension_in_lib # :nodoc:
    true
  end

  ##
  # Directory where vendor gems are installed.

  def self.vendor_dir # :nodoc:
    if vendor_dir = ENV["GEM_VENDOR"]
      return vendor_dir.dup
rubygems/rubygems/resolver/molinillo/lib/molinillo/state.rb000064400000003456150403134170020314 0ustar00rubygems/rubygems/resolver/lock_specification.rb000064400000003502150403134170016252 0ustar00ustar00# frozen_string_literal: true

##
# Parses a gem.deps.rb.lock file and constructs a LockSet containing the
# dependencies found inside.  If the lock file is missing no LockSet is
# constructed.

class Gem::RequestSet::Lockfile
  ##
  # Raised when a lockfile cannot be parsed

  class ParseError < Gem::Exception
    ##
    # The column where the error was encountered

    attr_reader :column

    ##
    # The line where the error was encountered

    attr_reader :line

    ##
    # The location of the lock file

    attr_reader :path

    ##
    # Raises a ParseError with the given +message+ which was encountered at a
    # +line+ and +column+ while parsing.

    def initialize(message, column, line, path)
      @line   = line
      @column = column
      @path   = path
      super "#{message} (at line #{line} column #{column})"
    end
  end

  ##
  # Creates a new Lockfile for the given +request_set+ and +gem_deps_file+
  # location.

  def self.build(request_set, gem_deps_file, dependencies = nil)
rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb000064400000020252150403134170022464 0ustar00rubygems/rubygems/resolver/git_set.rb000064400000005611150403134170014063 0ustar00  end

  def add_GEM(out, spec_groups) # :nodoc:
    return if spec_groups.empty?

    source_groups = spec_groups.values.flatten.group_by do |request|
      request.spec.source.uri
    end

    source_groups.sort_by {|group,| group.to_s }.map do |group, requests|
      out << "GEM"
      out << "  remote: #{group}"
      out << "  specs:"

      requests.sort_by {|request| request.name }.each do |request|
        next if request.spec.name == "bundler"
        platform = "-#{request.spec.platform}" unless
          Gem::Platform::RUBY == request.spec.platform

        out << "    #{request.name} (#{request.version}#{platform})"

        request.full_spec.dependencies.sort.each do |dependency|
          next if dependency.type == :development

          requirement = dependency.requirement
          out << "      #{dependency.name}#{requirement.for_lockfile}"
        end
      end
      out << nil
    end
  end

  def add_GIT(out, git_requests)
    return if git_requests.empty?

    by_repository_revision = git_requests.group_by do |request|
      source = request.spec.source
      [source.repository, source.rev_parse]
    end

    by_repository_revision.each do |(repository, revision), requests|
      out << "GIT"
      out << "  remote: #{repository}"
      out rubygems/rubygems/request_set/gem_dependency_api.rb000064400000054052150403134210016724 0ustar00ffset = dest[base.size + 1..-1]

      return "." unless offset

      offset
    else
      dest
    end
  end

  def add_PATH(out, path_requests) # :nodoc:
    return if path_requests.empty?

    out << "PATH"
    path_requests.each do |request|
      directory = File.expand_path(request.spec.source.uri)

      out << "  remote: #{relative_path_from directory, @gem_deps_dir}"
      out << "  specs:"
      out << "    #{request.name} (#{request.version})"
    end

    out << nil
  end

  def add_PLATFORMS(out) # :nodoc:
    out << "PLATFORMS"

    platforms = requests.map {|request| request.spec.platform }.uniq

    platforms = platforms.sort_by {|platform| platform.to_s }

    platforms.each do |platform|
      out << "  #{platform}"
    end

    out << nil
  end

  def spec_groups
    requests.group_by {|request| request.spec.class }
  end

  ##
  # The contents of the lock file.

  def to_s
    out = []

    groups = spec_groups

    add_PATH out, groups.delete(Gem::Resolver::VendorSpecification) { [] }

    add_GIT out, groups.delete(Gem::Resolver::GitSpecification) { [] }

    add_GErubygems/rubygems/resolver/composed_set.rb000064400000002275150403134170015114 0ustar00ustar00# frozen_string_literal: true

##
# A semi-compatible DSL for the Bundler Gemfile and Isolate gem dependencies
# files.
#
# To work with both the Bundler Gemfile and Isolate formats this
# implementation takes some liberties to allow compatibility with each, most
# notably in #source.
#
# A basic gem dependencies file will look like the following:
#
#   source 'https://rubygems.org'
#
#   gem 'rails', '3.2.14a
#   gem 'devise', '~> 2.1', '>= 2.1.3'
#   gem 'cancan'
#   gem 'airbrake'
#   gem 'pg'
#
# RubyGems recommends saving this as gem.deps.rb over Gemfile or Isolate.
#
# To install the gems in this Gemfile use `gem install -g` to install it and
# create a lockfile.  The lockfile will ensure that when you make changes to
# your gem dependencies file a minimum amount of change is made to the
# dependencies of your gems.
#
# RubyGems can activate all the gems in your dependencies file at rubygems/rubygems/resolver/best_set.rb000064400000003171150403134170014234 0ustar00 = Gem::Platform.new "x86-mswin32"
  mswin64   = Gem::Platform.new "x64-mswin64"
  x86_mingw = Gem::Platform.new "x86-mingw32"
  x64_mingw = Gem::Platform.new "x64-mingw32"

  PLATFORM_MAP = { # :nodoc:
    :jruby => Gem::Platform::RUBY,
    :jruby_18 => Gem::Platform::RUBY,
    :jruby_19 => Gem::Platform::RUBY,
    :maglev => Gem::Platform::RUBY,
    :mingw => x86_mingw,
    :mingw_18 => x86_mingw,
    :mingw_19 => x86_mingw,
    :mingw_20 => x86_mingw,
    :mingw_21 => x86_mingw,
    :mri => Gem::Platform::RUBY,
    :mri_18 => Gem::Platform::RUBY,
    :mri_19 => Gem::Platform::RUBY,
    :mri_20 => Gem::Platform::RUBY,
    :mri_21 => Gem::Platform::RUBY,
    :mswin => mswin,
    :mswin_18 => mswin,
    :mswin_19 => mswin,
    :mswin_20 => mswin,
    :mswin_21 => mswin,
    :mswin64 => mswin64,
    :mswin64_19 => mswin64,
    :mswin64_20 => mswin64,
    :mswin64_21 => mswin64,
    :rbx => Gem::Platform::RUBY,
    :ruby => Gem::Platform::RUBY,
    :ruby_18 => Gem::Platform::RUBY,
    :ruby_19 => Gem::Platform::RUBY,
    :ruby_20 => Gem::Platform::RUBY,
    :ruby_21 => Gem::Platform::RUBY,
    :truffleruby => Gem::Platform::RUBY,
    :x64_mingw => x64_mingw,
    :x64_mingw_20 => x64_mingw,
    :x64_mingw_21 => x64_mingw,
  }.freeze

  gt_eq_0        = Gem::Requirement.new ">= 0"
  tilde_gt_1_8_0 = Gem::Requirement.new "~> 1.8.0"
  tilde_gt_1_9_0 = Gem::Requirement.new "~> 1.9.0"
  tilde_gt_2_0_0 = Gem::Requirement.new "~> 2.0.0"
  tilde_gt_2_1_0 = Gem::Requirement.new "~> 2.1.0"

  VERSION_MAP = { # :nodoc:
    :jruby => gt_eq_0,
    :jruby_18 => tilde_gt_1_8_0,
    :jruby_19 => tilde_gt_1_9_0,
    :maglev => gt_eq_0,
    :mingw =>rubygems/rubygems/resolver/git_specification.rb000064400000002423150403134170016106 0ustar00rubygems/rubygems/resolver/api_set/gem_parser.rb000064400000001316150403134170016173 0ustar00# frozen_string_literal: true

class Gem::Resolver::APISet::GemParser
  def parse(line)
    version_and_platform, rest = line.split(" ", 2)
    version, platform = version_and_platform.split("-", 2)
    dependencies, requirements = rest.split("|", 2).map! {|s| s.split(",") } if rest
    dependencies = dependencies ? dependencies.map! {|d| parse_dependency(d) } : []
    requirements = requirements ? requirements.map! {|d| parse_dependency(d) } : []
    [version, platform, dependencies, requirements]
  end

  private

  def parse_dependency(string)
    dependency = string.split(":")
    dependency[-1] = dependency[-1].split("&") if dependency.size > 1
    dependency[0] = -dependency[0]
    dependency
  end
end
rubygems/rubygems/resolver/api_set.rb000064400000005532150403134170014053 0ustar00# frozen_string_literal: true

##
# Specifies a Specification object that should be activated.  Also contains a
# dependency that was used to introduce this activation.

class Gem::Resolver::ActivationRequest
  ##
  # The parent request for this activation request.

  attr_reader :request

  ##
  # The specification to be activated.

  attr_reader :spec

  ##
  # Creates a new ActivationRequest that will activate +spec+.  The parent
  # +request+ is used to provide diagnostics in case of conflicts.

  def initialize(spec, request)
    @spec = spec
    @request = request
  end

  def ==(other) # :nodoc:
    case other
    when Gem::Specification
      @spec == other
    when Gem::Resolver::ActivationRequest
      @spec == other.spec
    else
      false
    end
  end

  def eql?(other)
    self == other
  end

  def hash
    @spec.hash
  end

  ##
  # Is this activation request for a development dependency?

  def development?
    @request.development?
  end

  ##
  # Downloads a gem at +path+ and returns the file path.

  def download(path)
    Gem.ensure_gem_subdirectories path

    if @spec.respond_to? :sources
      exception = nil
      path = @spec.sources.find do |source|
        source.download full_spec, path
      rescue exception
      end
      return path      if path
      raise  exception if exception

    elsif @spec.respond_to? :source
      source = @spec.source
      source.download full_spec, path

    else
      source = Gem.sources.first
      source.download full_spec, path
    end
  end

  ##
  # The full name of the specification to be activated.

  def full_name
    name_tuple.full_name
  end

  alias_method :to_s, :full_name

  ##
  # The Gem::Specification for this activation request.

  def full_spec
    Gem::Specification === @spec ? @spec : @spec.spec
  end

  def inspect # :nodoc:
    format("#<%s for %p from %s>", self.class, @spec, @request)
  end

  ##
  # True if the requested gem has already been installed.

  def installed?
    case @spec
    when Gem::Resolver::VendorSpecification then
      true
    else
      this_spec = full_spec

      Gem::Specification.any? do |s|
        s == this_spec && s.base_dir == this_spec.base_dir
      end
    end
  end

  ##
  # The name of this activation request's specification

  def name
    @spec.name
  end

  ##
  # Return the ActivationRequest that contained the dependency
  # that we were activated for.

  def parent
    @request.requester
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[Activation request", "]" do
      q.breakable
      q.pp @spec

      q.breakable
      q.text " for "
      q.pp @request
    end
  end

  ##
  # The version of this activation request's specification

  def version
    @spec.version
  end

  ##
  # The platform of this activation request's specification

  def platform
    @spec.platform
  end

  private

  def name_tuple
    @name_turubygems/rubygems/resolver/source_set.rb000064400000001643150403134170014601 0ustar00# frozen_string_literal: true

##
# The LockSpecification comes from a lockfile (Gem::RequestSet::Lockfile).
#
# A LockSpecification's dependency information is pre-filled from the
# lockfile.

class Gem::Resolver::LockSpecification < Gem::Resolver::Specification
  attr_reader :sources

  def initialize(set, name, version, sources, platform)
    super()

    @name     = name
    @platform = platform
    @set      = set
    @source   = sources.first
    @sources  = sources
    @version  = version

    @dependencies = []
    @spec         = nil
  end

  ##
  # This is a null install as a locked specification is considered installed.
  # +options+ are ignored.

  def install(options = {})
    destination = options[:install_dir] || Gem.dir

    if File.exist? File.join(destination, "specifications", spec.spec_name)
      yield nil
      return
    end

    super
  end

  ##
  # Adds +dependency+ from the lockfile to this rubygems/rubygems/resolver/vendor_specification.rb000064400000001101150403134170016610 0ustar00 is returned

  def spec
    @spec ||= Gem::Specification.find do |spec|
      spec.name == @name && spec.version == @version
    end

    @spec ||= Gem::Specification.new do |s|
      s.name     = @name
      s.version  = @version
      s.platform = @platform

      s.dependencies.concat @dependencies
    end
  end
end
rubygems/rubygems/resolver/git_set.rbrubygems/rubygems/resolver/requirement_list.rb000064400000002530150403134170016015 0ustar00 needing submodules

  attr_reader :need_submodules # :nodoc:

  ##
  # A Hash containing git gem names for keys and a Hash of repository and
  # git commit reference as values.

  attr_reader :repositories # :nodoc:

  ##
  # A hash of gem names to Gem::Resolver::GitSpecifications

  attr_reader :specs # :nodoc:

  def initialize # :nodoc:
    super()

    @need_submodules = {}
    @repositories    = {}
    @root_dir        = Gem.dir
    @specs           = {}
  end

  def add_git_gem(name, repository, reference, submodules) # :nodoc:
    @repositories[name] = [repository, reference]
    @need_submodules[repository] = submodules
  end

  ##
  # Adds and returns a GitSpecification with the given +name+ and +version+
  # which came from a +repository+ at the given +reference+.  If +submodules+
  # is true they are checked out along with the repository.
  #
  # This fills in the prefetch information as enough information about the gem
  # is present in the arguments.

  def add_git_spec(name, version, repository, reference, submodules) # :nodoc:
    add_git_gem name, repository, reference, submodules

    source = Gem::Source::Git.new name, repository, reference
    source.root_dir = @root_dir

    spec = Gem::Specification.new do |s|
      s.name    = name
      s.version = version
    end

    git_spec = Gem::Resolver::GitSpecification.new self, srubygems/rubygems/resolver/vendor_set.rb000064400000003647150403134170014604 0ustar00c
      end
    end
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[GitSet", "]" do
      next if @repositories.empty?
      q.breakable

      repos = @repositories.map do |name, (repository, reference)|
        "#{name}: #{repository}@#{reference}"
      end

      q.seplist repos do |repo|
        q.text repo
      end
    end
  end
end
rubygems/rubygems/resolver/composed_set.rb000064400000002255150403134170015112 0ustar00# frozen_string_literal: true

##
# A ComposedSet allows multiple sets to be queried like a single set.
#
# To create a composed set with any number of sets use:
#
#   Gem::Resolver.compose_sets set1, set2
#
# This method will eliminate nesting of composed sets.

class Gem::Resolver::ComposedSet < Gem::Resolver::Set
  attr_reader :sets # :nodoc:

  ##
  # Creates a new ComposedSet containing +sets+.  Use
  # Gem::Resolver::compose_sets instead.

  def initialize(*sets)
    super()

    @sets = sets
  end

  ##
  # When +allow_prerelease+ is set to +true+ prereleases gems are allowed to
  # match dependencies.

  def prerelease=(allow_prerelease)
    super

    sets.each do |set|
      set.prerelease = allow_prerelease
    end
  end

  ##
  # Sets the remote network access for all composed sets.

  def remote=(remote)
    super

    @sets.each {|set| set.remote = remote }
  end

  def errors
    @errors + @sets.flat_map(&:rubygems/rubygems/resolver/specification.rb000064400000005245150403134170015250 0ustar00rubygems/rubygems/resolver/best_set.rb000064400000001656150403134170014242 0ustar00# frozen_string_literal: true

##
# The BestSet chooses the best available method to query a remote index.
#
# It combines IndexSet and APISet

class Gem::Resolver::BestSet < Gem::Resolver::ComposedSet
  ##
  # Creates a BestSet for the given +sources+ or Gem::sources if none are
  # specified.  +sources+ must be a Gem::SourceList.

  def initialize(sources = Gem.sources)
    super()

    @sources = sources
  end

  ##
  # Picks which sets to use for the configured sources.

  def pick_sets # :nodoc:
    @sources.each_source do |source|
      @sets << source.dependency_resolver_set
    end
  end

  def find_all(req) # :nodoc:
    pick_sets if @remote && @sets.empty?

    super
  end

  def prefetch(reqs) # :nodoc:
    pick_sets if @remote && @sets.empty?

    super
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[BestSet", "]" do
      q.breakable
      q.text "sets:"

      q.breakable
      q.pp @sets
    end
  end
end
rubygems/rubygems/resolver/git_specification.rb000064400000002423150403134170016106 0ustar00# frozen_string_literal: true

##
# A GitSpecification represents a gem that is sourced from a git repository
# and is being loaded through a gem dependencies file through the +git:+
# option.

class Gem::Resolver::GitSpecification < Gem::Resolver::SpecSpecification
  def ==(other) # :nodoc:
    self.class === other &&
      @set  == other.set &&
      @spec == other.spec &&
      @source == other.source
  end

  def add_dependency(dependency) # :nodoc:
    spec.dependencies << dependency
  end

  ##
  # Installing a git gem only involves building the extensions and generating
  # the executables.

  def install(options = {})
    require_relative "../installer"

    inrubygems/rubygems/resolver/spec_specification.rb000064400000002526150403134170016261 0ustar00rubygems/rubygems/resolver/api_set.rb000064400000005724150403134170014056 0ustar00# frozen_string_literal: true

##
# The global rubygems pool, available via the rubygems.org API.
# Returns instances of APISpecification.

class Gem::Resolver::APISet < Gem::Resolver::Set
  autoload :GemParser, File.expand_path("api_set/gem_parser", __dir__)

  ##
  # The URI for the dependency API this APISet uses.

  attr_reader :dep_uri # :nodoc:

  ##
  # The Gem::Source that gems are fetched from

  attr_reader :source

  ##
  # The corresponding place to fetch gems.

  attr_reader :uri

  ##
  # Creates a new APISet that will retrieve gems from +uri+ using the RubyGems
  # API URL +dep_uri+ which is described at
  # https://guides.rubygems.org/rubygems-org-api

  def initialize(dep_uri = "https://index.rubygems.org/info/")
    super()

    dep_uri = Gem::URI dep_uri unless Gem::URI === dep_uri

    @dep_uri = dep_uri
    @uri     = deprubygems/rubygems/resolver/installed_specification.rb000064400000002333150403134170017302 0ustar00emote
    names = reqs.map {|r| r.dependency.name }
    needed = names - @data.keys - @to_fetch

    @to_fetch += needed
  end

  def prefetch_now # :nodoc:
    needed = @to_fetch
    @to_fetch = []

    needed.sort.each do |name|
      versions(name)
    end
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[APISet", "]" do
      q.breakable
      q.text "URI: #{@dep_uri}"

      q.breakable
      q.text "gem names:"
      q.pp @data.keys
    end
  end

  ##
  # Return data for all versions of the gem +name+.

  def versions(name) # :nodoc:
    if @data.key?(name)
      return @data[name]
    end

    uri = @dep_uri + name

    begin
      str = Gem::RemoteFetcher.fetcher.fetch_path uri
    rescue Gem::RemoteFetcher::FetchError
      @data[name] = []
    else
      lines(str).each do |ver|
        number, platform, dependencies, requirements = parse_gem(ver)

        platform ||= "ruby"
        dependencies = dependencies.map {|dep_name, reqs| [dep_name, reqs.join(", ")] }
        requirements = requirements.map {|req_name, reqs| [req_name.to_sym, reqs] }.to_h

        @data[name] << { name: name, number: number, platform: platform, dependencies: dependencies, requirements: requirements }
      end
    end

    @data[rubygems/rubygems/resolver/installer_set.rb000064400000014540150403134170015276 0ustar00# frozen_string_literal: true

##
# The SourceSet chooses the best available method to query a remote index.
#
# Kind off like BestSet but filters the sources for gems

class Gem::Resolver::SourceSet < Gem::Resolver::Set
  ##
  # Creates a SourceSet for the given +sources+ or Gem::sources if none are
  # specified.  +sources+ must be a Gem::SourceList.

  def initialize
    super()

    @links = {}
    @sets  = {}
  end

  def find_all(req) # :nodoc:
    if set = get_set(req.dependency.name)
      set.find_all req
    else
      []
    end
  end

  # potentially no-op
  def prefetch(reqs) # :nodoc:
    reqs.each do |req|
      if set = get_set(req.dependency.name)
        set.prefetch reqs
      end
    end
  end

  def add_source_gem(name, source)
    @links[name] = source
  end

  private

  def get_set(name)
    link = @links[name]
    @sets[link] ||= Gem::Source.new(link).dependency_resolver_set if link
  end
end
rubygems/rubygems/resolver/vendor_specification.rb000064400000001101150403134170016610 0ustar00# frozen_string_literal: true

##
# A VendorSpecification represents a gem that has been unpacked into a project
# and is being loaded through a gem dependencies file through the +path:+
# option.

class Gem::Resolver::VendorSpecification < Gem::Resolver::SpecSpecification
  def ==(other) # :nodoc:
    self.class === other &&
      @set  == other.set &&
      @spec == other.spec &&
      @source == other.source
  end

  ##
  # This is a null install as this gem was unpacked into a directory.
  # +options+ are ignored.

  def install(options = {})
    yield nil
  end
end
rubygems/rubygems/resolver/requirement_list.rb000064400000002530150403134170016015 0ustar00# frozen_string_literal: true

##
# The RequirementList is used to hold the requirements being considered
# while resolving a set of gems.
#
# The RequirementList acts like a queue where the oldest items are removed
# first.

class Gem::Resolver::RequirementList
  include Enumerable

  ##
  # Creates a new RequirementList.

  def initialize
    @exact = []
    @list = []
  end

  def initialize_copy(other) # :nodoc:
    @exact = @exact.dup
    @list = @list.dup
  end

  ##
  # Adds Resolver::DependencyRequest +req+ to this requirements list.

  def add(req)
    if req.requirement.exact?
      @exact.push req
    else
      @list.push req
    end
    req
  end

  ##
  # Enumerates requirements in the list

  def each # :nodoc:
    return enum_for __method__ unless block_given?

    @exact.each do |requirement|
      yield requirement
    end

    @list.each do |requirement|
      yield requirement
    end
  end

  ##
  # How many elements are in the list

  def size
    @exact.size + @list.size
  end

  ##
  # Is the list empty?

  def empty?
    @exact.empty? && @list.empty?
  end

  ##
  # Remove the oldest DependencyRequest from the list.

  def remove
    return @exact.shift unless @exact.empty?
    @list.shift
  end

  ##
  # Returns the oldest five entries from the list.

  def next5
    x = @exact[0,5]
    x + @list[0,5 - x.size]
  end
end
rubygems/rubygems/resolver/vendor_set.rb000064400000003647150403134170014604 0ustar00# frozen_string_literal: true

##
# A VendorSet represents gems that have been unpacked into a specific
# directory that contains a gemspec.
#
# This is used for gem dependency file support.
#
# Example:
#
#   set = Gem::Resolver::VendorSet.new
#
#   set.add_vendor_gem 'rake', 'vendor/rake'
#
# The directory vendor/rake must contain an unpacked rake gem along with a
# rake.gemspec (watching the given name).

class Gem::Resolver::VendorSet < Gem::Resolver::Set
  ##
  # The specifications for this set.

  attr_reader :specs # :nodoc:

  def initialize # :nodoc:
    super()

    @directories = {}
    @specs       = {}
  end

  ##
  # Adds a specification to the set with the given +name+ which has been
  # unpacked into the given +directory+.

  def add_vendor_gem(name, directory) # :nodoc:
    gemspec = File.join directory, "#{name}.gemspec"

    spec = Gem::Specification.load gemspec

    raise Gem::GemNotFoundException,
          "unable to find #{gemspec} for gem #{name}" unless spec

    spec.full_gem_path = File.expand_path directory

    @specs[spec.name]  = spec
    @directories[spec] = directory

    spec
  end

  ##
  # Returns an Array of VendorSpecification objects matching the
  # DependencyRequest +req+.

  def find_all(req)
    @specs.values.select do |spec|
      req.match? spec
    end.map do |spec|
      source = Gem::Source::Vendor.new @dirubygems/rubygems/resolver/conflict.rb000064400000006375150403134170014236 0ustar00rubygems/rubygems/resolver/specification.rb000064400000005245150403134170015250 0ustar00# frozen_string_literal: true

##
# A Resolver::Specification contains a subset of the information
# contained in a Gem::Specification.  Only the information necessary for
# dependency resolution in the resolver is included.

class Gem::Resolver::Specification
  ##
  # The dependencies of the gem for this specification

  attr_reader :dependencies

  ##
  # The name of the gem for this specification

  attr_reader :name

  ##
  # The platform this gem works on.

  attr_reader :platform

  ##
  # The set this specification came from.

  attr_reader :set

  ##
  # The source for this specification

  attr_reader :source

  ##
  # The Gem::Specification for this Resolver::Specification.
  #
  # Implementers, note that #install updates @spec, so be sure to cache the
  # Gem::Specification in @spec when overriding.

  attr_reader :spec

  ##
  # The version of the gem for this specification.

  attr_reader :version

  ##
  # The required_ruby_version constraint for this specification.

  attr_reader :required_ruby_version

  ##
  # The required_ruby_version constraint for this specification.

  attr_reader :required_rubygems_version

  ##
  # Sets default instance variables for the specification.

  def initialize
    @dependencies = nil
    @name         = nil
    @platform     = nil
    @set          = nil
    @source       = nil
    @version      = nil
    @required_ruby_version = Gem::Requirement.default
    @required_rubygems_version = Gem::Requirement.default
  end

  ##
  # Fetches development dependencies if the source does not provide them by
  # default (see APISpecification).

  def fetch_development_dependencies # :nodoc:
  end

  ##
  # The name and version of the specification.
  #
  # Unlike Gem::Specification#full_name, the platform is not included.

  def full_name
    "#{@name}-#{@version}"
  end

  ##
  # Installs this specification using the Gem::Installer +options+.  The
  # install method yields a Gem::Installer instance, which indicates the
  # gem will be installed, or +nil+, which indicates the gem is already
  # installed.
  #
  # After installation #spec is updated to point to the just-installed
  # specification.

  def install(options = {})
    require_relative "../installer"

    gem = download options

    installer = Gem::Installer.at gem, options

    yield installer if block_given?

    @spec = installer.install
  end

  def download(options)
    dir = options[:install_dir] || Gem.dir

    Gem.ensure_gem_subdirectories dir

    source.download spec, dir
  end

  ##
  # Returns true if this specification is installable on this platform.

  def installable_platform?
    Gem::Platform.match_spec? spec
  end

  def local? # :nodoc:
    false
  end
end
rubygems/rubygems/resolver/current_set.rb000064400000000431150403134170014755 0ustar00# frozen_string_literal: true

##
# The Resolver::SpecSpecification contains common functionality for
# Resolver specifications that are backed by a Gem::Specification.

class Gem::Resolver::SpecSpecification < Gem::Resolver::Specification
  ##
  # A SpecSpecification is created frubygems/rubygems/defaults/operating_system.rb000064400000010403150403134170015762 0ustar00 is not included.

  def full_name
    "#{spec.name}-#{spec.version}"
  end

  ##
  # The name of the gem for this specification

  def name
    spec.name
  end

  ##
  # The platform this gem works on.

  def platform
    spec.platform
  end

  ##
  # The version of the gem for this specification.

  def version
    spec.version
  end

  ##
  # The hash value for this specification.

  def hash
    spec.hash
  end
end
rubygems/rubygems/resolver/installed_specification.rb000064400000002330150403134170017277 0ustar00# frozen_string_literal: true

##
# An InstalledSpecification represents a gem that is already installed
# locally.

class Gem::Resolver::InstalledSpecification < Gem::Resolver::SpecSpecification
  def ==(other) # :nodoc:
    self.class === other &&
      @set  == other.set &&
      @spec == other.spec
  end

  ##
  # This is a null install as this specification is already installed.
  # +options+ are ignored.

  def install(options = {})
    yield nil
  end

  ##
  # Returns +true+ if this gem is installable for the current platform.

  def installable_platform?
    # BACKCOMPAT If the file is coming out of a specified file, then we
    # ignore the platform. This code can be removed in RG 3.0.
    return true if @source.is_a? Gem::Source::SpecificFile

    super
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[InstalledSpecification", "]" do
      q.breakable
      q.text "name: #{name}"

      q.breakable
      q.text "version: #{version}"

      q.breakable
      q.text "platform: #{platform}"

      q.breakable
      q.text "dependencies:"
      q.breakable
      q.pp spec.dependencies
    end
  end

  ##
  # The source for this specification

  def source
    @source ||= Gem::Source::Installed.new
  end
end
rubygems/rubygems/resolver/installer_set.rb000064400000014536150403134170015303 0ustar00# frozen_string_literal: true

##
# A set of gems for installation sourced from remote sources and local .gem
# files

class Gem::Resolver::InstallerSet < Gem::Resolver::Set
  ##
  # List of Gem::Specification objects that must always be installed.

  attr_reader :always_install # :nodoc:

  ##
  # Only install gems in the always_install list

  attr_accessor :ignore_dependencies # :nodoc:

  ##
  # Do not look in the installed set when finding specifications.  This is
  # used by the --install-dir option to `gem install`

  attr_accessor :ignore_installed # :nodoc:

  ##
  # The remote_set looks up remote gems for installation.

  attr_reader :remote_set # :nodoc:

  ##
  # Ignore ruby & rubygems specification constraints.
  #

  attr_accessor :force # :nodoc:

  ##
  # Creates a new InstallerSet that will look for gems in +domain+.

  def initialize(domain)
    super()

    @domain = domain

    @f = Gem::SpecFetcher.fetcher

    @always_install      = []
    @ignore_dependencies = false
    @ignore_installed    = false
    @local               = {}
    @local_source        = Gem::Source::Local.new
    @remote_set          = Gem::Resolver::BestSet.new
    @force               = false
    @specs               = {}
  end

  ##
  # Looks up the latest specificatiorubygems/rubygems/ext/build_error.rb000064400000000263150403134170013672 0ustar00        metadata_satisfied?(spec)
      end

      if found_matching_metadata.nil?
        ensure_required_ruby_version_met(newest.spec)
        ensure_required_rubygems_version_mrubygems/rubygems/ext/cmake_builder.rb000064400000000730150403134200014141 0ustar00   dep = req.dependency

    return res if @ignore_dependencies &&
                  @always_install.none? {|spec| dep.match? spec }

    name = dep.name

    dep.matching_specs.each do |gemspec|
      next if @always_install.any? {|spec| spec.name == gemspec.name }

      res << Gem::Resolver::InstalledSpecification.new(self, gemspec)
    end unless @ignore_installed

    matching_local = []

    if consider_local?
      matching_local = @local.values.select do |specrubygems/rubygems/ext/cargo_builder.rb000064400000024510150403134200014156 0ustar00consider_remote? && matching_local.empty?

    res
  end

  def prefetch(reqs)
    @remote_set.prefetch(reqs) if consider_remote?
  end

  def prerelease=(allow_prerelease)
    super

    @remote_set.prerelease = allow_prerelease
  end

  def inspect # :nodoc:
    always_install = @always_install.map(&:full_name)

    format("#<%s domain: %s specs: %p always install: %p>", self.class, @domain, @specs.keys, always_install)
  end

  ##
  # Called from IndexSpecification to get a true Specification
  # object.

  def load_spec(name, ver, platform, source) # :nodoc:
    key = "#{name}-#{ver}-#{platform}"

    @specs.fetch key do
      tuple = Gem::NameTuple.new name, ver, platform

      @specs[key] = source.fetch_spec tuple
    end
  end

  ##
  # Has a local gem for +dep_name+ been added to this set?

  def local?(dep_name) # :nodoc:
    spec, _ = @local[dep_name]

    spec
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[InstallerSet", "]" do
      q.breakable
      q.text "domain: #{@domain}"

      q.breakable
      q.text "specs: "
      q.pp @specs.keys

      q.breakable
      q.text "always install: "
      q.pp @always_install
    end
  end

  def remote=(remote) # :nodoc:
    case @domain
    when :local then
      @domain = :both if remote
    when :remote then
      @domain = nil unless remote
    when :both then
      @domain = :local unless remote
    end
  end

  private

  def metadata_satisfied?(spec)
    spec.required_ruby_version.satisfied_by?(Gem.ruby_version) &&
      spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version)
  end

  def ensure_required_ruby_version_met(spec) # :nodoc:
    if rrv = spec.required_ruby_version
      ruby_version = Gem.ruby_version
      unless rrv.satisfied_by? ruby_version
        raise Gem::RuntimeRequirementNotMetError,
          "#{spec.full_name} requires Ruby version #{rrv}. The current ruby version is #{ruby_version}."
      end
    end
  end

  def ensure_required_rubygems_version_met(spec) # :nodoc:
    if rrgv = spec.required_rubygems_version
      unless rrgv.satisfied_by? Gem.rubygems_version
        rg_version = Gem::VERSION
        raise Gem::RuntimeRequirementNotMetError,
          "#{spec.full_name} requires RubyGems version #{rrgv}. The current RubyGems version is #{rg_version}. " \
          "Try 'gem update --system' to update RubyGems itself."
      end
    end
  end
end
rubygems/rubygems/resolver/conflict.rb000064400000006304150403134170014226 0ustar00# frozen_string_literal: true

##
# Used internally to indicate that a dependency conflicted
# with a spec that would be activated.

class Gem::Resolver::Conflict
  ##
  # The specification that was activated prior to the conflict

  attr_reader :activated

  ##
  # The dependency that is in conflict with the activated gem.

  attr_reader :dependency

  attr_reader :failed_dep # :nodoc:

  ##
  # Creates a new resolver conflict when +dependency+ is in conflict with an
  # already +activated+ specification.

  def initialize(dependency, activated, failed_dep=dependency)
    @dependency = dependency
    @activated = activated
    @failed_dep = failed_dep
  end

  def ==(other) # :nodoc:
    self.class === other &&
      @dependency == other.dependency &&
      @activated  == other.activated  &&
      @failed_dep == other.failed_dep
  end

  ##
  # A string explanation of the conflict.

  def explain
    "<Conflict wanted: #{@failed_dep}, had: #{activated.spec.full_name}>"
  end

  ##
  # Return the 2 dependency objects that conflicted

  def conflicting_dependencies
    [@failed_dep.dependency, @activated.request.dependency]
  end

  ##
  # Explanation of the conflict used by exceptions to print useful messages

  def explanation
    activated   = @activated.spec.full_name
    dependency  = @failed_dep.dependency
    requirement = dependency.requirement
    alternates  = dependency.matching_specs.map(&:full_name)

    unless alternates.empty?
      matching = <<-MATCHING.chomp

  Gems matching %s:
    %s
      MATCHING

      matching = format(matching, dependency, alternates.join(", "))
    end

    explanation = <<-EXPLANATION
  Activated %s
  which does not match conflicting dependency (%s)

  Conflicting dependency chains:
    %s

  versus:
    %s
%s
    EXPLANATION

    format(explanation, activated, requirement, request_path(@activated).reverse.join(", depends on\n    "), request_path(@failed_dep).reverse.join(", depends on\n    "), matching)
  end

  ##
  # Returns true if the conflicting dependency's name matches +spec+.

  def for_spec?(spec)
    @dependency.name == spec.name
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "[Dependency conflict: ", "]" do
      q.breakable

      q.text "activated "
      q.pp @activated

      q.breakable
      q.text " dependency "
      q.pp @dependency

      q.breakable
      if @dependency == @failed_dep
        q.text " failed"
      else
        q.text " failed dependency "
        q.pp @failed_dep
      end
    end
  end

  ##
  # Path of activations from the +current+ list.

  def request_path(current)
    path = []

    while current do
      case current
      when Gem::Resolver::ActivationRequest then
        path <<
          "#{current.request.dependency}, #{current.spec.version} activated"

        current = current.parent
      when Gem::Resolver::DependencyRequest then
        path << current.dependency.to_s

        current = current.requester
      else
        raise Gem::Exception, "[BUG] unknown request class #{current.class}"
      end
    end

    path = ["user request (gem command or Gemfile)"] if path.empty?

    path
  end

  ##
  # Return the Specification that listed the dependency

  def requester
    @failed_dep.requester
  end
end
rubygems/rubygems/resolver/current_set.rb000064400000000431150403134170014755 0ustar00# frozen_string_literal: true

##
# A set which represents the installed gems. Respects
# all the normal settings that control where to look
# for installed gems.

class Gem::Resolver::CurrentSet < Gem::Resolver::Set
  def find_all(req)
    req.dependency.matching_specs
  end
end
rubygems/rubygems/defaults/operating_system.rb000064400000010403150403134170015762 0ustar00module Gem
  class << self

    ##
    # Returns full path of previous but one directory of dir in path
    # E.g. for '/usr/share/ruby', 'ruby', it returns '/usr'

    def previous_but_one_dir_to(path, dir)
      return unless path

      split_path = path.split(File::SEPARATOR)
      File.join(split_path.take_while { |one_dir| one_dir !~ /^#{dir}$/ }[0..-2])
    end
    private :previous_but_one_dir_to

    ##
    # Detects --install-dir option specified on command line.

    def opt_install_dir?
      @opt_install_dir ||= ARGV.include?('--install-dir') || ARGV.include?('-i')
    end
    private :opt_install_dir?

    ##
    # Detects --build-root option specified on command line.

    def opt_build_root?
      @opt_build_root ||= ARGV.include?('--build-root')
    end
    private :opt_build_root?

    ##
    # Tries to detect, if arguments and environment variables suggest that
    # 'gem install' is executed from rpmbuild.

    def rpmbuild?
      @rpmbuild ||= ENV['RPM_PACKAGE_NAME'] && (opt_install_dir? || opt_build_root?)
    end
    private :rpmbuild?

    ##
    # Default gems locations allowed on FHS system (/usr, /usr/share).
    # The locations are derived from directories specified during build
    # configuration.

    def default_locations
      @default_locations ||= {
        :system => previous_but_one_dir_to(RbConfig::CONFIG['vendordir'], RbConfig::CONFIG['RUBY_INSTALL_NAME']),
        :local => previous_but_one_dir_to(RbConfig::CONFIG['sitedir'], RbConfig::CONFIG['RUBY_INSTALL_NAME'])
      }
    end

    ##
    # For each location provides set of directories for binaries (:bin_dir)
    # platform independent (:gem_dir) and dependent (:ext_dir) files.

    def default_dirs
      @libdir ||= case RUBY_PLATFORM
      when 'java'
        RbConfig::CONFIG['datadir']
      else
        RbConfig::CONFIG['libdir']
      end

      @default_dirs ||= default_locations.inject(Hash.new) do |hash, location|
        destination, path = location

        hash[destination] = if path
          {
            :bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last),
            :gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'),
            :ext_dir => File.join(path, @libdir.split(File::SEPARATOR).last, 'gems')
          }
        else
          {
            :bin_rubygems/rubygems/ext/rake_builder.rb000064400000001621150403134200014003 0ustar00       options = if Process.uid == 0
          "--install-dir=#{Gem.default_dirs[:local][:gem_dir]} --bindir #{Gem.default_dirs[:local][:bin_dir]}"
        end

        {"gem" => options}
      else
        {}
      end
    end

    ##
    # RubyGems default overrides.

    def default_dir
      Gem.default_dirs[:system][:gem_dir]
    end

    def default_path
      path = default_dirs.collect {|location, paths| paths[:gem_dir]}
      path.unshift Gem.user_dir if File.exist? Gem.user_home
      path
    end

    def default_ext_dir_for base_dir
      dir = if rpmbuild?
        build_dir = base_dir.chomp Gem.default_dirs[:system][:gem_dir]
        if build_dir != base_dir
          File.join build_dir, Gem.default_dirs[:system][:ext_dir]
        end
      else
        dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir}
        dirs && dirs.last[:ext_dir]
      end
      dir rubygems/rubygems/ext/cargo_builder/link_flag_converter.rb000064400000001354150403134200020174 0ustar00rubygems/rubygems/ext/build_error.rb000064400000000263150403134170013672 0ustar00# frozen_string_literal: true

##
# Raised when there is an error while building extensions.

require_relative "../exceptions"

class Gem::Ext::BuildError < Gem::InstallError
end
rubygems/rubygems/ext/builder.rb000064400000015132150403134200013003 0ustar00# frozen_string_literal: true

class Gem::Ext::CmakeBuilder < Gem::Ext::Builder
  def self.build(extension, dest_path, results, args=[], lib_dir=nil, cmake_dir=Dir.pwd,
    target_rbconfig=Gem.target_rbconfig)
    if target_rbconfig.path
      warn "--target-rbconfig is not yet supported for CMake extensions. Ignoring"
    end

    unless File.exist?(File.join(cmake_dir, "Makefile"))
      require_relative "../command"
      cmd = ["cmake", ".", "-DCMAKE_INSTALL_PREFIX=#{dest_path}", *Gem::Command.build_args]

      run cmd, results, class_name, cmake_dir
    end

    make dest_path, results, cmake_dir, target_rbconfig: target_rbconfig

    results
  end
end
rubygems/rubygems/ext/cargo_builder.rb000064400000024145150403134200014162 0ustar00# frozen_string_literal: true

require_relative "../shellwords"

# This class is used by rubygems to build Rust extensions. It is a thin-wrapper
# over the `cargo rustc` command which takes care of building Rust code in a way
# that Ruby can use.
class Gem::Ext::CargoBuilder < Gem::Ext::Builder
  attr_accessor :spec, :runner, :profile

  def initialize
    require_relative "../command"
    require_relative "cargo_builder/link_flag_converter"

    @runner = self.class.method(:run)
    @profile = :release
  end

  def build(extension, dest_path, results, args = [], lib_dir = nil, cargo_dir = Dir.pwd,
    target_rbconfig=Gem.target_rbconfig)
    require "tempfile"
    require "fileutils"

    if target_rbconfig.path
      warn "--target-rbconfig is not yet supported for Rust extensions. Ignoring"
    end

    # Where's the Cargo.toml of the crate we're building
    cargo_toml = File.join(cargo_dir, "Cargo.toml")
    # What's the crate's name
    crate_name = cargo_crate_name(cargo_dir, cargo_toml, results)

    begin
      # Create a tmp dir to do the build in
      tmp_dest = Dir.mktmpdir(".gem.", cargo_dir)

      # Run the build
      cmd = cargo_command(cargo_toml, tmp_dest, args, crate_name)
      runner.call(cmd, results, "cargo", cargo_dir, build_env)

      # Where do we expect Cargo to write the compiled library
      dylib_path = cargo_dylib_path(tmp_dest, crate_name)

      # Helpful error if we didn't find the compiled library
      raise DylibNotFoundError, tmp_dest unless File.exist?(dylib_path)

      # Cargo and Ruby differ on how the library should be named, rename from
      # what Cargo outputs to what Ruby expects
      dlext_name = "#{crate_name}.#{makefile_config("DLEXT")}"
      dlext_path = File.join(File.dirname(dylib_path), dlext_name)
      FileUtils.cp(dylib_path, dlext_path)

      nesting = extension_nesting(extension)

      if Gem.install_extension_in_lib && lib_dir
        nested_lib_dir = File.join(lib_dir, nesting)
        FileUtils.mkdir_p nested_lib_dir
        FileUtils.cp_r dlext_path, nested_lib_dir, remove_destination: true
      end

      # move to final destination
      nested_dest_path = File.join(dest_path, nesting)
      FileUtils.mkdir_p nested_dest_path
      FileUtils.cp_r dlext_path, nested_dest_path, remove_destination: true
    ensure
      # clean up intermediary build artifacts
      FileUtils.rm_rf tmp_dest if tmp_dest
    end

    results
  end

  def build_env
    build_env = rb_config_env
    build_env["RUBY_STATIC"] = "true" if ruby_static? && ENV.key?("RUBY_STATIC")
    cfg = "--cfg=rb_sys_gem --cfg=rubygems --cfg=rubygems_#{Gem::VERSION.tr(".", "_")}"
    build_env["RUSTFLAGS"] = [ENV["RUSTFLAGS"], cfg].compact.join(" ")
    build_env
  end

  def cargo_command(cargo_toml, dest_path, args = [], crate_name = nil)
    cmd = []
    cmd += [cargo, "rustc"]
    cmd += ["--crate-type", "cdylib"]
    cmd += ["--target", ENV["CARGO_BUILD_TARGET"]] if ENV["CARGO_BUILD_TARGET"]
    cmd += ["--target-dir", dest_path]
    cmd += ["--manifest-path", cargo_toml]
    cmd += ["--lib"]
    cmd += ["--profile", profile.to_s]
    cmd += ["--locked"]
    cmd += Gem::Command.build_args
    cmd += args
    cmd += ["--"]
    cmd += [*cargo_rustc_args(dest_path, crate_name)]
    cmd
  end

  private

  def cargo
    ENV.fetch("CARGO", "cargo")
  end

  # returns the directory nesting of the extension, ignoring the first part, so
  # "ext/foo/bar/Cargo.toml" becomes "foo/bar"
  def extension_nesting(extension)
    parts = extension.to_s.split(Regexp.union([File::SEPARATOR, File::ALT_SEPARATOR].compact))

    parts = parts.each_with_object([]) do |segment, final|
      next if segment == "."
      if segment == ".."
        raise Gem::InstallError, "extension outside of gem root" if final.empty?
        next final.pop
      end
      final << segment
    end

    File.join(parts[1...-1])
  end

  def rb_config_env
    result = {}
    RbConfig::CONFIG.each {|k, v| result["RBCONFIG_#{k}"] = v }
    result
  end

  def cargo_rustc_args(dest_dir, crate_name)
    [
      *linker_args,
      *mkmf_libpath,
      *rustc_dynamic_linker_flags(dest_dir, crate_name),
      *rustc_lib_flags(dest_dir),
      *platform_specific_rustc_args(dest_dir),
    ]
  end

  def platform_specific_rustc_args(dest_dir, flags = [])
    if mingw_target?
      # On mingw platforms, mkmf adds libruby to the linker flags
      flags += libruby_args(dest_dir)

      # Make sure ALSR is used on mingw
      # see https://github.com/rust-lang/rust/pull/75406/files
      flags += ["-C", "link-arg=-Wl,--dynamicbase"]
      flags += ["-C", "link-arg=-Wl,--disable-auto-image-base"]

      # If the gem is installed on a host with build tools installed, but is
      # run on one that isn't the missing libraries will cause the extension
      # to fail on start.
      flags += ["-C", "link-arg=-static-libgcc"]
    elsif darwin_target?
      # Ventura does not always have this flag enabled
      flags += ["-C", "link-arg=-Wl,-undefined,dynamic_lookup"]
    end

    flags
  end

  # We want to use the same linker that Ruby uses, so that the linker flags from
  # mkmf work properly.
  def linker_args
    cc_flag = Shellwordsrubygems/rubygems/ext/configure_builder.rb000064400000001067150403134200015046 0ustar00prefix = so_ext == "dll" ? "" : "lib"
    path_parts = [dest_path]
    path_parts << ENV["CARGO_BUILD_TARGET"] if ENV["CARGO_BUILD_TARGET"]
    path_parts += ["release", "#{prefix}#{crate_name}.#{so_ext}"]
    File.join(*path_parts)
  end

  def cargo_crate_name(cargo_dir, manifest_path, results)
    require "open3"
    Gem.load_yaml

    output, status =
      begin
        Open3.capture2e(cargo, "metadata", "--no-deps", "--format-version", "1", chdir: cargo_dir)
      rescue StandardError => error
        raise Gem::InstallError, "cargo metadata failed #{errorubygems/rubygems/ext/ext_conf_builder.rb000064400000004251150403134200014670 0ustar00{found.join("\n")}
EOF
    end
    package["name"].tr("-", "_")
  end

  def normalize_path(path)
    return path unless File::ALT_SEPARATOR

    path.tr(File::ALT_SEPARATOR, File::SEPARATOR)
  end

  def rustc_dynamic_linker_flags(dest_dir, crate_name)
    split_flags("DLDFLAGS").
      filter_map {|arg| maybe_resolve_ldflag_variable(arg, dest_dir, crate_name) }.
      flat_map {|arg| ldflag_to_link_modifier(arg) }
  end

  def rustc_lib_flags(dest_dir)
    split_flags("LIBS").flat_map {|arg| ldflag_to_link_modifier(arg) }
  end

  def split_flags(var)
    Shellwords.split(RbConfig::CONFIG.fetch(var, ""))
  end

  def ldflag_to_link_modifier(arg)
    LinkFlagConverter.convert(arg)
  end

  def msvc_target?
    makefile_config("target_os").include?("msvc")
  end

  def darwin_target?
    makefile_config("target_os").include?("darwin")
  end

  def mingw_target?
    makefile_config("target_os").include?("mingw")
  end

  def win_target?
    target_platform = RbConfig::CONFIG["target_os"]
    !!Gem::WIN_PATTERNS.find {|r| target_platform =~ r }
  end

  # Interpolate substitution vars in the arg (i.e. $(DEFFILE))
  def maybe_resolve_ldflag_variable(input_arg, dest_dir, crate_name)
    var_matches = input_arg.match(/\$\((\w+)\)/)

    return input_arg unless var_matches

    var_name = var_matches[1]

    return input_arg if var_name.nil? || var_name.chomp.empty?

    case var_name
    # On windows, it is assumed that mkmf has setup an exports file for the
    # extension, so we have to create one ourselves.
    when "DEFFILE"
      write_deffile(dest_dir, crate_name)
    else
      RbConfig::CONFIG[var_name]
    end
  end

  def write_deffile(dest_dir, crate_name)
    deffile_path = File.join(dest_dir, "#{crate_name}-#{RbConfig::CONFIG["arch"]}.def")
    export_prefix = makefile_config("EXPORT_PREFIX") || ""

    File.open(deffile_path, "w") do |f|
      f.puts "EXPORTS"
      f.puts "#{export_prefix.strip}Init_#{crate_name}"
    end

    deffile_path
  end

  # Corresponds to $(LIBPATH) in mkmf
  def mkmf_libpath
    ["-L", "native=#{makefile_config("libdir")}"]
  end

  def makefile_config(var_name)
    val = RbConfig::MAKEFILE_CONFIG[var_name]

    return unless val

    RbConfrubygems/rubygems/gemcutter_utilities/webauthn_listener.rb000064400000006010150403134200020364 0ustar00rubygems/rubygems/ext/rake_builder.rb000064400000002066150403134200014007 0ustar00# frozen_string_literal: true

require_relative "../shellwords"

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

class Gem::Ext::RakeBuilder < Gem::Ext::Builder
  def self.build(extension, dest_path, results, args=[], lib_dir=nil, extension_dir=Dir.pwd,
    target_rbconfig=Gem.target_rbconfig)
    if target_rbconfig.path
      warn "--target-rbconfig is not yet supported for Rake extensions. Ignoring"
    end

    if /mkrf_conf/i.match?(File.basename(extension))
      run([Gem.ruby, File.basename(extension), *args], results, class_name, extension_dir)
    end

    rake = ENV["rake"]

    if rake
      rake = Shellwords.split(rake)
    else
      begin
        rake = ruby << "-rrubygems" << Gem.bin_path("rake", "rake")
      rescue Gem::Exception
        rake = [Gem.default_exec_format % "rake"]
      end
    end

    rake_args = ["RUBYARCHDIR=#{dest_path}", "RUBYLIBDIR=#{dest_path}", *args]
    run(rake + rake_args, results, class_name, extension_dir)

    results
  end
end
rubygems/rubygems/ext/cargo_builder/link_flag_converter.rb000064400000001354150403134200020174 0ustar00# frozen_string_literal: true

class Gem::Ext::CargoBuilder < Gem::Ext::Builder
  # Converts Ruby link flags into something cargo understands
  class LinkFlagConverter
    FILTERED_PATTERNS = [
      /compress-debug-sections/, # Not supported by all linkers, and not required for Rust
    ].freeze

    def self.convert(arg)
      return [] if FILTERED_PATTERNS.any? {|p| p.match?(arg) }

      case arg.chomp
      when /^-L\s*(.+)$/
        ["-L", "native=#{$1}"]
      when /^--library=(\w+\S+)$/, /^-l\s*(\w+\S+)$/
 rubygems/rubygems/gemcutter_utilities/webauthn_poller.rb000064400000004757150403134200020054 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "../user_interaction"
require_relative "../shellwords"

class Gem::Ext::Builder
  include Gem::UserInteraction

  attr_accessor :build_args # :nodoc:

  def self.class_name
    name =~ /Ext::(.*)Builder/
    $1.downcase
  end

  def self.make(dest_path, results, make_dir = Dir.pwd, sitedir = nil, targets = ["clean", "", "install"],
    target_rbconfig: Gem.target_rbconfig)
    unless File.exist? File.join(make_dir, "Makefile")
      raise Gem::InstallError, "Makefile not found"
    end

    # try to find make program from Ruby configure arguments first
    target_rbconfig["configure_args"] =~ /with-make-prog\=(\w+)/
    make_program_name = ENV["MAKE"] || ENV["make"] || $1
    make_program_name ||= RUBY_PLATFORM.include?("mswin") ? "nmake" : "make"
    make_program = Shellwords.split(make_program_name)

    # The installation of the bundled gems is failed when DESTDIR is empty in mswin platform.
    destdir = /\bnmake/i !~ make_program_name || ENV["DESTDIR"] && ENV["DESTDIR"] != "" ? format("DESTDIR=%s", ENV["DESTDIR"]) : ""

    env = [destdir]

    if sitedir
      env << format("sitearchdir=%s", sitedir)
      env << format("sitelibdir=%s", sitedir)
    end

    targets.each do |target|
      # Pass DESTDIR via command line to override what's in MAKEFLAGS
      cmd = [
        *make_program,
        *env,
        target,
      ].reject(&:empty?)
      begin
        run(cmd, results, "make #{target}".rstrip, make_dir)
      rescue Gem::InstallError
        raise unless target == "clean" # ignore clean failure
      end
    end
  end

  def self.ruby
    # Gem.ruby is quoted if it contains whitespace
    cmd = Shellwords.split(Gem.ruby)

    # This load_path is only needed when running rubygems test without a proper installation.
    # Prepending it in a normal installation will cause problem with order of $LOAD_PATH.
    # Therefore only add load_path if it is not present in the default $LOAD_PATH.
    load_path = File.expand_path("../..", __dir__)
    case load_path
    when RbConfig::CONFIG["sitelibdir"], RbConfig::CONFIG["vendorlibdir"], RbConfig::CONFIG["rubylibdir"]
      cmd
    else
      cmd << "-I#{load_path}"
    end
  end

  def self.run(command, results, command_name = nil, dir = Dir.pwd, env = {})
    verbose = Gem.configuration.really_verbose

    begin
      rubygems_gemdeps = ENV["RUBYGEMS_GEMDEPS"]
rubygems/rubygems/gemcutter_utilities/webauthn_listener/response.rb000064400000006612150403134200022232 0ustar00     output = String.new
                           while line = stdouterr.gets
                             output << line
                             if verbose
                               print line
                             end
                           end
                           [output, wait_thread.value]
                         end
                       rescue StandardError => error
                         raise Gem::InstallError, "#{command_name || class_name} failed#{error.message}"
                       end
      unless verbose
        results << output
      end
    ensure
      ENV["RUBYGEMS_GEMDEPS"] = rubygems_gemdeps
    end

    unless status.success?
      results << "Building has failed. See above output for more information on the failure." if verbose
    end

    yield(status, results) if block_given?

    unless status.success?
      exit_reason =
        if status.exited?
          ", exit code #{status.exitstatus}"
        elsif status.signaled?
          ", uncaught signal #{status.termsig}"
        end

      raise Gem::InstallError, "#{command_name || class_name} failed#{exit_reason}"
    end
  end

  ##
  # Creates a new extension builder for +spec+.  If the +spec+ does not yet
  # have build arguments, saved, set +build_args+ which is an ARGV-style
  # array.

  def initialize(spec, build_args = spec.build_args, target_rbconfig = Gem.target_rbconfig)
    @spec       = spec
    @build_args = build_args
    @gem_dir    = spec.full_gem_path
    @target_rbconfig = target_rbconfig

    @ran_rake = false
  end

  ##
  # Chooses the extension builder class for +extension+

  def builder_for(extension) # :nodoc:
    case extension
    when /extconf/ then
      Gem::Ext::ExtConfBuilder
    when /configure/ then
      Gem::Ext::ConfigureBuilder
    when /rakefile/i, /mkrf_conf/i then
      @ran_rake = true
      Gem::Ext::RakeBuilder
    when /CMakeLists.txt/ then
      Gem::Ext::CmakeBuilder
    when /Cargo.toml/ then
      Gem::Ext::CargoBuilder.new
    else
      build_error("No builder for extension '#{extension}'")
    end
  end

  ##
  # Logs the build +output+, then raises Gem::Ext::BuildError.

  def build_error(output, backtrace = nil) # :nodoc:
    gem_make_out = write_gem_make_out output

    message = <<-EOF
ERROR: Failed to build gem native extension.

    #{output}

Gem files will remain installed in #{@gem_dir} for inspection.
Results logged to #{gem_make_out}
EOF

    raise Gem::Ext::BuildError, message, backtrace
  end

  def build_extension(extension, dest_path) # :nodoc:
    results = []

    builder = builder_for(extension)

    extension_dir =
      File.expand_path File.join(@gem_dir, File.dirname(extension))
    lib_dir = File.join @spec.full_gem_path, @spec.raw_require_paths.first

    begin
      FileUtils.mkdir_p dest_path

      results = builder.build(extension, dest_path,
                              results, @build_args, lib_dir, extension_dir, @target_rbconfig)

      verbose { results.join("\n") }

      write_gem_make_out results.join "\n"
    rescue StandardError => e
      results << e.message
      build_error(results.join("\n"), $@)
    end
  end

  ##
  # Builds extensions.  Valid types of extensions are extconf.rb files,
  # configure scripts and rakefiles or mkrf_conf files.

  def build_extensions
    return if @spec.extensions.empty?

    if @build_args.empty?
      say "Building native extensions. This could take a while..."
 rubygems/rubygems/commands/unpack_command.rb000064400000010720150403134200015333 0ustar00tension_dir

    File.open destination, "wb" do |io|
      io.puts output
    end

    destination
  end
end
rubygems/rubygems/ext/configure_builder.rb000064400000001404150403134200015041 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder
  def self.build(extension, dest_path, results, args=[], lib_dir=nil, configure_dir=Dir.pwd,
    target_rbconfig=Gem.target_rbconfig)
    if target_rbconfig.path
      warn "--target-rbconfig is not yet supported for configure-based extensions. Ignoring"
    end

    unless File.exist?(File.join(configure_dir, "Makefile"))
      cmd = ["sh", "./configure", "--prefix=#{dest_path}", *args]

      run cmd, results, class_name, configure_dir
    end

    make dest_path, results, configure_dir, target_rbconfig: target_rbconfig

    results
  end
end
rubygems/rubygems/ext/ext_conf_builder.rb000064400000005067150403134200014676 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
  def self.build(extension, dest_path, results, args=[], lib_dir=nil, extension_dir=Dir.pwd,
    target_rbconfig=Gem.target_rbconfig)
    require "fileutils"
    require "tempfile"

    tmp_dest = Dir.mktmpdir(".gem.", extension_dir)

    # Some versions of `mktmpdir` return absolute paths, which will break make
    # if the paths contain spaces.
    #
    # As such, we convert to a relative path.
    tmp_dest_relative = get_relative_path(tmp_dest.clone, extension_dir)

    destdir = ENV["DESTDIR"]

    begin
      cmd = ruby << File.basename(extension)
      cmd << "--target-rbconfig=#{target_rbconfig.path}" if target_rbconfig.path
      cmd.push(*args)

      run(cmd, results, class_name, extension_dir) do |s, r|
        mkmf_log = File.join(extension_dir, "mkmf.log")
        if File.exist? mkmf_log
          unless s.success?
            r << "To see why this extension failed to compile, please check" \
              " the mkmf.log which can be found here:\n"
            r << "  " + File.join(dest_path, "mkmf.log") + "\n"
          end
          FileUtils.mv mkmf_log, dest_path
        end
      end

      ENV["DESTDIR"] = nil

      make dest_path, results, extension_dir, tmp_dest_relative, target_rbconfig: target_rbconfig

      full_tmp_dest = File.join(extension_dir, tmp_dest_relative)

      is_cross_compiling = target_rbconfig["platform"] != RbConfig::CONFIG["platform"]
      # Do not copy extension libraries by default when cross-compiling
      # not to conflict with the one already built for the host platform.
      if Gem.install_extension_in_lib && lib_dir && !is_cross_compiling
        FileUtils.mkdir_p lib_dir
        entries = Dir.entries(full_tmp_dest) - %w[. ..]
        entries = entries.map {|entry| File.join full_tmp_dest, entry }rubygems/rubygems/commands/stale_command.rb000064400000001705150403134200015165 0ustar00 1] = "." if path.start_with?(base)
    path
  end
end
rubygems/rubygems/gemcutter_utilities/webauthn_listener.rb000064400000006015150403134200020371 0ustar00rubygems/rubygems/commands/uninstall_command.rb000064400000013466150403134200016075 0ustar00responses sent by the listener after receiving a request:
#   - 200 OK: OTP code was successfully retrieved
#   - 204 No Content: If the request was an OPTIONS request
#   - 400 Bad Request: If the request did not contain a query parameter `code`
#   - 404 Not Found: The request was not to the root path
#   - 405 Method Not Allowed: OTP code was not retrieved because the request was not a GET/OPTIONS request
#
# Example usage:
#
#   thread = Gem::WebauthnListener.listener_thread("https://rubygems.example", server)
#   thread.join
#   otp = thread[:otp]
#   error = thread[:error]
#

module Gem::GemcutterUtilities
  class WebauthnListener
    attr_reader :host

    def initialize(host)
      @host = host
    end

    def self.listener_thread(host, server)
      Thread.new do
        thread = Thread.current
        thread.abort_on_exception = true
        thread.report_on_exception = false
        thread[:otp] = new(host).wait_for_otp_code(server)
      rescue Gem::WebauthnVerificationError => e
        thread[:error] = e
      ensure
        server.close
      end
    end

    def wait_for_otp_code(server)
      loop do
        socket = server.accept
        request_line = socket.gets

        method, req_uri, _protocol = request_line.split(" ")
        req_uri = Gem::URI.parse(req_uri)

        responder = SocketResponder.new(socket)

        unless root_path?(req_uri)
          responder.send(NotFoundResponse.for(host))
          raise Gem::WebauthnVerificationError, "Page at #{req_uri.path} not found."
        end

        case method.upcase
        when "OPTIONS"
          responder.send(NoContentResponse.for(host))
          next # will be GET
        when "GET"
          if otp = parse_otp_from_uri(req_uri)
            responder.send(OkResponse.for(host))
            return otp
          end
          responder.send(BadRequestResponse.for(host))
          raise Gem::WebauthnVerificationError, "Did not receive OTP from #{host}."
        else
          responder.send(MethodNotAllowedResponse.for(host))
          raise Gem::WebauthnVerificationError, "Invalid HTTP method #{method.upcase} received."
        end
      end
    end

    private

    def root_path?(uri)
      uri.path == "/"
    end

    def parse_otp_from_uri(uri)
      require "cgi"

      return if uri.query.nil?
      CGI.parse(uri.query).dig("code", 0)
    end

    class SocketResponder
      def initialize(socket)
        @socket = socket
      end

      def send(response)
        @socket.print response.to_s
        @socket.close
      end
    end
  end
end
rubygems/rubygems/gemcutter_utilities/webauthn_poller.rb000064400000005223150403134200020041 0ustar00# frozen_string_literal: true

##
# The WebauthnPoller class retrieves an OTP after a user successfully WebAuthns. An instance
# polls the Gem host for the OTP code. The polling request (api/v1/webauthn_verification/<webauthn_token>/status.json)
# is sent to the Gem host every 5 seconds and will timeout after 5 minutes. If the status field in the json response
# is "success", the code field will contain the OTP code.
#
# Example usage:
#
#   thread = Gem::WebauthnPoller.poll_thread(
#     {},
#     "RubyGems.org",
#     "https://rubygems.org/api/v1/webauthn_verification/odow34b93t6aPCdY",
#     { email: "email@example.com", password: "password" }
#   )
#   thread.join
#   otp = thread[:otp]
#   error = thread[:error]
#

module Gem::GemcutterUtilities
  class WebauthnPoller
    include Gem::GemcutterUtilities
    TIMEOUT_IN_SECONDS = 300

    attr_reader :options, :host

    def initialize(options, host)
      @options = options
      @host = host
    end

    def self.poll_thread(options, host, webauthn_url, credentials)
      Thread.new do
        thread = Thread.current
        thread.abort_on_exception = true
        thread.report_on_exception = false
        thread[:otp] = new(options, host).poll_for_otp(webauthn_url, credentials)
      rescue Gem::WebauthnVerificationError, Gem::Timeout::Error => e
        thread[:error] = e
      end
    end

    def poll_for_otp(webauthn_url, credentials)
      Gem::Timeout.timeout(TIMEOUT_IN_SECONDS) do
        loop do
          response = webauthn_verification_poll_response(webauthn_url, credentials)
          raise Gem::WebauthnVerificationError, response.message unless response.is_a?(Gem::Net::HTTPSuccess)

          require "json"
          parsed_response = JSON.parse(response.body)
          case parsed_response["status"]
          when "pending"
            sleep 5
          when "success"
            return parsed_response["code"]
          else
            raise Gem::WebauthnVerificationError, parsed_response.fetch("message", "Invalid response from server")
          end
        end
      end
    end

    private

    def webauthn_verification_poll_response(webauthn_url, credentials)
      webauthn_token = %r{(?<=\/)[^\/]+(?=$)}.match(webauthn_url)[0]
      rubygems_api_request(:get, "api/v1/webauthn_verification/#{webauthn_token}/status.json") do |request|
        irubygems/rubygems/commands/rdoc_command.rb000064400000004760150403134200015010 0ustar00rubygems/rubygems/gemcutter_utilities/webauthn_listener/response.rb000064400000006631150403134200022233 0ustar00# frozen_string_literal: true

##
# The WebauthnListener Response class is used by the WebauthnListener to create
# responses to be sent to the Gem host. It creates a Gem::Net::HTTPResponse instance
# when initialized and can be converted to the appropriate format to be sent by a socket using `to_s`.
# Gem::Net::HTTPResponse instances cannot be directly sent over a socket.
#
# Types of response classes:
#   - OkResponse
#   - NoContentResponse
#   - BadRequestResponse
#   - NotFoundResponse
#   - MethodNotAllowedResponse
#
# Example usage:
#
#   server = TCPServer.new(0)
#   socket = server.accept
#
#   response = OkResponse.for("https://rubygems.example")
#   socket.print response.to_s
#   socket.close
#

module Gem::GemcutterUtilities
  class WebauthnListener
    class Response
      attr_reader :http_response

      def self.for(host)
        new(host)
      end

      def initialize(host)
        @host = host

        build_http_response
      end

      def to_s
        status_line = "HTTP/#{@http_response.http_version} #{@http_response.code} #{@http_response.message}\r\n"
        headers = @http_response.to_hash.map {|header, value| "#{header}: #{value.join(", ")}\r\n" }.join + "\r\n"
        body = @http_response.body ? "#{@http_response.body}\n" : ""

        status_line + headers + body
      end

      private

      # Must be implemented in subclasses
      def code
        raise NotImplementedError
      end

      def reason_phrase
        raise NotImplementedError
      end

      def body; end

      def build_http_response
        response_class = Gem::Net::HTTPResponse::CODE_TO_OBJ[code.to_s]
        @http_response = response_class.new("1.1", code, reason_phrase)
        @http_response.instance_variable_set(:@read, true)

        add_connection_header
        add_access_control_headers
        add_body
      end

      def add_connection_header
        @http_response["connection"] = "close"
      end

      def add_access_control_headers
        @http_response["access-control-allorubygems/rubygems/commands/build_command.rb000064400000006145150403134200015157 0ustar00

      def reason_phrase
        "OK"
      end

      def body
        "success"
      end
    end

    class NoContentResponse < Response
      private

      def code
        204
      end

      def reason_phrase
        "No Content"
      end
    end

    class BadRequestResponse < Response
      private

      def code
        400
      end

      def reason_phrase
        "Bad Request"
      end

      def body
        "missing code parameter"
      end
    end

    class NotFoundResponse < Response
      private

      def code
        404
      end

      def reason_phrase
        "Not Found"
      end
    end

    class MethodNotAllowedResponse < Response
      private

      def code
        405
      end

      def reason_phrase
        "Method Not Allowed"
      end

      def add_access_control_headers
        super
        @http_response["allow"] = %w[GET OPTIONS]
      end
    end
  end
end
rubygems/rubygems/commands/unpack_command.rb000064400000010222150403134200015330 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../version_option"
require_relative "../security_option"
require_relative "../remote_fetcher"
require_relative "../package"

# forward-declare

module Gem::Security # :nodoc:
  class Policy # :nodoc:
  end
end

class Gem::Commands::UnpackCommand < Gem::Command
  include Gem::VersionOption
  include Gem::SecurityOption

  def initialize
    require "fileutils"

    super "unpack", "Unpack an installed gem to the current directory",
          version: Gem::Requirement.default,
          target: Dir.pwd

    add_option("--target=DIR",
               "target directory for unpacking") do |value, options|
      options[:target] = value
    end

    add_option("--spec", "unpack the gem specification") do |_value, options|
      options[:spec] = true
    end

    add_security_option
    add_version_option
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to unpack"
  end

  def defaults_str # :nodoc:
    "--version '#{Gem::Requirement.default}'"
  end

  def description
    <<-EOF
The unpack command allows you to examine the contents of a gem or modify
them to help diagnose a bug.

You can add the contents of the unpacked gem to the load path using the
RUBYLIB environment variable or -I:

  $ gem unpack my_gem
  Unpacked gem: '.../my_gem-1.0'
  [edit my_gem-1.0/lib/my_gem.rb]
  $ ruby -Imy_gem-1.0/lib -S other_program

You can repackage an unpacked gem using the build command.  See the build
command help for an example.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME"
  end

  #--
  # TODO: allow, e.g., 'gem rubygems/rubygems/commands/fetch_command.rb000064400000005007150403134200015145 0ustar00     end

        File.open destination, "w" do |io|
          io.write metadata
        end
      else
        basename = File.basename path, ".gem"
        target_dir = File.expand_path basename, options[:target]

        package = Gem::Package.new path, security_policy
        package.extract_files target_dir

        say "Unpacked gem: '#{target_dir}'"
      end
    end
  end

  ##
  #
  # Find cached filename in Gem.path. Returns nil if the file cannot be found.
  #
  #--
  # TODO: see comments in get_path() about general service.

  def find_in_cache(filename)
    Gem.path.each do |path|
      this_path = File.join(path, "cache", filename)
      return this_path if File.exist? this_path
    end

    nil
  end

  ##
  # Return the full path to the cached gem file matching the given
  # name and version requirement.  Returns 'nil' if no match.
  #
  # Example:
  #
  #   get_path 'rake', '> 0.4' # "/usr/lib/ruby/gems/1.8/cache/rake-0.4.2.gem"
  #   get_path 'rake', '< 0.1' # nil
  #   get_path 'rak'           # nil (exact name required)
  #--

  def get_path(dependency)
    return dependency.name if /\.gem$/i.match?(dependency.name)

    specs = dependency.matching_specs

    selected = specs.max_by(&:version)

    return Gem::RemoteFetcher.fetcher.download_to_cache(dependency) unless
      selected

    return unless /^#{selected.name}$/i.match?(dependency.name)

    # We expect to find (basename).gem in the 'cache' directory.  Furthermore,
    # the name match must be exact (ignoring case).

    path = find_in_cache File.basename selected.cache_file

    return Gem::RemoteFetcher.fetcher.download_to_cache(dependency) unless path

    path
  end
end
rubygems/rubygems/commands/stale_command.rb000064400000001705150403134200015165 0ustar00# frozerubygems/rubygems/commands/install_command.rb000064400000017251150403134200015526 0ustar00rubygems/rubygems/commands/uninstall_command.rb000064400000013554150403134200016073 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../version_option"
require_relative "../uninstaller"
require "fileutils"

##
# Gem uninstaller command line tool
#
# See `gem help uninstall`

class Gem::Commands::UninstallCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "uninstall", "Uninstall gems from the local repository",
          version: Gem::Requirement.default, user_install: true,
          check_dev: false, vendor: false

    add_option("-a", "--[no-]all",
      "Uninstall all matching versions") do |value, options|
      options[:all] = value
    end

    add_option("-I", "--[no-]ignore-dependencies",
               "Ignore dependency requirements while",
               "uninstalling") do |value, options|
      options[:ignore] = value
    end

    add_option("-D", "--[no-]check-development",
               "Check development dependencies while uninstalling",
               "(default: false)") do |value, options|
      options[:check_dev] = value
    end

    add_option("-x", "--[no-]executables",
                 "Uninstall applicable executables without",
                 "confirmation") do |value, options|
      options[:executables] = value
    end

    add_option("-i", "--install-dir DIR",
               "Directory to uninstall gem from") do |value, options|
      options[:install_dir] = File.expand_path(value)
    end

    add_option("-n", "--bindir DIR",
               "Directory to remove executables from") do |value, options|
      options[:bin_dir] = File.expand_path(value)
    end

    add_option("--[no-]user-install",
               "Uninstall from user's home directory",
               "in addition to GEM_HOME.") do |value, options|
      options[:user_install] = value
    end

    add_option("--[no-]format-executable",
               "Assume executable names match Ruby's prefix and suffix.") do |value, options|
      options[:format_executable] = value
    end

    add_option("--[no-]force",
               "Uninstall all versions of the named gems",
               "ignoring dependencies") do |value, options|
      options[:force] = value
    end

    add_option("--[no-]abort-on-dependent",
               "Prevent uninstalling gems that are",
               "depended on by other gems.") do |value, options|
      options[:abort_on_dependent] = value
    end

    add_version_option
    add_platform_option

    add_option("--vendor",
               "Uninstall gem from the vendor directory.",
               "Only for use by gem repackagers.") do |_value, options|
      unless Gem.vendor_dir
        raise Gem::OptionParser::InvalidOption.new "your platform is not supported"
      end

      alert_warning "Use your OS package manager to uninstall vendor gems"
      options[:vendor] = true
      options[:install_dir] = Gem.vendor_dir
    end
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to uninstall"
  end

  def defaults_str # :nodoc:
    "--version '#{Gem::Requirement.default}' --no-force " \
      "--user-install"
  end

  def description # :nodoc:
    <<-EOF
The uninstall command removes a previously installed gem.

RubyGems will ask for confirmation if you are attempting to uninstall a gem
that is a dependency of an existing gem.  You can use the
--ignore-dependencies option to skip this check.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME [GEMNAME ...]"
  end

  def check_version # :nodoc:
    if options[:version] != Gem::Requirement.default &&
       get_all_gem_names.size > 1
      alert_error "Can't use --version with multiple gems. You can specify multiple gems with" \
                  " version requirements using `gem uninstall 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
      terminate_interaction 1
    end
  end

  def execute
    check_version

    # Consider only gem specifications installed at `--install-dir`
    Gem::Specification.dirs = options[:install_dir] if options[:install_dir]

    if options[:all] && !options[:args].empty?
      uninstall_specific
    elsif options[:all]
      uninstall_all
    else
      uninstall_specific
    end
  end

  def uninstall_all
    specs = Gem::Specification.reject(&:default_gem?)

    specs.each do |spec|
      options[:version] = spec.version
      uninstall_gem spec.name
    end

    alert "Uninstalled all gems in #{options[:install_dir] || Gem.dir}"
  end

  def uninstall_specific
    deplist = Gem::DependencyList.new
    original_gem_version = {}

    get_all_gem_names_and_versions.each do |name, version|
      original_gem_version[name] = version || options[:version]

      gem_specs = Gem::Specification.find_all_by_name(name, original_gem_version[name])

      if gem_specs.empty?
        say("Gem '#{name}' is not installed")
      else
        gem_specs.reject!(&:default_gem?) if gem_specs.size > 1

        gem_specs.each do |spec|
          deplist.add spec
        end
      end
    end

    deps = deplist.strongly_connected_components.flatten.reverse

    gems_to_uninstall = {}

    deps.each do |dep|
      if original_gem_version[dep.name] == Gem::Requirement.default
        next if gems_to_uninstall[dep.name]
        gems_to_uninstall[dep.name] = true
      else
        options[:version] = dep.version
      end

      uninstall_gem(dep.name)
    end
  end

  def uninstall_gem(gem_name)
    uninstall(gem_name)
  rescue Gem::GemNotInHomeException => e
    spec = e.spec
    alert("In order to remove #{spec.name}, please execute:\n" \
          "\tgem uninstall #{spec.name} --install-dir=#{spec.base_dir}")
  rescue Gem::UninstallError => e
    spec = e.spec
    alert_error("Error: unable to successfully uninstall '#{spec.name}' which is " \
          "located at '#{spec.full_gem_path}'. This is most likely because" \
          "the current user does not have the appropriate permissions")
    terminate_interaction 1
  end

  def uninstall(gem_name)
    Gem::Uninstaller.new(gem_name, options).uninstall
  end
end
rubygems/rubygems/commands/rdoc_command.rb000064400000004316150403134200015005 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../version_option"
require_relative "../rdoc"
require "fileutils"

class Gem::Commands::RdocCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "rdoc", "Generates RDoc for pre-installed gems",
          version: Gem::Requirement.default,
          include_rdoc: false, include_ri: true, overwrite: false

    add_option("--all",
               "Generate RDoc/RI documentation for all",
               "installed gems") do |value, options|
      options[:all] = value
    end

    add_option("--[no-]rdoc",
               "Generate RDoc HTML") do |value, options|
      optiorubygems/rubygems/commands/contents_command.rb000064400000010075150403134200015712 0ustar00    DESC
  end

  def usage # :nodoc:
    "#{program_name} [args]"
  end

  def execute
    specs = if options[:all]
      Gem::Specification.to_a
    else
      get_all_gem_names.flat_map do |name|
        Gem::Specification.find_by_name name, options[:version]
      end.uniq
    end

    if specs.empty?
      alert_error "No matching gems found"
      terminate_interaction 1
    end

    specs.each do |spec|
      doc = Gem::RDoc.new spec, options[:include_rdoc], options[:include_ri]

      doc.force = options[:overwrite]

      if options[:overwrite]
        FileUtils.rm_rf File.join(spec.doc_dir, "ri")
        FileUtils.rm_rf File.join(spec.doc_dir, "rdoc")
      end

      doc.generate
    end
  end
end
rubygems/rubygems/commands/build_command.rb000064400000005670150403134200015161 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../gemspec_helpers"
require_relative "../package"
require_relative "../version_option"

class Gem::Commands::BuildCommand < Gem::Command
  include Gem::VersionOption
  include Gem::GemspecHelpers

  def initialize
    super "build", "Build a gem from a gemspec"

    add_platform_option

    add_option "--force", "skip validation of the spec" do |_value, options|
      options[:force] = true
    end

    add_option "--strict", "consider warnings as errors when validating the spec" do |_value, options|
      options[:strict] = true
    end

    add_option "-o", "--output FILE", "output gem with the given filename" do |value, options|
      options[:output] = value
    end

    add_option "-C PATH", "Run as if gem build was started in <PATH> instead of the current working directory." do |value, options|
      options[:build_path] = value
    end
    deprecate_option "-C",
                     version: "4.0",
                     extra_msg: "-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead"
  end

  def arguments # :nodoc:
    "GEMSPEC_FILE  gemspec file name to build a gem for"
  end

  def description # :nodoc:
    <<-EOF
The build command allows you to create a gem from a ruby gemspec.

The best way to build a gem is to use a Rakefile and the Gem::PackageTask
which ships with RubyGems.

The gemspec can either be created by hand or extracted from an existing gem
with gem spec:

  $ gem unpack my_gem-1.0.gem
  Unpacked gem: '.../my_gem-1.0'
  $ gem spec my_gem-1.0.gem --ruby > my_gem-1.0/my_gem-1.0.gemspec
  $ cd my_gem-1.0
  [edit gem contents]
  $ gem build my_gem-1.0.gemspec

Gems can be saved to a specified filename with the output option:

  $ gem build my_gem-1.0.gemspec --output=release.gem

    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMSPEC_FILE"
  end

  def execute
    if build_path = options[:build_path]
      Dir.chdir(build_path) { build_gem }
      return
    end

    build_gem
  end

  private

  def build_gem
    gemspec = resolve_gem_name

    if gemspec
      build_package(gemspec)
    else
      alert_error error_message
      terminate_interaction(1)
    end
  end

  def build_package(gemspec)
    spec = Gem::Specification.load(gemspec)
    if spec
      Gem::Package.build(
        spec,
        options[:force],
        options[:strict],
        options[:output]
      )
    else
      alert_error "Error loading gemspec. Aborting."
      terminate_interaction 1
    end
  end

  def resolve_gem_name
    return find_gemspec unless gem_namrubygems/rubygems/commands/cleanup_command.rb000064400000011136150403134200015503 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../version_option"

class Gem::Commands::FetchCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def initialize
    defaults = {
      suggest_alternate: true,
      version: Gem::Requirement.default,
    }

    super "fetch", "Download a gem and place it in the current directory", defaults

    add_bulk_threshold_option
    add_proxy_option
    add_source_option
    add_clear_sources_option

    add_version_option
    add_platform_option
    add_prerelease_option

    add_option "--[no-]suggestions", "Suggest alternates when gems are not found" do |value, options|
      options[:suggest_alternate] = value
    end
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to download"
  end

  def defaults_str # :nodoc:
    "--version '#{Gem::Requirement.default}'"
  end

  def description # :nodoc:
    <<-EOF
The fetch command fetches gem files that can be stored for later use or
unpacked to examine their contents.

See the build command help for an example of unpacking a gem, modifying it,
then repackaging it.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME [GEMNAME ...]"
  end

  def check_version # :nodoc:
    if options[:version] != Gem::Requirement.default &&
       get_all_gem_names.size > 1
      alert_error "Can't use --version with multiple gems. You can specify multiple gems with" \
                  " version requirements using `gem fetch 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
      terminate_interaction 1
    end
  end

  def execute
    check_version

    exit_code = fetch_gems

    terminate_interaction exit_code
  end

  private

  def fetch_gems
    exit_code = 0

    version = options[:version]

    platform  = Gem.platforms.last
    gem_names = get_all_gem_names_and_versions

    gem_names.each do |gem_name, gem_version|
      gem_version ||= version
      dep = Gem::Dependency.new gem_name, gem_version
      dep.prerelease = options[:prerelease]
      suppress_suggestions = !options[:suggest_alternate]

      specs_and_sources, errors =
        Gem::SpecFetcher.fetcher.spec_for_dependency dep

      if platform
        filtered = specs_and_sources.select {|s,| s.platform == platform }
        specs_and_sources = filtered unless filtered.empty?
      end

      spec, source = specs_and_sources.max_by {|s,| s }

      if spec.nil?
        show_lookup_failure gem_name, gem_version, errors, suppress_suggestions, options[:domain]
        exit_code |= 2
        next
      end
      source.download spec
      say "Downloaded #{spec.full_name}"
    end

    exit_code
  end
end
rubygems/rubygems/commands/install_command.rb000064400000016446150403134200015533 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../install_update_options"
require_relative "../dependency_installer"
require_relative "../local_remote_options"
require_relative "../validator"
require_relative "../version_option"
require_relative "../update_suggestion"

##
# Gem installer command line tool
#
# See `gem help install`

class Gem::Commands::InstallCommand < Gem::Command
  attr_reader :installed_specs # :nodoc:

  include Gem::VersionOption
  include Gem::LocalRemoteOptions
  include Gem::InstallUpdateOptions
  include Gem::UpdateSuggestion

  def initialize
    defaults = Gem::DependencyInstaller::DEFAULT_OPTIONS.merge({
      format_executable: false,
      lock: true,
      suggest_alternate: true,
      version: Gem::Requirement.default,
      without_groups: [],
    })

    defaults.merge!(install_update_options)

    super "install", "Install a gem into the local repository", defaults

    add_install_update_options
    add_local_remote_options
    add_platform_option
    add_version_option
    add_prerelease_option "to be installed. (Only for listed grubygems/rubygems/commands/cert_command.rb000064400000022230150403134200015006 0ustar00Gemfile or
Isolate) is present.  If no explicit file is given RubyGems attempts to find
one in the current directory.

When the RUBYGEMS_GEMDEPS environment variable is set to a gem dependencies
file the gems from that file will be activated at startup time.  Set it to a
specific filename or to "-" to have RubyGems automatically discover the gem
dependencies file by walking up from the current directory.

NOTE: Enabling automatic discovery on multiuser systems can lead to
execution of arbitrary code when used from directories outside your control.

Extension Install Failures
==========================

If an extension fails to compile during gem installation the gem
specification is not written out, but the gem remains unpacked in the
repository.  You may need to specify the path to the library's headers and
libraries to continue.  You can do this by adding a -- between RubyGems'
options and the extension's build options:

  $ gem install some_extension_gem
  [build fails]
  Gem files will remain installed in \\
  /path/to/gems/some_extension_gem-1.0 for inspection.
  Results logged to /path/to/gems/some_extension_gem-1.0/gem_make.out
  $ gem install some_extension_gem -- --with-extension-lib=/path/to/lib
  [build succeeds]
  $ gem list some_extension_gem

  *** LOCAL GEMS ***

  some_extension_gem (1.0)
  $

If you correct the compilation errors by editing the gem files you will need
to write the specification by hand.  For example:

  $ gem install some_extension_gem
  [build fails]
  Gem files will remain installed in \\
  /path/to/gems/some_extension_gem-1.0 for inspection.
  Results logged to /path/to/gems/some_extension_gem-1.0/gem_make.out
  $ [cd /path/to/gems/some_extension_gem-1.0]
  $ [edit files or what-have-you and run make]
  $ gem spec ../../cache/some_extension_gem-1.0.gem --ruby > \\
             ../../specifications/some_extension_gem-1.0.gemspec
  $ gem list some_extension_gem

  *** LOCAL GEMS ***

  some_extension_gem (1.0)
  $

Command Alias
==========================

You can use `i` command instead of `install`.

  $ gem i GEMNAME

    EOF
  end

  def usage # :nodoc:
    "#{program_name} [options] GEMNAME [GEMNAME ...] -- --build-flags"
  end

  def check_version # :nodoc:
    if options[:version] != Gem::Requirement.default &&
       get_all_gem_names.size > 1
      alert_error "Can't use --version with multiple gems. You can specify multiple gems with" \
                  " version requirements using `gem install 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
      terminate_interaction 1
    end
  end

  def execute
    if options.include? :gemdeps
      install_from_gemdeps
      return # not reached
    end

    @installed_specs = []

    ENV.delete "GEM_PATH" if options[:install_dir].nil?

    check_version

    load_hooks

    exit_code = install_gems

    show_installed

    say update_suggestion if eligible_for_update?

    terminate_interaction exit_code
  end

  def install_from_gemdeps # :nodoc:
    require_relative "../request_set"
    rs = Gem::RequestSet.new

    specs = rs.install_from_gemdeps options do |req, inst|
      s = req.full_spec

      if inst
        say "Installing #{s.name} (#{s.version})"
      else
        say "Using #{s.name} (#{s.version})"
      end
    end

    @installed_specs = specs

    terminate_interaction
  end

  def install_gem(name, version) # :nodoc:
    return if options[:conservative] &&
              !Gem::Dependency.new(name, version).matching_specs.empty?

    req = Gem::Requirement.create(version)

    dinst = Gem::DependencyInstaller.new options

    request_set = dinst.resolve_dependencies name, req

    if options[:explain]
      say "Gems to install:"

      request_set.sorted_requests.each do |activation_request|
        say "  #{activation_request.full_name}"
      end
    else
      @installed_specs.concat request_set.install options
    end

    show_install_errors dinst.errors
  end

  def install_gems # :nodoc:
    exit_code = 0

    get_all_gem_names_and_versions.each do |gem_name, gem_version|
      gem_version ||= options[:version]
      domain = options[:domain]
      domain = :local unless options[:suggest_alternate]
      suppress_suggestions = (domain == :local)

      begin
        install_gem gem_name, gem_version
      rescue Gem::InstallError => e
        alert_error "Error installing #{gem_name}:\n\t#{e.message}"
        exit_code |= 1
      rescue Gem::UnsatisfiableDependencyError => e
        show_lookup_failure e.name, e.version, e.errors, suppress_suggestions,
                            "'#{gem_name}' (#{gem_version})"

        exit_code |= 2
      end
    end

    exit_code
  end

  ##
  # Loads post-install hooks

  def load_hooks # :nodoc:
    if options[:install_as_default]
      require_relative "../install_default_message"
    else
      require_relative "../install_message"
    end
    require_relative "../rdoc"
  end

  def show_install_errors(errors) # :nodoc:
    return unless errors

    errors.each do |x|
      next unless Gem::SourceFetchProblem === x

      require_relative "../uri"
      msg = "Unable to pull data from '#{Gem::Uri.redact(x.source.uri)}': #{x.error.message}"

      alert_warning msg
    end
  end

  def show_installed # :nodoc:
    return if @installed_specs.empty?

    gems = @installed_specs.length == 1 ? "gem" : "gems"
    say "#{@installed_specs.length} #{gems} installed"
  end
end
rubygems/rubygems/commands/contents_command.rb000064400000010502150403134200015705 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../version_option"

class Gem::Commands::ContentsCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "contents", "Display the contents of the installed gems",
          specdirs: [], lib_only: false, prefix: true,
          show_install_dir: false

    add_version_option

    add_option("--all",
               "Contents for all gems") do |all, options|
      options[:all] = all
    end

    add_option("-s", "--spec-dir a,b,c", Array,
               "Search for gems under specific paths") do |spec_dirs, options|
      options[:specdirs] = spec_dirs
    end

    add_option("-l", "--[no-]lib-only",
               "Only return files in the Gem's lib_dirs") do |lib_only, options|
      options[:lib_only] = lib_only
    end

    add_option("--[no-]prefix",
               "Don't include installed path prefix") do |prefix, options|
      options[:prefix] = prefix
    end

    add_option("--[no-]show-install-dir",
               "Show only the gem install dir") do |show, options|
      options[:show_install_dir] = show
    end

    @path_kind = nil
    @spec_dirs = nil
    @version   = nil
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to list contents for"
  end

  def defaults_str # :nodoc:
    "--no-lib-only --prefix"
  end

  def description # :nodoc:
    <<-EOF
The contents command lists the files in an installed gem.  The listing can
be given as full file names, file names without the installed directory
prefix or only the files that are requireable.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME [GEMNAME ...]"
  end

  def execute
    @version   = options[:version] || Gem::Requirement.default
    @spec_dirs = specification_directories
    @path_kind = path_description @spec_dirs

    names = gem_names

    names.each do |name|
      found =
        if options[:show_install_dir]
          gem_install_dir name
        else
          gem_contents name
        end

      terminate_interaction 1 unless found || names.length > 1
    end
  end

  def files_in(spec)
    if spec.default_gem?
      files_in_default_gem spec
    else
      files_in_gem spec
    end
  end

  def files_in_gem(spec)
    gem_path  = spec.full_gem_path
    extra     = "/{#{spec.require_paths.join ","}}" if options[:lib_only]
    glob      = "#{gem_path}#{extra}/**/*"
    prefix_re = %r{#{Regexp.escape(gem_path)}/}

    Dir[glob].map do |file|
      [gem_path, file.sub(prefix_re, "")]
    end
  end

  def files_in_default_gem(spec)
    spec.files.filter_map do |file|
      if file.start_with?("#{spec.bindir}/")
        [RbConfig::CONFIG["bindir"], file.delete_prefix("#{spec.bindir}/")]
      else
        gem spec.name, spec.version

        require_path = spec.require_paths.find do |path|
          file.start_with?("#{path}/")
        end

        requirable_part = file.delete_prefix("#{require_path}/")

        resolve = $LOAD_PATH.resolve_feature_path(requirable_part)&.last
        next unless resolve

        [resolve.delete_suffix(requirable_part), requirable_part]
      end
    end
  end

  def gem_contents(name)
    spec = spec_for name

    return false rubygems/rubygems/commands/help_command.rb000064400000024244150403134200015010 0ustar00le to find gem '#{name}' in #{@path_kind}"

    if Gem.configuration.verbose
      say "\nDirectories searched:"
      @spec_dirs.sort.each {|dir| say dir }
    end

    nil
  end

  def specification_directories # :nodoc:
    options[:specdirs].flat_map do |i|
      [i, File.join(i, "specifications")]
    end
  end
end
rubygems/rubygems/commands/cleanup_command.rb000064400000010421150403134200015477 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../dependency_list"
require_relative "../uninstaller"

class Gem::Commands::CleanupCommand < Gem::Command
  def initialize
    super "cleanup",
          "Clean up old versions of installed gems",
          force: false, install_dir: Gem.dir,
          check_dev: true

    add_option("-n", "-d", "--dry-run",
               "Do not uninstall gems") do |_value, options|
      options[:dryrun] = true
    end

    add_option(:Deprecated, "--dryrun",
               "Do not uninstall gems") do |_value, options|
      options[:dryrun] = true
    end
    deprecate_option("--dryrun", extra_msg: "Use --dry-run instead")

    add_option("-D", "--[no-]check-development",
               "Check development dependencies while uninstalling",
               "(default: true)") do |value, options|
      options[:check_dev] = value
    end

    add_option("--[no-]user-install",
               "Cleanup in user's home directory instead",
               "of GEM_HOME.") do |value, options|
      options[:user_install] = value
    end

    @candidate_gems  = nil
    @default_gems    = []
    @full            = nil
    @gems_to_cleanup = nil
    @primary_gems    = nil
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to cleanup"
  end

  def defaults_str # :nodoc:
    "--no-dry-run"
  end

  def description # :nodoc:
    <<-EOF
The cleanup command removes old versions of gems from GEM_HOME that are not
required to meet a dependency.  If a gem is installed elsewhere in GEM_PATH
the cleanup command won't delete it.

If no gems are named all gems in GEM_HOME are cleaned.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [GEMNAME ...]"
  end

  def execute
    say "Cleaning up installed gems..."

    if options[:args].empty?
      done     = false
      last_set = nil

      until done do
        clean_gems

        this_set = @gems_to_cleanup.map(&:full_name).sort

        done = this_set.empty? || last_set == this_set

        last_set = this_set
      end
    else
      clean_gems
    end

    say "Clean up complete"

    verbose do
      skipped = @default_gems.map(&:full_name)

      "Skipped default gems: #{skipped.join ", "}"
    end
  end

  def clean_gems
    get_primary_gems
    get_candidate_gems
    get_gems_to_cleanup

    @full = Gem::DependencyList.from_specs

    deplist = Gem::DependencyList.new
    @gems_to_cleanup.each {|spec| deplist.add spec }

    deps = deplist.strongly_connected_components.flatten

    deps.reverse_each do |spec|
      uninstall_dep spec
    end
  end

  def get_candidate_gems
    @candidate_gems = if options[:args].empty?
      Gem::Specification.to_a
    else
      options[:args].flat_map do |gem_name|
        Gem::Specification.find_all_by_name gem_name
      end
    end
  end

  def get_gems_to_cleanup
    gems_to_cleanup = @candidate_gems.select do |spec|
      @primary_gems[spec.name].version != spec.version
    end

    default_gems, gems_to_cleanup = gems_to_cleanup.partition(&:default_gem?)

    uninstall_from = options[:user_install] ? Gem.user_dir : Gem.dir

    gems_to_cleanup = gems_to_cleanup.select do |spec|
      spec.base_dir == uninstall_from
    end

    @default_gems += default_gems
    @default_gems.uniq!
    @gems_to_cleanup = gems_to_cleanup.uniq
  end

  def get_primary_gems
    @primary_gems = {}

    Gem::Specification.each do |spec|
      if @primary_gems[spec.name].nil? ||
         @primary_gems[spec.name].version < spec.version
        @primary_gems[spec.name] = spec
      end
    end
  end

  def uninstall_dep(spec)
    return unless @full.ok_to_remove?(spec.full_name, options[:check_dev])

    if options[:dryrun]
      say "Dry Run Mode: Would uninstall #{spec.full_name}"
      return
    end

    say "Attempting to uninstall #{spec.full_name}"

    uninstall_options = {
      executables: false,
      version: "= #{spec.version}",
    }

    uninstall_options[:user_install] = Gem.user_dir == spec.base_dir

    uninstaller = Gem::Uninstaller.new spec.name, uninstall_options

    begin
      uninstaller.uninstall
    rescue Gem::DependencyRemovalException, Gem::InstallError,
           Gem::GemNotInHomeException, Gem::FilePermissionError => e
      say "Unable to uninstall #{spec.full_name}:"
      say "\t#{e.class}: #{e.message}"
    end
  end
end
rubygems/rubygems/commands/cert_command.rb000064400000022210150403134200015004 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../security"

class Gem::Commands::CertCommand < Gem::Command
  def initialize
    super "cert", "Manage RubyGems certificates and signing settings",
          add: [], remove: [], list: [], build: [], sign: []

    add_option("-a", "--add CERT",
               "Add a trusted certificate.") do |cert_file, options|
      options[:add] << open_cert(cert_file)
    end

    add_option("-l", "--list [FILTER]",
               "List trusted certificates where the",
               "subject contains FILTER") do |filter, options|
      filter ||= ""

      options[:list] << filter
    end

    add_option("-r", "--remove FILTER",
               "Remove trusted certificates where the",
               "subject contains FILTER") do |filter, options|
      options[:remove] << filter
    end

    add_option("-b", "--build EMAIL_ADDR",
               "Build private key and self-signed",
               "certificate for EMAIL_ADDR") do |email_address, options|
      options[:build] << email_address
    end

    add_option("-C", "--certificate CERT",
               "Signing certificate for --sign") do |cert_file, options|
      options[:issuer_cert] = open_cert(cert_file)
      options[:issuer_cert_file] = cert_file
    end

    add_option("-K", "--private-key KEY",
               "Key for --sign or --build") do |key_file, options|
      options[:key] = open_private_key(key_file)
    end

    add_option("-A", "--key-algorithm ALGORITHM",
               "Select which key algorithm to use for --build") do |algorithm, options|
      options[:key_algorithm] = algorithm
    end

    add_option("-s", "--sign CERT",
               "Signs CERT with the key from -K",
               "and the certificate from -C") do |cert_file, options|
      raise Gem::OptionParser::InvalidArgument, "#{cert_file}: does not exist" unless
        File.file? cert_file

      options[:sign] << cert_file
    end

    add_option("-d", "--days NUMBER_OF_DAYS",
               "Days before the certificate expires") do |days, options|
      options[:expiration_length_days] = days.to_i
    end

    add_option("-R", "--re-sign",
               "Re-signs the certificate from -C with the key from -K") do |resign, options|
      options[:resign] = resign
    end
  end

  def add_certificate(certificate) # :nodoc:
    Gem::Security.trust_dir.trust_cert certificate

    say "Added '#{certificate.subject}'"
  end

  def check_openssl
    return if Gem::HAVE_OPENSSL

    alert_error "OpenSSL library is required for the cert command"
    terminate_interaction 1
  end

  def open_cert(certificate_file)
    check_openssl
    OpenSSL::X509::Certificate.new File.read certificate_file
  rescue Errno::ENOENT
    raise Gem::OptionParser::InvalidArgument, "#{certificate_file}: does not exist"
  rescue OpenSSL::X509::CertificateError
    raise Gem::OptionParser::InvalidArgument,
      "#{certificate_file}: invalid X509 certificate"
  end

  def open_private_key(key_file)
    check_openssl
    passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
    key = OpenSSL::PKey.read File.read(key_file), passphrase
    raise Gem::OptionParser::InvalidArgument,
      "#{key_file}: private key not found" unless key.private?
    key
  rescue Errno::ENOENT
    raise Gem::OptionParser::InvalidArgument, "#{key_file}: does not exist"
  rescue OpenSSL::PKey::PKeyError, ArgumentError
    raise Gem::OptionParser::InvalidArgument, "#{key_file}: invalid RSA, DSA, or EC key"
  end

  def execute
    check_openssl

    options[:add].each do |certificate|
      add_certificate certificate
    end

    options[:remove].each do |filter|
      remove_certificates_matching filter
    end

    options[:list].each do |filter|
      list_certificates_matching filter
    end

    options[:build].each do |email|
      build email
    end

    if options[:resign]
      re_sign_cert(
        options[:issuer_cert],
        options[:issuer_cert_file],
        options[:key]
      )
    end

    sign_certificates unless options[:sign].empty?
  end

  def build(email)
    unless valid_email?(email)
      raise Gem::CommandLineError, "Invalid email address #{email}"
    end

    key, key_path = build_key
    cert_path = buildrubygems/rubygems/commands/dependency_command.rb000064400000012205150403134200016170 0ustar00          "Passphrase and passphrase confirmation don't match" unless passphrase == passphrase_confirmation

    algorithm = options[:key_algorithm] || Gem::Security::DEFAULT_KEY_ALGORITHM
    key = Gem::Security.create_key(algorithm)
    key_path = Gem::Security.write key, "gem-private_key.pem", 0o600, passphrase

    [key, key_path]
  end

  def certificates_matching(filter)
    return enum_for __method__, filter unless block_given?

    Gem::Security.trusted_certificates.select do |certificate, _|
      subject = certificate.subject.to_s
      subject.downcase.index filter
    end.sort_by do |certificate, _|
      certificate.subject.to_a.map {|name, data,| [name, data] }
    end.each do |certificate, path|
      yield certificate, path
    end
  end

  def description # :nodoc:
    <<-EOF
The cert command manages signing keys and certificates for creating signed
gems.  Your signing certificate and private key are typically stored in
~/.gem/gem-public_cert.pem and ~/.gem/gem-private_key.pem respectively.

To build a certificate for signing gems:

  gem cert --build you@example

If you already have an RSA key, or are creating a new certificate for an
existing key:

  gem cert --build you@example --private-key /path/to/key.pem

If you wish to trust a certificate you can add it to the trust list with:

  gem cert --add /path/to/cert.pem

You can list trusted certificates with:

  gem cert --list

or:

  gem cert --list cert_subject_substring

If you wish to remove a previously trusted certificate:

  gem cert --remove cert_subject_substring

To sign another gem author's certificate:

  gem cert --sign /path/to/other_cert.pem

For further reading on signing gems see `ri Gem::Security`.
    EOF
  end

  def list_certificates_matching(filter) # :nodoc:
    certificates_matching filter do |certificate, _|
      # this could probably be formatted more gracefully
      say certificate.subject.to_s
    end
  end

  def load_default_cert
    cert_file = File.join Gem.default_cert_path
    cert = File.read cert_file
    options[:issuer_cert] = OpenSSL::X509::Certificate.new cert
  rescue Errno::ENOENT
    alert_error \
      "--certificate not specified and ~/.gem/gem-public_cert.pem does not exist"

    terminate_interaction 1
  rescue OpenSSL::X509::CertificateError
    alert_error \
      "--certificate not specified and ~/.gem/gem-public_cert.pem is not valid"

    terminate_interaction 1
  end

  def load_default_key
    key_file = File.join Gem.default_key_path
    key = File.read key_file
    passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
    options[:key] = OpenSSL::PKey.read key, passphrase
  rescue Errno::ENOENT
    alert_error \
      "--private-key not specified and ~/.gem/gem-private_key.pem does not exist"

    terminate_interaction 1
  rescue OpenSSL::PKey::PKeyError
    alert_error \
      "--private-key not specified and ~/.gem/gem-private_key.pem is not valid"

    terminate_interaction 1
  end

  def load_defaults # :nodoc:
    load_default_cert unless options[:issuer_cert]
    load_default_key  unless options[:key]
  end

  def remove_certificates_matching(filter) # :nodoc:
    certificates_matching filter do |certificate, path|
      FileUtils.rm path
      say "Removed '#{certificate.subject}'"
    end
  end

  def sign(cert_file)
    cert = File.read cert_file
    cert = OpenSSL::X509::Certificate.new cert

    permissions = File.stat(cert_file).mode & 0o777

    issuer_cert = options[:issuer_cert]
    issuer_key = options[:key]

    cert = Gem::Security.sign cert, issuer_key, issuer_cert

    Gem::Security.write cert, cert_file, permissions
  end

  def sign_certificates # :nodoc:
    load_defaults unless options[:sign].empty?

    options[:sign].each do |cert_file|
      sign cert_file
    end
  end

  def re_sign_cert(cert, cert_path, private_key)
    Gem::Security::Signer.re_sign_cert(cert, cert_path, private_key) do |expired_cert_path, new_expired_cert_path|
      alert("Your certificate #{expired_cert_path} has been re-signed")
      alert("Your expired certificate will be located at: #{new_expired_cert_path}")
    end
  end

  private

  def valid_email?(email)
    # It's simple, but is all we need
    email =~ /\A.+@.+\z/
  end
end
rubygems/rubygems/commands/help_command.rb000064400000024241150403134200015005 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::HelpCommand < Gem::Command
  # :stopdoc:
  EXAMPLErubygems/rubygems/commands/pristine_command.rb000064400000014301150403134200015706 0ustar00system
  EOF

  GEM_DEPENDENCIES = <<-EOF
A gem dependencies file allows installation of a consistent set of gems across
multiple environments.  The RubyGems implementation is designed to be
compatible with Bundler's Gemfile format.  You can see additional
documentation on the format at:

  https://bundler.io

RubyGems automatically looks for these gem dependencies files:

* gem.deps.rb
* Gemfile
* Isolate

These files are looked up automatically using `gem install -g`, or you can
specify a custom file.

When the RUBYGEMS_GEMDEPS environment variable is set to a gem dependencies
file the gems from that file will be activated at startup time.  Set it to a
specific filename or to "-" to have RubyGems automatically discover the gem
dependencies file by walking up from the current directory.

You can also activate gem dependencies at program startup using
Gem.use_gemdeps.

NOTE: Enabling automatic discovery on multiuser systems can lead to execution
of arbitrary code when used from directories outside your control.

Gem Dependencies
================

Use #gem to declare which gems you directly depend upon:

  gem 'rake'

To depend on a specific set of versions:

  gem 'rake', '~> 10.3', '>= 10.3.2'

RubyGems will require the gem name when activating the gem using
the RUBYGEMS_GEMDEPS environment variable or Gem::use_gemdeps.  Use the
require: option to override this behavior if the gem does not have a file of
that name or you don't want to require those files:

  gem 'my_gem', require: 'other_file'

To prevent RubyGems from requiring any files use:

  gem 'my_gem', require: false

To load dependencies from a .gemspec file:

  gemspec

RubyGems looks for the first .gemspec file in the current directory.  To
override this use the name: option:

  gemspec name: 'specific_gem'

To look in a different directory use the path: option:

  gemspec name: 'specific_gem', path: 'gemspecs'

To depend on a gem unpacked into a local directory:

  gem 'modified_gem', path: 'vendor/modified_gem'

To depend on a gem from git:

  gem 'private_gem', git: 'git@my.company.example:private_gem.git'

To depend on a gem from github:

  gem 'private_gem', github: 'my_company/private_gem'

To depend on a gem from a github gist:

  gem 'bang', gist: '1232884'

Git, github and gist support the ref:, branch: and tag: options to specify a
commit reference or hash, branch or tag respectively to use for the gem.

Setting the submodules: option to true for git, github and gist dependencies
causes fetching of submodules when fetching the repository.

You can depend on multiple gems from a single repository with the git method:

  git 'https://github.com/rails/rails.git' do
    gem 'activesupport'
    gem 'activerecord'
  end

Gem Sources
===========

RubyGems uses the default sources for regular `gem install` for gem
dependencies files.  Unlike bundler, you do need to specify a source.

You can override the sources used for downloading gems with:

  source 'https://gem_server.example'

You may specify multiple sources.  Unlike bundler the prepend: option is not
supported. Sources are used in-order, to prepend a source place it at the
front of the list.

Gem Platform
============

You can restrict gem dependencies to specific platforms with the #platform
and #platforms methods:

  platform :ruby_21 do
    gem 'debugger'
  end

See the bundler Gemfile manual page for a list of platforms supported in a gem
dependencies file.:

  https://bundler.io/v2.5/man/gemfile.5.html

Ruby Version and Engine Dependency
==================================

You can specify the version, engine and engine version of ruby to use with
your gem dependencies file.  If you are not running the specified version
RubyGems will raise an exception.

To depend on a specific version of ruby:

  ruby '2.1.2'

To depend on a specific ruby engine:

  ruby '1.9.3', engine: 'jruby'

To depend on a specific ruby engine version:

  ruby '1.9.3', engine: 'jruby', engine_version: '1.7.11'

Grouping Dependencies
=====================

Gem dependencies may be placed in groups that can be excluded from install.
Dependencies required for development or testing of your code may be excluded
when installed in a production environment.

A #gem dependency may be placed in a group using the group: option:

  gem 'minitest', group: :test

To install dependencies from a gemfile without specific groups use the
`--without` option for `gem install -g`:

  $ gem install -g --without test

The group: option also accepts multiple groups if the gem fits in multiple
categories.

Multiple groups may be excluded during install by comma-separating the groups for `--without` or by specifying `--without` multiple times.

The #group method can also be used to place gems in groups:

  group :test do
    gem 'minitest'
    gem 'minitest-emoji'
  end

The #group method allows multiple groups.

The #gemspec development dependencies are placed in the :development group by
default.  This may be overridden with the :development_group option:

  gemspec development_group: :other

  EOF

  PLATFORMS = <<-'EOF'
RubyGems platforms are composed of three parts, a CPU, an OS, and a
version.  These values are taken from values in rbconfig.rb.  You can view
your current platform by running `gem environment`.

RubyGems matches platforms as follows:

  * The CPU must match exactly unless one of the platforms has
    "universal" as the CPU or the local CPU starts with "arm" and the gem's
    CPU is exactly "arm" (for gems that support generic ARM architecture).
  * The OS must match exactly.
  * The versions must match exactly unless one of the versions is nil.

For commands that install, uninstall and list gems, you can override what
RubyGems thinks your platform is with the --platform option.  The platform
you pass must match "#{cpu}-#{os}" or "#{cpu}-#{os}-#{version}".  On mswin
platforms, the version is the compiler version, not the OS version.  (Ruby
compiled with VC6 uses "60" as the compiler version, VC8 uses "80".)

For the ARM architecture, gems with a platform of "arm-linux" should run on a
reasonable set of ARM CPUs and not depend on instructions present on a limited
subset of the architecture.  For example, the binary should run on platforms
armv5, armv6hf, armv6l, armv7, etc.  If you use the "arm-linux" platform
please test your rubygems/rubygems/commands/environment_command.rb000064400000012454150403134200016424 0ustar00ms",        PLATFORMS],
  ].freeze
  # :startdoc:

  def initialize
    super "help", "Provide help on the 'gem' command"

    @command_manager = Gem::CommandManager.instance
  end

  def usage # :nodoc:
    "#{program_name} ARGUMENT"
  end

  def execute
    arg = options[:args][0]

    _, help = SUBCOMMANDS.find do |command,|
      begins? command, arg
    end

    if help
      if Symbol === help
        send help
      else
        say help
      end
      return
    end

    if options[:help]
      show_help

    elsif arg
      show_command_help arg

    else
      say Gem::Command::HELP
    end
  end

  def show_commands # :nodoc:
    out = []
    out << "GEM commands are:"
    out << nil

    margin_width = 4

    desc_width = @command_manager.command_names.map(&:size).max + 4

    summary_width = 80 - margin_width - desc_width
    wrap_indent = " " * (margin_width + desc_width)
    format = "#{" " * margin_width}%-#{desc_width}s%s"

    @command_manager.command_names.each do |cmd_name|
      command = @command_manager[cmd_name]

      next if command&.deprecated?

      summary =
        if command
          command.summary
        else
          "[No command found for #{cmd_name}]"
        end

      summary = wrap(summary, summary_width).split "\n"
      out << format(format, cmd_name, summary.shift)
      until summary.empty? do
        out << "#{wrap_indent}#{summary.shift}"
      end
    end

    out << nil
    out << "For help on a particular command, use 'gem help COMMAND'."
    out << nil
    out << "Commands may be abbreviated, so long as they are unambiguous."
    out << "e.g. 'gem i rake' is short for 'gem install rake'."

    say out.join("\n")
  end

  def show_command_help(command_name) # :nodoc:
    command_name = command_name.downcase

    possibilities = @command_manager.find_command_possibilities command_name

    if possibilities.size == 1
      command = @command_manager[possibilities.first]
      command.invoke("--help")
    elsif possibilities.size > 1
      alert_warning "Ambiguous command #{command_name} (#{possibilities.join(", ")})"
    else
      alert_warning "Unknown command #{command_name}. Try: gem help commands"
    end
  end
end
rubygems/rubygems/commands/dependency_command.rb000064400000012126150403134200016172 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../version_option"

class Gem::Commands::DependencyCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def initialize
    super "dependency",
          "Show the dependencies of an installed gem",
          version: Gem::Requirement.default, domain: :local

    add_version_option
    add_platform_option
    add_prerelease_option

    add_option("-R", "--[no-]reverse-dependencies",
               "Include reverse dependencies in the output") do |value, options|
      options[:reverse_dependencies] = value
    end

    add_option("-p", "--pipe",
               "Pipe Format (name --version ver)") do |value, options|
      options[:pipe_format] = value
    end

    add_local_remote_options
  end

  def arguments # :nodoc:
    "REGEXP        show dependencies for gems whose names start with REGEXP"
  end

  def defaults_str # :nodoc:
    "--local --version '#{Gem::Requirement.default}' --no-reverse-dependencies"
  end

  def description # :nodoc:
    <<-EOF
The dependency commands lists which other gems a given gem depends on.  For
local gems only the reverse dependencies can be shown (which gems depend on
the named gem).

The dependency list can be displayed in a format suitable for piping for
use with other commands.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} REGEXP"
  end

  def fetch_remote_specs(name, requirement, prerelease) # :nodoc:
    fetcher = Gem::SpecFetcher.fetcher

    specs_type = prerelease ? :complete : :released

    ss = if name.nil?
      fetcher.detect(specs_type) { true }
    else
      fetcher.detect(specs_type) do |name_tuple|
        name === name_tuple.name && requirement.satisfied_by?(name_tuple.version)
      end
    end

    ss.map {|tuple, source| source.fetch_spec(tuple) }
  end

  def fetch_specs(name_pattern, requirement, prerelease) # :nodoc:
    specs = []

    if local?
      specs.concat Gem::Specification.stubs.find_all {|spec|
        name_matches = name_pattern ? name_pattern =~ spec.name : true
        version_matches = requirement.satisfied_by?(spec.version)

        name_matches && version_matches
      }.map(&:to_spec)
    end

    specs.concat fetch_remote_specs name_pattern, requirement, prerelerubygems/rubygems/commands/signin_command.rb000064400000001600150403134200015336 0ustar00ocal_only_reverse_dependencies

    pattern = name_pattern options[:args]
    requirement = Gem::Requirement.new options[:version]

    specs = fetch_specs pattern, requirement, options[:prerelease]

    reverse = reverse_dependencies specs

    if options[:pipe_format]
      display_pipe specs
    else
      display_readable specs, reverse
    end
  end

  def ensure_local_only_reverse_dependencies # :nodoc:
    if options[:reverse_dependencies] && remote? && !local?
      alert_error "Only reverse dependencies for local gems are supported."
      terminate_interaction 1
    end
  end

  def ensure_specs(specs) # :nodoc:
    return unless specs.empty?

    patterns = options[:args].join ","
    say "No gems found matching #{patterns} (#{options[:version]})" if
      Gem.configuration.verbose

    terminate_interaction 1
  end

  def print_dependencies(spec, level = 0) # :nodoc:
    rubygems/rubygems/commands/query_command.rb000064400000002355150403134200015224 0ustar00odoc:
    result = []

    Gem::Specification.each do |sp|
      sp.dependencies.each do |dep|
        dep = Gem::Dependency.new(*dep) unless Gem::Dependency === dep

        if spec.name == dep.name &&
           dep.requirement.satisfied_by?(spec.version)
          result << [sp.full_name, dep]
        end
      end
    end

    result
  end

  private

  def name_pattern(args)
    return if args.empty?

    if args.length == 1 && args.first =~ /\A(.*)(i)?\z/m
      flags = $2 ? Regexp::IGNORECASE : nil
      Regexp.new $1, flags
    else
      /\A#{Regexp.union(*args)}/
    end
  end
end
rubygems/rubygems/commands/pristine_command.rb000064400000015304150403134200015712 0rubygems/rubygems/commands/specification_command.rb000064400000006635150403134200016704 0ustar00_option("--all",
               "Restore all installed gems to pristine",
               "condition") do |value, options|
      options[:all] = value
    end

    add_option("--skip=gem_name",
               "used on --all, skip if name == gem_name") do |value, options|
      options[:skip] ||= []
      options[:skip] << value
    end

    add_option("--[no-]extensions",
               "Restore gems with extensions",
               "in addition to regular gems") do |value, options|
      options[:extensions_set] = true
      options[:extensions]     = value
    end

    add_option("--only-missing-extensions",
               "Only restore gems with missing extensions") do |value, options|
      options[:only_missing_extensions] = value
    end

    add_option("--only-executables",
               "Only restore executables") do |value, options|
      options[:only_executables] = value
    end

    add_option("--only-plugins",
               "Only restore plugins") do |value, options|
      options[:only_plugins] = value
    end

    add_option("-E", "--[no-]env-shebang",
               "Rewrite executables with a shebang",
               "of /usr/bin/env") do |value, options|
      options[:env_shebang] = value
    end

    add_option("-i", "--install-dir DIR",
               "Gem repository to get gems restored") do |value, options|
      options[:install_dir] = File.expand_path(value)
    end

    add_option("-n", "--bindir DIR",
               "Directory where executables are",
               "located") do |value, options|
      options[:bin_dir] = File.expand_path(value)
    end

    add_version_option("restore to", "pristine condition")
  end

  def arguments # :nodoc:
    "GEMNAME       gem to restore to pristine condition (unless --all)"
  end

  def defaults_str # :nodoc:
    "--extensions"
  end

  def description # :nodoc:
    <<-EOF
The pristine command compares an installed gem with the contents of its
cached .gem file and restores any files that don't match the cached .gem's
copy.

If you have made modifications to an installed gem, the pristine command
will revert them.  All extensions are rebuilt and all bin stubs for the gem
are regenerated after checking for modifications.

If the cached gem cannot be found it will be downloaded.

If --no-extensions is provided pristine will not attempt to restore a gem
with an extension.

If --extensions is given (but not --all or gem names) only gems with
extensions will be restored.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [GEMNAME ...]"
  end

  def execute
    install_dir = options[:install_dir]

    specification_record = install_dir ? Gem::SpecificationRecord.from_path(install_dir) : Gem::Specification.specification_record

    specs = if options[:all]
      specification_record.map

    # `--extensions` must be explicitly given to pristine only gems
    # with extensions.
    elsif options[:extensions_set] &&
          options[:extensions] && options[:args].empty?
      specification_record.select do |spec|
        spec.extensions && !spec.extensions.empty?
      end
    elsif options[:only_missing_extensions]
      specification_record.select(&:missing_extensions?)
    else
      get_all_gem_names.sort.flat_map do |gem_name|
        specification_record.find_all_by_name(gem_name, options[:version]).reverse
      end
    end

    specs = specs.select {|spec| spec.platform == RUBY_ENGINE || Gem::Platform.local === spec.platform || spec.platform == Gemrubygems/rubygems/commands/owner_command.rb000064400000006632150403134200015213 0ustar00ing executables if it's a default gem.
        options[:only_executables] = true if spec.default_gem?
      end

      if options.key? :skip
        if options[:skip].include? spec.name
          say "Skipped #{spec.full_name}, it was given through options"
          next
        end
      end

      unless spec.extensions.empty? || options[:extensions] || only_executables_or_plugins?
        say "Skipped #{spec.full_name_with_location}, it needs to compile an extension"
        next
      end

      gem = spec.cache_file

      unless File.exist?(gem) || only_executables_or_plugins?
        require_relative "../remote_fetcher"

        say "Cached gem for #{spec.full_name_with_location} not found, attempting to fetch..."

        dep = Gem::Dependency.new spec.name, spec.version
        found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dep

        if found.empty?
          say "Skipped #{spec.full_name}, it was not found from cache and remote sources"
          next
        end

        spec_candidate, source = found.first
        Gem::RemoteFetcher.fetcher.download spec_candidate, source.uri.to_s, spec.base_dir
      end

      env_shebang =
        if options.include? :env_shebang
          options[:env_shebang]
        else
          install_defaults = Gem::ConfigFile::PLATFORM_DEFAULTS["install"]
          install_defaults.to_s["--env-shebang"]
        end

      bin_dir = options[:bin_dir] if options[:bin_dir]

      installer_options = {
        wrappers: true,
        force: true,
        install_dir: install_dir || spec.base_dir,
        env_shebang: env_shebang,
        build_args: spec.build_args,
        bin_dir: bin_dir,
      }

      if options[:only_executables]
        installer = Gem::Installer.for_spec(spec, installer_options)
        installer.generate_bin
      elsif options[:only_plugins]
        installer = Gem::Installer.for_spec(spec, installer_options)
        installer.generate_plugins
      else
        installer = Gem::Installer.at(gem, installer_options)
        installer.install
      end

      say "Restored #{spec.full_name_with_location}"
    end
  end

  private

  def only_executables_or_plugins?
    options[:only_executables] || options[:only_plugins]
  end
end
rubygems/rubygems/commands/environment_command.rb000064400000012716150403134200016425 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::EnvironmentCommand < Gem::Command
  def initialize
    super "environment", "Display information about the RubyGems environment"
  end

  def arguments # :nodoc:
    args = <<-EOF
          home            display the path where gems are installed. Aliases: gemhome, gemdir, GEM_HOME
          path            display path usedrubygems/rubygems/commands/search_command.rb000064400000001721150403134200015320 0ustar00r
use in shell scripts or as a debugging aid.

The RubyGems environment can be controlled through command line arguments,
gemrc files, environment variables and built-in defaults.

Command line argument defaults and some RubyGems defaults can be set in a
~/.gemrc file for individual users and a gemrc in the SYSTEM CONFIGURATION
DIRECTORY for all users. These files are YAML files with the following YAML
keys:

  :sources: A YAML array of remote gem repositories to install gems from
  :verbose: Verbosity of the gem command. false, true, and :really are the
            levels
  :update_sources: Enable/disable automatic updating of repository metadata
  :backtrace: Print backtrace when RubyGems encounters an error
  :gempath: The paths in which to look for gems
  :disable_default_gem_server: Force specification of gem server host on push
  <gem_command>: A string containing arguments for the specified gem command

Example:

  :verbose: false
  install: --no-wrappers
rubygems/rubygems/commands/which_command.rb000064400000004141150403134200015154 0ustar00I for that server.

If you are packaging RubyGems all of RubyGems' defaults are in
lib/rubygems/defaults.rb.  You may override these in
lib/rubygems/defaults/operating_system.rb
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [arg]"
  end

  def execute
    out = String.new
    arg = options[:args][0]
    out <<
      case arg
      when /^version/ then
        Gem::VERSION
      when /^gemdir/, /^gemhome/, /^home/, /^GEM_HOME/ then
        Gem.dir
      when /^gempath/, /^path/, /^GEM_PATH/ then
        Gem.path.join(File::PATH_SEPARATOR)
      when /^user_gemdir/, /^user_gemhome/ then
        Gem.user_dir
      when /^remotesources/ then
        Gem.sources.to_a.join("\n")
      when /^platform/ then
        Gem.platforms.join(File::PATH_SEPARATOR)
      when /^credentials/, /^creds/ then
        Gem.configuration.credentials_path
      when nil then
        show_environment
      else
        raise Gem::CommandLineError, "Unknown environment option [#{arg}]"
      end
    say out
    true
  end

  def add_path(out, path)
    path.each do |component|
      out << "     - #{component}\n"
    end
  end

  def show_environment # :nodoc:
    out = "RubyGems Environment:\n".dup

    out << "  - RUBYGEMS VERSION: #{Gem::VERSION}\n"

    out << "  - RUBY VERSION: #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]\n"

    out << "  - INSTALLATION DIRECTORY: #{Gem.dir}\n"

    out << "  - USER INSTALLATION DIRECTORY: #{Gem.user_dir}\n"

    out << "  - CREDENTIALS FILE: #{Gem.configuration.credentials_path}\n"

    out << "  - RUBYGEMS PREFIX: #{Gem.prefix}\n" unless Gem.prefix.nil?

    out << "  - RUBY EXECUTABLE: #{Gem.ruby}\n"

    out << "  - GIT EXECUTABLE: #{git_path}\n"

    out << "  - EXECUTABLE DIRECTORY: #{Gem.bindir}\n"

    out << "  - SPEC CACHE DIRECTORY: #{Gem.spec_cache_dir}\n"

    out << "  - SYSTEM CONFIGURATION DIRECTORY: #{Gem::ConfigFile::SYSTEM_CONFIG_PATH}\n"

    out << "  - RUBYGEMS PLATFORMS:\n"
    Gem.platforms.each do |platform|
      out << "     - #{platform}\n"
    end

    out << "  - GEM PATHS:\n"
    out << "     - #{Gem.dir}\n"

 rubygems/rubygems/commands/yank_command.rb000064400000004533150403134200015021 0ustar00rubygems/rubygems/commands/signin_command.rb000064400000001600150403134200015336 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../gemcutter_utilities"

class Gem::Commands::SigninCommand < Gem::Command
  include Gem::GemcutterUtilities

  def initialize
    super "signin", "Sign in to any gemcutter-compatible host. "\
          "It defaults to https://rubygems.org"

    add_option("--host HOST", "Push to another gemcutter-compatible host") do |value, options|
      options[:host] = value
    end

    add_otp_option
  end

  def description # :nodoc:
    "The signin command executes host sign in for a push server (the default is"\
    " https://rubygems.org). The host can be provided with the host flag or can"\
    " be inferred from the provided gem. Host resolution matches the resolution"\
    " strategy for the push command."
  end

  def usage # :nodoc:
    program_name
  end

  def execute
    sign_in options[:host]
  end
end
rubygems/rubygems/commands/query_command.rb000064400000002327150403134200015223 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"
require_relative "../deprecate"

class Gem::Commands::QueryCommand < Gem::Command
  extend Gem::Deprecate
  rubygems_deprecate_command

  include Gem::QueryUtils

  alias_method :warning_without_suggested_alternatives, :deprecation_warning
  def deprecrubygems/rubygems/commands/info_command.rb000064400000001524150403134200015007 0ustar00def description # :nodoc:
    <<-EOF
The query command is the basis for the list and search commands.

You should really use the list and search commands instead.  This command
is too hard to use.
    EOF
  end
end
rubygems/rubygems/commands/specification_command.rb000064400000006732150403134200016702 0ustar00rubygems/rubygems/commands/lock_command.rb000064400000005305150403134200015005 0ustar00")
    add_platform_option
    add_prerelease_option

    add_option("--all", "Output specifications for all versions of",
               "the gem") do |_value, options|
      options[:all] = true
    end

    add_option("--ruby", "Output ruby format") do |_value, options|
      options[:format] = :ruby
    end

    add_option("--yaml", "Output YAML format") do |_value, options|
      options[:format] = :yaml
    end

    add_option("--marshal", "Output Marshal format") do |_value, options|
      options[:format] = :marshal
    end

    add_local_remote_options
  end

  def arguments # :nodoc:
    <<-ARGS
GEMFILE       name of gem to show the gemspec for
FIELD         name of gemspec field to show
    ARGS
  end

  def defaults_str # :nodoc:
    "--local --version '#{Gem::Requirement.default}' --yaml"
  end

  def description # :nodoc:
    <<-EOF
The specification command allows you to extract the specification from
a gem for examination.

The specification can be output in YAML, ruby or Marshal formats.

Specific fields in the specification can be extracted in YAML format:

  $ gem spec rake summary
  --- Ruby based make-like utility.
  ...

    EOF
  end

  def usage # :nodoc:
    "#{program_name} [GEMFILE] [FIELD]"
  end

  def execute
    specs = []
    gem = options[:args].shift

    unless gem
      raise Gem::CommandLineError,
            "Please specify a gem name or file on the command line"
    end

    case v = options[:version]
    when String
      req = Gem::Requirement.create v
    when Gem::Requirement
      req = v
    else
      raise Gem::CommandLineError, "Unsupported version type: '#{v}'"
    end

    if !req.none? && options[:all]
      alert_error "Specify --all or -v, not both"
      terminate_interaction 1
    end

    if options[:all]
      dep = Gem::Dependency.new gem
    else
      dep = Gem::Dependency.new gem, req
    end

    field = get_one_optional_argument

    raise Gem::CommandLineError, "--ruby and FIELD are mutually exclusive" if
      field && options[:format] == :ruby

    if local?
      if File.exist? gem
        begin
          specs << Gem::Package.new(gem).spec
        rescue StandardError
          nil
        end
      end

      if specs.empty?
        specs.push(*dep.matching_specs)
      end
    end

    if remote?
      dep.prerelease = options[:prerelease]
      found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dep

      specs.push(*found.map {|spec,| spec })
    end

    if specs.empty?
      alert_error "No gem matching '#{dep}' found"
      terminate_interaction 1
    end

    platform = get_platform_from_requirements(options)

    if platform
      specs = specs.select {|s| s.platform.to_s == platform }
    end

    unless options[:all]
      sprubygems/rubygems/commands/signout_command.rb000064400000001602150403134200015541 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../gemcutter_utilities"
require_relative "../text"

class Gem::Commands::OwnerCommand < Gem::Command
  include Gem::Text
  include Gem::LocalRemoteOptions
  include Gem::GemcutterUtilities

  def description # :nodoc:
    <<-EOF
The owner command lets you add and remove owners of a gem on a push
server (the default is https://rubygems.org). Multiple owners can be
added or removed at the same time, if the flag is given multiple times.

The supported user identifiers are dependent on the push server.
For rubygems.org, both e-mail and handle are supported, even though the
user identifier field is called "email".

The owner of a gem has the permission to push new versions, yank existing
versions or edit the HTML page of the gem.  Be careful of who you give push
permissirubygems/rubygems/commands/list_command.rb000064400000001764150403134200015035 0ustar00OST",
               "Use another gemcutter-compatible host",
               "  (e.g. https://rubygems.org)" do |value, options|
      options[:host] = value
    end
  end

  def execute
    @host = options[:host]

    sign_in(scope: get_owner_scope)
    name = get_one_gem_name

    add_owners    name, options[:add]
    remove_owners name, options[:remove]
    show_owners   name
  end

  def show_owners(name)
    Gem.load_yaml

    response = rubygems_api_request :get, "api/v1/gems/#{name}/owners.yaml" do |request|
      request.add_field "Authorization", api_key
    end

    with_response response do |resp|
      owners = Gem::SafeYAML.load clean_text(resp.body)

      say "Owners for gem: #{name}"
      owners.each do |owner|
        say "- #{owner["email"] || owner["handle"] || owner["id"]}"
      end
    end
  end

  def add_owners(name, owners)
    manage_owners :post, name, owners
  end

  def remove_owners(name, owners)
    manage_owners :delete, name, owners
  end

  def manage_owners(methrubygems/rubygems/commands/generate_index_command.rb000064400000005644150403134200017044 0ustar00ner_scope(method: method) do |request|
      request.set_form_data "email" => owner
      request.add_field "Authorization", api_key
    end
  end

  def get_owner_scope(method: nil)
    if method == :post || options.any? && options[:add].any?
      :add_owner
    elsif method == :delete || options.any? && options[:remove].any?
      :remove_owner
    end
  end
end
rubygems/rubygems/commands/search_command.rb000064400000001702150403134200015317 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"

class Gem::Commands::SearchCommand < Gem::Command
  include Gem::QueryUtils

  def initialize
    super "search", "Display remote gems whose name matches REGEXP",
         domain: :remote, details: false, versions: true,
         installed: nil, version: Gem::Requirement.default

    add_query_options
  end

  def arguments # :nodoc:
    "REGEXP        regexp to search for in gem name"
  end

  def defaults_str # :nodoc:
    "--remote --no-details"
  end

  def description # :nodoc:
    <<-EOF
The search command displays remote gems whose name matches the given
regexp.

The --details option displays additional details from the gem but will
take a little longer to complete as it must download the information
individually from the index.

To list local gems use the list command.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [REGEXP]"
  end
end
rubygems/rubygems/commands/which_command.rb000064400000004133150403134200015155 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::WhichCommand < Gem::Command
  def initialize
    super "which", "Find the location of a library file you can require",
          search_gems_first: false, show_all: false

    add_option "-a", "--[no-]all", "show all matching files" do |show_all, options|
      options[:show_all] = show_all
    end

    add_option "-g", "--[no-]gems-firubygems/rubygems/commands/mirror_command.rb000064400000001163150403134200015365 0ustar00ave as you expect.
    EOF
  end

  def execute
    found = true

    options[:args].each do |arg|
      arg = arg.sub(/#{Regexp.union(*Gem.suffixes)}$/, "")
      dirs = $LOAD_PATH

      spec = Gem::Specification.find_by_path arg

      if spec
        if options[:search_gems_first]
          dirs = spec.full_require_paths + $LOAD_PATH
        else
          dirs = $LOAD_PATH + spec.full_require_paths
        end
      end

      paths = find_paths arg, dirs

      if paths.empty?
        alert_error "Can't find Ruby library file or shared library #{arg}"
        found = false
      else
        say paths
      end
  rubygems/rubygems/commands/check_command.rb000064400000004365150403134200015137 0ustar00rubygems/rubygems/commands/yank_command.rb000064400000004544150403134200015023 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../version_option"
require_relative "../gemcutter_utilities"

class Gem::Commands::YankCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::VersionOption
  include Gem::GemcutterUtilities

  def description # :nodoc:
    <<-EOF
The yank command permanently removes a gem you pushed to a server.

Once you have pushed a gem several downloads will happen automatically
via the webhooks. If you accidentally pushed passwords or other sensitive
data you will need to change them immediately and yank your gem.
    EOF
  end

  def arguments # :nodoc:
    "GEM       name of gem"
  end

  def usage # :nodoc:
    "#{program_name} -v VERSION [-p PLATFORM] [--key KEY_NAME] [--host HOST] GEM"
  end

  def initialize
    super "yank", "Remove a pushed gem from the index"

    add_version_option("remove")
    add_platform_option("remove")
    add_otp_option

    add_option("--host HOST",
               "Yank from another gemcutter-compatible host",
               "  (e.g. https://rubygems.org)") do |value, options|
      options[:host] = value
    end

    add_key_option
    @host = nil
  end

  def execute
    @host = options[:host]

    sign_in @host, scope: get_yank_scope

    version   = get_version_from_requirements(options[:version])
    platform  = get_platform_from_requirements(options)

    if version
      yank_gem(version, platform)
    else
      say "A version argument is required: #{usage}"
      terminate_interaction
    end
  end

  def yank_gem(version, platform)
    say "Yanking gem from #{host}..."
    args = [:delete, version, platform, "api/v1/gems/yank"]
    response = yank_api_request(*args)

    say responsrubygems/rubygems/commands/outdated_command.rb000064400000001540150403134200015663 0ustar00rubygems/rubygems/commands/info_command.rb000064400000001502150403134200015003 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"

class Gem::Commands::InfoCommand < Gem::Command
  include Gem::QueryUtils

  def initialize
    super "info", "Show information for the given gem",
         name: //, domain: :local, details: false, versions: true,
         installed: nil, version: Gem::Rerubygems/rubygems/commands/exec_command.rb000064400000015464150403134200015010 0ustar00rubygems/rubygems/commands/lock_command.rb000064400000005302150403134200015002 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::LockCommand < Gem::Command
  def initialize
    super "lock", "Generate a lockdown list of gems",
          strict: false

    add_option "-s", "--[no-]strict",
               "fail if unable to satisfy a dependency" do |strict, options|
      options[:strict] = strict
    end
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to lock\nVERSION       version of gem to lock"
  end

  def defaults_str # :nodoc:
    "--no-strict"
  end

  def description # :nodoc:
    <<-EOF
The lock command will generate a list of +gem+ statements that will lock down
the versions for the gem given in the command line.  It will specify exact
versions in the requirements list to ensure that the gems loaded will always
be consistent.  A full recursive search of all effected gems will be
generated.

Example:

  gem lock rails-1.0.0 > lockdown.rb

will produce in lockdown.rb:

  require "rubygems"
  gem 'rails', '= 1.0.0'
  gem 'rake', '= 0.7.0.1'
  gem 'activesupport', '= 1.2.5'
  gem 'activerecord', '= 1.13.2'
  gem 'actionpack', '= 1.11.2'
  gem 'actionmailer', '= 1.1.5'
  gem 'actionwebservice', '= 1.0.0'

Just load lockdown.rb from your application to ensure that the current
versions are loaded.  Make sure that lockdown.rb is loaded *before* any
other require statements.

Notice that rails 1.0.0 only requires that rake 0.6.2 or better be used.
Rake-0.7.0.1 is the most recent version installed that satisfies that, so we
lock it down to the exact version.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME-VERSION [GEMNAME-VERSION ...]"
  end

  def complain(message)
    if options[:strict]
      raise Gem::Exception, message
    else
      say "# #{message}"
    end
  end

  def execute
    say "require 'rubygems'"

    locked = {}

    pending = options[:args]

    until pending.empty? do
      full_name = pending.shift

      spec = Gem::Specification.load spec_path(full_name)

      if spec.nil?
        complain "Could not find gem #{full_name}, try using the full name"
        next
      end

      say "gem '#{spec.name}', '= #{spec.version}'" unless locked[spec.name]
      locked[spec.name] = true

      spec.runtime_dependencies.each do |dep|
        next if locked[dep.name]
        candidates = dep.matching_specs

        if candidates.empty?
          complain "Unable to satisfy '#{dep}' from currently installed gems"
        else
          pending << candidates.last.full_name
        end
      end
    end
  end

  def spec_path(gem_full_name)
    gemspecs = Gem.path.map do |path|
      File.join path, "specifications", "#{gem_full_name}.gemspec"
    end

    gemspecs.find {|path| File.exist? path }
  end
end
rubygems/rubygems/commands/signout_command.rb000064400000001602150403134200015541 0ustar00# frozen_string_literal: true

require_relative "../command"

class Gem::Commands::SignoutCommand < Gem::Command
  def initialize
    super "signout", "Sign out from all the current sessions."
  end

  def description # :nodoc:
    "The `signout` command is used to sign out from all current sessions,"\
    " allowing you to sign in using a different set of credentials."
  end

  def usage # :nodoc:
    program_name
  end

  def execute
    credentials_path = Gem.configuration.credentials_path

    if !File.exist?(credentials_path)
      alert_error "You are not currently signed in."
    elsif !File.writable?(credentials_path)
      alert_error "File '#{Gem.configuration.credentials_path}' is read-only."\
                  " Please make sure it is writable."
    else
      Gem.configuration.unset_api_key!
      say "You have successfully signed out from all sessions."
    end
  end
end
rubygems/rubygems/commands/list_command.rb000064400000001745150403134200015034 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../query_utils"

##
# Searches for gems starting with the supplied argument.

class Gem::Commands::ListCommand < Gem::Command
  include Gem::QueryUtils

  def initialize
    super "list", "Display local gems whose name matches REGEXP",
         domain: :local, details: false, versions: true,
         installed: nil, version: Gem::Requirement.default

    add_query_options
  end

  def arguments # :nodoc:
    "REGEXP        regexp to look for in gem name"
  end

  def defaults_str # :nodoc:
    "--local --no-details"
  end

  def description # :nodoc:
    <<-EOF
The list command is used to view the gems you have installed locally.

The --details option displays additional details including the summary, the
homepage, the author, the locations of different versions of the gem.

To search for remote gems use the search command.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [REGEXP ...]"
  end
end
rubygems/rubygems/commands/generate_index_command.rb000064400000003351150403134200017035 0ustar00rubygems/rubygems/commands/setup_command.rb000064400000044025150403134200015217 0ustar00rgs(args, build_args)
        name = "rubygems-generate_index"
        spec = begin
          Gem::Specification.find_by_name(name)
        rescue Gem::LoadError
          require "rubygems/dependency_installer"
          Gem.install(name, Gem::Requirement.default, Gem::DependencyInstaller::DEFAULT_OPTIONS).find {|s| s.name == name }
        end

        # remove the methods defined in this file so that the methods defined in the gem are used instead,
        # and without a method redefinition warning
        %w[description execute invoke_with_build_args].each do |method|
          RubygemsTrampoline.remove_method(method)
        end
        self.class.singleton_class.remove_method(:new)

        spec.activate
        Gem.load_plugin_files spec.matches_for_glob("rubygems_plugin#{Gem.suffix_pattern}")

        self.class.new.invoke_with_build_args(args, build_args)
      end
    end
    private_constant :RubygemsTrampoline

    # remove_method(:initialize) warns, but removing new does not warn
    def self.new
      command = allocate
      command.send(:initialize, "generate_index", "Generates the index files for a gem server directory (requires rubygems-generate_index)")
      command
    end

    prepend(RubygemsTrampoline)
  end
end
rubygems/rubygems/commands/mirror_command.rb000064400000001163150403134200015365 0ustar00# frozen_string_literal: true

require_relative "../command"

unless defined? Gem::Commands::MirrorCommand
  class Gem::Commands::MirrorCommand < Gem::Command
    def initialize
      super("mirror", "Mirror all gem files (requires rubygems-mirror)")
      begin
        Gem::Specification.find_by_name("rubygems-mirror").activate
      rescue Gem::LoadError
        # no-op
      end
    end

    def description # :nodoc:
      <<-EOF
The mirror command has been moved to the rubygems-mirror gem.
      EOF
    end

    def execute
      alert_error "Install the rubygems-mirror gem for the mirror command"
    end
  end
end
rubygems/rubygems/commands/check_command.rb000064400000004455150403134200015137 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../version_option"
require_relative "../validator"
require_relative "../doctor"

class Gem::Commands::CheckCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "check", "Check a gem repository for added or missing files",
          alien: true, doctor: false, dry_run: false, gems: true

    add_option("-a", "--[no-]alien",
               'Report "unmanaged" or rogue files in the',
               "gem repository") do |value, options|
      options[:alien] = value
    end

    add_option("--[no-]doctor",
               "Clean up uninstalled gems and broken",
               "specifications") do |value, options|
      options[:doctor] = value
    end

    add_option("--[no-]dry-run",
               "Do not remove files, only report what",
               "would be removed") do |value, options|
      options[:dry_run] = value
    end

    add_option("--[no-]gems",
               "Check installed gems for problems") do |value, options|
      options[:gems] = value
    end

    add_version_option "check"
  end

  def check_gems
    say "Checking gems..."
    say
    gems = begin
             get_all_gem_names
           rescue StandardError
             []
           end

    Gem::Validator.new.alien(gems).sort.each do |key, val|
      if val.empty?
        say "#{key} is error-free" if Gem.configuration.verbose
      else
        say "#{key} has #{val.size} problems"
        val.each do |error_entry|
          say "  #{error_entry.path}:"
          say "    #{error_entry.problem}"
        end
      end
      say
    end
  end

  def doctor
    say "Checking for files from uninstalled gems..."
    say

    Gem.path.each do |gem_repo|
      doctor = Gem::Doctor.new gem_repo, options[:dry_run]
      doctor.doctor
    end
  end

  def execute
    check_gems if options[:gems]
    doctor if options[:doctor]
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to check"
  end

  def defaults_str # :nodoc:
    "--gems --alien"
  end

  def description # :nodoc:
    <<-EOF
The check command can list and repair problems with installed gems and
specifications and will clean up gems that have been partially uninstalled.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [OPTIONS] [GEMNAME ...]"
  end
end
rubygems/rubygems/commands/outdated_command.rb000064400000001540150403134200015663 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../spec_fetcher"
require_relative "../version_option"

class Gem::Commands::OutdatedCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def initialize
    super "outdated", "Display all gems that need updates"

    add_local_remote_options
    add_platform_option
  end

  def description # :nodoc:
    <<-EOF
The outdated command lists gems you may wish to upgrade to a newer version.

You can check for dependency mismatches using the dependency command and
update the gems with the update or install commands.
    EOF
  end

  def execute
    Gem::Specification.outdated_and_latest_version.each do |spec, remote_version|
      say "#{spec.name} (#{spec.version} < #{remote_version})"
    end
  end
end
rubygems/rubygems/commands/exec_command.rb000064400000015717150403134200015011 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../dependency_installer"
require_relative "../gem_runner"
require_relative "../package"
require_relative "../version_option"

class Gem::Commands::ExecCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "exec", "Run a command from a gem", {
      version: Gem::Requirement.default,
    }

    add_version_option
    add_prerelease_option "to be installed"

    add_option "-g", "--gem GEM", "run the executable from the given gem" do |value, options|
      options[:gem_name] = value
    end

    add_option(:"Install/Update", "--conservative",
      "Prefer the most recent installed version, ",
      "rather than the latest version overall") do |_value, options|
      options[:conservative] = true
    end
  end

  def arguments # :nodoc:
    "COMMAND  the executable command to run"
  end

  def defaults_str # :nodoc:
    "--version '#{Gem::Requirement.default}'"
  end

  def description # :nodoc:
    <<-EOF
The exec command handles installing (if necessary) and running an executable
from a gem, regardless of whether that gem is currently installed.

The exec command can be thought of as a shortcut to running `gem install` and
then the executable from the installed gem.

For example, `gem exec rails new .` will run `rails new .` in the current
directory, without having to manually run `gem install rails`.
Additionally, the exec command ensures the most recent version of the gem
is used (unless run with `--conservative`), and that the gem is not installed
to the same gem path as user-installed gems.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [options --] COMMAND [args]"
  end

  def execute
    check_executable

    print_command
    if options[:gem_name] == "gem" && options[:executable] == "gem"
      set_gem_exec_install_paths
      Gem::GemRunner.new.run options[:args]
      return
    elsif options[:conservative]
      install_if_needed
    else
      install
      activate!
    end

    load!
  end

  private

  def handle_options(args)
    args = add_extra_args(args)
    check_deprecated_options(args)
    @options = Marshal.load Marshal.dump @defaults # deep copy
    parser.order!(args) do |v|
      # put the non-option back at the front of the list of arguments
      args.unshift(v)

      # stop parsing once we hit the first non-option,
      # so you can call `gem exec rails --version` and it prints the rails
      # version rather than rubygem's
      break
    end
    @options[:args] = args

    options[:executable], gem_version = extract_gem_name_and_version(options[:args].shift)
    options[:gem_name] ||= options[:executable]

    if gem_version
      if options[:version].none?
        options[:version] = Gem::Requirement.new(gem_version)
      else
        options[:version].concat [gem_version]
      end
    end

    if options[:prerelease] && !options[:version].prerelease?
      if options[:version].none?
        options[:version] = Gem::Requirement.default_prerelease
      else
        options[:version].concat [Gem::Requirement.default_prerelease]
      end
    end
  end

  def check_executable
    if options[:executable].nil?
      raise Gem::CommandLineError,
        "Please specify an executable to run (e.g. #{program_name} COMMAND)"
    end
  end

  def print_command
    verbose "running #{program_name} with:\n"
    opts = options.reject {|_, v| v.nil? || Array(v).empty? }
    max_length = opts.map {|k, _| k.size }.max
    opts.each do |k, v|
      next if v.nil?
      verbose "\t#{k.to_s.rjust(max_length)}: #{v}"
    end
    verbose ""
  end

  def install_if_needed
    activate!
  rescue Gem::MissingSpecError
    verbose "#{Gem::Dependency.new(options[:gem_name], options[:version])} not available locally, installing from remote"
    install
    activate!
  end

  def set_gem_exec_install_paths
    home = Gem.dir

    ENV["GEM_PATH"] = ([home] + Gem.path).join(File::PATH_SEPARATOR)
    ENV["GEM_HOME"] = home
    Gem.clear_paths
  end

  def install
    set_gem_exec_install_paths

    gem_name = options[:gem_name]
    gem_version = options[:version]

    install_options = options.merge(
      minimal_deps: false,
      wrappers: true
    )

    suppress_always_install do
      dep_installer = Gem::DependencyInstaller.new install_options

      request_set = dep_installer.resolve_dependencies gem_name, gem_version

      verbose "Gems to install:"
      request_set.sorted_requests.each do |activation_request|
        verbose "\t#{activation_request.full_name}"
      end

      request_set.install install_options
    end

    Gem::Specification.reset
  rescue Gem::InstallError => e
    alert_error "Error installing #{gem_name}:\n\t#{e.message}"
    terminate_interaction 1
  rescue Gem::GemNotFoundException => e
    show_lookup_failure e.name, e.version, e.errors, false

    terminate_interaction 2
  rescue Gem::UnsatisfiableDependencyError => e
    show_lookup_failure e.name, e.version, e.errors, false,
                        "'#{gem_name}' (#{gem_version})"

    terminate_interaction 2
  end

  def activate!
    gem(options[:gem_name], options[:version])
    Gem.finish_resolve

    verbose "activated #{options[:gem_name]} (#{Gem.loaded_specs[options[:gem_name]].version})"
  end

  def load!
    argv = ARGV.clone
    ARGV.replace options[:args]

    executable = options[:executable]

    contains_executable = Gem.loaded_specs.values.select do |spec|
      spec.executables.include?(executable)
    end

    if contains_executable.any? {|s| s.name == executable }
      contains_executable.select! {|s| s.name == executable }
    end

    if contains_executable.empty?
      spec = Gem.loaded_specs[executable]

      if spec.nil? || spec.executables.empty?
        alert_error "Failed to load executable `#{executable}`," \
              " are you sure the gem `#{options[:gem_name]}` contains it?"
        terminate_interaction 1
      end

      if spec.executables.size > 1
        alert_error "Ambiguous which executable from gem `#{executable}` should be run: " \
              "the options are #{spec.executables.sort}, specify one via COMMAND, and use `-g` and `-v` to specify gem and version"
        terminate_interaction 1
      end

      contains_executable << spec
      executable = spec.executable
    end

    if contains_executable.size > 1
      alert_error "Ambiguous which gem `#{executable}` should come from: " \
            "the options are #{contains_executable.map(&:name)}, " \
            "specify one via `-g`"
      terminate_interaction 1
    end

    old_exe = $0
    $0 = executable
    load Gem.activate_bin_path(contains_executable.first.name, executable, ">= 0.a")
  ensure
    $0 = old_exe if old_exe
    ARGV.replace argv
  end

  def suppress_always_install
    name = :always_install
    cls = ::Gem::Resolver::InstallerSet
    method = cls.instance_method(name)
    cls.remove_method(name)
    cls.define_method(name) { [] }

    begin
      yield
    ensure
      cls.remove_method(name)
      cls.define_method(name, method)
    end
  end
end
rubygems/rubygems/commands/setup_command.rb000064400000043436150403134200015224 0ustar00# frozen_string_literal: true

require_relative "../command"

##
# Installs RubyGems itself.  This command is ordinarily only available from a
# RubyGems checkout or tarball.

class Gem::Commands::SetupCommand < Gem::Command
  HISTORY_HEADER = %r{^#\s*[\d.a-zA-Z]+\s*/\s*\d{4}-\d{2}-\d{2}\s*$}
  VERSION_MATCHER = %r{^#\s*([\d.a-zA-Z]+)\s*/\s*\d{4}-\d{2}-\d{2}\s*$}

  ENV_PATHS = %w[/usr/bin/env /bin/env].freeze

  def initialize
    super "setup", "Install RubyGems",
          format_executable: false, document: %w[ri],
          force: true,
          site_or_vendor: "sitelibdir",
          destdir: "", prefix: "", previous_version: "",
          regenerate_binstubs: true,
          regenerate_plugins: true

    add_option "--previous-version=VERSION",
               "Previous version of RubyGems",
               "Used for changelog processing" do |version, options|
      options[:previous_version] = version
    end

    add_option "--prefix=PREFIX",
               "Prefix path for installing RubyGems",
               "Will not affect gem repository location" do |prefix, options|
      options[:prefix] = File.expand_path prefix
    end

    add_option "--destdir=DESTDIR",
               "Root directory to install RubyGems into",
               "Mainly used for packaging RubyGems" do |destdir, options|
      options[:destdir] = File.expand_path destdir
    end

    add_option "--[no-]vendor",
               "Install into vendorlibdir not sitelibdir" do |vendor, options|
      options[:site_or_vendor] = vendor ? "vendorlibdir" : "sitelibdir"
    end

    add_option "--[no-]format-executable",
               "Makes `gem` match ruby",
               "If Ruby is ruby18, gem will be gem18" do |value, options|
      options[:format_executable] = value
    end

    add_option "--[no-]document [TYPES]", Array,
               "Generate documentation for RubyGems",
               "List the documentation types you wish to",
               "generate.  For example: rdoc,ri" do |value, options|
      options[:document] = case value
                           when nil   then %w[rdoc ri]
                           when false then []
                           else value
      end
    end

    add_option "--[no-]rdoc",
               "Generate RDoc documentation for RubyGems" do |value, options|
      if value
        options[:document] << "rdoc"
      else
        options[:document].delete "rdoc"
      end

      options[:document].uniq!
    end

    add_option "--[no-]ri",
               "Generate RI documentation for RubyGems" do |value, options|
   rubygems/rubygems/commands/server_command.rb000064400000001211150403134200015353 0ustar00talls RDoc for itself in GEM_HOME.  By default this is:
  #{Gem.dir}

If you prefer a different directory, set the GEM_HOME environment variable.

RubyGems will install the gem command with a name matching ruby's
prefix and suffix.  If ruby was installed as `ruby18`, gem will be
installed as `gem18`.

By default, this RubyGems will install gem as:
  #{Gem.default_exec_format % "gem"}
    EOF
  end

  module MakeDirs
    def mkdir_p(path, **opts)
      super
      (@mkdirs ||= []) << path
    end
  end

  def execute
    @verbose = Gem.configuration.really_verbose

    require "fileutils"
    if Gem.configuration.really_verbose
      extend Frubygems/rubygems/commands/update_command.rb000064400000021575150403134200015346 0ustar00-" * 78
      say
    end

    if options[:previous_version].empty?
      options[:previous_version] = Gem::VERSION.sub(/[0-9]+$/, "0")
    end

    options[:previous_version] = Gem::Version.new(options[:previous_version])

    show_release_notes

    say
    say "-" * 78
    say

    say "RubyGems installed the following executables:"
    say bin_file_names.map {|name| "\t#{name}\n" }
    say

    unless bin_file_names.grep(/#{File::SEPARATOR}gem$/)
      say "If `gem` was installed by a previous RubyGems installation, you may need"
      say "to remove it by hand."
      say
    end

    if documentation_success
      if options[:document].include? "rdoc"
        say "Rdoc documentation was installed. You may now invoke:"
        say "  gem server"
        say "and then peruse beautifully formatted documentation for your gems"
        say "with your web browser."
        say "If you do not wish to install this documentation in the future, use the"
        say "--no-document flag, or set it as the default in your ~/.gemrc file. See"
        say "'gem help env' for details."
        say
      end

      if options[:document].include? "ri"
        say "Ruby Interactive (ri) documentation was installed. ri is kind of like man "
        say "pages for Ruby libraries. You may access it like this:"
        say "  ri Classname"
        say "  ri Classname.class_method"
        say "  ri Classname#instance_method"
        say "If you do not wish to install this documentation in the future, use the"
        say "--no-document flag, or set it as the default in your ~/.gemrc file. See"
        say "'gem help env' for details."
        say
      end
    end
  end

  def install_executables(bin_dir)
    prog_mode = options[:prog_mode] || 0o755

    executables = { "gem" => "exe" }
    executables.each do |tool, path|
      say "Installing #{tool} executable" if @verbose

      Dir.chdir path do
        bin_file = "gem"

        require "tmpdir"

        dest_file = target_bin_path(bin_dir, bin_file)
        bin_tmp_file = File.join Dir.tmpdir, "#{bin_file}.#{$$}"

        begin
          bin = File.readlines bin_file
          bin[0] = shebang

          File.open bin_tmp_file, "w" do |fp|
            fp.puts bin.join
          end

          install bin_tmp_file, dest_file, mode: prog_mode
          bin_file_names << dest_file
        ensure
          rm bin_tmp_file
        end

        next unless Gem.win_platform?

        begin
          bin_cmd_file = File.join Dir.tmpdir, "#{bin_file}.bat"

          File.open bin_cmd_file, "w" do |file|
            file.puts <<-TEXT
  @ECHO OFF
  @"%~dp0#{File.basename(Gem.ruby).chomp('"')}" "%~dpn0" %*
  TEXT
          end

          install bin_cmd_file, "#{dest_file}.bat", mode: prog_mode
        ensure
          rm bin_cmd_file
        end
      end
    end
  end

  def shebang
    if options[:env_shebang]
      ruby_name = RbConfig::CONFIG["ruby_install_name"]
      @env_path ||= ENV_PATHS.find {|env_path| File.executable? env_path }
      "#!#{@env_path} #{ruby_name}\n"
    else
      "#!#{Gem.ruby}\n"
    end
  end

  def install_lib(lib_dir)
    libs = { "RubyGems" => "lib" }
    libs["Bundler"] = "bundler/lib"
    libs.each do |tool, path|
      say "Installing #{tool}" if @verbose

      lib_files = files_in path

      Dir.chdir path do
        install_file_list(lib_files, lib_dir)
      end
    end
  end

  def install_rdoc
    gem_doc_dir = File.join Gem.dir, "doc"
    rubygems_name = "rubygems-#{Gem::VERSION}"
    rubygems_doc_dir = File.join gem_doc_dir, rubygems_name

    begin
      Gem.ensure_gem_subdirectories Gem.dir
    rescue SystemCallError
      # ignore
    end

    if File.writable?(gem_doc_dir) &&
       (!File.exist?(rubygems_doc_dir) ||
        File.writable?(rubygems_doc_dir))
      say "Removing old RubyGems RDoc and ri" if @verbose
      Dir[File.join(Gem.dir, "doc", "rubygems-[0-9]*")].each do |dir|
        rm_rf dir
      end

      require_relative "../rdoc"

      return false unless defined?(Gem::RDoc)

      fake_spec = Gem::Specification.new "rubygems", Gem::VERSION
      def fake_spec.full_gem_path
        File.expand_path "../../..", __dir__
      end

      generate_ri   = options[:document].include? "ri"
      generate_rdoc = options[:document].include? "rdoc"

      rdoc = Gem::RDoc.new fake_spec, generate_rdoc, generate_ri
      rdoc.generate

      return true
    elsif @verbose
      say "Skipping RDoc generation, #{gem_doc_dir} not writable"
      say "Set the GEM_HOME environment variable if you want RDoc generated"
    end

    false
  end

  def install_default_bundler_gem(bin_dir)
    current_default_spec = Gem::Specification.default_stubs.find {|s| s.name == "bundler" }
    specs_dir = if current_default_spec && default_dir == Gem.default_dir
      all_specs_current_version = Gem::Specification.stubs.select {|s| s.full_name == current_default_spec.full_name }

      Gem::Specification.remove_spec current_default_spec
      loaded_from = current_default_spec.loaded_from
      File.delete(loaded_from)

      # Remove previous default gem executables if they were not shadowed by a regular gem
      FileUtils.rm_rf current_default_spec.full_gem_path if all_specs_current_version.size == 1

      File.dirname(loaded_from)
    else
      target_specs_dir = File.join(default_dir, "specifications", "default")
      mkdir_p target_specs_dir, mode: 0o755
      target_specs_dir
    end

    new_bundler_spec = Dir.chdir("bundler") { Gem::Specification.load("bundler.gemspec") }
    full_name = new_bundler_spec.full_name
    gemspec_path = "#{full_name}.gemspec"

    default_spec_path = File.join(specs_dir, gemspec_path)
    Gem.write_binary(default_spec_path, new_bundler_spec.to_ruby)

    bundler_spec = Gem::Specification.load(default_spec_path)

    # Remove gemspec that was same version of vendored bundler.
    normal_gemspec = File.join(default_dir, "specifications", gemspec_path)
    if File.file? normal_gemspec
      File.delete normal_gemspec
    end

    # Remove gem files that were same version of vendored bundler.
    if File.directory? bundler_spec.gems_dir
      Dir.entries(bundler_spec.gems_dir).
        select {|default_gem| File.basename(default_gem) == full_name }.
        each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) }
    end

    require_relative "../installer"

    Dir.chdir("bundler") do
      built_gem = Gem::Package.build(new_bundler_spec)
      begin
        Gem::Installer.at(
          built_gem,
          env_shebang: options[:env_shebang],
          format_executable: options[:format_executable],
          force: options[:force],
          install_as_default: true,
          bin_dir: bin_dir,
          install_dir: default_dir,
          wrappers: true
        ).install
      ensure
        FileUtils.rm_f built_gem
      end
    end

    new_bundler_spec.executables.each {|executable| bin_file_names << target_bin_path(bin_dir, executable) }

    say "Bundler #{new_bundler_spec.version} installed"
  end

  def make_destination_dirs
    lib_dir, bin_dir = Gem.default_rubygems_dirs

    unless lib_dir
      lib_dir, bin_dir = generate_default_dirs
    end

    mkdir_p lib_dir, mode: 0o755
    mkdir_p bin_dir, mode: 0o755

    [lib_dir, bin_dir]
  end

  def generate_default_man_dir
    prefix = options[:prefix]

    if prefix.empty?
      man_dir = RbConfig::CONFIG["mandir"]
      return unless man_dir
    else
      man_dir = File.join prefix, "man"
    end

    prepend_destdir_if_present(man_dir)
  end

  def generate_default_dirs
    prefix = options[:prefix]
    site_or_vendor = options[:site_or_vendor]

    if prefix.empty?
      lib_dir = RbConfig::CONFIG[site_or_vendor]
      bin_dir = RbConfig::CONFIG["bindir"]
    else
      lib_dir = File.join prefix, "lib"
      bin_dir = File.join prefix, "bin"
    end

    [prepend_destdir_if_present(lib_dir), prepend_destdir_if_present(bin_dir)]
  end

  def files_in(dir)
    Dir.chdir dir do
      Dir.glob(File.join("**", "*"), File::FNM_DOTMATCH).
        select {|f| !File.directory?(f) }
    end
  end

  def remove_old_bin_files(bin_dir)
    old_bin_files = {
      "gem_mirror" => "gem mirror",
      "gem_server" => "gem server",
      "gemlock" => "gem lock",
      "gemri" => "ri",
      "gemwhich" => "gem which",
      "index_gem_repository.rb" => "gem generate_index",
    }

    old_bin_files.each do |old_bin_file, new_name|
      old_bin_path = File.join bin_dir, old_bin_file
      next unless File.exist? old_bin_path

      deprecation_message = "`#{old_bin_file}` has been deprecated. Use `#{new_name}` instead."

      File.open old_bin_path, "w" do |fp|
        fp.write <<-EOF
#!#{Gem.ruby}

abort "#{deprecation_message}"
    EOF
      end

      next unless Gem.win_platform?

      File.open "#{old_bin_path}.bat", "w" do |fp|
        fp.puts %(@ECHO.#{deprecation_message})
      end
    end
  end

  def remove_old_lib_files(lib_dir)
    lib_dirs = { File.join(lib_dir, "rubygems") => "lib/rubygems" }
    lib_dirs[File.join(lib_dir, "bundlerrubygems/rubygems/commands/push_command.rb000064400000005102150403134200015027 0ustar00_man1_dir) { Dir["bundle*.1{,.txt,.ronn}"] }

      remove_file_list(man1_to_remove, old_man1_dir)
    end

    old_man5_dir = "#{old_man_dir}/man5"

    if File.exist?(old_man5_dir)
      man5_to_remove = Dir.chdir(old_man5_dir) { Dir["gemfile.5{,.txt,.ronn}"] }

      remove_file_list(man5_to_remove, old_man5_dir)
    end
  end

  def show_release_notes
    release_notes = File.join Dir.pwd, "CHANGELOG.md"

    release_notes =
      if File.exist? release_notes
        history = File.read release_notes

        history.force_encoding Encoding::UTF_8

        text = history.split(HISTORY_HEADER)
        text.shift # correct an off-by-one generated by split
        version_lines = history.scan(HISTORY_HEADER)
        versions = history.scan(VERSION_MATCHER).flatten.map do |x|
          Gem::Version.new(x)
        end

        history_string = ""

        until versions.length == 0 ||
              versions.shift <= options[:previous_version] do
          history_string += version_lines.shift + text.shift
        end

        history_string
      else
        "Oh-no! Unable to find release notes!"
      end

    say release_notes
  end

  def uninstall_old_gemcutter
    require_relative "../uninstaller"

    ui = Gem::Uninstaller.new("gemcutter", all: true, ignore: true,
                                           version: "< 0.4")
    ui.uninstall
  rescue Gem::InstallError
  end

  def regenerate_binstubs(bindir)
    require_relative "pristine_command"
    say "Regenerating binstubs"

    args = %w[--all --only-executables --silent]
    args << "--bindir=#{bindir}"
    args << "--install-dir=#{default_dir}"

    if options[:env_shebang]
      args << "--env-shebang"
    end

    command = Gem::Commands::PristineCommand.new
    command.invoke(*args)
  end

  def regenerate_plugins(bindir)
    require_relative "pristine_command"
    say "Regenerating plugins"

    args = %w[--all --only-plugins --silent]
    args << "--bindir=#{bindir}"
    args << "--install-dir=#{default_dir}"

    command = Gem::Commands::PristineCommand.new
    command.invoke(*args)
  end

  private

  def default_dir
    prefix = options[:prefix]

    if prefix.empty?
      dir = Gem.default_dir
    else
      dir = prefix
    end

    prepend_destdir_if_present(dir)
  end

  def prepend_destdir_if_present(path)
    destdir = options[:destdir]
    return path if destdir.empty?

    File.join(options[:destdir], path.gsub(/^[a-zA-Z]:/, ""))
  end

  def install_file_list(files, dest_dir)
    files.each do |file|
      install_file file, dest_dir
    end
  end

  def install_file(file, dest_dir)
    dest_file = Frubygems/rubygems/commands/open_command.rb000064400000003655150403134200015024 0ustar00rubygems/rubygems/commands/server_command.rb000064400000001211150403134200015353 0ustar00# frozen_string_literal: true

require_relative "../command"

unless defined? Gem::Commands::ServerCommand
  class Gem::Commands::ServerCommand < Gem::Command
    def initialize
      super("server", "Starts up a web server that hosts the RDoc (requires rubygems-server)")
      begin
        Gem::Specification.find_by_name("rubygems-server").activate
      rescue Gem::LoadError
        # no-op
      end
    end

    def description # :nodoc:
      <<-EOF
The server command has been moved to the rubygems-server gem.
      EOF
    end

    def execute
      alert_error "Install the rubygems-server gem for the server command"
    end
  end
end
rubygems/rubygems/commands/update_command.rb000064400000020462150403134200015340 0ustar00rubygems/rubygems/commands/sources_command.rb000064400000013376150403134200015547 0ustar00RemoteOptions
  include Gem::VersionOption

  attr_reader :installer # :nodoc:

  attr_reader :updated # :nodoc:

  def initialize
    options = {
      force: false,
    }

    options.merge!(install_update_options)

    super "update", "Update installed gems to the latest version", options

    add_install_update_options

    Gem::OptionParser.accept Gem::Version do |value|
      Gem::Version.new value

      value
    end

    add_option("--system [VERSION]", Gem::Version,
               "Update the RubyGems system software") do |value, opts|
      value ||= true

      opts[:system] = value
    end

    add_local_remote_options
    add_platform_option
    add_prerelease_option "as update targets"

    @updated   = []
    @installer = nil
  end

  def arguments # :nodoc:
    "GEMNAME       name of gem to update"
  end

  def defaults_str # :nodoc:
    "--no-force --install-dir #{Gem.dir}\n" +
      install_update_defaults_str
  end

  def description # :nodoc:
    <<-EOF
The update command will update your gems to the latest version.

The update command does not remove the previous version. Use the cleanup
command to remove old versions.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} GEMNAME [GEMNAME ...]"
  end

  def check_latest_rubygems(version) # :nodoc:
    if Gem.rubygems_version == version
      say "Latest version already installed. Done."
      terminate_interaction
    end
  end

  def check_oldest_rubygems(version) # :nodoc:
    if oldest_supported_version > version
      alert_error "rubygems #{version} is not supported on #{RUBY_VERSION}. The oldest version supported by this ruby is #{oldest_supported_version}"
      terminate_interaction 1
    end
  end

  def check_update_arguments # :nodoc:
    unless options[:args].empty?
      alert_error "Gem names are not allowed with the --system option"
      terminate_interaction 1
    end
  end

  def execute
    if options[:system]
      update_rubygems
      return
    end

    gems_to_update = which_to_update(
      highest_installed_gems,
      options[:args].uniq
    )

    if options[:explain]
      say "Gems to update:"

      gems_to_update.each do |name_tuple|
        say "  #{name_tuple.full_name}"
      end

      return
    end

    say "Updating installed gems"

    updated = update_gems gems_to_update

    installed_names = highest_installed_gems.keys
    updated_names = updated.map(&:name)
    not_updated_names = options[:args].uniq - updated_names
    not_installed_names = not_updated_names - installed_names
    up_to_date_names = not_updated_names - not_installed_names

    if updated.empty?
      say "Nothing to update"
    else
      say "Gems updated: #{updated_names.join(" ")}"
    end
    say "Gems already up-to-date: #{up_to_date_names.join(" ")}" unless up_to_date_names.empty?
    say "Gems not currently installed: #{not_installed_names.join(" ")}" unless not_installed_names.empty?
  end

  def fetch_remote_gems(spec) # :nodoc:
    dependency = Gem::Dependency.new spec.name, "> #{spec.version}"
    dependency.prerelease = options[:prerelease]

    fetcher = Gem::SpecFetcher.fetcher

    spec_tuples, errors = fetcher.search_for_dependency dependency

    error = errors.find {|e| e.respond_to? :exception }

    raise error if error

    spec_tuples
  end

  def highest_installed_gems # :nodoc:
    hig = {} # highest installed gems

    # Get only gem specifications installed as --user-install
    Gem::Specification.dirs = Gem.user_dir if options[:user_install]

    Gem::Specification.each do |spec|
      if hig[spec.name].nil? || hig[spec.name].version < spec.version
        hig[spec.name] = spec
      end
    end

    hig
  end

  def highest_remote_name_tuple(spec) # :nodoc:
    spec_tuples = fetch_remote_gems spec

    highest_remote_gem = spec_tuples.max
    return unless highest_remote_gem

    highest_remote_gem.first
  end

  def install_rubygems(spec) # :nodoc:
    args = update_rubygems_arguments
    version = spec.version

    update_dir = File.join spec.base_dir, "gems", "rubygems-update-#{version}"

    Dir.chdir update_dir do
      say "Installing RubyGems #{version}" unless options[:silent]

      installed = preparing_gem_layout_for(version) do
        system Gem.ruby, "--disable-gems", "setup.rb", *args
      end

      unless options[:silent]
        say "RubyGems system software updated" if installed
      end
    end
  end

  def preparing_gem_layout_for(version)
    if Gem::Version.new(version) >= Gem::Version.new("3.2.a")
      yield
    else
      require "tmpdir"
      Dir.mktmpdir("gem_update") do |tmpdir|
        FileUtils.mv Gem.plugindir, tmpdir

        status = yield

        unless status
          FileUtils.mv File.join(tmpdir, "plugins"), Gem.plugindir
        end

        status
      end
    end
  end

  def rubygems_target_version
    version = options[:system]
    update_latest = version == true

    unless update_latest
      version     = Gem::Version.new     version
      requirement = Gem::Requirement.new version

      return version, requirement
    end

    version     = Gem::Version.new     Gem::VERSION
    requirement = Gem::Requirement.new ">= #{Gem::VERSION}"

    rubygems_update         = Gem::Specification.new
    rubygems_update.name    = "rubygems-update"
    rubygems_update.version = version

    highest_remote_tup = highest_remote_name_tuple(rubygems_update)
    target = highest_remote_tup ? highest_remote_tup.version : version

    [target, requirement]
  end

  def update_gem(name, version = Gem::Requirement.default)
    return if @updated.any? {|spec| spec.name == name }

    update_options = options.dup
    update_options[:prerelease] = version.prerelease?

    @installer = Gem::DependencyInstaller.new update_options

    say "Updating #{name}" unless options[:system]
    begin
      @installer.install name, Gem::Requirement.nrubygems/rubygems/indexer.rb000064400000025641150403134200012221 0ustar00 Gem::Specification.find_all_by_name "rubygems-update", requirement
    installed_gems = update_gem("rubygems-update", requirement) if installed_gems.empty? || installed_gems.first.version != version
    return if installed_gems.empty?

    install_rubygems installed_gems.first
  end

  def update_rubygems_arguments # :nodoc:
    args = []
    args << "--silent" if options[:silent]
    args << "--prefix" << Gem.prefix if Gem.prefix
    args << "--no-document" unless options[:document].include?("rdoc") || options[:document].include?("ri")
    args << "--no-format-executable" if options[:no_format_executable]
    args << "--previous-version" << Gem::VERSION
    args
  end

  def which_to_update(highest_installed_gems, gem_names)
    result = []

    highest_installed_gems.each do |_l_name, l_spec|
      next if !gem_names.empty? &&
              gem_names.none? {|name| name == l_spec.name }

      highest_remote_tup = highest_remote_name_tuple l_spec
      next unless highest_remote_tup

      result << highest_remote_tup
    end

    result
  end

  private

  #
  # Oldest version we support downgrading to. This is the version that
  # originally ships with the oldest supported patch version of ruby.
  #
  def oldest_supported_version
    @oldest_supported_version ||=
      Gem::Version.new("3.3.3")
  end
end
rubygems/rubygems/commands/push_command.rb000064400000006346150403134200015042 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../local_remote_options"
require_relative "../gemcutter_utilities"
require_relative "../package"

class Gem::Commands::PushCommand < Gem::Command
  include Gem::LocalRemoteOptions
  include Gem::GemcutterUtilities

  def description # :nodoc:
    <<-EOF
The push command uploads a gem to the push server (the default is
https://rubygems.org) and adds it to the index.

The gem can be removed from the index and deleted from the server using the yank
command.  For further discussion see the help for the yank command.

The push command will use ~/.gem/credentials to authenticate to a server, but you can use the RubyGems environment variable GEM_HOST_API_KEY to set the api key to authenticate.
    EOF
  end

  def arguments # :nodoc:
    "GEM       built gem to push up"
  end

  def usage # :nodoc:
    "#{program_name} GEM"
  end

  def initialize
    super "push", "Push a gem up to the gem server", host: host, attestations: []

    @user_defined_host = false

    add_proxy_option
    add_key_option
    add_otp_option

    add_option("--host HOST",
               "Push to another gemcutter-compatible host",
               "  (e.g. https://rubygems.org)") do |value, options|
      options[:host] = value
      @user_defined_host = true
    end

    add_option("--attestation FILE",
                "Push with sigstore attestations") do |value, options|
      options[:attestations] << value
    end

    @host = nil
  end

  def execute
    gem_name = get_one_gem_name
    default_gem_server, push_host = get_hosts_for(gem_name)

    @host = if @user_defined_host
      options[:host]
    elsif default_gem_server
      default_gem_server
    elsif push_host
      push_host
    else
      options[:host]
    end

    sign_in @host, scope: get_push_scope

    send_gem(gem_name)
  end

  def send_gem(name)
    args = [:post, "api/v1/gems"]

    _, push_host = get_hosts_for(name)

    @host ||= push_host

    # Always include @host, even if it's nil
    args += [@host, push_host]

    say "Pushing gem to #{@host || Gem.host}..."

    response = send_push_request(name, args)

    with_response response
  end

  private

  def send_push_request(name, args)
    rubygems_api_request(*args, scope: get_push_scope) do |request|
      body = Gem.read_binary name
      if options[:attestations].any?
        request.set_form([
          ["gem", body, { filename: name, content_type: "application/octet-stream" }],
          get_attestations_part,
        ], "multipart/form-data")
      else
        request.body = body
        request.add_field "Content-Type",   "application/octet-stream"
        request.add_field "Content-Length", request.body.size
      end
      request.add_field "Authorization", api_key
    end
  end

  def get_hosts_for(name)
    gem_metadata = Gem::Package.new(name).spec.metadata

    [
      gem_metadata["default_gem_server"],
      gem_metadata["allowed_push_host"],
    ]
  end

  def get_push_scope
    :push_rubygem
  end

  def get_attestations_part
    bundles = "[" + options[:attestations].map do |attestation|
      Gem.read_binary(attestation)
    end.join(",") + "]"
    [
      "attestations",
      bundles,
      { content_type: "application/json" },
    ]
  end
end
rubygems/rubygems/commands/open_command.rb000064400000003635150403134200015022 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../version_option"

class Gem::Commands::OpenCommand < Gem::Command
  include Gem::VersionOption

  def initialize
    super "open", "Open gem sources in editor"

    add_option("-e", "--editor COMMAND", String,
               "Prepends COMMAND to gem path. Could be used to specify editor.") do |command, options|
      options[:editor] = command || get_env_editor
    end
    add_option("-v", "--version VERSION", String,
               "Opens specific gem version") do |version|
      options[:version] = version
    end
  end

  def arguments # :nodoc:
    "GEMNAME     name of gem to open in editor"
  end

  def defaults_str # :nodoc:
    "-e #{get_env_editor}"
  end

  def description # :nodoc:
    <<-EOF
        The open command opens gem in editor and changes current path
        to gem's source directory.
        Editor command can be specified with -e option, otherwise rubygems
        will look for editor in $EDITOR, $VISUAL and $GEM_EDITOR variables.
    EOF
  end

  def usage # :nodoc:
    "#{program_name} [-e COMMAND] GEMNAME"
  end

  def get_env_editor
    ENV["GEM_EDITOR"] ||
      ENV["VISUAL"] ||
      ENV["EDITOR"] ||
      "vi"
  end

  def execute
    @version = options[:version] || Gem::Requirement.default
    @editor  = options[:editor] || get_env_editor

    found = open_gem(get_one_gem_name)

    terminate_interaction 1 unless found
  end

  def open_gem(name)
    spec = spec_for name

    return false unless spec

    if spec.default_gem?
      say "'#{name}' is a default gem and can't be opened."
      return false
    end

    open_editor(spec.full_gem_path)
  end

  def open_editor(path)
    system(*@editor.split(/\s+/) + [path], { chdir: path })
  end

  def spec_for(name)
    spec = Gem::Specification.find_all_by_name(name, @version).first

    return spec if spec

    say "Unable to find gem '#{name}'"
  end
end
rubygems/rubygems/commands/sources_command.rb000064400000013375150403134200015546 0ustar00# frozen_string_literal: true

require_relative "../command"
require_relative "../remote_fetcher"
require_relative "../spec_fetcher"
require_relative "../local_remote_options"

class Gem::Commands::SourcesCommand < Gem::Command
  include Gem::LocalRemoteOptions

  def initialize
    require "fileutils"

    super "sources",
          "Manage the sources and cache file RubyGems uses to search for gems"

    add_option "-a", "--add SOURCE_URI", "Add source" do |value, options|
      options[:add] = value
    end

    add_option "-l", "--list", "List sources" do |value, options|
      options[:list] = value
    end

    add_option "-r", "--remove SOURCE_URI", "Remove source" do |value, options|
      options[:remove] = value
    end

    add_option "-c", "--clear-all",
               "Remove all sources (clear the cache)" do |value, options|
      options[:clear_all] = value
    end

    add_option "-u", "--update", "Update source cache" do |value, options|
      options[:update] = value
    end

    add_option "-f", "--[no-]force", "Do not show any confirmation prompts and behave as if 'yes' was always answered" do |value, options|
      options[:force] = value
    end

    add_proxy_option
  end

  def add_source(source_uri) # :nodoc:
    check_rubygems_https source_uri

    source = Gem::Source.new source_uri

    check_typo_squatting(source)

    begin
      if Gem.sources.include? source
        say "source #{source_uri} already present in the cache"
      else
        source.load_specs :released
        Gem.sources << source
        Gem.configuration.write

        say "#{source_uri} added to sources"
      end
    rescue Gem::URI::Error, ArgumentError
      say "#{source_uri} is not a URI"
      terminate_interaction 1
    rescue Gem::RemoteFetcher::FetchError => e
      say "Error fetching #{Gem::Uri.redact(source.uri)}:\n\t#{e.message}"
      terminate_interaction 1
    end
  end

  def check_typo_squatting(source)
    if source.typo_squatting?("rubygems.org")
      question = <<-QUESTION.chomp
#{source.uri} is too similar to https://rubygems.org

Do you want to add this source?
      QUESTION

      terminate_interaction 1 unless options[:force] || ask_yes_no(question)
    end
  end

  def check_rubygems_https(source_uri) # :nodoc:
    uri = Gem::URI source_uri

    if uri.scheme && uri.scheme.casecmp("http").zero? &&
       uri.host.casecmp("rubygems.org").zero?
      question = <<-QUESTION.chomp
https://rubygems.rubygems/rubygems/uri.rb000064400000004516150403134210011361 0ustar00"
  end

  def description # :nodoc:
    <<-EOF
RubyGems fetches gems from the sources you have configured (stored in your
~/.gemrc).

The default source is https://rubygems.org, but you may have other sources
configured.  This guide will help you update your sources or configure
yourself to use your own gem server.

Without any arguments the sources lists your currently configured sources:

  $ gem sources
  *** CURRENT SOURCES ***

  https://rubygems.org

This may list multiple sources or non-rubygems sources.  You probably
configured them before or have an old `~/.gemrc`.  If you have sources you
do not recognize you should remove them.

RubyGems has been configured to serve gems via the following URLs through
its history:

* http://gems.rubyforge.org (RubyGems 1.3.5 and earlier)
* http://rubygems.org       (RubyGems 1.3.6 through 1.8.30, and 2.0.0)
* https://rubygems.org      (RubyGems 2.0.1 and newer)

Since all of these sources point to the same set of gems you only need one
of them in your list.  https://rubygems.org is recommended as it brings the
protections of an SSL connection to gem downloads.

To add a source use the --add argument:

    $ gem sources --add https://rubygems.org
    https://rubygems.org added to sources

RubyGems will check to see if gems can be installed from the source given
before it is added.

To remove a source use the --remove argument:

    $ gem sources --remove https://rubygems.org/
    https://rubygems.org/ removed from sources

    EOF
  end

  def list # :nodoc:
    say "*** CURRENT SOURCES ***"
    say

    Gem.sources.each do |src|
      say src
    end
  end

  def list? # :nodoc:
    !(options[:add] ||
      options[:clear_all] ||
      options[:remove] ||
      options[:update])
  end

  def execute
    clear_all if options[:clear_all]

    source_uri = options[:add]
    add_source source_uri if source_uri

    source_uri = options[:remove]
    remove_source source_uri if source_uri

    update if options[:update]

    list if list?
  end

  def remove_source(source_uri) # :nodoc:
    if Gem.sources.include? source_uri
      Gem.sources.delete source_uri
      Gem.configuration.write

      say "#{source_uri} removed from sources"
    else
      say "source #{source_uri} not present in cache"
    end
  end

  def update # :nodoc:
    Gem.sources.each_source do |src|
      src.load_specs :releaserubygems/rubygems/doctor.rb000064400000006205150403134210012051 0ustar00rubygems/rubygems/indexer.rb000064400000025641150403134200012221 0ustar00n::PREFIX}#{extensions.join "\0"}" unless
      extensions.empty?
    result << nil
    result << "Gem::Specification.new do |s|"

    result << "  s.name = #{ruby_code name}"
    result << "  s.version = #{ruby_code version}"
    unless platform.nil? || platform == Gem::Platform::RUBY
      result << "  s.platform = #{ruby_code original_platform}"
    end
    result << ""
    result << "  s.required_rubygems_version = #{ruby_code required_rubygems_version} if s.respond_to? :required_rubygems_version="

    if metadata && !metadata.empty?
      result << "  s.metadata = #{ruby_code metadata} if s.respond_to? :metadata="
    end
    result << "  s.require_paths = #{ruby_code raw_require_paths}"

    handled = [
      :dependencies,
      :name,
      :platform,
      :require_paths,
      :required_rubygems_version,
      :specification_version,
      :version,
      :has_rdoc,
      :default_executable,
      :metadata,
      :signing_key,
    ]

    @@attributes.each do |attr_name|
      next if handled.include? attr_name
      current_value = self.send(attr_name)
      if current_value != default_value(attr_name) || self.class.required_attribute?(attr_name)
        result << "  s.#{attr_name} = #{ruby_code current_value}"
      end
    end

    if String === signing_key
      result << "  s.signing_key = #{signing_key.dump}.freeze"
    end

    if @installed_by_version
      result << nil
      result << "  s.installed_by_version = \"#{Gem::VERSION}\" if s.respond_to? :installed_by_version"
    end

    unless dependencies.empty?
      result << nil
      result << "  s.specification_version = #{specification_version}"
      result << nil

      dependencies.each do |dep|
        req = dep.requirements_list.inspect
        dep.instance_variable_set :@type, :runtime if dep.type.nil? # HACK
        result << "  s.add_#{dep.type}_dependency(%q<#{dep.name}>.freeze, #{req})"
      end
    end

    result << "end"
    result << nil

    result.join "\n"
  end

  ##
  # Returns a Ruby lighter-weight code representation of this specification,
  # used for indexing only.
  #
  # See #to_ruby.

  def to_ruby_for_cache
    for_cache.to_ruby
  end

  def to_s # :nodoc:
    "#<Gem::Specification name=#{@name} version=#{@version}>"
  end

  ##
  # Returns self

  def to_spec
    self
  end

  def to_yaml(opts = {}) # :nodoc:
    Gem.load_yaml

    # Because the user can switch the YAML engine behind our
    # back, we have to check again here to make sure that our
    # psych code was properly loaded, and load it if not.
    unless Gem.const_defined?(:NoAliasYAMLTree)
      require_relative "psych_tree"
    end

    builder = Gem::NoAliasYAMLTree.create
   rubygems/rubygems/openssl.rb000064400000000175150403134210012242 0ustar00  trail.any? {|s| s.name == spec_name }
          end
        end
      end
    ensure
      trail.pop
    end
  end

  ##
  rubygems/rubygems/shellwords.rb000064400000000102150403134210012733 0ustar00(self).validate_metadata
  end
  rubygems_deprecate :validate_metarubygems/rubygems/package_task.rb000064400000007455150403134210013204 0ustar00when "date"
        # Force Date to go through the extra coerce logic in date=
        self.date = val.tap(&Gem::UNTAINT)
      else
        instance_variable_set "@#{ivar}", val.tap(&Gem::UNTAINT)
      end
    end

    @original_platform = @platform # for backwards compatibility
    self.platform = Gem::Platform.new @platform
  end

  ##
  # Reset nil attributes to their default values to make the spec valid

  def reset_nil_attributes_to_default
    nil_attributes = self.class.non_nil_attributes.find_all do |name|
      !instance_variable_defined?("@#{name}") || instance_variable_get(rubygems/rubygems/safe_yaml.rb000064400000003052150403134230012516 0ustar00rubygems/rubygems/psych_tree.rb000064400000001433150403134230012724 0ustar00# frozen_string_literal: true

module Gem
  if defined? ::Psych::Visitors
    class NoAliasYAMLTree < Psych::Visitors::YAMLTree
      def self.create
        new({})
      end unless respond_to? :create

      def visit_String(str)
        return super unless str == "=" # or whatever you want

        quote = Psych::Nodes::Scalar::SINGLE_QUOTED
        @emitter.scalar str, nil, nil, false, true, quote
      end

      # Noop this out so there are no anchors
      def register(target, obj)
      end

      # This is ported over from the yaml_tree in 1.9.3
      def format_time(time)
        if time.utc?
          time.strftime("%Y-%m-%d %H:%M:%S.%9N Z")
        else
          time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z")
        end
      end

      private :format_time
    end
  end
end
rubygems/rubygems/safe_yaml.rbrubygems/rubygems/compatibility.rb000064400000002003150403134230013422 0ustar00rubygems/rubygems/tsort.rb000064400000000102150403134210011720 0ustar00    end
      end
    else
      unless Gem::Deprecate.skip
      rubygems/rubygems/update_suggestion.rb000064400000004411150403134210014305 0ustar00rubygems/rubygems/uri.rb000064400000004604150403134210011357 0ustar00# frozen_string_literal: true

##
# The Uri handles rubygems source URIs.
#

class Gem::Uri
  ##
  # Parses and redacts uri

  def self.redact(uri)
    new(uri).redacted
  end

  ##
  # Parses uri, raising if it's invalid

  def self.parse!(uri)
    require_relative "vendor/uri/lib/uri"

    raise Gem::URI::InvalidURIError unless uri

    return uri unless uri.is_a?(String)

    # Always escape URI's to deal with potential spaces and such
    # It should also be considered that source_uri may already be
    # a valid URI with escaped characters. e.g. "{DESede}" is encoded
    # as "%7BDESede%7D". If this is escaped again the percentage
    # symbols will be escaped.
    begin
      Gem::URI.parse(uri)
    rescue Gem::URI::InvalidURIError
      Gem::URI.parse(Gem::URI::RFC2396_PARSER.escape(uri))
    end
  end

  ##
  # Parses uri, returning the original uri if it's invalid

  def self.parse(uri)
    parse!(uri)
  rescue Gem::URI::InvalidURIError
    uri
  end

  def initialize(source_uri)
    @parsed_uri = parse(source_uri)
  end

  def redacted
    return self unless valid_uri?

    if token? || oauth_basic?
      with_redacted_user
    elsif password?
      with_redacted_password
    else
      self
    end
  end

  def to_s
    @parsed_uri.to_s
  end

  def redact_credentials_from(text)
    return text unless valid_uri? && password? && text.include?(to_s)

    text.sub(password, "REDACTED")
  end

  def method_missing(method_name, *args, &blk)
    if @parsed_uri.respond_to?(method_name)
      @parsed_uri.send(method_name, *args, &blk)
    else
      super
    end
  end

  def respond_to_missing?(method_name, include_private = false)
    @parsed_uri.respond_to?(method_name, include_private) || super
  end

  protected

  # Add a protected reader for the cloned instancerubygems/rubygems/install_update_options.rb000064400000014553150403134210015347 0ustar00rubygems/rubygems/doctor.rb000064400000006204150403134210012050 0ustar00# frozen_string_literal: true

require_relative "../rubygems"
require_relative "user_interaction"

##
# Cleans up after a partially-failed uninstall or for an invalid
# Gem::Specification.
#
# If a specification was removed by hand this will remove any remaining files.
#
# If a corrupt specification was installed this will clean up warnings by
# removing the bogus specification.

class Gem::Doctor
  include Gem::UserInteraction

  ##
  # Maps a gem subdirectory to the files that are expected to exist in the
  # subdirectory.

  REPOSITORY_EXTENSION_MAP = [ # :nodoc:
    ["specifications", ".gemspec"],
    ["build_info",     ".info"],
    ["cache",          ".gem"],
    ["doc",            ""],
    ["extensions",     ""],
    ["gems",           ""],
    ["plugins",        ""],
  ].freeze

  missing =
    Gem::REPOSITORY_SUBDIRECTORIES.sort -
    REPOSITORY_EXTENSION_MAP.map {|(k,_)| k }.sort

  raise "Update REPOSITORY_EXTENSION_MAP, missing: #{missing.join ", "}" unless
    missing.empty?

  ##
  # Creates a new Gem::Doctor that will clean up +gem_repository+.  Only one
  # gem repository may be cleaned at a time.
  #
  # If +dry_run+ is true no files or directories will be removed.

  def initialize(gem_repository, dry_run = false)
    @gem_repository = gem_repository
    @dry_run        = dry_run

    @installed_specs = nil
  end

  ##
  # Specs installed in this gem repository

  def installed_specs # :nodoc:
    @installed_specs ||= Gem::Specification.map(&:full_name)
  end

  ##
  # Are we doctoring a gem repository?

  def gem_repository?
    !installed_specs.empty?
  end

  ##
  # Cleans up uninstalled files and invalid gem specifications

  def doctor
    @orig_home = Gem.dir
    @orig_path = Gem.path

    say "Checking #{@gem_repository}"

    Gem.use_paths @gem_repository.to_s

    unless gem_repository?
      say "This directory does not appear to be a RubyGems repository, " \
          "skipping"
      say
      return
    end

    doctor_children

    say
  ensure
    Gem.use_paths @orig_home, *@orig_path
  end

  ##
  # Cleans up children of this gem repository

  def doctor_children # :nodoc:
    REPOSITORY_EXTENSION_MAP.each do |sub_directory, extension|
      doctor_child sub_directory, extension
    end
  end

  ##
  # Removes files in +sub_directory+ with +extension+

  def doctor_child(sub_directory, extension) # :nodoc:
    directory = File.join(@gem_repository, sub_directory)

    Dir.entries(directory).sort.each do |ent|
      next if [".", ".."].include?(ent)

      child = File.join(directory, ent)
      next unless File.exist?(child)

      basename = File.basename(child, extension)
      next if installed_specs.include? basename
      next if /^rubygems-\d/.match?(basename)
      next if sub_directory == "specifications" && basename == "default"
      next if sub_directory == "plugins" && Gem.plugin_suffix_regexp =~ (basename)

      type = File.directory?(child) ? "directory" : "file"

      action = if @dry_run
        "Extra"
      else
        FileUtils.rm_r(child)
        "Removed"
      end

      say "#{action} #{type} #{sub_directory}/#{File.basename(child)}"
    end
  rescue Errno::ENOENT
    # ignore
  end
end
rubygems/rubygems/openssl.rb000064400000000175150403134210012242 0ustar00# frozen_string_literal: true

autoload :OpenSSL, "openssl"

module Gem
  HAVE_OPENSSL = defined? OpenSSL::SSL # :nodoc:
end
rubygems/rubygems/shellwords.rb000064400000000102150403134210012733 0ustar00# frozen_string_literal: true

autoload :Shellwords, "shellwords"
rubygems/rubygems/package_task.rb000064400000007447150403134210013205 0ustar00rubygems/rubygems/util.rb000064400000004641150403134210011536 0ustar00e following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# 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.

require_relative "../rubygems"
require_relative "package"
require "rake/packagetask"

##
# Create a package based upon a Gem::Specification.  Gem packages, as well as
# zip files and tar/gzipped packages can be produced by this task.
#
# In addition to the Rake targets generated by Rake::PackageTask, a
# Gem::PackageTask will also generate the following tasks:
#
# [<b>"<em>package_dir</em>/<em>name</em>-<em>version</em>.gem"</b>]
#   Create a RubyGems package with the given name and version.
#
# Example using a Gem::Specification:
#
#   require 'rubygems'
#   require 'rubygems/package_task'
#
#   spec = Gem::Specification.new do |s|
#     s.summary = "Ruby based make-like utility."
#     s.name = 'rake'
#     s.version = PKG_VERSION
#     s.requirements << 'none'
#     s.files = PKG_FILES
#     s.description = <<-EOF
#   Rake is a Make-like program implemented in Ruby. Tasks
#   and dependencies are specified in standard Ruby syntax.
#     EOF
#   end
#
#   Gem::PackageTask.new(spec) do |pkg|
#     pkg.need_zip = true
#     pkg.need_tar = true
#   end

class Gem::PackageTask < Rake::PackageTask
  ##
  # Ruby Gem::Specification containing the metadata for this package.  The
  # name, version and package_files are automatically determined from the
  # gemspec and don't need to be explicitly provided.

  attr_accessor :gem_spec

  ##
  # Create a Gem Package task library.  Automatically define the gem if a
  # block is given.  If no block is supplied, then #define needs to be called
  # to define the task.

  def initialize(gem_spec)
    init gem_spec
    yield self if block_given?
    define if block_given?
  end

  ##
  # Initialization tasks without the "yield self" or define operations.

  def init(gem)
    super gem.full_name, :noversion
    @gem_spec = gem
    @package_files += gem_spec.files if rubygems/rubygems/basic_specification.rb000064400000017234150403134210014544 0ustar00   file gem_path => [package_dir, gem_dir] + @gem_spec.files do
      chdir(gem_dir) do
        when_writing "Creating #{gem_spec.file_name}" do
          Gem::Package.build gem_spec

          verbose trace do
            mv gem_file, ".."
          end
        end
      end
    end
  end
end
rubygems/rubygems/tsort.rb000064400000000102150403134210011720 0ustar00 implementation, every version of the option needs
  # to be explirubygems/rubygems/update_suggestion.rb000064400000003553150403134210014313 0ustar00# frozen_string_literal: true

##
# Mixin methods for Gem::Command to promote available RubyGems update

module Gem::UpdateSuggestion
  ONE_WEEK = 7 * 24 * 60 * 60

  ##
  # Message to promote available RubyGems update with related gem update command.

  def update_suggestion
    <<-MESSAGE

A new release of RubyGems is available: #{Gem.rubygems_version} → #{Gem.latest_rubygems_version}!
Run `gem update --system #{Gem.latest_rubygems_version}` to update your installation.

    MESSAGE
  end

  ##
  # Determines if current environment is eligible for update suggestion.

  def eligible_for_update?
    # explicit opt-out
    return false if Gem.configuration[:prevent_update_suggestion]
    return false if ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"]

    # focus only on human usage of final RubyGems releases
    return false unless Gem.ui.tty?
    return false if Gem.rubygems_version.prerelease?
    return false if Gem.disable_system_update_message
    return false if Gem::CIDetector.ci?

    # check makes sense only when we can store timestamp of last try
    # otherwise we will not be able to prevent "annoying" update message
    # on each command call
    return unless Gem.configuration.state_file_writable?

    # load time of last check, ensure the difference is enough to repeat the suggestion
    check_time = Time.now.to_i
    last_update_check = Gem.configuration.last_update_check
    return false if (check_time - last_update_check) < ONE_WEEK

    # compare current and latest version, this is the part where
    # latest rubygems spec is fetched from remote
    (Gem.rubygems_version < Gem.latest_rubygems_version).tap do |eligible|
      # store the time of last successful check into state file
      Gem.configuration.last_update_check = check_time

      return eligible
    end
  rescue StandardError # don't block install command on any problem
    false
  end
end
rubygems/rubygems/install_update_options.rb000064400000015102150403134210015336 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "../rubygems"
require_relative "security_option"

##
# Mixin methods for install and update options for Gem::Commands

module Gem::InstallUpdateOptions
  include Gem::SecurityOption

  ##
  # Add the install/update options to the option parser.

  def add_install_update_options
    add_option(:"Install/Update", "-i", "--install-dir DIR",
               "Gem repository directory to get installed",
               "gems") do |value, options|
      options[:install_dir] = File.expand_path(value)
    end

    add_option(:"Install/Update", "-n", "--bindir DIR",
               "Directory where executables will be",
               "placed when the gem is installed") do |value, options|
      options[:bin_dir] = File.expand_path(value)
    end

    add_option(:"Install/Update", "--document [TYPES]", Array,
               "Generate documentation for installed gems",
               "List the documentation types you wish to",
               "generate.  For example: rdoc,ri") do |value, options|
      options[:document] = case value
                           when nil   then %w[ri]
                           when false then []
                           else value
      end
    end

    add_option(:"Install/Update", "--build-root DIR",
               "Temporary installation root. Useful for building",
               "packages. Do not use this when installing remote gems.") do |value, options|
      options[:build_root] = File.expand_path(value)
    end

    add_option(:"Install/Update", "--vendor",
               "Install gem into the vendor directory.",
               "Only for use by gem repackagers.") do |_value, options|
      unless Gem.vendor_dir
        raise Gem::OptionParser::InvalidOption.new "your platform is not supported"
      end

      options[:vendor] = true
      options[:install_dir] = Gem.vendor_dir
    end

    add_option(:"Install/Update", "-N", "--no-document",
               "Disable documentation generation") do |_value, options|
      options[:document] = []
    end

    add_option(:"Install/Update", "-E", "--[no-]env-shebang",
               "Rewrite the shebang line on installed",
               "scripts to use /usr/bin/env") do |value, options|
      options[:env_shebang] = value
    end

    add_option(:"Install/Update", "-f", "--[no-]force",
               "Force gem to install, bypassing dependency",
               "checks") do |value, options|
      options[:force] = value
    end

    add_option(:"Install/Update", "-w", "--[no-]wrappers",
               "Use bin wrappers for executables",
               "Not available on dosish platforms") do |value, options|
      options[:wrappers] = value
    end

    add_security_option

    add_option(:"Install/Update", "--ignore-dependencies",
               "Do not install any required dependent gems") do |value, options|
      options[:ignore_dependencies] = value
    end

    add_option(:"Install/Update", "--[no-]format-executable",
               "Make installed executable names match Ruby.",
               "If Ruby is ruby1rubygems/rubygems/util/list.rb000064400000001112150403134210012477 0ustar00ate", "--conservative",
                "Don't attempt to upgrade gems already",
                "meeting version requirement") do |_value, options|
      options[:conservative] = true
      options[:minimal_deps] = true
    end

    add_option(:"Install/Update", "--[no-]minimal-deps",
                "Don't upgrade any dependencies that already",
                "meet version requirements") do |value, options|
      options[:minimal_deps] = value
    end

    add_option(:"Install/Update", "--[no-]post-install-message",
                "Print post install message") do |value, optrubygems/rubygems/util/licenses.rb000064400000021554150403134210013345 0ustar00ifications/default and extract only its bin") do |v,_o|
      options[:install_as_default] = v
    end

    add_option(:"Install/Update", "--explain",
               "Rather than install the gems, indicate which would",
               "be installed") do |v,_o|
      options[:explain] = v
    end

    add_option(:"Install/Update", "--[no-]lock",
               "Create a lock file (when used with -g/--file)") do |v,_o|
      options[:lock] = v
    end

    add_option(:"Install/Update", "--[no-]suggestions",
               "Suggest alternates when gems are not found") do |v,_o|
      options[:suggest_alternate] = v
    end

    add_option(:"Install/Update", "--target-rbconfig [FILE]",
                "rbconfig.rb for the deployment target platform") do |v, _o|
      Gem.set_target_rbconfig(v)
    end
  end

  ##
  # Default options for the gem install and update commands.

  def install_update_options
    {
      document: %w[ri],
    }
  end

  ##
  # Default description for the gem install and update commands.

  def install_update_defaults_str
    "--document=ri"
  end
end
rubygems/rubygems/util.rb000064400000004727150403134210011543 0ustar00# frozen_string_literal: true

require_relative "deprecate"

##
# This module contains various utility methods as module methods.

module Gem::Util
  ##
  # Zlib::GzipReader wrapper that unzips +data+.

  def self.gunzip(data)
    require "zlib"
    require "stringio"
    data = StringIO.new(data, "r")

    gzip_reader = begin
                    Zlib::GzipReader.new(data)
                  rescue Zlib::GzipFile::Error => e
                    raise e.class, e.inspect, e.backtrace
                  end

    unzipped = gzip_reader.read
    unzipped.force_encoding Encoding::BINARY
    unzipped
  end

  ##
  # Zlib::GzipWriter wrapper that zips +data+.

  def self.gzip(data)
    require "zlib"
    require "stringio"
    zipped = StringIO.new(String.new, "w")
    zipped.set_encoding Encoding::BINARY

    Zlib::GzipWriter.wrap zipped do |io|
      io.write data
    end

    zipped.string
  end

  ##
  # A Zlib::Inflate#inflate wrapper

  def self.inflate(data)
    require "zlib"
    Zlib::Inflate.inflate data
  end

  ##
  # This calls IO.popen and reads the result

  def self.popen(*command)
    IO.popen command, &:read
  end

  ##
  # Invokes system, but silences all output.

  def self.silent_system(*command)
    opt = { out: IO::NULL, err: [:child, :out] }
    if Hash === command.last
      opt.update(command.last)
      cmds = command[0...-1]
    else
      cmds = command.dup
    end
    system(*(cmds << opt))
  end

  class << self
    extend Gem::Deprecate

    rubygems_deprecate :silent_system
  end

  ##
  # Enumerates the parents of +directory+.

  def self.traverse_parents(directory, &block)
    return enum_for __method__, directory unless block_given?

    here = File.expand_path directory
    loop do
      begin
        Dir.chdir here, &block
      rescue StandardError
        Errno::EACCES
      end

      new_here = File.expand_path("..", here)
      return if new_here == here # toplevel
      here = new_here
    end
  end

  ##
  # Globs for files matching +pattern+ inside of +directory+,
  # returning absolute paths to the matching files.

  def self.glob_files_in_dir(glob, base_path)
    Dir.glob(glob, base: base_path).map! {|f| File.expand_path(f, base_path) }
  end

  ##
  # Corrects +path+ (usually returned by `Gem::URI.parse().path` on Windows), that
  # comes with a leading slash.

  def self.correct_for_windows_path(path)
    if path[0].chr == "/" && path[1].chr.match?(/[a-z]/i) && path[2].chr == ":"
      path[1..-1]
    else
      path
    end
  end
end
rubygems/rubygems/basic_specification.rb000064400000020211150403134210014531 0ustar00# frozen_string_literal: true

##
# BasicSpecification is an abstract class which implements some common code
# used by both Specification and StubSpecification.

class Gem::BasicSpecification
  ##
  # Allows installation of extensions for git: gems.

  attr_writer :base_dir # :nodoc:

  ##
  # Sets the directory where extensions for this gem will be installed.

  attr_writer :extension_dir # :nodoc:

  ##
  # Is this specification ignored for activation purposes?

  attr_writer :ignored # :nodoc:

  ##
  # The path this gemspec was loaded from.  This attribute is not persisted.

  attr_accessor :loaded_from

  ##
  # Allows correct activation of git: and path: gems.

  attr_writer :full_gem_path # :nodoc:

  def initialize
    internal_init
  end

  def self.default_specifications_dir
    Gem.default_specifications_dir
  end

  class << self
    extend Gem::Deprecate
    rubygems_deprecate :default_specifications_dir, "Gem.default_specifications_dir"
  end

  ##
  # The path to the gem.build_complete file within the extension install
  # directory.

  def gem_build_complete_path # :nodoc:
    File.join extension_dir, "gem.build_complete"
  end

  ##
  # True when the gem has been activated

  def activated?
    raise NotImplementedError
  end

  ##
  # Returns the full path to the base gem directory.
  #
  # eg: /usr/local/lib/ruby/gems/1.8

  def base_dir
    raise NotImplementedError
  end

  ##
  # Return true if this spec can require +file+.

  def contains_requirable_file?(file)
    if ignored?
      if platform == Gem::Platform::RUBY || Gem::Platform.local === platform
        warn "Ignoring #{full_name} because its extensions are not built. " \
             "Try: gem pristine #{name} --version #{version}"
      end

      return false
    end

    is_soext = file.end_with?(".so", ".o")

    if is_soext
      have_file? file.delete_suffix(File.extname(file)), Gem.dynamic_library_suffixes
    else
      have_file? file, Gem.suffixes
    end
  end

  ##
  # Return true if this spec should be ignored because it's missing extensions.

  def ignored?
    return @ignored unless @ignored.nil?

    @ignored = missing_extensions?
  end

  def default_gem?
    !loaded_from.nil? &&
      File.dirname(loaded_from) == Gem.default_specifications_dir
  end

  ##
  # Regular gems take precedence over default gems

  def default_gem_priority
    default_gem? ? 1 : -1
  end

  ##
  # Gems higher up in +gem_path+ take precedence

  def base_dir_priority(gem_path)
    gem_path.index(base_dir) || gem_path.size
  end

  ##
  # Returns full path to the directory where gem's extensions are installed.

  def extension_dir
    @extension_dir ||= File.expand_path(File.join(extensions_dir, full_name))
  end

  ##
  # Returns path to the extensions directory.

  def extensions_dir
    Gem.default_ext_dir_for(base_dir) ||
      File.join(base_dir, "extensions", Gem::Platform.local.to_s,
                Gem.extension_api_version)
  end

  def find_full_gem_path # :nodoc:
    File.expand_path File.join(gems_dir, full_name)
  end

  private :find_full_gem_path

  ##
  # The full path to the gem (install path + full name).
  #
  # TODO: This is duplicated with #gem_dir. Eventually either of them should be deprecated.

  def full_gem_path
    @full_gem_path ||= find_full_gem_path
  end

  ##
  # Returns the full name (name-version) of this Gem.  Platform information
  # is included (name-version-platform) if it is specified and not the
  # default Ruby platform.

  def full_name
    if platform == Gem::Platform::RUBY || platform.nil?
      "#{name}-#{version}"
    else
      "#{name}-#{version}-#{platform}"
    end
  end

  ##
  # Returns the full name of this Gem (see `Gem::BasicSpecification#full_name`).
  # Information about where the gem is installed is also included if not
  # installed in the default GEM_HOME.

  def full_name_with_location
    if base_dir != Gem.dir
      "#{full_name} in #{base_rubygems/rubygems/local_remote_options.rb000064400000007077150403134210015007 0ustar00 file.
  # If the file is not in this gem, return nil.

  def to_fullpath(path)
    if activated?
      @paths_map ||= {}
      Gem.suffixes.each do |suf|
        full_require_paths.each do |dir|
          fullpath = "#{dir}/#{path}#{suf}"
          next unless File.file?(fullpath)
          @paths_map[path] ||= fullpath
        end
      end
      @paths_map[path]
    end
  end

  ##
  # Returns the full path to this spec's gem directory.
  # eg: /usr/local/lib/ruby/1.8/gems/mygem-1.0
  #
  # TODO: This is duplicated with #full_gem_path. Eventually either of them should be deprecated.

  def gem_dir
    @gem_dir ||= find_full_gem_path
  end

  ##
  # Returns the full path to the gems directory containing this spec's
  # gem directory. eg: /usr/local/lib/ruby/1.8/gems

  def gems_dir
    raise NotImplementedError
  end

  def internal_init # :nodoc:
    @extension_dir = nil
    @full_gem_path = nil
    @gem_dir = nil
    @ignored = nil
  end

  ##
  # Name of the gem

  def name
    raise NotImplementedError
  end

  ##
  # Platform of the gem

  def platform
    raise NotImplementedError
  end

  def raw_require_paths # :nodoc:
    raise NotImplementedError
  end

  ##
  # Paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
  # activated.
  #
  # See also #require_paths=
  #
  # If you have an extension you do not need to add <code>"ext"</code> to the
  # require path, the extension build process will copy the extension files
  # into "lib" for you.
  #
  # The default value is <code>"lib"</code>
  #
  # Usage:
  #
  #   # If all library files are in the root directory...
  #   spec.require_path = '.'

  def require_paths
    return raw_require_paths unless have_extensions?

    [extension_dir].concat raw_require_paths
  end

  ##
  # Returns the paths to the source files for use with analysis and
  # documentation tools.  These paths are relative to full_gem_path.

  def source_paths
    paths = raw_require_paths.dup

    if have_extensions?
      ext_dirs = extensions.map do |extension|
        extension.split(File::SEPARATOR, 2).first
      end.uniq

      paths.concat ext_dirs
    end

    paths.uniq
  end

  ##
  # Return all files in this gem that match for +glob+.

  def matches_for_glob(glob) # TODO: rename?
    glob = File.join(lib_dirs_glob, glob)

    Dir[glob]
  end

  ##
  # Returns the list of plugins in this spec.

  def plugins
    matches_for_glob("rubygems#{Gem.plugin_suffix_pattern}")
  end

  ##
  # Returns a string usable in Dir.glob to match all requirable paths
  # for this spec.

  def lib_dirs_glob
    dirs = if raw_require_paths
      if raw_require_paths.size > 1
        "{#{raw_require_paths.join(",")}}"
      else
        raw_require_paths.first
      end
    else
      "lib" # default value for require_paths for bundler/inline
    end

    "#{full_gem_path}/#{dirs}"
  end

  ##
  # Return a Gem::Specification from this gem

  def to_spec
    raise NotImplementedError
  end

  ##
  # Version of the gem

  def version
    raise NotImplementedError
  end

  ##
  # Whether this specification is stubbed - i.e. we have information
  # about the gem from a stub line, without having to evaluate the
  # entire gemspec file.
  def stubbed?
    raise NotImplementedError
  end

  def this
    self
  end

  private

  def have_extensions?
    !extensions.empty?
  end

  def have_file?(file, suffixes)
    return true if raw_require_paths.any? do |path|
      base = File.join(gems_dir, full_name, path, file)
      suffixes.any? {|suf| File.file? base + suf }
    end

    if have_extensions?
      base = File.join extension_dir, file
      suffixes.arubygems/rubygems/specification_policy.rb000064400000033454150403134210014764 0ustar00# frozen_string_literal: true

module Gem
  # The Gem::List class is currently unused and will be removed in the next major rubygems version
  class List # :nodoc:
    include Enumerable
    attr_accessor :value, :tail

    def initialize(value = nil, tail = nil)
      @value = value
      @tail = tail
    end

    def each
      n = self
      while n
        yield n.value
        n = n.tail
      end
    end

    def to_a
      super.reverse
    end

    def prepend(value)
      List.new value, self
    end

    def pretty_print(q) # :nodoc:
      q.pp to_a
    end

    def self.prepend(list, value)
      return List.new(value) unless list
      List.new value, list
    end
  end
  deprecate_constant :List
end
rubygems/rubygems/util/licenses.rb000064400000034362150403134210013346 0ustar00# frozen_string_literal: true

# This is generated by generate_spdx_license_list.rb, any edits to this
# file will be discarded.

require_relative "../text"

class Gem::Licenses
  extend Gem::Text

  NONSTANDARD = "Nonstandard"
  LICENSE_REF = "LicenseRef-.+"

  # Software Package Data Exchange (SPDX) standard open-source software
  # license identifiers
  LICENSE_IDENTIFIERS = %w[
    0BSD
    3D-Slicer-1.0
    AAL
    ADSL
    AFL-1.1
    AFL-1.2
    AFL-2.0
    AFL-2.1
    AFL-3.0
    AGPL-1.0-only
    AGPL-1.0-or-later
    AGPL-3.0-only
    AGPL-3.0-or-later
    AMD-newlib
    AMDPLPA
    AML
    AML-glslang
    AMPAS
    ANTLR-PD
    ANTLR-PD-fallback
    APAFML
    APL-1.0
    APSL-1.0
    APSL-1.1
    APSL-1.2
    APSL-2.0
    ASWF-Digital-Assets-1.0
    ASWF-Digital-Assets-1.1
    Abstyles
    AdaCore-doc
    Adobe-2006
    Adobe-Display-PostScript
    Adobe-Glyph
    Adobe-Utopia
    Afmparse
    Aladdin
    Apache-1.0
    Apache-1.1
    Apache-2.0
    App-s2p
    Arphic-1999
    Artistic-1.0
    Artistic-1.0-Perl
    Artistic-1.0-cl8
    Artistic-2.0
    BSD-1-Clause
    BSD-2-Clause
    BSD-2-Clause-Darwin
    BSD-2-Clause-Patent
    BSD-2-Clause-Views
    BSD-2-Clause-first-lines
    BSD-3-Clause
    BSD-3-Clause-Attribution
    BSD-3-Clause-Clear
    BSD-3-Clause-HP
    BSD-3-Clause-LBNL
    BSD-3-Clause-Modification
    BSD-3-Clause-No-Military-License
    BSD-3-Clause-No-Nuclear-License
    BSD-3-Clause-No-Nuclear-License-2014
    BSD-3-Clause-No-Nuclear-Warranty
    BSD-3-Clause-Open-MPI
    BSD-3-Clause-Sun
    BSD-3-Clause-acpica
    BSD-3-Clause-flex
    BSD-4-Clause
    BSD-4-Clause-Shortened
    BSD-4-Clause-UC
    BSD-4.3RENO
    BSD-4.3TAHOE
    BSD-Advertising-Acknowledgement
    BSD-Attribution-HPND-disclaimer
    BSD-Inferno-Nettverk
    BSD-Protection
    BSD-Source-Code
    BSD-Source-beginning-file
    BSD-Systemics
    BSD-Systemics-W3Works
    BSL-1.0
    BUSL-1.1
    Baekmuk
    Bahyph
    Barr
    Beerware
    BitTorrent-1.0
    BitTorrent-1.1
    Bitstream-Charter
    Bitstream-Vera
    BlueOak-1.0.0
    Boehm-GC
    Boehm-GC-without-fee
    Borceux
    Brian-Gladman-2-Clause
    Brian-Gladman-3-Clause
    C-UDA-1.0
    CAL-1.0
    CAL-1.0-Combined-Work-Exception
    CATOSL-1.1
    CC-BY-1.0
    CC-BY-2.0
    CC-BY-2.5
    CC-BY-2.5-AU
    CC-BY-3.0
    CC-BY-3.0-AT
    CC-BY-3.0-AU
    CC-BY-3.0-DE
    CC-BY-3.0-IGO
    CC-BY-3.0-NL
    CC-BY-3.0-US
    CC-BY-4.0
    CC-BY-NC-1.0
    CC-BY-NC-2.0
    CC-BY-NC-2.5
    CC-BY-NC-3.0
    CC-BY-NC-3.0-DE
    CC-BY-NC-4.0
    CC-BY-NC-ND-1.0
    CC-BY-NC-ND-2.0
    CC-BY-NC-ND-2.5
    CC-BY-NC-ND-3.0
    CC-BY-NC-ND-3.0-DE
    CC-BY-NC-ND-3.0-IGO
    CC-BY-NC-ND-4.0
    CC-BY-NC-SA-1.0
    CC-BY-NC-SA-2.0
    CC-BY-NC-SA-2.0-DE
    CC-BY-NC-SA-2.0-FR
    CC-BY-NC-SA-2.0-UK
    CC-BY-NC-SA-2.5
    CC-BY-NC-SA-3.0
    CC-BY-NC-SA-3.0-DE
    CC-BY-NC-SA-3.0-IGO
    CC-BY-NC-SA-4.0
    CC-BY-ND-1.0
    CC-BY-ND-2.0
    CC-BY-ND-2.5
    CC-BY-ND-3.0
    CC-BY-ND-3.0-DE
    CC-BY-ND-4.0
    CC-BY-SA-1.0
    CC-BY-SA-2.0
    CC-BY-SA-2.0-UK
    CC-BY-SA-2.1-JP
    CC-BY-SA-2.5
    CC-BY-SA-3.0
    CC-BY-SA-3.0-AT
    CC-BY-SA-3.0-DE
    CC-BY-SA-3.0-IGO
    CC-BY-SA-4.0
    CC-PDDC
    CC-PDM-1.0
    CC-SA-1.0
    CC0-1.0
    CDDL-1.0
    CDDL-1.1
    CDL-1.0
    CDLA-Permissive-1.0
    CDLA-Permissive-2.0
    CDLA-Sharing-1.0
    CECILL-1.0
    CECILL-1.1
    CECILL-2.0
    CECILL-2.1
    CECILL-B
    CECILL-C
    CERN-OHL-1.1
    CERN-OHL-1.2
    CERN-OHL-P-2.0
    CERN-OHL-S-2.0
    CERN-OHL-W-2.0
    CFITSIO
    CMU-Mach
    CMU-Mach-nodoc
    CNRI-Jython
    CNRI-Python
    CNRI-Python-GPL-Compatible
    COIL-1.0
    CPAL-1.0
    CPL-1.0
    CPOL-1.02
    CUA-OPL-1.0
    Caldera
    Caldera-no-preamble
    Catharon
    ClArtistic
    Clips
    Community-Spec-1.0
    Condor-1.1
    Cornell-Lossless-JPEG
    Cronyx
    Crossword
    CrystalStacker
    Cube
    D-FSL-1.0
    DEC-3-Clause
    DL-DE-BY-2.0
    DL-DE-ZERO-2.0
    DOC
    DRL-1.0
    DRL-1.1
    DSDP
    DocBook-Schema
    DocBook-Stylesheet
    DocBook-XML
    Dotseqn
    ECL-1.0
    ECL-2.0
    EFL-1.0
    EFL-2.0
    EPICS
    EPL-1.0
    EPL-2.0
    EUDatagrid
    EUPL-1.0
    EUPL-1.1
    EUPL-1.2
    Elastic-2.0
    Entessa
    ErlPL-1.1
    Eurosym
    FBM
    FDK-AAC
    FSFAP
    FSFAP-no-warranty-disclaimer
    FSFUL
    FSFULLR
    FSFULLRWD
    FTL
    Fair
    Ferguson-Twofish
    Frameworx-1.0
    FreeBSD-DOC
    FreeImage
    Furuseth
    GCR-docs
    GD
    GFDL-1.1-invariants-only
    GFDL-1.1-invariants-or-later
    GFDL-1.1-no-invariants-only
    GFDL-1.1-no-invariants-or-later
    GFDL-1.1-only
    GFDL-1.1-or-later
    GFDL-1.2-invariants-only
    GFDL-1.2-invariants-or-later
    GFDL-1.2-no-invariants-only
    GFDL-1.2-no-invariants-or-later
    GFDL-1.2-only
    GFDL-1.2-or-later
    GFDL-1.3-invariants-only
    GFDL-1.3-invariants-or-later
    GFDL-1.3-no-invariants-only
    GFDL-1.3-no-invariants-or-later
    GFDL-1.3-only
    GFDL-1.3-or-later
    GL2PS
    GLWTPL
    GPL-1.0-only
    GPL-1.0-or-later
    GPL-2.0-only
    GPL-2.0-or-later
    GPL-3.0-only
    GPL-3.0-or-later
    Giftware
    Glide
    Glulxe
    Graphics-Gems
    Gutmann
    HIDAPI
    HP-1986
    HP-1989
    HPND
    HPND-DEC
    HPND-Fenneberg-Livingston
    HPND-INRIA-IMAG
    HPND-Intel
    HPND-Kevlin-Henney
    HPND-MIT-disclaimer
    HPND-Markus-Kuhn
    HPND-Netrek
    HPND-Pbmplus
    HPND-UC
    HPND-UC-export-US
    HPND-doc
    HPND-doc-sell
    HPND-export-US
    HPND-export-US-acknowledgement
    HPND-export-US-modify
    HPND-export2-US
    HPND-merchantability-variant
    HPND-sell-MIT-disclaimer-xserver
    HPND-sell-regexpr
    HPND-sell-variant
    HPND-sell-variant-MIT-disclaimer
    HPND-sell-variant-MIT-disclaimer-rev
    HTMLTIDY
    HaskellReport
    Hippocratic-2.1
    IBM-pibs
    ICU
    IEC-Code-Components-EULA
    IJG
    IJG-short
    IPA
    IPL-1.0
    ISC
    ISC-Veillard
    ImageMagick
    Imlib2
    Info-ZIP
    Inner-Net-2.0
    InnoSetup
    Intel
    Intel-ACPI
    Interbase-1.0
    JPL-image
    JPNIC
    JSON
    Jam
    JasPer-2.0
    Kastrup
    Kazlib
    Knuth-CTAN
    LAL-1.2
    LAL-1.3
    LGPL-2.0-only
    LGPL-2.0-or-later
    LGPL-2.1-only
    LGPL-2.1-or-later
    LGPL-3.0-only
    LGPL-3.0-or-later
    LGPLLR
    LOOP
    LPD-document
    LPL-1.0
    LPL-1.02
    LPPL-1.0
    LPPL-1.1
    LPPL-1.2
    LPPL-1.3a
    LPPL-1.3c
    LZMA-SDK-9.11-to-9.20
    LZMA-SDK-9.22
    Latex2e
    Latex2e-translated-notice
    Leptonica
    LiLiQ-P-1.1
    LiLiQ-R-1.1
    LiLiQ-Rplus-1.1
    Libpng
    Linux-OpenIB
    Linux-man-pages-1-para
    Linux-man-pages-copyleft
    Linux-man-pages-copyleft-2-para
    Linux-man-pages-copyleft-var
    Lucida-Bitmap-Fonts
    MIPS
    MIT
    MIT-0
    MIT-CMU
    MIT-Click
    MIT-Festival
    MIT-Khronos-old
    MIT-Modern-Variant
    MIT-Wu
    MIT-advertising
    MIT-enna
    MIT-feh
    MIT-open-group
    MIT-testregex
    MITNFA
    MMIXware
    MPEG-SSG
    MPL-1.0
    MPL-1.1
    MPL-2.0
    MPL-2.0-no-copyleft-exception
    MS-LPL
    MS-PL
    MS-RL
    MTLL
    Mackerras-3-Clause
    Mackerras-3-Clause-acknowledgment
    MakeIndex
    Martin-Birgmeier
    McPhee-slideshow
    Minpack
    MirOS
    Motosoto
    MulanPSL-1.0
    MulanPSL-2.0
    Multics
    Mup
    NAIST-2003
    NASA-1.3
    NBPL-1.0
    NCBI-PD
    NCGL-UK-2.0
    NCL
    NCSA
    NGPL
    NICTA-1.0
    NIST-PD
    NIST-PD-fallback
    NIST-Software
    NLOD-1.0
    NLOD-2.0
    NLPL
    NOSL
    NPL-1.0
    NPL-1.1
    NPOSL-3.0
    NRL
    NTP
    NTP-0
    Naumen
    NetCDF
    Newsletr
    Nokia
    Noweb
    O-UDA-1.0
    OAR
    OCCT-PL
    OCLC-2.0
    ODC-By-1.0
    ODbL-1.0
    OFFIS
    OFL-1.0
    OFL-1.0-RFN
    OFL-1.0-no-RFN
    OFL-1.1
    OFL-1.1-RFN
    OFL-1.1-no-RFN
    OGC-1.0
    OGDL-Taiwan-1.0
    OGL-Canada-2.0
    OGL-UK-1.0
    OGL-UK-2.0
    OGL-UK-3.0
    OGTSL
    OLDAP-1.1
    OLDAP-1.2
    OLDAP-1.3
    OLDAP-1.4
    OLDAP-2.0
    OLDAP-2.0.1
    OLDAP-2.1
    OLDAP-2.2
    OLDAP-2.2.1
    OLDAP-2.2.2
    OLDAP-2.3
    OLDAP-2.4
    OLDAP-2.5
    OLDAP-2.6
    OLDAP-2.7
    OLDAP-2.8
    OLFL-1.3
    OML
    OPL-1.0
    OPL-UK-3.0
    OPUBL-1.0
    OSET-PL-2.1
    OSL-1.0
    OSL-1.1
    OSL-2.0
    OSL-2.1
    OSL-3.0
    OpenPBS-2.3
    OpenSSL
    OpenSSL-standalone
    OpenVision
    PADL
    PDDL-1.0
    PHP-3.0
    PHP-3.01
    PPL
    PSF-2.0
    Parity-6.0.0
    Parity-7.0.0
    Pixar
    Plexus
    PolyForm-Noncommercial-1.0.0
    PolyForm-Small-Business-1.0.0
    PostgreSQL
    Python-2.0
    Python-2.0.1
    QPL-1.0
    QPL-1.0-INRIA-2004
    Qhull
    RHeCos-1.1
    RPL-1.1
    RPL-1.5
    RPSL-1.0
    RSA-MD
    RSCPL
    Rdisc
    Ruby
    Ruby-pty
    SAX-PD
    SAX-PD-2.0
    SCEA
    SGI-B-1.0
    SGI-B-1.1
    SGI-B-2.0
    SGI-OpenGL
    SGP4
    SHL-0.5
    SHL-0.51
    SISSL
    SISSL-1.2
    SL
    SMAIL-GPL
    SMLNJ
    SMPPL
    SNIA
    SPL-1.0
    SSH-OpenSSH
    SSH-short
    SSLeay-standalone
    SSPL-1.0
    SWL
    Saxpath
    SchemeReport
    Sendmail
    Sendmail-8.23
    Sendmail-Open-Source-1.1
    SimPL-2.0
    Sleepycat
    Soundex
    Spencer-86
    Spencer-94
    Spencer-99
    SugarCRM-1.1.3
    Sun-PPP
    Sun-PPP-2000
    SunPro
    Symlinks
    TAPR-OHL-1.0
    TCL
    TCP-wrappers
    TGPPL-1.0
    TMate
    TORQUE-1.1
    TOSL
    TPDL
    TPL-1.0
    TTWL
    TTYP0
    TU-Berlin-1.0
    TU-Berlin-2.0
    TermReadKey
    ThirdEye
    TrustedQSL
    UCAR
    UCL-1.0
    UMich-Merit
    UPL-1.0
    URT-RLE
    Ubuntu-font-1.0
    Unicode-3.0
    Unicode-DFS-2015
    Unicode-DFS-2016
    Unicode-TOU
    UnixCrypt
    Unlicense
    VOSTROM
    VSL-1.0
    Vim
    W3C
    W3C-19980720
    W3C-20150513
    WTFPL
    Watcom-1.0
    Widget-Workshop
    Wsuipa
    X11
    X11-distribute-modifications-variant
    X11-swapped
    XFree86-1.1
    XSkat
    Xdebug-1.03
    Xerox
    Xfig
    Xnet
    YPL-1.0
    YPL-1.1
    ZPL-1.1
    ZPL-2.0
    ZPL-2.1
    Zed
    Zeeff
    Zend-2.0
    Zimbra-1.3
    Zimbra-1.4
    Zlib
    any-OSI
    any-OSI-perl-modules
    bcrypt-Solar-Designer
    blessing
    bzip2-1.0.6
    check-cvs
    checkmk
    copyleft-next-0.3.0
    copyleft-next-0.3.1
    curl
    cve-tou
    diffmark
    dtoa
    dvipdfm
    eGenix
    etalab-2.0
    fwlw
    gSOAP-1.3b
    generic-xts
    gnuplot
    gtkbook
    hdparm
    iMatix
    libpng-2.0
    libselinux-1.0
    libtiff
    libutil-David-Nugent
    lsof
    magaz
    mailprio
    metamail
    mpi-permissive
    mpich2
    mplus
    pkgconf
    pnmstitch
    psfrag
    psutils
    python-ldap
    radvd
    snprintf
    softSurfer
    ssh-keyscan
    swrule
    threeparttable
    ulem
    w3m
    wwl
    xinetd
    xkeyboard-config-Zinoviev
    xlock
    xpp
    xzoom
    zlib-acknowledgement
  ].freeze

  DEPRECATED_LICENSE_IDENTIFIERS = %w[
    AGPL-1.0
    AGPL-3.0
    BSD-2-Clause-FreeBSD
    BSD-2-Clause-NetBSD
    GFDL-1.1
    GFDL-1.2
    GFDL-1.3
    GPL-1.0
    GPL-1.0+
    GPL-2.0
    GPL-2.0+
    GPL-2.0-with-GCC-exception
    GPL-2.0-with-autoconf-exception
    GPL-2.0-with-bison-exception
    GPL-2.0-with-classpath-exception
    GPL-2.0-with-font-exception
    GPL-3.0
    GPL-3.0+
    GPL-3.0-with-GCC-exception
    GPL-3.0-with-autoconf-exception
    LGPL-2.0
    LGPL-2.0+
    LGPL-2.1
    LGPL-2.1+
    LGPL-3.0
    LGPL-3.0+
    Net-SNMP
    Nunit
    StandardML-NJ
    bzip2-1.0.5
    eCos-2.0
    wxWindows
  ].freeze

  # exception identifiers
  EXCEPTION_IDENTIFIERS = %w[
    389-exception
    Asterisk-exception
    Asterisk-linking-protocols-exception
    Autoconf-exception-2.0
    Autoconf-exception-3.0
    Autoconf-exception-generic
    Autoconf-exception-generic-3.0
    Autoconf-exception-macro
    Bison-exception-1.24
    Bison-exception-2.2
    Bootloader-exception
    CGAL-linking-exception
    CLISP-exception-2.0
    Classpath-exception-2.0
    DigiRule-FOSS-exception
    FLTK-exception
    Fawkes-Runtime-exception
    Font-exception-2.0
    GCC-exception-2.0
    GCC-exception-2.0-note
    GCC-exception-3.1
    GNAT-exception
    GNOME-examples-exception
    GNU-compiler-exception
    GPL-3.0-389-ds-base-exception
    GPL-3.0-interface-exception
    GPL-3.0-linking-exception
    GPL-3.0-linking-source-exception
    GPL-CC-1.0
    GStreamer-exception-2005
    GStreamer-exception-2008
    Gmsh-exception
    Independent-modules-exception
    KiCad-libraries-exception
    LGPL-3.0-linking-exception
    LLGPL
    LLVM-exception
    LZMA-exception
    Libtool-exception
    Linux-syscall-note
    OCCT-exceptiorubygems/rubygems/uninstaller.rb000064400000024315150403134210013121 0ustar00ption
    openvpn-openssl-exception
    romic-exception
    stunnel-exception
    u-boot-exception-2.0
    vsftpd-openssl-exception
    x11vnc-openssl-exception
  ].freeze

  DEPRECATED_EXCEPTION_IDENTIFIERS = %w[
    Nokia-Qt-exception-1.1
  ].freeze

  VALID_REGEXP = /
    \A
    (?:
      #{Regexp.union(LICENSE_IDENTIFIERS)}
      \+?
      (?:\s WITH \s #{Regexp.union(EXCEPTION_IDENTIFIERS)})?
      | #{NONSTANDARD}
      | #{LICENSE_REF}
    )
    \Z
  /ox

  DEPRECATED_LICENSE_REGEXP = /
    \A
    #{Regexp.union(DEPRECATED_LICENSE_IDENTIFIERS)}
    \+?
    (?:\s WITH \s .+?)?
    \Z
  /ox

  DEPRECATED_EXCEPTION_REGEXP = /
    \A
    .+?
    \+?
    (?:\s WITH \s #{Regexp.union(DEPRECATED_EXCEPTION_IDENTIFIERS)})
    \Z
  /ox

  def self.match?(license)
    VALID_REGEXP.match?(license)
  end

  def self.deprecated_license_id?(license)
    DEPRECATED_LICENSE_REGEXP.match?(license)
  end

  def self.deprecated_exception_id?(license)
    DEPRECATED_EXCEPTION_REGEXP.match?(license)
  end

  def self.suggestions(license)
    by_distance = LICENSE_IDENTIFIERS.group_by do |identifier|
      levenshtein_distance(identifier, license)
    end
    lowest = by_distance.keys.min
    return unless lowest < license.size
    by_distance[lowest]
  end
end
rubygems/rubygems/local_remote_options.rb000064400000007133150403134210015000 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "vendor/uri/lib/uri"
require_relative "../rubygems"

##
# Mixin methods for local and remote Gem::Command options.

module Gem::LocalRemoteOptions
  ##
  # Allows Gem::OptionParser to handle HTTP URIs.

  def accept_uri_http
    Gem::OptionParser.accept Gem::URI::HTTP do |value|
      begin
        uri = Gem::URI.parse value
      rescue Gem::URI::InvalidURIError
        raise Gem::OptionParser::InvalidArgument, value
      end

      valid_uri_schemes = ["http", "https", "file", "s3"]
      unless valid_uri_schemes.include?(uri.scheme)
        msg = "Invalid uri scheme for #{value}\nPreface URLs with one of #{valid_uri_schemes.map {|s| "#{s}://" }}"
        raise ArgumentError, msg
      end

      value
    end
  end

  ##
  # Add local/remote options to the command line parser.

  def add_local_remote_options
    add_option(:"Local/Remote", "-l", "--local",
               "Restrict operations to the LOCAL domain") do |_value, options|
      options[:domain] = :local
    end

    add_option(:"Local/Remote", "-r", "--remote",
      "Restrict operations to the REMOTE domain") do |_value, options|
      options[:domain] = :remote
    end

    add_option(:"Local/Remote", "-b", "--both",
               "Allow LOCAL and REMOTE operations") do |_value, options|
      options[:domain] = :both
    end

    add_bulk_threshold_option
    add_clear_sources_option
    add_source_option
    add_proxy_option
    add_update_sources_option
  end

  ##
  # Add the --bulk-threshold option

  def add_bulk_threshold_option
    add_option(:"Local/Remote", "-B", "--bulk-threshold COUNT",
               "Threshold for switching to bulk",
               "synchronization (default #{Gem.configuration.bulk_threshold})") do |value, _options|
      Gem.configuration.bulk_threshold = value.to_i
    end
  end

  ##
  # Add the --clear-sources option

  def add_clear_sources_option
    add_option(:"Local/Remote", "--clear-sources",
               "Clear the gem sources") do |_value, options|
      Gem.sources = nil
      options[:sources_cleared] = true
    end
  end

  ##
  # Add the --http-proxy option

  def add_proxy_option
    accept_uri_http

    add_option(:"Local/Remote", "-p", "--[no-]http-proxy [URL]", Gem::URI::HTTP,
               "Use HTTP proxy for remote operations") do |value, options|
      options[:http_proxy] = value == false ? :no_proxy : value
      Gem.configuration[:http_proxy] = options[:http_proxy]
    end
  end

  ##
  # Add the --source option

  def add_source_option
    accept_uri_http

    add_option(:"Local/Remote", "-s", "--source URL", Gem::URI::HTTP,
               "Append URL to list of remote gem sources") do |source, options|
      source << "/" unless source.end_with?("/")

      if options.delete :sources_cleared
        Gem.sources = [source]
      else
        Gem.sources << source unless Gem.sources.include?(source)
      end
    end
  end

  ##
  # Add the --update-sources option

  def add_update_sources_option
    add_option(:Deprecated, "-u", "--[no-]update-sources",
               "Update local source cache") do |value, _options|
      Gem.configuration.update_sources = value
    end
  end

  ##
  # Is fetching of local and remote information enabled?

  def both?
    options[:domain] == :both
  end

  ##
  # Is local fetching enabled?

  def local?
    [:local, :both].include?(options[:domain])
  end

  ##
  # Is remote fetching enabled?

  def remote?
    [:remote, :both].include?(options[:domain])
  end
end
rubygems/rubygems/specification_policy.rb000064400000037134150403134210014763 0ustar00# frozen_string_literal: true

require_relative "user_interaction"

class Gem::SpecificationPolicy
  include Gem::UserInteraction

  VALID_NAME_PATTERN = /\A[a-zA-Z0-9\.\-\_]+\z/ # :nodoc:

  SPECIAL_CHARACTERS = /\A[#{Regexp.escape(".-_")}]+/ # :nodoc:

  VALID_URI_PATTERN = %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z} # :nodoc:

  METADATA_LINK_KEYS = %w[
    homepage_uri
    changelog_uri
    source_code_uri
    documentation_uri
    wiki_uri
    mailing_list_uri
    bug_tracker_uri
    download_uri
    funding_uri
  ].freeze # :nodoc:

  def initialize(specification)
    @warnings = 0

    @specification = specification
  end

  ##
  # If set to true, run packaging-specific checks, as well.

  attr_accessor :packaging

  ##
  # Does a sanity check on the specification.
  #
  # Raises InvalidSpecificationException if the spec does not pass the
  # checks.
  #
  # It also performs some validations that do not raise but print warning
  # messages instead.

  def validate(strict = false)
    validate_required!
    validate_required_metadata!

    validate_optional(strict) if packaging || strict

    true
  end

  ##
  # Does a sanity check on the specification.
  #
  # Raises InvalidSpecificationException if the spec does not pass the
  # checks.
  #
  # Only runs checks that are considered necessary for the specification to be
  # functional.

  def validate_required!
    validate_nil_attributes

    validate_rubygems_version

    validate_required_attributes

    validate_name

    validate_require_paths

    @specification.keep_only_files_and_directories

    validate_non_files

    validate_self_inclusion_in_files_list

    validate_specification_version

    validate_platform

    validate_array_attributes

    validate_authors_field

    validate_licenses_length

    validate_duplicate_dependencies
  end

  def validate_required_metadata!
    validate_metadata

    validate_lazy_metadata
  end

  def validate_optional(strict)
    validate_licenses

    validate_permissions

    validate_values

    validate_dependencies

    validate_required_ruby_version

    validate_extensions

    validate_removed_attributes

    validate_unique_links

    if @warnings > 0
      if strict
        error "specification has warnings"
      else
        alert_warning help_text
      end
    end
  end

  ##
  # Implementation for Specification#validate_for_resolution

  def validate_for_resolution
    validate_required!
  end

  ##
  # Implementation for Specification#validate_metadata

  def validate_metadata
    metadata = @specification.metadata

    unless Hash === metadata
      error "metadata must be a hash"
    end

    metadata.each do |key, value|
      entry = "metadata['#{key}']"
      unless key.is_a?(String)
        error "metadata keys must be a String"
      end

      if key.size > 128
        error "metadata key is too large (#{key.size} > 128)"
      end

      unless value.is_a?(String)
        error "#{entry} value must be a String"
      end

      if value.size > 1024
        error "#{entry} value is too large (#{value.size} > 1024)"
      end

      next unless METADATA_LINK_KEYS.include? key
      unless VALID_URI_PATTERN.match?(value)
        error "#{entry} has invalid link: #{value.inspect}"
      end
    end
  end

  ##
  # Checks that no duplicate dependencies are specified.

  def validate_duplicate_dependencies # :nodoc:
    # NOTE: see REFACTOR note in Gem::Dependency about types - this might be brittle
    seen = Gem::Dependency::TYPES.inject({}) {|types, type| types.merge({ type => {} }) }

    error_messages = []
    @specification.dependencies.each do |dep|
      if prev = seen[dep.type][dep.name]
        error_messages << <<-MESSAGE
duplicate rubygems/rubygems/uri_formatter.rb000064400000001415150403134210013437 0ustar00ep = dep.requirements_list.any? do |req|
        Gem::Requirement.new(req).prerelease?
      end

      warning_messages << "prerelease dependency on #{dep} is not recommended" if
          prerelease_dep && !@specification.version.prerelease?

      open_ended = dep.requirement.requirements.all? do |op, version|
        !version.prerelease? && [">", ">="].include?(op)
      end

      next unless open_ended
      op, dep_version = dep.requirement.requirements.first

      segments = dep_version.segments

      base = segments.first 2

      recommendation = if [">", ">="].include?(op) && segments == [0]
        "  use a bounded requirement, such as \"~> x.y\""
      else
        bugfix = if op == ">"
          ", \"> #{dep_version}\""
        elsif op == ">=" && base !=rubygems/rubygems/package/tar_reader/entry.rb000064400000010467150403134210015430 0ustar00ersion` gemspec attribute"
    end
  end

  ##
  # Issues a warning for each file to be packaged which is world-readable.
  #
  # Implementation for Specification#validate_permissions

  def validate_permissions
    return if Gem.win_platform?

    @specification.files.each do |file|
      next unless File.file?(file)
      next if File.stat(file).mode & 0o444 == 0o444
      warning "#{file} is not world-readable"
    end

    @specification.executables.each do |name|
      exec = File.join @specification.bindir, name
      next unless File.file?(exec)
      next if File.stat(exec).executable?
      warning "#{exec} is not executable"
    end
  end

  private

  def validate_nil_attributes
    nil_attributes = Gem::Specification.non_nil_attributes.select do |attrname|
      @specification.instance_variable_get("@#{attrname}").nil?
    end
    return if nil_attributes.empty?
    error "#{nil_attributes.join ", "} must not be nil"
  end

  def validate_rubygems_version
    return unless packaging

    rubygems_version = @specification.rubygems_version

    return if rubygems_version == Gem::VERSION

    warning "expected RubyGems version #{Gem::VERSION}, was #{rubygems_version}"

    @specification.rubygems_version = Gem::VERSION
  end

  def validate_required_attributes
    Gem::Specification.required_attributes.each do |symbol|
      unless @specification.send symbol
        error "missing value for attribute #{symbol}"
      end
    end
  end

  def validate_name
    name = @specification.name

    if !name.is_a?(String)
      error "invalid value for attribute name: \"#{name.inspect}\" must be a string"
    elsif !/[a-zA-Z]/.match?(name)
      error "invalid value for attribute name: #{name.dump} must include at least one letter"
    elsif !VALID_NAME_PATTERN.match?(name)
      error "invalid value for attribute name: #{name.dump} can only include letters, numbers, dashes, and underscores"
    elsif SPECIAL_CHARACTERS.match?(name)
      error "invalid value for attribute name: #{name.dump} cannot begin with a period, dash, or underscore"
    end
  end

  def validate_require_paths
    return unless @specification.raw_require_paths.empty?

    error "specification must have at least one require_path"
  end

  def validate_non_files
    return unless packaging

    non_files = @specification.files.reject {|x| File.file?(x) || File.symlink?(x) }

    unless non_files.empty?
      error "[\"#{non_files.join "\", \""}\"] are not files"
    end
  end

  def validate_self_inclusion_in_files_list
    file_name = @specification.file_name

    return unless @specification.files.include?(file_name)

    error "#{@specification.full_name} contains itself (#{file_name}), check your files list"
  end

  def validate_specification_version
    return if @specification.specification_version.is_a?(Integer)

    error "specification_version must be an Integer (did you mean version?)"
  end

  def validate_platform
    platform = @specification.platform

    case platform
    when Gem::Platform, Gem::Platform::RUBY # ok
    else
      error "invalid platform #{platform.inspect}, see Gem::Platform"
    end
  end

  def validate_array_attributes
    Gem::Specification.array_attributes.each do |field|
      validate_array_attribute(field)
    end
  end

  def validate_array_attribute(field)
    val = @specification.send(field)
    klass = case field
            when :dependencies then
              Gem::Dependency
            else
              String
    end

    unless Array === val && val.all? {|x| x.is_a?(klass) || (field == :licenses && x.nil?) }
      error "#{field} must be an Array of #{klass}"
    end
  end

  def validate_authors_field
    return unless @specification.authors.empty?

    error "authors may not be empty"
  end

  def validate_licenses_length
    licenses = @specification.licenses

    licenses.each do |license|
      next if license.nil?

      if license.length > 64
        error "each license must be 64 characters or less"
      end
    end
  end

  def validate_licenses
    licenses = @specification.licenses

    licenses.each do |license|
      next if Gem::Licenses.match?(license) || license.nil?
      license_id_deprecated = Gem::Licenses.deprecated_license_id?(license)
      exception_id_deprecated = Gem::Licenses.deprecated_exception_id?(license)
      suggestions = Gem::Licenses.suggestions(license)

      if lirubygems/rubygems/package/tar_reader.rb000064400000003300150403134210014253 0ustar00ty, but is recommended. Use an license identifier from
https://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license,
or set it to nil if you don't want to specify a license.
    WARNING
  end

  LAZY = '"FIxxxXME" or "TOxxxDO"'.gsub(/xxx/, "")
  LAZY_PATTERN = /\AFI XME|\ATO DO/x
  HOMEPAGE_URI_PATTERN = /\A[a-z][a-z\d+.-]*:/i

  def validate_lazy_metadata
    unless @specification.authors.grep(LAZY_PATTERN).empty?
      error "#{LAZY} is not an author"
    end

    unless Array(@specification.email).grep(LAZY_PATTERN).empty?
      error "#{LAZY} is not an email"
    end

    if LAZY_PATTERN.match?(@specification.description)
      error "#{LAZY} is not a description"
    end

    if LAZY_PATTERN.match?(@specification.summary)
      error "#{LAZY} is not a summary"
    end

    homepage = @specification.homepage

    # Make sure a homepage is valid HTTP/HTTPS URI
    if homepage && !homepage.empty?
      require_relative "vendor/uri/lib/uri"
      begin
        homepage_uri = Gem::URI.parse(homepage)
        unless [Gem::URI::HTTP, Gem::URI::HTTPS].member? homepage_uri.class
          error "\"#{homepage}\" is not a valid HTTP URI"
        end
      rescue Gem::URI::InvalidURIError
        error "\"#{homepage}\" is not a valid HTTP URI"
      end
    end
  end

  def validate_values
    %w[author homepage summary files].each do |attribute|
      validate_attribute_present(attribute)
    end

    if @specification.description == @specification.summary
      warning "description and summary are identical"
    end

    # TODO: raise at some given date
    warning "deprecated autorequire specified" if @specification.autorequire

    @specification.executables.each do |executablrubygems/rubygems/package/tar_writer.rb000064400000017013150403134210014333 0ustar00d in the future.")
    end
  end

  def validate_extensions # :nodoc:
    require_relative "ext"
    builder = Gem::Ext::Builder.new(@specification)

    validate_rake_extensions(builder)
    validate_rust_extensions(builder)
  end

  def validate_rust_extensions(builder) # :nodoc:
    rust_extension = @specification.extensions.any? {|s| builder.builder_for(s).is_a? Gem::Ext::CargoBuilder }
    missing_cargo_lock = !@specification.files.any? {|f| f.end_with?("Cargo.lock") }

    error <<-ERROR if rust_extension && missing_cargo_lock
You have specified rust based extension, but Cargo.lock is not part of the gem files. Please run `cargo generate-lockfile` or any other command to generate Cargo.lock and ensure it is added to your gem files section in gemspec.
    ERROR
  end

  def validate_rake_extensions(builder) # :nodoc:
    rake_extension = @specification.extensions.any? {|s| builder.builder_for(s) == Gem::Ext::RakeBuilder }
    rake_dependency = @specification.dependencies.any? {|d| d.name == "rake" && d.type == :runtime }

    warning <<-WARNING if rake_extension && !rake_dependency
You have specified rake based extension, but rake is not added as runtime dependency. It is recommended to add rake as a runtime dependency in gemspec since there's no guarantee rake will be already installed.
    WARNING
  end

  def validate_unique_links
    links = @specification.metadata.slice(*METADATA_LINK_KEYS)
    grouped = links.group_by {|_key, uri| uri }
    grouped.each do |uri, copies|
      next unless copies.length > 1
      keys = copies.map(&:first).join("\n  ")
      warning <<~WARNING
        You have specified the uri:
          #{uri}
        for all of the following keys:
          #{keys}
        Only the first one will be shown on rubygems.org
      WARNING
    end
  end

  def warning(statement) # :nodoc:
    @warnings += 1

    alert_warning statement
  end

  def error(statement) # :nodoc:
    raise Gem::InvalidSpecificationException, statement
  ensure
    alert_warning help_text
  end

  def help_text # :nodoc:
    "See https://guides.rubygems.org/specification-reference/ for help"
  end
end
rubygems/rubygems/uninstaller.rb000064400000025653150403134210013127 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require "fileutils"
require_relative "../rubygems"
require_relative "installer_uninstaller_utils"
require_relative "dependency_list"
require_relative "user_interaction"

##
# An Uninstaller.
#
# The uninstaller fires pre and post uninstall hooks.  Hooks can be added
# either through a rubygems_plugin.rb file in an installed gem or via a
# rubygems/defaults/#{RUBY_ENGINE}.rb or rubygems/defaults/operating_system.rb
# file.  See Gem.pre_uninstall and Gem.post_uninstall for details.

class Gem::Uninstaller
  include Gem::UserInteraction

  include Gem::InstallerUninstallerUtils

  ##
  # The directory a gem's executables will be installed into

  attr_reader :bin_dir

  ##
  # The gem repository the gem will be uninstalled from

  attr_reader :gem_home

  ##
  # The Gem::Specification for the gem being uninstalled, only set during
  # #uninstall_gem

  attr_reader :spec

  ##
  # Constructs an uninstaller that will uninstall +gem+

  def initialize(gem, options = {})
    # TODO: document the valid options
    @gem                = gem
    @version            = options[:version] || Gem::Requirement.default
    @install_dir        = options[:install_dir]
    @gem_home           = File.realpath(@install_dir || Gem.dir)
    @user_dir           = File.exist?(Gem.user_dir) ? File.realpath(Gem.user_dir) : Gem.user_dir
    @force_executables  = options[:executables]
    @force_all          = options[:all]
    @force_ignore       = options[:ignore]
    @bin_dir            = options[:bin_dir]
    @format_executable  = options[:format_executable]
    @abort_on_dependent = options[:abort_on_dependent]

    # Indicate if development dependencies should be checked when
    # uninstalling. (default: false)
    #
    @check_dev = options[:check_dev]

    if options[:force]
      @force_all = true
      @force_ignore = true
    end

    # only add user directory if install_dir is not set
    @user_install = false
    @user_install = options[:user_install] unless @install_dir

    # Optimization: populated during #uninstall
    @default_specs_matching_uninstall_params = []
  end

  ##
  # Performs the uninstall of the gem.  This removes the spec, the Gem
  # directory, and the cached .gem file.

  def uninstall
    dependency = Gem::Dependency.new @gem, @version

    list = []

    specification_record.stubs.each do |spec|
      next unless dependency.matches_spec? spec

      list << spec
    end

    if list.empty?
      raise Gem::InstallError, "gem #{@gem.inspect} is not installed"
    end

    default_specs, list = list.partition(&:default_gem?)
    warn_cannot_uninstall_default_gems(default_specs - list)
    @default_specs_matching_uninstall_params = default_specs.map(&:to_spec)

    list, other_repo_specs = list.partition do |spec|
      @gem_home == spec.base_dir ||
        (@user_install && spec.base_dir == @user_dir)
    end

    list.sort!

    if list.empty?
      return unless other_repo_specs.any?

      other_repos = other_repo_specs.map(&:base_dir).uniq

      message = ["#{@gem} is not installed in GEM_HOME, try:"]
      message.concat other_repos.map {|repo|
        "\tgem uninstall -i #{repo} #{@gem}"
      }

      raise Gem::InstallError, message.join("\n")
    elsif @force_all
      remove_all list

    elsif list.size > 1
      gem_names = list.map(&:full_name_with_location)
      gem_names << "All versions"

      say
      _, index = choose_from_list "Select gem to uninstall:", gem_names

      if index == list.size
        remove_all list
      elsif index && index >= 0 && index < list.size
        uninstall_gem list[index]
      else
        say "Error: must enter a number [1-#{list.size + 1}]"
      end
    else
      uninstall_gem list.first
    end
  end

  ##
  # Uninstalls gem +spec+

  def uninstall_gem(stub)
    spec = stub.to_spec

    @spec = spec

    unless dependencies_ok? spec
      if abort_on_dependent? || !ask_if_ok(spec)
        raise Gem::DependencyRemovalException,
          "Uninstallation aborted due to dependent gem(s)"
      end
    end

    Gem.pre_uninstall_hooks.each do |hook|
      hook.call self
    end

    remove_executables @spec
    remove_plugins @spec
    remove @spec

    specification_record.remove_spec(stub)

    regenerate_plugins

    Gem.post_uninstall_hooks.each do |hook|
      hook.call self
    end

    @spec = nil
  end

  ##
  # Removes installed executables and batch files (windows only) for +spec+.

  def remove_execrubygems/rubygems/package/source.rb000064400000000110150403134210013437 0ustar00ame}"

        exe_file = File.join bin_dir, exe_name

        safe_delerubygems/rubygems/package/file_source.rb000064400000001142150403134210014444 0ustar00n_dir, exe) }
      exclusions << File.dirname(exclusions.last) until exclusions.last == full_gem_path
    end

    safe_delete { rm_r full_gem_path, exclusions: exclusions }
    safe_delete { FileUtils.rm_r spec.extension_dir }

    old_platform_name = spec.original_name

    gem = spec.cache_file
    gem = File.join(spec.cache_dir, "#{old_platform_name}.gem") unless
      File.exist? gem

    safe_delete { FileUtils.rm_r gem }

    begin
      Gem::RDoc.new(spec).remove
    rescue NameError
    end

    gemspec = spec.spec_file

    unless File.exist? gemspec
      gemspec = File.join(File.dirname(gemrubygems/rubygems/package/tar_header.rb000064400000013547150403134210014257 0ustar00ok?(spec) # :nodoc:
    return true if @force_ignore

    deplist = Gem::DependencyList.from_specs
    deplist.ok_to_remove?(spec.full_name, @check_dev)
  end

  ##
  # Should the uninstallation abort if a dependency will go unsatisfied?
  #
  # See ::new.

  def abort_on_dependent? # :nodoc:
    @abort_on_dependent
  end

  ##
  # Asks if it is OK to remove +spec+.  Returns true if it is OK.

  def ask_if_ok(spec) # :nodoc:
    msg = [""]
    msg << "You have requested to uninstall the gem:"
    msg << "\t#{spec.full_name}"
    msg << ""

    siblings = Gem::Specification.select do |s|
      s.name == spec.name && s.full_name != spec.full_name
    end

    spec.dependent_gems(@check_dev).each do |dep_spec, dep, _satlist|
      unless siblings.any? {|s| s.satisfies_requirement? dep }
        msg << "#{dep_spec.name}-#{dep_spec.version} depends on #{dep}"
      end
    end

    msg << "If you remove this gem, these dependencies will not be met."
    msg << "Continue with Uninstall?"
    ask_yes_no(msg.join("\n"), false)
  end

  ##
  # Returns the formatted version of the executable +filename+

  def formatted_program_filename(filename) # :nodoc:
    # TODO perhaps the installer should leave a small manifest
    # of what it did for us to find rather than trying to recreate
    # it again.
    if @format_executable
      require_relative "installer"
      Gem::Installer.exec_format % File.basename(filename)
    else
      filename
    end
  end

  def safe_delete(&block)
    block.call
  rescue Errno::ENOENT
    nil
  rescue Errno::EPERM
    e = Gem::UninstallError.new
    e.spec = @spec

    raise e
  end

  private

  def rm_r(path, exclusions:)
    FileUtils::Entry_.new(path).postorder_traverse do |ent|
      ent.remove unless exclusions.include?(ent.path)
    end
  end

  def specification_record
    @specification_record ||= @install_dir ? Gem::SpecificationRecord.from_path(@install_dir) : Gem::Specification.specification_record
  end

  def announce_deletion_of(spec)
    name = spec.full_name
    say "Successfully uninstalled #{name}"
    if default_spec_matches?(spec)
      say(
        "There was both a regular copy and a default copy of #{name}. The " \
          "regular copy was successfully uninstalled, but the default copy " \
          "was left around because default gems can't be removed."
      )
    end
  end

  # @return true if the specs of any default gems are `==` to the given `spec`.
  def default_spec_matches?(spec)
    !default_specs_that_match(spec).empty?
  end

  # @return [Array] specs of default gems that are `==` to the given `spec`.
  def default_specs_that_match(spec)
    @default_specs_matching_uninstall_params.select {|default_spec| spec == default_spec }
  end

  def warn_cannot_uninstall_default_gems(specs)
    specs.each do |spec|
      say "Gem #{spec.full_name} cannot be uninstalled because it is a default gem"
    end
  end

  def plugin_dir_for(spec)
    Gem.plugindir(spec.base_dir)
  end
end
rubygems/rubygems/uri_formatter.rb000064400000001420150403134210013433 0ustar00# frozen_string_literal: true

##
# The UriFormatter handles URIs from user-input and escaping.
#
#   uf = Gem::UriFormatter.new 'example.com'
#
#   p uf.normalize #=> 'http://example.com'

class Gem::UriFormatter
  ##
  # The URI to be formatted.

  attr_reader :uri

  ##
  # Creates a new URI formatter for +uri+.

  def initialize(uri)
    require "cgi"

    @uri = uri
  end

  ##
  # Escapes the #uri for use as a CGI parameter

  def escape
    return unless @uri
    CGI.escape @uri
  end

  ##
  # Normalize the URI by adding "http://" if it is missing.

  def normalize
    /^(https?|ftp|file):/i.match?(@uri) ? @uri : "http://#{@uri}"
  end

  ##
  # Unescapes the #uri which came from a CGI parameter

  def unescape
    return unless @uri
    CGI.unescape @uri
  end
end
rubygems/rubygems/package/tar_reader/entry.rb000064400000010571150403134210015424 0ustar00# frozen_string_literal: true

# rubocop:disable Style/AsciiComments

# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See LICENSE.txt for additional licensing information.

# rubocop:enable Style/AsciiComments

##
# Class for reading entries out of a tar file

class Gem::Package::TarReader::Entry
  ##
  # Creates a new tar entry for +header+ that will be read from +io+
  # If a block is given, the entry is yielded and then closed.

  def self.open(header, io, &block)
    entry = new header, io
    return entry unless block_given?
    begin
      yield entry
    ensure
      entry.close
    end
  end

  ##
  # Header for this tar entry

  attr_reader :header

  ##
  # Creates a new tar entry for +header+ that will be read from +io+

  def initialize(header, io)
    @closed = false
    @header = header
    @io = io
    @orig_pos = @io.pos
    @end_pos rubygems/rubygems/package/old.rb000064400000007203150403134210012727 0ustar00size
  end

  ##
  # Full name of the tar entry

  def full_name
    @header.full_name.force_encoding(Encoding::UTF_8)
  rescue ArgumentError => e
    raise unless e.message == "string contains null byte"
    raise Gem::Package::TarInvalidError,
          "tar is corrupt, name contains null byte"
  end

  ##
  # Read one byte from the tar entry

  def getc
    return nil if eof?

    ret = @io.getc
    @read += 1 if ret

    ret
  end

  ##
  # Is this tar entry a directory?

  def directory?
    @header.typeflag == "5"
  end

  ##
  # Is this tar entry a file?

  def file?
    @header.typeflag == "0"
  end

  ##
  # Is this tar entry a symlink?

  def symlink?
    @header.typeflag == "2"
  end

  ##
  # The position in the tar entry

  def pos
    check_closed

    bytes_read
  end

  ##
  # Seek to the position in the tar entry

  def pos=(new_pos)
    seek(new_pos, IO::SEEK_SET)
  end

  def size
    @header.size
  end

  alias_method :length, :size

  ##
  # Reads +maxlen+ bytes from the tar file entry, or the rest of the entry if nil

  def read(maxlen = nil)
    if eof?
      return maxlen.to_i.zero? ? "" : nil
    end

    max_read = [maxlen, @header.size - @read].compact.min

    ret = @io.read max_read
    if ret.nil?
      return maxlen ? nil : "" # IO.read returns nil on EOF with len argument
    end
    @read += ret.size

    ret
  end

  def readpartial(maxlen, outbuf = "".b)
    if eof? && maxlen > 0
      raise EOFError, "end of file reached"
    end

    max_read = [maxlen, @header.size - @read].min

    @io.readpartial(max_read, outbuf)
    @read += outbuf.size

    outbuf
  end

  ##
  # Seeks to +offset+ bytes into the tar file entry
  # +whence+ can be IO::SEEK_SET, IO::SEEK_CUR, or IO::SEEK_END

  def seek(offset, whence = IO::SEEK_SET)
    check_closed

    new_pos =
      case whence
      when IO::SEEK_SET then @orig_pos + offset
      when IO::SEEK_CUR then @io.pos + offset
      when IO::SEEK_END then @end_pos + offset
      else
        raise ArgumentError, "invalid whence"
      end

    if new_pos < @orig_pos
      new_pos = @orig_pos
    elsif new_pos > @end_pos
      new_pos = @end_pos
    end

    pending = new_pos - @io.pos

    return 0 if pending == 0

    if @io.respond_to?(:seek)
      begin
        # avoid reading if the @io supports seeking
        @io.seek new_pos, IO::SEEK_SET
        pending = 0
      rescue Errno::EINVAL
      end
    end

    # if seeking isn't supported or failed
    # negative seek requires that we rewind and read
    if pending < 0
      @io.rewind
      pending = new_pos
    end

    while pending > 0 do
      size_read = @io.read([pending, 4096].min)&.size
      raise(EOFError, "end of file reached") if size_read.nil?
      pending -= size_read
    end

    @read = @io.pos - @orig_pos

    0
  end

  ##
  # Rewinds to the beginning of the tar file entry

  def rewind
    check_closed
    seek(0, IO::SEEK_SET)
  end
end
rubygems/rubygems/package/tar_reader.rb000064400000003656150403134210014271 0ustar00# frozen_string_literal: true

# rubocop:disable Style/AsciiComments

# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See rubygems/rubygems/package/io_source.rb000064400000001456150403134210014144 0ustar00   rescue ArgumentError => e
        # Specialize only exceptions from Gem::Package::TarHeader.strict_oct
        raise e unless e.message.match?(/ is not an octal string$/)
        raise Gem::Package::TarInvalidError, e.message
      end

      return if header.empty?
      entry = Gem::Package::TarReader::Entry.new header, @io
      yield entry
      entry.close
    end
  end

  alias_method :each_entry, :each

  ##
  # NOTE: Do not call #rewind during #each

  def rewind
    if @init_pos == 0
      @io.rewind
    else
      @io.pos = @init_pos
    end
  end

  ##
  # Seeks through the tar file until it finds the +entry+ with +name+ and
  # yields it.  Rewinds the tar file to the beginning when the block
  # terminates.

  def seek(name) # :yields: entry
    found = find do |entry|
      entry.full_narubygems/rubygems/package/digest_io.rb000064400000002524150403134210014120 0ustar00# frozen_string_literal: true

# rubocop:disable Style/AsciiComments

# Copyright (C) 2004 Mauricio Julio Fernández Pradier
# See LICENSE.txt for additional licensing information.

# rubocop:enable Style/AsciiComments

##
# Allows writing of tar files

class Gem::Package::TarWriter
  class FileOverflow < StandardError; end

  ##
  # IO wrapper that allows writing a limited amount of data

  class BoundedStream
    ##
    # Maximum number of bytes that can be written

    attr_reader :limit

    ##
    # Number of bytes written

    attr_reader :written

    ##
    # Wraps +io+ and allows up to +limit+ bytes to be written

    def initialize(io, limit)
      @io = io
      @limit = limit
      @written = 0
    end

    ##
    # Writes +data+ onto the IO, raising a FileOverflow exception if the
    # number of bytes will be more than #limit

    def write(data)
      if data.bytesize + @written > @limit
        raise FileOverflow, "You tried to feed more data than fits in the file."
      end
      @io.write data
      @written += data.bytesize
      data.bytesize
    end
  end

  ##
  # IO wrapper that provides only #write

  class RestrictedStream
    ##
    # Creates a new RestrictedStream wrapping +io+

    def initialize(io)
      @io = io
    end

    ##
    # Writes +data+ onto the IO

    def write(data)
      @io.write data
    end
  rubygems/rubygems/mock_gem_ui.rb000064400000002605150403134210013035 0ustar00 if block_given?

    size = @io.pos - init_pos - 512

    remainder = (512 - (size % 512)) % 512
    @io.write "\0" * remainder

    final_pos = @io.pos
    @io.pos = init_pos

    header = Gem::Package::TarHeader.new name: name, mode: mode,
                                         size: size, prefix: prefix,
                                         mtime: Gem.source_date_epoch

    @io.write header
    @io.pos = final_pos

    self
  end

  ##
  # Adds +name+ with permissions +mode+ to the tar, yielding +io+ for writing
  # the file.  The +digest_algorithm+ is written to a read-only +name+.sum
  # file following the given file contents containing the digest name and
  # hexdigest separated by a tab.
  #
  # The created digest object is returned.

  def add_file_digest(name, mode, digest_algorithms) # :yields: io
    digests = digest_algorithms.map do |digest_algorithm|
      digest = digest_algorithm.new
      digest_name =
        if digest.respond_to? :name
          digest.name
        else
          digest_algorithm.class.name[/::([^:]+)\z/, 1]
        end

      [digest_name, digest]
    end

    digests = Hash[*digests.flatten]

    add_file name, mode do |io|
      Gem::Package::DigestIO.wrap io, digests do |digest_io|
        yield digest_io
      end
    end

    digests
  end

  ##
  # Adds +name+ with permissions +mode+ to the tar, yielding +io+ for writing
  # the file.  The +rubygems/rubygems/defaults.rb000064400000015722150403134210012372 0ustar00          digest.class.name[/::([^:]+)\z/, 1]
        end

      digest_name == signer.digest_name
    end

    raise "no #{signer.digest_name} in #{digests.values.compact}" unless signature_digest

    if signer.key
      signature = signer.sign signature_digest.digest

      add_file_simple "#{name}.sig", 0o444, signature.length do |io|
        io.write signature
      end
    end

    digests
  end

  ##
  # Add file +name+ with permissions +mode+ +size+ bytes long.  Yields an IO
  # to write the file to.

  def add_file_simple(name, mode, size) # :yields: io
    check_closed

    name, prefix = split_name name

    header = Gem::Package::TarHeader.new(name: name, mode: mode,
                                         size: size, prefix: prefix,
                                         mtime: Gem.source_date_epoch).to_s

    @io.write header
    os = BoundedStream.new @io, size

    yield os if block_given?

    min_padding = size - os.written
    @io.write("\0" * min_padding)

    remainder = (512 - (size % 512)) % 512
    @io.write("\0" * remainder)

    self
  end

  ##
  # Adds symlink +name+ with permissions +mode+, linking to +target+.

  def add_symlink(name, target, mode)
    check_closed

    name, prefix = split_name name

    header = Gem::Package::TarHeader.new(name: name, mode: mode,
                                         size: 0, typeflag: "2",
                                         linkname: target,
                                         prefix: prefix,
                                         mtime: Gem.source_date_epoch).to_s

    @io.write header

    self
  end

  ##
  # Raises IOError if the TarWriter is closed

  def check_closed
    raise IOError, "closed #{self.class}" if closed?
  end

  ##
  # Closes the TarWriter

  def close
    check_closed

    @io.write "\0" * 1024
    flush

    @closed = true
  end

  ##
  # Is the TarWriter closed?

  def closed?
    @closed
  end

  ##
  # Flushes the TarWriter's IO

  def flush
    check_closed

    @io.flush if @io.respond_to? :flush
  end

  ##
  # Creates a new directory in the tar file +name+ with +mode+

  def mkdir(name, mode)
    check_closed

    name, prefix = split_name(name)

    header = Gem::Package::TarHeader.new name: name, mode: mode,
                                         typeflag: "5", size: 0,
                                         prefix: prefix,
                                         mtime: Gem.source_date_epoch

    @io.write header

    self
  end

  ##
  # Splits +name+ into a name and prefix that can fit in the TarHeader

  def split_name(name) # :nodoc:
    if name.bytesize > 256
      raise Gem::Package::TooLongFileName.new("File \"#{name}\" has a too long path (should be 256 or less)")
    end

    prefix = ""
    if name.bytesize > 100
      parts = name.split("/", -1) # parts are never empty here
      name = parts.pop            # initially empty for names with a trailing slash ("foo/.../bar/")
      prefix = parts.join("/")    # if empty, then it's impossible to split (parts is empty too)
      while !parts.empty? && (prefix.bytesize > 155 || name.empty?)
        name = parts.pop + "/" + name
        prefix = parts.join("/")
      end

      if name.bytesize > 100 || prefix.empty?
        raise Gem::Package::TooLongFileName.new("File \"#{prefix}/#{name}\" has a too long name (should be 100 or less)")
      end

      if prefix.bytesize > 155
        raise Gem::Package::TooLongFileName.new("File \"#{prefix}/#{name}\" has a too long base path (should be 155 or less)")
      end
    end

    [name, prefix]
  end
end
rubygems/rubygems/package/source.rb000064400000000110150403134210013437 0ustar00# frozen_string_literal: true

class Gem::Package::Source # :nodoc:
end
rubygems/rubygems/package/file_source.rb000064400000001142150403134210014444 0ustar00# frozen_string_literal: true

##
# The primary source of gems is a file on disk, including all usages
# internal to rubygems.
#
# This is a private class, do not depend on it directly. Instead, pass a path
# object to `Gem::Package.new`.

class Gem::Package::FileSource < Gem::Package::Source # :nodoc: all
  attr_reader :path

  def initialize(path)
    @path = path
  end

  def start
    @start ||= File.read path, 20
  end

  def present?
    File.exist? path
  end

  def with_write_io(&block)
    File.open path, "wb", &block
  end

  def with_read_io(&block)
    File.open path, "rb", &block
  end
end
rubygems/rubygems/package/tar_header.rb000064400000014614150403134210014253 0ustar00rubygems/rubygems/request_set/lockfile.rb000064400000012714150403134210014714 0ustar00 null
#   char checksum[8];   # 0 padded, octal, null, space
#   char typeflag[1];   # file: "0"  dir: "5"
#   char linkname[100]; # ASCII + (Z unless filled)
#   char magic[6];      # "ustar\0"
#   char version[2];    # "00"
#   char uname[32];     # ASCIIZ
#   char gname[32];     # ASCIIZ
#   char devmajor[8];   # 0 padded, octal, null
#   char devminor[8];   # o padded, octal, null
#   char prefix[155];   # ASCII + (Z unless filled)
# };
#++
# A header for a tar file

class Gem::Package::TarHeader
  ##
  # Fields in the tar header

  FIELDS = [
    :checksum,
    :devmajor,
    :devminor,
    :gid,
    :gname,
    :linkname,
    :magic,
    :mode,
    :mtime,
    :name,
    :prefix,
    :size,
    :typeflag,
    :uid,
    :uname,
    :version,
  ].freeze

  ##
  # Pack format for a tar header

  PACK_FORMAT = "a100" + # name
                "a8"   + # mode
                "a8"   + # uid
                "a8"   + # gid
                "a12"  + # size
                "a12"  + # mtime
                "a7a"  + # chksum
                "a"    + # typeflag
                "a100" + # linkname
                "a6"   + # magic
                "a2"   + # version
                "a32"  + # uname
                "a32"  + # gname
                "a8"   + # devmajor
                "a8"   + # devminor
                "a155"   # prefix

  ##
  # Unpack format for a tar header

  UNPACK_FORMAT = "A100" + # name
                  "A8"   + # mode
                  "A8"   + # uid
                  "A8"   + # gid
                  "A12"  + # size
                  "A12"  + # mtime
                  "A8"   + # checksum
                  "A"    + # typeflag
                  "A100" + # linkname
                  "A6"   + # magic
                  "A2"   + # version
                  "A32"  + # uname
                  "A32"  + # gname
                  "A8"   + # devmajor
                  "A8"   + # devminor
                  "A155"   # prefix

  attr_reader(*FIELDS)

  EMPTY_HEADER = ("\0" * 512).b.freeze # :nodoc:

  ##
  # Creates a tar header from IO +stream+

  def self.from(stream)
    header = stream.read 512
    return EMPTY if header == EMPTY_HEADER

    fields = header.unpack UNPACK_FORMAT

    new name: fields.shift,
        mode: strict_oct(fields.shift),
        uid: oct_or_256based(fields.shift),
        gid: oct_or_256based(fields.shift),
        size: strict_oct(fields.shift),
        mtime: strict_oct(fields.shift),
        checksum: strict_oct(fields.shift),
        typeflag: fields.shift,
        linkname: fields.shift,
        magic: fields.shift,
        version: strict_oct(fields.shift),
        uname: fields.shift,
        gname: fields.shift,
        devmajor: strict_oct(fields.shift),
        devminor: strict_oct(fields.shift),
        prefix: fields.shift,

        empty: false
  end

  def self.strict_oct(str)
    str.strip!
    return str.oct if /\A[0-7]*\z/.match?(str)

    raise ArgumentError, "#{str.inspect} is not an octal string"
  end

  def self.oct_or_256based(str)
    # \x80 flags a positive 256-based number
    # \ff flags a negative 256-based number
    # In case we have a match, parse it as a signed binary value
    # in big-endian order, except that the high-order bit is ignored.

    return str.unpack1("@4N") if /\A[\x80\xff]/n.match?(str)
    strict_oct(str)
  end

  ##
  # Creates a new TarHeader using +vals+

  def initialize(vals)
    unless vals[:name] && vals[:size] && vals[:prefix] && vals[:mode]
      raise ArgumentError, ":name, :size, :prefix and :mode required"
    end

    @checksum = vals[:checksum] || ""
    @devmajor = vals[:devmajor] || 0
    @devminor = vals[:devminor] || 0
    @gid = vals[:gid] || 0
    @gname = vals[:gname] || "wheel"
    @linkname = vals[:linkname]
    @magic = vals[:magic] || "ustar"
    @mode = vals[:mode]
    @mtime = vals[:mtime] || 0
    @name = vals[:name]
    @prefix = vals[:prefix]
    @size = vals[:size]
    @typeflag = vals[:typeflag]
    @typeflag = "0" if @typeflag.nil? || @typeflag.empty?
    @uid = vals[:uid] || 0
    @uname = vals[:uname] || "wheel"
    @version = vals[:version] || "00"

    @empty = vals[:empty]
  end

  EMPTY = new({ # :nodoc:
    checksum: 0,
    gname: "",
    linkname: "",
    magic: "",
    mode: 0,
    name: "",
    prefix: "",
    size: 0,
    uname: "",
    version: 0,

    empty: true,
  }).freeze
  private_constant :EMPTY

  ##
  # Is the tar entry empty?

  def empty?
    @empty
  end

  def ==(other) # :nodoc:
    self.class === other &&
      @checksum == other.checksum &&
      @devmajor == other.devmajor &&
      @devminor == other.devminor &&
      @gid      == other.gid      &&
      @gname    == other.gname    &&
      @linkname == other.linkname &&
      @magic    == other.magic    &&
      @mode     == other.mode     &&
      @mtime    == other.mtime    &&
      @name     == other.name     &&
      @prefix   == other.prefix   &&
      @size     == other.size     &&
      @typeflag == other.typeflag &&
      @uid      == other.uid      &&
      @uname    == other.uname    &&
      @version  == other.version
  end

  def to_s # :nodoc:
    update_checksum
    header
  end

  ##
  # Updates the TarHeader's checksum

  def update_checksum
    header = header " " * 8
    @checksum = oct calculate_checksum(header), 6
  end

  ##
  # Header's full name, including prefix

  def full_name
    if prefix != ""
      File.join prefix, name
    else
      name
    end
  end

  private

  def calculate_checksum(header)
    header.sum(0)
  end

  def header(checksum = @checksum)
 rubygems/rubygems/request_set/gem_dependency_api.rb000064400000054052150403134210016724 0ustar00rubygems/rubygems/package/old.rb000064400000007177150403134210012741 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

##
# The format class knows the guts of the ancient .gem file format and provides
# the capability to read such ancient gems.
#
# Please pretend this doesn't exist.

class Gem::Package::Old < Gem::Package
  undef_method :spec=

  ##
  # Creates a new old-format package reader for +gem+.  Old-format packages
  # cannot be written.

  def initialize(gem, security_policy)
    require "fileutils"
    require "zlib"
    Gem.load_yaml

    @contents        = nil
    @gem             = gem
    @security_policy = security_policy
    @spec            = nil
  end

  ##
  # A list of file names contained in this gem

  def contents
    verify

    return @contents if @contents

    @gem.with_read_io do |io|
      read_until_dashes io # spec
      header = file_list io

      @contents = header.map {|file| file["path"] }
    end
  end

  ##
  # Extracts the files in this package into +destination_dir+

  def extract_files(destination_dir)
    verify

    errstr = "Error reading files from gem"

    @gem.with_read_io do |io|
      read_until_dashes io # spec
      header = file_list io
      raise Gem::Exception, errstr unless header

      header.each do |entry|
        full_name = entry["path"]

        destination = install_location full_name, destination_dir

        file_data = String.new

        read_until_dashes io do |line|
          file_data << line
        end

        file_data = file_data.strip.unpack1("m")
        file_data = Zlib::Inflate.inflate file_data

        raise Gem::Package::FormatError, "#{full_name} in #{@gem} is corrupt" if
          file_data.length != entry["size"].to_i

        FileUtils.rm_rf destination

        FileUtils.mkdir_p File.dirname(destination), mode: dir_mode && 0o755

        File.open destination, "wb", file_mode(entry["mode"]) do |out|
          out.write file_data
        end

        verbose destination
      end
    end
  rescue Zlib::DataError
    raise Gem::Exception, errstr
  end

  ##
  # Reads the file list section from the old-format gem +io+

  def file_list(io) # :nodoc:
    header = String.new

    read_until_dashes io do |line|
      header << line
    end

    Gem::SafeYAML.safe_load header
  end

  ##
  # Reads lines until a "---" separator is found

  def read_until_dashes(io) # :nodoc:
    while (line = io.gets) && line.chomp.strip != "---" do
      yield line if block_given?
    end
  end

  ##
  # Skips the Ruby self-install header in +io+.

  def skip_ruby(io) # :nodoc:
    loop do
      line = io.gets

      return if line.chomp == "__END__"
      break unless line
    end

    raise Gem::Exception, "Failed to find end of Ruby script while reading gem"
  end

  ##
  # The specification for this gem

  def spec
    verify

    return @spec if @spec

    yaml = String.new

    @gem.with_read_io do |io|
      skip_ruby io
      read_until_dashes io do |line|
        yaml << line
      end
    end

    begin
      @spec = Gem::Specification.from_yaml yaml
    rescue Psych::SyntaxError
      raise Gem::Exception, "Failed to parse gem specification out of gem file"
    end
  rescue ArgumentError
    raise Gem::Exception, "Failed to parse gem specification out of gem file"
  end

  ##
  # Raises an exception if a security policy that verifies data is active.
  # Old format gems cannot be verified as signed.

  def verify
    return true unless @security_policy

    raise Gem::Security::Exception,
          "old format gems do not contain signatures and cannot be verified" if
      @security_policy.verify_data

    true
  end
end
rubygems/rubygems/package/io_source.rb000064400000001456150403134210014144 0ustar00# frozen_string_literal: true

##
# Supports reading and writing gems from/to a generic IO object.  This is
# useful for other applications built on top of rubygems, such as
# rubygems.org.
#
# This is a private class, do not depend on it directly. Instead, pass an IO
# object to `Gem::Package.new`.

class Gem::Package::IOSource < Gem::Package::Source # :nodoc: all
  attr_reader :io

  def initialize(io)
    @io = io
  end

  def start
    @start ||= begin
      if io.pos > 0
        raise Gem::Package::Error, "Cannot read start unless IO is at start"
      end

      value = io.read 20
      io.rewind
      value
    end
  end

  def present?
    true
  end

  def with_read_io
    yield io
  ensure
    io.rewind
  end

  def with_write_io
    yield io
  ensure
    io.rewind
  end

  def path
  end
end
rubygems/rubygems/package/digest_io.rb000064400000002515150403134210014120 0ustar00# frozen_string_literal: true

##
# IO wrapper that creates digests of contents written to the IO it wraps.

class Gem::Package::DigestIO
  ##
  # Collected digests for wrapped writes.
  #
  #   {
  #     'SHA1'   => #<OpenSSL::Digest: [...]>,
  #     'SHA512' => #<OpenSSL::Digest: [...]>,
  #   }

  attr_reader :digests

  ##
  # Wraps +io+ and updates digest for each of the digest algorithms in
  # the +digests+ Hash.  Returns the digests hash.  Example:
  #
  #   io = StringIO.new
  #   digests = {
  #     'SHA1'   => OpenSSL::Digest.new('SHA1'),
  #     'SHA512' => OpenSSL::Digest.new('SHA512'),
  #   }
  #
  #   Gem::Package::DigestIO.wrap io, digests do |digest_io|
  #     digest_io.write "hello"
  #   end
  #
  #   digests['SHA1'].hexdigest   #=> "aaf4c61d[...]"
  #   digests['SHA512'].hexdigest #=> "9b71d224[...]"

  def self.wrap(io, digests)
    digest_io = new io, digests

    yield digest_io

    digests
  end

  ##
  # Creates a new DigestIO instance.  Using ::wrap is recommended, see the
  # ::wrap documentation for documentation of +io+ and +digests+.

  def initialize(io, digests)
    @io = io
    @digests = digests
  end

  ##
  # Writes +data+ to the underlying IO and updates the digests

  def write(data)
    result = @io.write data

    @digests.each do |_, digest|
      digest << data
    end

    result
  end
end
rubygems/rubygems/mock_gem_ui.rb000064400000002605150403134210013035 0ustar00DISCLAIMED.  IN NO EVENT SHALL THE REGENTS 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.

      IMPORTANT licenses/alt-ruby32-devel/COPYING000064400000004573150403134230012411 0ustar00Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.

Redistributirubygems/rubygems/defaults.rb000064400000016606150403134210012374 0ustar00# frozen_string_literal: true

module Gem
  DEFAULT_HOST = "https://rubygems.org"

  @post_install_hooks ||= []
  @done_installing_hooks ||= []
  @post_uninstall_hooks ||= []
  @pre_uninstall_hooks  ||= []
  @pre_install_hooks    ||= []

  ##
  # An Array of the default sources that come with RubyGems

  def self.default_sources
    %w[https://rubygems.org/]
  end

  ##
  # Default spec directory path to be used if an alternate value is not
  # specified in the environment

  def self.default_spec_cache_dir
    default_spec_cache_dir = File.join Gem.user_home, ".gem", "specs"

    unless File.exist?(default_spec_cache_dir)
      default_spec_cache_dir = File.join Gem.cache_home, "gem", "specs"
    end

    default_spec_cache_dir
  end

  ##
  # Default home directory path to be used if an alternate value is not
  # specified in the environment

  def self.default_dir
    @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"])
  end

  ##
  # Returns binary extensions dir for specified RubyGems base dir or nil
  # if such directory cannot be determined.
  #
  # By default, the binary extensions are located side by side with their
  # Ruby counterparts, therefore nil is returned

  def self.default_ext_dir_for(base_dir)
    nil
  end

  ##
  # Paths where RubyGems' .rb files and bin files are installed

  def self.default_rubygems_dirs
    nil # default to standard layout
  end

  ##
  # Path to specification files of default gems.

  def self.default_specifications_dir
    @default_specifications_dir ||= File.join(Gem.default_dir, "specifications", "default")
  end

  ##
  # Finds the user's home directory.
  #--
  # Some comments from the ruby-talk list regarding finding the home
  # directory:
  #
  #   I have HOME, USERPROFILE and HOMEDRIVE + HOMEPATH. Ruby seems
  #   to be depending on HOME in those code samples. I propose that
  #   it should fallback to USERPROFILE and HOMEDRIVE + HOMEPATH (at
  #   least on Win32).
  #++
  #--
  #
  #++

  def self.find_home
    Dir.home.dup
  rescue StandardError
    if Gem.win_platform?
      File.expand_path File.join(ENV["HOMEDRIVE"] || ENV["SystemDrive"], "/")
    else
      File.expand_path "/"
    end
  end

  private_class_method :find_home

  ##
  # The home directory for the user.

  def self.user_home
    @user_home ||= find_home
  end

  ##
  # Path for gems in the user's home directory

  def self.user_dir
    gem_dir = File.join(Gem.user_home, ".gem")
    gem_dir = File.join(Gem.data_home, "gem") unless File.exist?(gem_dir)
    parts = [gem_dir, ruby_engine]
    ruby_version_dir_name = RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]
    parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
    File.join parts
  end

  ##
  # The path to standard location of the user's configuration directory.

  def self.config_home
    @config_home ||= ENV["XDG_CONFIG_HOME"] || File.join(Gem.user_home, ".config")
  end

  ##
  # Finds the user's config file

  def self.find_config_file
    gemrc = File.join Gem.user_home, ".gemrc"
    if File.exist? gemrc
      gemrc
    else
      File.join Gem.config_home, "gem", "gemrc"
    end
  end

  ##
  # The path to standard location of the user's .gemrc file.

  def self.config_file
    @config_file ||= find_config_file
  end

  ##
  # The path to standard location of the user's state file.

  def self.state_file
    @state_file ||= File.join(Gem.state_home, "gem", "last_update_check")
  end

  ##
  # The path to standard location of the user's cache directory.

  def self.cache_home
    @cache_home ||= ENV["XDG_CACHE_HOME"] || File.join(Gem.user_home, ".cache")
  end

  ##
  # The path to standard location of the user's data directory.

  def self.data_home
    @data_home ||= ENV["XDG_DATA_HOME"] || File.join(Gem.user_home, ".local", "share")
  end

  ##
  # The path to standard location of the user's state directory.

  def self.state_home
    @state_home ||= ENV["XDG_STATE_HOME"] || File.join(Gem.user_home, ".local", "state")
  end

  ##
  # How String Gem paths should be split.  Overridable for esoteric platforms.

  def self.path_separator
    File::PATH_SEPARATOR
  end

  ##
  # Default gem load path

  def self.default_path
    path = []
    path << user_dir if user_home && File.exist?(user_home)
    path << default_dir
    path << vendor_dir if vendor_dir && File.directory?(vendor_dir)
    path
  end

  ##
  # Deduce Ruby's --program-prefix and --program-suffix from its install name

  def self.default_exec_format
    exec_format = begin
                    RbConfig::CONFIG["ruby_install_name"].sub("ruby", "%s")
                  rescue StandardError
                    "%s"
                  end

    unless exec_format.include?("%s")
      raise Gem::Exception,
        "[BUG] invalid exec_format #{exec_format.inspect}, no %s"
    end

    exec_format
  end

  ##
  # The default directory for binaries

  def self.default_bindir
    RbConfig::CONFIG["bindir"]
  end

  def self.ruby_engine
    RUBY_ENGINE
  end

  ##
  # The default signing key path

  def self.default_key_path
    default_key_path = File.join Gem.user_home, ".gem", "gem-private_key.pem"

    unless File.exist?(default_key_path)
      default_key_path = File.join Gem.data_home, "gem", "gem-private_key.pem"
    end

    default_key_path
  end

  ##
  # The default signing certificate chain path

  def self.default_cert_path
    default_cert_path = File.join Gem.user_home, ".gem", "gem-public_cert.pem"

    unless File.exist?(default_cert_path)
      default_cert_path = File.join Gem.data_home, "gem", "gem-public_cert.pem"
    end

    default_cert_path
  end

  ##
  # Enables automatic installation into user directory

  def self.default_user_install # :nodoc:
    if !ENV.key?("GEM_HOME") && File.exist?(Gem.dir) && !File.writable?(Gem.dir)
      Gem.ui.say "Defaulting to user installation because default installation directory (#{Gem.dir}) is not writable."
      return true
    end

    false
  end

  ##
  # Install extensions into lib as well as into the extension directory.

  def self.install_extension_in_lib # :nodoc:
    Gem.configuration.install_extension_in_lib
  end

  ##
  # Directory where vendor gems are installed.

  def self.vendor_dir # :nodoc:
    if vendor_dir = ENV["GEM_VENDOR"]
      return vendor_dir.dup
    end

    return nil unless RbConfig::CONFIG.key? "vendordir"

    File.join RbConfig::CONFIG["vendordir"], "gems",
              RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]
  end

  ##
  # Default options for gem commands for Ruby packagers.
  #
  # The options here should be structured as an array of string "gem"
  # command names as keys and a string of the default options as values.
  #
  # Example:
  #
  # def self.operating_system_defaults
  #   {
  #       'install' => '--no-rdoc --no-ri --env-shebang',
  #       'update' => '--no-rdoc --no-ri --env-shebang'
  #   }
  # end

  def self.operating_system_defaults
    {}
  end

  ##
  # Default options for gem commands for Ruby implementers.
  #
  # The options here should be structured as an array of string "gem"
  # command names as keys and a string of the default options as values.
  #
  # Example:
  #
  # def self.platform_defaults
  #   {
  #       'install' => '--no-rdoc --no-ri --env-shebang',
  #       'update' => '--no-rdoc --no-ri --env-shebang'
  #   }
  # end

  def self.platform_defaults
    {}
  end
end
rubygems/rubygems/request_set/lockfile.rb000064400000012426150403134210014714 0ustar00# frozen_string_literal: true

##
# Parses a gem.deps.rb.lock file and constructs a LockSet containing the
# dependencies found inside.  If the lock file is missing no LockSet is
# constructed.

class Gem::RequestSet::Lockfile
  ##
  # Raised when a lockfile cannot be parsed

  class ParseError < Gem::Exception
    ##
    # The column where the error was encountered

    attr_reader :column

    ##
    # The line where the error was encountered

    attr_reader :line

    ##
    # The location of the lock file

    attr_reader :path

    ##
    # Raises a ParseError with the given +message+ which was encountered at a
    # +line+ and +column+ while parsing.

    def initialize(message, column, line, path)
      @line   = line
      @column = column
      @path   = path
      super "#{message} (at line #{line} column #{column})"
    end
  end

  ##
  # Creates a new Lockfile for the given +request_set+ and +gem_deps_file+
  # location.

  def self.build(request_set, gem_deps_file, dependencies = nil)
    request_set.resolve
    dependencies ||= requests_to_deps request_set.sorted_requests
    new request_set, gem_deps_file, dependencies
  end

  def self.requests_to_deps(requests) # :nodoc:
    deps = {}

    requests.each do |request|
      spec        = request.spec
      name        = request.name
      requirement = request.request.dependency.requirement

      deps[name] = if [Gem::Resolver::VendorSpecification,
                       Gem::Resolver::GitSpecification].include? spec.class
        Gem::Requirement.source_set
      else
        requirement
      end
    end

    deps
  end

  ##
  # The platforms for this Lockfile

  attr_reader :platforms

  def initialize(request_set, gem_deps_file, dependencies)
    @set           = request_set
    @dependencies  = dependencies
    @gem_deps_file = File.expand_path(gem_deps_file)
    @gem_deps_dir  = File.dirname(@gem_deps_file)
    @platforms = []
  end

  def add_DEPENDENCIES(out) # :nodoc:
    out << "DEPENDENCIES"

    out.concat @dependencies.sort.map {|name, requirement|
      "  #{name}#{requirement.for_lockfile}"
    }

    out << nil
  end

  def add_GEM(out, spec_groups) # :nodoc:
    return if spec_groups.empty?

    source_groups = spec_groups.values.flatten.group_by do |request|
      request.spec.source.uri
    end

    source_groups.sort_by {|group,| group.to_s }.map do |group, requests|
      out << "GEM"
      out << "  remote: #{group}"
      out << "  specs:"

      requests.sort_by(&:name).each do |request|
        next if request.spec.name == "bundler"
        platform = "-#{request.spec.platform}" unless
          request.spec.platform == Gem::Platform::RUBY

        out << "    #{request.name} (#{request.version}#{platform})"

        request.full_spec.dependencies.sort.each do |dependency|
          next if dependency.type == :development

          requirement = dependency.requirement
          out << "      #{dependency.name}#{requirement.for_lockfile}"
        end
      end
      out << nil
    end
  end

  def add_GIT(out, git_requests)
    return if git_requests.empty?

    by_repository_revision = git_requests.group_by do |request|
      source = request.spec.source
      [source.repository, source.rev_parse]
    end

    by_repository_revision.each do |(repository, revision), requests|
      out << "GIT"
      out << "  remote: #{repository}"
      out << "  revision: #{revision}"
      out << "  specs:"

      requests.sort_by(&:name).each do |request|
        out << "    #{request.name} (#{request.version})"

        dependencies = request.spec.dependencies.sort_by(&:name)
 rubygems/rubygems/request_set/lockfile/tokenizer.rb000064400000005435150403134210016730 0ustar00rms.each do |platform|
      out << "  #{platform}"
    end

    out << nil
  end

  def spec_groups
    requests.group_by {|request| request.spec.class }
  end

  ##
  # The contents of the lock file.

  def to_s
    out = []

    groups = spec_groups

    add_PATH out, groups.delete(Gem::Resolver::VendorSpecification) { [] }

    add_GIT out, groups.delete(Gem::Resolver::GitSpecification) { [] }

    add_GEM out, groups

    add_PLATFORMS out

    add_DEPENDENCIES out

    out.join "\n"
  end

  ##
  # Writes the lock file alongside the gem dependencies file

  def write
    content = to_s

    File.open "#{@gem_deps_file}.lock", "w" do |io|
      io.write content
    end
  end

  private

  def requests
    @set.sorted_requests
  end
end

require_relative "lockfile/tokenizer"
rubygems/rubygems/request_set/gem_dependency_api.rb000064400000053313150403134210016723 0ustar00# frozen_string_literal: true

##
# A semi-compatible DSL for the Bundler Gemfile and Isolate gem dependencies
# files.
#
# To work with both the Bundler Gemfile and Isolate formats this
# implementation takes some liberties to allow compatibility with each, most
# notably in #source.
#
# A basic gem dependencies file will look like the following:
#
#   source 'https://rubygems.org'
#
#   gem 'rails', '3.2.14a
#   gem 'devise', '~> 2.1', '>= 2.1.3'
#   gem 'cancan'
#   gem 'airbrake'
#   gem 'pg'
#
# RubyGems recommends saving this as gem.deps.rb over Gemfile or Isolate.
#
# To install the gems in this Gemfile use `gem install -g` to install it and
# create a lockfile.  The lockfile will ensure that when you make changes to
# your gem dependencies file a minimum amount of change is made to the
# dependencies of your gems.
#
# RubyGems can activate all the gems in your dependencies file at startup
# using the RUBYGEMS_GEMDEPS environment variable or through Gem.use_gemdeps.
# See Gem.use_gemdeps for details and warnings.
#
# See `gem help install` and `gem help gem_dependencies` for further details.

class Gem::RequestSet::GemDependencyAPI
  ENGINE_MAP = { # :nodoc:
    jruby: %w[jruby],
    jruby_18: %w[jruby],
    jruby_19: %w[jruby],
    maglev: %w[maglev],
    mri: %w[ruby],
    mri_18rubygems/rubygems/request_set/lockfile/parser.rb000064400000016370150403134210016212 0ustar00
    mingw_18: x86_mingw,
    mingw_19: x86_mingw,
    mingw_20: x86_mingw,
    mingw_21: x86_mingw,
    mri: Gem::Platform::RUBY,
    mri_18: Gem::Platform::RUBY,
    mri_19: Gem::Platform::RUBY,
    mri_20: Gem::Platform::RUBY,
    mri_21: Gem::Platform::RUBY,
    mswin: mswin,
    mswin_18: mswin,
    mswin_19: mswin,
    mswin_20: mswin,
    mswin_21: mswin,
    mswin64: mswin64,
    mswin64_19: mswin64,
    mswin64_20: mswin64,
    mswin64_21: mswin64,
    rbx: Gem::Platform::RUBY,
    ruby: Gem::Platform::RUBY,
    ruby_18: Gem::Platform::RUBY,
    ruby_19: Gem::Platform::RUBY,
    ruby_20: Gem::Platform::RUBY,
    ruby_21: Gem::Platform::RUBY,
    truffleruby: Gem::Platform::RUBY,
    x64_mingw: x64_mingw,
    x64_mingw_20: x64_mingw,
    x64_mingw_21: x64_mingw,
  }.freeze

  gt_eq_0        = Gem::Requirement.new ">= 0"
  tilde_gt_1_8_0 = Gem::Requirement.new "~> 1.8.0"
  tilde_gt_1_9_0 = Gem::Requirement.new "~> 1.9.0"
  tilde_gt_2_0_0 = Gem::Requirement.new "~> 2.0.0"
  tilde_gt_2_1_0 = Gem::Requirement.new "~> 2.1.0"

  VERSION_MAP = { # :nodoc:
    jruby: gt_eq_0,
    jruby_18: tilde_gt_1_8_0,
    jruby_19: tilde_gt_1_9_0,
    maglev: gt_eq_0,
    mingw: gt_eq_0,
    mingw_18: tilde_gt_1_8_0,
    mingw_19: tilde_gt_1_9_0,
    mingw_20: tilde_gt_2_0_0,
    mingw_21: tilde_gt_2_1_0,
    mri: gt_eq_0,
    mri_18: tilde_gt_1_8_0,
    mri_19: tilde_gt_1_9_0,
    mri_20: tilde_gt_2_0_0,
    mri_21: tilde_gt_2_1_0,
    mswin: gt_eq_0,
    mswin_18: tilde_gt_1_8_0,
    mswin_19: tilde_gt_1_9_0,
    mswin_20: tilde_gt_2_0_0,
    mswin_21: tilde_gt_2_1_0,
    mswin64: gt_eq_0,
    mswin64_19: tilde_gt_1_9_0,
    mswin64_20: tilde_gt_2_0_0,
    mswin64_21: tilde_gt_2_1_0,
    rbx: gt_eq_0,
    ruby: gt_eq_0,
    ruby_18: tilde_gt_1_8_0,
    ruby_19: tilde_gt_1_9_0,
    ruby_20: tilde_gt_2_0_0,
    ruby_21: tilde_gt_2_1_0,
    truffleruby: gt_eq_0,
    x64_mingw: gt_eq_0,
    x64_mingw_20: tilde_gt_2_0_0,
    x64_mingw_21: tilde_gt_2_1_0,
  }.freeze

  WINDOWS = { # :nodoc:
    mingw: :only,
    mingw_18: :only,
    mingw_19: :only,
    mingw_20: :only,
    mingw_21: :only,
    mri: :never,
    mri_18: :never,
    mri_19: :never,
    mri_20: :never,
    mri_21: :never,
    mswin: :only,
    mswin_18: :only,
    mswin_19: :only,
    mswin_20: :only,
    mswin_21: :only,
    mswin64: :only,
    mswin64_19: :only,
    mswin64_20: :only,
    mswin64_21: :only,
    rbx: :never,
    ruby: :never,
    ruby_18: :never,
    ruby_19: :never,
    ruby_20: :never,
    ruby_21: :never,
    x64_mingw: :only,
    x64_mingw_20: :only,
    x64_mingw_21: :only,
  }.freeze

  ##
  # The gems required by #gem statements in the gem.deps.rb file

  attr_reader :dependencies

  ##
  # A set of gems that are loaded via the +:git+ option to #gem

  attr_reader :git_set # :nodoc:

  ##
  # A Hash containing gem names and files to require from those gems.

  attr_reader :requires

  ##
  # A set of gems that are loaded via the +:path+ option to #gem

  attr_reader :vendor_set # :nodoc:

  ##
  # The groups of gems to exclude from installation

  attr_accessor :without_groups # :nodoc:

  ##
  # Creates a new GemDependencyAPI that will add dependencies to the
  # Gem::RequestSet +set+ based on the dependency API description in +path+.

  def initialize(set, path)
    @set = set
    @path = path

    @current_groups     = nil
    @current_platforms  = nil
    @current_repository = nil
    @dependencies       = {}
    @default_sources    = true
    @git_set            = @set.git_set
    @git_sources        = {}
    @installing         = false
    @requires           = Hash.new {|h, name| h[name] = [] }
    @vendor_set         = @set.vendor_set
    @source_set         = @set.source_set
    @gem_sources        = {}
    @without_groups     = []

    git_source :github do |repo_name|
      repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include? "/"

      "https://github.com/#{repo_name}.git"
    end

    git_source :bitbucket do |repo_name|
      repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include? "/"

      user, = repo_name.split "/", 2

      "https://#{user}@bitbucket.org/#{repo_name}.git"
    end
  end

  ##
  # Adds +dependencies+ to the request set if any of the +groups+ are allowed.
  # This is used for gemspec dependencies.

  def add_dependencies(groups, dependencies) # :nodoc:
    return unless (groups & @without_groups).empty?

    dependencies.each do |dep|
      @set.gem dep.name, *dep.requirement.as_list
    end
  end

  private :add_dependencies

  ##
  # Finds a gemspec with the given +name+ that lives at +path+.

  def find_gemspec(name, path) # :nodoc:
    glob = File.join path, "#{name}.gemspec"

    spec_files = Dir[glob]

    case spec_files.length
    when 1 then
      spec_file = spec_files.first

      spec = Gem::Specification.load spec_file

      return spec if spec

      raise ArgumentError, "invalid gemspec #{spec_file}"
    when 0 then
      raise ArgumentError, "no gemspecs found at #{Dir.pwd}"
    else
      raise ArgumentError,
        "found multiple gemspecs at #{Dir.pwd}, " \
        "use the name: option to specify the one you want"
    end
  end

  ##
  # Changes the behavior of gem dependency file loading to installing mode.
  # In installing mode certain restrictions are ignored such as ruby version
  # mismatch checks.

  def installing=(installing) # :nodoc:
    @installing = installing
  end

  ##
  # Loads the gem dependency file and returns self.

  def load
    instance_eval File.read(@path), @path, 1

    self
  end

  ##
  # :category: Gem Dependencies DSL
  #
  # :call-seq:
  #   gem(name)
  #   gem(name, *requirements)
  #   gem(name, *requirements, options)
  #
  # Specifies a gem dependency with the given +name+ and +requirements+.  You
  # may also supply +options+ following the +requirements+
  #
  # +options+ include:
  #
  # require: ::
  #   RubyGems does not provide any autorequire features so requires in a gem
  #   dependencies file are recorded but ignored.
  #
  #   In bundler the require: option overrides the file to require during
  #   Bundler.require.  By default the name of the dependency is required in
  #   Bundler.  A single file or an Array of files may be given.
  #
  #   To disable requiring any file give +false+:
  #
  #     gem 'rake', require: false
  #
  # group: ::
  #   Place the dependencies in the given dependency group.  A single group or
  #   an Array of groups may be given.
  #
  #   See also #group
  #
  # platform: ::
  #   Only install the dependency on the given platform.  A single platform or
  #   an Array of platforms may be given.
  #
  #   See #platform for a list of platforms available.
  #
  # path: ::
  #   Install this dependency from an unpacked gem in the given directory.
  #
  #     gem 'modified_gem', path: 'vendor/modified_gem'
  #
  # git: ::
  #   Install this dependency from a git repository:
  #
  #     gem 'private_gem', git: 'git@my.company.example:private_gem.git'
  #
  # gist: ::
  #   Install this dependency from the gist ID:
  #
  #     gem 'bang', gist: '1232884'
  #
  # github: ::
  #   Install this dependency from a github git repository:
  #
  #     gem 'private_gem', github: 'my_company/private_gem'
  #
  # submodules: ::
  #   Set to +true+ to include submodules when fetching the git repository for
  #   git:, gist: and github: dependencies.
  #
  # ref: ::
  #   Usrubygems/rubygems/source.rb000064400000013116150403134210012056 0ustar00quirement.default
      elsif source_set
        Gem::Requirement.source_set
      else
        Gem::Requirement.create requirements
      end

    return unless gem_platforms name, options

    groups = gem_group name, options

    return unless (groups & @without_groups).empty?

    pin_gem_source name, :default unless source_set

    gem_requires name, options

    if duplicate
      warn <<-WARNING
Gem dependencies file #{@path} requires #{name} more than once.
      WARNING
    end

    @set.gem name, *requirements
  end

  ##
  # Handles the git: option from +options+ for gem +name+.
  #
  # Returns +true+ if the gist or git option was handled.

  def gem_git(name, options) # :nodoc:
    if gist = options.delete(:gist)
      options[:git] = "https://gist.github.com/#{gist}.git"
    end

    return unless repository = options.delete(:git)

    pin_gem_source name, :git, repository

    reference = gem_git_reference options

    submodules = options.delete :submodules

    @git_set.add_git_gem name, repository, reference, submodules

    true
  end

  ##
  # Handles the git options from +options+ for git gem.
  #
  # Returns reference for the git gem.

  def gem_git_reference(options) # :nodoc:
    ref    = options.delete :ref
    branch = options.delete :branch
    tag    = options.delete :tag

    reference = nil
    reference ||= ref
    reference ||= branch
    reference ||= tag

    if ref && branch
      warn <<-WARNING
Gem dependencies file #{@path} includes git reference for both ref and branch but only ref is used.
      WARNING
    end
    if (ref || branch) && tag
      warn <<-WARNING
Gem dependencies file #{@path} includes git reference for both ref/branch and tag but only ref/branch is used.
      WARNING
    end

    reference
  end

  private :gem_git

  ##
  # Handles a git gem option from +options+ for gem +name+ for a git source
  # registered through git_source.
  #
  # Returns +true+ if the custom source option was handled.

  def gem_git_source(name, options) # :nodoc:
    return unless git_source = (@git_sources.keys & options.keys).last

    source_callback = @git_sources[git_source]
    source_param = options.delete git_source

    git_url = source_callback.call source_param

    options[:git] = git_url

    gem_git name, options

    true
  end

  private :gem_git_source

  ##
  # Handles the :group and :groups +options+ for the gem with the given
  # +name+.

  def gem_group(name, options) # :nodoc:
    g = options.delete :group
    all_groups = g ? Array(g) : []

    groups = options.delete :groups
    all_groups |= groups if groups

    all_groups |= @current_groups if @current_groups

    all_groups
  end

  private :gem_group

  ##
  # Handles the path: option from +options+ for gem +name+.
  #
  # Returns +true+ if the path option was handled.

  def gem_path(name, options) # :nodoc:
    return unless directory = options.delete(:path)

    pin_gem_source name, :path, directory

    @vendor_set.add_vendor_gem name, directory

    true
  end

  private :gem_path

  ##
  # Handles the source: option from +options+ for gem +name+.
  #
  # Returns +true+ if the source option was handled.

  def gem_source(name, options) # :nodoc:
    return unless source = options.delete(:source)

    pin_gem_source name, :source, source

    @source_set.add_source_gem name, source

    true
  end

  private :gem_source

  ##
  # Handles the platforms: option from +options+.  Returns true if the
  # platform matches the current platform.

  def gem_platforms(name, options) # :nodoc:
    platform_names = Array(options.delete(:platform))
    platform_names.concat Array(options.delete(:platforms))
    platform_names.concat @current_platforms if @current_platforms

    return true if platform_names.empty?

    platform_names.any? do |platform_name|
      raise ArgumentError, "unknown platform #{platform_name.inspect}" unless
        platform = PLATFORM_MAP[platform_name]

      next false unless Gem::Platform.match_gem? platform, name

      if engines = ENGINE_MAP[platform_name]
        next false unless engines.include? Gem.ruby_engine
      end

      case WINDOWS[platform_name]
      when :only then
        next false unless Gem.win_platform?
      when :never then
        next false if Gem.win_platform?
      end

      VERSION_MAP[platform_name].satisfied_by? Gem.ruby_version
    end
  end

  private :gem_platforms

  ##
  # Records the require: option from +options+ and adds those files, or the
  # default file to the require list for +name+.

  def gem_requires(name, options) # :nodoc:
    if options.include? :require
      if requires = options.delete(:require)
        @requires[name].concat Array requires
      end
    else
      @requires[name] << name
    end
    raise ArgumentError, "Unhandled gem options #{options.inspect}" unless options.empty?
  end

  private :gem_requires

  ##
  # :category: Gem Dependencies DSL
  #
  # Block form for specifying gems from a git +repository+.
  #
  #   git 'https://github.com/rails/rails.git' do
  #     gem 'activesupport'
  #     gem 'activerecord'
  #   end

  def git(repository)
    @current_repository = repository

    yield
  ensure
    @current_repository = nil
  end

  ##
  # Defines a custom git source that uses +name+ to expand git repositories
  # for use in gems built from git repositories.  You must provide a block
  # that accepts a git repository name for expansion.

  def git_source(name, &callback)
    @git_sources[name] = callback
  end

  ##
  # Returns the basename of the file the dependencies were loaded from

  def gem_deps_file # :nodoc:
    File.basename @path
  end

  ##
  # :category: Gem Dependencies DSL
  #
  # Loadrubygems/rubygems/source_list.rb000064400000004642150403134210013115 0ustar00encies groups, spec.runtime_dependencies

    @dependencies[spec.name] = Gem::Requirement.source_set

    spec.dependencies.each do |dep|
      @dependencies[dep.name] = dep.requirement
    end

    groups << development_group

    add_dependencies groups, spec.development_dependencies

    @vendor_set.add_vendor_gem spec.name, path
    gem_requires spec.name, options
  end

  ##
  # :category: Gem Dependencies DSL
  #
  # Block form for placing a dependency in the given +groups+.
  #
  #   group :development do
  #     gem 'debugger'
  #   end
  #
  #   group :development, :test do
  #     gem 'minitest'
  #   end
  #
  # Groups can be excluded at install time using `gem install -g --without
  # development`.  See `gem help install` and `gem help gem_dependencies` for
  # further details.

  def group(*groups)
    @current_groups = groups

    yield
  ensure
    @current_groups = nil
  end

  ##
  # Pins the gem +name+ to the given +source+.  Adding a gem with the same
  # name from a different +source+ will raise an exception.

  def pin_gem_source(name, type = :default, source = nil)
    source_description =
      case type
      when :default then "(default)"
      when :path    then "path: #{source}"
      when :git     then "git: #{source}"
      when :source  then "source: #{source}"
      else               "(unknown)"
      end

    raise ArgumentError,
      "duplicate source #{source_description} for gem #{name}" if
        @gem_sources.fetch(name, source) != source

    @gem_sources[name] = source
  end

  private :pin_gem_source

  ##
  # :category: Gem Dependencies DSL
  #
  # Block form for restricting gems to a set of platforms.
  #
  # The gem dependencies platform is different from Gem::Platform.  A platform
  # gem.deps.rb platform matches on the ruby engine, the ruby version and
  # whether or not windows is allowed.
  #
  # :ruby, :ruby_XY ::
  #   Matches non-windows, non-jruby implementations where X and Y can be used
  #   to match releases in the 1.8, 1.9, 2.0 or 2.1 series.
  #
  # :mri, :mri_XY ::
  #   Matches non-windows C Ruby (Matz Ruby) or only the 1.8, 1.9, 2.0 or
  #   2.1 series.
  #
  # :mingw, :mingw_XY ::
  #   Matches 32 bit C Ruby on MinGW or only the 1.8, 1.9, 2.0 or 2.1 series.
  #
  # :x64_mingw, :x64_mingw_XY ::
  #   Matches 64 bit C Ruby on MinGW or only the 1.8, 1.9, 2.0 or 2.1 series.
  #
  # :mswin, :mswin_XY ::
  #   Matches 32 bit C Ruby on Microsoft Windows or only the 1.rubygems/rubygems/resolver.rb000064400000023216150403134210012421 0ustar00gory: Gem Dependencies DSL
  #
  # Block form for restricting gems to a particular set of platforms.  See
  # #platform.

  alias_method :platforms, :platform

  ##
  # :category: Gem Dependencies DSL
  #
  # Restricts this gem dependencies file to the given ruby +version+.
  #
  # You may also provide +engine:+ and +engine_version:+ options to restrict
  # this gem dependencies file to a particular ruby engine and its engine
  # version.  This matching is performed by using the RUBY_ENGINE and
  # RUBY_ENGINE_VERSION constants.

  def ruby(version, options = {})
    engine         = options[:engine]
    engine_version = options[:engine_version]

    raise ArgumentError,
          "You must specify engine_version along with the Ruby engine" if
            engine && !engine_version

    return true if @installing

    unless version == RUBY_VERSION
      message = "Your Ruby version is #{RUBY_VERSION}, " \
                "but your #{gem_deps_file} requires #{version}"

      raise Gem::RubyVersionMismatch, message
    end

    if engine && engine != Gem.ruby_engine
      message = "Your Ruby engine is #{Gem.ruby_engine}, " \
                "but your #{gem_deps_file} requires #{engine}"

      raise Gem::RubyVersionMismatch, message
    end

    if engine_version
      if engine_version != RUBY_ENGINE_VERSION
        message =
          "Your Ruby engine version is #{Gem.ruby_engine} #{RUBY_ENGINE_VERSION}, " \
          "but your #{gem_deps_file} requires #{engine} #{engine_version}"

        raise Gem::RubyVersionMismatch, message
      end
    end

    true
  end

  ##
  # :category: Gem Dependencies DSL
  #
  # Sets +url+ as a source for gems for this dependency API.  RubyGems uses
  # the default configured sources if no source was given.  If a source is set
  # only that source is used.
  #
  # This method differs in behavior from Bundler:
  #
  # * The +:gemcutter+, # +:rubygems+ and +:rubyforge+ sources are not
  #   supported as they are deprecated in bundler.
  # * The +prepend:+ option is not supported.  If you wish to order sources
  #   then list them in your preferred order.

  def source(url)
    Gem.sources.clear if @default_sources

    @default_sources = false

    Gem.sources << url
  end
end
rubygems/rubygems/request_set/lockfile/tokenizer.rb000064400000005373150403134210016731 0ustar00# frozen_string_literal: true

# ) frozen_string_literal: true
require_relative "parser"

class Gem::RequestSet::Lockfile::Tokenizer
  Token = Struct.new :type, :value, :column, :line
  EOF   = Token.new :EOF

  def self.from_file(file)
    new File.read(file), file
  end

  def initialize(input, filename = nil, line = 0, pos = 0)
    @line     = line
    @line_pos = pos
    @tokens   = []
    @filename = filename
    tokenize input
  end

  def make_parser(set, platforms)
    Gem::RequestSet::Lockfile::Parser.new self, set, platforms, @filename
  end

  def to_a
    @tokens.map {|token| [token.type, token.value, token.column, token.line] }
  end

  def skip(type)
    @tokens.shift while !@tokens.empty? && peek.type == type
  end

  ##
  # Calculates the column (by byte) and the line of the current token based on
  # +byte_offset+.

  def token_pos(byte_offset) # :nodoc:
    [byte_offset - @line_pos, @line]
  end

  def empty?
    @tokens.empty?
  end

  def unshift(token)
    @tokens.unshift token
  end

  def next_token
    @tokens.shift
  end
  alias_method :shift, :next_token

  def peek
    @tokens.first || EOF
  end

  private

  def tokenize(input)
    require "strscan"
    s = StringScanner.new input

    until s.eos? do
      pos = s.pos

      pos = s.pos if leading_whitespace = s.scan(/ +/)

      if s.scan(/[<|=>]{7}/)
        message = "your #{@filename} contains merge conflict markers"
        column, line = token_pos pos

        raise Gem::RequestSet::Lockfile::ParseError.new message, column, line, @filename
      end

      @tokens <<
        if s.scan(/\r?\n/)

          token = Token.new(:newline, nil, *token_pos(pos))
          @line_pos = s.pos
          @line += 1
          token
        elsif s.scan(/[A-Z]+/)

          if leading_whitespace
            text = s.matched
            text += s.scan(/[^\s)]*/).to_s # in case of no match
            Token.new(:text, text, *token_pos(pos))
          else
            Token.new(:section, s.matched, *token_pos(pos))
          end
        elsif s.scan(/([a-z]+):\s/)

          s.pos -= 1 # rewind for possible newline
          Token.new(:entry, s[1], *token_pos(pos))
        elsif s.scan(/\(/)

          Token.new(:l_paren, nil, *token_pos(pos))
        elsif s.scan(/\)/)

          Token.new(:r_paren, nil, *token_pos(pos))
        elsif s.scan(/<=|>=|=|~>|<|>|!=/)

          Token.new(:requirement, s.matched, *token_pos(pos))
        elsif s.scan(/,/)

          Token.new(:comma, nil, *token_pos(pos))
        elsif s.scan(/!/)

          Token.new(:bang, nil, *token_pos(pos))
        elsif s.scan(/[^\s),!]*/)

          Token.new(:text, s.matched, *token_pos(pos))
        else
          raise "BUG: can't create token for: #{s.string[s.pos..-1].inspect}"
        end
    end

    @tokens
  end
end
rubygems/rubygems/request_set/lockfile/parser.rb000064400000016370150403134210016212 0ustar00# frozen_string_literal: true

class Gem::RequestSet::Lockfile::Parser
  ###
  # Parses lockfiles

  def initialize(tokenizer, set, platforms, filename = nil)
    @tokens    = tokenizer
    @filename  = filename
    @set       = set
    @platforms = platforms
  end

  def parse
    until @tokens.empty? do
      token = get

      case token.type
      when :section then
        @tokens.skip :newline

        case token.value
        when "DEPENDENCIES" then
          parse_DEPENDENCIES
        when "GIT" then
          parse_GIT
        when "GEM" then
          parse_GEM
        when "PATH" then
          parse_PATH
        when "PLATFORMS" then
          parse_PLATFORMS
        else
          token = get until @tokens.empty? || peek.first == :section
        end
      else
        raise "BUG: unhandled token #{token.type} (#{token.value.inspect}) at line #{token.line} column #{token.column}"
      end
    end
  end

  ##
  # Gets the next token for a Lockfile

  def get(expected_types = nil, expected_value = nil) # :nodoc:
    token = @tokens.shift

    if expected_types && !Array(expected_types).include?(token.type)
      unget token

      message = "unexpected token [#{token.type.inspect}, #{token.value.inspect}], " \
                "expected #{expected_types.inspect}"

      raise Gem::RequestSet::Lockfile::ParseError.new message, token.column, token.line, @filename
    end

    if expected_value && expected_value != token.value
      unget token

      message = "unexpected token [#{token.type.inspect}, #{token.value.inspect}], " \
                "expected [#{expected_types.inspect}, " \
                "#{expected_value.inspect}]"

      raise Gem::RequestSet::Lockfile::ParseError.new message, token.column, token.line, @filename
    end

    token
  end

  def parse_DEPENDENCIES # :nodoc:
    while !@tokens.empty? && peek.type == :text do
      token = get :text

      requirements = []

      case peek[0]
      when :bang then
        get :bang

        requirements << pinned_requirement(token.value)
      when :l_paren then
        get :l_paren

        loop do
          op      = get(:requirement).value
          version = get(:text).value

          requirements << "#{op} #{version}"

          break unless peek.type == :comma

          get :comma
        end

        get :r_paren

        if peek[0] == :bang
          requirements.clear
          requirements << pinned_requirement(token.value)

          get :bang
        end
      end

      @set.gem token.value, *requirements

      skip :newline
    end
  end

  def parse_GEM # :nodoc:
    sources = []

    while peek.first(2) == [:entry, "remote"] do
      get :entry, "remote"
      data = get(:text).value
      skip :newline

      sources << Gem::Source.new(data)
    end

    sources << Gem::Source.new(Gem::DEFAULT_HOST) if sources.empty?

    get :entry, "specs"

    skip :newline

    set = Gem::Resolver::LockSet.new sources
    last_specs = nil

    while !@tokens.empty? && peek.type == :text do
      token = get :text
      name = token.value
      column = token.column

      case peek[0]
      when :newline then
        last_specs.each do |spec|
          spec.add_dependency Gemrubygems/rubygems/core_ext/tcpsocket_init.rb000064400000002672150403134210015415 0ustar00evision = get(:text).value

    skip :newline

    type = peek.type
    value = peek.value
    if type == :entry && %w[branch ref tag].include?(value)
      get
      get :text

      skip :newline
    end

    get :entry, "specs"

    skip :newline

    set = Gem::Resolver::GitSet.new
    set.root_dir = @set.install_dir

    last_spec = nil

    while !@tokens.empty? && peek.type == :text do
      token = get :text
      name = token.value
      column = token.column

      case peek[0]
      when :newline then
        last_spec.add_dependency Gem::Dependency.new name if column == 6
      when :l_paren then
        get :l_paren

        token = get [:text, :requirement]
        type = token.type
        data = token.value

        if type == :text && column == 4
          last_spec = set.add_git_spec name, data, repository, revision, true
        else
          dependency = parse_dependency name, data

          last_spec.add_dependency dependency
        end

        get :r_paren
      else
        raise "BUG: unknown token #{peek}"
      end

      skip :newline
    end

    @set.sets << set
  end

  def parse_PATH # :nodoc:
    get :entry, "remote"
    directory = get(:text).value

    skip :newline

    get :entry, "specs"

    skip :newline

    set = Gem::Resolver::VendorSet.new
    last_spec = nil

    while !@tokens.empty? && peek.first == :text do
      token = get :text
      name = token.value
      column = token.column

      carubygems/rubygems/core_ext/kernel_require.rb000064400000011744150403134210015407 0ustar00  end

    @set.sets << set
  end

  def parse_PLATFORMS # :nodoc:
    while !@tokens.empty? && peek.first == :text do
      name = get(:text).value

      @platforms << name

      skip :newline
    end
  end

  ##
  # Parses the requirements following the dependency +name+ and the +op+ for
  # the first token of the requirements and returns a Gem::Dependency object.

  def parse_dependency(name, op) # :nodoc:
    return Gem::Dependency.new name, op unless peek[0] == :text

    version = get(:text).value

    requirements = ["#{op} #{version}"]

    while peek.type == :comma do
      get :comma
      op      = get(:requirement).value
      version = get(:text).value

      requirements << "#{op} #{version}"
    end

    Gem::Dependency.new name, requirements
  end

  private

  def skip(type) # :nodoc:
    @tokens.skip type
  end

  ##
  # Peeks at the next token for Lockfile

  def peek # :nodoc:
    @tokens.peek
  end

  def pinned_requirement(name) # :nodoc:
    requirement = Gem::Dependency.new name
    specification = @set.sets.flat_map do |set|
      set.find_all(requirement)
    end.compact.first

    specification&.version
  end

  ##
  # Ungets the last token retrieved by #get

  def unget(token) # :nodoc:
    @tokens.unshift token
  end
end
rubygems/rubygems/source.rb000064400000013442150403134210012060 0ustar00# frozen_string_literal: true

require_relative "text"
##
# A Source knows how to list and fetch gems from a RubyGems marshal index.
#
# There are other Source subclasses for installed gems, local gems, the
# bundler dependency API and so-forth.

class Gem::Source
  include Comparable
  include Gem::Text

  FILES = { # :nodoc:
    released: "specs",
    latest: "latest_specs",
    prerelease: "prerelease_specs",
  }.freeze

  ##
  # The URI this source will fetch gems from.

  attr_reader :uri

  ##
  # Creates a new Source which will use the index located at +uri+.

  def initialize(uri)
    require_relative "uri"
    @uri = Gem::Uri.parse!(uri)
    @update_cache = nil
  end

  ##
  # Sources are ordered by installation preference.

  def <=>(other)
    case other
    when Gem::Source::Installed,
         Gem::Source::Local,
         Gem::Source::Lock,
         Gem::Source::SpecificFile,
         Gem::Source::Git,
         Gem::Source::Vendor then
      -1
    when Gem::Source then
      unless @uri
        return 0 unless other.uri
        return 1
      end

      return -1 unless other.uri

      # Returning 1 here ensures that when sorting a list of sources, the
      # original ordering of sources supplied by the user is preserved.
      return 1 unless @uri.to_s == other.uri.to_s

      0
    end
  end

  def ==(other) # :nodoc:
    self.class === other && @uri == other.uri
  end

  alias_method :eql?, :== # :nodoc:

  ##
  # Returns a Set that can fetch specifications from this source.

  def dependency_resolver_set # :nodoc:
    return Gem::Resolver::IndexSet.new self if uri.scheme == "file"

    fetch_uri = if uri.host == "rubygems.org"
      index_uri = uri.dup
      index_uri.host = "index.rubygems.org"
      index_uri
    else
      uri
    end

    bundler_api_uri = enforce_trailing_slash(fetch_uri) + "versions"

    begin
      fetcher = Gem::RemoteFetcher.fetcher
      response = fetcher.fetch_path bundler_api_uri, nil, true
    rescue Gem::RemoteFetcher::FetchError
      Gem::Resolver::IndexSet.new self
    else
      Gem::Resolver::APISet.new response.uri + "./info/"
    end
  end

  def hash # :nodoc:
    @uri.hash
  end

  ##
  # Returns the local directory to write +uri+ to.

  def cache_dir(uri)
    # Correct for windows paths
    escaped_path = uri.path.sub(%r{^/([a-z]):/}i, '/\\1-/')

    File.join Gem.spec_cache_dir, "#{uri.host}%#{uri.port}", File.dirname(escaped_path)
  end

  ##
  # Returns true when it is possible and safe to update the cache directory.

  def update_cache?
    return @update_cache unless @update_cache.nil?
    @update_cache =
      begin
        File.stat(Gem.user_home).uid == Process.uid
      rescue Errno::ENOENT
        false
      end
  end

  ##
  # Fetches a specification for the given +name_tuple+.

  def fetch_spec(name_tuple)
    fetcher = Gem::RemoteFetcher.fetcher

    spec_file_name = name_tuple.spec_name

    source_uri = enforce_trailing_slash(uri) + "#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}"

    cache_dir = cache_dir source_urrubygems/rubygems/core_ext/kernel_gem.rb000064400000004311150403134210014473 0ustar00c, "wb" do |io|
        io.write spec
      end
    end

    Gem.load_safe_marshal
    # TODO: Investigate setting Gem::Specification#loaded_from to a URI
    Gem::SafeMarshal.safe_load spec
  end

  ##
  # Loads +type+ kind of specs fetching from +@uri+ if the on-disk cache is
  # out of date.
  #
  # +type+ is one of the following:
  #
  # :released   => Return the list of all released specs
  # :latest     => Return the list of only the highest version of each gem
  # :prerelease => Return the list of all prerelease only specs
  #

  def load_specs(type)
    file       = FILES[type]
    fetcher    = Gem::RemoteFetcher.fetcher
    file_name  = "#{file}.#{Gem.marshal_version}"
    spec_path  = enforce_trailing_slash(uri) + "#{file_name}.gz"
    cache_dir  = cache_dir spec_path
    local_file = File.join(cache_dir, file_name)
    retried    = false

    if update_cache?
      require "fileutils"
      FileUtils.mkdir_p cache_dir
    end

    spec_dump = fetcher.cache_update_path spec_path, local_file, update_cache?

    Gem.load_safe_marshal
    begin
      Gem::NameTuple.from_list Gem::SafeMarshal.safe_load(spec_dump)
    rescue ArgumentError
      if update_cache? && !retried
        FileUtils.rm local_file
        retried = true
        retry
      else
        raise Gem::Exception.new("Invalid spec cache file in #{local_file}")
      end
    end
  end

  ##
  # Downloads +spec+ and writes it to +dir+.  See also
  # Gem::RemoteFetcher#download.

  def download(spec, dir=Dir.pwd)
    fetcher = Gem::RemoteFetcher.fetcher
    fetcher.download spec, uri.to_s, dir
  end

  def pretty_print(q) # :nodoc:
    q.object_group(self) do
      q.group 2, "[Remote:", "]" do
        q.breakable
        q.text @uri.to_s

        if api = uri
          q.breakable
          q.text "API URI: "
          q.text api.to_s
        end
      end
    end
  end

  def typo_squatting?(host, distance_threshold=4)
    return if @uri.host.nil?
    levenshtein_distance(@uri.host, host).between? 1, distance_threshold
  end

  private

  def enforce_trailing_slash(uri)
    uri.merge(uri.path.gsub(%r{/+$}, "") + "/")
  end
end

require_relative "source/git"
require_relative "source/installed"
require_relative "source/specific_file"
requirerubygems/rubygems/core_ext/kernel_warn.rb000064400000002166150403134220014701 0ustar00# frozen_string_literal: true

##
# The SourceList represents the sources rubygems has been configured to use.
# A source may be created from an array of sources:
#
#   Gem::SourceList.from %w[https://rubygems.example https://internal.example]
#
# Or by adding them:
#
#   sources = Gem::SourceList.new
#   sources << 'https://rubygems.example'
#
# The most common way to get a SourceList is Gem.sources.

class Gem::SourceList
  include Enumerable

  ##
  # Creates a new SourceList

  def initialize
    @sources = []
  end

  ##
  # The sources in this list

  attr_reader :sources

  ##
  # Creates a new SourceList from an array of sources.

  def self.from(ary)
    list = new

    list.replace ary

    list
  end

  def initialize_copy(other) # :nodoc:
    @sources = @sources.dup
  end

  ##
  # Appends +obj+ to the source list which may be a Gem::Source, Gem::URI or URI
  # String.

  def <<(obj)
    src = case obj
          when Gem::Source
            obj
          else
            Gem::Source.new(obj)
    end

    @sources << src unless @sources.include?(src)
    src
  end

  ##
  # Replaces this SourceList with the sourcerubygems/rubygems/source/specific_file.rb000064400000002751150403134220014646 0ustar00urce or a source URI.

  def include?(other)
    if other.is_a? Gem::Source
      @sources.include? other
    else
      @sources.find {|x| x.uri.to_s == other.to_s }
    end
  end

  ##
  # Deletes +source+ from the source list which may be a Gem::Source or a URI.

  def delete(source)
    if source.is_a? Gem::Source
      @sources.delete source
    else
      @sources.delete_if {|x| x.uri.to_s == source.to_s }
    end
  end
end
rubygems/rubygems/resolver.rb000064400000022673150403134210012427 0ustar00# frozen_string_literal: true

require_relative "dependency"
require_relative "exceptions"
require_relative "util/list"

##
# Given a set of Gem::Dependency objects as +needed+ and a way to query the
# set of available specs via +set+, calculates a set of ActivationRequest
# objects which indicate all the specs that should be activated to meet the
# all the requirements.

class Gem::Resolver
  require_relative "vendored_molinillo"

  ##
  # If the DEBUG_RESOLVER environment variable irubygems/rubygems/source/git.rb000064400000012506150403134220012644 0ustar00:ignore_dependencies

  ##
  # List of dependencies that could not be found in the configured sources.

  attr_reader :stats

  ##
  # Hash of gems to skip resolution.  Keyed by gem name, with arrays of
  # gem specifications as values.

  attr_accessor :skip_gems

  ##
  #

  attr_accessor :soft_missing

  ##
  # Combines +sets+ into a ComposedSet that allows specification lookup in a
  # uniform manner.  If one of the +sets+ is itself a ComposedSet its sets are
  # flattened into the result ComposedSet.

  def self.compose_sets(*sets)
    sets.compact!

    sets = sets.flat_map do |set|
      case set
      when Gem::Resolver::BestSet then
        set
      when Gem::Resolver::ComposedSet then
        set.sets
      else
        set
      end
    end

    case sets.length
    when 0 then
      raise ArgumentError, "one set in the composition must be non-nil"
    when 1 then
      sets.first
    else
      Gem::Resolver::ComposedSet.new(*sets)
    end
  end

  ##
  # Creates a Resolver that queries only against the already installed gems
  # for the +needed+ dependencies.

  def self.for_current_gems(needed)
    new needed, Gem::Resolver::CurrentSet.new
  end

  ##
  # Create Resolver object which will resolve the tree starting
  # with +needed+ Dependency objects.
  #
  # +set+ is an object that provides where to look for specifications to
  # satisfy the Dependencies. This defaults to IndexSet, which will query
  # rubygems.org.

  def initialize(needed, set = nil)
    @set = set || Gem::Resolver::IndexSet.new
    @needed = needed

    @development         = false
    @development_shallow = false
    @ignore_dependencies = false
    @skip_gems           = {}
    @soft_missing        = false
    @stats               = Gem::Resolver::Stats.new
  end

  def explain(stage, *data) # :nodoc:
    return unless DEBUG_RESOLVER

    d = data.map(&:pretty_inspect).join(", ")
    $stderr.printf "%10s %s\n", stage.to_s.upcase, d
  end

  def explain_list(stage) # :nodoc:
    return unless DEBUG_RESOLVER

    data = yield
    $stderr.printf "%10s (%d entries)\n", stage.to_s.upcase, data.size
    unless data.empty?
      require "pp"
      PP.pp data, $stderr
    end
  end

  ##
  # Creates an ActivationRequest for the given +dep+ and the last +possible+
  # specification.
  #
  # Returns the Specification and the ActivationRequest

  def activation_request(dep, possible) # :nodoc:
    spec = possible.pop

    explain :activate, [spec.full_name, possible.size]
    explain :possible, possible

    activation_request =
      Gem::Resolver::ActivationRequest.new spec, dep, possible

    [spec, activation_request]
  end

  def requests(s, act, reqs=[]) # :nodoc:
    return reqs if @ignore_dependencies

    s.fetch_development_dependencies if @development

    s.dependencies.reverse_each do |d|
      next if d.type == :development && !@development
      next if d.type == :development && @development_shallow &&
              act.development?
      next if d.type == :development && @development_shallow &&
              act.parent

      reqs << Gem::Resolver::DependencyRequest.new(d, act)
      @stats.requirement!
    end

    @set.prefetch reqs

    @stats.record_requirements reqs

    reqs
  end

  include Gem::Molinillo::UI

  def output
    @output ||= debug? ? $stdout : File.open(IO::NULL, "w")
  end

  def debug?
    DEBUG_RESOLVER
  end

  include Gem::Molinillo::SpecificationProvider

  ##
  # Proceed with resolution! Returns an array of ActivationRequest objects.

  def resolve
    Gem::Molinillo::Resolver.new(self, self).resolve(@needed.map {|d| DependencyRequest.new d, nil }).tsort.filter_map(&:payload)
  rescue Gem::Molinillo::VersionConflict => e
    conflict = e.conflicts.values.first
    raise Gem::DependencyResolutionError, Conflict.new(conflict.requirement_trees.first.first, conflict.existing, conflict.requirement)
  ensure
    @output.close if defined?(@output) && !debug?
  end

  ##
  # Extracts the specifications that may be able to fulfill +dependency+ and
  # returns those that match the local platform and all those that match.

  def find_possible(dependency) # :nodoc:
    all = @set.find_all dependency

    if (skip_dep_gems = skip_gems[dependency.name]) && !skip_dep_gems.empty?
      matching = all.select do |api_spec|
        skip_dep_gems.any? {|s| api_spec.version == s.version }
      end

      all = matching unless matching.empty?
    end

    matching_platform = select_local_platforms all

    [matching_platform, all]
  end

  ##
  # Returns the gems in +specs+ that match the local platform.

  def select_local_platforms(specs) # :nodoc:
    specs.select do |spec|
      Gem::Platform.installable? spec
    end
  end

  def search_for(dependency)
    possibles, all = find_possible(dependency)
    if !@soft_missing && possibles.empty?
      exc = Gem::UnsatisfiableDependencyError.new dependency, all
      exc.errors = @set.errors
      raise exc
    end

    groups = Hash.new {|hash, key| hash[key] = [] }

    # create groups & sources in the same loop
    sources = possibles.map do |spec|
      source = spec.source
      groups[source] << spec
      source
    end.uniq.reverse

    activation_requests = []

    sources.each do |source|
      groups[source].
        sort_by {|spec| [spec.version, spec.platform =~ Gem::Platform.local ? 1 : 0] }. # rubocop:disable Performance/RegexpMatch
        map {|spec| ActivationRequest.new spec, derubygems/rubygems/source/local.rb000064400000005460150403134220013154 0ustar00   @soft_missing
  end

  def sort_dependencies(dependencies, activated, conflicts)
    dependencies.sort_by.with_index do |dependency, i|
      name = name_for(dependency)
      [
        activated.vertex_named(name).payload ? 0 : 1,
        amount_constrained(dependency),
        conflicts[name] ? 0 : 1,
        activated.vertex_named(name).payload ? 0 : search_for(dependency).count,
        i, # for stable sort
      ]
    end
  end

  SINGLE_POSSIBILITY_CONSTRAINT_PENALTY = 1_000_000
  private_constant :SINGLE_POSSIBILITY_CONSTRAINT_PENALTY if defined?(private_constant)

  # returns an integer \in (-\infty, 0]
  # a number closer to 0 means the dependency is less constraining
  #
  # dependencies w/ 0 or 1 possibilities (ignoring version requirements)
  # are given very negative values, so they _always_ sort first,
  # before dependencies that are unconstrained
  def amount_constrained(dependency)
    @amount_constrained ||= {}
    @amount_constrained[dependency.name] ||= begin
      name_dependency = Gem::Dependency.new(dependency.name)
      dependency_request_for_name = Gem::Resolver::DependencyRequest.new(name_dependency, dependency.requester)
      all = @set.find_all(dependency_request_for_name).size

      if all <= 1
        all - SINGLE_POSSIBILITY_CONSTRAINT_PENALTY
      else
        search = search_for(dependency).size
        search - all
      end
    end
  end
  private :amount_constrained
end

require_relative "resolver/activation_request"
require_relative "resolver/conflict"
require_relative "resolver/dependency_request"
require_relative "resolver/requirement_list"
require_relative "resolver/stats"

require_relative "resolver/set"
require_relative "resolver/api_set"
require_relative "resolver/composed_set"
require_relative "resolver/best_set"
require_relative "resolver/current_set"
require_relative "resolver/git_set"
require_relative "resolver/index_set"
require_relative "resolver/installer_set"
require_relative "resolver/lock_set"
require_relative "resolver/vendor_set"
require_relative "resolver/source_set"

require_relative "resolver/specification"
require_relative "resolver/spec_specification"
require_relative "resolver/api_specification"
require_relative "resolver/git_specification"
require_relative "resolver/index_specification"
require_relative "resolver/installed_specification"
require_relative "resolver/local_specification"
require_relative "resolver/lock_specification"
require_relative "resolver/vendor_specification"
rubygems/rubygems/core_ext/tcpsocket_init.rb000064400000002616150403134210015413 0ustar00rubygems/rubygems/source/vendor.rb000064400000000724150403134220013355 0ustar00lse

          threads << Thread.new(addr) do
            # give head start to ipv6 addresses
            sleep IPV4_DELAY_SECONDS if addr.ipv4?

            # raises Errno::ECONNREFUSED when ip:port is unreachable
            Socket.tcp(addr.ip_address, serv, connect_timeout: CONNECTION_TIMEOUT).close
            mutex.synchronize do
              addrs << addr.ip_address
              cond_var.signal
            end
          end
        end

        mutex.synchrubygems/rubygems/source/installed.rb000064400000001226150403134220014035 0ustar00rubygems/rubygems/core_ext/kernel_require.rb000064400000010523150403134210015401 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for rubygems/rubygems/source/lock.rb000064400000001637150403134220013014 0ustar00reserved.

  def require(path) # :doc:
    return gem_original_require(path) unless Gem.discover_gems_on_require

    RUBYGEMS_ACTIVATION_MONITOR.synchronize do
      path = File.path(path)

      # If +path+ belongs to a default gem, we activate it and then go straight
      # to normal require

      if spec = Gem.find_default_spec(path)
        name = spec.name

        next if Gem.loaded_specs[name]

        # Ensure -I beats a default gem
        resolved_path = begin
          rp = nil
          load_path_check_index = Gem.load_path_insert_index - Gem.activated_gem_paths
          Gem.suffixes.find do |s|
            $LOAD_PATH[0...load_path_check_index].find do |lp|
              if File.symlink? lp # for backward compatibility
                next
              end

              full_path = File.expand_path(File.join(lp, "#{path}#{s}"))
              rp = full_path if File.file?(full_path)
            endrubygems/rubygems/config_file.rb000064400000034037150403134220013030 0ustar00s to speed up RubyGems

      if Gem::Specification.find_active_stub_by_path(path)
        next
      end

      # Attempt to find +path+ in any unresolved gems...

      found_specs = Gem::Specification.find_in_unresolved path

      # If there are no directly unresolved gems, then try and find +path+
      # in any gems that are available via the currently unresolved gems.
      # For example, given:
      #
      #   a => b => c => d
      #
      # If a and b are currently active with c being unresolved and d.rb is
      # requested, then find_in_unresolved_tree will find d.rb in d because
      # it's a dependency of c.
      #
      if found_specs.empty?
        found_specs = Gem::Specification.find_in_unresolved_tree path

        found_specs.each(&:activate)

      # We found +path+ directly in an unresolved gem. Now we figure out, of
      # the possible found specs, which one we should activate.
      else

        # Check that all the found specs are just different
        # versions of the same gem
        names = found_specs.map(&:name).uniq

        if names.size > 1
          raise Gem::LoadError, "#{path} found in multiple gems: #{names.join ", "}"
        end

        # Ok, now find a gem that has no conflicts, starting
        # at the highest version.
        valid = found_specs.find {|s| !s.has_conflicts? }

        unless valid
          le = Gem::LoadError.new "unable to find a version of '#{names.first}' to activate"
          le.name = names.first
          raise le
        end

        valid.activate
      end
    end

    begin
      gem_original_require(path)
    rescue LoadError => load_error
      if load_error.path == path &&
         RUBYGEMS_ACTIVATION_MONITOR.synchronize { Gem.try_activate(path) }

        return gem_original_require(path)
      end

      raise load_error
    end
  end

  private :require
end
rubygems/rubygems/core_ext/kernel_gem.rb000064400000004304150403134210014475 0ustar00# frozen_string_literal: true

module Kernel
  ##
  # Use Kernel#gem to activate a specific version of +gem_name+.
  #
  # +requirements+ is a list of version requirements that the
  # specified gem must match, most commonly "= example.version.number".  See
  # Gem::Requirement for how to specify a version requirement.
  #
  # If you will be activating the latest version of a gem, there is no need to
  # call Kernel#gem, Kernel#require will do the right thing for you.
  #
  # Kernel#gem returns true if the gem was activated, otherwise false.  If the
  # gem could not be found, didn't match the version requirements, or a
  # different version was already activated, an exception will be raised.
  #
  # Kernel#gem should be called *before* any require statements (otherwise
  # RubyGems may load a conflicting library version).
  #
  # Kernel#gem only loads prerelease versions when prerelease +requirements+
  # are given:
  #
  #   gem 'rake', '>= 1.1.a', '< 2'
  #
  # In older RubyGems versions, the environment variable GEM_SKIP could be
  # used to skip activation of specified gems, for example to test out changes
  # that haven't been installed yet.  Now RubyGems defers to -I and the
  # RUBYLIB environment variable to skip activation of a gem.
  #
  # Example:
  #
  #   GEM_SKIP=libA:libB ruby -I../libA -I../libB ./mycode.rb

  def gem(gem_name, *requirements) # :doc:
    skip_list = (ENV["GEM_SKIP"] || "").split(/:/)
    raise Gem::LoadError, "skipping #{gem_name}" if skip_list.include? gem_name

    if gem_name.is_a? Gem::Dependency
      unless Gem::Deprecate.skip
        warn "#{Gem.location_of_caller.join ":"}:Warning: Kernel.gem no longer "\
          "accepts a Gem::Dependency object, please pass the name "\
          "and requirements directly"
      end

      requirements = gem_name.requirement
      gem_name = gem_name.name
    end

    dep = Gem::Dependency.new(gem_name, *requirements)

    loaded = Gem.loaded_specs[gem_name]

    return false if loaded && dep.matches_spec?(loaded)

    spec = dep.to_spec

    if spec
      if Gem::LOADED_SPECS_MUTEX.owned?
        spec.activate
      else
        Gem::LOADED_SPECS_MUTEX.synchronize { spec.activate }
      end
    end
  end

  private :gem
end
rubygems/rubygems/core_ext/kernel_warn.rb000064400000001724150403134220014700 0ustar00# frozen_string_literal: true

module Kernel
  rubygems_path = "#{__dir__}/" # Frames to be skipped start with this path.

  original_warn = instance_method(:warn)

  remove_method :warn

  class << self
    remove_method :warn
  end

  module_function define_method(:warn) {|*messages, **kw|
    unless uplevel = kw[:uplevel]
      return original_warn.bind_call(self, *messages, **kw)
    end

    # Ensure `uplevel` fits a `long`
    uplevel, = [uplevel].pack("l!").unpack("l!")

    if uplevel >= 0
      start = 0
      while uplevel >= 0
        loc, = caller_locations(start, 1)
        unless loc
          # No more backtrace
          start += uplevel
          break
        end

        start += 1

        next unless path = loc.path
        unless path.start_with?(rubygems_path, "<internal:")
          # Non-rubygems frames
          uplevel -= 1
        end
      end
      kw[:uplevel] = start
    end

    original_warn.bind_call(self, *messages, **kw)
  }
end
rubygems/rubygems/source/specific_file.rb000064400000003013150403134220014636 0ustar00# frozen_string_literal: true

##
# A source representing a single .gem file.  This is used for installation of
# local gems.

class Gem::Source::SpecificFile < Gem::Source
  ##
  # The path to the gem for this specific file.

  attr_reader :path

  ##
  # Creates a new SpecificFile for the gem in +file+

  def initialize(file)
    @uri = nil
    @path = ::File.expand_path(file)

    @package = Gem::Package.new @path
    @spec = @package.spec
    @name = @spec.name_tuple
  end

  ##
  # The Gem::Specification extracted from this .gem.

  attr_reader :spec

  def load_specs(*a) # :nodoc:
    [@name]
  end

  def fetch_spec(name) # :nodoc:
    return @spec if name == @name
    raise Gem::Exception, "Unable to find '#{name}'"
  end

  def download(spec, dir = nil) # :nodoc:
    return @path if spec == @spec
    raise Gem::Exception, "Unable to download '#{spec.full_name}'"
  end

  def pretty_print(q) # :nodoc:
    q.object_group(self) do
      q.group 2, "[SpecificFile:", "]" do
        q.breakable
        q.text @path
      end
    end
  end

  ##
  # Orders this source against +other+.
  #
  # If +other+ is a SpecificFile from a different gem name +nil+ is returned.
  #
  # If +other+ is a SpecificFile from the same gem name the versions are
  # compared using Gem::Version#<=>
  #
  # Otherwise Gem::Source#<=> is used.

  def <=>(other)
    case other
    when Gem::Source::SpecificFile then
      return nil if @spec.name != other.spec.name

      @spec.version <=> other.spec.version
    else
      super
    end
  end
end
rubygems/rubygems/source/git.rb000064400000012663150403134220012650 0ustar00# frozen_string_literal: true

##
# A git gem for use in a gem dependencies file.
#
# Example:
#
#   source =
#     Gem::Source::Git.new 'rake', 'git@example:rake.git', 'rake-10.1.0', false
#
#   source.specs

class Gem::Source::Git < Gem::Source
  ##
  # The name of the gem created by this git gem.

  attr_reader :name

  ##
  # The commit reference used for checking out this git gem.

  attr_reader :reference

  ##
  # When false the cache for this repository will not be updated.

  attr_accessor :remote

  ##
  # The git repository this gem is sourced from.

  attr_reader :repository

  ##
  # The directory for cache and git gem installation

  attr_accessor :root_dir

  ##
  # Does this repository need submodules checked out too?

  attr_reader :need_submodules

  ##
  # Creates a new git gem source for a gems from loaded from +repository+ at
  # the given +reference+.  The +name+ is only used to track the repository
  # back to a gem dependencies file, it has no real significance as a git
  # repository may contain multiple gems.  If +submodules+ is true, submodules
  # will be checked out when the gem is installed.

  def initialize(name, repository, reference, submodules = false)
    require_relative "../uri"
    @uri = Gem::Uri.parse(repository)
    @name            = name
    @repository      = repository
    @reference       = reference || "HEAD"
    @need_submodules = submodules

    @remote   = true
    @root_dir = Gem.dir
  end

  def <=>(other)
    case other
    when Gem::Source::Git then
      0
    when Gem::Source::Vendor,
         Gem::Source::Lock then
      -1
    when Gem::Source then
      1
    end
  end

  def ==(other) # :nodoc:
    super &&
      @name            == other.name &&
      @repository      == other.repository &&
      @reference       == other.reference &&
      @need_submodules == other.need_submodules
  end

  def git_command
    ENV.fetch("git", "git")
  end

  ##
  # Checks out the files for the repository into the install_dir.

  def checkout # :nodoc:
    cache

    return false unless File.exist? repo_cache_dir

    unless File.exist? install_dir
      system git_command, "clone", "--quiet", "--no-checkout",
             repo_cache_dir, install_dir
    end

    Dir.chdir install_dir do
      system git_command, "fetch", "--quiet", "--force", "--tags", install_dir

      success = system git_command, "reset", "--quiet", "--hard", rev_parse

      if @need_submodules
        require "open3"
        _, status = Open3.capture2e(git_command, "submodule", "update", "--quiet", "--init", "--recursive")

        success &&= status.success?
      end

      success
    end
  end

  ##
  # Creates a local cache repository for the git gem.

  def cache # :nodoc:
    return unless @remote

    if File.exist? repo_cache_dir
      Dir.chdir repo_cache_dir do
        system git_command, "fetch", "--quiet", "--force", "--tags",
               @repository, "refs/heads/*:refs/heads/*"
      end
    else
      system git_command, "clone", "--quiet", "--bare", "--no-hardlinks",
             @repository, repo_cache_dir
    end
  end

  ##
  # Directory where git gems get unpacked and so-forth.

  def base_dir # :nodoc:
    File.join @root_dir, "bundler"
  end

  ##
  # A short reference for use in git gem directories

  def dir_shortref # :nodoc:
    rev_parse[0..11]
  end

  ##
  # Nothing to download for git gems

  def download(full_spec, path) # :nodoc:
  end

  ##
  # The directory where the git gem will be installed.

  def install_dir # :nodoc:
    return unless File.exist? repo_cache_dir

    File.join base_dir, "gems", "#{@name}-#{dir_shortref}"
  end

  def pretty_print(q) # :nodoc:
    q.object_group(self) do
      q.group 2, "[Git: ", "]" do
        q.breakable
        q.text @repository

        q.breakable
        q.text @reference
      end
    end
  end

  ##
  # The directory where the git gem's repository will be cached.

  def repo_cache_dir # :nodoc:
    File.join @root_dir, "cache", "bundler", "git", "#{@name}-#{uri_hash}"
  end

  ##
  # Converts the git reference for the repository into a commit hash.

  def rev_parse # :nodoc:
    hash = nil

    Dir.chdir repo_cache_dir do
      hash = Gem::Util.popen(git_command, "rev-parse", @reference).strip
    end

    raise Gem::Exception,
          "unable to find reference #{@reference} in #{@repository}" unless
            $?.success?

    hash
  end

  ##
  # Loads all gemspecs in the repository

  def specs
    checkout

    return [] unless install_dir

    Dir.chdir install_dir do
      Dir["{,*,*/*}.gemspec"].filter_map do |spec_file|
        directory = Firubygems/rubygems/remote_fetcher.rb000064400000022311150403134220013547 0ustar00rubygems/rubygems/source/local.rb000064400000005425150403134220013155 0ustar00# frozen_string_literal: true

##
# The local source finds gems in the current directory for fulfilling
# dependencies.

class Gem::Source::Local < Gem::Source
  def initialize # :nodoc:
    @specs   = nil
    @api_uri = nil
    @uri     = nil
    @load_specs_names = {}
  end

  ##
  # Local sorts before Gem::Source and after Gem::Source::Installed

  def <=>(other)
    case other
    when Gem::Source::Installed,
         Gem::Source::Lock then
      -1
    when Gem::Source::Local then
      0
    when Gem::Source then
      1
    end
  end

  def inspect # :nodoc:
    keys = @specs ? @specs.keys.sort : "NOT LOADED"
    format("#<%s specs: %p>", self.class, keys)
  end

  def load_specs(type) # :nodoc:
    @load_specs_names[type] ||= begin
      names = []

      @specs = {}

      Dir["*.gem"].each do |file|
        pkg = Gem::Package.new(file)
        spec = pkg.spec
      rescue SystemCallError, Gem::Package::FormatError
        # ignore
      else
        tup = spec.name_tuple
        @specs[tup] = [File.expand_path(file), pkg]

        case type
        when :released
          unless pkg.spec.version.prerelease?
            names << pkg.spec.name_tuple
          end
        when :prerelease
          if pkg.spec.version.prerelease?
            names << pkg.spec.name_tuple
          end
        when :latest
          tup = pkg.spec.name_tuple

          cur = names.find {|x| x.name == tup.name }
          if !cur
            names << tup
          elsif cur.version < tup.version
            names.delete cur
            names << tup
          end
        else
          names << pkg.spec.name_tuple
        end
      end

      names
    end
  end

  def find_gem(gem_name, version = Gem::Requirement.default, prerelease = false) # :nodoc:
    load_specs :complete

    found = []

    @specs.each do |n, data|
      next unless n.name == gem_name
      s = data[1].spec

      if version.satisfied_by?(s.version)
        if prerelease
          found << s
        elsif !s.version.prerelease? || version.prerelease?
          found << s
        end
      end
    end

    found.max_by(&:version)
  end

  def fetch_spec(name) # :nodoc:
    load_specs :complete

    if data = @specs[name]
      data.last.spec
    else
      raise Gem::Exception, "Unable to find spec for #{name.inspect}"
    end
  end

  def download(spec, cache_dir = nil) # :nodoc:
    load_specs :complete

    @specs.each do |_name, data|
      return data[0] if data[1].spec == spec
    end

    raise Gem::Exception, "Unable to find file for '#{spec.full_name}'"
  end

  def pretty_print(q) # :nodoc:
    q.object_group(self) do
      q.group 2, "[Local gems:", "]" do
        q.breakable
        if @specs
          q.seplist @specs.keys do |v|
            q.text v.full_name
          end
        end
      end
    end
  end
end
rubygems/rubygems/source/vendor.rb000064400000000701150403134220013350 0ustar00# frozen_string_literal: true

##
# This represents a vendored source that is similar to an installed gem.

class Gem::Source::Vendor < Gem::Source::Installed
  ##
  # Creates a new Vendor source for a gem that was unpacked at +path+.

  def initialize(path)
    @uri = path
  end

  def <=>(other)
    case other
    when Gem::Source::Lock then
      -1
    when Gem::Source::Vendor then
      0
    when Gem::Source then
      1
    end
  end
end
rubygems/rubygems/source/installed.rb000064400000001251150403134220014033 0ustar00# frozen_string_literal: true

##
# Represents an installed gem.  This is used for dependency resolution.

class Gem::Source::Installed < Gem::Source
  def initialize # :nodoc:
    @uri = nil
  end

  ##
  # Installed sources sort before all other sources

  def <=>(other)
    case other
    when Gem::Source::Git,
         Gem::Source::Lock,
         Gem::Source::Vendor then
      -1
    when Gem::Source::Installed then
      0
    when Gem::Source then
      1
    end
  end

  ##
  # We don't need to download an installed gem

  def download(spec, path)
    nil
  end

  def pretty_print(q) # :nodoc:
    q.object_group(self) do
      q.text "[Installed]"
    end
  end
end
rubygems/rubygems/source/lock.rb000064400000001614150403134220013007 0ustar00# frozen_string_literal: true

##
# A Lock source wraps an installed gem's source and sorts before other sources
# during dependency resolution.  This allows RubyGems to prefer gems from
# dependency lock files.

class Gem::Source::Lock < Gem::Source
  ##
  # The wrapped Gem::Source

  attr_reader :wrapped

  ##
  # Creates a new Lock source that wraps +source+ and moves it earlier in the
  # sort list.

  def initialize(source)
    @wrapped = source
  end

  def <=>(other) # :nodoc:
    case other
    when Gem::Source::Lock then
      @wrapped <=> other.wrapped
    when Gem::Source then
      1
    end
  end

  def ==(other) # :nodoc:
    (self <=> other) == 0
  end

  def hash # :nodoc:
    @wrapped.hash ^ 3
  end

  ##
  # Delegates to the wrapped source's fetch_spec method.

  def fetch_spec(name_tuple)
    @wrapped.fetch_spec name_tuple
  end

  def uri # :nodoc:
    @wrapped.uri
  end
end
rubygems/rubygems/config_file.rb000064400000040474150403134220013032 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "user_interaction"
require "rbconfig"

##
# Gem::ConfigFile RubyGems options and gem command options from gemrc.
#
# gemrc is a YAML file that uses strings to match gem command arguments and
# symbols to match RubyGems options.
#
# Gem command arguments use a String key that matches the command name and
# allow you to specify default arguments:
#
#   install: --no-rdoc --no-ri
#   update: --no-rdoc --no-ri
#
# You can use <tt>gem:</tt> to set default arguments for all commands.
#
# RubyGems options use symbol keys.  Valid options are:
#
# +:backtrace+:: See #backtrace
# +:sources+:: Sets Gem::sources
# +:verbose+:: See #verbose
# +:concurrent_downloads+:: See #concurrent_downloads
#
# gemrc files may exist in various locations and are read and merged in
# the following order:
#
# - system wide (/etc/gemrc)
# - per user (~/.gemrc)
# - per environment (gemrc files listed in the GEMRC environment variable)

class Gem::ConfigFile
  include Gem::UserInteraction

  DEFAULT_BACKTRACE = true
  DEFAULT_BULK_THRESHOLD = 1000
  DEFAULTrubygems/rubygems/requirement.rb000064400000015617150403134220013127 0ustar00IG_FILE = File.join SYSTEM_CONFIG_PATH, "gemrc"

  ##
  # List of arguments supplied to the config file object.

  attr_reader :args

  ##
  # Where to look for gems (deprecated)

  attr_accessor :path

  ##
  # Where to install gems (deprecated)

  attr_accessor :home

  ##
  # True if we print backtraces on errors.

  attr_writer :backtrace

  ##
  # Bulk threshold value.  If the number of missing gems are above this
  # threshold value, then a bulk download technique is used.  (deprecated)

  attr_accessor :bulk_threshold

  ##
  # Verbose level of output:
  # * false -- No output
  # * true -- Normal output
  # * :loud -- Extra output

  attr_accessor :verbose

  ##
  # Number of gem downloads that should be performed concurrently.

  attr_accessor :concurrent_downloads

  ##
  # True if we want to update the SourceInfoCache every time, false otherwise

  attr_accessor :update_sources

  ##
  # True if we want to force specification of gem server when pushing a gem

  attr_accessor :disable_default_gem_server

  # openssl verify mode value, used for remote https connection

  attr_reader :ssl_verify_mode

  ##
  # Path name of directory or file of openssl CA certificate, used for remote
  # https connection

  attr_accessor :ssl_ca_cert

  ##
  # sources to look for gems
  attr_accessor :sources

  ##
  # Expiration length to sign a certificate

  attr_accessor :cert_expiration_length_days

  ##
  # Install extensions into lib as well as into the extension directory.

  attr_accessor :install_extension_in_lib

  ##
  # == Experimental ==
  # Fallback to IPv4 when IPv6 is not reachable or slow (default: false)

  attr_accessor :ipv4_fallback_enabled

  ##
  # Path name of directory or file of openssl client certificate, used for remote https connection with client authentication

  attr_reader :ssl_client_cert

  ##
  # Create the config file object.  +args+ is the list of arguments
  # from the command line.
  #
  # The following command line options are handled early here rather
  # than later at the time most command options are processed.
  #
  # <tt>--config-file</tt>, <tt>--config-file==NAME</tt>::
  #   Obviously these need to be handled by the ConfigFile object to ensure we
  #   get the right config file.
  #
  # <tt>--backtrace</tt>::
  #   Backtrace needs to be turned on early so that errors before normal
  #   option parsing can be properly handled.
  #
  # <tt>--debug</tt>::
  #   Enable Ruby level debug messages.  Handled early for the same reason as
  #   --backtrace.
  #--
  # TODO: parse options upstream, pass in options directly

  def initialize(args)
    set_config_file_name(args)

    @backtrace = DEFAULT_BACKTRACE
    @bulk_threshold = DEFAULT_BULK_THRESHOLD
    @verbose = DEFAULT_VERBOSITY
    @update_sources = DEFAULT_UPDATE_SOURCES
    @concurrent_downloads = DEFAULT_CONCURRENT_DOWNLOADS
    @cert_expiration_length_days = DEFAULT_CERT_EXPIRATION_LENGTH_DAYS
    @install_extension_in_lib = DEFAULT_INSTALL_EXTENSION_IN_LIB
    @ipv4_fallback_enabled = ENV["IPV4_FALLBACK_ENABLED"] == "true" || DEFAULT_IPV4_FALLBACK_ENABLED

    operating_system_config = Marshal.load Marshal.dump(OPERATING_SYSTEM_DEFAULTS)
    platform_config = Marshal.load Marshal.dump(PLATFORM_DEFAULTS)
    system_config = load_file SYSTEM_WIDE_CONFIG_FILE
    user_config = load_file config_file_name

    environment_config = (ENV["GEMRC"] || "").
      split(File::PATH_SEPARATOR).inject({}) do |result, file|
        result.merge load_file file
      end

    @hash = operating_system_config.merge platform_config
    unless args.index "--norc"
      @hash = @hash.merge system_config
      @hash = @hash.merge user_config
      @hash = @hash.merge environment_config
    end

    @hash.transform_keys! do |k|
      # gemhome and gempath are not working with symbol keys
      if %w[backtrace bulk_threshold verbose update_sources cert_expiration_length_days
            install_extension_in_lib ipv4_fallback_enabled sources disable_default_gem_server
            ssl_verify_mode ssl_ca_cert ssl_client_cert].include?(k)
        k.to_sym
      else
        k
      end
    end

    # HACK: these override command-line args, which is bad
    @backtrace                   = @hash[:backtrace]                   if @hash.key? :backtrace
    @bulk_threshold              = @hash[:bulk_threshold]              if @hash.key? :bulk_threshold
    @verbose                     = @hash[:verbose]                     if @hash.key? :verbose
    @update_sources              = @hash[:update_sources]              if @hash.key? :update_sources
    # TODO: We should handle concurrent_downloads same as other options
    @cert_expiration_length_days = @hash[:cert_expiration_length_days] if @hash.key? :cert_expiration_length_days
    @install_extension_in_lib    = @hash[:install_extension_in_lib]    if @hash.key? :install_extension_in_lib
    @ipv4_fallback_enabled       = @hash[:ipv4_fallback_enabled]       if @hash.key? :ipv4_fallback_enabled

    @home                        = @hash[:gemhome]                     if @hash.key? :gemhome
    @path                        = @hash[:gempath]                     if @hash.key? :gempath
    @sources                     = @hash[:sources]                     if @hash.key? :sources
    @disable_default_gem_server  = @hash[:disable_default_gem_server]  if @hash.key? :disable_default_gem_server
    @ssl_verify_mode             = @hash[:ssl_verify_mode]             if @hash.key? :ssl_verify_mode
    @ssl_ca_cert                 = @hash[:ssl_ca_cert]                 if @hash.key? :ssl_ca_cert
    @ssl_client_cert             = @hash[:ssl_client_cert]             if @hash.key? :ssl_client_cert

    @api_keys         = nil
    @rubygems_api_key = nil

    handle_arguments args
  end

  ##
  # Hash of RubyGems.org and alternate API keys

  def api_keys
    load_api_keys unless @api_keys

    @api_keys
  end

  ##
  # Checks the permissions of the credentials file.  If they are not 0600 an
  # error message is displayed and RubyGems aborts.

  def check_credentials_permissions
    return if Gem.win_platform? # windows doesn't write 0600 as 0600
    return unless File.exist? credentials_path

    existing_permissions = File.stat(credentials_path).mode & 0o777

    return if existing_permissions == 0o600

    alert_error <<-ERROR
Your gem push credentials file located at:

\t#{credentials_path}

has file permissions of 0#{existing_permissions.to_s 8} but 0600 is required.

To fix this error run:

\tchmod 0600 #{credentials_path}

You should reset your credentials at:

\thttps://rubygems.org/profile/edit

if you believe they were disclosed to a third party.
    ERROR

    terminate_interaction 1
  end

  ##
  # Location of RubyGems.org credentials

  def credentials_path
    credentials = File.join Gem.user_home, ".gem", "credentials"
    if File.exist? credentials
      credentials
    else
      File.join Gem.data_home, "gem", "credentials"
    end
  end

  def load_api_keys
    check_credentials_permissions

    @api_keys = if File.exisrubygems/rubygems/rdoc.rb000064400000000350150403134220011502 0ustar00pecific host's API key to +api_key+

  def set_api_key(host, api_key)
    check_credentials_permissions

    config = load_file(credentials_path).merge(host => api_key)

    dirname = File.dirname credentials_path
    require "fileurubygems/rubygems/available_set.rb000064400000006016150403134220013353 0ustar00doesn't contain valid YAML hash"
        return {}
      else
        return config
      end
    rescue *yaml_errors => e
      warn "Failed to load #{filename}, #{e}"
    rescue Errno::EACCES
      warn "Failed to load #{filename} due to permissions problem."
    end

    {}
  end

  # True if the backtrace option has been specified, or debug is on.
  def backtrace
    @backtrace || $DEBUG
  end

  # Check state file is writable. Creates empty file if not present to ensure we can write to it.
  def state_file_writable?
    if File.exist?(state_file_name)
      File.writable?(state_file_name)
    else
      require "fileutils"
      FileUtils.mkdir_p File.dirname(state_file_name)
      File.open(state_file_name, "w") {}
      true
    end
  rescue Errno::EACCES
    false
  end

  # The name of the configuration file.
  def config_file_name
    @config_file_name || Gem.config_file
  end

  # The name of the state file.
  def state_file_name
    Gem.state_file
  end

  # Reads time of last update check from state file
  def last_update_check
    if File.readable?(state_file_name)
      File.read(state_file_name).to_i
    else
      0
    end
  end

  # Writes time of last update check to state file
  def last_update_check=(timestamp)
    File.write(state_file_name, timestamp.to_s) if state_file_writable?
  end

  # Delegates to @hash
  def each(&block)
    hash = @hash.dup
    hash.delete :update_sources
    hash.delete :verbose
    hash.delete :backtrace
    hash.delete :bulk_threshold

    yield :update_sources, @update_sources
    yield :verbose, @verbose
    yield :backtrace, @backtrace
    yield :bulk_threshold, @bulk_threshold

    yield "config_file_name", @config_file_name if @config_file_name

    hash.each(&block)
  end

  # Handle the command arguments.
  def handle_arguments(arg_list)
    @args = []

    arg_list.each do |arg|
      case arg
      when /^--(backtrace|traceback)$/ then
        @backtrace = true
      when /^--debug$/ then
        $DEBUG = true

        warn "NOTE:  Debugging mode prints all exceptions even when rescued"
      else
        @args << arg
      end
    end
  end

  # Really verbose mode gives you extra output.
  def really_verbose
    case verbose
    when true, false, nil then
      false
    else
      true
    end
  end

  # to_yaml only overwrites things you can't override on the command line.
  def to_yaml # :nodoc:
    yaml_hash = {}
    yaml_hash[:backtrace] = @hash.fetch(:backtrace, DEFAULT_BACKTRACE)
    yaml_hash[:bulk_threshold] = @hash.fetch(:bulk_threshold, DEFAULT_BULK_THRESHOLD)
    yaml_hash[:sources] = Gem.sources.to_a
    yaml_hash[:update_sources] = @hash.fetch(:update_sources, DEFAULT_UPDATE_SOURCES)
    yaml_hash[:verbose] = @hash.fetch(:verbose, DEFAULT_VERBOSITY)

    yaml_hash[:concurrent_downloads] =
      @hash.fetch(:concurrent_downloads, DEFAULT_CONCURRENT_DOWNLOADS)

    yaml_hash[:install_extension_in_lib] =
      @hash.fetch(:install_extension_in_lib, DEFAULT_INSTALL_EXTENSION_IN_LIB)

    yaml_hash[:ssl_verify_mode] =
      @hash[:ssl_verify_mode] if @hash.keyrubygems/rubygems/optparse.rb000064400000000110150403134220012402 0ustar00reshold == other.bulk_threshold &&
      @verbose == other.verbose &&
  rubygems/rubygems/installer_uninstaller_utils.rb000064400000001405150403134220016412 0ustar00_a?(String)
        if v.match?(/\A:(.*)\Z/)
          v[1..-1].to_sym
        elsif v.match?(/\A[+-]?\d+\Z/)
          v.to_i
        elsif v.match?(/\Atrue|false\Z/)
          v == "true"
        elsif v.empty?
          nil
        else
          v
        end
      elsif v.empty?
        nil
      elsif v.is_a?(Hash)
        deep_transform_config_keys!(v)
      else
        v
      end
    end

    config
  end

  def set_config_file_name(args)
    @config_file_name = ENV["GEMRC"]
    need_config_file_name = false

    args.each do |arg|
      if need_config_file_name
        @config_file_name = arg
        need_config_file_name = false
      elsif arg =~ /^--config-file=(.*)/
        @config_file_name = $1
      elsif /^--config-file$/.match?(arg)
        nerubygems/rubygems/exceptions.rb000064400000016534150403134220012747 0ustar00# frozen_string_literal: true

require_relative "../rubygems"
require_relative "request"
require_relative "request/connection_pools"
require_relative "s3_uri_signer"
require_relative "uri_formatter"
require_relative "uri"
require_relative "user_interaction"

##
# RemoteFetcher handles the details of fetching gems and gem information from
# a remote source.

class Gem::RemoteFetcher
  include Gem::UserInteraction

  ##
  # A FetchError exception wraps up the various possible IO and HTTP failures
  # that could happen while downloading from the internet.

  class FetchError < Gem::Exception
    ##
    # The URI which was being accessed when the exception happened.

    attr_accessor :uri, :original_uri

    def initialize(message, uri)
      uri = Gem::Uri.new(uri)

      super uri.redact_credentials_from(message)

      @original_uri = uri.to_s
      @uri = uri.redacted.to_s
    end

    def to_s # :nodoc:
      "#{super} (#{uri})"
    end
  end

  ##
  # A FetchError that indicates that the reason for not being
  # able to fetch data was that the host could not be contacted

  class UnknownHostError < FetchError
  end
  deprecate_constant(:UnknownHostError)

  @fetcher = nil

  ##
  # Cached RemoteFetcher instance.

  def self.fetcher
    @fetcher ||= new Gem.configuration[:http_proxy]
  end

  attr_accessor :headers

  ##
  # Initialize a remote fetcher using the source URI and possible proxy
  # information.
  #
  # +proxy+
  # * [String]: explicit specification of proxy; overrides any environment
  #             variable setting
  # * nil: respect environment variables (HTTP_PROXY, HTTP_PROXY_USER,
  #        HTTP_PROXY_PASS)
  # * <tt>:no_proxy</tt>: ignore environment variables and _don't_ use a proxy
  #
  # +headers+: A set of additional HTTP headers to be sent to the server when
  #            fetching the gem.

  def initialize(proxy=nil, dns=nil, headers={})
    require_relative "core_ext/tcpsocket_init" if Gem.configuration.ipv4_fallback_enabled
    require_relative "vendored_net_http"
    require_relative "vendor/uri/lib/uri"

    Socket.do_not_reverse_lookup = true

    @proxy = proxy
    @pools = {}
    @pool_lock = Thread::Mutex.new
    @cert_files = Gem::Request.get_cert_files

    @headers = headers
  end

  ##
  # Given a name and requirement, downloads this gem into cache and returns the
  # filename. Returns nil if the gem cannot be located.
  #--
  # Should probably be integrated with #download below, but that will be a
  # larger, more encompassing effort. -erikh

  def download_to_cache(dependency)
    found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dependency

    return if found.empty?

    spec, source = found.max_by {|(s,_)| s.version }

    download spec, source.uri
  end

  ##
  # Moves the gem +spec+ from +source_uri+ to the cache dir unless it is
  # already there.  If the source_uri is local the gem cache dir copy is
  # always replaced.

  def download(spec, source_uri, install_dir = Gem.dir)
    install_cache_dir = File.join install_dir, "cache"
    cache_dir =
      if Dir.pwd == install_dir # see fetch_command
        install_dir
      elsif File.writable?(install_cache_dir) || (File.writable?(install_dir) && !File.exist?(install_cache_dir))
        install_cache_dir
      else
        File.join Gem.user_dir, "cache"
      end

    gem_file_name = File.basename spec.cache_file
    local_gem_path = File.join cache_dir, gem_file_name

    require "fileutils"
    begin
      FileUtils.mkdir_p cache_dir
    rescue StandardError
      nil
    end unless File.exist? cache_dir

    source_uri = Gem::Uri.new(source_uri)

    scheme = source_uri.scheme

    # Gem::URI.parse gets confused by MS Windows paths with forward slashes.
    scheme = nil if /^[a-z]$/i.match?(scheme)

    # REFACTOR: split this up and dispatch on scheme (eg download_http)
    # REFACTOR: be sure to clean up fake fetcher when you do this... cleaner
    case scheme
    when "http", "https", "s3" then
      unless File.exist? local_gem_path
        begin
          verbose "Downloading gem #{gem_file_name}"

          remote_gem_path = source_uri + "gems/#{gem_file_name}"

          cache_update_path remote_gem_path, local_gem_path
        rescue FetchError
          raise if spec.original_platform == spec.platform

          alternate_name = "#{spec.original_name}.gem"

          verbose "Failed, downloading gem #{alternate_name}"

          remote_gem_path = source_uri + "gems/#{alternate_name}"

          cache_update_path remote_gem_path, local_gem_path
        end
      end
    when "file" then
      begin
        path = source_uri.path
        path = File.dirname(path) if File.extname(path) == ".gem"

        remote_gem_path = Gem::Util.correct_for_windows_path(File.join(path, "gems", gem_file_name))

        FileUtils.cp(remote_gem_path, local_gem_path)
      rescue Errno::EACCES
        local_gem_path = source_uri.to_s
      end

      verbose "Using local gem #{local_gem_path}"
    when nil then # TODO: test for local overriding cache
      source_path = if Gem.win_platform? && source_uri.scheme &&
                       !source_uri.path.include?(":")
        "#{source_uri.scheme}:#{source_uri.path}"
      else
        source_uri.path
      end

      source_path = Gem::UriFormatter.new(source_path).unescape

      begin
        FileUtils.cp source_path, local_gem_path unless
          File.identical?(source_path, local_gem_path)
      rescue Errno::EACCES
        local_gem_path = source_uri.to_s
      end

      verbose "Using local gem #{local_gem_path}"
    else
      raise ArgumentError, "unsupported URI scheme #{source_uri.scheme}"
    end

    local_gem_path
  end

  ##
  # File Fetcher. Dispatched by +fetch_path+. Use it instead.

  def fetch_file(uri, *_)
    Gem.read_binary Gem::Util.correct_for_windows_path uri.path
  end

  ##
  # HTTP Fetcher. Dispatched by +fetch_path+. Use it instead.

  def fetch_http(uri, last_modified = nil, head = false, depth = 0)
    fetch_type = head ? Gem::Net::HTTP::Head : Gem::Net::HTTP::Get
    response   = request uri, fetch_type, last_modified do |req|
      headers.each {|k,v| req.add_field(k,v) }
    end

    case response
    when Gem::Net::HTTPOK, Gem::Net::HTTPNotModified then
      response.uri = uri
      head ? response : response.body
    when Gem::Net::HTTPMovedPermanently, Gem::Net::HTTPFound, Gem::Net::HTTPSeeOther,
         Gem::Net::HTTPTemporaryRedirect then
      raise FetchError.new("too many redirects", uri) if depth > 10

      unless location = response["Location"]
        raise FetchError.new("redirecting but no redirect location was given", uri)
      end
      location = Gem::Uri.new location

      if https?(uri) && !https?(location)
        raise FetchError.new("redirecting to non-https resource: #{location}", uri)
      end

      fetch_http(location, last_modified, head, depth + 1)
    else
      raise FetchError.new("bad response #{response.message} #{response.code}", uri)
    end
  end

  alias_method :fetch_https, :fetch_http

  ##
  # Downloads +uri+ and returns it as a String.

  def fetch_path(uri, mtime = nil, head = false)
    uri = Gem::Uri.new uri

    unless uri.scheme
      raise ArgumentError, "uri scheme is invalid: #{uri.scheme.inspect}"
    end

    data = send "fetch_#{uri.scheme}", uri, mtime, head

    if data && !head && uri.to_s.end_with?(".gz")
      begin
        data = Gem::Util.gunzip data
      rescue Zlib::GzipFile::Error
        raise FetchError.new("server did norubygems/rubygems/installer.rb000064400000066355150403134220012571 0ustar00ew(uri)
  end

  ##
  # Downloads +uri+ to +path+ if necessary. If no path is given, it just
  # passes the data.

  def cache_update_path(uri, path = nil, update = true)
    mtime = begin
              path && File.stat(path).mtime
            rescue StandardError
              nil
            end

    data = fetch_path(uri, mtime)

    if data.nil? # indicates the server returned 304 Not Modified
      return Gem.read_binary(path)
    end

    if update && path
      Gem.write_binary(path, data)
    end

    data
  end

  ##
  # Performs a Gem::Net::HTTP request of type +request_class+ on +uri+ returning
  # a Gem::Net::HTTP response object.  request maintains a table of persistent
  # connections to reduce connect overhead.

  def request(uri, request_class, last_modified = nil)
    proxy = proxy_for @proxy, uri
    pool  = pools_for(proxy).pool_for uri

    request = Gem::Request.new uri, request_class, last_modified, pool

    request.fetch do |req|
      yield req if block_given?
    end
  end

  def https?(uri)
    uri.scheme.casecmp("https").zero?
  end

  def close_all
    @pools.each_value(&:close_all)
  end

  private

  def proxy_for(proxy, uri)
    Gem::Request.proxy_uri(proxy || Gem::Request.get_proxy_from_env(uri.scheme))
  end

  def pools_for(proxy)
    @pool_lock.synchronize do
      @pools[proxy] ||= Gem::Request::ConnectionPools.new proxy, @cert_files
    end
  end
end
rubygems/rubygems/requirement.rb000064400000016202150403134220013116 0ustar00# frozen_string_literal: true

require_relative "version"

##
# A Requirement is a set of one or more version restrictions. It supports a
# few (<tt>=, !=, >, <, >=, <=, ~></tt>) different restriction operators.
#
# See Gem::Version for a description on how versions and requirements work
# together in RubyGems.

class Gem::Requirement
  OPS = { # :nodoc:
    "=" => lambda {|v, r| v == r },
    "!=" => lambda {|v, r| v != r },
    ">" => lambda {|v, r| v > r },
    "<" => lambda {|v, r| v < r },
    ">=" => lambda {|v, r| v >= r },
    "<=" => lambda {|v, r| v <= r },
    "~>" => lambda {|v, r| v >= r && v.release < r.bump },
  }.freeze

  SOURCE_SET_REQUIREMENT = Struct.new(:for_lockfile).new "!" # :nodoc:

  quoted = Regexp.union(OPS.keys)
  PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Gem::Version::VERSION_PATTERN})\\s*".freeze # :nodoc:

  ##
  # A regular expression that matches a requirement

  PATTERN = /\A#{PATTERN_RAW}\z/

  ##
  # The default requirement matches any non-prerelease version

  DefaultRequirement = [">=", Gem::Version.new(0)].freeze

  ##
  # The default requirement matches any version

  DefaultPrereleaseRequirement = [">=", Gem::Version.new("0.a")].freeze

  ##
  # Raised when a bad requirement is encountered

  class BadRequirementError < ArgumentError; end

  ##
  # Factory method to create a Gem::Requirement object.  Input may be
  # a Version, a String, or nil.  Intended to simplify client code.
  #
  # If the input is "weird", the default version requirement is
  # returned.

  def self.create(*inputs)
    return new inputs if inputs.length > 1

    input = inputs.shift

    case input
    when Gem::Requirement then
      input
    when Gem::Version, Array then
      new input
    when "!" then
      source_set
    else
      if input.respond_to? :to_str
        new [input.to_str]
      else
        default
      end
    end
  end

  def self.default
    new ">= 0"
  end

  def self.default_prerelease
    new ">= 0.a"
  end

  ###
  # A source set requirement, used for Gemfiles and lockfiles

  def self.source_set # :nodoc:
    SOURCE_SET_REQUIREMENT
  end

  ##
  # Parse +obj+, returning an <tt>[op, version]</tt> pair. +obj+ can
  # be a String or a Gem::Version.
  #
  # If +obj+ is a String, it can be either a full requirement
  # specification, like <tt>">= 1.2"</tt>, or a simple version number,
  # like <tt>"1.2"</tt>.
  #
  #     parse("> 1.0")                 # => [">", Gem::Version.new("1.0")]
  #     parse("1.0")                   # => ["=", Gem::Version.new("1.0")]
  #     parse(Gem::Version.new("1.0")) # => ["=,  Gem::Version.new("1.0")]

  def self.parse(obj)
    return ["=", obj] if Gem::Version === obj

    unless PATTERN =~ obj.to_s
      raise BadRequirementError, "Illformed requirement [#{obj.inspect}]"
    end
    op = -($1 || "=")
    version = -$2

    if op == ">=" && version == "0"
      DefaultRequirement
    elsif op == ">=" && version == "0.a"
      DefaultPrereleaseRequirement
    else
      [op, Gem::Version.new(version)]
    end
  end

  ##
  # An array of requirement pairs. The first element of the pair is
  # the op, and the second is the Gem::Version.

  attr_reader :requirements # :nodoc:

  ##
  # Constructs a requirement from +requirements+. Requirements can be
  # Strings, Gem::Versions, or Arrays of those. +nil+ and duplicate
  # requirements are ignored. An empty set of +requirements+ is the
  # same as <tt>">= 0"</tt>.

  def initialize(*requirements)
    requirements = requirements.flatten
    requirements.compact!
    requirements.uniq!

    if requirements.empty?
      @requirements = [DefaultRequirement]
    else
      @requirements = requirements.map! {|r| self.class.parse r }
    end
  end

  ##
  # Concatenates the +new+ requirements onto this requirement.

  def concat(new)
    new = new.flatten
    new.compact!
    new.uniq!
    new = new.map {|r| self.class.parse r }

    @requirements.concat new
  end

  ##
  # Formats this requirement for use in a Gem::RequestSet::Lockfile.

  def for_lockfile # :nodoc:
    return if @requirements == [DefaultRequirement]

    list = requirements.sort_by do |_, version|
      version
    end.map do |op, version|
      "#{op} #{version}"
    end.uniq

    " (#{list.join ", "})"
  end

  ##
  # true if this gem has no requirements.

  def none?
    if @requirements.size == 1
      @requirements[0] == DefaultRequirement
    else
      false
    end
  end

  ##
  # true if the requirement is for only an exact version

  def exact?
    return false unless @requirements.size == 1
    @requirements[0][0] == "="
  end

  def as_list # :nodoc:
    requirements.map {|op, version| "#{op} #{version}" }
  end

  def hash # :nodoc:
    requirements.map {|r| r.first == "~>" ? [r[0], r[1].to_s] : r }.sort.hash
  end

  def marshal_dump # :nodoc:
    [@requirements]
  end

  def marshal_load(array) # :nodoc:
    @requirements = array[0]

    raise TypeError, "wrong @requirements" unless Array === @requirements &&
                                                  @requirements.all? {|r| r.size == 2 && (r.first.is_a?(String) || r[0] = "=") && r.last.is_a?(Gem::Version) }
  end

  def yaml_initialize(tag, vals) # :nodoc:
    vals.each do |ivar, val|
      instance_variable_set "@#{ivar}", val
    end
  end

  def init_with(coder) # :nodoc:
    yaml_initialize coder.tag, coder.map
  end

  def encode_with(coder) # :nodoc:
    coder.add "requirements", @requirements
  end

  ##
  # A requirement is a prerelease if any of the versions inside of it
  # are prereleases

  def prerelease?
    requirements.any? {|r| r.last.prerelease? }
  end

  def pretty_print(q) # :nodoc:
    q.group 1, "Gem::Requirement.new(", ")" do
      q.pp as_list
    end
  end

  ##
  # True if +version+ satisfies this Requirement.

  def satisfied_by?(version)
    raise ArgumentError, "Need a Gem::Version: #{version.inspect}" unless
      Gem::Version === version
    requirements.all? {|op, rv| OPS.fetch(op).call version, rv }
  end

  alias_method :===, :satisfied_by?
  alias_method :=~, :satisfied_by?

  ##
  # True if the requirement will not always match the latest version.

  def specific?
    return true if @requirements.length > 1 # GIGO, > 1, > 2 is silly

    !%w[> >=].include? @requirements.first.first # grab the operator
  end

  def to_s # :nodoc:
    as_list.join ", "
  end

  def ==(other) # :nodoc:
    return unless Gem::Requirement === other

    # An == check is always necessary
    return false unless _sorted_requirements == other._sorted_requirements

    # An == check is sufficient unless any requirements use ~>
    return true unless _tilde_requirements.any?

    # If any requirements use ~> we use the stricter `#eql?` that also checks
    # that version precision is the same
    _tilde_requirements.eql?(other._tilde_requirements)
  end

  protected

  def _sorted_requirements
    @_sorted_requirements ||= requirements.sort_by(&:to_s)
  end

  def _tilde_requirements
    @_tilde_requirements ||= _sorted_requirements.select {|r| r.first == "~>" }
  end

  def initialize_copy(other) # :nodoc:
    @requirements = other.requirements.dup
    super
  end
end

class Gem::Version
  # This is needed for compatibility with older yaml
  # gemspecs.

  Requirement = Gem::Requirement # :nodoc:
end
rubygems/rubygems/rdoc.rb000064400000001224150403134220011503 0ustar00# frozen_string_literal: true

require_relative "../rubygems"

begin
  require "rdoc/rubygems_hook"
  module Gem
    ##
    # Returns whether RDoc defines its own install hooks through a RubyGems
    # plugin. This and whatever is guarded by it can be removed once no
    # supported Ruby ships with RDoc older than 6.9.0.

    def self.rdoc_hooks_defined_via_plugin?
      Gem::Version.new(::RDoc::VERSION) >= Gem::Version.new("6.9.0")
    end

    if rdoc_hooks_defined_via_plugin?
      RDoc = ::RDoc::RubyGemsHook
    else
      RDoc = ::RDoc::RubygemsHook

      Gem.done_installing(&Gem::RDoc.method(:generation_hook))
    end
  end
rescue LoadError
end
rubygems/rubygems/available_set.rb000064400000006003150403134220013347 0ustar00# frozen_string_literal: true

class Gem::AvailableSet
  include Enumerable

  Tuple = Struct.new(:spec, :source)

  attr_accessor :remote # :nodoc:

  def initialize
    @set = []
    @sorted = nil
    @remote = true
  end

  attr_reader :set

  def add(spec, source)
    @set << Tuple.new(spec, source)
    @sorted = nil
    self
  end

  def <<(o)
    case o
    when Gem::AvailableSet
      s = o.set
    when Array
      s = o.map do |sp,so|
        if !sp.is_a?(Gem::Specification) || !so.is_a?(Gem::Source)
          raise TypeError, "Array must be in [[spec, source], ...] form"
        end

        Tuple.new(sp,so)
      end
    else
      raise TypeError, "must be a Gem::AvailableSet"
    end

    @set += s
    @sorted = nil

    self
  end

  ##
  # Yields each Tuple in this AvailableSet

  def each
    return enum_for __method__ unless block_given?

    @set.each do |tuple|
      yield tuple
    end
  end

  ##
  # Yields the Gem::Specification for each Tuple in this AvailableSet

  def each_spec
    return enum_for __method__ unless block_given?

    each do |tuple|
      yield tuple.spec
    end
  end

  def empty?
    @set.empty?
  end

  def all_specs
    @set.map(&:spec)
  end

  def match_platform!
    @set.reject! {|t| !Gem::Platform.match_spec?(t.spec) }
    @sorted = nil
    self
  end

  def sorted
    @sorted ||= @set.sort do |a,b|
      i = b.spec <=> a.spec
      i != 0 ? i : (a.source <=> b.source)
    end
  end

  def size
    @set.size
  end

  def source_for(spec)
    f = @set.find {|t| t.spec == spec }
    f.source
  end

  ##
  # Converts this AvailableSet into a RequestSet that can be used to install
  # gems.
  #
  # If +development+ is :none then no development dependencies are installed.
  # Other options are :shallow for only direct development dependencies of the
  # gems in this set or :all for all development dependencies.

  def to_request_set(development = :none)
    request_set = Gem::RequestSet.new
    request_set.development = development == :all

    each_spec do |spec|
      request_set.always_install << spec

      request_set.gem spec.name, spec.version
      request_set.import spec.development_dependencies if
        development == :shallow
    end

    request_set
  end

  ##
  #
  # Used by the Resolver, the protocol to use a AvailableSet as a
  # search Set.

  def find_all(req)
    dep = req.dependency

    match = @set.find_all do |t|
      dep.match? t.spec
    end

    match.map do |t|
      Gem::Resolver::LocalSpecification.new(self, t.spec, t.source)
    end
  end

  def prefetch(reqs)
  end

  def pick_best!
    return self if empty?

    @set = [sorted.first]
    @sorted = nil
    self
  end

  def remove_installed!(dep)
    @set.reject! do |_t|
      # already locally installed
      Gem::Specification.any? do |installed_spec|
        dep.name == installed_spec.name &&
          dep.requirement.satisfied_by?(installed_spec.version)
      end
    end

    @sorted = nil
    self
  end

  def inject_into_list(dep_list)
    @set.each {|t| dep_list.add t.spec }
  end
end
rubygems/rubygems/optparse.rb000064400000000110150403134220012402 0ustar00dler is under the following license.

  >>>
    Portions copyright (c) 2rubygems/rubygems/installer_uninstaller_utils.rb000064400000001403150403134220016410 0ustar00# frozen_string_literal: true

##
# Helper methods for both Gem::Installer and Gem::Uninstaller

module Gem::InstallerUninstallerUtils
  def regenerate_plugins_for(spec, plugins_dir)
    plugins = spec.plugins
    return if plugins.empty?

    require "pathname"

    spec.plugins.each do |plugin|
      plugin_script_path = File.join plugins_dir, "#{spec.name}_plugin#{File.extname(plugin)}"

      File.open plugin_script_path, "wb" do |file|
        file.puts "require_relative '#{Pathname.new(plugin).relative_path_from(Pathname.new(plugins_dir))}'"
      end

      verbose plugin_script_path
    end
  end

  def remove_plugins_for(spec, plugins_dir)
    FileUtils.rm_f Gem::Util.glob_files_in_dir("#{spec.name}#{Gem.plugin_suffix_pattern}", plugins_dir)
  end
end
rubygems/rubygems/exceptions.rb000064400000016202150403134220012737 0ustar00# frozen_string_literal: true

require_relative "deprecate"
require_relative "unknown_command_spell_checker"

##
# Base exception class for RubyGems.  All exception raised by RubyGems are a
# subclass of this one.
class Gem::Exception < RuntimeError; end

class Gem::CommandLineError < Gem::Exception; end

class Gem::UnknownCommandError < Gem::Exception
  attr_reader :unknown_command

  def initialize(unknown_command)
    self.class.attach_correctable

    @unknown_command = unknown_command
    super("Unknown command #{unknown_command}")
  end

  def self.attach_correctable
    return if defined?(@attached)

    if defined?(DidYouMean::SPELL_CHECKERS) && defined?(DidYouMean::Correctable)
      if DidYouMean.respond_to?(:correct_error)
        DidYouMean.correct_error(Gem::UnknownCommandError, Gem::UnknownCommandSpellChecker)
      else
        DidYouMean::SPELL_CHECKERS["Gem::UnknownCommandError"] =
          Gem::UnknownCommandSpellChecker

        prepend DidYouMean::Correctable
      end
    end

    @attached = true
  end
end

class Gem::DependencyError < Gem::Exception; end

class Gem::DependencyRemovalException < Gem::Exception; end

##
# Raised by Gem::Resolver when a Gem::Dependency::Conflict reaches the
# toplevel.  Indicates which dependencies were incompatible through #conflict
# and #conflicting_dependencies

class Gem::DependencyResolutionError < Gem::DependencyError
  attr_reader :conflict

  def initialize(conflict)
    @conflict = conflict
    a, b = conflicting_dependencies

    super "conflicting dependencies #{a} and #{b}\n#{@conflict.explanation}"
  end

  def conflicting_dependencies
    @conflict.conflicting_dependencies
  end
end

##
# Raised when attempting to uninstall a gem that isn't in GEM_HOME.

class Gem::GemNotInHomeException < Gem::Exception
  attr_accessor :spec
end

###
# Raised when removing a gem with the uninstall command fails

class Gem::UninstallError < Gem::Exception
  attr_accessor :spec
end

class Gem::DocumentError < Gem::Exception; end

##
# Potentially raised when a specification is validated.
class Gem::EndOfYAMLException < Gem::Exception; end

##
# Signals that a file permission error is preventing the user from
# operating on the given directory.

class Gem::FilePermissionError < Gem::Exception
  attr_reader :directory

  def initialize(directory)
    @directory = directory

    super "You don't have write permissions for the #{directory} directory."
  end
end

##
# Used to raise parsing and loading errors
class Gem::FormatException < Gem::Exception
  attr_accessor :file_path
end

class Gem::GemNotFoundException < Gem::Exception; end

class Gem::SpecificGemNotFoundException < Gem::GemNotFoundException
  ##
  # Creates a new SpecificGemNotFoundException for a gem with the given +name+
  # and +version+.  Any +errors+ encountered when attempting to find the gem
  # are also stored.

  def initialize(name, version, errors=nil)
    super "Could not find a valid gem '#{name}' (#{version}) locally or in a repository"

    @name = name
    @version = version
    @errors = errors
  end

  ##
  # The name of the gem that could not be found.

  attr_reader :name

  ##
  # The version of the gem that could not be found.

  attr_reader :version

  ##
  # Errors encountered attempting to find the gem.

  attr_reader :errors
end

Gem.deprecate_constant :SpecificGemNotFoundException

##
# Raised by Gem::Resolver when dependencies conflict and create the
# inability to find a valid possible spec for a request.

class Gem::ImpossibleDependenciesError < Gem::Exception
  attr_reader :conflicts
  attr_reader :request

  def initialize(request, conflicts)
    @request   = request
    @conflicts = conflicts

    super build_message
  end

  def build_message # :nodoc:
    requester  = @request.requester
    requester  = requester ? requester.spec.full_name : "The user"
    dependency = @request.dependency

    message = "#{requester} requires #{dependency} but it conflicted:\n".dup

    @conflicts.each do |_, conflict|
      message << conflict.explanation
    end

    message
  end

  def dependency
    @request.dependency
  end
end

class Gem::InstallError < Gem::Exception; end

class Gem::RuntimeRequirementNotMetError < Gem::InstallError
  attr_accessor :suggestion
  def message
    [suggestion, super].compact.join("\n\t")
  end
end

##
# Potentially raised when a specification is validated.
class Gem::InvalidSpecificationException < Gem::Exception; end

class Gem::OperationNotSupportedError < Gem::Exception; end

##
# Signals that a remote operation cannot be conducted, probably due to not
# being connected (or just not finding host).
#--
# TODO: create a method that tests connection to the preferred gems server.
# All code dealing with remote operations will want this.  Failure in that
# method should raise this error.
class Gem::RemoteError < Gem::Exception; end

class Gem::RemoteInstallationCancelled < Gem::Exception; end

class Gem::RemoteInstallationSkipped < Gem::Exception; end

##
# Represents an error communicating via HTTP.
class Gem::RemoteSourceException < Gem::Exception; end

##
# Raised when a gem dependencies file specifies a ruby version that does not
# match the current version.

class Gem::RubyVersionMismatch < Gem::Exception; end

##
# Raised by Gem::Validator when something is not right in a gem.

class Gem::VerificationError < Gem::Exception; end

##
# Raised by Gem::WebauthnListener when an error occurs during security
# device verification.

class Gem::WebauthnVerificationError < Gem::Exception
  def initialize(message)
    super "Security device verification failed: #{message}"
  end
end

##
# Raised to indicate that a system exit should occur with the specified
# exit_code

class Gem::SystemExitException < SystemExit
  ##
  # The exit code for the process

  alias_method :exit_code, :status

  ##
  # Creates a new SystemExitException with the given +exit_code+

  def initialize(exit_code)
    super exit_code, "Exiting RubyGems with exit_code #{exit_code}"
  end
end

##
# Raised by Resolver when a dependency requests a gem for which
# there is no spec.

class Gem::UnsatisfiableDependencyError < Gem::DependencyError
  ##
  # The unsatisfiable dependency.  This is a
  # Gem::Resolver::DependencyRequest, not a Gem::Dependency

  attr_reader :dependency

  ##
  # Errors encountered which may have contributed to this exception

  attr_accessor :errors

  ##
  # Creates a new UnsatisfiableDependencyError for the unsatisfiable
  # Gem::Resolver::DependencyRequest +dep+

  def initialize(dep, platform_mismatch=nil)
    if platform_mismatch && !platform_mismatch.empty?
      plats = platform_mismatch.map {|x| x.platform.to_s }.sort.uniq
      super "Unable to resolve dependency: No match for '#{dep}' on this platform. Found: #{plats.join(", ")}"
    else
      if dep.explicit?
        super "Unable to resolve dependency: user requested '#{dep}'"
      else
        super "Unable to resolve dependency: '#{dep.request_context}' requires '#{dep}'"
      end
    end

    @dependency = dep
    @errors     = []
  end

  ##
  # The name of the unresolved dependency

  def name
    @dependency.name
  end

  ##
  # The Requirement of the unresolved dependency (not Version).

  def version
    @dependency.requirement
  end
end
rubygems/rubygems/installer.rb000064400000067363150403134220012571 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "installer_uninstaller_utils"
require_relative "exceptions"
require_relative "deprecate"
require_relative "package"
require_relative "ext"
require_relative "user_interaction"

##
# The installer installs the files contained in the .gem into the Gem.home.
#
# Gem::Installer does the work of putting files in all the right places on the
# filesystem including unpacking the gem into its gem dir, installing the
# gemspec in the specifications dir, storing the cached gem in the cache dir,
# and installing either wrappers or symlinks for executables.
#
# The installer invokes pre and post install hooks.  Hooks can be added either
# through a rubygems_plugin.rb file in an installed gem or via a
# rubygems/defaults/#{RUBY_ENGINE}.rb or rubygems/defaults/operating_system.rb
# file.  See Gem.pre_install and Gem.post_install for details.

class Gem::Installer
  extend Gem::Deprecate

  ##
  # Paths where env(1) might live.  Some systems are broken and have it in
  # /bin

  ENV_PATHS = %w[/usr/bin/env /bin/env].freeze

  ##
  # Deprecated in favor of Gem::Ext::BuildError
rubygems/rubygems/install_default_message.rb000064400000000535150403134230015437 0ustar00ate for that missing require.
    #
    # TODO: Remove when rubygems no longer supports running on bundler older
    # than 2.2.29.

    def inherited(klass)
      if klass.name == "Bundler::RubyGemsGemInstaller"
        require "rubygems/command"
      end

      super(klass)
    end

    ##
    # Overrides the executable format.
    #
    # Thisrubygems/rubygems/security.rb000064400000053714150403134230012437 0ustar00    attr_accessor :data_mode

    def initialize(spec)
      @spec = spec
    end

    def extract_files(destination_dir, pattern = "*")
      FileUtils.mkdir_p destination_dir

      spec.files.each do |file|
        file = File.join destination_dir, file
        next if File.exist? file
        FileUtils.mkdir_p File.dirname(file)
        File.open file, "w" do |fp|
          fp.puts "# #{file}"
        end
      end
    end

    def copy_to(path)
    end
  end

  ##
  # Construct an installer object for an ephemeral gem (one where we don't
  # actually have a .gem file, just a spec)

  def self.for_spec(spec, options = {})
    # FIXME: we should have a real Package class for this
    new FakePackage.new(spec), options
  end

  ##
  # Constructs an Installer instance that will install the gem at +package+ which
  # can either be a path or an instance of Gem::Package.  +options+ is a Hash
  # with the following keys:
  #
  # :bin_dir:: Where to put a bin wrapper if needed.
  # :development:: Whether or not development dependencies should be installed.
  # :env_shebang:: Use /usr/bin/env in bin wrappers.
  # :force:: Overrides all version checks and security policy checks, except
  #          for a signed-gems-only policy.
  # :format_executable:: Format the executable the same as the Ruby executable.
  #                      If your Ruby is ruby18, foo_exec will be installed as
  #                      foo_exec18.
  # :ignore_dependencies:: Don't raise if a dependency is missing.
  # :install_dir:: The directory to install the gem into.
  # :security_policy:: Use the specified security policy.  See Gem::Security
  # :user_install:: Indicate that the gem should be unpacked into the users
  #                 personal gem directory.
  # :only_install_dir:: Only validate dependencies against what is in the
  #                     install_dir
  # :wrappers:: Install wrappers if true, symlinks if false.
  # :build_args:: An Array of arguments to pass to the extension builder
  #               process. If not set, then Gem::Command.build_args is used
  # :post_install_message:: Print gem post install message if true

  def initialize(package, options={})
    require "fileutils"

    @options = options
    @package = package

    process_options

    @package.dir_mode = options[:dir_mode]
    @package.prog_mode = options[:prog_mode]
    @package.data_mode = options[:data_mode]
  end

  ##
  # Checks if +filename+ exists in +@bin_dir+.
  #
  # If +@force+ is set +filename+ is overwritten.
  #
  # If +filename+ exists and it is a RubyGems wrapper for a different gem, then
  # the user is consulted.
  #
  # If +filename+ exists and +@bin_dir+ is Gem.default_bindir (/usr/local) the
  # user is consulted.
  #
  # Otherwise +filename+ is overwritten.

  def check_executable_overwrite(filename) # :nodoc:
    return if @force

    generated_bin = File.join @bin_dir, formatted_program_filename(filename)

    return unless File.exist? generated_bin

    ruby_executable = false
    existing = nil

    File.open generated_bin, "rb" do |io|
      line = io.gets
      shebang = /^#!.*ruby/o

      # TruffleRuby uses a bash prelude in default launchers
      if load_relative_enabled? || RUBY_ENGINE == "truffleruby"
        until line.nil? || shebang.match?(line) do
          line = io.gets
        end
      end

      next unless line&.match?(shebang)

      io.gets # blankline

      # TODO: detect a specially formatted comment instead of trying
      # to find a string inside Ruby code.
      next unless io.gets&.include?("This file was generated by RubyGems")

      ruby_executable = true
      existing = io.read.slice(/
          ^\s*(
            gem \s |
            load \s Gem\.bin_path\( |
            load \s Gem\.activate_bin_path\(
          )
          (['"])(.*?)(\2),
        /x, 3)
    end

    return if spec.name == existing

    # somebody has written to RubyGems' directory, overwrite, too bad
    return if Gem.default_bindir != @bin_dir && !ruby_executable

    question = "#{spec.name}'s executable \"#{filename}\" conflicts with ".dup

    if ruby_executable
      question << (existing || "an unknown executable")

      return if ask_yes_no "#{question}\nOverwrite the executable?", false

      conflict = "installed executable from #{existing}"
    else
      question << generated_bin

      return if ask_yes_no "#{question}\nOverwrite the executable?", false

      conflict = generated_bin
    end

    raise Gem::InstallError,
      "\"#{filename}\" from #{spec.name} conflicts with #{conflict}"
  end

  ##
  # Lazy accessor for the spec's gem directory.

  def gem_dir
    @gem_dir ||= File.join(gem_home, "gems", spec.full_name)
  end

  ##
  # Lazy accessor for the installer's spec.

  def spec
    @package.spec
  end

  ##
  # Installs the gem and returns a loaded Gem::Specification for the installed
  # gem.
  #
  # The gem will be installed with the following structure:
  #
  #   @gem_home/
  #     cache/<gem-version>.gem #=> a cached copy of the installed gem
  #     gems/<gem-version>/... #=> extracted files
  #     specifications/<gem-version>.gemspec #=> the Gem::Specification

  def install
    pre_install_checks

    run_pre_install_hooks

    # Set loaded_from to ensure extension_dir is correct
    if @options[:install_as_default]
      spec.loaded_from = default_spec_file
    else
      spec.loaded_from = spec_file
    end

    # Completely remove any previous gem files
    FileUtils.rm_rf gem_dir
    FileUtils.rm_rf spec.extension_dir

    dir_mode = options[:dir_mode]
    FileUtils.mkdir_p gem_dir, mode: dir_mode && 0o755

    if @options[:install_as_default]
      extract_bin
      write_default_spec
    else
      extract_files

      build_extensions
      write_build_info_file
      run_post_build_hooks
    end

    generate_bin
    generate_plugins

    unless @options[:install_as_default]
      write_spec
      write_cache_file
    end

    File.chmod(dir_mode, gem_dir) if dir_mode

    say spec.post_install_message if options[:post_install_message] && !spec.post_install_message.nil?

    Gem::Specification.add_spec(spec) unless @install_dir

    load_plugin

    run_post_install_hooks

    spec
  rescue Errno::EACCES => e
    # Permission denied - /path/to/foo
    raise Gem::FilePermissionError, e.message.split(" - ").last
  end

  def run_pre_install_hooks # :nodoc:
    Gem.pre_install_hooks.each do |hook|
      next unless hook.call(self) == false
      location = " at #{$1}" if hook.inspect =~ /[ @](.*:\d+)/

      message = "pre-install hook#{location} failed for #{spec.full_name}"
      raise Gem::InstallError, message
    end
  end

  def run_post_build_hooks # :nodoc:
    Gem.post_build_hooks.each do |hook|
      next unless hook.call(self) == false
      FileUtils.rm_rf gem_dir

      location = " at #{$1}" if hook.inspect =~ /[ @](.*:\d+)/

      message = "post-build hook#{location} failed for #{spec.full_name}"
      raise Gem::InstallError, message
    end
  end

  def run_post_install_hooks # :nodoc:
    Gem.post_install_hooks.each do |hook|
      hook.call self
    end
  end

  ##
  #
  # Return an Array of Specifications contained within the gem_home
  # we'll be installing into.

  def installed_specs
    @installed_specs ||= begin
      specs = []

      Gem::Util.glob_files_in_dir("*.gemspec", File.join(gem_home, "specifications")).each do |path|
        spec = Gem::Specification.load path
        specs << spec if spec
      end

      specs
    end
  end

  ##
  # Ensure that the dependency is satisfied by the current installation of
  # gem.  If it is not an exception is raised.
  #
  # spec       :: Gem::Specification
  # dependency :: Gem::Dependency

  def ensure_dependency(spec, dependency)
    unless installation_satisfies_dependency? dependency
      raise Gem::InstallError, "#{spec.name} requires #{dependency}"
    end
    true
  end

  ##
  # True if the gems in the system satisfy +dependency+.

  def installation_satisfies_dependency?(dependency)
    return true if @options[:development] && dependency.type == :development
    return true if installed_specs.detect {|s| dependency.matches_spec? s }
    return false if @only_install_dir
    !dependency.matching_specs.empty?
  end

  ##
  # Unpacks the gem into the given directory.

  def unpack(directory)
    @gem_dir = directory
    extract_files
  end
  rubygems_deprecate :unpack

  ##
  # The location of the spec file that is installed.
  #

  def spec_file
    File.join gem_home, "specifications", "#{spec.full_name}.gemspec"
  end

  ##
  # The location of the default spec file for default gems.
  #

  def default_spec_file
    File.join gem_home, "specifications", "default", "#{spec.full_name}.gemspec"
  end

  ##
  # Writes the .gemspec specification (in Ruby) to the gem home's
  # specifications directory.

  def write_spec
    spec.installed_by_version = Gem.rubygems_version

    Gem.write_binary(spec_file, spec.to_ruby_for_cache)
  end

  ##
  # Writes the full .gemspec specification (in Ruby) to the gem home's
  # specifications/default directory.
  #
  # In contrast to #write_spec, this keeps file lists, so the `gem contents`
  # command works.

  def write_default_spec
    Gem.write_binary(default_spec_file, spec.to_ruby)
  end

  ##
  # Creates windows .bat files for easy running of commands

  def generate_windows_script(filename, bindir)
    if Gem.win_platform?
      script_name = formatted_program_filename(filename) + ".bat"
      script_path = File.join bindir, File.basename(script_name)
      File.open script_path, "w" do |file|
        file.puts windows_stub_script(bindir, filename)
      end

      verbose script_path
    end
  end

  def generate_bin # :nodoc:
    executables = spec.executables
    return if executables.nil? || executables.empty?

    if @gem_home == Gem.user_dir
      # If we get here, then one of the following likely happened:
      # - `--user-install` was specified
      # - `Gem::PathSupport#home` fell back to `Gem.user_dir`
      # - GEM_HOME was manually set to `Gem.user_dir`

      check_that_user_bin_dir_is_in_path(executables)
    end

    ensure_writable_dir @bin_dir

    executables.each do |filename|
      bin_path = File.join gem_dir, spec.bindir, filename
      next unless File.exist? bin_path

      mode = File.stat(bin_path).mode
      dir_mode = options[:prog_mode] || (mode | 0o111)

      unless dir_mode == mode
        File.chmod dir_mode, bin_path
      end

      check_executable_overwrite filename

      if @wrappers
        generate_bin_script filename, @bin_dir
      else
        generate_bin_symlink filename, @bin_dir
      end
    end
  end

  def generate_plugins # :nodoc:
    latest = Gem::Specification.latest_spec_for(spec.name)
    return if latest && latest.version > spec.version

    ensure_writable_dir @plugins_dir

    if spec.plugins.empty?
      remove_plugins_for(spec, @plugins_dir)
    else
      regenerate_plugins_for(spec, @plugins_dir)
    end
  rescue ArgumentError => e
    raise e, "#{latest.name} #{latest.version} #{spec.name} #{spec.version}: #{e.message}"
  end

  ##
  # Creates the scripts to run the applications in the gem.
  #--
  # The Windows script is generated in addition to the regular one due to a
  # bug or misfeature in the Windows shell's pipe.  See
  # https://blade.ruby-lang.org/ruby-talk/193379

  def generate_bin_script(filename, bindir)
    bin_script_path = File.join bindir, formatted_program_filename(filename)

    Gem.open_file_with_lock(bin_script_path) do
      require "fileutils"
      FileUtils.rm_f bin_script_path # prior install may have been --no-wrappers

      File.open(bin_script_path, "wb", 0o755) do |file|
        file.write app_script_text(filename)
        file.chmod(options[:prog_mode] || 0o755)
      end
    end

    verbose bin_script_path

    generate_windows_script filename, bindir
  end

  ##
  # Creates the symlinks to run the applications in the gem.  Moves
  # the symlink if the gem being installed has a newer version.

  def generate_bin_symlink(filename, bindir)
    src = File.join gem_dir, spec.bindir, filename
    dst = File.join bindir, formatted_program_filename(filename)

    if File.exist? dst
      if File.symlink? dst
        link = File.readlink(dst).split File::SEPARATOR
        cur_version = Gem::Version.create(link[-3].sub(/^.*-/, ""))
        return if spec.version < cur_version
      end
      File.unlink dst
    end

    FileUtils.symlink src, dst, verbose: Gem.configuration.really_verbose
  rescue NotImplementedError, SystemCallError
    alert_warning "Unable to use symlinks, installing wrapper"
    generate_bin_script filename, bindir
  end

  ##
  # Generates a #! line for +bin_file_name+'s wrapper copying arguments if
  # necessary.
  #
  # If the :custom_shebang config is set, then it is used as a template
  # for how to create the shebang used for to run a gem's executables.
  #
  # The template supports 4 expansions:
  #
  #  $env    the path to the unix env utility
  #  $ruby   the path to the currently running ruby interpreter
  #  $exec   the path to the gem's executable
  #  $name   the name of the gem the executable is for
  #

  def shebang(bin_file_name)
    path = File.join gem_dir, spec.bindir, bin_file_name
    first_line = File.open(path, "rb", &:gets) || ""

    if first_line.start_with?("#!")
      # Preserve extra words on shebang line, like "-w".  Thanks RPA.
      shebang = first_line.sub(/\A\#!.*?ruby\S*((\s+\S+)+)/, "#!#{Gem.ruby}")
      opts = $1
      shebang.strip! # Avoid nasty ^M issues.
    end

    if which = Gem.configuration[:custom_shebang]
      # replace bin_file_name with "ruby" to avoid endless loops
      which = which.gsub(/ #{bin_file_name}$/," #{ruby_install_name}")

      which = which.gsub(/\$(\w+)/) do
        case $1
        when "env"
          @env_path ||= ENV_PATHS.find {|env_path| File.executable? env_path }
        when "ruby"
          "#{Gem.ruby}#{opts}"
        when "exec"
          bin_file_name
        when "name"
          spec.name
        end
      end

      "#!#{which}"
    elsif @env_shebang
      # Create a plain shebang line.
      @env_path ||= ENV_PATHS.find {|env_path| File.executable? env_path }
      "#!#{@env_path} #{ruby_install_name}"
    else
      "#{bash_prolog_script}#!#{Gem.ruby}#{opts}"
    end
  end

  ##
  # Ensures the Gem::Specification written out for this gem is loadable upon
  # installation.

  def ensure_loadable_spec
    ruby = spec.to_ruby_for_cache

    begin
      eval ruby
    rescue StandardError, SyntaxError => e
      raise Gem::InstallError,
            "The specification for #{spec.full_name} is corrupt (#{e.class})"
    end
  end

  def ensure_dependencies_met # :nodoc:
    deps = spec.runtime_dependencies
    deps |= spec.development_dependencies if @development

    deps.each do |dep_gem|
      ensure_dependency spec, dep_gem
    end
  end

  def process_options # :nodoc:
    @options = {
      bin_dir: nil,
      env_shebang: false,
      force: false,
      only_install_dir: false,
      post_install_message: true,
    }.merge options

    @env_shebang         = options[:env_shebang]
    @force               = options[:force]
    @install_dir         = options[:install_dir]
    @user_install        = options[:user_install]
    @ignore_dependencies = options[:ignore_dependencies]
    @format_executable   = options[:format_executable]
    @wrappers            = options[:wrappers]
    @only_install_dir    = options[:only_install_dir]

    @bin_dir             = options[:bin_dir]
    @development         = options[:development]
    @build_root          = options[:build_root]

    @build_args = options[:build_args]

    @gem_home = @install_dir || user_install_dir || Gem.dir

    # If the user has asked for the gem to be installed in a directory that is
    # the system gem directory, then use the system bin directory, else create
    # (or use) a new bin dir under the gem_home.
    @bin_dir ||= Gem.bindir(@gem_home)

    @plugins_dir = Gem.plugindir(@gem_home)

    unless @build_root.nil?
      @bin_dir = File.join(@build_root, @bin_dir.gsub(/^[a-zA-Z]:/, ""))
      @gem_home = File.join(@build_root, @gem_home.gsub(/^[a-zA-Z]:/, ""))
      @plugins_dir = File.join(@build_root, @plugins_dir.gsub(/^[a-zA-Z]:/, ""))
      alert_warning "You build with buildroot.\n  Build root: #{@build_root}\n  Bin dir: #{@bin_dir}\n  Gem home: #{@gem_home}\n  Plugins dir: #{@plugins_dir}"
    end
  end

  def check_that_user_bin_dir_is_in_path(executables) # :nodoc:
    user_bin_dir = @bin_dir || Gem.bindir(gem_home)
    user_bin_dir = user_bin_dir.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR

    path = ENV["PATH"]
    path = path.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR

    if Gem.win_platform?
      path = path.downcase
      user_bin_dir = user_bin_dir.downcase
    end

    path = path.split(File::PATH_SEPARATOR)

    unless path.include? user_bin_dir
      unless !Gem.win_platform? && (path.include? user_bin_dir.sub(ENV["HOME"], "~"))
        alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t  gem executables (#{executables.join(", ")}) will not run."
      end
    end
  end

  def verify_gem_home # :nodoc:
    FileUtils.mkdir_p gem_home, mode: options[:dir_mode] && 0o755
  end

  def verify_spec
    unless Gem::Specification::VALID_NAME_PATTERN.match?(spec.name)
      raise Gem::InstallError, "#{spec} has an invalid name"
    end

    if spec.raw_require_paths.any? {|path| path =~ /\R/ }
      raise Gem::InstallError, "#{spec} has an invalid require_paths"
    end

    if spec.extensions.any? {|ext| ext =~ /\R/ }
      raise Gem::InstallError, "#{spec} has an invalid extensions"
    end

    if /\R/.match?(spec.platform.to_s)
      raise Gem::InstallError, "#{spec.platform} is an invalid platform"
    end

    unless /\A\d+\z/.match?(spec.specification_version.to_s)
      raise Gem::InstallError, "#{spec} has an invalid specification_version"
    end

    if spec.dependencies.any? {|dep| dep.type != :runtime && dep.type != :development }
      raise Gem::InstallError, "#{spec} has an invalid dependencies"
    end

    if spec.dependencies.any? {|dep| dep.name =~ /(?:\R|[<>])/ }
      raise Gem::InstallError, "#{spec} has an invalid dependencies"
    end
  end

  ##
  # Return the text for an application file.

  def app_script_text(bin_file_name)
    # NOTE: that the `load` lines cannot be indented, as old RG versions match
    # against the beginning of the line
    <<-TEXT
#{shebang bin_file_name}
#
# This file was generated by RubyGems.
#
# The application '#{spec.name}' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'
#{gemdeps_load(spec.name)}
version = "#{Gem::Requirement.default_prerelease}"

str = ARGV.first
if str
  str = str.b[/\\A_(.*)_\\z/, 1]
  if str and Gem::Version.correct?(str)
    #{explicit_version_requirement(spec.name)}
    ARGV.shift
  end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('#{spec.name}', '#{bin_file_name}', version)
else
gem #{spec.name.dump}, version
load Gem.bin_path(#{spec.name.dump}, #{bin_file_name.dump}, version)
end
TEXT
  end

  def gemdeps_load(name)
    return "" if name == "bundler"

    <<-TEXT

Gem.use_gemdeps
TEXT
  end

  def explicit_version_requirement(name)
    code = "version = str"
    return code unless name == "bundler"

    code += <<-TEXT

    ENV['BUNDLER_VERSION'] = str
TEXT
  end

  ##
  # return the stub script text used to launch the true Ruby script

  def windows_stub_script(bindir, bin_file_name)
    rb_topdir = RbConfig::TOPDIR || File.dirname(rb_config["bindir"])

    # get ruby executable file name from RbConfig
    ruby_exe = "#{rb_config["RUBY_INSTALL_NAME"]}#{rb_config["EXEEXT"]}"
    ruby_exe = "ruby.exe" if ruby_exe.empty?

    if File.exist?(File.join(bindir, ruby_exe))
      # stub & ruby.exe within same folder.  Portable
      <<-TEXT
@ECHO OFF
@"%~dp0#{ruby_exe}" "%~dpn0" %*
      TEXT
    elsif bindir.downcase.start_with? rb_topdir.downcase
      # stub within ruby folder, but not standard bin.  Portable
      require "pathname"
      from = Pathname.new bindir
      to   = Pathname.new "#{rb_topdir}/bin"
      rel  = to.relative_path_from from
      <<-TEXT
@ECHO OFF
@"%~dp0#{rel}/#{ruby_exe}" "%~dpn0" %*
      TEXT
    else
      # outside ruby folder, maybe -user-install or bundler.  Portable, but ruby
      # is dependent on PATH
      <<-TEXT
@ECHO OFF
@#{ruby_exe} "%~dpn0" %*
      TEXT
    end
  end
  ##
  # Builds extensions.  Valid types of extensions are extconf.rb files,
  # configure scripts and rakefiles or mkrf_conf files.

  def build_extensions
    builder = Gem::Ext::Builder.new spec, build_args, Gem.target_rbconfig

    builder.build_extensions
  end

  ##
  # Reads the file index and extracts each file into the gem directory.
  #
  # Ensures that files can't be installed outside the gem directory.

  def extract_files
    @package.extract_files gem_dir
  end

  ##
  # Extracts only the bin/ files from the gem into the gem directory.
  # This is used by default gems to allow a gem-aware stub to function
  # without the full gem installed.

  def extract_bin
    @package.extract_files gem_dir, "#{spec.bindir}/*"
  end

  ##
  # Prefix and suffix the program filename the same as ruby.

  def formatted_program_filename(filename)
    if @format_executable
      self.class.exec_format % File.basename(filename)
    else
      filename
    end
  end

  ##
  #
  # Return the target directory where the gem is to be installed. This
  # directory is not guaranteed to be populated.
  #

  def dir
    gem_dir.to_s
  end

  ##
  # Filename of the gem being installed.

  def gem
    @package.gem.path
  end

  ##
  # Performs various checks before installing the gem such as the install
  # repository is writable and its directories exist, required Ruby and
  # rubygems versions are met and that dependencies are installed.
  #
  # Version and dependency checks are skipped if this install is forced.
  #
  # The dependent check will be skipped if the install is ignoring dependencies.

  def pre_install_checks
    verify_gem_home

    # The name and require_paths must be verified first, since it could contain
    # ruby code that would be eval'ed in #ensure_loadable_spec
    verify_spec

    ensure_loadable_sprubygems/rubygems/tsort/lib/tsort.rb000064400000034751150403134230013664 0ustar00build_info_file = File.join build_info_dir, "#{spec.full_name}.info"

    File.open build_info_file, "w" do |io|
      build_args.each do |arg|
        io.puts arg
      end
    end

    File.chmod(dir_mode, build_info_dir) if dir_mode
  end

  ##
  # Writes the .gem file to the cache directory

  def write_cache_file
    cache_file = File.join gem_home, "cache", spec.file_name
    @package.copy_to cache_file
  end

  def ensure_writable_dir(dir) # :nodoc:
    begin
      Dir.mkdir dir, *[options[:dir_mode] && 0o755].compact
    rescue SystemCallError
      raise unless File.directory? dir
    end

    raise Gem::FilePermissionError.new(dir) unless File.writable? dir
  end

  private

  def user_install_dir
    # never install to user home in --build-root mode
    return unless @build_root.nil?

    # Please note that @user_install might have three states:
    # * `true`: `--user-install`
    # * `false`: `--no-user-install` and
    # * `nil`: option was not specified
    if @user_install || (@user_install.nil? && Gem.default_user_install)
      Gem.user_dir
    end
  end

  def build_args
    @build_args ||= begin
                      require_relative "command"
                      Gem::Command.build_args
                    end
  end

  def rb_config
    Gem.target_rbconfig
  end

  def ruby_install_name
    rb_config["ruby_install_name"]
  end

  def load_relative_enabled?
    rb_config["LIBRUBY_RELATIVE"] == "yes"
  end

  def bash_prolog_script
    if load_relative_enabled?
      <<~EOS
        #!/bin/sh
        # -*- ruby -*-
        _=_\\
        =begin
        bindir="${0%/*}"
        ruby="$bindir/#{ruby_install_name}"
        if [ ! -f "$ruby" ]; then
          ruby="#{ruby_install_name}"
        fi
        exec "$ruby" "-x" "$0" "$@"
        =end
      EOS
    else
      ""
    end
  end

  def load_plugin
    specs = Gem::Specification.find_all_by_name(spec.name)
    # If old version already exists, this plugin isn't loaded
    # immediately. It's for avoiding a case that multiple versions
    # are loaded at the same time.
    return unless specs.size == 1

    plugin_files = spec.plugins.map do |plugin|
      File.join(@plugins_dir, "#{spec.name}_plugin#{File.extname(plugin)}")
    end
    Gem.load_plugin_files(plugin_files)
  end
end
rubygems/rubygems/install_default_message.rb000064400000000535150403134230015437 0ustar00# frozen_string_literal: true

require_relative "../rubygems"
require_relative "user_interaction"

##
# A post-install hook that displays "Successfully installed
# some_gem-1.0 as a default gem"

Gem.post_install do |installer|
  ui = Gem::DefaultUserInteraction.ui
  ui.say "Successfully installed #{installer.spec.full_name} as a default gem"
end
rubygems/rubygems/security.rb000064400000053306150403134230012434 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "exceptions"
require_relative "openssl"

##
# = Signing gems
#
# The Gem::Security implements cryptographic signatures for gems.  The section
# below is a step-by-step guide to using signed gems and generating your own.
#
# == Walkthrough
#
# === Building your certificate
#
# In order to start signing your gems, you'll need to build a private key and
# a self-signed certificate.  Here's how:
#
#   # build a private key and certificate for yourself:
#   $ gem cert --build you@example.com
#
# This could take anywhere from a few seconds to a minute or two, depending on
# the speed of your computer (public key algorithms aren't exactly the
# speediest crypto algorithms in the world).  When it's finished, you'll see
# the files "gem-private_key.pem" and "gem-public_cert.pem" in the current
# directory.
#
# First things first: Move both files to ~/.gem if you don't already have a
# key and certificate in that directory.  Ensure the file permissions make the
# key unreadable by others (by default the file is saved securely).
#
# Keep your private key hidden; if it's compromised, someone can sign packages
# as you (note: PKI has ways of mitigating the risk of stolen keys; more on
# that later).
#
# === Signing Gems
#
# In RubyGems 2 and newer there is no extra work to sign a gem.  RubyGems will
# automatically find your key and certificate in your home directory and use
# them to sign newly packaged gems.
#
# If your certificate is not self-signed (signed by a third party) RubyGems
# will attempt to load the certificate chain from the trusted certificates.
# Use <code>gem cert --add signing_cert.pem</code> to add your signers as
# trusted certificates.  See below for further information on certificate
# chains.
#
# If you build your gem it will automatically be signed.  If you peek inside
# your gem file, you'll see a couple of new files have been added:
#
#   $ tar tf your-gem-1.0.gem
#   metadata.gz
#   metadata.gz.sig # metadata signature
#   data.tar.gz
#   data.tar.gz.sig # data signature
#   checksums.yaml.gz
#   checksums.yaml.gz.sig # checksums signature
#
# === Manually signing gems
#
# If you wish to store your key in a separate secure location you'll need to
# set your gems up for signing by hand.  To do this, set the
# <code>signing_key</code> and <code>cert_chain</code> in the gemspec before
# packaging your gem:
#
#   s.signing_key = '/secure/path/to/gem-private_key.pem'
#   s.cert_chain = %w[/secure/path/to/gem-public_cert.pem]
#
# When you package your gem with these options set RubyGems will automatically
# load your key and certificate from the secure paths.
#
# === Signed gems and security policies
#
# Now let's verify the signature.  Go ahead and install the gem, but add the
# following options: <code>-P HighSecurity</code>, like this:
#
#   # install the gem with using the security policy "HighSecurity"
#   $ sudo gem install your.gem -P HighSecurity
#
# The <code>-P</code> option sets your security policy -- we'll talk about
# that in just a minute.  Eh, what's this?
#
#   $ gem install -P HighSecurity your-gem-1.0.gem
#   ERROR:  While executing gem ... (Gem::Security::Exception)
#       root cert /CN=you/DC=example is not trusted
#
# The culprit here is the security policy.  RubyGems has several different
# security policies.  Let's take a short break and go over the security
# policies.  Here's a list of the available security policies, and a brief
# description of each one:
#
# * NoSecurity - Well, no security at all.  Signed packages are treated like
#   unsigned packages.
# * LowSecurity - Pretty much no security.  If a package is signed then
#   RubyGems will make sure the signature matches the signing
#   certificate, and that the signing certificate hasn't expired, but
#   that's it.  A malicious user could easily circumvent this kind of
#   security.
# * MediumSecurity - Better than LowSecurity and NoSecurity, but still
#   fallible.  Package contents are verified against the signing
#   certificate, and the signing certificate is checked for validity,
#   and checked against the rest of the certificate chain (if you don't
#   know what a certificate chain is, stay tuned, we'll get to that).
#   The biggest improvement over LowSecurity is that MediumSecurity
#   won't install packages that are signed by untrusted sources.
#   Unfortunately, MediumSecurity still isn't totally secure -- a
#   malicious user can still unpack the gem, strip the signatures, and
#   distribute the gem unsigned.
# * HighSecurity - Here's the bugger that got us into this mess.
#   The HighSecurity policy is identical to the MediumSecurity policy,
#   except that it does not allow unsigned gems.  A malicious user
#   doesn't have a whole lot of options here; they can't modify the
#   package contents without invalidating the signature, and they can't
#   modify or remove signature or the signing certificate chain, or
#   RubyGems will simply refuse to install the package.  Oh well, maybe
#   they'll have better luck causing problems for CPAN users instead :).
#
# The reason RubyGems refused to install your shiny new signed gem was because
# it was from an untrusted source.  Well, your code is infallible (naturally),
# so you need to add yourself as a trusted source:
#
#   # add trusted certificate
#   gem cert --add ~/.gem/gem-public_cert.pem
#
# You've now added your public certificate as a trusted source.  Now you can
# install packages signed by your private key without any hassle.  Let's try
# the install command above again:
#
#   # install the gem with using the HighSecurity policy (and this time
#   # without any shenanigans)
#   $ gem install -P HighSecurity your-gem-1.0.gem
#   Successfully installed your-gem-1.0
#   1 gem installed
#
# This time RubyGems will accept your signed package and begin installing.
#
# While you're waiting for RubyGems to work it's magic, have a look at some of
# the other security commands by running <code>gem help cert</code>:
#
#   Options:
#     -a, --add CERT                   Add a trusted certificate.
#     -l, --list [FILTER]              List trusted certificates where the
#                                      subject contains FILTER
#     -r, --remove FILTER              Remove trusted certificates where the
#                                      subject contains FILTER
#     -b, --build EMAIL_ADDR           Build private key and self-signed
#                                      certificate for EMAIL_ADDR
#     -C, --certificate CERT           Signing certificate for --sign
#     -K, --private-key KEY            Key for --sign or --build
#     -A, --key-algorithm ALGORITHM    Select key algorithm for --build from RSA, DSA, or EC. Defaults to RSA.
#     -s, --sign CERT                  Signs CERT with the key from -K
#                                      and the certificate from -C
#     -d, --days NUMBER_OF_DAYS        Days before the certificate expires
#     -R, --re-sign                    Re-signs the certificate from -C with the key from -K
#
# We've already covered the <code>--build</code> option, and the
# <code>--add</code>, <code>--list</code>, and <code>--remove</code> commands
# seem fairly straightforward; they allow you to add, list, and remove the
# certificates in your trusted certificate list.  But what's with this
# <code>--sign</code> option?
#
# === Certificate chains
#
# To answer that question, let's take a look at "certificate chains", a
# concept I mentioned earlier.  There are a couple of problems with
# self-signed certificates: first of all, self-signed certificates don't offer
# a whole lot of security.  Sure, the certificate says Yukihiro Matsumoto, but
# how do I know it was actually generated and signed by matz himself unless he
# gave me the certificate in person?
#
# The second problem is scalability.  Sure, if there are 50 gem authors, then
# I have 50 trusted certificates, no problem.  What if there are 500 gem
# authors?  1000?  Having to constantly add new trusted certificates is a
# pain, and it actually makes the trust system less secure by encouraging
# RubyGems users to blindly trust new certificates.
#
# Here's where certificate chains come in.  A certificate chain establishes an
# arbitrarily long chain of trust between an issuing certificate and a child
# certificate.  So instead of trusting certificates on a per-developer basis,
# we use the PKI concept of certificate chains to build a logical hierarchy of
# trust.  Here's a hypothetical example of a trust hierarchy based (roughly)
# on geography:
#
#                         --------------------------
#                         | rubygems@rubygems.org |
#                         --------------------------
#                                     |
#                   -----------------------------------
#                   |                                 |
#       ----------------------------    -----------------------------
#       |  seattlerb@seattlerb.org |    | dcrubyists@richkilmer.com |
#       ----------------------------    -----------------------------
#            |                |                 |             |
#     ---------------   ----------------   -----------   --------------
#     |   drbrain   |   |   zenspider  |   | pabs@dc |   | tomcope@dc |
#     ---------------   ----------------   -----------   --------------
#
#
# Now, rather than having 4 trusted certificates (one for drbrain, zenspider,
# pabs@dc, and tomecope@dc), a user could actually get by with one
# certificate, the "rubygems@rubygems.org" certificate.
#
# Here's how it works:
#
# I install "rdoc-3.12.gem", a package signed by "drbrain".  I've never heard
# of "drbrain", but his certificate has a valid signature from the
# "seattle.rb@seattlerb.org" certificate, which in turn has a valid signature
# from the "rubygems@rubygems.org" certificate.  Voila!  At this point, it's
# much more reasonable for me to trust a package signed by "drbrain", because
# I can establish a chain to "rubygems@rubygems.org", which I do trust.
#
# === Signing certificates
#
# The <code>--sign</code> option allows all this to happen.  A developer
# creates their build certificate with the <code>--build</code> option, then
# has their certificate signed by taking it with them to their next regional
# Ruby meetup (in our hypothetical example), and it's signed there by the
# person holding the regional RubyGems signing certificate, which is signed at
# the next RubyConf by the holder of the top-level RubyGems certificate.  At
# each point the issuerubygems/rubygems/stub_specification.rb000064400000010731150403134230014435 0ustar00>~/.gem/gem-public_cert.pem</code>
#
# Obviously this RubyGems trust infrastructure doesn't exist yet.  Also, in
# the "real world", issuers actually generate the child certificate from a
# certificate request, rather than sign an existing certificate.  And our
# hypothetical infrastructure is missing a certificate revocation system.
# These are that can be fixed in the future...
#
# At this point you should know how to do all of these new and interesting
# things:
#
# * build a gem signing key and certificate
# * adjust your security policy
# * modify your trusted certificate list
# * sign a certificate
#
# == Manually verifying signatures
#
# In case you don't trust RubyGems you can verify gem signatures manually:
#
# 1. Fetch and unpack the gem
#
#      gem fetch some_signed_gem
#      tar -xf some_signed_gem-1.0.gem
#
# 2. Grab the public key from the gemspec
#
#      gem spec some_signed_gem-1.0.gem cert_chain | \
#        ruby -rpsych -e 'puts Psych.load($stdin)' > public_key.crt
#
# 3. Generate a SHA1 hash of the data.tar.gz
#
#      openssl dgst -sha1 < data.tar.gz > my.hash
#
# 4. Verify the signature
#
#      openssl rsautl -verify -inkey public_key.crt -certin \
#        -in data.tar.gz.sig > verified.hash
#
# 5. Compare your hash to the verified hash
#
#      diff -s verified.hash my.hash
#
# 6. Repeat 5 and 6 with metadata.gz
#
# == OpenSSL Reference
#
# The .pem files generated by --build and --sign are PEM files.  Here's a
# couple of useful OpenSSL commands for manipulating them:
#
#   # convert a PEM format X509 certificate into DER format:
#   # (note: Windows .cer files are X509 certificates in DER format)
#   $ openssl x509 -in input.pem -outform der -out output.der
#
#   # print out the certificate in a human-readable format:
#   $ openssl x509 -in input.pem -noout -text
#
# And you can do the same thing with the private key file as well:
#
#   # convert a PEM format RSA key into DER format:
#   $ openssl rsa -in input_key.pem -outform der -out output_key.der
#
#   # print out the key in a human readable format:
#   $ openssl rsa -in input_key.pem -noout -text
#
# == Bugs/TODO
#
# * There's no way to define a system-wide trust list.
# * custom security policies (from a YAML file, etc)
# * Simple method to generate a signed certificate request
# * Support for OCSP, SCVP, CRLs, or some other form of cert status check
#   (list is in order of preference)
# * Support for encrypted private keys
# * Some sort of semi-formal trust hierarchy (see long-winded explanation
#   above)
# * Path discovery (for gem certificate chains that don't have a self-signed
#   root) -- by the way, since we don't have this, THE ROOT OF THE CERTIFICATE
#   CHAIN MUST BE SELF SIGNED if Policy#verify_root is true (and it is for the
#   MediumSecurity and HighSecurity policies)
# * Better explanation of X509 naming (ie, we don't have to use email
#   addresses)
# * Honor AIA field (see note about OCSP above)
# * Honor extension restrictions
# * Might be better to store the certificate chain as a PKCS#7 or PKCS#12
#   file, instead of an array embedded in the metadata.
#
# == Original author
#
# Paul Duncan <pabs@pablotron.org>
# https://pablotron.org/

module Gem::Security
  ##
  # Gem::Security default exception type

  class Exception < Gem::Exception; end

  ##
  # Used internally to select the signing digest from all computed digests

  DIGEST_NAME = "SHA256" # :nodoc:

  ##
  # Length of keys created by RSA and DSA keys

  RSA_DSA_KEY_LENGTH = 3072

  ##
  # Default algorithm to use when building a key pair

  DEFAULT_KEY_ALGORITHM = "RSA"

  ##
  # Named curve used for Elliptic Curve

  EC_NAME = "secp384r1"

  ##
  # Cipher used to encrypt the key pair used to sign gems.
  # Must be in the list returned by OpenSSL::Cipher.ciphers

  KEY_CIPHER = OpenSSL::Cipher.new("AES-256-CBC") if defined?(OpenSSL::Cipher)

  ##
  # One day in seconds

  ONE_DAY = 86_400

  ##
  # One year in seconds

  ONE_YEAR = ONE_DAY * 365

  ##
  # The default set of extensions are:
  #
  # * The certificate is not a certificate authority
  # * The key for the certificate may be used for key and data encipherment
  #   and digital signatures
  # * The certificate contains a subject key identifier

  EXTENSIONS = {
    "basicConstraints" => "CA:FALSE",
    "keyUsage" =>
      "keyEncipherment,dataEncipherment,digitalSignature",
    "subjectKeyIdentifier" => "hash",
  }.freeze

  def self.alt_name_or_x509_entry(certificate, x509_entry)
    alt_name = certificate.extensions.find do |extension|
      extension.oid =rubygems/rubygems/specification.rb000064400000214720150403134230013404 0ustar00   = serial

    cert.not_before = Time.now
    cert.not_after  = Time.now + age

    cert.subject    = subject

    ef = OpenSSL::X509::ExtensionFactory.new nil, cert

    cert.extensions = extensions.map do |ext_name, value|
      ef.create_extension ext_name, value
    end

    cert
  end

  ##
  # Gets the right public key from a PKey instance

  def self.get_public_key(key)
    # Ruby 3.0 (Ruby/OpenSSL 2.2) or later
    return OpenSSL::PKey.read(key.public_to_der) if key.respond_to?(:public_to_der)
    return key.public_key unless key.is_a?(OpenSSL::PKey::EC)

    ec_key = OpenSSL::PKey::EC.new(key.group.curve_name)
    ec_key.public_key = key.public_key
    ec_key
  end

  ##
  # Creates a self-signed certificate with an issuer and subject from +email+,
  # a subject alternative name of +email+ and the given +extensions+ for the
  # +key+.

  def self.create_cert_email(email, key, age = ONE_YEAR, extensions = EXTENSIONS)
    subject = email_to_name email

    extensions = extensions.merge "subjectAltName" => "email:#{email}"

    create_cert_self_signed subject, key, age, extensions
  end

  ##
  # Creates a self-signed certificate with an issuer and subject of +subject+
  # and the given +extensions+ for the +key+.

  def self.create_cert_self_signed(subject, key, age = ONE_YEAR, extensions = EXTENSIONS, serial = 1)
    certificate = create_cert subject, key, age, extensions

    sign certificate, key, certificate, age, extensions, serial
  end

  ##
  # Creates a new digest instance using the specified +algorithm+. The default
  # is SHA256.

  def self.create_digest(algorithm = DIGEST_NAME)
    OpenSSL::Digest.new(algorithm)
  end

  ##
  # Creates a new key pair of the specified +algorithm+. RSA, DSA, and EC
  # are supported.

  def self.create_key(algorithm)
    if defined?(OpenSSL::PKey)
      case algorithm.downcase
      when "dsa"
        OpenSSL::PKey::DSA.new(RSA_DSA_KEY_LENGTH)
      when "rsa"
        OpenSSL::PKey::RSA.new(RSA_DSA_KEY_LENGTH)
      when "ec"
        OpenSSL::PKey::EC.generate(EC_NAME)
      else
        raise Gem::Security::Exception,
        "#{algorithm} algorithm not found. RSA, DSA, and EC algorithms are supported."
      end
    end
  end

  ##
  # Turns +email_address+ into an OpenSSL::X509::Name

  def self.email_to_name(email_address)
    email_address = email_address.gsub(/[^\w@.-]+/i, "_")

    cn, dcs = email_address.split "@"

    dcs = dcs.split "."

    OpenSSL::X509::Name.new([
      ["CN", cn],
      *dcs.map {|dc| ["DC", dc] },
    ])
  end

  ##
  # Signs +expired_certificate+ with +private_key+ if the keys match and the
  # expired certificate was self-signed.
  #--
  # TODO increment serial

  def self.re_sign(expired_certificate, private_key, age = ONE_YEAR, extensions = EXTENSIONS)
    raise Gem::Security::Exception,
          "incorrect signing key for re-signing " +
          expired_certificate.subject.to_s unless
      expired_certificate.check_private_key(private_key)

    unless expired_certificate.subject.to_s ==
           expired_certificate.issuer.to_s
      subject = alt_name_or_x509_entry expired_certificate, :subject
      issuer  = alt_name_or_x509_entry expired_certificate, :issuer

      raise Gem::Security::Exception,
            "#{subject} is not self-signed, contact #{issuer} " \
            "to obtain a valid certificate"
    end

    serial = expired_certificate.serial + 1

    create_cert_self_signed(expired_certificate.subject, private_key, age,
                            extensions, serial)
  end

  ##
  # Resets the trust directory for verifying gems.

  def self.reset
    @trust_dir = nil
  end

  ##
  # Sign the public key from +certificate+ with the +signing_key+ and
  # +signing_cert+, using the Gem::Security::DIGEST_NAME.  Uses the
  # default certificate validity range and extensions.
  #
  # Returns the newly signed certificate.

  def self.sign(certificate, signing_key, signing_cert, age = ONE_YEAR, extensions = EXTENSIONS, serial = 1)
    signee_subject = certificate.subject
    signee_key     = certificate.public_key

    alt_name = certificate.extensions.find do |extension|
      extension.oid == "subjectAltName"
    end

    extensions = extensions.merge "subjectAltName" => alt_name.value if
      alt_name

    issuer_alt_name = signing_cert.extensions.find do |extension|
      extension.oid == "subjectAltName"
    end

    extensions = extensions.merge "issuerAltName" => issuer_alt_name.value if
      issuer_alt_name

    signed = create_cert signee_subject, signee_key, age, extensions, serial
    signed.issuer = signing_cert.subject

    signed.sign signing_key, Gem::Security::DIGEST_NAME
  end

  ##
  # Returns a Gem::Security::TrustDir which wraps the directory where trusted
  # certificates live.

  def self.trust_dir
    return @trust_dir if @trust_dir

    dir = File.join Gem.user_home, ".gem", "trust"

    @trust_dir ||= Gem::Security::TrustDir.new dir
  end

  ##
  # Enumerates the trusted certificates via Gem::Security::TrustDir.

  def self.trusted_certificates(&block)
    trust_dir.each_certificate(&block)
  end

  ##
  # Writes +pemmable+, which must respond to +to_pem+ to +path+ with the given
  # +permissions+. If passed +cipher+ and +passphrase+ those arguments will be
  # passed to +to_pem+.

  def self.write(pemmable, path, permissions = 0o600, passphrase = nil, cipher = KEY_CIPHER)
    path = File.expand_path path

    File.open path, "wb", permissions do |io|
      if passphrase && cipher
        io.write pemmable.to_pem cipher, passphrase
      else
        io.write pemmable.to_pem
      end
    end

    path
  end

  reset
end

if Gem::HAVE_OPENSSL
  require_relative "security/policy"
  require_relative "security/policies"
  require_relative "security/trust_dir"
end

require_relative "security/signer"
rubygems/rubygems/tsort/lib/tsort.rb000064400000034751150403134230013664 0ustar00aPods/Molinillo
[PubGrub]:            https://github.com/jhawthorn/pub_grub
[GH-net-protocol-14]: https://github.com/ruby/net-protocol/pull/14
[GH-pathname-20]:     https://github.com/ruby/pathname/pull/20
[GH-6791]:            https://github.com/ruby/ruby/pull/6791
[GH-6868]:            https://github.com/ruby/ruby/pull/6868
[GH-rubygems-4475]:   https://github.com/rubygems/rubygems/pull/4475
[GH-rubygems-6149]:   https://github.com/rubygems/rubygems/pull/6149
[GH-rubygems-6167]:   https://github.com/rubygems/rubygems/pull/6167
[sec-156615]:         https://hackerone.com/reports/156615
[CVE-2021-33621]:     https://www.ruby-lang.org/en/news/2022/11/22/http-response-splitting-in-cgi-cve-2021-33621/
[wasm/README.md]:     https://github.com/ruby/ruby/blob/master/wasm/README.md
[ruby.wasm]:          https://github.com/ruby/ruby.wasm
ruby/expect.rb000064400000004304150403134230007336 0ustar00# frozen_string_literal: true
$expect_verbose = false

class IO
  # call-seq:
  #   IO#expect(pattern,timeout=9999999)                  ->  Array
  #   IO#expect(pattern,timeout=9999999) { |resultruby/rinda/rinda.rb000064400000015123150403134230010241 0ustar00pattern 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
ruby/rinda/rinda.rb000064400000015123150403134230010241 0ustar00# 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

  ##
  # <i>Documentation?</i>

  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/8ruby/rinda/ring.rb000064400000031061150403134230010102 0ustar00See 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

ruby/rinda/ring.rb000064400000031061150403134230010102 0ustar00# 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 rubygems/rubygems/stub_specification.rb000064400000011726150403134230014442 0ustar00# frozen_string_literal: true

##
# Gem::StubSpecification reads the stub: line from the gemspec.  This prevents
# us having to eval the entire gemspec in order to find out certain
# information.

class Gem::StubSpecification < Gem::BasicSpecification
  # :nodoc:
  PREFIX = "# stub: "

  # :nodoc:
  OPEN_MODE = "r:UTF-8:-"

  class StubLine # :nodoc: all
    attr_reader :name, :version, :platform, :require_paths, :extensions,
                :full_name

    NO_EXTENSIONS = [].freeze

    # These are common require paths.
    REQUIRE_PATHS = { # :nodoc:
      "lib" => "lib",
      "test" => "test",
      "ext" => "ext",
    }.freeze

    # These are common require path lists.  This hash is used to optimize
    # and consolidate require_path objects.  Most specs just specify "lib"
    # in their require paths, so lets take advantage of that by pre-allocating
    # a require path list for that case.
    REQUIRE_PATH_LIST = { # :nodoc:
      "lib" => ["lib"].freeze,
    }.freeze

    def initialize(data, extensions)
      parts          = data[PREFIX.length..-1].split(" ", 4)
      @name          = -parts[0]
      @version       = if Gem::Version.correct?(parts[1])
        Gem::Version.new(parts[1])
      else
        Gem::Version.new(0)
      end

      @platform      = Gem::Platform.new parts[2]
      @extensions    = extensions
      @full_name     = if platform == Gem::Platform::RUBY
        "#{name}-#{version}"
      else
        "#{name}-#{version}-#{platform}"
      end

      path_list = parts.last
      @require_paths = REQUIRE_PATH_LIST[path_list] || path_list.split("\0").map! do |x|
        REQUIRE_PATHS[x] || x
      end
    end
  end

  def self.default_gemspec_stub(filename, base_dir, gems_dir)
    new filename, base_dir, gems_dir, true
  end

  def self.gemspec_stub(filename, base_dir, gems_dir)
    new filename, base_dir, gems_dir, false
  end

  attr_reader :base_dir, :gems_dir

  def initialize(filename, base_dir, gems_dir, default_gem)
    super()

    self.loaded_from = filename
    @data            = nil
    @name            = nil
    @spec            = nil
    @base_dir        = base_dir
    @gems_dir        = gems_dir
    @default_gem     = default_gem
  end

  ##
  # True when this gem has been activated

  def activated?
    @activated ||= !loaded_spec.nil?
  end

  def default_gem?
    @default_gem
  end

  def build_extensions # :nodoc:
    return if default_gem?
    return if extensions.empty?

    to_spec.build_extensions
  end

  ##
  # If the gemspec contains a stubline, returns a StubLine instance. Otherwise
  # returns the full Gem::Specification.

  def data
    unless @data
      begin
        saved_lineno = $.

        Gem.open_file loaded_from, OPEN_MODE do |file|
          file.readline # discard encoding line
          stubline = file.readline
          if stubline.start_with?(PREFIX)
            extline = file.readline

            extensions =
              if extline.delete_prefix!(PREFIX)
                extline.chomp!
                extline.split "\0"
              else
                StubLine::NO_EXTENSIONS
              end

            stubline.chomp! # readline(chomp: true) allocates 3x as much as .readline.chomp!
            @data = StubLine.new stubline, extensions
          end
        rescue EOFError
        end
      ensure
        $. = saved_lineno
      end
    end

    @data ||= to_spec
  end

  private :data

  def raw_require_paths # :nodoc:
    data.require_paths
  end

  def missing_extensions?
    return false if default_gem?
    return false if extensions.empty?
    return false if File.exist? gem_build_complete_path

    to_spec.missing_extensions?
  end

  ##
  # Name of the gem

  def name
    data.name
  end

  ##
  # Platform of the gem

  def platform
    data.platform
  end

  ##
  # Extensions for this gem

  def extensions
    data.extensions
  end

  ##
  # Version of the gem

  def version
    data.version
  end

  def full_name
    data.full_name
  end

  ##
  # The full Gem::Specification for this gem, loaded from evalling its gemspec

  def spec
    @spec ||= loaded_spec if @data
    @spec ||= Gem::Specification.load(loaded_from)
  end
  alias_method :to_spec, :spec

  ##
  # Is this StubSpecification valid? i.e. have we found a stub line, OR does
  # the filename contain a valid gemspec?

  def valid?
    data
  end

  ##
  # Is there a stub line present for this StubSpecification?

  def stubbed?
    data.is_a? StubLine
  end

  def ==(other) # :nodoc:
    self.class === other &&
      name == other.name &&
      version == other.version &&
      platform == other.platform
  end

  alias_method :eql?, :== # :nodoc:

  def hash # :nodoc:
    name.hash ^ version.hash ^ platform.hash
  end

  def <=>(other) # :nodoc:
    sort_obj <=> other.sort_obj
  end

  def sort_obj # :nodoc:
    [name, version, Gem::Platform.sort_priority(platform)]
  end

  private

  def loaded_spec
    spec = Gem.loaded_specs[name]
    return unless spec && spec.version == version && spec.default_gem? == default_gem?

    spec
  end
end
rubygems/rubygems/specification.rb000064400000212040150403134230013375 0ustar00# frozen_string_literal: true

#
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "deprecate"
require_relative "basic_specification"
require_relative "stub_specification"
require_relative "platform"
require_relative "specification_record"
require_relative "util/list"

require "rbconfig"

##
# The Specification class contains the information for a gem.  Typically
# defined in a .gemspec file or a Rakefile, and looks like this:
#
#   Gem::Specification.new do |s|
#     s.name        = 'example'
#     s.version     = '0.1.0'
#     s.licenses    = ['MIT']
#     s.summary     = "This is an example!"
#     s.description = "Much longer explanation of the example!"
#     s.authors     = ["Ruby Coder"]
#     s.email       = 'rubycoder@example.com'
#     s.files       = ["lib/example.rb"]
#     s.homepage    = 'https://rubygems.org/gems/example'
#     s.metadata    = { "source_code_uri" => "https://github.com/example/example" }
#   end
#
# Starting in RubyGems 2.0, a Specification can hold arbitrary
# metadata.  See #metadata for restrictions on the format and size of metadata
# items you may add to a specification.

class Gem::Specification < Gem::BasicSpecification
  extend Gem::Deprecate

  # REFACTOR: Consider breaking out this version stuff into a separate
  # module. There's enough special stuff around it that it may justify
  # a separate class.

  ##
  # The version number of a specification that does not specify one
  # (i.e. RubyGems 0.7 or earlier).

  NONEXISTENT_SPECIFICATION_VERSION = -1

  ##
  # The specification version applied to any new Specification instances
  # created.  This should be bumped whenever something in the spec format
  # changes.
  #
  # Specification Version History:
  #
  #   spec   ruby
  #    ver    ver yyyy-mm-dd description
  #     -1 <0.8.0            pre-spec-version-history
  #      1  0.8.0 2004-08-01 Deprecated "test_suite_file" for "test_files"
  #                          "test_file=x" is a shortcut for "test_files=[x]"
  #      2  0.9.5 2007-10-01 Added "required_rubygems_version"
  #                          Now forward-compatible with future versions
  #      3  1.3.2 2009-01-03 Added Fixnum validation to specification_version
  #      4  1.9.0 2011-06-07 Added metadata
  #--
  # When updating this number, be sure to also update #to_ruby.
  #
  # NOTE RubyGems < 1.2 cannot load specification versions > 2.

  CURRENT_SPECIFICATION_VERSION = 4 # :nodoc:

  ##
  # An informal list of changes to the specification.  The highest-valued
  # key should be equal to the CURRENT_SPECIFICATION_VERSION.

  SPECIFICATION_VERSION_HISTORY = { # :nodoc:
    -1 => ["(RubyGems versions up to and including 0.7 did not have versioned specifications)"],
    1 => [
      'Deprecated "test_suite_file" in favor of the new, but equivalent, "test_files"',
      '"test_file=x" is a shortcut for "test_files=[x]"',
    ],
    2 => [
      'Added "required_rubygems_version"',
      "Now forward-compatible with future versions",
    ],
    3 => [
      "Added Fixnum validation to the specification_version",
    ],
    4 => [
      "Added sandboxed freeform metadata to the specification version.",
    ],
  }.freeze

  MARSHAL_FIELDS = { # :nodoc:
    -1 => 16,
    1 => 16,
    2 => 16,
    3 => 17,
    4 => 18,
  }.freeze

  today = Time.now.utc
  TODAY = Time.utc(today.year, today.month, today.day) # :nodoc:

  @load_cache = {} # :nodoc:
  @load_cache_mutex = Thread::Mutex.new

  VALID_NAME_PATTERN = /\A[a-zA-Z0-9\.\-\_]+\z/ # :nodoc:

  # :startdoc:

  ##
  # List of attribute names: [:name, :version, ...]

  @@required_attributes = [:rubygems_version,
                           :specification_version,
                           :name,
                           :version,
                           :date,
                           :summary,
                           :require_paths]

  ##
  # Map of attribute names to default values.

  @@default_value = {
    authors: [],
    autorequire: nil,
    bindir: "bin",
    cert_chain: [],
    date: nil,
    dependencies: [],
    description: nil,
    email: nil,
    executables: [],
    extensions: [],
    extra_rdoc_files: [],
    files: [],
    homepage: nil,
    licenses: [],
    metadata: {},
    name: nil,
    platform: Gem::Platform::RUBY,
    post_install_message: nil,
    rdoc_options: [],
    require_paths: ["lib"],
    required_ruby_version: Gem::Requirement.default,
    required_rubygems_version: Gem::Requirement.default,
    requirements: [],
    rubygems_version: Gem::VERSION,
    signing_key: nil,
    specification_version: CURRENT_SPECIFICATION_VERSION,
    summary: nil,
    test_files: [],
    version: nil,
  }.freeze

  # rubocop:disable Style/MutableConstant
  INITIALIZE_CODE_FOR_DEFAULTS = {} # :nodoc:
  # rubocop:enable Style/MutableConstant

  @@default_value.each do |k,v|
    INITIALIZE_CODE_FOR_DEFAULTS[k] = case v
                                      when [], {}, true, false, nil, Numeric, Symbol
                                        v.inspect
                                      when String
                                        v.dump
                                      else
                                        "default_value(:#{k}).dup"
    end
  end

  @@attributes = @@default_value.keys.sort_by(&:to_s)
  @@array_attributes = @@default_value.select {|_k,v| v.is_a?(Array) }.keys
  @@nil_attributes, @@non_nil_attributes = @@default_value.keys.partition do |k|
    @@default_value[k].nil?
  end

  # Sentinel object to represent "not found" stubs
  NOT_FOUND = Struct.new(:to_spec, :this).new # :nodoc:
  deprecate_constant :NOT_FOUND

  # Tracking removed method calls to warn users during build time.
  REMOVED_METHODS = [:rubyforge_project=, :mark_version].freeze # :nodoc:
  def removed_method_calls
    @removed_method_calls ||= []
  end

  ######################################################################
  # :section: Required gemspec attributes

  ##
  # This gem's name.
  #
  # Usage:
  #
  #   spec.name = 'rake'

  attr_accessor :name

  ##
  # This gem's version.
  #
  # The version string can contain numbers and periods, such as +1.0.0+.
  # A gem is a 'prerelease' gem if the version has a letter in it, such as
  # +1.0.0.pre+.
  #
  # Usage:
  #
  #   spec.version = '0.4.1'

  attr_reader :version

  ##
  # A short summary of this gem's description.  Displayed in <tt>gem list -d</tt>.
  #
  # The #description should be more detailed than the summary.
  #
  # Usage:
  #
  #   spec.summary = "This is a small summary of my gem"

  attr_reader :summary

  ##
  # Files included in this gem.  You cannot append to this accessor, you must
  # assign to it.
  #
  # Only add files you can require to this list, not directories, etc.
  #
  # Directories are automatically stripped from this list when building a gem,
  # other non-files cause an error.
  #
  # Usage:
  #
  #   require 'rake'
  #   spec.files = FileList['lib/**/*.rb',
  #                         'bin/*',
  #                         '[A-Z]*'].to_a
  #
  #   # or without Rake...
  #   spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
  #   spec.files += Dir['[A-Z]*']
  #   spec.files.reject! { |fn| fn.include? "CVS" }

  def files
    # DO NOT CHANGE TO ||= ! This is not a normal accessor. (yes, it sucks)
    # DOC: Why isn't it normal? Why does it suck? How can we fix this?
    @files = [@files,
              @test_files,
              add_bindir(@executables),
              @extra_rdoc_files,
              @extensions].flatten.compact.uniq.sort
  end

  ##
  # A list of authors for this gem.
  #
  # Alternatively, a single author can be specified by assigning a string to
  # +spec.author+
  #
  # Usage:
  #
  #   spec.authors = ['John Jones', 'Mary Smith']

  def authors=(value)
    @authors = Array(value).flatten.grep(String)
  end

  ######################################################################
  # :section: Recommended gemspec attributes

  ##
  # The version of Ruby required by this gem
  #
  # Usage:
  #
  #   spec.required_ruby_version = '>= 2.7.0'

  attr_reader :required_ruby_version

  ##
  # A long description of this gem
  #
  # The description should be more detailed than the summary but not
  # excessively long.  A few paragraphs is a recommended length with no
  # examples or formatting.
  #
  # Usage:
  #
  #   spec.description = <<~EOF
  #     Rake is a Make-like program implemented in Ruby. Tasks and
  #     dependencies are specified in standard Ruby syntax.
  #   EOF

  attr_reader :description

  ##
  # A contact email address (or addresses) for this gem
  #
  # Usage:
  #
  #   spec.email = 'john.jones@example.com'
  #   spec.email = ['jack@example.com', 'jill@example.com']

  attr_accessor :email

  ##
  # The URL of this gem's home page
  #
  # Usage:
  #
  #   spec.homepage = 'https://github.com/ruby/rake'

  attr_accessor :homepage

  ##
  # The license for this gem.
  #
  # The license must be no more than 64 characters.
  #
  # This should just be the name of your license. The full text of the license
  # should be inside of the gem (at the top level) when you build it.
  #
  # The simplest way is to specify the standard SPDX ID
  # https://spdx.org/licenses/ for the license.
  # Ideally, you should pick one that is OSI (Open Source Initiative)
  # https://opensource.org/licenses/ approved.
  #
  # The most commonly used OSI-approved licenses are MIT and Apache-2.0.
  # GitHub also provides a license picker at https://choosealicense.com/.
  #
  # You can also use a custom license file along with your gemspec and specify
  # a LicenseRef-<idstring>, where idstring is the name of the file containing
  # the license text.
  #
  # You should specify a license for your gem so that people know how they are
  # permitted to use it and any restrictions you're placing on it.  Not
  # specifying a license means all rights are reserved; others have no right
  # to use the code for any purpose.
  #
  # You can set multiple licenses with #licenses=
  #
  # Usage:
  #   spec.license = 'MIT'

  def license=(o)
    self.licenses = [o]
  end

  ##
  # The license(s) for the library.
  #
  # Each license must be a short name, no more than 64 characters.
  #
  # This should just be the name of your license. The full
  # text of the license should be inside of the gem when you build it.
  #
  # See #license= for more discussion
  #
  # Usage:
  #   spec.licenses = ['MIT', 'GPL-2.0']

  def licenses=(licenses)
    @licenses = Array licenses
  end

  ##
  # The metadata holds extra data for this gem that may be useful to other
  # consumers and is settable by gem authors.
  #
  # Metadata items have the following restrictions:
  #
  # * The metadata must be a Hash object
  # * All keys and values must be Strings
  # * Keys can be a maximum of 128 bytes and values can be a maximum of 1024
  #   bytes
  # * All strings must be UTF-8, no binary data is allowed
  #
  # You can use metadata to specify links to your gem's homepage, codebase,
  # documentation, wiki, mailing list, issue tracker and changelog.
  #
  #   s.metadata = {
  #     "bug_tracker_uri"   => "https://example.com/user/bestgemever/issues",
  #     "changelog_uri"     => "https://example.com/user/bestgemever/CHANGELOG.md",
  #     "documentation_uri" => "https://www.example.info/gems/bestgemever/0.0.1",
  #     "homepage_uri"      => "https://bestgemever.example.io",
  #     "mailing_list_uri"  => "https://groups.example.com/bestgemever",
  #     "source_code_uri"   => "https://example.com/user/bestgemever",
  #     "wiki_uri"          => "https://example.com/user/bestgemever/wiki",
  #     "funding_uri"       => "https://example.com/donate"
  #   }
  #
  # These links will be used on your gem's page on rubygems.org and must pass
  # validation against following regex.
  #
  #   %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z}

  attr_accessor :metadata

  ######################################################################
  # :section: Optional gemspec attributes

  ##
  # Singular (alternative) writer for #authors
  #
  # Usage:
  #
  #   spec.author = 'John Jones'

  def author=(o)
    self.authors = [o]
  end

  ##
  # The path in the gem for executable scripts.  Usually 'exe'
  #
  # Usage:
  #
  #   spec.bindir = 'exe'

  attr_accessor :bindir

  ##
  # The certificate chain used to sign this gem.  See Gem::Security for
  # details.

  attr_accessor :cert_chain

  ##
  # A message that gets displayed after the gem is installed.
  #
  # Usage:
  #
  #   spec.post_install_message = "Thanks for installing!"

  attr_accessor :post_install_message

  ##
  # The platform this gem runs on.
  #
  # This is usually Gem::Platform::RUBY or Gem::Platform::CURRENT.
  #
  # Most gems contain pure Ruby code; they should simply leave the default
  # value in place.  Some gems contain C (or other) code to be compiled into a
  # Ruby "extension".  The gem should leave the default value in place unless
  # the code will only compile on a certain type of system.  Some gems consist
  # of pre-compiled code ("binary gems").  It's especially important that they
  # set the platform attribute appropriately.  A shortcut is to set the
  # platform to Gem::Platform::CURRENT, which will cause the gem builder to set
  # the platform to the appropriate value for the system on which the build is
  # being performed.
  #
  # If this attribute is set to a non-default value, it will be included in
  # the filename of the gem when it is built such as:
  # nokogiri-1.6.0-x86-mingw32.gem
  #
  # Usage:
  #
  #   spec.platform = Gem::Platform.local

  def platform=(platform)
    @original_platform = platform

    case platform
    when Gem::Platform::CURRENT then
      @new_platform = Gem::Platform.local
      @original_platform = @new_platform.to_s

    when Gem::Platform then
      @new_platform = platform

    # legacy constants
    when nil, Gem::Platform::RUBY then
      @new_platform = Gem::Platform::RUBY
    when "mswin32" then # was Gem::Platform::WIN32
      @new_platform = Gem::Platform.new "x86-mswin32"
    when "i586-linux" then # was Gem::Platform::LINUX_586
      @new_platform = Gem::Platform.new "x86-linux"
    when "powerpc-darwin" then # was Gem::Platform::DARWIN
      @new_platform = Gem::Platform.new "ppc-darwin"
    else
      @new_platform = Gem::Platform.new platform
    end

    @platform = @new_platform.to_s

    invalidate_memoized_attributes
  end

  ##
  # Paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
  # activated.
  #--
  # See also #require_paths
  #++
  # If you have an extension you do not need to add <code>"ext"</code> to the
  # require path, the extension build process will copy the extension files
  # into "lib" for you.
  #
  # The default value is <code>"lib"</code>
  #
  # Usage:
  #
  #   # If all library files are in the root directory...
  #   spec.require_paths = ['.']

  def require_paths=(val)
    @require_paths = Array(val)
  end

  ##
  # The RubyGems version required by this gem

  attr_reader :required_rubygems_version

  ##
  # The key used to sign this gem.  See Gem::Security for details.

  attr_accessor :signing_key

  ##
  # Adds a development dependency named +gem+ with +requirements+ to this
  # gem.
  #
  # Usage:
  #
  #   spec.add_development_dependency 'example', '~> 1.1', '>= 1.1.4'
  #
  # Development dependencies aren't installed by default and aren't
  # activated when a gem is required.

  def add_development_dependency(gem, *requirements)
    add_dependency_with_type(gem, :development, requirements)
  end

  ##
  # Adds a runtime dependency named +gem+ with +requirements+ to this gem.
  #
  # Usage:
  #
  #   spec.add_dependency 'example', '~> 1.1', '>= 1.1.4'

  def add_dependency(gem, *requirements)
    if requirements.uniq.size != requirements.size
      warn "WARNING: duplicated #{gem} dependency #{requirements}"
    end

    add_dependency_with_type(gem, :runtime, requirements)
  end

  ##
  # Executables included in the gem.
  #
  # For example, the rake gem has rake as an executable. You don't specify the
  # full path (as in bin/rake); all application-style files are expected to be
  # found in bindir.  These files must be executable Ruby files.  Files that
  # use bash or other interpreters will not work.
  #
  # Executables included may only be ruby scripts, not scripts for other
  # languages or compiled binaries.
  #
  # Usage:
  #
  #   spec.executables << 'rake'

  def executables
    @executables ||= []
  end

  ##
  # Extensions to build when installing the gem, specifically the paths to
  # extconf.rb-style files used to compile extensions.
  #
  # These files will be run when the gem is installed, causing the C (or
  # whatever) code to be compiled on the user's machine.
  #
  # Usage:
  #
  #  spec.extensions << 'ext/rmagic/extconf.rb'
  #
  # See Gem::Ext::Builder for information about writing extensions for gems.

  def extensions
    @extensions ||= []
  end

  ##
  # Extra files to add to RDoc such as README or doc/examples.txt
  #
  # When the user elects to generate the RDoc documentation for a gem (typically
  # at install time), all the library files are sent to RDoc for processing.
  # This option allows you to have some non-code files included for a more
  # complete set of documentation.
  #
  # Usage:
  #
  #  spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']

  def extra_rdoc_files
    @extra_rdoc_files ||= []
  end

  ##
  # The version of RubyGems that installed this gem.  Returns
  # <code>Gem::Version.new(0)</code> for gems installed by versions earlier
  # than RubyGems 2.2.0.

  def installed_by_version # :nodoc:
    @installed_by_version ||= Gem::Version.new(0)
  end

  ##
  # Sets the version of RubyGems that installed this gem.  See also
  # #installed_by_version.

  def installed_by_version=(version) # :nodoc:
    @installed_by_version = Gem::Version.new version
  end

  ##
  # Specifies the rdoc options to be used when generating API documentation.
  #
  # Usage:
  #
  #   spec.rdoc_options << '--title' << 'Rake -- Ruby Make' <<
  #     '--main' << 'README' <<
  #     '--line-numbers'

  def rdoc_options
    @rdoc_options ||= []
  end

  LATEST_RUBY_WITHOUT_PATCH_VERSIONS = Gem::Version.new("2.1")

  ##
  # The version of Ruby required by this gem.  The ruby version can be
  # specified to the patch-level:
  #
  #   $ ruby -v -e 'p Gem.ruby_version'
  #   ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
  #   #<Gem::Version "2.0.0.247">
  #
  # Prereleases can also be specified.
  #
  # Usage:
  #
  #  # This gem will work with 1.8.6 or greater...
  #  spec.required_ruby_version = '>= 1.8.6'
  #
  #  # Only with final releases of major version 2 where minor version is at least 3
  #  spec.required_ruby_version = '~> 2.3'
  #
  #  # Only prereleases or final releases after 2.6.0.preview2
  #  spec.required_ruby_version = '> 2.6.0.preview2'
  #
  #  # This gem will work with 2.3.0 or greater, including major version 3, but lesser than 4.0.0
  #  spec.required_ruby_version = '>= 2.3', '< 4'

  def required_ruby_version=(req)
    @required_ruby_version = Gem::Requirement.create req

    @required_ruby_version.requirements.map! do |op, v|
      if v >= LATEST_RUBY_WITHOUT_PATCH_VERSIONS && v.release.segments.size == 4
        [op == "~>" ? "=" : op, Gem::Version.new(v.segments.tap {|s| s.delete_at(3) }.join("."))]
      else
        [op, v]
      end
    end
  end

  ##
  # The RubyGems version required by this gem

  def required_rubygems_version=(req)
    @required_rubygems_version = Gem::Requirement.create req
  end

  ##
  # Lists the external (to RubyGems) requirements that must be met for this gem
  # to work.  It's simply information for the user.
  #
  # Usage:
  #
  #   spec.requirements << 'libmagick, v6.0'
  #   spec.requirements << 'A good graphics card'

  def requirements
    @requirements ||= []
  end

  ##
  # A collection of unit test files.  They will be loaded as unit tests when
  # the user requests a gem to be unit tested.
  #
  # Usage:
  #   spec.test_files = Dir.glob('test/tc_*.rb')
  #   spec.test_files = ['tests/test-suite.rb']

  def test_files=(files) # :nodoc:
    @test_files = Array files
  end

  ######################################################################
  # :section: Read-only attributes

  ##
  # The version of RubyGems used to create this gem.

  attr_accessor :rubygems_version

  ##
  # The path where this gem installs its extensions.

  def extensions_dir
    @extensions_dir ||= super
  end

  ######################################################################
  # :section: Specification internals

  ##
  # True when this gemspec has been activated. This attribute is not persisted.

  attr_accessor :activated

  alias_method :activated?, :activated

  ##
  # Autorequire was used by old RubyGems to automatically require a file.
  #
  # Deprecated: It is neither supported nor functional.

  attr_accessor :autorequire # :nodoc:

  ##
  # Sets the default executable for this gem.
  #
  # Deprecated: You must now specify the executable name to  Gem.bin_path.

  attr_writer :default_executable
  rubygems_deprecate :default_executable=

  ##
  # Allows deinstallation of gems with legacy platforms.

  attr_writer :original_platform # :nodoc:

  ##
  # The Gem::Specification version of this gemspec.
  #
  # Do not set this, it is set automatically when the gem is packaged.

  attr_accessor :specification_version

  def self._all # :nodoc:
    specification_record.all
  end

  def self.clear_load_cache # :nodoc:
    @load_cache_mutex.synchronize do
      @load_cache.clear
    end
  end
  private_class_method :clear_load_cache

  def self.gem_path # :nodoc:
    Gem.path
  end
  private_class_method :gem_path

  def self.each_gemspec(dirs) # :nodoc:
    dirs.each do |dir|
      Gem::Util.glob_files_in_dir("*.gemspec", dir).each do |path|
        yield path
      end
    end
  end

  def self.gemspec_stubs_in(dir, pattern) # :nodoc:
    Gem::Util.glob_files_in_dir(pattern, dir).map {|path| yield path }.select(&:valid?)
  end

  def self.each_spec(dirs) # :nodoc:
    each_gemspec(dirs) do |path|
      spec = self.load path
      yield spec if spec
    end
  end

  ##
  # Returns a Gem::StubSpecification for every installed gem

  def self.stubs
    specification_record.stubs
  end

  ##
  # Returns a Gem::StubSpecification for default gems

  def self.default_stubs(pattern = "*.gemspec")
    base_dir = Gem.default_dir
    gems_dir = File.join base_dir, "gems"
    gemspec_stubs_in(Gem.default_specifications_dir, pattern) do |path|
      Gem::StubSpecification.default_gemspec_stub(path, base_dir, gems_dir)
    end
  end

  ##
  # Returns a Gem::StubSpecification for installed gem named +name+
  # only returns stubs that match Gem.platforms

  def self.stubs_for(name)
    specification_record.stubs_for(name)
  end

  ##
  # Finds stub specifications matching a pattern from the standard locations,
  # optionally filtering out specs not matching the current platform
  #
  def self.stubs_for_pattern(pattern, match_platform = true) # :nodoc:
    specification_record.stubs_for_pattern(pattern, match_platform)
  end

  def self._resort!(specs) # :nodoc:
    specs.sort! do |a, b|
      names = a.name <=> b.name
      next names if names.nonzero?
      versions = b.version <=> a.version
      next versions if versions.nonzero?
      platforms = Gem::Platform.sort_priority(b.platform) <=> Gem::Platform.sort_priority(a.platform)
      next platforms if platforms.nonzero?
      default_gem = a.default_gem_priority <=> b.default_gem_priority
      next default_gem if default_gem.nonzero?
      a.base_dir_priority(gem_path) <=> b.base_dir_priority(gem_path)
    end
  end

  ##
  # Loads the default specifications. It should be called only once.

  def self.load_defaults
    each_spec([Gem.default_specifications_dir]) do |spec|
      # #load returns nil if the spec is bad, so we just ignore
      # it at this stage
      Gem.register_default_spec(spec)
    end
  end

  ##
  # Adds +spec+ to the known specifications, keeping the collection
  # properly sorted.

  def self.add_spec(spec)
    specification_record.add_spec(spec)
  end

  ##
  # Removes +spec+ from the known specs.

  def self.remove_spec(spec)
    specification_record.remove_spec(spec)
  end

  ##
  # Returns all specifications. This method is discouraged from use.
  # You probably want to use one of the Enumerable methods instead.

  def self.all
    warn "NOTE: Specification.all called from #{caller(1, 1).first}" unless
      Gem::Deprecate.skip
    _all
  end

  ##
  # Sets the known specs to +specs+.

  def self.all=(specs)
    specification_record.all = specs
  end

  ##
  # Return full names of all specs in sorted order.

  def self.all_names
    specification_record.all_names
  end

  ##
  # Return the list of all array-oriented instance variables.
  #--
  # Not sure why we need to use so much stupid reflection in here...

  def self.array_attributes
    @@array_attributes.dup
  end

  ##
  # Return the list of all instance variables.
  #--
  # Not sure why we need to use so much stupid reflection in here...

  def self.attribute_names
    @@attributes.dup
  end

  ##
  # Return the directories that Specification uses to find specs.

  def self.dirs
    @@dirs ||= Gem::SpecificationRecord.dirs_from(gem_path)
  end

  ##
  # Set the directories that Specification uses to find specs. Setting
  # this resets the list of known specs.

  def self.dirs=(dirs)
    reset

    @@dirs = Gem::SpecificationRecord.dirs_from(Array(dirs))
  end

  extend Enumerable

  ##
  # Enumerate every known spec.  See ::dirs= and ::add_spec to set the list of
  # specs.

  def self.each(&block)
    specification_record.each(&block)
  end

  ##
  # Returns every spec that matches +name+ and optional +requirements+.

  def self.find_all_by_name(name, *requirements)
    specification_record.find_all_by_name(name, *requirements)
  end

  ##
  # Returns every spec that has the given +full_name+

  def self.find_all_by_full_name(full_name)
    stubs.select {|s| s.full_name == full_name }.map(&:to_spec)
  end

  ##
  # Find the best specification matching a +name+ and +requirements+. Raises
  # if the dependency doesn't resolve to a valid specification.

  def self.find_by_name(name, *requirements)
    requirements = Gem::Requirement.default if requirements.empty?

    Gem::Dependency.new(name, *requirements).to_spec
  end

  ##
  # Find the best specification matching a +full_name+.
  def self.find_by_full_name(full_name)
    stubs.find {|s| s.full_name == full_name }&.to_spec
  end

  ##
  # Return the best specification that contains the file matching +path+.

  def self.find_by_path(path)
    specification_record.find_by_path(path)
  end

  ##
  # Return the best specification that contains the file matching +path+
  # amongst the specs that are not activated.

  def self.find_inactive_by_path(path)
    specification_record.find_inactive_by_path(path)
  end

  ##
  # Return the best specification that contains the file matching +path+, among
  # those already activated.

  def self.find_active_stub_by_path(path)
    specification_record.find_active_stub_by_path(path)
  end

  ##
  # Return currently unresolved specs that contain the file matching +path+.

  def self.find_in_unresolved(path)
    unresolved_specs.find_all {|spec| spec.contains_requirable_file? path }
  end

  ##
  # Search through all unresolved deps and sub-dependencies and return
  # specs that contain the file matching +path+.

  def self.find_in_unresolved_tree(path)
    unresolved_specs.each do |spec|
      spec.traverse do |_from_spec, _dep, to_spec, trail|
        if to_spec.has_conflicts? || to_spec.conficts_when_loaded_with?(trail)
          :next
        else
          return trail.reverse if to_spec.contains_requirable_file? path
        end
      end
    end

    []
  end

  def self.unresolved_specs
    unresolved_deps.values.flat_map(&:to_specs)
  end
  private_class_method :unresolved_specs

  ##
  # Special loader for YAML files.  When a Specification object is loaded
  # from a YAML file, it bypasses the normal Ruby object initialization
  # routine (#initialize).  This method makes up for that and deals with
  # gems of different ages.
  #
  # +input+ can be anything that YAML.load() accepts: String or IO.

  def self.from_yaml(input)
    Gem.load_yaml

    input = normalize_yaml_input input
    spec = Gem::SafeYAML.safe_load input

    if spec && spec.class == FalseClass
      raise Gem::EndOfYAMLException
    end

    unless Gem::Specification === spec
      raise Gem::Exception, "YAML data doesn't evaluate to gem specification"
    end

    spec.specification_version ||= NONEXISTENT_SPECIFICATION_VERSION
    spec.reset_nil_attributes_to_default
    spec.flatten_require_paths

    spec
  end

  ##
  # Return the latest specs, optionally including prerelease specs if
  # +prerelease+ is true.

  def self.latest_specs(prerelease = false)
    specification_record.latest_specs(prerelease)
  end

  ##
  # Return the latest installed spec for gem +name+.

  def self.latest_spec_for(name)
    specification_record.latest_spec_for(name)
  end

  def self._latest_specs(specs, prerelease = false) # :nodoc:
    result = {}

    specs.reverse_each do |spec|
      unless prerelease
        next if spec.version.prerelease?
      end

      result[spec.name] = spec
    end

    result.flat_map(&:last).sort_by(&:name)
  end

  ##
  # Loads Ruby format gemspec from +file+.

  def self.load(file)
    return unless file

    spec = @load_cache_mutex.synchronize { @load_cache[file] }
    return spec if spec

    return unless File.file?(file)

    code = Gem.open_file(file, "r:UTF-8:-", &:read)

    begin
      spec = eval code, binding, file

      if Gem::Specification === spec
        spec.loaded_from = File.expand_path file.to_s
        @load_cache_mutex.synchronize do
          prev = @load_cache[file]
          if prev
            spec = prev
          else
            @load_cache[file] = spec
          end
        end
        return spec
      end

      warn "[#{file}] isn't a Gem::Specification (#{spec.class} instead)."
    rescue SignalException, SystemExit
      raise
    rescue SyntaxError, StandardError => e
      warn "Invalid gemspec in [#{file}]: #{e}"
    end

    nil
  end

  ##
  # Specification attributes that must be non-nil

  def self.non_nil_attributes
    @@non_nil_attributes.dup
  end

  ##
  # Make sure the YAML specification is properly formatted with dashes

  def self.normalize_yaml_input(input)
    result = input.respond_to?(:read) ? input.read : input
    result = "--- " + result unless result.start_with?("--- ")
    result = result.dup
    result.gsub!(/ !!null \n/, " \n")
    # date: 2011-04-26 00:00:00.000000000Z
    # date: 2011-04-26 00:00:00.000000000 Z
    result.gsub!(/^(date: \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+?)Z/, '\1 Z')
    result
  end

  ##
  # Return a list of all outdated local gem names.  This method is HEAVY
  # as it must go fetch specifications from the server.
  #
  # Use outdated_and_latest_version if you wish to retrieve the latest remote
  # version as well.

  def self.outdated
    outdated_and_latest_version.map {|local, _| local.name }
  end

  ##
  # Enumerates the outdated local gems yielding the local specification and
  # the latest remote version.
  #
  # This method may take some time to return as it must check each local gem
  # against the server's index.

  def self.outdated_and_latest_version
    return enum_for __method__ unless block_given?

    # TODO: maybe we should switch to rubygems' version service?
    fetcher = Gem::SpecFetcher.fetcher

    latest_specs(true).each do |local_spec|
      dependency =
        Gem::Dependency.new local_spec.name, ">= #{local_spec.version}"

      remotes, = fetcher.search_for_dependency dependency
      remotes  = remotes.map {|n, _| n.version }

      latest_remote = remotes.sort.last

      yield [local_spec, latest_remote] if
        latest_remote && local_spec.version < latest_remote
    end

    nil
  end

  ##
  # Is +name+ a required attribute?

  def self.required_attribute?(name)
    @@required_attributes.include? name.to_sym
  end

  ##
  # Required specification attributes

  def self.required_attributes
    @@required_attributes.dup
  end

  ##
  # Reset the list of known specs, running pre and post reset hooks
  # registered in Gem.

  def self.reset
    @@dirs = nil
    Gem.pre_reset_hooks.each(&:call)
    @specification_record = nil
    clear_load_cache

    unless unresolved_deps.empty?
      unresolved = unresolved_deps.filter_map do |name, dep|
        matching_versions = find_all_by_name(name)
        next if dep.latest_version? && matching_versions.any?(&:default_gem?)

        [dep, matching_versions.uniq(&:full_name)]
      end.to_h

      unless unresolved.empty?
        warn "WARN: Unresolved or ambiguous specs during Gem::Specification.reset:"
        unresolved.each do |dep, versions|
          warn "      #{dep}"

          unless versions.empty?
            warn "      Available/installed versions of this gem:"
            versions.each {|s| warn "      - #{s.version}" }
          end
        end
        warn "WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'"
        warn "Please report a bug if this causes problems."
      end

      unresolved_deps.clear
    end
    Gem.post_reset_hooks.each(&:call)
  end

  ##
  # Keeps track of all currently known specifications

  def self.specification_record
    @specification_record ||= Gem::SpecificationRecord.new(dirs)
  end

  # DOC: This method needs documented or nodoc'd
  def self.unresolved_deps
    @unresolved_deps ||= Hash.new {|h, n| h[n] = Gem::Dependency.new n }
  end

  ##
  # Load custom marshal format, re-initializing defaults as needed

  def self._load(str)
    Gem.load_yaml
    Gem.load_safe_marshal

    yaml_set = false
    retry_count = 0

    array = begin
      Gem::SafeMarshal.safe_load str
    rescue ArgumentError => e
      # Avoid an infinite retry loop when the argument error has nothing to do
      # with the classes not being defined.
      # 1 retry each allowed in case all 3 of
      # - YAML
      # - YAML::Syck::DefaultKey
      # - YAML::PrivateType
      # need to be defined
      raise if retry_count >= 3

      #
      # Some very old marshaled specs included references to `YAML::PrivateType`
      # and `YAML::Syck::DefaultKey` constants due to bugs in the old emitter
      # that generated them. Workaround the issue by defining the necessary
      # constants and retrying.
      #
      message = e.message
      raise unless message.include?("YAML::")

      unless Object.const_defined?(:YAML)
        Object.const_set "YAML", Psych
        yaml_set = true
      end

      if message.include?("YAML::Syck::")
        YAML.const_set "Syck", YAML unless YAML.const_defined?(:Syck)

        YAML::Syck.const_set "DefaultKey", Class.new if message.include?("YAML::Syck::DefaultKey") && !YAML::Syck.const_defined?(:DefaultKey)
      elsif message.include?("YAML::PrivateType") && !YAML.const_defined?(:PrivateType)
        YAML.const_set "PrivateType", Class.new
      end

      retry_count += 1
      retry
    ensure
      Object.__send__(:remove_const, "YAML") if yaml_set
    end

    spec = Gem::Specification.new
    spec.instance_variable_set :@specification_version, array[1]

    current_version = CURRENT_SPECIFICATION_VERSION

    field_count = if spec.specification_version > current_version
      spec.instance_variable_set :@specification_version,
                                 current_version
      MARSHAL_FIELDS[current_version]
    else
      MARSHAL_FIELDS[spec.specification_version]
    end

    if array.size < field_count
      raise TypeError, "invalid Gem::Specification format #{array.inspect}"
    end

    spec.instance_variable_set :@rubygems_version,          array[0]
    # spec version
    spec.instance_variable_set :@name,                      array[2]
    spec.instance_variable_set :@version,                   array[3]
    spec.date =                                             array[4]
    spec.instance_variable_set :@summary,                   array[5]
    spec.instance_variable_set :@required_ruby_version,     array[6]
    spec.instance_variable_set :@required_rubygems_version, array[7]
    spec.platform =                                         array[8]
    spec.instance_variable_set :@dependencies,              array[9]
    # offset due to rubyforge_project removal
    spec.instance_variable_set :@email,                     array[11]
    spec.instance_variable_set :@authors,                   array[12]
    spec.instance_variable_set :@description,               array[13]
    spec.instance_variable_set :@homepage,                  array[14]
    spec.instance_variable_set :@has_rdoc,                  array[15]
    spec.instance_variable_set :@licenses,                  array[17]
    spec.instance_variable_set :@metadata,                  array[18]
    spec.instance_variable_set :@loaded,                    false
    spec.instance_variable_set :@activated,                 false

    spec
  end

  def <=>(other) # :nodoc:
    sort_obj <=> other.sort_obj
  end

  def ==(other) # :nodoc:
    self.class === other &&
      name == other.name &&
      version == other.version &&
      platform == other.platform
  end

  ##
  # Dump only crucial instance variables.
  #--
  # MAINTAIN ORDER!
  # (down with the man)

  def _dump(limit)
    Marshal.dump [
      @rubygems_version,
      @specification_version,
      @name,
      @version,
      date,
      @summary,
      @required_ruby_version,
      @required_rubygems_version,
      @original_platform,
      @dependencies,
      "", # rubyforge_project
      @email,
      @authors,
      @description,
      @homepage,
      true, # has_rdoc
      @new_platform,
      @licenses,
      @metadata,
    ]
  end

  ##
  # Activate this spec, registering it as a loaded spec and adding
  # it's lib paths to $LOAD_PATH. Returns true if the spec was
  # activated, false if it was previously activated. Freaks out if
  # there are conflicts upon activation.

  def activate
    other = Gem.loaded_specs[name]
    if other
      check_version_conflict other
      return false
    end

    raise_if_conflicts

    activate_dependencies
    add_self_to_load_path

    Gem.loaded_specs[name] = self
    @activated = true
    @loaded = true

    true
  end

  ##
  # Activate all unambiguously resolved runtime dependencies of this
  # spec. Add any ambiguous dependencies to the unresolved list to be
  # resolved later, as needed.

  def activate_dependencies
    unresolved = Gem::Specification.unresolved_deps

    runtime_dependencies.each do |spec_dep|
      if loaded = Gem.loaded_specs[spec_dep.name]
        next if spec_dep.matches_spec? loaded

        msg = "can't satisfy '#{spec_dep}', already activated '#{loaded.full_name}'"
        e = Gem::LoadError.new msg
        e.name = spec_dep.name

        raise e
      end

      specs = spec_dep.matching_specs(true).uniq(&:full_name)

      if specs.size == 0
        raise Gem::MissingSpecError.new(spec_dep.name, spec_dep.requirement, "at: #{spec_file}")
      elsif specs.size == 1
        specs.first.activate
      else
        name = spec_dep.name
        unresolved[name] = unresolved[name].merge spec_dep
      end
    end

    unresolved.delete self.name
  end

  ##
  # Abbreviate the spec for downloading.  Abbreviated specs are only used for
  # searching, downloading and related activities and do not need deployment
  # specific information (e.g. list of files).  So we abbreviate the spec,
  # making it much smaller for quicker downloads.

  def abbreviate
    self.files = []
    self.test_files = []
    self.rdoc_options = []
    self.extra_rdoc_files = []
    self.cert_chain = []
  end

  ##
  # Sanitize the descriptive fields in the spec.  Sometimes non-ASCII
  # characters will garble the site index.  Non-ASCII characters will
  # be replaced by their XML entity equivalent.

  def sanitize
    self.summary              = sanitize_string(summary)
    self.description          = sanitize_string(description)
    self.post_install_message = sanitize_string(post_install_message)
    self.authors              = authors.collect {|a| sanitize_string(a) }
  end

  ##
  # Sanitize a single string.

  def sanitize_string(string)
    return string unless string

    # HACK: the #to_s is in here because RSpec has an Array of Arrays of
    # Strings for authors.  Need a way to disallow bad values on gemspec
    # generation.  (Probably won't happen.)
    string.to_s
  end

  ##
  # Returns an array with bindir attached to each executable in the
  # +executables+ list

  def add_bindir(executables)
    return nil if executables.nil?

    if @bindir
      Array(executables).map {|e| File.join(@bindir, e) }
    else
      executables
    end
  rescue StandardError
    nil
  end

  ##
  # Adds a dependency on gem +dependency+ with type +type+ that requires
  # +requirements+.  Valid types are currently <tt>:runtime</tt> and
  # <tt>:development</tt>.

  def add_dependency_with_type(dependency, type, requirements)
    requirements = if requirements.empty?
      Gem::Requirement.default
    else
      requirements.flatten
    end

    unless dependency.respond_to?(:name) &&
           dependency.respond_to?(:requirement)
      dependency = Gem::Dependency.new(dependency.to_s, requirements, type)
    end

    dependencies << dependency
  end

  private :add_dependency_with_type

  alias_method :add_runtime_dependency, :add_dependency

  ##
  # Adds this spec's require paths to LOAD_PATH, in the proper location.

  def add_self_to_load_path
    return if default_gem?

    paths = full_require_paths

    Gem.add_to_load_path(*paths)
  end

  ##
  # Singular reader for #authors.  Returns the first author in the list

  def author
    (val = authors) && val.first
  end

  ##
  # The list of author names who wrote this gem.
  #
  #   spec.authors = ['Chad Fowler', 'Jim Weirich', 'Rich Kilmer']

  def authors
    @authors ||= []
  end

  ##
  # Returns the full path to installed gem's bin directory.
  #
  # NOTE: do not confuse this with +bindir+, which is just 'bin', not
  # a full path.

  def bin_dir
    @bin_dir ||= File.join gem_dir, bindir
  end

  ##
  # Returns the full path to an executable named +name+ in this gem.

  def bin_file(name)
    File.join bin_dir, name
  end

  ##
  # Returns the build_args used to install the gem

  def build_args
    if File.exist? build_info_file
      build_info = File.readlines build_info_file
      build_info = build_info.map(&:strip)
      build_info.delete ""
      build_info
    else
      []
    end
  end

  ##
  # Builds extensions for this platform if the gem has extensions listed and
  # the gem.build_complete file is missing.

  def build_extensions # :nodoc:
    return if extensions.empty?
    return if default_gem?
    # we need to fresh build when same name and version of default gems
    return if self.class.find_by_full_name(full_name)&.default_gem?
    return if File.exist? gem_build_complete_path
    return unless File.writable?(base_dir)
    return unless File.exist?(File.join(base_dir, "extensions"))

    begin
      # We need to require things in $LOAD_PATH without looking for the
      # extension we are about to build.
      unresolved_deps = Gem::Specification.unresolved_deps.dup
      Gem::Specification.unresolved_deps.clear

      require_relative "config_file"
      require_relative "ext"
      require_relative "user_interaction"

      ui = Gem::SilentUI.new
      Gem::DefaultUserInteraction.use_ui ui do
        builder = Gem::Ext::Builder.new self
        builder.build_extensions
      end
    ensure
      ui&.close
      Gem::Specification.unresolved_deps.replace unresolved_deps
    end
  end

  ##
  # Returns the full path to the build info directory

  def build_info_dir
    File.join base_dir, "build_info"
  end

  ##
  # Returns the full path to the file containing the build
  # information generated when the gem was installed

  def build_infrubygems/rubygems/psych_tree.rb000064400000001433150403134230012724 0ustar00.name]
      if spec && !spec.satisfies_requirement?(dep)
        (conflicts[spec] ||= []) << dep
      end
    end
    env_req = Gem.env_requirement(name)
    (conflicts[self] ||= []) << env_req unless env_req.satisfied_by? version
    conflicts
  end

  ##
  # return true if there will be conflict when spec if loaded together with the list of specs.

  def conficts_when_loaded_with?(list_of_specs) # :nodoc:
    result = list_of_specs.any? do |spec|
      spec.runtime_dependencies.any? {|dep| (dep.name == name) && !satisfies_requirement?(dep) }
    end
    result
  end

  ##
  # Return true if there are possible conflicts against the currently loaded specs.

  def has_conflicts?
    return true unless Gem.env_requirement(name).satisfied_by?(version)
    runtime_dependencies.any? do |rubygems/rubygems/safe_yaml.rb000064400000003052150403134230012516 0ustar00  (\s+ \d{2}:\d{2}:\d{2}\.\d+ \s* (Z | [-+]\d\d:\d\d) )?
     \Z/x

  ##
  # The date this gem was created
  #
  # DO NOT set this, it is set automatically when the gem is packaged.

  def date=(date)
    # We want to end up with a Time object with one-day resolution.
    # This is the cleanest, most-readable, faster-than-using-Date
    # way to do it.
    @date = case date
            when String then
              if DateTimeFormat =~ date
                Time.utc($1.to_i, $2.to_i, $3.to_i)
              else
                raise(Gem::InvalidSpecificationException,
                      "invalid date format in specification: #{date.inspect}")
              end
            when Time, DateLike then
              Time.utc(date.year, date.month, date.day)
            else
              TODAY
    end
  end

  ##
  # The default executable for this gem.
  #
  # Deprecated: The name of the gem is assumed to be the name of the
  # executable now.  See Gem.bin_path.

  def default_executable # :nodoc:
    if defined?(@default_executable) && @default_executable
      result = @default_executable
    elsif @executables && @executables.size == 1
      result = Array(@executables).first
    else
      result = nil
    end
    result
  end
  rubygems_deprecate :default_executable

  ##
  # The default value for specification attribute +name+

  def default_value(name)
    @@default_value[name]
  end

  ##
  # A list of Gem::Dependency objects this gem depends on.
  #
  # Use #add_dependency or #add_development_dependency to add dependencies to
  # a gem.

  def drubygems/rubygems/compatibility.rb000064400000002003150403134230013422 0ustar00
  def development_dependencies
    dependencies.select {|d| d.type == :development }
  end

  ##
  # Returns the full path to this spec's documentation directory.  If +type+
  # is given it will be appended to the end.  For example:
  #
  #   spec.doc_dir      # => "/path/to/gem_repo/doc/a-1"
  #
  #   spec.doc_dir 'ri' # => "/path/to/gem_repo/doc/a-1/ri"

  def doc_dir(type = nil)
    @doc_dir ||= File.join base_dir, "doc", full_name

    if type
      File.join @doc_dir, type
    else
      @doc_dir
    end
  end

  def encode_with(coder) # :nodoc:
    coder.add "name", @name
    coder.add "version", @version
    coder.add "platform", platform.to_s
    coder.add "original_platform", original_platform.to_s if platform.to_s != original_platform.to_s

    attributes = @@attributes.map(&:to_s) - %w[name version platform]
    attributes.each do |name|
      value = instance_variable_get("@#{name}")
      coder.add name, value unless value.nil?
    end
  end

  def eql?(other) # :nodoc:
    self.class === other && rubygems/rubygems/name_tuple.rb000064400000004615150403134230012715 0ustar00ication.each do |spec|
      yield spec if spec.satisfies_requirement? dep
    end
  end

  private :find_all_satisfiers

  ##
  # Creates a duplicate spec without large blobs that aren't used at runtime.

  def for_cache
    spec = dup

    spec.files = nil
    spec.test_files = nil

    spec
  end

  def full_name
    @full_name ||= super
  end

  ##
  # Work around old bundler versions removing my methods
  # Can be removed once RubyGems can no longer install Bundler 2.5

  def gem_dir # :nodoc:
    super
  end

  def gems_dir
    @gems_dir ||= File.join(base_dir, "gems")
  end

  ##
  # Deprecated and ignored, defaults to true.
  #
  # Formerly used to indicate this gem was RDoc-capable.

  def has_rdoc # :nodoc:
    true
  end
  rubygems_deprecate :has_rdoc

  ##
  # Deprecated and ignored.
  #
  # Formerly used to indicate this gem was RDoc-capable.

  def has_rdoc=(ignored) # :nodoc:
    @has_rdoc = true
  end
  rubygems_deprecate :has_rdoc=

  alias_method :has_rdoc?, :has_rdoc # :nodoc:
  rubygems_deprecate :has_rdoc?

  ##
  # True if this gem has files in test_files

  def has_unit_tests? # :nodoc:
    !test_files.empty?
  end

  # :stopdoc:
  alias_method :has_test_suite?, :has_unit_tests?
  # :startdoc:

  def hash # :nodoc:
    name.hash ^ version.hash
  end

  def init_with(coder) # :nodoc:
    @installed_by_version ||= nil
    yaml_initialize coder.tag, coder.map
  end

  eval <<-RUBY, binding, __FILE__, __LINE__ + 1
    # frozen_string_literal: true

    def set_nil_attributes_to_nil
      #{@@nil_attributes.map {|key| "@#{key} = nil" }.join "; "}
    end
    private :set_nil_attributes_to_nil

    def set_not_nil_attributes_to_default_values
      #{@@non_nil_attributes.map {|key| "@#{key} = #{INITIALIZE_CODE_FOR_DEFAULTS[key]}" }.join ";"}
    end
    private :set_not_nil_attributes_to_default_values
  RUBY

  ##
  # Specification constructor. Assigns the default values to the attributes
  # and yields itself for further initialization.  Optionally takes +name+ and
  # +version+.

  def initialize(name = nil, version = nil)
    super()
    @gems_dir              = nil
    @base_dir              = nil
    @loaded = false
    @activated = false
    @loaded_from = nil
    @original_platform = nil
    @installed_by_version = nil

    set_nil_attributes_to_nil
    set_not_nil_attributes_to_default_values

    @new_platform = Gem::Platform::RUBY

    self.name = name if name
    self.versirubygems/rubygems/command.rb000064400000040117150403134230012177 0ustar00.configuration.really_verbose
          warn "WARNING: #{full_name} has an invalid nil value for #{name}"
        end
      rescue TypeError
        e = Gem::FormatException.new \
          "#{full_name} has an invalid value for #{name}"

        e.file_path = loaded_from
        raise e
      end
    end

    @required_ruby_version = other_spec.required_ruby_version.dup
    @required_rubygems_version = other_spec.required_rubygems_version.dup
  end

  def base_dir
    return Gem.dir unless loaded_from
    @base_dir ||= if default_gem?
      File.dirname File.dirname File.dirname loaded_from
    else
      File.dirname File.dirname loaded_from
    end
  end

  ##
  # Expire memoized instance variables that can incorrectly generate, replace
  # or miss files due changes in certain attributes used to compute them.

  def invalidate_memoized_attributes
    @full_name = nil
    @cache_file = nil
  end

  private :invalidate_memoized_attributes

  def inspect # :nodoc:
    if $DEBUG
      super
    else
      "#{super[0..-2]} #{full_name}>"
    end
  end

  ##
  # Files in the Gem under one of the require_paths

  def lib_files
    @files.select do |file|
      require_paths.any? do |path|
        file.start_with? path
      end
    end
  end

  ##
  # Singular accessor for #licenses

  def license
    licenses.first
  end

  ##
  # Plural accessor for setting licenses
  #
  # See #license= for details

  def licenses
    @licenses ||= []
  end

  def internal_init # :nodoc:
    super
    @bin_dir       = nil
    @cache_dir     = nil
    @cache_file    = nil
    @doc_dir       = nil
    @ri_dir        = nil
    @spec_dir      = nil
    @spec_file     = nil
  end

  ##
  # Track removed method calls to warn about during build time.
  # Warn about unknown attributes while loading a spec.

  def method_missing(sym, *a, &b) # :nodoc:
    if REMOVED_METHODS.include?(sym)
      removed_method_calls << sym
      return
    end

    if @specification_version > CURRENT_SPECIFICATION_VERSION &&
       sym.to_s.end_with?("=")
      warn "ignoring #{sym} loading #{full_name}" if $DEBUG
    else
      super
    end
  end

  ##
  # Is this specification missing its extensions?  When this returns true you
  # probably want to build_extensions

  def missing_extensions?
    return false if extensions.empty?
    return false if default_gem?
    return false if File.exist? gem_build_complete_path

    true
  end

  ##
  # Normalize the list of files so that:
  # * All file lists have redundancies removed.
  # * Files referenced in the extra_rdoc_files are included in the package
  #   file list.

  def normalize
    if defined?(@extra_rdoc_files) && @extra_rdoc_files
      @extra_rdoc_files.uniq!
      @files ||= []
      @files.concat(@extra_rdoc_files)
    end

    @files            = @files.uniq.sort if @files
    @extensions       = @extensions.uniq.sort if @extensions
    @test_files       = @test_files.uniq.sort if @test_files
    @executables      = @executables.uniq.sort if @executables
    @extra_rdoc_files = @extra_rdoc_files.uniq.sort if @extra_rdoc_files
  end

  ##
  # Return a NameTuple that represents this Specification

  def name_tuple
    Gem::NameTuple.new name, version, original_platform
  end

  ##
  # Returns the full name (name-version) of this gemspec using the original
  # platform.  For use with legacy gems.

  def original_name # :nodoc:
    if platform == Gem::Platform::RUBY || platform.nil?
      "#{@name}-#{@version}"
    else
      "#{@name}-#{@version}-#{@original_platform}"
    end
  end

  ##
  # Cruft. Use +platform+.

  def original_platform # :nodoc:
    @original_platform ||= platform
  end

  ##
  # The platform this gem runs on.  See Gem::Platform for details.

  def platform
    @new_platform ||= Gem::Platform::RUBY # rubocop:disable Naming/MemoizedInstanceVariableName
  end

  def pretty_print(q) # :nodoc:
    q.group 2, "Gem::Specification.new do |s|", "end" do
      q.breakable

      attributes = @@attributes - [:name, :version]
      attributes.unshift :installed_by_version
      attributes.unshift :version
      attributes.unshift :name

      attributes.each do |attr_name|
        current_value = send attr_name
        current_value = current_value.sort if [:files, :test_files].include? attr_name
        next unless current_value != default_value(attr_name) ||
                    self.class.required_attribute?(attr_name)

        q.text "s.#{attr_name} = "

        if attr_name == :date
          current_value = current_value.utc

          q.text "Time.utc(#{current_value.year}, #{current_value.month}, #{current_value.day})"
        else
          q.pp current_value
        end

        q.breakable
      end
    end
  end

  ##
  # Raise an exception if the version of this spec conflicts with the one
  # that is already loaded (+other+)

  def check_version_conflict(other) # :nodoc:
    return if version == other.version

    # This gem is already loaded.  If the currently loaded gem is not in the
    # list of candidate gems, then we have a version conflict.

    msg = "can't activate #{full_name}, already activated #{other.full_name}"

    e = Gem::LoadError.new msg
    e.name = name

    raise e
  end

  private :check_version_conflict

  ##
  # Check the spec for possible conflicts and freak out if there are any.

  def raise_if_conflicts # :nodoc:
    if has_conflicts?
      raise Gem::ConflictError.new self, conflicts
    end
  end

  ##
  # Sets rdoc_options to +value+, ensuring it is an array.

  def rdoc_options=(options)
    @rdoc_options = Array options
  end

  ##
  # Singular accessor for #require_paths

  def require_path
    (val = require_paths) && val.first
  end

  ##
  # Singular accessor for #require_paths

  def require_path=(path)
    self.require_paths = Array(path)
  end

  ##
  # Set requirements to +req+, ensuring it is an array.

  def requirements=(req)
    @requirements = Array req
  end

  def respond_to_missing?(m, include_private = false) # :nodoc:
    false
  end

  ##
  # Returns the full path to this spec's ri directory.

  def ri_dir
    @ri_dir ||= File.join base_dir, "ri", full_name
  end

  ##
  # Return a string containing a Ruby code representation of the given
  # object.

  def ruby_code(obj)
    case obj
    when String             then obj.dump + ".freeze"
    when Array              then "[" + obj.map {|x| ruby_code x }.join(", ") + "]"
    when Hash               then
      seg = obj.keys.sort.map {|k| "#{k.to_s.dump} => #{obj[k].to_s.dump}" }
      "{ #{seg.join(", ")} }"
    when Gem::Version       then ruby_code(obj.to_s)
    when DateLike           then obj.strftime("%Y-%m-%d").dump
    when Time               then obj.strftime("%Y-%m-%d").dump
    when Numeric            then obj.inspect
    when true, false, nil   then obj.inspect
    when Gem::Platform      then "Gem::Platform.new(#{ruby_code obj.to_a})"
    when Gem::Requirement   then
      list = obj.as_list
      "Gem::Requirement.new(#{ruby_code(list.size == 1 ? obj.to_s : list)})"
    else raise Gem::Exception, "ruby_code case not handled: #{obj.class}"
    end
  end

  private :ruby_code

  ##
  # List of dependencies that will automatically be activated at runtime.

  def runtime_dependencies
    dependencies.select(&:runtime?)
  end

  ##
  # True if this gem has the same attributes as +other+.

  def same_attributes?(spec)
    @@attributes.all? {|name, _default| send(name) == spec.send(name) }
  end

  private :same_attributes?

  ##
  # Checks if this specification meets the requirement of +dependency+.

  def satisfies_requirement?(dependency)
    @name == dependency.name &&
      dependency.requirement.satisfied_by?(@version)
  end

  ##
  # Returns an object you can use to sort specifications in #sort_by.

  def sort_obj
    [@name, @version, Gem::Platform.sort_priority(@new_platform)]
  end

  ##
  # Used by Gem::Resolver to order Gem::Specification objects

  def source # :nodoc:
    Gem::Source::Installed.new
  end

  ##
  # Returns the full path to the directory containing this spec's
  # gemspec file. eg: /usr/local/lib/ruby/gems/1.8/specifications

  def spec_dir
    @spec_dir ||= File.join base_dir, "specifications"
  end

  ##
  # Returns the full path to this spec's gemspec file.
  # eg: /usr/local/lib/ruby/gems/1.8/specifications/mygem-1.0.gemspec

  def spec_file
    @spec_file ||= File.join spec_dir, "#{full_name}.gemspec"
  end

  ##
  # The default name of the gemspec.  See also #file_name
  #
  #   spec.spec_name # => "example-1.0.gemspec"

  def spec_name
    "#{full_name}.gemspec"
  end

  ##
  # A short summary of this gem's description.

  def summary=(str)
    @summary = str.to_s.strip.
      gsub(/(\w-)\n[ \t]*(\w)/, '\1\2').gsub(/\n[ \t]*/, " ") # so. weird.
  end

  ##
  # Singular accessor for #test_files

  def test_file # :nodoc:
    (val = test_files) && val.first
  end

  ##
  # Singular mutator for #test_files

  def test_file=(file) # :nodoc:
    self.test_files = [file]
  end

  ##
  # Test files included in this gem.  You cannot append to this accessor, you
  # must assign to it.

  def test_files # :nodoc:
    # Handle the possibility that we have @test_suite_file but not
    # @test_files.  This will happen when an old gem is loaded via
    # YAML.
    if defined? @test_suite_file
      @test_files = [@test_suite_file].flatten
      @test_suite_file = nil
    end
    if defined?(@test_files) && @test_files
      @test_files
    else
      @test_files = []
    end
  end

  ##
  # Returns a Ruby code representation of this specification, such that it can
  # be eval'ed and reconstruct the same specification later.  Attributes that
  # still have their default values are omitted.

  def to_ruby
    result = []
    result << "# -*- encoding: utf-8 -*-"
    result << "#{Gem::StubSpecification::PREFIX}#{name} #{version} #{platform} #{raw_require_paths.join("\0")}"
    result << "#{Gem::StubSpecification::PREFIX}#{extensions.join "\0"}" unless
      extensions.empty?
    result << nil
    result << "Gem::Specification.new do |s|"

    result << "  s.name = #{ruby_code name}"
    result << "  s.version = #{ruby_code version}"
    unless platform.nil? || platform == Gem::Platform::RUBY
      result << "  s.platform = #{ruby_code original_platform}"
    end
    result << ""
    result << "  s.required_rubygems_version = #{ruby_code required_rubygems_version} if s.respond_to? :required_rubygems_version="

    if metadata && !metadata.empty?
      result << "  s.metadata = #{ruby_code metadata} if s.respond_to? :metadata="
    end
    result << "  s.require_paths = #{ruby_code raw_require_paths}"

    handled = [
      :dependencies,
      :name,
      :platform,
      :require_paths,
      :required_rubygems_version,
      :specification_version,
      :version,
      :has_rdoc,
      :default_executable,
      :metadata,
      :signing_key,
    ]

    @@attributes.each do |attr_name|
      next if handled.include? attr_name
      current_value = send(attr_name)
      if current_value != default_value(attr_name) || self.class.required_attribute?(attr_name)
        result << "  s.#{attr_name} = #{ruby_code current_value}"
      end
    end

    if String === signing_key
      result << "  s.signing_key = #{ruby_code signing_key}"
    end

    if @installed_by_version
      result << nil
      result << "  s.installed_by_version = #{ruby_code Gem::VERSION}"
    end

    unless dependencies.empty?
      result << nil
      result << "  s.specification_version = #{specification_version}"
      result << nil

      dependencies.each do |dep|
        dep.instance_variable_set :@type, :runtime if dep.type.nil? # HACK
        result << "  s.add_#{dep.type}_dependency(%q<#{dep.name}>.freeze, #{ruby_code dep.requirements_list})"
      end
    end

    result << "end"
    result << nil

    result.join "\n"
  end

  ##
  # Returns a Ruby lighter-weight code representation of this specification,
  # used for indexing only.
  #
  # See #to_ruby.

  def to_ruby_for_cache
    for_cache.to_ruby
  end

  def to_s # :nodoc:
    "#<Gem::Specification name=#{@name} version=#{@version}>"
  end

  ##
  # Returns self

  def to_spec
    self
  end

  def to_yaml(opts = {}) # :nodoc:
    Gem.load_yaml

    # Because the user can switch the YAML engine behind our
    # back, we have to check again here to make sure that our
    # psych code was properly loaded, and load it if not.
    unless Gem.const_defined?(:NoAliasYAMLTree)
      require_relative "psych_tree"
    end

    builder = Gem::NoAliasYAMLTree.create
    builder << self
    ast = builder.tree

    require "stringio"
    io = StringIO.new
    io.set_encoding Encoding::UTF_8

    Psych::Visitors::Emitter.new(io).accept(ast)

    io.string.gsub(/ !!null \n/, " \n")
  end

  ##
  # Recursively walk dependencies of this spec, executing the +block+ for each
  # hop.

  def traverse(trail = [], visited = {}, &block)
    trail.push(self)
    begin
      runtime_dependencies.each do |dep|
        dep.matching_specs(true).each do |dep_spec|
          next if visited.key?(dep_spec)
          visited[dep_spec] = true
          trail.push(dep_spec)
          begin
            result = block[self, dep, dep_spec, trail]
          ensure
            trail.pop
          end
          next if result == :next
          spec_name = dep_spec.name
          dep_spec.traverse(trail, visited, &block) unless
            trail.any? {|s| s.name == spec_name }
        end
      end
    ensure
      trail.pop
    end
  end

  ##
  # Checks that the specification contains all required fields, and does a
  # very basic sanity check.
  #
  # Raises InvalidSpecificationException if the spec does not pass the
  # checks..

  def validate(packaging = true, strict = false)
    normalize

    validation_policy = Gem::SpecificationPolicy.new(self)
    validation_policy.packaging = packaging
    validation_policy.validate(strict)
  end

  def keep_only_files_and_directories
    @executables.delete_if      {|x| File.directory?(File.join(@bindir, x)) }
    @extensions.delete_if       {|x| File.directory?(x) && !File.symlink?(x) }
    @extra_rdoc_files.delete_if {|x| File.directory?(x) && !File.symlink?(x) }
    @files.delete_if            {|x| File.directory?(x) && !File.symlink?(x) }
    @test_files.delete_if       {|x| File.directory?(x) && !File.symlink?(x) }
  end

  def validate_for_resolution
    Gem::SpecificationPolicy.new(self).validate_for_resolution
  end

  def validate_metadata
    Gem::SpecificationPolicy.new(self).validate_metadata
  end
  rubygems_deprecate :validate_metadata

  def validate_dependencies
    Gem::SpecificationPolicy.new(self).validate_dependencies
  end
  rubygems_deprecate :validate_dependencies

  def validate_permissions
    Gem::SpecificationPolicy.new(self).validate_permissions
  end
  rubygems_deprecate :validate_permissions

  ##
  # Set the version to +version+.

  def version=(version)
    @version = Gem::Version.create(version)
    return if @version.nil?

    invalidate_memoized_attributes
  end

  def stubbed?
    false
  end

  def yaml_initialize(tag, vals) # :nodoc:
    vals.each do |ivar, val|
      case ivar
      when "date"
        # Force Date to go through the extra coerce logic in date=
        self.date = val
      when "platform"
        self.platform = val
      else
        instance_variable_set "@#{ivar}", val
      end
    end
  end

  ##
  # Reset nil attributes to their default values to make the spec valid

  def reset_nil_attributes_to_default
    nil_attributes = self.class.non_nil_attributes.find_all do |name|
      !instance_variable_defined?("@#{name}") || instance_variable_get("@#{name}").nil?
    end

    nil_attributes.each do |attribute|
      default = default_value attribute

      value = case default
              when Time, Numeric, Symbol, true, false, nil then default
              else default.dup
      end

      instance_variable_set "@#{attribute}", value
    end

    @installed_by_version ||= nil

    nil
  end

  def flatten_require_paths # :nodoc:
    return unless raw_require_paths.first.is_a?(Array)

    warn "#{name} #{version} includes a gemspec with `require_paths` set to an array of arrays. Newer versions of this gem might've already fixed this"
    raw_require_paths.flatten!
  end

  def raw_require_paths # :nodoc:
    @require_paths
  end
end
rubygems/rubygems/s3_uri_signer.rb000064400000013662150403134230013341 0ustar00# frozen_string_literal: true

module Gem
  if defined? ::Psych::Visitors
    class NoAliasYAMLTree < Psych::Visitors::YAMLTree
      def self.create
        new({})
      end unless respond_to? :create

      def visit_String(str)
        return super unless str == "=" # or whatever you want

        quote = Psych::Nodes::Scalar::SINGLE_QUOTED
        @emitter.scalar str, nil, nil, false, true, quote
      end

      def visit_Hash(o)
        super(o.compact)
      end

      # Noop this out so there are no anchors
      def register(target, obj)
      end

      # This is ported over from the yaml_tree in 1.9.3
      def format_time(time)
        if time.utc?
          time.strftime("%Y-%m-%d %H:%M:%S.%9N Z")
        else
          time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z")
        end
      end

      private :format_time
    end
  end
end
rubygems/rubygems/safe_yaml.rb000064400000002053150403134230012516 0ustar00# frozen_string_literal: true

module Gem
  ###
  # This module is used for safely loading YAML specs from a gem.  The
  # `safe_load` method defined on this module is specifically designed for
  # loading Gem specifications.  For loading other YAML safely, please see
  # Psych.safe_load

  module SafeYAML
    PERMITTED_CLASSES = %w[
      Symbol
      Time
      Date
      Gem::Dependency
      Gem::Platform
      Gem::Requirement
      Gem::Specification
      Gem::Version
      Gem::Version::Requirement
    ].freeze

    PERMITTED_SYMBOLS = %w[
      development
      runtime
    ].freeze

    @aliases_enabled = true
    def self.aliases_enabled=(value) # :nodoc:
      @aliases_enabled = !!value
    end

    def self.aliases_enabled? # :nodoc:
      @aliases_enabled
    end

    def self.safe_load(input)
      ::Psych.safe_load(input, permitted_classes: PERMITTED_CLASSES, permitted_symbols: PERMITTED_SYMBOLS, aliases: @aliases_enabled)
    end

    def self.load(input)
      ::Psych.safe_load(input, permitted_classes: [::Symbol])
    end
  end
end
rubygems/rubygems/compatibility.rb000064400000001776150403134230013442 0ustar00# frozen_string_literal: true

#--
# This file contains all sorts of little compatibility hacks that we've
# had to introduce over the years. Quarantining them into one file helps
# us know when we can get rid of them.
#
# Ruby 1.9.x has introduced some things that are awkward, and we need to
# support them, so we define some constants to use later.
#
# TODO remove at RubyGems 4
#++

module Gem
  # :stopdoc:

  RubyGemsVersion = VERSION
  deprecate_constant(:RubyGemsVersion)

  RbConfigPriorities = %w[
    MAJOR
    MINOR
    TEENY
    EXEEXT RUBY_SO_NAME arch bindir datadir libdir ruby_install_name
    ruby_version rubylibprefix sitedir sitelibdir vendordir vendorlibdir
    rubylibdir
  ].freeze

  if defined?(ConfigMap)
    RbConfigPriorities.each do |key|
      ConfigMap[key.to_sym] = RbConfig::CONFIG[key]
    end
  else
    ##
    # Configuration settings from ::RbConfig
    ConfigMap = Hash.new do |cm, key|
      cm[key] = RbConfig::CONFIG[key.to_s]
    end
    deprecate_constant(:ConfigMap)
  end
end
rubygems/rubygems/name_tuple.rb000064400000004612150403134230012712 0ustar00# frozen_string_literal: true

##
#
# Represents a gem of name +name+ at +version+ of +platform+. These
# wrap the data returned from the indexes.

class Gem::NameTuple
  def initialize(name, version, platform=Gem::Platform::RUBY)
    @name = name
    @version = version

    platform &&= platform.to_s
    platform = Gem::Platform::RUBY if !platform || platform.empty?
    @platform = platform
  end

  attr_reader :name, :version, :platform

  ##
  # Turn an array of [name, version, platform] into an array of
  # NameTuple objects.

  def self.from_list(list)
    list.map {|t| new(*t) }
  end

  ##
  # Turn an array of NameTuple objects back into an array of
  # [name, version, platform] tuples.

  def self.to_basic(list)
    list.map(&:to_a)
  end

  ##
  # A null NameTuple, ie name=nil, version=0

  def self.null
    new nil, Gem::Version.new(0), nil
  end

  ##
  # Returns the full name (name-version) of this Gem.  Platform informarubygems/rubygems/security_option.rb000064400000002074150403134230014020 0ustar00c file would be

  def spec_name
    "#{full_name}.gemspec"
  end

  ##
  # Convert back to the [name, version, platform] tuple

  def to_a
    [@name, @version, @platform]
  end

  def inspect # :nodoc:
    "#<Gem::NameTuple #{@name}, #{@version}, #{@platform}>"
  end

  alias_method :to_s, :inspect # :nodoc:

  def <=>(other)
    [@name, @version, Gem::Platform.sort_priority(@platform)] <=>
      [other.name, other.version, Gem::Platform.sort_priority(other.platform)]
  end

  include Comparable

  ##
  # Compare with +other+. Supports another NameTuple or an Array
  # in the [name, version, platform] format.

  def ==(other)
    case other
    when self.class
      @name == other.name &&
        @version == other.version &&
        @platform == other.platform
    when Array
      to_a == other
    else
      false
    end
  end

  alias_method :eql?, :==

  def hash
    to_a.hash
  end
end
rubygems/rubygems/command.rbrubygems/rubygems/dependency.rb000064400000021226150403134230012677 0ustar00ample to look at is Gem::Commands::ContentsCommand

class Gem::Command
  include Gem::UserInteraction

  Gem::OptionParser.accept Symbol, &:to_sym

  ##
  # The name of the command.

  attr_reader :command

  ##
  # The options for the command.

  attr_reader :options

  ##
  # The default options for the command.

  attr_accessor :defaults

  ##
  # The name of the command for command-line invocation.

  attr_accessor :program_name

  ##
  # A short description of the command.

  attr_accessor :summary

  ##
  # Arguments used when building gems

  def self.build_args
    @build_args ||= []
  end

  def self.build_args=(value)
    @build_args = value
  end

  def self.common_options
    @common_options ||= []
  end

  def self.add_common_option(*args, &handler)
    Gem::Command.common_options << [args, handler]
  end

  def self.extra_args
    @extra_args ||= []
  end

  def self.extra_args=(value)
    case value
    when Array
      @extra_args = value
    when String
      @extra_args = value.split(" ")
    end
  end

  ##
  # Return an array of extra arguments for the command.  The extra arguments
  # come from the gem configuration file read at program startup.

  def self.specific_extra_args(cmd)
    specific_extra_args_hash[cmd]
  end

  ##
  # Add a list of extra arguments for the given command.  +args+ may be an
  # array or a string to be split on white space.

  def self.add_specific_extra_args(cmd,args)
    args = args.split(/\s+/) if args.is_a? String
    specific_extra_args_hash[cmd] = args
  end

  ##
  # Accessor for the specific extra args hash (self initializing).

  def self.specific_extra_args_hash
    @specific_extra_args_hash ||= Hash.new do |h,k|
      h[k] = Array.new
    end
  end

  ##
  # Initializes a generic gem command named +command+.  +summary+ is a short
  # description displayed in `gem help commands`.  +defaults+ are the default
  # options.  Defaults should be mirrored in #defaults_str, unless there are
  # none.
  #
  # When defining a new command subclass, use add_option to add command-line
  # switches.
  #
  # Unhandled arguments (gem names, files, etc.) are left in
  # <tt>options[:args]</tt>.

  def initialize(command, summary=nil, defaults={})
    @command = command
    @summary = summary
    @program_name = "gem #{command}"
    @defaults = defaults
    @options = defaults.dup
    @option_groups = Hash.new {|h,k| h[k] = [] }
    @deprecated_options = { command => {} }
    @parser = nil
    @when_invoked = nil
  end

  ##
  # True if +long+ begins with the characters from +short+.

  def begins?(long, short)
    return false if short.nil?
    long[0, short.length] == short
  end

  ##
  # Override to provide command handling.
  #
  # #options will be filled in with your parsed options, unparsed options will
  # be left in <tt>options[:args]</tt>.
  #
  # See also: #get_all_gem_names, #get_one_gem_name,
  # #get_one_optional_argument

  def execute
    raise Gem::Exception, "generic command has no actions"
  end

  ##
  # Display to the user that a gem couldn't be found and reasons why
  #--

  def show_lookup_failure(gem_name, version, errors, suppress_suggestions = false, required_by = nil)
    gem = "'#{gem_name}' (#{version})"
    msg = String.new "Could not find a valid gem #{gem}"

    if errors && !errors.empty?
      msg << ", here is why:\n"
      errors.each {|x| msg << "          #{x.wordy}\n" }
    else
      if required_by && gem != required_by
        msg << " (required by #{required_by}) in any repository"
      else
        msg << " in any repository"
      end
    end

    alert_error msg

    unless suppress_suggestions
      suggestions = Gem::SpecFetcher.fetcher.suggest_gems_from_name(gem_name, :latest, 10)
      unless suggestions.empty?
        alert_error "Possible alternatives: #{suggestions.join(", ")}"
      end
    end
  end

  ##
  # Get all gem names from the command line.

  def get_all_gem_names
    args = options[:args]

    if args.nil? || args.empty?
      raise Gem::CommandLineError,
            "Please specify at least one gem name (e.g. gem build GEMNAME)"
    end

    args.reject {|arg| arg.start_with?("-") }
  end

  ##
  # Get all [gem, version] from the command line.
  #
  # An argument in the form gem:ver is pull apart into the gen name and version,
  # respectively.
  def get_all_gem_names_and_versions
    get_all_gem_names.map do |name|
      extract_gem_name_and_version(name)
    end
  end

  def extract_gem_name_and_version(name) # :nodoc:
    if /\A(.*):(#{Gem::Requirement::PATTERN_RAW})\z/ =~ name
      [$1, $2]
    else
      [name]
    end
  end

  ##
  # Get a single gem name from the command line.  Fail if there is no gem name
  # or if there is more than one gem name given.

  def get_one_gem_name
    args = options[:args]

    if args.nil? || args.empty?
      raise Gem::CommandLineError,
            "Please specify a gem name on the command line (e.g. gem build GEMNAME)"
    end

    if args.size > 1
      raise Gem::CommandLineError,
            "Too many gem names (#{args.join(", ")}); please specify only one"
    end

    args.first
  end

  ##
  # Get a single optional argument from the command line.  If more than one
  # argument is given, return only the first. Return nil if none are given.

  def get_one_optional_argument
    args = options[:args] || []
    args.first
  end

  ##
  # Override to provide details of the arguments a command takes.  It should
  # return a left-justified string, one argument per line.
  #
  # For example:
  #
  #   def usage
  #     "#{program_name} FILE [FILE ...]"
  #   end
  #
  #   def arguments
  #     "FILE          name of file to find"
  #   end

  def arguments
    ""
  end

  ##
  # Override to display the default values of the command options. (similar to
  # +arguments+, but displays the default values).
  #
  # For example:
  #
  #   def defaults_str
  #     --no-gems-first --no-all
  #   end

  def defaults_str
    ""
  end

  ##
  # Override to display a longer description of what this command does.

  def description
    nil
  end

  ##
  # Override to display the usage for an individual gem command.
  #
  # The text "[options]" is automatically appended to the usage text.

  def usage
    program_name
  end

  ##
  # Display the help message for the command.

  def show_help
    parser.program_name = usage
    say parser
  end

  ##
  # Invoke the command with the given list of arguments.

  def invoke(*args)
    invoke_with_build_args args, nil
  end

  ##
  # Invoke the command with the given list of normal arguments
  # and additional build arguments.

  def invoke_with_build_args(args, build_args)
    handle_options args

    options[:build_args] = build_args

    if options[:silent]
      old_ui = ui
      self.ui = ui = Gem::SilentUI.new
    end

    if options[:help]
      show_help
    elsif @when_invoked
      @when_invoked.call options
    else
      execute
    end
  ensure
    if ui
      self.ui = old_ui
      ui.close
    end
  end

  ##
  # Call the given block when invoked.
  #
  # Normal command invocations just executes the +execute+ method of the
  # command.  Specifying an invocation block allows the test methods to
  # override the normal action of a command to determine that it has been
  # invoked correctly.

  def when_invoked(&block)
    @when_invoked = block
  end

  ##
  # Add a command-line option and handler to the command.
  #
  # See Gem::OptionParser#make_switch for an explanation of +opts+.
  #
  # +handler+ will be called with two values, the value of the argument and
  # the options hash.
  #
  # If the first argument of add_option is a Symbol, it's used to group
  # options in output.  See `gem help list` for an example.

  def add_option(*opts, &handler) # :yields: value, options
    group_name = Symbol === opts.first ? opts.shift : :options

    raise "Do not pass an empty string in opts" if opts.include?("")

    @option_groups[group_name] << [opts, handler]
  end

  ##
  # Remove previously defined command-line argument +name+.

  def remove_option(name)
    @option_groups.each do |_, option_list|
      option_list.reject! {|args, _| args.any? {|x| x.is_a?(String) && x =~ /^#{name}/ } }
    end
  end

  ##
  # Mark a command-line option as deprecated, and optionally specify a
  # deprecation horizon.
  #
  # Note that with the current implementation, every version of the option needs
  # to be explicitly deprecated, so to deprecate an option defined as
  #
  #   add_option('-t', '--[no-]test', 'Set test mode') do |value, options|
  #     # ... stuff ...
  #   end
  #
  # you would need to explicitly add a call to `deprecate_option` for every
  # version of the option you want to deprecate, like
  #
  #   deprecate_option('-t')
  #   deprecate_option('--test')
  #   deprecate_option('--no-test')

  derubygems/rubygems/user_interaction.rb000064400000032052150403134230014135 0ustar00Merge a set of command options with the set of default options (without
  # modifying the default option hash).

  def merge_options(new_options)
    @options = @defaults.clone
    new_options.each {|k,v| @options[k] = v }
  end

  ##
  # True if the command handles the given argument list.

  def handles?(args)
    parser.parse!(args.dup)
    true
  rescue StandardError
    false
  end

  ##
  # Handle the given list of arguments by parsing them and recording the
  # results.

  def handle_options(args)
    args = add_extra_args(args)
    check_deprecated_options(args)
    @options = Marshal.load Marshal.dump @defaults # deep copy
    parser.parse!(args)
    @options[:args] = args
  end

  ##
  # Adds extra args from ~/.gemrc

  def add_extra_args(args)
    result = []

    s_extra = Gem::Command.specific_extra_args(@command)
    extra = Gem::Command.extra_args + s_extra

    until extra.empty? do
      ex = []
      ex << extra.shift
      ex << extra.shift if /^[^-]/.match?(extra.first.to_s)
      result << ex if handles?(ex)
    end

    result.flatten!
    result.concat(args)
    result
  end

  def deprecated?
    false
  end

  private

  def option_is_deprecated?(option)
    @deprecated_options[command].key?(option)
  end

  def add_parser_description # :nodoc:
    return unless description

    formatted = description.split("\n\n").map do |chunk|
      wrap chunk, 80 - 4
    end.join "\n"

    @parser.separator nil
    @parser.separator "  Description:"
    formatted.each_line do |line|
      @parser.separator "    #{line.rstrip}"
    end
  end

  def add_parser_options # :nodoc:
    @parser.separator nil

    regular_options = @option_groups.delete :options

    configure_options "", regular_options

    @option_groups.sort_by {|n,_| n.to_s }.each do |group_name, option_list|
      @parser.separator nil
      configure_options group_name, option_list
    end
  end

  ##
  # Adds a section with +title+ and +content+ to the parser help view.  Used
  # for adding command arguments and default arguments.

  def add_parser_run_info(title, content)
    return if content.empty?

    @parser.separator nil
    @parser.separator "  #{title}:"
    content.each_line do |line|
      @parser.separator "    #{line.rstrip}"
    end
  end

  def add_parser_summary # :nodoc:
    return unless @summary

    @parser.separator nil
    @parser.separator "  Summary:"
    wrap(@summary, 80 - 4).each_line do |line|
      @parser.separator "    #{line.strip}"
    end
  end

  ##
  # Create on demand parser.

  def parser
    create_option_parser if @parser.nil?
    @parser
  end

  ##
  # Creates an option parser and fills it in with the help info for the
  # command.

  def create_option_parser
    @parser = Gem::OptionParser.new

    add_parser_options

    @parser.separator nil
    configure_options "Common", Gem::Command.common_options

    add_parser_run_info "Arguments", arguments
    add_parser_summary
    add_parser_description
    add_parser_run_info "Defaults", defaults_str
  end

  def configure_options(header, option_list)
    return if option_list.nil? || option_list.empty?

    header = header.to_s.empty? ? "" : "#{header} "
    @parser.separator "  #{header}Options:"

    option_list.each do |args, handler|
      @parser.on(*args) do |value|
        handler.call(value, @options)
      end
    end

    @parser.separator ""
  end

  ##
  # Wraps +text+ to +width+

  def wrap(text, width) # :doc:
    text.gsub(/(.{1,#{width}})( +|$\n?)|(.{1,#{width}})/, "\\1\\3\n")
  end

  # ----------------------------------------------------------------
  # Add the options common to all commands.

  add_common_option("-h", "--help",
                    "Get help on this command") do |_value, options|
    options[:help] = true
  end

  add_common_option("-V", "--[no-]verbose",
                    "Set the verbose level of output") do |value, _options|
    # Set us to "really verbose" so the progress meter works
    if Gem.configuration.verbose && value
      Gem.configuration.verbose = 1
    else
      Gem.configuration.verbose = value
    end
  end

  add_common_option("-q", "--quiet", "Silence command progress meter") do |_value, _options|
    Gem.configuration.verbose = false
  end

  add_common_option("--silent",
                    "Silence RubyGems output") do |_value, options|
    options[:silent] = true
  end

  # Backtrace and config-file are added so they show up in the help
  # commands.  Both options are actually handled before the other
  # options get parsed.

  add_common_option("--config-file FILE",
                    "Use this config file instead of default") do
  end

  add_common_option("--backtrace",
                    "Show stack backtrace on errors") do
  end

  add_common_option("--debug",
                    "Turn on Ruby debugging") do
  end

  add_common_option("--norc",
                    "Avoid loading any .gemrc file") do
  end

  # :stopdoc:

  HELP = <<-HELP
RubyGems is a package manager for Ruby.

  Usage:
    gem -h/--help
    gem -v/--version
    gem [global options...] command [arguments...] [options...]

  Global options:
    -C PATH                      run as if gem was started in <PATH>
                                 instead of the current working directory

  Examples:
    gem install rake
    gem list --local
    gem build package.gemspec
    gem push package-0.0.1.gem
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help gem_dependencies    gem dependencies file guide
    gem help platforms           gem platforms guide
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
  Further information:
    https://guides.rubygems.org
  HELP

  # :startdoc:
end

##
# \Commands will be placed in this namespace

module Gem::Commands
end
rubygems/rubygems/s3_uri_signer.rb000064400000013732150403134230013337 0ustar00# frozen_string_literal: true

require_relative "openssl"

##
# S3URISigner implements AWS SigV4 for S3 Source to avoid a dependency on the aws-sdk-* gems
# More on AWS SigV4: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
class Gem::S3URISigner
  class ConfigurationError < Gem::Exception
    def initialize(message)
      super message
    end

    def to_s # :nodoc:
      super.to_s
    end
  end

  class InstanceProfileError < Gem::Exception
    def initialize(message)
      super message
    end

    def to_s # :nodoc:
      super.to_s
    end
  end

  attr_accessor :uri

  def initialize(uri)
    @uri = uri
  end

  ##
  # Signs S3 URI using query-params according to the reference: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html
  def sign(expiration = 86_400)
    s3_config = fetch_s3_config

    current_time = Time.now.utc
    date_time = current_time.strftime("%Y%m%dT%H%m%SZ")
    date = date_time[0,8]

    credential_info = "#{date}/#{s3_config.region}/s3/aws4_request"
    canonical_host = "#{uri.host}.s3.#{s3_config.region}.amazonaws.com"

    query_params = generate_canonical_query_params(s3_config, date_time, credential_info, expiration)
    canonical_request = generate_canonical_request(canonical_host, query_params)
    string_to_sign = generate_string_to_sign(date_time, credential_info, canonical_request)
    signature = generate_signature(s3_config, date, string_to_sign)

    Gem::URI.parse("https://#{canonical_host}#{uri.path}?#{query_params}&X-Amz-Signature=#{signature}")
  end

  private

  S3Config = Struct.new :access_key_id, :secret_access_key, :security_token, :region

  def generate_canonical_query_params(s3_config, date_time, credential_info, expiration)
    canonical_params = {}
    canonical_params["X-Amz-Algorithm"] = "AWS4-HMAC-SHA256"
    canonical_params["X-Amz-Credential"] = "#{s3_config.access_key_id}/#{credential_info}"
    canonical_params["X-Amz-Date"] = date_time
    canonical_params["X-Amz-Expires"] = expiration.to_s
    canonical_params["X-Amz-SignedHeaders"] = "host"
    canonical_params["X-Amz-Security-Token"] = s3_config.security_token if s3_config.security_token

    # Sorting is required to generate proper signature
    canonical_params.sort.to_h.map do |key, value|
      "#{base64_uri_escape(key)}=#{base64_uri_escape(value)}"
    end.join("&")
  end

  def generate_canonical_request(canonical_host, query_params)
    [
      "GET",
      uri.path,
      query_params,
      "host:#{canonical_host}",
      "", # empty params
      "host",
      "UNSIGNED-PAYLOAD",
    ].join("\n")
  end

  def generate_string_to_sign(date_time, credential_info, canonical_request)
    [
      "AWS4-HMAC-SHA256",
      date_time,
      credential_info,
      OpenSSL::Digest::SHA256.hexdigest(canonical_request),
    ].join("\n")
  end

  def generate_signature(s3_config, date, string_to_sign)
    date_key = OpenSSL::HMAC.digest("sha256", "AWS4" + s3_config.secret_access_key, date)
    date_region_key = OpenSSL::HMAC.digest("sha256", date_key, s3_config.region)
    date_region_service_key = OpenSSL::HMAC.digest("sha256", date_region_key, "s3")
    signing_key = OpenSSL::HMAC.digest("sha256", date_region_service_key, "aws4_request")
    OpenSSL::HMAC.hexdigest("sha256", signing_key, string_to_sign)
  end

  ##
  # Extracts S3 configuration for S3 bucket
  def fetch_s3_config
    return S3Config.new(uri.user, uri.password, nil, "us-east-1") if uri.user && uri.password

    s3_source = Gem.configuration[:s3_source] || Gem.configuration["s3_source"]
    host = uri.host
    raise ConfigurationError.new("no s3_source key exists in .gemrc") unless s3_source

    auth = s3_source[host] || s3_source[host.to_sym]
    raise ConfigurationError.new("no key for host #{host} in s3_source in .gemrc") unless auth

    provider = auth[:provider] || auth["provider"]
    case provider
    when "env"
      id = ENV["AWS_ACCESS_KEY_ID"]
      secret = ENV["AWS_SECRET_ACCESS_KEY"]
      security_token = ENV["AWS_SESSION_TOKEN"]
    when "instance_profile"
      credentials = ec2_metadata_credentials_json
      id = credentials["AccessKeyId"]
      secret = credentials["SecretAccessKey"]
      security_token = credentials["Token"]
    else
      id = auth[:id] || auth["id"]
      secret = auth[:secret] || auth["secret"]
      security_token = auth[:security_token] || auth["security_token"]
    end

    raise ConfigurationError.new("s3_source for #{host} missing id or secret") unless id && secret

    region = auth[:region] || auth["region"] || "us-east-1"
    S3Config.new(id, secret, security_token, region)
  end

  def base64_uri_escape(str)
    str.gsub(%r{[\+/=\n]}, BASE64_URI_TRANSLATE)
  end

  def ec2_metadata_credentials_json
    require_relative "vendored_net_http"
    require_relative "request"
    require_relative "request/connection_pools"
    require "json"

    iam_info = ec2_metadata_request(EC2_IAM_INFO)
    # Expected format: arn:aws:iam::<id>:instance-profile/<role_name>
    role_name = iam_info["InstanceProfileArn"].split("/").last
    ec2_metadata_request(EC2_IAM_SECURITY_CREDENTIALS + role_name)
  end

  def ec2_metadata_request(url)
    uri = Gem::URI(url)
    @request_pool ||= create_request_pool(uri)
    request = Gem::Request.new(uri, Gem::Net::HTTP::Get, nil, @request_pool)
    response = request.fetch

    case response
    when Gem::Net::HTTPOK then
      JSON.parse(response.body)
    else
      raise InstanceProfileError.new("Unable to fetch AWS metadata from #{uri}: #{response.message} #{response.code}")
    end
  end

  def create_request_pool(uri)
    proxy_uri = Gem::Request.proxy_uri(Gem::Request.get_proxy_from_env(uri.scheme))
    certs = Gem::Request.get_cert_files
    Gem::Request::ConnectionPools.new(proxy_uri, certs).pool_for(uri)
  end

  BASE64_URI_TRANSLATE = { "+" => "%2B", "/" => "%2F", "=" => "%3D", "\n" => "" }.freeze
  EC2_IAM_INFO = "http://169.254.169.254/latest/meta-data/iam/info"
  EC2_IAM_SECURITY_CREDENTIALS = "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
end
rubygems/rubygems/security_option.rb000064400000002074150403134230014020 0ustar00# frozen_string_literal: true

#--
# Copyrrubygems/rubygems/bundler_version_finder.rb000064400000003732150403134230015312 0ustar00|
      options[:security_policy] = value
    end
  end
end
rubygems/rubygems/dependency.rb000064400000020714150403134230012700 0ustar00# frozen_string_literal: true

##
# The Dependency class holds a Gem name and a Gem::Requirement.

class Gem::Dependency
  ##
  # Valid dependency types.
  #--
  # When this list is updated, be sure to change
  # Gem::Specification::CURRENT_SPECIFICATION_VERSION as well.
  #
  # REFACTOR: This type of constant, TYPES, indicates we might want
  # two classes, used via inheritance or duck typing.

  TYPES = [
    :development,
    :runtime,
  ].freeze

  ##
  # Dependency name or regular expression.

  attr_accessor :name

  ##
  # Allows you to force this dependency to be a prerelease.

  attr_writer :prerelease

  ##
  # Constructs a dependency with +name+ and +requirements+. The last
  # argument can optionally be the dependency type, which defaults to
  # <tt>:runtime</tt>.

  def initialize(name, *requirements)
    case name
    when String then # ok
    when Regexp then
      msg = ["NOTE: Dependency.new w/ a regexp is deprecated.",
             "Dependency.new calledsystemtap/tapset/libruby.so.3.2.stp000064400000020726150403134230013220 0ustar00quirement = Gem::Requirement.create requirements
    @type        = type
    @prerelease  = false

    # This is for Marshal backwards compatibility. See the comments in
    # +requirement+ for the dirty details.

    @version_requirements = @requirement
  end

  ##
  # A dependency's hash is the XOR of the hashes of +name+, +type+,
  # and +requirement+.

  def hash # :nodoc:
    name.hash ^ type.hash ^ requirement.hash
  end

  def inspect # :nodoc:
    if prerelease?
      format("<%s type=%p name=%p requirements=%p prerelease=ok>", self.class, type, name, requirement.to_s)
    else
      format("<%s type=%p name=%p requirements=%p>", self.class, type, name, requirement.to_s)
    end
  end

  ##
  # Does this dependency require a prerelease?

  def prerelease?
    @prerelease || requirement.prerelease?
  end

  ##
  # Is this dependency simply asking for the latest version
  # of a gem?

  def latest_version?
    @requirement.none?
  end

  def pretty_print(q) # :nodoc:
    q.group 1, "Gem::Dependency.new(", ")" do
      q.pp name
      q.text ","
      q.breakable

      q.pp requirement

      q.text ","
      q.breakable

      q.pp type
    end
  end

  ##
  # What does this dependency require?

  def requirement
    return @requirement if defined?(@requirement) && @requirement

    # @version_requirements and @version_requirement are legacy ivar
    # names, and supported here because older gems need to keep
    # working and Dependency doesn't implement marshal_dump and
    # marshal_load. In a happier world, this would be an
    # attr_accessor. The horrifying instance_variable_get you see
    # below is also the legacy of some old restructurings.
    #
    # Note also that because of backwards compatibility (loading new
    # gems in an old RubyGems installation), we can't add explicit
    # marshaling to this class until we want to make a big
    # break. Maybe 2.0.
    #
    # Children, define explicit marshal and unmarshal behavior for
    # public classes. Marshal formats are part of your public API.

    # REFACTOR: See above

    if defined?(@version_requirement) && @version_requirement
      version = @version_requirement.instance_variable_get :@version
      @version_requirement = nil
      @version_requirements = Gem::Requirement.new version
    end

    @requirement = @version_requirements if defined?(@version_requirements)
  end

  def requirements_list
    requirement.as_list
  end

  def to_s # :nodoc:
    if type != :runtime
      "#{name} (#{requirement}, #{type})"
    else
      "#{name} (#{requirement})"
    end
  end

  ##
  # Dependency type.

  def type
    @type ||= :runtime
  end

  def runtime?
    @type == :runtime || !@type
  end

  def ==(other) # :nodoc:
    Gem::Dependency === other &&
      name        == other.name &&
      type        == other.type &&
      requirement == other.requirement
  end

  ##
  # Dependencies are ordered by name.

  def <=>(other)
    name <=> other.name
  end

  ##
  # Uses this dependency as a pattern to compare to +other+. This
  # dependency will match if the name matches the other's name, and
  # other has only an equal version requirement that satisfies this
  # dependency.

  def =~(other)
    unless Gem::Dependency === other
      return unless other.respond_to?(:name) && other.respond_to?(:version)
      other = Gem::Dependency.new other.name, other.version
    end

    return false unless name === other.name

    reqs = other.requirement.requirements

    return false unless reqs.length == 1
    return false unless reqs.first.first == "="

    version = reqs.first.last

    requirement.satisfied_by? version
  end

  alias_method :===, :=~

  ##
  # :call-seq:
  #   dep.match? name          => true or false
  #   dep.match? name, version => true or false
  #   dep.match? spec          => true or false
  #
  # Does this dependency match the specification described by +name+ and
  # +version+ or match +spec+?
  #
  # NOTE:  Unlike #matches_spec? this method does not return true when the
  # version is a prerelease version unless this is a prerelease dependency.

  def match?(obj, version=nil, allow_prerelease=false)
    if !version
      name = obj.name
      version = obj.version
    else
      name = obj
    end

    return false unless self.name === name

    version = Gem::Version.new version

    return true if requirement.none? && !version.prerelease?
    return false if version.prerelease? &&
                    !allow_prerelease &&
                    !prerelease?

    requirement.satisfied_by? version
  end

  ##
  # Does this dependency match +spec+?
  #
  # NOTE:  This is not a convenience method.  Unlike #match? this method
  # returns true when +spec+ is a prerelease version even if this dependency
  # is not a prerelease dependency.

  def matches_spec?(spec)
    return false unless name === spec.name
    return true  if requirement.none?

    requirement.satisfied_by?(spec.version)
  end

  ##
  # Merges the requirements of +other+ into this dependency

  def merge(other)
    unless name == other.name
      raise ArgumentError,
            "#{self} and #{other} have different names"
    end

    default = Gem::Requirement.default
    self_req = requirement
    other_req = other.requirement

    return self.class.new name, self_req  if other_req == default
    return self.class.new name, other_req if self_req  == default

    self.class.new name, self_req.as_list.concat(other_req.as_list)
  end

  def matching_specs(platform_only = false)
    matches = Gem::Specification.find_all_by_name(name, requirement)

    if platform_only
      matches.reject! do |spec|
        spec.nil? || !Gem::Platform.match_spec?(spec)
      end
    end

    matches.reject(&:ignored?)
  end

  ##
  # True if the dependency will not always match the latest version.

  def specific?
    @requirement.specific?
  end

  def to_specs
    matches = matching_specs true

    # TODO: check Gem.activated_spec[self.name] in case matches falls outside

    if matches.empty?
      specs = Gem::Specification.stubs_for name

      if specs.empty?
        raise Gem::MissingSpecError.new name, requirement
      else
        raise Gem::MissingSpecVersionError.new name, requirement, specs
      end
    end

    # TODO: any other resolver validations should go here

    matches
  end

  def to_spec
    matches = to_specs.compact

    active = matches.find(&:activated?)
    return active if active

    unless prerelease?
      # Consider prereleases only as a fallback
      pre, matches = matches.partition {|spec| spec.version.prerelease? }
      matches = pre if matches.empty?
    end

    matches.first
  end

  def identity
    if prerelease?
      if specific?
        :complete
      else
        :abs_latest
      end
    elsif latest_version?
      :latest
    else
      :released
    end
  end

  def encode_with(coder) # :nodoc:
    coder.add "name", @name
    coder.add "requirement", @requirement
    coder.add "type", @type
    coder.add "prerelease", @prerelease
    coder.add "version_requirements", @version_requirements
  end
end
rubygems/rubygems/user_interaction.rb000064400000032151150403134230014135 0ustar00# frozen_string_literal: true

#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require_relative "deprecate"
require_relative "text"

##
# Module that defines the default UserInteraction.  Any class including this
# module will have access to the +ui+ method that returns the default UI.

module Gem::DefaultUserInteraction
  include Gem::Text

  ##
  # The default UI is a class variable of the singleton class for this
  # module.

  @ui = nil

  ##
  # Return the default UI.

  def self.ui
    @ui ||= Gem::ConsoleUI.new
  end

  ##
  # Set the default UI.  If the default UI is never explicitly set, a simple
  # console based UserInteraction will be used automatically.

  def self.ui=(new_ui)
    @ui = new_ui
  end

  ##
  # Use +new_ui+ for the duration of +block+.

  def self.use_ui(new_ui)
    old_ui = @ui
    @ui = new_ui
    yield
  ensure
    @ui = old_ui
  end

  ##
  # See Delicenses/alt-ruby32-devel/COPYING.ja000064400000004776150403134230013007 0ustar00 you may need to
# reference other classes for specific behavior such as Gem::ConsoleUI or
# Gem::SilentUI.
#
# Example:
#
#   class X
#     include Gem::UserInteraction
#
#     def get_answer
#       n = ask("What is the meaning of life?")
#     end
#   end

module Gem::UserInteraction
  include Gem::DefaultUserInteraction

  ##
  # Displays an alert +statement+.  Asks a +question+ if given.

  def alert(statement, question = nil)
    ui.alert statement, question
  end

  ##
  # Displays an error +statement+ to the error output location.  Asks a
  # +question+ if given.

  def alert_error(statement, question = nil)
    ui.alert_error statement, question
  end

  ##
  # Displays a warning +statement+ to the warning output location.  Asks a
  # +question+ if given.

  def alert_warning(statement, question = nil)
    ui.alert_warning statement, question
  end

  ##
  # Asks a +question+ and returns the answer.

  def ask(question)
    ui.ask question
  end

  ##
  # Asks for a password with a +prompt+

  def ask_for_password(prompt)
    ui.ask_for_password prompt
  end

  ##
  # Asks a yes or no +question+.  Returns true for yes, false for no.

  def ask_yes_no(question, default = nil)
    ui.ask_yes_no question, default
  end

  ##
  # Asks the user to answer +question+ with an answer from the given +list+.

  def choose_from_list(question, list)
    ui.choose_from_list question, list
  end

  ##
  # Displays the given +statement+ on the standard output (or equivalent).

  def say(statement = "")
    ui.say statement
  end

  ##
  # Terminates the RubyGems process with the given +exit_code+

  def terminate_interaction(exit_code = 0)
    ui.terminate_interaction exit_code
  end

  ##
  # Calls +say+ with +msg+ or the results of the block if really_verbose
  # is true.

  def verbose(msg = nil)
    say(clean_text(msg || yield)) if Gem.configuration.really_verbose
  end
end

##
# Gem::StreamUI implements a simple stream based user interface.

class Gem::StreamUI
  extend Gem::Deprecate

  ##
  # The input stream

  attr_reader :ins

  ##
  # The output stream

  attr_reader :outs

  ##
  # The error stream

  attr_reader :errs

  ##
  # Creates a new StreamUI wrapping +in_stream+ for user input, +out_stream+
  # for standard output, +err_stream+ for error output.  If +usetty+ is true
  # then special operations (like asking for passwords) will use the TTY
  # commands to disable character echo.

  def initialize(in_stream, out_stream, err_stream=$stderr, usetty=true)
    @ins = in_stream
    @outs = out_stream
    @licenses/alt-ruby32-devel/LEGAL000064400000127612150403134230012125 0ustar00s.  Returns the pair
  # [option_name, option_index].

  def choose_from_list(question, list)
    @outs.puts question

    list.each_with_index do |item, index|
      @outs.puts " #{index + 1}. #{item}"
    end

    @outs.print "> "
    @outs.flush

    result = @ins.gets

    return nil, nil unless result

    result = result.strip.to_i - 1
    return nil, nil unless (0...list.size) === result
    [list[result], result]
  end

  ##
  # Ask a question.  Returns a true for yes, false for no.  If not connected
  # to a tty, raises an exception if default is nil, otherwise returns
  # default.

  def ask_yes_no(question, default=nil)
    unless tty?
      if default.nil?
        raise Gem::OperationNotSupportedError,
              "Not connected to a tty and no default specified"
      else
        return default
      end
    end

    default_answer = case default
                     when nil
                       "yn"
                     when true
                       "Yn"
                     else
                       "yN"
    end

    result = nil

    while result.nil? do
      result = case ask "#{question} [#{default_answer}]"
               when /^y/i then true
               when /^n/i then false
               when /^$/  then default
      end
    end

    result
  end

  ##
  # Ask a question.  Returns an answer if connected to a tty, nil otherwise.

  def ask(question)
    return nil unless tty?

    @outs.print(question + "  ")
    @outs.flush

    result = @ins.gets
    result&.chomp!
    result
  end

  ##
  # Ask for a password. Does not echo response to terminal.

  def ask_for_password(question)
    return nil unless tty?

    @outs.print(question, "  ")
    @outs.flush

    password = _gets_noecho
    @outs.puts
    password&.chomp!
    password
  end

  def require_io_console
    @require_io_console ||= begin
      begin
        require "io/console"
      rescue LoadError
      end
      true
    end
  end

  def _gets_noecho
    require_io_console
    @ins.noecho { @ins.gets }
  end

  ##
  # Display a statement.

  def say(statement="")
    @outs.puts statement
  end

  ##
  # Display an informational alert.  Will ask +question+ if it is not nil.

  def alert(statement, question=nil)
    @outs.puts "INFO:  #{statement}"
    ask(question) if question
  end

  ##
  # Display a warning on stderr.  Will ask +question+ if it is not nil.

  def alert_warning(statement, question=nil)
    @errs.puts "WARNING:  #{statement}"
    ask(question) if question
  end

  ##
  # Display an error message in a location expected to get error messages.
  # Will ask +question+ if it is not nil.

  def alert_error(statement, question=nil)
    @errs.puts "ERROR:  #{statement}"
    ask(question) if question
  end

  ##
  # Terminate the application with exit code +status+, running any exit
  # handlers that might have been defined.

  def terminate_interaction(status = 0)
    close
    raise Gem::SystemExitException, status
  end

  def close
  end

  ##
  # Return a progress reporter object chosen from the current verbosity.

  def progress_reporter(*args)
    case Gem.configuration.verbose
    when nil, false
      SilentProgressReporter.new(@outs, *args)
    when true
      SimpleProgressReporter.new(@outs, *args)
    else
      VerboseProgressReporter.new(@outs, *args)
    end
  end

  ##
  # An absolutely silent progress reporter.

  class SilentProgressReporter
    ##
    # The count of items is never updated for the silent progress reporter.

    attr_reader :count

    ##
    # Creates a silent progress reporter that ignores all input arguments.

    def initialize(out_stream, size, initial_message, terminal_message = nil)
    end

    ##
    # Does not print +message+ when updated as this object has taken a vow of
    # silence.

    def updated(message)
    end

    ##
    # Does not print anything when complete as this object has taken a vow of
    # silence.

    def done
    end
  end

  ##
  # A basic dotted progress reporter.

  class SimpleProgressReporter
    include Gem::DefaultUserInteraction

    ##
    # The number of progress items counted so far.

    attr_reader :count

    ##
    # Creates a new progress reporter that will write to +out_stream+ for
    # +size+ items.  Shows the given +initial_message+ when progress starts
    # and the +terminal_message+ when it is complete.

    def initialize(out_stream, size, initial_message, terminal_message = "complete")
      @out = out_stream
      @total = size
      @count = 0
      @terminal_message = terminal_message

      @out.puts initial_message
    end

    ##
    # Prints out a dot and ignores +message+.

    def updated(message)
      @count += 1
      @out.print "."
      @out.flush
    end

    ##
    # Prints out the terminal message.

    def done
      @out.puts "\n#{@terminal_message}"
    end
  end

  ##
  # A progress reporter that prints out messages about the current progress.

  class VerboseProgressReporter
    include Gem::DefaultUserInteraction

    ##
    # The number of progress items counted so far.

    attr_reader :count

    ##
    # Creates a new progress reporter that will write to +out_stream+ for
    # +size+ items.  Shows the given +initial_message+ when progress starts
    # and the +terminal_message+ when it is complete.

    def initialize(out_stream, size, initial_message, terminal_message = "complete")
      @out = out_stream
      @total = size
      @count = 0
      @terminal_message = terminal_message

      @out.puts initial_message
    end

    ##
    # Prints out the position relative to the total and the +message+.

    def updated(message)
      @count += 1
      @out.puts "#{@count}/#{@total}: #{message}"
    end

    ##
    # Prints out the terminal message.

    def done
      @out.puts @terminal_message
    end
  end

  ##
  # Return a download reporter object chosen from the current verbosity

  def download_reporter(*args)
    if [nil, false].include?(Gem.configuration.verbose) || !@outs.tty?
      SilentDownloadReporter.new(@outs, *args)
    else
      ThreadedDownloadReporter.new(@outs, *args)
    end
  end

  ##
  # An absolutely silent download reporter.

  class SilentDownloadReporter
    ##
    # The silent download reporter ignores all arguments

    def initialize(out_stream, *args)
    end

    ##
    # The silent download reporter does not display +filename+ or care about
    # +filesize+ because it is silent.

    def fetch(filename, filesize)
    end

    ##
    # Nothing can update the silent download reporter.

    def update(current)
    end

    ##
    # The silent download reporter won't tell you when the download is done.
    # Because it is silent.

    def done
    end
  end

  ##
  # A progress reporter that behaves nicely with threaded downloading.

  class ThreadedDownloadReporter
    MUTEX = Thread::Mutex.new

    ##
    # The current file name being displayed

    attr_reader :file_name

    ##
    # Creates a new threaded download reporter that will display on
    # +out_stream+.  The other arguments are ignored.

    def initialize(out_stream, *args)
      @file_name = nil
      @out = out_stream
    end

    ##
    # Tells the download reporter that the +file_name+ is being fetched.
    # The other arguments are ignored.

    def fetch(file_name, *args)
      if @file_name.nil?
        @file_name = file_name
        locked_puts "Fetching #{@file_name}"
      end
    end

    ##
    # Updates the threaded download reporter for the given number of +bytes+.

    def update(bytes)
      # Do nothing.
    end

    ##
    # Indicates the download is complete.

    def done
      # Do nothing.
    end

    private

    def locked_puts(message)
      MUTEX.synchronize do
        @out.puts message
      end
    end
  end
end

##
# Subclass of StreamUI that instantiates the user interaction using $stdin,
# $stdout, and $stderr.

class Gem::ConsoleUI < Gem::StreamUI
  ##
  # The Console UI has no arguments as it defaults to reading input from
  # stdin, output to stdout and warnings or errors to stderr.

  def initialize
    super $stdin, $stdout, $stderr, true
  end
end

##
# SilentUI is a UI choice that is absolutely silent.

class Gem::SilentUI < Gem::StreamUI
  ##
  # The SilentUI has no arguments as it does not use any stream.

  def initialize
    io = NullIO.new
    super io, io, io, false
  end

  def close
  end

  def download_reporter(*args) # :nodoc:
    SilentDownloadReporter.new(@outs, *args)
  end

  def progress_reporter(*args) # :nodoc:
    SilentProgressReporter.new(@outs, *args)
  end

  ##
  # An absolutely silent IO.

  class NullIO
    def puts(*args)
    end

    def print(*args)
    end

    def flush
    end

    def gets(*args)
    end

    def tty?
      false
    end
  end
end
rubygems/rubygems/bundler_version_finder.rb000064400000003731150403134230015311 0ustar00# frozen_string_literal: true

module Gem::BundlerVersionFinder
  def self.bundler_version
    v = ENV["BUNDLER_VERSION"]

    v ||= bundle_update_bundler_version
    return if v == true

    v ||= lockfile_version
    return unless v

    Gem::Version.new(v)
  end

  def self.prioritize!(specs)
    exact_match_index = specs.find_index {|spec| spec.version == bundler_version }
    return unless exact_match_index

    specs.unshift(specs.delete_at(exact_match_index))
  end

  def self.bundle_update_bundler_version
    return unless ["bundle", "bundler"].include? File.basename($0)
    return unless "update".start_with?(ARGV.first || " ")
    bundler_version = nil
    update_index = nil
    ARGV.each_with_index do |a, i|
      if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
        bundler_version = a
      end
      next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
      bundler_version = $1 || true
      update_index = i
    end
    bundler_version
  end
  private_class_method :bundle_update_bundler_version

  def self.lockfile_version
    return unless contents = lockfile_contents
    regexp = /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
    return unless contents =~ regexp
    $1
  end
  private_class_method :lockfile_version

  def self.lockfile_contents
    gemfile = ENV["BUNDLE_GEMFILE"]
    gemfile = nil if gemfile&.empty?

    unless gemfile
      begin
        Gem::Util.traverse_parents(Dir.pwd) do |directory|
          next unless gemfile = Gem::GEM_DEP_FILES.find {|f| File.file?(f) }

          gemfile = File.join directory, gemfile
          break
        end
      rescue Errno::ENOENT
        return
      end
    end

    return unless gemfile

    lockfile = case gemfile
               when "gems.rb" then "gems.locked"
               else "#{gemfile}.lock"
    end

    return unless File.file?(lockfile)

    File.read(lockfile)
  end
  private_class_method :lockfile_contents
end
systemtap/tapset/libruby.so.3.2.stp000064400000020726150403134230013220 0ustar00:') <= ($1.empty? || $2.empty? ? 8 : 7) or
          raise InvalidAddressError, "invalid address: #{@addr}"
        left = $1
        right = $2
        addr = 0
      end
    else
      raise InvalidAddressError, "invalid address: #{@addr}"
    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).injeruby/pstore.rb000064400000051023150403134240007363 0ustar00
unless Socket.const_defined? :AF_INET6
  class Socket < BasicSocket
    # IPv6 protocol family
    AF_INET6 = Object.new.freeze
  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
ruby/pstore.rb000064400000051023150403134240007363 0ustar00# 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 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.
#
# There are three important concepts here (details at the links):
#
# - {Store}[rdoc-ref:PStore@The+Store]: a store is an instance of \PStore.
# - {Entries}[rdoc-ref:PStore@Entries]: the store is hash-like;
#   each entry is the key for a stored object.
# - {Transactions}[rdoc-ref:PStore@Transactions]: each transaction is a collection
#   of prospective changes to the store;
#   a transaction is defined in the block given with a call
#   to PStore#transaction.
#
# == About the Examples
#
# Examples on this page need a store that has known properties.
# They can get a new (and populated) store by calling thus:
#
#   example_store do |store|
#     # Example code using store goes here.
#   end
#
# All we really need to know about +example_store+
# is that it yields a fresh store with a known population of entries;
# its implementation:
#
#   require 'pstore'
#   require 'tempfile'
#   # Yield a pristine store for use in examples.
#   def example_store
#     # Create the store in a temporary file.
#     Tempfile.create do |file|
#       store = PStore.new(file)
#       # Populate the store.
#       store.transaction do
#         store[:foo] = 0
#         store[:bar] = 1
#         store[:baz] = 2
#       end
#       yield store
#     end
#   end
#
# == The Store
#
# The contents of the store are maintained in a file whose path is specified
# when the store is created (see PStore.new).
# The objects are stored and retrieved using
# module Marshal, which means that certain objects cannot be added to the store;
# see {Marshal::dump}[rdoc-ref:Marshal.dump].
#
# == Entries
#
# A store may have any number of entries.
# Each entry has a key and a value, just as in a hash:
#
# - Key: as in a hash, the key can be (almost) any object;
#   see {Hash Keys}[rdoc-ref:Hash@Hash+Keys].
#   You may find it convenient to keep it simple by using only
#   symbols or strings as keys.
# - Value: the value may be any object that can be marshalled by \Marshal
#   (see {Marshal::dump}[rdoc-ref:Marshal.dump])
#   and in fact may be a collection
#   (e.g., an array, a hash, a set, a range, etc).
#   That collection may in turn contain nested objects,
#   including collections, to any depth;
#   those objects must also be \Marshal-able.
#   See {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
#
# == Transactions
#
# === The Transaction Block
#
# The block given with a call to method #transaction#
# contains a _transaction_,
# which consists of calls to \PStore methods that
# read from or write to the store
# (that is, all \PStore methods except #transaction itself,
# #path, and Pstore.new):
#
#   example_store do |store|
#     store.transaction do
#       store.keys # => [:foo, :bar, :baz]
#       store[:bat] = 3
#       store.keys # => [:foo, :bar, :baz, :bat]
#     end
#   end
#
# Execution of the transaction is deferred until the block exits,
# and is executed _atomically_ (all-or-nothing):
# either all transaction calls are executed, or none are.
# This maintains the integrity of the store.
#
# Other code in the block (including even calls to #path and PStore.new)
# is executed immediately, not deferred.
#
# The transaction block:
#
# - May not contain a nested call to #transaction.
# - Is the only context where methods that read from or write to
#   the store are allowed.
#
# As seen above, changes in a transaction are made automatically
# when the block exits.
# The block may be exited early by calling method #commit or #abort.
#
# - Method #commit triggers the update to the store and exits the block:
#
#     example_store do |store|
#       store.transaction do
#         store.keys # => [:foo, :bar, :baz]
#         store[:bat] = 3
#         store.commit
#         fail 'Cannot get here'
#       end
#       store.transaction do
#         # Update was completed.
#         store.keys # => [:foo, :bar, :baz, :bat]
#       end
#     end
#
# - Method #abort discards the update to the store and exits the block:
#
#     example_store do |store|
#       store.transaction do
#         store.keys # => [:foo, :bar, :baz]
#         store[:bat] = 3
#         store.abort
#         fail 'Cannot get here'
#       end
#       store.transaction do
#         # Update was not completed.
#         store.keys # => [:foo, :bar, :baz]
#       end
#     end
#
# === Relicenses/alt-ruby32-devel/COPYING.ja000064400000004776150403134230013007 0ustar00ay also be a hierarchy of objects nested to any depth:
#
#   deep_store = PStore.new('deep.store')
#   deep_store.transaction do
#     array_of_hashes = [{}, {}, {}]
#     deep_store[:array_of_hashes] = array_of_hashes
#     deep_store[:array_of_hashes] # => [{}, {}, {}]
#     hash_of_arrays = {foo: [], bar: [], baz: []}
#     deep_store[:hash_of_arrays] = hash_of_arrays
#     deep_store[:hash_of_arrays]  # => {:foo=>[], :bar=>[], :baz=>[]}
#     deep_store[:hash_of_arrays][:foo].push(:bat)
#     deep_store[:hash_of_arrays]  # => {:foo=>[:bat], :bar=>[], :baz=>[]}
#   end
#
# And recall that you can use
# {dig methods}[rdoc-ref:dig_methods.rdoc]
# in a returned hierarchy of objects.
#
# == Working with the Store
#
# === Creating a Store
#
# Use method PStore.new to create a store.
# The new store creates or opens its containing file:
#
#   store = PStore.new('t.store')
#
# === Modifying the Store
#
# Use method #[]= to update or create an entry:
#
#   example_store do |store|
#     store.transaction do
#       store[:foo] = 1 # Update.
#       store[:bam] = 1 # Create.
#     end
#   end
#
# Use method #delete to remove an entry:
#
#   example_store do |store|
#     store.transaction do
#       store.delete(:foo)
#       store[:foo] # => nil
#     end
#   end
#
# === Retrieving Values
#
# Use method #fetch (allows default) or #[] (defaults to +nil+)
# to retrieve an entry:
#
#   example_store do |store|
#     store.transaction do
#       store[:foo]             # => 0
#       store[:nope]            # => nil
#       store.fetch(:baz)       # => 2
#       store.fetch(:nope, nil) # => nil
#       store.fetch(:nope)      # Raises exception.
#     end
#   end
#
# === Querying the Store
#
# Use method #key? to determine whether a given key exists:
#
#   example_store do |store|
#     store.transaction do
#       store.key?(:foo) # => true
#     end
#   end
#
# Use method #keys to retrieve keys:
#
#   example_store do |store|
#     store.transaction do
#       store.keys # => [:foo, :bar, :baz]
#     end
#   end
#
# Use method #path to retrieve the path to the store's underlying file;
# this method may be called from outside a transaction block:
#
#   store = PStore.new('t.store')
#   store.path # => "t.store"
#
# == Transaction Safety
#
# For transaction safety, see:
#
# - Optional argument +thread_safe+ at method PStore.new.
# - Attribute #ultra_safe.
#
# Needless to say, if you're storing valuable data with \PStore, then you should
# backup the \PStore file from time to time.
#
# == An Example Store
#
#  require "pstlicenses/alt-ruby32-devel/LEGAL000064400000127612150403134230012125 0ustar00){2,}/)
#    end
#
#  end
#
#  # Create a new wiki page.
#  home_page = WikiPage.new("HomePage", "James Edward Gray II",
#                           "A page about the JoysOfDocumentation..." )
#
#  wiki = PStore.new("wiki_pages.pstore")
#  # Update page data and the index together, or not at all.
#  wiki.transaction do
#    # Store page.
#    wiki[home_page.page_name] = home_page
#    # Create page index.
#    wiki[:wiki_index] ||= Array.new
#    # Update wiki index.
#    wiki[:wiki_index].push(*home_page.wiki_page_references)
#  end
#
#  # Read wiki data, setting argument read_only to true.
#  wiki.transaction(true) do
#    wiki.keys.each do |key|
#      puts key
#      puts wiki[key]
#    end
#  end
#
class PStore
  VERSION = "0.1.2"

  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 an unlikely error (such as memory-error or filesystem error) occurs:
  #
  # - +true+: changes are posted by creating a temporary file,
  #   writing the updated data to it, then renaming the file to the given #path.
  #   File integrity is maintained.
  #   Note: has effect only if the filesystem has atomic file rename
  #   (as do POSIX platforms Linux, MacOS, FreeBSD and others).
  #
  # - +false+ (the default): changes are posted by rewinding the open file
  #   and writing the updated data.
  #   File integrity is maintained if the filesystem raises
  #   no unexpected I/O error;
  #   if such an error occurs during a write to the store,
  #   the file may become corrupted.
  #
  attr_accessor :ultra_safe

  # Returns a new \PStore object.
  #
  # Argument +file+ is the path to the file in which objects are to be stored;
  # if the file exists, it should be one that was written by \PStore.
  #
  #   path = 't.store'
  #   store = PStore.new(path)
  #
  # A \PStore object is
  # {reentrant}[https://en.wikipedia.org/wiki/Reentrancy_(computing)].
  # If argument +thread_safe+ is given as +true+,
  # the object is also thread-safe (at the cost of a small performance penalty):
  #
  #   store = PStore.new(path, true)
  #
  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

  # Returns the value for the given +key+ if the key exists.
  # +nil+ otherwise;
  # if not +nil+, the returned value is an object or a hierarchy of objects:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store[:foo]  # => 0
  #       store[:nope] # => nil
  #     end
  #   end
  #
  # Returns +nil+ if there is no such key.
  #
  # See also {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
  #
  # Raises an exception if called outside a transaction block.
  def [](key)
    in_transaction
    @table[key]
  end

  # Like #[], except that it accepts a default value for the store.
  # If the +key+ does not exist:
  #
  # - Raises an exception if +default+ is +PStore::Error+.
  # - Returns the value of +default+ otherwise:
  #
  #     example_store do |store|
  #       store.transaction do
  #         store.fetch(:nope, nil) # => nil
  #         store.fetch(:nope)      # Raises an exception.
  #       end
  #     end
  #
  # Raises an exception if called outside a transaction block.
  def fetch(key, default=PStore::Error)
    in_transaction
    unless @table.key? key
      if default == PStore::Error
        raise PStore::Error, format("undefined key `%s'", key)
      else
        return default
      end
    end
    @table[key]
  end

  # Creates or replaces the value for the given +key+:
  #
  #   example_store do |store|
  #     temp.transaction do
  #       temp[:bat] = 3
  #     end
  #   end
  #
  # See also {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
  #
  # Raises an exception if called outside a transaction block.
  def []=(key, value)
    in_transaction_wr
    @table[key] = value
  end

  # Removes and returns the value at +key+ if it exists:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store[:bat] = 3
  #       store.delete(:bat)
  #     end
  #   end
  #
  # Returns +nil+ if there is no such key.
  #
  # Raises an exception if called outside a transaction block.
  def delete(key)
    in_transaction_wr
    @table.delete key
  end

  # Returns an array of the existing keys:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store.keys # => [:foo, :bar, :baz]
  #     end
  #   end
  #
  # Raises an exception if called outside a transaction block.
  #
  # PStore#roots is an alias for PStore#keys.
  def keys
    in_transaction
    @table.keys
  end
  alias roots keys

  # Returns +true+ if +key+ exists, +false+ otherwise:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store.key?(:foo) # => true
  #     end
  #   end
  #
  # Raises an exception if called outside a transaction block.
  #
  # PStore#root? is an alias for PStore#key?.
  def key?(key)
    in_transaction
    @table.key? key
  end
  alias root? key?

  # Returns the string file path used to create the store:
  #
  #   store.path # => "flat.store"
  #
  def path
    @filename
  end

  # Exits the current transaction block, committing any changes
  # specified in the transaction block.
  # See {Committing or Aborting}[rdoc-ref:PStore@Committing+or+Aborting].
  #
  # Raises an exception if called outside a transaction block.
  def commit
    in_transaction
    @abort = false
    throw :pstore_abort_transaction
  end

  # Exits the current transaction block, discarding any changes
  # specified in the transaction block.
  # See {Committing or Aborting}[rdoc-ref:PStore@Committing+or+Aborting].
  #
  # Raises an exception if called outside a transaction block.
  def abort
    in_transaction
    @abort = true
    throw :pstore_abort_transaction
  end

  # Opens a transaction block for the store.
  # See {Transactions}[rdoc-ref:PStore@Transactions].
  #
  # With argument +read_only+ as +false+, the block may both read from
  # and write to the store.
  #
  # With argument +read_only+ as +true+, the block may not include calls
  # to #transaction, #[]=, or #delete.
  #
  # Raises an exception if called within a transaction block.
  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 = {}
    ruby/net/protocol.rb000064400000026772150403134240010513 0ustar00PTY_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
ruby/net/protocol.rb000064400000026772150403134240010513 0ustar00# 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 <aamine@loveruby.net>
#
# 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.2.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
      @rbuf_empty = true
      @rbuf_offset = 0
    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
          if s = rbuf_consume_all
            read_bytes += s.bytesize
            dest << s
          end
          rbuf_fill
        end
        s = rbuf_consume(len - read_bytes)
        read_bytes += s.bytesize
        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
          if s = rbuf_consume_all
            read_bytes += s.bytesize
            dest << s
          end
          rbuf_fill
        end
      rescue EOFError
        ;
      end
      LOG "read #{read_bytes} bytes"
      dest
    end

    def readuntil(terminator, ignore_eof = false)
      offset = @rbuf_offset
      begin
        until idx = @rbuf.index(terminator, offset)
          offset = @rbuf.bytesize
          rbuf_fill
        end
        return rbuf_consume(idx + terminator.bytesize - @rbuf_offset)
      rescue EOFError
        raise unless ignore_eof
        return rbuf_consume
      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
        @rbuf_empty = false
        if rv.equal?(tmp)
          @rbuf_offset = 0
        else
          @rbuf << rv
          rv.clear
        end
        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_flush
      if @rbuf_empty
        @rbuf.clear
        @rbuf_offset = 0
      end
      nil
    end

    def rbuf_size
      @rbuf.bytesize - @rbuf_offset
    end

    def rbuf_consume_all
      rbuf_consume if rbuf_size > 0
    end

    def rbuf_consume(len = nil)
      if @rbuf_offset == 0 && (len.nil? || len == @rbuf.bytesize)
        s = @rbuf
        @rbuf = ''.b
        @rbuf_offset = 0
        @rbuf_empty = true
      elsif len.nil?
        s = @rbuf.byteslice(@rbuf_offset..-1)
        @rbuf = ''.b
        @rbuf_offset = 0
        @rbuf_empty = true
      else
        s = @rbuf.byteslice(@rbuf_offset, len)
        @rbuf_offset += len
        @rbuf_empty = @rbuf_offset == @rbuf.bytesize
        rbuf_flush
      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_nonbloclicenses/alt-ruby32-devel/BSDL000064400000002413150403134230012014 0ustar00     # 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 {
     licenses/alt-ruby32-devel/COPYING000064400000004573150403134230012411 0ustar00ustar00") + "\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

ruby/net/http.rb000064400000245707150403134240007632 0ustar00ruby/net/https.rb000064400000001023150403134240007772 0ustar00# frozen_string_literal: true
=begin

= net/https -- SSL/TLS enhancelicenses/alt-ruby32-devel/GPL000064400000043254150403134230011722 0ustar00ruby/net/http.rb000064400000245707150403134240007632 0ustar00# frozen_string_literal: true
#
# = net/http.rb
#
# Copyright (c) 1999-2007 Yukihiro Matsumoto
# Copyright (c) 1999-2007 Minero Aoki
# Copyright (c) 2001 GOTOU Yuuzou
#
# Written and maintained by Minero Aoki <aamine@loveruby.net>.
# HTTPS support added by GOTOU Yuuzou <gotoyuzo@notwork.org>.
#
# 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'
require 'resolv'
autoload :OpenSSL, 'openssl'

module Net   #:nodoc:

  # :stopdoc:
  class HTTPBadResponse < StandardError; end
  class HTTPHeaderSyntaxError < StandardError; end
  # :startdoc:

  # \Class \Net::HTTP provides a rich library that implements the client
  # in a client-server model that uses the \HTTP request-response protocol.
  # For information about \HTTP, see:
  #
  # - {Hypertext Transfer Protocol}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol].
  # - {Technical overview}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Technical_overview].
  #
  # == About the Examples
  #
  # :include: doc/net-http/examples.rdoc
  #
  # == Strategies
  #
  # - If you will make only a few GET requests,
  #   consider using {OpenURI}[rdoc-ref:OpenURI].
  # - If you will make only a few requests of all kinds,
  #   consider using the various singleton convenience methods in this class.
  #   Each of the following methods automatically starts and finishes
  #   a {session}[rdoc-ref:Net::HTTP@Sessions] that sends a single request:
  #
  #     # Return string response body.
  #     Net::HTTP.get(hostname, path)
  #     Net::HTTP.get(uri)
  #
  #     # Write string response body to $stdout.
  #     Net::HTTP.get_print(hostname, path)
  #     Net::HTTP.get_print(uri)
  #
  #     # Return response as Net::HTTPResponse object.
  #     Net::HTTP.get_response(hostname, path)
  #     Net::HTTP.get_response(uri)
  #     data = '{"title": "foo", "body": "bar", "userId": 1}'
  #     Net::HTTP.post(uri, data)
  #     params = {title: 'foo', body: 'bar', userId: 1}
  #     Net::HTTP.post_form(uri, params)
  #
  # - If performance is important, consider using sessions, which lower request overhead.
  #   This {session}[rdoc-ref:Net::HTTP@Sessions] has multiple requests for
  #   {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]
  #   and {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
  #
  #     Net::HTTP.start(hostname) do |http|
  #       # Session started automatically before block execution.
  #       http.get(path)
  #       http.head(path)
  #       body = 'Some text'
  #       http.post(path, body)  # Can also have a block.
  #       http.put(path, body)
  #       http.delete(path)
  #       http.options(path)
  #       http.trace(path)
  #       http.patch(path, body) # Can also have a block.
  #       http.copy(path)
  #       http.lock(path, body)
  #       http.mkcol(path, body)
  #       http.move(path)
  #       http.propfind(path, body)
  #       http.proppatch(path, body)
  #       http.unlock(path, body)
  #       # Session finished automatically at block exit.
  #     end
  #
  # The methods cited above are convenience methods that, via their few arguments,
  # allow minimal control over the requests.
  # For greater control, consider using {request objects}[rdoc-ref:Net::HTTPRequest].
  #
  # == URIs
  #
  # On the internet, a URI
  # ({Universal Resource Identifier}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier])
  # is a string that identifies a particular resource.
  # It consists of some or all of: scheme, hostname, path, query, and fragment;
  # see {URI syntax}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax].
  #
  # A Ruby {URI::Generic}[rdoc-ref:URI::Generic] object
  # represents an internet URI.
  # It provides, among others, methods
  # +scheme+, +hostname+, +path+, +query+, and +fragment+.
  #
  # === Schemes
  #
  # An internet \URI has
  # a {scheme}[https://en.wikipedia.org/wiki/List_of_URI_schemes].
  #
  # The two schemes supported in \Net::HTTP are <tt>'https'</tt> and <tt>'http'</tt>:
  #
  #   uri.scheme                       # => "https"
  #   URI('http://example.com').scheme # => "http"
  #
  # === Hostnames
  #
  # A hostname identifies a server (host) to which requests may be sent:
  #
  #   hostname = uri.hostname # => "jsonplaceholder.typicode.com"
  #   Net::HTTP.start(hostname) do |http|
  #     # Some HTTP stuff.
  #   end
  #
  # === Paths
  #
  # A host-specific path identifies a resource on the host:
  #
  #   _uri = uri.dup
  #   _uri.path = '/todos/1'
  #   hostname = _uri.hostname
  #   path = _uri.path
  #   Net::HTTP.get(hostname, path)
  #
  # === Queries
  #
  # A host-specific query adds name/value pairs to the URI:
  #
  #   _uri = uri.dup
  #   params = {userId: 1, completed: false}
  #   _uri.query = URI.encode_www_form(params)
  #   _uri # => #<URI::HTTPS https://jsonplaceholder.typicode.com?userId=1&completed=false>
  #   Net::HTTP.get(_uri)
  #
  # === Fragments
  #
  # A {URI fragment}[https://en.wikipedia.org/wiki/URI_fragment] has no effect
  # in \Net::HTTP;
  # the same data is returned, regardless of whether a fragment is included.
  #
  # == Request Headers
  #
  # Request headers may be used to pass additional information to the host,
  # similar to arguments passed in a method call;
  # each header is a name/value pair.
  #
  # Each of the \Net::HTTP methods that sends a request to the host
  # has optional argument +headers+,
  # where the headers are expressed as a hash of field-name/value pairs:
  #
  #   headers = {Accept: 'application/json', Connection: 'Keep-Alive'}
  #   Net::HTTP.get(uri, headers)
  #
  # See lists of both standard request fields and common request fields at
  # {Request Fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
  # A host may also accept other custom fields.
  #
  # == \HTTP Sessions
  #
  # A _session_ is a connection between a server (host) and a client that:
  #
  # - Is begun by instance method Net::HTTP#start.
  # - May contain any number of requests.
  # - Is ended by instance method Net::HTTP#finish.
  #
  # See example sessions at {Strategies}[rdoc-ref:Net::HTTP@Strategies].
  #
  # === Session Using \Net::HTTP.start
  #
  # If you have many requests to make to a single host (and port),
  # consider using singleton method Net::HTTP.start with a block;
  # the method handles the session automatically by:
  #
  # - Calling #start before block execution.
  # - Executing the block.
  # - Calling #finish after block execution.
  #
  # In the block, you can use these instance methods,
  # each of which that sends a single request:
  #
  # - {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]:
  #
  #   - #get, #request_get: GET.
  #   - #head, #request_head: HEAD.
  #   - #post, #request_post: POST.
  #   - #delete: DELETE.
  #   - #options: OPTIONS.
  #   - #trace: TRACE.
  #   - #patch: PATCH.
  #
  # - {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
  #
  #   - #copy: COPY.
  #   - #lock: LOCK.
  #   - #mkcol: MKCOL.
  #   - #move: MOVE.
  #   - #propfind: PROPFIND.
  #   - #proppatch: PROPPATCH.
  #   - #unlock: UNLOCK.
  #
  # === Session Using \Net::HTTP.start and \Net::HTTP.finish
  #
  # You can manage a session manually using methods #start and #finish:
  #
  #   http = Net::HTTP.new(hostname)
  #   http.start
  #   http.get('/todos/1')
  #   http.get('/todos/2')
  #   http.delete('/posts/1')
  #   http.finish # Needed to free resources.
  #
  # === Single-Request Session
  #
  # Certain convenience methods automatically handle a session by:
  #
  # - Creating an \HTTP object
  # - Starting a session.
  # - Sending a single request.
  # - Finishing the session.
  # - Destroying the object.
  #
  # Such methods that send GET requests:
  #
  # - ::get: Returns the string response body.
  # - ::get_print: Writes the string response body to $stdout.
  # - ::get_response: Returns a Net::HTTPResponse object.
  #
  # Such methods that send POST requests:
  #
  # - ::post: Posts data to the host.
  # - ::post_form: Posts form data to the host.
  #
  # == \HTTP Requests and Responses
  #
  # Many of the methods above are convenience methods,
  # each of which sends a request and returns a string
  # without directly using \Net::HTTPRequest and \Net::HTTPResponse objects.
  #
  # You can, however, directly create a request object, send the request,
  # and retrieve the response object; see:
  #
  # - Net::HTTPRequest.
  # - Net::HTTPResponse.
  #
  # == Following Redirection
  #
  # Each returned response is an instance of a subclass of Net::HTTPResponse.
  # See the {response class hierarchy}[rdoc-ref:Net::HTTPResponse@Response+Subclasses].
  #
  # In particular, class Net::HTTPRedirection is the parent
  # of all redirection classes.
  # This allows you to craft a case statement to handle redirections properly:
  #
  #   def fetch(uri, limit = 10)
  #     # You should choose a better exception.
  #     raise ArgumentError, 'Too many HTTP redirects' if limit == 0
  #
  #     res = Net::HTTP.get_response(URI(uri))
  #     case res
  #     when Net::HTTPSuccess     # Any success class.
  #       res
  #     when Net::HTTPRedirection # Any redirection class.
  #       location = res['Location']
  #       warn "Redirected to #{location}"
  #       fetch(location, limit - 1)
  #     else                      # Any other class.
  #       res.value
  #     end
  #   end
  #
  #   fetch(uri)
  #
  # == Basic Authentication
  #
  # Basic authentication is performed according to
  # {RFC2617}[http://www.ietf.org/rfc/rfc2617.txt]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.basic_auth('user', 'pass')
  #   res = Net::HTTP.start(hostname) do |http|
  #     http.request(req)
  #   end
  #
  # == 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.
  #
  #   Net::HTTP.start(hostname) do |http|
  #     req = Net::HTTP::Get.new(uri)
  #     http.request(req) do |res|
  #       open('t.tmp', 'w') do |f|
  #         res.read_body do |chunk|
  #           f.write chunk
  #         end
  #       end
  #     end
  #   end
  #
  # == HTTPS
  #
  # HTTPS is enabled for an \HTTP connection by Net::HTTP#use_ssl=:
  #
  #   Net::HTTP.start(hostname, :use_ssl => true) do |http|
  #     req = Net::HTTP::Get.new(uri)
  #     res = http.request(req)
  #   end
  #
  # Or if you simply want to make a GET request, you may pass in a 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 https://jsonplaceholder.typicode.com/>
  #   Net::HTTP.get(uri)
  #
  # == Proxy Server
  #
  # An \HTTP object can have
  # a {proxy server}[https://en.wikipedia.org/wiki/Proxy_server].
  #
  # You can create an \HTTP object with a proxy server
  # using method Net::HTTP.new or method Net::HTTP.start.
  #
  # The proxy may be defined either by argument +p_addr+
  # or by environment variable <tt>'http_proxy'</tt>.
  #
  # === Proxy Using Argument +p_addr+ as a \String
  #
  # When argument +p_addr+ is a string hostname,
  # the returned +http+ has the given host as its proxy:
  #
  #   http = Net::HTTP.new(hostname, nil, 'proxy.example')
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => false
  #   http.proxy_address   # => "proxy.example"
  #   # These use default values.
  #   http.proxy_port      # => 80
  #   http.proxy_user      # => nil
  #   http.proxy_pass      # => nil
  #
  # The port, username, and password for the proxy may also be given:
  #
  #   http = Net::HTTP.new(hostname, nil, 'proxy.example', 8000, 'pname', 'ppass')
  #   # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => false
  #   http.proxy_address   # => "proxy.example"
  #   http.proxy_port      # => 8000
  #   http.proxy_user      # => "pname"
  #   http.proxy_pass      # => "ppass"
  #
  # === Proxy Using '<tt>ENV['http_proxy']</tt>'
  #
  # When environment variable <tt>'http_proxy'</tt>
  # is set to a \URI string,
  # the returned +http+ will have the server at that URI as its proxy;
  # note that the \URI string must have a protocol
  # such as <tt>'http'</tt> or <tt>'https'</tt>:
  #
  #   ENV['http_proxy'] = 'http://example.com'
  #   http = Net::HTTP.new(hostname)
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => true
  #   http.proxy_address   # => "example.com"
  #   # These use default values.
  #   http.proxy_port      # => 80
  #   http.proxy_user      # => nil
  #   http.proxy_pass      # => nil
  #
  # The \URI string may include proxy username, password, and port number:
  #
  #   ENV['http_proxy'] = 'http://pname:ppass@example.com:8000'
  #   http = Net::HTTP.new(hostname)
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => true
  #   http.proxy_address   # => "example.com"
  #   http.proxy_port      # => 8000
  #   http.proxy_user      # => "pname"
  #   http.proxy_pass      # => "ppass"
  #
  # === Filtering Proxies
  #
  # With method Net::HTTP.new (but not Net::HTTP.start),
  # you can use argument +p_no_proxy+ to filter proxies:
  #
  # - Reject a certain address:
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
  #     http.proxy_address # => nil
  #
  # - Reject certain domains or subdomains:
  #
  #     http = Net::HTTP.new('example.com', nil, 'my.proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
  #     http.proxy_address # => nil
  #
  # - Reject certain addresses and port combinations:
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:1234')
  #     http.proxy_address # => "proxy.example"
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:8000')
  #     http.proxy_address # => nil
  #
  # - Reject a list of the types above delimited using a comma:
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
  #     http.proxy_address # => nil
  #
  #     http = Net::HTTP.new('example.com', nil, 'my.proxy', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
  #     http.proxy_address # => nil
  #
  # == Compression and Decompression
  #
  # \Net::HTTP does not compress the body of a request before sending.
  #
  # By default, \Net::HTTP adds header <tt>'Accept-Encoding'</tt>
  # to a new {request object}[rdoc-ref:Net::HTTPRequest]:
  #
  #   Net::HTTP::Get.new(uri)['Accept-Encoding']
  #   # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
  #
  # This requests the server to zip-encode the response body if there is one;
  # the server is not required to do so.
  #
  # \Net::HTTP does not automatically decompress a response body
  # if the response has header <tt>'Content-Range'</tt>.
  #
  # Otherwise decompression (or not) depends on the value of header
  # {Content-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-encoding-response-header]:
  #
  # - <tt>'deflate'</tt>, <tt>'gzip'</tt>, or <tt>'x-gzip'</tt>:
  #   decompresses the body and deletes the header.
  # - <tt>'none'</tt> or <tt>'identity'</tt>:
  #   does not decompress the body, but deletes the header.
  # - Any other value:
  #   leaves the body and header unchanged.
  #
  # == What's Here
  #
  # This is a categorized summary of methods and attributes.
  #
  # === \Net::HTTP Objects
  #
  # - {::new}[rdoc-ref:Net::HTTP.new]:
  #   Creates a new instance.
  # - {#inspect}[rdoc-ref:Net::HTTP#inspect]:
  #   Returns a string representation of +self+.
  #
  # === Sessions
  #
  # - {::start}[rdoc-ref:Net::HTTP.start]:
  #   Begins a new session in a new \Net::HTTP object.
  # - {#started?}[rdoc-ref:Net::HTTP#started?]
  #   (aliased as {#active?}[rdoc-ref:Net::HTTP#active?]):
  #   Returns whether in a session.
  # - {#finish}[rdoc-ref:Net::HTTP#finish]:
  #   Ends an active session.
  # - {#start}[rdoc-ref:Net::HTTP#start]:
  #   Begins a new session in an existing \Net::HTTP object (+self+).
  #
  # === Connections
  #
  # - {:continue_timeout}[rdoc-ref:Net::HTTP#continue_timeout]:
  #   Returns the continue timeout.
  # - {#continue_timeout=}[rdoc-ref:Net::HTTP#continue_timeout=]:
  #   Sets the continue timeout seconds.
  # - {:keep_alive_timeout}[rdoc-ref:Net::HTTP#keep_alive_timeout]:
  #   Returns the keep-alive timeout.
  # - {:keep_alive_timeout=}[rdoc-ref:Net::HTTP#keep_alive_timeout=]:
  #   Sets the keep-alive timeout.
  # - {:max_retries}[rdoc-ref:Net::HTTP#max_retries]:
  #   Returns the maximum retries.
  # - {#max_retries=}[rdoc-ref:Net::HTTP#max_retrielicenses/alt-ruby32-libs/COPYING.ja000064400000004776150403134230012641 0ustar00licenses/alt-ruby32-devel/BSDL000064400000002413150403134230012014 0ustar00TTP#copy]:
  #   Sends a COPY request and returns a response object.
  # - {#delete}[rdoc-ref:Net::HTTP#delete]:
  #   Sends a DELETE request and returns a response object.
  # - {#get}[rdoc-ref:Net::HTTP#get]:
  #   Sends a GET request and returns a response object.
  # - {#head}[rdoc-ref:Net::HTTP#head]:
  #   Sends a HEAD request and returns a response object.
  # - {#lock}[rdoc-ref:Net::HTTP#lock]:
  #   Sends a LOCK request and returns a response object.
  # - {#mkcol}[rdoc-ref:Net::HTTP#mkcol]:
  #   Sends a MKCOL request and returns a response object.
  # - {#move}[rdoc-ref:Net::HTTP#move]:
  #   Sends a MOVE request and returns a response object.
  # - {#options}[rdoc-ref:Net::HTTP#options]:
  #   Sends a OPTIONS request and returns a response object.
  # - {#patch}[rdoc-ref:Net::HTTP#patch]:
  #   Sends a PATCH request and returns a response object.
  # - {#post}[rdoc-ref:Net::HTTP#post]:
  #   Sends a POST request and returns a response object.
  # - {#propfind}[rdoc-ref:Net::HTTP#propfind]:
  #   Sends a PROPFIND request and returns a response object.
  # - {#proppatch}[rdoc-ref:Net::HTTP#proppatch]:
  #   Sends a PROPPATCH request and returns a response object.
  # - {#put}[rdoc-ref:Net::HTTP#put]:
  #   Sends a PUT request and returns a response object.
  # licenses/alt-ruby32-devel/COPYING000064400000004573150403134230012411 0ustar00licenses/alt-ruby32-libs/LEGAL000064400000127612150403134230011757 0ustar00empty_response]:
  #   Returns whether to close connection on empty response.
  # - {:close_on_empty_response=}[rdoc-ref:Net::HTTP#close_on_empty_response=]:
  #   Sets whether to close connection on empty response.
  # - {:ignore_eof}[rdoc-ref:Net::HTTP#ignore_eof]:
  #   Returns whether to ignore end-of-file when reading a response body
  #   with <tt>Content-Length</tt> headers.
  # - {:ignore_eof=}[rdoc-ref:Net::HTTP#ignore_eof=]:
  #   Sets whether to ignore end-of-file when reading a response body
  #   with <tt>Content-Length</tt> headers.
  # - {:response_body_encoding}[rdoc-ref:Net::HTTP#response_body_encoding]:
  #   Returns the encoding to use for the response body.
  # - {#response_body_encoding=}[rdoc-ref:Net::HTTP#response_body_encoding=]:
  #   Sets the response body encoding.
  #
  # === Proxies
  #
  # - {:proxy_address}[rdoc-ref:Net::HTTP#proxy_address]:
  #   Returns the proxy address.
  # - {:proxy_address=}[rdoc-ref:Net::HTTP#proxy_address=]:
  #   Sets the proxy address.
  # - {::proxy_class?}[rdoc-ref:Net::HTTP.proxy_class?]:
  #   Returns whether +self+ is a proxy class.
  # - {#proxy?}[rdoc-ref:Net::HTTP#proxy?]:
  #   Returns whether +self+ has a proxy.
  # - {#proxy_address}[rdoc-ref:Net::HTTP#proxy_address]
  #   (aliased as {#proxyaddr}[rdoc-ref:Net::HTTP#proxyaddr]):
  #   Returns the proxy address.
  # - {#proxy_from_env?}[rdoc-ref:Net::HTTP#proxy_from_env?]:
  #   Returns whether the proxy is taken from an environment variable.
  # - {:proxy_from_env=}[rdoc-ref:Net::HTTP#proxy_from_env=]:
  #   Sets whether the proxy is to be taken from an environment variable.
  # - {:proxy_pass}[rdoc-ref:Net::HTTP#proxy_pass]:
  #   Returns the proxy password.
  # - {:proxy_pass=}[rdoc-ref:Net::HTTP#proxy_pass=]:
  #   Sets the proxy password.
  # - {:proxy_port}[rdoc-ref:Net::HTTP#proxy_port]:
  #   Returns the proxy port.
  # - {:proxy_port=}[rdoc-ref:Net::HTTP#prlicenses/alt-ruby32-devel/GPL000064400000043254150403134230011722 0ustar00rtification files.
  # - {:cert}[rdoc-ref:Net::HTTP#cert]:
  #   Returns the OpenSSL::X509::Certificate object to be used for client certification.
  # - {:cert=}[rdoc-ref:Net::HTTP#cert=]:
  #   Sets the OpenSSL::X509::Certificate object to be used for client certification.
  # - {:cert_store}[rdoc-ref:Net::HTTP#cert_store]:
  #   Returns the X509::Store to be used for verifying peer certificate.
  # - {:cert_store=}[rdoc-ref:Net::HTTP#cert_store=]:
  #   Sets the X509::Store to be used for verifying peer certificate.
  # - {:ciphers}[rdoc-ref:Net::HTTP#ciphers]:
  #   Returns the available SSL ciphers.
  # - {:ciphers=}[rdoc-ref:Net::HTTP#ciphers=]:
  #   Sets the available SSL ciphers.
  # - {:extra_chain_cert}[rdoc-ref:Net::HTTP#extra_chain_cert]:
  #   Returns the extra X509 certificates to be added to the certificate chain.
  # - {:extra_chain_cert=}[rdoc-ref:Net::HTTP#extra_chain_cert=]:
  #   Sets the extra X509 certificates to be added to the certificate chain.
  # - {:key}[rdoc-ref:Net::HTTP#key]:
  #   Returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
  # - {:key=}[rdoc-ref:Net::HTTP#key=]:
  #   Sets the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
  # - {:max_version}[rdoc-ref:Net::HTTP#max_version]:
  #   Returns the maximum SSL version.
  # - {:max_version=}[rdoc-ref:Net::HTTP#max_version=]:
  #   Sets the maximum SSL version.
  # - {:min_version}[rdoc-ref:Net::HTTP#min_version]:
  #   Returns the minimum SSL version.
  # - {:min_version=}[rdoc-ref:Net::HTTP#min_version=]:
  #   Sets the minimum SSL version.
  # - {#peer_cert}[rdoc-ref:Net::HTTP#peer_cert]:
  #   Returns the X509 certificate chain for the session's socket peer.
  # - {:ssl_version}[rdoc-ref:Net::HTTP#ssl_version]:
  #   Returns the SSL version.
  # - {:ssl_version=}[rdoc-ref:Net::HTTP#ssl_version=]:
  #   Sets the SSL version.
  # - {#use_ssl=}[rdoc-ref:Net::HTTP#use_ssl=]:
  #   Sets whether a new session is to use Transport Layer Security.
  # - {#use_ssl?}[rdoc-ref:Net::HTTP#use_ssl?]:
  #   Returns whether +self+ uses SSL.
  # - {:verify_callback}[rdoc-ref:Net::HTTP#verify_callback]:
  #   Returns the callback for the server certification verification.
  # - {:verify_callback=}[rdoc-ref:Net::HTTP#verify_callback=]:
  #   Sets the callback for the server certification verification.
  # - {:verify_depth}[rdoc-ref:Net::HTTP#verify_depth]:
  #   Returns the maximum depth for the certificate chain verification.
  # - {:verify_depth=}[rdoc-ref:Net::HTTP#verify_depth=]:
  #   Sets the maximum depth for the certificate chain verification.
  # - {:verify_hostname}[rdoc-ref:Net::HTTP#verify_hostname]:
  #   Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
  # - {:verify_hostname=}[rdoc-ref:Net::HTTP#verify_hostname=]:
  #   Sets he flags for server the certification verification at the beginning of the SSL/TLS session.
  # - {:verify_mode}[rdoc-ref:Net::HTTP#verify_mode]:
  #   Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
  # - {:verify_mode=}[rdoc-ref:Net::HTTP#verify_mode=]:
  #   Sets the flags for server the certification verification at the beginning of the SSL/TLS session.
  #
  # === Addresses and Ports
  #
  # - {:address}[rdoc-ref:Net::HTTP#address]:
  #   Returns the string host name or host IP.
  # - {::default_port}[rdoc-ref:Net::HTTP.default_port]:
  #   Returns integer 80, the default port to use for HTTP requests.
  # - {::http_default_port}[rdoc-ref:Net::HTTP.http_default_port]:
  #   Returns integer 80, the default port to use for HTTP requests.
  # - {::https_default_port}[rdoc-ref:Net::HTTP.https_default_port]:
  #   Returns integer 443, the default port to use for HTTPS requests.
  # - {#ipaddr}[rdoc-ref:Net::HTTP#ipaddr]:
  #   Returns the IP address for the connection.
  # - {#ipaddr=}[rdoc-ref:Net::HTTP#ipaddr=]:
  #   Sets the IP address for the connection.
  # - {:local_host}[rdoc-ref:Net::HTTP#local_host]:
  #   Returns the string local host used to establish the connection.
  # - {:local_host=}[rdoc-ref:Net::HTTP#local_host=]:
  #   Sets the string local host used to establish the connection.
  # - {:local_port}[rdoc-ref:Net::HTTP#local_port]:
  #   Returns the integer local port used to establish the connection.
  # - {:local_port=}[rdoc-ref:Net::HTTP#local_port=]:
  #   Sets the integer local port used to establish the connection.
  # - {:port}[rdoc-ref:Net::HTTP#port]:
  #   Returns the integer port number.
  #
  # === \HTTP Version
  #
  # - {::version_1_2?}[rdoc-ref:Net::HTTP.version_1_2?]
  #   (aliased as {::is_version_1_2?}[rdoc-ref:Net::HTTP.is_version_1_2?]
  #   and {::version_1_2}[rdoc-ref:Net::HTTP.version_1_2]):
  #   Returns true; retained for compatibility.
  #
  # === Debugging
  #
  # - {#set_debug_output}[rdoc-ref:Net::HTTP#set_debug_output]:
  #   Sets the output stream for debugging.
  #
  class HTTP < Protocol

    # :stopdoc:
    VERSION = "0.4.1"
    HTTPVersion = '1.1'
    begin
      require 'zlib'
      HAVE_ZLIB=true
    rescue LoadError
      HAVE_ZLIB=false
    end
    # :startdoc:

    # Returns +true+; retained for compatibility.
    def HTTP.version_1_2
      true
    end

    # Returns +true+; retained for compatibility.
    def HTTP.version_1_2?
      true
    end

    # Returns +false+; retained for compatibility.
    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

    # :call-seq:
    #   Net::HTTP.get_print(hostname, path, port = 80) -> nil
    #   Net::HTTP:get_print(uri, headers = {}, port = uri.port) -> nil
    #
    # Like Net::HTTP.get, but writes the returned body to $stdout;
    # returns +nil+.
    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

    # :call-seq:
    #   Net::HTTP.get(hostname, path, port = 80) -> body
    #   Net::HTTP:get(uri, headers = {}, port = uri.port) -> body
    #
    # Sends a GET request and returns the \HTTP response body as a string.
    #
    # With string arguments +hostname+ and +path+:
    #
    #   hostname = 'jsonplaceholder.typicode.com'
    #   path = '/todos/1'
    #   puts Net::HTTP.get(hostname, path)
    #
    # Output:
    #
    #   {
    #     "userId": 1,
    #     "id": 1,
    #     "title": "delectus aut autem",
    #     "completed": false
    #   }
    #
    # With URI object +uri+ and optional hash argument +headers+:
    #
    #   uri = URI('https://jsonplaceholder.typicode.com/todos/1')
    #   headers = {'Content-type' => 'application/json; charset=UTF-8'}
    #   Net::HTTP.get(uri, headers)
    #
    # Related:
    #
    # - Net::HTTP::Get: request class for \HTTP method +GET+.
    # - Net::HTTP#get: convenience method for \HTTP method +GET+.
    #
    def HTTP.get(uri_or_host, path_or_headers = nil, port = nil)
      get_response(uri_or_host, path_or_headers, port).body
    end

    # :call-seq:
    #   Net::HTTP.get_response(hostname, path, port = 80) -> http_response
    #   Net::HTTP:get_response(uri, headers = {}, port = uri.port) -> http_response
    #
    # Like Net::HTTP.get, but returns a Net::HTTPResponse object
    # instead of the body string.
    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 a host; returns a Net::HTTPResponse object.
    #
    # Argument +url+ must be a URL;
    # argument +data+ must be a string:
    #
    #   _uri = uri.dup
    #   _uri.path = '/posts'
    #   data = '{"title": "foo", "body": "bar", "userId": 1}'
    #   headers = {'content-type': 'application/json'}
    #   res = Net::HTTP.post(_uri, data, headers) # => #<Net::HTTPCreated 201 Created readbody=true>
    #   puts res.body
    #
    # Output:
    #
    #   {
    #     "title": "foo",
    #     "body": "bar",
    #     "userId": 1,
    #     "id": 101
    #   }
    #
    # Related:
    #
    # - Net::HTTP::Post: request class for \HTTP method +POST+.
    # - Net::HTTP#post: convenience method for \HTTP method +POST+.
    #
    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 data to a host; returns a Net::HTTPResponse object.
    #
    # Argument +url+ must be a URI;
    # argument +data+ must be a hash:
    #
    #   _uri = uri.dup
    #   _uri.path = '/posts'
    #   data = {title: 'foo', body: 'bar', userId: 1}
    #   res = Net::HTTP.post_form(_uri, data) # => #<Net::HTTPCreated 201 Created readbody=true>
    #   puts res.body
    #
    # Output:
    #
    #   {
    #     "title": "foo",
    #     "body": "bar",
    #     "userId": "1",
    #     "id": 101
    #   }
    #
    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
    #

    # Returns integer +80+, the default port to use for \HTTP requests:
    #
    #   Net::HTTP.default_port # => 80
    #
    def HTTP.default_port
      http_default_port()
    end

    # Returns integer +80+, the default port to use for \HTTP requests:
    #
    #   Net::HTTP.http_default_port # => 80
    #
    def HTTP.http_default_port
      80
    end

    # Returns integer +443+, the default port to use for HTTPS requests:
    #
    #   Net::HTTP.https_default_port # => 443
    #
    def HTTP.https_default_port
      443
    end

    def HTTP.socket_type   #:nodoc: obsolete
      BufferedIO
    end

    # :call-seq:
    #   HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) -> http
    #   HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) {|http| ... } -> object
    #
    # Creates a new \Net::HTTP object, +http+, via \Net::HTTP.new:
    #
    # - For arguments +address+ and +port+, see Net::HTTP.new.
    # - For proxy-defining arguments +p_addr+ through +p_pass+,
    #   see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    # - For argument +opts+, see below.
    #
    # With no block given:
    #
    # - Calls <tt>http.start</tt> with no block (see #start),
    #   which opens a TCP connection and \HTTP session.
    # - Returns +http+.
    # - The caller should call #finish to close the session:
    #
    #     http = Net::HTTP.start(hostname)
    #     http.started? # => true
    #     http.finish
    #     http.started? # => false
    #
    # With a block given:
    #
    # - Calls <tt>http.start</tt> with the block (see #start), which:
    #
    #   - Opens a TCP connection and \HTTP session.
    #   - Calls the block,
    #     which may make any number of requests to the host.
    #   - Closes the \HTTP session and TCP connection on block exit.
    #   - Returns the block's value +object+.
    #
    # - Returns +object+.
    #
    # Example:
    #
    #   hostname = 'jsonplaceholder.typicode.com'
    #   Net::HTTP.start(hostname) do |http|
    #     puts http.get('/todos/1').body
    #     puts http.get('/todos/2').body
    #   end
    #
    # Output:
    #
    #   {
    #     "userId": 1,
    #     "id": 1,
    #     "title": "delectus aut autem",
    #     "completed": false
    #   }
    #   {
    #     "userId": 1,
    #     "id": 2,
    #     "title": "quis ut nam facilis et officia qui",
    #     "completed": false
    #   }
    #
    # If the last argument given is a hash, it is the +opts+ hash,
    # where each key is a method or accessor to be called,
    # and its value is the value to be set.
    #
    # The keys may include:
    #
    # - #ca_file
    # - #ca_path
    # - #cert
    # - #cert_store
    # - #ciphers
    # - #close_on_empty_response
    # - +ipaddr+ (calls #ipaddr=)
    # - #keep_alive_timeout
    # - #key
    # - #open_timeout
    # - #read_timeout
    # - #ssl_timeout
    # - #ssl_version
    # - +use_ssl+ (calls #use_ssl=)
    # - #verify_callback
    # - #verify_depth
    # - #verify_mode
    # - #write_timeout
    #
    # Note: If +port+ is +nil+ and <tt>opts[:use_ssl]</tt> is a truthy value,
    # the value passed to +new+ is Net::HTTP.https_default_port, not +port+.
    #
    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

    # Returns a new \Net::HTTP object +http+
    # (but does not open a TCP connection or \HTTP session).
    #
    # With only string argument +address+ given
    # (and <tt>ENV['http_proxy']</tt> undefined or +nil+),
    # the returned +http+:
    #
    # - Has the given address.
    # - Has the default port number, Net::HTTP.default_port (80).
    # - Has no proxy.
    #
    # Example:
    #
    #   http = Net::HTTP.new(hostname)
    #   # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
    #   http.address # => "jsonplaceholder.typicode.com"
    #   http.port    # => 80
    #   http.proxy?  # => false
    #
    # With integer argument +port+ also given,
    # the returned +http+ has the given port:
    #
    #   http = Net::HTTP.new(hostname, 8000)
    #   # => #<Net::HTTP jsonplaceholder.typicode.com:8000 open=false>
    #   http.port # => 8000
    #
    # For proxy-defining arguments +p_addr+ through +p_no_proxy+,
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    #
    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?(address, address, 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) # :nodoc:
      @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
      @response_body_encoding = false
      @ignore_eof = true

      @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

    # Returns a string representation of +self+:
    #
    #   Net::HTTP.new(hostname).inspect
    #   # => "#<Net::HTTP jsonplaceholder.typicode.com:80 open=false>"
    #
    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 the output stream for debugging:
    #
    #   http = Net::HTTP.new(hostname)
    #   File.open('t.tmp', 'w') do |file|
    #     http.set_debug_output(file)
    #     http.start
    #     http.get('/nosuch/1')
    #     http.finish
    #   end
    #   puts File.read('t.tmp')
    #
    # Output:
    #
    #   opening connection to jsonplaceholder.typicode.com:80...
    #   opened
    #   <- "GET /nosuch/1 HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nHost: jsonplaceholder.typicode.com\r\n\r\n"
    #   -> "HTTP/1.1 404 Not Found\r\n"
    #   -> "Date: Mon, 12 Dec 2022 21:14:11 GMT\r\n"
    #   -> "Content-Type: application/json; charset=utf-8\r\n"
    #   -> "Content-Length: 2\r\n"
    #   -> "Connection: keep-alive\r\n"
    #   -> "X-Powered-By: Express\r\n"
    #   -> "X-Ratelimit-Limit: 1000\r\n"
    #  licenses/alt-ruby32-libs/COPYING.ja000064400000004776150403134230012641 0ustar00 #   -> "NEL: {\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}\r\n"
    #   -> "Server: cloudflare\r\n"
    #   -> "CF-RAY: 778977dc484ce591-DFW\r\n"
    #   -> "alt-svc: h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400\r\n"
    #   -> "\r\n"
    #   reading 2 bytes...
    #   -> "{}"
    #   read 2 bytes
    #   Conn keep-alive
    #
    def set_debug_output(output)
      warn 'Net::HTTP#set_debug_output called after HTTP started', uplevel: 1 if started?
      @debug_output = output
    end

    # Returns the string host name or host IP given as argument +address+ in ::new.
    attr_reader :address

    # Returns the integer port number given as argument +port+ in ::new.
    attr_reader :port

    # Sets or returns the string local host used to establish the connection;
    # initially +nil+.
    attr_accessor :local_host

    # Sets or returns the integer local port used to establish the connection;
    # initially +nil+.
    attr_accessor :local_port

    # Returns the encoding to use for the response body;
    # see #response_body_encoding=.
    attr_reader :response_body_encoding

    # Sets the encoding to be used for the response body;
    # returns the encoding.
    #
    # The given +value+ may be:
    #
    # - An Encoding object.
    # - The name of an encoding.
    # - An alias for an encoding name.
    #
    # See {Encoding}[rdoc-ref:Encoding].
    #
    # Examples:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII>
    #   http.response_body_encoding = 'US-ASCII'         # => "US-ASCII"
    #   http.response_body_encoding = 'ASCII'            # => "ASCII"
    #
    def response_body_encoding=(value)
      value = Encoding.find(value) if value.is_a?(String)
      @response_body_encoding = value
    end

    # Sets whether to determine the proxy from environment variable
    # '<tt>ENV['http_proxy']</tt>';
    # see {Proxy Using ENV['http_proxy']}[rdoc-ref:Net::HTTP@Proxy+Using+-27ENV-5B-27http_proxy-27-5D-27].
    attr_writer :proxy_from_env

    # Sets the proxy address;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_address

    # Sets the proxy port;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_port

    # Sets the proxy user;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_user

    # Sets the proxy password;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_pass

  licenses/alt-ruby32-libs/LEGAL000064400000127612150403134230011757 0ustar0067.155.76"
    #   http.finish
    #
    def ipaddr
      started? ?  @socket.io.peeraddr[3] : @ipaddr
    end

    # Sets the IP address for the connection:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.ipaddr # => nil
    #   http.ipaddr = '172.67.155.76'
    #   http.ipaddr # => "172.67.155.76"
    #
    # The IP address may not be set if the session has been started.
    def ipaddr=(addr)
      raise IOError, "ipaddr value changed, but session already started" if started?
      @ipaddr = addr
    end

    # Sets or returns the numeric (\Integer or \Float) number of seconds
    # to wait for a connection to open;
    # initially 60.
    # If the connection is not made in the given interval,
    # an exception is raised.
    attr_accessor :open_timeout

    # Returns the numeric (\Integer or \Float) number of seconds
    # to wait for one block to be read (via one read(2) call);
    # see #read_timeout=.
    attr_reader :read_timeout

    # Returns the numeric (\Integer or \Float) number of seconds
    # to wait for one block to be written (via one write(2) call);
    # see #write_timeout=.
    attr_reader :write_timeout

    # Sets the 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.
    # The initial value is 1.
    #
    # Argument +retries+ must be a non-negative numeric value:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.max_retries = 2   # => 2
    #   http.max_retries       # => 2
    #
    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

    # Returns the maximum number of times to retry an idempotent request;
    # see #max_retries=.
    attr_reader :max_retries

    # Sets the read timeout, in seconds, for +self+ to integer +sec+;
    # the initial value is 60.
    #
    # Argument +sec+ must be a non-negative numeric value:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.read_timeout # => 60
    #   http.get('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
    #   http.read_timeout = 0
    #   http.get('/todos/1') # Raises Net::ReadTimeout.
    #
    def read_timeout=(sec)
      @socket.read_timeout = sec if @socket
      @read_timeout = sec
    end

    # Sets the write timeout, in seconds, for +self+ to integer +sec+;
    # the initial value is 60.
    #
    # Argument +sec+ must be a non-negative numeric value:
    #
    #   _uri = uri.dup
    #   _uri.path = '/posts'
    #   body = 'bar' * 200000
    #   data = <<EOF
    #   {"title": "foo", "body": "#{body}", "userId": "1"}
    #   EOF
    #   headers = {'content-type': 'application/json'}
    #   http = Net::HTTP.new(hostname)
    #   http.write_timeout # => 60
    #   http.post(_uri.path, data, headers)
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #   http.write_timeout = 0
    #   http.post(_uri.path, data, headers) # Raises Net::WriteTimeout.
    #
    def write_timeout=(sec)
      @socket.write_timeout = sec if @socket
      @write_timeout = sec
    end

    # Returns the continue timeout value;
    # see continue_timeout=.
    attr_reader :continue_timeout

    # Sets the continue timeout value,
    # which is the number of seconds to wait for an expected 100 Continue response.
    # If the \HTTP object does not receive a response in this many seconds
    # it sends the request body.
    def continue_timeout=(sec)
      @socket.continue_timeout = sec if @socket
      @continue_timeout = sec
    end

    # Sets or returns the numeric (\Integer or \Float) number of seconds
    # to keep the connection open after a request is sent;
    # initially 2.
    # If a new request is made during the given interval,
    # the still-open connection is used;
    # otherwise the connection will have been closed
    # and a new connection is opened.
    attr_accessor :keep_alive_timeout

    # Sets or returns whether to ignore end-of-file when reading a response body
    # with <tt>Content-Length</tt> headers;
    # initially +true+.
    attr_accessor :ignore_eof

    # Returns +true+ if the \HTTP session has been started:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.started? # => false
    #   http.start
    #   http.started? # => true
    #   http.finish # => nil
    #   http.started? # => false
    #
    #   Net::HTTP.start(hostname) do |http|
    #     http.started?
    #   end # => true
    #   http.started? # => false
    #
    def started?
      @started
    end

    alias active? started?   #:nodoc: obsolete

    # Sets or returns whether to close the connection when the response is empty;
    # initially +false+.
    attr_accessor :close_on_empty_response

    # Returns +true+ if +self+ uses SSL, +false+ otherwise.
    # See Net::HTTP#use_ssl=.
    def use_ssl?
      @use_ssl
    end

    # Sets whether a new session is to use
    # {Transport Layer Security}[https://en.wikipedia.org/wiki/Transport_Layer_Security]:
    #
    # Raises IOError if attempting to change during a session.
    #
    # Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.
    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,
    ] # :nodoc:
    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,
    ] # :nodoc:

    # Sets or returns the path to a CA certification file in PEM format.
    attr_accessor :ca_file

    # Sets or returns the path of to CA directory
    # containing certification files in PEM format.
    attr_accessor :ca_path

    # Sets or returns the OpenSSL::X509::Certificate object
    # to be used for client certification.
    attr_accessor :cert

    # Sets or returns the X509::Store to be used for verifying peer certificate.
    attr_accessor :cert_store

    # Sets or returns the available SSL ciphers.
    # See {OpenSSL::SSL::SSLContext#ciphers=}[rdoc-ref:OpenSSL::SSL::SSLContext#ciphers-3D].
    attr_accessor :ciphers

    # Sets or returns the extra X509 certificates to be added to the certificate chain.
    # See {OpenSSL::SSL::SSLContext#add_certificate}[rdoc-ref:OpenSSL::SSL::SSLContext#add_certificate].
    attr_accessor :extra_chain_cert

    # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
    attr_accessor :key

    # Sets or returns the SSL timeout seconds.
    attr_accessor :ssl_timeout

    # Sets or returns the SSL version.
    # See {OpenSSL::SSL::SSLContext#ssl_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#ssl_version-3D].
    attr_accessor :ssl_version

    # Sets or returns the minimum SSL version.
    # See {OpenSSL::SSL::SSLContext#min_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#min_version-3D].
    attr_accessor :min_version

    # Sets or returns the maximum SSL version.
    # See {OpenSSL::SSL::SSLContext#max_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#max_version-3D].
    attr_accessor :max_version

    # Sets or returns the callback for the server certification verification.
    attr_accessor :verify_callback

    # Sets or returns the maximum depth for the certificate chain verification.
    attr_accessor :verify_depth

    # Sets or returns the flags for server the certification verification
    # at the beginning of the SSL/TLS session.
    # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable.
    attr_accessor :verify_mode

    # Sets or returns whether to verify that the server certificate is valid
    # for the hostname.
    # See {OpenSSL::SSL::SSLContext#verify_hostname=}[rdoc-ref:OpenSSL::SSL::SSLContext#attribute-i-verify_mode].
    attr_accessor :verify_hostname

    # Returns the X509 certificate chain (an array of strings)
    # for the session's socket peer,
    # or +nil+ if none.
    def peer_cert
      if not use_ssl? or not @socket
        return nil
      end
      @socket.io.peer_cert
    end

    # Starts an \HTTP session.
    #
    # Without a block, returns +self+:
    #
    #   http = Net::HTTP.new(hostname)
    #   # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
    #   http.start
    #   # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=true>
    #   http.started? # => true
    #   http.finish
    #
    # With a block, calls the block with +self+,
    # finishes the session when the block exits,
    # and returns the block's value:
    #
    #   http.start do |http|
    #     http
    #   end
    #   # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
    #   http.started? # => false
    #
    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 use_ssl?
        # reference early to load OpenSSL before connecting,
        # as OpenSSL may take time to load.
        @ssl_context = OpenSSL::SSL::SSLContext.new
      end

      if proxy? then
        conn_addr = proxy_address
        conn_port = proxy_port
      else
        conn_addr = conn_address
        conn_port = port
      end

      debug "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)
      debug "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" \
            "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.set_params(ssl_parameters)
        unless @ssl_context.session_cache_mode.nil? # a dummy method on JRuby
          @ssl_context.session_cache_mode =
              OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT |
                  OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE
        end
        if @ssl_context.respond_to?(:session_new_cb) # not implemented under JRuby
          @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }
        end

        # Still do the post_connection_check below even if connecting
        # to IP address
        verify_hostname = @ssl_context.verify_hostname

        # Server Name Indication (SNI) RFC 3546/6066
        case @address
        when Resolv::IPv4::Regex, Resolv::IPv6::Regex
          # don't set SNI, as IP addresses in SNI is not valid
          # per RFC 6066, section 3.

          # Avoid openssl warning
          @ssl_context.verify_hostname = false
        else
          ssl_host_address = @address
        end

        debug "starting SSL for #{conn_addr}:#{conn_port}..."
        s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
        s.sync_close = true
        s.hostname = ssl_host_address if s.respond_to?(:hostname=) && ssl_host_address

        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) && verify_hostname
          s.post_connection_check(@address)
        end
        debug "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)
      @last_communicated = nil
      on_connect
    rescue => exception
      if s
        debug "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:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.start
    #   http.started? # => true
    #   http.finish   # => nil
    #   http.started? # => false
    #
    # Raises IOError if not in a session.
    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) #:nodoc:
      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

      # Returns the address of the proxy host, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_address

      # Returns the port number of the proxy host, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_port

      # Returns the user name for accessing the proxy, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_user

      # Returns the password for accessing the proxy, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_pass
    end

    # Returns +true+ if a proxy server is defined, +false+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy?
      !!(@proxy_from_env ? proxy_uri : @proxy_address)
    end

    # Returns +true+ if the proxy server is defined in the environment,
    # +false+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    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", nil, address, port, nil, nil, nil, nil, nil
      ).find_proxy || false
      @proxy_uri || nil
    end

    # Returns the address of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_address
      if @proxy_from_env then
        proxy_uri&.hostname
      else
        @proxy_address
      end
    end

    # Returns the port number of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_port
      if @proxy_from_env then
        proxy_uri&.port
      else
        @proxy_port
      end
    end

    # Returns the user name of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_user
      if @proxy_from_env
        user = proxy_uri&.user
        unescape(user) if user
      else
        @proxy_user
      end
    end

    # Returns the password of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_pass
      if @proxy_from_env
        pass = proxy_uri&.password
        unescape(pass) if pass
      else
        @proxy_pass
      end
    end

    alias proxyaddr proxy_address   #:nodoc: obsolete
    alias proxyport proxy_port      #:nodoc: obsolete

    private

    def unescape(value)
      require 'cgi/util'
      CGI.unescape(value)
    end

    # 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

    # :call-seq:
    #    get(path, initheader = nil) {|res| ... }
    #
    # Sends a GET request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Get object
    # created from string +path+ and initial headers hash +initheader+.
    #
    # With a block given, calls the block with the response body:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.get('/todos/1') do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   "{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false\n}"
    #
    # With no block given, simply returns the response object:
    #
    #   http.get('/') # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Related:
    #
    # - Net::HTTP::Get: request class for \HTTP method GET.
    # - Net::HTTP.get: sends GET request, returns response body.
    #
    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

    # Sends a HEAD request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Head object
    # created from string +path+ and initial headers hash +initheader+:
    #
    #   res = http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
    #   res.body                    # => nil
    #   res.to_hash.take(3)
    #   # =>
    #   [["date", ["Wed, 15 Feb 2023 15:25:42 GMT"]],
    #    ["content-type", ["application/json; charset=utf-8"]],
    #    ["connection", ["close"]]]
    #
    def head(path, initheader = nillicenses/alt-ruby32-libs/COPYING000064400000004573150403134230012243 0ustar00do |res|
    #     p res
    #   end # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # Output:
    #
    #   "{\n  \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\",\n  \"id\": 201\n}"
    #
    # With no block given, simply returns the response object:
    #
    #   http.post('/todos', data) # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # Related:
    #
    # - Net::HTTP::Post: request class for \HTTP method POST.
    # - Net::HTTP.post: sends POST request, returns response body.
    #
    def post(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+
      send_entity(path, data, initheader, dest, Post, &block)
    end

    # :call-seq:
    #    patch(path, data, initheader = nil) {|res| ... }
    #
    # Sends a PATCH request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Patch object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    # With a block given, calls the block with the response body:
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.patch('/todos/1', data) do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   "{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false,\n  \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\"\n}"
    #
    # With no block given, simply returns the response object:
    #
    #   http.patch('/todos/1', data) # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    def patch(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+
      send_entity(path, data, initheader, dest, Patch, &block)
    end

    # Sends a PUT request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Put object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.put('/todos/1', data) # => #<Net::HTTPlicenses/alt-ruby32-libs/GPL000064400000043254150403134230011554 0ustar00tch.new(path, initheader), body)
    end

    # Sends a LOCK request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Lock object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.lock('/todos/1', data)
    #
    def lock(path, body, initheader = nil)
      request(Lock.new(path, initheader), body)
    end

    # Sends an UNLOCK request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Unlock object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.unlock('/todos/1', data)
    #
    def unlock(path, body, initheader = nil)
      request(Unlock.new(path, initheader), body)
    end

    # Sends an Options request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Options object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.options('/')
    #
    def options(path, initheader = nil)
      request(Options.new(path, initheader))
    end

    # Sends a PROPFIND request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Propfind object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.propfind('/todos/1', data)
    #
    def propfind(path, body = nil, initheader = {'Depth' => '0'})
      request(Propfind.new(path, initheader), body)
    end

    # Sends a DELETE request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Delete object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.delete('/todos/1')
    #
    def delete(path, initheader = {'Depth' => 'Infinity'})
      request(Delete.new(path, initheader))
    end

    # Sends a MOVE request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Move object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.move('/todos/1')
    #
    def move(path, initheader = nil)
      request(Move.new(path, initheader))
    end

    # Sends a COPY request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Copy object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.copy('/todos/1')
    #
    def copy(path, initheader = nil)
      request(Copy.new(path, initheader))
    end

    # Sends a MKCOL request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Mkcol object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http.mkcol('/todos/1', data)
    #   http = Net::HTTP.new(hostname)
    #
    def mkcol(path, body = nil, initheader = nil)
      request(Mkcol.new(path, initheader), body)
    end

    # Sends a TRACE request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Trace object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.trace('/todos/1')
    #
    def trace(path, initheader = nil)
      request(Trace.new(path, initheader))
    end

    # Sends a GET request to the server;
    # forms the response into a Net::HTTPResponse object.
    #
    # The request is based on the Net::HTTP::Get object
    # created from string +path+ and initial headers hash +initheader+.
    #
    # With no block given, returns the response object:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.request_get('/todos') # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # With a block given, calls the block with the response object
    # and returns the response object:
    #
    #   http.request_get('/todos') do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   #<Net::HTTPOK 200 OK readbody=false>
    #
    def request_get(path, initheader = nil, &block) # :yield: +response+
      request(Get.new(path, initheader), &block)
    end

    # Sends a HEAD request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Head object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
    #
    def request_head(path, initheader = nil, &block)
      request(Head.new(path, initheader), &block)
    end

    # Sends a POST request to the server;
    # forms the response into a Net::HTTPResponse object.
    #
    # The request is based on the Net::HTTP::Post object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    # With no block given, returns the response object:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.post('/todos', 'xyzzy')
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # With a block given, calls the block with the response body
    # and returns the response object:
    #
    #   http.post('/todos', 'xyzzy') do |res|
    #     p res
    #   end # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # Output:
    #
    #   "{\n  \"xyzzy\": \"\",\n  \"id\": 201\n}"
    #
    def request_post(path, data, initheader = nil, &block) # :yield: +response+
      request Post.new(path, initheader), data, &block
    end

    # Sends a PUT request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Put object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.put('/todos/1', 'xyzzy')
    #   # => #<Net::HTTPOK 200 OK readbody=true>
    #
    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 server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTPRequest object
    # created from string +path+, string +data+, and initial headers hash +header+.
    # That object is an instance of the
    # {subclass of Net::HTTPRequest}[rdoc-ref:Net::HTTPRequest@Request+Subclasses],
    # that corresponds to the given uppercase string +name+,
    # which must be
    # an {HTTP request method}[https://en.wikipedia.org/wiki/HTTP#Request_methods]
    # or a {WebDAV request method}[https://en.wikipedia.org/wiki/WebDAV#Implementation].
    #
    # Examples:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.send_request('GET', '/todos/1')
    #   # => #<Net::HTTPOK 200 OK readbody=true>
    #   http.send_request('POST', '/todos', 'xyzzy')
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    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 the given request +req+ to the server;
    # forms the response into a Net::HTTPResponse object.
    #
    # The given +req+ must be an instance of a
    # {subclass of Net::HTTPRequest}[rdoc-ref:Net::HTTPRequest@Request+Subclasses].
    # Argument +body+ should be given only if needed for the request.
    #
    # With no block given, returns the response object:
    #
    #   http = Net::HTTP.new(hostname)
    #
    #   req = Net::HTTP::Get.new('/todos/1')
    #   http.request(req)
    #   # => #<Net::HTTPOK 200 OK readbody=true>
    #
    #   req = Net::HTTP::Post.new('/todos')
    #   http.request(req, 'xyzzy')
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # With a block given, calls the block with the response and returns the response:
    #
    #   req = Net::HTTP::Get.new('/todos/1')
    #   http.request(req) do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   #<Net::HTTPOK 200 OK readbody=false>
    #
    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
            res.body_encoding = @response_body_encoding
            res.ignore_eof = @ignore_eof
          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
          debug "Conn close because of error #{exception}, and retry"
          retry
        end
        debug "Conn close because of error #{exception}"
        @socket.close if @socket
        raise
      end

      end_transport req, res
      res
    rescue => exception
      debug "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)
          debug 'Conn close because of keep_alive_timeout'
          @socket.close
          connect
        elsif @socket.io.to_io.wait_readable(0) && @socket.eof?
          debug "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?
        debug 'Conn socket closed'
      elsif not res.body and @close_on_empty_response
        debug 'Conn close'
        @socket.close
      elsif keep_alive?(req, res)
        debug 'Conn keep-alive'
        @last_communicated = Process.clock_gettiruby/net/http/request.rb000064400000005465150403134240011315 0ustar002/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

    # Adds a message to debugging output
    def debug(msg)
      return unless @debug_output
      @debug_output << msg
      @debug_output << "\n"
    end

    alias_method :D, :debug
  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'
ruby/net/http/request.rb000064400000005465150403134240011315 0ustar00# frozen_string_literal: true

# This class is the base class for \Net::HTTP request classes.
# The class should not be used directly;
# instead you should use its subclasses, listed below.
#
# == Creating a Request
#
# An request object may be created with either a URI or a string hostname:
#
#   require 'net/http'
#   uri = URI('https://jsonplaceholder.typicode.com/')
#   req = Net::HTTP::Get.new(uri)          # => #<Net::HTTP::Get GET>
#   req = Net::HTTP::Get.new(uri.hostname) # => #<Net::HTTP::Get GET>
#
# And with any of the subclasses:
#
#   req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
#   req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
#   req = Net::HTTP::Put.new(uri)  # => #<Net::HTTP::Put PUT>
#   # ...
#
# The new instance is suitable for use as the argument to Net::HTTP#ruby/net/http/backward.rb000064400000002065150403134240011374 0ustar00-header].
# - {Request header Host}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#host-request-header].
#
# You can add headers or override default headers:
#
#   #   res = Net::HTTP::Get.new(uri, {'foo' => '0', 'bar' => '1'})
#
# This class (and therefore its subclasses) also includes (indirectly)
# module Net::HTTPHeader, which gives access to its
# {methods for setting headers}[rdoc-ref:Net::HTTPHeader@Setters].
#
# == Request Subclasses
#
# Subclasses for HTTP requests:
#
# - Net::HTTP::Get
# - Net::HTTP::Head
# - Net::HTTP::Post
# - Net::HTTP::Put
# - Net::HTTP::Delete
# - Net::HTTP::Options
# - Net::HTTP::Trace
# - Net::HTTP::Patch
#
# Subclasses for WebDAV requests:
#
# - Net::HTTP::Propfind
# - Net::HTTP::Proppatch
# - Net::HTTP::Mkcol
# - Net::HTTP::Copy
# - Net::HTTP::Move
# - Net::HTTP::Lock
# - Net::HTTP::Unlock
#
class Net::HTTPRequest < Net::HTTPGelicenses/alt-ruby32/COPYING.ja000064400000004776150403134230011712 0ustar00ustar00# frozen_string_literal: true
# for backward compatibility

# :enddoc:

class Net::HTTP
  ProxyMod = ProxyDelta
  deprecate_constant :ProxyMod
end

module Net::NetPrivate
  HTTPRequest = ::Net::HTTPRequest
  deprecate_constant :HTTPRequest
end

module Net
  HTTPSession =ruby/net/http/generic_request.rb000064400000030160150403134240012777 0ustar00iver,
                     :HTTPResponceReceiver
end
ruby/net/http/proxy_delta.rblicenses/alt-ruby32-libs/COPYING000064400000004573150403134230012243 0ustar00licenses/alt-ruby32/LEGAL000064400000127612150403134230011030 0ustar00ustar00# frozen_string_literal: true
#
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
#
# Do not use this directly; instead, use a subclass of Net::HTTPRequest.
#
# == About the Examples
#
# :include: doc/net-http/examples.rdoc
#
class Net::HTTPGenericRequest

  include Net::HTTPHeader

  def initialize(m, reqbody, resbody, uri_or_path, initheader = nil) # :nodoc:
    @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
      hostname = uri_or_path.hostname
      raise ArgumentError, "no host component for URI" unless (hostname && hostname.length > 0)
      @uri = uri_or_path.dup
      host = @uri.hostname.dup
      host << ":" << @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 Net::HTTP::HAVE_ZLIB then
      if !initheader ||
         !initheader.keys.any? { |k|
           %w[accept-encoding range].include? k.downcase
         } then
        @decode_content = true if @response_has_body
        initheader = initheader ? initheader.dup : {}
        initheader["accept-encoding"] =
          "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
      end
    end

    initialilicenses/alt-ruby32-libs/GPL000064400000043254150403134230011554 0ustar00(uri).uri
  #   # => #<URI::HTTPS https://jsonplaceholder.typicode.com/>
  #   Net::HTTP::Get.new('example.com').uri # => nil
  #
  attr_reader :uri

  # Returns +false+ if the request's header <tt>'Accept-Encoding'</tt>
  # has been set manually or deleted
  # (indicating that the user intends to handle encoding in the response),
  # +true+ otherwise:
  #
  #   req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
  #   req['Accept-Encoding']        # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
  #   req.decode_content            # => true
  #   req['Accept-Encoding'] = 'foo'
  #   req.decode_content            # => false
  #   req.delete('Accept-Encoding')
  #   req.decode_content            # => false
  #
  attr_reader :decode_content

  # Returns a string representation of the request:
  #
  #   Net::HTTP::Post.new(uri).inspect # => "#<Net::HTTP::Post POST>"
  #
  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

  # Returns whether the request may have a body:
  #
  #   Net::HTTP::Post.new(uri).request_body_permitted? # => true
  #   Net::HTTP::Get.new(uri).request_body_permitted?  # => false
  #
  def request_body_permitted?
    @request_has_body
  end

  # Returns whether the response may have a body:
  #
  #   Net::HTTP::Post.new(uri).response_body_permitted? # => true
  #   Net::HTTP::Head.new(uri).response_body_permitted? # => false
  #
  def response_body_permitted?
    @response_has_body
  end

  def body_exist? # :nodoc:
    warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?", uplevel: 1 if $VERBOSE
    response_body_permitted?
  end

  # Returns the string body for the request, or +nil+ if there is none:
  #
  #   req = Net::HTTP::Post.new(uri)
  #   req.body # => nil
  #   req.body = '{"title": "foo","body": "bar","userId": 1}'
  #   req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}"
  #
  attr_reader :body

  # Sets the body for the request:
  #
  #   req = Net::HTTP::Post.new(uri)
  #   req.body # => nil
  #   req.body = '{"title": "foo","body": "bar","userId": 1}'
  #   req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}"
  #
  def body=(str)
    @body = str
    @body_stream = nil
    @body_data = nil
    str
  end

  # Returns the body stream object for the request, or +nil+ if there is none:
  #
  #   req = Net::HTTP::Post.new(uri)          # => #<Net::HTTP::Post POST>
  #   req.body_stream                         # => nil
  #   require 'stringio'
  #   req.body_stream = StringIO.new('xyzzy') # => #<StringIO:0x0000027d1e5affa8>
  #   req.body_stream                         # => #<StringIO:0x0000027d1e5affa8>
  #
  attr_reader :body_stream

  # Sets the body stream for the request:
  #
  #   req = Net::HTTP::Post.new(uri)          # => #<Net::HTTP::Post POST>
  #   req.body_stream                         # => nil
  #   require 'stringio'
  #   req.body_stream = StringIO.new('xyzzy') # => #<StringIO:0x0000027d1e5affa8>
  #   req.body_stream                         # => #<StringIO:0x0000027d1e5affa8>
  #
  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'
      klass = URI::HTTPS
    else
      scheme = 'http'
      klass = URI::HTTP
    end

    if host = self['host']
      host.sub!(/:.*/m, '')
    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
      IO.copy_stream(f, sock)
    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 ruby/net/http/requests.rb000064400000031537150403134240011477 0ustar00 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

ruby/net/http/requests.rb000064400000031537150403134240011477 0ustar00# frozen_string_literal: true

# HTTP/1.1 methods --- RFC2616

# \Class for representing
# {HTTP method GET}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#GET_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
#
# Related:
#
# - Net::HTTP.get: sends +GET+ request, returns response body.
# - Net::HTTP#get: sends +GET+ request, returns response object.
#
class Net::HTTP::Get < Net::HTTPRequest
  METHOD = 'GET'
  REQUEST_HAS_BODY  = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method HEAD}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#HEAD_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: no.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
#
# Related:
#
# - Net::HTTP#head: sends +HEAD+ request, returns response object.
#
class Net::HTTP::Head < Net::HTTPRequest
  METHOD = 'HEAD'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = false
end

# \Class for representing
# {HTTP method POST}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#POST_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   uri.path = '/posts'
#   req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
#   req.body = '{"title": "foo","body": "bar","userId": 1}'
#   req.content_type = 'application/json'
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: no.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
#
# Related:
#
# - Net::HTTP.post: sends +POST+ request, returns response object.
# - Net::HTTP#post: sends +POST+ request, returns response object.
#
class Net::HTTP::Post < Net::HTTPRequest
  METHOD = 'POST'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method PUT}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#PUT_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   uri.path = '/posts'
#   req = Net::HTTP::Put.new(uri) # => #<Net::HTTP::Put PUT>
#   req.body = '{"title": "foo","body": "bar","userId": 1}'
#   req.content_type = 'application/json'
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
class Net::HTTP::Put < Net::HTTPRequest
  METHOD = 'PUT'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method DELETE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#DELETE_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   uri.path = '/posts/1'
#   req = Net::HTTP::Delete.new(uri) # => #<Net::HTTP::Delete DELETE>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP#delete: sends +DELETE+ request, returns response object.
#
class Net::HTTP::Delete < Net::HTTPRequest
  METHOD = 'DELETE'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method OPTIONS}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#OPTIONS_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Options.new(uri) # => #<Net::HTTP::Options OPTIONS>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP#options: sends +OPTIONS+ request, returns response object.
#
class Net::HTTP::Options < Net::HTTPRequest
  METHOD = 'OPTIONS'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method TRACE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#TRACE_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Trace.new(uri) # => #<Net::HTTP::Trace TRACE>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: no.
# - Response body: yes.
# - {Safe}[https://en.wikipedilicenses/alt-ruby32/COPYING.ja000064400000004776150403134230011712 0ustar00 1}'
#   req.content_type = 'application/json'
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: no.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP#patch: sends +PATCH+ request, returns response object.
#
class Net::HTTP::Patch < Net::HTTPRequest
  METHOD = 'PATCH'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

#
# WebDAV methods --- RFC2518
#

# \Class for representing
# {WebDAV method PROPFIND}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Propfind.new(uri) # => #<Net::HTTP::Propfind PROPFIND>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#propfind: sends +PROPFIND+ request, returns response object.
#
class Net::HTTP::Propfind < Net::HTTPRequest
  METHOD = 'PROPFIND'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method PROPPATCH}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Proppatch.new(uri) # => #<Net::HTTP::Proppatch PROPPATCH>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#proppatch: sends +PROPPATCH+ request, returns response object.
#
class Net::HTTP::Proppatch < Net::HTTPRequest
  METHOD = 'PROPPATCH'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method MKCOL}[http://www.webdav.org/specs/rfc4918.html#METHOD_MKCOL]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Mkcol.new(uri) # => #<Net::HTTP::Mkcol MKCOL>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
licenses/alt-ruby32/LEGAL000064400000127612150403134230011030 0ustar00#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#copy: sends +COPY+ ruby/net/http/status.rb000064400000004373150403134240011145 0ustar00HTTP::Move < Net::HTTPRequest
  METHOD = 'MOVE'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method LOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_LOCK]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Lock.new(uri) # => #<Net::HTTP::Lock LOCK>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#lock: sends +LOCK+ request, returns response object.
#
class Net::HTTP::Lock < Net::HTTPRequest
  METHOD = 'LOCK'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method UNLOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_UNLOCK]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Unlock.new(uri) # => #<Net::HTTP::Unlock UNLOCK>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#unlock: sends +UNLOCK+ request, returns response object.
#
class Net::HTTP::Unlock < Net::HTTPRequest
  METHOD = 'UNLOCK'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

ruby/net/http/status.rb000064400000004373150403134240011145 0ustar00# frozen_string_literal: true

require_relative '../http'

if $0 == __FILE__
  require 'open-uri'
  File.foreach(__FILE__) do |line|
    puts line
    break if line.start_with?('end')
  end
  puts
  puts "Net::HTTP::STATUS_CODES = {"
  url = "https://ruby/net/http/exceptions.rb000064400000001505150403134240011775 0ustar00 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 => 'Content Too Large',
  414 => 'URI Too Long',
  415 => 'Unsupported Media Type',
  416 => 'Range Not Satisfiable',
  417 => 'Expectation Failed',
  421 => 'Misdirected Request',
  422 => 'Unprocessable Content',
  423 => 'Locked',
  424 => 'Failed Dependency',
  425 => 'Too Early',
  426 => 'Upgrade Required',
  428 => 'Precondition Required',
  429 => 'Too Many Requests',
  431 => 'Request Hearuby/net/http/header.rb000064400000100002150403134240011034 0ustar00ruby/net/http/exceptions.rb000064400000001505150403134240011775 0ustar00# frozen_string_literal: true
module Net
  # Net::HTTP exception class.
  # You cannot use Net::HTTPExceptions directly; instead, you must use
  # its subclasses.
  module HTTPExceptions
    def initialize(msg, res)   #:nodoc:
      super msg
      @response = res
    end
    attr_reader :response
    alias data response    #:nodoc: obsolete
  end

  class HTTPError < ProtocolError
    include HTTPExceptions
  end

  class HTTPRetriableError < ProtoRetriableError
    include HTTPExceptions
  end

  class HTTPClientException < ProtoServerError
    include HTTPExceptions
  end

  class HTTPFatalError < ProtoFatalError
    include HTTPExceptions
  end

  # We cannot use the name "HTTPServerError", it is the name of the response.
  HTTPServerException = HTTPClientException # :nodoc:
  deprecate_constant(:HTTPServerException)
end
ruby/net/http/header.rb000064400000100002150403134240011034 0ustar00# frozen_string_literal: true
#
# The \HTTPHeader module provides access to \HTTP headers.
#
# The module is included in:
#
# - Net::HTTPGenericRequest (and therefore Net::HTTPRequest).
# - Net::HTTPResponse.
#
# The headers are a hash-like collection of key/value pairs called _fields_.
#
# == Request and Response Fields
#
# Headers may be included in:
#
# - A Net::HTTPRequest object:
#   the object's headers will be sent with the request.
#   Any fields may be defined in the request;
#   see {Setters}[rdoc-ref:Net::HTTPHeader@Setters].
# - A Net::HTTPResponse object:
#   the objects headers are usually those returned from the host.
#   Fields may be retrieved from the object;
#   see {Getters}[rdoc-ref:Net::HTTPHeader@Getters]
#   and {Iterators}[rdoc-ref:Net::HTTPHeader@Iterators].
#
# Exactly which fields should be sent or expected depends on the host;
# see:
#
# - {Request fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
# - {Response fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields].
#
# == About the Examples
#
# :include: doc/net-http/examples.rdoc
#
# == Fields
#
# A header field is a key/value pair.
#
# === Field Keys
#
# A field key may be:
#
# - A string: Key <tt>'Accept'</tt> is treated as if it were
#   <tt>'Accept'.downcase</tt>;  i.e., <tt>'accept'</tt>.
# - A symbol: Key <tt>:Accept</tt> is treated as if it were
#   <tt>:Accept.to_s.downcase</tt>;  i.e., <tt>'accept'</tt>.
#
# Examples:
#
#   req = Net::HTTP::Get.new(uri)
#   req[:accept]  # => "*/*"
#   req['Accept'] # => "*/*"
#   req['ACCEPT'] # => "*/*"
#
#   req['accept'] = 'text/html'
#   req[:accept] = 'text/html'
#   req['ACCEPT'] = 'text/html'
#
# === Field Values
#
# A field value may be returned as an array of strings or as a string:
#
# - These methods return field values as arrays:
#
#   - #get_fields: Returns the array value for the given key,
#     or +nil+ if it does not exist.
#   - #to_hash: Returns a hash of all header fields:
#     each key is a field name; its value is the array value for the field.
#
# - These methods return field values as string;
#   the string value for a field is equivalent to
#   <tt>self[key.downcase.to_s].join(', '))</tt>:
#
#   - #[]: Returns the string value for the given key,
#     or +nil+ if it does not exist.
#   - #fetch: Like #[], but accepts a default value
#     to be returned if the key does not exist.
#
# The field value may be set:
#
# - #[]=: Sets the value for the given key;
#   the given value may be a string, a symbol, an array, or a hash.
# - #add_field: Adds a given value to a value for the given key
#   (not overwriting the existing value).
# - #delete: Deletes the field for the given key.
#
# Example field values:
#
# - \String:
#
#     req['Accept'] = 'text/html' # => "text/html"
#     req['Accept']               # => "text/html"
#     req.get_fields('Accept')    # => ["text/html"]
#
# - \Symbol:
#
#     req['Accept'] = :text    # => :text
#     req['Accept']            # => "text"
#     req.get_fields('Accept') # => ["text"]
#
# - Simple array:
#
#     req[:foo] = %w[bar baz bat]
#     req[:foo]            # => "bar, baz, bat"
#     req.get_fields(:foo) # => ["bar", "baz", "bat"]
#
# - Simple hash:
#
#     req[:foo] = {bar: 0, baz: 1, bat: 2}
#     req[:foo]            # => "bar, 0, baz, 1, bat, 2"
#     req.get_fields(:foo) # => ["bar", "0", "baz", "1", "bat", "2"]
#
# - Nested:
#
#     req[:foo] = [%w[bar baz], {bat: 0, bam: 1}]
#     req[:foo]            # => "bar, baz, bat, 0, bam, 1"
#     req.get_fields(:foo) # => ["bar", "baz", "bat", "0", "bam", "1"]
#
#     req[:foo] = {bar: %w[baz bat], bam: {bah: 0, bad: 1}}
#     req[:foo]            # => "bar, baz, bat, bam, bah, 0, bad, 1"
#     req.get_fields(:foo) # => ["bar", "baz", "bat", "bam", "bah", "0", "bad", "1"]
#
# == Convenience Methods
#
# Various convenience methods retrieve values, set values, query values,
# set form values, or iterate over fields.
#
# === Setters
#
# \Method #[]= can set any field, but does little to validate the new value;
# some of the other setter methods provide some validation:
#
# - #[]=: Sets the string or array value for the given key.
# - #add_field: Creates or adds to the array value for the given key.
# - #basic_auth: Sets the string authorization header for <tt>'Authorization'</tt>.
# - #content_length=: Sets the integer length for field <tt>'Content-Length</tt>.
# - #content_type=: Sets the string value for field <tt>'Content-Type'</tt>.
# - #proxy_basic_auth: Sets the string authorization header for <tt>'Proxy-Authorization'</tt>.
# - #set_range: Sets the value for field <tt>'Range'</tt>.
#
# === Form Setters
#
# - #set_form: Sets an HTML form data set.
# - #set_form_data: Sets header fields and a body from HTML form data.
#
# === Getters
#
# \Method #[] can retrieve the value of any field that exists,
# but always as a string;
# some of the other getter methods return something different
# from the simple string value:
#
# - #[]: Returns the string field value for the given key.
# - #content_length: Returns the integer value of field <tt>'Content-Length'</tt>.
# - #content_range: Returns the Range value of field <tt>'Content-Range'</tt>.
# - #content_type: Returns the string value of field <tt>'Content-Type'</tt>.
# - #fetch: Returns the string field value for the given key.
# - #get_fields: Returns the array field value for the given +key+.
# - #main_type: Returns first part of the string value of field <tt>'Content-Type'</tt>.
# - #sub_type: Returns second part of the string value of field <tt>'Content-Type'</tt>.
# - #range: Returns an array of Range objects of field <tt>'Range'</tt>, or +nil+.
# - #range_length: Returns the integer length of the range given in field <tt>'Content-Range'</tt>.
# - #type_params: Returns the string parameters for <tt>'Content-Type'</tt>.
#
# === Queries
#
# - #chunked?: Returns whether field <tt>'Transfer-Encoding'</tt> is set to <tt>'chunked'</tt>.
# - #connection_close?: Returns whether field <tt>'Connection'</tt> is set to <tt>'close'</tt>.
# - #connection_keep_alive?: Returns whether field <tt>'Connection'</tt> is set to <tt>'keep-alive'</tt>.
# - #key?: Returns whether a given key exists.
#
# === Iterators
#
# - #each_capitalized: Passes each field capitalized-name/value pair to the block.
# - #each_capitalized_name: Passes each capitalized field name to the block.
# - #each_header: Passes each field name/value pair to the block.
# - #each_name: Passes each field name to the block.
# - #each_value: Passes each string field value to the block.
#
module Net::HTTPHeader
  MAX_KEY_LENGTH = 1024
  MAX_FIELD_LENGTH = 65536

  def initialize_http_header(initheader) #:nodoc:
    @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 value: #{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 string field value for the case-insensitive field +key+,
  # or +nil+ if there is no such key;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Connection'] # => "keep-alive"
  #   res['Nosuch']     # => nil
  #
  # Note that some field values may be retrieved via convenience methods;
  # see {Getters}[rdoc-ref:Net::HTTPHeader@Getters].
  def [](key)
    a = @header[key.downcase.to_s] or return nil
    a.join(', ')
  end

  # Sets the value for the case-insensitive +key+ to +val+,
  # overwriting the previous value if the field exists;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req['Accept'] # => "*/*"
  #   req['Accept'] = 'text/html'
  #   req['Accept'] # => "text/html"
  #
  # Note that some field values may be set via convenience methods;
  # see {Setters}[rdoc-ref:Net::HTTPHeader@Setters].
  def []=(key, val)
    unless val
      @header.delete key.downcase.to_s
      return val
    end
    set_field(key, val)
  end

  # Adds value +val+ to the value array for field +key+ if the field exists;
  # creates the field with the given +key+ and +val+ if it does not exist.
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.add_field('Foo', 'bar')
  #   req['Foo']            # => "bar"
  #   req.add_field('Foo', 'baz')
  #   req['Foo']            # => "bar, baz"
  #   req.add_field('Foo', %w[baz bam])
  #   req['Foo']            # => "bar, baz, baz, bam"
  #   req.get_fields('Foo') # => ["bar", "baz", "baz", "bam"]
  #
  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

  # Returns the array field value for the given +key+,
  # or +nil+ if there is no such field;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.get_fields('Connection') # => ["keep-alive"]
  #   res.get_fields('Nosuch')     # => nil
  #
  def get_fields(key)
    stringified_downcased_key = key.downcase.to_s
    return nil unless @header[stringified_downcased_key]
    @header[stringified_downcased_key].dup
  end

  # call-seq:
  #   fetch(key, default_val = nil) {|key| ... } -> object
  #   fetch(key, default_val = nil) -> value or default_val
  #
  # With a block, returns the string value for +key+ if it exists;
  # otherwise returns the value of the block;
  # ignores the +default_val+;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #
  #   # Field exists; block not called.
  #   res.fetch('Connection') do |value|
  #     fail 'Cannot happen'
  #   end # => "keep-alive"
  #
  #   # Field does not exist; block called.
  #   res.fetch('Nosuch') do |value|
  #     value.downcase
  #   end # => "nosuch"
  #
  # With no block, returns the string value for +key+ if it exists;
  # otherwise, returns +default_val+ if it was given;
  # otherwise raises an exception:
  #
  #   res.fetch('Connection', 'Foo') # => "keep-alive"
  #   res.fetch('Nosuch', 'Foo')     # => "Foo"
  #   res.fetch('Nosuch')            # Raises KeyError.
  #
  def fetch(key, *args, &block)   #:yield: +key+
    a = @header.fetch(key.downcase.to_s, *args, &block)
    a.kind_of?(Array) ? a.join(', ') : a
  end

  # Calls the block with each key/value pair:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.each_header do |key, value|
  #     p [key, value] if key.start_with?('c')
  #   end
  #
  # Output:
  #
  #   ["content-type", "application/json; charset=utf-8"]
  #   ["connection", "keep-alive"]
  #   ["cache-control", "max-age=43200"]
  #   ["cf-cache-status", "HIT"]
  #   ["cf-ray", "771d17e9bc542cf5-ORD"]
  #
  # Returns an enumerator if no block is given.
  #
  # Net::HTTPHeader#each is an alias for Net::HTTPHeader#each_header.
  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

  # Calls the block with each field key:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.each_key do |key|
  #     p key if key.start_with?('c')
  #   end
  #
  # Output:
  #
  #   "licenses/alt-ruby32/BSDL000064400000002413150403134230010717 0ustar00-Type"
  #   "Connection"
  #   "Cache-Control"
  #   "Cf-Cache-Status"
  #   "Cf-Ray"
  #
  # The capitalization is system-dependent;
  # see {Case Mapping}[rdoc-ref:case_mapping.rdoc].
  #
  # 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

  # Calls the block with each string field value:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.each_value do |value|
  #     p value if value.start_with?('c')
  #   end
  #
  # Output:
  #
  #   "chunked"
  #   "cf-q-config;dur=6.0000002122251e-06"
  #   "cloudflare"
  #
  # 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 the header for the given case-insensitive +key+
  # (see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]);
  # returns the deleted value, or +nil+ if no such field exists:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.delete('Accept') # => ["*/*"]
  #   req.delete('Nosuch') # => nil
  #
  def delete(key)
    @header.delete(key.downcase.to_s)
 licenses/alt-ruby32/COPYING000064400000004573150403134230011314 0ustar00.
  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 that represent
  # the value of field <tt>'Range'</tt>,
  # or +nil+ if there is no such field;
  # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req['Range'] = 'bytes=0-99,200-299,400-499'
  #   req.range # => [0..99, 200..299, 400..499]
  #   req.delete('Range')
  #   req.range # # => nil
  #
  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

  # call-seq:
  licenses/alt-ruby32/GPL000064400000043254150403134230010625 0ustar00# => 100..199
  #   req['Range']            # => "bytes=100-199"
  #
  # Net::HTTPHeader#range= is an alias for Net::HTTPHeader#set_range.
  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 the value of field <tt>'Content-Length'</tt> as an integer,
  # or +nil+ if there is no such field;
  # see {Content-Length request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-request-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/nosuch/1')
  #   res.content_length # => 2
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.content_length # => nil
  #
  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

  # Sets the value of field <tt>'Content-Length'</tt> to the given numeric;
  # see {Content-Length response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-response-header]:
  #
  #   _uri = uri.dup
  #   hostname = _uri.hostname           # => "jsonplaceholder.typicode.com"
  #   _uri.path = '/posts'               # => "/posts"
  #   req = Net::HTTP::Post.new(_uri)    # => #<Net::HTTP::Post POST>
  #   req.body = '{"title": "foo","body": "bar","userId": 1}'
  #   req.content_length = req.body.size # => 42
  #   req.content_type = 'application/json'
  #   res = Net::HTTP.start(hostname) do |http|
  #     http.request(req)
  #   end # => #<Net::HTTPCreated 201 Created readbody=true>
  #
  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 field <tt>'Transfer-Encoding'</tt>
  # exists and has value <tt>'chunked'</tt>,
  # +false+ otherwise;
  # see {Transfer-Encoding response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#transfer-encoding-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Transfer-Encoding'] # => "chunked"
  #   res.chunked?             # => true
  #
  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 representing the value of field
  # <tt>'Content-Range'</tt>, or +nil+ if no such field exists;
  # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Content-Range'] # => nil
  #   res['Content-Range'] = 'bytes 0-499/1000'
  #   res['Content-Range'] # => "bytes 0-499/1000"
  #   res.content_range    # => 0..499
  #
  def content_range
    return nil unless @header['content-range']
    m = %r<\A\s*(\w+)\s+(\d+)-(\d+)/(\d+|\*)>.match(self['Content-Range']) or
        raise Net::HTTPHeaderSyntaxError, 'wrong Content-Range format'
    return unless m[1] == 'bytes'
    m[2].to_i .. m[3].to_i
  end

  # Returns the integer representing length of the value of field
  # <tt>'Content-Range'</tt>, or +nil+ if no such field exists;
  # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Content-Range'] # => nil
  #   res['Content-Range'] = 'bytes 0-499/1000'
  #   res.range_length     # => 500
  #
  def range_length
    r = content_range() or return nil
    r.end - r.begin + 1
  end

  # Returns the {media type}[https://en.wikipedia.org/wiki/Media_type]
  # from the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.content_type    # => "application/json"
  #
  def content_type
    main = main_type()
    return nil unless main

    sub = sub_type()
    if sub
      "#{main}/#{sub}"
    else
      main
    end
  end

  # Returns the leading ('type') part of the
  # {media type}[https://en.wikipedia.org/wiki/Media_type]
  # from the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.main_type       # => "application"
  #
  def main_type
    return nil unless @header['content-type']
    self['Content-Type'].split(';').first.to_s.split('/')[0].to_s.strip
  end

  # Returns the trailing ('subtype') part of the
  # {media type}[https://en.wikipedia.org/wiki/Media_type]
  # from the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.sub_type        # => "json"
  #
  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

  # Returns the trailing ('parameters') part of the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.type_params     # => {"charset"=>"utf-8"}
  #
  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 value of field <tt>'Content-Type'</tt>;
  # returns the new value;
  # see {Content-Type request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-request-header]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.set_content_type('application/json') # => ["application/json"]
  #
  # Net::HTTPHeader#content_type= is an alias for Net::HTTPHeader#set_content_type.
  def set_content_type(type, params = {})
    @header['content-type'] = [type + params.map{|k,v|"; #{k}=#{v}"}.join('')]
  end

  alias content_type= set_content_type

  # Sets the request body to a URL-encoded string derived from argument +params+,
  # and sets request header field <tt>'Content-Type'</tt>
  # to <tt>'application/x-www-form-urlencoded'</tt>.
  #
  # The resulting request is suitable for HTTP request +POST+ or +PUT+.
  #
  # Argument +params+ must be suitable for use as argument +enum+ to
  # {URI.encode_www_form}[rdoc-ref:URI.encode_www_form].
  #
  # With only argument +params+ given,
  # sets the body to a URL-encoded string with the default separator <tt>'&'</tt>:
  #
  #   req = Net::HTTP::Post.new('example.com')
  #
  #   req.set_form_data(q: 'ruby', lang: 'en')
  #   req.body            # => "q=ruby&lang=en"
  #   req['Content-Type'] # => "application/x-www-form-urlencoded"
  #
  #   req.set_form_data([['q', 'ruby'], ['lang', 'en']])
  #   req.body            # => "q=ruby&lang=en"
  #
  #   req.set_form_data(q: ['ruby', 'perl'], lang: 'en')
  #   req.body            # => "q=ruby&q=perl&lang=en"
  #
  #   req.set_form_data([['q', 'ruby'], ['q', 'perl'], ['lang', 'en']])
  #   req.body            # => "q=ruby&q=perl&lang=en"
  #
  # With string argument +sep+ also given,
  # uses that string as the separator:
  #
  #   req.set_form_data({q: 'ruby', lang: 'en'}, '|')
  #   req.body # => "q=ruby|lang=en"
  #
  # Net::HTTPHeader#form_data= is an alias for Net::HTTPHeader#set_form_data.
  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

  # Stores form data to be used in a +POST+ or +PUT+ request.
  #
  # The form data given in +params+ consists of zero or more fields;
  # each field is:
  #
  # - A scalar value.
  # - A name/value pair.
  # - An IO stream opened for reading.
  #
  # Argument +params+ should be an
  # {Enumerable}[rdoc-ref:Enumerable@Enumerable+in+Ruby+Classes]
  # (method <tt>params.map</tt> will be called),
  # and is often an array or hash.
  #
  # First, we set up a request:
  #
  #   _uri = uri.dup
  #   _uri.path ='/posts'
  #   req = Net::HTTP::Post.new(_uri)
  #
  # <b>Argument +params+ As an Array</b>
  #
  # When +params+ is an array,
  # each of its elements is a subarray that defines a field;
  # the subarray may contain:
  #
  # - One string:
  #
  #     req.set_form([['foo'], ['bar'], ['baz']])
  #
  # - Two strings:
  #
  #     req.set_form([%w[foo 0], %w[bar 1], %w[baz 2]])
  #
  # - When argument +enctype+ (see below) is given as
  #   <tt>'multipart/form-data'</tt>:
  #
  #   - A string name and an IO stream opened for reading:
  #
  #       require 'stringio'
  #       req.set_form([['file', StringIO.new('Ruby is cool.')]])
  #
  #   - A string name, an IO stream opened for reading,
  #     and an options hash, which may contain these entries:
  #
  #     - +:filename+: The name of the file to use.
  #     - +:content_type+: The content type of the uploaded file.
  #
  #     Example:
  #
  #       req.set_form([['file', file, {filename: "other-filename.foo"}]]
  #
  # The various forms may be mixed:
  #
  #   req.set_form(['foo', %w[bar 1], ['file', file]])
  #
  # <b>Argument +params+ As a Hash</b>
  #
  # When +params+ is a hash,
  # each of its entries is a name/value pair that defines a field:
  #
  # - The name is a string.
  # - The value may be:
  #
  #   - +nil+.
  #   - Another string.
  #   - An IO stream opened for reading
  #     (only when argument +enctype+ -- see below -- is given as
  #     <tt>'multipart/form-data'</tt>).
  #
  # Examples:
  #
  #   # Nil-valued fields.
  #   req.set_form({'foo' => nil, 'bar' => nil, 'baz' => nil})
  #
  #   # String-valued fields.
  #   req.set_form({'foo' => 0, 'bar' => 1, 'baz' => 2})
  #
  #   # IO-valued field.
  #   require 'stringio'
  #   req.set_form({'file' => StringIO.new('Ruby is cool.')})
  #
  #   # Mixture of fields.
  #   req.set_form({'foo' => nil, 'bar' => 1, 'file' => file})
  #
  # Optional argument +enctype+ specifies the value to be given
  # to field <tt>'Content-Type'</tt>, and must be one of:
  #
  # - <tt>'application/x-www-form-urlencoded'</tt> (the default).
  # - <tt>'multipart/form-data'</tt>;
  #   see {RFC 7578}[https://www.rfc-editor.org/rfc/rfc7578].
  #
  # Optional argument +formopt+ is a hash of options
  # (applicable only when argument +enctype+
  # is <tt>'multipart/form-data'</tt>)
  # that may include the following entries:
  #
  # - +:boundary+: The value is the boundary stringruby/net/http/responses.rb000064400000116775150403134240011655 0ustar00, password)]
  end

  # Sets header <tt>'Proxy-Authorization'</tt> using the given
  # +account+ and +password+ strings:
  #
  #   req.proxy_basic_auth('my_account', 'my_password')
  #   req['Proxy-Authorization']
  #   # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA=="
  #
  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

# Returns whether the HTTP session is to be closed.
  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

# Returns whether the HTTP session is to be kept alive.
  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
ruby/net/http/responses.rb000064400000116775150403134240011655 0ustar00# frozen_string_literal: true
#--
# https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

module Net

  class HTTPUnknownResponse < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPError                  #
  end

  # Parent class for informational (1xx) HTTP response classes.
  #
  # An informational response indicates that the request was received and understood.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.1xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#1xx_informational_response].
  #
  class HTTPInformation < HTTPResponse
    HAS_BODY = false
    EXCEPTION_TYPE = HTTPError                  #
  end

  # Parent class for success (2xx) HTTP response classes.
  #
  # A success response indicates the action requested by the client
  # was received, understood, and accepted.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.2xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_success].
  #
  class HTTPSuccess < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPError                  #
  end

  # Parent class for redirection (3xx) HTTP response classes.
  #
  # A redirection response indicates the client must take additional action
  # to complete the request.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.3xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection].
  #
  class HTTPRedirection < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPRetriableError         #
  end

  # Parent class for client error (4xx) HTTP response classes.
  #
  # A client error response indicates that the client may have caused an error.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.4xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_client_errors].
  #
  class HTTPClientError < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPClientException        #
  end

  # Parent class for server error (5xx) HTTP response classes.
  #
  # A server error response indicates that the server failed to fulfill a request.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.5xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_server_errors].
  #
  class HTTPServerError < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPFatalError             #
  end

  # Response class for +Continue+ responses (status code 100).
  #
  # A +Continue+ response indicates that the server has received the request headers.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100].
  # - {RFC 9110}[https://wdoc/alt-ruby32-libs/README.md000064400000006712150403134230011424 0ustar00licenses/alt-ruby32/BSDL000064400000002413150403134230010717 0ustar00 for <tt>Early Hints</tt> responses (status code 103).
  #
  # The <tt>Early Hints</tt> indicates that the server has received
  # and is processing the request, and contains certain headers;
  # the final response is not available yet.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103].
  # - {RFC 8297}[https://www.rfc-editor.org/rfc/rfc8297.html#section-2].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#103].
  #
  class HTTPEarlyHints < HTTPInformation
    HAS_BODY = false
  end

  # Response class for +OK+ responses (status code 200).
  #
  # The +OK+ response indicates that the server has received
  # a request and has responded successfully.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200].
  #
  class HTTPOK < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for +Created+ responses (status code 201).
  #
  # The +Created+ response indicates that the server has received
 licenses/alt-ruby32/COPYING000064400000004573150403134230011314 0ustar00loper.mozilla.org/en-US/docs/Web/HTTP/Status/202].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-202-accepted].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202].
  #
  class HTTPAccepted < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>Non-Authoritative Information</tt> responses (status code 203).
  #
  # The <tt>Non-Authoritative Information</tt> response indicates that the server
  # is a transforming proxy (such as a Web accelerator)
  # that received a 200 OK response from its origin,
  # and is returning a modified version of the origin's response.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/203].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-203-non-authoritative-infor].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203].
  #
  cldoc/alt-ruby32-libs/NEWS.md000064400000073023150403134230011242 0ustar00a.org/wiki/List_of_HTTP_status_codes#204].
  #
  class HTTPNoContent < HTTPSuccess
    HAS_BODY = false
  end

  # Response class for <tt>Reset Content</tt> responses (status code 205).
  #
  # The <tt>Reset Content</tt> response indicates that the server
  # successfully processed the request,
  # asks that the client reset its document view, and is not returning any content.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/205].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-205-reset-content].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205].
  #
  class HTTPResetContent < HTTPSuccess
    HAS_BODY = false
  end

  # Response class for <tt>Partial Content</tt> responses (status code 206).
  #
  # The <tt>Partial Content</tt> resplicenses/alt-ruby32/GPL000064400000043254150403134230010625 0ustar00AV)</tt> response indicates that the server
  # has received the request,
  # and that the message body can contain a number of separate response codes.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 4818}[https://www.rfc-editor.org/rfc/rfc4918#section-11.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207].
  #
  class HTTPMultiStatus < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>Already Reported (WebDAV)</tt> responses (status code 208).
  #
  # The <tt>Already Reported (WebDAV)</tt> response indicates that the server
  # has received the request,
  # and that the members of a DAV binding have already been enumerated
  # in a preceding part of the (multi-status) response,
  # and are not being included again.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 5842}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208].
  #
  class HTTPAlreadyReported < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>IM Used</tt> responses (status code 226).
  #
  # The <tt>IM Used</tt> response indicates that the server has fulfilled a request
  # for the resource, and the response is a representation of the result
  # of one or more instance-manipulations applied to the current instance.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 3229}[https://www.rfc-editor.org/rfc/rfc3229.html#section-10.4.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226].
  #
  class HTTPIMUsed < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>Multiple Choices</tt> responses (status code 300).
  #
  # The <tt>Multiple Choices</tt> response indicates that the server
  # offers multiple options for the resource from which the client may choose.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-300-multiple-choices].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
  #
  class HTTPMultipleChoices < HTTPRedirection
    HAS_BODY = true
  end
  HTTPMultipleChoice = HTTPMultipleChoices

  # Response class for <tt>Moved Permanently</tt> responses (status code 301).
  #
  # The <tt>Moved Permanently</tt> response indicates that links or records
  # returning this response should be updated to use the given URL.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-301-moved-permanently].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
  #
  class HTTPMovedPermanently < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Found</tt> responses (status code 302).
  #
  # The <tt>Found</tt> response indicates that the client
  # should look at (browse to) another URL.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-302-found].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
  #
  class HTTPFound < HTTPRedirection
    HAS_BODY = true
  end
  HTTPMovedTemporarily = HTTPFound

  # Response class for <tt>See Other</tt> responses (status code 303).
  #
  # The response to the request can be found under another URI using the GET method.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-303-see-other].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
  #
  class HTTPSeeOther < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Not Modified</tt> responses (status code 304).
  #
  # Indicates that the resource has not been modified since the version
  # specified by the request headers.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-304-not-modified].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
  #
  class HTTPNotModified < HTTPRedirection
    HAS_BODY = false
  end

  # Response class for <tt>Use Proxy</tt> responses (status code 305).
  #
  # The requested resource is available only through a proxy,
  # whose address is provided in the response.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-305-use-proxy].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
  #
  class HTTPUseProxy < HTTPRedirection
    HAS_BODY = false
  end

  # Response class for <tt>Temporary Redirect</tt> responses (status code 307).
  #
  # The request should be repeated with another URI;
  # however, future requests should still use the original URI.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-307-temporary-redirect].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
  #
  class HTTPTemporaryRedirect < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Permanent Redirect</tt> responses (status code 308).
  #
  # This and all future requests should be directed to the given URI.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-308-permanent-redirect].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
  #
  class HTTPPermanentRedirect < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Bad Request</tt> responses (status code 400).
  #
  # The server cannot or will not process the request due to an apparent client error.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#400].
  #
  class HTTPBadRequest < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Unauthorized</tt> responses (status code 401).
  #
  # Authentication is required, but either was not provided or failed.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#401].
  #
  class HTTPUnauthorized < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Payment Required</tt> responses (status code 402).
  #
  # Reserved for future use.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-402-payment-required].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#402].
  #
  class HTTPPaymentRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Forbidden</tt> responses (status code 403).
  #
  # The request contained valid data and was understood by the server,
  # but the server is refusing action.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#403].
  #
  class HTTPForbidden < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Not Found</tt> responses (status code 404).
  #
  # The requested resource could not be found but may be available in the future.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#404].
  #
  class HTTPNotFound < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Method Not Allowed</tt> responses (status code 405).
  #
  # The request method is not supported for the requested resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-405-method-not-allowed].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#405].
  #
  class HTTPMethodNotAllowed < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Not Acceptable</tt> responses (status code 406).
  #
  # The requested resource is capable of generating only content
  # that not acceptable according to the Accept headers sent in the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#406].
  #
  class HTTPNotAcceptable < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Proxy Authentication Required</tt> responses (status code 407).
  #
  # The client must first authenticate itself with the proxy.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/407].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-407-proxy-authentication-re].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#407].
  #
  class HTTPProxyAuthenticationRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Request Timeout</tt> responses (status code 408).
  #
  # The server timed out waiting for the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-408-request-timeout].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#408].
  #
  class HTTPRequestTimeout < HTTPClientError
    HAS_BODY = true
  end
  HTTPRequestTimeOut = HTTPRequestTimeout

  # Response class for <tt>Conflict</tt> responses (status code 409).
  #
  # The request could not be processed because of conflict in the current state of the resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#409].
  #
  class HTTPConflict < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Gone</tt> responses (status code 410).
  #
  # The resource requested was previously in use but is no longer available
  # and will not be available again.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-410-gone].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#410].
  #
  class HTTPGone < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Length Required</tt> responses (status code 411).
  #
  # The request did not specify the length of its content,
  # which is required by the requested resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/411].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-411-length-required].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#411].
  #
  class HTTPLengthRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Precondition Failed</tt> responses (status code 412).
  #
  # The server does not meet one of the preconditions
  # specified in the request headers.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-412-precondition-failed].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#412].
  #
  class HTTPPreconditionFailed < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Payload Too Large</tt> responses (status code 413).
  #
  # The request is larger than the server is willing or able to process.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-413-content-too-large].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#413].
  #
  class HTTPPayloadTooLarge < HTTPClientError
    HAS_BODY = true
  end
  HTTPRequestEntityTooLarge = HTTPPayloadTooLarge

  # Response class for <tt>URI Too Long</tt> responses (status code 414).
  #
  # The URI provided was too long for the server to process.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/414].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-414-uri-too-long].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#414].
  #
  class HTTPURITooLong < HTTPClientError
    HAS_BODY = true
  end
  HTTPRequestURITooLong = HTTPURITooLong
  HTTPRequestURITooLarge = HTTPRequestURITooLong

  # Response class for <tt>Unsupported Media Type</tt> responses (status code 415).
  #
  # The request entity has a media type which the server or resource does not support.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-415-unsupported-media-type].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#415].
  #
  class HTTPUnsupportedMediaType < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Range Not Satisfiable</tt> responses (status code 416).
  #
  # The request entity has a media type which the server or resource does not support.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-416-range-not-satisfiable].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#416].
  #
  class HTTPRangeNotSatisfiable < HTTPClientError
    HAS_BODY = true
  end
  HTTPRequestedRangeNotSatisfiable = HTTPRangeNotSatisfiable

  # Response class for <tt>Expectation Failed</tt> responses (status code 417).
  #
  # The server cannot meet the requirements of the Expect request-header field.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/417].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-417-expectation-failed].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#417].
  #
  class HTTPExpectationFailed < HTTPClientError
    HAS_BODY = true
  end

  # 418 I'm a teapot - RFC 2324; a joke RFC
  # See https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#418.

  # 420 Enhance Your Calm - Twitter

  # Response class for <tt>Misdirected Request</tt> responses (status code 421).
  #
  # The request was directed at a server that is not able to produce a response.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-421-misdirected-request].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#421].
  #
  class HTTPMisdirectedRequest < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Unprocessable Entity</tt> responses (status code 422).
  #
  # The request was well-formed but had semantic errors.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-422-unprocessable-content].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#422].
  #
  class HTTPUnprocessableEntity < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Locked (WebDAV)</tt> responses (status code 423).
  #
  # The requdoc/alt-ruby32-libs/README.md000064400000006712150403134230011424 0ustar00edDependency < HTTPClientError
    HAS_BODY = true
  end

  # 425 Too Early
  # https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#425.

  # Response class for <tt>Upgrade Required</tt> responses (status code 426).
  #
  # The client should switch to the protocol given in the Upgrade header field.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/426].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-426-upgrade-required].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#426].
  #
  class HTTPUpgradeRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Precondition Required</tt> responses (status code 428).
  #
  # The origin server requires the request to be conditional.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/428].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-3].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#428].
  #
  class HTTPPreconditionRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Too Many Requests</tt> responses (status code 429).
  #
  # The user has sent too many requests in a given amount of time.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-4].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429].
  #
  class HTTPTooManyRequests < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Request Header Fields Too Large</tt> responses (status code 431).
  #
  # An individual header field is too large,
  # or all the header fields collectively, are too large.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/431].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-5].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#431].
  #
  class HTTPRequestHeaderFieldsTooLarge < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Unavailable For Legal Reasons</tt> responses (status code 451).
  #
  # A server operator has received a legal demand to deny access to a resource or to a set of resources
  # that includes the requested resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/451].
  # - {RFC 7725}[https://www.rfc-editor.org/rfc/rfc7725.html#section-3].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#451].
  #
  class HTTPUnavailableForLegalReasons < HTTPClientError
    HAS_BODY = true
  end
  # 444 No Response - Nginx
  # 449 Retry With - Microsoft
  # 450 Blocked by Windows Parental Controls - Microsoft
  # 499 Client Closed Request - Nginx

  # Response class for <tt>Internal Server Error</tt> responses (status code 500).
  #
  # An unexpected condition was encountered and no more specific message is suitable.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500].
  # - {RFC 9110}[https://www.rfc-editor.org/doc/alt-ruby32-libs/NEWS.md000064400000073023150403134230011242 0ustar00{RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-501-not-implemented].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#501].
  #
  class HTTPNotImplemented < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Bad Gateway</tt> responses (status code 502).
  #
  # The server was acting as a gateway or proxy
  # and received an invalid response from the upstream server.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-502-bad-gateway].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502].
  #
  class HTTPBadGateway < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Service Unavailable</tt> responses (status code 503).
  #
  # The server cannot handle the request
  # (because it is overloaded or down for maintenance).
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#503].
  #
  class HTTPServiceUnavailable < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Gateway Timeout</tt> responses (status code 504).
  #
  # The server was acting as a gateway or proxy
  # and did not receive a timely response from the upstream server.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-504-gateway-timeout].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#504].
  #
  class HTTPGatewayTimeout < HTTPServerError
    HAS_BODY = true
  end
  HTTPGatewayTimeOut = HTTPGatewayTimeout

  # Response class for <tt>HTTP Version Not Supported</tt> responses (status code 505).
  #
  # The server does not support the HTTP version used in the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/505].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-505-http-version-not-suppor].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#505].
  #
  class HTTPVersionNotSupported < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Variant Also Negotiates</tt> responses (status code 506).
  #
  # Transparent content negotiation for the request results in a circular reference.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/506].
  # - {RFC 2295}[https://www.rfc-editor.org/rfc/rfc2295#section-8.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#506].
  #
  class HTTPVariantAlsoNegotiates < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Insufficient Storage (WebDAV)</tt> responses (status code 507).
  #
  # The server is unable to store the representation needed to complete the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/507].
  # - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.5].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#507].
  #
  class HTTPInsufficientStorage < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Loop Detected (WebDAV)</tt> responses (status code 508).
  #
  # The server detected an infinite loop while processing the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508].
  # - {RFC 5942}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.2].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#508].
  #
  class HTTPLoopDetected < HTTPServerError
    HAS_BODY = true
  end
  # 509 Bandwidth Limit Exceeded - Apache bw/limited extension

  # Response class for <tt>Not Extended</tt> responses (status code 510).
  #
  # Further extensions to the request are required for the server to fulfill it.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/510].
  # - {RFC 2774}[https://www.rfc-editor.org/rfc/rfc2774.html#section-7].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#510].
  #
  class HTTPNotExtended < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Network Authentication Required</tt> responses (status code 511).
  #
  # The client needs to authenticate to gain network access.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/511].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-6].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#511].
  #
  class HTTPNetworkAuthenticationRequired < HTTPServerError
    HAS_BODY = true
  end

end

class Net::HTTPResponse
  CODE_CLASS_TO_OBJ = {
    '1' => Net::HTTPInformation,
    '2' => Net::HTTPSuccess,
    '3' => Net::HTTPRedirection,
    '4' => Net::HTTPClientError,
    '5' => Net::ruby/expect.rb000064400000004304150403134230007336 0ustar00 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
ruby/net/http/response.rb000064400000046173150403134240011464 0ustar00# frozen_string_literal: true

# This class is the base class for \Net::HTTP response classes.
#
# == About the Examples
#
# :include: doc/net-http/examples.rdoc
#
# == Returned Responses
#
# \Method Net::HTTP.get_response returns
# an instance of one of the subclasses of \Net::HTTPResponse:
#
#   Net::HTTP.get_response(uri)
#   # => #<Net::HTTPOK 200 OK readbody=true>
#   Net::HTTP.get_responsruby/rinda/rinda.rb000064400000015123150403134230010241 0ustar00pedia.org/wiki/List_of_HTTP_status_codes].
# You can look up the response class for a given code:
#
#   Net::HTTPResponse::CODE_TO_OBJ['200'] # => Net::HTTPOK
#   Net::HTTPResponse::CODE_TO_OBJ['400'] # => Net::HTTPBadRequest
#   Net::HTTPResponse::CODE_TO_OBJ['404'] # => Net::HTTPNotFound
#
# And you can retrieve the status code for a response object:
#
#   Net::HTTP.get_response(uri).code                 # => "200"
#   Net::HTTP.get_response(hostname, '/nosuch').code # => "404"
#
# The response subclasses (indentation shows class hierarchy):
#
# - Net::HTTPUnknownResponse (for unhandled \HTTP extensions).
#
# - Net::HTTPInformation:
#
#   - Net::HTTPContinue (100)
#   - Net::HTTPSwitchProtocol (101)
#   - Net::HTTPProcessing (102)
#   - Net::HTTPEarlyHints (103)
#
# - Net::HTTPSuccess:
#
#   - Net::HTTPOK (200)
#   - Net::HTTPCreated (201)
#   - Net::HTTPAccepted (202)
#   - Net::HTTPNonAuthoritativeInformation (203)
#   - Net::HTTPNoContent (204)
#   - Net::HTTPResetContent (205)
#   - Net::HTTPPartialContent (206)
#   - Net::HTTPMultiStatus (207)
#   - Net::HTTPAlreadyReported (208)
#   - Net::HTTPIMUsed (226)
#
# - Net::HTTPRedirection:
#
#   - Net::HTTPMultipleChoices (300)
#   - Net::HTTPMovedPermanently (301)
#   - Net::HTTPFound (302)
#   - Net::HTTPSeeOther (303)
#   - Net::HTTPNotModified (304)
#   - Net::HTTPUseProxy (305)
#   - Net::HTTPTemporaryRedirect (307)
#   - Net::HTTPPermanentRedirect (308)
#
# - Net::HTTPClientError:
#
#   - Net::HTTPBadRequest (400)
#   - Net::HTTPUnauthorized (401)
#   - Net::HTTPPaymentRequired (402)
#   - Net::HTTPForbidden (403)
#   - Net::HTTPNotFound (404)
#   - Net::HTTPMethodNotAllowed (405)
#   - Net::HTTPNotAcceptable (406)
#   - Net::HTTPProxyAuthenticationRequired (407)
#   - Net::HTTPRequestTimeOut (408)
#   - Net::HTTPConflict (409)
#   - Net::HTTPGone (410)
#   - Net::HTTPLengthRequired (411)
#   - Net::HTTPPreconditionFailed (412)
#   - Net::HTTPRequestEntityTooLarge (413)
#   - Net::HTTPRequestURITooLong (414)
#   - Net::HTTPUnsupportedMediaType (415)
#   - Net::HTTPRequestedRangeNotSatisfiable (416)
#   - Net::HTTPExpectationFailed (417)
#   - Net::HTTPMisdirectedRequest (421)
#   - Net::HTTPUnprocessableEntity (422)
#   - Net::HTTPLocked (423)
#   - Net::HTTPFailedDependency (424)
#   - Net::HTTPUpgradeRequired (426)
#   - Net::HTTPPreconditionRequired (428)
#   - Net::HTTPTooManyRequests (429)
#   - Net::HTTPRequestHeaderFieldsTooLarge (431)
#   - Net::HTTPUnavailableForLegalReasons (451)
#
# - Net::HTTPServerError:
#
#   - Net::HTTPInternalServerError (500)
#   - Net::HTTPNotImplemented (501)
#   - Net::HTTPBadGateway (502)
#   - Net::HTTPServiceUnavailable (503)
#   - Net::HTTPGatewayTimeOut (504)
#   - Net::HTTPVersionNotSupported (505)
#   - Net::HTTPVariantAlsoNegotiates (506)
#   - Net::HTTPInsufficientStorage (507)
#   - Net::HTTPLoopDetected (508)
#   - Net::HTTPNotExtended (510)
#   - Net::HTTPNetworkAuthenticationRequired (511)
#
# There is also the Net::HTTPBadResponse exception which is raised when
# there is a protocol error.
#
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
    @body_encoding = false
    @ignore_eof = true
  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

  # Returns the value set by body_encoding=, or +false+ if none;
  # see #body_encoding=.
  attr_reader :body_encoding

  # Sets the encoding that should be used when reading the body:
  #
  # - If the given value is an Encoding object, that encoding will be used.
  # - Otherwise if the value is a string, the value of
  #   {Encoding#find(value)}[rdoc-ref:Encoding.find]
  #   will be used.
  # - Otherwise an encoding will be deduced from the body itself.
  #
  # Examples:
  #
  #   http = Net::HTTP.new(hostname)
  #   req = Net::HTTP::Get.new('/')
  #
  #   http.request(req) do |res|
  #     p res.body.encoding # => #<Encoding:ASCII-8BIT>
  #   end
  #
  #   http.request(req) do |res|
  #     res.body_encoding = "UTF-8"
  #     p res.body.encoding # => #<Encoding:UTF-8>
  #   end
  #
  def body_encoding=(value)
    value = Encoding.find(value) if value.is_a?(String)
    @body_encoding = value
  end

  # Whether to ignore EOF when reading bodies with a specified Content-Length
  # header.
  attr_accessor :ignore_eof

  def inspect
    "#<#{self.class} #{@code} #{@message} readbody=#{@read}>"
  end

  #
  # response <-> exception relationship
  #

  defruby/rinda/ring.rb000064400000031061150403134230010102 0ustar00ernal 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 <code>dest#<<</code> method (it could be String or IO, or any
  # other object responding to <code><<</code>).
  #
  # 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
    return if @body.nil?

    case enc = @body_encoding
    when Encoding, false, nil
      # Encoding: force given encoding
      # false/nil: do not force encoding
    else
      # other value: detect encoding from body
      enc = detect_encoding(@body)
    end

    @body.force_encoding(enc) if enc

    @body
  end

  # Returns the string response body;
  # note that repeated calls for the unmodified body return a cached string:
  #
  #   path = '/todos/1'
  #   Net::HTTP.start(hostname) do |http|
  #     res = http.get(path)
  #     p res.body
  #     p http.head(path).body # No body.
  #   end
  #
  # Output:
  #
  #   "{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false\n}"
  #   nil
  #
  def body
    read_body()
  end

  # Sets the body of the response to the given value.
  def body=(value)
    @body = value
  end

  alias entity body   #:nodoc: obsolete

  private

  # :nodoc:
  def detect_encoding(str, encoding=nil)
    if encoding
    elsif encoding = type_params['charset']
    elsif encoding = check_bom(str)
    else
      encoding = case content_type&.downcase
      when %r{text/x(?:ht)?ml|application/(?:[^+]+\+)?xml}
        /\A<xml[ \t\r\n]+
          version[ \t\r\n]*=[ \t\r\n]*(?:"[0-9.]+"|'[0-9.]*')[ \t\r\n]+
          encoding[ \t\r\n]*=[ \t\r\n]*
          (?:"([A-Za-z][\-A-Za-z0-9._]*)"|'([A-Za-z][\-A-Za-z0-9._]*)')/x =~ str
        encoding = $1 || $2 || Encoding::UTF_8
      when %r{text/html.*}
        sniff_encoding(str)
      end
    end
    return encoding
  end

  # :nodoc:
  def sniff_encoding(str, encoding=nil)
    # the encoding sniffing algorithm
    # http://www.w3.org/TR/html5/parsing.html#determining-the-character-encoding
    if enc = scanning_meta(str)
      enc
    # 6. last visited page or something
    # 7. frequency
    elsif str.ascii_only?
      Encoding::US_ASCII
    elsif str.dup.force_encoding(Encoding::UTF_8).valid_encoding?
      Encoding::UTF_8
    end
    # 8. implementation-defined or user-specified
  end

  # :nodoc:
  def check_bom(str)
    case str.byteslice(0, 2)
    when "\xFE\xFF"
      return Encoding::UTF_16BE
    when "\xFF\xFE"
      return Encoding::UTF_16LE
    end
    if "\xEF\xBB\xBF" == str.byteslice(0, 3)
      return Encoding::UTF_8
    end
    nil
  end

  # :nodoc:
  def scanning_meta(str)
    require 'strscan'
    ss = StringScanner.new(str)
    if ss.scan_until(/<meta[\t\n\f\r ]*/)
      attrs = {} # attribute_list
      got_pragma = false
      need_pragma = nil
      charset = nil

      # step: Attributes
      while attr = get_attribute(ss)
        name, value = *attr
        next if attrs[name]
        attrs[name] = true
        case name
        when 'http-equiv'
          got_pragma = true if value == 'content-type'
        when 'content'
          encoding = extracting_encodings_from_meta_elements(value)
          unless charset
            charset = encoding
          end
          need_pragma = true
        when 'charset'
          need_pragma = false
          charset = value
        end
      end

      # step: Processing
      return if need_pragma.nil?
      return if need_pragma && !got_pragma

      charset = Encoding.find(charset) rescue nil
      return unless charset
      charset = Encoding::UTF_8 if charset == Encoding::UTF_16
      return charset # tentative
    end
    nil
  end

  def get_attribute(ss)
    ss.scan(/[\t\n\f\r \/]*/)
    if ss.peek(1) == '>'
      ss.getch
      return nil
    end
    name = ss.scan(/[^=\t\n\f\r \/>]*/)
    name.downcase!
    raise if name.empty?
    ss.skip(/[\t\n\f\r ]*/)
    if ss.getch != '='
      value = ''
      return [name, value]
    end
    ss.skip(/[\t\n\f\r ]*/)
    case ss.peek(1)
    when '"'
      ss.getch
      value = ss.scan(/[^"]+/)
      value.downcase!
      ss.getch
    when "'"
      ss.getch
      value = ss.scan(/[^']+/)
      value.downcase!
      ss.getch
    when '>'
      value = ''
    else
      value = ss.scan(/[^\t\n\f\r >]+/)
      value.downcase!
    end
    [name, value]
  end

  def extracting_encodings_from_meta_elements(value)
    # http://dev.w3.org/html5/spec/fetching-resources.html#algorithm-for-extracting-an-encoding-from-a-meta-element
    if /charset[\t\n\f\r ]*=(?:"([^"]*)"|'([^']*)'|["']|\z|([^\t\n\f\r ;]+))/i =~ value
      return $1 || $2 || $3
    end
    return nil
  end

  ##
  # 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
          if self['content-length']
            self['content-length'] = inflate_body_io.bytes_inflated.to_s
          end
        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, @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.nil? || @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 streamsruby/open3.rb000064400000054160150403134240007100 0ustar00.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

ruby/open3.rb000064400000054160150403134240007100 0ustar00# 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
#

require 'open3/version'

module Open3

  # Opruby/rinda/tuplespace.rb000064400000033610150403134230011312 0ustar00# frozen_string_literal: true
$expect_verbose = false

class IO
  # call-seq:
  #   IO#expect(pattern,timeout=9999999)                  ->  Array
  #   IO#expect(pattern,timeout=9999999) { |result| ... } ->  nil
  #
  # The +expect+ library adds instance method IO#expect,
  # which is similar to the
  # {TCL expect extension}[https://www.tcl.tk/man/expect5.31/expect.1.html].
  #
  # To use this method, you must require +expect+:
  #
  #   require 'expect'
  #
  # 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
ruby/rinda/rinda.rb000064400000015123150403134230010241 0ustar00popen2e([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
  # <code>opts[:stdin_data]</code> and <code>opts[:binmode]</code>.  See Process.spawn.
  #
  # If <code>opts[:stdin_data]</code> is specified, it is sent to the command's standard input.
  #
  # If <code>opts[:binmode]</code> 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 #=> #<Process::Status: pid 32682 exit 0>
  #
  #   # 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
  # <code>opts[:stdin_data]</code> and <code>opts[:binmode]</code>.  See Process.spawn.
  #
  # If <code>opts[:stdin_data]</code> is specified, it is sent to the command's standard input.
  #
  # If <code>opts[:binmode]</code> 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
  # <code>opts[:stdin_data]</code> and <code>opts[:binmode]</code>.  See Process.spawn.
  #
  # If <code>opts[:stdin_data]</code> is specified, it is sent to the command's standard input.
  #
  # If <code>opts[:binmode]</code> 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
      [ouruby/rinda/ring.rb000064400000031061150403134230010102 0ustar00, ..., 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 #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
  #     p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
  #   }
  #
  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]                 ruby/optionparser.rb000064400000000073150403134230010572 0ustar00  pipeline_run(cmds, opts, [in_r], [in_w], &block)
  end
  ruby/coverage.rb000064400000000560150403134230007641 0ustar00
  #
  #   # Run xeyes in 10 seconds.
  #   Open3.pipeline_start("xeyes") {|ts|
  #     sleep 10
  #     t = ts[0]
  #     Process.kill("TERM", t.pid)
  #     p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
  #   }
  #
  #   # Convert pdf to ps and send it to a printer.
  #   # Collect error message of pdftops and lpr.
  #   pdf_file = "paper.pdf"
  # ruby/random/formatter.rb000064400000016157150403134230011342 0ustar00 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")
  #   #=> [#<Process::Status: pid 11817 exit 0>,
  #   #    #<Process::Status: pid 11820 exit 0>,
  #   #    #<Process::Status: pid 11828 exit 0>]
  #
  #   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 -cruby/did_you_mean.rb000064400000012500150403134240010500 0ustar00e 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

# JRuby uses different popen logic on Windows, require it here to reuse wrapper methods above.
require 'open3/jruby_windows' if RUBY_ENGINE == 'jruby' && JRuby::Util::ON_WINDOWS
ruby/did_you_mean.rb000064400000012500150403134240010500 0ustar00require_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/spell_checkers/pattern_key_name_checker'
require_relative 'did_you_mean/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 `<main>': 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+
# envruby/rinda/tuplespace.rb0000644ruby/fiddle/value.rb000064400000005570150403134230010417 0ustar00ustar00rnKeyError, PatternKeyNameChecker iruby/drb/timeridconv.rb000064400000004245150403134240011145 0ustar00ined?(Ractor)
      Ractor.current[:__did_you_mean_formatter__] || Formatter
    else
      Formatter
    end
  end

  # Updates the primary formatter used to format the suggestions.
  def self.formatter=(formatter)
    if defined?(Ractor)
      Ractor.current[:__did_you_mean_formatter__] = formatter
    end
  end
end
ruby/drb/version.rb000064400000000043150403134240010277 0ustar00module DRb
  VERSION = "2.1.1"
end
ruby/drb/timeridconv.rbruby/fiddle/version.rb000064400000000046150403134230010761 0ustar00ruby/fiddle/closure.rb000064400000003672150403134240010761 0ustar00   return if @expires
        @expires = Time.now + @keeping
        on_gcruby/drb/invokemethod.rb000064400000001411150403134240011306 0ustar00xError
      raise "invalid reference"
    end

    def to_id(obj) # :nodoc:
      return @holder.add(obj)
    end
  end
end

# DRb.install_id_conv(TimerIdConv.new)
ruby/drb/eq.rb000064400000000423150403134240007221 0ustar00ruby/drb/extservm.rb00006440000000ruby/fiddle/types.rb000064400000003626150403134240010450 0ustar00ustar00# 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
ruby/drb/extservm.rb000064400000003467150403134240010504 0ustar00ruby/drb/gw.rbruby/fiddle/cparser.rb000064400000021141150403134240010733 0ustar00ve? # server may be `false'
          invoke_service(name)
          @cond.wait
        end
      end
    end

    def register(name, ro)
      synchronize do
        @servers[name] = ro
        @cond.signal
      end
      self
    end
    alias regist register

    def unregister(name)
      synchronize do
        @servers.delete(name)
      end
    end
    alias unregist unregister

    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
ruby/drb/gw.rb000064400000006005150403134240007233 0ustar00# 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(reruby/drb/acl.rb000064400000011161150403134240007354 0ustar00ef]) # ??
        end
      else
        Marshal.dump([DRb.uri, [:DRbObject, @uriruby/optionparser.rb000064400000000073150403134230010572 0ustar00# frozen_string_literal: false
require_relative 'optparse'
ruby/coverage.rb000064400000000560150403134230007641 0ustar00require "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
ruby/random/formatter.rb000064400000030460150403134230011333 0ustar00# -*- coding: us-ascii -*-
# frozen_string_literal: true

# == \Random number formatter.
#
# Formats generated random numbers in many manners. When <tt>'random/formatter'</tt>
# is required, several methods are added to empty core module <tt>Random::Formatter</tt>,
# making them available as Random's instance and module methods.
#
# Standard library SecureRandom is also extended with the module, and the methods
# described below are available as a module methods in it.
#
# === Examples
#
# Generate random hexadecimal strings:
#
#   require 'random/formatter'
#
#   prng = Random.new
#   prng.hex(10) #=> "52750b30ffbc7de3b362"
#   prng.hex(10) #=> "92b15d6c8dc4beb5f559"
#   prng.hex(13) #=> "39b290146bea6ce975c37cfc23"
#   # or just
#   Random.hex #=> "1aed0c631e41be7f77365415541052ee"
#
# Generate random base64 strings:
#
#   prng.base64(10) #=> "EcmTPZwWRAozdA=="
#   prng.base64(10) #=> "KO1nIU+p9DKxGg=="
#   prng.base64(12) #=> "7kJSM/MzBJI+75j8"
#   Random.base64(4) #=> "bsQ3fQ=="
#
# Generate random binary strings:
#
#   prng.random_bytes(10) #=> "\016\t{\370g\310pbr\301"
#   prng.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337"
#   Random.random_bytes(6) #=> "\xA1\xE6Lr\xC43"
#
# Generate alphanumeric strings:
#
#   prng.alphanumeric(10) #=> "S8baxMJnPl"
#   prng.alphanumeric(10) #=> "aOxAg8BAJe"
#   Random.alphanumeric #=> "TmP9OsJHJLtaZYhP"
#
# Generate UUIDs:
#
#   prng.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594"
#   prng.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab"
#   Random.uuid #=> "f14e0271-de96-45cc-8911-8910292a42cd"
#
# All methods are available in the standard library SecureRandom, too:
#
#   SecureRandom.hex #=> "05b45376a30c67238eb93b16499e50cf"

module Random::Formatter

  # Generate 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 'random/formatter'
  #
  #   Random.random_bytes #=> "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6"
  #   # or
  #   prng = Random.new
  #  ruby/fiddle/import.rb000064400000021434150403134240010613 0ustar00 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 'random/formatter'
  #
  #   Random.base64 #=> "/2BuBuLf3+WfSKyQbRcc/A=="
  #   # or
  #   prng = Random.new
  #   prng.base64 #=> "6BbW0pxO0YENxn38HMUbcQ=="
  #
  # See RFC 3548 for the definition of base64.
  def base64(n=nil)
    [random_bytes(n)].pack("m0")
  end

  # Generate 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 'random/formatter'
  #
  #   Random.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg"
  #   # or
  #   prng = Random.new
  #   prng.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg"
  #
  #   prng.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ=="
  #   prng.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg=="
  #
  # 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

  # Generate a random v4 UUID (Universally Unique IDentifier).
  #
  #   require 'random/formatter'
  #
  #   Random.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594"
  #   Random.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab"
  #   # or
  #   prng = Random.new
  #   prng.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 RFC9562[https://www.rfc-editor.org/rfc/rfc9562] for details of UUIDv4.
  #
  def uuid
    ary = random_bytes(16)
    ary.setbyte(6, (ary.getbyte(6) & 0x0f) | 0x40)
    ary.setbyte(8, (ary.getbyte(8) & 0x3f) | 0x80)
    ary.unpack("H8H4H4H4H12").join(?-)
  end

  alias uuid_v4 uuid

  # Generate a random v7 UUID (Universally Unique IDentifier).
  #
  #   require 'random/formatter'
  #
  #   Random.uuid_v7 # => "0188d4c3-1311-7f96-85c7-242a7aa58f1e"
  #   Random.uuid_v7 # => "0188d4c3-16fe-744f-86af-38fa04c62bb5"
  #   Random.uuid_v7 # => "0188d4c3-1af8-764f-b049-c204ce0afa23"
  #   Random.uuid_v7 # => "0188d4c3-1e74-7085-b14f-ef6415dc6f31"
  #   #                    |<--sorted-->| |<----- random ---->|
  #
  #   # or
  #   prng = Random.new
  #   prng.uuid_v7 # => "0188ca51-5e72-7950-a11d-def7ff977c98"
  #
  # The version 7 UUID starts with the least significant 48 bits of a 64 bit
  # Unix timestamp (milliseconds since the epoch) and fills the remaining bits
  # with random data, excluding the version and variant bits.
  #
  # This allows version 7 UUIDs to be sorted by creation time.  Time ordered
  # UUIDs can be used for better database index locality of newly inserted
  # records, which may have a significant performance benefit compared to random
  # data inserts.
  #
  # The result contains 74 random bits (9.25 random bytes).
  #
  # Note that this method cannot be made reproducible because its output
  # includes not only random bits but also timestamp.
  #
  # See RFC9562[https://www.rfc-editor.org/rfc/rfc9562] for details of UUIDv7.
  #
  # ==== Monotonicity
  #
  # UUIDv7 has millisecond precision by default, so multiple UUIDs created
  # within the same millisecond are not issued in monotonically increasing
  # order.  To create UUIDs that are time-ordered with sub-millisecond
  # precision, up to 12 bits of additional timestamp may added with
  # +extra_timestamp_bits+.  The extra timestamp precision comes at the expense
  # of random bits.  Setting <tt>extra_timestamp_bits: 12</tt> provides ~244ns
  # of precision, but only 62 random bits (7.75 random bytes).
  #
  #   prng = Random.new
  #   Array.new(4) { prng.uuid_v7(extra_timestamp_bits: 12) }
  #   # =>
  #   ["0188d4c7-13da-74f9-8b53-22a786ffdd5a",
  #    "0188d4c7-13da-753b-83a5-7fb9b2afaeea",
  #    "0188d4c7-13da-754a-88ea-ac0baeedd8db",
  #    "0188d4c7-13da-7557-83e1-7cad9cda0d8d"]
  #   # |<--- sorted --->| |<-- random --->|
  #
  #   Array.new(4) { prng.uuid_v7(extra_timestamp_bits: 8) }
  #   # =>
  #   ["0188d4c7-3333-7a95-850a-de6edb858f7e",
  #    "0188d4c7-3333-7ae8-842e-bc3a8b7d0cf9",  # <- out of order
  #    "0188d4c7-3333-7ae2-995a-9f135dc44ead",  # <- out of order
  #    "0188d4c7-3333-7af9-87c3-8f612edac82e"]
  #   # |<--- sorted -->||<---- random --->|
  #
  # Any rollbacks of the system clock will break monotonicity.  UUIDv7 is based
  # on UTC, which excludes leap seconds and can rollback the clock.  To avoid
  # this, the system clock can synchronize with an NTP server configured to use
  # a "leap smear" approach.  NTP or PTP will also be needed to synchronize
  # across distributed nodes.
  #
  # Counters and other mechanisms for stronger guarantees of monotonicity are
  # not implemented.  Applications with stricter requirements should follow
  # {Section 6.2}[https://www.rfc-editor.org/rfc/rfc9562.html#name-monotonicity-and-counters]
  # of the specification.
  #
  def uuid_v7(extra_timestamp_bits: 0)
    case (extra_timestamp_bits = Integer(extra_timestamp_bits))
    when 0 # min timestamp precision
      ms = Process.clock_gettime(Process::CLOCK_REALTIME, :millisecond)
      rand = random_bytes(10)
      rand.setbyte(0, rand.getbyte(0) & 0x0f | 0x70) # version
      rand.setbyte(2, rand.getbyte(2) & 0x3f | 0x80) # variant
      "%08x-%04x-%s" % [
        (ms & 0x0000_ffff_ffff_0000) >> 16,
        (ms & 0x0000_0000_0000_ffff),
        rand.unpack("H4H4H12").join("-")
      ]

    when 12 # max timestamp precision
      ms, ns = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
        .divmod(1_000_000)
      extra_bits = ns * 4096 / 1_000_000
      rand = random_bytes(8)
      rand.setbyte(0, rand.getbyte(0) & 0x3f | 0x80) # variant
      "%08x-%04x-7%03x-%s" % [
        (ms & 0x0000_ffff_ffff_0000) >> 16,
        (ms & 0x0000_0000_0000_ffff),
        extra_bits,
        rand.unpack("H4H12").join("-")
      ]

    when (0..12) # the generic version is slower than the special cases above
      rand_a, rand_b1, rand_b2, rand_b3 = random_bytes(10).unpack("nnnN")
      rand_mask_bits = 12 - extra_timestamp_bits
      ms, ns = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
        .divmod(1_000_000)
      "%08x-%04x-%04x-%04x-%04x%08x" % [
        (ms & 0x0000_ffff_ffff_0000) >> 16,
        (ms & 0x0000_0000_0000_ffff),
        0x7000 |
          ((ns * (1 << extra_timestamp_bits) / 1_000_000) << rand_mask_bits) |
          rand_a & ((1 << rand_mask_bits) - 1),
        0x8000 | (rand_b1 & 0x3fff),
        rand_b2,
        rand_b3
      ]

    else
      raise ArgumentError, "extra_timestamp_bits must be in 0..12"
    end
  end

  # Internal interface to Random; Generate random data _n_ bytes.
  private def gen_random(n)
    self.bytes(n)
  end

  # Generate 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 'random/formatter'
  #
  #   prng.choose([*'l'..'r'], 16) #=> "lmrqpoonmmlqlron"
  #   prng.choose([*'0'..'9'], 5)  #=> "27309"
  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

  # The default character list for #alphanumeric.
  ALPHANUMERIC = [*'A'..'Z', *'a'..'z', *'0'..'9'].map(&:freeze).freeze

  # Generate a random alphanumeric string.
  #
  # The argument _n_ specifies the length, in characters, of the alphanumeric
  # string to be generated.
  # The argument _chars_ specifies the character list which the result is
  # consist of.
  #
  # If _n_ is not specified or is nil, 16 is assumed.
  # It may be larger ruby/fiddle/function.rb000064400000001033150403134240011117 0ustar00ruby/fiddle/value.rb000064400000005474150403134230010422 0ustar00# frozen_string_literal: trruby/fiddle/pack.rb000064400000006221150403134240010214 0ustar00
    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").unpack1("l!")
          else
            if defined?(SIZEOF_LONG_LONG) and
              SIZEOF_VOIDP == SIZEOF_LONG_LONG
              return [arg].pack("p").unpack1("q")
            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
        end
        return arg
      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
ruby/fiddle/version.rb000064400000000046150403134230010761 0ustar00module Fiddle
  VERSION = "1.1.6"
end
ruby/fiddle/closure.rb000064400000003672150403134ruby/fiddle/struct.rb000064400000034320150403134240010623 0ustar00when this block is finished.
      #   end
      def create(*args)
        if block_given?
          closure = new(*args)
          begin
            yield(closure)
          ensure
            closure.free
          end
        else
          new(*args)
        end
      end
    end

    # 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
ruby/fiddle/types.rb000064400000003626150403134240010450 0ustar00# 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+ (<tt>unsigned int</tt>) and
  # +ulong+ and +u_long+ (<tt>unsigned long</tt>)
  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
ruby/fiddle/cparser.rb000064400000022426150403134240010742 0ustar00# 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_ULONG_LONG
      when /\Aunsigned\s+long(?:\s+int\s+)?(?:\s+\w+)?\z/,
           /\Aunsigned\s+int\s+long(?:\s+\w+)?\z/,
           /\Along(?:\s+int)?\s+unsigned(?:\s+\w+)?\z/,
           /\Aint\s+unsigned\s+long(?:\s+\w+)?\z/,
           /\A(?:int\s+)?long\s+unsigned(?:\s+\w+)?\z/
        return TYPE_ULONG
      when /\A(?:signed\s+)?long(?:\s+int\s+)?(?:\s+\w+)?\z/,
           /\A(?:signed\s+)?int\s+long(?:\s+\w+)?\z/,
           /\Along(?:\s+int)?\s+signed(?:\s+\w+)?\z/
        return TYPE_LONG
      when /\Aunsigned\s+short(?:\s+int\s+)?(?:\s+\w+)?\z/,
           /\Aunsigned\s+int\s+short(?:\s+\w+)?\z/,
           /\Ashort(?:\s+int)?\s+unsigned(?:\s+\w+)?\z/,
           /\Aint\s+unsigned\s+short(?:\s+\w+)?\z/,
           /\A(?:int\s+)?short\s+unsigned(?:\s+\w+)?\z/
        return TYPE_USHORT
      when /\A(?:signed\s+)?short(?:\s+int\s+)?(?:\s+\w+)?\z/,
           /\A(?:signed\s+)?int\s+short(?:\s+\w+)?\z/,
           /\Aint\s+(?:signed\s+)?short(?:\s+\w+)?\z/
        return TYPE_SHORT
      when /\A(?:signed\s+)?int(?:\s+\w+)?\z/
        return TYPE_INT
      when /\A(?:unsigned\s+int|uint)(?:\s+\w+)?\z/
        return TYPE_UINT
      when /\A(?:signed\s+)?char(?:\s+\w+)?\z/
        return TYPE_CHAR
      when /\Aunsigned\s+char(?:\s+\w+)?\z/
        return  TYPE_UCHAR
      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_UINT8_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_UINT16_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_UINT32_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_UINT64_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 "bool"
        return TYPE_BOOL
      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
ruby/fiddle/import.rb000064400000021520150403134240010607 0ruby/optparse/version.rb000064400000004015150403134240011370 0ustar00ion
    # 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
    ruby/optparse/kwargs.rb000064400000001042150403134240011176 0ustar00bind
          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
    privateruby/optparse/uri.rb000064400000000217150403134240010502 0ustar00e(signature, type_alias)
      h = parse_bind_options(opts)
      case h[:callback_type]
      when :bind, nil
        f = bind_function(name, ruby/optparse/shellwords.rb000064400000000244150403134240012071 0ustar00scribed by +signature+.
    #
    #   MyUnion = union ['int i', 'char c']
    def union(signature)
      tys, mems = parse_struct_signature(signature, type_alias)
 ruby/optparse/date.rb000064400000000560150403134240010621 0ustar00 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)
      adruby/optparse/time.rb000064400000000347150403134240010645 0ustar00      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

ruby/optparse/ac.rb000064400000003032150403134240010264 0ustar00ruby/fiddle/function.rb000064400000001033150403134240011117 0ustar00# 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

    # Turn this function in to a proc
    def to_proc
      this = self
      lambda { |*args| this.call(*args) }
    end
  end
end
ruby/fiddle/pack.rbruby/pathname.rb000064400000041522150403134240007647 0ustar00
    PACK_MAP = {
      TYPE_VOIDP => "L!",
      TYPE_CHAR  => "c",
      TYPE_SHORT => "s!",
      TYPE_INT   => "i!",
      TYPE_LONG  => "l!",
      TYPE_FLOAT => "f",
      TYPE_DOUBLE => "d",
      TYPE_UCHAR  => "C",
      TYPE_USHORT => "S!",
      TYPE_UINT   => "I!",
      TYPE_ULONG  => "L!",
    }
    case SIZEOF_BOOL
    when SIZEOF_CHAR
      PACK_MAP[TYPE_BOOL] = PACK_MAP[TYPE_UCHAR]
    when SIZEOF_SHORT
      PACK_MAP[TYPE_BOOL] = PACK_MAP[TYPE_USHORT]
    when SIZEOF_INT
      PACK_MAP[TYPE_BOOL] = PACK_MAP[TYPE_UINT]
    when SIZEOF_LONG
      PACK_MAP[TYPE_BOOL] = PACK_MAP[TYPE_ULONG]
    end
    if RUBY_ENGINE == "jruby" and WINDOWS and [0].pack("l!").size == 8
      # JRuby's 'l!' pack string doesn't use 32-bit on Windows.
      # See https://github.com/jruby/jruby/issues/8357 for details
      PACK_MAP[TYPE_LONG] = PACK_MAP[TYPE_INT]
      PACK_MAP[TYPE_ULONG] = PACK_MAP[TYPE_UINT]
    end

    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_UCHAR  => SIZEOF_CHAR,
      TYPE_USHORT => SIZEOF_SHORT,
      TYPE_UINT   => SIZEOF_INT,
      TYPE_ULONG  => SIZEOF_LONG,
      TYPE_BOOL   => SIZEOF_BOOL,
    }
    if defined?(TYPE_LONG_LONG)
      ALIGN_MAP[TYPE_LONG_LONG] = ALIGN_MAP[TYPE_ULONG_LONG] = ALIGN_LONG_LONG
      PACK_MAP[TYPE_LONG_LONG] = "q"
      PACK_MAP[TYPE_ULONG_LONG] = "Q"
      SIZE_MAP[TYPE_LONG_LONG] = SIZE_MAP[TYPE_ULONG_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
ruby/fiddle/struct.rb000064400000035220150403134240010623 0ustar00# 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 self.offsetof(name, members, types) # :nodoc:
      offset = 0
      worklist = name.split('.')
      this_type = self
      while search_name = worklist.shift
        index = 0
        member_index = members.index(search_name)

        unless member_index
          # Possibly a sub-structure
          member_index = members.index { |member_name, _|
            member_name == search_name
          }
          return unless member_index
        end

        types.each { |type, count = 1|
          orig_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

          # Unions shouldn't advance the offset
          if this_type.entity_class == CUnionEntity
            type_size = 0
          end

          offset = PackInfo.align(orig_offset, align)

          if worklist.empty?
            return offset if index == member_index
          else
            if index == member_index
              subtype = types[member_index]
              members = subtype.members
              types = subtype.types
              this_type = subtype
              break
            end
          end

          offset += (type_size * count)
          index += 1
        }
      end
      nil
    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

    def self.offsetof(name, members, types) # :nodoc:
      0
    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 }

        # Return the offset of a struct member given its name.
        # For example:
        #
        #     MyStruct = struct [
        #       "int64_t i",
        #       "char c",
        #     ]
        #
        #     MyStruct.offsetof("i") # => 0
        #     MyStruct.offsetof("c") # => 8
        #
        define_singleton_method(:offsetof) { |name|
          klass.offsetof(name, members, types)
        }
        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))
      if block_given? and func.nil?
        message = "a free function must be supplied to #{self}.malloc " +
                  "when it is called with a block"
        raise ArgumentError, message
      end

      pointer = Pointer.malloc(size)
      begin
        struct = new(pointer, types, func)
      rescue
        pointer.free = func
        pointer.call_free
        raise
      end
      if block_given?
        begin
          yield(struct)
        ensure
          struct.call_free
        end
      else
        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.nruby/forwardable/impl.rb000064400000000636150403134240011304 0ustar00if( 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

    def +(delta)
      Pointer.new(to_i + delta, @size - delta)
    end

    def -(delta)
      Pointer.new(to_i - delta, @size + delta)
    end
  end

  # A pointer to a C union
  class CUnionEnruby/fiddle.rb000064400000005610150403134240007277 0ustar00 def set_ctypes(types)
      @ctypes = types
      @offset = Array.new(types.length, 0)
      @size   = self.class.size types
    end
  end
end
ruby/optparse/version.rb000064400000004216150403134240011373 0ustar00# frozen_string_literal: false
# OptionParser internal utility

class << OptionParser
  #
  # Shows version string in packages if Version is defined.
  #
  # +pkgs+:: package list
  #
  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

  # :stopdoc:

  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.gems/gems/psych-5.0.1/lib/psych000075500000000000150403134240012023 0ustar00gems/gems/bigdecimal-3.1.3/lib/bigdecimal000075500000000000150403134240013710 0ustar00ruby/ipaddr.rb000064400000051143150403134240007315 0ustar00   op, cl = *(type == :key ? %w"[ ]" : ["", ""])
        define("--#{name}=#{op}#{name.upcase}#{cl}", *params[name]) do |o|
          options[name] = o
        end
      end
    end
    options
  end
end
ruby/optparse/uri.rb000064400000000217150403134240010502 0ustar00# frozen_string_literal: false
# -*- ruby -*-

require_relative '../optparse'
require 'uri'

OptionParser.accept(URI) {|s,| URI.parse(s) if s}
ruby/optparse/shellwords.rb000064400000000244150403134240012071 0ustar00# frozen_string_literal: false
# -*- ruby -*-

require 'shellwords'
require_relative '../optparse'

OptionParser.accept(Shellwords) {|s,| Shellwords.shellwords(s)}
ruby/optparse/date.rb000064400000000560150403134240010621 0ustar00# frozen_string_literal: false
require_relative '../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
ruby/optparse/time.rb000064400000000347150403134240010645 0ustar00# frozen_string_literal: false
require_relative '../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
ruby/optparse/ac.rb000064400000003762150403134240010276 0ustar00# frozen_string_literal: false
require_relative '../optparse'

#
# autoconf-like options.
#
class OptionParser::AC < OptionParser
  # :stopdoc:
  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}
  private_constant :ARG_CONV

  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

  # :startdoc:

  public

  # Define <tt>--enable</tt> / <tt>--disable</tt> style option
  #
  # Appears as <tt>--enable-<i>name</i></tt> in help message.
  def ac_arg_enable(name, help_string, &block)
    _ac_arg_enable("enable", name, help_string, block)
  end

  # Define <tt>--enable</tt> / <tt>--disable</tt> style option
  #
  # Appears as <tt>--disable-<i>name</i></tt> in help message.
  def ac_arg_disable(name, help_string, &block)
    _ac_arg_enable("disable", name, help_string, block)
  end

  # Define <tt>--with</tt> / <tt>--without</tt> style option
  #
  # Appears as <tt>--with-<i>name</i></tt> in help message.
  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
ruby/pathname.rb000064400000042314150403134240007647 0ustar00# frozen_string_literal: true
#
# = pathname.rb
#
# Object-Oriented Pathname Class
#
# Author:: Tanaka Akira <akr@m17n.org>
# Documentation:: Author and Gavin Sinclair
#
# For documentation, see class Pathname.
#

require 'pathname.so'

class Pathname

  VERSION = "0.4.0"

  # :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 <code>self + '..'</code>.
  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 <tt>/usr/..</tt>.
  #
  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:/>
  #     #<Pathname:/path>
  #     #<Pathname:/path/to>
  #     #<Pathname:/path/to/some>
  #     #<Pathname:/path/to/some/file.rb>
  #
  #  Pathname.new('path/to/some/file.rb').descend {|v| p v}
  #     #<Pathname:path>
  #     #<Pathname:path/to>
  #     #<Pathname:path/to/some>
  #     #<Pathname:path/to/some/file.rb>
  #
  # 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:/path/to/some/file.rb>
  #     #<Pathname:/path/to/some>
  #     #<Pathname:/path/to>
  #     #<Pathname:/path>
  #     #<Pathname:/>
  #
  #  Pathname.new('path/to/some/file.rb').ascend {|v| p v}
  #     #<Pathname:path/to/some/file.rb>
  #     #<Pathname:path/to/some>
  #     #<Pathname:path/to>
  #     #<Pathname:path>
  #
  # 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.
  # Since +other+ is considered as a path relative to +self+, if +other+ is
  # an absolute path, the new Pathname object is created from just +other+.
  #
  #   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.
  # This is effectively the same as using Pathname#+ to append +self+ and
  # all arguments sequentially.
  #
  #   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/share>
  #   #   #<Pathname:/usr/local/bin>
  #   #   #<Pathname:/usr/local/games>
  #   #   #<Pathname:/usr/local/lib>
  #   #   #<Pathname:/usr/local/include>
  #   #   #<Pathname:/usr/local/sbin>
  #   #   #<Pathname:/usr/local/src>
  ruby/pstore.rb000064400000051023150403134240007363 0ustar00 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.delete_prefix('./')) }
    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(mode: nil)
    require 'fileutils'
    FileUtils.mkpath(@path, mode: mode)
    self
  end

  # Recursively deletes a directory, including all directories beneath it.
  #
  # See FileUtils.rm_rf
  def rmtree(noop: nil, verbose: nil, secure: nil)
    # The name "rmtree" is borrowed from File::Path of Perl.
    # File::Path provides "mkpath" and "rmtree".
    require 'fileutils'
    FileUtils.rm_rf(@path, noop: noop, verbose: verbose, secure: secure)
    self
  end
end

class Pathname    # * tmpdir *
  # Creates a tmp directory and wraps the returned path in a Pathname object.
  #
  # See Dir.mktmpdir
  def self.mktmpdir
    require 'tmpdir' unless defined?(Dir.mktmpdir)
    if block_given?
      Dir.mktmpdir do |dir|
        dir = self.new(dir)
        yield dir
      end
    else
      self.new(Dir.mktmpdir)
    end
  end
end
ruby/forwardable/impl.rb000064400000000636150403134240011304 0ustar00# :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
ruby/fiddle.rb000064400000007260150403134240007302 0ustar00# frozen_string_literal: true

if RUBY_ENGINE == 'ruby'
  require 'fiddle.so'
else
  require 'fiddle/ffi_backend'
end
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
      if RUBY_ENGINE == 'jruby'
        errno = FFI.errno
        errno == 0 ? nil : errno
      else
        Thread.current[:__FIDDLE_WIN32_LAST_ERROR__]
      end
    end

    # Sets the last win32 +Error+ of the current executing +Thread+ to +error+
    def self.win32_last_error= error
      if RUBY_ENGINE == 'jruby'
        FFI.errno = error || 0
      else
        Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] = error
      end
    end

    # Returns the last win32 socket +Error+ of the current executing
    # +Thread+ or nil if none
    def self.win32_last_socket_error
      if RUBY_ENGINE == 'jruby'
        errno = FFI.errno
        errno == 0 ? nil : errno
      else
        Thread.current[:__FIDDLE_WIN32_LAST_SOCKET_ERROR__]
      end
    end

    # Sets the last win32 socket +Error+ of the current executing
    # +Thread+ to +error+
    def self.win32_last_socket_error= error
      if RUBY_ENGINE == 'jruby'
        FFI.errno = error || 0
      else
        Thread.current[:__FIDDLE_WIN32_LAST_SOCKET_ERROR__] = error
      end
    end
  end

  # Returns the last +Error+ of the current executing +Thread+ or nil if none
  def self.last_error
    if RUBY_ENGINE == 'jruby'
      errno = FFI.errno
      errno == 0 ? nil : errno
    else
      Thread.current[:__FIDDLE_LAST_ERROR__]
    end
  end

  # Sets the last +Error+ of the current executing +Thread+ to +error+
  def self.last_error= error
    if RUBY_ENGINE == 'jruby'
      FFI.errno = error || 0
    else
      Thread.current[:__DL2_LAST_ERROR__] = error
      Thread.current[:__FIDDLE_LAST_ERROR__] = error
    end
  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 <code>man 3 dlopen</code> 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
    begin
      Fiddle::Handle.new(library)
    rescue DLError => error
      case RUBY_PLATFORM
      when /linux/
        case error.message
        when /\A(\/.+?): (?:invalid ELF header|file too short)/
          # This may be a linker script:
          # https://sourceware.org/binutils/docs/ld.html#Scripts
          path = $1
        else
          raise
        end
      else
        raise
      end

      File.open(path) do |input|
        input.each_line do |line|
          case line
          when /\A\s*(?:INPUT|GROUP)\s*\(\s*([^\s,\)]+)/
            # TODO: Should we support multiple files?
            first_input = $1
            if first_input.start_with?("-l")
              first_input = "lib#{first_input[2..-1]}.so"
            end
            return dlopen(first_input)
          end
        end
      end

      # Not found
      raise
    end
  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:

  Fiddle::Types.constants.each do |type|
    const_set "TYPE_#{type}", Fiddle::Types.const_get(type)
  end
end
gems/gems/psych-5.0.1/lib/psych000075500000000000150403134240012023 0ustar00gems/gems/bigdecimal-3.1.3/lib/bigdecimal000075500000000000150403134240013710 0ustar00ruby/ipaddr.rb000064400000054631150403134240007322 0ustar00# frozen_string_literal: true
#
# ipaddr.rb - A class to manipulate an IP address
#
# Copyright (c) 2002 Hajimu UMEMOTO <ume@mahoroba.org>.
# Copyright (c) 2007, 2009, 2012 Akinori MUSHA <knu@iDaemons.org>.
# All rights reserved.
#
# You can redistribute and/or modify it under the same terms as Ruby.
#
# $Id$
#
# Contact:
#   - Akinori MUSHA <knu@iDaemons.org> (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                   #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff>
#
#   p ipaddr1.to_s              #=> "3ffe:505:2::1"
#
#   ipaddr2 = ipaddr1.mask(48)  #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000>
#
#   p ipaddr2.to_s              #=> "3ffe:505:2::"
#
#   ipaddr3 = IPAddr.new "192.168.2.0/24"
#
#   p ipaddr3                   #=> #<IPAddr: IPv4:192.168.2.0/255.255.255.0>

class IPAddr
  VERSION = "1.2.7"

  # 32 bit mask for IPv4
  IN4MASK = 0xffffffff
  # 128 bit mask for IPv6
  IN6MASK = 0xffffffffffffffffffffffffffffffff
  # Format string for IPv6
  IN6FORMAT = (["%.4x"] * 8).join(':').freeze

  # 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.
  # It expects the string to be encoded in Encoding::ASCII_8BIT (BINARY).
  def self.ntop(addr)
    if addr.is_a?(String) && addr.encoding != Encoding::BINARY
      raise InvalidAddressError, "invalid encoding (given #{addr.encoding}, expected BINARY)"
    end

    case addr.bytesize
    when 4
      addr.unpack('C4').join('.')
    when 16
      IN6FORMAT % addr.unpack('n8')
    else
      raise AddressFamilyError, "unsupported address family"
    end
  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")
  #   net4 = IPAddr.new("192.168.2.0/16")
  #   p net1.include?(net2)     #=> true
  #   p net1.include?(net3)     #=> false
  #   p net1.include?(net4)     #=> false
  #   p net4.include?(net1)     #=> true
  def include?(other)
    other = coerce_other(other)
    return false unless other.family == family
    begin_addr <= other.begin_addr && end_addr >= other.end_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
    str = _to_string(@addr)

    if @family == Socket::AF_INET6
      str << zone_id.to_s
    end

    return str
  end

  # Returns a string containing the IP address representation with prefix.
  def as_json(*)
    if ipv4? && prefix == 32
      to_s
    elsif ipv6? && prefix == 128
      to_s
    else
      cidr
    end
  end

  # Returns a json string containing the IP address representation.
  def to_json(*a)
    %Q{"#{as_json(*a)}"}
  end

  # Returns a string containing the IP address representation in
  # cidr notation
  def cidr
    "#{to_s}/#{prefix}"
  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.
  # Loopback IPv4 addresses in the IPv4-mapped IPv6
  # address range are also considered as loopback addresses.
  def loopback?
    case @family
    when Socket::AF_INET
      @addr & 0xff000000 == 0x7f000000 # 127.0.0.1/8
    when Socket::AF_INET6
      @addr == 1 || # ::1
        (@addr & 0xffff_0000_0000 == 0xffff_0000_0000 && (
          @addr & 0xff000000 == 0x7f000000 # ::ffff:127.0.0.1/8
        ))
    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. Private IPv4 addresses in the
  # IPv4-mapped IPv6 address range are also 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 ||
        (@addr & 0xffff_0000_0000 == 0xffff_0000_0000 && (
          @addr & 0xff000000 == 0x0a000000 ||  # ::ffff:10.0.0.0/8
          @addr & 0xfff00000 == 0xac100000 ||  # ::ffff::172.16.0.0/12
          @addr & 0xffff0000 == 0xc0a80000     # ::ffff::192.168.0.0/16
        ))
    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. Link-local IPv4 addresses in the
  # IPv4-mapped IPv6 address range are also 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 || # fe80::/10
        (@addr & 0xffff_0000_0000 == 0xffff_0000_0000 && (
          @addr & 0xffff0000 == 0xa9fe0000 # ::ffff:169.254.0.0/16
        ))
    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: #{@addr}"
    end
    clone = self.clone.set(@addr | 0xffff00000000, Socket::AF_INET6)
    clone.instance_varuby/net/protocol.rb000064400000026772150403134240010513 0ustar00 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: #{@addr}"
    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: #{@addr}"
    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, @zone_id].hash << 1) | (ipv4? ? 0 : 1)
  end

  # Creates a Range object for the network address.
  def to_range
    self.class.new(begin_addr, @family)..self.class.new(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. ("#<IPAddr: family:address/mask>")
  def inspect
    case @family
    when Socket::AF_INET
      af = "IPv4"
    when Socket::AF_INET6
      af = "IPv6"
      zone_id = @zone_id.to_s
    else
      raise AddressFamilyError, "unsupported address family"
    end
    return sprintf("#<%s: %s:%s%s/%s>", self.class.name,
                   af, _to_string(@addr), zone_id, _to_string(@mask_addr))
  end

  # Returns the netmask in string format e.g. 255.255.0.0
  def netmask
    _to_string(@mask_addr)
  end

  # Returns the wildcard mask in string format e.g. 0.0.255.255
  def wildcard_mask
    case @family
    when Socket::AF_INET
      mask = IN4MASK ^ @mask_addr
    when Socket::AF_INET6
      mask = IN6MASK ^ @mask_addr
    else
      raise AddressFamilyError, "unsupported address family"
    end

    _to_string(mask)
  end

  # Returns the IPv6 zone identifier, if present.
  # Raises InvalidAddressError if not an IPv6 address.
  def zone_id
    if @family == Socket::AF_INET6
      @zone_id
    else
      raise InvalidAddressError, "not an IPv6 address"
    end
  end

  # Returns the IPv6 zone identifier, if present.
  # Raises InvalidAddressError if not an IPv6 address.
  def zone_id=(zid)
    if @family == Socket::AF_INET6
      case zid
      when nil, /\A%(\w+)\z/
        @zone_id = zid
      else
        raise InvalidAddressError, "invalid zone identifier for address"
      end
    else
      raise InvalidAddressError, "not an IPv6 address"
    end
  end

  protected

  def begin_addr
    @addr & @mask_addr
  end

  def end_addr
    case @family
    when Socket::AF_INET
      @addr | (IN4MASK ^ @mask_addr)
    when Socket::AF_INET6
      @addr | (IN6MASK ^ @mask_addr)
    else
      raise AddressFamilyError, "unsupported address family"
    end
  end

  # 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: #{addr}"
      end
    when Socket::AF_INET6
      if addr < 0 || addr > IN6MASK
        raise InvalidAddressError, "invalid address: #{addr}"
      end
    else
      raise AddressFamilyError, "unsupported address family"
    end
    @addr = addr
    if family[0]
      @family = family[0]
      if @family == Socket::AF_INET
        @mask_addr &= IN4MASK
      end
    end
    return self
  end

  # Set current netmask to given mask.
  def mask!(mask)
    case mask
    when String
      case mask
      when /\A(0|[1-9]+\d*)\z/
        prefixlen = mask.to_i
      when /\A\d+\z/
        raise InvalidPrefixError, "leading zeros in prefix"
      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)
    @mask_addr = nil
    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('/', 2)
    if prefix =~ /\A\[(.*)\]\z/i
      prefix = $1
      family = Socket::AF_INET6
    end
    if prefix =~ /\A(.*)(%\w+)\z/
      prefix = $1
      zone_id = $2
      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
    @zone_id = zone_id
    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
  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
      RE_IPV4ADDRLIKE.match?(addr) or return nil
      octets = addr.split('.')
    end
    octets.inject(0) { |i, s|
      (n = s.to_i) < 256 or raise InvalidAddressError, "invalid address: #{@addr}"
      (s != '0') && s.start_with?('0') and raise InvalidAddressError, "zero-filled number in IPv4 address is ambiguous: #{@addr}"
      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}"
        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: #{@addr}"
        left = $1
        right = $2
        addr = 0
      end
    else
      raise InvalidAddressError, "invalid address: #{@addr}"
    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.freeze
  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
ruby/net/https.rb000064400000001023150403134240007772 0ustar00# 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 by name (keys).
# An object hierarchy may be just a single object.
# User code may later read values back from truby/net/http.rb000064400000245707150403134240007632 0ustar00 can get a new (and populated) store by calling thus:
#
#   example_store do |store|
#     # Example code using store goes here.
#   end
#
# All we really need to know about +example_store+
# is that it yields a fresh store with a known population of entries;
# its implementation:
#
#   require 'pstore'
#   require 'tempfile'
#   # Yield a pristine store for use in examples.
#   def example_store
#     # Create the store in a temporary file.
#     Tempfile.create do |file|
#       store = PStore.new(file)
#       # Populate the store.
#       store.transaction do
#         store[:foo] = 0
#         store[:bar] = 1
#         store[:baz] = 2
#       end
#       yield store
#     end
#   end
#
# == The Store
#
# The contents of the store are maintained in a file whose path is specified
# when the store is created (see PStore.new).
# The objects are stored and retrieved using
# module Marshal, which means that certain objects cannot be added to the store;
# see {Marshal::dump}[rdoc-ref:Marshal.dump].
#
# == Entries
#
# A store may have any number of entries.
# Each entry has a key and a value, just as in a hash:
#
# - Key: as in a hash, the key can be (almost) any object;
#   see {Hash Keys}[rdoc-ref:Hash@Hash+Keys].
#   You may find it convenient to keep it simple by using only
#   symbols or strings as keys.
# - Value: the value may be any object that can be marshalled by \Marshal
#   (see {Marshal::dump}[rdoc-ref:Marshal.dump])
#   and in fact may be a collection
#   (e.g., an array, a hash, a set, a range, etc).
#   That collection may in turn contain nested objects,
#   including collections, to any depth;
#   those objects must also be \Marshal-able.
#   See {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
#
# == Transactions
#
# === The Transaction Block
#
# The block given with a call to method #transaction#
# contains a _transaction_,
# which consists of calls to \PStore methods that
# read from or write to the store
# (that is, all \PStore methods except #transaction itself,
# #path, and Pstore.new):
#
#   example_store do |store|
#     store.transaction do
#       store.keys # => [:foo, :bar, :baz]
#       store[:bat] = 3
#       store.keys # => [:foo, :bar, :baz, :bat]
#     end
#   end
#
# Execution of the transaction is deferred until the block exits,
# and is executed _atomically_ (all-or-nothing):
# either all transaction calls are executed, or none are.
# This maintains the integrity of the store.
#
# Other code in the block (including even calls to #path and PStore.new)
# is executed immediately, not deferred.
#
# The transaction block:
#
# - May not contain a nested call to #transaction.
# - Is the only context where methods that read from or write to
#   the store are allowed.
#
# As seen above, changes in a transaction are made automatically
# when the block exits.
# The block may be exited early by calling method #commit or #abort.
#
# - Method #commit triggers the update to the store and exits the block:
#
#     example_store do |store|
#       store.transaction do
#         store.keys # => [:foo, :bar, :baz]
#         store[:bat] = 3
#         store.commit
#         fail 'Cannot get here'
#       end
#       store.transaction do
#         # Update was completed.
#         store.keys # => [:foo, :bar, :baz, :bat]
#       end
#     end
#
# - Method #abort discards the update to the store and exits the block:
#
#     example_store do |store|
#       store.transaction do
#         store.keys # => [:foo, :bar, :baz]
#         store[:bat] = 3
#         store.abort
#         fail 'Cannot get here'
#       end
#       store.transaction do
#         # Update was not completed.
#         store.keys # => [:foo, :bar, :baz]
#       end
#     end
#
# === Read-Only Transactions
#
# By default, a transaction allows both reading from and writing to
# the store:
#
#   store.transaction do
#     # Read-write transaction.
#     # Any code except a call to #transaction is allowed here.
#   end
#
# If argument +read_only+ is passed as +true+,
# only reading is allowed:
#
#   store.transaction(true) do
#     # Read-only transaction:
#     # Calls to #transaction, #[]=, and #delete are not allowed here.
#   end
#
# == Hierarchical Values
#
# The value for an entry may be a simple object (as seen above).
# It may also be a hierarchy of objects nested to any depth:
#
#   deep_store = PStore.new('deep.store')
#   deep_store.transaction do
#     array_of_hashes = [{}, {}, {}]
#     deep_store[:array_of_hashes] = array_of_hashes
#     deep_store[:array_of_hashes] # => [{}, {}, {}]
#     hash_of_arrays = {foo: [], bar: [], baz: []}
#     deep_store[:hash_of_arrays] = hash_of_arrays
#     deep_store[:hash_of_arrays]  # => {:foo=>[], :bar=>[], :baz=>[]}
#     deep_store[:hash_of_arrays][:foo].push(:bat)
#     deep_store[:hash_of_arrays]  # => {:foo=>[:bat], :bar=>[], :baz=>[]}
#   end
#
# And recall that you can use
# {dig methods}[rdoc-ref:dig_methods.rdoc]
# in a returned hierarchy of objects.
#
# == Working with the Store
#
# === Creating a Store
#
# Use method PStore.new to create a store.
# The new store creates or opens its containing file:
#
#   store = PStore.new('t.store')
#
# === Modifying the Store
#
# Use method #[]= to update or create an entry:
#
#   example_store do |store|
#     store.transaction do
#       store[:foo] = 1 # Update.
#       store[:bam] = 1 # Create.
#     end
#   end
#
# Use method #delete to remove an entry:
#
#   example_store do |store|
#     store.transaction do
#       store.delete(:foo)
#       store[:foo] # => nil
#     end
#   end
#
# === Retrieving Values
#
# Use method #fetch (allows default) or #[] (defaults to +nil+)
# to retrieve an entry:
#
#   example_store do |store|
#     store.transaction do
#       store[:foo]             # => 0
#       store[:nope]            # => nil
#       store.fetch(:baz)       # => 2
#       store.fetch(:nope, nil) # => nil
#       store.fetch(:nope)      # Raises exception.
#     end
#   end
#
# === Querying the Store
#
# Use method #key? to determine whether a given key exists:
#
#   example_store do |store|
#     store.transaction do
#       store.key?(:foo) # => true
#     end
#   end
#
# Use method #keys to retrieve keys:
#
#   example_store do |store|
#     store.transaction do
#       store.keys # => [:foo, :bar, :baz]
#     end
#   end
#
# Use method #path to retrieve the path to the store's underlying file;
# this method may be called from outside a transaction block:
#
#   store = PStore.new('t.store')
#   store.path # => "t.store"
#
# == Transaction Safety
#
# For transaction safety, see:
#
# - Optional argument +thread_safe+ at method PStore.new.
# - Attribute #ultra_safe.
#
# Needless to say, if you're storing valuable data with \PStore, then you should
# backup the \PStore file from time to time.
#
# == An Example Store
#
#  require "pstore"
#
#  # A mock wiki object.
#  class WikiPage
#
#    attr_reader :page_name
#
#    def initialize(page_name, author, contents)
#      @page_name = page_name
#      @revisions = Array.new
#      add_revision(author, contents)
#    end
#
#    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 wiki page.
#  home_page = WikiPage.new("HomePage", "James Edward Gray II",
#                           "A page about the JoysOfDocumentation..." )
#
#  wiki = PStore.new("wiki_pages.pstore")
#  # Update page data and the index together, or not at all.
#  wiki.transaction do
#    # Store page.
#    wiki[home_page.page_name] = home_page
#    # Create page index.
#    wiki[:wiki_index] ||= Array.new
#    # Update wiki index.
#    wiki[:wiki_index].push(*home_page.wiki_page_references)
#  end
#
#  # Read wiki data, setting argument read_only to true.
#  wiki.transaction(true) do
#    wiki.keys.each do |key|
#      puts key
#      puts wiki[key]
#    end
#  end
#
class PStore
  VERSION = "0.1.4"

  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 an unlikely error (such as memory-error or filesystem error) occurs:
  #
  # - +true+: changes are posted by creating a temporary file,
  #   writing the updated data to it, then renaming the file to the given #path.
  #   File integrity is maintained.
  #   Note: has effect only if the filesystem has atomic file rename
  #   (as do POSIX platforms Linux, MacOS, FreeBSD and others).
  #
  # - +false+ (the default): changes are posted by rewinding the open file
  #   and writing the updated data.
  #   File integrity is maintained if the filesystem raises
  #   no unexpected I/O error;
  #   if such an error occurs during a write to the store,
  #   the file may become corrupted.
  #
  attr_accessor :ultra_safe

  # Returns a new \PStore object.
  #
  # Argument +file+ is the path to the file in which objects are to be stored;
  # if the file exists, it should be one that was written by \PStore.
  #
  #   path = 't.store'
  #   store = PStore.new(path)
  #
  # A \PStore object is
  # {reentrant}[https://en.wikipedia.org/wiki/Reentrancy_(computing)].
  # If argument +thread_safe+ is given as +true+,
  # the object is also thread-safe (at the cost of a small performance penalty):
  #
  #   store = PStore.new(path, true)
  #
  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

  # Returns the value for the given +key+ if the key exists.
  # +nil+ otherwise;
  # if not +nil+, the returned value is an object or a hierarchy of objects:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store[:foo]  # => 0
  #       store[:nope] # => nil
  #     end
  #   end
  #
  # Returns +nil+ if there is no such key.
  #
  # See also {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
  #
  # Raises an exception if called outside a transaction block.
  def [](key)
    in_transaction
    @table[key]
  end

  # Like #[], except that it accepts a default value for the store.
  # If the +key+ does not exist:
  #
  # - Raises an exception if +default+ is +PStore::Error+.
  # - Returns the value of +default+ otherwise:
  #
  #     example_store do |store|
  #       store.transaction do
  #         store.fetch(:nope, nil) # => nil
  #         store.fetch(:nope)      # Raises an exception.
  #       end
  #     end
  #
  # Raises an exception if called outside a transaction block.
  def fetch(key, default=PStore::Error)
    in_transaction
    unless @table.key? key
      if default == PStore::Error
        raise PStore::Error, format("undefined key '%s'", key)
      else
        return default
      end
    end
    @table[key]
  end

  # Creates or replaces the value for the given +key+:
  #
  #   example_store do |store|
  #     temp.transaction do
  #       temp[:bat] = 3
  #     end
  #   end
  #
  # See also {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
  #
  # Raises an exception if called outside a transaction block.
  def []=(key, value)
    in_transaction_wr
    @table[key] = value
  end

  # Removes and returns the value at +key+ if it exists:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store[:bat] = 3
  #       store.delete(:bat)
  #     end
  #   end
  #
  # Returns +nil+ if there is no such key.
  #
  # Raises an exception if called outside a transaction block.
  def delete(key)
    in_transaction_wr
    @table.delete key
  end

  # Returns an array of the existing keys:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store.keys # => [:foo, :bar, :baz]
  #     end
  #   end
  #
  # Raises an exception if called outside a transaction block.
  def keys
    in_transaction
    @table.keys
  end
  alias roots keys

  # Returns +true+ if +key+ exists, +false+ otherwise:
  #
  #   example_store do |store|
  #     store.transaction do
  #       store.key?(:foo) # => true
  #     end
  #   end
  #
  # Raises an exception if called outside a transaction block.
  def key?(key)
    in_transaction
    @table.key? key
  end
  alias root? key?

  # Returns the string file path used to create the store:
  #
  #   store.path # => "flat.store"
  #
  def path
    @filename
  end

  # Exits the current transaction block, committing any changes
  # specified in the
  # {transaction block}[rdoc-ref:PStore@The+Transaction+Block].
  #
  # Raises an exception if called outside a transaction block.
  def commit
    in_transaction
    @abort = false
    throw :pstore_abort_transaction
  end

  # Exits the current transaction block, discarding any changes
  # specified in the
  # {transaction block}[rdoc-ref:PStore@The+Transaction+Block].
  #
  # Raises an exception if called outside a transaction block.
  def abort
    in_transaction
    @abort = true
    throw :pstore_abort_transaction
  end

  # Opens a transaction block for the store.
  # See {Transactions}[rdoc-ref:PStore@Transactions].
  #
  # With argument +read_only+ as +false+, the block may both read from
  # and write to the store.
  #
  # With argument +read_only+ as +true+, the block may not include calls
  # to #transaction, #[]=, or #delete.
  #
  # Raises an exception if called within a transaction block.
  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
ruby/net/protocol.rb000064400000026772150403134240010513 0ustar00# 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 <aamine@loveruby.net>
#
# 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.2.2"

    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
      @rbuf_empty = true
      @rbuf_offset = 0
    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
          if s = rbuf_consume_all
            read_bytes += s.bytesize
            dest << s
          end
          rbuf_fill
        end
        s = rbuf_consume(len - read_bytes)
        read_bytes += s.bytesize
        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
          if s = rbuf_consume_all
            read_bytes += s.bytesize
            dest << s
          end
          rbuf_fill
        end
      rescue EOFError
        ;
      end
      LOG "read #{read_bytes} bytes"
      dest
    end

    def readuntil(terminator, ignore_eof = false)
      offset = @rbuf_offset
      begin
        until idx = @rbuf.index(terminator, offset)
          offset = @rbuf.bytesize
          rbuf_fill
        end
        return rbuf_consume(idx + terminator.bytesize - @rbuf_offset)
      rescue EOFError
        raise unless ignore_eof
        return rbuf_consume
      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
        @rbuf_empty = false
        if rv.equal?(tmp)
          @rbuf_offset = 0
        else
          @rbuf << rv
          rv.clear
        end
        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_flush
      if @rbuf_empty
        @rbuf.clear
        @rbuf_offset = 0
      end
      nil
    end

    def rbuf_size
      @rbuf.bytesize - @rbuf_offset
    end

    def rbuf_consume_all
      rbuf_consume if rbuf_size > 0
    end

    def rbuf_consume(len = nil)
      if @rbuf_offset == 0 && (len.nil? || len == @rbuf.bytesize)
        s = @rbuf
        @rbuf = ''.b
        @rbuf_offset = 0
        @rbuf_empty = true
      elsif len.nil?
        s = @rbuf.byteslice(@rbuf_offset..-1)
        @rbuf = ''.b
        @rbuf_offset = 0
        @rbuf_empty = true
      else
        s = @rbuf.byteslice(@rbuf_offset, len)
        @rbuf_offset += len
        @rbuf_empty = @rbuf_offset == @rbuf.bytesize
        rbuf_flush
      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.method(: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(writer)
      @writer = writer
    end

    def inspect
      "#<#{self.class} writer=#{@writer.inspect}>"
    end

    def write(str)
      @writer.call(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
ruby/net/https.rb000064400000001023150403134240007772 0ustar00# frozen_string_literal: true
=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 <gotoyuzo@notwork.org>
  All rights reserved.

== Licence
  This program is licensed under the same licence as Ruby.
  (See the file 'LICENCE'.)

=end

require_relative 'http'
require 'openssl'
ruby/net/http.rb000064400000253071150403134240007623 0ustar00# frozen_string_literal: true
#
# = net/http.rb
#
# Copyright (c) 1999-2007 Yukihiro Matsumoto
# Copyright (c) 1999-2007 Minero Aoki
# Copyright (c) 2001 GOTOU Yuuzou
#
# Written and maintained by Minero Aoki <aamine@loveruby.net>.
# HTTPS support added by GOTOU Yuuzou <gotoyuzo@notwork.org>.
#
# 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'
require 'resolv'
autoload :OpenSSL, 'openssl'

module Net   #:nodoc:

  # :stopdoc:
  class HTTPBadResponse < StandardError; end
  class HTTPHeaderSyntaxError < StandardError; end
  # :startdoc:

  # \Class \Net::HTTP provides a rich library that implements the client
  # in a client-server model that uses the \HTTP request-response protocol.
  # For information about \HTTP, see:
  #
  # - {Hypertext Transfer Protocol}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol].
  # - {Technical overview}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Technical_overview].
  #
  # == About the Examples
  #
  # :include: doc/net-http/examples.rdoc
  #
  # == Strategies
  #
  # - If you will make only a few GET requests,
  #   consider using {OpenURI}[rdoc-ref:OpenURI].
  # - If you will make only a few requests of all kinds,
  #   consider using the various singleton convenience methods in this class.
  #   Each of the following methods automatically starts and finishes
  #   a {session}[rdoc-ref:Net::HTTP@Sessions] that sends a single request:
  #
  #     # Return string response body.
  #     Net::HTTP.get(hostname, path)
  #     Net::HTTP.get(uri)
  #
  #     # Write string response body to $stdout.
  #     Net::HTTP.get_print(hostname, path)
  #     Net::HTTP.get_print(uri)
  #
  #     # Return response as Net::HTTPResponse object.
  #     Net::HTTP.get_response(hostname, path)
  #     Net::HTTP.get_response(uri)
  #     data = '{"title": "foo", "body": "bar", "userId": 1}'
  #     Net::HTTP.post(uri, data)
  #     params = {title: 'foo', body: 'bar', userId: 1}
  #     Net::HTTP.post_form(uri, params)
  #     data = '{"title": "foo", "body": "bar", "userId": 1}'
  #     Net::HTTP.put(uri, data)
  #
  # - If performance is important, consider using sessions, which lower request overhead.
  #   This {session}[rdoc-ref:Net::HTTP@Sessions] has multiple requests for
  #   {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]
  #   and {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
  #
  #     Net::HTTP.start(hostname) do |http|
  #       # Session started automatically before block execution.
  #       http.get(path)
  #       http.head(path)
  #       body = 'Some text'
  #       http.post(path, body)  # Can also have a block.
  #       http.put(path, body)
  #       http.delete(path)
  #       http.options(path)
  #       http.trace(path)
  #       http.patch(path, body) # Can also have a block.
  #       http.copy(path)
  #       http.lock(path, body)
  #       http.mkcol(path, body)
  #       http.move(path)
  #       http.propfind(path, body)
  #       http.proppatch(path, body)
  #       http.unlock(path, body)
  #       # Session finished automatically at block exit.
  #     end
  #
  # The methods cited above are convenience methods that, via their few arguments,
  # allow minimal control over the requests.
  # For greater control, consider using {request objects}[rdoc-ref:Net::HTTPRequest].
  #
  # == URIs
  #
  # On the internet, a URI
  # ({Universal Resource Identifier}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier])
  # is a string that identifies a particular resource.
  # It consists of some or all of: scheme, hostname, path, query, and fragment;
  # see {URI syntax}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax].
  #
  # A Ruby {URI::Generic}[rdoc-ref:URI::Generic] object
  # represents an internet URI.
  # It provides, among others, methods
  # +scheme+, +hostname+, +path+, +query+, and +fragment+.
  #
  # === Schemes
  #
  # An internet \URI has
  # a {scheme}[https://en.wikipedia.org/wiki/List_of_URI_schemes].
  #
  # The two schemes supported in \Net::HTTP are <tt>'https'</tt> and <tt>'http'</tt>:
  #
  #   uri.scheme                       # => "https"
  #   URI('http://example.com').scheme # => "http"
  #
  # === Hostnames
  #
  # A hostname identifies a server (host) to which requests may be sent:
  #
  #   hostname = uri.hostname # => "jsonplaceholder.typicode.com"
  #   Net::HTTP.start(hostname) do |http|
  #     # Some HTTP stuff.
  #   end
  #
  # === Paths
  #
  # A host-specific path identifies a resource on the host:
  #
  #   _uri = uri.dup
  #   _uri.path = '/todos/1'
  #   hostname = _uri.hostname
  #   path = _uri.path
  #   Net::HTTP.get(hostname, path)
  #
  # === Queries
  #
  # A host-specific query adds name/value pairs to the URI:
  #
  #   _uri = uri.dup
  #   params = {userId: 1, completed: false}
  #   _uri.query = URI.encode_www_form(params)
  #   _uri # => #<URI::HTTPS https://jsonplaceholder.typicode.com?userId=1&completed=false>
  #   Net::HTTP.get(_uri)
  #
  # === Fragments
  #
  # A {URI fragment}[https://en.wikipedia.org/wiki/URI_fragment] has no effect
  # in \Net::HTTP;
  # the same data is returned, regardless of whether a fragment is included.
  #
  # == Request Headers
  #
  # Request headers may be used to pass additional information to the host,
  # similar to arguments passed in a method call;
  # each header is a name/value pair.
  #
  # Each of the \Net::HTTP methods that sends a request to the host
  # has optional argument +headers+,
  # where the headers are expressed as a hash of field-name/value pairs:
  #
  #   headers = {Accept: 'application/json', Connection: 'Keep-Alive'}
  #   Net::HTTP.get(uri, headers)
  #
  # See lists of both standard request fields and common request fields at
  # {Request Fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
  # A host may also accept other custom fields.
  #
  # == \HTTP Sessions
  #
  # A _session_ is a connection between a server (host) and a client that:
  #
  # - Is begun by instance method Net::HTTP#start.
  # - May contain any number of requests.
  # - Is ended by instance method Net::HTTP#finish.
  #
  # See example sessions at {Strategies}[rdoc-ref:Net::HTTP@Strategies].
  #
  # === Session Using \Net::HTTP.start
  #
  # If you have many requests to make to a single host (and port),
  # consider using singleton method Net::HTTP.start with a block;
  # the method handles the session automatically by:
  #
  # - Calling #start before block execution.
  # - Executing the block.
  # - Calling #finish after block execution.
  #
  # In the block, you can use these instance methods,
  # each of which that sends a single request:
  #
  # - {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]:
  #
  #   - #get, #request_get: GET.
  #   - #head, #request_head: HEAD.
  #   - #post, #request_post: POST.
  #   - #delete: DELETE.
  #   - #options: OPTIONS.
  #   - #trace: TRACE.
  #   - #patch: PATCH.
  #
  # - {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
  #
  #   - #copy: COPY.
  #   - #lock: LOCK.
  #   - #mkcol: MKCOL.
  #   - #move: MOVE.
  #   - #propfind: PROPFIND.
  #   - #proppatch: PROPPATCH.
  #   - #unlock: UNLOCK.
  #
  # === Session Using \Net::HTTP.start and \Net::HTTP.finish
  #
  # You can manage a session manually using methods #start and #finish:
  #
  #   http = Net::HTTP.new(hostname)
  #   http.start
  #   http.get('/todos/1')
  #   http.get('/todos/2')
  #   http.delete('/posts/1')
  #   http.finish # Needed to free resources.
  #
  # === Single-Request Session
  #
  # Certain convenience methods automatically handle a session by:
  #
  # - Creating an \HTTP object
  # - Starting a session.
  # - Sending a single request.
  # - Finishing the session.
  # - Destroying the object.
  #
  # Such methods that send GET requests:
  #
  # - ::get: Returns the string response body.
  # - ::get_print: Writes the string response body to $stdout.
  # - ::get_response: Returns a Net::HTTPResponse object.
  #
  # Such methods that send POST requests:
  #
  # - ::post: Posts data to the host.
  # - ::post_form: Posts form data to the host.
  #
  # == \HTTP Requests and Responses
  #
  # Many of the methods above are convenience methods,
  # each of which sends a request and returns a string
  # without directly using \Net::HTTPRequest and \Net::HTTPResponse objects.
  #
  # You can, however, directly create a request object, send the request,
  # and retrieve the response object; see:
  #
  # - Net::HTTPRequest.
  # - Net::HTTPResponse.
  #
  # == Following Redirection
  #
  # Each returned response is an instance of a subclass of Net::HTTPResponse.
  # See the {response class hierarchy}[rdoc-ref:Net::HTTPResponse@Response+Subclasses].
  #
  # In particular, class Net::HTTPRedirection is the parent
  # of all redirection classes.
  # This allows you to craft a case statement to handle redirections properly:
  #
  #   def fetch(uri, limit = 10)
  #     # You should choose a better exception.
  #     raise ArgumentError, 'Too many HTTP redirects' if limit == 0
  #
  #     res = Net::HTTP.get_response(URI(uri))
  #     case res
  #     when Net::HTTPSuccess     # Any success class.
  #       res
  #     when Net::HTTPRedirection # Any redirection class.
  #       location = res['Location']
  #       warn "Redirected to #{location}"
  #       fetch(location, limit - 1)
  #     else                      # Any other class.
  #       res.value
  #     end
  #   end
  #
  #   fetch(uri)
  #
  # == Basic Authentication
  #
  # Basic authentication is performed according to
  # {RFC2617}[http://www.ietf.org/rfc/rfc2617.txt]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.basic_auth('user', 'pass')
  #   res = Net::HTTP.start(hostname) do |http|
  #     http.request(req)
  #   end
  #
  # == 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.
  #
  #   Net::HTTP.start(hostname) do |http|
  #     req = Net::HTTP::Get.new(uri)
  #     http.request(req) do |res|
  #       open('t.tmp', 'w') do |f|
  #         res.read_body do |chunk|
  #           f.write chunk
  #         end
  #       end
  #     end
  #   end
  #
  # == HTTPS
  #
  # HTTPS is enabled for an \HTTP connection by Net::HTTP#use_ssl=:
  #
  #   Net::HTTP.start(hostname, :use_ssl => true) do |http|
  #     req = Net::HTTP::Get.new(uri)
  #     res = http.request(req)
  #   end
  #
  # Or if you simply want to make a GET request, you may pass in a 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 https://jsonplaceholder.typicode.com/>
  #   Net::HTTP.get(uri)
  #
  # == Proxy Server
  #
  # An \HTTP object can have
  # a {proxy server}[https://en.wikipedia.org/wiki/Proxy_server].
  #
  # You can create an \HTTP object with a proxy server
  # using method Net::HTTP.new or method Net::HTTP.start.
  #
  # The proxy may be defined either by argument +p_addr+
  # or by environment variable <tt>'http_proxy'</tt>.
  #
  # === Proxy Using Argument +p_addr+ as a \String
  #
  # When argument +p_addr+ is a string hostname,
  # the returned +http+ has the given host as its proxy:
  #
  #   http = Net::HTTP.new(hostname, nil, 'proxy.example')
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => false
  #   http.proxy_address   # => "proxy.example"
  #   # These use default values.
  #   http.proxy_port      # => 80
  #   http.proxy_user      # => nil
  #   http.proxy_pass      # => nil
  #
  # The port, username, and password for the proxy may also be given:
  #
  #   http = Net::HTTP.new(hostname, nil, 'proxy.example', 8000, 'pname', 'ppass')
  #   # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => false
  #   http.proxy_address   # => "proxy.example"
  #   http.proxy_port      # => 8000
  #   http.proxy_user      # => "pname"
  #   http.proxy_pass      # => "ppass"
  #
  # === Proxy Using '<tt>ENV['http_proxy']</tt>'
  #
  # When environment variable <tt>'http_proxy'</tt>
  # is set to a \URI string,
  # the returned +http+ will have the server at that URI as its proxy;
  # note that the \URI string must have a protocol
  # such as <tt>'http'</tt> or <tt>'https'</tt>:
  #
  #   ENV['http_proxy'] = 'http://example.com'
  #   http = Net::HTTP.new(hostname)
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => true
  #   http.proxy_address   # => "example.com"
  #   # These use default values.
  #   http.proxy_port      # => 80
  #   http.proxy_user      # => nil
  #   http.proxy_pass      # => nil
  #
  # The \URI string may include proxy username, password, and port number:
  #
  #   ENV['http_proxy'] = 'http://pname:ppass@example.com:8000'
  #   http = Net::HTTP.new(hostname)
  #   http.proxy?          # => true
  #   http.proxy_from_env? # => true
  #   http.proxy_address   # => "example.com"
  #   http.proxy_port      # => 8000
  #   http.proxy_user      # => "pname"
  #   http.proxy_pass      # => "ppass"
  #
  # === Filtering Proxies
  #
  # With method Net::HTTP.new (but not Net::HTTP.start),
  # you can use argument +p_no_proxy+ to filter proxies:
  #
  # - Reject a certain address:
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
  #     http.proxy_address # => nil
  #
  # - Reject certain domains or subdomains:
  #
  #     http = Net::HTTP.new('example.com', nil, 'my.proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
  #     http.proxy_address # => nil
  #
  # - Reject certain addresses and port combinations:
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:1234')
  #     http.proxy_address # => "proxy.example"
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:8000')
  #     http.proxy_address # => nil
  #
  # - Reject a list of the types above delimited using a comma:
  #
  #     http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
  #     http.proxy_address # => nil
  #
  #     http = Net::HTTP.new('example.com', nil, 'my.proxy', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
  #     http.proxy_address # => nil
  #
  # == Compression and Decompression
  #
  # \Net::HTTP does not compress the body of a request before sending.
  #
  # By default, \Net::HTTP adds header <tt>'Accept-Encoding'</tt>
  # to a new {request object}[rdoc-ref:Net::HTTPRequest]:
  #
  #   Net::HTTP::Get.new(uri)['Accept-Encoding']
  #   # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
  #
  # This requests the server to zip-encode the response body if there is one;
  # the server is not required to do so.
  #
  # \Net::HTTP does not automatically decompress a response body
  # if the response has header <tt>'Content-Range'</tt>.
  #
  # Otherwise decompression (or not) depends on the value of header
  # {Content-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-encoding-response-header]:
  #
  # - <tt>'deflate'</tt>, <tt>'gzip'</tt>, or <tt>'x-gzip'</tt>:
  #   decompresses the body and deletes the header.
  # - <tt>'none'</tt> or <tt>'identity'</tt>:
  #   does not decompress the body, but deletes the header.
  # - Any other value:
  #   leaves the body and header unchanged.
  #
  # == What's Here
  #
  # First, what's elsewhere. Class Net::HTTP:
  #
  # - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
  #
  # This is a categorized summary of methods and attributes.
  #
  # === \Net::HTTP Objects
  #
  # - {::new}[rdoc-ref:Net::HTTP.new]:
  #   Creates a new instance.
  # - {#inspect}[rdoc-ref:Net::HTTP#inspect]:
  #   Returns a string representation of +self+.
  #
  # === Sessions
  #
  # - {::start}[rdoc-ref:Net::HTTP.start]:
  #   Begins a new session in a new \Net::HTTP object.
  # - {#started?}[rdoc-ref:Net::HTTP#started?]:
  #   Returns whether in a session.
  # - {#finish}[rdoc-ref:Net::HTTP#finish]:
  #   Ends an active session.
  # - {#start}[rdoc-ref:Net::HTTP#start]:
  #   Begins a new session in an existing \Net::HTTP object (+self+).
  #
  # === Connections
  #
  # - {:continue_timeout}[rdoc-ref:Net::HTTP#continue_timeout]:
  #   Returns the continue timeout.
  # - {#continue_timeout=}[rdoc-ref:Net::HTTP#continue_timeout=]:
  #   Sets the continue timeout seconds.
  # - {:keep_alive_timeout}[rdoc-ref:Net::HTTP#keep_alive_timeout]:
  #   Returns the keep-alive timeout.
  # - {:keep_alive_timeout=}[rdoc-ref:Net::HTTP#keep_alive_timeout=]:
  #   Sets the keep-alive timeout.
  # - {:max_retries}[rdoc-ref:Net::HTTP#max_retries]:
  #   Returns the maximum retries.
  # - {#max_retries=}[rdoc-ref:Net::HTTP#max_retries=]:
  #   Sets the maximum retries.
  # - {:open_timeout}[rdoc-ref:Net::HTTP#open_timeout]:
  #   Returns the open timeout.
  # - {:open_timeout=}[rdoc-ref:Net::HTTP#open_timeout=]:
  #   Sets the open timeout.
  # - {:read_timeout}[rdoc-ref:Net::HTTP#read_timeout]:
  #   Returns the open timeout.
  # - {:read_timeout=}[rdoc-ref:Net::HTTP#read_timeout=]:
  #   Sets the read timeout.
  # - {:ssl_timeout}[rdoc-ref:Net::HTTP#ssl_timeout]:
  #   Returns the ssl timeout.
  # - {:ssl_timeout=}[rdoc-ref:Net::HTTP#ssl_timeout=]:
  #   Sets the ssl timeout.
  # - {:write_timeout}[rdoc-ref:Net::HTTP#write_timeout]:
  #   Returns the write timeout.
  # - {write_timeout=}[rdoc-ref:Net::HTTP#write_timeout=]:
  #   Sets the write timeout.
  #
  # === Requests
  #
  # - {::get}[rdoc-ref:Net::HTTP.get]:
  #   Sends a GET request and returns the string response body.
  # - {::get_print}[rdoc-ref:Net::HTTP.get_print]:
  #   Sends a GET request and write the string response body to $stdout.
  # - {::get_response}[rdoc-ref:Net::HTTP.get_response]:
  #   Sends a GET request and returns a response object.
  # - {::post_form}[rdoc-ref:Net::HTTP.post_form]:
  #   Sends a POST request with form data and returns a response object.
  # - {::post}[rdoc-ref:Net::HTTP.post]:
  #   Sends a POST request with data and returns a response object.
  # - {::put}[rdoc-ref:Net::HTTP.put]:
  #   Sends a PUT request with data and returns a response object.
  # - {#copy}[rdoc-ref:Net::HTTP#copy]:
  #   Sends a COPY request and returns a response object.
  # - {#delete}[rdoc-ref:Net::HTTP#delete]:
  #   Sends a DELETE request and returns a response object.
  # - {#get}[rdoc-ref:Net::HTTP#get]:
  #   Sends a GET request and returns a response object.
  # - {#head}[rdoc-ref:Net::HTTP#head]:
  #   Sends a HEAD request and returns a response object.
  # - {#lock}[rdoc-ref:Net::HTTP#lock]:
  #   Sends a LOCK request and returns a response object.
  # - {#mkcol}[rdoc-ref:Net::HTTP#mkcol]:
  #   Sends a MKCOL request and returns a response object.
  # - {#move}[rdoc-ref:Net::HTTP#move]:
  #   Sends a MOVE request and returns a response object.
  # - {#options}[rdoc-ref:Net::HTTP#options]:
  #   Sends a OPTIONS request and returns a response object.
  # - {#patch}[rdoc-ref:Net::HTTP#patch]:
  #   Sends a PATCH request and returns a response object.
  # - {#post}[rdoc-ref:Net::HTTP#post]:
  #   Sends a POST request and returns a response object.
  # - {#propfind}[rdoc-ref:Net::HTTP#propfind]:
  #   Sends a PROPFIND request and returns a response object.
  # - {#proppatch}[rdoc-ref:Net::HTTP#proppatch]:
  #   Sends a PROPPATCH request and returns a response object.
  # - {#put}[rdoc-ref:Net::HTTP#put]:
  #   Sends a PUT request and returns a response object.
  # - {#request}[rdoc-ref:Net::HTTP#request]:
  #   Sends a request and returns a response object.
  # - {#request_get}[rdoc-ref:Net::HTTP#request_get]:
  #   Sends a GET request and forms a response object;
  #   if a block given, calls the block with the object,
  #   otherwise returns the object.
  # - {#request_head}[rdoc-ref:Net::HTTP#request_head]:
  #   Sends a HEAD request and forms a response object;
  #   if a block given, calls the block with the object,
  #   otherwise returns the object.
  # - {#request_post}[rdoc-ref:Net::HTTP#request_post]:
  #   Sends a POST request and forms a response object;
  #   if a block given, calls the block with the object,
  #   otherwise returns the object.
  # - {#send_request}[rdoc-ref:Net::HTTP#send_request]:
  #   Sends a request and returns a response object.
  # - {#trace}[rdoc-ref:Net::HTTP#trace]:
  #   Sends a TRACE request and returns a response object.
  # - {#unlock}[rdoc-ref:Net::HTTP#unlock]:
  #   Sends an UNLOCK request and returns a response object.
  #
  # === Responses
  #
  # - {:close_on_empty_response}[rdoc-ref:Net::HTTP#close_on_empty_response]:
  #   Returns whether to close connection on empty response.
  # - {:close_on_empty_response=}[rdoc-ref:Net::HTTP#close_on_empty_response=]:
  #   Sets whether to close connection on empty response.
  # - {:ignore_eof}[rdoc-ref:Net::HTTP#ignore_eof]:
  #   Returns whether to ignore end-of-file when reading a response body
  #   with <tt>Content-Length</tt> headers.
  # - {:ignore_eof=}[rdoc-ref:Net::HTTP#ignore_eof=]:
  #   Sets whether to ignore end-of-file when reading a response body
  #   with <tt>Content-Length</tt> headers.
  # - {:response_body_encoding}[rdoc-ref:Net::HTTP#response_body_encoding]:
  #   Returns the encoding to use for the response body.
  # - {#response_body_encoding=}[rdoc-ref:Net::HTTP#response_body_encoding=]:
  #   Sets the response body encoding.
  #
  # === Proxies
  #
  # - {:proxy_address}[rdoc-ref:Net::HTTP#proxy_address]:
  #   Returns the proxy address.
  # - {:proxy_address=}[rdoc-ref:Net::HTTP#proxy_address=]:
  #   Sets the proxy address.
  # - {::proxy_class?}[rdoc-ref:Net::HTTP.proxy_class?]:
  #   Returns whether +self+ is a proxy class.
  # - {#proxy?}[rdoc-ref:Net::HTTP#proxy?]:
  #   Returns whether +self+ has a proxy.
  # - {#proxy_address}[rdoc-ref:Net::HTTP#proxy_address]:
  #   Returns the proxy address.
  # - {#proxy_from_env?}[rdoc-ref:Net::HTTP#proxy_from_env?]:
  #   Returns whether the proxy is taken from an environment variable.
  # - {:proxy_from_env=}[rdoc-ref:Net::HTTP#proxy_from_env=]:
  #   Sets whether the proxy is to be taken from an environment variable.
  # - {:proxy_pass}[rdoc-ref:Net::HTTP#proxy_pass]:
  #   Returns the proxy password.
  # - {:proxy_pass=}[rdoc-ref:Net::HTTP#proxy_pass=]:
  #   Sets the proxy password.
  # - {:proxy_port}[rdoc-ref:Net::HTTP#proxy_port]:
  #   Returns the proxy port.
  # - {:proxy_port=}[rdoc-ref:Net::HTTP#proxy_port=]:
  #   Sets the proxy port.
  # - {#proxy_user}[rdoc-ref:Net::HTTP#proxy_user]:
  #   Returns the proxy user name.
  # - {:proxy_user=}[rdoc-ref:Net::HTTP#proxy_user=]:
  #   Sets the proxy user.
  #
  # === Security
  #
  # - {:ca_file}[rdoc-ref:Net::HTTP#ca_file]:
  #   Returns the path to a CA certification file.
  # - {:ca_file=}[rdoc-ref:Net::HTTP#ca_file=]:
  #   Sets the path to a CA certification file.
  # - {:ca_path}[rdoc-ref:Net::HTTP#ca_path]:
  #   Returns the path of to CA directory containing certification files.
  # - {:ca_path=}[rdoc-ref:Net::HTTP#ca_path=]:
  #   Sets the path of to CA directory containing certification files.
  # - {:cert}[rdoc-ref:Net::HTTP#cert]:
  #   Returns the OpenSSL::X509::Certificate object to be used for client certification.
  # - {:cert=}[rdoc-ref:Net::HTTP#cert=]:
  #   Sets the OpenSSL::X509::Certificate object to be used for client certification.
  # - {:cert_store}[rdoc-ref:Net::HTTP#cert_store]:
  #   Returns the X509::Store to be used for verifying peer certificate.
  # - {:cert_store=}[rdoc-ref:Net::HTTP#cert_store=]:
  #   Sets the X509::Store to be used for verifying peer certificate.
  # - {:ciphers}[rdoc-ref:Net::HTTP#ciphers]:
  #   Returns the available SSL ciphers.
  # - {:ciphers=}[rdoc-ref:Net::HTTP#ciphers=]:
  #   Sets the available SSL ciphers.
  # - {:extra_chain_cert}[rdoc-ref:Net::HTTP#extra_chain_cert]:
  #   Returns the extra X509 certificates to be added to the certificate chain.
  # - {:extra_chain_cert=}[rdoc-ref:Net::HTTP#extra_chain_cert=]:
  #   Sets the extra X509 certificates to be added to the certificate chain.
  # - {:key}[rdoc-ref:Net::HTTP#key]:
  #   Returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
  # - {:key=}[rdoc-ref:Net::HTTP#key=]:
  #   Sets the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
  # - {:max_version}[rdoc-ref:Net::HTTP#max_version]:
  #   Returns the maximum SSL version.
  # - {:max_version=}[rdoc-ref:Net::HTTP#max_version=]:
  #   Sets the maximum SSL version.
  # - {:min_version}[rdoc-ref:Net::HTTP#min_version]:
  #   Returns the minimum SSL version.
  # - {:min_version=}[rdoc-ref:Net::HTTP#min_version=]:
  #   Sets the minimum SSL version.
  # - {#peer_cert}[rdoc-ref:Net::HTTP#peer_cert]:
  #   Returns the X509 certificate chain for the session's socket peer.
  # - {:ssl_version}[rdoc-ref:Net::HTTP#ssl_version]:
  #   Returns the SSL version.
  # - {:ssl_version=}[rdoc-ref:Net::HTTP#ssl_version=]:
  #   Sets the SSL version.
  # - {#use_ssl=}[rdoc-ref:Net::HTTP#use_ssl=]:
  #   Sets whether a new session is to use Transport Layer Security.
  # - {#use_ssl?}[rdoc-ref:Net::HTTP#use_ssl?]:
  #   Returns whether +self+ uses SSL.
  # - {:verify_callback}[rdoc-ref:Net::HTTP#verify_callback]:
  #   Returns the callback for the server certification verification.
  # - {:verify_callback=}[rdoc-ref:Net::HTTP#verify_callback=]:
  #   Sets the callback for the server certification verification.
  # - {:verify_depth}[rdoc-ref:Net::HTTP#verify_depth]:
  #   Returns the maximum depth for the certificate chain verification.
  # - {:verify_depth=}[rdoc-ref:Net::HTTP#verify_depth=]:
  #   Sets the maximum depth for the certificate chain verification.
  # - {:verify_hostname}[rdoc-ref:Net::HTTP#verify_hostname]:
  #   Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
  # - {:verify_hostname=}[rdoc-ref:Net::HTTP#verify_hostname=]:
  #   Sets he flags for server the certification verification at the beginning of the SSL/TLS session.
  # - {:verify_mode}[rdoc-ref:Net::HTTP#verify_mode]:
  #   Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
  # - {:verify_mode=}[rdoc-ref:Net::HTTP#verify_mode=]:
  #   Sets the flags for server the certification verification at the beginning of the SSL/TLS session.
  #
  # === Addresses and Ports
  #
  # - {:address}[rdoc-ref:Net::HTTP#address]:
  #   Returns the string host name or host IP.
  # - {::default_port}[rdoc-ref:Net::HTTP.default_port]:
  #   Returns integer 80, the default port to use for HTTP requests.
  # - {::http_default_port}[rdoc-ref:Net::HTTP.http_default_port]:
  #   Returns integer 80, the default port to use for HTTP requests.
  # - {::https_default_port}[rdoc-ref:Net::HTTP.https_default_port]:
  #   Returns integer 443, the default port to use for HTTPS requests.
  # - {#ipaddr}[rdoc-ref:Net::HTTP#ipaddr]:
  #   Returns the IP address for the connection.
  # - {#ipaddr=}[rdoc-ref:Net::HTTP#ipaddr=]:
  #   Sets the IP address for the connection.
  # - {:local_host}[rdoc-ref:Net::HTTP#local_host]:
  #   Returns the string local host used to establish the connection.
  # - {:local_host=}[rdoc-ref:Net::HTTP#local_host=]:
  #   Sets the string local host used to establish the connection.
  # - {:local_port}[rdoc-ref:Net::HTTP#local_port]:
  #   Returns the integer local port used to establish the connection.
  # - {:local_port=}[rdoc-ref:Net::HTTP#local_port=]:
  #   Sets the integer local port used to establish the connection.
  # - {:port}[rdoc-ref:Net::HTTP#port]:
  #   Returns the integer port number.
  #
  # === \HTTP Version
  #
  # - {::version_1_2?}[rdoc-ref:Net::HTTP.version_1_2?]
  #   (aliased as {::version_1_2}[rdoc-ref:Net::HTTP.version_1_2]):
  #   Returns true; retained for compatibility.
  #
  # === Debugging
  #
  # - {#set_debug_output}[rdoc-ref:Net::HTTP#set_debug_output]:
  #   Sets the output stream for debugging.
  #
  class HTTP < Protocol

    # :stopdoc:
    VERSION = "0.6.0"
    HTTPVersion = '1.1'
    begin
      require 'zlib'
      HAVE_ZLIB=true
    rescue LoadError
      HAVE_ZLIB=false
    end
    # :startdoc:

    # Returns +true+; retained for compatibility.
    def HTTP.version_1_2
      true
    end

    # Returns +true+; retained for compatibility.
    def HTTP.version_1_2?
      true
    end

    # Returns +false+; retained for compatibility.
    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

    # :call-seq:
    #   Net::HTTP.get_print(hostname, path, port = 80) -> nil
    #   Net::HTTP:get_print(uri, headers = {}, port = uri.port) -> nil
    #
    # Like Net::HTTP.get, but writes the returned body to $stdout;
    # returns +nil+.
    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

    # :call-seq:
    #   Net::HTTP.get(hostname, path, port = 80) -> body
    #   Net::HTTP:get(uri, headers = {}, port = uri.port) -> body
    #
    # Sends a GET request and returns the \HTTP response body as a string.
    #
    # With string arguments +hostname+ and +path+:
    #
    #   hostname = 'jsonplaceholder.typicode.com'
    #   path = '/todos/1'
    #   puts Net::HTTP.get(hostname, path)
    #
    # Output:
    #
    #   {
    #     "userId": 1,
    #     "id": 1,
    #     "title": "delectus aut autem",
    #     "completed": false
    #   }
    #
    # With URI object +uri+ and optional hash argument +headers+:
    #
    #   uri = URI('https://jsonplaceholder.typicode.com/todos/1')
    #   headers = {'Content-type' => 'application/json; charset=UTF-8'}
    #   Net::HTTP.get(uri, headers)
    #
    # Related:
    #
    # - Net::HTTP::Get: request class for \HTTP method +GET+.
    # - Net::HTTP#get: convenience method for \HTTP method +GET+.
    #
    def HTTP.get(uri_or_host, path_or_headers = nil, port = nil)
      get_response(uri_or_host, path_or_headers, port).body
    end

    # :call-seq:
    #   Net::HTTP.get_response(hostname, path, port = 80) -> http_response
    #   Net::HTTP:get_response(uri, headers = {}, port = uri.port) -> http_response
    #
    # Like Net::HTTP.get, but returns a Net::HTTPResponse object
    # instead of the body string.
    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 a host; returns a Net::HTTPResponse object.
    #
    # Argument +url+ must be a URL;
    # argument +data+ must be a string:
    #
    #   _uri = uri.dup
    #   _uri.path = '/posts'
    #   data = '{"title": "foo", "body": "bar", "userId": 1}'
    #   headers = {'content-type': 'application/json'}
    #   res = Net::HTTP.post(_uri, data, headers) # => #<Net::HTTPCreated 201 Created readbody=true>
    #   puts res.body
    #
    # Output:
    #
    #   {
    #     "title": "foo",
    #     "body": "bar",
    #     "userId": 1,
    #     "id": 101
    #   }
    #
    # Related:
    #
    # - Net::HTTP::Post: request class for \HTTP method +POST+.
    # - Net::HTTP#post: convenience method for \HTTP method +POST+.
    #
    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 data to a host; returns a Net::HTTPResponse object.
    #
    # Argument +url+ must be a URI;
    # argument +data+ must be a hash:
    #
    #   _uri = uri.dup
    #   _uri.path = '/posts'
    #   data = {title: 'foo', body: 'bar', userId: 1}
    #   res = Net::HTTP.post_form(_uri, data) # => #<Net::HTTPCreated 201 Created readbody=true>
    #   puts res.body
    #
    # Output:
    #
    #   {
    #     "title": "foo",
    #     "body": "bar",
    #     "userId": "1",
    #     "id": 101
    #   }
    #
    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

    # Sends a PUT request to the server; returns a Net::HTTPResponse object.
    #
    # Argument +url+ must be a URL;
    # argument +data+ must be a string:
    #
    #   _uri = uri.dup
    #   _uri.path = '/posts'
    #   data = '{"title": "foo", "body": "bar", "userId": 1}'
    #   headers = {'content-type': 'application/json'}
    #   res = Net::HTTP.put(_uri, data, headers) # => #<Net::HTTPCreated 201 Created readbody=true>
    #   puts res.body
    #
    # Output:
    #
    #   {
    #     "title": "foo",
    #     "body": "bar",
    #     "userId": 1,
    #     "id": 101
    #   }
    #
    # Related:
    #
    # - Net::HTTP::Put: request class for \HTTP method +PUT+.
    # - Net::HTTP#put: convenience method for \HTTP method +PUT+.
    #
    def HTTP.put(url, data, header = nil)
      start(url.hostname, url.port,
            :use_ssl => url.scheme == 'https' ) {|http|
        http.put(url, data, header)
      }
    end

    #
    # \HTTP session management
    #

    # Returns integer +80+, the default port to use for \HTTP requests:
    #
    #   Net::HTTP.default_port # => 80
    #
    def HTTP.default_port
      http_default_port()
    end

    # Returns integer +80+, the default port to use for \HTTP requests:
    #
    #   Net::HTTP.http_default_port # => 80
    #
    def HTTP.http_default_port
      80
    end

    # Returns integer +443+, the default port to use for HTTPS requests:
    #
    #   Net::HTTP.https_default_port # => 443
    #
    def HTTP.https_default_port
      443
    end

    def HTTP.socket_type   #:nodoc: obsolete
      BufferedIO
    end

    # :call-seq:
    #   HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) -> http
    #   HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) {|http| ... } -> object
    #
    # Creates a new \Net::HTTP object, +http+, via \Net::HTTP.new:
    #
    # - For arguments +address+ and +port+, see Net::HTTP.new.
    # - For proxy-defining arguments +p_addr+ through +p_pass+,
    #   see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    # - For argument +opts+, see below.
    #
    # With no block given:
    #
    # - Calls <tt>http.start</tt> with no block (see #start),
    #   which opens a TCP connection and \HTTP session.
    # - Returns +http+.
    # - The caller should call #finish to close the session:
    #
    #     http = Net::HTTP.start(hostname)
    #     http.started? # => true
    #     http.finish
    #     http.started? # => false
    #
    # With a block given:
    #
    # - Calls <tt>http.start</tt> with the block (see #start), which:
    #
    #   - Opens a TCP connection and \HTTP session.
    #   - Calls the block,
    #     which may make any number of requests to the host.
    #   - Closes the \HTTP session and TCP connection on block exit.
    #   - Returns the block's value +object+.
    #
    # - Returns +object+.
    #
    # Example:
    #
    #   hostname = 'jsonplaceholder.typicode.com'
    #   Net::HTTP.start(hostname) do |http|
    #     puts http.get('/todos/1').body
    #     puts http.get('/todos/2').body
    #   end
    #
    # Output:
    #
    #   {
    #     "userId": 1,
    #     "id": 1,
    #     "title": "delectus aut autem",
    #     "completed": false
    #   }
    #   {
    #     "userId": 1,
    #     "id": 2,
    #     "title": "quis ut nam facilis et officia qui",
    #     "completed": false
    #   }
    #
    # If the last argument given is a hash, it is the +opts+ hash,
    # where each key is a method or accessor to be called,
    # and its value is the value to be set.
    #
    # The keys may include:
    #
    # - #ca_file
    # - #ca_path
    # - #cert
    # - #cert_store
    # - #ciphers
    # - #close_on_empty_response
    # - +ipaddr+ (calls #ipaddr=)
    # - #keep_alive_timeout
    # - #key
    # - #open_timeout
    # - #read_timeout
    # - #ssl_timeout
    # - #ssl_version
    # - +use_ssl+ (calls #use_ssl=)
    # - #verify_callback
    # - #verify_depth
    # - #verify_mode
    # - #write_timeout
    #
    # Note: If +port+ is +nil+ and <tt>opts[:use_ssl]</tt> is a truthy value,
    # the value passed to +new+ is Net::HTTP.https_default_port, not +port+.
    #
    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

    # Returns a new \Net::HTTP object +http+
    # (but does not open a TCP connection or \HTTP session).
    #
    # With only string argument +address+ given
    # (and <tt>ENV['http_proxy']</tt> undefined or +nil+),
    # the returned +http+:
    #
    # - Has the given address.
    # - Has the default port number, Net::HTTP.default_port (80).
    # - Has no proxy.
    #
    # Example:
    #
    #   http = Net::HTTP.new(hostname)
    #   # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
    #   http.address # => "jsonplaceholder.typicode.com"
    #   http.port    # => 80
    #   http.proxy?  # => false
    #
    # With integer argument +port+ also given,
    # the returned +http+ has the given port:
    #
    #   http = Net::HTTP.new(hostname, 8000)
    #   # => #<Net::HTTP jsonplaceholder.typicode.com:8000 open=false>
    #   http.port # => 8000
    #
    # For proxy-defining arguments +p_addr+ through +p_no_proxy+,
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    #
    def HTTP.new(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, p_no_proxy = nil, p_use_ssl = 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
        http.proxy_use_ssl  = @proxy_use_ssl
      elsif p_addr == :ENV then
        http.proxy_from_env = true
      else
        if p_addr && p_no_proxy && !URI::Generic.use_proxy?(address, address, 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
        http.proxy_use_ssl = p_use_ssl
      end

      http
    end

    class << HTTP
      # Allows to set the default configuration that will be used
      # when creating a new connection.
      #
      # Example:
      #
      #   Net::HTTP.default_configuration = {
      #     read_timeout: 1,
      #     write_timeout: 1
      #   }
      #   http = Net::HTTP.new(hostname)
      #   http.open_timeout   # => 60
      #   http.read_timeout   # => 1
      #   http.write_timeout  # => 1
      #
      attr_accessor :default_configuration
    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) # :nodoc:
      defaults = {
        keep_alive_timeout: 2,
        close_on_empty_response: false,
        open_timeout: 60,
        read_timeout: 60,
        write_timeout: 60,
        continue_timeout: nil,
        max_retries: 1,
        debug_output: nil,
        response_body_encoding: false,
        ignore_eof: true
      }
      options = defaults.merge(self.class.default_configuration || {})

      @address = address
      @port    = (port || HTTP.default_port)
      @ipaddr = nil
      @local_host = nil
      @local_port = nil
      @curr_http_version = HTTPVersion
      @keep_alive_timeout = options[:keep_alive_timeout]
      @last_communicated = nil
      @close_on_empty_response = options[:close_on_empty_response]
      @socket  = nil
      @started = false
      @open_timeout = options[:open_timeout]
      @read_timeout = options[:read_timeout]
      @write_timeout = options[:write_timeout]
      @continue_timeout = options[:continue_timeout]
      @max_retries = options[:max_retries]
      @debug_output = options[:debug_output]
      @response_body_encoding = options[:response_body_encoding]
      @ignore_eof = options[:ignore_eof]

      @proxy_from_env = false
      @proxy_uri      = nil
      @proxy_address  = nil
      @proxy_port     = nil
      @proxy_user     = nil
      @proxy_pass     = nil
      @proxy_use_ssl  = 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

    # Returns a string representation of +self+:
    #
    #   Net::HTTP.new(hostname).inspect
    #   # => "#<Net::HTTP jsonplaceholder.typicode.com:80 open=false>"
    #
    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 the output stream for debugging:
    #
    #   http = Net::HTTP.new(hostname)
    #   File.open('t.tmp', 'w') do |file|
    #     http.set_debug_output(file)
    #     http.start
    #     http.get('/nosuch/1')
    #     http.finish
    #   end
    #   puts File.read('t.tmp')
    #
    # Output:
    #
    #   opening connection to jsonplaceholder.typicode.com:80...
    #   opened
    #   <- "GET /nosuch/1 HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nHost: jsonplaceholder.typicode.com\r\n\r\n"
    #   -> "HTTP/1.1 404 Not Found\r\n"
    #   -> "Date: Mon, 12 Dec 2022 21:14:11 GMT\r\n"
    #   -> "Content-Type: application/json; charset=utf-8\r\n"
    #   -> "Content-Length: 2\r\n"
    #   -> "Connection: keep-alive\r\n"
    #   -> "X-Powered-By: Express\r\n"
    #   -> "X-Ratelimit-Limit: 1000\r\n"
    #   -> "X-Ratelimit-Remaining: 999\r\n"
    #   -> "X-Ratelimit-Reset: 1670879660\r\n"
    #   -> "Vary: Origin, Accept-Encoding\r\n"
    #   -> "Access-Control-Allow-Credentials: true\r\n"
    #   -> "Cache-Control: max-age=43200\r\n"
    #   -> "Pragma: no-cache\r\n"
    #   -> "Expires: -1\r\n"
    #   -> "X-Content-Type-Options: nosniff\r\n"
    #   -> "Etag: W/\"2-vyGp6PvFo4RvsFtPoIWeCReyIC8\"\r\n"
    #   -> "Via: 1.1 vegur\r\n"
    #   -> "CF-Cache-Status: MISS\r\n"
    #   -> "Server-Timing: cf-q-config;dur=1.3000000762986e-05\r\n"
    #   -> "Report-To: {\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=yOr40jo%2BwS1KHzhTlVpl54beJ5Wx2FcG4gGV0XVrh3X9OlR5q4drUn2dkt5DGO4GDcE%2BVXT7CNgJvGs%2BZleIyMu8CLieFiDIvOviOY3EhHg94m0ZNZgrEdpKD0S85S507l1vsEwEHkoTm%2Ff19SiO\"}],\"group\":\"cf-nel\",\"max_age\":604800}\r\n"
    #   -> "NEL: {\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}\r\n"
    #   -> "Server: cloudflare\r\n"
    #   -> "CF-RAY: 778977dc484ce591-DFW\r\n"
    #   -> "alt-svc: h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400\r\n"
    #   -> "\r\n"
    #   reading 2 bytes...
    #   -> "{}"
    #   read 2 bytes
    #   Conn keep-alive
    #
    def set_debug_output(output)
      warn 'Net::HTTP#set_debug_output called after HTTP started', uplevel: 1 if started?
      @debug_output = output
    end

    # Returns the string host name or host IP given as argument +address+ in ::new.
    attr_reader :address

    # Returns the integer port number given as argument +port+ in ::new.
    attr_reader :port

    # Sets or returns the string local host used to establish the connection;
    # initially +nil+.
    attr_accessor :local_host

    # Sets or returns the integer local port used to establish the connection;
    # initially +nil+.
    attr_accessor :local_port

    # Returns the encoding to use for the response body;
    # see #response_body_encoding=.
    attr_reader :response_body_encoding

    # Sets the encoding to be used for the response body;
    # returns the encoding.
    #
    # The given +value+ may be:
    #
    # - An Encoding object.
    # - The name of an encoding.
    # - An alias for an encoding name.
    #
    # See {Encoding}[rdoc-ref:Encoding].
    #
    # Examples:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII>
    #   http.response_body_encoding = 'US-ASCII'         # => "US-ASCII"
    #   http.response_body_encoding = 'ASCII'            # => "ASCII"
    #
    def response_body_encoding=(value)
      value = Encoding.find(value) if value.is_a?(String)
      @response_body_encoding = value
    end

    # Sets whether to determine the proxy from environment variable
    # '<tt>ENV['http_proxy']</tt>';
    # see {Proxy Using ENV['http_proxy']}[rdoc-ref:Net::HTTP@Proxy+Using+-27ENV-5B-27http_proxy-27-5D-27].
    attr_writer :proxy_from_env

    # Sets the proxy address;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_address

    # Sets the proxy port;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_port

    # Sets the proxy user;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_user

    # Sets the proxy password;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    attr_writer :proxy_pass
    attr_writer :proxy_use_ssl

    # Returns the IP address for the connection.
    #
    # If the session has not been started,
    # returns the value set by #ipaddr=,
    # or +nil+ if it has not been set:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.ipaddr # => nil
    #   http.ipaddr = '172.67.155.76'
    #   http.ipaddr # => "172.67.155.76"
    #
    # If the session has been started,
    # returns the IP address from the socket:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.start
    #   http.ipaddr # => "172.67.155.76"
    #   http.finish
    #
    def ipaddr
      started? ?  @socket.io.peeraddr[3] : @ipaddr
    end

    # Sets the IP address for the connection:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.ipaddr # => nil
    #   http.ipaddr = '172.67.155.76'
    #   http.ipaddr # => "172.67.155.76"
    #
    # The IP address may not be set if the session has been started.
    def ipaddr=(addr)
      raise IOError, "ipaddr value changed, but session already started" if started?
      @ipaddr = addr
    end

    # Sets or returns the numeric (\Integer or \Float) number of seconds
    # to wait for a connection to open;
    # initially 60.
    # If the connection is not made in the given interval,
    # an exception is raised.
    attr_accessor :open_timeout

    # Returns the numeric (\Integer or \Float) number of seconds
    # to wait for one block to be read (via one read(2) call);
    # see #read_timeout=.
    attr_reader :read_timeout

    # Returns the numeric (\Integer or \Float) number of seconds
    # to wait for one block to be written (via one write(2) call);
    # see #write_timeout=.
    attr_reader :write_timeout

    # Sets the 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.
    # The initial value is 1.
    #
    # Argument +retries+ must be a non-negative numeric value:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.max_retries = 2   # => 2
    #   http.max_retries       # => 2
    #
    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

    # Returns the maximum number of times to retry an idempotent request;
    # see #max_retries=.
    attr_reader :max_retries

    # Sets the read timeout, in seconds, for +self+ to integer +sec+;
    # the initial value is 60.
    #
    # Argument +sec+ must be a non-negative numeric value:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.read_timeout # => 60
    #   http.get('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
    #   http.read_timeout = 0
    #   http.get('/todos/1') # Raises Net::ReadTimeout.
    #
    def read_timeout=(sec)
      @socket.read_timeout = sec if @socket
      @read_timeout = sec
    end

    # Sets the write timeout, in seconds, for +self+ to integer +sec+;
    # the initial value is 60.
    #
    # Argument +sec+ must be a non-negative numeric value:
    #
    #   _uri = uri.dup
    #   _uri.path = '/posts'
    #   body = 'bar' * 200000
    #   data = <<EOF
    #   {"title": "foo", "body": "#{body}", "userId": "1"}
    #   EOF
    #   headers = {'content-type': 'application/json'}
    #   http = Net::HTTP.new(hostname)
    #   http.write_timeout # => 60
    #   http.post(_uri.path, data, headers)
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #   http.write_timeout = 0
    #   http.post(_uri.path, data, headers) # Raises Net::WriteTimeout.
    #
    def write_timeout=(sec)
      @sockeruby/net/http/request.rb000064400000005465150403134240011315 0ustar00r \Float) number of seconds
    # to keep the connection open after a request is sent;
    # initially 2.
    # If a new request is made during the given interval,
    # the still-open connection is used;
    # otherwise the connection will have been closed
    # and a new connection is opened.
    attr_accessor :keep_alive_timeout

    # Sets or returns whether to ignore end-of-file when reading a response body
    # with <tt>Content-Length</tt> headers;
    # initially +true+.
    attr_accessor :ignore_eof

    # Returns +true+ if the \HTTP session has been started:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.started? # => false
    #   http.start
    #   http.started? # => true
    #   http.finish # => nil
    #   http.started? # => false
    #
    #   Net::HTTP.start(hostname) do |http|
    #     http.started?
    #   end # => true
    #   http.started? # => false
    #
    def started?
      @started
    end

    alias active? started?   #:nodoc: obsolete

    # Sets or returns whether to close the connection when the response is empty;
    # initially +false+.
    attr_accessor :close_on_empty_response

    # Returns +true+ if +self+ uses SSL, +false+ otherwise.
    # See Net::HTTP#use_ssl=.
    def use_ssl?
      @use_ssl
    end

    # Sets whether a new session is to use
    # {Transport Layer Security}[https://en.wikipedia.org/wiki/Transport_Layer_Security]:
    #
    # Raises IOError if attempting to change during a session.
    #
    # Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.
    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_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,
    ] # :nodoc:

    SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym } # :nodoc:

    # Sets or returns the path to a CA certification file in PEM format.
    attr_accessor :ca_file

    # Sets or returns the path of to CA directory
    # containing certification files in PEM format.
    attr_accessor :ca_path

    # Sets or returns the OpenSSL::X509::Certificate object
    # to be used for client certification.
    attr_accessor :cert

    # Sets or returns the X509::Store to be used for verifying peer certificate.
    attr_accessor :cert_store

    # Sets or returns the available SSL ciphers.
    # See {OpenSSL::SSL::SSLContext#ciphers=}[OpenSSL::SSL::SSL::Context#ciphers=].
    attr_accessor :ciphers

    # Sets or returns the extra X509 certificates to be added to the certificaruby/net/http/backward.rb000064400000002065150403134240011374 0ustar00OpenSSL::SSL::SSLContext#max_version=}[OpenSSL::SSL::SSL::Context#max_version=].
    attr_accessor :max_version

    # Sets or returns the callback for the server certification verification.
    attr_accessor :verify_callback

    # Sets or returns the maximum depth for the certificate chain verification.
    attr_accessor :verify_depth

    # Sets or returns the flags for server the certification verification
    # at the beginning of the SSL/TLS session.
    # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable.
    attr_accessor :verify_mode

    # Sets or returns whether to verify that the server certificate is valid
    # for the hostname.
    # See {OpenSSL::SSL::SSLContext#verify_hostname=}[OpenSSL::SSL::SSL::Context#verify_hostname=].
    attr_accessor :verify_hostname

    # Returns the X509 certificate chain (an array of strings)
    # for the session's socket peer,
    # or +nil+ if none.
    def peer_cert
      if not use_ssl? or not @socket
        return nil
      end
      @socket.io.peer_cert
    end

    # Starts an \HTTP sessruby/net/http/proxy_delta.rb000064400000000417150403134240012147 0ustar00def connect
      if use_ssl?
        # reference early to load OpenSSL before connecting,
        # as OpenSSL may take time to load.
        @ssl_context = OpenSSL::SSL::SSLContext.new
      end

      if proxy? then
        conn_addr = proxy_address
        conn_port ruby/net/http/generic_request.rb000064400000030160150403134240012777 0ustar00_sock = s
          end
          proxy_sock = BufferedIO.new(proxy_sock, 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" \
            "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"
          proxy_sock.write(buf)
          HTTPResponse.read_new(proxy_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.set_params(ssl_parameters)
        unless @ssl_context.session_cache_mode.nil? # a dummy method on JRuby
          @ssl_context.session_cache_mode =
              OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT |
                  OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE
        end
        if @ssl_context.respond_to?(:session_new_cb) # not implemented under JRuby
          @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }
        end

        # Still do the post_connection_check below even if connecting
        # to IP address
        verify_hostname = @ssl_context.verify_hostname

        # Server Name Indication (SNI) RFC 3546/6066
        case @address
        when Resolv::IPv4::Regex, Resolv::IPv6::Regex
          # don't set SNI, as IP addresses in SNI is not valid
          # per RFC 6066, section 3.

          # Avoid openssl warning
          @ssl_context.verify_hostname = false
        else
          ssl_host_address = @address
        end

        debug "starting SSL for #{conn_addr}:#{conn_port}..."
        s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
        s.sync_close = true
        s.hostname = ssl_host_address if s.respond_to?(:hostname=) && ssl_host_address

        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) && verify_hostname
          s.post_connection_check(@address)
        end
        debug "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)
      @last_communicated = nil
      on_connect
    rescue => exception
      if s
        debug "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:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.start
    #   http.started? # => true
    #   http.finish   # => nil
    #   http.started? # => false
    #
    # Raises IOError if not in a session.
    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
    @proxy_use_ssl = 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, p_use_ssl = nil) #:nodoc:
      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
        @proxy_use_ssl = p_use_ssl
      }
    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

      # Returns the address of the proxy host, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_address

      # Returns the port number of the proxy host, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_port

      # Returns the user name for accessing the proxy, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_user

      # Returns the password for accessing the proxy, or +nil+ if none;
      # see Net::HTTP@Proxy+Server.
      attr_reader :proxy_pass

      # Use SSL when talking to the proxy. If Net::HTTP does not use a proxy, nil.
      attr_reader :proxy_use_ssl
    end

    # Returns +true+ if a proxy server is defined, +false+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy?
      !!(@proxy_from_env ? proxy_uri : @proxy_address)
    end

    # Returns +true+ if the proxy server is defined in the environment,
    # +false+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    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", nil, address, port, nil, nil, nil, nil, nil
      ).find_proxy || false
      @proxy_uri || nil
    end

    # Returns the address of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_address
      if @proxy_from_env then
        proxy_uri&.hostname
      else
        @proxy_address
      end
    end

    # Returns the port number of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_port
      if @proxy_from_env then
        proxy_uri&.port
      else
        @proxy_port
      end
    end

    # Returns the user name of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_user
      if @proxy_from_env
        user = proxy_uri&.user
        unescape(user) if user
      else
        @proxy_user
      end
    end

    # Returns the password of the proxy server, if defined, +nil+ otherwise;
    # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
    def proxy_pass
      if @proxy_from_env
        pass = proxy_uri&.password
        unescape(pass) if pass
      else
        @proxy_pass
      end
    end

    alias proxyaddr proxy_address   #:nodoc: obsolete
    alias proxyport proxy_port      #:nodoc: obsolete

    private

    def unescape(value)
      require 'cgi/util'
      CGI.unescape(value)
    end

    # 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

    # :call-seq:
    #    get(path, initheader = nil) {|res| ... }
    #
    # Sends a GET request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Get object
    # created from string +path+ and initial headers hash +initheader+.
    #
    # With a block given, calls the block with the response body:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.get('/todos/1') do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   "{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false\n}"
    #
    # With no block given, simply returns the response object:
    #
    #   http.get('/') # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Related:
    #
    # - Net::HTTP::Get: request class for \HTTP method GET.
    # - Net::HTTP.get: sends GET request, returns response body.
    #
    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

    # Sends a HEAD request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Head object
    # created from string +path+ and initial headers hash +initheader+:
    #
    #   res = http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
    #   res.body                    # => nil
    #   res.to_hash.take(3)
    #   # =>
    #   [["date", ["Wed, 15 Feb 2023 15:25:42 GMT"]],
    #    ["content-type", ["application/json; charset=utf-8"]],
    #    ["connection", ["close"]]]
    #
    def head(path, initheader = nil)
      request(Head.new(path, initheader))
    end

    # :call-seq:
    #    post(path, data, initheader = nil) {|res| ... }
    #
    # Sends a POST request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Post object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    # With a block given, calls the block with the response body:
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.post('/todos', data) do |res|
    #     p res
    #   end # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # Output:
    #
    #   "{\n  \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\",\n  \"id\": 201\n}"
    #
    # With no block given, simply returns the response object:
    #
    #   http.post('/todos', data) # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # Related:
    #
    # - Net::HTTP::Post: request class for \HTTP method POST.
    # - Net::HTTP.post: sends POST request, returns response body.
    #
    def post(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+
      send_entity(path, data, initheader, dest, Post, &block)
    end

    # :call-seq:
    #    patch(path, data, initheader = nil) {|res| ... }
    #
    # Sends a PATCH request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Patch object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    # With a block given, calls the block with the response body:
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.patch('/todos/1', data) do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   "{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false,\n  \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\"\n}"
    #
    # With no block given, simply returns the response object:
    #
    #   http.paruby/net/http/requests.rb000064400000031537150403134240011477 0ustar00equest(Put.new(path, initheader), data)
    end

    # Sends a PROPPATCH request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Proppatch object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.proppatch('/todos/1', data)
    #
    def proppatch(path, body, initheader = nil)
      request(Proppatch.new(path, initheader), body)
    end

    # Sends a LOCK request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Lock object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.lock('/todos/1', data)
    #
    def lock(path, body, initheader = nil)
      request(Lock.new(path, initheader), body)
    end

    # Sends an UNLOCK request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Unlock object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.unlock('/todos/1', data)
    #
    def unlock(path, body, initheader = nil)
      request(Unlock.new(path, initheader), body)
    end

    # Sends an Options request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Options object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.options('/')
    #
    def options(path, initheader = nil)
      request(Options.new(path, initheader))
    end

    # Sends a PROPFIND request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Propfind object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http = Net::HTTP.new(hostname)
    #   http.propfind('/todos/1', data)
    #
    def propfind(path, body = nil, initheader = {'Depth' => '0'})
      request(Propfind.new(path, initheader), body)
    end

    # Sends a DELETE request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Delete object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.delete('/todos/1')
    #
    def delete(path, initheader = {'Depth' => 'Infinity'})
      request(Delete.new(path, initheader))
    end

    # Sends a MOVE request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Move object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.move('/todos/1')
    #
    def move(path, initheader = nil)
      request(Move.new(path, initheader))
    end

    # Sends a COPY request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Copy object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.copy('/todos/1')
    #
    def copy(path, initheader = nil)
      request(Copy.new(path, initheader))
    end

    # Sends a MKCOL request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Mkcol object
    # created from string +path+, string +body+, and initial headers hash +initheader+.
    #
    #   data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
    #   http.mkcol('/todos/1', data)
    #   http = Net::HTTP.new(hostname)
    #
    def mkcol(path, body = nil, initheader = nil)
      request(Mkcol.new(path, initheader), body)
    end

    # Sends a TRACE request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Trace object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.trace('/todos/1')
    #
    def trace(path, initheader = nil)
      request(Trace.new(path, initheader))
    end

    # Sends a GET request to the server;
    # forms the response into a Net::HTTPResponse object.
    #
    # The request is based on the Net::HTTP::Get object
    # created from string +path+ and initial headers hash +initheader+.
    #
    # With no block given, returns the response object:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.request_get('/todos') # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # With a block given, calls the block with the response object
    # and returns the response object:
    #
    #   http.request_get('/todos') do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   #<Net::HTTPOK 200 OK readbody=false>
    #
    def request_get(path, initheader = nil, &block) # :yield: +response+
      request(Get.new(path, initheader), &block)
    end

    # Sends a HEAD request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Head object
    # created from string +path+ and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
    #
    def request_head(path, initheader = nil, &block)
      request(Head.new(path, initheader), &block)
    end

    # Sends a POST request to the server;
    # forms the response into a Net::HTTPResponse object.
    #
    # The request is based on the Net::HTTP::Post object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    # With no block given, returns the response object:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.post('/todos', 'xyzzy')
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # With a block given, calls the block with the response body
    # and returns the response object:
    #
    #   http.post('/todos', 'xyzzy') do |res|
    #     p res
    #   end # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # Output:
    #
    #   "{\n  \"xyzzy\": \"\",\n  \"id\": 201\n}"
    #
    def request_post(path, data, initheader = nil, &block) # :yield: +response+
      request Post.new(path, initheader), data, &block
    end

    # Sends a PUT request to the server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTP::Put object
    # created from string +path+, string +data+, and initial headers hash +initheader+.
    #
    #   http = Net::HTTP.new(hostname)
    #   http.put('/todos/1', 'xyzzy')
    #   # => #<Net::HTTPOK 200 OK readbody=true>
    #
    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 server;
    # returns an instance of a subclass of Net::HTTPResponse.
    #
    # The request is based on the Net::HTTPRequest object
    # created from string +path+, string +data+, and initial headers hash +header+.
    # That object is an instance of the
    # {subclass of Net::HTTPRequest}[rdoc-ref:Net::HTTPRequest@Request+Subclasses],
    # that corresponds to the given uppercase string +name+,
    # which must be
    # an {HTTP request method}[https://en.wikipedia.org/wiki/HTTP#Request_methods]
    # or a {WebDAV request method}[https://en.wikipedia.org/wiki/WebDAV#Implementation].
    #
    # Examples:
    #
    #   http = Net::HTTP.new(hostname)
    #   http.send_request('GET', '/todos/1')
    #   # => #<Net::HTTPOK 200 OK readbody=true>
    #   http.send_request('POST', '/todos', 'xyzzy')
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    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 the given request +req+ to the server;
    # forms the response into a Net::HTTPResponse object.
    #
    # The given +req+ must be an instance of a
    # {subclass of Net::HTTPRequest}[rdoc-ref:Net::HTTPRequest@Request+Subclasses].
    # Argument +body+ should be given only if needed for the request.
    #
    # With no block given, returns the response object:
    #
    #   http = Net::HTTP.new(hostname)
    #
    #   req = Net::HTTP::Get.new('/todos/1')
    #   http.request(req)
    #   # => #<Net::HTTPOK 200 OK readbody=true>
    #
    #   req = Net::HTTP::Post.new('/todos')
    #   http.request(req, 'xyzzy')
    #   # => #<Net::HTTPCreated 201 Created readbody=true>
    #
    # With a block given, calls the block with the response and returns the response:
    #
    #   req = Net::HTTP::Get.new('/todos/1')
    #   http.request(req) do |res|
    #     p res
    #   end # => #<Net::HTTPOK 200 OK readbody=true>
    #
    # Output:
    #
    #   #<Net::HTTPOK 200 OK readbody=false>
    #
    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
            res.body_encoding = @response_body_encoding
            res.ignore_eof = @ignore_eof
          end while res.kind_of?(HTTPInformation)

          res.uri = req.uri

          res
        }
        res.reading_body(@socket, req.response_body_permitted?) {
          if block_given?
            count = max_retries # Don't restart in the middle of a download
            yield res
          end
        }
      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
          debug "Conn close because of error #{exception}, and retry"
          retry
        end
        debug "Conn close because of error #{exception}"
        @socket.close if @socket
        raise
      end

      end_transport req, res
      res
    rescue => exception
      debug "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)
          debug 'Conn close because of keep_alive_timeout'
          @socket.close
          connect
        elsif @socket.io.to_io.wait_readable(0) && @socket.eof?
          debug "Conn close because of EOF"
          @socket.close
          connect
        end
      end

      if not req.resporuby/net/http/status.rb000064400000004373150403134240011145 0ustar00end

    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

    # Adds a message to debugging output
    def debug(msg)
      return unless @debug_output
      @debug_output << msg
      @debug_output << "\n"
    end

    alias_method :D, :debug
  end

  # for backward compatibility until Ruby 3.5
  # https://bugs.ruby-lang.org/issues/20900
  # https://github.com/bblimke/webmock/pull/1081
  HTTPSession = HTTP
  deprecate_constant :HTTPSession
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'
ruby/net/http/exceptions.rb000064400000001505150403134240011775 0ustar00# frozen_string_literal: true

# This class is the base class for \Net::HTTP request classes.
# The class should not be used directly;
# instead you should use its subclasses, listed below.
#
# == Creating a Request
#
# An request object may be created with either a URI or a string hostname:
#
#   require 'net/http'
#   uri = URI('https://jsonplaceholder.typicode.com/')
#   req = Net::HTTP::Get.new(uri)          # => #<Net::HTTP::Get GET>
#   req = Net::HTTP::Get.new(uri.hostname) # => #<Net::HTTP::Get GET>
#
# And with any of the subclasses:
#
#   req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
#   req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
#   req = Net::HTTP::Put.new(uri)  # => #<Net::HTTP::Put PUT>
#   # ...
#
# The new instance is suitable for use as the argument to Net::HTTP#request.
#
# == ruby/net/http/header.rb000064400000100002150403134240011034 0ustar00-header].
# - {Request header Host}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#host-request-header].
#
# You can add headers or override default headers:
#
#   #   res = Net::HTTP::Get.new(uri, {'foo' => '0', 'bar' => '1'})
#
# This class (and therefore its subclasses) also includes (indirectly)
# module Net::HTTPHeader, which gives access to its
# {methods for setting headers}[rdoc-ref:Net::HTTPHeader@Setters].
#
# == Request Subclasses
#
# Subclasses for HTTP requests:
#
# - Net::HTTP::Get
# - Net::HTTP::Head
# - Net::HTTP::Post
# - Net::HTTP::Put
# - Net::HTTP::Delete
# - Net::HTTP::Options
# - Net::HTTP::Trace
# - Net::HTTP::Patch
#
# Subclasses for WebDAV requests:
#
# - Net::HTTP::Propfind
# - Net::HTTP::Proppatch
# - Net::HTTP::Mkcol
# - Net::HTTP::Copy
# - Net::HTTP::Move
# - Net::HTTP::Lock
# - Net::HTTP::Unlock
#
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
ruby/net/http/backward.rb000064400000002065150403134240011374 0ustar00e(
                    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
          ruby/net/http/proxy_delta.rb000064400000000417150403134240012147 0ustar00# frozen_string_literal: true
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

ruby/net/http/generic_request.rb000064400000030160150403134240012777 0ustar00# frozen_string_literal: true
#
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
#
# Do not use this directly; instead, use a subclass of Net::HTTPRequest.
#
# == About the Examples
#
# :include: doc/net-http/examples.rdoc
#
class Net::HTTPGenericRequest

  include Net::HTTPHeader

  def initialize(m, reqbody, resbody, uri_or_path, initheader = nil) # :nodoc:
    @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
      hostname = uri_or_path.hostname
      raise ArgumentError, "no host component for URI" unless (hostname && hostname.length > 0)
      @uri = uri_or_path.dup
      host = @uri.hostname.dup
      host << ":" << @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 Net::HTTP::HAVE_ZLIB then
      if !initheader ||
         !initheader.keys.any? { |k|
           %w[accept-encoding range].include? k.downcase
         } then
        @decode_content = true if @response_has_body
        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

  # Returns the string method name for the request:
  #
  #   Net::HTTP::Get.new(uri).method  # => "GET"
  #   Net::HTTP::Post.new(uri).method # => "POST"
  #
  attr_reader :method

  # Returns the string path for the request:
  #
  #   Net::HTTP::Get.new(uri).path # => "/"
  #   Net::HTTP::Post.new('example.com').path # => "example.com"
  #
  attr_reader :path

  # Returns the URI object for the request, or +nil+ if none:
  #
  #   Net::HTTP::Get.new(uri).uri
  #   # => #<URI::HTTPS https://jsonplaceholder.typicode.com/>
  #   Net::HTTP::Get.new('example.com').uri # => nil
  #
  attr_reader :uri

  # Returns +false+ if the request's header <tt>'Accept-Encoding'</tt>
  # has been set manually or deleted
  # (indicating that the user intends to handle encoding in the response),
  # +true+ otherwise:
  #
  #   req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
  #   req['Accept-Encoding']        # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
  #   req.decode_content            # => true
  #   req['Accept-Encoding'] = 'foo'
  #   req.decode_content            # => false
  #   req.delete('Accept-Encoding')
  #   req.decode_content            # => false
  #
  attr_reader :decode_content

  # Returns a string representation of the request:
  #
  #   Net::HTTP::Post.new(uri).inspect # => "#<Net::HTTP::Post POST>"
  #
  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

  # Returns whether the request may have a body:
  #
  #   Net::HTTP::Post.new(uri).request_body_permitted? # => true
  #   Net::HTTP::Get.new(uri).request_body_permitted?  # => false
  #
  def request_body_permitted?
    @request_has_body
  end

  # Returns whether the response may have a body:
  #
  #   Net::HTTP::Post.new(uri).response_body_permitted? # => true
  #   Net::HTTP::Head.new(uri).response_body_permitted? # => false
  #
  def response_body_permitted?
    @response_has_body
  end

  def body_exist? # :nodoc:
    warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?", uplevel: 1 if $VERBOSE
    response_body_permitted?
  end

  # Returns the string body for the request, or +nil+ if there is none:
  #
  #   req = Net::HTTP::Post.new(uri)
  #   req.body # => nil
  #   req.body = '{"title": "foo","body": "bar","userId": 1}'
  #   req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}"
  #
  attr_reader :body

  # Sets the body for the request:
  #
  #   req = Net::HTTP::Post.new(uri)
  #   req.body # => nil
  #   req.body = '{"title": "foo","body": "bar","userId": 1}'
  #   req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}"
  #
  def body=(str)
    @body = str
    @body_stream = nil
    @body_data = nil
    str
  end

  # Returns the body stream object for the request, or +nil+ if there is none:
  #
  #   req = Net::HTTP::Post.new(uri)          # => #<Net::HTTP::Post POST>
  #   req.body_stream                         # => nil
  #   require 'stringio'
  #   req.body_stream = StringIO.new('xyzzy') # => #<StringIO:0x0000027d1e5affa8>
  #   req.body_stream                         # => #<StringIO:0x0000027d1e5affa8>
  #
  attr_reader :body_stream

  # Sets the body stream for the request:
  #
  #   req = Net::HTTP::Post.new(uri)          # => #<Net::HTTP::Post POST>
  #   req.body_stream                         # => nil
  #   require 'stringio'
  #   req.body_stream = StringIO.new('xyzzy') # => #<StringIO:0x0000027d1e5affa8>
  #   req.body_stream                         # => #<StringIO:0x0000027d1e5affa8>
  #
  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'
      klass = URI::HTTPS
    else
      scheme = 'http'
      klass = URI::HTTP
    end

    if host = self['host']
      host.sub!(/:.*/m, '')
    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
      IO.copy_stream(f, sock)
    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

ruby/net/http/requests.rb000064400000031760150403134240011475 0ustar00# frozen_string_literal: true

# HTTP/1.1 methods --- RFC2616

# \Class for representing
# {HTTP method GET}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#GET_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
#
# Related:
#
# - Net::HTTP.get: sends +GET+ request, returns response body.
# - Net::HTTP#get: sends +GET+ request, returns response object.
#
class Net::HTTP::Get < Net::HTTPRequest
  METHOD = 'GET'
  REQUEST_HAS_BODY  = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method HEAD}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#HEAD_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: no.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
#
# Related:
#
# - Net::HTTP#head: sends +HEAD+ request, returns response object.
#
class Net::HTTP::Head < Net::HTTPRequest
  METHOD = 'HEAD'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = false
end

# \Class for representing
# {HTTP method POST}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#POST_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   uri.path = '/posts'
#   req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
#   req.body = '{"title": "foo","body": "bar","userId": 1}'
#   req.content_type = 'application/json'
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: no.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
#
# Related:
#
# - Net::HTTP.post: sends +POST+ request, returns response object.
# - Net::HTTP#post: sends +POST+ request, returns response object.
#
class Net::HTTP::Post < Net::HTTPRequest
  METHOD = 'POST'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method PUT}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#PUT_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   uri.path = '/posts'
#   req = Net::HTTP::Put.new(uri) # => #<Net::HTTP::Put PUT>
#   req.body = '{"title": "foo","body": "bar","userId": 1}'
#   req.content_type = 'application/json'
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP.put: sends +PUT+ request, returns response object.
# - Net::HTTP#put: sends +PUT+ request, returns response object.
#
class Net::HTTP::Put < Net::HTTPRequest
  METHOD = 'PUT'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method DELETE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#DELETE_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   uri.path = '/posts/1'
#   req = Net::HTTP::Delete.new(uri) # => #<Net::HTTP::Delete DELETE>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP#delete: sends +DELETE+ request, returns response object.
#
class Net::HTTP::Delete < Net::HTTPRequest
  METHOD = 'DELETE'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method OPTIONS}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#OPTIONS_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Options.new(uri) # => #<Net::HTTP::Options OPTIONS>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: optional.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP#options: sends +OPTIONS+ request, returns response object.
#
class Net::HTTP::Options < Net::HTTPRequest
  METHOD = 'OPTIONS'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method TRACE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#TRACE_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Trace.new(uri) # => #<Net::HTTP::Trace TRACE>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: no.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP#trace: sends +TRACE+ request, returns response object.
#
class Net::HTTP::Trace < Net::HTTPRequest
  METHOD = 'TRACE'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {HTTP method PATCH}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#PATCH_method]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   uri.path = '/posts'
#   req = Net::HTTP::Patch.new(uri) # => #<Net::HTTP::Patch PATCH>
#   req.body = '{"title": "foo","body": "bar","userId": 1}'
#   req.content_type = 'application/json'
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Properties:
#
# - Request body: yes.
# - Response body: yes.
# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: no.
# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
#
# Related:
#
# - Net::HTTP#patch: sends +PATCH+ request, returns response object.
#
class Net::HTTP::Patch < Net::HTTPRequest
  METHOD = 'PATCH'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

#
# WebDAV methods --- RFC2518
#

# \Class for representing
# {WebDAV method PROPFIND}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Propfind.new(uri) # => #<Net::HTTP::Propfind PROPFIND>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#propfind: sends +PROPFIND+ request, returns response object.
#
class Net::HTTP::Propfind < Net::HTTPRequest
  METHOD = 'PROPFIND'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method PROPPATCH}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Proppatch.new(uri) # => #<Net::HTTP::Proppatch PROPPATCH>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#proppatch: sends +PROPPATCH+ request, returns response object.
#
class Net::HTTP::Proppatch < Net::HTTPRequest
  METHOD = 'PROPPATCH'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method MKCOL}[http://www.webdav.org/specs/rfc4918.html#METHOD_MKCOL]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Mkcol.new(uri) # => #<Net::HTTP::Mkcol MKCOL>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#mkcol: sends +MKCOL+ request, returns response object.
#
class Net::HTTP::Mkcol < Net::HTTPRequest
  METHOD = 'MKCOL'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method COPY}[http://www.webdav.org/specs/rfc4918.html#METHOD_COPY]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Copy.new(uri) # => #<Net::HTTP::Copy COPY>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#copy: sends +COPY+ request, returns response object.
#
class Net::HTTP::Copy < Net::HTTPRequest
  METHOD = 'COPY'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method MOVE}[http://www.webdav.org/specs/rfc4918.html#METHOD_MOVE]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Move.new(uri) # => #<Net::HTTP::Move MOVE>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#move: sends +MOVE+ request, returns response object.
#
class Net::HTTP::Move < Net::HTTPRequest
  METHOD = 'MOVE'
  REQUEST_HAS_BODY = false
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method LOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_LOCK]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Lock.new(uri) # => #<Net::HTTP::Lock LOCK>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#lock: sends +LOCK+ request, returns response object.
#
class Net::HTTP::Lock < Net::HTTPRequest
  METHOD = 'LOCK'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

# \Class for representing
# {WebDAV method UNLOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_UNLOCK]:
#
#   require 'net/http'
#   uri = URI('http://example.com')
#   hostname = uri.hostname # => "example.com"
#   req = Net::HTTP::Unlock.new(uri) # => #<Net::HTTP::Unlock UNLOCK>
#   res = Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end
#
# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
#
# Related:
#
# - Net::HTTP#unlock: sends +UNLOCK+ request, returns response object.
#
class Net::HTTP::Unlock < Net::HTTPRequest
  METHOD = 'UNLOCK'
  REQUEST_HAS_BODY = true
  RESPONSE_HAS_BODY = true
end

ruby/net/http/status.rb000064400000004373150403134240011145 0ustar00# frozen_string_literal: true

require_relative '../http'

if $0 == __FILE__
  require 'open-uri'
  File.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 "} # :nodocruby/net/http/responses.rb000064400000116775150403134240011655 0ustar00a Type',
  416 => 'Range Not Satisfiable',
  417 => 'Expectation Failed',
  421 => 'Misdirected Request',
  422 => 'Unprocessable Content',
  423 => 'Locked',
  424 => 'Failed Dependency',
  425 => 'Too Early',
  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 (OBSOLETED)',
  511 => 'Network Authentication Required',
} # :nodoc:
ruby/net/http/exceptions.rb000064400000001505150403134240011775 0ustar00# frozen_string_literal: true
module Net
  # Net::HTTP exception class.
  # You cannot use Net::HTTPExceptions directly; instead, you must use
  # its subclasses.
  module HTTPExceptions
    def initialize(msg, res)   #:nodoc:
      super msg
      @response = res
    end
    attr_reader :response
    alias data response    #:nodoc: obsolete
  end

  class HTTPError < ProtocolError
    include HTTPExceptions
  end

  class HTTPRetriableError < ProtoRetriableError
    include HTTPExceptions
  end

  class HTTPClientException < ProtoServerError
    include HTTPExceptions
  end

  class HTTPFatalError < ProtoFatalError
    include HTTPExceptions
  end

  # We cannot use the name "HTTPServerError", it is the name of the response.
  HTTPServerException = HTTPClientException # :nodoc:
  deprecate_constant(:HTTPServerException)
end
ruby/net/http/header.rb000064400000100020150403134240011034 0ustar00# frozen_string_literal: true
#
# The \HTTPHeader module provides access to \HTTP headers.
#
# The module is included in:
#
# - Net::HTTPGenericRequest (and therefore Net::HTTPRequest).
# - Net::HTTPResponse.
#
# The headers are a hash-like collection of key/value pairs called _fields_.
#
# == Request and Response Fields
#
# Headers may be included in:
#
# - A Net::HTTPRequest object:
#   the object's headers will be sent with the request.
#   Any fields may be defined in the request;
#   see {Setters}[rdoc-ref:Net::HTTPHeader@Setters].
# - A Net::HTTPResponse object:
#   the objects headers are usually those returned from the host.
#   Fields may be retrieved from the object;
#   see {Getters}[rdoc-ref:Net::HTTPHeader@Getters]
#   and {Iterators}[rdoc-ref:Net::HTTPHeader@Iterators].
#
# Exactly which fields should be sent or expected depends on the host;
# see:
#
# - {Request fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
# - {Response fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields].
#
# == About the Examples
#
# :include: doc/net-http/examples.rdoc
#
# == Fields
#
# A header field is a key/value pair.
#
# === Field Keys
#
# A field key may be:
#
# - A string: Key <tt>'Accept'</tt> is treated as if it were
#   <tt>'Accept'.downcase</tt>;  i.e., <tt>'accept'</tt>.
# - A symbol: Key <tt>:Accept</tt> is treated as if it were
#   <tt>:Accept.to_s.downcase</tt>;  i.e., <tt>'accept'</tt>.
#
# Examples:
#
#   req = Net::HTTP::Get.new(uri)
#   req[:accept]  # => "*/*"
#   req['Accept'] # => "*/*"
#   req['ACCEPT'] # => "*/*"
#
#   req['accept'] = 'text/html'
#   req[:accept] = 'text/html'
#   req['ACCEPT'] = 'text/html'
#
# === Field Values
#
# A field value may be returned as an array of strings or as a string:
#
# - These methods return field values as arrays:
#
#   - #get_fields: Returns the array value for the given key,
#     or +nil+ if it does not exist.
#   - #to_hash: Returns a hash of all header fields:
#     each key is a field name; its value is the array value for the field.
#
# - These methods return field values as string;
#   the string value for a field is equivalent to
#   <tt>self[key.downcase.to_s].join(', '))</tt>:
#
#   - #[]: Returns the string value for the given key,
#     or +nil+ if it does not exist.
#   - #fetch: Like #[], but accepts a default value
#     to be returned if the key does not exist.
#
# The field value may be set:
#
# - #[]=: Sets the value for the given key;
#   the given value may be a string, a symbol, an array, or a hash.
# - #add_field: Adds a given value to a value for the given key
#   (not overwriting the existing value).
# - #delete: Deletes the field for the given key.
#
# Example field values:
#
# - \String:
#
#     req['Accept'] = 'text/html' # => "text/html"
#     req['Accept']               # => "text/html"
#     req.get_fields('Accept')    # => ["text/html"]
#
# - \Symbol:
#
#     req['Accept'] = :text    # => :text
#     req['Accept']            # => "text"
#     req.get_fields('Accept') # => ["text"]
#
# - Simple array:
#
#     req[:foo] = %w[bar baz bat]
#     req[:foo]            # => "bar, baz, bat"
#     req.get_fields(:foo) # => ["bar", "baz", "bat"]
#
# - Simple hash:
#
#     req[:foo] = {bar: 0, baz: 1, bat: 2}
#     req[:foo]            # => "bar, 0, baz, 1, bat, 2"
#     req.get_fields(:foo) # => ["bar", "0", "baz", "1", "bat", "2"]
#
# - Nested:
#
#     req[:foo] = [%w[bar baz], {bat: 0, bam: 1}]
#     req[:foo]            # => "bar, baz, bat, 0, bam, 1"
#     req.get_fields(:foo) # => ["bar", "baz", "bat", "0", "bam", "1"]
#
#     req[:foo] = {bar: %w[baz bat], bam: {bah: 0, bad: 1}}
#     req[:foo]            # => "bar, baz, bat, bam, bah, 0, bad, 1"
#     req.get_fields(:foo) # => ["bar", "baz", "bat", "bam", "bah", "0", "bad", "1"]
#
# == Convenience Methods
#
# Various convenience methods retrieve values, set values, query values,
# set form values, or iterate over fields.
#
# === Setters
#
# \Method #[]= can set any field, but does little to validate the new value;
# some of the other setter methods provide some validation:
#
# - #[]=: Sets the string or array value for the given key.
# - #add_field: Creates or adds to the array value for the given key.
# - #basic_auth: Sets the string authorization header for <tt>'Authorization'</tt>.
# - #content_length=: Sets the integer length for field <tt>'Content-Length</tt>.
# - #content_type=: Sets the string value for field <tt>'Content-Type'</tt>.
# - #proxy_basic_auth: Sets the string authorization header for <tt>'Proxy-Authorization'</tt>.
# - #set_range: Sets the value for field <tt>'Range'</tt>.
#
# === Form Setters
#
# - #set_form: Sets an HTML form data set.
# - #set_form_data: Sets header fields and a body from HTML form data.
#
# === Getters
#
# \Method #[] can retrieve the value of any field that exists,
# but always as a string;
# some of the other getter methods return something different
# from the simple string value:
#
# - #[]: Returns the string field value for the given key.
# - #content_length: Returns the integer value of field <tt>'Content-Length'</tt>.
# - #content_range: Returns the Range value of field <tt>'Content-Range'</tt>.
# - #content_type: Returns the string value of field <tt>'Content-Type'</tt>.
# - #fetch: Returns the string field value for the given key.
# - #get_fields: Returns the array field value for the given +key+.
# - #main_type: Returns first part of the string value of field <tt>'Content-Type'</tt>.
# - #sub_type: Returns second part of the string value of field <tt>'Content-Type'</tt>.
# - #range: Returns an array of Range objects of field <tt>'Range'</tt>, or +nil+.
# - #range_length: Returns the integer length of the range given in field <tt>'Content-Range'</tt>.
# - #type_params: Returns the string parameters for <tt>'Content-Type'</tt>.
#
# === Queries
#
# - #chunked?: Returns whether field <tt>'Transfer-Encoding'</tt> is set to <tt>'chunked'</tt>.
# - #connection_close?: Returns whether field <tt>'Connection'</tt> is set to <tt>'close'</tt>.
# - #connection_keep_alive?: Returns whether field <tt>'Connection'</tt> is set to <tt>'keep-alive'</tt>.
# - #key?: Returns whether a given key exists.
#
# === Iterators
#
# - #each_capitalized: Passes each field capitalized-name/value pair to the block.
# - #each_capitalized_name: Passes each capitalized field name to the block.
# - #each_header: Passes each field name/value pair to the block.
# - #each_name: Passes each field name to the block.
# - #each_value: Passes each string field value to the block.
#
module Net::HTTPHeader
  MAX_KEY_LENGTH = 1024
  MAX_FIELD_LENGTH = 65536

  def initialize_http_header(initheader) #:nodoc:
    @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 value: #{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 string field value for the case-insensitive field +key+,
  # or +nil+ if there is no such key;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Connection'] # => "keep-alive"
  #   res['Nosuch']     # => nil
  #
  # Note that some field values may be retrieved via convenience methods;
  # see {Getters}[rdoc-ref:Net::HTTPHeader@Getters].
  def [](key)
    a = @header[key.downcase.to_s] or return nil
    a.join(', ')
  end

  # Sets the value for the case-insensitive +key+ to +val+,
  # overwriting the previous value if the field exists;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req['Accept'] # => "*/*"
  #   req['Accept'] = 'text/html'
  #   req['Accept'] # => "text/html"
  #
  # Note that some field values may be set via convenience methods;
  # see {Setters}[rdoc-ref:Net::HTTPHeader@Setters].
  def []=(key, val)
    unless val
      @header.delete key.downcase.to_s
      return val
    end
    set_field(key, val)
  end

  # Adds value +val+ to the value array for field +key+ if the field exists;
  # creates the field with the given +key+ and +val+ if it does not exist.
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.add_field('Foo', 'bar')
  #   req['Foo']            # => "bar"
  #   req.add_field('Foo', 'baz')
  #   req['Foo']            # => "bar, baz"
  #   req.add_field('Foo', %w[baz bam])
  #   req['Foo']            # => "bar, baz, baz, bam"
  #   req.get_fields('Foo') # => ["bar", "baz", "baz", "bam"]
  #
  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

  # Returns the array field value for the given +key+,
  # or +nil+ if there is no such field;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.get_fields('Connection') # => ["keep-alive"]
  #   res.get_fields('Nosuch')     # => nil
  #
  def get_fields(key)
    stringified_downcased_key = key.downcase.to_s
    return nil unless @header[stringified_downcased_key]
    @header[stringified_downcased_key].dup
  end

  # call-seq:
  #   fetch(key, default_val = nil) {|key| ... } -> object
  #   fetch(key, default_val = nil) -> value or default_val
  #
  # With a block, returns the string value for +key+ if it exists;
  # otherwise returns the value of the block;
  # ignores the +default_val+;
  # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #
  #   # Field exists; block not called.
  #   res.fetch('Connection') do |value|
  #     fail 'Cannot happen'
  #   end # => "keep-alive"
  #
  #   # Field does not exist; block called.
  #   res.fetch('Nosuch') do |value|
  #     value.downcase
  #   end # => "nosuch"
  #
  # With no block, returns the string value for +key+ if it exists;
  # otherwise, returns +default_val+ if it was given;
  # otherwise raises an exception:
  #
  #   res.fetch('Connection', 'Foo') # => "keep-alive"
  #   res.fetch('Nosuch', 'Foo')     # => "Foo"
  #   res.fetch('Nosuch')            # Raises KeyError.
  #
  def fetch(key, *args, &block)   #:yield: +key+
    a = @header.fetch(key.downcase.to_s, *args, &block)
    a.kind_of?(Array) ? a.join(', ') : a
  end

  # Calls the block with each key/value pair:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.each_header do |key, value|
  #     p [key, value] if key.start_with?('c')
  #   end
  #
  # Output:
  #
  #   ["content-type", "application/json; charset=utf-8"]
  #   ["connection", "keep-alive"]
  #   ["cache-control", "max-age=43200"]
  #   ["cf-cache-status", "HIT"]
  #   ["cf-ray", "771d17e9bc542cf5-ORD"]
  #
  # Returns an enumerator if no block is given.
  #
  # Net::HTTPHeader#each is an alias for Net::HTTPHeader#each_header.
  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

  # Calls the block with each field key:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.each_key do |key|
  #     p key if key.start_with?('c')
  #   end
  #
  # Output:
  #
  #   "content-type"
  #   "connection"
  #   "cache-control"
  #   "cf-cache-status"
  #   "cf-ray"
  #
  # Returns an enumerator if no block is given.
  #
  # Net::HTTPHeader#each_name is an alias for Net::HTTPHeader#each_key.
  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

  # Calls the block with each capitalized field name:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.each_capitalized_name do |key|
  #     p key if key.start_with?('C')
  #   end
  #
  # Output:
  #
  #   "Content-Type"
  #   "Connection"
  #   "Cache-Control"
  #   "Cf-Cache-Status"
  #   "Cf-Ray"
  #
  # The capitalization is system-dependent;
  # see {Case Mapping}[rdoc-ref:case_mapping.rdoc].
  #
  # 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

  # Calls the block with each string field value:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.each_value do |value|
  #     p value if value.start_with?('c')
  #   end
  #
  # Output:
  #
  #   "chunked"
  #   "cf-q-config;dur=6.0000002122251e-06"
  #   "cloudflare"
  #
  # 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 the header for the given case-insensitive +key+
  # (see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]);
  # returns the deleted value, or +nil+ if no such field exists:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.delete('Accept') # => ["*/*"]
  #   req.delete('Nosuch') # => nil
  #
  def delete(key)
    @header.delete(key.downcase.to_s)
  end

  # Returns +true+ if the field for the case-insensitive +key+ exists, +false+ otherwise:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.key?('Accept') # => true
  #   req.key?('Nosuch') # => false
  #
  def key?(key)
    @header.key?(key.downcase.to_s)
  end

  # Returns a hash of the key/value pairs:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.to_hash
  #   # =>
  #   {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
  #    "accept"=>["*/*"],
  #    "user-agent"=>["Ruby"],
  #    "host"=>["jsonplaceholder.typicode.com"]}
  #
  def to_hash
    @header.dup
  end

  # Like #each_header, but the keys are returned in capitalized form.
  #
  # Net::HTTPHeader#canonical_each is an alias for Net::HTTPHeader#each_capitalized.
  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('-'.freeze).map {|s| s.capitalize }.join('-'.freeze)
  end
  private :capitalize

  # Returns an array of Range objects that represent
  # the value of field <tt>'Range'</tt>,
  # or +nil+ if there is no such field;
  # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req['Range'] = 'bytes=0-99,200-299,400-499'
  #   req.range # => [0..99, 200..299, 400..499]
  #   req.delete('Range')
  #   req.range # # => nil
  #
  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

  # call-seq:
  #   set_range(length) -> length
  #   set_range(offset, length) -> range
  #   set_range(begin..length) -> range
  #
  # Sets the value for field <tt>'Range'</tt>;
  # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]:
  #
  # With argument +length+:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.set_range(100)      # => 100
  #   req['Range']            # => "bytes=0-99"
  #
  # With arguments +offset+ and +length+:
  #
  #   req.set_range(100, 100) # => 100...200
  #   req['Range']            # => "bytes=100-199"
  #
  # With argument +range+:
  #
  #   req.set_range(100..199) # => 100..199
  #   req['Range']            # => "bytes=100-199"
  #
  # Net::HTTPHeader#range= is an alias for Net::HTTPHeader#set_range.
  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 the value of field <tt>'Content-Length'</tt> as an integer,
  # or +nil+ if there is no such field;
  # see {Content-Length request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-request-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/nosuch/1')
  #   res.content_length # => 2
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res.content_length # => nil
  #
  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

  # Sets the value of field <tt>'Content-Length'</tt> to the given numeric;
  # see {Content-Length response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-response-header]:
  #
  #   _uri = uri.dup
  #   hostname = _uri.hostname           # => "jsonplaceholder.typicode.com"
  #   _uri.path = '/posts'               # => "/posts"
  #   req = Net::HTTP::Post.new(_uri)    # => #<Net::HTTP::Post POST>
  #   req.body = '{"title": "foo","body": "bar","userId": 1}'
  #   req.content_length = req.body.size # => 42
  #   req.content_type = 'application/json'
  #   res = Net::HTTP.start(hostname) do |http|
  #     http.request(req)
  #   end # => #<Net::HTTPCreated 201 Created readbody=true>
  #
  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 field <tt>'Transfer-Encoding'</tt>
  # exists and has value <tt>'chunked'</tt>,
  # +false+ otherwise;
  # see {Transfer-Encoding response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#transfer-encoding-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Transfer-Encoding'] # => "chunked"
  #   res.chunked?             # => true
  #
  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 representing the value of field
  # <tt>'Content-Range'</tt>, or +nil+ if no such field exists;
  # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Content-Range'] # => nil
  #   res['Content-Range'] = 'bytes 0-499/1000'
  #   res['Content-Range'] # => "bytes 0-499/1000"
  #   res.content_range    # => 0..499
  #
  def content_range
    return nil unless @header['content-range']
    m = %r<\A\s*(\w+)\s+(\d+)-(\d+)/(\d+|\*)>.match(self['Content-Range']) or
        raise Net::HTTPHeaderSyntaxError, 'wrong Content-Range format'
    return unless m[1] == 'bytes'
    m[2].to_i .. m[3].to_i
  end

  # Returns the integer representing length of the value of field
  # <tt>'Content-Range'</tt>, or +nil+ if no such field exists;
  # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['Content-Range'] # => nil
  #   res['Content-Range'] = 'bytes 0-499/1000'
  #   res.range_length     # => 500
  #
  def range_length
    r = content_range() or return nil
    r.end - r.begin + 1
  end

  # Returns the {media type}[https://en.wikipedia.org/wiki/Media_type]
  # from the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.content_type    # => "application/json"
  #
  def content_type
    main = main_type()
    return nil unless main

    sub = sub_type()
    if sub
      "#{main}/#{sub}"
    else
      main
    end
  end

  # Returns the leading ('type') part of the
  # {media type}[https://en.wikipedia.org/wiki/Media_type]
  # from the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.main_type       # => "application"
  #
  def main_type
    return nil unless @header['content-type']
    self['Content-Type'].split(';').first.to_s.split('/')[0].to_s.strip
  end

  # Returns the trailing ('subtype') part of the
  # {media type}[https://en.wikipedia.org/wiki/Media_type]
  # from the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.sub_type        # => "json"
  #
  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

  # Returns the trailing ('parameters') part of the value of field <tt>'Content-Type'</tt>,
  # or +nil+ if no such field exists;
  # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
  #
  #   res = Net::HTTP.get_response(hostname, '/todos/1')
  #   res['content-type'] # => "application/json; charset=utf-8"
  #   res.type_params     # => {"charset"=>"utf-8"}
  #
  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 value of field <tt>'Content-Type'</tt>;
  # returns the new value;
  # see {Content-Type request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-request-header]:
  #
  #   req = Net::HTTP::Get.new(uri)
  #   req.set_content_type('application/json') # => ["application/json"]
  #
  # Net::HTTPHeader#content_type= is an alias for Net::HTTPHeader#set_content_type.
  def set_content_type(type, params = {})
    @header['content-type'] = [type + params.map{|k,v|"; #{k}=#{v}"}.join('')]
  end

  alias content_type= set_content_type

  # Sets the request body to a URL-encoded string derived from argument +params+,
  # and sets request header field <tt>'Content-Type'</tt>
  # to <tt>'application/x-www-form-urlencoded'</tt>.
  #
  # The resulting request is suitable for HTTP request +POST+ or +PUT+.
  #
  # Argument +params+ must be suitable for use as argument +enum+ to
  # {URI.encode_www_form}[rdoc-ref:URI.encode_www_form].
  #
  # With only argument +params+ given,
  # sets the body to a URL-encoded string with the default separator <tt>'&'</tt>:
  #
  #   req = Net::HTTP::Post.new('example.com')
  #
  #   req.set_form_data(q: 'ruby', lang: 'en')
  #   req.body            # => "q=ruby&lang=en"
  #   req['Content-Type'] # => "application/x-www-form-urlencoded"
  #
  #   req.set_form_data([['q', 'ruby'], ['lang', 'en']])
  #   req.body            # => "q=ruby&lang=en"
  #
  #   req.set_form_data(q: ['ruby', 'perl'], lang: 'en')
  #   req.body            # => "q=ruby&q=perl&lang=en"
  #
  #   req.set_form_data([['q', 'ruby'], ['q', 'perl'], ['lang', 'en']])
  #   req.body            # => "q=ruby&q=perl&lang=en"
  #
  # With string argument +sep+ also given,
  # uses that string as the separator:
  #
  #   req.set_form_data({q: 'ruby', lang: 'en'}, '|')
  #   req.body # => "q=ruby|lang=en"
  #
  # Net::HTTPHeader#form_data= is an alias for Net::HTTPHeader#set_form_data.
  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

  # Stores form data to be used in a +POST+ or +PUT+ request.
  #
  # The form data given in +params+ consists of zero or more fields;
  # each field is:
  #
  # - A scalar value.
  # - A name/value pair.
  # - An IO stream opened for reading.
  #
  # Argument +params+ should be an
  # {Enumerable}[rdoc-ref:Enumerable@Enumerable+in+Ruby+Classes]
  # (method <tt>params.map</tt> will be called),
  # and is often an array or hash.
  #
  # First, we set up a request:
  #
  #   _uri = uri.dup
  #   _uri.path ='/posts'
  #   req = Net::HTTP::Post.new(_uri)
  #
  # <b>Argument +params+ As an Array</b>
  #
  # When +params+ is an array,
  # each of its elements is a subarray that defines a field;
  # the subarray may contain:
  #
  # - One string:
  #
  #     req.set_form([['foo'], ['bar'], ['baz']])
  #
  # - Two strings:
  #
  #     req.set_form([%w[foo 0], %w[bar 1], %w[baz 2]])
  #
  # - When argument +enctype+ (see below) is given as
  #   <tt>'multipart/form-data'</tt>:
  #
  #   - A string name and an IO stream opened for reading:
  #
  #       require 'stringio'
  #       req.set_form([['file', StringIO.new('Ruby is cool.')]])
  #
  #   - A string name, an IO stream opened for reading,
  #     and an options hash, which may contain these entries:
  #
  #     - +:filename+: The name of the file to use.
  #     - +:content_type+: The content type of the uploaded file.
  #
  #     Example:
  #
  #       req.set_form([['file', file, {filename: "other-filename.foo"}]]
  #
  # The various forms may be mixed:
  #
  #   req.set_form(['foo', %w[bar 1], ['file', file]])
  #
  # <b>Argument +params+ As a Hash</b>
  #
  # When +params+ is a hash,
  # each of its entries is a name/value pair that defines a field:
  #
  # - The name is a string.
  # - The value may be:
  #
  #   - +nil+.
  #   - Another string.
  #   - An IO stream opened for reading
  #     (only when argument +enctype+ -- see below -- is given as
  #     <tt>'multipart/form-data'</tt>).
  #
  # Examples:
  #
  #   # Nil-valued fields.
  #   req.set_form({'foo' => nil, 'bar' => nil, 'baz' => nil})
  #
  #   # String-valued fields.
  #   req.set_form({'foo' => 0, 'bar' => 1, 'baz' => 2})
  #
  #   # IO-valued field.
  #   require 'stringio'
  #   req.set_form({'file' => StringIO.new('Ruby is cool.')})
  #
  #   # Mixture of fields.
  #   req.set_form({'foo' => nil, 'bar' => 1, 'file' => file})
  #
  # Optional argument +enctype+ specifies the value to be given
  # to field <tt>'Content-Type'</tt>, and must be one of:
  #
  # - <tt>'application/x-www-form-urlencoded'</tt> (the default).
  # - <tt>'multipart/form-data'</tt>;
  #   see {RFC 7578}[https://www.rfc-editor.org/rfc/rfc7578].
  #
  # Optional argument +formopt+ is a hash of options
  # (applicable only when argument +enctype+
  # is <tt>'multipart/form-data'</tt>)
  # that may include the following entries:
  #
  # - +:boundary+: The value is the boundary string for the multipart message.
  #   If not given, the boundary is a random string.
  #   See {Boundary}[https://www.rfc-editor.org/rfc/rfc7578#section-4.1].
  # - +:charset+: Value is the character set for the form submission.
  #   Field names and values of non-file fields should be encoded with this charset.
  #
  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

  # Sets header <tt>'Authorization'</tt> using the given
  # +account+ and +password+ strings:
  #
  #   req.basic_auth('my_account', 'my_password')
  #   req['Authorization']
  #   # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA=="
  #
  def basic_auth(account, password)
    @header['authorization'] = [basic_encode(account, password)]
  end

  # Sets header <tt>'Proxy-Authorization'</tt> using the given
  # +account+ and +password+ strings:
  #
  #   req.proxy_basic_auth('my_account', 'my_password')
  #   req['Proxy-Authorization']
  #   # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA=="
  #
  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

# Returns whether the HTTP session is to be closed.
  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

# Returns whether the HTTP session is to be kept alive.
  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
ruby/net/http/responses.rb000064400000116775150403134240011655 0ustar00# frozen_string_literal: true
#--
# https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

module Net

  class HTTPUnknownResponse < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPError                  #
  end

  # Parent class for informational (1xx) HTTP response classes.
  #
  # An informational response indicates that the request was received and understood.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.1xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#1xx_informational_response].
  #
  class HTTPInformation < HTTPResponse
    HAS_BODY = false
    EXCEPTION_TYPE = HTTPError                  #
  end

  # Parent class for success (2xx) HTTP response classes.
  #
  # A success response indicates the action requested by the client
  # was received, understood, and accepted.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.2xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_success].
  #
  class HTTPSuccess < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPError                  #
  end

  # Parent class for redirection (3xx) HTTP response classes.
  #
  # A redirection response indicates the client must take additional action
  # to complete the request.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.3xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection].
  #
  class HTTPRedirection < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPRetriableError         #
  end

  # Parent class for client error (4xx) HTTP response classes.
  #
  # A client error response indicates that the client may have caused an error.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.4xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_client_errors].
  #
  class HTTPClientError < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPClientException        #
  end

  # Parent class for server error (5xx) HTTP response classes.
  #
  # A server error response indicates that the server failed to fulfill a request.
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.5xx].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_server_errors].
  #
  class HTTPServerError < HTTPResponse
    HAS_BODY = true
    EXCEPTION_TYPE = HTTPFatalError             #
  end

  # Response class for +Continue+ responses (status code 100).
  #
  # A +Continue+ response indicates that the server has received the request headers.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-100-continue].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#100].
  #
  class HTTPContinue < HTTPInformation
    HAS_BODY = false
  end

  # Response class for <tt>Switching Protocol</tt> responses (status code 101).
  #
  # The <tt>Switching Protocol<tt> response indicates that the server has received
  # a request to switch protocols, and has agreed to do so.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/101].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.htmruby/net/http/response.rb000064400000046173150403134240011464 0ustar00rg/rfc/rfc2518#section-10.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#102].
  #
  class HTTPProcessing < HTTPInformation
    HAS_BODY = false
  end

  # Response class for <tt>Early Hints</tt> responses (status code 103).
  #
  # The <tt>Early Hints</tt> indicates that the server has received
  # and is processing the request, and contains certain headers;
  # the final response is not available yet.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103].
  # - {RFC 8297}[https://www.rfc-editor.org/rfc/rfc8297.html#section-2].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#103].
  #
  class HTTPEarlyHints < HTTPInformation
    HAS_BODY = false
  end

  # Response class for +OK+ responses (status code 200).
  #
  # The +OK+ response indicates that the server has received
  # a request and has responded successfully.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200].
  #
  class HTTPOK < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for +Created+ responses (status code 201).
  #
  # The +Created+ response indicates that the server has received
  # and has fulfilled a request to create a new resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-201-created].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201].
  #
  class HTTPCreated < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for +Accepted+ responses (status code 202).
  #
  # The +Accepted+ response indicates that the server has received
  # and is processing a request, but the processing has not yet been completed.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-202-accepted].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202].
  #
  class HTTPAccepted < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>Non-Authoritative Information</tt> responses (status code 203).
  #
  # The <tt>Non-Authoritative Information</tt> response indicates that the server
  # is a transforming proxy (such as a Web accelerator)
  # that received a 200 OK response from its origin,
  # and is returning a modified version of the origin's response.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/203].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-203-non-authoritative-infor].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203].
  #
  class HTTPNonAuthoritativeInformation < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>No Content</tt> responses (status code 204).
  #
  # The <tt>No Content</tt> response indicates that the server
  # successfully processed the request, and is not returning any content.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-204-no-content].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204].
  #
  class HTTPNoContent < HTTPSuccess
    HAS_BODY = false
  end

  # Response class for <tt>Reset Content</tt> responses (status code 205).
  #
  # The <tt>Reset Content</tt> response indicates that the server
  # successfully processed the request,
  # asks that the client reset its document view, and is not returning any content.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/205].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-205-reset-content].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205].
  #
  class HTTPResetContent < HTTPSuccess
    HAS_BODY = false
  end

  # Response class for <tt>Partial Content</tt> responses (status code 206).
  #
  # The <tt>Partial Content</tt> response indicates that the server is delivering
  # only part of the resource (byte serving)
  # due to a Range header in the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-206-partial-content].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206].
  #
  class HTTPPartialContent < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>Multi-Status (WebDAV)</tt> responses (status code 207).
  #
  # The <tt>Multi-Status (WebDAV)</tt> response indicates that the server
  # has received the request,
  # and that the message body can contain a number of separate response codes.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 4818}[https://www.rfc-editor.org/rfc/rfc4918#section-11.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207].
  #
  class HTTPMultiStatus < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>Already Reported (WebDAV)</tt> responses (status code 208).
  #
  # The <tt>Already Reported (WebDAV)</tt> response indicates that the server
  # has received the request,
  # and that the members of a DAV binding have already been enumerated
  # in a preceding part of the (multi-status) response,
  # and are not being included again.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 5842}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208].
  #
  class HTTPAlreadyReported < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>IM Used</tt> responses (status code 226).
  #
  # The <tt>IM Used</tt> response indicates that the server has fulfilled a request
  # for the resource, and the response is a representation of the result
  # of one or more instance-manipulations applied to the current instance.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 3229}[https://www.rfc-editor.org/rfc/rfc3229.html#section-10.4.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226].
  #
  class HTTPIMUsed < HTTPSuccess
    HAS_BODY = true
  end

  # Response class for <tt>Multiple Choices</tt> responses (status code 300).
  #
  # The <tt>Multiple Choices</tt> response indicates that the server
  # offers multiple options for the resource from which the client may choose.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-300-multiple-choices].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
  #
  class HTTPMultipleChoices < HTTPRedirection
    HAS_BODY = true
  end
  HTTPMultipleChoice = HTTPMultipleChoices

  # Response class for <tt>Moved Permanently</tt> responses (status code 301).
  #
  # The <tt>Moved Permanently</tt> response indicates that links or records
  # returning this response should be updated to use the given URL.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-301-moved-permanently].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
  #
  class HTTPMovedPermanently < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Found</tt> responses (status code 302).
  #
  # The <tt>Found</tt> response indicates that the client
  # should look at (browse to) another URL.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-302-found].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
  #
  class HTTPFound < HTTPRedirection
    HAS_BODY = true
  end
  HTTPMovedTemporarily = HTTPFound

  # Response class for <tt>See Other</tt> responses (status code 303).
  #
  # The response to the request can be found under another URI using the GET method.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-303-see-other].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
  #
  class HTTPSeeOther < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Not Modified</tt> responses (status code 304).
  #
  # Indicates that the resource has not been modified since the version
  # specified by the request headers.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-304-not-modified].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
  #
  class HTTPNotModified < HTTPRedirection
    HAS_BODY = false
  end

  # Response class for <tt>Use Proxy</tt> responses (status code 305).
  #
  # The requested resource is available only through a proxy,
  # whose address is provided in the response.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-305-use-proxy].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
  #
  class HTTPUseProxy < HTTPRedirection
    HAS_BODY = false
  end

  # Response class for <tt>Temporary Redirect</tt> responses (status code 307).
  #
  # The request should be repeated with another URI;
  # however, future requests should still use the original URI.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-307-temporary-redirect].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
  #
  class HTTPTemporaryRedirect < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Permanent Redirect</tt> responses (status code 308).
  #
  # This and all future requests should be directed to the given URI.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-308-permanent-redirect].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
  #
  class HTTPPermanentRedirect < HTTPRedirection
    HAS_BODY = true
  end

  # Response class for <tt>Bad Request</tt> responses (status code 400).
  #
  # The server cannot or will not process the request due to an apparent client error.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#400].
  #
  class HTTPBadRequest < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Unauthorized</tt> responses (status code 401).
  #
  # Authentication is required, but either was not provided or failed.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#401].
  #
  class HTTPUnauthorized < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Payment Required</tt> responses (status code 402).
  #
  # Reserved for future use.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-402-payment-required].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#402].
  #
  class HTTPPaymentRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Forbidden</tt> responses (status code 403).
  #
  # The request contained valid data and was understood by the server,
  # but the server is refusing action.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#403].
  #
  class HTTPForbidden < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Not Found</tt> responses (status code 404).
  #
  # The requested resource could not be found but may be available in the future.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#404].
  #
  class HTTPNotFound < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Method Not Allowed</tt> responses (status code 405).
  #
  # The request method is not supported for the requested resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-405-method-not-allowed].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#405].
  #
  class HTTPMethodNotAllowed < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Not Acceptable</tt> responses (status code 406).
  #
  # The requested resource is capable of generating only content
  # that not acceptable according to the Accept headers sent in the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#406].
  #
  class HTTPNotAcceptable < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Proxy Authentication Required</tt> responses (status code 407).
  #
  # The client must first authenticate itself with the proxy.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/407].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-407-proxy-authentication-re].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#407].
  #
  class HTTPProxyAuthenticationRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Request Timeout</tt> responses (status code 408).
  #
  # The server timed out waiting for the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-408-request-timeout].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#408].
  #
  class HTTPRequestTimeout < HTTPClientError
    HAS_BODY = true
  end
  HTTPRequestTimeOut = HTTPRequestTimeout

  # Response class for <tt>Conflict</tt> responses (status code 409).
  #
  # The request could not be processed because of conflict in the current state of the resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#409].
  #
  class HTTPConflict < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Gone</tt> responses (status code 410).
  #
  # The resource requested was previously in use but is no longer available
  # and will not be available again.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-410-gone].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#410].
  #
  class HTTPGone < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Length Required</tt> responses (status code 411).
  #
  # The request did not specify the length of its content,
  # which is required by the requested resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/411].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-411-length-required].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#411].
  #
  class HTTPLengthRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Precondition Failed</tt> responses (status code 412).
  #
  # The server does not meet one of the preconditions
  # specified in the request headers.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-412-precondition-failed].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#412].
  #
  class HTTPPreconditionFailed < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Payload Too Large</tt> responses (status code 413).
  #
  # The request is larger than the server is willing or able to process.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-413-content-too-large].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#413].
  #
  class ruby/open3.rb000064400000054160150403134240007100 0ustar00t support.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-415-unsupported-media-type].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#415].
  #
  class HTTPUnsupportedMediaType < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Range Not Satisfiable</tt> responses (status code 416).
  #
  # The request entity has a media type which the server or resource does not support.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-416-range-not-satisfiable].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#416].
  #
  class HTTPRangeNotSatisfiable < HTTPClientError
    HAS_BODY = true
  end
  HTTPRequestedRangeNotSatisfiable = HTTPRangeNotSatisfiable

  # Response class for <tt>Expectation Failed</tt> responses (status code 417).
  #
  # The server cannot meet the requirements of the Expect request-header field.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/417].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-417-expectation-failed].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#417].
  #
  class HTTPExpectationFailed < HTTPClientError
    HAS_BODY = true
  end

  # 418 I'm a teapot - RFC 2324; a joke RFC
  # See https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#418.

  # 420 Enhance Your Calm - Twitter

  # Response class for <tt>Misdirected Request</tt> responses (status code 421).
  #
  # The request was directed at a server that is not able to produce a response.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-421-misdirected-request].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#421].
  #
  class HTTPMisdirectedRequest < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Unprocessable Entity</tt> responses (status code 422).
  #
  # The request was well-formed but had semantic errors.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-422-unprocessable-content].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#422].
  #
  class HTTPUnprocessableEntity < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Locked (WebDAV)</tt> responses (status code 423).
  #
  # The requested resource is locked.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.3].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#423].
  #
  class HTTPLocked < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Failed Dependency (WebDAV)</tt> responses (status code 424).
  #
  # The request failed because it depended on another request and that request failed.
  # See {424 Failed Dependency (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#424].
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.4].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#424].
  #
  class HTTPFailedDependency < HTTPClientError
    HAS_BODY = true
  end

  # 425 Too Early
  # https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#425.

  # Response class for <tt>Upgrade Required</tt> responses (status code 426).
  #
  # The client should switch to the protocol given in the Upgrade header field.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/426].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-426-upgrade-required].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#426].
  #
  class HTTPUpgradeRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Precondition Required</tt> responses (status code 428).
  #
  # The origin server requires the request to be conditional.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/428].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-3].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#428].
  #
  class HTTPPreconditionRequired < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Too Many Requests</tt> responses (status code 429).
  #
  # The user has sent too many requests in a given amount of time.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-4].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429].
  #
  class HTTPTooManyRequests < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Request Header Fields Too Large</tt> responses (status code 431).
  #
  # An individual header field is too large,
  # or all the header fields collectively, are too large.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/431].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-5].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#431].
  #
  class HTTPRequestHeaderFieldsTooLarge < HTTPClientError
    HAS_BODY = true
  end

  # Response class for <tt>Unavailable For Legal Reasons</tt> responses (status code 451).
  #
  # A server operator has received a legal demand to deny access to a resource or to a set of resources
  # that includes the requested resource.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/451].
  # - {RFC 7725}[https://www.rfc-editor.org/rfc/rfc7725.html#section-3].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#451].
  #
  class HTTPUnavailableForLegalReasons < HTTPClientError
    HAS_BODY = true
  end
  # 444 No Response - Nginx
  # 449 Retry With - Microsoft
  # 450 Blocked by Windows Parental Controls - Microsoft
  # 499 Client Closed Request - Nginx

  # Response class for <tt>Internal Server Error</tt> responses (status code 500).
  #
  # An unexpected condition was encountered and no more specific message is suitable.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#500].
  #
  class HTTPInternalServerError < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Not Implemented</tt> responses (status code 501).
  #
  # The server either does not recognize the request method,
  # or it lacks the ability to fulfil the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-501-not-implemented].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#501].
  #
  class HTTPNotImplemented < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Bad Gateway</tt> responses (status code 502).
  #
  # The server was acting as a gateway or proxy
  # and received an invalid response from the upstream server.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-502-bad-gateway].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502].
  #
  class HTTPBadGateway < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Service Unavailable</tt> responses (status code 503).
  #
  # The server cannot handle the request
  # (because it is overloaded or down for maintenance).
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#503].
  #
  class HTTPServiceUnavailable < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Gateway Timeout</tt> responses (status code 504).
  #
  # The server was acting as a gateway or proxy
  # and did not receive a timely response from the upstream server.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-504-gateway-timeout].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#504].
  #
  class HTTPGatewayTimeout < HTTPServerError
    HAS_BODY = true
  end
  HTTPGatewayTimeOut = HTTPGatewayTimeout

  # Response class for <tt>HTTP Version Not Supported</tt> responses (status code 505).
  #
  # The server does not support the HTTP version used in the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/505].
  # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-505-http-version-not-suppor].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#505].
  #
  class HTTPVersionNotSupported < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Variant Also Negotiates</tt> responses (status code 506).
  #
  # Transparent content negotiation for the request results in a circular reference.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/506].
  # - {RFC 2295}[https://www.rfc-editor.org/rfc/rfc2295#section-8.1].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#506].
  #
  class HTTPVariantAlsoNegotiates < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Insufficient Storage (WebDAV)</tt> responses (status code 507).
  #
  # The server is unable to store the representation needed to complete the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/507].
  # - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.5].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#507].
  #
  class HTTPInsufficientStorage < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Loop Detected (WebDAV)</tt> responses (status code 508).
  #
  # The server detected an infinite loop while processing the request.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508].
  # - {RFC 5942}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.2].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#508].
  #
  class HTTPLoopDetected < HTTPServerError
    HAS_BODY = true
  end
  # 509 Bandwidth Limit Exceeded - Apache bw/limited extension

  # Response class for <tt>Not Extended</tt> responses (status code 510).
  #
  # Further extensions to the request are required for the server to fulfill it.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/510].
  # - {RFC 2774}[https://www.rfc-editor.org/rfc/rfc2774.html#section-7].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#510].
  #
  class HTTPNotExtended < HTTPServerError
    HAS_BODY = true
  end

  # Response class for <tt>Network Authentication Required</tt> responses (status code 511).
  #
  # The client needs to authenticate to gain network access.
  #
  # :include: doc/net-http/included_getters.rdoc
  #
  # References:
  #
  # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/511].
  # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-6].
  # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#511].
  #
  class HTTPNetworkAuthenticationRequired < HTTPServerError
    HAS_BODY = true
  end

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
ruby/net/http/response.rb000064400000046173150403134240011464 0ustar00# frozen_string_literal: true

# This class is the base class for \Net::HTTP response classes.
#
# == About the Examples
#
# :include: doc/net-http/examples.rdoc
#
# == Returned Responses
#
# \Method Net::HTTP.get_response returns
# an instance of one of the subclasses of \Net::HTTPResponse:
#
#   Net::HTTP.get_response(uri)
#   # => #<Net::HTTPOK 200 OK readbody=true>
#   Net::HTTP.get_response(hostname, '/nosuch')
#   # => #<Net::HTTPNotFound 404 Not Found readbody=true>
#
# As does method Net::HTTP#request:
#
#   req = Net::HTTP::Get.new(uri)
#   Net::HTTP.start(hostname) do |http|
#     http.request(req)
#   end # => #<Net::HTTPOK 200 OK readbody=true>
#
# \Class \Net::HTTPResponse includes module Net::HTTPHeader,
# which provides access to response header values via (among others):
#
# - \Hash-like method <tt>[]</tt>.
# - Specific reader methods, such as +content_type+.
#
# Examples:
#
#   res = Net::HTTP.get_response(uri) # => #<Net::HTTPOK 200 OK readbody=true>
#   res['Content-Type']               # => "text/html; charset=UTF-8"
#   res.content_type                  # => "text/html"
#
# == Response Subclasses
#
# \Class \Net::HTTPResponse has a subclass for each
# {HTTP status code}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes].
# You can look up the response class for a given code:
#
#   Net::HTTPResponse::CODE_TO_OBJ['200'] # => Net::HTTPOK
#   Net::HTTPResponse::CODE_TO_OBJ['400'] # => Net::HTTPBadRequest
#   Net::HTTPResponse::CODE_TO_OBJ['404'] # => Net::HTTPNotFound
#
# And you can retrieve the status code for a response object:
#
#   Net::HTTP.get_response(uri).code                 # => "200"
#   Net::HTTP.get_response(hostname, '/nosuch').code # => "404"
#
# The response subclasses (indentation shows class hierarchy):
#
# - Net::HTTPUnknownResponse (for unhandled \HTTP extensions).
#
# - Net::HTTPInformation:
#
#   - Net::HTTPContinue (100)
#   - Net::HTTPSwitchProtocol (101)
#   - Net::HTTPProcessing (102)
#   - Net::HTTPEarlyHints (103)
#
# - Net::HTTPSuccess:
#
#   - Net::HTTPOK (200)
#   - Net::HTTPCreated (201)
#   - Net::HTTPAccepted (202)
#   - Net::HTTPNonAuthoritativeInformation (203)
#   - Net::HTTPNoContent (204)
#   - Net::HTTPResetContent (205)
#   - Net::HTTPPartialContent (206)
#   - Net::HTTPMultiStatus (207)
#   - Net::HTTPAlreadyReported (208)
#   - Net::HTTPIMUsed (226)
#
# - Net::HTTPRedirection:
#
#   - Net::HTTPMultipleChoices (300)
#   - Net::HTTPMovedPermanently (301)
#   - Net::HTTPFound (302)
#   - Net::HTTPSeeOther (303)
#   - Net::HTTPNotModified (304)
#   - Net::HTTPUseProxy (305)
#   - Net::HTTPTemporaryRedirect (307)
#   - Net::HTTPPermanentRedirect (308)
#
# - Net::HTTPClientError:
#
#   - Net::HTTPBadRequest (400)
#   - Net::HTTPUnauthorized (401)
#   - Net::HTTPPaymentRequired (402)
#   - Net::HTTPForbidden (403)
#   - Net::HTTPNotFound (404)
#   - Net::HTTPMethodNotAllowed (405)
#   - Net::HTTPNotAcceptable (406)
#   - Net::HTTPProxyAuthenticationRequired (407)
#   - Net::HTTPRequestTimeOut (408)
#   - Net::HTTPConflict (409)
#   - Net::HTTPGone (410)
#   - Net::HTTPLengthRequired (411)
#   - Net::HTTPPreconditionFailed (412)
#   - Net::HTTPRequestEntityTooLarge (413)
#   - Net::HTTPRequestURITooLong (414)
#   - Net::HTTPUnsupportedMediaType (415)
#   - Net::HTTPRequestedRangeNotSatisfiable (416)
#   - Net::HTTPExpectationFailed (417)
#   - Net::HTTPMisdirectedRequest (421)
#   - Net::HTTPUnprocessableEntity (422)
#   - Net::HTTPLocked (423)
#   - Net::HTTPFailedDependency (424)
#   - Net::HTTPUpgradeRequired (426)
#   - Net::HTTPPreconditionRequired (428)
#   - Net::HTTPTooManyRequests (429)
#   - Net::HTTPRequestHeaderFieldsTooLarge (431)
#   - Net::HTTPUnavailableForLegalReasons (451)
#
# - Net::HTTPServerError:
#
#   - Net::HTTPInternalServerError (500)
#   - Net::HTTPNotImplemented (501)
#   - Net::HTTPBadGateway (502)
#   - Net::HTTPServiceUnavailable (503)
#   - Net::HTTPGatewayTimeOut (504)
#   - Net::HTTPVersionNotSupported (505)
#   - Net::HTTPVariantAlsoNegotiates (506)
#   - Net::HTTPInsufficientStorage (507)
#   - Net::HTTPLoopDetected (508)
#   - Net::HTTPNotExtended (510)
#   - Net::HTTPNetworkAuthenticationRequired (511)
#
# There is also the Net::HTTPBadResponse exception which is raised when
# there is a protocol error.
#
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
    @body_encoding = false
    @ignore_eof = true
  end

  # The HTTP version supported by the server.
  attr_reader :http_version

  # The HTTP result code string. For example, '302'.  You can also
  # determine thruby/did_you_mean.rb000064400000012500150403134240010500 0ustar00  #   will be used.
  # - Otherwise an encoding will be deduced from the body itself.
  #
  # Examples:
  #
  #   http = Net::HTTP.new(hostname)
  #   req = Net::HTTP::Get.new('/')
  #
  #   http.request(req) do |res|
  #     p res.body.encoding # => #<Encoding:ASCII-8BIT>
  #   end
  #
  #   http.request(req) do |res|
  #     res.body_encoding = "UTF-8"
  #     p res.body.encoding # => #<Encoding:UTF-8>
  #   end
  #
  def body_encoding=(value)
    value = Encoding.find(value) if value.is_a?(String)
    @body_encoding = value
  end

  # Whether to ignore EOF when reading bodies with a specified Content-Length
  # header.
  attr_accessor :ignore_eof

  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} #{@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 <code>dest#<<</code> method (it could be String or IO, or any
  # other object responding to <code><<</code>).
  #
  # 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
    return if @body.nil?

    case enc = @body_encoding
    when Encoding, false, nil
      # Encoding: force given encoding
      # false/nil: do not force encoding
    else
      # other value: detect encoding from body
      enc = detect_encoding(@body)
    end

    @body.force_encoding(enc) if enc

    @body
  end

  # Returns the string response body;
  # note that repeated calls for the unmodified body return a cached string:
  #
  #   path = '/todos/1'
  #   Net::HTTP.start(hostname) do |http|
  #     res = http.get(path)
  #     p res.body
  #     p http.head(path).body # No body.
  #   end
  #
  # Output:
  #
  #   "{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false\n}"
  #   nil
  #
  def body
    read_body()
  end

  # Sets the body of the response to the given value.
  def body=(value)
    @body = value
  end

  alias entity body   #:nodoc: obsolete

  private

  # :nodoc:
  def detect_encoding(str, encoding=nil)
    if encoding
    elsif encoding = type_params['charset']
    elsif encoding = check_bom(str)
    else
      encoding = case content_type&.downcase
      when %r{text/x(?:ht)?ml|application/(?:[^+]+\+)?xml}
        /\A<xml[ \t\r\n]+
          version[ \t\r\n]*=[ \t\r\n]*(?:"[0-9.]+"|'[0-9.]*')[ \t\r\n]+
          encoding[ \t\r\n]*=[ \t\r\n]*
          (?:"([A-Za-z][\-A-Za-z0-9._]*)"|'([A-Za-z][\-A-Za-z0-9._]*)')/x =~ str
        encoding = $1 || $2 || Encoding::UTF_8
      when %r{text/html.*}
        sniff_encoding(str)
      end
    end
    return encoding
  end

  # :nodoc:
  def sniff_encoding(str, encoding=nil)
    # the encoding sniffing algorithm
    # http://www.w3.org/TR/html5/parsing.html#determining-the-character-encoding
    if enc = scanning_meta(str)
      enc
    # 6. last visited page or something
    # 7. frequency
    elsif str.ascii_only?
      Encoding::US_ASCII
    elsif str.dup.force_encoding(Encoding::UTF_8).valid_encoding?
      Encoding::UTF_8
    end
    # 8. implementation-defined or user-specified
  end

  # :nodoc:
  def check_bom(str)
    case str.byteslice(0, 2)
    when "\xFE\xFF"
      return Encoding::UTF_16BE
    when "\xFF\xFE"
      return Encoding::UTF_16LE
    end
    if "\xEF\xBB\xBF" == str.byteslice(0, 3)
      return Eruby/drb/version.rb000064400000000043150403134240010277 0ustar00true
        when 'charset'
       ruby/drb/timeridconv.rb000064400000004245150403134240011145 0ustar00 >]+/)
      value.downcase!
    end
    [name, value]
  end

  def extracting_encodings_from_meta_elements(value)
    # http://dev.w3.org/html5/spec/fetching-resources.html#algorithm-for-extracting-an-encoding-from-a-meta-element
    if /charset[\t\n\f\r ]*=(?:"([^"]*)"|'([^']*)'|["']|\z|([^\t\n\f\r ;]+))/i =~ value
      return $1 || $2 || $3
    end
    return nil
  end

  ##
  # 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
          if self['content-length']
            self['content-length'] = inflate_body_io.bytes_inflated.to_s
          end
        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, @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 bruby/drb/eq.rb000064400000000423150403134240007221 0ustar00
    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 withruby/drb/invokemethod.rb000064400000001411150403134240011306 0ustar00.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/6ruby/drb/extservm.rb000064400000003467150403134240010504 0ustar00ruby/open3.rb000064400000137013150403134240007077 0ustar00# 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
#

require 'open3/version'

# \Module \Open3 supports creating child processes
# with access to their $stdin, $stdout, and $stderr streams.ruby/drb/gw.rb000064400000006005150403134240007233 0ustar00turns pipes for $stdin, $stdout, and/or $stderr:
#
#   - Open3.popen2: Executes the command;
#     returns pipes for $stdin and $stdout.
#   - Open3.popen2e: Executes the command;
#     returns pipes for $stdin and merged $stdout and $stderr.
#   - Open3.popen3: Executes the command;
#     returns pipes for $stdin, $stdout, and $stderr.
#
# - Each of these methods executes one or more commands in processes and/or subshells,
#   returns pipes for the first $stdin, the last $stdout, or both:
#
#   - Open3.pipeline_r: Returns a pipe for the last $stdout.
#   - Open3.pipeline_rw: Returns pipes for the first $stdin and the last $stdout.
#   - Open3.pipeline_w: Returns a pipe for the first $stdin.
#   - Open3.pipeline_start: Does not wait for processes to complete.
#   - Open3.pipeline: Waits for processes to complete.
#
# Each of the methods above accepts:
#
# - An optional hash of environment variable names and values;
#   see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
# - A required string argument that is a +command_line+ or +exe_path+;
#   see {Argument command_line or exe_path}[rdoc-ref:Process@Argument+command_line+or+exe_path].
# - An optional hash of execution options;
#   see {Execution Options}[rdoc-ref:Process@Execution+Options].
#
module Open3

  # :call-seq:
  #   Open3.popen3([env, ] command_line, options = {}) -> [stdin, stdout, stderr, wait_thread]
  #   Open3.popen3([env, ] exe_path, *args, options = {}) -> [stdin, stdout, stderr, wait_thread]
  #   Open3.popen3([env, ] command_line, options = {}) {|stdin, stdout, stderr, wait_thread| ... } -> object
  #   Open3.popen3([env, ] exe_path, *args, options = {}) {|stdin, stdout, stderr, wait_thread| ... } -> object
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process, by calling Process.spawn with the given arguments.
  # - Creates streams +stdin+, +stdout+, and +stderr+,
  #   which are the standard input, standard output, and standard error streams
  #   in the child process.
  # - Creates thread +wait_thread+ that waits for the child process to exit;
  #   the thread has method +pid+, which returns the process ID
  #   of the child process.
  #
  # With no block given, returns the array
  # <tt>[stdin, stdout, stderr, wait_thread]</tt>.
  # The caller should close each of the three returned streams.
  #
  #   stdin, stdout, stderr, wait_thread = Open3.popen3('echo')
  #   # => [#<IO:fd 8>, #<IO:fd 10>, #<IO:fd 12>, #<Process::Waiter:0x00007f58d5428f58 run>]
  #   stdin.close
  #   stdout.close
  #   stderr.close
  #   wait_thread.pid   # => 2210481
  #   wait_thread.value # => #<Process::Status: pid 2210481 exit 0>
  #
  # With a block given, calls the block with the four variables
  # (three streams and the wait thread)
  # and returns the block's return value.
  # The caller need not close the streams:
  #
  #   Open3.popen3('echo') do |stdin, stdout, stderr, wait_thread|
  #     p stdin
  #     p stdout
  #     p stderr
  #     p wait_thread
  #     p wait_thread.pid
  # ruby/drb/acl.rb000064400000011161150403134240007354 0ustar00t begins with a shell reserved word or special built-in,
  #   or if it contains one or more metacharacters.
  # - +exe_path+ otherwise.
  #
  # <b>Argument +command_line+</b>
  #
  # \String argument +command_line+ is a command line to be passed to a shell;
  # it must begin with a shell reserved word, begin with a special built-in,
  # or contain meta characters:
  #
  #   Open3.popen3('if true; then echo "Foo"; fi') {|*args| p args } # Shell reserved word.
  #   Open3.popen3('echo') {|*args| p args }                         # Built-in.
  #   Open3.popen3('date > date.tmp') {|*args| p args }              # Contains meta character.
  #
  # Output (similar for each call above):
  #
  #   [#<IO:(closed)>, #<IO:(closed)>, #<IO:(closed)>, #<Process::Waiter:0x00007f58d52f28c8 dead>]
  #
  # The command line may also contain arguments and options for the command:
  #
  #   Open3.popen3('echo "Foo"') { |i, o, e, t| o.gets }
  #   "Foo\n"
  #
  # <b>Argument +exe_path+</b>
  #
  # Argument +exe_path+ is one of the following:
  #
  # - The string path to an executable to be called.
  # - A 2-element array containing the path to an executable
  #   and the string to be used as the name of the executing process.
  #
  # Example:
  #
  #   Open3.popen3('/usr/bin/date') { |i, o, e, t| o.gets }
  #   # => "Wed Sep 27 02:56:44 PM CDT 2023\n"
  #
  # Ruby invokes the executable directly, with no shell and no shell expansion:
  #
  #   Open3.popen3('doesnt_exist') { |i, o, e, t| o.gets } # Raises Errno::ENOENT
  #
  # If one or more +args+ is given, each is an argument or option
  # to be passed to the executable:
  #
  #   Open3.popen3('echo', 'C #') { |i, o, e, t| o.gets }
  #   # => "C #\n"
  #   Open3.popen3('echo', 'hello', 'world') { |i, o, e, t| o.gets }
  #   # => "hello world\n"
  #
  # Take care to avoid deadlocks.
  # Output streams +stdout+ and +stderr+ have fixed-size buffers,
  # so reading extensively from one but not the other can cause a deadlock
  # when the unread buffer fills.
  # To avoid that, +stdout+ and +stderr+ should be read simultaneously
  # (using threads or IO.select).
  #
  # Related:
  #
  # - Open3.popen2: Makes the standard input and standard output streams
  #   of the child process available as separate streams,
  #   with no access to the standard error stream.
  # - Open3.popen2e: Makes the standard input and the merge
  #   of the standard output and standard error streams
  #   of the child process available as separate streams.
  #
  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

  # :call-seq:
  #   Open3.popen2([env, ] command_line, options = {}) -> [stdin, stdout, wait_thread]
  #   Open3.popen2([env, ] exe_path, *args, options = {}) -> [stdin, stdout, wait_thread]
  #   Open3.popen2([env, ] command_line, options = {}) {|stdin, stdout, wait_thread| ... } -> object
  #   Open3.popen2([env, ] exe_path, *args, options = {}) {|stdin, stdout, wait_thread| ... } -> object
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process, by calling Process.spawn with the given arguments.
  # - Creates streams +stdin+ and +stdout+,
  #   which are the standard input and standard output streams
  #   in the child process.
  # - Creates thread +wait_thread+ that waits for the child process to exit;
  #   the thread has method +pid+, which returns the process ID
  #   of the child process.
  #
  # With no block given, returns the array
  # <tt>[stdin, stdout, wait_thread]</tt>.
  # The caller should close each of the two returned streams.
  #
  #   stdin, stdout, wait_thread = Open3.popen2('echo')
  #   # => [#<IO:fd 6>, #<IO:fd 7>, #<Process::Waiter:0x00007f58d52dbe98 run>]
  #   stdin.close
  #   stdout.close
  #   wait_thread.pid   # => 2263572
  #   wait_thread.value # => #<Process::Status: pid 2263572 exit 0>
  #
  # With a block given, calls the block with the three variables
  # (two streams and the wait thread)
  # and returns the block's return value.
  # The caller need not close the streams:
  #
  #   Open3.popen2('echo') do |stdin, stdout, wait_thread|
  #     p stdin
  #     p stdout
  #     p wait_thread
  #     p wait_thread.pid
  #     p wait_thread.value
  #   end
  #
  # Output:
  #
  #   #<IO:fd 6>
  #   #<IO:fd 7>
  #   #<Process::Waiter:0x00007f58d59a34b0 sleep>
  #   2263636
  #   #<Process::Status: pid 2ruby/drb/weakidconv.rb000064400000002175150403134240010754 0ustar00e metacharacters.
  # - +exe_path+ otherwise.
  #
  # <b>Argument +command_line+</b>
  #
  # \String argument +command_line+ is a command line to be passed to a shell;
  # it must begin with a shell reserved word, begin with a special built-in,
  # or contain meta characters:
  #
  #   Open3.popen2('if true; then echo "Foo"; fi') {|*args| p args } # Shell reserved word.
  #   Open3.popen2('echo') {|*args| p args }                         # Built-in.
  #   Open3.popen2('date > date.tmp') {|*args| p args }              # Contains meta character.
  #
  # Output (similar for each call above):
  #
  #   # => [#<IO:(closed)>, #<IO:(closed)>, #<Process::Waiter:0x00007f7577dfe410 dead>]
  #
  # The command line may also contain arguments and options for the command:
  #
  #   Open3.popen2('echo "Foo"') { |i, o, t| o.gets }
  #   "Foo\n"
  #
  # <b>Argument +exe_path+</b>
  #
  # Argument +exe_path+ is one of the following:
  #
  # - The string path to an executable to be called.
  # - A 2-element array containing the path to an executable
  #   and the string to be used as the name of the executing process.
  #
  # Example:
  #
  #   Open3ruby/drb/ssl.rb000064400000027022150403134240007421 0ustar00 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

  # :call-seq:
  #   Open3.popen2e([env, ] command_line, options = {}) -> [stdin, stdout_and_stderr, wait_thread]
  #   Open3.popen2e([env, ] exe_path, *args, options = {}) -> [stdin, stdout_and_stderr, wait_thread]
  #   Open3.popen2e([env, ] command_line, options = {}) {|stdin, stdout_and_stderr, wait_thread| ... } -> object
  #   Open3.popen2e([env, ] exe_path, *args, options = {}) {|stdin, stdout_and_stderr, wait_thread| ... } -> object
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process, by calling Process.spawn with the given arguments.
  # - Creates streams +stdin+, +stdout_and_stderr+,
  #   which are the standard input and the merge of the standard output
  #   and standard error streams in the child process.
  # - Creates thread +wait_thread+ that waits for the child process to exit;
  #   the thread has method +pid+, which returns the process ID
  #   of the child process.
  #
  # With no block given, returns the array
  # <tt>[stdin, stdout_and_stderr, wait_thread]</tt>.
  # The caller should close each of the two returned streams.
  #
  #   stdin, stdout_and_stderr, wait_thread = Open3.popen2e('echo')
  #   # => [#<IO:fd 6>, #<IO:fd 7>, #<Process::Waiter:0x00007f7577da4398 run>]
  #   stdin.close
  #   stdout_and_stderr.close
  #   wait_thread.pid   # => 2274600
  #   wait_thread.value # => #<Process::Status: pid 2274600 exit 0>
  #
  # With a block given, calls the block with the three variables
  # (two streams and the wait thread)
  # and returns the block's return value.
  # The caller need not close the streams:
  #
  #   Open3.popen2e('echo') do |stdin, stdout_and_stderr, wait_thread|
  #     p stdin
  #     p stdout_and_stderr
  #     p wait_thread
  #     p wait_thread.pid
  #     p wait_thread.value
  #   end
  #
  # Output:
  #
  #   #<IO:fd 6>
  #   #<IO:fd 7>
  #   #<Process::Waiter:0x00007f75777578c8 sleep>
  #   2274763
  #   #<Process::Status: pid 2274763 exit 0>
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # Unlike Process.spawn, this method waits for the child process to exit
  # before returning, so the caller need not do so.
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in the call to Process.spawn;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in the call to Process.spawn;
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # The single required argument is one of the following:
  #
  # - +command_line+ if it is a string,
  #   and if it begins with a shell reserved word or special built-in,
  #   or if it contains one or more metacharacters.
  # - +exe_path+ otherwise.
  #
  # <b>Argument +command_line+</b>
  #
  # \String argument +command_line+ is a command line to be passed to a shell;
  # it must begin with a shell reserved word, begin with a special built-in,
  # or contain meta characters:
  #
  #   Open3.popen2e('if true; then echo "Foo"; fi') {|*args| p args } # Shell reserved word.
  #   Open3.popen2e('echo') {|*args| p args }                         # Built-in.
  #   Open3.popen2e('date > date.tmp') {|*args| p args }              # Contains meta character.
  #
  # Output (similar for each call above):
  #
  #   # => [#<IO:(closed)>, #<IO:(closed)>, #<Process::Waiter:0x00007f7577d8a1f0 dead>]
  #
  # The command line may also contain arguments and options for the command:
  #
  #   Open3.popen2e('echo "Foo"') { |i, o_and_e, t| o_and_e.gets }
  #   "Foo\n"
  #
  # <b>Argument +exe_path+</b>
  #
  # Argument +exe_path+ is one of the following:
  #
  # - The string path to an executable to be called.
  # - A 2-element array containing the path to an executable
  #   and the string to be used as the name of the executing process.
  #
  # Example:
  #
  #   Open3.popen2e('/usr/bin/date') { |i, o_and_e, t| o_and_e.gets }
  #   # => "Thu Sep 28 01:58:45 PM CDT 2023\n"
  #
  # Ruby invokes the executable directly, with no shell and no shell expansion:
  #
  #   Open3.popen2e('doesnt_exist') { |i, o_and_e, t| o_and_e.gets } # Raises Errno::ENOENT
  #
  # If one or more +args+ is given, each is an argument or option
  # to be passed to the executable:
  #
  #   Open3.popen2e('echo', 'C #') { |i, o_and_e, t| o_and_e.gets }
  #   # => "C #\n"
  #   Open3.popen2e('echo', 'hello', 'world') { |i, o_and_e, t| o_and_e.gets }
  #   # => "hello world\n"
  #
  # Related:
  #
  # - Open3.popen2: Makes the standard input and standard output streams
  #   of the child process available as separate streams,
  #   with no access to the standard error stream.
  # - Open3.popen3: Makes the standard input, standard output,
  #   and standard error streams
  #   of the child process available as separate streams.
  #
  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

  # :call-seq:
  #   Open3.capture3([env, ] command_line, options = {}) -> [stdout_s, stderr_s, status]
  #   Open3.capture3([env, ] exe_path, *args, options = {}) -> [stdout_s, stderr_s, status]
  #
  # Basically a wrapper for Open3.popen3 that:
  #
  # - Creates a child process, by calling Open3.popen3 with the given arguments
  #   (except for certain entries in hash +options+; see below).
  # - Returns as strings +stdout_s+ and +stderr_s+ the standard output
  #   and standard error of the child process.
  # - Returns as +status+ a <tt>Process::Status</tt> object
  #   that represents the exit status of the child process.
  #
  # Returns the array <tt>[stdout_s, stderr_s, status]</tt>:
  #
  #   stdout_s, stderr_s, status = Open3.capture3('echo "Foo"')
  #   # => ["Foo\n", "", #<Process::Status: pid 2281954 exit 0>]
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # Unlike Process.spawn, this method waits for the child process to exit
  # before returning, so the caller need not do so.
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in the call to Open3.popen3;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in the call to Open3.popen3;
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # The hash +options+ is given;
  # two options have local effect in method Open3.capture3:
  #
  # - If entry <tt>options[:stdin_data]</tt> exists, the entry is removed
  #   and its string value is sent to the command's standard input:
  #
  #     Open3.capture3('tee', stdin_data: 'Foo')
  #     # => ["Foo", "", #<Process::Status: pid 2319575 exit 0>]
  #
  # - If entry <tt>options[:binmode]</tt> exists, the entry is removed and
  #   the internal streams are set to binary mode.
  #
  # The single required argument is one of the following:
  #
  # - +command_line+ if it is a string,
  #   and if it begins with a shell reserved word or special built-in,
  #   or if it contains one or more metacharacters.
  # - +exe_path+ otherwise.
  #
  # <b>Argument +command_line+</b>
  #
  # \String argument +command_line+ is a command line to be passed to a shell;
  # it must begin with a shell reserved word, begin with a special built-in,
  # or contain meta characters:
  #
  #   Open3.capture3('if true; then echo "Foo"; fi') # Shell reserved word.
  #   # => ["Foo\n", "", #<Process::Status: pid 2282025 exit 0>]
  #   Open3.capture3('echo')                         # Built-in.
  #   # => ["\n", "", #<Process::Status: pid 2282092 exit 0>]
  #   Open3.capture3('date > date.tmp')              # Contains meta character.
  #   # => ["", "", #<Process::Status: pid 2282110 exit 0>]
  #
  # The command line may also contain arguments and options for the command:
  #
  #   Open3.capture3('echo "Foo"')
  #   # => ["Foo\n", "", #<Process::Status: pid 2282092 exit 0>]
  #
  # <b>Argument +exe_path+</b>
  #
  # Argument +exe_path+ is one of the following:
  #
  # - The string path to an executable to be called.
  # - A 2-element array containing the path to an executable
  #   and the string to be used as the name of the executing process.
  #
  # Example:
  #
  #   Open3.capture3('/usr/bin/date')
  #   # => ["Thu Sep 28 05:03:51 PM CDT 2023\n", "", #<Process::Status: pid 2282300 exit 0>]
  #
  # Ruby invokes the executable directly, with no shell and no shell expansion:
  #
  #   Open3.capture3('doesnt_exist') # Raises Errno::ENOENT
  #
  # If one or more +args+ is given, each is an argument or option
  # to be passed to the executable:
  #
  #   Open3.capture3('echo', 'C #')
  #   # => ["C #\n", "", #<Process::Status: pid 2282368 exit 0>]
  #   Open3.capture3('echo', 'hello', 'world')
  #   # => ["hello world\n", "", #<Process::Status: pid 2282372 exit 0>]
  #
  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

  # :call-seq:
  #   Open3.capture2([env, ] command_line, options = {}) -> [stdout_s, status]
  #   Open3.capture2([env, ] exe_path, *args, options = {}) -> [stdout_s, status]
  #
  # Basically a wrapper for Open3.popen3 that:
  #
  # - Creates a child process, by calling Open3.popen3 with the given arguments
  #   (except for certain entries in hash +options+; see below).
  # - Returns as string +stdout_s+ the standard output of the child process.
  # - Returns as +status+ a <tt>Process::Status</tt> object
  #   that represents the exit status of the child process.
  #
  # Returns the array <tt>[stdout_s, status]</tt>:
  #
  #   stdout_s, status = Open3.capture2('echo "Foo"')
  #   # => ["Foo\n", #<Process::Status: pid 2326047 exit 0>]
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdocruby/drb/extserv.rb000064400000001510150403134240010312 0ustar00# The single required argument is one of the following:
  #
  # - +command_line+ if it is a string,
  #   and if it begins with a shell reserved word or special built-in,
  #   or if it contains one or more metacharacters.
  # - +exe_path+ otherwise.
  #
  # <b>Argument +command_line+</b>
  #
  # \String argument +command_line+ is a command line to be passed to a shell;
  # it must begin with a shell reserved word, begin with a special built-in,
  # or contain meta characters:
  #
  #   Open3.capture2('if true; then echo "Foo"; fi') # Shell reserved word.
  #   # => ["Foo\n", #<Process::Status: pid 2326131 exit 0>]
  #   Open3.capture2('echo')                         # Built-in.
  #   # => ["\n", #<Process::Status: pid 2326139 exit 0>]
  #   Open3.capture2('date > date.tmp')              # Contains meta character.
  #   # => [""ruby/drb/drb.rb000064400000163163150403134240007376 0ustar00h no shell and no shell expansion:
  #
  #   Open3.capture2('doesnt_exist') # Raises Errno::ENOENT
  #
  # If one or more +args+ is given, each is an argument or option
  # to be passed to the executable:
  #
  #   Open3.capture2('echo', 'C #')
  #   # => ["C #\n", #<Process::Status: pid 2326267 exit 0>]
  #   Open3.capture2('echo', 'hello', 'world')
  #   # => ["hello world\n", #<Process::Status: pid 2326299 exit 0>]
  #
  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

  # :call-seq:
  #   Open3.capture2e([env, ] command_line, options = {}) -> [stdout_and_stderr_s, status]
  #   Open3.capture2e([env, ] exe_path, *args, options = {}) -> [stdout_and_stderr_s, status]
  #
  # Basically a wrapper for Open3.popen3 that:
  #
  # - Creates a child process, by calling Open3.popen3 with the given arguments
  #   (except for certain entries in hash +options+; see below).
  # - Returns as string +stdout_and_stderr_s+ the merged standard output
  #   and standard error of the child process.
  # - Returns as +status+ a <tt>Process::Status</tt> object
  #   that represents the exit status of the child process.
  #
  # Returns the array <tt>[stdout_and_stderr_s, status]</tt>:
  #
  #   stdout_and_stderr_s, status = Open3.capture2e('echo "Foo"')
  #   # => ["Foo\n", #<Process::Status: pid 2371692 exit 0>]
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # Unlike Process.spawn, this method waits for the child process to exit
  # before returning, so the caller need not do so.
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in the call to Open3.popen3;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in the call to Open3.popen3;
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # The hash +options+ is given;
  # two options have local effect in method Open3.capture2e:
  #
  # - If entry <tt>options[:stdin_data]</tt> exists, the entry is removed
  #   and its string value is sent to the command's standard input:
  #
  #     Open3.capture2e('tee', stdin_data: 'Foo')
  #     # => ["Foo", #<Process::Status: pid 2371732 exit 0>]
  #
  # - If entry <tt>options[:binmode]</tt> exists, the entry is removed and
  #   the internal streams are set to binary mode.
  #
  # The single required argument is one of the following:
  #
  # - +command_line+ if it is a string,
  #   and if it begins with a shell reserved word or special built-in,
  #   or if it contains one or more metacharacters.
  # - +exe_path+ otherwise.
  #
  # <b>Argument +command_line+</b>
  #
  # \String argument +command_line+ is a command line to be passed to a shell;
  # it must begin with a shell reserved word, begin with a special built-in,
  # or contain meta characters:
  #
  #   Open3.capture2e('if true; then echo "Foo"; fi') # Shell reserved word.
  #   # => ["Foo\n", #<Process::Status: pid 2371740 exit 0>]
  #   Open3.capture2e('echo')                         # Built-in.
  #   # => ["\n", #<Process::Status: pid 2371774 exit 0>]
  #   Open3.capture2e('date > date.tmp')              # Contains meta character.
  #   # => ["", #<Process::Status: pid 2371812 exit 0>]
  #
  # The command line may also contain arguments and options for the command:
  #
  #   Open3.capture2e('echo "Foo"')
  #   # => ["Foo\n", #<Process::Status: pid 2326183 exit 0>]
  #
  # <b>Argument +exe_path+</b>
  #
  # Argument +exe_path+ is one of the following:
  #
  # - The string path to an executable to be called.
  # - A 2-element array containing the path to an executable
  #   and the string to be used as the name of the executing process.
  #
  # Example:
  #
  #   Open3.capture2e('/usr/bin/date')
  #   # => ["Sat Sep 30 09:01:46 AM CDT 2023\n", #<Process::Status: pid 2371820 exit 0>]
  #
  # Ruby invokes the executable directly, with no shell and no shell expansion:
  #
  #   Open3.capture2e('doesnt_exist') # Raises Errno::ENOENT
  #
  # If one or more +args+ is given, each is an argument or option
  # to be passed to the executable:
  #
  #   Open3.capture2e('echo', 'C #')
  #   # => ["C #\n", #<Process::Status: pid 2371856 exit 0>]
  #   Open3.capture2e('echo', 'hello', 'world')
  #   # => ["hello world\n", #<Process::Status: pid 2371894 exit 0>]
  #
  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

  # :call-seq:
  #   Open3.pipeline_rw([env, ] *cmds, options = {}) -> [first_stdin, last_stdout, wait_threads]
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process for each of the given +cmds+
  #   by calling Process.spawn.
  # - Pipes the +stdout+ from each child to the +stdin+ of the next child,
  #   or, for the first child, from the caller's +stdin+,
  #   or, for the last child, to the caller's +stdout+.
  #
  # The method does not wait for child processes to exit,
  # so the caller must do so.
  #
  # With no block given, returns a 3-element array containing:
  #
  # - The +stdin+ stream of the first child process.
  # - The +stdout+ stream of the last child process.
  # - An array of the wait threads for all of the child processes.
  #
  # Example:
  #
  #   first_stdin, last_stdout, wait_threads = Open3.pipeline_rw('sort', 'cat -n')
  #   # => [#<IO:fd 20>, #<IO:fd 21>, [#<Process::Waiter:0x000055e8de29ab40 sleep>, #<Process::Waiter:0x000055e8de29a690 sleep>]]
  #   first_stdin.puts("foo\nbar\nbaz")
  #   first_stdin.close # Send EOF to sort.
  #   puts last_stdout.read
  #   wait_threads.each do |wait_thread|
  #     wait_thread.join
  #   end
  #
  # Output:
  #
  #   1	bar
  #   2	baz
  #   3	foo
  #
  # With a block given, calls the block with the +stdin+ stream of the first child,
  # the +stdout+ stream  of the last child,
  # and an array of the wait processes:
  #
  #   Open3.pipeline_rw('sort', 'cat -n') do |first_stdin, last_stdout, wait_threads|
  #     first_stdin.puts "foo\nbar\nbaz"
  #     first_stdin.close # send EOF to sort.
  #     puts last_stdout.read
  #     wait_threads.each do |wait_thread|
  #       wait_thread.join
  #     end
  #   end
  #
  # Output:
  #
  #   1	bar
  #   2	baz
  #   3	foo
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in each call to Process.spawn;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in each call to Process.spawn;
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # Each remaining argument in +cmds+ is one of:
  #
  # - A +command_line+: a string that begins with a shell reserved word
  #   or special built-in, or contains one or more metacharacters.
  # - An +exe_path+: the string path to an executable to be called.
  # - An array containing a +command_line+ or an +exe_path+,
  #   along with zero or more string arguments for the command.
  #
  # See {Argument command_line or exe_path}[rdoc-ref:Process@Argument+command_line+or+exe_path].
  #
  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

  # :call-seq:
  #   Open3.pipeline_r([env, ] *cmds, options = {}) -> [last_stdout, wait_threads]
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process for each of the given +cmds+
  #   by calling Process.spawn.
  # - Pipes the +stdout+ from each child to the +stdin+ of the next child,
  #   or, for the last child, to the caller's +stdout+.
  #
  # The method does not wait for child processes to exit,
  # so the caller must do so.
  #
  # With no block given, returns a 2-element array containing:
  #
  # - The +stdout+ stream of the last child process.
  # - An array of the wait threads for all of the child processes.
  #
  # Example:
  #
  #   last_stdout, wait_threads = Open3.pipeline_r('ls', 'grep R')
  #   # => [#<IO:fd 5>, [#<Process::Waiter:0x000055e8de2f9898 dead>, #<Process::Waiter:0x000055e8de2f94b0 sleep>]]
  #   puts last_stdout.read
  #   wait_threads.each do |wait_thread|
  #     wait_thread.join
  #   end
  #
  # Output:
  #
  #   Rakefile
  #   README.md
  #
  # With a block given, calls the block with the +stdout+ stream
  # of the last child process,
  # and an array of the wait processes:
  #
  #   Open3.pipeline_r('ls', 'grep R') do |last_stdout, wait_threads|
  #     puts last_stdout.read
  #     wait_threads.each do |wait_thread|
  #       wait_thread.join
  #     end
  #   end
  #
  # Output:
  #
  #   Rakefile
  #   README.md
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in each call to Process.spawn;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in each call to Process.spawn;
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # Each remaining argument in +cmds+ is one of:
  #
  # - A +command_line+: a string that begins with a shell reserved word
  #   or special built-in, or contains one or more metacharacters.
  # - An +exe_path+: the string path to an executable to be called.
  # - An array containing a +command_line+ or an +exe_path+,
  #   along with zero or more string arguments for the command.
  #
  # See {Argument command_line or exe_path}[rdoc-ref:Process@Argument+command_line+or+exe_path].
  #
  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


  # :call-seq:
  #   Open3.pipeline_w([env, ] *cmds, options = {}) -> [first_stdin, wait_threads]
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process for each of the given +cmds+
  #   by calling Process.spawn.
  # - Pipes the +stdout+ from each child to the +stdin+ of the next child,
  #   or, for the first child, pipes the caller's +stdout+ to the child's +stdin+.
  #
  # The method does not wait for child processes to exit,
  # so the caller must do so.
  #
  # With no block given, returns a 2-element array containing:
  #
  # - The +stdin+ stream of the first child process.
  # - An array of the wait threads for all of the child processes.
  #
  # Example:
  #
  #   first_stdin, wait_threads = Open3.pipeline_w('sort', 'cat -n')
  #   # => [#<IO:fd 7>, [#<Process::Waiter:0x000055e8de928278 run>, #<Process::Waiter:0x000055e8de923e80 run>]]
  #   first_stdin.puts("foo\nbar\nbaz")
  #   first_stdin.close # Send EOF to sort.
  #   wait_threads.each do |wait_thread|
  #     wait_thread.join
  #   end
  #
  # Output:
  #
  #   1	bar
  #   2	baz
  #   3	foo
  #
  # With a block given, calls the block with the +stdin+ stream
  # of the first child process,
  # and an array of the wait processes:
  #
  #   Open3.pipeline_w('sort', 'cat -n') do |first_stdin, wait_threads|
  #     first_stdin.puts("foo\nbar\nbaz")
  #     first_stdin.close # Send EOF to sort.
  #     wait_threads.each do |wait_thread|
  #       wait_thread.join
  #     end
  #   end
  #
  # Output:
  #
  #   1	bar
  #   2	baz
  #   3	foo
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in each call to Process.spawn;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in each call to Process.spawn;
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # Each remaining argument in +cmds+ is one of:
  #
  # - A +command_line+: a string that begins with a shell reserved word
  #   or special built-in, or contains one or more metacharacters.
  # - An +exe_path+: the string path to an executable to be called.
  # - An array containing a +command_line+ or an +exe_path+,
  #   along with zero or more string arguments for the command.
  #
  # See {Argument command_line or exe_path}[rdoc-ref:Process@Argument+command_line+or+exe_path].
  #
  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

  # :call-seq:
  #   Open3.pipeline_start([env, ] *cmds, options = {}) -> [wait_threads]
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process for each of the given +cmds+
  #   by calling Process.spawn.
  # - Does not wait for child processes to exit.
  #
  # With no block given, returns an array of the wait threads
  # for all of the child processes.
  #
  # Example:
  #
  #   wait_threads = Open3.pipeline_start('ls', 'grep R')
  #   # => [#<Process::Waiter:0x000055e8de9d2bb0 run>, #<Process::Waiter:0x000055e8de9d2890 run>]
  #   wait_threads.each do |wait_thread|
  #     wait_thread.join
  #   end
  #
  # Output:
  #
  #   Rakefile
  #   README.md
  #
  # With a block given, calls the block with an array of the wait processes:
  #
  #   Open3.pipeline_start('ls', 'grep R') do |wait_threads|
  #     wait_threads.each do |wait_thread|
  #       wait_thread.join
  #     end
  #   end
  #
  # Output:
  #
  #   Rakefile
  #   README.md
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in each call to Process.spawn;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in each call to Process.spawn;
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # Each remaining argument in +cmds+ is one of:
  #
  # - A +command_line+: a string that begins with a shell reserved word
  #   or special built-in, or contains one or more metacharacters.
  # - An +exe_path+: the string path to an executable to be called.
  # - An array containing a +command_line+ or an +exe_path+,
  #   along with zero or more string arguments for the command.
  #
  # See {Argument command_line or exe_path}[rdoc-ref:Process@Argument+command_line+or+exe_path].
  #
  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

  # :call-seq:
  #   Open3.pipeline([env, ] *cmds, options = {}) -> array_of_statuses
  #
  # Basically a wrapper for
  # {Process.spawn}[rdoc-ref:Process.spawn]
  # that:
  #
  # - Creates a child process for each of the given +cmds+
  #   by calling Process.spawn.
  # - Pipes the +stdout+ from each child to the +stdin+ of the next child,
  #   or, for the last child, to the caller's +stdout+.
  # - Waits for the child processes to exit.
  # - Returns an array of Process::Status objects (one for each child).
  #
  # Example:
  #
  #   wait_threads = Open3.pipeline('ls', 'grep R')
  #   # => [#<Process::Status: pid 2139200 exit 0>, #<Process::Status: pid 2139202 exit 0>]
  #
  # Output:
  #
  #   Rakefile
  #   README.md
  #
  # Like Process.spawn, this method has potential security vulnerabilities
  # if called with untrusted input;
  # see {Command Injection}[rdoc-ref:command_injection.rdoc@Command+Injection].
  #
  # If the first argument is a hash, it becomes leading argument +env+
  # in each call to Process.spawn;
  # see {Execution Environment}[rdoc-ref:Process@Execution+Environment].
  #
  # If the last argument is a hash, it becomes trailing argument +options+
  # in each call to Process.spawn'
  # see {Execution Options}[rdoc-ref:Process@Execution+Options].
  #
  # Each remaining argument in +cmds+ is one of:
  #
  # - A +command_line+: a string that begins with a shell reserved word
  #   or special built-in, or contains one or more metacharacters.
  # - An +exe_path+: the string path to an executable to be called.
  # - An array containing a +command_line+ or an +exe_path+,
  #   along with zero or more string arguments for the command.
  #
  # See {Argument command_line or exe_path}[rdoc-ref:Process@Argument+command_line+or+exe_path].
  #
  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

# JRuby uses different popen logic on Windows, require it here to reuse wrapper methods above.
require 'open3/jruby_windows' if RUBY_ENGINE == 'jruby' && JRuby::Util::ON_WINDOWS
ruby/did_you_mean.rb000064400000011006150403134240010500 0ustar00require_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/spell_checkers/pattern_key_name_checker'
require_relative 'did_you_mean/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 `<main>': 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)

  # Returns a sharable hash map of error types and spell checker objects.
  def self.spell_checkers
    @spell_checkers
  end

  # Adds +DidYouMean+ functionality to an error using a given spell checker
  def self.correct_error(error_class, spell_checker)
    if defined?(Ractor)
      new_mapping = { **@spell_checkers, error_class.to_s => spell_checker }
      new_mapping.default = NullChecker

      @spell_checkers = Ractor.make_shareable(new_mapping)
    else
      spell_checkers[error_class.to_s] = spell_checker
    end

    error_class.prepend(Correctable) if error_class.is_a?(Class) && !(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'
  correct_error NoMatchingPatternKeyError, PatternKeyNameChecker if defined?(::NoMatchingPatternKeyError)

  # Returns the currently set formatter. By default, it is set to +DidYouMean::Formatter+.
  def self.formatter
    if defined?(Ractor)
      Ractor.current[:__did_you_mean_formatter__] || Formatter
    else
      Formatter
    end
  end

  # Updates the primary formatter used to format the suggestions.
  def self.formatter=(formatter)
    if defined?(Ractor)
      Ractor.current[:__did_you_mean_formatter__] = formatter
    end
  end
end
ruby/drb/version.rb000064400000000043150403134240010277 0ustar00 mfile.print("install-so: ")
    ifruby/drb/timeridconv.rb000064400000004245150403134240011145 0ustar00("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
    if target and !dirs.include?(sodir)
      mfile.print "$(TARGET_SO_DIR_TIMESTAMP):\n\t$(Q) $(MAKEDIRS) $(@D) #{sodir}\n\t$(Q) $(TOUCH) $@\n"
    end
    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:ruby/drb/eq.rb000064400000000423150403134240007221 0ustar00 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 " $(TARGET_SO_DIR_TIMESTAMP)" if $extout
    mfile.print "\n"
    ruby/drb/invokemethod.rb000064400000001411150403134240011306 0ustar00file.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 bundlruby/drb/extservm.rb000064400000003467150403134240010504 0ustar00xflags", 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)} || []

 ruby/drb/gw.rb000064400000006005150403134240007233 0ustar00\n" + FailedMessage + opts.join
    end
  end

  private

  def _libdir_basename
    @libdir_basename ||= config_string("libdir") {|name| name[/\A\$\(exec_prefix\)\/(.*)/, 1]} || "lib"
  end

  def MAIN_DOES_NOTHING(*refs)
    src = MAIN_DOES_NOTHING
    unless refs.empty?
      src = src.sub(/\{/) do
        $& +
          "\n  if (argc > 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 wiruby/drb/acl.rb000064400000011161150403134240007354 0ustar00onfig_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 ruby/uri.rb000064400000006073150403134250006654 0ustar00

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
ruby/uri.rb000064400000006073150403134250006654 0ustar00# 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::HTTP 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
#     register_scheme 'RSYNC', RSYNC
#   end
#   #=> URI::RSYNC
#
#   URI.scheme_list
#   #=> {"FILE"=>URI::File, "FTP"=>URI::FTP, "HTTP"=>URI::HTTP,
#   #    "HTTPS"=>URI::HTTPS, "LDAP"=>URIruby/securerandom.rb000064400000004162150403134250010541 0ustar00ruby/drb/weakidconv.rb000064400000002175150403134240010754 0ustar00 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'
require_relative 'uri/ws'
require_relative 'uri/wss'
ruby/securerandom.rb000064400000004162150403134250010541 0ustar00ruby/drb/ssl.rb000064400000027022150403134240007421 0ustar00ustar00
      @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

    begin
      # Check if Random.urandom is available
      Random.urandom(1)
      alias gen_random gen_random_urandom
    rescue RuntimeError
      begin
        require 'openssl'
      rescue NoMethodError
        raise NotImplementedError, "No random device"
      else
        alias gen_random gen_random_openssl
      ruby/abbrev.rb000064400000006711150403134250007315 0ustar00# frozen_string_literal: true
=begin
= Info
  'OpenSSL for Ruby 2' project
  Copyright (C) 2002  Michal Rokos <m.rokos@sh.cvut.cz>
  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/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
ruby/abbrev.rb000064400000006711150403134250007315 0ustar00# frozen_string_literal: true
#--
# Copyright (c) 2001,2003 Akinori MUSHA <knu@iDaemons.org>
#
# 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", ruby/shellwords.rb000064400000016133150403134250010241 0ustar00"}
  #
  #   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
ruby/shellwords.rb000064400000016133150403134250010241 0ustar00# 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 <knu@iDaemons.org>
#
# === Contact
# * Akinori MUSHA <knu@iDaemons.org> (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 doesruby/drb/unix.rb000064400000005433150403134240007605 0ustar00s an
      #   escruby/drb/extserv.rb000064400000001510150403134240010312 0ustar00cape
  #   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. ruby/drb/drb.rb000064400000163163150403134240007376 0ustar00ustar00ruby/drb/observer.rb000064400000001237150403134240010447 0ustar00ustar00 See Shellwords.shelljoin for details.
  def shelljoin
    Shellwords.join(self)
  end
end
ruby/logger/version.rb000064400000000104150403134240011005 0ustar00ruby/logger/errors.rb000064400000000266150403134240010645 0ustar00 Note missing end
  #   explain ExplainSyntax.new(
  #     code_lines: CodeLine.from_source(source)
  #   ).call
  #   explain.errors.first
  #   # => "Unmatched keyword, missing `enruby/logger/severity.rb000064400000000712150403134250011200 0ustar00end

      self
    end

    # Returns an array of missing elements
    #
    # For example this:
    #
    #   ExplainSyntax.new(code_lines: lines).missing
    #   # => ["}"]
    #
    # Would indicate that the source is missing
    # a `}` character in the source code
    def missing
      @missing ||= @left_right.missing
    end

    # Converts a missing string to
    # an human understandable explanation.
    #
    # Example:
    #
    #   explain.whruby/logger/period.rb000064400000002644150403134250010616 0ustar00original ripper error messages
    def errors
      if missing.empty?
        return RipperErrors.new(@code_lines.map(&:original).join).call.errors
      end

      missing.map { |miss| why(miss) }
    end
  end
end
ruby/syntax_suggest/capture_code_context.rb000064400000015252150403134250015344 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  module Capture
  end
end

require_relative "capture/falling_indent_lines"
require_relative "capture/before_after_keyword_ends"

module SyntaxSuggest
  # Turns a "invalid block(s)" into useful context
  #
  # There are three main phases in the algorithm:
  #
  # 1. Sanitize/format input source
  # 2. Search for invalid blocks
  # 3. Format invalid blocks into something meaninful
  #
  # This class handles the third part.
  #
  # The algorithm is very good at capturing all of a syntax
  # error in a single block in number 2, however the results
  # can contain amruby/logger/log_device.rb000064400000013216150403134250011431 0ustar00s lines.join
  #   # =>
  #     class Dog
  #       def bark
  #     end
  #
  class CaptureCodeContext
    attr_reader :code_lines

    def initialize(blocks:, code_lines:)
      @blocks = Array(blocks)
      @code_lines = code_lines
      @visible_lines = @blocks.map(&:visible_lines).flatten
      @lines_to_output = @visible_lines.dup
    end

    def call
      @blocks.each do |block|
        capture_first_kw_end_same_indent(block)
        capture_last_end_same_indent(block)
        capture_before_after_kws(block)
        capture_falling_indent(block)
      end

      sorted_lines
    end

    def sorted_lines
      @lines_to_output.select!(&:not_empty?)
      @lines_to_output.uniq!
      @lines_to_output.sort!

      @lines_to_output
    end

    # Shows the context around code provided by "falling" indentation
    #
    # Converts:
    #
    #       it "foo" do
    #
    # into:
    #
    #   class OH
    #     def hello
    #       it "foo" do
    #     end
    #   end
    #
    def capture_falling_indent(block)
      Capture::FallingIndentLines.new(
        block: block,
        code_lines: @code_lines
      ).call do |line|
        @lines_to_output << line
      end
    end

    # Shows surrounding kw/end pairs
    #
    # The purpose of showing these extra pairs is due to cases
    # of ambiguity when only one visible line is matched.
    #
    # For example:
    #
    #     1  class Dog
    #     2    def bark
    #     4    def eat
    #     5    end
    #     6  end
    #
    # In this case either line 2 could be missing an `end` or
    # line 4 was an extra line added by mistake (it happens).
    #
    # When we detect the above problem it shows the issue
    # as only being on line 2
    #
    #     2    def bark
    #
    # Showing "neighbor" keyword pairs gives extra context:
    #
    #     2    def bark
    #     4    def eat
    #     5    end
    #
    def capture_before_after_kws(block)
      return unless block.visible_lines.count == 1

      around_lines = Capture::BeforeAfterKeywordEnds.new(
        code_lines: @code_lines,
        block: block
      ).call

      around_lines -= block.lines

      @lines_to_output.concat(around_lines)
    end

    # When there is an invalid block with a keyword
    # missing an end right before another end,
    # it is unclear where which keyword is missing the
    # end
    #
    # Take this example:
    #
    #   class Dog       # 1
    #     def bark      # 2
    #       puts "woof" # 3
    #   end             # 4
    #
    # However due to https://github.com/ruby/syntax_suggest/issues/32
    # the problem line will be identified as:
    #
    #  > class Dog       # 1
    #
    # Because lines 2, 3, and 4 are technically valid code and are expanded
    # first, deemed valid, and hidden. We need to un-hide the matching end
    # line 4. Also work backwards and if there's a mis-matched keyword, show it
    # too
    def capture_last_end_same_indent(block)
      return if block.visible_lines.length != 1
      return unless block.visible_lines.first.is_kw?

      visible_line = block.visible_lines.first
      lines = @code_lines[visible_line.index..block.lines.last.index]

      # Find first end with same indent
      # (this would return line 4)
      #
      #   end             # 4
      matching_end = lines.detect { |line| line.indent == block.current_indent && line.is_end? }
      return unless matching_end

      @lines_to_output << matching_end

      # Work backwards from the end to
      # see if there are mis-matched
     ruby/syntax_suggest/cli.rb000064400000006166150403134250011716 0ustar00uts "woof" # 2
    #     end           # 3
    #   end             # 4
    #
    # the problem line will be identified as:
    #
    #  > end            # 4
    #
    # This happens because lines 1, 2, and 3 are technically valid code and are expanded
    # first, deemed valid, and hidden. We need to un-hide the matching keyword on
    # line 1. Also work backwards and if there's a mis-matched end, show it
    # too
    def capture_first_kw_end_same_indent(block)
      return if block.visible_lines.length != 1
      return unless block.visible_lines.first.is_end?

      visible_line = block.visible_lines.first
      lines = @code_lines[block.lines.first.index..visible_line.index]
      matching_kw = lines.reverse.detect { |line| line.indent == block.current_indent && line.is_kw? }
      return unless matching_kw

      @lines_to_output << matching_kw

      kw_count = 0
      end_count = 0
      orphan_end = @code_lines[matching_kw.index..visible_line.index].detect do |line|
        kw_count += 1 if line.is_kw?
        end_count += 1 if line.is_end?

        end_count >= kw_count
      end

      return unless orphan_end
      @lines_to_output << orphan_end
    end
  end
end
ruby/logger/formatter.rb000064400000001426150403134250011334 0ustar00   Cli.new(argv: ["<path/to/file>.rb"]).call
  #   Cli.new(argv: ["<path/to/file>.rb", "--record=tmp"]).call
  #   Cli.new(argv: ["<path/to/file>.rb", "--terminal"]).call
  #
  class Cli
    attr_accessor :options

    # ARGV is Everything passed to the executable, does not include executable name
    #
    # All other intputs are dependency injection for testing
    def initialize(argv:, exit_obj: Kernel, io: $stdout, env: ENV)
      @options = {}
      @parser = nil
      options[:record_dir] = env["SYNTAX_SUGGEST_RECORD_DIR"]
      options[:record_dir] = "tmp" if env["DEBUG"]
      options[:terminal] = SyntaxSuggest::DEFAULT_VALUE

      @io = io
      @argv = argv
      @exit_obj = exit_obj
    end

    def call
      if @argv.empty?
        # Display help if raw command
    ruby/set.rb000064400000062500150403134250006645 0ustar00ustar00  Usage: syntax_suggest <file> [options]

          Parses a ruby source file and searches for syntax error(s) such as
          unexpected `end', expecting end-of-input.

          Example:

            $ syntax_suggest dog.rb

            # ...

              > 10  defdog
              > 15  end

          ENV options:

            SYNTAX_SUGGEST_RECORD_DIR=<dir>

            Records the steps used to search for a syntax error
            to the given directory

          Options:
        EOM

        opts.version = SyntaxSuggest::VERSION

        opts.on("--help", "Help - displays this message") do |v|
          @io.puts opts
          options[:exit] = true
          @exit_obj.exit
        end

        opts.on("--record <dir>", "Records the steps used to search for a syntax error to the given directory") do |v|
          options[:record_dir] = v
        end

        opts.on("--terminal", "Enable terminal highlighting") do |v|
          options[:terminal] = true
        end

        opts.on("--no-terminal", "Disable terminal highlighting") do |v|
          options[:terminal] = false
        end
      end
    end
  end
end
ruby/syntax_suggest/scan_history.rb000064400000005657150403134250013660 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Scans up/down from the given block
  #
  # You can try out a change, stash it, or commit it to save for later
  #
  # Example:
  #
  #   scanner = ScanHistory.new(code_lines: code_lines, block: block)
  #   scanner.scan(
  #     up: ->(_, _, _) { true },
  #     down: ->(_, _, _) { true }
  #   )
  #   scanner.changed? # => true
  #   expect(scanner.lines).to eq(code_lines)
  #
  #   scanner.stash_changes
  #
  #   expect(scanner.lines).to_not eq(code_lines)
  class ScanHistory
    attr_reader :before_index, :after_index

    def initialize(code_lines:, block:)
      @code_lines = code_lines
      @history = [block]
      refresh_index
    end

    def commit_if_changed
      if changed?
        @history << CodeBlock.new(lines: @code_lines[before_index..after_index])
      end

      self
    end

    # Discards any changes that have not been committed
    def stash_changes
ruby/syntax_suggest/priority_engulf_queue.rb000064400000002417150403134250015567 0ustar00efore_lines.reverse_each.take_while do |line|
        kw_count += 1 if line.is_kw?
        end_count += 1 if line.is_end?
        up.call(line, kw_count, end_count)
      end.last&.index

      kw_count = 0
      end_count = 0

      down_index = after_lines.each.take_while do |line|
        kw_count += 1 if line.is_kw?
        end_count += 1 if line.is_end?
        down.call(line, kw_count, end_count)
      end.last&.index

      @before_index = if up_index && up_index < @before_index
        up_index
      else
        @before_index
      end

      @after_index = if down_index && down_index > @after_index
        down_index
      else
        @after_index
      end

      self
    end

    def next_up
      return nil if @before_index <= 0

      @code_lines[@before_index - 1]
    end

    def next_down
      return nil if @after_index >= @code_lines.length

      @code_lines[@after_index + 1]
    end

    def lines
      @code_lines[@before_index..@after_index]
    end

    private def before_lines
      @code_lines[0...@before_index] || []
    end

    # Returns an array of all the CodeLines that exist after
    # the currently scanned block
    private def after_lines
      @code_lines[@after_index.next..-1] || []
    end

    private def current
      @history.last
  ruby/syntax_suggest/ripper_errors.rb000064400000001505150403134250014034 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Keeps track of what elements are in the queue in
  # priority and also ensures that when one element
  # engulfs/covers/eats another that the larger element
  # evicts the smaller element
  class PriorityEngulfQueue
    def initialize
      @queue = PriorityQueue.new
    end

    def to_a
      @queue.to_a
    end

    def empty?
      @queue.empty?
    end

    def length
      @queue.length
    end

    def peek
      @queue.peek
    end

    def pop
      @queue.pop
    end

    def push(block)
      prune_engulf(block)
      @queue << block
      flush_deleted

      self
    end

    private def flush_deleted
      while @queue&.peek&.deleted?
        @queue.pop
      end
    end

    private def prune_engulf(block)
      # If we're about to pop off the same block, ruby/syntax_suggest/clean_document.rb000064400000021363150403134250014123 0ustar00ruby/syntax_suggest/ripper_errors.rb000064400000001505150403134250014034 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Capture parse errors from ripper
  #
  # Example:
  #
  #   puts RipperErrors.new(" def foo").call.errors
  #   # => ["syntax error, unexpected end-of-input, expecting ';' or '\\n'"]
  class RipperErrors < Ripper
    attr_reader :errors

    # Comes from ripper, called
    # on every parse error, msg
    # is a string
    def on_parse_error(msg)
      @errors ||= []
      @errors << msg
    end

    alias_method :on_alias_error, :on_parse_error
    alias_method :on_assign_error, :on_parse_error
    alias_method :on_class_name_error, :on_parse_error
    alias_method :on_param_error, :on_parse_error
    alias_method :compile_error, :on_parse_error

    def call
      @run_once ||= begin
        @errors = []
        parse
        true
      end
      self
    end
  end
end
ruby/syntax_suggest/clean_document.rb000064400000021363150403134250014123 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Parses and sanitizes source into a lexically aware document
  #
  # Internally the document is represented by an array with each
  # index containing a CodeLine correlating to a line from the source code.
  #
  # There are three main phases in the algorithm:
  #
  # 1. Sanitize/format input source
  # 2. Search for invalid blocks
  # 3. Format invalid blocks into something meaninful
  #
  # This class handles the first part.
  #
  # The reason this class exists is to format input source
  # for better/easier/cleaner exploration.
  #
  # The CodeSearch class operates at the line level so
  # we must be careful to not introduce lines that look
  # valid by themselves, but when removed will trigger syntax errors
  # or strange behavior.
  #
  # ## Join Trailing slashes
  #
  # Code with a trailing slash is logically treated as a single line:
  #
  #     1 it "code can be split" \
  #     2    "across multiple lines" do
  #
  # In this case removing line 2 would add a syntax error. We get around
  # this by internally joining the two lines into a single "line" object
  #
  # ## Logically Consecutive lines
  #
  # Code that can be broken over multiple
  # lines such as method calls are on different lines:
  #
  #     1 User.
  #     2   where(name: "schneems").
  #     3   first
  #
  # Removing line 2 can introduce a syntax error. To fix this, all lines
  # are joined into one.
  #
  # ## Heredocs
  #
  # A heredoc is an way of defining a multi-line string. They can cause many
  # problems. If left as a single line, Ripper would try to parse the contents
  # as ruby code rather than as a string. Even without this problem, we still
  # hit an issue with indentation
  #
  #    1 foo = <<~HEREDOC
  #    2  "Be yourself; everyone else is already taken.""
  #    3    ― Oscar Wilde
  #    4      puts "I look like ruby code" # but i'm still a heredoc
  #    5 HEREDOC
  #
  # If we didn't join these lines then our algorithm would think that line 4
  # is separate from the rest, has a higher indentation, then look at it first
  # and remove it.
  #
  # If the code evaluates line 5 by itself it will think line 5 is a constant,
  # remove it, and introduce a syntax errror.
  #
  # All of these problems are fixed by joining the whole heredoc into a single
  # line.
  #
  # ## Comments and whitespace
  #
  # Comments can throw off the way the lexer tells us that the line
  # logically belongs with the next line. This is valid ruby but
  # results in a different lex output than before:
  #
  #     1 User.
  #     2   where(name: "schneems").
  #     3   # Comment here
  #     4   first
  #
  # To handle this we can replace comment lines with empty lines
  # and then re-lex the source. This removal and re-lexing preserves
  # line index and document size, but generates an easier to work with
  # document.
  #
  class CleanDocument
    def initialize(source:)
      lines = clean_sweep(source: source)
      @document = CodeLine.from_source(lines.join, lines: lines)
    end

    # Call all of the document "cleaners"
    # and return self
    def call
      join_trailing_slash!
      join_consecutive!
      join_heredoc!

      self
    end

    # Return an array of CodeLines in the
    # document
    def lines
      @document
    end

    # Renders the document back to a string
    def to_s
      @document.join
    end

    # Remove comments
    #
    # replace with empty newlines
    #
    #     source = <<~'EOM'
    #       # Comment 1
    #       puts "hello"
    #       # Comment 2
    #       puts "world"
    #     EOM
    #
    #     lines = CleanDocument.new(source: source).lines
    #     expect(lines[0].to_s).to eq("\n")
    #     expect(lines[1].to_s).to eq("puts "hello")
    #     expect(lines[2].to_s).to eq("\n")
    #     expect(lines[3].to_s).to eq("puts "world")
    #
    # Important: This must be done before lexing.
    #
    # After this change is made, we lex the document because
    # removing comments can change how the doc is parsed.
    #
    # For example:
    #
    #     values = LexAll.new(source: <<~EOM))
    #       User.
    #         # comment
    #         where(name: 'schneems')
    #     EOM
    #     expect(
    #       values.count {|v| v.type == :on_ignored_nl}
    #     ).to eq(1)
    #
    # After the comment is removed:
    #
    #     values = LexAll.new(source: <<~EOM))
    #       User.
    #
    #         where(name: 'schneems')
    #     EOM
    #     expect(
    #      values.count {|v| v.type == :on_ignored_nl}
    #    ).to eq(2)
    #
    def clean_sweep(source:)
      # Match comments, but not HEREDOC strings with #{variable} interpolation
      # https://rubular.com/r/HPwtW9OYxKUHXQ
      source.lines.map do |line|
        if line.match?(/^\s*#([^{].*|)$/)
          $/
        else
          line
        end
      end
    end

    # Smushes all heredoc lines into one line
    #
    #     source = <<~'EOM'
    #       foo = <<~HEREDOC
    #          lol
    #          hehehe
    #       HEREDOC
    #     EOM
    #
    #     lines = CleanDocument.new(source: source).join_heredoc!.lines
    #     expect(lines[0].to_s).to eq(source)
    #     expect(lines[1].to_s).to eq("")
    def join_heredoc!
      start_index_stack = []
      heredoc_beg_end_index = []
      lines.each do |line|
        line.lex.each do |lex_value|
          case lex_value.type
          when :on_heredoc_beg
            start_index_stack << line.index
          when :on_heredoc_end
            start_index = start_index_stack.pop
            end_index = line.index
            heredoc_beg_end_index << [start_index, end_index]
          end
        end
      end

      heredoc_groups = heredoc_beg_end_index.map { |start_index, end_index| @document[start_index..end_index] }

      join_groups(heredoc_groups)
      self
    end

    # Smushes logically "consecutive" lines
    #
    #     source = <<~'EOM'
    #       User.
    #         where(name: 'schneems').
    #         first
    #     EOM
    #
    #     lines = CleanDocument.new(source: source).join_consecutive!.lines
    #     expect(lines[0].to_s).to eq(source)
    #     expect(lines[1].to_s).to eq("")
    #
    # The one known case this doesn't handle is:
    #
    #     Ripper.lex <<~EOM
    #       a &&
    #        b ||
    #        c
    #     EOM
    #
    # For some reason this introduces `on_ignore_newline` but with BEG type
    #
    def join_consecutive!
      consecutive_groups = @document.select(&:ignore_newline_not_beg?).map do |code_line|
        take_while_including(code_line.index..-1) do |line|
          line.ignore_newline_not_beg?
        end
      end

      join_groups(consecutive_groups)
      self
    end

    # Join lines with a trailing slash
    #
    #     source = <<~'EOM'
    #       it "code can be split" \
    #          "across multiruby/syntax_suggest/parse_blocks_from_indent_line.rb000064400000003000150403134250017171 0ustar00, empty lines are placed
    # in the place of the lines that were "joined"
    def join_groups(groups)
      groups.each do |lines|
        line = lines.first

        # Handle the case of multiple groups in a a row
        # if one is already replaced, move on
        next if @document[line.index].empty?

        # Join group into the first line
        @document[line.index] = CodeLine.new(
          lex: lines.map(&:lex).flatten,
          line: lines.join,
          index: line.index
        )

        # Hide the rest of the lines
        lines[1..-1].each do |line|
          # The above lines already have newlines in them, if add more
          # then there will be double newline, use an empty line instead
          @document[line.index] = CodeLine.new(line: "", index: line.index, lex: [])
        end
      end
      self
    end

    # Helper method for grabbing elements from document
    #
    # Like `take_while` except when it stops
    # iterating, it also returns the line
    # that caused it to stop
    def take_while_including(range = 0..-1)
      take_next_and_stop = false
      @document[range].take_while do |line|
        next if take_next_and_stop

        take_next_and_stop = !(yield line)
        true
      end
    end
  end
end
ruby/syntax_suggest/capture/falling_indent_lines.rb000064400000003127150403134250016753 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # This class is responsible for generating initial code blocks
  # that will then later be expanded.
  #
  # The biggest concern when guessing code blocks, is accidentally
  # grabbing one that contains only an "end". In this example:
  #
  #   def dog
  #     begonn # mispelled `begin`
  #     puts "bark"
  #     end
  #   end
  #
  # The following lines would be matched (from bottom to top):
  #
  #   1) end
  #
  #   2) puts "bark"
  #      end
  #
  #   3) begonn
  #      puts "bark"
  #      end
  #
  # At this point it has no where else to expand, and it will yield this inner
  # code as a block
  class ParseBlocksFromIndentLine
    attr_reader :code_lines

    def initialize(code_lines:)
      @code_lines = code_lines
    end

    # Builds blocks from bottom up
    def each_neighbor_block(target_line)
      scan = AroundBlockScan.new(code_lines: code_lines, block: CodeBlock.new(lines: target_line))
        .force_add_empty
        .force_add_hidden
        .scan_while { |line| line.indent >= target_line.indent }

      neighbors = scan.code_block.lines

      block = CodeBlock.new(lines: neighbors)
      if neighbors.length <= 2 || block.valid?
        yield block
      else
        until neighbors.empty?
          lines = [neighbors.pop]
          while (block = CodeBlock.new(lines: lines)) && block.invalid? && neighbors.any?
            lines.prepend neighbors.pop
          end

          yield block if block
        end
      end
    end
  end
end
ruby/syntax_suggest/capture/falling_indent_lines.rbruby/syntax_suggest/capture/before_after_keyword_ends.rb000064400000004244150403134250020005 0ustar00   FallingIndentLines.new(
    #       block: block,
    #       code_lines: @code_lines
    #   ).call do |line|
    #     @lines_to_output << line
    #   end
    #
    class FallingIndentLines
      def initialize(code_lines:, block:)
        @lines = nil
        @scanner = ScanHistory.new(code_lines: code_lines, block: block)
        @original_indent = block.current_indent
      end

      def call(&yieldable)
        last_indent_up = @original_indent
        last_indent_down = @original_indent

        @scanner.commit_if_changed
        @scanner.scan(
          up: ->(line, _, _) {
            next true if line.empty?

            if line.indent < last_indent_up
              yieldable.call(line)
              last_indent_up = line.indent
            end
            true
          },
          down: ->(line, _, _) {
            next true if line.empty?

            if line.indent < last_indent_down
              yieldable.call(line)
              last_indent_down = line.indent
            end
            true
          }
        )
        @scanner.stash_changes
      end
    end
  end
end
ruby/syntax_suggest/capture/before_after_keyword_ends.rb000064400000004244150403134250020005 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  module Capture
    # Shows surrounding kw/end pairs
    #
    # The purpose of showing these extra pairs is duruby/syntax_suggest/code_block.rb000064400000004203150403134250013221 0ustar00.new(code_lines: code_lines, block: block)
        @original_indent = block.current_indent
      end

      def call
        lines = []

        @scanner.scan(
          up: ->(line, kw_count, end_count) {
            next true if line.empty?
            break if line.indent < @original_indent
            next true if line.indent != @original_indent

            # If we're going up and have one complete kw/end pair, stop
            if kw_count != 0 && kw_count == end_count
              lines << line
              break
            end

            lines << line if line.is_kw? || line.is_end?
            true
          },
          down: ->(line, kw_count, end_count) {
            next true if line.empty?
            break if line.indent < @original_indent
            next true if line.indent != @original_indent

            # if we're going down and have one complete kw/end pair,stop
            if kw_count != 0 && kw_count == end_count
              lines << line
              break
            end

            linruby/digest/version.rb000064400000000105150403134250011007 0ustar00ustar00ruby/digest/sha2/loader.rb000064400000000070150403134250011426 0ustar00ruby/digest/loader.rb000064400000000063150403134250010573 0ustar00 then the result cannot be invalid
        #
      ruby/digest/sha2.rb000064400000007425150403134250010173 0ustar00ustar00ruby/syntax_suggest/lex_all.rb000064400000002171150403134250012557 0ustar00CodeWithLineNumbers
    TERMINAL_HIGHLIGHT = "\e[1;3m" # Bold, italics
    TERMINAL_END = "\e[0m"

    def initialize(lines:, highlight_lines: [], terminal: false)
      @lines = Array(lines).sort
      @terminal = terminal
      @highlight_line_hash = Array(highlight_lines).each_with_object({}) { |line, h| h[line] = true }
      @digit_count = @lines.last&.line_number.to_s.length
    end

    def call
      @lines.map do |line|
        format_line(line)
      end.join
    end

    private def format_line(code_line)
      # Handle trailing slash lines
      code_line.original.lines.map.with_index do |contents, i|
        format(
          empty: code_line.empty?,
          number: (code_line.number + i).to_s,
          contents: contents,
          highlight: @highlight_line_hash[code_line]
        )
      end.join
    end

    private def format(contents:, number:, empty:, highlight: false)
      string = +""
      string << if highlight
        "> "
      else
        "  "
      end

      string << number.rjust(@digit_count).to_s
      if empty
        string << contents
      else
        string << "  "
        string << TEruby/syntax_suggest/code_line.rb000064400000014727150403134250013072 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Ripper.lex is not guaranteed to lex the entire source document
  #
  # lex = LexAll.new(source: source)
  # lex.each do |value|
  #   puts value.line
  # end
  class LexAll
    include Enumerable

    def initialize(source:, source_lines: nil)
      @lex = Ripper::Lexer.new(source, "-", 1).parse.sort_by(&:pos)
      lineno = @lex.last.pos.first + 1
      source_lines ||= source.lines
      last_lineno = source_lines.length

      until lineno >= last_lineno
        lines = source_lines[lineno..-1]

        @lex.concat(
          Ripper::Lexer.new(lines.join, "-", lineno + 1).parse.sort_by(&:pos)
        )
        lineno = @lex.last.pos.first + 1
      end

      last_lex = nil
      @lex.map! { |elem|
        last_lex = LexValue.new(elem.pos.first, elem.event, elem.tok, elem.state, last_lex)
      }
    end

    def to_a
      @lex
    end

    def each
      return @lex.each unless block_given?
      @lex.each do |x|
  ruby/English.rb000064400000014162150403134250007444 0ustar00ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Represents a single line of code of a given source file
  #
  # This object contains metadata about the line such as
  # amount of indentation, if it is empty or not, and
  # lexical data, such as if it has an `end` or a keyword
  # in it.
  #
  # Visibility of lines can be toggled off. Marking a line as invisible
  # indicates that it should not be used for syntax checks.
  # It's functionally the same as commenting it out.
  #
  # Example:
  #
  #   line = CodeLine.from_source("def foo\n").first
  #   line.number => 1
  #   line.empty? # => false
  #   line.visible? # => true
  #   line.mark_invisible
  #   line.visible? # => false
  #
  class CodeLine
    TRAILING_SLASH = ("\\" + $/).freeze

    # Returns an array of CodeLine objects
    # from the source string
    def self.from_source(source, lines: nil)
      lines ||= source.lines
      lex_array_for_line = LexAll.new(source: source, source_lines: lines).each_with_object(Hash.new { |h, k| h[k] = [] }) { |lex, hash| hash[lex.line] << lex }
      lines.map.with_index do |line, index|
        CodeLine.new(
          line: line,
          index: index,
          lex: lex_array_for_line[index + 1]
        )
      end
    end

    attr_reader :line, :index, :lex, :line_number, :indent
    def initialize(line:, index:, lex:)
      @lex = lex
      @line = line
      @index = index
      @original = line
      @line_number = @index + 1
      strip_line = line.dup
      strip_line.lstrip!

      @indent = if (@empty = strip_line.empty?)
        line.length - 1 # Newline removed from strip_line is not "whitespace"
      else
        line.length - strip_line.length
      end

      set_kw_end
    end

    # Used for stable sort via indentation level
    #
    # Ruby's sort is not "stable" meaning that when
    # multiple elements have the same value, they are
    # not guaranteed to return in the same order they
    # were put in.
    #
    # So when multiple code lines have the same indentation
    # level, they're sorted by their index value which is unique
    # and consistent.
    #
    # This is mostly needed for consistency of the test suite
    def indent_index
      @indent_index ||= [indent, index]
    end
    alias_method :number, :line_number

    # Returns true if the code line is determined
    # to contain a keyword that matches with an `end`
    #
    # For example: `def`, `do`, `begin`, `ensure`, etc.
    def is_kw?
      @is_kw
    end

    # Returns true if the code line is determined
    # to contain an `end` keyword
    def is_end?
      @is_end
    end

    # Used to hide lines
    #
    # The search alorithm will group lines into blocks
    # then if those blocks are determined to represent
    # valid code they will be hidden
    def mark_invisible
      @line = ""
    end

    # Means the line was marked as "invisible"
    # Confusingly, "empty" lines are visible...they
    # just don't contain any source code other than a newline ("\n").
    def visible?
      !line.empty?
    end

    # Opposite or `visible?` (note: different than `empty?`)
    def hidden?
      !visible?
    end

    # An `empty?` line is one that was originally left
    # empty in the source code, while a "hidden" line
    # is one that we've since marked as "invisible"
    def empty?
      @empty
    end

    # Opposite of `empty?` (note: different than `visible?`)
    def not_empty?
      !empty?
    end

    # Renders the given line
    #
    # Also allows us to represent source code as
    # an array of code lines.
    #
    # When we have an array of code line elements
    # calling `join` on the array will call `to_s`
    # on each element, which essentially converts
    # it back into it's original source string.
    def to_s
      line
    end

    # When the code line is marked invisible
    # we retain the original value of it's line
    # this is useful for debugging and for
    # showing extra context
    #
    # DisplayCodeWithLineNumbers will render
    # all lines given to it, not just visible
    # lines, it uses the original method to
    # obtain them.
    attr_reader :original

    # Comparison operator, needed for equality
    # and sorting
    def <=>(other)
      index <=> other.index
    end

    # [Not stable API]
    #
    # Lines that have a `on_ignored_nl` type token and NOT
    # a `BEG` type seem to be a good proxy for the ability
    # to join multiple lines into one.
    #
    # This predicate method is used to determine when those
    # two criteria have bruby/syntax_suggest/pathname_from_message.rb000064400000002656150403134250015473 0ustar00  last = @lex.last
      return false unless last
      return false unless last.type == :on_sp

      last.token == TRAILING_SLASH
    end

    # Endless method detection
    #
    # From https://github.com/ruby/irb/commit/826ae909c9c93a2ddca6f9cfcd9c94dbf53d44ab
    # Detecting a "oneliner" seems to need a state machine.
    # This can be done by looking mostly at the "state" (last value):
    #
    #   ENDFN -> BEG (token = '=' ) -> END
    #
    private def set_kw_end
      oneliner_count = 0
      in_oneliner_def = nil

      kw_count = 0
      end_count = 0

      @ignore_newline_not_beg = false
      @lex.each do |lex|
        kw_count += 1 if lex.is_kw?
        end_count += 1 if lex.is_end?

        if lex.type == :on_ignored_nl
          @ignore_newline_not_beg = !lex.expr_beg?
        end

        if in_onruby/cgi/cookie.rb000064400000015116150403134250010066 0ustar00ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Converts a SyntaxError message to a path
  #
  # Handles the case where the filename has a colon in it
  # such as on a windows file system: https://github.com/ruby/syntax_suggest/issues/111
  #
  # Example:
  #
  #    message = "/tmp/scratch:2:in `require_relative': /private/tmp/bad.rb:1: syntax error, unexpected `end' (SyntaxError)"
  #    puts PathnameFromMessage.new(message).call.name
  #    # => "/tmp/scratch.rb"
  #
  class PathnameFromMessage
    EVAL_RE = /^\(eval\):\d+/
    STREAMING_RE = /^-:\d+/
    attr_reader :name

    def initialize(message, io: $stderr)
      @line = message.lines.first
      @parts = @line.split(":")
      @guess = []
      @name = nil
      @io = io
    end

    def call
      if skip_missing_file_name?
        if ENV["SYNTAX_SUGGEST_DEBUG"]
          @io.puts "SyntaxSuggest: Could not find filename from #{@line.inspect}"
        end
      else
        until stop?
          @guess << @parts.shift
          @name = Pathname(@guess.join(":"))
        end

        if @parts.empty?
          @io.puts "SyntaxSuggest: Could not find filename from #{@line.inspect}"
          @name = nil
        end
      end

      self
    end

    def stop?
      return true if @parts.empty?
      return false if @guess.empty?

      @name&.exist?
   ruby/drb/unix.rb000064400000005433150403134240007605 0ustar00ptures everything within the same indentation block.
  #
  #   def dog
  #     puts "bow"
  #     puts "wow"
  #   end
  #
  # block = BlockExpand.new(code_lines: code_lines)
  #   .call(CodeBlock.new(lines: code_lines[1]))
  #
  # puts block.to_s
  # # => puts "bow"
  #      puts "wow"
  #
  #
  # Once a code block has captured everything at a given indentation level
  # then it will expand to capture surrounding indentation.
  #
  # block = BlockExpand.new(code_lines: code_lines)
  #   .call(block)
  #
  # block.to_s
  # # => def dog
  #        puts "bow"
  #        puts "wow"
  #      end
  #
  class BlockExpand
    def initialize(code_lines:)
      @code_lines = code_lines
    end

    # Main interface. Expand current indentation, before
    # expanding to a lower indentation
    def call(block)
      if (next_block = expand_neighbors(block))
        next_block
      else
        expand_indent(block)
      end
    end

    # Expands code to the next lowest indentation
    #
    # For example:
    #
    #   1 def dog
    #   2   print "dog"
    #   3 end
    #
    # If a block starts on line 2 then it has captured all it's "neighbors" (code at
    # the same indentation or higher). To continue expanding, this block must capture
    # lines one and three which are at a different indentation level.
    #
    # This method allows fully expanded blocks to decrease their indentation level (so
    # they can expand to capture more code up and down). It does this conservatively
    # as there's no undo (currently).
    def expand_indent(block)
      now = AroundBlockScan.new(code_lines: @code_lines, block: block)
        .force_add_hidden
        .stop_after_kw
        .scan_adjacent_indent

      now.lookahead_balance_one_line

      now.code_block
    end

    # A neighbor is code that is at or above the current indent line.
    #
    # First we build a block with all neighbors. If we can't go further
    # then we decrease the indentation threshold and expand via indentation
    # i.e. `expand_indent`
    #
    # Handles two general cases.
    #
    # ## Case #1: Check code inside of methods/classes/etc.
    #
    # It's important to note, that not everything in a given indentation level can be parsed
    # as valid code even if it's part of valid code. For example:
    #
    #   1 hash = {
    #   2   name: "richard",
    #   3   dog: "cinco",
    #   4 }
    #
    # In this case lines 2 and 3 will be neighbors, but they're invalid until `expand_indent`
    # is called on them.
    #
    # When we are adding code within a method or class (at the same indentation level),
    # use the empty lines to denote the programmer intended logical chunks.
    # Stop and check each one. For example:
    #ruby/drb/observer.rb000064400000001237150403134240010447 0ustar00es 4, 5, and 6 are in a block when it tries to expand neighbors
    # it will expand up. If it stops after line 2 or 3 it may cause problems since there's a
    # valid kw/end pair, but the block will be checked without it.
    #
    # We try to resolve this edge case with `lookahead_balance_one_line` below.
    def expand_neighbors(block)
      now = AroundBlockScan.new(code_lines: @code_lines, block: block)

      # Initial scan
      now
        .force_add_hidden
        .stop_after_kw
        .scan_neighbors_not_empty

      # Slurp up empties
      now
        .scan_while { |linruby/cgi/html.rb000064400000104217150403134250007562 0ustar00# frozen_string_literal: true

class Logger
  VERSION = "1.6.4"
end
ruby/logger/errors.rb000064400000000266150403134240010645 0ustar00# frozen_string_literal: true

class Logger
  # not used after 1.2.7. just for compat.
  class Error < RuntimeError # :nodoc:
  end
  class ShiftingError < Error # :nodoc:
  end
end
ruby/logger/severity.rb000064400000001556150403134250011207 0ustar00# 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

    LEVELS = {
      "debug" => DEBUG,
      "info" => INFO,
      "warn" => WARN,
      "error" => ERROR,
      "fatal" => FATAL,
      "unknown" => UNKNOWN,
    }
    private_constant :LEVELS

    def self.coerce(severity)
      if severity.is_a?(Integer)
        severity
      else
        key = severity.to_s.downcase
        LEVELS[key] || raise(ArgumentError, "invalid log level: #{severity}")
      end
    end
  end
end
ruby/logger/period.rb000064400000002776150403134250010624 0ustar00# 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', :daily
        t = Time.mktime(now.year, now.month, now.mday) + SiD
      when 'weekly', :weekly
        t = Time.mktime(now.year, now.month, now.mday) + SiD * (7 - now.wday)
      when 'monthly', :monthly
        t = Time.mktime(now.year, now.month, 1) + SiD * 32
        return Time.mktime(t.year, t.month, 1)
      when 'now', 'everytime', :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', :daily
        t = Time.mktime(now.year, now.month, now.mday) - SiD / 2
      when 'weekly', :weekly
        t = Time.mktime(now.year, now.month, now.mday) - (SiD * now.wday + SiD / 2)
      when 'monthly', :monthly
        t = Time.mktime(now.year, now.month, 1) - SiD / 2
      when 'now', 'everytime', :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
ruby/logger/log_device.rb000064400000014470150403134250011434 0ustar00# 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, reraise_write_errors: [])
      @dev = @filename = @shift_age = @shift_size = @shift_period_suffix = nil
      @binmode = binmode
      @reraise_write_errors = reraise_write_errors
      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)
      handle_write_errors("writing") do
        synchronize do
          if @shift_age and @dev.respond_to?(:stat)
            handle_write_errors("shifting") {check_shift_log}
          end
          handle_write_errors("writing") {@dev.write(message)}
        end
      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

    # :stopdoc:

    MODE = File::WRONLY | File::APPEND
    MODE_TO_OPEN = MODE | File::SHARE_DELETE | File::BINARY
    MODE_TO_CREATE = MODE_TO_OPEN | File::CREAT | File::EXCL

    def set_dev(log)
      if log.respond_to?(:write) and log.respond_to?(:close)
        @dev = log
        if log.respond_to?(:path) and path = log.path
          if File.exist?(path)
            @filename = path
          end
        end
      else
        @dev = open_logfile(log)
        @filename = log
      end
    end

    if MODE_TO_OPEN == MODE
      def fixup_mode(dev, filename)
        dev
      end
    else
      def fixup_mode(dev, filename)
        return dev if @binmode
        dev.autoclose = false
        old_dev = dev
        dev = File.new(dev.fileno, mode: MODE, path: filename)
        old_dev.close
        PathAttr.set_path(dev, filename) if defined?(PathAttr)
        dev
      end
    end

    def open_logfile(filename)
      begin
        dev = File.open(filename, MODE_TO_OPEN)
      rescue Errno::ENOENT
        create_logfile(filename)
      else
        dev = fixup_mode(dev, filename)
        dev.sync = true
        dev.binmode if @binmode
        dev
      end
    end

    def create_logfile(filename)
      begin
        logdev = File.open(filename, MODE_TO_CREATE)
        logdev.flock(File::LOCK_EX)
        logdev = fixup_mode(logdev, filename)
        logdev.sync = true
        logdev.binmode if @binmode
        add_log_header(logdev)
        logdev.flock(File::LOCK_UN)
        logdev
      rescue Errno::EEXIST
        # file is created by another process
        open_logfile(filename)
      end
    end

    def handle_write_errors(mesg)
      yield
    rescue *@reraise_write_errors
      raise
    rescue
      warn("log #{mesg} failed. #{$!}")
    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

    def lock_shift_log
      retry_limit = 8
      retry_sleep = 0.1
      begin
        File.open(@filename, MODE_TO_OPEN) 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)
          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

    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

File.open(__FILE__) do |f|
  File.new(f.fileno, autoclose: false, path: "").path
rescue IOError
  module PathAttr               # :nodoc:
    attr_reader :path

    def self.set_path(file, path)
      file.extend(self).instance_variable_set(:@path, path)
    end
  end
end
ruby/logger/formatter.rb000064400000001426150403134250011334 0ustar00# frozen_string_literal: true

class Logger
  # Default formatter for log messages.
  class Formatter
    Format = "%.1s, [%s #%d] %5s -- %s: %s\n"
    DatetimeFormat = "%Y-%m-%dT%H:%M:%S.%6N"

    attr_accessor :datetime_format

    def initialize
      @datetime_format = nil
    end

    def call(severity, time, progname, msg)
      sprintf(Format, severity, format_datetime(time), Process.pid, severity, progname, msg2str(msg))
    end

  private

    def format_datetime(time)
      time.strftime(@datetime_format || DatetimeFormat)
    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
ruby/set.rb000064400000062002150403134250006642 0ustar00# frozen_string_literal: true
# :markup: markdown
#
# set.rb - defines the Set class
#
# Copyright (c) 2002-2024 Akinori MUSHA <knu@iDaemons.org>
#
# 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 implements 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 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]                        #=> #<Set: {1, 2}>
# s2 = [1, 2].to_set                    #=> #<Set: {1, 2}>
# s1 == s2                              #=> true
# s1.add("foo")                         #=> #<Set: {1, 2, "foo"}>
# s1.merge([2, 6])                      #=> #<Set: {1, 2, "foo", 6}>
# s1.subset?(s2)                        #=> false
# s2.subset?(s1)                        #=> true
# ```
#
# ## Contact
#
# - Akinori MUSHA <<knu@iDaemons.org>> (current maintainer)
#
# ## What's Here
#
#  First, what's elsewhere. \Class \Set:
#
# - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
# - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
#   which provides dozens of additional methods.
#
# In particular, class \Set does not have many methods of its own
# for fetching or for iterating.
# Instead, it relies on those in \Enumerable.
#
# Here, class \Set provides methods that are useful for:
#
# - [Creating a Set](#class-Set-label-Methods+for+Creating+a+Set)
# - [Set Operations](#class-Set-label-Methods+for+Set+Operations)
# - [Comparing](#class-Set-label-Methods+for+Comparing)
# - [Querying](#class-Set-label-Methods+for+Querying)
# - [Assigning](#class-Set-label-Methods+for+Assigning)
# - [Deleting](#class-Set-label-Methods+for+Deleting)
# - [Converting](#class-Set-label-Methods+for+Converting)
# - [Iterating](#class-Set-label-Methods+for+Iterating)
# - [And more....](#class-Set-label-Other+Methods)
#
# ### Methods for Creating a \Set
#
# - ::[]:
#   Returns a new set containing the given objects.
# - ::new:
#   Returns a new set containing either the given objects
#   (if no block given) or the return values from the called block
#   (if a block given).
#
# ### Methods for \Set Operations
#
# - [|](#method-i-7C) (aliased as #union and #+):
#   Returns a new set containing all elements from +self+
#   and all elements from a given enumerable (no duplicates).
# - [&](#method-i-26) (aliased as #intersection):
#   Returns a new set containing all elements common to +self+
#   and a given enumerable.
# - [-](#method-i-2D) (aliased as #difference):
#   Returns a copy of +self+ with all elements
#   in a given enumerable removed.
# - [\^](#method-i-5E):
#   Returns a new set containing all elements from +self+
#   and a given enumerable except those common to both.
#
# ### Methods for Comparing
#
# - [<=>](#method-i-3C-3D-3E):
#   Returns -1, 0, or 1 as +self+ is less than, equal to,
#   or greater than a given object.
# - [==](#method-i-3D-3D):
#   Returns whether +self+ and a given enumerable are equal,
#   as determined by Object#eql?.
# - \#compare_by_identity?:
#   Returns whether the set considers only identity
#   when comparing elements.
#
# ### Methods for Querying
#
# - \#length (aliased as #size):
#   Returns the count of elements.
# - \#empty?:
#   Returns whether the set has no elements.
# - \#include? (aliased as #member? and #===):
#   Returns whether a given object is an element in the set.
# - \#subset? (aliased as [<=](#method-i-3C-3D)):
#   Returns whether a given object is a subset of the set.
# - \#proper_subset? (aliased as [<](#method-i-3C)):
#   Returns whether a given enumerable is a proper subset of the set.
# - \#superset? (aliased as [>=](#method-i-3E-3D])):
#   Returns whether a given enumerable is a superset of the set.
# - \#proper_superset? (aliased as [>](#method-i-3E)):
#   Returns whether a given enumerable is a proper superset of the set.
# - \#disjoint?:
#   Returns +true+ if the set and a given enumerable
#   have no common elements, +false+ otherwise.
# - \#intersect?:
#   Returns +true+ if the set and a given enumerable:
#   have any common elements, +false+ otherwise.
# - \#compare_by_identity?:
#   Returns whether the set considers only identity
#   when comparing elements.
#
# ### Methods for Assigning
#
# - \#add (aliased as #<<):
#   Adds a given object to the set; returns +self+.
# - \#add?:
#   If the given object is not an element in the set,
#   adds it and returns +self+; otherwise, returns +nil+.
# - \#merge:
#   Merges the elements of each given enumerable object to the set; returns +self+.
# - \#replace:
#   Replaces the contents of the set with the contents
#   of a given enumerable.
#
# ### Methods for Deleting
#
# - \#clear:
#   Removes all elements in the set; returns +self+.
# - \#delete:
#   Removes a given object from the set; returns +self+.
# - \#delete?:
#   If the given object is an element in the set,
#   removes it and returns +self+; otherwise, returns +nil+.
# - \#subtract:
#   Removes each given object from the set; returns +self+.
# - \#delete_if - Removes elements specified by a given block.
# - \#select! (aliased as #filter!):
#   Removes elements not specified by a given block.
# - \#keep_if:
#   Removes elements not specified by a given block.
# - \#reject!
#   Removes elements specified by a given block.
#
# ### Methods for Converting
#
# - \#classify:
#   Returns a hash that classifies the elements,
#   as determined by the given block.
# - \#collect! (aliased as #map!):
#   Replaces each element with a block return-value.
# - \#divide:
#   Returns a hash that classifies the elements,
#   as determined by the given block;
#   differs from #classify in that the block may accept
#   either one or two arguments.
# - \#flatten:
#   Returns a new set that is a recursive flattening of +self+.
#  \#flatten!:
#   Replaces each nested set in +self+ with the elements from that set.
# - \#inspect (aliased as #to_s):
#   Returns a string displaying the elements.
# - \#join:
#   Returns a string containing all elements, converted to strings
#   as needed, and joined by the given record separator.
# - \#to_a:
#   Returns an array containing all set elements.
# - \#to_set:
#   Returns +self+ if given no arguments and no block;
#   with a block given, returns a new set consisting of block
#   return values.
#
# ### Methods for Iterating
#
# - \#each:
#   Calls the block with each successive element; returns +self+.
#
# ### Other Methods
#
# - \#reset:
#   Resets the internal state; useful if an object
#   has been modified while an element in the set.
#
class Set
  VERSION = "1.1.1"

  include Enumerable

  # Creates a new set containing the given objects.
  #
  #     Set[1, 2]                   # => #<Set: {1, 2}>
  #     Set[1, 2, 1]                # => #<Set: {1, 2}>
  #     Set[1, 'c', :s]             # => #<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: {1, 2}>
  #     Set.new([1, 2, 1])                    #=> #<Set: {1, 2}>
  #     Set.new([1, 'c', :s])                 #=> #<Set: {1, "c", :s}>
  #     Set.new(1..5)                         #=> #<Set: {1, 2, 3, 4, 5}>
  #     Set.new([1, 2, 3]) { |x| x * x }      #=> #<Set: {1, 4, 9}>
  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

  # Clone internal hash.
  def initialize_clone(orig, **options)
    super
    @hash = orig.instance_variable_get(:@hash).clone(**options)
  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: {1, "c", :s}>
  #     set.clear                         #=> #<Set: {}>
  #     set                               #=> #<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: {1, "c", :s}>
  #     set.replace([1, 2])               #=> #<Set: {1, 2}>
  #     set                               #=> #<Set: {1, 2}>
  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

  # Returns an array containing all elements in the set.
  #
  #     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 = {}) # :nodoc:
    set.each { |e|
      if e.is_a?(Set)
        case seen[e_id = e.object_id]
        when true
          raise ArgumentError, "tried to flatten recursive Set"
        when false
          next
        end

        seen[e_id] = true
        flatten_merge(e, seen)
        seen[e_id] = false
      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?(Set)
  end

  # Returns true if the set contains the given object.
  #
  # Note that <code>include?</code> and <code>member?</code> do not test member
  # equality using <code>==</code> 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?(self)
    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?(self)
    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?(set)
    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?(set)
    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 enumerable 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
  #     Set[1, 2, 3].intersect? 4..5        #=> false
  #     Set[1, 2, 3].intersect? [3, 4]      #=> true
  def intersect?(set)
    case set
    when Set
      if size < set.size
        any?(set)
      else
        set.any?(self)
      end
    when Enumerable
      set.any?(self)
    else
      raise ArgumentError, "value must be enumerable"
    end
  end

  # Returns true if the set and the given enumerable 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
  #     Set[1, 2, 3].disjoint? [3, 4]      #=> false
  #     Set[1, 2, 3].disjoint? 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_given? 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, 3}>
  #     Set[1, 2].add([3, 4])               #=> #<Set: {1, 2, [3, 4]}>
  #     Set[1, 2].add(2)                    #=> #<Set: {1, 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, 3}>
  #     Set[1, 2].add?([3, 4])               #=> #<Set: {1, 2, [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)
    block_given? or return enum_for(__method__) { size }
    # Instead of directly using @hash.delete_if, perform enumeration
    # using self.each that subclasses may override.
    select(&block).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)
    block_given? or return enum_for(__method__) { size }
    # Instead of directly using @hash.keep_if, perform enumeration
    # using self.each that subclasses may override.
    reject(&block).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_given? 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_given? 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 objects to the set and
  # returns self.
  def merge(*enums, **nil)
    enums.each do |enum|
      if enum.instance_of?(self.class)
        @hash.update(enum.instance_variable_get(:@hash))
      else
        do_with_enum(enum) { |o| add(o) }
      end
    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, 2, 3, 4, 5}>
  #     Set[1, 5, 'z'] | (1..6)             #=> #<Set: {1, 5, "z", 2, 3, 4, 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: {3}>
  #     Set['a', 'b', 'z'] - ['a', 'c']         #=> #<Set: {"b", "z"}>
  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: {3, 1}>
  #     Set['a', 'b', 'z'] & ['a', 'b', 'c']    #=> #<Set: {"a", "b"}>
  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: {3, 1}>
  #     Set[1, 'b', 'c'] ^ ['b', 'd']           #=> #<Set: {"d", 1, "c"}>
  def ^(enum)
    n = self.class.new(enum)
    each { ruby/cgi/session/pstore.rb000064400000005121150403134250011607 0ustar00e 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=>#<Set: {"a.rb", "b.rb"}>,
  #                #    2001=>#<Set: {"c.rb", "d.rb", "e.rb"}>,
  #                #    2002=>#<Set: {"f.rb"}>}
  #
  # 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        #=> #<Set: {#<Set: {1}>,
  #                #           #<Set: {11, 9, 10}>,
  #                #           #<Set: {3, 4}>,
  #                #           #<Set: {6}>}>
  #
  # 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()
      druby/cgi/util.rb000064400000017500150403134250007571 0ustar00 '}') {
        pp.seplist(self) { |o|
          pp.pp o
        }
      }
    }
  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 unless method_defined?(:to_set)
end

autoload :SortedSet, "#{__dir__}/set/sorted_set"
ruby/digest/version.rb000064400000000105150403134250011007 0ustar00# frozen_string_literal: true

module Digest
  VERSION = "3.2.0"
end
ruby/digest/sha2/loader.rb000064400000000070150403134250011426 0ustar00# frozen_string_literal: true

require 'digest/sha2.so'
ruby/digest/loader.rb000064400000000063150403134250010573 0ustar00# frozen_string_literal: true

require 'digest.so'
ruby/digest/sha2.rb000064400000007425150403134250010173 0ustar00# frozen_string_literal: false
#--
# sha2.rb - defines Digest::SHA2 class which wraps up the SHA256,
#           SHA384, and SHA512 classes.
#++
# Copyright (c) 2006 Akinori MUSHA <knu@iDaemons.org>
#
# All rights reserved.  You can redistribute and/or modify it under the same
# terms as Ruby.
#
#   $Id$

require 'digest'
require 'digest/sha2/loader'

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               # =>#<Digest::SHA2:256>
  #  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.newruby/cgi/session.rb000064400000046311150403134250010301 0ustar00ruby/English.rb000064400000013050150403134250007437 0ustar00# frozen_string_literal: true
#  Include the English library file in a Ruby script, and you can
#  reference the global variables such as <code>$_</code> 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::         $~
#  $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 <code>-F</code> flag.
alias $FS                      $;
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.

# 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                     $,
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                      $/
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                     $\
alias $OUTPUT_RECORD_SEPARATOR $\

# The number of the last line read from the current input file.
alias $NR                      $.
alias $INPUT_LINE_NUMBER       $.

# The last line read by Kernel#gets or
# Kernel#readline. Many string-related functions in the
# Kernel module operate on <code>$_</code> 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
# <code>$stdout</code>.
alias $DEFAULT_OUTPUT          $>

# An object that provides access to the concatenation
# of the contents of all the files
# given as command-line arguments, or <code>$stdin</code>
# (in the case where there are no
# arguments). <code>$<</code> supports methods similar to a
# File object:
# +inmode+, +close+,
# <code>closed?</code>, +each+,
# <code>each_byte</code>, <code>each_line</code>,
# +eof+, <code>eof?</code>, +file+,
# +filename+, +fileno+,
# +getc+, +gets+, +lineno+,
# <code>lineno=</code>, +path+,
# +pos+, <code>pos=</code>,
# +read+, +readchar+,
# +readline+, +readlines+,
# +rewind+, +seek+, +skip+,
# +tell+, <code>to_a</code>, <code>to_i</code>,
# <code>to_io</code>, <code>to_s</code>, along with the
# methods in Enumerable. The method +file+
# returns a File object for the file currently
# being read. This may change as <code>$<</code> 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                     $$
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 <code>$&</code>, <code>$`</code>, <code>$'</code>,
# and <code>$1</code> to <code>$9</code> are all derived from
# <code>$~</code>. Assigning to <code>$~</code> changes the values of these
# derived variables.  This variable is local to the current
# scope.
alias $LAST_MATCH_INFO         $~

# 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 <code>"cat" =~ /(c|a)(t|z)/</code>,
# <code>$+</code> will be set to "t".  This variable is local to the
# current scope. Read only.
alias $LAST_PAREN_MATCH        $+
ruby/cgi/cookie.rb000064400000015116150403134250010066 0ustar00# 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\.?(?<label>(?!-)[-A-Za-z0-9]+(?<!-))(?:\.\g<label>)*\z"

    # Create a new CGI::Cookie object.
    #
    # :call-seq:
    #   Cookie.new(name_string,*value)
    #   Cookie.new(options_hash)
    #
    # +name_string+::
    #   The name of the cookie; in this form, there is no #domain or
    #   #expiration.  The #path is gleaned from the +SCRIPT_NAME+ environment
    #   variable, and #secure is false.
    # <tt>*value</tt>::
    #   value or list of values of the cookie
    # +options_hash+::
    #   A Hash of options to initialize this Cookie.  Possible options are:
    #
    #   name:: the name of the cookie.  Required.
    #   value:: the cookie's value or list of values.
    #   path:: the path for which this cookie applies.  Defaults to
    #          the value of the +SCRIPT_NAME+ environment variable.
    #   domain:: the domain for which this cookie applies.
    #   expires:: the time at which this cookie expires, as a +Time+ object.
    #   secure:: whether this cookie is a secure cookie or not (default to
    #            false).  Secure cookies are only transmitted to HTTPS
    #            servers.
    #   httponly:: whether this cookie is a HttpOnly cookie or not (default to
    #            false).  HttpOnly cookies are not available to javascript.
    #
    #   These keywords correspond to attributes of the cookie object.
    def initialize(name = "", *value)
      @domain = nil
      @expires = nil
      if name.kind_of?(String)
        self.name = name
        self.path = (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
        @secure = false
        @httponly = false
        return super(value)
      end

      options = name
      unless options.has_key?("name")
        raise ArgumentError, "`name' required"
      end

      self.name = options["name"]
      value = Array(options["value"])
      # simple support for IE
      self.path = options["path"] || (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
      self.domain = options["domain"]
      @expires = options["expires"]
      @secure = options["secure"] == true
      @httponly = options["httponly"] == true

      super(value)
    end

    # Name of this cookie, as a +String+
    attr_reader :name
    # Set name of this cookie
    def name=(str)
      if str and !TOKEN_RE.match?(str)
        raise ArgumentError, "invalid name: #{str.dump}"
      end
      @name = str
    end

    # Path for which this cookie applies, as a +String+
    attr_reader :path
    # Set path for which this cookie applies
    def path=(str)
      if str and !PATH_VALUE_RE.match?(str)
        raise ArgumentError, "invalid path: #{str.dump}"
      end
      @path = str
    end

    # Domain for which this cookie applies, as a +String+
    attr_reader :domain
    # Set domain for which this cookie applies
    def domain=(str)
      if str and ((str = str.b).bytesize > 255 or !DOMAIN_VALUE_RE.match?(str))
        raise ArgumentError, "invalid domain: #{str.dump}"
      end
      @domain = str
    end

    # Time at which this cookie expires, as a +Time+
    attr_accessor :expires
    # True if this cookie is secure; false otherwise
    attr_reader :secure
    # True if this cookie is httponly; false otherwise
    attr_reader :httponly

    # Returns the value or list of values for this cookie.
    def value
      self
    end

    # Replaces the value of this cookie with a new value or list of values.
    def value=(val)
      replace(Array(val))
    end

    # Set whether the Cookie is a secure cookie or not.
    #
    # +val+ must be a boolean.
    def secure=(val)
      @secure = val if val == true or val == false
      @secure
    end

    # Set whether the Cookie is a httponly cookie or not.
    #
    # +val+ must be a boolean.
    def httponly=(val)
      @httponly = !!val
    end

    # Convert the Cookie to its string representation.
    def to_s
      val = collect{|v| CGI.escape(v) }.join("&")
      buf = "#{@name}=#{val}".dup
      buf << "; domain=#{@domain}" if @domain
      buf << "; path=#{@path}"     if @path
      buf << "; expires=#{CGI.rfc1123_date(@expires)}" if @expires
      buf << "; secure"            if @secure
      buf << "; HttpOnly"          if @httponly
      buf
    end

    # Parse a raw cookie string into a hash of cookie-name=>Cookie
    # pairs.
    #
    #   cookies = CGI::Cookie.parse("raw_cookie_string")
    #     # { "name1" => cookie1, "name2" => cookie2, ... }
    #
    def self.parse(raw_cookie)
      cookies = Hash.new([])
      return cookies unless raw_cookie

      raw_cookie.split(/;\s?/).each do |pairs|
        name, values = pairs.split('=',2)
        next unless name and values
        values ||= ""
        values = values.split('&').collect{|v| CGI.unescape(v,@@accept_charset) }
        if cookies.has_key?(name)
          cookies[name].concat(values)
        else
          cookies[name] = Cookie.new(name, *values)
        end
      end

      cookies
    end

    # A summary of cookie string.
    def inspect
      "#<CGI::Cookie: #{self.to_s.inspect}>"
    end

  end # class Cookie
end


ruby/cgi/html.rb000064400000104217150403134250007562 0ustar00# 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 << "</#{element.upcase}>"
    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 << "</#{element.upcase}>"
      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" }
  #     # => "<A HREF=\"http://www.example.com\">Example</A>"
  #
  # 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" }
    #     # => "<A HREF=\"http://www.example.com\">Example</A>"
    #
    #   a("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" }
    #     # => "<A HREF=\"http://www.example.com\" TARGET=\"_top\">Example</A>"
    #
    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")
    #     # => "<BASE HREF=\"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!" }
    #     #=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!</BLOCKQUOTE>
    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" }
    #     # => <CAPTION ALIGN=\"left\">Capital Cities</CAPTION>
    def caption(align = {}) # :yield:
      attributes = if align.kind_of?(String)
                     { "ALIGN" => align }
                   else
                     align
                   end
      super(attributes)
 ruby/cgi/core.rb000064400000072445150403134250007555 0ustar00          "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")
    #     # <INPUT TYPE="checkbox" NAME="name" VALUE="foo">foo
    #     # <INPUT TYPE="checkbox" NAME="name" VALUE="bar">bar
    #     # <INPUT TYPE="checkbox" NAME="name" VALUE="baz">baz
    #
    #   checkbox_group("name", ["foo"], ["bar", true], "baz")
    #     # <INPUT TYPE="checkbox" NAME="name" VALUE="foo">foo
    #     # <INPUT TYPE="checkbox" CHECKED NAME="name" VALUE="bar">bar
    #     # <INPUT TYPE="checkbox" NAME="name" VALUE="baz">baz
    #
    #   checkbox_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz")
    #     # <INPUT TYPE="checkbox" NAME="name" VALUE="1">Foo
    #     # <INPUT TYPE="checkbox" CHECKED NAME="name" VALUE="2">Bar
    #     # <INPUT TYPE="checkbox" NAME="name" VALUE="Baz">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")
    #     # <INPUT TYPE="file" NAME="name" SIZE="20">
    #
    #   file_field("name", 40)
    #     # <INPUT TYPE="file" NAME="name" SIZE="40">
    #
    #   file_field("name", 40, 100)
    #     # <INPUT TYPE="file" NAME="name" SIZE="40" MAXLENGTH="100">
    #
    #   file_field("NAME" => "name", "SIZE" => 40)
    #     # <INPUT TYPE="file" 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" }
    #     # <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
    #
    #   form("get") { "string" }
    #     # <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
    #
    #   form("get", "url") { "string" }
    #     # <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM>
    #
    #   form("METHOD" => "post", "ENCTYPE" => "enctype") { "string" }
    #     # <FORM METHOD="post" ENCTYPE="enctype">string</FORM>
    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|
          "<INPUT TYPE=\"HIDDEN\" NAME=\"#{k}\" VALUE=\"#{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")
    #     # <INPUT TYPE="hidden" NAME="name">
    #
    #   hidden("name", "value")
    #     # <INPUT TYPE="hidden" NAME="name" VALUE="value">
    #
    #   hidden("NAME" => "name", "VALUE" => "reset", "ID" => "foo")
    #     # <INPUT TYPE="hidden" NAME="name" VALUE="value" 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" }
    #     # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML>string</HTML>
    #
    #   html("LANG" => "ja") { "string" }
    #     # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML LANG="ja">string</HTML>
    #
    #   html("DOCTYPE" => false) { "string" }
    #     # <HTML>string</HTML>
    #
    #   html("DOCTYPE" => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">') { "string" }
    #     # <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>string</HTML>
    #
    #   html("PRETTY" => "  ") { "<BODY></BODY>" }
    #     # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    #     # <HTML>
    #     #   <BODY>
    #     #   </BODY>
    #     # </HTML>
    #
    #   html("PRETTY" => "\t") { "<BODY></BODY>" }
    #     # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    #     # <HTML>
    #     #         <BODY>
    #     #         </BODY>
    #     # </HTML>
    #
    #   html("PRETTY") { "<BODY></BODY>" }
    #     # = html("PRETTY" => "  ") { "<BODY></BODY>" }
    #
    #   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")
    #     # <INPUT TYPE="image" SRC="url">
    #
    #   image_button("url", "name", "string")
    #     # <INPUT TYPE="image" SRC="url" NAME="name" ALT="string">
    #
    #   image_button("SRC" => "url", "ALT" => "string")
    #     # <INPUT TYPE="image" 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)
    #     # <IMG SRC="src" ALT="alt" WIDTH="100" HEIGHT="50">
    #
    #   img("SRC" => "src", "ALT" => "alt", "WIDTH" => 100, "HEIGHT" => 50)
    #     # <IMG SRC="src" ALT="alt" WIDTH="100" HEIGHT="50">
    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" }
    #     # <FORM METHOD="post" ENCTYPE="multipart/form-data">string</FORM>
    #
    #   multipart_form("url") { "string" }
    #     # <FORM METHOD="post" ACTION="url" ENCTYPE="multipart/form-data">string</FORM>
    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")
    #     # <INPUT TYPE="password" NAME="name" SIZE="40">
    #
    #   password_field("name", "value")
    #     # <INPUT TYPE="password" NAME="name" VALUE="value" SIZE="40">
    #
    #   password_field("password", "value", 80, 200)
    #     # <INPUT TYPE="password" NAME="name" VALUE="value" SIZE="80" MAXLENGTH="200">
    #
    #   password_field("NAME" => "name", "VALUE" => "value")
    #     # <INPUT TYPE="password" 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")
    #     # <SELECT NAME="name">
    #     #   <OPTION VALUE="foo">foo</OPTION>
    #     #   <OPTION VALUE="bar">bar</OPTION>
    #     #   <OPTION VALUE="baz">baz</OPTION>
    #     # </SELECT>
    #
    #   popup_menu("name", ["foo"], ["bar", true], "baz")
    #     # <SELECT NAME="name">
    #     #   <OPTION VALUE="foo">foo</OPTION>
    #     #   <OPTION VALUE="bar" SELECTED>bar</OPTION>
    #     #   <OPTION VALUE="baz">baz</OPTION>
    #     # </SELECT>
    #
    #   popup_menu("name", ["1", "Foo"], ["2", "Bar", true], "Baz")
    #     # <SELECT NAME="name">
    #     #   <OPTION VALUE="1">Foo</OPTION>
    #     #   <OPTION SELECTED VALUE="2">Bar</OPTION>
    #     #   <OPTION VALUE="Baz">Baz</OPTION>
    #     # </SELECT>
    #
    #   popup_menu("NAME" => "name", "SIZE" => 2, "MULTIPLE" => true,
    #               "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"])
    #     # <SELECT NAME="name" MULTIPLE SIZE="2">
    #     #   <OPTION VALUE="1">Foo</OPTION>
    #     #   <OPTION SELECTED VALUE="2">Bar</OPTION>
    #     #   <OPTION VALUE="Baz">Baz</OPTION>
    #     # </SELECT>
    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")
    #     # <INPUT TYPE="radio" NAME="name" VALUE="value">
    #
    #   radio_button("name", "value", true)
    #     # <INPUT TYPE="radio" NAME="name" VALUE="value" CHECKED>
    #
    #   radio_button("NAME" => "name", "VALUE" => "value", "ID" => "foo")
    #     # <INPUT TYPE="radio" 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")
    #     # <INPUT TYPE="radio" NAME="name" VALUE="foo">foo
    #     # <INPUT TYPE="radio" NAME="name" VALUE="bar">bar
    #     # <INPUT TYPE="radio" NAME="name" VALUE="baz">baz
    #
    #   radio_group("name", ["foo"], ["bar", true], "baz")
    #     # <INPUT TYPE="radio" NAME="name" VALUE="foo">foo
    #     # <INPUT TYPE="radio" CHECKED NAME="name" VALUE="bar">bar
    #     # <INPUT TYPE="radio" NAME="name" VALUE="baz">baz
    #
    #   radio_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz")
    #     # <INPUT TYPE="radio" NAME="name" VALUE="1">Foo
    #     # <INPUT TYPE="radio" CHECKED NAME="name" VALUE="2">Bar
    #     # <INPUT TYPE="radio" NAME="name" VALUE="Baz">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
    #     # <INPUT TYPE="reset">
    #
    #   reset("reset")
    #     # <INPUT TYPE="reset" VALUE="reset">
    #
    #   reset("VALUE" => "reset", "ID" => "foo")
    #     # <INPUT TYPE="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
    #     # <INPUT TYPE="submit">
    #
    #   submit("ok")
    #     # <INPUT TYPE="submit" VALUE="ok">
    #
    #   submit("ok", "button1")
    #     # <INPUT TYPE="submit" VALUE="ok" NAME="button1">
    #
    #   submit("VALUE" => "ok", "NAME" => "button1", "ID" => "foo")
    #     # <INPUT TYPE="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")
    #     # <INPUT TYPE="text" NAME="name" SIZE="40">
    #
    #   text_field("name", "value")
    #     # <INPUT TYPE="text" NAME="name" VALUE="value" SIZE="40">
    #
    #   text_field("name", "value", 80)
    #     # <INPUT TYPE="text" NAME="name" VALUE="value" SIZE="80">
    #
    #   text_field("name", "value", 80, 200)
    #     # <INPUT TYPE="text" NAME="name" VALUE="value" SIZE="80" MAXLENGTH="200">
    #
    #   text_field("NAME" => "name", "VALUE" => "value")
    #     # <INPUT TYPE="text" 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
      %|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">|
    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
      %|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">|
    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
      %|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">|
    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
      %|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">|
    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
      %|<!DOCTYPE HTML>|
    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
ruby/cgi/session/pstore.rb000064400000005204150403134250011611 0ustar00ruby/resolv.rb000064400000224276150403134250007376 0ustar00age 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={})
        option = {'suffix'=>''}.update(option)
        path, @hash = session.new_store_file(option)
        @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 if defined?(::PStore)
  end
end
# :enddoc:
ruby/cgi/util.rb000064400000020105150403134250007564 0ustar00# frozen_string_literal: true
class CGI
  module Util; end
  include Util
  extend Util
end
module CGI::Util
  @@accept_charset = Encoding::UTF_8 unless defined?(@@accept_charset)

  # URL-encode a string into application/x-www-form-urlencoded.
  # Space characters (+" "+) are encoded with plus signs (+"+"+)
  #   url_encoded_string = CGI.escape("'Stop!' said Fred")
  #      # => "%27Stop%21%27+said+Fred"
  def escape(string)
    encoding = string.encoding
    buffer = string.b
    buffer.gsub!(/([^ a-zA-Z0-9_.\-~]+)/) do |m|
      '%' + m.unpack('H2' * m.bytesize).join('%').upcase
    end
    buffer.tr!(' ', '+')
    buffer.force_encoding(encoding)
  end

  # URL-decode an application/x-www-form-urlencoded string with encoding(optional).
  #   string = CGI.unescape("%27Stop%21%27+said+Fred")
  #      # => "'Stop!' said Fred"
  def unescape(string, encoding = @@accept_charset)
    str = string.tr('+', ' ')
    str = str.b
    str.gsub!(/((?:%[0-9a-fA-F]{2})+)/) do |m|
      [m.delete('%')].pack('H*')
    end
    str.force_encoding(encoding)
    str.valid_encoding? ? str : str.force_encoding(string.encoding)
  end

  # URL-encode a string following RFC 3986
  # Space characters (+" "+) are encoded with (+"%20"+)
  #   url_encoded_string = CGI.escapeURIComponent("'Stop!' said Fred")
  #      # => "%27Stop%21%27%20said%20Fred"
  def escapeURIComponent(string)
    encoding = string.encoding
    buffer = string.b
    buffer.gsub!(/([^a-zA-Z0-9_.\-~]+)/) do |m|
      '%' + m.unpack('H2' * m.bytesize).join('%').upcase
    end
    buffer.force_encoding(encoding)
  end
  alias escape_uri_component escapeURIComponent

  # URL-decode a string following RFC 3986 with encoding(optional).
  #   string = CGI.unescapeURIComponent("%27Stop%21%27+said%20Fred")
  #      # => "'Stop!'+said Fred"
  def unescapeURIComponent(string, encoding = @@accept_charset)
    str = string.b
    str.gsub!(/((?:%[0-9a-fA-F]{2})+)/) do |m|
      [m.delete('%')].pack('H*')
    end
    str.force_encoding(encoding)
    str.valid_encoding? ? str : str.force_encoding(string.encoding)
  end

  alias unescape_uri_component unescapeURIComponent

  # The set of special characters and their escaped values
  TABLE_FOR_ESCAPE_HTML__ = {
    "'" => '&#39;',
    '&' => '&amp;',
    '"' => '&quot;',
    '<' => '&lt;',
    '>' => '&gt;',
  }

  # Escape special characters in HTML, namely '&\"<>
  #   CGI.escapeHTML('Usage: foo "bar" <baz>')
  #      # => "Usage: foo &quot;bar&quot; &lt;baz&gt;"
  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
      string
    else
      string = string.b
      string.gsub!(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
      string.force_encoding(enc)
    end
  end

  # TruffleRuby runs the pure-Ruby variant faster, do not use the C extension there
  unless RUBY_ENGINE == 'truffleruby'
    begin
      require 'cgi/escape'
    rescue LoadError
    end
  end

  # Unescape a string that has been HTML-escaped
  #   CGI.unescapeHTML("Usage: foo &quot;bar&quot; &lt;baz&gt;")
  #      # => "Usage: foo \"bar\" <baz>"
  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 = string.b
    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
    string.force_encoding enc
  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('<BR><A HREF="url"></A>', "A", "IMG")
  #     # "<BR>&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt"
  #
  #   print CGI.escapeElement('<BR><A HREF="url"></A>', ["A", "IMG"])
  #     # "<BR>&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt"
  def escapeElement(string, *elements)
    elements = elements[0] if elements[0].kind_of?(Array)
    unless elements.empty?
      string.gsub(/<\/?(?:#{elements.join("|")})\b[^<>]*+>?/im) do
        CGI.escapeHTML($&)
      end
    else
      string
    end
  end

  # Undo escaping such as that done by CGI.escapeElement()
  #
  #   print CGI.unescapeElement(
  #           CGI.escapeHTML('<BR><A HREF="url"></A>'), "A", "IMG")
  #     # "&lt;BR&gt;<A HREF="url"></A>"
  #
  #   print CGI.unescapeElement(
  #           CGI.escapeHTML('<BR><A HREF="url"></A>'), ["A", "IMG"])
  #     # "&lt;BR&gt;<A HREF="url"></A>"
  def unescapeElement(string, *elements)
    elements = elements[0] if elements[0].kind_of?(Array)
    unless elements.empty?
      string.gsub(/&lt;\/?(?:#{elements.join("|")})\b(?>[^&]+|&(?![gl]t;)\w+;)*(?:&gt;)?/im) 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

  # 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)
    time.getgm.strftime("%a, %d %b %Y %T GMT")
  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("<HTML><BODY></BODY></HTML>")
  #     # <HTML>
  #     #   <BODY>
  #     #   </BODY>
  #     # </HTML>
  #
  #   print CGI.pretty("<HTML><BODY></BODY></HTML>", "\t")
  #     # <HTML>
  #     #         <BODY>
  #     #         </BODY>
  #     # </HTML>
  #
  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
ruby/cgi/session.rb000064400000046263150403134250010307 0ustar00# frozen_string_literal: true
#
# cgi/session.rb - session support for cgi scripts
#
# Copyright (C) 2001  Yukihiro "Matz" Matsumoto
# Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
# Copyright (C) 2000  Information-technology Promotion Agency, Japan
#
# Author: Yukihiro "Matz" Matsumoto
#
# Documentation: William Webber (william@williamwebber.com)

require 'cgi'
require 'tmpdir'

class CGI

  # == Overview
  #
  # This file provides the CGI::Session class, which provides session
  # support for CGI scripts.  A session is a sequence of HTTP requests
  # and responses linked together and associated with a single client.
  # Information associated with the session is stored
  # on the server between requests.  A session id is passed between client
  # and server with every request and response, transparently
  # to the user.  This adds state information to the otherwise stateless
  # HTTP request/response protocol.
  #
  # == Lifecycle
  #
  # A CGI::Session instance is created from a CGI object.  By default,
  # this CGI::Session instance will start a new session if none currently
  # exists, or continue the current session for this client if one does
  # exist.  The +new_session+ option can be used to either always or
  # never create a new session.  See #new() for more details.
  #
  # #delete() deletes a session from session storage.  It
  # does not however remove the session id from the client.  If the client
  # makes another request with the same id, the effect will be to start
  # a new session with the old session's id.
  #
  # == Setting and retrieving session data.
  #
  # The Session class associates data with a session as key-value pairs.
  # This data can be set and retrieved by indexing the Session instance
  # using '[]', much the same as hashes (although other hash methods
  # are not supported).
  #
  # When session processing has been completed for a request, the
  # session should be closed using the close() method.  This will
  # store the session's state to persistent storage.  If you want
  # to store the session's state to persistent storage without
  # finishing session processing for this request, call the update()
  # method.
  #
  # == Storing session state
  #
  # The caller can specify what form of storage to use for the session's
  # data with the +database_manager+ option to CGI::Session::new.  The
  # following storage classes are provided as part of the standard library:
  #
  # CGI::Session::FileStore:: stores data as plain text in a flat file.  Only
  #                           works with String data.  This is the default
  #                           storage type.
  # CGI::Session::MemoryStore:: stores data in an in-memory hash.  The data
  #                             only persists for as long as the current Ruby
  #                             interpreter instance does.
  # CGI::Session::PStore:: stores data in Marshalled format.  Provided by
  #                        cgi/session/pstore.rb.  Supports data of any type,
  #                        and provides file-locking and transaction support.
  #
  # Custom storage types can also be created by defining a class with
  # the following methods:
  #
  #    new(session, options)
  #    restore  # returns hash of session data.
  #    update
  #    close
  #    delete
  #
  # Changing storage type mid-session does not work.  Note in particular
  # that by default the FileStore and PStore session data files have the
  # same name.  If your application switches from one to the other without
  # making sure that filenames will be different
  # and clients still have old sessions lying around in cookies, then
  # things will break nastily!
  #
  # == Maintaining the session id.
  #
  # Most session state is maintained on the server.  However, a session
  # id must be passed backwards and forwards between client and server
  # to maintain a reference to this session state.
  #
  # The simplest way to do this is via cookies.  The CGI::Session class
  # provides transparent support for session id communication via cookies
  # if the client has cookies enabled.
  #
  # If the client has cookies disabled, the session id must be included
  # as a parameter of all requests sent by the client to the server.  The
  # CGI::Session class in conjunction with the CGI class will transparently
  # add the session id as a hidden input field to all forms generated
  # using the CGI#form() HTML generation method.  No built-in support is
  # provided for other mechanisms, such as URL re-writing.  The caller is
  # responsible for extracting the session id from the session_id
  # attribute and manually encoding it in URLs and adding it as a hidden
  # input to HTML forms created by other mechanisms.  Also, session expiry
  # is not automatically handled.
  #
  # == Examples of use
  #
  # === Setting the user's name
  #
  #   require 'cgi'
  #   require 'cgi/session'
  #   require 'cgi/session/pstore'     # provides CGI::Session::PStore
  #
  #   cgi = CGI.new("html4")
  #
  #   session = CGI::Session.new(cgi,
  #       'database_manager' => CGI::Session::PStore,  # use PStore
  #       'session_key' => '_rb_sess_id',              # custom session key
  #       'session_expires' => Time.now + 30 * 60,     # 30 minute timeout
  #       'prefix' => 'pstore_sid_')                   # PStore option
  #   if cgi.has_key?('user_name') and cgi['user_name'] != ''
  #       # coerce to String: cgi[] returns the
  #       # string-like CGI::QueryExtension::Value
  #       session['user_name'] = cgi['user_name'].to_s
  #   elsif !session['user_name']
  #       session['user_name'] = "guest"
  #   end
  #   session.close
  #
  # === Creating a new session safely
  #
  #   require 'cgi'
  #   require 'cgi/session'
  #
  #   cgi = CGI.new("html4")
  #
  #   # We make sure to delete an old session if one exists,
  #   # not just to free resources, but to prevent the session
  #   # from being maliciously hijacked later on.
  #   begin
  #       session = CGI::Session.new(cgi, 'new_session' => false)
  #       session.delete
  #   rescue ArgumentError  # if no old session
  #   end
  #   session = CGI::Session.new(cgi, 'new_session' => true)
  #   session.close
  #
  class Session

    class NoSession < RuntimeError #:nodoc:
    end

    # The id of this session.
    attr_reader :session_id, :new_session

    def Session::callback(dbman)  #:nodoc:
      Proc.new{
        dbman[0].close unless dbman.empty?
      }
    end

    # Create a new session id.
    #
    # The session id is a secure random number by SecureRandom
    # if possible, otherwise an SHA512 hash based upon the time,
    # a random number, and a constant string.  This routine is
    # used internally for automatically generated session ids.
    def create_new_id
      require 'securerandom'
      begin
        # by OpenSSL, or system provided entropy pool
        session_id = SecureRandom.hex(16)
      rescue NotImplementedError
        # never happens on modern systems
        require 'digest'
        d = Digest('SHA512').new
        now = Time::now
        d.update(now.to_s)
        d.update(String(now.usec))
        d.update(String(rand(0)))
        d.update(String($$))
        d.update('foobar')
        session_id = d.hexdigest[0, 32]
      end
      session_id
    end
    private :create_new_id


    # Create a new file to store the session data.
    #
    # This file will be created if it does not exist, or opened if it
    # does.
    #
    # This path is generated under _tmpdir_ from _prefix_, the
    # digested session id, and _suffix_.
    #
    # +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.
    def new_store_file(option={}) # :nodoc:
      dir = option['tmpdir'] || Dir::tmpdir
      prefix = option['prefix']
      suffix = option['suffix']
      require 'digest/md5'
      md5 = Digest::MD5.hexdigest(session_id)[0,16]
      path = dir+"/"
      path << prefix if prefix
      path << md5
      path << suffix if suffix
      if File::exist? path
        hash = nil
      elsif new_session
        hash = {}
      else
        raise NoSession, "uninitialized session"
      end
      return path, hash
    end

    # Create a new CGI::Session object for +request+.
    #
    # +request+ is an instance of the +CGI+ class (see cgi.rb).
    # +option+ is a hash of options for initialising this
    # CGI::Session instance.  The following options are
    # recognised:
    #
    # session_key:: the parameter name used for the session id.
    #               Defaults to '_session_id'.
    # session_id:: the session id to use.  If not provided, then
    #              it is retrieved from the +session_key+ parameter
    #              of the request, or automatically generated for
    #              a new session.
    # new_session:: if true, force creation of a new session.  If not set,
    #               a new session is only created if none currently
    #               exists.  If false, a new session is never created,
    #               and if none currently exists and the +session_id+
    #               option is not set, an ArgumentError is raised.
    # database_manager:: the name of the class providing storage facilities
    #                    for session state persistence.  Built-in support
    #                    is provided for +FileStore+ (the default),
    #                    +MemoryStore+, and +PStore+ (from
    #                    cgi/session/pstore.rb).  See the documentation for
    #                    these classes for more details.
    #
    # The following options are also recognised, but only apply if the
    # session id is stored in a cookie.
    #
    # session_expires:: the time the current session expires, as a
    #                   +Time+ object.  If not set, the session will terminate
    #                   when the user's browser is closed.
    # session_domain:: the hostname domain for which this session is valid.
    #                  If not set, defaults to the hostname of the server.
    # session_secure:: if +true+, this session will only work over HTTPS.
    # session_path:: the path for which this session applies.  Defaults
    #                to the directory of the CGI script.
    #
    # +option+ is also passed on to the session storage class initializer; see
    # the documentation for each session storage class for the options
    # they support.
    #
    # The retrieved or created session is automatically added to +request+
    # as a cookie, and also to its +output_hidden+ table, which is used
    # to add hidden input elements to forms.
    #
    # *WARNING* the +output_hidden+
    # fields are surrounded by a <fieldset> 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 https://blade.ruby-lang.org/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={})
        option = {'prefix' => 'cgi_sid_'}.update(option)
        @path, @hash = session.new_store_file(option)
      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
ruby/cgi/core.rb000064400000072445150403134250007555 0ustar00# 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 <tt>Content-Type</tt>
  # +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 <header> 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.
  #
  # <tt>Content-Length</tt> is automatically calculated from the size of
  # the String returned by the content block.
  #
  # If <tt>ENV['REQUEST_METHOD'] == "HEAD"</tt>, 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 }
  #
  #
  # <tt>tag_maker</tt>::
  #   This is the same as using the +options_hash+ form with the value <tt>{
  #   :tag_maker => tag_maker }</tt> Note that it is recommended to use the
  #   +options_hash+ form, since it also allows you specify the charset you
  #   will accept.
  # <tt>options_hash</tt>::
  #   A Hash that recognizes three options:
  #
  #   <tt>:accept_charset</tt>::
  #     specifies encoding of received query string.  If omitted,
  #     <tt>@@accept_charset</tt> is used.  If the encoding is not valid, a
  #     CGI::InvalidEncoding will be raised.
  #
  #     Example. Suppose <tt>@@accept_charset</tt> 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"
  #
  #   <tt>:tag_maker</tt>::
  #     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
  #
  #   <tt>:max_multipart_length</tt>::
  #     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
  #
  # <tt>block</tt>::
  #   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
ruby/resolv.rb000064400000255603150403134250007374 0ustar00# frozen_string_literal: true

require 'socket'
require 'timeout'
require 'io/wait'
require 'securerandom'

# 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

  VERSION = "0.6.0"

  ##
  # 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+.
  #
  # If +resolvers+ is not given, a hash, or +nil+, uses a Hosts resolver and
  # and a DNS resolver.  If +resolvers+ is a hash, uses the hash as
  # configuration for the DNS resolver.

  def initialize(resolvers=(arg_not_set = true; nil), use_ipv6: (keyword_not_set = true; nil))
    if !keyword_not_set && !arg_not_set
      warn "Support for separate use_ipv6 keyword is deprecated, as it is ignored if an argument is provided. Do not provide a positional argument if using the use_ipv6 keyword argument.", uplevel: 1
    end

    @resolvers = case resolvers
    when Hash, nil
      [Hosts.new, DNS.new(DNS::Config.default_config_hash.merge(resolvers || {}))]
    else
      resolvers
    end
  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, *hostnames = line.split(/\s+/)
              next unless addr
              (@addr2name[addr] ||= []).concat(hostnames)
              hostnames.each {|hostname| (@name2addr[hostname] ||= []) << 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.
    # :raise_timeout_errors can be used to raise timeout errors
    # as exceptions instead of treating the same as an NXDOMAIN response.
    #
    # 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)
      if use_ipv6?
        each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address}
      end
      each_resource(name, Resource::IN::A) {|resource| yield resource.address}
    end

    def use_ipv6? # :nodoc:
      @config.lazy_initialize unless @config.instance_variable_get(:@initialized)

      use_ipv6 = @config.use_ipv6?
      unless use_ipv6.nil?
        return use_ipv6
      end

      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
    # * ruby/mkmf.rb000064400000260633150403134250007013 0ustar00esources(reply, reply_name, typeclass, &proc)
      }
    end

    def fetch_resource(name, typeclass)
      lazy_initialize
      truncated = {}
      requesters = {}
      udp_requester = begin
        make_udp_requester
      rescue Errno::EACCES
        # fall back to TCP
      end
      senders = {}

      begin
        @config.resolv(name) do |candidate, tout, nameserver, port|
          msg = Message.new
          msg.rd = 1
          msg.add_question(candidate, typeclass)

          requester = requesters.fetch([nameserver, port]) do
            if !truncated[candidate] && udp_requester
              udp_requester
            else
              requesters[[nameserver, port]] = make_tcp_requester(nameserver, port)
            end
          end

          unless sender = senders[[candidate, requester, nameserver, port]]
            sender = requester.sender(msg, candidate, nameserver, port)
            next if !sender
            senders[[candidate, requester, 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
              # Retry via TCP:
              truncated[candidate] = true
              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
        end
      ensure
        udp_requester&.close
        requesters.each_value { |requester| 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)
    rescue Errno::ECONNREFUSED
      # Treat a refused TCP connection attempt to a nameserver like a timeout,
      # as Resolv::DNS::Config#resolv considers ResolvTimeout exceptions as a
      # hint to try the next nameserver:
      raise ResolvTimeout
    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

    def self.random(arg) # :nodoc:
      begin
        SecureRandom.random_number(arg)
      rescue NotImplementedError
        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, Errno::EPROTONOSUPPORT
                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.concat(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 = []
            @use_ipv6 = nil
            @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
            if config_hash.include? :use_ipv6
              @use_ipv6 = config_hash[:use_ipv6]
            end
            @search = config_hash[:search] if config_hash.include? :search
            @ndots = config_hash[:ndots] if config_hash.include? :ndots
            @raise_timeout_errors = config_hash[:raise_timeout_errors]

            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 use_ipv6?
        @use_ipv6
      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
        timeout_error = false
        begin
          candidates.each {|candidate|
            begin
              timeouts.each {|tout|
                @nameserver_port.each {|nameserver, port|
                  begin
                    yield candidate, tout, nameserver, port
                  rescue ResolvTimeout
                  end
                }
              }
              timeout_error = true
              raise ResolvError.new("DNS resolv timeout: #{name}")
            rescue NXDomain
            end
          }
        rescue ResolvError
          raise if @raise_timeout_errors && timeout_error
        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, compress: true)
          put_labels(d.to_a, compress: compress)
        end

        def put_labels(d, compress: true)
          d.each_index {|i|
            domain = d[i..-1]
            if compress && 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.tc = (flag >> 9) & 1
          o.rcode = flag & 15
          return o unless o.tc.zero?

          o.qr = (flag >> 15) & 1
          o.opcode = (flag >> 11) & 15
          o.aa = (flag >> 10) & 1
          o.rd = (flag >> 8) & 1
          o.ra = (flag >> 7) & 1
          (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_list
          [].tap do |values|
            while @index < @limit
              values << yield
            end
          end
        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

    ##
    # SvcParams for service binding RRs. [RFC9460]

    class SvcParams
      include Enumerable

      ##
      # Create a list of SvcParams with the given initial content.
      #
      # +params+ has to be an enumerable of +SvcParam+s.
      # If its content has +SvcParam+s with the duplicate key,
      # the one appears last takes precedence.

      def initialize(params = [])
        @params = {}

        params.each do |param|
          add param
        end
      end

      ##
      # Get SvcParam for the given +key+ in this list.

      def [](key)
        @params[canonical_key(key)]
      end

      ##
      # Get the number of SvcParams in this list.

      def count
        @params.count
      end

      ##
      # Get whether this list is empty.

      def empty?
        @params.empty?
      end

      ##
      # Add the SvcParam +param+ to this list, overwriting the existing one with the same key.

      def add(param)
        @params[param.class.key_number] = param
      end

      ##
      # Remove the +SvcParam+ with the given +key+ and return it.

      def delete(key)
        @params.delete(canonical_key(key))
      end

      ##
      # Enumerate the +SvcParam+s in this list.

      def each(&block)
        return enum_for(:each) unless block
        @params.each_value(&block)
      end

      def encode(msg) # :nodoc:
        @params.keys.sort.each do |key|
          msg.put_pack('n', key)
          msg.put_length16 do
            @params.fetch(key).encode(msg)
          end
        end
      end

      def self.decode(msg) # :nodoc:
        params = msg.get_list do
          key, = msg.get_unpack('n')
          msg.get_length16 do
            SvcParam::ClassHash[key].decode(msg)
          end
        end

        return self.new(params)
      end

      private

      def canonical_key(key) # :nodoc:
        case key
        when Integer
          key
        when /\Akey(\d+)\z/
          Integer($1)
        when Symbol
          SvcParam::ClassHash[key].key_number
        else
          raise TypeError, 'key must be either String or Symbol'
        end
      end
    end

    ##
    # Base class for SvcParam. [RFC9460]

    class SvcParam

      ##
      # Get the presentation name of the SvcParamKey.

      def self.key_name
        const_get(:KeyName)
      end

      ##
      # Get the registered number of the SvcParamKey.

      def self.key_number
        const_get(:KeyNumber)
      end

      ClassHash = Hash.new do |h, key| # :nodoc:
        case key
        when Integer
          Generic.create(key)
        when /\Akey(?<key>\d+)\z/
          Generic.create(key.to_int)
        when Symbol
          raise KeyError, "unknown key #{key}"
        else
          raise TypeError, 'key must be either String or Symbol'
        end
      end

      ##
      # Generic SvcParam abstract class.

      class Generic < SvcParam

        ##
        # SvcParamValue in wire-format byte string.

        attr_reader :value

        ##
        # Create generic SvcParam

        def initialize(value)
          @value = value
        end

        def encode(msg) # :nodoc:
          msg.put_bytes(@value)
        end

        def self.decode(msg) # :nodoc:
          return self.new(msg.get_bytes)
        end

        def self.create(key_number)
          c = Class.new(Generic)
          key_name = :"key#{key_number}"
          c.const_set(:KeyName, key_name)
          c.const_set(:KeyNumber, key_number)
          self.const_set(:"Key#{key_number}", c)
          ClassHash[key_name] = ClassHash[key_number] = c
          return c
        end
      end

      ##
      # "mandatory" SvcParam -- Mandatory keys in service binding RR

      class Mandatory < SvcParam
        KeyName = :mandatory
        KeyNumber = 0
        ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:

        ##
        # Mandatory keys.

        attr_reader :keys

        ##
        # Initialize "mandatory" ScvParam.

        def initialize(keys)
          @keys = keys.map(&:to_int)
        end

        def encode(msg) # :nodoc:
          @keys.sort.each do |key|
            msg.put_pack('n', key)
          end
        end

        def self.decode(msg) # :nodoc:
          keys = msg.get_list { msg.get_unpack('n')[0] }
          return self.new(keys)
        end
      end

      ##
      # "alpn" SvcParam -- Additional supported protocols

      class ALPN < SvcParam
        KeyName = :alpn
        KeyNumber = 1
        ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:

        ##
        # Supported protocol IDs.

        attr_reader :protocol_ids

        ##
        # Initialize "alpn" ScvParam.

        def initialize(protocol_ids)
          @protocol_ids = protocol_ids.map(&:to_str)
        end

        def encode(msg) # :nodoc:
          msg.put_string_list(@protocol_ids)
        end

        def self.decode(msg) # :nodoc:
          return self.new(msg.get_string_list)
        end
      end

      ##
      # "no-default-alpn" SvcParam -- No support for default protocol

      class NoDefaultALPN < SvcParam
        KeyName = :'no-default-alpn'
        KeyNumber = 2
        ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:

        def encode(msg) # :nodoc:
          # no payload
        end

        def self.decode(msg) # :nodoc:
          return self.new
        end
      end

      ##
      # "port" SvcParam -- Port for alternative endpoint

      class Port < SvcParam
        KeyName = :port
        KeyNumber = 3
        ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:

        ##
        # Port number.

        attr_reader :port

        ##
        # Initialize "port" ScvParam.

        def initialize(port)
          @port = port.to_int
        end

        def encode(msg) # :nodoc:
          msg.put_pack('n', @port)
        end

        def self.decode(msg) # :nodoc:
          port, = msg.get_unpack('n')
          return self.new(port)
        end
      end

      ##
      # "ipv4hint" SvcParam -- IPv4 address hints

      class IPv4Hint < SvcParam
        KeyName = :ipv4hint
        KeyNumber = 4
        ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:

        ##
        # Set of IPv4 addresses.

        attr_reader :addresses

        ##
        # Initialize "ipv4hint" ScvParam.

        def initialize(addresses)
          @addresses = addresses.map {|address| IPv4.create(address) }
        end

        def encode(msg) # :nodoc:
          @addresses.each do |address|
            msg.put_bytes(address.address)
          end
        end

        def self.decode(msg) # :nodoc:
          addresses = msg.get_list { IPv4.new(msg.get_bytes(4)) }
          return self.new(addresses)
        end
      end

      ##
      # "ipv6hint" SvcParam -- IPv6 address hints

      class IPv6Hint < SvcParam
        KeyName = :ipv6hint
        KeyNumber = 6
        ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:

        ##
        # Set of IPv6 addresses.

        attr_reader :addresses

        ##
        # Initialize "ipv6hint" ScvParam.

        def initialize(addresses)
          @addresses = addresses.map {|address| IPv6.create(address) }
        end

        def encode(msg) # :nodoc:
          @addresses.each do |address|
            msg.put_bytes(address.address)
          end
        end

        def self.decode(msg) # :nodoc:
          addresses = msg.get_list { IPv6.new(msg.get_bytes(16)) }
          return self.new(addresses)
        end
      end

      ##
      # "dohpath" SvcParam -- DNS over HTTPS path template [RFC9461]

      class DoHPath < SvcParam
        KeyName = :dohpath
        KeyNumber = 7
        ClassHash[KeyName] = ClassHash[KeyNumber] = self # :nodoc:

        ##
        # URI template for DoH queries.

        attr_reader :template

        ##
        # Initialize "dohpath" ScvParam.

        def initialize(template)
          @template = template.encode('utf-8')
        end

        def encode(msg) # :nodoc:
          msg.put_bytes(@template)
        end

        def self.decode(msg) # :nodoc:
          template = msg.get_bytes.force_encoding('utf-8')
          return self.new(template)
        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

      ##
      # CAA resource record defined in RFC 8659
      #
      # These records identify certificate authority allowed to issue
      # certificates for the given domain.

      class CAA < Resource
        TypeValue = 257

        ##
        # Creates a new CAA for +flags+, +tag+ and +value+.

        def initialize(flags, tag, value)
          unless (0..255) === flags
            raise ArgumentError.new('flags must be an Integer between 0 and 255')
          end
          unless (1..15) === tag.bytesize
            raise ArgumentError.new('length of tag must be between 1 and 15')
          end

          @flags = flags
          @tag = tag
          @value = value
        end

        ##
        # Flags for this proprty:
        # - Bit 0 : 0 = not critical, 1 = critical

        attr_reader :flags

        ##
        # Property tag ("issue", "issuewild", "iodef"...).

        attr_reader :tag

        ##
        # Property value.

        attr_reader :value

        ##
        # Whether the critical flag is set on this property.

        def critical?
          flags & 0x80 != 0
        end

        def encode_rdata(msg) # :nodoc:
          msg.put_pack('C', @flags)
          msg.put_string(@tag)
          msg.put_bytes(@value)
        end

        def self.decode_rdata(msg) # :nodoc:
          flags, = msg.get_unpack('C')
          tag = msg.get_string
          value = msg.get_bytes
          self.new flags, tag, value
        end
      end

      ClassInsensitiveTypes = [ # :nodoc:
        NS, CNAME, SOA, PTR, HINFO, MINFO, MX, TXT, LOC, ANY, CAA
      ]

      ##
      # 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, compress: false)
          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

        ##
        # Common implementation for SVCB-compatible resource records.

        class ServiceBinding

          ##
          # Create a service binding resource record.

          def initialize(priority, target, params = [])
            @priority = priority.to_int
            @target = Name.create(target)
            @params = SvcParams.new(params)
          end

          ##
          # The priority of this target host.
          #
          # The range is 0-65535.
          # If set to 0, this RR is in AliasMode. Otherwise, it is in ServiceMode.

          attr_reader :priority

          ##
          # The domain name of the target host.

          attr_reader :target

          ##
          # The service parameters for the target host.

          attr_reader :params

          ##
          # Whether this RR is in AliasMode.

          def alias_mode?
            self.priority == 0
          end

          ##
          # Whether this RR is in ServiceMode.

          def service_mode?
            !alias_mode?
          end

          def encode_rdata(msg) # :nodoc:
            msg.put_pack("n", @priority)
            msg.put_name(@target, compress: false)
            @params.encode(msg)
          end

          def self.decode_rdata(msg) # :nodoc:
            priority, = msg.get_unpack("n")
            target    = msg.get_name
            params    = SvcParams.decode(msg)
            return self.new(priority, target, params)
          end
        end

        ##
        # SVCB resource record [RFC9460]

        class SVCB < ServiceBinding
          TypeValue = 64
          ClassValue = IN::ClassValue
          ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
        end

        ##
        # HTTPS resource record [RFC9460]

        class HTTPS < ServiceBinding
          TypeValue = 65
          ClassValue = IN::ClassValue
          ClassHash[[TypeValue, ClassValue]] = self # :nodoc:
        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:
      sprintf("%x:%x:%x:%x:%x:%x:%x:%x", *@address.unpack("nnnnnnnn")).sub(/(^|:)0(:0)+(:|$)/, '::')
    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
ruby/mkmf.rb000064400000271204150403134250007007 0ustar00# -*- 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 # :nodoc:
  # 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
end

class Array # :nodoc:
  # Wraps all strings in escaped quotes if they contain whitespace.
  def quote
    map {|s| s.quote}
  end
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

  target_rbconfig = nil
  ARGV.delete_if do |arg|
    opt = arg.delete_prefix("--target-rbconfig=")
    unless opt == arg
      target_rbconfig = opt
    end
  end
  if target_rbconfig
    # Load the RbConfig for the target platform into this module.
    # Cross-compiling needs the same version of Ruby.
    Kernel.load target_rbconfig, self
  else
    # The RbConfig for the target platform where the built extension runs.
    RbConfig = ::RbConfig
  end

  #### 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

  ##
  # The saved original value of +LIB+ environment variable
  ORIG_LIBPATH = ENV['LIB']

  ##
  # Extensions for files compiled with a C compiler

  C_EXT = %w[c m]

  ##
  # Extensions for files compiled 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"].shellsplit
    if arg = ENV["CONFIGURE_ARGS"]
      args.push(*arg.shellsplit)
    end
    args.delete_if {|a| /\A--(?:top(?:src)?|src|cur)dir(?=\z|=)/ =~ a}
    for arg in args.concat(ARGV)
      arg, val = arg.split('=', 2)
      next unless arg
      arg.tr!('_', '-')
      if arg.sub!(/\A(?!--)/, '--')
        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 <<MESSAGE
mkmf.rb can't find header files for ruby at #{$hdrdir}/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
MESSAGE
  end

  CONFTEST = "conftest".freeze
  CONFTEST_C = "#{CONFTEST}.c"

  OUTFLAG = CONFIG['OUTFLAG']
  COUTFLAG = CONFIG['COUTFLAG']
  CSRCFLAG = CONFIG['CSRCFLAG']
  CPPOUTFILE = config_string('CPPOUTFILE') {|str| str.sub(/\bconftest\b/, CONFTEST)}

  # :startdoc:

  # Removes _files_.
  def rm_f(*files)
    opt = (Hash === files.last ? [files.pop] : [])
    FileUtils.rm_f(Dir[*files.flatten], *opt)
  end
  module_function :rm_f

  # Removes _files_ recursively.
  def rm_rf(*files)
    opt = (Hash === files.last ? [files.pop] : [])
    FileUtils.rm_rf(Dir[*files.flatten], *opt)
  end
  module_function :rm_rf

  # Returns time stamp of the +target+ file if it exists and is newer than or
  # equal to all of +times+.
  def modified?(target, times)
    (t = File.mtime(target)) rescue return nil
    Array === times or times = [times]
    t if times.all? {|n| n <= t}
  end

  # :stopdoc:

  def split_libs(*strs)
    sep = $mswin ? /\s+/ : /\s+(?=-|\z)/
    strs.flat_map {|s| s.lstrip.split(sep)}
  end

  def merge_libs(*libs)
    libs.inject([]) do |x, y|
      y = y.inject([]) {|ary, e| ary.last == e ? ary : ary << e}
      y.each_with_index do |v, yi|
        if xi = x.rindex(v)
          x[(xi+1)..-1] = merge_libs(y[(yi+1)..-1], x[(xi+1)..-1])
          x[xi, 0] = y[0...yi]
          break
        end
      end and x.concat(y)
      x
    end
  end

  # This is a custom logging module. It generates an mkmf.log file when you
  # run your extconf.rb script. This can be useful for debugging unexpected
  # failures.
  #
  # This module and its associated methods are meant for internal use only.
  #
  module Logging
    @log = nil
    @logfile = 'mkmf.log'
    @orgerr = $stderr.dup
    @orgout = $stdout.dup
    @postpone = 0
    @quiet = $extmk

    def self::log_open
      @log ||= File::open(@logfile, 'wb')
      @log.sync = true
    end

    def self::log_opened?
      @log and not @log.closed?
    end

    def self::open
      log_open
      $stderr.reopen(@log)
      $stdout.reopen(@log)
      yield
    ensure
      $stderr.reopen(@orgerr)
      $stdout.reopen(@orgout)
    end

    def self::message(*s)
      log_open
      @log.printf(*s)
    end

    def self::logfile file
      @logfile = file
      log_close
    end

    def self::log_close
      if @log and not @log.closed?
        @log.flush
        @log.close
        @log = nil
      end
    end

    def self::postpone
      tmplog = "mkmftmp#{@postpone += 1}.log"
      open do
        log, *save = @log, @logfile, @orgout, @orgerr
        @log, @logfile, @orgout, @orgerr = nil, tmplog, log, log
        begin
          log.print(open {yield @log})
        ensure
          @log.close if @log and not @log.closed?
          File::open(tmplog) {|t| FileUtils.copy_stream(t, log)} if File.exist?(tmplog)
          @log, @logfile, @orgout, @orgerr = log, *save
          @postpone -= 1
          MakeMakefile.rm_f tmplog
        end
      end
    end

    class << self
      attr_accessor :quiet
    end
  end

  def libpath_env
    # used only if native compiling
    if libpathenv = config_string("LIBPATHENV")
      pathenv = ENV[libpathenv]
      libpath = RbConfig.expand($DEFLIBPATH.join(File::PATH_SEPARATOR))
      {libpathenv => [libpath, pathenv].compact.join(File::PATH_SEPARATOR)}
    else
      {}
    end
  end

  def expand_command(commands, envs = libpath_env)
    varpat = /\$\((\w+)\)|\$\{(\w+)\}/
    vars = nil
    expand = proc do |command|
      case command
      when Array
        command.map(&expand)
      when String
        if varpat =~ command
          vars ||= Hash.new {|h, k| h[k] = ENV[k]}
          command = command.dup
          nil while command.gsub!(varpat) {vars[$1||$2]}
        end
        command
      else
        command
      end
    end
    if Array === commands
      env, *commands = commands if Hash === commands.first
      envs.merge!(env) if env
    end

    # disable ASAN leak reporting - conftest programs almost always don't bother
    # to free their memory.
    envs['ASAN_OPTIONS'] = "detect_leaks=0" unless ENV.key?('ASAN_OPTIONS')

    return envs, expand[commands]
  end

  def env_quote(envs)
    envs.map {|e, v| "#{e}=#{v.quote}"}
  end

  # :startdoc:

  # call-seq:
  #   xsystem(command, werror: false)   -> true or false
  #
  # Executes _command_ with expanding variables, and returns the exit
  # status like as Kernel#system.  If _werror_ is true and the error
  # output is not empty, returns +false+.  The output will logged.
  def xsystem(command, werror: false)
    env, command = expand_command(command)
    Logging::open do
      puts [env_quote(env), command.quote].join(' ')
      if werror
        result = nil
        Logging.postpone do |log|
          output = IO.popen(env, command, &:read)
          result = ($?.success? and File.zero?(log.path))
          output
        end
        result
      else
        system(env, *command)
      end
    end
  end

  # Executes _command_ similarly to xsystem, but yields opened pipe.
  def xpopen command, *mode, &block
    env, commands = expand_command(command)
    command = [env_quote(env), command].join(' ')
    Logging::open do
      case mode[0]
      when nil, Hash, /^r/
        puts "#{command} |"
      else
        puts "| #{command}"
      end
      IO.popen(env, commands, *mode, &block)
    end
  end

  # Logs _src_
  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

  # Returns the language-dependent source file name for configuration
  # checks.
  def conftest_source
    CONFTEST_C
  end

  # Creats temporary source file from +COMMON_HEADERS+ and _src_.
  # Yields the created source string and uses the returned string as
  # the source code, if the block is given.
  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
      File.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

  # :stopdoc:

  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 <<MSG
The compiler failed to generate an executable file.
You haruby/uri.rb000064400000006073150403134250006654 0ustar00 "#$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)
    libpathflags = nil
    libpath.map{|x|
      case x
      when "$(topdir)", /\A\./
        LIBPATHFLAG
      else
        libpathflags ||= [LIBPATHFLAG, RPATHFLAG].grep(/\S/).join(" ")
      end % x.quote
    }.join(" ")
  end

  def werror_flag(opt = nil)
    config_string("WERRORFLAG") {|flag| opt = opt && !opt.empty? ? "#{opt} #{flag}" : flag}
    opt
  end

  def with_werror(opt, opts = nil)
    opt = werror_flag(opt) if opts and (opts = opts.dup).delete(:werror)
    yield(opt, opts)
  end

  def try_link0(src, opt = "", ldflags: "", **opts, &b) # :nodoc:
    exe = CONFTEST+$EXEEXT
    cmd = link_command(ldflags, 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 <tt>$CFLAGS</tt> and <tt>$LDFLAGS</tt> 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
    Makruby/securerandom.rb000064400000004162150403134250010541 0ustar00ocessing. 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 try_header try_compile

  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

  # :startdoc:

  # Sets <tt>$CPPFLAGS</tt> to _flags_ and yields.  If the block returns a
  # falsy value, <tt>$CPPFLAGS</tt> is reset to its previous value, remains
  # set to _flags_ otherwise.
  #
  # [+flags+] a C preprocessor flag as a +String+
  #
  def with_cppflags(flags)
    cppflags = $CPPFLAGS
    $CPPFLAGS = flags.dup
    ret = yield
  ensure
    $CPPFLAGS = cppflags unless ret
  end

  # :nodoc:
  def try_cppflags(flags, werror: true, **opts)
    try_header(MAIN_DOES_NOTHING, flags, werror: werror, **opts)
  end

  # Check whether each given C preprocessor flag is acceptable and append it
  # to <tt>$CPPFLAGS</tt> if so.
  #
  # [+flags+] a C preprocessor flag as a +String+ or an +Array+ of them
  #
  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

  # Sets <tt>$CFLAGS</tt> to _flags_ and yields.  If the block returns a falsy
  # value, <tt>$CFLAGS</tt> is reset to its previous value, remains set to
  # _flags_ otherwise.
  def with_cflags(flags)
    cflags = $CFLAGS
    $CFLAGS = flags.dup
    ret = yield
  ensure
    $CFLAGS = cflags unless ret
  end

  # :nodoc:
  def try_cflags(flags, werror: true, **opts)
    try_compile(MAIN_DOES_NOTHING, flags, werror: werror, **opts)
  end

  # Sets <tt>$LDFLAGS</tt> to _flags_ and yields.  If the block returns a
  # falsy value, <tt>$LDFLAGS</tt> is reset to its previous value, remains set
  # to _flags_ otherwiseruby/openssl.rb000064400000002034150403134250007531 0ustar001];
SRC
  end

  def try_constant(const, headers = nil, opt = "", &b)
    includes = cpp_include(headers)
    neg = try_static_assert("#{const} < 0", headers, opt)
    if CROSS_COMPILING
      if neg
        const = "-(#{const})"
      elsif try_static_assert("#{const} > 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 <stdio.h>
/*top*/
typedef#{neg ? '' : ' unsigned'}
#ifdef PRI_LL_PREFIX
#define PRI_CONFTEST_PREFIX PRI_LL_PREFIX
LONG_LONG
#elruby/abbrev.rb000064400000006711150403134250007315 0ustar00 v = "s#{strvars.size + 1}"
        strvars << v
        v
      }
      unless strvars.empty?
        prepare << "char " << strvars.map {|v| "#{v}[1024]"}.join(", ") << "; "
      end
    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) { #{prepare}#{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

  # :startdoc:

  # 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

  # :stopdoc:

  # 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 <tt>$CFLAGS</tt> and
  # <tt>$LDFLAGS</tt> 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
   ruby/shellwords.rb000064400000016133150403134250010241 0ustar00       # 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

  # Prints messages to $stdout, if verbose mode.
  #
  # Internal use only.
  #
  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)
    if f = caller_locations(1, 1).first.base_label and /\A\w/ =~ f
      f += ": "
    else
      f = ""
    end
    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

  # Build a message for checking.
  #
  # Internal use only.
  #
  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:

  # Check whether each given C compiler flag is acceptable and append it
  # to <tt>$CFLAGS</tt> if so.
  #
  # [+flags+] a C compiler flag as a +String+ or an +Array+ of them
  #
  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

  # 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 <code>main()</code> 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
  # <code>--with-FOOlib</code> 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 <code>main()</code> 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.flat_map {|path| path.split(File::PATH_SEPARATOR)}
    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 <code>have_library()</code>.  The +func+ shall be
  # either mere function name or function name with arguments.
  #
  # For example, if <code>have_func('foo')</code> 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 <code>have_library()</code>.
  #
  # For example, if <code>have_var('foo')</code> 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 <code>have_header('foo.h')</code> returned true, then the
  # +HAVE_FOO_H+ preruby/syntax_suggest/version.rb000064400000000114150403134250012617 0ustar00named same as the framework.
  def have_framework(fw, &b)
    if Array === fruby/syntax_suggest/explain_syntax.rb000064400000004641150403134250014211 0ustar00header, *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 <code>have_struct_member('struct foo', 'bar')</code>
  # 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

  # :nodoc:
  # 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_ruby/syntax_suggest/capture_code_context.rb000064400000015252150403134250015344 0ustar00      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

  # :nodoc:
  # 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 <code>[const, type]</code>,
  # 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 <code>have_const('foo')</code> 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"
  class << STRING_OR_FAILED_FORMAT # :nodoc:
    def %(x)
      x ? super : "failed"
    end
  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 <code>=X</code> where "X" is the actual size.
  #
  # For example, if <code>check_sizeof('mystruct')</code> returned 12, then
  # the <code>SIZEOF_MYSTRUCT=12</code> 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
  # <code>=X</code> 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
  # <code>check_signedness('size_t')</code> would return +1 and the
  # <code>SIGNEDNESS_OF_SIZE_T=+1</code> preprocessor macro would be passed to
  # the compiler.  The <code>SIGNEDNESS_OF_INT=-1</code> macro would be set
  # for <code>check_signedness('int')</code>
  #
  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 <code>=X</code>
  #   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 <code>=X</code> 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
  # <code>convertible_int("foobar_t")</code> 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.ruby/syntax_suggest/cli.rb000064400000006166150403134250011716 0ustar00type, member = nil, headers = nil, &b)
    try_compile(<<"SRC", &b)
#{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(<<SRC)
int rbcv_foo;
#{t}(rbcv_foo) rbcv_bar;
SRC
    end
  end

  # :startdoc:

  # Returns a string represents the type of _type_, or _member_ of
  # _type_ if _member_ is not +nil+.
  def what_type?(type, member = nil, headers = nil, &b)
    m = "#{type}"
    var = val = "*rbcv_var_"
    func = "rbcv_func_(void)"
    if member
      m << "." << member
    else
      type, member = type.split('.', 2)
    end
    if member
      val = "(#{var}).#{member}"
    end
    prelude = [cpp_include(headers).split(/^/)]
    prelude << ["typedef #{type} rbcv_typedef_;\n",
                "extern rbcv_typedef_ *#{func};\n",
                "rbcv_typedef_ #{var};\n",
               ]
    type = "rbcv_typedef_"
    fmt = member && !(typeof = have_typeof?) ? "seems %s" : "%s"
    if typeof
      var = "*rbcv_member_"
      func = "rbcv_mem_func_(void)"
      member = nil
      type = "rbcv_mem_typedef_"
      prelude[-1] << "typedef #{typeof}(#{val}) #{type};\n"
      prelude[-1] << "extern #{type} *#{func};\n"
      prelude[-1] << "#{type} #{var};\n"
      val = var
    end
    def fmt.%(x)
      x ? super : "unknown"
    end
    checking_for checking_message(m, headers), fmt do
      if scalar_ptr_type?(type, member, prelude, &b)
        if try_static_assert("sizeof(*#{var}) == 1", prelude)
          return "string"
        end
        ptr = "*"
      elsif scalar_type?(type, member, prelude, &b)
        unless member and !typeof or try_static_assert("(#{type})-1 < 0", prelude)
          unsigned = "unsigned"
        end
        ptr = ""
      else
        next
      end
      type = UNIVERSAL_INTS.find do |t|
        pre = prelude
        unless member
          pre += [["#{unsigned} #{t} #{ptr}#{var};\n",
                   "extern #{unsigned} #{t} #{ptr}*#{func};\n"]]
        end
        try_static_assert("sizeof(#{ptr}#{val}) == sizeof(#{unsigned} #{t})", pre)
      end
      type or next
      [unsigned, type, ptr].join(" ").strip
    end
  end

  # :nodoc:
  #
  # This method is used internally by the find_executable method.
  #
  # Internal use only.
  #
  def find_executable0(bin, path = nil)
    executable_file = proc do |name|
      begin
        stat = File.stat(name)
      rescue SystemCallError
      else
        next name if stat.file? and stat.executable?
      end
    end

    exts = config_string('EXECUTABLE_EXTS') {|s| s.split} || config_string('EXEEXT') {|s| [s]}
    if File.expand_path(bin) == bin
      return bin if executable_file.call(bin)
      if exts
        exts.each {|ext| executable_file.call(file = bin + ext) and return file}
      end
      return nil
    end
    if path ||= ENV['PATH']
      path = path.split(File::PATH_SEPARATOR)
    ruby/syntax_suggest/scan_history.rb000064400000005657150403134250013660 0ustar00
  def arg_config(config, default=nil, &block)
    $arg_config << [config, default]
    defaults = []
    if default
      defaults << default
    elsif !block
      defaults << nil
    end
    $configure_args.fetch(config.tr('_', '-'), *defaults, &block)
  end

  # :startdoc:

  # Tests for the presence of a <tt>--with-</tt>_config_ or
  # <tt>--without-</tt>_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 <tt>--enable-</tt>_config_ or
  # <tt>--disable-</tt>_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 <code>#ifndef</code> 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}ruby/syntax_suggest/priority_engulf_queue.rb000064400000002417150403134250015567 0ustar00if the target is set to "foo", then the user
  # could use the <code>--with-foo-dir=prefix</code>,
  # <code>--with-foo-include=dir</code> and
  # <code>--with-foo-lib=dir</code> 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)
    key = [target, idefault, ldefault].compact.join("\0")
    if conf = $config_dirs[key]
      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)
    if conf = $arruby/syntax_suggest/ripper_errors.rb000064400000001505150403134250014034 0ustar00p : 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[key] = [idir, ldir]
  end

  # Returns compile/link information about an installed library in a tuple of <code>[cflags,
  # ldflags, libs]</code>, by using the command found first in the following commands:
  #
  # 1. If <code>--with-{pkg}-config={command}</code> is given via
  #    command line option: <code>{command} {options}</code>
  #
  # 2. <code>{pkg}-config {options}</code>
  #
  # 3. <code>pkg-config {options} {pkg}</code>
  #
  # Where +options+ is the option name without dashes, for instance <code>"cflags"</code> for the
  # <code>--cflags</code> flag.
  #
  # The valuruby/syntax_suggest/clean_document.rb000064400000021363150403134250014123 0ustar00ath)
          envs = ["PKG_CONFIG_PATH"=>[pkg_config_path, ENV["PKG_CONFIG_PATH"]].compact.join(File::PATH_SEPARATOR)]
        end
      end
      if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
      # if and only if package specific config command is given
      elsif ($PKGCONFIG ||=
             (pkgconfig = with_config("pkg-config") {config_string("PKG_CONFIG") || ENV["PKG_CONFIG"] || "pkg-config"}) &&
             find_executable0(pkgconfig) && pkgconfig) and
           xsystem([*envs, $PKGCONFIG, "--exists", pkg])
        # default to pkg-config command
        pkgconfig = $PKGCONFIG
        args = [pkg]
      elsif find_executable0(pkgconfig = "#{pkg}-config")
      # default to package specific config command, as a last resort.
      else
        pkgconfig = nil
      end
      if pkgconfig
        get = proc {|opts|
          opts = Array(opts).map { |o| "--#{o}" }
          opts = xpopen([*envs, pkgconfig, *opts, *args], err:[:child, :out], &:read)
          Logging.open {puts opts.each_line.map{|s|"=> #{s.inspect}"}}
          if $?.success?
            opts = opts.strip
            libarg, libpath = LIBARG, LIBPATHFLAG.strip
            opts = opts.shellsplit.map { |s|
              if s.start_with?('-l')
                libarg % s[2..]
              elsif s.start_with?('-L')
                libpath % s[2..]
              else
                s
              end
            }.quote.join(" ")
            opts
          end
        }
      end
      orig_ldflags = $LDFLAGS
      if get and !options.empty?
        get[options]
      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
  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', 'msys'
      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 = []
    verbose = with_config('verbose') ?  "1" : (CONFIG['MKMF_VERBOSE'] || "0")
    vpath = $VPATH.dup
    CONFIG["hdrdir"] ||= $hdrdir
    mk << %{
SHELL = /bin/sh

# V=0 quiet, V=1 verbose.  other values don't work.
V = 1
V0 = $(V:0=)
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)'}
POSTLINK = #{config_string('POSTLINK', RbConfig::CONFIG)}
AR = #{CONFIG['AR']}
LD = #{CONFIG['LD']}
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 = #{config_string('RMALL', &possible_command) || '$(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]+/ruby/syntax_suggest/parse_blocks_from_indent_line.rb000064400000003000150403134250017171 0ustar00esses the data contents of the "depend" file.  Each line of this file
  # is expected to be a file name.
  #
  # Returns the output of findings, in Makefile format.
  #
  def depend_rules(depend)
    suffixes = []
    depout = []
    cont = implicit = nil
    impconv = proc do
      each_compile_rules {|rule| depout << (rule % implicit[0]) << implicit[1]}
      implicit = nil
    end
    ruleconv = proc do |line|
      if implicit
        if /\A\t/ =~ line
          implicit[1] << line
          next
        else
          impconv[]
        end
      end
      if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line)
        suffixes << m[1] << m[2]
        implicit = [[m[1], m[2]], [m.post_match]]
        next
      elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
        line.sub!(/\s*\#.*$/, '')
        comment = $&
        line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
        line = line.chomp + comment + "\n" if comment
      end
      depout << line
    end
    depend.each_line do |line|
      line.gsub!(/\.o\b/, ".#{$OBJEXT}")
      line.gsub!(/\{\$\(VPATH\)\}/, "") unless $nmake
      line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h)
      if $nmake && /\A\s*\$\(RM|COPY\)/ =~ line
        line.gsub!(%r"[-\w\./]{2,}"){$&.tr("/", "\\")}
        line.gsub!(/(\$\((?!RM|COPY)[^:)]+)(?=\))/, '\1:/=\\')
      end
      if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line
        (cont ||= []) << line
        next
      elsif cont
        line = (cont << line).join
        cont = nil
      eruby/syntax_suggest/capture/falling_indent_lines.rb000064400000003127150403134250016753 0ustar00# preprocessor constants that you may have generated through other methods.
  #
  # The +target+ name should correspond the name of the global function name
  # defined within your C extension, minus the +Init_+.  For example, if your
  # C extension is defined as +Init_foo+, then your target would simply be
  # "foo".
  #
  # If any "/" characters are present in the target name, only the last name
  # is interpreted as the target name, and the rest are considered toplevel
  # directory names, and the generated Makefile will be altered accordingly to
  # follow that directory structure.
  #
  # For example, if you pass "test/foo" as a target name, your extension will
  # be installed under the "test" directory.  This means that in order to
  # load the file within a Ruby program later, that directory structure will
  # have to be followed, e.g. <code>require 'test/foo'</code>.
  #
  # 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 <code>RbConfig::CONFIG['sitearchdir']</code> that
  # mimics your local filesystem when you run <code>make install</code>.
  #
  # For example, given the following file tree:
  #
  #   ext/
  #     extconf.rb
  #     test/
  #       foo.c
  #
  # And given the following code:
  #
  #   create_maruby/syntax_suggest/capture/before_after_keyword_ends.rb000064400000004244150403134250020005 0ustar00(' ')
        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{,})}}")]
    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.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 ? "$(TARGEruby/syntax_suggest/code_block.rb000064400000004203150403134250013221 0ustar00LIB = #{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)'
    cleanobjs = ["$(OBJS)"]
    if $extmk
      %w[bc i s].each {|ex| cleanobjs << "$(OBJS:.#{$OBJEXT}=.#{ex})"}
    end
    if target
      config_string('cleanobjs') {|t| cleanobjs << t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")}
    end
    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     = #{cleanobjs.join(' ')} *.bak
TARGET_SO_DIR_TIMESTAMP = #{timestamp_file(sodir, target_prefix)}
" #"

    conf = yield(conf) if block_given?
    mfile = File.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 = '$(TARGET_SO_DIR_TIMESTAMP)'
      if $extout
        mfile.puts dest
        mfile.print "clean-so::\n"
        mfile.print "\t-$(Q)$(RM) #{fseprepl[dest]} #{fseprepl[stamp]}\n"
        mfile.ruby/syntax_suggest/display_code_with_line_numbers.rb000064400000003424150403134250017375 0ustar00lib/**/*.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} $@\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
    if target and !dirs.include?(sodir)
      mfile.print "$(TARGET_SO_DIR_TIMESTAMP):\n\t$(Q) $(MAKEruby/syntax_suggest/lex_all.rb000064400000002171150403134250012557 0ustar00      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 " $(TARGET_SO_DIR_TIMESTAMP)" 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 "$(ECHOruby/syntax_suggest/code_line.rb000064400000014727150403134250013072 0ustar00[]
    $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)-W\Kerror[-=](?!implicit-function-declaration)/, '')
      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 = <<MESSAGE
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
MESSAGE

  # Returns whether or not the Makefile was successfully generated. If not,
  # the script will abort with an error message.
  #
  # Internal use only.
  #
  def mkmf_failed(path)
    unless $makefile_created or File.exist?("Makefile")
      opts = $arg_config.collect {|t, n| "\t#{t}#{n ? "=#{n}" : ""}\n"}
      abort "*** #{path} failed ***\n" + FailedMessage + opts.join
    end
  end

  private

  def _libdir_basename
    @libdir_basename ||= config_string("libdir") {|name| name[/\A\$\(exec_prefix\)\/(.*)/, 1]} || "lib"
  end

  def MAIN_DOES_NOTHING(*refs)
    src = MAIN_DOES_NOTHING
    unless refs.empty?
      src = src.sub(/\{/) do
        $& +
          "\n  if (argc > 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 = " 2> #{File::NULL} || #{$mswin ? 'exit /b0' : '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

  ##
  # The prefix added to exported symbols automatically

  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:]

  ##
  # Substitution in rules for NMake

  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') || COMruby/syntax_suggest/pathname_from_message.rb000064400000002656150403134250015473 0ustar00      "$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)"
    end
  end

  ##
  # Argument which will add a library path to the linker

  LIBPATHFLAG = config_string('LIBPATHFLAG') || '-L%s'

  ##
  # Argument which will add a runtime library path to the linker

  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}"

  ##
  # The type names for convertible_int

  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_RF) $(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#{' exts.mk' if $extmk}
\t\t-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})
\t\t-$(Q)$(RMDIRS) $(DISTCLEANDIRS#{sep})ruby/syntax_suggest/block_expand.rb000064400000011577150403134250013602 0ustar00) ||
                   ((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

    # :startdoc:
  end

  cxx::LANGUAGE = -"C++"
  self[cxx::LANGUAGE] = cxx
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
ruby/uri.rb000064400000006137150403134250006655 0ustar00# frozen_string_literal: false
# URI is a module providing classes to handle Uniform Resource Identifiers
# (RFC2396[https://www.rfc-editor.org/rfc/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::HTTP 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
#     register_scheme '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")
#   #=> #<URI::RSYNC 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[https://www.rfc-editor.org/rfc/rfc822]
# - RFC1738[https://www.rfc-editor.org/rfc/rfc1738]
# - RFC2255[https://www.rfc-editor.org/rfc/rfc2255]
# - RFC2368[https://www.rfc-editor.org/rfc/rfc2368]
# - RFC2373[https://www.rfc-editor.org/rfc/rfc2373]
# - RFC2396[https://www.rfc-editor.org/rfc/rfc2396]
# - RFC2732[https://www.rfc-editor.org/rfc/rfc2732]
# - RFC3986[https://www.rfc-editor.org/rfc/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::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 <akira@ruby-lang.org>
# Documentation::
#   Akira Yamada <akira@ruby-lang.org>
#   Dmitry V. Sabanin <sdmitry@lrn.ru>
#   Vincent Batts <vbatts@hashbangbash.com>
# License::
#  Copyright (c) 2001 akira yamada <akira@ruby-lang.org>
#  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'
ruby/syntax_suggest/display_invalid_blocks.rb000064400000003403150403134250015646 0ustar00ruby/securerandom.rb000064400000004434150403134250010543 0ustar00# -*- coding: us-ascii -*-
# frozen_string_literal: true

require 'random/formatter'

# == 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+.
#
# If a secure random number generator is not available,
# +NotImplementedError+ is raised.

module SecureRandom

  # The version
  VERSION = "0.4.1"

  class << self
    # Returns a random binary string containing +size+ bytes.
    #
    # See Random.bytes
    def bytes(n)
      return gen_random(n)
    end

    # Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2
    def alphanumeric(n = nil, chars: ALPHANUMERIC)
      n = 16 if n.nil?
  ruby/syntax_suggest/core_ext.rb000064400000006004150403134250012746 0ustar00thodError
        raise NotImplementedError, "No random device"
      else
        alias gen_random gen_random_openssl
      end
    end

    # :startdoc:

    # Generate random data bytes for Random::Formatter
    public :gen_random
  end
end

SecureRandom.extend(Random::Formatter)
ruby/openssl.rb000064400000002074150403134250007535 0ustar00# frozen_string_literal: true
=begin
= Info
  'OpenSSL for Ruby 2' project
  Copyright (C) 2002  Michal Rokos <m.rokos@sh.cvut.cz>
  All rights reserved.

= Licence
  This program is licensed under the same licence as Ruby.
  (See the file 'COPYING'.)
=end

require 'openssl.so'

require_relative 'openssl/bn'
require_relative 'openssl/asn1'
require_relative 'openssl/pkey'
require_relative 'openssl/cipher'
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
ruby/abbrev.rb000064400000006711150403134250007315 0ustar00ruby/syntax_suggest/around_block_scan.rb000064400000015633150403134260014615 0ustar00.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}'"
    ruby/time.rb000064400000057337150403134270007026 0ustar00# frozen_string_literal: true
# date.rb: Written by Tadayoshi Funaba 1998-2011

require 'date_core'

class Date
  VERSION = "3.3.3" # :nodoc:

  # call-seq:
  #   infinite? -> false
  #
  # Returns +false+
  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 Float::INFINITY; return d <=> 1
      when -Float::INFINITY; return d <=> -1
      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
      eruby/shellwords.rb000064400000017035150403134250010243 0ustar00# 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 <tt>shellwords()</tt> 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}[http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html]
#
# === 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 <knu@iDaemons.org>
#
# === Contact
# * Akinori MUSHA <knu@iDaemons.org> (current maintainer)

module Shellwords
  # The version number string.
  VERSION = "0.2.2"

  # 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"]
  #
  # +line+ must not contain NUL characters because of nature of
  # +exec+ system call.
  #
  # 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*(?>([^\0\s\\\'\"]+)|'([^\0\']*)'|"((?:[^\0\"\\]|\\[^\0])*)"|(\\[^\0]?)|(\S))(\s|\z)?/m) do
      |word, sq, dq, esc, garbage, sep|
      if garbage
        b = $~.begin(0)
        line = $~[0]
        line = "..." + line if b > 0
        raise ArgumentError, "#{garbage == "\0" ? 'Nul character' : 'Unmatched quote'} at #{b}: #{line}"
      end
      # 2.2.3 Double-Quotes:
      #
      #   The <backslash> shall retain its special meaning as an
      #   escape character only when followed by one of the following
      #   characters when considered special:
      #
      #   $ ` " \ <newline>
      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 iruby/syntax_suggest/priority_queue.rb000064400000003776150403134260014241 0ustar00#   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?

    # Shellwords cannot contain NUL characters.
    raise ArgumentError, "NUL character" if str.index("\0")

    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+.
  # See also Shellwords.shellescape.
  #
  #   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 objruby/syntax_suggest/code_frontier.rb000064400000013170150403134260013763 0ustar00 # 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
ruby/syntax_suggest/version.rb000064400000000114150403134250012617 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  VERSION = "2.0.2"
end
ruby/syntax_suggest/explain_syntax.rb000064400000005304150403134250014206 0ustar00# frozen_string_literal: true

require_relative "left_right_lex_count"

if !SyntaxSuggest.use_prism_parser?
  require_relative "ripper_errors"
end

module SyntaxSuggest
  class GetParseErrors
    def self.errors(source)
      if SyntaxSuggest.use_prism_parser?
        Prism.parse(source).errors.map(&:message)
      else
        RipperErrors.new(source).call.errors
      end
    end
  end

  # Explains syntax errors based on their source
  #
  # example:
  #
  #   source = "def foo; puts 'lol'" # Note missing end
  #   explain ExplainSyntax.new(
  #     code_lines: CodeLine.from_source(source)
  #   ).call
  #   explain.errors.first
  #   # => "Unmatched keyword, missing `end' ?"
  #
  # When the error cannot be determined by lexical counting
  # then the parser is run against the input and the raw
  # errors are returned.
  #
  # Example:
  #
  #   source = "1 * " # Note missing a second number
  #   explain ExplainSyntax.new(
  #     code_lines: CodeLine.from_source(source)
  #   ).call
  #   explain.errors.first
  #   # => "syntax error, unexpected end-of-input"
  class ExplainSyntax
    INVERSE = {
      "{" => "}",
      "}" => "{",
      "[" => "]",
      "]" => "[",
      "(" => ")",
      ")" => "(",
      "|" => "|"
    }.freeze

    def initialize(code_lines:)
      @code_lines = code_lines
      @left_right = LeftRightLexCount.new
      @missing = nil
    end

    def call
      @code_lines.each do |line|
        line.lex.each do |lex|
          @left_right.count_lex(lex)
        end
      end

      self
    end

    # Returns an array of missing elements
    #
    # For example this:
    #
    #   ExplainSyntax.new(code_lines: lines).missing
    #   # => ["}"]
    #
    # Would indicate that the source is missing
    # a `}` character in the source code
    def missing
      @missing ||= @left_right.missing
    end

    # Converts a missing string to
    # an human understandable explanation.
    #
    # Example:
    #
    #   explain.why("}")
    #   # => "Unmatched `{', missing `}' ?"
    #
    def why(miss)
      case miss
      when "keyword"
        "Unmatched `end', missing keyword (`do', `def`, `if`, etc.) ?"
      when "end"
        "Unmatched keyword, missing `end' ?"
      else
        inverse = INVERSE.fetch(miss) {
          raise "Unknown explain syntax char or key: #{miss.inspect}"
        }
        "Unmatched `#{inverse}', missing `#{miss}' ?"
      end
    end

    # Returns an array of syntax error messages
    #
    # If no missing pairs are found it falls back
    # on the original error messages
    def errors
      if missing.empty?
        return GetParseErrors.errors(@code_lines.map(&:original).join).uniq
      end

      missing.map { |miss| why(miss) }
    end
  end
end
ruby/syntax_suggest/capture_code_context.rb0000644ruby/syntax_suggest/left_right_lex_count.rb000064400000010074150403134260015350 0ustar00d at capturing all of a syntax
  # error in a single block in number 2, however the results
  # can contain ambiguities. Humans are good at pattern matching
  # and filtering and can mentally remove extraneous data, but
  # they can't add extra data that's not present.
  #
  # In the case of known ambiguious cases, this class adds context
  # back to the ambiguity so the programmer has full information.
  #
  # Beyond handling these ambiguities, it also captures surrounding
  # code context information:
  #
  #   puts block.to_s # => "def bark"
  #
  #   context = CaptureCodeContext.new(
  #     blocks: block,
  #     code_lines: code_lines
  #   )
  #
  #   lines = context.call.map(&:original)
  #   puts lines.join
  #   # =>
  #     class Dog
  #       def bark
  #     end
  #
  class CaptureCodeContext
    attr_reader :code_lines

    def initialize(blocks:, code_lines:)
      @blocks = Array(blocks)
      @code_lines = code_lines
      @visible_lines = @blocks.map(&:visible_lines).flatten
      @lines_to_output = @visible_lines.dup
    end

    def call
      @blocks.each do |block|
        capture_first_kw_end_same_indent(block)
        capture_last_end_same_indent(block)
        capture_before_after_kws(block)
        capture_falling_indent(block)
      end

      sorted_lines
    end

    def sorted_lines
      @lines_to_output.select!(&:not_empty?)
      @lines_to_output.uniq!
      @lines_to_output.sort!

      @lines_to_output
    end

    # Shows the context around code provided by "falling" indentation
    #
    # Converts:
    #
    #       it "foo" do
    #
    # into:
    #
    #   class OH
    #     def hello
    #       it "foo" do
    #     end
    #   end
    #
    def capture_falling_indent(block)
      Capture::FallingIndentLines.new(
        block: block,
        code_lines: @code_lines
      ).call do |line|
        @lines_to_output << line
      end
    end

    # Shows surrounding kw/end pairs
    #
    # The purpose of showing these extra pairs is due to cases
    # of ambiguity when only one visible line is matched.
    #
    # For example:
    #
    #     1  class Dog
    #     2    def bark
    #     4    def eat
    #     5    end
    #     6  end
    #
    # In this case either line 2 could be missing an `end` or
    # line 4 was an extra line added by mistake (it happens).
    #
    # When we detect the above problem it shows the issue
    # as only being on line 2
    #
    #     2    def bark
    #
    # Showing "neighbor" keyword pairs gives extra context:
    #
    #     2    def bark
    #     4    def eat
    #     5    end
    #
    def capture_before_after_kws(block)
      return unless block.visible_lines.count == 1

      around_lines = Capture::BeforeAfterKeywordEnds.new(
        code_lines: @code_lines,
        block: block
      ).call

      around_lines -= block.lines

      @lines_to_output.concat(around_lines)
    end

    # When there is an invalid block with a keyword
    # missing an end right before another end,
    # it is unclear where which keyword is missing the
    # end
    #
    # Take this example:
    #
    #   class Dog       # 1
    #     def bark      # 2
    #       puts "woof" # 3
    #   end             # 4
    #
    # However due to https://github.com/ruby/syntax_suggest/issues/32
    # the problem line will be identified as:
    #
    #  > class Dog       # 1
    #
    # Because lines 2, 3, and 4 are technically valid code and are expanded
    # first, deemed valid, and hidden. We need to un-hide the matching end
    # line 4. Also work backwards and if there's a mis-matched keyword, show it
    # too
    def capture_last_end_same_indent(block)
      return if block.visible_lines.length != 1
      return unless block.visible_lines.first.is_kw?

      visible_line = block.visible_lines.first
      lines = @code_lines[visible_line.index..block.lines.last.index]

      # Find first end with same indent
      # (this would return line 4)
      #
      #   end             # 4
      matching_end = lines.detect { |line| line.indent == block.current_indent && line.is_end? }
      return unless matching_end

      @lineruby/syntax_suggest/api.rb000064400000012241150403134260011710 0ustar00uts "woof" # 2
    #     end           # 3
    #   end             # 4
    #
    # the problem line will be identified as:
    #
    #  > end            # 4
    #
    # This happens because lines 1, 2, and 3 are technically valid code and are expanded
    # first, deemed valid, and hidden. We need to un-hide the matching keyword on
    # line 1. Also work backwards and if there's a mis-matched end, show it
    # too
    def capture_first_kw_end_same_indent(block)
      return if block.visible_lines.length != 1
      return unless block.visible_lines.first.is_end?

      visible_line = block.visible_lines.first
      lines = @code_lines[block.lines.first.index..visible_line.index]
      matching_kw = lines.reverse.detect { |line| line.indent == block.current_indent && line.is_kw? }
      return unless matching_kw

      @lines_to_output << matching_kw

      kw_count = 0
      end_count = 0
      orphan_end = @code_lines[matching_kw.index..visible_line.index].detect do |line|
        kw_count += 1 if line.is_kw?
        end_count += 1 if line.is_end?

        end_count >= kw_count
      end

      return unless orphan_end
      @lines_to_output << orphan_end
    end
  end
end
ruby/syntax_suggest/cli.rb000064400000006166150403134250011716 0ustar00# frozen_string_literal: true

require "pathname"
require "optparse"

module SyntaxSuggest
  # All the logic of the exe/syntax_suggest CLI in one handy spot
  #
  #   Cli.new(argv: ["--help"]).call
  #   Cli.new(argv: ["<path/to/file>.rb"]).call
  #   Cli.new(argv: ["<path/to/file>.rb", "--record=tmp"]).call
  #   Cli.new(argv: ["<path/to/file>.rb", "--terminal"]).call
  #
  class Cli
    attr_accessor :options

    # ARGV is Everything passed to the executable, does not include executable name
    #
    # All other intputs are dependency injection for testing
    def initialize(argv:, exit_obj: Kernel, io: $stdout, env: ENV)
      @options = {}
      @parser = nil
      options[:record_dir] = env["SYNTAX_SUGGEST_RECORD_DIR"]
      options[:record_dir] = "tmp" if env["DEBUG"]
      options[:terminal] = SyntaxSuggest::DEFAULT_VALUE

      @io = io
      @argv = argv
      @exit_obj = exit_obj
    end

    def call
      if @argv.empty?
        # Display help if raw command
        parser.parse! %w[--help]
        return
      else
        # Mutates @argv
        parse
        return if options[:exit]
      end

      file_name = @argv.first
      if file_name.nil?
        @io.puts "No file given"
        @exit_obj.exit(1)
        return
      end

      file = Pathname(file_name)
      if !file.exist?
        @io.puts "file not found: #{file.expand_path} "
        @exit_obj.exit(1)
        return
      end

      @io.puts "Record dir: #{options[:record_dir]}" if options[:record_dir]

      display = SyntaxSuggest.call(
        io: @io,
        source: file.read,
        filename: file.expand_path,
        terminal: options.fetch(:terminal, SyntaxSuggest::DEFAULT_VALUE),
        record_dir: options[:record_dir]
      )

      if display.document_ok?
        @io.puts "Syntax OK"
        @exit_obj.exit(0)
      else
        @exit_obj.exit(1)
      end
    end

    def parse
      parser.parse!(@argv)

      self
    end

    def parser
      @parser ||= OptionParser.new do |opts|
        opts.banner = <<~EOM
          Usage: syntax_suggest <file> [options]

          Parses a ruby source file and searches for syntax error(s) such as
          unexpected `end', expecting end-of-input.

          Example:

            $ syntax_suggest dog.rb

            # ...

              > 10  defdog
              > 15  end

          ENV options:

            SYNTAX_SUGGEST_RECORD_DIR=<dir>

            Records the steps used to search for a syntax error
            to the given directory

          Options:
        EOM

        opts.version = SyntaxSuggest::VERSION

        opts.on("--help", "Help - displays this message") do |v|
          @io.puts opts
          options[:exit] = true
          @exit_obj.exit
        end

        opts.on("--record <dir>", "Records the steps used to search for a syntax error to the given directory") do |v|
          options[:record_dir] = v
        end

        opts.on("--terminal", "Enable terminal highlighting") do |v|
          options[:terminal] = true
        end

        opts.on("--no-terminal", "Disable terminal highlighting") do |v|
          options[:terminal] = false
        end
      end
    end
  end
end
ruby/syntax_suggest/lex_value.rb000064400000003004150403134260013120 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Scans up/down from the given block
  #
  # You can try out a change, stash it, or commit it to save for later
  #
  # Example:
  #
  #   scanner = ScanHistory.new(code_lines: code_lines, block: block)
  #   scanner.scan(
  #     up: ->(_, _, _) { true },
  #     down: ->(_, _, _) { true }
  #   )
  #   scanner.changed? # => true
  #   expect(scanner.lines).to eq(code_lines)
  #
  #   scanner.stash_changes
  #
  #   expect(scanner.lines).to_not eq(code_lines)
  class ScanHistory
    attr_reader :before_index, :after_index

    def initialize(code_lines:, block:)
      @code_lines = code_lines
      @history = [block]
      refresh_index
    end

    def commit_if_changed
      if changed?
        @history << CodeBlock.new(lines: @code_lines[before_index..after_index])
      end

      self
    end

    # Discards any changes that have not been committed
    def stash_changes
      refresh_index
      self
    end

    # Discard changes that have not been committed and revert the last commit
    #
    # Cannot revert the first commit
    def revert_last_commit
      if @history.length > 1
        @history.pop
        refresh_index
      end

      self
    end

    def changed?
      @before_index != current.lines.first.index ||
        @after_index != current.lines.last.index
    end

    # Iterates up and down
    #
    # Returns line, kw_count, end_count for each iteration
    def scan(up:, down:)
      kw_count = 0
      end_count = 0

      up_index = beforruby/syntax_suggest/unvisited_lines.rb000064400000001301150403134260014336 0ustar00@code_lines[0...@before_index] || []
    end

    # Returns an array of all the CodeLines that exist after
    # the currently scanned block
    private def after_lines
      @code_lines[@after_index.next..] || []
    end

    private def current
      @history.last
    end

    private def refresh_index
      @before_index = current.lines.first.index
      @after_index = current.lines.last.index
      self
    end
  end
end
ruby/syntax_suggest/priority_engulf_queue.rb000064400000002417150403134250015567 0ruby/syntax_suggest/code_search.rb000064400000007504150403134260013404 0ustar00
      @queue.pop
    end

    def push(block)
      prune_engulf(block)
      @queue << block
      flush_deleted

      self
    end

    private def flush_deleted
      while @queue&.peek&.deleted?
        @queue.pop
      end
    end

    private def prune_engulf(block)
      # If we're about to pop off the same block, we can skip deleting
      # things from the frontier this iteration since we'll get it
      # on the next iteration
      return if @queue.peek && (block <=> @queue.peek) == 1

      if block.starts_at != block.ends_at # A block of size 1 cannot engulf another
        @queue.to_a.each { |b|
          if b.starts_at >= block.starts_at && b.ends_at <= block.ends_at
            b.delete
            true
          end
        }
      end
    end
  end
end
ruby/syntax_suggest/ripper_errors.rb000064400000001700150403134250014031 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Capture parse errors from Ripper
  #
  # Prism returns the errors with their messages, but Ripper
  # does not. To get them we must make a custom subclass.
  #
  # Example:
  #
  #   puts RipperErrors.new(" def foo").call.errors
  #   # => ["syntax error, unexpected end-of-input, expecting ';' or '\\n'"]
  class RipperErrors < Ripper
    attr_reader :errors

    # Comes from ripper, called
    # on every parse error, msg
    # is a string
    def on_parse_error(msg)
      @errors ||= []
      @errors << msg
    end

    alias_method :on_alias_error, :on_parse_error
    alias_method :on_assign_error, :on_parse_error
    alias_method :on_class_name_error, :on_parse_error
    alias_method :on_param_error, :on_parse_error
    alias_method :compile_error, :on_parse_error

    def call
      @run_once ||= begin
        @errors = []
        parse
        true
      end
      self
    end
  end
end
ruby/syntax_suggest/clean_document.rb000064400000021357150403134250014126 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Parses and sanitizes source into a lexically aware document
  #
  # Internally the document is represented by an array with each
  # index containing a CodeLine correlating to a line from the source code.
  #
  # There are three main phases in the algorithm:
  #
  # 1. Sanitize/format input source
  # 2. Search for invalid blocks
  # 3. Format invalid blocks into something meaningful
  #
  # This class handles the first part.
  #
  # The reason this class exists is to format input source
  # for better/easier/cleaner exploration.
  #
  # The CodeSearch class operates at the line level so
  # we must be careful to not introduce lines that look
  # valid by themselves, but when removed will trigger syntax errors
  # or strange behavior.
  #
  # ## Join Trailing slashes
  ruby/csv/version.rb000064400000000153150403134260010327 0ustar00hey can cause many
  # problems. If left as a single line, the parser would try to parse the contents
  # aruby/csv/fields_converter.rb000064400000005072150403134260012204 0ustar00put than before:
  #
  #     1 User.
  #     2   where(name: "schneems").
  #     3   # Comment here
  #     4   first
  #
  # To handle this we can replace comment lines with empty lines
  # and then re-lex the source. This removal and re-lexing preserves
  # line index and document size, but generates an easier to work with
  # document.
  #
  class CleanDocument
    def initialize(source:)
      lines = clean_sweep(source: source)
      @document = CodeLine.from_source(lines.join, lines: lines)
    end

    # Call all of the document "cleaners"
    # and return self
    def call
      join_trailing_slash!
      join_consecutive!
      join_heredoc!

      self
    end

    # Return an array of CodeLines in the
    # document
    def lines
      @document
    end

    # Renders the document back to a string
    def to_s
      @document.join
    end

    # Remove comments
    #
    # replace with empty newlines
    #
    #     source = <<~'EOM'
    #       # Comment 1
    #       puts "hello"
    #       # Comment 2
    #       puts "world"
    #     EOM
    #
    #     lines = CleanDocument.new(source: source).lines
    #     expect(lines[0].to_s).to eq("\n")
    #     expect(lines[1].to_s).to eq("puts "hello")
    #     expect(lines[2].to_s).to eq("\n")
    #     expect(lines[3].to_s).to eq("puts "world")
    #
    # Important: This must be done before lexing.
    #
    # After this change is made, we lex the document because
    # removing comments can change how the doc is parsed.
    #
    # For example:
    #
    #     values = LexAll.new(source: <<~EOM))
    #       User.
    #         # comment
    #         where(name: 'schneems')
    #     EOM
    #     expect(
    #       values.count {|v| v.type == :on_ignored_nl}
    #     ).to eq(1)
    #
    # After the comment is removed:
    #
    #     values = LexAll.new(source: <<~EOM))
    #       User.
    #
    #         where(name: 'schneems')
    #     EOM
    #     expect(
    #      values.count {|v| v.type == :on_ignored_nl}
    #    ).to eq(2)
    #
    def clean_sweep(source:)
      # Match comments, but not HEREDOC strings with #{variable} interpolation
      # https://rubular.com/r/HPwtW9OYxKUHXQ
      source.lines.map do |line|
        if line.match?(/^\s*#([^{].*|)$/)
          $/
        else
          line
        end
      end
    end

    # Smushes all heredoc lines into one line
    #
    #     source = <<~'EOM'
    #       foo = <<~HEREDOC
    #          lol
    #          hehehe
    #       HEREDOC
    #     EOM
    #
    #     lines = CleanDocument.new(source: source).join_heredoc!.lines
    #   ruby/csv/row.rb000064400000060277150403134260007466 0ustar00  #     expect(lines[0].to_s).to eq(source)
    #     expect(lines[1].to_s).to eq("")
    #
    # The one known case this doesn't handle is:
    #
    #     Ripper.lex <<~EOM
    #       a &&
    #        b ||
    #        c
    #     EOM
    #
    # For some reason this introduces `on_ignore_newline` but with BEG type
    #
    def join_consecutive!
      consecutive_groups = @document.select(&:ignore_newline_not_beg?).map do |code_line|
        take_while_including(code_line.index..) do |line|
          line.ignore_newline_not_beg?
        end
      end

      join_groups(consecutive_groups)
      self
    end

    # Join lines with a trailing slash
    #
    #     source = <<~'EOM'
    #       it "code can be split" \
    #          "across multiple lines" do
    #     EOM
    #
    #     lines = CleanDocument.new(source: source).join_consecutive!.lines
    #     expect(lines[0].to_s).to eq(source)
    #     expect(lines[1].to_s).to eq("")
    def join_trailing_slash!
      trailing_groups = @document.select(&:trailing_slash?).map do |code_line|
        take_while_including(code_line.index..) { |x| x.trailing_slash? }
      end
      join_groups(trailing_groups)
      self
    end

    # Helper method for joining "groups" of lines
    #
    # Input is expected to be type Array<Array<CodeLine>>
    #
    # The outer array holds the various "groups" while the
    # inner array holds code lines.
    #
    # All code lines are "joined" into the first line in
    # their group.
    #
    # To preserve document size, empty lines are placed
    # in the place of the lines that were "joined"
    def join_groups(groups)
      groups.each do |lines|
        line = lines.first

        # Handle the case of multiple groups in a row
        # if one is already replaced, move on
        next if @document[line.index].empty?

        # Join group into the first line
        @document[line.index] = CodeLine.new(
          lex: lines.map(&:lex).flatten,
          line: lines.join,
          index: line.index
        )

        # Hide the rest of the lines
        lines[1..].each do |line|
          # The above lines already have newlines in them, if add more
          # then there will be double newline, use an empty line instead
          @document[line.index] = CodeLine.new(line: "", index: line.index, lex: [])
        end
      end
      self
    end

    # Helper method for grabbing elements from document
    #
    # Like `take_while` except when it stops
    # iterating, it also returns the line
    # that caused it to stop
    def take_while_including(range = 0..)
      take_next_and_stop = false
      @document[range].take_while do |line|
        next if take_next_and_stop

        take_next_and_stop = !(yield line)
        true
      end
    end
  end
end
ruby/syntax_suggest/parse_blocks_from_indent_line.rb000064400000003001150403134250017172 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # This class is responsible for generating initial code blocks
  # that will then later be expanded.
  #
  # The biggest concern when guessing code blocks, is accidentally
  # grabbing one that contains only an "end". In this example:
  #
  #   def dog
  #     begonn # misspelled `begin`
  #     puts "bark"
  #     end
  #   end
  #
  # The following lines would be matched (from bottom to top):
  #
  #   1) end
  #
  #   2) puts "bark"
  #      end
  #
  #   3) begonn
  #      puts "bark"
  #      end
  #
  # At this point it has no where else to expand, and it will yield this inner
  # code as a block
  class ParseBlocksFromIndentLine
    attr_reader :code_lines

    def initialize(code_lines:)
      @code_lines = code_lines
    end

    # Builds blocks from bottom up
    def each_neighbor_block(target_line)
      scan = AroundBlockScan.new(code_lines: code_lines, block: CodeBlock.new(lines: target_line))
        .force_add_empty
        .force_add_hidden
        .scan_while { |line| line.indent >= target_line.indent }

      neighbors = scan.code_block.lines

      block = CodeBlock.new(lines: neighbors)
      if neighbors.length <= 2 || block.valid?
        yield block
      else
        until neighbors.empty?
          lines = [neighbors.pop]
          while (block = CodeBlock.new(lines: lines)) && block.invalid? && neighbors.any?
            lines.prepend neighbors.pop
          end

          yield block if block
        end
      end
    end
  end
end
ruby/syntax_suggest/capture/falling_indent_lines.rb000064400000003127150403134250016753 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  module Capture
    # Shows the context around code provided by "falling" indentation
    #
    # If this is the original code lines:
    #
    #   class OH
    #     def hello
    #       it "foo" do
    #     end
    #   end
    #
    # And this is the line that is captured
    #
    #       it "foo" do
    #
    # It will yield its surrounding context:
    #
    #   class OH
    #     def hello
    #     end
    #   end
    #
    # Example:
    #
    #   FallingIndentLines.new(
    #       block: block,
    #       code_lines: @code_lines
    #   ).call do |line|
    #     @lines_to_output << line
    #   end
    #
    class FallingIndentLines
      def initialize(code_lines:, block:)
        @lines = nil
        @scanner = ScanHistory.new(code_lines: code_lines, block: block)
        @original_indent = block.current_indent
      end

      def call(&yieldable)
        last_indent_up = @original_indent
        last_indent_down = @original_indent

        @scanner.commit_if_changed
        @scanner.scan(
          up: ->(line, _, _) {
            next true if line.empty?

            if line.indent < last_indent_up
              yieldable.call(line)
              last_indent_up = line.indent
            end
            true
          },
          down: ->(line, _, _) {
            next true if line.empty?

            if line.indent < last_indent_down
              yieldable.call(line)
              last_indent_down = line.indent
            end
            true
          }
        )
        @scanner.stash_changes
      end
    end
  end
end
ruby/syntax_suggest/capture/before_after_keyword_ends.rb000064400000004244150403134250020005 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  module Capture
    # Shows surrounding kw/end pairs
    #
    # The purpose of showing these extra pairs is due to cases
    # of ambiguity when only one visible line is matched.
    #
    # For example:
    #
    #     1  class Dog
    #     2    def bark
    #     4    def eat
    #     5    end
    #     6  end
    #
    # In this case either line 2 could be missing an `end` or
    # line 4 was an extra line added by mistake (it happens).
    #
    # When we detect the above problem it shows the issue
    # as only being on line 2
    #
    #     2    def bark
    #
    # Showing "neighbor" keyword pairs gives extra context:
    #
    #     2    def bark
    #     4    def eat
    #     5    end
    #
    #
    # Example:
    #
    #   lines = BeforeAfterKeywordEnds.new(
    #     block: block,
    #     code_lines: code_lines
    #   ).call()
    #
    class BeforeAfterKeywordEnds
      def initialize(code_lines:, block:)
        @scanner = ScanHistory.new(code_lines: code_lines, block: block)
        @original_indent = block.current_indent
      end

      def call
        lines = []

        @scanner.scan(
          up: ->(line, kw_count, end_count) {
            next true if line.empty?
            break if line.indent < @original_indent
            next true if line.indent != @original_indent

            # If we're going up and have one complete kw/end pair, stop
            if kw_count != 0 && kw_count == end_count
              lines << line
              break
            end

            lines << line if line.is_kw? || line.is_end?
            true
          },
          down: ->(line, kw_count, end_count) {
            next true if line.empty?
            break if line.indent < @original_indent
            next true if line.indent != @original_indent

            # if we're going down and have one complete kw/end pair,stop
            if kw_count != 0 && kw_count == end_count
              lines << line
              break
            end

            lines << line if line.is_kw? || line.is_end?
            true
          }
        )
        @scanner.stash_changes

        lines
      end
    end
  end
end
ruby/syntax_suggest/code_block.rb000064400000004207150403134250013225 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Multiple lines form a singular CodeBlock
  #
  # Source code is made of multiple CodeBlocks.
  #
  # Example:
  #
  #   code_block.to_s # =>
  #     #   def foo
  #     #     puts "foo"
  #     #   end
  #
  #   code_block.valid? # => true
  #   code_block.in_valid? # => false
  #
  #
  class CodeBlock
    UNSET = Object.new.freeze
    attr_reader :lines, :starts_at, :ends_at

    def initialize(lines: [])
      @lines = Array(lines)
      @valid = UNSET
      @deleted = false
      @starts_at = @lines.first.number
      @ends_at = @lines.last.number
    end

    def delete
      @deleted = true
    end

    def deleted?
      @deleted
    end

    def visible_lines
      @lines.select(&:visible?).select(&:not_empty?)
    end

    def mark_invisible
      @lines.map(&:mark_invisible)
    end

    def is_end?
      to_s.strip == "end"
    end

    def hidden?
      @lines.all?(&:hidden?)
    end

    # This is used for frontier ordering, we are searching from
    # the largest indentation to the smallest. This allows us to
    # populate an array with multiple code blocks then call `sort!`
    # on it without having to specify the sorting criteria
    def <=>(other)
      out = current_indent <=> other.current_indent
      return out if out != 0

      # Stable sort
      starts_at <=> other.starts_at
    end

    def current_indent
      @current_indent ||= lines.select(&:not_empty?).map(&:indent).min || 0
    end

    def invalid?
      !valid?
    end

    def valid?
      if @valid == UNSET
        # Performance optimization
        #
        # If all the lines were previously hidden
        # and we expand to capture additional empty
        # lines then the result cannot be invalid
        #
        # That means there's no reason to re-check all
        # lines with the parser (which is expensive).
        # Benchmark in commit message
        @valid = if lines.all? { |l| l.hidden? || l.empty? }
          true
        else
          SyntaxSuggest.valid?(lines.map(&:original).join)
        end
      else
        @valid
      end
    end

    def to_s
      @lines.join
    end
  end
end
ruby/syntax_suggest/display_code_with_line_numbers.rb000064400000003424150403134250017375 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Outputs code with highlighted lines
  #
  # Whatever is passed to this class will be rendered
  # even if it is "marked invisible" any filtering of
  # output should be done before calling this class.
  #
  #   DisplayCodeWithLineNumbers.new(
  #     lines: lines,
  #     highlight_lines: [lines[2], lines[3]]
  #   ).call
  #   # =>
  #       1
  #       2  def cat
  #     > 3    Dir.chdir
  #     > 4    end
  #       5  end
  #       6
  class DisplayCodeWithLineNumbers
    TERMINAL_HIGHLIGHT = "\e[1;3m" # Bold, italics
    TERMINAL_END = "\e[0m"

    def initialize(lines:, highlight_lines: [], terminal: false)
      @lines = Array(lines).sort
      @terminal = terminal
      @highlight_line_hash = Array(highlight_lines).each_with_object({}) { |line, h| h[line] = true }
      @digit_count = @lines.last&.line_number.to_s.length
    end

    def call
      @lines.map do |line|
        format_line(line)
      end.join
    end

    private def format_line(code_line)
      # Handle trailing slash lines
      code_line.original.lines.map.with_index do |contents, i|
        format(
          empty: code_line.empty?,
          number: (code_line.number + i).to_s,
          contents: contents,
          highlight: @highlight_line_hash[code_line]
        )
      end.join
    end

    private def format(contents:, number:, empty:, highlight: false)
      string = +""
      string << if highlight
        "> "
      else
        "  "
      end

      string << number.rjust(@digit_count).to_s
      if empty
        string << contents
      else
        string << "  "
        string << TERMINAL_HIGHLIGHT if @terminal && highlight
        string << contents
        string << TERMINAL_END if @terminal
      end
      string
    end
  end
end
ruby/syntax_suggest/lex_all.rb000064400000003250150403134250012556 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Ripper.lex is not guaranteed to lex the entire source document
  #
  # This class guarantees the whole document is lex-ed by iteratively
  # lexing the document where ripper stopped.
  #
  # Prism likely doesn't have the same problem. Once ripper support is removed
  # we can likely reduce the complexity here if not remove the whole concept.
  #
  # Example usage:
  #
  #   lex = LexAll.new(source: source)
  #   lex.each do |value|
  #     puts value.line
  #   end
  class LexAll
    include Enumerable

    def initialize(source:, source_lines: nil)
      @lex = self.class.lex(source, 1)
      lineno = @lex.last[0][0] + 1
      source_lines ||= source.lines
      last_lineno = source_lines.length

      until lineno >= last_lineno
        lines = source_lines[lineno..]

        @lex.concat(
          self.class.lex(lines.join, lineno + 1)
        )

        lineno = @lex.last[0].first + 1
      end

      last_lex = nil
      @lex.map! { |elem|
        last_lex = LexValue.new(elem[0].first, elem[1], elem[2], elem[3], last_lex)
      }
    end

    if SyntaxSuggest.use_prism_parser?
      def self.lex(source, line_number)
        Prism.lex_compat(source, line: line_number).value.sort_by { |values| values[0] }
      end
    else
      def self.lex(source, line_number)
        Ripper::Lexer.new(source, "-", line_number).parse.sort_by(&:pos)
      end
    end

    def to_a
      @lex
    end

    def each
      return @lex.each unless block_given?
      @lex.each do |x|
        yield x
      end
    end

    def [](index)
      @lex[index]
    end

    def last
      @lex.last
    end
  end
end

require_relative "lex_value"
ruby/syntax_suggest/code_line.rb000064400000015176150403134250013071 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Represents a single line of code of a given source file
  #
  # This object contains metadata about the line such as
  # amount of indentation, if it is empty or not, and
  # lexical data, such as if it has an `end` or a keyword
  # in it.
  #
  # Visibility of lines can be toggled off. Marking a line as invisible
  # indicates that it should not be used for syntax checks.
  # It's functionally the same as commenting it out.
  #
  # Example:
  #
  #   line = CodeLine.from_source("def foo\n").first
  #   line.number => 1
  #   line.empty? # => false
  #   line.visible? # => true
  #   line.mark_invisible
  #   line.visible? # => false
  #
  class CodeLine
    TRAILING_SLASH = ("\\" + $/).freeze

    # Returns an array of CodeLine objects
    # from the source string
    def self.from_source(source, lines: nil)
      lines ||= source.lines
      lex_array_for_line = LexAll.new(source: source, source_lines: lines).each_with_object(Hash.new { |h, k| h[k] = [] }) { |lex, hash| hash[lex.line] << lex }
      lines.map.with_index do |line, index|
        CodeLine.new(
          line: line,
          index: index,
          lex: lex_array_for_line[index + 1]
        )
      end
    end

    attr_reader :line, :index, :lex, :line_number, :indent
    def initialize(line:, index:, lex:)
      @lex = lex
      @line = line
      @index = index
      @original = line
      @line_number = @index + 1
      strip_line = line.dup
      strip_line.lstrip!

      @indent = if (@empty = strip_line.empty?)
        line.length - 1 # Newline removed from strip_line is not "whitespace"
      else
        line.length - strip_line.length
      end

      set_kw_end
    end

    # Used for stable sort via indentation level
    #
    # Ruby's sort is not "stable" meaning that when
    # multiple elements have the same value, they are
    # not guaranteed to return in the same order they
    # were put in.
    #
    # So when multiple code lines have the same indentation
    # level, they're sorted by their index value which is unique
    # and consistent.
    #
    # This is mostly needed for consistency of the test suite
    def indent_index
      @indent_index ||= [indent, index]
    end
    alias_method :number, :line_number

    # Returns true if the code line is determined
    # to contain a keyword that matches with an `end`
    #
    # For example: `def`, `do`, `begin`, `ensure`, etc.
    def is_kw?
      @is_kw
    end

    # Returns true if the code line is determined
    # to contain an `end` keyword
    def is_end?
      @is_end
    end

    # Used to hide lines
    #
    # The search alorithm will group lines into blocks
    # then if those blocks are determined to represent
    # valid code they will be hidden
    def mark_invisible
      @line = ""
    end

    # Means the line was marked as "invisible"
    # Confusingly, "empty" lines are visible...they
    # just don't contain any source code other than a newline ("\n").
    def visible?
      !line.empty?
    end

    # Opposite or `visible?` (note: different than `empty?`)
    def hidden?
      !visible?
    end

    # An `empty?` line is one that was originally left
    # empty in the source code, while a "hidden" line
    # is one that we've since marked as "invisible"
    def empty?
      @empty
    end

    # Opposite of `empty?` (note: different than `visible?`)
    def not_empty?
      !empty?
    end

    # Renders the given line
    #
    # Also allows us to represent source code as
    # an array of code lines.
    #
    # When we have an array of code line elements
    # calling `join` on the array will call `to_s`
    # on each element, which essentially converts
    # it back into it's original source string.
    def to_s
      line
    end

    # When the code line is marked invisible
    # we retain the original value of it's line
    # this is useful for debugging and for
    # showing extra context
    #
    # DisplayCodeWithLineNumbers will render
    # all lines given to it, not just visible
    # lines, it uses the original method to
    # obtain them.
    attr_reader :original

    # Comparison operator, needed for equality
    # and sorting
    def <=>(other)
      index <=> other.index
    end

    # [Not stable API]
    #
    # Lines that have a `on_ignored_nl` type token and NOT
    # a `BEG` type seem to be a good proxy for the ability
    # to join multiple lines into one.
    #
    # This predicate method is used to determine when those
    # two criteria have been met.
    #
    # The one known case this doesn't handle is:
    #
    #     Ripper.lex <<~EOM
    #       a &&
    #        b ||
    #        c
    #     EOM
    #
    # For some reason this introduces `on_ignore_newline` but wiruby/csv/table.rb000064400000112420150403134260007732 0ustar00ne by looking mostly at the "state" (last value):
    #
    #   ENDFN -> BEG (token = '=' ) -> END
    #
    private def set_kw_end
      oneliner_count = 0
      in_oneliner_def = nil

      kw_count = 0
      end_count = 0

      @ignore_newline_not_beg = false
      @lex.each do |lex|
        kw_count += 1 if lex.is_kw?
        end_count += 1 if lex.is_end?

        if lex.type == :on_ignored_nl
          @ignore_newline_not_beg = !lex.expr_beg?
        end

        if in_oneliner_def.nil?
          in_oneliner_def = :ENDFN if lex.state.allbits?(Ripper::EXPR_ENDFN)
        elsif lex.state.allbits?(Ripper::EXPR_ENDFN)
          # Continue
        elsif lex.state.allbits?(Ripper::EXPR_BEG)
          in_oneliner_def = :BODY if lex.token == "="
        elsif lex.state.allbits?(Ripper::EXPR_END)
          # We found an endless method, count it
          oneliner_count += 1 if in_oneliner_def == :BODY

          in_oneliner_def = nil
        else
          in_oneliner_def = nil
        end
      end

      kw_count -= oneliner_count

      @is_kw = (kw_count - end_count) > 0
      @is_end = (end_count - kw_count) > 0
    end
  end
end
ruby/syntax_suggest/pathname_from_message.rb000064400000002660150403134250015466 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Converts a SyntaxError message to a path
  #
  # Handles the case where the filename has a colon in it
  # such as on a windows file system: https://github.com/ruby/syntax_suggest/issues/111
  #
  # Example:
  #
  #    message = "/tmp/scratch:2:in `require_relative': /private/tmp/bad.rb:1: syntax error, unexpected `end' (SyntaxError)"
  #    puts PathnameFromMessage.new(message).call.name
  #    # => "/tmp/scratch.rb"
  #
  class PathnameFromMessage
    EVAL_RE = /^\(eval.*\):\d+/
    STREAMING_RE = /^-:\d+/
    attr_reader :name

    def initialize(message, io: $stderr)
      @line = message.lines.first
      @parts = @line.split(":")
      @guess = []
      @name = nil
      @io = io
    end

    def call
      if skip_missing_file_name?
        if ENV["SYNTAX_SUGGEST_DEBUG"]
          @io.puts "SyntaxSuggest: Could not find filename from #{@line.inspect}"
        end
      else
        until stop?
          @guess << @parts.shift
          @name = Pathname(@guess.join(":"))
        end

        if @parts.empty?
          @io.puts "SyntaxSuggest: Could not find filename from #{@line.inspect}"
          @name = nil
        end
      end

      self
    end

    def stop?
      return true if @parts.empty?
      return false if @guess.empty?

      @name&.exist?
    end

    def skip_missing_file_name?
      @line.match?(EVAL_RE) || @line.match?(STREAMING_RE)
    end
  end
end
ruby/syntax_suggest/block_expand.rb000064400000011600150403134250013565 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # This class is responsible for taking a code block that exists
  # at a far indentaion and then iteratively increasing the block
  # so that it captures everything within the same indentation block.
  #
  #   def dog
  #     puts "bow"
  #     puts "wow"
  #   end
  #
  # block = BlockExpand.new(code_lines: code_lines)
  #   .call(CodeBlock.new(lines: code_lines[1]))
  #
  # puts block.to_s
  # # => puts "bow"
  #      puts "wow"
  #
  #
  # Once a code block has captured everything at a given indentation level
  # then it will expand to capture surrounding indentation.
  #
  # block = BlockExpand.new(code_lines: code_lines)
  #   .call(block)
  #
  # block.to_s
  # # => def dog
  #        puts "bow"
  #        puts "wow"
  #      end
  #
  class BlockExpand
    def initialize(code_lines:)
      @code_lines = code_lines
    end

    # Main interface. Expand current indentation, before
    # expanding to a lower indentation
    def call(block)
      if (next_block = expand_neighbors(block))
        next_block
      else
        expand_indent(block)
      end
    end

    # Expands code to the next lowest indentation
    #
    # For example:
    #
    #   1 def dog
    #   2   print "dog"
    #   3 end
    #
    # If a block starts on line 2 then it has captured all it's "neighbors" (code at
    # the same indentation or higher). To continue expanding, this block must capture
    # lines one and three which are at a different indentation level.
    #
    # This method allows fully expanded blocks to decrease their indentation level (so
    # they can expand to capture more code up and down). It does this conservatively
    # as there's no undo (currently).
    def expand_indent(block)
      now = AroundBlockScan.new(code_lines: @code_lines, block: block)
        .force_add_hidden
        .stop_after_kw
        .scan_adjacent_indent

      now.lookahead_balance_one_line

      now.code_block
    end

    # A neighbor is code that is at or above the current indent line.
    #
    # First we build a block with all neighbors. If we can't go further
    # then we decrease the indentation threshold and expand via indentation
    # i.e. `expand_indent`
    #
    # Handles two general cases.
    #
    # ## Case #1: Check code inside of methods/classes/etc.
    #
    # It's important to note, that not everything in a given indentation level can be parsed
    # as valid code even if it's part of valid code. For example:
    #
    #   1 hash = {
    #   2   name: "richard",
    #   3   dog: "cinco",
    #   4 }
    #
    # In this case lines 2 and 3 will be neighbors, but they're invalid until `expand_indent`
    # is called on them.
    #
    # When we are adding code within a method or class (at the same indentation level),
    # use the empty lines to denote the programmer intended logical chunks.
    # Stop and check each one. For example:
    #
    #   1 def dog
    #   2   print "dog"
    #   3
    #   4   hash = {
    #   5 end
    #
    # If we did not stop parsing at empty newlines then the block might mistakenly grab all
    # the contents (lines 2, 3, and 4) and report them as being problems, instead of only
    # line 4.
    #
    # ## Case #2: Expand/grab other logical blocks
    #
    # Once the search algorithm has converted all lines into blocks at a given indentation
    # it will then `expand_indent`. Once the blocks that generates are expanded as neighbors
    # we then begin seeing neighbors being other logical blocks i.e. a block's neighbors
    # may be another method or class (something with keywords/ends).
    #
    # For example:
    #
    #   1 def bark
    #   2
    #   3 end
    #   4
    #   5 def sit
    #   6 end
    #
    # In this case if lines 4, 5, and 6 are in a block when it tries to expand neighbors
    # it will expand up. If it stops after line 2 or 3 it may cause problems since there's a
    # valid kw/end pair, but the block will be checked without it.
    #
    # We try to resolve this edge case with `lookahead_balance_one_line` below.
    def expand_neighbors(block)
      now = AroundBlockScan.new(code_lines: @code_lines, block: block)

      # Initial scan
      now
        .force_add_hidden
        .stop_after_kw
        .scan_neighbors_not_empty

      # Slurp up empties
      now
        .scan_while { |line| line.empty? }

      # If next line is kw and it will balance us, take it
      expanded_lines = now
        .lookahead_balance_one_line
        .lines

      # Don't allocate a block if it won't be used
      #
      # If nothing was taken, return nil to indicate that status
      # used in `def call` to determine if
      # we need to expand up/out (`expand_indent`)
      if block.lines == expanded_lines
        nil
      else
        CodeBlock.new(lines: expanded_lines)
      end
    end

    # Manageable rspec errors
    def inspect
      "#<SyntaxSuggest::CodeBlock:0x0000123843lol >"
    end
  end
end
ruby/syntax_suggest/display_invalid_blocks.rb000064400000003405150403134250015650 0ustar00# frozen_string_literal: true

require_relative "capture_code_context"
require_relative "display_code_with_line_numbers"

module SyntaxSuggest
  # Used for formatting invalid blocks
  class DisplayInvalidBlocks
    attr_reader :filename

    def initialize(code_lines:, blocks:, io: $stderr, filename: nil, terminal: DEFAULT_VALUE)
      @io = io
      @blocks = Array(blocks)
      @filename = filename
      @code_lines = code_lines

      @terminal = (terminal == DEFAULT_VALUE) ? io.isatty : terminal
    end

    def document_ok?
      @blocks.none? { |b| !b.hidden? }
    end

    def call
      if document_ok?
        return self
      end

      if filename
        @io.puts("--> #{filename}")
        @io.puts
      end
      @blocks.each do |block|
        display_block(block)
      end

      self
    end

    private def display_block(block)
      # Build explanation
      explain = ExplainSyntax.new(
        code_lines: block.lines
      ).call

      # Enhance code output
      # Also handles several ambiguious cases
      lines = CaptureCodeContext.new(
        blocks: block,
        code_lines: @code_lines
      ).call

      # Build code output
      document = DisplayCodeWithLineNumbers.new(
        lines: lines,
        terminal: @terminal,
        highlight_lines: block.lines
      ).call

      # Output syntax error explanation
      explain.errors.each do |e|
        @io.puts e
      end
      @io.puts

      # Output code
      @io.puts(document)
    end

    private def code_with_context
      lines = CaptureCodeContext.new(
        blocks: @blocks,
        code_lines: @code_lines
      ).call

      DisplayCodeWithLineNumbers.new(
        lines: lines,
        terminal: @terminal,
        highlight_lines: @invalid_lines
      ).call
    end
  end
end
ruby/syntax_suggest/core_ext.rb000064400000005225150403134250012752 0ustar00# frozen_string_literal: true

# Ruby 3.2+ has a cleaner way to hook into Ruby that doesn't use `require`
if SyntaxError.method_defined?(:detailed_message)
  module SyntaxSuggest
    # SyntaxSuggest.module_for_detailed_message [Private]
    #
    # Used to monkeypatch SyntaxError via Module.prepend
    def self.module_for_detailed_message
      Module.new {
        def detailed_message(highlight: true, syntax_suggest: true, **kwargs)
          return super unless syntax_suggest

          require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)

          message = super

          if path
            file = Pathname.new(path)
            io = SyntaxSuggest::MiniStringIO.new

            SyntaxSuggest.call(
              io: io,
              source: file.read,
              filename: file,
              terminal: highlight
            )
            annotation = io.string

            annotation += "\n" unless annotation.end_with?("\n")

            annotation + message
          else
            message
          end
        rescue => e
          if ENV["SYNTAX_SUGGEST_DEBUG"]
            $stderr.warn(e.message)
            $stderr.warn(e.backtrace)
          end

          # Ignore internal errors
          message
        end
      }
    end
  end

  SyntaxError.prepend(SyntaxSuggest.module_for_detailed_message)
else
  autoload :Pathname, "pathname"

  #--
  # Monkey patch kernel to ensure that all `require` calls call the same
  # method
  #++
  module Kernel
    # :stopdoc:

    module_function

    alias_method :syntax_suggest_original_require, :require
    alias_method :syntax_suggest_original_require_relative, :require_relative
    alias_method :syntax_suggest_original_load, :load

    def load(file, wrap = false)
      syntax_suggest_original_load(file)
    rescue SyntaxError => e
      require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)

      SyntaxSuggest.handle_error(e)
    end

    def require(file)
      syntax_suggest_original_require(file)
    rescue SyntaxError => e
      require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)

      SyntaxSuggest.handle_error(e)
    end

    def require_relative(file)
      if Pathname.new(file).absolute?
        syntax_suggest_original_require file
      else
        relative_from = caller_locations(1..1).first
        relative_from_path = relative_from.absolute_path || relative_from.path
        syntax_suggest_original_require File.expand_path("../#{file}", relative_from_path)
      end
    rescue SyntaxError => e
      require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)

      SyntaxSuggest.handle_error(e)
    end
  end
end
ruby/syntax_suggest/around_block_scan.rb000064400000015635150403134260014617 0ustar00# frozen_string_literal: true

require_relative "scan_history"

module SyntaxSuggest
  # This class is useful for exploring contents before and after
  # a block
  #
  # It searches above and below the passed in block to match for
  # whatever criteria you give it:
  #
  # Example:
  #
  #   def dog         # 1
  #     puts "bark"   # 2
  #     puts "bark"   # 3
  #   end             # 4
  #
  #   scan = AroundBlockScan.new(
  #     code_lines: code_lines
  #     block: CodeBlock.new(lines: code_lines[1])
  #   )
  #
  #   scan.scan_while { true }
  #
  #   puts scan.before_index # => 0
  #   puts scan.after_index  # => 3
  #
  class AroundBlockScan
    def initialize(code_lines:, block:)
      @code_lines = code_lines
      @orig_indent = block.current_indent

      @stop_after_kw = false
      @force_add_empty = false
      @force_add_hidden = false
      @target_indent = nil

      @scanner = ScanHistory.new(code_lines: code_lines, block: block)
    end

    # When using this flag, `scan_while` will
    # bypass the block it's given and always add a
    # line that responds truthy to `CodeLine#hidden?`
    #
    # Lines are hidden when they've been evaluated by
    # the parser as part of a block and found to contain
    # valid code.
    def force_add_hidden
      @force_add_hidden = true
      self
    end

    # When using this flag, `scan_while` will
    # bypass the block it's given and always add a
    # line that responds truthy to `CodeLine#empty?`
    #
    # Empty lines contain no code, only whitespace such
    # as leading spaces a newline.
    def force_add_empty
      @force_add_empty = true
      self
    end

    # Tells `scan_while` to look for mismatched keyword/end-s
    #
    # When scanning up, if we see more keywords then end-s it will
    # stop. This might happen when scanning outside of a method body.
    # the first scan line up would be a keyword and this setting would
    # trigger a stop.
    #
    # When scanning down, stop if there are more end-s than keywords.
    def stop_after_kw
      @stop_after_kw = true
      self
    end

    # Main work method
    #
    # The scan_while method takes a block that yields lines above and
    # below the block. If the yield returns true, the @before_index
    # or @after_index are modified to include the matched line.
    #
    # In addition to yielding individual lines, the internals of this
    # object give a mini DSL to handle common situations such as
    # stopping if we've found a keyword/end mis-match in one direction
    # or the other.
    def scan_while
      stop_next_up = false
      stop_next_down = false

      @scanner.scan(
        up: ->(line, kw_count, end_count) {
          next false if stop_next_up
          next true if @force_add_hidden && line.hidden?
          next true if @force_add_empty && line.empty?

          if @stop_after_kw && kw_count > end_count
            stop_next_up = true
          end

          yield line
        },
        down: ->(line, kw_count, end_count) {
          next false if stop_next_down
          next true if @force_add_hidden && line.hidden?
          next true if @force_add_empty && line.empty?

          if @stop_after_kw && end_count > kw_count
            stop_next_down = true
          end

          yield line
        }
      )

      self
    end

    # Scanning is intentionally conservative because
    # we have no way of rolling back an aggressive block (at this time)
    #
    # If a block was stopped for some trivial reason, (like an empty line)
    # but the next line would have caused it to be balanced then we
    # can check that condition and grab just one more line either up or
    # down.
    #
    # For example, below if we're scanning up, line 2 might cause
    # the scanning to stop. This is because empty lines might
    # denote logical breaks where the user intended to chunk code
    # which is a good place to stop and check validity. Unfortunately
    # it also means we might have a "dangling" keyword or end.
    #
    #   1 def bark
    #   2
    #   3 end
    #
    # If lines 2 and 3 are in the block, then when this method is
    # run it would see it is unbalanced, but that acquiring line 1
    # would make it balanced, so that's what it does.
    def lookahead_balance_one_line
      kw_count = 0
      end_count = 0
      lines.each do |line|
        kw_count += 1 if line.is_kw?
        end_count += 1 if line.is_end?
      end

      return self if kw_count == end_count # nothing to balance

      @scanner.commit_if_changed # Rollback point if we don't find anything to optimize

      # Try to eat up empty lines
      @scanner.scan(
        up: ->(line, _, _) { line.hidden? || line.empty? },
        down: ->(line, _, _) { line.hidden? || line.empty? }
      )

      # More ends than keywords, check if we can balance expanding up
      next_up = @scanner.next_up
      next_down = @scanner.next_down
      case end_count - kw_count
      when 1
        if next_up&.is_kw? && next_up.indent >= @target_indent
          @scanner.scan(
            up: ->(line, _, _) { line == next_up },
            down: ->(line, _, _) { false }
          )
          @scanner.commit_if_changed
        end
      when -1
        if next_down&.is_end? && next_down.indent >= @target_indent
          @scanner.scan(
            up: ->(line, _, _) { false },
            down: ->(line, _, _) { line == next_down }
          )
          @scanner.commit_if_changed
        end
      end
      # Rollback any uncommitted changes
      @scanner.stash_changes

      self
    end

    # Finds code lines at the same or greater indentation and adds them
    # to the block
    def scan_neighbors_not_empty
      @target_indent = @orig_indent
      scan_while { |line| line.not_empty? && line.indent >= @target_indent }
    end

    # Scan blocks based on indentation of next line above/below block
    #
    # Determines indentaion of the next line above/below the current block.
    #
    # Normally this is called when a block has expanded to capture all "neighbors"
    # at the same (or greater) indentation and needs to expand out. For example
    # the `def/end` lines surrounding a method.
    def scan_adjacent_indent
      before_after_indent = []

      before_after_indent << (@scanner.next_up&.indent || 0)
      before_after_indent << (@scanner.next_down&.indent || 0)

      @target_indent = before_after_indent.min
      scan_while { |line| line.not_empty? && line.indent >= @target_indent }

      self
    end

    # Return the currently matched lines as a `CodeBlock`
    #
    # When a `CodeBlock` is created it will gather metadata about
    # itself, so this is not a free conversion. Avoid allocating
    # more CodeBlock's than needed
    def code_block
      CodeBlock.new(lines: lines)
    end

    # Returns the lines matched by the current scan as an
    # array of CodeLines
    def lines
      @scanner.lines
    end

    # Manageable rspec errors
    def inspect
      "#<#{self.class}:0x0000123843lol >"
    end
  end
end
ruby/syntax_suggest/priority_queue.rb000064400000003776150403134260014241 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Holds elements in a priority heap on insert
  #
  # Instead of constantly calling `sort!`, put
  # the element where it belongs the first time
  # around
  #
  # Example:
  #
  #   queue = PriorityQueue.new
  #   queue << 33
  #   queue << 44
  #   queue << 1
  #
  #   puts queue.peek # => 44
  #
  class PriorityQueue
    attr_reader :elements

    def initialize
      @elements = []
    end

    def <<(element)
      @elements << element
      bubble_up(last_index, element)
    end

    def pop
      exchange(0, last_index)
      max = @elements.pop
      bubble_down(0)
      max
    end

    def length
      @elements.length
    end

    def empty?
      @elements.empty?
    end

    def peek
      @elements.first
    end

    def to_a
      @elements
    end

    # Used for testing, extremely not performant
    def sorted
      out = []
      elements = @elements.dup
      while (element = pop)
        out << element
      end
      @elements = elements
      out.reverse
    end

    private def last_index
      @elements.size - 1
    end

    private def bubble_up(index, element)
      return if index <= 0

      parent_index = (index - 1) / 2
      parent = @elements[parent_index]

      return if (parent <=> element) >= 0

      exchange(index, parent_index)
      bubble_up(parent_index, element)
    end

    private def bubble_down(index)
      child_index = (index * 2) + 1

      return if child_index > last_index

      not_the_last_element = child_index < last_index
      left_element = @elements[child_index]
      right_element = @elements[child_index + 1]

      child_index += 1 if not_the_last_element && (right_element <=> left_element) == 1

      return if (@elements[index] <=> @elements[child_index]) >= 0

      exchange(index, child_index)
      bubble_down(child_index)
    end

    def exchange(source, target)
      a = @elements[source]
      b = @elements[target]
      @elements[source] = b
      @elements[target] = a
    end
  end
end
ruby/syntax_suggest/code_frontier.rb000064400000013164150403134260013766 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # The main function of the frontier is to hold the edges of our search and to
  # evaluate when we can stop searching.

  # There are three main phases in the algorithm:
  #
  # 1. Sanitize/format input source
  # 2. Search for invalid blocks
  # 3. Format invalid blocks into something meaningful
  #
  # The Code frontier is a critical part of the second step
  #
  # ## Knowing where we've been
  #
  # Once a code block is generated it is added onto the frontier. Then it will be
  # sorted by indentation and frontier can be filtered. Large blocks that fully enclose a
  # smaller block will cause the smaller block to be evicted.
  #
  #   CodeFrontier#<<(block) # Adds block to frontier
  #   CodeFrontier#pop # Removes block from frontier
  #
  # ## Knowing where we can go
  #
  # Internally the frontier keeps track of "unvisited" lines which are exposed via `next_indent_line`
  # when called, this method returns, a line of code with the highest indentation.
  #
  # The returned line of code can be used to build a CodeBlock and then that code block
  # is added back to the frontier. Then, the lines are removed from the
  # "unvisited" so we don't double-create the same block.
  #
  #   CodeFrontier#next_indent_line # Shows next line
  #   CodeFrontier#register_indent_block(block) # Removes lines from unvisited
  #
  # ## Knowing when to stop
  #
  # The frontier knows how to check the entire document for a syntax error. When blocks
  # are added onto the frontier, they're removed from the document. When all code containing
  # syntax errors has been added to the frontier, the document will be parsable without a
  # syntax error and the search can stop.
  #
  #   CodeFrontier#holds_all_syntax_errors? # Returns true when frontier holds all syntax errors
  #
  # ## Filtering false positives
  #
  # Once the search is completed, the frontier may have multiple blocks that do not contain
  # the syntax error. To limit the result to the smallest subset of "invalid blocks" call:
  #
  #   CodeFrontier#detect_invalid_blocks
  #
  class CodeFrontier
    def initialize(code_lines:, unvisited: UnvisitedLines.new(code_lines: code_lines))
      @code_lines = code_lines
      @unvisited = unvisited
      @queue = PriorityEngulfQueue.new

      @check_next = true
    end

    def count
      @queue.length
    end

    # Performance optimization
    #
    # Parsing with ripper is expensive
    # If we know we don't have any blocks with invalid
    # syntax, then we know we cannot have found
    # the incorrect syntax yet.
    #
    # When an invalid block is added onto the frontier
    # check document state
    private def can_skip_check?
      check_next = @check_next
      @check_next = false

      if check_next
        false
      else
        true
      end
    end

    # Returns true if the document is valid with all lines
    # removed. By default it checks all blocks in present in
    # the frontier array, but can be used for arbitrary arrays
    # of codeblocks as well
    def holds_all_syntax_errors?(block_array = @queue, can_cache: true)
      return false if can_cache && can_skip_check?

      without_lines = block_array.to_a.flat_map do |block|
        block.lines
      end

      SyntaxSuggest.valid_without?(
        without_lines: without_lines,
        code_lines: @code_lines
      )
    end

    # Returns a code block with the largest indentation possible
    def pop
      @queue.pop
    end

    def next_indent_line
      @unvisited.peek
    end

    def expand?
      return false if @queue.empty?
      return true if @unvisited.empty?

      frontier_indent = @queue.peek.current_indent
      unvisited_indent = next_indent_line.indent

      if ENV["SYNTAX_SUGGEST_DEBUG"]
        puts "```"
        puts @queue.peek
        puts "```"
        puts "  @frontier indent:  #{frontier_indent}"
        puts "  @unvisited indent: #{unvisited_indent}"
      end

      # Expand all blocks before moving to unvisited lines
      frontier_indent >= unvisited_indent
    end

    # Keeps track of what lines have been added to blocks and which are not yet
    # visited.
    def register_indent_block(block)
      @unvisited.visit_block(block)
      self
    end

    # When one element fully encapsulates another we remove the smaller
    # block from the frontier. This prevents double expansions and all-around
    # weird behavior. However this guarantee is quite expensive to maintain
    def register_engulf_block(block)
    end

    # Add a block to the frontier
    #
    # This method ensures the frontier always remains sorted (in indentation order)
    # and that each code block's lines are removed from the indentation hash so we
    # don't re-evaluate the same line multiple times.
    def <<(block)
      @unvisited.visit_block(block)

      @queue.push(block)

      @check_next = true if block.invalid?

      self
    end

    # Example:
    #
    #   combination([:a, :b, :c, :d])
    #   # => [[:a], [:b], [:c], [:d], [:a, :b], [:a, :c], [:a, :d], [:b, :c], [:b, :d], [:c, :d], [:a, :b, :c], [:a, :b, :d], [:a, :c, :d], [:b, :c, :d], [:a, :b, :c, :d]]
    def self.combination(array)
      guesses = []
      1.upto(array.length).each do |size|
        guesses.concat(array.combination(size).to_a)
      end
      guesses
    end

    # Given that we know our syntax error exists somewhere in our frontier, we want to find
    # the smallest possible set of blocks that contain all the syntax errors
    def detect_invalid_blocks
      self.class.combination(@queue.to_a.select(&:invalid?)).detect do |block_array|
        holds_all_syntax_errors?(block_array, can_cache: false)
      end || []
    end
  end
end
ruby/syntax_suggest/left_right_lex_count.rb000064400000010074150403134260015350 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Find mis-matched syntax based on lexical count
  #
  # Used for detecting missing pairs of elements
  # each keyword needs an end, each '{' needs a '}'
  # etc.
  #
  # Example:
  #
  #   left_right = LeftRightLexCount.new
  #   left_right.count_kw
  #   left_right.missing.first
  #   # => "end"
  #
  #   left_right = LeftRightLexCount.new
  #   source = "{ a: b, c: d" # Note missing '}'
  #   LexAll.new(source: source).each do |lex|
  #     left_right.count_lex(lex)
  #   end
  #   left_right.missing.first
  #   # => "}"
  class LeftRightLexCount
    def initialize
      @kw_count = 0
      @end_count = 0

      @count_for_char = {
        "{" => 0,
        "}" => 0,
        "[" => 0,
        "]" => 0,
        "(" => 0,
        ")" => 0,
        "|" => 0
      }
    end

    def count_kw
      @kw_count += 1
    end

    def count_end
      @end_count += 1
    end

    # Count source code characters
    #
    # Example:
    #
    #   left_right = LeftRightLexCount.new
    #   left_right.count_lex(LexValue.new(1, :on_lbrace, "{", Ripper::EXPR_BEG))
    #   left_right.count_for_char("{")
    #   # => 1
    #   left_right.count_for_char("}")
    #   # => 0
    def count_lex(lex)
      case lex.type
      when :on_tstring_content
        # ^^^
        # Means it's a string or a symbol `"{"` rather than being
        # part of a data structure (like a hash) `{ a: b }`
        # ignore it.
      when :on_words_beg, :on_symbos_beg, :on_qwords_beg,
           :on_qsymbols_beg, :on_regexp_beg, :on_tstring_beg
        # ^^^
        # Handle shorthand syntaxes like `%Q{ i am a string }`
        #
        # The start token will be the full thing `%Q{` but we
        # need to count it as if it's a `{`. Any token
        # can be used
        char = lex.token[-1]
        @count_for_char[char] += 1 if @count_for_char.key?(char)
      when :on_embexpr_beg
        # ^^^
        # Embedded string expressions like `"#{foo} <-embed"`
        # are parsed with chars:
        #
        # `#{` as :on_embexpr_beg
        #  `}` as :on_embexpr_end
        #
        # We cannot ignore both :on_emb_expr_beg and :on_embexpr_end
        # because sometimes the lexer thinks something is an embed
        # string end, when it is not like `lol = }` (no clue why).
        #
        # When we see `#{` count it as a `{` or we will
        # have a mis-match count.
        #
        case lex.token
        when "\#{"
          @count_for_char["{"] += 1
        end
      else
        @end_count += 1 if lex.is_end?
        @kw_count += 1 if lex.is_kw?
        @count_for_char[lex.token] += 1 if @count_for_char.key?(lex.token)
      end
    end

    def count_for_char(char)
      @count_for_char[char]
    end

    # Returns an array of missing syntax characters
    # or `"end"` or `"keyword"`
    #
    #   left_right.missing
    #   # => ["}"]
    def missing
      out = missing_pairs
      out << missing_pipe
      out << missing_keyword_end
      out.compact!
      out
    end

    PAIRS = {
      "{" => "}",
      "[" => "]",
      "(" => ")"
    }.freeze

    # Opening characters like `{` need closing characters # like `}`.
    #
    # When a mis-match count is detected, suggest the
    # missing member.
    #
    # For example if there are 3 `}` and only two `{`
    # return `"{"`
    private def missing_pairs
      PAIRS.map do |(left, right)|
        case @count_for_char[left] <=> @count_for_char[right]
        when 1
          right
        when 0
          nil
        when -1
          left
        end
      end
    end

    # Keywords need ends and ends need keywords
    #
    # If we have more keywords, there's a missing `end`
    # if we have more `end`-s, there's a missing keyword
    private def missing_keyword_end
      case @kw_count <=> @end_count
      when 1
        "end"
      when 0
        nil
      when -1
        "keyword"
      end
    end

    # Pipes come in pairs.
    # If there's an odd number of pipes then we
    # are missing one
    private def missing_pipe
      if @count_for_char["|"].odd?
        "|"
      end
    end
  end
end
ruby/syntax_suggest/api.rb000064400000014155150403134260011716 0ustar00# frozen_string_literal: true

require_relative "version"

require "tmpdir"
require "stringio"
require "pathname"
require "timeout"

# We need Ripper loaded for `Prism.lex_compat` even if we're using Prism
# for lexing and parsing
require "ripper"

# Prism is the new parsruby/csv/input_record_separator.rb000064400000000425150403134260013421 0ustar00ells us if the prism parser is available for use
  # or if we should fallback to `Ripper`
  def self.use_prism_parser?
    defined?(Prism)
  end

  # SyntaxSuggest.handle_error [Public]
  #
  # Takes a `SyntaxError` exception, uses the
  # error message to locate the file. Theruby/csv/match_p.rb000064400000000571150403134260010261 0ustar00e.message, io: io).call.name
    raise e unless file

    io.sync = true

    call(
      io: io,
      source: file.read,
      filename: file
    )

    raise e if re_raise
  end

  # SyntaxSuggest.call [Private]
  #
  # Main private interface
  def self.call(source:, filename: DEFAULT_VALUE, terminal: DEFAULT_VALUE, record_dir: DEFAULT_VALUE, timeout: TIMEOUT_DEFAULT, io:ruby/csv/core_ext/string.rb000064400000000314150403134260011757 0ustar00ir [Private]
  #
  # Used to generate a unique directory to record
  # search steps for debugging
  def self.record_dir(dir)
    time = Time.now.strftime("%Y-%m-%d-%H-%M-%s-%N")
    dir = Pathname(dir)
  ruby/csv/core_ext/array.rb000064400000000315150403134260011570 0ustar00de_lines) # => false
  def self.valid_without?(without_lines:, code_lines:)
    lines = code_lines - Array(without_lines).flatten

    if lines.empty?
      true
    else
      valid?(lines)
    end
  end
ruby/csv/writer.rb000064400000013570150403134260010165 0ustar00evaluating
  #
  #   SyntaxSuggest.valid?(
  #     [
  #       "def foo\n",
  #       "end\n"
  #     ]
  #   ) # => true
  #
  #   SyntaxSuggest.valid?(
  #     [
  #       "def foo\n",
  #       "  def bar\n", # Syntax error here
  #       "end\n"
  #     ]
  #   ) # => false
  #
  # As an FYI the CodeLine class instances respond to `to_s`
  # so passing a CodeLine in as an object or as an array
  # will convert it to it's code representation.
  def self.valid?(source)
    !invalid?(source)
  end
end

# Integration
require_relative "cli"

# Core logic
require_relative "code_search"
require_relative "code_frontier"
require_relative "explain_syntax"
require_relative "clean_document"

# Helpers
require_relative "lex_all"
require_relative "code_line"
require_relative "code_block"
require_relative "block_expand"
require_relative "mini_stringio"
require_relative "priority_queue"
require_relative "unvisited_lines"
require_relative "around_block_scan"
require_relative "priority_engulf_queue"
require_relative "pathname_from_message"
require_relative "display_invalid_blocks"
require_relative "parse_blocks_from_indent_line"
ruby/syntax_suggest/lex_value.rb000064400000002775150403134260013136 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Value object for accessing lex values
  #
  # This lex:
  #
  #   [1, 0], :on_ident, "describe", CMDARG
  #
  # Would translate into:
  #
  #  lex.line # => 1
  #  lex.type # => :on_indent
  #  lex.token # => "describe"
  class LexValue
    attr_reader :line, :type, :token, :state

    def initialize(line, type, token, state, last_lex = nil)
      @line = line
      @type = type
      @token = token
      @state = state

      set_kw_end(last_lex)
    end

    private def set_kw_end(last_lex)
      @is_end = false
      @is_kw = false
      return if type != :on_kw

      return if last_lex && last_lex.fname? # https://github.com/ruby/ruby/commit/776759e300e4659bb7468e2b97c8c2d4359a2953

      case token
      when "if", "unless", "while", "until"
        # Only count if/unless when it's not a "trailing" if/unless
        # https://github.com/ruby/ruby/blob/06b44f819eb7b5ede1ff69cecb25682b56a1d60c/lib/irb/ruby-lex.rb#L374-L375
        @is_kw = true unless expr_label?
      when "def", "case", "for", "begin", "class", "module", "do"
        @is_kw = true
      when "end"
        @is_end = true
      end
    end

    def fname?
      state.allbits?(Ripper::EXPR_FNAME)
    end

    def ignore_newline?
      type == :on_ignored_nl
    end

    def is_end?
      @is_end
    end

    def is_kw?
      @is_kw
    end

    def expr_beg?
      state.anybits?(Ripper::EXPR_BEG)
    end

    def expr_label?
      state.allbits?(Ripper::EXPR_LABEL)
    end
  end
end
ruby/syntax_suggest/unvisited_lines.rb000064400000001301150403134260014336 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Tracks which lines various code blocks have expanded to
  # and which are still unexplored
  class UnvisitedLines
    def initialize(code_lines:)
      @unvisited = code_lines.sort_by(&:indent_index)
      @visited_lines = {}
      @visited_lines.compare_by_identity
    end

    def empty?
      @unvisited.empty?
    end

    def peek
      @unvisited.last
    end

    def pop
      @unvisited.pop
    end

    def visit_block(block)
      block.lines.each do |line|
        next if @visited_lines[line]
        @visited_lines[line] = true
      end

      while @visited_lines[@unvisited.last]
        @unvisited.pop
      end
    end
  end
end
ruby/syntax_suggest/code_search.rb000064400000007501150403134260013401 0ustar00# frozen_string_literal: true

module SyntaxSuggest
  # Searches code for a syntax error
  #
  # There are three main phases in the algorithm:
  #
  # 1. Sanitize/format input source
  # 2. Search for invalid blocks
  # 3. Format invalid blocks into something meaninful
  #
  # This class handles the part.
  #
  # The bulk of the heavy lifting is done in:
  #
  #  - CodeFronruby/csv/delete_suffix.rb000064400000000566150403134260011500 0ustar00
    def initialize(source, record_dir: DEFAULT_VALUE)
      record_dir = if record_dir == DEFAULT_VALUE
        (ENV["SYNTAX_SUGGEST_RECORD_DIR"] || ENV["SYNTAX_SUGGEST_DEBUG"]) ? "tmp" : nil
      else
        record_dir
      end

      if record_dir
        @record_dir = SyntaxSuggest.record_dir(record_dir)
        @write_count = 0
      end

      @tick = 0
      @soruby/csv/parser.rb000064400000111310150403134260010134 0ustar00T_DEBUG"]
        puts "\n\n==== #{filename} ===="
        puts "\n```#{block.starts_at}..#{block.ends_at}"
        puts block
        puts "```"
        puts "  block indent:      #{block.current_indent}"
      end
      @record_dir.join(filename).open(mode: "a") do |f|
        document = DisplayCodeWithLineNumbers.new(
          lines: @code_lines.select(&:visible?),
          terminal: false,
          highlight_lines: block.lines
        ).call

        f.write("    Block lines: #{block.starts_at..block.ends_at} (#{name}) \n\n#{document}")
      end
    end

    def push(block, name:)
      record(block: block, name: name)

      block.mark_invisible if block.valid?
      frontier << block
    end

    # Parses the most indented lines into blocks that are marked
    # and added to the frontier
    def create_blocks_from_untracked_lines
      max_indent = frontier.next_indent_line&.indent

      while (line = frontier.next_indent_line) && (line.indent == max_indent)
        @parse_blocks_from_indent_line.each_neighbor_block(frontier.next_indent_line) do |block|
          push(block, name: "add")
        end
      end
    end

    # Given an already existing block in the frontier, expand it to see
    # if it contains our invalid syntax
    def expand_existing
      block = frontier.pop
      return unless block

      record(block: block, name: "before-expand")

      block = @block_expand.call(block)
      push(block, name: "expand")
    end

    # Main search loop
    def call
      until frontier.holds_all_syntax_errors?
        @tick += 1

        if frontier.expand?
          expand_existing
        else
          create_blocks_from_untracked_lines
        end
      end

      @invalid_blocks.concat(frontier.detect_invalid_blocks)
      @invalid_blocks.sort_by! { |block| block.starts_at }
      self
    end
  end
end
ruby/csv/version.rb000064400000000153150403134260010327 0ustar00       @addr
      end

      # Move addr to addess this pointer like an array
      def +(index)
        Iruby/csv/fields_converter.rb000064400000005072150403134260012204 0ustar00

          define_singleton_method(:size) do
            size
          end

          # Type-level []=: Used by struct fields
          define_singleton_method(:[]=) do |addr, value|
            Fiddle::Pointer.new(addr)[0, size] = [value].pack(pack)
          end
        end
      end
    end

    # -Fiddle::TYPE_CHAR Immediate with special handling of true/false
    class Bool < Immediate.define(-Fiddle::TYPE_CHAR)
      # Dereference
      def *
        return nil if @addr == 0
        super != 0
      end

      def self.[]=(addr, value)
        super(addr, value ? 1 : 0)
      end
    end

    class Pointer
      attr_reader :type

      # @param addr [Integer]
      # @param type [Class] RubyVM::MJIT::CType::*
      def initialize(addr, type)
        @addr = addr
        @type = type
      end

      # Move addr to addess this pointer like an array
      def +(index)
        raise ArgumentError unless index.is_a?(Integer)
        Pointer.new(@addr + index * Fiddle::SIZEOF_VOIDP, @type)
      end

      # Dereference
      def *
        return nil if dest_addr == 0
        @type.new(dest_addr)
      end

      # Array access
      def [](index)
        (self + index).*
      end

      # Array set
      # @param index [Integer]
      # @param value [Integer, RubyVM::MJIT::CPointer::Struct] an address itself or an object that return an address with to_i
      def []=(index, value)
        Fiddle::Pointer.new(@addr + index * Fiddle::SIZEOF_VOIDP)[0, Fiddle::SIZEOF_VOIDP] =
          [value.to_i].pack(Fiddle::PackInfo::PACK_MAP[Fiddle::TYPE_VOIDP])
      end

      private

      def dest_addr
        Fiddle::Pointer.new(@addr)[0, Fiddle::SIZEOF_VOIDP].unpack1(Fiddle::PackInfo::PACK_MAP[Fiddle::TYPE_VOIDP])
      end

      def self.define(block)
        Class.new(self) do
          define_method(:initialize) do |addr|
            superruby/ruby_vm/mjit/compiler.rb000064400000116651150403134300012315 0usruby/csv/row.rb000064400000060277150403134260007466 0ustar00name}"
      klass =
        if cache && self.const_defined?(class_name)
          self.const_get(class_name)
        else
          block.call
        end

      # Give it a name unless it's already defined
      unless self.const_defined?(class_name)
        self.const_set(class_name, klass)
      end

      klass
    end
  end
end
ruby/ruby_vm/mjit/compiler.rb000064400000116651150403134300012315 0ustar00# Available variables and macros in JIT-ed function:
#   ec: the first argument of _mjitXXX
#   reg_cfp: the second argument of _mjitXXX
#   GET_CFP(): refers to `reg_cfp`
#   GET_EP(): refers to `reg_cfp->ep`
#   GET_SP(): refers to `reg_cfp->sp`, or `(stack + stack_size)` if local_stack_p
#   GET_SELF(): refers to `cfp_self`
#   GET_LEP(): refers to `VM_EP_LEP(reg_cfp->ep)`
#   EXEC_EC_CFP(): refers to `val = vm_exec(ec, true)` with frame setup
#   CALL_METHOD(): using `GET_CFP()` and `EXEC_EC_CFP()`
#   TOPN(): refers to `reg_cfp->sp`, or `*(stack + (stack_size - num - 1))` if local_stack_p
#   STACK_ADDR_FROM_TOP(): refers to `reg_cfp->sp`, or `stack + (stack_size - num)` if local_stack_p
#   DISPATCH_ORIGINAL_INSN(): expanded in _mjit_compile_insn.erb
#   THROW_EXCEPTION(): specially defined for JIT
#   RESTORE_REGS(): specially defined for `leave`
class RubyVM::MJIT::Compiler # :nodoc: all
  C = RubyVM::MJIT.const_get(:C, false)
  INSNS = RubyVM::MJIT.const_get(:INSNS, false)
  UNSUPPORTED_INSNS = [
    :defineclass, # low priority
  ]

  def initialize = freeze

  # @param iseq [RubyVM::MJIT::CPointer::Struct]
  # @param funcname [String]
  # @param id [Integer]
  # @return [String,NilClass]
  def compile(iseq, funcname, id)
    status = C.compile_status.new # not freed for now
    status.compiled_iseq = iseq.body
    status.compiled_id = id
    init_compile_status(status, iseq.body, true) # not freed for now
    if iseq.body.ci_size > 0 && status.cc_entries_index == -1
      return nil
    end

    src = +''
    if !status.compile_info.disable_send_cache && !status.compile_info.disable_inlining
      unless precompile_inlinable_iseqs(src, iseq, status)
        return nil
      end
    end

    src << "VALUE\n#{funcname}(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)\n{\n"
    success = compile_body(src, iseq, status)
    src << "\n} // end of #{funcname}\n"

    return success ? src : nil
  rescue Exception => e # should we use rb_rescue in C instead?
    if C.mjit_opts.warnings || C.mjit_opts.verbose > 0
      $stderr.puts "MJIT error: #{e.full_message}"
    end
    return nil
  end

  private

  def compile_body(src, iseq, status)
    status.success = true
    status.local_stack_p = !iseq.body.catch_except_p

    if status.local_stack_p
      src << "    VALUE stack[#{iseq.body.stack_max}];\n"
    else
      src << "    VALUE *stack = reg_cfp->sp;\n"
    end

    unless status.inlined_iseqs.nil? # i.e. compile root
      src << "    static const rb_iseq_t *original_iseq = (const rb_iseq_t *)#{iseq};\n"
    end
    src << "    static const VALUE *const original_body_iseq = (VALUE *)#{iseq.body.iseq_encoded};\n"

    src << "    VALUE cfp_self = reg_cfp->self;\n" # cache self across the method
    src << "#undef GET_SELF\n"
    src << "#define GET_SELF() cfp_self\n"

    # Generate merged ivar guards first if needed
    if !status.compile_info.disable_ivar_cache && using_ivar?(iseq.body)
      src << "    if (UNLIKELY(!RB_TYPE_P(GET_SELF(), T_OBJECT))) {"
      src << "        goto ivar_cancel;\n"
      src << "    }\n"
    end

    # Simulate `opt_pc` in setup_parameters_complex. Other PCs which may be passed by catch tables
    # are not considered since vm_exec doesn't call jit_exec for catch tables.
    if iseq.body.param.flags.has_opt
      src << "\n"
      src << "    switch (reg_cfp->pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded) {\n"
      (0..iseq.body.param.opt_num).each do |i|
        pc_offset = iseq.body.param.opt_table[i]
        src << "      case #{pc_offset}:\n"
        src << "        goto label_#{pc_offset};\n"
      end
      src << "    }\n"
    end

    compile_insns(0, 0, status, iseq.body, src)
    compile_cancel_handler(src, iseq.body, status)
    src << "#undef GET_SELF\n"
    return status.success
  end

  # Compile one conditional branch. If it has branchXXX insn, this should be
  # called multiple times for each branch.
  def compile_insns(stack_size, pos, status, body, src)
    branch = C.compile_branch.new # not freed for now
    branch.stack_size = stack_size
    branch.finish_p = false

    while pos < body.iseq_size && !already_compiled?(status, pos) && !branch.finish_p
      insn = INSNS.fetch(C.rb_vm_insn_decode(body.iseq_encoded[pos]))
      status.stack_size_for_pos[pos] = branch.stack_size

      src << "\nlabel_#{pos}: /* #{insn.name} */\n"
      pos = compile_insn(insn, pos, status, body.iseq_encoded + (pos+1), body, branch, src)
      if status.success && branch.stack_size > body.stack_max
        if mjit_opts.warnings || mjit_opts.verbose > 0
          $stderr.puts "MJIT warning: JIT stack size (#{branch.stack_size}) exceeded its max size (#{body.stack_max})"
        end
        status.success = false
      end
      break unless status.success
    end
  end

  # Main function of JIT compilation, vm_exec_core counterpart for JIT. Compile one insn to `f`, may modify
  # b->stack_size and return next position.
  #
  # When you add a new instruction to insns.def, it would be nice to have JIT compilation support here but
  # it's optional. This JIT compiler just ignores ISeq which includes unknown instruction, and ISeq which
  # does not have it can be compiled as usual.
  def compile_insn(insn, pos, status, operands, body, b, src)
    sp_inc = C.mjit_call_attribute_sp_inc(insn.bin, operands)
    next_pos = pos + insn.len

    result = compile_insn_entry(insn, b.stack_size, sp_inc, status.local_stack_p, pos, next_pos, insn.len,
                                status.inlined_iseqs.nil?, status, operands, body)
    if result.nil?
      if C.mjit_opts.warnings || C.mjit_opts.verbose > 0
        $stderr.puts "MJIT warning: Skipped to compile unsupported instruction: #{insn.name}"
      end
      status.success = false
    else
      result_src, next_pos, finish_p, compile_insns_p = result

      src << result_src
      b.stack_size += sp_inc

      if finish_p
        b.finish_p = true
      end
      if compile_insns_p
        if already_compiled?(status, pos + insn.len)
          src << "goto label_#{pos + insn.len};\n"
        else
          compile_insns(b.stack_size, pos + insn.len, status, body, src)
        end
      end
    end

    # If next_pos is already compiled and this branch is not finished yet,
    # next instruction won't be compiled in C code next and will need `goto`.
    if !b.finish_p && next_pos < body.iseq_size && already_compiled?(status, next_pos)
      src << "goto label_#{next_pos};\n"

      # Verify stack size assumption is the same among multiple branches
      if status.stack_size_for_pos[next_pos] != b.stack_size
        if mjit_opts.warnings || mjit_opts.verbose > 0
          $stderr.puts "MJIT warning: JIT stack assumption is not the same between branches (#{status.stack_size_for_pos[next_pos]} != #{b.stack_size})\n"
        end
        status.success = false
      end
    end

    return next_pos
  end

  def compile_insn_entry(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, insn_len, inlined_iseq_p, status, operands, body)
    finish_p = false
    compile_insns = false

    # TODO: define this outside this method, or at least cache it
    opt_send_without_block = INSNS.values.find { |i| i.name == :opt_send_without_block }
    if opt_send_without_block.nil?
      raise 'opt_send_without_block not found'
    end
    send_compatible_opt_insns = INSNS.values.select do |insn|
      insn.name.start_with?('opt_') && opt_send_without_block.opes == insn.opes &&
        insn.expr.lines.any? { |l| l.match(/\A\s+CALL_SIMPLE_METHOD\(\);\s+\z/) }
    end.map(&:name)

    case insn.name
    when *UNSUPPORTED_INSNS
      return nil
    when :opt_send_without_block, :send
      if src = compile_send(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, status, operands, body)
        return src, next_pos, finish_p, compile_insns
      end
    when *send_compatible_opt_insns
      if C.has_cache_for_send(captured_cc_entries(status)[call_data_index(C.CALL_DATA.new(operands[0]), body)], insn.bin) &&
          src = compile_send(opt_send_without_block, stack_size, sp_inc, local_stack_p, pos, next_pos, status, operands, body)
        return src, next_pos, finish_p, compile_insns
      end
    when :getinstancevariable, :setinstancevariable
      if src = compile_ivar(insn.name, stack_size, pos, status, operands, body)
        return src, next_pos, finish_p, compile_insns
      end
    when :opt_getconstant_path
      if src = compile_getconstant_path(stack_size, pos, insn_len, operands, status)
        return src, next_pos, finish_p, compile_insns
      end
    when :invokebuiltin, :opt_invokebuiltin_delegate, :opt_invokebuiltin_delegate_leave
      if src = compile_invokebuiltin(insn, stack_size, sp_inc, body, operands)
        if insn.name == :opt_invokebuiltin_delegate_leave
          src << compile_leave(stack_size, pos, inlined_iseq_p)
          finish_p = true
        end
        return src, next_pos, finish_p, compile_insns
      end
    when :leave
      if stack_size != 1
        raise "Unexpected JIT stack_size on leave: #{stack_size}"
      end
      src = compile_leave(stack_size, pos, inlined_iseq_p)
      finish_p = true
      return src, next_pos, finish_p, compile_insns
    end

    return compile_insn_default(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, insn_len, inlined_iseq_p, operands)
  end

  # Optimized case of send / opt_send_without_block instructions.
  def compile_send(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, status, operands, body)
    # compiler: Use captured cc to avoid race condition
    cd = C.CALL_DATA.new(operands[0])
    cd_index = call_data_index(cd, body)
    captured_cc = captured_cc_entries(status)[cd_index]

    # compiler: Inline send insn where some supported fastpath is used.
    ci = cd.ci
    kw_splat = (C.vm_ci_flag(ci) & C.VM_CALL_KW_SPLAT) > 0
    if !status.compile_info.disable_send_cache && has_valid_method_type?(captured_cc) && (
        # `CC_SET_FASTPATH(cd->cc, vm_call_cfunc_with_frame, ...)` in `vm_call_cfunc`
        (vm_cc_cme(captured_cc).def.type == C.VM_METHOD_TYPE_CFUNC && !C.rb_splat_or_kwargs_p(ci) && !kw_splat) ||
        # `CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(...), vm_call_iseq_optimizable_p(...))` in `vm_callee_setup_arg`,
        # and support only non-VM_CALL_TAILCALL path inside it
        (vm_cc_cme(captured_cc).def.type == C.VM_METHOD_TYPE_ISEQ &&
         C.fastpath_applied_iseq_p(ci, captured_cc, iseq = def_iseq_ptr(vm_cc_cme(captured_cc).def)) &&
         (C.vm_ci_flag(ci) & C.VM_CALL_TAILCALL) == 0)
    )
      src = +"{\n"

      # JIT: Invalidate call cache if it requires vm_search_method. This allows to inline some of following things.
      src << "    const struct rb_callcache *cc = (struct rb_callcache *)#{captured_cc};\n"
      src << "    const rb_callable_method_entry_t *cc_cme = (rb_callable_method_entry_t *)#{vm_cc_cme(captured_cc)};\n"
      src << "    const VALUE recv = stack[#{stack_size + sp_inc - 1}];\n"
      # If opt_class_of is true, use RBASIC_CLASS instead of CLASS_OF to reduce code size
      opt_class_of = !maybe_special_const?(captured_cc.klass)
      src << "    if (UNLIKELY(#{opt_class_of ? 'RB_SPECIAL_CONST_P(recv)' : 'false'} || !vm_cc_valid_p(cc, cc_cme, #{opt_class_of ? 'RBASIC_CLASS' : 'CLASS_OF'}(recv)))) {\n"
      src << "        reg_cfp->pc = original_body_iseq + #{pos};\n"
      src << "        reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
      src << "        goto send_cancel;\n"
      src << "    }\n"

      # JIT: move sp and pc if necessary
      pc_moved_p = compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)

      # JIT: If ISeq is inlinable, call the inlined method without pushing a frame.
      if iseq && status.inlined_iseqs && iseq.body.to_i == status.inlined_iseqs[pos]&.to_i
        src << "    {\n"
        src << "        VALUE orig_self = reg_cfp->self;\n"
        src << "        reg_cfp->self = stack[#{stack_size + sp_inc - 1}];\n"
        src << "        stack[#{stack_size + sp_inc - 1}] = _mjit#{status.compiled_id}_inlined_#{pos}(ec, reg_cfp, orig_self, original_iseq);\n"
        src << "        reg_cfp->self = orig_self;\n"
        src << "    }\n"
      else
        # JIT: Forked `vm_sendish` (except method_explorer = vm_search_method_wrap) to inline various things
        src << "    {\n"
        src << "        VALUE val;\n"
        src << "        struct rb_calling_info calling;\n"
        if insn.name == :send
          src << "        calling.block_handler = vm_caller_setup_arg_block(ec, reg_cfp, (const struct rb_callinfo *)#{ci}, (rb_iseq_t *)0x#{operands[1].to_s(16)}, FALSE);\n"
        else
          src << "        calling.block_handler = VM_BLOCK_HANDLER_NONE;\n"
        end
        src << "        calling.kw_splat = #{kw_splat ? 1 : 0};\n"
        src << "        calling.recv = stack[#{stack_size + sp_inc - 1}];\n"
        src << "        calling.argc = #{C.vm_ci_argc(ci)};\n"

        if vm_cc_cme(captured_cc).def.type == C.VM_METHOD_TYPE_CFUNC
          # TODO: optimize this more
          src << "        calling.ci = (const struct rb_callinfo *)#{ci};\n" # creating local cd here because operand's cd->cc may not be the same as inlined cc.
          src << "        calling.cc = cc;"
          src << "        val = vm_call_cfunc_with_frame(ec, reg_cfp, &calling);\n"
        else # :iseq
          # fastpath_applied_iseq_p checks rb_simple_iseq_p, which ensures has_opt == FALSE
          src << "        vm_call_iseq_setup_normal(ec, reg_cfp, &calling, cc_cme, 0, #{iseq.body.param.size}, #{iseq.body.local_table_size});\n"
          if iseq.body.catch_except_p
            src << "        VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n"
            src << "        val = vm_exec(ec, true);\n"
          else
            src << "        if ((val = jit_exec(ec)) == Qundef) {\n"
            src << "            VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n" # This is vm_call0_body's code after vm_call_iseq_setup
            src << "            val = vm_exec(ec, false);\n"
            src << "        }\n"
          end
        end
        src << "        stack[#{stack_size + sp_inc - 1}] = val;\n"
        src << "    }\n"

        # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
        src << "    if (UNLIKELY(!mjit_call_p)) {\n"
        src << "        reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size + sp_inc};\n"
        if !pc_moved_p
          src << "        reg_cfp->pc = original_body_iseq + #{next_pos};\n"
        end
        src << "        goto cancel;\n"
        src << "    }\n"
      end

      src << "}\n"
      return src
    else
      return nil
    end
  end

  def compile_ivar(insn_name, stack_size, pos, status, operands, body)
    iv_cache = C.iseq_inline_storage_entry.new(operands[1]).iv_cache
    dest_shape_id = iv_cache.value >> C.SHAPE_FLAG_SHIFT
    source_shape_id = parent_shape_id(dest_shape_id)
    attr_index = iv_cache.value & ((1 << C.SHAPE_FLAG_SHIFT) - 1)

    src = +''
    if !status.compile_info.disable_ivar_cache && source_shape_id != C.INVALID_SHAPE_ID
      # JIT: optimize away motion of sp and pc. This path does not call rb_warning() and so it's always leaf and not `handles_sp`.
      # compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)

      # JIT: prepare vm_getivar/vm_setivar arguments and variables
      src << "{\n"
      src << "    VALUE obj = GET_SELF();\n" # T_OBJECT guaranteed by compile_body
      # JIT: cache hit path of vm_getivar/vm_setivar, or cancel JIT (recompile it with exivar)
      if insn_name == :setinstancevariable
        src << "    const uint32_t index = #{attr_index - 1};\n"
        src << "    const shape_id_t dest_shape_id = (shape_id_t)#{dest_shape_id};\n"
        src << "    if (dest_shape_id == ROBJECT_SHAPE_ID(obj)) {\n"
        src << "        VALUE *ptr = ROBJECT_IVPTR(obj);\n"
        src << "        RB_OBJ_WRITE(obj, &ptr[index], stack[#{stack_size - 1}]);\n"
        src << "    }\n"
      else
        src << "    const shape_id_t source_shape_id = (shape_id_t)#{dest_shape_id};\n"
        if attr_index == 0 # cache hit, but uninitialized iv
          src << "    /* Uninitialized instance variable */\n"
          src << "    if (source_shape_id == ROBJECT_SHAPE_ID(obj)) {\n"
          src << "        stack[#{stack_size}] = Qnil;\n"
          src << "    }\n"
        else
          src << "    const uint32_t index = #{attr_index - 1};\n"
          src << "    if (source_shape_id == ROBJECT_SHAPE_ID(obj)) {\n"
          src << "        stack[#{stack_size}] = ROBJECT_IVPTR(obj)[index];\n"
          src << "    }\n"
        end
      end
      src << "    else {\n"
      src << "        reg_cfp->pc = original_body_iseq + #{pos};\n"
      src << "        reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
      src << "        goto ivar_cancel;\n"
      src << "    }\n"
      src << "}\n"
      return src
    elsif insn_name == :getinstancevariable && !status.compile_info.disable_exivar_cache && source_shape_id != C.INVALID_SHAPE_ID
      # JIT: optimize away motion of sp and pc. This path does not call rb_warning() and so it's always leaf and not `handles_sp`.
      # compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)

      # JIT: prepare vm_getivar's arguments and variables
      src << "{\n"
      src << "    VALUE obj = GET_SELF();\n"
      src << "    const shape_id_t source_shape_id = (shape_id_t)#{dest_shape_id};\n"
      src << "    const uint32_t index = #{attr_index - 1};\n"
      # JIT: cache hit path of vm_getivar, or cancel JIT (recompile it without any ivar optimization)
      src << "    struct gen_ivtbl *ivtbl;\n"
      src << "    if (LIKELY(FL_TEST_RAW(GET_SELF(), FL_EXIVAR) && source_shape_id == rb_shape_get_shape_id(obj) && rb_ivar_generic_ivtbl_lookup(obj, &ivtbl))) {\n"
      src << "        stack[#{stack_size}] = ivtbl->ivptr[index];\n"
      src << "    }\n"
      src << "    else {\n"
      src << "        reg_cfp->pc = original_body_iseq + #{pos};\n"
      src << "        reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
      src << "        goto exivar_cancel;\n"
      src << "    }\n"
      src << "}\n"
      return src
    else
      return nil
    end
  end

  def compile_invokebuiltin(insn, stack_size, sp_inc, body, operands)
    bf = C.RB_BUILTIN.new(operands[0])
    if bf.compiler > 0
      index = (insn.name == :invokebuiltin ? -1 : operands[1])
      src = +"{\n"
      src << "    VALUE val;\n"
      C.builtin_compiler(src, bf, index, stack_size, body.builtin_inline_p)
      src << "    stack[#{stack_size + sp_inc - 1}] = val;\n"
      src << "}\n"
      return src
    else
      return nil
    end
  end

  def compile_leave(stack_size, pos, inlined_iseq_p)
    src = +''
    # Skip vm_pop_frame for inlined call
    unless inlined_iseq_p
      # Cancel on interrupts to make leave insn leaf
      src << "    if (UNLIKELY(RUBY_VM_INTERRUPTED_ANY(ec))) {\n"
      src << "        reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
      src << "        reg_cfp->pc = original_body_iseq + #{pos};\n"
      src << "        rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);\n"
      src << "    }\n"
      src << "    ec->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(reg_cfp);\n" # vm_pop_frame
    end
    src << "    return stack[0];\n"
  end

  def compile_getconstant_path(stack_size, pos, insn_len, operands, status)
    ice = C.IC.new(operands[0]).entry
    if !status.compile_info.disable_const_cache && ice
      # JIT: Inline everything in IC, and cancel the slow path
      src = +"    if (vm_inlined_ic_hit_p(#{ice.flags}, #{ice.value}, (const rb_cref_t *)#{to_addr(ice.ic_cref)}, reg_cfp->ep)) {\n"
      src << "        stack[#{stack_size}] = #{ice.value};\n"
      src << "    }\n"
      src << "    else {\n"
      src << "        reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
      src << "        reg_cfp->pc = original_body_iseq + #{pos};\n"
      src << "        goto const_cancel;\n"
      src << "    }\n"
      return src
    else
      return nil
    end
  end

  def compile_insn_default(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, insn_len, inlined_iseq_p, operands)
    src = +''
    finish_p = false
    compile_insns = false

    # JIT: Declare stack_size to be used in some macro of _mjit_compile_insn_body.erb
    src << "{\n"
    if local_stack_p
      src << "    MAYBE_UNUSED(unsigned int) stack_size = #{stack_size};\n"
    end

    # JIT: Declare variables for operands, popped values and return values
    insn.declarations.each do |decl|
      src << "    #{decl};\n"
    end

    # JIT: Set const expressions for `RubyVM::OperandsUnifications` insn
    insn.preamble.each do |amble|
      src << "#{amble.sub(/const \S+\s+/, '')}\n"
    end

    # JIT: Initialize operands
    insn.opes.each_with_index do |ope, i|
      src << "    #{ope.fetch(:name)} = (#{ope.fetch(:type)})#{operands[i]};\n"
      # TODO: resurrect comment_id
    end

    # JIT: Initialize popped values
    insn.pops.reverse_each.with_index.reverse_each do |pop, i|
      src << "    #{pop.fetch(:name)} = stack[#{stack_size - (i + 1)}];\n"
    end

    # JIT: move sp and pc if necessary
    pc_moved_p = compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)

    # JIT: Print insn body in insns.def
    next_pos = compile_insn_body(src, insn, pos, next_pos, insn_len, local_stack_p, stack_size, sp_inc, operands)

    # JIT: Set return values
    insn.rets.reverse_each.with_index do |ret, i|
      # TOPN(n) = ...
      src << "    stack[#{stack_size + sp_inc - (i + 1)}] = #{ret.fetch(:name)};\n"
    end

    # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
    #      leaf insn may not cancel JIT. leaf_without_check_ints is covered in RUBY_VM_CHECK_INTS of _mjit_compile_insn_body.erb.
    unless insn.always_leaf? || insn.leaf_without_check_ints?
      src << "    if (UNLIKELY(!mjit_call_p)) {\n"
      src << "        reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size + sp_inc};\n"
      if !pc_moved_p
        src << "        reg_cfp->pc = original_body_iseq + #{next_pos};\n"
      end
      src << "        goto cancel;\n"
      src << "    }\n"
    end

    src << "}\n"

    # compiler: If insn has conditional JUMP, the code should go to the branch not targeted by JUMP next.
    if insn.expr.match?(/if\s+\([^{}]+\)\s+\{[^{}]+JUMP\([^)]+\);[^{}]+\}/)
      compile_insns = true
    end

    # compiler: If insn returns (leave) or does longjmp (throw), the branch should no longer be compiled. TODO: create attr for it?
    if insn.expr.match?(/\sTHROW_EXCEPTION\([^)]+\);/) || insn.expr.match?(/\bvm_pop_frame\(/)
      finish_p = true
    end

    return src, next_pos, finish_p, compile_insns
  end

  def compile_insn_body(src, insn, pos, next_pos, insn_len, local_stack_p, stack_size, sp_inc, operands)
    # Print a body of insn, but with macro expansion.
    expand_simple_macros(insn.expr).each_line do |line|
      # Expand dynamic macro here
      # TODO: support combination of following macros in the same line
      case line
      when /\A\s+RUBY_VM_CHECK_INTS\(ec\);\s+\z/
        if insn.leaf_without_check_ints? # lazily move PC and optionalize mjit_call_ruby/csv/table.rb000064400000112420150403134260007732 0ustar00         hash_offsets = C.rb_hash_values(operands[0]).uniq
          else_offset = cast_offset(operands[1])
          base_pos = pos + insn_len

          src << "    switch (#{dest}) {\n"
          hash_offsets.each do |offset|
            src << "      case #{offset}:\n"
            src << "        goto label_#{base_pos + offset};\n"
          end
          src << "      case #{else_offset}:\n"
          src << "        goto label_#{base_pos + else_offset};\n"
          src << "    }\n"
        else
          # Before we `goto` next insn, we need to set return values, especially for getinlinecache
          insn.rets.reverse_each.with_index do |ret, i|
            # TOPN(n) = ...
            src << "            stack[#{stack_size + sp_inc - (i + 1)}] = #{ret.fetch(:name)};\n"
          end

          next_pos = pos + insn_len + cast_offset(operands[0]) # workaround: assuming dest == operands[0]. TODO: avoid relying on it
          src << "            goto label_#{next_pos};\n"
        end
      when /\A\s+CALL_SIMPLE_METHOD\(\);\s+\z/
        # For `opt_xxx`'s fallbacks.
        if local_stack_p
          src << "            reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
        end
        src << "            reg_cfp->pc = original_body_iseq + #{pos};\n"
        src << "            goto cancel;\n"
      when /\A(?<prefix>.+\b)INSN_LABEL\((?<name>[^)]+)\)(?<suffix>.+)\z/m
        prefix, name, suffix = Regexp.last_match[:prefix], Regexp.last_match[:name], Regexp.last_match[:suffix]
        src << "#{prefix}INSN_LABEL(#{name}_#{pos})#{suffix}"
      else
        if insn.handles_sp?
          # If insn.handles_sp? is true, cfp->sp might be changed inside insns (like vm_caller_setup_arg_block)
          # and thus we need to use cfp->sp, even when local_stack_p is TRUE. When insn.handles_sp? is true,
          # cfp->sp should be available too because _mjit_compile_pc_and_sp.erb sets it.
          src << to_cstr(line)
        else
          # If local_stack_p is TRUE and insn.handles_sp? is false, stack values are only available in local variables
          # for stack. So we need to replace those macros if local_stack_p is TRUE here.
          case line
          when /\bGET_SP\(\)/
            # reg_cfp->sp
            src << to_cstr(line.sub(/\bGET_SP\(\)/, local_stack_p ? '(stack + stack_size)' : 'GET_SP()'))
          when /\bSTACK_ADDR_FROM_TOP\((?<num>[^)]+)\)/
            # #define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
            num = Regexp.last_match[:num]
            src << to_cstr(line.sub(/\bSTACK_ADDR_FROM_TOP\(([^)]+)\)/, local_stack_p ? "(stack + (stack_size - (#{num})))" : "STACK_ADDR_FROM_TOP(#{num})"))
          when /\bTOPN\((?<num>[^)]+)\)/
            # #define TOPN(n) (*(GET_SP()-(n)-1))
            num = Regexp.last_match[:num]
            src << to_cstr(line.sub(/\bTOPN\(([^)]+)\)/, local_stack_p ? "*(stack + (stack_size - (#{num}) - 1))" : "TOPN(#{num})"))
          else
            src << to_cstr(line)
          end
        end
      end
    end
    return next_pos
  end

  def compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)
    # JIT: When an insn is leaf, we don't need to Move pc for a catch table on catch_except_p, #caller_locations,
    #      and rb_profile_frames. For check_ints, we lazily move PC when we have interruptions.
    pc_moved_p = false
    unless insn.always_leaf? || insn.leaf_without_check_ints?
      src << "    reg_cfp->pc = original_body_iseq + #{next_pos};\n" # ADD_PC(INSN_ATTR(width));
      pc_moved_p = true
    end

    # JIT: move sp to use or preserve stack variables
    if local_stack_p
      # sp motion is optimized away for `handles_sp? #=> false` case.
      # Thus sp should be set properly before `goto cancel`.
      if insn.handles_sp?
        # JIT-only behavior (pushing JIT's local variables to VM's stack):
        push_size = -sp_inc + insn.rets.size - insn.pops.size
        src << "    reg_cfp->sp = vm_base_ptr(reg_cfp) + #{push_size};\n"
        push_size.times do |i|
          src << "    *(reg_cfp->sp + #{i - push_size}) = stack[#{stack_size - push_size + i}];\n"
        end
      end
    else
      if insn.handles_sp?
        src << "    reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size - insn.pops.size};\n" # POPN(INSN_ATTR(popn));
      else
        src << "    reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
      end
    end
    return pc_moved_p
  end

  # Print the block to cancel inlined method call. It's supporting only `opt_send_without_block` for now.
  def compile_inlined_cancel_handler(src, body, inline_context)
    src << "\ncancel:\n"
    src << "    rb_mjit_recompile_inlining(original_iseq);\n"

    # Swap pc/sp set on cancel with original pc/sp.
    src << "    const VALUE *current_pc = reg_cfp-ruby/pp.rb000064400000042343150403134260006475 0ustar00 "    reg_cfp = ec->cfp;\n" # work on the new frame
    src << "    reg_cfp->pc = current_pc;\n"
    src << "    reg_cfp->sp = current_sp;\n"
    (0...body.stack_max).each do |i| # should be always `status->local_stack_p`
      src << "    *(vm_base_ptr(reg_cfp) + #{i}) = stack[#{i}];\n"
    end
    # We're not just returning Qundef here so that caller's normal cancel handler can
    # push back `stack` to `cfp->sp`.
    src << "    return vm_exec(ec, false);\n"
  end

  # Print the block to cancel JIT execution.
  def compile_cancel_handler(src, body, status)
    if status.inlined_iseqs.nil? # the current ISeq is being inlined
      compile_inlined_cancel_handler(src, body, status.inline_context)
      return
    end

    src << "\nsend_cancel:\n"
    src << "    rb_mjit_recompile_send(original_iseq);\n"
    src << "    goto cancel;\n"

    src << "\nivar_cancel:\n"
    src << "    rb_mjit_recompile_ivar(original_iseq);\n"
    src << "    goto cancel;\n"

    src << "\nexivar_cancel:\n"
    src << "    rb_mjit_recompile_exivar(original_iseq);\n"
    src << "    goto cancel;\n"

    src << "\nconst_cancel:\n"
    src << "    rb_mjit_recompile_const(original_iseq);\n"
    src << "    goto cancel;\n"

    src << "\ncancel:\n"
    if status.local_stack_p
      (0...body.stack_max).each do |i|
        src << "    *(vm_base_ptr(reg_cfp) + #{i}) = stack[#{i}];\n"
      end
    end
    src << "    return Qundef;\n"
  end

  def precompile_inlinable_child_iseq(src, child_iseq, status, ci, cc, pos)
    child_status = C.compile_status.new # not freed for now
    child_status.compiled_iseq = status.compiled_iseq
    child_status.compiled_id = status.compiled_id
    init_compile_status(child_status, child_iseq.body, false) # not freed for now
    child_status.inline_context.orig_argc = C.vm_ci_argc(ci)
    child_status.inline_context.me = vm_cc_cme(cc).to_i
    child_status.inline_context.param_size = child_iseq.body.param.size
    child_status.inline_context.local_size = child_iseq.body.local_table_size
    if child_iseq.body.ci_size > 0 && child_status.cc_entries_index == -1
      return false
    end

    src << "ALWAYS_INLINE(static VALUE _mjit#{status.compiled_id}_inlined_#{pos}(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE orig_self, const rb_iseq_t *original_iseq));\n"
    src << "static inline VALUE\n_mjit#{status.compiled_id}_inlined_#{pos}(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE orig_self, const rb_iseq_t *original_iseq)\n{\n"
    src << "    const VALUE *orig_pc = reg_cfp->pc;\n"
    src << "    VALUE *orig_sp = reg_cfp->sp;\n"

    success = compile_body(src, child_iseq, child_status)

    src << "\n} /* end of _mjit#{status.compiled_id}_inlined_#{pos} */\n\n"

    return success;
  end

  def precompile_inlinable_iseqs(src, iseq, status)
    body = iseq.body
    pos = 0
    while pos < body.iseq_size
      insn = INSNS.fetch(C.rb_vm_insn_decode(body.iseq_encoded[pos]))
      if insn.name == :opt_send_without_block || insn.name == :opt_size # `compile_inlined_cancel_handler` supports only `opt_send_without_block`
        cd = C.CALL_DATA.new(body.iseq_encoded[pos + 1])
        ci = cd.ci
        cc = captured_cc_entries(status)[call_data_index(cd, body)] # use copy to avoid race condition

        if (child_iseq = rb_mjit_inlinable_iseq(ci, cc)) != nil
          status.inlined_iseqs[pos] = child_iseq.body

          if C.mjit_opts.verbose >= 1 # print beforehand because ISeq may be GCed during copy job.
            child_location = child_iseq.body.location
            $stderr.puts "JIT inline: #{child_location.label}@#{C.rb_iseq_path(child_iseq)}:#{C.rb_iseq_first_lineno(child_iseq)} " \
              "=> #{iseq.body.location.label}@#{C.rb_iseq_path(iseq)}:#{C.rb_iseq_first_lineno(iseq)}"
          end
          if !precompile_inlinable_child_iseq(src, child_iseq, status, ci, cc, pos)
            return false
          end
        end
      end
      pos += insn.len
    end
    return true
  end

  def init_compile_status(status, body, compile_root_p)
    status.stack_size_for_pos = Fiddle.malloc(Fiddle::SIZEOF_INT * body.iseq_size)
    body.iseq_size.times do |i|
      status.stack_size_for_pos[i] = C.NOT_COMPILED_STACK_SIZE
    end
    if compile_root_p
      status.inlined_iseqs = Fiddle.malloc(Fiddle::SIZEOF_VOIDP * body.iseq_size)
      body.iseq_size.times do |i|
        status.inlined_iseqs[i] = nil
      end
    end
    if body.ci_size > 0
      status.cc_entries_index = C.mjit_capture_cc_entries(status.compiled_iseq, body)
    else
      status.cc_entries_index = -1
    end
    if compile_root_p
      status.compile_info = rb_mjit_iseq_compile_info(body)
    else
      status.compile_info = Fiddle.malloc(C.rb_mjit_compile_info.sizeof)
      status.compile_info.disable_ivar_cache = false
      status.compile_info.disable_exivar_cache = false
      status.compile_info.disable_send_cache = false
      status.compile_info.disable_inlining = false
      status.compile_info.disable_const_cache = false
    end
  end

  def using_ivar?(body)
    pos = 0
    while pos < body.iseq_size
      insn = INSNS.fetch(C.rb_vm_insn_decode(body.iseq_encoded[pos]))
      case insn.name
      when :getinstancevariable, :setinstancevariable
        return true
      end
      pos += insn.len
    end
    return false
  end

  # Expand simple macro that doesn't require dynamic C code.
  def expand_simple_macros(arg_expr)
    arg_expr.dup.tap do |expr|
      # For `leave`. We can't proceed next ISeq in the same JIT function.
      expr.gsub!(/^(?<indent>\s*)RESTORE_REGS\(\);\n/) do
        indent = Regexp.last_match[:indent]
        <<-end.gsub(/^ {12}/, '')
          #if OPT_CALL_THREADED_CODE
          #{indent}rb_ec_thread_ptr(ec)->retval = val;
          #{indent}return 0;
          #else
          #{indent}return val;
          #endif
        end
      end
      expr.gsub!(/^(?<indent>\s*)NEXT_INSN\(\);\n/) do
        indent = Regexp.last_match[:indent]
        <<-end.gsub(/^ {12}/, '')
          #{indent}UNREACHABLE_RETURN(Qundef);
        end
      end
    end
  end

  def to_cstr(expr)
    expr.gsub(/^(?!#)/, '    ') # indent everything but preprocessor lines
  end

  # Interpret unsigned long as signed long (VALUE -> OFFSET)
  def cast_offset(offset)
    if offset >= 1 << 8 * Fiddle::SIZEOF_VOIDP - 1 # negative
      offset -= 1 << 8 * Fiddle::SIZEOF_VOIDP
    end
    offset
  end

  def captured_cc_entries(status)
    status.compiled_iseq.mjit_unit.cc_entries + status.cc_entries_index
  end

  def call_data_index(cd, body)
    cd - body.call_data
  end

  def vm_cc_cme(cc)
    # TODO: add VM_ASSERT like actual vm_cc_cme
    cc.cme_
  end

  def def_iseq_ptr(method_def)
    C.rb_iseq_check(method_def.body.iseq.iseqptr)
  end

  def rb_mjit_iseq_compile_info(body)
    body.mjit_unit.compile_info
  end

  def ISEQ_IS_SIZE(body)
    body.ic_size + body.ivc_size + body.ise_size + body.icvarc_size
  end

  # Return true if an object of the class may be a special const (immediate).
  # It's "maybe" because Integer and Float are not guaranteed to be an immediate.
  # If this returns false, rb_class_of could be optimzied to RBASIC_CLASS.
  def maybe_special_const?(klass)
    [
      C.rb_cFalseClass,
      C.rb_cNilClass,
      C.rb_cTrueClass,
      C.rb_cInteger,
      C.rb_cSymbol,
      C.rb_cFloat,
    ].include?(klass)
  end

  def has_valid_method_type?(cc)
    vm_cc_cme(cc) != nil
  end

  def already_compiled?(status, pos)
    status.stack_size_for_pos[pos] != C.NOT_COMPILED_STACK_SIZE
  end

  # Return an iseq pointer if cc has inlinable iseq.
  def rb_mjit_inlinable_iseq(ci, cc)
    if has_valid_method_type?(cc) &&
        C.vm_ci_flag(ci) & C.VM_CALL_TAILCALL == 0 && # inlining only non-tailcall path
        vm_cc_cme(cc).def.type == C.VM_METHOD_TYPE_ISEQ &&
        C.fastpath_applied_iseq_p(ci, cc, iseq = def_iseq_ptr(vm_cc_cme(cc).def)) &&
        inlinable_iseq_p(iseq.body) # CC_SET_FASTPATH in vm_callee_setup_arg
      return iseq
    end
    return nil
  end

  # Return true if the ISeq can be inlined without pushing a new control frame.
  def inlinable_iseq_p(body)
    # 1) If catch_except_p, caller frame should be preserved when callee catches an exception.
    # Then we need to wrap `vm_exec()` but then we can't inline the call inside it.
    #
    # 2) If `body->catch_except_p` is false and `handles_ruby/ruby_vm/mjit/c_type.rb000064400000004766150403134300011771 0ustar00c`
      #   * Do not read any `cfp->pc`
      if insn.name == :invokebuiltin || insn.name == :opt_invokebuiltin_delegate || insn.name == :opt_invokebuiltin_delegate_leave
        # builtin insn's inlinability is handled by `Primitive.attr! 'inline'` per iseq
        if !body.builtin_inline_p
          return false;
        end
      elsif insn.name != :leave && C.insn_may_depend_on_sp_or_pc(insn.bin, body.iseq_encoded + (pos + 1))
        return false
      end
      # At this moment, `cfp->ep` in an inlined method is not working.
      case insn.name
      when :getlocal,
           :getlocal_WC_0,
           :getlocal_WC_1,
           :setlocal,
           :setlocal_WC_0,
           :setlocal_WC_1,
           :getblockparam,
           :getblockparamproxy,
           :setblockparam
        return false
      end
      pos += insn.len
    end
    return true
  end

  # CPointer::Struct could be nil on field reference, and this is a helper to
  # handle that case while using CPointer::Struct#to_s in most cases.
  # @param struct [RubyVM::MJIT::CPointer::Struct]
  def to_addr(struct)
    struct&.to_s || 'NULL'
  end

  def parent_shape_id(shape_id)
    return shape_id if shape_id == C.INVALID_SHAPE_ID

    parent_id = C.rb_shape_get_shape_by_id(shape_id).parent_id
    parent = C.rb_shape_get_shape_by_id(parent_id)

    if parent.type == C.SHAPE_CAPACITY_CHANGE
      parent.parent_id
    else
      parent_id
    end
  end
end
ruby/ruby_vm/mjit/c_type.rb000064400000004766150403134300011771 0ustar00require 'fiddle'
require 'fiddle/pack'
require_relative 'c_pointer'

module RubyVM::MJIT # :nodoc: all
  module CType
    module Struct
      # @param name [String]
      # @param members [Hash{ Symbol => [Integer, RubyVM::MJIT::CType::*] }]
      def self.new(name, sizeof, **members)
        name = members.keys.join('_') if name.empty?
        CPointer.with_class_name('Struct', name) do
          CPointer::Struct.define(sizeof, members)
        end
      end
    end

    module Union
      # @parruby/csv.rb000064400000270742150403134300006652 0ustar00e_type.abs
        end&.to_s
        name.delete_prefix!('TYPE_')
        if fiddle_type.negative?
          name.prepend('U')
        end
        CPointer.with_class_name('Immediate', name, cache: true) do
          CPointer::Immediate.define(fiddle_type)
        end
      end

      # @param type [String]
      def self.parse(ctype)
        new(Fiddle::Importer.parse_ctype(ctype))
      end

      def self.find(size, signed)
        fiddle_type = TYPE_MAP.fetch(size)
        fiddle_type = -fiddle_type unless signed
        new(fiddle_type)
      end

      TYPE_MAP = Fiddle::PackInfo::SIZE_MAP.map { |type, size| [size, type.abs] }.to_h
      private_constant :TYPE_MAP
    end

    module Bool
      def self.new
        CPointer::Bool
      end
    end

    class Pointer
      # This takes a block to avoid "stack level too deep" on a cyclic reference
      # @param block [Proc]
      def self.new(&block)
        CPointer.with_class_name('Pointer', block.object_id.to_s) do
          CPointer::Pointer.define(block)
        end
      end
    end

    module BitField
      # @param width [Integer]
      # @param offset [Integer]
      def self.new(width, offset)
        CPointer.with_class_name('BitField', "#{offset}_#{width}") do
          CPointer::BitField.define(width, offset)
        end
      end
    end

    # Types that are referenced but not part of code generation targets
    Stub = ::Struct.new(:name)

    # Types that it failed to figure out from the header
    Unknown = Module.new
  end
end
ruby/csv.rb000064400000270742150403134300006652 0ustar00# 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 <tt>:row_sep</tt> is law. It can auto-detect your line endings
#   though.
# * The old library returned empty lines as <tt>[nil]</tt>. This library calls
#   them <tt>[]</tt>.
# * This library has a much faster parser.
#
# === Interface
#
# * CSV now uses keyword 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 emailruby/tsort.rb000064400000034417150403134260007234 0ustar00ne character <tt>"\n"</tt>.
# - A _column_ _separator_ delimits fields in a row.
#   A common column separator is the comma character <tt>","</tt>.
#
# This \CSV \String, with row separator <tt>"\n"</tt>
# and column separator <tt>","</tt>,
# 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) # => #<CSV::Table mode:col_or_row row_count:3>
#
# ==== 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 # => #<CSV::Table mode:col_or_row row_count:3>
#
# === 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 <tt>Array#to_csv</tt>,
# 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:        "",
#     strip:              false,
#     # For generating.
#     write_headers:      nil,
#     quote_empty:        true,
#     force_quotes:       false,
#     write_converters:   nil,
#     write_nil_value:    nil,
#     write_empty_value:  "",
#   }
#
# ==== 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 + 1 allowed.
#   Deprecated since 3.2.3. Use +max_field_size+ instead.
# - +max_field_size+: 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. This must be compatible with +col_sep+; if it is not,
#   then an +ArgumentError+ exception will be raised.
# - +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      #=> #<CSV::Row "Name":"Bob" "Department":"Engineering" "Salary":"1000">
#   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      #=> #<CSV::Row name:"Bob" department:"Engineering" salary:"1000">
#
# === \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 <tt>field.strip</tt>:
#   strip_converter = proc {|field| field.strip }
# In this call to <tt>CSV.parse</tt>,
# the keyword argument <tt>converters: string_converter</tt>
# 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 ", #<struct CSV::FieldInfo index=0, line=1, header=nil>]
#  [" 0 ", #<struct CSV::FieldInfo index=1, line=1, header=nil>]
#  [" bar ", #<struct CSV::FieldInfo index=0, line=2, header=nil>]
#  [" 1 ", #<struct CSV::FieldInfo index=1, line=2, header=nil>]
#  [" baz ", #<struct CSV::FieldInfo index=0, line=3, header=nil>]
#  [" 2 ", #<struct CSV::FieldInfo index=1, line=3, header=nil>]
# Each CSV::FieldInfo 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:
# - <tt>:integer</tt>: converts each \Struby/csv/input_record_separator.rb000064400000000425150403134260013421 0ustar00ruby/digest.rb000064400000006465150403134260007342 0ustar00ruby/csv/match_p.rb000064400000000571150403134260010261 0ustar00date_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 builruby/csv/core_ext/string.rb000064400000000314150403134260011757 0ustar00: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: :inruby/csv/core_ext/array.rb000064400000000315150403134260011570 0ustar00[["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::Cruby/csv/writer.rb000064400000013570150403134260010165 0ustar00ruby/monitor.rb000064400000015410150403134260007540 0ustar00+..
#
# 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 # => [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, "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 # => [#<DateTime: 2020-05-07T14:59:00-05:00 ((2458977j,71940s,0n),-18000s,2299161j)>, "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 +:downcase+,
# 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 # => #<CSV::Table mode:col_or_row row_count:4>
#   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 # => #<CSV::Table mode:col_or_row row_count:4>
#   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 Multilingualizatiruby/csv/delete_suffix.rb000064400000000566150403134260011500 0ustar00this
# 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 trruby/csv/parser.rb000064400000111310150403134260010134 0ustar0ruby/weakref.rb000064400000002554150403134260007502 0ustar00 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.
  #
  # <b><tt>index</tt></b>::  The zero-based index of the field in its row.
  # <b><tt>line</tt></b>::   The line of the data source this row is from.
  # <b><tt>header</tt></b>:: The header for the column, when available.
  # <b><tt>quoted?</tt></b>:: True or false, whether the original value is quoted or not.
  #
  FieldInfo = Struct.new(:index, :line, :header, :quoted?)

  # 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(?: (ruby/openssl/version.rb000064400000000106150403134260011215 0ustar00ers}[#class-CSV-label-Custom+Field+Converters].
  Converters  = {
    ruby/openssl/ssl.rb000064400000043024150403134260010337 0ustar00 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
    },
    symbol_raw: lambda { |h| h.encode(ConverterEncoding).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,
    max_field_size:     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:        "",
    strip:              false,
    # For generating.
    write_headers:      nil,
    quote_empty:        true,
    force_quotes:       false,
    write_converters:   nil,
    write_nil_value:    nil,
    write_empty_value:  "",
  }.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.
    #
    # This API is not Ractor-safe.
    #
    # ---
    #
    # 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)

      # 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(in_string_or_io, **options) {|row| ... } -> array_of_arrays or csv_table
    #   filter(in_string_or_io, out_string_or_io, **options) {|row| ... } -> array_of_arrays or csv_table
    #   filter(**options) {|row| ... } -> array_of_arrays or csv_table
    #
    # - Parses \CSV from a source (\String, \IO stream, or ARGF).
    # - Calls the given block with each parsed row:
    #   - Without headers, each row is an \Array.
    #   - With headers, each row is a CSV::Row.
    # - Generates \CSV to an output (\String, \IO stream, or STDOUT).
    # - Returns the parsed source:
    #   - Without headers, an \Array of \Arrays.
    #   - With headers, a CSV::Table.
    #
    # When +in_string_or_io+ is given, but not +out_string_or_io+,
    # parses from the given +in_string_or_io+
    # and generates to STDOUT.
    #
    # \String input without headers:
    #
    #   in_string = "foo,0\nbar,1\nbaz,2"
    #   CSV.filter(in_string) do |row|
    #     row[0].upcase!
    #     row[1] = - row[1].to_i
    #   end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
    #
    # Output (to STDOUT):
    #
    #   FOO,0
    #   BAR,-1
    #   BAZ,-2
    #
    # \String input with headers:
    #
    #   in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2"
    #   CSV.filter(in_string, headers: true) do |row|
    #     row[0].upcase!
    #     row[1] = - row[1].to_i
    #   end # => #<CSV::Table mode:col_or_row row_count:4>
    #
    # Output (to STDOUT):
    #
    #   Name,Value
    #   FOO,0
    #   BAR,-1
    #   BAZ,-2
    #
    # \IO stream input without headers:
    #
    #   File.write('t.csv', "foo,0\nbar,1\nbaz,2")
    #   File.open('t.csv') do |in_io|
    #     CSV.filter(in_io) do |row|
    #       row[0].upcase!
    #       row[1] = - row[1].to_i
    #     end
    #   end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
    #
    # Output (to STDOUT):
    #
    #   FOO,0
    #   BAR,-1
    #   BAZ,-2
    #
    # \IO stream input with headers:
    #
    #   File.write('t.csv', "Name,Value\nfoo,0\nbar,1\nbaz,2")
    #   File.open('t.csv') do |in_io|
    #     CSV.filter(in_io, headers: true) do |row|
    #       row[0].upcase!
    #       row[1] = - row[1].to_i
    #     end
    #   end # => #<CSV::Table mode:col_or_row row_count:4>
    #
    # Output (to STDOUT):
    #
    #   Name,Value
    #   FOO,0
    #   BAR,-1
    #   BAZ,-2
    #
    # When both +in_string_or_io+ and +out_string_or_io+ are given,
    # parses from +in_string_or_io+ and generates to +out_string_or_io+.
    #
    # \String output without headers:
    #
    #   in_string = "foo,0\nbar,1\nbaz,2"
    #   out_string = ''
    #   CSV.filter(in_string, out_string) do |row|
    #     row[0].upcase!
    #     row[1] = - row[1].to_i
    #   end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
    #   out_string # => "FOO,0\nBAR,-1\nBAZ,-2\n"
    #
    # \String output with headers:
    #
    #   in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2"
    #   out_string = ''
    #   CSV.filter(in_string, out_string, headers: true) do |row|
    #     row[0].upcase!
    #     row[1] = - row[1].to_i
    #   end # => #<CSV::Table mode:col_or_row row_count:4>
    #   out_string # => "Name,Value\nFOO,0\nBAR,-1\nBAZ,-2\n"
    #
    # \IO stream output without headers:
    #
    #   in_string = "foo,0\nbar,1\nbaz,2"
    #   File.open('t.csv', 'w') do |out_io|
    #     CSV.filter(in_string, out_io) do |row|
    #       row[0].upcase!
    #       row[1] = - row[1].to_i
    #     end
    #   end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
    #   File.read('t.csv') # => "FOO,0\nBAR,-1\nBAZ,-2\n"
    #
    # \IO stream output with headers:
    #
    #   in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2"
    #   File.open('t.csv', 'w') do |out_io|
    #     CSV.filter(in_string, out_io, headers: true) do |row|
    #       row[0].upcase!
    #       row[1] = - row[1].to_i
    #     end
    #   end # => #<CSV::Table mode:col_or_row row_count:4>
    #   File.read('t.csv') # => "Name,Value\nFOO,0\nBAR,-1\nBAZ,-2\n"
    #
    # When neither +in_string_or_io+ nor +out_string_or_io+ given,
    # parses from {ARGF}[rdoc-ref:ARGF]
    # and generates to STDOUT.
    #
    # Without headers:
    #
    #   # Put Ruby code into a file.
    #   ruby = <<-EOT
    #     require 'csv'
    #     CSV.filter do |row|
    #       row[0].upcase!
    #       row[1] = - row[1].to_i
    #     end
    #   EOT
    #   File.write('t.rb', ruby)
    #   # Put some CSV into a file.
    #   File.write('t.csv', "foo,0\nbar,1\nbaz,2")
    #   # Run the Ruby code with CSV filename as argument.
    #   system(Gem.ruby, "t.rb", "t.csv")
    #
    # Output (to STDOUT):
    #
    #   FOO,0
    #   BAR,-1
    #   BAZ,-2
    #
    # With headers:
    #
    #   # Put Ruby code into a file.
    #   ruby = <<-EOT
    #     require 'csv'
    #     CSV.filter(headers: true) do |row|
    #       row[0].upcase!
    #       row[1] = - row[1].to_i
    #     end
    #   EOT
    #   File.write('t.rb', ruby)
    #   # Put some CSV into a file.
    #   File.write('t.csv', "Name,Value\nfoo,0\nbar,1\nbaz,2")
    #   # Run the Ruby code with CSV filename as argument.
    #   system(Gem.ruby, "t.rb", "t.csv")
    #
    # Output (to STDOUT):
    #
    #   Name,Value
    #   FOO,0
    #   BAR,-1
    #   BAZ,-2
    #
    # Arguments:
    #
    # * Argument +in_string_or_io+ must be a \String or an \IO stream.
    # * Argument +out_string_or_io+ must be a \String or an \IO stream.
    # * Arguments <tt>**options</tt> must be keyword options.
    #   See {Options for Parsing}[#class-CSV-label-Options+for+Parsing].
    def filter(input=nil, output=nil, **options)
      # parse options for input, output, or both
      in_options, out_options = Hash.new, {row_sep: InputRecordSeparator.value}
      options.each do |key, value|
        case key
        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_or_io, mode='r', **options) {|row| ... )
    #   foreach(path_or_io, mode='r', **options) -> new_enumerator
    #
    # Calls the block with each row read from source +path_or_io+.
    #
    # \Path input without headers:
    #
    #   string = "foo,0\nbar,1\nbaz,2\n"
    #   in_path = 't.csv'
    #   File.write(in_path, string)
    #   CSV.foreach(in_path) {|row| p row }
    #
    # Output:
    #
    #   ["foo", "0"]
    #   ["bar", "1"]
    #   ["baz", "2"]
    #
    # \Path input with headers:
    #
    #   string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
    #   in_path = 't.csv'
    #   File.write(in_path, string)
    #   CSV.foreach(in_path, headers: true) {|row| p row }
    #
    # Output:
    #
    #   <CSV::Row "Name":"foo" "Value":"0">
    #   <CSV::Row "Name":"bar" "Value":"1">
    #   <CSV::Row "Name":"baz" "Value":"2">
    #
    # \IO stream input without headers:
    #
    #   string = "foo,0\nbar,1\nbaz,2\n"
    #   path = 't.csv'
    #   File.write(path, string)
    #   File.open('t.csv') do |in_io|
    #     CSV.foreach(in_io) {|row| p row }
    #   end
    #
    # Output:
    #
    #   ["foo", "0"]
    #   ["bar", "1"]
    #   ["baz", "2"]
    #
    # \IO stream input with headers:
    #
    #   string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
    #   path = 't.csv'
    #   File.write(path, string)
    #   File.open('t.csv') do |in_io|
    #     CSV.foreach(in_io, headers: true) {|row| p row }
    #   end
    #
    # Output:
    #
    #   <CSV::Row "Name":"foo" "Value":"0">
    #   <CSV::Row "Name":"bar" "Value":"1">
    #   <CSV::Row "Name":"baz" "Value":"2">
    #
    # With no block given, returns an \Enumerator:
    #
    #   string = "foo,0\nbar,1\nbaz,2\n"
    #   path = 't.csv'
    #   File.write(path, string)
    #   CSV.foreach(path) # => #<Enumerator: CSV:foreach("t.csv", "r")>
    #
    # Arguments:
    # * Argument +path_or_io+ must be a file path or an \IO stream.
    # * Argument +mode+, if given, must be a \File mode
    #   See {Open Mode}[https://ruby-doc.org/core/IO.html#method-c-new-label-Open+Mode].
    # * Arguments <tt>**options</tt> must be keyword options.
    #   See {Options for Parsing}[#class-CSV-label-Options+for+Parsing].
    # * This method optionally accepts an additional <tt>:encoding</tt> 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 <tt>Encoding::default_external</tt>.
    #   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.
    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 <tt>CSV.new(csv_string, **options)</tt>;
    # 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 <tt>csv_string</tt>.dup if the \String must be preserved.
    #
    # This method has one additional option: <tt>:encoding</tt>,
    # 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 <tt>:row_sep</tt> defaults to <tt>"\n"> on Ruby 3.0 or later
    #   and <tt>$INPUT_RECORD_SEPARATOR</tt> (<tt>$/</tt>) otherwise.:
    #     $INPUT_RECORD_SEPARATOR # => "\n"
    # * This method accepts an additional option, <tt>:encoding</tt>, 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: InputRecordSeparator.value}.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:
    #   CSV.generate_lines(rows)
    #   CSV.generate_lines(rows, **options)
    #
    # Returns the \String created by generating \CSV from
    # using the specified +options+.
    #
    # Argument +rows+ must be an \Array of row. Row is \Array of \Struby/openssl/digest.rb000064400000003207150403134260011014 0ustar00options)
      self.generate(**options) do |csv|
        rows.each do |row|
          csv << row
        end
      end
    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:
    #   keyword 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 <tt>**options</tt> must be keyword options.
    #   See {Options for Generating}[#class-CSV-label-Options+for+Generating].
    # * This method optionally accepts an additional <tt>:encoding</tt> 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 <tt>Encoding::default_external</tt>.
    #   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 firuby/openssl/marshal.rb000064400000001070150403134260011160 0ustar00SV.open(path) {|csv| p csv}
    #   csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
    # Output:
    #   #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
    #
    # Using an open \File:
    #   csv = CSV.open(File.open(path)) {|csv| p csv}
    #   csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
    # Output:
    #   #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," rruby/openssl/cipher.rb000064400000003320150403134260011003 0ustar00rescue 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| ruby/openssl/pkcs5.rb000064400000001145150403134260010561 0ustar00_row row_count:5>
    #
    # Parse an open \File:
    #   csv_table = File.open(path) do |file|
    #     CSV.parse(file, headers: ['Name', 'Count'])
    #   end
    #   csv_table # => #<CSV::Table mode:col_or_row row_count:4>
    #
    # ---
    #
    # 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:
    #   # <CSV::Row "Name":"foo" "Count":"0">
    #   # <CSV::Row "Name":"bar" "Count":"1">
    #   # <CSV::Row "Name":"baz" "Couruby/openssl/x509.rb000064400000027147150403134260010253 0ustar00rray 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) # => #<CSV::Row "Name":"foo" "Count":"0">
    #
    # Parse the first line from a File object:
    #   File.open(path) do |file|
    #     CSV.parse_line(file, headers: true)
    #   end # => #<CSV::Row "Name":"foo" "Count":"0">
    #
    # ---
    #
    # 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) # => #<CSV::Table mode:col_or_row row_count:4>
    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+
    # - +converters+: +: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) # => #<CSV::Table mode:col_or_row row_count:4>
    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 # => #<CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
  #
  # Create a \CSV object from a \File object:
  #   File.write('t.csv', 'foo,0')
  #   csv = CSV.new(File.open('t.csv'))
  #   csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
  #
  # ---
  #
  # 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,
                 max_field_size: 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: "",
                 strip: false,
                 quote_empty: true,
                 write_converters: nil,
                 write_nil_value: nil,
                 write_empty_value: "")
    raise ArgumentError.new("Cannot parse nil as CSV") if data.nil?

    if data.is_a?(String)
      if encoding
        if encoding.is_a?(String)
          data_external_encoding, data_internal_encoding = encoding.split(":", 2)
          if data_internal_encoding
            data = data.encode(data_internal_encoding, data_external_encoding)
          else
            data = data.dup.force_encoding(data_external_encoding)
          end
        else
          data = data.dup.force_encoding(encoding)
        end
      end
      @io = StringIO.new(data)
    else
      @io = data
    endruby/pp.rb000064400000044555150403134260006504 0ustar00# frozen_string_literal: true

require 'prettyprint'

##
# A pretty-printer for Ruby objects.
#
##
# == What PP Does
#
# Standard output by #p returns this:
#   #<PP:0x81fedf0 @genspace=#<Proc:0x81feda0>, @group_queue=#<PrettyPrint::GroupQueue:0x81fed3c @queue=[[#<PrettyPrint::Group:0x81fed78 @breakables=[], @depth=0, @break=false>], []]>, @buffer=[], @newline="\n", @group_stack=[#<PrettyPrint::Group:0x81fed78 @breakables=[], @depth=0, @break=false>], @buffer_width=0, @indent=0, @maxwidth=79, @output_width=2, @output=#<IO:0x8114ee4>>
#
# Pretty-printed output returns this:
#   #<PP:0x81fedf0
#    @buffer=[],
#    @buffer_width=0,
#    @genspace=#<Proc:0x81feda0>,
#    @group_queue=
#     #<PrettyPrint::GroupQueue:0x81fed3c
#      @queue=
#       [[#<PrettyPrint::Group:0x81fed78 @break=false, @breakables=[], @depth=0>],
#        []]>,
#    @group_stack=
#     [#<PrettyPrint::Group:0x81fed78 @break=false, @breakables=[], @depth=0>],
#    @indent=0,
#    @maxwidth=79,
#    @newline="\n",
#    @output=#<IO:0x8114ee4>,
#    @output_width=2>
#
##
# == Usage
#
#   pp(obj)             #=> obj
#   pp obj              #=> obj
#   pp(obj1, obj2, ...) #=> [obj1, obj2, ...]
#   pp()                #=> nil
#
# Output <tt>obj(s)</tt> to <tt>$></tt> in pretty printed format.
#
# It returns <tt>obj(s)</tt>.
#
##
# == Output Customization
#
# To define a customized pretty printing function for your classes,
# redefine method <code>#pretty_print(pp)</code> in the class.
# Note that <code>require 'pp'</code> is needed before redefining <code>#pretty_print(pp)</code>.
#
# <code>#pretty_print</code> 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 <akr@fsij.org>

class PP < PrettyPrint

  # The version string
  VERSION = "0.6.2"

  # Returns the usable width for +out+.
  # As the width of +out+:
  # 1. If +out+ is assigned to a tty device, its width is used.
  # 2. Otherwise, or it could not get the value, the +COLUMN+
  #    environment variable is assumed to be set to the width.
  # 3. If +COLUMN+ is not set to a non-zero number, 80 is assumed.
  #
  # And finally, returns the above width value - 1.
  # * This -1 is for Windows command prompt, which moves the cursor to
  #   the next line if it reaches the last column.
  def PP.width_for(out)
    begin
      require 'io/console'
      _, width = out.winsize
    rescue LoadError, NoMethodError, SystemCallError
    end
    (width || ENV['COLUMNS']&.to_i&.nonzero? || 80) - 1
  end

  # Outputs +obj+ to +out+ in pretty printed format of
  # +width+ columns in width.
  #
  # If +out+ is omitted, <code>$></code> is assumed.
  # If +width+ is omitted, the width of +out+ is assumed (see
  # width_for).
  #
  # PP.pp returns +out+.
  def PP.pp(obj, out=$>, width=width_for(out))
    q = 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 that defines helper methods for pretty_print.
  module PPMethods

    # Yields to a block
    # and preserves the previous set of objects being printed.
    def ruby/openssl/buffering.rb000064400000024344150403134260011511 0ustar00 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 ::Delegator === obj

      if check_inspect_key(obj)
        group {obj.pretty_print_cycle self}
        return
      end

      begin
        push_inspect_key(obj)
        group do
          obj.pretty_print self
        rescue NoMethodError
          text Kernel.instance_method(:inspect).bind_call(obj)
        end
      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_hash_pair k, v
          }
        }
      }
    end

    if RUBY_VERSION >= '3.4.'
      # A pretty print for a pair of Hash
      def pp_hash_pair(k, v)
        if Symbol === k
          sym_s = k.inspect
          if sym_s[1].match?(/["$@!]/) || sym_s[-1].match?(/[%&*+\-\/<=>@\]^`|~]/)
            text "#{k.to_s.inspect}:"
          else
            text "#{k}:"
          end
        else
          pp k
          text ' '
          text '=>'
        end
        group(1) {
          breakable
          pp v
        }
      end
    else
      def pp_hash_pair(k, v)
        pp k
        text '=>'
        group(1) {
          breakable ''
          pp v
        }
      end
    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("#<struct %s", PP.mcall(self, Kernel, :class).name), '>') {
      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("#<struct %s:...>", PP.mcall(self, Kernel, :class).name)
  end
end

class Data # :nodoc:
  def pretty_print(q) # :nodoc:
    class_name = PP.mcall(self, Kernel, :class).name
    class_name = " #{class_name}" if class_name
    q.group(1, "#<data#{class_name}", '>') {

      members = PP.mcall(self, Kernel, :class).members
      values = []
      members.select! do |member|
        begin
          values << __send__(member)
          true
        rescue NoMethodError
          false
        end
      end

      q.seplist(members.zip(values), lambda { q.text "," }) {|(member, value)|
        q.breakable
        q.text member.to_s
        q.text '='
        q.group(1) {
          q.breakable ''
          q.pp value
        }
      }
    }
  end

  def pretty_print_cycle(q) # :nodoc:
    q.text sprintf("#<data %s:...>", PP.mcall(self, Kernel, :class).name)
  end
end if defined?(Data.define)

class Range # :nodoc:
  def pretty_print(q) # :nodoc:
    begin_nil = self.begin == nil
    end_nil = self.end == nil
    q.pp self.begin if !begin_nil || end_nil
    q.breakable ''
    q.text(self.exclude_end? ? '...' : '..')
    q.breakable ''
    q.pp self.end if !end_nil || begin_nil
  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'
      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.breakaruby/openssl/hmac.rb000064400000004774150403134270010460 0ustar00v_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

if defined?(RubyVM::AbstractSyntaxTree)
  class RubyVM::AbstractSyntaxTree::Node # :nodoc:
    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
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.
  #
  # 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
ruby/openssl/bn.rb000064400000001303150403134270010130 0ustar00# 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
#ruby/openssl/pkey.rb000064400000035416150403134270010515 0ustar002=>[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",
# <em>SIAM Journal on Computing</em>, Vol. 1, No. 2, pp. 146-160, June 1972.
#

module TSort

  VERSION = "0.2.0"

  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 self.tsort(each_node, each_child)
    tsort_each(each_node, each_child).to_a
  end

  # The iterator version of the #tsort method.
  # <tt><em>obj</em>.tsort_each</tt> is similar to <tt><em>obj</em>.tsort.each</tt>, 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 self.tsort_each(each_node, each_child) # :yields: node
    return to_enum(__method__, each_node, each_child) unless block_given?

    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 self.strongly_connected_components(each_node, each_child)
    each_strongly_connected_component(each_node, each_child).to_a
  end

  # The iterator version of the #strongly_connected_components method.
  # <tt><em>obj</em>.each_strongly_connected_component</tt> is similar to
  # <tt><em>obj</em>.strongly_connected_components.each</tt>, 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 self.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
        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 self.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 =
          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
ruby/digest.rb000064400000006465150403134260007342 0ustar00# frozen_string_literal: false

if defined?(Digest) &&
    /\A(?:2\.|3\.0\.[0-2]\z)/.match?(RUBY_VERSION) &&
    caller_locations.any? { |l|
      %r{/(rubygems/gem_runner|bundler/cli)\.rb}.match?(l.path)
    }
  # Before Ruby 3.0.3/3.1.0, the gem and bundle commands used to load
  # the digest library before loading additionally installed gems, so
  # you will get constant redefinition warnings and unexpected
  # implementation overwriting if we proceed here.  Avoid that.
  return
end

require 'digest/version'
require 'digest/loader'

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'
    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 Diruby/timeout.rb000064400000013520150403134270007540 0ustar00lting 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
ruby/monitor.rb000064400000015740150403134260007546 0ustar00# frozen_string_literal: false
# = monitor.rb
#
# Copyright (C) 2001  Shugo Maeda <shugo@ruby-lang.org>
#
# This library is distributed under the terms of the Ruby license.
# You can freely distribute/modify this library.
#

require 'monitor.so'

#
# 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 <tt>buf.empty?</tt>. The producer thread (main thread) reads a
# line from ARGF and pushes it into buf then calls <tt>empty_cond.signal</tt>
# 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.
#
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) # :nodoc:
      @monitor = monitor
      @cond = Thread::ConditionVariable.new
    end
  end

  def self.extend_object(obj) # :nodoc:
    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

  #
  # Entersruby/socket.rb000064400000127346150403134270007356 0ustar00new 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 <tt>extend MonitorMixin</tt> or <tt>include MonitorMixin</tt> 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

  # Ensures that the MonitorMixin is owned by the current thread,
  # otherwise raises an exception.
  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
  #
  # Creates a new MonitorMixin::ConditionVariable associated with the
  # Monitor object.
  #
  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
ruby/weakref.rb000064400000002554150403134260007502 0ustar00# 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.3"

  ##
  # 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+

  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
ruby/openssl/version.rb000064400000000106150403134260011215 0ustar00# frozen_string_literal: true

module OpenSSL
  VERSION = "3.3.0"
end
ruby/openssl/ssl.rb000064400000046152150403134260010344 0ustar00# frozen_string_literal: true
=begin
= Info
  'OpenSSL for Ruby 2' project
  Copyright (C) 2001 GOTOU YUUZOU <gotoyuzo@notwork.org>
  All rights reserved.

= Licence
  This program is licensed under the same licence as Ruby.
  (See the file 'COPYING'.)
=end

require "openssl/buffering"

if defined?(OpenSSL::SSL)

require "io/nonblock"
require "ipaddr"
require "socket"

module OpenSSL
  module SSL
    class SSLContext
      DEFAULT_PARAMS = { # :nodoc:
        :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)
        DH_ffdhe2048 = OpenSSL::PKey::DH.new <<-_end_of_pem_
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg==
-----END DH PARAMETERS-----
        _end_of_pem_
        private_constant :DH_ffdhe2048

        DEFAULT_TMP_DH_CALLBACK = lambda { |ctx, is_export, keylen| # :nodoc:
          warn "using default DH parameters." if $VERBOSE
          DH_ffdhe2048
        }
      end

      if !(OpenSSL::OPENSSL_VERSION.start_with?("OpenSSL") &&
           OpenSSL::OPENSSL_VERSION_NUMBER >= 0x10100000)
        DEFAULT_PARAMS.merge!(
          min_version: OpenSSL::SSL::TLS1_VERSION,
          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 for ephemeral DH key
      # exchange.
      #
      # The callback is invoked with the SSLSocket, a
      # 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.
      #
      # <b>Deprecated in version 3.0.</b> Use #tmp_dh= instead.
      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.ssl_version = version if version
        self.verify_mode = OpenSSL::SSL::VERIFY_NONE
        self.verify_hostname = false
      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 /(?<type>_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 local_address
        to_io.local_address
      end

      def remote_address
        to_io.remote_address
      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

      def close_on_exec=(value)
        to_io.close_on_exec = value
      end

      def close_on_exec?
        to_io.close_on_exec?
      end

      def wait(*args)
        to_io.wait(*args)
      end

      def wait_readable(*args)
        to_io.wait_readable(*args)
      end

      def wait_writable(*args)
        to_io.wait_writable(*args)
      end

      if IO.method_defined?(:timeout)
        def timeout
          to_io.timeout
        end

        def timeout=(value)
          to_io.timeout=(value)
        end
      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

      # Close the stream for reading.
      # This method is ignored by OpenSSL as there is no reasonable way to
      # implement it, but exists for compatibility with IO.
      def close_read
        # Unsupported and ignored.
        # Just don't read any more.
      end

      # Closes the stream for writing. The behavior of this method depends on
      # the version of OpenSSL and the TLS protocol in use.
      #
      # - Sends a 'close_notify' alert to the peer.
      # - Does not wait for the peer's 'close_notify' alert in response.
      #
      # In TLS 1.2 and earlier:
      # - On receipt of a 'close_notify' alert, responds with a 'close_notify'
      #   alert of its own and close down the connection immediately,
      #   discarding any pending writes.
      #
      # Therefore, on TLS 1.2, this method will cause the connection to be
      # completely shut down. On TLS 1.3, the connection will remain open for
      # reading only.
      def close_write
        stop
      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 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).unpack1('H*')
          @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

end
ruby/openssl/digest.rb000064400000003054150403134260011014 0ustar00# frozen_string_literal: true
#--
# = Ruby-space predefined Digest subclasses
#
# = Info
# 'OpenSSL for Ruby 2' project
# Copyright (C) 2002  Michal Rokos <m.rokos@sh.cvut.cz>
# All rights reserved.
#
# = Licence
# This program is licensed under the same licence as Ruby.
# (See the file 'COPYING'.)
#++

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.
    #
    # === Example
    #
    #   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
ruby/openssl/marshal.rb000064400000001070150403134260011160 0ustar00# 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 <m.rokos@sh.cvut.cz>
# All rights reserved.
#
# = Licence
# This program is licensed under the same licence as Ruby.
# (See the file 'COPYING'.)
#++
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
ruby/openssl/cipher.rb000064400000003320150403134260011003 0ustar00# frozen_string_literal: true
#--
# = Ruby-space predefined Cipher subclasses
#
# = Info
# 'OpenSSL for Ruby 2' project
# Copyright (C) 2002  Michal Rokos <m.rokos@sh.cvut.cz>
# All rights reserved.
#
# = Licence
# This program is licensed under the same licence as Ruby.
# (See the file 'COPYING'.)
#++

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
ruby/openssl/pkcs5.rb000064400000001145150403134260010561 0ustar00# 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
ruby/openssl/x509.rb000064400000027207150403134260010250 0ustar00# 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 <m.rokos@sh.cvut.cz>
# All rights reserved.
#
# = Licence
# This program is licensed under the same licence as Ruby.
# (See the file 'COPYING'.)
#++

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 RFC 5280 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.flat_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&.select do |v|
              v.tag_class == :CONTEXT_SPECIFIC && v.tag == 6 # uniformResourceIdentifier
            end
          end

          crl_uris.empty? ? nil : 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
        # Parses the UTF-8 string representation of a distinguished name,
        # according to RFC 2253.
        #
        # See also #to_utf8 for the opposite operation.
        def parse_rfc2253(str, template=OBJECT_TYPE_TEMPLATE)
          ary = OpenSSL::X509::Name::RFC2253DN.scan(str)
          self.new(ary, template)
        end

        # Parses the string representation of a distinguished name. Two
        # different forms are supported:
        #
        # - \OpenSSL format (<tt>X509_NAME_oneline()</tt>) used by
        #   <tt>#to_s</tt>. For example: <tt>/DC=com/DC=example/CN=nobody</tt>
        # - \OpenSSL format (<tt>X509_NAME_print()</tt>)
        #   used by <tt>#to_s(OpenSSL::X509::Name::COMPAT)</tt>. For example:
        #   <tt>DC=com, DC=example, CN=nobody</tt>
        #
        # Neither of them is standardized and has quirks and inconsistencies
        # in handling of escaped characters or multi-valued RDNs.
        #
        # Use of this method is discouraged in new applications. See
        # Name.parse_rfc2253 and #to_utf8 for the alternative.
        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
   ruby/tmpdir.rb000064400000011314150403134270007350 0ustar00on::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

      def self.load_file(path)
        load(File.binread(path))
      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
ruby/openssl/buffering.rb000064400000024747150403134260011520 0ustar00# coding: binary
# frozen_string_literal: true
#--
#= Info
#  'OpenSSL for Ruby 2' project
#  Copyright (C) 2001 GOTOU YUUZOU <gotoyuzo@notwork.org>
#  All rights reserved.
#
#= Licence
#  This program is licensed under the same licence as Ruby.
#  (See the file 'COPYING'.)
#++

##
# 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
      @rbuffer.slice!(0, size)
    end
  end

  public

  # call-seq:
  #   ssl.getbyte => 81
  #
  # Get the next 8bit byte from `ssl`.  Returns `nil` on EOF
  def getbyte
    read(1)&.ord
  end

  # Get the next 8bit byte. Raises EOFError on EOF
  def readbyte
    raise EOFError if eof?
    getbyte
  end

  ##
  # 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 ==ruby/date.rb000064400000002251150403134270006766 0ustar00  #
  # 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
    ruby/time.rb000064400000057337150403134270007026 0ustar00or 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
    buffer_size = @wbuffer.size
    if @sync or buffer_size > BLOCK_SIZE
      nwrote = 0
      begin
        while nwrote < buffer_size do
          begin
            nwrote += syswrite(@wbuffer[nwrote, buffer_size - nwrote])
          rescue Errno::EAGAIN
            retry
          end
        end
      ensure
        @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!(/(?<!\n)\z/, "\n")
    }
    do_write(s)
    nil
  end

  ##
  # Writes _args_ to the stream.
  #
  # See IO#print for full details.

  def print(*args)
    s = Buffer.new
    args.each{ |arg| s << arg.to_s }
    do_write(s)
    nil
  end

  ##
  # Formats and writes to the stream converting parameters under control of
  # the format string.
  #
  # See Kernel#sprintf for format string details.

  def printf(s, *args)
    do_write(s % args)
    nil
  end

  ##
  # Flushes buffered data to the SSLSocket.

  def flush
    osync = @sync
    @sync = true
    do_write ""
    return self
  ensure
    @sync = osync
  end

  ##
  # Closes the SSLSocket and flushes any unwritten data.

  def close
    flush rescue nil
    sysclose
  end
end
ruby/openssl/hmac.rb000064400000004774150403134270010460 0ustar00# frozen_string_literal: true

module OpenSSL
  class HMAC
    # Securely compare with another HMAC instance in constant time.
    def ==(other)
      return false unless HMAC === other
      return false unless self.digest.bytesize == other.digest.bytesize

      OpenSSL.fixed_length_secure_compare(self.digest, other.digest)
    end

    # :call-seq:
    #    hmac.base64digest -> string
    #
    # Returns the authentication code an a Base64-encoded string.
    def base64digest
      [digest].pack("m0")
    end

    class << self
      # :call-seq:
      #    HMAC.digest(digest, key, data) -> 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

      # :call-seq:
      #    HMAC.base64digest(digest, key, data) -> aString
      #
      # Returns the authentication code as a Base64-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.base64digest('SHA1', key, data)
      #  #=> "3nybhbi3iqa8ino29wqQcBydtNk="
      def base64digest(digest, key, data)
        [digest(digest, key, data)].pack("m0")
      end
    end
  end
end
ruby/openssl/bn.rb000064400000001303150403134270010130 0ustar00# 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 <m.rokos@sh.cvut.cz>
# All rights reserved.
#
# = Licence
# This program is licensed under the same licence as Ruby.
# (See the file 'COPYING'.)
#++

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
ruby/openssl/pkey.rb000064400000035416150403134270010515 0ustar00# 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 #=> #<OpenSSL::BN 1288347...>
    #   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.
    #
    # <b>Deprecated in version 3.0</b>. 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)
        # FIPS 186-4 specifies four (L,N) pairs: (1024,160), (2048,224),
        # (2048,256), and (3072,256).
        #
        # q size is derived here with compatibility with
        # DSA_generator_parameters_ex() which previous versions of ruby/openssl
        # used to call.
        qsize = size >= 2048 ? 256 : 160
        dsaparams = OpenSSL::PKey.generate_parameters("DSA", {
          "dsa_paramgen_bits" => size,
          "dsa_paramgen_q_bits" => qsize,
        }, &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.
    #
    # <b>Deprecated in version 3.0</b>.
    # 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.
    #
    # <b>Deprecated in version 3.0</b>.
    # 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
    #
    # <b>Deprecated in version 3.0</b>.
    # 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
    #
    # <b>Deprecated in version 3.0</b>.
    # 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, which is known to be insecure but is kept for backwards
    # compatibility. The encrypted string output can be decrypted using
    # #public_decrypt.
    #
    # <b>Deprecated in version 3.0</b>.
    # 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 which is known to be
    # insecure but is kept for backwards compatibility.
    #
    # <b>Deprecated in version 3.0</b>.
    # 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, which is known to be insecure but is kept for backwards
    # compatibility. The encrypted string output can be decrypted using
    # #private_decrypt.
    #
    # <b>Deprecated in version 3.0</b>.
    # 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
    # pruby/tempfile.rb000064400000033532150403134270007664 0ustar00    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
ruby/timeout.rb000064400000013340150403134270007540 0ustar00# frozen_string_literal: true
# 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.
#
# == Copyright
#
# Copyright:: (C) 2000  Network Applied Communication Laboratory, Inc.
# Copyright:: (C) 2000  Information-technology Promotion Agency, Japan

module Timeout
  # The version
  VERSION = "0.4.3"

  # Internal error raised to when a timeout is triggered.
  class ExitException < Exception
    def exception(*) # :nodoc:
      self
    end
  end

  # Raised by Timeout.timeout when the block times out.
  class Error < RuntimeError
    def self.handle_timeout(message) # :nodoc:
      exc = ExitException.new(message)

      begin
        yield exc
      rescue ExitException => e
        raise new(message) if exc.equal?(e)
        raise
      end
    end
  end

  # :stopdoc:
  CONDVAR = ConditionVariable.new
  QUEUE = Queue.new
  QUEUE_MUTEX = Mutex.new
  TIMEOUT_THREAD_MUTEX = Mutex.new
  @timeout_thread = nil
  private_constant :CONDVAR, :QUEUE, :QUEUE_MUTEX, :TIMEOUT_THREAD_MUTEX

  class Request
    attr_reader :deadline

    def initialize(thread, timeout, exception_class, message)
      @thread = thread
      @deadline = GET_TIME.call(Process::CLOCK_MONOTONIC) + timeout
      @exception_class = exception_class
      @message = message

      @mutex = Mutex.new
      @done = false # protected by @mutex
    end

    def done?
      @mutex.synchronize do
        @done
      end
    end

    def expired?(now)
      now >= @deadline
    end

    def interrupt
      @mutex.synchronize do
        unless @done
          @thread.raise @exception_class, @message
          @done = true
        end
      end
    end

    def finished
      @mutex.synchronize do
        @done = true
      end
    end
  end
  private_constant :Request

  def self.create_timeout_thread
    watcher = Thread.new do
      requests = []
      while true
        until QUEUE.empty? and !requests.empty? # wait to have at least one request
          req = QUEUE.pop
          requests << req unless req.done?
        end
        closest_deadline = requests.min_by(&:deadline).deadline

        now = 0.0
        QUEUE_MUTEX.synchronize do
          while (now = GET_TIME.call(Process::CLOCK_MONOTONIC)) < closest_deadline and QUEUE.empty?
            CONDVAR.wait(QUEUE_MUTEX, closest_deadline - now)
          end
        end

        requests.each do |req|
          req.interrupt if req.expired?(now)
        end
        requests.reject!(&:done?)
      end
    end
    ThreadGroup::Default.add(watcher) unless watcher.group.enclosed?
    watcher.name = "Timeout stdlib thread"
    watcher.thread_variable_set(:"\0__detached_thread__", true)
    watcher
  end
  private_class_method :create_timeout_thread

  def self.ensure_timeout_thread_created
    unless @timeout_thread and @timeout_thread.alive?
      TIMEOUT_THREAD_MUTEX.synchronize do
        unless @timeout_thread and @timeout_thread.alive?
          @timeout_thread = create_timeout_thread
        end
      end
    end
  end

  # We keep a private reference so that time mocking libraries won't break
  # Timeout.
  GET_TIME = Process.method(:clock_gettime)
  private_constant :GET_TIME

  # :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 non-negative number
  #         or nil may be used, including Floats to specify fractional seconds. A
  #         value of 0 or +nil+ will execute the block without any timeout.
  #         Any negative number will raise an ArgumentError.
  # +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.
  #
  # If a scheduler is defined, it will be used to handle the timeout by invoking
  # Scheduler#timeout_after.
  #
  # Note that this is both a method of module Timeout, so you can <tt>include
  # Timeout</tt> 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, &block)   #:yield: +sec+
    return yield(sec) if sec == nil or sec.zero?
    raise ArgumentError, "Timeout sec must be a non-negative number" if 0 > sec

    message ||= "execution expired"

    if Fiber.respond_to?(:current_scheduler) && (scheduler = Fiber.current_scheduler)&.respond_to?(:timeout_after)
      return scheduler.timeout_after(sec, klass || Error, message, &block)
    end

    Timeout.ensure_timeout_thread_created
    perform = Proc.new do |exc|
      request = Request.new(Thread.current, sec, exc, message)
      QUEUE_MUTEX.synchronize do
        QUEUE << request
        CONDVAR.signal
      end
      begin
        return yield(sec)
      ensure
        request.finished
      end
    end

    if klass
      perform.call(klass)
    else
      Error.handle_timeout(message, &perform)
    end
  end
  module_function :timeout
end
ruby/socket.rb000064400000166771150403134270007363 0ustar00# frozen_string_literal: true

require 'socket.so'

unless IO.method_defined?(:wait_writable, false)
  # It's only required on older Rubies < v3.2:
  require 'io/wait'
end

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: 221.186.184.68:80 TCP (www.ruby-lang.org:80)>
  #
  #   Addrinfo.unix("/tmp/sock").family_addrinfo("/tmp/sock2")
  #   #=> #<Addrinfo: /tmp/sock2 SOCK_STREAM>
  #
  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) unless self.pfamily == Socket::PF_UNIX
      sock.bind(self)
      sock.ruby/ruby_vm/mjit/instruction.rb000064400000204503150403134270013064 0ustar00ype, 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 #=> #<Addrinfo: 127.0.0.1:53660 TCP>
  #     serv.connect_address.connect {|c|
  #       s, _ = serv.accept
  #       p [c, s] #=> [#<Socket:fd 4>, #<Socket:fd 6>]
  #     }
  #   }
  #
  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 nil.
  # In most cases it means the connection was closed, but for UDP connections
  # it may mean an empty packet was received, as the underlying API makes
  # it impossible to distinguish these two cases.
  #
  # === 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:
  #
  #   #<Socket::AncillaryData: AF_UNIX SOCKET RIGHTS 7>
  #
  # _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#recv_nonblock returns nil.
  # In most cases it means the connection was closed, but for UDP connections
  # it may mean an empty packet was received, as the underlying API makes
  # it impossible to distinguish these two cases.
  #
  # === 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

  RESOLUTION_DELAY = 0.05
  private_constant :RESOLUTION_DELAY

  CONNECTION_ATTEMPT_DELAY = 0.25
  private_constant :CONNECTION_ATTEMPT_DELAY

  ADDRESS_FAMILIES = {
    ipv6: Socket::AF_INET6,
    ipv4: Socket::AF_INET
  }.freeze
  private_constant :ADDRESS_FAMILIES

  HOSTNAME_RESOLUTION_QUEUE_UPDATED = 0
  private_constant :HOSTNAME_RESOLUTION_QUEUE_UPDATED

  IPV6_ADRESS_FORMAT = /\A(?i:(?:(?:[0-9A-F]{1,4}:){7}(?:[0-9A-F]{1,4}|:)|(?:[0-9A-F]{1,4}:){6}(?:[0-9A-F]{1,4}|:(?:[0-9A-F]{1,4}:){1,5}[0-9A-F]{1,4}|:)|(?:[0-9A-F]{1,4}:){5}(?:(?::[0-9A-F]{1,4}){1,2}|:(?:[0-9A-F]{1,4}:){1,4}[0-9A-F]{1,4}|:)|(?:[0-9A-F]{1,4}:){4}(?:(?::[0-9A-F]{1,4}){1,3}|:(?:[0-9A-F]{1,4}:){1,3}[0-9A-F]{1,4}|:)|(?:[0-9A-F]{1,4}:){3}(?:(?::[0-9A-F]{1,4}){1,4}|:(?:[0-9A-F]{1,4}:){1,2}[0-9A-F]{1,4}|:)|(?:[0-9A-F]{1,4}:){2}(?:(?::[0-9A-F]{1,4}){1,5}|:(?:[0-9A-F]{1,4}:)[0-9A-F]{1,4}|:)|(?:[0-9A-F]{1,4}:){1}(?:(?::[0-9A-F]{1,4}){1,6}|:(?:[0-9A-F]{1,4}:){0,5}[0-9A-F]{1,4}|:)|(?:::(?:[0-9A-F]{1,4}:){0,7}[0-9A-F]{1,4}|::)))(?:%.+)?\z/
  private_constant :IPV6_ADRESS_FORMAT

  # :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.
  #
  # Starting from Ruby 3.4, this method operates according to the
  # Happy Eyeballs Version 2 ({RFC 8305}[https://datatracker.ietf.org/doc/html/rfc8305])
  # algorithm by default.
  #
  # For details on Happy Eyeballs Version 2,
  # see {Socket.tcp_fast_fallback=}[rdoc-ref:Socket.tcp_fast_fallback=].
  #
  # To make it behave the same as in Ruby 3.3 and earlier,
  # explicitly specify the option fast_fallback:false.
  # Or, setting Socket.tcp_fast_fallback=false will disable
  # Happy Eyeballs Version 2 not only for this method but for all Socket globally.
  #
  # 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:
  #
  # [:resolv_timeout] Specifies the timeout in seconds from when the hostname resolution starts.
  # [:connect_timeout] This method sequentially attempts connecting to all candidate destination addresses.<br>The +connect_timeout+ specifies the timeout in seconds from the start of the connection attempt to the last candidate.<br>By default, all connection attempts continue until the timeout occurs.<br>When +fast_fallback:false+ is explicitly specified,<br>a timeout is set for each connection attempt and any connection attempt that exceeds its timeout will be canceled.
  # [:fast_fallback] Enables the Happy Eyeballs Version 2 algorithm (enabled by default).
  #
  # 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, fast_fallback: tcp_fast_fallback, &) # :yield: socket
    sock = if fast_fallback && !(host && ip_address?(host))
      tcp_with_fast_fallback(host, port, local_host, local_port, connect_timeout:, resolv_timeout:)
    else
      tcp_without_fast_fallback(host, port, local_host, local_port, connect_timeout:, resolv_timeout:)
    end

    if block_given?
      begin
        yield sock
      ensure
        sock.close
      end
    else
      sock
    end
  end

  def self.tcp_with_fast_fallback(host, port, local_host = nil, local_port = nil, connect_timeout: nil, resolv_timeout: nil)
    if local_host || local_port
      local_addrinfos = Addrinfo.getaddrinfo(local_host, local_port, nil, :STREAM, timeout: resolv_timeout)
      resolving_family_names = local_addrinfos.map { |lai| ADDRESS_FAMILIES.key(lai.afamily) }.uniq
    else
      local_addrinfos = []
      resolving_family_names = ADDRESS_FAMILIES.keys
    end

    hostname_resolution_threads = []
    resolution_store = HostnameResolutionStore.new(resolving_family_names)
    connecting_sockets = {}
    is_windows_environment ||= (RUBY_PLATFORM =~ /mswin|mingw|cygwin/)

    now = current_clock_time
    resolution_delay_expires_at = nil
    connection_attempt_delay_expires_at = nil
    user_specified_connect_timeout_at = nil
    last_error = nil
    last_error_from_thread = false

    if resolving_family_names.size == 1
      family_name = resolving_family_names.first
      addrinfos = Addrinfo.getaddrinfo(host, port, family_name, :STREAM, timeout: resolv_timeout)
      resolution_store.add_resolved(family_name, addrinfos)
      hostname_resolution_result = nil
      hostname_resolution_notifier = nil
      user_specified_resolv_timeout_at = nil
    else
      hostname_resolution_result = HostnameResolutionResult.new(resolving_family_names.size)
      hostname_resolution_notifier = hostname_resolution_result.notifier

      hostname_resolution_threads.concat(
        resolving_family_names.map { |family|
          thread_args = [family, host, port, hostname_resolution_result]
          thread = Thread.new(*thread_args) { |*thread_args| resolve_hostname(*thread_args) }
          Thread.pass
          thread
        }
      )

      user_specified_resolv_timeout_at = resolv_timeout ? now + resolv_timeout : Float::INFINITY
    end

    loop do
      if resolution_store.any_addrinfos? &&
          !resolution_delay_expires_at &&
          !connection_attempt_delay_expires_at
        while (addrinfo = resolution_store.get_addrinfo)
          if local_addrinfos.any?
            local_addrinfo = local_addrinfos.find { |lai| lai.afamily == addrinfo.afamily }

            if local_addrinfo.nil? # Connecting addrinfoと同じアドレスファミリのLocal addrinfoがない
              if resolution_store.any_addrinfos?
                # Try other Addrinfo in next "while"
                next
              elsif connecting_sockets.any? || resolution_store.any_unresolved_family?
                # Exit this "while" and wait for connections to be established or hostname resolution in next loop
                # Or exit this "while" and wait for hostname resolution in next loop
                break
              else
                raise SocketError.new 'no appropriate local address'
              end
            end
          end

          begin
            if resolution_store.any_addrinfos? ||
               connecting_sockets.any? ||
               resolution_store.any_unresolved_family?
              socket = Socket.new(addrinfo.pfamily, addrinfo.socktype, addrinfo.protocol)
              socket.bind(local_addrinfo) if local_addrinfo
              result = socket.connect_nonblock(addrinfo, exception: false)
            else
              result = socket = local_addrinfo ?
                addrinfo.connect_from(local_addrinfo, timeout: connect_timeout) :
                addrinfo.connect(timeout: connect_timeout)
            end

            if result == :wait_writable
              connection_attempt_delay_expires_at = now + CONNECTION_ATTEMPT_DELAY
              if resolution_store.empty_addrinfos?
                user_specified_connect_timeout_at = connect_timeout ? now + connect_timeout : Float::INFINITY
              end

              connecting_sockets[socket] = addrinfo
              break
            else
              return socket # connection established
            end
          rescue SystemCallError => e
            socket&.close
            last_error = e

            if resolution_store.any_addrinfos?
              # Try other Addrinfo in next "while"
              next
            elsif connecting_sockets.any? || resolution_store.any_unresolved_family?
              # Exit this "while" and wait for connections to be established or hostname resolution in next loop
              # Or exit this "while" and wait for hostname resolution in next loop
              break
            else
              raise last_error
            end
          end
        end
      end

      ends_at =
        if resolution_store.any_addrinfos?
          resolution_delay_expires_at || connection_attempt_delay_expires_at
        else
          [user_specified_resolv_timeout_at, user_specified_connect_timeout_at].compact.max
        end

      hostname_resolved, writable_sockets, except_sockets = IO.select(
        hostname_resolution_notifier,
        connecting_sockets.keys,
        # Use errorfds to wait for non-blocking connect failures on Windows
        is_windows_environment ? connecting_sockets.keys : nil,
        second_to_timeout(current_clock_time, ends_at),
      )
      now = current_clock_time
      resolution_delay_expires_at = nil if expired?(now, resolution_delay_expires_at)
      connection_attempt_delay_expires_at = nil if expired?(now, connection_attempt_delay_expires_at)

      if writable_sockets&.any?
        while (writable_socket = writable_sockets.pop)
          is_connected = is_windows_environment || (
            sockopt = writable_socket.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
            sockopt.int.zero?
          )

          if is_connected
            connecting_sockets.delete writable_socket
            return writable_socket
          else
            failed_ai = connecting_sockets.delete writable_socket
            writable_socket.close
            ip_address = failed_ai.ipv6? ? "[#{failed_ai.ip_address}]" : failed_ai.ip_address
            last_error = SystemCallError.new("connect(2) for #{ip_address}:#{failed_ai.ip_port}", sockopt.int)

            if writable_sockets.any? || connecting_sockets.any?
              # Try other writable socket in next "while"
              # Or exit this "while" and wait for connections to be established or hostname resolution in next loop
            elsif resolution_store.any_addrinfos? || resolution_store.any_unresolved_family?
              # Exit this "while" and try other connection attempt
              # Or exit this "while" and wait for hostname resolution in next loop
              connection_attempt_delay_expires_at = nil
              user_specified_connect_timeout_at = nil
            else
              raise last_error
            end
          end
        end
      end

      if except_sockets&.any?
        except_sockets.each do |except_socket|
          failed_ai = connecting_sockets.delete except_socket
          sockopt = except_socket.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
          except_socket.close
          ip_address = failed_ai.ipv6? ? "[#{failed_ai.ip_address}]" : failed_ai.ip_address
          last_error = SystemCallError.new("connect(2) for #{ip_address}:#{failed_ai.ip_port}", sockopt.int)

          if except_sockets.any? || connecting_sockets.any?
            # Cleanup other except socket in next "each"
            # Or exit this "while" and wait for connections to be established or hostname resolution in next loop
          elsif resolution_store.any_addrinfos? || resolution_store.any_unresolved_family?
            # Exit this "while" and try other connection attempt
            # Or exit this "while" and wait for hostname resolution in next loop
            connection_attempt_delay_expires_at = nil
            user_specified_connect_timeout_at = nil
          else
            raise last_error
          end
        end
      end

      if hostname_resolved&.any?
        while (family_and_result = hostname_resolution_result.get)
          family_name, result = family_and_result

          if result.is_a? Exception
            resolution_store.add_error(family_name, result)

            unless (Socket.const_defined?(:EAI_ADDRFAMILY)) &&
              (result.is_a?(Socket::ResolutionError)) &&
              (result.error_code == Socket::EAI_ADDRFAMILY)
              other = family_name == :ipv6 ? :ipv4 : :ipv6
              if !resolution_store.resolved?(other) || !resolution_store.resolved_successfully?(other)
                last_error = result
                last_error_from_thread = true
              end
            end
          else
            resolution_store.add_resolved(family_name, result)
          end
        end

        if resolution_store.resolved?(:ipv4)
          if resolution_store.resolved?(:ipv6)
            hostname_resolution_notifier = nil
            resolution_delay_expires_at = nil
            user_specified_resolv_timeout_at = nil
          elsif resolution_store.resolved_successfully?(:ipv4)
            resolution_delay_expires_at = now + RESOLUTION_DELAY
          end
        end
      end

      if resolution_store.empty_addrinfos?
        if connecting_sockets.empty? && resolution_store.resolved_all_families?
          if last_error_from_thread
            raise last_error.class, last_error.message, cause: last_error
          else
            raise last_error
          end
        end

        if (expired?(now, user_specified_resolv_timeout_at) || resolution_store.resolved_all_families?) &&
           (expired?(now, user_specified_connect_timeout_at) || connecting_sockets.empty?)
          raise Errno::ETIMEDOUT, 'user specified timeout'
        end
      end
    end
  ensure
    hostname_resolution_threads.each do |thread|
      thread.exit
    end

    hostname_resolution_result&.close

    connecting_sockets.each_key do |connecting_socket|
      connecting_socket.close
    end
  end

  def self.tcp_without_fast_fallback(host, port, local_host, local_port, connect_timeout:, resolv_timeout:)
    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

    ret
  end
  private_class_method :tcp_without_fast_fallback

  def self.ip_address?(hostname)
    hostname.match?(IPV6_ADRESS_FORMAT) || hostname.match?(/\A([0-9]{1,3}\.){3}[0-9]{1,3}\z/)
  end
  private_class_method :ip_address?

  def self.resolve_hostname(family, host, port, hostname_resolution_result)
    begin
      resolved_addrinfos = Addrinfo.getaddrinfo(host, port, ADDRESS_FAMILIES[family], :STREAM)
      hostname_resolution_result.add(family, resolved_addrinfos)
    rescue => e
      hostname_resolution_result.add(family, e)
    end
  end
  private_class_method :resolve_hostname

  def self.current_clock_time
    Process.clock_gettime(Process::CLOCK_MONOTONIC)
  end
  private_class_method :current_clock_time

  def self.second_to_timeout(started_at, ends_at)
    return nil if ends_at == Float::INFINITY || ends_at.nil?

    remaining = (ends_at - started_at)
    remaining.negative? ? 0 : remaining
  end
  private_class_method :second_to_timeout

  def self.expired?(started_at, ends_at)
    second_to_timeout(started_at, ends_at)&.zero?
  end
  private_class_method :expired?

  class HostnameResolutionResult
    def initialize(size)
      @size = size
      @taken_count = 0
      @rpipe, @wpipe = IO.pipe
      @results = []
      @mutex = Mutex.new
    end

    def notifier
      [@rpipe]
    end

    def add(family, result)
      @mutex.synchronize do
        @results.push [family, result]
        @wpipe.putc HOSTNAME_RESOLUTION_QUEUE_UPDATED
      end
    end

    def get
      return nil if @results.empty?

      res = nil

      @mutex.synchronize do
        @rpipe.getbyte
        res = @results.shift
      end

      @taken_count += 1
      close if @taken_count == @size
      res
    end

    def close
      @rpipe.close
      @wpipe.close
    end
  end
  private_constant :HostnameResolutionResult

  class HostnameResolutionStore
    PRIORITY_ON_V6 = [:ipv6, :ipv4].freeze
    PRIORITY_ON_V4 = [:ipv4, :ipv6].freeze

    def initialize(family_names)
      @family_names = family_names
      @addrinfo_dict = {}
      @error_dict = {}
      @last_family = nil
    end

    def add_resolved(family_name, addrinfos)
      @addrinfo_dict[family_name] = addrinfos
    end

    def add_error(family_name, error)
      @addrinfo_dict[family_name] = []
      @error_dict[family_name] = error
    end

    def get_addrinfo
      precedences =
        case @last_family
        when :ipv4, nil then PRIORITY_ON_V6
        when :ipv6      then PRIORITY_ON_V4
        end

      precedences.each do |family_name|
        addrinfo = @addrinfo_dict[family_name]&.shift
        next unless addrinfo

        @last_family = family_name
        return addrinfo
      end

      nil
    end

    def empty_addrinfos?
      @addrinfo_dict.all? { |_, addrinfos| addrinfos.empty? }
    end

    def any_addrinfos?
      !empty_addrinfos?
    end

    def resolved?(family)
      @addrinfo_dict.has_key? family
    end

    def resolved_successfully?(family)
      resolved?(family) && !@error_dict[family]
    end

    def resolved_all_families?
      (@family_names - @addrinfo_dict.keys).empty?
    end

    def any_unresolved_family?
      !resolved_all_families?
    end
  end
  private_constant :HostnameResolutionStore

  # :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 #=> [#<Socket:fd 3>, #<Socket:fd 4>]
  #
  #   # The sockets contains IPv6 and IPv4 sockets.
  #   sockets.each {|s| p s.local_address }
  #   #=> #<Addrinfo: [::]:1296 TCP>
  #   #   #<Addrinfo: 0.0.0.0:1296 TCP>
  #
  #   # 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 }
  #   #=> #<Addrinfo: [::]:53114 TCP>
  #   #   #<Addrinfo: 0.0.0.0:53114 TCP>
  #
  #   # The block is called with the sockets.
  #   Socket.tcp_server_sockets(0) {|sockets|
  #     p sockets #=> [#<Socket:fd 3>, #<Socket:fd 4>]
  #   }
  #
  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                  #=> #<Socket:fd 3>
  #   p socket.local_address    #=> #<Addrinfo: /tmp/s SOCK_STREAM>
  #
  #   Socket.unix_server_socket("/tmp/sock") {|s|
  #     p s                     #=> #<Socket:fd 3>
  #     p s.local_address       #=> # #<Addrinfo: /tmp/sock SOCK_STREAM>
  #   }
  #
  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#recv_nonblock returns nil.
  # In most cases it means the connection was closed, but it may also mean
  # an empty packet was received, as the underlying API makes
  # it impossible to distinguish these two cases.
  #
  # === 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)
ruby/tmpdir.rb000064400000013167150403134270007360 0ustar00# 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

  # Class variables are inaccessible from non-main Ractor.
  # And instance variables too, in Ruby 3.0.

  ##
  # Returns the operating system's temporary file path.
  #
  #   require 'tmpdir'
  #   Dir.tmpdir # => "/tmp"

  def self.tmpdir
    Tmpname::TMPDIR_CANDIDATES.find do |name, dir|
      unless dir
        next if !(dir = ENV[name] rescue next) or dir.empty?
      end
      dir = File.expand_path(dir)
      stat = File.stat(dir) rescue next
      case
      when !stat.directory?
        warn "#{name} is not a directory: #{dir}"
      when !File.writable?(dir)
        # We call File.writable?, not stat.writable?, because you can't tell if a dir is actually
        # writable just from stat; OS mechanisms other than user/group/world bits can affect this.
        warn "#{name} is not writable: #{dir}"
      when stat.world_writable? && !stat.sticky?
        warn "#{name} is world-writable: #{dir}"
      else
        break dir
      end
    end or raise ArgumentError, "could not find a temporary directory"
  end

  # Dir.mktmpdir creates a temporary directory.
  #
  #   require 'tmpdir'
  #   Dir.mktmpdir {|dir|
  #     # use the 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, <i>prefix_suffix</i>.
  # - 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 <i>tmpdir</i> 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") { something using the file }
  #  }
  #
  # 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") { something using the file }
  #  ensure
  #    # remove the directory.
  #    FileUtils.remove_entry dir
  #  end
  #
  def self.mktmpdir(prefix_suffix=nil, *rest, **options, &block)
    base = nil
    path = Tmpname.create(prefix_suffix || "d", *rest, **options) {|path, _, _, d|
      base = d
      mkdir(path, 0700)
    }
    if block
      begin
        yield path.dup
      ensure
        unless base
          base = File.dirname(path)
          stat = File.stat(base)
          if stat.world_writable? and !stat.sticky?
            raise ArgumentError, "parent directory is world writable but not sticky: #{base}"
          end
        end
        FileUtils.remove_entry path
      end
    else
      path
    end
  end

  # Temporary name generator
  module Tmpname # :nodoc:
    module_function

    # System-wide temporary directory path
    systmpdir = (defined?(Etc.systmpdir) ? Etc.systmpdir.freeze : '/tmp')

    # Temporary directory candidates consisting of environment variable
    # names or description and path pairs.
    TMPDIR_CANDIDATES = [
      'TMPDIR', 'TMP', 'TEMP',
      ['system temporary path', systmpdir],
      %w[/tmp /tmp],
      %w[. .],
    ].each(&:freeze).freeze

    def tmpdir
      Dir.tmpdir
    end

    # Unusable characters as path name
    UNUSABLE_CHARS = "^,-.0-9A-Z_a-z~"

    # Dedicated random number generator
    RANDOM = Object.new
    class << RANDOM # :nodoc:
      # Maximum random number
      MAX = 36**6 # < 0x100000000

      # Returns new random string upto 6 bytes
      def next
        (::Random.urandom(4).unpack1("L")%MAX).to_s(36)
      end
    end
    RANDOM.freeze
    private_constant :RANDOM

    # Generates and yields random names to create a temporary name
    def create(basename, tmpdir=nil, max_try: nil, **opts)
      if tmpdir
        origdir = tmpdir = File.path(tmpdir)
        raise ArgumentError, "empty parent path" if tmpdir.empty?
      else
        tmpdir = tmpdir()
      end
      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
ruby/date.rb000064400000002251150403134270006766 0ustar00# frozen_string_literal: true
# date.rb: Written by Tadayoshi Funaba 1998-2011

require 'date_core'

class Date
  VERSION = "3.4.1" # :nodoc:

  # call-seq:
  #   infinite? -> false
  #
  # Returns +false+
  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 Float::INFINITY; return d <=> 1
      when -Float::INFINITY; return d <=> -1
      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
ruby/time.rb000064400000057727150403134270007031 0ustar00# frozen_string_literal: true
# shareable_constant_value: literal

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

  VERSION = "0.4.1"             # :nodoc:

  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
    # <code>-10:00</code> or <code>+1330</code> will work, as will
    # simpler hour-only time zones like <code>-10</code> or
    # <code>+13</code>.
    #
    # 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

    # :stopdoc:
    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:
ruby/ruby_vm/mjit/hooks.rb000064400000001623150403134270011624 0ustar00 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, zoneruby/ruby_vm/mjit/c_pointer.rb000064400000022031150403134300012451 0ustar00 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
    # :startdoc:

    #
    # 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
    # <tt>Time.local(year, 1, 1).zone</tt> and
    # <tt>Time.local(year, 7, 1).zone</tt>.
    # 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.
    #
    # Raises ArgumentError if the date or format is invalid.
    #
    # 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, "invaliruby/ruby_vm/mjit/compiler.rb000064400000116651150403134300012315 0ustar00AN' => 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
    strftime('%a, %d %b %Y %T ') << (utc? ? '-0000' : strftime('%z'))
  end
  alias rfc822 rfc2822

  #
  # 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
    getutc.strftime('%a, %d %b %Y %T GMT')
  end

  unless method_defined?(:xmlschema)
    #
    # 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.
    #
    # +fraction_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
  end
  alias iso8601 xmlschema unless method_defined?(:iso8601)
end
ruby/tempfile.rb000064400000051264150403134270007666 0ustar00# frozen_string_literal: true
#
# tempfile - manipulates temporary files
#
# $Id$
#

require 'delegate'
require 'tmpdir'

# A utility class for managing temporary files.
#
# There are two kind of methods of creating a temporary file:
#
# - Tempfile.create (recommended)
# - Tempfile.new and Tempfile.open (mostly for backward compatibility, not recommended)
#
# Tempfile.create creates a usual \File object.
# The timing of file deletion is predictable.
# Also, it supports open-and-unlink technique which
# removes the temporary file immediately after creation.
#
# Tempfile.new and Tempfile.open creates a \Tempfile object.
# The created file is removed by the GC (finalizer).
# The timing of file deletion is not predictable.
#
# == Synopsis
#
#   require 'tempfile'
#
#   # Tempfile.create with a block
#   # The filename are choosen automatically.
#   # (You can specify the prefix and suffix of the filename by an optional argument.)
#   Tempfile.create {|f|
#     f.puts "foo"
#     f.rewind
#     f.read                # => "foo\n"
#   }                       # The file is removed at block exit.
#
#   # Tempfile.create without a block
#   # You need to unlink the file in non-block form.
#   f = Tempfile.create
#   f.puts "foo"
#   f.close
#   File.unlink(f.path)     # You need to unlink the file.
#
#   # Tempfile.create(anonymous: true) without a block
#   f = Tempfile.create(anonymous: true)
#   # The file is already removed because anonymous.
#   f.path                  # => "/tmp/"  (no filename since no file)
#   f.puts "foo"
#   f.rewind
#   f.read                  # => "foo\n"
#   f.close
#
#   # Tempfile.create(anonymous: true) with a block
#   Tempfile.create(anonymous: true) {|f|
#     # The file is already removed because anonymous.
#     f.path                # => "/tmp/"  (no filename since no file)
#     f.puts "foo"
#     f.rewind
#     f.read                # => "foo\n"
#   }
#
#   # Not recommended: Tempfile.new without a block
#   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
#
# == About Tempfile.new and Tempfile.open
#
# This section does not apply to Tempfile.create because
# it returns a File object (not a Tempfile object).
#
# 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.
#
# A Tempfile object has a finalizer to remove the temporary file.
# This means that the temporary file is removed via GC.
# This can cause several problems:
#
# - Long GC intervals and conservative GC can accumulate temporary files that are not removed.
# - Temporary files are not removed if Ruby exits abnormally (such as SIGKILL, SEGV).
#
# There are legacy good practices for Tempfile.new and Tempfile.open as follows.
#
# === 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 it's unnecessary to explicitly delete a Tempfile after use, though
# it's a good practice to do so: not explicitly deleting unused Tempfiles can
# potentially leave behind a large number of temp files 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.create('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.
#
# Also, this guarantees the temporary file is removed even if Ruby exits abnormally.
# The OS reclaims the storage for the temporary file when the file is closed or
# the Ruby process exits (normally or abnormally).
#
# 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.
#
# `Tempfile.create(anonymous: true)` supports this behavior.
# It also works on Windows.
#
# == 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)

  # The version
  VERSION = "0.3.1"

  # Creates a file in the underlying file system;
  # returns a new \Tempfile object based on that file.
  #
  # If possible, consider instead using Tempfile.create, which:
  #
  # - Avoids the performance cost of delegation,
  #   incurred when Tempfile.new calls its superclass <tt>DelegateClass(File)</tt>.
  # - Does not rely on a finalizer to close and unlink the file,
  #   which can be unreliable.
  #
  # Creates and returns file whose:
  #
  # - Class is \Tempfile (not \File, as in Tempfile.create).
  # - Directory is the system temporary directory (system-dependent).
  # - Generated filename is unique in that directory.
  # - Permissions are <tt>0600</tt>;
  #   see {File Permissions}[rdoc-ref:File@File+Permissions].
  # - Mode is <tt>'w+'</tt> (read/write mode, positioned at the end).
  #
  # The underlying file is removed when the \Tempfile object dies
  # and is reclaimed by the garbage collector.
  #
  # Example:
  #
  #   f = Tempfile.new # => #<Tempfile:/tmp/20220505-17839-1s0kt30>
  #   f.class               # => Tempfile
  #   f.path                # => "/tmp/20220505-17839-1s0kt30"
  #   f.stat.mode.to_s(8)   # => "100600"
  #   File.exist?(f.path)   # => true
  #   File.unlink(f.path)   #
  #   File.exist?(f.path)   # => false
  #
  # Argument +basename+, if given, may be one of:
  #
  # - A string: the generated filename begins with +basename+:
  #
  #     Tempfile.new('foo') # => #<Tempfile:/tmp/foo20220505-17839-1whk2f>
  #
  # - An array of two strings <tt>[prefix, suffix]</tt>:
  #   the generated filename begins with +prefix+ and ends with +suffix+:
  #
  #     Tempfile.new(%w/foo .jpg/) # => #<Tempfile:/tmp/foo20220505-17839-58xtfi.jpg>
  #
  # With arguments +basename+ and +tmpdir+, the file is created in directory +tmpdir+:
  #
  #   Tempfile.new('foo', '.') # => #<Tempfile:./foo20220505-17839-xfstr8>
  #
  # Keyword arguments +mode+ and +options+ are passed directly to method
  # {File.open}[rdoc-ref:File.open]:
  #
  # - The value given with +mode+ must be an integer,
  #   and may be expressed as the logical OR of constants defined in
  #   {File::Constants}[rdoc-ref:File::Constants].
  # - For +options+, see {Open Options}[rdoc-ref:IO@Open+Options].
  #
  # Related: Tempfile.create.
  #
  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
    tmpfile = nil
    ::Dir::Tmpname.create(basename, tmpdir, **options) do |tmpname, n, opts|
      opts[:perm] = 0600
      tmpfile = File.open(tmpname, @mode, **opts)
      @opts = opts.freeze
    end

    super(tmpfile)

    @finalizer_manager = FinalizerManager.new(__getobj__.path)
    @finalizer_manager.register(self, __getobj__)
  end

  def initialize_dup(other) # :nodoc:
    initialize_copy_iv(other)
    super(other)
    @finalizer_manager.register(self, __getobj__)
  end

  def initialize_clone(other) # :nodoc:
    initialize_copy_iv(other)
    super(other)
    @finalizer_manager.register(self, __getobj__)
  end

  private def initialize_copy_iv(other) # :nodoc:
    @unlinked = other.unlinked
    @mode = other.mode
    @opts = other.opts
    @finalizer_manager = other.finalizer_manager
  end

  # Opens or reopens the file with mode "r+".
  def open
    _close

    mode = @mode & ~(File::CREAT|File::EXCL)
    __setobj__(File.open(__getobj__.path, mode, **@opts))

    @finalizer_manager.register(self, __getobj__)

    __getobj__
  end

  def _close    # :nodoc:
    __getobj__.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
  # <tt>close(true)</tt>.
  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(__getobj__.path)
    rescue Errno::ENOENT
    rescue Errno::EACCES
      # may not be able to unlink on Windows; just ignore
      return
    end

    @finalizer_manager.unlinked = true

    @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 : __getobj__.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 !__getobj__.closed?
      __getobj__.size # File#size calls rb_io_flush_raw()
    else
      File.size(__getobj__.path)
    end
  end
  alias length size

  # :stopdoc:
  def inspect
    if __getobj__.closed?
      "#<#{self.class}:#{path} (closed)>"
    else
      "#<#{self.class}:#{path}>"
    end
  end
  alias to_s inspect

  protected

  attr_reader :unlinked, :mode, :opts, :finalizer_manager

  class FinalizerManager # :nodoc:
    attr_accessor :unlinked

    def initialize(path)
      @open_files = {}
      @path = path
      @pid = Process.pid
      @unlinked = false
    end

    def register(obj, file)
      ObjectSpace.undefine_finalizer(obj)
      ObjectSpace.define_finalizer(obj, self)
      @open_files[obj.object_id] = file
    end

    def call(object_id)
      @open_files.delete(object_id).close

      if @open_files.empty? && !@unlinked && Process.pid == @pid
        $stderr.puts "removing #{@path}..." if $DEBUG
        begin
          File.unlink(@path)
        rescue Errno::ENOENT
        end
        $stderr.puts "done" if $DEBUG
      end
    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 (<code>*args</code>) 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 file in the underlying file system;
# returns a new \File object based on that file.
#
# With no block given and no arguments, creates and returns file whose:
#
# - Class is {File}[rdoc-ref:File] (not \Tempfile).
# - Directory is the system temporary directory (system-dependent).
# - Generated filename is unique in that directory.
# - Permissions are <tt>0600</tt>;
#   see {File Permissions}[rdoc-ref:File@File+Permissions].
# - Mode is <tt>'w+'</tt> (read/write mode, positioned at the end).
#
# The temporary file removal depends on the keyword argument +anonymous+ and
# whether a block is given or not.
# See the description about the +anonymous+ keyword argument later.
#
# Example:
#
#   f = Tempfile.create     # => #<File:/tmp/20220505-9795-17ky6f6>
#   f.class                 # => File
#   f.path                  # => "/tmp/20220505-9795-17ky6f6"
#   f.stat.mode.to_s(8)     # => "100600"
#   f.close
#   File.exist?(f.path)     # => true
#   File.unlink(f.path)
#   File.exist?(f.path)     # => false
#
#   Tempfile.create {|f|
#     f.puts "foo"
#     f.rewind
#     f.read                # => "foo\n"
#     f.path                # => "/tmp/20240524-380207-oma0ny"
#     File.exist?(f.path)   # => true
#   }                       # The file is removed at block exit.
#
#   f = Tempfile.create(anonymous: true)
#   # The file is already removed because anonymous
#   f.path                  # => "/tmp/"  (no filename since no file)
#   f.puts "foo"
#   f.rewind
#   f.read                  # => "foo\n"
#   f.close
#
#   Tempfile.create(anonymous: true) {|f|
#     # The file is already removed because anonymous
#     f.path                # => "/tmp/"  (no filename since no file)
#     f.puts "foo"
#     f.rewind
#     f.read                # => "foo\n"
#   }
#
# The argument +basename+, if given, may be one of the following:
#
# - A string: the generated filename begins with +basename+:
#
#     Tempfile.create('foo') # => #<File:/tmp/foo20220505-9795-1gok8l9>
#
# - An array of two strings <tt>[prefix, suffix]</tt>:
#   the generated filename begins with +prefix+ and ends with +suffix+:
#
#     Tempfile.create(%w/foo .jpg/) # => #<File:/tmp/foo20220505-17839-tnjchh.jpg>
#
# With arguments +basename+ and +tmpdir+, the file is created in the directory +tmpdir+:
#
#   Tempfile.create('foo', '.') # => #<File:./foo20220505-9795-1emu6g8>
#
# Keyword arguments +mode+ and +options+ are passed directly to the method
# {File.open}[rdoc-ref:File.open]:
#
# - The value given for +mode+ must be an integer
#   and may be expressed as the logical OR of constants defined in
#   {File::Constants}[rdoc-ref:File::Constants].
# - For +options+, see {Open Options}[rdoc-ref:IO@Open+Options].
#
# The keyword argument +anonymous+ specifies when the file is removed.
#
# - <tt>anonymous=false</tt> (default) without a block: the file is not removed.
# - <tt>anonymous=false</tt> (default) with a block: the file is removed after the block exits.
# - <tt>anonymous=true</tt> without a block: the file is removed before returning.
# - <tt>anonymous=true</tt> with a block: the file is removed before the block is called.
#
# In the first case (<tt>anonymous=false</tt> without a block),
# the file is not removed automatically.
# It should be explicitly closed.
# It can be used to rename to the desired filename.
# If the file is not needed, it should be explicitly removed.
#
# The File#path method of the created file object returns the temporary directory with a trailing slash
# when +anonymous+ is true.
#
# When a block is given, it creates the file as described above, passes it to the block,
# and returns the block's value.
# Before the returning, the file object is closed and the underlying file is removed:
#
#   Tempfile.create {|file| file.path } # => "/tmp/20220505-9795-rkists"
#
# Implementation note:
#
# The keyword argument +anonymous=true+ is implemented using FILE_SHARE_DELETE on Windows.
# O_TMPFILE is used on Linux.
#
# Related: Tempfile.new.
#
def Tempfile.create(basename="", tmpdir=nil, mode: 0, anonymous: false, **options, &block)
  if anonymous
    create_anonymous(basename, tmpdir, mode: mode, **options, &block)
  else
    create_with_filename(basename, tmpdir, mode: mode, **options, &block)
  end
end

class << Tempfile
private def create_with_filename(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

if RUBY_VERSION < "3.2"
  module PathAttr               # :nodoc:
    attr_reader :path

    def self.set_path(file, path)
      file.extend(self).instance_variable_set(:@path, path)
    end
  end
end

private def create_anonymous(basename="", tmpdir=nil, mode: 0, **options, &block)
  tmpfile = nil
  tmpdir = Dir.tmpdir() if tmpdir.nil?
  if defined?(File::TMPFILE) # O_TMPFILE since Linux 3.11
    begin
      tmpfile = File.open(tmpdir, File::RDWR | File::TMPFILE, 0600)
    rescue Errno::EISDIR, Errno::ENOENT, Errno::EOPNOTSUPP
      # kernel or the filesystem does not support O_TMPFILE
      # fallback to create-and-unlink
    end
  end
  if tmpfile.nil?
    mode |= File::SHARE_DELETE | File::BINARY # Windows needs them to unlink the opened file.
    tmpfile = create_with_filename(basename, tmpdir, mode: mode, **options)
    File.unlink(tmpfile.path)
    tmppath = tmpfile.path
  end
  path = File.join(tmpdir, '')
  unless tmppath == path
    # clear path.
    tmpfile.autoclose = false
    tmpfile = File.new(tmpfile.fileno, mode: File::RDWR, path: path)
    PathAttr.set_path(tmpfile, path) if defined?(PathAttr)
  end
  if block
    begin
      yield tmpfile
    ensure
      tmpfile.close
    end
  else
    tmpfile
  end
end
end
ruby/ruby_vm/mjit/instruction.rb000064400000204503150403134270013064 0ustar00ere 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
  TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze
  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)
    _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_, str, enc)
  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)
    _decode_uri_component(/\+|%\h\h/, str, enc)
  end

  # Encodes +str+ using URL encoding
  #
  # This encodes SP to %20 instead of +.
  def self.encode_uri_component(str, enc=nil)
    _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCURICOMP_, str, enc)
  end

  # Decodes given +str+ of URL-encoded data.
  #
  # This does not decode + to SP.
  def self.decode_uri_component(str, enc=Encoding::UTF_8)
    _decode_uri_component(/%\h\h/, str, enc)
  end

  def self._encode_uri_component(regexp, table, str, enc)
    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!(regexp, table)
    str.force_encoding(Encoding::US_ASCII)
  end
  private_class_method :_encode_uri_component

  def self._decode_uri_component(regexp, str, enc)
    raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/.match?(str)
    str.b.gsub(regexp, TBLDECWWWCOMP_).force_encoding(enc)
  end
  private_class_method :_decode_uri_component

  # 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",
 ruby/ruby_vm/mjit/c_type.rb000064400000004766150403134300011771 0ustar00"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-1ruby/uri/wss.rb000064400000001023150403134320007454 0ustar002",
    "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"ruby/csv.rb000064400000270742150403134300006652 0ustar00ustar00ruby/uri/wss.rb000064400000001023150403134320007454 0ustar00# frozen_string_literal: false
# = uri/wss.rb
#
# Author:: Matt Muller <mamuller@amazon.com>
# 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

  register_scheme 'WSS', WSS
end
ruby/uri/file.rb000064400000004370150403134320007567 0ustar00# 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 availableruby/uri/ldap.rb000064400000013437150403134320007574 0ustar00 "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"
    #
    #     uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')})
    #     uri3.to_s  # => "file:///path/my%20file.txt"
    #
    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

  register_scheme 'FILE', File
end
ruby/uri/ldap.rb000064400000013437150403134320007574 0ustar00# frozen_string_literal: false
# = uri/ldap.rb
#
# Author::
#  Takaaki Tateishi <ttate@jaist.ac.jp>
#  Akira Yamada <akira@ruby-lang.org>
# 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://<host>/<dn>[?<attrs>[?<scope>[?<filter>[?<extensions>]]]]
  #++
  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 <code>[host, port, dn, attributes, scope, filter, extensions]</code>.
    #
    # 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 +attributeruby/uri/generic.rb000064400000111716150403134320010267 0ustar00 = 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

  register_scheme 'LDAP', LDAP
end
ruby/uri/generic.rb000064400000111716150403134320010267 0ustar00# frozen_string_literal: true

# = uri/generic.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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 <code>[user, password]</code>
    # 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 (without URI decoding).
    def user
      @user
    end

    # Returns the password component (without URI decoding).
    def password
      @password
    end

    # Returns the user component after URI decoding.
    def decoded_user
      URI.decode_uri_component(@user) if @user
    end

    # Returns the password component after URI decoding.
    def decoded_password
      URI.decode_uri_component(@password) if @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
      v&.start_with?('[') && v.end_with?(']') ? v[1..-2] : 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 !(v&.start_with?('[') && v&.end_with?(']')) && v&.index(':')
      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_userinfo(rel.userinfo)
        base.set_host(rel.host)
        base.set_port(rel.port || base.default_port)
        base.set_path(rel.path)
      elsif base.path && rel.path
        base.set_path(merge_path(base.path, rel.path))
      end

      # RFC2396, Section 5.2, 7)
      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')
    #   #=> #<URI::Generic /main.rbx?page=1>
    #
    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')
    #   #=> #<URI::Generic /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
    #   #=> #<URI::HTTP http://my.example.com/>
    #
    # 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")
    #   #=> [#<URI::HTTP http://foo.com>, #<URI::HTTP http://my.example.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_ruby/syntax_suggest.rb000064400000000112150403134320011126 0ustar00      end
        else
          unless proxy_uri = env[name]
            ruby/yaml/dbm.rb000064400000015451150403134320007557 0ustar00= 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
ruby/syntax_suggest.rb000064400000000112150403134320011126 0ustar00# frozen_string_literal: true

require_relative "syntax_suggest/core_ext"
ruby/yaml/dbm.rb000064400000015451150403134320007557 0ustar00# 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.
    druby/ruby_vm/mjit/hooks.rb000064400000001623150403134270011624 0ustar00for 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| ... }
    #
  ruby/ruby_vm/mjit/c_pointer.rb000064400000022031150403134300012451 0ustar00  #
    # 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 repruby/yaml/store.rb000064400000003523150403134320010146 0ustar00t { |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
ruby/yaml/store.rb000064400000003523150403134320010146 0ustar00ruby/forwardable.rb000064400000022035150403134320010337 0ustar00}
#   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.unsafe_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
ruby/forwardable.rb000064400000022035150403134320010337 0ustar00# 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 <tt>@records</tt>.  You could provide the lookup method
# #record_number(), which simply calls #[] on the <tt>@records</tt>
# 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 = Thread::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.3"
  VERSION.freeze
  FORWARDABLE_VERSION = VERSION
  FORWARDABLE_VERSION.freeze

  @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, insruby/ruby_vm/mjit/compiler.rb000064400000116651150403134300012315 0ustar00accessor, 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 SingleForruby/optparse.rb000064400000172077150403134320007720 0ustar00#
  #   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
ruby/optparse.rb000064400000172077150403134320007720 0ustar00# 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
#
# === New to \OptionParser?
#
# See the {Tutorial}[optparse/tutorial.rdoc].
#
# === 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 `<main>': 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
#   #<struct User id=1, name="Sam">
#   $ ruby optparse-test.rb --user 2
#   #<struct User id=2, name="Gandalf">
#   $ 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'
#
#   options = {}
#   OptionParser.new do |parser|
#     parser.on('-a')
#     parser.on('-b NUM', Integer)
#     parser.on('-v', '--verbose')
#   end.parse!(into: options)
#
#   p options
#
# 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, along with the accompanying
# {Tutorial}[optparse/tutorial.rdoc],
# 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.3.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) # :nodoc:
      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 = []) # :nodoc:
      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

    def pretty_print_contents(q) # :nodoc:
      if @block
        q.text ":" + @block.source_location.join(":") + ":"
        first = false
      else
        first = true
      end
      [@short, @long].each do |list|
        list.each do |opt|
          if first
            q.text ":"
            first = false
          end
          q.breakable
          q.text opt
        end
      end
    end

    def pretty_print(q)         # :nodoc:
      q.object_group(self) {pretty_print_contents(q)}
    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

      def pretty_head           # :nodoc:
        "NoArgument"
      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

      def pretty_head           # :nodoc:
        "Required"
      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

      def pretty_head           # :nodoc:
        "Optional"
      end
    end

    #
    # Switch that takes an argument, which does not begin with '-' or is '-'.
    #
    class PlacedArgument < self

      #
      # Returns nil if argument is not present or begins with '-' and is not '-'.
      #
      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

      def pretty_head       ruby/reline.rb000064400000043374150403134300007334 0ustar00h 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

    def pretty_print(q)         # :nodoc:
      q.group(1, "(", ")") do
        @list.each do |sw|
          next unless Switch === sw
          q.group(1, "(" + sw.pretty_head, ")") do
            sw.pretty_print_contents(q)
          end
        end
      end
    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) # :nodoc:
      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
    @raise_unknown = true
    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

  # Whether to raise at unknown option.
  attr_accessor :raise_unknown

  #
  # 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_ruby/ruby_vm/mjit/c_type.rb000064400000004766150403134300011771 0ustar00 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

  def pretty_print(q)           # :nodoc:
    q.object_group(self) do
      first = true
      if @stack.size > 2
        @stack.each_with_index do |s, i|
          next if i < 2
          next if s.list.empty?
          if first
            first = false
            q.text ":"
          end
          q.breakable
          s.pretty_print(q)
        end
      end
    end
  end

  def inspect                   # :nodoc:
    require 'pp'
    pretty_print_inspect
  end

  #
  # 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) # :nodoc:
    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)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def make_switch(opts, block = nil)
    short, loruby/csv.rb000064400000270742150403134300006652 0ustar00      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) if o && !o.empty?
      end
    end

    default_pattern, conv = search(:atype, defauruby/cgi.rb000064400000023526150403134300006615 0ustar00     nolong
  end

  # :call-seq:
  #   define(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def define(*opts, &block)
    top.append(*(sw = make_switch(opts, block)))
    sw[0]
  end

  # :call-seq:
  #   on(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def on(*opts, &block)
    define(*opts, &block)
    self
  end
  alias def_option define

  # :call-seq:
  #   define_head(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def define_head(*opts, &block)
    top.prepend(*(sw = make_switch(opts, block)))
    sw[0]
  end

  # :call-seq:
  #   on_head(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  # The new option is added at the head of the summary.
  #
  def on_head(*opts, &block)
    define_head(*opts, &block)
    self
  end
  alias def_head_option define_head

  # :call-seq:
  #   define_tail(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def define_tail(*opts, &block)
    base.append(*(sw = make_switch(opts, block)))
    sw[0]
  end

  #
  # :call-seq:
  #   on_tail(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  # The new option is added at the tail of the 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
  # <code>[]=</code> 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)
              throw :terminate, arg unless raise_unknown
              raise InvalidOption, arg
            end
          rescue ParseError
            throw :terminate, arg unless raise_unknown
            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
            throw :terminate, arg unless raise_unknown
            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
  # <code>[]=</code> 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 <code>[]=</code> 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) # :nodoc:
    @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) # :nodoc:
    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) # :nodoc:
    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!(ruby/ripper/sexp.rb000064400000011054150403134300010324 0ustar00 into: into) 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), into: into) rescue nil
      }
    end
    begin
      parse(*File.readlines(filename, chomp: true), into: into)
      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
      case o = o.delete("imx")
      when ""
      when "u"
        s = s.encode(Encoding::UTF_8)
      when "e"
        s = s.encode(Encoding::EUC_JP)
      when "s"
        s = s.encode(Encoding::SJIS)
      when "n"
        f |= Regexp::NOENCODING
      else
        raise OptionParser::InvalidArgument, "unknown regexp option - #{o}"
      end
    else
      s ||= all
    end
    Regexp.new(s, f)
  end

  #
  # Exceptions
  #

  #
  # Base class of exceptions from OptionParser.
  #
  clruby/ripper/lexer.rb000064400000023270150403134300010467 0ustar00 #{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
    # ruby/yaml.rb000064400000004155150403134320007014 0ustar00f 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:
ruby/yaml.rb000064400000004155150403134320007014 0ustar00# frozen_string_literal: false

begin
  require 'psych'
rescue LoadError
  case RUBY_ENGINE
  when 'jruby'
  ruby/fileutils.rb000064400000236021150403134320010051 0ustar00 => '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
ruby/fileutils.rb000064400000236021150403134320010051 0ustar00# frozen_string_literal: true

begin
  require 'rbconfig'
rescue LoadError
  # for make mjit-headers
end

# Namespace for file utility methods for copying, moving, removing, etc.
#
# == What's Here
#
# First, what’s elsewhere. \Module \FileUtils:
#
# - Inherits from {class Object}[rdoc-ref:Object].
# - Supplements {class File}[rdoc-ref:File]
#   (but is not included or extended there).
#
# Here, module \FileUtils provides methods that are useful for:
#
# - {Creating}[rdoc-ref:FileUtils@Creating].
# - {Deleting}[rdoc-ref:FileUtils@Deleting].
# - {Querying}[rdoc-ref:FileUtils@Querying].
# - {Setting}[rdoc-ref:FileUtils@Setting].
# - {Comparing}[rdoc-ref:FileUtils@Comparing].
# - {Copying}[rdoc-ref:FileUtils@Copying].
# - {Moving}[rdoc-ref:FileUtils@Moving].
# - {Options}[rdoc-ref:FileUtils@Options].
#
# === Creating
#
# - ::mkdir: Creates directories.
# - ::mkdir_p, ::makedirs, ::mkpath: Creates directories,
#   also creating ancestor directories as needed.
# - ::link_entry: Creates a hard link.
# - ::ln, ::link: Creates hard links.
# - ::ln_s, ::symlink: Creates symbolic links.
# - ::ln_sf: Creates symbolic links, overwriting if necessary.
# - ::ln_sr: Creates symbolic links relative to targets
#
# === Deleting
#
# - ::remove_dir: Removes a directory and its descendants.
# - ::remove_entry: Removes an entry, including its descendants if it is a directory.
# - ::remove_entry_secure: Like ::remove_entry, but removes securely.
# - ::remove_file: Removes a file entry.
# - ::rm, ::remove: Removes entries.
# - ::rm_f, ::safe_unlink: Like ::rm, but removes forcibly.
# - ::rm_r: Removes entries and their descendants.
# - ::rm_rf, ::rmtree: Like ::rm_r, but removes forcibly.
# - ::rmdir: Removes directories.
#
# === Querying
#
# - ::pwd, ::getwd: Returns the path to the working directory.
# - ::uptodate?: Returns whether a given entry is newer than given other entries.
#
# === Setting
#
# - ::cd,ruby/ripper/filter.rb000064400000004160150403134300010632 0ustar00y copies files, optionally setting mode,
#   owner, and group.
#
# === Moving
#
# - ::mv, ::move: Moves entries.
#
# === Options
#
# - ::collect_method: Returns the names of methods that accept a given option.
# - ::commands: Returns the names of methods that accept options.
# - ::have_option?: Returns whether a given method accepts a given option.
# - ::options: Returns all option names.
# - ::options_of: Returns the names of the options for a given method.
#
# == Path Arguments
#
# Some methods in \FileUtils accept _path_ arguments,
# which are interpreted as paths to filesystem entries:
#
# - If the argument is a string, that value is the path.
# - If the argument has method +:to_path+, it is converted via that method.
# - If the argument has method +:to_str+, it is converted via that method.
#
# == About the Examples
#
# Some examples here involve trees of file entries.
# For these, we sometimes display trees using the
# {tree command-line utility}[https://en.wikipedia.org/wiki/Tree_(command)],
# which is a recursive directory-listing utility that produces
# a depth-indented listing of files and directories.
#
# We use a helper method to launch the command and control the format:
#
#   def tree(dirpath = '.')
#     command = "tree --noreport --charset=ascii #{dirpath}"
#     system(command)
#   end
#
# To illustrate:
#
#   tree('src0')
#   # => src0
#   #    |-- sub0
#   #    |   |-- src0.txt
#   #    |   `-- src1.txt
#   #    `-- sub1
#   #        |-- src2.txt
#   #        `-- src3.txt
#
# == Avoiding the TOCTTOU Vulnerability
#
# For certain methods that recursively remove entries,
# there is a potential vulnerability called the
# {Time-of-check to time-of-use}[https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use],
# or TOCTTOU, vulnerability that can exist when:
#
# - An ancestor directory of the entry at the target path is world writable;
#   such directories include <tt>/tmp</tt>.
# - The directory tree at the target path includes:
#
#   - A world-writable descendant directory.
#   - A symbolic link.
#
# To avoid that vulnerability, you can use this method to remove entries:
#
# - FileUtils.remove_entry_securuby/ripper/core.rb000064400000003253150403134300010277 0ustar00ss
#   or 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 is set.
#
# For details of this security vulnerability, see Perl cases:
#
# - {CVE-2005-0448}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448].
# - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452].
#
module FileUtils
  VERSION = "1.7.0"

  def self.private_module_function(name)   #:nodoc:
    module_function name
    private_class_method name
  end

  #
  # Returns a string containing the path to the current directory:
  #
  #   FileUtils.pwd # => "/rdoc/fileutils"
  #
  # FileUtils.getwd is an alias for FileUtils.pwd.
  #
  # Related: FileUtils.cd.
  #
  def pwd
    Dir.pwd
  end
  module_function :pwd

  alias getwd pwd
  module_function :getwd

  # Changes the working directory to the given +dir+, which
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments]:
  #
  # With no block given,
  # changes the current directory to the directory at +dir+; returns zero:
  #
  #   FileUtils.pwd # => "/rdoc/fileutils"
  #   FileUtils.cd('..')
  #   FileUtils.pwd # => "/rdoc"
  #   FileUtils.cd('fileutils')
  #
  # With a block given, changes the current directory to the directory
  # at +dir+, calls the block with argument +dir+,
  # and restores the original current directory; returns the block's value:
  #
  #   FileUtils.pwd                                     # => "/rdoc/fileutils"
  #   FileUtils.cd('..') { |arg| [arg, FileUtils.pwd] } # => ["..", "/rdocruby/resolv-replace.rb000064400000003415150403134300010771 0ustar00interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]:
  #
  #   FileUtils.uptodate?('Rakefile', ['Gemfile', 'README.md']) # => true
  #   FileUtils.uptodate?('Gemfile', ['Rakefile', 'README.md']) # => false
  #
  # A non-existent file is considered to be infinitely old.
  #
  # Related: FileUtils.touch.
  #
  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 directories at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, creates a directory at each +path+ in +list+
  # by calling: <tt>Dir.mkdir(path, mode)</tt>;
  # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
  #
  #   FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"]
  #   FileUtils.mkdir('tmp4')        # => ["tmp4"]
  #
  # Keyword arguments:
  #
  # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
  #   see {File.chmod}[rdoc-ref:File.chmod].
  # - <tt>noop: true</tt> - does not create directories.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.mkdir(%w[tmp0 tmp1], verbose: true)
  #     FileUtils.mkdir(%w[tmp2 tmp3], mode: 0700, verbose: true)
  #
  #   Output:
  #
  #     mkdir tmp0 tmp1
  #     mkdir -m 700 tmp2 tmp3
  #
  # Raises an exception if any pathruby/did_you_mean/version.rb000064400000000061150403134300012161 0ustar00 # With no keyword arguments, creates a directoryruby/did_you_mean/formatters/verbose_formatter.rb000064400000000402150403134300016411 0ustar00d: FileUtils.mkdir.
  #
  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|
      paruby/did_you_mean/formatters/plain_formatter.rb000064400000000250150403134300016050 0ustar00irectories at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argumentruby/did_you_mean/spell_checkers/key_error_checker.rb000064400000000732150403134300017154 0ustar00p3
  #     rmdir -p tmp4/tmp5
  #
  # Raises an exception if a directory does not exist
  # or if for any reason a directory cannot be removed.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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))
 ruby/did_you_mean/spell_checkers/require_path_checker.rb000064400000002356150403134300017647 0ustar00ath to an existing file
  # and +dest+ is the path to a non-existent file,
  # creates a hard link at +dest+ pointing to +src+; returns zero:
  #
  #   Dir.children('tmp0/')                    # => ["t.txt"]
  #   Dir.children('tmp1/')                    # => []
  #   FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk') # => 0
  #   Dir.children('tmp1/')                    # => ["t.lnk"]
  #
  # When +src+ is the path to an existing file
  # and +dest+ is the path to an existing directory,
  # creates a hard link at <tt>dest/src</tt> pointing to +src+; returns zero:
  #
  #   Dir.children('tmp2')               # => ["t.dat"]
  #   Dir.children('tmp3')               # => []
  #   FileUtils.ln('tmp2/t.dat', 'tmp3') # => 0
  #   Dir.children('tmp3')               # => ["t.dat"]
  #
  # When +src+ is an array of paths to existing files
  # and +dest+ is the path to an existing directory,
  # then for each path +target+ in +src+,
  # creates a hard link at <tt>dest/target</tt> pointing to +target+;
  # returns +src+:
  #
  #   Dir.children('tmp4/')                               # => []
  #   FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/') # => ["tmp0/t.txt", "tmp2/t.dat"]
  #   Dir.children('tmp4/')                               # => ["t.dat", "t.txt"]
  ruby/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb000064400000004115150403134300023737 0ustar00e: 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

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # creates links +dest+ and descendents pointing to +src+ and its descendents:
  #
  #   tree('src0')
  #   # => src0
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   File.exist?('dest0') # => false
  #   FileUtils.cp_lr('src0', 'dest0')
  #   tree('dest0')
  #   # => dest0
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # If +src+ and +dest+ are both paths to directories,
  # creates links <tt>dest/src</tt> and descendents
  # pointing to +src+ and its descendents:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   FileUtils.mkdir('dest1')
  #   FileUtils.cp_lr('src1', 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    `-- src1
  #   #        |-- sub0
  #   #        |   |-- src0.txt
  #   #        |   `-- src1.txt
  #   #        `-- sub1
  #   #            |-- src2.txt
  #   #            `-- src3.txt
  #
  # If +src+ is an array of paths to entries and +dest+ is the path to a directory,
  # for each path +filepath+ in +src+, creates a link at <tt>dest/filepath</tt>
  # pointing to that path:
  #
  #   tree('src2')
  #   # => src2
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #ruby/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb000064400000002300150403134300023251 0ustar00
  #     cp -lr src1 dest1
  #     cp -lr src2/sub0 src2/sub1 dest2
  #
  # Raises an exception if +dest+ is the path to an existing file or directory
  # and keyword argument <tt>remove_destination: true</tt> is not given.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Creates {symbolic links}[https://en.wikipedia.org/wiki/Symbolic_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to an existing file:
  #
  # - When +dest+ is the path to a non-existent file,
  #   creates a symbolic link at +dest+ pointing to +src+:
  #
  #     FileUtils.touch('src0.txt')
  #     File.exist?('dest0.txt')   # => false
  #     FileUtils.ln_s('src0ruby/did_you_mean/spell_checkers/null_checker.rb000064400000000150150403134300016117 0ustar00#
  # If +src+ is an array of paths to existing files and +dest+ is a directory,
  # for each child +chiruby/did_you_mean/spell_checkers/name_error_checkers.rb000064400000001067150403134300017471 0ustar00rue)
  #     FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3', noop: true, verbose: true)
  #
  #   Output:
  #
  #     ln -s src0.txt dest0.txt
  #     ln -s src1.txt destdir1
  #     ln -sf src2.txt dest2.txt
  #     ln -s srcdir3/src0.txt srcdir3/src1.txt destdir3
  #
  # FileUtils.symlink is an alias for FileUtils.ln_s.
  #
  # Related: FileUtils.ln_sf.
  #
  def ln_s(src, dest, force: nil, relative: false, target_directory: true, noop: nil, verbose: nil)
    if relative
      return ln_sr(src, dest, force: force, noop: noop, verbose: verruby/did_you_mean/spell_checkers/method_name_checker.rb000064400000004345150403134300017437 0ustar00      destdirs = File.dirname(d = dest)
      end
      destdirs = fu_split_path(File.realpath(destdirs))
      if fu_starting_path?(s)
        srcdirs = fu_split_path((File.realdirpath(s) rescue File.expand_path(s)))
        base = fu_relative_components_from(srcdirs, destdirs)
        s = File.join(*base)
      else
        srcdirs = fu_clean_components(*fu_split_path(s))
        base = fu_relative_components_from(fu_split_path(Dir.pwd), destdirs)
        while srcdirs.first&. == ".." and base.last&.!=("..") and !fu_starting_path?(base.last)
          srcdirs.shift
          base.pop
        end
        s = File.join(*base, *srcdirs)
      end
      fu_output_message "ln -s#{options} #{s} #{d}" if verbose
      next if noop
      remove_file d, true if force
      File.symlink s, d
    end
    case srcs.size
    when 0
    when 1
      link[srcs[0], target_directory && File.directory?(dest)]
    else
      srcs.each(&link)
    end
  end
  module_function :ln_sr

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link]; returns +nil+.
  #
  # Arguments +src+ and +dest+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file and +dest+ does not exist,
  # creates a hard link at +dest+ pointing to +src+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.link_entry('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # recursively creates hard links at +dest+ pointing to paths in +src+:
  #
  #   FileUtils.mkdir_p(['src1/dir0', 'src1/dir1'])
  #   src_file_paths = [
  #     'src1/dir0/t0.txt',
  #     'src1/dir0/t1.txt',
  #     'src1/dir1/t2.txt',
  #     'src1/dir1/t3.txt',
  #     ]
  #   FileUtils.touch(src_file_paths)
  #   File.directory?('dest1')        # => true
  #   FileUtils.link_entry('src1', 'dest1')
  #   File.file?('dest1/dir0/t0.txt') # => true
  #   File.file?('dest1/dir0/t1.txt') # => true
  #   File.file?('dest1/dir1/t2.txt') # => true
  #   File.file?('dest1/dir1/t3.txt') # => true
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: true</tt> - dereferences +src+ if it is a symbolic link.
  # - <tt>remove_destination:ruby/did_you_mean/spell_checkers/pattern_key_name_checker.rb000064400000001033150403134300020473 0ustar00.
  #
  # If +src+ is the path to a file and +dest+ is not the path to a directory,
  # copies +src+ to +dest+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.cp('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a file and +dest+ is the path to a directory,
  # copies +src+ to <tt>dest/src</tt>:
  #
  #   FileUtils.touch('src1.txt')
  #   FileUtils.mkdir('dest1')
  #   FileUtils.cp('src1.txt', 'dest1')
  #   File.file?('dest1/src1.txt') #ruby/did_you_mean/spell_checker.rb000064400000002421150403134300013301 0ustar00alias for FileUtils.cp.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Recursively copies files.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # The mode, owner, and group are retained in the copy;
  # to change those, use FileUtils.install instead.
  #
  # If +src+ is the path to a file and +dest+ is not the path to a directory,
  # copies +src+ to +dest+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.cp_r('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a file and +dest+ is the path to a directory,
  # copies +src+ to <tt>dest/src</tt>:
  #
  #   FileUtils.touch('src1.txt')
  #   FileUtils.mkdir('dest1')
  #   FileUtils.cp_r('src1.txt', 'dest1')
  #   File.file?('dest1/src1.txt') # => true
  #
  # If +src+ iruby/did_you_mean/levenshtein.rb000064400000002537150403134300013032 0ustar00c1.txt
  #   #    `-- dir1
  #   #    |-- src2.txt
  #   #    `-- src3.txt
  #   FileUtils.mkdir('dest3')
  #   FileUtils.cp_r('src3', 'dest3')
  #   tree('dest3')
  #   # => dest3
  #   #    `-- src3
  #   #      |-- dir0
  #   #      |   |-- src0.txt
  #   #      |   `-- src1.txt
  #   #      `-- dir1
  #   #          |-- src2.txt
  #   #          `-- src3.txt
  #
  # If +src+ is an array of paths and +dest+ is a directory,
  # recursively copies from each path in +src+ to +dest+;
  # the paths in +src+ may point to files and/or directories.
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
  #   does not dereference it.
  # - <tt>noop: true</tt> - does not copy files.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.cp_r('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     FileUtils.cp_r('src1.txt', 'dest1', noop: true, verbose: true)
  #     FileUtils.cp_r('src2', 'dest2', noop: true, verbose: true)
  #     FileUtils.cp_r('src3', 'dest3', noop: true, verbose: true)
  #
  #   Output:
  #
  #     cp -r src0.txt dest0.txt
  #     cp -r src1.txt dest1
  #     cp -r src2 dest2
  #     cp -r src3 dest3
  #
  # Raises an exception of +ruby/did_you_mean/jaro_winkler.rb000064400000003451150403134300013170 0ustar00uld be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file, copies +src+ to +dest+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.copy_entry('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is a directory, recursively copies +src+ to +dest+:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   FileUtils.copy_entry('src1', 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # The recursive copying preserves file types for regular files,
  # directories, and symbolic links;
  # other file types (FIFO streams, device files, etc.) are not supported.
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: true</tt> - if +src+ is a symbolic link,
  #   follows the link.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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 ruby/did_you_mean/formatter.rb000064400000002430150403134300012501 0ustar00py_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 \IO stream +src+ to \IO stream +dest+ via
  # {IO.copy_stream}[rdoc-ref:IO.copy_stream].
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  def copy_stream(src, dest)
    IO.copy_stream(src, dest)
  end
  module_function :copy_stream

  # Moves entries.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ and +dest+ are on different file systems,
  # first copies, then removes +src+.
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # If +src+ is the path to a single file or directory and +dest+ does not exist,
  # moves +src+ to +dest+:
  #
  #   tree('src0')
  #   # => src0
  #   #    |-- src0.txt
  #   #    `-- src1.txt
  #   File.exist?('dest0') # => false
  #   FileUtils.mv('src0', 'dest0')
  #   File.exist?('src0')  # => false
  #   tree('dest0')
  #   # => dest0
ruby/did_you_mean/tree_spell_checker.rb000064400000005471150403134300014330 0ustar00ons of StandardError and its descendants.
  # - <tt>noop: true</tt> - does not move files.
  # - <tt>secure: true</tt> - removes +src+ securely;
  #   see details at FileUtils.remove_entry_secure.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.mv('src0', 'dest0', noop: true, verbose: true)
  #     FileUtils.mv(['src1.txt', 'src1'], 'dest1', noop: true, verbose: true)
  #
  #   Output:
  #
  #     mv src0 dest0
  #     mv src1.txt src1 dest1
  #
  # FileUtils.move is an alias for FileUtils.mv.
  #
  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

  # Removes entries at the paths in the given +list+
  # (a single path or an array of paths)
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, removes files at the paths given in +list+:
  #
  #   FileUtils.touch(['src0.txt', 'src0.dat'])
  #   FileUtils.rm(['src0.dat', 'src0.txt']) # => ["src0.dat", "src0.txt"]
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - ignores raised exceptions of StandardError
  #   and its descendants.
  # - <tt>noop: true</tt> - does not remove files; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.rm(['src0.dat', 'src0.txt'], noop: true, verbose: true)
  #
  #   Output:
  #
  #     rm src0.dat src0.txt
  #
  # FileUtils.remove is an alias for FileUtils.rm.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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, **kwargs)
  #
  # Argument +list+ (a single path or an array of paths)
  # should be {interpretable as paths}[rdoc-refruby/did_you_mean/verbose.rb000064400000000211150403134300012136 0ustar00y if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoidingruby/did_you_mean/core_ext/name_error.rb000064400000002420150403134300014436 0ustar00move_entry_secure.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.rm_r(['src0.dat', 'src0.txt'], noop: true, verbose: true)
  #     FileUtils.rm_r('src1', noop: true, verbose: true)
  #
  #   Output:
  #
  #     rm -r src0.dat src0.txt
  #     rm -r src1
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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, **kwargs)
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # See FileUtils.rm_r for keyword arguments.
  #
  # FileUtils.rmtree is an alias for FileUtils.rm_rf.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
ruby/did_you_mean/experimental.rb000064400000000213150403134300013170 0ustar00
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  def remove_entry_secure(path, force = false)
    unless fu_have_syruby/mutex_m.rb000064400000004517150403134310007531 0ustar00 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?

  # Removes the entry given by +path+,
  # which should be the entry for a regular file, a symbolic link,
  # or a directory.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: FileUtils.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 the file entry given by +path+,
  # which should be the entry for a regular file or a symbolic link.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  def remove_file(path, force = false)
    Entry_.new(path).remove_file
  ruby/set/sorted_set.rb000064400000000305150403134310011010 0ustar00 of files +a+ and +b+ are identical,
  # +false+ otherwise.
  #
  # Arguments +a+ and +b+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # FileUtils.identical? anruby/bigdecimal.rb000064400000000030150403134310010115 0ustar00

    begin
      a.readruby/open3/version.rb000064400000000045150403134310010554 0ustar00t>dest/src</tt>,
  # overwriting if nruby/prettyprint.rb000064400000037631150403134310010462 0ustar00+,
  #   using {File.chown}[rdoc-ref:File.chown].
  # - <tt>preserve: true</tt> - preserve timestamps
  #   using {File.utime}[rdoc-ref:File.utime].
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.install('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     FileUtils.install('src1.txt', 'dest1.txt', noop: true, verbose: true)
  #     FileUtils.install('src2.txt', 'dest2', noop: true, verbose: true)
  #
  #   Output:
  #
  #     install -c src0.txt dest0.txt
  #     install -c src1.txt dest1.txt
  #     install -c src2.txt dest2
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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 permissions on the entries at the paths given in +list+
  # (a single path or an array of paths)
  # to the permissions given by +mode+;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
  #
  # - Modifies each entry that is a regular file using
  #   {File.chmod}[rdoc-ref:File.chmod].
  # - Modifies each entry that is a symbolic link using
  #   {File.lchmod}[rdoc-ref:File.lchmod].
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Argument +mode+ may be either an integer or a string:
  #
  # - \Integer +mode+: represents the permission bits to be set:
  #
  #     FileUtils.chmod(0755, 'src0.txt')
  #     FileUtils.chmod(0644, ['src0.txt', 'src0.dat'])
  #
  # - \String +mode+: represents the permissions to be set:
  #
  #   The string is of the form <tt>[targets][[operator][perms[,perms]]</tt>, where:
  #
  #   - +targets+ may be any combination of these letters:
  #
  #     - <tt>'u'</tt>: permissions apply to the file's owner.
  #     - <tt>'g'</tt>: permissions apply to users in the file's group.
  #     - <tt>'o'</tt>: permissions apply to other users not in the file's group.
  #     - <tt>'a'</tt> (the default): permissions apply to all users.
  #
  #   - +operator+ may be one of these letters:
  #
  #     - <tt>'+'</tt>: adds permissions.
  #     - <tt>'-'</tt>: removes permissions.
  #     - <tt>'='</tt>: sets (replaces) permissions.
  #
  #   - +perms+ (may be repeated, with separating commas)
  #     may be any combination of these letters:
  #
  #     - <tt>'r'</tt>: Read.
  #     - <tt>'w'</tt>: Write.
  #     - <tt>'x'</tt>: Execute (search, for a directory).
  #     - <tt>'X'</tt>: Search (for a directories only;
  #       must be used with <tt>'+'</tt>)
  #     - <tt>'s'</tt>: Uid or gid.
  #     - <tt>'t'</tt>: Sticky bit.
  #
  #   Examples:
  #
  #     FileUtils.chmod('u=wrx,go=rx', 'src1.txt')
  #     FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby')
  #
  # Keyword arguments:
  #
  # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.chmod(0755, 'src0.txt', noop: true, verbose: true)
  #     FileUtils.chmod(0644, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     FileUtils.chmod('u=wrx,go=rx', 'src1.txt', noop: true, verbose: true)
  #     FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby', noop: true, verbose: true)
  #
  #   Output:
  #
  #     chmod 755 src0.txt
  #     chmod 644 src0.txt src0.dat
  #     chmod u=wrx,go=rx src1.txt
  #     chmod u=wrx,go=rx /usr/bin/ruby
  #
  # Related: FileUtils.chmod_R.
  #
  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

  # Like FileUtils.chmod, but changes permissions recursively.
  #
  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 the owner and group on the entries at the paths given in +list+
  # (a single path or an array of paths)
  # to the given +user+ and +group+;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
  #
  # - Modifies each entry that is a regular file using
  #   {File.chown}[rdoc-ref:File.chown].
  # - Modifies each entry that is a symbolic link using
  #   {File.lchown}[rdoc-ref:File.lchown].
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # User and group:
  #
  # - Argument +user+ may be a user name or a user id;
  #   if +nil+ or +-1+, the user is not changed.
  # - Argument +group+ may be a group name or a group id;
  #   if +nil+ or +-1+, the group is not changed.
  # - The user must be a member of the group.
  #
  # Examples:
  #
  #   # One path.
  #   # User and group as string names.
  #   File.stat('src0.txt').uid # => 1004
  #   File.stat('src0.txt').gid # => 1004
  #   FileUtils.chown('user2', 'group1', 'src0.txt')
  #   File.stat('src0.txt').uid # => 1006
  #   File.stat('src0.txt').gid # => 1005
  #
  #   # User and group as uid and gid.
  #   FileUtils.chown(1004, 1004, 'src0.txt')
  #   File.stat('src0.txt').uid # => 1004
  #   File.stat('src0.txt').gid # => 1004
  #
  #   # Array of paths.
  #   FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'])
  #
  #   # Directory (not recursive).
  #   FileUtils.chown('user2', 'group1', '.')
  #
  # Keyword arguments:
  #
  # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.chown('user2', 'group1', 'src0.txt', noop: true, verbose: true)
  #     FileUtils.chown(1004, 1004, 'src0.txt', noop: true, verbose: true)
  #     FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     FileUtils.chown('user2', 'group1', path, noop: true, verbose: true)
  #     FileUtils.chown('user2', 'group1', '.', noop: true, verbose: true)
  #
  #   Output:
  #
  #     chown user2:group1 src0.txt
  #     chown 1004:1004 src0.txt
  #     chown 1006:1005 src0.txt src0.dat
  #     chown user2:group1 src0.txt
  #     chown user2:group1 .
  #
  # Related: FileUtils.chown_R.
  #
  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

  # Like FileUtils.chown, but changes owner and group recursively.
  #
  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 times (mtime) and access times (atime)
  # of the entries given by the paths in +list+
  # (a single path or an array of paths);
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # By default, creates an empty file for any path to a non-existent entry;
  # use keyword argument +nocreate+ to raise an exception instead.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Examples:
  #
  #   # Single path.
  #   f = File.new('src0.txt') # Existing file.
  #   f.atime # => 2022-06-10 11:11:21.200277 -0700
  #   f.mtime # => 2022-06-10 11:11:21.200277 -0700
  #   FileUtils.touch('src0.txt')
  #   f = File.new('src0.txt')
  #   f.atime # => 2022-06-11 08:28:09.8185343 -0700
  #   f.mtime # => 2022-06-11 08:28:09.8185343 -0700
  #
  #   # Array of paths.
  #   FileUtils.touch(['src0.txt', 'src0.dat'])
  #
  # Keyword arguments:
  #
  # - <tt>mtime: <i>time</i></tt> - sets the entry's mtime to the given time,
  #   instead of the current time.
  # - <tt>nocreate: true</tt> - raises an exception if the entry does not exist.
  # - <tt>noop: true</tt> - does not touch entries; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.touch('src0.txt', noop: true, verbose: true)
  #     FileUtils.touch(['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     FileUtils.touch(path, noop: true, verbose: true)
  #
  #   Output:
  #
  #     touch src0.txt
  #     touch src0.txt src0.dat
  #     touch src0.txt
  #
  # Related: FileUtils.uptodate?.
  #
  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

 ruby/reline.rb000064400000035665150403134300007340 0ustar00require 'io/console'
require 'forwardable'
require 'reline/version'
require 'reline/config'
require 'reline/key_actor'
require 'reline/key_stroke'
require 'reline/line_editor'
require 'reline/history'
require 'reline/io'
require 'reline/face'
require 'rbconfig'

module Reline
  # NOTE: For making compatible with the rb-readline gem
  FILENAME_COMPLETION_PROC = nil
  USERNAME_COMPLETION_PROC = nil

  class ConfigEncodingConversionError < StandardError; end

  # EOF key: { char: nil, method_symbol: nil }
  # Other key: { char: String, method_symbol: Symbol }
  Key = Struct.new(:char, :method_symbol, :unused_boolean) do
    # For dialog_proc `key.match?(dialog.name)`
    def match?(sym)
      method_symbol && method_symbol == sym
    end
  end
  CursorPos = Struct.new(:x, :y)
  DialogRenderInfo = Struct.new(
    :pos,
    :contents,
    :face,
    :bg_color, # For the time being, this line should stay here for the compatibility with IRB.
    :width,
    :height,
    :scrollbar,
    keyword_init: true
  )

  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(ruby/logger.rb000064400000053710150403134310007331 0ustar00on_append_character = nil
      elsif val.size == 1
        @completion_append_character = val.encode(encoding)
      elsif val.size > 1
        @completion_append_character = val[0].encode(encoding)
      else
        @completion_append_character = nil
      end
    end

    def basic_word_break_characters=(v)
      @basic_word_break_characters = v.encode(encoding)
    end

    def completer_word_break_characters=(v)
      @completer_word_break_characters = v.encode(encoding)
    end

    def basic_quote_characters=(v)
      @basic_quote_characters = v.encode(encoding)
    end

    def completer_quote_characters=(v)
      @completer_quote_characters = v.encode(encoding)
    end

    def filename_quote_characters=(v)
      @filename_quote_characters = v.encode(encoding)
    end

    def special_prefixes=(v)
      @special_prefixes = v.encode(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

    DialogProc = Struct.new(:dialog_proc, :context)
    def add_dialog_proc(name_sym, p, context = nil)
      raise ArgumentError unless name_sym.instance_of?(Symbol)
      if p.nil?
        @dialog_proc_list.delete(name_sym)
      else
        raise ArgumentError unless p.respond_to?(:call)
        @dialog_proc_list[name_sym] = DialogProc.new(p, context)
      end
    end

    def dialog_proc(name_sym)
      @dialog_proc_list[name_sym]
    end

    def input=(val)
      raise TypeError unless val.respond_to?(:getc) or val.nil?
      if val.respond_to?(:getc) && io_gate.respond_to?(:input=)
        io_gate.input = val
      end
    end

    def output=(val)
      raise TypeError unless val.respond_to?(:write) or val.nil?
      @output = val
      io_gate.output = val
    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
      io_gate.get_screen_size
    end

    Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = ->() {
      # autocomplete
      return unless config.autocompletion

      journey_data = completion_journey_data
      return unless journey_data

      target = journey_data.list.first
      completed = journey_data.list[journey_data.pointer]
      result = journey_data.list.drop(1)
      pointer = journey_data.pointer - 1
      return if completed.empty? || (result == [completed] && pointer < 0)

      target_width = Reline::Unicode.calculate_width(target)
      completed_width = Reline::Unicode.calculate_width(completed)
      if cursor_pos.x <= completed_width - target_width
        # When target is rendered on the line above cursor position
        x = screen_width - completed_width
        y = -1
      else
        x = [cursor_pos.x - completed_width, 0].max
        y = 0
      end
      cursor_pos_to_render = Reline::CursorPos.new(x, y)
      if context and context.is_a?(Array)
        context.clear
        context.push(cursor_pos_to_render, result, pointer, dialog)
      end
      dialog.pointer = pointer
      DialogRenderInfo.new(
        pos: cursor_pos_to_render,
        contents: result,
        scrollbar: true,
        height: [15, preferred_dialog_height].min,
        face: :completion_dialog
      )
    }
    Reline::DEFAULT_DIALOG_CONTEXT = Array.new

    def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)
      @mutex.synchronize do
        unless confirm_multiline_termination
          raise ArgumentError.new('#readmultiline needs block to confirm multiline termination')
        end

        io_gate.with_raw_input do
          inner_readline(prompt, add_hist, true, &confirm_multiline_termination)
        end

        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

        if line_editor.eof?
          line_editor.reset_line
          # Return nil if the input is aborted by C-d.
          nil
        else
          whole_buffer
        end
      end
    end

    def readline(prompt = '', add_hist = false)
      @mutex.synchronize do
        io_gate.with_raw_input do
          inner_readline(prompt, add_hist, false)
        end

        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
    end

    private def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination)
      if ENV['RELINE_STDERR_TTY']
        if io_gate.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
      unless config.test_mode or config.loaded?
        config.read
        io_gate.set_default_key_bindings(config)
      end
      otio = io_gate.prep

      may_req_ambiguous_char_width
      key_stroke.encoding = encoding
      line_editor.reset(prompt)
      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.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

      # Readline calls pre_input_hook just after printing the first prompt.
      line_editor.print_nomultiline_prompt
      pre_input_hook&.call

      unless Reline::IOGate.dumb?
        @dialog_proc_list.each_pair do |name_sym, d|
          line_editor.add_dialog_proc(name_sym, d.dialog_proc, d.context)
        end
      end

      line_editor.update_dialogs
      line_editor.rerender

      begin
        line_editor.set_signal_handlers
        loop do
          read_io(config.keyseq_timeout) { |inputs|
            line_editor.set_pasting_state(io_gate.in_pasting?)
            inputs.each do |key|
              case key.method_symbol
              when :bracketed_paste_start
                # io_gate is Reline::ANSI because the key :bracketed_paste_start is only assigned in Reline::ANSI
                key = Reline::Key.new(io_gate.read_bracketed_paste, :insert_multiline_text)
              when :quoted_insert, :ed_quoted_insert
                key = Reline::Key.new(io_gate.read_single_char(config.keyseq_timeout), :insert_raw_char)
              end
              line_editor.update(key)
            end
          }
          if line_editor.finished?
            line_editor.render_finished
            break
          else
            line_editor.set_pasting_state(io_gate.in_pasting?)
            line_editor.rerender
          end
        end
        io_gate.move_cursor_column(0)
      rescue Errno::EIO
        # Maybe the I/O has been closed.
      ensure
        line_editor.finalize
        io_gate.deprep(otio)
      end
    end

    # GNU Readline watis for "keyseq-timeout" milliseconds when the input is
    # ambiguous whether it is matching or matched.
    # If the next character does not arrive within the specified timeout, input
    # is considered as matched.
    # `ESC` is ambiguous because it can be a standalone ESC (matched) or part of
    # `ESC char` or part of CSI sequence (matching).
    private def read_io(keyseq_timeout, &block)
      buffer = []
      status = KeyStroke::MATCHING
      loop do
        timeout = status == KeyStroke::MATCHING_MATCHED ? keyseq_timeout.fdiv(1000) : Float::INFINITY
        c = io_gate.getc(timeout)
        if c.nil? || c == -1
          if status == KeyStroke::MATCHING_MATCHED
            status = KeyStroke::MATCHED
          elsif buffer.empty?
            # io_gate is closed and reached EOF
            block.call([Key.new(nil, nil, false)])
            return
          else
            status = KeyStroke::UNMATCHED
          end
        else
          buffer << c
          status = key_stroke.match_status(buffer)
        end

        if status == KeyStroke::MATCHED || status == KeyStroke::UNMATCHED
          expanded, rest_bytes = key_stroke.expand(buffer)
          rest_bytes.reverse_each { |c| io_gate.ungetc(c) }
          block.call(expanded)
          return
        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 = 1 if io_gate.dumb? || !STDIN.tty? || !STDOUT.tty?
      return if defined? @ambiguous_width
      io_gate.move_cursor_column(0)
      begin
        output.write "\u{25bd}"
      rescue Encoding::UndefinedConversionError
        # LANG=C
        @ambiguous_width = 1
      else
        @ambiguous_width = io_gate.cursor_pos.x == 2 ? 2 : 1
      end
      io_gate.move_cursor_column(0)
      io_gate.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(text)
    line_editor.insert_multiline_text(text)
    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, :add_dialog_proc
  def_single_delegators :core, :dialog_proc
  def_single_delegators :core, :autocompletion, :autocompletion=

  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.encoding)
      core.line_editor = Reline::LineEditor.new(core.config)

      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 = ""
      core.add_dialog_proc(:autocomplete, Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE, Reline::DEFAULT_DIALOG_CONTEXT)
    }
  end

  def self.ungetc(c)
    core.io_gate.ungetc(c)
  end

  def self.line_editor
    core.line_editor
  end
end


Reline::IOGate = Reline::IO.decide_io_gate

# Deprecated
Reline::GeneralIO = Reline::Dumb.new

Reline::Face.load_initial_configs

Reline::HISTORY = Reline::History.new(Reline.core.config)
ruby/cgi.rb000064400000023526150403134300006615 0ustar00# 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 <wakou@ruby-lang.org>
#
# 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! <code>cgi['field_name']</code> 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']) {"strruby/uri/version.rb000064400000000226150403134310010330 0ustar00okies: #{cgi.cookies.inspect}\n" +
#             ENV.collect do |key, value|
#               "#{key} --> #{value}\n"
#             end.join("")
#     ruby/uri/https.rb000064400000001056150403134310010007 0ustar00ruby/ripper/sexp.rb000064400000011054150403134300010324 0ustar00# frozen_string_literal: true
#
# $Id$
#
# Copruby/uri/rfc2396_parser.rb000064400000042046150403134310011323 0ustar00 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
ruby/ripper/lexer.rb000064400000023331150403134300010465 0ustar00# 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
  # <code>[[lineno, column], type, token, state]</code>.
  # 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
    # :stopdoc:
    class State
      attr_reader :to_int, :to_s

      def initialize(i)
        @to_int = i
        @to_s = Ripper.lex_state_name(i)
        freeze
      end

      def [](index)
        case index
        when 0, :to_int
          @to_int
        when 1, :to_s
          @event
        else
          nil
        end
      end

      alias to_i to_int
      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

    class Elem
      attr_accessor :pos, :event, :tok, :state, :message

      def initialize(pos, event, tok, state, message = nil)
        @pos = pos
        @event = event
        @tok = tok
        @state = State.new(state)
        @message = message
      end

      def [](index)
        case index
        when 0, :pos
          @pos
        when 1, :event
          @event
        when 2, :tok
          @tok
        when 3, :state
          @state
        when 4, :message
          @message
        else
          nil
        end
      end

      def inspect
        "#<#{self.class}: #{event}@#{pos[0]}:#{pos[1]}:#{state}: #{tok.inspect}#{": " if message}#{message}>"
      end

      alias to_s inspect

      def pretty_print(q)
        q.group(2, "#<#{self.class}:", ">") {
          q.breakable
          q.text("#{event}@#{pos[0]}:#{pos[1]}")
          q.breakable
          state.pretty_print(q)
          q.breakable
          q.text("token: ")
          tok.pretty_print(q)
          if message
            q.breakable
            q.text("message: ")
            q.text(message)
          end
        }
      end

      def to_a
        if @message
          [@pos, @event, @tok, @state, @message]
        else
          [@pos, @event, @tok, @state]
        end
      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
      if Array === heredoc
        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
      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 unless @stack.empty?
    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)
      if elem
        elem = Elem.new(elem.pos, __callee__, elem.tok, elem.state, mesg)
      else
        elem = Elem.new([lineno(), column()], __callee__, token(), state(), mesg)
      end
      @errors.push elem
    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
    # :startdoc:
  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("<<EOS\nstring\nEOS",
  #                  'heredoc_beg nl $(tstring_content*) heredoc_end', 1)
  #       #=> "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
ruby/ripper/filter.rb000064400000004160150403134300010632 0ustar00# 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#injecruby/uri/ldaps.rb000064400000000777150403134310007761 0ustar00# 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 ruby/uri/rfc3986_parser.rb000064400000013525150403134310011331 0ustar00f) 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
ruby/resolv-replace.rb000064400000003415150403134300010771 0ustar00B"=>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,
    "\u1DFA"=>218,
    "\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,
ruby/did_you_mean/version.rb000064400000000061150403134300012161 0ustar00module DidYouMean
  VERSION = "2.0.0".freeze
end
ruby/did_you_mean/formatters/verbose_formatter.rb000064400000000402150403134300016411 0ustar00# frozen-string-literal: true

warn "`require 'did_you_mean/formatters/verbose_formatter'` is deprecated and falls back to the default formatter. "

require_relative '../formatter'

module DidYouMean
  # For compatibility:
  VerboseFormatter = Formatter
end
ruby/did_you_mean/formatters/plain_formatter.rb000064400000000250150403134300016050 0ustar00ruby/uri/mailto.rb000064400000017521150403134310010136 0ustar00ruby/did_you_mean/spell_checkers/key_error_checker.rb000064400000001227150403134300017154 0ustar00require_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 { |obj| format_object(obj) }
    end

    def format_object(symbol_or_object)
      if symbol_or_object.is_a?(Symbol)
        ":#{symbol_or_object}"
      else
        symbol_or_object.to_s
      end
    end
  end
end
ruby/did_you_mean/spell_checkers/require_path_checker.rb000064400000002356150403134300017647 0ustar00# frozen-string-literal: true

require_relative "../spell_checker"
require_relative "../tree_spell_checker"
require "rbconfig"

module DidYouMean
  class RequirePathChecker
    attr_reader :path

    INITIAL_LOAD_PATH = $LOAD_PATH.dup.freeze
    Ractor.make_shareable(INITIAL_LOAD_PATH) if defined?(Ractor)

    ENV_SPECIFIC_EXT = ".#{RbConfig::CONFIG["DLEXT"]}"
    Ractor.make_shareable(ENV_SPECIFIC_EXT) if defined?(Ractor)

    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
ruby/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb000064400000004115150403134300023737 0ustar00# 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 = []
    Ractor.make_shareable(NAMES_TO_EXCLUDE) if defined?(Ractor)

    # +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__
    )

    Ractor.make_shareable(RB_RESERVED_WORDS) if defined?(Ractor)

    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).uniq - NAMES_TO_EXCLUDE[@name]
    end
  end
end
ruby/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb000064400000002300150403134300023251 0ustar00# 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, scruby/uri/http.rb000064400000007215150403134310007627 0ustar00ruby/did_you_mean/spell_checkers/null_checker.rb000064400000000150150403134300016117 0ustar00module DidYouMean
  class NullChecker
    def initialize(*);  end
    def corrections; [] end
  end
end
ruby/did_you_mean/spell_checkers/name_error_checkers.rb000064400000001067150403134300017471 0ustar00require_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
ruby/did_you_mean/spell_checkers/method_name_checker.rb000064400000004345150403134300017437 0ustar00require_relative "../spell_checker"

module DidYouMean
  class MethodNameChecker
    attr_reader :method_name, :receiver

    NAMES_TO_EXCLUDE = { NilClass => nil.methods }
    NAMES_TO_EXCLUDE.default = []
    Ractor.make_shareable(NAMES_TO_EXCLUDE) if defined?(Ractor)

    # +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
    # ruby/uri/ftp.rb000064400000016033150403134310007437 0ustar00thod_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!
        # Assume that people trying to use a writer are not interested in a reader
        # and vice versa
        if method_name.match?(/=\Z/)
          method_names.select! { |name| name.match?(/=\Z/) }
        else
          method_names.reject! { |name| name.match?(/=\Z/) }
        end
        method_names
      else
        []
      end
    end

    def names_to_exclude
      Object === receiver ? NAMES_TO_EXCLUDE[receiver.class] : []
    end
  end
end
ruby/did_you_mean/spell_checkers/pattern_key_name_checker.rb000064400000001330150403134300020473 0ustar00require_relative "../spell_checker"

module DidYouMean
  class PatternKeyNameChecker
    def initialize(no_matching_pattern_key_error)
      @key = no_matching_pattern_key_error.key
      @keys = no_matching_pattern_key_error.matchee.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 { |obj| format_object(obj) }
    end

    def format_object(symbol_or_object)
      if symbol_or_object.is_a?(Symbol)
        ":#{symbol_or_object}"
      else
        symbol_or_object.to_s
      end
    end
  end
end
ruby/did_you_mean/spell_checker.rb000064400000002421150403134300013301 0ustar00# frozen-string-literal: true

require_relative "levenshtein"
require_relative "jaro_winkler"

module DidYouMean
  class SpellChecker
    def initialize(dictionary:)
      @dictionary = dictionary
    end

    def correct(input)
      normalized_input = normalize(input)
      threshold = normalized_input.length > 3 ? 0.834 : 0.77

      words = @dictionary.select { |word| JaroWinkler.distance(normalize(word), normalized_input) >= threshold }
      words.reject! { |word| input.to_s == word.to_s }
      words.sort_by! { |word| JaroWinkler.distance(word.to_s, normalized_input) }
      words.reverse!

      # Correct mistypes
      threshold   = (normalized_input.length * 0.25).ceil
      corrections = words.select { |c| Levenshtein.distance(normalize(c), normalized_input) <= threshold }

      # Correct misspells
      if corrections.empty?
        corrections = words.select do |word|
          word   = normalize(word)
          length = normalized_input.length < word.length ? normalized_input.length : word.length

          Levenshtein.distance(word, normalized_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
ruby/did_you_mean/levenshtein.rb000064400000002537150403134300013032 0ustar00module 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
ruby/did_you_mean/jaro_winkler.rb000064400000003410150403134300013163 0ustar00module DidYouMean
  module ruby/uri/ws.rb000064400000004365150403134310007304 0ustar00         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

        str1.each_codepoint do |char1|
          char1 == codepoints2[prefix_bonus] && prefix_bonus < 4 ? prefix_bonus += 1 : break
        end

        jaro_distance + (prefix_bonus * WEIGHT * (1 - jaro_distance))
      else
        jaro_distance
      end
    end
  end
end
ruby/did_you_mean/formatter.rb000064400000002430150403134300012501 0ustar00# frozen-string-literal: true

module DidYouMean
  # The +DidYouMean::Formatter+ is the basic, default formatter for the
  # gem. The formatter responds to the +message_for+ method and it returns a
  # human readable string.
  class Formatter

    # 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::Formatter.new
    #
    #   # displays suggestions in two lines with the leading empty line
    #   puts formatter.message_for(["methods", "method"])
    #
    #   Did you mean?  methods
    #                   method
    #   # => nil
    #
    #   # dispruby/uri/common.rb000064400000047446150403134320010153 0ustar00ruby/did_you_mean/tree_spell_checker.rb000064400000005471150403134300014330 0ustar00# 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
ruby/did_you_mean/verbose.rb000064400000000211150403134300012136 0ustar00warn "The verbose formatter has been removed and now `require 'did_you_mean/verbose'` has no effect. Please " \
     "remove this call."
ruby/did_you_mean/core_ext/name_error.rb000064400000002420150403134300014436 0ustar00module DidYouMean
  module Correctable
    if Exception.method_defined?(:detailed_message)
      # just for compatibility
      def original_message
        # we cannot use alias here because
        to_s
      end

      def detailed_message(highlight: true, did_you_mean: true, **)
        msg = super.dup

        return msg unless did_you_mean

        suggestion = DidYouMean.formatter.message_for(corrections)

        if highlight
          suggestion = suggestion.gsub(/.+/) { "\e[1m" + $& + "\e[m" }
        end

        msg << suggestion
        msg
      rescue
        super
      end
    else
      SKIP_TO_S_FOR_SUPER_LOOKUP = true
      private_constant :SKIP_TO_S_FOR_SUPER_LOOKUP

      def original_message
        meth = method(:to_s)
        while meth.owner.const_defined?(:SKIP_TO_S_FOR_SUPER_LOOKUP)
          meth = meth.super_method
        end
        meth.call
      end

      def to_s
        msg = super.dup
        suggestion = DidYouMean.formatter.message_for(corrections)

        msg << suggestion if !msg.include?(suggestion)
        msg
      rescue
        super
      end
    end

    def corrections
      @corrections ||= spell_checker.corrections
    end

    def spell_checker
      DidYouMean.spell_checkers[self.class.to_s].new(self)
    end
  end
end
ruby/did_you_mean/experimental.rb000064400000000213150403134300013170 0ustar00warn "Experimental features in the did_you_mean gem has been removed " \
     "and `require \"did_you_mean/experimental\"' has no effect."
ruby/mutex_m.rb000064400000004517150403134310007531 0ustar00BF\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"=>"\u96Fruby/set/sorted_set.rb000064400000000305150403134310011010 0ustar00begin
  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
ruby/bigdecimal.rb000064400000000030150403134310010115 0ustar00\uF991"=>"\u649A",
    "ruby/open3/version.rb000064400000000045150403134310010554 0ustar00module Open3
  VERSION = "0.2.1"
end
ruby/prettyprint.rb000064400000037666150403134310010472 0ustar00# 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,
# https://lindig.github.io/papers/strictly-pretty-2000.pdf
#
# Philip Wadler, A prettier printer, March 1998,
# https://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier
#
# == Author
# Tanaka Akira <akr@fsij.org>
#
class PrettyPrint

  VERSION = "0.2.0"

  # 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)
  #   => #<PrettyPrint:0x82f85c0 @output="", @maxwidth=79, @newline="\n", @genspace=#<Proc:0x82f8368@/home/vbatts/.rvm/rubies/ruby-head/lib/ruby/2.0.0/prettyprint.rb:82 (lambda)>, @output_width=0, @buffer_width=0, @buffer=[], @group_stack=[#<PrettyPrint::Group:0x82f8138 @depth=0, @breakables=[], @break=false>], @group_queue=#<PrettyPrint::GroupQueue:0x82fb7c0 @queue=[[#<PrettyPrint::Group:0x82f8138 @depth=0, @breakables=[], @break=false>]]>, @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
  #   #<PrettyPrint::Group:0x8354758 @depth=1, @breakables=[], @break=false>
  #   #<PrettyPrint::Group:0x8354550 @depth=2, @breakables=[], @break=false>
  #   #<PrettyPrint::Group:0x83541cc @depth=3, @breakables=[], @break=false>
  #   #<PrettyPrint::Group:0x8347e54 @depth=4, @breakables=[], @break=false>
  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+ columnsruby/uri/wss.rb000064400000001023150403134320007454 0ustar00results:
  # (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 notruby/uri/file.rb000064400000004370150403134320007567 0ustar00='', 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:

ruby/uri/ldap.rb000064400000013437150403134320007574 0ustar00# 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
ruby/logger.rb000064400000054764150403134310007343 0ustar00# frozen_string_literal: true
# logger.rb - simple logging utility
# Copyright (C) 2000-2003, 2005, 2008, 2011  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
#
# Documentation:: NAKAMURA, Hiroshi and Gavin Sinclair
# License::
#   You can redistribute it and/or modify it under the same terms ruby/uri/generic.rb000064400000111716150403134320010267 0ustar00 == About the Examples
#
# All examples on this page assume that \Logger has been required:
#
#   require 'logger'
#
# == Synopsis
#
# Create a log with Logger.new:
#
#   # Single log file.
#   logger = Logger.new('t.log')
#   # Size-based rotated logging: 3 10-megabyte files.
#   logger = Logger.new('t.log', 3, 10485760)
#   # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly').
#   logger = Logger.new('t.log', 'daily')
#   # Log to an IO stream.
#   logger = Logger.new($stdout)
#
# Add entries (level, message) with Logger#add:
#
#   logger.add(Logger::DEBUG, 'Maximal debugging info')
#   logger.add(Logger::INFO, 'Non-error information')
#   logger.add(Logger::WARN, 'Non-error warning')
#   logger.add(Logger::ERROR, 'Non-fatal error')
#   logger.add(Logger::FATAL, 'Fatal error')
#   logger.add(Logger::UNKNOWN, 'Most severe')
#
# Close the log with Logger#close:
#
#   logger.close
#
# == Entries
#
# You can add entries with method Logger#add:
#
#   logger.add(Logger::DEBUG, 'Maximal debugging info')
#   logger.add(Logger::INFO, 'Non-error information')
#   logger.add(Logger::WARN, 'Non-error warning')
#   logger.add(Logger::ERROR, 'Non-fatal error')
#   logger.add(Logger::FATAL, 'Fatal error')
#   logger.add(Logger::UNKNOWN, 'Most severe')
#
# These shorthand methods also add entries:
#
#   logger.debug('Maximal debugging info')
#   logger.info('Non-error information')
#   logger.warn('Non-error warning')
#   logger.error('Non-fatal error')
#   logger.fatal('Fatal error')
#   logger.unknown('Most severe')
#
# When you call any of these methods,
# the entry may or may not be written to the log,
# depending on the entry's severity and on the log level;
# see {Log Level}[rdoc-ref:Logger@Log+Level]
#
# An entry always has:
#
# - A severity (the required argument to #add).
# - An automatically created timestamp.
#
# And may also have:
#
# - A message.
# - A program name.
#
# Example:
#
#   logger = Logger.new($stdout)
#   logger.add(Logger::INFO, 'My message.', 'mung')
#   # => I, [2022-05-07T17:21:46.536234 #20536]  INFO -- mung: My message.
#
# The default format for an entry is:
#
#   "%s, [%s #%d] %5s -- %s: %s\n"
#
# where the values to be formatted are:
#
# - \Severity (one letter).
# - Timestamp.
# - Process id.
# - \Severity (word).
# - Program name.
# - Message.
#
# You can use a different entry format by:
#
# - Setting a custom format proc (affects following entries);
#   see {formatter=}[Logger.html#attribute-i-formatter].
# - Calling any of the methods above with a block
#   (affects only the one entry).
#   Doing so can have two benefits:
#
#   - Context: the block can evaluate the entire program context
#     and create a context-dependent message.
#   - Performance: the block is not evaluated unless the log level
#     permits the entry actually to be written:
#
#       logger.error { my_slow_message_generator }
#
#     Contrast this with the string form, where the string is
#     always evaluated, regardless of the log level:
#
#       logger.error("#{my_slow_message_generator}")
#
# === \Severity
#
# The severity of a log entry has two effects:
#
# - Determines whether the entry is selected for inclusion in the log;
#   see {Log Level}[rdoc-ref:Logger@Log+Level].
# - Indicates to any log reader (whether a person or a program)
#   the relative importance of the entry.
#
# === Timestamp
#
# The timestamp for a log entry is generated automatically
# when the entry is created.
#
# The logged timestamp is formatted by method
# {Time#strftime}[rdoc-ref:Time#strftime]
# using this format string:
#
#   '%Y-%m-%dT%H:%M:%S.%6N'
#
# Example:
#
#   logger = Logger.new($stdout)
#   logger.add(Logger::INFO)
#   # => I, [2022-05-07T17:04:32.318331 #20536]  INFO -- : nil
#
# You can set a different format using method #datetime_format=.
#
# === Message
#
# The message is an optional argument to an entry method:
#
#   logger = Logger.new($stdout)
#   logger.add(Logger::INFO, 'My message')
#   # => I, [2022-05-07T18:15:37.647581 #20536]  INFO -- : My message
#
# For the default entry formatter, <tt>Logger::Formatter</tt>,
# the message object may be:
#
# - A string: used as-is.
# - An Exception: <tt>message.message</tt> is used.
# - Anything else: <tt>message.inspect</tt> is used.
#
# *Note*: Logger::Formatter does not escape or sanitize
# the message passed to it.
# Developers should be aware that malicious data (user input)
# may be in the message, and should explicitly escape untrusted data.
#
# You can use a custom formatter to escape message data;
# see the example at {formatter=}[Logger.html#attribute-i-formatter].
#
# === Program Name
#
# The program name is an optional argument to an entry method:
#
#   logger = Logger.new($stdout)
#   logger.add(Logger::INFO, 'My message', 'mung')
#   # => I, [2022-05-07T18:17:38.084716 #20536]  INFO -- mung: My message
#
# The default program name for a new logger may be set in the call to
# Logger.new via optional keyword argument +progname+:
#
#   logger = Logger.new('t.log', progname: 'mung')
#
# The default program name for an existing logger may be set
# by a call to method #progname=:
#
#   logger.progname = 'mung'
#
# The current program name may be retrieved with method
# {progname}[Logger.html#attribute-i-progname]:
#
#   logger.progname # => "mung"
#
# == Log Level
#
# The log level setting determines whether an entry is actually
# written to the log, based on the entry's severity.
#
# These are the defined severities (least severe to most severe):
#
#   logger = Logger.new($stdout)
#   logger.add(Logger::DEBUG, 'Maximal debugging info')
#   # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info
#   logger.add(Logger::INFO, 'Non-error information')
#   # => I, [2022-05-07T17:59:14.349167 #20536]  INFO -- : Non-error information
#   logger.add(Logger::WARN, 'Non-error warning')
#   # => W, [2022-05-07T18:00:45.337538 #20536]  WARN -- : Non-error warning
#   logger.add(Logger::ERROR, 'Non-fatal error')
#   # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error
#   logger.add(Logger::FATAL, 'Fatal error')
#   # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error
#   logger.add(Logger::UNKNOWN, 'Most severe')
#   # => A, [2022-05-07T18:07:54.657491 #20536]   ANY -- : Most severe
#
# The default initial level setting is Logger::DEBUG, the lowest level,
# which means that all entries are to be written, regardless of severity:
#
#   logger = Logger.new($stdout)
#   logger.level # => 0
#   logger.add(0, "My message")
#   # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message
#
# You can specify a different setting in a new logger
# using keyword argument +level+ with an appropriate value:
#
#   logger = Logger.new($stdout, level: Logger::ERROR)
#   logger = Logger.new($stdout, level: 'error')
#   logger = Logger.new($stdout, level: :error)
#   logger.level # => 3
#
# With this level, entries with severity Logger::ERROR and higher
# are written, while those with lower severities are not written:
#
#   logger = Logger.new($stdout, level: Logger::ERROR)
#   logger.add(3)
#   # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil
#   logger.add(2) # Silent.
#
# You can set the log level for an existing logger
# with method #level=:
#
#   logger.level = Logger::ERROR
#
# These shorthand methods also set the level:
#
#   logger.debug! # => 0
#   logger.info!  # => 1
#   logger.warn!  # => 2
#   logger.error! # => 3
#   logger.fatal! # => 4
#
# You can retrieve the log level with method #level.
#
#   logger.level = Logger::ERROR
#   logger.level # => 3
#
# These methods return whether a given
# level is to be written:
#
#   logger.level = Logger::ERROR
#   logger.debug? # => false
#   logger.info?  # => false
#   logger.warn?  # => false
#   logger.error? # => true
#   logger.fatal? # => true
#
# == Log File Rotation
#
# By default, a log file is a single file that grows indefinitely
# (until explicitly closed); there is no file rotation.
#
# To keep log files to a manageable size,
# you can use _log_ _file_ _rotation_, which uses multiple log files:
#
# - Each log file has entries for a non-overlapping
#   time interval.
# - Only the most recent log file is open and active;
#   the others are closed and inactive.
#
# === Size-Based Rotation
#
# For size-based log file rotation, call Logger.new with:
#
# - Argument +logdev+ as a file path.
# - Argument +shift_age+ with a positive integer:
#   the number of log files to be in the rotation.
# - Argument +shift_size+ as a positive integer:
#   the maximum size (in bytes) of each log file;
#   defaults to 1048576 (1 megabyte).
#
# Examples:
#
#   logger = Logger.new('t.log', 3)           # Three 1-megabyte files.
#   logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files.
#
# For these examples, suppose:
#
#   logger = Logger.new('t.log', 3)
#
# Logging begins in the new log file, +t.log+;
# the log file is "full" and ready for rotation
# when a new entry would cause its size to exceed +shift_size+.
#
# The first time +t.log+ is full:
#
# - +t.log+ is closed and renamed to +t.log.0+.
# - A new file +t.log+ is opened.
#
# The second time +t.log+ is full:
#
# - +t.log.0 is renamed as +t.log.1+.
# - +t.log+ is closed and renamed to +t.log.0+.
# - A new file +t.log+ is opened.
#
# Each subsequent time that +t.log+ is full,
# the log files are rotated:
#
# - +t.log.1+ is removed.
# - +t.log.0 is renamed as +t.log.1+.
# - +t.log+ is closed and renamed to +t.log.0+.
# - A new file +t.log+ is opened.
#
# === Periodic Rotation
#
# For periodic rotation, call Logger.new with:
#
# - Argument +logdev+ as a file path.
# - Argument +shift_age+ as a string period indicator.
#
# Examples:
#
#   logger = Logger.new('t.log', 'daily')   # Rotate log files daily.
#   logger = Logger.new('t.log', 'weekly')  # Rotate log files weekly.
#   logger = Logger.new('t.log', 'monthly') # Rotate log files monthly.
#
# Example:
#
#   logger = Logger.new('t.log', 'daily')
#
# When the given period expires:
#
# - The base log file, +t.log+ is closed and renamed
#   with a date-based suffix such as +t.log.20220509+.
# - A new log file +t.log+ is opened.
# - Nothing is removed.
#
# The default format for the suffix is <tt>'%Y%m%d'</tt>,
# which produces a suffix similar to the one above.
# You can set a different format using create-time option
# +shift_period_suffix+;
# see details and suggestions at
# {Time#strftime}[rdoc-ref:Time#strftime].
#
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. <tt>Logger::INFO</tt>).
  def level
    level_override[level_key] || @level
  end

  # Sets the log level; returns +severity+.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  # Argument +severity+ may be an integer, a string, or a symbol:
  #
  #   logger.level = Logger::ERROR # => 3
  #   logger.level = 3             # => 3
  #   logger.level = 'error'       # => "error"
  #   logger.level = :error        # => :error
  #
  # Logger#sev_threshold= is an alias for Logger#level=.
  #
  def level=(severity)
    @level = Severity.coerce(severity)
  end

  # Adjust the log level during the block execution for the current Fiber only
  #
  #   logger.with_level(:debug) do
  #     logger.debug { "Hello" }
  #   end
  def with_level(severity)
    prev, level_override[level_key] = level, Severity.coerce(severity)
    begin
      yield
    ensure
      if prev
        level_override[level_key] = prev
      else
        level_override.delete(level_key)
      end
    end
  end

  # Program name to include in log messages.
  attr_accessor :progname

  # Sets the date-time format.
  #
  # Argument +datetime_format+ should be either of these:
  #
  # - A string suitable for use as a format for method
  #   {Time#strftime}[rdoc-ref:Time#strftime].
  # - +nil+: the logger uses <tt>'%Y-%m-%dT%H:%M:%S.%6N'</tt>.
  #
  def datetime_format=(datetime_format)
    @default_formatter.datetime_format = datetime_format
  end

  # Returns the date-time format; see #datetime_format=.
  #
  def datetime_format
    @default_formatter.datetime_format
  end

  # Sets or retrieves the logger entry formatter proc.
  #
  # When +formatter+ is +nil+, the logger uses Logger::Formatter.
  #
  # When +formatter+ is a proc, a new entry is formatted by the proc,
  # which is called with four arguments:
  #
  # - +severity+: The severity of the entry.
  # - +time+: A Time object representing the entry's timestamp.
  # - +progname+: The program name for the entry.
  # - +msg+: The message for the entry (string or string-convertible object).
  #
  # The proc should return a string containing the formatted entry.
  #
  # This custom formatter uses
  # {String#dump}[rdoc-ref:String#dump]
  # to escape the message string:
  #
  #   logger = Logger.new($stdout, progname: 'mung')
  #   original_formatter = logger.formatter || Logger::Formatter.new
  #   logger.formatter = proc { |severity, time, progname, msg|
  #     original_formatter.call(severity, time, progname, msg.dump)
  #   }
  #   logger.add(Logger::INFO, "hello \n ''")
  #   logger.add(Logger::INFO, "\f\x00\xff\\\"")
  #
  # Output:
  #
  #   I, [2022-05-13T13:16:29.637488 #8492]  INFO -- mung: "hello \n ''"
  #   I, [2022-05-13T13:16:29.637610 #8492]  INFO -- mung: "\f\x00\xFF\\\""
  #
  attr_accessor :formatter

  alias sev_threshold level
  alias sev_threshold= level=

  # Returns +true+ if the log level allows entries with severity
  # Logger::DEBUG to be written, +false+ otherwise.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def debug?; level <= DEBUG; end

  # Sets the log level to Logger::DEBUG.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def debug!; self.level = DEBUG; end

  # Returns +true+ if the log level allows entries with severity
  # Logger::INFO to be written, +false+ otherwise.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def info?; level <= INFO; end

  # Sets the log level to Logger::INFO.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def info!; self.level = INFO; end

  # Returns +true+ if the log level allows entries with severity
  # Logger::WARN to be written, +false+ otherwise.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def warn?; level <= WARN; end

  # Sets the log level to Logger::WARN.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def warn!; self.level = WARN; end

  # Returns +true+ if the log level allows entries with severity
  # Logger::ERROR to be written, +false+ otherwise.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def error?; level <= ERROR; end

  # Sets the log level to Logger::ERROR.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def error!; self.level = ERROR; end

  # Returns +true+ if the log level allows entries with severity
  # Logger::FATAL to be written, +false+ otherwise.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def fatal?; level <= FATAL; end

  # Sets the log level to Logger::FATAL.
  # See {Log Level}[rdoc-ref:Logger@Log+Level].
  #
  def fatal!; self.level = FATAL; end

  # :call-seq:
  #    Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options)
  #
  # With the single argument +logdev+,
  # returns a new logger with all default options:
  #
  #   Logger.new('t.log') # => #<Logger:0x000001e685dc6ac8>
  #
  # Argument +logdev+ must be one of:
  #
  # - A string filepath: entries are to be written
  #   to the file at that path; if the file at that path exists,
  #   new entries are appended.
  # - An IO stream (typically +$stdout+, +$stderr+. or an open file):
  #   entries are to be written to the given stream.
  # - +nil+ or +File::NULL+: no entries are to be written.
  #
  # Examples:
  #
  #   Logger.new('t.log')
  #   Logger.new($stdout)
  #
  # The keyword options are:
  #
  # - +level+: sets the log level; default value is Logger::DEBUG.
  #   See {Log Level}[rdoc-ref:Logger@Log+Level]:
  #
  #     Logger.new('t.log', level: Logger::ERROR)
  #
  # - +progname+: sets the default program name; default is +nil+.
  #   See {Program Name}[rdoc-ref:Logger@Program+Name]:
  #
  #     Logger.new('t.log', progname: 'mung')
  #
  # - +formatter+: sets the entry formatter; default is +nil+.
  #   See {formatter=}[Logger.html#attribute-i-formatter].
  # - +datetime_format+: sets the format for entry timestamp;
  #   default is +nil+.
  #   See #datetime_format=.
  # - +binmode+: sets whether the logger writes in binary mode;
  #   default is +false+.
  # - +shift_period_suffix+: sets the format for the filename suffix
  #   for periodic log file rotation; default is <tt>'%Y%m%d'</tt>.
  #   See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation].
  # - +reraise_write_errors+: An array of exception classes, which will
  #   be reraised if there is an error when writing to the log device.
  #   The default is to swallow all exceptions raised.
  #
  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',
                 reraise_write_errors: [])
    self.level = level
    self.progname = progname
    @default_formatter = Formatter.new
    self.datetime_format = datetime_format
    self.formatter = formatter
    @logdev = nil
    @level_override = {}
    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,
        reraise_write_errors: reraise_write_errors)
    end
  end

  # Sets the logger's output stream:
  #
  # - If +logdev+ is +nil+, reopens the current output stream.
  # - If +logdev+ is a filepath, opens the indicated file for append.
  # - If +logdev+ is an IO stream
  #   (usually <tt>$stdout</tt>, <tt>$stderr</tt>, or an open File object),
  #   opens the stream for append.
  #
  # Example:
  #
  #   logger = Logger.new('t.log')
  #   logger.add(Logger::ERROR, 'one')
  #   logger.close
  #   logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream'
  #   logger.reopen
  #   logger.add(Logger::ERROR, 'three')
  #   logger.close
  #   File.readlines('t.log')
  #   # =>
  #   # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n",
  #   #  "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n",
  #   #  "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"]
  #
  def reopen(logdev = nil)
    @logdev&.reopen(logdev)
    self
  end

  # Creates a log entry, which may or may not be written to the log,
  # depending on the entry's severity and on the log level.
  # See {Log Level}[rdoc-ref:Logger@Log+Level]
  # and {Entries}[rdoc-ref:Logger@Entries] for details.
  #
  # Examples:
  #
  #   logger = Logger.new($stdout, progname: 'mung')
  #   logger.add(Logger::INFO)
  #   logger.add(Logger::ERROR, 'No good')
  #   logger.add(Logger::ERROR, 'No good', 'gnum')
  #
  # Output:
  #
  #   I, [2022-05-12T16:25:31.469726 #36328]  INFO -- mung: mung
  #   E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good
  #   E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good
  #
  # These convenience methods have implicit severity:
  #
  # - #debug.
  # - #info.
  # - #warn.
  # - #error.
  # - #fatal.
  # - #unknown.
  #
  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

  # Writes the given +msg+ to the log with no formatting;
  # returns the number of characters written,
  # or +nil+ if no log device exists:
  #
  #   logger = Logger.new($stdout)
  #   logger << 'My message.' # => 10
  #
  # Output:
  #
  #   My message.
  #
  def <<(msg)
    @logdev&.write(msg)
  end

  # Equivalent to calling #add with severity <tt>Logger::DEBUG</tt>.
  #
  def debug(progname = nil, &block)
    add(DEBUG, nil, progname, &block)
  end

  # Equivalent to calling #add with severity <tt>Logger::INFO</tt>.
  #
  def info(progname = nil, &block)
    add(INFO, nil, progname, &block)
  end

  # Equivalent to calling #add with severity <tt>Logger::WARN</tt>.
  #
  def warn(progname = nil, &block)
    add(WARN, nil, progname, &block)
  end

  # Equivalent to calling #add with severity <tt>Logger::ERROR</tt>.
  #
  def error(progname = nil, &block)
    add(ERROR, nil, progname, &block)
  end

  # Equivalent to calling #add with severity <tt>Logger::FATAL</tt>.
  #
  def fatal(progname = nil, &block)
    add(FATAL, nil, progname, &block)
  end

  # Equivalent to calling #add with severity <tt>Logger::UNKNOWN</tt>.
  #
  def unknown(progname = nil, &block)
    add(UNKNOWN, nil, progname, &block)
  end

  # Closes the logger; returns +nil+:
  #
  #   logger = Logger.new('t.log')
  #   logger.close       # => nil
  #   logger.info('foo') # Prints "log writing failed. closed stream"
  #
  # Related: Logger#reopen.
  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

  # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor.
  def level_override
    @level_override ||= {}
  end

  def level_key
    Fiber.current
  end

  def format_message(severity, datetime, progname, msg)
    (@formatter || @default_formatter).call(severity, datetime, progname, msg)
  end
end
ruby/uri/version.rb000064400000000226150403134310010330 0ustar00module URI
  # :stopdoc:
  VERSION_CODE = '010003'.freeze
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
  # :startdoc:
end
ruby/uri/https.rb000064400000001056150403134310010007 0ustar00# frozen_string_literal: false
# = uri/https.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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

  register_scheme 'HTTPS', HTTPS
end
ruby/uri/rfc2396_parser.rb000064400000042452150403134310011324 0ustar00# frozen_string_literal: false
#--
# = uri/common.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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::HTTP http://example.jp/%uABCD>
    #   URI.parse(u.to_s) #=> raises URI::InvalidURIError
    #
    #   s = "http://example.com/ABCD"
    #   u1 = p.parse(s) #=> #<URI::HTTP http://example.com/ABCD>
    #   u2 = URI.parse(s) #=> #<URI::HTTP http://example.com/ABCD>
    #   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")
    #   #=> #<URI::LDAP 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) # :nodoc:
    if TO_S.respond_to?(:bind_call)
      def inspect # :nodoc:
        TO_S.bind_call(self)
      end
    else
      def inspect # :nodoc:
        TO_S.bind(self).call
      end
    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 = "(?:#{ruby/syntax_suggest.rb000064400000000112150403134320011126 0ustar00igit | "+" | "-" | "." )
      ret[:SCHEME] = scheme = "[#{PATTERN::ALPHA}ruby/yaml/dbm.rb000064400000015451150403134320007557 0ustar00= [ 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

  # Backward compatibility for URI::REGEXP::PATTERN::*
  RFC2396_Parser.new.pattern.each_pair do |sym, str|
    unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
      RFC2396_REGEXP::PATTERN.const_set(sym, str)
    end
  end
end # module URI
ruby/uri/ldaps.rb000064400000000777150403134310007761 0ustar00# 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

  register_scheme 'LDAPS', LDAPS
end
ruby/uri/rfc3986_parser.rb000064400000014010150403134310011317 0ustar00# frozen_string_literal: true
module URI
  class RFC3986_Parser # :nodoc:
    # URI defined in RFC3986
    HOST = %r[
      (?<IP-literal>\[(?:
          (?<IPv6address>
            (?:\h{1,4}:){6}
            (?<ls32>\h{1,4}:\h{1,4}
            | (?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)
                \.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>)
            )
          | ::(?:\h{1,4}:){5}\g<ls32>
          | \h{1,4}?::(?:\h{1,4}:){4}\g<ls32>
          | (?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>
          | (?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>
          | (?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>
          | (?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>
          | (?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}
          | (?:(?:\h{1,4}:){,6}\h{1,4})?::
          )
        | (?<IPvFuture>v\h++\.[!$&-.0-9:;=A-Z_a-z~]++)
        )\])
    | \g<IPv4address>
    | (?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+)
    ]x

    USERINFO = /(?:%\h\h|[!$&-.0-9:;=A-Z_a-z~])*+/

    SCHEME = %r[[A-Za-z][+\-.0-9A-Za-z]*+].source
    SEG = %r[(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/])].source
    SEG_NC = %r[(?:%\h\h|[!$&-.0-9;=@A-Z_a-z~])].source
    FRAGMENT = %r[(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/?])*+].source

    RFC3986_URI = %r[\A
    (?<seg>#{SEG}){0}
    (?<URI>
      (?<scheme>#{SCHEME}):
      (?<hier-part>//
        (?<authority>
          (?:(?<userinfo>#{USERINFO.source})@)?
          (?<host>#{HOST.source.delete(" \n")})
          (?::(?<port>\d*+))?
        )
        (?<path-abempty>(?:/\g<seg>*+)?)
      | (?<path-absolute>/((?!/)\g<seg>++)?)
      | (?<path-rootless>(?!/)\g<seg>++)
      | (?<path-empty>)
      )
      (?:\?(?<query>[^\#]*+))?
      (?:\#(?<fragment>#{FRAGMENT}))?
    )\z]x

    RFC3986_relative_ref = %r[\A
    (?<seg>#{SEG}){0}
    (?<relative-ref>
      (?ruby/yaml/store.rb000064400000003523150403134320010146 0ustar00ly? or
        raise InvalidURIError, "URI must be ascii only #{uri.dump}"
      if m = RFC3986_URI.match(uri)
        query = m["query"]
        scheme = m["scheme"]
        opaque = m["path-rootless"]
        if opaque
          opaque << "?#{query}" if query
          [ scheme,
            nil, # userinfo
            nil, # host
            nil, # port
            nil, # registry
            nil, # path
            opaque,
            nil, # query
            m["fragment"]
          ]
        else # normal
          [ scheme,
            m["userinfo"],
            m["host"],
            m["port"],
            nil, # registry
            (m["path-abempty"] ||
             m["path-absolute"] ||
             m["path-empty"]),
            nil, # opaque
            query,
            m["fragment"]
          ]
        end
      elsif m = RFC3986_relative_ref.match(uri)
        [ nil, # scheme
          m["userinfo"],
          m["host"],
          m["port"],
          nil, # registry,
          (m["path-abempty"] ||
           m["path-absolute"] ||
           m["path-noscheme"] ||
           m["path-empty"]),
          nil, # opaque
          m["query"],
          m["fragment"]
        ]
      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

    # Compatibility for RFC2396 parser
    def extract(str, schemes = nil, &block) # :nodoc:
      warn "URI::RFC3986_PARSER.extract is obsolete. Use URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
      RFC2396_PARSER.extract(str, schemes, &block)
    end

    # Compatibility for RFC2396 parser
    def make_regexp(schemes = nil) # :nodoc:
      warn "URI::RFC3986_PARSERruby/forwardable.rb000064400000022035150403134320010337 0ustar00scape(str, escaped) : RFC2396_PARSER.unescape(str)
    end

    @@to_s = Kernel.instance_method(:to_s)
    if @@to_s.respond_to?(:bind_call)
      def inspect
        @@to_s.bind_call(self)
      end
    else
      def inspect
        @@to_s.bind(self).call
      end
    end

    private

    def default_regexp # :nodoc:
      {
        SCHEME: %r[\A#{SCHEME}\z]o,
        USERINFO: %r[\A#{USERINFO}\z]o,
        HOST: %r[\A#{HOST}\z]o,
        ABS_PATH: %r[\A/#{SEG}*+\z]o,
        REL_PATH: %r[\A(?!/)#{SEG}++\z]o,
        QUERY: %r[\A(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/?])*+\z],
        FRAGMENT: %r[\A#{FRAGMENT}\z]o,
        OPAQUE: %r[\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
ruby/uri/mailto.rb000064400000017521150403134310010136 0ustar00# frozen_string_literal: false
# = uri/mailto.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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 RFC2396_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(?<hfield>(?:%\h\h|[!$'-.0-;@-Z_a-z~])*=(?:%\h\h|[!$'-.0-;@-Z_a-z~])*)(?:&\g<hfield>)*\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 <code>[to, headers]</code>.
    #
    # 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
    # <code>"subject=subscribe&cc=address"</code>, or as an Array of Arrays
    # like <code>[['subject', 'subscribe'], ['cc', 'address']]</code>.
    #
    # 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.
    #
    # Examruby/optparse.rb000064400000172077150403134320007720 0ustar00ruby/uri/http.rb000064400000007176150403134310007635 0ustar00# frozen_string_literal: false
# = uri/http.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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 <URL:http://support.microsoft.com/kb/834489>.
  #
  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 <code>[userinfo, host, port, path, query, fragment]</code>.
    #
    # 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

    #
    # == Description
    #
    # Returns the authority for an HTTP uri, as defined in
    # https://www.rfc-editor.org/rfc/rfc3986#section-3.2.
    #
    #
    # Example:
    #
    #     URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com"
    #     URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000"
    #     URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com"
    #
    def authority
      if port == default_port
        host
      else
        "#{host}:#{port}"
      end
    end

    #
    # == Description
    #
    # Returns the origin for an HTTP uri, as defined in
    # https://www.rfc-editor.org/rfc/rfc6454.
    #
    #
    # Example:
    #
    #     URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com"
    #     URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000"
    #     URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com"
    #     URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com"
    #
    def origin
      "#{scheme}://#{authority}"
    end
  end

  register_scheme 'HTTP', HTTP
end
ruby/uri/ftp.rb000064400000016046150403134310007443 0ustar00# frozen_string_literal: false
# = uri/ftp.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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.
  # https://datatracker.ietf.org/doc/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 <code>[userinfo, host, port, path, typecode]</code>.
    #
    # 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::FTP ftp://john@ftp.example.com/my_file.img>
    #   uri.typecode = "i"
    #   uri
    #   #=> #<URI::FTP ftp://john@ftp.example.com/my_file.img;type=i>
    #
    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:
    #
    # <code>ftp://ftp.example.com/pub/ruby</code>
    #
    # 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:
    #
    # <code>ftp://ftp.example.com/%2Fpub/ruby</code>
    #
    # 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

  register_scheme 'FTP', FTP
end
ruby/uri/ws.rb000064400000004365150403134310007304 0ustar00# frozen_string_literal: false
# = uri/ws.rb
#
# Author:: Matt Muller <mamuller@amazon.com>
# 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 <URL:http://support.microsoft.com/kb/834489>.
  #
  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 <code>[userinfo, host, port, path, query]</code>.
    #
    # 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

  register_scheme 'WS', WS
end
ruby/uri/common.rb000064400000064501150403134320010142 0ustar00# frozen_string_literal: true
#--
# = uri/common.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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
  # The default parser instance for RFC 2396.
  RFC2396_PARSER = RFC2396_Parser.new
  Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)

  # The default parser instance for RFC 3986.
  RFC3986_PARSER = RFC3986_Parser.new
  Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)

  # The default parser instance.
  DEFAULT_PARSER = RFC3986_PARSER
  Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)

  # Set the default parser instance.
  def self.parser=(parser = RFC3986_PARSER)
    remove_const(:Parser) if defined?(::URI::Parser)
    const_set("Parser", parser.class)

    remove_const(:REGEXP) if defined?(::URI::REGEXP)
    remove_const(:PATTERN) if defined?(::URI::PATTERN)
    if Parser == RFC2396_Parser
      const_set("REGEXP", URI::RFC2396_REGEXP)
      const_set("PATTERN", URI::RFC2396_REGEXP::PATTERN)
    end

    Parser.new.regexp.each_pair do |sym, str|
      remove_const(sym) if const_defined?(sym, false)
      const_set(sym, str)
    end
  end
  self.parser = RFC3986_PARSER

  def self.const_missing(const) # :nodoc:
    if const == :REGEXP
      warn "URI::REGEXP is obsolete. Use URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
      URI::RFC2396_REGEXP
    elsif value = RFC2396_PARSER.regexp[const]
      warn "URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
      value
    elsif value = RFC2396_Parser.const_get(const)
      warn "URI::#{const} is obsolete. Use RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
      value
    else
      super
    end
  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

  module Schemes # :nodoc:
  end
  private_constant :Schemes

  # Registers the given +klass+ as the class to be instantiated
  # when parsing a \URI with the given +scheme+:
  #
  #   URI.register_scheme('MS_SEARCH', URI::Generic) # => URI::Generic
  #   URI.scheme_list['MS_SEARCH']                   # => URI::Generic
  #
  # Note that after calling String#upcase on +scheme+, it must be a valid
  # constant name.
  def self.register_scheme(scheme, klass)
    Schemes.const_set(scheme.to_s.upcase, klass)
  end

  # Returns a hash of the defined schemes:
  #
  #   URI.scheme_list
  #   # =>
  #   {"MAILTO"=>URI::MailTo,
  #    "LDAPS"=>URI::LDAPS,
  #    "WS"=>URI::WS,
  #    "HTTP"=>URI::HTTP,
  #    "HTTPS"=>URI::HTTPS,
  #    "LDAP"=>URI::LDAP,
  #    "FILE"=>URI::File,
  #    "FTP"=>URI::FTP}
  #
  # Related: URI.register_scheme.
  def self.scheme_list
    Schemes.constants.map { |name|
      [name.to_s.upcase, Schemes.const_get(name)]
    }.to_h
  end

  INITIAL_SCHEMES = scheme_list
  private_constant :INITIAL_SCHEMES
  Ractor.make_shareable(INITIAL_SCHEMES) if defined?(Ractor)

  # Returns a new object constructed from the given +scheme+, +arguments+,
  # and +default+:
  #
  # - The new object is an instance of <tt>URI.scheme_list[scheme.upcase]</tt>.
  # - The object is initialized by calling the class initializer
  #   using +scheme+ and +arguments+.
  #   See URI::Generic.new.
  #
  # Examples:
  #
  #   values = ['john.doe', 'www.example.com', '123', nil, '/forum/questions/', nil, 'tag=networking&order=newest', 'top']
  #   URI.for('https', *values)
  #   # => #<URI::HTTPS https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
  #   URI.for('foo', *values, default: URI::HTTP)
  #   # => #<URI::HTTP foo://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
  #
  def self.for(scheme, *arguments, default: Generic)
    const_name = scheme.to_s.upcase

    uri_class = INITIAL_SCHEMES[const_name]
    uri_class ||= if /\A[A-Z]\w*\z/.match?(const_name) && Schemes.const_defined?(const_name, false)
      Schemes.const_get(const_name, false)
    end
    uri_class ||= default

    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

  # Returns a 9-element array representing the parts of the \URI
  # formed from the string +uri+;
  # each array element is a string or +nil+:
  #
  #   names = %w[scheme userinfo host port registry path opaque query fragment]
  #   values = URI.split('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top')
  #   names.zip(values)
  #   # =>
  #   [["scheme", "https"],
  #    ["userinfo", "john.doe"],
  #    ["host", "www.example.com"],
  #    ["port", "123"],
  #    ["registry", nil],
  #    ["path", "/forum/questions/"],
  #    ["opaque", nil],
  #    ["query", "tag=networking&order=newest"],
  #    ["fragment", "top"]]
  #
  def self.split(uri)
    DEFAULT_PARSER.split(uri)
  end

  # Returns a new \URI object constructed from the given string +uri+:
  #
  #   URI.parse('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top')
  #   # => #<URI::HTTPS https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
  #   URI.parse('http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top')
  #   # => #<URI::HTTP http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
  #
  # It's recommended to first ::escape string +uri+
  # if it may contain invalid URI characters.
  #
  def self.parse(uri)
    DEFAULT_PARSER.parse(uri)
  end

  # Merges the given URI strings +str+
  # per {RFC 2396}[https://www.rfc-editor.org/rfc/rfc2396.html].
  #
  # Each string in +str+ is converted to an
  # {RFC3986 URI}[https://www.rfc-editor.org/rfc/rfc3986.html] before being merged.
  #
  # Examples:
  #
  #   URI.join("http://example.com/","main.rbx")
  #   # => #<URI::HTTP http://example.com/main.rbx>
  #
  #   URI.join('http://example.com', 'foo')
  #   # => #<URI::HTTP http://example.com/foo>
  #
  #   URI.join('http://example.com', '/foo', '/bar')
  #   # => #<URI::HTTP http://example.com/bar>
  #
  #   URI.join('http://example.com', '/foo', 'bar')
  #   # => #<URI::HTTP http://example.com/bar>
  #
  #   URI.join('http://example.com', '/foo/', 'bar')
  #   # => #<URI::HTTP http://example.com/foo/bar>
  #
  def self.join(*str)
    DEFAULT_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) # :nodoc:
    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)# :nodoc:
    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
  TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze # :nodoc:
  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

  # Returns a URL-encoded string derived from the given string +str+.
  #
  # The returned string:
  #
  # - Preserves:
  #
  #   - Characters <tt>'*'</tt>, <tt>'.'</tt>, <tt>'-'</tt>, and <tt>'_'</tt>.
  #   - Character in ranges <tt>'a'..'z'</tt>, <tt>'A'..'Z'</tt>,
  #     and <tt>'0'..'9'</tt>.
  #
  #   Example:
  #
  #     URI.encode_www_form_component('*.-_azAZ09')
  #     # => "*.-_azAZ09"
  #
  # - Converts:
  #
  #   - Character <tt>' '</tt> to character <tt>'+'</tt>.
  #   - Any other character to "percent notation";
  #     the percent notation for character <i>c</i> is <tt>'%%%X' % c.ord</tt>.
  #
  #   Example:
  #
  #     URI.encode_www_form_component('Here are some punctuation characters: ,;?:')
  #     # => "Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A"
  #
  # Encoding:
  #
  # - If +str+ has encoding Encoding::ASCII_8BIT, argument +enc+ is ignored.
  # - Otherwise +str+ is converted first to Encoding::UTF_8
  #   (with suitable character replacements),
  #   and then to encoding +enc+.
  #
  # In either case, the returned string has forced encoding Encoding::US_ASCII.
  #
  # Related: URI.encode_uri_component (encodes <tt>' '</tt> as <tt>'%20'</tt>).
  def self.encode_www_form_component(str, enc=nil)
    _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_, str, enc)
  end

  # Returns a string decoded from the given \URL-encoded string +str+.
  #
  # The given string is first encoded as Encoding::ASCII-8BIT (using String#b),
  # then decoded (as below), and finally force-encoded to the given encoding +enc+.
  #
  # The returned string:
  #
  # - Preserves:
  #
  #   - Characters <tt>'*'</tt>, <tt>'.'</tt>, <tt>'-'</tt>, and <tt>'_'</tt>.
  #   - Character in ranges <tt>'a'..'z'</tt>, <tt>'A'..'Z'</tt>,
  #     and <tt>'0'..'9'</tt>.
  #
  #   Example:
  #
  #     URI.decode_www_form_component('*.-_azAZ09')
  #     # => "*.-_azAZ09"
  #
  # - Converts:
  #
  #   - Character <tt>'+'</tt> to character <tt>' '</tt>.
  #   - Each "percent notation" to an ASCII character.
  #
  #   Example:
  #
  #     URI.decode_www_form_component('Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A')
  #     # => "Here are some punctuation characters: ,;?:"
  #
  # Related: URI.decode_uri_component (preserves <tt>'+'</tt>).
  def self.decode_www_form_component(str, enc=Encoding::UTF_8)
    _decode_uri_component(/\+|%\h\h/, str, enc)
  end

  # Like URI.encode_www_form_component, except that <tt>' '</tt> (space)
  # is encoded as <tt>'%20'</tt> (instead of <tt>'+'</tt>).
  def self.encode_uri_component(str, enc=nil)
    _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCURICOMP_, str, enc)
  end

  # Like URI.decode_www_form_component, except that <tt>'+'</tt> is preserved.
  def self.decode_uri_component(str, enc=Encoding::UTF_8)
    _decode_uri_component(/%\h\h/, str, enc)
  end

  def self._encode_uri_component(regexp, table, str, enc)
    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!(regexp, table)
    str.force_encoding(Encoding::US_ASCII)
  end
  private_class_method :_encode_uri_component

  def self._decode_uri_component(regexp, str, enc)
    raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/.match?(str)
    str.b.gsub(regexp, TBLDECWWWCOMP_).force_encoding(enc)
  end
  private_class_method :_decode_uri_component

  # Returns a URL-encoded string derived from the given
  # {Enumerable}[rdoc-ref:Enumerable@Enumerable+in+Ruby+Classes]
  # +enum+.
  #
  # The result is suitable for use as form data
  # for an \HTTP request whose <tt>Content-Type</tt> is
  # <tt>'application/x-www-form-urlencoded'</tt>.
  #
  # The returned string consists of the elements of +enum+,
  # each converted to one or more URL-encoded strings,
  # and all joined with character <tt>'&'</tt>.
  #
  # Simple examples:
  #
  #   URI.encode_www_form([['foo', 0], ['bar', 1], ['baz', 2]])
  #   # => "foo=0&bar=1&baz=2"
  #   URI.encode_www_form({foo: 0, bar: 1, baz: 2})
  #   # => "foo=0&bar=1&baz=2"
  #
  # The returned string is formed using method URI.encode_www_form_component,
  # which converts certain characters:
  #
  #   URI.encode_www_form('f#o': '/', 'b-r': '$', 'b z': '@')
  #   # => "f%23o=%2F&b-r=%24&b+z=%40"
  #
  # When +enum+ is Array-like, each element +ele+ is converted to a field:
  #
  # - If +ele+ is an array of two or more elements,
  #   the field is formed from its first two elements
  #   (and any additional elements are ignored):
  #
  #     name = URI.encode_www_form_component(ele[0], enc)
  #     value = URI.encode_www_form_component(ele[1], enc)
  #     "#{name}=#{value}"
  #
  #   Examples:
  #
  #     URI.encode_www_form([%w[foo bar], %w[baz bat bah]])
  #     # => "foo=bar&baz=bat"
  #     URI.encode_www_form([['foo', 0], ['bar', :baz, 'bat']])
  #     # => "foo=0&bar=baz"
  #
  # - If +ele+ is an array of one element,
  #   the field is formed from <tt>ele[0]</tt>:
  #
  #     URI.encode_www_form_component(ele[0])
  #
  #   Example:
  #
  #     URI.encode_www_form([['foo'], [:bar], [0]])
  #     # => "foo&bar&0"
  #
  # - Otherwise the field is formed from +ele+:
  #
  #     URI.encode_www_form_component(ele)
  #
  #   Example:
  #
  #     URI.encode_www_form(['foo', :bar, 0])
  #     # => "foo&bar&0"
  #
  # The elements of an Array-like +enum+ may be mixture:
  #
  #   URI.encode_www_form([['foo', 0], ['bar', 1, 2], ['baz'], :bat])
  #   # => "foo=0&bar=1&baz&bat"
  #
  # When +enum+ is Hash-like,
  # each +key+/+value+ pair is converted to one or more fields:
  #
  # - If +value+ is
  #   {Array-convertible}[rdoc-ref:implicit_conversion.rdoc@Array-Convertible+Objects],
  #   each element +ele+ in +value+ is paired with +key+ to form a field:
  #
  #     name = URI.encode_www_form_component(key, enc)
  #     value = URI.encode_www_form_component(ele, enc)
  #     "#{name}=#{value}"
  #
  #   Example:
  #
  #     URI.encode_www_form({foo: [:bar, 1], baz: [:bat, :bam, 2]})
  #     # => "foo=bar&foo=1&baz=bat&baz=bam&baz=2"
  #
  # - Otherwise, +key+ and +value+ are paired to form a field:
  #
  #     name = URI.encode_www_form_component(key, enc)
  #     value = URI.encode_www_form_component(value, enc)
  #     "#{name}=#{value}"
  #
  #   Example:
  #
  #     URI.encode_www_form({foo: 0, bar: 1, baz: 2})
  #     # => "foo=0&bar=1&baz=2"
  #
  # The elements of a Hash-like +enum+ may be mixture:
  #
  #   URI.encode_www_form({foo: [0, 1], bar: 2})
  #   # => "foo=0&foo=1&bar=2"
  #
  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

  # Returns name/value pairs derived from the given string +str+,
  # which must be an ASCII string.
  #
  # The method may be used to decode the body of Net::HTTPResponse object +res+
  # for which <tt>res['Content-Type']</tt> is <tt>'application/x-www-form-urlencoded'</tt>.
  #
  # The returned data is an array of 2-element subarrays;
  # each subarray is a name/value pair (both are strings).
  # Each returned string has encoding +enc+,
  # and has had invalid characters removed via
  # {String#scrub}[rdoc-ref:String#scrub].
  #
  # A simple example:
  #
  #   URI.decode_www_form('foo=0&bar=1&baz')
  #   # => [["foo", "0"], ["bar", "1"], ["baz", ""]]
  #
  # The returned strings have certain conversions,
  # similar to those performed in URI.decode_www_form_component:
  #
  #   URI.decode_www_form('f%23o=%2F&b-r=%24&b+z=%40')
  #   # => [["f#o", "/"], ["b-r", "$"], ["b z", "@"]]
  #
  # The given string may contain consecutive separators:
  #
  #   URI.decode_www_form('foo=0&&bar=1&&baz=2')
  #   # => [["foo", "0"], ["", ""], ["bar", "1"], ["", ""], ["baz", "2"]]
  #
  # A different separator may be specified:
  #
  #   URI.decode_www_form('foo=0--bar=1--baz', separator: '--')
  #   # => [["foo", "0"], ["bar", "1"], ["baz", ""]]
  #
  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:
  Ractor.make_shareable(WEB_ENCODINGS_) if defined?(Ractor)

  # :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 a \URI object derived from the given +uri+,
  # which may be a \URI string or an existing \URI object:
  #
  #   # Returns a new URI.
  #   uri = URI('http://github.com/ruby/ruby')
  #   # => #<URI::HTTP http://github.com/ruby/ruby>
  #   # Returns the given URI.
  #   URI(uri)
  #   # => #<URI::HTTP http://github.com/ruby/ruby>
  #
  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
ruby/uri/wss.rb000064400000001023150403134320007454 0ustar00# frozen_string_literal: false
# = uri/wss.rb
#
# Author:: Matt Muller <mamuller@amazon.com>
# 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

  register_scheme 'WSS', WSS
end
ruby/uri/file.rb000064400000004365150403134320007573 0ustar00# 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 <code>[host, path]</code>.
    #
    # A path from e.g. the File class should be escaped before
    # being passed.
    #
    # 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"
    #
    #     uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')})
    #     uri3.to_s  # => "file:///path/my%20file.txt"
    #
    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, "cannot set userinfo for file URI"
    end

    # raise InvalidURIError
    def check_user(user)
      raise URI::InvalidURIError, "cannot set user for file URI"
    end

    # raise InvalidURIError
    def check_password(user)
      raise URI::InvalidURIError, "cannot 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

  register_scheme 'FILE', File
end
ruby/uri/ldap.rb000064400000013437150403134320007574 0ustar00# frozen_string_literal: false
# = uri/ldap.rb
#
# Author::
#  Takaaki Tateishi <ttate@jaist.ac.jp>
#  Akira Yamada <akira@ruby-lang.org>
# 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://<host>/<dn>[?<attrs>[?<scope>[?<filter>[?<extensions>]]]]
  #++
  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 <code>[host, port, dn, attributes, scope, filter, extensions]</code>.
    #
    # 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

  register_scheme 'LDAP', LDAP
end
ruby/uri/generic.rb000064400000112064150403134320010264 0ustar00# frozen_string_literal: true

# = uri/generic.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# 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)
              URI::RFC2396_PARSER.escape(x)
            else
              x
            end
          })
        elsif args.kind_of?(Hash)
          tmp = {}
          args.each do |key, value|
            tmp[key] = if value
                URI::RFC2396_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 ruby/yaml.rb000064400000004155150403134320007014 0ustar00t +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,
          "cannot 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,
          "cannot set password with opaque"
      end
      return v unless v

      if !user
        raise InvalidURIError,
ruby/fileutils.rb000064400000236021150403134320010051 0ustar00ser=(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 <code>[user, password]</code>
    # 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 (without URI decoding).
    def user
      @user
    end

    # Returns the password component (without URI decoding).
    def password
      @password
    end

    # Returns the user component after URI decoding.
    def decoded_user
      URI.decode_uri_component(@user) if @user
    end

    # Returns the password component after URI decoding.
    def decoded_password
      URI.decode_uri_component(@password) if @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,
          "cannot 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
      v&.start_with?('[') && v.end_with?(']') ? v[1..-2] : 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 !(v&.start_with?('[') && v&.end_with?(']')) && v&.index(':')
      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,
          "cannot 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, "cannot set registry"
    end
    private :check_registry

    def set_registry(v) # :nodoc:
      raise InvalidURIError, "cannot set registry"
    end
    protected :set_registry

    def registry=(v) # :nodoc:
      raise InvalidURIError, "cannot 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,
          "cannot 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://www.rfc-editor.org/rfc/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_userinfo(rel.userinfo)
        base.set_host(rel.host)
        base.set_port(rel.port || base.default_port)
        base.set_path(rel.path)
      elsif base.path && rel.path
        base.set_path(merge_path(base.path, rel.path))
      end

      # RFC2396, Section 5.2, 7)
      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 cannot `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')
    #   #=> #<URI::Generic /main.rbx?page=1>
    #
    def route_from(oth)
      # you can modify `rel', but cannot `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')
    #   #=> #<URI::Generic /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
    #   #=> #<URI::HTTP http://my.example.com/>
    #
    # 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
        if (@host || @port) && !@path.empty? && !@path.start_with?('/')
          str << '/'
        end
        str << @path
        if @query
          str << '?'
          str << @query
        end
      end
      if @fragment
        str << '#'
        str << @fragment
      end
      str
    end
    alias to_str to_s

    #
    # Compares two URIs.
    #
    def ==(oth)
      if self.class == oth.class
        self.normalize.component_ary == oth.normalize.component_ary
      else
        false
      end
    end

    # Returns the hash value.
    def hash
      self.component_ary.hash
    end

    # Compares with _oth_ for Hash.
    def eql?(oth)
      self.class == oth.class &&
      parser == oth.parser &&
      self.component_ary.eql?(oth.component_ary)
    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 # :nodoc:
      "#<#{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")
    #   #=> [#<URI::HTTP http://foo.com>, #<URI::HTTP http://my.example.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'
        if RUBY_ENGINE == 'jruby' && p_addr = ENV_JAVA['http.proxyHost']
          p_port = ENV_JAVA['http.proxyPort']
          if p_user = ENV_JAVA['http.proxyUser']
            p_pass = ENV_JAVA['http.proxyPass']
            proxy_uri = "http://#{p_user}:#{p_pass}@#{p_addr}:#{p_port}"
          else
            proxy_uri = "http://#{p_addr}:#{p_port}"
          end
        else
          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
        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
ruby/syntax_suggest.rb000064400000000112150403134320011126 0ustar00# frozen_string_literal: true

require_relative "syntax_suggest/core_ext"
ruby/yaml/dbm.rb000064400000016431150403134320007556 0ustar00# frozen_string_literal: false
require 'yaml'

begin
  require 'dbm'
rescue LoadError
end

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

    # :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 )
            if String === val
                if YAML.respond_to?(:safe_load)
                    return YAML.safe_load( val )
                else
                    return YAML.load( val )
                end
            end
        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
            if YAML.respond_to?(:safe_load)
                v = YAML.safe_load( v )
            else
                v = YAML.load( v )
            end
        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.respond_to?(:safe_load) ? YAML.safe_load( v ) : YAML.load( v ) }
        self
    end

    # :call-seq:
    #   ydbm.values
    #
    # Returns an array of values from the database.
    def values
        super.collect { |v| YAML.respond_to?(:safe_load) ? YAML.safe_load( 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
        if a
          a[1] = YAML.respond_to?(:safe_load) ? YAML.safe_load( a[1] ) : YAML.load( a[1] )
        end
        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 if defined?(DBM)
ruby/yaml/store.rb000064400000004145150403134320010147 0ustar00# frozen_string_literal: false
#
# YAML::Store
#
require 'yaml'

begin
  require 'pstore'
rescue LoadError
end

# 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 =  if YAML.respond_to?(:safe_load)
      if Psych::VERSION >= "3.1"
        YAML.safe_load(content, permitted_classes: [Symbol])
      else
        YAML.safe_load(content, [Symbol])
      end
    else
      YAML.load(content)
    end
    if table == false || table == nil
      {}
    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 if defined?(::PStore)
ruby/forwardable.rb000064400000022035150403134320010337 0ustar00# 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 <tt>@records</tt>.  You could provide the lookup method
# #record_number(), which simply calls #[] on the <tt>@records</tt>
# 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 = Thread::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.3"
  VERSION.freeze
  FORWARDABLE_VERSION = VERSION
  FORWARDABLE_VERSION.freeze

  @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
ruby/optparse.rb000064400000200263150403134320007705 0ustar00# 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
#
# === New to +OptionParser+?
#
# See the {Tutorial}[optparse/tutorial.rdoc].
#
# === 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 `<main>': 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+ (need to require +optparse/date+)
# - DateTime -- Anything accepted by +DateTime.parse+ (need to require +optparse/date+)
# - Time -- Anything accepted by +Time.httpdate+ or +Time.parse+ (need to require +optparse/time+)
# - URI  -- Anything accepted by +URI.parse+ (need to require +optparse/uri+)
# - Shellwords -- Anything accepted by +Shellwords.shellwords+ (need to require +optparse/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
#   #<struct User id=1, name="Sam">
#   $ ruby optparse-test.rb --user 2
#   #<struct User id=2, name="Gandalf">
#   $ 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'
#
#   options = {}
#   OptionParser.new do |parser|
#     parser.on('-a')
#     parser.on('-b NUM', Integer)
#     parser.on('-v', '--verbose')
#   end.parse!(into: options)
#
#   p options
#
# 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, along with the accompanying
# {Tutorial}[optparse/tutorial.rdoc],
# 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
  # The version string
  OptionParser::Version = "0.6.0"

  # :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
    # :nodoc:

    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
    # :nodoc:

    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) # :nodoc:
      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 = []) # :nodoc:
      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

    def pretty_print_contents(q) # :nodoc:
      if @block
        q.text ":" + @block.source_location.join(":") + ":"
        first = false
      else
        first = true
      end
      [@short, @long].each do |list|
        list.each do |opt|
          if first
            q.text ":"
            first = false
          end
          q.breakable
          q.text opt
        end
      end
    end

    def pretty_print(q)         # :nodoc:
      q.object_group(self) {pretty_print_contents(q)}
    end

    def omitted_argument(val)   # :nodoc:
      val.pop if val.size == 3 and val.last.nil?
      val
    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(*) # :nodoc:
      end

      def self.pattern          # :nodoc:
        Object
      end

      def pretty_head           # :nodoc:
        "NoArgument"
      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

      def pretty_head           # :nodoc:
        "Required"
      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
          omitted_argument conv_arg(arg)
        end
      end

      def pretty_head           # :nodoc:
        "Optional"
      end
    end

    #
    # Switch that takes an argument, which does not begin with '-' or is '-'.
    #
    class PlacedArgument < self

      #
      # Returns nil if argument is not present or begins with '-' and is not '-'.
      #
      def parse(arg, argv, &error)
        if !(val = arg) and (argv.empty? or /\A-./ =~ (val = argv[0]))
          return nil, block
        end
        opt = (val = parse_arg(val, &error))[1]
        val = conv_arg(*val)
        if opt and !arg
          argv.shift
        else
          omitted_argument val
          val[0] = nil
        end
        val
      end

      def pretty_head           # :nodoc:
        "Placed"
      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
    # :nodoc:

    # 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

    def pretty_print(q)         # :nodoc:
      q.group(1, "(", ")") do
        @list.each do |sw|
          next unless Switch === sw
          q.group(1, "(" + sw.pretty_head, ")") do
            sw.pretty_print_contents(q)
          end
        end
      end
    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) # :nodoc:
      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

  def help_exit
    if STDOUT.tty? && (pager = ENV.values_at(*%w[RUBY_PAGER PAGER]).find {|e| e && !e.empty?})
      less = ENV["LESS"]
      args = [{"LESS" => "#{!less || less.empty? ? '-' : less}Fe"}, pager, "w"]
      print = proc do |f|
        f.puts help
      rescue Errno::EPIPE
        # pager terminated
      end
      if Process.respond_to?(:fork) and false
        IO.popen("-") {|f| f ? Process.exec(*args, in: f) : print.call(STDOUT)}
        # unreachable
      end
      IO.popen(*args, &print)
    else
      puts help
    end
    exit
  end

  #
  # Default options for ARGV, which never appear in option summary.
  #
  Officious = {}

  #
  # --help
  # Shows option summary.
  #ruby/unicode_normalize/tables.rb000064400000666566150403134320013056 0ustar00
      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

  #
  # See self.inc
  #
  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
    @raise_unknown = true
    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
  #
  # See #terminate.
  #
  def self.terminate(arg = nil)
    throw :terminate, arg
  end

  @stack = [DefaultList]
  #
  # Returns the global top option list.
  #
  # Do not use directly.
  #
  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.
  #
  # +type+:: Argument class specifier, any object including Class.
  #
  #   reject(type)
  #
  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

  # Whether to raise at unknown option.
  attr_accessor :raise_unknown

  #
  # 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

  #
  # Shows warning message with the program name
  #
  # +mesg+:: Message, defaulted to +$!+.
  #
  # See Kernel#warn.
  #
  def warn(mesg = $!)
    super("#{program_name}: #{mesg}")
  end

  #
  # Shows message with the program name then aborts.
  #
  # +mesg+:: Message, defaulted to +$!+.
  #
  # See Kernel#abort.
  #
  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.
  #
  # If a block is given, yields +self+ and returns the result of the
  # block, otherwise returns +self+.
  #
  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

  def pretty_print(q)           # :nodoc:
    q.object_group(self) do
      first = true
      if @stack.size > 2
        @stack.each_with_index do |s, i|
          next if i < 2
          next if s.list.empty?
          if first
            first = false
            q.text ":"
          end
          q.breakable
          s.pretty_print(q)
        end
      end
    end
  end

  def inspect                   # :nodoc:
    require 'pp'
    pretty_print_inspect
  end

  #
  # 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) # :nodoc:
    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)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  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) if o && !o.empty?
      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

  # ----
  # Option definition phase methods
  #
  # These methods are used to define options, or to construct an
  # OptionParser instance in other words.

  # :call-seq:
  #   define(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def define(*opts, &block)
    top.append(*(sw = make_switch(opts, block)))
    sw[0]
  end

  # :call-seq:
  #   on(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def on(*opts, &block)
    define(*opts, &block)
    self
  end
  alias def_option define

  # :call-seq:
  #   define_head(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def define_head(*opts, &block)
    top.prepend(*(sw = make_switch(opts, block)))
    sw[0]
  end

  # :call-seq:
  #   on_head(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  # The new option is added at the head of the summary.
  #
  def on_head(*opts, &block)
    define_head(*opts, &block)
    self
  end
  alias def_head_option define_head

  # :call-seq:
  #   define_tail(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  def define_tail(*opts, &block)
    base.append(*(sw = make_switch(opts, block)))
    sw[0]
  end

  #
  # :call-seq:
  #   on_tail(*params, &block)
  #
  # :include: ../doc/optparse/creates_option.rdoc
  #
  # The new option is added at the tail of the 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

  # ----
  # Arguments parse phase methods
  #
  # These methods parse +argv+, convert, and store the results by
  # calling handlers.  As these methods do not modify +self+, +self+
  # can be frozen.

  #
  # 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
  # <code>[]=</code> method (so it can be Hash, or OpenStruct, or other
  # similar object).
  #
  # Returns the rest of +argv+ left unparsed.
  #
  def order(*argv, **keywords, &nonopt)
    argv = argv[0].dup if argv.size == 1 and Array === argv[0]
    order!(argv, **keywords, &nonopt)
  end

  #
  # Same as #order, but removes switches destructively.
  # Non-option arguments remain in +argv+.
  #
  def order!(argv = default_argv, into: nil, **keywords, &nonopt)
    setter = ->(name, val) {into[name.to_sym] = val} if into
    parse_in_order(argv, setter, **keywords, &nonopt)
  end

  def parse_in_order(argv = default_argv, setter = nil, exact: require_exact, **, &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
            if exact
              sw, = search(:long, opt)
            else
              sw, = complete(:long, opt, true)
            end
          rescue ParseError
            throw :terminate, arg unless raise_unknown
            raise $!.set_option(arg, true)
          else
            unless sw
              throw :terminate, arg unless raise_unknown
              raise InvalidOption, arg
            end
          end
          begin
            opt, cb, val = sw.parse(rest, argv) {|*exc| raise(*exc)}
            val = callback!(cb, 1, val) if cb
            callback!(setter, 2, 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 exact
                # if no short options match, try completion with long
                # options.
                sw, = complete(:long, opt)
                eq ||= !rest
              end
            end
          rescue ParseError
            throw :terminate, arg unless raise_unknown
            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 = callback!(cb, 1, val) if cb
            callback!(setter, 2, 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

  # Calls callback with _val_.
  def callback!(cb, max_arity, *args) # :nodoc:
    args.compact!

    if (size = args.size) < max_arity and cb.to_proc.lambda?
      (arity = cb.arity) < 0 and arity = (1-arity)
      arity = max_arity if arity > max_arity
      args[arity - 1] = nil if arity > size
    end
    cb.call(*args)
  end
  private :callback!

  #
  # 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
  # <code>[]=</code> method (so it can be Hash, or OpenStruct, or other
  # similar object).
  #
  def permute(*argv, **keywords)
    argv = argv[0].dup if argv.size == 1 and Array === argv[0]
    permute!(argv, **keywords)
  end

  #
  # Same as #permute, but removes switches destructively.
  # Non-option arguments remain in +argv+.
  #
  def permute!(argv = default_argv, **keywords)
    nonopts = []
    order!(argv, **keywords, &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 <code>[]=</code> method (so it can be Hash,
  # or OpenStruct, or other similar object).
  #
  def parse(*argv, **keywords)
    argv = argv[0].dup if argv.size == 1 and Array === argv[0]
    parse!(argv, **keywords)
  end

  #
  # Same as #parse, but removes switches destructively.
  # Non-option arguments remain in +argv+.
  #
  def parse!(argv = default_argv, **keywords)
    if ENV.include?('POSIXLY_CORRECT')
      order!(argv, **keywords)
    else
      permute!(argv, **keywords)
    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
  #
  # Option +symbolize_names+ (boolean) specifies whether returned Hash keys should be Symbols; defaults to +false+ (use Strings).
  #
  #   params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option", symbolize_names: true)
  #   # 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, symbolize_names: false, **keywords)
    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(:[]=), **keywords)
    symbolize_names ? result.transform_keys(&:to_sym) : result
  end

  #
  # See #getopts.
  #
  def self.getopts(*args, symbolize_names: false)
    new.getopts(*args, symbolize_names: symbolize_names)
  end

  #
  # Traverses @stack, sending each element method +id+ with +args+ and
  # +block+.
  #
  def visit(id, *args, &block) # :nodoc:
    @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) # :nodoc:
    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) # :nodoc:
    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

  #
  # Return candidates for +word+.
  #
  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.
  #
  # The optional +into+ keyword argument works exactly like that accepted in
  # method #parse.
  #
  def load(filename = nil, **keywords)
    unless filename
      basename = File.basename($0, '.*')
      return true if load(File.expand_path(basename, '~/.options'), **keywords) 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), **keywords) rescue nil
      }
    end
    begin
      parse(*File.readlines(filename, chomp: true), **keywords)
      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, '.*'), **keywords)
    env = ENV[env] || ENV[env.upcase] or return
    require 'shellwords'
    parse(*Shellwords.shellwords(env), **keywords)
  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
      case o = o.delete("imx")
      when ""
      when "u"
        s = s.encode(Encoding::UTF_8)
      when "e"
        s = s.encode(Encoding::EUC_JP)
      when "s"
        s = s.encode(Encoding::SJIS)
      when "n"
        f |= Regexp::NOENCODING
      else
        raise OptionParser::InvalidArgument, "unknown regexp option - #{o}"
      end
    else
      s ||= all
    end
    Regexp.new(s, f)
  end

  #
  # Exceptions
  #

  #
  # Base class of exceptions from OptionParser.
  #
  class ParseError < RuntimeError
    # Reason which caused the error.
    Reason = 'parse error'

    # :nodoc:
    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!(**keywords, &blk) options.order!(self, **keywords, &blk) end

    #
    # Parses +self+ destructively in permutation mode and returns +self+
    # containing the rest arguments left unparsed.
    #
    def permute!(**keywords) options.permute!(self, **keywords) end

    #
    # Parses +self+ destructively and returns +self+ containing the
    # rest arguments left unparsed.
    #
    def parse!(**keywords) options.parse!(self, **keywords) 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, symbolize_names: false, **keywords)
      options.getopts(self, *args, symbolize_names: symbolize_names, **keywords)
    end

    #
    # Initializes instance variable.
    #
    def self.extend_object(obj)
      super
      obj.instance_eval {@optparse = nil}
    end

    def initialize(*args)       # :nodoc:
      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:
ruby/yaml.rb000064400000004210150403134320007004 0ustar00# frozen_string_literal: false

begin
  require 'psych'
rescue LoadError
  case RUBY_ENGINE
  when 'jruby'
    warn "The Psych YAML extension failed to load.\n" \
      "Check your env for conflicting versions of SnakeYAML\n" \
      "See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment",
         uplevel: 1
  else
    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
  end
  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
  LOADER_VERSION = "0.4.0"
end
ruby/fileutils.rb000064400000235463150403134320010062 0ustar00# frozen_string_literal: true

begin
  require 'rbconfig'
rescue LoadError
  # for make rjit-headers
end

# Namespace for file utility methods for copying, moving, removing, etc.
#
# == What's Here
#
# First, what’s elsewhere. \Module \FileUtils:
#
# - Inherits from {class Object}[rdoc-ref:Object].
# - Supplements {class File}[rdoc-ref:File]
#   (but is not included or extended there).
#
# Here, module \FileUtils provides methods that are useful for:
#
# - {Creating}[rdoc-ref:FileUtils@Creating].
# - {Deleting}[rdoc-ref:FileUtils@Deleting].
# - {Querying}[rdoc-ref:FileUtils@Querying].
# - {Setting}[rdoc-ref:FileUtils@Setting].
# - {Comparing}[rdoc-ref:FileUtils@Comparing].
# - {Copying}[rdoc-ref:FileUtils@Copying].
# - {Moving}[rdoc-ref:FileUtils@Moving].
# - {Options}[rdoc-ref:FileUtils@Options].
#
# === Creating
#
# - ::mkdir: Creates directories.
# - ::mkdir_p, ::makedirs, ::mkpath: Creates directories,
#   also creating ancestor directories as needed.
# - ::link_entry: Creates a hard link.
# - ::ln, ::link: Creates hard links.
# - ::ln_s, ::symlink: Creates symbolic links.
# - ::ln_sf: Creates symbolic links, overwriting if necessary.
# - ::ln_sr: Creates symbolic links relative to targets
#
# === Deleting
#
# - ::remove_dir: Removes a directory and its descendants.
# - ::remove_entry: Removes an entry, including its descendants if it is a directory.
# - ::remove_entry_secure: Like ::remove_entry, but removes securely.
# - ::remove_file: Removes a file entry.
# - ::rm, ::remove: Removes entries.
# - ::rm_f, ::safe_unlink: Like ::rm, but removes forcibly.
# - ::rm_r: Removes entries and their descendants.
# - ::rm_rf, ::rmtree: Like ::rm_r, but removes forcibly.
# - ::rmdir: Removes directories.
#
# === Querying
#
# - ::pwd, ::getwd: Returns the path to the working directory.
# - ::uptodate?: Returns whether a given entry is newer than given other entries.
#
# === Setting
#
# - ::cd, ::chdir: Sets the working directory.
# - ::chmod: Sets permissions for an entry.
# - ::chmod_R: Sets permissions for an entry and its descendants.
# - ::chown: Sets the owner and group for entries.
# - ::chown_R: Sets the owner and group for entries and their descendants.
# - ::touch: Sets modification and access times for entries,
#   creating if necessary.
#
# === Comparing
#
# - ::compare_file, ::cmp, ::identical?: Returns whether two entries are identical.
# - ::compare_stream: Returns whether two streams are identical.
#
# === Copying
#
# - ::copy_entry: Recursively copies an entry.
# - ::copy_file: Copies an entry.
# - ::copy_stream: Copies a stream.
# - ::cp, ::copy: Copies files.
# - ::cp_lr: Recursively creates hard links.
# - ::cp_r: Recursively copies files, retaining mode, owner, and group.
# - ::install: Recursively copies files, optionally setting mode,
#   owner, and group.
#
# === Moving
#
# - ::mv, ::move: Moves entries.
#
# === Options
#
# - ::collect_method: Returns the names of methods that accept a given option.
# - ::commands: Returns the names of methods that accept options.
# - ::have_option?: Returns whether a given method accepts a given option.
# - ::options: Returns all option names.
# - ::options_of: Returns the names of the options for a given method.
#
# == Path Arguments
#
# Some methods in \FileUtils accept _path_ arguments,
# which are interpreted as paths to filesystem entries:
#
# - If the argument is a string, that value is the path.
# - If the argument has method +:to_path+, it is converted via that method.
# - If the argument has method +:to_str+, it is converted via that method.
#
# == About the Examples
#
# Some examples here involve trees of file entries.
# For these, we sometimes display trees using the
# {tree command-line utility}[https://en.wikipedia.org/wiki/Tree_(command)],
# which is a recursive directory-listing utility that produces
# a depth-indented listing of files and directories.
#
# We use a helper method to launch the command and control the format:
#
#   def tree(dirpath = '.')
#     command = "tree --noreport --charset=ascii #{dirpath}"
#     system(command)
#   end
#
# To illustrate:
#
#   tree('src0')
#   # => src0
#   #    |-- sub0
#   #    |   |-- src0.txt
#   #    |   `-- src1.txt
#   #    `-- sub1
#   #        |-- src2.txt
#   #        `-- src3.txt
#
# == Avoiding the TOCTTOU Vulnerability
#
# For certain methods that recursively remove entries,
# there is a potential vulnerability called the
# {Time-of-check to time-of-use}[https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use],
# or TOCTTOU, vulnerability that can exist when:
#
# - An ancestor directory of the entry at the target path is world writable;
#   such directories include <tt>/tmp</tt>.
# - The directory tree at the target path includes:
#
#   - A world-writable descendant directory.
#   - A symbolic link.
#
# To avoid that vulnerability, you can use this method to remove entries:
#
# - FileUtils.remove_entry_secure: removes recursively
#   if the target path points to a directory.
#
# Also available are these methods,
# each of which calls \FileUtils.remove_entry_secure:
#
# - FileUtils.rm_r with keyword argument <tt>secure: true</tt>.
# - FileUtils.rm_rf with keyword argument <tt>secure: true</tt>.
#
# Finally, this method for moving entries calls \FileUtils.remove_entry_secure
# if the source and destination are on different file systems
# (which means that the "move" is really a copy and remove):
#
# - FileUtils.mv with keyword argument <tt>secure: true</tt>.
#
# \Method \FileUtils.remove_entry_secure removes securely
# by applying a special pre-process:
#
# - If the target path points to a directory, this method uses methods
#   {File#chown}[rdoc-ref:File#chown]
#   and {File#chmod}[rdoc-ref:File#chmod]
#   in removing directories.
# - The owner of the target directory should be either the current process
#   or 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 is set.
#
# For details of this security vulnerability, see Perl cases:
#
# - {CVE-2005-0448}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448].
# - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452].
#
module FileUtils
  # The version number.
  VERSION = "1.7.3"

  def self.private_module_function(name)   #:nodoc:
    module_function name
    private_class_method name
  end

  #
  # Returns a string containing the path to the current directory:
  #
  #   FileUtils.pwd # => "/rdoc/fileutils"
  #
  # Related: FileUtils.cd.
  #
  def pwd
    Dir.pwd
  end
  module_function :pwd

  alias getwd pwd
  module_function :getwd

  # Changes the working directory to the given +dir+, which
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments]:
  #
  # With no block given,
  # changes the current directory to the directory at +dir+; returns zero:
  #
  #   FileUtils.pwd # => "/rdoc/fileutils"
  #   FileUtils.cd('..')
  #   FileUtils.pwd # => "/rdoc"
  #   FileUtils.cd('fileutils')
  #
  # With a block given, changes the current directory to the directory
  # at +dir+, calls the block with argument +dir+,
  # and restores the original current directory; returns the block's value:
  #
  #   FileUtils.pwd                                     # => "/rdoc/fileutils"
  #   FileUtils.cd('..') { |arg| [arg, FileUtils.pwd] } # => ["..", "/rdoc"]
  #   FileUtils.pwd                                     # => "/rdoc/fileutils"
  #
  # Keyword arguments:
  #
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.cd('..')
  #     FileUtils.cd('fileutils')
  #
  #   Output:
  #
  #     cd ..
  #     cd fileutils
  #
  # Related: FileUtils.pwd.
  #
  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 the file at path +new+
  # is newer than all the files at paths in array +old_list+;
  # +false+ otherwise.
  #
  # Argument +new+ and the elements of +old_list+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]:
  #
  #   FileUtils.uptodate?('Rakefile', ['Gemfile', 'README.md']) # => true
  #   FileUtils.uptodate?('Gemfile', ['Rakefile', 'README.md']) # => false
  #
  # A non-existent file is considered to be infinitely old.
  #
  # Related: FileUtils.touch.
  #
  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 directories at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, creates a directory at each +path+ in +list+
  # by calling: <tt>Dir.mkdir(path, mode)</tt>;
  # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
  #
  #   FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"]
  #   FileUtils.mkdir('tmp4')        # => ["tmp4"]
  #
  # Keyword arguments:
  #
  # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
  #   see {File.chmod}[rdoc-ref:File.chmod].
  # - <tt>noop: true</tt> - does not create directories.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.mkdir(%w[tmp0 tmp1], verbose: true)
  #     FileUtils.mkdir(%w[tmp2 tmp3], mode: 0700, verbose: true)
  #
  #   Output:
  #
  #     mkdir tmp0 tmp1
  #     mkdir -m 700 tmp2 tmp3
  #
  # Raises an exception if any path points to an existing
  # file or directory, or if for any reason a directory cannot be created.
  #
  # Related: FileUtils.mkdir_p.
  #
  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 directories at the paths in the given +list+
  # (a single path or an array of paths),
  # also creating ancestor directories as needed;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, creates a directory at each +path+ in +list+,
  # along with any needed ancestor directories,
  # by calling: <tt>Dir.mkdir(path, mode)</tt>;
  # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
  #
  #   FileUtils.mkdir_p(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
  #   FileUtils.mkdir_p('tmp4/tmp5')             # => ["tmp4/tmp5"]
  #
  # Keyword arguments:
  #
  # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
  #   see {File.chmod}[rdoc-ref:File.chmod].
  # - <tt>noop: true</tt> - does not create directories.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.mkdir_p(%w[tmp0 tmp1], verbose: true)
  #     FileUtils.mkdir_p(%w[tmp2 tmp3], mode: 0700, verbose: true)
  #
  #   Output:
  #
  #     mkdir -p tmp0 tmp1
  #     mkdir -p -m 700 tmp2 tmp3
  #
  # Raises an exception if for any reason a directory cannot be created.
  #
  # FileUtils.mkpath and FileUtils.makedirs are aliases for FileUtils.mkdir_p.
  #
  # Related: FileUtils.mkdir.
  #
  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)

      stack = []
      until File.directory?(path) || File.dirname(path) == path
        stack.push path
        path = File.dirname(path)
      end
      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 directories at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, removes the directory at each +path+ in +list+,
  # by calling: <tt>Dir.rmdir(path)</tt>;
  # see {Dir.rmdir}[rdoc-ref:Dir.rmdir]:
  #
  #   FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
  #   FileUtils.rmdir('tmp4/tmp5')             # => ["tmp4/tmp5"]
  #
  # Keyword arguments:
  #
  # - <tt>parents: true</tt> - removes successive ancestor directories
  #   if empty.
  # - <tt>noop: true</tt> - does not remove directories.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3], parents: true, verbose: true)
  #     FileUtils.rmdir('tmp4/tmp5', parents: true, verbose: true)
  #
  #   Output:
  #
  #     rmdir -p tmp0/tmp1 tmp2/tmp3
  #     rmdir -p tmp4/tmp5
  #
  # Raises an exception if a directory does not exist
  # or if for any reason a directory cannot be removed.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # When +src+ is the path to an existing file
  # and +dest+ is the path to a non-existent file,
  # creates a hard link at +dest+ pointing to +src+; returns zero:
  #
  #   Dir.children('tmp0/')                    # => ["t.txt"]
  #   Dir.children('tmp1/')                    # => []
  #   FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk') # => 0
  #   Dir.children('tmp1/')                    # => ["t.lnk"]
  #
  # When +src+ is the path to an existing file
  # and +dest+ is the path to an existing directory,
  # creates a hard link at <tt>dest/src</tt> pointing to +src+; returns zero:
  #
  #   Dir.children('tmp2')               # => ["t.dat"]
  #   Dir.children('tmp3')               # => []
  #   FileUtils.ln('tmp2/t.dat', 'tmp3') # => 0
  #   Dir.children('tmp3')               # => ["t.dat"]
  #
  # When +src+ is an array of paths to existing files
  # and +dest+ is the path to an existing directory,
  # then for each path +target+ in +src+,
  # creates a hard link at <tt>dest/target</tt> pointing to +target+;
  # returns +src+:
  #
  #   Dir.children('tmp4/')                               # => []
  #   FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/') # => ["tmp0/t.txt", "tmp2/t.dat"]
  #   Dir.children('tmp4/')                               # => ["t.dat", "t.txt"]
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - overwrites +dest+ if it exists.
  # - <tt>noop: true</tt> - does not create links.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk', verbose: true)
  #     FileUtils.ln('tmp2/t.dat', 'tmp3', verbose: true)
  #     FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/', verbose: true)
  #
  #   Output:
  #
  #     ln tmp0/t.txt tmp1/t.lnk
  #     ln tmp2/t.dat tmp3
  #     ln tmp0/t.txt tmp2/t.dat tmp4/
  #
  # Raises an exception if +dest+ is the path to an existing file
  # and keyword argument +force+ is not +true+.
  #
  # Related: FileUtils.link_entry (has different options).
  #
  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

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # creates links +dest+ and descendents pointing to +src+ and its descendents:
  #
  #   tree('src0')
  #   # => src0
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   File.exist?('dest0') # => false
  #   FileUtils.cp_lr('src0', 'dest0')
  #   tree('dest0')
  #   # => dest0
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # If +src+ and +dest+ are both paths to directories,
  # creates links <tt>dest/src</tt> and descendents
  # pointing to +src+ and its descendents:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   FileUtils.mkdir('dest1')
  #   FileUtils.cp_lr('src1', 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    `-- src1
  #   #        |-- sub0
  #   #        |   |-- src0.txt
  #   #        |   `-- src1.txt
  #   #        `-- sub1
  #   #            |-- src2.txt
  #   #            `-- src3.txt
  #
  # If +src+ is an array of paths to entries and +dest+ is the path to a directory,
  # for each path +filepath+ in +src+, creates a link at <tt>dest/filepath</tt>
  # pointing to that path:
  #
  #   tree('src2')
  #   # => src2
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   FileUtils.mkdir('dest2')
  #   FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2')
  #   tree('dest2')
  #   # => dest2
  #   #    |-- sub0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- sub1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
  #   does not dereference it.
  # - <tt>noop: true</tt> - does not create links.
  # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.cp_lr('src0', 'dest0', noop: true, verbose: true)
  #     FileUtils.cp_lr('src1', 'dest1', noop: true, verbose: true)
  #     FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2', noop: true, verbose: true)
  #
  #   Output:
  #
  #     cp -lr src0 dest0
  #     cp -lr src1 dest1
  #     cp -lr src2/sub0 src2/sub1 dest2
  #
  # Raises an exception if +dest+ is the path to an existing file or directory
  # and keyword argument <tt>remove_destination: true</tt> is not given.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Creates {symbolic links}[https://en.wikipedia.org/wiki/Symbolic_link].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to an existing file:
  #
  # - When +dest+ is the path to a non-existent file,
  #   creates a symbolic link at +dest+ pointing to +src+:
  #
  #     FileUtils.touch('src0.txt')
  #     File.exist?('dest0.txt')   # => false
  #     FileUtils.ln_s('src0.txt', 'dest0.txt')
  #     File.symlink?('dest0.txt') # => true
  #
  # - When +dest+ is the path to an existing file,
  #   creates a symbolic link at +dest+ pointing to +src+
  #   if and only if keyword argument <tt>force: true</tt> is given
  #   (raises an exception otherwise):
  #
  #     FileUtils.touch('src1.txt')
  #     FileUtils.touch('dest1.txt')
  #     FileUtils.ln_s('src1.txt', 'dest1.txt', force: true)
  #     FileTest.symlink?('dest1.txt') # => true
  #
  #     FileUtils.ln_s('src1.txt', 'dest1.txt') # Raises Errno::EEXIST.
  #
  # If +dest+ is the path to a directory,
  # creates a symbolic link at <tt>dest/src</tt> pointing to +src+:
  #
  #   FileUtils.touch('src2.txt')
  #   FileUtils.mkdir('destdir2')
  #   FileUtils.ln_s('src2.txt', 'destdir2')
  #   File.symlink?('destdir2/src2.txt') # => true
  #
  # If +src+ is an array of paths to existing files and +dest+ is a directory,
  # for each child +child+ in +src+ creates a symbolic link <tt>dest/child</tt>
  # pointing to +child+:
  #
  #   FileUtils.mkdir('srcdir3')
  #   FileUtils.touch('srcdir3/src0.txt')
  #   FileUtils.touch('srcdir3/src1.txt')
  #   FileUtils.mkdir('destdir3')
  #   FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3')
  #   File.symlink?('destdir3/src0.txt') # => true
  #   File.symlink?('destdir3/src1.txt') # => true
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - overwrites +dest+ if it exists.
  # - <tt>relative: false</tt> - create links relative to +dest+.
  # - <tt>noop: true</tt> - does not create links.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.ln_s('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     FileUtils.ln_s('src1.txt', 'destdir1', noop: true, verbose: true)
  #     FileUtils.ln_s('src2.txt', 'dest2.txt', force: true, noop: true, verbose: true)
  #     FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3', noop: true, verbose: true)
  #
  #   Output:
  #
  #     ln -s src0.txt dest0.txt
  #     ln -s src1.txt destdir1
  #     ln -sf src2.txt dest2.txt
  #     ln -s srcdir3/src0.txt srcdir3/src1.txt destdir3
  #
  # Related: FileUtils.ln_sf.
  #
  def ln_s(src, dest, force: nil, relative: false, target_directory: true, noop: nil, verbose: nil)
    if relative
      return ln_sr(src, dest, force: force, noop: noop, verbose: verbose)
    end
    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

  # Like FileUtils.ln_s, but always with keyword argument <tt>force: true</tt> given.
  #
  def ln_sf(src, dest, noop: nil, verbose: nil)
    ln_s src, dest, force: true, noop: noop, verbose: verbose
  end
  module_function :ln_sf

  # Like FileUtils.ln_s, but create links relative to +dest+.
  #
  def ln_sr(src, dest, target_directory: true, force: nil, noop: nil, verbose: nil)
    options = "#{force ? 'f' : ''}#{target_directory ? '' : 'T'}"
    dest = File.path(dest)
    srcs = Array(src)
    link = proc do |s, target_dir_p = true|
      s = File.path(s)
      if target_dir_p
        d = File.join(destdirs = dest, File.basename(s))
      else
        destdirs = File.dirname(d = dest)
      end
      destdirs = fu_split_path(File.realpath(destdirs))
      if fu_starting_path?(s)
        srcdirs = fu_split_path((File.realdirpath(s) rescue File.expand_path(s)))
        base = fu_relative_components_from(srcdirs, destdirs)
        s = File.join(*base)
      else
        srcdirs = fu_clean_components(*fu_split_path(s))
        base = fu_relative_components_from(fu_split_path(Dir.pwd), destdirs)
        while srcdirs.first&. == ".." and base.last&.!=("..") and !fu_starting_path?(base.last)
          srcdirs.shift
          base.pop
        end
        s = File.join(*base, *srcdirs)
      end
      fu_output_message "ln -s#{options} #{s} #{d}" if verbose
      next if noop
      remove_file d, true if force
      File.symlink s, d
    end
    case srcs.size
    when 0
    when 1
      link[srcs[0], target_directory && File.directory?(dest)]
    else
      srcs.each(&link)
    end
  end
  module_function :ln_sr

  # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link]; returns +nil+.
  #
  # Arguments +src+ and +dest+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file and +dest+ does not exist,
  # creates a hard link at +dest+ pointing to +src+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.link_entry('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # recursively creates hard links at +dest+ pointing to paths in +src+:
  #
  #   FileUtils.mkdir_p(['src1/dir0', 'src1/dir1'])
  #   src_file_paths = [
  #     'src1/dir0/t0.txt',
  #     'src1/dir0/t1.txt',
  #     'src1/dir1/t2.txt',
  #     'src1/dir1/t3.txt',
  #     ]
  #   FileUtils.touch(src_file_paths)
  #   File.directory?('dest1')        # => true
  #   FileUtils.link_entry('src1', 'dest1')
  #   File.file?('dest1/dir0/t0.txt') # => true
  #   File.file?('dest1/dir0/t1.txt') # => true
  #   File.file?('dest1/dir1/t2.txt') # => true
  #   File.file?('dest1/dir1/t3.txt') # => true
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: true</tt> - dereferences +src+ if it is a symbolic link.
  # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
  #
  # Raises an exception if +dest+ is the path to an existing file or directory
  # and keyword argument <tt>remove_destination: true</tt> is not given.
  #
  # Related: FileUtils.ln (has different options).
  #
  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 files.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file and +dest+ is not the path to a directory,
  # copies +src+ to +dest+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.cp('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a file and +dest+ is the path to a directory,
  # copies +src+ to <tt>dest/src</tt>:
  #
  #   FileUtils.touch('src1.txt')
  #   FileUtils.mkdir('dest1')
  #   FileUtils.cp('src1.txt', 'dest1')
  #   File.file?('dest1/src1.txt') # => true
  #
  # If +src+ is an array of paths to files and +dest+ is the path to a directory,
  # copies from each +src+ to +dest+:
  #
  #   src_file_paths = ['src2.txt', 'src2.dat']
  #   FileUtils.touch(src_file_paths)
  #   FileUtils.mkdir('dest2')
  #   FileUtils.cp(src_file_paths, 'dest2')
  #   File.file?('dest2/src2.txt') # => true
  #   File.file?('dest2/src2.dat') # => true
  #
  # Keyword arguments:
  #
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>noop: true</tt> - does not copy files.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.cp('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     FileUtils.cp('src1.txt', 'dest1', noop: true, verbose: true)
  #     FileUtils.cp(src_file_paths, 'dest2', noop: true, verbose: true)
  #
  #   Output:
  #
  #     cp src0.txt dest0.txt
  #     cp src1.txt dest1
  #     cp src2.txt src2.dat dest2
  #
  # Raises an exception if +src+ is a directory.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Recursively copies files.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # The mode, owner, and group are retained in the copy;
  # to change those, use FileUtils.install instead.
  #
  # If +src+ is the path to a file and +dest+ is not the path to a directory,
  # copies +src+ to +dest+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.cp_r('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is the path to a file and +dest+ is the path to a directory,
  # copies +src+ to <tt>dest/src</tt>:
  #
  #   FileUtils.touch('src1.txt')
  #   FileUtils.mkdir('dest1')
  #   FileUtils.cp_r('src1.txt', 'dest1')
  #   File.file?('dest1/src1.txt') # => true
  #
  # If +src+ is the path to a directory and +dest+ does not exist,
  # recursively copies +src+ to +dest+:
  #
  #   tree('src2')
  #   # => src2
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #    |-- src2.txt
  #   #    `-- src3.txt
  #   FileUtils.exist?('dest2') # => false
  #   FileUtils.cp_r('src2', 'dest2')
  #   tree('dest2')
  #   # => dest2
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #    |-- src2.txt
  #   #    `-- src3.txt
  #
  # If +src+ and +dest+ are paths to directories,
  # recursively copies +src+ to <tt>dest/src</tt>:
  #
  #   tree('src3')
  #   # => src3
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #    |-- src2.txt
  #   #    `-- src3.txt
  #   FileUtils.mkdir('dest3')
  #   FileUtils.cp_r('src3', 'dest3')
  #   tree('dest3')
  #   # => dest3
  #   #    `-- src3
  #   #      |-- dir0
  #   #      |   |-- src0.txt
  #   #      |   `-- src1.txt
  #   #      `-- dir1
  #   #          |-- src2.txt
  #   #          `-- src3.txt
  #
  # If +src+ is an array of paths and +dest+ is a directory,
  # recursively copies from each path in +src+ to +dest+;
  # the paths in +src+ may point to files and/or directories.
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
  #   does not dereference it.
  # - <tt>noop: true</tt> - does not copy files.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.cp_r('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     FileUtils.cp_r('src1.txt', 'dest1', noop: true, verbose: true)
  #     FileUtils.cp_r('src2', 'dest2', noop: true, verbose: true)
  #     FileUtils.cp_r('src3', 'dest3', noop: true, verbose: true)
  #
  #   Output:
  #
  #     cp -r src0.txt dest0.txt
  #     cp -r src1.txt dest1
  #     cp -r src2 dest2
  #     cp -r src3 dest3
  #
  # Raises an exception of +src+ is the path to a directory
  # and +dest+ is the path to a file.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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

  # Recursively copies files from +src+ to +dest+.
  #
  # Arguments +src+ and +dest+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ is the path to a file, copies +src+ to +dest+:
  #
  #   FileUtils.touch('src0.txt')
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.copy_entry('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt')  # => true
  #
  # If +src+ is a directory, recursively copies +src+ to +dest+:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   FileUtils.copy_entry('src1', 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #
  # The recursive copying preserves file types for regular files,
  # directories, and symbolic links;
  # other file types (FIFO streams, device files, etc.) are not supported.
  #
  # Keyword arguments:
  #
  # - <tt>dereference_root: true</tt> - if +src+ is a symbolic link,
  #   follows the link.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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 from +src+ to +dest+, which should not be directories.
  #
  # Arguments +src+ and +dest+
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Examples:
  #
  #   FileUtils.touch('src0.txt')
  #   FileUtils.copy_file('src0.txt', 'dest0.txt')
  #   File.file?('dest0.txt') # => true
  #
  # Keyword arguments:
  #
  # - <tt>dereference: false</tt> - if +src+ is a symbolic link,
  #   does not follow the link.
  # - <tt>preserve: true</tt> - preserves file times.
  # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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 \IO stream +src+ to \IO stream +dest+ via
  # {IO.copy_stream}[rdoc-ref:IO.copy_stream].
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  def copy_stream(src, dest)
    IO.copy_stream(src, dest)
  end
  module_function :copy_stream

  # Moves entries.
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # If +src+ and +dest+ are on different file systems,
  # first copies, then removes +src+.
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # If +src+ is the path to a single file or directory and +dest+ does not exist,
  # moves +src+ to +dest+:
  #
  #   tree('src0')
  #   # => src0
  #   #    |-- src0.txt
  #   #    `-- src1.txt
  #   File.exist?('dest0') # => false
  #   FileUtils.mv('src0', 'dest0')
  #   File.exist?('src0')  # => false
  #   tree('dest0')
  #   # => dest0
  #   #    |-- src0.txt
  #   #    `-- src1.txt
  #
  # If +src+ is an array of paths to files and directories
  # and +dest+ is the path to a directory,
  # copies from each path in the array to +dest+:
  #
  #   File.file?('src1.txt') # => true
  #   tree('src1')
  #   # => src1
  #   #    |-- src.dat
  #   #    `-- src.txt
  #   Dir.empty?('dest1')    # => true
  #   FileUtils.mv(['src1.txt', 'src1'], 'dest1')
  #   tree('dest1')
  #   # => dest1
  #   #    |-- src1
  #   #    |   |-- src.dat
  #   #    |   `-- src.txt
  #   #    `-- src1.txt
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - if the move includes removing +src+
  #   (that is, if +src+ and +dest+ are on different file systems),
  #   ignores raised exceptions of StandardError and its descendants.
  # - <tt>noop: true</tt> - does not move files.
  # - <tt>secure: true</tt> - removes +src+ securely;
  #   see details at FileUtils.remove_entry_secure.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.mv('src0', 'dest0', noop: true, verbose: true)
  #     FileUtils.mv(['src1.txt', 'src1'], 'dest1', noop: true, verbose: true)
  #
  #   Output:
  #
  #     mv src0 dest0
  #     mv src1.txt src1 dest1
  #
  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

  # Removes entries at the paths in the given +list+
  # (a single path or an array of paths)
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # With no keyword arguments, removes files at the paths given in +list+:
  #
  #   FileUtils.touch(['src0.txt', 'src0.dat'])
  #   FileUtils.rm(['src0.dat', 'src0.txt']) # => ["src0.dat", "src0.txt"]
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - ignores raised exceptions of StandardError
  #   and its descendants.
  # - <tt>noop: true</tt> - does not remove files; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.rm(['src0.dat', 'src0.txt'], noop: true, verbose: true)
  #
  #   Output:
  #
  #     rm src0.dat src0.txt
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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, **kwargs)
  #
  # Argument +list+ (a single path or an array of paths)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # See FileUtils.rm for keyword arguments.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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

  # Removes entries at the paths in the given +list+
  # (a single path or an array of paths);
  # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # For each file path, removes the file at that path:
  #
  #   FileUtils.touch(['src0.txt', 'src0.dat'])
  #   FileUtils.rm_r(['src0.dat', 'src0.txt'])
  #   File.exist?('src0.txt') # => false
  #   File.exist?('src0.dat') # => false
  #
  # For each directory path, recursively removes files and directories:
  #
  #   tree('src1')
  #   # => src1
  #   #    |-- dir0
  #   #    |   |-- src0.txt
  #   #    |   `-- src1.txt
  #   #    `-- dir1
  #   #        |-- src2.txt
  #   #        `-- src3.txt
  #   FileUtils.rm_r('src1')
  #   File.exist?('src1') # => false
  #
  # Keyword arguments:
  #
  # - <tt>force: true</tt> - ignores raised exceptions of StandardError
  #   and its descendants.
  # - <tt>noop: true</tt> - does not remove entries; returns +nil+.
  # - <tt>secure: true</tt> - removes +src+ securely;
  #   see details at FileUtils.remove_entry_secure.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.rm_r(['src0.dat', 'src0.txt'], noop: true, verbose: true)
  #     FileUtils.rm_r('src1', noop: true, verbose: true)
  #
  #   Output:
  #
  #     rm -r src0.dat src0.txt
  #     rm -r src1
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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, **kwargs)
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # May cause a local vulnerability if not called with keyword argument
  # <tt>secure: true</tt>;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # See FileUtils.rm_r for keyword arguments.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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

  # Securely removes the entry given by +path+,
  # which should be the entry for a regular file, a symbolic link,
  # or a directory.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Avoids a local vulnerability that can exist in certain circumstances;
  # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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?

  # Removes the entry given by +path+,
  # which should be the entry for a regular file, a symbolic link,
  # or a directory.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: FileUtils.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 the file entry given by +path+,
  # which should be the entry for a regular file or a symbolic link.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  def remove_file(path, force = false)
    Entry_.new(path).remove_file
  rescue
    raise unless force
  end
  module_function :remove_file

  # Recursively removes the directory entry given by +path+,
  # which should be the entry for a regular file, a symbolic link,
  # or a directory.
  #
  # Argument +path+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Optional argument +force+ specifies whether to ignore
  # raised exceptions of StandardError and its descendants.
  #
  # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
  #
  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 files +a+ and +b+ are identical,
  # +false+ otherwise.
  #
  # Arguments +a+ and +b+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # FileUtils.identical? and FileUtils.cmp are aliases for FileUtils.compare_file.
  #
  # Related: FileUtils.compare_stream.
  #
  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 streams +a+ and +b+ are identical,
  # +false+ otherwise.
  #
  # Arguments +a+ and +b+
  # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Related: FileUtils.compare_file.
  #
  def compare_stream(a, b)
    bsize = fu_stream_blksize(a, b)

    sa = String.new(capacity: bsize)
    sb = String.new(capacity: bsize)

    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

  # Copies a file entry.
  # See {install(1)}[https://man7.org/linux/man-pages/man1/install.1.html].
  #
  # Arguments +src+ (a single path or an array of paths)
  # and +dest+ (a single path)
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments];
  #
  # If the entry at +dest+ does not exist, copies from +src+ to +dest+:
  #
  #   File.read('src0.txt')    # => "aaa\n"
  #   File.exist?('dest0.txt') # => false
  #   FileUtils.install('src0.txt', 'dest0.txt')
  #   File.read('dest0.txt')   # => "aaa\n"
  #
  # If +dest+ is a file entry, copies from +src+ to +dest+, overwriting:
  #
  #   File.read('src1.txt')  # => "aaa\n"
  #   File.read('dest1.txt') # => "bbb\n"
  #   FileUtils.install('src1.txt', 'dest1.txt')
  #   File.read('dest1.txt') # => "aaa\n"
  #
  # If +dest+ is a directory entry, copies from +src+ to <tt>dest/src</tt>,
  # overwriting if necessary:
  #
  #   File.read('src2.txt')       # => "aaa\n"
  #   File.read('dest2/src2.txt') # => "bbb\n"
  #   FileUtils.install('src2.txt', 'dest2')
  #   File.read('dest2/src2.txt') # => "aaa\n"
  #
  # If +src+ is an array of paths and +dest+ points to a directory,
  # copies each path +path+ in +src+ to <tt>dest/path</tt>:
  #
  #   File.file?('src3.txt') # => true
  #   File.file?('src3.dat') # => true
  #   FileUtils.mkdir('dest3')
  #   FileUtils.install(['src3.txt', 'src3.dat'], 'dest3')
  #   File.file?('dest3/src3.txt') # => true
  #   File.file?('dest3/src3.dat') # => true
  #
  # Keyword arguments:
  #
  # - <tt>group: <i>group</i></tt> - changes the group if not +nil+,
  #   using {File.chown}[rdoc-ref:File.chown].
  # - <tt>mode: <i>permissions</i></tt> - changes the permissions.
  #   using {File.chmod}[rdoc-ref:File.chmod].
  # - <tt>noop: true</tt> - does not copy entries; returns +nil+.
  # - <tt>owner: <i>owner</i></tt> - changes the owner if not +nil+,
  #   using {File.chown}[rdoc-ref:File.chown].
  # - <tt>preserve: true</tt> - preserve timestamps
  #   using {File.utime}[rdoc-ref:File.utime].
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.install('src0.txt', 'dest0.txt', noop: true, verbose: true)
  #     FileUtils.install('src1.txt', 'dest1.txt', noop: true, verbose: true)
  #     FileUtils.install('src2.txt', 'dest2', noop: true, verbose: true)
  #
  #   Output:
  #
  #     install -c src0.txt dest0.txt
  #     install -c src1.txt dest1.txt
  #     install -c src2.txt dest2
  #
  # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
  #
  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
        if d.end_with?('/')
          mkdir_p d
          copy_file s, d + File.basename(s)
        else
          mkdir_p File.expand_path('..', d)
          copy_file s, d
        end
        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 permissions on the entries at the paths given in +list+
  # (a single path or an array of paths)
  # to the permissions given by +mode+;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
  #
  # - Modifies each entry that is a regular file using
  #   {File.chmod}[rdoc-ref:File.chmod].
  # - Modifies each entry that is a symbolic link using
  #   {File.lchmod}[rdoc-ref:File.lchmod].
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Argument +mode+ may be either an integer or a string:
  #
  # - \Integer +mode+: represents the permission bits to be set:
  #
  #     FileUtils.chmod(0755, 'src0.txt')
  #     FileUtils.chmod(0644, ['src0.txt', 'src0.dat'])
  #
  # - \String +mode+: represents the permissions to be set:
  #
  #   The string is of the form <tt>[targets][[operator][perms[,perms]]</tt>, where:
  #
  #   - +targets+ may be any combination of these letters:
  #
  #     - <tt>'u'</tt>: permissions apply to the file's owner.
  #     - <tt>'g'</tt>: permissions apply to users in the file's group.
  #     - <tt>'o'</tt>: permissions apply to other users not in the file's group.
  #     - <tt>'a'</tt> (the default): permissions apply to all users.
  #
  #   - +operator+ may be one of these letters:
  #
  #     - <tt>'+'</tt>: adds permissions.
  #     - <tt>'-'</tt>: removes permissions.
  #     - <tt>'='</tt>: sets (replaces) permissions.
  #
  #   - +perms+ (may be repeated, with separating commas)
  #     may be any combination of these letters:
  #
  #     - <tt>'r'</tt>: Read.
  #     - <tt>'w'</tt>: Write.
  #     - <tt>'x'</tt>: Execute (search, for a directory).
  #     - <tt>'X'</tt>: Search (for a directories only;
  #       must be used with <tt>'+'</tt>)
  #     - <tt>'s'</tt>: Uid or gid.
  #     - <tt>'t'</tt>: Sticky bit.
  #
  #   Examples:
  #
  #     FileUtils.chmod('u=wrx,go=rx', 'src1.txt')
  #     FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby')
  #
  # Keyword arguments:
  #
  # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.chmod(0755, 'src0.txt', noop: true, verbose: true)
  #     FileUtils.chmod(0644, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     FileUtils.chmod('u=wrx,go=rx', 'src1.txt', noop: true, verbose: true)
  #     FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby', noop: true, verbose: true)
  #
  #   Output:
  #
  #     chmod 755 src0.txt
  #     chmod 644 src0.txt src0.dat
  #     chmod u=wrx,go=rx src1.txt
  #     chmod u=wrx,go=rx /usr/bin/ruby
  #
  # Related: FileUtils.chmod_R.
  #
  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

  # Like FileUtils.chmod, but changes permissions recursively.
  #
  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 the owner and group on the entries at the paths given in +list+
  # (a single path or an array of paths)
  # to the given +user+ and +group+;
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
  #
  # - Modifies each entry that is a regular file using
  #   {File.chown}[rdoc-ref:File.chown].
  # - Modifies each entry that is a symbolic link using
  #   {File.lchown}[rdoc-ref:File.lchown].
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # User and group:
  #
  # - Argument +user+ may be a user name or a user id;
  #   if +nil+ or +-1+, the user is not changed.
  # - Argument +group+ may be a group name or a group id;
  #   if +nil+ or +-1+, the group is not changed.
  # - The user must be a member of the group.
  #
  # Examples:
  #
  #   # One path.
  #   # User and group as string names.
  #   File.stat('src0.txt').uid # => 1004
  #   File.stat('src0.txt').gid # => 1004
  #   FileUtils.chown('user2', 'group1', 'src0.txt')
  #   File.stat('src0.txt').uid # => 1006
  #   File.stat('src0.txt').gid # => 1005
  #
  #   # User and group as uid and gid.
  #   FileUtils.chown(1004, 1004, 'src0.txt')
  #   File.stat('src0.txt').uid # => 1004
  #   File.stat('src0.txt').gid # => 1004
  #
  #   # Array of paths.
  #   FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'])
  #
  #   # Directory (not recursive).
  #   FileUtils.chown('user2', 'group1', '.')
  #
  # Keyword arguments:
  #
  # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.chown('user2', 'group1', 'src0.txt', noop: true, verbose: true)
  #     FileUtils.chown(1004, 1004, 'src0.txt', noop: true, verbose: true)
  #     FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     FileUtils.chown('user2', 'group1', path, noop: true, verbose: true)
  #     FileUtils.chown('user2', 'group1', '.', noop: true, verbose: true)
  #
  #   Output:
  #
  #     chown user2:group1 src0.txt
  #     chown 1004:1004 src0.txt
  #     chown 1006:1005 src0.txt src0.dat
  #     chown user2:group1 src0.txt
  #     chown user2:group1 .
  #
  # Related: FileUtils.chown_R.
  #
  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

  # Like FileUtils.chown, but changes owner and group recursively.
  #
  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 times (mtime) and access times (atime)
  # of the entries given by the paths in +list+
  # (a single path or an array of paths);
  # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
  #
  # By default, creates an empty file for any path to a non-existent entry;
  # use keyword argument +nocreate+ to raise an exception instead.
  #
  # Argument +list+ or its elements
  # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
  #
  # Examples:
  #
  #   # Single path.
  #   f = File.new('src0.txt') # Existing file.
  #   f.atime # => 2022-06-10 11:11:21.200277 -0700
  #   f.mtime # => 2022-06-10 11:11:21.200277 -0700
  #   FileUtils.touch('src0.txt')
  #   f = File.new('src0.txt')
  #   f.atime # => 2022-06-11 08:28:09.8185343 -0700
  #   f.mtime # => 2022-06-11 08:28:09.8185343 -0700
  #
  #   # Array of paths.
  #   FileUtils.touch(['src0.txt', 'src0.dat'])
  #
  # Keyword arguments:
  #
  # - <tt>mtime: <i>time</i></tt> - sets the entry's mtime to the given time,
  #   instead of the current time.
  # - <tt>nocreate: true</tt> - raises an exception if the entry does not exist.
  # - <tt>noop: true</tt> - does not touch entries; returns +nil+.
  # - <tt>verbose: true</tt> - prints an equivalent command:
  #
  #     FileUtils.touch('src0.txt', noop: true, verbose: true)
  #     FileUtils.touch(['src0.txt', 'src0.dat'], noop: true, verbose: true)
  #     FileUtils.touch(path, noop: true, verbose: true)
  #
  #   Output:
  #
  #     touch src0.txt
  #     touch src0.txt src0.dat
  #     touch src0.txt
  #
  # Related: FileUtils.uptodate?.
  #
  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_ # :nodoc:

    private

    case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM)
    when /mswin|mingw/
      def fu_windows?; true end #:nodoc:
    else
      def fu_windows?; false end #:nodoc:
    end

    def fu_copy_stream0(src, dest, blksize = nil)   #:nodoc:
      IO.copy_stream(src, dest)
    end

    def fu_stream_blksize(*streams) #:nodoc:
      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) #:nodoc:
      s = st.blksize
      return nil unless s
      return nil if s == 0
      s
    end

    def fu_default_blksize #:nodoc:
      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 = Dir.children(path, **opts)

      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?
        begin
          children = entries()
        rescue Errno::EACCES
          # Failed to get the list of children.
          # Assuming there is no children, try to process the parent directory.
          yield self
          return
        end

        children.each do |ent|
          ent.postorder_traverse do |e|
            yield e
          end
        end
      end
      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, target_directory = true)   #:nodoc:
    if tmp = Array.try_convert(src)
      tmp.each do |s|
        s = File.path(s)
        yield s, (target_directory ? File.join(dest, File.basename(s)) : dest)
      end
    else
      src = File.path(src)
      if target_directory and 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

  def fu_split_path(path) #:nodoc:
    path = File.path(path)
    list = []
    until (parent, base = File.split(path); parent == path or parent == ".")
      list << base
      path = parent
    end
    list << path
    list.reverse!
  end
  private_module_function :fu_split_path

  def fu_relative_components_from(target, base) #:nodoc:
    i = 0
    while target[i]&.== base[i]
      i += 1
    end
    Array.new(base.size-i, '..').concat(target[i..-1])
  end
  private_module_function :fu_relative_components_from

  def fu_clean_components(*comp) #:nodoc:
    comp.shift while comp.first == "."
    return comp if comp.empty?
    clean = [comp.shift]
    path = File.join(*clean, "") # ending with File::SEPARATOR
    while c = comp.shift
      if c == ".." and clean.last != ".." and !(fu_have_symlink? && File.symlink?(path))
        clean.pop
        path.chomp!(%r((?<=\A|/)[^/]+/\z), "")
      else
        clean << c
        path << c << "/"
      end
    end
    clean
  end
  private_module_function :fu_clean_components

  if fu_windows?
    def fu_starting_path?(path) #:nodoc:
      path&.start_with?(%r(\w:|/))
    end
  else
    def fu_starting_path?(path) #:nodoc:
      path&.start_with?("/")
    end
  end
  private_module_function :fu_starting_path?

  # 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 the string names of \FileUtils methods
  # that accept one or more keyword arguments:
  #
  #   FileUtils.commands.sort.take(3) # => ["cd", "chdir", "chmod"]
  #
  def self.commands
    OPT_TABLE.keys
  end

  # Returns an array of the string keyword names:
  #
  #   FileUtils.options.take(3) # => ["noop", "verbose", "force"]
  #
  def self.options
    OPT_TABLE.values.flatten.uniq.map {|sym| sym.to_s }
  end

  # Returns +true+ if method +mid+ accepts the given option +opt+, +false+ otherwise;
  # the arguments may be strings or symbols:
  #
  #   FileUtils.have_option?(:chmod, :noop) # => true
  #   FileUtils.have_option?('chmod', 'secure') # => 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 the string keyword name for method +mid+;
  # the argument may be a string or a symbol:
  #
  #   FileUtils.options_of(:rm) # => ["force", "noop", "verbose"]
  #   FileUtils.options_of('mv') # => ["force", "noop", "verbose", "secure"]
  #
  def self.options_of(mid)
    OPT_TABLE[mid.to_s].map {|sym| sym.to_s }
  end

  # Returns an array of the string method names of the methods
  # that accept the given keyword option +opt+;
  # the argument must be a symbol:
  #
  #   FileUtils.collect_method(:preserve) # => ["cp", "copy", "cp_r", "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 <tt>:verbose</tt> 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 <tt>:noop</tt> 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 <tt>:noop</tt> and <tt>:verbose</tt> 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
ruby/unicode_normalize/tables.rb000064400000666566150403134320013056 0ustar00# 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" \
    "\u0898-\u089F" \
    "\u08CA-\u08E1" \
    "\u08E3-\u08FF" \
    "\u093C" \
    "\u094D" \
    "\u0951-\u0954" \
    "\u09BC" \
    "\u09BE" \
    "\u09CD" \
    "\u09D7" \
    "\u09FE" \
    "\u0A3C" \
    "\u0A4D" \
    "\u0ABC" \
    "\u0ACD" \
    "\u0B3C" \
    "\u0B3E" \
    "\u0B4D" \
    "\u0B56\u0B57" \
    "\u0BBE" \
    "\u0BCD" \
    "\u0BD7" \
    "\u0C3C" \
    "\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\u1715" \
    "\u1734" \
    "\u17D2" \
    "\u17DD" \
    "\u18A9" \
    "\u1939-\u193B" \
    "\u1A17\u1A18" \
    "\u1A60" \
    "\u1A75-\u1A7C" \
    "\u1A7F" \
    "\u1AB0-\u1ABD" \
    "\u1ABF-\u1ACE" \
    "\u1B34\u1B35" \
    "\u1B44" \
    "\u1B6B-\u1B73" \
    "\u1BAA\u1BAB" \
    "\u1BE6" \
    "\u1BF2\u1BF3" \
    "\u1C37" \
    "\u1CD0-\u1CD2" \
    "\u1CD4-\u1CE0" \
    "\u1CE2-\u1CE8" \
    "\u1CED" \
    "\u1CF4" \
    "\u1CF8\u1CF9" \
    "\u1DC0-\u1DFF" \
    "\u20D0-\u20DC" \
    "\u20E1" \
    "\u20E5-\u20F0" \
    "\u2CEF-\u2CF1" \
    "\u2D7F" \
    "\u2DE0-\u2DFF" \
    "\u302A-\u302F" \
    "\u3099\u309A" \
    "\uA66F" \
    "\uA674-\uA67D" \
    "\uA69E\uA69F" \
    "\uA6F0\uA6F1" \
    "\uA806" \
    "\uA82C" \
    "\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{10EAB}\u{10EAC}" \
    "\u{10EFD}-\u{10EFF}" \
    "\u{10F46}-\u{10F50}" \
    "\u{10F82}-\u{10F85}" \
    "\u{11046}" \
    "\u{11070}" \
    "\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{11930}" \
    "\u{1193D}\u{1193E}" \
    "\u{11943}" \
    "\u{119E0}" \
    "\u{11A34}" \
    "\u{11A47}" \
    "\u{11A99}" \
    "\u{11C3F}" \
    "\u{11D42}" \
    "\u{11D44}\u{11D45}" \
    "\u{11D97}" \
    "\u{11F41}\u{11F42}" \
    "\u{16AF0}-\u{16AF4}" \
    "\u{16B30}-\u{16B36}" \
    "\u{16FF0}\u{16FF1}" \
    "\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{1E08F}" \
    "\u{1E130}-\u{1E136}" \
    "\u{1E2AE}" \
    "\u{1E2EC}-\u{1E2EF}" \
    "\u{1E4EC}-\u{1E4EF}" \
    "\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{11938}" \
    "\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}" \
    "\u{11935}" \
    "]?#{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}" \
    "\u{11935}" \
    "\u{11938}" \
    "]?#{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" \
    "\uA7F2-\uA7F4" \
    "\uA7F8\uA7F9" \
    "\uAB5C-\uAB5F" \
    "\uAB69" \
    "\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{10781}-\u{10785}" \
    "\u{10787}-\u{107B0}" \
    "\u{107B2}-\u{107BA}" \
    "\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{1E030}-\u{1E06D}" \
    "\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}" \
    "\u{1FBF0}-\u{1FBF9}" \
    "]"

  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,
    "\u0898"=>230,
    "\u0899"=>220,
    "\u089A"=>220,
    "\u089B"=>220,
    "\u089C"=>230,
    "\u089D"=>230,
    "\u089E"=>230,
    "\u089F"=>230,
    "\u08CA"=>230,
    "\u08CB"=>230,
    "\u08CC"=>230,
    "\u08CD"=>230,
    "\u08CE"=>230,
    "\u08CF"=>220,
    "\u08D0"=>220,
    "\u08D1"=>220,
    "\u08D2"=>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,
    "\u0C3C"=>7,
    "\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,
    "\u1715"=>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,
    "\u1ABF"=>220,
    "\u1AC0"=>220,
    "\u1AC1"=>230,
    "\u1AC2"=>230,
    "\u1AC3"=>220,
    "\u1AC4"=>220,
    "\u1AC5"=>230,
    "\u1AC6"=>230,
    "\u1AC7"=>230,
    "\u1AC8"=>230,
    "\u1AC9"=>230,
    "\u1ACA"=>220,
    "\u1ACB"=>230,
    "\u1ACC"=>230,
    "\u1ACD"=>230,
    "\u1ACE"=>230,
    "\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,
    "\u1DFA"=>218,
    "\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,
    "\uA82C"=>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{10EAB}"=>230,
    "\u{10EAC}"=>230,
    "\u{10EFD}"=>220,
    "\u{10EFE}"=>220,
    "\u{10EFF}"=>220,
    "\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{10F82}"=>230,
    "\u{10F83}"=>220,
    "\u{10F84}"=>230,
    "\u{10F85}"=>220,
    "\u{11046}"=>9,
    "\u{11070}"=>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{1193D}"=>9,
    "\u{1193E}"=>9,
    "\u{11943}"=>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{11F41}"=>9,
    "\u{11F42}"=>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{16FF0}"=>6,
    "\u{16FF1}"=>6,
    "\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{1E08F}"=>230,
    "\u{1E130}"=>230,
    "\u{1E131}"=>230,
    "\u{1E132}"=>230,
    "\u{1E133}"=>230,
    "\u{1E134}"=>230,
    "\u{1E135}"=>230,
    "\u{1E136}"=>230,
    "\u{1E2AE}"=>230,
    "\u{1E2EC}"=>230,
    "\u{1E2ED}"=>230,
    "\u{1E2EE}"=>230,
    "\u{1E2EF}"=>230,
    "\u{1E4EC}"=>232,
    "\u{1E4ED}"=>232,
    "\u{1E4EE}"=>220,
    "\u{1E4EF}"=>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{11938}"=>"\u{11935}\u{11930}",
    "\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"=>"\u1D16ruby/unicode_normalize/normalize.rb000064400000014003150403134320013551 0ustar00   "\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)",
    "\uruby/getoptlong.rb000064400000050415150403134320010234 0ustar00
    "\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"=>"lruby/singleton.rb000064400000010122150403134320010043 0ustar00F3"=>"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",
    "\uA7F2"=>"C",
    "\uA7F3"=>"F",
    "\uA7F4"=>"Q",
    "\uA7F8"=>"\u0126",
    "\uA7F9"=>"\u0153",
    "\uAB5C"=>"\uA727",
    "\uAB5D"=>"\uAB37",
    "\uAB5E"=>"\u026B",
    "\uAB5F"=>"\uAB52",
    "\uAB69"=>"\u028D",
    "\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",
ruby/delegate.rb000064400000027264150403134320007632 0ustar00uFC0D"=>"\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"=>"\gems/gems/json-2.6.3/lib/json000075500000000000150403134320011475 0ustar00ruby/drb.rb000064400000000062150403134320006612 0ustar00"\uFDC5"=>"\u0635\u0645\u0645",
    "\uFDC6"=>"\u0ruby/error_highlight/version.rb000064400000000056150403134320012713 0ustar00\uFE34"=>"_",
    "\uFE35"=>"(",
    "\uFE36"=ruby/error_highlight/base.rb000064400000033611150403134320012143 0ustar00>"\\",
    "\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{10781}"=>"\u02D0",
    "\u{10782}"=>"\u02D1",
    "\u{10783}"=>"\u00E6",
    "\u{10784}"=>"\u0299",
    "\u{10785}"=>"\u0253",
    "\u{10787}"=>"\u02A3",
    "\u{10788}"=>"\uAB66",
    "\u{10789}"=>"\u02A5",
    "\u{1078A}"=>"\u02A4",
    "\u{1078B}"=>"\u0256",
    "\u{1078C}"=>"\u0257",
    "\u{1078D}"=>"\u1D91",
    "\u{1078E}"=>"\u0258",
    "\u{1078F}"=>"\u025E",
    "\u{10790}"=>"\u02A9",
    "\u{10791}"=>"\u0264",
    "\u{10792}"=>"\u0262",
    "\u{10793}"=>"\u0260",
    "\u{10794}"=>"\u029B",
    "\u{10795}"=>"\u0127",
    "\u{10796}"=>"\u029C",
    "\u{10797}"=>"\u0267",
    "\u{10798}"=>"\u0284",
    "\u{10799}"=>"\u02AA",
    "\u{1079A}"=>"\u02AB",
    "\u{1079B}"=>"\u026C",
    "\u{1079C}"=>"\u{1DF04}",
    "\u{1079D}"=>"\uA78E",
    "\u{1079E}"=>"\u026E",
    "\u{1079F}"=>"\u{1DF05}",
    "\u{107A0}"=>"\u028E",
    "\u{107A1}"=>"\u{1DF06}",
    "\u{107A2}"=>"\u00F8",
    "\u{107A3}"=>"\u0276",
    "\u{107A4}"=>"\u0277",
    "\u{107A5}"=>"q",
    "\u{107A6}"=>"\u027A",
    "\u{107A7}"=>"\u{1DF08}",
    "\u{107A8}"=>"\u027D",
    "\u{107A9}"=>"\u027E",
    "\u{107AA}"=>"\u0280",
    "\u{107AB}"=>"\u02A8",
    "\u{107AC}"=>"\u02A6",
    "\u{107AD}"=>"\uAB67",
    "\u{107AE}"=>"\u02A7",
    "\u{107AF}"=>"\u0288",
    "\u{107B0}"=>"\u2C71",
    "\u{107B2}"=>"\u028F",
    "\u{107B3}"=>"\u02A1",
    "\u{107B4}"=>"\u02A2",
    "\u{107B5}"=>"\u0298",
    "\u{107B6}"=>"\u01C0",
    "\u{107B7}"=>"\u01C1",
    "\u{107B8}"=>"\u01C2",
    "\u{107B9}"=>"\u{1DF0A}",
    "\u{107BA}"=>"\u{1DF1E}",
    "\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",ruby/error_highlight/formatter.rb000064400000001176150403134320013235 0ustar00"=>"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}ruby/error_highlight/core_ext.rb000064400000002610150403134320013034 0ustar00535}"=>"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}"=>"ruby/erb/version.rb000064400000000134150403134320010300 0ustar009}"=>"t",
    "\u{1D59A}"=>"u",
    "\u{1D59B}"=>"v",
    "\u{1D59C}"=>"w",
    "\u{1D59D}"=ruby/erb/util.rb000064400000002611150403134320007572 0ustar00  "\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{1D6ruby/erb/def_method.rb000064400000001667150403134320010725 0ustar00"\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{1ruby/erb/compiler.rb000064400000026522150403134320010436 0ustar00    "\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{1E030}"=>"\u0430",
    "\u{1E031}"=>"\u0431",
    "\u{1E032}"=>"\u0432",
    "\u{1E033}"=>"\u0433",
    "\u{1E034}"=>"\u0434",
    "\u{1E035}"=>"\u0435",
    "\u{1E036}"=>"\u0436",
    "\u{1E037}"=>"\u0437",
    "\u{1E038}"=>"\u0438",
    "\u{1E039}"=>"\u043A",
    "\u{1E03A}"=>"\u043B",
    "\u{1E03B}"=>"\u043C",
    "\u{1E03C}"=>"\u043E",
    "\u{1E03D}"=>"\u043F",
    "\u{1E03E}"=>"\u0440",
    "\u{1E03F}"=>"\u0441",
    "\u{1E040}"=>"\u0442",
    "\u{1E041}"=>"\u0443",
    "\u{1E042}"=>"\u0444",
    "\u{1E043}"=>"\u0445",
    "\u{1E044}"=>"\u0446",
    "\u{1E045}"=>"\u0447",
    "\u{1E046}"=>"\u0448",
    "\u{1E047}"=>"\u044B",
    "\u{1E048}"=>"\u044D",
    "\u{1E049}"=>"\u044E",
    "\u{1E04A}"=>"\uA689",
    "\u{1E04B}"=>"\u04D9",
    "\u{1E04C}"=>"\u0456",
    "\u{1E04D}"=>"\u0458",
    "\u{1E04E}"=>"\u04E9",
    "\u{1E04F}"=>"\u04AF",
    "\u{1E050}"=>"\u04CF",
    "\u{1E051}"=>"\u0430",
    "\u{1E052}"=>"\u0431",
    "\u{1E053}"=>"\u0432",
    "\u{1E054}"=>"\u0433",
    "\u{1E055}"=>"\u0434",
    "\u{1E056}"=>"\u0435",
    "\u{1E057}"=>"\u0436",
    "\u{1E058}"=>"\u0437",
    "\u{1E059}"=>"\u0438",
    "\u{1E05A}"=>"\u043A",
    "\u{1E05B}"=>"\u043B",
    "\u{1E05C}"=>"\u043E",
    "\u{1E05D}"=>"\u043F",
    "\u{1E05E}"=>"\u0441",
    "\u{1E05F}"=>"\u0443",
    "\u{1E060}ruby/readline.rb000064400000000275150403134320007634 0ustar00,
    "\u{1EE0D}"=>"\u0646",
    "\u{1EE0E}"=>"\u0633",
    "\u{1EE0F}"=>"\u0639",
    "\u{1EE10}"=>"\u0641",
    "\u{1EE11}"=>"\u0635",
    "\u{1EE12}"=>"\u0642",
    "\u{1EE13}"=>"\u0631"ruby/objspace/trace.rb000064400000002235150403134320010733 0ustar006",
    "\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}"=ruby/error_highlight.rb000064400000000124150403134330011223 0ustar00u0645",
    "\u{1EEAD}"=>"\u0646",
    "\u{1EEAE}"=>"\u0633",
    "\u{1EEAF}"=>"\u06ruby/objspace.rb000064400000011252150403134330007635 0ustar00,
    "\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",
    "\u{1FBF0}"=>"0",
    "\u{1FBF1}"=>"1",
    "\u{1FBF2}"=>"2",
    "\u{1FBF3}"=>"3",
    "\u{1FBF4}"=>"4",
    "\u{1FBF5}"=>"5",
    "\u{1FBF6}"=>"6",
    "\u{1FBF7}"=>"7",
    "\u{1FBF8}"=>"8",
    "\u{1FBF9}"=>"9",
    "\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\u03ruby/erb.rb000064400000035105150403134330006622 0ustar00>"\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\u030ruby/un.rb000064400000026257150403134330006504 0ustar00\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}",
    "\u{11935}\u{11930}"=>"\u{11938}",
  }.freeze
end
ruby/unicode_normalize/normalize.rb000064400000014003150403134320013551 0ustar00# 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'

# :stopdoc:
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 =ruby/benchmark.rb000064400000044632150403134330010011 0ustar00BASE) 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<later_class and later_class<sorting[j].last
          sorting[j], sorting[j+1] = sorting[j+1], sorting[j]
        end
      end
    end
    return sorting.collect(&:first).join('')
  end

  ## Normalization Forms for Patterns (not whole Strings)
  def self.nfd_one(string)
    string = string.chars.map! {|c| DECOMPOSITION_TABLE[c] || c}.join('')
    canonical_ordering_one(hangul_decomp_one(string))
  end

  def self.nfc_one(string)
    nfd_string = nfd_one string
    start = nfd_string[0]
    last_class = CLASS_TABLE[start]-1
    accents = ''
    nfd_string[1..-1].each_char do |accent|
      accent_class = CLASS_TABLE[accent]
      if last_class<accent_class and composite = COMPOSITION_TABLE[start+accent]
        start = composite
      else
        accents << accent
        last_class = accent_class
      end
    end
    hangul_comp_one(start+accents)
  end

  def self.normalize(string, form = :nfc)
    encoding = string.encoding
    case encoding
    when Encoding::UTF_8
      case form
      when :nfc then
        string.gsub REGEXP_C, NF_HASH_C
      when :nfd then
        string.gsub REGEXP_D, NF_HASH_D
      when :nfkc then
        string.gsub(REGEXP_K, KOMPATIBLE_TABLE).gsub(REGEXP_C, NF_HASH_C)
      when :nfkd then
        string.gsub(REGEXP_K, KOMPATIBLE_TABLE).gsub(REGEXP_D, NF_HASH_D)
      else
        raise ArgumentError, "Invalid normalization form #{form}."
      end
    when Encoding::US_ASCII
      string
    when *UNICODE_ENCODINGS
      normalize(string.encode(Encoding::UTF_8), form).encode(encoding)
    else
      raise Encoding::CompatibilityError, "Unicode Normalization not appropriate for #{encoding}"
    end
  end

  def self.normalized?(string, form = :nfc)
    encoding = string.encoding
    case encoding
    when Encoding::UTF_8
      case form
      when :nfc then
        string.scan REGEXP_C do |match|
          return false  if NF_HASH_C[match] != match
        end
        true
      when :nfd then
        string.scan REGEXP_D do |match|
          return false  if NF_HASH_D[match] != match
        end
        true
      when :nfkc then
        normalized?(string, :nfc) and string !~ REGEXP_K
      when :nfkd then
        normalized?(string, :nfd) and string !~ REGEXP_K
      else
        raise ArgumentError, "Invalid normalization form #{form}."
      end
    when Encoding::US_ASCII
      true
    when *UNICODE_ENCODINGS
      normalized? string.encode(Encoding::UTF_8), form
    else
      raise Encoding::CompatibilityError, "Unicode Normalization not appropriate for #{encoding}"
    end
  end
end # module
ruby/getoptlong.rb000064400000050415150403134320010234 0ustar00class Error < StandardError; end
  class CompileError < Error; end
end
ruby/racc/logfilegenerator.rb000064400000012055150403134330012311 0ustar00#--
#
#
#
# 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
ruby/racc/iset.rb000064400000002364150403134330007727 0ustar00e(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 = <<SRC
  %s (%d)
    on right: %s
    on left : %s
SRC
        out.printf tmp, t.to_s, t.ident,
                   symbol_locations(t.locate).join(' '),
                   symbol_locations(t.heads).join(' ')
      end

      out.print "\n**Terminals, with rules where they appear\n\n"
      @grammar.each_terminal do |t|
        out.printf "  %s (%d) %s\n",
                   t.to_s, t.ident, symbol_locations(t.locate).join(' ')
      end
    end

    def symbol_locations(locs)
      locs.map {|loc| loc.rule.ident }.reject {|n| n == 0 }.uniq
    end

  end

end   # module Racc
ruby/racc/info.rb000064400000000451150403134340007712 0ustar00#--
#
#
#
# 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 = [])ruby/racc/statetransitiontable.rb000064400000017521150403134340013230 0ustar00end

    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
ruby/racc/info.rb000064400000000451150403134340007712 0ustar00#--
#
#
#
# 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.6.2'
  Version = VERSION
  Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
end
ruby/racc/statetransitiontable.rb000064400000017521150403134340013230 0ustar00#--
#
#
#
# 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/parser'

module Racc

  StateTransitionTable = Struct.new(:action_table,
                                    :action_check,
                                    :action_default,
                                    :action_pointer,
                                    :goto_table,
                                    :goto_check,
                                    :goto_default,
                                    :goto_pointer,
                                    :token_table,
                                    :reduce_table,
                                    :reduce_n,
                                    :shift_n,
                                    :nt_base,
                                    :token_to_s_table,
                                    :use_result_var,
                                    :debug_parser)
  class StateTransitionTable   # reopen
    def StateTransitionTable.generate(states)
      StateTransitionTableGenerator.new(states).generate
    end

    def initialize(states)
      super()
      @states = states
      @grammar = states.grammar
      self.use_result_var = true
      self.debug_parser = true
    end

    attr_reader :states
    attr_reader :grammar

    def parser_class
      ParserClassGenerator.new(@states).generate
    end

    def token_value_table
      h = {}
      token_table().each do |sym, i|
        h[sym.value] = i
      end
      h
    end
  end


  class StateTransitionTableGenerator

    def initialize(states)
      @states = states
      @grammar = states.grammar
    end

    def generate
      t = StateTransitionTable.new(@states)
      gen_action_tables t, @states
      gen_goto_tables t, @grammar
      t.token_table = token_table(@grammar)
      t.reduce_table = reduce_table(@grammar)
      t.reduce_n = @states.reduce_n
      t.shift_n = @states.shift_n
      t.nt_base = @grammar.nonterminal_base
      t.token_to_s_table = @grammar.symbols.map {|sym| sym.to_s }
      t
    end

    def reduce_table(grammar)
      t = [0, 0, :racc_error]
      grammar.each_with_index do |rule, idx|
        next if idx == 0
        t.push rule.size
        t.push rule.target.ident
        t.push(if rule.action.empty?   # and @params.omit_action_call?
               then :_reduce_none
               else "_reduce_#{idx}".intern
               end)
      end
      t
    end

    def token_table(grammar)
      h = {}
      grammar.symboltable.terminals.each do |t|
        h[t] = t.ident
      end
      h
    end

    def gen_action_tables(t, states)
      t.action_table = yytable  = []
      t.action_check = yycheck  = []
      t.action_default = yydefact = []
      t.action_pointer = yypact   = []
      e1 = []
      e2 = []
      states.each do |state|
        yydefact.push act2actid(state.defact)
        if state.action.empty?
          yypact.push nil
          next
        end
        vector = []
        state.action.each do |tok, act|
          vector[tok.ident] = act2actid(act)
        end
        addent e1, vector, state.ident, yypact
      end
      set_table e1, e2, yytable, yycheck, yypact
    end

    def gen_goto_tables(t, grammar)
      t.goto_table   = yytable2  = []
      t.goto_check   = yycheck2  = []
      t.goto_pointer = yypgoto   = []
      t.goto_default = yydefgoto = []
      e1 = []
      e2 = []
      grammar.each_nonterminal do |tok|
        tmp = []

        # decide default
        freq = Array.new(@states.size, 0)
        @states.each do |state|
          st = state.goto_table[tok]
          if st
            st = st.ident
            freq[st] += 1
          end
          tmp[state.ident] = st
        end
        max = freq.max
        if max > 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
      Rruby/kconv.rb000064400000013345150403134330007174 0ustar00et -= maxdup
          end
          map << "#{curr}{#{offset}}" if offset > 1
        end
        i = ii
      end
      Regexp.compile(map, Regexp::NOENCODING)
    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
            tblruby/racc/debugflags.rb000064400000002455150403134340011070 0ustar00g, [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.alias_method("_reduce_#{rule.ident}", :_reduce_none)
        else
          c.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
ruby/racc/static.rb000064400000000211150403134340010240 0ustar00#--
#
#
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the samruby/racc/parserfilegenerator.rb000064400000025124150403134340013026 0ustar00ny = (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
ruby/racc/static.rb000064400000000211150403134340010240 0ustar00ruby/singleton.rb000064400000013021150403134320010044 0ruby/find.rb000064400000004774150403134330007002 0ustar00    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.3.0"

  module SingletonInstanceMethods
    # 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
  end
  include SingletonInstanceMethods

  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:
      @singleton__instance__ || @singleton__mruby/ripper.rb000064400000004676150403134330007364 0ustar00d_object
    end

    def self.extended(c)
      # extending an object with Singleton is a bad idea
      c.singleton_class.send(:undef_method, :extend_object)
    end

    def __init__(klass) # :nodoc:
      klass.instance_eval {
        set_instance(nil)
        set_mutex(Thread::Mutex.new)
      }
      klass
    end

    private

    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 module_with_class_methods
      Singleton.__init__(klass)
    end
  end
  extend SingletonClassProperties

  ##
  # :singleton-method: _load
  #  By default calls instance(). Override to retain singleton state.

  ##
  # :singleton-method: instance
  #  Returns the singleton instance.
end

if defined?(Ractor)
  module RactorLocalSingleton
    include Singleton::SingletonInstanceMethods

    module RactorLocalSingletonClassMethods
      include Singleton::SingletonClassMethods
      def instance
        set_mutex(Thread::Mutex.new) if Ractor.current[mutex_key].nil?
        return Ractor.current[instance_key] if Ractor.current[instance_key]
        Ractor.current[mutex_key].synchronize {
          return Ractor.current[instance_key] if Ractor.current[instance_key]
          set_instance(new())
        }
        Ractor.current[instance_key]
      end

      private

      def instance_key
        :"__RactorLocalSingleton_instance_with_class_id_#{object_id}__"
      end

      def mutex_key
        :"__RactorLocalSingleton_mutex_with_class_id_#{object_id}__"
      end

      def set_instance(val)
        Ractor.current[instance_key] = val
      end

      def set_mutex(val)
        Ractor.current[mutex_key] = val
      end
    end

    def self.module_with_class_methods
      RactorLocalSingletonClassMethods
    end

    extend Singleton::SingletonClassProperties
  end
end
gems/gems/io-console-0.6.0/lib/io000075500000000000150403134330012225 0ustar00ruby/reline/version.rb000064400000000046150403134330011011 0ustar00h class inheritance.  This is considerruby/reline/key_stroke.rb000064400000005072150403134330011507 0ustar00  [: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 protecteruby/reline/unicode/east_asian_width.rb000064400000056631150403134330014273 0ustar00nd 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__  #=> #<User: ...>
#
# A SimpleDelegator instance can take advantage of the fact that SimpleDelegator
# is a subclass of +Delegator+ to call <tt>super</tt> 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
gems/gems/json-2.6.3/lib/json000075500000000000150403134320011475 0ustar00ruby/drb.rb000064400000000062150403134320006612 0ustar00
      def precedence_table(&block)
        env = ruby/error_highlight/version.rb000064400000000056150403134320012713 0ustar00module ErrorHighlight
  VERSION = "0.7.0"
end
ruby/error_highlight/base.rb000064400000056235150403134320012152 0ustar00require_relative "version"

module ErrorHighlight
  # Identify the code fragment at that a given exception occurred.
  #
  # Options:
  #
  # point_type: :name | :args
  #   :name (default) points the method/variable name that the exception occurred.
  #   :args points the arguments of the method call that the exception occurred.
  #
  # backtrace_location: Thread::Backtrace::Location
  #   It locates the code fragment of the given backtrace_location.
  #   By default, it uses the first frame of backtrace_locations of the given exception.
  #
  # Returns:
  #  {
  #    first_lineno: Integer,
  #    first_column: Integer,
  #    last_lineno: Integer,
  #    last_column: Integer,
  #    snippet: String,
  #    script_lines: [String],
  #  } | nil
  #
  # Limitations:
  #
  # Currently, ErrorHighlight.spot only supports a single-line code fragment.
  # Therefore, if the return value is not nil, first_lineno and last_lineno will have
  # the same value. If the relevant code fragment spans multiple lines
  # (e.g., Array#[] of +ary[(newline)expr(newline)]+), the method will return nil.
  # This restriction may be removed in the future.
  def self.spot(obj, **opts)
    case obj
    when Exception
      exc = obj
      loc = opts[:backtrace_location]
      opts = { point_type: opts.fetch(:point_type, :name) }

      unless loc
        case exc
        when TypeError, ArgumentError
          opts[:point_type] = :args
        end

        locs = exc.backtrace_locations
        return nil unless locs

        loc = locs.first
        return nil unless loc

        opts[:name] = exc.name if NameError === obj
      end

      return nil unless Thread::Backtrace::Location === loc

      node =
        begin
          RubyVM::AbstractSyntaxTree.of(loc, keep_script_lines: true)
        rescue RuntimeError => error
          # RubyVM::AbstractSyntaxTree.of raises an error with a message that
          # includes "prism" when the ISEQ was compiled with the prism compiler.
          # In this case, we'll try to parse again with prism instead.
          raise unless error.message.include?("prism")
          prism_find(loc)
        end

      Spotter.new(node, **opts).spot

    when RubyVM::AbstractSyntaxTree::Node, Prism::Node
      Spotter.new(obj, **opts).spot

    else
      raise TypeError, "Exception is expected"
    end

  rescue SyntaxError,
         SystemCallError, # file not found or something
         ArgumentError # eval'ed code

    return nil
  end

  # Accepts a Thread::Backtrace::Location object and returns a Prism::Node
  # corresponding to the backtrace location in the source code.
  def self.prism_find(location)
    require "prism"
    return nil if Prism::VERSION < "1.0.0"

    absolute_path = location.absolute_path
    return unless absolute_path

    node_id = RubyVM::AbstractSyntaxTree.node_id_for_backtrace_location(location)
    Prism.parse_file(absolute_path).value.breadth_first_search { |node| node.node_id == node_id }
  end

  private_class_method :prism_find

  class Spotter
    class NonAscii < Exception; end
    private_constant :NonAscii

    def initialize(node, point_type: :name, name: nil)
      @node = node
      @point_type = point_type
      @name = name

      # Not-implemented-yet options
      @arg = nil # Specify the index or keyword at which argument caused the TypeError/ArgumentError
      @multiline = false # Allow multiline spot

      @fetch = -> (lineno, last_lineno = lineno) do
        snippet = @node.script_lines[lineno - 1 .. last_lineno - 1].join("")
        snippet += "\n" unless snippet.end_with?("\n")

        # It require some work to support Unicode (or multibyte) characters.
        # Tentatively, we stop highlighting if the code snippet has non-ascii characters.
        # See https://github.com/ruby/error_highlight/issues/4
        raise NonAscii unless snippet.ascii_only?

        snippet
      end
    end

    OPT_GETCONSTANT_PATH = (RUBY_VERSION.split(".").map {|s| s.to_i } <=> [3, 2]) >= 0
    private_constant :OPT_GETCONSTANT_PATH

    def spot
      return nil unless @node

      if OPT_GETCONSTANT_PATH
        # In Ruby 3.2 or later, a nested constant access (like `Foo::Bar::Baz`)
        # is compiled to one instruction (opt_getconstant_path).
        # @node points to the node of the whole `Foo::Bar::Baz` even if `Foo`
        # or `Foo::Bar` causes NameError.
        # So we try to spot the sub-node that causes the NameError by using
        # `NameError#name`.
        case @node.type
        when :COLON2
          subnodes = []
          node = @node
          while node.type == :COLON2
            node2, const = node.children
            subnodes << node if const == @name
            node = node2
          end
          if node.type == :CONST || node.type == :COLON3
            if node.children.first == @name
              subnodes << node
            end

            # If we found only one sub-node whose name is equal to @name, use it
            return nil if subnodes.size != 1
            @node = subnodes.first
          else
            # Do nothing; opt_getconstant_path is used only when the const base is
            # NODE_CONST (`Foo`) or NODE_COLON3 (`::Foo`)
          end
        when :constant_path_node
          subnodes = []
          node = @node

          begin
            subnodes << node if node.name == @name
          end while (node = node.parent).is_a?(Prism::ConstantPathNode)

          if node.is_a?(Prism::ConstantReadNode) && node.name == @name
            subnodes << node
          end

          # If we found only one sub-node whose name is equal to @name, use it
          return nil if subnodes.size != 1
          @node = subnodes.first
        end
      end

      case @node.type

      when :CALL, :QCALL
        case @point_type
        when :name
          spot_call_for_name
        when :args
          spot_call_for_args
        end

      when :ATTRASGN
        case @point_type
        when :name
          spot_attrasgn_for_name
        when :args
          spot_attrasgn_for_args
        end

      when :OPCALL
        case @point_type
        when :name
          spot_opcall_for_name
        when :args
          spot_opcall_for_args
        end

      when :FCALL
        case @point_type
        when :name
          spot_fcall_for_name
        when :args
          spot_fcall_for_args
        end

      when :VCALL
        spot_vcall

      when :OP_ASGN1
        case @point_type
        when :name
          spot_op_asgn1_for_name
        when :args
          spot_op_asgn1_for_args
        end

      when :OP_ASGN2
        case @point_type
        when :name
          spot_op_asgn2_for_name
        when :args
          spot_op_asgn2_for_args
        end

      when :CONST
        spot_vcall

      when :COLON2
        spot_colon2

      when :COLON3
        spot_vcall

      when :OP_CDECL
        spot_op_cdecl

      when :call_node
        case @point_type
        when :name
          prism_spot_call_for_name
        when :args
          prism_spot_call_for_args
        end

      when :local_variable_operator_write_node
        case @point_type
        when :name
          prism_spot_local_variable_operator_write_for_name
        when :args
          prism_spot_local_variable_operator_write_for_args
        end

      when :call_operator_write_node
        case @point_type
        when :name
          prism_spot_call_operator_write_for_name
        when :args
          prism_spot_call_operator_write_for_args
        end

      when :index_operator_write_node
        case @point_type
        when :name
          prism_spot_index_operator_write_for_name
        when :args
          prism_spot_index_operator_write_for_args
        end

      when :constant_read_node
        prism_spot_constant_read

      when :constant_path_node
        prism_spot_constant_path

      when :constant_path_operator_write_node
        prism_spot_constant_path_operator_write

      end

      if @snippet && @beg_column && @end_column && @beg_column < @end_column
        return {
          first_lineno: @beg_lineno,
          first_column: @beg_column,
          last_lineno: @end_lineno,
          last_column: @end_column,
          snippet: @snippet,
          script_lines: @node.script_lines,
        }
      else
        return nil
      end

    rescue NonAscii
      nil
    end

    private

    # Example:
    #   x.foo
    #    ^^^^
    #   x.foo(42)
    #    ^^^^
    #   x&.foo
    #    ^^^^^
    #   x[42]
    #    ^^^^
    #   x += 1
    #     ^
    def spot_call_for_name
      nd_recv, mid, nd_args = @node.children
      lineno = nd_recv.last_lineno
      lines = @fetch[lineno, @node.last_lineno]
      if mid == :[] && lines.match(/\G[\s)]*(\[(?:\s*\])?)/, nd_recv.last_column)
        @beg_column = $~.begin(1)
        @snippet = lines[/.*\n/]
        @beg_lineno = @end_lineno = lineno
        if nd_args
          if nd_recv.last_lineno == nd_args.last_lineno && @snippet.match(/\s*\]/, nd_args.last_column)
            @end_column = $~.end(0)
          end
        else
          if lines.match(/\G[\s)]*?\[\s*\]/, nd_recv.last_column)
            @end_column = $~.end(0)
          end
        end
      elsif lines.match(/\G[\s)]*?(\&?\.)(\s*?)(#{ Regexp.quote(mid) }).*\n/, nd_recv.last_column)
        lines = $` + $&
        @beg_column = $~.begin($2.include?("\n") ? 3 : 1)
        @end_column = $~.end(3)
        if i = lines[..@beg_column].rindex("\n")
          @beg_lineno = @end_lineno = lineno + lines[..@beg_column].count("\n")
          @snippet = lines[i + 1..]
          @beg_column -= i + 1
          @end_column -= i + 1
        else
          @snippet = lines
          @beg_lineno = @end_lineno = lineno
        end
      elsif mid.to_s =~ /\A\W+\z/ && lines.match(/\G\s*(#{ Regexp.quote(mid) })=.*\n/, nd_recv.last_column)
        @snippet = $` + $&
        @beg_column = $~.begin(1)
        @end_column = $~.end(1)
      end
    end

    # Example:
    #   x.foo(42)
    #         ^^
    #   x[42]
    #     ^^
    #   x += 1
    #        ^
    def spot_call_for_args
      _nd_recv, _mid, nd_args = @node.children
      if nd_args && nd_args.first_lineno == nd_args.last_lineno
        fetch_line(nd_args.first_lineno)
        @beg_column = nd_args.first_column
        @end_column = nd_args.last_column
      end
      # TODO: support @arg
    end

    # Example:
    #   x.foo = 1
    #    ^^^^^^
    #   x[42] = 1
    #    ^^^^^^
    def spot_attrasgn_for_name
      nd_recv, mid, nd_args = @node.children
      *nd_args, _nd_last_arg, _nil = nd_args.children
      fetch_line(nd_recv.last_lineno)
      if mid == :[]= && @snippet.match(/\G[\s)]*(\[)/, nd_recv.last_column)
        @beg_column = $~.begin(1)
        args_last_column = $~.end(0)
        if nd_args.last && nd_recv.last_lineno == nd_args.last.last_lineno
          args_last_column = nd_args.last.last_column
        end
        if @snippet.match(/[\s)]*\]\s*=/, args_last_column)
          @end_column = $~.end(0)
        end
      elsif @snippet.match(/\G[\s)]*(\.\s*#{ Regexp.quote(mid.to_s.sub(/=\z/, "")) }\s*=)/, nd_recv.last_column)
        @beg_column = $~.begin(1)
        @end_column = $~.end(1)
      end
    end

    # Example:
    #   x.foo = 1
    #           ^
    #   x[42] = 1
    #     ^^^^^^^
    #   x[] = 1
    #     ^^^^^
    def spot_attrasgn_for_args
      nd_recv, mid, nd_args = @node.children
      fetch_line(nd_recv.last_lineno)
      if mid == :[]= && @snippet.match(/\G[\s)]*\[/, nd_recv.last_column)
        @beg_column = $~.end(0)
        if nd_recv.last_lineno == nd_args.last_lineno
          @end_column = nd_args.last_column
        end
      elsif nd_args && nd_args.first_lineno == nd_args.last_lineno
        @beg_column = nd_args.first_column
        @end_column = nd_args.last_column
      end
      # TODO: support @arg
    end

    # Example:
    #   x + 1
    #     ^
    #   +x
    #   ^
    def spot_opcall_for_name
      nd_recv, op, nd_arg = @node.children
      fetch_line(nd_recv.last_lineno)
      if nd_arg
        # binary operator
        if @snippet.match(/\G[\s)]*(#{ Regexp.quote(op) })/, nd_recv.last_column)
          @beg_column = $~.begin(1)
          @end_column = $~.end(1)
        end
      else
        # unary operator
        if @snippet[...nd_recv.first_column].match(/(#{ Regexp.quote(op.to_s.sub(/@\z/, "")) })\s*\(?\s*\z/)
          @beg_column = $~.begin(1)
          @end_column = $~.end(1)
        end
      end
    end

    # Example:
    #   x + 1
    #       ^
    def spot_opcall_for_args
      _nd_recv, _op, nd_arg = @node.children
      if nd_arg && nd_arg.first_lineno == nd_arg.last_lineno
        # binary operator
        fetch_line(nd_arg.first_lineno)
        @beg_column = nd_arg.first_column
        @end_column = nd_arg.last_column
      end
    end

    # Example:
    #   foo(42)
    #   ^^^
    #   foo 42
    #   ^^^
    def spot_fcall_for_name
      mid, _nd_args = @node.children
      fetch_line(@node.first_lineno)
      if @snippet.match(/(#{ Regexp.quote(mid) })/, @node.first_column)
        @beg_column = $~.begin(1)
        @end_column = $~.end(1)
      end
    end

    # Example:
    #   foo(42)
    #       ^^
    #   foo 42
    #       ^^
    def spot_fcall_for_args
      _mid, nd_args = @node.children
      if nd_args && nd_args.first_lineno == nd_args.last_lineno
        # binary operator
        fetch_line(nd_args.first_lineno)
        @beg_column = nd_args.first_column
        @end_column = nd_args.last_column
      end
    end

    # Example:
    #   foo
    #   ^^^
    def spot_vcall
      if @node.first_lineno == @node.last_lineno
        fetch_line(@node.last_lineno)
ruby/reline/windows.rb000064400000040752150403134330011026 0ustar00column
        end
        if @snippet.match(/\s*\](\s*)(#{ Regexp.quote(op) })=()/, args_last_column)
          case @name
          when :[], :[]=
            @beg_column = bracket_beg_column
            @end_column = $~.begin(@name == :[] ? 1 : 3)
          when op
            @beg_column = $~.begin(2)
            @end_column = $~.end(2)
          end
        end
      end
    end

    # Example:
    #   x[1] += 42
    #     ^^^^^^^^
    def spot_op_asgn1_for_args
      nd_recv, mid, nd_args, nd_rhs = @node.children
      fetch_line(nd_recv.last_lineno)
      if mid == :[]= && @snippet.match(/\G\s*\[/, nd_recv.last_column)
        @beg_column = $~.end(0)
        if nd_recv.last_lineno == nd_rhs.last_lineno
          @end_column = nd_rhs.last_column
        end
      elsif nd_args && nd_args.first_lineno == nd_rhs.last_lineno
        @beg_column = nd_args.first_column
        @end_column = nd_rhs.last_column
      end
      # TODO: support @arg
    end

    # Example:
    #   x.foo += 42
    #    ^^^     (for foo)
    #   x.foo += 42
    #         ^  (for +)
    #   x.foo += 42
    #    ^^^^^^^ (for foo=)
    def spot_op_asgn2_for_name
      nd_recv, _qcall, attr, op, _nd_rhs = @node.children
      fetch_line(nd_recv.last_lineno)
      if @snippet.match(/\G[\s)]*(\.)\s*#{ Regexp.quote(attr) }()\s*(#{ Regexp.quote(op) })(=)/, nd_recv.last_column)
        case @name
        when attr
          @beg_column = $~.begin(1)
          @end_column = $~.begin(2)
        when op
          @beg_column = $~.begin(3)
          @end_column = $~.end(3)
        when :"#{ attr }="
          @beg_column = $~.begin(1)
          @end_column = $~.end(4)
        end
      end
    end

    # Example:
    #   x.foo += 42
    #            ^^
    def spot_op_asgn2_for_args
      _nd_recv, _qcall, _attr, _op, nd_rhs = @node.children
      if nd_rhs.first_lineno == nd_rhs.last_lineno
        fetch_line(nd_rhs.first_lineno)
        @beg_column = nd_rhs.first_column
        @end_column = nd_rhs.last_column
      end
    end

    # Example:
    #   Foo::Bar
    #      ^^^^^
    def spot_colon2
      nd_parent, const = @node.children
      if nd_parent.last_lineno == @node.last_lineno
        fetch_line(nd_parent.last_lineno)
        @beg_column = nd_parent.last_column
        @end_column = @node.last_column
      else
        @snippet = @fetch[@node.last_lineno]
        if @snippet[...@node.last_column].match(/#{ Regexp.quote(const) }\z/)
          @beg_column = $~.begin(0)
          @end_column = $~.end(0)
        end
      end
    end

    # Example:
    #   Foo::Bar += 1
    #      ^^^^^^^^
    def spot_op_cdecl
      nd_lhs, op, _nd_rhs = @node.children
      *nd_parent_lhs, _const = nd_lhs.children
      if @name == op
        @snippet = @fetch[nd_lhs.last_lineno]
        if @snippet.match(/\G\s*(#{ Regexp.quote(op) })=/, nd_lhs.last_column)
          @beg_column = $~.begin(1)
          @end_column = $~.end(1)
        end
      else
        # constant access error
        @end_column = nd_lhs.last_column
        if nd_parent_lhs.empty? # example: ::C += 1
          if nd_lhs.first_lineno == nd_lhs.last_lineno
            @snippet = @fetch[nd_lhs.last_lineno]
            @beg_column = nd_lhs.first_column
          end
        else # example: Foo::Bar::C += 1
          if nd_parent_lhs.last.last_lineno == nd_lhs.last_lineno
            @snippet = @fetch[nd_lhs.last_lineno]
            @beg_column = nd_parent_lhs.last.last_column
          end
        end
      end
    end

    def fetch_line(lineno)
      @beg_lineno = @end_lineno = lineno
      @snippet = @fetch[lineno]
    end

    # Take a location from the prism parser and set the necessary instance
    # variables.
    def prism_location(location)
      @beg_lineno = location.start_line
      @beg_column = location.start_column
      @end_lineno = location.end_line
      @end_column = location.end_column
      @snippet = @fetch[@beg_lineno, @end_lineno]
    end

    # Example:
    #   x.foo
    #    ^^^^
    #   x.foo(42)
    #    ^^^^
    #   x&.foo
    #    ^^^^^
    #   x[42]
    #    ^^^^
    #   x.foo = 1
    #    ^^^^^^
    #   x[42] = 1
    #    ^^^^^^
    #   x + 1
    #     ^
    #   +x
    #   ^
    #   foo(42)
    #   ^^^
    #   foo 42
    #   ^^^
    #   foo
    #   ^^^
    def prism_spot_call_for_name
      # Explicitly turn off foo.() syntax because error_highlight expects this
      # to not work.
      return nil if @node.name == :call && @node.message_loc.nil?

      location = @node.message_loc || @node.call_operator_loc || @node.location
      location = @node.call_operator_loc.join(location) if @node.call_operator_loc&.start_line == location.start_line

      # If the method name ends with "=" but the message does not, then this is
      # a method call using the "attribute assignment" syntax
      # (e.g., foo.bar = 1). In this case we need to go retrieve the = sign and
      # add it to the location.
      if (name = @node.name).end_with?("=") && !@node.message.end_with?("=")
        location = location.adjoin("=")
      end

      prism_location(location)

      if !name.end_with?("=") && !name.match?(/[[:alpha:]_\[]/)
        # If the method name is an operator, then error_highlight only
        # highlights the first line.
        fetch_line(location.start_line)
      end
    end

    # Example:
    #   x.foo(42)
    #         ^^
    #   x[42]
    #     ^^
    #   x.foo = 1
    #           ^
    #   x[42] = 1
    #     ^^^^^^^
    #   x[] = 1
    #     ^^^^^
    #   x + 1
    #       ^
    #   foo(42)
    #       ^^
    #   foo 42
    #       ^^
    def prism_spot_call_for_args
      # Disallow highlighting arguments if there are no arguments.
      return if @node.arguments.nil?

      # Explicitly turn off foo.() syntax because error_highlight expects this
      # to not work.
      return nil if @node.name == :call && @node.message_loc.nil?

      if @node.name == :[]= && @node.opening == "[" && (@node.arguments&.arguments || []).length == 1
        prism_location(@node.opening_loc.copy(start_offset: @node.opening_loc.start_offset + 1).join(@node.arguments.location))
      else
        prism_location(@node.arguments.location)
      end
    end

    # Example:
    #   x += 1
    #     ^
    def prism_spot_local_variable_operator_write_for_name
      prism_location(@node.binary_operator_loc.chop)
    end

    # Example:
    #   x += 1
    #        ^
    def prism_spot_local_variable_operator_write_for_args
      prism_location(@node.value.location)
    end

    # Example:
    #   x.foo += 42
    #    ^^^     (for foo)
    #   x.foo += 42
    #         ^  (for +)
    #   x.foo += 42
    #    ^^^^^^^ (for foo=)
    def prism_spot_call_operator_write_for_name
      if !@name.start_with?(/[[:alpha:]_]/)
        prism_location(@node.binary_operator_loc.chop)
      else
        location = @node.message_loc
        if @node.call_operator_loc.start_line == location.start_line
          location = @node.call_operator_loc.join(location)
        end

        location = location.adjoin("=") if @name.end_with?("=")
        prism_location(location)
      end
    end

    # Example:
    #   x.foo += 42
    #            ^^
    def prism_spot_call_operator_write_for_args
      prism_location(@node.value.location)
    end

    # Example:
    #   x[1] += 42
    #    ^^^    (for [])
    #   x[1] += 42
    #        ^  (for +)
    #   x[1] += 42
    #    ^^^^^^ (for []=)
    def prism_spot_index_operator_write_for_name
      case @name
      when :[]
        prism_location(@node.opening_loc.join(@node.closing_loc))
      when :[]=
        prism_location(@node.opening_loc.join(@node.closing_loc).adjoin("="))
      else
        # Explicitly turn off foo[] += 1 syntax when the operator is not on
        # the same line because error_highlight expects this to not work.
        return nil if @node.binary_operator_loc.start_line != @node.opening_loc.start_line

        prism_location(@node.binary_operator_loc.chop)
      end
    end

    # Example:
    #   x[1] += 42
    #     ^^^^^^^^
    def prism_spot_index_operator_write_for_args
      opening_loc =
        if @node.arguments.nil?
          @node.opening_loc.copy(start_offset: @node.opening_loc.start_offset + 1)
        else
          @node.arguments.location
        end

      prism_location(opening_loc.join(@node.value.location))
    end

    # Example:
    #   Foo
    #   ^^^
    def prism_spot_constant_read
      prism_location(@node.location)
    end

    # Example:
    #   Foo::Bar
    #      ^^^^^
    def prism_spot_constant_path
      if @node.parent && @node.parent.location.end_line == @node.location.end_line
        fetch_line(@node.parent.location.end_line)
        prism_location(@node.delimiter_loc.join(@node.name_loc))
      else
        fetch_line(@node.location.end_line)
        location = @node.name_loc
        location = @node.delimiter_loc.join(location) if @node.delimiter_loc.end_line == location.start_line
        prism_location(location)
      end
    end

    # Example:
    #   Foo::Bar += 1
    #      ^^^^^^^^
    def prism_spot_constant_path_operator_write
      if @name == (target = @node.target).name
        prism_location(target.delimiter_loc.join(target.name_loc))
      else
        prism_location(@node.binary_operator_loc.chop)
      end
    end
  end

  private_constant :Spotter
end
ruby/error_highlight/formatter.rb000064400000004733150403134320013237 0ustar00module ErrorHighlight
  class DefaultFormatter
    MIN_SNIPPET_WIDTH = 20

    def self.message_for(spot)
      # currently only a one-line code snippet is supported
      return "" unless spot[:first_lineno] == spot[:last_lineno]

      snippet      = spot[:snippet]
      first_column = spot[:first_column]
      last_column  = spot[:last_column]
      ellipsis     = "..."

      # truncate snippet to fit in the viewport
      if max_snippet_width && snippet.size > max_snippet_width
        available_width = max_snippet_width - ellipsis.size
        center          = first_column - max_snippet_width / 2

        visible_start  = last_column < available_width ? 0 : [center, 0].max
        visible_end    = visible_start + max_snippet_width
        visible_start  = snippet.size - max_snippet_width if visible_end > snippet.size

        prefix = visible_start.positive?    ? ellipsis : ""
        suffix = visible_end < snippet.size ? ellipsis : ""

        snippet = prefix + snippet[(visible_start + prefix.size)...(visible_end - suffix.size)] + suffix
        snippet << "\n" unless snippet.end_with?("\n")

        first_column -= visible_start
        last_column  = [last_column - visible_start, snippet.size - 1].min
      end

      indent = snippet[0...first_column].gsub(/[^\t]/, " ")
      marker = indent + "^" * (last_column - first_column)

      "\n\n#{ snippet }#{ marker }"
    end

    def self.max_snippet_width
      return if Ractor.current[:__error_highlight_max_snippet_width__] == :disabled

      Ractor.current[:__error_highlight_max_snippet_width__] ||= terminal_width
    end

    def self.max_snippet_width=(width)
      return Ractor.current[:__error_highlight_max_snippet_width__] = :disabled if width.nil?

      width = width.to_i

      if width < MIN_SNIPPET_WIDTH
        warn "'max_snippet_width' adjusted to minimum value of #{MIN_SNIPPET_WIDTH}."
        width = MIN_SNIPPET_WIDTH
      end

      Ractor.current[:__error_highlight_max_snippet_width__] = width
    end

    def self.terminal_width
      # lazy load io/console, so it's not loaded when 'max_snippet_width' is set
      require "io/console"
      STDERR.winsize[1] if STDERR.tty?
    rescue LoadError, NoMethodError, SystemCallError
      # do not truncate when window size is not available
    end
  end

  def self.formatter
    Ractor.current[:__error_highlight_formatter__] || DefaultFormatter
  end

  def self.formatter=(formatter)
    Ractor.current[:__error_highlight_formatter__] = formatter
  end
end
ruby/error_highlight/core_ext.rb000064400000002610150403134320013034 0ustar00require_relative "formatter"

module ErrorHighlight
  module CoreExt
    private def generate_snippet
      spot = ErrorHighlight.spot(self)
      return "" unless spot
      return ErrorHighlight.formatter.message_for(spot)
    end

    if Exception.method_defined?(:detailed_message)
      def detailed_message(highlight: false, error_highlight: true, **)
        return super unless error_highlight
        snippet = generate_snippet
        if highlight
          snippet = snippet.gsub(/.+/) { "\e[1m" + $& + "\e[m" }
        end
        super + snippet
      end
    else
      # This is a marker to let `DidYouMean::Correctable#original_message` skip
      # the following method definition of `to_s`.
      # See https://github.com/ruby/did_you_mean/pull/152
      SKIP_TO_S_FOR_SUPER_LOOKUP = true
      private_constant :SKIP_TO_S_FOR_SUPER_LOOKUP

      def to_s
        msg = super
        snippet = generate_snippet
        if snippet != "" && !msg.include?(snippet)
          msg + snippet
        else
          msg
        end
      end
    end
  end

  NameError.prepend(CoreExt)

  if Exception.method_defined?(:detailed_message)
    # ErrorHighlight is enabled for TypeError and ArgumentError only when Exception#detailed_message is available.
    # This is because changing ArgumentError#message is highly incompatible.
    TypeError.prepend(CoreExt)
    ArgumentError.prepend(CoreExt)
  end
end
ruby/erb/version.rb000064400000000134150403134320010300 0ustar00# frozen_string_literal: true
class ERB
  VERSION = '4.0.4'
  private_constant :VERSION
end
ruby/erb/util.rb000064400000002647150403134320007603 0ustar00# frozen_string_literal: true
#--
# ERB::Escape
#
# A subset of ERB::Util. Unlike ERB::Util#html_escape, we expect/hope
# Rails will not monkey-patch ERB::Escape#html_escape.
begin
  # We don't build the C extension for JRuby, TruffleRuby, and WASM
  if $LOAD_PATH.resolve_feature_path('erb/escape')
    require 'erb/escape'
  end
rescue LoadError # resolve_feature_path raises LoadError on TruffleRuby 22.3.0
end
unless defined?(ERB::Escape)
  module ERB::Escape
    def html_escape(s)
   ruby/reline/history.rb000064400000003572150403134330011034 0ustar00A 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)
    CGI.escapeURIComponent(s.to_s)
  end
  alias u url_encode
  module_function :u
  module_function :url_encode
end
ruby/erb/def_method.rb000064400000001725150403134320010720 0ustar00# frozen_string_literal: true
#--
# ERB::DefMethod
#
# Utility module to define eRuby script as instance method.
#
# === Example
#
# example.rhtml:
#   <% for item in @items %>
#   <b><%= item %></b>
#   <% 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:
#
#   <b>10</b>
#
#   <b>20</b>
#
#   <b>30</b>
#
module ERB::DefMethod
  # 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(selfruby/reline/line_editor.rb000064400000336315150403134330011634 0ustar00# frozen_string_literal: true
#--
# 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
#
# <i>Generates</i>:
#
#   #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
#
# <i>Generates</i>:
#
#   #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 ERB::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 '<%#'
      out.push("\n" * content.count("\n")) # only adjust lineno
    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].*?)\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
ruby/readline.rb000064400000000327150403134320007632 0ustar00begin
  require "readline.#{RbConfig::CONFIG["DLEXT"]}"
rescue LoadError
  require 'reline' unless defined? Reline
  Object.send(:remove_const, :Readline) if Object.const_defined?(:Readline)
  Readline = Reline
end
ruby/objspace/trace.rb000064400000002235150403134320010733 0ustar00# This is a simple tool to enable the object allocation tracer.
# When you have an object of unknown provenance, you can use this
# to investigate where the object in question is created.
#
# = Important notice
#
# This is only for debugging purpose. Do not use this in production.
# Require'ing this file immediately starts tracing the object allocation,
# which brings a large performance overhead.
#
# = Usage
#
# 1. Add `require "objspace/trace"` into your code (or add `-robjspace/trace` into the command line)
# 2. `p obj` will show the allocation site of `obj`
#
# Note: This redefines `Kernel#p` method, but not `Object#inspect`.
#
# = Examples
#
#   1: require "objspace/trace"
#   2:
#   3: obj = "str"
#   4:
#   5: p obj  #=> "str" @ test.rb:3

require 'objspace.so'

module Kernel
  remove_method :p
  define_method(:p) do |*objs|
    objs.each do |obj|
      file = ObjectSpace.allocation_sourcefile(obj)
      line = ObjectSpace.allocation_sourceline(obj)
      if file
        puts "#{ obj.inspect } @ #{ file }:#{ line }"
      else
        puts obj.inspect
      end
    end
  end
end

ObjectSpace.trace_object_allocations_start

warn "objspace/trace is enabled"
ruby/error_highlight.rb000064400000000124150403134330011223 0ustar00require_relative "error_highlight/base"
require_relative "error_highlight/core_ext"
ruby/objspace.rb000064400000010214150403134330007632 0ustar00# frozen_string_literal: true

require 'objspace.so'

module ObjectSpace
  class << self
    private :_dump
    private :_dump_all
    private :_dump_shapes
  end

  module_function

  # Dump the contents of a ruby object as JSON.
  #
  # _output_ can be one of: +:stdout+, +:file+, +:string+, or IO object.
  #
  # * +:file+ means dumping to a tempfile and returning corresponding File object;
  # * +:stdout+ means printing the dump and returning +nil+;
  # * +:string+ means returning a string with the dump;
  # * if an instance of IO object is provided, the output goes there, and the object
  #   is returned.
  #
  # 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


  # Dump the contents of the ruby heap as JSON.
  #
  # _output_ argument is the same as for #dump.
  #
  # _full_ must be a boolean. If true, all heap slots are dumped including the empty ones (+T_NONE+).
  #
  # _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.
  #
  # _shapes_ must be a boolean or a non-negative integer.
  #
  # If _shapes_ is a positive integer, only shapes newer than the provided
  # shape id are dumped. The current shape_id can be accessed using <tt>RubyVM.stat(:next_shape_id)</tt>.
  #
  # If _shapes_ is +false+, no shapes are dumped.
  #
  # To only dump objects allocated past a certain point you can combine _since_ and _shapes_:
  #   ObjectSpace.trace_object_allocations
  #   GC.start
  #   gc_generation = GC.count
  #   shape_generation = RubyVM.stat(:next_shape_id)
  #   call_method_to_instrument
  #   ObjectSpace.dump_all(since: gc_generation, shapes: shape_generation)
  #
  # 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, shapes: true)
    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

    shapes = 0 if shapes == true
    ret = _dump_all(out, full, since, shapes)
    return nil if output == :stdout
    ret
  end

  #  Dump the contents of the ruby shape tree as JSON.
  #
  #  _output_ argument is the same as for #dump.
  #
  #  If _since_ is a positive integer, only shapes newer than the provided
  #  shape id are dumped. The current shape_id can be accessed using <tt>RubyVM.stat(:next_shape_id)</tt>.
  #
  #  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_shapes(output: :file, since: 0)
    out = case output
    when :file, nil
      require 'tempfile'
      Tempfile.create(%w(rubyshapes .json))
    when :stdout
      STDOUT
    when :string
      +''
    when IO
      output
    else
      raise ArgumentError, "wrong output option: #{output.inspect}"
    end

    ret = _dump_shapes(out, since)
    return nil if output == :stdout
    ret
  end
end
ruby/erb.rb000064400000035043150403134330006623 0ustar00# -*- 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'
require 'erb/version'
require 'erb/compiler'
require 'erb/def_method'
require 'erb/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)
#
# <em>Prints:</em> 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 %> (`<% #` doesn't work. Don't use Ruby comments.)
#   % 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 <<EOF
#   <%#-*- coding: Big5 -*-%>
#     \_\_ENCODING\_\_ is <%= \_\_ENCODING\_\_ %>.
#   EOF
#   puts template.result
#
# <em>Prints:</em> \_\_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
# <tt>%q{...}</tt> to avoid trouble with the backslash.
#
#   require "erb"
#
#   # Create template.
#   template = %q{
#     From:  James Edward Gray II <james@grayproductions.net>
#     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 <spokesman@ruby_community.org>"
#   priorities = [ "Run Ruby Quiz",
#                  "Document Modules",
#                  "Answer Questions on Ruby Talk" ]
#
#   # Produce result.
#   email = message.result
#   puts email
#
# <i>Generates:</i>
#
#   From:  James Edward Gray II <james@grayproductions.net>
#   To:  Community Spokesman <spokesman@ruby_community.org>
#   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 <tt>.rhtml</tt> 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 = %{
#     <html>
#       <head><title>Ruby Toys -- <%= @name %></title></head>
#       <body>
#
#         <h1><%= @name %> (<%= @code %>)</h1>
#         <p><%= @desc %></p>
#
#         <ul>
#           <% @features.each do |f| %>
#             <li><b><%= f %></b></li>
#           <% end %>
#         </ul>
#
#         <p>
#           <% if @cost < 10 %>
#             <b>Only <%= @cost %>!!!</b>
#           <% else %>
#              Call for a price, today!
#           <% end %>
#         </p>
#
#       </body>
#     </html>
#   }.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)
#
# <i>Generates (some blank lines removed):</i>
#
#    <html>
#      <head><title>Ruby Toys -- Rubysapien</title></head>
#      <body>
#
#        <h1>Rubysapien (TZ-1002)</h1>
#        <p>Geek's Best Friend!  Responds to Ruby commands...</p>
#
#        <ul>
#            <li><b>Listens for verbal commands in the Ruby language!</b></li>
#            <li><b>Ignores Perl, Java, and all C variants.</b></li>
#            <li><b>Karate-Chop Action!!!</b></li>
#            <li><b>Matz signature on left leg.</b></li>
#            <li><b>Gem studded eyes... Rubies, of course!</b></li>
#        </ul>
#
#        <p>
#             Call for a price, today!
#        </p>
#
#      </body>
#    </html>
#
#
# == 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: #'
  deprecate_constant :Revision

  # Returns revision information for the erb.rb module.
  def self.version
    VERSION
  end

  #
  # 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', trim_mode: "", eoutvar: "@product").result b
  #        <%= PRODUCT[:name] %>
  #        <%= PRODUCT[:desc] %>
  #      END_PRODUCT
  #      ERB.new(<<~'END_PRICE', 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
    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
      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
      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

  ##
  # 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
ruby/un.rb000064400000026254150403134330006501 0ustar00# frozen_string_literal: false
#
# = un.rb
#
# Copyright (c) 2003 WATANABE Hirofumi <eban@ruby-lang.org>
#
# 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 colorize -- [FILE]
#   ruby -run -e help [COMMAND]

require "fileutils"
require "optparse"

module FileUtils
  @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
#   -l          make hard link instead of copying (implies -r)
#   -v          verbose
#

def cp
  setup("prl") do |argv, options|
    cmd = "cp"
    cmd += "_r" if options.delete :r
    cmd = "cp_lr" if options.delete :l
    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
        File.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 = nil
    options[:StartCallback] = proc {
      logger = s.logger
      logger.info("To access this server, open this URL in a browser:")
      s.listeners.each do |listener|
        if options[:SSLEnable]
          addr = listener.addr
          addr[3] = "127.0.0.1" if addr[3] == "0.0.0.0"
          addr[3] = "::1" if addr[3] == "::"
          logger.info("    https://#{Addrinfo.new(addr).inspect_sockaddr}")
        else
          logger.info("    http://#{listener.connect_address.inspect_sockaddr}")
        end
      end
    }
    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

##
# Colorize ruby code.
#
#   ruby -run -e colorize -- [FILE]
#

def colorize
  begin
    require "irb/color"
  rescue LoadError
    raise "colorize requires irb 1.1.0 or later"
  end
  setup do |argv, |
    if argv.empty?
      puts IRB::Color.colorize_code STDIN.read
      return
    end
    argv.each do |file|
      puts IRB::Color.colorize_code File.read(file)
    end
  end
end

##
# Display help message.
#
#   ruby -run -e help [COMMAND]
#

def help
  setup do |argv,|
    UN.help(argv)
  end
end

module UN # :nodoc:

  VERSION = "0.3.0"

  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
    File.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
ruby/benchmark.rb000064400000045250150403134330010006 0ustar00# 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
#   <code>"a"*1_000_000_000</code>:
#
#       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

  VERSION = "0.4.0"

  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.
  # (Note: +caption+ must contain a terminating newline character,
  # see the default Benchmark::Tms::CAPTION for an example.)
  #
  # 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
    report = Report.new(label_width, format)
    results = yield(report)

    print " " * report.width + caption unless caption.empty?
    report.list.each { |i|
      print i.label.to_s.ljust(report.width)
      print i.format(report.format, *format)
    }

    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.
  # The unit of time is seconds.
  #
  #       Benchmark.realtime { "a" * 1_000_000_000 }
  #       #=> 0.5098029999935534
  #
  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:
      w = label.to_s.length
      @width = w if @width < w
      @list << res = Benchmark.measure(label, &blk)
      res
    end

    alias report item

    # An array of Benchmark::Tms objects representing each item.
    attr_reader :width, :format, :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:
    #
    # <tt>%u</tt>::     Replaced by the user CPU time, as reported by Tms#utime.
    # <tt>%y</tt>::     Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem")
    # <tt>%U</tt>::     Replaced by the children's user CPU time, as reported by Tms#cutime
    # <tt>%Y</tt>::     Replaced by the children's system CPU time, as reported by Tms#cstime
    # <tt>%t</tt>::     Replaced by the total CPU time, as reported by Tms#total
    # <tt>%r</tt>::     Replaced by the elapsed real time, as reported by Tms#real
    # <tt>%n</tt>::     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

    #
    # Returns a hash containing the same data as `to_a`.
    #
    def to_h
      {
        label:  @label,
        utime:  @utime,
        stime:  @stime,
        cutime: @cutime,
        cstime: @cstime,
        real:   @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 <tt>+</tt>, <tt>-</tt>,
    # <tt>*</tt>, <tt>/</tt>
    #
    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
ruby/kconv.rb000064400000013345150403134330007174 0ustar00  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
         Net::HTTPPermanentRedirect # 308
      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

  # :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:

  # 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

    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

    # rruby/find.rb000064400000005021150403134330006764 0ustar00# 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

  VERSION = "0.2.0"

  #
  # 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, Errno::EINVAL
            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, Errno::EINVAL
              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
ruby/ripper.rb000064400000004676150403134330007364 0ustar00# 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
# <code>:@ident</code>. 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 <code>@tstring_content</code>,
# this is the literal part for <code>Hello, </code> and <code>!</code>. Between
# the two <code>@tstring_content</code> statements is a +:string_embexpr+,
# where _embexpr_ is an embedded expression. Our expression consists of a local
# variable, or +var_ref+, with the identifier (<code>@ident</code>) 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
gems/gems/io-console-0.6.0/lib/io000075500000000000150403134330012225 0ustar00ruby/reline/version.rb000064400000000046150403134330011011 0ustar00module Reline
  VERSION = '0.6.0'
end
ruby/reline/key_stroke.rb000064400000006334150403134330011511 0ustar00class Reline::KeyStroke
  ESC_BYTE = 27
  CSI_PARAMETER_BYTES_RANGE = 0x30..0x3f
  CSI_INTERMEDIATE_BYTES_RANGE = (0x20..0x2f)

  attr_accessor :encoding

  def initialize(config, encoding)
    @config = config
    @encoding = encoding
  end

  # Input exactly matches to a key sequence
  MATCHING = :matching
  # Input partially matches to a key sequence
  MATCHED = :matched
  # Input matches to a key sequence and the key sequence is a prefix of another key sequence
  MATCHING_MATCHED = :matching_matched
  # Input does not match to any key sequence
  UNMATCHED = :unmatched

  def match_status(input)
    matching = key_mapping.matching?(input)
    matched = key_mapping.get(input)
    if matching && matched
      MATCHING_MATCHED
    elsif matching
      MATCHING
    elsif matched
      MATCHED
    elsif input[0] == ESC_BYTE
      match_unknown_escape_sequence(input, vi_mode: @config.editing_mode_is?(:vi_insert, :vi_command))
    else
      s = input.pack('c*').force_encoding(@encoding)
      if s.valid_encoding?
        s.size == 1 ? MATCHED : UNMATCHED
      else
        # Invalid string is MATCHING (part of valid string) or MATCHED (invalid bytes to be ignored)
        MATCHING_MATCHED
      end
    end
  end

  def expand(input)
    matched_bytes = nil
    (1..input.size).each do |i|
      bytes = input.take(i)
      status = match_status(bytes)
      matched_bytes = bytes if status == MATCHED || status == MATCHING_MATCHED
      break if status == MATCHED || status == UNMATCHED
    end
    return [[], []] unless matched_bytes

    func = key_mapping.get(matched_bytes)
    s = matched_bytes.pack('c*').force_encoding(@encoding)
    if func.is_a?(Array)
      # Perform simple macro expansion for single byte key bindings.
      # Multibyte key bindings and recursive macro expansion are not supported yet.
      marco = func.pack('c*').force_encoding(@encoding)
      keys = marco.chars.map do |c|
        f = key_mapping.get(c.bytes)
        Reline::Key.new(c, f.is_a?(Symbol) ? f : :ed_insert, false)
      end
    elsif func
      keys = [Reline::Key.new(s, func, false)]
    else
      if s.valid_encoding? && s.size == 1
        keys = [Reline::Key.new(s, :ed_insert, false)]
      else
        keys = []
      end
    end

    [keys, input.drop(matched_bytes.size)]
  end

  private

  # returns match status of CSI/SS3 sequence and matched length
  def match_unknown_escape_sequence(input, vi_mode: false)
    idx = 0
    return UNMATCHED unless input[idx] == ESC_BYTE
    idx += 1
    idx += 1 if input[idx] == ESC_BYTE

    case input[idx]
    when nil
      if idx == 1 # `ESC`
        return MATCHING_MATCHED
      else # `ESC ESC`
        return MATCHING
      end
    when 91 # == '['.ord
      # CSI sequence `ESC [ ... char`
      idx += 1
      idx += 1 while idx < input.size && CSI_PARAMETER_BYTES_RANGE.cover?(input[idx])
      idx += 1 while idx < input.size && CSI_INTERMEDIATE_BYTES_RANGE.cover?(input[idx])
    when 79 # == 'O'.ord
      # SS3 sequence `ESC O char`
      idx += 1
    else
      # `ESC char` or `ESC ESC char`
      return UNMATCHED if vi_mode
    end

    case input.size
    when idx
      MATCHING
    when idx + 1
      MATCHED
    else
      UNMATCHED
    end
  end

  def key_mapping
    @config.key_bindings
  end
end
ruby/reline/unicode/east_asian_width.rb000064400000052453150403134330014271 0ustar00class Reline::Unicode::EastAsianWidth
  # This is based on EastAsianWidth.txt
  # UNICODE_VERSION = '15.1.0'

  CHUNK_LAST, CHUNK_WIDTH = [
    [0x1f, 2],
    [0x7e, 1],
    [0x7f, 2],
    [0xa0, 1],
    [0xa1, -1],
    [0xa3, 1],
    [0xa4, -1],
    [0xa6, 1],
    [0xa8, -1],
    [0xa9, 1],
    [0xaa, -1],
    [0xac, 1],
    [0xae, -1],
    [0xaf, 1],
    [0xb4, -1],
    [0xb5, 1],
    [0xba, -1],
    [0xbb, 1],
    [0xbf, -1],
    [0xc5, 1],
    [0xc6, -1],
    [0xcf, 1],
    [0xd0, -1],
    [0xd6, 1],
    [0xd8, -1],
    [0xdd, 1],
    [0xe1, -1],
    [0xe5, 1],
    [0xe6, -1],
    [0xe7, 1],
    [0xea, -1],
    [0xeb, 1],
    [0xed, -1],
    [0xef, 1],
    [0xf0, -1],
    [0xf1, 1],
    [0xf3, -1],
    [0xf6, 1],
    [0xfa, -1],
    [0xfb, 1],
    [0xfc, -1],
    [0xfd, 1],
    [0xfe, -1],
    [0x100, 1],
    [0x101, -1],
    [0x110, 1],
    [0x111, -1],
    [0x112, 1],
    [0x113, -1],
    [0x11a, 1],
    [0x11b, -1],
    [0x125, 1],
    [0x127, -1],
    [0x12a, 1],
    [0x12b, -1],
    [0x130, 1],
    [0x133, -1],
    [0x137, 1],
    [0x138, -1],
    [0x13e, 1],
    [0x142, -1],
    [0x143, 1],
    [0x144, -1],
    [0x147, 1],
    [0x14b, -1],
    [0x14c, 1],
    [0x14d, -1],
    [0x151, 1],
    [0x153, -1],
    [0x165, 1],
    [0x167, -1],
    [0x16a, 1],
    [0x16b, -1],
    [0x1cd, 1],
    [0x1ce, -1],
    [0x1cf, 1],
    [0x1d0, -1],
    [0x1d1, 1],
    [0x1d2, -1],
    [0x1d3, 1],
    [0x1d4, -1],
    [0x1d5, 1],
    [0x1d6, -1],
    [0x1d7, 1],
    [0x1d8, -1],
    [0x1d9, 1],
    [0x1da, -1],
    [0x1db, 1],
    [0x1dc, -1],
    [0x250, 1],
    [0x251, -1],
    [0x260, 1],
    [0x261, -1],
    [0x2c3, 1],
    [0x2c4, -1],
    [0x2c6, 1],
    [0x2c7, -1],
    [0x2c8, 1],
    [0x2cb, -1],
    [0x2cc, 1],
    [0x2cd, -1],
    [0x2cf, 1],
    [0x2d0, -1],
    [0x2d7, 1],
    [0x2db, -1],
    [0x2dc, 1],
    [0x2dd, -1],
    [0x2de, 1],
    [0x2df, -1],
    [0x2ff, 1],
    [0x36f, 0],
    [0x390, 1],
    [0x3a1, -1],
    [0x3a2, 1],
    [0x3a9, -1],
    [0x3b0, 1],
    [0x3c1, -1],
    [0x3c2, 1],
    [0x3c9, -1],
    [0x400, 1],
    [0x401, -1],
    [0x40f, 1],
    [0x44f, -1],
    [0x450, 1],
    [0x451, -1],
    [0x482, 1],
    [0x487, 0],
    [0x590, 1],
    [0x5bd, 0],
    [0x5be, 1],
    [0x5bf, 0],
    [0x5c0, 1],
    [0x5c2, 0],
    [0x5c3, 1],
    [0x5c5, 0],
    [0x5c6, 1],
    [0x5c7, 0],
    [0x60f, 1],
    [0x61a, 0],
    [0x64a, 1],
    [0x65f, 0],
    [0x66f, 1],
    [0x670, 0],
    [0x6d5, 1],
    [0x6dc, 0],
    [0x6de, 1],
    [0x6e4, 0],
    [0x6e6, 1],
    [0x6e8, 0],
    [0x6e9, 1],
    [0x6ed, 0],
    [0x710, 1],
    [0x711, 0],
    [0x72f, 1],
    [0x74a, 0],
    [0x7a5, 1],
    [0x7b0, 0],
    [0x7ea, 1],
    [0x7f3, 0],
    [0x7fc, 1],
    [0x7fd, 0],
    [0x815, 1],
    [0x819, 0],
    [0x81a, 1],
    [0x823, 0],
    [0x824, 1],
    [0x827, 0],
    [0x828, 1],
    [0x82d, 0],
    [0x858, 1],
    [0x85b, 0],
    [0x897, 1],
    [0x89f, 0],
    [0x8c9, 1],
    [0x8e1, 0],
    [0x8e2, 1],
    [0x902, 0],
    [0x939, 1],
    [0x93a, 0],
    [0x93b, 1],
    [0x93c, 0],
    [0x940, 1],
    [0x948, 0],
    [0x94c, 1],
    [0x94d, 0],
    [0x950, 1],
    [0x957, 0],
    [0x961, 1],
    [0x963, 0],
    [0x980, 1],
    [0x981, 0],
    [0x9bb, 1],
    [0x9bc, 0],
    [0x9c0, 1],
    [0x9c4, 0],
    [0x9cc, 1],
    [0x9cd, 0],
    [0x9e1, 1],
    [0x9e3, 0],
    [0x9fd, 1],
    [0x9fe, 0],
    [0xa00, 1],
    [0xa02, 0],
    [0xa3b, 1],
    [0xa3c, 0],
    [0xa40, 1],
    [0xa42, 0],
    [0xa46, 1],
    [0xa48, 0],
    [0xa4a, 1],
    [0xa4d, 0],
    [0xa50, 1],
    [0xa51, 0],
    [0xa6f, 1],
    [0xa71, 0],
    [0xa74, 1],
    [0xa75, 0],
    [0xa80, 1],
    [0xa82, 0],
    [0xabb, 1],
    [0xabc, 0],
    [0xac0, 1],
    [0xac5, 0],
    [0xac6, 1],
    [0xac8, 0],
    [0xacc, 1],
    [0xacd, 0],
    [0xae1, 1],
    [0xae3, 0],
    [0xaf9, 1],
    [0xaff, 0],
    [0xb00, 1],
    [0xb01, 0],
    [0xb3b, 1],
    [0xb3c, 0],
    [0xb3e, 1],
    [0xb3f, 0],
    [0xb40, 1],
    [0xb44, 0],
    [0xb4c, 1],
    [0xb4d, 0],
    [0xb54, 1],
    [0xb56, 0],
    [0xb61, 1],
    [0xb63, 0],
    [0xb81, 1],
    [0xb82, 0],
    [0xbbf, 1],
    [0xbc0, 0],
    [0xbcc, 1],
    [0xbcd, 0],
    [0xbff, 1],
    [0xc00, 0],
    [0xc03, 1],
    [0xc04, 0],
    [0xc3b, 1],
    [0xc3c, 0],
    [0xc3d, 1],
    [0xc40, 0],
    [0xc45, 1],
    [0xc48, 0],
    [0xc49, 1],
    [0xc4d, 0],
    [0xc54, 1],
    [0xc56, 0],
    [0xc61, 1],
    [0xc63, 0],
    [0xc80, 1],
    [0xc81, 0],
    [0xcbb, 1],
    [0xcbc, 0],
    [0xcbe, 1],
    [0xcbf, 0],
    [0xcc5, 1],
    [0xcc6, 0],
    [0xccb, 1],
    [0xccd, 0],
    [0xce1, 1],
    [0xce3, 0],
    [0xcff, 1],
    [0xd01, 0],
    [0xd3a, 1],
    [0xd3c, 0],
    [0xd40, 1],
    [0xd44, 0],
    [0xd4c, 1],
    [0xd4d, 0],
    [0xd61, 1],
    [0xd63, 0],
    [0xd80, 1],
    [0xd81, 0],
    [0xdc9, 1],
    [0xdca, 0],
    [0xdd1, 1],
    [0xdd4, 0],
    [0xdd5, 1],
    [0xdd6, 0],
    [0xe30, 1],
    [0xe31, 0],
    [0xe33, 1],
    [0xe3a, 0],
    [0xe46, 1],
    [0xe4e, 0],
    [0xeb0, 1],
    [0xeb1, 0],
    [0xeb3, 1],
    [0xebc, 0],
    [0xec7, 1],
    [0xece, 0],
    [0xf17, 1],
    [0xf19, 0],
    [0xf34, 1],
    [0xf35, 0],
    [0xf36, 1],
    [0xf37, 0],
    [0xf38, 1],
    [0xf39, 0],
    [0xf70, 1],
    [0xf7e, 0],
    [0xf7f, 1],
    [0xf84, 0],
    [0xf85, 1],
    [0xf87, 0],
    [0xf8c, 1],
    [0xf97, 0],
    [0xf98, 1],
    [0xfbc, 0],
    [0xfc5, 1],
    [0xfc6, 0],
    [0x102c, 1],
    [0x1030, 0],
    [0x1031, 1],
    [0x1037, 0],
    [0x1038, 1],
    [0x103a, 0],
    [0x103c, 1],
    [0x103e, 0],
    [0x1057, 1],
    [0x1059, 0],
    [0x105d, 1],
    [0x1060, 0],
    [0x1070, 1],
    [0x1074, 0],
    [0x1081, 1],
    [0x1082, 0],
    [0x1084, 1],
    [0x1086, 0],
    [0x108c, 1],
    [0x108d, 0],
    [0x109c, 1],
    [0x109d, 0],
    [0x10ff, 1],
    [0x115f, 2],
    [0x135c, 1],
    [0x135f, 0],
    [0x1711, 1],
    [0x1714, 0],
    [0x1731, 1],
    [0x1733, 0],
    [0x1751, 1],
    [0x1753, 0],
    [0x1771, 1],
    [0x1773, 0],
    [0x17b3, 1],
    [0x17b5, 0],
    [0x17b6, 1],
    [0x17bd, 0],
    [0x17c5, 1],
    [0x17c6, 0],
    [0x17c8, 1],
    [0x17d3, 0],
    [0x17dc, 1],
    [0x17dd, 0],
    [0x180a, 1],
    [0x180d, 0],
    [0x180e, 1],
    [0x180f, 0],
    [0x1884, 1],
    [0x1886, 0],
    [0x18a8, 1],
    [0x18a9, 0],
    [0x191f, 1],
    [0x1922, 0],
    [0x1926, 1],
    [0x1928, 0],
    [0x1931, 1],
    [0x1932, 0],
    [0x1938, 1],
    [0x193b, 0],
    [0x1a16, 1],
    [0x1a18, 0],
    [0x1a1a, 1],
    [0x1a1b, 0],
    [0x1a55, 1],
    [0x1a56, 0],
    [0x1a57, 1],
    [0x1a5e, 0],
    [0x1a5f, 1],
    [0x1a60, 0],
    [0x1a61, 1],
    [0x1a62, 0],
    [0x1a64, 1],
    [0x1a6c, 0],
    [0x1a72, 1],
    [0x1a7c, 0],
    [0x1a7e, 1],
    [0x1a7f, 0],
    [0x1aaf, 1],
    [0x1abd, 0],
    [0x1abe, 1],
    [0x1ace, 0],
    [0x1aff, 1],
    [0x1b03, 0],
    [0x1b33, 1],
    [0x1b34, 0],
    [0x1b35, 1],
    [0x1b3a, 0],
    [0x1b3b, 1],
    [0x1b3c, 0],
    [0x1b41, 1],
    [0x1b42, 0],
    [0x1b6a, 1],
    [0x1b73, 0],
    [0x1b7f, 1],
    [0x1b81, 0],
    [0x1ba1, 1],
    [0x1ba5, 0],
    [0x1ba7, 1],
    [0x1ba9, 0],
    [0x1baa, 1],
    [0x1bad, 0],
    [0x1be5, 1],
    [0x1be6, 0],
    [0x1be7, 1],
    [0x1be9, 0],
    [0x1bec, 1],
    [0x1bed, 0],
    [0x1bee, 1],
    [0x1bf1, 0],
    [0x1c2b, 1],
    [0x1c33, 0],
    [0x1c35, 1],
    [0x1c37, 0],
    [0x1ccf, 1],
    [0x1cd2, 0],
    [0x1cd3, 1],
    [0x1ce0, 0],
    [0x1ce1, 1],
    [0x1ce8, 0],
    [0x1cec, 1],
    [0x1ced, 0],
    [0x1cf3, 1],
    [0x1cf4, 0],
    [0x1cf7, 1],
    [0x1cf9, 0],
    [0x1dbf, 1],
    [0x1dff, 0],
    [0x200f, 1],
    [0x2010, -1],
    [0x2012, 1],
    [0x2016, -1],
    [0x2017, 1],
    [0x2019, -1],
    [0x201b, 1],
    [0x201d, -1],
    [0x201f, 1],
    [0x2022, -1],
    [0x2023, 1],
    [0x2027, -1],
    [0x202f, 1],
    [0x2030, -1],
    [0x2031, 1],
    [0x2033, -1],
    [0x2034, 1],
    [0x2035, -1],
    [0x203a, 1],
    [0x203b, -1],
    [0x203d, 1],
    [0x203e, -1],
    [0x2073, 1],
    [0x2074, -1],
    [0x207e, 1],
    [0x207f, -1],
    [0x2080, 1],
    [0x2084, -1],
    [0x20ab, 1],
    [0x20ac, -1],
    [0x20cf, 1],
    [0x20dc, 0],
    [0x20e0, 1],
    [0x20e1, 0],
    [0x20e4, 1],
    [0x20f0, 0],
    [0x2102, 1],
    [0x2103, -1],
    [0x2104, 1],
    [0x2105, -1],
    [0x2108, 1],
    [0x2109, -1],
    [0x2112, 1],
    [0x2113, -1],
    [0x2115, 1],
    [0x2116, -1],
    [0x2120, 1],
    [0x2122, -1],
    [0x2125, 1],
    [0x2126, -1],
    [0x212a, 1],
    [0x212b, -1],
    [0x2152, 1],
    [0x2154, -1],
    [0x215a, 1],
    [0x215e, -1],
    [0x215f, 1],
    [0x216b, -1],
    [0x216f, 1],
    [0x2179, -1],
    [0x2188, 1],
    [0x2189, -1],
    [0x218f, 1],
    [0x2199, -1],
    [0x21b7, 1],
    [0x21b9, -1],
    [0x21d1, 1],
    [0x21d2, -1],
    [0x21d3, 1],
    [0x21d4, -1],
    [0x21e6, 1],
    [0x21e7, -1],
    [0x21ff, 1],
    [0x2200, -1],
    [0x2201, 1],
    [0x2203, -1],
    [0x2206, 1],
    [0x2208, -1],
    [0x220a, 1],
    [0x220b, -1],
    [0x220e, 1],
    [0x220f, -1],
    [0x2210, 1],
    [0x2211, -1],
    [0x2214, 1],
    [0x2215, -1],
    [0x2219, 1],
    [0x221a, -1],
    [0x221c, 1],
    [0x2220, -1],
    [0x2222, 1],
    [0x2223, -1],
    [0x2224, 1],
    [0x2225, -1],
    [0x2226, 1],
    [0x222c, -1],
    [0x222d, 1],
    [0x222e, -1],
    [0x2233, 1],
    [0x2237, -1],
    [0x223b, 1],
    [0x223d, -1],
    [0x2247, 1],
    [0x2248, -1],
    [0x224b, 1],
    [0x224c, -1],
    [0x2251, 1],
    [0x2252, -1],
    [0x225f, 1],
    [0x2261, -1],
    [0x2263, 1],
    [0x2267, -1],
    [0x2269, 1],
    [0x226b, -1],
    [0x226d, 1],
    [0x226f, -1],
    [0x2281, 1],
    [0x2283, -1],
    [0x2285, 1],
    [0x2287, -1],
    [0x2294, 1],
    [0x2295, -1],
    [0x2298, 1],
    [0x2299, -1],
    [0x22a4, 1],
    [0x22a5, -1],
    [0x22be, 1],
    [0x22bf, -1],
    [0x2311, 1],
    [0x2312, -1],
    [0x2319, 1],
    [0x231b, 2],
    [0x2328, 1],
    [0x232a, 2],
    [0x23e8, 1],
    [0x23ec, 2],
    [0x23ef, 1],
    [0x23f0, 2],
    [0x23f2, 1],
    [0x23f3, 2],
    [0x245f, 1],
    [0x24e9, -1],
    [0x24ea, 1],
    [0x254b, -1],
    [0x254f, 1],
    [0x2573, -1],
    [0x257f, 1],
    [0x258f, -1],
    [0x2591, 1],
    [0x2595, -1],
    [0x259f, 1],
    [0x25a1, -1],
    [0x25a2, 1],
    [0x25a9, -1],
    [0x25b1, 1],
    [0x25b3, -1],
    [0x25b5, 1],
    [0x25b7, -1],
    [0x25bb, 1],
    [0x25bd, -1],
    [0x25bf, 1],
    [0x25c1, -1],
    [0x25c5, 1],
    [0x25c8, -1],
    [0x25ca, 1],
    [0x25cb, -1],
    [0x25cd, 1],
    [0x25d1, -1],
    [0x25e1, 1],
    [0x25e5, -1],
    [0x25ee, 1],
    [0x25ef, -1],
    [0x25fc, 1],
    [0x25fe, 2],
    [0x2604, 1],
    [0x2606, -1],
    [0x2608, 1],
    [0x2609, -1],
    [0x260d, 1],
    [0x260f, -1],
    [0x2613, 1],
    [0x2615, 2],
    [0x261b, 1],
    [0x261c, -1],
    [0x261d, 1],
    [0x261e, -1],
    [0x263f, 1],
    [0x2640, -1],
    [0x2641, 1],
    [0x2642, -1],
    [0x2647, 1],
    [0x2653, 2],
    [0x265f, 1],
    [0x2661, -1],
    [0x2662, 1],
    [0x2665, -1],
    [0x2666, 1],
    [0x266a, -1],
    [0x266b, 1],
    [0x266d, -1],
    [0x266e, 1],
    [0x266f, -1],
    [0x267e, 1],
    [0x267f, 2],
    [0x2692, 1],
    [0x2693, 2],
    [0x269d, 1],
    [0x269f, -1],
    [0x26a0, 1],
    [0x26a1, 2],
    [0x26a9, 1],
    [0x26ab, 2],
    [0x26bc, 1],
    [0x26be, 2],
    [0x26bf, -1],
    [0x26c3, 1],
    [0x26c5, 2],
    [0x26cd, -1],
    [0x26ce, 2],
    [0x26d3, -1],
    [0x26d4, 2],
    [0x26e1, -1],
    [0x26e2, 1],
    [0x26e3, -1],
    [0x26e7, 1],
    [0x26e9, -1],
    [0x26ea, 2],
    [0x26f1, -1],
    [0x26f3, 2],
    [0x26f4, -1],
    [0x26f5, 2],
    [0x26f9, -1],
    [0x26fa, 2],
    [0x26fc, -1],
    [0x26fd, 2],
    [0x26ff, -1],
    [0x2704, 1],
    [0x2705, 2],
    [0x2709, 1],
    [0x270b, 2],
    [0x2727, 1],
    [0x2728, 2],
    [0x273c, 1],
    [0x273d, -1],
    [0x274b, 1],
    [0x274c, 2],
    [0x274d, 1],
    [0x274e, 2],
    [0x2752, 1],
    [0x2755, 2],
    [0x2756, 1],
    [0x2757, 2],
    [0x2775, 1],
    [0x277f, -1],
    [0x2794, 1],
    [0x2797, 2],
    [0x27af, 1],
    [0x27b0, 2],
    [0x27be, 1],
    [0x27bf, 2],
    [0x2b1a, 1],
    [0x2b1c, 2],
    [0x2b4f, 1],
    [0x2b50, 2],
    [0x2b54, 1],
    [0x2b55, 2],
    [0x2b59, -1],
    [0x2cee, 1],
    [0x2cf1, 0],
    [0x2d7e, 1],
    [0x2d7f, 0],
    [0x2ddf, 1],
    [0x2dff, 0],
    [0x2e7f, 1],
    [0x2e99, 2],
    [0x2e9a, 1],
    [0x2ef3, 2],
    [0x2eff, 1],
    [0x2fd5, 2],
    [0x2fef, 1],
    [0x3029, 2],
    [0x302d, 0],
    [0x303e, 2],
    [0x3040, 1],
    [0x3096, 2],
    [0x3098, 1],
    [0x309a, 0],
    [0x30ff, 2],
    [0x3104, 1],
    [0x312f, 2],
    [0x3130, 1],
    [0x318e, 2],
    [0x318f, 1],
    [0x31e3, 2],
    [0x31ee, 1],
    [0x321e, 2],
    [0x321f, 1],
    [0x3247, 2],
    [0x324f, -1],
    [0x4dbf, 2],
    [0x4dff, 1],
    [0xa48c, 2],
    [0xa48f, 1],
    [0xa4c6, 2],
    [0xa66e, 1],
    [0xa66f, 0],
    [0xa673, 1],
    [0xa67d, 0],
    [0xa69d, 1],
    [0xa69f, 0],
    [0xa6ef, 1],
    [0xa6f1, 0],
    [0xa801, 1],
    [0xa802, 0],
    [0xa805, 1],
    [0xa806, 0],
    [0xa80a, 1],
    [0xa80b, 0],
    [0xa824, 1],
    [0xa826, 0],
    [0xa82b, 1],
    [0xa82c, 0],
    [0xa8c3, 1],
    [0xa8c5, 0],
    [0xa8df, 1],
    [0xa8f1, 0],
    [0xa8fe, 1],
    [0xa8ff, 0],
    [0xa925, 1],
    [0xa92d, 0],
    [0xa946, 1],
    [0xa951, 0],
    [0xa95f, 1],
    [0xa97c, 2],
    [0xa97f, 1],
    [0xa982, 0],
    [0xa9b2, 1],
    [0xa9b3, 0],
    [0xa9b5, 1],
    [0xa9b9, 0],
    [0xa9bb, 1],
    [0xa9bd, 0],
    [0xa9e4, 1],
    [0xa9e5, 0],
    [0xaa28, 1],
    [0xaa2e, 0],
    [0xaa30, 1],
    [0xaa32, 0],
    [0xaa34, 1],
    [0xaa36, 0],
    [0xaa42, 1],
    [0xaa43, 0],
    [0xaa4b, 1],
    [0xaa4c, 0],
    [0xaa7b, 1],
    [0xaa7c, 0],
    [0xaaaf, 1],
    [0xaab0, 0],
    [0xaab1, 1],
    [0xaab4, 0],
    [0xaab6, 1],
    [0xaab8, 0],
    [0xaabd, 1],
    [0xaabf, 0],
    [0xaac0, 1],
    [0xaac1, 0],
    [0xaaeb, 1],
    [0xaaed, 0],
    [0xaaf5, 1],
    [0xaaf6, 0],
    [0xabe4, 1],
    [0xabe5, 0],
    [0xabe7, 1],
    [0xabe8, 0],
    [0xabec, 1],
    [0xabed, 0],
    [0xabff, 1],
    [0xd7a3, 2],
    [0xdfff, 1],
    [0xf8ff, -1],
    [0xfaff, 2],
    [0xfb1d, 1],
    [0xfb1e, 0],
    [0xfdff, 1],
    [0xfe0f, 0],
    [0xfe19, 2],
    [0xfe1f, 1],
    [0xfe2f, 0],
    [0xfe52, 2],
    [0xfe53, 1],
    [0xfe66, 2],
    [0xfe67, 1],
    [0xfe6b, 2],
    [0xff00, 1],
    [0xff60, 2],
    [0xffdf, 1],
    [0xffe6, 2],
    [0xfffc, 1],
    [0xfffd, -1],
    [0x101fc, 1],
    [0x101fd, 0],
    [0x102df, 1],
    [0x102e0, 0],
    [0x10375, 1],
    [0x1037a, 0],
    [0x10a00, 1],
    [0x10a03, 0],
    [0x10a04, 1],
    [0x10a06, 0],
    [0x10a0b, 1],
    [0x10a0f, 0],
    [0x10a37, 1],
    [0x10a3a, 0],
    [0x10a3e, 1],
    [0x10a3f, 0],
    [0x10ae4, 1],
    [0x10ae6, 0],
    [0x10d23, 1],
    [0x10d27, 0],
    [0x10eaa, 1],
    [0x10eac, 0],
    [0x10efc, 1],
    [0x10eff, 0],
    [0x10f45, 1],
    [0x10f50, 0],
    [0x10f81, 1],
    [0x10f85, 0],
    [0x11000, 1],
    [0x11001, 0],
    [0x11037, 1],
    [0x11046, 0],
    [0x1106f, 1],
    [0x11070, 0],
    [0x11072, 1],
    [0x11074, 0],
    [0x1107e, 1],
    [0x11081, 0],
    [0x110b2, 1],
    [0x110b6, 0],
    [0x110b8, 1],
    [0x110ba, 0],
    [0x110c1, 1],
    [0x110c2, 0],
    [0x110ff, 1],
    [0x11102, 0],
    [0x11126, 1],
    [0x1112b, 0],
    [0x1112c, 1],
    [0x11134, 0],
    [0x11172, 1],
    [0x11173, 0],
    [0x1117f, 1],
    [0x11181, 0],
    [0x111b5, 1],
    [0x111be, 0],
    [0x111c8, 1],
    [0x111cc, 0],
    [0x111ce, 1],
    [0x111cf, 0],
    [0x1122e, 1],
    [0x11231, 0],
    [0x11233, 1],
    [0x11234, 0],
    [0x11235, 1],
    [0x11237, 0],
    [0x1123d, 1],
    [0x1123e, 0],
    [0x11240, 1],
    [0x11241, 0],
    [0x112de, 1],
    [0x112df, 0],
    [0x112e2, 1],
    [0x112ea, 0],
    [0x112ff, 1],
    [0x11301, 0],
    [0x1133a, 1],
    [0x1133c, 0],
    [0x1133f, 1],
    [0x11340, 0],
    [0x11365, 1],
    [0x1136c, 0],
    [0x1136f, 1],
    [0x11374, 0],
    [0x11437, 1],
    [0x1143f, 0],
    [0x11441, 1],
    [0x11444, 0],
    [0x11445, 1],
    [0x11446, 0],
    [0x1145d, 1],
    [0x1145e, 0],
    [0x114b2, 1],
    [0x114b8, 0],
    [0x114b9, 1],
    [0x114ba, 0],
    [0x114be, 1],
    [0x114c0, 0],
    [0x114c1, 1],
    [0x114c3, 0],
    [0x115b1, 1],
    [0x115b5, 0],
    [0x115bb, 1],
    [0x115bd, 0],
    [0x115be, 1],
    [0x115c0, 0],
    [0x115db, 1],
    [0x115dd, 0],
    [0x11632, 1],
    [0x1163a, 0],
    [0x1163c, 1],
    [0x1163d, 0],
    [0x1163e, 1],
    [0x11640, 0],
    [0x116aa, 1],
    [0x116ab, 0],
    [0x116ac, 1],
    [0x116ad, 0],
    [0x116af, 1],
    [0x116b5, 0],
    [0x116b6, 1],
    [0x116b7, 0],
    [0x1171c, 1],
    [0x1171f, 0],
    [0x11721, 1],
    [0x11725, 0],
    [0x11726, 1],
    [0x1172b, 0],
    [0x1182e, 1],
    [0x11837, 0],
    [0x11838, 1],
    [0x1183a, 0],
    [0x1193a, 1],
    [0x1193c, 0],
    [0x1193d, 1],
    [0x1193e, 0],
    [0x11942, 1],
    [0x11943, 0],
    [0x119d3, 1],
    [0x119d7, 0],
    [0x119d9, 1],
    [0x119db, 0],
    [0x119df, 1],
    [0x119e0, 0],
    [0x11a00, 1],
    [0x11a0a, 0],
    [0x11a32, 1],
    [0x11a38, 0],
    [0x11a3a, 1],
    [0x11a3e, 0],
    [0x11a46, 1],
    [0x11a47, 0],
    [0x11a50, 1],
    [0x11a56, 0],
    [0x11a58, 1],
    [0x11a5b, 0],
    [0x11a89, 1],
    [0x11a96, 0],
    [0x11a97, 1],
    [0x11a99, 0],
    [0x11c2f, 1],
    [0x11c36, 0],
    [0x11c37, 1],
    [0x11c3d, 0],
    [0x11c3e, 1],
    [0x11c3f, 0],
    [0x11c91, 1],
    [0x11ca7, 0],
    [0x11ca9, 1],
    [0x11cb0, 0],
    [0x11cb1, 1],
    [0x11cb3, 0],
    [0x11cb4, 1],
    [0x11cb6, 0],
    [0x11d30, 1],
    [0x11d36, 0],
    [0x11d39, 1],
    [0x11d3a, 0],
    [0x11d3b, 1],
    [0x11d3d, 0],
    [0x11d3e, 1],
    [0x11d45, 0],
    [0x11d46, 1],
    [0x11d47, 0],
    [0x11d8f, 1],
    [0x11d91, 0],
    [0x11d94, 1],
    [0x11d95, 0],
    [0x11d96, 1],
    [0x11d97, 0],
    [0x11ef2, 1],
    [0x11ef4, 0],
    [0x11eff, 1],
    [0x11f01, 0],
    [0x11f35, 1],
    [0x11f3a, 0],
    [0x11f3f, 1],
    [0x11f40, 0],
    [0x11f41, 1],
    [0x11f42, 0],
    [0x1343f, 1],
    [0x13440, 0],
    [0x13446, 1],
    [0x13455, 0],
    [0x16aef, 1],
    [0x16af4, 0],
    [0x16b2f, 1],
    [0x16b36, 0],
    [0x16f4e, 1],
    [0x16f4f, 0],
    [0x16f8e, 1],
    [0x16f92, 0],
    [0x16fdf, 1],
    [0x16fe3, 2],
    [0x16fe4, 0],
    [0x16fef, 1],
    [0x16ff1, 2],
    [0x16fff, 1],
    [0x187f7, 2],
    [0x187ff, 1],
    [0x18cd5, 2],
    [0x18cff, 1],
    [0x18d08, 2],
    [0x1afef, 1],
    [0x1aff3, 2],
    [0x1aff4, 1],
    [0x1affb, 2],
    [0x1affc, 1],
    [0x1affe, 2],
    [0x1afff, 1],
    [0x1b122, 2],
    [0x1b131, 1],
    [0x1b132, 2],
    [0x1b14f, 1],
    [0x1b152, 2],
    [0x1b154, 1],
    [0x1b155, 2],
    [0x1b163, 1],
    [0x1b167, 2],
    [0x1b16f, 1],
    [0x1b2fb, 2],
    [0x1bc9c, 1],
    [0x1bc9e, 0],
    [0x1ceff, 1],
    [0x1cf2d, 0],
    [0x1cf2f, 1],
    [0x1cf46, 0],
    [0x1d166, 1],
    [0x1d169, 0],
    [0x1d17a, 1],
    [0x1d182, 0],
    [0x1d184, 1],
    [0x1d18b, 0],
    [0x1d1a9, 1],
    [0x1d1ad, 0],
    [0x1d241, 1],
    [0x1d244, 0],
    [0x1d9ff, 1],
    [0x1da36, 0],
    [0x1da3a, 1],
    [0x1da6c, 0],
    [0x1da74, 1],
    [0x1da75, 0],
    [0x1da83, 1],
    [0x1da84, 0],
    [0x1da9a, 1],
    [0x1da9f, 0],
    [0x1daa0, 1],
    [0x1daaf, 0],
    [0x1dfff, 1],
    [0x1e006, 0],
    [0x1e007, 1],
    [0x1e018, 0],
    [0x1e01a, 1],
    [0x1e021, 0],
    [0x1e022, 1],
    [0x1e024, 0],
    [0x1e025, 1],
    [0x1e02a, 0],
    [0x1e08e, 1],
    [0x1e08f, 0],
    [0x1e12f, 1],
    [0x1e136, 0],
    [0x1e2ad, 1],
    [0x1e2ae, 0],
    [0x1e2eb, 1],
    [0x1e2ef, 0],
    [0x1e4eb, 1],
    [0x1e4ef, 0],
    [0x1e8cf, 1],
    [0x1e8d6, 0],
    [0x1e943, 1],
    [0x1e94a, 0],
    [0x1f003, 1],
    [0x1f004, 2],
    [0x1f0ce, 1],
    [0x1f0cf, 2],
    [0x1f0ff, 1],
    [0x1f10a, -1],
    [0x1f10f, 1],
    [0x1f12d, -1],
    [0x1f12f, 1],
    [0x1f169, -1],
    [0x1f16f, 1],
    [0x1f18d, -1],
    [0x1f18e, 2],
    [0x1f190, -1],
    [0x1f19a, 2],
    [0x1f1ac, -1],
    [0x1f1ff, 1],
    [0x1f202, 2],
    [0x1f20f, 1],
    [0x1f23b, 2],
    [0x1f23f, 1],
    [0x1f248, 2],
    [0x1f24f, 1],
    [0x1f251, 2],
    [0x1f25f, 1],
    [0x1f265, 2],
    [0x1f2ff, 1],
    [0x1f320, 2],
    [0x1f32c, 1],
    [0x1f335, 2],
    [0x1f336, 1],
    [0x1f37c, 2],
    [0x1f37d, 1],
    [0x1f393, 2],
    [0x1f39f, 1],
    [0x1f3ca, 2],
    [0x1f3ce, 1],
    [0x1f3d3, 2],
    [0x1f3df, 1],
    [0x1f3f0, 2],
    [0x1f3f3, 1],
    [0x1f3f4, 2],
    [0x1f3f7, 1],
    [0x1f43e, 2],
    [0x1f43f, 1],
    [0x1f440, 2],
    [0x1f441, 1],
    [0x1f4fc, 2],
    [0x1f4fe, 1],
    [0x1f53d, 2],
    [0x1f54a, 1],
    [0x1f54e, 2],
    [0x1f54f, 1],
    [0x1f567, 2],
    [0x1f579, 1],
    [0x1f57a, 2],
    [0x1f594, 1],
    [0x1f596, 2],
    [0x1f5a3, 1],
    [0x1f5a4, 2],
    [0x1f5fa, 1],
    [0x1f64f, 2],
    [0x1f67f, 1],
    [0x1f6c5, 2],
    [0x1f6cb, 1],
    [0x1f6cc, 2],
    [0x1f6cf, 1],
    [0x1f6d2, 2],
    [0x1f6d4, 1],
    [0x1f6d7, 2],
    [0x1f6db, 1],
    [0x1f6df, 2],
    [0x1f6ea, 1],
    [0x1f6ec, 2],
    [0x1f6f3, 1],
    [0x1f6fc, 2],
    [0x1f7df, 1],
    [0x1f7eb, 2],
    [0x1f7ef, 1],
    [0x1f7f0, 2],
    [0x1f90b, 1],
    [0x1f93a, 2],
    [0x1f93b, 1],
    [0x1f945, 2],
    [0x1f946, 1],
    [0x1f9ff, 2],
    [0x1fa6f, 1],
    [0x1fa7c, 2],
    [0x1fa7f, 1],
    [0x1fa88, 2],
    [0x1fa8f, 1],
    [0x1fabd, 2],
    [0x1fabe, 1],
    [0x1fac5, 2],
    [0x1facd, 1],
    [0x1fadb, 2],
    [0x1fadf, 1],
    [0x1fae8, 2],
    [0x1faef, 1],
    [0x1faf8, 2],
    [0x1ffff, 1],
    [0x2fffd, 2],
    [0x2ffff, 1],
    [0x3fffd, 2],
    [0xe00ff, 1],
    [0xe01ef, 0],
    [0xeffff, 1],
    [0xffffd, -1],
    [0xfffff, 1],
    [0x10fffd, -1],
    [0x7fffffff, 1]
  ].transpose.map(&:freeze)
end
ruby/reline/windows.rb000064400000040752150403134330011026 0ustar00ustar00sed 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
doc/alt-ruby22/COPYING.ja000064400000005100150403474760010646 0ustar00本プログラムはフリーソフトウェアです.2-clause BSDL
または以下に示す条件で本プログラムを再配布できます
2-clause BSDLについてはBSDLファイルを参照して下さい.

  1. 複製は制限なく自由です.

  2. 以下の条件のいずれかを満たす時に本プログラムのソースを
     自由に変更できます.

     (a) ネット�ruby/reline/general_io.rb000064400000002714150403134330011434 0ustar00ustar00�の配布条件を作者と合意する.

  4. 他のプログラムへの引用はいかなる目的であれ自由です.た
     だし,本プログラムに含まれる他の作者によるコードは,そ
     れぞれの作者の意向による制限が加えられる場合があります.

     それらファイルの一覧とそれぞれの配布条件などに付いては
     LEGALファイルを参照してください.

  5. 本プログラムへの入力となるスクリプトおよび,本プログラ
     ムからの出力の権利は本プログラムの作者ではなく,それぞ
     れの入出力を生成した人に属します.また,本プログラムに
     組み込まれるための拡張ライブラリについても同様です.

  6. 本プログラムは無保証です.作者は本プログラムをサポート
     する意志はありますが,プログラム自身のバグあるいは本プ
     ログラムの実行などから発生するいかなる損害に対しても責
     任を持ちません.
ruby/reline/key_actor.rb000064400000000251150403134330011302 0ustar00ustar00ruby/reline/key_actor/base.rb000064400000000461150403134330012217 0ustar00s
    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:

    The above copyright notice and this permission notice shall be included in
    all coruby/reline/key_actor/emacs.rb000064400000020155150403134330012377 0ustar00_kr.c
enc/euc_tw.c
enc/gb18030.c
enc/gb2312.c
enc/gbk.c
enc/iso_8859_1.c
enc/iso_8859_10.c
enc/iso_8859_11.c
enc/iso_8859_13.c
enc/iso_8859_14.c
enc/iso_8859_15.c
enc/iso_8859_16.c
enc/iso_8859_2.c
enc/iso_8859_3.c
enc/iso_8859_4.c
enc/iso_8859_5.c
enc/iso_8859_6.c
enc/iso_8859_7.c
enc/iso_8859_8.c
enc/iso_8859_9.c
enc/koi8_r.c
enc/koi8_u.c
enc/shift_jis.c
enc/unicode.c
enc/us_ascii.c
enc/utf_16be.c
enc/utf_16le.c
enc/utf_32be.c
enc/utf_32le.c
enc/utf_8.c
enc/windows_1251.c

Oniguruma  ----   (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>

http://www.geocities.jp/kosako3/oniguruma/
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/oniguruma/
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/

   When this software is partly used or it is distributed with Ruby,
   this of Ruby follows the license of Ruby.

configure:

  This file is free software.

    Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.

    This configure script is free software; the Free Software Foundation
    gives unlimited permission to copy, distribute and modify it.

tool/config.guess:
tool/config.sub:

  As long as you distribute these files with the file configure, they
  are covered under the Ruby's license.

      Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
      Free Software Foundation, Inc.

    This file is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

    As a special exception to the GNU General Public License, if you
    distribute this file as part of a program that contains a
    configuration script generated by Autoconf, you may include it under
    the same distribution terms that you use for the rest of that program.

parse.c:

  This file is licensed under the GPL, but is incorporated into Ruby and
  redistributed under the terms of the Ruby license, as permitted by the
  exception to the GPL below.

     Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
     Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2, or (at your option)
     any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor,
     Boston, MA 02110-1301, USA.  */

  /* As a special exception, you may create a larger work that contains
     part or all of the Bison parser skeleton and distribute that work
     under terms of your choice, so long as that work isn't itself a
     parser generator using the skeleton or a modified version thereof
     as a parser skeleton.  Alternatively, if you modify or redistribute
     the parser skeleton itself, you may (at your option) remove this
     special exception, which will cause the skeleton and the resulting
     Bison output files to be licensed under the GNU General Public
     License without this special exception.

     This special exception was added by the Free Software Foundation in
     version 2.2 of Bison.  */

util.c (partly):

    Copyright (c) 1991, 2000, 2001 by Lucent Technologies.

    Permission to use, copy, modify, and distribute this software for any
    purpose without fee is hereby granted, provided that this entire notice
    is included in all copies of any software which is or includes a copy
    or modification of this software and in all copies of the supporting
    documentation for such software.

    THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
    WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
    REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
    OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.

win32/win32.[ch]:

  You can apply the Artistic License to these files. (or GPL,
  alternatively)

    Copyright (c) 1993, Intergraph Corporation

    You may distribute under the terms of either the GNU General Public
    License or the Artistic License, as specified in the perl README file.

util.c (partly):

   Copyright (c) 2004-2008 David Schultz <das@FreeBSD.ORG>
   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.

random.c

  This file is under the new-style BSD license.

    A C-program for MT19937, with initialization improved 2002/2/10.
    Coded by Takuji Nishimura and Makoto Matsumoto.
    This is a faster version by taking Shawn Cokus's optimization,
    Matthe Bellew's simplification, Isaku Wada's real version.

    Before using, initialize the state by using init_genrand(seed)
    or init_by_array(init_key, key_length).

    Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
    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.

      3. The names of its contributors may not be used to endorse or promote
	 products derived from this software without specific prior written
	 permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 (INCLruby/reline/key_actor/vi_command.rb000064400000021005150403134330013416 0ustar00ruby/reline/history.rb000064400000003617150403134330011034 0ustar00class 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, Reline::Unicode.safe_encode(val, 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|
      Reline::Unicode.safe_encode(v, 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(Reline::Unicode.safe_encode(val, 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
ruby/reline/line_editor.rb000064400000231604150403134330011627 0ustar00require 'reline/kill_ring'
require 'reline/unicode'

require 'tempfile'

class Reline::LineEditor
  # TODO: Use "private alias_method" idiom after drop Ruby 2.5.
  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 :dig_perfect_match_proc

  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
  }

  module CompletionState
    NORMAL = :normal
    MENU = :menu
    MENU_WITH_PERFECT_MATCH = :menu_with_perfect_match
    PERFECT_MATCH = :perfect_match
  end

  RenderedScreen = Struct.new(:base_y, :lines, :cursor_y, keyword_init: true)

  CompletionJourneyState = Struct.new(:line_index, :pre, :target, :post, :list, :pointer)
  NullActionState = [nil, nil].freeze

  class MenuInfo
    attr_reader :list

    def initialize(list)
      @list = list
    end

    def lines(screen_width)
      return [] if @list.empty?

      list = @list.sort
      sizes = list.map { |item| Reline::Unicode.calculate_width(item) }
      item_width = sizes.max + 2
      num_cols = [screen_width / item_width, 1].max
      num_rows = list.size.fdiv(num_cols).ceil
      list_with_padding = list.zip(sizes).map { |item, size| item + ' ' * (item_width - size) }
      aligned = (list_with_padding + [nil] * (num_rows * num_cols - list_with_padding.size)).each_slice(num_rows).to_a.transpose
      aligned.map do |row|
        row.join.rstrip
      end
    end
  end

  MINIMUM_SCROLLBAR_HEIGHT = 1

  def initialize(config)
    @config = config
    @completion_append_character = ''
    @screen_size = [0, 0] # Should be initialized with actual winsize in LineEditor#reset
    reset_variables
  end

  def io_gate
    Reline::IOGate
  end

  def encoding
    io_gate.encoding
  end

  def set_pasting_state(in_pasting)
    # While pasting, text to be inserted is stored to @continuous_insertion_buffer.
    # After pasting, this buffer should be force inserted.
    process_insert(force: true) if @in_pasting && !in_pasting
    @in_pasting = in_pasting
  end

  private def check_mode_string
    if @config.show_mode_in_prompt
      if @config.editing_mode_is?(:vi_command)
        @config.vi_cmd_mode_string
      elsif @config.editing_mode_is?(:vi_insert)
        @config.vi_ins_mode_string
      elsif @config.editing_mode_is?(:emacs)
        @config.emacs_mode_string
      else
        '?'
      end
    end
  end

  private def check_multiline_prompt(buffer, mode_string)
    if @vi_arg
      prompt = "(arg: #{@vi_arg}) "
    elsif @searching_prompt
      prompt = @searching_prompt
    else
      prompt = @prompt
    end
    if !@is_multiline
      mode_string = check_mode_string
      prompt = mode_string + prompt if mode_string
      [prompt] + [''] * (buffer.size - 1)
    elsif @prompt_proc
      prompt_list = @prompt_proc.(buffer).map { |pr| pr.gsub("\n", "\\n") }
      prompt_list.map!{ prompt } if @vi_arg or @searching_prompt
      prompt_list = [prompt] if prompt_list.empty?
      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_list
    else
      prompt = mode_string + prompt if mode_string
      [prompt] * buffer.size
    end
  end

  def reset(prompt = '')
    @screen_size = Reline::IOGate.get_screen_size
    reset_variables(prompt)
    @rendered_screen.base_y = Reline::IOGate.cursor_pos.y
    if ENV.key?('RELINE_ALT_SCROLLBAR')
      @full_block = '::'
      @upper_half_block = "''"
      @lower_half_block = '..'
      @block_elem_width = 2
    elsif Reline::IOGate.win?
      @full_block = '█'
      @upper_half_block = '▀'
      @lower_half_block = '▄'
      @block_elem_width = 1
    elsif encoding == Encoding::UTF_8
      @full_block = '█'
      @upper_half_block = '▀'
      @lower_half_block = '▄'
      @block_elem_width = Reline::Unicode.calculate_width('█')
    else
      @full_block = '::'
      @upper_half_block = "''"
      @lower_half_block = '..'
      @block_elem_width = 2
    end
  end

  def handle_signal
    handle_interrupted
    handle_resized
  end

  private def handle_resized
    return unless @resized

    @screen_size = Reline::IOGate.get_screen_size
    @resized = false
    scroll_into_view
    Reline::IOGate.move_cursor_up @rendered_screen.cursor_y
    @rendered_screen.base_y = Reline::IOGate.cursor_pos.y
    clear_rendered_screen_cache
    render
  end

  private def handle_interrupted
    return unless @interrupted

    @interrupted = false
    clear_dialogs
    render
    cursor_to_bottom_offset = @rendered_screen.lines.size - @rendered_screen.cursor_y
    Reline::IOGate.scroll_down cursor_to_bottom_offset
    Reline::IOGate.move_cursor_column 0
    clear_rendered_screen_cache
    case @old_trap
    when 'DEFAULT', 'SYSTEM_DEFAULT'
      raise Interrupt
    when 'IGNORE'
      # Do nothing
    when 'EXIT'
      exit
    else
      @old_trap.call if @old_trap.respond_to?(:call)
    end
  end

  def set_signal_handlers
    Reline::IOGate.set_winch_handler doruby/reline/key_actor/vi_insert.rb000064400000017747150403134330013326 0ustar00ered_screen = RenderedScreen.new(base_y: 0, lines: [], cursor_y: 0)
    @input_lines = [[[""], 0, 0]]
    @input_lines_position = 0
    @restoring = false
    @prev_action_state = NullActionState
    @next_action_state = NullActionState
    reset_line
  end

  def reset_line
    @byte_pointer = 0
    @buffer_of_lines = [String.new(encoding: encoding)]
    @line_index = 0
    @cache.clear
    @line_backup_in_history = nil
  end

  def multiline_on
    @is_multiline = true
  end

  def multiline_off
    @is_multiline = false
  end

  private def insert_new_line(cursor_line, next_line)
    @buffer_of_lines.insert(@line_index + 1, String.new(next_line, encoding: encoding))
    @buffer_of_lines[@line_index] = cursor_line
    @line_index += 1
    @byte_pointer = 0
    if @auto_indent_proc && !@in_pasting
      if next_line.empty?
        (
          # For compatibility, use this calculation instead of just `process_auto_indent @line_index - 1, cursor_dependent: false`
          indent1 = @auto_indent_proc.(@buffer_of_lines.take(@line_index - 1).push(''), @line_index - 1, 0, true)
          indent2 = @auto_indent_proc.(@buffer_of_lines.take(@line_index), @line_index - 1, @buffer_of_lines[@line_index - 1].bytesize, false)
          indent = indent2 || indent1
          @buffer_of_lines[@line_index - 1] = ' ' * indent + @buffer_of_lines[@line_index - 1].gsub(/\A\s*/, '')
        )
        process_auto_indent @line_index, add_newline: true
      else
        process_auto_indent @line_index - 1, cursor_dependent: false
        process_auto_indent @line_index, add_newline: true # Need for compatibility
        process_auto_indent @line_index, cursor_dependent: false
      end
    end
  end

  private def split_line_by_width(str, max_width, offset: 0)
    Reline::Unicode.split_line_by_width(str, max_width, encoding, offset: offset)
  end

  def current_byte_pointer_cursor
    calculate_width(current_line.byteslice(0, @byte_pointer))
  end

  private def calculate_nearest_cursor(cursor)
    line_to_calc = current_line
    new_cursor_max = calculate_width(line_to_calc)
    new_cursor = 0
    new_byte_pointer = 0
    height = 1
    max_width = screen_width
    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
    @byte_pointer = new_byte_pointer
  end

  def with_cache(key, *deps)
    cached_deps, value = @cache[key]
    if cached_deps != deps
      @cache[key] = [deps, value = yield(*deps, cached_deps, value)]
    end
    value
  end

  def modified_lines
    with_cache(__method__, whole_lines, finished?) do |whole, complete|
      modify_lines(whole, complete)
    end
  end

  def prompt_list
    with_cache(__method__, whole_lines, check_mode_string, @vi_arg, @searching_prompt) do |lines, mode_string|
      check_multiline_prompt(lines, mode_string)
    end
  end

  def screen_height
    @screen_size.first
  end

  def screen_width
    @screen_size.last
  end

  def screen_scroll_top
    @scroll_partial_screen
  end

  def wrapped_prompt_and_input_lines
    with_cache(__method__, @buffer_of_lines.size, modified_lines, prompt_list, screen_width) do |n, lines, prompts, width, prev_cache_key, cached_value|
      prev_n, prev_lines, prev_prompts, prev_width = prev_cache_key
      cached_wraps = {}
      if prev_width == width
        prev_n.times do |i|
          cached_wraps[[prev_prompts[i], prev_lines[i]]] = cached_value[i]
        end
      end

      n.times.map do |i|
        prompt = prompts[i] || ''
        line = lines[i] || ''
        if (cached = cached_wraps[[prompt, line]])
          next cached
        end
        *wrapped_prompts, code_line_prompt = split_line_by_width(prompt, width)
        wrapped_lines = split_line_by_width(line, width, offset: calculate_width(code_line_prompt, true))
        wrapped_prompts.map { |p| [p, ''] } + [[code_line_prompt, wrapped_lines.first]] + wrapped_lines.drop(1).map { |c| ['', c] }
      end
    end
  end

  def calculate_overlay_levels(overlay_levels)
    levels = []
    overlay_levels.each do |x, w, l|
      levels.fill(l, x, w)
    end
    levels
  end

  def render_line_differential(old_items, new_items)
    old_levels = calculate_overlay_levels(old_items.zip(new_items).each_with_index.map {|((x, w, c), (nx, _nw, nc)), i| [x, w, c == nc && x == nx ? i : -1] if x }.compact)
    new_levels = calculate_overlay_levels(new_items.each_with_index.map { |(x, w), i| [x, w, i] if x }.compact).take(screen_width)
    base_x = 0
    new_levels.zip(old_levels).chunk { |n, o| n == o ? :skip : n || :blank }.each do |level, chunk|
      width = chunk.size
      if level == :skip
        # do nothing
      elsif level == :blank
        Reline::IOGate.move_cursor_column base_x
        Reline::IOGate.write "#{Reline::IOGate.reset_color_sequence}#{' ' * width}"
      else
        x, w, content = new_items[level]
        cover_begin = base_x != 0 && new_levels[base_x - 1] == level
        cover_end = new_levels[base_x + width] == level
        pos = 0
        unless x == base_x && w == width
          content, pos = Reline::Unicode.take_mbchar_range(content, base_x - x, width, cover_begin: cover_begin, cover_end: cover_end, padding: true)
        end
        Reline::IOGate.move_cursor_column x + pos
        Reline::IOGate.write "#{Reline::IOGate.reset_color_sequence}#{content}#{Reline::IOGate.reset_color_sequence}"
      end
      base_x += width
    end
    if old_levels.size > new_levels.size
      Reline::IOGate.move_cursor_column new_levels.size
      Reline::IOGate.erase_after_cursor
    end
  end

  # Calculate cursor position in word wrapped content.
  def wrapped_cursor_position
    prompt_width = calculate_width(prompt_list[@line_index], true)
    line_before_cursor = Reline::Unicode.escape_for_print(whole_lines[@line_index].byteslice(0, @byte_pointer))
    wrapped_line_before_cursor = split_line_by_width(' ' * prompt_width + line_before_cursor, screen_width)
    wrapped_cursor_y = wrapped_prompt_and_input_lines[0...@line_index].sum(&:size) + wrapped_line_before_cursor.size - 1
    wrapped_cursor_x = calculate_width(wrapped_line_before_cursor.last)
    [wrapped_cursor_x, wrapped_cursor_y]
  end

  def clear_dialogs
    @dialogs.each do |dialog|
      dialog.contents = nil
      dialog.trap_key = nil
    end
  end

  def update_dialogs(key = nil)
    wrapped_cursor_x, wrapped_cursor_y = wrapped_cursor_position
    @dialogs.each do |dialog|
      dialog.trap_key = nil
      update_each_dialog(dialog, wrapped_cursor_x, wrapped_cursor_y - screen_scroll_top, key)
    end
  end

  def render_finished
    Reline::IOGate.buffered_output do
      render_differential([], 0, 0)
      lines = @buffer_of_lines.size.times.map do |i|
        line = Reline::Unicode.strip_non_printing_start_end(prompt_list[i]) + modified_lines[i]
        wrapped_lines = split_line_by_width(line, screen_width)
        wrapped_lines.last.empty? ? "#{line} " : line
      end
      Reline::IOGate.write lines.map { |l| "#{l}\r\n" }.join
    end
  end

  def print_nomultiline_prompt
    Reline::IOGate.disable_auto_linewrap(true) if Reline::IOGate.win?
    # Readline's test `TestRelineAsReadline#test_readline` requires first output to be prompt, not cursor reset escape sequence.
    Reline::IOGate.write Reline::Unicode.strip_non_printing_start_end(@prompt) if @prompt && ruby/reline/unicode.rb000064400000051536150403134330010764 0ustar00m|
        new_lines << [[0, Reline::Unicode.calculate_width(item), item]]
      end
      @menu_info = nil # TODO: do not change state here
    end

    @dialogs.each_with_index do |dialog, index|
      next unless dialog.contents

      x_range, y_range = dialog_range dialog, wrapped_cursor_y - screen_scroll_top
      y_range.each do |row|
        next if row < 0 || row >= screen_height

        dialog_rows = new_lines[row] ||= []
        # index 0 is for prompt, index 1 is for line, index 2.. is for dialog
        dialog_rows[index + 2] = [x_range.begin, dialog.width, dialog.contents[row - y_range.begin]]
      end
    end

    Reline::IOGate.buffered_output do
      render_differential new_lines, wrapped_cursor_x, wrapped_cursor_y - screen_scroll_top
    end
  end

  # Reflects lines to be rendered and new cursor position to the screen
  # by calculating the difference from the previous render.

  private def render_differential(new_lines, new_cursor_x, new_cursor_y)
    Reline::IOGate.disable_auto_linewrap(true) if Reline::IOGate.win?
    rendered_lines = @rendered_screen.lines
    cursor_y = @rendered_screen.cursor_y
    if new_lines != rendered_lines
      # Hide cursor while rendering to avoid cursor flickering.
      Reline::IOGate.hide_cursor
      num_lines = [[new_lines.size, rendered_lines.size].max, screen_height].min
      if @rendered_screen.base_y + num_lines > screen_height
        Reline::IOGate.scroll_down(num_lines - cursor_y - 1)
        @rendered_screen.base_y = screen_height - num_lines
        cursor_y = num_lines - 1
      end
      num_lines.times do |i|
        rendered_line = rendered_lines[i] || []
        line_to_render = new_lines[i] || []
        next if rendered_line == line_to_render

        Reline::IOGate.move_cursor_down i - cursor_y
        cursor_y = i
        unless rendered_lines[i]
          Reline::IOGate.move_cursor_column 0
          Reline::IOGate.erase_after_cursor
        end
        render_line_differential(rendered_line, line_to_render)
      end
      @rendered_screen.lines = new_lines
      Reline::IOGate.show_cursor
    end
    Reline::IOGate.move_cursor_column new_cursor_x
    Reline::IOGate.move_cursor_down new_cursor_y - cursor_y
    @rendered_screen.cursor_y = new_cursor_y
  ensure
    Reline::IOGate.disable_auto_linewrap(false) if Reline::IOGate.win?
  end

  private def clear_rendered_screen_cache
    @rendered_screen.lines = []
    @rendered_screen.cursor_y = 0
  end

  def upper_space_height(wrapped_cursor_y)
    wrapped_cursor_y - screen_scroll_top
  end

  def rest_height(wrapped_cursor_y)
    screen_height - wrapped_cursor_y + screen_scroll_top - @rendered_screen.base_y - 1
  end

  def rerender
    render unless @in_pasting
  end

  class DialogProcScope
    CompletionJourneyData = Struct.new(:preposing, :postposing, :list, :pointer)

    def initialize(line_editor, config, proc_to_exec, context)
      @line_editor = line_editor
      @config = config
      @proc_to_exec = proc_to_exec
      @context = context
      @cursor_pos = Reline::CursorPos.new
    end

    def context
      @context
    end

    def retrieve_completion_block(_unused = false)
      preposing, target, postposing, _quote = @line_editor.retrieve_completion_block
      [preposing, target, postposing]
    end

    def call_completion_proc_with_checking_args(pre, target, post)
      @line_editor.call_completion_proc_with_checking_args(pre, target, post)
    end

    def set_dialog(dialog)
      @dialog = dialog
    end

    def dialog
      @dialog
    end

    def set_cursor_pos(col, row)
      @cursor_pos.x = col
      @cursor_pos.y = row
    end

    def set_key(key)
      @key = key
    end

    def key
      @key
    end

    def cursor_pos
      @cursor_pos
    end

    def just_cursor_moving
      @line_editor.instance_variable_get(:@just_cursor_moving)
    end

    def screen_width
      @line_editor.screen_width
    end

    def screen_height
      @line_editor.screen_height
    end

    def preferred_dialog_height
      _wrapped_cursor_x, wrapped_cursor_y = @line_editor.wrapped_cursor_position
      [@line_editor.upper_space_height(wrapped_cursor_y), @line_editor.rest_height(wrapped_cursor_y), (screen_height + 6) / 5].max
    end

    def completion_journey_data
      @line_editor.dialog_proc_scope_completion_journey_data
    end

    def config
      @config
    end

    def call
      instance_exec(&@proc_to_exec)
    end
  end

  class Dialog
    attr_reader :name, :contents, :width
    attr_accessor :scroll_top, :pointer, :column, :vertical_offset, :trap_key

    def initialize(name, config, proc_scope)
      @name = name
      @config = config
      @proc_scope = proc_scope
      @width = nil
      @scroll_top = 0
      @trap_key = nil
    end

    def set_cursor_pos(col, row)
      @proc_scope.set_cursor_pos(col, row)
    end

    def width=(v)
      @width = v
    end

    def contents=(contents)
      @contents = contents
      if contents and @width.nil?
        @width = contents.map{ |line| Reline::Unicode.calculate_width(line, true) }.max
      end
    end

    def call(key)
      @proc_scope.set_dialog(self)
      @proc_scope.set_key(key)
      dialog_render_info = @proc_scope.call
      if @trap_key
        if @trap_key.any?{ |i| i.is_a?(Array) } # multiple trap
          @trap_key.each do |t|
            @config.add_oneshot_key_binding(t, @name)
          end
        else
          @config.add_oneshot_key_binding(@trap_key, @name)
        end
      end
      dialog_render_info
    end
  end

  def add_dialog_proc(name, p, context = nil)
    dialog = Dialog.new(name, @config, DialogProcScope.new(self, @config, p, context))
    if index = @dialogs.find_index { |d| d.name == name }
      @dialogs[index] = dialog
    else
      @dialogs << dialog
    end
  end

  DIALOG_DEFAULT_HEIGHT = 20

  private def dialog_range(dialog, dialog_y)
    x_range = dialog.column...dialog.column + dialog.width
    y_range = dialog_y + dialog.vertical_offset...dialog_y + dialog.vertical_offset + dialog.contents.size
    [x_range, y_range]
  end

  private def update_each_dialog(dialog, cursor_column, cursor_row, key = nil)
    dialog.set_cursor_pos(cursor_column, cursor_row)
    dialog_render_info = dialog.call(key)
    if dialog_render_info.nil? or dialog_render_info.contents.nil? or dialog_render_info.contents.empty?
      dialog.contents = nil
      dialog.trap_key = nil
      return
    end
    contents = dialog_render_info.contents
    pointer = dialog.pointer
    if dialog_render_info.width
      dialog.width = dialog_render_info.width
    else
      dialog.width = contents.map { |l| calculate_width(l, true) }.max
    end
    height = dialog_render_info.height || DIALOG_DEFAULT_HEIGHT
    height = contents.size if contents.size < height
    if contents.size > height
      if dialog.pointer
        if dialog.pointer < 0
          dialog.scroll_top = 0
        elsif (dialog.pointer - dialog.scroll_top) >= (height - 1)
          dialog.scroll_top = dialog.pointer - (height - 1)
        elsif (dialog.pointer - dialog.scroll_top) < 0
          dialog.scroll_top = dialog.pointer
        end
        pointer = dialog.pointer - dialog.scroll_top
      else
        dialog.scroll_top = 0
      end
      contents = contents[dialog.scroll_top, height]
    end
    if dialog_render_info.scrollbar and dialog_render_info.contents.size > height
      bar_max_height = height * 2
      moving_distance = (dialog_render_info.contents.size - height) * 2
      position_ratio = dialog.scroll_top.zero? ? 0.0 : ((dialog.scroll_top * 2).to_f / moving_distance)
      bar_height = (bar_max_height * ((contents.size * 2).to_f / (dialog_render_info.contents.size * 2))).floor.to_i
      bar_height = MINIMUM_SCROLLBAR_HEIGHT if bar_height < MINIMUM_SCROLLBAR_HEIGHT
      scrollbar_pos = ((bar_max_height - bar_height) * position_ratio).floor.to_i
    else
      scrollbar_pos = nil
    end
    dialog.column = dialog_render_info.pos.x
    dialog.width += @block_elem_width if scrollbar_pos
    diff = (dialog.column + dialog.width) - screen_width
    if diff > 0
      dialog.column -= diff
    end
    if rest_height(screen_scroll_top + cursor_row) - dialog_render_info.pos.y >= height
      dialog.vertical_offset = dialog_render_info.pos.y + 1
    elsif cursor_row >= height
      dialog.vertical_offset = dialog_render_info.pos.y - height
    else
      dialog.vertical_offset = dialog_render_info.pos.y + 1
    end
    if dialog.column < 0
      dialog.column = 0
      dialog.width = screen_width
    end
    face = Reline::Face[dialog_render_info.face || :default]
    scrollbar_sgr = face[:scrollbar]
    default_sgr = face[:default]
    enhanced_sgr = face[:enhanced]
    dialog.contents = contents.map.with_index do |item, i|
      line_sgr = i == pointer ? enhanced_sgr : default_sgr
      str_width = dialog.width - (scrollbar_pos.nil? ? 0 : @block_elem_width)
      str, = Reline::Unicode.take_mbchar_range(item, 0, str_width, padding: true)
      colored_content = "#{line_sgr}#{str}"
      if scrollbar_pos
        if scrollbar_pos <= (i * 2) and (i * 2 + 1) < (scrollbar_pos + bar_height)
          colored_content + scrollbar_sgr + @full_block
        elsif scrollbar_pos <= (i * 2) and (i * 2) < (scrollbar_pos + bar_height)
          colored_content + scrollbar_sgr + @upper_half_block
        elsif scrollbar_pos <= (i * 2 + 1) and (i * 2) < (scrollbar_pos + bar_height)
          colored_content + scrollbar_sgr + @lower_half_block
        else
          colored_content + scrollbar_sgr + ' ' * @block_elem_width
        end
      else
        colored_content
      end
    end
  end

  private def modify_lines(before, complete)
    if after = @output_modifier_proc&.call("#{before.join("\n")}\n", complete: complete)
      after.lines("\n").map { |l| l.chomp('') }
    else
      before.map { |l| Reline::Unicode.escape_for_print(l) }
    end
  end

  def editing_mode
    @config.editing_mode
  end

  private def menu(list)
    @menu_info = MenuInfo.new(list)
  end

  private def filter_normalize_candidates(target, list)
    target = target.downcase if @config.completion_ignore_case
    list.select do |item|
      next unless item
      unless Encoding.compatible?(target.encoding, item.encoding)
        # Workaround for Readline test
        if defined?(::Readline) && ::Readline == ::Reline
          raise Encoding::CompatibilityError, "incompatible character encodings: #{target.encoding} and #{item.encoding}"
        end
      end

      if @config.completion_ignore_case
        item.downcase.start_with?(target)
      else
        item.start_with?(target)
      end
    end.map do |item|
      item.unicode_normalize
    rescue Encoding::CompatibilityError
      item
    end.uniq
  end

  private def perform_completion(preposing, target, postposing, quote, list)
    candidates = filter_normalize_candidates(target, list)

    case @completion_state
    when CompletionState::PERFECT_MATCH
      if @dig_perfect_match_proc
        @dig_perfect_match_proc.call(@perfect_matched)
        return
      end
    when CompletionState::MENU
      menu(candidates)
      return
    when CompletionState::MENU_WITH_PERFECT_MATCH
      menu(candidates)
      @completion_state = CompletionState::PERFECT_MATCH
      return
    end

    completed = Reline::Unicode.common_prefix(candidates, ignore_case: @config.completion_ignore_case)
    return if completed.empty?

    append_character = ''
    if candidates.include?(completed)
      if candidates.one?
        append_character = quote || completion_append_character.to_s
        @completion_state = CompletionState::PERFECT_MATCH
      elsif @config.show_all_if_ambiguous
        menu(candidates)
        @completion_state = CompletionState::PERFECT_MATCH
      else
        @completion_state = CompletionState::MENU_WITH_PERFECT_MATCH
      end
      @perfect_matched = completed
    else
      @completion_state = CompletionState::MENU
      menu(candidates) if @config.show_all_if_ambiguous
    end
    @buffer_of_lines[@line_index] = (preposing + completed + append_character + postposing).split("\n")[@line_index] || String.new(encoding: encoding)
    line_to_pointer = (preposing + completed + append_character).split("\n")[@line_index] || String.new(encoding: encoding)
    @byte_pointer = line_to_pointer.bytesize
  end

  def dialog_proc_scope_completion_journey_data
    return nil unless @completion_journey_state
    line_index = @completion_journey_state.line_index
    pre_lines = @buffer_of_lines[0...line_index].map { |line| line + "\n" }
    post_lines = @buffer_of_lines[(line_index + 1)..-1].map { |line| line + "\n" }
    DialogProcScope::CompletionJourneyData.new(
      pre_lines.join + @completion_journey_state.pre,
      @completion_journey_state.post + post_lines.join,
      @completion_journey_state.list,
      @completion_journey_state.pointer
    )
  end

  private def move_completed_list(direction)
    @completion_journey_state ||= retrieve_completion_journey_state
    return false unless @completion_journey_state

    if (delta = { up: -1, down: +1 }[direction])
      @completion_journey_state.pointer = (@completion_journey_state.pointer + delta) % @completion_journey_state.list.size
    end
    completed = @completion_journey_state.list[@completion_journey_state.pointer]
    set_current_line(@completion_journey_state.pre + completed + @completion_journey_state.post, @completion_journey_state.pre.bytesize + completed.bytesize)
    true
  end

  private def retrieve_completion_journey_state
    preposing, target, postposing, quote = retrieve_completion_block
    list = call_completion_proc(preposing, target, postposing, quote)
    return unless list.is_a?(Array)

    candidates = list.select{ |item| item.start_with?(target) }
    return if candidates.empty?

    pre = preposing.split("\n", -1).last || ''
    post = postposing.split("\n", -1).first || ''
    CompletionJourneyState.new(
      @line_index, pre, target, post, [target] + candidates, 0
    )
  end

  private def run_for_operators(key, method_symbol, &block)
    if @vi_waiting_operator
      if VI_MOTIONS.include?(method_symbol)
        old_byte_pointer = @byte_pointer
        @vi_arg = (@vi_arg || 1) * @vi_waiting_operator_arg
        block.(true)
        unless @waiting_proc
          byte_pointer_diff = @byte_pointer - old_byte_pointer
          @byte_pointer = old_byte_pointer
          method_obj = method(@vi_waiting_operator)
          wrap_method_call(@vi_waiting_operator, method_obj, byte_pointer_diff)
          cleanup_waiting
        end
      else
        # Ignores operator when not motion is given.
        block.(false)
        cleanup_waiting
      end
      @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 @vi_waiting_operator.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 cleanup_waiting
    @waiting_proc = nil
    @vi_waiting_operator = nil
    @vi_waiting_operator_arg = nil
    @searching_prompt = nil
    @drop_terminate_spaces = false
  end

  ARGUMENT_DIGIT_METHODS = %i[ed_digit vi_zero ed_argument_digit]
  VI_WAITING_ACCEPT_METHODS = %i[vi_change_meta vi_delete_meta vi_yank ed_insert ed_argument_digit]

  private def process_key(key, method_symbol)
    if @waiting_proc
      cleanup_waiting unless key.size == 1
    end
    if @vi_waiting_operator
      cleanup_waiting unless VI_WAITING_ACCEPT_METHODS.include?(method_symbol) || VI_MOTIONS.include?(method_symbol)
    end

    if @waiting_proc
      old_byte_pointer = @byte_pointer
      @waiting_proc.call(key)
      if @vi_waiting_operator
        byte_pointer_diff = @byte_pointer - old_byte_pointer
        @byte_pointer = old_byte_pointer
        method_obj = method(@vi_waiting_operator)
        wrap_method_call(@vi_waiting_operator, method_obj, byte_pointer_diff)
        cleanup_waiting
      end
      @kill_ring.process
      return
    end

    # Reject multibyte input (converted to ed_insert) in vi_command mode
    return if method_symbol == :ed_insert && @config.editing_mode_is?(:vi_command)

    if method_symbol and respond_to?(method_symbol, true)
      method_obj = method(method_symbol)
    end
    if @vi_arg
      if ARGUMENT_DIGIT_METHODS.include?(method_symbol)
        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 method_obj
          wrap_method_call(method_symbol, method_obj, key)
        end
        @kill_ring.process
        @vi_arg = nil
      end
    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
    end
  end

  def update(key)
    modified = input_key(key)
    unless @in_pasting
      scroll_into_view
      @just_cursor_moving = !modified
      update_dialogs(key)
      @just_cursor_moving = false
    end
  end

  def input_key(key)
    save_old_buffer
    @config.reset_oneshot_key_bindings
    if key.char.nil?
      process_insert(force: true)
      @eof = buffer_empty?
      finish
      return
    end
    @dialogs.each do |dialog|
      if key.method_symbol == dialog.name
        return
      end
    end
    @completion_occurs = false

    process_key(key.char, key.method_symbol)
    if @config.editing_mode_is?(:vi_command) and @byte_pointer > 0 and @byte_pointer == current_line.bytesize
      byte_size = Reline::Unicode.get_prev_mbchar_size(@buffer_of_lines[@line_index], @byte_pointer)
      @byte_pointer -= byte_size
    end

    @prev_action_state, @next_action_state = @next_action_state, NullActionState

    unless @completion_occurs
      @completion_state = CompletionState::NORMAL
      @completion_journey_state = nil
    end

    push_input_lines unless @restoring
    @restoring = false

    if @in_pasting
      clear_dialogs
      return
    end

    modified = @old_buffer_of_lines != @buffer_of_lines
    if !@completion_occurs && modified && !@config.disable_completion && @config.autocompletion
      # Auto complete starts only when edited
      process_insert(force: true)
      @completion_journey_state = retrieve_completion_journey_state
    end
    modified
  end

  def save_old_buffer
    @old_buffer_of_lines = @buffer_of_lines.dup
  end

  def push_input_lines
    if @old_buffer_of_lines == @buffer_of_lines
      @input_lines[@input_lines_position] = [@buffer_of_lines.dup, @byte_pointer, @line_index]
    else
      @input_lines = @input_lines[0..@input_lines_position]
      @input_lines_position += 1
      @input_lines.push([@buffer_of_lines.dup, @byte_pointer, @line_index])
    end
    trim_input_lines
  end

  MAX_INPUT_LINES = 100
  def trim_input_lines
    if @input_lines.size > MAX_INPUT_LINES
      @input_lines.shift
      @input_lines_position -= 1
    end
  end

  def scroll_into_view
    _wrapped_cursor_x, wrapped_cursor_y = wrapped_cursor_position
    if wrapped_cursor_y < screen_scroll_top
      @scroll_partial_screen = wrapped_cursor_y
    end
    if wrapped_cursor_y >= screen_scroll_top + screen_height
      @scroll_partial_screen = wrapped_cursor_y - screen_height + 1
    end
  end

  def call_completion_proc(pre, target, post, quote)
    Reline.core.instance_variable_set(:@completion_quote_character, quote)
    result = call_completion_proc_with_checking_args(pre, target, post)
    Reline.core.instance_variable_set(:@completion_quote_character, nil)
    result
  end

  def call_completion_proc_with_checking_args(pre, target, post)
    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, pre)
      when 3..Float::INFINITY
        result = @completion_proc.(target, pre, post)
      end
    end
    result
  end

  private def process_auto_indent(line_index = @line_index, cursruby/reline/kill_ring.rb000064400000004613150403134330011302 0ustar00nes.join("\n") unless eof?
  end

  def current_line
    @buffer_of_lines[@line_index]
  end

  def set_current_line(line, byte_pointer = nil)
    cursor = current_byte_pointer_cursor
    @buffer_of_lines[@line_index] = line
    if byte_pointer
      @byte_pointer = byte_pointer
    else
      calculate_nearest_cursor(cursor)
    end
    process_auto_indent
  end

  def retrieve_completion_block
    quote_characters = Reline.completer_quote_characters
    before = current_line.byteslice(0, @byte_pointer).grapheme_clusters
    quote = nil
    # Calcualte closing quote when cursor is at the end of the line
    if current_line.bytesize == @byte_pointer && !quote_characters.empty?
      escaped = false
      before.each do |c|
        if escaped
          escaped = false
          next
        elsif c == '\\'
          escaped = true
        elsif quote
          quote = nil if c == quote
        elsif quote_characters.include?(c)
          quote = c
        end
      end
    end

    word_break_characters = quote_characters + Reline.completer_word_break_characters
    break_index = before.rindex { |c| word_break_characters.include?(c) || quote_characters.include?(c) } || -1
    preposing = before.take(break_index + 1).join
    target = before.drop(break_index + 1).join
    postposing = current_line.byteslice(@byte_pointer, current_line.bytesize - @byte_pointer)
    lines = whole_lines
    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
    [preposing.encode(encoding), target.encode(encoding), postposing.encode(encoding), quote&.encode(encoding)]
  end

  def confirm_multiline_termination
    temp_buffer = @buffer_of_lines.dup
    @confirm_multiline_termination_proc.(temp_buffer.join("\n") + "\n")
  end

  def insert_multiline_text(text)
    pre = @buffer_of_lines[@line_index].byteslice(0, @byte_pointer)
    post = @buffer_of_lines[@line_index].byteslice(@byte_pointer..)
    lines = (pre + Reline::Unicode.safe_encode(text, encoding).gsub(/\r\n?/, "\n") + post).split("\n", -1)
    lines << '' if lines.empty?
    @buffer_of_lines[@line_index, 1] = lines
    @line_index += lines.size - 1
    @byte_pointer = @buffer_of_lines[@line_index].bytesize - post.bytesize
  end

  def insert_text(text)
    if @buffer_of_lines[@line_index].byruby/reline/ansi.rb000064400000022210150403134330010253 0ustar00lines.size - 1)
        @buffer_of_lines.delete_at(@line_index)
        @byte_pointer = 0
      end
    elsif not start.nil? and not length.nil?
      if current_line
        before = current_line.byteslice(0, start)
        after = current_line.byteslice(start + length, current_line.bytesize)
        set_current_line(before + after)
      end
    elsif start.is_a?(Range)
      range = start
      first = range.first
      last = range.last
      last = current_line.bytesize - 1 if last > current_line.bytesize
      last += current_line.bytesize if last < 0
      first += current_line.bytesize if first < 0
      range = range.exclude_end? ? first...last : first..last
      line = current_line.bytes.reject.with_index{ |c, i| range.include?(i) }.map{ |c| c.chr(Encoding::ASCII_8BIT) }.join.force_encoding(encoding)
      set_current_line(line)
    else
      set_current_line(current_line.byteslice(0, start))
    end
  end

  def byte_pointer=(val)
    @byte_pointer = val
  end

  def whole_lines
    @buffer_of_lines.dup
  end

  def whole_buffer
    whole_lines.join("\n")
  end

  private def buffer_empty?
    current_line.empty? and @buffer_of_lines.size == 1
  end

  def finished?
    @finished
  end

  def finish
    @finished = 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)
      ed_delete_next_char(key)
    elsif @config.editing_mode_is?(:emacs)
      em_delete(key)
    end
  end

  private def key_newline(key)
    if @is_multiline
      next_line = current_line.byteslice(@byte_pointer, current_line.bytesize - @byte_pointer)
      cursor_line = current_line.byteslice(0, @byte_pointer)
      insert_new_line(cursor_line, next_line)
    end
  end

  private def complete(_key)
    return if @config.disable_completion

    process_insert(force: true)
    if @config.autocompletion
      @completion_state = CompletionState::NORMAL
      @completion_occurs = move_completed_list(:down)
    else
      @completion_journey_state = nil
      pre, target, post, quote = retrieve_completion_block
      result = call_completion_proc(pre, target, post, quote)
      if result.is_a?(Array)
        @completion_occurs = true
        perform_completion(pre, target, post, quote, result)
      end
    end
  end

  private def completion_journey_move(direction)
    return if @config.disable_completion

    process_insert(force: true)
    @completion_state = CompletionState::NORMAL
    @completion_occurs = move_completed_list(direction)
  end

  private def menu_complete(_key)
    completion_journey_move(:down)
  end

  private def menu_complete_backward(_key)
    completion_journey_move(:up)
  end

  private def completion_journey_up(_key)
    completion_journey_move(:up) if @config.autocompletion
  end

  # Editline:: +ed-unassigned+ This  editor command always results in an error.
  # GNU Readline:: There is no corresponding macro.
  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)
    insert_text(@continuous_insertion_buffer)
    @continuous_insertion_buffer.clear
  end

  # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters)
  #            In insert mode, insert the input character left of the cursor
  #            position. In replace mode, overwrite the character at the
  #            cursor and move the cursor to the right by one character
  #            position. Accept an argument to do this repeatedly. It is an
  #            error if the input character is the NUL character (+Ctrl-@+).
  #            Failure to enlarge the edit buffer also results in an error.
  # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append
  #            the input digit to the argument being read. Otherwise, call
  #            +ed-insert+. It is an error if the input character is not a
  #            digit or if the existing argument is already greater than a
  #            million.
  # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself.
  private def ed_insert(str)
    begin
      str.encode(Encoding::UTF_8)
    rescue Encoding::UndefinedConversionError
      return
    end
    if @in_pasting
      @continuous_insertion_buffer << str
      return
    elsif not @continuous_insertion_buffer.empty?
      process_insert
    end

    insert_text(str)
  end
  alias_method :ed_digit, :ed_insert
  alias_method :self_insert, :ed_insert

  private def insert_raw_char(str, arg: 1)
    arg.times do
      if str == "\C-j" or str == "\C-m"
        key_newline(str)
      elsif str != "\0"
        # Ignore NUL.
        ed_insert(str)
      end
    end
  end

  private def ed_next_char(key, arg: 1)
    byte_size = Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer)
    if (@byte_pointer < current_line.bytesize)
      @byte_pointer += byte_size
    elsif @config.editing_mode_is?(:emacs) and @byte_pointer == current_line.bytesize and @line_index < @buffer_of_lines.size - 1
      @byte_pointer = 0
      @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 @byte_pointer > 0
      byte_size = Reline::Unicode.get_prev_mbchar_size(current_line, @byte_pointer)
      @byte_pointer -= byte_size
    elsif @config.editing_mode_is?(:emacs) and @byte_pointer == 0 and @line_index > 0
      @line_index -= 1
      @byte_pointer = current_line.bytesize
    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 = Reline::Unicode.vi_first_print(current_line)
  end

  private def ed_move_to_beg(key)
    @byte_pointer = 0
  end
  alias_method :beginning_of_line, :ed_move_to_beg
  alias_method :vi_zero, :ed_move_to_beg

  private def ed_move_to_end(key)
    @byte_pointer = current_line.bytesize
  end
  alias_method :end_of_line, :ed_move_to_end

  private def generate_searcher(search_key)
    search_word = String.new(encoding: encoding)
    hit_pointer = nil
    lambda do |key|
      search_again = false
      case key
      when "\C-h", "\C-?"
        grapheme_clusters = search_word.grapheme_clusters
        if grapheme_clusters.size > 0
          grapheme_clusters.pop
          search_word = grapheme_clusters.join
        end
      when "\C-r", "\C-s"
        search_again = true if search_key == key
        search_key = key
      else
        search_word << key
      end
      hit = nil
      if not search_word.empty? and @line_backup_in_history&.include?(search_word)
        hit_pointer = Reline::HISTORY.size
        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 search_key
            when "\C-r"
              history_pointer_base = 0
              history = Reline::HISTORY[0..(@history_pointer - 1)]
            when "\C-s"
              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 search_key
          when "\C-r"
            history_pointer_base = 0
            history = Reline::HISTORY[0..@history_pointer]
          when "\C-s"
            history_pointer_base = @history_pointer
            history = Reline::HISTORY[@history_pointer..-1]
          end
        else
          history_pointer_base = 0
          history = Reline::HISTORY
        end
        case search_key
        when "\C-r"
          hit_index = history.rindex { |item|
            item.include?(search_word)
          }
        when "\C-s"
          hit_index = history.index { |item|
            item.include?(search_word)
          }
        end
        if hit_index
          hit_pointer = history_pointer_base + hit_index
          hit = Reline::HISTORY[hit_pointer]
        end
      end
      case search_key
      when "\C-r"
        prompt_name = 'reverse-i-search'
      when "\C-s"
        prompt_name = 'i-search'
      end
      prompt_name = "failed #{prompt_name}" unless hit
      [search_word, prompt_name, hit_pointer]
    end
  end

  private def incremental_search_history(key)
    backup = @buffer_of_lines.dup, @line_index, @byte_pointer, @history_pointer, @line_backup_in_history
    searcher = generate_searcher(key)
    @searching_prompt = "(reverse-i-search)`': "
    termination_keys = ["\C-j"]
    termination_keys.concat(@config.isearcruby/reline/config.rb000064400000024726150403134330010604 0ustar00t)
        @searching_prompt = nil
        @waiting_proc = nil
      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 search_history(prefix, pointer_range)
    pointer_range.each do |pointer|
      lines = Reline::HISTORY[pointer].split("\n")
      lines.each_with_index do |line, index|
        return [pointer, index] if line.start_with?(prefix)
      end
    end
    nil
  end

  private def ed_search_prev_history(key, arg: 1)
    substr = prev_action_state_value(:search_history) == :empty ? '' : current_line.byteslice(0, @byte_pointer)
    return if @history_pointer == 0
    return if @history_pointer.nil? && substr.empty? && !current_line.empty?

    history_range = 0...(@history_pointer || Reline::HISTORY.size)
    h_pointer, line_index = search_history(substr, history_range.reverse_each)
    return unless h_pointer
    move_history(h_pointer, line: line_index || :start, cursor: substr.empty? ? :end : @byte_pointer)
    arg -= 1
    set_next_action_state(:search_history, :empty) if substr.empty?
    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 = prev_action_state_value(:search_history) == :empty ? '' : current_line.byteslice(0, @byte_pointer)
    return if @history_pointer.nil?

    history_range = @history_pointer + 1...Reline::HISTORY.size
    h_pointer, line_index = search_history(substr, history_range)
    return if h_pointer.nil? and not substr.empty?

    move_history(h_pointer, line: line_index || :start, cursor: substr.empty? ? :end : @byte_pointer)
    arg -= 1
    set_next_action_state(:search_history, :empty) if substr.empty?
    ed_search_next_history(key, arg: arg) if arg > 0
  end
  alias_method :history_search_forward, :ed_search_next_history

  private def move_history(history_pointer, line:, cursor:)
    history_pointer ||= Reline::HISTORY.size
    return if history_pointer < 0 || history_pointer > Reline::HISTORY.size
    old_history_pointer = @history_pointer || Reline::HISTORY.size
    if old_history_pointer == Reline::HISTORY.size
      @line_backup_in_history = whole_buffer
    else
      Reline::HISTORY[old_history_pointer] = whole_buffer
    end
    if history_pointer == Reline::HISTORY.size
      buf = @line_backup_in_history
      @history_pointer = @line_backup_in_history = nil
    else
      buf = Reline::HISTORY[history_pointer]
      @history_pointer = history_pointer
    end
    @buffer_of_lines = buf.split("\n")
    @buffer_of_lines = [String.new(encoding: encoding)] if @buffer_of_lines.empty?
    @line_index = line == :start ? 0 : line == :end ? @buffer_of_lines.size - 1 : line
    @byte_pointer = cursor == :start ? 0 : cursor == :end ? current_line.bytesize : cursor
  end

  private def ed_prev_history(key, arg: 1)
    if @line_index > 0
      cursor = current_byte_pointer_cursor
      @line_index -= 1
      calculate_nearest_cursor(cursor)
      return
    end
    move_history(
      (@history_pointer || Reline::HISTORY.size) - 1,
      line: :end,
      cursor: @config.editing_mode_is?(:vi_command) ? :start : :end,
    )
    arg -= 1
    ed_prev_history(key, arg: arg) if arg > 0
  end
  alias_method :previous_history, :ed_prev_history

  private def ed_next_history(key, arg: 1)
    if @line_index < (@buffer_of_lines.size - 1)
      cursor = current_byte_pointer_cursor
      @line_index += 1
      calculate_nearest_cursor(cursor)
      return
    end
    move_history(
      (@history_pointer || Reline::HISTORY.size) + 1,
      line: :start,
      cursor: @config.editing_mode_is?(:vi_command) ? :start : :end,
    )
    arg -= 1
    ed_next_history(key, arg: arg) if arg > 0
  end
  alias_method :next_history, :ed_next_history

  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?
          @line_index = @buffer_of_lines.size - 1
          @byte_pointer = current_line.bytesize
          finish
        end
      end
    else
      finish
    end
  end

  private def em_delete_prev_char(key, arg: 1)
    arg.times do
      if @byte_pointer == 0 and @line_index > 0
        @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
      elsif @byte_pointer > 0
        byte_size = Reline::Unicode.get_prev_mbchar_size(current_line, @byte_pointer)
        line, = byteslice!(current_line, @byte_pointer - byte_size, byte_size)
        set_current_line(line, @byte_pointer - byte_size)
      end
    end
    process_auto_indent
  end
  alias_method :backward_delete_char, :em_delete_prev_char

  # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+,
  #            +Ctrl-U+) + Kill from the cursor to the end of the line.
  # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of
  #                the line. With a negative numeric argument, kill backward
  #                from the cursor to the beginning of the current line.
  private def ed_kill_line(key)
    if current_line.bytesize > @byte_pointer
      line, deleted = byteslice!(current_line, @byte_pointer, current_line.bytesize - @byte_pointer)
      set_current_line(line, line.bytesize)
      @kill_ring.append(deleted)
    elsif @byte_pointer == current_line.bytesize and @buffer_of_lines.size > @line_index + 1
      set_current_line(current_line + @buffer_of_lines.delete_at(@line_index + 1), current_line.bytesize)
    end
  end
  alias_method :kill_line, :ed_kill_line

  # Editline:: +vi_change_to_eol+ (vi command: +C+) + Kill and change from the cursor to the end of the line.
  private def vi_change_to_eol(key)
    ed_kill_line(key)

    @config.editing_mode = :vi_insert
  end

  # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the
  #            beginning  of the edit buffer to the cursor and save it to the
  #            cut buffer.
  # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor
  #                to the beginning of the current line.
  private def vi_kill_line_prev(key)
    if @byte_pointer > 0
      line, deleted = byteslice!(current_line, 0, @byte_pointer)
      set_current_line(line, 0)
      @kill_ring.append(deleted, true)
    end
  end
  alias_method :unix_line_discard, :vi_kill_line_prev

  # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the
  #            edit buffer and save it to the cut buffer. +vi-kill-line-prev+
  # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the
  #                current line, no matter where point is.
  private def em_kill_line(key)
    if current_line.size > 0
      @kill_ring.append(current_line.dup, true)
      set_current_line('', 0)
    end
  end
  alias_method :kill_whole_line, :em_kill_line

  private def em_delete(key)
    if buffer_empty? and key == "\C-d"
      @eof = true
      finish
    elsif @byte_pointer < current_line.bytesize
      splitted_last = current_line.byteslice(@byte_pointer, current_line.bytesize)
      mbchar = splitted_last.grapheme_clusters.first
      line, = byteslice!(current_line, @byte_pointer, mbchar.bytesize)
      set_current_line(line)
    elsif @byte_pointer == current_line.bytesize and @buffer_of_lines.size > @line_index + 1
      set_current_line(current_line + @buffer_of_lines.delete_at(@line_index + 1), current_line.bytesize)
    end
  end
  alias_method :delete_char, :em_delete

  private def em_delete_or_list(key)
    if current_line.empty? or @byte_pointer < current_line.bytesize
      em_delete(key)
    elsif !@config.autocompletion # show completed list
      pre, target, post, quote = retrieve_completion_block
      result = call_completion_proc(pre, target, post, quote)
      if result.is_a?(Array)
        candidates = filter_normalize_candidates(target, result)
        menu(candidates)
      end
    end
  end
  alias_method :delete_char_or_list, :em_delete_or_list

  private def em_yank(key)
    yanked = @kill_ring.yank
    insert_text(yanked) if yanked
  end
  alias_method :yank, :em_yank

  private def em_yank_pop(key)
    yanked, prev_yank = @kill_ring.yank_pop
    if yanked
      line, = byteslice!(current_line, @byte_pointer - prev_yank.bytesize, prev_yank.bytesize)
      set_current_line(line, @byte_pointer - prev_yank.bytesize)
      insert_text(yanked)
    end
  end
  alias_method :yank_pop, :em_yank_pop

  private def ed_clear_screen(key)
    Reline::IOGate.clear_screen
    @screen_size = Reline::IOGate.get_screen_size
    @rendered_screen.base_y = 0
    clear_rendered_screen_cache
  end
  alias_method :clear_screen, :ed_clear_screen

  private def em_next_word(key)
    if current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
      @byte_pointer += byte_size
    end
  end
  alias_method :forward_word, :em_next_word

  private def ed_prev_word(key)
    if @byte_pointer > 0
      byte_size = Reline::Unicode.em_backward_word(current_line, @byte_pointer)
      @byte_pointer -= byte_size
    end
  end
  alias_method :backward_word, :ed_prev_word

  private def em_delete_next_word(key)
    if current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
      line, word = byteslice!(current_line, @byte_pointer, byte_size)
      set_current_line(line)
      @kill_ring.append(word)
    end
  end
  alias_method :kill_word, :em_delete_next_word

  private def ed_delete_prev_word(key)
    if @byte_pointer > 0
      byte_size = Reline::Unicode.em_backward_word(current_line, @byte_pointer)
      line, word = byteslice!(current_line, @byte_pointer - byte_size, byte_size)
      set_current_line(line, @byte_pointer - byte_size)
      @kill_ring.append(word, true)
    end
  end
  alias_method :backward_kill_word, :ed_delete_prev_word

  private def ed_transpose_chars(key)
 ruby/reline/terminfo.rb000064400000012564150403134330011157 0ustar00teslice!(current_line, back2_pointer, back2_byte_size)
        set_current_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(current_line, @byte_pointer)
    before = current_line.byteslice(0, left_word_start)
    left_word = current_line.byteslice(left_word_start, middle_start - left_word_start)
    middle = current_line.byteslice(middle_start, right_word_start - middle_start)
    right_word = current_line.byteslice(right_word_start, after_start - right_word_start)
    after = current_line.byteslice(after_start, current_line.bytesize - after_start)
    return if left_word.empty? or right_word.empty?
    from_head_to_left_word = before + right_word + middle + left_word
    set_current_line(from_head_to_left_word + after, from_head_to_left_word.bytesize)
  end
  alias_method :transpose_words, :ed_transpose_words

  private def em_capitol_case(key)
    if current_line.bytesize > @byte_pointer
      byte_size, new_str = Reline::Unicode.em_forward_word_with_capitalization(current_line, @byte_pointer)
      before = current_line.byteslice(0, @byte_pointer)
      after = current_line.byteslice((@byte_pointer + byte_size)..-1)
      set_current_line(before + new_str + after, @byte_pointer + new_str.bytesize)
    end
  end
  alias_method :capitalize_word, :em_capitol_case

  private def em_lower_case(key)
    if current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
      part = current_line.byteslice(@byte_pointer, byte_size).grapheme_clusters.map { |mbchar|
        mbchar =~ /[A-Z]/ ? mbchar.downcase : mbchar
      }.join
      rest = current_line.byteslice((@byte_pointer + byte_size)..-1)
      line = current_line.byteslice(0, @byte_pointer) + part
      set_current_line(line + rest, line.bytesize)
    end
  end
  alias_method :downcase_word, :em_lower_case

  private def em_upper_case(key)
    if current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.em_forward_word(current_line, @byte_pointer)
      part = current_line.byteslice(@byte_pointer, byte_size).grapheme_clusters.map { |mbchar|
        mbchar =~ /[a-z]/ ? mbchar.upcase : mbchar
      }.join
      rest = current_line.byteslice((@byte_pointer + byte_size)..-1)
      line = current_line.byteslice(0, @byte_pointer) + part
      set_current_line(line + rest, line.bytesize)
    end
  end
  alias_method :upcase_word, :em_upper_case

  private def em_kill_region(key)
    if @byte_pointer > 0
      byte_size = Reline::Unicode.em_big_backward_word(current_line, @byte_pointer)
      line, deleted = byteslice!(current_line, @byte_pointer - byte_size, byte_size)
      set_current_line(line, @byte_pointer - byte_size)
      @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 current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.vi_forward_word(current_line, @byte_pointer, @drop_terminate_spaces)
      @byte_pointer += byte_size
    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 = Reline::Unicode.vi_backward_word(current_line, @byte_pointer)
      @byte_pointer -= byte_size
    end
    arg -= 1
    vi_prev_word(key, arg: arg) if arg > 0
  end

  private def vi_end_word(key, arg: 1, inclusive: false)
    if current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.vi_forward_end_word(current_line, @byte_pointer)
      @byte_pointer += byte_size
    end
    arg -= 1
    if inclusive and arg.zero?
      byte_size = Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer)
      if byte_size > 0
        @byte_pointer += byte_size
      end
    end
    vi_end_word(key, arg: arg) if arg > 0
  end

  private def vi_next_big_word(key, arg: 1)
    if current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.vi_big_forward_word(current_line, @byte_pointer)
      @byte_pointer += byte_size
    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 = Reline::Unicode.vi_big_backward_word(current_line, @byte_pointer)
      @byte_pointer -= byte_size
    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 current_line.bytesize > @byte_pointer
      byte_size = Reline::Unicode.vi_big_forward_end_word(current_line, @byte_pointer)
      @byte_pointer += byte_size
    end
    arg -= 1
    if inclusive and arg.zero?
      byte_size = Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer)
      if byte_size > 0
        @byte_pointer += byte_size
   ruby/racc/grammarfileparser.rb000064400000035477150403134330012501 0ustar00t_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 @byte_pointer > 0
        byte_size = Reline::Unicode.get_prev_mbchar_size(current_line, @byte_pointer)
        @byte_pointer -= byte_size
        line, mbchar = byteslice!(current_line, @byte_pointer, byte_size)
        set_current_line(line)
        deleted.prepend(mbchar)
      end
    end
    copy_for_vi(deleted)
  end

  private def vi_change_meta(key, arg: nil)
    if @vi_waiting_operator
      set_current_line('', 0) if @vi_waiting_operator == :vi_change_meta_confirm && arg.nil?
      @vi_waiting_operator = nil
      @vi_waiting_operator_arg = nil
    else
      @drop_terminate_spaces = true
      @vi_waiting_operator = :vi_change_meta_confirm
      @vi_waiting_operator_arg = arg || 1
    end
  end

  private def vi_change_meta_confirm(byte_pointer_diff)
    vi_delete_meta_confirm(byte_pointer_diff)
    @config.editing_mode = :vi_insert
    @drop_terminate_spaces = false
  end

  private def vi_delete_meta(key, arg: nil)
    if @vi_waiting_operator
      set_current_line('', 0) if @vi_waiting_operator == :vi_delete_meta_confirm && arg.nil?
      @vi_waiting_operator = nil
      @vi_waiting_operator_arg = nil
    else
      @vi_waiting_operator = :vi_delete_meta_confirm
      @vi_waiting_operator_arg = arg || 1
    end
  end

  private def vi_delete_meta_confirm(byte_pointer_diff)
    if byte_pointer_diff > 0
      line, cut = byteslice!(current_line, @byte_pointer, byte_pointer_diff)
    elsif byte_pointer_diff < 0
      line, cut = byteslice!(current_line, @byte_pointer + byte_pointer_diff, -byte_pointer_diff)
    else
      return
    end
    copy_for_vi(cut)
    set_current_line(line, @byte_pointer + (byte_pointer_diff < 0 ? byte_pointer_diff : 0))
  end

  private def vi_yank(key, arg: nil)
    if @vi_waiting_operator
      copy_for_vi(current_line) if @vi_waiting_operator == :vi_yank_confirm && arg.nil?
      @vi_waiting_operator = nil
      @vi_waiting_operator_arg = nil
    else
      @vi_waiting_operator = :vi_yank_confirm
      @vi_waiting_operator_arg = arg || 1
    end
  end

  private def vi_yank_confirm(byte_pointer_diff)
    if byte_pointer_diff > 0
      cut = current_line.byteslice(@byte_pointer, byte_pointer_diff)
    elsif byte_pointer_diff < 0
      cut = current_line.byteslice(@byte_pointer + byte_pointer_diff, -byte_pointer_diff)
    else
      return
    end
    copy_for_vi(cut)
  end

  private def vi_list_or_eof(key)
    if buffer_empty?
      @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(current_line, @byte_pointer)
    unless current_line.empty? || byte_size == 0
      line, mbchar = byteslice!(current_line, @byte_pointer, byte_size)
      copy_for_vi(mbchar)
      if @byte_pointer > 0 && current_line.bytesize == @byte_pointer + byte_size
        byte_size = Reline::Unicode.get_prev_mbchar_size(line, @byte_pointer)
        set_current_line(line, @byte_pointer - byte_size)
      else
        set_current_line(line, @byte_pointer)
      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
    move_history(0, line: :start, cursor: :start)
  end

  private def vi_histedit(key)
    path = Tempfile.open { |fp|
      fp.write whole_lines.join("\n")
      fp.path
    }
    system("#{ENV['EDITOR']} #{path}")
    @buffer_of_lines = File.read(path).split("\n")
    @buffer_of_lines = [String.new(encoding: encoding)] if @buffer_of_lines.empty?
    @line_index = 0
    finish
  end

  private def vi_paste_prev(key, arg: 1)
    if @vi_clipboard.size > 0
      cursor_point = @vi_clipboard.grapheme_clusters[0..-2].join
      set_current_line(byteinsert(current_line, @byte_pointer, @vi_clipboard), @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(current_line, @byte_pointer)
      line = byteinsert(current_line, @byte_pointer + byte_size, @vi_clipboard)
      set_current_line(line, @byte_pointer + @vi_clipboard.bytesize)
    end
    arg -= 1
    vi_paste_next(key, arg: arg) if arg > 0
  end

  private def ed_argument_digit(key)
    # key is expected to be `ESC digit` or `digit`
    num = key[/\d/].to_i
    @vi_arg = (@vi_arg || 0) * 10 + num
  end

  private def vi_to_column(key, arg: 0)
    # Implementing behavior of vi, not Readline's vi-mode.
    @byte_pointer, = current_line.grapheme_clusters.inject([0, 0]) { |(total_byte_size, total_width), gc|
      mbchar_width = Reline::Unicode.get_mbchar_width(gc)
      break [total_byte_size, total_width] if (total_width + mbchar_width) >= arg
      [total_byte_size + gc.bytesize, total_width + mbchar_width]
    }
  end

  private def vi_replace_char(key, arg: 1)
    @waiting_proc = ->(k) {
      if arg == 1
        byte_size = Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer)
        before = current_line.byteslice(0, @byte_pointer)
        remaining_point = @byte_pointer + byte_size
        after = current_line.byteslice(remaining_point, current_line.bytesize - remaining_point)
        set_current_line(before + k + after)
        @waiting_proc = nil
      elsif arg > 1
        byte_size = 0
        arg.times do
          byte_size += Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer + byte_size)
        end
        before = current_line.byteslice(0, @byte_pointer)
        remaining_point = @byte_pointer + byte_size
        after = current_line.byteslice(remaining_point, current_line.bytesize - remaining_point)
        replaced = k * arg
        set_current_line(before + replaced + after, @byte_pointer + replaced.bytesize)
        @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)
    prev_total = nil
    total = nil
    found = false
    current_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 key == 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, _ = total
      @byte_pointer += byte_size
    elsif need_prev_char and found and prev_total
      byte_size, _ = prev_total
      @byte_pointer += byte_size
    end
    if inclusive
      byte_size = Reline::Unicode.get_next_mbchar_size(current_line, @byte_pointer)
      if byte_size > 0
        @byte_pointer += byte_size
      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)
    prev_total = nil
    total = nil
    found = false
    current_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 key == 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, _ = total
      @byte_pointer -= byte_size
    elsif need_next_char and found and prev_total
      byte_size, _ = prev_total
      @byte_pointer -= byte_size
    end
    @waiting_proc = nil
  end

  private def vi_join_lines(key, arg: 1)
    if @buffer_of_lines.size > @line_index + 1
      next_line = @buffer_of_lines.delete_at(@line_index + 1).lstrip
      set_current_line(current_line + ' ' + next_line, current_line.bytesize)
    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]
    @byte_pointer, @line_index = @mark_pointer
    @mark_pointer = new_pointer
  end
  alias_method :exchange_point_and_mark, :em_exchange_mark

  private def emacs_editing_mode(key)
    @config.editing_mode = :emacs
  end

  private def vi_editing_mode(key)
    @config.editing_mode = :vi_insert
  end

  private def move_undo_redo(direction)
    @restoring = true
    return unless (0..@input_lines.size - 1).cover?(@input_lines_position + direction)

    @input_lines_position += direction
    buffer_of_lines, byte_pointer, line_index = @input_lines[@input_lines_position]
    @buffer_of_lines = buffer_of_lines.dup
    @line_index = line_index
    @byte_pointer = byte_pointer
  end

  private def undo(_key)
    move_undo_redo(-1)
  end

  private def redo(_key)
    move_undo_redo(+1)
  end

  private def prev_action_state_value(type)
    @prev_action_state[0] == type ? @prev_action_state[1] : nil
  end

  private def set_next_action_state(type, value)
    @next_action_state = [type, value]
  end

  private def re_read_init_file(_key)
    @config.reload
  end
end
ruby/reline/general_io.rb000064400000002714150403134330011434 0ustar00win32/Makefile.sub ({$(srcdir)}.c{}.obj): make it not match
	  win32/file.c to build properly.
	* win32/Makefile.sub (win32/win32.$(OBJEXT)): move win32.obj into
	 `win32` directory.

	  Patch created with Luis Lavena.
	  [ruby-core:42480] [Feature #5999]

Fri Oct 19 13:28:29 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (opt-dir): allow multiple directories separated by
	  $PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868]
	  [Bug #7120]

Tue Oct 16 11:18:06 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (dir_config, init_mkmf): use configured libdir value as
	  default library path.  [ruby-core:43726] [Bug #6207]

Tue Oct 16 10:56:55 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_find_file_ext_safe, rb_find_file_safe): default to
	  US-ASCII for encdb and transdb.

	* load.c (search_required): keep encoding of feature name.  set
	  loading path to filesystem encoding.  [Bug #6377][ruby-core:44750]

	* ruby.c (add_modules, require_libraries): assume default external
	  encoding as well as ARGV.

Tue Oct 16 10:47:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (random_s_rand): ensure default PRNG is re-initialized
	  after fork.  patched by Eric Wong.  [ruby-core:41209][Bug #5661]

Tue Oct 16 10:21:23 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (rb_f_sub, rb_f_gsub): pass the given block.
	  [ruby-core:47967] [Bug #7157]

Tue Oct 16 09:47:47 2012  NAKAMURA Usaku  <usa@ruby-lanruby/reline/key_actor.rb000064400000000316150403134330011304 0ustar00module Reline::KeyActor
end

require 'reline/key_actor/base'
require 'reline/key_actor/composite'
require 'reline/key_actor/emacs'
require 'reline/key_actor/vi_command'
require 'reline/key_actor/vi_insert'
ruby/reline/key_actor/base.rb000064400000001310150403134330012211 0ustar00class Reline::KeyActor::Base
  def initialize(mappings = nil)
    @matching_bytes = {}
    @key_bindings = {}
    add_mappings(mappings) if mappings
  end

  def add_mappings(mappings)
    add([27], :ed_ignore)
    128.times do |key|
      func = mappings[key]
      meta_func = mappings[key | 0b10000000]
      add([key], func) if func
      add([27, key], meta_func) if meta_func
    end
  end

  def add(key, func)
    (1...key.size).each do |size|
      @matching_bytes[key.take(size)] = true
    end
    @key_bindings[key] = func
  end

  def matching?(key)
    @matching_bytes[key]
  end

  def get(key)
    @key_bindings[key]
  end

  def clear
    @matching_bytes.clear
    @key_bindings.clear
  end
end
ruby/racc/sourcetext.rb000064400000001033150403134330011160 0ustar00module Reline::KeyActor
  EMACS_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
    nil,
    #   8 ^H
    :em_delete_prev_char,
    #   9 ^I
    :complete,
    #  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_igruby/racc/exception.rb000064400000000420150403134330010750 0ustar00t,
    #  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_inserruby/racc/logfilegenerator.rb000064400000012055150403134330012311 0ustar00nsert,
    #  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-^@
    nil,
    # 129 M-^A
    nil,
    # 130 M-^B
    nil,
    # 131 M-^C
    nil,
    # 132 M-^D
    nil,
    # 133 M-^E
    nil,
    # 134 M-^F
    nil,
    # 135 M-^G
    nil,
    # 136 M-^H
    :ed_delete_prev_word,
    # 137 M-^I
    nil,
    # 138 M-^J
    :key_newline,
    # 139 M-^K
    nil,
    # 140 M-^L
    :ed_clear_screen,
    # 141 M-^M
    :key_newline,
    # 142 M-^N
    nil,
    # 143 M-^O
    nil,
    # 144 M-^P
    nil,
    # 145 M-^Q
    nil,
    # 146 M-^R
    nil,
    # 147 M-^S
    nil,
    # 148 M-^T
    nil,
    # 149 M-^U
    nil,
    # 150 M-^V
    nil,
    # 151 M-^W
    nil,
    # 152 M-^X
    nil,
    # 153 M-^Y
    :em_yank_pop,
    # 154 M-^Z
    nil,
    # 155 M-^[
    nil,
    # 156 M-^\
    nil,
    # 157 M-^]
    nil,
    # 158 M-^^
    nil,
    # 159 M-^_
    :redo,
    # 160 M-SPACE
    :em_set_mark,
    # 161 M-!
    nil,
    # 162 M-"
    nil,
    # 163 M-#
    nil,
    # 164 M-$
    nil,
    # 165 M-%
    nil,
    # 166 M-&
    nil,
    # 167 M-'
    nil,
    # 168 M-(
    nil,
    # 169 M-)
    nil,
    # 170 M-*
    nil,
    # 171 M-+
    nil,
    # 172 M-,
    nil,
    # 173 M--
    nil,
    # 174 M-.
    nil,
    # 175 M-/
    nil,
    # 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-:
    nil,
    # 187 M-;
    nil,
    # 188 M-<
    nil,
    # 189 M-=
    nil,
    # 190 M->
    nil,
    # 191 M-?
    nil,
    # 192 M-@
    nil,
    # 193 M-A
    nil,
    # 194 M-B
    :ed_prev_word,
    # 195 M-C
    :em_capitol_case,
    # 196 M-D
    :em_delete_next_word,
    # 197 M-E
    nil,
    # 198 M-F
    :em_next_word,
    # 199 M-G
    nil,
    # 200 M-H
    nil,
    # 201 M-I
    nil,
    # 202 M-J
    nil,
    # 203 M-K
    nil,
    # 204 M-L
    :em_lower_case,
    # 205 M-M
    nil,
    # 206 M-N
    :vi_search_next,
    # 207 M-O
    nil,
    # 208 M-P
    :vi_search_prev,
    # 209 M-Q
    nil,
    # 210 M-R
    nil,
    # 211 M-S
    nil,
    # 212 M-T
    nil,
    # 213 M-U
    :em_upper_case,
    # 214 M-V
    nil,
    # 215 M-W
    nil,
    # 216 M-X
    nil,
    # 217 M-Y
    :em_yank_pop,
    # 218 M-Z
    nil,
    # 219 M-[
    nil,
    # 220 M-\
    nil,
    # 221 M-]
    nil,
    # 222 M-^
    nil,
    # 223 M-_
    nil,
    # 224 M-`
    nil,
    # 225 M-a
    nil,
    # 226 M-b
    :ed_prev_word,
    # 227 M-c
    :em_capitol_case,
    # 228 M-d
    :em_delete_next_word,
    # 229 M-e
    nil,
    # 230 M-f
    :em_next_word,
    # 231 M-g
    nil,
    # 232 M-h
    nil,
    # 233 M-i
    nil,
    # 234 M-j
    nil,
    # 235 M-k
    nil,
    # 236 M-l
    :em_lower_case,
    # 237 M-m
    nil,
    # 238 M-n
    :vi_search_next,
    # 239 M-o
    nil,
    # 240 M-p
    :vi_search_prev,
    # 241 M-q
    nil,
    # 242 M-r
    nil,
    # 243 M-s
    nil,
    # 244 M-t
    :ed_transpose_words,
    # 245 M-u
    :em_upper_case,
    # 246 M-v
    nil,
    # 247 M-w
    nil,
    # 248 M-x
    nil,
    # 249 M-y
    nil,
    # 250 M-z
    nil,
    # 251 M-{
    nil,
    # 252 M-|
    nil,
    # 253 M-}
    nil,
    # 254 M-~
    nil,
    # 255 M-^?
    :ed_delete_prev_word
    # EOF
  ]
end
ruby/reline/key_actor/vi_command.rbruby/racc/iset.rb000064400000002364150403134330007727 0ustar00_ignore,
    #  16 ^P
    :ed_prev_history,
    #  17 ^Q
    :ed_ignore,
    #  18 ^R
    :vi_search_prev,
    #  19 ^S
    :ed_ignore,
    #  20 ^T
    :ed_transpose_chars,
    #  21 ^U
    :vi_kill_line_prev,
    #  22 ^V
    :ed_quoted_insert,
    #  23 ^W
    :ed_delete_prev_word,
    #  24 ^X
    nil,
    #  25 ^Y
    :em_yank,
    #  26 ^Z
    nil,
    #  27 ^[
    nil,
    #  28 ^\
    :ed_ignore,
    #  29 ^]
    nil,
    #  30 ^^
    nil,
    #  31 ^_
    nil,
    #  32 SPACE
    :ed_next_char,
    #  33 !
    nil,
    #  34 "
    nil,
    #  35 #
    :vi_comment_out,
    #  36 $
    :ed_move_to_end,
    #  37 %
    nil,
    #  38 &
    nil,
    #  39 '
    nil,
    #  40 (
    nil,
    #  41 )
    nil,
    #  42 *
    nil,
    #  43 +
    :ed_next_history,
    #  44 ,
    nil,
    #  45 -
    :ed_prev_history,
    #  46 .
    nil,
    #  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 :
    nil,
    #  59 ;ruby/racc/info.rb000064400000000451150403134340007712 0ustar00   #  88 X
    :ed_delete_prev_char,
    #  89 Y
    nil,
    #  90 Z
    nil,
    #  91 [
    nil,
    #  92 \
    nil,
    #  93 ]
    nil,
    #  94 ^
    :vi_first_print,
    #  95 _
    nil,
    #  96 `
    nil,
    #  97 a
    :vi_add,
    #  98 b
    :vi_prev_word,
    #  99 c
    :vi_chanruby/racc/statetransitiontable.rb000064400000017521150403134340013230 0ustar00    # 126 ~
    nil,
    # 127 ^?
    :em_delete_prev_char,
    # 128 M-^@
    nil,
    # 129 M-^A
    nil,
    # 130 M-^B
    nil,
    # 131 M-^C
    nil,
    # 132 M-^D
    nil,
    # 133 M-^E
    nil,
    # 134 M-^F
    nil,
    # 135 M-^G
    nil,
    # 136 M-^H
    nil,
    # 137 M-^I
    nil,
    # 138 M-^J
    nil,
    # 139 M-^K
    nil,
    # 140 M-^L
    nil,
    # 141 M-^M
    nil,
    # 142 M-^N
    nil,
    # 143 M-^O
    nil,
    # 144 M-^P
    nil,
    # 145 M-^Q
    nil,
    # 146 M-^R
    nil,
    # 147 M-^S
    nil,
    # 148 M-^T
    nil,
    # 149 M-^U
    nil,
    # 150 M-^V
    nil,
    # 151 M-^W
    nil,
    # 152 M-^X
    nil,
    # 153 M-^Y
    nil,
    # 154 M-^Z
    nil,
    # 155 M-^[
    nil,
    # 156 M-^\
    nil,
    # 157 M-^]
    nil,
    # 158 M-^^
    nil,
    # 159 M-^_
    nil,
    # 160 M-SPACE
    nil,
    # 161 M-!
    nil,
    # 162 M-"
    nil,
    # 163 M-#
    nil,
    # 164 M-$
    nil,
    # 165 M-%
    nil,
    # 166 M-&
    nil,
    # 167 M-'
    nil,
    # 168 M-(
    nil,
    # 169 M-)
    nil,
    # 170 M-*
    nil,
    # 171 M-+
    nil,
    # 172 M-,
    nil,
    # 173 M--
    nil,
    # 174 M-.
    nil,
    # 175 M-/
    nil,
    # 176 M-0
    nil,
    # 177 M-1
    nil,
    # 178 M-2
    nil,
    # 179 M-3
    nil,
    # 180 M-4
    nil,
    # 181 M-5
    nil,
    # 182 M-6
    nil,
    # 183 M-7
    nil,
    # 184 M-8
    nil,
    # 185 M-9
    nil,
    # 186 M-:
    nil,
    # 187 M-;
    nil,
    # 188 M-<
    nil,
    # 189 M-=
    nil,
    # 190 M->
    nil,
    # 191 M-?
    nil,
    # 192 M-@
    nil,
    # 193 M-A
    nil,
    # 194 M-B
    nil,
    # 195 M-C
    nil,
    # 196 M-D
    nil,
    # 197 M-E
    nil,
    # 198 M-F
    nil,
    # 199 M-G
    nil,
    # 200 M-H
    nil,
    # 201 M-I
    nil,
    # 202 M-J
    nil,
    # 203 M-K
    nil,
    # 204 M-L
    nil,
    # 205 M-M
    nil,
    # 206 M-N
    nil,
    # 207 M-O
    nil,
    # 208 M-P
    nil,
    # 209 M-Q
    nil,
    # 210 M-R
    nil,
    # 211 M-S
    nil,
    # 212 M-T
    nil,
    # 213 M-U
    nil,
    # 214 M-V
    nil,
    # 215 M-W
    nil,
    # 216 M-X
    nil,
    # 217 M-Y
    nil,
    # 218 M-Z
    nil,
    # 219 M-[
    nil,
    # 220 M-\
    nil,
    # 221 M-]
    nil,
    # 222 M-^
    nil,
    # 223 M-_
    nil,
    # 224 M-`
    nil,
    # 225 M-a
    nil,
    # 226 M-b
    nil,
    # 227 M-c
    nil,
    # 228 M-d
    nil,
    # 229 M-e
    nil,
    # 230 M-f
    nil,
    # 231 M-g
    nil,
    # 232 M-h
    nil,
    # 233 M-i
    nil,
    # 234 M-j
    nil,
    # 235 M-k
    nil,
    # 236 M-l
    nil,
    # 237 M-m
    nil,
    # 238 M-n
    nil,
    # 239 M-o
    nil,
    # 240 M-p
    nil,
    # 241 M-q
    nil,
    # 242 M-r
    nil,
    # 243 M-s
    nil,
    # 244 M-t
    nil,
    # 245 M-u
    nil,
    # 246 M-v
    nil,
    # 247 M-w
    nil,
    # 248 M-x
    nil,
    # 249 M-y
    nil,
    # 250 M-z
    nil,
    # 251 M-{
    nil,
    # 252 M-|
    nil,
    # 253 M-}
    nil,
    # 254 M-~
    nil,
    # 255 M-^?
    nil
    # EOF
  ]
end

ruby/reline/key_actor/vi_insert.rb000064400000015147150403134330013316 0ustar00module Reline::KeyActor
  VI_INSERT_MAPPING = [
    #   0 ^@
    nil,
    #   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
    :complete,
    #  10 ^J
    :ed_newline,
    #  11 ^K
    :ed_insert,
    #  12 ^L
    :ed_insert,
    #  13 ^M
    :ed_newline,
    #  14 ^N
    :menu_complete,
    #  15 ^O
    :ed_insert,
    #  16 ^P
    :menu_complete_backward,
    #  17 ^Q
    :ed_ignore,
    #  18 ^R
    :vi_search_prev,
    #  19 ^S
    :vi_search_next,
    #  20 ^T
    :ed_transpose_chars,
    #  21 ^U
    :vi_kill_line_prev,
    #  22 ^V
    :ed_quoted_insert,
    #  23 ^W
    :ed_delete_prev_word,
    #  24 ^X
    :ed_insert,
    #  25 ^Y
    :em_yank,
    #  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_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 ^?
    :vi_delete_prev_char,
    # 128 M-^@
    nil,
    # 129 M-^A
    nil,
    # 130 M-^B
    nil,
    # 131 M-^C
    nil,
    # 132 M-^D
    nil,
    # 133 M-^E
    nil,
    # 134 M-^F
    nil,
    # 135 M-^G
    nil,
    # 136 M-^H
    nil,
    # 137 M-^I
    nil,
    # 138 M-^J
    :key_newline,
    # 139 M-^K
    nil,
    # 140 M-^L
    nil,
    # 141 M-^M
    :key_newline,
    # 142 M-^N
    nil,
    # 143 M-^O
    nil,
    # 144 M-^P
    nil,
    # 145 M-^Q
    nil,
    # 146 M-^R
    nil,
    # 147 M-^S
    nil,
    # 148 M-^T
    nil,
    # 149 M-^U
    nil,
    # 150 M-^V
    nil,
    # 151 M-^W
    nil,
    # 152 M-^X
    nil,
    # 153 M-^Y
    nil,
    # 154 M-^Z
    nil,
    # 155 M-^[
    nil,
ruby/racc/debugflags.rb000064400000002455150403134340011070 0ustar009
    nil,
    # 186 M-:
    nil,
    # 187 M-;
    nil,
    # 188 M-<
    nil,
    # 189 M-=
    nil,
    # 190 M->
    nil,
    # 191 M-?
    nil,
    # 192 M-@
    nil,
    # 193 M-A
    nil,
    # 194 M-B
    nil,
    # 195 M-C
    nil,
    # 196 M-D
    nil,
    # 197 M-E
    nil,
    # 198 M-F
    nil,
    # 199 M-G
    nil,
    # 200 M-H
    nil,
    # 201 M-I
    nil,
    # 202 M-J
    nil,
    # 203 M-K
    nil,
    # 204 M-L
    nil,
    # 205 M-M
    nil,
    # 206 M-N
    nil,
    # 207 M-O
    nil,
    # 208 M-P
    nil,
    # 209 M-Q
    nil,
    # 210 M-R
    nil,
    # 211 M-S
    nil,
    # 212 M-T
    nil,
    # 213 M-U
    nil,
    # 214 M-V
    nil,
    # 215 M-W
    nil,
    # 216 M-X
    nil,
    # 217 M-Y
    nil,
    # 218 M-Z
    nil,
    # 219 M-[
    nil,
    # 220 M-\
    nil,
    # 221 M-]
    nil,
    # 222 M-^
    nil,
    # 223 M-_
    nil,
    # 224 M-`
    nil,
    # 225 M-a
    nil,
    # 226 M-b
    nil,
    # 227 M-c
    nil,
    # 228 M-d
    nil,
    # 229 M-e
    nil,
    # 230 M-f
    nil,
    # 231 M-g
    nil,
    # 232 M-h
    nil,
    # 233 M-i
    nil,
    # 234 M-j
    nil,
    # 235 M-k
    nil,
    # 236 M-l
    nil,
    # 237 M-m
    nil,
    # 238 M-n
    nil,
    # 239 M-o
    nil,
    # 240 M-p
    nil,
    # 241 M-q
    nil,
    # 242 M-r
    nil,
   ruby/racc/static.rb000064400000000211150403134340010240 0ustar00ruby/reline/unicode.rb0000644000000320031ruby/racc/parserfilegenerator.rb000064400000025124150403134340013026 0ustar00^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\e]+)*(?:\a|\e\\)/
  WIDTH_SCANNER = /\G(?:(#{NON_PRINTING_START})|(#{NON_PRINTING_END})|(#{CSI_REGEXP})|(#{OSC_REGEXP})|(\X))/o

  def self.escape_for_print(str)
    str.chars.map! { |gr|
      case gr
      when -"\n"
        gr
      when -"\t"
        -'  '
      else
        EscapedPairs[gr.ord] || gr
      end
    }.join
  end

  def self.safe_encode(str, encoding)
    # Reline only supports utf-8 convertible string.
    converted = str.encode(encoding, invalid: :replace, undef: :replace)
    return converted if str.encoding == Encoding::UTF_8 || converted.encoding == Encoding::UTF_8 || converted.ascii_only?

    # This code is essentially doing the same thing as
    # `str.encode(utf8, **replace_options).encode(encoding, **replace_options)`
    # but also avoids unneccesary irreversible encoding conversion.
    converted.gsub(/\X/) do |c|
      c.encode(Encoding::UTF_8)
      c
    rescue Encoding::UndefinedConversionError
      '?'
    end
  end

  require 'reline/unicode/east_asian_width'

  def self.get_mbchar_width(mbchar)
    ord = mbchar.ord
    if ord <= 0x1F # in EscapedPairs
      return 2
    elsif ord <= 0x7E # printable ASCII chars
      return 1
    end
    utf8_mbchar = mbchar.encode(Encoding::UTF_8)
    ord = utf8_mbchar.ord
    chunk_index = EastAsianWidth::CHUNK_LAST.bsearch_index { |o| ord <= o }
    size = EastAsianWidth::CHUNK_WIDTH[chunk_index]
    if size == -1
      Reline.ambiguous_width
    elsif size == 1 && utf8_mbchar.size >= 2
      second_char_ord = utf8_mbchar[1].ord
      # Halfwidth Dakuten Handakuten
      # Only these two character has Letter Modifier category and can be combined in a single grapheme cluster
      (second_char_ord == 0xFF9E || second_char_ord == 0xFF9F) ? 2 : 1
    else
      size
    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 |non_printing_start, non_printing_end, csi, osc, gc|
        case
        when non_printing_start
          in_zero_width = true
        when non_printing_end
          in_zero_width = false
        when csi, osc
        when gc
          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

  # This method is used by IRB
  def self.split_by_width(str, max_width)
    lines = split_line_by_width(str, max_width)
    [lines, lines.size]
  end

  def self.split_line_by_width(str, max_width, encoding = str.encoding, offset: 0)
    lines = [String.new(encoding: encoding)]
    width = offset
    rest = str.encode(Encoding::UTF_8)
    in_zero_width = false
    seq = String.new(encoding: encoding)
    rest.scan(WIDTH_SCANNER) do |non_printing_start, non_printing_end, csi, osc, gc|
      case
      when non_printing_start
        in_zero_width = true
      when non_printing_end
        in_zero_width = false
      when csi
        lines.last << csi
        unless in_zero_width
          if csi == -"\e[m" || csi == -"\e[0m"
            seq.clear
          else
            seq << csi
          end
        end
      when osc
        lines.last << osc
        seq << osc unless in_zero_width
      when gc
        unless in_zero_width
          mbchar_width = get_mbchar_width(gc)
          if (width += mbchar_width) > max_width
            width = mbchar_width
            lines << seq.dup
          end
        end
        lines.last << gc
      end
    end
    # The cursor moves to next line in first
    if width == max_width
      lines << String.new(encoding: encoding)
    end
    lines
  end

  def self.strip_non_printing_start_end(prompt)
    prompt.gsub(/\x01([^\x02]*)(?:\x02|\z)/) { $1 }
  end

  # Take a chunk of a String cut by width with escape sequences.
  def self.take_range(str, start_col, max_width)
    take_mbchar_range(str, start_col, max_width).first
  end

  def self.take_mbchar_range(str, start_col, width, cover_begin: false, cover_end: false, padding: false)
    chunk = String.new(encoding: str.encoding)

    end_col = start_col + width
    total_width = 0
    rest = str.encode(Encoding::UTF_8)
    in_zero_width = false
    chunk_start_col = nil
    chunk_end_col = nil
    has_csi = false
    rest.scan(WIDTH_SCANNER) do |non_printing_start, non_printing_end, csi, osc, gc|
      case
      when non_printing_start
        in_zero_width = true
      when non_printing_end
        in_zero_width = false
      when csi
        has_csi = true
        chunk << csi
      when osc
        chunk << osc
      when gc
        if in_zero_width
          chunk << gc
          next
        end

        mbchar_width = get_mbchar_width(gc)
        prev_width = total_width
        total_width += mbchar_width

        if (cover_begin || padding ? total_width <= start_col : prev_width < start_col)
          # Current character haven't reached start_col yet
          next
        elsif padding && !cover_begin && prev_width < start_col && start_col < total_width
          # Add preceding padding. This padding might have background color.
          chunk << ' '
          chunk_start_col ||= start_col
          chunk_end_col = total_width
          next
        elsif (cover_end ? prev_width < end_col : total_width <= end_col)
          # Current character is in the range
          chunk << gc
          chunk_start_col ||= prev_width
          chunk_end_col = total_width
          break if total_width >= end_col
        else
          # Current character exceeds end_col
          if padding && end_col < total_width
            # Add succeeding padding. This padding might have background color.
            chunk << ' '
            chunk_start_col ||= prev_width
            chunk_end_col = end_col
          end
          break
        end
      end
    end
    chunk_start_col ||= start_col
    chunk_end_col ||= start_col
    if padding && chunk_end_col < end_col
      # Append padding. This padding should not include background color.
      chunk << "\e[0m" if has_csi
      chunk << ' ' * (end_col - chunk_end_col)
      chunk_end_col = end_col
    end
    [chunk, chunk_start_col, chunk_end_col - chunk_start_col]
  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)
    gcs = line.byteslice(byte_pointer..).grapheme_clusters
    nonwords = gcs.take_while { |c| !word_character?(c) }
    words = gcs.drop(nonwords.size).take_while { |c| word_character?(c) }
    nonwords.sum(&:bytesize) + words.sum(&:bytesize)
  end

  def self.em_forward_word_with_capitalization(line, byte_pointer)
    gcs = line.byteslice(byte_pointer..).grapheme_clusters
    nonwords = gcs.take_while { |c| !word_character?(c) }
    words = gcs.drop(nonwords.size).take_while { |c| word_character?(c) }
    [nonwords.sum(&:bytesize) + words.sum(&:bytesize), nonwords.join + words.join.capitalize]
  end

  def self.em_backward_word(line, byte_pointer)
    gcs = line.byteslice(0, byte_pointer).grapheme_clusters.reverse
    nonwords = gcs.take_while { |c| !word_character?(c) }
    words = gcs.drop(nonwords.size).take_while { |c| word_character?(c) }
    nonwords.sum(&:bytesize) + words.sum(&:bytesize)
  end

  def self.em_big_backward_word(line, byte_pointer)
    gcs = line.byteslice(0, byte_pointer).grapheme_clusters.reverse
    spaces = gcs.take_while { |c| space_character?(c) }
    nonspaces = gcs.drop(spaces.size).take_while { |c| !space_character?(c) }
    spaces.sum(&:bytesize) + nonspaces.sum(&:bytesize)
  end

  def self.ed_transpose_words(line, byte_pointer)
    gcs = line.byteslice(0, byte_pointer).grapheme_clusters
    pos = gcs.size
    gcs += line.byteslice(byte_pointer..).grapheme_clusters
    pos += 1 while pos < gcs.size && !word_character?(gcs[pos])
    if pos == gcs.size # 'aaa  bbb [cursor] '
      pos -= 1 while pos > 0 && !word_character?(gcs[pos - 1])
      second_word_end = gcs.size
    else # 'aaa  [cursor]bbb'
      pos += 1 while pos < gcs.size && word_character?(gcs[pos])
      second_word_end = pos
    end
    pos -= 1 while pos > 0 && word_character?(gcs[pos - 1])
    second_word_start = pos
    pos -= 1 while pos > 0 && !word_character?(gcs[pos - 1])
    first_word_end = pos
    pos -= 1 while pos > 0 && word_character?(gcs[pos - 1])
    first_word_start = pos

    [first_word_start, first_word_end, second_word_start, second_word_end].map do |idx|
      gcs.take(idx).sum(&:bytesize)
    end
  end

  def self.vi_big_forward_word(line, byte_pointer)
    gcs = line.byteslice(byte_pointer..).grapheme_clusters
    nonspaces = gcs.take_while { |c| !space_character?(c) }
    spaces = gcs.drop(nonspaces.size).take_while { |c| space_character?(c) }
    nonspaces.sum(&:bytesize) + spaces.sum(&:bytesize)
  end

  def self.vi_big_forward_end_word(line, byte_pointer)
    gcs = line.byteslice(byte_pointer..).grapheme_clusters
    first = gcs.shift(1)
    spaces = gcs.take_while { |c| space_character?(c) }
    nonspaces = gcs.drop(spaces.size).take_while { |c| !space_character?(c) }
    matched = spaces + nonspaces
    matched.pop
    first.sum(&:bytesize) + matched.sum(&:bytesize)
  end

  def self.vi_big_backward_word(line, byte_pointer)
    gcs = line.byteslice(0, byte_pointer).grapheme_clusters.reverse
    spaces = gcs.take_while { |c| space_character?(c) }
    nonspaces = gcs.drop(spaces.size).take_while { |c| !space_character?(c) }
    spaces.sum(&:bytesize) + nonspaces.sum(&:bytesize)
  end

  def self.vi_forward_word(line, byte_pointer, drop_terminate_spaces = false)
    gcs = line.byteslice(byte_pointer..).grapheme_clusters
    return 0 if gcs.empty?

    c = gcs.first
    matched =
      if word_character?(c)
        gcs.take_while { |c| word_character?(c) }
      elsif space_character?(c)
        gcs.take_while { |c| space_character?(c) }
      else
        gcs.take_while { |c| !word_character?(c) && !space_character?(c) }
      end

    return matched.sum(&:bytesize) if drop_terminatruby/racc/compat.rb000064400000001032150403134340010236 0ustar00 |c| space_character?(c) }
    gcs.shift(spaces.size)
    start_with_word = word_character?(gcs.first)
    matched = gcs.take_while { |c| start_with_word ? word_character?(c) : !word_character?(c) && !space_character?(c) }
    spaces.sum(&:bytesize) + matched.sum(&:bytesize)
  end

  def self.common_prefix(list, ignore_case: false)
    return '' if list.empty?

    common_prefix_gcs = list.first.grapheme_clusters
    list.each do |item|
      gcs = item.grapheme_clusters
      common_prefix_gcs = common_prefix_gcs.take_while.with_inruby/racc/grammar.rb000064400000054266150403134340010422 0ustar00ruby/reline/kill_ring.rb000064400000004575150403134330011311 0ustar00class 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)
      equal?(other)
    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
ruby/reline/ansi.rb000064400000022210150403134330010253 0ustar00/win32.h (rb_w32_fd_is_text): new function.

	* win32/win32.c (init_stdhandle): set default mode of stdin as binmode.

	* io.c (set_binary_mode_with_seek_cur): new function to replace
	  SET_BINARY_MODE_WITH_SEEK_CUR macro.  now returns previous mode of the
	  fd and take care of LF in rbuf.

	* io.c (do_writeconv): set text mode when needed.

	* io.c (io_read): need to change the mode of the IO to binmode
	  temporally when the length for IO#read, because IO#read with length
	  must behave so.

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length,
	  read_with_length_binmode,get[cs]_and_read_with_binmode,
	  read_with_binmode_and_get[cs],read_write_with_binmode}): tests for
	  above changes.

	all patches are written by Hiroshi Shirosaki. [ruby-core:41496]
	[Feature #5714]

Sat Feb 11 03:37:56 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rexml/test_order.rb (OrderTester#test_more_ordering): use
	  GZip::GzReader.open instead of GZip::GzReader.new with File.new.
	  fixed a test error on Windows introduced at r33946.

Sat Feb 11 03:37:34 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
	  1st, to change the mode of an IO is very sensitive problem, so
	  fixed test errors on Windows introduced at r33953.
	  the maintainer of this library should judge it.
	  2nd, usually Zlib::GzReader.new is not called directly.  #initialize
	  is called via .open, and in the method the I/O is opened in binary
	  mode, so there is no problem without changing the mode in #initialize.

	  fixed test errors on Windows introduced at r33947.
Sat Feb 11 03:23:58 2012  Luis Lavena  <luislavena@gmail.com>

	* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
	  under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706]
	  [Feature #5562]

	* include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
	  decorator.

	* io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
	  NEED_WRITECONV to replace universal newline decorator by CRLF only
	  when required to improve file reading and writing under Windows.
	  Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562]
	* io.c (do_writeconv): adjust binary mode if required.
	* io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.
	* io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.
	* io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.
	* io.c (rb_io_extract_modeenc, rb_sysopen): ditto.
	* io.c (pipe_open, prep_stdio, io_encoding_set): ditto.
	* io.c (rb_io_s_pipe, copy_stream_body): ditto.

	* test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
	  binary mode.

	* win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
	  initialization.
	* win32/win32.c (rb_w32_write): use FTEXT mode accordingly.

Sat Feb 11 03:20:22 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (argf_next_argv): wrong timing of setting ecflags.
	  fixed the failure of TestArgf#test_textmode introduced at r33662.

Sat Feb 11 03:19:45 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_default_stdout_stderr_mode): new test for
	  r33627-33629.  see [backport #5565]
Sat Feb 11 03:20:22 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
	  ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.

	* io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
	  set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
	  if the flag is available.

	* io.c (make_writeconv): drop decorators for reading.

	* io.c (make_readconv): drop decorators for writing.

	* io.c (do_writeconv): existing writeconv is not the condition to raise
	  ArgumentError.  should check textmode or not.

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
	  changes.


Sat Feb 11 03:19:45 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
	  default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
	  committed in r33144.  I'd misunderstood the spec of ruby's universal
	  newline.

Sat Feb 11 03:17:41 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
	  default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].

Sat Feb 11 03:13:27 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c: enabled econv newline option.

Sat Feb 11 02:39:09 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* variable.c (set_const_visibility): clear inine-cache when constant's
	  visibility is modified. [ruby-dev:44929]

	* test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
	  add test for it.

Sat Feb 11 02:39:09 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* variable.c (set_const_visibility): print a warning when no argument
	  is passwd to Module#private_constant.  [ruby-list:48558]

	* vm_method.c (set_method_visibility): ditto for
	  Module#private_class_method.

Sat Feb 11 02:39:09 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* variable.c (set_const_visibility): Module#private_constant has
	  changed the visibility of only the first argument.  Now it changes
	  all of them.  [ruby-list:48558]

	* test/ruby/test_module.rb: add a test for above.

Sat Feb 11 02:39:09 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* variable.c (set_const_visibility): clear inine-cache when constant's
	  visibility is modified. [ruby-dev:44929]

	* test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
	  add test for it.

Sat Feb 11 02:39:09 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* variable.c (set_const_visibility): print a warning when no argument
	  is passwd to Module#private_constant.  [ruby-list:48558]

	* vm_method.c (set_method_visibility): ditto for
	  Module#private_class_method.

Sat Feb 11 02:39:09 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* variable.c (set_const_visibility): Module#private_constant has
	  changed the visibility of only the first argument.  Now it changes
	  all of them.  [ruby-list:48558]

	* test/ruby/test_module.rb: add a test for above.

Sat Feb 11 02:26:51 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* lib/openssl/buffering.rb: Force multi-byte strings to be treated as
	  binary data.
	* test/openssl/test_ssl.rb: Add test for it.

	Thanks to Niklas Baumstark for reporting the issue!

	[Ruby 1.9 - Bug #5233] [ruby-core:39120]

Fri Feb 10 17:25:28 2012  Tanaka Akira  <akr@fsij.org>

	* lib/set.rb (SortedSet.setup): remove old_init after initialize
	  method is redefined.  The remove before redefinition makes the
	  warning prevention fragile.  [ruby-dev:44892]

Fri Feb 10 17:02:12 2012  okkez  <okkez000@gmail.com>

	* thread_pthread.c (rb_thread_create_timer_thread): fix memory
	  leak. [ruby-dev:44904] [Bug #5688]

Fri Feb 10 05:22:32 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (fiber_setcontext): Use longjmp() instead of swapcontext() on
	  FreeBSD 9. [ruby-dev:41316] [Bug #3295] [Bug #5526]

Fri Feb 10 05:13:12 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* object.c: Added examples for Object#is_a? and
	  Object#instance_of? patcheed from Manoj Kumar.
	  [Bug #5880] [ruby-core:42057]

Fri Feb 10 05:11:43 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.
	  r34409 breaks replacing ARGV.
	  [ruby-dev:45160] [Bug #5952]

Fri Feb 10 05:11:43 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_close): skip stdin, which should be readable again.
	  [ruby-dev:45160] [Bug #5952]

	* io.c (argf_readlines): reinitialize after all read to be
	  readable again.

Fri Feb  9 01:36:19 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r34482 from trunk

	* ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
	  option to prevent BEAST attack. See [Bug #5353].

	  In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
	  TLS-CBC-IV vulunerability described at
	  http://www.openssl.org/~bodo/tls-cbc.txt
	  It's known issue of TLSv1/SSLv3 but it attracts lots of attention
	  these days as BEAST attack. (CVE-2011-3389)

	  Until now ossl sets OP_ALL at SSLContext allocation and call
	  SSL_CTX_set_options at connection.  SSL_CTX_set_options updates the
	  value by using |= so bits set by OP_ALL cannot be unset afterwards.
	  This commit changes to call SSL_CTX_set_options only 1 time for each
	  SSLContext. It sets the specified value if SSLContext#options= are
	  called and sets OP_ALL if not.

	  To help users to unset bits in OP_ALL, this commit also adds several
	  constant to SSL such as
	  OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.  These constants were
	  not exposed in Ruby because there's no way to unset bits in OP_ALL
	  before.

	  Following is an example to enable 0/n split for BEAST prevention.

	    ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS

	* test/openssl/test_ssl.rb: Test above option exists.

Thu Feb  9 17:08:20 2012  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* cont.c (cont_mark): mark original Thread object from saved_thread.
	  [ruby-dev:44567] [Bug #5386]

Thu Feb  9 17:05:07 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (HAVE_GETCONTEXT): see getcontext(3) because DragonFly BSD
	  x64 port doesruby/reline/config.rb000064400000024242150403134330010575 0ustar00class 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{
    completion-ignore-case
    convert-meta
    disable-completion
    history-size
    keyseq-timeout
    show-all-if-ambiguous
    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

  attr_accessor :autocompletion

  def initialize
    reset_variables
  end

  def reset
    if editing_mode_is?(:vi_command)
      @editing_mode_label = :vi_insert
    end
    @oneshot_key_bindings.clear
  end

  def reset_variables
    @additional_key_bindings = { # from inputrc
      emacs: Reline::KeyActor::Base.new,
      vi_insert: Reline::KeyActor::Base.new,
      vi_command: Reline::KeyActor::Base.new
    }
    @oneshot_key_bindings = Reline::KeyActor::Base.new
    @editing_mode_label = :emacs
    @keymap_label = :emacs
    @keymap_prefix = []
    @default_key_bindings = {
      emacs: Reline::KeyActor::Base.new(Reline::KeyActor::EMACS_MAPPING),
      vi_insert: Reline::KeyActor::Base.new(Reline::KeyActor::VI_INSERT_MAPPING),
      vi_command: Reline::KeyActor::Base.new(Reline::KeyActor::VI_COMMAND_MAPPING)
    }
    @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
    @autocompletion = false
    @convert_meta = seven_bit_encoding?(Reline::IOGate.encoding)
    @loaded = false
    @enable_bracketed_paste = true
    @show_mode_in_prompt = false
    @default_inputrc_path = nil
  end

  def editing_mode
    @default_key_bindings[@editing_mode_label]
  end

  def editing_mode=(val)
    @editing_mode_label = val
  end

  def editing_mode_is?(*val)
    val.any?(@editing_mode_label)
  end

  def keymap
    @default_key_bindings[@keymap_label]
  end

  def loaded?
    @loaded
  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

  private def default_inputrc_path
    @default_inputrc_path ||= inputrc_path
  end

  def read(file = nil)
    @loaded = true
    file ||= default_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
    # The key bindings for each editing mode will be overwritten by the user-defined ones.
    Reline::KeyActor::Composite.new([@oneshot_key_bindings, @additional_key_bindings[@editing_mode_label], @default_key_bindings[@editing_mode_label]])
  end

  def add_oneshot_key_binding(keystroke, target)
    # IRB sets invalid keystroke [Reline::Key]. We should ignore it.
    return unless keystroke.all? { |c| c.is_a?(Integer) }

    @oneshot_key_bindings.add(keystroke, target)
  end

  def reset_oneshot_key_bindings
    @oneshot_key_bindings.clear
  end

  def add_default_key_binding_by_keymap(keymap, keystroke, target)
    @default_key_bindings[keymap].add(keystroke, target)
  end

  def add_default_key_binding(keystroke, target)
    add_default_key_binding_by_keymap(@keymap_label, keystroke, target)
  end

  def read_lines(lines, file = nil)
    if not lines.empty? and lines.first.encoding != Reline.encoding_system_needs
      begin
        lines = lines.map do |l|
          l.encode(Reline.encoding_system_needs)
        rescue Encoding::UndefinedConversionError
          mes = "The inputrc encoded in #{lines.first.encoding.name} can't be converted to the locale #{Reline.encoding_system_needs.name}."
          raise Reline::ConfigEncodingConversionError.new(mes)
        end
      end
    end
    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, if_stack)
        next
      end

      next if if_stack.any? { |_no, skip| skip }

      case line
      when /^set +([^ ]+) +(.+)/i
        # value ignores everything after a space, raw_value does not.
        var, value, raw_value = $1.downcase, $2.partition(' ').first, $2
        bind_variable(var, value, raw_value)
      when /^\s*(?:M|Meta)-([a-zA-Z_])\s*:\s*(.*)\s*$/o
        bind_key("\"\\M-#$1\"", $2)
      when /^\s*(?:C|Control)-([a-zA-Z_])\s*:\s*(.*)\s*$/o
        bind_key("\"\\C-#$1\"", $2)
      when /^\s*(?:(?:C|Control)-(?:M|Meta)|(?:M|Meta)-(?:C|Control))-([a-zA-Z_])\s*:\s*(.*)\s*$/o
        bind_key("\"\\M-\\C-#$1\"", $2)
      when /^\s*("#{KEYSEQ_PATTERN}+")\s*:\s*(.*)\s*$/o
        bind_key($1, $2)
      end
    end
    unless if_stack.empty?
      raise InvalidInputrc, "#{file}:#{if_stack.last[0]}: unclosed if"
    end
  end

  def handle_directive(directive, file, no, if_stack)
    directive, args = directive.split(' ')
    case directive
    when 'if'
      condition = false
      case args
      when /^mode=(vi|emacs)$/i
        mode = $1.downcase
        # NOTE: mode=vi means vi-insert mode
        mode = 'vi_insert' if mode == 'vi'
        if @editing_mode_label == mode.to_sym
          condition = true
        end
      when 'term'
      when 'version'
      else # application name
        condition = true if args == 'Ruby'
        condition = true if args == 'Reline'
      end
      if_stack << [no, !condition]
    when 'else'
      if if_stack.empty?
        raise InvalidInputrc, "#{file}:#{no}: unmatched else"
      end
      if_stack.last[1] = !if_stack.last[1]
    when 'endif'
      if if_stack.empty?
        raise InvalidInputrc, "#{file}:#{no}: unmatched endif"
      end
      if_stack.pop
    when 'include'
      read(File.expand_path(args))
    end
  end

  def bind_variable(name, value, raw_value)
    case name
    when 'history-size'
      begin
        @history_size = Integer(value)
      rescue ArgumentError
        @history_size = 500
      end
    when 'isearch-terminators'
      @isearch_terminators = retrieve_string(raw_value)
    when 'editing-mode'
      case value
      when 'emacs'
        @editing_mode_label = :emacs
        @keymap_label = :emacs
        @keymap_prefix = []
      when 'vi'
        @editing_mode_label = :vi_insert
        @keymap_label = :vi_insert
        @keymap_prefix = []
      end
    when 'keymap'
      case value
      when 'emacs', 'emacs-standard'
        @keymap_label = :emacs
        @keymap_prefix = []
      when 'emacs-ctlx'
        @keymap_label = :emacs
        @keymap_prefix = [?\C-x.ord]
      when 'emacs-meta'
        @keymap_label = :emacs
        @keymap_prefix = [?\e.ord]
      when 'vi', 'vi-move', 'vi-command'
        @keymap_label = :vi_command
        @keymap_prefix = []
      when 'vi-insert'
        @keymap_label = :vi_insert
        @keymap_prefix = []
      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(raw_value)
    when 'vi-ins-mode-string'
      @vi_ins_mode_string = retrieve_string(raw_value)
    when 'emacs-mode-string'
      @emacs_mode_string = retrieve_string(raw_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)
    str = $1 if str =~ /\A"(.*)"\z/
    parse_keyseq(str).map { |c| c.chr(Reline.encoding_system_needs) }.join
  end

  def bind_keyruby/racc/parser-text.rb000064400000043773150403134340011253 0ustar00})/ 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)
    str.scan(KEYSEQ_PATTERN).flat_map do |notation|
      key_notation_to_code(notation)
    end
  end

  def reload
    reset_variables
    read
  end

  private def seven_bit_encoding?(encoding)
    encoding == Encoding::US_ASCII
  end
end
ruby/reline/terminfo.rb000064400000012564150403134330011157 0ustar00 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):
	  ignore non-string name modules.  [ruby-core:42244][Bug #5938]

Mon Jan 23 18:18:58 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* encoding.c (rb_enc_compatible): fix segv on symbols.
	  [ruby-core:42204] [Bug #5921]

Tue Jan 17 17:18:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (SPT_TYPE): enable as SPT_REUSEARGV on Darwin.

	* missing/setproctitle.c (ruby_init_setproctitle): changed prefix.

Mon Jan 16 16:41:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (Regexp): fix incorrect options when casting to
	  a Regexp, and suppress encoding option warnings.
	  https://github.com/ruby/ruby/pull/82

Fri Jan 13 15:22:43 2012  Tanaka Akira  <akr@fsij.org>

	* time.c (TIME_COPY_GMT): copy vtm.utc_offset and vtm.zone too.
	  patch by Tomoyuki Chikanaga.
	  [ruby-dev:44827] [Bug #5586]

Thu Jan 12 13:52:13 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for
	  reserving a memory space with ALLOCA_N for restoring machine stack
	  stored in cont->machine_stack, but clang optimized out it (and
	  maybe #5851 is also caused by this).
	  This affected TestContinuation#test_check_localvars.

	* cont.c (cont_restore_1): revert workaround introduced in r32201.

Thu Jan 12 01:40:33 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't
	  accept the block argument.

Sat Jan  7 22:46:36 2012  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/baseparser.rb: use private instead of _xxx
	  method name. This is Ruby code not Python code.
	  refs #5696

Tue Jan 03 23:57:37 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* lib/rexml/parsers/baseparser.rb: rexml BaseParser uses
	  instance_eval unnecessarily on listener add.
	  patch from Charles Nutter. [Bug #5696] [ruby-core:41437]

Tue Jan 03 19:13:05 2012  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>

	* test/rexml/test_sax.rb: add require 'rexml/document'.
	  [Backport #5834] [ruby-dev:45079]

Tue Jan  3 19:05:42 2012  Naohisa Goto  <ngotogenome@gmail.com>

	* include/ruby/defines.h (FLUSH_REGISTER_WINDOWS): move sparc asm code
	  to a separete file sparc.c for preventing inlining optimization.
	  Patched by Jurij Smakov. [Bug #5244] [ruby-core:40685]
	* sparc.c (rb_sparc_flush_register_windows): ditto.
	* configure.in: ditto.

Mon Jan  2 23:52:20 2012  TAKAO Kouji  <kouji@takao7.net>

	* ext/readline/readline.c (Init_readline): libedit check
	  rl_getc_function only when rl_initialize() is called, and
	  using_history() call rl_initialize(). This assignment should be
	  placed before using_history(). [ruby-core:40641] [Bug #5539]

Mon Jan  2 23:47:58 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/rbinstall.rb (install_recursive, bin-comm): split mere
	  string not path name.  [ruby-core:40462] [Bug #5492]

Mon Jan  2 23:41:57 2012  Tajima Akil <artonx@yahoo.co.jp>

	* win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010.
	  [Bug #5243]

Mon Jan  2 21:40:45 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* tool/merger.rb (#version_up): version.h date should be Japanese
	  locale date.

Mon Jan  2 21:36:56 2012  Luis Lavena  <luislavena@gmail.com>

	* configure.in: check -fno-omit-frame-pointer acceptance and usage
	  under MinGW. [ruby-core:39957] [Bug #5407]

Mon Jan  2 20:05:10 2012  NARUSE, Yui  <naruse@ruby-lang.org>

	* include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.
	  patched by The Written Word Inc. [ruby-core:40422] [Bug #5489]

Mon Jan  2 20:00:01 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/pty/pty.c (pty_check): should return nil until the child
	  terminates or stops.  [ruby-dev:44600] [Bug #2642]

Mon Jan  2 19:27:18 2012  Yusuke Endoh  <mame@tsg.ne.jp>

	* thread.c (update_coverage): skip coverage count up if the current
	  line is out of the way.  rb_sourceline() is unreliable when source
	  code is big.  [ruby-dev:44413]

	* test/coverage/test_coverage.rb: add a test for above.

Mon Jan  2 19:08:54 2012  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (gvl_yield): don't prevent concurrent sched_yield().
	  [Bug #5130] [ruby-core:38647]

Mon Jan  2 18:54:52 2012  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/configure.bat: disable delayed expansion of enironment variable.
	  [Bug #5517] [ruby-core:40531]

Wed Dec 28 11:22:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/fileutils.rb (FileUtils::Entry_#entries): use utility method
	  instead of typoed regexp.  [ruby-core:41829] [Bug #5817]

Thu Dec 15 10:44:54 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_reject_bang, rb_ary_delete_if): update rdoc.
	  documentation from Thomas Leitner <t_leitner AT gmx.at> in
	  [ruby-core:41616].  [Bug #5752]

Wed Dec 14 15:28:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (str_encode): about the extension of :fallback
	  option since 1.9.3.

Tue Oct  4 06:43:47 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: update psych version.
	* ext/psych/psych.gemspec: generate new gemspec for new version.

Tue Oct  4 06:29:55 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.
	* ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
	  in order to avoid YAML::ENGINE switching from replacing this methruby/racc/grammarfileparser.rb000064400000035477150403134330012501 0ustar00ssed to the YAMLTree visitor.

Tue Oct  4 05:47:23 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODING
	  for 1.9.2 backwards compatibility.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string
	  generation for 1.9.2 backwards compatibility.

Fri Sep  2 04:05:25 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged as
	  ascii-8bit as binary in YAML.
	* test/psych/test_string.rb: corresponding test.

Wed Dec  7 19:04:22 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rpath): fix typo in the help string.  a patch from
	  Yuji Yamano <yyamano AT kt.rim.or.jp> in [ruby-list:48568].

Wed Nov 30 18:22:10 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* complex.c (nucomp_rationalize): fix function.  [ruby-core:40667]
	  [Bug #5546]

Thu Nov 17 10:36:46 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
	  also closed. [ruby-core:41088]

Wed Nov 30 02:58:46 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (dbl2ival): Fix Float#divmod and #round for 32 bit
	  platform. part 1 of [bug #5276]

Wed Nov 30 02:58:46 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (flo_round): Fix criteria for 32 bits platform
	  part 2 of [bug #5276]

Wed Nov 30 02:37:32 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (flo_round): Make Float#round round big values [bug
	  #5272]

Wed Nov 30 02:37:32 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (flo_round): substitute machine dependent magic number.

Wed Nov 30 02:28:22 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (int_round): Integer#round always returns an Integer [Bug
	  #5271]

Fri Nov  4 01:56:30 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (make_writeconv): unversal_newline converter is for reading.
	  so, if the io is text mode and has ECONV_UNIVERSAL_NEWLINE_DECORATOR
	  flag, use crlf_newline converter for writing.
	  this change fixes the problem about the luck of CR up Kernel.p and
	  Kernel.puts to stdout/stderr on Windows.

Mon Nov  7 23:39:23 2011  Tajima Akio <artonx@yahoo.co.jp>

	* io.c (io_fflush): remove fsync().
	* io.c (rb_io_flush, rb_io_rewind): fsync() here.
	  These pathces are backports of trunk r33651 for [Bug #5585]

Mon Oct 10 22:33:12 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/-ext-/old_thread_select/test_old_thread_select.rb:
	  select() with timeout may return early in old Linux kernels
	  with 250 Hz tickrate and no dynticks, so skip everything older
	  than 2.6.32 (which has long term support).
	  And, Make the timing assertions consistently use assert_operator with
	  timing difference in error message
	  Patch by Eric Wong. [Bug #5335] [ruby-core:39618]

Tue Oct  4 16:17:50 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/time.rb (Time.strptime): use Time.at if d[:seconds] is set.
	  Reported by Christopher Eberz. [ruby-core:39903] Bug #5399

Tue Oct  4 11:44:10 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.

Mon Oct  3 23:56:39 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (rb_gc_set_params): output GC parameter change messages only
	  if -w/-v options are specified. these messages are output to stderr,
	  not to stdout. [ruby-core:39795] [Bug #5380]

	* test/ruby/test_gc.rb (test_gc_parameter): add test for it.

Wed Sep 28 09:14:16 2011  Nobuyoshi Nakada  <>

	* configure.in (pthread_np.h): needs pthread.h to be included
	  previously on OpenBSD.  a patch by George Koehler <xkernigh AT
	  netscape.net> at [ruby-core:39752].  [Bug #5376]

Tue Sep 13 15:02:48 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/pstore.rb (PStore): always open in binary mode even if
	  default encodings are set.  [Bug #5311] [ruby-core:39503]

Sat Oct  8 07:31:42 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (ary_join_1): should not copy the encoding of non-string
	  element after string element.  [ruby-core:39776] [Bug #5379]

Sat Oct  8 06:51:46 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.11.  Move Deprecate into the
	  Gem namespace.

Sat Oct  8 06:37:08 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (rb_gc_set_params): output GC parameter change messages only
	  if -w/-v options are specified. these messages are output to stderr,
	  not to stdout. [ruby-core:39795] [Bug #5380]

	* test/ruby/test_gc.rb (test_gc_parameter): add test for it.

Sat Oct  8 06:26:24 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (add_heap_slots, init_heap): reset heaps_inc zero when
	  heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS.
	  [ruby-core:39777] [Bug #5380]

	* test/ruby/test_gc.rb (test_gc_parameter): add test for it.

	* test/ruby/envutil.rb (assert_normal_exit): add :child_env option to
	  enable pass environemnt variables to child process.

Sat Oct  8 05:45:28 2011  Eric Hodel  <drbrain@segment7.net>

	* proc.c (proc_call):  Update documentation to match argument handling
	  of proc/Proc.new/lambda/->()

Sat Oct  8 05:38:29 2011  Eric Hodel  <drbrain@segment7.net>

	* proc.c (proc_call):  Fix documentation of Proc#call vs Proc#===.
	  [Ruby 1.9 - Bug #5349]

Tue Sep 27 13:05:39 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_asn1.c: fix int_ossl_asn1_decode0_cons when being
	  fed arbitrary string values.
	  Clearly distinguish between the cases "universal, infinite and
	  not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly
	  infinite". Raise error for universal tags that are not infinite.
	* test/openssl/test_asn1.rb: add a test for this.

	  Thanks to Hiroshi Yoshida for reporting this bug.
	  [Bug #5363] [ruby-dev:44542]

Sat Sep 17 23:34:10 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_data_type): inherit the core type in ripper so
	  that checks in core would work.  [ruby-core:39591] [Bug #5331]

Fri Sep 23 14:15:01 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_asn1.c
	  ext/openssl/ossl_pkey.c: Remove unused variables.

Fri Sep 23 06:54:44 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r33315 from trunk.

	* test/openssl/test_ssl_session.rb: execute test_session_exts_read
	  only for OpenSSL versions >= 0.9.8k. Thanks, Eric Wong, for
	  reporting this.
	  [Bug #4961] [ruby-core:37726]

Fri Sep 23 12:18:52 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r33311 from trunk.

	* test/openssl/test_ssl_session.rb: ensure server calls callbacks in
	  test_ctx_server_session_cb. Thanks to Eric Wong for the patch.
	  [Bug #5336] [ruby-core:39619]

Thu Sep 22 19:45:22 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* thread_pthread.c (ubf_select): activate timer thread when interrupt
	  blocking thread.
	  A patch created by Koichi Sasada. [ruby-core:39634] [Bug #5343]
	  to cover race condition, timer thread periodically send SIGVTARLM to
	  threads in signal thread list. so you should activate timer thread
	  when interrupt a thread.

Wed Sep 21 16:57:03 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/io/wait/test_io_wait.rb (TestIOWait#setup): of course, the
	  behavior of mingw is just same with mswin.

Sat Sep 17 22:21:26 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm.c (rb_vm_make_env_object, rb_vm_get_sourceline): export as a
	  workaround for ruby-debug19 for the time being.
	  [ruby-core:38972] [Bug #5193]

Fri Sep 16 01:08:19 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* NEWS: cosmetic changes.

Wed Sep 14 12:39:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: do not use gcc-4.2 as the default compiler.

	* NEWS: describe the issue about Xcode.

Wed Sep 14 11:46:30 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_fd_rcopy): added an argument guard.
	  Patch by NAKAMURA Usaku. [Bug #5306] [ruby-core:39435]

Tue Sep 13 09:28:58 2011  Koichi Sasada  <ko1@atdot.net>

	* NEWS: wrote about rb_reserved_fd_p() and objspace.

Mon Sep 12 20:47:52 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread.c (rb_thread_select): fix a typo to initialize efds
	  properly.  [Bug #5299] [ruby-core:39380]

Mon Sep 12 20:41:20 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_select): fix to ignore an argument
	  modification of rb_thread_fd_select().
	  based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435]
	* thread.c (rb_fd_rcopy): New. for reverse fd copy.

	* test/-ext-/old_thread_select/test_old_thread_select.rb
	(test_old_select_false_positive): test for bug5306.

	* ext/-test-/old_thread_select/old_thread_select.c (fdset2array):
	  New. convert fdsets to array.
	* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
	  return 'read', 'write', 'except' argument of rb_thread_select()
	  to ruby script.

Tue Sep  6 13:15:44 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (load_encoding): predefined encoding names are safe.
	  [ruby-dev:44469] [Bug #5279]

	* transcode.c (load_transcoder_entry): ditto.

Fri Sep  9 16:02:04 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* insns.def (concatstrings): don't use initial ASCII-8BIT string.
	  [ruby-core:38635] [Bug #5126]

Thu Sep  8 21:17:36 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: import nkf 2.1.2 (be9c280)
	  Bump version number/release date only.

Wed Sep  7 23:42:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_next_argv): open in default text mode.
	  [ruby-core:39234] [Bug #5268]

Mon Sep  5 15:06:55 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/rubygems/test_gem_security.rb
	  (test_class_build_self_signed_cert): reset opt[:trust_dir] to apply
	  temporary Gem.user_home.

Sun Sep  4 00:56:58 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* backport r33177 from trunk.

	* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
	  add a test. Unlike TestThread#test_no_valid_cfp,
	  this test succeeds even if win32ole is required (see r33153).

Fri Sep  2 21:11:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (validate_enc_binmode, prep_stdio): default to text mode on
	  dosish platforms.  [ruby-core:38822] [Bug #5164]

	* transcode.c (rb_econv_prepare_options): keep default ecflags
	  unchanged if no options.

Fri Sep  2 14:36:47 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* vm_insnhelper.c (vm_search_const_defined_class): search
	  ancestors only when global scope.  [ruby-core:39227] [Bug #5264]

Fri Sep  2 09:58:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_tokadruby/racc/state.rb000064400000047471150403134340010114 0ustar00_cfp): skip when
	  win32ole is required.  in such case, win32ole redefines
	  Thread#initialize, and the block argument becomes to be not the top
	  of the thread, then this testcase always fails.

Wed Aug 31 16:02:45 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).

Wed Aug 31 13:19:31 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* numeric.c (flo_round): Avoid overflow by optimizing for trivial
	  cases
	  [Bug #5227]

Wed Aug 31 06:45:32 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: fix r32835. $withval can't be used outer AC_ARG_WITH().

Wed Aug 31 05:29:03 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_select_with_thread): and my typo. we all must
	  be more careful.

Wed Aug 31 05:28:45 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* thread.c (rb_thread_select): critical typo in r33117.

Wed Aug 31 05:28:26 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/-ext-/old_thread_select/test_old_thread_select.rb
	  (TestOldThreadSelect#test_old_select_read_timeout): if the machine
	  is fast enough, the time used by code around IO.select may be smaller
	  than Time implement threshold.

Wed Aug 31 05:27:59 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
	  typo.

	* test/-ext-/old_thread_select/test_old_thread_select.rb
	  (TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
	  of SIGUSR1 because the former is general and the latter is platform
	  dependent.

Wed Aug 31 05:26:30 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implement
	  for rb_thread_select() in thread.c.  the use of rb_fd_copy() is
	  introduced in r33117.
	  [Bug #5229] [ruby-core:39102]

	* thread.c (rb_thread_select): must call rb_fd_init() before using
	  rb_fdset_t.  see the implementations of rb_fd_init()s if you want to
	  know the reason.

Tue Aug 30 11:25:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
	  [Bug #5173] [ruby-core:38866]

Tue Aug 30 09:53:59 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (fiber_entry): fix stack allocation failure on Debian
	  GNU/kFreeBSD.
	  Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>.
	  [Bug #5241] [ruby-core:39147]

Tue Aug 30 09:52:29 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* backport r33117 from trunk.

	* thread.c (rb_thread_select): rewrite by using
	  rb_thread_fd_select(). old one is EINTR unsafe.
	  Patch by Eric Wong. [Bug #5229] [ruby-core:39102]

	* test/-ext-/old_thread_select/test_old_thread_select.rb:
	  a testcase for rb_thread_select().
	* ext/-test-/old_thread_select/old_thread_select.c: ditto.
	* ext/-test-/old_thread_select/depend: ditto.
	* ext/-test-/old_thread_select/extconf.rb: ditto.

Tue Aug 30 09:16:17 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: fix a build failure on GNU Hurd.
	  Patch by Samuel Thibault <sthibault at debian dot org>. Thank you!
	  [Bug #5250] [ruby-core:39185]

Sun Aug 28 15:38:17 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* backport r33106 from trunk.

	* ext/date/date_parse.c (date_zone_to_diff): keep a temporary string
	  stored in variable while the contents buffer is beeing used.

	* ext/date/date_parse.c (date_zone_to_diff): get rid of out of bounds
	  memory read. [ruby-dev:44409] [Bug #5213]

Sun Aug 28 05:29:50 2011  Ryan Davis  <ryand-ruby@zenspider.com>

	* backport r33102 from trunk.

	* lib/minitest/*: Imported minitest 2.5.1 (r6596)
	* test/minitest/*: ditto

Sat Aug 27 20:54:54 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* backport r33099 from trunk.

	* vm.c (rb_vm_rewrite_dfp_in_errinfo): change return type
	  to suppress a warning.

	* vm_core.h: ditto.

Sat Aug 27 19:03:44 2011  Kazukruby/racc/sourcetext.rb000064400000001033150403134330011160 0ustar00in@segment7.net>

	* backport r33087 from trunk.

	* lib/open-uri.rb:  Fix indentation of OpenURI::OpenRead#open.  Use ++
	  instead of `' for method arguments in open-uri.rb

Sat Aug 27 07:22:07 2011  Eric Hodel  <drbrain@segment7.net>

	* backport r33086 from trunk.

	* ext/pathname/lib/pathname.rb:  Fix typos and grammar mistakes.  Patch
	  by Luke Gruber.  [#5203]
	* ext/pty/lib/expect.rb:  ditto
	* lib/mathn.rb:  ditto
	* lib/net/http.rb:  ditto
	* lib/open-uri.rb:  ditto
	* lib/ostruct.rb:  ditto
	* lib/tempfile.rb:  ditto
	* lruby/racc/exception.rb000064400000000420150403134330010750 0ustar00/cipher.rb:  ditto

Thu Aug 25 09:25:48 2011  Eric Hodel  <drbrain@segment7.net>

	* backport r33065 from trunk.

	* ext/openssl/ossl_digest.c:  Document OpenSSL::Digest::digest and add
	  an example to OpenSSL::Digest.  Patch by Sylvain Daubert.
	  [Ruby 1.9 - Bug #5166]ruby/racc/logfilegenerator.rb000064400000012055150403134330012311 0ustar00.c (int_round): Fix Integer#round [ruby-core:39096]

Thu Aug 25 06:51:08 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: Fixing psych version number.

Thu Aug 25 06:11:35 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to be
	  UTF-8.
	* test/psych/test_encoding.rb: test yaml dump encoding.

Wed Aug 24 08:53:06 2011  Eric Hodel  <drbrain@segment7.net>

	* backport r33043 from trunk.

	* lib/rdoc:  Update to RDoc 3.9.3.  Fixes RDoc with `ruby -Ku`.  Allows
	  HTTPS image paths to be turned into <img> tags.  Prevents special
	  markup inside <tt> from being processed.

Wed Aug 24 07:57:43 2011  Eric Hodel  <drbrain@segment7.net>

	* backport r33040 from trunk.

	* lib/rubygems:  Update to RubyGems 1.8.9.  Fixes uninstalling multiple
	  gems and gem cleanup.

Wed Aug 24 06:45:20 2011  Ryan Davis  <ryand-ruby@zenspider.com>

	* backport r33036 from trunk.

	* lib/minitest/*: Imported minitest 2.5.0 (r6557)
	* test/minitest/*: ditto

Tue Aug 23 15:23:56 2011  Eric Hodel  <drbrain@segment7.net>

	* backport r33027 from trunk.

	* load.c (rb_f_require):  Improve documentation of Kernel#require.
	  [Ruby 1.9 - Bug #5210]

Tue Aug 23 15:11:48 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* backport r33023 from trunk.

	* ext/zlib/zlib.c (gzfile_read_header): Ensure that each section of
	  gzip header is readable to avoid SEGV.

	* test/zlib/test_zlib.rb (test_corrupted_header): Test it.

Mon Aug 22 23:43:33 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* backport r33021 from trunk.

	* sprintf.c (rb_str_format): add RB_GC_GUARD to prevent temporary
	  strings from GC.

Sun Aug 21 17:58:38 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* backport r33019 from trunk.

	* iseq.c (iseq_s_disasm): remove variable which is no longer used
	  since r33013.

Sun Aug 21 14:20:58 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* configure.in: use LD_LIBRARY_PATH_64 on 64-bit Solaris.

Sun Aug 21 11:13:54 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* backport r32895 from trunk.

	* ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg
	  should be used to handle shorter return value. fix [Bug #3861]
	  [ruby-core:32504]

	* ext/fiddle/closure.c (callback): ditto

	* ext/fiddle/conversions.h (fiddle_generic): ditto

	* ext/fiddle/conversions.c (value_to_generic): char, short and int
	  are strictly distinguished on big-endian CPU, e.g. sparc64.

Sat Aug 20 13:28:32 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* backport r33013 from trunk.

	* iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.

	* test/ruby/test_method.rb (test_body): add a test for the above change.

Sat Aug 20 10:43:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): return new string if nil
	  is explicitly given as a buffer ([Bug #5207]), otherwise set the
	  encoding.  also removed dead code.

Fri Aug 19 14:25:51 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (proc_spawn_v, proc_spawn): should not wait the
	  spawned process.

	* process.c (proc_spawn_v): fix missing argument, and try with
	  /bin/sh only if failed with ENOEXEC.

Fri Aug 19 14:12:57 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* backport r33007 from trunk.

	* lib/net/imap.rb (idle): raises a Net::IMAP::Error when the
	  connection is closed.  based on the patch by Hugo Barauna.
	  [Bug #5190] [ruby-core:38930]

Fri Aug 19 11:28:58 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* backport r33001 from trunk.

	* lib/net/imap.rb (msg_att): accepts extra space before ')'.
	  based on the patch by art lussos.  [Bug #5163] [ruby-core:38820]

Wed Aug 17 15:27:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* backport r32996 from trunk.

	* ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
	  add a new function for raising error when an object cannot coerce
	  into BigDecimal.  [Bug #5172]

	* ext/bigdecimal/bigdecimal.c (BigDecimalValueWithPrec): use
	  cannot_be_coerced_into_BigDecimal function.

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.

	* ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.

	* test/bigdecimal/test_bigdecimal.rb: test for the avobe changes.

	* test/bigdecimal/testbase.rb (under_gc_stress): add a new utility
	  method to run tests under the condition of GC.stress = true.

Wed Aug 17 10:16:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* backport r32994 from trunk.

	* rational.c (nurat_coerce): Rational#coerce should converts itself
	  into Complex if the argument is a Complex with non-zero imaginary
	  part.  [Bug #5020] [ruby-dev:44088]

	* test/ruby/test_rational.rb (test_coerce): test for the above change.

Wed Aug 17 06:33:19 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32992 from trunk.

	* ext/openssl/ossl_x509cert.c: Add class documentation for
	  OpenSSL::X509::Certificate.

Wed Aug 17 05:02:25 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32987 from trunk.

	* ext/openssl/ossl_pkey.c: corrected docs, OpenSSL::PKey::DH does
	  *not* support #sign/verify.

Tue Aug 16 18:56:54 2011  Nobuyoshi Nakada  <nobu@ruby-lruby/racc/iset.rb000064400000002364150403134330007727 0ustar00sl.c: Support disabling OpenSSL compression.

	* test/openssl/test_ssl.rb: Add a test for it.
	  Thanks to Eric Wong for the patch.
	  [Ruby 1.9 - Feature #5183] [ruby-core:38911]

Sat Aug 13 22:17:27 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* tool/mkconfig.rb: do not make the entries related to sitedir and
	  verdordir if disabled by --without options.  [ruby-core:38922]
	  [Bug #5187]

Sat Aug 13 17:06:57 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: [ruby-core:38861]

Sat Aug 13 16:59:51 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* test/date/test_*.rb: added tests.

Sat Aug 13 09:36:19 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/date/date_parse.c (parse_ddd_cb): fix r32896. RB_GC_GUARD
	  insertion position was mistaken. [ruby-dev:44337] [Bug #5152]

Sat Aug 13 09:26:24 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.
	  [ruby-core:38913]

	* test/psych/test_yaml.rb: corresponding test.

Sat Aug 13 09:15:16 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (date_strftime_alloc): followed the change
	  of r32885.

	* NEWS: followed the above change.

Sat Aug 13 08:49:05 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_cruby/racc/info.rb000064400000000451150403134340007712 0ustar00arget slots are not found, we
	  try heap_increment() because it might be able to expand the
	  heap. [Bug #5127] [ruby-dev:44285]

	* gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
	  interrupted, we expand the heap if at all possible.

Fri Aug 12 12:28:17 2011  Eric Hodel  <drbrain@segmruby/racc/statetransitiontable.rb000064400000017521150403134340013230 0ustar00 vm.c (thread_free): use free because objspace is not ready.

	* vm.c (th_init): use malloc because objspace is not ready.

Thu Aug 11 19:04:38 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* backport r32931 from trunk.

	* variable.c (autoload_delete): An autoload entry is still in a
	  RCLASS_IV_TBL, not in a RCLASS_CONST_TBL, so take back the table
	  changed in r29600. And an autoload entry keeps not a
	  rb_const_entry_t but a NODE so remove rb_const_entry_t thing added
	  in r29602.

Thu Aug 11 15:07:36 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (link_command): use LIBRUBYARG in rbconfig for
	  unbundled extensions.  [ruby-core:38802] [Bug #5147]

	* lib/mkmf.rb (init_mkmf): revert r32902.  [ruby-core:38903]

Wed Aug 10 19:30:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* backport r32903 from trunk.

	* complex.c (nucomp_rationalize): calls rationalize of real part if
	  imaginary part is exactly zero.  The patch is made by Marc-Andre
	  Lafortune.  fixes [Bug #5178] [ruby-core:38885]

	* test/ruby/test_complex.rb (test_rationalize): add a test for the
	  above change.

	* complex.c (nucomp_to_r): fix RDoc comment.  The patch is made by
	  Marc-Andre Lafortune.

Wed Aug 10 14:11:07 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (init_mkmf): set $LIBRUBYARG regardless of shared
	  option.  [ruby-core:38802] [Bug #5147]

Wed Aug 10 02:57:01 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb: come back autoload. OpenSSL constant is used
	  some places, so it leads mistakes like HTTP.start.

Tue Aug  9 22:57:45 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/date/date_parse.c (date_zone_to_diff): add RB_GC_GUARD.
	  [ruby-dev:44337] [Bug #5152]

	* ext/date/data_parse.c (parse_ddd_cb): ditto.

Tue Aug  9 12:20:33 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.
	  [ruby-core:38853] [Bug #5168]

	* test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc
	  and libm version numbers for detecting default libc and libm.

Tue Aug  9 10:49:52 2011  Igor Zubkov  <igor.zubkov@gmail.com>

	* array.c: Fix typo. https://github.com/ruby/ruby/pull/36

Mon Aug  8 00:10:45 2011  Akinori MUSHA  <knu@iDaemons.org>

	* test/test_syslog.rb (TestSyslog#test_log): Do not be too
	  specific about the log line format.  Fixes #5081.

Sun Aug  7 23:39:44 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* time.c (rb_strftime_alloc): raise ERANGE if width is too large.
	  Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]

	* test/ruby/test_time.rb (class TestTime): add a test for the
	  above change.

Sun Aug  7 14:15:10 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* backport r32876 from trunk.

	* ext/objspace/objspace.c: fix typos in a document.

Sun Aug  7 04:42:36 2011  Eric Hodel  <drbrain@segment7.net>

	* marshal.c (w_object):  Fix exception message when _dump_data
	  is not defined on a T_DATA object.

Sat Aug  6 06:14:20 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to 3.9.1.  Fixes === lines in verbatim sections.
	  Fixes :nodoc: on class aliases.  Fixes :stopdoc: creating references
	  to Object.  Fixes spacing when class comments are merged in ri.
	  Fixes `ri []` crash.  Fixes bug report URL when rdoc crashes.  Adds
	  :doc: and :nodoc: to allow hiding of implementation details in ruby.
	  Makes `rdoc` and `ri` gem-aware.

Sat Aug  6 03:19:45 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Import RubyGems 1.8.7:
	  Added missing require for `gem uninstall --format-executable`.

	  The correct name of the executable being uninstalled is now displayed
	  with --format-executable.

	  Fixed `gem unpack uninstalled_gem` default version picker.

	  RubyGems no longer claims a nonexistent gem can be uninstalled.

	  `gem which` no longer claims directories are requirable files.

	  `gruby/racc/parser.rb000064400000043666150403134340010272 0ustar009".  [ruby-dev:44355] fix [Bug #5159]

	* math.c: ditto.

Thu Aug  5 10:09:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* backport r32846 from trunk.

	* thread_pthread.c (native_cond_signal): retry to call pthread_cond_signal
	  and pthread_cond_broadcast if they return EAGAIN in
	  native_cond_signal and native_cond_broadcast, respectively.
	  It is for the pthread implementation of Mac OS X 10.7 (Lion).
	  fixes #5155.  [ruby-dev:44342].

	* thread_pthread.c (native_cond_broadcast): ditto.

	* thread_pthread.c (struct cached_thread_entry): stop using
	  pthread_cond_t and its functions directly.

	* thread_pthread.c (register_cached_thread_and_wait): ditto.

	* thread_pthread.c (use_cached_thread): ditto.

Fri Aug  5 07:35:00 2011  Luis Lavena  <luislavena@gmail.com>

	* lib/rubygems/installer.rb (class Gem): Correct path check on Windows
	  Possible fix for [Ruby 1.9 - Bug #5111]

	* test/rubygems/test_gem_installer.rb (load Gem): ditto
	  Backported from trunk r32804

Fri Aug  5 07:00:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/io/console/test_io_console.rb (test_noctty): daemon() on
	  Fedora Rawhide seems not to detach the controlling terminal,
	  when the argument noclose is non-zero.  ref: [Bug #5135]

Wed Aug  4 02:35:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: use build_os variable for checking C and C++ compilers
	  matching.

	* configure.in: use clang++ if clang is used.

Thu Aug  4 02:21:10 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (link_command): use static library only for bundled
	  extensions.  [Bug #5147]

Wed Aug  3 00:11:08 2011  Tanaka Akira  <akr@fsij.org>

	* lib/prettyprint.rb: update document.  [ruby-core:36776]


Tue Aug  2 20:10:16 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/testunit/test_parallel.rb: pass "--ruby" option to
	  test/testunit/tests_for_parallel/runner.rb. [Bug #5132] [ruby-dev:44303]
	  Backported from trunk r32812.

Tue Aug  2 12:03:16 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (recursive_hash): hash value of emptied hash should be
	  equal to an empty hash.  [ruby-core:38650]

Tue Aug  2 11:42:15 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_enc_symname2_p): :! is valid symbol.  [Bug #5136]

Tue Aug  2 03:26:02 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rake/test_rake_directory_task.rb (TestRakeDirectoryTask#
	  test_directory_win32): fixed wrong test.
	  backported r32670 from trunk.

Mon Aug  1 15:45:23 2011  Eric Hodel  <drbrain@segment7.net>

	* test/rake/test_rake_functional.rb:  Don't assume the binary name of
	  ruby is "ruby".  [Ruby 1.9 - Bug #5114]
	* test/rake/helper.rb:  ditto

Mon Aug  1 05:21:42 2011  TAKANO Mitsuhiro (takano32)  <tak@no32.tk>

	* cont.c (cont_save_thread): fix missing semicolon.

Sun Jul 31 22:57:16 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* enc/Makefile.in (ECHO1): Same as the recent fix in common.mk.
	  ":" in a make variable replacement cause a syntax error with
	  /usr/ccs/bin/make on Solaris.  Uses $(NULLCMD) instead.

Sun Jul 31 22:44:08 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* configure.in: fix typos.

Sun Jul 31 21:19:51 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* lib/mkmf.rb (configuration:ECHO1): Same as the recent fix in
	  common.mk.
	  ":" in a make variable replacement cause a syntax error with
	  /usr/ccs/bin/make on Solaris.  Uses $(NULLCMD) instead.

Sun Julruby/racc/debugflags.rb000064400000002455150403134340011070 0ustar00d.

	* configure.in (NULLCMD): new check.

	* Makefile.in (NULLCMD): Reflects checking in configure.

	* win32/Makefile.sub (NULLCMD): new assignment.

Sun Jul 31 11:31:07 2011  Kazuki Tsujimoto  <kazuki@callcc.net>

	* backport r32768 from trunk.

	* vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]

Sat Jul 31 01:23:45 2011  Kenta Murata  <mrkn@mrkn.jp>

	* backport r32762 from trunk.

	* test/bigdecimal/test_bigdecimal.rb (test_version): removed.

Sat Jul 30 23:51:44 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/cmath.rb (cbrt): should return a real number if possible.

Sat Jul 30 23:48:04 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: an issue that is same as  [ruby-dev:44071].

	* ext/date/date_strftime.c: identical to [ruby-dev:44112].

Sat Jul 30 23:19:09 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* defs/default_gems: separate from tool/rbinstall.rb.

Sat Jul 30 23:14:44 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_each_byte): rbuf can be refreshed during yield.
	  [Bug #5119]

Sat Jul 30 22:35:50 2011  Naohisa Goto  <ngotogenome@gmail.com>

	* strftime.c (NEEDS): avoid SEGV due to integer overflow in
	  sparc-solaris2.10 and i686-linux.  fix [Bug #4456] [ruby-dev:43284]

Sat Jul 30 14:27:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* backport r32754 fruby/racc/static.rb000064400000000211150403134340010240 0ustar00al.c (rb_register_sigaltstack): ditto.

	* vm_core.h: moved ALT_STACK_SIZE definition from signal.c.

	* vm.c (thread_free): use xfree() ruby/racc/parserfilegenerator.rb000064400000025124150403134340013026 0ustar00	* proc.c: pre-allocate the unlinked_method_entry_list_entry struct to
	  avoid memory allocation during GC.  based on a patch from Eric Wong.
	  [ruby-core:38498]

Mon Jul 25 22:36:11 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* backport r32669 from trunk.

	* proc.c (struct METHOD), gc.c (gc_marks), vm_method.c
	  (rb_gc_mark_unlinked_live_method_entries): fix SEGV bug.
	  rb_method_entry_t was free'd even when the method is still on the
	  stack if it is BMETHOD (i.e., Method#call).  This is because
	  rb_method_entry_t is embedded in struct METHOD.  This commit
	  separates them and marks the live method entries.
	  See [ruby-core:38449] in detail.  fix [Bug #5047] [ruby-core:38171]

Thu Jul 28 23:36:28 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/fiddle/closure.c (callback): use rb_ary_tmp_new() instead of
	  xmalloc() to allocate an array for arguments of callback procedure,
	  to prevent arguments from being swept by GC. [ruby-core:38546]
	  [Bug #4929]

Thu Jul 28 22:51:27 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* backport r32723 from trunk.

	* ext/openssl/ossl_cipher.c (ossl_cipher_initialize): Avoid possible
	  SEGV from AES encryption/decryption. Processing data by
	  Cipher#update without initializing key (meaningless usage of Cipher
	  object since we don't offer a way to export a key) could cause SEGV.

	  In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3)
	  allows uninitialized key, but other EVPs (such as AES) does not
	  allow it. Calling EVP_CipherUpdate() without initializing key causes
	  SEGV so we set the data filled with "\0" as the key by default. See
	  #2768.

	* test/openssl/test_cipher.rb: test it.

Thu Jul 28 04:53:31 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/delegate.rb:  Move file-level documentation to the appropriate
	  classes.

Thu Jul 28 00:33:47 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/fileutils/test_fileutils.rb: add OpenBSD case.
	  patched by Jeremy Evans [ruby-core:38530] see #5097

	* test/ruby/test_process.rb: ditto.

Wed Jul 27 17:59:46 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* include/ruby/missing.h: define __syscall if the platform has
	  __syscall in the library but doesn't define it in headers
	  for example Mac OS X.

Wed Jul 27 15:39:14 2011  Eric Hodel  <drbrain@segment7.net>

	* object.c:  Add usage documentation for BasicObject.  Based on patch
	  by Thomas Sawyer.  [Ruby 1.9 - Bug #5067]

Wed Jul 27 12:24:17 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/uninstaller.rb:  Add missing require and update
	  messaging to avoid confusion with uninstall --format-executable.
	  [Ruby 1.9 - Bug #4062]

Wed Jul 27 10:47:57 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems:  Update to RubyGems 1.8.6.1.

Wed Jul 27 10:04:06 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32690 from trunk.

	* test/openssl/test_pkcs12.rb: Add test and intermediate certificates.
	  [ Ruby 1.9 - Feature #3793 ] [ruby-core:32088]

Sat Jul 27 01:26:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* NEWS: add changes of bigdecimal and bigdecimal/util.

Wed Jul 27 01:13:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
	  zero or negative precision is error.  fixes #5098.
	  [ruby-dev:44210]

	* ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
	  specifying precision.  fixes #5098.  [ruby-dev:44210]

	* ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
	  for symmetry to BigDecimal() function with an Integer.
	  fixes #5098.  [ruby-dev:44210]

	* ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
	  for adapting other Numeric subclasses.  [ruby-dev:44245]

	* test/bigdecimal/test_bigdecimal_util.rb: add tests for the above
	  changes.

Wed Jul 27 00:54:38 2011  Kenta Murata  <mrkn@mrkn.jp>

	* bigdecimal/bigdecimal.c (VpDup) a new function for duplicating
	  a BigDecimal.

	* bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
	  BigDecimal from another BigDecimal using BigDecimal global function
	  or constructor.  [ruby-dev:44245]

Mon Jul 25 22:24:09 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* backport r32666 from trunk.

	* lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by
	  'Basic' header. Long username caused the base64 String truncation in
	  HTTP header which is not allowed. See #5046.

	* test/xmlrpc/test_webrick_server.rb: test it.

Mon Jul 25 15:36:07 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/lib/openssl/{x509.rb,ssl.rb}: Add deprecation warning
	  for openssl/{x509,ssl} usage. Users should require "openssl" instead
	  of "openssl/ssl" and "openssl/x509". Start of transition period
	  introduced by [ruby-dev:38018].

Mon Jul 25 13:50:33 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* backport r32662 from trunk.

	* ext/openssl/lib/openssl/x509.rb: Cosmetic change: move definition
	  introduced in r30152 to x509-internal.rb.

Mon Jul 25 13:35:20 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* backport r32658 from trunk.

	* ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Avoid randomly generated
	  SSLError from SSLSocket just after invoking SSLSocket#close.
	  OpenSSL's SSL_shutdown could try to send alert packet and it might
	  set SSLerr(global error stack) as the result. It causes the next
	  SSL read/write operation to fail by unrelated reason.

	  By design, we're ignoring any error at SSL_shutdown() so we clear
	  global error stack after SSL_shutdown is called. See #5039.

Sun Jul 24 20:29:53 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: refine the recvmsg test.

Sun Jul 24 20:02:31 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: fix the recvmsg test.

Sun Jul 24 08:42:51 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: test recvmsg allocates file descriptors for
	  fd passing even with MSG_PEEK.

	* ext/socket/ancdata.c: use the above test result.

Sun Jul 24 01:24:31 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems/specification.rb:  Restore behavior of
	  Gem::Specification#loaded.  [Ruby 1.9 - Bug #5032]

Sun Jul 24 01:14:49 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
	  directory. Current directory is not the top source directory when
	  the building process runs on other than there.

	* test/rake/test_rake_rake_test_loader.rb: ditto.

	* test/rake/test_rake_task_argument_parsing.rb
	  (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
	  when app.unix? is false.

Sun Jul 24 00:42:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* configure.in: change the default compiler to gcc-4.2 if target os
	  is OS X 10.7 (Lion).

Sat Jul 23 17:06:25 2011  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_update_max_fd): validate fd.

	* ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add
	  msg_peek_p argument for the declaration.

	* ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument.
	  assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd
	  when MSG_PEEK.
	  (rsock_discard_cmsg_resource): add msg_peek_p argument.
	  (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with
	  msg_peek_p argument.

	* ext/socket/unixsocket.c (unix_recv_io): call
	  rsock_discard_cmsg_resource with msg_peek_p argument.

Sat Jul 23 14:38:28 2011  Eric Hodel  <drbrain@segment7.net>

	* test/rake*: Remove dependencies on flexmock and session gems.
	  [Ruby 1.9 - Bug #4987]

Fri Jul 22 21:46:54 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround
	  of cfp consistency error problem on OS X 10.7 (Lion). It's
	  suspected llvm optimization bug.
	  [Bug #5076] [ruby-dev:44185]

Fri Jul 22 21:50:16 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/uri/generic.rb (WFKV_): unroll the loop of regexp.

	* lib/uri/generic.rb (URI.decode_www_form_component): ditto.

Fri Jul 22 21:49:48 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* enum.c (enum_inject): remove empty line to notify rdoc
	  Enumerable#reduce is alias. patched by milki@github.
	  https://github.com/ruby/ruby/pull/26

Fri Jul 22 21:49:28 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):
	  Allow HTTP/0.9 request which doesn't has any header or body.
	  patched by Felix Jodoin. [ruby-core:38040] [Bug #5022]

Fri Jul 22 21:45:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
	  before calling dlsym(). [ruby-dev:44091] [Bug #5021]

Fri Jul 22 19:05:47 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
	  access.

Fri Jul 22 13:55:59 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/net/http.rb:  Net::HTTP#finish is used to manually close
	  connections.  [Ruby 1.9 - Bug #5045]

Fri Jul 22 13:51:29 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/readline/readline.c:  Add examples for Readline.completion_proc=.
	  [Ruby 1.9 - Bug #5057]

Fri Jul 22 13:20:33 2011  Eric Hodel  <drbrain@segment7.net>

	* tool/rbinstall.rb (default gems):  Install executables into the fake
	  gem dir for Gem.bin_path.  [Ruby 1.9 - Bug #4485]

Fri Jul 22 13:03:12 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32609 from trunk.

	* ext/openssl/ossl_hmac.c: Revert checking return type of
	  HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.

Fri Jul 22 11:22:20 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32606 from trunk.

	* ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
	* ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
	  Thanks, Jared Jennings, for the patch.
	  [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]

Fri Jul 22 09:17:43 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32604 from trunk.

	* ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
	* test/openssl/test_engine.rb: Add a test for it.
	  Thanks to Ippei Obayashi for providing the patch.
	  [ Ruby 1.9 - Bug #5062 ] [ruby-dev:44173]

Fri Jul 22 06:39:34 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]

Thu Jul 21 20:02:11 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* thread.c (set_trace_func, thread_set_trace_func_m): reset tracing
	  state when set_trace_func hook is removed.  This is workaround patch
	  to force to reset tracing state that is broken by continuation call.
	  a patch from James M. Lawrence.  [Feature #4347] [ruby-core:34998]

	* test/ruby/test_continuation.rb (class TestContinuation): add a test
	  for above.  a patch from James M. Lawrence.

Thu Jul 21 20:59:59 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/aruby/observer.rb000064400000014604150403134340007703 0ustar00rentheses. they are not in
	  macro.

Sun Jul 17 08:07:31 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32563 from trunk

	* test/openssl/test_ssl_session.rb: add PEM SSL session without TLS
	  extensions. Use this as the default for the tests to ensure
	  compatibility with OpenSSL 0.9.7.
	  [ Ruby 1.9 - Bug #4961 ] [ruby-core:37726]

Sat Jul 16 17:29:20 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag.
	  Bug #4977

Sat Jul 16 11:18:26 2011  NAKAMURA Usakuruby/racc/grammar.rb000064400000054266150403134340010422 0ustar00
	* ext/digest/sha2/sha2.c (SHA256_Update, SHA512_Update): avoid Bus
	  Error caused by unalignment access on Sparc-Solaris (and possibly on
	  other similar environment.) This patch just do memcpy always instead
	  of checking architecture. I see no perf drop on my 64bit env. For
	  more details, see #4320.

	* test/digest/test_digest.rb: add test for unalignment access.


Thu Jul 14 12:40:07 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* backport r32537 from trunk.

	* ext/openssl/ossl.c (ossl_verify_cb): trap the exception from
	  verify callback of SSLContext and X509Store and make the
	  verification fail normally. Raising exception directly from callback
	  causes orphan resources in OpenSSL stack. Patched by Ippei Obayashi.
	  See #4445.

	* test/openssl/test_ssl.rb
	  (test_exception_in_verify_callback_is_ignored): test it.

Wed Jul 13 08:20:08 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb(Test::Unit::Options#process_args): Fix bug.
	  Fix process_args didn't return `@option` after r30939. Backported
	  r32526 from trunk.

Mon Jul 11 23:50:39 2011  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* time.c: can't compile time.c on AIX due to missing declaration for
	  ffs(). It is declared in strings.h on AIX. backported r32518 from
	  trunk.

Mon Jul 11 23:47:00 2011  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* thread_pthread.c (get_stack):  need to adjust stack addr for
	  [Bug #1813] on AIX. backported r32511 from trunk.

Mon Jul 11 15:17:03 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see
	  rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
	  platforms, introduced at r32433.
	  backported r32512 from trunk.

Sun Jul 10 23:58:55 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* version.h: 1.9.3 is no longer trunk.

Sun Jul 10 23:24:29 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* class.c (rb_mix_module): reverted r31873.
	  (check_mix_method_i, do_mix_method_i) reverted r31917.

	* test/ruby/test_module.rb (TestModule#test_mix_const): reverted
	  r31918.

Sun Jul 10 22:50:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (rmpd_power_by_big_decimal): fix
	  precision treatment errors.

	* test/bigdecimal/test_bigdecimal.rb: add tests for the above change.
	  fix precision treatment errors.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_power): precision argument
	  should be optional for its compatibility.

Sun Jul 10 22:38:09 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (var_ref): distinguish vcall from local variable
	  references.  based on a patch by Michael Edgar michael.j.edgar
	  AT dartmouth.edu.  Bug #5002

Sun Jul 10 21:51:29 2011  Koichi Sasada  <ko1@atdot.net>

	* internal.h: add comments (cautions).

Sun Jul 10 20:59:38 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb: Add new class variable `@@testfile_prefix`.
	  This is for changing test name prefix. (For testing)

	* test/testunit/tests_for_parallel/ptest_first.rb: Renamed from
	  test_first.rb

	* test/testunit/tests_for_parallel/ptest_second.rb: Renamed from
	  test_second.rb

	* test/testunit/tests_for_parallel/ptest_third.rb: Renamed from
	  test_third.rb

	* test/testunit/tests_for_parallel/ptest_forth.rb: Renamed from
	  test_forth.rb

	* test/testunit/tests_for_parallel/runner.rb: Remove misc.rb

	* test/testunit/tests_for_parallel/ptest_first.rb: ditto.

	* test/testunit/tests_for_parallel/ptest_second.rb: ditto.

	* test/testunit/tests_for_parallel/ptest_third.rb: ditto.

	* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.

	* test/testunit/tests_for_parallel/misc.rb: Removed because no longer
	  needed.

	* test/testunit/test_parallel.rb: Fix assertions for above.

Sun Jul 10 16:57:08 2011  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_throw): check a class frame.
	  Fixes Bug #4648.
	  The patch is contributed by Kazuki Tsujimoto.

	* bootstraptest/test_proc.rb: add tests for above.

Sun Jul 10 17:28:01 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (mutex_debug): use exit(EXIT_FAILURE) instad of
	  exit(1).
	* thread_pthread.c (add_signal_thread_list): ditto.
	* thread.c (rb_thread_call_with_gvl): ditto.
	* util.c (Bug): ditto.

Sun Jul 10 15:58:12 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/json: Merge json gem 1.5.4+ (f7f78896607b6f6226cd).
	  [Bug #4700]

Sun Jul 10 16:41:32 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_core.h (typedef struct rb_vm_struct): create a new
	  'inhibit_thread_creation' field.
	* thread.c (rb_thread_terminate_all): set inhibit_thread_creation.
	* thread.c (thread_s_new): don't permit to create new thread
	  if the VM is under destruction. Otherwise evil finalizer code
	  can make SEGV. [Bug #4992][ruby-core:37858]

	* bootstraptest/test_objectspace.rb: new test for this fix.

Sun Jul 10 16:06:16 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c (sigsegv): use abort() instead ofruby/open-uri.rb000064400000063022150403134340007610 0ustar00 Jul 10 14:13:50 2011  Koichi Sasada  <ko1@atdot.net>

	* internal.h (rb_thread_call_with_gvl, rb_thread_call_without_gvl):
	  make them visible as experimental C APIs.  fixes Feature #4328.

Sun Jul 10 12:18:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_power): support non-integral
	  exponent.  fixes [Bug #3271]

	* ext/bigdecimal/bigdecimal.c (rmpd_power_by_big_decimal): ditto.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_power_op): add a function to
	  only use for "**" operator.

	* test/bigdecimal/test_bigdecimal.rb: add a bunch of tests for the
	  above changes.

	* ext/bigdecimal/bigdecimal.c (is_integer): add an utility function.

	* ext/bigdecimal/bigdecimal.c (is_negative): ditto.

	* ext/bigdecimal/bigdecimal.c (is_positive): ditto.

	* ext/bigdecimal/bigdecimal.c (is_zero): ditto.

	* ext/bigdecimal/bigdecimal.c (is_one): ditto.

	* ext/bigdecimal/bigdecimal.c (is_even): ditto.

Sun Jul 10 12:08:39 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* compile.c (when_vals): when a string literal is written on when
	  clause, skip string creation to make it faster.  [ruby-dev:44068]
	  [Feature #5000]

Sun Jul 10 11:35:29 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* parse.y (reduce_nodes_gen): NODE_RETURN in rescue body must not be
	  reduced when there is an else clause.  This caused bizarre behavior
	  in [Bug #4473] [ruby-core:35629] [ruby-core:37884].

Sun Jul 10 09:46:14 2011  Masaya Tarui  <tarui@ruby-lnag.org>

	* range.c (range_max): fix behavior with excluded end value.
	  [Bug #4591]

Sun Jul 10 09:13:18 2011  Eric Hodel  <drbrain@segment7.net>

	* NEWS:  Fix RubyGems version.  [Ruby 1.9 - Bug #5004]

Sat Jul  9 20:01:59 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* internal.h: rb_rational_reciprocal is defined in rational.c.

Sat Jul  9 19:48:31 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* internal.h: added declarations.
	* complex.c: followed the above change.

Sat Jul  9 17:24:41 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* NEWS: bigdecimal is not a builtin.

Sat Jul  9 17:17:53 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: some improvements for performance.

Sat Jul  9 16:56:01 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* atomic.h (ATOMIC_OR): _InterlockedOr is unavailable in VC6.

	* numeric.c (ULLONG_MAX): fallback definition.

Sat Jul  9 15:59:19 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_{read,write}): should be signed.
	  Bug #5001

Sat Jul  9 14:02:20 2011  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi/core.rb: fix multipart form parsing bug. [Bug #3866]

Sat Jul  9 11:41:03 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Add Vector#normalize [ruby-dev:43829]

Sat Jul  9 09:25:06 2011  Eric Hodel  <drbrain@segment7.net>

	* enumerator.c:  Remove "enumeration sequenced by".
	  [Ruby 1.9 - Bug #4757]

Sat Jul  9 09:14:56 2011  Eric Hodel  <drbrain@segment7.net>

	* io.c:  Note that methods other than IO#gets may increase IO#lineno.
	  [Ruby 1.9 - Bug #4902]

Sat Jul  9 08:39:39 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (RUN_OPT): disable gems.

Sat Jul  9 08:37:05 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_close): close(2) on a fd which is being read by
	  another thread causes deadlock on Mac OS X 10.5

Fri Jul  8 21:20:39 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* addr2line.c: use USE_ELF instead of __ELF__ because Solaris
	  doesn't define it. USE_ELF is already provided by configure.
	  patched by Naohisa Goto. [ruby-dev:44066] [Bug #4998]

	* addr2line.h: ditto.

	* vm_dump.c: ditto.

Fri Jul  8 16:40:38 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/json/parser/parser.rl (convert_encoding): should not modify
	  the argument.

	* ext/json/parser/parser.rl (convert_encoding): no needs to use
	  force_encoding.

Fri Jul  8 15:53:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_bug): get rid of segfault after all threads
	  disposed.

Fri Jul  8 15:01:06 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/ossl.h: include openssl/e_os2.h before checking the
	  definition of OPENSSL_SYS_WIN32.

Fri Jul  8 14:40:39 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (wunlink): reverted a part of r32426. it was mistakenly
	  mixed.

Fri Jul  8 14:29:47 2011  Narihiro Nakamura  <authornari@gmail.com>

	* configure.in: can't subtract void *.

Fri Jul  8 14:33:26 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (config.h): define GC_MARK_STACKFRAME_WORD.
	  fixed build problem of r32438.  the value (30) is temporary value.
	  maybe it's enough by 20~24 according to my observation.

Fri Jul  8 13:47:39 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_mutex_unlock_all): folded into
	  rb_threadptr_unlock_all_locking_mutexes.
	* thread.c (rb_threadptr_unlock_all_locking_mutexes) ditto.

Fri Jul  8 13:36:02 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_unlock_all_locking_mutexes): rename to
	  rb_threadptr_unlock_all_locking_mutexes and remove static.
	* vm_core.h: add rb_threadptr_unlock_all_locking_mutexes declaration.
	* thread.c (thread_start_func_2): adjust the above rename.

	* eval.c (ruby_cleanup): call rb_threadptr_unlock_all_locking_mutexes
	  again after finalizer. [Bug #4988] [ruby-dev:44049]

Fri Jul  8 13:06:09 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (FIBER_MACHINE_STACK_ALLOCATION_SIZE): Fiber stack size
	  don't need to keep multiple number of sizeof(VALUE).

Fri Jul  8 11:39:12 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (sudo-precheck): true command is not standard on
	  Windows.

Fri Jul  8 10:39:52 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (gvl_destroy): fix cond_t leak.

Fri Jul  8 09:17:59 2011  Eric Hodel  <drbrain@segment7.net>

	* gc.c:  Improve documentation

Thu Jul  7 23:35:31 2011  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: change water_mark value that may call
	  gc_mark(lev <= GC_LEVEL_MAX) in gc_mark().
	  In ruby_stack_check(), water_mark is a value that may call some
	  C function. Fixes Bug #3781

	* configure.in: define GC_MARK_STACKFRAME_WORD that approximate
	  size of gc_mark() and gc_mark_children() stackframes.

Thu Jul  7 17:55:05 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/testunit/test_parallel.rb (TestParallelWorker#teardown): wait
	  the child process even if the communication pipe is broken.

Thu Jul  7 15:44:42 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* encoding.c (rb_enc_set_index, rb_enc_associate_index): should
	  check if frozen.

	* parse.y (rb_intern3), ruby.c (process_options, ruby_script):
	  defer freezing after associating encodings.

Thu Jul  7 15:16:51 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* numeric.c (rb_num2ull): use own switch sentence.
	  Current implementation can't convert 18446744073709551615.

Thu Jul  7 06:56:15 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (FIBER_STACK_FLAGS): workaround fix for r32420 on FreeBSD.

Thu Jul  7 06:46:12 2011  Eric Hodel  <drbrain@segment7.net>

	* benchmark/driver.rb:  Add difference column to report that averages
	  across all runs of a benchmark.  [Ruby 1.9 - Feature #4982]

Thu Jul  7 06:19:38 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rubygems.rb:  Reduce requires to improve `make benchmark`.
	  [#4962]
	* lib/rubygems/specification.rb:  Delay initialization of rubygems
	  until require is called.

Thu Jul  7 04:31:26 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (arg): rescue_mod is in inverse order from other
	  modifiers.  patched by michael.j.edgar AT dartmouth.edu at
	  [ruby-core:36248].  fixed #4716.

Thu Jul  7 00:40:16 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (kill): check that the process exited or not before
	  terminating it. [Bug #4943]

Wed Jul  6 23:13:19 2011  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (opt_call_args): allow trailing comma after assoc
	  argument e.g. 'foo(bar:1,)'.  fixed #3456

Wed Jul  6 22:11:12 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/cgi/test_cgi_header.rb(test_cgi_header_nph): Validate date in
	  "Date:" header

Wed Jul  6 21:29:33 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (fiber_machine_stack_alloc): cleanup pointer arithmetic.
	  "size/sizeof(VALUE)" is ugly and easy confusing.
	* cont.c (fiber_initialize_machine_stack_context): ditto.

Wed Jul  6 21:24:53 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (fiber_machine_stack_alloc): fix mprotect misuse. A stack
	  guard page should have PROT_NONE.
	* cont.c (fiber_initialize_machine_stack_context):
	  th->machine_stack_maxsize shouldn't be included guard pages size.
	  [Bug #4983][ruby-dev:44043]

Wed Jul  6 21:23:38 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (fiber_machine_stack_alloc): use MAP_STACK if it's provided.

Wed Jul  6 21:22:16 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (fiber_machine_stack_alloc): use MAP_FAILED instead of -1.

Wed Jul  6 21:21:05 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* cont.c (fiber_machine_stack_alloc): remove unnecessary cast.

Wed Jul  6 18:10:13 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/cgi/test_cgi_header.rb(test_cgi_header_nph): Adding space after
	  comma.

	* test/cgi/test_cgi_header.rb(test_cgi_header_nph): Remove variable
	  `now`. Suppress warning.

Wed Jul  6 12:18:09 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/cgi/test_cgi_header.rb(test_cgi_header_nph): Fix bug depends to
	  time. The test fails if time past 1 second in line 136-145

Tue Jul  5 15:28:04 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_here_document): should dispatch heredoc_end
	  scanner event on an empty here document.  fixed Bug#4543.

Tue Jul  5 13:49:26 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* addr2line.c: fix r32407 to check HAVE_ALLOCA_H.

Tue Jul  5 14:05:43 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/httpauth/digestauth.rb (_authenticate):
	  Literal texts in HTTP ABNF is case-insensitive (RFC2616 2.1),
	  and a sample implementation in RFC2617 also ignores the case
	  of algorithms. So now this ignores those cases.
	  [ruby-dev:43965] [Feature #4936]

	* lib/webrick/httpauth/digestauth.rb (initialize):
	  Because of above, opera_hack is useless and removed.

Tue Jul  5 01:30:01 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* thread_pthread.c (native_sleep): cut the waiting time up to
	  100,000,000 because Solaris cond_timedwait() return EINVAL if an
	  argument is greater than current_time + 100,000,000.  This is
	  considered as a kind of spurious wakeup.  The caller to native_sleep
	  should care about spurious wakeup.

Tue Jul  5 01:24:26 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* cont.c: disable FIBER_USE_NATIVE on Solaris because resuming any
	  Fiber caused SEGV.  I haven't follow up the issue deeply, but it
	  works when disabling the feature.

Tue Jul  5 01:22:46 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* addr2line.c: include <alloca.h> to fix a build issue on Solaris.

Tue Jul  5 00:49:05 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* ext/coverage/coverage.c: resurrect r32071 + add GC guard for
	  rb_coverages. [ruby-core:37352] [Bug #4927]
	  [ruby-core:36539] [Feature #4796]

	* test/coverage/test_coverage.rb resurrect r32071.

Mon Jul  4 22:24:46 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (get_stack): For NetBSD/FreeBSD, use
	  pthread_attr_getstack() if possible. and, remove an assumption
	  of stack growing direction.

Mon Jul  4 20:42:31 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/coverage/coverage.c: revert r32071.  The commit caused SEGV on
	  some minor nonfree OS.  I have no means of debugging the bug.  My
	  personal opinion is that such OS should be unsupported unless there
	  is an active maintainer.  [ruby-core:37352]

	* test/coverage/test_coverage.rb: ditto.

Mon Jul  4 07:14:12 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (get_stack): the return address of get_stack
	  must be the highest address of the current thread's stack.

Mon Jul  4 06:37:22 2011  Koichi Sasada  <ko1@atdot.net>

	* include/ruby/intern.h, thread_pthread.c (rb_reserved_fd_p,
	  RB_RESERVED_FD_P): added.  This C API is to limit to access
	  fds which are used by RubyVM internal.  In this version of
	  CRuby, return 1 if fd is communication pipe.
	  If your application needs to close all file descriptors to
	  present resource leak, skip internal fds using this C API.
	  We also define a macro RB_RESERVED_FD_P(fd).  So you can write
	    #ifndef RB_RESERVED_FD_P
	    #define RB_RESERVED_FD_P(fd) 0
	    #endif
	  for Ruby 1.9.2 or previous version to write compatible extensions.
	  See [ruby-core:37727]

	* thread_win32.c (rb_reserved_fd_p): added (return 0 for any fds).

	* io.c (rb_io_initialize): raise ArgumentError if given fd is reserved by Ruby.

Sun Jul  3 23:43:56 2011  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* ext/extmk.rb (extmake): suppresses outputs from extconf.rb.
	  (extmake) warns a failure in extconf.rb.

Sun Jul  3 13:44:51 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (ary_reject_bang): should not remove elements which are
	  not yielded.  [Bug #2545]

Sun Jul  3 06:10:26 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (get_stack): pthread_attr_getstack() doesn't
	  return stack start address, but stack base address. Thus,
	  we need to add stack size for getting stack start address.
	  And, we don't have to decrease guard size twice.
	* thread_pthread.c (thread_start_func_1): don't use inaccurate
	  stack start guess if native_thread_init_stack() can be used.
	  [Bug #1813] [ruby-core:24540]

Sun Jul  3 04:50:08 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (get_stack): add to a care of guard page on Mac
	  OS X. [Bug #1813] [ruby-core:24540]
	* signal.c (ruby_signal): SIGBUS use alternative stack too.
	* signal.c (sigbus): On Mac, thread stack overflow makes SIGBUS
	  instead of SIGSEGV. thus, added stackoverflow check.
	* signal.c (default_handler): get rid of compilation warning.
	* signal.c (Init_signal): ditto.

Sat Jul 02 08:59:20 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_ocsp.rb
	* test/openssl/test_x509_cert.rb: Perform SHA-256 tests only if
	  supported by the available OpenSSL version. Versions < 0.9.8 don't
	  support it. [ruby-core:37724]

Sat Jul  2 07:17:45 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_reject_bang, rb_ary_delete_if): rejected
	  elements should be removed.  fixed [Bug #2545]

Sat Jul  2 01:57:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* NEWS: remove a description of Kernel#respond_to? because it has
	  been reverted at revision 28564.

Sat Jul  2 00:58:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* NEWS: describe a change of multiplication of Bignum.

Fri Jul  1 18:52:31 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* benchmark/bm_app_erb.rb: increase loop count. too short
	  measurement time makes less accuracy.
	* benchmark/bm_app_factorial.rb: ditto.
	* benchmark/bm_app_mandelbrot.rb: ditto.
	* benchmark/bm_app_strconcat.rb: ditto.

	* benchmark/bm_io_file_create.rb: ditto.
	* benchmark/bm_io_file_read.rb: ditto.
	* benchmark/bm_io_file_write.rb: ditto.

	* benchmark/bm_so_concatenate.rb: ditto.
	* benchmark/bm_so_lists.rb: ditto.
	* benchmark/bm_so_matrix.rb: ditto.
	* benchmark/bm_so_random.rb: ditto.
	* benchmark/bm_so_sieve.rb: ditto.

	* benchmark/bm_vm_thread_mutex1.rb: ditto.
	* benchmark/bm_vm_thread_mutex2.rb: ditto.
	* benchmark/bm_vm_thread_mutex3.rb: ditto.

	* benchmark/bm_vm1_block.rb: cleanup.
	* benchmark/bm_vm1_const.rb: cleanup.
	* benchmark/bm_vm1_ensure.rb: cleanup.
	* benchmark/bm_vm1_ivar.rb: cleanup.
	* benchmark/bm_vm1_length.rb: cleanup.
	* benchmark/bm_vm1_neq.rb: cleanup.
	* benchmark/bm_vm1_not.rb: cleanup.
	* benchmark/bm_vm1_rescue.rb: cleanup.
	* benchmark/bm_vm1_simplereturn.rb: cleanup.
	* benchmark/bm_vm1_swap.rb: cleanup.

	* benchmark/bm_vm2_array.rb: cleanup.
	* benchmark/bm_vm2_case.rb: cleanup.
	* benchmark/bm_vm2_defined_method.rb: cleanup.
	* benchmark/bm_vm2_eval.rb: cleanup.
	* benchmark/bm_vm2_method.rb: cleanup.
	* benchmark/bm_vm2_mutex.rb: cleanup.
	* benchmark/bm_vm2_poly_method.rb: cleanup.
	* benchmark/bm_vm2_poly_method_ov.rb: cleanup.
	* benchmark/bm_vm2_proc.rb: cleanup.
	* benchmark/bm_vm2_regexp.rb: cleanup.
	* benchmark/bm_vm2_send.rb: cleanup.
	* benchmark/bm_vm2_super.rb: cleanup.
	* benchmark/bm_vm2_unif1.rb: cleanup.
	* benchmark/bm_vm2_zsuper.rb: cleanup.

	* benchmark/bm_vm_thread_alive_check1.rb: cleanup.

Fri Jul  1 15:23:00 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix: Add LUP decomposition

Fri Jul  1 15:21:14 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Allow non integer exponents for Matrix#**

Fri Jul  1 15:13:25 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matriruby/racc/parser-text.rb000064400000043773150403134340011253 0ustar00ess warnings
	  `ignoring return value'.

Fri Jul  1 06:41:36 2011  Koichi Sasada  <ko1@atdot.net>

	* thread.c (rb_threadptr_check_signal): only wake up main thread.

	* thread.c (rb_threadptr_execute_interrupts_common): check signal
	  delivery if it is main thread.
	  fixes [ruby-dev:44005] [Ruby 1.9 - Bug #4950]

	* bootstraptest/test_fork.rb: add a test for above.

	* signal.c (rb_get_next_signal): skip if signal_buff is empty.
	  (check signal_buff.size first)

	* vm_core.h: remove unused variable rb_thread_t::exec_signal.

	* thread.c (rb_thread_check_trap_pending): check
	  rb_signal_buff_size() because rb_thread_t::exec_signal
	  is no longer available.

Fri Jul  1 03:28:25 2011  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* class.c (Init_class_hierarchy): should name BasicObject
	  explicitly.

	* variable.c (rb_const_defined_0): should not check for
	  superclasses as const_get.

Fri Jul  1 03:24:03 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: mathn is still alive (should die soon).

Thu Jun 30 23:50:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* misc/ruby-mode.el (ruby-indent-beg-re): Fix broken regular
	  expression.  Fixes #4546

Thu Jun 30 23:43:30 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl.c/.h: Added ossl_x509_name_sk2ary.
	* ext/openssl/ossl.c: Replaced ossl_x509_ary2k by generic macro to
	  simplify future conversions.
	* ext/openssl/ossl_ssl.c: Implement SSLSocket#client_ca.
	* test/openssl/test_ssl.rb: Add test for SSLSocket#client_ca.
	  Thanks to Ippei Obayashi for providing the patch!
	  [ Ruby 1.9 - Feature #4481 ] [ruby-core:35461]

Thu Jun 30 22:38:58 2011  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm2_defined_method.rb: added to measure performance of
	  bmethod (method defined by define_method()).

Thu Jun 30 22:17:04 2011  Koichi Sasada  <ko1@atdot.net>

	* vm_insnhelper.c (vm_call_bmethod): fix to hook call/return event
	  for methods defined by define_method().  fixes Bug #4613.

	* thread.c (call_trace_proc): Fix to skip if class is not given (0).
	  Note that ID and Class object are passed for call/return event
	  if the called method was defined by define_method().
	  If you are author of tracer/profiler/debugger, this may be an
	  important change.  You should check passed class as zero or
	  non-zero instead of checking the event type.

	* test/ruby/test_settracefunc.rb: add a test for above.

Thu Jun 30 21:18:35 2011  Yutaka Kanemoto  <kanemoto@ruby-lang.org>

	* configure.in: Add warnflags for XL/C on AIX during configure
	  to avoid [Bug #3971]. See [ruby-core:32859]

Thu Jun 30 21:16:04 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (m_ajd): refers a constant.

Thu Jun 30 20:54:25 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	  * ext/io/console/io-console.gemspec: spin-off gem for 1.9.2.

Thu Jun 30 20:36:23 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: trivial changes.

Thu Jun 30 20:12:36 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_module.rb: tests for [Bug #3422] and [Bug #3423].

Thu Jun 30 20:03:39 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: modified doc.

Thu Jun 30 19:09:19 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (thread_timer): ignore unknown errno.
	  (we observed that select(2) was canceled by errno=514 on
	  boron == Linux/Xen environment)

Thu Jun 30 17:33:25 2011  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (ObjectSpace.count_tdata_objects):
	  Fix rdoc.  Fixes Bug #3892.

	* ext/objspace/objspace.c (ObjectSpace.count_tdata_objects):
	  Change key type if the klass of a object is zero (internal object).
	  Read rdoc for details.

	* internal.h: export rb_objspace_data_type_name().

Thu Jun 30 17:25:08 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (ping_signal_thread_list, thread_timer):
	  fix to keep polling state if there are any ping-tasks.

Thu Jun 30 12:25:34 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (rb_thread_create_timer_thread): allocate
	  machine stack for the timer thread at least 12KB.  FreeBSD 8.2
	  AMD64 causes machine stack overflow (SIGSEGV) only with
	  PTHREAD_STACK_MIN (maybe defined as 2KB).

Thu Jun 30 09:36:37 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/weakref.rb:  Attach documentation to WeakRef and add missing
	  documentation

Thu Jun 30 09:30:14 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/yaml.rb:  Document toplevel YAML and YAML::ENGINE to describe
	  Psych vs Syck engines.

Thu Jun 30 09:21:52 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/cmath.rb:  Hide handle_no_method_error from RDoc.
	* error.c:  Document or hide undocumented error classes.

Thu Jun 30 07:49:04 2011  Eric Hodel  <drbrain@segment7.net>

	* hash.c:  Document ENV

Thu Jun 30 06:37:43 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (ruby_init_loadpath_safe): ensure RUBYLIB_PREFIX stored
	  before RUBYLIB, even if MANGLED_PATH is enabled.  fixed #1679.
	  MANGLED_PATH is disabled by the default and will be removed
	  completely in the future.

Thu Jun 30 06:32:21 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/drb/drb.rb:  Hide deprecated toplevel DRb constants.

Thu Jun 30 06:17:02 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/cmath.rb (CMath.log): second argument: b can be nil.

Thu Jun 30 06:23:28 2011  Eric Hodel  <drbrain@segment7.net>

	* thread.c (ruby_thread_s_pass):  Fix typo.

Thu Jun 30 06:16:53 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc 3.8 which contains fixes for documentation
	  in trunk.

Thu Jun 30 02:53:26 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_threadptr_execute_interrupts_common): remove
	  meaningless native_thread_yield(). It never close a race.

Thu Jun 30 02:41:47 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_schedule_limits): minor optimization.
	  eliminate machine context saving when running time is enough small.

Thu Jun 30 02:28:11 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_schedule_rec): move interrupt_flag check to
	  rb_thread_schedule().
	  And also rename to rb_thread_schedule_limits() and remove
	  sched_depth argument. It's no longer called recursive.
	* thread.c (rb_thread_schedule): add to check interrupt_flag as
	  above explained.

	* thread.c (rb_threadptr_execute_interrupts_rec): rename to
	  rb_threadptr_execute_interrupts_common() and remove sched_depth
	  argument. It's no longer called recursive.

	* thread.c (rb_thread_sleep): adapt the renaming.
	* thread.c (rb_threadptr_execute_interrupts): ditto.
	* thread.c (rb_thread_execute_interrupts): ditto.

Thu Jun 30 01:31:33 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (thread_s_pass): change RDoc description and remove
	  a sample code. The actual implementation never behave as explained by
	  an example. It's a documentation bug.

Thu Jun 30 00:54:33 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_stop): change RDoc sample code. The old
	  example is buggy and may cause deadlock. The patch is
	  suggested by Heesob Park <phasis@gmail.com>. Thank you!
	  [Bug #3606][ruby-core:31454]

Thu Jun 30 00:49:53 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_wakeup): change RDoc sample code. The old
	  example is buggy and may not display anything by a race.
	  The patch is suggested by Heesob Park <phasis@gmail.com>.
	  Thank you! [Bug #3606][ruby-core:31454]

Thu Jun 30 00:43:33 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_run): change RDoc. The old example is buggy
	  and may cause deadlock. The patch is suggested by Heesob Park
	  <phasis@gmail.com>. Thank you! [Bug #3606][ruby-core:31454]

Thu Jun 30 00:30:15 2011  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/cmath.rb: make same exception for Math. fix [Bug #3137].

Thu Jun 30 00:03:20 2011  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/completion.rb: complement correctly string literal. fix
	  [Bug #1145].

Wed Jun 29 23:42:51 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: avoided using timev.
	* ext/druby/benchmark/version.rb000064400000000107150403134340011464 0ustar00ttach documentation for Math.
	* object.c:  Document NIL, TRUE, FALSE.
ruby/racc.rb000064400000000211150403134340006751 0ustar00, unitary?, zero?

Wed Jun 29 10:09:35 2011  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/matrix.rb: Specialize Matrix#find_inruby/ostruct.rb000064400000033611150403134340007556 0ustar00): add decl. of above func.

Tue Jun 28 23:46:08 2011  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/tracer.rb: count only non-internal libraries in stack trace,
	  ignoring custom_require.

Tue Jun 28 21:44:58 2011  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ruby-lex.rb: recognize '\char' in ruby statement.

Tue Jun 28 20:39:29 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* lib/debug.rb (var_list): Command 'var *' did not work on 1.9(!).
	  global_variables, local_variables, and instance_variables returns
	  Symbols from 1.9 and need to stringify before evaling it.
	  See #4931.

Tue Jun 28 19:23:01 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* signal.c: Now, USE_TRAP_SIGMASK depend on HAVE_PTHREAD_SIGMASK.
	  The code have already depended on pthread_sigmask since r27464.

Tue Jun 28 15:09:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/benchmark.rb: merge eregon/benchmark.
	  https://github.com/eregon/ruby/tree/benchmark
	  patched by Benoit Daloze. [ruby-core:37593] [Bug #4940]

	* lib/benchmark (Benchmark#bmbm): bmbm should be consistent with bm
	  for the return value.

	* test/benchmark: remove preemptive test instead of skipping
	  I removed the preemptive test I wrote for Feature #4197.
	  I'll add it back when the implementation will be able to satisfy it.

	* lib/benchmark (Benchmark#bmbm): remove useless explicit call,
	  #format is an alias of #to_s test/benchmark: add a test for
	  format of long time.

	* lib/benchmark: fix label width: always add 1 to ensure there is a
	  space delimiter even with times over 100s
	  When I asked for Feature #4197, I wanted to make delimiting spaces
	  consistent for #bm and #bmbm.
	  But with times over 100s, the output contains no space between the
	  label and the first time (user).
	  Now both ensure there is always a space, even if that means 3 spaces
	  with times under 10s (because it is formatted as %10.6f)

	* test/benchmark: let labels be a constant
	  lib/benchmark (Benchmark#realtime): avoid creating an unused Proc
	  lib/benchmark (Benchmark#benchmark): use ensure clause to restore
	  STDOUT.sync, as in #bmbm

Tue Jun 28 13:41:51 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* thread_win32.c (native_stop_timer_thread): fixed commit miss of
	  r32244.  grep sources before changing the signature of a function.

Tue Jun 28 11:49:14 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (consume_communication_pipe):
	  Make "buff" as static.  (Maybe) "buff" can be shared between
	  any caller (any threads) because no one use the read values.
	  "buff" (1024 byte) on stack may cause stack overflow on
	  several environment (we found a crash on FreeBSD).
	  And remove const value "buff_size", and define CCP_READ_BUFF_SIZE
	  macro.

Tue Jun 28 11:45:30 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rake:  Update rake to fix some bugs and hide deprecated features
	  from RDoc.
	* lib/rake/version.rb:  Bump version to 0.9.2.1 to distinguish it from
	  the released version.
	* NEWS:  ditto

Tue Jun 28 11:17:28 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc:  Update to RDoc 3.7 (final)
	* NEWS:  ditto

Tue Jun 28 10:18:42 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* process.c (rb_daemon): fix wrong #endif position.

Tue Jun 28 07:50:32 2011  Eric Hodel  <drbrain@segment7.net>

	* object.c (Init_Object):  Teach RDoc what Init_class_hierarchy does to
	  hook up ri for BasicObject, Object, Module and Class.

Tue Jun 28 05:03:32 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* thread.c (rb_thread_local_aref): RDoc fix. Thread#[] example
	  had a race. See #4480.

Tue Jun 28 01:22:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_log): move BigMath.log from
	  bigdecimal/math.rb.

	* ext/bigdecimal/lib/bigdecimal/math.rb: ditto.

	* test/bigdecimal/test_bigdecimal.rb: move test for BigMath.log from
	  test/bigdecimal/test_bigmath.rb.

	* test/bigdecimal/test_bigmath.rb: ditto.

Tue Jun 28 01:19:52 2011  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ruby-lex.rb: fix [Bug #4232].

Tue Jun 28 00:14:13 2011  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: fix [Bug #4409]. add DRbServer#here?.

	* test/drb/test_drb.rb: ditto.

	* test/drb/drbtest.rb: ditto.

	* test/drb/ut_eq.rb: ditto.

Tue Jun 28 00:08:43 2011  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/workspace.rb: fix BUG#4793.

Mon Jun 27 22:06:12 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (consume_communication_pipe): don't use C99
	  style variable length array.

Mon Jun 27 22:04:27 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (consume_communication_pipe): change return
	  type to void. caller doesn't use it.

Mon Jun 27 21:29:50 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.h (rb_global_vm_lock_struct): add volatile to
	  gvl->waiting. now thread_timer() access it w/o lock.

Mon Jun 27 21:16:11 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c: s/__gvl_acquire/gvl_acquire_common/ and
	  s/__gvl_release/gvl_release_common/.

Mon Jun 27 11:41:47 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* thread_pthread.c (rb_thread_create_timer_thread):
	  the type of return value of write(2) is ssize_t.

Mon Jun 27 09:57:02 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (rb_thread_create_timer_thread):
	  Fixes missing initialization of oflags.

Mon Jun 27 09:07:42 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c: Stop polling in the timer thread when there are
	  no waiting thread.  If there are 2 or more runnable threads,
	  the timer thread does polling.  Avoid polling makes power save
	  for several computers (0.2W per a Ruby process, when I measured).
	  If outside-event such as signal or Thread#kill was occurred
	  when the timer thread does not do polling, then wake-up
	  the timer thread using communication-pipe (the timer thread
	  waits this communication-pipe with select(2)).
	  The discussion about this modification can be found from the post
	  [ruby-core:33456] and other related posts.
	  Note that Eric Wong and KOSAKI Motohiro give us the huge
	  contributions for this modification.  Thanks.

	* thread_pthread.c (rb_thread_wakeup_timer_thread): add a function.
	  This function wakes up the timer thread using communication-pipe.

	* thread.c (rb_thread_stop_timer_thread): add a parameter which
	  specify closing communication-pipe or not.

	* thread.c (rb_thread_terminate_all): do not stop timer thread here
	  (ruby_cleanup() terminate timer thread).

	* signal.c: wake up timer thread using
	  rb_thread_wakeup_timer_thread() from signal handler.

	* eval.c (ruby_cleanup): use rb_thread_stop_timer_thread(1).

	* process.c: use rb_thread_stop_timer_thread(0)
	  (reuse communication-pipe).

	* thread_win32.c (rb_thread_wakeup_timer_thread): add a dummy
	  function.

	* vm_core.h: add and fix decl. of functions.

Mon Jun 27 08:01:19 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_parse.c: should use ALLOCA_N.

Mon Jun 27 01:34:18 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/etc/test_etc.rb (TestEtc#truby/racc/state.rb000064400000047471150403134340010114 0ustar00eject
	  without block returns enumerator.
	  patched by Michael Edgar [Bug #4847] [ruby-core:36800]

Sun Jun 26 23:49:21 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* test/date/test_switch_hitter.rb: added a test.

 Sun Jun 26 22:21:23 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: refactoring.

Sun Jun 26 18:03:30 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* parse.y: comma at the end of line is no longer allowed.
	  A patch from Yukihiro Matsumoto  <matz AT ruby-lang.org>.
	  (fixed #3456).

Sun Jun 26 13:35:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_dump.c (rb_vm_bugreport): change CrashReporter suggestion messages
	  on Mac. It should be placed after "-- C level backtrace" line.
	  Suggested by Endoh-san.

	  <before>
	  -- See Crash Report log file under ~/Library/Logs/CrashReporter or ---------
	  -- /Library/Logs/CrashReporter, for the more detail of ---------------------
	  -- C level backtrace information -------------------------------------------

	<after>
	  -- C level backtrace information -------------------------------------------

	     See Crash Report log file under ~/Library/Logs/CrashReporter or
	     /Library/Logs/CrashReporter, for the more detail of.

Sun Jun 26 10:08:28 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/extconf.rb
	* ext/openssl/ossl_missing.h/.c: add ASN1_put_eoc if missing.

	* ext/openssl/ossl_asn1.c: introduce ossl_asn1_object_size and
	  ossl_asn1_put_object to wrap functionality depending on OpenSSL
	  version in use.
	  Fixes	[ Ruby 1.9 - Bug #4916 ] reported by Hiroshi Nakamura.
	  [ruby-core:37286]

Sun Jun 26 01:00:15 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (date_strftime_internal): removed meaningless braces.
	* ext/date/date_core.c (gengo): the value should be int.

Sat Jun 25 23:45:30 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* vm_insnhelper.c (vm_search_superclass): avoid control frame
	  stack overrun. currently super() in Proc created in a method
	  defined by Module#define_method raise NoMethodError. [Bug #4881]
	* test/ruby/test_method.rb t_super_in_proc_from_define_method):
	  add test for it.

Sat Jun 25 23:23:14 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* thread.c (sleep_forever): now Kernel#sleep don't wakeup by
	  signal handler execution. [Bug #4072]

Sat Jun 25 23:14:47 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* thread.c (rb_threadptr_check_signal): remove unnecessary th->status
	  backup. fix race condition which may results unexpected main thread's
	  status transition. see #4072

Fri Jun 24 19:57:30 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* lib/webrick/httprequest.rb (setup_forwarded_info): Parsing request
	  header failed when the request is from 2 or more Apache reverse
	  proxies. It's said that all X-Forwarded-* headers will contain more
	  than one (comma-separated) value if the original request already
	  contained one of these headers.  Since we could use these values as
	  Host header, we choose the initial(first) value. See #4922.

	* test/webrick/test_httprequest.rb (test_forwarded): Test it.

Fri Jun 24 17:06:33 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (proc_daemon): should not start timer thread
	  twice.  fixed Bug#4920.

Fri Jun 24 15:54:14 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Try to shutdown SSL
	  connection more gracefully. Call SSL_shutdown() max 4 times until it
	  returns 1 (success). Bi-directional SSL close has several states but
	  SSL_shutdown() kicks only 1 transition per call. Max 4 is from
	  mod_ssl.c of Apache httpd that says 'max 2x pending + 2x data = 4'.
	  See #4237.

Fri Jun 24 07:24:37 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rake/version.rb:  Fixed VERSION to work with tool/rbinstall.rb
	* bin/rake:  Import bin/rake from 0.9.2
	* tool/rbinstall.rb (install):  Rake::VERSION is now in
	  lib/rake/version.rb.  Fixes `make install`

Fri Jun 24 07:11:37 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/rake: Import Rake 0.9.2

Fri Jun 24 00:44:15 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (c_valid_{julian,gregorian}_p): fixed the range of month.

Fri Jun 24 00:14:23 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: trivial changes on text.

Thu Jun 23 22:46:57 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_x509name.c: Add X509::Name#hash_old as a wrapper
	  for X509_NAME_hash_old in OpenSSL 1.0.0. See #4805

	* test/openssl/test_x509name.rb (test_hash): Make test pass with
	  OpenSSL 1.0.0.

	* NEWS: Add it.

Thu Jun 23 19:30:53 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_set_time): Check
	  argument type with NUM2LONG if the arg is not a Time object.
	  See #4919.

	* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_set_timeout): Check
	  type with NUM2LONG. Time as an arg is not allowed. See #4919.

	* test/openssl/test_ssl_session.rb (test_session_time,
	  test_session_timeout): Test it.

Wed Jun 23 13:30:30 2011  Shota Fukumori  <sorah@tubusu.net>

	* signal.c(ruby_atomic_exchange): Fix definition style.

Wed Jun 22 22:34:05 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl.c (ossl_sslctx_session_new_cb): Return 0 to
	  OpenSSL from the callback for SSL_CTX_sess_set_get_cb().
	  Returning 0 means to OpenSSL that the session is still valid
	  (since we created Ruby Session object) and was not freed by us with
	  SSL_SESSION_free(). Call SSLContext#remove_session(sess) in
	  session_get_cb block if you don't want OpenSSL to cache the session
	  internally.
	  This potential issue was pointed by Ippei Obayashi. See #4416.

	* test/openssl/test_ssl_session.rb (test_ctx_server_session_cb): Test
	  it.

Wed Jun 22 22:21:17 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl_session.c: Respect T_BIGNUM time values. Patch by
	  Tomoyuki Chikanaga.
	  [ Ruby 1.9 - Bug #4919 ] [ruby-dev:43869]

Wed Jun 22 21:29:25 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/socket/depend (SOCK_HEADERS): use $(top_srcdir) instead of
	  $(topdir). sorry!

Wed Jun 22 19:47:03 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* cont.c (cont_capture): add volatile.
	  On clang -O, it is needed to avoid the optimization.
	  With this and llvm/clang's recent fix, clang 3.0 can
	  build ruby-trunk with -O option.

	* cont.c (cont_capture): use for-loop.

	* array.c (rb_ary_eachruby/base64.rb000064400000006553150403134340007144 0ustar00rsa.c
	* ext/openssl/ossl_pkey_ec.c
	* ext/openssl/ossl_ssl_session.c
	* ext/openssl/ossl_x509crl.c
	* ext/openssl/ossl_pkey.c
	* ext/openssl/ossl_pkey_dh.c
	* ext/openssl/ossl_x509cert.c
	* ext/openssl/ossl_pkcs7.c: Use OSSL_BIO_reset.

	* ext/openssl/ossl_ssl.c
	* ext/openssl/ossl_cipher.c
	* ext/openssl/ossl_pkey_ec.c
	* ext/openssl/ossl_pkcs12.c
	* ext/openssl/ossl_ssl_session.c: Replace rb_raise occurrences by
	  ossl_raise. This automatically flushes OpenSSL's error queue.

	* ext/openssl/ossl_pkcs7.c: Raise error if DER fallback for parsing
	  fails.

	* test/openssl/test_pkey_ec.rb
	* test/openssl/test_pkey_dsa.rb
	* test/openssl/test_pkey_rsa.rb: Add assertions that OpenSSL.errors is
	  empty.

	* test/openssl/test_pkey_rsa.rb: Remove initial OpenSSL.errors call in
	  test_new.
	  [ Ruby 1.9 - Bug #4885 ] [ruby-core:37134]

Wed Jun 22 15:01:24 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_ssl.c: Use SSL_MODE_RELEASE_BUFFERS if available.
	  Thanks, Eric Wong, for providing the patch.
	  [ Ruby 1.9 - Feature #4672 ] [ruby-core:36127]

Wed Jun 22 14:47:53 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_buffering.rb
	* test/openssl/test_pkcs12.rb: Inherit from Test::Unit::TestCase
	  instead of MiniTest::Unit::TestCase. [ruby-core:37275]

Wed Jun 22 12:41:03 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_to_der):
	  OpenSSL::SSL::Session#to_der was broken. Fix buffer handling.

	* test/openssl/test_ssl_session.rb (test_session): Test it.

Wed Jun 22 12:38:52 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/openssl/test_ssl_session.rb: Split out SSL::Session related
	  tests from test_ssl.rb

Wed Jun 22 03:20:52 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Fix cyclic references of
	  objects.  Thanks to CvX for reporting the bug and a test case.
	* test/psych/test_object.rb: test for cyclic object references.

Wed Jun 22 02:39:54 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP.post_form): Do not ignore query part of
	  the given URI to post. See #655.

	* test/net/http/test_http.rb, test/net/http/utils.rb: Test it.

Wed Jun 22 01:28:13 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/openssl/test_x509store.rb (test_set_errors): Redhat is
	  distributing a patched version of OpenSSL that allows multiple CRL
	  for a key (multi-crl.patch.) Make test pass on such env. See #4122,
	  #4554.

Tue Jun 21 21:50:37 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* lib/webrick/httpresponse.rb (HTTPResponse#setup_header): Close
	  HTTP/1.1 connection when returning an IO object as response body
	  without setting HTTPResponse#chunked to true. See #855 no.1.

	* test/webrick/test_httpserver.rb: Test it.

Tue Jun 21 21:27:34 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* internal.h: move rb_thread_io_blocking_region() declaration
	  from intern.h to internal.h. It's still experimental API and
	  need more discussion. [ruby-dev:43698]
	* include/ruby/intern.h: ditto.

	* ext/socket/rubysocket.h: include internal.h.
	* ext/socket/depend: add internal.h dependency.
	* ext/socket/extconf.rb: add $INCFLAGS to topdir.

Tue Jun 21 20:38:47 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (datetime_s_*): canonicalize 24 o'clock.

Tue Jun 21 19:46:23 2011  KOSAKI Motohiro ruby/syslog/logger.rb000064400000013440150403134340010650 0ustar00o@gmail.com>

	* process.c (before_exec): use sig_do_nothing instead of SIG_DFL
	  for avoiding a race.
	* process.c (sig_do_nothing): new function.

Mon Jun 20 21:31:03 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (thread_timer): rename timeout_10ms to
	  time_quantum. it's no longer 10ms.

Mon Jun 20 18:46:02 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_cipher.c, ext/openssl/lib/openssl/cipher.rb:
	  Documentation fix by Ippei Obayashi. See #4419.

Mon Jun 20 15:41:33 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* lib/webrick/cookie.rb (WEBrick::Cookie.parse): Revert r31228.
	  r31228 was for allowing the 'Cookie:' header which did not have no
	  SP after ';' for separating cookie-pairs but RFC6265 requires single
	  SP after ';' there.  We allow multiple SPs here for compatibility
	  with older WEBrick version.

	* test/webrick/test_cookie.rb: Test it.

Sun Jun 19 13:31:26 2011  Shota Fukumori  <sorah@tubusu.net>

	* NEWS: Introduce --hide-skip on test/unit.

Sun Jun 19 10:05:16 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker?
	  only when $0 == __FILE__.

	* lib/test/unit/parallel.rb: Run Test::Unit::Worker.run only when
	  $0 == __FILE__.

Sat Jun 18 23:59:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (fill_cbuf): finish reading at EOF, and the readconv has
	  been cleared by another thread while io_fillbuf() is waiting at
	  select().  a patch in [ruby-core:37197] by Hiroshi Shirosaki
	  <h.shirosaki AT gmail.com>.  fixed #3840

Sat Jun 18 21:36:29 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c: remove GVL_DEBUG

Sat Jun 18 21:32:02 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm.c, vm_core.h (rb_vm_stack_to_heap): remove const.
	  It makes compilations warnings.

Sat Jun 18 18:54:15 2011  Koichi Sasada  <ko1@atdot.net>

	* vm.c, vm_core.h (rb_vm_stack_to_heap): fix "const" place.

Sat Jun 18 17:23:38 2011  Tanaka Akira  <akr@fsij.org>

	* eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don't
	  declare internal functions.

	* internal.h, vm_core.h: declare internal functions.

	* array.c: include internal.h.

	* common.mk: update dependency for array.o.

Sat Jun 18 13:39:33 2011  Tanaka Akira  <akr@fsij.org>

	* internal.h: declarations declared in include/ruby/*.h removed.

Sat Jun 18 12:42:17 2011  Tanaka Akira  <akr@fsij.org>

	* method.h, internal.h iseq.h: declare internal functions.

	* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
	  thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
	  declare internal functions.

	  Note that rb_method_entry_eq() is defined in vm_method.c but
	  there was a declaration in proc.c with different const-ness.
	  Now it is declared in method.h with same const-ness to the
	  definition.

	* object.c (rb_mod_module_exec): don't declare functions declared in
	  include/ruby/intern.h.

Sat Jun 18 12:05:08 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* include/ruby/backward/classext.h: for evil gems.  fixed #4803

Sat Jun 18 11:12:13 2011  Tanaka Akira  <akr@fsij.org>

	* common.mk: update dependencies.

Sat Jun 18 11:09:03 2011  Tanaka Akira  <akr@fsij.org>

	* io.c: suppress warnings.

Sat Jun 18 10:22:39 2011  Tanaka Akira  <akr@fsij.org>

	* internal.h: declare more internal functions.

	* iseq.h (rb_method_get_iseq): declared.

	* compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c,
	  ruby.c, time.c, util.c, vm.c: don't declare internal functions.

	* eval.c, parse.y, thread_pthread.c: non-existing function declarations
	  removed.

Sat Jun 18 08:12:54 2011  Tanaka Akira  <akr@fsij.org>

	* common.mk: dependencies updated.

	* tool/update-deps: new file to assist update dependencies in
	  common.mk.

Sat Jun 18 07:27:27 2011  Tanaka Akira  <akr@fsij.org>

	* internal.h: declare internal functions here.

	* node.h: declare NODE dependent internal functions here.

	* iseq.h: declare rb_iseq_t dependent internal functions here.

	* vm_core.h: declare rb_thread_t dependent internal functions here.

	* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
	  enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
	  iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
	  proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
	  thread.c, time.c, transcode.c, variable.c, vm.c,
	  tool/compile_prelude.rb: don't declare internal functions declared
	  in above headers.  include above headers if required.

	  Note that rb_thread_mark() was declared as
	  void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
	  void rb_thread_mark(void *ptr) in vm.c.  Now it is declared as
	  the later in internal.h.

Sat Jun 18 02:36:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (VpNewRbClass): fix type of the 2nd
	  argument.

	* ext/bigdecimal/bigdecimal.h: ditto.

Sat Jun 18 02:30:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): move BigMath.exp from
	  bigdecimal/math.rb.

	* ext/bigdecimal/lib/bigdecimal/math.rb: ditto.

	* test/bigdecimal/test_bigdecimal.rb: move test for BigMath.exp from
	  test/bigdecimal/test_bigmath.rb.

	* test/bigdecimal/test_bigmath.rb: ditto.

Sat Jun 18 00:20:54 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: do not define wnum[01].

Fri Jun 17 18:57:36 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* compile.c (iseq_compile_each): fix return value of obj[a,*b]=c.

Fri Jun 17 13:09:45 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/curses/curses.c:  Clean up documentation.

Fri Jun 17 09:25:14 2011  Eric Hodel  <drbrain@segment7.net>

	* ext/curses/curses.c:  Document curses constants.  Patch by Vincent
	  Batts.  [Ruby 1.9 - Bug #4880]

Fri Jun 17 09:11:05 2011  Eric Hodel  <drbrain@segment7.net>

	* objdoc/alt-ruby22/COPYING.ja000064400000005100150403474760010646 0ustar00siad
	  Ferreiras.  [#4834]

Fri Jun 17 07:23:03 2011  Eric Hodel  <drbrain@segment7.net>

	* array.c (rb_ary_drop):  Improve documentation.  Patch by Caley Woods.
	  [Ruby 1.9 - Bug #4858]

Fri Jun 17 06:11:31 2011  Eric Hodel  <drbrain@segment7.net>

	* lib/webrick/log.rb:  Improve documentation of BasicLog and Log.
	  Patch by Olivier Brisse.  [Ruby 1.9 - Bug #4833]
	* lib/webrick/httpstatus.rb:  Improve documentation of
	  WEBrick::HTTPStatus.  Patch by Olivier Brisse.
	  [Ruby 1.9 - Bug #4833]

Fri Jun 17 04:48:22 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c, thread_pthread.h: remove unused variables.
	  (native_thread_data_t::gvl_cond, native_thread_data_t::gvl_next)

Thu Jun 16 14:32:31 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* time.c (rb_time_new): prevent overflow by "* 1000".

Fri Jun 17 03:07:36 2011  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm4_thread_create_join.rb,
	  benchmark/bm_vm4_thread_mutex[1-3].rb: renamed to
	  bm_thread_* (fix last rename).

Fri Jun 17 02:26:47 2011  Koichi Sasada  <ko1@atdot.net>

	* thread_pthread.c (native_thread_create): fix debug message.
	  (add last newline)

Thu Jun 16 23:40:49 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_schedule_rec): fix {UN,}LIKELY macro misuse.
	* gc.c (rb_newobj): ditto.
	* vm_insnhelper.c (vm_method_search): ditto.

Thu Jun 16 20:06:15 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/testunit/test_parallel.rb: Fix Regexp for test.

	* test/testunit/tests_for_parallel/test_third.rb: Use
	  Test::Unit::TestCase#on_parallel_worker? for detecting worker.

	* lib/test/unit/testcase.rb(Test::Unit::TestCase#on_parallel_worker?):
	  New Method Test::Unit::TestCase#on_parallel_worker? returns true
	  when a testcase is running on parallel worker.
	* lib/test/unit/parallel.rb(Test::Unit::TestCase#on_parallel_worker?):
	  ditto.

Thu Jun 16 19:27:12 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/test_securerandom.rb: Add testcase.  This testcase does NOT aim
	  to test cryptographically strongness and randomness.  It includes
	  the test for PID recycle issue of OpenSSL described in #4579 but
	  it's disabled by default.

Thu Jun 16 17:55:07 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* test/ruby/test_io.rb (TestIO#test_copy_stream_socket): fix
	  test hanging up issue. Patch by CHIKANAGA ruby/racc/parser.rbdoc/alt-ruby22/LEGAL000064400000062232150403474760010002 0ustar0016 09:12:38 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* fix for build on solaris 10.

Thu Jun 16 09:08:39 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/io/console/test_io_console.rb (TestIO_Console#test_sync):
	  fix for daemon process.

Thu Jun 16 07:58:01 2011  Shota Fukumori  <sorah@tubusu.net>

	* test/testunit/test_parallel.rb(test_ignore_tzero): Test for r32109.

	* test/testunit/tests_for_parallel/test_third.rb: Use another way to
	  detect that test is running on worker. This fixes sometimes
	  TestParallel failing.

Thu Jun 16 07:20:06 2011  Shota Fukumori  <sorah@tubusu.net>

	* lib/test/unit.rb(Test::Unit::Runner#_run_parallel): Ignore -j0
	  because it makes blocking forever by IO.select.

Thu Jun 16 03:08:11 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/testunit/test_parallel.rb (TestParallel::TestParallelWorker#
	  setup): now can run on Windows, probably.

	* test/testunit/test_parallel.rb (TestParallel::TestParallel#setup):
	  ditto.

Thu Jun 16 03:00:26 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* thread.c (do_select): Windows: no need to poll if select(2) is
	  cancelable.

	* thread_win32.c (native_fd_select): new function to make select(2)
	  cancelable.

	* thread_win32.c (rb_w32_check_interrupt): new function for checking
	  interrupt.

	* win32/win32.c (rb_w32_select_with_thread): new function. cancelable
	  select(2).

	* win32/win32.c (rb_w32_select): use above function internally.

Wed Jun 15 23:30:45 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* gc.c: fix a regression by r31690 on AIX because AIX malloc
	  return NULL if it's passed 0. But some caller don't expect it.
	  patch by Yutaka Kanemoto. [ruby-dev:43779]
	(vm_malloc_prepare): return calculated size.
	(vm_xmalloc): use above result.
	(vm_xcalloc): ditto.

Wed Jun 15 23:11:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c: remove BLOCKING_REGION_CORE() macro. It's no longer used
	  since r32022.

Wed Jun 15 21:00:47 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_config.rb: execute based on the existence of the
	  OpenSSL module.

Wed Jun 15 12:35:11 2011  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_io.rb (test_copy_stream_socket): wait a child process
	  before SIGUSR1 handler is removed.

	* test/pathname/test_pathname.rb (define_assertion): use line number
	  for test method names.

Wed Jun 15 10:37:43 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* file.c (rb_stat_rdev): use DEVT2NUM.

	* file.c (rb_stat_rdev_major): ditto.

	* file.c (rb_stat_rdev_minor): ditto.

Wed Jun 15 05:12:59 2011  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c (lib_eventloop_core): revert the last change (it's
	  the part for ruby_1_8), and use rb_thread_check_ints() when RUBY_VM
	  is defined.

Wed Jun 15 04:42:47 2011  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm3_thread_*.rb: renamed bm_vm3_thread_*.rb to
	  benchmark/bm_vm_thread_*.rb.

Wed Jun 15 04:28:39 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* benchmark/bm_vm4_thread_pass.rb: rename bm_vm4* to
	  bm_vm_thread_*. suggested by ko1.
	* benchmark/bm_vm4_pipe.rb: ditto.
	* benchmark/bm_vm4_alive_check1.rb: ditto.
	* benchmark/bm_vm4_pass_flood.rb: ditto.

Wed Jun 15 03:52:50 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* benchmark/bm_vm4_pass_flood.rb: new benchmark for GVL fairness.
	* benchmark/bm_vm4_alive_check1.rb: ditto.

Wed Jun 15 01:27:53 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c (gvl_yield): fix live lock issue on 1-2 cpus
	  system. It's additional fix for r32021.
	* thread_pthread.c (gvl_init): add switch_wait_cond.
	* thread_pthread.h (typedef struct rb_global_vm_lock_struct): ditto.

Tue Jun 14 23:16:22 2011  Tanaka Akira  <akr@fsij.org>

	* bootstraptest/runner.rb (show_progress): refine verbose mode.
	  (exec_test): ditto.

Tue Jun 14 23:02:36 2011  Tanaka Akira  <akr@fsij.org>

	* bootstraptest/runner.rb (show_progress): extracted from assert_check.
	  (assert_check): use show_progress.
	  (assert_normal_exit): ditto.
	  (assert_finish): ditto.
	  (flunk): ditto.

Tue Jun 14 22:51:42 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* test/date/test_*.rb: added tests.

Tue Jun 14 22:09:58 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: renamed some functions.
	* ext/date/date_core.c: modified doc.

Tue Jun 14 21:26:01 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* cont.c (cont_save_thread): add new utility function.
	  rb_context_t::saved_thread.machine_stack_start and
	  machine_stack_end should be cleared immediately after a snapshot of
	  current thread is stored to saved_thread. [ruby-dev:43680] [Bug #4855]
	  this change aims to get rid of unnecessary GC mark at machine stack.

Tue Jun 14 19:50:49 2011  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_autoload.rb: remove temporary directory.

Tue Jun 14 11:05:03 2011  Narihiro Nakamura  <narihiro@netlab.jp>

	* gc.c (rb_gc_set_params): call initial_expand_heap if
	  initial_heap_min_slots is set.

Tue Jun 14 11:02:08 2011  Narihiro Nakamura  <narihiro@netlab.jp>

	* gc.c: use size_t.

Tue Jun 14 01:10:38 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* test/coverage/test_coverage.rb: add a test for restart.  a patch
	  from Xavier Shay.  [ruby-core:36745]

Tue Jun 14 01:05:10 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/coverage/coverage.c: make it restartable.  [ruby-core:36539]

Mon Jun 13 23:55:40 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c (rb_thread_schedule_rec): call gvl_yield() unconditionally.
	* thread_pthread.c: remove HAVE_GVL_YIELD macro.
	* thread_win32.c (gvl_yield): new. this fallback logic was moved from
	  rb_thread_schedule_rec().

Mon Jun 13 23:50:25 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/io/console/console.c (console_dev): typo.

Mon Jun 13 23:38:23 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_parse_string): flush delayed token.  based on a
	  patch by Masaya Tarui in [ruby-dev:43762].  Bug #4544

	* parse.y (yylex): revert r24557.  delayed token at the end of
	  string should be flushed already by the above change.

Mon Jun 13 23:33:31 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/console/console.c (console_dev): console should be
	  unbuffered.

	* ext/io/console/console.c (console_dev): take care of no-ctty
	  case.

Mon Jun 13 23:06:12 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_pthread.c: rewrite GVL completely. This fix improve some
	  benchmark dramatically (e.g. vm3_thread_mutex result changed
	  form 120.601sec to 3.426sec).
	* thread_win32.c: ditto.
	* thread_pthread.h: ditto.
	* vm_core.h: ditto.
	* thread.c: ditto.

Mon Jun 13 23:11:52 2011  Tanaka Akira  <akr@fsij.org>

	* test/socket/test_unix.rb: don't use Thread.abort_on_exception.

Mon Jun 13 23:05:01 2011  Tanaka Akira  <akr@fsij.org>

	* ext/socket/unixsocket.c (unix_send_io): race condition fixed.
	  (unix_recv_io): ditto.
	  fixed by Eric Wong.  [ruby-core:35574]

	* test/socket/test_unix.rb: test added for above problem.

Mon Jun 13 21:41:05 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread_win32.c (native_cond_signal): remove unnecessary rb_bug().
	  It's additional fix for r32021. [Bug #4696]

Mon Jun 13 20:50:49 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_ec.rb
	  test/openssl/test_pkey_ec.rb: merge both files into test_pkey_ec.rb.
	  Removed redundant group instantiation from PKey tests.
	* test/openssl/utils.rb: only create TEST_PKEY_EC_P256V1 if EC is
	  defined.

Mon Jun 13 20:28:24 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/digest.rb: remove MDC2 from test, it is not available
	  by default in an OpenSSL installation.

Mon Jun 13 20:18:55 2011  Koichi Sasada  <ko1@atdot.net>

	* vm_core.h, vm_insnhelper.h: move decl. of
	  ruby_vm_global_state_version and related macros
	  from vm_core.h to vm_insnhelper.h.

	* vm.c (vm_clear_all_cache): added.  This function is called
	  when ruby_vm_global_state_version overflows.
	  TODO: vm_clear_all_inline_method_cache() is only place holder.
	        We need to implement it ASAP.

	* vm_method.c (vm_clear_global_method_cache): added.

Mon Jun 13 19:46:21 2011  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/cmath.rb: add new method Object#real?. fix #3137

Mon Jun 13 18:52:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (is_kind_of_BigDecimal): new function to
	  examine the whether the object is kind of BigDecimal.

Mon Jun 13 18:49:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): use GetVpValueWithPrec
	  for Float and Rational arguments.

	* test/bigdecimal/test_bigdecimal.rb (test_new, test_cmp, test_power):
	  add and modify tests for the above change.

	* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): modify coding style to
	  match ruby's standard.

Mon Jun 13 18:33:04 2011  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb (SecureRandom.random_bytes): modify PRNG state
	  to prevent random number sequence repetition at forked child
	  process which has same pid.
	  reported by Eric Wong.  [ruby-core:35765]

Mon Jun 13 17:02:34 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP#use_ssl?): require 'openssl' only when
	  https is needed. fixes r31933.

Mon Jun 13 14:35:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* lib/cmath.rb (CMath.cbrt): returns the principal value of the cube
	  root of the argument.  fix #3676

	* test/test_cmath.rb (test_cbrt_returns_principal_value_of_cube_root):
	  test for the above change.

Mon Jun 13 14:17:00 2011  Kenta Murata  <mrkn@mrkn.jp>

	* lib/test/unit.rb (Test::Unit::GlobOption#non_options): fix typo.

Mon Jun 13 13:04:20 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_digest.c: fix error for digests that have no oid
	(e.g. DSS1).
	* test/openssl/test_digest.c: add tests for this.

Mon Jun 13 12:51:51 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/yaml.rb: load psych only when syck is not loaded.

Mon Jun 13 12:23:39 2011  NARUSE, Yui  <naruse@ruby-lang.org>

Mon Jun 13 12:23:39 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/psych/lib/psych/deprecated.rb (Object#to_yaml_properties):
	  undef to_yaml_properties before redefine it.

	* ext/syck/lib/syck/rubytypes.rb: ditto.

Mon Jun 13 11:30:10 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_digest.c: allow Digests to be created by sn, ln or
	  oid.
	* test/openssl/test_digest.rb: add tests for this.
	  [Ruby 1.9 - Feature #4412] [ruby-core:35319]

Mon Jun 13 10:54:03 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/pkey_dh.c: corrected documentation.
	* test/openssl/utils.rb: add test key for DH.
	* test/openssl/test_pkey_dh.rb: add tests.

Mon Jun 13 10:13:08 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/pkey_dh.c: clarify difference between DH#public_key and
	DH#pub_key in documentation.

Mon Jun 13 05:50:43 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* NEWS: introduce PKey.read.

Mon Jun 13 05:17:29 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkey.c: added PKey.read module function that allows
	  reading arbitrary public/private keys from DER-/PEM-encoded File or
	  string instances.
	* ext/openssl/ossl_pkey_dh.c: improved documentation.
	* test/openssl/utils.rb: added EC test key.
	* test/openssl/test_pkey_rsa.rb
	  test/openssl/test_pkey_dsa.rb: Test PKey.read. Reuse keys from
	  OpenSSL::TestUtils.
	* test/openssl/test_pkey_ec.rb: Created test file for EC tests.
	  Test PKey.read.
	  [Ruby 1.9 - Feature #4424] [ruby-core:35330]

Mon Jun 13 04:42:24 2011  Koichi Sasada  <ko1@atdot.net>

	* ext/objspace/objspace.c (total_i): fix to skip no ruby objects.

Mon Jun 13 03:07:38 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* test/benchmark/test_benchmark.rb (capture_output):
	  replace '-' as space. On NetBSD, subtract between two Process.times
	  after and before the short process may return negative value like:
	  t0=Process.times; yield; t1=Process.times; p t1.utime-t0.utime

Mon Jun 13 02:40:23 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* test/openssl/test_pkey_dsa.rb: Test for DSA#syssign/sysverify.

Mon Jun 13 01:59:19 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkey_dh.c: completed documentation.
	* ext/openssl/ossl_pkey_dsa.c: corrected examples. Improved parameter
	  sections.

Mon Jun 13 00:25:10 2011  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* ext/openssl/ossl_pkey_dsa.c: completed documentation.

Sun Jun 12 23:36:46 2011  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (kill_sub_thread): remove the method. [ruby-core:34185]

Sun Jun 12 21:01:56 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (d_lite_marshal_load): should give converted value.

Sun Jun 12 20:36:30 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: edited doc.

Sun Jun 12 18:12:07 2011  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm3_clearmethodcache.rb: added.

Sun Jun 12 17:40:29 2011  Koichi Sasada  <ko1@atdot.net>

	* vm_method.c (rb_clear_cache*): update only vm state version.

	* vm_method.c (rb_method_entry_get_without_cache, rb_method_entry):
	  Fill method cache entry with vm state version, and
	  check current vm state version for method (cache) look up.
	  This modification speed-up invalidating of global method cache table.
	  [Ruby 1.9 - Feature #3905] [ruby-core:36908]

Sun Jun 12 16:19:48 2011  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/extconf.rb: fail on Mac OS X. [Bug #4853][ruby-dev:43655]

Sun Jun 12 15:56:08 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c: remove th->transition_for_lock. It's thread unsafe.
	  [Bug #4723][ruby-dev:43563]

Sun Jun 12 15:47:35 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* thread.c: introduce spurious wakeup safe deadlock check.
	  [Bug #4696][ruby-dev:43554]

Sun Jun 12 13:33:52 2011  Koichi Sasada  <ko1@atdot.net>

	* benchmark/bm_vm3_thread_mutex.rb: remove it.

	* benchmark/bm_vm3_thread_mutex[1-3].rb: added 3 benchmarks.
	    1: one thread with one mutex (no contention).
	    2: two threads with one mutex (contention).
	    3: 1000 threads with one mutex (huge number of contention)
	  Above removed benchmark was type 3.
	  Therefore, this commit adds type 1 and 2 benchmark.

Sun Jun 12 11:16:59 2011  Tanaka Akira  <akr@fsij.org>

	* io.c: use select() appropriately for sendfile().
	  Fixed by Eric Wong.  [ruby-core:36150]
	  (maygvl_copy_stream_wait_readwrite): removed.
	  (nogvl_copy_stream_sendfile): use nogvl_copy_stream_wait_write and
	  maygvl_copy_stream_wait_read instead of
	  maygvl_copy_stream_wait_readwrite.

Sun Jun 12 09:32:13 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* atomic.h (ATOMIC_OR): _InterlockedOr is not available on mingw.h
	* gc.c (rb_gc_set_params): VM_OBJSPACE is disabled on mingw.

Sun Jun 12 01:07:09 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: edited doc.

Sat Jun 11 23:18:00 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm_core.h (RUBY_VM_SET_TIMER_INTERRUPT, RUBY_VM_SET_INTERRUPT,
	  RUBY_VM_SET_FINALIZER_INTERRUPT): use atomic ops for preventing
	  interrupt_flag bit lost. [Bug #4770][ruby-dev:43467]
	* thread.c (rb_threadptr_execute_interrupts_rec): ditto.
	* vm_core.h (typedef struct rb_thread_struct): change type of
	  interrupt_flag to rb_atomic_t.
	* atomic.h: move atomic ops definition from signal.c.
	* signal.c: remove atomic ops definition.
	* common.mk (gc, signal, thread, cont): add to dependency to atomic.h.

Sat Jun 11 23:23:52 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: edited doc.

Sat Jun 11 23:02:36 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/lib/openssl/buffering.rb (module OpenSSL):
	  Buffering#each_byte should return String in accordance with IO in
	  1.9.

	* test/openssl/test_buffering.rb (class OpenSSL): add tests for getc
	  and each_byte.

Sat Jun 11 22:41:37 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* time.c: a correction of doc for strftime (%v).

Sat Jun 11 22:30:53 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: replaced doc for strftime based on Time's one.

Sat Jun 11 22:07:56 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (datetime_s_{iso8601,rfc3339,xmlschema,rfc2822,httpdate}):
	  do not take argument comp.

Sat Jun 11 21:58:31 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: added examples.

Sat Jun 11 19:40:45 2011  Narihiro Nakamura  <authornari@gmail.com>

	* gc.c: expand heap if initial_heap_min_slots is bigger than
	  HEAP_MIN_SLOTS.

Sat Jun 11 19:42:50 2011  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ChangeLog (vim): set shiftwidth to 2.

Sat Jun 11 19:27:06 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_x509req.c: raise RequestError instead of
	  CertificateError when Request#to_der gets an error from OpenSSL.
	  Patch from Ippei Obayashi, see #4420. I cannot write a test for
	  this... Request does not allow to create broken bytes...

Sat Jun 11 19:34:51 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c (Date::(ABBR_)?(MONTH|DAY)NAMES): should be usascii.

Sat Jun 11 19:24:33 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/date/date_core.c: rewrote doc.

Sat Jun 11 19:04:15 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit::GlobOption#non_options): should run
	  with 1.8.

Sat Jun 11 18:05:57 2011  WATANABE Hirofumi  <eban@ruby-lang.org>

	* bootstraptest/runner.rb: should initialize $stress to avoid warnings.

Sat Jun 11 18:02:09 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_getc): should be 7bit if ascii.  firuby/observer.rb000064400000014604150403134340007703 0ustar00t_finite): remove needless
	  assert_nothing_raised.

Sat Jun 11 16:04:03 2011  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/parsers/xpathparser.rb
	  (REXML::Parsers::XPathParser#parse),
	  test/rexml/test_elements.rb
	  (ElementsTester#test_each_with_frozen_condition):
	  don't modify original XPath. fixes #4161
	  Reported by Pavel Shved. Thanks!!!

Sat Jun 11 15:53:27 2011  Kouhei Sutou  <kou@cozmixng.org>

	* test/rexml/test_elements.rb (ElementsTester): remove needless
	  prefix from test name.

Sat Jun 11 15:36:36 2011  Martin Duerst  <duerst@it.aoyama.ac.jp>
	* common.mk: fixed a grammatical error

Sat Jun 11 14:20:16 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* vm.c (thread_memsize): don't ignore size of th->local_storage.

Sat Jun 11 10:32:46 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: should quote arch_hdrdir and libpath for the case
	  installed prefix contains spaces.

Sat Jun 11 10:20:52 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* thread_pthread.c (native_cond_timeout): wrap conditionally used
	  label.

	* thread_pthread.c (native_sleep): remove unused variable.

Sat Jun 11 10:15:50 2011  Tanaka Akira  <akr@fsij.org>

	* thread.c (rb_thread_execute_interrupts): use GetThreadPtr to extract
	  rb_thread_t from VALUE.
	  reported by Motohiro KOSAKI.  [ruby-dev:43700]

Sat Jun 11 10:00:49 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (ruby_process_options): add missing return type.

Fri Jun 10 23:18:09 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* ext/tk/tcltklib.c (lib_eventloop_core): replace CHECK_INTS with
	  rb_thread_check_ints(). Because current code can't be compiled.

Fri Jun 10 16:38:13 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* encoding.c (rb_locale_charmap): When ruby process is run as Windows
	  Service the console codepage is not set, GetConsoleCP returns 0.
	  So on such environment, use GetACP().
	  http://blogs.msdn.com/b/michkap/archive/2005/02/08/369197.aspx
	  patched by Rafal Bigaj [ruby-core:36832] [Bug #4854]

Fri Jun 10 14:34:24 2011  Koichi Sasada  <ko1@atdot.net>

	* common.mk: restore TESTRUN_SCRIPT to "$(srcdir)/test.rb".
	  TESTRUN_SCRIPT is used by "make run", "make gdb" and so on.

Fri Jun 10 13:01:24 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_module.rb (TestModule#remove_rake_mixins): remove all
	  module related to Rake.

Fri Jun 10 09:52:38 2011  Eric Hodel  <drbrain@segment7.net>

	* encoding.c:  Mention that Encoding.compatible? can work with more
	  than just Strings.

Fri Jun 10 02:25:53 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych.rb: updating version to match released gem.

Fri Jun 10 01:06:29 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* ext/bigdecimal (BigDecimal_to_i): Integer#** may return flonum.

Fri Jun 10 00:35:12 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* complex.c (string_to_c_internal): uses rb_reg_nth_match;
	* rational.c (string_to_r_internal): ditto.

Fri Jun 10 00:25:03 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c: remove an unused declaration.

Fri Jun 10 00:24:04 2011  Tadayoshi Funaba  <tadf@dotrb.org>

	* rational.c (string_to_r): Rational#** may return flonum.

Thu Jun  9 23:57:53 2011  Tanaka Akira  <akr@fsij.org>

	* io.c: fix IO.copy_stream interrupt handling.
	  based on the patch by Eric Wong.  [ruby-core:36156]

	* vm_core.h (rb_thread_call_with_gvl): don't declare here.

	* thread.c: include internal.h.
	  (rb_thread_execute_interrupts): new function.

	* internal.h (rb_thread_execute_interrupts): declared.
	  (rb_thread_call_with_gvl): declared.

Thu Jun  9 23:34:01 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* gc.c (rb_objspace_call_finalizer): use rb_typeddata_is_kind_of() for
	  type check to get rid of a double free when main Thread has singleton
	  class. [ruby-core:36741] [Bug #4828]
	* thread.c (rb_obj_is_mutex): add a new utility function.
	* vm.c (rb_obj_is_thread): ditto.

Thu Jun  9 22:53:49 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/ruby/test_thread.rb (TestThread#test_kill_thread_subclass):
	  add test for Thread.kill with Thread subclass instance.

Thu Jun  9 22:31:47 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* test/ruby/test_thread.rb (TestThread#test_kill_wrong_argument):
	  test for [ruby-core:35086].
	  partially forward porting r31402 from ruby_1_9_2 branch.

Thu Jun  9 18:36:00 2011  Kenta Murata <mrkn@mrkn.jp>

	* string.c: Fix the ambiguous description of the behavior of
	  rb_str_aref_m with a range.  It returns nil when the beginning of
	  the range is greater than the end of the string rather than the range.

Thu Jun  9 10:57:03 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Hash subclasses can be read
	  from YAML files.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: Hash subclasses can be
	  dumped to YAML files.
	* test/psych/test_hash.rb: corresponding test.

Thu Jun  9 09:18:51 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Ruby modules can be loaded
	  from YAML files.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: Ruby modules can be
	  dumped to YAML files.
	* test/psych/test_class.rb: corresponding test.

Thu Jun  9 09:05:04 2011  Aaron Patterson <aaron@tenderlovemaking.com>

	* ext/psych/lib/psych/visitors/to_ruby.rb: Ruby classes can be loaded
	  from YAML files.
	* ext/psych/lib/psych/visitors/yaml_tree.rb: Ruby classes can be
	  dumped to YAML files.
	* test/psych/test_class.rb: corresponding test.

Wed Jun  8 21:38:57 2011  CHIKANAGA Tomoyuki  <nagachika00@gmail.com>

	* cont.c (root_fiber_alloc): set root fiber's status RUNNING.
	  in cont_mark() only RUNNING fiber's machine stack is marked.
	  root fiber's status should be RUNNING at the beginning regardless of
	  FIBER_USE_NATIVE. [ruby-core:36735] fixes #4827

Tue Jun  7 20:50:11 2011  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* doc/irb/irb.rd: fix typo. patch by Nobuhiro IMAI.
	  [Bug #4843] [ruby-dev:43639]
	* doc/irb/irb.rd.ja: ditto.
	* doc/ChangeLog-YARV: ditto.

Tue Jun  7 18:52:55 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): IO#tty? of
	  Windows has been fixed at r29969.

	* test/rubygems/test_gem_stream_ui.rb: now can run tests.

Tue Jun  7 18:36:41 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/rubygems/test_gem.rb (TestGem#{test_self_user_home_userprofile,
	  test_self_user_home_user_drive_and_path}): should simply iruby/open-uri.rb000064400000070607150403134340007617 0ustar00# frozen_string_literal: true
require 'uri'
require 'stringio'
require 'time'

module URI
  # Allows the opening of various resources including URIs.
  #
doc/alt-ruby22/BSDL000064400000002402150403474760007673 0ustar00arse(name)).respond_to?(:open)
      uri.open(*rest, &block)
    else
      super
    end
  end
  singleton_class.send(:ruby2_keywords, :open) if respond_to?(:ruby2_keywords, true)
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         # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>
#     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 effdoc/alt-ruby22/COPYING000064400000004710150403474760010263 0ustar00pen_timeout => true,
    :ssl_ca_cert => nil,
    :ssl_verify_mode => nil,
    :ssl_min_version => nil,
    :ssl_max_version => nil,
    :ftp_active_mode => false,
    :redirect => true,
    :encoding => nil,
    :max_redirects => 64,
    :request_specific_fields => 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
    if options.has_key? :request_specific_fields
      if !(options[:request_specific_fields].is_a?(Hash) || options[:request_specific_fields].is_a?(Proc))
        raise ArgumentError, "Invalid request_specific_fields option: #{options[:request_specific_fields].inspect}"
      end
    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
      raidoc/alt-ruby22/GPL000064400000043254150403474760007603 0ustar00
      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 = {}
    max_redirects = options[:max_redirects] || Options.fetch(:max_redirects)
    buf = nil
    while true
      request_specific_fields = {}
      if options.has_key? :request_specific_fields
        request_specific_fields = if options[:request_specific_fields].is_a?(Hash)
                                    options[:request_specific_fields]
                                  else options[:request_specific_fields].is_a?(Proc)
                                    options[:request_specific_fields].call(uri)
                                  end
      end
      redirect = catch(:open_uri_redirect) {
        buf = Buffer.new
        uri.buffer_open(buf, find_proxy.call(uri), options.merge(request_specific_fields))
        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
        if options.include?(:request_specific_fields) && options[:request_specific_fields].is_a?(Hash)
          # Send request specific headers only for the initial request.
          options.delete :request_specific_fields
        end
        uri = redirect
        raise "HTTP redirection loop: #{uri}" if uri_set.include? uri.to_s
        uri_set[uri.to_s] = true
        raise TooManyRedirects.new("Too many redirects", buf.io) if max_redirects && uri_set.size > max_redirects
      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
      http.min_version = options[:ssl_min_version]
      http.max_version = options[:ssl_max_version]
      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
         Net::HTTPPermanentRedirect # 308
      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 TooManyRedirects < HTTPError
  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

  # :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:

  # 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

    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.
    #
    # [:ssl_min_version]
    #  Synopsis:
    #    :ssl_min_version=>:TLS1_2
    #
    #  :ssl_min_version option specifies the minimum allowed SSL/TLS protocol
    #  version.  See also OpenSSL::SSL::SSLContext#min_version=.
    #
    # [:ssl_max_version]
    #  Synopsis:
    #    :ssl_max_version=>:TLS1_2
    #
    #  :ssl_max_version option specifies the maximum allowed SSL/TLS protocol
    doc/alt-ruby22-rubygems/LICENSE.txt000064400000004331150403474760012705 0ustar00he default is 64.
    #
    # [:request_specific_fields]
    #  Synopsis:
    #    :request_specific_fields => {}
    #    :request_specific_fields => lambda {|url| ...}
    #
    #  :request_specific_fields option allows specifying custom header fields that
    #  are sent with the HTTP request. It can be passed as a Hash or a Proc that
    #  gets evaluated on each request and returns a Hash of header fields.
    #
    #  If a Hash is provided, it specifies the headers only for the initial
    #  request and these headers will not be sent on redirects.
    #
    #  If a Proc is provided, it will be executed for each request including
    #  redirects, allowing dynamic header customization based on the request URL.
    #  It is important that the Proc returns a Hash. And this Hash specifies the
    #  headers to be sent with the request.
    #
    #  For Example with Hash
    #    URI.open("http://...",
    #             request_specific_fields: {"Authorization" => "token dummy"}) {|f| ... }
    #
    #  For Example with Proc:
    #    URI.open("http://...",
    #             request_specific_fields: lambda { |uri|
    #               if uri.host == "example.com"
    #                 {"Authorization" => "token dummy"}
    #               else
    #                 {}
    #               end
    #             }) {|f| ... }
    #
    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

      begin
        require 'net/ftp'
      rescue LoadError
        abort "net/ftp is not found. You may need to `gem install net-fman/man1/ruby.1.gz000064400000007430150403614070007641 0ustar00����Eruby.1�Zks�����bM�c9%)�I�6m:�-:fl�Qvc���X��,������{w�"��L<!�}���^h�apY-w2q22��&�M�c�'��d�X#_��U�)��K���?�L�r�K�ױ���LG:[j+�~4��OO�i)/�<}w�����š�UY����z���#-��X�à�$����7糟�x����S1>Ϥ�)��Y^j[XM���/:*G�&:��.�IQ&�Z�*_Wj���Ż��b���p|!��r�(�<��p�����i^��ͮ~t*ϝ�lj�&*UZ?FO��Bc����i�J��:�s�Kz�߮�[R}��[4�2Y��~��k�m���OH�V�7ݶ�����;��*Iu�L�u���r<�QϦ�g�����\�A�r�t�s��2V~���kc��ۉ}'��3�K9+�F9	�wr�UYY�$��"��j��%6��\�3ڄ;Y�R�k'�qR��mӇ�l풬H�P��*��d�*��ު�TC�B�Vrg*�U8T��"m��J,�f��A	�\kYn4�#�u��P�^Dj4+"�l)JiV��lq1�˪�b�̪h�hCba��8�����\�Sa
�`E�1I��;�O'Wo.�����'J�me��l�wb��R��m����oo0�b'Mj&7��_	�Z��t&(Jzl�
�!�&+(����9D�x��J��*Y����᭲�ZR8����8��*K"�W<�va}nIa�R�A�JEv���-�e[c�N���Jy�`�3�;���?��P&>���ju�9�Y�2��ߍ���z�#�u�*�J��̵�u<$�Y9�\��C��ݒrC����ܸ�]�&���xc&Ik
8'5�J�r��%�?�]��C�˨/��9���{U]��J+�}CJ��"����4Y�tz�>T�#@��8����5UiP��ڃUpœ��Q�&_��>���a��FS�ӿ�0�B�1�ݾ"R��]R���*IK�o��@�}}�(.�rCX�S��D�%��@¥��f�:#s\B4)���f�B[ܒKG@�T�(f�+��J/��4᡿��|�* $�I��q�5ӈ��
�|�+��yG���m\�J$Xa܊�6����#-_��D:4�4w���2I��"�+�i���9ҖS��[��p��U�E�Ya�B�G@Z�PE���sk]"4o!�R�E�$�?�"Ҷwe�Y��6��-
�����Ut��d��(���:�AZ*&��u�[9)šMIRcΪ�L(};��X⢩����`�r>g�	����6�A��@)�	�ƹ�B�u�Մ�W܈�̊��&�w��$�n}�gH>���FGR?c����
>�u?����/���;��G� 1���_�2���l����nqT��P.�S�{{���K����:�2H�7��d<b�ǭ��P|��	#��_)��D��ߜ�>�ì["��z��	��ԍ:.���gL(�KO�<"�AӺjeƁr��!�ɝ�zط=.�u�`��P�S�b�k���Q�Vթ�b�M*�&�h��p�4���͙�.�V�(k�DN}D�N��G��C9F�w0��F������Ʉ��E2�rJ�
'^���{�r
=���?|��:ŧ�2YG6&�7�@$�C�u�:[���!<���׼���3:��h1�	�:�$?k�c�P,
%�D��^���`�P��8x%��D�N�*
,�h7�DE�o lX�s�C>4���JQv�AT\���`�\C`��<�5L��y%N5�<�D8�6�!���ņ�U�eO�<�a!j3J�� �(��@Z	
�1�"0'����jB��MP���Z�g
����5�s�Y�;�׮�n�.���W<�gxH�N�kr�PR��~a�<�*��L�M|�ZF*�g�~�i#�	6��QqN�]�>��.����Ͼ�୎�/'�?���O�Ph��C	rh���4@�n�J8��7�br�B�&�&�V��`w�,�N��5�*O	Q�� �Pk
~-ؽ�
��M��U�|:c�c(w������
5�>&|o⪢0)Q�b+��Xʵ�.��'*�H{�Z9M$}@)�ߓ'��'��,���G/��<�i>�9ը^�K�z�~�M}�Br�v�qr��G���+�0�`�q�Ie�s��Sr�F����_�.O�x�|��<�C�
(�YK����s8�P zf[�	-�����^}�*�إ�	��~b��*�OR����;&"�#'L# D�넗����*U���hk�y���AA;#��/��!����pg#�{��M����Z���5�q֝M���q��+E]`��7�j�1�ʝY��n7�!dTV��j�c�TS�!I=��tO5�&���I�it�质�6U���
yokҟ�uAsT�*�#�����b&�M��S��7����T�>4QE������&t_���Im��<)���*�����~�x�󳐣d�T�r��DvUD�H�=��ד�����^��`ҖNFS��Ф:A\a���F��S(�tN�ܡ�C��X�U��s�XG�!D�=��k's��`��Sݘ�IM��;.��|���^�����������Ú
�񼦮	,~�
Dg�[���mT;��-a>�<w�5؅j{������gZX������r�K����5���pr�B��H�)=�v�1��@�f(�EuV1*�����6T}�������P&���>$�t���v�G|�m5�����{VUZ�����ѹ�5�L~����o�L����W�TTL�H��
�8�/A���G�{&X���kk���+f�e'M.|Ҡ����'[Cj��"����+�ȁZsT%L��sj����v��A�e,|���:��GXи����oC�D3�P�V�\3��$����$ٶM���=f��P�>��k��k(����]��I�C���UD�o7�dh
��<��W(��BiX��:����~��EQ���gk�5I�a#�;�xz��N3r�h�A{��
��J� �몶�-���]cH��
{�o��O狩�i�R.ȏ���j���k�P��O��,��ֶ�$(��~�4�A��D͹>#�n6^�]�\�;�ӌ��e��B����X���[��Z0�;_�]!Pkx�Ԭ�	�&��Q!�+�c�z�ݐ�8q"6TP'��C��iK�4�8�2vȳ�}s�;��<PQ��sB��%D�}�#�G"��Z�5��eī#�ʕL8����C'�g6�t���&��� t�$�5�茚�������z}�%�D�ż�����Ǐ2�\���@M1��6]�=9�o���7�ۮ�wMz�v{�<�Y�]n~����#B�R���ͭ��a���Z9�]�‚�;�ɹ��%(��Z:���$�]��mz�vv9?==�:�џ��=�xq9}>��;�eИ��ń^ט|��,&�M�M��-4���E���SE��Yĭ[�Ρ�C�-x��}5�p��z��f��ы���	d�j�]�+�r�M���JLbt%<����6tIsV?m��>8����|UP�3�����T[lW�Z�r��4�D�D:�b��/^L_��9��t�����Pu�g}��L��O�=��A�3��㡤���>�'�%Z��2ʠP�D�pQ��j���Ұ~���g��+�_�?̦��B��ɯ�^�K�&���Y:��M��v����rѼل��5Tb;4/~���w�����T�
;���$doc/alt-ruby18-rubygems/LICENSE.txt000064400000004634150403614100012700 0ustar00RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
Weirich and others.  You can redistribute it and/or modify it under
either the terms of the MIT license (see the file MIT.txt), or the
conditions below:

1. You may make and give away verbatim copies of the source form of the
   software without restriction, provided that you duplicate all of the
   original copyright notices and associated disclaimers.

2. You may modify your copy of the software in any way, provided that
   you do at least ONE of the following:

   a. place your modifications in the Public Domain or otherwise
      make them Freely Available, such as by posting said
      modifications to Usenet or an equivalent medium, or by allowing
      the author to include your modifications in the software.

   b. use the modified software only within your corporation or
      organization.

   c. give non-standard executables non-standard names, with
      instructions on where to get the original software distribution.

   d. make other distribution arrangements with the author.

3. You may distribute the software in object code or executable
   form, provided that you do at least ONE of the following:

   a. distribute the executables and library files of the software,
      together with instructions (in the manual page or equivalent)
      on where to get the original distribution.

   b. accompany the distribution with the machine-readable source of
      the software.

   c. give non-standard executables non-standard names, with
      instructions on where to get the original software distribution.

   d. make other distribution arrangements with the author.

4. You may modify and include the part of the software into any other
   software (possibly commercial).  But some files in the distribution
   are not written by the author, so that they are not under these terms.

   For the list of those files and their copying conditions, see the
   file LEGAL.

5. The scripts and library files supplied as input to or produced as
   output from the software do not automatically fall under the
   copyright of the software, but belong to whomever generated them,
   and may be sold commercially, and may be aggregated with this
   software.

6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   PURPOSE.

doc/alt-ruby18-rubygems/MIT.txt000064400000002100150403614100012231 0ustar00Copyright (c) Chad Fowler, Rich Kilmer, Jim Weirich and others.

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:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

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.
doc/alt-ruby18-rubygems/README.rdoc000064400000002710150403614100012654 0ustar00= RubyGems

* http://rubygems.org
* http://docs.rubygems.org
* http://help.rubygems.org
* http://github.com/rubygems
* http://rubyforge.org/projects/rubygems

== DESCRIPTION

RubyGems is a package management framework for Ruby.

This gem is an update for the RubyGems software. You must have an
installation of RubyGems before this update can be applied.

See Gem for information on RubyGems (or `ri Gem`)

To upgrade to the latest RubyGems, run:

  $ gem update --system  # you might need to be an administrator or root

See UPGRADING.rdoc for more details and alternative instructions.

-----

If you don't have RubyGems installed, your can still do it manually:

* Download from: https://rubygems.org/pages/download
* Unpack into a directory and cd there
* Install with: ruby setup.rb  # you may need admin/root privilege

For more details and other options, see:

  ruby setup.rb --help

== GETTING HELP

=== Support Requests

Are you unsure of how to use RubyGems?  Do you think you've found a bug and
you're not sure?  If that is the case, the best place for you is to file a
support request at {help.rubygems.org}[http://help.rubygems.org].

=== Filing Tickets

You're sure you've found a bug!  But where do you let us know?  The best place
for letting the RubyGems team know about bugs you've found is {on the rubygems
tracker at rubyforge}[http://rubyforge.org/tracker/?group_id=126].

=== Bundler Compatibility

See http://gembundler.com/compatibility for known issues.
doc/alt-ruby18-rubygems/History.txt000064400000164635150403614100013267 0ustar00# coding: UTF-8

=== 1.8.29 / 2013-11-23

Bug fixes:

* Fixed installation when the LANG environment variable is empty.
* Added DigiCert High Assurance EV Root CA to the default SSL certificates for
  cloudfront.

=== 1.8.28 / 2013-10-08

Bug fixes:

* Added the Verisign Class 3 Public Primary Certification Authority G5
  certificate and its intermediary to follow the s3.amazonaws.com certificate
  change.  Fixes #665 by emeyekayee.  Fixes #671 by jonforums.
* Remove redundant built-in certificates not needed for https://rubygems.org
  Fixes #654 by Vít Ondruch.
* Added test for missing certificates for https://s3.amazonaws.com or
  https://rubygems.org.  Pull request #673 by Hannes Georg.

=== 1.8.27 / 2013-09-24

Security fixes:

* RubyGems 2.1.4 and earlier are vulnerable to excessive CPU usage due to a
  backtracking in Gem::Version validation.  See CVE-2013-4363 for full details
  including vulnerable APIs.  Fixed versions include 2.1.5, 2.0.10, 1.8.27 and
  1.8.23.2 (for Ruby 1.9.3).

=== 1.8.26 / 2013-09-09

Security fixes:

* RubyGems 2.0.7 and earlier are vulnerable to excessive CPU usage due to a
  backtracking in Gem::Version validation.  See CVE-2013-4287 for full details
  including vulnerable APIs.  Fixed versions include 2.0.8, 1.8.26 and
  1.8.23.1 (for Ruby 1.9.3).  Issue #626 by Damir Sharipov.

Bug fixes:

* Fixed editing of a Makefile with 8-bit characters.  Fixes #181

=== 1.8.25 / 2013-01-24

* 6 bug fixes:

  * Added 11627 to setup bin_file location to protect against errors. Fixes #328 by ConradIrwin
  * Specification#ruby_code didn't handle Requirement with multiple
  * Fix error on creating a Version object with a frozen string.
  * Fix incremental index updates
  * Fix missing load_yaml in YAML-related requirement.rb code.
  * Manually backport encoding-aware YAML gemspec

=== 1.8.24 / 2012-04-27

* 1 bug fix:

  * Install the .pem files properly. Fixes #320
  * Remove OpenSSL dependency from the http code path

=== 1.8.23 / 2012-04-19

This release increases the security used when RubyGems is talking to
an https server. If you use a custom RubyGems server over SSL, this
release will cause RubyGems to no longer connect unless your SSL cert
is globally valid.

You can configure SSL certificate usage in RubyGems through the
:ssl_ca_cert and :ssl_verify_mode options in ~/.gemrc and /etc/gemrc.
The recommended way is to set :ssl_ca_cert to the CA certificate for
your server or a certificate bundle containing your CA certification.

You may also set :ssl_verify_mode to 0 to completely disable SSL
certificate checks, but this is not recommended.


* 2 security fixes:
  * Disallow redirects from https to http
  * Turn on verification of server SSL certs

* 1 minor feature:
  * Add --clear-sources to fetch

* 2 bug fixes:
  * Use File.identical? to check if two files are the same.
  * Fixed init_with warning when using psych

=== 1.8.22 / 2012-04-13

* 4 bug fixes:

  * Workaround for psych/syck YAML date parsing issue
  * Don't trust the encoding of ARGV. Fixes #307
  * Quiet default warnings about missing spec variables
  * Read a binary file properly (windows fix)

=== 1.8.21 / 2012-03-22

* 2 bug fixes:

  * Add workaround for buggy yaml output from 1.9.2
  * Force 1.9.1 to remove it's prelude code. Fixes #305

=== 1.8.20 / 2012-03-21

* 4 bug fixes:

  * Add --force to `gem build` to skip validation. Fixes #297
  * Gracefully deal with YAML::PrivateType objects in Marshal'd gemspecs
  * Treat the source as a proper url base. Fixes #304
  * Warn when updating the specs cache fails. Fixes #300

=== 1.8.19 / 2012-03-14

* 3 bug fixes:

  * Handle loading psych vs syck properly. Fixes #298
  * Make sure Date objects don't leak in via Marshal
  * Perform Date => Time coercion on yaml loading. Fixes #266

=== 1.8.18 / 2012-03-11

* 4 bug fixes:

  * Use Psych API to emit more compatible YAML
  * Download and write inside `gem fetch` directly. Fixes #289
  * Honor sysconfdir on 1.8. Fixes #291
  * Search everywhere for a spec for `gem spec`. Fixes #288
  * Fix Gem.all_load_path. Fixes #171

=== 1.8.17 / 2012-02-17

* 2 minor enhancements:

  * Add MacRuby to the list of special cases for platforms (ferrous26)
  * Add a default for where to install rubygems itself

* 3 bug fixes:

  * Fixed gem loading issue caused by dependencies not resolving.
  * Fixed umask error when stdlib is required and unresolved dependencies exist.
  * Shebang munging would only take one arg after the cmd
  * Define SUCKAGE better, ie only MRI 1.9.2
  * Propagate env-shebang to the pristine command if set for install.

=== 1.8.16 / 2012-02-12

* 3 bug fixes:

  * Fix gem specification loading when encoding is not UTF-8. #146
  * Allow group writable if umask allows it already.
  * Uniquify the spec list based on directory order priority

=== 1.8.15 / 2012-01-06

* 1 bug fix:

  * Don't eager load yaml, it creates a bad loop. Fixes #256

=== 1.8.14 / 2012-01-05

* 2 bug fixes:

  * Ignore old/bad cache data in Version
  * Make sure our YAML workarounds are loaded properly. Fixes #250.

=== 1.8.13 / 2011-12-21

* 1 bug fix:

  * Check loaded_specs properly when trying to satisfy a dep

* 2 minor enhancements:

  * Remove using #loaded_path? for performance
  * Remove Zlib workaround for Windows build.

=== 1.8.12 / 2011-12-02

* Bug fix:
  * Handle more cases where Syck's DefaultKey showed up in requirements
    and wasn't cleaned out.

=== 1.8.11 / 2011-10-03

* Bug fix:
  * Deprecate was moved to Gem::Deprecate to stop polluting the top-level
    namespace.

=== 1.8.10 / 2011-08-25

RubyGems 1.8.10 contains a security fix that prevents malicious gems from
executing code when their specification is loaded.  See
https://github.com/rubygems/rubygems/pull/165 for details.

* 5 bug fixes:

  * RubyGems escapes strings in ruby-format specs using #dump instead of #to_s
    and %q to prevent code injection.  Issue #165 by Postmodern
  * RubyGems attempt to activate the psych gem now to obtain bugfixes from
    psych.
  * Gem.dir has been restored to the front of Gem.path.  Fixes remaining
    problem with Issue #115
  * Fixed Syck DefaultKey infecting ruby-format specifications.
  * `gem uninstall a b` no longer stops if gem "a" is not installed.

=== 1.8.9 / 2011-08-23

* Bug fixes:

  * Fixed uninstalling multiple gems using `gem uninstall`
  * Gem.use_paths splatted to take multiple paths!  Issue #148

=== 1.8.8 / 2011-08-11

* Bug fix:
  * The encoding of a gem's YAML spec is now UTF-8.  Issue #149

=== 1.8.7 / 2011-08-04

* Bug fixes:
  * Added missing require for `gem uninstall --format-executable`
  * The correct name of the executable being uninstalled is now displayed with
    --format-executable
  * Fixed `gem unpack uninstalled_gem` default version picker
  * RubyGems no longer claims a nonexistent gem can be uninstalled
  * `gem which` no longer claims directories are requirable files
  * `gem cleanup` continues cleaning up gems if one can't be uninstalled due
    to permissions.  Issue #82
  * Gem repository directories are no longer created world-writable.  Patch by
    Sakuro OZAWA.  Ruby Bug #4930

=== 1.8.6 / 2011-07-25

* 1 minor enhancement:

  * Add autorequires and delay startup of RubyGems until require is called.
    See Ruby bug #4962

* 9 bug fixes:

  * Restore behavior of Gem::Specification#loaded?  Ruby Bug #5032
  * Clean up SourceIndex.add_specs to not be so damn noisy. (tadman)
  * Added missing APPLE_GEM_HOME in paths.
  * Extend YAML::Syck::DefaultKey fixing to `marshal_dump` as well.
  * Fix #29216: check correct bin_dir in check_that_user_bin_dir_is_in_path.
  * Revert Gem.latest_load_paths to working order (PathSupport revert).
  * Restore normalization of GEM_HOME.
  * Handle the Syck DefaultKey problem once and for all.
  * Fix SystemStackError occurring with "gem list -r -a" on 1.9.

=== 1.8.5 / 2011-05-31

* 2 minor enhancement:

  * The -u option to 'update local source cache' is official deprecated.
  * Remove has_rdoc deprecations from Specification.

* 2 bug fixes:

  * Handle bad specs more gracefully.
  * Reset any Gem paths changed in the installer.

=== 1.8.4 / 2011-05-25

* 1 minor enhancement:

  * Removed default_executable deprecations from Specification.

=== 1.8.3 / 2011-05-19

* 4 bug fixes:

  * Fix independent testing of test_gem_package_tar_output.  Ruby Bug #4686 by
    Shota Fukumori
  * Fix test failures for systems with separate ruby versions.  Ruby Bug #3808
    by Jeremy Evans
  * Fixed some bad calls left behind after rolling out some refactorings.
  * Syck has a parse error on (good) times output from Psych. (dazuma, et al)

=== 1.8.2 / 2011-05-11

* 2 minor enhancements:

  * Moved #outdated from OutdatedCommand to Specification (for Isolate).
  * Print out a warning about missing executables.

* 3 bug fixes:

  * Added missing requires to fix various upgrade issues.
  * `gem pristine` respects multiple gem repositories.
  * setup.rb now execs with --disable-gems when possible

=== 1.8.1 / 2011-05-05

* 1 minor enhancement:

  * Added Gem::Requirement#specific? and Gem::Dependency#specific?

* 4 bug fixes:

  * Typo on Indexer rendered it useless on Windows
  * gem dep can fetch remote dependencies for non-latest gems again.
  * gem uninstall with multiple versions no longer crashes with ArgumentError
  * Always use binary mode for File.open to keep Windows happy

=== 1.8.0 / 2011-04-34

This release focused on properly encapsulating functionality.  Most of this
work focused on moving functionality out of Gem::SourceIndex and
Gem::GemPathSearcher into Gem::Specification where it belongs.

After installing RubyGems 1.8.0 you will see deprecations when loading your
exsting gems.  Run `gem pristine --all --no-extensions` to regenerate your
gem specifications safely.

Currently RubyGems does not save the build arguments used to build gems with
extensions.  You will need to run `gem pristine gem_with_extension --
--build-arg` to regenerate a gem with an extension where it requires special
build arguments.

* 24(+) Deprecations (WOOT!):

  * DependencyList.from_source_index deprecated the source_index argument.
  * Deprecated Dependency.new(/regex/).
  * Deprecated Gem.searcher.
  * Deprecated Gem.source_index and Gem.available?
  * Deprecated Gem: activate_dep, activate_spec, activate,
    report_activate_error, and required_location.
  * Deprecated Gem::all_partials
  * Deprecated Gem::cache_dir
  * Deprecated Gem::cache_gem
  * Deprecated Gem::default_system_source_cache_dir
  * Deprecated Gem::default_user_source_cache_dir
  * Deprecated Platform#empty?
  * Deprecated Specification.cache_gem
  * Deprecated Specification.installation_path
  * Deprecated Specification.loaded, loaded?, and loaded=
  * Deprecated all of Gem::SourceIndex.
  * Deprecated all of Gem::GemPathSearcher.
  * Deprecated Gem::Specification#default_executable.

* 2 major enhancements:

  * Gem::SourceIndex functionality has been moved to Gem::Specification.
    Gem::SourceIndex is completely disconnected from Gem::Specification
  * Refactored GemPathSearcher entirely out. RIPMF

* 41 minor enhancements:

  * Added CommandManager#unregister_command
  * Added Dependency#matching_specs + to_specs.
  * Added Dependency#to_spec
  * Added Gem.pre_reset_hook/s and post_reset_hook/s.
  * Added GemCommand.reset to reinitialize the singleton
  * Added Specification#activate.
  * Added Specification#activated, activated=, and activated?
  * Added Specification#base_dir.
  * Added Specification#bin_dir and bin_file.
  * Added Specification#cache_dir and cache_file. Aliased cache_gem.
  * Added Specification#doc_dir and ri_dir.
  * Added Specification#find(name_or_dep, *requirements).
  * Added Specification#gem_dir and gems_dir.
  * Added Specification#spec_dir and spec_file.
  * Added Specification.add_spec, add_specs, and remove_spec.
  * Added Specification.all=. If you use this, we will light you on fire.
  * Added Specification.all_names.
  * Added Specification.dirs and dirs=. dirs= resets.
  * Added Specification.find_all_by_name(name, *reqs)
  * Added Specification.latest_specs. SO TINY!
  * Added TestCase#all_spec_names to help clean up tests
  * Added TestCase#assert_path_exists and refute_path_exists. Will move to
    minitest.
  * Gem.sources no longer tries to load sources gem. Only uses default_sources.
  * Installer no longer accepts a source_index option.
  * More low-level integration.
  * Removed Gem::FileOperations since it is a dummy class
  * Removed a comment because I am dumb
  * Removed pkgs/sources/lib/sources.rb
  * Revamped indexer to mostly not use SourceIndex (legacy index requires it).
  * Rewrote our last functional test suite to be happy and fast
  * RubyGems is now under the Ruby License or the MIT license
  * Specification#== now only checks name, version, and platform.
  * Specification#authors= now forcefully flattens contents (bad rspec! no
    cookie!)
  * Specification#eql? checks all fields.
  * Specification#installation_path no longer raises if it hasn't been
    activated.
  * Specification#validate now ensures that authors is not empty.
  * TestCase.util_setup_spec_fetcher no longer returns a SourceIndex.
  * Uninstaller no longer passes around SourceIndex instances
  * Warn on loading bad spec array values (ntlm-http gem has nil in its cert
    chain)
  * `gem pristine` now accepts --no-executables to skip restoring gems with
    extensions.
  * `gem pristine` can now restore multiple gems.

* 6 bug fixes:

  * DependencyInstaller passed around a source_index instance but used
    Gem.source_index.
  * Fixed Platform#== and #hash so instances may be used as hash keys.
  * Fixed broken Specification#original_platform. It should never be nil.
  * Gem::Text#format_text now strips trailing whitespace
  * Normalize LOAD_PATH with File.expand_path
  * `gem build` errors should exit 1.
  * `gem pristine` can now restore non-latest gems where the cached gem was
    removed.

=== 1.7.1 / 2011-03-32

* 1 bug fix:
  * Fixed missing file in Manifest.txt.  (Also a bug in hoe was fixed where
    `rake check_manifest` showing a diff would not exit with an error.)

=== 1.7.0 / 2011-03-32

* 16 Deprecations (woot!)
  * Deprecated Gem.all_load_paths, latest_load_paths, promote_load_path, and
    cache.
  * Deprecated RemoteFetcher#open_uri_or_path.
  * Deprecated SourceIndex#all_gems.
  * Deprecated SourceIndex#initialize(hash_of_specs).
  * Deprecated SourceIndex.from_installed_gems, from_gems_in, and
    load_specification.
  * Deprecated Specification#has_rdoc, default_executable, and
    test_suite_file(=).
  * Deprecated Specification#has_rdoc= and default_executable=

* 26 minor enhancements:
  * Added stupid simple deprecation module.
  * Added --spec option to `gem unpack` to output a gem's original metadata
  * Added packaging option to Specification#validate
  * Gem.bin_path requires the exec_name argument.
  * Read from cached specs if fetch fails for some reason
  * Refactored Specification#assign_defaults into #initialize.
  * RemoteFetcher#fetch_path now dispatches dynamically to 'fetch_<uri.schema>'
  * Removed Specification @@gather.
  * Removed Specification.attribute.
  * Removed Specification.attribute_alias_singular.
  * Removed Specification.attribute_defaults.
  * Removed Specification.attributes
  * Removed Specification.overwrite_accessor.
  * Removed Specification.read_only.
  * Removed Specification.required_attribute.
  * Removed Specification::SPECIFICATION_VERSION_HISTORY and turned into rdoc
  * Removed blanket rescue in default_executable. Hope it doesn't blow up! :P
  * Removed nearly all metaprogramming from Specification. Yay for
    attr_accessor!
  * SourceIndex#initialize changed to prefer an array of spec dirs, defaulting
    to none.
  * SourceIndex.new is now the preferred way to create SourceIndex instances.
    *gasp*
  * Specification#validate now checks that array attribs are indeed arrays.
  * Specification.default_value is now an instance method.
  * Switched Specification::TODAY to be proper midnight @ UTC
  * Update Gem::RemoteFetcher\'s User-Agent to handle RUBY_ENGINE and
    RUBY_REVISION when patchlevel is -1
  * UpdateCommand#gems_to_update now returns (name, version) pairs.
  * UpdateCommand#which_to_update now takes an optional system argument.

* 11 bug fixes:
  * Added missing remote fetcher require to pristine command (aarnell)
  * Building gems now checks to ensure all required fields are non-nil
  * Fix option parser when summary is nil.
  * Fixed `gem contents` to work with the lightweight specifications
  * Fixed `gem update --system x.y.z` where x.y.z == latest version. (MGPalmer)
  * Fixed gem contents sorting and tests. (MGPalmer)
  * Fixed intermittant problem in `gem fetch` with --platform specified (quix)
  * Fixed lightweight specifications so `gem rdoc` will generate proper
    documentation
  * MockGemUI#terminate_interaction should not raise Gem::SystemExitException.
    (MGPalmer)
  * RubyGems now raises a better error for broken .gem files.  Bug #29067 by
    Elias Baixas
  * `gem update` now uniq's command line arguments.

=== 1.6.2 / 2011-03-08

Bug Fixes:

* require of an activated gem could cause activation conflicts.  Fixes
  Bug #29056 by Dave Verwer.
* `gem outdated` now works with up-to-date prerelease gems.

=== 1.6.1 / 2011-03-03

Bug Fixes:

* Installation no longer fails when a dependency from a version that won't be
  installed is unsatisfied.
* README.rdoc now shows how to file tickets and get help.  Pull Request #40 by
  Aaron Patterson.
* Gem files are cached correctly again.  Patch #29051 by Mamoru Tasaka.
* Tests now pass with non-022 umask.  Patch #29050 by Mamoru Tasaka.

=== 1.6.0 / 2011-02-29

4 Deprecations:

* RubyGems no longer requires 'thread'.  Rails < 3 will need to add require
  'thread' to their applications.
* Gem.cache is deprecated.  Use Gem.source_index.
* RbConfig.datadir is deprecated.  Use Gem.datadir.
* Gem::LoadError#version_requirements has been removed.  Use
  Gem::LoadError#requirement.

2 Major Enhancements:

* Rewrote how Gem::activate (gem and require) resolves dependencies.
* Gem::LoadError#version_requirement has been removed. Use
  Gem::LoadError#requirement.

17 Minor Enhancments:

* Added --key to `gem push` for setting alternate API keys.
* Added --format-executable support to gem uninstall.
* Added Gem::DependencyList#clear.
* Added Gem::DependencyList#remove_specs_unsatisfied_by
* Added Gem.latest_spec_for, latest_version_for, and latest_rubygems_version.
* Added Gem::Dependency#merge which merges requirements for two
  dependencies.
* Added Gem::TestCase#util_spec for faster tests.
* Added Gem::Specification#dependent_specs.
* Added Gem::TestCase#new_spec and Gem::TestCase#install_specs.
* Added flag to include prerelease gems in Gem::SourceIndex#latest_specs.
* Gem.cache_dir always references the proper cache dir. 
  Pass true to support a user path.
* Gem.cache_gem, given a filename always references the cache gem.
  Pass true to support a user path.
* Added Gem::Specification#conflicts
* Removed rdoc gem/require from test_case.rb.
* Rubygems will no longer let you push if you're using beta or unreleased
  rubygems.
* Save RAM / GC churn by removing spec.files and rdoc options from
  locally cached gem specifications.
* SpecFetcher.fetch_spec can now take a string source_uri.

10 Bug Fixes:

* Added missing require of Gem::RemoteFetcher to the unpack command.
* RubyGems now completely removes a previous install when reinstalling.
* Fixed Gem::Installer#generate_bin to only chmod files that exist.
* Fixed handling of Windows style file:/// uris.
* Fixed requires in tests. (shota)
* Fixed script generation on Windows.
* Fixed test issues if you have older rubygems installed.
* Gem::DependencyInstaller tests use Gem::Security, add the missing require.
* Gem::Security used FileUtils but didn't require it.  Reported by Elia Schito.
* Gem::Uninstaller now respects --format-executable.

=== 1.5.3 / 2011-02-26

Bug Fixes:

* Fix for a bug in Syck which causes install failures for gems packaged with
  Psych.  Bug #28965 by Aaron Patterson.

=== 1.5.2 / 2011-02-10

Bug Fixes:

* Fixed <tt>gem update --system</tt>.  RubyGems can now update itself again.

=== 1.5.1 / 2011-02-09

==== NOTE: `gem update --system` is broken. See UPGRADING.rdoc.

Minor Enhancement:

* Added ability to do gem update --system X.Y.Z.

Bug Fixes:

* Scrub !!null YAML from 1.9.2 (install and build).
* Added missing requires for user_interaction.
* Wrote option processing tests for gem update.
* Updated upgrading doco for new gem update --system option.
* Fixed SilentUI for cygwin; try /dev/null first then fall back to NUL.
* RubyGems now enforces ruby 1.8.7 or newer.

=== 1.5.0 / 2011-01-31

==== NOTE: `gem update --system` is broken. See UPGRADING.rdoc.

Major Enhancements:

* Finally fixed all known 1.9.x issues. Upgrading is now possible!
* Merged huge 1.3.7/ruby-core changes to master.

Minor Enhancements:

* Added UPGRADING.rdoc to help deal with 1.9 issues.
* Gem::Format now gives better errors for corrupt gem files and includes paths
* Pre-install hooks can now abort gem installation by returning false
* Move shareable TestCase classes to lib/ to help plugin authors with tests.
* Add post-build hooks that can cancel the gem install
* Always require custom_require now that require_gem is gone
* Added GemInstaller accessors for @options so plugins can reference them.
* Optimized Gem.find_files. ~10% faster than 1.4.2. ~40% faster than ruby 1.9.
* Gem::SilentUI now behaves like Gem::StreamUI for asking questions.  Patch by
  Erik Hollensbe.

Bug Fixes:

* `gem update` was implicitly doing --system.
* 1.9.3: Fixed encoding errors causing gem installs to die during rdoc phase.
* Add RubyForge URL to README. Closes #28825
* 1.9.3: Use chdir {} when building extensions to prevent warnings. Fixes #4337
* 1.9.2: Fix circular require warning.
* Make requiring openssl even lazier at request of NaHi
* `gem unpack` will now download the gem if it is not in the cache. Patch by
  Erik Hollensbe.
* rubygems-update lists its development dependencies again

=== 1.4.2 / 2011-01-06

Bug fixes:

* Gem::Versions: "1.b1" != "1.b.1", but "1.b1" eql? "1.b.1". Fixes gem indexing.
* Fixed Gem.find_files.
* Removed otherwise unused #find_all_dot_rb. Only 6 days old and hella buggy.

=== 1.4.1 / 2010-12-31

Since apparently nobody reads my emails, blog posts or the README:

DO NOT UPDATE RUBYGEMS ON RUBY 1.9! See UPGRADING.rdoc for details.

Bug fix:

* Specification#load was untainting a frozen string (via `gem build *.spec`)

=== 1.4.0 / 2010-12-30

NOTE: In order to better maintain rubygems and to get it in sync with
the world (eg, 1.9's 1.3.7 is different from our 1.3.7), rubygems is
switching to a 4-6 week release schedule. This release is the
precursor to that process and as such may be a bit on the wild side!
You have been warned!

NOTE: We've switched to git/github. See README.rdoc for details.

New features:

* Added --launch option to `gem server`. (gthiesfeld)
* Added fuzzy name matching on install failures. (gstark/presidentbeef)
* Allow searching w/ file extensions: gem which fileutils.rb
* Progress indicator during download (Ryan Melton)
* Speed up Gem::Version#<=> by 2-3x in common cases. (raggi)
* --source is now additive with your current sources.
  Use --clear-sources first to maintain previous behavior.

Bug fixes:

* Dependency "~>"s now respect lower-bound prerelease versions.
* Ensure the gem directories exist on download.
* Expand Windows user home candidates for Ruby 1.8. Bug #28371 & #28494
* Fix find_files to order by version.
* Fix ivar typo. [Josh Peek]
* Normalized requires and made many of them lazy.
  Do not depend on rubygems to require stdlib stuff for you. (raggi/tmm1)
* Treat 1.0.a10 like 1.0.a.10 for sorting, etc. Fixes #27903. (dchelimsky)

=== 1.3.7 / 2010-05-13

NOTE:

http://rubygems.org is now the default source for downloading gems.

You may have sources set via ~/.gemrc, so you should replace
http://gems.rubyforge.org with http://rubygems.org

http://gems.rubyforge.org will continue to work for the forseeable future.

New features:

* `gem` commands
  * `gem install` and `gem fetch` now report alternate platforms when a
    matching one couldn't be found.
  * `gem contents` --prefix is now the default as specified in --help.  Bug
    #27211 by Mamoru Tasaka.
  * `gem fetch` can fetch of old versions again.  Bug #27960 by Eric Hankins.
  * `gem query` and friends output now lists platforms.  Bug #27856 by Greg
    Hazel.
  * `gem server` now allows specification of multiple gem dirs for
    documentation.  Bug #27573 by Yuki Sonoda.
  * `gem unpack` can unpack gems again.  Bug #27872 by Timothy Jones.
  * `gem unpack` now unpacks remote gems.
  * --user-install is no longer the default.  If you really liked it, see
    Gem::ConfigFile to learn how to set it by default.  (This change was made
    in 1.3.6)
* RubyGems now has platform support for IronRuby.  Patch #27951 by Will Green.

Bug fixes:

* Require rubygems/custom_require if --disable-gem was set.  Bug #27700 by
  Roger Pack.
* RubyGems now protects against exceptions being raised by plugins.
* rubygems/builder now requires user_interaction.  Ruby Bug #1040 by Phillip
  Toland.
* Gem::Dependency support #version_requirements= with a warning.  Fix for old
  Rails versions.  Bug #27868 by Wei Jen Lu.
* Gem::PackageTask depends on the package dir like the other rake package
  tasks so dependencies can be hooked up correctly.

=== 1.3.6 / 2010-02-17

New features:

* `gem` commands
  * Added `gem push` and `gem owner` for interacting with modern/Gemcutter
    sources
  * `gem dep` now supports --prerelease.
  * `gem fetch` now supports --prerelease.
  * `gem server` now supports --bind.  Patch #27357 by Bruno Michel.
  * `gem rdoc` no longer overwrites built documentation.  Use --overwrite
    force rebuilding.  Patch #25982 by Akinori MUSHA.
* Captial letters are now allowed in prerelease versions.

Bug fixes:

* Development deps are no longer added to rubygems-update gem so older
  versions can update sucessfully.
* Installer bugs:
  * Prerelease gems can now depend on non-prerelease gems.
  * Development dependencies are ignored unless explicitly needed.  Bug #27608
    by Roger Pack.
* `gem` commands
  * `gem which` now fails if no paths were found.  Adapted patch #27681 by
    Caio Chassot.
  * `gem server` no longer has invalid markup.  Bug #27045 by Eric Young.
  * `gem list` and friends show both prerelease and regular gems when
    --prerelease --all is given
* Gem::Format no longer crashes on empty files.  Bug #27292 by Ian Ragsdale.
* Gem::GemPathSearcher handles nil require_paths. Patch #27334 by Roger Pack.
* Gem::RemoteFetcher no longer copies the file if it is where we want it.
  Patch #27409 by Jakub Šťastný.

Deprecation Notices:

* lib/rubygems/timer.rb has been removed.
* Gem::Dependency#version_requirements is deprecated and will be removed on or
  after August 2010.
* Bulk index update is no longer supported.
* Gem::manage_gems was removed in 1.3.3.
* Time::today was removed in 1.3.3.

=== 1.3.5 / 2009-07-21

Bug fixes:

* Fix use of prerelease gems.
* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458.

Deprecation Notices:

* Bulk index update is no longer supported (the code currently remains, but not
  the tests)
* Gem::manage_gems was removed in 1.3.3.
* Time::today was removed in 1.3.3.

=== 1.3.4 / 2009-05-03

Bug Fixes:

* Fixed various warnings
* Gem::ruby_version works correctly for 1.8 branch and trunk
* Prerelease gems now show up in `gem list` and can be used
* Fixed option name for `gem setup --format-executable`
* RubyGems now matches Ruby > 1.9.1 gem paths
* Gem::RemoteFetcher#download now works for explicit Windows paths across
  drives.  Bug #25882 by Lars Christensen
* Fix typo in Gem::Requirement#parse.  Bug #26000 by Mike Gunderloy.

Deprecation Notices:

* Bulk index update is no longer supported (the code currently remains, but not
  the tests)
* Gem::manage_gems was removed in 1.3.3.
* Time::today was removed in 1.3.3.

=== 1.3.3 / 2009-05-04

New Features:

* `gem server` allows port names (from /etc/services) with --port.
* `gem server` now has search that jumps to RDoc.  Patch #22959 by Vladimir
  Dobriakov.
* `gem spec` can retrieve single fields from a spec (like `gem spec rake
  authors`).
* Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true)
* RDoc is now generated regardless of Gem::Specification#has_rdoc?

Bug Fixes:

* `gem clean` now cleans up --user-install gems.  Bug #25516 by Brett
  Eisenberg.
* Gem.bin_path now escapes paths with spaces.
* Rake extension builder uses explicit correctly loads rubygems when invoking
  rake.
* Prerelease versions now match "~>" correctly.  Patch #25759 by Yossef
  Mendelssohn.
* Check bindir for executables, not root when validating.  Bug reported by
  David Chelimsky.
* Remove Time.today, no way to override it before RubyGems loads.  Bug #25564
  by Emanuele Vicentini
* Raise Gem::Exception for #installation_path when not installed.  Bug #25741
  by Daniel Berger.
* Don't raise in Gem::Specification#validate when homepage is nil.  Bug #25677
  by Mike Burrows.
* Uninstall executables from the correct directory.  Bug #25555 by Brett
  Eisenberg.
* Raise Gem::LoadError if Kernel#gem fails due to previously-loaded gem.  Bug
  reported by Alf Mikula.

Deprecation Notices:

* Gem::manage_gems has been removed.
* Time::today has been removed early.  There was no way to make it warn and be
  easy to override with user code.

=== 1.3.2 / 2009-04-15

Select New Features:

* RubyGems now loads plugins from rubygems_plugin.rb in installed gems.
  This can be used to add commands (See Gem::CommandManager) or add
  install/uninstall hooks (See Gem::Installer and Gem::Uninstaller).
* Gem::Version now understands prerelease versions using letters. (eg.
  '1.2.1.b')  Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg.
* RubyGems now includes a Rake task for creating gems which replaces rake's
  Rake::GemPackageTask.  See Gem::PackageTask.
* Gem::find_files now returns paths in $LOAD_PATH.
* Added Gem::promote_load_path for use with Gem::find_files
* Added Gem::bin_path to make finding executables easier.  Patch #24114 by
  James Tucker.
* Various improvements to build arguments for installing gems.
* `gem contents` added --all and --no-prefix.
* Gem::Specification
  * #validate strips directories and errors on not-files.
  * #description no longer removes newlines.
  * #name must be a String.
  * FIXME and TODO are no longer allowed in various fields.
  * Added support for a license attribute.  Feature #11041 (partial).
  * Removed Gem::Specification::list, too much process growth.  Bug #23668 by
    Steve Purcell.
* `gem generate_index`
  * Can now generate an RSS feed.
  * Modern indicies can now be updated incrementally.
  * Legacy indicies can be updated separately from modern.

Select Bugs Fixed:

* Better gem activation error message. Patch #23082.
* Kernel methods are now private.  Patch #20801 by James M. Lawrence.
* Fixed various usability issues with `gem check`.
* `gem update` now rescues InstallError and continues.  Bug #19268 by Gabriel
  Wilkins.
* Allow 'https', 'file' as a valid schemes for --source.  Patch #22485.
* `gem install`
  * Now removes existing path before installing.  Bug #22837.
  * Uses Gem::bin_path in executable stubs to work around Kernel#load bug in
    1.9.
  * Correctly handle build args (after --) via the API.  Bug #23210.
* --user-install
  * `gem install --no-user-install` now works.  Patch #23573 by Alf Mikula.
  * `gem uninstall` can now uninstall from ~/.gem.  Bug #23760 by Roger Pack.
* setup.rb
  * Clarify RubyGems RDoc installation location.  Bug #22656 by Gian Marco
    Gherardi.
  * Allow setup to run from read-only location.  Patch #21862 by Luis Herrera.
  * Fixed overwriting ruby executable when BASERUBY was not set.  Bug #24958
    by Michael Soulier.
  * Ensure we're in a RubyGems dir when installing.
  * Deal with extraneous quotation mark when autogenerating .bat file on MS
    Windows.  Bug #22712.

Deprecation Notices:

* Gem::manage_gems has been removed.
* Time::today will be removed in RubyGems 1.4.

Special thanks to Chad Wooley for backwards compatibility testing and Luis
Lavena and Daniel Berger for continuing windows support.

=== 1.3.1 / 2008-10-28

Bugs fixed:

* Disregard ownership of ~ under Windows while creating ~/.gem.  Fixes
  issues related to no uid support under Windows.
* Fix requires for Gem::inflate, Gem::deflate, etc.
* Make Gem.dir respect :gemhome value from config.  (Note: this feature may be
  removed since it is hard to implement on 1.9.)
* Kernel methods are now private.  Patch #20801 by James M. Lawrence.
* Gem::location_of_caller now behaves on Windows.  Patch by Daniel Berger.
* Silence PATH warning.

Deprecation Notices:

* Gem::manage_gems will be removed on or after March 2009.

=== 1.3.0 / 2008-09-25

New features:

* RubyGems doesn't print LOCAL/REMOTE titles for `gem query` and friends if
  stdout is not a TTY, except with --both.
* Added Gem.find_files, allows a gem to discover features provided by other
  gems.
* Added pre/post (un)install hooks for packagers of RubyGems.  (Not for gems
  themselves).
* RubyGems now installs gems into ~/.gem if GEM_HOME is not writable.  Use
  --no-user-install command-line switch to disable this behavior.
* Fetching specs for update now uses If-Modified-Since requests.
* RubyGems now updates the ri cache when the rdoc gem is installed and
  documentation is generated.

Deprecation Notices:

* Gem::manage_gems now warns when called.  It will be removed on or after March
  2009.

Bugs Fixed:

* RubyGems 1.3.0+ now updates when no previous rubygems-update is installed.
  Bug #20775 by Hemant Kumar.
* RubyGems now uses the regexp we already have for `gem list --installed`.  Bug
  #20876 by Nick Hoffman.
* Platform is now forced to Gem::Platform::RUBY when nil or blank in the
  indexer.  Fixes various uninstallable gems.
* Handle EINVAL on seek.  Based on patch in bug #20791 by Neil Wilson.
* Fix HTTPS support.  Patch #21072 by Alex Arnell.
* RubyGems now loads all cache files even if latest has been loaded.  Bug
  #20776 by Uwe Kubosch.
* RubyGems checks for support of development dependencies for #to_ruby.  Bug
  #20778 by Evan Weaver.
* Now specifications from the future can be loaded.
* Binary script uninstallation fixed.  Bug #21234 by Neil Wilson.
* Uninstallation with -i fixed.  Bug #20812 by John Clayton.
* Gem::Uninstaller#remove_all now calls Gem::Uninstaller#uninstall_gem so hooks
  get called.  Bug #21242 by Neil Wilson.
* Gem.ruby now properly escaped on windows.  Fixes problem with extension
  compilation.
* `gem lock --strict` works again.  Patch #21814 by Sven Engelhardt.
* Platform detection for Solaris was improved.  Patch #21911 by Bob Remeika.

Other Changes Include:

* `gem help install` now describes _version_ argument to executable stubs
* `gem help environment` describes environment variables and ~/.gemrc and
  /etc/gemrc
* On-disk gemspecs are now read in UTF-8 and written with a UTF-8 magic comment
* Rakefile
  * If the SETUP_OPTIONS environment variable is set, pass its contents as
    arguments to setup.rb
* lib/rubygems/platform.rb
  * Remove deprecated constant warnings and really deprecate them.  (WIN32,
    etc).
* lib/rubygems/remote_fetcher.rb
  * Now uses ~/.gem/cache if the cache dir in GEM_HOME is not writable.
* lib/rubygems/source_index.rb
  * Deprecate options to 'search' other than Gem::Dependency instances and
    issue warning until November 2008.
* setup.rb
  * --destdir folder structure now built using Pathname, so it works for
    Windows platforms.
* test/*
  * Fixes to run tests when under test/rubygems/.  Patch by Yusuke ENDOH
    [ruby-core:17353].
* test/test_ext_configure_builder.rb
  * Locale-free patch by Yusuke Endoh [ruby-core:17444].

=== 1.2.0 / 2008-06-21

New features:

* RubyGems no longer performs bulk updates and instead only fetches the gemspec
  files it needs.  Alternate sources will need to upgrade to RubyGems 1.2 to
  allow RubyGems to take advantage of the new metadata updater.  If a pre 1.2
  remote source is in the sources list, RubyGems will revert to the bulk update
  code for compatibility.
* RubyGems now has runtime and development dependency types.  Use
  #add_development_dependency and #add_runtime_dependency.  All typeless
  dependencies are considered to be runtime dependencies.
* RubyGems will now require rubygems/defaults/operating_system.rb and
  rubygems/defaults/#{RBX_ENGINE}.rb if they exist.  This allows packagers and
  ruby implementers to add custom behavior to RubyGems via these files.  (If
  the RubyGems API is insufficient, please suggest improvements via the
  RubyGems list.)
* /etc/gemrc (and windows equivalent) for global settings
* setup.rb now handles --vendor and --destdir for packagers
* `gem stale` command that lists gems by last access time

Bugs Fixed:

* File modes from gems are now honored, patch #19737
* Marshal Gem::Specification objects from the future can now be loaded.
* A trailing / is now added to remote sources when missing, bug #20134
* Gems with legacy platforms will now be correctly uninstalled, patch #19877
* `gem install --no-wrappers` followed by `gem install --wrappers` no longer
  overwrites executables
* `gem pristine` now forces reinstallation of gems, bug #20387
* RubyGems gracefully handles ^C while loading .gemspec files from disk, bug
  #20523
* Paths are expanded in more places, bug #19317, bug #19896
* Gem::DependencyInstaller resets installed gems every install, bug #19444
* Gem.default_path is now honored if GEM_PATH is not set, patch #19502

Other Changes Include:

* setup.rb
  * stub files created by RubyGems 0.7.x and older are no longer removed.  When
    upgrading from these ancient versions, upgrade to 1.1.x first to clean up
    stubs.
  * RDoc is no longer required until necessary, patch #20414
* `gem server`
  * Now completely matches the output of `gem generate_index` and
    has correct content types
  * Refreshes from source directories for every hit.  The server will no longer
    need to be restarted after installing gems.
* `gem query --details` and friends now display author, homepage, rubyforge url
  and installed location
* `gem install` without -i no longer reinstalls dependencies if they are in
  GEM_PATH but not in GEM_HOME
* Gem::RemoteFetcher now performs persistent connections for HEAD requests,
  bug #7973

=== 1.1.1 / 2008-04-11

Bugs Fixed:

* Gem.prefix now returns non-nil only when RubyGems was installed outside
  sitelibdir or libdir.
* The `gem server` gem list now correctly links to gem details.
* `gem update --system` now passes --no-format-executable to setup.rb.
* Gem::SourceIndex#refresh! now works with multiple gem repositories.
* Downloaded gems now go into --install-dir's cache directory.
* Various fixes to downloading gem metadata.
* `gem install --force` now ignores network errors too.
* `gem pristine` now rebuilds extensions.
* `gem update --system` now works on virgin Apple ruby.
* Gem::RemoteFetcher handles Errno::ECONNABORTED.
* Printing of release notes fixed.

=== 1.1.0 / 2008-03-29

New features:

* RubyGems now uses persistent connections on index updates.  Index updates are
  much faster now.
* RubyGems only updates from a latest index by default, cutting candidate gems
  for updates to roughly 1/4 (at present).  Index updates are even faster
  still.
  * `gem list -r` may only show the latest version of a gem, add --all to see
    all gems.
* `gem spec` now extracts specifications from .gem files.
* `gem query --installed` to aid automation of checking for gems.

Bugs Fixed:

* RubyGems works with both Config and RbConfig now.
* Executables are now cleaned upon uninstall.
* You can now uninstall from a particular directory.
* Updating from non-default sources fixed.
* Executable stubs now use ruby install name in shebang.
* `gem unpack` checks every directory in Gem.path now.
* `gem install` now exits with non-zero exit code when appropriate.
* `gem update` only updates gems that need updates.
* `gem update` doesn't force remote-only updates.
* `gem update` handles dependencies properly when updating.
* Gems are now loaded in Gem.path order.
* Gem stub scripts on windows now work outside Gem.bindir.
* `gem sources -r` now works without network access.

Other Changes Include:

* RubyGems now requires Ruby > 1.8.3.
* Release notes are now printed upon installation.
* `gem env path` now prints a usable path.
* `gem install` reverts to local-only installation upon network error.
* Tar handling code refactoring and cleanup.
* Gem::DependencyInstaller's API has changed.

For a full list of changes to RubyGems, see the ChangeLog file.

=== 1.0.1 / 2007-12-20

Bugs Fixed:

* Installation on Ruby 1.8.3 through 1.8.5 fixed
* `gem build` on 1.8.3 fixed

Other Changes Include:

* Since RubyGems 0.9.5, RubyGems is no longer supported on Ruby 1.8.2 or older,
  this is official in RubyGems 1.0.1.

=== 1.0.0 / 2007-12-20

Major New Features Include:

* RubyGems warns about various problems with gemspecs during gem building
* More-consistent versioning for the RubyGems software

Other Changes Include:

* Fixed various bugs and problems with installing gems on Windows
* Fixed using `gem server` for installing gems
* Various operations are even more verbose with --verbose
* Built gems are now backwards compatible with 0.9.4
* Improved detection of RUBYOPT loading rubygems
* `ruby setup.rb` now has a --help option
* Gem::Specification#bindir is now respected on installation
* Executable stubs can now be installed to match ruby's name, so if ruby is
  installed as 'ruby18', foo_exec will be installed as 'foo_exec18'
* `gem unpack` can now unpack into a specific directory with --target
* OpenSSL is no longer required by default

Deprecations and Deletions:

* Kernel#require_gem has been removed
* Executables without a shebang will not be wrapped in a future version, this
  may cause such executables to fail to operate on installation
* Gem::Platform constants other than RUBY and CURRENT have been removed
* Gem::RemoteInstaller was removed
* Gem::Specification#test_suite_file and #test_suite_file= are deprecated in
  favor of #test_file and #test_file=
* Gem::Specification#autorequire= has been deprecated
* Time::today will be removed in a future version

=== 0.9.5 / 2007-11-19

Major New Features Include:

* Platform support
* Automatic installation of platform gems
* New bandwidth and memory friendlier index file format
* "Offline" mode (--no-update-sources)
* Bulk update threshold can be specified (-B, --bulk-threshold)
* New `gem fetch` command
* `gem` now has "really verbose" output when you specify -v
* Improved stubs and `gem.bat` on mswin, including better compatiblity
  with the One-Click Installer.

Other Changes Include:

* Time::today is deprecated and will be removed at a future date
* Gem::manage_gems is deprecated and will be removed at a future date
* `gem install --include-dependencies` (-y) is now deprecated since it is the
  default, use --ignore-dependencies to turn off automatic dependency
  installation
* Multi-version diamond dependencies only are installed once
* Processing a YAML bulk index update takes less memory
* `gem install -i` makes sure all depenencies are installed
* `gem update --system` reinstalls into the prefix it was originally installed
  in
* `gem update --system` respects --no-rdoc and --no-ri flags
* HTTP basic authentication support for proxies
* Gem::Specification#platforms should no longer be a String, use
  Gem::Platform::CURRENT when building binary gems instead
* `gem env` has more diagnostic information
* require 'rubygems' loads less code
* sources.gem is gone, RubyGems now uses built-in defaults
* `gem install --source` will no longer add --source by default, use `gem
  sources --add` to make it a permanent extra source
* `gem query` (list) no longer prints details by default
* Exact gem names are matched in various places
* mkrf extensions are now supported
* A gem can depend on a specific RubyGems version
* `gem_server` is now `gem server`
* `gemlock` is now `gem lock`
* `gem_mirror` is now `gem mirror`
* `gemwhich` is now `gem which`
* `gemri` is no longer included with RubyGems
* `index_gem_repository.rb` is now `gem generate_index`
* `gem` performs more validation of parameters
* Custom rdoc styles are now supported
* Gem indexer no longer removes quick index during index creation
* Kernel#require only rescues a LoadError for the file being required now
* `gem dependencies` can now display some information for remote gems
* Updating RubyGems now works with RUBYOPT=-rubygems

Special thanks to:

* Daniel Berger
* Luis Lavena
* Tom Copeland
* Wilson Bilkovich

=== 0.9.4 / 2007-05-23

If you are experiencing problems with the source index (e.g. strange
"No Method" errors), or problems with zlib (e.g. "Buffer Error"
messsage), we recommend upgrading to RubyGems 0.9.4.

Bug Fixes Include:

* Several people have been experiencing problems with no method errors
  on the source index cache.  The source index cache is now a bit more
  self healing.  Furthermore, if the source index cache is
  irreparable, then it is automatically dropped and reloaded.
* The source cache files may now be dropped with the "gem sources
  --clear-all" command.  (This command may require root is the system
  source cache is in a root protected area).
* Several sub-commands were accidently dropped from the "gem" command.
  These commands have been restored.

=== 0.9.3 / 2007-05-10

Bug Fixes Include:

The ZLib library on Windows will occasionally complains about a buffer error
when unpacking gems.  The Gems software has a workaround for that problem, but
the workaround was only enabled for versions of ZLib 1.2.1 or earlier.  We
have received several reports of the error occuring with ZLib 1.2.3, so we
have permanently enabled the work around on all versions.

=== 0.9.2 / 2007-02-05

Bug Fixes Include:

* The "unpack" command now works properly.
* User name and password are now passed properly to the authenticating
  proxy when downloading gems.

=== 0.9.1 / 2007-01-16

See ChangeLog

=== 0.9.0 / 2006-06-28

Finally, the much anticipated RubyGems version 0.9.0 is now available.
This release includes a number of new features and bug fixes.  The
number one change is that we can now download the gem index
incrementally.  This will greatly speed up the gem command when only a
few gems are out of date.

Major Enhancments include:

* The gem index is now downloaded incrementally, only updating entries
  that are out of date.  If more than 50 entries are out of date, we
  revert back to a bulk download.
* Several patches related to allowing RubyGems to work with
  authenticating proxies (from Danie Roux and Anatol Pomozov).  Just
  put the user and password in the proxy URL (e.g. -p
  http://user:password@proxy.address.com:8080) or use the
  HTTP_PROXY_USER and HTTP_PROXY_PASS environment variables.
* The gem unpack command can now accept a file path rather than just a
  install gem name.
* Both RI and RDOC documents are now generated by default.
* A gemri command is included to read gem RI docs (only needed for
  Ruby 1.8.4 or earlier).

Minor enhancements include:

* Verison 0.0.0 is now a valid gem version.
* Better detection of missing SSL functionality.
* SSL is not required if the security policy does not require
  signature checking.
* Rake built extensions are now supported (Tilman Sauerbeck).
* Several autorequire bug fixes.
* --traceback is now an alias for --backtrace (I can never remember
  which one it is).
* SAFE=1 compatibility fixes.
* .rbw is now a supported suffix for RubyGem's custom require.
* Several Ruby 1.9 compatibility fixes (Eric Hodel).

Bug Fixes:

* Added dashes to gemspecs generated in Ruby 1.8.3.  This solves some
  cross-Ruby version compatibility issues.
* Fixed bug where the wrong executables could be uninstalled (Eric
  Hodel).
* Fixed bug where gem unpack occasionally unpacked the wrong gem.
* Fixed bug where a fatal error occured when permissions on .gemrc
  were too restrictive (reported by Luca Pireddu).
* Fixed prefix handling for native expressions (patch by Aaron Patterson).
* Fixed several Upgrade => Update typos.

=== 0.8.11 / 2005-07-13

* -y is a synonym for --include-dependencies.
* Better handling of errors in the top level rescue clause.
* Package list command (e.g. gem inspect GEM).
* .gemrc now allows cvsrc-like options to set defaults per subcommand.
* The autorequire gem spec field will now accept a list.
* Substituted Time for Date in specs, increasing performance
  dramatically.
* Fixed reported bug of gem directories ending in "-" (reported by
  Erik Hatcher).
* Fixed but in installer that caused dependency installation to not
  work.
* Added Paul Duncan's gem signing patch.
* Added Mark Hubbart's Framework patch (for better integration with OS
  X).
* Added David Glasser's install-from-mirror patch.
* Additional internal structural cleanup and test reorganization.

=== 0.8.10 / 2005-03-27

* In multi-user environments, it is common to supply mulitple versions of gems
  (for example Rails), allowing individual users to select the version of the
  gem they desire.  This allows a user to be insulated from updates to that
  gem.  RubyGems 0.8.10 fixes a problem where gems could occasionally become
  confused about the current versions of libraries selected by the user.
* The other annoying bug is that if there are any existing rubygems-update gems
  installed, then the "gem update --system" command will download a new
  update, but install the latest update prior to the download.

=== 0.8.9

Never released

=== 0.8.8 / 2005-03-14

* Moved the master definition of class Requirement back under version.
  Kept the body of Requirement under Gem.

=== 0.8.7 / 2005-03-14

Even though it has only been a few weeks since that last release,
there are quite a number of new features in 0.8.7.  A complete list of
new features will be given below, but here is a summary of the hot
items.

* The bug that prevented some users from installing rails has been
  squashed.  A big thanks to Bill Guindon (aGorilla) for helping track
  that one down.

There are several new commands available on the gem command:

* gem cleanup GEMNAME -- Cleanup (uninstall) all the old versions of
  gem.  If the gem name is omitted, the entire repository is cleaned.
* gem dependency GEMNAME -- Show the dependencies for the named gems.
  This is really helpful when trying to figure out what gem needs what
  other gem.

There changes to the existing commands as well.

* gem uninstall is much smarter about removing gems from the
  repository.  Lists of gems are now uninstalled in proper dependency
  order (ie. if A depends on B, A is uninstalled first).  Also,
  warnings about broken dependencies occur only when removing the
  *last* gem that supports a dependency is removed.

Both gem install and gem uninstall support some new command line
options that can reduce the amount of yes/no queries given the user.
For install we have:

* --ignore-dependencies -- Only install requests gems, no
  dependendecies are automatically installed.
* --include-dependencies -- Automatically install dependencies,
  without confirmation.

For gem uninstall, the new options are:

* --all -- Uninstall all matching gems without confirmation.
* --ignore-dependencies -- Uninstall, even if dependencies are broken.
* --executables -- Remove executables without confirmation

Under general cleanup, gems will not, by default, run RDoc on packages
that do not have the RDoc flag set.

And finally there is a new library file 'gemconfigure' to aid in
writing version sensitive applications (without undue dependencies on
RubyGems); and 'gemwhich', a short script to locate libraries in the
file system.  You can read more about them here:

* gemconfigure: http://docs.rubygems.org/read/chapter/4#page73
* gemwhich: http://docs.rubygems.org/read/chapter/17

=== 0.8.6 / 2005-02-27

* Fixed a small bug with shebang construction

=== 0.8.5 / 2005-02-26

Do you know how you used to dread getting the following message while
installing gems?

  Updating Gem source index for: http://gems.rubyforge.org

It could take up to 30 seconds (on my machine, even worse on others) for
that crazy source index to update.

This latest release of RubyGems speeds that wait time up considerably.
The following table gives the following times for installing RedCloth
with a required source index update on three system we had available to
us.  No RDoc generation was included in the following times.

  RubyGems    Linux         Mac OSX      Windows
  0.8.4       33 secs       73 secs      58 secs
  0.8.5        8 secs       14 secs      21 secs

The new caching code is at least 3x faster than previous versions.  Woo
Hoo!

=== 0.8.4 / 2005-01-01

* Rubygems 0.8.3's installer was broken unless you already had an older
  version of RubyGems installed.  That's fixed.
* Change in the way Gem::Specification internally deals with lazy attributes
  and defaults, bringing (with some loadpath_manager changes) a fairly
  significant increase in speed.
* Support for lower-cased Gem file names (for you, Paul Duncan :)
* Erik Veenstra's patch for making Gem versions sortable.

=== 0.8.3 / 2004-12-07

No real earth shattering news here, but there were a number of really
annoying issues involving other libraries that RubyGems depends upon.
0.8.3 contains some workarounds for these issues.  In particular:

* Added workaround for the null byte in Dir string issue. (see
  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/121702).
  (Thanks to Mauricio Fernández for the quick response on this one).
* Added workaround for old version of Zlib on windows that caused
  Ruwiki to fail to install. (see
  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/121770)
* Added workaround for large YAML file issues.  (We dynamically cut
  down the size of the source index YAML file and seem to have worked
  around immediate issues.

There has been some minor usability enhancements and changes ...

* A user specific source index cache can be used when the site-wide
  cache is unwritable (i.e. because you are running as a non-admin).
  This *greatly* speeds up gem commands run in non-admin mode when the
  site-wide cache is out of date.
* The gem command now used an HTTP HEAD command to detect if the
  server's source index needs to be downloaed.
* gem check gemname --test will run unit tests on installed gems that
  have unit tests.
* Multiple gem names are allowed on the gem install command line.
  This means you can do:
  
    gem install rake rails needle postgres-pr pimki
  
  (Ok, you get the idea)
* Multiple authors my be specified in a Gem spec.
* Switched to using setup.rb (rather than a custom install script) for
  the installation of RubyGems itself.  If you have installed RubyGems
  before, double check the installation instructions and make sure you
  use setup.rb instead of install.rb.
* Ryan Davis has provided a patch so you can use an env variable
  (GEM_SKIP), to tell loadpath_manager not to load gems of those
  names.  This was useful for him while testing libs that he had in
  development.

=== 0.8.1 / 2004-09-17

* Quick release to capture some bug fixes.

=== 0.8.0 / 2004-09-15

* Remove need for library stubs.  Set the RUBYOPT environment variable to
  include "rrubygems", and a normal require will find gem files.  Continue to
  use 'require_gem gem_name, version' to specify gem versions.
* Deprecated "test_suite_file" gemspec attribute in favor of "test_files" array.
* Generates rdoc by default on installs.
* Adopted tar/gzip file format, thanks to Mauricio Fernandez.
* "gem rdoc" allows generation of rdoc after gem installation (will add a "gem
  test"
* Application stubs can now accept an optional parameter of _VERSION_ that will
  run an arbitrary version of the application requested.
* Various bug fixes
* Various platform-independency improvements
* "gem spec --all" displays spec info for all installed version of a given gem.
* Dynamic caching of sources
* Support for user-definable sources on the command line (thanks Assaph Mehr)
* More intelligent support for platform-dependent gems.  Use Platform::CURRENT
  when building a gem to set its platform to the one you're building on.
  Installation displays a choice of platform-dependent gems, allowing the user
  to pick.
* Added "gem unpack" for "unpacking" a gem to the current directory

=== 0.7.0 / 2004-07-09

See ChangeLog

=== 0.6.1 / 2004-06-08

See ChangeLog

=== 0.6.0 / 2004-06-08

* Collapse output of --search and --list (and gem_server) operations so that
  each gem is listed only once, with each of its versions listed on the same
  line.
* bin/gem: new --upgrade-all option allows one to upgrade every installed gem
* new #required_ruby_version attribute added to gem specification for
  specifying a dependency on which version of ruby the gem needs.  Format it
  accepts is the same as the Gem::Version::Requirement format:
  
    spec.required_ruby_version = "> 1.8.0"
* --install-stub defaults to true, so library stubs are created

=== 0.5.0 / 2004-06-06

* Jim added the ability to specify version constraints to avoid API
  incompatibilities.  This has been the subject of much debate for the past
  couple of months, with many ideas and code contributed by Eivind Eklund and
  Mauricio Fernandez.  The following set of assertions shows how it works:
  
    assert_inadequate("1.3", "~> 1.4")
    assert_adequate(  "1.4", "~> 1.4")
    assert_adequate(  "1.5", "~> 1.4")
    assert_inadequate("2.0", "~> 1.4") # This one is key--the new operator
				       # disallows major version number
				       # differences.
* Group gem search output when multiple versions exist for a given gem:
  
    activerecord (0.7.8, 0.7.7, 0.7.6, 0.7.5)
      Implements the ActiveRecord pattern for ORM.
* Add arbitrary RDoc-able files via gemspec (not just Ruby source files) for
  people who have, for example, README.rdoc in their distributions.  Add to
  gemspec via: spec.extra_rdoc_files = ["list", "of", "files"].  Ruby files are
  automatically included.
* Some small bug fixes

=== 0.4.0 / 2004-05-30

* Minor bug fixes including Windows compatability issues

=== 0.3.0 / 2004-04-30

* Cleanup of command-line arguments and handling.  Most commands accept a
  --local or --remote modifier.
* Creation of Application Gems (packages that include executable programs).
  See http://rubygems.rubyforge.org/wiki/wiki.pl?DeveloperGuide for information
  on how to use it.
* Basic functionality for installing binary gems from source (:extensions
  property of gem specification holds an array of paths to extconf.rb files to
  be used for compilation)
* Install library "stub" allowing a normal 'require' to work (which then does
  the rubygems require and 'require_gem'
* --run-tests runs the test suite specified by the "test_suite_file" property
  of a gem specification
* HTTP Proxy support works.  Rewrite of HTTP code.
* Unit and functional tests added (see Rakefile).
* Prompt before remote-installing dependencies during gem installation.
* Config file for storing preferences for 'gem' command usage.
* Generally improved error messages (still more work to do)
* Rearranged gem directory structure for cleanliness.

=== 0.2.0 / 2004-03-14

* Initial public release

doc/alt-ruby18/README.ja000064400000010355150403614110010471 0ustar00* Ruby�Ȥ�

Ruby�ϥ���ץ뤫�Ķ��Ϥʥ��֥������Ȼظ�������ץȸ���Ǥ���
Ruby�Ϻǽ餫����ʥ��֥������Ȼظ�����Ȥ���߷פ���Ƥ���
�����顤���֥������Ȼظ��ץ���ߥ󥰤��ڤ˹Ԥ����������
����������̾�μ�³�����Υץ���ߥ󥰤��ǽ�Ǥ���

Ruby�ϥƥ����Ƚ���ط���ǽ�Ϥʤɤ�ͥ�졤Perl��Ʊ�����餤����
�Ǥ�������˥���ץ��ʸˡ�ȡ��㳰����䥤�ƥ졼���ʤɤε���
�ˤ�äơ����ʬ����䤹���ץ���ߥ󥰤�����ޤ���


* Ruby����Ĺ

  + ����ץ��ʸˡ
  + ���̤Υ��֥������Ȼظ���ǽ(���饹���᥽�åɥ�����ʤ�)
  + �ü�ʥ��֥������Ȼظ���ǽ(Mixin, �ðۥ᥽�åɤʤ�)
  + �黻�ҥ����С�����
  + �㳰�����ǽ
  + ���ƥ졼���ȥ�������
  + �����١������쥯��
  + �����ʥߥå����ǥ��� (�������ƥ�����ˤ��)
  + �ܿ������⤤��¿����UNIX���ư�������Ǥʤ���DOS��Windows��
    Mac��BeOS�ʤɤξ�Ǥ�ư��


* ���ˡ

** FTP��

�ʲ��ξ��ˤ����Ƥ���ޤ���

  ftp://ftp.ruby-lang.org/pub/ruby/

** Subversion��

�ܥ֥���Ruby�κǿ��Υ����������ɤϼ��Υ��ޥ�ɤǼ���Ǥ��ޤ���

  $ svn co http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8/

��ȯ��ü�Υ����������ɤϼ��Υ��ޥ�ɤǼ���Ǥ��ޤ���

  $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby

¾�˳�ȯ��Υ֥��ΰ���ϼ��Υ��ޥ�ɤǸ����ޤ���

  $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/


* �ۡ���ڡ���

Ruby�Υۡ���ڡ�����URL��

   http://www.ruby-lang.org/

�Ǥ���


* �᡼��󥰥ꥹ��

Ruby�Υ᡼��󥰥ꥹ�Ȥ�����ޤ������ô�˾�����

   ruby-list-ctl@ruby-lang.org

�ޤ���ʸ��

   subscribe YourFirstName YourFamilyName
   
�Ƚ񤤤���äƲ������� 

Ruby��ȯ�Ը����᡼��󥰥ꥹ�Ȥ⤢��ޤ���������Ǥ�ruby�Υ�
��������λ��ͳ�ĥ�ʤɼ���������ˤĤ��Ƶ������Ƥ��ޤ���
���ô�˾�����

   ruby-dev-ctl@ruby-lang.org

�ޤ�ruby-list��Ʊ�ͤ��ˡ�ǥ᡼�뤷�Ƥ��������� 

Ruby��ĥ�⥸�塼��ˤĤ����ä��礦ruby-ext�᡼��󥰥ꥹ�Ȥ�
��شط�������ˤĤ����ä��礦ruby-math�᡼��󥰥ꥹ�Ȥ�
�Ѹ���ä��礦ruby-talk�᡼��󥰥ꥹ�Ȥ⤢��ޤ��������ˡ
�Ϥɤ��Ʊ���Ǥ��� 


* ����ѥ��롦���󥹥ȡ���

�ʲ��μ��ǹԤäƤ���������

  1. �⤷configure�ե����뤬���Ĥ���ʤ����⤷����
     configure.in���Ť��褦�ʤ顢autoconf��¹Ԥ���
     ������configure�������

  2. configure��¹Ԥ���Makefile�ʤɤ������

     �Ķ��ˤ�äƤϥǥե���Ȥ�C����ѥ����ѥ��ץ�����դ�
     �ޤ���configure���ץ����� optflags=.. warnflags=.. �
     �Ǿ�񤭤Ǥ��ޤ���

  3. (ɬ�פʤ��)defines.h���Խ�����

     ¿ʬ��ɬ��̵���Ȼפ��ޤ���

  4. (ɬ�פʤ��)ext/Setup���Ū�˥�󥯤����ĥ�⥸�塼���
     ���ꤹ��

     ext/Setup�˵��Ҥ����⥸�塼����Ū�˥�󥯤���ޤ���

     �����ʥߥå����ǥ��󥰤򥵥ݡ��Ȥ��Ƥ��ʤ��������ƥ�
     ����Ǥ�Setup��1���ܤΡ�option nodynamic�פȤ����ԤΥ�
     ���Ȥ򳰤�ɬ�פ�����ޤ����ޤ������Υ������ƥ������
     ��ĥ�⥸�塼�����Ѥ��뤿��ˤϡ����餫�����Ū�˥��
     �����Ƥ���ɬ�פ�����ޤ���

  5. make��¹Ԥ��ƥ���ѥ��뤹��

  6. make test�ǥƥ��Ȥ�Ԥ���

     ��test succeeded�פ�ɽ������������Ǥ����������ƥ���
     ��������Ƥⴰ�����ݾڤ���Ƥ�����ǤϤ���ޤ���

  7. make install

     root�Ǻ�Ȥ���ɬ�פ����뤫�⤷��ޤ���

�⤷������ѥ����˥��顼��ȯ���������ˤϥ��顼�Υ��ȥ�
����OS�μ����ޤ�Ǥ������ܤ�����ݡ��Ȥ��Ԥ���äƤ�
�������¾����Τ���ˤ�ʤ�ޤ���


* �ܿ�

UNIX�Ǥ����configure���ۤȤ�ɤκ��ۤ�ۼ����Ƥ����Ϥ���
�������פ�̸���Ȥ������ä����(����˰㤤�ʤ�)����Ԥˤ���
���Ȥ��ݡ��Ȥ���С����Ǥ��뤫���Τ�ޤ���

�������ƥ�����ˤ�äȤ��¸����Τ�GC��Ǥ���Ruby��GC���о�
�Υ������ƥ����㤬setjmp()�ˤ�ä���ƤΥ쥸������ jmp_buf��
��Ǽ���뤳�Ȥȡ�jmp_buf�ȥ����å���32bit���饤����Ȥ����
���뤳�Ȥ��ꤷ�Ƥ��ޤ����ä���Ԥ���Ω���ʤ������б�����
��˺���Ǥ��礦����Ԥβ������Ū��ñ�ǡ�gc.c�ǥ����å���
�ޡ������Ƥ�����ʬ�˥��饤����ȤΥХ��ȿ�����餷�ƥޡ�
�����륳���ɤ��ɲä������ǺѤߤޤ�����defined(THINK_C)�פ�
����Ƥ�����ʬ�򻲹ͤˤ��Ƥ�������

# �ºݤˤ�Ruby��Think C�Ǥϥ���ѥ���Ǥ��ޤ���

�쥸����������ɥ����CPU�Ǥϡ��쥸����������ɥ��򥹥���
���˥ե�å��夹�륢����֥饳���ɤ��ɲä���ɬ�פ����뤫����
��ޤ���


* ���۾��

COPYING.ja�ե�����򻲾Ȥ��Ƥ���������


* ���

�����ȡ��Х���ݡ��Ȥ���¾�� matz@netlab.jp �ޤǡ�
-------------------------------------------------------
created at: Thu Aug  3 11:57:36 JST 1995
Local variables:
mode: indented-text
end:
doc/alt-ruby18/ChangeLog000064400003215150150403614110010775 0ustar00Thu Jun 27 20:55:23 2013  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/openssl/test_ssl.rb: Oops, sorry!

Thu Jun 27 20:21:18 2013  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* ext/openssl/lib/openssl/ssl-internal.rb (OpenSSL::SSL#verify_certificate_identity):
	  fix hostname verification. Patch by nahi.

	* test/openssl/test_ssl.rb (OpenSSL#test_verify_certificate_identity):
	  test for above.

Sat May 18 23:34:50 2013  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/document.rb: move entity_expansion_text_limit accessor to ...
	* lib/rexml/rexml.rb: ... here to make rexml/text independent from
	  REXML::Document. It causes circular require.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  deprecated.
	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit=):
	  deprecated.
	* lib/rexml/text.rb: add missing require "rexml/rexml" for
	  REXML.entity_expansion_text_limit.
	  Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961]

Sat May 18 23:34:50 2013  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  new attribute to read/write entity expansion text limit.  the default
	  limit is 10Kb.

	* lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.

Fri Oct 12 12:25:15 2012  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* error.c (name_err_to_s): we need not infect msg.

	* test/ruby/test_exception.rb (TestException#test_exception_to_s_should_not_propagate_untrustedness): test for it.

Fri Jun 29 21:26:05 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (stack_extend): prevent ALLOCA_N, which reserves a memory
	  space with for restoring machine stack stored in each threads, from
	  optimization out.  backport r34278 from the trunk.

Mon Jun 18 18:32:43 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32609 from trunk.

	* ext/openssl/ossl_hmac.c: Revert checking return type of
	  HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.

Mon Jun 18 18:32:43 2012  Martin Bosslet  <Martin.Bosslet@googlemail.com>

	* backport r32606 from trunk.

	* ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
	* ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
	  Thanks, Jared Jennings, for the patch.
	  [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]

Sun Jun 10 03:00:21 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_setjmp): need to save the stack after r2 (the Table
	  of Contents on ppc64) is saved onto the stack by getcontext().
	  based on <https://bugzilla.redhat.com/show_bug.cgi?id=628715>.
	  Bug#4411

Thu Jun  7 19:00:35 2012  Kenta Murata <mrkn@mrkn.jp>

	* ext/bigdecimal/bigdecimal.c (VpMemAlloc): Fixes a bug reported
	  by Drew Yao <ayao at apple.com>

Wed Jun  6 15:09:00 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_join), ext/thread/thread.c (wake_one): adjusts
	  targets of rest waiting threads to join.  [ruby-core:23457]

Wed Jun  6 14:44:13 2012  Kenta Murata  <mrkn@mrkn.jp>

	* bignum.c (rb_big2dbl), test/ruby/test_bignum.rb (test_to_f):
	  A negative Bignum out of Float range should be converted to -Infinity.
	  [ruby-core:30492] [Bug #3362]

Wed Jun  6 14:06:02 2012  Tanaka Akira  <akr@fsij.org>

	* lib/webrick/utils.rb: fix fcntl call.

	* lib/drb/unix.rb: ditto.

Mon May 21 16:29:47 2012  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
	  module before calling rb_class2name().

Fri May 11 14:09:48 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
	  must not cast it to unsigned long, which may be shorter than
	  VALUE, and the result can be mere garbage.

Sat Apr 14 18:51:41 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big2str0): prevent working clone from
	  GC. [exerb-dev:0578].  patched by MURASE Masamitsu
	  <masamitsu.murase AT gmail.com> at [exerb-dev:0580]

Fri Mar  2 11:44:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (mark_dump_arg): mark destination string.  patch by
	  Vit Ondruch.  [Bug #4339]

	* marshal.c (clear_dump_arg, clear_load_arg): clean up also data
	  tables as same as symbols tables.

Fri Mar  2 11:44:33 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (struct {dump,load}_arg): manage with dfree, instead
	  of using local variable which may be moved by context switch.
	  [ruby-dev:39425]

Wed Feb  8 14:06:59 2012  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
	  option to prevent BEAST attack. See [Bug #5353].

	  In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
	  TLS-CBC-IV vulunerability described at
	  http://www.openssl.org/~bodo/tls-cbc.txt
	  It's known issue of TLSv1/SSLv3 but it attracts lots of attention
	  these days as BEAST attack. (CVE-2011-3389)

	  Until now ossl sets OP_ALL at SSLContext allocation and call
	  SSL_CTX_set_options at connection.  SSL_CTX_set_options updates the
	  value by using |= so bits set by OP_ALL cannot be unset afterwards.

	  This commit changes to call SSL_CTX_set_options only 1 time for each
	  SSLContext. It sets the specified value if SSLContext#options= are
	  called and sets OP_ALL if not.

	  To help users to unset bits in OP_ALL, this commit also adds several
	  constant to SSL such as
	  OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.  These constants were
	  not exposed in Ruby because there's no way to unset bits in OP_ALL
	  before.

	  Following is an example to enable 0/n split for BEAST prevention.

	    ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS

	* test/openssl/test_ssl.rb: Test above option exists.

Wed Dec 28 21:34:23 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* string.c (rb_str_hash): randomize hash to avoid algorithmic
	  complexity attacks. CVE-2011-4815

	* st.c (strhash): ditto.

	* string.c (Init_String): initialization of hash_seed to be at the
	  beginning of the process.

	* st.c (Init_st): ditto.

Thu Dec  8 11:57:04 2011  Tanaka Akira  <akr@fsij.org>

	* inits.c (rb_call_inits): call Init_RandomSeed at first.

	* random.c (seed_initialized): defined.
	  (fill_random_seed): extracted from random_seed.
	  (make_seed_value): extracted from random_seed.
	  (rb_f_rand): initialize random seed at first.
	  (initial_seed): defined.
	  (Init_RandomSeed): defined.
	  (Init_RandomSeed2): defined.
	  (rb_reset_random_seed): defined.
	  (Init_Random): call Init_RandomSeed2.

Sat Dec 10 20:44:23 2011  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb: call OpenSSL::Random.seed at the
	  SecureRandom.random_bytes call.
	  insert separators for array join.
	  patch by Masahiro Tomita.  [ruby-dev:44270]

Mon Oct 17 04:20:22 2011  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* mkconfig.rb: fix for continued lines.  based on a patch from
	  Marcus Rueckert <darix AT opensu.se> at [ruby-core:20420].

Mon Oct 17 04:19:39 2011  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (flo_cmp): Infinity is greater than any bignum
	  number.  [ruby-dev:38672]

	* bignum.c (rb_big_cmp): ditto.

Mon Oct 17 03:56:12 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/openssl/ossl_x509store.c (ossl_x509store_initialize): initialize
	  store->ex_data.sk.  [ruby-core:28907] [ruby-core:23971]
	  [ruby-core:18121]

Thu Jun 30 12:52:56 2011  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/tk/extconf.rb (intptr_t, uintptr_t): support for the latest ActiveTcl with mingw.

Sun Jun 26 17:52:32 2011  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>

        * ext/openssl/ossl_ssl.c: By trunk@31346, function check of SSLv2 is executed.
        However, the problem is not revised in this.
        This adds the control of using function of SSLv2 in made macro by function check.

Sun Jun 26 17:52:32 2011  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>

	* ext/openssl/extconf.rb: Should check SSLv2_*method.
	  openssl compiled with "no-ssl2" the extconf don't fail
	  when running `make' having this compilation errors.
	  Patched by Laurent Arnoud. fixes #4562, #4556

Sun Jun 26 17:46:43 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* ext/tk/extconf.rb: copy from trunk, as requested by Hidetoshi NAGAI.

Thu Jun 23 18:38:43 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	backported r26281 from ruby_1_8

	* lib/webrick/accesslog.rb (WEBrick::AccessLog.format): log parameter
	  embedding did not work. See #4913.

	* test/webrick/test_accesslog.rb: Add for test it.

Thu Jun 16 22:55:02 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* test/test_securerandom.rb: Add testcase.  This testcase does NOT aim
	  to test cryptographically strongness and randomness.  It includes
	  the test for PID recycle issue of OpenSSL described in #4579 but
	  it's disabled by default.

Mon Jun 13 18:33:04 2011  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb (SecureRandom.random_bytes): modify PRNG state
	  to prevent random number sequence repeatation at forked
	  child process which has same pid.
	  reported by Eric Wong.  [ruby-core:35765]

Thu Jun  2 18:33:51 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* variable.c (rb_const_get_0):  Fix  previous change.   There were
	  possibilities   when   an   autoload-specified   library   lacks
	  definition of  the constant  it was bound  to.  Once  after such
	  library had  already beed loaded, the autoload  engine shall not
	  reload  it.   Instead  the  interpreter have  to  consider  such
	  constant nonexistent.  It results in a const_missing situation.

	* variable.c (rb_autoload_load): ditto.

	* variable.c (autoload_node): ditto.

Thu Jun  2 18:28:58 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* variable.c (rb_autoload_load):  There is a  race condition while
	  autoloading.  When two or more threads touch a single autoloaded
	  constant at  a time,  one of them  does the require,  but others
	  behave  oddly.   To  fix  this  situation we  now  refrain  from
	  deleting the autoload table while someone is doing the autoload.
	  That  deletion is  deferred to  a  point where  a require  ended
	  successfully.  Doing so make it possible for multiple threads to
	  enter autoloading at the same  time but the require is protected
	  against  multiple simultaneous  entrance anyway  so all  but one
	  thread  gets blocked  at that  point.   So with  it, touching  a
	  constant that gets autoloaded cause those threads to block until
	  there is another one that does the same thing.
	  [ruby-core:36308] (#921)

	* variable.c (rb_const_get_0): ditto.

	* variable.c (autoload_node): ditto.

	* variable.c (autoload_delete): ditto.

Mon May 30 10:58:17 2011  Hiroshi Nakamura  <nahi@ruby-lang.org>

	* lib/logger.rb (Logger::ProgName): do not depend on subversion
	  keyword ($Id: ChangeLog 41678 2013-06-27 11:56:26Z shyouhei $). ProgName with revision number was written in the
	  header line of each logfile for ease of tracking what version user
	  is using in troubleshooting.  Logger is already stable enough.

Sat May 21 07:33:54 2011  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/zlib/zlib.c (zstream_append_input2): add RB_GC_GUARD.
	  This caused failure when test/csv is executed with GC.stress = true.

Sat May 21 05:43:03 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* eval.c (rb_thread_atfork): When a ruby process forks, its random
	  seed shall be reinitialized to prevent CVE-2003-0900 situation.
	  This bug affects for 1.8 and earlier series, but not for 1.9.
	  fixed [ruby-core:34944].

	* io.c (pipe_open): ditto.

	* random.c (rb_reset_random_seed): ditto.

	* intern.h (rb_reset_random_seed): ditto.

Sat May 21 04:55:15 2011  Akinori MUSHA  <knu@iDaemons.org>

	* lib/uri/generic.rb (#route_from_path): Fix a bug where
	  URI('http://h/b/').route_to('http://h/b') wrongly returned './'
	  (should be '../b'). [Bug #4476]

Sat May 21 04:54:20 2011  Akinori MUSHA  <knu@iDaemons.org>

	* lib/fileutils.rb (FileUtils#touch): Fix corrupted output.
	  ref [ruby-dev:43401]

Sat May 21 02:10:09 2011  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.h (RMATCH_REGS): parenthesize cast expression.  suggested
	  from Nikolai Weibull in [ruby-core:35825].

Sat May 21 01:32:08 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	backported r31286 from trunk

	* numeric.c (ruby_float_step): wrong loop condition.
	  fixes [ruby-core:35753], reported by Joey Zhou.

	* test/ruby/test_range.rb (TestRange#test_step_ruby_core_35753):
	  test above change.

Sat May 21 00:55:21 2011  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) in gzip's
	header is the size of uncompressed input data modulo 2^32.
	[ruby-core:34481] http://www.ietf.org/rfc/rfc1952.txt

Fri May 20 23:46:44 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/{getaddrinfo,getnameinfo}.c: include winsock2.h only when
	  specified to use winsock2 by user.
	  this problem is reported by kosaki.

Fri May 20 23:23:45 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/socket.c (make_addrinfo): skip IPv6 addresses when ruby
	  doesn't support IPv6 but system supports it.
	  [ruby-dev:42944] (#4230)

Fri May 20 23:10:07 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/README.win32: note to need NT based OS to build ruby.

	* win32/{configure.bat,setup.mak}: backport current build method from
	  trunk. [ruby-dev:42893] (#4206)

Fri May 20 23:06:31 2011  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* Backported the fix at
	  Mon Sep 13 09:23:58 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/ossl_bn.c (ossl_bn_is_prime): fix comparison
	  with rb_scan_args. Before this fix, OpenSSL::BN#prime?
	  is fully broken.

Fri May 20 23:06:31 2011  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* Backported the fix at
	  Mon Oct  4 09:30:42 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/openssl/lib/openssl/bn.rb (Integer#to_bn): OpenSSL::BN.new
	  accepts only Strings, so call Integer#to_s(16).
	  16 is for an optimization. [ruby-dev:42336]

Fri Feb 18 21:18:55 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* test/ruby/test_exception.rb (TestException::test_to_s_taintness_propagation):
	  Test for below.

Fri Feb 18 21:18:55 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* error.c (exc_to_s): untainted strings can be tainted via
	  Exception#to_s, which enables attackers to overwrite sane strings.
	  Reported by: Yusuke Endoh <mame at tsg.ne.jp>.

	* error.c (name_err_to_s): ditto.

Fri Feb 18 21:17:22 2011  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/fileutils.rb (FileUtils::remove_entry_secure): there is a
	  race condition in the case where the given path is a directory,
	  and some other user can move that directory, and create a
	  symlink while this method is executing.
	  Reported by: Nicholas Jefferson <nicholas at pythonic.com.au>

Fri Feb 18 19:46:46 2011  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (init_stdhandle): backport mistake of r29382.
	  some code are needless in ruby 1.8.
	  [ruby-core:34579]

Fri Feb 18 19:22:17 2011  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* configure.in: revert revision r29854.  This revision introduced
	  binary incompatibilities on some circumstances.  The bug that
	  revision was fixing gets reopened by this reversion.
	  [ruby-dev:43152] cf. [Bug #2553]

Thu Dec 23 12:22:35 2010  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::IPv4::Regex): make it only accept 0 to 255.
	  [ruby-core:29501]

Tue Dec 21 01:43:01 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/webrick/https.rb: uninitialized instance variables.
	  Backport a part of r20864 for ruby_1_8.

Sat Dec  4 11:35:15 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (init_mkmf): needs default library path even if
	  cross compiling.

Sat Dec  4 11:25:02 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* re.c (rb_reg_regcomp): should succeed the taint status from the
	  origin. [ruby-core:33338]

Thu Dec  2 21:13:42 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* Makefile.in (fake.rb): need to expand the topdir in case of it
	  being relative, a patch from Luis Lavena <luislavena at gmail.com>.
	  [ruby-core:33466]

Wed Nov 24 18:24:26 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/extconf.rb: backported entirely from ruby_1_8, with small
	  modifications for the difference of mkmf.rb.

Wed Nov 24 16:24:24 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* mkconfig.rb (patchlevel): config.status may not contain
	  PATCHLEVEL even if other version numbers exist.

Wed Nov 24 16:18:02 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* win32/Makefile.sub ($(RCFILES)): no revision.h in this
	  branch, a patch from Luis Lavena <luislavena at gmail.com>.
	  [ruby-core:33310]

	* cygwin/GNUmakefile.in ($(RCFILES)): ditto.

Wed Nov 24 15:44:11 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/extconf.rb (getaddrinfo): should initialize winsock on
	  windows.

Wed Nov 24 13:55:21 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/setup.mak: use findstr.exe instead of find.exe, because all
	  target build platforms should have findstr.exe, and, find.exe often
	  means another command such as cygwin's.

Wed Nov 24 13:27:34 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/stringio/stringio.c (strio_getline): fix for "" as separator.
	  [ruby-dev:34591] (Backport r17739 by Yusuke Endoh from trunk).

Wed Nov 24 13:27:20 2010  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/net/pop.rb (Net::POP3#set_all_uids): speed
	  up. a patch from <m-sumi AT techfirm.co.jp> [ruby-list:45047]

Tue Nov 23 20:48:10 2010  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (initialize): sets sync_close to true.
	  Thanks, Hiroshi NAKAMURA.  [ruby-core:31753]

Tue Nov 23 17:09:14 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/pathname.rb (relative_path_from): backport r23093 and r25440
	  from ruby_1_9_2.  [ruby-core:32415]

Mon Nov 22 14:13:45 2010  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c: fix checking version of GCC.

Mon Nov 22 14:13:45 2010  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c: NONAMELESSUNION defined only if gcc
	  version is older than 3.4.4. [ruby-core:31567] [Bug #3637]
	* ext/win32ole/extconf.rb: ditto.

Fri Nov 19 19:28:00 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* Makefile.in (fake.rb): hook needed to fake mkmf.rb.
	  #2531 [ruby-core:27327]

Mon Oct 18 10:21:01 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/net/http.rb (transport_request): @socket may be nil.
	  patched by Egbert Eich [ruby-core:32829]

Fri Oct  8 10:51:56 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (RBCONFIG): depends on version.h due to
	  RUBY_PATCHLEVEL.  [ruby-core:32709]

Thu Oct  7 18:10:35 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* cygwin/GNUmakefile.in, win32/Makefile.sub (RCFILES): depend on
	  real config.rb file.  [ruby-core:32709]

Sun Oct  3 18:30:23 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_intern): should check symbol table overflow.
	  #3900 [ruby-dev:42330]

Fri Oct  1 15:12:05 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (init_stdhandle): redirect unopened IOs to NUL.
	  backport r11362 from trunk. [ruby-core:31445]

Mon Aug 23 11:42:41 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl/ossl_asn1.c (obj_to_asn1bool): fixed ASN1::Boolean
	  encoding issue for OpenSSL 1.0.0 compatibility.
	  ASN1::Boolean.new(false).to_der wrongly generated "\1\1\377" which
	  means 'true'.  [BUG:3735] 
	  
	  ASN1_TYPE_set of OpenSSL <= 0.9.8 treats value 0x100 as 'false' but
	  OpenSSL >= 1.0.0 treats it as 'true'.  ruby-ossl was using 0x100 for
	  'false' for backward compatibility.  Just use 0x0 for the case
	  OpenSSL >= OpenSSL 0.9.7.

	* test/openssl/test_asn1.rb: test added.

Tue Aug 10 17:35:49 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest::parse_uri):
	  rollup leading slashes. [ruby-core:31657]
	  patched by Jamison Wilde
	  NOTE: //authority/path is valid relative URI both RFC2396 and
	  RFC3986. So when give a relative URI-like string to URI lib,
	  users must care leading slashes.

Fri Jul 30 08:51:51 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): home directory must be absolute.
	  [ruby-core:31537]

Fri Jul 30 08:33:20 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): should check if could find user.
	  [ruby-core:31538]

Thu Jul 29 22:43:57 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/webrick/ssl.rb (WEBrick::Utils.create_self_signed_cert): wrongly
	  created dummy SSL certificate with version == 3 (no such version) and
	  serial == 0 (must be >0).

Sat Jul 24 15:44:29 2010  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (fev_initialize): initialize pTypeInfo.
	  [ruby-core:31304][Bug #3576].

Tue Jul 13 21:46:38 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl/ossl_config.c, ext/openssl/lib/openssl/config.rb,
	  ext/openssl/lib/openssl.rb: reimplement OpenSSL::Config in Ruby. Now
	  it should work on windows.

	* test/openssl/test_config.rb: added tests for OpenSSL::Config#dup.

Mon Jul 12 22:26:00 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl/ossl_config.c (ossl_config_copy): wrongly updating the
	  given object with uninitialized CONF data.  now
	  OpenSSL::Config#clone works as expected; cloning the config instead of
	  SEGV or empty definition.

	* test/openssl/test_config.rb: added tests for Config#clone.

Thu Jul  8 13:43:13 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/openssl/test_config.c: added tests for all Config methods.

Wed Jul  7 13:24:24 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (ruby_find_basename): set correct baselen.

Fri Jul  2 23:34:45 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (ruby_find_basename, ruby_find_extname): split from
	  rb_file_s_basename() and rb_file_s_extname().

	* util.c (ruby_add_suffix): support arbitrary length of the suffix
	  to get rid of the potential buffer overflow.
	  reported by tarui.

Sat Jul 10 10:51:29 2010  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: fix use_context condition inversion.
	[Bug #2553][ruby-core:31164]. Thanks, Andre Nathan. 

Wed Jun 23 21:36:45 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: avoid getcontext() overhead if possible.
	[ruby-core:27380][Bug #2553]
	Thanks, Joe Damato, Dan Peterson and Patrick Mohr.

Wed Jan 13 06:54:44 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check for if struct timezone is defined.

	* missing.h (struct timezone): define if not defined.

	* win32/win32.h (struct timezone): defined in the newer w32api.
	  [ruby-core:27515]

Sun Aug 15 19:59:58 2010  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#set_error):
	  Fix for possible cross-site scripting (CVE-2010-0541). 
	  Found by Apple, reported by Hideki Yamane.
	  Patch by Hirokazu Nishio <nishio.hirokazu AT gmail.com>.

Sat Jul 17 15:19:58 2010  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* configure.in: Change AC_PREREQ from 2.58 to 2.60 because
	  AC_CASE macro require 2.60 or later. Thanks, Mitsuru SHIMAMURA.
	  [Bug #3579] [ruby-dev:41856]

Wed Jun 23 22:22:42 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/optparse/test_summary.rb: fixed superclass so that it run
	  solely.

Wed Jun 23 21:54:17 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* marshal.c, test/ruby/test_marshal.rb: Revert r25230.  This test
	  is troublesome.

Mon Jun 21 18:12:15 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/extconf.rb: check some functions added at OpenSSL 1.0.0.

	* ext/openssl/ossl_engine.c (ossl_engine_s_load): use engines which
	  exists.

Mon Jun 21 18:12:15 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl/ossl_config.c: defined own IMPLEMENT_LHASH_DOALL_ARG_FN_098
	  macro according to IMPLEMENT_LHASH_DOALL_ARG_FN in OpenSSL 0.9.8m.
	  OpenSSL 1.0.0beta5 has a slightly different definiton so it could
	  be a temporal workaround for 0.9.8 and 1.0.0 dual support.

	* ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): follows function
	  definition in OpenSSL 1.0.0beta5. PKCS5_PBKDF2_HMAC is from 1.0.0
	  (0.9.8 only has PKCS5_PBKDF2_HMAC_SHA1)

	* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_eq): do not use
	  SSL_SESSION_cmp and implement equality func by ousrself.  See the
	  comment.

Mon Jun 21 18:12:15 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl_session.c
	  (ossl_ssl_session_{get,set}_time{,out}): fixed a bug introduced by
	  backporting. (see [ruby-dev:40573])  use long in according to
	  OpenSSL API. (SSL_SESSION_{get,set}_time{,out})

Mon Jun 21 18:12:15 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl/ossl_x509name.c: added X509::Name#hash_old as a wrapper
	  for X509_NAME_hash_old in OpenSSL 1.0.0.

	* test/openssl/test_x509name.rb (test_hash): make test pass with
	  OpenSSL 1.0.0.

Mon Jun 21 18:12:15 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/openssl/test_x509*: make tests pass with OpenSSL 1.0.0b5.
	  * PKey::PKey#verify raises an exception when a given PKey does not
	    match with signature.
	  * PKey::DSA#sign accepts SHA1, SHA256 other than DSS1.

Mon Jun 21 18:12:15 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* backport the commit from trunk:
	  Sun Feb 28 11:49:35 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* openssl/ossl.c (OSSL_IMPL_SK2ARY): for OpenSSL 1.0.
	  patched by Jeroen van Meeuwen at [ruby-core:25210]
	  fixed by Nobuyoshi Nakada [ruby-core:25238],
	  Hongli Lai [ruby-core:27417],
	  and Motohiro KOSAKI [ruby-core:28063]

	* ext/openssl/ossl_ssl.c (ossl_ssl_method_tab),
	  (ossl_ssl_cipher_to_ary): constified.

	* ext/openssl/ossl_pkcs7.c (pkcs7_get_certs, pkcs7_get_crls):
	  split pkcs7_get_certs_or_crls.

Mon Jun 21 18:12:15 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/openssl/test_ec.rb: added test_dsa_sign_asn1_FIPS186_3. dgst is
	  truncated with ec_key.group.order.size after openssl 0.9.8m for
	  FIPS 186-3 compliance.

	  WARNING: ruby-openssl aims to wrap an OpenSSL so when you're using
	  openssl 0.9.8l or earlier version, EC.dsa_sign_asn1 raises
	  OpenSSL::PKey::ECError as before and EC.dsa_verify_asn1 just returns
	  false when you pass dgst longer than expected (no truncation
	  performed).

	* ext/openssl/ossl_pkey_ec.c: rdoc typo fixed.

Wed Jun 16 16:01:42 2010  Tanaka Akira  <akr@fsij.org>

	* lib/pathname.rb (Pathname#sub): suppress a warning.
	  [ruby-dev:38488]

Wed Jun 16 15:21:12 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/webrick/utils.rb (TestWEBrick#start_server): add log for
	  test_filehandler.rb

Wed Jun 16 15:21:12 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/net/http.rb (Net::HTTPHeader#{content_range,range_length}):
	  use inclusive range same as the header representation.

Thu Jun 10 14:39:35 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/iconv/test_option.rb: removed particular implementation specific tests.
	  [ruby-dev:40078]

Thu Jun 10 14:22:09 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::Status::initialize):
	  accept 0 or more arguments. [ruby-core:28692]

Thu Jun 10 13:37:35 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_load): initialize orig_func.   [ruby-core:27296]

Tue Jun  8 18:57:48 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (config.status): no need to embbed manifest if not exist.

Tue Jun  8 18:38:36 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* include/ruby/win32.h: include errno.h before defining errnos.

	* include/ruby/win32.h: check definition existance before defining
	  errno macros.

	* win32/win32.c (errmap): define winsock errors mappings.
	  these are VC++10 support, merge from trunk (r27236, r27258).

Tue Jun  8 18:31:02 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* regexp.c (re_compile_pattern): allow zero times match for
	  non-greedy range repeatation. [ruby-core:30613]

Tue Jun  8 18:08:18 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* Makefile.in (fake.rb): double the backslash.

Tue Jun  8 18:08:15 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* configure.in: should replace COMMON_HEADERS if --with-winsock2 is
	  specified.  [ruby-dev:41521]

Tue Jun  8 17:49:18 2010  KOSAKI Motohiro  <kosaki.motohiro@gmail.com>

	* io.c, eval.c, process.c: remove all condition of r26371.
	  now, all platform use the same way. [Bug #3278][ruby-core:30167]

Tue Jun  8 17:45:36 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments.
	  a patch by Masaya TARUI <tarui AT prx.jp>.

Tue Jun  8 17:45:36 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if
	  errno is not set.  [ruby-dev:41317]

Tue Jun  8 17:32:37 2010  Tanaka Akira  <akr@fsij.org>

	* pack.c (pack_pack): call rb_quad_pack to preserve RangeError.

Tue Jun  8 17:32:37 2010  Tanaka Akira  <akr@fsij.org>

	* pack.c: backport integer pack/unpack from 1.9 for [ruby-core:21937].

	* configure.in: backport RUBY_DEFINT and fixed size integer checks.

	* ruby.h: include stdint.h if available.

	* bignum.c (rb_big_pack): defined..
	  (rb_big_unpack): defined.

	* intern.h (rb_big_pack): declared.
	  (rb_big_unpack): declared.

Tue Jun  8 16:52:35 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* regex.c (read_special): get rid of overrun.

Tue Jun  8 16:51:48 2010  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb: backported exception handling from trunk.
	  [ruby-core:29745]

Tue Jun  8 16:42:48 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (VpAlloc): ensure buf does not get
	  collected.  based on a patch masaya tarui at [ruby-dev:41213].

Tue Jun  8 16:08:00 2010  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (fetch_internal): do not quote message data item
	  names.  Thanks, Eric Hodel.  [ruby-core:23508]  backported form
	  trunk.

Tue Jun  8 15:45:52 2010  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap (encode_utf7): encode & properly.  Thanks, Kengo
	  Matsuyama.  [ruby-dev:38063]  backported from trunk.

Tue Jun  8 15:43:43 2010  Masaki Suketa <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_val2variant): fix the core dump
	  when converting Array object to VT_ARRAY variant. [ruby-core:28446]
	  [Bug #2836]

Tue Jun  8 15:34:15 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_extname): skip last directory separators.
	  [ruby-core:29627]

Tue Jun  8 15:33:30 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* lib/fileutils.rb (FileUtils::cp_r): dup needed here; options are
	  destroyed otherwise.

Tue Jun  8 15:27:00 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (search_required): expand home relative path first.
	  [ruby-core:29610]

Tue Jun  8 15:23:10 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (Timeout#timeout): propagate errors to the
	  caller.  [ruby-dev:41010]'

Tue Jun  8 15:15:18 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/net/smtp.rb (Net::SMTP#rcptto_list): fixed typo.
	  [ruby-core:29809]

Tue Jun  8 15:15:18 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/net/smtp.rb (Net::SMTP#rcptto_list): continue when at least
	  one RCPT is accepted.  based on a patch from Kero van Gelder at
	  [ruby-core:26190].

Tue Jun  8 15:14:11 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* LEGAL: separated the section for parse.c.  contributed by Paul
	  Betteridge in [ruby-core:29472].

Tue Jun  8 14:00:33 2010  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* ext/rational/lib/rational.rb: fix [Bug #1397].

Tue Jun  8 13:40:04 2010  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb (Date#>>): fixed.  [ruby-core:28011]

Tue Jun  8 12:37:56 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* io.c, eval.c, process.c: add linux to r26371's condition.
	  patched by Motohiro KOSAKI [ruby-core:28151]

Tue Jun  8 12:37:56 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (thread_timer, rb_thread_stop_timer): check the timing of
	  stopping timer.  patch from KOSAKI Motohiro <kosaki.motohiro _AT_
	  jp.fujitsu.com> via IRC.

	* eval.c (rb_thread_start_timer): NetBSD5 seems to be hung when calling
	  pthread_create() from pthread_atfork()'s parent handler.

	* io.c (pipe_open): workaround for NetBSD5. stop timer thread before
	  fork(), and restart it after fork() on parent, and on child if
	  needed.

	* process.c (rb_f_fork, rb_f_system): ditto.

	  these changes are tested by naruse.  fixed [ruby-dev:40074]

Mon Jun  7 19:23:04 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c (numchar_getc): get rid of buffer
	  overflow.  [ruby-dev:40606]

Mon Jun  7 18:57:02 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl/ossl_ssl_session.c
	  (ossl_ssl_session_{get,set}_time{,out}): fixed a bug introduced by
	  backporting. (see [ruby-dev:40573])  use long in according to
	  OpenSSL API. (SSL_SESSION_{get,set}_time{,out})

Tue May 25 08:42:42 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/openssl: backport fixes in 1.9.

	  * r25019 by marcandre
	    * ossl_ocsp.c (ossl_ocspres_to_der): Bug fix in Response#to_def.
	      Patch by Chris Chandler [ruby-core:18411]

	  * r25017 by marcandre
	    * ossl_config.c (ossl_config_add_value_m,
	      ossl_config_set_section): Check if frozen (or untrusted for
	      $SECURE >= 4) [ruby-core:18377]

	  * r22925 by nobu
	    * ext/openssl/openssl_missing.h (i2d_of_void): cast for callbacks.
	      [ruby-core:22860]

	    * ext/openssl/ossl_engine.c (ossl_engine_s_by_id): suppress a
	      warning.

	    * ext/openssl/ossl_ssl.c (ossl_sslctx_flush_sessions): time_t may
	      be larger than long.

	    * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_get_time),
	      (ossl_ssl_session_get_timeout): use TIMET2NUM() to convert
	      time_t.

	  * r22924 by nobu
	    * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): should use
	      OPENSSL_free instead of free.  a patch from Charlie Savage at
	      [ruby-core:22858].

	  * r22918 by akr
	    * ext/openssl: suppress warnings.

	    * ext/openssl/ossl.h (OSSL_Debug): don't use gcc extention for
	      variadic macro.

	  * r22666 by akr
	    * ext/openssl/lib/openssl/buffering.rb: define Buffering module
	      under OpenSSL.  [ruby-dev:37906]

	  * r22440 by nobu
	    * ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): OCSP_basic_verify
	      returns positive value on success, not non-zero.
	      [ruby-core:21762]

	  * r22378 by akr
	    * ext/openssl: avoid cyclic require.

	    * ext/openssl/lib/openssl/ssl-internal.rb: renamed from ssl.rb

	    * ext/openssl/lib/openssl/x509-internal.rb: renamed from x509.rb.
	      [ruby-dev:38018]

	  * r22101 by nobu
	    * ext/openssl/ossl_cipher.c (add_cipher_name_to_ary): used
	      conditionally.

	  * r21510 by akr
	    * ext/openssl/ossl.c (ossl_raise): abolish a warning.

	  * r21208 by akr
	    * ext/openssl/ossl_digest.c (GetDigestPtr): use StringValueCStr
	      instead of STR2CSTR.

	    * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto.
	      (ossl_ec_group_initialize): ditto.

	  * r19420 by mame
	    * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out
	      fragments of unused code.

	  * r18975 by nobu
	    * ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): fix for
	      initialization of r18168.

	  * r18971 by nobu
	    * ext/openssl/ossl_config.c (Init_ossl_config): removed C99ism.

	  * r18944 by matz
	    * ext/openssl/ossl_config.c (Init_ossl_config): memory leak fixed.
	      a patch <shinichiro.hamaji at gmail.com> in [ruby-dev:35880].

	    * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto.

	  * r18917 by nobu
	    * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): fix for
	      initialization of r18168.

	    * ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): ditto.

	    * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto.

	  * r18283 by nobu
	    * ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): suppress
	      warnings on platforms which int size differs from pointer size.

	  * r18181 by nobu
	    * ext/openssl/openssl_missing.h (d2i_of_void): define for older
	      versions.  [ruby-dev:35637]

	  * r18168 by nobu
	    * ext/openssl: suppress warnings.

Sat May 22 22:31:36 2010  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: fix [ruby-core:28320] reported by Paul Clegg.
	  (Resolv::DNS::Requester#request): raise ResolvTimeout consistently
	  for timeout.

Sat May 22 22:14:11 2010  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/readline/readline.c (Init_readline): initialize
	  check rl_catch_signals and rl_catch_sigwinch.
	  [ruby-core:28238] [ruby-core:28242]

	* ext/readline/extconf.rb: check rl_catch_signals and
	  rl_catch_sigwinch.

Sat May 22 21:54:58 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/net/http/test_connection.rb (TestHTTP::HTTPConnectionTest#test_connection_refused_in_request):
	  Wrong exception to assert.

Sat May 22 21:03:16 2010  Tanaka Akira  <akr@fsij.org>

	* io.c (rb_io_modenum_mode): return "r" for O_RDONLY|O_APPEND.
	  [ruby-dev:40379]

Sat May 22 20:51:39 2010  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* lib/resolv.rb (Resolv::DNS::Config#nameserver_port): 1.8.7
	  specific tweaks

Sat May 22 20:51:09 2010  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: fix [ruby-core:28144] reported by Hans de Graaff.
	  (Resolv::DNS#make_requester): pass nameserver_port to
	  UnconnectedUDP.new.
	  (Resolv::DNS.bind_random_port): change the is_ipv6 argument to
	  bind_host.
	  (Resolv::DNS::Requester#initialize): change instance variable to
	  store multiple sockets.
	  (Resolv::DNS::Requester#request): pass readable sockets to
	  recv_reply.
	  (Resolv::DNS::Requester#close): close all sockets.
	  (Resolv::DNS::Requester::UnconnectedUDP#initialize): allocate
	  a socket for each address family of name servers.
	  (Resolv::DNS::Requester::UnconnectedUDP#recv_reply): read from the
	  passwd readable socket.
	  (Resolv::DNS::Requester::UnconnectedUDP#sender): use appropriate
	  socket for the target nameserver.
	  (Resolv::DNS::Requester::ConnectedUDP): follow the instance variable
	  change.
	  (Resolv::DNS::Requester::TCP#sender): ditto.
	  (Resolv::DNS::Config#nameserver_port): new method.

Sat May 22 19:46:27 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/net/http.rb (Net::HTTP#request): close @socket only after
	  started.  [ruby-core:28028]

Sat May 22 19:36:38 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (proc_invoke): reverted r25975.  [ruby-dev:39931]
	  [ruby-dev:40059]

	* eval.c (rb_mod_define_method): return original block but not
	  bound block.  [ruby-core:26984]

Thu May 20 16:28:17 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
	  add bytes-unit.  [ruby-dev:40030]

Thu May 20 16:17:37 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/zlib/zlib.c: backport r18029 and r21861 from trunk.
	  * r18029 ext/zlib/zlib.c (rb_deflate_params): flush before
	    deflateParams. [ruby-core:17675] (by mame)
	  * r21861 ext/zlib/zlib.c (zstream_run): desperately guard the
	    variable.  [ruby-core:20576] (by usa)

	* test/zlib/test_zlib.rb: backport deflate tests from trunk.

Thu May 20 15:59:14 2010  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb:
	accept any time format in maker. [ruby-core:26923]

Thu May 20 15:54:08 2010  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (recursive_push): Taint internal hash to prevent
	  unexpected SecurityError; fixes #1864.

Thu May 20 15:39:26 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_fwrite): preserve errno.  [ruby-core:27425]

Tue Apr 20 08:04:37 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_io_s_read): close the IO if an exception is raised on
	  seeking. [ruby-core:27429]

Mon Apr 19 22:43:28 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	 * ruby.h (RB_GC_GUARD_PTR): workaround for gcc optimization.
	   [ruby-core:27402]

Tue Apr 20 06:40:53 2010  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/uri/generic.rb (URI::Generic::eql): Check the class of the
	  compared object. Based on a patch by Peter McLain [ruby-core:27019]

Fri Apr  2 03:27:22 2010  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/net/http.rb (HTTPGenericRequest#send_request_with_body_stream):
	  increased encoding chunk size for POST request with body_stream
	  (1K -> 16K). patched by Brian Candler. #1284.

	* test/net/http/test_post_io.rb: added for the patch. It's good if a
	  patch comes with a test.

Thu Apr  1 05:32:17 2010  NAKAMURA Usaku  <usa@ruby-lang.org>

	* string.c (rb_str_inspect): wrong result of UTF-8 inspect because of
	  the mistake of calculation.  reported by eban via IRC.

Sun Jan 10 19:00:31 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/webrick/accesslog.rb : Escape needed.

	* lib/webrick/httpstatus.rb : ditto.

	* lib/webrick/httprequest.rb : ditto.

	* lib/webrick/httputils.rb : ditto.

Thu Dec 24 18:04:27 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: default ac_cv_prog_CC to CC.

Thu Dec 24 17:56:32 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: MINIRUBY is given via make-flag.

Thu Dec 24 17:56:32 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (EXTMK_ARGS): needs MINIRUBY for cross-compile.
	  [ruby-core:20131]

Thu Dec 24 17:56:32 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* common.mk (EXTMK_ARGS): shouldn't use ``\"'' because cmd.exe eat
	  ''\'' in such quotes.

Thu Dec 24 17:56:32 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (EXTMK_ARGS): needs MINIRUBY for cross-compile.
	  [ruby-core:20131]

Thu Dec 24 17:56:32 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* mkconfig.rb (patchlevel): config.status may not contain
	  PATCHLEVEL even if other version numbers exist.

Thu Dec 24 17:50:35 2009  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/stringio/stringio.c (strio_init): rewind when reopened.

Thu Dec 24 17:06:13 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (run_final): runs finalizers with the object terminated.

	* gc.c (rb_gc_call_finalizer_at_exit): ObjectSpace::finalizers needs
	  to scan whole object space, although deprecated.

Thu Dec 24 17:06:13 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (chain_finalized_object): deletes finalizers to be invoked from
	  finalizer_table.

	* gc.c (rb_gc_call_finalizer_at_exit): warns when could not invoke
	  finalizers.

Mon Dec 21 16:09:09 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (LD_SHARED1): typo.

Wed Dec 16 20:17:40 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (CreateChild): allocate temporary buffer and use it
	  instead of directly modify the passed string.  [ruby-dev:39635]

Wed Dec 16 19:49:47 2009  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* instruby.rb (with_destdir): revert. [ruby-dev:39885]

Mon Dec 14 13:28:48 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb (Test::Unit.run=, Test::Unit.run?): fixed rdoc.
	  [ruby-core:25034]

Mon Dec 14 13:21:32 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/open3.rb (Open3#popen3): fixed and improved rdoc.  [ruby-core:25658]

Mon Dec 14 13:09:01 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LIBPATHFLAG): use numbered specifier if RPATHFLAG
	  is set.  [ruby-talk:322136]

Mon Dec 14 12:53:56 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/bigdecimal.rb: fix comparison operators [ruby-core:26646]

Mon Dec 14 12:40:10 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* object.c (rb_Float): Allow results of to_f to be NaN
	  [ruby-core:26733]

Mon Dec 14 12:35:21 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (proc_invoke): unbound block created by define_method
	  cannot call super.  [ruby-core:26984]

Mon Dec 14 12:06:39 2009  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/digest.c (rb_digest_instance_method_unimpl): Do not
	  call rb_inspect() on an object that does not implement necessary
	  methods; reported by NaHi.

Mon Dec 14 11:47:31 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_method_missing): adjusted format and argument number.

	* eval.c (rb_call): fixed for super in cached method.
	  [ruby-dev:39757]

Mon Dec 14 11:40:35 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (ruby_setenv): get rid of crash in Solaris 8 and 10.
	  [ruby-core:26668]

Mon Dec 14 11:31:58 2009  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi.rb: fix command-line option of
	  non-interactive terminal. [ruby-core:23016]

Mon Dec 14 03:36:20 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* eval.c (method_inspect, method_name, mnew): Bug fix when
	  method created from an alias.
	  Based on a patch by Peter Vanbroekhoven [ruby-core:22040]

Mon Dec 14 02:27:32 2009  Yusuke Endoh  <mame@tsg.ne.jp>

	* hash.c (rb_hash): always return a fixnum value because a return
	  value of rb_hash may be used as a hash value itself and bignums have
	  no unique VALUE.

	* test/ruby/test_hash.rb: add a test for above.

Mon Dec 14 00:42:55 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_inspect): get rid of adding garbage to shor
	  UTF-8 string.  [ruby-dev:39550]

Sun Dec 13 23:54:22 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (marshal_load): should set taintness.  [ruby-dev:39723]

Sun Dec 13 23:54:22 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (struct {dump,load}_arg): manage with dfree, instead
	  of using local variable which may be moved by context switch.
	  [ruby-dev:39425]

Wed Nov 25 17:42:33 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_fwrite): adjust stdio file position after direct write on
	  BSDish platforms.   [ruby-core:26300]

Wed Nov 25 17:39:28 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ostruct/test_ostruct.rb (test_frozen): added assertions.

Wed Nov 25 16:43:24 2009  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/monitor.rb (MonitorMixin.mon_release): ensure the scheduled
	  thread to be alive when a thread is releasing a monitor. #2240

Wed Nov 25 16:28:11 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/rexml/element.rb (text=): false should be converted to string.
	  A patch by Teruo Oshida [ruby-dev:38351]

Wed Nov 25 16:18:37 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_clear_cache_for_undef): clear entries for inherited
	  methods.  [ruby-core:26074]

Tue Nov 24 16:15:18 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (iconv_create): cannot retry with given block.
	  [ruby-dev:39487]

Tue Nov 24 16:12:33 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (resp_text_code): accepts response codes without
	  text.  backported from trunk.  [ruby-core:24194]

Tue Nov 24 16:09:41 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (getaddress): rescue exceptions.  [ruby-dev:39451]

Tue Nov 24 15:51:07 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* ext/curses/curses.c: Many functions of module Curses could cause a
	  crash if the ncurses library was not properly initialized.
	  Fix pointed out by Alexander Beisig [ruby-core:22592]
	  Functions fixed: attroff, attron, attrset, bkgd, bkgdset,
	  can_change_color, close_screen, closed, color_content, curs_set,
	  def_prog_mode, delch, deleteln, getmouse, getstr, has_colors,
	  init_color, init_pair, insertln, keyname, mouseinterval, mousemask,
	  pair_content, pair_number, reset_prog_mode, resizeterm, scrl,
	  setscrreg, standend, standout, start_color, timeout, ungetmouse

Fri Nov 20 15:49:59 2009  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS.bind_random_port): bind to "::" for IPv6.
	  (Resolv::DNS::ConnectedUDP#initialize): specify is_ipv6 argument of
	  bind_random_port.
	  [ruby-core:25970]

Thu Nov 19 18:03:31 2009  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi.rb (CGI.unescapeHTML): fix for hex values 80-FF,
	  single-byte hex entity encodings from 80-FF are valid HTML.
	  [ruby-core:25702]

Thu Nov 19 15:34:40 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_fptr_finalize): free fptr to avoid memory leaks.
	  fixed: #2009   [ruby-core:25173] [ruby-dev:39410]

Thu Nov 19 15:27:17 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/net/http.rb (transport_request): Handle timeout error by
	  closing socket if exception raised. [ruby-core:20976]

Wed Nov 18 14:14:38 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* ext/openssl/ossl_config.c (ossl_config_add_value_m,
	  ossl_config_set_section): Check if frozen (or untainted for $SECURE >=
	  4) [ruby-core:18377]

Wed Nov 18 14:13:14 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* instruby.rb: win32/win32.h exists in srcdir.
	  reported by arton ( http://www.artonx.org/diary/20090919.html#p01 )

Wed Nov 18 14:13:14 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (subtract): if the parameters are same value, should
	  return zero.

Wed Nov 18 14:13:14 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_select): of course, need to initialize rest.

Wed Nov 18 14:13:14 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_select): wait specified time on select.

Wed Nov 18 14:13:14 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_select): on 1.8, we don't need to poll sockets,
	  because our select is never called from multiple threads.

Tue Nov 17 16:22:22 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_start_0, rb_thread_start_1): should call star
	  timer after added new thread to thread list.  [ruby-core:25613]

Tue Nov 17 16:22:22 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_start_timer): start to catch SIGVTALRM together
	  with timer thread.   [ruby-core:25606]

	* eval.c (rb_thread_atfork): stop timer thread.

Tue Nov 17 16:04:02 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/cgi/cookie.rb (value): Keep CGI::Cookie#value in sync with the
	  cookie itself. A patch by Arthur Schreiber [ruby-core:17634]

Tue Nov 17 15:49:00 2009  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>

	* lib/irb/ext/multi-irb.rb: Fix arguments handling for shell commands
	  in irb; a patch by Yusuke Endoh [ruby-dev:35075]

Tue Nov 17 15:32:27 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_binmode): check if closed regardless platforms.
	  [ruby-core:25363]

Tue Nov 17 15:31:09 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (round): added declaration.  [ruby-dev:39222]

Mon Nov 16 19:58:02 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (gc_sweep): makes new room if object space is full of
	  finalized objects and has no free objects.  [ruby-dev:39201]

Mon Nov 16 19:45:27 2009  Tanaka Akira  <akr@fsij.org>

	* util.c: suppress strict-aliasing warning with gcc-4.4.0 -O2 to fix
	  infinite loop by ruby -e "1.402e-45" .

Mon Nov 16 19:28:23 2009  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): revert a part of
	  r23645, which was not a bug fix. [ruby-dev:39474]

Fri Sep 11 11:56:53 2009  Akinori MUSHA  <knu@iDaemons.org>

	* class.c (rb_singleton_class_clone): Qnil must be used for a null
	  class reference when we use NIL_P() to check class reference
	  validity.  The bug was exposed by the spec test of Sequel.

	* eval.c (ruby_init): Use NEW_CREF().

Thu Sep 10 10:53:03 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_sysopen): workaround for MSVCRT's bug.
	  [ruby-core:24838]

Mon Sep  7 19:52:44 2009  Tanaka Akira  <akr@fsij.org>

	* eval.c (rb_thread_schedule): need select for WAIT_SELECT, even if
	  already timeout.  [ruby-dev:38971]
	  (WAIT_DONE): defined for mark threads which can be runnable.

Mon Sep  7 19:52:44 2009  Tanaka Akira  <akr@fsij.org>

	* eval.c (rb_thread_schedule): refine previous change.

Mon Sep  7 19:52:44 2009  Tanaka Akira  <akr@fsij.org>

	* eval.c (rb_thread_schedule): fix condition for making thread
	  runnable.  [ruby-core:23515]

Sun Sep  6 19:47:10 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_exc_raise, rb_exc_fatal): require exception object.
	  [ruby-core:24767]

Sun Sep  6 01:34:03 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_connect): return value was broken when some
	  error occurred.
	  [ruby-core:24234]

Fri Sep  4 10:03:22 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_eof): go to the next file if called after ARGF.close
	  or ARGF.skip.  a patch from Mike Kasick at [ruby-core:24561].

Sun Aug  9 17:43:44 2009  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* lib/irb.rb, lib/irb/init.rb, lib/irb/ext/save-history.rb: add
	  IRB::irb_at_exit. no use finalizer saving history. [ruby-dev-38563]

Wed Aug  5 15:29:54 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_io_flush): fsync() after buffer is flushed on win32.
	  backported from trunk.  [ruby-core:20043]


Tue Aug  4 11:00:30 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.h (RMATCH_REGS): added for compatibility.

Mon Aug  3 14:46:53 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/complex.rb (Numeric#arg): should return NaN for NaN.
	  [ruby-core:24116]

Thu Jul 30 09:27:44 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (big_lshift, big_rshift): return Bignum always withou
	  normalization.  [ruby-dev:38680]

Wed Jul 29 11:19:47 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (argf_close): always call #close method.  [ruby-core:23853]

	* io.c (argf_skip): should close only when current_file is available.

Sat Jul 25 21:26:18 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* enum.c (first_i): Enumerator#first should consume only what is
	  needed.   a patch from Marc-Andre Lafortune.  [ruby-core:23661]

	* enum.c (take_i): ditto.

	* enum.c (enum_first): call to_int once for an argument.  a patch
	  from Marc-Andre Lafortune.

Fri Jul 24 17:19:40 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (HTTP_STATUS): typo fixed.   [ruby-dev:38538]

Wed Jul 22 23:39:34 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rexml/text.rb (REXML::Text.normalize): call to_s for input.
	  [ruby-talk:337069]

Tue Jul 21 18:21:47 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (SRC_EXT): should be flat.
	  http://twitter.com/_tad_/status/1825862632

Sat Jul 18 00:44:43 2009  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* gc.c (rb_gc_call_finalizer_at_exit): finalizer_table can be NULL.
	  [ruby-core:24395]

Thu Jul 16 09:35:06 2009  Akinori MUSHA  <knu@iDaemons.org>

	* lib/delegate.rb (Delegator#method_missing)
	  (DelegateClass()#method_missing): Properly pass a given block
	  through. [ruby-dev:38390]

Wed Jul 15 11:40:34 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_join): recursive array has no meaning as path
	  name.  [ruby-core:23329]

Tue Jul 14 19:57:28 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (get_ts): use readtime clock.  [ruby-dev:38354]

	* eval.c (rb_thread_stop_timer): clear thread_init while locking.

Tue Jul 14 19:57:28 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_start_timer): guard condition was inverted.
	  [ruby-dev:38319]

Tue Jul 14 19:57:28 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (safe_mutex_lock): pthread_cleanup_push() must not be
	  inside parens.

Mon Jul 13 01:36:54 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_timeval): rounds subsecond toward zero.

Mon Jul 13 01:36:54 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_timeval): check out-of-range.  [ruby-core:23282]
	  [Bug #1396]

Thu Jul  9 17:58:03 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (proc_invoke): shares dmethod scope local variables.
	  a patch from coderrr at [ruby-core:23050]

	* gc.c (obj_free): do not free cloned scope local variables.

Wed Jul  8 19:28:03 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_remove): stops timer thread unless other
	  threads exist.  [ruby-core:18444]

Mon Jul  6 16:01:38 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): checks for interrupt, stack and finalizers too.
	  [ruby-dev:38208], [Bug #1329]

	* eval.c (eval): replaces the message if frozen.

Sun Jul  5 03:50:52 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb: use Kernel.exit to get rid of using
	  IRB::ExtendCommandBundle#exit.  a patch from Dmitry Vazhov by
	  [ruby-core:22986].

Fri Jul  3 09:05:38 2009  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network
	  families problem. a patch from Charl Matthee at [ruby-core:21033].

Wed Jul  1 15:46:30 2009  Tanaka Akira  <akr@fsij.org>

	* lib/pathname.rb (Pathname#sub): set $~ in block.binding.
	  [ruby-dev:38173]

Mon Jun 29 13:18:42 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/fileutils.rb (FileUtils#fu_get_gid): stringify group
	  argument before making regexp match.  [ruby-dev:38155]

Fri Jun 12 16:36:44 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (VpToString): fixed a bug introduced
	  in r23613.  [ruby-talk:338957]

Mon Jun  8 10:58:41 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (rb_thread_schedule): mswin32 doesn't have F_GETFD, so check
	  with another method.

Mon Jun  8 08:15:36 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (VpAlloc): avoid ALLOCA_N() to avoid
	  segmentation fault caused by (insanely) long decimal values.
	  backported from 1.9. CVE-2009-1904
 
	* ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_to_i,
	  BigDecimal_to_f, BigDecimal_to_s, BigDecimal_split,
	  BigDecimal_inspect): ditto.

Mon Jun  8 08:15:36 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): returns Inf if
	  exp is bigger than DBL_MANT_DIG.

Wed Jun  3 21:16:30 2009  Tanaka Akira  <akr@fsij.org>

	* file.c: include fcntl.h for O_RDONLY on Solaris.

Wed Jun  3 21:09:56 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (rv_strdup): macro to duplicate nul-terminated string.
	  [ruby-core:22852]

	* util.c (ruby_dtoa): allocates one more byte to get rid of buffer
	  overrun.  a patch from Charlie Savage at [ruby-core:22604].

Wed Jun  3 21:09:56 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_dtoa): allocates one more byte to get rid of buffer
	  overrun.  a patch from Charlie Savage at [ruby-core:22604].

Wed Jun  3 21:05:44 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (gfDebug): uncommented out.
	  [ruby-core:22600]

Wed Jun  3 20:54:23 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): needs to guard intermediate string objects.
	  based on a patch from Brent Roman <brent AT mbari.org> a
	  [ruby-core:22584].

Tue May 26 21:24:01 2009  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* Makefile.in (update-rubyspec, test-rubyspec): Catch up to
	  rubyspec merge.  A patch by Brian Ford at [ruby-core:21032]

Tue May 26 21:21:49 2009  Akinori MUSHA  <knu@iDaemons.org>

	* lib/soap/mimemessage.rb (MIMEMessage#to_s): Fix a fatal
	  method name typo. [Bug #1173]

Tue May 26 21:16:55 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_extname): fix for spaces before extention.
	  [ruby-dev:38044]

Tue May 26 21:09:21 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (_CrtDbgReportW): prevent from false positive
	  assertions in msvcrtd.  [ruby-core:22116]

Tue May 26 21:02:13 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/ostruct.rb (OpenStruct#new_ostruct_member): checks if frozen.
	  [ruby-talk:328195], [ruby-core:22142]

Tue May 26 21:00:08 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/ostruct.rb (OpenStruct#inspect): fixed the recursion check.
	  Patch by Kornelius Kalnbach.  [ruby-core:20992].

	* test/ostruct/test_ostruct.rb: test for inspect.
	  Patch by Kornelius Kalnbach.  [ruby-core:20992].

Tue May 26 20:50:32 2009  Tanaka Akira  <akr@fsij.org>

	* eval.c (rb_thread_schedule): handle EBADF of select as well.
	  [ruby-core:21264]

Wed Apr  8 18:59:52 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (subtruct): check tv_sec.

Thu Apr  2 16:06:17 2009  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* test/rss/test_atom.rb (RSS::TestAtomCore::assert_atom_content_inline_other_base64_to_s):
	  ditto. [ruby-dev:38248]

Thu Apr  2 15:43:46 2009  Kouhei Sutou  <kou@cozmixng.org>

	* test/rss/rss-assertions.rb (RSS::Assertions::assert_atom_content_inline_other_text):
	  newlines are valid for Base64 data. [ruby-dev:38248]

Thu Apr  2 14:17:09 2009  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/openssl/test_ssl.rb (OpenSSL#test_client_session):
	  Debian's openssl 0.9.8g-13 failed at assert(ssl.session_reused?),
	  when use default SSLContext. [ruby-dev:36167]
	  backported r19268 from trunk. [ruby-core:22843]

Thu Mar 31 18:18:18 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (mkintpath): new function which converts native path
	  to format acceptable in Makefile.

	* lib/mkmf.rb (configuration): leaves PATH_SEPARATOR unchanged.

	* lib/mkmf.rb (configuration): convers srcdir, topdir and hdrdir.
	  a patch by Alexey Borzenkov <snaury AT gmail.com> at
	  [ruby-core:21448].

Fri Mar 27 19:22:02 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (run_final): frees zombies only.  [ruby-dev:38171]

Fri Mar 27 19:22:02 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (rb_gc_call_finalizer_at_exit): leave Thread objects
	  unfinalized.  [ruby-dev:38168]

Fri Mar 27 19:22:02 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (run_final): calls free function.  [ruby-core:22578]

Mon Mar 23 19:17:06 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/thread/thread.c (rb_queue_pop, rb_queue_push): should not lock
	  mutex if got an exception while waiting, and should ensure unlocked
	  after signaled.  [ruby-dev:37545]

Mon Mar 23 18:26:57 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_value): missed to change at r17874.  [ruby-core:17595]

Mon Mar 23 18:26:57 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_join): new API.

	* ext/thread/thread.c (wait_mutex, lock_mutex): wait until the locking
	  thread exits.  [ruby-dev:34856]

Mon Mar 23 17:41:49 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_load_ok): checks if regular file, except for the
	  platform disallows to open directories, e.g. dosish.
	  [ruby-dev:38097], [Bug #1221]

Mon Mar  9 20:59:24 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): OCSP_basic_verify
	  returns positive value on success, not non-zero.  [ruby-core:21762]
	  backported r22440 from trunk.

Mon Mar  9 10:02:15 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (match_check): check if MatchData is initialized.
	  [ruby-core:18749]

Mon Mar  9 09:56:34 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/rexml/rexml.rb: incremented Ruby::VERSION.  Thanks, Jeremy
	  Kemper.  [ruby-core:20113]

Mon Mar  9 09:52:53 2009  Tanaka Akira  <akr@fsij.org>

	* io.c (io_getpartial): fflush after read for updating pos in FILE.
	  not portable, I guess.  [ruby-core:21561]

Mon Mar  9 09:04:39 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (define_final): cannot define finalizer for immediate
	  values.  [ruby-core:21500]

	* gc.c (define_final): freezes or hides internal values.

Mon Mar  9 08:54:47 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (IS_BEG): EXPR_CLASS should be treated like EXPR_BEG.
	  [ruby-core:21453]

Wed Feb 25 15:15:52 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (rb_thread_raised_clear): should not clear flags other than
	  raised flags.  a patch by Tomoyuki Chikanaga <chikanag AT
	  nippon-control-system.co.jp> at [ruby-dev:37794].  [ruby-dev:37776]

Wed Feb 25 15:05:48 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/extconf.rb (gai_strerror): checks if available and if
	  returns const pointer.

	* ext/socket/getaddrinfo.c (gai_strerror): defines only if non
	  available.  [ruby-core:21328]

Wed Feb 25 14:57:18 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (open_dir_handle): extracted from rb_w32_opendir.

	* win32/win32.c (winnt_stat): gets rid of strange behavior of
	  GetFileAttributes().  [ruby-core:21269]

Tue Feb 24 02:44:39 2009  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb (PercentScanner): remove PercentScanner. fixed % after
	  %> bug. [ruby-dev:37751] [Bug #997] 

	* test/erb/test_erb.rb: ditto

Tue Feb 24 02:35:29 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_s_create): set nil as the value if assoc length
	  is not enough.  [ruby-core:21249]

Sun Feb 22 22:08:45 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (stack_extend): streamlined rb_thread_restore_context()
	  to ensure O(1) time.  based on a patch by Brent Roman <brent AT
	  mbari.org>.

Sun Feb 22 22:03:40 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (cc_mark): frees the continuation's stack if its thread
	  is dead to avoid recursive gc that segfaults.  [ruby-core:13889]
	  a patch by Brent Roman <brent AT mbari.org>.

	* eval.c (rb_cont_check): checks for valid continuation instance.

	* eval.c (rb_callcc): assigns th->thread before scope_dup() to
	  avoid segfaults if this scope_dup() triggers a gc pass.
	  a patch by Brent Roman <brent AT mbari.org>.

Sun Feb 22 21:43:34 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (ruby_float_step): extracted from num_step().

	* range.c (range_step): uses ruby_float_step() for float range.
	  [ruby-dev:37691]

Sun Feb 22 00:49:36 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): does not use both of makefile.rb and
	  extconf.rb at the same time.

	* lib/mkmf.rb (DLLIB): depends on Makefile.  [ruby-core:21096]

Sun Feb 22 00:19:05 2009  Tanaka Akira  <akr@fsij.org>

	* eval.c (rb_thread_schedule): Don't change status of threads which
	  don't run next even if select notify readability/writability.
	  [ruby-core:20446]

Fri Feb 20 20:43:13 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::List#summarize): gives priority
	  to latter switches.  [ruby-dev:36692]

	* lib/optparse.rb (OptionParser#summarize): do not append
	  unnecessary line terminator.

Fri Feb 20 19:35:08 2009  Takeyuki FUJIOKA  <xibbar@ruby-lang.org>

	* lib/cgi/session.rb: ignore session_id options fixed.[Bug #605]

Fri Feb 20 18:06:40 2009  James Edward Gray II  <jeg2@ruby-lang.org>

	Merged 20854 from trunk.

	* lib/xmlrpc/server.rb:  Restricting method inspection to show only
	  non-inherited public methods.  [ruby-core:20603]

	* lib/xmlrpc/server.rb:  Fixing method inspection so it doesn't 
	  trigger XMLRPC::FaultException when used.  [ruby-core:20604]

Fri Feb 20 01:41:08 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/sync.rb (Sync_m#sync_try_lock): wrong variable name fixed.
	  a patch from [ruby-core:20561]

	* lib/sync.rb (Sync_m::Err.Fail): turn off Thread.critical before
	  exit.

Thu Feb 19 18:02:10 2009  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.
	  just ignores '*' in these cases.
	  [ruby-dev:37289]

Thu Feb 19 17:26:11 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (pack_pack): fixed length for odd length string.
	  [ruby-dev:37283]

Thu Feb 19 17:13:13 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_yield_0): Qundef means no argument.  [ruby-Bugs-22525]

Wed Feb 18 22:28:00 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_isatty): check whether fd is valid.

Wed Feb 18 22:24:23 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (waitpid): fix bug of checking child slot.

	* win32/win32.c (FindChildSlotByHandle): new.

Wed Feb 18 22:17:04 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (pack_pack): propagate taint status from format string to
	  result string.

Wed Feb 18 22:07:44 2009  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ext/gdbm/gdbm.c: do not set members of RSTRING(str) directly.
	  [ruby-dev:37182]

	* ext/gdbm/gdbm.c (rb_gdbm_nextkey): fix memory leak.

Tue Feb 17 11:58:58 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_independent): no independent string points null_str.
	  [ruby-core:20082]

Mon Feb 16 23:30:24 2009  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkextlib/blt.rb, ext/tk/lib/tkextlib/blt/vector.rb: 
	  fix NameError bug.

Mon Feb 16 23:08:22 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_s_alloc, rb_str_replace): use null_str as well as
	  rb_string_value so that extension libraries do not segfault.
	  [ruby-core:19971]

	* string.c (rb_str_replace): reduced unnecessary malloc and copy.

Mon Feb 16 22:45:41 2009  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb: fixed fails occasionally [ruby-dev:37119].
	  thanks, shinichiro.h.

Mon Feb 16 22:36:37 2009  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (DRbConn::alive?): fixed NoMethodError problem
	  from NaHi [ruby-dev:37110].

Sun Feb 15 04:21:42 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/net/ftp.rb (Net::FTP#open_socket): SOCKSsocket is obsolete.
	  a patch from Alan Johnson <alan.wayne.johnson at gmail.com> in 
	  [ruby-core:19982].

Fri Feb 13 19:18:42 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/logger.rb (ProgName): fixed for svn, based on a patch from
	  Nobuhiro IMAI at [ruby-dev:37108].

Sun Feb 15 04:17:40 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_request_line):
	  use non-greedy match for path retrieval to avoid huge recursion
	  for insanely long path.

Fri Feb 13 19:04:54 2009  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* shell/command-processor.rb: undefined method `top_level_test' in
  	  Shell#test. [ruby-list:45634]

Tue Feb 10 20:00:52 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (load_lock): makes circular require deadlock.
	  [ruby-core:19821]

Tue Feb 10 19:40:58 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_feature_p): returns found feature name if loading.
	  [ruby-core:19798]

	* eval.c (search_required): ditto.

Wed Feb 11 23:37:35 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (VpMidRound): Round method bug
	  pointed by Ryan Platte fixed(Patch to the patch from "NATORI
	  Shin").  [ruby-talk:273360]
	  back ported from 1.9. fix [ruby-core:19791]

Mon Feb  9 17:35:38 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_accept): secure fd before accept because if
	  error causes in securing, cannot restore the state of accepted
	  socket.
	  fixed [ruby-core:19728]

Mon Feb  9 13:42:15 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (ifs_open_socket): should retry without proto_buffer
	  if cannot find the suitable protocol. a patch from Heesob Park.
	  fixed [ruby-core:19713]

Mon Feb  9 13:40:21 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/stringio/stringio.c (strio_ungetc): should allow ungetc at
	  the top of the buffer.  ref #701

Thu Feb  5 09:38:48 2009  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c (h_conv): can't guess UTF-8 input in
	  conversion. [ruby-list:45609]

Thu Feb  5 09:03:21 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/rexml/entity.rb (unnormalized): do not call
	  document.record_entity_expansion if document is nil.
	  see <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502535>.
	  Thanks, Naohisa Goto.  backported from trunk.

	* test/rexml/test_document.rb: ditto.

Thu Feb  5 08:55:24 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_join): do not repeat self in a recursive array.
	  [ruby-dev:37019]

Wed Feb  4 14:26:58 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (dir_globs): need taint check.  reported by steve
	  <oksteev at gmail.com>

Tue Feb  3 14:35:26 2009  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/net/pop.rb: check for invalid APOP timestamp. (CVE-2007-1558)
	  [ruby-dev:36631]

	* test/net/pop/test_pop.rb: ditto.

Mon Feb  2 20:03:58 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_mdump, time_mload): preserves GMT status.
	  [ruby-core:19252]

Mon Feb  2 11:34:51 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (autoload_delete, autoload_file): should not delete
	  autoload table, since it may be shared with duplicated modules.
	  [ruby-core:19181]

Thu Jan 29 11:54:22 2009  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb (today,now): should produce own instances.
	  [ruby-talk:317020]

Wed Jan 28 22:51:55 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_mod_modfunc): method undefined in included module
	  may not have nd_body.  [ruby-core:18738]

Wed Jan 28 20:53:27 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (marshal_dump): fixed for check_dump_arg.

Tue Jan 27 17:30:11 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (marshal_dump): initializes dump_arg before any funcall.
	  [ruby-dev:36648]

Tue Jan 27 15:17:35 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (host_str): numeric address should be unsigned.
	  [ruby-core:18971]

Mon Jan 26 11:12:03 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/tmpdir.rb: setup buffer with nul characters instead of spaces.
	  fixed [ruby-dev:36493]

Sun Jan 25 00:07:23 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap):
	  abandon wrapping if the line contains no space.  [ruby-dev:36045]
	  fix: #342

Sun Jan 25 00:02:23 2009  Yuki Sonoda (Yugui)  <yugui@yugui.jp>

	* lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?".
	  (Vector#eqn?): removed. Defined by mistake.
	  Fixes [ruby-dev:36294]. Reported by weda <weda AT
	  issp.u-tokyo.ac.jp> and an anonymous user.

	* test/matrix/test_matrix.rb: added.

	* test/matrix/test_vector.rb: added.

Fri Jan 23 11:49:45 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* NEWS: added an entry for REXML.

	* lib/rexml/document.rb: fixed typo.

Fri Jan 23 11:49:45 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/rexml/document.rb: limit entity expansion.  Thanks, Luka
	  Treiber, Mitja Kolsek, and Michael Koziarski.  backported from
	  trunk r19033, r19317, r19318.

	* lib/rexml/entity.rb: ditto.

	* test/rexml/test_document.rb: ditto.

Thu Jan 22 15:19:39 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (marshal_load): arg.data is no longer a VALUE but a
	  st_table, and freed in load_ensure.  pointed out by pegacorn.
	  [ruby-dev:37008]

Thu Jan 22 15:19:39 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (rb_mark_set): new function to mark keys.

	* marshal.c (struct dump_arg, struct load_arg): added wrappers to mark
	  data entries.  backport from trunk r13527,r13528,r13961,r16533.
	  [ruby-dev:36082]

Wed Jan 21 11:12:55 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (filetime_to_timeval): new function, split from
	  gettimeofday().

	* win32/win32.c (gettimeofday): use above function.

	* win32/win32.c (filetime_to_unixtime): ditto. [ruby-dev:36135]

Wed Jan 21 11:12:55 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (gettimeofday): tv_usec is usec, not msec.
	  [ruby-dev:36094]

Wed Jan 21 11:12:55 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (gettimeofday): calc tv_sec and tv_usec from system
	  time by myself. [ruby-dev:36084]

Wed Jan 21 11:12:55 2009  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (gettimeofday): shouldn't use mktime(2) because it's
	  buggy about handling summer time.
	  reported by Yoshikawa <yoshixool AT gmail.com> at [ruby-dev:36071]

Tue Jan 20 12:23:38 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/scanf.rb (Scanf::FormatSpecifier#initialize): %i should accept
	  single digit decimal.  [ruby-core:18355]

Mon Jan 19 18:25:28 2009  Tanaka Akira  <akr@fsij.org>

	* configure.in (rb_cv_broken_glibc_ia64_erfc): renamed from
	  rb_broken_glibc_ia64_erfc.
	  [ruby-core:18228]

Sat Jan 17 12:16:10 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* random.c (Init_Random): always initialize seed.

Fri Jan 16 10:59:31 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* class.c (clone_method): should copy cbase in cref as well.
	  [ruby-dev:35116]

	* node.h (NEW_CREF): new NEW_ macro.

	* eval.c (PUSH_CREF): use NEW_CREF().

Thu Jan 15 14:34:32 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (STACK_LEVEL_MAX, ruby_stack_length): returns size_t.
	  [ruby-core:18207]
Wed Jan 14 10:39:56 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* stable/ext/socket/socket.c (NI_MAXHOST, NI_MAXSERV): fixed invalid
	  preprocessor directives.  a patch from Peter Bowen at
	  [ruby-core:18211].

Tue Jan 13 04:40:30 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (login): raise FTPReplyError if passwd or acct
	  is not supplied.  backported from trunk.  fixed [ruby-core:18058].

Mon Jan 12 00:23:37 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (gc_sweep, obj_free, run_final): defer finalizers of IO and
	  Data.  [ruby-dev:35578]

	* gc.c (rb_gc_call_finalizer_at_exit): self-referencing finalizers
	  cannot be invoked.  [ruby-dev:35681]

Sun Jan 11 11:33:27 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (chdir): handle 5xx errors correctly.
	  backported from trunk.  fixed [ruby-core:18057].

Fri Jan  9 19:25:25 2009  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for
	  environments without OpenSSL.  backported from trunk.
	  fixed [ruby-dev:35755].

Thu Jan  8 13:24:23 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (deferred_nodes, compstmt, arg, fixup_nodes, range_op): fix
	  up fixnum range literal in conditional as automagical line number
	  comparison.  [ruby-core:12124], [ruby-dev:35731]

Wed Jan  7 10:09:46 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (timeofday): use monotonic clock.  based on a patch
	  from zimbatm <zimbatm@oree.ch> in [ruby-core:16627].

Tue Jan  6 09:03:35 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yylex): 8 and 9 in octal integer should cause compile
	  error.  [ruby-dev:35729]

Mon Jan  5 11:14:39 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_schedule): runs deferred finalizers.

	* gc.c (gc_sweep): sets rb_thread_pending to run deferred finalizers.

	* rubysig.h (CHECK_INTS): now checks rb_thread_pending even on
	  platforms where setitimer is not available.  [ruby-core:18045]

Mon Jan  5 11:14:39 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* rubysig.h (CHECK_INTS): gives the chance to perform to deferred
	  finalizers before explicit GC.start or the process termination.
	  [ruby-core:18045]

Sun Jan  4 04:49:01 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_telldir): just returns loc.

	* win32/win32.c (rb_w32_rewinddir): needs to intialize loc.
	  [ruby-core:18041]

Sun Jan  4 04:45:26 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_select): recalc the rest of timeout for each
	  iterations.  [ruby-core:18015]

Fri Jan  2 03:08:47 2009  Kouhei Sutou  <kou@cozmixng.org>

	* test/rss/: use PNG instead of zlib as binary data. [ruby-dev:35666]

Tue Nov 11 01:07:32 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* configure.in: fix SEGV on Mac OS X 10.5.3 with --enable-pthread.
	  a patch from Wataru Kimura in Bug #193 [ruby-core:17333].

Mon Aug 11 09:37:17 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/dl/dl.c (rb_str_to_ptr): should propagate taint to dlptr.

	* ext/dl/dl.c (rb_ary_to_ptr): ditto.

	* ext/dl/sym.c (rb_dlsym_call): should check taint of DLPtrData as
	  well.

Fri Aug  8 10:53:52 2008  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb: randomize source port and transaction id.
	  CVE-2008-1447.

	* lib/resolv-replace.rb (UDPSocket#bind): don't resolv host if host is
	  "".

Mon Aug  4 14:49:35 2008  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* lib/net/smtp.rb (Net::SMTP::rcptto): fix a typo. a patch from
	  Masao Takaku <masao at nii.ac.jp>
	  fix [ruby-dev:35489].

Mon Aug  4 14:13:15 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* regex.c (xmalloc, xrealloc, xfree): not to use ruby managed memory.

	* regex.c (DOUBLE_STACK, re_compile_fastmap0, re_adjust_startpos),
	  (re_search, re_match_exec): check if failed to allocate memory.

Mon Aug  4 13:53:42 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big2str0, bigsqr): made interruptible.  [ruby-Bugs-20622]

Mon Aug  4 13:31:41 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* numeric.c (check_uint, rb_num2uint, rb_fix2uint): fixed wrong check
	  about 64bit positive value.
Mon Aug  4 13:31:41 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* numeric.c (check_uint, rb_num2uint, rb_fix2uint): strict check.
	  fixed [ruby-dev:33683]

Thu Jul 17 21:42:07 2008  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* lib/net/smtp.rb (Net::SMTP::start): revert to avoid RFC2821
	  violation. [ruby-dev:35487]

Thu Jul 17 21:32:49 2008  Tanaka Akira  <akr@fsij.org>

	* string.c (rb_str_format_m): make tmp volatile to avoid possible GC
	  problem.

Thu Jul 17 21:30:55 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#environment): requires shellwords.
	  [ruby-dev:35466]

Thu Jul 17 02:05:10 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): requires
	  webrick/cookie.  [ ruby-Bugs-21139 ]

Thu Jul 17 01:38:31 2008  Yusuke Endoh  <mame@tsg.ne.jp>

	* ext/zlib/zlib.c (rb_gzfile_set_mtime): fix typo.  [ruby-core:17713]

Sun Jul 13 00:08:16 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/ipaddr.rb (IPAddr#initialize): get rid of ArgumentError in
	  IPAddr#to_range.  a patch from okkez <okkez000 AT gmail.com> in
	  [ruby-dev:35091].

Sun Jul 13 00:04:38 2008  Tanaka Akira  <akr@fsij.org>

	* configure.in (erfc): erfc of glibc comes with Debian GNU/Linux Etch
	  on IA64 is broken.  erfc(10000.0) aborts.
	  use missing/erf.c instead.
	  http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html

Thu Jul 10 18:50:48 2008  Tanaka Akira  <akr@fsij.org>

	* common.mk (SPEC_GIT_BASE): update RubySpec GIT URL.

Thu Jul 10 18:46:28 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_extname): fix for file name with spaces.
	  [ruby-talk:307404]

Thu Jul 10 18:42:37 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb (PercentScanner#scan): fix %% line bug. [ruby-core:17491]

	* test/erb/test_erb.rb (test_percent): ditto.

Thu Jul 10 18:40:22 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/net/ftp.rb (Net::FTP#sendport): use divmod.  [ruby-core:17557]

Thu Jul 10 18:36:53 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ruby.c: Mac OS X needs origargc times of '\0' in
	  origargv. [ruby-dev:35308]

Thu Jul 10 13:53:08 2008  Tanaka Akira  <akr@fsij.org>

	* include/ruby/ruby.h (POSFIXABLE): use FIXNUM_MAX+1 instead of
	  FIXNUM_MAX to make it possible to convert to double accurately.
	  It assumes FLT_RADIX is 2.
	  fix RubyForge bug #14102.
	  backported from 1.9.

Mon Jul  7 16:21:38 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/net/smtp.rb (Net::SMTP::start): use 'localhost' instead of
	  'localhost.localdomain'.  [ruby-dev:35333]

	* lib/net/smtp.rb (Net::SMTP::SMTP.start): ditto.

Mon Jul  7 15:02:13 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_longjmp): duplicate the thrown exception to set backtrace
	  if it was frozen.  clear all raised flags.

	* eval.c (stack_check): leave clearing flag to rb_longjmp.

	* eval.c (rb_thread_set_raised, rb_thread_reset_raised): use generic
	  flags.

	* eval.c (Init_Proc), gc.c (Init_GC): freeze preallocated special exceptions.

	* gc.c (rb_memerror): use thread raised flag instead of static flag,
	  and raise nomem_error without backtrace if failed to make backtrace.
	  [ruby-dev:34724]

	* gc.c (ruby_xmalloc): increase malloc_increase only if malloc
	  succeeds.  failed malloc size can be huge.  it may increase
	  malloc_limit too big which cause less GC and memory full.
	  (ruby_xrealloc): ditto.

Mon Jul  7 12:23:05 2008  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c: avoid creating Ruby object during
	  GC. thanks to arton <artonx AT yahoo.co.jp>. [ruby-dev:35313]

	* ext/win32ole/tests: add test_win32ole_event.rb, remove
	  testOLEEVENT.rb

	* ext/win32ole/tests/testWIN32OLE.rb(test_convert_bignum):
	  fix test.

Mon Jul  7 12:23:05 2008  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* gc.c: add rb_during_gc(). based on a patch from arton <artonx AT
	  yahoo.co.jp> at [ruby-dev:35313].   

	* intern.h: ditto.

Thu Jul  3 20:13:20 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object, marshal_dump, r_object0, marshal_load): search
	  public methods only.  [ruby-core:17283]

	* object.c (convert_type): ditto.

	* lib/singleton.rb (Singleton#_dump): conversion method should be
	  public.

Wed Jul  2 19:06:43 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/cgi.rb (CGI::QueryExtension.read_multipart): blanks inside
	  double quotes are allowed.  [ruby-list:45140]

Wed Jul  2 19:03:37 2008  Tanaka Akira  <akr@fsij.org>

	* numeric.c (num_coerce): call rb_Float(x) first.  don't depend on
	  evaluation order of function arguments.

Wed Jul  2 18:57:19 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/syslog/syslog.c (syslog_write): syslog operations should be
	  protected from $SAFE level 4.  a patch from Keita Yamaguchi
	  <keita.yamaguchi at gmail.com>.

	* ext/syslog/syslog.c (mSyslog_close): ditto.

	* ext/syslog/syslog.c (mSyslog_set_mask): ditto.

Wed Jul  2 18:26:20 2008  Tanaka Akira  <akr@fsij.org>

	* math.c (domain_check): fix preprocess condition.

Wed Jul  2 18:22:52 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/tmpdir.rb (@@systmpdir): prior LOCAL_APPDATA if possible, and
	  should be clean.  based on a patch from arton <artonx AT
	  yahoo.co.jp> at [ruby-dev:35269]

Wed Jul  2 18:16:19 2008  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (date2time_str): fix the overflow in
	  some situation. [ruby-bugs-20793]

Tue Jul  1 15:11:14 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_fill): check if beg is too big.

Mon Jun 30 20:35:32 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_buf_cat): check for self concatenation.

Sun Jun 29 21:39:54 2008  Tanaka Akira  <akr@fsij.org>

	* eval.c (rb_obj_respond_to): use RTEST to test the result of
	  respond_to? method.

Sun Jun 29 21:20:17 2008  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* array.c (rb_ary_fill): (compatibility) do not raise
	  ArgumentError on negative length.  This behaviour shall change
	  in a future release.

Sun Jun 29 20:08:11 2008  Tanaka Akira  <akr@fsij.org>

	* time.c (time_timeval): fix rounding negative float.

Sun Jun 29 19:19:08 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/inlinetest.rb (InlineTest.in_progname): workaround for frozen
	  $0.  [ruby-dev:35261]

	* lib/test/unit/ui/console/testrunner.rb (TestRunner#finished): ditto.

Sun Jun 29 19:19:08 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (set_arg0, ruby_prog_init): freeze $0.  a patch from Keita
	  Yamaguchi <keita.yamaguchi at gmail.com>.

Sun Jun 29 18:33:33 2008  Tanaka Akira  <akr@fsij.org>

	* process.c: include sys/resource.h if HAVE_SYS_RESOURCE_H is defined.
	  pointed by TOYOFUKU Chikanobu.  [ruby-dev:35258]

Sun Jun 29 18:26:01 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_f_trace_var): should not be allowed at safe level 4.  
	  a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>.

	* eval.c (rb_call0): wrong condition to check insecure method.
	  a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>.

Sun Jun 29 18:22:52 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_fill): not depend on unspecified behavior at integer
	  overflow.  reported by Vincenzo Iozzo <snagg AT openssl.it>.

Sun Jun 29 18:22:06 2008  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c(ole_invoke): fix memory leak.
	  [ruby-bugs-20792]

Sun Jun 29 18:19:11 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (PUSH_FRAME, PUSH_CLASS): Add volatile to avoid a
	  possible optimization bug on OS X/PPC.  This at least makes
	  build with gcc -O1 and `make test' pass.

Sun Jun 29 17:24:43 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/parsers/parse_rb.rb (RDoc#collect_first_comment): skip
	  magic comment.

Sun Jun 29 17:22:09 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_each, strio_readlines): IO#each and
	  IO#readlines do not affect $_.  [ruby-core:17277]

Sun Jun 29 17:19:59 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_readline, strio_each)
	  (strio_readlines): set lastline.  [ruby-core:17257]

Sun Jun 29 17:15:49 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/ossl.h: include winsock.h if USE_WINSOCK2 is not defined.
	  a patch from arton <artonx at yahoo.co.jp> in [ruby-dev:35078]

Sun Jun 29 17:09:48 2008  wanabe  <s.wanabe@gmail.com>

	* util.c (ruby_strtod): ruby_strtod don't allow a trailing
	  decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009]

Sat Jun 28 19:23:40 2008  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* class.c (clone_method): use rb_copy_node_scope.
	  fixed [ruby-list:45102]
	  fixed [ruby-core:17393]

Sat Jun 28 18:49:50 2008  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* class.c: revert to r15855.

Fri Jun 20 18:25:18 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_buf_append): should infect.

Fri Jun 20 16:33:09 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_store, rb_ary_splice): not depend on unspecified
	  behavior at integer overflow.

	* string.c (str_buf_cat): ditto.

Wed Jun 18 22:24:46 2008  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* array.c (ary_new, rb_ary_initialize, rb_ary_store,
	  rb_ary_aplice, rb_ary_times): integer overflows should be
	  checked. based on patches from Drew Yao <ayao at apple.com>
	  fixed CVE-2008-2726

	* string.c (rb_str_buf_append): fixed unsafe use of alloca,
	  which led memory corruption. based on a patch from Drew Yao
	  <ayao at apple.com> fixed CVE-2008-2726

	* sprintf.c (rb_str_format): backported from trunk.

	* intern.h: ditto.

Tue Jun 17 15:09:46 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): no need to expand root path which has no
	  short file name.  [ruby-dev:35095]

Sun Jun 15 19:27:40 2008  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in: Fix $LOAD_PATH.  Properly expand vendor_ruby
	  directories; submitted by Takahiro Kambe <taca at
	  back-street.net> in [ruby-dev:35099].

Mon Jun  9 17:56:30 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#delete_if): Call to_a.
	  (SortedSet#delete_if, TC_SortedSet#test_sortedset): Use super to
	  yield elements in sorted order; [ruby-core:17144] by Arthur
	  Schreiber.
	  (SortedSet#each, SortedSet#each, TC_Set#test_each)
	  (TC_SortedSet#test_sortedset): Return self; [ruby-dev:35002] by
	  Arthur Schreiber.

Mon Jun  9 03:28:05 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/zlib/zlib.c (rb_deflate_initialize, Init_zlib): Fix up
	  initialize_copy; [ruby-list:45016], [ruby-list:45018].

Mon Jun  9 03:26:03 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* NEWS: Mention new constants.

Mon Jun  9 03:24:18 2008  Tanaka Akira  <akr@fsij.org>

	* hash.c (hash_i): make Hash#hash order insensitive.

Mon Jun  9 03:22:43 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (VENDOR_DIR): use LIBDIR instead of PREFIX as well as
	  SITE_DIR.  a patch from Richard Brown <rbrown AT exherbo.org> in
	  [ruby-core:17129].

Mon Jun  9 03:21:20 2008  Tanaka Akira  <akr@fsij.org>

	* gc.c (os_obj_of): assure to not free the scanning heap.

Mon Jun  9 03:20:12 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_open_file, rb_io_s_sysopen): fmode should be unsigned int.
	  fixed [ruby-dev:34979]

Fri Jun  6 21:16:55 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (COMMON_HEADERS): include ws2tcpip.h.

	* ext/socket/addrinfo.h (addrinfo, getaddrinfo, getnameinfo,
	  freehostent, freeaddrinfo): undef before define because these are
	  macros in some versions of Windows SDK.

	* win32/setup.mak: maybe commit miss.

Fri Jun  6 19:34:22 2008  Akinori MUSHA  <knu@iDaemons.org>

	* mkconfig.rb: hide build path from rbconfig.rb.

	* util.c (ruby_strtod, dtoa): initialize more variables for error
	  handling.

	* io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique),
	  (path2class, path2module): constified.

	* pack.c (pack_unpack), process.c (rb_syswait): suppress warnings.

	* suppress warnings on cygwin, mingw and mswin.

Fri Jun  6 19:23:53 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): fix for non-existent files and SFN of
	  symlinks.  [ruby-talk:303736]

Fri Jun  6 18:25:43 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/iconv: Tests fixed.

Fri Jun  6 17:04:56 2008  Akinori MUSHA  <knu@iDaemons.org>

	* win32/win32.h: include ws2tcpip.h. fixed [ruby-Bugs-20528]

	* lib/time.rb (Time.xmlschema): don't use float.  fix
	  http://rubyforge.org/tracker/index.php?func=detail&group_id=426&atid=1698&aid=20504

	* object.c (rb_obj_alloc): RDoc updated.  a patch from Gaston
	  Ramos <ramos.gaston at gmail.com> in [ruby-core:17073].

	* lib/rdoc.rb: massive spelling correction patch from Evan Farrar
	  <evanfarrar at gmail.com> in [ruby-doc:1382] applied.

	* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize):
	  Add a null check for ssl; submitted by akira yamada
	  in [ruby-dev:34950].

	* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if
	  SSL_OP_NO_TICKET is present; submitted by akira yamada
	  in [ruby-dev:34944].

	* test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a
	  workaround for the case where OpenSSL is configured with
	  --enable-tlsext; submitted by akira yamada in [ruby-dev:34944].

Fri Jun  6 16:58:23 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (iconv_iconv): fix for length argument and now
	  allows range.  [ruby-core:17092] [ruby-core:17115]

Wed Jun  4 17:22:30 2008  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Fix typos and move misplaced entries.
	  NEWS: Somehow optflags and warnflags were not actually included
	  in this release.

Tue Jun  3 19:33:22 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c (enumerator_init_copy): Take care of
	  initialize_copy as well as initialize.

	* test/ruby/test_enumerator.rb: Pull in the test suite for
	  enumerator from trunk.

Tue Jun  3 12:51:57 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c (enumerator_allocate, enumerator_ptr): Properly
	  detect if the object is initialized and raise error when
	  appropriate.
	  (enumerator_initialize): Fix a typo in rdoc. [ruby-core:17052]

Tue Jun  3 10:16:40 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/erb.rb (ERB::Compiler::TrimScanner#scan_line): Fix a bug
	  where tokens are not yilelded one by one.
	  (ERB::Compiler::TrimScanner#explicit_trim_line): Fix without-
	  strscan problems. [ruby_core:17028].

	* test/erb/test_erb.rb (TestERBCore#_test_01)
	  (TestERBCore#test_02_safe_04): The expected value should come
	  first for assert_equal().
	  (TestERBCoreWOStrScan): Add test class for without-strscan.

Mon Jun  2 19:47:16 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/delegate.rb (DelegateClass, Delegator#respond_to?):
	  respond_to? must take optional second argument.  This was a
	  latent bug exposed by a recent internal change of marshal.c to
	  call respond_to? with a second argument; submitted by Jeremy
	  Kemper <jeremy at bitsweat.net> in [ruby-core:17045].

Sat May 31 23:53:35 2008  Akinori MUSHA  <knu@iDaemons.org>

	* .: Release as Ruby 1.8.7.

Sat May 31 23:33:34 2008  Akinori MUSHA  <knu@iDaemons.org>

	* README, README.ja: Add a note about default C flags.

Sat May 31 22:11:15 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* version.c (ruby_description, ruby_copyright): backported from
	  1.9. bug#19002, [ruby-dev:34883]

	* error.c (report_bug): uses ruby_description.

Sat May 31 20:56:04 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_delete_if): should return enumerator if no block
	  is given.  [ruby-dev:34901]

Sat May 31 18:28:17 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* suppress warnings with -Wwrite-string.

Sat May 31 15:58:08 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, configure.in (warnflags): defaulted to -Wall
	  -Wno-parentheses with gcc.  [ruby-dev:34810]

Fri May 30 05:28:18 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enum.c (count_i, count_iter_i, count_all_i): add prototypes for VC.

Fri May 30 04:32:07 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enum.c (count_i, count_iter_i): Sync with trunk.
	  enum.c (enum_count, count_all_i, Init_Enumerable),
	  array.c (rb_ary_count): Sync with trunk.  If no argument or
	  block is given, count the number of all elements.

Fri May 30 03:12:18 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand):
	  Int should be enough here.

Fri May 30 02:35:00 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand),
	  ext/openssl/ossl_pkey_dh.c (ossl_dh_s_generate)
	  (ossl_dh_initialize),
	  ext/openssl/ossl_pkey_dsa.c (ossl_dsa_s_generate),
	  ext/openssl/ossl_rand.c (ossl_rand_bytes)
	  (ossl_rand_pseudo_bytes, ossl_rand_egd_bytes),
	  ext/openssl/ossl_x509store.c (ossl_x509stctx_set_error): Do not
	  use FIX2INT() without checking the value type.  Use NUM2INT()
	  instead; found by akr in [ruby-dev:34890].

Thu May 29 20:07:45 2008  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in, win32/Makefile.sub, mkconfig.rb, instruby.rb,
	  ruby.c, lib/mkmf.rb, README.EXT, README.EXT.ja: Backport the
	  vendor_ruby directory support.

Thu May 29 17:52:31 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/zlib/extconf.rb: search zlib1, and regard mswin32 later than VC6
	  as WIN32.  [ruby-core:16984]

Wed May 28 17:54:29 2008  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_start_with): Remove an unused variable.
	  (rb_str_upto_m): Fix a prototype.

Wed May 28 17:48:28 2008  Akinori MUSHA  <knu@iDaemons.org>

	* range.c (range_step): Fix brokenness when a non-integer numeric
	  value is specified as step. [rubyspec]
	  (range_step): Make use of String#step internally if a string (or
	  string-alike) range is given.

	* string.c (rb_str_upto_m, Init_String): Add an optional second
	  argument to specify if the last value should be included.

Wed May 28 16:53:39 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_slice_bang): Call rb_ary_modify_check() at the
	  beginning. [rubyspec]

Wed May 28 16:12:44 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler#do_GET):
	  Set the HTTP status code to 302 if a Location header field is
	  present and the status code is not valid as a client
	  redirection.  cf. RFC 3875 6.2.3, 6.2.4.

Wed May 28 15:18:16 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/singleton.rb (SingletonClassMethods): _load should be public.

Wed May 28 12:52:41 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object, marshal_dump, r_object0, marshal_load): search
	  private methods too.  [ruby-dev:34671]

	* object.c (convert_type): ditto.

Tue May 27 23:26:49 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* error.c (rb_bug): description from rb_bug() should include
	  patchlevel.  [ruby-dev:34826]

Tue May 27 20:19:22 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_slice_bang): Return an empty array instead of
	  nil when pos is valid and len is adjusted from a valid value to
	  zero; caught by RubySpec.

Tue May 27 19:45:20 2008  Akinori MUSHA  <knu@iDaemons.org>

	* numeric.c (flo_divmod): Revert the behavior change; do not
	  suppress an exception when div is NaN or Inf. [ruby-dev:34857]

Tue May 27 19:24:40 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enum.c (enum_to_a): Pass arguments through to #each().
	  (enum_sort): Follow the enum_to_a signature change.
	  (enum_reverse_each): Add #reverse_each().

Tue May 27 18:54:02 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/stringio/stringio.c (strio_each_char, Init_stringio): Add
	  StringIO#{each_char,chars}.

Tue May 27 17:59:34 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/stringio/stringio.c (strio_each): Return an enumerator if no
	  block is given.
	  (strio_each_byte): Return an enumerator if no block is given,
	  and return self if one is given as the rdoc says.

	* io.c (rb_io_each_byte): Fix rdoc.  IO#each_byte returns self,
	  not nil.

Tue May 27 16:02:58 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_mod_module_exec, Init_eval): Add
	  Module#{module_exec,class_exec}.

Tue May 27 15:36:37 2008  Akinori MUSHA  <knu@iDaemons.org>

	* io.c (rb_io_each_char, argf_each_char, Init_IO):
	  Add {IO#,ARGF.}{each_char,chars}.

Tue May 27 13:46:52 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/stringio/stringio.c (Init_stringio): Define
	  StringIO#{getbyte,readbyte}.

Tue May 27 13:38:51 2008  Akinori MUSHA  <knu@iDaemons.org>

	* io.c (Init_IO): Define {IO#,ARGF.}{getbyte,readbyte}.

Tue May 27 13:26:15 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/stringio/stringio.c (Init_stringio): Define #bytes and
	  #lines.

Tue May 27 13:20:35 2008  Akinori MUSHA  <knu@iDaemons.org>

	* io.c: (rb_io_lines, rb_io_bytes, Init_IO): Define
	  IO#{lines,bytes} and ARGF.{lines,bytes}.

Tue May 27 12:13:17 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (BUFCHECK): wrong condition. [ruby-core:16921]

	* file.c (file_expand_buf): shouldn't use buflen for length of string.

Mon May 26 18:24:48 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (BUFCHECK): no resize if enough room.

	* file.c (file_expand_path): use BUFCHECK.

Mon May 26 16:46:19 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (ntfs_tail): filename which starts with '.' is valid.

	* file.c (file_expand_path): cygwin symlink support.

Mon May 26 12:16:43 2008  Akinori MUSHA  <knu@iDaemons.org>

	* .: Release as Ruby 1.8.7-preview4.

Mon May 26 12:12:26 2008  Akinori MUSHA  <knu@iDaemons.org>

	* marshal.c (dump_ensure, load_ensure): should return values.

	* eval.c (yield_under, yield_under_i, yield_args_under_i)
	  (specific_eval, rb_obj_instance_exec, Init_eval): Implement
	  Object#instance_exec(), a 1.9 feature.

Mon May 26 11:53:21 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a
	  block to a Proc.  [ruby-dev:23533]; by nobu; backported from
	  1.9.  This implementation in current shape is known to be
	  buggy/broken, especially with nested block invocation.  Take
	  this as an experimental feature.

	* parse.y (block_par, block_var): ditto.

Mon May 26 08:00:52 2008  Akinori MUSHA  <knu@iDaemons.org>

	* marshal.c (r_object0, Init_marshal): Fix the garbled s_call
	  definition; fixes [ruby-dev:34843].

Mon May 26 03:16:20 2008  Akinori MUSHA  <knu@iDaemons.org>

	* hash.c (rb_hash_default): Fix rdoc.
	  (rb_hash_each, env_each_value, env_each_pair): Return an
	  enumerator if no block is given.
	  (rb_hash_update): Update rdoc.
	  (envix): Conditionalize the definition itself.
	  (rb_f_getenv, env_fetch, env_keys, env_values, env_values_at)
	  (env_select, env_inspect, env_to_a, env_empty_p, env_has_key)
	  (env_has_value, env_index, env_indexes, env_to_hash, env_shift)
	  (env_update): Require secure level 4.
	  (env_each_value, env_each_i): Delay variable initialization.
	  (env_each_key, env_each_value, env_reject_bang)
	  (env_clear, env_replace): Omit duplicated secure level check.
	  (env_has_value): Do to_str conversion.

Sun May 25 19:48:12 2008  Akinori MUSHA  <knu@iDaemons.org>

	* hash.c (env_delete_if): Return an enumerator if no block is
	  given.
	  (env_each_key): Delay a variable initialization after
	  RETURN_ENUMERATOR().

Sun May 25 05:07:19 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_slice_bang): Be consistent with Array#slice()
	  and String#slice!().  Just return nil when a negative length or
	  out of boundary index is given instead of raising an exception
	  via internal functions.
	  (rb_ary_slice_bang): should not use rb_ary_subseq() which shares
	  internal pointer.  splice modifies the receiver right after
	  subseq.  [ruby-dev:34005]
	  (rb_ary_slice_bang): should adjust length before making
	  sub-array.

	* enumerator.c (Init_Enumerator): Override
	  Enumerable::Enumerator#each_with_index with #with_index.

Sun May 25 03:13:09 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (Init_Thread): Initialize recursive_key.

Sun May 25 02:45:49 2008  Akinori MUSHA  <knu@iDaemons.org>

	* error.c (syserr_eqq): Use en.

Sat May 24 22:32:49 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (rb_cstr_to_dbl): should clear errno before calling
	  strtod(3).  [ruby-dev:34834]

Sat May 24 22:27:44 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (marshal_load): should initialize arg.data used for
	  reentrant check.  [ruby-dev:34837]

Sat May 24 00:34:59 2008  Tanaka Akira  <akr@fsij.org>

	* lib/rational.rb (Rational#to_i): fix rdoc.  Rational(-7,4).to_i
	  should be -1.

Fri May 23 20:22:44 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (reentrant_check): check reentrance via callcc.
	  [ruby-dev:34802]

Fri May 23 16:46:28 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c (proc_call): Remove an unused static function.

Fri May 23 13:46:09 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (cflags): commit miss.

Fri May 23 09:52:21 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (MINIRUBY), common.mk (RUBYOPT): add purelib.rb.
	  [ruby-core:16642]

	* ext/extmk.rb: load purelib.rb only when not cross compiling.

Fri May 23 08:47:02 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* error.c (syserr_eqq): === should be able to handle delegated
	  objects as well.

Fri May 23 04:22:19 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak.

	* ext/tk/lib/tk.rb: avoid trouble when finalize TclTkIp.

	* ext/tk/lib/tk.rb, ext/tk/lib/tk/*: help to fix troubles when
	  use Ttk widgets on old Tk scripts.

	* ext/tk/sample/*: update and add demo scripts. some of them are
	  introduction about new features of Tcl/Tk8.5.

Fri May 23 03:48:10 2008  Akinori MUSHA  <knu@iDaemons.org>

	* class.c (clone_method): Just use ruby_cref as cref.

Fri May 23 01:03:23 2008  Akinori MUSHA  <knu@iDaemons.org>

	* class.c (rb_singleton_class_clone): Pass Qnil, not 0.

Fri May 23 00:51:48 2008  Akinori MUSHA  <knu@iDaemons.org>

	* class.c (clone_method): Totally revamp the previous fix which
	  was incorrect.
	  (rb_mod_init_copy): Ditto.
	  (singleton_class_clone_int): Ditto.

Fri May 23 00:48:10 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_copy_node_scope), node.h: Rename from copy_node_scope
	  and export.

Thu May 22 21:24:15 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (top_local_setup): fixed memory leak bug based on a
	  patch from Roger Pack <rogerpack2005 at gmail.com> in
	  [ruby-core:16610].

Thu May 22 14:20:54 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (flatten): check if reentered.  [ruby-dev:34798]

Thu May 22 08:28:49 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (flatten): free memo hash table before raising exception.
	  [ruby-dev:34789]

Thu May 22 06:30:10 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* array.c (flatten): fix memory leak.

Thu May 22 05:45:30 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* proc.c (proc_dup): should copy safe_level from src proc
	  properly.  a patch from Keita Yamaguchi
	  <keita.yamaguchi at gmail.com>

Wed May 21 23:31:44 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_get_method_body, rb_alias, rb_eval): should not cache
	  uninitialized value, since search_method doesn't set origin if the
	  method wasn't found.

	* eval.c (search_method, remove_method, error_print, rb_alias)
	  (rb_eval, rb_rescue2, search_required, Init_eval, rb_thread_create),
	  gc.c (rb_source_filename, Init_stack), io.c (rb_io_getline),
	  parse.y (rb_id2name, rb_parser_free): suppress warnings.

Wed May 21 12:34:51 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_delete): rdoc fix based on a patch from Gaston Ramos
	  <ramos.gaston AT gmail.com>.  [ruby-core:16825]

Tue May 20 13:15:46 2008  Akinori MUSHA  <knu@iDaemons.org>

	* file.c (lchmod_internal): Remove a compiler warning.

Mon May 19 18:22:35 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): Fix the type
	  of md; pointed out by Takahiro Kambe <taca at back-street.net>
	  in [ruby-dev:34748].

Mon May 19 14:20:13 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): fixed SEGV on win32 with "% 0e" % 1.0/0.0.

Mon May 19 13:29:58 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (rb_f_system): set last_status when status == -1 because
	  there is no path to set it on win32. this patch is derived from
	  [ruby-core:16787], submitted by Luis Lavena <luislavena at gmail.com>

Mon May 19 13:01:05 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk ({MSPEC,RUBYSPEC}_GIT_URL): moved from Makefine.in.

	* {win32,bcc32}/Makefile.sub (update-rubyspec): added.

Mon May 19 11:53:45 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/openssl/openssl_missing.c (HMAC_CTX_copy): adopted
	  prototype change in openssl bundled with newer OpenBSD.
	  a patch from Takahiro Kambe <taca at back-street.net> in
	  [ruby-dev:34691].

Mon May 19 06:36:37 2008  Akinori MUSHA  <knu@iDaemons.org>

	* .: Release as Ruby 1.8.7-preview3.

Sun May 18 22:26:51 2008  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpservlet/filehandler.rb: should normalize path
	  name in path_info to prevent script disclosure vulnerability on
	  DOSISH filesystems. (fix: CVE-2008-1891)
	  Note: NTFS/FAT filesystem should not be published by the platforms
	  other than Windows. Pathname interpretation (including short
	  filename) is less than perfect.

	* lib/webrick/httpservlet/abstract.rb
	  (WEBrick::HTTPServlet::AbstracServlet#redirect_to_directory_uri):
	  should escape the value of Location: header.

	* lib/webrick/httpservlet/cgi_runner.rb: accept interpreter
	  command line arguments.

Sat May 17 23:53:57 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): fix for short file name on Cygwin.

Sat May 17 11:29:11 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_extname): first dot is not an extension name.

Sat May 17 10:18:44 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (rb_reg_search): need to free allocated buffer in re_register.

Fri May 16 17:01:44 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (test-rubyspec): added.

Fri May 16 16:22:40 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c: sometimes freeze when receive Interrupt signal.

Fri May 16 14:54:56 2008  Tanaka Akira  <akr@fsij.org>

	* Makefile.in (update-rubyspec): move rubyspec to srcdir. 
	  (test-rubyspec): ditto.

Fri May 16 14:25:22 2008  Tanaka Akira  <akr@fsij.org>

	* Makefile.in (test-rubyspec): use RUNRUBY.  suggested by nobu.

Fri May 16 13:01:43 2008  Tanaka Akira  <akr@fsij.org>

	* Makefile.in (update-rubyspec): new target to download rubyspec.
	  (test-rubyspec): new target to run rubyspec.  this doesn't work
	  before install.

Fri May 16 08:15:52 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: fix memory (object) leak bug.

	* ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb:
	  bug fix.

Thu May 15 17:00:22 2008  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (Init_String): Define #bytesize as an alias for #size
	  for compatibility with 1.9.

Thu May 15 15:33:59 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): support for alternative data stream
	  and ignored trailing garbages of NTFS.

	* file.c (rb_file_s_basename): ditto.

	* file.c (rb_file_s_extname): ditto.

Wed May 14 19:24:59 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_count): Override Enumerable#count for better
	  performance.
	  (rb_ary_nitems): Undo the backport.  Use #count {} instead.

	* enumerator.c (enumerator_iter_i): Remove an unused function.
	  (enumerator_with_index, enumerator_each): Remove unused
	  variables.

Wed May 14 17:15:11 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/tk/tkutil/extronf.rb: check stdndup() because it's not standard
	  function of C.

	* ext/tk/tkutil/tkutil.c (cbsubst_table_setup): use malloc() and
	  strncpy() instead of strndup() if not available.

Wed May 14 09:52:02 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys. 
	  Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still
	  not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g. 
	  :widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on; 
	  those are attributes of event object). It means that Ruby/Tk accepts
	  not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but 
	  also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }". 
	  It is potentially incompatible, when user passes symbols to the
	  arguments of the callback block (the block receives the symbols as
	  strings). I think that is very rare case (probably, used by Ruby/Tk
	  experts only). When causes such trouble, please give strings instead
	  of such symbol parameters (e.g. call Symbol#to_s method).

	* ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb, 
	  ext/tk/lib/tkextlib/blt/treeview.rb, 
	  ext/tk/lib/tkextlib/winico/winico.rb: ditto.

	* ext/tk/tkutil/tkutil.c: strings are available on subst_tables on 
	  TkUtil::CallbackSubst class (it is useful on Ruby 1.9). 

	* ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb, 
	  ext/tk/lib/tkextlib/iwidgets/spinner.rb, 
	  ext/tk/lib/tkextlib/iwidgets/entryfield.rb, 
	  ext/tk/lib/tkextlib/iwidgets/calendar.rb, 
	  ext/tk/lib/tkextlib/blt/dragdrop.rb, 
	  ext/tk/lib/tkextlib/tkDND/tkdnd.rb, 
	  ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, 
	  ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became 
	  unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c.

Tue May 13 15:10:50 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c: Update rdoc.
	  (enumerator_initialize): Discourage the use.
	  (enum_each_slice, enum_each_cons, enumerator_each)
	  (enumerator_with_index): Add a note about a call without a block.

	* NEWS: Intentionally omit enum_slice and enum_cons, which are
	  removed in 1.9.

Tue May 13 07:56:36 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_cat): fixed buffer overrun reported by
	  Christopher Thompson <cthompson at nexopia.com> in [ruby-core:16746]

Mon May 12 13:57:19 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (is_defined): add NODE_OP_ASGN_{OR,AND}.  "defined?(a||=1)"
	  should not operate assignment.  [ruby-dev:34645]

Mon May 12 12:59:23 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites arguemnt to
	  an invalid value.

	* ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom.

Mon May 12 12:36:55 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_select): backport from trunk.
	  [ruby-talk:300743]

Mon May 12 12:33:21 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (RUBYLIB, RUBYOPT): clear.

Mon May 12 10:41:10 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/delegate.rb (SimpleDelegator::dup): removed needless argument.
	  [ruby-list:44910]

	* lib/delegate.rb (clone, dup): keep relationship with the target
	  object.

Sun May 11 23:19:39 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (all_iter_i, any_iter_i): reduced duplicated code.

Sun May 11 17:57:36 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (MINIRUBY): should not include extension library path.

Sun May 11 10:36:10 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* eval.c (method_name, method_owner): New methods; backported
	  from 1.9. (UnboundMethod#name, UnboundMethod#owner)

Sun May 11 02:48:13 2008    <nagai@orca16.orcabay.ddo.jp>

	* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: fail to do pack/grid 
	  without options.

	* ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row.

Sat May 10 18:19:16 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_each_line): RDoc updated.  [ruby-dev:34586]

Sat May 10 13:17:56 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported
	  parameter patterns of configure method.

Sat May 10 09:16:13 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* util.c (ruby_strtod): backported from 1.9.  a patch from Satoshi
	  Nakagawa <psychs at limechat.net> in [ruby-dev:34625]. 
	  fixed: [ruby-dev:34623]

Fri May  9 23:33:25 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
	  pass the given block to methods of Tk::Wm module.

	* ext/tk/lib/tk/grid.rb: lack of module-method definitions.

	* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.

	* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8) 
	  characters for headings.

	* ext/tk/tcltklib.c: maybe a little more stable about @encoding value 
	  of TclTkIp object.

Wed May  7 08:46:44 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (rb_struct_s_def): to_str should be called only once.
	  [ruby-core:16647]

Wed May  7 00:54:25 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/zlib/zlib.c (gzreader_gets): may cause infinite loop.
	  a patch from Kouya <kouyataifu4 at gmail.com> in
	  [ruby-reference-manual:762].

Sun May  4 09:35:51 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* sample/erb/erb4html.rb (ERB4Html) : add example of ERB#set_eoutvar.
	  ERB4Html is an auto-quote ERB.

Sat May  3 22:52:48 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb, 
	  ext/tk/sample/ttk_wrapper.rb: improve treating and control themes. 
	  add Tk::Tile.themes and Tk::Tile.set_theme(theme).

Fri May  2 14:52:33 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el: move fontifying code from hook.  a patch from
	  Phil Hagelberg <phil at hagelb.org> in [ruby-core:16636].

Fri May  2 13:47:51 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (match_select): restore previous behavior of MatchData#select.
	  RDoc updated as well, mentioning the plan to remove this method
	  in the future.  [ruby-dev:34556]

Fri May  2 13:04:04 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/dbm/dbm.c (Init_dbm): defines DBM::VERSION even when
	  DB_VERSION_STRING is not available.  [ruby-dev:34569]

Thu May  1 23:57:06 2008  James Edward Gray II  <jeg2@ruby-lang.org>

	Merged 16257 from trunk.

	* lib/net/telnet.rb:  This patch from Brian Candler adds a FailEOF mode which
	  can be activated to have net/telnet raise EOFError exceptions when the 
	  remote connection is closed.  The default behavior remains unchanged though.

Thu May  1 23:43:21 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (range_step): check if step can be converted to an integer.
	  [ruby-dev:34558]

	* range.c (range_step): allow float step bigger than zero but less
	  than one.  [ruby-dev:34557]

Wed Apr 30 20:22:40 2008  James Edward Gray II  <jeg2@ruby-lang.org>

	Merged 16241 from trunk.

	* lib/net/telnet.rb:  Fixing a bug where line endings would not be properly
	  escaped when the two character ending was broken up into separate TCP
	  packets.  Issue reported and patched by Brian Candler.

Wed Apr 30 17:47:21 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (rb_reg_search): use local variable.  a patch from wanabe
	  <s.wanabe AT gmail.com> in [ruby-dev:34537].  [ruby-dev:34492]

Sat Apr 26 19:40:34 2008  Guy Decoux  <decoux@moulon.inra.fr>

	* class.c (struct clone_method_data): Add cref.
	  (clone_method): Properly handle NODE_BMETHOD and NODE_DMETHOD.
	  (rb_singleton_class_clone, singleton_class_clone_int): Set a
	  proper value to klass and propagate cref. [ruby-core:16238]

	* eval.c (rb_block_dup, rb_method_dup), intern.h: Add duplicator
	  methods for use from class.c#clone_method().

Fri Apr 25 15:46:37 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb, ext/tk/lib/tk/scrollbar.rb, ext/tk/lib/tk/scale.rb:
	  improve unknonw-option check when create a widget. 

	* ext/tk/lib/tkextlib/blt/unix_dnd.rb, ext/tk/lib/tkextlib/blt/ted.rb,
	  ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: bug fix on 'cget'.

	* ext/tk/lib/tk/menuspec.rb: option check will fail when 
	  TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ is true.

	* ext/tk/lib/tk/palette.rb: bug fix.

Fri Apr 25 12:37:54 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (flatten): returns an instance of same class.
	  [ruby-core:16554]

Thu Apr 24 23:47:50 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/net/pop.rb: backported from 1.9. bug#19003

	* ext/openssl/lib/openssl/ssl.rb: set_params; backported from 1.9.
	  bug#19552, [ruby-dev:34402]

	* ext/openssl/ossl_ssl.c: ditto.

	* test/openssl/test_ssl.rb: ditto.

Thu Apr 24 17:06:34 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (THREAD_SAVE_CONTEXT): remove unnecessary
	  FLUSH_REGISTER_WINDOWS before calling setjmp().  [ruby-core:16285]

Thu Apr 24 14:15:11 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dln.c (dln_find_1): prior files with extensions to files sans
	  extensions.  [ruby-core:16517]

Wed Apr 23 15:39:31 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (bind_eval): Add Binding#eval, a shorthand method for
	  eval(str, binding, ..); backported from 1.9.

Wed Apr 23 15:28:52 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create): failed
	  notice moved from comment to assertion message. [ruby-dev:29127]

Wed Apr 23 14:00:05 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/mkmf.rb (create_makefile): Add a missing dependency on the
	  target directory for each .rb file.  This will hopefully fix
	  parallel make (-jN).  Tested on FreeBSD.

Wed Apr 23 11:49:54 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#each, SortedSet#each, TC_Set#test_each): Return
	  an enumerator if no block is given.

Wed Apr 23 00:42:49 2008  Tanaka Akira  <akr@fsij.org>

	* eval.c (error_print): show full stack grace except SystemStackError.
	  backport from 1.9.  [ruby-dev:31014]

Wed Apr 23 00:18:45 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/test_symbol.rb (TestSymbol#test_to_proc): Improve
	  tests of Symbol#to_proc.

Tue Apr 22 22:43:05 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_proc_new, YIELD_FUNC_LAMBDA): Add a new nd_state
	  YIELD_FUNC_LAMBDA which avoids automatic `avalue' conversion for
	  arguments.  This fixes a bug where [1,[2,3]].map(&:object_id)
	  fails.

	* intern.h, object.c: Hide rb_proc_new() from intern.h.  It should
	  not be considered an official API function yet.

Tue Apr 22 21:24:32 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_proc_new): Turn the BLOCK_LAMBDA flag on.

	* object.c (sym_to_proc), test/ruby/test_symbol.rb: Add back
	  Symbol#to_proc, now that it passes the tests.

Tue Apr 22 19:35:03 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c (enumerator_initialize): Remove an undocumented
	  feature (passing a block to the constructor) that's broken.
	  This is not what I intended.

Tue Apr 22 17:49:46 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): should protect temporary string from
	  GC.   [ruby-dev:34480]

Tue Apr 22 17:12:05 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* regex.c (re_search): string might be NULL.  [ruby-core:16478]

Tue Apr 22 16:44:00 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* object.c (rb_obj_tap): Correct documentation; pointed out by
	  okkez in [ruby-dev:34472].

Tue Apr 22 10:05:51 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (eaccess): workaround for recent msvcrt's behavior.
	  [ruby-core:16460]

Mon Apr 21 16:06:47 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* enumerator.c (enumerator_init): preserve the method name in ID.

	* enumerator.c (enumerator_each): need not to call rb_to_id().

	* enumerator.c (enumerator_with_index): ditto.

Mon Apr 21 17:19:52 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_f_method_name): New gloval function: __method__;
	  backported from matzruby / 1.9.

	* eval.c (rb_frame_this_func), intern.h: New internal function.

	* intern.h (RETURN_ENUMERATOR): Use rb_frame_this_func() instead
	  of rb_frame_last_func(), to accommodate the behavior to that of
	  1.9.

Mon Apr 21 15:54:48 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/tempfile.rb (Tempfile::_close): check @data before modifying
	  it; backported from 1.9.  [ruby-dev:34094]

	* lib/tempfile.rb (Tempfile::close): clear @data and @tmpname.

Mon Apr 21 10:17:17 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* time.c: should include <errno.h> to refer errno.

Mon Apr 21 10:02:43 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* hash.c (recursive_hash): prototype.

Mon Apr 21 10:00:51 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* time.c (rb_strftime): check errno to detect strftime(3)'s error.
	  this is workaround for recent version of MSVCRT.
	  [ruby-dev:34456]

Sun Apr 20 21:10:04 2008  Akinori MUSHA  <knu@iDaemons.org>

	* .: Release as Ruby 1.8.7-preview2.

Sun Apr 20 21:02:06 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c: Resolve the method every time an enumeration
	  method is run, not once when the enumerator is initialized as it
	  was before, so that method_missing() and method (re)definition
	  afterwards are both in effect; pointed out in: [ruby-core:16441]

Sun Apr 20 17:59:25 2008  Akinori MUSHA  <knu@iDaemons.org>

	* object.c, NEWS, test/ruby/test_symbol.rb: Revert Symbol#to_proc
	  since it does not pass the tests.

Sun Apr 20 14:29:35 2008  Technorama Ltd.  <oss-ruby@technorama.net>

	* ext/openssl/ossl_ssl.c: initialize session class.

Sat Apr 19 20:54:42 2008  akira yamada  <akira@arika.org>

	* lib/uri/ftp.rb, lib/uri/generic.rb, test/uri/test_common.rb,
	  test/uri/test_ftp.rb, test/uri/test_generic.rb: backported from 1.9.
	  [ruby-dev:31318]

Sat Apr 19 20:35:02 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/yaml/baseemitter.rb, lib/yaml/encoding.rb: performance
	  tuning around String#gsub.

	* lib/yaml/tag.rb: Replace nodoc with stopdoc so Module methods get
	  documented.

	* lib/yaml/store.rb (YAML::load): modified to support empty
	  database.

	* lib/yaml/store.rb (YAML::Store::marshal_dump_supports_canonical_option?):
	  add a method to support faster PStore.

Sat Apr 19 20:16:52 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit;
	  merged from 1.9.

	* lib/yaml.rb (quick_emit): use combination of object_id and hash to
	  identify repeated object references, since GC will reuse memory of
	  objects during output of YAML. [ruby-Bugs-8548] [ruby-Bugs-3698];
	  merged from 1.9.

Sat Apr 19 20:05:39 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_equal, rb_ary_eql, rb_ary_hash, rb_ary_cmp):
	  Make Array#eql?, #hash, #== and #<=> use rb_exec_recursive() and
	  handle recursive data properly.

	* hash.c (hash_equal, rb_hash_hash): Make Hash#eql?, #hash and #==
	  use rb_exec_recursive() and handle recursive data properly.

Sat Apr 19 19:26:09 2008  Akinori MUSHA  <knu@iDaemons.org>

	* intern.h, eval.c (rb_exec_recursive): New internal function to
	  help perform recursive operation; backported from 1.9.

Sat Apr 19 18:42:04 2008  Akinori MUSHA  <knu@iDaemons.org>

	* intern.h, hash.c (rb_hash_lookup): New internal function to
	  check if a key exists in a hash, ignoring #default; backported
	  from 1.9.

Fri Apr 18 18:56:57 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syck/rubyext.c (syck_genericresolver_node_import): should
	  not set instance variable "@kind" before initializing it.
	  [ruby-dev:32677]

	* ext/syck/rubyext.c (syck_resolver_initialize,
	  syck_resolver_detect_implicit, syck_emitter_emit): remove unused
	  variables.

Fri Apr 18 18:54:57 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syck/rubyext.c: Node#value defined twice.

	* lib/yaml/: several method redefinitions causing warnings.

Fri Apr 18 16:36:16 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/rexml/node.rb (REXML::Node::indent): should initialize rv
	  variable.  a patch from Tadayoshi Funaba <tadf AT dotrb.org> in 
	  [ruby-dev:32783].

Fri Apr 18 16:01:37 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/rexml: Merge fixes since 1.8.6 made solely on the ruby_1_8_6
	  branch.

Wed Apr 16 06:11:49 2008  Akinori MUSHA  <knu@iDaemons.org>

	* test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_event):
	  Fix tests to reflect the following changes: r15833, r15759.

Wed Apr 16 05:03:48 2008  Akinori MUSHA  <knu@iDaemons.org>

	* .: Release as Ruby 1.8.7-preview1.

Wed Apr 16 02:09:14 2008  Kouhei Sutou  <kou@cozmixng.org>

	* lib/xmlrpc/client.rb: fix cookie handling. [ruby-dev:34403]

	* test/xmlrpc/test_cookie.rb: add a test for the above fix.

Tue Apr 15 23:48:28 2008  Akinori MUSHA  <knu@iDaemons.org>

	* version.h: Branch off ruby_1_8_7 from ruby_1_8 in preparation
	  for the forthcoming 1.8.7 release.

Tue Apr 15 23:40:39 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syck/rubyext.c (rb_syck_mktime): Avoid buffer overflow.

Tue Apr 15 20:32:03 2008  Tanaka Akira  <akr@fsij.org>

	* re.c (match_inspect): backported from 1.9.

Tue Apr 15 19:03:28 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* eval.c (method_receiver, method_name, method_owner): New
	  methods; backported from 1.9. bug#19007

Tue Apr 15 18:39:14 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/uri.rb, lib/uri/ldaps.rb: added LDAPS
	  scheme; backported from 1.9. bug#19015, [ruby-dev:31896]

Tue Apr 15 17:45:43 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/net/smtp.rb: backported from 1.9. bug#19003

Tue Apr 15 17:06:12 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/test_symbol.rb (TestSymbol#test_to_proc): add tests.

Tue Apr 15 16:58:55 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/menuspec.rb: option check will fail when 
	  TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ is true.

	* ext/tk/lib/tk/palette.rb: bug fix.

Tue Apr 15 16:47:48 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* signal.c, gc.c: New methods: GC.stress, GC.stress=;
	  backported from 1.9. a patch from Tadashi Saito
	  in [ruby-dev:34394] and bug#19000

Tue Apr 15 12:35:44 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* rubyio.h (rb_io_t): renamed from OpenFile.

	* ruby.h (struct RHash), file.c, gc.c, io.c, ext/dl/dl.c,
	  ext/io/wait/wait.c, ext/pty/pty.c, ext/readline/readline.c,
	  ext/socket/socket.c: ditto.

	* win32/win32.h: removed workaround for OpenFile.

Tue Apr 15 00:15:29 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/text.rb: typo. call a wrong method.

	* ext/tk/lib/tk/itemconfig.rb: ditto.

	* ext/tk/sample/ttk_wrapper.rb: bug fix.

	* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.

	* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb: 
	  support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.

	* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb, 
	  ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, 
	  ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix. 

	* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.

	* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the 
	  procedure which called at end of the timer.

Mon Apr 14 19:54:21 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_flatten, rb_ary_flatten_bang): Take an optional
	  argument that determines the level of recursion to flatten;
	  backported from 1.9.

	* array.c (rb_ary_shuffle_bang, rb_ary_shuffle, rb_ary_choice,
	  rb_ary_cycle, rb_ary_permutation, rb_ary_combination,
	  rb_ary_product, rb_ary_take, rb_ary_take_while, rb_ary_drop,
	  rb_ary_drop_while): New methods: Array#shuffle, #shuffle!,
	  #choice, #cycle, #permutation, #combination, #product, #take,
	  #take_while, #drop, #drop_while; backported from 1.9.

Mon Apr 14 19:52:35 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ruby.h: New macro: RB_GC_GUARD().

Mon Apr 14 19:49:35 2008  Akinori MUSHA  <knu@iDaemons.org>

	* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.

	* string.c (rb_str_tmp_new), intern.h: New function.

Mon Apr 14 19:18:55 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enum.c (inject_i, inject_op_i): prototype.

Mon Apr 14 19:10:47 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enum.c New methods: Enumerable#take, #take_while, #drop and
	  #drop_while; backported from 1.9.

Mon Apr 14 18:50:15 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enum.c: New methods: Enumerable#one?, #none?, #minmax, #min_by,
	  #max_by, #minmax_by and #cycle; backported from 1.9.

	* enum.c (enum_find_index): Add support for find_index(obj);
	  [ruby-dev:34313]; backported from 1.9.

	* enum.c (enum_inject): Add support for Enumerable#inject(:binop);
	  backported from 1.9.

	* enum.c: Alias Enumerable#reject to #inject; backported from 1.9.

Mon Apr 14 18:14:19 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enum.c (enum_find, enum_reject): Return an enumerator if no
	  block is given; backported from 1.9.

	* io.c (rb_io_each_line, rb_io_each_byte, rb_io_s_foreach,
	  argf_each_line, argf_each_byte): Ditto.

	* string.c (str_gsub): Ditto.

Mon Apr 14 18:10:05 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enum.c (find_index_i, find_index_iter_i): add prototype for VC.

Mon Apr 14 17:55:30 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_collect_bang, rb_ary_select): Return an
	  enumerator if no block is given; backported from 1.9.

	* dir.c (dir_each, dir_foreach): Ditto.

	* enum.c (enum_partition, enum_sort_by): Ditto.

	* gc.c (os_each_obj): Ditto.

	* hash.c (rb_hash_delete_if, rb_hash_reject_bang, rb_hash_select,
	  rb_hash_each_value, rb_hash_each_key, rb_hash_each_pair,
	  env_each_key, env_each_value, env_each, env_each_pair,
	  env_reject_bang, env_delete_if, env_select): Ditto.

	* numeric.c (num_step, int_upto, int_downto, int_dotimes): Ditto.

Mon Apr 14 16:42:53 2008  Akinori MUSHA  <knu@iDaemons.org>

	* ruby.h (rb_block_call_func): Fix prototype.

	* enumerator.c (enumerator_iter_i, enumerator_each_i): Ditto.

Mon Apr 14 15:49:05 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enum.c (enum_count, enum_find_index): New methods:
	  Enumerable#count and #find_index; backported from 1.9.

Mon Apr 14 14:16:08 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enumerator.c (enumerator_mark, enumerator_iter_i, enumerator_each_i,
	  enumerator_allocate): add prototype.

	* enumerator.c (enumerator_each_i): declare unused two arguments.

Mon Apr 14 13:58:32 2008  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_each_char): New methods: String#chars and
	  #each_char; backported from 1.9.

Mon Apr 14 13:42:20 2008  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_each_line, rb_str_each_byte): Reflect
	  enumerator integration.  #lines and #bytes are now aliases to
	  #each_line and #each_byte, respectively.

Mon Apr 14 13:19:36 2008  Akinori MUSHA  <knu@iDaemons.org>

	* range.c (range_each, range_step): Return an enumerator if no
	  block is given; backported from 1.9.

	* struct.c (rb_struct_each, rb_struct_each_pair): Ditto.

Mon Apr 14 13:07:59 2008  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_partition, rb_str_rpartition,
	  rb_str_start_with, rb_str_end_with): New methods:
	  String#partition, #rpartition, #start_with? and #end_with?;
	  backported from 1.9.  These methods are $KCODE aware unlike
	  #index, #rindex and #include?.

Sun Apr 13 15:55:52 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* object.c (sym_to_proc): new method Symbol#to_proc; backported
	  from 1.9. bug#19012

Fri Apr 11 19:14:30 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* object.c (rb_obj_tap): new method Object#tap; backported from
	  1.9. bug#19008

Fri Apr 11 18:58:09 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* process.c: new method Process.exec; backported from 1.9. bug#19006

Fri Apr 11 12:43:56 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb, 
	  ext/tk/sample/tkextlib/tile/demo.rb: previous patch is not complete.

Fri Apr 11 10:22:54 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkextlib/tile.rb:
	  __define_LoadImages_proc_for_compatibility__! do nothing when the 
	  Tcl command exists.

	* ext/tk/lib/tkextlib/tile/style.rb:
	  __define_wrapper_proc_for_compatibility__! do nothing when the Tcl
	  command exists.

	* ext/tk/sample/tkextlib/tile/demo.rb: don't create 'step' theme if 
	  it already exists.

Fri Apr 11 08:05:12 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_object): add volatile to avoid potential GC bug.  a
	  patch from Tomoyuki Chikanaga <chikanag at nippon-control-system.co.jp>
	  in [ruby-dev:34311].

Thu Apr 10 20:29:13 2008  Akinori MUSHA  <knu@iDaemons.org>

	* misc/rdebug.el, misc/README: Remove rdebug.el as per request
	  from the maintainer and mention the ruby-debug project at
	  RubyForge in README; bug#19043.

Thu Apr 10 20:08:37 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enum.c (enum_first, enum_group_by): New methods:
	  Enumerable#first and #group_by; backported from 1.9.

Thu Apr 10 19:49:10 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c (rb_eStopIteration), eval.c (rb_f_loop), ruby.h:
	  Add a new exception class StopIteration, which breaks Kernel#loop
	  iteration when raised; backported from 1.9.

	* enumerator.c (enumerator_next, enumerator_rewind): Implement
	  #next and #rewind using the "generator" library.

	* lib/generator.rb: Implement Enumerable::Enumerator#next and
	  #rewind.

Thu Apr 10 19:29:48 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_first, rb_ary_last): Return a shared array when
	  possible.

	* array.c (rb_ary_pop, rb_ary_pop_m, rb_ary_shift, rb_ary_shift_m):
	  Array#pop and Array#shift can take an optional argument
	  specifying the number of elements to remove and return;
	  backported from 1.9.

Thu Apr 10 14:00:44 2008  Tanaka Akira  <akr@fsij.org>

	* lib/resolv.rb (Resolv::DNS#each_address): backport from 1.9 for
	  CNAME.  [ruby-dev:34200]

Thu Apr 10 01:42:25 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* enum.c (iterate_method): add prototype to avoid warning on VC++.

Wed Apr  9 23:12:41 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled.

	* ext/tk/tcltklib.c: avoid error on a shared object.

	* ext/tk/extconf.rb: support --with-tcltkversion

	* ext/tk/README.tcltklib: add document about --with-tcltkversion

	* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget, 
	  ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb, 
	  ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb: 
	  bug fix.

Wed Apr  9 21:54:45 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_pop): Do not reallocate too often; backported
	  from 1.9.

Wed Apr  9 21:13:05 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_each, rb_ary_each_index, rb_ary_reverse_each,
	  rb_ary_reject, rb_ary_reject_bang): Array#each, #each_index,
	  #reverse_each, #reject, #reject! and #delete_if return an
	  enumerator if no block is given; backported from 1.9.

Wed Apr  9 20:47:16 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_index, rb_ary_index): Array#index and #rindex
	  can take a block instead of an argument; backported from 1.9.

Wed Apr  9 19:58:31 2008  Akinori MUSHA  <knu@iDaemons.org>

	* enumerator.c, inits.c (rb_call_inits), ruby.h, intern.h,
	  ext/enumerator, common.mk (OBJS, enumerator.$(OBJEXT)): Make the
	  enumerator module built-in.

	* enumerator.c: New method: Enumerable::Enumerator#with_index.

	* enum.c (enum_each_with_index): Enumerable#each_with_index now
	  returns an enumerator instead of raising an exception if no
	  block is given.  Enumerable#enum_with_index, formerly defined in
	  the enumerator module, is kept as an alias to each_with_index
	  for backward compatibility.

Wed Apr  9 19:43:51 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_obj_method, rb_proc_call), intern.h: Export.

Tue Apr  8 11:11:28 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (EXEC_TAG): remove unnecessary FLUSH_REGISTER_WINDOWS for
	  better performance on SPARC.  [ruby-core:16159]

Tue Apr  8 10:49:54 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (rb_reg_quote): should always copy the quoting string.
	  [ruby-core:16235]

Mon Apr  7 21:35:08 2008  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_nitems): Backport Array#nitems with a block;
	  suggested by Bertram Scharpf <lists@bertram-scharpf.de> in
	  [ruby-talk:134083].

Sun Apr  6 09:45:00 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_tell): check if closed.  [ruby-core:16223]

Sat Apr  5 10:05:00 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_check_to_integer): backported for range_step.

Fri Apr  4 05:57:11 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/net/pop.rb (Net::POP3::do_finish): clear @n_mails and
	  @n_bytes as well.  [ruby-core:16144]

Fri Apr  4 02:17:06 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* range.c (range_step): should not round step into integer if
	  begin and end are numeric.  [ruby-core:15990]

Tue Apr  1 14:43:38 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: get rid of empty expansion.

	* {bcc,win}32/Makefile (config.h): need to define RUBY_SETJMP, etc.

Tue Apr  1 11:36:19 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: _setjmp is available but _longjmp is not on mingw.

Tue Apr  1 03:20:40 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_SETJMP, RUBY_LONGJMP, RUBY_JMP_BUF): prefers
	  _setjmp over setjmp and sigsetjmp.  [ruby-core:16023]
	  __builtin_setjmp cannot handle a variable.

	* configure.in (--with-setjmp-type): new option to override the
	  default rule in the above.

	* eval_intern.h (ruby_setjmp, ruby_longjmp), gc.c (rb_setjmp),
	  vm_core.h (rb_jmpbuf_t): use RUBY_SETJMP, RUBY_LONGJMP and
	  RUBY_JMP_BUF.

Tue Apr  1 01:55:52 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::Config.default_config_hash): requires
	  win32/resolv to use Win32::Resolv.  [ruby-dev:34138]

Mon Mar 31 14:51:11 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_div): Bignum#div should return integer for
	  floating number operand.

Sun Mar 30 07:00:32 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tk/tcltklib.c: rb_hash_lookup has not been backported yet.

Sat Mar 29 14:18:41 2008  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5.

	* ext/tk/lib/tkextlib/tile.rb: [incompatible] remove TileWidgets' 
	  instate/state/identify method to avoid the conflict with standard
	  widget options. Those methods are renamed to ttk_instate/ttk_state/
	  ttk_identify (tile_instate/tile_state/tile_identify are available 
	  too). Although I don't recommend, if you realy need old methods, 
	  please define "Tk::USE_OBSOLETE_TILE_STATE_METHOD = true" before 
	  "require 'tkextlib/tile'".

	* ext/tk/lib/tkextlib/tile.rb: "Tk::Tile::__Import_Tile_Widgets__!"
	  is obsolete. It outputs warning. To control default widget set, 
	  use "Tk.default_widget_set = :Ttk".

	* ext/tk/lib/tk.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ method and 
	  __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method are defind 
	  as module methods of TkConfigMethod. It may help users to wrap old 
	  Ruby/Tk scripts (use standard widgets) to force to use Ttk widgets.
	  Ttk widgets don't have some options of standard widgets which are 
	  control the view of widgets. When set ignore-mode true, configure 
	  method tries to ignoure such unknown options with no exception. 
	  Of course, it may raise other troubles on the GUI design. 
	  So, those are a little danger methods. 

	* ext/tk/lib/tk/itemconfig.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ 
	  method and __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method 
	  are defind as module methods of TkItemConfigMethod as the same 
	  purpose as TkConfigMethod's ones.

	* ext/tk/sample/ttk_wrapper.rb: A new example. This is a tool for 
	  wrapping old Ruby/Tk scripts (which use standard widgets) to use 
	  Ttk (Tile) widgets as default.

	* ext/tk/sample/tkextlib/tile/demo.rb: use ttk_instate/ttk_state 
	  method instead of instate/state method.

	* ext/tk/lib/tk/root, ext/tk/lib/tk/namespace.rb,
	  ext/tk/lib/tk/text.rb, ext/tk/lib/tkextlib/*: some 'instance_eval's  
	  are replaced to "instance_exec(self)".

	* ext/tk/lib/tk/event.rb: bug fix on KEY_TBL and PROC_TBL (?x is not 
	  a character code on Ruby1.9).

	* ext/tk/lib/tk/variable.rb: support new style of operation argument 
	  on Tcl/Tk's 'trace' command for variables. 

	* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget: bug fix

	* ext/tk/sammple/demos-jp/textpeer.rb, 
	  ext/tk/sammple/demos-en/textpeer.rb: new widget demo.

	* ext/tk/tcltklib.c: decrase SEGV troubles (probably)

	* ext/tk/lib/tk.rb: remove Thread.critical access if Ruby1.9

	* ext/tk/lib/tk/multi-tk.rb: support Ruby1.9 (probably)

	* ext/tk/lib/tkextlib/tile.rb: add method to define Tcl/Tk command 
	  to make Tcl/Tk theme sources (based on different version of Tile 
	  extension) available. 
	  (Tk::Tile::__define_LoadImages_proc_for_comaptibility__)

	* ext/tk/lib/tk.rb, ext/tk/lib/tk/wm.rb: support dockable frames
	  (Tcl/Tk8.5 feature). 'wm' command can treat many kinds of widgets 
	  as toplevel widgets.

	* ext/tk/lib/tkextlib/tile/style.rb: ditto.
	  (Tk::Tile::Style.__define_wrapper_proc_for_compatibility__)

	* ext/tk/lib/tk/font.rb: add actual_hash and metrics_hash to get 
	  properties as a hash. metrics_hash method returns a boolean value 
	  for 'fixed' option. But metrics method returns numeric value 
	  (0 or 1) for 'fixed' option, because of backward compatibility. 

	* ext/tk/lib/tk/timer.rb: somtimes fail to set callback procedure.

	* ext/tk/lib/tk.rb: add Tk.sleep and Tk.wakeup method. Tk.sleep 
	  doesn't block the eventloop. It will be better to use the method 
	  in event callbacks.

	* ext/tk/sample/tksleep_sample.rb: sample script about Tk.sleep.

Sat Mar 29 04:08:59 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* class.c (clone_method): should copy cref as well.
	  [ruby-core:15833]

Mon Mar 24 20:07:42 2008  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (rb_eval): Call trace hook for if expression after the
	  condition has been evaluated, not before; submitted by Rocky
	  Bernstein in #18722.

Mon Mar 24 19:44:53 2008  Akinori MUSHA  <knu@iDaemons.org>

	* parse.y (yycompile): Always prepare a new array for each file's
	  SCRIPT_LINES__ storage, instead of appending source lines every
	  time a file is re-loaded; submitted by Rocky Bernstein in
	  #18517.

Mon Mar 24 10:25:54 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: sitearch should use target_cpu.  [ruby-core:15986]

Mon Mar 24 01:24:24 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb (result): use proc instead of Thread. [ruby-dev:33692]

Fri Mar 21 21:26:52 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv.rb (Resolv::Hosts): should not use win32/resolv on cygwin.
	  [ruby-dev:29945], [ruby-dev:34095]

	* lib/win32/registry.rb (Win32::Registry.expand_environ): try upcased
	  name too for cygwin.  [ruby-dev:29945]

	* lib/win32/resolv.rb (Win32::Resolv.get_hosts_path): use expand_path.

Fri Mar 21 21:10:00 2008  Akinori MUSHA  <knu@iDaemons.org>

	* lib/ipaddr.rb: Say that I am the current maintainer.

	* lib/set.rb: Ditto.

	* lib/shellwords.rb: Ditto.

	* ext/syslog/syslog.txt: Ditto.

Fri Mar 21 09:24:28 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* instruby.rb (open_for_install): write block result and rewrite only
	  if changed from existing file.

Wed Mar 19 21:01:08 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (dir_inspect, dir_path, dir_tell): check for frozen and closed
	  is not needed.  [ruby-dev:32640]

Wed Mar 19 20:25:40 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (Init_Dir): define inspect method.  [ruby-core:15960]

Wed Mar 19 14:59:12 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-style.el (ruby-style-{case,label}-indent): fix for labels
	  inside blocks in switch and function top level.

Wed Mar 19 14:36:40 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_cstr_to_inum): treat successive underscores as
	  nondigit.  [ruby-dev:34089]

Wed Mar 19 00:01:23 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb (ERB::Compiler): Make some minor code optimization.

Mon Mar 17 17:11:13 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-mode): should use `run-mode-hooks' instead
	  of calling `run-hooks' directly to run the mode hook.  patch from
	  Chiyuan Zhang <pluskid AT gmail.com> in [ruby-core:15915]

Mon Mar 17 16:41:08 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: unset GREP_OPTIONS.  [ruby-core:15918]

Fri Mar 14 16:59:23 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_LIB_PREFIX): fix for prefix.

Fri Mar 14 16:35:11 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::Cookie::initialize): performance patch from
	  Makoto Kuwata <kwa@kuwata-lab.com> in [ruby-dev:34048].

Fri Mar 14 15:49:05 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_LIB_PREFIX): use libdir.

Fri Mar 14 10:12:29 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_CHECK_VARTYPE): should not indent preprocessor
	  directives.

Thu Mar 13 00:37:20 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_call0): yields the last executed node line number at
	  return event.  [ruby-core:15855]

Wed Mar 12 02:12:20 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/delegate.rb: check $@ to avoid NoMethodError.

Tue Mar 11 19:48:09 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (fix_coerce): try conversion before type check.
	  [ruby-core:15838]

Tue Mar 11 17:03:23 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/delegate.rb (Delegator#initialize, DelegateClass): skip correct
	  backtrace.  [ruby-dev:34019]

Tue Mar 11 16:43:53 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_cmdvector): terminate shrunken command line.

Tue Mar 11 12:39:03 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (clean-local): removes MINOBJS.

Sat Mar  8 18:50:57 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (isdirsep): backslash is valid path separator on cygwin too.

Fri Mar  7 19:56:10 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: rdoc added.  [ruby-Patches-9762]

Thu Mar  6 15:10:21 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32}/Makefile.sub (RUNRUBY): use $(PROGRAM) instead of
	  ruby$(EXEEXT).
	  suggested by KIMURA Koichi <kimura.koichi at canon.co.jp>.
	  [ruby-dev:34000]

Thu Mar  6 12:15:06 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (opt_block_param): command can start just after block param
	  definition.  [ruby-list:44479]

Thu Mar  6 00:34:11 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb: update RDoc. Thanks Makoto Kuwata [ruby-dev:33702]

Mon Mar  3 23:28:34 2008  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpservlet/filehandler.rb: should normalize path
	  separators in path_info to prevent directory traversal attacks
	  on DOSISH platforms.
	  reported by Digital Security Research Group [DSECRG-08-026].

	* lib/webrick/httpservlet/filehandler.rb: pathnames which have
	  not to be published should be checked case-insensitively.

Mon Mar  3 16:14:24 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_any_hash): shrinks all results in Fixnum range.
	  [ruby-core:15713]

Sat Mar  1 02:35:08 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (big2str_find_n1): check integer overflow.

Tue Feb 26 16:06:00 2008  Technorama Ltd.  <oss-ruby@technorama.net>

	* ext/openssl/ossl_pkey_{ec,dh,dsa,rsa}.c: Remove useless warnings.

	* ext/openssl/ossl_asn1.c: Simplify code.

	* ext/openssl/ossl_ssl_session.c Fix compiler warnings.
	  Undefine #id if SSL_SESSION_get_id is not supported.

Tue Feb 26 15:43:42 2008  Tanaka Akira  <akr@fsij.org>

	* parse.y (tokadd_escape): refactored.  [ruby-core:15657]

Mon Feb 25 17:30:29 2008  Technorama Ltd.  <oss-ruby@technorama.net>

	* ext/openssl/digest.c ext/openssl/lib/openssl/digest.rb:
	  Commit patch #9280 from Akinori MUSHA.
	  Simplify the OpenSSL::Digest class and make use of the
	  existing Digest framework.
	  Enhance performance.

Mon Feb 25 13:40:03 2008  Tanaka Akira  <akr@fsij.org>

	* process.c (Init_process): share bignum objects for RLIM_INFINITY,
	  RLIM_SAVED_MAX and RLIM_SAVED_CUR if they are equal.

Sun Feb 24 23:29:48 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk, {bcc,win}32/Makefile.sub (clean-local): remove
	  intermediate files.

Sun Feb 24 03:52:58 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (valid_filename): use O_EXCL to get rid of clobbering
	  existing files in race conditions.

Fri Feb 22 19:50:19 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (BIGZEROP): fix for longer Bignum zeros.  [ruby-Bugs-17454]

Fri Feb 22 16:09:53 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_lshift, rb_big_rshift, rb_big_aref): removed excess
	  arguments.

Thu Feb 21 00:01:34 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RPATHFLAG): -R option of HP-UX ld is not for runtime
	  load path.  [ruby-list:44600]

Wed Feb 20 23:55:19 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_map_errno): exported.

Wed Feb 20 13:08:52 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* instruby.rb (parse_args): added --dir-mode, --script-mode and
	  --cmd-type options.  [ruby-dev:33816]

	* instruby.rb (parse_args): added bin-arch and bin-comm to install
	  type, for compiled files and script files.

	* instruby.rb (parse_args): deal with make style command line macros,
	  and count as long syle options if prefixed with INSTALL_.

	* instruby.rb (makedirs): use $dir_mode.  [ruby-dev:33805]

	* instruby.rb (open_for_install): set file mode, which is now
	  permission mode instead of access mode.

	* instruby.rb (bin-comm): installs scripts with replacing shebang
	  lines.

Tue Feb 19 18:34:32 2008  Tanaka Akira  <akr@fsij.org>

	* gc.c (STACK_LENGTH) [SPARC] : 0x80 offset removed.  [ruby-dev:33857]

Tue Feb 19 14:27:32 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/readline.c (readline_event): prevent polling.  based on
	  a patch from error errorsson in [ruby-Bugs-17675].

Tue Feb 19 12:08:29 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yycompile): clear ruby_eval_tree_begin if parse failed.

Mon Feb 18 16:23:45 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yycompile): clear ruby_eval_tree_begin too before parse.

Mon Feb 18 10:17:42 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/pty/lib/expect.rb (IO#expect): check if peer is closed.
	  [ruby-Bugs-17940]

Fri Feb 15 20:37:06 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/rational.rb (floor, ceil, truncate, round): do not use
	  definitions of Numeric.

	* lib/rational.rb (to_i): should returns truncated self.

	* lib/complex.rb (numerator): requires
	  Integer#{numerator,denominator}.

	* lib/complex.rb (quo): do not use definition of Numeric.

	* lib/complex.rb (div, divmod, floor, ceil, truncate, round):
	  undef'ed.

Fri Feb 15 15:23:12 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (iconv_convert): check upper bound.  a patch from
	  Daniel Luz at [ruby-Bugs-17910].

Fri Feb 15 02:42:25 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ftruncate): check if available.

	* file.c (rb_file_truncate): check if ftruncate instead of truncate.

Fri Feb 15 02:40:54 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (sigsetmask): check when signal semantics is not POSIX.

	* signal.c (USE_TRAP_MASK): set true if sigprocmask or sigsetmask is
	  available.

Thu Feb 14 17:44:32 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/dl/ptr.c (dlmem_each_i): typo fixed.  a patch from IKOMA
	  Yoshiki <ikoma AT mb.i-chubu.ne.jp> in [ruby-dev:33776].

Thu Feb 14 16:02:51 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_utime): inhibits with secure level 2 or higher.

Thu Feb 14 01:43:16 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/timeout.rb (Timeout::timeout): made sensitive to location on the
	  stack.  [ruby-core:15458]

Thu Feb 14 00:49:53 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (INSTRUBY_ARGS): pass mode to install.  [ruby-dev:33766]

	* instruby.rb (parse_args): added --data-mode and --prog-mode options.

Tue Feb 12 11:33:26 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/erb/test_erb.rb(TestERBCore): import from erb-2.0.4.

	* test/erb/hello.erb: ditto

Mon Feb 11 17:25:21 2008  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb (RSS::VERSION), test/rss/test_version.rb, NEWS:
	  0.2.3 -> 0.2.4.

	* lib/rss/maker.rb, lib/rss/maker/, test/rss/test_maker_2.0.rb:
	  fixed a bug that RSS::Maker.make("0.9")'s item doesn't make some
	  elements if description is missed.
	  Reported by Michael Auzenne. Thanks!!!

	* lib/rss/maker/0.9.rb, test/rss/test_maker_0.9.rb:
	  RSS::Maker.make("0.9") generates RSS 0.92 not RSS 0.91.

Mon Feb 11 16:57:00 2008  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* ChangeLog: format-time-string under C locale. [ruby-dev:33261]

Mon Feb 11 16:31:47 2008  URABE Shyouhei  <shyouhei@ice.uec.ac.jp>

	* gc.c (rb_newobj): prohibit call of rb_newobj() during gc.
	  Submitted by Sylvain Joyeux [ruby-core:12099].

	* ext/dl/ptr.c: do not use LONG2NUM() inside dlptr_free().
	  Slightly modified fix bassed on a patch by Sylvain Joyeux
	  [ruby-core:12099] [ ruby-bugs-11859 ] [ ruby-bugs-11882 ]
	  [ ruby-patches-13151 ].

Mon Feb 11 00:22:55 2008  NARUSE, Yui  <naruse@ruby-lang.org>

	* lib/benchmark.rb (Job::Benchmark#item): fix typo.

Sat Feb  9 23:22:52 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/extconf.rb: simplified the condition.

Sat Feb  9 17:51:24 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use strtod() for more
	  precision.  [ruby-talk:290296]

	* ext/bigdecimal/bigdecimal.c (BASE_FIG): made constant.

	* ext/bigdecimal/extconf.rb: ditto.  [ruby-dev:33658]

Sat Feb  9 00:44:52 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/irb.rb (IRB::Irb::eval_input): rescues Interrupt and other than
	  SystemExit and SignalException.  [ruby-core:15359]

Fri Feb  8 15:09:21 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (xsystem): expand macros like as make.

Tue Feb  5 11:14:11 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR.

	* lib/mkmf.rb (install_files): rejects files matching to
	  $NONINSTALLFILES.

	* lib/mkmf.rb (init_mkmf): defaults $NONINSTALLFILES to backup and
	  temporary filse.

Mon Feb  4 16:44:24 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (darwin): NSIG is not defined if _XOPEN_SOURCE > 500L.
	  [ruby-dev:33584]

Sat Feb  2 20:06:42 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/benchmark.rb (Benchmark::realtime): make Benchmark#realtime
	  a bit faster.  a patch from Alexander Dymo <dymo AT ukrpost.ua> in
	  [ruby-core:15337].

Sat Feb  2 09:53:39 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (darwin): disabled fat-binary support which confuses
	  configure much, since ``universal'' implies hidden cross-compiling.
	  TODO: ruby and libruby.bundle might be possible to bound with `lipo'
	  after builds for each archs.  Anyway, config.h and rbconfig.rb must
	  be separated definitely at least.

Fri Feb  1 21:42:37 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (darwin): _XOPEN_SOURCE is necessary to make ucontext_t
	  consistent with the library implementation of MacOS X 10.5.
	  [ruby-dev:33461]

	* configure.in (darwin): ucontext on PowerPC MacOS X 10.5 is broken.

Thu Jan 31 08:31:19 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (ext/extmk.rb, instruby.rb): inlined $(MAKE) so that can
	  be executed even with -n.

Thu Jan 31 07:00:19 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb (bin_for_find): should find a symbol by
	  Symbol class.

	* test/rinda/test_rinda.rb (test_symbol_tuple): ditto.

Wed Jan 30 22:07:58 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb: refined deprecated methods.

Wed Jan 30 22:06:54 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* bignum.c (rb_cstr_to_inum): '0_2' is a valid representation.

Tue Jan 29 22:40:12 2008  Yusuke Endoh  <mame@tsg.ne.jp>

	* range.c (step_i): rb_funcall receives VALUE as an argument.

Tue Jan 29 11:53:05 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: rm largefile.h.

Mon Jan 28 01:21:15 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_open_file): should check NUL in path.
	  <http://www.rubyist.net/~matz/20080125.html#c01>.

	* io.c (rb_io_s_popen): ditto.

	* io.c (rb_io_reopen): ditto.

	* io.c (next_argv): ditto.

	* io.c (rb_io_s_foreach): ditto.

	* io.c (rb_io_s_readlines): ditto.

	* io.c (rb_io_s_read): ditto.

Fri Jan 25 22:33:38 2008  Yusuke Endoh  <mame@tsg.ne.jp>

	* math.c: fix comment.  [ruby-dev:33276]

Fri Jan 25 10:31:58 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* */*.bat: set svn:mime-type to text/batch.

Thu Jan 24 19:36:22 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead
	  object_id with printf.  [ruby-dev:33347]

Tue Jan 22 11:22:47 2008  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/setup.mak ($(ARCH)): if a macro is appended by $(APPEND),
	  a space will be inserted on the top of the line.

	* win32/Makefile.sub (MKFILES): stop make process if Makefile is
	  updated.

Mon Jan 21 17:34:41 2008  Akinori MUSHA  <knu@iDaemons.org>

	* io.c (rb_io_mode_flags, rb_io_mode_modenum): Ignore encoding
	  options for forward compatibility.

Mon Jan 21 12:50:02 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c, gc.c (setjmp): sigsetjmp is a macro on cygwin.

Sat Jan 19 11:21:53 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (sigsetjmp): check if available.

	* eval.c, gc.c (setjmp): do not use _setjmp if sigsetjmp is available.

Sat Jan 19 11:10:11 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: Remove wrong assumptions about Cygwin.  a patch from
	  Corinna Vinschen in [ruby-Bugs-17018].

Thu Jan 17 21:06:01 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb (Date::Infinity#<=>): didn't work.  A patch from
	  Dirkjan Bussink <d.bussink AT gmail.com> [ruby-core:15098].
	  This is a bug obviously.  However it didn't affect the library's
	  functions.

	* lib/date.rb, lib/date/format.rb: some trivial changes.

Tue Jan 15 15:09:28 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/setup.mak: strip out empty lines from CPP output.

Tue Jan 15 03:41:42 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (eval): check if backtrace is empty.  [ruby-core:15040]

Tue Jan 15 01:28:47 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk: simplified dummy objects dependencies.

Mon Jan 14 16:12:58 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/shellwords.rb: scape should be an alias to shellescape.  a
	  patch from Masahiro Kawato <m-kawato AT mwb.biglobe.ne.jp> in
	  [ruby-dev:33060].

Mon Jan 14 09:32:40 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/time.rb: do not reference Time directly from the inside of
	  definitions. [ruby-dev:33059]

Sat Jan 12 18:27:41 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_define_alloc_func, rb_undef_alloc_func): should
	  define/undef on a signleton class.  [ruby-core:09959]

Sat Jan 12 12:04:14 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: tuning for performance.

Fri Jan 11 12:35:56 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: moved broken syscall checks from process.c etc.

	* defines.h (WORDS_BIGENDIAN): honor __BIG_ENDIAN__ than the result of
	  configure.

	* dln.c: use dlopen on Mac OS X 10.3 or later.  backport from trunk.

	* lib/rdoc/options.rb (check_diagram): more precise check, darwin
	  is not Windows but minwg is on it.

Thu Jan 10 10:53:50 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_open_osfhandle): reverted to old definition.
	  [ ruby-Bugs-16948 ]

Tue Jan  8 20:02:08 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win{32,ce}/Makefile.sub: merged.

Sun Jan  6 09:39:02 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: introduced some constants
	  (for internal use).

	* sample/cal.rb: trivial adjustments.

Fri Jan  4 23:08:48 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_arg): use converted object.  [ruby-core:14759]

Fri Jan  4 01:20:21 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32.h: only VC6 needs extern "C++" for math.h.  [ruby-talk:285660]

Thu Jan  3 11:28:58 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (fptr_finalize): clear errno first.  [ruby-talk:284492]

Wed Jan  2 10:18:56 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* sample/time.rb: use Process.times instead of Time.times.

Wed Jan  2 09:18:11 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* sample/goodfriday.rb: examples for date are enough.  retired.

Wed Jan  2 09:06:55 2008  Tadayoshi Funaba  <tadf@dotrb.org>

	* sample/cal.rb: just updated with the newest version.

Mon Dec 31 06:50:38 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* trunk/common.mk: not use -I$(srcdir)/lib with $(MINIRUBY) for cross
	  compiling.

	* configure.in, {win,bcc}32/Makefile.sub (MINIRUBY): -I$(srcdir)/lib
	  moved.

Sun Dec 30 22:48:37 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb (_valid_time?): I'm not sure to recommend such an
	  expression.  but anyway it is acceptable now.  [ruby-core:14580]

Fri Dec 28 16:36:33 2007  NARUSE, Yui  <naruse@airemix.com>

       * lib/resolv.rb (Resolv::DNS#each_address): now returns IPv6 address.

Fri Dec 28 13:21:32 2007  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb, test/rss/test_version.rb, NEWS: 0.2.2 -> 0.2.3.

	* lib/rss/parser.rb, test/rss/test_parser.rb: supported "-" in tag name.
	  Reported by Ray Chen. Thanks.

Thu Dec 27 23:56:01 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* mkconfig.rb: should not use the libraries under the source directory
	  at cross compiling.

Thu Dec 27 11:02:45 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* intern.h, string.c (rb_str_set_len): added for upgrading path from
	  1.8 to 1.9. [ruby-dev:32807]

	* string.c (rb_str_lines, rb_str_bytes): ditto.

Thu Dec 27 10:47:32 2007  Technorama Ltd.  <oss-ruby@technorama.net>

	* ext/openssl/ossl_ssl.c: Only show a warning if the default
	  DH callback is actually used.

	* ext/openssl/ossl_rand.c: New method: random_add().

Wed Dec 26 22:27:45 2007  NARUSE, Yui <naruse@ruby-lang.org>

	* lib/resolv.rb (Resolv::DNS::Name.==): fix for other is array of
	  Resolv::DNS::Label::Str.

	* lib/resolv.rb (Resolv::DNS::MessageEncoder#put_label): String#string
	  is not defined, so replace to_s.

	* lib/resolv.rb (Resolv::IPv6#to_name): ip6.int is obsoleted by
	  int.arpa.

Mon Dec 24 16:18:57 2007  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/ri/ri_options.rb:  Fix ri --help listing of gem ri paths.
	  Merge of r14567 and r14569 from trunk.

	* lib/rdoc/ri/ri_paths.rb:  Fix duplication of ri data for multiple
	  gems.  Merge of r14567 from trunk

Mon Dec 24 12:35:03 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win{32,ce}/Makefile.sub (MFLAGS): defaulted to -l.

Mon Dec 24 11:56:31 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* {bcc32,win{32,ce}}/Makefile.sub (SET_MAKE): set MFLAGS which is not
	  set by default, to get rid of chaotic situation of MFLAGS/MAKEFLAGS.

Sat Dec 22 14:49:46 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb: don't freeze nil even if 1.8 will not be aware of
	  the issue. [ruby-dev:32677]

Wed Dec 19 13:57:43 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (TIMEZONE_VOID): check whether timezone requires zero
	  arguments.  [ruby-dev:32631]

Wed Dec 19 12:01:42 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (f_rest_arg): check if duplicated.  [ruby-core:14140]

Wed Dec 19 10:52:29 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_cstr_to_inum): an underscore succeeding after octal
	  prefix is allowed.  [ruby-core:14139]

Mon Dec 17 13:43:15 2007  Tanaka Akira  <akr@fsij.org>

	* gc.c (stack_end_address): use local variable address instead of
	  __builtin_frame_address(0) to avoid SEGV on SunOS 5.11 on x86 with
	  gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802).
	  stack_end_address returned a frame address of garbage_collect
	  since stack_end_address doesn't create its own frame.
	  So a VALUE stored in a callee saved register, %edi, pushed into
	  the stack at the beginning of garbage_collect was not marked.

Mon Dec 17 12:21:25 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (RUNRUBY): added RUNRUBYOPT.

Fri Dec 14 12:36:35 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_CHECK_VARTYPE): check if a variable is defined
	  and its type.

	* configure.in (timezone, altzone): check for recent cygwin.

	* missing/strftime.c (strftime): fix for timezone.  [ruby-dev:32536]

	* lib/mkmf.rb (try_var): should fail for functions.

	* ext/readline/extconf.rb: should use have_func for functions instead
	  of have_var.

Tue Dec 11 00:04:05 2007  Akinori MUSHA  <knu@iDaemons.org>

	* array.c (rb_ary_slice_bang): If an invalid negative index (<
	  -size) is given, do not raise an exception but return nil just
	  like slice() does.

	* test/ruby/test_array.rb (TestArray::test_slice,
	  TestArray::test_slice!): Pull in test cases from trunk.

Mon Dec 10 21:47:53 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* transcode.c (str_transcode): allow non-registered encodings.
	  [ruby-dev:32520]

Mon Dec 10 21:00:30 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_slice_bang): should return nil if position out
	  of range.  a patch from Akinori MUSHA <knu AT iDaemons.org>.
	  [ruby-dev:32518]

Mon Dec 10 18:28:06 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/uri/common.rb (URI::REGEXP::PATTERN): typo in REG_NAME
	  regular expression.  a patch from Ueda Satoshi
	  <s-ueda AT livedoor.jp>.  [ruby-dev:32514]

Sun Dec  9 12:39:01 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/cgi.rb (read_multipart): exclude blanks from header values.
	  [ruby-list:44327]

Wed Dec  5 23:38:50 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (range_each): followed step_i change.

Wed Dec  5 18:08:45 2007  Tanaka Akira  <akr@fsij.org>

	* numeric.c (int_odd_p): new method Integer#odd?.
	  (int_even_p): new method Integer#even?.
	  (int_pred): new method Integer#pred.
	  (fix_odd_p): new method Fixnum#odd?.
	  (fix_even_p): new method Fixnum#even?.

Wed Dec  5 15:15:21 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* range.c (step_i, range_step): support non-fixnum steps.
	  [ruby-talk:282100]

Tue Dec  4 11:23:50 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing
	  preceeding 0s.  [ruby-core:13873]

Sun Dec  2 22:43:45 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (error_print): put newline unless multiple line message ends
	  with a newline.  [ruby-dev:32429]

Sun Dec  2 15:49:20 2007  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb, test/rss/test_version.rb, NEWS: 0.2.1 -> 0.2.2.

	* lib/rss/maker/itunes.rb: fixed new_itunes_category.
	* lib/rss/maker/taxonomy.rb: new_taxo_topic -> new_topic because
	  of consistency.

	* test/rss/test_maker_itunes.rb, test/rss/test_itunes.rb: removed
	  needless UTF-8 characters.

Sun Dec  2 01:12:15 2007  James Edward Gray II  <jeg2@ruby-lang.org>

	Merged 14070 from trunk.

	* lib/xmlrpc/server.rb (XMLRPC::Server#server): Improve signal handling so
	  pressing control-c in the controlling terminal or sending SIGTERM stops
	  the XML-RPC server.

Sat Dec  1 15:13:33 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/resolv.rb: documentation update.  backported from 1.9.
	  [ruby-core:13273]

Sat Dec  1 03:30:47 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (newline_node): set line from outermost node before removing
	  NODE_BEGIN.  [ruby-dev:32406]

Fri Nov 30 21:53:28 2007  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb, test/rss/test_version.rb: 0.2.0 -> 0.2.1.

	* lib/rss/content.rb, lib/rss/content/1.0.rb,
	  lib/rss/content/2.0.rb, lib/rss/maker/content.rb,
	  test/rss/rss-testcase.rb, test/rss/test_content.rb,
	  test/rss/test_maker_content.rb: supported content:encoded with RSS
	  2.0.
	  Suggested by Sam Lown. Thanks.

	* NEWS: added the above changes.

Thu Nov 29 16:59:10 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (stmt): remove unnecessary NODE_BEGIN.  [ruby-core:13814]

Wed Nov 28 14:43:14 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extract_makefile): use dldflags instead of DLDFLAGS to
	  get rid of mixing $LDFLAGS and $ARCH_FLAG.

	* lib/mkmf.rb (configuration): ditto.

	* lib/mkmf.rb (create_makefile): support for extensions which has no
	  shared object.

Wed Nov 28 09:51:42 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big2str0): do not clobber space for sign.

	* sprintf.c (remove_sign_bits): extends sign bit first.

Wed Nov 21 01:04:12 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (nil_plus): remove unused function.  [ruby-core:13737]

Sun Nov 18 14:03:44 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_alias): do not call hook functions until initialization
	  finishes.  [ruby-talk:279538]

Sun Nov 18 09:09:48 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (String#tr_cpp): make preprocessor identifiers.

Sat Nov 17 13:58:11 2007  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_invoke): bug fix. [ruby-talk:279100]

Fri Nov 16 17:41:34 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (Document-class): moved the simplest example to
	  the top.

	* ext/iconv/iconv.c (iconv_s_iconv): Document-method: needs class
	  prefix for class method.  [ruby-core:13542]

	* ext/iconv/iconv.c (iconv_iconv): also instance method needs to be
	  qualified.

Fri Nov 16 11:16:41 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/yaml/rubytypes.rb (String#is_binary_data?): use Integer#fdiv.

Thu Nov 15 19:50:46 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/curses/extconf.rb: check macro if cannot find func.
	  [ruby-list:44224]

Thu Nov 15 12:19:14 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session::FileStore::restore): use
	  lockfile for exclusive locks.  a patch from <tommy AT tmtm.org>.
	  [ruby-dev:32296]

Wed Nov 14 01:52:59 2007  Tanaka Akira  <akr@fsij.org>

	* missing/isinf.c (isinf): don't define if the macro is defined.

Wed Nov 14 01:34:42 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (round): fallback definition.

	* numeric.c (flo_divmod, flo_round): use round() always.
	  [ruby-dev:32269]

Tue Nov 13 22:02:23 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: remove Thread.exclusive.

	* lib/drb/extservm.rb: ditto.

Tue Nov 13 16:33:07 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (flodivmod): work around for infinity.

	* numeric.c (flo_divmod): work around for platforms have no round().
	  [ruby-dev:32247]

Tue Nov 13 13:58:51 2007  Tanaka Akira  <akr@fsij.org>

	* numeric.c (numeric.c): Integer#ord implemented.  [ruby-dev:32206]

Tue Nov 13 02:57:04 2007  URABE Shyouhei  <shyouhei@ice.uec.ac.jp>

	* numeric.c (flo_divmod): round to the nearest integer.
	  [ ruby-Bugs-14540 ]

Mon Nov 12 16:52:29 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): rdoc about srcprefix.  a patch from
	  Daniel Berger <djberg96 AT gmail.com> in [ruby-core:13378].

Mon Nov 12 13:53:06 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el (ruby-parse-partial): handle stringified
	  symbols properly using ruby-forward-string.

Mon Nov 12 12:38:31 2007  Tanaka Akira  <akr@fsij.org>

	* Makefile.in (lex.c): don't remove lex.c at first.

Fri Nov  9 07:26:04 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* random.c: update MT URL.[ruby-core:13305].

Wed Nov  7 03:32:38 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rexml/encodings/SHIFT-JIS.rb (REXML::Encoding): place -x for
	  nkf conversion.  a patch from <moonwolf AT moonwolf.com>.
	  [ruby-dev:32183]

Mon Nov  5 05:17:04 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Switch::summarize): fix for long form
	  option with very long argument.  a patch from Kobayashi Noritada
	  <nori1 AT dolphin.c.u-tokyo.ac.jp> in [ruby-list:44179].

Mon Nov  5 01:20:33 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (call_args): remove "parenthesize argument(s) for future
	  version" warning.  when I added this warning, I had a plan to
	  reimplement the parser that is simpler than the current one.
	  since we abandoned the plan, warning no longer required.

Fri Nov  2 00:13:51 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_assoc): check and convert inner arrays (assocs)
	  using #to_ary.

	* hash.c (rb_hash_s_create): check and convert argument hash
	  using #to_hash.

	* hash.c (rb_hash_s_create): Hash#[] now takes assocs as source of
	  hash conversion.

Thu Nov  1 23:47:43 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (DRbTCPSocket): Improving with multiple network
	  interface.

	* test/drb/drbtest.rb: ditto.

Fri Oct 26 17:14:14 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (fix_pow): returns 1.0 for 0**0.0.

	* numeric.c (fix_pow): returns infinity for 0**-1.  [ruby-dev:32084]

Wed Oct 25 07:18:09 2007  James Edward Gray II  <jeg2@ruby-lang.org>

	Merged 13781 from trunk.

	* lib/net/telnet.rb (Net::Telnet#login): Allowing "passphrase" in
	  addition to "password" for Telnet login prompts. [ruby-Bugs-10746]

Wed Oct 25 06:46:21 2007  James Edward Gray II  <jeg2@ruby-lang.org>

	Merged 13779 from trunk.

	* lib/net/telnet.rb (Net::Telnet#login): Making the password prompt
	  pattern case insensitive. [ruby-Bugs-10746]

Thu Oct 25 14:19:33 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_tell, rb_io_seek): check errno too.  [ruby-dev:32093]

Wed Oct 25 08:03:53 2007  James Edward Gray II  <jeg2@ruby-lang.org>

	Merged 13767, 13768, 13769, and 13770 from trunk.

	* lib/xmlrpc/parser.rb (XMLRPC::Convert::dateTime): Fixing a bug that
	  caused time zone conversion to fail for some ISO 8601 date formats.
	  [ruby-Bugs-12677]

	* lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Explicitly start
	  the HTTP connection to support keepalive requests. [ruby-Bugs-9353]

	* lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Improving the error
	  message for Content-Type check failures. [ruby-core:12163]

	* lib/xmlrpc/utils.rb (XMLRPC::ParseContentType#parse_content_type):
	  Making Content-Type checks case insensitive. [ruby-Bugs-3367]

Sun Oct 21 21:16:43 2007  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss.rb, lib/rss/, test/rss/, sample/rss/: merged from trunk.
	- 0.1.6 -> 2.0.0.
	- fixed image module URI. Thanks to Dmitry Borodaenko.
	- supported Atom.
	- supported ITunes module.
	- supported Slash module.

	* NEWS: added an entry for RSS Parser.

Thu Oct 18 10:57:06 2007  Tanaka Akira  <akr@fsij.org>

	* ruby.h (RCLASS_IV_TBL): defined.
	  (RCLASS_M_TBL): ditto.
	  (RCLASS_SUPER): ditto.
	  (RMODULE_IV_TBL): ditto.
	  (RMODULE_M_TBL): ditto.
	  (RMODULE_SUPER): ditto.

Mon Oct 15 22:08:55 2007  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Merge some of the sub-sections, as the differences were
	  unclear.

Mon Oct 15 21:57:07 2007  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Mention ipaddr enhancements.

	* lib/ipaddr.rb (in_addr, in6_addr, addr_mask): Make some minor
	  code optimization.

	* lib/ipaddr.rb (<=>): Implement IPAddr#<=> and make IPAddr
	  comparable.

	* lib/ipaddr.rb (succ): Implement IPAddr#succ.  You can now create
	  a range between two IPAddr's, which (Range) object is
	  enumerable.

	* lib/ipaddr.rb (to_range): A new method to create a Range object
	  for the (network) address.

	* lib/ipaddr.rb (coerce_other): Support type coercion and make &,
	  |, == and include? accept a string or an integer instead of an
	  IPAddr object as the argument.

	* lib/ipaddr.rb (initialize): Give better error messages.

	* lib/ipaddr.rb: Improve documentation.

Mon Oct 15 21:24:25 2007  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Mention shellwords and tempfile enhancements.

	* NEWS: Move the entry about Tk::X_Scrollable to a better section.

Mon Oct 15 17:28:20 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/lib/openssl/buffering.rb (read, readpartial): revert
	  r12496. handling EOF is a little differnt in ruby 1.8 and ruby 1.9.
	  [ruby-dev:31979]

Mon Oct 15 11:45:12 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_bytes0): refined length check.  [ruby-dev:32059]

Mon Oct 15 09:58:07 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_bytes0): check if source has enough data.
	  [ruby-dev:32054]

Mon Oct 15 01:15:09 2007  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (s_accept_nonblock): make accepted fd
	  nonblocking.  [ruby-talk:274079]

Sun Oct 14 04:08:34 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (AC_SYS_LARGEFILE): keep results also in command
	  options, to vail out of mismatch.  [ruby-list:44114]

	* mkconfig.rb, lib/mkmf.rb (configuration): add DEFS.

Sun Oct 14 03:55:52 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/mkexports.rb: deal with __fastcall name decorations.
	  [ruby-list:44111]

Sat Oct 13 09:02:16 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* {bcc,win}32/mkexports.rb: explicit data.  [ruby-list:44108]

Sat Oct 13 00:35:03 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rexml/source.rb (REXML::SourceFactory::SourceFactory): typo
	  fixed.  [ruby-list:44099]

Fri Oct 12 11:22:15 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (match_values_at): make #select to be alias to #values_at
	  to adapt RDoc description.  [ruby-core:12588]

Thu Oct 11 14:32:46 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32}/Makefile.sub (COMMON_MACROS): workaround for old SDK's
	  bug. [ruby-core:12584]

Wed Oct 10 23:34:45 2007  Tanaka Akira  <akr@fsij.org>

	* lib/securerandom.rb: new file.  [ruby-dev:31928]

	* lib/cgi/session.rb (create_new_id): use securerandom if available.

Tue Oct  9 01:01:55 2007  Tanaka Akira  <akr@fsij.org>

	* re.c (rb_reg_s_union_m): Regexp.union accepts single
	  argument which is an array of patterns.  [ruby-list:44084]

Mon Oct  8 20:06:23 2007  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/net/http.rb, lib/open-uri.rb: remove
	  Net::HTTP#enable_post_connection_check.  [ruby-dev:31960]

	* lib/net/imap.rb: hostname should be verified against server's
	  indentity as persented in the server's certificate. [ruby-dev:31960]

	* ext/openssl/lib/net/telnets.rb, ext/openssl/lib/net/ftptls.rb: ditto.

Sat Oct  6 23:14:54 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_to_i): update RDoc since base can be any value
	  between 2 and 36.  [ruby-talk:272879]

Fri Oct  5 15:44:50 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/shellwords.rb: Add shellescape() and shelljoin().

	* lib/shellwords.rb: Rename shellwords() to shellsplit() and make
	  the former an alias to the latter.

	* lib/shellwords.rb: Add escape(), split(), join() as class
	  methods, which are aliases to their respective long names
	  prefixed with `shell'.

	* lib/shellwords.rb: Add String#shellescape(), String#shellsplit()
	  and Array#shelljoin() for convenience.

Fri Oct  5 15:40:04 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/tempfile.rb (Tempfile::make_tmpname): Allow to specify a
	  suffix for a temporary file name.

	* lib/tempfile.rb (Tempfile::make_tmpname): Make temporary file
	  names less predictable by including a random string.
	  [inspired by: akr]

Tue Oct  2 21:20:14 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (make_cmdvector): adjust escaped successive
	  double-quote handling. (merge from trunk)

Tue Oct  2 20:35:24 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (init_env): initialize HOME and USER environment
	  variables unless set. [ruby-core:12328] (merge from trunk)

	* win32/win32.c (NtInitialize, getlogin): ditto.

	* configure.in, win32/Makefile.sub (LIBS): need to link shell32
	  library for SH* functions on mswin32 and mingw32.

Mon Oct  1 12:50:59 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (id2ref): valid id should not refer T_VALUE nor T_ICLASS.
	  [ruby-dev:31911]

Wed Sep 26 23:54:37 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake), lib/mkmf.rb (configuration): top_srcdir
	  should not prefixed with DESTDIR.

Wed Sep 26 08:36:31 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (ext/extinit.o): use $(OUTFLAG) as well as other
	  objects.  [ruby-Bugs-14228]

Wed Sep 26 05:12:17 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yyerror): limit error message length.  [ruby-dev:31848]

	* regex.c (re_mbc_startpos): separated from re_adjust_startpos.

Tue Sep 25 13:47:38 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (remove_method): should not remove undef place holder.
	  [ruby-dev:31817]

Mon Sep 24 16:52:11 2007  Urabe Shyouhei  <shyouhei@ruby-lang.org>

	* lib/net/http.rb: fix typo.

Sun Sep 23 21:57:25 2007  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/net/http.rb: an SSL verification (the server hostname should
	  be matched with its certificate's commonName) is added.
	  this verification can be skipped by
	  "Net::HTTP#enable_post_connection_check=(false)".
	  suggested by Chris Clark <cclark at isecpartners.com>

	* lib/net/open-uri.rb: use Net::HTTP#enable_post_connection_check to
	  perform SSL post connection check.

	* ext/openssl/lib/openssl/ssl.c
	  (OpenSSL::SSL::SSLSocket#post_connection_check): refine error message.

Sun Sep 23 09:05:05 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (os_obj_of, os_each_obj): hide objects to be finalized.
	  [ruby-dev:31810]

Sun Sep 23 08:58:01 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval_method.ci (rb_attr): should not use alloca for unknowen size
	  input.  [ruby-dev:31816]

	* parse.y (rb_intern_str): prevent str from optimization.

Sun Sep 23 05:42:35 2007  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* lib/rdoc/options.rb (Options::check_diagram): dot -V output
	  changed. [ ruby-Bugs-11978 ], Thanks Florian Frank.

Sat Sep 22 06:02:11 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::List::summarize): use each_line if
	  defined rather than each.  [ruby-Patches-14096]

Sat Sep 22 05:19:49 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_init): separate from strio_initialize
	  to share with strio_reopen properly.  [ruby-Bugs-13919]

Fri Sep 21 15:46:20 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (struct rb_exec_arg): proc should be a VALUE.

	* process.c (rb_f_exec): suppress a warning.

Fri Sep 21 03:05:35 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c, intern.h, ext/thread/thread.c: should not free queue while
	  any live threads are waiting.  [ruby-dev:30653]

Thu Sep 20 17:24:59 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_detach_process): cast for the platforms where size of
	  pointer differs from size of int.

	* process.c (rb_f_exec, rb_f_system): should not exceptions after
	  fork.  [ruby-core:08262]

Fri Sep 14 00:34:25 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/extservm.rb (invoke_service): use Thread.exclusive instead of
	  Thread.critical

Wed Sep 12 23:12:22 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.c (proc_options): -W should be allowed in RUBYOPT
	  environment variable.  [ruby-core:12118]

Mon Sep 10 01:05:25 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* range.c (range_step): fixed integer overflow.  [ruby-dev:31763]

Sun Sep  9 09:14:45 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (_strptime): now also attaches an element
	  which denotes leftover substring if exists.

Sat Sep  8 10:22:20 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (rb_struct_s_members): should raise TypeError instead
	  of call rb_bug().  [ruby-dev:31709]

	* marshal.c (r_object0): no nil check require any more.

Sat Sep  8 09:38:19 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (str[fp]time): now check specifications more
	  strictly.

Fri Sep  7 05:36:19 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb (MockClock): correct synchronous problems
	  of the MultiThreading. [ruby-dev:31692]

Wed Sep  5 22:02:27 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_subseq): need integer overflow check.
	  [ruby-dev:31736]

	* array.c (rb_ary_splice): ditto.  [ruby-dev:31737]

	* array.c (rb_ary_fill): ditto.  [ruby-dev:31738]

	* string.c (rb_str_splice): integer overflow for length.
	  [ruby-dev:31739]

Sun Sep  2 00:48:15 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (_parse): improved parsing of ordinal dates.

	* lib/date/format.rb (_parse): use named character classes in some
	  regular expressions.

Sat Sep  1 08:13:36 2007  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c: add WIN32OLE#ole_activex_initialize.

Thu Aug 30 13:13:13 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (try_const, have_const): check for a const is defined.
	  [ruby-core:04422]

Thu Aug 30 13:10:57 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (group_member): check if presents.

	* configure.in (XCFLAGS): add _GNU_SOURCE on linux.

	* file.c (group_member): use system routine if available.

Thu Aug 30 08:24:18 2007  Tanaka Akira  <akr@fsij.org>

	* ruby.h (RHASH_TBL): defined for compatibility to 1.9.
	* (RHASH_ITER_LEV): ditto.
	* (RHASH_IFNONE): ditto.
	* (RHASH_SIZE): ditto.
	* (RHASH_EMPTY_P): ditto.

Wed Aug 29 13:05:59 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* include/ruby/defines.h (flush_register_windows): call "ta 0x03"
	  even on Linux/Sparc.  [ruby-dev:31674]

Tue Aug 28 23:26:12 2007  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_type_progid, reg_enum_key,
	  reg_get_val, ole_wc2mb): fix the bug. Thanks, arton.
	  [ruby-dev:31576]

Mon Aug 27 19:10:50 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/etc/etc.c (etc_getlogin): update documentation to note
	  security issue.  [ruby-Bugs-11821]

Tue Aug 21 21:09:48 2007  Tanaka Akira  <akr@fsij.org>

	* lib/tmpdir.rb (Dir.mktmpdir): make directory suffix specifiable.

Tue Aug 21 13:57:04 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (st_foreach_func, rb_foreach_func): typedefed.

Mon Aug 20 17:25:33 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (mnew): should preserve noex as safe_level.

	* eval.c (rb_call0): tighten security check condition..

Sat Aug 18 21:32:20 2007  Tanaka Akira  <akr@fsij.org>

	* lib/tmpdir.rb (Dir.mktmpdir): new method.
	  [ruby-dev:31462]

Sat Aug 18 17:44:42 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tk/tcltklib.c (Init_tcltklib): use rb_set_end_proc().

Sat Aug 18 15:59:52 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (detach_process_watcher): should not pass the pointer
	  to an auto variable to the thread to be created.  pointed and
	  fix by KUBO Takehiro <kubo at jiubao.org>  [ruby-dev:30618]

Sat Aug 18 12:24:30 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sample/test.rb, test/ruby/test_system.rb(valid_syntax?): keep
	  comment lines first.

Thu Aug 16 20:40:50 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (bigtrunc): RBIGNUM(x)->len may be zero.  out of bound
	  access.  [ruby-dev:31404]

Thu Aug 16 16:46:07 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (aix): enable shared by default.

	* configure.in (aix): for 64bit-mode AIX.  [ruby-dev:31401]
	  + use CC for LDSHARED if non-gcc,
	  + moved -G option from *LDFLAGS to LDSHARED,
	  + set -brtl only in XLDFLAGS.

Thu Aug 16 13:06:08 2007  Tanaka Akira  <akr@fsij.org>

	* bignum.c (big_lshift): make shift offset long type.
	  (big_rshift): ditto.
	  (rb_big_lshift): ditto.
	  (big_rshift): ditto.
	  [ruby-dev:31434]

Thu Aug 16 04:09:19 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb (Rinda::TupleSpace#start_keeper): improve
	  keeper thread.

Wed Aug 15 13:50:10 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_delete_key): delete the entry without calling block.

	* hash.c (rb_hash_shift): should consider iter_lev too.

	* hash.c (delete_if_i): use rb_hash_delete_key() so that the block
	  isn't called twice.  [ruby-core:11556]

Sun Arg 12 03:56:30 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb: fix Rinda::TupleSpace keeper thread bug.
	  the thread is started too early. [ruby-talk:264062]

	* test/rinda/test_rinda.rb: ditto.

Sat Aug 11 07:34:10 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb: reverted some wrongly erased "o" options
	  (pointed out by nobu).

Tue Aug  7 14:58:39 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/pty/pty.c (establishShell): handshaking before close slave
	  device.  [ruby-talk:263410]

	* ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): constified.

	* ext/pty/pty.c (SlaveName): removed static buffer.

	* ext/pty/expect_sample.rb: support for autologin.

Tue Aug  7 12:45:13 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ac_cv_func_isinf): set yes also on OpenSolaris.
	  [ruby-Bugs-12859]

Mon Aug  6 17:36:29 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rexml/encodings/{ISO-8859-15,CP-1252}.rb: fixed invalid syntax.

Fri Aug  3 11:05:54 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): save all CONFIG values.

	* ext/extmk.rb (extmake): remove mkmf.log at clean, and extconf.h at
	  distclean, respectively.

	* ext/extmk.rb: remove rdoc at clean, and installed list file at
	  distclean, respectively.

Fri Aug  3 07:09:05 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: more verbose message.  [ruby-Bugs-12766]

	* lib/mkmf.rb (have_type): suppress a warning with -Wall.

	* lib/mkmf.rb (find_type): new method.

Thu Aug  2 13:46:39 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): should not check positional number as
	  width.  [ruby-core:11838]

Mon Jul 30 11:16:40 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_aref): check for Bignum index range.
	  [ruby-dev:31271]

Sat Jul 28 09:35:41 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/digest/lib/digest.rb (Digest::self.const_missing): avoid
	  infinite recursive const_missing call.  [ruby-talk:262193]

Thu Jul 26 13:57:45 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dln.c (load_1, dln_find_1): constified.

	* dln.c (conv_to_posix_path): removed.

	* ruby.c (usage): constified.

	* ruby.c (rubylib_mangled_path, rubylib_mangled_path2): return
	  VALUE instead of a pointer to static buffer.

	* ruby.c (push_include_cygwin): fixed buffer overflow.
	  [ruby-dev:31297]

	* ruby.c (ruby_init_loadpath): not convert built-in paths.

Sun Jul 22 16:07:12 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* intern.h (is_ruby_native_thread): removed since declared as an int
	  function in ruby.h already.

Sun Jul 22 14:33:40 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_rename): deleted code to get rid of a bug of
	  old Cygwin.

	* file.c (rb_file_truncate): added prototype of GetLastError()
	  on cygwin.  [ruby-dev:31239]

	* intern.h (is_ruby_native_thread): prototype.

	* missing/strftime.c (strftime): fix printf format and actual
	  arguments.

	* ext/Win32API/Win32API.c (Win32API_initialize): ditto.

	* ext/tk/tcltklib.c (ip_finalize): ditto.

	* ext/dl/ptr.c (rb_dlptr_inspect): ditto.  [ruby-dev:31268]

	* ext/dl/sym.c (rb_dlsym_inspect): ditto.

	* ext/socket/getnameinfo.c: include stdio.h always.

	* ext/win32ole/win32ole.c (ole_hresult2msg, folevariable_name,
	  folevariable_ole_type, folevariable_ole_type_detail,
	  folevariable_value, folemethod_visible): missing return value.

Sat Jul 21 17:48:26 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): make OBJS depend on RUBY_EXTCONF_H
	  only if extconf.h is created.

	* bcc32/{Makefile.sub,configure.bat,setup.mak: configure_args
	  support.

	* bcc32/setup.mak: check runtime version.

	* win32/win32.c (rb_w32_open_osfhandle): prototype has changed
	  in bcc 5.82.

	* {win32,wince,bcc32}/setup.mak (-version-): no RUBY_EXTERN magic.

	* win32/resource.rb: include patchlevel number.

Sat Jul 21 12:06:48 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (init_mkmf): should remove mkmf.log too.

Sat Jul 21 01:53:17 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (Date._parse): completes calendar week based year.

	* lib/date/format.rb (Date._parse): detects year of ordinal date in
	  extended format.

Fri Jul 20 15:22:51 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/ossl_config.c (ossl_config_set_section): do not
	  initialize aggregations with dynamic values.  [ruby-talk:259306]

Thu Jul 19 19:24:14 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (get_backtrace): check the result more.
	  [ruby-dev:31261] [ruby-bugs-12398]

Thu Jul 19 14:38:45 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_lshift, rb_big_rshift): separated functions
	  to get rid of infinite recursion.  fixed calculation in edge
	  cases.  [ruby-dev:31244]

	* numeric.c (rb_fix_lshift, rb_fix_rshift): ditto.

Wed Jul 18 16:57:41 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_pow): refine overflow check.  [ruby-dev:31242]

Wed Jul 18 08:47:09 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_succ): Time#succ should return a time object in the
	  same timezone mode to the original.  [ruby-talk:260256]

Tue Jul 17 00:50:53 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (fix_pow): integer power calculation: 0**n => 0,
	  1**n => 1, -1**n => 1 (n: even) / -1 (n: odd).

	* test/ruby/test_fixnum.rb (TestFixnum::test_pow): update test
	  suite.  pow(-3, 2^64) gives NaN when pow(3, 2^64) gives Inf.

Mon Jul 16 23:07:51 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/base64.rb (Base64::b64encode): should not specify /o option
	  for regular expression.  [ruby-dev:31221]

Mon Jul 16 18:29:33 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_rindex_m): accept string-like object convertible
	  with #to_str method, as well as rb_str_index_m.  [ruby-core:11692]

Mon Jul 16 05:45:53 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): more checks for format argument.
	  [ruby-core:11569], [ruby-core:11570], [ruby-core:11571],
	  [ruby-core:11573]

Mon Jul 16 00:26:10 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_pow): removed invariant variable.  [ruby-dev:31236]

Sun Jul 15 23:59:57 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_neg): SIGNED_VALUE isn't in 1.8.

Sun Jul 15 22:24:49 2007  pegacorn  <subscriber.jp AT gmail.com>

	* ext/digest/digest.c (rb_digest_instance_update,
	  rb_digest_instance_finish, rb_digest_instance_reset,
	  rb_digest_instance_block_length): %s in rb_raise() expects char*.
	  [ruby-dev:31222]

	* ext/openssl/ossl.h: include ossl_pkcs5.h.  [ruby-dev:31231]

	* ext/openssl/ossl_pkcs5.h: new file for PKCS5.  [ruby-dev:31231]

	* ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise()
	  instead of rb_raise().  [ruby-dev:31222]

	* ext/sdbm/_sdbm.c: DOSISH platforms need io.h.  [ruby-dev:31232]

	* ext/syck/syck.h: include stdlib.h for malloc() and free().
	  [ruby-dev:31232]

	* ext/syck/syck.h (syck_parser_set_input_type): prototype added.
	  [ruby-dev:31231]

	* win32/win32.c: include mbstring.h for _mbspbrk().  [ruby-dev:31232]

	* win32.h (rb_w32_getcwd): prototype added.  [ruby-dev:31232]

Sun Jul 15 21:07:43 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (bigtrunc): do not empty Bignum.  [ruby-dev:31229]

Sun Jul 15 19:05:28 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_cstr_to_inum): check leading non-digits.
	  [ruby-core:11691]

Sun Jul 15 04:42:20 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (get2comp): do nothing for empty Bignum.  [ruby-dev:31225]

Sat Jul 14 14:04:06 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (sort_by_cmp): check if reentered.  [ruby-dev:24291]

Sat Jul 14 12:44:14 2007  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/openssl/test_pkcs7.rb: reverted the previous patch.  it should
	  be as it was to check interface compatibility.  sorry for bothering
	  with this.

Sat Jul 14 12:16:17 2007  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/openssl/test_pkcs7.rb: follow the library change.  applied a
	  patch from <zn at mbf.nifty.com> [ruby-dev:31214].
	  NOTE: r12496 imports the latest openssl libs from trunk to ruby_1_8
	  though its's not ChangeLog-ed.  maintainer should aware that.

Sat Jul 14 02:51:52 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (fix_pow): 0**2 should not raise floating point
	  exception.  [ruby-dev:31216]

Sat Jul 14 02:25:48 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (int_pow): wrong overflow detection.  [ruby-dev:31213]

	* numeric.c (int_pow): wrong overflow detection.  [ruby-dev:31215]

Fri Jul 13 16:10:00 2007  Tanaka Akira  <akr@fsij.org>

	* lib/open-uri.rb (URI::Generic#find_proxy): use ENV.to_hash to access
	  http_proxy environment variable to avoid case insensitive
	  environment search.

Fri Jul 13 15:02:15 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (CreateChild): enclose command line except for
	  command.com which can not handle quotes.  [ruby-talk:258939]

Fri Jul 13 10:10:46 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (link_command, cc_command, cpp_command): do not expand
	  ::CONFIG which is an alias of MAKEFILE_CONFIG.

Thu Jul 12 17:03:15 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* struct.c (rb_struct_init_copy): disallow changing the size.
	  [ruby-dev:31168]

Wed Jul 11 23:38:14 2007  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* random.c: documentation fix.  srand(0) initializes PRNG with '0',
	  not with random_seed.

Tue Jul 10 14:50:01 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bcc32/{Makefile.sub,setup.mak}: remove surplus slash from srcdir.

Fri Jul  6 15:22:58 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_interrupt): suppress a gcc's officious warning.

Thu Jul  5 16:44:28 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* numeric.c (int_pow): fix previous nubu's commit.

	* test/ruby/test_fixnum.rb: new test.

Thu Jul  5 15:56:06 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (int_pow): even number multiplication never be negative.

Mon Jul  2 14:34:43 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): sign bit extension should not be done
	  if FPLUS flag is specified.  [ruby-list:39224]

Sat Jun 30 16:05:41 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_initialize): should call rb_ary_modify() first.
	  [ruby-core:11562]

Sat Jun 30 00:17:00 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yylex): return non-valid token for an invalid
	  instance/class variable name.  a patch from Yusuke ENDOH
	  <mame AT tsg.ne.jp>.  [ruby-dev:31095]

Fri Jun 29 11:23:09 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (dsym): return non-null NODE even if yyerror().  based on a
	  patch from Yusuke ENDOH <mame AT tsg.ne.jp>.  [ruby-dev:31085]

Tue Jun 26 16:35:21 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (ruby_setreuid, ruby_setregid): rename to get rid of name
	  clash.

	* process.c (proc_exec_v, rb_proc_exec): preserve errno.

Sat Jun 23 00:37:46 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* hash.c (rb_hash_select): remove unnecessary varargs for
	  rb_hash_select.  a patch from Daniel Berger
	  <Daniel.Berger at qwest.com>.   [ruby-core:11527]

	* hash.c: ditto.

Mon Jun 18 08:47:54 2007  Technorama Ltd.  <oss-ruby@technorama.net>

	* ext/openssl/{extconf.rb,ossl_ssl_session.c}:
	  Fix ruby-Bugs-11513.

	* ext/openssl/ossl_pkey_ec.c
	  New methods EC::Point.[eql,make_affine!,invert!,on_curve?,infinity?]
	  By default output the same key form as the openssl command.

	* ext/openssl/ossl_rand.c
	  New method Random.status?

Mon Jun 18 13:54:36 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_cleanup): return EXIT_FAILURE if any exceptions occured
	  in at_exit blocks.  [ruby-core:11263]

Mon Jun 18 01:14:10 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (rb_path2class): get rid of dangling pointer caused by
	  optimized out value.

	* variable.c (rb_global_entry, rb_f_untrace_var, rb_alias_variable,
	  rb_generic_ivar_table, generic_ivar_get, generic_ivar_set,
	  generic_ivar_defined, generic_ivar_remove, rb_mark_generic_ivar,
	  rb_free_generic_ivar, rb_copy_generic_ivar,
	  rb_obj_instance_variables): suppress warnings.

Fri Jun 15 22:33:29 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (realclean): separate local and ext.

	* ext/extmk.rb: not remove unrelated directories.

Fri Jun 15 17:01:20 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/lib/dl/win32.rb: seems that dl doesn't accept void argument.
	  fixed [ruby-bugs:PR#5489].

Thu Jun 14 17:09:48 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser): handle more
	  extensions.  [ruby-dev:30972]

Wed Jun 13 06:05:12 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (darwin): prohibit loading extension libraries to
	  miniruby.

Wed Jun 13 05:47:58 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_kill_thread): renamed in order to get rid of conflict
	  with a BeOS system function.  [ruby-core:10830]

Tue Jun 12 14:53:51 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (Logging.quiet, Logging.message): added quiet flag and
	  use it.  [ruby-core:10909]

	* lib/mkmf.rb (find_header): use header names in the message.

Sun Jun 10 13:47:36 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_beginendblock.rb (test_should_propagate_signaled):
	  get rid of invoking shell.  [ruby-dev:30942]

Thu Jun  7 19:02:48 2007  Tanaka Akira  <akr@fsij.org>

	* lib/pp.rb: call original "method" method instead of redefined one.

Mon Jun  4 11:11:12 2007  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (ResponseParser#next_token): fixed
	  error message. (backported from HEAD)

	* lib/net/imap.rb (ResponseParser#parse_error): fixed
	  the condition not to refer @token.symbol unexpectedly.
	  Thanks, Dick Monahan. (backported from HEAD)

Thu May 31 17:27:53 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/benchmark.rb (Benchmark::Job::item): avoid modifying the
	  argument unintentionally.  [ruby-talk:253676]

Thu May 31 02:12:32 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb (Rinda::TupleBag): create index on tuple bag
	  by first column.

Wed May 30 13:27:40 2007  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (Net::FTP#transfercmd): skip 2XX
	  responses for some FTP servers. (backported from HEAD)

Wed May 30 05:17:55 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): get rid of SEGV at ZSUPER in a block
	  [ruby-dev:30836]

Wed May 30 04:29:43 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (thread_timer): timer thread should not receive any
	  signals.  submitted by Sylvain Joyeux.  [ruby-core:08546]

Wed May 30 04:18:37 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval_cmd): just return if no exceptions.
	  [ruby-dev:30820]

Tue May 29 11:01:06 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_opendir): store attributes of the second
	  entries or later too.

	* win32/win32.c (rb_w32_opendir, rb_w32_readdir): eliminate magic
	  numbers.

Mon May 28 02:54:05 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb (Rinda::TupleBag#delete): use rindex and
	  delete_at instead of delete for little improvement.

Sat May 26 00:05:22 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_beginendblock.rb (test_should_propagate_signaled):
	  skip tests for exitstatus and termsig on the platforms where
	  signals not supported.

Wed May 23 06:51:46 2007  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* lib/cgi.rb (CGI#[]): get rid of exceptions being raised.
	  [ruby-dev:30740], Thanks Kentaro KAWAMOTO.

Wed May 23 05:49:49 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb, ext/purelib.rb, lib/mkmf.rb, runruby.rb: clear default
	  load path to get rid of load pre-installed extensions/libraries.
	  [ruby-core:11017]

Sat May 19 10:29:18 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (Date._parse): detects some OFX dates
	  (Of course not fully).

Fri May 18 23:07:33 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_first): call rb_ary_subseq() instead of pushing
	  values by itself.  [ruby-talk:252062]

	* array.c (rb_ary_first): add negative length check.

Fri May 18 17:10:31 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (move_to_next_entry): loc also must move forward.
	  [ruby-talk:251987]

Fri May 18 03:02:40 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/mkexports.rb: preserve prefixed underscores for WINAPI
	  symbols.

	* wince/mkconfig_wce.rb, wince/mkexports.rb: obsolete.

Thu May 17 17:03:11 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-style.el (ruby-style-label-indent): for yacc rules.

Tue May 15 14:54:07 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (init_stdhandle): stderr should be without buffering,
	  but mswin32 use buffering when stderr is not connected to tty.

Mon May 14 13:28:03 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/thread/thread.c (wait_list): supress a warning.

Thu May 10 15:21:51 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/iconv/iconv.c (iconv_s_conv): rdoc fix.

Thu May 10 10:14:14 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_priority): rdoc fix; the initial value is
	  inherited from the creating thread.  [ruby-core:10607]

Wed May  9 12:28:57 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (Init_Bignum), numeric.c (Init_Numeric): added fdiv as
	  aliases of quo.  [ruby-dev:30771]

Wed May  9 11:55:15 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_quo): now calculate in integer.  [ruby-dev:30753]

Wed May  9 11:51:06 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big_pow): reduce multiplying for even number.

	* bignum.c (rb_big_pow): truncate all zero BDIGITs. [ruby-dev:30733]

	* bignum.c (rb_big_pow): improvement by calculating from MSB and using
	  factorization.  <http://yowaken.dip.jp/tdiary/20070426.html#p01>

	* numeric.c (int_pow): calculate power in Fixnum as possible.
	  [ruby-dev:30726]

Tue May  8 23:42:51 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (Date._parse): revised treatment of
	  hyphened/separatorless dates.

	* lib/date/format.rb: some trivial adjustments.

Tue May  8 20:25:05 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb: reverted.

Sat May  5 16:26:33 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/date/format.rb (Format::Bag#method_missing): get rid of
	  modifying orginal argument.  [ruby-core:11090]

Mon Apr 30 01:17:51 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb (TupleSpace#create_entry, TupleBag#push,
	  delete): extract method, and rename parameter.

Fri Apr 27 02:00:17 2007  Ryan Davis  <ryand-ruby@zenspider.com>

	* signal.c: Fixed backwards compatibility for 'raise Interrupt'.

	* lib/yaml/tag.rb: Running rdoc over the 1.8.6 tree skips
	  Module. Patch from James Britt

Thu Apr 26 13:54:51 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-style.el: new file.  C/C++ style for ruby source code.

Wed Apr 25 19:49:16 2007  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (unix_send_io, unix_recv_io): use CMSG_DATA to
	  align file descriptor appropriately.

Tue Apr 24 09:33:57 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (do_stat, do_lstat, do_opendir): should not warn ENOTDIR.
	  [ruby-talk:248288]

Mon Apr 23 22:14:42 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb ($ruby): add extout directory to include path.
	  [ruby-core:11003]

	* lib/mkmf.rb (libpathflag): not to append RPATHFLAG to current
	  directory.

	* lib/mkmf.rb (init_mkmf): add current directory to default
	  library path with highest priority.  [ruby-core:10960]

	* lib/mkmf.rb (LINK_SO): LIBPATH to be placed before DLDFLAGS.

Fri Apr 20 16:05:22 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LIBPATHFLAG, RPATHFLAG): no needs to be quoted,
	  it is done by libpathflag in mkmf.rb.

Fri Apr 20 12:27:04 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb: fix to override conv proc.

Fri Apr 20 12:17:05 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_cleanup): inversed the order of errinfos.

Thu Apr 19 14:53:32 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/monitor.rb (ConditionVariable#wait, mon_enter, mon_exit_for_cond):
	  ensures Thread.critical to be false.  [ruby-talk:248300]

Wed Apr 18 10:41:21 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_strtod): exponent is radix 10.  [ruby-talk:248272]

Wed Apr 18 02:30:24 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LDFLAGS): prepend -L. instead appending it to
	  XLDFLAGS.  [ruby-core:10933]

	* configure.in (Makefile): remove $U for automake from MISSING.
	  [ruby-talk:248171]

Tue Apr 17 16:46:46 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_yield_0): should not clear state on TAG_NEXT when
	  it's invoked from within lambda body.  [ruby-talk:248136]

	* eval.c (proc_invoke): handle TAG_NEXT which would be caused by
	  next in the lambda body as well.

Mon Apr 16 22:56:01 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/pty/expect_sample.rb: avoid symbolic link representation for
	  expect.  a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>.
	  [ruby-dev:30714]

Mon Apr 16 22:51:11 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sample: replace TRUE, FALSE with true, false respectively.
	  a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>.
	  [ruby-dev:30713]

Mon Apr 16 17:08:02 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (make_switch): do not clobber converter if pattern
	  has no convert method.  reported by sheepman in [ruby-dev:30709].

Mon Apr 16 16:49:32 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_seek): consistent behavior with
	  IO#seek.  patch by sheepman in [ruby-dev:30710].

Mon Apr 16 16:34:08 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (parser_yylex): should set command_start after block
	  starting "do"s and braces.  [ruby-core:10916]

Sun Apr 15 09:19:57 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb: added some zone names.

	* lib/date/format.rb (_parse): now interprets doted numerical
	  dates as a big endian (except dd.mm.yyyy).

Tue Apr 10 17:37:36 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_fclose, rb_w32_close): need to save errno
	  before calling original fclose()/close().

Mon Apr  9 09:30:44 2007  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (disconnect): call shutdown for
	  SSLSocket. Thanks, Technorama Ltd.

Thu Apr  5 00:42:48 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_notimplement), io.c (pipe_open): removed definite
	  articles and UNIX manual section from messages.  [ruby-dev:30690]

Wed Apr  4 17:09:17 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (pipe_open): refined the message of NotImplementedError.
	  [ruby-dev:30685]

Wed Apr  4 10:18:04 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (pipe_open): raise NotImplementedError for command "-" on
	  platforms where fork(2) is not available.  [ruby-dev:30681]

Tue Apr  3 15:45:41 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/socket.c (s_recv, s_recvfrom): some systems (such as
	  windows) doesn't set fromlen if the socket is connection-oriented.
	  reported by Bram Whillock in [ruby-core:10512] [ruby-Bugs#9061]

Sat Mar 24 23:40:29 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (struct rb_thread.locals): explicit as struct.
	  [ruby-core:10585]

	* eval.c, node.h (enum rb_thread_status, struct rb_thread,
	  rb_curr_thread, rb_main_thread): prefixed.  [ruby-core:10586]

	* file.c (chompdirsep): made an unprefixed name static.

	* io.c (io_fread): ditto.

Sat Mar 24 01:54:03 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_cleanup): exit by SystemExit and SignalException in END
	  block.  [ruby-core:10609]

	* test/ruby/test_beginendblock.rb (test_should_propagate_exit_code):
	  test for exit in END block.  [ruby-core:10760]

	* test/ruby/test_beginendblock.rb (test_should_propagate_signaled):
	  test for signal in END block.

Thu Mar 22 23:13:17 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_provided): check for extension library if SOEXT is
	  explicitly given.  [ruby-dev:30657]

Thu Mar 22 10:29:25 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_bignum.rb (test_to_s): add tests for Bignum#to_s.

Wed Mar 21 17:04:30 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bignum.c (rb_big2str0): round up for the most significant digit.
	  [ruby-core:10686]

Wed Mar 21 07:21:24 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c (remove_one): Preserve List invariants;
	  submitted by: MenTaLguY <mental AT rydia.net>
	  in [ruby-core:10598] and [ruby-bugs:PR#9388].

Tue Mar 20 22:54:50 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_extended): erroneous check condition when dump
	  method is defined.  [ruby-core:10646]

Tue Mar 20 15:37:24 2007  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* distruby.rb: Add zip generation.

Tue Mar 20 11:28:41 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/matrix.rb (Matrix::inverse_from): adding partial pivoting to
	  the Gauss-Jordan algorithm, making it stable.  a patch from
	  Peter Vanbroekhoven.  [ruby-core:10641]

Mon Mar 19 11:39:29 2007  Minero Aoki  <aamine@loveruby.net>

	* lib/net/protocol.rb (rbuf_read): extend buffer size for speed.

Sun Mar 18 04:23:52 2007  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Add a note about the new `date' library defining
	  Time#to_date and Time#to_datetime private methods.

	* NEWS: Inform that the old `thread' library is considered to be
	  stable.

	* NEWS: Sort library entries in alphabetical order.

Fri Mar 16 21:48:11 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/dl/dl.c (rb_ary2cary): Fix a bug in type validation;
	  submitted by sheepman <sheepman AT sheepman.sakura.ne.jp>
	  in [ruby-dev:30554].

Fri Mar 16 18:28:06 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/etc/etc.c (etc_getgrgid): Fix a bug in Etc::getgrgid()
	  always returning the (real) group entry of the running process;
	  reported by: UEDA Hiroyuki <ueda AT netforest.ad.jp>
	  in [ruby-dev:30586].

Fri Mar 16 16:33:58 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c (unlock_mutex_inner): Make sure that the
	  given mutex is actually owned by the caller; submitted by:
	  Sylvain Joyeux <sylvain.joyeux AT m4x.org> in [ruby-core:10598].

Fri Mar 16 16:21:35 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c (wait_condvar, lock_mutex): Fix a problem in
	  ConditionVariable#wait that occurs when two threads that are
	  trying to access the condition variable are also in concurrence
	  for the given mutex; submitted by: Sylvain Joyeux
	  <sylvain.joyeux AT m4x.org> and MenTaLguY <mental AT rydia.net>
	  in [ruby-core:10598].

Fri Mar 16 16:17:27 2007  Akinori MUSHA  <knu@iDaemons.org>

	* test/thread/test_thread.rb: Add a test script for the `thread'
	  library.  This should result in failure as of now with
	  ext/thread; submitted by: Sylvain Joyeux <sylvain.joyeux AT
	  m4x.org> in [ruby-core:10598].

Wed Mar 14 12:30:00 2007  Shigeo Kobayashi  <shigeo@tinyforest.jp>

	* ext/bigdecimal/bigdecimal.c: BigDecimal("-.31") is now
	  treated as ("-0.31") not as ("0.31").

Tue Mar 13 09:25:10 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (clear-installed-list): separated from install-prereq.

Tue Mar 13 06:38:43 2007  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Reword and improve entries.

Tue Mar 13 06:03:46 2007  Akinori MUSHA  <knu@iDaemons.org>

	* stable version 1.8.6 released from the ruby_1_8_6 branch.

Tue Mar 13 03:24:07 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* runruby.rb: added --pure (turned on by default) and --debugger
	  options.

Tue Mar 13 02:50:28 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/cgi.rb (CGI::header): IIS >= 5.0 does not need the nph
	  assumption any more; submitted by MIYASAKA Masaru <alkaid AT
	  coral.ocn.ne.jp> in [ruby-dev:30537].

Mon Mar 12 11:07:44 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/openssl/ossl_asn1.c (Init_ossl_asn1): Let rdoc know about
	  externally defined modules; submitted by Technorama
	  Ltd. <oss-ruby AT technorama.net> in [ruby-bugs:PR#4704].

	* ext/openssl/ossl_bn.c (Init_ossl_bn): Ditto.

	* ext/openssl/ossl_cipher.c (Init_ossl_cipher): Ditto.

	* ext/openssl/ossl_digest.c (Init_ossl_digest): Ditto.

	* ext/openssl/ossl_hmac.c (Init_ossl_hmac): Ditto.

	* ext/openssl/ossl_pkey.c (Init_ossl_pkey): Ditto.

	* ext/openssl/ossl_pkey_dh.c (Init_ossl_dh): Ditto.

	* ext/openssl/ossl_pkey_dsa.c (Init_ossl_dsa): Ditto.

	* ext/openssl/ossl_pkey_rsa.c (Init_ossl_rsa): Ditto.

	* ext/openssl/ossl_rand.c (Init_ossl_rand): Ditto.

	* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Ditto.

Mon Mar 12 01:05:17 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/dl/sym.c (rb_dlsym_inspect): Use "0x%x" rather for pointers.
	  This might not be very right but it is commonly used in other
	  parts of the code; submitted by sheepman <sheepman AT
	  sheepman.sakura.ne.jp> in [ruby-dev:30532].

	* ext/dl/ptr.c (rb_dlptr_inspect): Ditto.

Mon Mar 12 00:59:19 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/dl/lib/dl/import.rb (DL::Importable::Internal::import,
	  DL::Importable::Internal::callback): Avoid race condition for an
	  instance variable; submitted by sheepman <sheepman AT
	  sheepman.sakura.ne.jp> in [ruby-dev:30530].

Sun Mar 11 18:57:50 2007  Akinori MUSHA  <knu@iDaemons.org>

	* misc/README: Add a note about ruby-electric.el.

	* misc/ruby-mode.el (ruby-non-block-do-re): Fix
	  ruby-non-block-do-re. [ruby-core:03719]

	* misc/inf-ruby.el: Synchronize the comment section with trunk.

	* misc/README, misc/rdebug.el: Add rdebug.el, Emacs ruby-debug
	  interface based on rubydb3x.el; submitted by Martin Nordholts
	  <enselic AT gmail.com> in [ruby-bugs:PR#9023].

Sun Mar 11 17:45:51 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/dl/mkcallback.rb (mkfunc): Make sure that a callback
	  function is found in the function table before trying to call
	  it; submitted by sheepman <sheepman AT sheepman.sakura.ne.jp>
	  in [ruby-dev:30524].

Sun Mar 11 12:09:37 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (error_handle): no message when exiting by signal.

	* eval.c (ruby_cleanup): re-send signal.  [ruby-dev:30516]

	* eval.c (rb_thread_interrupt): instantiate SignalException.

	* eval.c (rb_thread_signal_raise): now takes signal number instead
	  of signal name.

	* intern.h (rb_thread_signal_raise, ruby_default_signal): prototypes.

	* signal.c (esignal_init): takes a signal number and an optional
	  signal name.

	* signal.c (interrupt_init): pass SIGINT always.

	* signal.c (ruby_default_signal): invoke system default signal
	  handler.

	* signal.c (rb_signal_exec, trap): handle SIGTERM.  [ruby-dev:30505]

Tue Mar  6 19:08:46 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/lib/md5.rb (MD5::new, MD5::md5): Do not modify
	  Digest::MD5.

	* ext/digest/lib/sha1.rb (SHA1::new, SHA1::sha1): Ditto.

Tue Mar  6 18:58:37 2007  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* lib/shell/process-controller.rb: fix thread synchronization
	  problem for [ruby-dev:30477].

Tue Mar  6 18:44:26 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/lib/md5.rb (MD5::new, MD5::md5): Catch up with
	  Digest's API changes; noted by: Kazuhiro Yoshida <moriq AT
	  moriq.com> in [ruby-dev:30500].

	* ext/digest/lib/sha1.rb (SHA1::new, SHA1::sha1): Ditto.

Tue Mar  6 18:24:19 2007  Akinori MUSHA  <knu@iDaemons.org>

	* time.c (time_to_s): Back out the format changes; discussed
	  in [ruby-dev:30495].

Tue Mar  6 11:53:25 2007  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/irbtkw.rbw: fails to exit process.

Mon Mar  5 20:14:49 2007  Akinori MUSHA  <knu@iDaemons.org>

	* time.c (time_to_s): Correct the wrong format which did not
	  really conform to RFC 2822; pointed out by: OHARA Shigeki <os at
	  iij.ad.jp> in [ruby-dev:30487].

Sun Mar  4 23:38:07 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_stat_s_utime): fixed a commit miss for the platforms
	  where utimes() does not exist.

	* lib/fileutils.rb (touch): ditto.

Sun Mar  4 14:46:56 2007  WATANABE Hirofumi  <eban@ruby-lang.org>

	* util.c (push_element): should return a int value.

Sun Mar  4 01:05:57 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#^, Set#&): Correct documentation.  Those methods
	  return sets, not arrays; noted by Oliver Frank Wittich <nietz AT
	  mangabrain.de>.

Sat Mar  3 23:01:07 2007  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mv): could not move a directory between
	  different filesystems. [ruby-dev:30411]

Sat Mar  3 22:57:11 2007  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (touch): last commit causes error if :mtime
	  option was not given.

Sat Mar  3 22:37:02 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_utime): allow nil to set the current time.

	* lib/fileutils.rb (touch): ditto, and added :mtime and :nocreate
	  options.  fixed: [ruby-talk:219037]

Sat Mar  3 21:17:35 2007  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c (stack_check): Unset inline to fix build with GCC 3.4.6;
	  submitted by: NISHIMATSU Takeshi <t_nissie AT yahoo.co.jp> in
	  [ruby-list:43218].
	  cf. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24556

Sat Mar  3 19:05:31 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c (push_list): Use ALLOC().

	* ext/thread/thread.c (rb_mutex_alloc): Ditto.

	* ext/thread/thread.c (rb_condvar_alloc): Ditto.

Sat Mar  3 18:53:11 2007  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Add a note for String#intern.

Sat Mar  3 16:23:13 2007  Akinori MUSHA  <knu@iDaemons.org>

	* env.h (SCOPE_CLONE): Introduce a new scope flag to prevent a
	  local_tbl region from getting freed many times; submitted by
	  Chikanaga Tomoyuki <chikanag AT nippon-control-system.co.jp> in
	  [ruby-dev:30460].

	* eval.c (proc_invoke): Ditto.

	* gc.c (obj_free): Ditto.

	* parse.y (top_local_setup_gen): Ditto.

Sat Mar  3 16:07:02 2007  Akinori MUSHA  <knu@iDaemons.org>

	* object.c (rb_obj_ivar_set): RDoc updated according to a
	  suggestion from Brian Candler <B.Candler AT pobox.com>.
	  [ruby-core:10469]

Thu Mar  1 21:38:07 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (stmt, arg): should not omit lhs of OP_ASGN1 even if
	  empty.  [ruby-dev:30455]

Thu Mar  1 08:55:38 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_feature_p): check loading_tbl if the given ext is
	  empty.  [ruby-dev:30452]

	* eval.c (rb_feature_p): fix possible buffer overrun.

Thu Mar  1 03:30:21 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/digest.c (get_digest_base_metadata): Allow inheriting
	  Digest::Base subclasses, which was unintentionally made
	  impossible while restructuring Digest classes.

Thu Mar  1 02:05:17 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* mkconfig.rb (patchlevel): read from version.h.

Thu Mar  1 00:09:39 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_provided): return true only for features loaded from
	  .rb files, and not search actual library type.  [ruby-dev:30414]

Wed Feb 28 21:15:00 2007  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (ac_cv_func_fcntl): fcntl support for MinGW.

	* missing/flock.c: workaround for MinGW.

Wed Feb 28 20:51:32 2007  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* pack.c (pack_unpack): properly ignore non-base64 octets such as
	  UTF-8 encoded BOMs; submitted by SOUMA Yutaka <holon@radastery.jp>
	  to fix [ruby-core:10437]

Wed Feb 28 18:59:57 2007  Akinori MUSHA  <knu@iDaemons.org>

	* NEWS: Add NEWS, a document file to keep user visible feature
	  changes between releases.

Wed Feb 28 18:35:50 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/extconf.rb: no need to check unistd.h and sys/time.h.
	  they are already checked at configure.
	  reported by KOBAYASHI Yasuhiro [ruby-list:43225]

Wed Feb 28 18:34:48 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb ($DEFLIBPATH): default library paths ($(topdir), etc)
	  should be the first elements of library paths list.
	  reported by KOBAYASHI Yasuhiro [ruby-list:43225]

Wed Feb 28 18:31:32 2007  Akinori MUSHA  <knu@iDaemons.org>

	* doc/NEWS-1.8.0: Rename NEWS to NEWS-1.8.0.  This is way too old
	  NEWS.

Wed Feb 28 01:22:58 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/{dbm,gdbm}/test_{dbm,gdbm}.rb: shouldn't use host_os. use
	  target_os instead. reported by KOBAYASHI Yasuhiro [ruby-list:43225]

Wed Feb 28 00:08:11 2007  URABE Shyouhei  <shyouhei@ice.uec.ac.jp>

	* mkconfig.rb (RbConfig): add CONFIG['PATCHLEVEL']

	* common.mk: new target dist

	* distruby.rb: new file

Tue Feb 27 22:18:45 2007  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (--enable-auto-image-base): avoid the neccessity to
	  rebase the shared libs as much as possible;
	  submitted by Corinna Vinschen <spam at vinschen.de> in
	  [ruby-talk:240964].

Tue Feb 27 21:36:47 2007  WATANABE Hirofumi  <eban@ruby-lang.org>

	* util.c (__crt0_glob_function): use ruby_glob() instead of rb_globi().

Tue Feb 27 21:33:04 2007  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (ac_cv_func_setrlimit): workaround for djgpp.

Tue Feb 27 19:38:52 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/base64.rb (Base64::b64encode): Fix documentation; submitted
	  by David Symonds <dsymonds@gmail.com> in [ruby-core:10432].

Tue Feb 27 19:36:57 2007  Akinori MUSHA  <knu@iDaemons.org>

	* regex.c (calculate_must_string, slow_search, re_search): Silence
	  warnings regarding char * vs. unsigned char * mismatch;
	  submitted by Lyle Johnson <lyle.johnson@gmail.com>
	  in [ruby-core:10416].

	* ext/bigdecimal/bigdecimal.c (BigDecimal_load): Ditto.

	* ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto.

	* ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto.

	* ext/digest/digest.c (rb_digest_base_finish,
	  rb_digest_base_update): Ditto.

	* ext/nkf/nkf.c (rb_str_resize, rb_nkf_kconv, rb_nkf_guess1,
	  rb_nkf_guess2): Ditto.

Tue Feb 27 03:40:09 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c (wait_list_cleanup, rb_mutex_try_lock):
	  Eliminate rb_thread_critical switching where unnecessary;
	  implied by shugo in [ruby-dev:30412].

	* ext/thread/thread.c (set_critical): Merge in
	  thread_exclusive_ensure().

	* ext/thread/thread.c: Consistently use 0 and 1 for
	  rb_thread_critical values.

Mon Feb 26 15:18:23 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c: Use xmalloc()/xfree() instead of
	  malloc()/free(); pointed out by shugo in [ruby-dev:30412].

Sun Feb 25 23:02:55 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize):
	  Initialize @workdir properly to silence a warning under -w.
	  Submitted by <tommy at tmtm.org> in [ruby-dev:30400].

Sun Feb 25 02:47:43 2007  Akinori MUSHA  <knu@iDaemons.org>

	* defines.h: Pull the RUBY_MBCHAR_MAXSIZE definition from trunk,
	  which is necessary for dir.c to compile on djgpp and emx.

Sat Feb 24 10:42:01 2007  Minero Aoki  <aamine@loveruby.net>

	* ext/racc/cparse/cparse.c (cparse_params_mark): remove useless
	  rb_gc_mark.  Thanks Tomoyuki Chikanaga. [ruby-dev:30405]

Fri Feb 23 15:10:46 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (set_pioinfo_extra): new function for VC++8 SP1
	  workaround. [ruby-core:10259]

	* win32/win32.c (NtInitialize): call above function.

Fri Feb 23 14:19:40 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* signal.c (sighandler): need to tell to be interrupted to main
	  context when handler is installed.

	* win32/win32.[ch] (rb_win32_interrupted): new function to listen
	  interrupt.

Fri Feb 23 13:02:17 2007  Akinori MUSHA  <knu@iDaemons.org>

	* numeric.c (fix_cmp, fix_equal): Remove FIX2LONG() to optimize.
	  suggested in
	  http://t-a-w.blogspot.com/2007/02/making-ruby-faster.html.
	  [ruby-talk:240223]

Fri Feb 23 12:43:17 2007  James Edward Gray II  <james@grayproductions.net>

	* lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): Make the
	  Content-Length parameter optional for responses in
	  xmlrpc/client.rb; suggested by Daniel Berger
	  <Daniel.Berger@qwest.com> and approved by the maintainer.

	* lib/xmlrpc/create.rb (XMLRPC::Create::conv2value): Add DateTime
	  support to xmlrpc; approved by the maintainer.

Mon Feb 19 18:22:52 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in, defines.h, eval.c (rb_feature_p, rb_provided,
	  load_wait, search_required, rb_require_safe), ext/extmk.rb: Fix
	  a bug where a statically linked extension cannot be autoloaded.
	  [ruby-dev:30023] / [ruby-dev:30239]

Mon Feb 19 17:14:28 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (unix_peeraddr): wrong syscall name in error
	  message for #peeraddr. a patch from Sam Roberts
	  <sroberts at uniserve.com>.  [ruby-core:10366]

Sun Feb 18 19:35:21 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb: updated based on date2 4.0.3.

Fri Feb 16 11:18:21 2007  Eric Hodel  <drbrain@segment7.net>

	* lib/.document: Apply patch for irb, e2mmap and README by Hugh Sasse
	  <hgs at dmu.ac.uk> from [ruby-core:10135]

	* lib/prettyprint.rb: Suppress RDoc for PrettyPrint test suite.

Thu Feb 15 20:26:30 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/uri/ftp.rb: Revert the previous change pending discussion.

Thu Feb 15 18:08:17 2007  Akinori MUSHA  <knu@iDaemons.org>

	* dir.c (glob_helper): Fix the function declaration.

Thu Feb 15 17:13:32 2007  Akinori MUSHA  <knu@iDaemons.org>

	* version.h: Welcome to the post-1.8.6 world.  Radical changes are
	  inhibited in the ruby_1_8 branch until the 1.8.6 final release
	  goes out of the door.

Thu Feb 15 16:44:14 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/uri/generic.rb (URI::Generic::userinfo): Considering how
	  `scheme://user:@...', `scheme://:password@...' and
	  `scheme://:@...' are parsed, an empty user name or password
	  should be allowed and represented as it is.

Thu Feb 15 11:46:05 2007  KIMURA Koichi  <hogemuta@gmail.com>

	* dir.c, win32/win32.c, win32/dir.h, ruby.h, intern.h: Bring
	  encoding aware globbing support in from trunk.  Dir.[] and
	  Dir.glob() can now take many patterns in an array.  Minor fixes
	  will follow.

Thu Feb 15 11:00:26 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/uri/generic.rb (URI::Generic::userinfo): should support
	  empty password.  [ruby-core:10290]

	* lib/uri/generic.rb (URI::Generic::set_password): password can be
	  cleared by nil.  [ruby-core:10290]

	* lib/uri/common.rb (escape): regard second string argument as a
	  character set properly. [ruby-dev:27692]

	* lib/uri/ftp.rb: Attempt to conform to RFC 1738 with regard to
	  relative/absolute paths.

	* lib/uri: Lovely RDOC patches from mathew (metaATpoboxDOTcom).

Thu Feb 15 10:57:38 2007  Tietew  <tietew@tietew.net>>

	* lib/cgi.rb (CGI::unescapeHTML): invalid decoding for single
	  unescaped ampersand.  a patch from Tietew
	  <tietew+ruby-dev at tietew.net> in [ruby-dev:30292].
	  fixed: [ruby-dev:30289]

Thu Feb 15 10:48:40 2007  MenTaLguY  <mental@rydia.net>

	* ext/thread/thread.c: Handle interrupted waits correctly.
	  [ruby-bugs:PR#8663]

Wed Feb 14 19:22:15 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/lib/digest.rb (Digest::self.const_missing): Drop
	  autoloads for sha2 classes in favor of handling in
	  const_missing(), to work around a problem exposed on OS X.

Tue Feb 13 02:21:12 2007  Sam Roberts  <sroberts@uniserve.com>

	* io.c (rb_f_syscall): Fix buffer overflow with syscall
	  arguments.  [ruby-bugs:PR#8541]

Sun Feb 11 07:46:45 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/cgi.rb (CGI::QueryExtension::read_multipart): Properly parse
	  a quoted-string in a Content-Disposition value.

Sun Feb 11 06:27:54 2007  Akinori MUSHA  <knu@iDaemons.org>

	* configure.in, ext/thread/extconf.rb, lib/thread.rb: Add a
	  configure option `--disable-fastthread', to choose the original,
	  pure ruby version of the "thread" library instead of the new,
	  much faster implementation in ext/thread.

Sun Feb 11 06:22:20 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/Setup: Add thread except for platforms without threads
	  support.

Sun Feb 11 06:15:16 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/lib/thread.rb: Add a replacement of thread.rb that
	  loads this extension.

Sun Feb 11 05:39:47 2007  Akinori MUSHA  <knu@iDaemons.org>

	* lib/thread.rb: Remove an ineffective part of the code.

Sun Feb 11 05:32:54 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c (rb_thread_exclusive): Implement
	  Thread.exclusive.

Sun Feb 11 05:26:51 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread/thread.c: Get rid of use of a dummy function.

Sun Feb 11 01:45:31 2007  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/thread/thread.c (Init_thread): Define missing aliases:
	  Queue#enq and SizedQueue#enq.

Sat Feb 10 09:27:35 2007  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_variant2val): fix compile error
	  on VC++.

Sat Feb 10 07:41:52 2007  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_variant2val): fix the bug when
	  SAFEARRAY pointer is NULL.

Sat Feb 10 00:13:11 2007  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: fix typo (TkConfigMethod::__confinfo_cmd,
	  __conv_keyonly_opts).

Fri Feb  9 20:44:53 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread: Make style fixes (mostly de-K&R'ism) to match the
	  rest of the source code.

	* ext/thread: Make USE_MEM_POOLS an extconf option.

Fri Feb  9 20:43:01 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/thread: Import the "fastthread" implementation by MenTaLguY
	  in the original form.  This module is not hooked into the build
	  yet since it needs some style fixes and adjustments.

Fri Feb  9 15:46:09 2007  Akinori MUSHA  <knu@iDaemons.org>

	* ext/bigdecimal: Synchronize with trunk.  Better function
	  prototypes, removal of a useless method `!=', and document
	  updates.

Tue Feb 06 22:06:45 2007  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c}:
	  imported nkf 2007-01-28.
	  * Fixed: can't decode MIME encode JIS string.
	  * Fixed: Fullwitdh-halfwidth conversion.
	  * Support DoCoMo's and Softbank's EMOJI
	  * Support CP932, CP5022x, eucJP-ms UDC
	  * Support UTF-32 encoding
	  * Support beyond BMP
	  [ruby-dev:29700] [ruby-dev:29922] [ruby-dev:30144]

Wed Jan 31 14:52:09 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_iterate): need to PUSH_ITER in proper order.
	  [ruby-core:10125]

	* test/ruby/test_iterator.rb (TestIterator::test_block_given_within_iterator):
	  add new test.  [ruby-core:10125]

Tue Jan 30 14:58:51 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* string.c (rb_str_sub_bang): calling rb_str_modify() should be just
	  before actually modifying the string.
	  fixed: [ruby-dev:30211] (originally reported by zunda)

Tue Jan 30 12:05:35 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* mkconfig.rb: autoconf 2.61 support.  [ruby-core:10016]

Sat Jan 27 15:20:11 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (dyna_var_lookup): should not alter dvar->val not to
	  destroy living value.  [ruby-core:10076]

	* parse.y (dyna_init): ditto.

Fri Jan 26 12:03:39 2007  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb (TkConfigMethod#__confinfo_cmd,
	  __conv_keyonly_optkeys): make them private [ruby-dev:30074].

	* ext/tk/lib/tk/txtwin_abst.rb: fix typo [ruby-dev:30073].

	* ext/tk/lib/tk/canvas.rb (TkCanvas#scan_dragto): lack of an argument.

	* ext/tk/lib/tk/canvas.rb: clarify the including module name
	  [ruby-dev:30080].

	* ext/tk/lib/tk/scrollable.rb: change primary name of modules
	  [ruby-dev:30080].

Wed Jan 24 18:05:39 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): fix
	  regexp font-lock bug.  [ruby-talk:235758]

Tue Jan 23 11:02:33 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest::read_line):

Tue Jan 23 18:26:12 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::QueryExtension::read_multipart): use == instead
	  of ===.  [ruby-dev:30176]

Tue Jan 23 10:48:17 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* hash.c: added documentation for Hash about how it uses eql? and
	  hash methods for the keys.  [ruby-core:09995]

Mon Jan 22 14:57:25 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c: fix errors in socket sample code.
	  [ruby-core:09992]

Sat Jan 13 23:54:48 2007  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_free, ole_type_free,
	  olemethod_free, olevariable_free, oleparam_free,
	  ole_event_free): fix memory leak.  [ruby-core:09846]

Fri Jan 12 11:13:55 2007  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/etc/etc.c (etc_getpwuid, etc_getgrgid): fix to correctly
	  convert uid/gid from VALUE. (backport of r11521)

Wed Jan 10 18:57:57 2007  Minero Aoki  <aamine@loveruby.net>

	* ext/strscan/strscan.c (strscan_do_scan): should set kcode option
	  before match. [ruby-dev:29914]

	* test/strscan/test_stringscanner.rb: test it.

	* re.c: export kcode_set_option and kcode_reset_option (with "rb_"
	  prefix).

	* intern.h: ditto.

Tue Jan  9 17:45:17 2007  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (rb_find_file): should not call fpath_check() with NULL.
	  fixed: [ruby-core:09867]

Tue Jan  9 03:54:38 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_upto): String#upto from empty string makes
	  inifinite loop.  [ruby-core:09864]

Sun Jan  7 12:13:26 2007  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#find_class_comment):
	  Look for class and module comments above rb_define_class and
	  rb_define_module.  Patch by Daniel Berger <djberg96 at gmail.com>

Sun Jan  7 10:32:12 2007  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constants):
	  Properly handle escaping of : in comments.
	* test/rdoc/parsers/test_parse_c.rb:
	  Test RDoc::C_Parser#do_classes and Rdoc::C_Parser#find_class_comment.

Sun Jan  7 09:33:02 2007  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb: updated based on date2 4.0.1.

Wed Jan  3 11:36:51 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (ruby_dup): start GC on ENOMEM as well.

Mon Jan  1 06:13:11 2007  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/c_parser.rb: Make Rdoc accessible.  Update constant
	  value information.

Mon Jan  1 06:13:11 2007  Eric Hodel  <drbrain@segment7.net>

	* ext/bigdecimal/bigdecimal.c: Update constant comments to provide
	  values for RDoc.

Mon Jan  1 06:05:55 2007  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constansts):
	  Allow RDoc comment to give friendly value for rb_define_const.  Patch
	  by Daniel Berger <djberg96 at gmail.com>, [ruby-patches-7499].
	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constansts): Fix
	  whitespace handling in constant comments.

Sun Dec 31 00:31:16 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: updated based on date2 4.0.

Thu Dec 14 18:29:13 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/readline/readline.c: NetBSD editline does not have
	  rl_username_completion_function() and rl_completion_matches().
	  a patch from Takahiro Kambe <taca at back-street.net>.
	  [ruby-dev:30008]

Thu Dec 14 18:20:43 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/locale.rb (IRB::Locale::puts): typo fixed.  a patch from
	  NAKAMURA Usaku <usa@ruby-lang.org>.  [ruby-dev:30012]

Mon Dec 11 11:58:36 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/sha2/lib/sha2.rb: Moved one level up from under
	  the superfluous subdirectory digest/.

Mon Dec 11 11:46:18 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_define_const): typo fixed.

Mon Dec 11 09:36:29 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_aset): index double decode problem.
	  [ruby-core:09695]

Sat Dec  9 21:39:24 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_cleanup): keep the exception till after END blocks.
	  [ruby-core:09675]

Sat Dec  9 11:22:00 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/locale.rb (IRB::Locale::search_file): ues File.exist?
	  instead of File.exists?.  a patch from Yutaka Kanemoto
	  <kinpoco at gmail.com> in [ruby-dev:30000].

Thu Dec  7 09:29:02 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/weakref.rb (WeakRef::__setobj__): should support
	  marshaling.  [ruby-talk:228508]

	* lib/delegate.rb (Delegator::marshal_load): need to call
	  __setobj__.

Wed Dec  6 23:56:14 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, common.mk (NULLCMD): moved for platforms that empty
	  command does not run.  fixed: [ruby-dev:29994]

Wed Dec  6 17:17:26 2006  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (SITE_DIR): fixed to emtpy RUBY_SITE_LIB in config.h on
	  NetBSD.  fixed: [ruby-dev:29358]

Tue Dec  5 00:59:05 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el (ruby-parse-partial): need to parse "/=" as
	  self assignment operator, not regex.  [ruby-talk:227324]

Mon Dec  4 10:48:03 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.h (OFFT2NUM): use LONG2NUM() if sizeof(long) equals to
	  sizeof(off_t).

Mon Dec  4 10:43:46 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (dyna_init_gen): dvar initialization only if dvar is
	  assigned inner block.  [ruby-talk:227402]

Mon Dec  4 08:32:49 2006  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/cgi.rb (CGI::QueryExtension::read_multipart): should quote
	  boundary. JVN#84798830

Sat Dec  2 07:09:04 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ocsp.c: OpenSSL::OCSP::OSCPError should be
	  subclass of OpenSSL::OpenSSLError. [ruby-dev:29980]

Fri Dec  1 17:01:49 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* gc.c (ruby_init_stack): decrease "stack level too deep" in Windows.
	  merge from trunk.

Fri Dec  1 16:31:53 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c: shouldn't run the killed thread at callback.
	  [ruby-talk: 227408]

Mon Nov 27 17:18:27 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): need not to truncate string if no
	  width specifier given for %s.  [ruby-dev:29952]

Sun Nov 26 16:36:46 2006  URABE Shyouhei  <shyouhei@ruby-lang.org>

	* version.h: addition of RUBY_PATCHLEVEL.
	* version.c: ditto.

Fri Nov 24 10:17:51 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (bignorm): avoid segmentation.  a patch from Hiroyuki
	  Ito <ZXB01226@nifty.com>.  [ruby-list:43012]

Thu Nov 23 10:38:40 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_mod_define_method): set implicit visibility only when
	  it's called for the target class (ruby_cbase).

Wed Nov 22 16:00:49 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/extconf.rb: support --with-X11/--without-X11 option.

	* ext/tk/README.tcltklib: add description about --with-X11-* option
	  [ruby-talk:225166] and --with-X11/--without-X11 option.

	* ext/tk/tkutil/extconf.rb: able to be called manually
	  [ruby-talk:225950].

Wed Nov 15 23:22:54 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (test_grpowned, rb_stat_grpowned): should honor
	  supplementary group IDs.  [ruby-core:09546]

Thu Nov  9 03:15:22 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (BEGIN_CALLARGS): ruby_block may be NULL even when
	  ITER_PRE.

Tue Nov  7 18:34:34 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/lib/digest/hmac.rb: Keep this out of the 1.8 tree
	  until we reach a consensus that HMAC should be put under Digest.

Tue Nov  7 18:05:01 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/itemconfig.rb: minor bug fix.

Mon Nov  6 20:11:20 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/0.9.rb (RSS::Rss): removed needless include.

Mon Nov  6 15:41:55 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/itemconfig.rb: ext/tk/lib/tk/itemconfig.rb: bug
	  fix on 'itemconfiginfo' method, and modify to make it easy to
	  override 'itemconfiginfo' method.

	* ext/tk/lib/tkextlib/tile/treeview.rb : support Tile 0.7.8.

	* ext/tk/lib/tkextlib/version.rb : [new] add Tk::Tkextlib_RELEASE_DATE
	  to get the information from scripts.

	* ext/tk/lib/tk.rb: load 'tkextlib/version.rb', and update RELEASE_DATE

	* ext/tk/lib/tkextlib/SUPPORT_STATUS: update.

	* ext/tk/sample/editable_listbox.rb: [new] the listbox with editable
	  items. It's one of the example about usage of Place geometry manager.

	* ext/tk/sample/tktextio.rb: improve the functions of TkTextIO class.
	  Those are required by 'irbtkw.rbw'.

	* ext/tk/sample/irbtkw.rbw: [new] IRB on Ruby/Tk. It doesn't need any
	  real console. IRB works on a text widget without I/O blocking. That
	  is, thread switching on IRB will work properly, even if on Windows.

Sun Nov  5 19:53:49 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb: updated based on date2 3.9.7.

Sat Nov  4 13:13:57 2006  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb: accept NOMODSEQ. [ruby-core:9002]
	  (backported from HEAD)

Fri Nov  3 00:16:37 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (ruby_getnameinfo__aix): AF_INET6 workaround
	  for AIX.  a patch from Yutaka Kanemoto <kinpoco AT gmail.com>.
	  [ruby-dev:29744]

Thu Nov  2 15:43:39 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* parse.y (primary): should set NODE even when compstmt is NULL.
	  merge from trunk. fixed: [ruby-dev:29732]

Thu Nov  2 14:48:30 2006  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb (Set#^): Fix XOR operation against a container that
	  holds duplicate values. [issue: #6444]

Wed Nov  1 02:41:38 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/lib/digest/hmac.rb (Digest::HMAC::update): Minor
	  optimization.

	* ext/digest/digest.c (rb_digest_instance_equal): Allow comparing
	  a digest instance with another of a different class.

Wed Nov  1 01:05:13 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (rb_call0): fixed bug of zsuper with both of opt and rest.
	  fixed: [ruby-list:42928]

	* test/ruby/test_super.rb: add tests to check above bug.

Tue Oct 31 17:03:21 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_dup): duplicate the class of original time.
	  [ruby-core:09357]

	* lib/time.rb (Time::make_time, Time::rfc2822, Time::httpdate):
	  should respect subclasses.  [ruby-core:09357]

Mon Oct 30 23:40:52 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (miniruby): add XLDFLAGS.

	* configure.in (aix): use -bE option for miniruby.  [ruby-dev:29698]

	* dir.c (glob_helper): get rid of possible memory leak.

	* win32/win32.c (cmdglob, rb_w32_cmdvector, rb_w32_opendir,
	  rb_w32_get_environ): not to use GC before initialization.

Mon Oct 30 19:29:20 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bignum.c (rb_big2str0): use better approximation.

Mon Oct 30 18:35:33 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big2str0): wrong allocation length.  a patch from
	  U.Nakamura <usa at garbagecollect.jp> [ruby-dev:29710]

Mon Oct 30 12:34:02 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): fix commit miss.  [ruby-dev:29707]

Mon Oct 30 12:20:58 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big2str0): a bug in length adjustment.

Mon Oct 30 11:15:40 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_str_format): should preserve leading zero
	  information for negative %b and %x.  [ruby-talk:221347]

Thu Oct 26 21:05:58 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): should clear error.
	  (fix http://bugs.debian.org/394336)

	* ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): ditto.

Thu Oct 26 15:21:10 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/digest/digest.c (Init_digest): typo.

Wed Oct 25 17:23:28 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest, test/digest/test_digest.rb: Merge from trunk:
	  - Introduce versioning in Digest::Base API, and prefix C
	    constants with RUBY_ and C type names with rb_ to avoid name
	    clash in writing extensions.
	  - Introduce Digest::Class and Digest::Instance for ease of
	    implementing subclasses and add-ons.
	  - Digest::Instance module requires and assumes that any instance
	    be resettable and clonable.  An instance method #new() is
	    added so digest instances work just like digest classes.
	  - The constructor does no longer take an initial string to feed;
	    digest() and hexdigest() now do, instead.  This allows digest
	    classes to take their own hashing parameters.
	  - Make some changes to digest() and hexdigest() class methods,
	    which now take extra arguments, which are passed through to
	    the constructor in an internal call.
	  - Add #digest_length/size/length() and #block_length(),
	  - Add the Digest::SHA2 class to wrap up SHA2 variants: SHA256,
	    SHA384 and SHA512, hoping this module would make a decent
	    example of a digest subclass written in Ruby.
	  - Rip BubbleBabble support out of the base class and have a
	    separate module named digest/bubblebabble.
	  - Remove RD documents in favor of newly written and embedded
	    RDoc documentation.

Wed Oct 25 08:03:23 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb: updated based on date2 3.9.6.
	  [ruby-core:09323]

Sun Oct 22 14:48:31 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* signal.c (ruby_signal): don't set SA_RESTART.  a backport from
	  the HEAD.  [ruby-talk:220937]  [ruby-talk:147220]

	* signal.c (Init_signal): avoid duplicated installation of SIGCHLD
	  handler.

Sun Oct 22 16:47:56 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_substr): should be infected with only original
	  string, but not the shared string.  fixed: [ruby-core:09152]

	* string.c (rb_str_new4): keep shared string untainted when orignal
	  string is tainted.  fixed: [ruby-dev:29672]

Sun Oct 22 05:20:34 2006  URABE Shyouhei  <shyouhei@ice.uec.ac.jp>

	* configure.in: alloca is broken; use C_ALLOCA instead.
	  [ruby-dev:29416]

Fri Oct 20 10:47:43 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb: fixed the bug of handling COMMON_MACROS.

Fri Oct 20 08:42:38 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (NULLCMD): dummy command.

	* bcc32/Makefile.sub (post-install-*): Borland make cannot ignore
	  command-less double-colon rules.  [ruby-dev:29676]

Fri Oct 20 00:37:07 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bcc32/Makefile.sub ($(LIBRUBY_SO)): execute pre-link hook.

	* ext/extmk.rb: workaround for Borland make.

Wed Oct 18 23:02:40 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (rb_ary_shift): shorten copy size.  fixed: [ruby-list:42907]

	* signal.c (Init_signal): handle SIGTERM.  fixed: [ruby-list:42895]

	* win32/win32.c (rb_w32_utime): allow NULL to set the current time.
	  [ruby-talk:219248]

Wed Oct 18 00:55:33 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): use particular enums.  [ruby-core:09221]

Mon Oct 16 08:30:43 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* mkconfig.rb: *OBJS are not needed for extension libraries.

	* {bcc32,wince,win32}/Makefile.sub (config.status): fixed typo,
	  missing comma.

Sun Oct 15 01:03:08 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/collector/dir.rb (Collector::Dir#collect): append base
	  directory but not prepend.

	* lib/test/unit/collector/dir.rb (Collector::Dir#collect_file): do not
	  join with dot.  fixed: [ruby-core:09179]

Sat Oct 14 23:39:50 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (singleton): no need to re-create NODE_SELF() again.
	  [ruby-core:09177]

Sat Oct 14 23:25:31 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (parser_warning, parser_warn): some error message may
	  contain format specifiers.  a patch from Akinori MUSHA <knu at
	  iDaemons.org>.  [ruby-dev:29657]

	* ext/bigdecimal/bigdecimal.c (VpException): ditto.

	* ext/dl/handle.c (rb_dlhandle_initialize): ditto.

	* ext/gdbm/gdbm.c (rb_gdbm_fatal): ditto.

Sat Oct 14 08:24:45 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/lib/digest/hmac: Back out the addition of digest/hmac
	  for now because the API is too premature for a stable branch.

Sat Oct 14 00:55:08 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bcc32/Makefile.sub (post-install-ext): no longer needed.

	* bcc32/configure.bat: get rid of a quirk of Borland make, which
	  sets empty macro in command line to "1".

Fri Oct 13 22:50:43 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb: updated based on date2 3.9.5.

Fri Oct 13 22:33:28 2006  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (FileUtils.cp_r): dereference_root=true is
	  default in Ruby 1.8.  This line is wrongly removed in last commit.

Fri Oct 13 18:19:31 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c: Class#inherited RDoc added.  a patch from Daniel
	  Berger <djberg96 at gmail.com>  [ruby-core:08942]

Fri Oct 13 02:30:12 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/collector/dir.rb (Collector::Dir#collect): prepend
	  base directory to load path.

	* lib/test/unit/collector/dir.rb (Collector::Dir#collect_file): should
	  use the given File-like interface, but not File directly.

	* test/testunit/collector/test_dir.rb (TestDir::FileSystem): implement
	  File-like methods correctly.

Fri Oct 13 01:48:42 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/date.rb (Date::self.complete_hash): need to check if g is
	  nil before dereference.  [ruby-core:09116]

Fri Oct 13 00:34:26 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (rb_mod_cvar_defined): wrong id check.  a patch from
	  Mauricio Fernandez <mfp at acm.org>.  [ruby-core:09158]

	* object.c (rb_mod_cvar_get): typo fixed.  [ruby-core:09168]

	* object.c (rb_mod_cvar_set): ditto.

Wed Oct 11 22:21:41 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest: Merge from trunk; metadata location changed,
	  Digest::Base#reset() added, Digest::Base#equal() changed, and
	  digest/hmac added with some modifications made for ruby 1.8.

Tue Oct 10 17:24:12 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32,wince}/Makefile.sub (config.status): shouldn't use
	  copy command instead of install. use -run install.

Tue Oct 10 16:49:16 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest/digest.c (hexdigest_str_new, bubblebabble_str_new):
	  Perform StringValue() checks properly.

	* ext/digest/digest.c: Use RSTRING_{PTR,LEN} macros.

Tue Oct 10 13:49:53 2006  Akinori MUSHA  <knu@iDaemons.org>

	* ext/digest: Merge from trunk; apply all changes since the
	  initial import, except for the removal of compatibility stub
	  libraries (md5.rb and sha1.rb).

Mon Oct  9 23:46:29 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/parsedate.rb: documentation patch from Konrad Meyer
	  <konrad.meyer@gmail.com>.  [ruby-doc:1238]

	* lib/open3.rb, lib/ping.rb: ditto.

Mon Oct  9 22:56:12 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rexml/encoding.rb (REXML::Encoding::check_encoding): spaces
	  are allowed around equal sign.  [ruby-core:09032]

	* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser): ditto.

Sat Oct  7 23:53:08 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_scan): small documentation fix.
	  [ruby-core:09007]

Sat Oct  7 23:44:33 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_rshift): a bug in right shift of negative
	  bignums.  [ruby-core:09020]

Sat Oct  7 00:27:58 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* class.c (rb_include_module): remove unnecessary check.
	  [ruby-talk:218402]

Fri Oct  6 04:30:30 2006  Akinori MUSHA  <knu@iDaemons.org>

	* sample/openssl/c_rehash.rb: Use digest/md5 instead of obsolete md5.

Wed Oct  4 18:47:25 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkextlib/*: bugfix and update
	  (see ext/tk/ChangeLog.tkextlib).

Wed Oct  4 17:25:14 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call): check protected visibility based on real self,
	  not ruby_frame->self.  [ruby-talk:217822]

Wed Oct  4 08:52:30 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/optparse/test_getopts.rb: changed the class name of test case
	  to get rid of conflict with test_optparse.rb.

Tue Oct  3 23:32:27 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/testcase.rb (Test::Unit::TestCase.suite): test name
	  must be string.  fixed: [ruby-core:08978]

Mon Oct  2 23:47:55 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::COLLECTORS):
	  base directory should be lower precedence.  fixed: [ruby-dev:29622]

	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner#options): typo.

	* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file):
	  load expanded path.  fixed: [ruby-dev:29621]

Mon Oct  2 15:49:19 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* instruby.rb: batfile should be CRLF'ed.

Mon Oct  2 01:24:26 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (test-all): separate directory where running test cases
	  from source tree.

	* lib/test/unit/autorunner.rb (options): added --basedir, --workdir
	  and --load-path options.

	* lib/test/unit/collector/dir.rb (recursive_collect, collect_file):
	  base directory support.

Sun Oct  1 23:56:52 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, common.mk, ext/extmk.rb, win{32,ce}/Makefile.in: keep
	  LIBRUBY_SO unless need to be removed.

Sun Oct  1 23:12:19 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#make_switch): pass arguments directly.

Sat Sep 30 15:12:25 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: updated based on date2 3.9.4.

Fri Sep 29 12:11:04 2006  WATANABE Hirofumi  <eban@ruby-lang.org>

	* jcode.rb (succ!): call original succ! if $KCODE == 'n'.
	  fixed: [ruby-talk:216845]

Fri Sep 29 11:43:40 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (try_func): revert fallback checking undeclared function.
	  fixed: [ruby-core:08949]

Fri Sep 29 09:56:56 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: extout is needed for also clean.
	  fixed: [ruby-core:08944]

	* lib/optparse.rb (OptionParser::Switch#conv_arg): unsplat by
	  Proc#call if no conversion is given.

Thu Sep 28 23:59:31 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (struct thread): declare win32_exception_list on cygwin and
	  win32 regardless if it is implemented.  Provisional fix for
	  [ruby-core:08917].

Thu Sep 28 20:53:16 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/tmpdir.rb: use return value of getdir.call for length.

Wed Sep 27 01:04:49 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (try_func): check function pointer first and macro next.

	* lib/mkmf.rb (have_type): simplified with typedef and sizeof.

Tue Sep 26 23:57:03 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#getopts): use strings as key.
	  fixed: [ruby-dev:29614]

Tue Sep 26 15:31:26 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {win32,wince}/Makefile.sub (CPP): check predefined value.

Tue Sep 26 07:55:16 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_shift): should not move memory region if array
	  body is shared.  a patch from Kent Sibilev <ksruby at gmail.com>.
	  [ruby-core:08922]

Mon Sep 25 22:26:26 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_path_end): skip root directory.  fixed: [ruby-core:08913]

	* lib/mkmf.rb (init_mkmf): set default $LDFLAGS.  Patch by Michal
	  Suchanek <hramrach at centrum.cz>.  [ruby-talk:216256]

Mon Sep 25 08:14:43 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_shift): should clear shifting top element.
	  [ruby-talk:216055]

	* array.c (rb_ary_shift): avoid creating shared object if array
	  size is small.

Mon Sep 25 08:11:35 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* random.c (rb_f_rand): RDoc typo fix.  a patch from Frederick
	  Cheung <fred at 82ask.com>.  [ruby-talk:216047]

Sun Sep 24 22:28:20 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* runruby.rb: extension library scripts moved into common directory.

Sun Sep 24 14:59:50 2006  Tanaka Akira  <akr@fsij.org>

	* node.h (struct thread): ia64 support is broken by sandbox patch.

Sun Sep 24 12:11:16 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: updated based on date2 3.9.3.

Sat Sep 23 23:24:57 2006  why the lucky stiff  <why@ruby-lang.org>

	* eval.c (rb_thread_save_context, rb_thread_restore_context):
	  sandbox hook to save and restore sandbox state.

	* eval.c (thread_no_ensure): added THREAD_NO_ENSURE thread flag.

	* eval.c (rb_thread_kill_bang): Thread#kill! uses the above flag
	  to circumvent ensure, in order to prevent endless loops.
	  [ruby-core:08768]

	* eval.c (rb_thread_kill): fix Thread#kill docs, which returns
	  the thread object in all cases.

	* node.h: expose the rb_jmpbuf_t and rb_thread_t structs, along
	  with the thread flags.  used by the sandbox extension.

	* ruby.h: extern rb_eThreadError, so sandbox can swap it.

Sat Sep 23 21:34:15 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::QueryExtension::read_multipart): CGI content
	  may be empty.  a patch from Jamis Buck <jamis at 37signals.com>.

Sat Sep 23 08:35:53 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rdoc/ri/ri_options.rb: prevent NameError.  [ruby-dev:29597]

Sat Sep 23 01:04:20 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: updated based on date2 3.9.2.

Fri Sep 22 02:06:26 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* .cvsignore: ignore timestamp files and installed list file.

Fri Sep 22 01:36:34 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* instruby.rb: include FileUtils unconditionally.

Thu Sep 21 22:56:20 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (no-install): not install rdoc actually.

	* common.mk (install-doc, no-install-doc): use instruby.rb.

	* instruby.rb: rdoc installation.

	* ext/extmk.rb: expand ruby executable names.

Thu Sep 21 13:55:07 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/etc/etc.c (etc_getpwuid): uid integer should be wraped in
	  uid_t value.  [ruby-core:08897]

	* ext/etc/etc.c (etc_getpwuid): uid_t may be bigger than plain
	  'int' type.

Wed Sep 20 23:17:41 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (pre-install-doc): create data directory before install.

	* lib/mkmf.rb (dir_re): fixed typo.

	* lib/mkmf.rb (install_dirs): remove extra slash.

Wed Sep 20 09:53:38 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32,wince}/Makefile.sub (INSTALLED_LIST): need to define
	  this macro to install.

Wed Sep 20 09:43:10 2006  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb: allow extra spaces in responses.
	  Thanks, Tom Soderlund. (backported from HEAD)

Wed Sep 20 09:25:39 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/gdbm/gdbm.c: add RDoc documentation. a patch from Peter
	  Adolphs <futzilogik at users dot sourceforge dot net>.
	  [ruby-doc:1223]

Tue Sep 19 01:28:00 2006  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb: backport from HEAD (rev 1.71).

	* lib/fileutils.rb (FileUtils.cp_r): new option
	  :remove_destination.

Tue Sep 19 00:42:15 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_obj_ivar_defined, rb_mod_cvar_defined): new methods,
	  Kernel#instance_variable_defined? and Module#class_variable_defined?.
	  [ruby-dev:29587]

	* lib/date/format.rb (Date::Bag#method_missing): use new method,
	  instance_variable_defined? to check if an instance variable is
	  defined.  fixed: [ruby-dev:29554]
	  -- This didn't fix anything.

Sun Sep 17 23:44:58 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/rdoc.rb (RDoc::RDoc#document): scan only files modified
	  after the previous generation.

Sun Sep 17 17:42:13 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (install-doc): reverted.

	* instruby.rb: stores file name list without destdir prefix.

	* lib/rdoc/generators/ri_generator.rb: do not chdir twice.

Sat Sep 16 23:14:29 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/pty/pty.c (establishShell): remove remaining unused line.

Sat Sep 16 16:40:44 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, common.in, instruby.rb, ext/extmk.rb, lib/mkmf.rb:
	  use instruby.rb to install extensions instead of ext/extmk.rb.

	* instruby.rb: store installed list into the file.

	* ext/dbm/extconf.rb: allow multiple candidates for dbm-type.

	* ext/io/wait/extconf.rb: suspicious checking_for.

	* ext/pty/pty.c (establishShell): parent pid is not used.

	* ext/pty/pty.c (freeDevice): not used.

	* ext/pty/pty.c (get_device_once): removed garbage right brace.

	* lib/mkmf.rb (checking_for): improved the messages.

Thu Sep 14 16:11:15 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_intern): raise SecurityError only when $SAFE
	  level is greater than zero.  [ruby-core:08862]

	* parse.y (rb_interned_p): new function to check if a string is
	  already interned.

	* object.c (str_to_id): use rb_str_intern().

Wed Sep 13 18:43:05 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* README.EXT: English adjustment.  [ruby-core:08851] and
	  [ruby-core:08852]

Wed Sep 13 18:25:18 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el (ruby-parse-partial): better here-doc support.
	  a patch from Marshall T. Vandegrift <llasram at gmail.com>.
	  [ruby-core:08804]

Wed Sep 13 16:43:36 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_intern): prohibit interning tainted string.

Wed Sep 13 01:14:21 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#getopts): works with pre-registered
	  options.  [ruby-core:08826]

Sun Sep 10 20:27:13 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: updated based on date2 3.9.1.

Tue Jan 10 09:18:03 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (stack_extend): fixed prototype.

	* eval.c (rb_require_safe): prevent extension from loading twice.
	  fixed: [ruby-dev:29523]

Sat Sep  9 23:50:38 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_mul0): bignum multiplication without
	  normalization.

	* bignum.c (rb_big_pow): use rb_big_mul0().  [ruby-dev:29547]

Sat Sep  9 14:08:38 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/test/unit/testcase.rb (Test::Unit::TestCase#run): Rescue
	  Exception in Test::Unit::TestCase#run.  [ruby-core:08783]

Sat Sep  9 04:55:59 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/pstore.rb: open all in binary mode, and get rid of the quirk of
	  msvcrt.  fixed: [ruby-dev:29518]

Sat Sep  9 04:54:42 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, win32/Makefile.sub (MINIRUBY): append MINIRUBYOPT.

	* mkconfig.rb, ext/extmk.rb, lib/mkmf.rb, win32/mkexports.rb: suppress
	  warnings with $VERBOSE.

	* ext/extmk.rb: Proc#call does not pass the block in 1.8.

	* win32/resource.rb: add more info.

Fri Sep  8 10:03:59 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookies): new
	  method to parse multiple cookies per Set-Cookie header.
	  Thanks to Aaron Patterson <aaron_patterson at speakeasy.net>.
	  [ruby-core:08802]

Fri Sep  8 08:59:30 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub, win32/configure.bat win32/setup.mak: program
	  name transform.

Fri Sep  8 01:33:08 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.h (RSTRING_PTR): add migration macro.

	* ruby.h (RARRAY_PTR): ditto.

Thu Sep  7 23:27:05 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (path_check_0, fpath_check): disable path check on cygwin.
	  [ruby-talk:213074]

Wed Sep 06 12:05:19 2006  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): fix regexp for euc-jp
	  [ruby-dev:29344]

	* ext/nkf/lib/kconv.rb (Kconv::toeuc): remove -m0 [ruby-dev:29505]

Tue Sep  5 06:47:22 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_to_s): variable declaration after an execution
	  statement.

Tue Sep  5 05:56:51 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* numeric.c (flo_hash): improve collision.  fixed: [ruby-dev:29352]

Tue Sep  5 05:49:41 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (path_check_0): check if sticky bit is set on parent
	  directories for executable path.  fixed: [ruby-dev:29415]

Tue Sep  5 05:03:46 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (fix_plus): addition in Fixnum will never overflow
	  long.  a patch from Ondrej Bilka <neleai at seznam.cz>.
	  [ruby-core:08794]

	* numeric.c (fix_minus): ditto.

	* bignum.c (rb_big_pow): eagerly truncate resulting bignum.
	  [ruby-core:08794]

Mon Sep  4 23:15:34 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_to_s): make it conform to RFC2822 date format.
	  [ruby-dev:29467]

Mon Sep  4 21:43:57 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dbm/extconf.rb: create makefile according to the result of check
	  for dbm header.  fixed: [ruby-dev:29445]

Mon Sep  4 21:42:35 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: updated based on date2 3.9.

Mon Sep  4 21:14:20 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_strftime): include nul character.  fixed: [ruby-dev:29422]

Mon Sep  4 16:29:33 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::out): specify -m0 -x option for nkf.
	  [ruby-dev:29284]

Mon Sep  4 16:13:23 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (pipe_open): command name should not contain null bytes.
	  [ruby-dev:29421]

	* process.c (proc_spawn): ditto.

	* process.c (proc_spawn_n): ditto.

	* process.c (rb_f_system): ditto.

Sun Sep  3 15:32:44 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: get rid of nil.to_s.

Sun Sep  3 06:24:38 2006  Tanaka Akira  <akr@fsij.org>

	* ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t.

Sun Sep  3 04:40:42 2006  Tanaka Akira  <akr@fsij.org>

	* ext/socket/extconf.rb: check arpa/inet.h for ntohs.

	* ext/socket/socket.c: include arpa/inet.h if available.

Sun Sep  3 02:34:55 2006  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/unix.rb (DRbUNIXSocket#close): don't get path if client mode.
	  [ruby-dev:29417]

Sun Sep  3 01:45:17 2006  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/acl.rb (ACLEntry#initialize): examine whether '*' is
	  included before IPAddr.new. [ruby-dev:29406]

Sat Sep  2 13:23:01 2006  Tanaka Akira  <akr@fsij.org>

	* common.mk (ia64.o): use the compiler driver to assemble ia64.s
	  to use appropriate ABI.

Sat Sep  2 03:36:22 2006  Tanaka Akira  <akr@fsij.org>

	* common.mk, configure.in, defines.h, eval.c, gc.c, main.c,
	  numeric.c, ruby.h, ia64.s: backport IA64 HP-UX support.

Fri Sep  1 13:52:57 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/font.rb: TkFont#current_configinfo() doesn't work
	  on Tcl/Tk8.x.

Thu Aug 31 12:46:55 2006  why the lucky stiff  <why@ruby-lang.org>

	* eval.c (ruby_init): rename top_cref to ruby_top_cref and export,
	  along with ruby_cref, for use by the sandbox. [ruby-core:08762]

	* node.h: ditto.

Tue Aug 29 19:10:10 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (rb_hash_s_create): fixed memory leak, based on the patch
	  by Kent Sibilev <ksruby at gmail.com>.  fixed: [ruby-talk:211233]

Mon Aug 28 11:36:02 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/parse_rb.rb: Fix typo.  Submitted by
	  <calamitas at gmail.com>.  [ruby-core:08724]

Mon Aug 28 07:53:44 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/ri/ri_formatter.rb: Don't unescape HTML in HtmlFormatter.
	  Submitted by Kent Sibilev <ksruby at gmail.com>.  [ruby-core:08392].

Mon Aug 28 07:25:45 2006  Eric Hodel  <drbrain@segment7.net>

	* file.c (File#size?): Fix documentation submitted by Rick Ohnemus.
	  ruby-Bugs-5529.  [ruby-core:08725]

Sat Aug 26 08:07:13 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: updated based on date2 3.8.2.

Fri Aug 25 22:32:04 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rexml/source.rb (REXML::IOSource#initialize): encoding have to
	  be set with the accessor.  fixed: [ruby-list:42737]

Fri Aug 25 17:15:17 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* stable version 1.8.5 released.

Fri Aug 25 17:02:06 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (gc_sweep): typo fixed.

Tue Aug 22 18:47:51 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_method):
	  rdoc documents C module methods as instance methods. a patch in
	  [ruby-core:08536].

Sat Aug 19 14:15:02 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (config.status): include winsock2.h instead of
	  winsock.h when --with-winsock2 is specified.
	  fixed: [ruby-dev:29296]

Sat Aug 19 11:28:08 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_rename): use errno if set properly.
	  fixed: [ruby-dev:29293]

Sat Aug 19 11:09:23 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (then): remove semicolon warning.  [ruby-dev:29299]

Thu Aug 17 19:15:16 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_stat_[rRwWxX]): check for super user.
	  fixed: [ruby-core:08616]

Thu Aug 17 14:47:06 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: added rdoc by Daniel Berger.  [ruby-core:08177]

Thu Aug 17 00:39:05 2006  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/ring.rb (do_reply): Fix for RingServer fails to find a
	  TupleSpace when TupleSpace resides in the same ruby process with
	  RingServer. a patch from Kent Sibilev. [ruby-core:08453]

Wed Aug 16 11:45:36 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (proc_setuid, proc_setgid, proc_seteuid, proc_setegid):
	  get rid of bogus implementations on Mac OS X.

Tue Aug 15 19:10:18 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#find_class_comment): Fix
	  broken class-level documentation.

Wed Aug 16 11:09:26 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (set_arg0): fill argv other than the first with an empty
	  string instead of NULL.

Wed Aug 16 11:08:00 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.h: removed an excess macro.  fixed: [ruby-dev:29258]

Tue Aug  8 23:49:06 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/extend-command.rb (IRB::ExtendCommandBundle): pacify
	  RDoc.  a patch from Eric Hodel <drbrain at segment7.net>.
	  [ruby-core:08522]

Tue Aug  8 11:32:54 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* Makefile.in, common.mk, configure.in: fix for platforms without
	  rm. patches from Yutaka kanemoto <kinpoco at gmail.com>.
	  [ruby-dev:29215]

Mon Aug  7 17:56:59 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c, ext/digest/rmd160/rmd160ossl.c,
	  ext/digest/sha1/sha1ossl.c, ext/readline/readline.c: move
	  incluion of config.h to pacify AIX.  a patch from Yutaka
	  Kanemoto <kinpoco at gmail.com>.  [ruby-dev:29197]

Mon Aug  7 15:55:08 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/syck/syck.c (syck_move_tokens): should avoid negative
	  memmove.  [ruby-list:42625]

Mon Aug  7 14:37:48 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* configure.in, common.mk: AIX link issue.  a patch from Yutaka
	  Kanemoto <kinpoco at gmail.com>.  [ruby-dev:29190]

	* ext/socket/socket.c: AIX socket support.  [ruby-dev:29190]

Mon Aug  7 12:05:28 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dln.c, eval.c, gc.c, regex.c, ruby.h: shut up AIX alloca
	  warning.  a patch from Yutaka Kanemoto <kinpoco at gmail.com>.
	  [ruby-dev:29191]

Sun Aug  6 20:40:41 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (str[fp]time): %[EO]U didn't denote %U.

Sat Aug  5 17:07:43 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (top_local_setup): local_vars[-1] should point
	  ruby_scope itself to protect local_tbl from garbage collection.
	  [ruby-dev:29049]

Sat Aug  5 13:54:03 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb (str[fp]time): "%\n" means "\n".

Fri Aug  4 15:21:00 2006  Eric Hodel  <drbrain@segment7.net>

	* lib: Merge RDoc and .document from HEAD.
	* lib/drb/ssl.rb: Close socket on SSLError [ruby-core:7197]

Fri Aug  4 19:13:41 2006  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* lib/irb/{init.rb,ruby-lex.rb,slex.rb}: can't input '\c' for
	  [ruby-core: 7122].

Fri Aug  4 14:02:14 2006  James Edward Gray II  <james@grayproductions.net>

	* lib/date/format.rb (__strptime, strftime): allow multi-line patterns
	  in Date#strftime the same as Time#strftime accepts.
	  fixed: [ruby-core:08466]

Fri Aug  4 13:56:51 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (pack_pack): check argument overrun for 'P'.  based on a
	  patch by rucila <rucila at yahoo.cojp>.  fixed: [ruby-dev:29182]

Tue Aug  1 17:44:03 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (init_stdhandle): assign standard file handles.

Tue Aug  1 12:24:58 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (Init_Binding): fix old commit miss.

Mon Jul 31 17:08:20 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (exit_handler): new function; release winsock and
	  environment work area.

	* win32/win32.c (NTInitialize): setup exit_handler.

	* win32/win32.c (StartSockets): use exit_handler.

	* win32/win32.c (rb_w32_getenv): use GetEnvironmentStrings() instead
	  of GetEnvironmentVariable(), because the latter cannot distinguish
	  wheather a null environment variable exists or not.
	  fixed: [ruby-talk:205123]

Mon Jul 31 16:15:13 2006  Tanaka Akira  <akr@fsij.org>

	* test/ruby/test_process.rb (TestProcess#test_rlimit_nofile):
	  setrlimit may fail with EINVAL.
	  reported by MIYAMUKO Katsuyuki.  [ruby-dev:29174]

Mon Jul 31 13:38:22 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httprequest.rb (WEBrick::HTTPReuqest#parse_uri): improve
	  for the value of IPv6 address in the Host: header field.

Mon Jul 31 09:22:12 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.h: use ifdef (or defined) for macro constants that may or
	  may not be defined to shut up gcc's -Wundef warnings.
	  [ruby-core:08447]

Sun Jul 30 23:26:22 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_call0): trace call/return of method defined from block.
	  fixed: [ruby-core:08329]

	* eval.c (rb_trap_eval): make the current thread runnable to deal with
	  exceptions which occurred within the trap.  fixed: [ruby-dev:27729]

	* lib/cgi/session.rb, lib/cgi/session/pstore.rb: suppress warnings.
	  fixed: [ruby-talk:204896]

Sat Jul 29 06:12:06 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: freeze ip_name for security reason.

Sat Jul 29 01:23:52 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/logger.rb: improves the amount of documentation that Rdoc
	  picks up when processing logger.rb by moving the require
	  statement back before the comment block.  a patch from Hugh
	  Sasse <hgs at dmu.ac.uk>.  [ruby-core:08422]

Thu Jul 27 22:21:52 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (time_to_s): fixed format mismatch.

Thu Jul 27 21:19:54 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* math.c (domain_check): a new function to check domain error
	  explicitly for systems that return NaN like FreeBSD.
	  [ruby-core:07019]

	* math.c (math_acos, math_asin, math_acosh, math_atanh, math_log,
	  math_log10, math_sqrt): use domain_check().

	* math.c (math_sqrt): fix documentation flaw.

Thu Jul 27 18:12:12 2006  WATANABE Hirofumi  <eban@ruby-lang.org>

	* time.c: need to declare time_utc_offset.

Thu Jul 27 17:01:01 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_close): always calls "close" method of the receiver.
	  [ruby-core:6911] [ruby-core:8112]

Thu Jul 27 16:49:01 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_to_s): use +0900 style timezone string for local time.
	  [ruby-dev:29143]

Thu Jul 27 16:41:15 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/openssl/ossl.h: move <ruby.h> inclusion point to shut up
	  Solaris compiler.  [ruby-core:08114]

Wed Jul 26 22:20:59 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* configure.in: add support for as and ASFLAGS.  [ruby-dev:29138]

Wed Jul 26 22:13:45 2006  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: sync with HEAD (rev 1.132).

	* lib/net/http.rb (Net::HTTP#post, request_post, request): should
	  set Content-Type: x-www-form-urlencoded by default.

	* lib/net/http.rb (Net::HTTPHeader#content_type): should return
	  nil when there's no Content-Type.

	* lib/net/http.rb (Net::HTTPHeader#sub_type): should return nil
	  when there's no sub Content-Type (e.g. "Content-Type: text").

	* lib/net/http.rb (Net::HTTPHeader#type_params): wrongly failed
	  when there's no Content-Type.

Wed Jul 26 18:35:38 2006  Minero Aoki  <aamine@loveruby.net>

	* ext/strscan/strscan.c: sync with HEAD (rev 1.25).

	* ext/strscan/strscan.c (strscan_do_scan):
	  StringScanner.new("").scan(//) should return "". [ruby-Bugs:4361]

Wed Jul 26 18:14:19 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/pty/pty.c (getDevice): retry once after GC on failure.
	  [ruby-core:08282]

Wed Jul 26 17:28:16 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): prepend ".." to %u for negative bignum,
	  but not "-".  fixed: [ruby-core:08167]

Wed Jul 26 16:39:07 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_scan): add string modification check.
	  [ruby-core:7216]

Wed Jul 26 16:06:03 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::QueryExtension::read_multipart): check
	  multipart boundary end.  a patch from Fujioka <fuj at rabbix.jp>
	  [ruby-dev:28470]

Wed Jul 26 01:02:59 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: suppress warnings by automake 1.8 or later.

Tue Jul 25 00:30:06 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/prettyprint.rb: RD to RDoc conversion by Hugh Sasse.

Tue Jul 25 14:49:51 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb (configuration): typo.

Tue Jul 25 13:14:32 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (rb_proc_times): rename hz to hertz to avoid name
	  crash on AIX.  [ruby-dev:29126]

Mon Jul 24 22:03:40 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (backtrace): skip frames successive on node and method name.

Mon Jul 24 17:55:55 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (rb_f_system): add security check.  [ruby-talk:202947]

	* process.c (rb_f_system): move signal right before fork to avoid
	  signal handler intervention.

Mon Jul 24 15:51:52 2006  Tanaka Akira  <akr@fsij.org>

	* ext/readline/readline.c (readline_readline): rl_deprep_term_function
	  may be NULL with libedit.  reported by Ryan Davis.  [ruby-dev:29070]

Mon Jul 24 15:19:55 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): revert last change.  [ruby-dev:29112]
	  [ruby-core:08374]

Sun Jul 23 22:59:49 2006  Tanaka Akira  <akr@fsij.org>

	* test/socket/test_unix.rb: disabled on cygwin.
	  reported by Kouhei Yanagita.  [ruby-dev:29080]

Fri Jul 21 21:21:08 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_call0): include funcalled methods in caller list.
	  fixed: [ruby-core:08290]

Fri Jul 21 12:11:00 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb, lib/mkmf.rb (with_destdir): remove drive letter before
	  prepending destdir on DOSISH.

Thu Jul 20 15:07:14 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.h: export classes/modules to implement sandbox.
	  [ruby-core:08283]

Thu Jul 20 00:06:29 2006  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/completion.rb: support for completion of numeric
	  number. [ruby-dev: 29038]

Wed Jul 19 23:53:05 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/parser.rb, lib/rss/utils.rb: added documents.

Tue Jul 18 22:10:13 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (rb_f_system): block SIGCHLD during the process
	  execution, like glibc system(3) does.  [ruby-talk:202361]

Tue Jul 18 23:12:14 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (open_ifs_socket): should not use plain malloc.

	* win32/win32.c (rb_w32_opendir): should not use plain realloc.

Tue Jul 18 18:05:49 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* test/ruby/test_float.rb (TestFloat::test_strtod): update test to
	  conform strtod change.

Tue Jul 18 15:49:42 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (pack_unpack): propagate association array to copied
	  string.  [ruby-core:08223]

	* pack.c (pack_unpack): return referenced string itself if it has
	  same length as specified.  a patch from <nobu at ruby-lang.org>
	  in [ruby-core:08225].

	* pack.c (pack_pack): taint 'p' packed strings.

Tue Jul 18 14:03:02 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/webrick/httpserver.rb (WEBrick::HTTPServer::unmount): remove
	  inpect argument from sprintf.  [ruby-dev:29039]

Tue Jul 18 10:53:37 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_cstr_to_dbl): limit out-of-range message.

	* util.c (ruby_strtod): return end pointer even if ERANGE occurred.
	  fixed: [ruby-dev:29041]

Mon Jul 18 00:43:05 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (ruby_strtod): stop at dot not followed by digits.
	  fixed: [ruby-dev:29035]

Tue Jul 18 00:01:27 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: remove LIBRUBY_SO if static linked extensions exist.

Mon Jul 17 23:30:46 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (rb_cv_msvcrt): defaulted to msvcrt.  Workaround for a
	  bug of cygwin 1.5.20.

Mon Jul 17 13:43:05 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (define_swapx): should not use plain malloc.

Mon Jul 17 12:58:41 2006  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: should use ac_cv_lib_dl_dlopen=no on MinGW.

Sat Jul 15 23:50:12 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_require_safe): wait for another thread requiring the same
	  feature.  fixed: [ruby-core:08229]

Sat Jul 15 01:27:13 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (has_magic): glob names contain alphabets to enable case fold
	  search also for directories.  fixed: [ruby-talk:201917]

Sat Jul 15 01:09:22 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* st.c (malloc): use xmalloc/xcalloc instead of plain
	  malloc/calloc, to detect memory allocation failure.  see
	  <http://www.nongnu.org/failmalloc/>.

	* gc.c (rb_memerror): should not raise empty nomem_error.

Fri Jul 14 13:08:13 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: add methods for new features of latest Tcl/Tk8.5.

	* ext/tk/lib/tk/namespace.rb: ditto.

Fri Jul 14 02:30:12 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/monitor.rb: document patch from Hugh Sasse <hgs at dmu.ac.uk>.
	  [ruby-core:08205]

Fri Jul 14 01:09:46 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (then): error in warning action.

Fri Jul 14 00:10:15 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_pop): may cause realloc oscillation.  a patch
	  from MORITA Naoyuki <mlgetter at kidou.sakura.ne.jp>.
	  [ruby-dev:29028]

Thu Jul 13 22:23:56 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/composite.rb: improve handling of the classname on the
	  option database for the widget class which includes TkComposite.

Thu Jul 13 20:32:19 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/parser.rb: updated documents by a patch from
	  Hugh Sasse <hgs at dmu.ac.uk>. [ruby-core:8194]

Wed Jul 12 13:54:09 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (then): we'd like to reserve colon here for the future.
	  warning added.

Tue Jul 11 20:58:18 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.h: export rb_cMethod.  [ruby-talk:201259]

Tue Jul 11 19:13:33 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: remove restriction on the class of
	  pseudo-toplevel.

Tue Jul 11 18:00:57 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: security fix.

Tue Jul 11 17:33:39 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* string.c (rb_str_dump): need to extend len for \b.

Mon Jul 10 22:00:00 2006  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c: Allows '_' to appear within
	  digits.  [ruby-dev:28872]

	* ext/bigdecimal/lib/bigdecimal/util.rb: Bug in to_r reported by
	  [ruby-list:42533] fixed.

Mon Jul 10 19:22:19 2006  Tanaka Akira  <akr@fsij.org>

	* gc.c (gc_sweep): expand heap earlier.
	  reported by MORITA Naoyuki.  [ruby-dev:28960]

Mon Jul 10 18:59:34 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/font.rb: sorry. mistaken to patch.

Mon Jul 10 18:46:52 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c: make SEGV risk lower at exit.

	* ext/tk/lib/tk.rb: ditto.

	* ext/tk/lib/multi-tk.rb: fail to call function-style methods on slave
	  interpreters. The strategy (MultiTkIp_PseudoToplevel_Evaluable) to
	  fix the problem is a little tricky. You may have to take care of
	  conflicting with it.

	* ext/tk/lib/tk.rb: a little change for the pseudo-toplevel strategy.

	* ext/tk/lib/tk/font.rb: ditto.

	* ext/tk/lib/tk/msgcat.rb: ditto.

	* ext/tk/lib/tkextlib/itk/incr_tk.rb: ditto.

	* ext/tk/sample/demos-en/widget: fail to call function-style methods
	  on sample scripts. To fix it, a strategy which similar to the way
	  on MultiTiIp is used. Please take care when re-write and re-run a
	  demo script on the Widget-Demo code viewer.

	* ext/tk/sample/demos-jp/widget: ditto.

Mon Jul 10 13:58:40 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* signal.c (ruby_nativethread_signal, posix_nativethread_signal,
	  sigsend_to_ruby_thread, install_nativethread_sighandler):
	  nativethread-support on signal handler. RE-backport from 1.9.

	* ruby.h (HAVE_NATIVETHREAD_KILL): ditto.

	* eval.c (ruby_native_thread_kill): ditto.

Mon Jul 10 10:54:14 2006  Ryan Davis  <ryand@zenspider.com>

	* lib/rdoc/parsers/parse_f95.rb: massive overhaul from Yasuhiro
	  Morikawa including new file suffixes, function support, public
	  variables and constants, derived-types, defined operators and
	  assignments, namelists, and subroutine and function
	  arguments. Truly massive.

	* lib/rdoc/diagram.rb: diagrams are now cached.

	* lib/irb/completion.rb: fixed a crasher when completing against
	  an unnamed class/module.

	* lib/rdoc/parsers/parse_c.rb: private comment (--/++) support in
	  C-file rdoc.

	* lib/debug.rb: minor clarification in help.

	* lib/pp.rb: minor clarification on exception.

Mon Jul 10 09:29:12 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_clear_cache_for_undef): clear entries for included
	  module.  fixed: [ruby-core:08180]

Mon Jul 10 01:48:38 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* st.h (st_data_t): use pointer sized integer for st_data_t.
	  [ruby-dev:28988]

Sun Jul  9 18:06:47 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (try_constant): fix for value 1 at cross compiling.

	* lib/mkmf.rb (create_makefile): prevent substitution of macro
	  definition.  fixed: http://www.yotabanana.com/lab/20060624.html#p02

Sun Jul  9 00:54:34 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (next_jump): deal with destination of next.
	  fixed: [ruby-core:08169]

Fri Jul  7 00:38:49 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* hash.c (rb_hash_default): should not call default procedure if
	  no key is given.  [ruby-list:42541]

Fri Jul  7 00:29:10 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_mload): a patch from Daniel Berger
	  <Daniel.Berger at qwest.com>.  [ruby-core:08128]

Thu Jul  6 22:21:57 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (rb_proc_times): use sysconf(_SC_CLK_TCK) value prior to
	  HZ and CLK_TCK.  fixed: [ruby-talk:200293]

Thu Jul  6 22:17:21 2006  Minero Aoki  <aamine@loveruby.net>

	* ext/racc/cparse/cparse.c: sync with original code, rev 1.8.

	* ext/racc/cparse/cparse.c: should mark CparseParams objects.

	* lib/racc/parser.rb: sync with original code, rev 1.8.

	* lib/racc/parser.rb: update coding style.

Mon Jul  3 19:04:38 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c (ip_make_menu_embeddable): help to make a menu
	  widget embeddable (pack, grid, and so on) like as a general widget.
	  However, an embeddable menu may require to be definied some event
	  bindings for general use.

	* ext/tk/lib/tk/event.rb: [bug fix] Tk.callback_break and
	  Tk.callback_continue don't work on MultiTkIp.

	* ext/tk/lib/multi-tk.rb: ditto.

	* ext/tk/lib/tk.rb: lack of Tk.callback_return.

	* ext/tk/lib/tk/menu.rb: improve creating clone menus.

Mon Jul  3 14:42:06 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/etc/extconf.rb (PW_UID2VAL, PW_GID2VAL): defaulted to conversion
	  from int, and sys/types.h needs to be included before grp.h.
	  fixed: [ruby-dev:28938]

Mon Jul  3 01:14:15 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_inspect): encode \b (\010) for escape.
	  [ruby-dev:28927]

	* string.c (rb_str_dump): ditto.

Sun Jul  2 19:17:56 2006  Minero Aoki  <aamine@loveruby.net>

	* ext/racc/cparse/cparse.c: sync with original code (rev 1.7).

	* ext/racc/cparse/cparse.c: use rb_catch instead of rb_iterate.
	  Giving a block to a Ruby-level method by rb_iterate is obsolete on
	  Ruby 1.9.  Note that current cparse.c still includes one
	  rb_iterate call on Ruby 1.8, but it is not a problem (at least
	  just now).

Sat Jul  1 15:15:49 2006  Tanaka Akira  <akr@m17n.org>

	* test/socket/test_nonblock.rb: add timeout to send/receive
	  an empty UDP packet.
	  [ruby-dev:28820]

Fri Jun 30 23:46:23 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* configure.in: should test isinf for Solaris with GCC compiler.
	  a patch from <ville.mattila at stonesoft.com>.  [ruby-core:07791]

	* configure.in: -shared patch from Andrew Morrow
	  <andrew.c.morrow at gmail.com>.  [ruby-core:08100]

Thu Jun 29 18:58:51 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c (BigDecimal_version): fix patch
	  failure.

Thu Jun 29 18:00:51 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c: add RDoc document.  a patch from
	  mathew <meta at pobox.com>.   [ruby-core:07050]

Wed Jun 28 15:47:14 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/optparse.rb: RDoc patch from Robin Stocker <robin@nibor.org>
	  [ruby-core:08087]

Wed Jun 28 19:04:34 2006  Tanaka Akira  <akr@m17n.org>

	* test/socket/test_unix.rb: test_seqpacket_pair removed.
	  [ruby-dev:28846]

Tue Jun 27 23:03:49 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c: RDoc update for =~ method.  a patch from Alex Young
	  <alex at blackkettle.org>.  [ruby-core:08068]

Tue Jun 27 22:47:18 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c: forgot to update TCLTKLIB_RELEASE_DATE.

	* ext/tk/lib/tk.rb (tk_tcl2ruby): [bug fix] sometimes fail to convert
	  a tcl string to a ruby object if the tcl string includes "\n".

Tue Jun 27 16:04:05 2006  WATANABE Hirofumi  <eban@ruby-lang.org>

	* win32/win32.h: define isascii on MinGW for msvcrt compatibility.

	* configure.in: set ac_cv_header_sys_time_h=no on MinGW
	  for msvcrt compatibility.

Tue Jun 27 11:36:02 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/etc/etc.c (setup_passwd, setup_group): allow bignum uid, gid and
	  so on.  [ruby-talk:199102]

Mon Jun 26 13:37:27 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc: Merge from HEAD.
	  Add options to limit the ri search path.

Tue Jun 27 00:54:08 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* util.c (powersOf10): constified.

Mon Jun 26 18:37:44 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c (ip_delete): fix SEGV when a slave-ip is
	  deleted on callback.

Mon Jun 26 10:47:42 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (pipe_open): avoid closing uninitialized file descriptors.
	  a patch from <tommy at tmtm.org> [ruby-dev:28600]

Mon Jun 26 09:56:22 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.[ch] (rb_w32_send, rb_w32_sendto): constified.

Sun Jun 25 23:02:12 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, mkconfig.rb: catch-up for latest autoconf.

Sat Jun 24 06:35:00 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* signal.c: revert last change.

	* ruby.h: ditto.

	* eval.c: ditto.

Thu Jun 22 11:52:02 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/net/http.rb (Net::HTTPResponse): duplicated error 501;
	  HTTPInternalServerError should be error 500.  [ruby-core:08037]

Thu Jun 22 05:15:58 2006  Tanaka Akira  <akr@m17n.org>

	* ext/socket/socket.c (sock_s_socketpair): try GC only once.
	  [ruby-dev:28778]

Wed Jun 21 21:28:32 2006  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb (jd_to_commercial): now works fine even if in
	  mathn-ized context.

Wed Jun 21 17:32:31 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* signal.c (ruby_nativethread_signal, posix_nativethread_signal,
	  sigsend_to_ruby_thread, install_nativethread_sighandler):
	  nativethread-support on signal handler (backport from 1.9).

	* ruby.h (HAVE_NATIVETHREAD_KILL): ditto.

	* eval.c (ruby_native_thread_kill): ditto.

Wed Jun 21 08:39:54 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/xmlrpc/create.rb (XMLRPC::Create::conv2value): merge Date
	  and Time processing.  [ruby-core:08033]

Wed Jun 21 01:40:25 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (yylex, reswords): modifier token is no longer returned in
	  fname state.  [ruby-dev:28775]

Wed Jun 21 01:12:46 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: RSS::Element.def_corresponded_attr_writer
	  supported date type.

Tue Jun 20 22:08:36 2006  Kouhei Sutou  <kou@cozmixng.org>

	* test/rss/test_parser.rb: split parser tests into ...
	* test/rss/test_parser_1.0.rb: ... RSS 1.0 parsing tests and ...
	* test/rss/test_parser_2.0.rb: ... RSS 2.0 parsing tests.

Tue Jun 20 21:19:06 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: provided default RSS::Element#children.

	* lib/rss/0.9.rb: used default RSS::Element#children.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.

Tue Jun 20 21:04:33 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: provided default RSS::Element#_tags.

	* lib/rss/0.9.rb: used default RSS::Element#_tags.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.

Tue Jun 20 20:47:07 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: hide RSS::Element.install_model.
	  (RSS::Element.install_have_child_element,
	   RSS::Element.install_have_children_element,
	   RSS::Element.install_text_element,
	   RSS::Element.install_date_element): call
	  RSS::Element.install_model internally.

	* lib/rss/0.9.rb: followed new API.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/content.rb: ditto.
	* lib/rss/dublincore.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/syndication.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.
	* lib/rss/trackback.rb: ditto.

Tue Jun 20 20:18:05 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: add check for OBJ_NAME_do_all_sorted.

	* ext/openssl/ossl_cipher.c (ossl_s_ciphers): new method
	  OpenSSL::Cipher.ciphers. it returns all the cipher names.

	* ext/openssl/lib/openssl/cipher.rb:
	  - add constants AES128, AES192, AES256. [ruby-dev:28610]
	  - reimplement without eval()

	* ext/openssl/lib/openssl/digest.rb: reimplement without eval().

	* test/openssl/test_cipher.rb, test_digest: fix about reimplemented
	  features.

	* sample/openssl/cipher.rb: rewrite all.

Sat Jun 19 11:21:46 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/test/unit/assertions.rb: Merge RDoc from HEAD.

Tue Jun 20 01:06:57 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb:
	  - cleanup validation mechanism. Now, #XXX_validation is
	    needless.
	  - changed internal variable name RSS::Element::MODEL to
	    RSS::Element::MODELS.
	  - RSS::Element.install_model requires uri.

	* lib/rss/0.9.rb: followed new validation API.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/content.rb: ditto.
	* lib/rss/dublincore.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/syndication.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.
	* lib/rss/trackback.rb: ditto.

Mon Jun 19 23:40:59 2006  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/lib/kconv.rb: remove default -m0 and fix document.

	* ext/nkf/nkf-8/{nkf.c, config.h, utf8tbl.c, utf8tbl.h}:
	  imported nkf 2.0.7.

Mon Jun 19 22:31:59 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb:
	  - provided default #to_s as RSS::Element#to_s.
	  - removed RSS::Element#other_element.
	  - RSS::Element#tag requires attributes as Hash instead of Array.

	* lib/rss/0.9.rb: removed #to_s to use RSS::Element#to_s.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.
	* lib/rss/trackback.rb: ditto.

	* lib/rss/2.0.rb: removed #other_element.

Mon Jun 19 22:09:16 2006  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c(ole_invoke): support some kind of
	  method of word. [ruby-Bugs#3237]

	* ext/win32ole/tests/test_word.rb: ditto.

	* ext/win32ole/tests/testall.rb: ditto.

Mon Jun 19 00:02:17 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: automatically detected attributes.

	* lib/rss/0.9.rb: removed #_attrs.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.
	* lib/rss/trackback.rb: ditto.

	* lib/rss/parser.rb: followed new internal API.

Mon Jun 19 00:00:17 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: fix bug: initialize improper tables.

Sun Jun 18 22:36:13 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: RSS::Element#initialize accepts initial
	  attributes.
	* lib/rss/0.9.rb: ditto.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/dublincore.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.
	* lib/rss/trackback.rb: ditto.

	* lib/rss/utils.rb: added Utils.element_initialize_arguments? to
	  detect backward compatibility initial arguments.

	* lib/rss/parser.rb: user initial attributes to initialize
	  RSS::Element.

Sun Jun 18 18:24:42 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/converter.rb: use NKF for Uconv fallback.

Sun Jun 18 18:22:04 2006  Kouhei Sutou  <kou@cozmixng.org>

	* test/rss/test_image.rb: shared name space configuration.

Sun Jun 18 18:13:25 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: improved ignore_unknown_element
	  handling. RSS::NotExpectedTagError provides tag URI.
	* lib/rss/parser.rb: ditto.
	* lib/rss/0.9.rb: ditto.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/content.rb: ditto.
	* lib/rss/dublincore.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/syndication.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.
	* lib/rss/trackback.rb: ditto.

	* test/rss/rss-assertions.rb: checked URI of not expected tag too.
	* test/rss/test_parser.rb: ditto.

Sun Jun 18 18:08:36 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: changed empty namespace URI representation to ""
	  from nil.
	* lib/rss/parser.rb: ditto.
	* lib/rss/0.9.rb: ditto.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.

Sun Jun 18 18:03:50 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/parser.rb: removed a guard for requiring open-uri.

Sun Jun 18 18:01:26 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: fixed typo: except -> expect
	* lib/rss/parser.rb: ditto.
	* test/rss/rss-assertions.rb: ditto.
	* test/rss/test_parser.rb: ditto.

Sun Jun 18 17:52:39 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: RSS::Element#calc_indent became to be deprecated.
	* lib/rss/0.9.rb: ditto.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/taxonomy.rb: ditto.
	* lib/rss/trackback.rb: ditto.

	* test/rss/test_1.0.rb: removed RSS::Element.indent_size tests.
	* test/rss/test_2.0.rb: ditto.

Sun Jun 18 00:49:11 2006  Tanaka Akira  <akr@m17n.org>

	* ext/socket/socket.c (bsock_recv_nonblock): new method
	  BasicSocket#recv_nonblock.
	  (udp_recvfrom_nonblock): renamed from ip_recvfrom_nonblock.
	  IPSocket#recvfrom_nonblock is moved to UDPSocket#recvfrom_nonblock.
	  (unix_recvfrom_nonblock): removed.
	  UNIXSocket#recvfrom_nonblock is removed.

Sat Jun 17 22:17:17 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/mathn.rb (Integer::prime_division): raise ZeroDivisionError
	  on zeros.  [ruby-dev:28739]

Sat Jun 17 14:53:32 2006  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb: backport from 1.9.
	  (Kernel#Pathname): new method.

Sat Jun 17 10:30:41 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb (Hash#merge, Enumerable#sort_by): removed.

	* lib/rss/rss.rb (RSS::RootElementMixin#to_xml): added.
	  [ruby-talk:197284]

	  We can convert RSS version easily like the following:
	    rss10 = RSS::Parser.parse(File.read("1.0.rdf"))
	    File.open("2.0.rss", "w") {|f| f.print(rss10.to_xml("2.0"))}

	* test/rss/test_1.0.rb: added #to_xml test.
	* test/rss/test_2.0.rb: ditto.

	* test/rss/rss-testcase.rb: added some helper methods that
	  generates sample RSS 2.0.

	* sample/rss/convert.rb: added a sample script to convert RSS format.

Sat Jun 17 10:23:22 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb (Kernel#funcall): removed.
	* lib/rss/parser.rb (Kernel.URI): removed.

	* lib/rss/maker/: supported
	    xxx.new_yyy do |yyy|
	      yyy.zzz = zzz
	      ...
	    end
	  style and this style became the style of the recommendation.

	  Old style
	    yyy = xxx.new_yyy
	    yyy.zzz = zzz
	    ...
	  is supported too but this style isn't recommended.
	  [ruby-talk:197284]

	* test/rss/test_*maker*.rb: used new recommended style.

Sat Jun 17 09:03:47 2006  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)

	* lib/rss/rss.rb (RSS::VERSION): 0.1.5 -> 0.1.6.
	* test/rss/test_version.rb (RSS::TestVersion#test_version): ditto.

	* lib/rss/trackback.rb: added TrackBack prefix.
	* lib/rss/maker/trackback.rb: ditto.

	* lib/rss/rss.rb : removed needless argument 'prefix'.
	* lib/rss/parser.rb: ditto.

	* lib/rss/1.0.rb: added rdf:Bag.

	* lib/rss/taxonomy.rb: implemented taxonomy module.
	* test/rss/test_taxonomy.rb: added tests for taxonomy support.

	* lib/rss/1.0.rb: added convenience method 'resources'.
	* lib/rss/taxonomy.rb: ditto.
	* test/rss/rss-assertions.rb: added test for 'resources'.
	* test/rss/test_taxonomy.rb: ditto.

	* lib/rss/rss.rb: fixed a indentation bug.
	* lib/rss/taxonomy.rb: fixed <taxo:topic> #to_s bug.
	* test/rss/test_taxonomy.rb: added a #to_s test.

	* lib/rss/maker/taxonomy.rb: implemented taxonomy module for RSS
	  Maker.
	* lib/rss/taxonomy.rb: supported RSS Maker.
	* lib/rss/maker.rb: added taxonomy module support.

	* lib/rss/rss.rb: adjusted to other element API.
	* lib/rss/1.0.rb: adjusted to other element API but backward
	  compatibility is reserved.
	* lib/rss/0.9.rb: ditto.

	* test/rss/test_maker_taxo.rb: added test case for taxonomy module
	  for RSS Maker.
	* test/rss/test_setup_maker_1.0.rb: added tests for taxo:topic.

	* test/rss/test_setup_maker_1.0.rb: added backward compatibility
	  test.
	* test/rss/test_setup_maker_0.9.rb: ditto.
	* test/rss/test_setup_maker_2.0.rb: ditto.

	* test/rss/rss-testcase.rb: added convenience method for setting
	  up taxo:topic.
	* test/rss/rss-assertions.rb: added assertion for taxo:topic.

	* sample/rss/blend.rb: followed new API.

	* lib/rss/taxonomy.rb: changed class or module prefix to
	  Taxonomy from Taxo.
	* lib/rss/maker/taxonomy.rb: ditto.

	* test/rss/test_taxonomy.rb: use #reject directory.

	* lib/rss/: use #__send__ instead of #send.
	* test/rss/: ditto.

	* lib/rss/parser.rb: added entity handling type predicate.
	* lib/rss/rexmlparser.rb: ditto.
	* lib/rss/xmlparser.rb: ditto.
	* lib/rss/xmlscanner.rb: ditto.

	* lib/rss/xmlscanner.rb: more robust entity handling.

	* test/rss/test_parser.rb: added an entity handling test.

	* test/rss/test_2.0.rb: added RSS 2.0 tests.
	* test/rss/rss-assertions.rb: extended XML stylesheet assertion.
	* lib/rss/0.9.rb: added initialize method.
	* test/rss/test_1.0.rb: cleanup.

	* lib/rss/image.rb: added Image prefix.
	* lib/rss/maker/image.rb: ditto.

	* lib/rss/rss.rb: improved type conversion.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/0.9.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/image.rb: ditto.
	* lib/rss/syndication.rb: ditto.

	* test/rss/test_2.0.rb: added type conversion tests.
	* test/rss/test_accessor.rb: ditto.
	* test/rss/test_to_s.rb: ditto.
	* test/rss/test_syndication.rb: ditto.
	* test/rss/test_setup_maker_2.0.rb: ditto.
	* test/rss/test_setup_maker_1.0.rb: ditto.
	* test/rss/test_setup_maker_0.9.rb: ditto.
	* test/rss/test_maker_sy.rb: ditto.
	* test/rss/test_maker_image.rb: ditto.
	* test/rss/test_maker_2.0.rb: ditto.
	* test/rss/test_maker_0.9.rb: ditto.
	* test/rss/test_image.rb: ditto.

	* test/rss/test_maker_1.0.rb: use assert instead of assert_equal.

	* test/rss/rss-assertions.rb: improved type conversion assertions.

	* lib/rss/rss.rb: added backward compatibility codes.
	* lib/rss/parser.rb: ditto.
	* test/rss/test_parser.rb: ditto.
	* test/rss/test_2.0.rb: ditto.

Sat Jun 17 02:01:00 2006  Tanaka Akira  <akr@m17n.org>

	* lib/pp.rb (Kernel#pretty_inspect): defined for pretty printed
	  string.

Sat Jun 17 00:23:58 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (reswords): kDO_BLOCK was missing.  fixed: [ruby-core:7995]

Sat Jun 17 00:02:15 2006  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_propertyput): support
	  PROPERTYPUTREF. [ruby-talk:183042]

	* ext/win32ole/tests/test_propertyputref.rb: ditto.

Thu Jun 15 23:02:47 2006  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (fole_methods): The return value
	  of WIN32OLE#ole_methods should include PROPERTYPUTREF methods.

	* ext/win32ole/win32ole.c (fole_put_methods): The return value
	  of WIN32OLE#ole_put_methods should include PROPERTYPUTREF methods.

	* ext/win32ole/tests/test_ole_methods.rb: ditto.

	* ext/win32ole/tests/testall.rb : ditto.

Wed Jun 14 18:23:28 2006  Eric Hodel  <drbrain@segment7.net>

	* enum.c (enum_any): Documentation typo.

Wed Jun 14 15:01:09 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser#warn): Don't print
	  warnings when -q is set.

Wed Jun 14 23:03:53 2006  Tanaka Akira  <akr@m17n.org>

	* configure.in: check sizeof(rlim_t).
	  check setrlimit.

	* process.c (proc_getrlimit): new method Process.getrlimit.
	  (proc_setrlimit): new method Process.setrlimit.

	* ruby.h (NUM2ULL): new macro.

Mon Jun 12 22:25:09 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): adjust precision length to prevent
	  splitting multi-byte characters.  [ruby-list:42389]

Sun Jun 11 23:20:07 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Arguable#getopts): pass self to the
	  parser.

Sun Jun 11 10:00:57 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.h (write): not need to define on bcc.

Sun Jun 11 08:30:33 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#getopts): new methods.

Sat Jun 10 18:02:40 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/bigdecimal/lib/bigdecimal/newton.rb (Newton::nlsolve): typo
	  fixed: raize -> raise.  [ruby-talk:196608]

Thu Jun  8 14:19:17 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.[ch] (rb_w32_read, rb_w32_write): new functions.
	  use recv() and send() when fd is socket. fixed: [ruby-dev:28694]

Wed Jun  7 16:22:51 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
	  basename and pid.  [ruby-talk:196272]

Wed Jun  7 14:53:04 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (errmap): add some winsock errors.

Wed Jun  7 11:34:38 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* configure.in: add new configure option `--with-winsock2' for mingw.

	* win32/Makefile.sub (config.h): define USE_WINSOCK2 in config.h
	  instead of in CPPFLAGS.

	* ext/socket/extconf.rb: determine whether to use winsock2 or not
	  by using with_config.

Wed Jun  7 10:45:10 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/{configure.bat, setup.mak, Makefile.sub, win32.h}: add
	  new configure option `--with-winsock2'.

	* win32/win32.c (StartSockets): ditto.

	* ext/socket/extconf.rb: ditto.

	* win32/win32.c (open_ifs_socket): new function.

	* win32/win32.c (StartSockets, rb_w32_socket): use open_ifs_socket()
	  instead of socket().
	  ifs socket support is backported from trunk.

Wed Jun  7 09:14:44 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): binding for the return event hook should have
	  consistent scope.  [ruby-core:07928]

	* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
	  event_hooks.	no guarantee for arbitrary hook deletion.
	  [ruby-dev:28632]

Mon Jun  5 18:12:12 2006  Tanaka Akira  <akr@m17n.org>

	* ext/socket/socket.c (sock_s_unpack_sockaddr_in): reject
	  non-AF_INET/AF_INET6 sockaddr.
	  (sock_s_unpack_sockaddr_un): reject non-AF_UNIX sockaddr.
	  [ruby-dev:28691]

Sun Jun  4 20:40:19 2006  Tanaka Akira  <akr@m17n.org>

	* ext/socket/socket.c: fix sockaddr_un handling.
	  [ruby-dev:28677]

Fri Jun  2 22:08:17 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/forwardable.rb: RDoc typo fix from Jan Svitok
	  <jan.svitok at gmail.com>.  [ruby-core:07943]

Fri Jun  2 19:02:09 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: use create_header.

	* ext/openssl/ossl.h, ext/openssl/openssl_missing.h:
	  include RUBY_EXTCONF_H.

Fri Jun  2 17:16:52 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (CLEANINGS): remove extconf.h by distclean if created.

Fri Jun  2 00:11:19 2006  Tanaka Akira  <akr@m17n.org>

	* ext/socket/socket.c (s_recvfrom): alen may be zero with UNIXSocket
	  too.  (tested on NetBSD 3.0)
	  (s_recvfrom_nonblock): extracted from sock_recvfrom_nonblock.
	  (sock_recvfrom_nonblock): use s_recvfrom_nonblock.
	  (ip_recvfrom_nonblock): new method: IPSocket#recvfrom_nonblock
	  (unix_recvfrom_nonblock): new method: UNIXSocket#recvfrom_nonblock
	  (s_accept_nonblock): extracted from sock_accept_nonblock.
	  (sock_accept_nonblock): use s_accept_nonblock.
	  (tcp_accept_nonblock): new method: TCPServer#accept_nonblock
	  (unix_accept_nonblock): new method: UNIXServer#accept_nonblock

Thu Jun  1 19:12:37 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (rb_w32_cmdvector): backslashes inside single-quotes
	  no longer has special meanings.  fixed: [ruby-list:42311]

Thu Jun  1 16:14:41 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_getcwd): runtime's getcwd() will not success
	  if the length of the cwd is longer than MAX_PATH.
	  fixed [ruby-list:42335]

Thu Jun  1 11:29:14 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_getcwd): set errno if not set.
	  fixed [ruby-list:42346]

Sat May 27 11:29:46 2006  nobuyoshi nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): remove extinit files if no statically linked
	  extensions.

Fri May 26 09:05:11 2006  nobuyoshi nakada  <nobu@ruby-lang.org>

	* ruby.h, lib/mkmf.rb (create_header): clear command line options for
	  macros moved to extconf.h.

	* ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and
	  EXTSTATIC permanent.

	* ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS.

	* {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added
	  $(INCFLAGS).

	* lib/mkmf.rb (configuration): add $defs unless extconf.h was created.

Thu May 25 01:52:07 2006  nobuyoshi nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (pkg_config): particular config commands support.

	* ext/extmk.rb: deal with $static set in extconf.rb.

	* mkconfig.rb: merge multiple entries to an entry with multiple lines.

	* lib/mkmf.rb: allow a series of commands to link.

	* win32/Makefile.sub: embed manifests.

	* win32/setup.mak: suffix OS name by runtime version.

Wed May 24 23:52:11 2006  nobuyoshi nakada  <nobu@ruby-lang.org>

	* configure.in (ac_install_sh): ignore dummy install-sh.
	  [ruby-talk:193876]

Wed May 24 03:10:48 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/ssl.rb
	  (OpenSSL::SSL::SocketForwarder#setsockopt,getsockopt): typo fixed.

Mon May 22 17:54:12 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/socket.c (sock_recvfrom_nonblock): use rb_read_pending
	  instead of rb_io_read_pending.
	  [ruby-dev:28663]

Mon May 22 17:30:04 2006  Tanaka Akira  <akr@m17n.org>

	* rubyio.h (rb_io_set_nonblock): declared.

	* io.c (rb_io_set_nonblock): new function.
	  (io_getpartial): nonblocking read support.
	  (io_read_nonblock): new method: IO#read_nonblock.
	  (io_write_nonblock): new method: IO#write_nonblock.

	* ext/socket/socket.c
	  (sock_connect_nonblock): new method: Socket#connect_nonblock.
	  (sock_accept_nonblock): new method: Socket#accept_nonblock.
	  (sock_recvfrom_nonblock): new method: Socket#recvfrom_nonblock.

	  [ruby-core:7917]

Mon May 22 15:57:39 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (umethod_bind): should not update original class.
	  [ruby-dev:28636]

Mon May 22 13:38:57 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (ev_const_get): should support constant access from
	  within instance_eval().  [ruby-dev:28327]

Thu May 18 17:51:32 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_timeval): should round for usec floating
	  number.  [ruby-core:07896]

	* time.c (time_add): ditto.

Thu May 18 17:11:45 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::out): support utf-8.  a patch from Fujioka
	  <fuj at rabbix.jp>.  [ruby-dev:28649]

Thu May 18 00:42:12 2006  nobuyoshi nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb, lib/mkmf.rb: use BUILD_FILE_SEPARATOR in Makefiles.

Wed May 17 17:55:26 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (sys_warning): should not call a vararg function
	  rb_sys_warning() indirectly.  [ruby-core:07886]

Wed May 17 08:17:15 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* util.c (ruby_strtod): try to reduce errors using powersOf10
	  table.  [ruby-dev:28644]

Tue May 16 15:34:18 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (rb_reg_initialize): should not allow modifying literal
	  regexps.  frozen check moved from rb_reg_initialize_m as well.

Tue May 16 09:20:16 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (rb_reg_initialize): should not modify untainted objects in
	  safe levels higher than 3.

	* re.c (rb_memcmp): type change from char* to const void*.

	* dir.c (dir_close): should not close untainted dir stream.

	* dir.c (GetDIR): add tainted/frozen check for each dir operation.

Mon May 15 17:42:39 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
	  typo fixed.  a patch from Florian Gross <florg at florg.net>.

Sat May 13 16:14:05 2006  Tanaka Akira  <akr@m17n.org>

	* lib/pp.rb (PP.mcall): new method.
	  (Struct#pretty_print): call Kernel#class and Struct#members even if
	  overridden.
	  (Struct#pretty_print_cycle): ditto.
	  [ruby-core:7865]

Thu May 11 19:57:00 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* util.c (ruby_strtod): differ addition to minimize error.
	  [ruby-dev:28619]

Fri Aug 11 15:39:25 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/yaml/tag.rb: Replace nodoc with stopdoc so Module methods get
	  documented.

Thu May 11 18:10:43 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* util.c (ruby_strtod): should not raise ERANGE when the input
	  string does not have any digits.  [ruby-dev:28629]

Sun May  7 03:09:51 2006  Stephan Maka  <stephan@spaceboyz.net>

	* lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP#initialize):
	  Use AF_INET6 for nameservers containing colons.

Sat May  6 00:38:42 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* signal.c (trap): sig should be less then NSIG.  Coverity found
	  this bug.  a patch from Kevin Tew <tewk at tewk.com>.
	  [ruby-core:07823]

Thu May  4 02:24:16 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
	  uninitialized array element.  a patch from Pat Eyler
	  <rubypate at gmail.com>.  [ruby-core:07809]

	* array.c (rb_ary_fill): initialize local variables first.  a
	  patch from Pat Eyler <rubypate at gmail.com>.  [ruby-core:07810]

	* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
	  type_tag.  a patch from Pat Eyler <rubypate at gmail.com>.
	  [ruby-core:07808]

Wed May  3 02:12:07 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (make_hostent_internal): accept ai_family
	  check from Sam Roberts <sroberts at uniserve.com>.
	  [ruby-core:07691]

Mon May  1 12:23:19 2006    <sinara@blade.nagaokaut.ac.jp>

	* numeric.c (num_div): use floor rather than rb_Integer().
	  [ruby-dev:28589]

	* numeric.c (flo_divmod): the first element of Float#divmod should
	  be an integer. [ruby-dev:28589]

	* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.

Sat Apr 29 22:42:08 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_decode0): should initialize
	  flag. [ruby-core:07785]

Fri Apr 28 10:53:16 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* util.c (ruby_strtod): should not cut off 18 digits for no
	  reason.  [ruby-core:07796]

	* util.c (ruby_strtod): fixed wrong conversion.

Thu Apr 27 01:38:10 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_fill): internalize local variable "beg" to
	  pacify Coverity.  [ruby-core:07770]

Wed Apr 26 16:59:24 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
	  <tommy at tmtm.org>.  [ruby-dev:28601]

Tue Apr 25 18:00:05 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c (delete_slaves): maybe increment the reference
	  count of a NULL Tcl_Obj [ruby-core:07759].

Tue Apr 25 07:55:31 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/jcode.rb (String::tr_s): should have translated non
	  squeezing character sequence (i.e. a character) as well.  thanks
	  to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]

Tue Apr 25 00:08:24 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* regex.c (re_compile_pattern): should check if c is not a
	  multibyte character.  a patch from KIMURA Koichi
	  <kimura.koichi at canon.co.jp>.  [ruby-dev:28598]

Fri Apr 21 15:19:13 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c (lib_eventloop_ensure): refer freed pointer
	  [ruby-core:07744] and memory leak.

Fri Apr 21 12:14:52 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c: document update patch from Sam Roberts
	  <sroberts at uniserve.com>.  [ruby-core:07701]

Wed Apr 19 13:55:27 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (arg): too much NEW_LIST()

	* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.

Wed Apr 19 11:57:04 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
	  [ruby-dev:28585]

	* parse.y (list_concat): revert last change.

	* parse.y (arg): use NODE_ARGSCAT for placeholder.

Wed Apr 19 11:13:17 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
	  mathew <meta at pobox.com>.  [ruby-core:07738]

Wed Apr 19 10:13:27 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_const_set): raise error when no target klass is
	  supplied.  [ruby-dev:28582]

Wed Apr 19 09:49:36 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (list_concat): should not modify nodes other than
	  NODE_ARRAY.  [ruby-dev:28583]

Tue Apr 18 17:40:37 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: add a binding to a container for a slave IP.

	* ext/tk/lib/tk.rb: update RELEASE_DATE.

	* ext/tk/tcltklib.c: forget to reset a Tcl interpreter.

	* ext/tk/stubs.c: fix potential bugs about handling rb_argv0.

Tue Apr 18 00:11:21 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c: block_unique should be 1, not frame_unique.
	  [ruby-dev:28577]

Fri Aug 11 15:39:25 2006  Eric Hodel  <drbrain@segment7.net>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#find_body): Make RDoc
	  ignore C function prototypes.  Patch by Tilman Sauerbeck
	  <tilman at code-monkey.de>.  [ruby-core:8574]
	* lib/yaml/tag.rb: Replace nodoc with stopdoc so Module methods get
	  documented.

Mon Apr 10 01:03:10 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* prec.c (prec_prec_f): documentation patch from
	  <gerardo.santana at gmail.com>.  [ruby-core:07689]

Sat Apr  8 02:34:34 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_pow): second operand may be too big even if
	  it's a Fixnum.  [ruby-talk:187984]

Sat Apr  8 02:12:38 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* README.EXT: update symbol description.  [ruby-talk:188104]

Thu Apr  6 23:28:47 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* COPYING: explicitly note GPLv2.  [ruby-talk:187922]

Thu Apr  6 11:18:37 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/panedwindow.rb: lack of arguments. [ruby-core:7681]

Thu Apr  6 01:04:47 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tcltklib.c: fix SEGV when embedding to an application.
	  [ruby-core:7600]

	* ext/tk/tcltklib.c: fix SEGV at exit. [ruby-talk:186489]

	* ext/tk/tkutil/tkutil.c: follow to changing specification of
	  instance_eval on ruby-1.9.x.

	* ext/tk/lib/tk.rb: ditto.

	* ext/tk/lib/multi-tk.rb: ditto.

	* ext/tk/lib/tk.rb: remove warning about redefinition of methods.

	* ext/tk/lib/tk/variable.rb: remove warning about unseting Tcl
	  variables.

Wed Mar 29 20:54:44 2006  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (fole_getproperty): WIN32OLE#[] should accept
	  multi arguments.

	* ext/win32ole/tests/testWIN32OLE.rb (test_setproperty_bracket): ditto.

Wed Mar 29 10:07:44 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c (nkf_each_char_to_hex, encode_fallback_subchar,
	  e2w_conv): support C90 compiler.

Wed Mar 29 06:48:40 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (backtrace): reports aliased method names in a generated
	  backtrace.  a patch from "U.Nakamura" <usa at garbagecollect.jp>.
	  [ruby-dev:28471]

Mon Mar 27 22:19:09 2006  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c, config.h}: imported nkf 2.0.6.
	  * Add --ic / --oc option and mapping tables.
	  * Add fallback option.
	  * Add --no-best-fit-chars option.
	  * Fix some bugs.

	* ext/nkf/nkf.c (nkf_split_options): added for parse option string.

	* ext/nkf/lib/kconv.rb (Kconv.to*): add -m0.
	  Note that Kconv.to* still imply -X.

Mon Mar 27 03:17:21 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): insecure calling should be checked for non
	  NODE_SCOPE method invocations too.

	* eval.c (rb_alias): should preserve the current safe level as
	  well as method definition.

Fri Mar 24 23:14:30 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (yield_under_i): pass self again for instance_eval().
	  [ruby-dev:28466]

Fri Mar 24 17:20:03 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (rb_f_sleep): remove description about SIGALRM which
	  is not valid on the current implementation.  [ruby-dev:28464]

Thu Mar 23 10:47:03 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (method_missing): should support argument splat in
	  super.  [ruby-talk:185438]

Mon Mar 20 12:05:18 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* configure.in: Solaris SunPro compiler -rapth patch from
	  <kuwa at labs.fujitsu.com>.  [ruby-dev:28443]

Mon Mar 20 09:40:23 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* configure.in: remove enable_rpath=no for Solaris.
	  [ruby-dev:28440]

Fri Mar 17 19:08:49 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c, ext/openssl/ossl_nsspki.c: fix typo.
	  [ruby-core:07571]

Wed Mar 15 16:54:21 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): support libraries without *.so.

Wed Mar 15 16:35:43 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c, ext/openssl/ossl_nsspki.c: should use
	  "rb_str_new(0, 0)" to make empty string.

Sat Mar 11 14:24:06 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::wrap): removed
	  space before argument parenthesis.  [ruby-talk:183630]

	* ruby.1: a clarification patch from David Lutterkort
	  <dlutter at redhat.com>.  [ruby-core:7508]

Sat Mar  4 15:26:40 2006  Tanaka Akira  <akr@m17n.org>

	* gc.c (id2ref): fix symbol test.

Sat Mar  4 01:08:07 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
	  directories.  a patch from Eric Hodel <drbrain at segment7.net>.
	  [ruby-core:07423]

Thu Mar  2 19:44:18 2006  Tanaka Akira  <akr@m17n.org>

	* gc.c: align VALUE with sizeof(RVALUE) globally.
	  (is_pointer_to_heap): check alignment out of loop.
	  (id2ref): avoid collision between symbols and objects.
	  (rb_obj_id): ditto.  moved from object.c.
	  [ruby-talk:178364] [ruby-core:7305]

Thu Mar  2 18:58:18 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_thread_fd_writable): should not re-schedule output
	  from KILLED thread (must be error printing).

Thu Mar  2 17:57:49 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* gc.c: commited magic for reducing RVALUE size on windows. (24->20byte)
	  [ruby-core:7474]

Thu Mar  2 12:59:14 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (filetime_to_unixtime): should set tm_isdst to -1.
	  stat() didn't treat daylight saving time property on WinNT.
	  [ruby-talk:182100]

Thu Mar  2 08:02:42 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (add_heap): heap_slots may overflow.  a patch from Stefan
	  Weil <weil at mail.berlios.de>.

Wed Mar  1 00:24:31 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/rdoc/parsers/parse_rb.rb (read_escape): could not handle /\^/.
	  merged Mr. Ishizuka's lib/irb/ruby-lex.rb 's patch rev 1.29.
	  [ruby-talk:181631] [ruby-dev:28404]

Tue Feb 28 09:32:17 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/drb/extservm.rb (invoke_service_command): cannot invoke command
	  if command name is quoted on mswin32. [ruby-dev:28400]

Mon Feb 27 00:19:16 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.h (SYM2ID): should not cast to signed long.
	  [ruby-core:07414]

Fri Feb 24 20:07:23 2006  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/drb/drbtest.rb (add_service_command): quote pathnames in the
	  server's command line for space contained directory names.
	  Thanks, arton. [ruby-dev:28386]

Fri Feb 24 12:11:08 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* instruby.rb: install *.exe.manifest and *.dll.manifest if exist.
	  It's for VC++8.

Fri Feb 24 11:33:52 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub (HAVE_HYPOT): bcc32 has hypot().

Fri Feb 24 11:19:58 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* time.c (time_new_internal): add prototype to tell the compiler
	  arugments types.

	* win32/win32.c (NtInitialize): need to set a handler for VC++8.

Fri Feb 24 08:19:16 2006  NARUSE, Yui  <naruse@ruby-lang.org>

	* test.rb: Removed.  Obsolete by test/nkf.

	* ext/.document: enabled documents in nkf and kconv

	* ext/nkf/nkf.c ext/nkf/lib/kconv.rb: Add rdoc.

Thu Feb 23 22:39:59 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: use borlndmm.dll if possible. bcc32's RTL internal
	  memory manager cannot handle large memory block properly.
	  ex: 10000.times { "" << "." * 529671; GC.start } # crash
	  [ruby-dev:28230]

Thu Feb 23 13:20:28 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* eval.c (SETUP_ARGS0): fixed memory corruption. [ruby-dev:28360]

Tue Feb 21 02:18:46 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* configure.in (mingw): have link.  [ruby-list:41838]

	* win32/Makefile.sub (config.h): ditto.

Tue Feb 21 02:07:39 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (f_arglist): should set command_start = Qtrue for
	  command body.  [ruby-talk:180648]

Mon Feb 20 17:37:26 2006  Tanaka Akira  <akr@m17n.org>

	* mkconfig.rb: alias RbConfig for Config.

Mon Feb 20 12:27:53 2006  Kent Sibilev  <ksruby@gmail.com>

	* lib/rational.rb (Integer::gcd): small typo fix.
	  [ruby-core:07395]

Mon Feb 20 01:05:27 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rational.rb (Integer::gcd): replaced by gcd4 in
	  [ruby-core:07390].  [ruby-core:07377]

Mon Feb 20 00:57:02 2006  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.h (OSSL_Debug): should not use __func__.
	  [ruby-dev:28339]

Sun Feb 19 04:46:29 2006  Guy Decoux  <ts@moulon.inra.fr>

	* eval.c: initial value for block_unique must be 1.
	  [ruby-talk:180420]

Sat Feb 18 23:58:26 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/tracer.rb (Tracer::Tracer.add_filter): turn on tracer mode
	  only when caller() level size is one.  [ruby-core:07389]

	* lib/rdoc/parsers/parse_rb.rb: need not to require "tracer".
	  [ruby-core:07389]

	* sample/rtags.rb: ditto.

Sat Feb 18 12:18:26 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/fileutils.rb (FileUtils::fu_world_writable): make it
	  private.  [ruby-core:07383]

Sat Feb 18 00:22:39 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/tracer.rb: merged a minor clarification patch from Daniel
	  Berger <Daniel.Berger at qwest.com>.  [ruby-core:07376]

Fri Feb 17 11:18:42 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* util.c (ruby_strtod): Float("1e") should fail. [ruby-core:7330]

	* pack.c (EXTEND32): unpack("l") did not work where sizeof(long) != 4.
	  [ruby-talk:180024]

	* pack.c (pack_unpack): fixed integer overflow on template "w".
	  [ruby-talk:180126]

Fri Feb 17 09:39:29 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_thread_wait_for): sleep should always sleep for
	  specified amount of time.  [ruby-talk:180067]

Thu Feb 16 01:10:48 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (backtrace): frame->orig_func may not be initialized.
	  [ruby-core:07367]

Wed Feb 15 16:52:52 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): NODE_OP_ASGN1 should allow splat in its
	  argument list.  [ruby-core:07366]

	* parse.y (arg): avoid unnecessary extra argument.
	  [ruby-core:07366]

	* eval.c (rb_eval): honor visibility on OP_ASGN1 and
	  OP_ASGN2. [ruby-core:07366]

Wed Feb 15 10:09:51 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (yield_under_i): should not pass self as an argument to
	  the block for instance_eval.  [ruby-core:07364]

Wed Feb 15 09:20:35 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_obj_instance_eval): should be no singleton classes for
	  true, false, and nil.  [ruby-dev:28186]

Tue Feb 14 18:48:33 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (DMETHOD_P): accessing wrong frame.  [ruby-dev:28181]

	* eval.c (proc_invoke): preserve FRAME_DMETH flag.

Tue Feb 14 15:13:51 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/zlib/zlib.c: supress warning on test/zlib. [ruby-dev:28323]

Tue Feb 14 14:01:17 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* time.c (search_time_t): support non 32bit time_t environments.

	* win32/Makefile.sub (config.h): VC++8 has ``long long'' type.

	* win32/Makefile.sub (config.h): VC++8's time_t is 64bit value.

	* win32/win32.c (rb_w32_utime): drop read-only attribute before
	  changing file time.

	  all changes are backported from CVS HEAD.

Tue Feb 14 11:21:38 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (argf_forward): should not use frame->argv.
	  [ruby-core:07358]

Mon Feb 13 18:08:12 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): argument update propagation.  [ruby-dev:28044]

	* env.h: remove argv member from struct FRAME.

Mon Feb 13 13:27:00 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (eval): should push class from binding if supplied.
	  [ruby-core:07347]

Mon Feb 13 00:04:00 2006  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb (ERB::Compiler): add instance variable @insert_cmd to
	  change <%='s behavior. (backported 1.15 - 1.16)

Sat Feb 11 02:04:11 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (eval): no need to push ruby_class.  [ruby-dev:28176]

Sat Feb 11 01:57:44 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_f_autoload): check if ruby_cbase is nil (during
	  instance_eval for objects cannot have singleton classes,
	  e.g. fixnums and symbols).  [ruby-dev:28178]

Tue Feb  7 23:03:24 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/zlib/zlib.c: should not access ruby objects in finalizer.
	  [ruby-dev:28286]

Mon Feb  6 16:02:51 2006  WATANABE Hirofumi  <eban@ruby-lang.org>

	* file.c (rb_thread_flock): ERROR_NOT_LOCKED is not an error on Cygwin.
	  In such situation, flock() should return 0.

Mon Feb  6 00:41:08 2006  Tanaka Akira  <akr@m17n.org>

	* ruby.h (RSTRUCT_LEN, RSTRUCT_PTR): defined for source level
	  compatibility with ruby 1.9.

Sun Feb  5 21:05:34 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* numeric.c (fix_to_s): removed workaround for radix 2. Historically,
	  rb_fix2str could only handle radix 8, 10, 16. (Rev1.37) But for now,
	  it can handle radix 2..36. [ruby-Bugs#3438] [ruby-core:7300]

Sun Feb  5 18:55:08 2006  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: imported from trunk, rev 1.129

	* lib/net/http.rb (add_field, get_fields): keep 1.8.2 backward
	  compatibility.

	* lib/net/https.rb: imported from trunk, rev 1.3.

	* lib/net/https.rb: #use_ssl? definition moved from net/http.rb.

Sun Feb  5 14:22:15 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/pstore.rb: should return default value if name is not found.
	  [ruby-core:7304]

	* lib/pstore.rb: should raise PStore::Error if not in transaction.

Sat Feb  4 22:51:43 2006  Tanaka Akira  <akr@m17n.org>

	* eval.c: apply the FreeBSD getcontext/setcontext workaround
	  only before FreeBSD 7-CURRENT.

Sat Feb  4 21:19:23 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (LK_ERR): ERROR_NOT_LOCKED is not an error.
	  In such situation, flock() should return 0.

Sat Feb  4 15:56:37 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* numeric.c (fix_to_s): (2**32).to_s(2) fails with exception where
	  sizeof(int) == 4 < sizeof(long). [ruby-core:7300]

Fri Feb  3 15:06:50 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/syck/syck.c (syck_move_tokens): should reset p->cursor or etc
	  even if skip == 0. This causes buffer overrun.
	  (ex: YAML.load('--- "..' + '\x82\xA0' * 511 + '"'))

Thu Feb  2 23:51:18 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/syck/emitter.c (syck_emitter_write): should not set '\0' on
	  emitter's marker. if marker points to the end of buffer, this causes
	  buffer overrun. (ex: YAML.dump("." * 12288))

Thu Feb  2 16:01:24 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (eval): need not to protect $SAFE value.
	  [ruby-core:07177]

Thu Feb  2 14:45:53 2006  Ville Mattila  <ville.mattila@stonesoft.com>

	* configure.in: The isinf is not regognized by autoconf
	  library guesser on solaris 10. [ruby-core:7138]

Wed Feb  1 22:01:47 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* configure.in, hash.c (ruby_setenv): use setenv(3) and unsetenv(3)
	  where they are supported. modifing environ variable seems to
	  segfault solaris 10. [ruby-core:7276] [ruby-dev:28270]

	* ruby.c (set_arg0): if use setenv(3), environ space cannot be used
	  for altering argv[0].

Tue Jan 31 14:46:28 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (rb_struct_select): update RDoc description.
	  [ruby-core:7254]

Tue Jan 31 11:58:51 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: add MultiTkIp#eval and bg_eval.

	* ext/tk/lib/tk/namespace.rb: TkNamespace#eval was enbugged at the
	  last commit. Now it will return a proper object.

Tue Jan 31 00:10:26 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/syck/rubyext.c (syck_resolver_transfer): workaround for SEGV.
	  ex: ruby -ryaml -e 'YAML.load("!map:B {}")' [ruby-core:7217]

Sat Jan 28 07:56:57 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/rdoc/usage.rb: support "a:0:33" style caller[-1]. In this case
	  file name is "a:0". I don't know this really happens though...
	  [ruby-Bugs:3344]

Wed Jan 25 22:29:04 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in, dln.c, file.c, intern.h, missing.h (eaccess): use
	  system routine if provided.  fixed: [ruby-core:07195]

Sun Jan 22 23:27:13 2006  Go Noguchi  <gonoguti@yahoo.co.jp>

	* lib/test/unit/autorunner.rb (process_args): ignore arguments after
	  '--' so that test scripts can handle them.  fixed: [ruby-dev:28258]

Sun Jan 22 22:09:52 2006  Tanaka Akira  <akr@m17n.org>

	* eval.c (POST_GETCONTEXT): define separately from PRE_GETCONTEXT on
	  IA64 to avoid reusing variable address.

Sun Jan 22 20:03:35 2006  Tanaka Akira  <akr@m17n.org>

	* eval.c (ruby_setjmp): define PRE_GETCONTEXT and POST_GETCONTEXT
	  instead of FUNCTION_CALL_MAY_RETURN_TWICE.
	  define PRE_GETCONTEXT to clear carry flag for workaround of
	  FreeBSD/i386 getcontext/setcontext bug.
	  [ruby-dev:28263]

Sat Jan 21 00:36:47 2006  Tanaka Akira  <akr@m17n.org>

	* eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): use only on SPARC and IA64
	  before gcc 4.0.3.
	  [ruby-dev:28247]

Thu Jan 19 22:21:23 2006  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mv): should remove file after copying.
	  [ruby-dev:28223]

Wed Jan 18 23:37:06 2006  Tanaka Akira  <akr@m17n.org>

	* eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): don't clobber %l7 of SPARC
	  if enable-shared.
	  (ruby_setjmp): call FUNCTION_CALL_MAY_RETURN_TWICE after getcontext
	  too.
	  reported by Pav Lucistnik and Marius Strobl.
	  http://lists.freebsd.org/pipermail/freebsd-sparc64/2006-January/003739.html

Tue Jan 17 11:32:46 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/setup.mak (MAKE): workaround for nmake 8.

Tue Jan 17 11:10:21 2006  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/{Makefile.sub,setup.mak}: invoke .bat via shell. workaround
	  for nmake 8.

Mon Jan 16 10:26:23 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/syck/emitter.c (syck_emit_seq, syck_emit_map, syck_emit_item):
	  should output complex key mark even if map's key is empty seq/map.
	  [ruby-core:7129]

Sat Jan 14 05:37:06 2006  Tanaka Akira  <akr@m17n.org>

	* io.c (READ_DATA_PENDING, READ_DATA_PENDING_COUNT): defined
	  for DragonFly BSD 1.4.0.

Sat Jan 14 03:43:24 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* file.c (rb_file_s_chmod): avoid warning where sizeof(int) !=
	  sizeof(void*).

Fri Jan 13 19:14:56 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/rdoc/diagram.rb:
	    - properly quote bare element attributes
	    - terminates dangling elements (e.g. <img>, <br>, <link>, etc)
	    - converts "CVS" to the more HTML-friendly acronym element
	    - adds missing type attributes to style elements

	  based on Paul Duncan's patch <pabs@pablotron.org> [ruby-core:7028]

	* lib/rdoc/generators/html_generator.rb: ditto.
	* lib/rdoc/generators/template/html/hefss.rb: ditto.
	* lib/rdoc/generators/template/html/html.rb: ditto.
	* lib/rdoc/generators/template/html/kilmer.rb: ditto.

Thu Jan 12 11:53:08 2006  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tkballoonhelp.rb: [bug fix] couldn't add to a widget
	  which is constructed with TkComposite module.
	  [new feature] support 'command' option which is called just before
	  popping up the balloon help.

Wed Jan 11 15:00:00 2006  Ville Mattila  <mulperi@iki.fi>

	* io.c (READ_PENDING*): Support solaris 64-bit environments.
	  Solaris defines a opaque FILE struct when compiling 64 bit
	  binaries. This means that we dont have access to _ptr etc.
	  members anymore. The solution by Steven Lumos is to define
	  FILE64 that has needed members available. I've modified
	  the origanal patch a bit so that it compiles both with gcc
	  and now free sun studio 11 compiler and both amd64 and sparc.
	  NOTE! We have to 64 bit solaris FILE structure time to time
	  otherwise we'll get breakage.
	  [ruby-core:7106]

Tue Jan 10 19:42:33 2006  Tanaka Akira  <akr@m17n.org>

	* gc.c (garbage_collect): mark ruby_current_node.
	  if an exception is raised in a finalizer called written in C by
	  rb_gc_call_finalizer_at_exit, ruby_set_current_source may use
	  collected ruby_current_node and mark_source_filename may corrupt
	  memory.

Tue Jan 10 13:30:34 2006  akira yamada  <akira@ruby-lang.org>

	* ext/syck/rubyext.c (syck_resolver_transfer): should be able to load
	  !ruby/object:Bignum syntax 1.8.3 dumped. [ruby-core:6159]

Tue Jan 10 12:47:41 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/yaml/rubytypes.rb (Fixnum): Bignum could not be loaded in
	  ruby 1.8.3/1.8.4. [ruby-core:6115]

	* lib/yaml/rubytypes.rb (Numeric): Subclass of Numeric could not
	  be dumped properly. [ruby-core:7047]

Tue Jan 10 12:00:48 2006  Aaron Schrab  <aaron @nospam@ schrab.com>

	* lib/yaml/rubytypes.rb (Symbol#yaml_new): YAML loading of quoted
	  Symbols broken. [ruby-Bugs:2535]

Mon Jan  9 19:54:35 2006  arton  <artonx@yahoo.co.jp>

	* ext/zlib/extconf.rb: zlib compiled DLL version 1.2.3 distributed by
	  http://www.zlib.net/ has zdll.lib. [ruby-dev:28209]

Mon Jan  9 14:17:12 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/Makefile.sub (OPTFLAGS): I have experienced trouble on y- flag,
	  (VisualC++6) so use -O2b2xg- if  $(MSC_VER) < 1400. [ruby-core:7040]

Mon Jan  9 14:17:12 2006  Kero van Gelder  <rubyforge @nospam@ kero.tmfweb.nl>

	* lib/webrick/httpservlet/filehandler.rb: fixed typo. [ruby-core:7075]

Sat Jan  7 15:40:07 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (singleton): get rid of segfault on syntax error.
	  fixed: [ruby-core:07070]

Fri Jan  6 10:16:20 2006  Steven Lumos  <steven@lumos.us>

	* io.c (READ_DATA_PENDING): defined for 64bit Solaris on SPARC.
	  [ruby-core:7057]
	  (READ_DATA_PENDING_COUNT): ditto.
	  (READ_DATA_PENDING_PTR): ditto.

Sun Jan  1 17:07:59 2006  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (rb_w32_seekdir): should not segfault even if passed
	  the location which rb_w32_telldir didn't return. [ruby-core:7035]
	  (I think HEAD implementation is better. but binary compatibility)

	* test/ruby/test_dir.rb: added.

Sat Dec 31 22:57:00 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_save_context): should not recycle scope object used
	  in a thread.  fixed: [ruby-dev:28177]

Fri Dec 30 18:22:42 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (garbage_collect): mark objects refered from aborting threads.
	  [ruby-dev:28190]

	* win32/Makefile.sub: VC++8 support.

Fri Dec 30 14:24:53 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* dir.c (glob_helper): do not use TRUE for djgpp.

Fri Dec 30 04:54:40 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (eaccess): workaround for VC++8 runtime.

	* win32/win32.c (ioinfo): VC++8 support.

Thu Dec 29 23:59:37 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_gc_mark_threads): leave unmarked threads which won't wake
	  up alone, and mark threads in the loading table.  [ruby-dev:28154]

	* eval.c (rb_gc_abort_threads), gc.c (gc_sweep): kill unmarked
	  threads.  [ruby-dev:28172]

Thu Dec 29 17:02:07 2005  Tanaka Akira  <akr@m17n.org>

	* test/ruby/envutil.rb (EnvUtil.rubybin): search "ruby" instead of
	  "miniruby".  [ruby-dev:28140]

Tue Dec 27 16:59:52 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* test/drb/drbtest.rb (DRbService::self.ext_service): increase
	  timeout limit.  a patch from Kazuhiro NISHIYAMA
	  <zn at mbf.nifty.com>. [ruby-dev:28132]

Tue Dec 27 08:29:18 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLSocket#post_connection_chech):
	  treat wildcard character in commonName. [ruby-dev:28121]

Mon Dec 26 22:32:47 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval), gc.c (gc_mark_children), node.h (NEW_ALIAS,
	  NEW_VALIAS), parse.y (fitem): allow dynamic symbols to
	  NODE_UNDEF and NODE_ALIAS.
	  backported from trunk.  fixed: [ruby-dev:28105]

Mon Dec 26 08:50:36 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (ev_const_get): fixed a bug in constant reference during
	  instance_eval.  [yarv-dev:707]

	* eval.c (ev_const_defined): ditto.

	* lib/yaml.rb (YAML::add_domain_type): typo fixed.  a patch from
	  Joel VanderWerf <vjoel at path.berkeley.edu>.
	  [ruby-talk:165285] [ruby-core:6995]

Sat Dec 24 18:58:14 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* stable version 1.8.4 released.

Fri Dec 23 10:30:23 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/digest/sha2/sha2.c (ULL): support AIX C.  a patch from
	  Kailden <kailden at gmail.com>.  [ruby-core:06984]

Wed Dec 21 16:53:06 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* file.c (w32_io_info): should return handle because FileIndex is
	  valid only while file is open. [ruby-dev:28088]

Wed Dec 21 14:53:26 2005  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (test_kernel_open): use File.identical?.
	  [ruby-talk:171804]

Tue Dec 20 22:41:17 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (eval_under_i): evaluate source in caller's frame.
	  [ruby-dev:28076]

	* eval.c (rb_call_super): use original method name on exception.
	  [ruby-dev:28078]

Tue Dec 20 13:11:59 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/syck/rubyext.c: fixed GC problem (backported HEAD 1.55 - 1.62)
	  [ruby-dev:27839]

	* ext/syck/syck.h (S_FREE): small hack. no need to check if pointer is
	  NULL or not before S_FREE.

	* st.c: uses malloc instead of xmalloc to avoid GC. syck uses st_insert
	  in gram.c to insert node from rb_syck_bad_anchor_handler into
	  SyckParser's hash table. if GC occurs in st_insert, it's not under
	  SyckParser's mark system yet. so RString can be released wrongly.
	  [ruby-dev:28057]

Tue Dec 20 12:53:23 2005  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/rubyext.c (syck_emitter_reset): to ensure compatibility
	  with previous Ruby versions, documents are no longer headless.

Tue Dec 20 01:46:48 2005  Tanaka Akira  <akr@m17n.org>

	* io.c (rb_f_backquote): fix a GC problem on
	  IA64 with gcc 4.0.3 20051216 (prerelease) -O3.

Mon Dec 19 23:32:39 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_symname_p): fixed wrong validation.  [ruby-dev:28047]

Sat Dec 17 03:57:01 2005  Tanaka Akira  <akr@m17n.org>

	* bignum.c (rb_big_rshift): fix a GC problem on
	  IA64 with gcc 4.0.3 20051216 (prerelease).

Sat Dec 17 03:30:23 2005  Tanaka Akira  <akr@m17n.org>

	* eval.c (bmcall): fix a GC problem by tail call on
	  IA64 with gcc 4.0.3 20051216 (prerelease).

Fri Dec 16 00:54:06 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* signal.c (Init_signal): revert C++ style comment.
	  [ruby-dev:28041]

Thu Dec 15 12:35:14 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/tmpdir.rb: merged RDoc patch from Eric Hodel <drbrain at
	  segment7.net>.  [ruby-core:06894]

Thu Dec 15 01:33:31 2005  Tanaka Akira  <akr@m17n.org>

	* ext/zlib/zlib.c (zstream_run): fix a GC problem by tail call on
	  x86_64 with gcc 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)

Wed Dec 14 12:11:46 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* test/gdbm/test_gdbm.rb: specify pid for the argument of
	  Process.wait.  workaround for Cygwin.

Wed Dec 14 12:01:26 2005  Tanaka Akira  <akr@m17n.org>

	* marshal.c (r_object0): fix a GC problem for reading a bignum on
	  IA64 with gcc 3.3.5 (Debian 1:3.3.5-13).

Tue Dec 13 12:23:47 2005  Tanaka Akira  <akr@m17n.org>

	* re.c (rb_reg_regcomp): fix a GC problem on x86_64 with
	  gcc 3.3.5 (Debian 1:3.3.5-13).

Tue Dec 13 01:44:16 2005  Tanaka Akira  <akr@m17n.org>

	* array.c (rb_ary_diff): fix a GC problem on IA64 with
	  gcc 3.3.5 (Debian 1:3.3.5-13).
	  When rb_ary_push is called, there was no register which contains
	  `hash' but `&RHASH(hash)->tbl' instead.

Tue Dec 13 00:08:09 2005  Tanaka Akira  <akr@m17n.org>

	* sprintf.c (rb_str_format): fix a GC problem.
	  [ruby-dev:28001]

Mon Dec 12 15:54:56 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* test/openssl/test_ssl.rb (test_parallel): call GC.start to close
	  unused files. [ruby-dev:27981]

Mon Dec 12 00:33:56 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/digest/digest.c (rb_digest_base_s_digest): add volatile to
	  protect temporary context object.  [ruby-dev:27979]

	* ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should
	  be called before actual variable initialization.
	  [ruby-dev:27986]

Fri Dec  9 23:31:02 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rexml/encoding.rb (encoding=): give priority to particular
	  conversion to iconv.  [ruby-core:06520]

Thu Dec  8 02:07:19 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (umethod_bind): adjust invoking class for module method.
	  [ruby-dev:27964]

Thu Dec  8 00:40:52 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (call_trace_func): klass parameter should be a
	  class/module that defines calling method.  [ruby-talk:169307]

Wed Dec  7 17:10:27 2005  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* sprintf.c (rb_f_sprintf): [ruby-dev:27967]

Wed Dec  7 15:31:35 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_str_format): integer overflow check added.

	* sprintf.c (GETASTER): ditto.

Wed Dec  7 01:02:04 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/README.macosx-aqua: [new document] tips to avoid the known
	  bug on platform specific dialogs of Tcl/Tk Aqua on MacOS X.

	* ext/tk/tcltklib.c: fix bug on switching threads and waiting on the
	  deleted interpreter on vwait and tkwait command.

	* ext/tk/lib/multi-tk.rb: kill the meaningless loop for the deleted Tk
	  interpreter.

	* ext/tk/sample/demos-jp/image3.rb: [bug fix] wrong argument.

	* ext/tk/sample/demos-en/image3.rb: ditto.

	* ext/tk/sample/demos-jp/menu.rb: fix message for MacOS X.

	* ext/tk/sample/demos-jp/menu8x.rb: ditto.

	* ext/tk/sample/demos-en/menu.rb: ditto.

Tue Dec  6 16:37:57 2005  Yuya Nishida  <yuya@j96.org>

	* eval.c (exec_under): avoid accessing ruby_frame->prev.
	  [ruby-dev:27948]

Thu Dec  1 00:50:33 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_funcall2): allow to call protected methods.
	  fixed: [ruby-dev:27890]

Wed Nov 30 23:52:17 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (NEWHEAP, ADD2HEAP): set count after pointer was set.
	  fixed: [ruby-dev:27896]

Wed Nov 30 13:43:07 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el (ruby-expr-beg): support $! at the end of
	  expression.   [ruby-dev:27868]

Mon Nov 28 18:55:43 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/socket.c (init_inetsock_internal): remove setting
	  SO_REUSEADDR option on server socket on Cygwin.
	  fixed: [ruby-core:6765] ([ ruby-Bugs-2872 ])

Mon Nov 28 13:08:54 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (rb_w32_strerror): remove all CR and LF. (avoid broken
	  error message on bccwin32 + winsock)

Mon Nov 28 09:21:49 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/mkmf.rb (create_makefile): should not change sodir with
	  dir.gsub!. (bccwin32 failed to install third party exntesions)
	  [ruby-dev:27834]

Sun Nov 27 00:56:13 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/wsdl/xmlSchema/complexContent.rb: missing
	  ComplexContent#elementformdefault method.

Sat Nov 26 19:57:45 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* dln.c (conv_to_posix_path): should initialize posix.

Thu Nov 24 21:05:58 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* configure.in (AC_CHECK_FUNCS): need to check link().
	  fixed: [ruby-dev:27814]

Thu Nov 24 01:22:25 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* file.c (w32_io_info): CreateFile failed on Win9x if file was already
	  opened. (FILE_SHARE_READ was needed, but actually I don't understand
	  the flags of CreateFile well...)

Wed Nov 23 20:59:01 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: add Tk.pkgconfig_list and Tk.pkgconfig_get
	  [Tk8.5 feature].

	* ext/tk/lib/tk/text.rb: supports new indices modifires on a Text
	  widget [Tk8.5 feature].

	* ext/tk/lib/tk/virtevent.rb: add TkNamedVirtualEvent.

	* ext/tk/lib/tk/autoload.rb: ditto.

	* ext/tk/lib/tk/event.rb: add :data key for virtual events [Tk8.5
	  feature].

Wed Nov 23 18:55:31 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* file.c (w32_io_info): should not call GetFileInformationByHandle
	  for pipe.

	* file.c (w32_io_info): checks return value from rb_w32_get_osfhandle.

	* file.c (w32_io_info): now can identify directory on WinNT.

Wed Nov 23 03:40:49 2005  Guy Decoux  <ts@moulon.inra.fr>

	* re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
	  [ruby-core:06721]

Wed Nov 23 11:01:33 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* intern.h, file.c: failed to compile on windows.

Wed Nov 23 07:26:44 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid.

	* ext/openssl/ossl_x509ext.c (MakeX509ExtFactory): should use
	  OPENSSL_malloc to allocate X509V3_CTX.

	* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): use
	  X509V3_EXT_nconf_nid to avoid SEGV (and to build extensions which
	  values are placed in separate section).

	* test/openssl/test_x509ext.rb: new file.

Wed Nov 23 01:22:57 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (test_identical): test if two files are identical.

	* file.c (rb_f_test): support DOSISH systems where st_ino is not
	  reliable.  fixed: [ruby-core:06672]

	* win32.h, win32.c (rb_w32_osid): check the running platform.

Tue Nov 22 23:52:06 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb: match incomplete (in current enconding) multibyte
	  string.  http://inamode6.tokuhirom.dnsalias.org/show/1551

Tue Nov 22 18:36:11 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (winnt_stat): set mapped errno instead of ENOENT.

Tue Nov 22 14:46:57 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (rb_file_s_basename): skip slashes just after UNC top slashes.

	* test/ruby/test_path.rb (test_dirname, test_basename): follow new
	  spec. and add new tests.

Tue Nov 22 13:18:32 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (rb_w32_stat): Dir.chdir('//server/shared');
	  p Dir.glob('*') should work on WinNT. (implemented our own
	  stat(2) on WinNT) [ruby-list:41552] [ruby-dev:27711]

Tue Nov 22 02:31:53 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkextlib/tile.rb: bug fix (Tk::Tile::USE_TTK_NAMESPACE
	  is not defined).

Tue Nov 22 01:45:21 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin but
	  DOSISH is not.  fixed: [ruby-dev:27797]

Mon Nov 21 22:50:48 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_path_skip_prefix, rb_file_s_basename): UNC without path
	  should not be splitted.  fixed: [ruby-dev:27776] [ruby-dev:27786]

	* parse.y (dsym): prohibit empty symbol literal by interpolation.
	  fixed: [ruby-talk:166529]

Mon Nov 21 16:03:48 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/setup.mk: findstr doesn't exist on win9x.
	  fixed: [ruby-dev:27756]

Sun Nov 20 22:34:06 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_symname_p): [ not followed by ] is not valid symbol.
	  fixed: [ruby-talk:166520]

Sat Nov 19 19:57:54 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/fileutils.rb (FileUtils::ln): ln documentation fix.
	  [ruby-core:06661]

Sat Nov 19 07:34:32 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/font.rb: remove dependency on Ruby's version (1.8
	  or 1.9).

	* ext/tk/lib/tkextlib/ICONS/icons.rb: ditto.

	* ext/tk/sample/tkextlib/treectrl/demo.rb: ditto.

Fri Nov 18 17:57:08 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (rb_file_s_dirname): should use skipprefix for UNC path.
	  pointed out by nobu ([ruby-dev:27744]). fixed: [ruby-core:5076]

Fri Nov 18 17:35:09 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: add restriction to access the entried
	  command table and manipulate other IPs (for reason of security).
	  Now, a IP object can be controlled by only its master IP or the
	  default IP.

	* ext/tk/lib/remote-tk.rb: add restriction to manipulate.

	* ext/tk/tcltklib.c (ip_is_slave_of_p): add TclTkIp#slave_of?(ip)
	  to check manipulability.

	* ext/tk/lib/tk.rb: bug fix on handling of Tcl's namespaces.

	* ext/tk/lib/tk/namespace.rb: ditto.

Fri Nov 18 17:26:06 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (rb_file_s_dirname): added checks for some patterns with drive
	  letter. fixed: [ruby-dev:27738]

	* test/ruby/test_path.rb (test_dirname): added tests for above
	  patterns.

Fri Nov 18 12:18:02 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.h (S_IFIFO): r,w = IO.pipe; r.stat.pipe? now
	  returns true on VisualC++6.

Wed Nov 16 23:24:17 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (static-ruby): overridable.

	* ext/extmk.rb (parse_args): force to link extensions statically only
	  if static is given for extstatic.

	* ext/extmk.rb (RUBY, RUBYW): overridable.

Tue Nov 15 23:46:35 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/find.rb (Find::find): should not ignore symbolic links to
	  non-existing files.  [ruby-talk:165866]

Tue Nov 15 16:23:26 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* array.c (rb_ary_fill): previous commit disabled this usage:

	    a = [0,1,2,3,4,5,6,7,8,9]
	    a.fill {|i| a[i] * 10} #=> [nil, nil, ...., nil]

	  previous commit has the advantage of early garbage collection, but
	  potensially this would break some script. so I reverted behavior.

Tue Nov 15 16:04:10 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* array.c (rb_ary_fill): tail elements were vanished when the middle
	  part of array was filled. (ie: [0,1,2,3,4].fill(-1,2,1) => [0,1,-1])

	* test/ruby/test_array.rb (test_fill): added.

Tue Nov 15 14:39:16 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_fill): should adjust array length correctly when
	  an array is expanded in the fill process.  [ruby-core:06625]

Mon Nov 14 23:49:57 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_readlink): ERANGE will occur only on GPFS.
	  [ruby-dev:27699]

Mon Nov 14 17:36:22 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_first): RDoc update from Daniel Berger
	  <djberg96@yahoo.com>.  [ruby-core:06577].

Fri Nov 11 10:31:44 2005  Zach Dennis  <zdennis@mktec.com>

	* ext/socket/socket.c: Socket Documentation. [ruby-core:6552]

Fri Nov 11 08:20:56 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (OUTFLAG): keep trailing spaces.  [ruby-dev:27666]

	* mkconfig.rb: substitution refereces added.

Fri Nov 11 07:44:18 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* configure.in: undef HAVE_LINK on BeOS. (link(2) always returns
	  EINVAL, and this causes error in test/fileutils.)

	* file.c: overwride chown(2) and fchown(2) on BeOS. (these functions
	  should not change user/group id if -1 is passed as corresponding
	  argument, and this causes error in test/fileutils too)
	  [ruby-dev:27672]

	* file.c (rb_file_s_link): checks HAVE_LINK.

Tue Nov  8 15:32:27 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/drb/ssl.rb (DRb::SSLConfig#accept): fixed typo.
	  [ruby-dev:27560] [ruby-core:4627]

Mon Nov  7 13:43:51 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/stubs.c (_nativethread_consistency_check): use simpler
	  (low cost) way to check whether the Tcl interpreter was compiled
	  with threads enabled of not.

	* ext/tk/tcltklib.c: reduce warnings.

	* ext/tk/tkutil/tkutil.c: ditto.

Mon Nov  7 00:06:58 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/yaml.rb: removed :nodoc: to generate Kernel doc. [ruby-core:6324]

Sun Nov  6 23:39:13 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (Iconv::BrokenLibrary): exception when detected a
	  bug of underlying library.

Sun Nov  6 21:46:59 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tk/stubs.c (ruby_tcl_create_ip_and_stubs_init): should touch
	  interpreter after initialization is done. [ruby-dev:27638]

Sun Nov  6 20:13:27 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_readlink): readlink(2) on AIX fails with ERANGE if
	  buffer size is less than required.  fixed: [ruby-dev:27634]

Wed Nov  2 20:25:28 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/extconf.rb: ext/tk/extconf.rb: change the check parameter
	  for Win32.

Wed Nov  2 20:14:53 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib: merge into ext/tk and remove.

Wed Nov  2 19:03:06 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_rbUpdateObjCmd,
	  ip_rb_threadUpdateObjCmd): passed improper flags to DoOneEvent().

	* ext/tk/tkutil.c: use rb_obj_respond_to() instead of rb_respond_to().

Tue Nov  1 14:20:11 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call_super): should call method_missing if super is
	  called from Kernel method.

	* eval.c (exec_under): frame during eval should preserve external
	  information.

Tue Nov  1 10:50:17 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: should check ERR_peek_last_error().
	  [ruby-dev:27597]

	* ext/openssl/ossl.c (ossl_raise): ditto.

Mon Oct 31 17:34:46 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* configure.in: use proper option for Sun linker. A patch from
	  Shinya Kuwamura <kuwa at labs.fujitsu.com>.  [ruby-dev:27603]

Mon Oct 31 11:27:22 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/gdbm/test_gdbm.rb, test/sdbm/test_sdbm.rb (test_s_open_error):
	  skip on Win32/DOS platforms.

Mon Oct 31 05:49:23 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_cipher.c (ossl_cipher_update): input data must
	  not be empty. [ruby-talk:161220]

	* test/openssl/test_cipher.rb: add test for Cipher#update("").

Mon Oct 31 05:37:20 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpservlet/cgihandler.rb
	  (WEBrick::HTTPServlet::CGIHandler#do_GET): the value of Set-Cookie:
	  header field should be splited into each cookie.  [ruby-Bugs:2199]

	* lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookie): new method
	  to parse the value of Set-Cookie: header field.

	* test/webrick/test_cookie.rb, test/webrick/test_cgi.rb,
	  test/webrick/webrick.cgi: add some test for cookie.

Mon Oct 31 03:19:36 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/readline/readline.c (readline_readline): type check.
	  [ruby-core:6089]

	* numeric.c (fix_rshift): RDoc fix.  [ruby-core:6351]

	* util.h (strtod): add #undef for platforms defines strtod()
	  macro.   [ruby-dev:27563]

Mon Oct 31 02:35:59 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* test/ruby/test_float.rb (test_precision): test by assert_in_delta.
	  [ruby-dev:27575]

Sat Oct 29 01:58:25 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/etc/etc.c: document update from mathew <meta@pobox.com>.
	  [ruby-core:06473]

	* ext/fcntl/fcntl.c: ditto.

Thu Oct 27 16:45:31 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (scan_once): wrong condition to use mbclen2().
	  [ruby-dev:27535]

Wed Oct 26 09:27:27 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/syck/implicit.c (syck_type_id_to_uri): should return
	  newly allocated memory. otherwise, type_id will be freed
	  twice. [ruby-dev:27384] [ruby-core:6385]

Wed Oct 26 09:04:51 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ruby.h (Qfalse, Qtrue, Qnil, Qundef): make sure these immediate
	  values have VALUE type. there is an environment where sizeof(VALUE)
	  != sizeof(int) like IA64. if 32bit integer (Qtrue) is passed to ANYARGS
	  and received by 64bit integer (VALUE), upper bits may have garbage value.
	  [ruby-dev:27513]

Wed Oct 26 01:58:19 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_EXTERN): macro to export symbols in shared
	  library.  [ruby-core:05528]

	* defines.h, {bcc32,win32,wince}/Makefile.sub (RUBY_EXTERN): moved to
	  configuration pass.

	* ext/extmk.rb (extmake): RUBY_EXTERN for static linked extensions.

Tue Oct 25 15:32:00 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/rational.rb: applied documentation patch from Gavin Sinclair
	  <gsinclair@gmail.com>.  [ruby-core:06364]

	* lib/irb.rb (IRB::Irb::eval_input): handle prompts with newlines
	  in irb auto-indentation mode.  [ruby-core:06358]

Tue Oct 25 02:12:08 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/markup/simple_markup.rb (SM::SimpleMarkup::LABEL_LIST_RE):
	  reduce redundant backtrack.  [ruby-talk:161771]

Tue Oct 25 00:27:35 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/*: RDoc documentation from Eric Hodel
	  <drbrain@segment7.net> added.

Mon Oct 24 21:14:29 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in, io.c: use sys/syscall.h if syscall.h is not available.
	  [ruby-core:06247]

Mon Oct 24 20:49:45 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/Win32API/lib/win32/resolv.rb (get_info): support multiple DNS.
	  fixed: [ruby-list:40058], [ruby-dev:27479]

Mon Oct 24 07:57:56 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/tk/lib/tk/canvas.rb (TkCanvasItemConfig::__item_val2ruby_optkeys):
	  typo fixed.  [ruby-talk:162187]

	* ext/tk/lib/tk/menu.rb (TkMenuEntryConfig::__item_val2ruby_optkeys):
	  ditto.  [ruby-core:06359]

Sun Oct 23 21:50:15 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/enumerator/enumerator.c: applied documentation patch from
	  James Edward Gray II <james@grayproductions.net>.
	  [ruby-core:06348]

Sun Oct 23 07:11:11 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/extconf.rb: improve messages [ruby-core:06325].

	* ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb,
	  ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb,
	  ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb,
	  ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb,
	  ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb,
	  ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb,
	  ext/tk/lib/tk/toplevel.rb: improve conversion of option values.

	* ext/tk/lib/tkextlib/*: ditto.

	* ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2.

	* ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3.

	* ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2.

	* ext/tk/lib/tkextlib/vu/*: support vu 2.3.0.

	* ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3).

Sat Oct 22 23:54:07 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb, lib/mkmf.rb (with_config): support --with-extension
	  options.  [ruby-dev:27449]

Sat Oct 22 13:26:57 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check
	  if valid as a symbol name more strictly.  [ruby-dev:27478]

	* test/ruby/test_symbol.rb: tests for [ruby-core:03573].

	* time.c (rb_strftime): removed meaningless volatile modifiers, and
	  concatenate successive nul characters at once.  [ruby-dev:27472]

Fri Oct 21 19:21:56 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* rubysig.h (CHECK_INTS): fixed typo. (I believe bit-or is improper)

Fri Oct 21 17:49:32 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bin/erb (ERB::Main::run): typo fixed.  [ruby-core:06337]

Fri Oct 21 15:27:17 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bignum.c (bignew_1): convertion from `int' to `char' discards
	  upper bits, (ie. (char)0xff00 -> 0) so it's better to test if
	  nonzero and set 0 or 1 instead of simply casting ... as a flag usage.
	  (but I believe this won't cause actual bug in current implementation)
	  [ruby-dev:27055]

	* time.c: should use LONG_LONG instead of `long long'.

Thu Oct 20 09:37:15 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/mkmf.rb (create_makefile): Borland make seems not to allow
	  empty dependency list. If this change is not good, please correct
	  it.

Thu Oct 20 07:55:09 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): get rid of a restriction
	  of Borland make.  fixed: [ruby-dev:27460]

Thu Oct 20 00:13:18 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* rubysig.h (CHECK_INTS): fix typo.

Wed Oct 19 23:58:03 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): do not create unnecessary empty
	  directories.  fixed: [ruby-dev:27451]

Wed Oct 19 19:26:15 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (rb_gc_mark_parser): get rid of segfault with old yacc.
	  fixed: [ruby-dev:27439]

Wed Oct 19 08:28:32 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_join): elements may contain null pointer strings.
	  report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326]

Wed Oct 19 02:34:33 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c, gc.c, time.c: made internal symbols static.  [ruby-dev:27435]

Wed Oct 19 01:27:07 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* regex.c (re_compile_pattern): numeric literal inside character class
	  disabled succeeding backtrack.  fixed: [ruby-list:41328]

Mon Oct 17 21:18:50 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_heap): byacc never free parser stack.
	  fixed: [ruby-dev:27428]

Mon Oct 17 16:04:47 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* file.c (chmod_internal, lchmod_internal): fixed type of 2nd argument.

Sun Oct 16 22:16:51 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: omit non-existing directories.

Sun Oct 16 14:30:05 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/rinda.rb (Rinda::Tuple#initialize): check remote hash
	  tuple. fixed: [ruby-list:41227]

	* test/rinda/test_rinda.rb: test it.

Sun Oct 16 03:38:07 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* rubysig.h (CHECK_INTS): prevent signal handler to run during
	  critical section.  [ruby-core:04039]

	* eval.c (load_wait): need not to call rb_thread_schedule()
	  explicitly.  [ruby-core:04039]

	* eval.c (rb_thread_schedule): clear rb_thread_critical.
	  [ruby-core:04039]

Sat Oct 15 19:56:38 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* bin/erb: typo fixed, again. thanks, Doug Kearns.

Fri Oct 14 22:08:26 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (ioctl): should set errno.

Fri Oct 14 16:57:32 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/config.rb (Config::FileHandler): :UserDir should be nil.
	  It is harmful to permit the access to ~/public_html by default.
	  suggested by Hiroyuki Iwatsuki.

Thu Oct 13 23:29:51 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (HEAPCNT): bison allocates indivisible size.
	  fixed: [ruby-core:06261]

	* io.c, pack.c, ext/syck/rubyext.c, ext/syck/syck.h, missing/isinf.c:
	  get rid of warnings.  fixed: [ruby-core:06247]

Wed Oct 12 12:52:57 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.c (Init_openssl): should call
	  OpenSSL_add_ssl_algorithms().

Wed Oct 12 11:08:54 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* file.c (rb_f_test): typo in RDoc comments.

Tue Oct 11 21:41:58 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_obj_respond_to): check if obj responds to the given
	  method with the given visibility.  [ruby-dev:27408]

	* eval.c (rb_respond_to): conform to Object#respond_to?.  [ruby-dev:27411]

Tue Oct 11 00:01:21 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* st.c (st_free_table): do not call free() but xfree().
	  [ruby-core:06205]

Sat Oct  8 20:04:40 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (Init_Binding): add Binding#dup method.  [yarv-dev:666]

	* parse.y (rb_parser_malloc, rb_parser_free): manage parser stack on
	  heap.  [ruby-list:41199]

	* ext/iconv/charset_alias.rb: parse config.charset_alias file directly.

Fri Oct  7 09:54:00 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::Cookie::parse): Cookies from Nokia devices may
	  not be parsed correctly.  A patch from August Z. Flatby
	  (augustzf) in [ruby-Patches-2595].  [ruby-core:06183]

Thu Oct  6 20:12:16 2005  Minero Aoki  <aamine@loveruby.net>

	* ext/strscan/strscan.c (strscan_free): remove useless code.
	  [ruby-dev:26368] [ruby-dev:27389]
	  (backported from trunk, rev 1.22)

Wed Oct  5 04:42:38 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/xmlrpc/server.rb (XMLRPC::Server#initialize): should mount the
	  servlet on "/".

Wed Oct  5 03:59:09 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/xmlrpc/server.rb (XMLRPC::Server#serve): delete wrong call
	  of "join".

Mon Oct  3 00:04:00 2005  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* pack.c (EXTEND16): [ruby-dev:27383]

Thu Sep 29 10:26:18 2005  Tanaka Akira  <akr@m17n.org>

	* ext/dl/dl.c (rb_io_to_ptr): abolish sizeof(FILE).
	  [ruby-dev:27317]

Thu Sep 29 07:22:05 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* evalc. (rb_f_send): underscores need to be escaped.
	  fixed by Doug Kearns.  [ruby-core:06053]

Thu Sep 29 00:57:35 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ev_const_get), variable.c (rb_const_get_0): retry only when
	  autoload succeeded.

	* variable.c (rb_autoload_load): now return true if autoload
	  succeeded.  fixed: [ruby-dev:27331]

Wed Sep 28 23:42:15 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (apply2files): add prototype.

	* file.c (rb_stat_inspect): constified.

	* class.c (rb_mod_init_copy, rb_class_init_copy), file.c (rb_stat_init_copy),
	  numeric.c (num_init_copy), object.c (rb_obj_init_copy, Init_Object),
	  re.c (match_init_copy, rb_reg_init_copy), time.c (time_init_copy):
	  undocumented.

Wed Sep 28 23:09:23 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/delegate.rb: document update from James Edward Gray II
	  <james@grayproductions.net>.  [ruby-core:06027]

Wed Sep 28 15:14:19 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (WEBrick::CGI#start): req.query_string should
	  refer the value of QUERY_STRING. [ruby-list:41186]

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#query_string=):
	  add new method.

Wed Sep 28 10:45:44 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: cannot compile with Tcl/Tk8.0.x
	  [ruby-dev:27335].

Wed Sep 28 08:12:18 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (read_buffered_data): check if reached EOF.  fixed: [ruby-dev:27334]

Wed Sep 28 07:56:52 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/yaml/basenode.rb (YAML::BaseNode::match_segment): fix typo.
	  [ruby-dev:27237], [ruby-core:05854]

	* lib/yaml/tag.rb (Module#yaml_as): suppress warnings.

	* lib/yaml/types.rb (YAML::PrivateType, YAML::DomainType): ditto.

Wed Sep 28 03:23:35 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* rubysig.h: fixed build problem with --enable-pthread on platforms
	  which don't have setitimer().

Mon Sep 26 22:32:13 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (set_trace_func): add rb_secure(4) to prevent adding
	  tracing function.

Sun Sep 25 12:05:10 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* bin/erb: typo fixed.

Sun Sep 25 01:46:43 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-calculate-indent): arrange deep-indent
	  closing parenthesis at same column as the opening.

Sun Sep 25 00:42:11 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-expr-beg): deal with heredoc separately.
	  fixed: [ruby-list:41168]

	* misc/ruby-mode.el (ruby-calculate-indent): not to deepen indent
	  level for continuous line inside parentheses.
	  http://nabeken.tdiary.net/20050915.html#p02

Sun Sep 25 00:18:11 2005  Tanaka Akira  <akr@m17n.org>

	* eval.c (unknown_node): show more information.  [ruby-dev:26196]

Sat Sep 24 08:56:01 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (cd): no longer accept :noop option, related
	  code is useless (backported from trunk, rev 1.67).
	  [ruby-core:05858] [ruby-Bugs:2494]

Sat Sep 24 08:38:07 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose,
	  DryRun (backported from trunk, rev 1.66). [ruby-core:05954]

	* test/fileutils/test_nowrite.rb: test it.

	* test/fileutils/test_dryrun.rb: new file.

	* test/fileutils/test_verbose.rb: new file.

Sat Sep 24 02:40:20 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/delegate.rb: document update from James Edward Gray II
	  <james@grayproductions.net>.  [ruby-core:05942]

Thu Sep 22 23:36:24 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (find_executable0): default path if environment is not
	  set.  [ruby-dev:27281]

Thu Sep 22 16:33:12 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* test/readline/test_readline.rb (TestReadline::replace_stdio):
	  merged the patch of [ruby-dev:25232] instead of [ruby-dev:25223].

Wed Sep 21 23:30:44 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (configuration): generalized nmake dependent code.

Wed Sep 21 09:07:55 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* stable version 1.8.3 released.

Wed Sep 21 08:52:25 2005  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/token.c: correctly compute identation of a block
	  scalar's parent node. [ruby-talk:150620]

Wed Sep 21 08:20:24 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* README.EXT, README.EXT.ja: add new features.

Wed Sep 21 07:43:58 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (default_argv, Arguable#options): defaults strings
	  to be parsed to Arguable instance.

Wed Sep 21 02:44:09 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* file.c (path_check_0): disallow sticky world writable directory
	  in PATH (and $LOAD_PATH).  [ruby-dev:27226]

	* file.c (fpath_check): typo fixed.

Tue Sep 20 22:29:49 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/wsdl/simpletype/rpc/test_rpc.rb, test/wsdl/ref/test_ref.rb,
	  test/wsdl/any/test_any.rb test/soap/wsdlDriver/test_calc.rb:
	  suppress deliberate warnings with $VERBOSE = nil.

Tue Sep 20 21:26:23 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/wait/lib/nonblock.rb: disable on platforms non-blocking flag
	  is not available.  fixed: [ruby-dev:27187]

Tue Sep 20 18:23:04 2005  Tanaka Akira  <akr@m17n.org>

	* eval.c (thread_mark): mark th->last_status.  [ruby-dev:27179]

Tue Sep 20 18:20:33 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/yaml.rb: require 'yaml/constants'.  [ruby-core:5776]

Tue Sep 20 17:48:34 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset
	  information to content-type header.[ruby-core:5127]

	* lib/xmlrpc/server.rb (CGIServer::serve): ditto.

	* lib/xmlrpc/server.rb (ModRubyServer::serve): ditto.

	* lib/xmlrpc/server.rb (WEBrickServlet::service): ditto.

Tue Sep 20 17:34:46 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* test/webrick/test_cgi.rb: set ENV["PATH"] to CGIEnvPath on
	  windows. bcc32's runtime is not installed into system directory,
	  so it cannot be found without this setting. [ruby-dev:27166]

Tue Sep 20 17:10:38 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove
	  test_s_open_error test to detect duplicate open.
	  [ruby-dev:27202]

Tue Sep 20 17:08:31 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* io.c: PIPE_BUF is not defined on BeOS. use _POSIX_PIPE_BUF instead.
	  [ruby-dev:27185]

Tue Sep 20 16:53:53 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* test/readline/test_readline.rb (TestReadline::replace_stdio):
	  BSD seek support from [ruby-dev:25223].  fixed: [ruby-dev:27150]

Tue Sep 20 15:39:40 2005  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/emitter.c (syck_scan_scalar): prevent indicators from
	  appearing alone or at the end of plain scalars. [ruby-core:5826]

	* ext/syck/emitter.c (syck_emit_scalar): treat typed scalar nodes
	  as complex keys.

	* lib/syck.h: version 0.60.

	* lib/yaml/basenode.rb (YAML::BaseNode#at): transform keys during
	  key searches.

	* ext/syck/rubyext.c: loading of binary-typed nodes.  prevent
	  emission of plain strings that look like symbols, but which aren't.

Tue Sep 20 05:50:22 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* test/xmlrpc/test_webrick_server.rb (setup_http_server):
	  should not include 'webrick/https' unless 'use_ssl' because
	  it fails where openssl is not installed.

Tue Sep 20 00:34:07 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_close): call rb_io_close() directly if io is a T_FILE
	  object.  [ruby-dev:27156]

Mon Sep 19 19:09:08 2005  Minero Aoki  <aamine@loveruby.net>

	* file.c (rb_file_chown): should accept nil. [ruby-dev:27171]
	  (backport from trunk, rev 1.208)

Mon Sep 19 18:35:13 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/dl/dl.c (rb_io_to_ptr): fix DragonFlyBSD support.
	  [ruby-dev:27151]

Mon Sep 19 14:17:04 2005  Minero Aoki  <aamine@loveruby.net>

	* ext/syck/emitter.c (syck_emit): passing an int* value to the
	  long* parameter causes unaligned access on LP64 systems.
	  [ruby-dev:27161]

Mon Sep 19 13:44:03 2005  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c: avoid core dump with WIN32OLE_EVENT.
	  [ruby-dev:27133]

Mon Sep 19 10:36:06 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (cp_r): default is :dereference_root=>true for
	  backward compatibility. [ruby-dev:27145]

	* test/fileutils/test_fileutils.rb (test_cp_r): test it.

Mon Sep 19 09:57:39 2005  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb: backported from trunk (1.36).
	  (again) [ruby-dev:27145]

Mon Sep 19 07:45:37 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_pkey.h, ossl_pkey_rsa.c, ossl_pkey_dsa.c:
	  an instance variable "private" is added to OpenSSL::PKey class.
	  this ivar is a flag that shows whether there is a private key
	  in the instance.

	* ext/openssl/ossl_engine.c: (ossl_engine_load_privkey): set private
	  key flag.

Mon Sep 19 06:41:32 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb: backported from trunk (rev 1.65):

	* lib/fileutils.rb (rm_r): new option :secure.

	* lib/fileutils.rb (rm_rf): new option :secure.

	* lib/fileutils.rb: new method #remove_entry_secure.

	* lib/fileutils.rb (cd): remove option :noop.

	* lib/fileutils.rb (cp_r): new option :dereference_root.

	* lib/fileutils.rb (cp_r): new option :dereference_root.

	* lib/fileutils.rb: new method #remove_entry.

	* lib/fileutils.rb: new method #chmod_R.

	* lib/fileutils.rb: new method #chown.

	* lib/fileutils.rb: new method #chown_R.

	* lib/fileutils.rb: new method .commands.

	* lib/fileutils.rb: new method .options.

	* lib/fileutils.rb: new method .have_option?.

	* lib/fileutils.rb: new method .options_of.

	* lib/fileutils.rb: new method .collect_method.

	* lib/fileutils.rb: use module_function instead of single extend.

	* test/fileutils/test_fileutils.rb: backported from trunk (1.36).

Mon Sep 19 03:17:48 2005  Tanaka Akira  <akr@m17n.org>

	* file.c (rb_thread_flock): wrap the flock system call by
	  TRAP_BEG/TRAP_END to enable signals.  [ruby-dev:27122]

	* ext/socket/socket.c (bsock_send): wrap the sendto and send system
	  call by TRAP_BEG/TRAP_END to enable signals when writing to a socket
	  which is full.  [ruby-dev:27132]

	* io.c (rb_io_syswrite): wrap the write system call by
	  TRAP_BEG/TRAP_END to enable signals when writing to a pipe which is
	  full.  [ruby-dev:27134]

Mon Sep 19 03:02:08 2005  Tanaka Akira  <akr@m17n.org>

	* io.c (io_fwrite): wrap the write system call by TRAP_BEG/TRAP_END to
	  enable signals when writing to a pipe which is full.

Sun Sep 18 02:10:47 2005  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml/rubytypes.rb: remove comments that are bungling up
	  the rdoc and ri output.  output symbols as plain scalars.

	* ext/syck/rubyext.c (syck_emitter_reset): emit headless
	  documents always.

	* ext/syck/emitter.c (syck_scan_scalar): quote scalars with any
	  kind of surrounding line space, tabs or spaces alike.

	* ext/syck/token.c: accept tabs as whitespace, not for indentation,
	  but strip from plain scalars.

	* test/yaml/test_yaml.rb: remove outdated tests.

Sat Sep 17 23:25:04 2005  sheepman  <sheepman@sheepman.sakura.ne.jp>

	* lib/mathn.rb (Rational::inspect): should preserve original
	  operand.  [ruby-core:05806]

Sat Sep 17 23:20:27 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::Cookie): should handle multiple values for a
	  cookie name.  [ruby-talk:156140]

Sat Sep 17 10:42:13 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string and bg_eval_string
	  should call Kernel.eval on caller's safe-level instead of slave's
	  safe-level (Of course, the given script should be evaluated on
	  slave's safe-level).

Sat Sep 17 09:45:26 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_substr): should propagate taintness even for
	  empty strings.  [ruby-dev:27121]

	* string.c (rb_str_aref): should infect result if range argument
	  is tainted.  [ruby-dev:27121]

Sat Sep 17 08:35:39 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/maker/base.rb (RSS::Maker::ItemsBase#normalize): fixed
	  strange RSS::Maker::Item#max_size behavior.
	  Thanks to Kazuhiko <kazuhiko@fdiary.net>.

	* test/rss/test_maker_1.0.rb (RSS::TestMaker10#test_items): ditto.

Fri Sep 16 23:09:20 2005  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_search_event_at): bug fix
	  in ext/win32ole/sample/ienavi.rb.

	* ext/win32ole/win32ole/tests/testOLEEVENT.rb: ditto.

Fri Sep 16 22:41:18 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_s_extname): empty string for path name ending with a
	  period.  fixed: [ruby-core:05651]

	* file.c (rb_file_join): smarter behavior at edge cases.
	  fixed: [ruby-core:05706]

Fri Sep 16 18:34:01 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/syck/node.c (syck_replace_str): was using return from the
	  void function.  a patch from MIYAMUKO Katsuyuki
	  <miyamuko at mtb.biglobe.ne.jp>.  [ruby-dev:27111]

Fri Sep 16 14:48:48 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: fix typo on MultiTkIp#bg_eval_string

Fri Sep 16 12:02:12 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/syck/rubyext.c (syck_resolver_transfer): remove C++ style
	  comment (//).  [ruby-core:05793]

Fri Sep 16 00:14:14 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/logger/test_logger.rb: unintentionally overwritten changes by
	  Usa.  reverted.

Fri Sep 16 00:06:18 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (WEBrick::CGI::Socket#initialize): should set
	  $stdout.binmode.

Thu Sep 15 23:25:21 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/{soap,wsdl,xsd}, test/{soap,wsdl,xsd}: imported soap4r/1.5.5.

	  #nnn is a ticket number at http://dev.ctor.org/soap4r

	  * SOAP

	    * allow to configure an envelope namespace of SOAP request. (#124)
	   	TemporaryNamespace = 'http://www.w3.org/2003/05/soap-envelope'
	  	@client.options["soap.envelope.requestnamespace"] =
		  TemporaryNamespace
	 	@client.options["soap.envelope.responsenamespace"] =
		  TemporaryNamespace
		@client.do_proc(...)

	    * let SOAP request XML indent space configuable.  see
	      "soap.envelope.no_indent" option. (#130)

	    * let external CES configuable.
	      ex. client["soap.mapping.external_ces"] = 'SJIS'.  $KCODE is used
	      by default. (#133)
		external CES ::= CES used in Ruby object of client and server
		internal CES ::= CES used in SOAP/OM

	    * add iso-8859-1 external CES support. (#106)

	    * fixed illegal 'qualified' handling of elements.  it caused
	      ASP.NET inteoperability problem. (#144)

	    * added 'soap.envelope.use_numeric_character_reference' (boolean)
	      option to let query XML use numeric character reference in XML,
	      not plain UTF-8 character.  !GoogleSearch server seems to not
	      allow plain UTF-8 character since 2005-08-15 update. (#147)

	    * SOAP::Header::SimpleHeader (de)serialization throws an exception
	      on !SimpleHeader.on_(in|out)bound when header is a String.  so we
	      could not use a simple single element headerItem.  fixed.  thanks
	      to emil. (#129)

	    * out parameter of rpc operation did not work.  (#132)

	    * follow HTTP redirect only if using http-access2.  (#125) (#145)

	    * add a workaround for importing an WSDL whose path begins with
	      drive letter.  (#115)

	  * WSDL

	    * SOAP Data which is defined as a simpletype was not mapped
	      correctly to Ruby obj when using wsdl2ruby.rb generated classdef
	      file. (#123)

	    * rpc/literal support. (#118)

	    * re-implemented local element qualify/unqualify control.  handles
	      elementFormDefault and form in WSDL.  (#119)

	    * Array of an element which has simpleType causes a crash. (#128)

	    * prarmeterOrder may not contain return part so it can be shorter
	      than parts size.  Thanks to Hugh.  (#139)

	  * Samples

	    * added !BasicAuth client sample. (#117)

	    * added Base64 client/server sample.

	    * added Flickr SOAP interface client sample. (#122)

	    * added !SalesForce client sample. (#135)

	    * updated Thawte CA certificate for !GoogleAdWords sample.

	    * updated a client script with the newer version made by Johan.
	      thanks!

	    * shortened long file names. (#120)

	    * fixed typo in authheader sample. (#129)

	    * updated deprecated method usage.  (#138)

Thu Sep 15 23:02:57 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.h (rb_w32_stat): added prototype.

Thu Sep 15 22:35:55 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_signal.rb (test_exit_action): skip the test using
	  fork on fork-less platforms.

Thu Sep 15 11:39:18 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/dialog.rb: If a dialog does not show up yet,
	  TkDialogObj#name raises an exception. [ruby-talk:156109]

Thu Sep 15 01:39:19 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb (Rinda::TemplateEntry::initialize): pull
	  up method. Tabs converted to spaces.

Thu Sep 15 00:18:24 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/net/telnet.rb (Net::Telnet::waitfor): replace sysread with
	  readpartial.  [ruby-talk:127641]

Wed Sep 14 22:40:26 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (ruby_glob): glob function not using ruby exception system.

Wed Sep 14 01:26:03 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/net/https.rb: backported from trunk, rev 1.3.
	  [ruby-dev:25673] (again), [ruby-dev:26617] (again),
	  [ruby-dev:27062]

	* ext/openssl/lib/net/https.rb: removed.

	* ext/openssl/lib/net/protocols.rb: removed.

	* lib/net/http.rb: #use_ssl?, #use_ssl are moved from net/https.

Tue Sep 13 22:09:40 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb (Logger): added formatter accessor to logger for
	  dictating the way in which the logger should format the messages it
	  displays.  Thanks to Nicholas Seckar (cf. [ruby-talk:153391]) and
	  Daniel Berger.

	* lib/logger.rb (Logger): added VERSION constant.

	* lib/logger.rb: removed document for LogDevice. It is an
	  implementation detail and is not a public interface.

	* test/logger/test_logger.rb: added tests.

Tue Sep 13 21:47:17 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (BEGIN_CALLARGS): pop halfly pushed status.
	  fixed: [ruby-dev:26881]

Tue Sep 13 16:26:45 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: backported from trunk, rev 1.128.
	  [ruby-dev:25673] [ruby-dev:26617]

	* lib/net/protocol.rb: backported from trunk, rev 1.78.

	* lib/net/protocol.rb: new method #old_open to support net/smtp
	  and net/pop.

	* lib/net/smtp.rb: use #old_open.

	* lib/net/pop.rb: ditto.

Tue Sep 13 12:33:05 2005  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml.rb: reworking YAML::Stream to use the new
	  emitter.

	* lib/yaml/stream.rb: ditto.

	* lib/yaml/rubytypes.rb: added Object#yaml_new.

	* lib/yaml/tag.rb: the tag_subclasses? method now
	  shows up in the class.  allow taguri to be set using an accessor.
	  continue support of Object#to_yaml_type.

	* ext/syck/rubyext.c: new emitter code.  yaml_new and yaml_initialize
	  get called, should they be present.  consolidated all the diaspora of internal
	  node types into the family below YAML::Syck::Node -- Map,
	  Seq, Scalar -- all of whom are SyckNode structs pointing to
	  Ruby data.  moved Object#yaml_new into the node_import and made it the
	  default behavior.  the target_class is always called wih yaml_new, prepended
	  a parameter, which is the klass.  loaded nodes through GenericResolver show their style.
	  new Resolver#tagurize converts type ids to taguris.

	* ext/syck/implicit.re: were 'y' and 'n' seriously omitted??

	* ext/syck/emitter.c: renovated emitter, walks the tree in advance.
	  consolidated redundant block_styles struct into
	  the scalar_style struct.  (this means loaded nodes can now
	  be sent back to emitter and preserve at least its very basic
	  formatting.)

	* ext/syck/gram.c: headless documents of any kind allowed.

	* ext/syck/node.c: new syck_replace_str methods and syck_empty_*
	  methods for rewriting node contents, while keeping the ID
	  and other setup info.  added syck_seq_assign.

	* ext/syck/syck.h: reflect block_styles and new node functions.

Mon Sep 12 20:53:06 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* test/openssl/test_pkcs7.rb (test_enveloped): skip this test
	  to avoid a bug of PKCS7_enctypt() (only if ext/openssl is
	  compiled with OpenSSL-0.9.7d or earlier versions).
	  http://www.mail-archive.com/openssl-dev@openssl.org/msg17376.html

Mon Sep 12 14:03:33 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* test/dbm/test_dbm.rb: remove locking test, which may not be
	  supported on some platforms.  [ruby-dev:27030]

Mon Sep 12 10:45:58 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/dl/dl.c (rb_io_to_ptr): merged a patch for DragonFly BSD
	  from Takahiro Kambe <taca at back-street.net>.  [ruby-dev:27023]

Sun Sep 11 22:05:51 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* bin/erb (ERB::Main#run): set ERB#filename so that it is used
	  when reporting syntax/runtime errors. Tabs converted to spaces.

Sat Sep 10 10:17:03 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_engine.c (ossl_engine_s_by_id):
	  OpenSSL::Engine.by_id calls given block before calling
	  ENGINE_init (block parameter is the return value of this method
	  itself).  this functionality is useful to load dynamic shared
	  engines. the following code is a sample of loading a key using
	  OpenSC PKCS #11 module.

		require "openssl"
		pkcs11 = OpenSSL::Engine.by_id("dynamic"){|e|
		  e.ctrl_cmd("SO_PATH", "/usr/lib/opensc/engine_pkcs11.so")
		  e.ctrl_cmd("LIST_ADD", "1")
		  e.ctrl_cmd("LOAD")
		}
		pkcs11.ctrl_cmd("PIN", "secret")
		key = pkcs11.load_private_key

	* ext/openssl/ossl_engine.c (ossl_engine_ctrl_cmd): new method
	  OpenSSL::Engine#ctrl_cmd. it wraps ENGINE_ctrl_cmd_string.

	* ext/openssl/ossl_engine.c (ossl_engine_get_cmds): new method
	  OpenSSL::Engine#cmds. it returms engine command definitions.

Sat Sep 10 10:09:47 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (asn1str_to_str): new function.

	* ext/openssl/ossl_pkcs7.c: new class OpenSSL::PKCS7::RecipientInfo.
	  this class wraps PKCS7_RECIP_INFO struct.

	* ext/openssl/ossl_pkcs7.c: OpenSSL::PKCS7::Signer is renamed to
	  OpenSSL::PKCS7::SignerInfo. ("Signer" remains as an alias of
	  SignerInfo.)

	* test/openssl/test_pkcs7.rb: new file.

Sat Sep 10 10:05:51 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): assume that
	  the argument is a DER string if Base64 decoding failed.

	* ext/openssl/ossl_ns_pki.c (ossl_spki_to_der): new method.

	* test/openssl/test_ns_spki.rb: add new file.

Sat Sep 10 09:56:24 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/digest.rb: added SHA224, SHA256, SHA384 and SHA512.
	  these features are enabled if this library is compiled with
	  OpenSSL 0.9.8 or later.

	* test/openssl/test_digest.rb: add test for new digests.

Sat Sep 10 09:51:30 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.c (ossl_raise): should use ERR_peek_last_error
	  to get last error on the current thread. And should report
	  errors on the stack while OpenSSL.debug is true.

	* ext/openssl/ossl.c (ossl_get_errors): new method for debugging
	  this library.

	* ext/openssl/ossl_ssl.c (ossl_sslctx_set_ciphers): fix error message.

	* ext/openssl/ossl_x509req.c (ossl_x509req_set_attributes): get rid
	  of unused variable.

	* ext/openssl/ossl_x509store.c (ossl_x509store_initialize): should
	  set @time to avoid warning.

	* ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths,
	  X509_STORE_add_cert, X509_STORE_add_crl): should raise error if
	  wrapped functions failed.

	* test/openssl/test_x509store.rb: add test for errors.

Fri Sep  9 22:13:19 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): prohibit calling tainted method (>2) when
	  $SAFE == 0.

Fri Sep  9 16:45:25 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_times): make empty strings to keep taintness,
	  and a little improvement.  [ruby-dev:26900]

	* ext/iconv/iconv.c (iconv_try), ext/iconv/extconf.rb: get rid of meta
	  characters in command line option.  fixed: [ruby-talk:155369]

Thu Sep  8 14:58:11 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* merged a patch from Takahiro Kambe <taca at back-street.net> to
	  support DragonFly BSD.  [ruby-dev:26984]

Wed Sep  7 12:55:08 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb: abolish mod === tempfile to avoid a problem
	  [ruby-dev:26967].

Wed Sep  7 10:45:15 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_switch): convert all exceptions to
	  SystemExit.  fixed: [ruby-core:05724]

	* eval.c (rb_thread_terminated): show backtrace before propagate
	  exceptions to main thread.

Wed Sep  7 08:35:04 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, configure.in (MINIOBJS): miniruby on HP-UX can not load
	  extension libraries.

	* bignum.c (bignew_1, bigadd): K&R style argument actually can't be
	  defined as char.

	* missing/vsnprintf.c: ANSI compiler supports const keyword.

	* ext/digest/sha2/extconf.rb: reject platforms which has inttypes.h
	  but no 64bit integer.

	* lib/mkmf.rb (what_type?): guesstimate type.

	* ext/etc/etc.c (setup_passwd), ext/etc/extconf.rb: pw_age might be
	  char*.  fixed: [ruby-core:05470]

Wed Sep  7 08:32:47 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (rb_mod_cvar_get, rb_mod_cvar_set): document fix from
	  sheepman <sheepman@sheepman.sakura.ne.jp>; a bug in visibility
	  description.  [ruby-dev:26965]

	* sprintf.c (rb_f_sprintf): warn "too many argument" on verbose
	  mode (-v/-w); backported from 1.9.  [ruby-dev:26963]

Mon Sep  5 17:03:07 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/ostruct.rb: a patch from Florian Gross <florgro at gmail.com>
	  merged to allow recursive inspect (and to_s) for OpenStruct.
	  [ruby-core:05532]

Mon Sep  5 07:01:12 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/openssl/lib/openssl/buffering.rb (Buffering#do_write):
	  should clear data from the buffer which already been output.

Fri Sep  2 23:51:54 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib: do not use __send__ to access private methods.  [ruby-dev:26935]

Fri Sep  2 03:29:00 2005  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* lib/irb/init.rb: make IRB -I option that is same befavior for ruby.
	  [ruby-dev:26872], [ruby-dev: 26920]

	* lib/irb/locale.rb: support to print help message when OS locale is
	  ja_JP.utf-8. [ruby-dev:26872]

Thu Sep  1 17:11:25 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): wrong condition for $SAFE restoration.

Thu Sep  1 14:12:45 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: On Tcl8.5, MultiTkIp#invoke_hidden doesn't
	  work (gives wrong order of arguments).

	* ext/tk/lib/multi-tk.rb: add MultiTkIp#invoke_hidden_on_namespace
	  to support '-namespace' option of 'interp invokehidden' command
	  on Tcl8.5.

Wed Aug 31 14:43:15 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (OPTFLAGS): default global optimization to
	  disabled for all VC++ versions.  fixed: [ruby-dev:26897]

Wed Aug 31 11:35:43 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/gdbm/test_gdbm.rb (teardown): should remove GDBM temporary
	  file.

Wed Aug 31 10:30:56 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* process.c (proc_detach, proc_setmaxgroups): missing argument type
	  declaration. (I recommend ANSI-style function)

Tue Aug 30 23:20:19 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_rescue2): initialization miss.  fixed: [ruby-dev:26917]

	* lib/mkmf.rb (xsystem, xpopen): no longer expand by Config.

	* lib/mkmf.rb (link_command, cc_command, cpp_command): expand
	  variables at once, and quote hdrdir.  fixed: [ruby-core:05680]

	* lib/mkmf.rb (libpathflag): quote paths.

Tue Aug 30 19:34:27 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/digest/md5/md5ossl.h, ext/digest/rmd160/rmd160ossl.h,
	  ext/digest/sha1/sha1ossl.h: include <stddef.h> to avoid
	  error in compilation with OpenSSL-0.9.8. [ruby-list:41068]

Mon Aug 29 19:54:21 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/rdoc/usage.rb: improper exceptions. [ruby-dev:26870]

	* lib/rdoc/usage.rb: support the case when non-ruby code exists before
	  shebang. (this is needed when ri.bat is executed on windows)

Mon Aug 29 17:48:17 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (method_arity): should return proper arity value.
	  [ruby-dev:26390]

Mon Aug 29 01:19:57 2005  Tanaka Akira  <akr@m17n.org>

	* lib/time.rb (Time.parse): extract fractional seconds using
	  Date._parse.  [ruby-talk:153859]

Sat Aug 27 20:20:01 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/curses/curses.c ({curses,window}_clrtoeol): added. suggested
	  by Reyn Vlietstra.

	* ext/curses/curses.c: chtype in curses is not `char', rahter `long'.
	  [ruby-Bugs:2298]

	* ext/curses/view.rb: String =~ String is deprecated.

Wed Aug 24 10:53:28 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/logger/test_logger.rb (test_shifting_size): should close log
	  device before unlink, since some platform cannot unlink opened
	  file.

Sun Aug 21 00:13:27 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/wsdl/xmlSchema/importer.rb (WSDL::XMLSchema::Importer#fetch): add
	  a workaround for importing an WSDL whose path begins with drive
	  letter.  [ruby-dev:26242]

Sat Aug 20 22:37:13 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb (write, shift_log?, shift_log): file shifting race
	  condition bug fixed.  [ruby-dev:26764]

	* test/logger/test_logger.rb: tests.

Fri Aug 19 18:13:39 2005  Tanaka Akira  <akr@m17n.org>

	* lib/time.rb (Time.apply_offset): fix a problem with last day of
	  month.  reported by Lucas Nussbaum.  [ruby-talk:152866]

Thu Aug 18 12:46:28 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub (COMMON_HEADERS): reverted 1.42.2.24.
	  I misunderstood, bccwin32 on ruby_1_8 uses winsock2 originally.
	  [ruby-dev:26806]

	* win32/win32.h: include winsock2.h instead of winsock.h. (bcc32)

Wed Aug 17 23:58:05 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_to_integer): argument constified.

	* eval.c (terminate_process): take String message.

	* eval.c (rb_thread_switch): propagate the exception caused thread
	  termination directly.  fixed: [ruby-core:05552]

Wed Aug 17 00:05:46 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_add_method): preserve safe level in the environment
	  where a method is defined .

	* eval.c (rb_call0): restore preserved safe level in the method
	  execution.

Mon Aug 15 00:38:51 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_rescue2): reduce PUSH_TAG() as well as NODE_RESCUE.
	  [ruby-dev:26800]

	* range.c (range_check, range_init): reduce useless exceptions.

Sat Aug 13 18:51:26 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_block_pass): distinguish current block from others.
	  fixed: [ruby-dev:26274]

	* ext/stringio/stringio.c (strio_set_string): disallow nil.
	  http://www.rubyist.net/~nobu/t/20050811.html#c05

Thu Aug 11 23:29:03 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c: keep holding string after closed.

Thu Aug 11 13:01:48 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss: fixed sort bug. [ruby-list:41018]

	* lib/rss/1.0.rb (RSS::RDF::Channel#setup_maker_attributes):
	  removed self.

	* lib/rss/maker/base.rb (RSS::Maker::ItemsBase#<=>): use #date
	  instead of @date.
	  (RSS::Maker::Base::self.def_array_element): added #size.

	* lib/rss/maker/1.0.rb
	  (RSS::Maker::RSS10::Channel#to_rss,
	   RSS::Maker::RSS10::Items::Item#to_rss): cleared dc_dates set
	  upped by using #date.

	* lib/rss/maker/dublincore.rb
	  (RSS::Maker::ChannelBase, RSS::Maker::ItemsBase::ItemBase):
	  fixed opposite alias.

	* test/rss/test_setup_maker_1.0.rb
	  (RSS::TestSetupMaker10::test_setup_maker_items_sort): added some
	  tests for RSS::Maker::ItemsBase#do_sort.

Wed Aug 10 10:29:40 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: fix bug on handling __ruby2val_optkeys().

	* ext/tk/lib/tk/itemconfig.rb: fix bug on handling
	  __item_ruby2val_optkeys().

	* ext/tk/lib/tk/canvas.rb: didn't check __item_ruby2val_optkeys().

	* ext/tk/lib/tkextlib/blt/component.rb: ditto.

Tue Aug  9 15:12:04 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: remove dangerous 'rb_jump_tag's.

	* ext/tk/lib/tk.rb: add __val2ruby_optkeys and __ruby2val_optkeys to
	  help to convert option values between ruby and tcl.

	* ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and
	  __item_ruby2val_optkeys to help to convert option values between
	    ruby and tcl.

	* ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable'
	  option (for the reason of backward compatibility).

	* ext/tk/lib/tk/composite.rb: clarify the arguments of super().

	* ext/tk/lib/tk/spinbox.rb: ditto.

	* ext/tk/lib/tk/text.rb: ditto.

	* ext/tk/lib/tk/validation.rb: ditto.

	* ext/tk/lib/tkextlib/*: support to treat tkvariable-type
	  configure options.

Tue Aug  9 20:30:19 2005  Tadashi Saito  <shiba@mail2.accsnet.ne.jp>

	* bignum.c (rb_big_coerce): allow bignum x bignum coercing.
	  [ruby-dev:26778]

Mon Aug  8 20:43:02 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_method.rb: added.  [ruby-dev:26761]

Sun Aug  7 23:50:14 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_super.rb: added from HEAD. [ruby-dev:26743]

Sun Aug  7 01:31:15 2005  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (WIN32OLE_EVENT#on_event): should set
	  only one event handler.

	* ext/win32ole/tests/testOLEEVENT.rb: ditto.

	* ext/win32ole/tests/testOLEPARAM.rb: remove re-defined
	  test_ole_type_detail method.

Sat Aug  6 12:35:24 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/{tk.rb,tk/itemconfig.rb}: configure creates
	  TkVariable if key name is 'variable' or 'textvariable'
	  by default. [ruby-dev:26749]

	* ext/tk/lib/tk/{label,radiobutton}.rb: removed its own
	  {variable,textvariable} function.

	* ext/tk/lib/tk/variable.rb: retains backward conpatibility.

Fri Aug  5 12:50:32 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c: fixed memory leak when tk_funcall raised
	  exception. (copies argv into heap in tk_funcall instead of
	  caller)

Fri Aug  5 12:42:57 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): need to convert path separetor
	  before invoking install command.

Fri Aug  5 00:27:04 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c: refactoring - extract ruby string <->
	  tcl object conversion as get_str_from_obj and get_obj_from_str.

Fri Aug  5 00:19:33 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* extmk.rb (extmake): needs to be wrapped in an Array.

Thu Aug  4 18:38:36 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: cannot compile for Tcl7.6/Tk4.2.

	* ext/tcltklib/tcltklib.c: add nativethread consistency check.

	* ext/tcltklib/stubs.c: ditto.

	* ext/tk/lib/tk.rb: forgot to define TclTkIp.encoding and encoding=
	  when Tcl is 7.6 or 8.0.

	* ext/tk/lib/tk/wm.rb: support to make some methods as options of
	  root or toplevel widget. [ruby-talk:150336]

	* ext/tk/lib/tk/root.rb: ditto.

	* ext/tk/lib/tk/toplevel.rb: ditto.

	* ext/tk/lib/tkextlib/SUPPRT_STATUS: update RELEASE_DATE

Thu Aug  4 08:03:39 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): should not modify $mflags for each
	  extentions.

Thu Aug  4 00:25:48 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk, Makefile.in, {bcc32,win32,wince}/Makefile.sub: integrated
	  macro definitions.

	* bcc32/Makefile.sub: LIBRUBY_SO should use DLDOBJS, not EXTOBJS.

	* {win32,wince}/Makefile.sub: separate config.h for compiler versions.

Wed Aug  3 21:59:16 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/variable.rb: TkVariable#trace didn't work on
	  TkVariable retrived from TkVariable.new_hash.ref. [ruby-dev:26721]

Wed Aug  3 08:22:13 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (ruby_connect): revert [ruby-talk:111654]
	  changes at 2004-09-07.  [ruby-dev:26656]

Tue Aug  2 10:20:54 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c: use Tcl_[GS]etVar2Ex instead of
	  Tcl_Obj[GS]etVar2. (avoid Tcl_NewStringObj on supported platforms)

	* ext/tcltklib/tcltklib.c: use ip_{get,set,unset}_variable2_core from
	  ip_{get,set,unset}_variable.

	* ext/tcltklib/tcltklib.c: replaced Tcl_Panic with rb_bug.

Tue Aug  2 01:41:28 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/ping.rb (Ping.pingecho): should rescue StandardError.
	  [ruby-dev:26677]

Mon Aug  1 19:09:41 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c: refactoring - replaced rb_ivar_defined &
	  rb_ivar_get with single rb_attr_get call.

Mon Aug  1 18:45:07 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c (Tcl_GetStringResult): refactoring - define
	  alternative macro on Tcl7.x or earlier.

Mon Aug  1 13:57:35 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c (deleted_ip): refactoring - interpreter
	  deletion check. [ruby-dev:26664]

Mon Aug  1 01:17:40 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (check_insecure_method): use private_methods and
	  protected_methods instead of respond_to? to check method visibility.
	  [ruby-dev:26616]

	* test/drb/drbtest.rb: ditto.

	* test/drb/ut_drb.rb: ditto.

Mon Aug  1 00:07:32 2005  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* lib/irb/context.rb: fix `irb --readline` option. [ruby-list:40955]

Fri Jul 29 09:59:38 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_yield_0): push yielded node instead of yielding.
	  fixed: [yarv-dev:549]

Thu Jul 28 18:09:55 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/stubs.c: When --enable-tcltk-stubs, the initialize
	  routine creates a Tcl/Tk interpreter and deletes it. However,
	  init cost of Tk's MainWindow is not so small. And that makes it
	  impossible to use libraries written with Tcl functions only on
	  an environment without a graphical display. This changes support
	  delaying initalization of Tk_Stubs until the script needs Tk.

	* ext/tcltklib/stubs.h: New file. Define prototypes and return
	  codes of functions on stubs.c.

	* ext/tcltklib/tcltklib.c: Support delaying initalization of
	  Tk_Stubs until the script needs Tk.

	* ext/tcltklib/tcltklib.c: Show friendly error messages for errors
	  on initialization.

	* ext/tcltklib/tcltklib.c: Avoid SEGV on ip_finalize() when ruby is
	  exiting and $DEBUG is true. (Not fix. If you know the reason of
	  why, please fix it.)

	* ext/tk/tkutil.c (ary2list, ary2list2): bug fix on handling of
	  encoding.

	* ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string and bg_eval_string
	  don't work propery.

	* ext/tk/lib/tk.rb: Forget extending Tk::Encoding module to Tk.
	* ext/tk/lib/tk/variable.rb: TkVarAccess fails to initialize the
	  object for an element of a Tcl's array variable.

Wed Jul 27 23:23:54 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (obj_free): make message format consistent with one from
	  gc_mark().  [ruby-talk:149668]

Wed Jul 27 22:11:37 2005  Kouhei Sutou  <kou@cozmixng.org>

	* sample/rss/tdiary_plugin: removed. because the plugin
	  is imported in the tDiary plugin packages.

Wed Jul 27 10:59:02 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (dir_each): rewinddir(3) before iteration.
	  [ruby-talk:149628]

Tue Jul 26 12:57:49 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/openssl_missin.c: include <openssl/engine.h> before
	  <openssl/x509_vfy.h> to avoid compilation error of mswin32.
	  suggested by NAKAMURA Usaku.

Mon Jul 25 21:30:46 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* {bcc32,win32,wince}/Makefile.sub: moved CPPFLAGS only for ruby
	  source to XCFLAGS.

Mon Jul 25 13:45:18 2005  NAJIMA Hiroki  <najima@mickey.ai.kyutech.ac.jp>

	* io.c: check HAVE_SYS_IOCTL_H before including the header.
	  [ruby-dev:26610]

Mon Jul 25 14:10:02 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: fix en-bugged part in the last commit.

Sat Jul 23 16:49:04 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_engine.c (ossl_engine_s_load): should check
	  OPENSSL_NO_STATIC_ENGINE.

Fri Jul 22 21:06:08 2005  Tadashi Saito  <shiba@mail2.accsnet.ne.jp>

	* bignum.c (rb_big_eq): reduce isnan().  [ruby-dev:26600]

	* numeric.c (flo_eq, flo_gt, flo_ge, flo_lt, flo_le): ditto.

Fri Jul 22 15:02:39 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: moved copyright description to lib/rss.rb.

	* lib/rss.rb: added for convenience.

	* sample/rss/re_read.rb: added #to_s sample.

	* sample/rss/blend.rb: use 'require "rss"' instead of
	  'require "rss/*"'.
	* sample/rss/list_description.rb: ditto.
	* sample/rss/rss_recent.rb: ditto.
	* sample/rss/tdiary-plugin/rss-recent.rb: ditto.

	* sample/rss/tdiary-plugin/rss-recent.rb: 0.0.6 -> 0.0.7.

Fri Jul 22 14:37:43 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/parser.rb (RSS::Parser#initialize): accept HTTP/FTP
	  URI and local file path too.

	* test/rss/test_parser.rb (RSS::TestParser#test_parse): test
	  for the above.

Fri Jul 22 07:01:42 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c (tk_conv_args): forget to revert thread_critical
	  and gc_disable when raise ArgumentError.

	* ext/tk/lib/remote-tk.rb: RemoteTkIp doesn't need to include TkUtil.

	* ext/tcltklib/tcltklib.c: add TclTkIp#has_mainwindow? method.

	* ext/tk/lib/tk.rb: add Tk.has_mainwindow? method.

	* ext/tk/lib/multi-tk.rb: add MultiTkIp#has_mainwindow? method.

	* ext/tk/lib/remote-tk.rb: add RemoteTkIp#has_mainwindow? method.

	* ext/tk/lib/multi-tk.rb: slave IP fail to exit itself when $SAFE==4.

	* ext/tk/lib/multi-tk.rb: remove constants from MultiTkIp module to
	  avoid access from external.

	* ext/tk/lib/multi-tk.rb: check_root flag is ignored on slave IPs'
	  mainloop.

	* ext/tk/lib/multi-tk.rb: hang-up Tk.mainloop called on a slave IP
	  with $SAFE==4.

	* ext/tk/lib/multi-tk.rb: MultiTkIp#bg_eval_proc doesn't work
	  properly.

	* ext/tk/lib/multi-tk.rb: add MultiTkIp#set_cb_error(proc) and
	  cb_error(exc) to log errors at callbacks on safe slave IPs.

	* ext/tk/lib/multi-tk.rb: fail to get an available slave IP object
	  when call Tk.mainloop in the block which is given to new_* method,
	    because cannot finish initialize while the root widget is alive.

	* ext/tk/lib/multi-tk.rb: fail to control a slave IP when Tk.mainloop
	  runs on the IP.

Wed Jul 20 19:20:37 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (S_ISREG): need to define S_ISREG before it is used first.

Wed Jul 20 18:40:50 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* io.c (wsplit_p): patch for the environment where
	  fcntl(F_GETFL, O_NONBLOCK) is not supported. in that case,
	  set FMODE_WSPLIT without fcntl check. [ruby-dev:26566]

Wed Jul 20 18:07:11 2005  Tanaka Akira  <akr@m17n.org>

	* io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT
	  by F_SETFL.

Wed Jul 20 10:04:51 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_class_path): need to adjust snprintf() len for
	  teminating NUL.  [ruby-dev:26581]

Wed Jul 20 04:01:55 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/socket/socket.c: sorry, BeOS also uses HAVE_CLOSESOCKET,
	  so reverted.

	* ext/socket/extconf.rb: should not define HAVE_CLOSESOCKET
	  on windows.

Wed Jul 20 03:16:43 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/socket/socket.c: should not undef close() on win32.
	  it's defined to rb_w32_close(), otherwise handle leaks.
	  [ruby-Bugs-2131]

Wed Jul 20 00:48:16 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* error.c (syserr_initialize): don't use str before StringValue()
	  check.  [ruby-dev:26579]

Tue Jul 19 22:47:29 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* error.c (syserr_initialize): add 1 byte for snprintf() size for
	  NUL at the end.  [ruby-dev:26574]

Tue Jul 19 16:39:46 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_inspect): replace sprintf() with "%s" format all
	  over the place by snprintf() to avoid integer overflow.

Tue Jul 19 14:08:22 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c: rbtk_eventloop_depth is used as int.

	* ext/tcltklib/tcltklib.c: rbtk_pending_exception is tested with
	  NIL_P, so should assign Qnil instead of 0 (Qfalse).

	* ext/tcltklib/tcltklib.c (ip_invoke_real): fixed memory leak when
	  ip is deleted.

Tue Jul 19 13:19:46 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/variable.rb: For symmetry, add TkVariable#string. It
	  returns a string even if the default value type of the TkVariable
	  object is not "string".

Mon Jul 18 21:40:20 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* eval.c (rb_call0): make the pointer to NODE volatile
	  instead of NODE itself.

Mon Jul 18 14:32:21 2005  Tanaka Akira  <akr@m17n.org>

	* eval.c (rb_call0): make body volatile to avoid optimization problem.
	  [ruby-dev:26195]

Mon Jul 18 12:23:27 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/io/wait/wait.c: wrong backport from trunk.  fixed: [ruby-dev:26562]

Mon Jul 18 09:36:25 2005  Tanaka Akira  <akr@m17n.org>

	* rubyio.h (FMODE_WSPLIT, FMODE_WSPLIT_INITIALIZED): new constant.

	* io.c (wsplit_p): new function.
	  (io_fwrite): split writing data by PIPE_BUF if wsplit_p is true in
	  multi-threaded mode.
	  [ruby-dev:26540]

Sun Jul 17 13:46:54 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/io/wait/extconf.rb, ext/io/wait/wait.c: Win32 platforms support.

Fri Jul 15 23:59:03 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/parsers/parse_c.rb (handle_class_module): handle a
	  module enclosed in a built-in module.  fixed: [ruby-talk:148239]

	* lib/rdoc/parsers/parse_c.rb (find_body): allow macros as methods.

	* lib/rdoc/parsers/parse_c.rb (find_call_seq): allow :nodoc: modifier
	  in C.  [ruby-core:04572]

Fri Jul 15 18:00:01 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub (COMMON_HEADERS): ruby_1_8 is using winsock.h.
	  failed to compile ext/socket on bcc5.6.4. [ruby-dev:26193]

Fri Jul 15 07:58:56 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/server.rb (WEBrick::GenericServer#accept_client):
	  sockets should be non-blocking mode. [ruby-dev:26405]

	* lib/webrick/utils.rb (WEBrick::Utils.set_non_blocking): new method.

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_chunked):
	  should call sock.read repeatedly until the preferred size data
	  is obtained.

Thu Jul 14 18:27:16 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (rb_w32_strerror): should return correct message
	  for ENAMETOOLONG and ENOTEMPTY. (bcc32) [ruby-dev:26533]

	* win32/win32.c (rb_w32_strerror): stripped CR LF on the tail.
	  (bcc32) [ruby-dev:26533]

Thu Jul 14 00:45:42 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* LEGAL (ext/nkf/nkf-utf8): updated from nkf1.7 to nkf-utf8.

Wed Jul 13 19:37:47 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (rb_w32_mkdir): should set EEXIST (not EACCES)
	  if file or directory already exists. (bcc32) [ruby-dev:26508]

	* win32/win32.c (rb_w32_rmdir): should set ENOTDIR (not EINVAL)
	  if it is not directory. (bcc32, win32)

	* win32/win32.c (rb_w32_rmdir, rb_w32_unlink): restore
	  FILE_ATTRIBUTE_READONLY flag on function failure.

Wed Jul 13 12:40:00 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: TclTkLib.do_one_event doesn't work.

	* ext/tk/lib/tk.rb: Tk.thread_update is available.

Tue Jul 12 23:32:11 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: keep curdir unexpanded.

Mon Jul 11 08:31:29 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* regex.c (read_special): fix parsing backslashes following \c in
	  regexp.  fixed: [ruby-dev:26500]

Mon Jul 11 02:53:00 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line):
	  mistook in merging the patch of [ruby-dev:26235] at
	  revision 1.4.2.6.

Sun Jul 10 23:58:04 2005  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#unlink): try Dir.unlink first to
	  avoid unlink a directory by root.
	  cf. [ruby-dev:26237]

Sun Jul 11 05:18:17 2005  Michael Neumann  <mneumann@ruby-lang.org>

	* lib/xmlrpc/server.rb (XMLRPC::Server): Switch from GServer over to
	  WEBrick. This makes file lib/xmlrpc/httpserver.rb obsolete (at least it is
		no further used by the XML-RPC library).

Sun Jul 10 12:47:01 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/debug.rb (debug_command): added a deficient format specifier.
	  fixed: [ruby-core:05419]

Sat Jul  9 21:28:46 2005  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (ole_method_dispid): convert dispid
	  in Ruby and C by INT2NUM and NUM2INT.

	* ext/win32ole/win32ole.c (ole_invoke2): ditto.

	* ext/win32ole/test/testWIN32OLE.rb: ditto.

	* ext/win32ole/test/testOLEMETHOD.rb: ditto.

Fri Jul  8 15:45:04 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb (RSS::VERSION): 0.1.4 -> 0.1.5.

	* test/rss/test_version.rb (RSS::TestVersion#test_version):
	  ditto.

	* lib/rss/0.9.rb (RSS::Rss::Channel::Item::Category):
	  domain attribute of <category> is optional. Thanks to
	  Chris Lee <clee@kde.org>.

	* test/rss/test_parser.rb (RSS::TestParser#test_category20):
	  adjusted test case.

Tue Jul  5 23:44:06 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* instruby.rb: expand source library path.

Tue Jul  5 23:27:14 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* array.c (sort_2): get rid of yet another bcc's bug.
	  fixed: [ruby-core:05152]

	* eval.c (rb_thread_save_context): must not switch contexts during
	  re-allocating stack.  fixed: [ruby-core:05219]

Tue Jul  5 15:15:10 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c: fix typo.

Tue Jul  5 14:51:35 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: bug fix on treating Unicode strings.

	* ext/tcltklib/tcltklib.c: add methods to treat encoding mode.

	* ext/tcltklib/MANUAL.eng: add description of TclTkLib#encoding,
	  encoding_system, and so on.

	* ext/tcltklib/MANUAL.euc: ditto.

	* ext/tk/tkutil.c: fail to create a Tcl's list string from an
	  array including multiple kind of encoded strings.

	* ext/tk/lib/tk.rb: ditto.

	* ext/tk/lib/multi-tk.rb: 2nd arg of _{to|from}UTF8 is omissible.

	* ext/tk/lib/remote-tk.rb: ditto.

	* ext/tk/lib/tk.rb: override TclTkLib#encoding and encoding= to
	  use TkCore::INTERP.encoding and encoding=.

	* ext/tk/lib/tk.rb: when "require 'tk'" and $KCODE=='NONE', check
	  DEFAULT_TK_ENCODING to decide Ruby/Tk's system encoding mode.

	* ext/tk/lib/tk/encodedstr.rb: check both of Tk.encoding and
	  Tk.encoding_system. Tk.encoding has higher priority.

	* ext/tk/lib/tk/optiondb.rb: ditto.

	* ext/tk/lib/tk/spinbox.rb: ditto.

	* ext/tk/lib/tk/validation.rb: ditto.

	* ext/tk/lib/tk/namespace.rb: arguemnts for TclTkIp#_merge_tklist
	  should be UTF-8 strings.

Mon Jul  4 14:35:52 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sample/svr.rb: service can be stopped by ill-behaved client; use
	  tsvr.rb instead.

Mon Jul  4 13:25:21 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* missing/erf.c: original erf.c by prof. Okumura is confirmed to
	  be public domain.  reverted BSD implementation.

Mon Jul  4 11:15:37 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/{dbm,gdbm,sdbm}/test_{dbm,gdbm,sdbm}.rb: skip some tests
	  which using fork on fork-less platforms.

Sun Jul  3 23:26:30 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/wsdl/document/test_rpc.rb: compare formatted time string of
	  Time objects instead of comparing Time objects itself to avoid
	  unintended conflict of usec part.  [ruby-dev:26220]

Sat Jul  2 22:41:04 2005  Tanaka Akira  <akr@m17n.org>

	* ext/socket/socket.c (unix_send_io, unix_recv_io): support x86-64 and
	  IA64.

Sat Jul  2 17:06:23 2005  Tanaka Akira  <akr@m17n.org>

	* defines.h (FLUSH_REGISTER_WINDOWS): defined for IA64.
	  (flush_register_windows): declare flush_register_windows.

	* eval.c (flush_register_windows): new function.

Fri Jul  1 17:48:52 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (get2comp): revert all prior changes, and calculate
	  proper 2's complement for negative numbers.  backported from
	  HEAD.

Fri Jul  1 15:50:12 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* missing/erf.c: need to include some headers for some platforms.

	* win32/win32.h (copysign, scalb): define for compatibility with
	  other platforms. [ruby-dev:26430]

Fri Jul  1 15:37:42 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* missing/crypt.c: modified to make it compilable on platforms
	  other than BSD.  [ruby-dev:26430]

	* missing/erf.c: ditto.  code from <exp.c> merged.

Fri Jul  1 12:44:56 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (OpenURI.open_http): refine post_connection_check
	  call.

Fri Jul  1 11:34:08 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* missing/crypt.c: replaced with 4.4BSD version.

	* missing/erf.c: ditto.

	* missing/vsnprintf.c: removed the third provision from the old
	  BSD license.  [ruby-core:05177]

Fri Jul  1 01:45:21 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (enum_min, enum_max): must not return Qundef.
	  fixed: [ruby-core:05299]

Fri Jul  1 00:18:40 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/delegate.rb (Delegator::respond_to): respond_to? must check
	  destination object.  [ruby-talk:146894]

Thu Jun 30 19:00:21 2005  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* lib/irb/ruby-lex.rb (RubyLex::identify_number): alternative implements
	  for [ruby-dev:26410]. And support a numeric form of 0d99999.

Thu Jun 30 17:28:10 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/ruby-lex.rb (RubyLex::identify_number): should not treat
	  plain zero as an octal number.  [ruby-dev:26410]

Thu Jun 30 15:13:16 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): pre-evaluate argument for unambiguous
	  evaluation order.  [ruby-dev:26383]

Thu Jun 30 09:53:56 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/delegate.rb (Delegator::method_missing): forward unknown
	  method to the destination.  suggested by
	  <christophe.poucet@gmail.com>.  [ruby-talk:146776]

Tue Jun 28 21:59:29 2005  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* dir.c, eval.c, hash.c, process.c, ruby.c: avoid warning "unused
	  variable" [ruby-dev:26387]

Sat Jun 25 17:15:23 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_query): should
	  discard if key=val pair is empty. patch from Gary Wright.

Sat Jun 25 23:30:51 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (detach_process_watcher): terminate process watcher
	  thread right after rb_waitpid() succeed.  [ruby-talk:146430]

Sat Jun 25 15:49:18 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (enum_min, enum_max): do not ignore nil as the first element.

Sat Jun 25 14:40:17 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/sdbm/init.c (fsdbm_select): SDBM#select had returned the array
	  which contained each elements twice. [ruby-dev:26358]

Fri Jun 25 05:06:47 2005  Michael Neumann  <mneumann@ruby-lang.org>

	* lib/xmlrpc/*, test/xmlrpc/*: backported changes from HEAD into 1.8

Fri Jun 24 17:00:00 2005  Shigeo Kobayashi  <shigeo@tinyforest.jp>

	* ext/bigdecimal/bigdecimal.c: patch from "NATORI Shin"
	  (u-tokyo.ac.jp) applied to fix rounding bug.

Fri Jun 24 13:06:45 2005  akira yamada  <akira@ruby-lang.org>

	* lib/uri/common.rb, lib/uri/generic.rb: fixed typo in documents and
	  replaced some existent domain name with "example.com".

Fri Jun 24 12:23:19 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: fix typo on Tk.grid_propagate.

	* ext/tk/lib/tk.rb: Tk.event_generate and TkWindow#event_generate
	  accept TkEvent::Event object as context argument.

	* ext/tk/lib/tk/event.rb: add TkEvent::Event#valid_fields and
	  valid_for_generate to get field parameters of event_generate.

Thu Jun 23 23:55:59 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* runruby.rb: should load built rbconfig.rb.

Thu Jun 23 16:53:15 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/canvastag.rb: TkcGroup.new cannot include given items.
	  TkcGroup#exclude calls wrong method.
	  Add alias TkcGroup#add [ruby-talk:146049].

	* ext/tk/lib/tk/canvas.rb: TkCanvas#dtag and some subcommands of
	  TkCanvas#addtag fail to treat a TkcTag argument.

	* ext/tk/lib/tk/event.rb: add TkEvent::Event#generate to help to send
	  current event to other widgets.

Mon Jun 20 18:44:04 2005  Tanaka Akira  <akr@m17n.org>

	* eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): DUMMY_SETJMP is replaced
	  because setjmp is not enough to fix getcontext and SPARC register
	  window problem.

Mon Jun 20 16:48:36 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dbm/dbm.c (fdbm_closed): new method DBM#closed?

	* ext/gdbm/gdbm.c (fgdbm_closed): new method GDBM#closed?

	* ext/sdbm/init.c (fsdbm_closed): new method SDBM#closed?

	* test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/sdbm/test_sdbm.rb
	  (teardown): close all db objects before deleting data files.

	* win32/win32.{ch} (unlink): hook runtime function to change
	  file attribute before unlinking.
	  fixed: [ruby-dev:26360]

Mon Jun 20 02:15:35 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (define_final): document fix: finalizers never get called
	  before target object is destroyed.

Mon Jun 20 01:26:49 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/openssl_missing.c, ext/openssl/ossl.h,
	  ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c,
	  ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid
	  compiler warnings. suggested by Michal Rokos.

Sun Jun 19 14:09:07 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (run_final): reduce unnecessary object allocation during
	  finalization.

	* gc.c (rb_gc_call_finalizer_at_exit): deferred finalizers list should
	  be cleared before calling them.  fixed: [ruby-talk:145790]

Fri Jun 17 13:01:40 2005  Tanaka Akira  <akr@m17n.org>

	* lib/time.rb (Time.parse): fix previous leap seconds support.
	  (Time.rfc2822): ditto.
	  (Time.xmlschema): ditto.

Thu Jun 16 15:06:55 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c (ip_rb_threadVwaitCommand): Tcl_Release
	  was missing.

Thu Jun 16 13:34:48 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: add Tk.getMultiple{Open|Save}File() which return
	  an Array of selected files.

Thu Jun 16 12:53:24 2005  Tanaka Akira  <akr@m17n.org>

	* lib/time.rb (Time.parse): "Fri Jan  1 08:59:60 +0900 1999" was
	  parsed as "Fri Jan 01 09:00:00 JST 1999" even on an environment
	  which supports leap seconds.
	  (Time.rfc2822): ditto.
	  (Time.xmlschema): ditto.

Thu Jun 16 08:29:22 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/dl/sym.c (rb_dlsym_call): needs FREE_ARGS before return.
	  fixed memory leak. [ruby-Bugs-2034]

Wed Jun 15 18:26:39 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: support "tk inactive" sub-command [for Tcl/Tk8.5a3]

	* ext/tk/lib/tk/namespace.rb: support "namespace path" sub-command and
	  'namespace ensemble' sub-command [for Tcl/Tk8.5a3]

Tue Jun 14 02:02:43 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c: add TkUtil::CallbackSubst.subst_arg(m, ...) &
	  _define_attribute_aliases(hash) to get substitution-argument from
	  attributes (e.g. subst_arg(:x,:y,:num,:button) --> "%x %y %b %b ").

	* ext/tk/lib/tk/event.rb: use _define_attribute_aliases().

Mon Jun 13 13:01:05 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* hash.c (ruby_setenv): fixed SEGV. [ruby-dev:26186]

Mon Jun 13 01:54:20 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* signal.c (sigexit): call rb_thread_signal_exit() instead of
	  rb_exit().  [ruby-dev:26347]

	* eval.c (rb_thread_signal_exit): a new function to exit on main
	  thread.

	* eval.c (rb_thread_switch): exit status should be retrieved from
	  ruby_errinfo.

	* eval.c (rb_f_exit): ensure exit(0) should call
	  exit(EXIT_SUCCESS).

Mon Jun 13 01:20:02 2005  Tanaka Akira  <akr@m17n.org>

	* eval.c (rb_gc_mark_threads): curr_thread may not be part of the
	  thread list.  [ruby-dev:26312]

Fri Jun 10 23:35:34 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* missing/mkdir.c: remove. [ruby-core:05177]

Fri Jun 10 22:54:26 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* missing.h: fd_set stuffs need sys/types.h.  fixed: [ruby-core:05179]

Thu Jun  9 23:58:12 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/Win32API/Win32API.c (Win32API_Call): disable global
	  optimization. fixed: [ruby-core:05143]

Thu Jun  9 23:35:22 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (enum_inject): default the result value to Qundef to use
	  first element as initial value if not given.

Thu Jun  9 19:55:41 2005  Tanaka Akira  <akr@m17n.org>

	* eval.c (ruby_longjmp): new macro to call longjmp, setcontext, etc.
	  (ruby_setjmp): new macro to call setjmp, getcontext, etc.
	  (ruby_setjmp): call setjmp before getcontext to avoid IA64 register
	  stack problem.
	  [ruby-talk:144939]

	* gc.c (Init_stack): remove IA64_MAGIC_STACK_LIMIT.

Thu Jun  9 11:55:34 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/delegate.rb (SimpleDelegator::__setobj__): need check for
	  recursive delegation.  [ruby-core:04940]

Wed Jun  8 18:47:10 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el (ruby-expr-beg): fix looking point drift.

Wed Jun  8 11:11:34 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (get2comp): calculate proper 2's complement for
	  negative numbers.  a bug in normalizing negative numbers
	  reported from Honda Hiroki <hhonda@ipflex.com>.

Wed Jun  8 08:33:10 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (enum_min_by, enum_max_by): return nil if no iteration.
	  fixed: [ruby-dev:26245]

	* eval.c (rb_need_block): ensure a block is given.

	* eval.c (backtrace): skip successive frames sharing same node.

Wed Jun  8 00:15:08 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (ruby_getaddrinfo__aix): merged a patch from
	  KUBO Takehiro <kubo at jiubao.org> to support AIX.  [ruby-list:40832]

Wed Jun  8 00:09:01 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/yaml/rubytypes.rb (Array::to_yaml): merged a patch from
	  Tilman Sauerbeck <tilman at code-monkey.de>.  [ruby-core:05055]

	* lib/yaml/rubytypes.rb (Hash::to_yaml): ditto.

Wed Jun  8 00:00:01 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/curses/curses.c (curses_insertln): merged a patch from
	  TAKAHASHI Tamotsu <ttakah at lapis.plala.or.jp>.  [ruby-ext:02305]

Tue Jun  7 19:34:15 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/init.rb (IRB::IRB.rc_file_generators): more flexible
	  IRB.rc_file_generators.  [ruby-core:05163]

Tue Jun  7 18:39:31 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/thread.rb: RDoc documentation from Eric Hodel
	  <drbrain at segment7.net> added.  [ruby-core:05148]

Tue Jun  7 18:30:04 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): add .SUFFIXES from depend file.
	  fixed: [ruby-dev:26294]

Tue Jun  7 17:39:54 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (rb_mod_cvar_get): Module#class_variable_get(): back
	  ported from CVS HEAD.  [ruby-talk:144741]

	* object.c (rb_mod_cvar_set): Module#class_variable_set().
	  [ruby-talk:144741]

Tue Jun  7 16:32:53 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): raise exception on debug mode (-d),
	  not verbose mode (-v/-w).  [ruby-core:05123]

Tue Jun  7 10:30:49 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: slave-ip fails to call procedures
	  delegated by master-ip.

Sun Jun  5 23:00:35 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/console.rb: create console when required

	* ext/tk/sample/tkextlib/tile/demo.rb: fix TypeError & create Console

Sat Jun  4 14:55:18 2005  Tanaka Akira  <akr@m17n.org>

	* test/dbm/test_dbm.rb: merged from ext/dbm/testdbm.rb.

	* test/gdbm/test_gdbm.rb: merged from ext/gdbm/testgdbm.rb.

	* test/sdbm/test_sdbm.rb: renamed from ext/sdbm/testsdbm.rb with
	  modification to use test/unit.

Fri Jun  3 14:06:12 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: fix typo.

Wed Jun  1 11:32:42 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: can use single quote character in DESTDIR.
	  [ruby-dev:26205]

Mon May 30 23:48:29 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/macpkg.rb: add PACKAGE_NAME information of Tcl/Tk
	  Extension.

	* ext/tk/lib/tk/msgcat.rb: ditto.

	* ext/tk/lib/tk/winpkg.rb: ditto.

	* ext/tk/lib/tkextlib/*: ditto.

Sat May 28 16:40:15 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* test/openssl/test_x509store.rb: add test for expired CRL
	  and refine some assertions.

Sat May 28 05:15:51 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509store.c (ossl_x509stctx_set_time): should
	  not set internal flag directry.

Sat May 28 02:00:11 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line):
	  ENV["REQUEST_URI"] is better to get correct Request-URI
	  than ENV["SCRIPT_NAME"] + ENV["PATH_INFO"].  [ruby-dev:26235]

Fri May 27 16:32:04 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/mkmf.rb: use the semicolon as the path separator
	  in the environment of MSYS.  fixed: [ruby-dev:26232]

Thu May 26 06:08:11 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: add shortcut-methods of tk_call + tk_split_list

Wed May 25 22:52:42 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/irb/input-method.rb: do not use Readline::HISTORY.pop.
	  (backported from HEAD)

Wed May 25 21:55:40 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/readline/readline.c: supported libedit. (backported from HEAD)

	* ext/readline/extconf.rb: ditto.

	* test/readline/test_readline.rb: ditto.

Wed May 25 20:06:27 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: TkComm#tk_split_*list fail to split a kind of SJIS
	  strings. To avoid the trouble, add arguments to control converting
	  encoding, and do split on a UTF8 string.

	* ext/tk/lib/multi-tk.rb: modify to attend encoding.

	* ext/tk/lib/remote-tk.rb: ditto.

	* ext/tk/lib/tk/itemconfig.rb: ditto.

	* ext/tk/lib/tk/listbox.rb: ditto.

	* ext/tk/lib/tk/namespace.rb: ditto.

	* ext/tk/lib/tk/panedwindow.rb: ditto.

	* ext/tk/lib/tk/text.rb: ditto.

	* ext/tk/lib/tk/textmark.rb: ditto.

	* ext/tk/lib/tk/texttag.rb: ditto.

	* ext/tk/lib/tk/variable.rb: ditto.

	* ext/tk/lib/tk/winfo.rb: ditto.

	* ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb: ditto.

	* ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: ditto.

	* ext/tk/lib/tk.rb: add TkWindow#lower_window/raise_window and
	  Tk#lower_window/raise_window by reason of method-name conflict

	* ext/tk/lib/tk/canvas.rb: bug fix on TkCanvas#delete when given
	  non-TkcItem arguments.

	* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto.

Wed May 25 12:59:48 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (OpenURI::Meta::RE_QUOTED_STRING): a content of
	  quoted-string should be zero or more characters.

Tue May 24 23:42:16 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (fix_pow): support Fixnum ** Float case directly
	  without coercing.  [ruby-talk:142697] [ruby-talk:143054]

Tue May 24 16:57:24 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ruby.c (require_libraries): caused SEGV when continuation jumped
	  in to the required library code.

Tue May 24 11:56:25 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/getopts.rb: should warn only if verbose mode.
	  fixed: [ruby-dev:26201]

Tue May 24 06:45:31 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): string
	  literals to be matched non-greedy.

Tue May 24 00:34:32 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/calc: method name 'set' was able to crash with a class Set.
	  [ruby-dev:26210]

	* test/wsdl/document/test_rpc.rb: dateTime comparison failed under
	  TZ=right/Asia/Tokyo (with leap second.) [ruby-dev:26208]

Mon May 23 16:24:05 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/extconf.rb: Framework support on MacOS X Tiger.

	* ext/tcltklib/README.1st: add description of Framework support options.

Mon May 23 12:21:37 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (make_regexp): should not return junk address during
	  compile time.  [ruby-dev:26206]

Sun May 22 21:54:06 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/{soap,wsdl,xsd}, test/{soap,wsdl,xsd}: imported soap4r/1.5.4.

	  == SOAP client and server ==

	  === for both client side and server side ===

	  * improved document/literal service support.
	    style(rpc,document)/use(encoding, literal) combination are all
	    supported.  for the detail about combination, see
	    test/soap/test_style.rb.

	  * let WSDLEncodedRegistry#soap2obj map SOAP/OM to Ruby according to
	    WSDL as well as obj2soap.  closes #70.

	  * let SOAP::Mapping::Object handle XML attribute for doc/lit service.
	    you can set/get XML attribute via accessor methods which as a name
	    'xmlattr_' prefixed (<foo name="bar"/> -> Foo#xmlattr_name).

	  === client side ===

	  * WSDLDriver capitalized name operation bug fixed.  from
	    1.5.3-ruby1.8.2, operation which has capitalized name (such as
	    KeywordSearchRequest in AWS) is defined as a method having
	    uncapitalized name. (converted with GenSupport.safemethodname
	    to handle operation name 'foo-bar').  it introduced serious
	    incompatibility; in the past, it was defined as a capitalized.
	    define capitalized method as well under that circumstance.

	  * added new factory interface 'WSDLDriverFactory#create_rpc_driver'
	    to create RPC::Driver, not WSDLDriver (RPC::Driver and WSDLDriver
	    are merged).  'WSDLDriverFactory#create_driver' still creates
	    WSDLDriver for compatibility but it warns that the method is
	    deprecated.  please use create_rpc_driver instead of create_driver.

	  * allow to use an URI object as an endpoint_url even with net/http,
	    not http-access2.

	  === server side ===

	  * added mod_ruby support to SOAP::CGIStub.  rename a CGI script
	    server.cgi to server.rb and let mod_ruby's RubyHandler handles the
	    script.  CGIStub detects if it's running under mod_ruby environment
	    or not.

	  * added fcgi support to SOAP::CGIStub.  see the sample at
	    sample/soap/calc/server.fcgi.  (almost same as server.cgi but has
	    fcgi handler at the bottom.)

	  * allow to return a SOAPFault object to respond customized SOAP fault.

	  * added the interface 'generate_explicit_type' for server side
	    (CGIStub, HTTPServer).  call 'self.generate_explicit_type = true'
	    if you want to return simplified XML even if it's rpc/encoded
	    service.

	  == WSDL ==

	  === WSDL definition ===

	  * improved XML Schema support such as extension, restriction,
	    simpleType, complexType + simpleContent, ref, length, import,
	    include.

	  * reduced "unknown element/attribute" warnings (warn only 1 time for
	    each QName).

	  * importing XSD file at schemaLocation with xsd:import.

	  === code generation from WSDL ===

	  * generator crashed when there's '-' in defined element/attribute
	    name.

	  * added ApacheMap WSDL definition.

	* sample/{soap,wsdl}: removed.

Sun May 22 19:11:35 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#intialize):
	  should initialize session id context. [ruby-core:4663]

	* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): add session id support.

Sat May 21 10:24:21 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: tds files were not deleted when DESTDIR
	  included '\' path delimiter. [ruby-dev:26193]

Thu May 19 19:04:29 2005  speakillof  <speakillof@yahoo.co.jp>

	* lib/rexml/encodings/SHIFT-JIS.rb: encoding and decoding were
	  swapped. [ruby-core:4772]

Wed May 18 23:42:25 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (exc_exception): reverted to call Exception#initialize
	  directly.  fixed: [ruby-dev:26177]

Wed May 18 23:39:09 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): get rid of using String.  [ruby-dev:26180]

	* dir.c (push_braces): should skip balanced braces.

	* eval.c (ruby_options), win32/win32.c (NtInitialize): move argument
	  intialization back.  [ruby-dev:26180]

Tue May 17 15:31:31 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should
	  break the loop if the socket reached to EOF. [ruby-talk:142285]

Tue May 17 11:52:18 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (unixtime_to_filetime): use localtime() instead of
	  gmtime() when using FileLocalTimeToFileTime().

Mon May 16 22:28:43 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.h, {bcc32,win32,wince}/Makefile.sub: moved rb_[ugp]id_t
	  to get rid of redefinition warnings on mingw.

	* class.c (rb_class_init_copy): singleton class is disallowed to copy,
	  from its definition.  fixed: [ruby-talk:142749]

Mon May 16 08:52:29 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.{h,c}: define rb_[pgu]id_t.

Mon May 16 00:21:02 2005  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#unlink): use SystemCallError instead of
	  Errno::EISDIR because EISDIR is not portable.
	  [ruby-core:5001]

Sun May 15 22:11:33 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (DRbObject#method_missing): use raise(exception).
	  [ruby-dev:26164]

Sun May 15 18:56:35 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in, ruby.h: define rb_[pgu]id_t macros instead of typedefs
	  to get rid of types which might not be defined yet.  [ruby-dev:26165]

Sun May 15 14:35:46 2005  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#unlink): unlink a symlink to a directory
	  was failed.  [ruby-core:4992]

Sun May 15 09:57:30 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/win32.c (unixtime_to_filetime): deal with DST.
	  [ruby-talk:141817]

Sat May 14 23:59:11 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (exc_exception, {exit,name_err,syserr}_initialize): call
	  Execption#initialize.  fixed: [ruby-talk:142593]

Sat May 14 23:57:26 2005  Erik Huelsmann  <ehuels@gmail.com>

	* configure.in: Check for the availability of pid_t, gid_t and uid_t and
	  remove AC_TYPE_UID_T.  fixed: [ruby-core:04745]

	* defines.h: Remove pid_t typedef.

	* ruby.h: Define rb_pid_t, rb_gid_t and rb_uid_t in accordance with
	 the available system types.

	* process.c: Change instances of pid_t and gid_t to their rb_*
	 counterparts.

	* ext/pty/pty.c: Change pid_t to rb_pid_t.

	* vms/config.h: Define HAVE_{P,G,U}ID_T to 1.

	* win32/Makefile.sub: Remove #define for {g,u}id_t.

	* win32/win32.c: Change pid_t to rb_pid_t.

	* wince/Makefile.sub: Remove #define for {g,u}id_t.

	* wince/sys/types.h: Remove definitions of {p,g,u}id_t.

Fri May 13 23:44:22 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: keep srcdir unexpanded.

	* lib/mkmf.rb (create_makefile): quote topdir and hdrdir if necessary.
	  fixed: [ruby-core:04932]

	* lib/mkmf.rb (configuration), {bcc32,win32,wince}/Makefile.sub: make
	  also INSTALL_PROG and INSTALL_DATA system dependent.
	  fixed: [ruby-core:04931]

Fri May 13 17:54:39 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* variable.c (generic_ivar_get): rb_attr_get should not warn.
	  [ruby-dev:26010]

Fri May 13 12:28:43 2005  Daniel Berger  <djberge@qwest.com>

	* array.c (rb_ary_select): can remove argc check. [ruby-core:4911]

	* test/ruby/test_array.rb: add test for find_all.

Fri May 13 11:29:00 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (unknown_node): add volatile directive to prototype.

Thu May 12 17:08:48 2005  Tanaka Akira  <akr@m17n.org>

	* io.c (rb_io_eof, remain_size, read_all, io_read, appendline)
	  (swallow, rb_io_each_byte, rb_io_getc): revert previous change.

	* io.c (rb_io_eof, io_fread, appendline, swallow, rb_io_each_byte)
	  (rb_io_getc, rb_getc): call clearerr before getc to avoid
	  stdio incompatibility.

Thu May 12 16:52:20 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/rdoc/parsers/parse_c.rb: more readability for mixing
	  progress "c..." and warning message.

Thu May 12 16:31:00 2005  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: follow nkf 2.0.5

Thu May 12 16:15:01 2005  Tanaka Akira  <akr@m17n.org>

	* io.c (rb_io_eof, remain_size, read_all, io_read, appendline)
	  (swallow, rb_io_each_byte, rb_io_getc): don't rely EOF flag.
	  [ruby-talk:141527]

Thu May 12 15:56:20 2005  Tilman Sauerbeck  <tilman@code-monkey.de>

	* lib/rdoc/parsers/parse_c.rb: show parsing progress for C files.
	  [ruby-core:4341]

Thu May 12 13:47:56 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* test/drb/test_drb{ssl,unix}.rb: can test drb
	  before install. (backported from HEAD) [ruby-dev:26146]

Thu May 12 09:53:57 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* version.c (ruby_show_version): flush for non-tty stdout.

Thu May 12 09:07:07 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* test/ruby/envutil.rb, test/drb/drbtest.rb: can test drb
	  before install. (backported from HEAD) [ruby-Bugs-1672]

Thu May 12 01:23:55 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval), parse.y (arg): reduce fixnum range literal at
	  parser.  fixed: [ruby-dev:26113]

	* eval.c (unknown_node): ignore broken NODE to get rid of accessing
	  possibly inaccessible address.  fixed: [ruby-dev:26122]
	  should emit more useful information like [ruby-dev:26126], though.

Wed May 11 16:20:01 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb: new methods WEBrick::CGI#[], WEBrick::CGI#logger
	  and WEBrick::CGI#config. (backported from HEAD)

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape_path): should
	  not use String#split("/"). (backported from HEAD)

Wed May 11 15:58:39 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (break_jump): break should not cross functions.
	  [ruby-list:40818]

Wed May 11 10:39:37 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/tempfile.rb (Tempfile#unlink): fixed typo.

Wed May 11 01:03:36 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (TMP_ALLOC): use macro NEW_NODE() to get rid of warnings on
	  platforms which have no alloca().  fixed: [ruby-talk:141301]

Sun May  8 23:17:47 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/timer.rb: fix typo.

Sun May  8 16:52:56 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/profiler.rb: fixed "undefined method `[]' for nil:NilClass"
	  [ruby-core:4775] [ruby-talk:140401] [ruby-dev:26118]

Sat May  7 22:58:00 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_var): no libs argument is given.

Sun May  1 09:58:11 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (process_sflag): replace '-' in variable names with '_'.
	  [ruby-dev:26107]

	* ruby.c (set_arg0): use also environment variable space for setting
	  $0.  [ruby-core:04774]

Wed Apr 27 23:42:22 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/Makefile.sub (OPTFLAGS): default global optimization to
	  disabled only for VC++6.

Tue Apr 26 22:58:00 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_invoke_core): call Tcl's "::unknown"
	  command when can't get information of target command.

Mon Apr 25 01:18:43 2005  Tanaka Akira  <akr@m17n.org>

	* regex.c: declare rb_warn to have variadic argument.  [ruby-core:4751]

Sat Apr 23 19:45:59 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c (ip_RubyExitCommand): exit with status code
	  via TclTkIp#_eval didn't work. [ruby-talk:139390]

Fri Apr 22 16:41:50 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c (ip_set_exc_message): fixed memory leak.

	* ext/tcltklib/tcltklib.c: eTkCallbackReturn was not initialized.

Thu Apr 21 00:07:50 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): support platforms have file separator
	  other than /.

	* {bcc32,win32,wince}/Makefile.sub (BUILD_FILE_SEPARATOR): separator
	  of building platform.

	* {bcc32,win32,wince}/Makefile.sub (CP, INSTALL): use COPY command.

Wed Apr 20 23:22:39 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in, common.mk: miniruby depens on MINIOBJS.

	* dmydln.c (dln_load): dummy function to raise LoadError.

	* cygwin/GNUmakefile.in, {bcc32,win32,wince}/Makefile.sub: miniruby
	  can't load extensions on Windows.

Wed Apr 20 23:01:35 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* win32/ifchange.bat: delete testing files.

Wed Apr 20 07:27:18 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* {bcc32,win32,wince}/configure.bat, {bcc32,win32,wince}/setup.mak:
	  add extout option.

	* bcc32/setup.mak: make configuration variables overridable.

Wed Apr 20 04:15:27 2005  Keiju Ishitsuka  <keiju@ruby-lang.org>

	* lib/irb.rb lib/irb/* doc/irb: IRB 0.9.5

Tue Apr 19 23:37:09 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/ftools.rb (File.safe_unlink): do not modify a symlinked file.

Tue Apr 19 00:06:20 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: expand path for ext/**/extconf.rb.

Mon Apr 18 11:25:14 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/zlib/zlib.c (zstream_run): fixed SEGV. [ruby-core:4712]

Sun Apr 17 23:57:49 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake, parse_args): do not expand destdir.

	* ext/extmk.rb (relative_from): treat mere drive letter as an absolute
	  path.

Sat Apr 16 17:01:16 2005  Kouhei Sutou  <kou@cozmixng.org>

	* sample/rss/tdiary_plugin/rss-recent.rb (rss_recent_cache_rss):
	  use the first date information of items as site date information
	  if channel doesn't have date information.

Sat Apr 16 15:27:03 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (RUBY_PROG_INSTALL): not add -p option to INSTALL.
	  files need timestamps to be kept are only ar-archive on a few
	  platforms, and be installed by instruby.rb but not INSTALL.
	  fixed: [ruby-core:04721]

	* mkconfig.rb: purge autoconf value variables.

Sat Apr 16 10:36:01 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: quick hack... prepend DESTDIR.
	  still have restriction on DESTDIR ("", "/", "e:")

Sat Apr 16 03:59:42 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: check for OPENSSL_cleanse.

	* ext/openssl/openssl_missing.h: ditto.

Thu Apr 14 19:18:30 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (remove_file): ignore exceptions caused by
	  chmod.

	* lib/fileutils.rb (remove_dir): try to get rights to rmdir.
	  [ruby-Bugs:1502] (2 items backportted from HEAD, rev 1.53-54)

Thu Apr 14 16:57:40 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bcc32/Makefile.sub: failed to remove debug information files.
	  fixed: [ruby-dev:26034]

Wed Apr 13 23:40:21 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb (RSS::VERSION): 0.1.3 -> 0.1.4.

	* lib/rss/rss.rb (RSS::Element#converter): fixed converter
	  transmission bug.

Wed Apr 13 21:20:35 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (mingw32): extract msvcr*.dll from objdump result.

Wed Apr 13 20:24:30 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (mingw32): use actual runtime DLL name as ruby DLL
	  name and default load path.

	* win32/Makefile.sub, win32/setup.mak: ditto.

Tue Apr 12 15:33:09 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_finalize): better modification than the
	  previous commit [ruby-dev:26029].

Tue Apr 12 12:38:06 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_finalize): fix SEGV when Tcl_GlobalEval()
	  modifies the argument string to eval.

Tue Apr 12 02:21:55 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_finalize): add existence check of
	  Tcl commands before calling Tcl_GlobalEval().

Mon Apr 11 23:47:21 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: [druby-ja:123] fix: When reference of my object is
	  loaded, the object is tainted.

	* test/drb/test_drb.rb: ditto.

Mon Apr 11 22:18:23 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* dir.c, file.c (lstat): avoid warnings for mingw.

Mon Apr 11 20:11:06 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_finalize): adhoc patch to avoid SEGV
	  when exit on Tcl/Tk8.3.x.

Mon Apr 11 15:26:25 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb (configuration): shouldn't output hdrdir twice.

Mon Apr 11 12:09:05 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* {bcc32,win32,wince}/Makefile.sub: ri data was not installed
	  into correct path. [ruby-dev:26011]

	* bcc32/Makefile.sub: defaulted install-nodoc. [ruby-dev:26011]

Sun Apr 10 10:12:42 2005  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c(ole_invoke): retry after converting Qnil
	  to VT_EMPTY.

	* ext/win32ole/win32ole/tests/testWIN32OLE.rb: correct error
	  message string "Unknown" => "unknown".

Sat Apr  9 18:20:31 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/image.rb: support to create TkImage object without
	  creating a new image object on Tk.

	* ext/tk/lib/tk/menu.rb: use TkCommandNames on create_self()

	* ext/tk/lib/tk/root.rb: TkRoot.to_eval() returns '.'.

	* ext/tk/lib/tk/text.rb: add methods to create a TkText::IndexString
	  from (x, y) coords.

	* ext/tk/lib/tkextlib/tile/: add demo and update support status.

Sat Apr  9 14:42:29 2005  Kouhei Sutou  <kou@cozmixng.org>

	* sample/rss/tdiary_plugin/rss-recent.rb: supported configuration
	  via Web browser.

Sat Apr  9 11:59:57 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss: backoported from HEAD.

	* lib/rss: refactored.
	  - gave a name to 'x'.
	  - undef_method -> remove_method for avoiding a warning in ruby 1.6.

	* lib/rss/parser.rb: @@setter -> @@setters.

	* lib/rss/parser.rb
	  (RSS::BaseListener.register_uri)
	  (RSS::BaseListener.uri_registered?)
	  (RSS::BaseListener.install_get_text_element):
	  swapped the first argument and the second argument.

	* lib/rss/taxonomy.rb: swapped the first argument and the second
	  argument for RSS::BaseListener.install_get_text_element.
	* lib/rss/image.rb: ditto.
	* lib/rss/syndication.rb: ditto.
	* lib/rss/dublincore.rb: ditto.
	* lib/rss/parser.rb: ditto.
	* lib/rss/1.0.rb: ditto.
	* lib/rss/2.0.rb: ditto.
	* lib/rss/0.9.rb: ditto.
	* lib/rss/content.rb: ditto.

	* lib/rss/parser.rb
	  (RSS::BaseListener.install_setter)
	  (RSS::BaseListener.register_uri): changed fallback way.

	* lib/rss/parser.rb: added class name registry for complex model
	  elements. (ex. have childlen elements, have some attributes and
	  a child element and so on.)

	* lib/rss/dublincore.rb: supported multiple Dublin Core items.
	* lib/rss/maker/dublincore.rb: ditto.

	* lib/rss/maker/image.rb: supproted new Dublin Core API.

	* lib/rss/maker/base.rb: added default current_element implementation.

	* lib/rss/trackback.rb (RSS::TrackBackUtils.new_with_value_if_need):
	  moved to RSS::Utils.

	* lib/rss/utils.rb (RSS::Utils.new_with_value_if_need):
	  moved from RSS::TrackBackUtils.

	* lib/rss/maker/image.rb: fixed invalid argument of
	  add_need_initialize_variable bug.
	* lib/rss/maker/trackback.rb: ditto.

	* lib/rss/rss.rb (Hash#merge): added for ruby 1.6.

	* lib/rss/rss.rb (RSS::BaseModel.date_writer): changed to accept nil
	  for date value.

	* test/test_dublincore.rb: added tests for plural accessor and
	  multiple Dublin Core items.

	* test/test_setup_maker_1.0.rb: fixed swapped actual and expected
	  values.

	* test/rss/rss-assertions.rb (assert_multiple_dublin_core): added
	  an assertion for testing multiple Dublin Core items.

	* test/rss/test_maker_dc.rb (test_rss10_multiple): added a test
	  for making multiple Dublin Core items.

	* test/rss/test_maker_dc.rb (test_date): added a test for #date=
	  and #dc_date=.

	* sample/rss/tdiary_plugin/rss-recent.rb:
	  new option: @options['rss-recent.use-image-link']:
	  use image as link instread of text if available.

	* sample/rss/tdiary_plugin/rss-recent.rb (RSS_RECENT_VERSION):
	  0.0.5 -> 0.0.6.

Fri Apr  8 20:17:48 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): hdrdir needs to be defined also in
	  Config::CONFIG.

	* lib/mkmf.rb (configuration, create_makefile): get rid of recursive
	  macro reference.

Fri Apr  8 18:26:56 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c: add callbacks to OpenSSL::SSL::SSLContexts.
	  - SSLContext#client_cert_cb=(aProc). it is called when a client
	    certificate is requested by a server and no certificate was not
	    set for the SSLContext. it must return an Array which includes
	    OpenSSL::X509::Certificate and OpenSSL::PKey::RSA/DSA objects.
	  - SSLContext#tmp_dh_callback=(aProc). it is called in key
	    exchange with DH algorithm. it must return an OpenSSL::PKey::DH
	    object.

	* ext/openssl/ossl_ssl.c (ossl_sslctx_set_ciphers): ignore the
	  argument if it's nil.

	* ext/openssl/ossl_pkey.c
	  (GetPrivPKeyPtr, ossl_pkey_sign): should call rb_funcall first.
	  (DupPrivPKeyPtr): new function.

	* ext/openssl/ossl_pkey_dh.c: add default DH parameters.

	* ext/openssl/ossl_pkey.h: ditto.

Fri Apr  8 01:55:20 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/demos-{en,jp}/goldberg.rb: reduced window size.
	  [ruby-dev:25992]

Thu Apr  7 23:58:40 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): keep directory names in Makefile as macros.

	* lib/mkmf.rb (configuration, create_makefile): ditto.

	* lib/mkmf.rb (CXX_EXT): separate C++ extensions.

Thu Apr  7 17:43:25 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_call0): "return" event hook should be always executed
	  if event_hooks is set.  fixed: [ruby-core:04662]
	  (backported from HEAD)

Mon Apr  4 23:17:52 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb (TkComm#array2tk_list): accept enc-mode argument to
	  decide whether convert encoding of each element or not.

	* ext/tk/lib/tk/variable.rb (TkVariable#value=): fail to convert the
	  encoding of array elements when assign an array to an TkVariable
	  object.

Mon Apr  4 10:26:48 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tk/lib/tk/dialog.rb: fixed typo.

Sun Apr  3 17:16:33 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.{h,c} (rb_w32_fdopen): avoid warning on bcc32.
	  (backported from HEAD)

Sat Apr  2 23:38:54 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (CP, INSTALL): get rid of less portable options.

	* lib/mkmf.rb (configuration, create_makefile): correct configuration
	  variable.

	* {bcc32,win32,wince}/{Makefile.sub,setup.mak}: leave prefix empty in
	  config.status for backward compatibility.  fixed: [ruby-core:04649]

	* lib/mkmf.rb (create_makefile): ensure library directories get made
	  before copying libraries there.

Sat Apr  2 16:59:46 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: forgot to update RELEASE_DATE

	* ext/tk/lib/tk/variable.rb: fix namespace trouble when autoloading

	* ext/tk/lib/tk/palette.rb: define Tcl variable 'tkPalette' as global

	* ext/tk/lib/tk/dialog.rb: use array2tk_list method when calling
	  Tk.ip_eval.

	* ext/tk/lib/tk/autoload.rb: add autoload entry 'TkDialogObj' and
	  'TkWarningObj'

Sat Apr  2 02:19:11 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb (TkWindow.initialize): accept 'without_creating'
	  option without 'widgetname' option to allow creating a widget object
	  which is used as an argument of Tcl/Tk's widget allocation commands.

	* ext/tk/lib/tk/image.rb (TkImage.initialize): accept 'imagename'
	  option to create a image object by the given name.

Thu Mar 31 22:23:51 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (SRC_EXT): exclude just case different suffixes on case
	  insensitive file system platforms.

	* README.EXT, README.EXT.ja (Appendix C): utility functions.

Thu Mar 31 14:15:44 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_engine.c (ossl_engine_s_load): should return
	  value. [ruby-dev:25971]

Thu Mar 31 08:25:50 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* common.mk (RUBYOPT): clear for the environment RubyGems installed.

	* common.mk (clean-local): keep $(PREP) files till distclean.

	* common.mk (check): do all tests.

Thu Mar 31 06:00:20 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_engine.c (ossl_engine_s_load): should not raise
	  error even if the specified engine could not be loaded. (Dynamic
	  engines don't have fixed name to load.)

Thu Mar 31 00:18:27 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/ifchange.bat, win32/rm.bat: backported from HEAD.

Wed Mar 30 23:44:50 2005  Nobuyoshi Nakada  <nobu.nokada@softhome.net>

	* Makefile.in, */Makefile.sub, */configure.bat,
	  cygwin/GNUmakefile.in, common.mk, configure.in, ext/extmk.rb,
	  lib/mkmf.rb, instruby.rb, runruby.rb: backport extout.
	  [ruby-dev:25963]

Wed Mar 30 17:41:48 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: add TclTkIp#_create_console() method to
	  create a Tcl/Tk's console window.

	* ext/tk/lib/multi-tk.rb: support TclTkIp#_create_console() method.

	* ext/tk/lib/remote-tk.rb: ditto.

	* ext/tk/lib/tk/console.rb: ditto.

	* ext/tk/lib/tk.rb: update RELEASE_DATE

	* ext/tk/sample/demo-*/check2.rb: use 'return' in the Proc object.

	* ext/tk/sample/tkextlib/**: ditto.

Tue Mar 29 22:11:56 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb: use DRbObject.new_with instead of reinit.
	  [ruby-dev:25961]

Mon Mar 28 23:40:40 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: move method DRbObject#reinit to DRbObject.new_with.
	  extract method DRbObject.prepare_backtrace. add DRb.regist_server,
	  remove_server, fetch_server. change server in thread variable if
	  in-proc server. [druby-ja:113]

	* lib/drb/gw.rb: ditto.

Mon Mar 28 20:43:34 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/syck/rubyext.c: get rid of warnings caused by a bug of VC.

Mon Mar 28 08:39:49 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (iconv_create): Iconv::Failure requires 3
	  arguments.  (pointed out by NaHi)

Sat Mar 26 22:51:33 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb (_callback_entry_class?): add for checking whether
	  a class is available for a callback entry.

	* ext/tk/lib/tk.rb (after_cancel): add Tk.after_cancel(afterID) method.

	* ext/tk/lib/tk.rb (array2tk_list): change from private module method
	  of TkComm to public module method.

	* ext/tk/lib/tk.rb (cget): add check that slot argument is not
	  empty string.

	* ext/tk/lib/tk.rb (configinfo): ditto.

	* ext/tk/lib/tk/itemconfig.rb (itemcget): add check that slot argument
	  is not empty string.

	* ext/tk/lib/tk/itemconfig.rb (itemconfiginfo): ditto.

	* ext/tk/lib/tk/entry.rb: add TkEntry#icursor and icursor= (alias of
	  cursor and cursor= method).

	* ext/tk/lib/tk/font.rb: improve font treatment when the font name is
	  empty string.

	* ext/tk/lib/tk/variable.rb: add :variable, :window and :procedure
	  type.

	* ext/tk/lib/tk/variable.rb: improve treatment of array-type
	  tkvariable.

	* ext/tk/lib/tkextlib/blt.rb: add commands for zooming.

	* ext/tk/lib/tkextlib/blt/*: bug fix.

	* ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: bug fix and add methods
	  to call TreeCtrl commands for bindings.

	* ext/tk/sample/tkextlib/blt/*: new sample scripts.

	* ext/tk/sample/tkextlib/treectrl/*: ditto.

Fri Mar 25 10:53:16 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (WIN32_LEAN_AND_MEAN): removed because a lot of
	  troubles.  [ruby-list:40721]

Thu Mar 24 23:10:44 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (macro_defined?): try to compile for an old compiler
	  which doesn't bail out at #error directive.  [ruby-dev:25818]

	* lib/mkmf.rb (check_sizeof): refine logging messages.

Thu Mar 24 03:57:48 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/utils.rb (WEBrick::Utils.create_listeners):
	  - should raise ArgumentError if no port is specified.
	  - even if the specified port is 0, all TCPServers should be
	  initialized with the port given to the first one.

	* lib/webrick/server.rb (WEBrick::GenericServer#initialize): if :Port
	  parameter is 0, it should be updated with the port number which
	  actually listened.

Wed Mar 23 00:35:10 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* test/ruby/test_settracefunc.rb (test_event): added tests for
	  "class" and "end" and "raise".

Tue Mar 22 22:40:18 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_call0): check event_hooks instead of trace_func.

Tue Mar 22 17:30:44 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_add_event_hook): new function to add a hook function for
	  interpreter events. (backported form HEAD)

Sun Mar 20 22:51:19 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (mkmf_failed): check if Makefile is created without
	  create_makefile.

Sat Mar 19 23:48:10 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-expr-beg): returned true always.
	  fixed: [ruby-list:40683]

Sat Mar 19 00:41:02 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/font.rb: add some TkFont class methods to get font
	  information without creating a TkFont object.

	* ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: bug fix and define some
	  classes for components of Tk::TreeCtrl

Thu Mar 17 17:42:13 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (make_struct): allow non local-id field
	  names. [ruby-core:04575]

	* struct.c (inspect_struct): ditto.

Wed Mar 16 23:36:02 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* eval.c (rb_call0): call_cfunc() should be protected.

	* test/ruby/test_settracefunc.rb: added test for c-return.

Wed Mar 16 22:20:25 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* object.c (str_to_id): fixed typo.

Wed Mar 16 18:08:32 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): reorganize "return" event post.

Tue Mar 15 23:49:19 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (Init_iconv): InvalidEncoding also should include
	  Iconv::Failure.

Tue Mar 15 16:38:11 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c (ary2list): give wrong arguments to hash2kv()

Mon Mar 14 19:39:33 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/timer.rb (TkTimer): forgot to clear @return_value
	  when restarting

	* ext/tk/lib/tk/sample/cd_timer.rb: new sample of TkRTTimer

Mon Mar 14 12:21:03 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/timer.rb (TkRTTimer): forgot to reset the callback
	  time. So, 'continue' do all callbacks between 'stop' and 'continue'.

Mon Mar 14 08:14:56 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (str_to_id): warn for NUL containing strings.

Mon Mar 14 00:13:49 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/timer.rb (TkRTTimer): correct calculation of offset
	  value. get a little better accuracy.

	* ext/tk/sample/demos-en/widget: use a binding with no local variables
	  when eval a sample script.

	* ext/tk/sample/demos-en/bind.rb: ditto.

	* ext/tk/sample/demos-en/tcolor: ditto.

	* ext/tk/sample/demos-jp/widget: ditto.

	* ext/tk/sample/demos-jp/bind.rb: ditto.

	* ext/tk/sample/demos-jp/tcolor: ditto.

Sun Mar 13 10:04:17 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb: remove test_gc. [ruby-dev:25871]

Thu Mar 10 19:12:06 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (lib_eventloop_ensure): mis-delete a timer
	  handler when exit from a recursive called eventloop

	* ext/tk/lib/tk/timer.rb: new TkRTTimer class, which can works for a
	  realtime operation

	* ext/tk/sample/tkrttimer.rb: sample of TkRTTimer class

	* ext/tk/lib/tk/textmark.rb: move  TkTextMark#+ and TkTextMark#- to
	  TkText::IndexModMethods

	* ext/tk/lib/tk/text.rb: improve TkTextMark#+ and TkTextMark#-, and
	  add them to TkText::IndexModMethods module

	* ext/tk/sample/tktextio.rb: add test part of "seek by text index
	  modifiers"

Thu Mar 10 08:10:11 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (make_regexp): need to free internal regexp structure when
	  compilation fails.  [ruby-talk:133228]

Wed Mar  9 20:25:58 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_write): call
	  rb_sys_fail if errno isn't 0. [ruby-dev:25831]

	* ext/openssl/lib/openssl/cipher.rb: fix typo. [ruby-dev:24285]

Wed Mar  9 15:46:35 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/server.rb (WEBrick::GenericServer#start): should
	  restore @token if accept failure. suggested by Dominique Brezinski.
	  [ruby-core:04518]

Wed Mar  9 13:37:57 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tktextio.rb: fix bug of handling 'end' position.
	  support initial text, overwrite setting and pos_gravity control.

Tue Mar  8 18:16:55 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tktextio.rb: New sample script. TkTextIO class in this
	  sample supports to use a text widget as if it is a I/O stream (such
	  like as StringIO class).

Tue Mar  8 13:54:40 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/socket.c: workaround for some of 4.4BSD-Lite derived OSs.

Tue Mar  8 12:36:17 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c: document from Sam Roberts
	  <sroberts@uniserve.com> for getsockopt and setsockopt is merged.
	  [ruby-doc:824]

Tue Mar  8 01:27:00 2005  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: follow nkf 1.66
	  fixed: [ruby-dev:25828]

Mon Mar  7 21:35:02 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* sample/webrick/httpsd.rb: fix typo in comment. suggested by
	  Kazuhiko Shiozaki.

Mon Mar  7 14:55:43 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (block_pass): should not push unique number if a block is
	  not an orphan.  [ruby-dev:25808]

Wed Feb 16 02:55:21 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_read,
	  ossl_ssl_write):
	  - need to set errno on Win32 platform.
	  - should call rb_sys_fail instead of rasing SSLError if
	    SSL_ERROR_SYSCALL occured.
	  - should wait for that the underlying IO become readable or
	    writable if the error was SSL_ERROR_WANT_READ or
	    SSL_ERROR_WANT_WRITE. [ruby-dev:25795]

	* ext/openssl/lib/openssl/buffering.rb
	  (Buffering#initialize): should set @eof and @rbuffer.
	  (Buffering#fill_rbuff): should rescue Errno::EAGAIN.
	  (Buffering#consume_rbuf): pointless eof flag resetting is deleted.
	  (Buffering#read): should return an empty string if the specified
	  size is zero.
	  (Buffering#readpartial): new method.
	  (Buffering#readline): fix typo.
	  (Buffering#getc): return the first character of string correctly.
	  (Buffering#each): fix typo.  suggested by Brian Ollenberger.
	  (Buffering#readchar): fix typo.
	  (Buffering#eof?): should read again it the input buffer is empty.
	  (Buffering#do_write): should rescue Errno::EAGAIN.
	  (Buffering#puts): use "\n" as the output field separator.

	* ext/openssl/lib/openssl/ssl.rb: set non-blocking flag to the
	  underlying IO.

	* ext/openssl/extconf.rb: get rid of GNUmakefile generation.

	* text/openssl/test_pair.rb: test for IO like methods.

	* test/ruby/ut_eof.rb: test about empty file.

Mon Mar  7 10:22:06 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/un.rb: should use OptionParser. (backported form HEAD)

Mon Mar  7 09:18:42 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_cmp_m): should not return false but nil.
	  fixed: [ruby-dev:25811]

Mon Mar  7 01:22:14 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c: remove the some codes which depend on the
	  difference between Ruby1.8 and 1.9, because st.c on Ruby1.9
	  was changed.

Mon Mar  7 00:01:04 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fail to call TclTkLib.mainloop when $SAFE==4

Sun Mar  6 16:41:33 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: HTTPHeader holds its header fields as an array
	  (backport from CVS HEAD rev 1.112-1.123). [ruby-list:40629]

	* test/net/http/test_httpheader.rb: new file.

Sun Mar  6 11:47:10 2005  Sam Roberts  <sroberts@uniserve.com>

	* lib/pp.rb: rdoced.  [ruby-core:4490]

Sun Mar  6 11:36:37 2005  Tanaka Akira  <akr@m17n.org>

	* lib/pp.rb (File::Stat#pretty_print): Etc.getpwuid and Etc.getgrgid
	  may return nil.  [ruby-talk:129826]
	  reported by Daniel Berger.

Sat Mar  5 18:06:21 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* dir.c (fnmatch): removed unnecessary code. (ruby_1_8 didn't have
	  String#clear, so [ruby-dev:24749] didn't affect it)

	* win32/win32.c (NtInitialize): ditto. (by numeric.c 1.101.2.14)

Sat Mar  5 16:29:26 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: freeze callback-entry objects

	* ext/tk/lib/tkextlib/tile.rb: support tile-0.6

Fri Mar  4 19:39:28 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#do_includes): replace
	  also locally defined modules.

	* ext/iconv/iconv.c: backport Iconv::InvalidEncoding from CVS HEAD.

	* ext/strscan/strscan.c: moved misplaced rdoc.

Fri Mar  4 15:58:12 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi-lib.rb: add deprecation warning. [ruby-dev:25499]
	  getopts.rb, parsearg.rb, importenv.rb as well.

Fri Mar  4 11:17:06 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_rbUpdateCommand): get rid of
	  warnings with Tcl/Tk 8.3 or former (backport from CVS_HEAD).

	* ext/tcltklib/tcltklib.c (ip_rb_threadUpdateCommand): ditto.

Fri Mar  4 10:15:30 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/set.rb (SortedSet::setup): a hack to shut up warning.
	  [ruby-talk:132866]

Fri Mar  4 07:07:00 2005  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: follow nkf 1.63

Thu Mar  3 23:49:00 2005  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: follow nkf 1.62

Thu Mar  3 11:49:51 2005  Kouhei Sutou  <kou@cozmixng.org>

	* sample/rss/tdiary_plugin/rss-recent.rb: added site information.

Wed Mar  2 19:53:07 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (parse_args): add DESTDIR only when not directed
	  already.  fixed: [ruby-dev:25781]

Wed Mar  2 17:14:18 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (lib_eventloop_core): fix typo

Wed Mar  2 16:00:02 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: enforce thread-check and exception-handling
	  to avoid SEGV trouble.
	  [KNOWN BUG] When supports pthread and running multiple Tk
	  interpreters, an interrupt signal causes SEGV frequently. That
	  may be a trouble of Ruby's signal handler.

	* ext/tk/tkutil/tkutil.c; fix a bug on converting a SJIS string array
	  to a Tcl's list string.

	* ext/tk/tcltklib.c: wrap Tcl's original "namespace" command to
	  protect from namespace crash.

	* ext/tk/lib/multi-tk.rb: enforce exception-handling.

	* ext/tk/lib/multi-tk.rb: catch IRB_EXIT to work on irb.

	* ext/tk/lib/tk.rb: ditto.

	* ext/tk/tcltklib.c: add TclTkLib.mainloop_thread?

	* ext/tk/lib/multi-tk.rb: (bug fix) callback returns a value.

	* ext/tk/lib/tk/canvas.rb (delete): bug fix when multiple arguments.

	* ext/tk/lib/clock.rb: fix 'no method error'.

	* ext/tk/lib/clock.rb (self.clicks): accept a Symbol argument.

	* ext/tk/lib/variable.rb: be able to set default_value_type; :numeric,
	  :bool, :string, :symbol, :list, :numlist or nil (default; same to
	  :string). If set a type, TkVariable#value returns a value of the
	  type.

	* ext/tk/lib/tkextlib/tclx/tclx.rb: add Tk::TclX.signal to warn the
	  risk of using TclX extension's 'signal' command.

	* ext/tk/sample/irbtk.rb: irb with Ruby/Tk.

	* ext/tk/sample/demos-*/anilabel.rb: bug fix on 'show code'

	* ext/tk/sample/demos-*/aniwave.rb: new Ruby/Tk animation demo.

	* ext/tk/sample/demos-*/pendulum.rb: ditto.

	* ext/tk/sample/demos-*/goldberg.rb: ditto.

	* ext/tk/sample/demos-*/widget: add entries of animation demos.

Tue Mar  1 00:47:43 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb: backport from CVS_HEAD. use
	  MockClock.sleep instead of Kernel.sleep [ruby-dev:25387]

Tue Mar  1 00:34:24 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb (Rinda::TupleSpace): improved keeper thread.

	* test/rinda/test_rinda.rb: ditto.

Mon Feb 28 11:42:23 2005  Ian Macdonald  <ian@caliban.org>

	* exception error messages updated.  [ruby-core:04497]

Mon Feb 28 09:03:09 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (Init_socket): add bunch of Socket
	  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
	  [ruby-core:04409]

Wed Feb 23 15:04:32 2005  akira yamada  <akira@ruby-lang.org>

	* lib/uri/generic.rb (split_userinfo): should split ":pass" into ""
	  and "pass".  [ruby-dev:25667]

Wed Feb 23 08:00:18 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_s_create): no need for negative argc check.
	  [ruby-core:04463]

	* array.c (rb_ary_unshift_m): ditto.

Wed Feb 23 01:57:46 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (initialize): handle certs correctly. Thanks,
	  NABEYA Kenichi. (backported from CVS HEAD)

Tue Feb 22 07:25:18 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (parser_yylex): identfier after dot must not be a variable.

Mon Feb 21 10:04:49 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32,wince}/Makefile.sub (config.h): add fcntl.

	* win32/win32.[ch] (fcntl): ditto.

	* win32/win32.c (rb_w32_connect): support nonblocking mode.

	* ext/socket/socket.c (wait_connectable, ruby_connect): support
	  nonblocking connect on various platforms.
	  all changes are backported from CVS HEAD. [ruby-core:3154],
	  [ruby-core:4364].

Sun Feb 20 00:48:48 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::FTP#buffer_open): access mechanism
	  re-implemented according to RFC 1738.
	  reported by Guillaume Marcais.  [ruby-talk:131650]

Sat Feb 19 18:11:47 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (DRbObject#respond_to?): take two arguments.
	  [ruby-dev:25722]

	* test/drb/drbtest.rb: ditto.

Sat Feb 19 13:52:02 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb: call OpenSSL::SSL::SSLSocket#post_connection_check
	  after connection is made.

Sat Feb 19 01:32:03 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/bigdecimal/lib/bigdecimal/newton.rb: resolved LoadError.
	  [ruby-dev:25685]

	* ext/bigdecimal/sample/linear.rb: ditto.

	* ext/bigdecimal/sample/nlsolve.rb: ditto.

	* ext/bigdecimal/lib/bigdecimal/nlsolve.rb: removed because this file
	  is sample script and same file exists in ext/bigdecimal/sample.

Fri Feb 18 17:14:00 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
	  of StandardError class, not Exception class.  [ruby-core:04429]

Thu Feb 17 20:11:18 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/drb/drb.rb (DRbServer.default_safe_level): fix typo.

Thu Feb 17 20:11:18 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/digest/test_digest.rb: separate test case for each algorithms.
	  [ruby-dev:25412]

Thu Feb 17 11:54:00 2005  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/collector.rb (collect_file): now deletes paths added
	  to $LOAD_PATH instead of restoring it verbatim.

	* lib/test/unit/autorunner.rb (AutoRunner.run): fixed so that
	  'ruby -rtest/unit -rtest1 -rtest2 -e0' will use the objectspace
	  collector again. Also tried to simplify the calling convention.

	* test/runner.rb: adjusted for new AutoRunner semantics.

	* lib/test/unit.rb: ditto.

Thu Feb 17 04:21:47 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
	  fixed: [ruby-core:04444]

Thu Feb 17 00:09:45 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/drb/ignore_test_drb.rb: move TestDRbReusePort to new file
	  [ruby-dev:25238]

	* test/drb/test_drb.rb: add method DRbService.ext_service, move
	  TestDRbReusePort to new file [ruby-dev:25238]

	* test/drb/test_drb.rb: ditto.

	* test/drb/test_drbssl.rb: ditto.

	* test/drb/test_drbunix.rb: ditto.

	* test/drb/ut_drb.rb: reduce sleep.

Thu Feb 17 00:02:27 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (is_defined): NODE_IASGN is an assignment.

Wed Feb 16 23:34:30 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: add lazy stop_service. ([druby-ja:109])

	* lib/drb/extserv.rb: ditto.

Wed Feb 16 17:07:57 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c: Follow the change of st.c (st_foreach)
	  [ruby-list:40623].
	  Sometimes mis-convert from a Ruby's Array of SJIS Strings, which
	  includes some kind of SJIS characters, to a Tcl's UTF8 list string.

Mon Feb 14 23:58:17 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/parser.rb (RSS::ListenerMixin::tag_end):
	  fixed invalid namespace handling bug.

Mon Feb 14 13:12:38 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/ssl.rb
	 (OpenSSL::SSL::SSLSocket#post_connection_check): new method.

Mon Feb 14 00:40:49 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (InvokeMethod.perform): pass DRb info to sub thread.

	* test/drb/test_drb.rb (test_01_safe1_safe4_eval): fix test case.

Sun Feb 13 23:13:46 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/dublincore.rb (RSS::DublicCoreModel#date{,=}): added
	  convenient methods.

	* lib/rss/0.9.rb (RSS::Rss::Channel#date{,=}): ditto.

	* lib/rss/2.0.rb (RSS::Rss::Channel::Item#date{,=}): ditto.

	* test/rss/: added tests for the convenient methods.

Sun Feb 13 22:43:03 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (DRbServer): add default_safe_level, safe_level,
	  config[:safe_level] ([druby-ja:120])

	* test/drb/test_drb.rb, ut_eval.rb, ut_safe1.rb: ditto.

Sun Feb 13 16:56:52 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (WEBrick::CGI.start): should set reason-phrase
	  to the value of status header field. ([ruby-dev:40617])

Sun Feb 13 00:52:33 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/erb.rb (ERB::Util.h, u): make it module_function.

Sat Feb 12 17:29:19 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (OpenURI.open_loop): send authentication only for
	  the URI directly specified.

Sat Feb 12 15:07:23 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* random.c (rand_init): suppress warning.

Sat Feb 12 13:54:03 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb: support https if the platform provides CA
	  certificates.

Sat Feb 12 06:18:28 2005  URABE Shyouhei  <shyouhei@ice.uec.ac.jp>

	* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check.
	  [ruby-dev:25675]

Fri Feb 11 17:40:42 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
	  new method OpenSSL::X509::Store#set_default_paths.

Fri Feb 11 11:33:53 2005  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::HTTP#proxy_open): new option supported:
	  :http_basic_authentication.
	  suggested by Kent Sibilev.  [ruby-core:4392]

Fri Feb 11 06:30:07 2005  George Ogata  <g_ogata@optushome.com.au>

	* misc/ruby-mode.el: ignore parenthesis inside heredoc.
	  [ruby-core:04415]

Fri Feb 11 04:54:13 2005  Tilman Sauerbeck  <tilman@code-monkey.de>

	* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

	* lib/rdoc/generators/ri_generator.rb: ditto.

Thu Feb 10 11:14:17 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub (COMMON_HEADERS): shouldn't include winsock2.h.

	* ext/socket/extconf.rb (sockaddr_storage): remove workaround for
	  mswin32.

Thu Feb 10 10:29:16 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/curses/curses.c: don't need to check HAVE_WCOLOR_SET excluding
	  window_color_set().

Thu Feb 10 00:47:25 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (make_struct): fixed: [ruby-core:04402]

Wed Feb  9 08:07:08 2005  Paul Duncan  <pabs@pablotron.org>

	* ext/curses/curses.c (window_color_set): [ruby-core:04393]

Tue Feb  8 23:51:47 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: reject :instance_eval, :class_eval, :module_eval
	  [druby-ja:117]

Tue Feb  8 13:06:12 2005  Sam Roberts  <sroberts@uniserve.com>

	* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
	  [ruby-talk:130092]

Tue Feb  8 09:30:01 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::Cookie): [ruby-talk:130040]

Tue Feb  8 00:19:02 2005  Tanaka Akira  <akr@m17n.org>

	* lib/resolv.rb (Resolv::DNS::Name#subdomain_of?): new method.
	  (Resolv::DNS::Name#inspect): ditto.
	  Suggested by Sam Roberts.  [ruby-talk:129086]

Mon Feb  7 10:06:30 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c: [ruby-doc:818]

Mon Feb  7 01:56:20 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* instruby.rb, rubytest.rb (srcdir): no longer embed srcdir into
	  rbconfig.rb. (backported from CVS HEAD)

	* ext/socket/extconf.rb (sockaddr_storage): winsock2.h have the
	  definition of struct sockaddr_storage, but socket.c doesn't
	  include it because this version of ruby still has binary level
	  compatibility with winsock1.

	* lib/mkmf.rb (create_makefile): should support header files in
	  depend file.

Mon Feb  7 01:21:50 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/extconf.rb: check if getaddrinfo() works fine only when
	  wide-getaddrinfo option is not given.  fixed: [ruby-dev:25422]

	* lib/mkmf.rb ($extmk): check if under ext directory.

	* lib/mkmf.rb (Logging.postpone): allow recursive operation.

	* lib/mkmf.rb (try_constant): make sure if really a constant, reduce
	  the number of times of compile.

	* lib/mkmf.rb (have_macro, have_var, byte_order): new functions.

	* lib/mkmf.rb (find_library): allow directory list with separators.

	* lib/mkmf.rb (arg_config): manage provided configuration options.

	* lib/mkmf.rb (dir_config): accept arrays of directory names as
	  default values.

	* mkconfig.rb: no longer embed srcdir and compile_dir into
	  rbconfig.rb.

	* lib/mkmf.rb (create_makefile): fix unbalanced parens.

Sun Feb  6 19:23:01 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (stack_extend): add prototype because VC++8 doesn't
	  accept __declspec(noinline) with K&R style function definitions.
	  (backported from CVS HEAD)

Sun Feb  6 14:14:26 2005  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb (new_with_hash): changed messages of exception.

	* lib/date/format.rb (str[fp]time): undocumented conversion
	  specifications %[1-3] are now deprecated.

Sun Feb  6 12:20:11 2005  Akinori MUSHA  <knu@iDaemons.org>

	* bignum.c (rb_big2ulong_pack): One too many arguments are passed
	  to big2ulong().

	* re.c (rb_reg_init_copy, rb_reg_initialize_m): One too many
	  arguments are passed to rb_reg_initialize().

Sun Feb  6 03:24:20 2005  Tanaka Akira  <akr@m17n.org>

	* lib/resolv.rb (Resolv::DNS::Resource::TXT): multiple strings was not
	  handled.
	  (Resolv::DNS::Resource::TXT#strings): new method to return all
	  strings.
	  (Resolv::DNS::Message::MessageEncoder#put_string_list): new method.
	  (Resolv::DNS::Message::MessageDecoder#get_string_list): ditto.
	  based on [ruby-talk:129732] by Sam Roberts.

Fri Feb  4 00:30:45 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss: supported Image module.
	  http://web.resource.org/rss/1.0/modules/image/

Thu Feb  3 23:42:36 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_close, strio_close_read, strio_close_write):
	  should return nil instead of self as well as IO.  [ruby-dev:25623]

	* ext/stringio/stringio.c (strio_extend, strio_putc): fill with zero
	  extended portion.  [ruby-dev:25626]

Wed Feb  2 23:52:53 2005  sheepman  <sheepman@tcn.zaq.ne.jp>

	* ext/stringio/stringio.c (strio_truncate): should MEMZERO an extended
	  part.  [ruby-dev:25618]

Wed Feb  2 21:56:01 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb (RSS::Element#convert): added.

	* lib/rss/rss.rb: convert -> need_convert.

	* lib/rss/1.0.rb: ditto.

	* lib/rss/0.9.rb: ditto.

	* lib/rss/2.0.rb: ditto.

	* lib/rss/trackback.rb: ditto.

Tue Feb  1 22:48:48 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (DRb::DRbObject#respond_to?): check marshal_dump and
	  _dump.

Tue Feb  1 00:20:23 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (aix): fix linker flags on AIX.  [ruby-talk:125460]

Mon Jan 31 13:33:21 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: add invalid namespace check

	* ext/tk/lib/multi-tk.rb: add invalid_namespace? method

	* ext/tk/lib/remote-tk.rb: ditto

Mon Jan 31 10:29:18 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

Sat Jan 29 09:42:12 2005  Sam Roberts  <sroberts@uniserve.com>

	* lib/resolv.rb (Resolv::DNS::Resource::IN::SRV): Added RFC2782 SRV
	  resource record for specifying location of services.

Fri Jan 28 17:16:55 2005  Tanaka Akira  <akr@m17n.org>

	* lib/resolv.rb (Resolv::DNS::Config.parse_resolv_conf):
	  parse options line for ndots option.
	  (Resolv::Hosts#lazy_initialize): return self.
	  (Resolv::DNS#lazy_initialize): ditto.
	  (Resolv::DNS::Config#lazy_initialize): ditto.
	  Suggested by Sam Roberts.

Thu Jan 27 13:18:03 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* st.c (st_foreach): report success/failure by return value.
	  [ruby-Bugs-1396]

Thu Jan 27 00:15:29 2005  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb (setup): support BSD-style
	  directory group inheritance. (backport from HEAD, rev 1.32)

	* test/fileutils/fileasserts.rb (assert_same_entry): show entry
	  difference. (backport from HEAD, rev 1.4)

Wed Jan 26 23:09:11 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/net/protocol.rb (WriteAdapter#puts): should append \n, not
	  prepend. [ruby-talk:128302] (backport from HEAD, rev 1.75)

Wed Jan 26 10:51:50 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (flock_winnt, flock_win95): unlock file even if
	  LOCK_NB is specified. (backported from CVS HEAD)

Tue Jan 25 17:11:51 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ruby.c (proc_options): correct -T option in RUBYOPT. (backported
	  from CVS HEAD)

Tue Jan 25 14:05:52 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fix SEGV bug; trouble on canceling remained
	  after scripts [ruby-dev:25479]: NULL current namespace when deleting
	    Tk interpreter [ruby-talk:126225]

	* ext/tcltklib/extconf.rb: bug fix; TCL_ENABLE_THREAD flag is inverted
	  [ruby-talk:126360]

	* ext/tcltklib/extconf.rb: add yet another native-thread check

	* ext/tk/tkutil.c: fix SEGV bug; NULL string pointer when finalize
	  Ruby interpreter

	* ext/tk/lib/multi-tk.rb: avoid warning for deleted safeTk ip frame

	* ext/tk/lib/tk/bindtag.rb: bug fix; new method of named bindtag
	  doesn't return the created object [ruby-dev:25479]

	* ext/tk/lib/tk/menu.rb: bug on treating arguments [ruby-dev:25479]

	* ext/tk/lib/tk.rb: bug fix; cannot accept a callback ID string for
	  a command argument [ruby-dev:25479]

	* ext/tk/lib/multi-tk.rb: ditto

	* ext/tk/lib/tk/*.rb: ditto

	* ext/tk/lib/tkextlib/*.rb: ditto

	* ext/tk/sample/demos-jp/anilabel.rb: new demo script

	* ext/tk/sample/demos-en/anilabel.rb: ditto

	* ext/tk/sample/tkHTML/ss.rb: local variable scope bug fix
	  [ruby-dev:25479]

Mon Jan 24 15:44:25 2005  Tilman Sauerbeck  <tilman@code-monkey.de>

	* lib/rdoc/parsers/parse_c.rb: allow whitespace after function names.
	  [ruby-core:4296]

	* lib/rdoc/parsers/parse_simple.rb: adds support for private comments
	  in the "simple" parser. [ruby-core:4301]

Mon Jan 24 15:44:25 2005  Charles Mills  <cmills@freeshell.org>

	* lib/rdoc/parsers/parse_c.rb: adds support for constants
	  (rb_define_const), accessors (rb_define_attr), and makes a
	  couple fixes. [ruby-core:4307]

Mon Jan 24 15:44:25 2005  Florian Gro  <florgro@gmail.com>

	* lib/rdoc/parsers/parse_rb.rb: Logic for def Builtin.method() end
	  [ruby-core:4302]

Mon Jan 24 15:44:25 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* document updates - [ruby-core:04296], [ruby-core:04301],
	  [ruby-core:04302], [ruby-core:04307]

Sun Jan 23 12:41:16 2005  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/wsdlDriver.rb: from 1.5.3-ruby1.8.2, operation which has
	  capitalized name (such as KeywordSearchRequest in AWS) is defined as
	  a method having uncapitalized name. (converted with
	  GenSupport.safemethodname to handle operation name 'foo-bar').  it
	  introduced serious incompatibility; in the past, it was defined as a
	  capitalized.

	  define capitalized method as well under that circumstance.

Sun Jan 23 05:24:42 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ocsp.c (ossl_ocspreq_to_der): should call
	  GetOCSPReq at first.

Sat Jan 22 23:09:47 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/ssl.rb (accept): rescue SSLError. [druby-ja:110]

Sat Jan 22 22:35:03 2005  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/unix.rb: fail if UNIXFileOwner is set. [druby-ja:111]

Fri Jan 21 23:58:42 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/stringio/stringio.c (strio_set_pos): clear EOF flag.
	  [ruby-talk:127511]

Fri Jan 21 20:07:02 2005  Tanaka Akira  <akr@m17n.org>

	* lib/resolv.rb (Resolv::DNS::Config.resolv): don't raise ResolvError.
	  reported by Sam Roberts.  [ruby-talk:127133]

Fri Jan 21 16:58:10 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (rb_push_glob): should work for NUL delimited patterns.

Fri Jan 21 13:58:37 2005  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (u8tou16): fixed typo. fixed: [ruby-list:40546]
	  (backported from CVS HEAD)

Fri Jan 21 09:30:16 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* rubyio.h (rb_eof_error): should mark as NORETURN. (backported
	  from CVS HEAD)

Fri Jan 21 00:31:36 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/syck/rubyext.c (syck_parser_bufsize_set): avoid VC++ warning
	  "local variable 'size' used without having been initialized".

Thu Jan 20 19:03:24 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/extmk.rb (extmake): shouldn't set $extflags on mswin32.

	* win32/Makefile.sub (LIBRUBY_SO): should use $DLDOBJS instead of
	  $EXTOBJS.
	  fixed: [ruby-core:04290] (backported from CVS HEAD)

Thu Jan 20 11:42:02 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_new4): should propagate taintedness.

	* struct.c (rb_struct_set): use original method name, not callee
	  name, to retrieve member slot.  [ruby-core:04268]

	* time.c (time_strftime): protect from format modification from GC
	  finalizers.

Wed Jan 19 18:06:40 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/ipaddr.rb (to_s, test_to_s): too many colons with some cases.
	  (backported from CVS HEAD)

Wed Jan 19 01:16:30 2005  Tanaka Akira  <akr@m17n.org>

	* lib/resolv.rb (Resolv::DNS::Config.parse_resolv_conf): ignore
	  domain and search directive without an argument.
	  reported by Sam Roberts.  [ruby-talk:126781]

Tue Jan 18 15:03:05 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/ssl.rb (WEBrick::Config::SSL): the default value
	  of :SSLEnable is false.

	* lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio
	  don't allow changing its mode.

	* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):
	  should delete trailing LF from the result of pack("m*").

	* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect):
	  - should delete trailing LF from the result of pack("m*").
	  - clear Request-Line not to send the response by HTTPServer#run.

	* lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues):
	  refine regexp (and change the name of a local variable).

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils#escape_path): add
	  new method to escape URI path component.

	* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): should
	  escape SCRIPT_NAME and PATH_INFO before being parsed as a URI.

	* test/webrick/*, sample/webrick/httpproxy.rb: add new file.

Mon Jan 17 23:33:46 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (aix): fix typo.  [ruby-talk:126401]

Mon Jan 17 07:08:51 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/readline/readline.c: suppress warnings.

	* lib/irb/extend-command.rb (IRB::ContextExtender.def_extend_command):
	  ditto.

	* lib/irb/ext/history.rb (IRB::Context::set_last_value): ditto.

	* lib/irb/ext/history.rb (IRB::Context::eval_history): ditto.

	* lib/irb/locale.rb (IRB::Locale::real_load): ditto.

	* lib/irb/slex.rb (SLex::Node::create_subnode): remove garbage.

Mon Jan 17 00:09:42 2005  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/uri/common.rb (PORT): typo fix. fixed: [ruby-core:04256]

Sat Jan 15 14:57:22 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (proc_options): ignore trailing CRs at the end of short
	  options as well as long options.  fixed: [ruby-core:04232]

Sat Jan 15 13:35:16 2005  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb (RSS::VERSION): 0.1.2 -> 0.1.3.

	* lib/rss/rss.rb: accept inheritance. [ruby-talk:126104]

Thu Jan 13 04:48:53 2005  Tanaka Akira  <akr@m17n.org>

	* io.c (io_fread): don't warn nonblocking behavior by default.

Wed Jan 12 00:36:29 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_class_superclass): superclass of singleton class also
	  should be a singleton class.  fixed: [ruby-list:40519]

Tue Jan 11 09:44:40 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* numeric.c (Init_Numeric): turn off floating point exceptions
	  on bcc32. "1e300".to_f had crashed by overflow.

Tue Jan 11 03:10:10 2005  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (copy_entry): could not copy symbolic link.
	  [ruby-talk:125733]

	* lib/fileutils.rb (copy_stream): use read/write instead of
	  sysread/syswrite.

Mon Jan 10 23:08:15 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (rb_autoload): hide internal data from ruby level.
	  fixed: [ruby-dev:25435], [ruby-list:40498]

Mon Jan 10 01:22:55 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (rb_data_object_alloc): klass may be NULL.
	  [ruby-list:40498]

Sun Jan  9 03:12:58 2005  Tanaka Akira  <akr@m17n.org>

	* io.c (io_fread): warn nonblocking behavior.
	  (io_readpartial): new method IO#readpartial.

Sat Jan  8 04:38:47 2005  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml.rb: Kernel#y requires an argument.

Fri Jan  7 21:12:29 2005  TAMURA Takashi  <sheepman@tcn.zaq.ne.jp>

	* random.c (rand_init): use ALLOC_N instead of ALLOCA_N
	  [ruby-dev:25426]

Fri Jan  7 18:03:35 2005  Tanaka Akira  <akr@m17n.org>

	* gc.c (mark_locations_array): avoid core dump with -O3.
	  [ruby-dev:25424]

Thu Jan  6 20:31:07 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/zlib/zlib.c (zstream_end): should return value. (backported
	  from CVS HEAD)

Thu Jan  6 19:55:13 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.c (rb_w32_close): didn't close socket handle.
	  [ruby-dev:25414]

	* win32/win32.c (rb_w32_open_osfhandle): bcc32's _open_osfhandle
	  never set EMFILE.

Thu Jan  6 17:14:31 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* random.c (random_seed): O_NONBLOCK isn't defined on some
	  platforms. [ruby-dev:25417]

Thu Jan  6 13:45:35 2005  Tanaka Akira  <akr@m17n.org>

	* lib/time.rb: recognize +00:00 and GMT as a localtime.

Thu Jan  6 07:58:28 2005  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/usage.rb (RDoc::RDoc.usage_no_exit): Allow for colons
	  in path names on DOS machines. (thanks to Johan Nilsson)

Wed Jan  5 20:16:32 2005  Tanaka Akira  <akr@m17n.org>

	* random.c (limited_big_rand): didn't work if SIZEOF_BDIGITS == 2.
	  [ruby-dev:25408]

	* random.c (random_seed): refined.

Wed Jan  5 12:49:39 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_initialize): Thread objects cannot be initialized
	  again.  fixed: [ruby-core:04067]

Wed Jan  5 10:48:16 2005  NAKAMURA Usaku  <usa@ruby-lang.org>

	* dir.c (dir_s_mkdir): win32 special processing doesn't need any
	  longer. (backported from CVS HEAD)

	* win32/win32.[ch] (rb_w32_mkdir): new function. POSIX.1 compatible
	  interface. (backported from CVS HEAD)

	* win32/win32.[ch] (rb_w32_rmdir): new function. (backported from CVS
	  HEAD)

Wed Jan  5 02:30:11 2005  Tanaka Akira  <akr@m17n.org>

	* random.c (init_by_array): imported from mt19937ar-cok.tgz.
	  (genrand_int32): ditto.
	  (genrand_real): replaced with genrand_res53 in mt19937ar-cok.
	  (rand_init): support bignum for longer seed.
	  (random_seed): generate longer seed.
	  (make_mask): new function.
	  (limited_rand): ditto.
	  (limited_big_rand): ditto.
	  (rb_f_rand): call limited_rand and limited_big_rand.
	  [ruby-dev:25403]

Tue Jan  4 23:25:29 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_rand): should return positive random number.
	  [ruby-dev:25401]

Tue Jan  4 11:15:29 2005  TAMURA Takashi  <sheepman@tcn.zaq.ne.jp>

	* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
	  random bignums.  [ruby-dev:25396]

Mon Jan  3 14:01:54 2005  Tanaka Akira  <akr@m17n.org>

	* random.c (random_seed): don't use /dev/urandom if it is not
	  character device.

Mon Jan  3 11:37:42 2005  Tanaka Akira  <akr@m17n.org>

	* random.c (random_seed): use /dev/urandom if available.
	  [ruby-dev:25392]

Mon Jan  3 07:46:42 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpauth/htpasswd.rb (WEBrick::Htpasswd#reload):
	  raise NotImplementedError if password is encrypted by digest
	  algorithms. This patch is contributed by sheepman. [ruby-list:40467]

	* lib/webrick/httpauth/digestauth.rb
	  (WEBrick::HTTPAuth::DigestAuth#_authenticate): fix digest calculation.
	  This patch is contributed by sheepman. [ruby-list:40482]

	* lib/webrick/{httpauth.rb,httpauth/basicauth.rb,httpproxy.rb}: use
	  pack/unpack-template char "m" instead of lib/base64.rb to do base64
	  encoding/decoding. fixed: [ruby-dev:25336]

	* test/webrick/test_httpauth.rb: new file.

Sat Jan  1 04:20:23 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ns_spki.c (ossl_spki_set_challenge): should call
	  StringValue before GetSPKI. fixed: [ruby-dev:25359].

Sat Jan  1 01:13:28 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_autoload): [ruby-dev:25373]

Fri Dec 31 14:10:43 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item): Fix problem
	  if heading contains formatting.

Thu Dec 30 00:41:42 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (svalue_to_avalue): [ruby-dev:25366]

	* string.c (rb_str_justify): [ruby-dev:25367]

Wed Dec 29 11:07:07 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/template/html/kilmer.rb: Update to use new
	  sections.

Tue Dec 28 22:31:46 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_justify): create buffer string after argument type
	  conversion.  fixed: [ruby-dev:25341]

Tue Dec 28 15:41:48 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c (reinit): should initialize all static
	  variables.  fixed: [ruby-list:40445]

Tue Dec 28 15:25:20 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): second byte is up to
	  0xfe.

	* ext/nkf/lib/kconv.rb (Kconv#kconv): should handle UTF8 and UTF16
	  properly.

Tue Dec 28 13:35:20 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/zlib/zlib.c (rb_deflate_s_deflate, rb_inflate_s_inflate): ensure
	  freeing internal zstreams.  fixed: [ruby-dev:25309]

	* ext/zlib/zlib.c (rb_deflate_init_copy): replace rb_deflate_clone.

Tue Dec 28 12:26:45 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub, win32/setup.mak (RDOCTARGET, install,
	  install-nodoc, install-doc): rdoc support for mswin32.

	* win32/configure.bat (--enable-install-doc, --disable-install-doc):
	  ditto.

Mon Dec 27 20:02:14 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fix SEGV bug when deleting Tk interp

	* ext/tk/lib/multi-tk.rb: ditto

Mon Dec 27 16:55:17 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509name.c (Init_ossl_x509name): should use
	  rb_hash_new to get exactly a Hash. fix [ruby-dev:25325].

Mon Dec 27 16:29:56 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_justify): [ruby-dev:25341]

Mon Dec 27 15:47:48 2004  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/fileasserts.rb: sync with HEAD.

	* test/fileutils/test_fileutils.rb: ditto.

	* test/fileutils/test_nowrite.rb: ditto.

Mon Dec 27 15:21:07 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mv): should raise error when moving a
	  directory to the (empty) directory. [ruby-talk:124368]
	  (backport from HEAD 1.48)

	* lib/fileutils.rb (mv): wrongly did not overwrite file on Win32
	  platforms. (backport from HEAD 1.48)

Sat Dec 25 11:11:48 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* stable version 1.8.2 released.

Sat Dec 25 04:23:49 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mkdir, mkdir_p): should ensure directory
	  permission. (backportted from HEAD, 1.47)

	* lib/fileutils.rb (traverse, remove_dir): untaint trasted
	  objects. (backportted from HEAD, 1.46)

Sat Dec 25 01:28:23 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c: cancel io_reopen() change on Dec. 24th.

	* dln.c: use <dlfcn.h> for NetBSD.  [ruby-dev:25313]

	* io.c (rb_f_select): IO list could be altered.  [ruby-dev:25312]

Fri Dec 24 23:51:48 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: bcc32 should use RTL dll (backport from HEAD)
	  [ruby-dev:25306]

	* win32/win32.[ch]: ditto.

Fri Dec 24 23:27:18 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/image.rb: TkPhotoImage#cget bug fix

Fri Dec 24 18:39:25 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.[ch]: failed to compile on bcc32 (and probably wince)
	  [ruby-dev:25306]

Fri Dec 24 02:52:52 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_reopen, rb_io_reopen): prohibit to change access mode for
	  special IO ports.  [ruby-dev:25225]

Fri Dec 24 02:22:53 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/syck/rubyext.c (rb_syck_io_str_read): [ruby-core:03973]

	* ext/syck/rubyext.c (syck_loader_transfer): check type conversion.

	* ext/syck/rubyext.c (syck_parser_assign_io, rb_new_syck_node): duck
	  typing.

	* ext/syck/rubyext.c (syck_parser_s_alloc, syck_parser_initialize):
	  allocation framework.

	* ext/syck/rubyext.c (syck_emitter_s_alloc, syck_emitter_initialize):
	  ditto.

Fri Dec 24 01:21:00 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkextlib/blt.rb: add BLT extension support

	* ext/tk/lib/tkextlib/blt/*.rb: ditto

	* ext/tk/lib/tkextlib/blt/tile/*.rb: ditto

Thu Dec 23 23:36:28 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (proc_setgroups): check if the argument lenght is
	  modified.  fixed: [ruby-dev:25285]

Thu Dec 23 13:13:33 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: define TclTkLib::COMPILE_INFO and
	  RELEASE_DATE

	* ext/tcltklib/extconf.rb: ditto

	* ext/tk/tkutil.c: define TkUtil::RELEASE_DATE

	* ext/tk/lib/tk.rb: define Tk::RELEASE_DATE

Thu Dec 23 09:38:31 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_reopen): restore exact mode.  fixed: [ruby-core:04003]

Thu Dec 23 00:16:32 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (bsdi): use $(CC) for LDSHARED.  fixed [ruby-dev:25270]

Wed Dec 22 11:14:55 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR.
	  fixed: [ruby-dev:25273]

Wed Dec 22 08:34:32 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/dl/sym.c (rb_dlsym_initialize): extract internal pointers after
	  all argument conversion.  fixed: [ruby-dev:25271]

Wed Dec 22 00:08:01 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/*, test/soap/*, sample/soap/authheader/*: eval cleanup.

Tue Dec 21 22:07:33 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
	  ossl_asn1_decode_all): temporary value should be marked volatile.

Tue Dec 21 14:40:02 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
	  ossl_asn1_decode_all): use rb_str_new4 to avoid SEGV.
	  fix [ruby-dev:25261]

	* test/openssl/test_asn1.rb: add tests for OpenSSL::ASN1.

Tue Dec 21 12:22:40 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_reopen): keep duplex pipe in correct mode for exception
	  safeness.  fixed: [ruby-dev:25152]

Tue Dec 21 12:10:04 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/grid.rb: rescue bug of 'grid configure' on Tcl/Tk8.3-

Tue Dec 21 00:53:01 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_traverse): [ruby-dev:25261]

	* ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto.

	* ext/openssl/ossl_asn1.c (ossl_asn1_decode_all): ditto.

Mon Dec 20 23:22:26 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* added files:
	  * lib/soap/mapping/wsdl*.rb
	  * lib/wsdl/soap/element.rb
	  * lib/wsdl/xmlSchema/simpleContent.rb

	* modified files:
	  * lib/soap/*
	  * lib/wsdl/*
	  * lib/xsd/*
	  * test/soap/*
	  * test/wsdl/*
	  * test/xsd/*
	  * sample/soap/*
	  * sample/sdl/*

	* summary
	  * imported from the soap4r repository.  Version: 1.5.3-ruby1.8.2

	  * added several XSD basetype support: nonPositiveInteger,
	    negativeInteger, nonNegativeInteger, unsignedLong, unsignedInt,
	    unsignedShort, unsignedByte, positiveInteger

	  * HTTP client connection/send/receive timeout support.

	  * HTTP client/server gzipped content encoding support.

	  * improved WSDL schema definition support; still is far from
	    complete, but is making step by step improovement.

Mon Dec 20 22:56:39 2004  Tanaka Akira  <akr@m17n.org>

	* gc.c (stack_end_address): gcc noinline attribute is available since
	  gcc-3.1.

Mon Dec 20 14:07:02 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: supports new features of Tcl/Tk8.5a2

	* ext/tk/lib/tk/clock.rb: ditto

	* ext/tk/lib/tk/text.rb: ditto

	* ext/tk/lib/tk/panedwindow.rb: ditto

Mon Dec 20 12:47:13 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/net/https.rb,protocols.rb,telnets.rb: delete
	  doc and code about SSLContext#{key_file,cert_file}.
	  fixed: [ruby-dev:25243]

Mon Dec 20 12:42:17 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (io_fwrite): workaround for MSVCRT's bug.
	  fixed: [ruby-core:03982]

Mon Dec 20 11:21:04 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_eof): check if closed before clearerr().
	  fixed: [ruby-dev:25251]

Mon Dec 20 03:30:40 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session#initialize): empty session id was
	  used if request had no session key.  fixed: [ruby-core:03981]

Mon Dec 20 01:51:01 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (make_struct): [ruby-dev:25249]

Mon Dec 20 00:28:20 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rexml/encodings/SHIFT-JIS.rb: backported from CVS HEAD.

	* lib/rexml/encodings/SHIFT_JIS.rb: ditto.

Sun Dec 19 17:19:48 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509store.c
	  (ossl_x509store_set_time): add OpenSSL::X509::Store#time=.
	  (ossl_x509stctx_set_time): add OpenSSL::X509::StoreContext#time=.

	* test/openssl/ossl_x509store.rb: test certificate validity times.

	* ext/openssl/ossl_x509name.c (ossl_x509name_to_s): add optional
	  second argument to specify the output format (see also
	  X509_NAME_print_ex).

	* ext/openssl/ossl_x509name.c (ossl_x509name_init): new constants:
	  OpenSSL::X509::Name::COMPAT, OpenSSL::X509::Name::RFC2253,
	  OpenSSL::X509::ONELINE, OpenSSL::X509::MULTILINE.

	* ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name::RFC2253DN):
	  new module to provide the parse for RFC2253 DN format.

	* ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name.parse_rfc2253):
	  new method to parse RFC2253 DN format.

	* test/openssl/ossl_x509name.rb: add tests about RFC2253 DN.

	* text/openssl/ssl_server.rb: try to listen ports from 20443 to 20542
	  while EADDRINUSE is raised.

	* all changes in this entry are backport from 1.9.

Sun Dec 19 17:24:59 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (enable_rpath): use rpath flag to embed the library
	  path into extensions on ELF environment.  [ruby-dev:25035]

Sun Dec 19 11:01:25 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit.rb: use standalone runner for -e.

	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner#options): accept
	  multiple -p and -x options.

	* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#recursive_collect):
	  ditto.

Sat Dec 18 16:36:23 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/zlib/zlib.c (rb_deflate_s_deflate, rb_inflate_s_inflate):
	  disallow interrupt by type conversion.  fixed: [ruby-dev:25226]

Sat Dec 18 15:16:41 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/webrick/httpauth.rb,
	  lib/webrick/httpauth/{basicauth.rb,digestauth.rb}: use
	  pack/unpack-template char "m" instead of lib/base64.rb to do base64
	  encoding/decoding.

Sat Dec 18 10:51:01 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

Fri Dec 17 18:07:01 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* test/readline/test_readline.rb: fix for BSD. Thanks, GOTOU Yuuzou.
	  fixed: [ruby-dev:25218]

Fri Dec 17 16:28:12 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: fix bug on setting up system encoding

	* ext/tk/lib/tk/event.rb: fix error on require process

	* ext/tk/lib/tk/font.rb: fix abnormal termination error on Windows

	* ext/tk/lib/tk/virtevent.rb: TkVirtualEvent::PreDefVirtEvent.new()
	  accepts event-sequence arguments

	* ext/tk/lib/tk/text.rb: fail to dump embedded images

	* ext/tk/lib/tk/text.rb: tag_nextrange and tag_prevrange returns wrong
	  types of values

	* ext/tk/lib/tk/texttag.rb: nextrange and prevrange returns wrong
	  types of values

	* ext/tk/lib/tk/text.rb: add TkText::IndexModMethods module and
	  TkText::IndexString class to treat text index modifiers

	* ext/tk/lib/tk/texttag.rb: use TkText::IndexModMethods module

	* ext/tk/lib/tk/textmark.rb: ditto

	* ext/tk/lib/tk/textimage.rb: ditto

	* ext/tk/lib/tk/textwindow.rb: ditto

	* ext/tk/lib/tk/textimage.rb: wrong gravity of text mark for embedded
	  image

	* ext/tk/lib/tk/textwindow.rb: wrong gravity of text mark for
	  embedded window

Fri Dec 17 13:50:00 2004  Akiyoshi, Masamichi  <akiyoshi@hp.com>

	* vms/vmsruby_private.c, vms/vmsruby_private.h: private routines
	  for VMS port are added.

	* eval.c (ruby_init): change to call VMS private intialization routine.

Fri Dec 17 13:33:58 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session#initialize): control adding
	  session_id hidden fields.  fixed: [ruby-talk:123850]

Thu Dec 16 23:25:25 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb, lib/drb/ssl.rb: backported from CVS HEAD.
	  [druby-ja:101]

	* test/drb/test_drb.rb: adjust and reduce sleep (backported from
	  CVS HEAD.)

Thu Dec 16 18:44:58 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should wait
	  for reading request till data arrive. [ruby-talk:121068]

	* lib/webrick/server.rb (WEBrick::GenericServer#start_thread):
	  should log about all accepted socket. [ruby-core:03962]

	* lib/webrick/accesslog.rb (WEBrick::AccessLog#setup_params):
	  "%%" and "%u" are supported. [webricken:135]

	* lib/webrick/httpservlet/filehandler.rb
	  (WEBrick::HTTPServlet::FileHandler#check_filename):
	  :NondisclosureName is acceptable if it is Enumerable.

	* lib/webrick/config.rb (WEBrick::Config::FileHandler):
	  default value of :NondisclosureName is [".ht*", "*~"].

Thu Dec 16 18:36:52 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.c (ossl_raise): refine message format.

Thu Dec 16 16:29:44 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/demos-en/widget: modify version check for
	  supporting features

Thu Dec 16 16:03:50 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/bindtag.rb: bug fix [ruby-talk: 123667]

	* ext/tk/lib/tk/timer.rb: accept :idle for the interval argument

	* ext/tk/lib/tk.rb: add TkComm._callback_entry?()

	* ext/tk/lib/multi-tk.rb: add MultiTkIp.cb_entry_class

	* ext/tk/lib/tk/canvas.rb: use TkComm._callback_entry?()

	* ext/tk/lib/tk/canvastag.rb: ditto

	* ext/tk/lib/tk/dialog.rb: ditto

	* ext/tk/lib/tk/optiondb.rb: ditto

	* ext/tk/lib/tk/text.rb: ditto

	* ext/tk/lib/tk/texttag.rb: ditto

	* ext/tk/lib/tk/textwindow.rb: ditto

	* ext/tk/lib/tk/timer.rb: ditto

	* ext/tk/lib/tk/validation.rb: ditto

	* ext/tk/lib/tkextlib/*: ditto

Thu Dec 16 03:14:28 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb (basic_encode): return value of pack('m') may
	  include multiple CR/LFs.  Backported from main trunk (rev 1.112).
	  [ruby-dev:25212]

Thu Dec 16 00:33:37 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* hash.c (Init_Hash): remove custom "hash" and "eql?".

Wed Dec 15 18:57:01 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/set.rb (Set::eql): wrong definition.  [ruby-dev:25207]

Wed Dec 15 18:48:42 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/curses/curses.c (window_subwin): call NUM2INT() before
	  GetWINDOW(). (backported from CVS HEAD)

Wed Dec 15 17:03:50 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.[ch] (rb_w32_isatty): new function to replace MSVCRT's
	  isatty because it never sets errno. (backported from CVS HEAD)

Wed Dec 15 15:39:32 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509name.c (ossl_x509name_to_a): avoid SEGV
	  (rollback the previous commit).

Wed Dec 15 16:10:23 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (rb_obj_id_obsolete): warn always.

	* eval.c (rb_enable_super): ditto.

Wed Dec 15 15:31:02 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/set.rb (Set#==): [ruby-dev:25206]

Wed Dec 15 14:22:10 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_fdisset): check whether the handle is valid.
	  fixed: [ruby-core:03959]

Wed Dec 15 10:30:37 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198]

Tue Dec 14 17:10:09 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_close): need to reset osfhnd().

Tue Dec 14 14:03:57 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.c (ossl_raise): avoid buffer overrun.
	  [ruby-dev:25187]

Tue Dec 14 12:36:04 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session::initialize): generate new
	  session if given session_id does not exist.  [ruby-list:40368]

Mon Dec 13 18:13:52 2004  Tanaka Akira  <akr@m17n.org>

	* gc.c (stack_end_address): new function to obtain stack end address.
	  stack_end_address calls __builtin_frame_address(0) to obtain the
	  frame pointer of a stack frame of stack_end_address.  The address
	  is the stack pointer of the caller's stack frame.
	  (SET_STACK_END): use stack_end_address.
	  This makes the conservative garbage collector to scan a stack frame
	  of the garbage_collect function itself.  This is required because
	  callee-save registers may be stored in the frame.
	  [ruby-dev:25158]

Mon Dec 13 00:58:02 2004  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (cleanpath_aggressive): make it private.
	  (cleanpath_conservative): ditto.
	  Suggested by Daniel Berger.  [ruby-core:3914]

Sun Dec 12 20:06:38 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: backported from CVS HEAD.

Sun Dec 12 10:35:10 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/template/html/html.rb (RDoc::Page): Don't
	  show an accessor's r/w flag if none was specified

Sun Dec 12 10:14:03 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/rdoc.rb (RDoc::RDoc::parse_files): Never exclude files
	  explicitly given on the command line.

Sun Dec 11 23:54:07 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/*: update to support libraries in ActiveTcl8.4.12.0
	  (see ext/tk/ChangeLog.tkextlib).

	* ext/tk/sample/scrollframe.rb: add a new sample.

Sat Dec 11 20:12:21 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: add DRbRemoteError. [ruby-list:40348],
	  [ruby-list:40390]

	* test/drb/drbtest.rb: ditto.

	* test/drb/ut_drb.rb: ditto.

Sat Dec 11 15:38:14 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/jcode.rb (String::succ): [ruby-dev:25156]

Sat Dec 11 12:41:55 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (run_trap_eval): prototype; avoid VC++ warnings.

	* ext/socket/getaddrinfo.c: fix typo. fixed: [ruby-core:03947]

	* win32/win32.c: need to include dln.h.

Sat Dec 11 00:10:18 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_reopen): [ruby-dev:25150]

Fri Dec 10 08:39:27 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (sock_listen): get OpenFile just before calling
	  listen(2).  fixed: [ruby-dev:25149]

Thu Dec  9 17:00:00 2004  Akiyoshi, Masamichi  <akiyoshi@hp.com>

	* ext/socket/socket.c, ext/socket/getaddrinfo.c: port to VMS

Thu Dec  9 16:31:02 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/sdbm/init.c (GetDBM): typo.

Thu Dec  9 16:05:00 2004  Akiyoshi, Masamichi  <akiyoshi@hp.com>

	* defines.h: change path of vms.h
	* vms/vms.h: delete reference for snprintf()
	* vms/config.h: new file
	* vms/config.h_in: deleted

Thu Dec  9 14:38:35 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_inspect): escape # which starts an expression
	  substitution.  fixed: [ruby-core:03922]

	* string.c (rb_str_dump): not escape # which isn't a substitution.

Thu Dec  9 10:54:36 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/dbm/dbm.c (fdbm_select): [ruby-dev:25132]

	* ext/sdbm/init.c: ditto.

	* ext/gdbm/gdbm.c: ditto.

Thu Dec  9 03:08:36 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_init): set root-win title to "ruby" when
	  the running script is '-e one-liner' or '-' (stdin).

	* ext/tcltklib/extconf.rb: add find_library("#{lib}#{ver}",..) for
	  stub libs

	* ext/tk/lib/tk/textmark.rb: TkTextMarkCurrent and TkTextMarkAnchor
	  have a wrong parent class.

	* ext/tk/lib/tk/dialog.rb: rename TkDialog2 --> TkDialogObj and
	  TkWarning2 --> TkWarningObj (old names are changed to alias names)

	* ext/tk/lib/tk/dialog.rb: bug fix of treatment of 'prev_command'
	  option and hashes for configuration

	* ext/tk/lib/tk/dialog.rb: add TkDialogObj#name to return the
	  button name

	* ext/tk/lib/tk/radiobutton.rb: rename enbugged method value() ==>
	  get_value() and value=(val) ==> set_value(val).

	* ext/tk/lib/tk/menu.rb: add TkMenu.new_menuspec

	* ext/tk/lib/tk/menu.rb: add alias (TkMenuButton = TkMenubutton,
	  TkOptionMenuButton = TkOptionMenubutton)

	* ext/tk/lib/tk/event.rb: new method aliases (same as option keys of
	  event_generate) for Event object

	* ext/tk/lib/tk/font.rb: configinfo returns proper types of values

	* ext/tk/lib/tk.rb: bind methods accept subst_args + block

	* ext/tk/lib/tk/canvas.rb: ditto

	* ext/tk/lib/tk/canvastag.rb: ditto

	* ext/tk/lib/tk/frame.rb: ditto

	* ext/tk/lib/tk/text.rb: ditto

	* ext/tk/lib/tk/texttag.rb: ditto

	* ext/tk/lib/tk/toplevel.rb: ditto

	* ext/tk/lib/tkextlib/*: ditto and bug fix

Wed Dec  8 23:54:29 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/template/html/html.rb (RDoc::Page): Typo
	  meant that h2 tag was invisible.

Wed Dec  8 21:56:31 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss, test/rss, sample/rss: backported from CVS HEAD.

Wed Dec  8 14:31:36 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_fwrite): change dereference for cosmetic reason.

	* sprintf.c (rb_f_sprintf): [ruby-dev:25104]

Tue Dec  7 19:08:00 2004  Akiyoshi, Masamichi  <akiyoshi@hp.com>

	* io.c (io_fwrite): fix offset incrementation (for VMS and Human68k)

Tue Dec  7 00:27:37 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (proc_setgroups): [ruby-dev:25081]

Mon Dec  6 18:08:10 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* re.c (rb_reg_eqq): document fix.  [ruby-talk:122541]

Mon Dec  6 17:19:13 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* rubysig.h (TRAP_BEG, TRAP_END): safe errno around CHECK_INTS.
	  (backported from CVS HEAD)  [ruby-dev:24993]

Mon Dec  6 10:18:17 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::look_for_directives_in):
	  Oops - 1.8 doesn't have String#clear

Mon Dec  6 09:59:23 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (sock_connect): use rb_str_new4().
	  [ruby-dev:25052]

Mon Dec  6 01:42:08 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt,
	  ossl_rsa_public_decrypt, ossl_rsa_private_encrypt,
	  ossl_rsa_private_decrypt): should take an optional argument
	  to specify padding mode. [ruby-talk:122539]

	* ext/openssl/ossl_pkey_rsa.c (Init_ossl_rsa): add new constants
	  PKCS1_PADDING, SSLV23_PADDING, NO_PADDING and PKCS1_OAEP_PADDING
	  under OpenSSL::PKey::RSA.

	* test/openssl/test_pkey_rsa.rb: new file.

Sun Dec  5 19:39:17 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Completion#complete): new parameter
	  to direct case insensitiveness.

	* lib/optparse.rb (OptionParser#order!): ignore case only for long
	  option.  [ruby-dev:25048]

Sat Dec  4 22:54:15 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_write): remove rb_str_locktmp().  [ruby-dev:25050]

	* io.c (io_fwrite): takes VALUE string as an argument.
	  [ruby-dev:25050]

	* ext/socket/socket.c (sock_connect): remove rb_str_locktmp().
	  [ruby-dev:25050]

	* ext/socket/socket.c (udp_connect): [ruby-dev:25045]

	* ext/socket/socket.c (udp_bind): ditto.

	* ext/socket/socket.c (udp_send): ditto.

	* ext/socket/socket.c (bsock_send): ditto.

	* ext/socket/socket.c (s_recvfrom): ditto.

	* hash.c (rb_hash_hash): should provide "hash" method where "eql?"
	  is redefined.  [ruby-talk:122482]

Sat Dec  4 14:54:52 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* eval.c (proc_invoke): use volatile `tmp' rather than `args'.
	  [ruby-core:03882]

Sat Dec  4 14:28:56 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/code_objects.rb (RDoc::Context::Section::set_comment):
	  Section comments may now be bracketed by lines which are
	  ignored. You can now write
	      # -----------
	      # :section: Dave's Section
	      # comment material
	      # -----------
	   The lines before :section: are removed, and identical lines at the end are
	   also removed if present.

Sat Dec  4 03:33:45 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/readline/readline.c: check $SAFE. (backported from CVS HEAD)

	* test/readline/test_readline.rb: added tests for readline.
	  (backported from CVS HEAD)

Sat Dec  4 02:24:00 2004  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf.c: add constant NKF::VERSION

	* ext/nkf/nkf.c(guess): this becomes an alias of guess2

	* ext/nkf/test.rb(mime_out2): add --no-cp932

	* ext/nkf/nkf-utf8/nkf.c: original nkf2 revision 1.47

Sat Dec  4 00:35:08 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039]

Fri Dec  3 18:57:03 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/ostruct.rb: 1.9 marshaling support back-ported.
	  [ruby-core:03871]

Fri Dec  3 13:45:20 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_invoke): copy arguments to frame.argv.
	  [ruby-core:03861]

Fri Dec  3 12:25:41 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* st.h: fix prototypes.

Fri Dec  3 00:21:05 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (convert_type): use rb_respond_to() again.
	  [ruby-dev:25021]

	* eval.c (rb_respond_to): funcall respond_to? if it's redefined.
	  [ruby-dev:25021]

Fri Dec  3 01:55:24 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: widget configuration by TkWindow#method_missing
	  returns proper object. "widget.option = val" returns val, and
	  "widget.option(val)" returns self.

	* ext/tk/lib/tk/font.rb: TkFont#replace accepts only one font argument.

	* ext/tk/lib/tk/radiobutton.rb: add TkRadiobutton#value and
	  TkRadiobutton#value=(val).

	* ext/tk/lib/tk/spinbox.rb: callback substitution support on
	  command option.

	* ext/tk/sample/demos-en/widget: bug fix (wrong image height)

	* ext/tk/sample/demos-jp/widget: ditto.

Fri Dec  3 00:11:48 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_file_initialize): [ruby-dev:25032]

Thu Dec  2 16:41:03 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_protect): prevent continuations created inside from being
	  called from the outside.  [ruby-dev:25003]

	* eval.c (rb_callcc, rb_cont_call): prohibit calling from different
	  signal contexts.  [ruby-dev:25022]

Thu Dec  2 09:57:24 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/ostruct.rb (OpenStruct::Marshaler): OpenStruct can be
	  marshaled again.  [ruby-core:03862]

Thu Dec  2 09:30:06 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (thread_mark): mark thread group.  [ruby-dev:25020]

	* eval.c (thgroup_add): check whether the argument is really a Thread.

Thu Dec  2 07:57:16 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_ctl): [ruby-dev:25019]

Wed Dec  1 02:21:02 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* signal.c (sighandler): call handler immediately only for default
	  handlers.  [ruby-dev:25003]

Tue Nov 30 23:38:18 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (io_fread): need not to null terminate.  [ruby-dev:24998]

	* io.c (read_all): remove unnecessary rb_str_resize().
	  [ruby-dev:24996]  (backported from CVS HEAD)

	* io.c (io_readpartial): ditto.

	* io.c (io_read): ditto.

Tue Nov 30 16:18:50 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_fread): need not to null terminate.  [ruby-dev:24998]

	* io.c (read_all): remove unnecessary rb_str_resize().
	  [ruby-dev:24996]

	* io.c (io_read): ditto.

Tue Nov 30 00:49:08 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_sysread): use temporary lock.  [ruby-dev:24992]

Mon Nov 29 16:06:04 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_write): insufficiently filled string
	  being extended when overwriting.  [ruby-core:03836]

Mon Nov 29 15:59:05 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/ostruct.rb (OpenStruct::method_missing): check method
	  duplication for -d.

	* lib/ostruct.rb (OpenStruct::initialize): ditto.

Mon Nov 29 15:22:28 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/io/nonblock/test_flush.rb: abandon tests when io/nonblock is
	  not supported.

Mon Nov 29 03:08:30 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (convert_type): direct call conversion methods for the
	  performance.  [ruby-core:03845]

	* eval.c (rb_funcall_rescue): new function.

	* object.c (rb_Array): avoid using rb_respond_to().

	* object.c (rb_Integer): ditto.

	* parse.y (reduce_nodes): empty body should return nil.

	* string.c (rb_str_aset): the original string should not be
	  affected by modifying duplicated string.  [ruby-dev:24981]

Mon Nov 29 13:57:38 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (CreateChild): search executable file if no program
	  name given. (backported from CVS HEAD)

Mon Nov 29 13:37:54 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (fptr_finalize): must not use FILE after fclose().
	  [ruby-dev:24985]

Mon Nov 29 13:16:31 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (CreateChild): push back the last space before next
	  loop because CharNext() eats it.

Mon Nov 29 01:18:18 2004  Tanaka Akira  <akr@m17n.org>

	* io.c (rb_io_check_writable): call io_seek regardless of
	  NEED_IO_SEEK_BETWEEN_RW.  [ruby-dev:24986]

Sat Nov 27 21:43:39 2004  Tanaka Akira  <akr@m17n.org>

	* io.c: avoid data lost with nonblocking fd and
	  stdio buffering in sync mode.  [ruby-dev:24966]
	  based on matz's patch [ruby-dev:24967]
	  (io_fwrite): new primitive writing function which writes
	  directly if sync mode.
	  (rb_io_fwrite): wrapper for io_fwrite now.
	  (io_write): call io_fwrite instead of rb_io_fwrite.

Sat Nov 27 14:44:15 2004  Kent Sibilev  <ksibilev@bellsouth.net>

	* lib/cgi/session.rb (CGI::Session::initialize): create_new_id is
	  now a instance method.  [ruby-core:03832]

Sat Nov 27 09:41:21 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_fread): old rb_io_fread with file closing checking.
	  (rb_io_fread): wrapper for io_fread now.
	  [ruby-dev:24964]

Fri Nov 26 18:02:44 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: Tk.destroy uses TkWindow#epath

	* ext/tk/lib/tk/image.rb: bug fix

	* ext/tk/lib/tk/wm.rb: add 'iconphoto' method(Windows only)

	* ext/tk/lib/tkextlib/*: some methods uses TkWindow#epath

Fri Nov 26 13:49:06 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (method_missing): raise TypeError for classes do not
	  have allocators.  [ruby-core:03752]

	* lib/erb.rb: add RDoc by James Edward Gray II.  [ruby-core:03786]

Fri Nov 26 13:29:02 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::look_for_directives_in): Break
	  out of preprocessing when we find a :section: directive (previously cleared out the
	  comment, but this apparently now generates an error in gsub!)

Fri Nov 26 00:17:40 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_read): move StringValue() check before GetOpenFile().
	  [ruby-dev:24959]

Thu Nov 25 20:14:57 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/thwait.rb (ThreadsWait#join_nowait): abnormally terminated
	  threads should be also processed.  [ruby-talk:121320]

Thu Nov 25 10:14:26 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (push_braces): do not reuse buffer strings.  [ruby-core:03806]

Thu Nov 25 07:59:41 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (read_all): stringify non-nil buffer argument, and always
	  taint the result.  [ruby-dev:24955]

Wed Nov 24 01:01:31 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_read): integer conversion should be prior to
	  GetOpenFile().  [ruby-dev:24952]

	* configure.in, io.c: cancel [ ruby-Patches-1074 ].

Tue Nov 23 08:09:50 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/menu.rb: improve usability of TkOptionMenubutton

Tue Nov 23 02:00:21 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* file.c (rb_file_chown): integer conversion should be prior to
	  GetOpenFile().  [ruby-dev:24949]

Tue Nov 23 00:10:48 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* file.c (rb_file_chown): integer conversion should be prior to
	  GetOpenFile().  [ruby-dev:24947]

	* file.c (rb_file_truncate): ditto.

	* file.c (rb_file_s_truncate): ditto.

	* dir.c (dir_seek): use NUM2OFFT().

	* misc/ruby-mode.el (ruby-non-block-do-re): should not match words
	  start with block keyword and underscore.  [ruby-core:03719]

Mon Nov 22 22:33:02 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::parse_require): Don't use names
	  of variables or constants when oarsing 'require'

Mon Nov 22 00:13:35 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (dir_seek): should retrieve dir_data after NUM2INT().
	  [ruby-dev:24941]

Sat Nov 20 23:57:33 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/README (et al): Add a new directive, :section:, and
	  change the output format to accomodate. :section: allows to to
	  group together methods, attributes, constants, etc under
	  headings in the output. If used, a table of contents is
	  generated.

Sat Nov 20 23:56:54 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/options.rb (Options::parse): Force --inline-source if
	  --one-file option given

Sat Nov 20 23:55:19 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_splice): should place index wrapping after
	  possible modification.  [ruby-dev:24940]

Sat Nov 20 13:26:03 2004  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/utf8tbl.c: original revision 1.7

Sat Nov 20 05:34:24 2004  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf/nkf-utf8/nkf.c: original nkf.c rev:1.40

	* ext/nkf/test.rb: add test for mime encode/decode

Sat Nov 20 01:37:34 2004  Johan Holmberg  <holmberg@iar.se>

	* eval.c (error_print): nicer traceback at interrupt.
	  [ruby-core:03774]

Sat Nov 20 00:07:16 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_gsub): internal buffer should not be listed by
	  ObjectSpace.each_object() by String#gsub.  [ruby-dev:24931]

Fri Nov 19 01:20:22 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise
	  exception if data corresponding to session specified from the
	  client does not exist.

Fri Nov 19 00:59:31 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_gsub): internal buffer should not be listed by
	  ObjectSpace.each_object().  [ruby-dev:24919]

Thu Nov 18 18:41:08 2004  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* test/ruby/test_stringchar.rb (test_bang): added.

	* string.c (rb_str_upcase_bang, rb_str_capitalize_bang)
	  (rb_str_swapcase_bang): missing rb_str_modify().  [ruby-dev:24915]

Thu Nov 18 00:21:15 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (proc_getpgrp): prohibit for $SAFE=2.
	  [ruby-dev:24899]

	* process.c (get_pid): ditto.  [ruby-dev:24904]

	* process.c (get_ppid): ditto.

	* array.c (rb_ary_delete): defer rb_ary_modify() until actual
	  modification.  [ruby-dev:24901]

Thu Nov 18 10:10:14 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c, rubyio.h (rb_io_modenum_flags): exported.

	* ext/stringio/stringio.c (strio_initialize): allow Fixnum as mode as
	  well as IO.new does.  [ruby-dev:24896]

Wed Nov 17 23:42:40 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_settracefunc.rb: added.  [ruby-dev:24884]

Wed Nov 17 13:56:57 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (newline_node): should not use FL_SET. [ruby-dev:24874]

	* parse.y (string_content): should not use FL_UNSET.

	* node.h (NODE_NEWLINE): remove unused bit to utilize flag field
	  in nodes.

Wed Nov 17 13:09:40 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32,wince}/Makefile.sub (test): should build ruby.exe
	  before running test. [ruby-core:03756]

Wed Nov 17 04:33:01 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* pack.c: all features are backport from 1.9. [ruby-dev:24826]

	* bignum.c (rb_big2ulong_pack): new function to pack Bignums.

Wed Nov 17 03:42:45 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_splice): move rb_str_modify() after
	  StringValue(), which may alter the receiver.  [ruby-dev:24878]

Tue Nov 16 23:45:07 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (flo_divmod): protect float values from GC by
	  assignment to local variables.  [ruby-dev:24873]

Tue Nov 16 16:30:21 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32,wince}/setup.mak (-epilogue-): remove config.h and
	  config.status to force updating them.

Tue Nov 16 16:20:45 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): position was ignored when a
	  buffer was passed.  http://www.yo.rim.or.jp/~nov/d/?date=20041116#p03

Tue Nov 16 11:19:07 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::options): use
	  Regexp conversion.

Tue Nov 16 01:41:31 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_mod_check): frozen check should be separated.
	  [ruby-core:3742]

	* array.c (rb_ary_update): pedantic check to detect
	  rb_ary_to_ary() to modify the receiver.  [ruby-dev:24861]

Mon Nov 15 13:50:52 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_justify): typo fixed.  [ruby-dev:24851]

Mon Nov 15 11:50:32 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-special-char-p, ruby-parse-partial): handle
	  operator symbols.  [ruby-talk:120177]

Sun Nov 14 13:27:03 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/pp.rb (PP#object_address_group): remove odd number of 'f'
	  prefixed to negative address.

Sun Nov 14 08:51:04 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/logger/test_logger.rb: Logger just expects
	  Logger#datetime_format to be used for Time#strftime independently of
	  locale. [ruby-dev:24828]

Fri Nov 12 15:03:26 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (ruby_options): now we cannot call rb_glob() before
	  ruby_init(), so call rb_w32_cmdvector() at ruby_options().

	* win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and
	  export it.

Fri Nov 12 14:08:01 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/event.rb: remove $LOADED_FEATURES trick

	* ext/tk/lib/tk.rb: ditto

Fri Nov 12 00:31:05 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/gdbm/gdbm.c (fgdbm_store): StringValue() may alter string
	  pointer.  [ruby-dev:24783]

Thu Nov 11 17:36:12 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (rb_globi): also should call back via rb_glob_caller().
	  [ruby-dev:24775]

Thu Nov 11 16:47:21 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_file.rb (test_truncate_wbuf): we want to test
	  only File#truncate, not behaviour of seek(2).

Thu Nov 11 09:41:01 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (push_braces): was confusing VALUE and char*.

	* dir.c (rb_push_glob): Dir.glob should have called its block.

Thu Nov 11 01:52:52 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (syserr_initialize): use stringified object.
	  [ruby-dev:24768]

Wed Nov 10 22:49:01 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/delegate.rb (SimpleDelegator::dup): wrong number of
	  arguments.

	* lib/delegate.rb (DelegateClass::dup): ditto.

Wed Nov 10 12:31:21 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* README.EXT (Example): extconf.rb is indispensable now.

Wed Nov 10 03:33:36 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fix SEGV when compiled with Tcl/Tk8.3.x
	  or older

	* ext/tk/lib/tkextlib/tile/style.rb: bug fix

Tue Nov  9 14:27:18 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Officious): moved from DefaultList.

Tue Nov  9 01:05:04 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (rb_glob2): do not allocate buffer from heap to avoid
	  memory leaks.  use string object for buffering instead.
	  [ruby-dev:24738]

	* dir.c (join_path): ditto.

	* io.c (io_read): external input buffer may be modified even after
	  rb_str_locktmp().  [ruby-dev:24735]

	* dir.c (fnmatch): p or s may be NULL.  [ruby-dev:24749]

Tue Nov  9 00:53:53 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* regex.c (slow_match): avoid GCC 3.4.x warnings.

Tue Nov  9 00:50:06 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/rdoc.rb: Change version numbering of RDoc and ri

Mon Nov  8 23:38:35 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/extservm.rb: add DRb::ExtServManager#uri=.
	  [ruby-dev:24743]

Mon Nov  8 22:20:19 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class):
	  Fix bug where parent class wasn't being detected if the
	  child class was defined using the A::B notation.

Mon Nov  8 00:14:13 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: add setup for mignw32 cross compiling.
	  [ruby-talk:119413]

Sun Nov  7 23:49:26 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: bind-event methods accept multi substitution
	  arguments.

	* ext/tk/lib/tk/canvas.rb: ditto.

	* ext/tk/lib/tk/canvastag.rb: ditto.

	* ext/tk/lib/tk/text.rb: ditto.

	* ext/tk/lib/tk/texttag.rb: ditto.

	* ext/tk/lib/tkextlib: ditto.

Sat Nov  6 14:58:44 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/server.rb (WEBrick::HTTPServer#start): remove
	  :DoNotReverseLookup option. (Socket#do_not_reverse_lookup is a
	  ruby 1.9 feature)

Sat Nov  6 11:31:04 2004  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb (_parse): checks whether zone was given.

Sat Nov  6 00:46:27 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_locktmp): check STR_TMPLOCK flag before
	  locking.  [ruby-dev:24727]

Fri Nov  5 18:12:42 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/scrollable.rb: divide Scrollable module into
	  X_Scrollable and Y_Scrollable

	* ext/tk/lib/tk/entry.rb: include X_Scrollable instead of Scrollable

	* ext/tk/lib/tk/autoload.rb: define autoload for X_Scrollable and
	  Y_Scrollable

Fri Nov  5 16:05:32 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: TkComm._at() supprts both of "@x,y" and "@x"

Fri Nov  5 13:22:58 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/text.rb: sorry. bug fix again.

Fri Nov  5 13:17:54 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/text.rb: bug fix

Fri Nov  5 08:52:48 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (gc_mark): stricter GC stack check.

Fri Nov  5 08:52:48 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (gc_mark): stricter GC stack check.

Fri Nov  5 08:34:43 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_gsub): should have removed rb_str_unlocktmp(str).
	  [ruby-dev:24708]

Thu Nov  4 21:25:38 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_gsub): string modify check no longer based on
	  tmplock.  [ruby-dev:24706]

Thu Nov  4 19:27:46 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* io.c (rb_f_open): fix typo.

Thu Nov  4 15:02:14 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/variable.rb: forget to initialize instance_variables
	  of TkVarAccess objects

Thu Nov  4 09:11:35 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (gc_mark): enable GC stack checking.

Thu Nov  4 03:11:33 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_gsub): lock strings temporarily.  [ruby-dev:24687]

	* ext/socket/socket.c (s_recvfrom): tmplock input buffer.
	  [ruby-dev:24705]

Wed Nov  3 22:32:12 2004  NARUSE, Yui  <naruse@ruby-lang.org>

	* process.c: On NetBSD don't use setruid() and setrgid().

Wed Nov  3 22:24:17 2004  Daigo Moriwaki  <techml@sgtpepper.net>

	* lib/webrick/httpauth/digestauth.rb: use Base64.encode64 to
	  avoid warnings.

Wed Nov  3 17:19:59 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_uniq_bang): do not push frozen string from hash
	  table.  [ruby-dev:24695]

	* array.c (rb_ary_and): ditto.

	* array.c (rb_ary_or): ditto.

Wed Nov  3 17:13:02 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* io.c (pipe_open): fix compile error

Wed Nov  3 16:58:07 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: support to use different Tcl commands between
	  configure and configinfo

	* ext/tk/lib/font.rb: ditto.

	* ext/tk/lib/itemconfig.rb: support to use different Tcl commands
	  between item_configure and item_configinfo

	* ext/tk/lib/itemfont.rb: ditto.

	* ext/tk/extconf.rb: install SUPPORT_STATUS

	* ext/tk/lib/tkextlib: some bug fixes (see ext/tk/ChangeLog.tkextlib)

Wed Nov  3 16:30:41 2004  NARUSE, Yui  <naruse@ruby-lang.org>

	* ext/nkf: follow nkf 2.0.4

Wed Nov  3 15:53:34 2004  Kouhei Sutou  <kou@cozmixng.org>

	* test/rss/test_maker_*.rb: added tests for RSS Maker.

	* lib/rss/maker.rb: added RSS Maker.

	* lib/rss/maker/*.rb: ditto.

Tue Nov  2 16:35:57 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/enumerator/enumerator.c (each_cons_i): pass copy of an
	  internal consequent array.  [ruby-talk:118691]

Tue Nov  2 16:05:21 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (rb_f_fork): need to flush stdout and stderr before
	  fork(2).  [ruby-talk:117715]

Tue Nov  2 01:20:09 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_invoke): nail down dyna_var node when Proc object
	  or continuation is created.  [ruby-dev:24671]

Mon Nov  1 13:59:28 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/extmk.rb (MANIFEST): do not use anymore, use extconf.rb instead.

	* ext/enumerator/extconf.rb, ext/fcntl/extconf.rb,
	  ext/stringio/extconf.rb: added.

	* MANIFEST, ext/**/MANIFEST: removed.

	* README.EXT, README.EXT.ja: remove MANIFEST stuff.

Mon Nov  1 01:14:52 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_f_open): create copy of popen specifier.  [ruby-dev:24656]

Mon Nov  1 00:36:48 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* main.c (_stklen): move to gc.c.

Sun Oct 31 00:22:28 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_locktmp): lock string temporarily.

	* string.c (str_independent): add tmplock check.

	* io.c (io_write): lock output string temporarily.
	  [ruby-dev:24649]

	* io.c (io_write): use rb_str_locktmp().

	* io.c (read_all): ditto.

Sat Oct 30 06:53:24 2004  Peter Vanbroekhoven  <peter.vanbroekhoven@cs.kuleuven.ac.be>

	* eval.c (rb_eval): NODE_XSTR should pass copy of literal string.

Sat Oct 30 00:19:40 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* enum.c (enum_sort_by): protect continuation jump in.
	  [ruby-dev:24642]

Fri Oct 29 21:27:51 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_check_initialized): new function to check uninitialized
	  object.  [ruby-talk:118234]

	* file.c (rb_file_path), io.c (rb_io_closed): check if initialized.

Fri Oct 29 10:00:30 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_thread_start_0): forget to free some memory chunks.
	  [ruby-core:03611]

	* eval.c (ruby_cleanup): ruby_finalize_1 may cause exception,
	  should be wrapped by PUSH_TAG/POP_TAG().  [ruby-dev:24627]

Thu Oct 28 08:42:02 2004  Tanaka Akira  <akr@m17n.org>

	* io.c (argf_forward): use ANSI style.
	  (argf_read): call argf_forward with argv argument.
	  [ruby-dev:24624]

Thu Oct 28 23:32:54 2004  akira yamada  <akira@ruby-lang.org>

	* ext/zlib/zlib.c (zstream_detach_input): resets klass of z->input if
	  z->input isn't nil.

Thu Oct 28 23:19:31 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: prefer relative path.  [ruby-talk:93037]

Wed Oct 27 18:49:11 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* gc.c: prototype; rb_io_fptr_finalize() doesn't return any value
	  at this version.

Wed Oct 27 17:27:45 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (gc_sweep): recover ruby_in_compile variable.

Wed Oct 27 09:17:30 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_gsub): use a string object for exception safeness.
	  [ruby-dev:24601]

Tue Oct 26 23:52:32 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_getline): rs modification check should not interfere in the loop.

Tue Oct 26 23:30:39 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/code_objects.rb (RDoc::Context::add_class_or_module):
	  Restore correct :nopdoc: behavior with nested classes and modules.

Tue Oct 26 18:21:29 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (RESIZE_CAPA): check string attribute before modifying
	  capacity member of string structure.  [ruby-dev:24594]

Tue Oct 26 11:33:26 2004  David G. Andersen  <dga@lcs.mit.edu>

	* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
	  performance.  [ruby-talk:117701]

Tue Oct 26 10:56:55 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
	  arguments, unless (digit)$ style used.

Tue Oct 26 11:33:26 2004  David G. Andersen  <dga@lcs.mit.edu>

	* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
	  performance.  [ruby-talk:117701]

Tue Oct 26 10:56:55 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
	  arguments, unless (digit)$ style used.

Mon Oct 25 18:35:39 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* win32/win32.c (isUNCRoot): should check NUL after '.'.
	  [ruby-dev:24590]

	* win32/win32.c (isUNCRoot): fixed buffer overrun.

Mon Oct 25 08:03:26 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (get_backtrace): ignore illegal backtrace.  [ruby-dev:24587]

Sun Oct 24 00:41:09 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_load, search_required, rb_require_safe, rb_require): use
	  frozen shared string to avoid outside modification.  [ruby-dev:24580]

Sat Oct 23 22:18:32 2004  Guy Decoux  <ts@moulon.inra.fr>

	* eval.c (frame_free): Guy Decoux solved the leak problem.
	  Thanks.  [ruby-core:03549]

Sat Oct 23 00:20:55 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/zlib/zlib.c (zstream_append_input): clear klass for z->input
	  to avoid potential vulnerability.

	* ext/zlib/zlib.c (zstream_run): always use zstream_append_input()
	  to avoid SEGV.  [ruby-dev:24568]

Fri Oct 22 12:02:28 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_alias): was warning for wrong condition.
	  [ruby-dev:24565]

Fri Oct 22 10:36:37 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#meta_vars):
	  should check if path_info is not nil.

Fri Oct 22 00:22:31 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/zlib/zlib.c (zstream_shift_buffer): should restore class
	  field of a buffer.  [ruby-dev:24562]

Fri Oct 22 00:20:33 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_include): should not treat char as negative value.
	  [ruby-dev:24558]

Thu Oct 21 21:32:30 2004  IWATSUKI Hiroyuki  <don@na.rim.or.jp>

	* lib/pstore.rb (PStore#transaction): Use the empty content when a
	  file is not found.  [ruby-dev:24561]

Thu Oct 21 19:06:15 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
	  ensure to close @body. (http://bugs.debian.org/277520)

Thu Oct 21 00:36:41 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_alias): should warn on method discarding.
	  [ruby-dev:24546]

	* ext/zlib/zlib.c (zstream_expand_buffer_into): hide internal
	  string buffer by clearing klass.  [ruby-dev:24548]

Wed Oct 20 19:45:13 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_gsub): 	reentrant check.  [ruby-dev:24432]

	* backport all SEGV bug fixes from CVS HEAD.  [ruby-dev:24536]

Wed Oct 20 04:17:55 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/dbm/dbm.c (fdbm_delete_if): should check if deleting element
	  is a string.  [ruby-dev:24490]

	* ext/sdbm/init.c (fsdbm_delete_if): ditto.

Wed Oct 20 01:37:18 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_times): Array#* should return an instance of
	  the class of right operand.  [ruby-dev:24526]

	* ext/zlib/zlib.c (zstream_detach_buffer): should not expose
	  class-less object to Ruby world. [ruby-dev:24530]

	* eval.c (proc_dup): provide Proc#dup as well.  [ruby-talk:116915]

	* eval.c (ruby_exec): stack marking position may be higher than
	  expected.  thanks to Guy Decoux.  [ruby-core:03527]

Tue Oct 19 22:43:12 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_attr): If
	  we come across 'attr' in a context where it isn't
	  followed by a symbol, just issue a warning.

Tue Oct 19 20:41:37 2004  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole.c(ole_invoke): retrieve the result value when
	  retrying the IDispatch::invoke.

Tue Oct 19 17:24:11 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (read_all): block string buffer modification during
	  rb_io_fread() by freezing it temporarily. [ruby-dev:24479]

	* dir.c (rb_push_glob): block call at once the end of method.
	  [ruby-dev:24487]

	* ext/enumerator/enumerator.c (enum_each_slice): remove
	  rb_gc_force_recycle() to prevent potential SEGV.
	  [ruby-dev:24499]

	* ext/zlib/zlib.c (zstream_expand_buffer): hide internal string
	  buffer by clearing klass.  [ruby-dev:24510]

Tue Oct 19 16:12:18 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c: backport from CVS HEAD

Tue Oct 19 08:54:26 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* intern.h, object.c (rb_class_inherited_p): export.

Tue Oct 19 08:46:57 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_upto): method result must be checked.  [ruby-dev:24504]

	* eval.c (error_print): ditto.  [ruby-dev:24519]

Mon Oct 18 23:37:05 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (r_object0): check inheritance by the internal function.
	  [ruby-dev:24515]

Mon Oct 18 15:58:01 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* range.c (range_step, range_each): need cast.

Fri Oct 29 16:34:19 2004  Daiki Ueno  <ueno@unixuser.org>

	* misc/ruby-mode.el (ruby-parse-partial): Parse the rest of the
	  line after opening heredoc identifier.  [ruby-dev:24635]

Mon Oct 18 07:26:21 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (rb_file_truncate): discard read buffer before truncation.
	  [ruby-dev:24197]

Mon Oct 18 02:11:21 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/config.rb (WEBrick::Config::General): add default values:
	  - WEBrick::Config[:DoNotReverseLookup]
	  - WEBrick::Config[:RequestCallback] (it used as an alias of
	    :RequestHandler in WEBrick::HTTPServer#run)
	  - WEBrick::Config::FileHandler[:AcceptableLanguages]

	* lib/webrick/httpservlet/filehandler.rb
	  (WEBrick::HTTPServlet::FileHandler#set_filename): search files
	  having suffix of language-name which Accept-Language header field
	  includes if :AcceptableLanguages options is present.

	* lib/webrick/httpservlet/filehandler.rb
	  (WEBrick::HTTPServlet::FileHandler#get_servlet): new method to
	  search servlet correspond to the suffix of filename.

	* lib/webrick/httprequest.rb: add attributes access methods: accept,
	  accept_charset, accept_encoding, accept_language, content_length
	  and content_type.

	* lib/webrick/httpresponse.rb: add attribute access methods:
	  content_length, content_length=, content_type and content_type=.

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils.mime_types):
	  use the second suffix to detect media type. (the first suffix
	  may be a language name.)

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_qvalues):
	  add method to parse Accept header field. it returns an Array of
	  values sorted by the qvalues.

Mon Oct 18 02:04:11 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpserver.rb (WEBrick::HTTPServer#virtual_host): new
	  method to register virtual hosting servers.

	* lib/webrick/server.rb (WEBrick::GenericServer#accept): call
	  do_not_reverse_lookup for each socket if :DoNotReverseLookup
	  is set.  [ruby-core:02357]

Mon Oct 18 00:42:45 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (sock_s_getservbyaname): protocol string
	  might be altered.  [ruby-dev:24503]

	* string.c (rb_str_upto): check if return value from succ is a
	  string.  [ruby-dev:24504]

Sun Oct 17 23:03:48 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/timer.rb: TkTimer#start and restart accept a block

Sun Oct 17 13:05:04 2004  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (fole_func_methods): correct argument mismatch.
	* ext/win32ole/win32ole.c (fole_get_methods): ditto.
	* ext/win32ole/win32ole.c (fole_put_methods): ditto.
	* ext/win32ole/tests/testWIN32OLE.rb: add test for WIN32OLE#ole_func_methods
	  WIN32OLE#ole_get_methods, WIN32OLE#ole_put_methods

Sat Oct 16 14:45:28 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/0.9.rb (RSS::Rss#to_s): removed garbage.

Sat Oct 16 13:42:49 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/: untabified.
	* test/rss/: untabified.
	* lib/rss/0.9.rb (RSS::Rss#to_s): inent -> indent.

Sat Oct 16 13:34:56 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss: supported prety print.
	* test/rss/test_1.0.rb: added test for calculating default indent size.

Fri Oct 15 18:04:35 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/timer.rb: TkTimer.new(interval, loop){ ... } is
	  acceptable. Add TkTimer.start ( == new + start ).

Fri Oct 15 12:43:09 2004  Tanaka Akira  <akr@m17n.org>

	* eval.c (Init_stack): make prototype declaration consistent with
	  the definition in gc.c.

Thu Oct 14 14:34:01 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* io.c (MODE_BINMODE, MODE_BINARY): fixed reversed condition.

Thu Oct 14 13:33:59 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: added link to Tutorial.

Mon Oct 11 13:48:20 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/*: untabify

Sun Oct 10 12:32:08 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::parse_require): Allow 'require'
	  to be used as a variable name

Sat Oct  9 21:23:37 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/converter.rb: changed to try to use Iconv for default
	  conversion.

	* lib/rss/rss.rb: 0.0.9 -> 0.1.0.

Sat Oct  9 19:50:36 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_getline): should not treat char as negative value.
	  [ruby-dev:24460]

Fri Oct  8 09:49:32 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (pack_pack): pointer modification check before each
	  iteration.  [ruby-dev:24445]

Fri Oct  8 01:13:05 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/optiondb.rb: make it more secure

Thu Oct  7 23:47:57 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/scrollbar.rb: When 'set' operation, a scrollbar
	  cannot propagate view port information from the source widget
	  (that calls 'set') to other assigned widgets.

Thu Oct  7 17:36:25 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: When CHILDKILLED and so on, Tk.errorCode returns
	  a Fixnum for 2nd element (it's pid) of the return value.

Thu Oct  7 12:55:04 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (io_read): should freeze buffer before thread context
	  switch. [ruby-dev:24442]

	* pack.c (pack_unpack): string conversion should at the top of the
	  method.  [ruby-dev:24439]

	* io.c (io_read): buffer should be frozen only after the length
	  check.  [ruby-dev:24440]

Thu Oct  7 02:56:43 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c: use FMODE_APPEND.

Thu Oct  7 01:05:33 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: add Tk.errorInfo and Tk.errorCode

Thu Oct  7 00:08:37 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_s_sysopen): preserve path in the buffer allocated by
	  ALLOCA_N() to prevent modification.  [ruby-dev:24438]

Wed Oct  6 09:21:00 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_mode_flags): preserve append mode flag.
	  [ruby-dev:24436]

	* io.c (rb_io_modenum_mode): do not use external output buffer.

	* string.c (rb_str_justify): differ pointer retrieval to prevent
	  padding string modification.  [ruby-dev:24434]

	* range.c (range_each_func): allow func to terminate loop by
	  returning RANGE_EACH_BREAK.

	* range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959]

Mon Oct  4 14:04:14 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_file_open_internal, rb_io_reopen): fname might be altered
	  while GC.  [ruby-dev:24408]

Mon Oct  4 12:53:45 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/optiondb.rb: support definition of command
	  resources on widgets

	* ext/tk/lib/tk/image.rb: bug fix

Sun Oct  3 21:20:03 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (TEXT_REGEXP): allow 8-bit characters for the german
	  version of Microsoft Exchange Server. (backported from HEAD)

	* lib/net/imap.rb (RTEXT_REGEXP): ditto.

	* lib/net/imap.rb (CTEXT_REGEXP): ditto.

Sat Oct  2 20:34:22 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (NEW_DVAR): extra semicolon.

Sat Oct  2 00:42:20 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (r_byte): retrieve pointer from string value for each
	  time.  [ruby-dev:24404]

	* marshal.c (r_bytes0): ditto.

	* enum.c (sort_by_i): re-entrance check added.  [ruby-dev:24399]

	* io.c (io_read): should freeze all reading buffer.
	  [ruby-dev:24400]

	* string.c (rb_str_sum): should use bignums when bits is greater
	  than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395]

	* eval.c (specific_eval): defer pointer retrieval to prevent
	  unsafe sourcefile string modification.  [ruby-dev:24382]

	* eval.c (specific_eval): defer pointer retrieval to prevent
	  unsafe sourcefile string modification.  [ruby-dev:24382]

	* string.c (rb_str_sum): wrong cast caused wrong result.
	  [ruby-dev:24385]

	* enum.c (enum_sort_by): hide temporary array from
	  ObjectSpace.each_object.  [ruby-dev:24386]

	* string.c (rb_str_sum): check was done with false pointer.
	  [ruby-dev:24383]

	* string.c (rb_str_sum): string may be altered.  [ruby-dev:24381]

Mon Oct 11 17:51:34 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_popen): get mode string via rb_io_flags_mode() to
	  avoid mode string modification.  [ruby-dev:24454]

	* io.c (rb_io_getline_fast): should take delim as unsigned char to
	  distinguish EOF and '\377'.  [ruby-dev:24460]

	* io.c (rb_io_getline): add check for RS modification.
	  [ruby-dev:24461]

	* enum.c (enum_sort_by): use qsort() directly instead using
	  rb_iterate().  [ruby-dev:24462]

	* enum.c (enum_each_with_index): remove rb_gc_force_recycle() to
	  prevent access to recycled object (via continuation for
	  example).  [ruby-dev:24463]

Fri Oct  1 11:40:14 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe
	  sourcefile string modification.  [ruby-dev:24373]

	* io.c (io_read): block string buffer modification during
	  rb_io_fread() by freezing it temporarily. [ruby-dev:24366]

	* io.c (rb_io_s_popen): mode argument may be altered.
	  [ruby-dev:24375]

	* file.c (rb_file_s_basename): ext argument may be altered.
	  [ruby-dev:24377]

	* enum.c (enum_sort_by): use NODE instead of 2 element arrays.
	  [ruby-dev:24378]

	* string.c (rb_str_chomp_bang): StringValue() may change the
	  receiver.  [ruby-dev:24371]

Fri Oct  1 11:25:20 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/grid.rb: revive TkGrid.grid

	* ext/tk/lib/tk/pack.rb: revive TkPack.pack

	* ext/tk/lib/tk/place.rb: revive TkPlace.place

Thu Sep 30 00:50:44 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_init): bug fix

	* ext/tk/tkutil.c (get_eval_string_core): accept a Regexp object

	* ext/tk/lib/multi-tk.rb: fix bug on 'exit' operation

	* ext/tk/lib/tk/text.rb: 'tksearch' accepts a Regexp object as a
	  matting pattern argument

Wed Sep 29 10:58:07 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* enum.c (sort_by_i): internally used object must not be changed
	  outside.  [ruby-dev:24368]

Mon Sep 27 13:46:45 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* intern.h, struct.c (rb_struct_s_members, rb_struct_members): public
	  accessors.  [ruby-dev:24342]

	* marshal.c (w_object, r_object0): use accessors.

Mon Sep 27 09:14:03 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (s_accept): don't retry for EWOULDBLOCK.
	  [ruby-talk:113807]

Fri Sep 24 16:09:42 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_invoke): propagate DVAR_DONT_RECYCLE on termination
	  to avoid double call to rb_gc_force_recycle(). [ruby-dev:24311]

Fri Sep 24 08:29:45 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_subseq): original object might be modified after
	  sharing data creation.  [ruby-dev:24327]

	* array.c (rb_ary_replace): ditto.

	* array.c (ary_make_shared): freeze shared array. [ruby-dev:24325]

	* struct.c (struct_members): always check struct size and size of
	  members list in the class.  [ruby-dev:24320]

Thu Sep 23 09:29:14 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_sub_bang): check if string is not modified
	  during iteration.  [ruby-dev:24315]

	* hash.c (rb_hash_rehash): replace st_foreach() by its deep
	  checking counterpart.  [ruby-dev:24310]

Wed Sep 22 13:38:12 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* hash.c (rb_hash_rehash): add iteration check.  [ruby-dev:24301]

	* st.c (st_foreach): add deep check.

Wed Sep 22 13:06:14 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_call_handler): workaround for Ctrl-C.
	  merge from HEAD.

Wed Sep 22 00:11:12 2004  Dave Thomas  <dave@pragprog.com>

	* process.c: Add documentation for fork()

Wed Sep 22 09:04:41 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_collect_bang): element size might change during
	  comparison.  [ruby-dev:24300]

	* array.c (rb_ary_reject_bang): ditto. [ruby-dev:24300]

	* array.c (rb_ary_eql): ditto. [ruby-dev:24300]

Tue Sep 21 18:29:49 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_equal): merge miss.

	* array.c (rb_ary_uniq_bang): element size might change during
	  comparison.  [ruby-dev:24298]

Mon Sep 20 00:24:19 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* enum.c (enum_sort_by): do not use qsort directly.  use
	  rb_ary_sort_bang() instead.  [ruby-dev:24291]

	* enum.c (enum_sort_by): pedantic type check added.
	  [ruby-dev:24291]

	* hash.c (rb_hash_foreach_iter): check iter_lev after each
	  iteration.  [ruby-dev:24289]

	* array.c (rb_ary_and): element size might change during
	  comparison.  [ruby-dev:24290]

	* array.c (rb_ary_or): ditto. [ruby-dev:24292]

	* array.c (rb_ary_equal): wrong fix. [ruby-dev:24286]

Sat Sep 18 15:02:22 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_equal): element size might change during
	  comparison.  [ruby-dev:24254]

	* array.c (rb_ary_diff): ditto. [ruby-dev:24274]

	* array.c (rb_ary_select): ditto. [ruby-dev:24278]

	* array.c (rb_ary_delete): ditto. [ruby-dev:24283]

	* array.c (rb_ary_rindex): ditto. [ruby-dev:24275]

	* array.c (rb_ary_initialize): element size might change during
	  initializing block.  [ruby-dev:24284]

Sat Sep 18 14:10:23 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (dir_s_chdir): avoid memory leak and unnecessary chdir to
	  the original directory when exception has caused in changing
	  direcotry or within block.  thanks to Johan Holmberg
	  <holmberg@iar.se> [ruby-core:03446]

Fri Sep 17 20:20:27 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mkdir_p): backport from CVS HEAD 1.45. [ruby-core:03420]

Fri Sep 17 17:11:08 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_delete): element comparison might change array
	  size. [ruby-dev:24273]

	* file.c (rb_file_truncate): clear stdio buffer before truncating
	  the file.  [ruby-dev:24191]

	* ext/digest/digest.c: use rb_obj_class() instead of CLASS_OF
	  which might return singleton class.  [ruby-dev:24202]

Fri Sep 17 16:07:09 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: improve exit operation

Fri Sep 17 15:01:57 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fix SEGV when (thread_)vwait or
	  (thread_)tkwait

	* ext/tk/lib/tk.rb: add alias wait_window to wait_destroy

	* ext/tk/lib/multi-tk.rb: support calling 'mainloop' on slave
	  interpreters (however, the 'real' eventloop must be run on the
	  Default Master IP)

	* ext/tk/lib/remote-tk.rb: follow the changes of ext/tk/lib/multi-tk.rb

	* ext/tk/sample/remote-ip_sample2.rb: ditto

	* ext/tk/sample/tkoptdb-safeTk.rb: ditto

Thu Sep 16 18:12:32 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (WEBrick::CGI#start): should set REMOTE_USER
	  to request.user attribute.

	* lib/webrick/httpservlet/filehandler.rb
	  (WEBrick::HTTPServlet::FileHandler#initialize): should expand
	  the pathname of document root directory.

Thu Sep 16 15:49:28 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_intern): protect string argument from GC.
	  [ruby-core:03411]

Wed Sep 15 20:22:23 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tkoptdb-safeTk.rb: fix a bug depend on the changes
	  of MultiTkIp

Tue Sep 14 23:54:11 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string was en-bugged by
	  the previous changes.

Tue Sep 14 23:45:44 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::TextFormatter.for):
	  Add Eric Hodel's simpleformatter.

Tue Sep 14 16:59:37 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fix SEGV

	* ext/tk/lib/multi-tk.rb: improve safe-level handling of argument proc

	* ext/tk/sample/multi-ip_sample.rb: rename of old 'safe-tk.rb'

	* ext/tk/sample/safe-tk.rb: new sample script

Tue Sep 14 00:15:15 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/zlib/zlib.c: backported from HEAD.

Mon Sep 13 19:16:33 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* eval.c (blk_copy_prev): need frame_dup().  [ruby-dev:24103]

Mon Sep 13 16:23:27 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: MultiTkIp.new_master and new_slave accept
	  safe-level value argument

Mon Sep 13 10:20:45 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* object.c (nil_inspect): fix typo.

Mon Sep 13 01:03:02 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: improve control of preserv/release tcltkip

	* ext/tcltklib/tcltklib.c: store original 'exit' command

	* ext/tk/tkutil.c: fix(?) SEGV

Sun Sep 12 23:46:23 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* util.c (ruby_strdup): remove unnecessary code. (xmalloc never
	  returns NULL.)

	* util.c (ruby_getcwd): fix memory leak on failure.

Sun Sep 12 02:41:58 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: add TclTkIp#allow_ruby_exit? and
	  allow_ruby_exit=

	* ext/tk/lib/multi-tk.rb: ditto.

	* ext/tk/lib/remote-tk.rb: ditto.

	* ext/tcltklib/MANUAL.euc: ditto.

	* ext/tcltklib/MANUAL.eng: ditto.

	* ext/tcltklib/tcltklib.c: fix some reasons of SEGV

	* ext/tk/tkutil.c: ditto.

	* ext/tk/lib/multi-tk.rb: ditto.

	* ext/tk/lib/tk/timer.rb: ditto.

Sat Sep 11 16:09:46 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb: Fix up cross-file class merging.

Fri Sep 10 20:20:53 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tcltklib/tcltklib.c (lib_merge_tklist): fix suspicious
	  pointer conversion.

Fri Sep 10 02:43:54 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/template/kilmer.rb: James Buck's
	  patch for call-seq.

Thu Sep  9 13:58:56 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_init): change flag value for setting
	  'argv' and 'argv0' variable

	* ext/tk/lib/remote-tk.rb: follow changes of multi-tk.rb

Thu Sep  9 11:46:18 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_classes): Allow
	  spaces aroun parameter to define_method_under (James Buck)

Wed Sep  8 18:44:03 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_write): zero fill a gap if exsts.
	  [ruby-dev:24190]

Wed Sep  8 15:19:49 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_init): cannot create a IP at level 4

	* ext/tk/lib/multi-tk.rb: improve 'exit' operation, security check,
	  and error treatment

	* ext/tk/lib/multi-tk.rb: allow a trusted slave IP to create slave IPs

	* ext/tk/lib/tk/listbox.rb: add TkListbox#value, value=, clear,	and
	  erase

	* ext/tk/lib/tk/text.rb: add TkText#clear and erase

Tue Sep  7 15:17:49 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (ruby_connect): break immediately if a
	  socket is non-blocking.  [ruby-talk:111654]

Mon Sep  6 11:08:50 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tk/lib/tk/menu.rb(TkOptionMenubutton#insert): call correct method

Mon Sep  6 11:00:47 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (dir_s_chdir): the patch to shut up false warning when
	  exception occurred within a block.  a patch was given from Johan
	  Holmberg <holmberg at iar.se>.  [ruby-core:03292]

Mon Sep  6 07:51:42 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (cvar_cbase): singletons should refer outer cvar scope.
	  [ruby-dev:24223]

	* eval.c (rb_load): should preserve previous ruby_wrapper value.
	  [ruby-dev:24226]

Sat Sep  4 01:14:57 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (cvar_cbase): class variables cause SEGV in
	  instance_eval() for fixnums and symbols. [ruby-dev:24213]

Fri Sep  3 17:47:58 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (make_struct): remove redefining constant when
	  conflict.  [ruby-dev:24210]

Fri Sep  3 11:31:44 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: Tk.after makes TkCore::INTERP.tk_cmd_tbl grow
	  [ruby-dev:24207]

Fri Sep  3 02:12:48 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fix typo [ruby-talk:111266]

	* ext/tk/lib/tk/text.rb: fix typo

	* ext/tk/lib/multi-tk.rb: improve safe-level treatment on slave IPs

Fri Sep  3 01:54:20 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: already built-in libraries satisfy dependencies.
	  [ruby-dev:24028]

Thu Sep  2 11:36:20 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* eval.c (rb_obj_instance_eval): backported from HEAD.

Wed Sep  1 21:18:25 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tk/lib/tk/spinbox.rb: fix typo

Tue Aug 31 18:24:04 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/tk/tkutil.c (cbsubst_init): fix memory leak

	* ext/tk/tkutil.c (cbsubst_get_all_subst_keys): fix SEGV

Tue Aug 31 16:04:22 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_delete): when a tcltkip is deleted,
	  destroy its root widget

Tue Aug 31 12:30:36 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (del_root): fix SEGV

Mon Aug 30 23:11:06 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_driver.rb (and others): ri now merges documentation
	  if it finds the same class in multiple places.

Mon Aug 30 22:40:30 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: 'restart' method accepts arguments

Mon Aug 30 21:50:14 2004  Dave Thomas  <dave@pragprog.com>

	* object.c: Add RDoc for Module.included.

Mon Aug 30 15:10:46 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (GNU/k*BSD): fixed FTBFS on GNU/k*BSD. [ruby-dev:24051]

Mon Aug 30 11:29:35 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (CreateChild): strip trailing spaces. [ruby-dev:24143]
	  merge from HEAD.

Sun Aug 29 14:08:56 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: compile error on bcc32 [ruby-dev:24081]

	* ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string does not work

Sat Aug 28 23:04:41 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_and): protect parameters from GC.
	  [ruby-talk:110664]

Thu Aug 26 04:38:29 2004  Dave Thomas  <dave@pragprog.com>

	* eval.c (return_jump): Minor typo in error message. Now reads
	  "return can't jump across threads".

Tue Aug 24 17:30:00 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session::FileStore#initialize): do not
	  use a session id as a filename. (backported from HEAD)

	* lib/cgi/session/pstore.rb (CGI::Session::PStore#initialize): ditto.

	* lib/cgi/session/pstore.rb (CGI::Session::PStore#initialize): use
	  Dir::tmpdir. (backported from HEAD)

Tue Aug 24 14:40:16 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session::FileStore#initialize): untaint
	  session id after check. (backported from HEAD)

Tue Aug 24 09:09:01 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): d2i
	  functions may replace the pointer indicated by the first argument.

	* ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto.

	* ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto.

Mon Aug 23 14:04:51 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_read):
	  - should return an empty string if specified length to read is 0.
	  - should check for pending data and wait for fd before reading.
	  - call underlying IO's sysread if SSL session is not started.
	  [ruby-dev:24072], [ruby-dev:24075]

	* ext/openssl/ossl_ssl.c (ossl_ssl_write):
	  - call underlying IO's syswrite if SSL session is not started.

	* ext/openssl/ossl_ssl.c (ossl_ssl_pending): new method
	  OpenSSL::SSL#pending.

	* ext/openssl/lib/openssl/buffering.rb: should not use select.

Mon Aug 23 12:40:56 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/resolv.rb (Config.default_config_hash): when multiple domains
	  are set, Win32::Resolv.get_resolv_info returns Array.

Sun Aug 22 01:15:31 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect):
	  should call :ProxyContentHandler before finishing CONNECT.

Sat Aug 21 06:41:16 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/tcltklib/extconf.rb (find_tcl, find_tk): find stub library.

	* lib/mkmf.rb (arg_config, with_config): deal with '-' and '_'
	  uniformly.  [ruby-dev:24118]

Thu Aug 19 16:29:45 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: Fail to treat a hash value of 'font' option.

	* ext/tk/lib/tk.rb: bindinfo cannot return '%' substiturion infomation.

	* ext/tk/lib/menu.rb: typo bug.

Thu Aug 19 15:15:24 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* dir.c (free_dir): fix memory leak.  reported by yamamoto
	  madoka.

Thu Aug 19 11:00:00 2004  Akiyoshi, Masamichi  <masamichi.akiyoshi@hp.com>

	* dln.c (dln_load): Modify to call lib$find_image_symbol for VMS.
	* io.c (rb_io_fwrite): Use fputc() for VMS non-stream file.

Thu Aug 19 06:07:45 2004  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/token.c: re2c no longer compiled with bit vectors.  caused
	  problems for non-ascii characters. [ruby-core:03280]
	* ext/syck/implicit.c: ditto.
	* ext/syck/bytecode.c: ditto.

	* lib/yaml/baseemitter.rb: folding now handles double-quoted strings,
	  fixed problem with extra line feeds at end of folding, whitespace
	  opening scalar blocks.

	* lib/yaml/rubytypes.rb: subtelties in handling strings with
	  non-printable characters and odd whitespace patterns.

Wed Aug 18 23:41:33 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/net/protocol.rb (rbuf_fill): OpenSSL::SSL::SSLSocket has its own
	  buffer, select(2) might not work. [ruby-dev:24072]

Wed Aug 18 17:10:12 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/tcltklib/stubs.c (ruby_tcltk_stubs): need to call
	  Tcl_FindExecutable() for Tcl/Tk 8.4.

Wed Aug 18 12:52:55 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_obj_instance_eval): evaluates under special singleton
	  classes as for special constants.

Tue Aug 17 17:20:59 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_reopen): should clear allocated OpenFile.  pointed
	  out by Guy Decoux. [ruby-core:03288]

Tue Aug 17 01:36:32 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/usage.rb: Remove extra indent. Tidy 'ri' option
	  parsing so RDoc::usage plays better with OptionParser.

Sat Aug 14 13:09:10 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb: backport from CVS HEAD (rev1.44).

	* lib/fileutils.rb: cp_r should copy symlink itself, except cp_r
	  root.

	* lib/fileutils.rb: new option mv :force.

	* lib/fileutils.rb: new module FileUtils::DryRun.

Sat Aug 14 02:48:16 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/usage.rb: Added. Allows command line programs
	  to report usage using their initial RDoc comment.

Fri Aug 13 13:23:17 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_range_header):
	  fix regex for range-spec.

	* lib/webrick/httpservlet/filehandler.rb
	  (WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content):
	  multipart/byteranges response was broken.

	* lib/webrick/httpservlet/erbhandler.rb
	  (WEBrick::HTTPServlet::ERBHandler#do_GET): should select media type
	  by suffix of script filename.

	* lib/xmlrpc/server.rb: refine example code.

Wed Aug 11 17:17:50 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (RPATHFLAG): stop setting RPATHFLAG on Interix.

Sun Aug  8 00:43:31 2004  why the lucky stiff  <why@ruby-lang.org>

	* lib/implicit.c: added sexagecimal float#base60.

	* ext/syck/rubyext.c (yaml_org_handler): ditto.

	* lib/token.c: indentation absolutely ignored when processing flow
	  collections.  plain scalars are trimmed if indentation follows in
	  an ambiguous flow collection.

Sat Aug  7 00:50:01 2004  Tanaka Akira  <akr@m17n.org>

	* ext/zlib/zlib.c: Zlib::GzipReader#read(0) returns "" instead of nil.

Tue Aug  3 13:49:20 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/namespace.rb: bug fix

	* ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: add Tk::TreeCtrl.loupe

Mon Aug  2 18:04:21 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/msgcat.rb (set_translation): bug fix (fail to set
	  trans_str to the same as src_str when trans_str is not given.)

Mon Aug  2 11:53:06 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/code_objects.rb (RDoc::Context::find_symbol): Fix infinite recursion
	  looking up some top level symbols (batsman)

Mon Aug  2 11:48:29 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): Allow '.'s in
	  variable names to support SWIG generated files (Hans Fugal)

Sat Jul 31 17:40:16 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-expr-beg, ruby-parse-partial,
	  ruby-calculate-indent, ruby-move-to-block, ruby-forward-sexp,
	  ruby-backward-sexp): keywords must match word-wise.

Sat Jul 31 05:47:37 2004  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml.rb (YAML::load_file, YAML::parse_file): added.

	* lib/yaml/rubytypes.rb: exceptions were using an older
	  YAML.object_maker. [ruby-core:03080]

	* ext/syck/token.c (sycklex_yaml_utf8): using newline_len to
	  handline CR-LFs.  "\000" was showing up on folded blocks which
	  stopped at EOF.

	* ext/syck/token.c: re2c compiled with bit vectors now.
	* ext/syck/implicit.c: ditto.
	* ext/syck/bytecode.c: ditto.

Fri Jul 30 16:10:54 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (lib_fromUTF8_core): raise ArgumentError when
	  the unknown encoding name is given.

	* ext/tcltklib/tcltklib.c (lib_toUTF8_core): ditto.

	* ext/tk/lib/tk.rb (Tk::Encoding.encoding_convertfrom): bug fix.

	* ext/tk/lib/tk.rb (Tk::Encoding.encoding_convertto): ditto.

Wed Jul 28 18:59:17 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::initialize): remove at_exit code for CGI_PARAMS
	  and CGI_COOKIES.  they will no longer be used.

Wed Jul 28 01:04:44 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (run_final): wrong order of data. [ruby-dev:23984]

Tue Jul 27 07:05:04 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): copy on write for argument local variable
	  assignment.

	* eval.c (assign): ditto.

	* eval.c (rb_call0): update ruby_frame->argv with the default
	  value used for the optional arguments.

	* object.c (Init_Object): "===" calls rb_obj_equal() directly.
	  [ruby-list:39937]

Mon Jul 26 11:22:55 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape): should
	  escape space.

Sun Jul 25 11:05:21 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* win32/win32.{h,c} (rb_w32_{f,fd,fs}open): workaround for bcc32's
	  {f,fd,fs}open bug. set errno EMFILE and EBADF. [ruby-dev:23963]

Sat Jul 24 13:32:47 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* range.c (rb_range_beg_len): returns Qnil only when "beg" points
	  outside of a range.  No boundary check for "end".

Fri Jul 23 16:40:25 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (define_final): should not disclose NODE* to Ruby world.
	  [ruby-dev:23957]

Fri Jul 23 09:03:16 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (disconnected?): new method. (backported from HEAD)

Thu Jul 22 16:41:54 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi/session.rb (CGI::Session::FileStore#update): sets the
	 permission of the session data file to 0600.

	* lib/cgi/session/pstore.rb (CGI::Session::Pstore#initialize):
	  ditto.

Thu Jul 22 00:02:21 2004  Masahiro Kitajima  <katonbo@katontech.com>

	* process.c (rb_f_system): not need to call last_status_set() any
	  longer on _WIN32.

Tue Jul 20 09:15:17 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* test/fileutils/test_fileutils.rb: File.link raises EINVAL on BeOS.

Mon Jul 19 01:15:07 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpservlet/cgihandler.rb
	  (WEBrick::HTTPServlet::CGIhandler#do_GET): set SystemRoot environment
	  variable to CGI process on Windows native platforms. [ruby-dev:23936]

	* lib/webrick/httpservlet/cgihandler.rb
	  (WEBrick::HTTPServlet::CGIhandler#do_GET): use $?.exitstatus and
	  refine log message.

Sun Jul 18 16:14:29 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/msgcat.rb (TkMsgCatalog.callback): bug fix
	  ( wrong number of argument )

Sun Jul 18 08:13:58 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): remove extra sign digit.

Sun Jul 18 03:21:42 2004  Akinori MUSHA  <knu@iDaemons.org>

	* dir.c (range): use NULL instead of 0.

	* dir.c (range): get rid of a gcc 3.4 warning.

Sun Jul 18 03:12:11 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (receive_responses): return if a LOGOUT response
	  received. (backported from HEAD)
	* lib/net/imap.rb (send_string_data): wait command continuation
	  requests before sending octet data of literals. (backported from HEAD)

Sat Jul 17 23:54:59 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/variable.rb: TkVariable#ref returns a TkVariable object

Sat Jul 17 22:04:44 2004  akira yamada  <akira@ruby-lang.org>

	* lib/uri/ldap.rb: method hierarchical? should be in URI::LDAP.

Sat Jul 17 18:29:07 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (stmt): not to show same error messages twice.

Sat Jul 17 13:13:32 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/ruby-lex.rb (RubyLex::identify_string): %s string do not
	  process expression interpolation.  [ruby-talk:106691]

Sat Jul 17 05:26:27 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/diagram.rb: Incorporate Micheal Neuman's
	  client-side imagemao patch

Sat Jul 17 01:57:03 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (THREAD_ALLOC): th->thread should be initialized to NULL.
	  [ruby-talk:106657]  The solution was found by Guy Decoux.

Fri Jul 16 22:30:28 2004  Michael Neumann  <mneumann@ntecs.de>

	* file.c (rb_stat_dev_major): new methods File::Stat#dev_major and
	  #dev_minor. [ruby-core:03195]

Fri Jul 16 15:23:53 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (return_jump, break_jump): raise unexpceted local jump
	  exception directly.  [ruby-dev:23740]

	* lib/base64.rb (Deprecated): super in bound method calls original
	  name method in stable version.  [ruby-dev:23916]

Fri Jul 16 11:31:49 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/test/unit/ui/{fox,gtk,gtk2}/testrunner.rb: remove
	  garbage (patch from akira yamada) [ruby-dev:23911]

Fri Jul 16 11:20:00 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): fix output of NaN, Inf and -Inf with
	  "%f" or etc on MSVCRT platforms. (backported from HEAD)

Fri Jul 16 11:17:38 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (exit_initialize): use EXIT_SUCCESS instead of 0.
	  [ruby-dev:23913]

	* error.c (exit_success_p): new method SystemExit#success?.
	  [ruby-dev:23912]

	* error.c (syserr_initialize): initialization for subclasses.
	  [ruby-dev:23912]

Thu Jul 15 23:53:38 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser#warn, OptionParser#abort): Exception
	  no longer has to_str method.

Thu Jul 15 22:59:48 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* ext/readline/extconf.rb: added dir_config for curses, ncurses,
	  termcap. (backported from HEAD)

Thu Jul 15 20:29:15 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* class.c, error.c, eval.c, intern.h, object.c, variable.c:
	  do not set path if it is a singleton class.  [ruby-dev:22588]
	  (backport from 1.9)

Thu Jul 15 10:15:04 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/, ext/tcltklib/: bug fix

	* ext/tk/lib/tk.rb: better operation for SIGINT when processing
	  callbacks.
	* ext/tk/lib/tk/msgcat.rb: ditto.
	* ext/tk/lib/tk/variable.rb: ditto.
	* ext/tk/lib/tk/timer.rb: ditto.

	* ext/tk/lib/tk/validation.rb: add Tk::ValidateConfigure.__def_validcmd
	  to define validatecommand methods easier

	* ext/tk/lib/tk.rb (_genobj_for_tkwidget): support autoload Tk ext
	  classes

	* ext/tk/lib/tk/canvas.rb and so on: remove the parent widget type
	  check for items (e.g. canvas items; depends on the class) to
	  avoid some troubles on Tk extension widget class definition.

	* ext/tk/lib/tkextlib/: add Iwidget and TkTable extension support

	* ext/tk/sample/tkextlib/: add samples of Iwidget and TkTable

Wed Jul 14 18:08:37 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1cons_to_der): fix type of
	  argument. [ruby-dev:23891]

	* test/openssl/test_x509store.rb: prune tests for CRL checking
	  unless X509::V_FLAG_CRL_CHECK is defined.

Wed Jul 14 12:29:07 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* util.c (ruby_strtod): should not convert string in the form of
	  "-I.FE-X" which both "I" and "F" are ommitted. [ruby-dev:23883]

	* test/ruby/test_float.rb (test_strtod): add test for bug fix.

Wed Jul 14 00:31:15 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* array.c: rdoc patch. merged patch from Johan Holmberg
	  <holmberg@iar.se> [ruby-core:3170]

Tue Jul 13 19:39:12 2004  akira yamada  <akira@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic#merge_path):
	  "URI('http://www.example.com/foo/..') + './'" should return
	  "URI('http://www.example.com/')".  [ruby-list:39838]
	  "URI('http://www.example.com/') + './foo/bar/..'" should return
	  "URI('http://www.example.com/foo/')".  [ruby-list:39844]

	* test/uri/test_generic.rb (TestGeneric#test_merge): added tests.

Tue Jul 13 15:51:45 2004  Akinori MUSHA  <knu@iDaemons.org>

	* lib/mkmf.rb (init_mkmf): Do not add $(libdir) to $LIBPATH in
	   extmk mode.

	* lib/mkmf.rb (dir_config): Prepend a new library path instead of
	  appending so it is tried first.

Tue Jul 13 00:50:48 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb: Support call-seq: for Ruby files.

Mon Jul 12 21:20:36 2004  Dave Thomas  <dave@pragprog.com>

	* html_generator.rb: Support hyperlinks of the form {any text}[xxx]
	  as well as stuff[xxx]

Sat Jul 10 09:30:24 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/marshal/test_struct.rb: use qualified build-tin class name
	  (::Struct) to avoid name crash.

Sat Jul 10 04:21:56 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: better operation for SIGINT when processing
	  callbacks.
	* ext/tk/lib/tk/msgcat.rb: ditto.
	* ext/tk/lib/tk/variable.rb: ditto.
	* ext/tk/lib/tk/timer.rb: ditto.

	* ext/tk/lib/tk/validation.rb (__def_validcmd):  add a module
	  function of Tk::ValidateConfigure to define validatecommand
	  methods easier

Fri Jul  9 22:36:36 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* array.c, enum.c, pack.c: rdoc patch from Johan Holmberg
	  <holmberg@iar.se> [ruby-core:3132] [ruby-core:3136]

	* numeric.c: rdoc patch.

Fri Jul  9 19:26:39 2004  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::HTTPS#proxy_open): raise ArgumentError to
	  notice https is not supported.

Fri Jul  9 14:28:54 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_raise): accept third argument as well as
	  Kernel#raise, and evaluate the arguments to create an exception in
	  the caller's context.  [ruby-talk:105507]

Fri Jul  9 01:47:08 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib : bug fix
	* ext/tk/lib/tkextlib/itcl : add [incr Tcl] support
	* ext/tk/lib/tkextlib/itk  : add [incr Tk] support
	* ext/tk/lib/tkextlib/iwidgets : midway point of [incr Widgets] support
	* ext/tk/sample/tkextlib/iwidgets : very simple examples of
	  [incr Widgets]

Thu Jul  8 22:52:19 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/{rss,parser,0.9,1.0,2.0}.rb: supported RSS 0.9x/2.0
	  validation and validation which disregard order of elements.
	* test/rss/test_parser.rb: added tests for RSS 0.9x/2.0
	  validation.
	* test/rss/{test_trackback,rss-testcase}.rb: fixed no good method
	  name.

Thu Jul  8 00:05:23 2004  akira yamada  <akira@ruby-lang.org>

	* lib/tempfile.rb (Tempfile::initialize): got out code of
	  generating tmpname.  [ruby-dev:23832][ruby-dev:23837]

Wed Jul  7 15:53:14 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* string.c (rb_str_match): raise TypeError when both arguments are
	  strings. [ruby-dev:22869] (backported from HEAD)

	* string.c (rb_str_match2): removed.

	* Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub,
	  wince/Makefile.sub (string.c): now not depend on version.h.

Wed Jul  7 00:48:34 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/tk/lib/tkextlib/tktrans.rb,
	  ext/tk/lib/tkextlib/treectrl.rb: fix syntax errors.

Tue Jul  6 18:38:45 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib : improve framework of developping Tcl/Tk extension
	  wrappers

Mon Jul  5 23:56:42 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/{trackback,syndication,dublincore,content}.rb: worked
	  with ruby 1.6 again.

	* test/rss/rss-assertions.rb: ditto.

Mon Jul  5 22:54:39 2004  Tanaka Akira  <akr@m17n.org>

	* lib/uri/common.rb (Kernel#URI): new global method for parsing URIs.

Mon Jul  5 09:02:52 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_yield, rb_f_catch): 4th argument to rb_yield_0()
	  is a set of bit flags.  [ruby-dev:23859]

Mon Jul  5 01:27:32 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* lib/drb/drb.rb(DRbConn self.open): If socket pool is full, close
	  the socket whose last-access-time is oldest. (and add new one)
	  [ruby-dev:23860]

Sun Jul  4 12:24:50 2004  Kouhei Sutou  <kou@cozmixng.org>

	* lib/rss/rss.rb: added copyright header.

Sun Jul  4 00:24:40 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* added files
	  * lib/soap/attachment.rb
	  * lib/soap/header
	  * lib/soap/mimemessage.rb
	  * lib/soap/rpc/httpserver.rb
	  * lib/wsdl/soap/cgiStubCreator.rb
	  * lib/wsdl/soap/classDefCreator.rb
	  * lib/wsdl/soap/classDefCreatorSupport.rb
	  * lib/wsdl/soap/clientSkeltonCreator.rb
	  * lib/wsdl/soap/driverCreator.rb
	  * lib/wsdl/soap/mappingRegistryCreator.rb
	  * lib/wsdl/soap/methodDefCreator.rb
	  * lib/wsdl/soap/servantSkeltonCreator.rb
	  * lib/wsdl/soap/standaloneServerStubCreator.rb
	  * lib/wsdl/xmlSchema/enumeration.rb
	  * lib/wsdl/xmlSchema/simpleRestriction.rb
	  * lib/wsdl/xmlSchema/simpleType.rb
	  * lib/xsd/codegen
	  * lib/xsd/codegen.rb
	  * sample/soap/authheader
	  * sample/soap/raa2.4
	  * sample/soap/ssl
	  * sample/soap/swa
	  * sample/soap/whois.rb
	  * sample/soap/calc/samplehttpd.conf
	  * sample/soap/exchange/samplehttpd.conf
	  * sample/soap/sampleStruct/samplehttpd.conf
	  * sample/wsdl/raa2.4
	  * sample/wsdl/googleSearch/samplehttpd.conf
	  * test/openssl/_test_ssl.rb
	  * test/soap/header
	  * test/soap/ssl
	  * test/soap/struct
	  * test/soap/swa
	  * test/soap/wsdlDriver
	  * test/wsdl/multiplefault.wsdl
	  * test/wsdl/simpletype
	  * test/wsdl/test_multiplefault.rb

	* modified files
	  * lib/soap/baseData.rb
	  * lib/soap/element.rb
	  * lib/soap/generator.rb
	  * lib/soap/marshal.rb
	  * lib/soap/netHttpClient.rb
	  * lib/soap/parser.rb
	  * lib/soap/processor.rb
	  * lib/soap/property.rb
	  * lib/soap/soap.rb
	  * lib/soap/streamHandler.rb
	  * lib/soap/wsdlDriver.rb
	  * lib/soap/encodingstyle/handler.rb
	  * lib/soap/encodingstyle/literalHandler.rb
	  * lib/soap/encodingstyle/soapHandler.rb
	  * lib/soap/mapping/factory.rb
	  * lib/soap/mapping/mapping.rb
	  * lib/soap/mapping/registry.rb
	  * lib/soap/mapping/rubytypeFactory.rb
	  * lib/soap/mapping/wsdlRegistry.rb
	  * lib/soap/rpc/cgistub.rb
	  * lib/soap/rpc/driver.rb
	  * lib/soap/rpc/element.rb
	  * lib/soap/rpc/proxy.rb
	  * lib/soap/rpc/router.rb
	  * lib/soap/rpc/soaplet.rb
	  * lib/soap/rpc/standaloneServer.rb
	  * lib/wsdl/data.rb
	  * lib/wsdl/definitions.rb
	  * lib/wsdl/operation.rb
	  * lib/wsdl/parser.rb
	  * lib/wsdl/soap/definitions.rb
	  * lib/wsdl/xmlSchema/complexContent.rb
	  * lib/wsdl/xmlSchema/complexType.rb
	  * lib/wsdl/xmlSchema/data.rb
	  * lib/wsdl/xmlSchema/parser.rb
	  * lib/wsdl/xmlSchema/schema.rb
	  * lib/xsd/datatypes.rb
	  * lib/xsd/qname.rb
	  * sample/soap/calc/httpd.rb
	  * sample/soap/exchange/httpd.rb
	  * sample/soap/sampleStruct/httpd.rb
	  * sample/soap/sampleStruct/server.rb
	  * sample/wsdl/amazon/AmazonSearch.rb
	  * sample/wsdl/amazon/AmazonSearchDriver.rb
	  * sample/wsdl/googleSearch/httpd.rb
	  * test/soap/test_basetype.rb
	  * test/soap/test_property.rb
	  * test/soap/test_streamhandler.rb
	  * test/soap/calc/test_calc.rb
	  * test/soap/calc/test_calc2.rb
	  * test/soap/calc/test_calc_cgi.rb
	  * test/soap/helloworld/test_helloworld.rb
	  * test/wsdl/test_emptycomplextype.rb
	  * test/wsdl/axisArray/test_axisarray.rb
	  * test/wsdl/datetime/test_datetime.rb
	  * test/wsdl/raa/test_raa.rb
	  * test/xsd/test_xmlschemaparser.rb
	  * test/xsd/test_xsd.rb

	* summary
	  * add SOAP Header mustUnderstand support.

	  * add HTTP client SSL configuration and Cookies support (works
	    completely with http-access2).

	  * add header handler for handling sending/receiving SOAP Header.

	  * map Ruby's anonymous Struct to common SOAP Struct in SOAP Object
	    Model.  it caused error.

	  * add WSDL simpleType support to restrict lexical value space.

	  * add SOAP with Attachment support.

Sat Jul  3 17:19:44 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/tk/lib/tkextlib/tkDND.rb: fix syntax error.

Thu Jul  1 23:15:29 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/pstore.rb (transaction): safer backup scheme.  [ruby-list:39102]

	* lib/pstore.rb (commit_new): use FileUtils.copy_stream for Cygwin.
	  [ruby-dev:23157]

	* lib/pstore.rb (transaction): allow overriding dump and load.
	  [ruby-dev:23567]

	* lib/pstore.rb (PStore#transaction): get rid of opening in write mode
	  when read only transaction.  [ruby-dev:23842]

	* lib/yaml/store.rb: follow lib/pstore.rb's change.

Thu Jul  1 18:36:08 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tcltklib : bug fix

	* ext/tk/lib/tk : bug fix and add Tcl/Tk extension support libraries

Thu Jul  1 11:59:45 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: check for EVP_CIPHER_CTX_copy, ENGINE_add,
	  EVP_CIPHER_CTX_set_padding, EVP_CipherFinal_ex, EVP_CipherInit_ex,
	  EVP_DigestFinal_ex and EVP_DigestInit_ex.

	* ext/openssl/openssl_missing.c (EVP_CIPHER_CTX_copy): new function.

	* ext/openssl/openssl_missing.h (EVP_DigestInit_ex, EVP_DigestFinal_ex,
	  EVP_CipherInit_ex, EVP_CipherFinal_ex, HMAC_Init_ex): new macro for
	  OpenSSL 0.9.6.

	* ext/openssl/ossl_cipher.c (ossl_cipher_encrypt, ossl_cipher_decrypt):
	  re-implemnt (the arguments for this method is ).

	* ext/openssl/ossl_cipher.c (ossl_cipher_pkcs5_keyivgen): new method
	  OpenSSL::Cipher::Cipher#pkcs5_keyivgen. it calls EVP_BytesToKey().

	* ext/openssl/ossl_cipher.c (ossl_cipher_alloc, ossl_cipher_initialize,
	  ossl_cipher_copy, ossl_cipher_reset ossl_cipher_final,
	  ossl_cipher_set_key, ossl_cipher_set_iv): replace all EVP_CipherInit
	  and EVP_CipherFinal into EVP_CipherInit_ex and EVP_CipherFinal_ex.
	  and EVP_CIPHER_CTX_init should only be called once.

	* ext/openssl/ossl_cipher.c (ossl_cipher_set_key_length): new method
	  OpenSSL::Cipher::Cipher#key_len=.

	* ext/openssl/ossl_cipher.c (ossl_cipher_init_deprecated): new
	  finction; print warning for Cipher#<<.

	* ext/openssl/ossl_digest.c: replace all EVP_DigestInit and
	  EVP_DigestFinal into EVP_DigestInit_ex and EVP_DigestFinal_ex.
	  and EVP_MD_CTX_init should only be called once.

	* ext/openssl/ossl_digest.c (digest_final): should call
	  EVP_MD_CTX_cleanup to avoid memory leak.

	* ext/openssl/ossl_hmac.c (ossl_hmac_initialize): repalce HMAC_init
	  into HMAC_init_ex. and HMAC_CTX_init is moved to ossl_hmac_alloc.

	* ext/openssl/ossl_hmac.c (hmac_final): should call
	  HMAC_CTX_cleanup to avoid memory leak.

	* test/openssl/test_cipher.rb, test/openssl/test_digest.rb,
	  test/openssl/test_hmac.rb: new file.

Thu Jul  1 04:08:30 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (ossl_i2d_ASN1_TYPE, ossl_ASN1_TYPE_free):
	  workaround for the versions earlier than OpenSSL-0.9.7.

Thu Jul  1 03:33:55 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_pkey_dh.c (ossl_dh_initialize): should create
	  empty pkey object if no argument is passed. [ruby-talk:103328]

	* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize): ditto.

	* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize): ditto.

	* ext/openssl/ossl_pkey_dh.c: add new methods: OpenSSL::PKey::DH#p,
	  OpenSSL::PKey::DH#p=, OpenSSL::PKey::DH#g, OpenSSL::PKey::DH#g=,
	  OpenSSL::PKey::DH#pub_key, OpenSSL::PKey::DH#pub_key=,
	  OpenSSL::PKey::DH#priv_key and OpenSSL::PKey::DH#priv_key=.

	* ext/openssl/ossl_pkey_dsa.c: add new methods: OpenSSL::PKey::DSA#p,
	  OpenSSL::PKey::DSA#p=, OpenSSL::PKey::DSA#q, OpenSSL::PKey::DSA#q=,
	  OpenSSL::PKey::DSA#g, OpenSSL::PKey::DSA#g=,
	  OpenSSL::PKey::DSA#pub_key, OpenSSL::PKey::DSA#pub_key=,
	  OpenSSL::PKey::DSA#priv_key and OpenSSL::PKey::DSA#priv_key=.

Thu Jul  1 03:16:09 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_read): take optional second argument
	  to specify a string to be written.

	* ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#read):
	  take optional second argument to specify a string to be written.

	* ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#gets):
	  refine regexp for end-of-line.

	* ext/opnessl/lib/openssl/ssl.rb
	  (OpenSSL::SSL::SocketForwarder#listen): fix typo.

Wed Jun 30 11:38:51 2004  Mikael Brockman  <phubuh@phubuh.org>

	* parse.y (primary): should not be NULL.  [ruby-core:03098]

Wed Jun 30 02:53:24 2004  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/rubyext.c (syck_emitter_new): set buffer after
	  Data_Wrap_Struct to avoid possible GC. [ruby-talk:104835]

Tue Jun 29 10:31:19 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.

	* gc.c (define_final, run_final): preserve and restore safe level for
	  finalizers.  [ruby-core:03058]

	* signal.c (signal_exec, rb_trap_exit, trap): preserve and restore
	  safe level for signal handlers.  [ruby-dev:23829]

Mon Jun 28 14:57:56 2004  Jeff Mitchell  <quixoticsycophant@yahoo.com>

	* configure.in, lib/mkmf.rb (LIBPATHFLAG): use double quotes due to
	  DOSISH compilers.  [ruby-core:03107]

Mon Jun 28 00:30:19 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* sample/drb/*.rb: using 'DRb.thread.join' instead of 'gets'

Sun Jun 27 22:39:51 2004  Kouhei Sutou  <kou@cozmixng.org>

	* sample/rss/tdiary_plugin/rss-recent.rb: supported Hiki.

Sun Jun 27 12:19:46 2004  Kouhei Sutou  <kou@cozmixng.org>

	* {lib,sample,test}/rss: added RSS Parser. [ruby-dev:23780]

Sat Jun 26 11:07:30 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (aix): -b must come at the start of the command line,
	  and -e must not appear while testing libraries.  [ruby-talk:104501]

	* lib/mkmf.rb (dir_config): quote directory names if necessary.
	  [ruby-talk:104505]

Fri Jun 25 15:33:19 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/extconf.rb: check stricter.  [ruby-talk:104501]

	* ext/iconv/extconf.rb: include iconv.h for libiconv.  [ruby-dev:22715]

Fri Jun 25 08:31:29 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_thread_atfork): remove "fork terminates thread"
	  warning.  [ruby-dev:23768]

	* object.c (rb_obj_clone): backport FL_FINALIZE patch from 1.9.
	  [ruby-core:02786][ruby-core:03067]

	* ext/socket/socket.c (sock_sockaddr): Socket#gethostbyname()
	  should give us packed address, not struct sockaddr.
	  [ruby-core:03053]

Fri Jun 25 02:04:23 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* {bcc32,win32,wince}/setup.mak: remove RUBY_EXTERN lines when
	  including version.h. [ruby-talk:104456] (backported from HEAD)

Thu Jun 24 14:23:29 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_fread): return already read data when system call is
	  interrupted.  [ruby-talk:97206]

Thu Jun 24 01:32:43 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* version.h: added declarations of ruby_version,
	  ruby_release_date, ruby_platform.
	  (backported from HEAD)

Wed Jun 23 22:23:37 2004  Dave Thomas  <dave@pragprog.com>

	* ext/socket/socket.c (sock_s_gethostbyaddr): Work around problem
	  with OS X not returning 'from' parameter to recvfrom for
	  connection-oriented sockets.

Wed Jun 23 01:45:27 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_quotation):
	  Fix problem with the 'r' being dropped from %r{xxx}

Wed Jun 23 00:20:20 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/win32ole/win32ole.c (ole_hresult2msg): remove trailing
	  CRs and LFs. (doesn't depend on CR+LF) [ruby-dev:23749]

Wed Jun 23 00:00:25 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_initialize): should check fcntl result.  [ruby-dev:23742]

Tue Jun 22 21:11:36 2004  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (OLE_FREE): should not call CoFreeUnuse-
	  dLibraries().

	* ext/win32ole/win32ole.c (ole_event_free): ditto.

	* ext/win32ole/win32ole.c (ole_hresult2msg): truncate error message
	  before CR.

Tue Jun 22 16:47:42 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/ftp.rb (MDTM_REGEXP): fix for demon's ftp server.
	  Thanks, Rutger Nijlunsing.

Mon Jun 21 10:19:23 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (rb_w32_opendir): use FindFirstFile()/FindNextFile()/
	  FindClose() instead of _findfirst()/_findnext()/_findclose().
	  merge from HEAD.

Sat Jun 19 13:24:15 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (method_call): allow changing $SAFE.  [ruby-dev:23713]

Fri Jun 18 23:12:22 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (proc_save_safe_level, rb_set_safe_level, safe_setter): limit
	  safe level.

Wed Jun 16 23:05:57 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* object.c (rb_mod_freeze): prepare string representation before
	  freezing. [ruby-talk:103646]

Wed Jun 16 16:04:40 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* object.c (rb_mod_le): singleton class inherits Class rather than its
	  object's class.  [ruby-dev:23690]

Wed Jun 16 16:01:17 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (stack_grow_direction): memoize the direction.

	* gc.c (Init_stack): should always move to end of VALUE.

Tue Jun 15 12:10:04 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: bug fix (TkWindow#grab)

Mon Jun 14 18:23:27 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/remote-tk.rb: bug fix

Sun Jun 13 00:23:04 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/extconf.rb: [EXPERIMENTAL] MacOS X (darwin) support

	* ext/tcltklib/tcltklib.c: fix thread trouble on callback proc, and
	  eliminate warning about instance variable access

	* ext/tk/lib/tk/menubar.rb: improve supported menu_spec

	* ext/tk/lib/tk/menuspec.rb: [add] menu_spec support library

	* ext/tk/lib/tk/root.rb: add menu_spec support

	* ext/tk/lib/tk/text.rb: bug fix

	* ext/tk/lib/tk/toplevel.rb: add menu_spec support

	* ext/tk/sample/menubar?.rb: [add] sample of menu_spec usage

Sat Jun 12 11:15:53 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (target_os): strip -gnu suffix on Linux.

Fri Jun 11 17:08:21 2004  Akinori MUSHA  <knu@iDaemons.org>

	* config.guess: Restore a wrongly removed hyphen.

Fri Jun 11 14:30:08 2004  Akinori MUSHA  <knu@iDaemons.org>

	* config.guess: Attempt to avoid system name change on
	  Darwin platforms also.

Fri Jun 11 14:22:45 2004  Akinori MUSHA  <knu@iDaemons.org>

	* config.guess, config.sub: Attempt to avoid system name change on
	  Linux platforms.  We have been using "linux" instead of
	  "linux-gnu" on this branch.

Thu Jun 10 19:19:41 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/sdbm/init.c (fsdbm_store): sdbm should use StringValue().
	  [ruby-talk:103062]

Wed Jun  9 18:04:14 2004  akira yamada  <akira@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic::merge,
	  URI::Generic::route_from): accepts non-hierarchical URI.
	  [ruby-dev:23631]

	* test/uri/test_generic.rb (TestGeneric::test_route,
	  TestGeneric::test_merge): added tests for above changes.

Wed Jun  9 17:39:37 2004  Akinori MUSHA  <knu@iDaemons.org>

	* config.guess, config.sub: Update to a more recent version as of
	  2004-01-20.

	* configure.in: Add support for DragonFly BSD.

Wed Jun  2 20:16:03 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (str_new4): should share shared instance if it already
	  exists.  [ruby-dev:23665]

Wed Jun  2 12:41:53 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_gets_m): set lastline ($_) even when read line is
	  nil.  [ruby-dev:23663]

Fri May 28 11:20:31 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): bad influence on frame node.

	* eval.c (eval): reverted wrongly removed condition.  [ruby-dev:23638]

Thu May 27 23:15:18 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb: leading 0 padding of timestamp usec part.

	* lib/csv.rb (CSV.parse): [CAUTION] behavior changed.  in the past,
	  CSV.parse accepts a filename to be read-opened (it was just a
	  shortcut of CSV.open(filename, 'r')).  now CSV.parse accepts a
	  string or a stream to be parsed e.g.
	  CSV.parse("1,2\n3,r") #=> [['1', '2'], ['3', '4']]

	* lib/csv.rb: CSV::Row and CSV::Cell are deprecated.  these classes
	  are removed in the future.  in the new csv.rb, row is represented
	  as just an Array.  since CSV::Row was a subclass of Array, it won't
	  hurt almost all programs except one which depended CSV::Row#match.
	  and a cell is represented as just a String or nil(NULL).  this
	  change will cause widespread destruction.

	      CSV.open("foo.csv", "r") do |row|
		row.each do |cell|
		  if cell.is_null       # using Cell#is_null
		    p "(NULL)"
		  else
		    p cell.data         # using Cell#data
		  end
		end
	      end

	    must be just;

	      CSV.open("foo.csv", "r") do |row|
		row.each do |cell|
		  if cell.nil?
		    p "(NULL)"
		  else
		    p cell
		  end
		end
	      end

	* lib/csv.rb: [CAUTION] record separator(CR, LF, CR+LF) behavior
	  change.  CSV.open, CSV.parse, and CSV,generate now do not force
	  opened file binmode.  formerly it set binmode explicitly.

	  with CSV.open, binmode of opened file depends the given mode
	  parameter "r", "w", "rb", and "wb".  CSV.parse and CSV.generate open
	  file with "r" and "w".

	  setting mode properly is user's responsibility now.

	* lib/csv.rb: accepts String as a fs (field separator/column separator)
	  and rs (record separator/row separator)

	* lib/csv.rb (CSV.read, CSV.readlines): added.  works as IO.read and
	  IO.readlines in CSV format.

	* lib/csv.rb: added CSV.foreach(path, rs = nil, &block).  CSV.foreach
	  now does not handle "| cmd" as a path different from IO.foreach.
	  needed?

	* test/csv/test_csv.rb: updated.

	* test/ruby/test_float.rb: added test_strtod to test Float("0").

Thu May 27 21:37:50 2004  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#initialize): refine pathname initialization
	  by pathname.

Thu May 27 20:22:05 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* io.c (rb_io_fwrite): check all case errno != 0 [ruby-dev:23648]

Thu May 27 14:53:13 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* io.c (rb_io_fwrite): workaround for bcc32's fwrite bug.
	  add errno checking.  [ruby-dev:23627]

Wed May 26 14:19:42 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval, eval): make line number consistent on eval with
	  Proc.  [ruby-talk:101253]

Wed May 26 13:59:17 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::skip_for_variable): Allow for
	  'do' after for statement

Wed May 26 13:56:03 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb (Generators::MarkUp::style_url): Fix
	  relative path to code CSS file

Wed May 26 13:14:52 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_init_copy): copy also positions.  [ruby-talk:100910]

Wed May 26 00:00:00 2004  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/syck.c (syck_new_parser): clear parser on init.
	  thanks, ts. [ruby-core:02931]

	* ext/syck/token.c (sycklex_yaml_utf8): buffer underflow.
	  thanks, ts. [ruby-core:02929]

	* lib/yaml/baseemitter.rb (indent_text): simpler flow block code.

	* lib/yaml.rb: added rdoc to beginning of lib.

Mon May 24 10:46:26 2004  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/rdoc/generators/template/html/html.rb: SYSTEM identifiers
	  must be absolute URIs

Sat May 22 12:00:04 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* MANIFEST: add new encodings in rexml.

	* ext/tk/MANIFEST: add recent files.

Sat May 22 05:37:11 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/remote-tk.rb: (NEW library) controll Tk interpreters
	  on the other processes by Tcl/Tk's 'send' command

Fri May 21 09:22:05 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method_parameters):
	  Add ()'s around parameters that don't have them

Thu May 20 17:02:03 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (check_sizeof): define result size.  [ruby-core:02911]

	* lib/mkmf.rb (create_header): macro name should not include equal
	  sign.

Thu May 20 15:59:50 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* ext/socket/socket.c: fix SEGV. [ruby-dev:23550]

Thu May 20 14:35:52 2004  Tanaka Akira  <akr@m17n.org>

	* ext/socket/socket.c: check SCM_RIGHTS macro addition to
	  the msg_control field to test existence of file descriptor passing
	  by msg_control.

Thu May 20 12:38:06 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (flo_eq): always check if operands are NaN.
	  [ruby-list:39685]

Thu May 20 12:34:39 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_visibility):
	  At Ryan Davis' suggestion, honor visibility modifers if guarded by a
	  statement modifier

Thu May 20 12:22:13 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_type): do not check pointer to incomplete type,
	  which always get compiled.  [ruby-list:39683]

Wed May 19 11:09:00 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: change permition of TkObject#tk_send from
	  private to public

Tue May 18 14:00:46 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* node.h (NEW_DSTR): adjust list length.

	* parse.y (literal_concat): ditto.

Mon May 17 16:14:25 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* numeric.c (flo_to_s): it's preferable that "p 0.0" outputs "0.0"
	  instead of "0.0e+00". [ruby-dev:23480]

	* numeric.c (flo_to_s): it's preferable that "p 0.00000000000000000001"
	  outputs "1.0e-20" instead of "9.999999999999999e-21". (the precision
	  is considered, but there is assumption DBL_DIG == 15 in current
	  implementation)

Mon May 17 10:13:33 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (setup_domain_and_type): honor duck typing.
	  [ruby-dev:23522]

	* ext/socket/socket.c (sock_s_getnameinfo): ditto.

Mon May 17 01:15:23 2004  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml.rb: removed fallback to pure Ruby parser.

	* lib/yaml/baseemitter.rb (indent_text): was forcing a mod value
	  of zero at times, which kept some blocks from getting indentation.

	* lib/yaml/baseemitter.rb (node_text): rewriting folded scalars.

	* ext/syck/syck.h: reports style of scalars now, be they plain, block
	  single-, or double-quoted.

	* ext/syck/syck.c: ditto.

	* ext/syck/gram.c: ditto.

	* ext/syck/node.c: ditto.

	* ext/syck/token.c: ditto.

	* ext/syck/rubyext.c (yaml_org_handler): symbols loaded only
	  if scalar style is plain.

	* ext/syck/rubyext.c (yaml_org_handler): some empty strings were
	  loaded as symbols.

	* test/yaml/test_yaml.rb (test_perl_regexp): updated test to
	  match new regexp serialization.

Mon May 17 00:03:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/drb/drb.rb: Cosmetic documentation changes.

Sun May 16 22:36:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/test/unit.rb: Removed :nodoc: directive (it prevented effective
	  RDoc operation), and added file-level comment.

Sun May 16 20:55:49 2004  Tanaka Akira  <akr@m17n.org>

	* ext/dbm/dbm.c (fdbm_initialize): accept optional 3rd argument to
	  specify an open flag.
	  (Init_dbm): define open flags: DBM::READER, DBM::WRITER, DBM::WRCREAT
	  and DBM::NEWDB.

Sun May 16 13:10:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/test/unit/**/*.rb: Removed :nodoc: directives (many were
	  generating warnings, many were on private methods).

Sat May 15 01:41:34 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (eval): forgot to restore $SAFE value before evaluating
	  compiled node.  [ruby-core:02872]

Sat May 15 01:33:12 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* range.c (range_each_func): terminates loop if generating value
	  is same to @end.  [ruby-talk:100269]

Fri May 14 22:08:38 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_new4): should not reuse frozen shared string if
	  the original is not an instance of String. [ruby-talk:100193]

Fri May 14 18:39:25 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/canvas.rb: improve coords support for canvas items.
	  Now, supports all of the followings.
	    TkcLine.new(c, 0, 0, 100, 100, :fill=>'red')
	    TkcLine.new(c, [0, 0, 100, 100], :fill=>'red')
	    TkcLine.new(c, [0, 0], [100, 100], :fill=>'red')
	    TkcLine.new(c, [[0, 0], [100, 100]], :fill=>'red')
	    TkcLine.new(c, :coords=>[0, 0, 100, 100], :fill=>'red')
	    TkcLine.new(c, :coords=>[[0, 0], [100, 100]], :fill=>'red')

Fri May 14 12:11:43 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* util.c (ruby_strtod): strtod("0", &end); => end should point '\0'.
	 [ruby-dev:23498]

Thu May 13 15:47:30 2004  akira yamada  <akira@ruby-lang.org>

	* lib/net/telnet.rb (Net::Telnet::login): "options" can specify
	  regexps for login prompt and/or password prompt.

Thu May 13 14:23:45 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* hash.c (delete_if_i): use st_delete_safe() (via
	  rb_hash_delete()) instead of returning ST_DELETE.
	  backport from HEAD.  [ruby-dev:23487]

Thu May 13 13:01:30 2004  akira yamada  <akira@ruby-lang.org>

	* lib/uri/mailto.rb (URI::MailTo::to_s): should include fragment.

Thu May 13 11:04:08 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* pack.c (pack_pack): always add with null for 'Z'.

	* pack.c (pack_unpack): terminated by null for 'Z'.  [ruby-talk:98281]

Wed May 12 19:59:43 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (have_type, check_sizeof): replace unusable characters.
	  [ruby-talk:99788]

Wed May 12 17:41:42 2004  Tanaka Akira  <akr@m17n.org>

	* lib/resolv.rb (Resolv::DNS::Config): make it configurable without
	  external file such as /etc/resolv.conf.

Wed May 12 14:37:27 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509name.c: attribute value of DC (short name of
	  domainComponent) should be IA5String.

Wed May 12 13:20:19 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk/composite.rb: improve configure methods (based on
	  the proposal of [ruby-talk:99671]).

Wed May 12 11:51:08 2004  Dave Thomas  <dave@pragprog.com>

	* class.c (rb_obj_singleton_methods): fix rdoc

Mon May 10 21:44:42 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Change scheme for
	  looking up symbols in  HTML generator.

Mon May 10 16:45:21 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (eval): warning during eval should not cause deadlock.
	  [ruby-talk:98651]

	* eval.c (rb_eval): raise TypeError exception for superclass
	  mismatch.  [ruby-list:39567]

Mon May 10 12:11:37 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Hack to search parents
	  for unqualified constant names.

Mon May 10 12:11:37 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Hack to search parents
	  for unqualified constant names.

Sun May  9 22:37:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/net/ftp.rb: improved documentation
	* lib/net/imap.rb: ditto
	* lib/net/pop.rb: ditto
	* lib/net/smtp.rb: ditto
	* lib/net/telnet.rb: ditto

Fri May  7 21:50:21 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::parse_include): Allow
	  multiple arguments to 'include'

Fri May  7 21:31:56 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (fu_list): Array() breaks pathes including "\n".
	  [ruby-core:02843]

Fri May  7 11:25:53 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* util.c (ruby_strtod): "0.0000000000000000001" should be converted
	  to 1.0e-19 instead of 0.0. (leading zeros aren't significant digits)
	  [ruby-talk:99318] [ruby-dev:23465]

Fri May  7 10:00:05 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/tkutil.c (get_eval_string_core): bug fix. [ruby-dev:23466]

Thu May  6 22:13:17 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* ext/socket/socket.c (ippaddr): use NUMERICHOST if can not resolve
	  hostname.

Thu May  6 14:22:29 2004  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml/rubytypes.rb (to_yaml): added instance variable handling
	  for Ranges, Strings, Structs, Regexps.

	* lib/yaml/rubytypes.rb (to_yaml_fold): new method for setting a
	  String's flow style.

	* lib/yaml.rb (YAML::object_maker): now uses Object.allocate.

	* ext/syck/gram.c: fixed transfer methods on structs, broke it
	  last commit.

Thu May  6 11:40:28 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (string): accept NIL.

	* lib/net/imap.rb (body_type_basic): allow body-fields omissions.

Thu May  6 01:59:04 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb (Generators::HtmlMethod::params):
	  Don't include the &block parameter if we have explicit
	  yield parameters.

Wed May  5 03:40:29 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/ring.rb: use recv instead of recvfrom.

Tue May  4 23:52:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/gserver.rb: documented

Tue May  4 23:46:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/xmlrpc/README.txt: introduced for documentation purposes

Mon May  3 09:47:24 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method_or_yield_parameters):
	  Fix parsing bug if yield called within 1 line block

Sun May  2 01:04:38 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib, ext/tk: renewal Ruby/Tk

Fri Apr 30 20:08:41 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* time.c (SIZEOF_TIME_T): support SIZEOF_TIME_T == SIZEOF_INT.

Tue Apr 27 13:12:42 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): too many line trace call. (ruby-bugs PR#1320)

Tue Apr 27 08:41:28 2004  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml/rubytypes.rb: passing Range tests.

	* ext/syck/syck.h: version 0.44.

	* ext/syck/gram.c: transfers no longer open an indentation.
	  fixed transfers which precede blocks.

	* ext/syck/token.c: ditto.

	* ext/syck/syck.c: fixed segfault if an anchor has been released already.

	* ext/syck/node.c (syck_free_members): organized order of free'd nodes.

	* ext/syck/rubyext.c (syck_emitter_write_m): test for proper string with
	  StringValue.

Mon Apr 26 23:56:54 2004  Daniel Kelley  <news-1082945587@dkelley.gmp.san-jose.ca.us>

	* README.EXT, README.EXT.ja: fixed wrong function signature.
	  [ruby-talk:98349]

Mon Apr 26 21:40:09 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/code_objects.rb (RDoc::Context::add_alias): Only alias
	  to instance methods.

Sat Apr 24 10:38:31 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/markup/simple_markup.rb (SM::SimpleMarkup::group_lines):
	  Fix bug where consecutive headings are merged.

Fri Apr 23 23:26:13 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb: $hdrdir should not contain macros for backward
	  compatibility.  [bruby-dev:28]

	* version.c (ruby_show_copyright): obtain copyright year from
	  RUBY_RELEASE_YEAR.

	* win32/resource.rb: ditto.

	* win32/resource.rb: default rubyw icon to ruby.ico, and let DLL also
	  include them.

	* win32/resource.rb: include winver.h for older WindowsCE.

Fri Apr 23 16:38:46 2004  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb: sync taint/freeze flag between
	  a pathname object and its internal string object.

Fri Apr 23 14:52:08 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (stmt, arg, aref_args): should not make sole splat into
	  array, in aref_args other than aref with op_asgn.

Fri Apr 23 14:14:38 2004  Tanaka Akira  <akr@m17n.org>

	* lib/resolv.rb: don't use Regexp#source to embed regexps.
	  [ruby-dev:23432]

Thu Apr 22 04:15:36 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (aref_args): should pass expanded list.  [ruby-core:02793]

Thu Apr 22 01:12:57 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (flo_to_s): tweak output string based to preserve
	  decimal point and to remove trailing zeros.  [ruby-talk:97891]

	* string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM
	  search.  [ruby-talk:97342]

Wed Apr 21 22:57:27 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/rinda.rb, test/rinda/test_rinda.rb: check Hash tuple size.

Wed Apr 21 20:05:00 2004  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::HTTP#proxy_open): set Host: field explicitly.
	  [ruby-list:39542]

Mon Apr 19 18:11:15 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* hash.c (rb_hash_equal): returns true if two hashes have same set
	  of key-value set.  [ruby-talk:97559]

	* hash.c (rb_hash_eql): returns true if two hashes are equal and
	  have same default values.

Mon Apr 19 08:19:58 2004  Doug Kearns  <djkea2@mugca.its.monash.edu.au>

	* dln.c, io.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb, lib/date.rb,
	  lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, lib/matrix.rb,
	  lib/monitor.rb, lib/set.rb, lib/thwait.rb, lib/timeout.rb,
	  lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, lib/net/ftp.rb,
	  lib/net/http.rb, lib/net/imap.rb, lib/net/telnet.rb,
	  lib/racc/parser.rb, lib/rinda/rinda.rb, lib/rinda/tuplespace.rb,
	  lib/shell/command-processor.rb, lib/soap/rpc/soaplet.rb,
	  lib/test/unit/testcase.rb, lib/test/unit/testsuite.rb: typo fix.

Mon Apr 19 08:14:18 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_body): Allow for
	  #ifdef HAVE_PROTOTYPES

Fri Apr 16 22:33:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* ext/iconv/iconv.c: nearly finished RDoc comments.

Fri Apr 16 17:04:07 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_equal): always returns true or false, never
	  returns nil. [ruby-dev:23404]

Fri Apr 16 08:27:02 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: skip linking when libraries to be preloaded not
	  compiled.  [ruby-list:39561]

Thu Apr 15 23:21:52 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* process.c (pst_success_p): new method Process::Status#success?.
	  [ruby-dev:23385]

Thu Apr 15 17:12:13 2004  Tanaka Akira  <akr@m17n.org>

	* ext/gdbm/gdbm.c (Init_gdbm): define GDBM::READER, GDBM::WRITER,
	  GDBM::WRCREAT and GDBM::NEWDB.
	  (fgdbm_initialize): use specified read/write flag.

Wed Apr 14 11:29:56 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* numeric.c (flo_eq): workaround for bcc32's bug.
	  (ruby-bugs-ja:PR#594)

Wed Apr 14 13:06:35 2004  Doug Kearns  <djkea2@mugca.its.monash.edu.au>

	* array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,
	  process.c, re.c, string.c: typos in RDoc comments.  [ruby-core:02783]

Wed Apr 14 11:06:38 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::scan): Changed
	  behavior of :enddoc: -- it now unconditionally terminates
	  processing of the current file.

Wed Apr 14 11:03:22 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* defines.h: include <net/socket.h> to get fd_set definition in BeOS.

Tue Apr 13 23:06:30 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/rinda.rb: change pattern matching.
	  a === b -> a == b || a === b. [druby-ja:98]

	* test/rinda/test_rinda.rb: ditto.

Tue Apr 13 19:54:29 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: should not overwrite HTTP request header.
	  [ruby-list:39543]

Tue Apr 13 01:30:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* ext/iconv/iconv.c: RDoc documentation (from RD; nearly finished).
	* ext/iconv/charset_alias.rb: Prevent from RDoc'ing.

Mon Apr 12 19:11:29 2004  Eric Hodel  <drbrain@segment7.net>

	* gc.c (rb_gc_copy_finalizer): typo.  [ruby-core:02774]

Mon Apr 12 18:52:32 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509name.c (ossl_x509name_init_i): should return
	  a value.

Mon Apr 12 10:43:47 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* dir.c (rb_glob2, rb_glob, rb_globi, push_globs, push_braces,
	  rb_push_glob): fix memory leak. (leaked when block was interrupted)

Mon Apr 12 10:27:37 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: backport SIZEOF_TIME_T definition from 1.9.

	* win32/Makefile.sub: ditto.

	* wince/Makefile.sub: ditto.

Sun Apr 11 19:12:35 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ruby.c (require_libraries): restore source file/line after
	  statically linked extensions initialized.  [ruby-dev:23357]

Sun Apr 11 10:47:04 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/code_objects.rb (RDoc::TopLevel::add_class_or_module): Toplevel
	  classes and modules are a special case too... (handle extending existing
	  classes with or without :enddoc:)

Sat Apr 10 23:51:13 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/code_objects.rb (RDoc::Context::add_to): Implementation of :enddoc:
	  made one too many assumptions...

Sat Apr 10 00:00:19 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/markup/simple_markup/inline.rb: Fix problem
	  with \_cat_<b>dog</b>

Wed Apr  7 00:19:50 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/rinda.rb: fix hash tuple bug.

	* lib/rinda/tuplespace.rb: ditto.

	* test/rinda/test_rinda.rb

Tue Apr  6 18:24:18 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_reopen): should use rb_io_check_io().

Tue Apr  6 16:46:09 2004  Tanaka Akira  <akr@m17n.org>

	* configure.in: check the size of time_t.

	* time.c (time_add): new function.
	  (time_plus): use time_add.
	  (time_minus): use time_add.

Tue Apr  6 13:21:30 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/socket.c (make_hostent): must return value.

Tue Apr  6 00:05:30 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/rinda.rb: add require 'drb/drb'

Mon Apr  5 08:18:23 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/rdoc.rb: Remove leading ./ from file names so that cross
	  references work properly.

Sun Apr  4 20:33:42 2004  Minero Aoki  <aamine@loveruby.net>

	* eval.c (Init_load): make $LOADED_FEATURES built-in.
	  [ruby-dev:23299]

	* ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in.

	* lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME.

Sun Apr  4 14:01:20 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/options.rb (Options::parse): Allow multiple -x options to RDoc.
	  Fix bug where files weren't being excluded properly

Sat Apr  3 17:11:05 2004  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/syck.h: version 0.43.

	* ext/syck/lib/gram.c: allow root-level inline collections.
	 [ruby-talk:94922]

	* lib/yaml/rubytypes.rb (Symbol#to_yaml): emit symbols as implicits.
	 [ruby-talk:94930]

	* ext/syck/bytecode.c: turn off default implicit typing.

	* ext/syck/implicit.c: detect base60 integers.

	* ext/syck/rubyext.c: handle base60, as well as hex and octal
	  with commas.  implicit typing of ruby symbols.

Fri Apr  2 17:27:17 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (top_include): include in the wrapped load is done for
	  the wrapper, not for a singleton class for wrapped main.
	  [ruby-dev:23305]

Fri Apr  2 15:13:44 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_eq): use temporary double variable to save the
	  result (internal float register may be bigger than 64 bits, for
	  example, 80 bits on x86).  [ruby-dev:23311]

Fri Apr  2 14:35:26 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (block_pass): should generate unique identifier of the
	  pushing block.  [ruby-talk:96363]

Fri Apr  2 07:31:38 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/socket.c (make_hostent): fix memory leak, based on
	  the patch from HORIKAWA Hisashi <vzw00011@nifty.ne.jp>.

Thu Apr  1 22:55:33 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb: Allow rdoc comments in
	  =begin rdoc/=end

	* lib/rdoc/parsers/parse_rb.rb: Fix problem with comment in
	  top-level method being taken as file comment.

Thu Apr  1 22:55:04 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_options.rb: Fix undefined variable warning.

Thu Apr  1 19:58:37 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/mapping/{factory.rb,registry.rb}: fixed illegal mapped URI
	  object with soap/marshal.
	  added URIFactory class for URI mapping.  BasetypeFactory checks
	  instance_variables when original mapping is not allowed (ivar must
	  be empty).  Instance of URI have instance_variables but it must be
	  llowed whenever original mapping is allowed or not.

	* lib/xsd/datatypes.rb: check the smallest positive non-zero
	  single-precision float exactly instead of packing with "f".
	  [ruby-talk:88822]

	* lib/soap/mapping/rubytypeFactory.rb: should not dump singleton class.
	  [ruby-dev:22588]
	  c = class << Object.new; class C; self; end; end; SOAPMarshal.dump(c)

Wed Mar 31 19:06:23 2004  Tanaka Akira  <akr@m17n.org>

	* time.c (year_leap_p): new function.
	  (timegm_noleapsecond): ditto.
	  (search_time_t): use timegm_noleapsecond instead of
	  mktime for first guess.

Wed Mar 31 12:04:04 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/delegate.rb (DelegateClass): define internal methods of the
	  result class, but not metaclass of the caller.  [ruby-talk:96156]

	* intern.h: provide proper prototypes.  [ruby-core:02724]

	* ruby.h: missing.h is now prerequisite to intern.h.

Tue Mar 30 20:25:34 2004  Tanaka Akira  <akr@m17n.org>

	* time.c (search_time_t): limit guess range by mktime if it is
	  available.  [ruby-dev:23274]

Sun Mar 28 14:16:59 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/net/pop.rb (auth): failed when account/password include "%".
	  [ruby-talk:95933]

Sat Mar 27 21:40:41 2004  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb: permit extra semicolon in content-type field.

Sat Mar 27 10:40:48 2004  Tanaka Akira  <akr@m17n.org>

	* (lib/pp.rb, lib/prettyprint.rb): define seplist in PP::PPMethods
	  instead of PrettyPrint.

Thu Mar 25 23:28:52 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_overflow_p): backport 1.9 usec overflow function.
	  (ruby-bugs PR#1307)

Thu Mar 25 23:15:24 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_options.rb (RI::Options::show_version):
	  Add --version option

Thu Mar 25 04:16:18 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_options.rb (RI::Options): Add the --list-names option,
	  which dumps our all known names

Thu Mar 25 03:57:47 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_util.rb (NameDescriptor::initialize): No longer
	  allow nested classes to be designated using "."--you must
	  now use "::"

Thu Mar 25 02:00:18 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/template/html/one_page_html.rb (Page):
	  Fix to work with C modules.

Wed Mar 24 21:17:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/uri.rb: Documented (thanks Dmitry V. Sabanin).
	* lib/uri/common.rb: Ditto.
	* lib/uri/ftp.rb: Ditto.
	* lib/uri/generic.rb: Ditto.
	* lib/uri/http.rb: Ditto.
	* lib/uri/https.rb: Ditto.
	* lib/uri/ldap.rb: Ditto.
	* lib/uri/mailto.rb: Ditto.
	  (All backported from 1.9)

Wed Mar 24 18:48:26 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb ($ruby, $topdir, $hdrdir): should not be affected by
	  DESTDIR after installed.

	* lib/mkmf.rb (RUBY): / is not recognized as path separator on
	  nmake/bmake. [ruby-list:39388]

	* lib/mkmf.rb (init_mkmf): $INCFLAGS also should be lazy-evaluated.

Wed Mar 24 12:32:56 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_class_module):
	  Don't document methods if we don't know for sure the
	  class or module.

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class):
	  Don't store documentation for singleton classes if we
	  don't know the real class.

Wed Mar 24 11:11:26 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb (Generators::HTMLGenerator::load_html_template):
	  Allow non-RDoc templates by putting a slash in the template name

Mon Mar 22 16:19:57 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ruby.1: add -width option to .Bl for old groff.

Sun Mar 21 21:11:16 2004  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/shell/*: bug fix for Shell#system(command_line_string).

Sat Mar 20 20:57:10 2004  David Black  <dblack@wobblini.net>

	* lib/scanf.rb: Backported 1.9 branch
	  modifications/corrections to 1.8 branch

Sat Mar 20 23:51:03 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* eval.c (rb_require_safe): preserve old ruby_errinfo.
	  [ruby-talk:95409]

	* eval.c (rb_f_raise): should not clear backtrace information if
	  exception object already have one.

Sat Mar 20 15:25:36 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/template/html/html.rb (RDoc::Page): Force
	  page background to white.

Sat Mar 20 09:52:33 2004  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb, lib/date/format.rb: _parse() now accepts fractional
	  part of second minute that follows a comma or a full stop.

Fri Mar 19 01:55:57 2004  Mauricio Fernandez  <batsman.geo@yahoo.com>

	* io.c (rb_io_sync): need not to check writable. [ruby-core:02674]

Thu Mar 18 21:44:38 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: backport drb.rb 1.16.

Fri Mar 18 17:49:51 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* struct.c (make_struct): allow const_id for accessor names.
	  [ruby-core:04585]

	* eval.c (rb_attr): check if attribute name is local_id or
	  const_id.

Thu Mar 18 16:22:38 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_eq): avoid false positive by using scope and
	  dyna_vars.  no longer use frame.uniq.

Wed Mar 17 14:44:43 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* dir.c (range): fix possible "\0" overrun. (in case of "\0-")

Mon Mar 15 07:39:13 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_yield_0): should not re-submit TAG_BREAK if this
	  yield is not break destination. [ruby-dev:23197]

Sat Mar 13 14:28:16 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/drb/test_drbssl.rb: rescue LoadError. (Barkport from main
	  trunk)

	* test/drb/test_drbunix.rb: ditto.

Wed Mar 10 22:28:09 2004  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (remove_dir): should handle symlink correctly.
	  This patch is contributed by Christian Loew.  [ruby-talk:94635]
	  (Backport from main trunk)

Wed Mar 10 16:28:42 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (return_jump): set return value to the return
	  destination.  separated from localjump_destination().

	* eval.c (break_jump): break innermost loop (or thread or proc).

	* eval.c (rb_yield_0): set exit_value for block break.

Wed Mar 10 15:58:43 2004  Ryan Davis  <ryand@zenspider.com>

	* eval.c (eval): Only print backtrace if generating the backtrace
	  doesn't generate an exception.  [ruby-core:02621]

Tue Mar  9 13:04:26 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_ungetc): raise IOError instead of calling
	  rb_sys_fail().  [ruby-talk:23181]

Mon Mar  8 19:32:28 2004  akira yamada  <akira@ruby-lang.org>

	* lib/uri/common.rb (URI::REGEXP::PATTERN::HOSTPORT): (?:#{PORT})
	  -> (?::#{PORT}).  [ruby-dev:23170]

Mon Mar  8 15:31:41 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* dir.c (range): treat incomplete '[' as ordinary character (like
	  has_magic does).

	* dir.c (range):  Cancel above change. More discussion is needed.

Sun Mar  7 22:37:46 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/drb/ut_drb.rb: use 'druby://localhost:0'. [ruby-dev:23078]

	* test/drb/ut_eval.rb: ditto.

	* test/drb/ut_large.rb: ditto.

	* test/drb/ut_safe1.rb: ditto.

	* test/drb/ut_drb_drbssl.rb: use 'drbssl://localhost:0'.

Sun Mar  7 16:22:26 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* Makefile.in (lex.c): use $? instead of $<.

Fri Mar  5 00:54:14 2004  Dave Thomas  <dave@pragprog.com>

	* lib/test/unit.rb: MOve RDoc documentation so that you can
	  now say 'ri Test::Unit'

Tue Mar  2 12:32:59 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub, wince/Makefile.sub (config.h): shouldn't check
	  defined? NORETURN. [ruby-dev:23100]

Mon Mar  1 12:24:10 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_alias):
	  Allow aliases to have parentheses

Sun Feb 29 23:14:53 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class):
	  Handle :nodoc: on singleton classes.

Sat Feb 28 10:58:49 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* MANIFEST: add test_erb.rb

	* lib/erb.rb, test/erb/test_erb.rb: don't forget filename,
	  if both filename and safe_level given. [ruby-dev:23050]

Fri Feb 27 01:00:09 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb, test/drb/drbtest.rb: require drb/eq.rb by default

Wed Feb 25 21:16:25 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* instruby.rb (with_destdir): should return the given argument if no
	  DESTDIR is given.

	* instruby.rb: use path name expansion of cmd.exe.

Wed Feb 25 09:35:22 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* error.c (NameError::Message): new class for lazy evaluation of
	  message to ensure replaced before marshalling. merge from HEAD.
	  (ruby-bugs-ja:PR#588)

	* eval.c (rb_method_missing): use NameError::Message. merge from
	  HEAD. (ruby-bugs-ja:PR#588)

Tue Feb 24 18:59:37 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* dir.c (glob_helper): '**/' should not match leading period
	  unless File::FNM_DOTMATCH is set. (like '*/') [ruby-dev:23014]

Tue Feb 24 13:22:21 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/rdoc.rb (RDoc::RDoc::normalized_file_list): Attempt to get better
	  heuristics on which files to include and exclude. Now only include
	  non-standard files if they are explicitly named in ARGV.

Tue Feb 24 07:23:30 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Deal with :stopdoc: when
	  choosing a default main page to display (ie. don't select a page
	  if we don't have documentation for it).

Tue Feb 24 06:40:14 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle
	  class variables in code listings

Tue Feb 24 06:40:14 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle
	  class variables in code listings

Tue Feb 24 06:32:27 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_aliases): Handle
	  aliases in C files.

Tue Feb 24 06:16:22 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/rdoc.rb (RDoc::RDoc::document): Now create op dir _before_
	  parsing files.

Tue Feb 24 06:08:47 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_constant):
	  Start collecting text of constant values earlier: was missing
	  values in output if there was no space after '='

Tue Feb 24 06:08:25 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Escape contant values.

Tue Feb 24 03:45:06 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_config.c (ossl_config_each): add new method
	  OpenSSL::Config#each. it iterates with section name, field name
	  and value.

	* ext/openssl/ossl_config.c (Init_ossl_config): include Enumerable.

Mon Feb 23 09:16:35 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* instruby.rb (DOSISH): embedded path in batch files should not be
	  prefixed by DESTDIR.  [ruby-core:02186]

Sun Feb 22 09:54:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* re.c: corrected documentation format (again)

Sun Feb 22 09:43:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* re.c: corrected documentation format (rb_reg_initialize_m)

Sat Feb 21 22:36:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* ext/zlib/zlib.c: documented, but needs more effort.

Sat Feb 21 11:12:15 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* missing/os2.c, missing/x68.c: typo fix.  pointed out by greentea.

Fri Feb 20 18:59:47 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/init.rb (IRB::IRB.parse_opts): add -I option to
	  irb. [ruby-dev:39243]

Thu Feb 19 23:24:16 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb (Generators::HtmlClass::build_attribute_list):
	  Support visibility modifiers for attributes

Thu Feb 19 23:24:16 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb (Generators::HtmlClass::build_attribute_list):
	  Support visibility modifiers for attributes

Thu Feb 19 22:39:04 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/rinda/test_rinda.rb: DRb.start_service only once in testsuites.
	  DRb.start_service could handle this.

Thu Feb 19 22:19:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/ostruct.rb: documented

Thu Feb 19 21:28:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* ext/strscan/strscan.c: improved documentation

Thu Feb 19 03:10:52 2004  Minero Aoki  <aamine@loveruby.net>

	* ext/strscan/strscan.c: synchronized with main trunk (rev 1.11).

Thu Feb 19 02:30:34 2004  Minero Aoki  <aamine@loveruby.net>

	* ext/strscan/strscan.c: documentation checked.

Thu Feb 19 00:11:05 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/markup/simple_markup/preprocess.rb (SM::PreProcess::handle):
	  Strip extraneous space from filenames in :include:

Wed Feb 18 22:52:00 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/unix.rb: remove O_NONBLOCK, thanks \ay

Wed Feb 18 22:47:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* ext/strscan/strscan.c: documented

Wed Feb 18 22:03:11 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/*: should not depend on $KCODE.

Wed Feb 18 17:18:01 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/win32ole/win32ole.c: need to include <olectl.h> on Cygwin.

Wed Feb 18 10:40:38 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* sprintf.c (rb_f_sprintf): do not prepend dots for negative
	  numbers if FZERO is specified.  [ruby-list:39218]

Tue Feb 17 23:40:34 2004  Guy Decoux  <ts@moulon.inra.fr>

	* sprintf.c (rb_f_sprintf): preserve original val for
	  format_integer. [ruby-talk:92975]

Tue Feb 17 23:28:45 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/marshaltestlib.rb: common marshal testcase added.

	* test/ruby/test_marshal.rb: use above testsuite.

	* test/soap/marshal/test_marshal.rb: ditto.

	* test/soap/marshal/cmarshal.rb: removed (not used).

Tue Feb 17 10:51:23 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/syck/rubyext.c (syck_emitter_end_object): takes only one arg.

Tue Feb 17 01:35:28 2004  Tanaka Akira  <akr@m17n.org>

	* eval.c (rb_eval): care that another thread replace NODE_DREGX_ONCE
	  to NODE_LIT.  [ruby-dev:22920]

Tue Feb 17 01:24:35 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bcc32/Makefile.sub, win32/Makefile.sub (config.h): define
	  STACK_GROW_DIRECTION. [ruby-dev:22910]

	* bcc32/Makefile.sub (config.h): add newer checks.

	* wince/Makefile.sub (config.h): define NEED_IO_SEEK_BETWEEN_RW.

Tue Feb 17 00:38:10 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb: TupleSpace#initialize, stop doubling timeout

Tue Feb 17 00:18:03 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/rinda/test_rinda.rb: import test_rinda.rb

Tue Feb 17 00:14:30 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: avoid warning "Redefinition of macro
	  'HAVE_GETLOGIN'".

	* vms/config.h_in: ditto.

Mon Feb 16 23:28:14 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/csv.rb: document reduction.  [ruby-core:02429]

Mon Feb 16 22:08:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/generator.rb: corrected doc format
	* lib/rinda/rinda.rb: added documentation (from Hugh Sasse)
	* lib/rinda/tuplespace.rb: ditto

Mon Feb 16 20:41:32 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: show more warnings. (refering to mingw)

	* bcc32/setup.mak: ditto.

Mon Feb 16 13:39:44 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* dir.c (rb_glob, rb_globi): add const.

	* ruby.h: ditto.

Mon Feb 16 02:16:33 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* bcc32/Makefile.sub: should warn suspicious pointer conversion.

	* bcc32/setup.mak: ditto.

Sun Feb 15 19:06:42 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/tuplespace.rb: TupleSpace#read(tpl, 0), raise
	  RequestExpiredError if not found.

Sun Feb 15 15:56:46 2004  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c: add IDispatch wrapper in val2variant.
	  Thanks, arton.

Sun Feb 15 01:46:05 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/mkmf.rb: absolute path of ruby is assigned to $(RUBY).
	  [ruby-dev:22870]

Sat Feb 14 11:29:41 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* sample/drb/*: import lib/drb/sample

Sat Feb 14 11:08:23 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: add pretty_print, thanks gotoken.

Fri Feb 13 12:35:08 2004  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb: File.link may raise EINVAL and
	  EACCES on Windows.

Thu Feb 12 21:45:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/ftools.rb: documented

Thu Feb 12 21:25:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/base64.rb: backported from HEAD (modularised and documented)

Thu Feb 12 20:31:48 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_tmpsrc): cpp32 of Borland C++ ignores #error
	  directives in DOS line-ending files at all.

Thu Feb 12 02:23:56 2004  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb: use assert_raise instead of assert_raises.

	* lib/pp.rb: ditto.

	* lib/time.rb: ditto.

	* lib/tsort.rb: ditto.
	  use TSortHash and TSortArray instead of Hash and Array in test.

Wed Feb 11 20:01:12 2004  akira yamada  <akira@ruby-lang.org>

	* test/ruby/test_file.rb (TestFile::test_fnmatch): added tests for
	  File.fnmatch. [ruby-dev:22815][ruby-dev:22819]

	* test/ruby/test_proc.rb (TestProc::test_eq): added a
	  test.  [ruby-dev:22599]

	* test/ruby/test_proc.rb (TestProc::test_eq): added tests for
	   Proc#==.  [ruby-dev:22592], [ruby-dev:22601]

Tue Feb 10 16:43:56 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (umethod_bind): purge unused check.  [ruby-dev:22850]

Mon Feb  9 17:16:00 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/rdoc/parsers/parse_c.rb: escape '{' and '}' to avoid warnings.

Mon Feb  9 13:00:55 2004  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>

	* dir.c (fnmatch): File.fnmatch('*?', 'a') should return true.
	  [ruby-dev:22815]

	* dir.c (fnmatch): File.fnmatch('\[1\]' , '[1]') should return true.
	  [ruby-dev:22819]

Sun Feb  8 16:46:13 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/pp.rb (PP::PPMethods::object_address_group): suppress negative
	  sign for higher heap areas.

Fri Feb  6 22:48:16 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb (gen_url): Support
	  https in RDoc hyperlinks

Fri Feb  6 22:41:22 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/pp.rb (PPInspectTest#test_to_s_with_iv): rollback the previous
	  commit.  [ruby-dev:22813]

Fri Feb  6 22:22:50 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/pp.rb (PPInspectTest#test_to_s_with_iv): remove instance
	  variable which is defined in the test.

Fri Feb  6 00:48:37 2004  Tanaka Akira  <akr@m17n.org>

	* lib/prettyprint.rb (PrettyPrint#first?): obsoleted.

Thu Feb  5 23:56:55 2004  Tanaka Akira  <akr@m17n.org>

	* lib/prettyprint.rb (PrettyPrint#seplist): added.

	* lib/pp.rb (PPMethods#pp_object): use seplist.
	  (PPMethods#pp_hash): ditto.
	  (Array#pretty_print): ditto.
	  (Struct#pretty_print): ditto.
	  (MatchData#pretty_print): ditto.

	* lib/set.rb (Set#pretty_print): use seplist.

Wed Feb  4 02:12:06 2004  Tanaka Akira  <akr@m17n.org>

	* file.c (test_l): fix wrong method name in document.
	  (test_S): ditto.
	  (test_b): ditto.
	  (test_c): ditto.
	  (test_suid): ditto.
	  (test_sgid): ditto.
	  (test_sticky): ditto.

Tue Feb  3 08:04:57 2004  Tanaka Akira  <akr@m17n.org>

	* lib/pp.rb (Struct#pretty_print_cycle): follow 1.8 style.

Mon Feb  2 19:33:49 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: backport from 1.9 for Interix.

	* dln.c (dln_load): ditto.

Mon Feb  2 13:31:51 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/net/http.rb (canonical_each): fix merge miss.

Mon Feb  2 01:54:00 2004  Tanaka Akira  <akr@m17n.org>

	* lib/pp.rb (Struct#pretty_print): make it 1.8 style.
	  (Numeric#pretty_print, FalseClass#pretty_print)
	  (TrueClass#pretty_print, Module#pretty_print): fix pp for objects
	  with instance variables.  [ruby-talk:91157]

	* lib/open-uri.rb (URI::Generic#find_proxy): return nil on loopback
	  address.

	* lib/resolv-replace.rb (BasicSocket#send): don't replace because
	  it has no hostname argument.
	  (IPSocket.getaddress): raise SocketError instead of
	  Resolv::ResolvError for errors.
	  (TCPSocket#initialize, UDPSocket#bind, UDPSocket#connect)
	  (SOCKSSocket#initialize): use IPSocket.getaddress instead of
	  Resolv.getaddress.
	  (UDPSocket#send): recognize 3 arguments form.  try all addresses on
	  4 arguments form.

Sun Feb  1 18:17:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/net/http.rb: merged coding style changes from HEAD.

Sun Feb  1 16:15:00 2004  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/test/unit.rb: rearranged documentation for RDoc's sake.
	* lib/matrix.rb: improved documentation.
	* lib/net/http.rb: slight documentation formatting improvement.

Sun Feb  1 05:30:06 2004  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::Generic#find_proxy): warn HTTP_PROXY.
	 raise an errror on non-http proxy URI.
	 (OpenURI::Buffer#<<): make a tempfile binmode.  [ruby-talk:90793]

Sat Jan 31 09:20:32 2004  NAKAMURA, Hiroshi  <nakahiro@sairon.co.jp>

	* sample/openssl/gen_csr.rb: wrong usage string.

Sat Jan 31 01:00:32 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/wsdlDriver.rb, lib/wsdl/soap/operation.rb: add support of
	  "parts" attribute of soap:body element in WSDL.

	* lib/wsdl/xmlSchema/schema.rb: friendly warning message for
	  simpleType element which is not supported for now.

	* lib/soap/mapping/factory.rb: deleted unused methods.

	* lib/soap/mapping/rubytypeFactory.rb: do no ignore case while xsi:type
	  string <-> Ruby class name matching.

	* test/wsdl/soap/{soapbodyparts.wsdl,test_soapbodyparts.wsdl}: new
	  files.

Thu Jan 29 23:56:00 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* util.c (mblen): fix overrun.  [ruby-dev:22672]

Thu Jan 29 22:41:53 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Allow 'link:' in Tidylinks.
	  THis means you can write "see f1[link:files/f1_rb.html]".

Thu Jan 29 15:33:23 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509hame.c (ossl_x509name_initialize): change
	  second argument. it expected to be a Hash not an Integer.

	* ext/openssl/ossl_x509name.c (ossl_x509name_add_entry): add new
	  function for OpenSSL::X509::Name#add_entry.

	* ext/openssl/ossl_x509name.c (ossl_x509name_to_a): append ASN.1
	  tag number to each element of return value.

	* ext/openssl/ossl_x509name.c (Init_ossl_x509name): add constants
	  OpenSSL::X509::Name::DEFAULT_OBJECT_TYPE and OBJECT_TYPE_TEMPLATE.

	* ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name#initialize):
	  second argument takes OBJECT_TYPE_TEMPLATE by default.

	* sample/openssl/gen_csr.rb: use OpenSSL::X509::Name.parse.

Wed Jan 28 04:29:41 2004  Eric Schwartz  <emschwar@fc.hp.com>

	* lib/cgi/session.rb: use LOCK_SH to read, and a few other
	  improvements.  [ruby-core:02328]

Tue Jan 27 11:09:29 2004  FUKUMOTO Atsushi  <fukumoto@nospam.imasy.or.jp>

	* ext/socket/socket.c (s_recvfrom): sending length should be an
	  invariant while retrying on EAGAIN.  [ruby-talk:89962]

Tue Jan 27 10:35:18 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/win32ole/win32ole.c (set_argv): fix condition.

Tue Jan 27 02:26:31 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httputils.rb (WEBrick:HTTPUtils::parse_header):
	  refine regex for header-name.

Tue Jan 27 00:30:11 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/Makefile.sub: rollback.

Mon Jan 26 22:53:04 2004  Dave Thomas  <dave@pragprog.com>

	* io.c: Remove documentation references to $defout.

Mon Jan 26 15:11:47 2004  NAKAMURA Usaku  <usa@ruby-lang.org>

	* sample/exyacc.rb: escape '}' to avoid warning.

Mon Jan 26 14:41:46 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/delegate.rb (Delegator::initialize): preserve
	  singleton_method_added method [ruby-dev:22685]

	* lib/delegate.rb (Delegator::initialize): use Kernel::raise
	  instead of mere raise.  [ruby-dev:22681]

Mon Jan 26 12:47:17 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: define CONST84 when TCL_MAJOR_VERSION == 7

Mon Jan 26 11:35:23 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb: Makefiles should depend on also rbconfig.rb.
	  (ruby-bugs:PR#1256)

	* ext/win32ole/win32ole.c (set_argv): set real arguments to
	  WIN32OLE::ARGV.  [ruby-list:39073]

Thu Jan 22 22:54:53 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (BEG_REGEXP): allow 8-bit characters in quoted
	  strings for Novell GroupWise Internet Agent.
	* lib/net/imap.rb (DATA_REGEXP): ditto.

Thu Jan 22 16:21:33 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (string_content): reset lexical states at the beginning of
	  string contents.  [ruby-list:39061]

Wed Jan 21 21:55:51 2004  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: remove O_NONBLOCK, thanks \ay
	* lib/drb/extserv.rb: typo

Wed Jan 21 17:57:56 2004  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (envelope): allow NIL.
	* lib/net/imap.rb (body): ditto.
	* lib/net/imap.rb (number): ditto.
	* lib/net/imap.rb (ensure_nz_number): show a detailed error
	  message.

Wed Jan 21 16:44:20 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (merge_libs): squeeze successive same libraries.
	  [ruby-dev:22652]

Wed Jan 21 16:01:37 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/digest/rmd160/extconf.rb: have_library appends found library.

Wed Jan 21 11:36:00 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (block_append): update nd_end for "real" head node.
	  [ruby-list:39058]

Tue Jan 20 14:48:13 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: should check <openssl/conf_api.h> instead
	  of OPENSSL_VERSION_NUMBER. [ruby-list:39056]

Tue Jan 20 14:43:17 2004  Dave Thomas  <dave@pragprog.com>

	* lib/base64.rb: Add RDoc

Tue Jan 20 14:25:51 2004  Dave Thomas  <dave@pragprog.com>

	* lib/abbrev.rb: Add RDoc

Tue Jan 20 13:22:39 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Document aliases at
	  top-most level.

	* lib/English.rb: Document English.rb.

Tue Jan 20 02:49:22 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: add check for OpenSSL version.
	  [ruby-list:39054]

Tue Jan 20 02:38:13 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_class): should not dump singleton class.
	  [ruby-dev:22631]

Tue Jan 20 01:31:36 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* io.c (lineno): typo fix(FIX2INT -> INT2FIX).

Mon Jan 19 21:53:38 2004  akira yamada  <akira@ruby-lang.org>

	* io.c, re.c, string.c, time.c: fixed up positions of RDocs.

Mon Jan 19 07:09:20 2004  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date.rb: zone was wrong when it was behind UTC.
	  Thanks Mark J. Reed.

	* lib/date/format.rb: %z is now always replaced by four digits
	  with a leading plus or minus sign.

	* sample/cal.rb: added a class, anyway.

Sun Jan 18 20:47:35 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ruby.c: use translate_char() on Cygwin.

Sun Jan 18 02:33:26 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* defines.h (_WIN32): undef _WIN32 on Cygwin before defining DOSISH.

Sun Jan 18 00:23:55 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (class2path): check anonymous class/module before
	  checking referable, and allow singleton classes.

Fri Jan 16 14:33:35 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (class2path): get class path and check referable.
	  [ruby-dev:22588]

Fri Jan 16 09:52:23 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_eq): Proc with empty body may not be equal.
	  [ruby-dev:22590]

Thu Jan 15 13:03:10 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (argf_read): do not append EOF.  (ruby-bugs-ja:PR#585)

	* io.c (rb_io_fwrite): ad-hockery hack to get rid of HP-UX stdio
	  weird behavior.  [ruby-dev:22424]

Wed Jan 14 13:31:06 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/extconf.rb: wrapper iconv.rb is dependent on platform.

Tue Jan 13 18:54:28 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb(Logger#msg2str): no special treatment for the object
	  which responds to :to_str.  commited at 2004-01-11T21:46:27 by
	  gsinclair.

	* lib/logger.rb(LogDevice#initialize): remove type checking if the
	  given object is a String.  Kernel.open handles it correctly.
	  commited at 2004-01-11T21:46:27 by gsinclair.

	* test/logger/test_logger.rb: follow above change (ArgumentError ->
	  TypeError.)  follow above commit.

Tue Jan 13 14:27:13 2004  Kazuhiro NISHIYAMA  <zn@mbf.nifty.com>

	* lib/test/unit/ui/testrunnerutilities.rb (TestRunnerUtilities):
	  moved run method which allows output level.  [ruby-dev:22554]

Tue Jan 13 04:29:52 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_driver.rb (RiDriver::report_method_stuff):
	  Show fully-qualified class names in class list.

Tue Jan 13 01:04:37 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_paths.rb (RI::Paths): First attempt at
	  incorporating DESTDIR in the rdoc installation.

Mon Jan 12 23:27:19 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): fix position after FCALL.  [ruby-dev:22574]

Mon Jan 12 12:07:22 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods):
	  Someone changed the "// in eval.c" comments to "/*...*/" style,
	  so the parsing of the source file name broke.

	* object.c: Remove spurious space in TrueClass documentation.

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_body): Fix
	  bad regexp: if the code before a documented method contained
	  a comment that wasn't terminated by whitespace, that comment
	  and all intervening code was included in the following
	  method's documentation.

	* lib/rdoc/ri/ri_formatter.rb (RI::HtmlFormatter::break_to_newline):
	  HTML formats need explicit line breaks.

Mon Jan 12 11:46:30 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (LIBPATHFLAG, RPATHFLAG): enclose paths with single
	  quotes.  [ruby-dev:22564]

	* lib/mkmf.rb (libpathflag): do not enclose with quotes always.

	* {bcc32,win32,wince}/Makefile.sub (LIBPATHFLAG): quoted.

Mon Jan 12 02:24:07 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_formatter.rb (RI::HtmlFormatter): Add HTML
	  generation support to ri (Elliot Hughes)

Mon Jan 12 02:24:07 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_formatter.rb (RI::HtmlFormatter): Add HTML
	  generation support to ri (Elliot Hughes)

Sun Jan 11 02:07:47 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_options.rb (RI::Options::OptionList::OptionList):
	  Also accept command line options via the 'RI' environment variable.

Sun Jan 11 02:07:47 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_options.rb (RI::Options::OptionList::OptionList):
	  Also accept command line options via the 'RI' environment variable.

Sat Jan 10 21:27:41 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (eval): need to add message delimiter. [ruby-dev:22561]

Sat Jan 10 01:54:50 2004  Eric Sunshine  <sunshine@sunshineco.com>

	* defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP,
	  S_IRWXO, etc. macros are defined since future code might require
	  them (even though present code only requires a subset).

	* defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set
	  correctly on Rhapsody when -arch compiler flag was used (via
	  configure's --enable-fat-binary option).

Fri Jan  9 10:05:14 2004  Siena.  <siena@faculty.chiba-u.jp>

	* lib/mkmf.rb (libpathflag): use single quotes.  [ruby-dev:22440]

Thu Jan  8 23:49:21 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (RDOCTARGET): new macro.  if you want to install
	  rdoc documentation, you need to run configure with
	  --enable-install-doc.

Thu Jan  8 21:29:43 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_pkey.c (ossl_pkey_to_der): removed; it returns
	  public key only.

	* ext/openssl/ossl_pkey_dh.c (ossl_dh_to_der): new function for
	  OpenSSL::PKey::DH#to_der.

	* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_to_der): new function for
	  OpenSSL::PKey::DSA#to_der.

	* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_to_der): new function for
	  OpenSSL::PKey::RSA#to_der.

Thu Jan  8 16:51:04 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/wsdl/datetime/test_datetime.rb: fixed a stupid testcase which
	  dumps "E" at month-end.

Thu Jan  8 11:20:01 2004  WATANABE Hirofumi  <eban@ruby-lang.org>

	* eval.c, object.c, process.c, re.c: don't use C++ style comments.

Thu Jan  8 04:36:21 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (WEBrick::CGI#initialize): should create
	  @config[:Logger] if it was not given.

	* sample/webrick/*: new files.

	* MANIFEST: add sample/webrick/*

Wed Jan  7 13:00:18 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_driver.rb: Fix problem where ri was
	  being too eager to find matches of ambiguous method
	  names (such as "ri Thread.join" would return both
	  Thread.join and ThreadsWait.join)

Wed Jan  7 12:35:41 2004  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/debug.rb: revert command parse regexps.  [ruby-list:39014] by
	  Shirai,Kaoru.

Wed Jan  7 08:21:04 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parserfactory.rb: Check for shebang
	  line in files that would otherwise be treated as
	  plain text.

Tue Jan  6 22:13:34 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_mod_modfunc): should break if m has no super class.
	  [ruby-dev:22498]

Tue Jan  6 21:55:02 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (fptr_finalize): should save errno just after failure.
	  [ruby-dev:22492]

Tue Jan  6 14:53:14 2004  Dave Thomas  <dave@pragprog.com>

	* bin/ri: split out the display side, making it pluggable. Added
	  new ri_driver and ri_display files in lib/rdoc/ri.

Tue Jan  6 06:37:53 2004  Dave Thomas  <dave@pragprog.com>

	* bin/rdoc: Add --ri-system switch

	* lib/.document: Update with list of files that seem to have
	  documentation

	* lib/test/unit.rb: Reorder comment to make it RDoc friendly.

	* Makefile.in: add install-nodoc target, and make it
	  generate RDoc on default install.

	* lib/rdoc/ri/ri_options.rb (RI::Options::parse): Add
	  --doc-dir option to ri.

Tue Jan  6 00:04:40 2004  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method_or_yield_parameters):
	  fix parsing if there are braces in a method parameter list

Fri Jan  2 14:54:11 2004  Dave Thomas  <dave@pragprog.com>

	* bin/ri: Add new --classes option, and arrange for
	  help messages to be paged too.

	* bin/rdoc: Add statistics.

	* process.c: (MG) Added Process documentation

	* lib/rdoc/ri/ri_formatter.rb (RI::AttributeFormatter::wrap):
	  Fix problem with labels not displaying in RI labeled
	  lists using BS and ANSI modes.

Fri Jan  2 01:50:13 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (argf_eof): ARGF.eof? should not have any side effect.
	  [ruby-dev:22469]

Wed Dec 31 17:25:17 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (argf_each_byte): should return self.  [ruby-dev:22465]

Wed Dec 31 11:20:34 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): Make
	  file referenced in "// in sss.c" relative to current file.

Wed Dec 31 11:17:37 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/generators/html_generator.rb: Fix problem when
	  a public method was aliased, but the alias is then
	  made private, and hence doesn't appear in RDoc output.

Wed Dec 31 01:33:05 2003  Dave Thomas  <dave@pragprog.com>

	* array.c, error.c, eval.c, io.c, prec.c, range.c, re.c,
	  string.c, time.c: Add RDoc for Kernel functions, and tidy.

Tue Dec 30 19:39:14 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_f_readline): should raise EOFError at the end of
	  files.  [ruby-dev:22458]

	* io.c (argf_read): should concatenate input files when length
	  argument is nil. [ruby-dev:22450]

	* io.c (argf_read): should update supplied string buffer (2nd
	  argument) even when IO#read is called multiple times.

	* io.c: should initialize lineno by zero. [ruby-dev:22460]

Tue Dec 30 12:30:30 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/code_objects.rb (RDoc::Context::find_symbol): If a
	  class and a method have the same name, finding Xxx.abc was trying
	  to find 'abc' in method 'Xxx', not class 'Xxx'.

Tue Dec 30 08:32:32 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method):
	  Handle undoing nesting of yield parameters correctly for:

	  def each_entry(&b) Dir.foreach(@path) {|f| yield P.new(f) } end

Tue Dec 30 08:32:32 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method):
	  Handle undoing nesting of yield parameters correctly for:

	    def each_entry(&block) Dir.foreach(@path) {|f| yield Pathname.new(f) } end

Mon Dec 29 12:51:02 2003  Dave Thomas  <dave@pragprog.com>

	* eval.c: Add RDoc for Kernel global functions.

Mon Dec 29 11:00:16 2003  Dave Thomas  <dave@pragprog.com>

	* array.c: Tidy up RDoc loose ends.

Mon Dec 29 05:05:51 2003  Dave Thomas  <dave@pragprog.com>

	* struct.c, random: Add RDoc comments

Mon Dec 29 02:20:54 2003  Dave Thomas  <dave@pragprog.com>

	* eval.c: Add RDoc for class Proc, Method, UnboundMethod

Mon Dec 29 00:41:44 2003  Dave Thomas  <dave@pragprog.com>

	* math.c: Add RDoc comments

Sun Dec 28 20:19:11 2003  Tanaka Akira  <akr@m17n.org>

	* ext/stringio/stringio.c (strio_sysread): StringIO.new.sysread didn't
	  raise EOFError.

	* ext/zlib/zlib.c (gzreader_gets): don't increment lineno when
	  gzfile_read_all returns "".

Sun Dec 28 15:25:08 2003  Dave Thomas  <dave@pragprog.com>

	* class.c,object.c,parse.y,sprintf.c,variable.c: Document classes
	  Object, Module, etc...

Sun Dec 28 11:55:29 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/csv/test_csv.rb: generate bom.csv and mac.csv files on the fly.
	  [ruby-talk:88852]

	* test/csv/{bom.csv,mac.csv}: removed.

Sun Dec 28 08:56:51 2003  Dave Thomas  <dave@pragprog.com>

	* eval.c: Thead[Group] RDoc (thanks to MG)

Sun Dec 28 03:50:05 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_override_comment):
	  Escape method names used in regexp

Sun Dec 28 01:46:02 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item):
	  Add support for rules in 'ri' output.

Sun Dec 28 01:35:35 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_body):
	  Sometimes the Ruby source aliases two otherwise
	  unrelated methods (for example Kernel#object_id and
	  Kernel#hash are both the same C function). Provide a
	  facility to allow the methods to be documented
	  separately.

Sun Dec 28 01:05:31 2003  Dave Thomas  <dave@pragprog.com>

	* marshal.c, signal.c: RDoc collemts added by Elliott Hughes

Sun Dec 28 00:48:47 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_class_comment):
	  Some source files use lower case class or module names
	  when naming the Init_XXX function in C.

Sat Dec 27 23:41:46 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: fix "test: too many arguments" error.

Sat Dec 27 15:32:19 2003  Dave Thomas  <dave@wireless_3.local.thomases.com>

	* time.c: RDoc comments added

Sat Dec 27 15:07:57 2003  Dave Thomas  <dave@pragprog.com>

	* object.c: Add RDoc comments for Symbol class.

Sat Dec 27 14:42:30 2003  Dave Thomas  <dave@pragprog.com>

	* numeric.c: Add RDoc comments.

Sat Dec 27 00:44:00 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (next_argv): warn always for stdin on inplace edit mode.

	* io.c (read_all): need to check string value.

	* io.c (argf_read): allow ARGF.read(nil).  [ruby-dev:22433]

Fri Dec 26 23:02:09 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_f_backquote): need not to check nil result.
	  [ruby-core:02078]

	* io.c (rb_io_getline): should return nil when read_all gives
	  empty string, even when nil rs is specified. [ruby-core:02077]

Fri Dec 26 18:50:59 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check if getcontext and setcontext are available.

	* eval.c: use presence of getcontext/setcontext.

Fri Dec 26 16:40:53 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (PathnameTest#test_plus): add 2 assertions.

Fri Dec 26 09:26:58 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (pack_pack): add sign check for 'i', and 'l'.
	  [ruby-dev:22427]

	* bignum.c (rb_quad_pack): add range check for 'quad int'.

Thu Dec 25 22:39:59 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* string.c (rb_str_update): don't return any value.

Thu Dec 25 15:30:17 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_update): call rb_str_modify().

Thu Dec 25 05:08:09 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (search_required): search actual file name once when no
	  extension specified.

Thu Dec 25 04:00:44 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* stable version 1.8.1 released.

Thu Dec 25 00:17:53 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* configure.in: check for nanosleep, -lrt if required.
	  [ruby-core:02059]

	* eval.c (thread_timer): use select(2) if nanosleep(2) is not
	  available.

	* eval.c: check __stub_getcontext for glibc on some platforms.
	  [ruby-list:38984]

Wed Dec 24 23:48:04 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb
	  test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0"
	  to express -0.0.  [ruby-talk:88786]

Wed Dec 24 23:29:30 2003  Tanaka Akira  <akr@m17n.org>

	* lib/tsort.rb (test_orphaned_break): removed.

Wed Dec 24 20:53:06 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tkmulticolumnlist.rb: new sample

	* ext/tk/sample/tkmultilistframe.rb: bug fix

Wed Dec 24 20:37:37 2003  Eric Sunshine  <sunshine@sunshineco.com>

	* configure.in (LDSHARED): Fixed typographical error in assignment of
	  LDSHARED for Rhapsody which caused linking of extension modules to
	  fail.

Wed Dec 24 17:51:18 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* file.c (rb_thread_flock): enable thread support again.

Wed Dec 24 16:46:08 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (catch_timer): do not call rb_thread_schedule() inside to
	  avoid pthread_mutex_lock() deadlock.  interrupts to system calls
	  are detected by TRAP_END via EINTR error.

	* eval.c (thread_timer): do not post signal unless it is
	  absolutely necessary.

	* rubysig.h (TRAP_END): add CHECK_INTS to switch thread.

	* regex.c (re_compile_pattern): check if nextp is smaller than
	  pend.  [ruby-dev:22372]

	* eval.c (umethod_bind): remove method overridden check.
	  [ruby-dev:22366]

Wed Dec 24 16:13:05 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_read): should check for error
	  status by SSL_get_error().

	* ext/openssl/ossl_ssl.c (ossl_ssl_write): ditto.

Wed Dec 24 14:23:27 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): clear the buffer argument
	  when returning nil.  [ruby-dev:22363]

	* test/ruby/ut_eof.rb (TestEOF::test_eof_0, TestEOF::test_eof_1):
	  add buffer argument tests.

Wed Dec 24 14:07:55 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb: Modules are allowed to rescue.

	* lib/test/unit/autorunner.rb: show output_level in order.

	* lib/test/unit/collector/dir.rb: get rid of successive same
	  directories in load path.

	* test/testunit/test_assertions.rb (test_assert_nothing_raised,
	  test_assert_raise): test for modules.

Wed Dec 24 13:43:34 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/net/imap.rb (authenticate): remove "\n" from base64 encoded
	  strings.

Wed Dec 24 11:26:41 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/fileutils/test_fileutils.rb: should not create any
	  files or directories in current directory.  [ruby-talk:88724]

Wed Dec 24 10:29:53 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): never return nil at
	  unlimited read.  [ruby-dev:22334]

	* ext/stringio/stringio.c (strio_read): support second
	  argument.  [ruby-dev:22350]

Wed Dec 24 09:38:49 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (arg): should return 0 after error.  [ruby-dev:22360]

Wed Dec 24 00:56:54 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (read_all): do not return nil at the end of file.
	  [ruby-dev:22334]

	* io.c (argf_read): do not depend on nil at eof behavior of
	  IO#read().

	* eval.c (rb_thread_join): dup exception before re-raising it.

	* io.c (rb_io_eof): call clearerr() to prevent side effect.  this
	  patch is supplied by Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>.
	  [ruby-dev:22234]

	* pack.c (OFF16): get offset for big endian machines.

	* pack.c (pack_pack): use OFF16 instead of OFF16B.
	  [ruby-dev:22344]

	* pack.c (pack_unpack): ditto.

Tue Dec 23 22:47:14 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_io_check_readable): set FMODE_RBUF always, even if
	  NEED_IO_SEEK_BETWEEN_RW is not defined. [ruby-dev:22340]

	* io.c (rb_io_check_writable): clear FMODE_RBUF before writing
	  something.

Tue Dec 23 22:25:00 2003  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/optparse.rb: incomplete RDoc documentation added in place of
	  existing RD comments.  Tabs converted to spaces.

Tue Dec 23 19:44:47 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/test_streamhandler.rb (test_basic_auth): removed.
	  soap4r + basic_auth is not officially supported in ruby/1.8.1 even
	  though soap4r + basic_auth + http-access2 should run fine.

Tue Dec 23 19:42:59 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_ungetc): raise an exception at unread stream to
	  avoid unspecified behavior.  [ruby-dev:22330]

	* test/ruby/test_system.rb (test_syntax): glob relatively from
	  __FILE__.

Tue Dec 23 18:09:40 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (pack_pack): remove unnecessary negative value check.
	  [ruby-dev:22329]

Tue Dec 23 17:26:55 2003  KONISHI Hiromasa  <konishih@fd6.so-net.ne.jp>

	* bcc32/Makefile.sub (config.h): bcc has finite(). [ruby-list:38940]

Tue Dec 23 16:08:16 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/rexml/encodings/US-ASCII.rb: typo.  [ruby-talk:88650]

	* test/ruby/test_system.rb: num of asserts depended on running dir.

	* test/xsd/test_noencoding.rb: rexml + without iconv/uconv cannot
	  handle euc-jp.  install iconv, uconv or xmlscan.

Tue Dec 23 14:13:51 2003  akira yamada  <akira@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic::check_userinfo,
	  URI::Generic::check_user, URI::Generic::check_password): tests
	  conflicts/depends with other components closely.

	* test/uri/test_generic.rb (TestGeneric::test_set_component):
	  added tets.

Tue Dec 23 11:08:34 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/xsd/test_noencoding.rb: rescue Errno::EINVAL and do not test.
	  "euc-jp" might not be in supported encoding name list.
	  [ruby-talk:88650]

Tue Dec 23 06:10:31 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb (CGI): add support for mod_ruby.

	* lib/webrick/cgi.rb (CGI::Socket): add check for existence of
	  OpenSSL module in all HTTPS related methods.

	* lib/webrick/cgi.rb (CGI::Socket#cipher): should create similar
	  value to OpenSSL::SSLSocket#cipher.

	* lib/webrick/httpresponse.rb (HTTPResponse#setup_header): should
	  set "connection: close" if @keep_alive is false.

	* lib/webrick/https.rb (HTTPrequest#meta_vars): add supprt for
	  SSL_PROTOCOL, SSL_CIPHER_USEKEYSIZE and SSL_CIPHER_ALGKEYSIZE.

Mon Dec 22 23:00:05 2003  akira yamada  <akira@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic::check_opaque): fixed typo.

Mon Dec 22 21:59:24 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (map_charset): always ensure code is a String.

Mon Dec 22 21:15:29 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_mod_init_copy): always copy singleton class.
	  [ruby-dev:22325]

Mon Dec 22 20:44:36 2003  akira yamada  <akira@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic#route_from): accepts urls which
	  has no host-part.

	* test/uri/test_generic.rb (TestGeneric::test_route): added a test.

Mon Dec 22 20:38:44 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/cgi.rb: reduce eval.

	* lib/cgi.rb (CGI::QueryExtension::read_multipart): alias path to
	  local_path.  [ruby-list:38883]

Mon Dec 22 20:09:31 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/test_property.rb: remove duplicated test method.

Mon Dec 22 18:22:04 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bcc32/Makefile.sub, win32/Makefile.sub (config.h): remove
	  HAVE_ISINF definition to follow previous commits of missing.h
	  and win32/win32.h.

Mon Dec 22 17:23:42 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ac_cv_func_setitimer): moved from defines.h

	* defines.h, rubysig.h, signal.c: removed macro handling which
	  should be done in configure.

	* configure.in (intrinsics.h): check if present.

	* ruby.h: include intrinsics.h if available.

	* bignum.c, marshal.c: include ieeefp.h if available.

	* missing.h (isinf): define as a macro if finite() and isnan()
	  are available.  [ruby-core:02032]

Mon Dec 22 17:07:31 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in (mingw): set isnan, finite and isinf to yes.

Mon Dec 22 13:40:19 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/property.rb: passing block by reference.

Mon Dec 22 00:32:43 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_with_disable_interrupt): use ENABLE_INTS instead of
	  ALLOW_INTS which may switch context.  [ruby-dev:22319]

	* ext/syck/emitter.c (syck_emitter_write): str bigger than
	  e->bufsize causes buffer overflow.  [ruby-dev:22307]

Sun Dec 21 17:29:00 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* class.c (rb_check_inheritable): new function.  [ruby-dev:22316]

	* intern.h: add prototype.

	* eval.c (superclass): use rb_check_inheritable().

	* object.c (rb_class_initialize): check argument validity.

Sun Dec 21 16:25:10 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#+): re-implemented to resolve ".." in
	  beginning of the argument.
	  (Pathname#join): concatenate from the last argument.
	  (Pathname#parent): just use Pathname#+.

Sun Dec 21 00:12:37 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: add new methods (TkScrollbar#assign, assign_list)

	* ext/tk/sample/tkmultilistframe.rb: use TkScrollbar#assign method

Sat Dec 20 21:59:03 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httprequest.rb (HTTPRequest#meta_vars): refine regexp.

	* lib/webrick/cgi.rb (CGI#start): NPH scripts return status line
	  instead of Status: header field.

	* lib/webrick/cgi.rb (CGI::Socket): refine some coditions.

Sat Dec 20 16:07:14 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Completion::complete): wrong
	  Regexp for word boundary.  pointed out by Gavin Sinclair.

	* lib/optparse.rb (OptionParser::make_switch): [no-] prefix was
	  missing.

Sat Dec 20 11:40:10 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/yaml.rb (YAML::YAML): adjust Marshal version.

Sat Dec 20 03:56:02 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_with_disable_interrupt): prohibit thread context
	  switch during proc execution.  [ruby-dev:21899]

Sat Dec 20 02:41:02 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/cgi.rb: add file. (yet another CGI library)

	* MANIFEST: add lib/webrick/cgi.rb.

Sat Dec 20 02:18:31 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* misc/ruby-mode.el (ruby-calculate-indent): proper indentation
	  inside of parentheses.  [ruby-dev:22308]

Fri Dec 19 21:24:22 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httprequest.rb (HTTPRequest#meta_vars): should not set
	  HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH.

	* lib/webrick/https.rb (HTTPRequest#parse): should check presence
	  of cert() method to detect SSLSocket.

Fri Dec 19 22:56:46 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/property.rb (SOAP::Property#load): new method for loading
	  property value into existing property tree.

	* test/soap/test_property.rb: add test.

Fri Dec 19 19:21:49 2003  akira yamada  <akira@ruby-lang.org>

	* lib/runit/cui/testrunner.rb (RUNIT::CUI::TestRunner::run):
	  should use Test::Unit::UI::{PROGRESS_ONLY,VERBOSE}.

Fri Dec 19 17:36:49 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tkmultilistbox.rb: bug fix

	* ext/tk/sample/tkmultilistframe.rb: new sample script

Fri Dec 19 03:44:27 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httputils.rb (parse_form_data): should return an
	  empty Hash if the body is empty.

Thu Dec 18 21:47:35 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): should remove deffile if it's
	  made by miniruby. based on nobu's patch.

Thu Dec 18 21:44:21 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (stack_extend): ignore inline optimization on VC7.

	* win32/Makefile.sub (OS, RT): can override.

	* win32/Makefile.sub (LDFLAGS): ditto. shouldn't use pdb:none
	  option. based on Tietew's patch [ruby-dev:22289]

Thu Dec 18 16:38:44 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (fnmatch): unlike find_dirsep(), rb_path_next() never
	  return NULL.

Thu Dec 18 15:27:59 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/ipaddr.rb (IPSocket::getaddress): merge usa's patch.
	  [ruby-dev:21678]

Wed Dec 17 15:15:30 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/cgi.rb (CGI::QueryExtension::Value::[]): should work like
	  String#[] if more than one arguments are specified.

	* lib/delegate.rb: avoid using common instance name as "@obj".

	* lib/cgi.rb (CGI::QueryExtension::Value): Value is no longer
	  subclass of String, but DelegateClass(String).

	* ext/curses/extconf.rb: restore function check for init_color.
	  [ruby-list:38905]

	* Makefile.in: need to specify $(MAINLIBS) for the miniruby
	  generation rule.

	* configure.in: better FreeBSD -lc_r support.

Wed Dec 17 00:16:14 2003  Minero Aoki  <aamine@loveruby.net>

	* ext/strscan/strscan.c: new method
	  StringScanner#beginning_of_line? (alias #bol?)

	* ext/strscan/strscan.c: new method StringScanner#concat and #<<.

	* ext/strscan/strscan.c: StringScanner#new(str) does not duplicate
	  nor freeze STR (allow destructive modification).

	* test/strscan/test_stringscanner.rb: test new methods above.

	* test/strscan/test_stringscanner.rb: test destructive string
	  modification.

Tue Dec 16 21:20:47 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pp.rb: don't use local variable `pp'.

	* lib/prettyprint.rb: ditto.

Tue Dec 16 13:20:43 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: condition bug of if statement on
	  {pack,grid}_propagate methods

Tue Dec 16 03:17:29 2003  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml/rubytypes.rb: comments in strings. [ruby-talk:88012]

	* test/yaml/test_yaml.rb: add test.

Tue Dec 16 01:14:44 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (catch_timer): check rb_thread_crtical in main native
	  thread.

	* eval.c (thread_timer): just sends signals periodically, to
	  prevent main native thread from receiving them in critical
	  section.  [ruby-core:01959]

Mon Dec 15 13:32:22 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (check_dirname): check string safety and remove extraneous
	  trailing directory separators.  [ruby-dev:22279]

	* file.c: renamed and externalized rb_path_next,
	  rb_path_skip_prefix, rb_path_last_separator, rb_path_end.

	* intern.h: prototypes for rb_path_next, rb_path_skip_prefix,
	  rb_path_last_separator, rb_path_end.

Mon Dec 15 09:27:46 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/ossl_pkcs12.c (ossl_pkcs12_initialize): first argument
	  of rb_protect should take an argument of VALUE.

Sun Dec 14 18:46:48 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/socket/socket.c (Init_socket): IPv6 is not supported although
	  AF_INET6 is defined on MinGW.

	* lib/ipaddr.rb (AF_INET6): workaround in the environment which does
	  not support IPv6.

Sat Dec 13 18:55:16 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/charset_alias.rb: preserve original order.

	* ext/iconv/extconf.rb: remove wrapper file at clean.

Sat Dec 13 18:09:42 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (thread_timer): use timer by sub-thread and nanosleep.
	  [ruby-talk:87519]

	* gc.c (Init_stack): no stack adjustment for THREAD_SAFE.

Sat Dec 13 17:17:59 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (proc_alloc): cache the created object at first time.
	  [ruby-talk:61288], [ruby-dev:22240]

Sat Dec 13 09:01:23 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in: check ucontext.h.

	* eval.c: use getcontext/setcontext() instead of setjmp/longjmp()
	  on ia64 or with native thread enabled.  [ruby-core:01932]

Sat Dec 13 03:09:14 2003  why the lucky stiff  <why@ruby-lang.org>

	* lib/yaml/rubytypes.rb: anonymous struct fix. [ruby-core:01946]

	* test/yaml/test_yaml.rb: add test.

Fri Dec 12 22:36:44 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/csv.rb: add Cell#to_str and Cell#to_s for /.../ =~ aCell,
	  "#{aCell}" and so on.

	* test/csv/test_csv.rb: add tests.

Fri Dec 12 19:33:06 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mkdir): remove trailing `/' from pathes.

	* lib/fileutils.rb (rmdir): ditto. [ruby-dev:22238]

	* lib/fileutils.rb (rmdir_r): ditto.

	* lib/fileutils.rb (fu_copy_dir): check if it is a directory after
	  mkdir(2).

Fri Dec 12 06:06:09 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (proc_invoke): fix class name in warning message for
	  define_method.  [ruby-dev:22235]

Thu Dec 11 21:24:43 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_pkcs12.[ch]: new files. add OpenSSL::PKCS12.

	* ext/openssl/ossl.[ch]: ditto.

	* ext/openssl/MANIFEST: add ossl_pkcs12.[ch].

Thu Dec 11 20:54:28 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2).
	  mkdir("nonexistdir/") does not work on NetBSD/Alpha 1.6.1.

	* lib/fileutils.rb (fu_list): call to_str for all arguments.

Thu Dec 11 20:07:01 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/ftools.rb (makedirs): sync with fileutils.

Thu Dec 11 19:53:03 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mkdir_p): catch all SystemCallErrors.
	  (mkdir("C:\") causes EACCESS on Windows 2000/NTFS)

Thu Dec 11 19:08:02 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (mkdir_p): check if it is a directory after
	  mkdir(2) instead of before mkdir(2), to avoid race condition.
	  [ruby-talk:87730]
	  Refer: mkinstalldirs sh script, GNU mkdir(1) (coreutils 5.0)

Thu Dec 11 18:49:30 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb: def m( arg ) -> def m(arg).

Thu Dec 11 11:39:43 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (ieeefp.h), numeric.c: needed for finite() on
	  Solaris.  [ruby-core:01921]

	* file.c (rb_stat_inspect): adjust format specifier.

	* parse.c (arg_prepend): nodetype() is for debug use.

	* ruby.h (ISASCII, etc): cast to int to get rid of warning.

	* ruby.h (alloca.h): include even in GCC.  [ruby-core:01925]

	* ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format
	  specifier.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce,
	  BigDecimal_divmod): use rb_assoc_new() to suppress memory usage.

	* ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto.

	* ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be
	  volatile.

	* ext/iconv/iconv.c (iconv_convert): ensure actual parameter with
	  format specifier.

	* ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not
	  define unless used.

	* ext/pty/pty.c (getDevice): get rid of warning.

	* ext/socket/socket.c (port_str, sock_s_getaddrinfo,
	  sock_s_getnameinfo): FIX2INT() now returns long.

	* ext/socket/socket.c (init_inetsock_internal): uninitialized
	  variable.

	* ext/syck/rubyext.c (syck_parser_assign_io): add prototype.

	* ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use
	  ISDIGIT() instead of isdigit() to avoid warnings and for
	  platforms which don't support non-ascii charater.

Wed Dec 10 19:28:56 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): set EOF flag at short read.
	  [ruby-dev:22223], [ruby-dev:22224]

Wed Dec 10 18:07:25 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/erb.rb: new method ERB#filename(=). [ruby-dev:22208]

Wed Dec 10 17:54:51 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): do not set EOF flag when
	  requested length is zero.  [ruby-dev:22214]

Wed Dec 10 17:17:18 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (read_all): should return given string even if data read is
	  empty.  [ruby-dev:22207]

Wed Dec 10 17:16:06 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): adjust behavior at reading
	  beyond EOF to IO.  [ruby-dev:22205]

	* test/ruby/ut_eof.rb (TestEOF::Seek): test behaviors at reading
	  beyond EOF.

	* test/ruby/test_file.rb, test/stringio/test_stringio.rb: include
	  TestEOF::Seek test case.

Wed Dec 10 15:01:19 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* test/monitor/test_monitor.rb (test_cond): use Queue#deq
	  instead of sleep.

Wed Dec 10 14:45:39 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/pty/pty.c (HAVE_SYS_IOCTL_H): need to include <sys/ioctl.h>
	  for TIOCSCTTY on *BSD.  based on gotoyuzo's patch.
	  (ruby-bugs:PR#1211)

	* ext/pty/pty.c (establishShell): should close descriptors if fork
	  failed.

Wed Dec 10 12:53:05 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* win32/win32.h: define execv() using do_aspawn().

	* process.c (proc_exec_v): remove #ifdef's which stopped needing.

Tue Dec  9 23:32:23 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb, ext/tk/lib/tkcanvas.rb, ext/tk/lib/tkdialog.rb,
	  ext/tk/lib/tkentry.rb, ext/tk/lib/tkscrollbox.rb, ext/tk/lib/tktext.rb,
	  ext/tk/sample/tkalignbox.rb, ext/tk/sample/tkcombobox.rb,
	  ext/tk/sample/tkmultilistbox.rb, ext/tk/sample/tkoptdb.rb, ext/tk/sample/tktextframe.rb,
	  ext/tk/sample/demos-en/dialog1.rb, ext/tk/sample/demos-en/dialog2.rb,
	  ext/tk/sample/demos-jp/dialog1.rb, ext/tk/sample/demos-jp/dialog2.rb:
	  overrided instance methods, which are private methods on the super
	  class, are changed to 'private'

Tue Dec  9 19:53:02 2003  akira yamada  <akira@ruby-lang.org>

	* lib/uri/generic.rb (URI::Generic#route_from0): make case insensitive
	  for host-part.

	* test/uri/test_generic.rb (test_route): added tests for the above
	  change.

Tue Dec  9 14:10:48 2003  Tanaka Akira  <akr@m17n.org>

	* io.c (rb_io_check_readable): don't call io_seek if EOF flag is set,
	  to avoid clearing EOF flag.
	  (rb_io_check_writable): ditto.

Tue Dec  9 02:53:55 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tkalignbox.rb: new sample script

Tue Dec  9 00:45:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: renamed #assert_raises to #assert_raise
	  and made the former call the latter. [ruby-core:01890]

	* test/testunit/test_assertions.rb: ditto.

Tue Dec  9 00:07:35 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/rpc/standaloneServer.rb: add 'shutdown' and 'status'
	  methods as delegates to WEBrick.

	* test/soap/calc/{test_calc.rb,test_calc2.rb},
	  test/soap/helloworld/test_helloworld.rb,
	  test/wsdl/datetime/test_datetime.rb, test/wsdl/raa/test_raa.rb:
	  follow the change.

Mon Dec  8 22:48:03 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/autorunner.rb: remove dependency to a particular
	  runner.  [ruby-core:01901], [ruby-list:38869]

	* lib/test/unit/ui/testrunnerutilities.rb: moved output level
	  constants from Console.

	* lib/test/unit/ui/console/testrunner.rb: ditto.

	* lib/test/unit/ui/{fox,gtk,gtk2,tk}/testrunner.rb (initialize):
	  accept output_level.

Mon Dec  8 15:03:30 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/syck/syck.c (syck_io_str_read): get rid of buffer overflow.

Mon Dec  8 13:02:11 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/uri/common.rb: new method URI.regexp. [ruby-dev:22121]

	* test/uri/test_common.rb: add test for URI.regexp.

Mon Dec  8 12:44:14 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c: define swap16 and swap32 only if they are not
	  defined. OpenBSD defines these macros. [ruby-dev:22181]

Sun Dec  7 20:54:17 2003  Tanaka Akira  <akr@m17n.org>

	* ext/iconv/iconv.c (map_charset): make case sensitive.
	  ext/iconv/charset_alias.rb (charset_alias): don't ignore
	  config.charset's information.  sort aliases.

Sat Dec  6 22:58:03 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c (ossl_start_ssl): new function to wrap
	  SSL_connect and SSL_accept; if SSL_connect (or SSL_accept) returned
	  but not finished the handshake process, we should retry it.

	* ext/openssl/ossl_ssl.c (ossl_ssl_connect): call ossl_start_ssl.

	* ext/openssl/ossl_ssl.c (ossl_ssl_accept): ditto.

	* ext/openssl/ossl_ssl.c (ossl_ssl_read): allow signal traps.

Sat Dec  6 21:45:10 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* io.c (flush_before_seek): flush before seek on any platform.

	* configure.in: ditto.

Sat Dec  6 17:23:00 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/soap.rb(SOAP::Env.getenv): allow upcase environment variable
	  as well as downcase one.

	* lib/soap/netHttpClient.rb(SOAP::NetHttpClient#proxy=): check URI.

Fri Dec  5 23:22:30 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_raises,
	  Test::Unit::Assertions::assert_nothing_raised): use the last
	  argument as message unless class object.

	* test/testunit/test_assertions.rb (test_assert_raises): test for
	  multiple exception list.  [ruby-core:01891]

	* test/testunit/test_assertions.rb (test_assert_nothing_raised): test
	  for non-exception classes.

Fri Dec  5 22:23:04 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/netHttpClient.rb: proxy support did not work.  fixed.

	* lib/soap/property.rb: add class methods for loading property from
	  stream/file/propertyfile.  propertyfile is a file which is located at
	  somedir in $:.

	* lib/soap/soap.rb, lib/soap/wsdlDriver.rb, lib/soap/rpc/driver.rb,
	  lib/wsdl/importer.rb: load property from propertyfile 'soap/property'
	  e.g. /usr/local/lib/ruby/site_ruby/1.8/soap/property.

	* test/soap/test_property.rb, test/soap/test_streamhandler.rb: new file.

Fri Dec  5 17:26:23 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_exec_end_proc): maintain tmp_end_procs.
	  [ruby-dev:22154]

Fri Dec  5 13:36:59 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_exec_end_proc): should not clear end_procs and
	  ephemeral_end_procs before execution. [ruby-dev:22144]

	* eval.c (rb_obj_extend): call Module#extended hook after
	  extended_object.  [ruby-list:38866]

	* object.c (Init_Object): Module#extended defined.

Fri Dec  5 13:17:30 2003  Tanaka Akira  <akr@m17n.org>

	* test/ruby/test_pipe.rb: use IO.pipe instead of IO.popen.

Fri Dec  5 11:54:45 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): follow IO#read.

	* test/ruby/ut_eof.rb, test/ruby/test_file.rb, test/ruby/test_pipe.rb,
	  test/stringio/test_stringio.rb: add EOF test.

Fri Dec  5 02:49:35 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_raises):
	  allow multiple exception list.  [ruby-core:01884]

	* lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_nothing_raised):
	  check whether arguments are subclass of Exception.

Thu Dec  4 23:54:00 2003  Rick Ohnemus  <rick.ohnemus@systemware.com>

	* dln.c (aix_loaderror): should not use member named 'errno' which
	  might be a macro (e.g. on AIX).

Thu Dec  4 23:32:26 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (read_all): do not depend on lseek position.
	  [ruby-dev:22026]

Thu Dec  4 22:37:26 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): preserve $! value when retry happens in the
	  rescue clause.  [ruby-talk:86697]

Thu Dec  4 21:50:07 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/drb/drb.rb (DRb::DRbMessage::send_request, send_reply):
	  should rescue errors and re-raise DRbConnError on write too.
	  [ruby-dev:22132]

Thu Dec  4 16:41:17 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (exc_list): allow expanding list.  [ruby-dev:22134]

Thu Dec  4 14:09:24 2003  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb (test_cp): test if the error is
	  kind of SystemCallError.  It is needless details that which errno
	  is set on each systems.

Thu Dec  4 13:24:13 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/monitor.rb: use Object#__send__ instead of Object#send.

Thu Dec  4 13:17:45 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/streamHandler.rb: support latest released version of
	  http-access2.

Thu Dec  4 13:04:44 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/soap.rb: add SOAP::Env module for environment repository
	  such as HTTP_PROXY.

	* lib/soap/property.rb: property implementation.

	* lib/soap/streamHandler.rb, lib/soap/wsdlDriver.rb,
	  lib/soap/rpc/driver.rb: use soap/property.rb.

	* lib/wsdl/importer.rb, lib/soap/wsdlDriver.rb, lib/soap/rpc/driver.rb:
	  use SOAP::Env.

	* lib/soap/netHttpClient.rb: add basic_auth, ssl_config, and cookie
	  management interface, but ignored for now.

	* lib/xsd/charset.rb: add XSD::Charset.encoding= interface to set
	  wiredump charset explicitly.  it was fixed to 'utf-8' when iconv or
	  uconv module was found.

Thu Dec  4 10:43:58 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/dl/sym.c (rb_dlsym_guardcall): __declspec(noinline) is VC7
	  feature.

Thu Dec  4 10:27:12 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: update hyperlink to the Japanese document.

Thu Dec  4 09:12:43 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (asn1time_to_time): should check that
	  the underlying value of ASN1_TIME isn't NULL. [ruby-core:01881]

Thu Dec  4 08:29:43 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/server.rb (GenericServer#start): should rescue
	  Exception to avoid unexpected aborting. [ruby-core:01853]

	* lib/webrick/server.rb (GenericServer#start_thread): should check
	  that peeraddr isn't nil before printing.

	* lib/webrick/httpresponse.rb (HTTPResponse#start_thread): should
	  rescue Exception to avoid unexpected aborting of thread.

Thu Dec  4 03:48:59 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#link, Pathname#symlink): obsoleted.
	  (Pathname#make_link, Pathname#make_symlink): new method.

Thu Dec  4 01:45:24 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (argf_read): should not terminate on empty string; wait
	  until real EOF.  [ruby-dev:21969]

	* io.c (argf_read): should adjust length to read, when length is
	  specified and read spans command line argument files.

Wed Dec  3 19:38:36 2003  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: correct fcntl parameter. [ruby-dev:22120]

Wed Dec  3 13:49:07 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: 'format'==>'Kernel.format' (avoid override trouble)

	* ext/tk/lib/tkafter.rb: ditto.

	* ext/tk/lib/tkcanvas.rb: ditto.

	* ext/tk/lib/tkdialog.rb: ditto.

	* ext/tk/lib/tktext.rb: ditto.

Wed Dec  3 13:28:13 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in (lex.c): try gperf first, and copy from the source
	  directory if failed.  [ruby-dev:22123]

	* ext/extmk.rb (MTIMES): let makefiles depend to mkmf.rb.

	* lib/mkmf.rb (configuration): DLDFLAGS was duplicated.

Tue Dec  2 23:18:12 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: wrote the warning about HTTP_PROXY environment
	  variable.

Tue Dec  2 21:31:42 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* bin/testrb: new test runner.  [ruby-core:01845]

	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner.run,
	  Test::Unit::AutoRunner#process_args): take test list to run and
	  options.

	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::RUNNERS,
	  Test::Unit::AutoRunner#run): should not exit inside a library,
	  just return the result instead.

	* lib/test/unit.rb: ditto.

	* test/runner.rb: exit with the test result.

Tue Dec  2 20:18:48 2003  Eric Sunshine  <sunshine@sunshineco.com>

	* configure.in (AC_PROG_YACC): AC_DEFINE(OLD_YACC) if Yacc is found
	  instead of Bison or byacc.

	* parse.y: If OLD_YACC is defined, ensure that YYMAXDEPTH is at least
	  10000 (Bison's default) since some old versions of Yacc define it as
	  low as 150 by default, which is too low for Ruby to parse some files,
	  such as date/format.rb.  Among other issues, the parse problem causes
	  "make test" to fail.

Tue Dec  2 20:03:20 2003  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb: check if Pathnames are usable
	  for arguments.

Tue Dec  2 04:22:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: fixed #assert_no_match message.

	* test/testunit/test_assertions.rb: ditto.

Tue Dec  2 00:43:00 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/syck.c: string buffering bug.  decrementing by full
	  max_size now. [ruby-core:01834]

Mon Dec  1 21:33:08 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* numeric.c (num_sadded): prohibit singleton method definition for
	  Numerics.  fill yet another gap between Fixnum and Bignum.

Mon Dec  1 17:33:47 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (htov16): converts endian using swap16. htov32(), hton16,
	  hton32 as well. [ruby-talk:85377]

	* pack.c (swap16): swap 2 bytes no matter how big short is on the
	  platform.  swap32() is also prepared.

	* numeric.c (rb_num2int): returns long to preserve information.
	  rb_fix2int(), rb_num2uint(), rb_fix2uint() as well.
	  [ruby-talk:85377]

	* numeric.c (rb_num2uint): should not check for value range if the
	  source value is negative.

Mon Dec  1 17:14:34 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* sample/optparse/opttest.rb: added.

Mon Dec  1 16:10:52 2003  Dave Thomas  <dave@pragprog.com>

	* lib/rdoc/rdoc.rb: (etc) initial merge into main tree.

Mon Dec  1 14:17:49 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (fu_each_src_dest0): call #to_str to allow
	  Pathname for arguments. [ruby-core:01795]

	* test/fileutils/test_fileutils.rb: does much strict test on
	  "same" files detecting.

Mon Dec  1 09:28:14 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub
	  (XCFLAGS): re-export $(XCFLAGS).

	* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub
	  (ARCH_FLAG): export $(ARCH_FLAG) (perhaps empty value).

Mon Dec  1 01:03:27 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/mkmf.rb (TRY_LINK, link_command): added support for DLDFLAGS
	  and ARCH_FLAG.  [ruby-dev:22085]

Sun Nov 30 20:18:07 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: keep ARCH_FLAG separate. export ARCH_FLAG.
	  [ruby-core:01819]

	* Makefile.in: add ARCH_FLAG to CFLAGS.

	* Makefile.in: add @CPPFLAGS@ to CPPFLAGS.

	* lib/mkmf.rb (link_command, cc_command): use ARCH_FLAG.

	* lib/mkmf.rb (configuration): add ARCH_FLAG to DLDFLAGS.

	* Makefile.in: add ARCH_FLAG to DLDFLAGS.

	* configure.in: should put getcwd in AC_CHECK_FUNCS, not
	  AC_REPLACE_FUNCS.  [ruby-core:01826]

Sun Nov 30 18:22:48 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: do not override CCDLDFLAGS, LDFLAGS, XLDFLAGS,
	  DLDFLAGS and LDSHARED.

	* configure.in: XCFLAGS for compiling ruby itself.  ARCH_FLAG is
	  reflected in CFLAGS.

	* lib/mkmf.rb: ditto.  do not import XCFLAGS from config.status.

Sun Nov 30 17:37:36 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: bug fix [ruby-talk:86746]

Sun Nov 30 13:02:00 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/encodingstyle/soapHandler.rb: refactoring - Simplifying
	  Conditional Expressions.

	* lib/wsdl/soap/definitions.rb: refactoring - Move Method.

	* test/xsd/{test_noencoding.rb,noencoding.xml}: new files.  test for
	  encoding unspecified XML file parsing.

	* test/wsdl/{test_fault.rb,map,datetime}: new files.  test of
	  SOAPFault, dateTime and Apache's Map.

Sun Nov 30 09:35:14 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* string.c (rb_str_update): get rid of SEGV at just allocated String.
	  [ruby-core:01812]

Fri Nov 28 23:19:34 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (gc_mark): explicitly check mark recursion levels, instead
	  of unreliable stack length.

Fri Nov 28 22:49:56 2003  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/rinda/rinda.rb: fix TupleSpaceProxy#read, read_all.

Fri Nov 28 21:44:40 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* test/fileutils/test_fileutils.rb (test_ln_s): should be a file, not
	  a directory for FreeBSD.

Fri Nov 28 19:37:56 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* hash.c (env_has_value, env_index): must match exactly.

	* test/ruby/test_env.rb (test_has_value, test_index): condition for
	  aboves.

Fri Nov 28 17:59:20 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_env.rb: add tests for ENV.

Fri Nov 28 17:47:46 2003  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb (DRbMessage#load): rescue Errno::* and raise
	  DRbConnError.

Fri Nov 28 15:41:15 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#realpath): obsolete the force_absolute
	  argument.

Fri Nov 28 14:41:52 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/streamHandler.rb: drop unused http parameters.

	* lib/soap/encodingstyle/soapHandler.rb, lib/soap/mapping/factory.rb,
	  lib/soap/mapping/mapping.rb, lib/soap/mapping/registry.rb,
	  lib/wsdl/soap/complexType.rb: ApacheSOAP's map support was broken
	  under WSDL dynanic client environment.  fixed.

	* test/wsdl/raa/*: add tests.

	* lib/xsd/datatypes.rb: dateTime precision bug fix (at least, I hope.)
	  bug of soap4r.  XSDDateTimeImple.to_time passed a Float to
	  Time.local/Time.gm as an usec, and NUM2LONG(rb_num2long for Float)
	  causes rounding error.

	* test/soap/test_basetype.rb, test/xsd/test_xsd.rb: add tests.

Fri Nov 28 04:15:24 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (method_arity): used wrong Proc object.  [ruby-talk:86504]

Fri Nov 28 00:47:29 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_f_exit), process.c (rb_f_exit_bang): treat true as
	  success, false as failure.  [ruby-dev:22067]

	* eval.c (rb_f_abort, rb_thread_switch), process.c (rb_f_system): use
	  ANSI macro instead of hard coded value.

	* eval.c (rb_f_exit), process.c (rb_f_exit_bang): use VALUEs not but
	  TYPEs.

Thu Nov 27 22:05:48 2003  Akinori MUSHA  <knu@iDaemons.org>

	* eval.c, gc.c: FreeBSD/ia64 currently does not have a way for a
	  process to get the base address for the RSE backing store, so
	  hardcode it for the moment.
	  [submitted by: Marcel Moolenaar <marcel@FreeBSD.org>]

Thu Nov 27 17:36:42 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkafter.rb: bug fix on TkTimer#cancel_on_exception=(mode).
	  TkTimer#wait recieves the exception of the callback.
	  The exception is kept on @return_value.

Thu Nov 27 16:58:48 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* win32/win32.c (rb_w32_stat): remove _fullpath() for NUL: device.

Wed Nov 26 15:38:47 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* test/fileutils/test_fileutils.rb (test_ln_s): should take the
	  existing symbolic link for OpenBSD.

Wed Nov 26 04:48:42 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/token.c: removed YYTOKTMP references which
	  were causing buffer overflows on large block scalars,
	  comments, quoted scalars and plain scalars.

	* ext/syck/rubyext.c: dynamic changing of buffer size.

	* ext/syck/syck.h: default buffer size of 4k.

Wed Nov 26 00:55:30 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpresponse.rb: add HTTPResponse#keep_alive=.

	* lib/webrick/httpserver.rb (HTTPServer#run): should pass the
	  request's keep_alive flag to the response.

Tue Nov 25 21:41:35 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* defines.h (ENV_IGNORECASE): should define when DOSISH without
	  human68k. [ruby-dev:22047]

	* hash.c (env_has_value, env_index): don't ignore case of value.
	  [ruby-dev:22048]

Tue Nov 25 21:39:37 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* file.c (path_check_1): honor sticky bits always.
	  [ruby-talk:86273]

Tue Nov 25 20:02:14 2003  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb: do test in more deep
	  directory.

	* test/fileutils/test_nowrite.rb: ditto.

Tue Nov 25 19:04:23 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::Generic#find_proxy): ENV case sensitivity test
	  refined.

Tue Nov 25 18:13:30 2003  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb: chdir Dir.tmpdir before each
	  test. [ruby-dev:22045]

	* test/fileutils/test_nowrite.rb: ditto.

Tue Nov 25 17:52:11 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::Generic#find_proxy): use http_proxy under CGI
	  if the environment variable is case sensitive.

Tue Nov 25 16:41:33 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb:
	  removed.  this test requires extra libraries in soap4r/1.5.*.

Tue Nov 25 16:24:42 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/**/*.rb, lib/wsdl/**/*.rb, lib/xsd/**/*.rb: changed license;
	  GPL2 -> Ruby's.

	* lib/soap/rpc/driver.rb, lib/soap/wsdlDriver.rb,
	  lib/soap/streamHandler.rb: add interface to streamhandler.

	* lib/soap/marshal.rb: raise error if parse fails.

	* lib/soap/netHttpClient.rb: add https support.  Patched by
	  Oliver M. Bolzer.

	* lib/soap/netHttpClient.rb: dump HTTP response message body by itself.

	* lib/soap/rpc/driver.rb, lib/soap/rpc/proxy.rb,
	  lib/soap/wsdlDriver.rb: add driver#mandatorycharset interface to foce
	  using charset for parsing response from buggy server.

	* lib/soap/encodingstyle/soapHandler.rb: support Apache Axis's half
	  typed multi-ref array.

	* lib/soap/mapping/factory.rb, lib/soap/mapping/registry.rb: map
	  SOAPStruct which has multi-accessors which name are the same, to an
	  array.

	* lib/soap/rpc/element.rb: fixed illegal parameter order.

	* lib/soap/rpc/element.rb: element name of response message could have
	  the name other than 'return'.

	* lib/wsdl/operation.rb, lib/wsdl/operationBinding.rb,
	  lib/wsdl/soap/classDefCreator.rb, lib/wsdl/soap/methodDefCreator.rb,
	  lib/wsdl/soap/methodDefCreatorSupport.rb: WSDL/1.1 allows plural
	  fault definition in a operation. [ruby-talk:84948]

	* test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: add
	  test for above fix.

	* lib/wsdl/soap/complexType.rb: support WSDL array definition with
	  maxOccures="unbound".

	* lib/xsd/charset.rb: use cp932 under emx.  Patched by
	  Siena. / SHINAGAWA, Norihide in [ruby-dev:21972]

	* lib/xsd/xmlparser/parser.rb: set @charset nil by default.  Nil means
	  'follow encoding declaration in XML'.

	* sample/soap/digraph.rb, sample/wsdl/amazon/wsdlDriver.rb,
	  sample/wsdl/googleSearch/sampleClient.rb,
	  sample/wsdl/googleSearch/wsdlDriver.rb,
	  test/wsdl/test_emptycomplextype.rb,
	  test/wsdl/marshal/test_wsdlmarshal.rb,
	  test/xsd/test_xmlschemaparser.rb: use File.open(...) { |f| f.read }
	  instead of File.open(...).read. [ruby-dev:21964]

	* test/wsdl/emptycomplextype.wsdl, test/wsdl/test_emptycomplextype.rb:
	  simplify the test case.

	* test/wsdl/axisArray/*: add tests for axis's array encoding.

Tue Nov 25 16:15:29 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ruby.h: don't treat Cygwin as Windows.

Tue Nov 25 15:18:28 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* configure.in: change default value of --enable-pthread (default: no)

Tue Nov 25 07:31:16 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): allow newlines just before right argument
	  parenthesis.  (ruby-bugs:PR#1221)

Mon Nov 24 23:32:06 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (OpenURI.open_loop, URI::HTTP#proxy_open): use
	  catch/throw for redirection instead of exception.
	  (OpenURI.open_loop, OpenURI.redirectable?): restrict redirection.

Mon Nov 24 19:59:48 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (URI::Generic#find_proxy): use CGI_HTTP_PROXY
	  instead of HTTP_PROXY in the CGI environment.

Mon Nov 24 19:32:55 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/etc/extconf.rb: check for pw_passwd in struct passwd and
	  gr_passwd in struct group for DJGPP.

	* ext/etc/etc.c: ditto.

	* ext/Setup.dj: support for curses, etc, zlib.

Mon Nov 24 17:00:00 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb: validate option names.
	  :content_length_proc and :progress_proc option implemented.

Mon Nov 24 14:53:10 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub
	  (XCFLAGS): output empty value instead of `-DRUBY_EXPORT'.

Sat Nov 22 23:09:45 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: set enable_pthread to no on MinGW.

Sat Nov 22 22:56:20 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* configure.in: add --enable-pthread option (default: yes)

Sat Nov 22 22:48:46 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: add Tk.grab_release and fix bug of TkComposite

	* ext/tk/lib/tkafter.rb: bug fix of TkAfter#start

	* ext/tk/sample/tkcombobox.rb: new sample script

	* ext/tcltklib/tcltklib.c: add native thread check

Sat Nov 22 18:49:47 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/curses/curses.c (window_nodelay): nodelay() of NetBSD's
	  libcruses returns no value, just like keypad().

Sat Nov 22 17:36:36 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub
	  (HAVE_GETCWD): output to config.h.

	* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub
	  (XCFLAGS): output to config.status.

Sat Nov 22 13:10:10 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (have_st_ino?): djgpp has valid st_ino.

Sat Nov 22 11:28:48 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (Init_stack): stack region is far smaller than usual if
	  pthread is used.

Sat Nov 22 07:30:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/util/backtracefilter.rb: fixed a bug that occurred
	  when an exception had no backtrace.

	* test/testunit/util/test_backtracefilter.rb: ditto.

Fri Nov 21 16:44:18 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tkentry.rb: fix the encoding trouble of percent
	  substitutions on validatecommand option of TkEntry widget

	* ext/tk/lib/tk.rb: fix bug on {pack|grid}_propagate() method

Fri Nov 21 16:12:11 2003  Akinori MUSHA  <knu@iDaemons.org>

	* ruby.1: Fix markups and grammar.

Fri Nov 21 14:49:42 2003  Minero Aoki  <aamine@loveruby.net>

	* ruby.1: wrote about ruby related environment variables.

Fri Nov 21 12:28:03 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_extended): singleton methods should not be checked
	  when dumping via marshal_dump() or _dump(). [ruby-talk:85909]

Fri Nov 21 01:40:00 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* configure.in: check <pthread.h>

	* ruby.h: include pthread.h if existence.
	  define is_ruby_native() macro when not HAVE_NATIVETHREAD

	* eval.c: undef is_ruby_native() function when not HAVE_NATIVETHREAD

Fri Nov 21 00:43:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: use #__send__ instead of #send.

	* lib/test/unit/testcase.rb: ditto.

Thu Nov 20 19:19:22 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in: don't find the Cygwin's pthread library on MinGW.

Thu Nov 20 19:15:50 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (have_st_ino?): emx (OS/2 with EMX) does not
	  have st_ino (always 0). [ruby-dev:21972]

	* lib/fileutils.rb (rename_cannot_overwrite_file?): emx does not
	  allow overwriting files by rename(2).

	* test/fileutils/test_fileutils.rb: windows? ->
	  have_drive_letter?, have_file_perm?

Thu Nov 20 17:50:58 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/tkballoonhelp.rb: new sample script

	* ext/tk/sample/tkmultilistbox.rb: ditto

	* ext/tk/sample/tktextframe.rb: ditto

Thu Nov 20 13:37:34 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ruby.h: define is_ruby_native_thread() for no native thread
	  environment

	* eval.c: ditto

Thu Nov 20 12:42:47 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* configure.in: always check existence of the pthread library

	* ruby.h: define macros for ruby's native thread check

	* eval.c: add ruby's native thread check

	* gc.c: ditto

Wed Nov 19 14:45:18 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb (to_ary): print more friendly warning message.

Wed Nov 19 14:32:08 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (fu_same?): add djgpp and wince.

	* lib/fileutils.rb (cannot_overwrite_file?): add wince.

Wed Nov 19 11:04:47 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/fileutils.rb (cannot_overwrite_file?, have_st_ino?): bccwin32
	  is same as mswin32.

Wed Nov 19 07:54:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit.rb: do not run tests if $! is set.

	* lib/test/unit/assertionfailederror.rb: extend StandardError instead
	  Exception (irb catches the former but not the latter).

Tue Nov 18 23:31:36 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* missing/memmove.c (memmove): take void *, not char *.

	* missing.h (memmove): ditto.

	* missing.h (strchr, strrchr): return char *, not int.

Tue Nov 18 22:20:10 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (fu_same?): temporal fix for windows.

Tue Nov 18 19:05:04 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (fu_same?): check by inode instead of path
	  name, to detect two hard links pointing to the same content.

	* test/fileutils.rb: did not create correctly looped symlinks.

Tue Nov 18 18:23:05 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_read): behave as IO at empty string.
	  [ruby-dev:21939], [ruby-dev:21941]

	* ext/stringio/stringio.c (strio_getc, strio_getline): set EOF flag.

	* ext/stringio/stringio.c (strio_rewind, strio_seek, strio_ungetc):
	  clear EOF flag.

	* test/stringio/test_stringio.rb: imported from [ruby-dev:21941].

Tue Nov 18 14:06:35 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/fileutils.rb (fu_each_src_dest): raise if src==dest.
	  [ruby-talk:85344] [ruby-core:01699]

	* lib/fileutils.rb: use Object#is_a? instead of Class#=== to allow
	  e.g. remote objects for receivers.

	* lib/fileutils.rb: FileTest -> File.

	* lib/fileutils.rb: put parentheses for arguments of File.xxxx?

	* test/fileutils/test_fileutils.rb (test_cp): test "cp a a".

	* test/fileutils/test_fileutils.rb (test_mv): test "mv a a".

	* test/fileutils/test_fileutils.rb (test_ln): test "ln a a".

	* test/fileutils/test_fileutils.rb (test_ln_s): test "ln_s a a".

	* test/fileutils/test_fileutils.rb (test_install): test "install a a".

	* test/fileutils/fileasserts.rb: new method assert_symlink.

	* test/fileutils/fileasserts.rb: assert_is_directory -> assert_directory.

Mon Nov 17 19:38:49 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* file.c (getcwdofdrv): avoid using getcwd() directly, use
	  my_getcwd() instead.

	* merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine
	  <sunshine@sunshineco.com>.  [ruby-core:01596]

Mon Nov 17 10:50:27 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Completion::complete): allow least
	  common completion for three or more candidates.

Mon Nov 17 09:41:38 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/ui/tk/testrunner.rb,
	  lib/test/unit/ui/gtk/testrunner.rb:
	  run GUI main loop in sub thread.

	* lib/test/unit/ui/gtk2/testrunner.rb: imported from rough.

	* lib/test/unit/autorunner.rb (keyword_display): sort keywords.

Sun Nov 16 18:10:57 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): iterator should return value from next inside
	  begin/rescue/end.  (ruby-bugs:PR#1218)

Sun Nov 16 13:26:07 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_object): LINK check earlier than anything else,
	  i.e. do not dump TYPE_IVAR for already dumped objects.
	  (ruby-bugs:PR#1220)

	* eval.c (rb_eval): call "inherited" only when a new class is
	  generated; not on reopening.

	* eval.c (eval): prepend error position in evaluating string to
	  "mesg" attribute string only when it's available and is a
	  string.

Sun Nov 16 12:16:10 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/protocol.rb: logging response body. [experimental]
	  [ruby-list:38800]

Sun Nov 16 10:49:38 2003  Gavin Sinclair  <gsinclair@soyabean.com.au>

	* lib/thread.rb (Thread.exclusive): wrap method definition in
	  class Thread to enable rdoc to process.

Sun Nov 16 09:45:23 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb (set_debug_output): warn if method is called
	  after #start.  [ruby-dev:38798]

Sun Nov 16 04:41:33 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (eval): do not re-raise exception to avoid unnecessary
	  exception copying, instead modify exception and internal
	  information to adjust eval().

	* eval.c (backtrace): can return the current frame information
	  only if lev < -1.

Sat Nov 15 22:16:42 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* /ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext):
	  refine error message.

Sat Nov 15 10:05:40 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (OpenURI.open_loop, OpenURI::HTTP#proxy_open):
	  refactored to support options.
	  (Buffer): maintain size by this class.

Sat Nov 15 07:40:14 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_method_node): new API to retrieve method body.

Fri Nov 14 13:21:30 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: fix (en-bugged at 2003/11/07)

	* ext/tk/lib/tkdialog.rb: TkDialog.new accepts a parent widget
	  argument [ruby-talk:85066]

Thu Nov 13 20:53:35 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (Kernel[#.]open): hard coded URI schemes removed.
	  [ruby-ext:02251]

Thu Nov 13 19:17:00 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* lib/test/unit/ui/tk/testrunner.rb: use grid and panedwindow
	  (if available)

Thu Nov 13 17:56:41 2003  Tanaka Akira  <akr@m17n.org>

	* lib/open-uri.rb (OpenURI.open_uri): use File::RDONLY.
	  reported by Take_tk <ggb03124@nifty.ne.jp>.
	  [ruby-ext:02245]

Thu Nov 13 16:45:53 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509req.c (ossl_x509req_to_der): add function for
	  X509::Request#to_der.

Thu Nov 13 11:31:14 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Completion#complete): prior shorter
	  name to containing longer name.

Thu Nov 13 06:08:54 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: stop freezing some classes

	* ext/tk/lib/multi-tk.rb: ditto.

Wed Nov 12 17:32:49 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/assertions.rb (assert_throws, assert_nothing_thrown):
	  uncaught throw in sub thread raises ThreadError.

	* lib/test/unit/ui/tk/testrunner.rb (setup_ui): "expand" is not
	  necessary.

Wed Nov 12 14:09:43 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* test/monitor/test_monitor.rb: fix the timing problem by Queue.

Wed Nov 12 12:59:44 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* test/monitor/test_monitor.rb: added.

Wed Nov 12 10:14:28 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/monitor.rb: refactored. Thanks, Gennady Bystritsky.

Wed Nov 12 06:11:39 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.c (ossl_x509_sk2ary, ossl_x509crl_sk2ary):
	  add functions to convert STACK into Array.

	* ext/openssl/ossl.h: add prototypes.

	* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_set_certificates,
	  ossl_pkcs7_get_certificates, ossl_pkcs7_get_crls,
	  ossl_pkcs7_set_crls): add functions for PKCS7#certificates=
	  PKCS7#certificates, PKCS7#crls= and PKCS7#crls.

Wed Nov 12 00:47:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/ui/testrunnermediator.rb: should require 'test/unit'.

Tue Nov 11 23:54:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/ui/gtk/testrunner.rb: added a rescue clause to handle
	  the case when the requested font is not available.

Tue Nov 11 22:44:08 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (appendline): file may not end with newline.  a bug if
	  READ_DATA_PENDING_PTR is defined. [ruby-talk:84925]

Tue Nov 11 10:42:41 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: raise an exception when creating TkWindow
	  object, because TkWindow class is an abstract class.

Tue Nov 11 03:30:43 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/ext/openssl/ossl_conf.c (ossl_config_get_value): return nil
	  if the specified value doesn't exist.

	* lib/ext/openssl/ossl_conf.c (ossl_config_get_section): return
	  a empty hash if the specified section doesn't exist.

Mon Nov 10 11:40:29 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/monitor.rb (wait): return true on signal/broadcastfalse and
	  false on timeout. Thanks Gennady Bystritsky.

Mon Nov 10 00:07:10 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (primary): primary_value may be 0 when syntax error.
	  [ruby-talk:84893]

Sun Nov  9 02:05:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: un-deprecated #assert_not_nil to
	  maintain symmetry with #assert_nil. Also added better output for
	  #assert_kind_of.

	* test/testunit/tc_assertions.rb: ditto.

Sat Nov  8 18:50:20 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/wsdl/raa/*: add new testcase for WSDL loading, parsing and
	  reading.

	* test/soap/marshal/*: backport from soap4r/1.5.1.  all differences are
	  for ruby/1.6.

	* lib/soap/*: backport from soap4r/1.5.1.  all differences are for
	  ruby/1.6.

	* lib/wsdl/data.rb, lib/wsdl/xmlSchema/data.rb: move definition of
	  ArrayTypeAttrName from ::WSDL::XMLSchema::* to ::WSDL::*.
	  [ruby-talk:84813]

	* lib/wsdl/soap/definitions.rb: element name typo in custom exception
	  struct definition which is needed for wsdlDriver; camelCase ->
	  underscore_name.

Sat Nov  8 13:49:50 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* configure.in: improvement of pthread check

Sat Nov  8 13:28:46 2003  Takaaki Tateishi  <ttate@ttsky.net>

	* ext/dl/sym.c: Add DL.win32_last_error and DL.last_error.
	  Thanks, Kaoru Shirai.

Sat Nov  8 06:19:38 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: To fix 'pthread-enabled Tcl/Tk' problem,
	  TclTkIp#_eval calls Tcl_Eval() on the mainloop thread only
	  (queueing a handler to the EventQueue).

	* ext/tcltklib/README.1st: edit the description of '--with-pthread-ext'

Fri Nov  7 23:23:04 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (Pathname#+): if self or the argument is `.', return
	  another.
	  (Pathname#parent): if self is `.', return `..'.
	  (Pathname#children): if self is `.', don't prepend self for a
	  pathname in a result.
	  (Pathname#join): re-implemented using Pathname#+.
	  (Pathname#find): if self is `.', remove `./' prefix of yielding
	  pathname.

Fri Nov  7 10:23:24 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (make_hostent): get rid of SEGV on aliases
	  lookup failure.  (ruby-bugs:PR#1215)

Fri Nov  7 04:08:05 2003  UENO Katsuhiro  <katsu@blue.sky.or.jp>

	* ext/zlib/zlib.c (Init_zlib): define Zlib::GzipReader#each_line as
	  an alias of Zlib::GzipReader#each.

Fri Nov  7 01:03:16 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_load): save and restore rb_prohibit_interrupt.
	  [ruby-dev:21857]

Thu Nov  6 18:05:07 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* io.c (rb_io_inspect): show the path also at a closed file.
	  [ruby-dev:21851]

Thu Nov  6 11:42:07 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/stringio/stringio.c (strio_set_string, strio_reopen): check
	  tainted.

	* ext/stringio/stringio.c (strio_copy, strio_ungetc, strio_write,
	  strio_putc): add infection.

	* ext/stringio/stringio.c (strio_path): just nil.  [ruby-dev:21846]

	* ruby.c (proc_options): reserve searched script path in the
	  source file name table.  [ruby-list:38765]

	* lib/optparse.rb (OptionParser::Completion#complete): default not to
	  ignore case on completion.  [ruby-talk:84726]

	* win32/win32.c (make_cmdvector): process backslashes even if a quote
	  is not enclosed.

Wed Nov  5 23:49:45 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* sample/openssl/gen_csr.rb: there (at least) is a CA which does not
	  accept DN in UTF8STRING format.  it's a sample.

Wed Nov  5 22:55:16 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* configure.in, eval.c, signal.c: : add '--with-pthread-ext'
	  option to fix the pthread trouble on 'tcltklib'

	* ext/tcltklib/README.1st: add the description of '--with-pthread-ext'

	* ext/tk/lib/tktext.rb : add TkText#text_copy, text_cut, text_paste
	  to support Tcl/Tk8.4's tk_textCopy, tk_textCut, tk_textPaste

	* ext/tk/lib/tk.rb : add TkMenu#set_focus support Tcl/Tk's
	  tk_menuSetFocus

Wed Nov  5 17:33:45 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_load): allow interrupt during loaded program
	  evaluation.  [ruby-dev:21834]

	* hash.c (rb_hash_fetch): always warn if default argument and a
	  block are supplied at the same time. [ruby-dev:21842]

	* hash.c (env_fetch): ditto.

	* array.c (rb_ary_fetch): ditto.

Wed Nov  5 19:08:47 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):
	  do not remove next argument if empty value is placed.

	* test/optparse: added.

Wed Nov  5 17:05:18 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/ui/gtk/testrunner.rb: typo.

Wed Nov  5 11:13:32 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* string.c: add #include "version.h". this file still depends on it.

	* Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub,
	  wince/Makefile.sub: add version.h dependency to string.c.

Wed Nov  5 09:14:23 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/monitor.rb: revert to the previous revision.

Wed Nov  5 08:39:51 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/https.rb (HTTPRequest#parse): set @client_cert_chain.

	* lib/webrick/https.rb (HTTPRequest#meta_vars): create
	  SSL_CLIENT_CERT_CHAIN_n from @client_cert_chain.

	* ext/openssl/ossl_ssl.c (ossl_ssl_get_peer_cert_chain): return nil
	  if no cert-chain was given.

Tue Nov  4 23:44:48 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub:
	  remove needless version.h dependency.

Tue Nov  4 23:38:43 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* class.c, hash.c, string.c: remove #include "version.h".

	* Makefile.in: remove needless version.h dependency.

Tue Nov  4 06:54:52 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (read_all): fptr->f may be NULL, if IO is closed in the
	  signal handler.

	* io.c (io_read): ditto.

	* string.c (get_pat): remove 1.8.0 warning code.

	* string.c (rb_str_match): extend warning until 1.8.2.

	* string.c (rb_str_match2): ditto.

	* class.c (class_instance_method_list): remove 1.8.0 warnings.
	  method_list now recurs.  [ruby-dev:21816]

	* class.c (rb_obj_singleton_methods): ditto.

	* array.c (rb_ary_select): remove select with block.
	  [ruby-dev:21824]

	* hash.c (rb_hash_select): ditto.

	* hash.c (env_select): ditto.

	* re.c (match_select): ditto.

	* struct.c (rb_struct_select): ditto.

Mon Nov  3 22:53:21 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/racc/parser.rb: synchronize with Racc 1.4.4.

	* ext/racc/cparse/cparse.c: ditto.

	* ext/racc/cparse/cparse.c (parse_main): should abort when
	  the length of LR state stack <=1, not ==0.

Mon Nov  3 08:50:47 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* process.c (check_uid_switch): remove duplicated error messages.

	* process.c (check_gid_switch): ditto.

Sun Nov  2 02:28:33 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/ssl.rb: new option :SSLExtraChainCert.

Sun Nov  2 01:02:04 2003  Akinori MUSHA  <knu@iDaemons.org>

	* string.c (rb_str_hash): Update the HASH_PERL alternative hash
	  algorithm in sync with Perl 5.8.

	* st.c (strhash): Ditto.

Sat Nov  1 18:21:09 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c (ossl_ssl_peer_cert_chain): add new method
	  SSLSocket#peer_cert_chain.

	* ext/openssl/ossl_x509req.c (GetX509ReqPtr): new function
	  which returns underlying X509_REQ.

	* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_issuer_cert,
	  ossl_x509extfactory_set_subject_cert, ossl_x509extfactory_set_crl,
	  ossl_x509extfactory_set_subject_req, ossl_x509extfactory_set_config):
	  use underlying C struct without duplication not to leak momory.

Sat Nov  1 01:49:03 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/mapping/factory.rb: mark marshalled basetype objects when
	  @allow_original_mapping is true.  multi-referencing basetype node is
	  prohibited in SOAP/1.1 encoding but soap4r's original ruby object
	  mapping requires basetype to be marked to detect self referencing
	  loop.  e.g. o = 1; o.instance_eval { @iv = o }  soap4r's original
	  mapping is only used through soap/marshal API.

	* test/soap/marshal/test_marshal.rb: add tests for self referencing
	  immutable objects.

	* test/soap/calc/test_calc_cgi.rb: fix test name.

Fri Oct 31 22:26:29 2003  Takaaki Uematsu  <uema2x@jcom.home.ne.jp>

	* wince/string_wce.c (strrchr): should decrement pointer.

	* wince/Makefile.sub: correct a range of isdigit().

Fri Oct 31 12:55:24 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* configure.in, lib/mkmf.rb: add RPATHFLAG for NetBSD.
	  [ruby-dev:21791]

	* bcc32/Makefile.sub, win32/Makefile.sub, win32/Makefile.sub: ditto.

Fri Oct 31 01:38:14 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* wince/Makefile.sub, win32/Makefile.sub (.y.c): allow white spaces
	  at the beginning of line to remove by sed. (ruby-bugs-ja:PR#580)

Fri Oct 31 01:02:24 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* compar.c (cmp_equal): protect exceptions from <=> comparison
	  again.  returns nil if any exception or error happened during
	  comparison.

	* eval.c (search_required): should update *featurep when DLEXT2 is
	  defined. (ruby-bugs-ja:PR#581)

Thu Oct 30 23:41:04 2003  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/drb.rb: add DRbArray

	* lib/drb/invokemethod.rb: fix Hash#each problem. [ruby-dev:21773]

	* lib/drb/unix.rb: add LoadError. [ruby-dev:21743]

Thu Oct 30 23:19:11 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/generator.rb: better XML pretty printing.

	* lib/soap/encodingstyle/soapHandler.rb: remove unnecessary namespace
	  assignment in the element which has "encodingStyle" attribute, and
	  add necessary namespace assignment for "arrayType" attribute.

	* test/soap/calc/test_calc_cgi.rb: take over $DEBUG to ruby process
	  through CGI.

Thu Oct 30 22:59:39 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/yaml2byte.c: HASH const too long.  Thanks, matz.

Thu Oct 30 19:13:53 2003  Akinori MUSHA  <knu@iDaemons.org>

	* ext/syck/MANIFEST: Add yamlbyte.h.

Thu Oct 30 14:25:31 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (READ_DATA_BUFFERED): new macro to detect whether stdio
	  buffer filled.

	* io.c (rb_io_fptr_cleanup): move path deallocation to
	  rb_io_fptr_finalize (finalizer called by GC).

Thu Oct 30 13:23:39 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (logop): left may be NULL. [ruby-talk:84539]

	* eval.c (rb_eval): NODE_CASE nd_head may be NULL.

Thu Oct 30 10:14:51 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/test/unit/autorunner.rb: make fox runner work.

Thu Oct 30 09:32:26 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* process.c (rb_f_system): fixed lack of security check before
	  calling do_spawn() on win32. [ruby-talk:84555]

Thu Oct 30 02:46:35 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_invoke): single array value to normal Proc#call
	  (i.e. not via lambda call), should be treated just like yield.
	  [ruby-dev:21726]

Thu Oct 30 02:25:48 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/buffering.rb (Buffering#initialize):
	  add new method to inherit @sync from @io.sync.

	* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): no need to
	  set sync flag explicitly.

	* ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): call super.

	* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): set extra chain
	  certificates in @extra_chain_cert.

Wed Oct 29 22:02:04 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/drb/drbtest.rb: use rbconfig.rb to make the path of ruby
	  interpreter to exec, instead of test/ruby/envutil.rb,

Wed Oct 29 19:58:59 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/tcltklib/tcltklib.c (CONST84): define CONST84 when it is not
	  defined and TCL_MAJOR_VERSION >= 8.

	* ext/tcltklib/tcltklib.c (VwaitVarProc, WaitVariableProc,
	  rb_threadVwaitProc): use CONST84 instead of CONST.

	* ext/tcltklib/tcltklib.c (ip_rbTkWaitCommand,
	  ip_rb_threadTkWaitCommand): use CONST84 always.

Wed Oct 29 17:27:05 2003  Tanaka Akira  <akr@m17n.org>

	* re.c (rb_reg_s_union, Init_Regexp): new method `Regexp.union'.

	* lib/pathname.rb (realpath): examine Dir.pwd because it may have
	  symlinks.

Wed Oct 29 17:16:31 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_longjmp): must not disturb original jump.
	  [ruby-dev:21733]

Wed Oct 29 15:28:34 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (Init_Proc): taint preallocated exception object
	  sysstack_error. [ruby-talk:84534]

Wed Oct 29 11:27:39 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (ret_args): node may be NULL. [ruby-talk:84530]

Tue Oct 28 15:20:12 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/tcltklib/tcltklib.c (VwaitVarProc, ip_rbVwaitObjCmd,
	  WaitVariableProc, WaitVisibilityProc, WaitWindowProc,
	  ip_rbTkWaitObjCmd, ip_rbTkWaitCommand, rb_threadVwaitProc,
	  rb_threadWaitVisibilityProc, rb_threadWaitWindowProc,
	  ip_rb_threadVwaitObjCmd, ip_rb_threadTkWaitObjCmd): prototype;
	  avoid VC++ warnings.

Mon Oct 27 19:19:55 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_longjmp): ignore reentering error while warning.
	  [ruby-dev:21730]

Mon Oct 27 00:23:50 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_ruby): bug fix on Win : hang-up when
	  calling 'exit' in the Tk callback procedure. [ruby-list:38656]

Sat Oct 25 09:18:04 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_method_missing): protect exception from within
	  "inspect".  (ruby-bugs:PR#1204)

Fri Oct 24 23:26:34 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* hash.c (rb_hash_each): Hash#each should yield single value.
	  [ruby-talk:84420]

	* hash.c (env_each): ditto for ENV.each.

Thu Oct 23 20:25:32 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/server.rb (GenericServer#start): should rescue
	  IOError from IO::accept. [ruby-dev:21692]

Thu Oct 23 17:59:36 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_cleanup): initialize stack bottom for embedding.
	  [ruby-dev:21686]

	* ext/dl/extconf.rb: move list of files to clean from DEPEND file,
	  to get rid of macro redefinitions.

Thu Oct 23 13:44:00 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y: integrate operations for stack_type.  [ruby-dev:21681]

Thu Oct 23 00:41:45 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/calc/*, test/soap/helloworld/*: set logging threshold
	  to ERROR.

Wed Oct 22 12:53:31 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file):
	  ignore tests which raised LoadError.

	* test/drb/drbtest.rb, test/ruby/test_beginendblock.rb,
	  test/ruby/test_system.rb: avoid requiring same file twice.

	* test/drb/test_drbssl.rb, test/drb/test_drbunix.rb: should not use
	  ARGV unless invoked directly.  do not create test cases unless
	  required libraries are available.

Wed Oct 22 02:31:34 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (ruby_cleanup): should not ignore exit_value in END
	  execution. [ruby-dev:21670]

Tue Oct 21 23:16:26 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (ruby_cleanup): call finalizers and exit procs before
	  terminating threads.

	* eval.c (ruby_cleanup): preserve ruby_errinfo before ruby_finalize_0().

Tue Oct 21 15:57:11 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file):
	  prepend the directory of target file to the load path.

Tue Oct 21 15:08:53 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (do_spawn, do_aspawn): should wait child process even
	  if callded with P_OVERLAY.

	* win32/win32.c (do_spawn, do_aspawn): should return child's exit
	  status to parent.

Tue Oct 21 00:35:02 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/calc/*, test/soap/helloworld/*: catch the exception from
	  test server thread and recover.

Tue Oct 21 00:22:57 2003  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* test/drb/*: import drb/runit.

Mon Oct 20 23:55:47 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): set current node after arguments evaluation.
	  [ruby-dev:21632]

	* eval.c (rb_yield_0): set current node and keep it at local jump.

Mon Oct 20 22:01:18 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_cleanup): keep thread group for main thread.
	  [ruby-dev:21644]

Mon Oct 20 18:28:10 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_catch): backout.

Mon Oct 20 17:31:46 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (PUSH_FRAME): generate unique number to be TAG_JUMP()
	  destination.

	* eval.c (localjump_destination): use unique number in ruby_frame
	  for localjump destination.

Mon Oct 20 11:31:44 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_signal.rb (test_signal): restore old trap.

Mon Oct 20 11:00:46 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (gc_sweep): loosen page free condition to avoid add_heap()
	  race condition. [ruby-dev:21633]

	* gc.c (gc_sweep): do not update malloc_limit when malloc_increase
	  is smaller than malloc_limit.

Mon Oct 20 09:45:12 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* lib/debug.rb (debug_command): remove debug print.

Wed Oct 20 00:25:41 2004  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (search_required): required name must not be changed before
	  loading.  [ruby-dev:24492]

Sun Oct 19 13:12:30 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (foreachline, dir_foreach): add obsolete warning.

Sun Oct 19 00:14:22 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/calc/*, test/soap/helloworkd/*: changed port# of test
	  server. (17171)

Sat Oct 18 23:01:32 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* missing/acosh.c (DBL_MANT_DIG): typo fix(ifdef -> ifndef).

Sat Oct 18 05:48:59 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/rubyext.c: YAML::Syck::compile method.

	* ext/syck/syck.c: Buffer edge bug.

	* ext/syck/yaml2byte.c: YAML to bytecode converter.

	* ext/syck/yamlbyte.h: Ditto.

	* ext/syck/bytecode.c: Bytecode parser fixes to empty collections
	  and empty strings.

	* ext/syck/token.c: Ditto.

Fri Oct 17 23:07:38 2003  Akinori MUSHA  <knu@iDaemons.org>

	* ext/enumerator/enumerator.c, ext/enumerator/enumerator.txt:
	  Provide Kernel#to_enum as an alias for Kernel#enum_for.  Maybe
	  this is a better name.

Fri Oct 17 23:00:30 2003  Akinori MUSHA  <knu@iDaemons.org>

	* lib/generator.rb: Add rdoc documentation.

Fri Oct 17 22:16:42 2003  Akinori MUSHA  <knu@iDaemons.org>

	* lib/set.rb: Reword and fix Overview.

	* lib/set.rb: It is not necessary to require
	  'test/unit/ui/console/testrunner'.

Fri Oct 17 11:15:22 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* test/ruby/test_range.rb: added.

	* MANIFEST: add test/ruby/test_range.rb.

Fri Oct 17 03:21:23 2003  William Sobel  <will.sobel@barra.com>

	* ext/socket/socket.c (make_hostent): h_aliases may be NULL.
	  (ruby-bugs:PR#1195)

	* ext/socket/socket.c (sock_s_gethostbyaddr): ditto.

Fri Oct 17 00:12:41 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: (bug fix) instance variable @frame was used
	  without initializing on TkComposite module.

Thu Oct 16 23:51:04 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: If $DEBUG == true and some exception is caused
	  in a callback operation, Ruby/Tk shows a (verbose) backtrace
	  information on the callback process.

Thu Oct 16 17:09:19 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/debug.rb (DEBUGGER__::Context::debug_command): do not call
	  debug_silent_eval() when $1 is not set. (ruby-bugs:PR#1194)

Thu Oct 16 16:54:57 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (rb_str_upto): ("a"..."a").to_a should return [].
	  [ruby-core:01634]

Thu Oct 16 16:40:51 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb:
	  Add Tk::EncodedString and Tk::UTF8_String class to support
	  characters using the \uXXXX escape to the UNICODE string.

	* ext/tk/sample/{demos-en,demos-jp}/unicodeout.rb
	  new demo-scripts (samples of Tk::UTF8_String)

	* ext/tk/sample/{demos-en,demos-jp}/widget
	  add entries for 'unicodeout.rb'

Thu Oct 16 08:38:06 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/digest/test_digest.rb (test_eq): show failed class.

	* test/ruby/test_iterator.rb (test_break, test_return_trace_func):
	  test localjump destination.

Wed Oct 15 20:22:31 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/netHttpClient.rb: use URI::HTTP#request_uri instead of
	  instance_eval('path_query').  [ruby-list:38575]

Wed Oct 15 17:24:45 2003  URABE Shyouhei  <root@mput.dip.jp>

	* lib/cgi.rb (CGI::Cookie): tiny typo fix.

Wed Oct 15 15:00:54 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_run): just return FAILURE instead of parse error
	  count.  [ruby-list:38569]

Wed Oct 15 13:17:02 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/digest/digest.c (rb_digest_base_alloc): need to initialize
	  buffer. [ruby-dev:21622]

Wed Oct 15 11:23:05 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_object): dump extended modules as well.

	* marshal.c (r_object0): TYPE_USRMARSHAL should restore extended
	  modules before invoking marshal_load.  these two fixes are done
	  by Masatoshi Seki <m_seki@mva.biglobe.ne.jp>.

Wed Oct 15 09:30:34 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/enumerator/enumerator.c (enumerator_each): avoid VC++ warning.

	* ext/syck/syck.h: include stdio.h for definition of FILE.

Wed Oct 15 08:09:07 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/bytecode.c: Checkin of YAML bytecode support.

	* ext/syck/gram.c: Ditto.

	* ext/syck/syck.c: Ditto.

	* ext/syck/token.c: Ditto.

	* ext/syck/handler.c: Ditto.

	* ext/syck/handler.c: Now using 'tag' rather than 'taguri' in type URIs.

	* ext/syck/rubyext.c: Ditto (on both counts).

Wed Oct 15 05:05:53 2003  Akinori MUSHA  <knu@iDaemons.org>

	* lib/generator.rb: A new library which converts an internal
	  iterator to an external iterator.

	* lib/abbrev.rb: A new library which creates an abbreviation table
	  from a list.

Wed Oct 15 04:31:51 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/sample/demos-en/entry3.rb, ext/tk/sample/demos-jp/entry3.rb :
	  new demo-scripts

	* ext/tk/sample/demos-en/widget, ext/tk/sample/demos-jp/widget :
	  add entries for 'entry3.rb'

Wed Oct 15 04:31:47 2003  Akinori MUSHA  <knu@iDaemons.org>

	* test/digest/test_digest.rb: Moved from ext/digest/test.rb.

Wed Oct 15 03:53:20 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/tk.rb: fixed trouble on auto-load Tcl commands (enbug
	  on the last commit).

Wed Oct 15 00:25:00 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (yylex): argument parentheses preceded by spaces should
	  be warned; not error.  [ruby-talk:84103]

Wed Oct 15 00:20:15 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c: replace Tcl/Tk's vwait and tkwait to
	  switch on threads smoothly and avoid seg-fault.

	* ext/tcltklib/tcltklib.c: add TclTkIp._thread_vwait and
	  _thread_tkwait for waiting on a thread. (Because Tcl/Tk's vwait
	  and tkwait command wait on an eventloop.)

	* ext/tk/lib/multi-tk.rb: support TclTkIp._thread_vwait and
	  _thread_tkwait.

	* ext/tk/lib/tk.rb: now, TkVariable#wait has 2 arguments.
	  If 1st argument is true, waits on a thread. If false, waits on
	  an eventloop. If 2nd argument is true, checks existence of
	  rootwidgets. If false, doesn't. Default is wait(true, false).

	* ext/tk/lib/tk.rb: add TkVariable#tkwait(arg) which is equal to
	  TkVariable#wait(arg, true). wait_visibility and wait_destroy
	  have an argument for waiting on a thread or an eventloop.

	* ext/tk/lib/tk.rb: improve of accessing Tcl/Tk's special variables.

	* ext/tk/lib/tkafter.rb: support 'wait on a thread' and 'wait on
	  an eventloop'.

Wed Oct 15 00:10:24 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/baseData.rb: Introduce SOAPType as the common ancestor of
	  SOAPBasetype and SOAPCompoundtype.

	* lib/soap/generator.rb, lib/soap/element.rb, lib/soap/encodingstyle/*:
	  Encoding methods signature change.  Pass SOAPGenerator as a parameter.

	* lib/soap/mapping/*, test/soap/marshal/test_marshal.rb: Refactoring
	  for better marshalling/unmarshalling support.  Now I think SOAP
	  marshaller supports all kind of object graph which is supported by
	  Ruby's original marshaller.  Of course there could be bugs as always.
	  Find it.  :-)

	* lib/soap/rpc/standaloneServer.rb: Set severity threshould to INFO.
	  DEBUG is too noisy.

	* lib/xsd/datatypes.rb: DateTime#of is obsoleted.  Use DateTime#offset.

	* test/wsdl/emptycomplextype.wsdl, test/xsd/xmlschema.xml: Avoid
	  useless warning.

Tue Oct 14 19:09:35 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (ruby_finalize_0): return the given exit status unless
	  SystemExit got raised.

Tue Oct 14 11:53:49 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* intern.h (ruby_stop): never return.

	* ruby.h (ruby_run): ditto.

Tue Oct 14 04:43:55 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (realpath): make ELOOP check bit more robust.
	  (children): prepend self by default.
	  (chroot): obsoleted.

Tue Oct 14 02:29:31 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_require_safe): segfault after loading .so.

Tue Oct 14 02:05:23 2003  Akinori MUSHA  <knu@iDaemons.org>

	* ext/Setup*, ext/enumerator/*: Add ext/enumerator, a helper
	  module for the Enumerable interface.

Mon Oct 13 23:55:59 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* test/ruby/envutil.rb: use Config::CONFIG["ruby_install_name"],
	  not "ruby".

Mon Oct 13 23:57:29 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_feature_p): match by classified suffix.

	* eval.c (rb_require_safe): require library in the specified safe
	  level.

	* variable.c (rb_autoload, rb_autoload_load): restore safe level
	  when autoload was called.  [ruby-dev:21338]

	* intern.h: prototypes; rb_require_safe.

	* test/runner.rb: accept non-option arguments.

Mon Oct 13 20:49:51 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_new4): should not preserve FL_TAINT status in the
	  internal shared string. [ruby-dev:21601]

	* string.c (rb_str_new4): ditto.

	* eval.c: use EXIT_SUCCESS and EXIT_FAILURE for exit values.

	* process.c: ditto. [ruby-list:38521]

Mon Oct 13 19:51:02 2003  Koji Arai  <jca02266@nifty.ne.jp>

	* lib/debug.rb (debug_command): should enter emacs mode when
	  assigned any value to the environment variable "EMACS".
	  On Meadow, (getenv "EMACS") is "meadow".

Sun Oct 12 14:45:03 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/win32ole/extconf.rb: check "windows.h", not "windows".
	  [ruby-talk:84051]

Sat Oct 11 20:41:03 2003  Corinna Vinschen  <corinna@vinschen.de>

	* file.c (eaccess): Use access(2) on Cygwin.

Sat Oct 11 17:09:21 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/rexml/quickpath.rb (REXML::QuickPath::match):
	  escape '[' to avoid warning.

Sat Oct 11 16:08:41 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (realpath): check existence of the file.

	* lib/pathname.rb (realpath): re-implemented.
	  (realpath_root?, realpath_rec): removed

Sat Oct 11 10:19:39 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* lib/monitor.rb: handle exceptions correctly. Thanks, Gennady
	  Bystritsky.

Fri Oct 10 07:50:54 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (is_defined): inheritance line adjustment as like as
	  rb_call_super().

Fri Oct 10 01:19:00 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_x509name.c (ossl_x509name_initialize): add
	  optional argument to specify the DirectoryString type
	  (ASN1::UTF8STRING by default). RFC3280 deprecates PrintableString
	  for DirectoryString, and strongly requires to use UTF8String for
	  all certificates issued after December, 31 2003.

	* ext/openssl/lib/openssl/x509.rb (X509::Name::parse): ditto.

Thu Oct  9 23:50:21 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_start_0): prevent thread from GC.
	  [ruby-dev:21572]

Thu Oct  9 19:11:44 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_start_0): non-volatile should be restored from
	  volatile.

Thu Oct  9 17:43:36 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (proc_save_safe_level, proc_get_safe_level,
	  proc_set_safe_level): save/restore safe level 1..4.

Thu Oct  9 16:33:23 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (r_object0): remove unnecessary iv restoration for
	  USRMARSHAL. [ruby-dev:21582]

	* marshal.c (w_object): dump generic instance variables from
	  a string from '_dump'.

	* variable.c (rb_generic_ivar_table): return 0 if obj's FL_EXIVAR
	  is not set.

	* time.c (time_dump): copy instance variables to dumped string, to
	  be included in the marshaled data.

	* bignum.c (rb_big2ulong): add range check to ensure round trip.

Thu Oct  9 15:45:27 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* pack.c (uv_to_utf8): change message to "out of range", since
	  negative values are not "too big". [ruby-dev:21567]

Thu Oct  9 14:05:38 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_set_end_proc, rb_exec_end_proc): restore safe level.
	  [ruby-dev:21557]

Thu Oct  9 10:51:04 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_yield_0): no error if block is empty.

Thu Oct  9 06:43:33 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (localjump_error): id should be ID.

	* eval.c (rb_eval): nd_rval is set in copy_node_scope().

	* eval.c (rb_yield_0): unused variable.

	* eval.c (rb_yield_0): nothing to do for empty node.

	* eval.c (call_end_proc, proc_invoke): adjust backtrace in END.
	  [ruby-dev:21551]

	* eval.c (rb_thread_start_0): set the value by break as the result.
	  [ruby-dev:21552]

	* eval.c (rb_thread_start_0, rb_thread_raise, rb_callcc): save
	  variables across THREAD_SAVE_CONTEXT.

Thu Oct  9 12:05:46 2003  Eric Sunshine  <sunshine@sunshineco.com>

	* configure.in: revived NextStep, OpenStep, and Rhapsody ports which
	  had become unbuildable; enhanced --enable-fat-binary option so that
	  it accepts a list of desired architectures (rather than assuming a
	  fixed list), or defaults to a platform-appropriate list if user does
	  not provide an explicit list; made the default list of architectures
	  for MAB (fat binary) more comprehensive; now uses -fno-common even
	  when building the interpreter (in addition to using it for
	  extensions), thus allowing the interpreter to be embedded into a
	  plugin module of an external project (in addition to allowing
	  embedding directly into an application); added checks for
	  <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now
	  ensures that -I/usr/local/include is employed when extensions'
	  extconf.rb scripts invoke have_header() since extension checks on
	  NextStep and OpenStep will fail without it if the desired resource
	  resides in the /usr/local tree; fixed formatting of --help message.

	* Makefile.in: $(LIBRUBY_A) rule now deletes the archive before
	  invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives
	  (see configure's --enable-fat-binary option); added rule for new
	  missing/getcwd.c.

	* defines.h: fixed endian handling during MAB build (see configure's
	  --enable-fat-binary option) to ensure that all portions of the
	  project see the correct WORDS_BIGENDIAN value (some extension modules
	  were getting the wrong endian setting); added missing constants
	  GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep
	  and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H
	  define in NeXT section.

	* dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on
	  NextStep since, on some installations, this value always resolves
	  uselessly to zero.

	* dln.c: added error reporting to NextStep extension loader since the
	  previous behavior of failing silently was not useful; now ensures
	  that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined
	  for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice
	  on Rhapsody since this header lacks multiple-include protection,
	  which resulted in "redefinition" compilation errors.

	* main.c: also create hard reference to objc_msgSend() on NeXT
	  platforms (in addition to Apple platforms).

	* lib/mkmf.rb: now exports XCFLAGS from configure script to extension
	  makefiles so that extensions can be built MAB (see configure's
	  --enable-fat-binary option); also utilize XCFLAGS in cc_command()
	  (but not cpp_command() because MAB flags are incompatible with
	  direct invocation of `cpp').

	* ext/curses/extconf.rb: now additionally checks for presence of these
	  curses functions which are not present on NextStep or Openstep:
	  bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(),
	  setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(),
	  wscrl(), wsetscrreg()

	* ext/curses/curses.c: added appropriate #ifdef's for additional set of
	  curses functions now checked by extconf.rb; fixed curses_bkgd() and
	  window_bkgd() to correctly return boolean result rather than numeric
	  result; fixed window_getbkgd() to correctly signal an error by
	  returning nil rather than -1.

	* ext/etc/etc.c: setup_passwd() and setup_group() now check for null
	  pointers before invoking rb_tainted_str_new2() upon fields extracted
	  from `struct passwd' and `struct group' since null pointers in some
	  fields are common on NextStep/OpenStep (especially so for the
	  `pw_comment' field) and rb_tainted_str_new2() throws an exception
	  when it receives a null pointer.

	* ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for
	  platforms such as NextStep and OpenStep which lack strdup().

	* ext/socket/getaddrinfo.c: cast first argument of getservbyname(),
	  gethostbyaddr(), and gethostbyname() from (const char*) to non-const
	  (char*) for older platforms such as NextStep and OpenStep.

	* ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for
	  platforms such as NextStep and OpenStep which lack strdup(); include
	  <netinet/in_systm.h> if present for NextStep and OpenStep; cast first
	  argument of gethostbyaddr() and getservbyname() from (const char*) to
	  non-const (char*) for older platforms.

	* ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for
	  platforms such as NextStep and OpenStep which lack strdup().

Wed Oct  8 22:19:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit.rb: removed installation instructions.

	* lib/test/unit/ui/testrunnermediator.rb: moved the run flag to a more
	  central location.

	* lib/test/unit.rb: ditto.

	* lib/test/unit.rb: extracted the running code in to AutoRunner.

	* lib/test/unit/autorunner.rb: added.

	* lib/test/unit/collector/objectspace.rb: extracted common test
	  collection functionality in to a module.

	* lib/test/unit/collector.rb: ditto; added.

	* test/testunit/collector/test_objectspace.rb: ditto.

	* lib/test/unit/collector/dir.rb: added. Supports collecting tests out
	  of a directory structure.

	* test/testunit/collector/test_dir.rb: added.

	* test/runner.rb: simplified to use the new capabilities.

Tue Oct  7 15:23:09 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_beginendblock.rb: add tests for nested BEGIN/END.

	* test/ruby/beginmainend.rb: add tests for nested BEGIN/END.

	* test/ruby/endblockwarn.rb: new file added to test of END-in-method
	  warning.

Tue Oct  7 12:23:47 2003  Tanaka Akira  <akr@m17n.org>

	* ext/fcntl/fcntl.c (Init_fcntl): define Fcntl::O_ACCMODE.

	* ext/socket/extconf.rb: useless assignment removed.

Tue Oct  7 09:13:24 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_beginendblock.rb (test_endinmethod): END{} is now
	  allowed in eval.

Tue Oct  7 04:15:25 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (stmt): should not expand mrhs if lhs is solely starred.

Tue Oct  7 02:57:53 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (stmt): rhs of multiple assignment should not be
	  expanded using "to_a". [ruby-dev:21527]

Tue Oct  7 01:42:34 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): use appropriate
	  free function for ASN1_OBJECT.

	* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_sn): add new function for
	  ASN1::ObjectId#sn; it returns short name text representation of OID.

	* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_ln): add new function for
	  ASN1::ObjectId#ln; it returns long name text representation of OID.

	* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_oid): add new function for
	  ASN1::ObjectId#oid; it returns numerical representation of OID.

Mon Oct  6 22:59:46 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/csv.rb (IOReader, BasicWriter): call binmode when a given IO
	  respond_to?(:binmode).  record separator was wrong when you gave
	  text mode IO to Reader.parse and Writer.generate.

	* test/csv/test_csv.rb: add tests for above change.

Sun Oct  5 23:27:09 2003  Tanaka Akira  <akr@m17n.org>

	* ext/socket/extconf.rb: check recvmsg even if sendmsg is exists.

	* ext/socket/socket.c (thread_read_select): restored.

Mon Oct  6 16:23:38 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_object): wrong method name in the message.

Mon Oct  6 16:02:05 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (stmt): END in method should cause warning.
	  [ruby-dev:21519]

Mon Oct  6 15:17:23 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_iterator.rb (test_block_argument_without_paren):
	  added. (follows sample/test.rb)

Mon Oct  6 11:57:06 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: added
	  test for eval-ed BEGIN END order.

Mon Oct  6 09:19:54 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_object): should pass "weak" value to next level.
	  [ruby-dev:21496]

	* eval.c (proc_alloc): should not use cached object if klass is
	  different. [ruby-talk:83685]

Sun Oct  5 23:27:09 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb: version information is added in document.

Sun Oct  5 23:07:03 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_f_END): block should be given.  [ruby-dev:21497]

Sun Oct  5 22:51:23 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/ext/openssl/extconf.rb: add check for some engine functions
	  unavailable in OpenSSL-0.9.6.

	* lib/ext/openssl/ossl_engine.c: ditto.

Sun Oct  5 17:56:30 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): fix evaluation order.  [ruby-list:38431]

Sun Oct  5 15:05:06 2003  akira yamada  <akira@ruby-lang.org>

	* test/uri/*: translated RUNIT to Test::Unit.

Sun Oct  5 14:37:39 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/xsd/datatypes.rb: Rational -> Decimal string bug fix.

	* test/soap/marshal/test_marshal.rb: ditto.

	* test/soap/calc/test_calc_cgi.rb: add Config::CONFIG["EXEEXT"] to
	  RUBYBIN.

Sun Oct  5 13:47:22 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: add tests
	  about scope, order and allowed syntax.

Sun Oct  5 11:54:29 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/envutil.rb: added.  split "rubybin" from test_system.rb.

	* test/ruby/test_system.rb: use envutil.rb

	* test/ruby/test_beginendblock.rb: added.

	* test/ruby/beginmainend.rb: added.  used in test_beginendblock.rb.

Sun Oct  5 11:23:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* test/testunit/runit/test_testresult.rb: removed some unnecessary
	  cruft.

Sun Oct  5 11:14:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/rubyunit.rb: aliasing TestCase into the top level is
	  problematic.

	* lib/runit/assert.rb: fixed a couple of bugs caused by recent
	  refactoring in Test::Unit.

	* test/testunit/runit/*: added.

Sun Oct  5 10:55:29 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/open-uri.rb (URI::Generic#find_proxy): no_proxy support did not
	  work.  [ruby-dev:21484]

Sun Oct  5 09:52:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: will use pp for output if available.
	  Can be disabled by setting Assertions.use_pp = false.

	* test/testunit/test_assertions.rb: made a small change to exception
	  formatting.

Sun Oct  5 07:42:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: made small improvements to assertion
	  messages. Deprecated Assertions#assert_not_nil; use #assert instead.

	* test/testunit/test_assertions.rb: ditto.

	* test/testunit/util/test_procwrapper.rb: use #assert instead of
	  #assert_not_nil.

Sun Oct  5 04:10:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: refactored message building.

Sun Oct  5 03:40:22 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.h: global symbols should be declared
	  as external.

Sun Oct  5 03:03:20 2003  akira yamada  <akira@ruby-lang.org>

	* test/ruby/test_exception.rb (test_else): added.

Sun Oct  5 02:12:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: changed assertion messages to rely more
	  heavily on #inspect. Added backtrace filtering for exceptions in
	  assertion messages.

	* test/testunit/test_assertions.rb: ditto.

Sun Oct  5 02:12:00 2003  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>

	* lib/drb/acl.rb, lib/drb/ssl.rb: added.

	* lib/drb/drb.rb: exit from a thread using 'break'.

Sat Oct  4 21:49:14 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* gc.c (Init_stack): the type of space is changed to unsigned int
	  from double.  [ruby-dev:21483]

Sat Oct  4 17:52:59 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/netHttpClient.rb: follow http-access2.  hosts which matches
	  ENV['no_proxy'] or ENV['NO_PROXY'] are not proxyed.
	  - [,:] separated. ("ruby-lang.org:rubyist.net")
	  - no regexp. (give "ruby-lang.org", not "*.ruby-lang.org")
	  - if you want specify host by IP address, give full address.
	    ("192.168.1.1, 192.168.1.2")

	* lib/soap/rpc/cgistub.rb: return "Status: XXX MMM" line.

	* test/runner.rb: give testsuite name.

Sat Oct  4 15:16:02 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_object): instance variable dump do not cause error
	  for objects that cannot be dumped, if they traversed from
	  marshal_dump.  they are just ignored.

	* gc.c (Init_stack): cast "space" (doble value) into unsigned
	  int.  should run on PowerPC.

	* eval.c (rb_eval): should not execute else part if any exception
	  is caught. [ruby-dev:21482]

	* parse.y (f_args): should allow unparenthesized block argument.

	* parse.y (f_rest_arg): should allow unparenthesized rest
	  argument.

Sat Oct  4 14:59:51 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (initialize): raise ArgumentError if argument has
	  '\0' character.
	  (relative_path_from): new method.
	  (each_entry): new method for replacement of dir_foreach.
	  (foreach, foreachline, dir_foreach, chdir): obsoleted.

Sat Oct  4 12:58:48 2003  akira yamada  <akira@ruby-lang.org>

	* test/uri/* (6 files): added.

Sat Oct  4 12:44:45 2003  akira yamada  <akira@ruby-lang.org>

	* lib/uri/ftp.rb, lib/uri/mailto.rb: renamed to #to_s from #to_str.

Sat Oct  4 07:33:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/testsuite.rb: changed #<< to return self, and added
	  #delete.

	* test/testunit/test_testsuite.rb: ditto. Also slightly refactored
	  #test_size.

	* lib/test/unit/collector/objectspace.rb: collector now preserves the
	  hierarchy of suites.

	* test/testunit/collector/test_objectspace.rb: ditto.

Sat Oct  4 04:48:49 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/rubyext.c: default keys handled.

	* ext/syck/syck.h: lowered default buffer size to 16k for increased
	  performance.

	* test/yaml: checkin of basic unit tests.

Sat Oct  4 04:24:19 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/extconf.rb: add check for X509V3_set_nconf.

	* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_config):
	  cannot implement if X509V3_set_nconf doesn't exist.

Sat Oct  4 02:12:44 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/xsd/datatypes.rb: dump sign by itself.  under the problematic
	  platform, sprintf("%+.10g", -0.0) => +0.  sigh.

	* sample/wsdl/amazon/*: update schema ver2 to ver3.

Sat Oct  4 01:33:46 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb (initialize): duplicate and freeze argument.
	  (to_s): return duplicated string.
	  (children): new method.
	  (each_line): new alias to foreachline.

Fri Oct  3 16:13:19 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_asn1.c: add DER encoder and decoder.

	* ext/openssl/ossl_asn1.h: add OpenSSL::ASN1 module.

	* ext/openssl/ossl.c (Init_openssl): call Init_ossl_asn1.

	* ext/openssl/extconf.rb: check if X509_ATTRIBUTE has field "single".

	* ext/openssl/ossl_x509attr.c (ossl_x509attr_set_value): accept
	  DER encoded data argument.

	* ext/openssl/ossl_x509attr.c (ossl_x509attr_get_value): return
	  DER encoded data in OpenSSL::ASN1 types.

Fri Oct  3 13:02:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit.rb: refactored to use optparse.

	* lib/test/unit.rb: added support for selecting the output
	  level from the command-line.

	* lib/test/unit.rb: added a command-line switch to stop processing
	  the command-line, allowing arguments to be passed to tests.

	* lib/test/unit.rb: changed the method for specifying a runner or a
	  filter from the command-line.

	* lib/test/unit/collector/objectspace.rb: fixed a bug causing all
	  tests to be excluded when the filter was set to an empty array.

	* test/testunit/collector/test_objectspace.rb: ditto.

Fri Oct  3 08:14:32 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/irb/ruby-lex.rb (RubyLex::identify_identifier): support
	  'class ::Foo' syntax. [ruby-talk:83514]

Fri Oct  3 08:01:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: added a default message for #assert,
	  #assert_block, and #flunk.

	* test/testunit/test_assertions.rb: ditto.

	* lib/test/unit/failure.rb: failures now show a better trace of where
	  they occurred.

	* test/testunit/test_failure.rb: ditto (added).

	* lib/test/unit/testcase.rb: ditto.

	* test/testunit/test_testcase.rb: ditto.

	* lib/test/unit/util/backtracefilter.rb: added.

	* test/testunit/util/test_backtracefilter.rb: added.

	* lib/test/unit/error.rb: changed to use BacktraceFilter and improved
	  output.

	* test/testunit/test_error.rb: ditto.

Thu Oct  2 20:33:49 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (iconv_failure_initialize): conform with
	  orthodox initialization method.

	* ext/iconv/iconv.c (iconv_fail): initialize exception instance
	  from the class, and do not share instance variables with the
	  others.  [ruby-dev:21470]

Thu Oct  2 18:20:27 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* time.c (Init_Time): define initialize.  [ruby-dev:21469]

Thu Oct  2 17:39:38 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_engine.c: add a new module OpenSSL::Engine.
	  it supports OpenSSL hardware cryptographic engine interface.

	* ext/openssl/ossl_engine.h: ditto.

	* ext/openssl/MANIFEST: add ossl_engine.c and ossl_engine.h.

	* ext/openssl/extconf.rb: add check for openssl/engine.h.

	* ext/openssl/ossl.c: call Init_ossl_engine().

	* ext/openssl/ossl.h: include openssl/engine.h.

	* ext/openssl/ossl_pkey_{rsa,dsa,dh}.c: check if underlying
	  EVP_PKEY referes engine.

Thu Oct  2 17:22:37 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_load): restore instance variables (if any) before
	  loading from marshaled data.

Thu Oct  2 14:19:15 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (iconv_fail): now yield erred substring, and
	  set error object to $!.

	* ext/iconv/iconv.c (iconv_convert): error handler block should
	  return appended part and the rest.  if rest is nil, the
	  conversion stops.

Thu Oct  2 12:00:18 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* variable.c (rb_const_defined_0): look up constants in Object as
	  well.  [ruby-dev:21458]

	* test/ruby/test_defined.rb (TestDefined::test_defined): test for
	  constants.

Thu Oct  2 11:17:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/assertions.rb: should not capture an
	  AssertionFailedError unless explicitly requested.

	* test/testunit/test_assertions.rb: ditto.

	* test/testunit/collector/test_objectspace.rb: fixed a test failure
	  caused by methods being returned in different orders on different
	  platforms by moving test sorting from TestSuite into the locations
	  where suites are constructed. [ruby-talk:83156]

	* lib/test/unit/testcase.rb: ditto.

	* lib/test/unit/testsuite.rb: ditto.

	* lib/test/unit/collector/objectspace.rb: ditto.

Thu Oct  2 03:25:01 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* eval.c (rb_thread_raise): prototype; avoid VC++ warning.

Thu Oct  2 01:37:34 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* time.c (time_mdump): new marshal dumper. _dump is still
	  available for compatibility.

	* time.c (time_mload): new marshal loader.

	* marshal.c (w_object): preserve instance variables for objects
	  with marshal_dump.

	* marshal.c (r_object0): restore instance variables before calling
	  marshal_load.

	* error.c (rb_warn_m): always return nil.

Thu Oct  2 01:32:46 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_f_block_given_p): real required condition is
	  ruby_frame->prev->iter == ITER_CUR.

	* eval.c (rb_block_given_p): ditto.

	* eval.c (block_pass): update ruby_frame->iter only when previous
	  value is ITER_NOT.

Thu Oct  2 01:02:35 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_const_defined_at): should exclude constants from
	  Object when TYPE(klass) == T_MODULE *and* exclude is on.
	  [ruby-dev:21458]

	* variable.c (rb_const_get_0): do not lookup constants from Object
	  when TYPE(klass) == T_MODULE *and* exclude is on.

Thu Oct  2 00:21:11 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/logger/test_logger.rb: unlinking file before close causes
	  problem under win32 box.

	* lib/xsd/datatypes.rb(XSDFloat, XSDDouble): add +/- sign explicitly
	  when stringified and embedded into XML instance.  Ruby's sprintf may
	  format -0.0 as "0.0" (no minus sign) depending on underlying C
	  sprintf implementation.

	* test/xsd/test_xsd.rb, test/soap/test_basetype.rb: follow above change.

	* test/soap/calc/*: give httpd config param "CGIInterpreter".
	  "/usr/bin/env ruby" thing does not work under non-Unix boxes.

Sat Oct  2 00:42:20 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (r_byte): retrieve pointer from string value for each
	  time.  [ruby-dev:24404]

	* marshal.c (r_bytes0): ditto.

	* enum.c (sort_by_i): re-entrance check added.  [ruby-dev:24399]

	* io.c (io_read): should freeze all reading buffer.
	  [ruby-dev:24400]

	* string.c (rb_str_sum): should use bignums when bits is greater
	  than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395]

	* eval.c (specific_eval): defer pointer retrieval to prevent
	  unsafe sourcefile string modification.  [ruby-dev:24382]

	* string.c (rb_str_sum): wrong cast caused wrong result.
	  [ruby-dev:24385]

	* enum.c (enum_sort_by): hide temporary array from
	  ObjectSpace.each_object.  [ruby-dev:24386]

	* string.c (rb_str_sum): check was done with false pointer.
	  [ruby-dev:24383]

	* string.c (rb_str_sum): string may be altered.  [ruby-dev:24381]

Thu Oct  2 00:25:21 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* signal.c (ruby_signal_name): adjust to the prototype.

	* process.c (pst_inspect): ditto.

	* ext/etc/etc.c (etc_getgrent, Init_etc): typo.

Wed Oct  1 20:49:41 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* gc.c (heaps): manage slots and limits together.  [ruby-dev:21453]

	* gc.c (add_heap): should not clear heaps slot even if realloc()
	  failed.

Wed Oct  1 20:36:49 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* MANIFEST: add wince/mkconfig_wce.rb.

Wed Oct  1 17:22:33 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/etc/etc.c: add new functions: setpwent, getpwent, endpwent,
	  setgrent, getgrent, endgrent.

	* ext/socket/socket.c (sock_s_gethostbyname): do not reverse lookup.

Wed Oct  1 17:01:30 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_load): Object scope had priority over required file
	  scope.  [ruby-dev:21415]

Wed Oct  1 14:09:53 2003  Takaaki Uematsu  <uema2x@jcom.home.ne.jp>

	* wince/mkconfig_wce.rb: sorry, forget to commit.

Wed Oct  1 10:08:42 2003  Takaaki Uematsu  <uema2x@jcom.home.ne.jp>

	* wince/setup.mak: add sigmarionIII SDK support.

	* wince/Makefile.sub: ditto.

	* wince/mkexports.rb: fix linker error in SH4.

	* wince/mkconfig_wce.rb: camouflage RUBY_PLATFORM for compiling ext.

Wed Oct  1 08:02:52 2003  Takaaki Uematsu  <uema2x@jcom.home.ne.jp>

	* wince/time_wce.c (time): add zero check.

Tue Sep 30 16:11:05 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* Makefile.in: copy lex.c from $(srcdir) if it's not the current
	  directory.  [ruby-dev:21437]

Tue Sep 30 11:29:23 2003  Tanaka Akira  <akr@m17n.org>

	* process.c (pst_inspect): describe stopped process "stopped".

Tue Sep 30 09:31:56 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/runner.rb: glob for directories.

Tue Sep 30 09:11:43 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): while/until should not capture break unless
	  they are destination of the break.

Tue Sep 30 03:12:02 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb (finish): revert to 1.93.

	* lib/net/pop.rb (finish): revert to 1.60.

	* lib/net/smtp.rb (finish): revert to 1.67.

	* lib/net/http.rb (do_start): ensure to close socket if failed to
	  start session.

	* lib/net/pop.rb (do_start): ditto.

	* lib/net/smtp.rb (do_start): ditto.

	* lib/net/smtp.rb: SMTP#started? wrongly returned false always.

Tue Sep 30 02:54:49 2003  Minero Aoki  <aamine@loveruby.net>

	* test/ruby/test_iterator.rb: new test
	  test_break__nested_loop[123].

Mon Sep 29 23:39:13 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb (finish): does not raise IOError even if
	  !started?, to allow closing socket which was opened before
	  session started.

	* lib/net/pop.rb (finish): ditto.

	* lib/net/smtp.rb (finish): ditto.

Mon Sep 29 19:06:51 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* ext/win32ole/extconf.rb: add windows.h checking.
	  (ruby-bugs:PR#1185)

Mon Sep 29 16:18:30 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb: check if the given logdevice object respond_to :write
	  and :close, not is_a? IO.  duck duck.

	* test/logger/test_logger.rb: self IO.pipe reading/writing may be
	  locked by the flood.  use tempfile.

	* lib/wsdl/xmlSchema/data.rb: wrong constant reference.

Mon Sep 29 16:11:23 2003  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb: clean up temporary symlink.
	  Patched by NaHi.  [ruby-dev:21420]

Mon Sep 29 11:16:55 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_thread_atfork): wrong format specifier.
	  [ruby-dev:21428]

	* process.c (pst_inspect): better description.

Mon Sep 29 02:31:44 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/utils.rb (Utils::su): use setgid and setuid to
	  set real and effective IDs. and setup group access list by
	  initgroups.

Sun Sep 28 11:14:19 2003  Koji Arai  <jca02266@nifty.ne.jp>

	* ext/digest/digest.c (Init_digest): `copy_object' was deprecated.
	  `initialize_copy' should be defined.

	* ext/stringio/stringio.c (Init_stringio): ditto.

Sat Sep 27 18:25:13 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/xsd/charset.rb: XSD::Charset.is_ces did return always true under
	  $KCODE = "NONE" environment.  check added.

	* test/xsd/test_xsd.rb: add tests for above fix.

Sat Sep 27 15:58:50 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/rpc/cgistub.rb: make logging severity threshold higher.

	* lib/soap/rpc/standaloneServer.rb: defer WEBrick server start to give
	  a chance to reset logging severity threshold.

	* test/soap/calc/test_*, test/soap/helloworld/test_helloworld.rb: run
	  silent.

Sat Sep 27 09:44:18 2003  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/test_fileutils.rb: clear all errors on Windows.
	  [ruby-dev:21417]

	* test/fileutils/test_nowrite.rb: ditto.

Mon Sep 27 09:14:03 2004  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* array.c (rb_ary_delete): comparison may change the capacity.
	  [ruby-dev:24348]

	* array.c (rb_ary_fill): fill should honor length argument.
	  [ruby-dev:24346]

	* array.c (rb_ary_replace): should not use ptr from shared array.
	  [ruby-dev:24345]

	* ext/socket/socket.c (s_accept): don't retry for EWOULDBLOCK.
	  [ruby-talk:113807]

Sat Sep 27 04:57:07 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_file.rb: new file.  only asserts unlink-before-close
	  behaviour now.

	* test/soap/marshal/test_digraph.rb: should close before unlink.
	  unlink-before-close pattern is not needed here.

Sat Sep 27 03:32:37 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/soap/*, test/wsdl/*, test/xsd/*: move TestCase classes into
	  each module namespace.  TestMarshal in
	  test/soap/marshal/test_marshal.rb crashed with
	  test/ruby/test_marshal.rb.

Sat Sep 27 01:30:59 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/socket/socket.c (ruby_connect): on win32, type of the 4th
	  argument of getsockopt is char *.

Fri Sep 26 18:35:40 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/resolv-replace.rb: 1.8 compliance.  [ruby-talk:82946]

Fri Sep 26 17:39:27 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_marshal.rb: add test for ruby's objects.

Fri Sep 26 09:52:44 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* defines.h (flush_register_windows): use volatile only for gcc on
	  Solaris.  [ruby-dev:21403]

	* lib/mkmf.rb (xsystem): use system directly to honor shell meta
	  charaters.

Fri Sep 26 00:10:13 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/README: updated.

Thu Sep 25 17:48:10 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/openssl/ossl.c (ossl_buf2str): fix type of 1st argument for
	  rb_protect.

	* ext/openssl/ossl_hmac.c (ossl_hmac_digest): should return meaningful
	  value.

Thu Sep 25 09:00:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/ostruct.rb: Added OpenStruct#==.

	* test/ostruct/test_ostruct.rb: Added.

Thu Sep 25 07:55:26 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/win32ole/win32ole.c, ext/openssl/ossl_pkey_dsa.c,
	  ext/openssl/ossl_pkey_rsa.c, ext/bigdecimal/bigdecimal.h: must
	  not use C++ or C99 style comment yet.  (ruby-bugs:PR#1184)

Thu Sep 25 00:23:22 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* MANIFEST: add SOAP4R.

Thu Sep 25 00:13:15 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/soap/* (29 files): SOAP4R added.

	* lib/wsdl/* (42 files): WSDL4R added.

	* lib/xsd/* (12 files): XSD4R added.

	* test/soap/* (16 files): added.

	* test/wsdl/* (2 files): added.

	* test/xsd/* (3 files): added.

	* sample/soap/* (27 files): added.

	* sample/wsdl/* (13 files): added.

Wed Sep 24 02:08:11 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpservlet/cgihandler.rb: conform to mswin32.
	  [ruby-talk:82735], [ruby-talk:82748], [ruby-talk:82818]

Tue Sep 23 23:10:16 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb: add Logger#<<(msg) for writing msg without any
	  formatting.

	* test/logger/test_logger.rb: ditto.

Tue Sep 23 20:47:51 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* error.c (rb_warn_m): should not warn if -W0 is specified.
	  [ruby-talk:82675]

Mon Sep 22 21:28:57 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* MANIFEST: updated.

Mon Sep 22 19:22:26 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* configure.in (AC_CHECK_FUNCS): add setuid and setgid.

Mon Sep 22 12:34:55 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* util.c (ruby_strtod): skip preceding zeros before counting
	  digits in the mantissa. (ruby-bugs:PR#1181)

Sun Sep 21 04:12:36 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): the argument
	  should be a String.

	* ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): ditt.

	* ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): ditto.

	* ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto.

	* ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto.

Sat Sep 20 11:49:05 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb: typo fixed.

	* test/logger/test_logger.rb: new file.

Fri Sep 19 11:39:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* test/testunit/*: Added.

	* lib/test/unit.rb: Documentation update.

	* lib/test/unit/ui/console/testrunner.rb (TestRunner#initialize):
	  Ditto.

	* lib/test/unit.rb: Factored out an ObjectSpace collector.

	* lib/test/unit/collector/objectspace.rb: Ditto.

	* sample/testunit/*: Added.

Fri Sep 19 01:00:48 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/log.rb (BasicLog#log): get rid of as ineffectual
	  condition.

	* lib/webrick/log.rb (BasicLog#format): add "\n" to message.

Thu Sep 18 22:43:20 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_invoke): should push PROT_PCALL tag for orphans.

	* eval.c (proc_invoke): should update "result" for orphans.

Thu Sep 18 20:33:03 2003  Tietew  <tietew-ml-ruby-list@tietew.net>

	* parse.y (str_xquote): do not prepend escapes in
	  backqoute literals.  [ruby-list:38409]

Thu Sep 18 20:30:17 2003  Tanaka Akira  <akr@m17n.org>

	* lib/pathname.rb: update document.

Thu Sep 18 15:27:05 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/logger.rb: new file.  Logger, formerly called devel-logger or
	  Devel::Logger.

	* sample/logger/*: new file.  samples of logger.rb.

Wed Sep 17 23:41:45 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (localjump_destination): should not raise ThreadError
	  exception for "break". [ruby-dev:21348]

	* eval.c (proc_invoke): use result instead of prot_tag->retval.
	  retval is no longer propagated to the ancestors.

Wed Sep 17 20:34:00 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (tokadd_string, parse_string, yylex): escaped terminator
	  is now interpreted as is.  [ruby-talk:82206]

Wed Sep 17 18:52:36 2003  Minero Aoki  <aamine@loveruby.net>

	* test/fileutils/fileassertions.rb: new file.

	* test/fileutils/test_fileutils.rb: new file.

	* test/fileutils/test_nowrite.rb: new file.

Wed Sep 17 18:51:02 2003  Minero Aoki  <aamine@loveruby.net>

	* test/strscan/test_stringscanner.rb: require test/unit.

Wed Sep 17 18:35:34 2003  Minero Aoki  <aamine@loveruby.net>

	* test/strscan/test_stringscanner.rb: new file.

Wed Sep 17 18:03:30 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl: all files are reviewed to simplify and avoid memory leak.

	* ext/openssl/extconf.rb: add check for assert.h.

	* ext/openssl/ossl.c (ossl_buf2str): new function to convert
	  C buffer to String and free buffer.

	* ext/openssl/ossl.c (ossl_x509_ary2sk): new function to convert
	  Array of OpenSSL::X509 to STACK_OF(X509) with exception safe.

	* ext/openssl/ossl.c (ossl_to_der, ossl_to_der_if_possible): new
	  functions to convert object to DER string.

	* ext/openssl/ossl.h: ditto.

	* ext/openssl/ossl_bio.c (ossl_membio2str): new function to convert
	  BIO to String object and free BIO.

	* ext/openssl/ossl_bio.h: ditto.

	* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_to_der): add for "to_der".

	* ext/openssl/ossl_x509name.c (ossl_x509name_to_der): ditto.

	* ext/openssl/ossl_x509ext.c (ossl_x509ext_to_der): ditto.

	* ext/openssl/ossl_x509ext.c (create_ext_from_array): removed
	  and reimplement in openssl/x509.rb.

	* ext/openssl/ossl_x509attr.c: reimplemented and disable some
	  method temporarily. this class doesn't work fine without ASN.1
	  data support;-) I'll rewrite in near future.

	* ext/openssl/lib/openssl/x509.c (X509::Attribute): get rid off
	  unused code.

	* ext/openssl/lib/openssl/x509.c (X509::ExtensionFactory): refine all.

Tue Sep 16 22:25:06 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/csv/test_csv.rb: add negative tests of row_sep.

Tue Sep 16 18:02:36 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* regex.c (re_compile_pattern): should not translate character
	  class range edge. [ruby-list:38393]

Tue Sep 16 16:47:56 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* MANIFEST: add test/csv/mac.csv.

	* win32/Makefile.sub, bcc32/Makefile.sub (test): add phony NUL target.

Mon Sep 15 19:02:52 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/csv.rb: add extra pamameter to specify row(record) separater
	  character.  To parse Mac's CR separated CSV, do like this.
	    CSV.open("mac.csv", "r", ?,, ?\r) { |row| p row.to_a }
	  The 3rd parameter in this example ?, is for column separater and the
	  4th ?\r is for row separater.  Row separater is nil by default.  Nil
	  separater means "\r\n" or "\n".

	* test/csv/test_csv.rb: add tests for above feature.

	* test/csv/mac.csv: added.  Sample CR separated CSV file.

Fri Sep 12 22:41:48 2003  Michal Rokos  <m.rokos@sh.cvut.cz>

	* ext/openssl/ossl.c: move ASN.1 stuff to ossl_asn1.[ch]

	* ext/openssl/ossl.c: move BIO stuff to ossl_bio.[ch]

	* ext/openssl/ossl_asn1.[ch]: new files

	* ext/openssl/ossl_bio.[ch]: new files

Fri Sep 12 12:30:41 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* intern.h (rb_disable_super, rb_enable_super): replace with dummy
	  expressions instead of prototypes.  the functions remain yet for
	  binary compatibility.  [ruby-talk:81758]

Fri Sep 12 12:09:54 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* bignum.c (rb_big_and): convert argument using 'to_int'.

	* bignum.c (rb_big_or): ditto.

	* bignum.c (rb_big_xor): ditto.

Fri Sep 12 07:06:14 2003  David Black  <dblack@superlink.net>

	* lib/scanf.rb: Took out useless @matched_item variable; some small
	  refactoring.

Thu Sep 11 08:43:44 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_f_require): allow "require" on $SAFE>0, if feature
	  name is not tainted.

	* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::stream):
	  Supports StringIO.

Wed Sep 10 22:47:30 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.h: add a workaround for win32 platform.
	  libeay32.dll doesn't export functions defined in conf_api.h.

	* ext/openssl/ossl_config.c (ossl_config_initialize): ditto.

	* ext/openssl/ossl_config.c (ossl_config_add_value): ditto.

	* ext/openssl/ossl_config.c (set_conf_section_i): should check
	  if the argument is Array.

Wed Sep 10 22:41:54 2003  Tietew  <tietew@tietew.net>

	* eval.c (win32_get_exception_list): avoid VC7 warning.
	  [ruby-win32:577]

Tue Sep  9 10:39:51 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (struct tag): dst should be VALUE.

Tue Sep  9 10:39:51 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (localjump_destination): stop at the scope where the current
	  block was created.  [ruby-dev:21353]

Tue Sep  9 05:17:04 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_config.rb: avoid compile error in OpenSSL-0.9.6.

Tue Sep  9 02:41:35 2003  Michal Rokos  <m.rokos@sh.cvut.cz>

	* ext/openssl/ossl_config.c: Refine compatibility.

Tue Sep  9 01:50:45 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httpserver.rb (HTTPServer#access_log): add "\n" to
	  the message.

	* lib/webrick/log.rb (BasicLog#log): add "\n" only if needed.

Mon Sep  8 22:15:33 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tk/lib/multi-tk.rb: modify security check at creating
	  a new interpreter

Mon Sep  8 20:00:12 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb, lib/optparse/version.rb: search also all
	  capital versions.

Mon Sep  8 19:26:33 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h.

	* ext/openssl/ossl_config.c: refine all with backward compatibility.

	* ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr().

	* ext/openssl/ossl_x509.c: added new constants under X509 module.
	  DEFAULT_CERT_AREA, DEFAULT_CERT_DIR, DEFAULT_CERT_FILE,
	  DEFAULT_CERT_DIR_ENV, DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR.

	* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free
	  the members of the struct. it's left to GC.

	* ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=.

	* ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize):
	  add attr readers: issuer_certificate, subject_certificate,
	  subject_request, crl and config.

Mon Sep  8 18:26:41 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/accesslog.rb (AccessLog::setup_params): use req.port
	  instead of config[:Port] or req.request_uri.port.

	* lib/webrick/httprequest.rb (HTTPRequest#meta_vars): ditto.

	* lib/webrick/httpservlet/filehandler.rb (FileHandler#dir_list): ditto.

	* lib/webrick/config.rb: :Listen option never be used.

	* lib/webrick/server.rb (GenericServer#initialize): don't use :Listen
	  option and add warning message.

	* lib/webrick/log.rb (BasicLog#<<): shortcut of log(INFO, ...).

	* lib/webrick/httpserver.rb (HTTPServer#accesslog): use << for logging.

Sun Sep  7 16:08:28 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (lib_mainloop_core): fixed signal-trap bug

	* ext/tk/lib/*.rb : Ruby/Tk works at $SAFE == 4

Sat Sep  6 02:26:34 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_*.rb: assert_same, assert_match, and so on.

Sat Sep  6 18:45:46 2003  Mauricio Fernandez  <batsman.geo@yahoo.com>

	* parse.y (assignable): call rb_compile_error(), not rb_bug().
	  [ruby-core:01523]

Sat Sep  6 17:40:41 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ruby_missing.c: rid of unnecessary backward
	  compatibility stuff. and remove DEFINE_ALLOC_WRAPPER from
	  all sources.

	* ext/openssl/ossl_x509ext.c (X509::Extension.new): new method.

	* ext/openssl/ossl_x509ext.c (X509::Extension#oid=): new method.

	* ext/openssl/ossl_x509ext.c (X509::Extension#value=): new method.

	* ext/openssl/ossl_x509ext.c (X509::Extension#critical=): new method.

Sat Sep  6 01:23:22 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (CreateChild): need to quote cmd if RUBYSHELL is set.

	* win32/win32.c (CreateChild): fix condition about whether to call
	  shell or not.

Sat Sep  6 00:36:20 2003  Nobuyoshi Nakada  <nobu.nokada@softhome.net>

	* Makefile.in (test): phony target.

	* lib/mkmf.rb (have_library, find_library): configure by library
	  name.

	* lib/optparse.rb (OptionParser#order, #permute, #parse): allow an
	  array as argument.

	* test/ruby/test_*.rb: moved invariants to left side in
	  assert_equal, and use assert_nil, assert_raises and so on.

	* win32/win32.c (isInternalCmd): distinguish command.com and
	  cmd.exe.

	* win32/win32.c (make_cmdvector): a character just after wildcard
	  was ignored.  [ruby-core:01518]

Fri Sep  5 20:27:08 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_*.rb: replace 'assert(a == b)' with assert_equal(a, b)'

Fri Sep  5 18:00:51 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/x509.rb: new method X509::Name::parse.

	* ext/openssl/ossl_digest.c: add ossl_digest_new().

	* ext/openssl/ossl_digest.h: ditto.

	* ext/openssl/ossl_cipher.c: add ossl_cipher_new().

	* ext/openssl/ossl_cipher.h: ditto.

Fri Sep  5 15:32:04 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-font-lock-maybe-here-docs): should not
	  search delimiter forward if found in backward.

Fri Sep  5 13:32:48 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/runner.rb: arguments should be keys.

Fri Sep  5 12:09:55 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* test/ruby/test_system.rb (test_system): check existence of ruby
	  interpreter.

Fri Sep  5 11:32:17 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/optparse.rb (--version): fix assignment/reference order.

	* lib/optparse.rb (OptionParser#help): new; OptionParser#to_s may
	  be deprecated in future.

	* lib/optparse/version.rb (OptionParser#show_version): hide Object.

	* test/runner.rb: fix optparse usage.

	* test/runner.rb: glob all testsuits if no tests given.

Fri Sep  5 10:42:58 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/runner.rb: added.  gets testcases from command line and runs it.

	* test/ruby/test_gc.rb: remove useless part which was for dumping test
	  result.

Fri Sep  5 09:28:59 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby/test_gc.rb: added.  splitter.rb which I made to split
	  sample/test.rb into test/ruby/test_* kindly removed GC test (the
	  last section in the original test) to reduce things to be worried.

Fri Sep  5 03:00:04 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* test/ruby/test_iterator.rb (test_block_in_arg): add no block
	  given tests.

	* test/ruby/test_iterator.rb (test_ljump): uncomment LocalJumpError
	  test.

Fri Sep  5 01:10:11 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/ruby: tests for ruby itself.

	* test/ruby/test_*.rb: split sample/test.rb into 28 test/unit testcases.
	  some tests could not be translates...  search '!!' mark to see it.

	* test/csv/test_csv.rb: should require 'csv', not '../lib/csv'.  test
	  runner should set load path correctly.

Fri Sep  5 01:03:59 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/csv/test_csv.rb: close opened files for CSV::IOBuf explicitly.
	  opened file cannot be removed under win32 box.

Thu Sep  4 23:59:40 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* parse.y (tokadd_string): newlines have no special meanings in
	  %w/%W, otherwise they are ignored only when interpolation is
	  enabled.  [ruby-dev:21325]

Thu Sep  4 19:38:25 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* ext/io/wait/.cvsignore: added.

	* ext/openssl/.cvsignore: added.

Thu Sep  4 19:28:24 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* sample/openssl: added.  Sample of standard distribution library
	  should be locate in sample/{module_name}/*.

	* ext/openssl/sample/*: removed.  move to sample/openssl/*.

Thu Sep  4 18:02:15 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/csv/test_csv.rb: use remove_const to reduce warnings.  use
	  Dir.tmpdir to locate working files.

Thu Sep  4 17:41:31 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* misc/ruby-mode.el (ruby-here-doc-beg-re): underscore also is
	  valid delimiter.

	* misc/ruby-mode.el (ruby-here-doc-end-match): must quote
	  arbitrary string to use as regexp.

	* misc/ruby-mode.el (ruby-font-lock-maybe-here-docs): must not
	  call `ruby-here-doc-end-match' unless `ruby-here-doc-beg-re'
	  matched.

Thu Sep  4 15:40:07 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test/csv/test_csv.rb: run on test/unit original layer.

Thu Sep  4 12:54:50 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/token.c: headerless documents with root-level spacing now
	  honored.

Thu Sep  4 00:06:14 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (mark_frame_adj): need to adjust argv pointer if using
	  system's alloca. [ruby-core:01503]

Wed Sep  3 21:33:20 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* test: add test directory.  Test::Unit aware testcases and needed
	  files should be located in this directory.  dir/file name convention;
	    test/{module_name}/test_{testcase_name}.rb
	    test/{module_name}/{needed_files}
	  someday, someone will write testrunner which searches test_*.rb and
	  run testcases automatically.

	* test/csv/*: add testcase for lib/csv.rb.

Wed Sep  3 01:37:09 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* io.c (rb_f_gets): should call next_argv() before type check
	  current_file. [ruby-list:38336]

Tue Sep  2 20:37:15 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): warning
	  for skipping server verification.

Tue Sep  2 23:36:57 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (proc_invoke): should retrieve retval when pcall is true.

Tue Sep  2 14:09:20 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* ext/socket/extconf.rb: check s6_addr8 in in6_addr (Tru64 UNIX).
	  the patch is submitted by nmu <nmu@users.sourceforge.jp>.

	* ext/socket/getaddrinfo.c (getaddrinfo): should use in6_addr8 on
	  some platforms.

	* ext/socket/getnameinfo.c (getnameinfo): ditto.

Tue Sep  2 14:02:19 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* ext/tcltklib/tcltklib.c (ip_invoke): fixed bug on passing a exception

	* ext/tk/lib/{tk.rb, tkcanvas.rb, tkfont.rb, tktext.rb} :
	  bug fix and improvement of font control

Tue Sep  2 09:51:36 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): should not handle exceptions within rescue
	  argument.  [ruby-talk:80804]

Tue Sep  2 00:44:37 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* re.c (rb_memsearch): fix overrun.  [ruby-talk:80759]

Tue Sep  2 00:41:27 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/iconv/iconv.c (map_charset): use lower case keys.

	* ext/iconv/iconv.c (iconv_fail): just yield error and return the
	  result if a block is given.

	* ext/iconv/iconv.c (iconv_convert): yield error and append the
	  result if a block is given.

	* ext/iconv/charset_alias.rb (charset_alias): optional third
	  argument.

	* ext/iconv/charset_alias.rb (charset_alias): use CP932 instead of
	  SHIFT_JIS on cygwin.

Mon Sep  1 18:34:25 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval): make tail recursion in ELSE clause of
	  RESCUE a jump.

Mon Sep  1 18:00:02 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (aref_args): forgot to call NEW_SPLAT(). reported by
	  Dave Butcher.

	* eval.c (Init_Thread): protect thgroup_default.  suggested by Guy
	  Decoux in [ruby-talk:80623]

Mon Sep  1 16:59:10 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_thread_switch): add RESTORE_EXIT; exit by another
	  thread termination.

	* eval.c (rb_thread_start_0): should not error_print() within
	  terminated thread, because $stderr used by it might be
	  overriden now.  [ruby-dev:21280]

Sun Aug 31 22:46:55 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* eval.c (TAG_DST()): take no argument.

	* process.c (p_gid_sw_ensure): return VALUE.

Sun Aug 31 22:27:10 2003  Hidetoshi NAGAI  <nagai@dumbo.ai.kyutech.ac.jp>

	* process.c (p_gid_sw_ensure): lack of function type

Sun Aug 31 12:25:06 2003  Nobuyoshi Nakada  <nobu.nokada@softhome.net>

	* lib/optparse.rb: --version takes an optional argument; "all" or
	  a list of package names.

Sun Aug 31 10:17:02 2003  Tadayoshi Funaba  <tadf@dotrb.org>

	* lib/date/format.rb: yyyy/mm is not an acceptable format.

	* lib/time.rb: follow above.

Sat Aug 30 14:25:43 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_iter_break): should not call TAG_JUMP directly.

Sat Aug 30 03:58:21 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (struct BLOCK): remove BLOCKTAG, use scope instead.

	* eval.c (POP_TAG): no longer propagate retval.  retval is now set
	  directly by localjump_destination().

	* eval.c (localjump_destination): new function to cast
	  return/break local jump.

	* eval.c (rb_yield_0): stop TAG_RETURN/TAG_BREAK escaping.

Fri Aug 29 22:35:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* bigdecimal.c *.html: The 2nd arg. for add,sub,mult, and div is 0,
	  then result will be the same as +,-,*,/ respectively.

Fri Aug 29 17:30:15 2003  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp>

	* process.c: bug fix

	* process.c: add rb_secure(2) to methods of Process::{UID,GID,Sys}

	* process.c: deny handling IDs during evaluating the block given to
	  the Process::{UID,GID}.switch method

	* ext/tcltklib/tcltklib.c : some methods have no effect if on slave-IP

	* ext/tcltklib/tcltklib.c : can create a interpreter without Tk

	* ext/tcltklib/tcltklib.c : bug fix on handling exceptions

	* ext/tcltklib/MANUAL.euc : modify

	* ext/tk/lib/tk.rb : freeze some core modules

	* ext/tk/lib/multi-tk.rb : more secure

	* ext/tk/lib/tk.rb: TkVariable.new(array) --> treat the array as the
	  Tk's list

	* ext/tk/lib/tk.rb: improve accessibility of TkVariable object

	* ext/tk/lib/tk.rb, ext/tk/lib/tkfont.rb, ext/tk/lib/tkcanvas.rb,
	  ext/tk/lib/tktext.rb : fix bug of font handling

	* ext/tk/lib/tkfont.rb TkFont.new() accepts compound fonts

Thu Aug 28 22:07:12 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_autoload_load): call const_missing if autoloading
	  constant is not defined to allow hook.

	* eval.c (rb_eval): use rb_const_get_from() instead of
	  rb_const_get_at().

	* eval.c (is_defined): forgot to check NODE_COLON3.

Thu Aug 28 17:30:24 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* variable.c (rb_const_get_0): should check constants defined in
	  included modules, if klass is Object. [ruby-talk:79302]

	* numeric.c (check_uint): check should be done using UINT_MAX, not
	  INT_MAX. this fix is submitted by Lyle Johnson
	  <lyle@knology.net> in [ruby-core:01486]

Thu Aug 28 05:02:52 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (singleton): typo fixed (ruby-bugs-ja:PR#562)

Thu Aug 28 02:37:45 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_eval): *a = [1,2] now assigns [[1,2]] to a.
	  consistent with *a = [1], which set [[1]] to a.

	* node.h: merge NODE_RESTARY to NODE_SPLAT.

	* parse.y: rules simplified a bit by removing NODE_RESTARY.

	* sample/test.rb: updated for new assignment behavior.

Wed Aug 27 22:33:24 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* error.c (rb_bug): should not use other methods; this function is
	  not for ordinary use.  [ruby-dev:21259]

Wed Aug 27 15:07:57 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/smtp.rb (check_response): AUTH CRAM-MD5 returns 334
	  response. [ruby-list:38279]

Wed Aug 27 05:10:15 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* win32/win32.c (map_errno): support winsock error.

	* win32/win32.c (pipe_exec, CreateChild, poll_child_status, waitpid,
	  kill, link, rb_w32_rename, unixtime_to_filetime, rb_w32_utime):
	  pass errno to map_errno().

	* win32/win32.c (rb_w32_select, rb_w32_accept, rb_w32_bind,
	  rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname,
	  rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv,
	  rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt,
	  rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr,
	  rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname,
	  rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport,
	  rb_w32_fclose, rb_w32_close): use map_errno().

	* win32/win32.h: add winsock errors.

Tue Aug 26 23:53:23 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* lib/ostruct.rb (OpenStruct::method_missing): prohibit modifying
	  frozen OpenStruct. [ruby-talk:80214]

Tue Aug 26 20:03:50 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_tmpsrc): add the hook for source.
	  [ruby-list:38122]

Tue Aug 26 15:59:53 2003  why the lucky stiff  <why@ruby-lang.org>

	* implicit.c (syck_type_id_to_taguri): corrected detection of
	  x-private types.

Sun Aug 24 01:02:48 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* file.c (file_expand_path): performance improvement.
	  [ruby-talk:79748]

Sat Aug 23 23:41:16 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* file.c (rb_file_s_expand_path): avoid calling rb_scan_args() for
	  apparent cases. [ruby-talk:79748]

Sat Aug 23 18:56:53 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/nkf/nkf.c (rb_nkf_putchar): should use rb_str_resize() to just
	  resize a string, rb_str_cat() disallows NULL.  [ruby-dev:21237]

Sat Aug 23 16:48:41 2003  Keiju Ishitsuka  <keiju@ishitsuka.com>

	* lib/irb/ruby-lex.rb: bug fix for "foo" !~ /bar/. [ruby-talk:79942]

Sat Aug 23 15:59:58 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_eval, rb_iterate, block_pass): reduce PUSH/POP_TAG and
	  EXEC_TAG() for retry.  [ruby-dev:21216]

Sat Aug 23 02:32:33 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_yield_splat): should check if "values" is array.

	* enum.c (each_with_index_i): typo.

Fri Aug 22 17:07:05 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* enum.c (inject_i): use rb_yield_values.

	* enum.c (each_with_index_i): ditto.

	* eval.c (rb_yield_splat): new function to call "yield *values".

	* string.c (rb_str_scan): use rb_yield_splat().

Fri Aug 22 06:13:22 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/rubyext.c: refactoring of the transfer method
	  dispatch.  added yaml_org_handler for faster dispatch of
	  transfers to base types.

	* lib/yaml/rubytypes.rb: removed handling of builtins from
	  Ruby library.

	* ext/syck/token.c: quoted and block scalars are now implicit !str

	* ext/syck/implicit.c: empty string detected as !null.

Fri Aug 22 01:00:31 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (block_pass): improve passing current block.

Fri Aug 22 00:13:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c: Int. overflow bug in multiplication
	  fixed, and VpNmlz() speed up.

Wed Aug 20 16:44:49 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/socket/socket.c (ruby_connect): many systems seem to have
	  a problem in select() after EINPROGRESS.  [ruby-list:38080]

Wed Aug 20 01:31:17 2003  why the lucky stiff  <why@ruby-lang.org>

	* ext/syck/syck.h: Parser definition problems on HP-UX.
	  [ruby-talk:79389]

	* ext/syck/handler.c (syck_hdlr_get_anchor): Memory leak.

	* ext/syck/syck.s (syck_io_file_read): Bad arguments to fread.

	* ext/syck/rubyext.c: Tainting issues.

Tue Aug 19 23:20:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c .h .html: to_s("+") implemented.

	* ext/bigdecimal/lib/bigdecimal/math.rb: E implemented.

Tue Aug 19 07:47:09 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/ssl.rb: new file; SSL/TLS enhancement for GenericServer.

	* lib/webrick/https.rb: SSLSocket handling is moved to webrick/ssl.rb.

	* lib/webrick/compat.rb (File::fnmatch): remove old migration code.

	* lib/webrick/httpserver.rb (HTTPServer#run): ditto.

	* lib/webrick/server.rb (GenericServer#listen): the body of this
	  method is pull out as Utils::create_lisnteners.

	* lib/webrick/utils.rb (Utils::create_lisnteners): new method.

	* lib/webrick/server.rb (GenericServer#start): should rescue
	  unknown errors. and refine comments.

	* ext/openssl/lib/openssl/ssl.rb (SSLServer#accept): should close
	  socket if SSLSocket raises error.

Tue Aug 19 11:19:33 2003  Shugo Maeda  <shugo@ruby-lang.org>

	* io.c (next_argv): should not call GetOpenFile() if rb_stdout is
	  not a IO (T_FILE).

Tue Aug 19 07:47:09 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/ossl_ssl.c: sync_close is moved to SSLSocket as
	  a builtin.

	* ext/openssl/lib/openssl/buffering.rb (Buffering#close): ditto.

	* ext/openssl/lib/openssl/buffering.rb (Buffering#puts): should
	  add a return to the tails of each line.

	* ext/openssl/lib/openssl/ssl.rb: new class OpenSSL::SSL::SSLServer.

	* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): use sync_close.

	* ext/openssl/sample/echo_svr.rb: use SSLServer.

	* ext/openssl/sample/echo_cli.rb: add example of SSLSocket#sync_close.

Tue Aug 19 01:24:34 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/curses/curses.c (_XOPEN_SOURCE_EXTENDED): Mac OS X standard
	  headers are inconsistent at this macro.  [ruby-core:01432]

	* ext/curses/extconf.rb: check if _XOPEN_SOURCE_EXTENDED breaks.

	* ext/tcltklib/stubs.c: Status macro in X11/Xthreads.h bothers
	  winspool.h

	* instruby.rb: make list at first instead of iterator.
	  [ruby-talk:79347]

Mon Aug 18 11:23:11 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* dir.c (glob_helper): preserve raw order for **.

Sun Aug 17 23:39:55 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/openssl/extconf.rb (HAVE_VA_ARGS_MACRO): need to compile.

Sun Aug 17 17:10:03 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/ssl.rb (SSLSocket#sync_close=): add a
	  method to specify if the underlying IO will be closed in
	  SSLSocket#close.

	* ext/openssl/lib/openssl/buffering.rb: add forwarders to
	  setsockopt, getsockopt and fcntl.

	* ext/openssl/lib/net/protocols.rb: enable sync for SSLSocket.

Sun Aug 17 11:32:04 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): should not force to remake Makefile when
	  installation and so on.

Sat Aug 16 23:58:18 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* marshal.c (w_symbol, w_object): get rid of warnings.

	* re.c (rb_memsearch): ditto.

	* time.c (time_dump): ditto.

	* ext/extmk.rb (extmake): not continue making when extconf.rb
	  failed.

	* ext/openssl/extconf.rb: check __VA_ARGS__ macro more precisely.

	* ext/openssl/ossl.h: remove version.h dependency.

	* ext/openssl/ruby_missing.h: ditto.

	* lib/mkmf.rb (pkg_config): use --libs output except with
	  only-L for other options.  [ruby-list:38099]

	* lib/mkmf.rb (create_makefile): separate rule for static
	  library from shared object.

	* win32/Makefile.sub, bcc32/Makefile.sub, wince/Makefile.sub:
	  define exec_prefix and libdir.

Fri Aug 15 23:15:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c .h: Bug in combination of limit & div
	  method fixed.

	* ext/bigdecimal/lib/bigdecimal/math.rb: atan() & sqrt() added.

Fri Aug 15 12:01:43 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* configure.in (HUGE_ST_INO): check whether struct stat.st_ino
	  is larger than long.  [ruby-dev:21194]
	  http://www.geocities.co.jp/SiliconValley-PaloAlto/1409/ruby/beos.html

	* error.c (syserr_eqq): errno might exceed Fixnum limit.

	* error.c (Init_Exception): moved base initialization from
	  init_syserr().

	* inits.c (rb_call_inits): postpone initializing errnos until
	  Bignum is available.

Fri Aug 15 12:01:43 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/curses/curses.c (_XOPEN_SOURCE_EXTENDED): needed to let
	  keyname() and so on be declared.

	* ext/curses/curses.c (curses_resizeterm, window_resize):
	  arguments conflicted with macros in term.h.

	* ext/curses/curses.c (Curses module methods): ensure
	  initialized.  [ruby-dev:21191]

Fri Aug 15 02:08:53 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* gc.c (id2ref): recycle check should be done by klass == 0.
	  [ruby-core:01408]

Fri Aug 15 01:34:23 2003  Michal Rokos  <m.rokos@sh.cvut.cz>

	* ext/openssl/ossl_pkey.c: move generate_cb here

	* ext/openssl/ossl_pkey_{dh|dsa|rsa}.c: adapt to this cb

	* ext/openssl/openssl_missing.[ch]: add (0.9.6x, x<j) missing BN funcs

	* ext/openssl/ossl_bn.c: use supplied funcs from openssl_missing.c

Fri Aug 15 00:38:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c: Bug in div method fixed.

	* ext/bigdecimal/lib/bigdecimal/math.rb: Newly added.

	* ext/bigdecimal/sample/pi.rb: Changed so as to use math.rb.

Thu Aug 14 21:19:14 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (Init_Thread): Continuation#[] added.  [ruby-talk:79028]

Thu Aug 14 20:03:34 2003  Masaki Suketa  <masaki.suketa@nifty.ne.jp>

	* ext/win32ole/win32ole.c (OLE_FREE): should not call
	  ole_message_loop.

	* ext/win32ole/win32ole.c (ole_event_free): ditto.

	* ext/win32ole/win32ole.c (ole_initialize): stop calling
	  OleUninitialize at exit.

Thu Aug 14 11:27:37 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* gc.c (rb_data_object_alloc): check type of 1st argument.
	  [ruby-dev:21192]

Thu Aug 14 00:21:14 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs.

	* parse.y (lhs): ditto.

	* parse.y (yylex): should return tCOLON3 right after kCLASS.
	  [ruby-talk:78918]

	* error.c (exc_initialize): was converting argument to string too
	  eagerly.  Only check was needed. [ruby-talk:78958]

Wed Aug 13 23:31:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal/bigdecimal.c .h .html: Ambiguity of
	  BigDecimal::limit removed.

Wed Aug 13 19:21:34 2003  Christian Neukirchen  <chneukirchen@yahoo.de>

	* lib/webrick/https.rb (HTTPServer#run): should set syncing-mode
	  to SSLSocket. [ruby-talk:78919]

Wed Aug 13 18:13:49 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (POP_BLOCK): turn on BLOCK_LEFT flag when leaving block.

	* eval.c (proc_invoke): unpack return/break destination when block
	  is already left.

Wed Aug 13 15:58:31 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* object.c (rb_class_s_alloc): add function prototype to avoid VC++
	  warning.

Wed Aug 13 13:50:59 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/Win32API/Win32API.c (Win32API_initialize): should pass some
	  class to first argument of Data_Wrap_Struct(). (ruby-bugs:PR#1109)

Tue Aug 12 16:55:11 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* Makefile.in: static link libraries to LIBRUBY_SO with static linked
	  ext.  [ruby-dev:21157]

	* ext/extmk.rb (extmake): sort extension library initialization order.

	* ext/extmk.rb (extmake): compact $extlibs.

Tue Aug 12 02:48:56 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (THREAD_SAVE_CONTEXT): should explicitly turn off the
	  flag before calling getcontext(2).

	* eval.c (struct thread): add member to save backing store on
	  IA64. (ruby-bugs PR1086)

	* eval.c (thread_mark): mark IA64 backing store region.

	* eval.c (thread_free): free saved IA64 backing store.

	* eval.c (rb_thread_save_context): save IA64 backing store as well.

	* eval.c (rb_thread_restore_context): restore IA64 backing store.

	* eval.c (THREAD_ALLOC): initialize IA64 members.

Mon Aug 11 22:31:50 2003  NAKAMURA, Hiroshi  <nahi@ruby-lang.org>

	* lib/debug.rb(debug_command): inspection command should inspect
	  resulting value even if it's nil.  [ruby-dev:21180] by OMAE, jun
	  <jun66j5@ybb.ne.jp>.

	* lib/debug.rb(debug_command): incomplete regexp.

Mon Aug 11 17:33:07 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call_super): do not use rb_block_given_p() for
	  check. [ruby-talk:78656]

	* eval.c (BEGIN_CALLARGS): push ITER_NOT only when ITER_PRE.

Sun Aug 10 10:43:05 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* ext/openssl/lib/openssl/buffering.rb: increase BLOCK_SIZE
	  from 1k to 16k bytes. [ruby-talk:78603]

	* ext/openssl/ossl_ssl.c (ossl_sslctx_s_alloc): enable
	  partial write to allow interruption in SSLSocket#write.

Sun Aug 10 00:34:16 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* cygwin/GNUmakefile: remove unnecessary '--drive-name=$(CC)'
	  for ccache.

Sat Aug  9 10:36:21 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* marshal.c (w_object): do not dump generic instance variable when
	  marshal_dump is defined.

Sat Aug  9 00:35:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal.c: F style output(like 1234.56789) implemented
	  to to_s method.
	* ext/bigdecimal_??.html: F style output(like 1234.56789)
	  implemented to to_s method.

Fri Aug  8 12:33:17 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* bcc32/Makefile.sub: rubyw.exe should be a Windows GUI program.
	  add the -aa option to WLDFLAGS.

Fri Aug  8 11:29:26 2003  Koji Arai  <jca02266@nifty.ne.jp>

	* marshal.c (w_object): should set `c_arg' at first.

Fri Aug  8 03:22:28 2003  GOTOU Yuuzou  <gotoyuzo@notwork.org>

	* lib/webrick/httputils.rb (FormData#list): should not take
	  a side effect for the receiver.

Thu Aug  7 14:40:37 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* cygwin/GNUmakefile: better --disbale-shared option support.

	* cygwin/GNUmakefile: add forwarding DLL target for cygwin.

Thu Aug  7 14:21:05 2003  Corinna Vinschen  <vinschen@redhat.com>

	* configure.in: Fix Cygwin specific naming of libraries to
	  be net distribution compliant. (ruby-bugs:PR#1077)
	  cygwin-ruby18.dll -> cygruby18.dll

Thu Aug  7 12:51:38 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_f_at_exit): should not be called without a block.
	  block_given check added.

Thu Aug  7 06:46:06 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_call0): forgot to pop ruby_class.

	* eval.c (rb_call0): update ruby_class as well as ruby_cref.
	  (ruby-bugs-ja:PR#540)

Thu Aug  7 04:52:50 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_yield_0): remove ruby_frame->cbase and unify to
	  ruby_cref.  [ruby-talk:78141]

Thu Aug  7 04:19:15 2003  Akinori MUSHA  <knu@iDaemons.org>

	* gc.c: FreeBSD/ia64's mcontext_t is a bit different from that of
	  Linux/ia64.  This makes gc.c compile but miniruby coredumps for
	  the moment.

Thu Aug  7 00:15:00 2003  Shigeo Kobayashi  <shigek@ruby-lang.org>

	* ext/bigdecimal.c: Comparison results adjusted to Float's.
	* ext/bigdecimal.c: Use rb_num_coerce_????(x,y) instead of own.

Wed Aug  6 22:58:00 2003  Nathaniel Talbott  <ntalbott@ruby-lang.org>

	* lib/test/unit/testcase.rb: Added equality checking.
	* lib/test/unit/testsuite.rb: Added equality checking.
	* lib/test/unit/assertions.rb: Fixed a warning.

Wed Aug  6 17:28:10 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* ext/extmk.rb (extmake): pass LIBPATH to make ruby.  [ruby-dev:21137]

	* ext/extmk.rb (extmake): set library name as source file name in
	  Init_ext().  [ruby-dev:21137]

	* lib/mkmf.rb (Logging::postpone): postpone logging messages after
	  heading message as the result of the block.

	* lib/mkmf.rb (macro_defined?): append newline to src unless ended
	  with it.

	* lib/mkmf.rb (have_library): treat nil function name as "main".
	  (ruby-bugs:PR#1083)

	* lib/mkmf.rb (pkg_config): should append additional libraries to
	  $libs but not $LIBS.  [ruby-dev:21137]

	* ext/io/wait/extconf.rb: check DOSISH macro instead of platform.

	* ext/digest/sha1/extconf.rb: have_library already appends library
	  name.

Wed Aug  6 17:23:57 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c: initialize /* OK */ variables by Qnil to stop warnings.

Wed Aug  6 04:58:32 2003  NAKAMURA Usaku  <usa@ruby-lang.org>

	* ext/Setup*: add io/wait and openssl.

Wed Aug  6 01:13:38 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* eval.c (rb_f_autoload): use ruby_cbase instead of ruby_class.

	* eval.c (rb_f_autoload_p): ditto.

	* class.c (rb_mod_init_copy): no longer implements independent
	  clone and dup methods.  override "initialize_copy" instead.
	  [ruby-core:01352]

	* object.c (rb_class_s_alloc): define Class allocation function.
	  this makes Classes to follow clone framework that uses
	  initialize_copy.

	* object.c (rb_class_initialize): separate instantiation and
	  initialization.

	* object.c (rb_obj_alloc): prohibit instantiation from
	  uninitialized class.

	* object.c (rb_class_superclass): check uninitialized class.

	* array.c (rb_ary_fill): wrong index processing with block.  this
	  fix was done by Koji Arai <JCA02266@nifty.ne.jp> [ruby-list:38029]

	* marshal.c (w_object): should preserve generic ivar for nil,
	  true, false, symbols, and fixnums.

	* marshal.c (w_uclass): base_klass check should be done after
	  rb_class_real().

Wed Aug  6 01:18:50 2003  Minero Aoki  <aamine@loveruby.net>

	* lib/net/http.rb: update document.

	* lib/net/pop.rb: ditto.

	* lib/net/protocol.rb: ditto.

Wed Aug  6 00:48:37 2003  Koji Arai  <jca02266@nifty.ne.jp>

	* marshal.c (w_object): should recommend marshal_dump rather than
	  _dump_data.

Tue Aug  5 17:58:57 2003  WATANABE Hirofumi  <eban@ruby-lang.org>

	* lib/fileutils.rb (install): should preserve timestamp only.

Tue Aug  5 17:31:59 2003  Ian Macdonald  <ian@caliban.org>

	* lib/shell/command-processor.rb (Shell::CommandProcessor::rmdir):
	  simple typo.

Tue Aug  5 15:47:34 2003  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* eval.c (rb_load): should preserve current source file/line.

Tue Aug  5 10:04:42 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* string.c (str_new4): ptr may refer null_str.

Mon Aug  4 17:25:18 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>

	* stable version 1.8.0 released.

For the changes before 1.8.0, see doc/ChangeLog-1.8.0

Local variables:
add-log-time-format: (lambda ()
  (let* ((time (current-time))
	 (system-time-locale "C")
	 (diff (+ (cadr time) 32400))
	 (lo (% diff 65536))
	 (hi (+ (car time) (/ diff 65536))))
  (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t)))
indent-tabs-mode: t
tab-width: 8
end:
doc/alt-ruby18/NEWS000064400000033256150403614110007724 0ustar00= NEWS

This document is a list of user visible feature changes made between
releases except for bug fixes.

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.

* REXML

  * REXML::Document.entity_expansion_limit=

    New method to set the entity expansion limit. By default the limit is
    set to 10000.  See the following URL for details.

    http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/

== Changes since the 1.8.6 release

=== Configuration changes

* vendor_ruby directory

  A new library directory named `vendor_ruby' is introduced in
  addition to `site_ruby'.  The idea is to separate libraries
  installed by the package system (`vendor') from manually (`site')
  installed libraries preventing the former from getting overwritten
  by the latter, while preserving the user option to override vendor
  libraries with site libraries. (`site_ruby' takes precedence over
  `vendor_ruby')

  If you are a package maintainer, make each library package configure
  the library passing the `--vendor' option to `extconf.rb' so that
  the library files will get installed under `vendor_ruby'.

  You can change the directory locations using configure options such
  as `--with-sitedir=DIR' and `--with-vendordir=DIR'.

=== Global constants

* new constants

  * RUBY_COPYRIGHT
  * RUBY_DESCRIPTION

=== Library updates (outstanding ones only)

* new library

  * securerandom

* builtin classes

  * Array#flatten
  * Array#flatten!

    Takes an optional argument that determines the level of recursion
    to flatten.

  * Array#eql?
  * Array#hash
  * Array#==
  * Array#<=>

    Handle recursive data properly.

  * Array#index
  * Array#rindex

    Take a block instead of an argument.

  * Array#collect!
  * Array#map!
  * Array#each
  * Array#each_index
  * Array#reverse_each
  * Array#reject
  * Array#reject!
  * Array#delete_if
  * Array#select

    Return an enumerator if no block is given.

    Note that #map and #collect still return an array unlike Ruby 1.9
    to keep compatibility.

  * Array#pop
  * Array#shift

    Take an optional argument specifying the number of elements to
    remove.

  * Array#choice
  * Array#combination
  * Array#cycle
  * Array#drop
  * Array#drop_while
  * Array#permutation
  * Array#product
  * Array#shuffle
  * Array#shuffle!
  * Array#take,
  * Array#take_while

    New methods.

  * Binding#eval

    New method.

  * Dir#each
  * Dir#foreach

    Return an enumerator if no block is given.

  * Enumerable::Enumerator

    New class for various enumeration defined by the enumerator library.

  * Enumerable#each_slice
  * Enumerable#each_cons
  * Object#to_enum
  * Object#enum_for

    New methods for various enumeration defined by the enumerator library.

  * Enumerable#count
  * Enumerable#cycle
  * Enumerable#drop
  * Enumerable#drop_while
  * Enumerable#find_index
  * Enumerable#first
  * Enumerable#group_by
  * Enumerable#max_by
  * Enumerable#min_by
  * Enumerable#minmax
  * Enumerable#minmax_by
  * Enumerable#none?
  * Enumerable#one?
  * Enumerable#take
  * Enumerable#take_while

    New methods.

  * Enumerable#find
  * Enumerable#find_all
  * Enumerable#partition
  * Enumerable#reject
  * Enumerable#select
  * Enumerable#sort_by

    Return an enumerator if no block is given.

    Note that #map and #collect still return an array unlike Ruby 1.9
    to keep compatibility.

  * Enumerable#inject

    Accepts a binary operator instead of a block.

  * Enumerable#reduce

    New alias to #inject.

  * Enumerable#to_a

    Can take optional arguments and pass them to #each.

  * Hash#eql?
  * Hash#hash
  * Hash#==

    Handle recursive data properly.

  * Hash#delete_if
  * Hash#each
  * Hash#each_key
  * Hash#each_pair
  * Hash#each_value
  * Hash#reject!
  * Hash#select
  * ENV.delete_if
  * ENV.each
  * ENV.each_key
  * ENV.each_pair
  * ENV.each_value
  * ENV.reject!
  * ENV.select

    Return an enumerator if no block is given.

  * GC.stress
  * GC.stress=

    New methods.

  * Integer#ord
  * Integer#odd?
  * Integer#even?
  * Integer#pred

    New methods.

  * Integer#downto
  * Integer#times
  * Integer#upto

    Return an enumerator if no block is given.

  * IO#each
  * IO#each_line
  * IO#each_byte
  * IO.foreach
  * ARGF.each
  * ARGF.each_line
  * ARGF.each_byte

    Return an enumerator if no block is given.

  * IO#bytes
  * IO#chars
  * IO#each_char
  * IO#getbyte
  * IO#lines
  * IO#readbyte
  * ARGF.bytes
  * ARGF.chars
  * ARGF.each_char
  * ARGF.getbyte
  * ARGF.lines
  * ARGF.readbyte

    New methods. 

  * Method#name
  * Method#owner
  * Method#receiver
  * UnboundMethod#name
  * UnboundMethod#owner

    New methods.

  * Module#class_exec
  * Module#module_exec

    New methods.

  * Numeric#step

    Return an enumerator if no block is given.

  * Object#instance_exec
  * Object#tap

    New methods.

  * ObjectSpace.each_object

    Return an enumerator if no block is given.

  * Process.exec implemented.

  * Range#each
  * Range#step

    Return an enumerator if no block is given.

  * Regexp.union accepts an array of patterns.

  * String#bytes

    New method

  * String#bytesize

    New method, returning the size in bytes. (alias length and size)

  * String#chars
  * String#each_char
  * String#lines
  * String#partition
  * String#rpartition
  * String#start_with?
  * String#end_with?

    New methods.  These are $KCODE aware unlike #index, #rindex and
    #include?.

  * String#each_byte
  * String#each
  * String#each_line
  * String#gsub(pattern)

    Return an enumerator if no block is given.

  * String#upto

    An optional second argument is added to specify if the last value
    should be included.

  * StopIteration

    New exception class that causes Kernel#loop to stop iteration when
    raised.

  * Struct#each
  * Struct#each_pair

    Return an enumerator if no block is given.

  * Symbol#to_proc

    New method.

  * __method__

    New global function that returns the name of the current method as
    a Symbol.

* enumerator

  * Enumerator is now a built-in module.  The #next and #rewind
    methods are implemented using the "generator" library.  Use with
    care and be aware of the performance loss.

* ipaddr

  * New methods
    * IPAddr#<=>
    * IPAddr#succ

      IPAddr objects are now comparable and enumerable having these
      methods.  This also means that it is possible to have a Range
      object between two IPAddr objects.

    * IPAddr#to_range

      A new method to create a Range object for the (network) address.

  * Type coercion support
    * IPAddr#&
    * IPAddr#|
    * IPAddr#==
    * IPAddr#include?

      These methods now accept a string or an integer instead of an
      IPAddr object as the argument.

* net/smtp

  * Support SSL/TLS.

* openssl

  * New classes
    * OpenSSL::PKey::EC
    * OpenSSL::PKey::EC::Group
    * OpenSSL::PKey::EC::Point
    * OpenSSL::PKey::PKCS5
    * OpenSSL::SSL::Session

  * Documentation!

  * Various new methods (see documentation).

  * Remove redundant module namespace in Cipher, Digest, PKCS7, PKCS12.
    Compatibility classes are provided which will be removed in Ruby 1.9.

* shellwords

  * Add methods for escaping shell-unsafe characters:
    * Shellwords.join
    * Shellwords.escape
    * Array#shelljoin
    * String#shellescape

  * Add shorthand methods:
    * Shellwords.split (alias shellwords)
    * String#shellsplit

* stringio

  * StringIO#getbyte
  * StringIO#readbyte

    New methods. (aliases for compatibility with 1.9)

  * StringIO#each_char
  * StringIO#chars

    New methods.

  * StringIO#each
  * StringIO#each_line
  * StringIO#each_byte

    Return an enumerator if no block is given.

* tempfile

  * Tempfile.open and Tempfile.new now accept a suffix for the
    temporary file to be created.  To specify a suffix, pass an array
    of [basename, suffix] as the first argument.

      Tempfile.open(['image', 'jpg']) { |tempfile| ... }

* tmpdir

  * New method:

    * Dir.mktmpdir

* uri

  * added LDAPS scheme.
  * Change for RFC3986:
    * FTP
      * URI('ftp://example.com/foo').path #=> 'foo'
      * URI('ftp://example.com/%2Ffoo').path #=> '/foo'
      * URI::FTP.build([nil, 'example.com', nil, '/foo', 'i').to_s #=> 'ftp://example.com/%2Ffoo;type=i'
    * URI merge
      * URI('http://a/b/c/d;p?q').merge('?y') == URI('http://a/b/c/d;p?y')
      * URI('http://a/b/c/d;p?q').merge('/./g') == URI('http://a/g')
      * URI('http://a/b/c/d;p?q').merge('/../g') == URI('http://a/g')
      * URI('http://a/b/c/d;p?q').merge('../../../g') == URI('http://a/g')
      * URI('http://a/b/c/d;p?q').merge('../../../../g') == URI('http://a/g')

* rss

  * 0.1.6 -> 0.2.4

  * Fix image module URI

  * Atom support

  * ITunes module support

  * Slash module support

  * content:encoded with RSS 2.0 support

=== Interpreter Implementation

* passing a block to a Proc [experimental]

  This implementation in current shape is known to be buggy/broken,
  especially with nested block invocation.  Take this as an
  experimental feature.

* stack trace

  On non-SystemStackError exception, full stack trace is shown.

=== Compatibility issues (excluding feature bug fixes)

* String#slice! had some unintentional bugs and they have been fixed
  because either they disagreed with documentation or their respective
  behavior of #slice.  Unfortunately, this causes some
  incompatibilities in the following (somewhat rare) cases.

  * #slice! no longer expands the array when an out-of-boundary value
    is given.

      # Ruby 1.8.6
      a = [1,2]
      a.slice!(4,0)   #=> nil
      a               #=> [1,2,nil,nil]

      # Ruby 1.8.7
      a = [1,2]
      a.slice!(4,0)   #=> nil
      a               #=> [1,2]

  * #slice! no longer raises an exception but returns nil when a
    negative length or out-of-boundary negative position is given.

      # Ruby 1.8.6
      a = [1,2]
      a.slice!(1,-1)  #=> (raises IndexError)
      a.slice!(-5,1)  #=> (raises IndexError)

      # Ruby 1.8.7
      a = [1,2]
      a.slice!(1,-1)  #=> nil
      a.slice!(-5,1)  #=> nil

* String#to_i, String#hex and String#oct no longer accept a sequence
  of underscores (`__') as part of a number.

    # Ruby 1.8.6
    '1__0'.to_i     #=> 10
    '1__0'.to_i(2)  #=> 2  # 0b10
    '1__0'.oct      #=> 8  # 010
    '1__0'.hex      #=> 16 # 0x10

    # Ruby 1.8.7
    '1__0'.to_i     #=> 1
    '1__0'.to_i(2)  #=> 1
    '1__0'.oct      #=> 1
    '1__0'.hex      #=> 1

  The old behavior was inconsistent with Ruby syntax and considered as
  a bug.

* date

  * Date.parse

    '##.##.##' (where each '#' is a digit) is now taken as 'YY.MM.DD'
    instead of 'MM.DD.YY'.  While the change may confuse you, you can
    always use Date.strptime() when you know what you are dealing
    with.

* stringio

  * StringIO#each_byte

    The return value changed from nil to self.  This is what the
    document says and the same as each_line() does.

* tempfile

  * The file name format has changed.  No dots are included by default
    in temporary file names any more.  See above for how to specify a
    suffix.

* uri

  * See above for details.

== Changes since the 1.8.5 release

=== New platforms/build tools support

* IA64 HP-UX

* Visual C++ 8 SP1

* autoconf 2.6x

=== Global constants

* RUBY_PATCHLEVEL

  New constant since 1.8.5-p1.

=== Library updates (outstanding ones only)

* builtin classes

  * New method: Kernel#instance_variable_defined?

  * New method: Module#class_variable_defined?

  * New feature: Dir::glob() can now take an array of glob patterns.

* date

  * Updated based on date2 4.0.3.

* digest

  * New internal APIs for C and Ruby.

  * Support for autoloading.

      require 'digest'

      # autoloads digest/md5
      md = Digest::MD5.digest("string")

  * New digest class methods: file

  * New digest instance methods: clone, reset, new, inspect,
    digest_length (alias size or length), block_length()

  * New library: digest/bubblebabble

  * New function: Digest(name)

* fileutils

  * New option for FileUtils.cp_r(): :remove_destination

* nkf

  * Updated based on nkf as of 2007-01-28.

* thread

  * Replaced with much faster mutex implementation in C.  The former
    implementation, which is slow but considered to be stable, is
    available with a configure option `--disable-fastthread'.

* tk

  * Updated Tile extension support based on Tile 0.7.8.

  * Support --without-X11 configure option for non-X11 versions of
    Tcl/Tk (e.g. Tcl/Tk Aqua).

  * New sample script: irbtkw.rbw -- IRB on Ruby/Tk. It has no trouble
    about STDIN blocking on Windows.

* webrick

  * New method: WEBrick::Cookie.parse_set_cookies()

=== Compatibility issues (excluding feature bug fixes)

* builtin classes

  * String#intern now raises SecurityError when $SAFE level is greater
    than zero.

* date

  * Time#to_date and Time#to_datetime are added as private methods.
    They cause name conflict error in ActiveSupport 1.4.1 and prior,
    which comes with Rails 1.2.2 and prior.  Updating ActiveSupport
    and/or Rails to the latest versions fixes the problem.

* digest

  * The constructor does no longer take an initial string to feed.
    The following examples show how to migrate:

      # Before
      md = Digest::MD5.new("string")
      # After (works with any version)
      md = Digest::MD5.new.update("string")
        
      # Before
      hd = Digest::MD5.new("string").hexdigest
      # After (works with any version)
      hd = Digest::MD5.hexdigest("string")

* fileutils

  * A minor implementation change breaks Rake <=0.7.1.
    Updating Rake to 0.7.2 or higher fixes the problem.

* tk

  * Tk::X_Scrollable (Y_Scrollable) is renamed to Tk::XScrollable
    (YScrollable). Tk::X_Scrollable (Y_Scrollable) is still available,
    but it is an alias name.
doc/alt-ruby18/COPYING.ja000064400000004055150403614120010645 0ustar00$BK\%W%m%0%i%`$O%U%j!<%=%U%H%&%'%"$G$9!%(BGPL(the GNU General
Public License)$B$^$?$O0J2<$K<($9>r7o$GK\%W%m%0%i%`$r:FG[I[$G(B
$B$-$^$9!%(BGPL$B$K$D$$$F$O(BGPL$B%U%!%$%k$r;2>H$7$F2<$5$$!%(B

  1. $BJ#@=$O@)8B$J$/<+M3$G$9!%(B

  2. $B0J2<$N>r7o$N$$$:$l$+$rK~$?$9;~$KK\%W%m%0%i%`$N%=!<%9$r(B
     $B<+M3$KJQ99$G$-$^$9!%(B

     (a) $B%M%C%H%K%e!<%:$K%]%9%H$7$?$j!$:n<T$KJQ99$rAwIU$9$k(B
         $B$J$I$NJ}K!$G!$JQ99$r8x3+$9$k!%(B

     (b) $BJQ99$7$?K\%W%m%0%i%`$r<+J,$N=jB0$9$kAH?%FbIt$@$1$G(B
         $B;H$&!%(B

     (c) $BJQ99E@$rL@<($7$?$&$(!$%=%U%H%&%'%"$NL>A0$rJQ99$9$k!%(B
         $B$=$N%=%U%H%&%'%"$rG[I[$9$k;~$K$OJQ99A0$NK\%W%m%0%i(B
         $B%`$bF1;~$KG[I[$9$k!%$^$?$OJQ99A0$NK\%W%m%0%i%`$N%=!<(B
         $B%9$NF~<jK!$rL@<($9$k!%(B

     (d) $B$=$NB>$NJQ99>r7o$r:n<T$H9g0U$9$k!%(B

  3. $B0J2<$N>r7o$N$$$:$l$+$rK~$?$9;~$KK\%W%m%0%i%`$r%3%s%Q%$(B
     $B%k$7$?%*%V%8%'%/%H%3!<%I$d<B9T7A<0$G$bG[I[$G$-$^$9!%(B

     (a) $B%P%$%J%j$r<u$1<h$C$??M$,%=!<%9$rF~<j$G$-$k$h$&$K!$(B
         $B%=!<%9$NF~<jK!$rL@<($9$k!%(B

     (b) $B5!3#2DFI$J%=!<%9%3!<%I$rE:IU$9$k!%(B

     (c) $BJQ99$r9T$C$?%P%$%J%j$OL>A0$rJQ99$7$?$&$(!$%*%j%8%J(B
         $B%k$N%=!<%9%3!<%I$NF~<jK!$rL@<($9$k!%(B

     (d) $B$=$NB>$NG[I[>r7o$r:n<T$H9g0U$9$k!%(B

  4. $BB>$N%W%m%0%i%`$X$N0zMQ$O$$$+$J$kL\E*$G$"$l<+M3$G$9!%$?(B
     $B$@$7!$K\%W%m%0%i%`$K4^$^$l$kB>$N:n<T$K$h$k%3!<%I$O!$$=(B
     $B$l$>$l$N:n<T$N0U8~$K$h$k@)8B$,2C$($i$l$k>l9g$,$"$j$^$9!%(B

     $B$=$l$i%U%!%$%k$N0lMw$H$=$l$>$l$NG[I[>r7o$J$I$KIU$$$F$O(B
     LEGAL$B%U%!%$%k$r;2>H$7$F$/$@$5$$!%(B

  5. $BK\%W%m%0%i%`$X$NF~NO$H$J$k%9%/%j%W%H$*$h$S!$K\%W%m%0%i(B
     $B%`$+$i$N=PNO$N8"Mx$OK\%W%m%0%i%`$N:n<T$G$O$J$/!$$=$l$>(B
     $B$l$NF~=PNO$r@8@.$7$??M$KB0$7$^$9!%$^$?!$K\%W%m%0%i%`$K(B
     $BAH$_9~$^$l$k$?$a$N3HD%%i%$%V%i%j$K$D$$$F$bF1MM$G$9!%(B

  6. $BK\%W%m%0%i%`$OL5J]>Z$G$9!%:n<T$OK\%W%m%0%i%`$r%5%]!<%H(B
     $B$9$k0U;V$O$"$j$^$9$,!$%W%m%0%i%`<+?H$N%P%0$"$k$$$OK\%W(B
     $B%m%0%i%`$N<B9T$J$I$+$iH/@8$9$k$$$+$J$kB;32$KBP$7$F$b@U(B
     $BG$$r;}$A$^$;$s!%(B
doc/alt-ruby18/README.EXT000064400000077064150403614120010552 0ustar00.\" README.EXT -  -*- Text -*- created at: Mon Aug  7 16:45:54 JST 1995

This document explains how to make extension libraries for Ruby.

1. Basic knowledge

In C, variables have types and data do not have types.  In contrast,
Ruby variables do not have a static type, and data themselves have
types, so data will need to be converted between the languages.

Data in Ruby are represented by the C type `VALUE'.  Each VALUE data
has its data-type.

To retrieve C data from a VALUE, you need to:

 (1) Identify the VALUE's data type
 (2) Convert the VALUE into C data

Converting to the wrong data type may cause serious problems.


1.1 Data-types

The Ruby interpreter has the following data types:

	T_NIL		nil
	T_OBJECT	ordinary object
	T_CLASS		class
	T_MODULE	module
	T_FLOAT		floating point number
	T_STRING	string
	T_REGEXP	regular expression
	T_ARRAY		array
	T_FIXNUM	Fixnum(31bit integer)
	T_HASH		associative array
	T_STRUCT	(Ruby) structure
	T_BIGNUM	multi precision integer
	T_FILE		IO
	T_TRUE		true
	T_FALSE		false
	T_DATA		data
	T_SYMBOL        symbol

In addition, there are several other types used internally:

	T_ICLASS
	T_MATCH
	T_UNDEF
	T_VARMAP
	T_SCOPE
	T_NODE

Most of the types are represented by C structures.

1.2 Check Data Type of the VALUE

The macro TYPE() defined in ruby.h shows the data type of the VALUE.
TYPE() returns the constant number T_XXXX described above.  To handle
data types, your code will look something like this:

  switch (TYPE(obj)) {
    case T_FIXNUM:
      /* process Fixnum */
      break;
    case T_STRING:
      /* process String */
      break;
    case T_ARRAY:
      /* process Array */
      break;
    default:
      /* raise exception */
      rb_raise(rb_eTypeError, "not valid value");
      break;
  }

There is the data-type check function

  void Check_Type(VALUE value, int type)

which raises an exception if the VALUE does not have the type specified.

There are also faster check macros for fixnums and nil.

  FIXNUM_P(obj)
  NIL_P(obj)

1.3 Convert VALUE into C data

The data for type T_NIL, T_FALSE, T_TRUE are nil, true, false
respectively.  They are singletons for the data type.

The T_FIXNUM data is a 31bit length fixed integer (63bit length on
some machines), which can be converted to a C integer by using the
FIX2INT() macro.  There is also NUM2INT() which converts any Ruby
numbers into C integers.  The NUM2INT() macro includes a type check, so
an exception will be raised if the conversion failed.  NUM2DBL() can
be used to retrieve the double float value in the same way.

In version 1.7 or later it is recommended that you use the new macros
StringValue() and StringValuePtr() to get a char* from a VALUE.
StringValue(var) replaces var's value with the result of "var.to_str()".
StringValuePtr(var) does same replacement and returns char*
representation of var.  These macros will skip the replacement if var is
a String.  Notice that the macros take only the lvalue as their
argument, to change the value of var in place.

In version 1.6 or earlier, STR2CSTR() was used to do the same thing
but now it is deprecated in version 1.7, because STR2CSTR() has a risk
of a dangling pointer problem in the to_str() impliclit conversion.

Other data types have corresponding C structures, e.g. struct RArray
for T_ARRAY etc. The VALUE of the type which has the corresponding structure
can be cast to retrieve the pointer to the struct.  The casting macro
will be of the form RXXXX for each data type; for instance, RARRAY(obj). 
See "ruby.h".

For example, `RSTRING(str)->len' is the way to get the size of the
Ruby String object.  The allocated region can be accessed by
`RSTRING(str)->ptr'.  For arrays, use `RARRAY(ary)->len' and
`RARRAY(ary)->ptr' respectively.

Notice: Do not change the value of the structure directly, unless you
are responsible for the result.  This ends up being the cause of interesting
bugs.

1.4 Convert C data into VALUE

To convert C data to Ruby values:

  * FIXNUM

    left shift 1 bit, and turn on LSB.

  * Other pointer values

    cast to VALUE.

You can determine whether a VALUE is pointer or not by checking its LSB.  

Notice Ruby does not allow arbitrary pointer values to be a VALUE.  They
should be pointers to the structures which Ruby knows about.  The known
structures are defined in <ruby.h>.

To convert C numbers to Ruby values, use these macros.

  INT2FIX()	for integers within 31bits.
  INT2NUM()	for arbitrary sized integer.

INT2NUM() converts an integer into a Bignum if it is out of the FIXNUM
range, but is a bit slower.

1.5 Manipulating Ruby data

As I already mentioned, it is not recommended to modify an object's internal
structure.  To manipulate objects, use the functions supplied by the Ruby
interpreter. Some (not all) of the useful functions are listed below:

 String functions

  rb_str_new(const char *ptr, long len)

    Creates a new Ruby string.

  rb_str_new2(const char *ptr)

    Creates a new Ruby string from a C string.  This is equivalent to
    rb_str_new(ptr, strlen(ptr)).

  rb_tainted_str_new(const char *ptr, long len)

    Creates a new tainted Ruby string.  Strings from external data
    sources should be tainted.

  rb_tainted_str_new2(const char *ptr)

    Creates a new tainted Ruby string from a C string.

  rb_str_cat(VALUE str, const char *ptr, long len)

    Appends len bytes of data from ptr to the Ruby string.

 Array functions

  rb_ary_new()

    Creates an array with no elements.

  rb_ary_new2(long len)

    Creates an array with no elements, allocating internal buffer
    for len elements.

  rb_ary_new3(long n, ...)

    Creates an n-element array from the arguments.

  rb_ary_new4(long n, VALUE *elts)

    Creates an n-element array from a C array.

  rb_ary_push(VALUE ary, VALUE val)
  rb_ary_pop(VALUE ary)
  rb_ary_shift(VALUE ary)
  rb_ary_unshift(VALUE ary, VALUE val)

    Array operations.  The first argument to each functions must be an 
    array.  They may dump core if other types are given.

2. Extending Ruby with C

2.1 Addding new features to Ruby

You can add new features (classes, methods, etc.) to the Ruby
interpreter.  Ruby provides APIs for defining the following things:

 * Classes, Modules
 * Methods, Singleton Methods
 * Constants

2.1.1 Class/module definition

To define a class or module, use the functions below:

  VALUE rb_define_class(const char *name, VALUE super)
  VALUE rb_define_module(const char *name)

These functions return the newly created class or module.  You may
want to save this reference into a variable to use later.

To define nested classes or modules, use the functions below:

  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
  VALUE rb_define_module_under(VALUE outer, const char *name)

2.1.2 Method/singleton method definition

To define methods or singleton methods, use these functions:

  void rb_define_method(VALUE klass, const char *name, 
		        VALUE (*func)(), int argc)

  void rb_define_singleton_method(VALUE object, const char *name, 
			          VALUE (*func)(), int argc)

The `argc' represents the number of the arguments to the C function,
which must be less than 17.  But I doubt you'll need that many.

If `argc' is negative, it specifies the calling sequence, not number of
the arguments.  

If argc is -1, the function will be called as:

  VALUE func(int argc, VALUE *argv, VALUE obj)

where argc is the actual number of arguments, argv is the C array of
the arguments, and obj is the receiver.

If argc is -2, the arguments are passed in a Ruby array. The function
will be called like:

  VALUE func(VALUE obj, VALUE args)

where obj is the receiver, and args is the Ruby array containing
actual arguments.

There are two more functions to define methods.  One is to define
private methods:

  void rb_define_private_method(VALUE klass, const char *name, 
			        VALUE (*func)(), int argc)

The other is to define module functions, which are private AND singleton
methods of the module.  For example, sqrt is the module function
defined in Math module.  It can be called in the following way:

  Math.sqrt(4)

or

  include Math
  sqrt(4)

To define module functions, use:

  void rb_define_module_function(VALUE module, const char *name, 
				 VALUE (*func)(), int argc)

Oh, in addition, function-like methods, which are private methods defined
in the Kernel module, can be defined using:

  void rb_define_global_function(const char *name, VALUE (*func)(), int argc)

To define an alias for the method,

  void rb_define_alias(VALUE module, const char* new, const char* old);

To define and undefine the `allocate' class method,

  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
  void rb_undef_alloc_func(VALUE klass);

func have to take the klass as the argument and return a newly
allocated instance.  This instance should be empty as possible,
without any expensive (including external) resources.

2.1.3 Constant definition

We have 2 functions to define constants:

  void rb_define_const(VALUE klass, const char *name, VALUE val)
  void rb_define_global_const(const char *name, VALUE val)

The former is to define a constant under specified class/module.  The
latter is to define a global constant.

2.2 Use Ruby features from C

There are several ways to invoke Ruby's features from C code.

2.2.1 Evaluate Ruby Programs in a String

The easiest way to use Ruby's functionality from a C program is to
evaluate the string as Ruby program.  This function will do the job:

  VALUE rb_eval_string(const char *str)

Evaluation is done under the current context, thus current local variables
of the innermost method (which is defined by Ruby) can be accessed.

2.2.2 ID or Symbol

You can invoke methods directly, without parsing the string.  First I need
to explain about ID.  ID is the integer number to represent Ruby's
identifiers such as variable names.  The Ruby data type corresponding to ID
is Symbol.  It can be accessed from Ruby in the form:

 :Identifier

You can get the ID value from a string within C code by using

  rb_intern(const char *name)

You can retrieve ID from Ruby object (Symbol or String) given as an
argument by using

  rb_to_id(VALUE symbol)

You can convert C ID to Ruby Symbol by using

  VALUE ID2SYM(ID id)

and to convert Ruby Symbol object to ID, use

  ID SYM2ID(VALUE symbol)

2.2.3 Invoke Ruby method from C

To invoke methods directly, you can use the function below

  VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)

This function invokes a method on the recv, with the method name
specified by the symbol mid.

2.2.4 Accessing the variables and constants

You can access class variables and instance variables using access
functions.  Also, global variables can be shared between both environments.
There's no way to access Ruby's local variables.

The functions to access/modify instance variables are below:

  VALUE rb_ivar_get(VALUE obj, ID id)
  VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)

id must be the symbol, which can be retrieved by rb_intern().

To access the constants of the class/module:

  VALUE rb_const_get(VALUE obj, ID id)

See 2.1.3 for defining new constant.

3. Information sharing between Ruby and C

3.1 Ruby constants that C can be accessed from C

The following Ruby constants can be referred from C.

  Qtrue
  Qfalse

Boolean values.  Qfalse is false in C also (i.e. 0).

  Qnil

Ruby nil in C scope.

3.2 Global variables shared between C and Ruby

Information can be shared between the two environments using shared global
variables.  To define them, you can use functions listed below:

  void rb_define_variable(const char *name, VALUE *var)

This function defines the variable which is shared by both environments.
The value of the global variable pointed to by `var' can be accessed
through Ruby's global variable named `name'.

You can define read-only (from Ruby, of course) variables using the
function below.

  void rb_define_readonly_variable(const char *name, VALUE *var)

You can defined hooked variables.  The accessor functions (getter and
setter) are called on access to the hooked variables.

  void rb_define_hooked_variable(constchar *name, VALUE *var,
				 VALUE (*getter)(), void (*setter)())

If you need to supply either setter or getter, just supply 0 for the
hook you don't need.  If both hooks are 0, rb_define_hooked_variable()
works just like rb_define_variable().

  void rb_define_virtual_variable(const char *name,
				  VALUE (*getter)(), void (*setter)())

This function defines a Ruby global variable without a corresponding C
variable.  The value of the variable will be set/get only by hooks.

The prototypes of the getter and setter functions are as follows:

  (*getter)(ID id, void *data, struct global_entry* entry);
  (*setter)(VALUE val, ID id, void *data, struct global_entry* entry);

3.3 Encapsulate C data into a Ruby object

To wrap and objectify a C pointer as a Ruby object (so called
DATA), use Data_Wrap_Struct().

  Data_Wrap_Struct(klass, mark, free, ptr)

Data_Wrap_Struct() returns a created DATA object.  The klass argument
is the class for the DATA object.  The mark argument is the function
to mark Ruby objects pointed by this data.  The free argument is the
function to free the pointer allocation.  If this is -1, the pointer
will be just freed.  The functions mark and free will be called from
garbage collector.

You can allocate and wrap the structure in one step.

  Data_Make_Struct(klass, type, mark, free, sval)

This macro returns an allocated Data object, wrapping the pointer to
the structure, which is also allocated.  This macro works like:

  (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))

Arguments klass, mark, and free work like their counterparts in
Data_Wrap_Struct().  A pointer to the allocated structure will be
assigned to sval, which should be a pointer of the type specified.

To retrieve the C pointer from the Data object, use the macro
Data_Get_Struct().

  Data_Get_Struct(obj, type, sval)

A pointer to the structure will be assigned to the variable sval.

See the example below for details. 

4. Example - Creating dbm extension

OK, here's the example of making an extension library.  This is the
extension to access DBMs.  The full source is included in the ext/
directory in the Ruby's source tree.

(1) make the directory

  % mkdir ext/dbm

Make a directory for the extension library under ext directory.

(2) design the library

You need to design the library features, before making it.

(3) write C code.

You need to write C code for your extension library.  If your library
has only one source file, choosing ``LIBRARY.c'' as a file name is
preferred.  On the other hand, in case your library has multiple source
files, avoid choosing ``LIBRARY.c'' for a file name.  It may conflict
with an intermediate file ``LIBRARY.o'' on some platforms.

Ruby will execute the initializing function named ``Init_LIBRARY'' in
the library.  For example, ``Init_dbm()'' will be executed when loading
the library.

Here's the example of an initializing function.

--
Init_dbm()
{
    /* define DBM class */
    cDBM = rb_define_class("DBM", rb_cObject);
    /* DBM includes Enumerate module */
    rb_include_module(cDBM, rb_mEnumerable);

    /* DBM has class method open(): arguments are received as C array */
    rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);

    /* DBM instance method close(): no args */
    rb_define_method(cDBM, "close", fdbm_close, 0);
    /* DBM instance method []: 1 argument */
    rb_define_method(cDBM, "[]", fdbm_fetch, 1);
		:

    /* ID for a instance variable to store DBM data */
    id_dbm = rb_intern("dbm");
}
--

The dbm extension wraps the dbm struct in the C environment using 
Data_Make_Struct.

--
struct dbmdata {
    int  di_size;
    DBM *di_dbm;
};


obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
--

This code wraps the dbmdata structure into a Ruby object.  We avoid wrapping
DBM* directly, because we want to cache size information.

To retrieve the dbmdata structure from a Ruby object, we define the
following macro:

--
#define GetDBM(obj, dbmp) {\
    Data_Get_Struct(obj, struct dbmdata, dbmp);\
    if (dbmp->di_dbm == 0) closed_dbm();\
}
--

This sort of complicated macro does the retrieving and close checking for
the DBM.

There are three kinds of way to receive method arguments.  First,
methods with a fixed number of arguments receive arguments like this:

--
static VALUE
fdbm_delete(obj, keystr)
    VALUE obj, keystr;
{
	:
}
--

The first argument of the C function is the self, the rest are the
arguments to the method.

Second, methods with an arbitrary number of arguments receive
arguments like this:

--
static VALUE
fdbm_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
	:
    if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
	mode = 0666;		/* default value */
    }
	:
}
--

The first argument is the number of method arguments, the second
argument is the C array of the method arguments, and the third
argument is the receiver of the method.

You can use the function rb_scan_args() to check and retrieve the
arguments.  For example, "11" means that the method requires at least one
argument, and at most receives two arguments.

Methods with an arbitrary number of arguments can receive arguments
by Ruby's array, like this:

--
static VALUE
fdbm_indexes(obj, args)
    VALUE obj, args;
{
	:
}
--

The first argument is the receiver, the second one is the Ruby array
which contains the arguments to the method.

** Notice

GC should know about global variables which refer to Ruby's objects, but
are not exported to the Ruby world.  You need to protect them by

  void rb_global_variable(VALUE *var)

(4) prepare extconf.rb

If the file named extconf.rb exists, it will be executed to generate
Makefile.

extconf.rb is the file for checking compilation conditions etc.  You
need to put

  require 'mkmf'

at the top of the file.  You can use the functions below to check
various conditions.

  have_library(lib, func): check whether library containing function exists.
  have_func(func, header): check whether function exists
  have_header(header): check whether header file exists
  create_makefile(target): generate Makefile

The value of the variables below will affect the Makefile.

  $CFLAGS: included in CFLAGS make variable (such as -O)
  $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D)
  $LDFLAGS: included in LDFLAGS make variable (such as -L)
  $objs: list of object file names

Normally, the object files list is automatically generated by searching
source files, but you must define them explicitly if any sources will
be generated while building.

If a compilation condition is not fulfilled, you should not call
``create_makefile''.  The Makefile will not be generated, compilation will
not be done.

(5) prepare depend (optional)

If the file named depend exists, Makefile will include that file to
check dependencies.  You can make this file by invoking

  % gcc -MM *.c > depend

It's harmless.  Prepare it.

(6) generate Makefile

Try generating the Makefile by:

  ruby extconf.rb

If the library should be installed under vendor_ruby directory
instead of site_ruby directory, use --vendor option as follows.

  ruby extconf.rb --vendor

You don't need this step if you put the extension library under the ext
directory of the ruby source tree.  In that case, compilation of the
interpreter will do this step for you.

(7) make

Type

  make

to compile your extension.  You don't need this step either if you have
put the extension library under the ext directory of the ruby source tree.

(8) debug

You may need to rb_debug the extension.  Extensions can be linked
statically by adding the directory name in the ext/Setup file so that
you can inspect the extension with the debugger.

(9) done, now you have the extension library

You can do anything you want with your library.  The author of Ruby
will not claim any restrictions on your code depending on the Ruby API.
Feel free to use, modify, distribute or sell your program.

Appendix A. Ruby source files overview

ruby language core

  class.c
  error.c
  eval.c
  gc.c
  object.c
  parse.y
  variable.c

utility functions

  dln.c
  regex.c
  st.c
  util.c

ruby interpreter implementation

  dmyext.c
  inits.c
  main.c
  ruby.c
  version.c

class library

  array.c
  bignum.c
  compar.c
  dir.c
  enum.c
  file.c
  hash.c
  io.c
  marshal.c
  math.c
  numeric.c
  pack.c
  prec.c
  process.c
  random.c
  range.c
  re.c
  signal.c
  sprintf.c
  string.c
  struct.c
  time.c

Appendix B. Ruby extension API reference

** Types

 VALUE

The type for the Ruby object.  Actual structures are defined in ruby.h,
such as struct RString, etc.  To refer the values in structures, use
casting macros like RSTRING(obj).

** Variables and constants

 Qnil

const: nil object

 Qtrue

const: true object(default true value)

 Qfalse

const: false object

** C pointer wrapping

 Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval)

Wrap a C pointer into a Ruby object.  If object has references to other
Ruby objects, they should be marked by using the mark function during
the GC process.  Otherwise, mark should be 0.  When this object is no
longer referred by anywhere, the pointer will be discarded by free
function.

 Data_Make_Struct(klass, type, mark, free, sval)

This macro allocates memory using malloc(), assigns it to the variable
sval, and returns the DATA encapsulating the pointer to memory region.

 Data_Get_Struct(data, type, sval)

This macro retrieves the pointer value from DATA, and assigns it to
the variable sval. 

** Checking data types

TYPE(value)
FIXNUM_P(value)
NIL_P(value)
void Check_Type(VALUE value, int type)
void Check_SafeStr(VALUE value)

** Data type conversion

FIX2INT(value)
INT2FIX(i)
NUM2INT(value)
INT2NUM(i)
NUM2DBL(value)
rb_float_new(f)
StringValue(value)
StringValuePtr(value)
StringValueCStr(value)
rb_str_new2(s)

** defining class/module

 VALUE rb_define_class(const char *name, VALUE super)

Defines a new Ruby class as a subclass of super.

 VALUE rb_define_class_under(VALUE module, const char *name, VALUE super)

Creates a new Ruby class as a subclass of super, under the module's
namespace.

 VALUE rb_define_module(const char *name)

Defines a new Ruby module.

 VALUE rb_define_module_under(VALUE module, const char *name)

Defines a new Ruby module under the module's namespace.

 void rb_include_module(VALUE klass, VALUE module)

Includes module into class.  If class already includes it, just
ignored.

 void rb_extend_object(VALUE object, VALUE module)

Extend the object with the module's attributes.

** Defining Global Variables

 void rb_define_variable(const char *name, VALUE *var)

Defines a global variable which is shared between C and Ruby.  If name
contains a character which is not allowed to be part of the symbol,
it can't be seen from Ruby programs.

 void rb_define_readonly_variable(const char *name, VALUE *var)

Defines a read-only global variable.  Works just like
rb_define_variable(), except the defined variable is read-only.

 void rb_define_virtual_variable(const char *name,
				 VALUE (*getter)(), VALUE (*setter)())

Defines a virtual variable, whose behavior is defined by a pair of C
functions.  The getter function is called when the variable is
referenced.  The setter function is called when the variable is set to a
value.  The prototype for getter/setter functions are:

	VALUE getter(ID id)
	void setter(VALUE val, ID id)

The getter function must return the value for the access.

 void rb_define_hooked_variable(const char *name, VALUE *var,
				VALUE (*getter)(), VALUE (*setter)())

Defines hooked variable.  It's a virtual variable with a C variable.  
The getter is called as

	VALUE getter(ID id, VALUE *var)

returning a new value.  The setter is called as

	void setter(VALUE val, ID id, VALUE *var)

GC requires C global variables which hold Ruby values to be marked.

 void rb_global_variable(VALUE *var)

Tells GC to protect these variables.

** Constant Definition

 void rb_define_const(VALUE klass, const char *name, VALUE val)

Defines a new constant under the class/module.

 void rb_define_global_const(const char *name, VALUE val)

Defines a global constant.  This is just the same as

     rb_define_const(cKernal, name, val)

** Method Definition

 rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc)

Defines a method for the class.  func is the function pointer.  argc
is the number of arguments.  if argc is -1, the function will receive
3 arguments: argc, argv, and self.  if argc is -2, the function will
receive 2 arguments, self and args, where args is a Ruby array of
the method arguments.

 rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc)

Defines a private method for the class.  Arguments are same as
rb_define_method().

 rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc)

Defines a singleton method.  Arguments are same as rb_define_method().

 rb_scan_args(int argc, VALUE *argv, const char *fmt, ...)

Retrieve argument from argc, argv.  The fmt is the format string for
the arguments, such as "12" for 1 non-optional argument, 2 optional
arguments.  If `*' appears at the end of fmt, it means the rest of
the arguments are assigned to the corresponding variable, packed in
an array.

** Invoking Ruby method

 VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)

Invokes a method.  To retrieve mid from a method name, use rb_intern().

 VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)

Invokes a method, passing arguments by an array of values.

 VALUE rb_eval_string(const char *str)

Compiles and executes the string as a Ruby program.

 ID rb_intern(const char *name)

Returns ID corresponding to the name.

 char *rb_id2name(ID id)

Returns the name corresponding ID.

 char *rb_class2name(VALUE klass)

Returns the name of the class.

 int rb_respond_to(VALUE object, ID id)

Returns true if the object responds to the message specified by id.

** Instance Variables

 VALUE rb_iv_get(VALUE obj, const char *name)

Retrieve the value of the instance variable.  If the name is not
prefixed by `@', that variable shall be inaccessible from Ruby.

 VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)

Sets the value of the instance variable.

** Control Structure

 VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2)

Calls the function func1, supplying func2 as the block.  func1 will be
called with the argument arg1.  func2 receives the value from yield as
the first argument, arg2 as the second argument.
 
 VALUE rb_yield(VALUE val)

Evaluates the block with value val.

 VALUE rb_rescue(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2)

Calls the function func1, with arg1 as the argument.  If an exception
occurs during func1, it calls func2 with arg2 as the argument.  The
return value of rb_rescue() is the return value from func1 if no
exception occurs, from func2 otherwise.

 VALUE rb_ensure(VALUE (*func1)(), void *arg1, void (*func2)(), void *arg2)

Calls the function func1 with arg1 as the argument, then calls func2
with arg2 if execution terminated.  The return value from
rb_ensure() is that of func1.

** Exceptions and Errors

 void rb_warn(const char *fmt, ...)

Prints a warning message according to a printf-like format.

 void rb_warning(const char *fmt, ...)

Prints a warning message according to a printf-like format, if
$VERBOSE is true.

void rb_raise(rb_eRuntimeError, const char *fmt, ...)

Raises RuntimeError.  The fmt is a format string just like printf().

 void rb_raise(VALUE exception, const char *fmt, ...)

Raises a class exception.  The fmt is a format string just like printf().

 void rb_fatal(const char *fmt, ...)

Raises a fatal error, terminates the interpreter.  No exception handling
will be done for fatal errors, but ensure blocks will be executed.

 void rb_bug(const char *fmt, ...)

Terminates the interpreter immediately.  This function should be
called under the situation caused by the bug in the interpreter.  No
exception handling nor ensure execution will be done.

** Initialize and Start the Interpreter

The embedding API functions are below (not needed for extension libraries):

 void ruby_init()

Initializes the interpreter.

 void ruby_options(int argc, char **argv)

Process command line arguments for the interpreter.

 void ruby_run()

Starts execution of the interpreter.

 void ruby_script(char *name)

Specifies the name of the script ($0).

** Hooks for the Interpreter Events

 void rb_add_event_hook(rb_event_hook_func_t func, rb_event_t events)

Adds a hook function for the specified interpreter events.
events should be Or'ed value of:

	RUBY_EVENT_LINE
	RUBY_EVENT_CLASS
	RUBY_EVENT_END
	RUBY_EVENT_CALL
	RUBY_EVENT_RETURN
	RUBY_EVENT_C_CALL
	RUBY_EVENT_C_RETURN
	RUBY_EVENT_RAISE
	RUBY_EVENT_ALL

The definition of rb_event_hook_func_t is below:

 typedef void (*rb_event_hook_func_t)(rb_event_t event, NODE *node,
 				      VALUE self, ID id, VALUE klass)

 int rb_remove_event_hook(rb_event_hook_func_t func)

Removes the specified hook function.

Appendix C. Functions Available in extconf.rb

These functions are available in extconf.rb:

 have_macro(macro, headers)

Checks whether macro is defined with header.  Returns true if the macro
is defined.

 have_library(lib, func)

Checks whether the library exists, containing the specified function.
Returns true if the library exists.

 find_library(lib, func, path...)

Checks whether a library which contains the specified function exists in
path.  Returns true if the library exists.

 have_func(func, header)

Checks whether func exists with header.  Returns true if the function
exists.  To check functions in an additional library, you need to
check that library first using have_library().

 have_var(var, header)

Checks whether var exists with header.  Returns true if the variable
exists.  To check variables in an additional library, you need to
check that library first using have_library().

 have_header(header)

Checks whether header exists.  Returns true if the header file exists.

 find_header(header, path...)

Checks whether header exists in path.  Returns true if the header file
exists.

 have_struct_member(type, member, header)

Checks whether type has member with header.  Returns true if the type
is defined and has the member.

 have_type(type, header, opt)

Checks whether type is defined with header.  Returns true if the type
is defined.

 check_sizeof(type, header)

Checks the size of type in char with header.  Returns the size if the
type is defined, otherwise nil.

 create_makefile(target)

Generates the Makefile for the extension library.  If you don't invoke
this method, the compilation will not be done.

 find_executable(bin, path)

Finds command in path, which is File::PATH_SEPARATOR-separated list of
directories.  If path is nil or omitted, environment varialbe PATH
will be used.  Returns the path name of the command if it is found,
otherwise nil.

 with_config(withval[, default=nil])

Parses the command line options and returns the value specified by
--with-<withval>.

 enable_config(config, *defaults)
 disable_config(config, *defaults)

Parses the command line options for boolean.  Returns true if
--enable-<config> is given, or false if --disable-<config> is given.
Otherwise, yields defaults to the given block and returns the result
if it is called with a block, or returns defaults.

 dir_config(target[, default_dir])
 dir_config(target[, default_include, default_lib])

Parses the command line options and adds the directories specified by
--with-<target>-dir, --with-<target>-include, and/or --with-<target>-lib
to $CFLAGS and/or $LDFLAGS.  --with-<target>-dir=/path is equivalent to
--with-<target>-include=/path/include --with-<target>-lib=/path/lib.
Returns an array of the added directories ([include_dir, lib_dir]).

 pkg_config(pkg)

Obtains the information for pkg by pkg-config command.  The actual
command name can be overriden by --with-pkg-config command line
option.

/*
 * Local variables:
 * fill-column: 70
 * end:
 */
doc/alt-ruby18/LEGAL000064400000042117150403614130007772 0ustar00LEGAL NOTICE INFORMATION
------------------------

All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.

regex.[ch]:

  These files are under LGPL.  Treat them as LGPL says. (See the file
  LGPL for details)

    Extended regular expression matching and search library.
    Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc.

    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.

    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with the GNU C Library; see the file LGPL.  If not,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */

    Multi-byte extension added May, 1993 by t^2 (Takahiro Tanimoto)
    Last change: May 21, 1993 by t^2
    removed gapped buffer support, multiple syntax support by matz <matz@nts.co.jp>
    Perl5 extension added by matz <matz@caelum.co.jp>
    UTF-8 extension added Jan 16 1999 by Yoshida Masato  <yoshidam@tau.bekkoame.ne.jp>

configure:

  This file is free software.

    Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.

    This configure script is free software; the Free Software Foundation
    gives unlimited permission to copy, distribute and modify it.

config.guess:
config.sub:

  As long as you distribute these files with the file configure, they
  are covered under the Ruby's license.

      Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
      Free Software Foundation, Inc.

    This file is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

    As a special exception to the GNU General Public License, if you
    distribute this file as part of a program that contains a
    configuration script generated by Autoconf, you may include it under
    the same distribution terms that you use for the rest of that program.

parse.c:

  This file is licensed under the GPL, but is incorporated into Ruby and 
  redistributed under the terms of the Ruby license, as permitted by the
  exception to the GPL below.

     Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
     Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2, or (at your option)
     any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor,
     Boston, MA 02110-1301, USA.  */

  /* As a special exception, you may create a larger work that contains
     part or all of the Bison parser skeleton and distribute that work
     under terms of your choice, so long as that work isn't itself a
     parser generator using the skeleton or a modified version thereof
     as a parser skeleton.  Alternatively, if you modify or redistribute
     the parser skeleton itself, you may (at your option) remove this
     special exception, which will cause the skeleton and the resulting
     Bison output files to be licensed under the GNU General Public
     License without this special exception.

     This special exception was added by the Free Software Foundation in
     version 2.2 of Bison.  */

util.c (partly):
win32/win32.[ch]:

  You can apply the Artistic License to these files. (or GPL,
  alternatively)

    Copyright (c) 1993, Intergraph Corporation

    You may distribute under the terms of either the GNU General Public
    License or the Artistic License, as specified in the perl README file.

random.c

  This file is under the new-style BSD license.

    A C-program for MT19937, with initialization improved 2002/2/10.
    Coded by Takuji Nishimura and Makoto Matsumoto.
    This is a faster version by taking Shawn Cokus's optimization,
    Matthe Bellew's simplification, Isaku Wada's real version.

    Before using, initialize the state by using init_genrand(seed) 
    or init_by_array(init_key, key_length).

    Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
    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.

      3. The names of its contributors may not be used to endorse or promote 
	 products derived from this software without specific prior written 
	 permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.


    Any feedback is very welcome.
    http://www.math.keio.ac.jp/matumoto/emt.html
    email: matumoto@math.keio.ac.jp

st.[ch]:
x68/*:
missing/alloca.c:
missing/dup2.c:
missing/finite.c:
missing/hypot.c:
missing/isinf.c:
missing/isnan.c:
missing/memcmp.c:
missing/memmove.c:
missing/strcasecmp.c:
missing/strchr.c:
missing/streror.c:
missing/strftime.c:
missing/strncasecmp.c:
missing/strstr.c:
missing/strtol.c:
ext/digest/sha1/sha1.[ch]:

  These files are all under public domain.

missing/strtod.c:

  This file will not be used on most platforms depending on how the
  configure script results.  In any case you must not receive any fee
  with the file itself.

    Copyright (c) 1988-1993 The Regents of the University of California.
    Copyright (c) 1994 Sun Microsystems, Inc.

    Permission to use, copy, modify, and distribute this
    software and its documentation for any purpose and without
    fee is hereby granted, provided that the above copyright
    notice appear in all copies.  The University of California
    makes no representations about the suitability of this
    software for any purpose.  It is provided "as is" without
    express or implied warranty.

missing/strtoul.c:

  This file will not be used on most platforms depending on how the
  configure script results.  In any case you must not receive any fee
  with the file itself.

    Copyright 1988 Regents of the University of California

    Permission to use, copy, modify, and distribute this
    software and its documentation for any purpose and without
    fee is hereby granted, provided that the above copyright
    notice appear in all copies.  The University of California
    makes no representations about the suitability of this
    software for any purpose.  It is provided "as is" without
    express or implied warranty.

missing/erf.c:
missing/crypt.c:
missing/vsnprintf.c:

  This file is under the old-style BSD license.  Note that the
  paragraph 3 below is now null and void.

    Copyright (c) 1990, 1993
         The Regents of the University of California.  All rights reserved.

    This code is derived from software contributed to Berkeley by
    Chris Torek.

    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.
    3. Neither the name of the University nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

    IMPORTANT NOTE:
    --------------
    From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
    paragraph 3 above is now null and void.

ext/digest/md5/md5.[ch]:

  These files are under the following license.  Ruby uses modified
  versions of them.

    Copyright (C) 1999, 2000 Aladdin Enterprises.  All rights reserved.

    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any damages
    arising from the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
       claim that you wrote the original software. If you use this software
       in a product, an acknowledgment in the product documentation would be
       appreciated but is not required.
    2. Altered source versions must be plainly marked as such, and must not be
       misrepresented as being the original software.
    3. This notice may not be removed or altered from any source distribution.

    L. Peter Deutsch
    ghost@aladdin.com

ext/digest/rmd160/rmd160.[ch]:

  These files have the following copyright information, and by the
  author we are allowed to use it under the new-style BSD license.

    AUTHOR:   Antoon Bosselaers, ESAT-COSIC
              (Arranged for libc by Todd C. Miller)
    DATE:     1 March 1996

    Copyright (c) Katholieke Universiteit Leuven
    1996, All Rights Reserved

ext/digest/rmd160/rmd160hl.c:
ext/digest/sha1/sha1hl.c:

  These files are under the beer-ware license.

    "THE BEER-WARE LICENSE" (Revision 42):
    <phk@login.dkuug.dk> wrote this file.  As long as you retain this notice you
    can do whatever you want with this stuff. If we meet some day, and you think
    this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp

ext/digest/sha2/sha2.[ch]:
ext/digest/sha2/sha2hl.c:

  These files are under the new-style BSD license.

    Copyright 2000 Aaron D. Gifford.  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.
    3. Neither the name of the copyright holder nor the names of contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``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(S) OR CONTRIBUTOR(S) 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.

ext/nkf/nkf-utf8/config.h:
ext/nkf/nkf-utf8/nkf.c:
ext/nkf/nkf-utf8/utf8tbl.c:

  These files are under the following license.  So to speak, it is
  copyrighted semi-public-domain software.

    Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
       Everyone is permitted to do anything on this program 
       including copying, modifying, improving,
       as long as you don't try to pretend that you wrote it.
       i.e., the above copyright notice has to appear in all copies.
       Binary distribution requires original version messages.
       You don't have to ask before copying, redistribution or publishing.
       THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.

ext/socket/addrinfo.h:
ext/socket/getaddrinfo.c:
ext/socket/getnameinfo.c:

  These files are under the new-style BSD license.

    Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
    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.
    3. Neither the name of the project nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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.

ext/win32ole/win32ole.c:

  You can apply the Artistic License to this file. (or GPL,
  alternatively)

    (c) 1995 Microsoft Corporation. All rights reserved.
    Developed by ActiveWare Internet Corp., http://www.ActiveWare.com

    Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
    <gsar@umich.edu> and Jan Dubois <jan.dubois@ibm.net>
 
    You may distribute under the terms of either the GNU General Public
    License or the Artistic License, as specified in the README file
    of the Perl distribution.
doc/alt-ruby18/README.EXT.ja000064400000105065150403614130011135 0ustar00.\" README.EXT.ja -  -*- Text -*- created at: Mon Aug  7 16:45:54 JST 1995

Ruby�γ�ĥ�饤�֥��κ����������ޤ���

1������μ�

C���ѿ�ˤϷ������ꡤ�ǡ����ˤϷ�������ޤ��󡥤Ǥ����顤��
�Ȥ��Хݥ��󥿤�int���ѿ���������ȡ������ͤ����Ȥ��Ƽ�
�갷���ޤ����դ�Ruby���ѿ�ˤϷ����ʤ����ǡ����˷��������
�������ΰ㤤�Τ��ᡤC��Ruby���ߤ��Ѵ����ʤ���С����ߤ���
�ǡ����򥢥������Ǥ��ޤ���

Ruby�Υǡ�����VALUE�Ȥ���C�η���ɽ������ޤ���VALUE���Υǡ�
���Ϥ��Υǡ��������פ�ʬ���ΤäƤ��ޤ������Υǡ��������פ�
�����Τϥǡ���(���֥�������)�μºݤι�¤���̣���Ƥ��ơ�Ruby
�Υ��饹�ȤϤޤ���ä���ΤǤ���

VALUE����C�ˤȤäư�̣�Τ���ǡ�������Ф�����ˤ�

 (1) VALUE�Υǡ��������פ��Τ�
 (2) VALUE��C�Υǡ������Ѵ�����

��ξ���ɬ�פǤ���(1)��˺���ȴְ�ä��ǡ������Ѵ����Ԥ��
�ơ��ǰ��ץ���बcore dump���ޤ���

1.1 �ǡ���������

Ruby�ˤϥ桼�����Ȥ���ǽ���Τ���ʲ��Υ����פ�����ޤ���

	T_NIL		nil
	T_OBJECT	�̾�Υ��֥�������
	T_CLASS		���饹
	T_MODULE	�⥸�塼��
	T_FLOAT		��ư�������
	T_STRING	ʸ����
	T_REGEXP	����ɽ��
	T_ARRAY		����
	T_FIXNUM	Fixnum(31bit����)
	T_HASH		Ϣ������
	T_STRUCT	(Ruby��)��¤��
	T_BIGNUM	¿��Ĺ����
	T_FILE		�����
	T_TRUE		��
	T_FALSE		��
	T_DATA		�ǡ���
	T_SYMBOL	����ܥ�

����¾���������Ѥ���Ƥ���ʲ��Υ����פ�����ޤ���

	T_ICLASS
	T_MATCH
	T_UNDEF
	T_VARMAP
	T_SCOPE
	T_NODE

�ۤȤ�ɤΥ����פ�C�ι�¤�ΤǼ������Ƥ��ޤ���

1.2 VALUE�Υǡ��������פ���å�����

ruby.h�Ǥ�TYPE()�Ȥ����ޥ���������Ƥ��ơ�VALUE�Υǡ���
�����פ��Τ뤳�Ȥ�����ޤ���TYPE()�ޥ���Ͼ�ǾҲ𤷤�T_XXXX
�η����������֤��ޤ���VALUE�Υǡ��������פ˱����ƽ������
���ˤϡ�TYPE()���ͤ�ʬ��뤳�Ȥˤʤ�ޤ���

  switch (TYPE(obj)) {
    case T_FIXNUM:
      /* FIXNUM�� */
      break;
    case T_STRING:
      /* ʸ����ν�� */
      break;
    case T_ARRAY:
      /* ����� */
      break;
    default:
      /* �㳰��ȯ�������� */
      rb_raise(rb_eTypeError, "not valid value");
      break;
  }

����ȥǡ��������פ���å����ơ��������ʤ�����㳰��ȯ����
��ؿ��Ѱդ���Ƥ��ޤ���

  void Check_Type(VALUE value, int type)

���δؿ��value��type��̵����С��㳰��ȯ�������ޤ��������
����Ϳ����줿VALUE�Υǡ��������פ����������ɤ��������å���
�뤿��ˤϡ����δؿ��Ȥ��ޤ���

FIXNUM��NIL�˴ؤ��ƤϤ���®��Ƚ�̥ޥ����Ѱդ���Ƥ��ޤ���

  FIXNUM_P(obj)
  NIL_P(obj)

1.3 VALUE��C�Υǡ������Ѵ�����

�ǡ��������פ�T_NIL, T_FALSE, T_TRUE�Ǥ������ǡ����Ϥ��줾
��nil, false, true�Ǥ������Υǡ��������פΥ��֥������ȤϤҤ�
�Ĥ��Ĥ���¸�ߤ��ޤ���

�ǡ��������פ�T_FIXNUM�λ��������31bit�Υ������������
����FIXNUM��C�������Ѵ����뤿��ˤϥޥ����FIX2INT()�פ��
���ޤ������줫�顤FIXNUM�˸¤餺Ruby�Υǡ��������Ѵ�����
��NUM2INT()�פȤ����ޥ�������ޤ������Υޥ���ϥǡ�������
�פΥ����å�̵���ǻȤ��ޤ�(������Ѵ��Ǥ��ʤ����ˤ��㳰��
ȯ������)��Ʊ�ͤ˥����å�̵���ǻȤ����Ѵ��ޥ����double��
���Ф���NUM2DBL()�פ�����ޤ���

char* ����Ф���硢version 1.6 ����Ǥϡ�STR2CSTR()�פ�
�����ޥ����ȤäƤ��ޤ������������ to_str() �ˤ����ۤ�
���Ѵ���̤� GC ������ǽ�������뤿�ᡢversion 1.7 �ʹߤǤ�
obsolete �Ȥʤꡢ����� StringValue() �� StringValuePtr()
��Ȥ�����侩���Ƥ��ޤ���StringValue(var) �� var �� String
 �Ǥ���в��⤻���������Ǥʤ���� var �� var.to_str() �η�̤�
�֤�������ޥ���StringValuePtr(var) ��Ʊ�ͤ� var ���֤�����
�Ƥ��� var ��ʸ����ɽ�����Ф��� char* ���֤��ޥ���Ǥ���var ��
���Ƥ�ľ���֤��������������Τǡ�var �� lvalue �Ǥ���ɬ�פ�
����ޤ���

����ʳ��Υǡ��������פ��б�����C�ι�¤�Τ�����ޤ����б���
�빽¤�ΤΤ���VALUE�Ϥ��Τޤޥ��㥹��(���Ѵ�)����й�¤�Τ�
�ݥ��󥿤��Ѵ��Ǥ��ޤ���

��¤�Τϡ�struct RXxxxx�פȤ���̾����ruby.h��������Ƥ���
�����㤨��ʸ����ϡ�struct RString�פǤ����ºݤ˻Ȥ���ǽ����
����Τ�ʸ��������󤯤餤���Ȼפ��ޤ���

ruby.h�ǤϹ�¤�Τإ��㥹�Ȥ���ޥ�����RXXXXX()��(������ʸ
���ˤ������)�Ȥ���̾�����󶡤���Ƥ��ޤ�(��: RSTRING())��

�㤨�С�ʸ����str��Ĺ������뤿��ˤϡ�RSTRING(str)->len�פ�
����ʸ����str��char*�Ȥ�����뤿��ˤϡ�RSTRING(str)->ptr��
�Ȥ��ޤ�������ξ��ˤϡ����줾���RARRAY(ary)->len�ס�
��RARRAY(ary)->ptr�פȤʤ�ޤ���

Ruby�ι�¤�Τ�ľ�ܥ������������˵���Ĥ��ʤ���Фʤ�ʤ���
�Ȥϡ������ʸ����ι�¤�Τ���Ȥϻ��Ȥ������ǡ�ľ���ѹ���
�ʤ����ȤǤ���ľ���ѹ�������硤���֥������Ȥ����Ƥ������
�Ȥ�ʤ��ʤäơ��פ�̥Х��θ����ˤʤ�ޤ���

1.4 C�Υǡ�����VALUE���Ѵ�����

VALUE�μºݤι�¤��

  * FIXNUM��

    1bit�����եȤ��ơ�LSB��Ω�Ƥ롥

  * ����¾�Υݥ��󥿤ξ��

    ���Τޤ�VALUE�˥��㥹�Ȥ��롥

�ȤʤäƤ��ޤ�����äơ�LSB����å������VALUE��FIXNUM����
�����狼��櫓�Ǥ�(�ݥ��󥿤�LSB��Ω�äƤ��ʤ����Ȥ��ꤷ��
����)��

�Ǥ����顤FIXNUM�ʳ���Ruby�Υ��֥������Ȥι�¤�Τ�ñ��VALUE
�˥��㥹�Ȥ�������VALUE���Ѵ�����ޤ�����������Ǥ�դι�¤
�Τ�VALUE�˥��㥹�Ƚ����櫓�ǤϤ���ޤ��󡥥��㥹�Ȥ����
��Ruby���ΤäƤ��빽¤��(ruby.h��������Ƥ���struct RXxxx
�Τ��)�����Ǥ���

FIXNUM�˴ؤ��Ƥ��Ѵ��ޥ�����ͳ����ɬ�פ�����ޤ���C�����
����VALUE���Ѵ�����ޥ���ϰʲ��Τ�Τ�����ޤ���ɬ�פ˱���
�ƻȤ�ʬ���Ƥ���������

  INT2FIX()	��Ȥ����31bit����˼��ޤ뼫��������
  INT2NUM()	Ǥ�դ�����VALUE��

INT2NUM()�����FIXNUM���ϰϤ˼��ޤ�ʤ���硤Bignum���Ѵ�
���Ƥ���ޤ�(���������٤�)��

1.5 Ruby�Υǡ��������

�����Ҥ٤��̤ꡤRuby�ι�¤�Τ򥢥��������������Ƥι�����
�Ԥ����Ȥϴ�����ޤ��󡥤ǡ�Ruby�Υǡ���������ˤ�
Ruby���Ѱդ��Ƥ���ؿ���Ѥ��Ƥ���������

�����ǤϤ�äȤ�Ȥ���Ǥ���ʸ�������������/�����
���ؿ�򤢤��ޤ�(����ǤϤʤ��Ǥ�)��

 ʸ������Ф���ؿ�

  rb_str_new(const char *ptr, long len)

    ������Ruby��ʸ���������롥

  rb_str_new2(const char *ptr)

    C��ʸ���󤫤�Ruby��ʸ���������롥���δؿ�ε�ǽ��
    rb_str_new(ptr, strlen(ptr))��Ʊ��Ǥ��롥

  rb_tainted_str_new(const char *ptr, long len)

    �����ޡ������ղä��줿������Ruby��ʸ���������롥����
    ����Υǡ����˴�Ť�ʸ����ˤϱ����ޡ������ղä����٤�
    �Ǥ��롥

  rb_tainted_str_new2(const char *ptr)

    C��ʸ���󤫤����ޡ������ղä��줿Ruby��ʸ���������롥

  rb_str_cat(VALUE str, const char *ptr, long len)

    Ruby��ʸ����str��len�Х��Ȥ�ʸ����ptr���ɲä��롥

 ������Ф���ؿ�

  rb_ary_new()

    ��Ǥ�0�����������롥

  rb_ary_new2(long len)

    ��Ǥ�0�����������롥len���ʬ���ΰ�򤢤餫������
    ��ƤƤ�����

  rb_ary_new3(long n, ...)

    ����ǻ��ꤷ��n��Ǥ�ޤ����������롥

  rb_ary_new4(long n, VALUE *elts)

    �����Ϳ����n��Ǥ����������롥

  rb_ary_push(VALUE ary, VALUE val)
  rb_ary_pop(VALUE ary)
  rb_ary_shift(VALUE ary)
  rb_ary_unshift(VALUE ary, VALUE val)

    Array��Ʊ̾�Υ᥽�åɤ�Ʊ��Ư���򤹤�ؿ���1�����ɬ��
    ����Ǥʤ���Фʤ�ʤ���

2��Ruby�ε�ǽ��Ȥ�

���Ū��Ruby�ǽ񤱤뤳�Ȥ�C�Ǥ�񤱤ޤ���Ruby���Τ�Τ�C�ǵ�
�Ҥ���Ƥ����Ǥ����顤����Ȥ���������ʤ�Ǥ����ɡ�������
��Ruby�γ�ĥ�˻Ȥ����Ȥ�¿��������ͽ¬����뵡ǽ���濴�˾�
�𤷤ޤ���

2.1 Ruby�˵�ǽ���ɲä���

Ruby���󶡤���Ƥ���ؿ��Ȥ���Ruby���󥿥ץ꥿�˿�������ǽ
���ɲä��뤳�Ȥ��Ǥ��ޤ���Ruby�Ǥϰʲ��ε�ǽ���ɲä���ؿ�
�󶡤���Ƥ��ޤ���

 * ���饹���⥸�塼��
 * �᥽�åɡ��ðۥ᥽�åɤʤ�
 * ���

�ǤϽ�˾Ҳ𤷤ޤ���

2.1.1 ���饹/�⥸�塼����

���饹��⥸�塼��������뤿��ˤϡ��ʲ��δؿ��Ȥ��ޤ���

  VALUE rb_define_class(const char *name, VALUE super)
  VALUE rb_define_module(const char *name)

�����δؿ�Ͽ����������줿���饹��⥸�塼����֤��ޤ���
�᥽�åɤ��������ˤ������ͤ�ɬ�פʤΤǡ��ۤȤ�ɤξ��
������ͤ��ѿ�˳�Ǽ���Ƥ���ɬ�פ�����Ǥ��礦��

���饹��⥸�塼���¾�Υ��饹������˥ͥ��Ȥ�����������
�ϰʲ��δؿ��Ȥ��ޤ���

  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
  VALUE rb_define_module_under(VALUE outer, const char *name)

2.1.2 �᥽�å�/�ðۥ᥽�å���

�᥽�åɤ��ðۥ᥽�åɤ�������ˤϰʲ��δؿ��Ȥ��ޤ���

  void rb_define_method(VALUE klass, const char *name, 
		        VALUE (*func)(), int argc)

  void rb_define_singleton_method(VALUE object, const char *name, 
			          VALUE (*func)(), int argc)


ǰ�Τ���������ȡ��ðۥ᥽�åɡפȤϡ���������Υ��֥�����
�Ȥ��Ф��Ƥ���ͭ���ʥ᥽�åɤǤ���Ruby�ǤϤ褯Smalltalk�ˤ�
���륯�饹�᥽�åɤȤ��ơ����饹���Ф����ðۥ᥽�åɤ��Ȥ��
�ޤ���

�����δؿ�� argc�Ȥ��������C�δؿ���Ϥ������ο�(��
����)����ޤ���argc��0�ʾ�λ��ϴؿ�˰����Ϥ�����ο���
̣���ޤ���16�İʾ�ΰ���ϻȤ��ޤ���(�����פ�ޤ����͡���
��ʤ�)���ºݤδؿ�ˤ��Ƭ�ΰ���Ȥ���self��Ϳ�����ޤ���
�ǡ����ꤷ������1¿�������Ĥ��Ȥˤʤ�ޤ���

argc����λ��ϰ���ο�ǤϤʤ�����������ꤷ�����Ȥˤʤ�ޤ���
argc��-1�λ��ϰ��������������Ϥ���ޤ���argc��-2�λ��ϰ�
���Ruby������Ȥ����Ϥ���ޤ���

�᥽�åɤ�������ؿ�Ϥ⤦��Ĥ���ޤ����ҤȤĤ�private��
���åɤ�������ؿ�ǡ������rb_define_method()��Ʊ���Ǥ���

  void rb_define_private_method(VALUE klass, const char *name, 
				VALUE (*func)(), int argc)

private�᥽�åɤȤϴؿ���Ǥ����ƤӽФ����Ȥν���ʤ��᥽��
�ɤǤ���

�⤦�ҤȤĤϥ⥸�塼��ؿ���������ΤǤ����⥸�塼��ؿ�
�Ȥϥ⥸�塼����ðۥ᥽�åɤǤ��ꡤƱ����private�᥽�åɤ�
�⤢���ΤǤ�����򤢤����Math�⥸�塼���sqrt()�ʤɤ�����
���ޤ������Υ᥽�åɤ�

  Math.sqrt(4)

�Ȥ��������Ǥ�

  include Math
  sqrt(4)

�Ȥ��������Ǥ�Ȥ��ޤ����⥸�塼��ؿ��������ؿ�ϰʲ���
�̤�Ǥ���

  void rb_define_module_function(VALUE module, const char *name, 
		                 VALUE (*func)(), int argc)

�ؿ�Ū�᥽�å�(Kernel�⥸�塼���private method)�������뤿
��δؿ�ϰʲ����̤�Ǥ���

  void rb_define_global_function(const char *name, VALUE (*func)(), int argc)


�᥽�åɤ���̾�������뤿��δؿ�ϰʲ����̤�Ǥ���

  void rb_define_alias(VALUE module, const char* new, const char* old);

���饹�᥽�å�allocate����������������ꤹ�뤿��δؿ��
�ʲ����̤�Ǥ���

  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
  void rb_undef_alloc_func(VALUE klass);

func�ϥ��饹���Ȥ��Ƽ�����äơ������������Ƥ�줿����
�����󥹤��֤��ʤ��ƤϤʤ�ޤ��󡣤��Υ��󥹥��󥹤ϡ������
�������ʤɤ�ޤޤʤ����Ǥ������ֶ��פΤޤޤˤ��Ƥ������ۤ�
���褤�Ǥ��礦��

2.1.3 �����

��ĥ�饤�֥�꤬ɬ�פ����Ϥ��餫���������Ƥ���������ɤ�
�Ǥ��礦������������ؿ����Ĥ���ޤ���

  void rb_define_const(VALUE klass, const char *name, VALUE val)
  void rb_define_global_const(const char *name, VALUE val)

���Ԥ�����Υ��饹/�⥸�塼���°���������������Ρ���
�Ԥϥ����Х�������������ΤǤ���

2.2 Ruby�ε�ǽ��C����ƤӽФ�

���ˡ�1.5 Ruby�Υǡ��������٤ǰ���Ҳ𤷤��褦�ʴؿ��
�Ȥ��С�Ruby�ε�ǽ��¸����Ƥ���ؿ��ľ�ܸƤӽФ����Ȥ�����
�ޤ���

# ���Τ褦�ʴؿ�ΰ��ɽ�Ϥ��ޤΤȤ�����ޤ��󡥥�������
# �뤷���ʤ��Ǥ��͡�

����ʳ��ˤ�Ruby�ε�ǽ��ƤӽФ��ˡ�Ϥ����Ĥ�����ޤ���

2.2.1 Ruby�Υץ�����eval����

C����Ruby�ε�ǽ��ƤӽФ���äȤ��ñ���ˡ�Ȥ��ơ�ʸ�����
Ϳ����줿Ruby�Υץ�����ɾ������ʲ��δؿ����ޤ���

  VALUE rb_eval_string(const char *str)

����ɾ���ϸ��ߤδĶ��ǹԤ��ޤ����Ĥޤꡤ���ߤΥ������ѿ�
�ʤɤ���Ѥ��ޤ���

2.2.2 ID�ޤ��ϥ���ܥ�

C����ʸ������ͳ������Ruby�Υ᥽�åɤ�ƤӽФ����Ȥ�Ǥ���
����������ˡ�Ruby���󥿥ץ꥿��ǥ᥽�åɤ��ѿ�̾����ꤹ��
���˻Ȥ��Ƥ���ID�ˤĤ��������Ƥ����ޤ��礦��

ID�Ȥ��ѿ�̾���᥽�å�̾��ɽ������Ǥ���Ruby�Ǥ�ID���б�����
���֥������ȤȤ��ƥ���ܥ�(Symbol)�����ꡤ

 :���̻�

�ǥ��������Ǥ��ޤ���C���餳��������뤿��ˤϴؿ�

  rb_intern(const char *name)

��Ȥ��ޤ���Ruby������Ȥ���Ϳ����줿����ܥ�(�ޤ���ʸ��
��)��ID���Ѵ�����ˤϰʲ��δؿ��Ȥ��ޤ���

  rb_to_id(VALUE symbol)

ID���饷��ܥ����뤿��ˤϰʲ��Υޥ����Ȥ��ޤ���

  VALUE ID2SYM(ID id)

����ܥ뤫��ID����뤿��ˤϰʲ��Υޥ����Ȥ��ޤ���

  ID SYM2ID(VALUE symbol)

2.2.3 C����Ruby�Υ᥽�åɤ�ƤӽФ�

C����ʸ������ͳ������Ruby�Υ᥽�åɤ�ƤӽФ�����ˤϰʲ�
�δؿ��Ȥ��ޤ���

  VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)

���δؿ�ϥ��֥�������recv��mid�ǻ��ꤵ���᥽�åɤ�Ƥӽ�
���ޤ�������¾�˰���λ���λ�����㤦�ʲ��δؿ�⤢��ޤ���

  VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
  VALUE rb_apply(VALUE recv, ID mid, VALUE args)

apply�ˤϰ���Ȥ���Ruby�������Ϳ���ޤ���

2.2.4 �ѿ�/���򻲾�/��������

C����ؿ��Ȥäƻ��ȡ������Ǥ���Τϡ������󥹥�����
��Ǥ�������ѿ�ϰ���Τ�Τ�C������ѿ�Ȥ��ƥ��������Ǥ�
�ޤ����������ѿ�򻲾Ȥ����ˡ�ϸ������Ƥ��ޤ���

���֥������ȤΥ��󥹥����ѿ�򻲾ȡ���������ؿ�ϰʲ�����
��Ǥ���

  VALUE rb_ivar_get(VALUE obj, ID id)
  VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)

id��rb_intern()��������Τ�ȤäƤ���������

���򻲾Ȥ���ˤϰʲ��δؿ��ȤäƤ���������

  VALUE rb_const_get(VALUE obj, ID id)

���򿷤��������뤿��ˤϡ�2.1.3 ������٤ǾҲ�
��Ƥ���ؿ��ȤäƤ���������

3��Ruby��C�Ȥξ���ͭ

C�����Ruby�δ֤Ǿ����ͭ�����ˡ�ˤĤ��Ʋ�⤷�ޤ���

3.1 C���黲�ȤǤ���Ruby�����

�ʲ���Ruby������C�Υ�٥뤫�黲�ȤǤ��ޤ���

  Qtrue
  Qfalse

    �����͡�Qfalse��C����Ǥ⵶�Ȥߤʤ���ޤ�(�Ĥޤ�0)��

  Qnil

    C���줫�鸫����nil�ס�

3.2 C��Ruby�Ƕ�ͭ���������ѿ�

C��Ruby������ѿ��Ȥäƾ����ͭ�Ǥ��ޤ�����ͭ�Ǥ������
�ѿ�ˤϤ����Ĥ��μ��ब����ޤ������Τʤ��Ǥ�äȤ��ɤ��Ȥ�
���Ȼפ���Τ�rb_define_variable()�Ǥ���

  void rb_define_variable(const char *name, VALUE *var)

���δؿ��Ruby��C�ȤǶ�ͭ��������ѿ�������ޤ����ѿ�̾��
`$'�ǻϤޤ�ʤ����ˤϼ�ưŪ���ɲä���ޤ��������ѿ���ͤ���
������ȼ�ưŪ��Ruby���б������ѿ���ͤ��Ѥ��ޤ���

�ޤ�Ruby¦����Ϲ����Ǥ��ʤ��ѿ�⤢��ޤ�������read only��
�ѿ�ϰʲ��δؿ�������ޤ���

  void rb_define_readonly_variable(const char *name, VALUE *var)

������ѿ��¾��hook��Ĥ�������ѿ�����Ǥ��ޤ���hook�դ�
������ѿ�ϰʲ��δؿ���Ѥ��������ޤ���hook�դ�����ѿ��
�ͤλ��Ȥ�����hook�ǹԤ�ɬ�פ�����ޤ���

  void rb_define_hooked_variable(const char *name, VALUE *var,
				 VALUE (*getter)(), void (*setter)())

���δؿ��C�δؿ�ˤ�ä�hook�ΤĤ���줿����ѿ��������
�����ѿ���Ȥ��줿���ˤϴؿ�getter�����ѿ���ͤ����åȤ���
�����ˤϴؿ�setter���ƤФ�롥hook����ꤷ�ʤ�����getter��
setter��0����ꤷ�ޤ���

# getter��setter��0�ʤ��rb_define_variable()��Ʊ���ˤʤ롥

���줫�顤C�δؿ�ˤ�äƼ¸������Ruby������ѿ��������
�ؿ����ޤ���

  void rb_define_virtual_variable(const char *name,
				  VALUE (*getter)(), void (*setter)())

���δؿ�ˤ�ä������줿Ruby������ѿ���Ȥ��줿���ˤ�
getter�����ѿ���ͤ����åȤ��줿���ˤ�setter���ƤФ�ޤ���

getter��setter�λ��ͤϰʲ����̤�Ǥ���

  (*getter)(ID id, void *data, struct global_entry* entry);
  (*setter)(VALUE val, ID id, void *data, struct global_entry* entry);

3.3 C�Υǡ�����Ruby���֥������Ȥˤ���

C������������줿�ǡ���(��¤��)��Ruby�Υ��֥������ȤȤ���
��갷��������礬���ꤨ�ޤ������Τ褦�ʾ��ˤϡ�Data�Ȥ���
Ruby���֥������Ȥ�C�ι�¤��(�ؤΥݥ���)�򤯤�ळ�Ȥ�Ruby
���֥������ȤȤ��Ƽ�갷����褦�ˤʤ�ޤ���

Data���֥������Ȥ�����ƹ�¤�Τ�Ruby���֥������Ȥ˥��ץ���
�����뤿��ˤϡ��ʲ��Υޥ����Ȥ��ޤ���

  Data_Wrap_Struct(klass, mark, free, ptr)

���Υޥ��������ͤ�������줿Data���֥������ȤǤ���

klass�Ϥ���Data���֥������ȤΥ��饹�Ǥ���ptr�ϥ��ץ��벽����
C�ι�¤�ΤؤΥݥ��󥿤Ǥ���mark�Ϥ��ι�¤�Τ�Ruby�Υ��֥���
���Ȥؤλ��Ȥ������˻Ȥ��ؿ�Ǥ������Τ褦�ʻ��Ȥ�ޤޤʤ�
���ˤ�0����ꤷ�ޤ���

# ���Τ褦�ʻ��Ȥϴ�����ޤ���

free�Ϥ��ι�¤�Τ��⤦���פˤʤä����˸ƤФ��ؿ�Ǥ�������
�ؿ�����١������쥯������ƤФ�ޤ������줬-1�ξ��ϡ�ñ
��˳������ޤ���

C�ι�¤�Τγ����Data���֥������Ȥ������Ʊ���˹Ԥ��ޥ����
���ưʲ��Τ�Τ��󶡤���Ƥ��ޤ���

  Data_Make_Struct(klass, type, mark, free, sval)

���Υޥ��������ͤ�������줿Data���֥������ȤǤ���

klass, mark, free��Data_Wrap_Struct��Ʊ��Ư���򤷤ޤ���type
�ϳ����Ƥ�C��¤�Τη��Ǥ��������Ƥ�줿��¤�Τ��ѿ�sval
���������ޤ��������ѿ�η��� (type*) �Ǥ���ɬ�פ�����ޤ���

Data���֥������Ȥ���ݥ��󥿤���Ф��Τϰʲ��Υޥ�����Ѥ�
�ޤ���

  Data_Get_Struct(obj, type, sval)

C�ι�¤�ΤؤΥݥ��󥿤��ѿ�sval���������ޤ���

������Data�λȤ���Ϥ���ä�ʬ����ˤ����Τǡ����������
����򻲾Ȥ��Ƥ���������

4������ - dbm�ѥå���������

�����ޤǤ����ǤȤꤢ������ĥ�饤�֥��Ϻ���Ϥ��Ǥ���
Ruby��ext�ǥ��쥯�ȥ�ˤ��Ǥ˴ޤޤ�Ƥ���dbm�饤�֥������
�����ʳ�Ū�������ޤ���

(1) �ǥ��쥯�ȥ����

  % mkdir ext/dbm

Ruby 1.1�����Ǥ�դΥǥ��쥯�ȥ�ǥ����ʥߥå��饤�֥����
�뤳�Ȥ��Ǥ���褦�ˤʤ�ޤ�����Ruby���Ū�˥�󥯤������
��Ruby��Ÿ�������ǥ��쥯�ȥ�β���ext�ǥ��쥯�ȥ����˳�ĥ
�饤�֥���ѤΥǥ��쥯�ȥ����ɬ�פ�����ޤ���̾����Ŭ���
����ǹ����ޤ���

(2) �߷פ���

�ޤ�������ʤ�Ǥ����ɡ��ɤ�������ǽ��¸����뤫�ɤ����ޤ���
�פ���ɬ�פ�����ޤ����ɤ�ʥ��饹��Ĥ��뤫�����Υ��饹�ˤ�
�ɤ�ʥ᥽�åɤ����뤫�����饹���󶡤������ʤɤˤĤ���߷�
���ޤ���

(3) C�����ɤ��

��ĥ�饤�֥�����ΤȤʤ�C����Υ�������񤭤ޤ���C����Υ���
�����ҤȤĤλ��ˤϡ֥饤�֥��̾.c�פ�֤��ɤ��Ǥ��礦��C
����Υ�������ʣ��ξ��ˤϵդˡ֥饤�֥��̾.c�פȤ����ե�
����̾���򤱤�ɬ�פ�����ޤ������֥������ȥե�����ȥ⥸�塼
�����������Ū����������֥饤�֥��̾.o�פȤ����ե�����
�Ȥ����ͤ��뤫��Ǥ���

Ruby�ϳ�ĥ�饤�֥�����ɤ����ˡ�Init_�饤�֥��̾�פ�
�����ؿ��ưŪ�˼¹Ԥ��ޤ���dbm�饤�֥��ξ���Init_dbm��
�Ǥ������δؿ����ǥ��饹���⥸�塼�롤�᥽�åɡ����ʤɤ�
����Ԥ��ޤ���dbm.c��������Ѥ��ޤ���

--
Init_dbm()
{
    /* DBM���饹�������� */
    cDBM = rb_define_class("DBM", rb_cObject);
    /* DBM��Enumerate�⥸�塼��򥤥󥯥롼�ɤ��� */
    rb_include_module(cDBM, rb_mEnumerable);

    /* DBM���饹�Υ��饹�᥽�å�open(): �����C������Ǽ����� */
    rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);

    /* DBM���饹�Υ᥽�å�close(): ����Ϥʤ� */
    rb_define_method(cDBM, "close", fdbm_close, 0);
    /* DBM���饹�Υ᥽�å�[]: �����1�� */
    rb_define_method(cDBM, "[]", fdbm_fetch, 1);
		:

    /* DBM�ǡ������Ǽ���륤�󥹥����ѿ�̾�Τ����ID */
    id_dbm = rb_intern("dbm");
}
--

DBM�饤�֥���dbm�Υǡ������б����륪�֥������Ȥˤʤ�Ϥ���
�����顤C�������dbm��Ruby������˼����ɬ�פ�����ޤ���


dbm.c�Ǥ�Data_Make_Struct��ʲ��Τ褦�˻ȤäƤ��ޤ���

--
struct dbmdata {
    int  di_size;
    DBM *di_dbm;
};


obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
--

�����Ǥ�dbmstruct��¤�ΤؤΥݥ��󥿤�Data�˥��ץ��벽���Ƥ�
�ޤ���DBM*��ľ�ܥ��ץ��벽���ʤ��Τ�close()�������ν�����
���ƤΤ��ȤǤ���

Data���֥������Ȥ���dbmstruct��¤�ΤΥݥ��󥿤���Ф�����
�˰ʲ��Υޥ����ȤäƤ��ޤ���

--
#define GetDBM(obj, dbmp) {\
    Data_Get_Struct(obj, struct dbmdata, dbmp);\
    if (dbmp->di_dbm == 0) closed_dbm();\
}
--

����ä�ʣ���ʥޥ���Ǥ������פ����dbmdata��¤�ΤΥݥ���
�μ��Ф��ȡ�close����Ƥ��뤫�ɤ����Υ����å���ޤȤ�Ƥ�
�����Ǥ���

DBM���饹�ˤϤ�������᥽�åɤ�����ޤ�����ʬ�ह���3�����
����μ����������ޤ����ҤȤĤϰ���ο����Τ�Τǡ����
���Ƥ�delete�᥽�åɤ�����ޤ���delete�᥽�åɤ������Ƥ���
fdbm_delete()�Ϥ��Τ褦�ˤʤäƤ��ޤ���

--
static VALUE
fdbm_delete(obj, keystr)
    VALUE obj, keystr;
{
	:
}
--

����ο����Υ����פ���1����self����2����ʹߤ��᥽�å�
�ΰ���Ȥʤ�ޤ���

����ο�����Τ�Τ�C������Ǽ������Τ�Ruby������Ǽ���
���ΤȤ�����ޤ���dbm�饤�֥�����ǡ�C������Ǽ�������
��DBM�Υ��饹�᥽�åɤǤ���open()�Ǥ�������������Ƥ����
��fdbm_s_open()�Ϥ����ʤäƤ��ޤ���

--
static VALUE
fdbm_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
	:
    if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
	mode = 0666;		/* default value */
    }
	:
}
--

���Υ����פδؿ����1����Ϳ����줿����ο���2����Ϳ��
��줿�������äƤ�������ˤʤ�ޤ���self����3����Ȥ���Ϳ
�����ޤ���

���������Ϳ����줿������Ϥ��뤿��δؿ�open()�Ǥ�Ȥ�
��Ƥ���rb_scan_args()�Ǥ�����3����˻��ꤷ���ե����ޥåȤ�
��������4�ѿ�ʹߤ˻��ꤷ���ѿ���ͤ�������Ƥ���ޤ�������
�ե����ޥåȤϡ���1ʸ���ܤ���ά�Ǥ��ʤ�����ο���2ʸ���ܤ�
��ά�Ǥ�����ο���3ʸ���ܤ��б������̵꤬�����ޤ�ΰ�
����뤫�ɤ����򼨤�"*"�Ǥ���2ʸ���ܤ�3ʸ���ܤϾ�ά�Ǥ���
����dbm.c����Ǥϡ��ե����ޥåȤ�"11"�Ǥ����顤����Ϻ���1��
�ǡ�2�Ĥޤǵ������Ȥ�����̣�ˤʤ�ޤ�����ά����Ƥ�����
�ѿ���ͤ�nil(C����Υ�٥�Ǥ�Qnil)�ˤʤ�ޤ���

Ruby������ǰ���������Τ�indexes������ޤ�������Ϥ�
���Ǥ���

--
static VALUE
fdbm_indexes(obj, args)
    VALUE obj, args;
{
	:
}
--

��1�����self����2�����Ruby������Ǥ���

** ��ջ���

Ruby�ȶ�ͭ�Ϥ��ʤ���Ruby�Υ��֥������Ȥ��Ǽ�����ǽ���Τ���
C������ѿ�ϰʲ��δؿ��Ȥä�Ruby���󥿥ץ꥿���ѿ��¸��
�򶵤��Ƥ����Ƥ����������Ǥʤ���GC�ǥȥ�֥�򵯤����ޤ���

  void rb_global_variable(VALUE *var)

(4) extconf.rb���Ѱդ���

Makefile������ο����ˤʤ�extconf.rb�Ȥ����ե��������
�ޤ���extconf.rb�ϥ饤�֥��Υ���ѥ����ɬ�פʾ��Υ�����
���ʤɤ�Ԥ����Ȥ���Ū�Ǥ����ޤ���

  require 'mkmf'

��extconf.rb���Ƭ���֤��ޤ���extconf.rb����Ǥϰʲ���Ruby��
���Ȥ����Ȥ�����ޤ���

  have_library(lib, func): �饤�֥���¸�ߥ����å�
  have_func(func, header): �ؿ��¸�ߥ����å�
  have_header(header): �إå��ե������¸�ߥ����å�
  create_makefile(target): Makefile�����

�ʲ����ѿ��Ȥ����Ȥ��Ǥ��ޤ���

  $CFLAGS: ����ѥ������ɲ�Ū�˻��ꤹ��ե饰(-O�ʤ�)
  $CPPFLAGS: �ץ�ץ��å����ɲ�Ū�˻��ꤹ��ե饰(-I��-D�ʤ�)
  $LDFLAGS: ��󥯻����ɲ�Ū�˻��ꤹ��ե饰(-L�ʤ�)
  $objs: ��󥯤���륪�֥������ȥե�����̾�Υꥹ��

���֥������ȥե�����Υꥹ�Ȥϡ��̾�ϥ������ե�����򸡺���
�Ƽ�ưŪ���������ޤ�����make������ǥ������������褦��
�������Ū�˻��ꤹ��ɬ�פ�����ޤ���

�饤�֥��򥳥�ѥ��뤹���郎·�鷺�����Υ饤�֥��򥳥�
�ѥ��뤷�ʤ����ˤ�create_makefile��ƤФʤ����Makefile���
�����줺������ѥ����Ԥ��ޤ���

(5) depend���Ѱդ���

�⤷���ǥ��쥯�ȥ��depend�Ȥ����ե����뤬¸�ߤ���С�
Makefile����¸�ط�����å����Ƥ���ޤ���

  % gcc -MM *.c > depend

�ʤɤǺ�뤳�Ȥ�����ޤ������ä�»��̵���Ǥ��礦��

(6) Makefile�������

Makefile��ºݤ�������뤿��ˤ�

  ruby extconf.rb

�Ȥ��ޤ���extconf.rb�� require 'mkmf' �ιԤ��ʤ����ˤϥ��顼
�ˤʤ�ޤ��Τǡ�������ɲä���

  ruby -r mkmf extconf.rb

�Ȥ��Ƥ���������

site_ruby �ǥ��쥯�ȥ�Ǥʤ���
vendor_ruby �ǥ��쥯�ȥ�˥��󥹥ȡ��뤹����ˤ�
�ʲ��Τ褦�� --vendor ���ץ�����ä��Ƥ���������

  ruby extconf.rb --vendor

�ǥ��쥯�ȥ��ext�ʲ����Ѱդ������ˤ�Ruby���Τ�make�λ���
��ưŪ��Makefile����������ޤ��Τǡ����Υ��ƥåפ����פǤ���

(7) make����

ưŪ��󥯥饤�֥����������ˤϤ��ξ��make���Ƥ�����
����ɬ�פǤ���� make install �ǥ��󥹥ȡ��뤵��ޤ���

ext�ʲ��˥ǥ��쥯�ȥ���Ѱդ������ϡ�Ruby�Υǥ��쥯�ȥ��
make��¹Ԥ����Makefile�������make��ɬ�פˤ�äƤϤ��Υ�
���塼���Ruby�ؤΥ�󥯤ޤǼ�ưŪ�˼¹Ԥ��Ƥ���ޤ���
extconf.rb��񤭴�����ʤɤ���Makefile�κ������ɬ�פʻ��Ϥ�
��Ruby�ǥ��쥯�ȥ��make���Ƥ���������

��ĥ�饤�֥���make install��Ruby�饤�֥��Υǥ��쥯�ȥ��
���˥��ԡ�����ޤ����⤷��ĥ�饤�֥��ȶ�Ĵ���ƻȤ�Ruby�ǵ�
�Ҥ��줿�ץ���ब���ꡤRuby�饤�֥����֤��������ˤϡ�
��ĥ�饤�֥���ѤΥǥ��쥯�ȥ�β��� lib �Ȥ����ǥ��쥯�ȥ�
���ꡤ������ ��ĥ�� .rb �Υե�������֤��Ƥ�����Ʊ���˥���
���ȡ��뤵��ޤ���

(8) �ǥХå�

�ޤ����ǥХå����ʤ���ư���ʤ��Ǥ��礦�͡�ext/Setup�˥ǥ���
���ȥ�̾��񤯤��Ū�˥�󥯤���ΤǥǥХå����Ȥ���褦�ˤ�
��ޤ�������ʬ����ѥ��뤬�٤��ʤ�ޤ����ɡ�

(9) �Ǥ�������

��Ϥ��ä���Ȥ��ʤꡤ������������ʤꡤ���ʤꡤ����ͳ�ˤ�
�Ȥ�����������Ruby�κ�Ԥϳ�ĥ�饤�֥��˴ؤ��ư�ڤθ����
��ĥ���ޤ���

Appendix A. Ruby�Υ����������ɤ�ʬ��

Ruby�Υ������Ϥ����Ĥ���ʬ�ह�뤳�Ȥ�����ޤ������Τ�������
���饤�֥�����ʬ�ϴ���Ū�˳�ĥ�饤�֥���Ʊ�������ˤʤ�
�Ƥ��ޤ��������Υ������Ϻ��ޤǤ����ǤۤȤ�����Ǥ����
�פ��ޤ���

Ruby�������

  class.c
  error.c
  eval.c
  gc.c
  object.c
  parse.y
  variable.c

�桼�ƥ���ƥ��ؿ�

  dln.c
  regex.c
  st.c
  util.c

Ruby���ޥ�ɤμ��

  dmyext.c
  inits.c
  main.c
  ruby.c
  version.c

���饹�饤�֥��

  array.c
  bignum.c
  compar.c
  dir.c
  enum.c
  file.c
  hash.c
  io.c
  marshal.c
  math.c
  numeric.c
  pack.c
  prec.c
  process.c
  random.c
  range.c
  re.c
  signal.c
  sprintf.c
  string.c
  struct.c
  time.c

Appendix B. ��ĥ�Ѵؿ��ե����

C���줫��Ruby�ε�ǽ����Ѥ���API�ϰʲ����̤�Ǥ��롥

** ��

VALUE

  Ruby���֥������Ȥ�ɽ�����뷿��ɬ�פ˱����ƥ��㥹�Ȥ����Ѥ��롥
  �Ȥ߹��߷���ɽ������C�η���ruby.h�˵��Ҥ��Ƥ���R�ǻϤޤ빽¤
  �ΤǤ��롥VALUE���򤳤��˥��㥹�Ȥ��뤿���R�ǻϤޤ빽¤��
  ̾�����ʸ���ˤ���̾���Υޥ����Ѱդ���Ƥ��롥

** �ѿ����

Qnil

  ���: nil���֥�������

Qtrue

  ���: true���֥�������(���Υǥե������)

Qfalse

  ���: false���֥�������

** C�ǡ����Υ��ץ��벽

Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval)

  C��Ǥ�դΥݥ��󥿤򥫥ץ��벽����Ruby���֥������Ȥ��֤�����
  �Υݥ��󥿤�Ruby���饢����������ʤ��ʤä�����free�ǻ��ꤷ��
  �ؿ�ƤФ�롥�ޤ������Υݥ��󥿤λؤ��ǡ�����¾��Ruby����
  �������Ȥ�ؤ��Ƥ����硤mark�˻��ꤹ��ؿ�ǥޡ�������ɬ��
  �����롥

Data_Make_Struct(klass, type, mark, free, sval)

  type���Υ����malloc�����ѿ�sval����������塤����򥫥ץ�
  �벽�����ǡ������֤��ޥ���

Data_Get_Struct(data, type, sval)

  data����type���Υݥ��󥿤���Ф��ѿ�sval���������ޥ���

** �������å�

TYPE(value)
FIXNUM_P(value)
NIL_P(value)
void Check_Type(VALUE value, int type)
void Check_SafeStr(VALUE value)

** ���Ѵ�

FIX2INT(value)
INT2FIX(i)
NUM2INT(value)
INT2NUM(i)
NUM2DBL(value)
rb_float_new(f)
StringValue(value)
StringValuePtr(value)
StringValueCStr(value)
rb_str_new2(s)

** ���饹/�⥸�塼����

VALUE rb_define_class(const char *name, VALUE super)

  super�Υ��֥��饹�Ȥ��ƿ�����Ruby���饹�������롥

VALUE rb_define_class_under(VALUE module, const char *name, VALUE super)

  super�Υ��֥��饹�Ȥ��ƿ�����Ruby���饹��������module��
  ���Ȥ��������롥

VALUE rb_define_module(const char *name)

  ������Ruby�⥸�塼��������롥

VALUE rb_define_module_under(VALUE module, const char *name)

  ������Ruby�⥸�塼���������module�����Ȥ��������롥

void rb_include_module(VALUE klass, VALUE module)

  �⥸�塼��򥤥󥯥롼�ɤ��롥class�����Ǥ�module�򥤥�
  �롼�ɤ��Ƥ����ˤϲ��⤷�ʤ�(¿�ť��󥯥롼�ɤζػ�)��

void rb_extend_object(VALUE object, VALUE module)

  ���֥������Ȥ�⥸�塼��(��������Ƥ���᥽�å�)�dz�ĥ���롥

** ����ѿ���

void rb_define_variable(const char *name, VALUE *var)

  Ruby��C�ȤǶ�ͭ���륰���Х��ѿ�������롥�ѿ�̾��`$'��
  �Ϥޤ�ʤ����ˤϼ�ưŪ���ɲä���롥name�Ȥ���Ruby�μ��̻�
  �Ȥ��Ƶ�����ʤ�ʸ��(�㤨��` ')��ޤ���ˤ�Ruby�ץ���
  �फ��ϸ����ʤ��ʤ롥

void rb_define_readonly_variable(const char *name, VALUE *var)

  Ruby��C�ȤǶ�ͭ����read only�Υ����Х��ѿ�������롥
  read only�Ǥ��뤳�Ȱʳ���rb_define_variable()��Ʊ����

void rb_define_virtual_variable(const char *name,
				VALUE (*getter)(), void (*setter)())

  �ؿ�ˤ�äƼ¸������Ruby�ѿ�������롥�ѿ���Ȥ��줿
  ���ˤ�getter�����ѿ���ͤ����åȤ��줿���ˤ�setter���ƤФ�
  �롥

void rb_define_hooked_variable(const char *name, VALUE *var,
			       VALUE (*getter)(), void (*setter)())

  �ؿ�ˤ�ä�hook�ΤĤ���줿�����Х��ѿ�������롥�ѿ�
  �����Ȥ��줿���ˤ�getter�����ؿ���ͤ����åȤ��줿���ˤ�
  setter���ƤФ�롥getter��setter��0����ꤷ�����ˤ�hook��
  ���ꤷ�ʤ��Τ�Ʊ�����ˤʤ롥

void rb_global_variable(VALUE *var)

  GC�Τ��ᡤRuby�ץ���फ��ϥ�����������ʤ���, Ruby����
  �������Ȥ�ޤ�����ѿ��ޡ������롥

** ���

void rb_define_const(VALUE klass, const char *name, VALUE val)

  ���������롥

void rb_define_global_const(const char *name, VALUE val)

  ������������롥

     rb_define_const(rb_cObject, name, val)

  ��Ʊ����̣��

** �᥽�å���

rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc)

  �᥽�åɤ������롥argc��self�������ο�argc��-1�λ�, 
  �ؿ�ˤϰ���ο�(self��ޤޤʤ�)����1����, ������������2
  ����Ȥ�������Ϳ������(��3�����self)��argc��-2�λ�, 
  ��1����self, ��2����args(args�ϰ����ޤ�Ruby������)��
  ����������Ϳ�����롥
 
rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc)

  private�᥽�åɤ������롥�����rb_define_method()��Ʊ����

rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc)

  �ðۥ᥽�åɤ������롥�����rb_define_method()��Ʊ����

rb_scan_args(int argc, VALUE *argv, const char *fmt, ...)

  argc, argv������Ϳ����줿�����ʬ�򤹤롥fmt��ɬ�ܰ���ο�, 
  �ղð���ο�, �Ĥ�ΰ�����뤫����ꤹ��ʸ�����, "��
  ��*"�Ȥ��������Ǥ��롥 2 ���ܤο��"*"�Ϥ��줾���ά��
  ǽ�Ǥ��롥ɬ�ܰ����Ĥ�ʤ�����0����ꤹ�롥��3�����
  �ߤ��ѿ�ؤΥݥ��󥿤�, ���������Ǥ������ѿ�˳�Ǽ����롥
  �ղð�����б�������Ϳ�����Ƥ��ʤ������ѿ��Qnil��
  �������롥

** Ruby�᥽�åɸƤӽФ�

VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)

  �᥽�åɸƤӽФ���ʸ���󤫤�mid����뤿��ˤ�rb_intern()��
  �Ȥ���

VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)

  �᥽�åɸƤӽФ��������argc, argv�������Ϥ���

VALUE rb_eval_string(const char *str)

  ʸ�����Ruby������ץȤȤ��ƥ���ѥ��롦�¹Ԥ��롥

ID rb_intern(const char *name)

  ʸ������б�����ID���֤���

char *rb_id2name(ID id)

  ID���б�����ʸ������֤�(�ǥХå���)��

char *rb_class2name(VALUE klass)

  ���饹��̾�����֤�(�ǥХå���)�����饹��̾������ʤ����ˤ�, 
  ����̤ä�̾����ĥ��饹��̾�����֤���

int rb_respond_to(VALUE obj, ID id)

  obj��id�Ǽ������᥽�åɤ�Ĥ��ɤ������֤���

** ���󥹥����ѿ�

VALUE rb_iv_get(VALUE obj, const char *name)

  obj�Υ��󥹥����ѿ���ͤ���롥`@'�ǻϤޤ�ʤ����󥹥���
  ���ѿ�� Ruby�ץ���फ�饢�������Ǥ��ʤ��ֱ��줿�ץ���
  �������ѿ�ˤʤ롥������ʸ����̾����ĥ��饹(�ޤ���
  �⥸�塼��)�Υ��󥹥����ѿ�Ȥ��Ƽ������Ƥ��롥

VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)

  obj�Υ��󥹥����ѿ��val�˥��åȤ��롥

** ���湽¤

VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)

  func2��֥�å��Ȥ�����ꤷ, func1�򥤥ƥ졼���Ȥ��ƸƤ֡� 
  func1�ˤ� arg1������Ȥ����Ϥ���, func2�ˤ���1����˥��ƥ졼
  ������Ϳ����줿��, ��2�����arg2���Ϥ���롥
 
VALUE rb_yield(VALUE val)

  val���ͤȤ��ƥ��ƥ졼���֥�å���ƤӽФ���

VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)

  �ؿ�func1��arg1���˸ƤӽФ���func1�μ¹�����㳰��ȯ��
  �������ˤ� func2��arg2���Ȥ��ƸƤ֡�����ͤ��㳰��ȯ��
  ���ʤ��ä�����func1�������, �㳰��ȯ���������ˤ�func2����
  ���ͤǤ��롥

VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, void (*func2)(), VALUE arg2)

  �ؿ�func1��arg1���Ȥ��Ƽ¹Ԥ�, �¹Խ�λ��(���Ȥ��㳰��
  ȯ�����Ƥ�) func2��arg2���Ȥ��Ƽ¹Ԥ��롥����ͤ�func1
  ������ͤǤ���(�㳰��ȯ�������������ʤ�)��

** �㳰�����顼

void rb_warning(const char *fmt, ...)

  rb_verbose����ɸ�२�顼���Ϥ˷ٹ�����ɽ�����롥�����
  printf()��Ʊ����

void rb_raise(rb_eRuntimeError, const char *fmt, ...)

  RuntimeError�㳰��ȯ�������롥�����printf()��Ʊ����

void rb_raise(VALUE exception, const char *fmt, ...)

  exception�ǻ��ꤷ���㳰��ȯ�������롥fmt�ʲ��ΰ����
  printf()��Ʊ����

void rb_fatal(const char *fmt, ...)

  ��̿Ū�㳰��ȯ�������롥�̾���㳰����ϹԤʤ�줺, ���󥿡�
  �ץ꥿����λ����(������ensure�ǻ��ꤵ�줿�����ɤϽ�λ����
  �¹Ԥ����)��

void rb_bug(const char *fmt, ...)

  ���󥿡��ץ꥿�ʤɥץ����ΥХ��Ǥ���ȯ������Ϥ��Τʤ�
  �����λ��Ƥ֡����󥿡��ץ꥿�ϥ�������פ�ľ���˽�λ���롥
  �㳰����ϰ�ڹԤʤ��ʤ���

** Ruby�ν������¹�

Ruby�򥢥ץꥱ���������������ˤϰʲ��Υ��󥿥ե�����
��Ȥ����̾�γ�ĥ�饤�֥��ˤ�ɬ�פʤ���

void ruby_init()

  Ruby���󥿥ץ꥿�ν�����Ԥʤ���

void ruby_options(int argc, char **argv)

  Ruby���󥿥ץ꥿�Υ��ޥ�ɥ饤���ν����Ԥʤ���

void ruby_run()

  Ruby���󥿥ץ꥿��¹Ԥ��롥

void ruby_script(char *name)

  Ruby�Υ�����ץ�̾($0)����ꤹ�롥


Appendix C. extconf.rb�ǻȤ���ؿ��

extconf.rb����Ǥ���Ѳ�ǽ�ʥ���ѥ��������å��δؿ�ϰ�
�����̤�Ǥ��롥

have_macro(macro, headers)

  �إå��ե�����header�򥤥󥯥롼�ɤ��ƥޥ���macro������
  ��Ƥ��뤫�ɤ��������å����롥�ޥ���������Ƥ���true
  ���֤���

have_library(lib, func)

  �ؿ�func�������Ƥ���饤�֥��lib��¸�ߤ���å����롥
  �饤�֥�꤬¸�ߤ�����true���֤���

find_library(lib, func, path...)

  �ؿ�func�������Ƥ���饤�֥��lib��¸�ߤ� -Lpath ���ɲ�
  ���ʤ������å����롥�饤�֥�꤬���դ��ä�����true���֤���

have_func(func, header)

  �إå��ե�����header�򥤥󥯥롼�ɤ��ƴؿ�func��¸�ߤ����
  �����롥func��ɸ��Ǥϥ�󥯤���ʤ��饤�֥����Τ�ΤǤ�
  ���ˤ���have_library�Ǥ��Υ饤�֥�����å����Ƥ���
  �����ؿ�¸�ߤ���true���֤���

have_var(var, header)

  �إå��ե�����header�򥤥󥯥롼�ɤ����ѿ�var��¸�ߤ����
  �����롥var��ɸ��Ǥϥ�󥯤���ʤ��饤�֥����Τ�ΤǤ�
  ���ˤ���have_library�Ǥ��Υ饤�֥�����å����Ƥ���
  �����ѿ�¸�ߤ���true���֤���

have_header(header)

  �إå��ե������¸�ߤ���å����롥�إå��ե����뤬¸�ߤ�
  ��true���֤���

find_header(header, path...)

  �إå��ե�����header��¸�ߤ� -Ipath ���ɲä��ʤ������å�
  ���롥�إå��ե����뤬���դ��ä�����true���֤���

have_struct_member(type, member, header)

  �إå��ե�����header�򥤥󥯥롼�ɤ��Ʒ�type�˥���member
  ��¸�ߤ��뤫����å����롥type��������Ƥ��ơ�member��
  ���Ĥ���true���֤���

have_type(type, header, opt)

  �إå��ե�����header�򥤥󥯥롼�ɤ��Ʒ�type��¸�ߤ��뤫��
  �����å����롥type��������Ƥ���true���֤���

check_sizeof(type, header)

  �إå��ե�����header�򥤥󥯥롼�ɤ��Ʒ�type��charñ�̥���
  ����Ĵ�٤롥type��������Ƥ������Υ��������֤�������
  ��Ƥ��ʤ��Ȥ���nil���֤���

create_makefile(target)

  ��ĥ�饤�֥���Ѥ�Makefile������롥���δؿ��ƤФʤ���
  �Ф��Υ饤�֥��ϥ���ѥ��뤵��ʤ���target�ϥ⥸�塼��̾
  ��ɽ����

find_executable(command, path)

  ���ޥ��command��File::PATH_SEPARATOR�Ƕ�ڤ�줿�ѥ�̾��
  �ꥹ��path����õ����path��nil�ޤ��Ͼ�ά���줿���ϡ��Ķ�
  �ѿ�PATH���ͤ���Ѥ��롥�¹Բ�ǽ�ʥ��ޥ�ɤ����Ĥ��ä����
  �ϥѥ���ޤ�ե�����̾�����Ĥ���ʤ��ä�����nil���֤���

with_config(withval[, default=nil])

  ���ޥ�ɥ饤����--with-<withval>�ǻ��ꤵ�줿���ץ�����ͤ���롥

enable_config(config, *defaults)
disable_config(config, *defaults)

  ���ޥ�ɥ饤����--enable-<config>�ޤ���
  --disable-<config>�ǻ��ꤵ�줿�����ͤ���롥
  --enable-<config>�����ꤵ��Ƥ�������true��
  --disable-<config>�����ꤵ��Ƥ�������false���֤���
  �ɤ������ꤵ��Ƥ��ʤ����ϡ��֥�å��Ĥ��ǸƤӽФ���Ƥ������
  *defaults��yield������̡��֥�å��ʤ��ʤ�*defaults���֤���

dir_config(target[, default_dir])
dir_config(target[, default_include, default_lib])

  ���ޥ�ɥ饤����--with-<target>-dir, --with-<target>-include,
  --with-<target>-lib�Τ����줫�ǻ��ꤵ���ǥ��쥯�ȥ��
  $CFLAGS �� $LDFLAGS ���ɲä��롥--with-<target>-dir=/path��
  --with-<target>-include=/path/include --with-<target>-lib=/path/lib
  ������Ǥ��롥�ɲä��줿 include �ǥ��쥯�ȥ�� lib �ǥ��쥯�ȥ��
  ������֤��� ([include_dir, lib_dir])

pkg_config(pkg)

  pkg-config���ޥ�ɤ���ѥå�����pkg�ξ������롥 
  pkg-config�μºݤΥ��ޥ��̾�ϡ�--with-pkg-config���ޥ��
  �饤�󥪥ץ����ǻ����ǽ��

/*
 * Local variables:
 * fill-column: 60
 * end:
 */
doc/alt-ruby18/COPYING000064400000004707150403614130010261 0ustar00Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
You can redistribute it and/or modify it under either the terms of the GPL
version 2 (see the file GPL), or the conditions below:

  1. You may make and give away verbatim copies of the source form of the
     software without restriction, provided that you duplicate all of the
     original copyright notices and associated disclaimers.

  2. You may modify your copy of the software in any way, provided that
     you do at least ONE of the following:

       a) place your modifications in the Public Domain or otherwise
          make them Freely Available, such as by posting said
	  modifications to Usenet or an equivalent medium, or by allowing
	  the author to include your modifications in the software.

       b) use the modified software only within your corporation or
          organization.

       c) give non-standard binaries non-standard names, with
          instructions on where to get the original software distribution.

       d) make other distribution arrangements with the author.

  3. You may distribute the software in object code or binary form,
     provided that you do at least ONE of the following:

       a) distribute the binaries and library files of the software,
	  together with instructions (in the manual page or equivalent)
	  on where to get the original distribution.

       b) accompany the distribution with the machine-readable source of
	  the software.

       c) give non-standard binaries non-standard names, with
          instructions on where to get the original software distribution.

       d) make other distribution arrangements with the author.

  4. You may modify and include the part of the software into any other
     software (possibly commercial).  But some files in the distribution
     are not written by the author, so that they are not under these terms.

     For the list of those files and their copying conditions, see the
     file LEGAL.

  5. The scripts and library files supplied as input to or produced as 
     output from the software do not automatically fall under the
     copyright of the software, but belong to whomever generated them, 
     and may be sold commercially, and may be aggregated with this
     software.

  6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     PURPOSE.
doc/alt-ruby18/README000064400000006223150403614140010102 0ustar00* What's Ruby

Ruby is the interpreted scripting language for quick and
easy object-oriented programming.  It has many features to
process text files and to do system management tasks (as in
Perl).  It is simple, straight-forward, and extensible.


* Features of Ruby

  + Simple Syntax
  + *Normal* Object-Oriented features(ex. class, method calls)
  + *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method)
  + Operator Overloading
  + Exception Handling
  + Iterators and Closures
  + Garbage Collection
  + Dynamic Loading of Object files(on some architecture)
  + Highly Portable(works on many UNIX machines, and on DOS,
    Windows, Mac, BeOS etc.)


* How to get Ruby

The Ruby distribution files can be found in the following FTP site:

  ftp://ftp.ruby-lang.org/pub/ruby/

The latest source code of this version series can be checked out
through SVN with the following command:

  $ svn co http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8/

The trunk of the Ruby source tree can be checked out with the
following command:

  $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby

There are some other branches under development.  Try the following
command and see the list of branches:

  $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/


* Ruby home-page

The URL of the Ruby home-page is:

   http://www.ruby-lang.org/


* Mailing list

There is a mailing list to talk about Ruby.
To subscribe this list, please send the following phrase

	subscribe YourFirstName YourFamilyName
e.g.
        subscribe Joseph Smith

in the mail body (not subject) to the address <ruby-talk-ctl@ruby-lang.org>.


* How to compile and install

This is what you need to do to compile and install Ruby:

  1. If ./configure does not exist or is older than configure.in,
     run autoconf to (re)generate configure.

  2. Run ./configure, which will generate config.h and Makefile.

     Some C compiler flags may be added by default depending on your
     environment.  Specify optflags=.. and warnflags=.. as necessary
     to override them.

  3. Edit defines.h if you need.  Usually this step will not be needed.

  4. Remove comment mark(#) before the module names from ext/Setup (or
     add module names if not present), if you want to link modules
     statically.

     If you don't want to compile non static extension modules
     (probably on architectures which does not allow dynamic loading),
     remove comment mark from the line "#option nodynamic" in
     ext/Setup.

  5. Run make.

  6. Optionally, run 'make test' to check whether the compiled Ruby
     interpreter works well.  If you see the message "test succeeded",
     your ruby works as it should (hopefully).

  7. Run 'make install'

     You may have to be a super user to install ruby.

If you fail to compile ruby, please send the detailed error report with
the error log and machine/OS type, to help others.


* Copying

See the file COPYING.


* The Author

Feel free to send comments and bug reports to the author.  Here is the 
author's latest mail address:

  matz@netlab.jp

-------------------------------------------------------
created at: Thu Aug  3 11:57:36 JST 1995
Local variables:
mode: indented-text
end:
doc/alt-ruby18/LGPL000064400000063476150403614140007720 0ustar00		  GNU LESSER GENERAL PUBLIC LICENSE
		       Version 2.1, February 1999

 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

  When we speak of free software, we are referring to freedom of use,
not price.  Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.

  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.

  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.

  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.

  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

		  GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)

  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.
  
  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) The modified work must itself be a software library.

    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.

    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.

    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.

    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.

  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:

    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)

    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.

    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.

    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.

    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.

  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.

    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.

  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.

  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.

  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

			    NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

		     END OF TERMS AND CONDITIONS

           How to Apply These Terms to Your New Libraries

  If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

  To apply these terms, attach the following notices to the library.  It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the library's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!


doc/alt-ruby18/GPL000064400000043131150403614150007567 0ustar00		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

		    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.
ri/1.8/system/Fixnum/size-i.yaml000064400000000673150403614170012351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of <em>bytes</em> in the machine representation of a <tt>Fixnum</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.size            #=&gt; 4\n   -1.size           #=&gt; 4\n   2147483647.size   #=&gt; 4\n"
full_name: Fixnum#size
is_singleton: false
name: size
params: |
  fix.size -> fixnum

visibility: public
ri/1.8/system/Fixnum/rpower-i.yaml000064400000000521150403614170012705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "**"
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a Rational number if the result is in fact rational (i.e. <tt>other</tt> &lt; 0).
full_name: Fixnum#rpower
is_singleton: false
name: rpower
params: (other)
visibility: public
ri/1.8/system/Fixnum/odd%3f-i.yaml000064400000000432150403614170012434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>fix</em> is an odd number.
full_name: Fixnum#odd?
is_singleton: false
name: odd?
params: |
  fix.odd? -> true or false

visibility: public
ri/1.8/system/Fixnum/%25-i.yaml000064400000000542150403614200011657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>fix</tt> modulo <tt>other</tt>. See <tt>Numeric.divmod</tt> for more information.
full_name: Fixnum#%
is_singleton: false
name: "%"
params: |
  fix % other         => Numeric
  fix.modulo(other)   => Numeric

visibility: public
ri/1.8/system/Fixnum/%5b%5d-i.yaml000064400000001127150403614200012235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Bit Reference---Returns the <em>n</em>th bit in the binary representation of <em>fix</em>, where <em>fix</em>[0] is the least significant bit.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = 0b11001100101010\n   30.downto(0) do |n| print a[n] end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   0000000000000000011001100101010\n"
full_name: Fixnum#[]
is_singleton: false
name: "[]"
params: |
  fix[n]     => 0, 1

visibility: public
ri/1.8/system/Fixnum/fdiv-i.yaml000064400000000744150403614200012320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the floating point result of dividing <em>fix</em> by <em>numeric</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   654321.quo(13731)      #=&gt; 47.6528293642124\n   654321.quo(13731.24)   #=&gt; 47.6519964693647\n"
full_name: Fixnum#fdiv
is_singleton: false
name: fdiv
params: |
  fix.quo(numeric)    => float
  fix.fdiv(numeric)   => float

visibility: public
ri/1.8/system/Fixnum/%2a%2a-i.yaml000064400000000335150403614210012224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #rpower"
full_name: Fixnum#**
is_singleton: false
name: "**"
params: (other)
visibility: public
ri/1.8/system/Fixnum/%3c%3d%3e-i.yaml000064400000000634150403614210012532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comparison---Returns -1, 0, or +1 depending on whether <em>fix</em> is less than, equal to, or greater than <em>numeric</em>. This is the basis for the tests in <tt>Comparable</tt>.
full_name: Fixnum#<=>
is_singleton: false
name: <=>
params: |
  fix <=> numeric    => -1, 0, +1

visibility: public
ri/1.8/system/Fixnum/%2f-i.yaml000064400000000323150403614220011737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #quo"
full_name: Fixnum#/
is_singleton: false
name: /
params: (p1)
visibility: public
ri/1.8/system/Fixnum/%7c-i.yaml000064400000000353150403614220011744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Bitwise OR.
full_name: Fixnum#|
is_singleton: false
name: "|"
params: |
  fix | other     => integer

visibility: public
ri/1.8/system/Fixnum/divmod-i.yaml000064400000000411150403614220012643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Numeric#divmod</tt>.
full_name: Fixnum#divmod
is_singleton: false
name: divmod
params: |
  fix.divmod(numeric)    => array

visibility: public
ri/1.8/system/Fixnum/%26-i.yaml000064400000000354150403614230011664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Bitwise AND.
full_name: Fixnum#&
is_singleton: false
name: "&"
params: |
  fix & other     => integer

visibility: public
ri/1.8/system/Fixnum/quo-i.yaml000064400000001062150403614230012171 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: /
- !ruby/object:RI::AliasName 
  name: rdiv
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the floating point result of dividing <em>fix</em> by <em>numeric</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   654321.quo(13731)      #=&gt; 47.6528293642124\n   654321.quo(13731.24)   #=&gt; 47.6519964693647\n"
full_name: Fixnum#quo
is_singleton: false
name: quo
params: |
  fix.quo(numeric)    => float
  fix.fdiv(numeric)   => float

visibility: public
ri/1.8/system/Fixnum/%3c-i.yaml000064400000000473150403614240011745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the value of <tt>fix</tt> is less than that of <tt>other</tt>.
full_name: Fixnum#<
is_singleton: false
name: <
params: |
  fix < other     => true or false

visibility: public
ri/1.8/system/Fixnum/%3c%3d-i.yaml000064400000000511150403614240012232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the value of <tt>fix</tt> is less thanor equal to that of <tt>other</tt>.
full_name: Fixnum#<=
is_singleton: false
name: <=
params: |
  fix <= other     => true or false

visibility: public
ri/1.8/system/Fixnum/id2name-i.yaml000064400000001315150403614240012706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the object whose symbol id is <em>fix</em>. If there is no symbol in the symbol table with this value, returns <tt>nil</tt>. <tt>id2name</tt> has nothing to do with the <tt>Object.id</tt> method. See also <tt>Fixnum#to_sym</tt>, <tt>String#intern</tt>, and class <tt>Symbol</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   symbol = :@inst_var    #=&gt; :@inst_var\n   id     = symbol.to_i   #=&gt; 9818\n   id.id2name             #=&gt; &quot;@inst_var&quot;\n"
full_name: Fixnum#id2name
is_singleton: false
name: id2name
params: |
  fix.id2name -> string or nil

visibility: public
ri/1.8/system/Fixnum/abs-i.yaml000064400000000553150403614250012140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the absolute value of <em>fix</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   -12345.abs   #=&gt; 12345\n   12345.abs    #=&gt; 12345\n"
full_name: Fixnum#abs
is_singleton: false
name: abs
params: |
  fix.abs -> aFixnum

visibility: public
ri/1.8/system/Fixnum/%3e%3d-i.yaml000064400000000517150403614250012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the value of <tt>fix</tt> is greater than or equal to that of <tt>other</tt>.
full_name: Fixnum#>=
is_singleton: false
name: ">="
params: |
  fix >= other     => true or false

visibility: public
ri/1.8/system/Fixnum/%2a-i.yaml000064400000000561150403614250011741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Performs multiplication: the class of the resulting object depends on the class of <tt>numeric</tt> and on the magnitude of the result."
full_name: Fixnum#*
is_singleton: false
name: "*"
params: |
  fix * numeric   =>  numeric_result

visibility: public
ri/1.8/system/Fixnum/power%21-i.yaml000064400000000334150403614250012734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #**"
full_name: Fixnum#power!
is_singleton: false
name: power!
params: (p1)
visibility: public
ri/1.8/system/Fixnum/%7e-i.yaml000064400000000430150403614260011746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "One's complement: returns a number where each bit is flipped."
full_name: Fixnum#~
is_singleton: false
name: "~"
params: |
  ~fix     => integer

visibility: public
ri/1.8/system/Fixnum/rdiv-i.yaml000064400000000331150403614260012332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #quo"
full_name: Fixnum#rdiv
is_singleton: false
name: rdiv
params: (p1)
visibility: public
ri/1.8/system/Fixnum/to_sym-i.yaml000064400000000707150403614260012707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the symbol whose integer value is <em>fix</em>. See also <tt>Fixnum#id2name</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   fred = :fred.to_i\n   fred.id2name   #=&gt; &quot;fred&quot;\n   fred.to_sym    #=&gt; :fred\n"
full_name: Fixnum#to_sym
is_singleton: false
name: to_sym
params: |
  fix.to_sym -> aSymbol

visibility: public
ri/1.8/system/Fixnum/%3e%3e-i.yaml000064400000000473150403614260012246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Shifts <em>fix</em> right <em>count</em> positions (left if <em>count</em> is negative).
full_name: Fixnum#>>
is_singleton: false
name: ">>"
params: |
  fix >> count     => integer

visibility: public
ri/1.8/system/Fixnum/cdesc-Fixnum.yaml000064400000005513150403614260013474 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: induced_from
comment: 
- !ruby/struct:SM::Flow::P 
  body: A <tt>Fixnum</tt> holds <tt>Integer</tt> values that can be represented in a native machine word (minus 1 bit). If any operation on a <tt>Fixnum</tt> exceeds this range, the value is automatically converted to a <tt>Bignum</tt>.
- !ruby/struct:SM::Flow::P 
  body: <tt>Fixnum</tt> objects have immediate value. This means that when they are assigned or passed as parameters, the actual object is passed, rather than a reference to that object. Assignment does not alias <tt>Fixnum</tt> objects. There is effectively only one <tt>Fixnum</tt> object instance for any given integer value, so, for example, you cannot add a singleton method to a <tt>Fixnum</tt>.
constants: []

full_name: Fixnum
includes: 
- !ruby/object:RI::IncludedModule 
  name: Precision
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "%"
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: -@
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: <
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: <=
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ">"
- !ruby/object:RI::MethodSummary 
  name: ">="
- !ruby/object:RI::MethodSummary 
  name: ">>"
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: ^
- !ruby/object:RI::MethodSummary 
  name: abs
- !ruby/object:RI::MethodSummary 
  name: dclone
- !ruby/object:RI::MethodSummary 
  name: div
- !ruby/object:RI::MethodSummary 
  name: divmod
- !ruby/object:RI::MethodSummary 
  name: even?
- !ruby/object:RI::MethodSummary 
  name: fdiv
- !ruby/object:RI::MethodSummary 
  name: id2name
- !ruby/object:RI::MethodSummary 
  name: modulo
- !ruby/object:RI::MethodSummary 
  name: odd?
- !ruby/object:RI::MethodSummary 
  name: power!
- !ruby/object:RI::MethodSummary 
  name: quo
- !ruby/object:RI::MethodSummary 
  name: quo
- !ruby/object:RI::MethodSummary 
  name: rdiv
- !ruby/object:RI::MethodSummary 
  name: rpower
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: to_f
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_sym
- !ruby/object:RI::MethodSummary 
  name: zero?
- !ruby/object:RI::MethodSummary 
  name: "|"
- !ruby/object:RI::MethodSummary 
  name: "~"
name: Fixnum
superclass: Integer
ri/1.8/system/Fixnum/zero%3f-i.yaml000064400000000427150403614270012652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>fix</em> is zero.
full_name: Fixnum#zero?
is_singleton: false
name: zero?
params: |
  fix.zero?    => true or false

visibility: public
ri/1.8/system/Fixnum/%2b-i.yaml000064400000000551150403614270011743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Performs addition: the class of the resulting object depends on the class of <tt>numeric</tt> and on the magnitude of the result."
full_name: Fixnum#+
is_singleton: false
name: +
params: |
  fix + numeric   =>  numeric_result

visibility: public
ri/1.8/system/Fixnum/%3c%3c-i.yaml000064400000000473150403614270012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Shifts <em>fix</em> left <em>count</em> positions (right if <em>count</em> is negative).
full_name: Fixnum#<<
is_singleton: false
name: "<<"
params: |
  fix << count     => integer

visibility: public
ri/1.8/system/Fixnum/even%3f-i.yaml000064400000000436150403614270012630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>fix</em> is an even number.
full_name: Fixnum#even?
is_singleton: false
name: even?
params: |
  fix.even? -> true or false

visibility: public
ri/1.8/system/Fixnum/to_s-i.yaml000064400000001222150403614300012325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string containing the representation of <em>fix</em> radix <em>base</em> (between 2 and 36).
- !ruby/struct:SM::Flow::VERB 
  body: "   12345.to_s       #=&gt; &quot;12345&quot;\n   12345.to_s(2)    #=&gt; &quot;11000000111001&quot;\n   12345.to_s(8)    #=&gt; &quot;30071&quot;\n   12345.to_s(10)   #=&gt; &quot;12345&quot;\n   12345.to_s(16)   #=&gt; &quot;3039&quot;\n   12345.to_s(36)   #=&gt; &quot;9ix&quot;\n"
full_name: Fixnum#to_s
is_singleton: false
name: to_s
params: |
  fix.to_s( base=10 ) -> aString

visibility: public
ri/1.8/system/Fixnum/%3e-i.yaml000064400000000500150403614300011733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the value of <tt>fix</tt> is greater than that of <tt>other</tt>.
full_name: Fixnum#>
is_singleton: false
name: ">"
params: |
  fix > other     => true or false

visibility: public
ri/1.8/system/Fixnum/%3d%3d-i.yaml000064400000000572150403614300012237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if <tt>fix</tt> equals <tt>other</tt> numerically.
- !ruby/struct:SM::Flow::VERB 
  body: "  1 == 2      #=&gt; false\n  1 == 1.0    #=&gt; true\n"
full_name: Fixnum#==
is_singleton: false
name: ==
params: |
  fix == other

visibility: public
ri/1.8/system/Fixnum/induced_from-c.yaml000064400000000561150403614300014016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>obj</tt> to a Fixnum. Works with numeric parameters. Also works with Symbols, but this is deprecated.
full_name: Fixnum::induced_from
is_singleton: true
name: induced_from
params: |
  Fixnum.induced_from(obj)    =>  fixnum

visibility: public
ri/1.8/system/Fixnum/%2d%40-i.yaml000064400000000413150403614310012146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Negates <tt>fix</tt> (which might return a Bignum).
full_name: Fixnum#-@
is_singleton: false
name: -@
params: |
  -fix   =>  integer

visibility: public
ri/1.8/system/Fixnum/div-i.yaml000064400000000630150403614310012146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Performs division: the class of the resulting object depends on the class of <tt>numeric</tt> and on the magnitude of the result."
full_name: Fixnum#div
is_singleton: false
name: div
params: |
  fix / numeric      =>  numeric_result
  fix.div(numeric)   =>  numeric_result

visibility: public
ri/1.8/system/Fixnum/%5e-i.yaml000064400000000363150403614310011745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Bitwise EXCLUSIVE OR.
full_name: Fixnum#^
is_singleton: false
name: ^
params: |
  fix ^ other     => integer

visibility: public
ri/1.8/system/Fixnum/dclone-i.yaml000064400000000246150403614310012633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Fixnum#dclone
is_singleton: false
name: dclone
params: ()
visibility: public
ri/1.8/system/Fixnum/to_f-i.yaml000064400000000405150403614320012314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>fix</em> to a <tt>Float</tt>.
full_name: Fixnum#to_f
is_singleton: false
name: to_f
params: |
  fix.to_f -> float

visibility: public
ri/1.8/system/Fixnum/modulo-i.yaml000064400000000552150403614320012667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>fix</tt> modulo <tt>other</tt>. See <tt>Numeric.divmod</tt> for more information.
full_name: Fixnum#modulo
is_singleton: false
name: modulo
params: |
  fix % other         => Numeric
  fix.modulo(other)   => Numeric

visibility: public
ri/1.8/system/Fixnum/%2d-i.yaml000064400000000556150403614320011746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Performs subtraction: the class of the resulting object depends on the class of <tt>numeric</tt> and on the magnitude of the result."
full_name: Fixnum#-
is_singleton: false
name: "-"
params: |
  fix - numeric   =>  numeric_result

visibility: public
ri/1.8/system/GetoptLong/cdesc-GetoptLong.yaml000064400000007426150403614320015126 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Examine whether an option processing is failed.
  name: error
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Return ordering.
  name: ordering
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Set/Unset `quiet' mode.
  name: quiet
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Return the flag of `quiet' mode.
  name: quiet
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: GetoptLong allows for POSIX-style options like <tt>--file</tt> as well as single letter options like <tt>-f</tt>
- !ruby/struct:SM::Flow::P 
  body: The empty option <tt>--</tt> (two minus symbols) is used to end option processing. This can be particularly important if options have optional arguments.
- !ruby/struct:SM::Flow::P 
  body: "Here is a simple example of usage:"
- !ruby/struct:SM::Flow::VERB 
  body: "    # == Synopsis\n    #\n    # hello: greets user, demonstrates command line parsing\n    #\n    # == Usage\n    #\n    # hello [OPTION] ... DIR\n    #\n    # -h, --help:\n    #    show help\n    #\n    # --repeat x, -n x:\n    #    repeat x times\n    #\n    # --name [name]:\n    #    greet user by name, if name not supplied default is John\n    #\n    # DIR: The directory in which to issue the greeting.\n\n    require 'getoptlong'\n    require 'rdoc/usage'\n\n    opts = GetoptLong.new(\n      [ '--help', '-h', GetoptLong::NO_ARGUMENT ],\n      [ '--repeat', '-n', GetoptLong::REQUIRED_ARGUMENT ],\n      [ '--name', GetoptLong::OPTIONAL_ARGUMENT ]\n    )\n\n    dir = nil\n    name = nil\n    repetitions = 1\n    opts.each do |opt, arg|\n      case opt\n        when '--help'\n          RDoc::usage\n        when '--repeat'\n          repetitions = arg.to_i\n        when '--name'\n          if arg == ''\n            name = 'John'\n          else\n            name = arg\n          end\n      end\n    end\n\n    if ARGV.length != 1\n      puts &quot;Missing dir argument (try --help)&quot;\n      exit 0\n    end\n\n    dir = ARGV.shift\n\n    Dir.chdir(dir)\n    for i in (1..repetitions)\n      print &quot;Hello&quot;\n      if name\n        print &quot;, #{name}&quot;\n      end\n      puts\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: "Example command line:"
- !ruby/struct:SM::Flow::VERB 
  body: "    hello -n 6 --name -- /tmp\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Orderings.
  name: ORDERINGS
  value: "[REQUIRE_ORDER = 0, PERMUTE = 1, RETURN_IN_ORDER = 2]"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Argument flags.
  name: ARGUMENT_FLAGS
  value: "[NO_ARGUMENT = 0, REQUIRED_ARGUMENT = 1,     OPTIONAL_ARGUMENT = 2]"
- !ruby/object:RI::Constant 
  comment: 
  name: STATUS_TERMINATED
  value: 0, 1, 2
full_name: GetoptLong
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_option
- !ruby/object:RI::MethodSummary 
  name: error_message
- !ruby/object:RI::MethodSummary 
  name: get
- !ruby/object:RI::MethodSummary 
  name: get_option
- !ruby/object:RI::MethodSummary 
  name: ordering=
- !ruby/object:RI::MethodSummary 
  name: set_error
- !ruby/object:RI::MethodSummary 
  name: set_options
- !ruby/object:RI::MethodSummary 
  name: terminate
- !ruby/object:RI::MethodSummary 
  name: terminated?
name: GetoptLong
superclass: Object
ri/1.8/system/GetoptLong/ordering%3d-i.yaml000064400000005003150403614320014305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the handling of the ordering of options and arguments. A RuntimeError is raised if option processing has already started.
- !ruby/struct:SM::Flow::P 
  body: "The supplied value must be a member of GetoptLong::ORDERINGS. It alters the processing of options as follows:"
- !ruby/struct:SM::Flow::P 
  body: "<b>REQUIRE_ORDER</b> :"
- !ruby/struct:SM::Flow::P 
  body: Options are required to occur before non-options.
- !ruby/struct:SM::Flow::P 
  body: Processing of options ends as soon as a word is encountered that has not been preceded by an appropriate option flag.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: This is the default ordering, if the environment variable POSIXLY_CORRECT is set. (This is for compatibility with GNU getopt_long.)
- !ruby/struct:SM::Flow::P 
  body: "<b>PERMUTE</b> :"
- !ruby/struct:SM::Flow::P 
  body: Options can occur anywhere in the command line parsed. This is the default behavior.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: "<b>RETURN_IN_ORDER</b> :"
- !ruby/struct:SM::Flow::P 
  body: 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).
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: GetoptLong#ordering=
is_singleton: false
name: ordering=
params: (ordering)
visibility: public
ri/1.8/system/GetoptLong/terminate-i.yaml000064400000000374150403614320014176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Explicitly terminate option processing.
full_name: GetoptLong#terminate
is_singleton: false
name: terminate
params: ()
visibility: public
ri/1.8/system/GetoptLong/each-i.yaml000064400000001266150403614320013107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: each_option
block_params: option_name, option_argument
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterator version of `get'.
- !ruby/struct:SM::Flow::P 
  body: "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')"
- !ruby/struct:SM::Flow::P 
  body: The option name is always converted to the first (preferred) name given in the original options to GetoptLong.new.
full_name: GetoptLong#each
is_singleton: false
name: each
params: () {|option_name, option_argument| ...}
visibility: public
ri/1.8/system/GetoptLong/each_option-i.yaml000064400000000352150403614320014472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #each"
full_name: GetoptLong#each_option
is_singleton: false
name: each_option
params: ()
visibility: public
ri/1.8/system/GetoptLong/error_message-i.yaml000064400000000501150403614320015033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the appropriate error message in POSIX-defined format. If no error has occurred, returns nil.
full_name: GetoptLong#error_message
is_singleton: false
name: error_message
params: ()
visibility: public
ri/1.8/system/GetoptLong/set_options-i.yaml000064400000000576150403614320014560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set options. Takes the same argument as GetoptLong.new.
- !ruby/struct:SM::Flow::P 
  body: Raises a RuntimeError if option processing has already started.
full_name: GetoptLong#set_options
is_singleton: false
name: set_options
params: (*arguments)
visibility: public
ri/1.8/system/GetoptLong/InvalidOption/cdesc-InvalidOption.yaml000064400000000322150403614320020366 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: GetoptLong::InvalidOption
includes: []

instance_methods: []

name: InvalidOption
superclass: Error
ri/1.8/system/GetoptLong/terminated%3f-i.yaml000064400000000433150403614320014634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if option processing has terminated, false otherwise.
full_name: GetoptLong#terminated?
is_singleton: false
name: terminated?
params: ()
visibility: public
ri/1.8/system/GetoptLong/Error/cdesc-Error.yaml000064400000000373150403614320015220 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error types.
constants: []

full_name: GetoptLong::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/GetoptLong/get_option-i.yaml000064400000000347150403614320014355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #get"
full_name: GetoptLong#get_option
is_singleton: false
name: get_option
params: ()
visibility: public
ri/1.8/system/GetoptLong/get-i.yaml000064400000001212150403614320012755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: get_option
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get next option name and its argument, as an Array of two elements.
- !ruby/struct:SM::Flow::P 
  body: The option name is always converted to the first (preferred) name given in the original options to GetoptLong.new.
- !ruby/struct:SM::Flow::P 
  body: "Example: ['--option', 'value']"
- !ruby/struct:SM::Flow::P 
  body: Returns nil if the processing is complete (as determined by STATUS_TERMINATED).
full_name: GetoptLong#get
is_singleton: false
name: get
params: ()
visibility: public
ri/1.8/system/GetoptLong/MissingArgument/cdesc-MissingArgument.yaml000064400000000326150403614320021264 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: GetoptLong::MissingArgument
includes: []

instance_methods: []

name: MissingArgument
superclass: Error
ri/1.8/system/GetoptLong/set_error-i.yaml000064400000000376150403614320014214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set an error (protected).
full_name: GetoptLong#set_error
is_singleton: false
name: set_error
params: (type, message)
visibility: protected
ri/1.8/system/GetoptLong/new-c.yaml000064400000002040150403614320012761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set up option processing.
- !ruby/struct:SM::Flow::P 
  body: "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:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "GetoptLong::NO_ARGUMENT :"
    body: Option does not take an argument.
  - !ruby/struct:SM::Flow::LI 
    label: "GetoptLong::REQUIRED_ARGUMENT :"
    body: Option always takes an argument.
  - !ruby/struct:SM::Flow::LI 
    label: "GetoptLong::OPTIONAL_ARGUMENT :"
    body: Option may or may not take an argument.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: GetoptLong::new
is_singleton: true
name: new
params: (*arguments)
visibility: public
ri/1.8/system/GetoptLong/AmbigousOption/cdesc-AmbigousOption.yaml000064400000000324150403614320020730 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: GetoptLong::AmbigousOption
includes: []

instance_methods: []

name: AmbigousOption
superclass: Error
ri/1.8/system/GetoptLong/NeedlessArgument/cdesc-NeedlessArgument.yaml000064400000000330150403614320021541 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: GetoptLong::NeedlessArgument
includes: []

instance_methods: []

name: NeedlessArgument
superclass: Error
ri/1.8/system/RubyLex/set_input-i.yaml000064400000000361150403614320013524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: io functions
full_name: RubyLex#set_input
is_singleton: false
name: set_input
params: (io, p = nil, &block)
visibility: public
ri/1.8/system/RubyLex/identify_comment-i.yaml000064400000000273150403614330015052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#identify_comment
is_singleton: false
name: identify_comment
params: ()
visibility: public
ri/1.8/system/RubyLex/lex_init-i.yaml000064400000000253150403614330013326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#lex_init
is_singleton: false
name: lex_init
params: ()
visibility: public
ri/1.8/system/RubyLex/identify_quotation-i.yaml000064400000000277150403614330015437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#identify_quotation
is_singleton: false
name: identify_quotation
params: ()
visibility: public
ri/1.8/system/RubyLex/peek-i.yaml000064400000000250150403614330012434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#peek
is_singleton: false
name: peek
params: (i = 0)
visibility: public
ri/1.8/system/RubyLex/initialize_input-i.yaml000064400000000273150403614330015075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#initialize_input
is_singleton: false
name: initialize_input
params: ()
visibility: public
ri/1.8/system/RubyLex/buf_input-i.yaml000064400000000256150403614330013511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#buf_input
is_singleton: false
name: buf_input
params: ()
visibility: private
ri/1.8/system/RubyLex/prompt-i.yaml000064400000000247150403614330013037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#prompt
is_singleton: false
name: prompt
params: ()
visibility: public
ri/1.8/system/RubyLex/debug%3f-c.yaml000064400000000247150403614330013074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::debug?
is_singleton: true
name: debug?
params: ()
visibility: public
ri/1.8/system/RubyLex/set_prompt-i.yaml000064400000000276150403614330013714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#set_prompt
is_singleton: false
name: set_prompt
params: (p = nil, &block)
visibility: public
ri/1.8/system/RubyLex/line_no-i.yaml000064400000000332150403614330013134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: io functions
full_name: RubyLex#line_no
is_singleton: false
name: line_no
params: ()
visibility: public
ri/1.8/system/RubyLex/read_escape-i.yaml000064400000000261150403614330013745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#read_escape
is_singleton: false
name: read_escape
params: ()
visibility: public
ri/1.8/system/RubyLex/ungetc-i.yaml000064400000000256150403614330013003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#ungetc
is_singleton: false
name: ungetc
params: (c = nil)
visibility: public
ri/1.8/system/RubyLex/identify_gvar-i.yaml000064400000000265150403614330014350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#identify_gvar
is_singleton: false
name: identify_gvar
params: ()
visibility: public
ri/1.8/system/RubyLex/skip_inner_expression-i.yaml000064400000000305150403614330016131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#skip_inner_expression
is_singleton: false
name: skip_inner_expression
params: ()
visibility: public
ri/1.8/system/RubyLex/new-c.yaml000064400000000250150403614330012273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::new
is_singleton: true
name: new
params: (content)
visibility: public
ri/1.8/system/RubyLex/identify_number-i.yaml000064400000000276150403614340014704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#identify_number
is_singleton: false
name: identify_number
params: (start)
visibility: public
ri/1.8/system/RubyLex/get_readed-i.yaml000064400000000257150403614340013603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#get_readed
is_singleton: false
name: get_readed
params: ()
visibility: public
ri/1.8/system/RubyLex/get_read-i.yaml000064400000000253150403614350013267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#get_read
is_singleton: false
name: get_read
params: ()
visibility: public
ri/1.8/system/RubyLex/peek_match%3f-i.yaml000064400000000267150403614350014120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#peek_match?
is_singleton: false
name: peek_match?
params: (regexp)
visibility: public
ri/1.8/system/RubyLex/identify_here_document-i.yaml000064400000000307150403614350016231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#identify_here_document
is_singleton: false
name: identify_here_document
params: ()
visibility: public
ri/1.8/system/RubyLex/BufferedReader/getc_already_read-i.yaml000064400000000315150403614360020000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#getc_already_read
is_singleton: false
name: getc_already_read
params: ()
visibility: public
ri/1.8/system/RubyLex/BufferedReader/column-i.yaml000064400000000267150403614360015665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#column
is_singleton: false
name: column
params: ()
visibility: public
ri/1.8/system/RubyLex/BufferedReader/divert_read_from-i.yaml000064400000000322150403614370017674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#divert_read_from
is_singleton: false
name: divert_read_from
params: (reserve)
visibility: public
ri/1.8/system/RubyLex/BufferedReader/peek-i.yaml000064400000000265150403614370015313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#peek
is_singleton: false
name: peek
params: (at)
visibility: public
ri/1.8/system/RubyLex/BufferedReader/ungetc-i.yaml000064400000000271150403614370015651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#ungetc
is_singleton: false
name: ungetc
params: (ch)
visibility: public
ri/1.8/system/RubyLex/BufferedReader/new-c.yaml000064400000000270150403614370015146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader::new
is_singleton: true
name: new
params: (content)
visibility: public
ri/1.8/system/RubyLex/BufferedReader/get_read-i.yaml000064400000000273150403614400016132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#get_read
is_singleton: false
name: get_read
params: ()
visibility: public
ri/1.8/system/RubyLex/BufferedReader/getc-i.yaml000064400000000263150403614400015301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#getc
is_singleton: false
name: getc
params: ()
visibility: public
ri/1.8/system/RubyLex/BufferedReader/cdesc-BufferedReader.yaml000064400000003527150403614400020063 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: line_num
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Read an input stream character by character. We allow for unlimited ungetting of characters just read.
- !ruby/struct:SM::Flow::P 
  body: We simplify the implementation greatly by reading the entire input into a buffer initially, and then simply traversing it using pointers.
- !ruby/struct:SM::Flow::P 
  body: "We also have to allow for the <em>here document diversion</em>. This little gem comes about when the lexer encounters a here document. At this point we effectively need to split the input stream into two parts: one to read the body of the here document, the other to read the rest of the input line where the here document was initially encountered. For example, we might have"
- !ruby/struct:SM::Flow::VERB 
  body: "  do_something(&lt;&lt;-A, &lt;&lt;-B)\n    stuff\n    for\n  A\n    stuff\n    for\n  B\n"
- !ruby/struct:SM::Flow::P 
  body: When the lexer encounters the &lt;&lt;A, it reads until the end of the line, and keeps it around for later. It then reads the body of the here document. Once complete, it needs to read the rest of the original line, but then skip the here document body.
constants: []

full_name: RubyLex::BufferedReader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: column
- !ruby/object:RI::MethodSummary 
  name: divert_read_from
- !ruby/object:RI::MethodSummary 
  name: get_read
- !ruby/object:RI::MethodSummary 
  name: getc
- !ruby/object:RI::MethodSummary 
  name: getc_already_read
- !ruby/object:RI::MethodSummary 
  name: peek
- !ruby/object:RI::MethodSummary 
  name: peek_equal
- !ruby/object:RI::MethodSummary 
  name: ungetc
name: BufferedReader
superclass: Object
ri/1.8/system/RubyLex/BufferedReader/peek_equal-i.yaml000064400000000302150403614410016465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex::BufferedReader#peek_equal
is_singleton: false
name: peek_equal
params: (str)
visibility: public
ri/1.8/system/RubyLex/gets-i.yaml000064400000000243150403614410012453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#gets
is_singleton: false
name: gets
params: ()
visibility: public
ri/1.8/system/RubyLex/eof%3f-i.yaml000064400000000243150403614410012560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#eof?
is_singleton: false
name: eof?
params: ()
visibility: public
ri/1.8/system/RubyLex/getc_of_rests-i.yaml000064400000000265150403614420014344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#getc_of_rests
is_singleton: false
name: getc_of_rests
params: ()
visibility: public
ri/1.8/system/RubyLex/peek_equal%3f-i.yaml000064400000000264150403614420014126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#peek_equal?
is_singleton: false
name: peek_equal?
params: (str)
visibility: public
ri/1.8/system/RubyLex/getc-i.yaml000064400000000243150403614420012434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#getc
is_singleton: false
name: getc
params: ()
visibility: public
ri/1.8/system/RubyLex/lex-i.yaml000064400000000241150403614420012300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#lex
is_singleton: false
name: lex
params: ()
visibility: public
ri/1.8/system/RubyLex/token-i.yaml000064400000000245150403614420012634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#token
is_singleton: false
name: token
params: ()
visibility: public
ri/1.8/system/RubyLex/lex_int2-i.yaml000064400000000253150403614420013237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#lex_int2
is_singleton: false
name: lex_int2
params: ()
visibility: public
ri/1.8/system/RubyLex/identify_string-i.yaml000064400000000316150403614420014714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#identify_string
is_singleton: false
name: identify_string
params: (ltype, quoted = ltype)
visibility: public
ri/1.8/system/RubyLex/each_top_level_statement-i.yaml000064400000000374150403614430016555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: "@line, @exp_line_no"
comment: 
full_name: RubyLex#each_top_level_statement
is_singleton: false
name: each_top_level_statement
params: () {|@line, @exp_line_no| ...}
visibility: public
ri/1.8/system/RubyLex/char_no-i.yaml000064400000000251150403614430013123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#char_no
is_singleton: false
name: char_no
params: ()
visibility: public
ri/1.8/system/RubyLex/identify_identifier-i.yaml000064400000000301150403614430015523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyLex#identify_identifier
is_singleton: false
name: identify_identifier
params: ()
visibility: public
ri/1.8/system/RubyLex/cdesc-RubyLex.yaml000064400000014127150403614430013744 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: char_no
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: continue
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: debug_level
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: exception_on_syntax_error
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: exception_on_syntax_error
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: indent
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: indent
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: lex_state
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: line_no
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: read_auto_clean_up
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: readed_auto_clean_up
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: seek
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: skip_space
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: skip_space
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: debug?
- !ruby/object:RI::MethodSummary 
  name: debug?
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Lexical analyzer for Ruby source
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ENINDENT_CLAUSE
  value: "[     \"case\", \"class\", \"def\", \"do\", \"for\", \"if\",     \"module\", \"unless\", \"until\", \"while\", \"begin\""
- !ruby/object:RI::Constant 
  comment: 
  name: DEINDENT_CLAUSE
  value: "[\"end\""
- !ruby/object:RI::Constant 
  comment: 
  name: PERCENT_LTYPE
  value: "{     \"q\" => \"\\'\",     \"Q\" => \"\\\"\",     \"x\" => \"\\`\",     \"r\" => \"/\",     \"w\" => \"]\",     \"W\" => \"]\",     \"s\" => \":\""
- !ruby/object:RI::Constant 
  comment: 
  name: PERCENT_PAREN
  value: "{     \"{\" => \"}\",     \"[\" => \"]\",     \"<\" => \">\",     \"(\" => \")\""
- !ruby/object:RI::Constant 
  comment: 
  name: Ltype2Token
  value: "{     \"\\'\" => TkSTRING,     \"\\\"\" => TkSTRING,     \"\\`\" => TkXSTRING,     \"/\" => TkREGEXP,     \"]\" => TkDSTRING,     \":\" => TkSYMBOL"
- !ruby/object:RI::Constant 
  comment: 
  name: DLtype2Token
  value: "{     \"\\\"\" => TkDSTRING,     \"\\`\" => TkDXSTRING,     \"/\" => TkDREGEXP,   }"
- !ruby/object:RI::Constant 
  comment: 
  name: ENINDENT_CLAUSE
  value: "[     \"case\", \"class\", \"def\", \"do\", \"for\", \"if\",     \"module\", \"unless\", \"until\", \"while\", \"begin\""
- !ruby/object:RI::Constant 
  comment: 
  name: DEINDENT_CLAUSE
  value: "[\"end\""
- !ruby/object:RI::Constant 
  comment: 
  name: PERCENT_LTYPE
  value: "{     \"q\" => \"\\'\",     \"Q\" => \"\\\"\",     \"x\" => \"\\`\",     \"r\" => \"/\",     \"w\" => \"]\""
- !ruby/object:RI::Constant 
  comment: 
  name: PERCENT_PAREN
  value: "{     \"{\" => \"}\",     \"[\" => \"]\",     \"<\" => \">\",     \"(\" => \")\""
- !ruby/object:RI::Constant 
  comment: 
  name: Ltype2Token
  value: "{     \"\\'\" => TkSTRING,     \"\\\"\" => TkSTRING,     \"\\`\" => TkXSTRING,     \"/\" => TkREGEXP,     \"]\" => TkDSTRING"
- !ruby/object:RI::Constant 
  comment: 
  name: DLtype2Token
  value: "{     \"\\\"\" => TkDSTRING,     \"\\`\" => TkDXSTRING,     \"/\" => TkDREGEXP,   }"
full_name: RubyLex
includes: 
- !ruby/object:RI::IncludedModule 
  name: RubyToken
- !ruby/object:RI::IncludedModule 
  name: RubyToken
- !ruby/object:RI::IncludedModule 
  name: IRB
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: buf_input
- !ruby/object:RI::MethodSummary 
  name: char_no
- !ruby/object:RI::MethodSummary 
  name: each_top_level_statement
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: get_read
- !ruby/object:RI::MethodSummary 
  name: get_readed
- !ruby/object:RI::MethodSummary 
  name: getc
- !ruby/object:RI::MethodSummary 
  name: getc
- !ruby/object:RI::MethodSummary 
  name: getc_of_rests
- !ruby/object:RI::MethodSummary 
  name: getc_of_rests
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: identify_comment
- !ruby/object:RI::MethodSummary 
  name: identify_comment
- !ruby/object:RI::MethodSummary 
  name: identify_gvar
- !ruby/object:RI::MethodSummary 
  name: identify_gvar
- !ruby/object:RI::MethodSummary 
  name: identify_here_document
- !ruby/object:RI::MethodSummary 
  name: identify_here_document
- !ruby/object:RI::MethodSummary 
  name: identify_identifier
- !ruby/object:RI::MethodSummary 
  name: identify_identifier
- !ruby/object:RI::MethodSummary 
  name: identify_number
- !ruby/object:RI::MethodSummary 
  name: identify_number
- !ruby/object:RI::MethodSummary 
  name: identify_quotation
- !ruby/object:RI::MethodSummary 
  name: identify_quotation
- !ruby/object:RI::MethodSummary 
  name: identify_string
- !ruby/object:RI::MethodSummary 
  name: identify_string
- !ruby/object:RI::MethodSummary 
  name: initialize_input
- !ruby/object:RI::MethodSummary 
  name: lex
- !ruby/object:RI::MethodSummary 
  name: lex
- !ruby/object:RI::MethodSummary 
  name: lex_init
- !ruby/object:RI::MethodSummary 
  name: lex_init
- !ruby/object:RI::MethodSummary 
  name: lex_int2
- !ruby/object:RI::MethodSummary 
  name: lex_int2
- !ruby/object:RI::MethodSummary 
  name: line_no
- !ruby/object:RI::MethodSummary 
  name: peek
- !ruby/object:RI::MethodSummary 
  name: peek
- !ruby/object:RI::MethodSummary 
  name: peek_equal?
- !ruby/object:RI::MethodSummary 
  name: peek_equal?
- !ruby/object:RI::MethodSummary 
  name: peek_match?
- !ruby/object:RI::MethodSummary 
  name: prompt
- !ruby/object:RI::MethodSummary 
  name: read_escape
- !ruby/object:RI::MethodSummary 
  name: read_escape
- !ruby/object:RI::MethodSummary 
  name: set_input
- !ruby/object:RI::MethodSummary 
  name: set_prompt
- !ruby/object:RI::MethodSummary 
  name: skip_inner_expression
- !ruby/object:RI::MethodSummary 
  name: token
- !ruby/object:RI::MethodSummary 
  name: token
- !ruby/object:RI::MethodSummary 
  name: ungetc
- !ruby/object:RI::MethodSummary 
  name: ungetc
name: RubyLex
superclass: Object
ri/1.8/system/StringScanner/restsize-i.yaml000064400000000503150403614440014551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "<tt>s.restsize</tt> is equivalent to <tt>s.rest_size</tt>. This method is obsolete; use #rest_size instead."
full_name: StringScanner#restsize
is_singleton: false
name: restsize
params: ()
visibility: public
ri/1.8/system/StringScanner/matched-i.yaml000064400000000630150403614440014307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the last matched string.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.match?(/\\w+/)     # -&gt; 4\n  s.matched           # -&gt; &quot;test&quot;\n"
full_name: StringScanner#matched
is_singleton: false
name: matched
params: ()
visibility: public
ri/1.8/system/StringScanner/post_match-i.yaml000064400000001126150403614440015044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the <b><em>post</b>-match</em> (in the regular expression sense) of the last scan.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.scan(/\\w+/)           # -&gt; &quot;test&quot;\n  s.scan(/\\s+/)           # -&gt; &quot; &quot;\n  s.pre_match             # -&gt; &quot;test&quot;\n  s.post_match            # -&gt; &quot;string&quot;\n"
full_name: StringScanner#post_match
is_singleton: false
name: post_match
params: ()
visibility: public
ri/1.8/system/StringScanner/%5b%5d-i.yaml000064400000001464150403614450013562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the n-th subgroup in the most recent match.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;)\n  s.scan(/(\\w+) (\\w+) (\\d+) /)       # -&gt; &quot;Fri Dec 12 &quot;\n  s[0]                               # -&gt; &quot;Fri Dec 12 &quot;\n  s[1]                               # -&gt; &quot;Fri&quot;\n  s[2]                               # -&gt; &quot;Dec&quot;\n  s[3]                               # -&gt; &quot;12&quot;\n  s.post_match                       # -&gt; &quot;1975 14:39&quot;\n  s.pre_match                        # -&gt; &quot;&quot;\n"
full_name: StringScanner#[]
is_singleton: false
name: "[]"
params: " [](n)\n"
visibility: public
ri/1.8/system/StringScanner/exist%3f-i.yaml000064400000001227150403614450014340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Looks <em>ahead</em> to see if the <tt>pattern</tt> exists <em>anywhere</em> in the string, without advancing the scan pointer. This predicates whether a #scan_until will return a value."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.exist? /s/            # -&gt; 3\n  s.scan /test/           # -&gt; &quot;test&quot;\n  s.exist? /s/            # -&gt; 6\n  s.exist? /e/            # -&gt; nil\n"
full_name: StringScanner#exist?
is_singleton: false
name: exist?
params: " exist?(pattern)\n"
visibility: public
ri/1.8/system/StringScanner/empty%3f-i.yaml000064400000000424150403614460014341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equivalent to #eos?. This method is obsolete, use #eos? instead."
full_name: StringScanner#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/StringScanner/terminate-i.yaml000064400000000462150403614460014677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the scan pointer to the end of the string and clear matching data.
full_name: StringScanner#terminate
is_singleton: false
name: terminate
params: |
  terminate
  clear

visibility: public
ri/1.8/system/StringScanner/get_byte-i.yaml000064400000001262150403614470014511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Scans one byte and returns it. This method is NOT multi-byte character sensitive. See also #getch."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('ab')\n  s.get_byte         # =&gt; &quot;a&quot;\n  s.get_byte         # =&gt; &quot;b&quot;\n  s.get_byte         # =&gt; nil\n\n  s = StringScanner.new(&quot;\\244\\242&quot;)\n  s.get_byte         # =&gt; &quot;\\244&quot;\n  s.get_byte         # =&gt; &quot;\\242&quot;\n  s.get_byte         # =&gt; nil\n"
full_name: StringScanner#get_byte
is_singleton: false
name: get_byte
params: ()
visibility: public
ri/1.8/system/StringScanner/string-i.yaml000064400000000363150403614470014216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the string being scanned.
full_name: StringScanner#string
is_singleton: false
name: string
params: ()
visibility: public
ri/1.8/system/StringScanner/eos%3f-i.yaml000064400000000757150403614470014003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the scan pointer is at the end of the string.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  p s.eos?          # =&gt; false\n  s.scan(/test/)\n  p s.eos?          # =&gt; false\n  s.terminate\n  p s.eos?          # =&gt; true\n"
full_name: StringScanner#eos?
is_singleton: false
name: eos?
params: ()
visibility: public
ri/1.8/system/StringScanner/cdesc-StringScanner.yaml000064400000016645150403614500016325 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: must_C_version
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "StringScanner provides for lexical scanning operations on a String. Here is an example of its usage:"
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('This is an example string')\n  s.eos?               # -&gt; false\n\n  p s.scan(/\\w+/)      # -&gt; &quot;This&quot;\n  p s.scan(/\\w+/)      # -&gt; nil\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\s+/)      # -&gt; nil\n  p s.scan(/\\w+/)      # -&gt; &quot;is&quot;\n  s.eos?               # -&gt; false\n\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\w+/)      # -&gt; &quot;an&quot;\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\w+/)      # -&gt; &quot;example&quot;\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\w+/)      # -&gt; &quot;string&quot;\n  s.eos?               # -&gt; true\n\n  p s.scan(/\\s+/)      # -&gt; nil\n  p s.scan(/\\w+/)      # -&gt; nil\n"
- !ruby/struct:SM::Flow::P 
  body: Scanning a string means remembering the position of a <em>scan pointer</em>, which is just an index. The point of scanning is to move forward a bit at a time, so matches are sought after the scan pointer; usually immediately after it.
- !ruby/struct:SM::Flow::P 
  body: "Given the string &quot;test string&quot;, here are the pertinent scan pointer positions:"
- !ruby/struct:SM::Flow::VERB 
  body: "    t e s t   s t r i n g\n  0 1 2 ...             1\n                        0\n"
- !ruby/struct:SM::Flow::P 
  body: "When you #scan for a pattern (a regular expression), the match must occur at the character after the scan pointer. If you use #scan_until, then the match can occur anywhere after the scan pointer. In both cases, the scan pointer moves <em>just beyond</em> the last character of the match, ready to scan again from the next character onwards. This is demonstrated by the example above."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Method Categories
- !ruby/struct:SM::Flow::P 
  body: There are other methods besides the plain scanners. You can look ahead in the string without actually scanning. You can access the most recent match. You can modify the string being scanned, reset or terminate the scanner, find out or change the position of the scan pointer, skip ahead, and so on.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Advancing the Scan Pointer
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#getch"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#get_byte"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#scan"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#scan_until"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#skip"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#skip_until"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Looking Ahead
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#check"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#check_until"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#exist?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#match?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#peek"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Finding Where we Are
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#beginning_of_line? (#bol?)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#eos?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rest?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rest_size"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#pos"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Setting Where we Are
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#reset"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#terminate"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#pos="
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Match Data
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#matched"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#matched?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#matched_size"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "[]"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#pre_match"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#post_match"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Miscellaneous
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "&lt;&lt;"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#concat"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#string"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#string="
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#unscan"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: There are aliases to several of the methods.
constants: []

full_name: StringScanner
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: beginning_of_line?
- !ruby/object:RI::MethodSummary 
  name: check
- !ruby/object:RI::MethodSummary 
  name: check_until
- !ruby/object:RI::MethodSummary 
  name: clear
- !ruby/object:RI::MethodSummary 
  name: concat
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: eos?
- !ruby/object:RI::MethodSummary 
  name: exist?
- !ruby/object:RI::MethodSummary 
  name: get_byte
- !ruby/object:RI::MethodSummary 
  name: getbyte
- !ruby/object:RI::MethodSummary 
  name: getch
- !ruby/object:RI::MethodSummary 
  name: initialize_copy
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: match?
- !ruby/object:RI::MethodSummary 
  name: matched
- !ruby/object:RI::MethodSummary 
  name: matched?
- !ruby/object:RI::MethodSummary 
  name: matched_size
- !ruby/object:RI::MethodSummary 
  name: matchedsize
- !ruby/object:RI::MethodSummary 
  name: peek
- !ruby/object:RI::MethodSummary 
  name: peep
- !ruby/object:RI::MethodSummary 
  name: pointer
- !ruby/object:RI::MethodSummary 
  name: pointer=
- !ruby/object:RI::MethodSummary 
  name: pos
- !ruby/object:RI::MethodSummary 
  name: pos=
- !ruby/object:RI::MethodSummary 
  name: post_match
- !ruby/object:RI::MethodSummary 
  name: pre_match
- !ruby/object:RI::MethodSummary 
  name: reset
- !ruby/object:RI::MethodSummary 
  name: rest
- !ruby/object:RI::MethodSummary 
  name: rest?
- !ruby/object:RI::MethodSummary 
  name: rest_size
- !ruby/object:RI::MethodSummary 
  name: restsize
- !ruby/object:RI::MethodSummary 
  name: scan
- !ruby/object:RI::MethodSummary 
  name: scan_full
- !ruby/object:RI::MethodSummary 
  name: scan_until
- !ruby/object:RI::MethodSummary 
  name: search_full
- !ruby/object:RI::MethodSummary 
  name: skip
- !ruby/object:RI::MethodSummary 
  name: skip_until
- !ruby/object:RI::MethodSummary 
  name: string
- !ruby/object:RI::MethodSummary 
  name: string=
- !ruby/object:RI::MethodSummary 
  name: terminate
- !ruby/object:RI::MethodSummary 
  name: unscan
name: StringScanner
superclass: Object
ri/1.8/system/StringScanner/matched_size-i.yaml000064400000001102150403614500015331 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the size of the most recent match (see #matched), or <tt>nil</tt> if there was no recent match."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.check /\\w+/           # -&gt; &quot;test&quot;\n  s.matched_size          # -&gt; 4\n  s.check /\\d+/           # -&gt; nil\n  s.matched_size          # -&gt; nil\n"
full_name: StringScanner#matched_size
is_singleton: false
name: matched_size
params: ()
visibility: public
ri/1.8/system/StringScanner/scan_until-i.yaml000064400000001316150403614510015041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Scans the string <em>until</em> the <tt>pattern</tt> is matched. Returns the substring up to and including the end of the match, advancing the scan pointer to that location. If there is no match, <tt>nil</tt> is returned.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;)\n  s.scan_until(/1/)        # -&gt; &quot;Fri Dec 1&quot;\n  s.pre_match              # -&gt; &quot;Fri Dec &quot;\n  s.scan_until(/XYZ/)      # -&gt; nil\n"
full_name: StringScanner#scan_until
is_singleton: false
name: scan_until
params: " scan_until(pattern)\n"
visibility: public
ri/1.8/system/StringScanner/peek-i.yaml000064400000000760150403614510013630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extracts a string corresponding to <tt>string[pos,len]</tt>, without advancing the scan pointer.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.peek(7)          # =&gt; &quot;test st&quot;\n  s.peek(7)          # =&gt; &quot;test st&quot;\n"
full_name: StringScanner#peek
is_singleton: false
name: peek
params: " peek(len)\n"
visibility: public
ri/1.8/system/StringScanner/concat-i.yaml000064400000001134150403614510014147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Appends <tt>str</tt> to the string being scanned. This method does not affect scan pointer.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;)\n  s.scan(/Fri /)\n  s &lt;&lt; &quot; +1000 GMT&quot;\n  s.string            # -&gt; &quot;Fri Dec 12 1975 14:39 +1000 GMT&quot;\n  s.scan(/Dec/)       # -&gt; &quot;Dec&quot;\n"
full_name: StringScanner#concat
is_singleton: false
name: concat
params: |
  concat(str)
  <<(str)

visibility: public
ri/1.8/system/StringScanner/skip_until-i.yaml000064400000001612150403614510015062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Advances the scan pointer until <tt>pattern</tt> is matched and consumed. Returns the number of bytes advanced, or <tt>nil</tt> if no match was found.
- !ruby/struct:SM::Flow::P 
  body: Look ahead to match <tt>pattern</tt>, and advance the scan pointer to the <em>end</em> of the match. Return the number of characters advanced, or <tt>nil</tt> if the match was unsuccessful.
- !ruby/struct:SM::Flow::P 
  body: "It's similar to #scan_until, but without returning the intervening string."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;)\n  s.skip_until /12/           # -&gt; 10\n  s                           #\n"
full_name: StringScanner#skip_until
is_singleton: false
name: skip_until
params: " skip_until(pattern)\n"
visibility: public
ri/1.8/system/StringScanner/match%3f-i.yaml000064400000001104150403614510014267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Tests whether the given <tt>pattern</tt> is matched from the current scan pointer. Returns the length of the match, or <tt>nil</tt>. The scan pointer is not advanced.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  p s.match?(/\\w+/)   # -&gt; 4\n  p s.match?(/\\w+/)   # -&gt; 4\n  p s.match?(/\\s+/)   # -&gt; nil\n"
full_name: StringScanner#match?
is_singleton: false
name: match?
params: " match?(pattern)\n"
visibility: public
ri/1.8/system/StringScanner/Error/cdesc-Error.yaml000064400000012436150403614520015723 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-class: StringScanner"
- !ruby/struct:SM::Flow::P 
  body: "StringScanner provides for lexical scanning operations on a String. Here is an example of its usage:"
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('This is an example string')\n  s.eos?               # -&gt; false\n\n  p s.scan(/\\w+/)      # -&gt; &quot;This&quot;\n  p s.scan(/\\w+/)      # -&gt; nil\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\s+/)      # -&gt; nil\n  p s.scan(/\\w+/)      # -&gt; &quot;is&quot;\n  s.eos?               # -&gt; false\n\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\w+/)      # -&gt; &quot;an&quot;\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\w+/)      # -&gt; &quot;example&quot;\n  p s.scan(/\\s+/)      # -&gt; &quot; &quot;\n  p s.scan(/\\w+/)      # -&gt; &quot;string&quot;\n  s.eos?               # -&gt; true\n\n  p s.scan(/\\s+/)      # -&gt; nil\n  p s.scan(/\\w+/)      # -&gt; nil\n"
- !ruby/struct:SM::Flow::P 
  body: Scanning a string means remembering the position of a <em>scan pointer</em>, which is just an index. The point of scanning is to move forward a bit at a time, so matches are sought after the scan pointer; usually immediately after it.
- !ruby/struct:SM::Flow::P 
  body: "Given the string &quot;test string&quot;, here are the pertinent scan pointer positions:"
- !ruby/struct:SM::Flow::VERB 
  body: "    t e s t   s t r i n g\n  0 1 2 ...             1\n                        0\n"
- !ruby/struct:SM::Flow::P 
  body: "When you #scan for a pattern (a regular expression), the match must occur at the character after the scan pointer. If you use #scan_until, then the match can occur anywhere after the scan pointer. In both cases, the scan pointer moves <em>just beyond</em> the last character of the match, ready to scan again from the next character onwards. This is demonstrated by the example above."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Method Categories
- !ruby/struct:SM::Flow::P 
  body: There are other methods besides the plain scanners. You can look ahead in the string without actually scanning. You can access the most recent match. You can modify the string being scanned, reset or terminate the scanner, find out or change the position of the scan pointer, skip ahead, and so on.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Advancing the Scan Pointer
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#getch"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#get_byte"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#scan"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#scan_until"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#skip"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#skip_until"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Looking Ahead
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#check"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#check_until"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#exist?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#match?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#peek"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Finding Where we Are
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#beginning_of_line? (#bol?)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#eos?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rest?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rest_size"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#pos"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Setting Where we Are
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#reset"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#terminate"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#pos="
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Match Data
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#matched"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#matched?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#matched_size"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "[]"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#pre_match"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#post_match"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Miscellaneous
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "&lt;&lt;"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#concat"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#string"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#string="
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#unscan"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: There are aliases to several of the methods.
constants: []

full_name: StringScanner::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/StringScanner/scan_full-i.yaml000064400000001151150403614530014647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Tests whether the given <tt>pattern</tt> is matched from the current scan pointer. Returns the matched string if <tt>return_string_p</tt> is true. Advances the scan pointer if <tt>advance_pointer_p</tt> is true. The match register is affected.
- !ruby/struct:SM::Flow::P 
  body: "&quot;full&quot; means &quot;#scan with full parameters&quot;."
full_name: StringScanner#scan_full
is_singleton: false
name: scan_full
params: " scan_full(pattern, return_string_p, advance_pointer_p)\n"
visibility: public
ri/1.8/system/StringScanner/check-i.yaml000064400000001443150403614530013762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This returns the value that #scan would return, without advancing the scan pointer. The match register is affected, though."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;)\n  s.check /Fri/               # -&gt; &quot;Fri&quot;\n  s.pos                       # -&gt; 0\n  s.matched                   # -&gt; &quot;Fri&quot;\n  s.check /12/                # -&gt; nil\n  s.matched                   # -&gt; nil\n"
- !ruby/struct:SM::Flow::P 
  body: "Mnemonic: it &quot;checks&quot; to see whether a #scan will return a value."
full_name: StringScanner#check
is_singleton: false
name: check
params: " check(pattern)\n"
visibility: public
ri/1.8/system/StringScanner/search_full-i.yaml000064400000001073150403614530015173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Scans the string <em>until</em> the <tt>pattern</tt> is matched. Returns the matched string if <tt>return_string_p</tt> is true, otherwise returns the number of bytes advanced. Advances the scan pointer if <tt>advance_pointer_p</tt>, otherwise not. This method does affect the match register.
full_name: StringScanner#search_full
is_singleton: false
name: search_full
params: " search_full(pattern, return_string_p, advance_pointer_p)\n"
visibility: public
ri/1.8/system/StringScanner/getbyte-i.yaml000064400000000436150403614540014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equivalent to #get_byte. This method is obsolete; use #get_byte instead."
full_name: StringScanner#getbyte
is_singleton: false
name: getbyte
params: ()
visibility: public
ri/1.8/system/StringScanner/pointer-i.yaml000064400000001407150403614540014366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the position of the scan pointer. In the 'reset' position, this value is zero. In the 'terminated' position (i.e. the string is exhausted), this value is the length of the string.
- !ruby/struct:SM::Flow::P 
  body: In short, it's a 0-based index into the string.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.pos               # -&gt; 0\n  s.scan_until /str/  # -&gt; &quot;test str&quot;\n  s.pos               # -&gt; 8\n  s.terminate         # -&gt; #&lt;StringScanner fin&gt;\n  s.pos               # -&gt; 11\n"
full_name: StringScanner#pointer
is_singleton: false
name: pointer
params: ()
visibility: public
ri/1.8/system/StringScanner/pointer%3d-i.yaml000064400000000635150403614540014664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Modify the scan pointer.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.pos = 7            # -&gt; 7\n  s.rest               # -&gt; &quot;ring&quot;\n"
full_name: StringScanner#pointer=
is_singleton: false
name: pointer=
params: " pos=(n)\n"
visibility: public
ri/1.8/system/StringScanner/inspect-i.yaml000064400000001615150403614540014354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a string that represents the StringScanner object, showing:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: the current position
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: the size of the string
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: the characters surrounding the scan pointer
  - !ruby/struct:SM::Flow::P 
    body: "s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;) s.inspect # -&gt; '#&lt;StringScanner 0/21 @ &quot;Fri D...&quot;&gt;' s.scan_until /12/ # -&gt; &quot;Fri Dec 12&quot; s.inspect # -&gt; '#&lt;StringScanner 10/21 &quot;...ec 12&quot; @ &quot; 1975...&quot;&gt;'"
  type: :BULLET
full_name: StringScanner#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/StringScanner/check_until-i.yaml000064400000001345150403614540015177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This returns the value that #scan_until would return, without advancing the scan pointer. The match register is affected, though."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;)\n  s.check_until /12/          # -&gt; &quot;Fri Dec 12&quot;\n  s.pos                       # -&gt; 0\n  s.matched                   # -&gt; 12\n"
- !ruby/struct:SM::Flow::P 
  body: "Mnemonic: it &quot;checks&quot; to see whether a #scan_until will return a value."
full_name: StringScanner#check_until
is_singleton: false
name: check_until
params: " check_until(pattern)\n"
visibility: public
ri/1.8/system/StringScanner/scan-i.yaml000064400000001331150403614540013626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Tries to match with <tt>pattern</tt> at the current position. If there's a match, the scanner advances the &quot;scan pointer&quot; and returns the matched string. Otherwise, the scanner returns <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  p s.scan(/\\w+/)   # -&gt; &quot;test&quot;\n  p s.scan(/\\w+/)   # -&gt; nil\n  p s.scan(/\\s+/)   # -&gt; &quot; &quot;\n  p s.scan(/\\w+/)   # -&gt; &quot;string&quot;\n  p s.scan(/./)     # -&gt; nil\n"
full_name: StringScanner#scan
is_singleton: false
name: scan
params: " scan(pattern) => String\n"
visibility: public
ri/1.8/system/StringScanner/peep-i.yaml000064400000000422150403614550013634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equivalent to #peek. This method is obsolete; use #peek instead."
full_name: StringScanner#peep
is_singleton: false
name: peep
params: (p1)
visibility: public
ri/1.8/system/StringScanner/beginning_of_line%3f-i.yaml000064400000001113150403614550016632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the scan pointer is at the beginning of the line.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;test\\ntest\\n&quot;)\n  s.bol?           # =&gt; true\n  s.scan(/te/)\n  s.bol?           # =&gt; false\n  s.scan(/st\\n/)\n  s.bol?           # =&gt; true\n  s.terminate\n  s.bol?           # =&gt; true\n"
full_name: StringScanner#beginning_of_line?
is_singleton: false
name: beginning_of_line?
params: ()
visibility: public
ri/1.8/system/StringScanner/new-c.yaml000064400000000563150403614550013474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new StringScanner object to scan over the given <tt>string</tt>. <tt>dup</tt> argument is obsolete and not used now.
full_name: StringScanner::new
is_singleton: true
name: new
params: " StringScanner.new(string, dup = false)\n"
visibility: public
ri/1.8/system/StringScanner/initialize_copy-i.yaml000064400000000424150403614550016100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Duplicates a StringScanner object.
full_name: StringScanner#initialize_copy
is_singleton: false
name: initialize_copy
params: |
  dup
  clone

visibility: public
ri/1.8/system/StringScanner/matchedsize-i.yaml000064400000000456150403614560015213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equivalent to #matched_size. This method is obsolete; use #matched_size instead."
full_name: StringScanner#matchedsize
is_singleton: false
name: matchedsize
params: ()
visibility: public
ri/1.8/system/StringScanner/%3c%3c-i.yaml000064400000001126150403614560013553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Appends <tt>str</tt> to the string being scanned. This method does not affect scan pointer.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new(&quot;Fri Dec 12 1975 14:39&quot;)\n  s.scan(/Fri /)\n  s &lt;&lt; &quot; +1000 GMT&quot;\n  s.string            # -&gt; &quot;Fri Dec 12 1975 14:39 +1000 GMT&quot;\n  s.scan(/Dec/)       # -&gt; &quot;Dec&quot;\n"
full_name: StringScanner#<<
is_singleton: false
name: "<<"
params: |
  concat(str)
  <<(str)

visibility: public
ri/1.8/system/StringScanner/pos-i.yaml000064400000001377150403614560013517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the position of the scan pointer. In the 'reset' position, this value is zero. In the 'terminated' position (i.e. the string is exhausted), this value is the length of the string.
- !ruby/struct:SM::Flow::P 
  body: In short, it's a 0-based index into the string.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.pos               # -&gt; 0\n  s.scan_until /str/  # -&gt; &quot;test str&quot;\n  s.pos               # -&gt; 8\n  s.terminate         # -&gt; #&lt;StringScanner fin&gt;\n  s.pos               # -&gt; 11\n"
full_name: StringScanner#pos
is_singleton: false
name: pos
params: ()
visibility: public
ri/1.8/system/StringScanner/pre_match-i.yaml000064400000001123150403614570014646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the <b><em>pre</b>-match</em> (in the regular expression sense) of the last scan.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.scan(/\\w+/)           # -&gt; &quot;test&quot;\n  s.scan(/\\s+/)           # -&gt; &quot; &quot;\n  s.pre_match             # -&gt; &quot;test&quot;\n  s.post_match            # -&gt; &quot;string&quot;\n"
full_name: StringScanner#pre_match
is_singleton: false
name: pre_match
params: ()
visibility: public
ri/1.8/system/StringScanner/skip-i.yaml000064400000001436150403614570013661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempts to skip over the given <tt>pattern</tt> beginning with the scan pointer. If it matches, the scan pointer is advanced to the end of the match, and the length of the match is returned. Otherwise, <tt>nil</tt> is returned.
- !ruby/struct:SM::Flow::P 
  body: "It's similar to #scan, but without returning the matched string."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  p s.skip(/\\w+/)   # -&gt; 4\n  p s.skip(/\\w+/)   # -&gt; nil\n  p s.skip(/\\s+/)   # -&gt; 1\n  p s.skip(/\\w+/)   # -&gt; 6\n  p s.skip(/./)     # -&gt; nil\n"
full_name: StringScanner#skip
is_singleton: false
name: skip
params: " skip(pattern)\n"
visibility: public
ri/1.8/system/StringScanner/rest_size-i.yaml000064400000000423150403614600014707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>s.rest_size</tt> is equivalent to <tt>s.rest.size</tt>.
full_name: StringScanner#rest_size
is_singleton: false
name: rest_size
params: ()
visibility: public
ri/1.8/system/StringScanner/getch-i.yaml000064400000001301150403614600013766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Scans one character and returns it. This method is multi-byte character sensitive. See also #get_byte."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('ab')\n  s.getch           # =&gt; &quot;a&quot;\n  s.getch           # =&gt; &quot;b&quot;\n  s.getch           # =&gt; nil\n\n  $KCODE = 'EUC'\n  s = StringScanner.new(&quot;\\244\\242&quot;)\n  s.getch           # =&gt; &quot;\\244\\242&quot;   # Japanese hira-kana &quot;A&quot; in EUC-JP\n  s.getch           # =&gt; nil\n"
full_name: StringScanner#getch
is_singleton: false
name: getch
params: ()
visibility: public
ri/1.8/system/StringScanner/must_C_version-c.yaml000064400000000463150403614610015676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method is defined for backward compatibility.
full_name: StringScanner::must_C_version
is_singleton: true
name: must_C_version
params: " StringScanner.must_C_version\n"
visibility: public
ri/1.8/system/StringScanner/reset-i.yaml000064400000000411150403614610014020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reset the scan pointer (index 0) and clear matching data.
full_name: StringScanner#reset
is_singleton: false
name: reset
params: ()
visibility: public
ri/1.8/system/StringScanner/matched%3f-i.yaml000064400000000757150403614620014617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the last match was successful.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.match?(/\\w+/)     # =&gt; 4\n  s.matched?          # =&gt; true\n  s.match?(/\\d+/)     # =&gt; nil\n  s.matched?          # =&gt; false\n"
full_name: StringScanner#matched?
is_singleton: false
name: matched?
params: ()
visibility: public
ri/1.8/system/StringScanner/pos%3d-i.yaml000064400000000625150403614620014003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Modify the scan pointer.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.pos = 7            # -&gt; 7\n  s.rest               # -&gt; &quot;ring&quot;\n"
full_name: StringScanner#pos=
is_singleton: false
name: pos=
params: " pos=(n)\n"
visibility: public
ri/1.8/system/StringScanner/clear-i.yaml000064400000000434150403614630013773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equivalent to #terminate. This method is obsolete; use #terminate instead."
full_name: StringScanner#clear
is_singleton: false
name: clear
params: ()
visibility: public
ri/1.8/system/StringScanner/string%3d-i.yaml000064400000000501150403614630014502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes the string being scanned to <tt>str</tt> and resets the scanner. Returns <tt>str</tt>.
full_name: StringScanner#string=
is_singleton: false
name: string=
params: " string=(str)\n"
visibility: public
ri/1.8/system/StringScanner/unscan-i.yaml000064400000001211150403614630014166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the scan pointer to the previous position. Only one previous position is remembered, and it changes with each scanning operation.
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.scan(/\\w+/)        # =&gt; &quot;test&quot;\n  s.unscan\n  s.scan(/../)         # =&gt; &quot;te&quot;\n  s.scan(/\\d/)         # =&gt; nil\n  s.unscan             # ScanError: unscan failed: previous match had failed\n"
full_name: StringScanner#unscan
is_singleton: false
name: unscan
params: ()
visibility: public
ri/1.8/system/StringScanner/rest%3f-i.yaml000064400000000730150403614640014160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true iff there is more data in the string. See #eos?. This method is obsolete; use #eos? instead."
- !ruby/struct:SM::Flow::VERB 
  body: "  s = StringScanner.new('test string')\n  s.eos?              # These two\n  s.rest?             # are opposites.\n"
full_name: StringScanner#rest?
is_singleton: false
name: rest?
params: ()
visibility: public
ri/1.8/system/StringScanner/rest-i.yaml000064400000000554150403614640013666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the &quot;rest&quot; of the string (i.e. everything after the scan pointer). If there is no more data (eos? = true), it returns <tt>&quot;&quot;</tt>.
full_name: StringScanner#rest
is_singleton: false
name: rest
params: ()
visibility: public
ri/1.8/system/Interrupt/cdesc-Interrupt.yaml000064400000001176150403614650014754 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: Interrupt
includes: []

instance_methods: []

name: Interrupt
superclass: SignalException
ri/1.8/system/Find/find-i.yaml000064400000000711150403614660011726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: path
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls the associated block with the name of every file and directory listed as arguments, then recursively on their subdirectories, and so on.
- !ruby/struct:SM::Flow::P 
  body: See the <tt>Find</tt> module documentation for an example.
full_name: Find#find
is_singleton: false
name: find
params: (*paths) {|path| ...}
visibility: public
ri/1.8/system/Find/cdesc-Find.yaml000064400000001652150403614660012524 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Find</tt> module supports the top-down traversal of a set of file paths.
- !ruby/struct:SM::Flow::P 
  body: "For example, to total the size of all files under your home directory, ignoring anything in a &quot;dot&quot; directory (e.g. $HOME/.ssh):"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'find'\n\n  total_size = 0\n\n  Find.find(ENV[&quot;HOME&quot;]) do |path|\n    if FileTest.directory?(path)\n      if File.basename(path)[0] == ?.\n        Find.prune       # Don't look any further into this directory.\n      else\n        next\n      end\n    else\n      total_size += FileTest.size(path)\n    end\n  end\n"
constants: []

full_name: Find
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find
- !ruby/object:RI::MethodSummary 
  name: prune
name: Find
superclass: 
ri/1.8/system/Find/prune-i.yaml000064400000001004150403614670012134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: See the <tt>Find</tt> module documentation for an example.
full_name: Find#prune
is_singleton: false
name: prune
params: ()
visibility: public
ri/1.8/system/Shell/Cat/each-i.yaml000064400000000271150403614700012600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: l
comment: 
full_name: Shell::Cat#each
is_singleton: false
name: each
params: (rs = nil) {|l| ...}
visibility: public
ri/1.8/system/Shell/Cat/new-c.yaml000064400000000262150403614700012463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Cat::new
is_singleton: true
name: new
params: (sh, *filenames)
visibility: public
ri/1.8/system/Shell/Cat/cdesc-Cat.yaml000064400000000431150403614700013236 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Shell::Cat
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
name: Cat
superclass: BuiltInCommand
ri/1.8/system/Shell/def_system_command-c.yaml000064400000000414150403614710015023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: command definitions
full_name: Shell::def_system_command
is_singleton: true
name: def_system_command
params: (command, path = command)
visibility: public
ri/1.8/system/Shell/Filter/input%3d-i.yaml000064400000000263150403614720014054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#input=
is_singleton: false
name: input=
params: (filter)
visibility: public
ri/1.8/system/Shell/Filter/each-i.yaml000064400000000274150403614720013323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: l
comment: 
full_name: Shell::Filter#each
is_singleton: false
name: each
params: (rs = nil) {|l| ...}
visibility: public
ri/1.8/system/Shell/Filter/to_a-i.yaml000064400000000251150403614720013340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/Shell/Filter/%7c-i.yaml000064400000000253150403614730012777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#|
is_singleton: false
name: "|"
params: (filter)
visibility: public
ri/1.8/system/Shell/Filter/cdesc-Filter.yaml000064400000001637150403614730014506 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: input
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Filter A method to require
- !ruby/struct:SM::Flow::VERB 
  body: "   each()\n"
constants: []

full_name: Shell::Filter
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: <
- !ruby/object:RI::MethodSummary 
  name: ">"
- !ruby/object:RI::MethodSummary 
  name: ">>"
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: input=
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: "|"
name: Filter
superclass: Object
ri/1.8/system/Shell/Filter/%3c-i.yaml000064400000000246150403614730012775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#<
is_singleton: false
name: <
params: (src)
visibility: public
ri/1.8/system/Shell/Filter/inspect-i.yaml000064400000000257150403614730014072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Shell/Filter/new-c.yaml000064400000000251150403614730013202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter::new
is_singleton: true
name: new
params: (sh)
visibility: public
ri/1.8/system/Shell/Filter/%3e%3e-i.yaml000064400000000251150403614730013270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#>>
is_singleton: false
name: ">>"
params: (to)
visibility: public
ri/1.8/system/Shell/Filter/%2b-i.yaml000064400000000251150403614740012770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#+
is_singleton: false
name: +
params: (filter)
visibility: public
ri/1.8/system/Shell/Filter/to_s-i.yaml000064400000000251150403614740013364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Shell/Filter/%3e-i.yaml000064400000000247150403614740013001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Filter#>
is_singleton: false
name: ">"
params: (to)
visibility: public
ri/1.8/system/Shell/cd-c.yaml000064400000000241150403614740011552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::cd
is_singleton: true
name: cd
params: (path)
visibility: public
ri/1.8/system/Shell/notify-c.yaml000064400000000333150403614750012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: mes if iterator?
comment: 
full_name: Shell::notify
is_singleton: true
name: notify
params: (*opts, &block) {|mes if iterator?| ...}
visibility: public
ri/1.8/system/Shell/default_record_separator-c.yaml000064400000000311150403614750016225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::default_record_separator
is_singleton: true
name: default_record_separator
params: ()
visibility: public
ri/1.8/system/Shell/Echo/each-i.yaml000064400000000310150403614750012746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: str + rs
comment: 
full_name: Shell::Echo#each
is_singleton: false
name: each
params: (rs = nil) {|str + rs| ...}
visibility: public
ri/1.8/system/Shell/Echo/new-c.yaml000064400000000261150403614750012636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Echo::new
is_singleton: true
name: new
params: (sh, *strings)
visibility: public
ri/1.8/system/Shell/Echo/cdesc-Echo.yaml000064400000000433150403614750013563 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Shell::Echo
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
name: Echo
superclass: BuiltInCommand
ri/1.8/system/Shell/Tee/each-i.yaml000064400000000271150403614760012614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: l
comment: 
full_name: Shell::Tee#each
is_singleton: false
name: each
params: (rs = nil) {|l| ...}
visibility: public
ri/1.8/system/Shell/Tee/new-c.yaml000064400000000260150403614770012476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Tee::new
is_singleton: true
name: new
params: (sh, filename)
visibility: public
ri/1.8/system/Shell/Tee/cdesc-Tee.yaml000064400000000431150403614770013261 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Shell::Tee
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
name: Tee
superclass: BuiltInCommand
ri/1.8/system/Shell/alias_command-c.yaml000064400000000316150403614770013761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::alias_command
is_singleton: true
name: alias_command
params: (ali, command, *opts, &block)
visibility: public
ri/1.8/system/Shell/Concat/each-i.yaml000064400000000274150403615000013275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: l
comment: 
full_name: Shell::Concat#each
is_singleton: false
name: each
params: (rs = nil) {|l| ...}
visibility: public
ri/1.8/system/Shell/Concat/cdesc-Concat.yaml000064400000000437150403615000014436 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Shell::Concat
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
name: Concat
superclass: BuiltInCommand
ri/1.8/system/Shell/Concat/new-c.yaml000064400000000260150403615000013153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Concat::new
is_singleton: true
name: new
params: (sh, *jobs)
visibility: public
ri/1.8/system/Shell/Error/cdesc-Error.yaml000064400000000270150403615010014176 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Shell::Error
includes: []

instance_methods: []

name: Error
superclass: 
ri/1.8/system/Shell/jobs-i.yaml000064400000000330150403615010012115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: process management
full_name: Shell#jobs
is_singleton: false
name: jobs
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/terminate_job-i.yaml000064400000000401150403615020017464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: terminate a job
full_name: Shell::ProcessController#terminate_job
is_singleton: false
name: terminate_job
params: (command)
visibility: public
ri/1.8/system/Shell/ProcessController/each_active_object-c.yaml000064400000000337150403615020020425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ref
comment: 
full_name: Shell::ProcessController::each_active_object
is_singleton: true
name: each_active_object
params: () {|ref| ...}
visibility: public
ri/1.8/system/Shell/ProcessController/wait_all_jobs_execution-i.yaml000064400000000435150403615030021546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: wait for all jobs to terminate
full_name: Shell::ProcessController#wait_all_jobs_execution
is_singleton: false
name: wait_all_jobs_execution
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/kill_job-i.yaml000064400000000367150403615030016443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: kill a job
full_name: Shell::ProcessController#kill_job
is_singleton: false
name: kill_job
params: (sig, command)
visibility: public
ri/1.8/system/Shell/ProcessController/waiting_jobs-i.yaml000064400000000304150403615030017324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#waiting_jobs
is_singleton: false
name: waiting_jobs
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/jobs-i.yaml000064400000000264150403615030015607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#jobs
is_singleton: false
name: jobs
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/active_jobs-i.yaml000064400000000302150403615030017133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#active_jobs
is_singleton: false
name: active_jobs
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/activate-c.yaml000064400000000276150403615030016447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController::activate
is_singleton: true
name: activate
params: (pc)
visibility: public
ri/1.8/system/Shell/ProcessController/add_schedule-i.yaml000064400000000402150403615030017250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: schedule a command
full_name: Shell::ProcessController#add_schedule
is_singleton: false
name: add_schedule
params: (command)
visibility: public
ri/1.8/system/Shell/ProcessController/waiting_job%3f-i.yaml000064400000000307150403615030017442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#waiting_job?
is_singleton: false
name: waiting_job?
params: (job)
visibility: public
ri/1.8/system/Shell/ProcessController/new-c.yaml000064400000000267150403615040015441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController::new
is_singleton: true
name: new
params: (shell)
visibility: public
ri/1.8/system/Shell/ProcessController/start_job-i.yaml000064400000000373150403615040016643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: start a job
full_name: Shell::ProcessController#start_job
is_singleton: false
name: start_job
params: (command = nil)
visibility: public
ri/1.8/system/Shell/ProcessController/process_controllers_exclusive-c.yaml000064400000000361150403615040023036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: Shell::ProcessController::process_controllers_exclusive
is_singleton: true
name: process_controllers_exclusive
params: () {|| ...}
visibility: public
ri/1.8/system/Shell/ProcessController/waiting_jobs_exist%3f-i.yaml000064400000000322150403615040021037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#waiting_jobs_exist?
is_singleton: false
name: waiting_jobs_exist?
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/inactivate-c.yaml000064400000000302150403615040016765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController::inactivate
is_singleton: true
name: inactivate
params: (pc)
visibility: public
ri/1.8/system/Shell/ProcessController/active_job%3f-i.yaml000064400000000305150403615040017252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#active_job?
is_singleton: false
name: active_job?
params: (job)
visibility: public
ri/1.8/system/Shell/ProcessController/cdesc-ProcessController.yaml000064400000002355150403615040021171 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: activate
- !ruby/object:RI::MethodSummary 
  name: each_active_object
- !ruby/object:RI::MethodSummary 
  name: inactivate
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: process_controllers_exclusive
comment: 
constants: []

full_name: Shell::ProcessController
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: active_job?
- !ruby/object:RI::MethodSummary 
  name: active_jobs
- !ruby/object:RI::MethodSummary 
  name: active_jobs_exist?
- !ruby/object:RI::MethodSummary 
  name: add_schedule
- !ruby/object:RI::MethodSummary 
  name: jobs
- !ruby/object:RI::MethodSummary 
  name: jobs_exist?
- !ruby/object:RI::MethodSummary 
  name: kill_job
- !ruby/object:RI::MethodSummary 
  name: sfork
- !ruby/object:RI::MethodSummary 
  name: start_job
- !ruby/object:RI::MethodSummary 
  name: terminate_job
- !ruby/object:RI::MethodSummary 
  name: wait_all_jobs_execution
- !ruby/object:RI::MethodSummary 
  name: waiting_job?
- !ruby/object:RI::MethodSummary 
  name: waiting_jobs
- !ruby/object:RI::MethodSummary 
  name: waiting_jobs_exist?
name: ProcessController
superclass: Object
ri/1.8/system/Shell/ProcessController/jobs_exist%3f-i.yaml000064400000000302150403615040017313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#jobs_exist?
is_singleton: false
name: jobs_exist?
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/active_jobs_exist%3f-i.yaml000064400000000320150403615040020646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::ProcessController#active_jobs_exist?
is_singleton: false
name: active_jobs_exist?
params: ()
visibility: public
ri/1.8/system/Shell/ProcessController/sfork-i.yaml000064400000000400150403615040015767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: simple fork
full_name: Shell::ProcessController#sfork
is_singleton: false
name: sfork
params: (command, &block) {|| ...}
visibility: public
ri/1.8/system/Shell/install_system_commands-c.yaml000064400000000323150403615040016112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::install_system_commands
is_singleton: true
name: install_system_commands
params: (pre = "sys_")
visibility: public
ri/1.8/system/Shell/cdesc-Shell.yaml000064400000005465150403615040013101 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: cascade
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: command_processor
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Dir related methods
  - !ruby/struct:SM::Flow::P 
    body: Shell#cwd/dir/getwd/pwd Shell#chdir/cd Shell#pushdir/pushd Shell#popdir/popd Shell#mkdir Shell#rmdir
  name: cwd
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: debug
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: debug
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: dir_stack
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: process_controller
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: record_separator
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: system_path
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: umask
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: verbose
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: verbose
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: alias_command
- !ruby/object:RI::MethodSummary 
  name: cd
- !ruby/object:RI::MethodSummary 
  name: debug=
- !ruby/object:RI::MethodSummary 
  name: def_system_command
- !ruby/object:RI::MethodSummary 
  name: default_record_separator
- !ruby/object:RI::MethodSummary 
  name: default_record_separator=
- !ruby/object:RI::MethodSummary 
  name: default_system_path
- !ruby/object:RI::MethodSummary 
  name: default_system_path=
- !ruby/object:RI::MethodSummary 
  name: install_system_commands
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: notify
- !ruby/object:RI::MethodSummary 
  name: unalias_command
- !ruby/object:RI::MethodSummary 
  name: undef_system_command
comment: 
- !ruby/struct:SM::Flow::VERB 
  body: "  shell/filter.rb -\n      $Release Version: 0.6.0 $\n      $Revision: 11708 $\n      $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $\n      by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd)\n"
- !ruby/struct:SM::Flow::P 
  body: --
constants: []

full_name: Shell
includes: 
- !ruby/object:RI::IncludedModule 
  name: Error
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: cd
- !ruby/object:RI::MethodSummary 
  name: chdir
- !ruby/object:RI::MethodSummary 
  name: debug=
- !ruby/object:RI::MethodSummary 
  name: expand_path
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: jobs
- !ruby/object:RI::MethodSummary 
  name: kill
- !ruby/object:RI::MethodSummary 
  name: popd
- !ruby/object:RI::MethodSummary 
  name: popdir
- !ruby/object:RI::MethodSummary 
  name: pushd
- !ruby/object:RI::MethodSummary 
  name: pushdir
- !ruby/object:RI::MethodSummary 
  name: system_path=
name: Shell
superclass: Object
ri/1.8/system/Shell/expand_path-i.yaml000064400000000263150403615040013463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell#expand_path
is_singleton: false
name: expand_path
params: (path)
visibility: public
ri/1.8/system/Shell/kill-i.yaml000064400000000255150403615040012124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell#kill
is_singleton: false
name: kill
params: (sig, command)
visibility: public
ri/1.8/system/Shell/undef_system_command-c.yaml000064400000000310150403615040015356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::undef_system_command
is_singleton: true
name: undef_system_command
params: (command)
visibility: public
ri/1.8/system/Shell/pushd-i.yaml000064400000000346150403615050012316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pushdir"
full_name: Shell#pushd
is_singleton: false
name: pushd
params: (path = nil)
visibility: public
ri/1.8/system/Shell/cd-i.yaml000064400000000336150403615050011560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #chdir"
full_name: Shell#cd
is_singleton: false
name: cd
params: (path = nil)
visibility: public
ri/1.8/system/Shell/default_system_path%3d-c.yaml000064400000000305150403615050015520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::default_system_path=
is_singleton: true
name: default_system_path=
params: (path)
visibility: public
ri/1.8/system/Shell/unalias_command-c.yaml000064400000000272150403615050014315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::unalias_command
is_singleton: true
name: unalias_command
params: (ali)
visibility: public
ri/1.8/system/Shell/inspect-i.yaml000064400000000252150403615050012634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: Shell#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Shell/new-c.yaml000064400000000237150403615060011756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Shell/system_path%3d-i.yaml000064400000000265150403615060014030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell#system_path=
is_singleton: false
name: system_path=
params: (path)
visibility: public
ri/1.8/system/Shell/default_record_separator%3d-c.yaml000064400000000315150403615060016520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::default_record_separator=
is_singleton: true
name: default_record_separator=
params: (rs)
visibility: public
ri/1.8/system/Shell/debug%3d-c.yaml000064400000000250150403615060012542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::debug=
is_singleton: true
name: debug=
params: (val)
visibility: public
ri/1.8/system/Shell/Glob/each-i.yaml000064400000000300150403615060012745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: f+rs
comment: 
full_name: Shell::Glob#each
is_singleton: false
name: each
params: (rs = nil) {|f+rs| ...}
visibility: public
ri/1.8/system/Shell/Glob/new-c.yaml000064400000000260150403615070012636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::Glob::new
is_singleton: true
name: new
params: (sh, pattern)
visibility: public
ri/1.8/system/Shell/Glob/cdesc-Glob.yaml000064400000000433150403615070013571 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Shell::Glob
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
name: Glob
superclass: BuiltInCommand
ri/1.8/system/Shell/SystemCommand/flush-i.yaml000064400000000262150403615100015070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#flush
is_singleton: false
name: flush
params: ()
visibility: public
ri/1.8/system/Shell/SystemCommand/wait%3f-i.yaml000064400000000262150403615110015212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#wait?
is_singleton: false
name: wait?
params: ()
visibility: public
ri/1.8/system/Shell/SystemCommand/input%3d-i.yaml000064400000000267150403615110015410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#input=
is_singleton: false
name: input=
params: (inp)
visibility: public
ri/1.8/system/Shell/SystemCommand/start_export-i.yaml000064400000000300150403615110016477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#start_export
is_singleton: false
name: start_export
params: ()
visibility: public
ri/1.8/system/Shell/SystemCommand/terminate-i.yaml000064400000000272150403615120015742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#terminate
is_singleton: false
name: terminate
params: ()
visibility: public
ri/1.8/system/Shell/SystemCommand/each-i.yaml000064400000000303150403615120014645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: l
comment: 
full_name: Shell::SystemCommand#each
is_singleton: false
name: each
params: (rs = nil) {|l| ...}
visibility: public
ri/1.8/system/Shell/SystemCommand/kill-i.yaml000064400000000263150403615120014705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#kill
is_singleton: false
name: kill
params: (sig)
visibility: public
ri/1.8/system/Shell/SystemCommand/active%3f-i.yaml000064400000000266150403615120015526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#active?
is_singleton: false
name: active?
params: ()
visibility: public
ri/1.8/system/Shell/SystemCommand/new-c.yaml000064400000000300150403615130014526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand::new
is_singleton: true
name: new
params: (sh, command, *opts)
visibility: public
ri/1.8/system/Shell/SystemCommand/notify-i.yaml000064400000001010150403615130015252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: mes if iterator?
comment: 
- !ruby/struct:SM::Flow::P 
  body: ex)
- !ruby/struct:SM::Flow::VERB 
  body: "   if you wish to output:\n      &quot;shell: job(#{@command}:#{@pid}) close pipe-out.&quot;\n   then\n      mes: &quot;job(%id) close pipe-out.&quot;\n   yorn: Boolean(@shell.debug? or @shell.verbose?)\n"
full_name: Shell::SystemCommand#notify
is_singleton: false
name: notify
params: (*opts, &block) {|mes if iterator?| ...}
visibility: public
ri/1.8/system/Shell/SystemCommand/start-i.yaml000064400000000262150403615130015107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#start
is_singleton: false
name: start
params: ()
visibility: public
ri/1.8/system/Shell/SystemCommand/start_import-i.yaml000064400000000300150403615130016472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::SystemCommand#start_import
is_singleton: false
name: start_import
params: ()
visibility: public
ri/1.8/system/Shell/SystemCommand/cdesc-SystemCommand.yaml000064400000001531150403615140017367 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: command
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Shell::SystemCommand
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: active?
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: input=
- !ruby/object:RI::MethodSummary 
  name: kill
- !ruby/object:RI::MethodSummary 
  name: notify
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: start_export
- !ruby/object:RI::MethodSummary 
  name: start_import
- !ruby/object:RI::MethodSummary 
  name: terminate
- !ruby/object:RI::MethodSummary 
  name: wait?
name: SystemCommand
superclass: Filter
ri/1.8/system/Shell/default_system_path-c.yaml000064400000000277150403615140015234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::default_system_path
is_singleton: true
name: default_system_path
params: ()
visibility: public
ri/1.8/system/Shell/AppendIO/input%3d-i.yaml000064400000000265150403615150014266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::AppendIO#input=
is_singleton: false
name: input=
params: (filter)
visibility: public
ri/1.8/system/Shell/AppendIO/cdesc-AppendIO.yaml000064400000001137150403615150015122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: class Sort &lt; Cat
- !ruby/struct:SM::Flow::VERB 
  body: "  def initialize(sh, *filenames)\n    super\n  end\n\n  def each(rs = nil)\n    ary = []\n    super{|l|       ary.push l}\n    for l in ary.sort!\n    yield l\n    end\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: end
constants: []

full_name: Shell::AppendIO
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: input=
name: AppendIO
superclass: BuiltInCommand
ri/1.8/system/Shell/AppendIO/new-c.yaml000064400000000267150403615150013420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::AppendIO::new
is_singleton: true
name: new
params: (sh, io, filter)
visibility: public
ri/1.8/system/Shell/popd-i.yaml000064400000000331150403615150012130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #popdir"
full_name: Shell#popd
is_singleton: false
name: popd
params: ()
visibility: public
ri/1.8/system/Shell/AppendFile/input%3d-i.yaml000064400000000267150403615160014641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::AppendFile#input=
is_singleton: false
name: input=
params: (filter)
visibility: public
ri/1.8/system/Shell/AppendFile/cdesc-AppendFile.yaml000064400000000443150403615160016042 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Shell::AppendFile
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: input=
name: AppendFile
superclass: AppendIO
ri/1.8/system/Shell/AppendFile/new-c.yaml000064400000000302150403615160013757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::AppendFile::new
is_singleton: true
name: new
params: (sh, to_filename, filter)
visibility: public
ri/1.8/system/Shell/CommandProcessor/tee-i.yaml000064400000000265150403615170015231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor#tee
is_singleton: false
name: tee
params: (file)
visibility: public
ri/1.8/system/Shell/CommandProcessor/system-i.yaml000064400000001046150403615170015776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor#system(command, *opts)
- !ruby/struct:SM::Flow::VERB 
  body: "    command: String\n    opts:      String\n    return:  SystemCommand\n  Same as system() function\n  example:\n    print sh.system(&quot;ls&quot;, &quot;-l&quot;)\n    sh.system(&quot;ls&quot;, &quot;-l&quot;) | sh.head &gt; STDOUT\n"
full_name: Shell::CommandProcessor#system
is_singleton: false
name: system
params: (command, *opts)
visibility: public
ri/1.8/system/Shell/CommandProcessor/def_system_command-c.yaml000064400000000675150403615200020305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor.def_system_command(command, path)
- !ruby/struct:SM::Flow::VERB 
  body: "    command:  String\n    path:       String\n  define 'command()' method as method.\n"
full_name: Shell::CommandProcessor::def_system_command
is_singleton: true
name: def_system_command
params: (command, path = command)
visibility: public
ri/1.8/system/Shell/CommandProcessor/out-i.yaml000064400000000373150403615210015256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: internal commands
full_name: Shell::CommandProcessor#out
is_singleton: false
name: out
params: (dev = STDOUT, &block)
visibility: public
ri/1.8/system/Shell/CommandProcessor/run_config-c.yaml000064400000000365150403615210016573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: include run file.
full_name: Shell::CommandProcessor::run_config
is_singleton: true
name: run_config
params: ()
visibility: public
ri/1.8/system/Shell/CommandProcessor/%5b%5d-i.yaml000064400000000400150403615210015307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #test"
full_name: Shell::CommandProcessor#[]
is_singleton: false
name: "[]"
params: (command, file1, file2=nil)
visibility: public
ri/1.8/system/Shell/CommandProcessor/glob-i.yaml000064400000000543150403615220015372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def sort(*filenames)
- !ruby/struct:SM::Flow::VERB 
  body: "  Sort.new(self, *filenames)\n"
- !ruby/struct:SM::Flow::P 
  body: end
full_name: Shell::CommandProcessor#glob
is_singleton: false
name: glob
params: (pattern)
visibility: public
ri/1.8/system/Shell/CommandProcessor/rmdir-i.yaml000064400000000517150403615220015565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor#rmdir(*path)
- !ruby/struct:SM::Flow::VERB 
  body: "    path: String\n  same as Dir.rmdir()\n"
full_name: Shell::CommandProcessor#rmdir
is_singleton: false
name: rmdir
params: (*path)
visibility: public
ri/1.8/system/Shell/CommandProcessor/effect_umask-i.yaml000064400000000405150403615230017101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: private functions
full_name: Shell::CommandProcessor#effect_umask
is_singleton: false
name: effect_umask
params: () {|| ...}
visibility: private
ri/1.8/system/Shell/CommandProcessor/add_delegate_command_to_shell-c.yaml000064400000000347150403615230022415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::add_delegate_command_to_shell
is_singleton: true
name: add_delegate_command_to_shell
params: (id)
visibility: public
ri/1.8/system/Shell/CommandProcessor/alias_command-c.yaml000064400000000340150403615230017224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::alias_command
is_singleton: true
name: alias_command
params: (ali, command, *opts, &block)
visibility: public
ri/1.8/system/Shell/CommandProcessor/unlink-i.yaml000064400000000602150403615240015745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor#unlink(path)
- !ruby/struct:SM::Flow::VERB 
  body: "  same as:\n    Dir#unlink  (when path is directory)\n    File#unlink (when path is file)\n"
full_name: Shell::CommandProcessor#unlink
is_singleton: false
name: unlink
params: (path)
visibility: public
ri/1.8/system/Shell/CommandProcessor/cat-i.yaml000064400000000273150403615240015220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor#cat
is_singleton: false
name: cat
params: (*filenames)
visibility: public
ri/1.8/system/Shell/CommandProcessor/check_point-i.yaml000064400000000460150403615250016736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: finish_all_jobs
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ProcessCommand#transact
full_name: Shell::CommandProcessor#check_point
is_singleton: false
name: check_point
params: ()
visibility: public
ri/1.8/system/Shell/CommandProcessor/concat-i.yaml000064400000000274150403615250015722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor#concat
is_singleton: false
name: concat
params: (*jobs)
visibility: public
ri/1.8/system/Shell/CommandProcessor/rehash-i.yaml000064400000000470150403615260015724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ProcessCommand#rehash
- !ruby/struct:SM::Flow::VERB 
  body: "  clear command hash table.\n"
full_name: Shell::CommandProcessor#rehash
is_singleton: false
name: rehash
params: ()
visibility: public
ri/1.8/system/Shell/CommandProcessor/finish_all_jobs-i.yaml000064400000000406150403615260017576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #check_point"
full_name: Shell::CommandProcessor#finish_all_jobs
is_singleton: false
name: finish_all_jobs
params: ()
visibility: public
ri/1.8/system/Shell/CommandProcessor/initialize-c.yaml000064400000000277150403615270016613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::initialize
is_singleton: true
name: initialize
params: ()
visibility: public
ri/1.8/system/Shell/CommandProcessor/foreach-i.yaml000064400000001227150403615270016063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: fn
comment: 
- !ruby/struct:SM::Flow::P 
  body: File related commands Shell#foreach Shell#open Shell#unlink Shell#test
- !ruby/struct:SM::Flow::P 
  body: "-"
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor#foreach(path, rs)
- !ruby/struct:SM::Flow::VERB 
  body: "    path: String\n    rs:     String - record separator\n    iterator\n  Same as:\n    File#foreach (when path is file)\n    Dir#foreach (when path is directory)\n  path is relative to pwd\n"
full_name: Shell::CommandProcessor#foreach
is_singleton: false
name: foreach
params: (path = nil, *rs) {|fn| ...}
visibility: public
ri/1.8/system/Shell/CommandProcessor/alias_map-c.yaml000064400000000275150403615270016376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::alias_map
is_singleton: true
name: alias_map
params: ()
visibility: public
ri/1.8/system/Shell/CommandProcessor/install_system_commands-c.yaml000064400000001347150403615300021376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor.install_system_commands(pre)
- !ruby/struct:SM::Flow::VERB 
  body: "      pre: String - command name prefix\n"
- !ruby/struct:SM::Flow::P 
  body: defines every command which belongs in default_system_path via CommandProcessor.command(). It doesn't define already defined methods twice. By default, &quot;pre_&quot; is prefixes to each method name. Characters that may not be used in a method name are all converted to '_'. Definition errors are just ignored.
full_name: Shell::CommandProcessor::install_system_commands
is_singleton: true
name: install_system_commands
params: (pre = "sys_")
visibility: public
ri/1.8/system/Shell/CommandProcessor/expand_path-i.yaml000064400000000616150403615300016742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor#expand_path(path)
- !ruby/struct:SM::Flow::VERB 
  body: "    path:     String\n    return: String\n  returns the absolute path for &lt;path&gt;\n"
full_name: Shell::CommandProcessor#expand_path
is_singleton: false
name: expand_path
params: (path)
visibility: public
ri/1.8/system/Shell/CommandProcessor/undef_system_command-c.yaml000064400000000332150403615310020640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::undef_system_command
is_singleton: true
name: undef_system_command
params: (command)
visibility: public
ri/1.8/system/Shell/CommandProcessor/open-i.yaml000064400000000770150403615310015412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor#open(path, mode)
- !ruby/struct:SM::Flow::VERB 
  body: "    path:     String\n    mode:     String\n    return: File or Dir\n  Same as:\n    File#open (when path is file)\n    Dir#open  (when path is directory)\n  mode has an effect only when path is a file\n"
full_name: Shell::CommandProcessor#open
is_singleton: false
name: open
params: (path, mode)
visibility: public
ri/1.8/system/Shell/CommandProcessor/unalias_command-c.yaml000064400000000314150403615320017570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::unalias_command
is_singleton: true
name: unalias_command
params: (ali)
visibility: public
ri/1.8/system/Shell/CommandProcessor/mkdir-i.yaml000064400000000456150403615320015561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dir related methods
- !ruby/struct:SM::Flow::P 
  body: Shell#mkdir Shell#rmdir
full_name: Shell::CommandProcessor#mkdir
is_singleton: false
name: mkdir
params: (*path)
visibility: public
ri/1.8/system/Shell/CommandProcessor/cdesc-CommandProcessor.yaml000064400000004404150403615330020560 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_delegate_command_to_shell
- !ruby/object:RI::MethodSummary 
  name: alias_command
- !ruby/object:RI::MethodSummary 
  name: alias_map
- !ruby/object:RI::MethodSummary 
  name: def_builtin_commands
- !ruby/object:RI::MethodSummary 
  name: def_system_command
- !ruby/object:RI::MethodSummary 
  name: initialize
- !ruby/object:RI::MethodSummary 
  name: install_builtin_commands
- !ruby/object:RI::MethodSummary 
  name: install_system_commands
- !ruby/object:RI::MethodSummary 
  name: method_added
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: run_config
- !ruby/object:RI::MethodSummary 
  name: unalias_command
- !ruby/object:RI::MethodSummary 
  name: undef_system_command
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: initialize of Shell and related classes.
  name: NoDelegateMethods
  value: "[\"initialize\", \"expand_path\"]"
full_name: Shell::CommandProcessor
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: append
- !ruby/object:RI::MethodSummary 
  name: cat
- !ruby/object:RI::MethodSummary 
  name: check_point
- !ruby/object:RI::MethodSummary 
  name: concat
- !ruby/object:RI::MethodSummary 
  name: echo
- !ruby/object:RI::MethodSummary 
  name: effect_umask
- !ruby/object:RI::MethodSummary 
  name: expand_path
- !ruby/object:RI::MethodSummary 
  name: find_system_command
- !ruby/object:RI::MethodSummary 
  name: finish_all_jobs
- !ruby/object:RI::MethodSummary 
  name: foreach
- !ruby/object:RI::MethodSummary 
  name: glob
- !ruby/object:RI::MethodSummary 
  name: mkdir
- !ruby/object:RI::MethodSummary 
  name: notify
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: out
- !ruby/object:RI::MethodSummary 
  name: rehash
- !ruby/object:RI::MethodSummary 
  name: rmdir
- !ruby/object:RI::MethodSummary 
  name: system
- !ruby/object:RI::MethodSummary 
  name: tee
- !ruby/object:RI::MethodSummary 
  name: test
- !ruby/object:RI::MethodSummary 
  name: transact
- !ruby/object:RI::MethodSummary 
  name: unlink
name: CommandProcessor
superclass: Object
ri/1.8/system/Shell/CommandProcessor/new-c.yaml000064400000000266150403615330015236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::new
is_singleton: true
name: new
params: (shell)
visibility: public
ri/1.8/system/Shell/CommandProcessor/notify-i.yaml000064400000000451150403615340015760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: mes if iterator?
comment: 
- !ruby/struct:SM::Flow::P 
  body: "%pwd, %cwd -&gt; @pwd"
full_name: Shell::CommandProcessor#notify
is_singleton: false
name: notify
params: (*opts, &block) {|mes if iterator?| ...}
visibility: public
ri/1.8/system/Shell/CommandProcessor/append-i.yaml000064400000000301150403615340015711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor#append
is_singleton: false
name: append
params: (to, filter)
visibility: public
ri/1.8/system/Shell/CommandProcessor/echo-i.yaml000064400000000273150403615350015371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor#echo
is_singleton: false
name: echo
params: (*strings)
visibility: public
ri/1.8/system/Shell/CommandProcessor/find_system_command-i.yaml000064400000000330150403615360020470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor#find_system_command
is_singleton: false
name: find_system_command
params: (command)
visibility: public
ri/1.8/system/Shell/CommandProcessor/method_added-c.yaml000064400000000305150403615360017043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor::method_added
is_singleton: true
name: method_added
params: (id)
visibility: public
ri/1.8/system/Shell/CommandProcessor/install_builtin_commands-c.yaml000064400000000437150403615370021526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: define default builtin commands
full_name: Shell::CommandProcessor::install_builtin_commands
is_singleton: true
name: install_builtin_commands
params: ()
visibility: public
ri/1.8/system/Shell/CommandProcessor/test-i.yaml000064400000000364150403615400015427 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "[]"
block_params: 
comment: 
full_name: Shell::CommandProcessor#test
is_singleton: false
name: test
params: (command, file1, file2=nil)
visibility: public
ri/1.8/system/Shell/CommandProcessor/def_builtin_commands-c.yaml000064400000001412150403615400020602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: CommandProcessor.def_builtin_commands(delegation_class, command_specs)
- !ruby/struct:SM::Flow::VERB 
  body: "    delegation_class: Class or Module\n    command_specs: [[command_name, [argument,...]],...]\n       command_name: String\n       arguments:      String\n          FILENAME?? -&gt; expand_path(filename??)\n          *FILENAME?? -&gt; filename??.collect{|f|expand_path(f)}.join(&quot;, &quot;)\n  define command_name(argument,...) as\n      delegation_class.command_name(argument,...)\n"
full_name: Shell::CommandProcessor::def_builtin_commands
is_singleton: true
name: def_builtin_commands
params: (delegation_class, command_specs)
visibility: public
ri/1.8/system/Shell/CommandProcessor/transact-i.yaml000064400000000301150403615410016257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::CommandProcessor#transact
is_singleton: false
name: transact
params: (&block)
visibility: public
ri/1.8/system/Shell/debug%3d-i.yaml000064400000000250150403615420012550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell#debug=
is_singleton: false
name: debug=
params: (val)
visibility: public
ri/1.8/system/Shell/chdir-i.yaml000064400000000520150403615420012257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: cd
block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: If called as iterator, it restores the current directory when the block ends.
full_name: Shell#chdir
is_singleton: false
name: chdir
params: (path = nil) {|| ...}
visibility: public
ri/1.8/system/Shell/popdir-i.yaml000064400000000315150403615430012466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: popd
block_params: 
comment: 
full_name: Shell#popdir
is_singleton: false
name: popdir
params: ()
visibility: public
ri/1.8/system/Shell/pushdir-i.yaml000064400000000345150403615440012653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: pushd
block_params: ""
comment: 
full_name: Shell#pushdir
is_singleton: false
name: pushdir
params: (path = nil) {|| ...}
visibility: public
ri/1.8/system/Shell/BuiltInCommand/wait%3f-i.yaml000064400000000263150403615450015304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::BuiltInCommand#wait?
is_singleton: false
name: wait?
params: ()
visibility: public
ri/1.8/system/Shell/BuiltInCommand/cdesc-BuiltInCommand.yaml000064400000000457150403615450017545 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Shell::BuiltInCommand
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: active?
- !ruby/object:RI::MethodSummary 
  name: wait?
name: BuiltInCommand
superclass: Filter
ri/1.8/system/Shell/BuiltInCommand/active%3f-i.yaml000064400000000267150403615460015620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Shell::BuiltInCommand#active?
is_singleton: false
name: active?
params: ()
visibility: public
ri/1.8/system/SyntaxError/cdesc-SyntaxError.yaml000064400000001176150403615470015565 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: SyntaxError
includes: []

instance_methods: []

name: SyntaxError
superclass: ScriptError
ri/1.8/system/Kconv/cdesc-Kconv.yaml000064400000007224150403615510013120 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Kanji Converter for Ruby.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Auto-Detect
  name: AUTO
  value: NKF::AUTO
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: ISO-2022-JP
  name: JIS
  value: NKF::JIS
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: EUC-JP
  name: EUC
  value: NKF::EUC
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Shift_JIS
  name: SJIS
  value: NKF::SJIS
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: BINARY
  name: BINARY
  value: NKF::BINARY
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: NOCONV
  name: NOCONV
  value: NKF::NOCONV
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: ASCII
  name: ASCII
  value: NKF::ASCII
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UTF-8
  name: UTF8
  value: NKF::UTF8
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UTF-16
  name: UTF16
  value: NKF::UTF16
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UTF-32
  name: UTF32
  value: NKF::UTF32
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UNKNOWN
  name: UNKNOWN
  value: NKF::UNKNOWN
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Revision of kconv.rb
  name: REVISION
  value: "%q$Revision: 11708 $"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Regexp of Shift_JIS string (private constant)
  name: RegexpShiftjis
  value: "/\\A(?:                        [\\x00-\\x7f\\xa1-\\xdf] |                        [\\x81-\\x9f\\xe0-\\xfc][\\x40-\\x7e\\x80-\\xfc]                        )*\\z/nx"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Regexp of EUC-JP string (private constant)
  name: RegexpEucjp
  value: "/\\A(?:                     [\\x00-\\x7f]                         |                     \\x8e        [\\xa1-\\xdf]             |                     \\x8f        [\\xa1-\\xfe] [\\xa1-\\xfe] |                     [\\xa1-\\xfe] [\\xa1-\\xfe]                    )*\\z/nx"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Regexp of UTF-8 string (private constant)
  name: RegexpUtf8
  value: "/\\A(?:                     [\\x00-\\x7f]                                     |                     [\\xc2-\\xdf] [\\x80-\\xbf]                         |                     \\xe0        [\\xa0-\\xbf] [\\x80-\\xbf]             |                     [\\xe1-\\xef] [\\x80-\\xbf] [\\x80-\\xbf]             |                     \\xf0        [\\x90-\\xbf] [\\x80-\\xbf] [\\x80-\\xbf] |                     [\\xf1-\\xf3] [\\x80-\\xbf] [\\x80-\\xbf] [\\x80-\\xbf] |                     \\xf4        [\\x80-\\x8f] [\\x80-\\xbf] [\\x80-\\xbf]                    )*\\z/nx"
full_name: Kconv
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: guess
- !ruby/object:RI::MethodSummary 
  name: guess_old
- !ruby/object:RI::MethodSummary 
  name: iseuc
- !ruby/object:RI::MethodSummary 
  name: issjis
- !ruby/object:RI::MethodSummary 
  name: isutf8
- !ruby/object:RI::MethodSummary 
  name: kconv
- !ruby/object:RI::MethodSummary 
  name: toeuc
- !ruby/object:RI::MethodSummary 
  name: tojis
- !ruby/object:RI::MethodSummary 
  name: tosjis
- !ruby/object:RI::MethodSummary 
  name: toutf16
- !ruby/object:RI::MethodSummary 
  name: toutf8
name: Kconv
superclass: 
ri/1.8/system/Kconv/toutf16-i.yaml000064400000000713150403615510012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>str</tt> to UTF-16
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-w16xm0', str).
full_name: Kconv#toutf16
is_singleton: false
name: toutf16
params: |
  Kconv.toutf16(str)   -> string

visibility: public
ri/1.8/system/Kconv/tosjis-i.yaml000064400000000711150403615520012515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>str</tt> to Shift_JIS
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-sxm0', str).
full_name: Kconv#tosjis
is_singleton: false
name: tosjis
params: |
  Kconv.tosjis(str)   -> string

visibility: public
ri/1.8/system/Kconv/kconv-i.yaml000064400000001041150403615520012317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>str</tt> to out_code. <tt>out_code</tt> and <tt>in_code</tt> are given as constants of Kconv.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want to decode them, use NKF.nkf.
full_name: Kconv#kconv
is_singleton: false
name: kconv
params: |
  Kconv.kconv(str, out_code, in_code = Kconv::AUTO)

visibility: public
ri/1.8/system/Kconv/isutf8-i.yaml000064400000000572150403615530012432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns whether input encoding is UTF-8 or not.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> don't expect this return value is MatchData.
full_name: Kconv#isutf8
is_singleton: false
name: isutf8
params: |
  Kconv.isutf8(str)   -> obj or nil

visibility: public
ri/1.8/system/Kconv/tojis-i.yaml000064400000000710150403615530012332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>str</tt> to ISO-2022-JP
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-jxm0', str).
full_name: Kconv#tojis
is_singleton: false
name: tojis
params: |
  Kconv.tojis(str)   -> string

visibility: public
ri/1.8/system/Kconv/issjis-i.yaml000064400000000576150403615540012521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns whether input encoding is Shift_JIS or not.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> don't expect this return value is MatchData.
full_name: Kconv#issjis
is_singleton: false
name: issjis
params: |
  Kconv.issjis(str)   -> obj or nil

visibility: public
ri/1.8/system/Kconv/toutf8-i.yaml000064400000000705150403615540012440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>str</tt> to UTF-8
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-wxm0', str).
full_name: Kconv#toutf8
is_singleton: false
name: toutf8
params: |
  Kconv.toutf8(str)   -> string

visibility: public
ri/1.8/system/Kconv/toeuc-i.yaml000064400000000703150403615550012325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>str</tt> to EUC-JP
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-exm0', str).
full_name: Kconv#toeuc
is_singleton: false
name: toeuc
params: |
  Kconv.toeuc(str)   -> string

visibility: public
ri/1.8/system/Kconv/guess_old-i.yaml000064400000000426150403615550013174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Guess input encoding by NKF.guess1
full_name: Kconv#guess_old
is_singleton: false
name: guess_old
params: |
  Kconv.guess_old(str)   -> integer

visibility: public
ri/1.8/system/Kconv/guess-i.yaml000064400000000412150403615560012332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Guess input encoding by NKF.guess2
full_name: Kconv#guess
is_singleton: false
name: guess
params: |
  Kconv.guess(str)   -> integer

visibility: public
ri/1.8/system/Kconv/iseuc-i.yaml000064400000000570150403615570012322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns whether input encoding is EUC-JP or not.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> don't expect this return value is MatchData.
full_name: Kconv#iseuc
is_singleton: false
name: iseuc
params: |
  Kconv.iseuc(str)   -> obj or nil

visibility: public
ri/1.8/system/InvalidArgument/cdesc-InvalidArgument.yaml000064400000000462150403615600017137 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises when the given argument does not match required format.
constants: []

full_name: InvalidArgument
includes: []

instance_methods: []

name: InvalidArgument
superclass: ParseError
ri/1.8/system/TimeExtentionTest/cdesc-TimeExtentionTest.yaml000064400000000335150403615610020045 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: TimeExtentionTest
includes: []

instance_methods: []

name: TimeExtentionTest
superclass: Test::Unit::TestCase
ri/1.8/system/Kernel/fail-i.yaml000064400000002106150403615630012257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no arguments, raises the exception in <tt>$!</tt> or raises a <tt>RuntimeError</tt> if <tt>$!</tt> is <tt>nil</tt>. With a single <tt>String</tt> argument, raises a <tt>RuntimeError</tt> with the string as a message. Otherwise, the first parameter should be the name of an <tt>Exception</tt> class (or an object that returns an <tt>Exception</tt> object when sent an <tt>exception</tt> message). The optional second parameter sets the message associated with the exception, and the third parameter is an array of callback information. Exceptions are caught by the <tt>rescue</tt> clause of <tt>begin...end</tt> blocks.
- !ruby/struct:SM::Flow::VERB 
  body: "   raise &quot;Failed to create socket&quot;\n   raise ArgumentError, &quot;No parameters&quot;, caller\n"
full_name: Kernel#fail
is_singleton: false
name: fail
params: |
  raise
  raise(string)
  raise(exception [, string [, array]])
  fail
  fail(string)
  fail(exception [, string [, array]])

visibility: public
ri/1.8/system/Kernel/system-i.yaml000064400000001347150403615630012676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Executes <em>cmd</em> in a subshell, returning <tt>true</tt> if the command was found and ran successfully, <tt>false</tt> otherwise. An error status is available in <tt>$?</tt>. The arguments are processed in the same way as for <tt>Kernel::exec</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   system(&quot;echo *&quot;)\n   system(&quot;echo&quot;, &quot;*&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   config.h main.rb\n   *\n"
full_name: Kernel#system
is_singleton: false
name: system
params: |
  system(cmd [, arg, ...])    => true or false

visibility: public
ri/1.8/system/Kernel/exec-i.yaml000064400000002336150403615640012276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the current process by running the given external <em>command</em>. If <tt>exec</tt> is given a single argument, that argument is taken as a line that is subject to shell expansion before being executed. If multiple arguments are given, the second and subsequent arguments are passed as parameters to <em>command</em> with no shell expansion. If the first argument is a two-element array, the first element is the command to be executed, and the second argument is used as the <tt>argv[0]</tt> value, which may show up in process listings. In MSDOS environments, the command is executed in a subshell; otherwise, one of the <tt>exec(2)</tt> system calls is used, so the running command may inherit some of the environment of the original program (including open file descriptors).
- !ruby/struct:SM::Flow::VERB 
  body: "   exec &quot;echo *&quot;       # echoes list of files in current directory\n   # never get here\n\n   exec &quot;echo&quot;, &quot;*&quot;    # echoes an asterisk\n   # never get here\n"
full_name: Kernel#exec
is_singleton: false
name: exec
params: |
  exec(command [, arg, ...])

visibility: public
ri/1.8/system/Kernel/URI-i.yaml000064400000000450150403615640012004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: alias for URI.parse.
- !ruby/struct:SM::Flow::P 
  body: This method is introduced at 1.8.2.
full_name: Kernel#URI
is_singleton: false
name: URI
params: (uri_str)
visibility: public
ri/1.8/system/Kernel/autoload-i.yaml000064400000001017150403615650013156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Registers <em>filename</em> to be loaded (using <tt>Kernel::require</tt>) the first time that <em>module</em> (which may be a <tt>String</tt> or a symbol) is accessed.
- !ruby/struct:SM::Flow::VERB 
  body: "   autoload(:MyModule, &quot;/usr/local/lib/modules/my_module.rb&quot;)\n"
full_name: Kernel#autoload
is_singleton: false
name: autoload
params: |
  autoload(module, filename)   => nil

visibility: public
ri/1.8/system/Kernel/print-i.yaml000064400000001651150403615660012507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Prints each object in turn to <tt>$stdout</tt>. If the output field separator (<tt>$,</tt>) is not <tt>nil</tt>, its contents will appear between each field. If the output record separator (<tt>$\</tt>) is not <tt>nil</tt>, it will be appended to the output. If no arguments are given, prints <tt>$_</tt>. Objects that aren't strings will be converted by calling their <tt>to_s</tt> method.
- !ruby/struct:SM::Flow::VERB 
  body: "   print &quot;cat&quot;, [1,2,3], 99, &quot;\\n&quot;\n   $, = &quot;, &quot;\n   $\\ = &quot;\\n&quot;\n   print &quot;cat&quot;, [1,2,3], 99\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   cat12399\n   cat, 1, 2, 3, 99\n"
full_name: Kernel#print
is_singleton: false
name: print
params: |
  print(obj, ...)    => nil

visibility: public
ri/1.8/system/Kernel/printf-i.yaml000064400000001003150403615660012644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "   io.write(sprintf(string, obj, ...)\n"
- !ruby/struct:SM::Flow::P 
  body: or
- !ruby/struct:SM::Flow::VERB 
  body: "   $stdout.write(sprintf(string, obj, ...)\n"
full_name: Kernel#printf
is_singleton: false
name: printf
params: |
  printf(io, string [, obj ... ] )    => nil
  printf(string [, obj ... ] )        => nil

visibility: public
ri/1.8/system/Kernel/binding-i.yaml000064400000001246150403615670012766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>Binding</tt> object, describing the variable and method bindings at the point of call. This object can be used when calling <tt>eval</tt> to execute the evaluated command in this environment. Also see the description of class <tt>Binding</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   def getBinding(param)\n     return binding\n   end\n   b = getBinding(&quot;hello&quot;)\n   eval(&quot;param&quot;, b)   #=&gt; &quot;hello&quot;\n"
full_name: Kernel#binding
is_singleton: false
name: binding
params: |
  binding -> a_binding

visibility: public
ri/1.8/system/Kernel/Pathname-i.yaml000064400000000467150403615700013107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: create a pathname object.
- !ruby/struct:SM::Flow::P 
  body: This method is available since 1.8.5.
full_name: Kernel#Pathname
is_singleton: false
name: Pathname
params: (path)
visibility: private
ri/1.8/system/Kernel/method_missing-i.yaml000064400000002060150403615700014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invoked by Ruby when <em>obj</em> is sent a message it cannot handle. <em>symbol</em> is the symbol for the method called, and <em>args</em> are any arguments that were passed to it. By default, the interpreter raises an error when this method is called. However, it is possible to override the method to provide more dynamic behavior. The example below creates a class <tt>Roman</tt>, which responds to methods with names consisting of roman numerals, returning the corresponding integer values.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Roman\n     def romanToInt(str)\n       # ...\n     end\n     def method_missing(methId)\n       str = methId.id2name\n       romanToInt(str)\n     end\n   end\n\n   r = Roman.new\n   r.iv      #=&gt; 4\n   r.xxiii   #=&gt; 23\n   r.mm      #=&gt; 2000\n"
full_name: Kernel#method_missing
is_singleton: false
name: method_missing
params: |
  obj.method_missing(symbol [, *args] )   => result

visibility: public
ri/1.8/system/Kernel/open_uri_original_open-i.yaml000064400000000400150403615710016063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #open"
full_name: Kernel#open_uri_original_open
is_singleton: false
name: open_uri_original_open
params: (...)
visibility: private
ri/1.8/system/Kernel/gsub-i.yaml000064400000001074150403615720012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>$_.gsub...</tt>, except that <tt>$_</tt> receives the modified result.
- !ruby/struct:SM::Flow::VERB 
  body: "   $_ = &quot;quick brown fox&quot;\n   gsub /[aeiou]/, '*'   #=&gt; &quot;q**ck br*wn f*x&quot;\n   $_                    #=&gt; &quot;q**ck br*wn f*x&quot;\n"
full_name: Kernel#gsub
is_singleton: false
name: gsub
params: |
  gsub(pattern, replacement)    => string
  gsub(pattern) {|...| block }  => string

visibility: public
ri/1.8/system/Kernel/block_given%3f-i.yaml000064400000001343150403615720014126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <tt>yield</tt> would execute a block in the current context. The <tt>iterator?</tt> form is mildly deprecated.
- !ruby/struct:SM::Flow::VERB 
  body: "   def try\n     if block_given?\n       yield\n     else\n       &quot;no block&quot;\n     end\n   end\n   try                  #=&gt; &quot;no block&quot;\n   try { &quot;hello&quot; }      #=&gt; &quot;hello&quot;\n   try do &quot;hello&quot; end   #=&gt; &quot;hello&quot;\n"
full_name: Kernel#block_given?
is_singleton: false
name: block_given?
params: |
  block_given?   => true or false
  iterator?      => true or false

visibility: public
ri/1.8/system/Kernel/select-i.yaml000064400000000507150403615720012626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Kernel#select</tt>.
full_name: Kernel#select
is_singleton: false
name: select
params: |
  IO.select(read_array 
  [, write_array 
  [, error_array 
  [, timeout]]] ) =>  array  or  nil

visibility: public
ri/1.8/system/Kernel/scanf-i.yaml000064400000000252150403615730012437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Kernel#scanf
is_singleton: false
name: scanf
params: (fs,&b)
visibility: private
ri/1.8/system/Kernel/abort-i.yaml000064400000000612150403615730012454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminate execution immediately, effectively by calling <tt>Kernel.exit(1)</tt>. If <em>msg</em> is given, it is written to STDERR prior to terminating.
full_name: Kernel#abort
is_singleton: false
name: abort
params: |
  abort
  Kernel::abort
  Process::abort

visibility: public
ri/1.8/system/Kernel/%60-i.yaml000064400000001220150403615740011634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the standard output of running <em>cmd</em> in a subshell. The built-in syntax <tt>%x{...}</tt> uses this method. Sets <tt>$?</tt> to the process status.
- !ruby/struct:SM::Flow::VERB 
  body: "   `date`                   #=&gt; &quot;Wed Apr  9 08:56:30 CDT 2003\\n&quot;\n   `ls testdir`.split[1]    #=&gt; &quot;main.rb&quot;\n   `echo oops &amp;&amp; exit 99`   #=&gt; &quot;oops\\n&quot;\n   $?.exitstatus            #=&gt; 99\n"
full_name: Kernel#`
is_singleton: false
name: `
params: |
  `cmd`    => string

visibility: public
ri/1.8/system/Kernel/String-i.yaml000064400000000762150403615740012622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>arg</em> to a <tt>String</tt> by calling its <tt>to_s</tt> method.
- !ruby/struct:SM::Flow::VERB 
  body: "   String(self)        #=&gt; &quot;main&quot;\n   String(self.class   #=&gt; &quot;Object&quot;\n   String(123456)      #=&gt; &quot;123456&quot;\n"
full_name: Kernel#String
is_singleton: false
name: String
params: |
  String(arg)   => string

visibility: public
ri/1.8/system/Kernel/chomp-i.yaml000064400000001224150403615740012454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>$_ = $_.chomp(<em>string</em>)</tt>. See <tt>String#chomp</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   $_ = &quot;now\\n&quot;\n   chomp         #=&gt; &quot;now&quot;\n   $_            #=&gt; &quot;now&quot;\n   chomp &quot;ow&quot;    #=&gt; &quot;n&quot;\n   $_            #=&gt; &quot;n&quot;\n   chomp &quot;xxx&quot;   #=&gt; &quot;n&quot;\n   $_            #=&gt; &quot;n&quot;\n"
full_name: Kernel#chomp
is_singleton: false
name: chomp
params: |
  chomp            => $_
  chomp(string)    => $_

visibility: public
ri/1.8/system/Kernel/lambda-i.yaml000064400000000610150403615740012564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Proc.new</tt>, except the resulting Proc objects check the number of parameters passed when called.
full_name: Kernel#lambda
is_singleton: false
name: lambda
params: |
  proc   { |...| block }  => a_proc
  lambda { |...| block }  => a_proc

visibility: public
ri/1.8/system/Kernel/gsub%21-i.yaml000064400000001074150403615750012522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Kernel::gsub</tt>, except <tt>nil</tt> is returned if <tt>$_</tt> is not modified.
- !ruby/struct:SM::Flow::VERB 
  body: "   $_ = &quot;quick brown fox&quot;\n   gsub! /cat/, '*'   #=&gt; nil\n   $_                 #=&gt; &quot;quick brown fox&quot;\n"
full_name: Kernel#gsub!
is_singleton: false
name: gsub!
params: |
  gsub!(pattern, replacement)    => string or nil
  gsub!(pattern) {|...| block }  => string or nil

visibility: public
ri/1.8/system/Kernel/readline-i.yaml000064400000000532150403615760013134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Kernel::gets</tt>, except <tt>readline</tt> raises <tt>EOFError</tt> at end of file.
full_name: Kernel#readline
is_singleton: false
name: readline
params: |
  readline(separator=$/)   => string

visibility: public
ri/1.8/system/Kernel/autoload%3f-i.yaml000064400000001021150403615760013451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Registers <em>filename</em> to be loaded (using <tt>Kernel::require</tt>) the first time that <em>module</em> (which may be a <tt>String</tt> or a symbol) is accessed.
- !ruby/struct:SM::Flow::VERB 
  body: "   autoload(:MyModule, &quot;/usr/local/lib/modules/my_module.rb&quot;)\n"
full_name: Kernel#autoload?
is_singleton: false
name: autoload?
params: |
  autoload(module, filename)   => nil

visibility: public
ri/1.8/system/Kernel/raise-i.yaml000064400000002110150403615760012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no arguments, raises the exception in <tt>$!</tt> or raises a <tt>RuntimeError</tt> if <tt>$!</tt> is <tt>nil</tt>. With a single <tt>String</tt> argument, raises a <tt>RuntimeError</tt> with the string as a message. Otherwise, the first parameter should be the name of an <tt>Exception</tt> class (or an object that returns an <tt>Exception</tt> object when sent an <tt>exception</tt> message). The optional second parameter sets the message associated with the exception, and the third parameter is an array of callback information. Exceptions are caught by the <tt>rescue</tt> clause of <tt>begin...end</tt> blocks.
- !ruby/struct:SM::Flow::VERB 
  body: "   raise &quot;Failed to create socket&quot;\n   raise ArgumentError, &quot;No parameters&quot;, caller\n"
full_name: Kernel#raise
is_singleton: false
name: raise
params: |
  raise
  raise(string)
  raise(exception [, string [, array]])
  fail
  fail(string)
  fail(exception [, string [, array]])

visibility: public
ri/1.8/system/Kernel/eval-i.yaml000064400000001564150403615770012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates the Ruby expression(s) in <em>string</em>. If <em>binding</em> is given, the evaluation is performed in its context. The binding may be a <tt>Binding</tt> object or a <tt>Proc</tt> object. If the optional <em>filename</em> and <em>lineno</em> parameters are present, they will be used when reporting syntax errors.
- !ruby/struct:SM::Flow::VERB 
  body: "   def getBinding(str)\n     return binding\n   end\n   str = &quot;hello&quot;\n   eval &quot;str + ' Fred'&quot;                      #=&gt; &quot;hello Fred&quot;\n   eval &quot;str + ' Fred'&quot;, getBinding(&quot;bye&quot;)   #=&gt; &quot;bye Fred&quot;\n"
full_name: Kernel#eval
is_singleton: false
name: eval
params: |
  eval(string [, binding [, filename [,lineno]]])  => obj

visibility: public
ri/1.8/system/Kernel/load-i.yaml000064400000001305150403615770012270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Loads and executes the Ruby program in the file <em>filename</em>. If the filename does not resolve to an absolute path, the file is searched for in the library directories listed in <tt>$:</tt>. If the optional <em>wrap</em> parameter is <tt>true</tt>, the loaded script will be executed under an anonymous module, protecting the calling program's global namespace. In no circumstance will any local variables in the loaded file be propagated to the loading environment.
full_name: Kernel#load
is_singleton: false
name: load
params: |
  load(filename, wrap=false)   => true

visibility: public
ri/1.8/system/Kernel/proc-i.yaml000064400000000604150403615770012315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Proc.new</tt>, except the resulting Proc objects check the number of parameters passed when called.
full_name: Kernel#proc
is_singleton: false
name: proc
params: |
  proc   { |...| block }  => a_proc
  lambda { |...| block }  => a_proc

visibility: public
ri/1.8/system/Kernel/pp-i.yaml000064400000000435150403616000011756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: prints arguments in pretty form.
- !ruby/struct:SM::Flow::P 
  body: pp returns nil.
full_name: Kernel#pp
is_singleton: false
name: pp
params: (*objs)
visibility: private
ri/1.8/system/Kernel/chomp%21-i.yaml000064400000001100150403616000012643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>$_.chomp!(<em>string</em>)</tt>. See <tt>String#chomp!</tt>
- !ruby/struct:SM::Flow::VERB 
  body: "   $_ = &quot;now\\n&quot;\n   chomp!       #=&gt; &quot;now&quot;\n   $_           #=&gt; &quot;now&quot;\n   chomp! &quot;x&quot;   #=&gt; nil\n   $_           #=&gt; &quot;now&quot;\n"
full_name: Kernel#chomp!
is_singleton: false
name: chomp!
params: |
  chomp!             => $_ or nil
  chomp!(string)     => $_ or nil

visibility: public
ri/1.8/system/Kernel/__method__-i.yaml000064400000001137150403616010013414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the current method as a Symbol. If called from inside of an aliased method it will return the original nonaliased name. If called outside of a method, it returns <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  def foo\n    <em>method</em>\n  end\n  alias bar foo\n\n  foo                # =&gt; :foo\n  bar                # =&gt; :foo\n"
full_name: Kernel#__method__
is_singleton: false
name: __method__
params: |
  __method__         => symbol

visibility: public
ri/1.8/system/Kernel/pretty_inspect-i.yaml000064400000000407150403616010014413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns a pretty printed object as a string.
full_name: Kernel#pretty_inspect
is_singleton: false
name: pretty_inspect
params: ()
visibility: public
ri/1.8/system/Kernel/open-i.yaml000064400000001647150403616010012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: makes possible to open various resources including URIs. If the first argument respond to `open' method, the method is called with the rest arguments.
- !ruby/struct:SM::Flow::P 
  body: If the first argument is a string which begins with xxx://, it is parsed by URI.parse. If the parsed object respond to `open' method, the method is called with the rest arguments.
- !ruby/struct:SM::Flow::P 
  body: Otherwise original open is called.
- !ruby/struct:SM::Flow::P 
  body: Since open-uri.rb provides URI::HTTP#open, URI::HTTPS#open and URI::FTP#open, Kernel[#.]open can accepts such URIs and strings which begins with http://, https:// and ftp://. In these case, the opened file object is extended by OpenURI::Meta.
full_name: Kernel#open
is_singleton: false
name: open
params: (name, *rest, &block)
visibility: private
ri/1.8/system/Kernel/sprintf-i.yaml000064400000014164150403616010013031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the string resulting from applying <em>format_string</em> to any additional arguments. Within the format string, any characters other than format sequences are copied to the result. A format sequence consists of a percent sign, followed by optional flags, width, and precision indicators, then terminated with a field type character. The field type controls how the corresponding <tt>sprintf</tt> argument is to be interpreted, while the flags modify that interpretation. The field type characters are listed in the table at the end of this section. The flag characters are:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Flag     | Applies to   | Meaning\n  ---------+--------------+-----------------------------------------\n  space    | bdeEfgGiouxX | Leave a space at the start of\n           |              | positive numbers.\n  ---------+--------------+-----------------------------------------\n  (digit)$ | all          | Specifies the absolute argument number\n           |              | for this field. Absolute and relative\n           |              | argument numbers cannot be mixed in a\n           |              | sprintf string.\n  ---------+--------------+-----------------------------------------\n   #       | beEfgGoxX    | Use an alternative format. For the\n           |              | conversions `o', `x', `X', and `b',\n           |              | prefix the result with ``0'', ``0x'', ``0X'',\n           |              |  and ``0b'', respectively. For `e',\n           |              | `E', `f', `g', and 'G', force a decimal\n           |              | point to be added, even if no digits follow.\n           |              | For `g' and 'G', do not remove trailing zeros.\n  ---------+--------------+-----------------------------------------\n  +        | bdeEfgGiouxX | Add a leading plus sign to positive numbers.\n  ---------+--------------+-----------------------------------------\n  -        | all          | Left-justify the result of this conversion.\n  ---------+--------------+-----------------------------------------\n  0 (zero) | bdeEfgGiouxX | Pad with zeros, not spaces.\n  ---------+--------------+-----------------------------------------\n  *        | all          | Use the next argument as the field width.\n           |              | If negative, left-justify the result. If the\n           |              | asterisk is followed by a number and a dollar\n           |              | sign, use the indicated argument as the width.\n"
- !ruby/struct:SM::Flow::P 
  body: The field width is an optional integer, followed optionally by a period and a precision. The width specifies the minimum number of characters that will be written to the result for this field. For numeric fields, the precision controls the number of decimal places displayed. For string fields, the precision determines the maximum number of characters to be copied from the string. (Thus, the format sequence <tt>%10.10s</tt> will always contribute exactly ten characters to the result.)
- !ruby/struct:SM::Flow::P 
  body: "The field types are:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Field |  Conversion\n    ------+--------------------------------------------------------------\n      b   | Convert argument as a binary number.\n      c   | Argument is the numeric code for a single character.\n      d   | Convert argument as a decimal number.\n      E   | Equivalent to `e', but uses an uppercase E to indicate\n          | the exponent.\n      e   | Convert floating point argument into exponential notation\n          | with one digit before the decimal point. The precision\n          | determines the number of fractional digits (defaulting to six).\n      f   | Convert floating point argument as [-]ddd.ddd,\n          |  where the precision determines the number of digits after\n          | the decimal point.\n      G   | Equivalent to `g', but use an uppercase `E' in exponent form.\n      g   | Convert a floating point number using exponential form\n          | if the exponent is less than -4 or greater than or\n          | equal to the precision, or in d.dddd form otherwise.\n      i   | Identical to `d'.\n      o   | Convert argument as an octal number.\n      p   | The valuing of argument.inspect.\n      s   | Argument is a string to be substituted. If the format\n          | sequence contains a precision, at most that many characters\n          | will be copied.\n      u   | Treat argument as an unsigned decimal number. Negative integers\n          | are displayed as a 32 bit two's complement plus one for the\n          | underlying architecture; that is, 2 ** 32 + n.  However, since\n          | Ruby has no inherent limit on bits used to represent the\n          | integer, this value is preceded by two dots (..) in order to\n          | indicate a infinite number of leading sign bits.\n      X   | Convert argument as a hexadecimal number using uppercase\n          | letters. Negative numbers will be displayed with two\n          | leading periods (representing an infinite string of\n          | leading 'FF's.\n      x   | Convert argument as a hexadecimal number.\n          | Negative numbers will be displayed with two\n          | leading periods (representing an infinite string of\n          | leading 'ff's.\n"
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "   sprintf(&quot;%d %04x&quot;, 123, 123)               #=&gt; &quot;123 007b&quot;\n   sprintf(&quot;%08b '%4s'&quot;, 123, 123)            #=&gt; &quot;01111011 ' 123'&quot;\n   sprintf(&quot;%1$*2$s %2$d %1$s&quot;, &quot;hello&quot;, 8)   #=&gt; &quot;   hello 8 hello&quot;\n   sprintf(&quot;%1$*2$s %2$d&quot;, &quot;hello&quot;, -8)       #=&gt; &quot;hello    -8&quot;\n   sprintf(&quot;%+g:% g:%-g&quot;, 1.23, 1.23, 1.23)   #=&gt; &quot;+1.23: 1.23:1.23&quot;\n   sprintf(&quot;%u&quot;, -123)                        #=&gt; &quot;..4294967173&quot;\n"
full_name: Kernel#sprintf
is_singleton: false
name: sprintf
params: |
  format(format_string [, arguments...] )   => string
  sprintf(format_string [, arguments...] )  => string

visibility: public
ri/1.8/system/Kernel/at_exit-i.yaml000064400000001424150403616010012774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>block</em> to a <tt>Proc</tt> object (and therefore binds it at the point of call) and registers it for execution when the program exits. If multiple handlers are registered, they are executed in reverse order of registration.
- !ruby/struct:SM::Flow::VERB 
  body: "   def do_at_exit(str1)\n     at_exit { print str1 }\n   end\n   at_exit { puts &quot;cruel world&quot; }\n   do_at_exit(&quot;goodbye &quot;)\n   exit\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   goodbye cruel world\n"
full_name: Kernel#at_exit
is_singleton: false
name: at_exit
params: |
  at_exit { block } -> proc

visibility: public
ri/1.8/system/Kernel/sub%21-i.yaml000064400000000517150403616010012342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>$_.sub!(<em>args</em>)</tt>.
full_name: Kernel#sub!
is_singleton: false
name: sub!
params: |
  sub!(pattern, replacement)    => $_ or nil
  sub!(pattern) {|...| block }  => $_ or nil

visibility: public
ri/1.8/system/Kernel/loop-i.yaml000064400000000762150403616010012314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Repeatedly executes the block.
- !ruby/struct:SM::Flow::VERB 
  body: "   loop do\n     print &quot;Input: &quot;\n     line = gets\n     break if !line or line =~ /^qQ/\n     # ...\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: StopIteration raised in the block breaks the loop.
full_name: Kernel#loop
is_singleton: false
name: loop
params: |
  loop {|| block } 

visibility: public
ri/1.8/system/Kernel/scan-i.yaml000064400000000533150403616020012264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to calling <tt>$_.scan</tt>. See <tt>String#scan</tt>.
full_name: Kernel#scan
is_singleton: false
name: scan
params: |
  scan(pattern)                   => array
  scan(pattern) {|///| block }    => $_

visibility: public
ri/1.8/system/Kernel/require-i.yaml000064400000002233150403616020013013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Ruby tries to load the library named <em>string</em>, returning <tt>true</tt> if successful. If the filename does not resolve to an absolute path, it will be searched for in the directories listed in <tt>$:</tt>. If the file has the extension ``.rb'', it is loaded as a source file; if the extension is ``.so'', ``.o'', or ``.dll'', or whatever the default shared library extension is on the current platform, Ruby loads the shared library as a Ruby extension. Otherwise, Ruby tries adding ``.rb'', ``.so'', and so on to the name. The name of the loaded feature is added to the array in <tt>$&quot;</tt>. A feature will not be loaded if it's name already appears in <tt>$&quot;</tt>. However, the file name is not converted to an absolute path, so that ``<tt>require 'a';require './a'</tt>'' will load <tt>a.rb</tt> twice.
- !ruby/struct:SM::Flow::VERB 
  body: "   require &quot;my-library.rb&quot;\n   require &quot;db-driver&quot;\n"
full_name: Kernel#require
is_singleton: false
name: require
params: |
  require(string)    => true or false

visibility: public
ri/1.8/system/Kernel/fork-i.yaml000064400000002055150403616030012303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a subprocess. If a block is specified, that block is run in the subprocess, and the subprocess terminates with a status of zero. Otherwise, the <tt>fork</tt> call returns twice, once in the parent, returning the process ID of the child, and once in the child, returning <em>nil</em>. The child process can exit using <tt>Kernel.exit!</tt> to avoid running any <tt>at_exit</tt> functions. The parent process should use <tt>Process.wait</tt> to collect the termination statuses of its children or use <tt>Process.detach</tt> to register disinterest in their status; otherwise, the operating system may accumulate zombie processes.
- !ruby/struct:SM::Flow::P 
  body: The thread calling fork is the only thread in the created child process. fork doesn't copy other threads.
full_name: Kernel#fork
is_singleton: false
name: fork
params: |
  Kernel.fork  [{ block }]   => fixnum or nil
  Process.fork [{ block }]   => fixnum or nil

visibility: public
ri/1.8/system/Kernel/exit-i.yaml000064400000002544150403616030012316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initiates the termination of the Ruby script by raising the <tt>SystemExit</tt> exception. This exception may be caught. The optional parameter is used to return a status code to the invoking environment.
- !ruby/struct:SM::Flow::VERB 
  body: "   begin\n     exit\n     puts &quot;never get here&quot;\n   rescue SystemExit\n     puts &quot;rescued a SystemExit exception&quot;\n   end\n   puts &quot;after begin block&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   rescued a SystemExit exception\n   after begin block\n"
- !ruby/struct:SM::Flow::P 
  body: Just prior to termination, Ruby executes any <tt>at_exit</tt> functions (see Kernel::at_exit) and runs any object finalizers (see ObjectSpace::define_finalizer).
- !ruby/struct:SM::Flow::VERB 
  body: "   at_exit { puts &quot;at_exit function&quot; }\n   ObjectSpace.define_finalizer(&quot;string&quot;,  proc { puts &quot;in finalizer&quot; })\n   exit\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   at_exit function\n   in finalizer\n"
full_name: Kernel#exit
is_singleton: false
name: exit
params: |
  exit(integer=0)
  Kernel::exit(integer=0)
  Process::exit(integer=0)

visibility: public
ri/1.8/system/Kernel/y-i.yaml000064400000001041150403616030011604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Prints any supplied <em>objects</em> out in YAML. Intended as a variation on +Kernel::p+.
- !ruby/struct:SM::Flow::VERB 
  body: "  S = Struct.new(:name, :state)\n  s = S['dave', 'TX']\n  y s\n"
- !ruby/struct:SM::Flow::P 
  body: _produces:_
- !ruby/struct:SM::Flow::VERB 
  body: "  --- !ruby/struct:S\n  name: dave\n  state: TX\n"
full_name: Kernel#y
is_singleton: false
name: y
params: ( object, *objects )
visibility: private
ri/1.8/system/Kernel/srand-i.yaml000064400000001340150403616040012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Seeds the pseudorandom number generator to the value of <em>number</em>.<tt>to_i.abs</tt>. If <em>number</em> is omitted, seeds the generator using a combination of the time, the process id, and a sequence number. (This is also the behavior if <tt>Kernel::rand</tt> is called without previously calling <tt>srand</tt>, but without the sequence.) By setting the seed to a known value, scripts can be made deterministic during testing. The previous seed value is returned. Also see <tt>Kernel::rand</tt>.
full_name: Kernel#srand
is_singleton: false
name: srand
params: |
  srand(number=0)    => old_seed

visibility: public
ri/1.8/system/Kernel/exit%21-i.yaml000064400000000644150403616040012526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Exits the process immediately. No exit handlers are run. <em>fixnum</em> is returned to the underlying system as the exit status.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.exit!(0)\n"
full_name: Kernel#exit!
is_singleton: false
name: exit!
params: |
  Process.exit!(fixnum=-1)

visibility: public
ri/1.8/system/Kernel/split-i.yaml000064400000000517150403616040012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>$_.split(<em>pattern</em>, <em>limit</em>)</tt>. See <tt>String#split</tt>.
full_name: Kernel#split
is_singleton: false
name: split
params: |
  split([pattern [, limit]])    => array

visibility: public
ri/1.8/system/Kernel/sleep-i.yaml000064400000001452150403616050012454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Suspends the current thread for <em>duration</em> seconds (which may be any number, including a <tt>Float</tt> with fractional seconds). Returns the actual number of seconds slept (rounded), which may be less than that asked for if another thread calls <tt>Thread#run</tt>. Zero arguments causes <tt>sleep</tt> to sleep forever.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.new    #=&gt; Wed Apr 09 08:56:32 CDT 2003\n   sleep 1.2   #=&gt; 1\n   Time.new    #=&gt; Wed Apr 09 08:56:33 CDT 2003\n   sleep 1.9   #=&gt; 2\n   Time.new    #=&gt; Wed Apr 09 08:56:35 CDT 2003\n"
full_name: Kernel#sleep
is_singleton: false
name: sleep
params: |
  sleep([duration])    => fixnum

visibility: public
ri/1.8/system/Kernel/catch-i.yaml000064400000002034150403616050012423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>catch</tt> executes its block. If a <tt>throw</tt> is executed, Ruby searches up its stack for a <tt>catch</tt> block with a tag corresponding to the <tt>throw</tt>'s <em>symbol</em>. If found, that block is terminated, and <tt>catch</tt> returns the value given to <tt>throw</tt>. If <tt>throw</tt> is not called, the block terminates normally, and the value of <tt>catch</tt> is the value of the last expression evaluated. <tt>catch</tt> expressions may be nested, and the <tt>throw</tt> call need not be in lexical scope.
- !ruby/struct:SM::Flow::VERB 
  body: "   def routine(n)\n     puts n\n     throw :done if n &lt;= 0\n     routine(n-1)\n   end\n\n   catch(:done) { routine(3) }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   3\n   2\n   1\n   0\n"
full_name: Kernel#catch
is_singleton: false
name: catch
params: |
  catch(symbol) {| | block }  > obj

visibility: public
ri/1.8/system/Kernel/set_trace_func-i.yaml000064400000003342150403616050014330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Establishes <em>proc</em> as the handler for tracing, or disables tracing if the parameter is <tt>nil</tt>. <em>proc</em> takes up to six parameters: an event name, a filename, a line number, an object id, a binding, and the name of a class. <em>proc</em> is invoked whenever an event occurs. Events are: <tt>c-call</tt> (call a C-language routine), <tt>c-return</tt> (return from a C-language routine), <tt>call</tt> (call a Ruby method), <tt>class</tt> (start a class or module definition), <tt>end</tt> (finish a class or module definition), <tt>line</tt> (execute code on a new line), <tt>raise</tt> (raise an exception), and <tt>return</tt> (return from a Ruby method). Tracing is disabled within the context of <em>proc</em>."
- !ruby/struct:SM::Flow::VERB 
  body: "    class Test\n    def test\n      a = 1\n      b = 2\n    end\n    end\n\n    set_trace_func proc { |event, file, line, id, binding, classname|\n       printf &quot;%8s %s:%-2d %10s %8s\\n&quot;, event, file, line, id, classname\n    }\n    t = Test.new\n    t.test\n\n      line prog.rb:11               false\n    c-call prog.rb:11        new    Class\n    c-call prog.rb:11 initialize   Object\n  c-return prog.rb:11 initialize   Object\n  c-return prog.rb:11        new    Class\n      line prog.rb:12               false\n      call prog.rb:2        test     Test\n      line prog.rb:3        test     Test\n      line prog.rb:4        test     Test\n    return prog.rb:4        test     Test\n"
full_name: Kernel#set_trace_func
is_singleton: false
name: set_trace_func
params: |
  set_trace_func(proc)    => proc
  set_trace_func(nil)     => nil

visibility: public
ri/1.8/system/Kernel/Array-i.yaml000064400000001036150403616060012421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>arg</em> as an <tt>Array</tt>. First tries to call <em>arg</em><tt>.to_ary</tt>, then <em>arg</em><tt>.to_a</tt>. If both fail, creates a single element array containing <em>arg</em> (unless <em>arg</em> is <tt>nil</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   Array(1..5)   #=&gt; [1, 2, 3, 4, 5]\n"
full_name: Kernel#Array
is_singleton: false
name: Array
params: |
  Array(arg)    => array

visibility: public
ri/1.8/system/Kernel/global_variables-i.yaml000064400000000702150403616060014632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of the names of global variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   global_variables.grep /std/   #=&gt; [&quot;$stderr&quot;, &quot;$stdout&quot;, &quot;$stdin&quot;]\n"
full_name: Kernel#global_variables
is_singleton: false
name: global_variables
params: |
  global_variables    => array

visibility: public
ri/1.8/system/Kernel/callcc-i.yaml000064400000001306150403616060012564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generates a <tt>Continuation</tt> object, which it passes to the associated block. Performing a <em>cont</em><tt>.call</tt> will cause the <tt>callcc</tt> to return (as will falling through the end of the block). The value returned by the <tt>callcc</tt> is the value of the block, or the value passed to <em>cont</em><tt>.call</tt>. See class <tt>Continuation</tt> for more details. Also see <tt>Kernel::throw</tt> for an alternative mechanism for unwinding a call stack.
full_name: Kernel#callcc
is_singleton: false
name: callcc
params: |
  callcc {|cont| block }   =>  obj

visibility: public
ri/1.8/system/Kernel/syscall-i.yaml000064400000001611150403616060013014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls the operating system function identified by <em>fixnum</em>, passing in the arguments, which must be either <tt>String</tt> objects, or <tt>Integer</tt> objects that ultimately fit within a native <tt>long</tt>. Up to nine parameters may be passed (14 on the Atari-ST). The function identified by <em>fixnum</em> is system dependent. On some Unix systems, the numbers may be obtained from a header file called <tt>syscall.h</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   syscall 4, 1, &quot;hello\\n&quot;, 6   # '4' is write(2) on our box\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   hello\n"
full_name: Kernel#syscall
is_singleton: false
name: syscall
params: |
  syscall(fixnum [, args...])   => integer

visibility: public
ri/1.8/system/Kernel/local_variables-i.yaml000064400000000712150403616060014465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the names of the current local variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   fred = 1\n   for i in 1..10\n      # ...\n   end\n   local_variables   #=&gt; [&quot;fred&quot;, &quot;i&quot;]\n"
full_name: Kernel#local_variables
is_singleton: false
name: local_variables
params: |
  local_variables    => array

visibility: public
ri/1.8/system/Kernel/p-i.yaml000064400000001161150403616060011601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For each object, directly writes <em>obj</em>.<tt>inspect</tt> followed by the current output record separator to the program's standard output.
- !ruby/struct:SM::Flow::VERB 
  body: "   S = Struct.new(:name, :state)\n   s = S['dave', 'TX']\n   p s\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   #&lt;S name=&quot;dave&quot;, state=&quot;TX&quot;&gt;\n"
full_name: Kernel#p
is_singleton: false
name: p
params: |
  p(obj, ...)    => nil

visibility: public
ri/1.8/system/Kernel/iterator%3f-i.yaml000064400000001335150403616070013475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <tt>yield</tt> would execute a block in the current context. The <tt>iterator?</tt> form is mildly deprecated.
- !ruby/struct:SM::Flow::VERB 
  body: "   def try\n     if block_given?\n       yield\n     else\n       &quot;no block&quot;\n     end\n   end\n   try                  #=&gt; &quot;no block&quot;\n   try { &quot;hello&quot; }      #=&gt; &quot;hello&quot;\n   try do &quot;hello&quot; end   #=&gt; &quot;hello&quot;\n"
full_name: Kernel#iterator?
is_singleton: false
name: iterator?
params: |
  block_given?   => true or false
  iterator?      => true or false

visibility: public
ri/1.8/system/Kernel/caller-i.yaml000064400000001710150403616070012605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the current execution stack---an array containing strings in the form ``<em>file:line</em>'' or ``<em>file:line: in `method'</em>''. The optional <em>start</em> parameter determines the number of initial stack entries to omit from the result."
- !ruby/struct:SM::Flow::VERB 
  body: "   def a(skip)\n     caller(skip)\n   end\n   def b(skip)\n     a(skip)\n   end\n   def c(skip)\n     b(skip)\n   end\n   c(0)   #=&gt; [&quot;prog:2:in `a'&quot;, &quot;prog:5:in `b'&quot;, &quot;prog:8:in `c'&quot;, &quot;prog:10&quot;]\n   c(1)   #=&gt; [&quot;prog:5:in `b'&quot;, &quot;prog:8:in `c'&quot;, &quot;prog:11&quot;]\n   c(2)   #=&gt; [&quot;prog:8:in `c'&quot;, &quot;prog:12&quot;]\n   c(3)   #=&gt; [&quot;prog:13&quot;]\n"
full_name: Kernel#caller
is_singleton: false
name: caller
params: |
  caller(start=1)    => array

visibility: public
ri/1.8/system/Kernel/gets-i.yaml000064400000002412150403616070012305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns (and assigns to <tt>$_</tt>) the next line from the list of files in <tt>ARGV</tt> (or <tt>$*</tt>), or from standard input if no files are present on the command line. Returns <tt>nil</tt> at end of file. The optional argument specifies the record separator. The separator is included with the contents of each record. A separator of <tt>nil</tt> reads the entire contents, and a zero-length separator reads the input one paragraph at a time, where paragraphs are divided by two consecutive newlines. If multiple filenames are present in <tt>ARGV</tt>, +gets(nil)+ will read the contents one file at a time.
- !ruby/struct:SM::Flow::VERB 
  body: "   ARGV &lt;&lt; &quot;testfile&quot;\n   print while gets\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   This is line one\n   This is line two\n   This is line three\n   And so on...\n"
- !ruby/struct:SM::Flow::P 
  body: The style of programming using <tt>$_</tt> as an implicit parameter is gradually losing favor in the Ruby community.
full_name: Kernel#gets
is_singleton: false
name: gets
params: |
  gets(separator=$/)    => string or nil

visibility: public
ri/1.8/system/Kernel/cdesc-Kernel.yaml000064400000010667150403616070013427 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Object</tt> is the parent class of all classes in Ruby. Its methods are therefore available to all objects unless explicitly overridden.
- !ruby/struct:SM::Flow::P 
  body: <tt>Object</tt> mixes in the <tt>Kernel</tt> module, making the built-in kernel functions globally accessible. Although the instance methods of <tt>Object</tt> are defined by the <tt>Kernel</tt> module, we have chosen to document them here for clarity.
- !ruby/struct:SM::Flow::P 
  body: In the descriptions of Object's methods, the parameter <em>symbol</em> refers to a symbol, which is either a quoted string or a <tt>Symbol</tt> (such as <tt>:name</tt>).
constants: []

full_name: Kernel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: Array
- !ruby/object:RI::MethodSummary 
  name: Float
- !ruby/object:RI::MethodSummary 
  name: Integer
- !ruby/object:RI::MethodSummary 
  name: Pathname
- !ruby/object:RI::MethodSummary 
  name: String
- !ruby/object:RI::MethodSummary 
  name: URI
- !ruby/object:RI::MethodSummary 
  name: __method__
- !ruby/object:RI::MethodSummary 
  name: `
- !ruby/object:RI::MethodSummary 
  name: abort
- !ruby/object:RI::MethodSummary 
  name: at_exit
- !ruby/object:RI::MethodSummary 
  name: autoload
- !ruby/object:RI::MethodSummary 
  name: autoload?
- !ruby/object:RI::MethodSummary 
  name: binding
- !ruby/object:RI::MethodSummary 
  name: block_given?
- !ruby/object:RI::MethodSummary 
  name: callcc
- !ruby/object:RI::MethodSummary 
  name: caller
- !ruby/object:RI::MethodSummary 
  name: catch
- !ruby/object:RI::MethodSummary 
  name: chomp
- !ruby/object:RI::MethodSummary 
  name: chomp!
- !ruby/object:RI::MethodSummary 
  name: chop
- !ruby/object:RI::MethodSummary 
  name: chop!
- !ruby/object:RI::MethodSummary 
  name: eval
- !ruby/object:RI::MethodSummary 
  name: exec
- !ruby/object:RI::MethodSummary 
  name: exit
- !ruby/object:RI::MethodSummary 
  name: exit!
- !ruby/object:RI::MethodSummary 
  name: fail
- !ruby/object:RI::MethodSummary 
  name: fork
- !ruby/object:RI::MethodSummary 
  name: format
- !ruby/object:RI::MethodSummary 
  name: getc
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: global_variables
- !ruby/object:RI::MethodSummary 
  name: gsub
- !ruby/object:RI::MethodSummary 
  name: gsub!
- !ruby/object:RI::MethodSummary 
  name: iterator?
- !ruby/object:RI::MethodSummary 
  name: lambda
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: local_variables
- !ruby/object:RI::MethodSummary 
  name: loop
- !ruby/object:RI::MethodSummary 
  name: method_missing
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: open_uri_original_open
- !ruby/object:RI::MethodSummary 
  name: p
- !ruby/object:RI::MethodSummary 
  name: pp
- !ruby/object:RI::MethodSummary 
  name: pretty_inspect
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: printf
- !ruby/object:RI::MethodSummary 
  name: proc
- !ruby/object:RI::MethodSummary 
  name: putc
- !ruby/object:RI::MethodSummary 
  name: puts
- !ruby/object:RI::MethodSummary 
  name: raise
- !ruby/object:RI::MethodSummary 
  name: rand
- !ruby/object:RI::MethodSummary 
  name: readline
- !ruby/object:RI::MethodSummary 
  name: readlines
- !ruby/object:RI::MethodSummary 
  name: require
- !ruby/object:RI::MethodSummary 
  name: scan
- !ruby/object:RI::MethodSummary 
  name: scanf
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: set_trace_func
- !ruby/object:RI::MethodSummary 
  name: sleep
- !ruby/object:RI::MethodSummary 
  name: split
- !ruby/object:RI::MethodSummary 
  name: sprintf
- !ruby/object:RI::MethodSummary 
  name: srand
- !ruby/object:RI::MethodSummary 
  name: sub
- !ruby/object:RI::MethodSummary 
  name: sub!
- !ruby/object:RI::MethodSummary 
  name: syscall
- !ruby/object:RI::MethodSummary 
  name: system
- !ruby/object:RI::MethodSummary 
  name: test
- !ruby/object:RI::MethodSummary 
  name: throw
- !ruby/object:RI::MethodSummary 
  name: trace_var
- !ruby/object:RI::MethodSummary 
  name: trap
- !ruby/object:RI::MethodSummary 
  name: untrace_var
- !ruby/object:RI::MethodSummary 
  name: warn
- !ruby/object:RI::MethodSummary 
  name: warn
- !ruby/object:RI::MethodSummary 
  name: y
name: Kernel
superclass: 
ri/1.8/system/Kernel/format-i.yaml000064400000014162150403616070012640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the string resulting from applying <em>format_string</em> to any additional arguments. Within the format string, any characters other than format sequences are copied to the result. A format sequence consists of a percent sign, followed by optional flags, width, and precision indicators, then terminated with a field type character. The field type controls how the corresponding <tt>sprintf</tt> argument is to be interpreted, while the flags modify that interpretation. The field type characters are listed in the table at the end of this section. The flag characters are:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Flag     | Applies to   | Meaning\n  ---------+--------------+-----------------------------------------\n  space    | bdeEfgGiouxX | Leave a space at the start of\n           |              | positive numbers.\n  ---------+--------------+-----------------------------------------\n  (digit)$ | all          | Specifies the absolute argument number\n           |              | for this field. Absolute and relative\n           |              | argument numbers cannot be mixed in a\n           |              | sprintf string.\n  ---------+--------------+-----------------------------------------\n   #       | beEfgGoxX    | Use an alternative format. For the\n           |              | conversions `o', `x', `X', and `b',\n           |              | prefix the result with ``0'', ``0x'', ``0X'',\n           |              |  and ``0b'', respectively. For `e',\n           |              | `E', `f', `g', and 'G', force a decimal\n           |              | point to be added, even if no digits follow.\n           |              | For `g' and 'G', do not remove trailing zeros.\n  ---------+--------------+-----------------------------------------\n  +        | bdeEfgGiouxX | Add a leading plus sign to positive numbers.\n  ---------+--------------+-----------------------------------------\n  -        | all          | Left-justify the result of this conversion.\n  ---------+--------------+-----------------------------------------\n  0 (zero) | bdeEfgGiouxX | Pad with zeros, not spaces.\n  ---------+--------------+-----------------------------------------\n  *        | all          | Use the next argument as the field width.\n           |              | If negative, left-justify the result. If the\n           |              | asterisk is followed by a number and a dollar\n           |              | sign, use the indicated argument as the width.\n"
- !ruby/struct:SM::Flow::P 
  body: The field width is an optional integer, followed optionally by a period and a precision. The width specifies the minimum number of characters that will be written to the result for this field. For numeric fields, the precision controls the number of decimal places displayed. For string fields, the precision determines the maximum number of characters to be copied from the string. (Thus, the format sequence <tt>%10.10s</tt> will always contribute exactly ten characters to the result.)
- !ruby/struct:SM::Flow::P 
  body: "The field types are:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Field |  Conversion\n    ------+--------------------------------------------------------------\n      b   | Convert argument as a binary number.\n      c   | Argument is the numeric code for a single character.\n      d   | Convert argument as a decimal number.\n      E   | Equivalent to `e', but uses an uppercase E to indicate\n          | the exponent.\n      e   | Convert floating point argument into exponential notation\n          | with one digit before the decimal point. The precision\n          | determines the number of fractional digits (defaulting to six).\n      f   | Convert floating point argument as [-]ddd.ddd,\n          |  where the precision determines the number of digits after\n          | the decimal point.\n      G   | Equivalent to `g', but use an uppercase `E' in exponent form.\n      g   | Convert a floating point number using exponential form\n          | if the exponent is less than -4 or greater than or\n          | equal to the precision, or in d.dddd form otherwise.\n      i   | Identical to `d'.\n      o   | Convert argument as an octal number.\n      p   | The valuing of argument.inspect.\n      s   | Argument is a string to be substituted. If the format\n          | sequence contains a precision, at most that many characters\n          | will be copied.\n      u   | Treat argument as an unsigned decimal number. Negative integers\n          | are displayed as a 32 bit two's complement plus one for the\n          | underlying architecture; that is, 2 ** 32 + n.  However, since\n          | Ruby has no inherent limit on bits used to represent the\n          | integer, this value is preceded by two dots (..) in order to\n          | indicate a infinite number of leading sign bits.\n      X   | Convert argument as a hexadecimal number using uppercase\n          | letters. Negative numbers will be displayed with two\n          | leading periods (representing an infinite string of\n          | leading 'FF's.\n      x   | Convert argument as a hexadecimal number.\n          | Negative numbers will be displayed with two\n          | leading periods (representing an infinite string of\n          | leading 'ff's.\n"
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "   sprintf(&quot;%d %04x&quot;, 123, 123)               #=&gt; &quot;123 007b&quot;\n   sprintf(&quot;%08b '%4s'&quot;, 123, 123)            #=&gt; &quot;01111011 ' 123'&quot;\n   sprintf(&quot;%1$*2$s %2$d %1$s&quot;, &quot;hello&quot;, 8)   #=&gt; &quot;   hello 8 hello&quot;\n   sprintf(&quot;%1$*2$s %2$d&quot;, &quot;hello&quot;, -8)       #=&gt; &quot;hello    -8&quot;\n   sprintf(&quot;%+g:% g:%-g&quot;, 1.23, 1.23, 1.23)   #=&gt; &quot;+1.23: 1.23:1.23&quot;\n   sprintf(&quot;%u&quot;, -123)                        #=&gt; &quot;..4294967173&quot;\n"
full_name: Kernel#format
is_singleton: false
name: format
params: |
  format(format_string [, arguments...] )   => string
  sprintf(format_string [, arguments...] )  => string

visibility: public
ri/1.8/system/Kernel/chop%21-i.yaml000064400000001062150403616070012504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>$_.chop!</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a  = &quot;now\\r\\n&quot;\n   $_ = a\n   chop!   #=&gt; &quot;now&quot;\n   chop!   #=&gt; &quot;no&quot;\n   chop!   #=&gt; &quot;n&quot;\n   chop!   #=&gt; &quot;&quot;\n   chop!   #=&gt; nil\n   $_      #=&gt; &quot;&quot;\n   a       #=&gt; &quot;&quot;\n"
full_name: Kernel#chop!
is_singleton: false
name: chop!
params: |
  chop!    => $_ or nil

visibility: public
ri/1.8/system/Kernel/rand-i.yaml000064400000002005150403616070012265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>max</em> to an integer using max1 = max<tt>.to_i.abs</tt>. If the result is zero, returns a pseudorandom floating point number greater than or equal to 0.0 and less than 1.0. Otherwise, returns a pseudorandom integer greater than or equal to zero and less than max1. <tt>Kernel::srand</tt> may be used to ensure repeatable sequences of random numbers between different runs of the program. Ruby currently uses a modified Mersenne Twister with a period of 2**19937-1.
- !ruby/struct:SM::Flow::VERB 
  body: "   srand 1234                 #=&gt; 0\n   [ rand,  rand ]            #=&gt; [0.191519450163469, 0.49766366626136]\n   [ rand(10), rand(1000) ]   #=&gt; [6, 817]\n   srand 1234                 #=&gt; 1234\n   [ rand,  rand ]            #=&gt; [0.191519450163469, 0.49766366626136]\n"
full_name: Kernel#rand
is_singleton: false
name: rand
params: |
  rand(max=0)    => number

visibility: public
ri/1.8/system/Kernel/getc-i.yaml000064400000000317150403616070012267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: obsolete
full_name: Kernel#getc
is_singleton: false
name: getc
params: ()
visibility: public
ri/1.8/system/Kernel/trace_var-i.yaml000064400000001730150403616100013305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Controls tracing of assignments to global variables. The parameter +symbol_ identifies the variable (as either a string name or a symbol identifier). <em>cmd</em> (which may be a string or a <tt>Proc</tt> object) or block is executed whenever the variable is assigned. The block or <tt>Proc</tt> object receives the variable's new value as a parameter. Also see <tt>Kernel::untrace_var</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   trace_var :$_, proc {|v| puts &quot;$_ is now '#{v}'&quot; }\n   $_ = &quot;hello&quot;\n   $_ = ' there'\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   $_ is now 'hello'\n   $_ is now ' there'\n"
full_name: Kernel#trace_var
is_singleton: false
name: trace_var
params: |
  trace_var(symbol, cmd )             => nil
  trace_var(symbol) {|val| block }    => nil

visibility: public
ri/1.8/system/Kernel/throw-i.yaml000064400000001063150403616100012501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Transfers control to the end of the active <tt>catch</tt> block waiting for <em>symbol</em>. Raises <tt>NameError</tt> if there is no <tt>catch</tt> block for the symbol. The optional second parameter supplies a return value for the <tt>catch</tt> block, which otherwise defaults to <tt>nil</tt>. For examples, see <tt>Kernel::catch</tt>.
full_name: Kernel#throw
is_singleton: false
name: throw
params: |
  throw(symbol [, obj])

visibility: public
ri/1.8/system/Kernel/putc-i.yaml000064400000000453150403616100012313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "  $stdout.putc(int)\n"
full_name: Kernel#putc
is_singleton: false
name: putc
params: |
  putc(int)   => int

visibility: public
ri/1.8/system/Kernel/Float-i.yaml000064400000001046150403616100012404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>arg</em> converted to a float. Numeric types are converted directly, the rest are converted using <em>arg</em>.to_f. As of Ruby 1.8, converting <tt>nil</tt> generates a <tt>TypeError</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Float(1)           #=&gt; 1.0\n   Float(&quot;123.456&quot;)   #=&gt; 123.456\n"
full_name: Kernel#Float
is_singleton: false
name: Float
params: |
  Float(arg)    => float

visibility: public
ri/1.8/system/Kernel/sub-i.yaml000064400000000572150403616100012133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>$_.sub(<em>args</em>)</tt>, except that <tt>$_</tt> will be updated if substitution occurs.
full_name: Kernel#sub
is_singleton: false
name: sub
params: |
  sub(pattern, replacement)   => $_
  sub(pattern) { block }      => $_

visibility: public
ri/1.8/system/Kernel/Integer-i.yaml000064400000001422150403616110012733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>arg</em> to a <tt>Fixnum</tt> or <tt>Bignum</tt>. Numeric types are converted directly (with floating point numbers being truncated). If <em>arg</em> is a <tt>String</tt>, leading radix indicators (<tt>0</tt>, <tt>0b</tt>, and <tt>0x</tt>) are honored. Others are converted using <tt>to_int</tt> and <tt>to_i</tt>. This behavior is different from that of <tt>String#to_i</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Integer(123.999)    #=&gt; 123\n   Integer(&quot;0x1a&quot;)     #=&gt; 26\n   Integer(Time.new)   #=&gt; 1049896590\n"
full_name: Kernel#Integer
is_singleton: false
name: Integer
params: |
  Integer(arg)    => integer

visibility: public
ri/1.8/system/Kernel/untrace_var-i.yaml000064400000000747150403616110013660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes tracing for the specified command on the given global variable and returns <tt>nil</tt>. If no command is specified, removes all tracing for that variable and returns an array containing the commands actually removed.
full_name: Kernel#untrace_var
is_singleton: false
name: untrace_var
params: |
  untrace_var(symbol [, cmd] )   => array or nil

visibility: public
ri/1.8/system/Kernel/chop-i.yaml000064400000001202150403616110012263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>($_.dup).chop!</tt>, except <tt>nil</tt> is never returned. See <tt>String#chop!</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a  =  &quot;now\\r\\n&quot;\n   $_ = a\n   chop   #=&gt; &quot;now&quot;\n   $_     #=&gt; &quot;now&quot;\n   chop   #=&gt; &quot;no&quot;\n   chop   #=&gt; &quot;n&quot;\n   chop   #=&gt; &quot;&quot;\n   chop   #=&gt; &quot;&quot;\n   a      #=&gt; &quot;now\\r\\n&quot;\n"
full_name: Kernel#chop
is_singleton: false
name: chop
params: |
  chop   => string

visibility: public
ri/1.8/system/Kernel/readlines-i.yaml000064400000000560150403616110013306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the lines returned by calling <tt>Kernel.gets(<em>separator</em>)</tt> until the end of file.
full_name: Kernel#readlines
is_singleton: false
name: readlines
params: |
  readlines(separator=$/)    => array

visibility: public
ri/1.8/system/Kernel/puts-i.yaml000064400000000465150403616120012340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to
- !ruby/struct:SM::Flow::VERB 
  body: "    $stdout.puts(obj, ...)\n"
full_name: Kernel#puts
is_singleton: false
name: puts
params: |
  puts(obj, ...)    => nil

visibility: public
ri/1.8/system/Kernel/warn-i.yaml000064400000000536150403616120012313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Display the given message (followed by a newline) on STDERR unless warnings are disabled (for example with the <tt>-W0</tt> flag).
full_name: Kernel#warn
is_singleton: false
name: warn
params: |
  warn(msg)   => nil

visibility: public
ri/1.8/system/Kernel/test-i.yaml000064400000005522150403616120012323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::VERB 
  body: " Uses the integer <em>aCmd</em> to perform various tests on\n <em>file1</em> (first table below) or on <em>file1</em> and\n <em>file2</em> (second table).\n\n File tests on a single file:\n\n   Test   Returns   Meaning\n    ?A  | Time    | Last access time for file1\n    ?b  | boolean | True if file1 is a block device\n    ?c  | boolean | True if file1 is a character device\n    ?C  | Time    | Last change time for file1\n    ?d  | boolean | True if file1 exists and is a directory\n    ?e  | boolean | True if file1 exists\n    ?f  | boolean | True if file1 exists and is a regular file\n    ?g  | boolean | True if file1 has the \\CF{setgid} bit\n        |         | set (false under NT)\n    ?G  | boolean | True if file1 exists and has a group\n        |         | ownership equal to the caller's group\n    ?k  | boolean | True if file1 exists and has the sticky bit set\n    ?l  | boolean | True if file1 exists and is a symbolic link\n    ?M  | Time    | Last modification time for file1\n    ?o  | boolean | True if file1 exists and is owned by\n        |         | the caller's effective uid\n    ?O  | boolean | True if file1 exists and is owned by\n        |         | the caller's real uid\n    ?p  | boolean | True if file1 exists and is a fifo\n    ?r  | boolean | True if file1 is readable by the effective\n        |         | uid/gid of the caller\n    ?R  | boolean | True if file is readable by the real\n        |         | uid/gid of the caller\n    ?s  | int/nil | If file1 has nonzero size, return the size,\n        |         | otherwise return nil\n    ?S  | boolean | True if file1 exists and is a socket\n    ?u  | boolean | True if file1 has the setuid bit set\n    ?w  | boolean | True if file1 exists and is writable by\n        |         | the effective uid/gid\n    ?W  | boolean | True if file1 exists and is writable by\n        |         | the real uid/gid\n    ?x  | boolean | True if file1 exists and is executable by\n        |         | the effective uid/gid\n    ?X  | boolean | True if file1 exists and is executable by\n        |         | the real uid/gid\n    ?z  | boolean | True if file1 exists and has a zero length\n"
- !ruby/struct:SM::Flow::P 
  body: "Tests that take two files:"
- !ruby/struct:SM::Flow::VERB 
  body: "    ?-  | boolean | True if file1 and file2 are identical\n    ?=  | boolean | True if the modification times of file1\n        |         | and file2 are equal\n    ?&lt;  | boolean | True if the modification time of file1\n        |         | is prior to that of file2\n    ?&gt;  | boolean | True if the modification time of file1\n        |         | is after that of file2\n"
full_name: Kernel#test
is_singleton: false
name: test
params: |
  test(int_cmd, file1 [, file2] ) => obj

visibility: public
ri/1.8/system/Kernel/trap-i.yaml000064400000002562150403616130012314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Specifies the handling of signals. The first parameter is a signal name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a signal number. The characters ``SIG'' may be omitted from the signal name. The command or block specifies code to be run when the signal is raised. If the command is the string ``IGNORE'' or ``SIG_IGN'', the signal will be ignored. If the command is ``DEFAULT'' or ``SIG_DFL'', the operating system's default handler will be invoked. If the command is ``EXIT'', the script will be terminated by the signal. Otherwise, the given command or block will be run. The special signal name ``EXIT'' or signal number zero will be invoked just prior to program termination. trap returns the previous handler for the given signal.
- !ruby/struct:SM::Flow::VERB 
  body: "    Signal.trap(0, proc { puts &quot;Terminating: #{$$}&quot; })\n    Signal.trap(&quot;CLD&quot;)  { puts &quot;Child died&quot; }\n    fork &amp;&amp; Process.wait\n"
- !ruby/struct:SM::Flow::P 
  body: "produces:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Terminating: 27461\n    Child died\n    Terminating: 27460\n"
full_name: Kernel#trap
is_singleton: false
name: trap
params: |
  Signal.trap( signal, proc ) => obj
  Signal.trap( signal ) {| | block } => obj

visibility: public
ri/1.8/system/YAML/Set/cdesc-Set.yaml000064400000000372150403616130013004 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Builtin collection: !set"
constants: []

full_name: YAML::Set
includes: []

instance_methods: []

name: Set
superclass: "::Hash"
ri/1.8/system/YAML/BaseEmitter/node_text-i.yaml000064400000000417150403616140015063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Emit plain, normal flowing text
full_name: YAML::BaseEmitter#node_text
is_singleton: false
name: node_text
params: ( value, block = nil )
visibility: public
ri/1.8/system/YAML/BaseEmitter/binary_base64-i.yaml000064400000000373150403616140015523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Emit binary data
full_name: YAML::BaseEmitter#binary_base64
is_singleton: false
name: binary_base64
params: ( value )
visibility: public
ri/1.8/system/YAML/BaseEmitter/simple-i.yaml000064400000000373150403616140014364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Emit a simple, unqouted string
full_name: YAML::BaseEmitter#simple
is_singleton: false
name: simple
params: ( value )
visibility: public
ri/1.8/system/YAML/BaseEmitter/single-i.yaml000064400000000366150403616150014357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Emit single-quoted string
full_name: YAML::BaseEmitter#single
is_singleton: false
name: single
params: ( value )
visibility: public
ri/1.8/system/YAML/BaseEmitter/options%3d-i.yaml000064400000000272150403616150015061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::BaseEmitter#options=
is_singleton: false
name: options=
params: ( opt )
visibility: public
ri/1.8/system/YAML/BaseEmitter/indent_text-i.yaml000064400000000450150403616150015415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Write a text block with the current indent
full_name: YAML::BaseEmitter#indent_text
is_singleton: false
name: indent_text
params: ( text, mod, first_line = true )
visibility: public
ri/1.8/system/YAML/BaseEmitter/indent-i.yaml000064400000000367150403616160014361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Write a current indent
full_name: YAML::BaseEmitter#indent
is_singleton: false
name: indent
params: ( mod = nil )
visibility: public
ri/1.8/system/YAML/BaseEmitter/fold-i.yaml000064400000000373150403616160014021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Folding paragraphs within a column
full_name: YAML::BaseEmitter#fold
is_singleton: false
name: fold
params: ( value )
visibility: public
ri/1.8/system/YAML/BaseEmitter/seq_map_shortcut-i.yaml000064400000000305150403616160016450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::BaseEmitter#seq_map_shortcut
is_singleton: false
name: seq_map_shortcut
params: ()
visibility: public
ri/1.8/system/YAML/BaseEmitter/map-i.yaml000064400000000347150403616170013654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Quick mapping
full_name: YAML::BaseEmitter#map
is_singleton: false
name: map
params: ( type, &e )
visibility: public
ri/1.8/system/YAML/BaseEmitter/options-i.yaml000064400000000276150403616170014573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::BaseEmitter#options
is_singleton: false
name: options
params: ( opt = nil )
visibility: public
ri/1.8/system/YAML/BaseEmitter/indent%21-i.yaml000064400000000360150403616200014555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add indent to the buffer
full_name: YAML::BaseEmitter#indent!
is_singleton: false
name: indent!
params: ()
visibility: public
ri/1.8/system/YAML/BaseEmitter/cdesc-BaseEmitter.yaml000064400000001603150403616200016122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: YAML::BaseEmitter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: binary_base64
- !ruby/object:RI::MethodSummary 
  name: double
- !ruby/object:RI::MethodSummary 
  name: fold
- !ruby/object:RI::MethodSummary 
  name: indent
- !ruby/object:RI::MethodSummary 
  name: indent!
- !ruby/object:RI::MethodSummary 
  name: indent_text
- !ruby/object:RI::MethodSummary 
  name: map
- !ruby/object:RI::MethodSummary 
  name: node_text
- !ruby/object:RI::MethodSummary 
  name: options
- !ruby/object:RI::MethodSummary 
  name: options=
- !ruby/object:RI::MethodSummary 
  name: seq
- !ruby/object:RI::MethodSummary 
  name: seq_map_shortcut
- !ruby/object:RI::MethodSummary 
  name: simple
- !ruby/object:RI::MethodSummary 
  name: single
name: BaseEmitter
superclass: 
ri/1.8/system/YAML/BaseEmitter/double-i.yaml000064400000000366150403616210014345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Emit double-quoted string
full_name: YAML::BaseEmitter#double
is_singleton: false
name: double
params: ( value )
visibility: public
ri/1.8/system/YAML/BaseEmitter/seq-i.yaml000064400000000350150403616210013654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Quick sequence
full_name: YAML::BaseEmitter#seq
is_singleton: false
name: seq
params: ( type, &e )
visibility: public
ri/1.8/system/YAML/PrivateType/to_yaml-i.yaml000064400000000276150403616210014607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::PrivateType#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/YAML/PrivateType/cdesc-PrivateType.yaml000064400000000626150403616220016250 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: tag_subclasses?
comment: 
- !ruby/struct:SM::Flow::P 
  body: Default private type
constants: []

full_name: YAML::PrivateType
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_yaml
name: PrivateType
superclass: Object
ri/1.8/system/YAML/PrivateType/new-c.yaml000064400000000266150403616220013726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::PrivateType::new
is_singleton: true
name: new
params: ( type, val )
visibility: public
ri/1.8/system/YAML/PrivateType/tag_subclasses%3f-c.yaml000064400000000303150403616220016425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::PrivateType::tag_subclasses?
is_singleton: true
name: tag_subclasses?
params: ()
visibility: public
ri/1.8/system/YAML/object_maker-c.yaml000064400000000372150403616220013304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Allocate blank object
full_name: YAML::object_maker
is_singleton: true
name: object_maker
params: ( obj_class, val )
visibility: public
ri/1.8/system/YAML/unescape-c.yaml000064400000000362150403616220012461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unescape the condenses escapes
full_name: YAML::unescape
is_singleton: true
name: unescape
params: ( value )
visibility: public
ri/1.8/system/YAML/dump_stream-c.yaml000064400000000673150403616230013204 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a YAML stream containing each of the items in <tt>objs</tt>, each having their own document.
- !ruby/struct:SM::Flow::VERB 
  body: "  YAML.dump_stream( 0, [], {} )\n    #=&gt; --- 0\n        --- []\n        --- {}\n"
full_name: YAML::dump_stream
is_singleton: true
name: dump_stream
params: ( *objs )
visibility: public
ri/1.8/system/YAML/tagged_classes-c.yaml000064400000001001150403616230013616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the complete dictionary of taguris, paired with classes. The key for the dictionary is the full taguri. The value for each key is the class constant associated to that taguri.
- !ruby/struct:SM::Flow::VERB 
  body: " YAML.tagged_classes[&quot;tag:yaml.org,2002:int&quot;] =&gt; Integer\n"
full_name: YAML::tagged_classes
is_singleton: true
name: tagged_classes
params: ()
visibility: public
ri/1.8/system/YAML/parse_file-c.yaml000064400000001637150403616230012776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse a document from the file located at <em>filepath</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  YAML.parse_file( 'animals.yaml' )\n     #=&gt; #&lt;YAML::Syck::Node:0x82ccce0\n          @kind=:seq,\n          @value=\n           [#&lt;YAML::Syck::Node:0x82ccd94\n             @kind=:scalar,\n             @type_id=&quot;str&quot;,\n             @value=&quot;badger&quot;&gt;,\n            #&lt;YAML::Syck::Node:0x82ccd58\n             @kind=:scalar,\n             @type_id=&quot;str&quot;,\n             @value=&quot;elephant&quot;&gt;,\n            #&lt;YAML::Syck::Node:0x82ccd1c\n             @kind=:scalar,\n             @type_id=&quot;str&quot;,\n             @value=&quot;tiger&quot;&gt;]&gt;\n"
full_name: YAML::parse_file
is_singleton: true
name: parse_file
params: ( filepath )
visibility: public
ri/1.8/system/YAML/parser-c.yaml000064400000000345150403616230012154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new default parser
full_name: YAML::parser
is_singleton: true
name: parser
params: ()
visibility: public
ri/1.8/system/YAML/read_type_class-c.yaml000064400000000516150403616230014021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Method to extract colon-seperated type and class, returning the type and the constant of the class
full_name: YAML::read_type_class
is_singleton: true
name: read_type_class
params: ( type, obj_class )
visibility: public
ri/1.8/system/YAML/load_stream-c.yaml000064400000000522150403616240013150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Loads all documents from the current <em>io</em> stream, returning a +YAML::Stream+ object containing all loaded documents.
full_name: YAML::load_stream
is_singleton: true
name: load_stream
params: ( io )
visibility: public
ri/1.8/system/YAML/cdesc-YAML.yaml000064400000023246150403616240012267 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_builtin_type
- !ruby/object:RI::MethodSummary 
  name: add_domain_type
- !ruby/object:RI::MethodSummary 
  name: add_private_type
- !ruby/object:RI::MethodSummary 
  name: add_ruby_type
- !ruby/object:RI::MethodSummary 
  name: detect_implicit
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_stream
- !ruby/object:RI::MethodSummary 
  name: each_document
- !ruby/object:RI::MethodSummary 
  name: each_node
- !ruby/object:RI::MethodSummary 
  name: emitter
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: generic_parser
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: load_documents
- !ruby/object:RI::MethodSummary 
  name: load_file
- !ruby/object:RI::MethodSummary 
  name: load_stream
- !ruby/object:RI::MethodSummary 
  name: make_stream
- !ruby/object:RI::MethodSummary 
  name: object_maker
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: parse_documents
- !ruby/object:RI::MethodSummary 
  name: parse_file
- !ruby/object:RI::MethodSummary 
  name: parser
- !ruby/object:RI::MethodSummary 
  name: quick_emit
- !ruby/object:RI::MethodSummary 
  name: read_type_class
- !ruby/object:RI::MethodSummary 
  name: resolver
- !ruby/object:RI::MethodSummary 
  name: tag_class
- !ruby/object:RI::MethodSummary 
  name: tagged_classes
- !ruby/object:RI::MethodSummary 
  name: tagurize
- !ruby/object:RI::MethodSummary 
  name: transfer
- !ruby/object:RI::MethodSummary 
  name: try_implicit
- !ruby/object:RI::MethodSummary 
  name: unescape
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: YAML
- !ruby/struct:SM::Flow::P 
  body: YAML(tm) (rhymes with 'camel') is a straightforward machine parsable data serialization format designed for human readability and interaction with scripting languages such as Perl and Python. YAML is optimized for data serialization, formatted dumping, configuration files, log files, Internet messaging and filtering. This specification describes the YAML information model and serialization format. Together with the Unicode standard for characters, it provides all the information necessary to understand YAML Version 1.0 and construct computer programs to process it.
- !ruby/struct:SM::Flow::P 
  body: See http://yaml.org/ for more information. For a quick tutorial, please visit YAML In Five Minutes (http://yaml.kwiki.org/?YamlInFiveMinutes).
- !ruby/struct:SM::Flow::H 
  level: 2
  text: About This Library
- !ruby/struct:SM::Flow::P 
  body: The YAML 1.0 specification outlines four stages of YAML loading and dumping. This library honors all four of those stages, although data is really only available to you in three stages.
- !ruby/struct:SM::Flow::P 
  body: "The four stages are: native, representation, serialization, and presentation."
- !ruby/struct:SM::Flow::P 
  body: The native stage refers to data which has been loaded completely into Ruby's own types. (See +YAML::load+.)
- !ruby/struct:SM::Flow::P 
  body: The representation stage means data which has been composed into +YAML::BaseNode+ objects. In this stage, the document is available as a tree of node objects. You can perform YPath queries and transformations at this level. (See +YAML::parse+.)
- !ruby/struct:SM::Flow::P 
  body: The serialization stage happens inside the parser. The YAML parser used in Ruby is called Syck. Serialized nodes are available in the extension as SyckNode structs.
- !ruby/struct:SM::Flow::P 
  body: The presentation stage is the YAML document itself. This is accessible to you as a string. (See +YAML::dump+.)
- !ruby/struct:SM::Flow::P 
  body: For more information about the various information models, see Chapter 3 of the YAML 1.0 Specification (http://yaml.org/spec/#id2491269).
- !ruby/struct:SM::Flow::P 
  body: The YAML module provides quick access to the most common loading (YAML::load) and dumping (YAML::dump) tasks. This module also provides an API for registering global types (YAML::add_domain_type).
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::P 
  body: A simple round-trip (load and dump) of an object.
- !ruby/struct:SM::Flow::VERB 
  body: "    require &quot;yaml&quot;\n\n    test_obj = [&quot;dogs&quot;, &quot;cats&quot;, &quot;badgers&quot;]\n\n    yaml_obj = YAML::dump( test_obj )\n                        # -&gt; ---\n                             - dogs\n                             - cats\n                             - badgers\n    ruby_obj = YAML::load( yaml_obj )\n                        # =&gt; [&quot;dogs&quot;, &quot;cats&quot;, &quot;badgers&quot;]\n    ruby_obj == test_obj\n                        # =&gt; true\n"
- !ruby/struct:SM::Flow::P 
  body: To register your custom types with the global resolver, use <tt>add_domain_type</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "    YAML::add_domain_type( &quot;your-site.com,2004&quot;, &quot;widget&quot; ) do |type, val|\n        Widget.new( val )\n    end\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Constants
  name: VERSION
  value: "'0.60'"
- !ruby/object:RI::Constant 
  comment: 
  name: SUPPORTED_YAML_VERSIONS
  value: "['1.0']"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Parser tokens
  name: WORD_CHAR
  value: "'A-Za-z0-9'"
- !ruby/object:RI::Constant 
  comment: 
  name: PRINTABLE_CHAR
  value: "'-_A-Za-z0-9!?/()$\\'\". '"
- !ruby/object:RI::Constant 
  comment: 
  name: NOT_PLAIN_CHAR
  value: "'\\x7f\\x0-\\x1f\\x80-\\x9f'"
- !ruby/object:RI::Constant 
  comment: 
  name: ESCAPE_CHAR
  value: "'[\\\\x00-\\\\x09\\\\x0b-\\\\x1f]'"
- !ruby/object:RI::Constant 
  comment: 
  name: INDICATOR_CHAR
  value: "'*&!|\\\\\\\\^@%{}[]='"
- !ruby/object:RI::Constant 
  comment: 
  name: SPACE_INDICATORS
  value: "'-#:,?'"
- !ruby/object:RI::Constant 
  comment: 
  name: RESTRICTED_INDICATORS
  value: "'#:,}]'"
- !ruby/object:RI::Constant 
  comment: 
  name: DNS_COMP_RE
  value: "\"\\\\w(?:[-\\\\w]*\\\\w)?\""
- !ruby/object:RI::Constant 
  comment: 
  name: DNS_NAME_RE
  value: "\"(?:(?:#{DNS_COMP_RE}\\\\.)+#{DNS_COMP_RE}|#{DNS_COMP_RE})\""
- !ruby/object:RI::Constant 
  comment: 
  name: ESCAPES
  value: "%w{\\x00   \\x01       \\x02  \\x03     \\x04        \\x05   \\x06      \\a                              \\x08    \\t         \\n             \\v         \\f             \\r         \\x0e   \\x0f                                  \\x10       \\x11  \\x12     \\x13        \\x14   \\x15      \\x16 \\x17                                  \\x18       \\x19  \\x1a     \\e          \\x1c    \\x1d       \\x1e  \\x1f                             }"
- !ruby/object:RI::Constant 
  comment: 
  name: UNESCAPES
  value: "{                                 'a' => \"\\x07\", 'b' => \"\\x08\", 't' => \"\\x09\",                                  'n' => \"\\x0a\", 'v' => \"\\x0b\", 'f' => \"\\x0c\",                                 'r' => \"\\x0d\", 'e' => \"\\x1b\", '\\\\' => '\\\\',                             }"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Default settings
  name: DEFAULTS
  value: "{                 :Indent => 2, :UseHeader => false, :UseVersion => false, :Version => '1.0',                 :SortKeys => false, :AnchorFormat => 'id%03d', :ExplicitTypes => false,                 :WidthType => 'absolute', :BestWidth => 80,                 :UseBlock => false, :UseFold => false, :Encoding => :None"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Error messages
  name: ERROR_NO_HEADER_NODE
  value: "\"With UseHeader=false, the node Array or Hash must have elements\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_NEED_HEADER
  value: "\"With UseHeader=false, the node must be an Array or Hash\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_BAD_EXPLICIT
  value: "\"Unsupported explicit transfer: '%s'\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_MANY_EXPLICIT
  value: "\"More than one explicit transfer\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_MANY_IMPLICIT
  value: "\"More than one implicit request\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_NO_ANCHOR
  value: "\"No anchor for alias '%s'\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_BAD_ANCHOR
  value: "\"Invalid anchor: %s\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_MANY_ANCHOR
  value: "\"More than one anchor\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_ANCHOR_ALIAS
  value: "\"Can't define both an anchor and an alias\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_BAD_ALIAS
  value: "\"Invalid alias: %s\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_MANY_ALIAS
  value: "\"More than one alias\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_ZERO_INDENT
  value: "\"Can't use zero as an indentation width\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_UNSUPPORTED_VERSION
  value: "\"This release of YAML.rb does not support YAML version %s\""
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR_UNSUPPORTED_ENCODING
  value: "\"Attempt to use unsupported encoding: %s\""
- !ruby/object:RI::Constant 
  comment: 
  name: Resolver
  value: YAML::Syck::Resolver
- !ruby/object:RI::Constant 
  comment: 
  name: DefaultResolver
  value: YAML::Syck::DefaultResolver
- !ruby/object:RI::Constant 
  comment: 
  name: GenericResolver
  value: YAML::Syck::GenericResolver
- !ruby/object:RI::Constant 
  comment: 
  name: Parser
  value: YAML::Syck::Parser
- !ruby/object:RI::Constant 
  comment: 
  name: Emitter
  value: YAML::Syck::Emitter
full_name: YAML
includes: []

instance_methods: []

name: YAML
superclass: 
ri/1.8/system/YAML/add_builtin_type-c.yaml000064400000000437150403616250014203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a transfer method for a builtin type
full_name: YAML::add_builtin_type
is_singleton: true
name: add_builtin_type
params: ( type_tag, &transfer_proc )
visibility: public
ri/1.8/system/YAML/Sequence/add-i.yaml000064400000000253150403616250013166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Sequence#add
is_singleton: false
name: add
params: ( v )
visibility: public
ri/1.8/system/YAML/Sequence/cdesc-Sequence.yaml000064400000000355150403616250015042 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: YAML::Sequence
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
name: Sequence
superclass: Array
ri/1.8/system/YAML/make_stream-c.yaml000064400000000370150403616260013151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class method for creating streams
full_name: YAML::make_stream
is_singleton: true
name: make_stream
params: ( io )
visibility: public
ri/1.8/system/YAML/Omap/%5b%5d-i.yaml000064400000000247150403616260012437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Omap#[]
is_singleton: false
name: "[]"
params: ( k )
visibility: public
ri/1.8/system/YAML/Omap/cdesc-Omap.yaml000064400000001140150403616260013304 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Builtin collection: !omap"
constants: []

full_name: YAML::Omap
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: has_key?
- !ruby/object:RI::MethodSummary 
  name: is_complex_yaml?
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: yaml_initialize
name: Omap
superclass: "::Array"
ri/1.8/system/YAML/Omap/to_yaml-i.yaml000064400000000267150403616260013234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Omap#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/YAML/Omap/yaml_initialize-i.yaml000064400000000306150403616260014745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Omap#yaml_initialize
is_singleton: false
name: yaml_initialize
params: ( tag, val )
visibility: public
ri/1.8/system/YAML/Omap/is_complex_yaml%3f-i.yaml000064400000000276150403616260015252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Omap#is_complex_yaml?
is_singleton: false
name: is_complex_yaml?
params: ()
visibility: public
ri/1.8/system/YAML/Omap/%5b%5d%3d-i.yaml000064400000000260150403616260012726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Omap#[]=
is_singleton: false
name: "[]="
params: ( k, *rest )
visibility: public
ri/1.8/system/YAML/Omap/%5b%5d-c.yaml000064400000000253150403616260012426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Omap::[]
is_singleton: true
name: "[]"
params: ( *vals )
visibility: public
ri/1.8/system/YAML/Omap/has_key%3f-i.yaml000064400000000261150403616260013503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Omap#has_key?
is_singleton: false
name: has_key?
params: ( k )
visibility: public
ri/1.8/system/YAML/Error/cdesc-Error.yaml000064400000000373150403616260013705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: YAML Error classes
constants: []

full_name: YAML::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/YAML/parse-c.yaml000064400000002333150403616260011774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse the first document from the current <em>io</em> stream
- !ruby/struct:SM::Flow::VERB 
  body: "  File.open( 'animals.yaml' ) { |yf| YAML::load( yf ) }\n     #=&gt; #&lt;YAML::Syck::Node:0x82ccce0\n          @kind=:seq,\n          @value=\n           [#&lt;YAML::Syck::Node:0x82ccd94\n             @kind=:scalar,\n             @type_id=&quot;str&quot;,\n             @value=&quot;badger&quot;&gt;,\n            #&lt;YAML::Syck::Node:0x82ccd58\n             @kind=:scalar,\n             @type_id=&quot;str&quot;,\n             @value=&quot;elephant&quot;&gt;,\n            #&lt;YAML::Syck::Node:0x82ccd1c\n             @kind=:scalar,\n             @type_id=&quot;str&quot;,\n             @value=&quot;tiger&quot;&gt;]&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: Can also load from a string.
- !ruby/struct:SM::Flow::VERB 
  body: "  YAML.parse( &quot;--- :locked&quot; )\n     #=&gt; #&lt;YAML::Syck::Node:0x82edddc\n           @type_id=&quot;tag:ruby.yaml.org,2002:sym&quot;,\n           @value=&quot;:locked&quot;, @kind=:scalar&gt;\n"
full_name: YAML::parse
is_singleton: true
name: parse
params: ( io )
visibility: public
ri/1.8/system/YAML/resolver-c.yaml000064400000000351150403616260012521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the default resolver
full_name: YAML::resolver
is_singleton: true
name: resolver
params: ()
visibility: public
ri/1.8/system/YAML/YPath/cdesc-YPath.yaml000064400000000744150403616260013577 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: flags
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: predicates
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: segments
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: each_path
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: YAML::YPath
includes: []

instance_methods: []

name: YPath
superclass: Object
ri/1.8/system/YAML/YPath/new-c.yaml000064400000000252150403616260012476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::YPath::new
is_singleton: true
name: new
params: ( str )
visibility: public
ri/1.8/system/YAML/YPath/each_path-c.yaml000064400000000341150403616260013620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: YPath.new( path )
comment: 
full_name: YAML::YPath::each_path
is_singleton: true
name: each_path
params: ( str ) {|YPath.new( path )| ...}
visibility: public
ri/1.8/system/YAML/detect_implicit-c.yaml000064400000000371150403616260014024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Detect typing of a string
full_name: YAML::detect_implicit
is_singleton: true
name: detect_implicit
params: ( val )
visibility: public
ri/1.8/system/YAML/add_ruby_type-c.yaml000064400000000431150403616260013511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a transfer method for a builtin type
full_name: YAML::add_ruby_type
is_singleton: true
name: add_ruby_type
params: ( type_tag, &transfer_proc )
visibility: public
ri/1.8/system/YAML/Mapping/add-i.yaml000064400000000255150403616260013014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Mapping#add
is_singleton: false
name: add
params: ( k, v )
visibility: public
ri/1.8/system/YAML/Mapping/cdesc-Mapping.yaml000064400000000446150403616260014512 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Emitter helper classes
constants: []

full_name: YAML::Mapping
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
name: Mapping
superclass: Array
ri/1.8/system/YAML/quick_emit-c.yaml000064400000000402150403616260013007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Allocate an Emitter if needed
full_name: YAML::quick_emit
is_singleton: true
name: quick_emit
params: ( oid, opts = {}, &e )
visibility: public
ri/1.8/system/YAML/load_file-c.yaml000064400000000617150403616260012603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Load a document from the file located at <em>filepath</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  YAML.load_file( 'animals.yaml' )\n     #=&gt; ['badger', 'elephant', 'tiger']\n"
full_name: YAML::load_file
is_singleton: true
name: load_file
params: ( filepath )
visibility: public
ri/1.8/system/YAML/generic_parser-c.yaml000064400000000365150403616260013655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new generic parser
full_name: YAML::generic_parser
is_singleton: true
name: generic_parser
params: ()
visibility: public
ri/1.8/system/YAML/emitter-c.yaml000064400000000350150403616260012330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new default emitter
full_name: YAML::emitter
is_singleton: true
name: emitter
params: ()
visibility: public
ri/1.8/system/YAML/BaseNode/%5b%5d-i.yaml000064400000000401150403616260013213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: We want the node to act like as Hash if it is.
full_name: YAML::BaseNode#[]
is_singleton: false
name: "[]"
params: ( *key )
visibility: public
ri/1.8/system/YAML/BaseNode/select%21-i.yaml000064400000000424150403616260014036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Search for YPath entry and return transformed nodes.
full_name: YAML::BaseNode#select!
is_singleton: false
name: select!
params: ( ypath_str )
visibility: public
ri/1.8/system/YAML/BaseNode/select-i.yaml000064400000000420150403616260013622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Search for YPath entry and return qualified nodes.
full_name: YAML::BaseNode#select
is_singleton: false
name: select
params: ( ypath_str )
visibility: public
ri/1.8/system/YAML/BaseNode/at-i.yaml000064400000000253150403616260012753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::BaseNode#at
is_singleton: false
name: at
params: ( seg )
visibility: public
ri/1.8/system/YAML/BaseNode/match_segment-i.yaml000064400000000427150403616260015170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Search a node for a single YPath segment
full_name: YAML::BaseNode#match_segment
is_singleton: false
name: match_segment
params: ( ypath, depth )
visibility: public
ri/1.8/system/YAML/BaseNode/children-i.yaml000064400000000262150403616260014137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::BaseNode#children
is_singleton: false
name: children
params: ()
visibility: public
ri/1.8/system/YAML/BaseNode/emit-i.yaml000064400000000252150403616260013304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::BaseNode#emit
is_singleton: false
name: emit
params: ()
visibility: public
ri/1.8/system/YAML/BaseNode/children_with_index-i.yaml000064400000000310150403616260016353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::BaseNode#children_with_index
is_singleton: false
name: children_with_index
params: ()
visibility: public
ri/1.8/system/YAML/BaseNode/cdesc-BaseNode.yaml000064400000001370150403616260014661 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: YAML Generic Model container
constants: []

full_name: YAML::BaseNode
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: at
- !ruby/object:RI::MethodSummary 
  name: children
- !ruby/object:RI::MethodSummary 
  name: children_with_index
- !ruby/object:RI::MethodSummary 
  name: emit
- !ruby/object:RI::MethodSummary 
  name: match_path
- !ruby/object:RI::MethodSummary 
  name: match_segment
- !ruby/object:RI::MethodSummary 
  name: search
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: select!
name: BaseNode
superclass: 
ri/1.8/system/YAML/BaseNode/search-i.yaml000064400000000432150403616260013613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Search for YPath entry and return a list of qualified paths.
full_name: YAML::BaseNode#search
is_singleton: false
name: search
params: ( ypath_str )
visibility: public
ri/1.8/system/YAML/BaseNode/match_path-i.yaml000064400000000423150403616260014456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: YPath search returning a complete depth array
full_name: YAML::BaseNode#match_path
is_singleton: false
name: match_path
params: ( ypath_str )
visibility: public
ri/1.8/system/YAML/load_documents-c.yaml000064400000001037150403616260013662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> with each consecutive document in the YAML stream contained in <em>io</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  File.open( 'many-docs.yaml' ) do |yf|\n    YAML.load_documents( yf ) do |ydoc|\n      ## ydoc contains the single object\n      ## from the YAML document\n    end\n  end\n"
full_name: YAML::load_documents
is_singleton: true
name: load_documents
params: ( io, &doc_proc )
visibility: public
ri/1.8/system/YAML/tag_class-c.yaml000064400000002433150403616260012623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Associates a taguri <em>tag</em> with a Ruby class <em>cls</em>. The taguri is used to give types to classes when loading YAML. Taguris are of the form:"
- !ruby/struct:SM::Flow::VERB 
  body: "  tag:authorityName,date:specific\n"
- !ruby/struct:SM::Flow::P 
  body: The <tt>authorityName</tt> is a domain name or email address. The <tt>date</tt> is the date the type was issued in YYYY or YYYY-MM or YYYY-MM-DD format. The <tt>specific</tt> is a name for the type being added.
- !ruby/struct:SM::Flow::P 
  body: "For example, built-in YAML types have 'yaml.org' as the <tt>authorityName</tt> and '2002' as the <tt>date</tt>. The <tt>specific</tt> is simply the name of the type:"
- !ruby/struct:SM::Flow::VERB 
  body: " tag:yaml.org,2002:int\n tag:yaml.org,2002:float\n tag:yaml.org,2002:timestamp\n"
- !ruby/struct:SM::Flow::P 
  body: The domain must be owned by you on the <tt>date</tt> declared. If you don't own any domains on the date you declare the type, you can simply use an e-mail address.
- !ruby/struct:SM::Flow::VERB 
  body: " tag:why@ruby-lang.org,2004:notes/personal\n"
full_name: YAML::tag_class
is_singleton: true
name: tag_class
params: ( tag, cls )
visibility: public
ri/1.8/system/YAML/dump-c.yaml000064400000001214150403616260011624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>obj</em> to YAML and writes the YAML result to <em>io</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  File.open( 'animals.yaml', 'w' ) do |out|\n    YAML.dump( ['badger', 'elephant', 'tiger'], out )\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: If no <em>io</em> is provided, a string containing the dumped YAML is returned.
- !ruby/struct:SM::Flow::VERB 
  body: "  YAML.dump( :locked )\n     #=&gt; &quot;--- :locked&quot;\n"
full_name: YAML::dump
is_singleton: true
name: dump
params: ( obj, io = nil )
visibility: public
ri/1.8/system/YAML/ParseError/cdesc-ParseError.yaml000064400000000306150403616260015667 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: YAML::ParseError
includes: []

instance_methods: []

name: ParseError
superclass: Error
ri/1.8/system/YAML/TypeError/cdesc-TypeError.yaml000064400000000314150403616260015404 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: YAML::TypeError
includes: []

instance_methods: []

name: TypeError
superclass: StandardError
ri/1.8/system/YAML/Pairs/%5b%5d-i.yaml000064400000000250150403616260012613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Pairs#[]
is_singleton: false
name: "[]"
params: ( k )
visibility: public
ri/1.8/system/YAML/Pairs/to_yaml-i.yaml000064400000000270150403616260013410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Pairs#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/YAML/Pairs/yaml_initialize-i.yaml000064400000000307150403616260015130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Pairs#yaml_initialize
is_singleton: false
name: yaml_initialize
params: ( tag, val )
visibility: public
ri/1.8/system/YAML/Pairs/is_complex_yaml%3f-i.yaml000064400000000277150403616260015435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Pairs#is_complex_yaml?
is_singleton: false
name: is_complex_yaml?
params: ()
visibility: public
ri/1.8/system/YAML/Pairs/%5b%5d%3d-i.yaml000064400000000257150403616260013116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Pairs#[]=
is_singleton: false
name: "[]="
params: ( k, val )
visibility: public
ri/1.8/system/YAML/Pairs/%5b%5d-c.yaml000064400000000254150403616260012611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Pairs::[]
is_singleton: true
name: "[]"
params: ( *vals )
visibility: public
ri/1.8/system/YAML/Pairs/cdesc-Pairs.yaml000064400000001143150403616260013653 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Builtin collection: !pairs"
constants: []

full_name: YAML::Pairs
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: has_key?
- !ruby/object:RI::MethodSummary 
  name: is_complex_yaml?
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: yaml_initialize
name: Pairs
superclass: "::Array"
ri/1.8/system/YAML/Pairs/has_key%3f-i.yaml000064400000000262150403616260013666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Pairs#has_key?
is_singleton: false
name: has_key?
params: ( k )
visibility: public
ri/1.8/system/YAML/each_node-c.yaml000064400000001070150403616260012564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> with a tree of +YAML::BaseNodes+, one tree for each consecutive document in the YAML stream contained in <em>io</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  File.open( 'many-docs.yaml' ) do |yf|\n    YAML.each_node( yf ) do |ydoc|\n      ## ydoc contains a tree of nodes\n      ## from the YAML document\n    end\n  end\n"
full_name: YAML::each_node
is_singleton: true
name: each_node
params: ( io, &doc_proc )
visibility: public
ri/1.8/system/YAML/DBM/update-i.yaml000064400000000256150403616260012556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#update
is_singleton: false
name: update
params: ( hsh )
visibility: public
ri/1.8/system/YAML/DBM/invert-i.yaml000064400000000251150403616260012576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#invert
is_singleton: false
name: invert
params: ()
visibility: public
ri/1.8/system/YAML/DBM/%5b%5d-i.yaml000064400000000250150403616260012137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#[]
is_singleton: false
name: "[]"
params: ( key )
visibility: public
ri/1.8/system/YAML/DBM/each-i.yaml000064400000000340150403616260012166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #each_pair"
full_name: YAML::DBM#each
is_singleton: false
name: each
params: ()
visibility: public
ri/1.8/system/YAML/DBM/select-i.yaml000064400000000301150403616260012542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: k, v
comment: 
full_name: YAML::DBM#select
is_singleton: false
name: select
params: ( *keys ) {|k, v| ...}
visibility: public
ri/1.8/system/YAML/DBM/to_a-i.yaml000064400000000245150403616260012214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/YAML/DBM/store-i.yaml000064400000000261150403616260012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#store
is_singleton: false
name: store
params: ( key, val )
visibility: public
ri/1.8/system/YAML/DBM/values_at-i.yaml000064400000000266150403616260013260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#values_at
is_singleton: false
name: values_at
params: ( *keys )
visibility: public
ri/1.8/system/YAML/DBM/delete-i.yaml000064400000000256150403616260012536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#delete
is_singleton: false
name: delete
params: ( key )
visibility: public
ri/1.8/system/YAML/DBM/index-i.yaml000064400000000257150403616260012404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#index
is_singleton: false
name: index
params: ( keystr )
visibility: public
ri/1.8/system/YAML/DBM/delete_if-i.yaml000064400000000327150403616260013213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ( k, fetch( k ) )
comment: 
full_name: YAML::DBM#delete_if
is_singleton: false
name: delete_if
params: () {|k, fetch( k  )| ...}
visibility: public
ri/1.8/system/YAML/DBM/each_value-i.yaml000064400000000334150403616260013365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: YAML::load( v ) }
comment: 
full_name: YAML::DBM#each_value
is_singleton: false
name: each_value
params: () {|YAML::load( v ) }| ...}
visibility: public
ri/1.8/system/YAML/DBM/replace-i.yaml000064400000000260150403616260012702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#replace
is_singleton: false
name: replace
params: ( hsh )
visibility: public
ri/1.8/system/YAML/DBM/reject-i.yaml000064400000000272150403616270012547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: k, v
comment: 
full_name: YAML::DBM#reject
is_singleton: false
name: reject
params: () {|k, v| ...}
visibility: public
ri/1.8/system/YAML/DBM/values-i.yaml000064400000000251150403616270012567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#values
is_singleton: false
name: values
params: ()
visibility: public
ri/1.8/system/YAML/DBM/to_hash-i.yaml000064400000000253150403616270012717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#to_hash
is_singleton: false
name: to_hash
params: ()
visibility: public
ri/1.8/system/YAML/DBM/shift-i.yaml000064400000000247150403616270012412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#shift
is_singleton: false
name: shift
params: ()
visibility: public
ri/1.8/system/YAML/DBM/%5b%5d%3d-i.yaml000064400000000257150403616270012443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#[]=
is_singleton: false
name: "[]="
params: ( key, val )
visibility: public
ri/1.8/system/YAML/DBM/each_pair-i.yaml000064400000000376150403616270013213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: each
block_params: k, fetch( k ) }
comment: 
full_name: YAML::DBM#each_pair
is_singleton: false
name: each_pair
params: () {|k, fetch( k ) }| ...}
visibility: public
ri/1.8/system/YAML/DBM/has_value%3f-i.yaml000064400000000266150403616270013543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DBM#has_value?
is_singleton: false
name: has_value?
params: ( val )
visibility: public
ri/1.8/system/YAML/DBM/fetch-i.yaml000064400000000322150403616270012360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: keystr
comment: 
full_name: YAML::DBM#fetch
is_singleton: false
name: fetch
params: ( keystr, ifnone = nil ) {|keystr| ...}
visibility: public
ri/1.8/system/YAML/DBM/cdesc-DBM.yaml000064400000002415150403616270012527 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION
  value: "\"0.1\""
full_name: YAML::DBM
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete_if
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_pair
- !ruby/object:RI::MethodSummary 
  name: each_value
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: has_value?
- !ruby/object:RI::MethodSummary 
  name: index
- !ruby/object:RI::MethodSummary 
  name: invert
- !ruby/object:RI::MethodSummary 
  name: reject
- !ruby/object:RI::MethodSummary 
  name: replace
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: shift
- !ruby/object:RI::MethodSummary 
  name: store
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_hash
- !ruby/object:RI::MethodSummary 
  name: update
- !ruby/object:RI::MethodSummary 
  name: values
- !ruby/object:RI::MethodSummary 
  name: values_at
name: DBM
superclass: "::DBM"
ri/1.8/system/YAML/load-c.yaml000064400000001065150403616270011603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Load a document from the current <em>io</em> stream.
- !ruby/struct:SM::Flow::VERB 
  body: "  File.open( 'animals.yaml' ) { |yf| YAML::load( yf ) }\n     #=&gt; ['badger', 'elephant', 'tiger']\n"
- !ruby/struct:SM::Flow::P 
  body: Can also load from a string.
- !ruby/struct:SM::Flow::VERB 
  body: "  YAML.load( &quot;--- :locked&quot; )\n     #=&gt; :locked\n"
full_name: YAML::load
is_singleton: true
name: load
params: ( io )
visibility: public
ri/1.8/system/YAML/Stream/%5b%5d-i.yaml000064400000000251150403616270012772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Stream#[]
is_singleton: false
name: "[]"
params: ( i )
visibility: public
ri/1.8/system/YAML/Stream/edit-i.yaml000064400000000266150403616270013054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Stream#edit
is_singleton: false
name: edit
params: ( doc_num, doc )
visibility: public
ri/1.8/system/YAML/Stream/add-i.yaml000064400000000253150403616270012653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Stream#add
is_singleton: false
name: add
params: ( doc )
visibility: public
ri/1.8/system/YAML/Stream/cdesc-Stream.yaml000064400000001167150403616270014214 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: documents
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: options
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: YAML::Stream -- for emitting many documents
constants: []

full_name: YAML::Stream
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: edit
- !ruby/object:RI::MethodSummary 
  name: emit
name: Stream
superclass: Object
ri/1.8/system/YAML/Stream/new-c.yaml000064400000000261150403616270012705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Stream::new
is_singleton: true
name: new
params: ( opts = {} )
visibility: public
ri/1.8/system/YAML/Stream/emit-i.yaml000064400000000262150403616270013061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Stream#emit
is_singleton: false
name: emit
params: ( io = nil )
visibility: public
ri/1.8/system/YAML/Store/load-i.yaml000064400000000256150403616270012706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Store#load
is_singleton: false
name: load
params: (content)
visibility: public
ri/1.8/system/YAML/Store/new-c.yaml000064400000000251150403616270012545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Store::new
is_singleton: true
name: new
params: ( *o )
visibility: public
ri/1.8/system/YAML/Store/cdesc-Store.yaml000064400000001342150403616270013711 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: EMPTY_MARSHAL_DATA
  value: "{}.to_yaml"
- !ruby/object:RI::Constant 
  comment: 
  name: EMPTY_MARSHAL_CHECKSUM
  value: Digest::MD5.digest(EMPTY_MARSHAL_DATA)
full_name: YAML::Store
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: empty_marshal_checksum
- !ruby/object:RI::MethodSummary 
  name: empty_marshal_data
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: marshal_dump_supports_canonical_option?
name: Store
superclass: PStore
ri/1.8/system/YAML/Store/empty_marshal_data-i.yaml000064400000000303150403616270015616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Store#empty_marshal_data
is_singleton: false
name: empty_marshal_data
params: ()
visibility: public
ri/1.8/system/YAML/Store/marshal_dump_supports_canonical_option%3f-i.yaml000064400000000355150403616270022317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Store#marshal_dump_supports_canonical_option?
is_singleton: false
name: marshal_dump_supports_canonical_option?
params: ()
visibility: public
ri/1.8/system/YAML/Store/empty_marshal_checksum-i.yaml000064400000000313150403616270016510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Store#empty_marshal_checksum
is_singleton: false
name: empty_marshal_checksum
params: ()
visibility: public
ri/1.8/system/YAML/Store/dump-i.yaml000064400000000254150403616270012732 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Store#dump
is_singleton: false
name: dump
params: (table)
visibility: public
ri/1.8/system/YAML/Syck/Node/cdesc-Node.yaml000064400000000471150403616270014206 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin BaseNode functionality
constants: []

full_name: YAML::Syck::Node
includes: 
- !ruby/object:RI::IncludedModule 
  name: YAML::BaseNode
instance_methods: []

name: Node
superclass: Object
ri/1.8/system/YAML/Syck/cdesc-Syck.yaml000064400000000265150403616270013346 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: YAML::Syck
includes: []

instance_methods: []

name: Syck
superclass: 
ri/1.8/system/YAML/parse_documents-c.yaml000064400000001112150403616270014050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> with a tree of +YAML::BaseNodes+, one tree for each consecutive document in the YAML stream contained in <em>io</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  File.open( 'many-docs.yaml' ) do |yf|\n    YAML.parse_documents( yf ) do |ydoc|\n      ## ydoc contains a tree of nodes\n      ## from the YAML document\n    end\n  end\n"
full_name: YAML::parse_documents
is_singleton: true
name: parse_documents
params: ( io, &doc_proc )
visibility: public
ri/1.8/system/YAML/Object/to_yaml-i.yaml000064400000000271150403616270013542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Object#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/YAML/Object/cdesc-Object.yaml000064400000000534150403616270014137 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: tag_subclasses?
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unresolved objects
constants: []

full_name: YAML::Object
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_yaml
name: Object
superclass: Object
ri/1.8/system/YAML/Object/tag_subclasses%3f-c.yaml000064400000000276150403616270015375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::Object::tag_subclasses?
is_singleton: true
name: tag_subclasses?
params: ()
visibility: public
ri/1.8/system/YAML/try_implicit-c.yaml000064400000000403150403616270013367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Apply any implicit a node may qualify for
full_name: YAML::try_implicit
is_singleton: true
name: try_implicit
params: ( obj )
visibility: public
ri/1.8/system/YAML/add_private_type-c.yaml000064400000000421150403616270014202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a private document type
full_name: YAML::add_private_type
is_singleton: true
name: add_private_type
params: ( type_re, &transfer_proc )
visibility: public
ri/1.8/system/YAML/Loader/cdesc-Loader.yaml000064400000001030150403616270014127 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TRANSFER_DOMAINS
  value: "{             'yaml.org,2002' => {},             'ruby.yaml.org,2002' => {}"
- !ruby/object:RI::Constant 
  comment: 
  name: PRIVATE_TYPES
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: IMPLICIT_TYPES
  value: "[ 'null', 'bool', 'time', 'int', 'float' ]"
full_name: YAML::Loader
includes: []

instance_methods: []

name: Loader
superclass: Object
ri/1.8/system/YAML/tagurize-c.yaml000064400000000357150403616270012521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a type_id to a taguri
full_name: YAML::tagurize
is_singleton: true
name: tagurize
params: ( val )
visibility: public
ri/1.8/system/YAML/escape-c.yaml000064400000000407150403616270012123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escape the string, condensing common escapes
full_name: YAML::escape
is_singleton: true
name: escape
params: ( value, skip = "" )
visibility: public
ri/1.8/system/YAML/add_domain_type-c.yaml000064400000000451150403616300013774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a global handler for a YAML domain type.
full_name: YAML::add_domain_type
is_singleton: true
name: add_domain_type
params: ( domain, type_tag, &transfer_proc )
visibility: public
ri/1.8/system/YAML/YamlNode/cdesc-YamlNode.yaml000064400000001224150403616300014732 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: anchor
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: kind
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: type_id
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: YAML Generic Model container
constants: []

full_name: YAML::YamlNode
includes: 
- !ruby/object:RI::IncludedModule 
  name: BaseNode
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: transform
name: YamlNode
superclass: Object
ri/1.8/system/YAML/YamlNode/transform-i.yaml000064400000000405150403616300014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Transform this node fully into a native type
full_name: YAML::YamlNode#transform
is_singleton: false
name: transform
params: ()
visibility: public
ri/1.8/system/YAML/YamlNode/new-c.yaml000064400000000256150403616300013160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::YamlNode::new
is_singleton: true
name: new
params: ( t, v )
visibility: public
ri/1.8/system/YAML/SpecialHash/update-i.yaml000064400000000264150403616300014332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::SpecialHash#update
is_singleton: false
name: update
params: ( h )
visibility: public
ri/1.8/system/YAML/SpecialHash/cdesc-SpecialHash.yaml000064400000001041150403616300016057 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: default
  rw: RW
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: YAML Hash class to support comments and defaults
constants: []

full_name: YAML::SpecialHash
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: update
name: SpecialHash
superclass: "::Hash"
ri/1.8/system/YAML/SpecialHash/to_yaml-i.yaml000064400000000276150403616300014517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::SpecialHash#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/YAML/SpecialHash/inspect-i.yaml000064400000000263150403616300014514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::SpecialHash#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/YAML/SpecialHash/to_s-i.yaml000064400000000255150403616300014014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::SpecialHash#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/YAML/transfer-c.yaml000064400000000403150403616300012475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Apply a transfer method to a Ruby object
full_name: YAML::transfer
is_singleton: true
name: transfer
params: ( type_id, obj )
visibility: public
ri/1.8/system/YAML/DomainType/to_yaml-i.yaml000064400000000275150403616300014403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DomainType#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/YAML/DomainType/new-c.yaml000064400000000275150403616300013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DomainType::new
is_singleton: true
name: new
params: ( domain, type, val )
visibility: public
ri/1.8/system/YAML/DomainType/cdesc-DomainType.yaml000064400000000623150403616300015636 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: tag_subclasses?
comment: 
- !ruby/struct:SM::Flow::P 
  body: Default domain type
constants: []

full_name: YAML::DomainType
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_yaml
name: DomainType
superclass: Object
ri/1.8/system/YAML/DomainType/tag_subclasses%3f-c.yaml000064400000000302150403616300016220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: YAML::DomainType::tag_subclasses?
is_singleton: true
name: tag_subclasses?
params: ()
visibility: public
ri/1.8/system/YAML/each_document-c.yaml000064400000001031150403616300013445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> with each consecutive document in the YAML stream contained in <em>io</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  File.open( 'many-docs.yaml' ) do |yf|\n    YAML.each_document( yf ) do |ydoc|\n      ## ydoc contains the single object\n      ## from the YAML document\n    end\n  end\n"
full_name: YAML::each_document
is_singleton: true
name: each_document
params: ( io, &block )
visibility: public
ri/1.8/system/Abbrev/cdesc-Abbrev.yaml000064400000001537150403616300013361 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Calculate the set of unique abbreviations for a given set of strings.
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'abbrev'\n  require 'pp'\n\n  pp Abbrev::abbrev(['ruby', 'rules']).sort\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "  [[&quot;rub&quot;, &quot;ruby&quot;],\n   [&quot;ruby&quot;, &quot;ruby&quot;],\n   [&quot;rul&quot;, &quot;rules&quot;],\n   [&quot;rule&quot;, &quot;rules&quot;],\n   [&quot;rules&quot;, &quot;rules&quot;]]\n"
- !ruby/struct:SM::Flow::P 
  body: Also adds an <tt>abbrev</tt> method to class <tt>Array</tt>.
constants: []

full_name: Abbrev
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: abbrev
name: Abbrev
superclass: 
ri/1.8/system/Abbrev/abbrev-i.yaml000064400000001563150403616300012567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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 input of &quot;car&quot; and &quot;cone&quot;, the keys pointing to &quot;car&quot; would be &quot;ca&quot; and &quot;car&quot;, while those pointing to &quot;cone&quot; would be &quot;co&quot;, &quot;con&quot;, and &quot;cone&quot;.
- !ruby/struct:SM::Flow::P 
  body: The optional <tt>pattern</tt> parameter is a pattern or a string. Only those input strings matching the pattern, or begging the string, are considered for inclusion in the output hash
full_name: Abbrev#abbrev
is_singleton: false
name: abbrev
params: (words, pattern = nil)
visibility: public
ri/1.8/system/Mail/%5b%5d-i.yaml000064400000000474150403616300011660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the header corresponding to <tt>field</tt>.
- !ruby/struct:SM::Flow::P 
  body: Matching is case-insensitive.
full_name: Mail#[]
is_singleton: false
name: "[]"
params: (field)
visibility: public
ri/1.8/system/Mail/body-i.yaml000064400000000361150403616300011737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the message body as an Array of lines
full_name: Mail#body
is_singleton: false
name: body
params: ()
visibility: public
ri/1.8/system/Mail/header-i.yaml000064400000000346150403616300012235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the headers as a Hash.
full_name: Mail#header
is_singleton: false
name: header
params: ()
visibility: public
ri/1.8/system/Mail/new-c.yaml000064400000001104150403616300011561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Mail where <tt>f</tt> is either a stream which responds to gets(), or a path to a file. If <tt>f</tt> is a path it will be opened.
- !ruby/struct:SM::Flow::P 
  body: "The whole message is read so it can be made available through the #header, #[] and #body methods."
- !ruby/struct:SM::Flow::P 
  body: The &quot;From &quot; line is ignored if the mail is in mbox format.
full_name: Mail::new
is_singleton: true
name: new
params: (f)
visibility: public
ri/1.8/system/Mail/cdesc-Mail.yaml000064400000000765150403616300012525 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: The Mail class represents an internet mail message (as per RFC822, RFC2822) with headers and a body.
constants: []

full_name: Mail
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: body
- !ruby/object:RI::MethodSummary 
  name: header
name: Mail
superclass: Object
ri/1.8/system/TailGroup/cdesc-TailGroup.yaml000064400000000315150403616300014564 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: TailGroup
includes: []

instance_methods: []

name: TailGroup
superclass: Test::Unit::TestCase
ri/1.8/system/FalseClass/%7c-i.yaml000064400000000564150403616300012523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Or---Returns <tt>false</tt> if <em>obj</em> is <tt>nil</tt> or <tt>false</tt>; <tt>true</tt> otherwise.
full_name: FalseClass#|
is_singleton: false
name: "|"
params: |
  false | obj   =>   true or false
  nil   | obj   =>   true or false

visibility: public
ri/1.8/system/FalseClass/%26-i.yaml000064400000000623150403616300012435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: And---Returns <tt>false</tt>. <em>obj</em> is always evaluated as it is the argument to a method call---there is no short-circuit evaluation in this case.
full_name: FalseClass#&
is_singleton: false
name: "&"
params: |
  false & obj   => false
  nil & obj     => false

visibility: public
ri/1.8/system/FalseClass/to_yaml-i.yaml000064400000000267150403616300013611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: FalseClass#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/FalseClass/cdesc-FalseClass.yaml000064400000001302150403616300015005 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The global value <tt>false</tt> is the only instance of class <tt>FalseClass</tt> and represents a logically false value in boolean expressions. The class provides operators allowing <tt>false</tt> to participate correctly in logical expressions.
constants: []

full_name: FalseClass
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: ^
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: "|"
name: FalseClass
superclass: Object
ri/1.8/system/FalseClass/to_s-i.yaml000064400000000364150403616300013107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "'nuf said..."
full_name: FalseClass#to_s
is_singleton: false
name: to_s
params: |
  false.to_s   =>  "false"

visibility: public
ri/1.8/system/FalseClass/%5e-i.yaml000064400000000604150403616300012516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Exclusive Or---If <em>obj</em> is <tt>nil</tt> or <tt>false</tt>, returns <tt>false</tt>; otherwise, returns <tt>true</tt>.
full_name: FalseClass#^
is_singleton: false
name: ^
params: |
  false ^ obj    => true or false
  nil   ^ obj    => true or false

visibility: public
ri/1.8/system/Set/size-i.yaml000064400000000415150403616300011625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: length
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of elements.
full_name: Set#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Set/flatten-i.yaml000064400000000442150403616310012311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new set that is a copy of the set, flattening each containing set recursively.
full_name: Set#flatten
is_singleton: false
name: flatten
params: ()
visibility: public
ri/1.8/system/Set/empty%3f-i.yaml000064400000000365150403616310012314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the set contains no elements.
full_name: Set#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/Set/merge-i.yaml000064400000000431150403616310011751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Merges the elements of the given enumerable object to the set and returns self.
full_name: Set#merge
is_singleton: false
name: merge
params: (enum)
visibility: public
ri/1.8/system/Set/union-i.yaml000064400000000330150403616310012000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #|"
full_name: Set#union
is_singleton: false
name: union
params: (enum)
visibility: public
ri/1.8/system/Set/each-i.yaml000064400000000526150403616310011557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (o)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls the given block once for each element in the set, passing the element as parameter. Returns an enumerator if no block is given.
full_name: Set#each
is_singleton: false
name: each
params: () {|o| ...}
visibility: public
ri/1.8/system/Set/to_a-i.yaml000064400000000405150403616310011575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts the set to an array. The order of elements is uncertain.
full_name: Set#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/Set/superset%3f-i.yaml000064400000000410150403616310013017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the set is a superset of the given set.
full_name: Set#superset?
is_singleton: false
name: superset?
params: (set)
visibility: public
ri/1.8/system/Set/%7c-i.yaml000064400000000560150403616310011233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: +
- !ruby/object:RI::AliasName 
  name: union
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new set built by merging the set and the elements of the given enumerable object.
full_name: Set#|
is_singleton: false
name: "|"
params: (enum)
visibility: public
ri/1.8/system/Set/%26-i.yaml000064400000000514150403616310011150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: intersection
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new set containing elements common to the set and the given enumerable object.
full_name: Set#&
is_singleton: false
name: "&"
params: (enum)
visibility: public
ri/1.8/system/Set/divide-i.yaml000064400000001613150403616310012121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Divides the set into a set of subsets according to the commonality defined by the given block.
- !ruby/struct:SM::Flow::P 
  body: 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).
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'set'\n  numbers = Set[1, 3, 4, 6, 9, 10, 11]\n  set = numbers.divide { |i,j| (i - j).abs == 1 }\n  p set     # =&gt; #&lt;Set: {#&lt;Set: {1}&gt;,\n            #            #&lt;Set: {11, 9, 10}&gt;,\n            #            #&lt;Set: {3, 4}&gt;,\n            #            #&lt;Set: {6}&gt;}&gt;\n"
full_name: Set#divide
is_singleton: false
name: divide
params: (&func)
visibility: public
ri/1.8/system/Set/delete-i.yaml000064400000000467150403616310012125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the given object from the set and returns self. Use <tt>subtract</tt> to delete several items at once.
full_name: Set#delete
is_singleton: false
name: delete
params: (o)
visibility: public
ri/1.8/system/Set/subtract-i.yaml000064400000000443150403616310012504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes every element that appears in the given enumerable object and returns self.
full_name: Set#subtract
is_singleton: false
name: subtract
params: (enum)
visibility: public
ri/1.8/system/Set/member%3f-i.yaml000064400000000340150403616310012416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #include?"
full_name: Set#member?
is_singleton: false
name: member?
params: (o)
visibility: public
ri/1.8/system/Set/reject%21-i.yaml000064400000000434150403616310012341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (o)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to Set#delete_if, but returns nil if no changes were made.
full_name: Set#reject!
is_singleton: false
name: reject!
params: () {|o| ...}
visibility: public
ri/1.8/system/Set/delete_if-i.yaml000064400000000460150403616310012574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (o)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes every element of the set for which block evaluates to true, and returns self.
full_name: Set#delete_if
is_singleton: false
name: delete_if
params: () {|o| ...}
visibility: public
ri/1.8/system/Set/add-i.yaml000064400000000521150403616310011402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "<<"
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds the given object to the set and returns self. Use <tt>merge</tt> to add several elements at once.
full_name: Set#add
is_singleton: false
name: add
params: (o)
visibility: public
ri/1.8/system/Set/inspect-i.yaml000064400000000511150403616310012316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a string containing a human-readable representation of the set. (&quot;#&lt;Set: {element1, element2, ...}&gt;&quot;)"
full_name: Set#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Set/add%3f-i.yaml000064400000000451150403616310011702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds the given object to the set and returns self. If the object is already in the set, returns nil.
full_name: Set#add?
is_singleton: false
name: add?
params: (o)
visibility: public
ri/1.8/system/Set/proper_superset%3f-i.yaml000064400000000435150403616310014415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the set is a proper superset of the given set.
full_name: Set#proper_superset?
is_singleton: false
name: proper_superset?
params: (set)
visibility: public
ri/1.8/system/Set/include%3f-i.yaml000064400000000452150403616310012576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: member?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the set contains the given object.
full_name: Set#include?
is_singleton: false
name: include?
params: (o)
visibility: public
ri/1.8/system/Set/new-c.yaml000064400000000623150403616310011440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: o
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new set containing the elements of the given enumerable object.
- !ruby/struct:SM::Flow::P 
  body: If a block is given, the elements of enum are preprocessed by the given block.
full_name: Set::new
is_singleton: true
name: new
params: (enum = nil) {|o| ...}
visibility: public
ri/1.8/system/Set/intersection-i.yaml000064400000000352150403616310013362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #&amp;"
full_name: Set#intersection
is_singleton: false
name: intersection
params: (enum)
visibility: public
ri/1.8/system/Set/subset%3f-i.yaml000064400000000402150403616310012453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the set is a subset of the given set.
full_name: Set#subset?
is_singleton: false
name: subset?
params: (set)
visibility: public
ri/1.8/system/Set/flatten%21-i.yaml000064400000000505150403616310012521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to Set#flatten, but replaces the receiver with the result in place. Returns nil if no modifications were made.
full_name: Set#flatten!
is_singleton: false
name: flatten!
params: ()
visibility: public
ri/1.8/system/Set/replace-i.yaml000064400000000461150403616310012270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the contents of the set with the contents of the given enumerable object and returns self.
full_name: Set#replace
is_singleton: false
name: replace
params: (enum)
visibility: public
ri/1.8/system/Set/initialize_copy-i.yaml000064400000000361150403616310014047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Copy internal hash.
full_name: Set#initialize_copy
is_singleton: false
name: initialize_copy
params: (orig)
visibility: public
ri/1.8/system/Set/flatten_merge-i.yaml000064400000000307150403616310013470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Set#flatten_merge
is_singleton: false
name: flatten_merge
params: (set, seen = Set.new)
visibility: protected
ri/1.8/system/Set/classify-i.yaml000064400000001537150403616310012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: o
comment: 
- !ruby/struct:SM::Flow::P 
  body: Classifies the set by the return value of the given block and returns a hash of {value =&gt; set of elements} pairs. The block is called once for each element of the set, passing the element as parameter.
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'set'\n  files = Set.new(Dir.glob(&quot;*.rb&quot;))\n  hash = files.classify { |f| File.mtime(f).year }\n  p hash    # =&gt; {2000=&gt;#&lt;Set: {&quot;a.rb&quot;, &quot;b.rb&quot;}&gt;,\n            #     2001=&gt;#&lt;Set: {&quot;c.rb&quot;, &quot;d.rb&quot;, &quot;e.rb&quot;}&gt;,\n            #     2002=&gt;#&lt;Set: {&quot;f.rb&quot;}&gt;}\n"
full_name: Set#classify
is_singleton: false
name: classify
params: ( {|o| ...}
visibility: public
ri/1.8/system/Set/length-i.yaml000064400000000331150403616310012132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #size"
full_name: Set#length
is_singleton: false
name: length
params: ()
visibility: public
ri/1.8/system/Set/%2b-i.yaml000064400000000320150403616310011217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #|"
full_name: Set#+
is_singleton: false
name: +
params: (enum)
visibility: public
ri/1.8/system/Set/%3c%3c-i.yaml000064400000000323150403616320011520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add"
full_name: Set#<<
is_singleton: false
name: "<<"
params: (o)
visibility: public
ri/1.8/system/Set/%3d%3d-i.yaml000064400000000463150403616320011527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if two sets are equal. The equality of each couple of elements is defined according to Object#eql?.
full_name: Set#==
is_singleton: false
name: ==
params: (set)
visibility: public
ri/1.8/system/Set/map%21-i.yaml000064400000000331150403616320011637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #collect!"
full_name: Set#map!
is_singleton: false
name: map!
params: ()
visibility: public
ri/1.8/system/Set/cdesc-Set.yaml000064400000007227150403616320012251 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: "Several methods accept any Enumerable object (implementing <tt>each</tt>) for greater flexibility: new, replace, merge, subtract, |, &amp;, -, ^."
- !ruby/struct:SM::Flow::P 
  body: The equality of each couple of elements is determined according to Object#eql? and Object#hash, since Set uses Hash as storage.
- !ruby/struct:SM::Flow::P 
  body: Finally, if you are using class Set, you can also use Enumerable#to_set for convenience.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'set'\n  s1 = Set.new [1, 2]                   # -&gt; #&lt;Set: {1, 2}&gt;\n  s2 = [1, 2].to_set                    # -&gt; #&lt;Set: {1, 2}&gt;\n  s1 == s2                              # -&gt; true\n  s1.add(&quot;foo&quot;)                         # -&gt; #&lt;Set: {1, 2, &quot;foo&quot;}&gt;\n  s1.merge([2, 6])                      # -&gt; #&lt;Set: {6, 1, 2, &quot;foo&quot;}&gt;\n  s1.subset? s2                         # -&gt; false\n  s2.subset? s1                         # -&gt; true\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Contact
- !ruby/struct:SM::Flow::VERB 
  body: "  - Akinori MUSHA &lt;knu@iDaemons.org&gt; (current maintainer)\n"
constants: []

full_name: Set
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ^
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: add?
- !ruby/object:RI::MethodSummary 
  name: classify
- !ruby/object:RI::MethodSummary 
  name: clear
- !ruby/object:RI::MethodSummary 
  name: collect!
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete?
- !ruby/object:RI::MethodSummary 
  name: delete_if
- !ruby/object:RI::MethodSummary 
  name: difference
- !ruby/object:RI::MethodSummary 
  name: divide
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: flatten
- !ruby/object:RI::MethodSummary 
  name: flatten!
- !ruby/object:RI::MethodSummary 
  name: flatten_merge
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: initialize_copy
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: intersection
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: map!
- !ruby/object:RI::MethodSummary 
  name: member?
- !ruby/object:RI::MethodSummary 
  name: merge
- !ruby/object:RI::MethodSummary 
  name: proper_subset?
- !ruby/object:RI::MethodSummary 
  name: proper_superset?
- !ruby/object:RI::MethodSummary 
  name: reject!
- !ruby/object:RI::MethodSummary 
  name: replace
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: subset?
- !ruby/object:RI::MethodSummary 
  name: subtract
- !ruby/object:RI::MethodSummary 
  name: superset?
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: union
- !ruby/object:RI::MethodSummary 
  name: "|"
name: Set
superclass: Object
ri/1.8/system/Set/delete%3f-i.yaml000064400000000460150403616320012415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the given object from the set and returns self. If the object is not in the set, returns nil.
full_name: Set#delete?
is_singleton: false
name: delete?
params: (o)
visibility: public
ri/1.8/system/Set/%5e-i.yaml000064400000000543150403616320011235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new set containing elements exclusive between the set and the given enumerable object. (set ^ enum) is equivalent to ((set | enum) - (set &amp; enum)).
full_name: Set#^
is_singleton: false
name: ^
params: (enum)
visibility: public
ri/1.8/system/Set/difference-i.yaml000064400000000342150403616320012746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #-"
full_name: Set#difference
is_singleton: false
name: difference
params: (enum)
visibility: public
ri/1.8/system/Set/%5b%5d-c.yaml000064400000000365150403616320011524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new set containing the given objects.
full_name: Set::[]
is_singleton: true
name: "[]"
params: (*ary)
visibility: public
ri/1.8/system/Set/clear-i.yaml000064400000000354150403616320011745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes all elements and returns self.
full_name: Set#clear
is_singleton: false
name: clear
params: ()
visibility: public
ri/1.8/system/Set/proper_subset%3f-i.yaml000064400000000427150403616320014052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the set is a proper subset of the given set.
full_name: Set#proper_subset?
is_singleton: false
name: proper_subset?
params: (set)
visibility: public
ri/1.8/system/Set/%2d-i.yaml000064400000000545150403616320011233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: difference
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new set built by duplicating the set, removing every element that appears in the given enumerable object.
full_name: Set#-
is_singleton: false
name: "-"
params: (enum)
visibility: public
ri/1.8/system/Set/collect%21-i.yaml000064400000000434150403616320012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: map!
block_params: (o)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Do collect() destructively.
full_name: Set#collect!
is_singleton: false
name: collect!
params: () {|o| ...}
visibility: public
ri/1.8/system/Complex/%25-i.yaml000064400000000376150403616320012032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Remainder after division by a real or complex number.
full_name: Complex#%
is_singleton: false
name: "%"
params: (other)
visibility: public
ri/1.8/system/Complex/new%21-c.yaml000064400000000420150403616320012520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a <tt>Complex</tt> number <tt>a</tt>+<tt>b</tt><em>i</em>.
full_name: Complex::new!
is_singleton: true
name: new!
params: (a, b=0)
visibility: public
ri/1.8/system/Complex/%2a%2a-i.yaml000064400000000412150403616320012365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raise this complex number to the given (real or complex) power.
full_name: Complex#**
is_singleton: false
name: "**"
params: (other)
visibility: public
ri/1.8/system/Complex/%3c%3d%3e-i.yaml000064400000000373150403616320012677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares the absolute values of the two numbers.
full_name: Complex#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/Complex/coerce-i.yaml000064400000000407150403616320012772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempts to coerce <tt>other</tt> to a Complex number.
full_name: Complex#coerce
is_singleton: false
name: coerce
params: (other)
visibility: public
ri/1.8/system/Complex/%2f-i.yaml000064400000000352150403616320012105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Division by real or complex number.
full_name: Complex#/
is_singleton: false
name: /
params: (other)
visibility: public
ri/1.8/system/Complex/numerator-i.yaml000064400000000327150403616320013547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: FIXME
full_name: Complex#numerator
is_singleton: false
name: numerator
params: ()
visibility: public
ri/1.8/system/Complex/quo-i.yaml000064400000000246150403616320012337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Complex#quo
is_singleton: false
name: quo
params: (other)
visibility: public
ri/1.8/system/Complex/abs2-i.yaml000064400000000345150403616320012362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Square of the absolute value.
full_name: Complex#abs2
is_singleton: false
name: abs2
params: ()
visibility: public
ri/1.8/system/Complex/hash-i.yaml000064400000000363150403616320012456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a hash code for the complex number.
full_name: Complex#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/Complex/abs-i.yaml000064400000000430150403616320012273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Absolute value (aka modulus): distance from the zero point on the complex plane."
full_name: Complex#abs
is_singleton: false
name: abs
params: ()
visibility: public
ri/1.8/system/Complex/angle-i.yaml000064400000000332150403616320012615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #arg"
full_name: Complex#angle
is_singleton: false
name: angle
params: ()
visibility: public
ri/1.8/system/Complex/%2a-i.yaml000064400000000364150403616320012103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Multiplication with real or complex number.
full_name: Complex#*
is_singleton: false
name: "*"
params: (other)
visibility: public
ri/1.8/system/Complex/polar-c.yaml000064400000000457150403616320012646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a <tt>Complex</tt> number in terms of <tt>r</tt> (radius) and <tt>theta</tt> (angle).
full_name: Complex::polar
is_singleton: true
name: polar
params: (r, theta)
visibility: public
ri/1.8/system/Complex/inspect-i.yaml000064400000000422150403616320013174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns &quot;<tt>Complex(<em>real</em>, <em>image</em>)</tt>&quot;.
full_name: Complex#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Complex/new-c.yaml000064400000000245150403616320012315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Complex::new
is_singleton: true
name: new
params: (a, b)
visibility: public
ri/1.8/system/Complex/denominator-i.yaml000064400000000333150403616320014047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: FIXME
full_name: Complex#denominator
is_singleton: false
name: denominator
params: ()
visibility: public
ri/1.8/system/Complex/%2b-i.yaml000064400000000354150403616320012103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Addition with real or complex number.
full_name: Complex#+
is_singleton: false
name: +
params: (other)
visibility: public
ri/1.8/system/Complex/polar-i.yaml000064400000000377150403616320012655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the absolute value <em>and</em> the argument.
full_name: Complex#polar
is_singleton: false
name: polar
params: ()
visibility: public
ri/1.8/system/Complex/conj-i.yaml000064400000000336150403616320012464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #conjugate"
full_name: Complex#conj
is_singleton: false
name: conj
params: ()
visibility: public
ri/1.8/system/Complex/to_s-i.yaml000064400000000375150403616320012502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Standard string representation of the complex number.
full_name: Complex#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Complex/%3d%3d-i.yaml000064400000000405150403616320012377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Test for numerical equality (<tt>a == a + 0<em>i</em></tt>).
full_name: Complex#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/Complex/cdesc-Complex.yaml000064400000003723150403616320013776 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The imaginary part of a complex number.
  name: image
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The real part of a complex number.
  name: real
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new!
- !ruby/object:RI::MethodSummary 
  name: polar
comment: 
- !ruby/struct:SM::Flow::P 
  body: The complex number class. See complex.rb for an overview.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: <tt>I</tt> is the imaginary number. It exists at point (0,1) on the complex plane.
  name: I
  value: Complex(0,1)
- !ruby/object:RI::Constant 
  comment: 
  name: Unify
  value: "true"
full_name: Complex
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "%"
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: abs
- !ruby/object:RI::MethodSummary 
  name: abs2
- !ruby/object:RI::MethodSummary 
  name: angle
- !ruby/object:RI::MethodSummary 
  name: arg
- !ruby/object:RI::MethodSummary 
  name: coerce
- !ruby/object:RI::MethodSummary 
  name: conj
- !ruby/object:RI::MethodSummary 
  name: conjugate
- !ruby/object:RI::MethodSummary 
  name: denominator
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: numerator
- !ruby/object:RI::MethodSummary 
  name: polar
- !ruby/object:RI::MethodSummary 
  name: quo
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Complex
superclass: Numeric
ri/1.8/system/Complex/conjugate-i.yaml000064400000000464150403616320013514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: conj
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Complex conjugate (<tt>z + z.conjugate = 2 * z.real</tt>).
full_name: Complex#conjugate
is_singleton: false
name: conjugate
params: ()
visibility: public
ri/1.8/system/Complex/arg-i.yaml000064400000000440150403616320012300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: angle
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Argument (angle from (1,0) on the complex plane).
full_name: Complex#arg
is_singleton: false
name: arg
params: ()
visibility: public
ri/1.8/system/Complex/%2d-i.yaml000064400000000361150403616320012103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Subtraction with real or complex number.
full_name: Complex#-
is_singleton: false
name: "-"
params: (other)
visibility: public
ri/1.8/system/IndexError/cdesc-IndexError.yaml000064400000001176150403616330015123 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: IndexError
includes: []

instance_methods: []

name: IndexError
superclass: StandardError
ri/1.8/system/OpenURI/Meta/cdesc-Meta.yaml000064400000003047150403616340014016 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: returns a URI which is base of relative URIs in the data. It may differ from the URI supplied by a user because redirection.
  name: base_uri
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: returns a Hash which represents header fields. The Hash keys are downcased for canonicalization.
  name: meta
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: returns an Array which consists status code and message.
  name: status
  rw: RW
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin for holding meta-information.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RE_LWS
  value: /[\r\n\t ]+/n
- !ruby/object:RI::Constant 
  comment: 
  name: RE_TOKEN
  value: "%r{[^\\x00- ()<>@,;:\\\\\"/\\[\\]?={}\\x7f]+}n"
- !ruby/object:RI::Constant 
  comment: 
  name: RE_QUOTED_STRING
  value: "%r{\"(?:[\\r\\n\\t !#-\\[\\]-~\\x80-\\xff]|\\\\[\\x00-\\x7f])*\"}n"
- !ruby/object:RI::Constant 
  comment: 
  name: RE_PARAMETERS
  value: "%r{(?:;#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?=#{RE_LWS}?(?:#{RE_TOKEN}|#{RE_QUOTED_STRING})#{RE_LWS}?)*}n"
full_name: OpenURI::Meta
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: charset
- !ruby/object:RI::MethodSummary 
  name: content_encoding
- !ruby/object:RI::MethodSummary 
  name: content_type
- !ruby/object:RI::MethodSummary 
  name: last_modified
name: Meta
superclass: 
ri/1.8/system/OpenURI/Meta/content_type-i.yaml000064400000000546150403616340015013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns &quot;type/subtype&quot; which is MIME Content-Type. It is downcased for canonicalization. Content-Type parameters are stripped.
full_name: OpenURI::Meta#content_type
is_singleton: false
name: content_type
params: ()
visibility: public
ri/1.8/system/OpenURI/Meta/content_encoding-i.yaml000064400000000544150403616340015616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns a list of encodings in Content-Encoding field as an Array of String. The encodings are downcased for canonicalization.
full_name: OpenURI::Meta#content_encoding
is_singleton: false
name: content_encoding
params: ()
visibility: public
ri/1.8/system/OpenURI/Meta/charset-i.yaml000064400000001255150403616350013730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns a charset parameter in Content-Type field. It is downcased for canonicalization.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: If charset parameter and block is not given, nil is returned except text type in HTTP. In that case, &quot;iso-8859-1&quot; is returned as defined by RFC2616 3.7.1.
full_name: OpenURI::Meta#charset
is_singleton: false
name: charset
params: () {|| ...}
visibility: public
ri/1.8/system/OpenURI/Meta/last_modified-i.yaml000064400000000424150403616350015077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns a Time which represents Last-Modified field.
full_name: OpenURI::Meta#last_modified
is_singleton: false
name: last_modified
params: ()
visibility: public
ri/1.8/system/OpenURI/OpenRead/read-i.yaml000064400000000650150403616350014017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: OpenURI::OpenRead#read
is_singleton: false
name: read
params: (options={})
visibility: public
ri/1.8/system/OpenURI/OpenRead/open-i.yaml000064400000010413150403616360014044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: OpenURI::OpenRead#open provides `open' for URI::HTTP and URI::FTP.
- !ruby/struct:SM::Flow::P 
  body: "OpenURI::OpenRead#open takes optional 3 arguments as: OpenURI::OpenRead#open([mode [, perm]] [, options]) [{|io| ... }]"
- !ruby/struct:SM::Flow::P 
  body: `mode', `perm' is same as Kernel#open.
- !ruby/struct:SM::Flow::P 
  body: However, `mode' must be read mode because OpenURI::OpenRead#open doesn't support write mode (yet). Also `perm' is just ignored because it is meaningful only for file creation.
- !ruby/struct:SM::Flow::P 
  body: `options' must be a hash.
- !ruby/struct:SM::Flow::P 
  body: Each pairs which key is a string in the hash specify a extra header field for HTTP. I.e. it is ignored for FTP without HTTP proxy.
- !ruby/struct:SM::Flow::P 
  body: "The hash may include other options which key is a symbol:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: ":proxy"
    body: "Synopsis:"
  - !ruby/struct:SM::Flow::VERB 
    body: "  :proxy =&gt; &quot;http://proxy.foo.com:8000/&quot;\n  :proxy =&gt; URI.parse(&quot;http://proxy.foo.com:8000/&quot;)\n  :proxy =&gt; true\n  :proxy =&gt; false\n  :proxy =&gt; nil\n"
  - !ruby/struct:SM::Flow::P 
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: ":http_basic_authentication"
    body: "Synopsis:"
  - !ruby/struct:SM::Flow::VERB 
    body: "  :http_basic_authentication=&gt;[user, password]\n"
  - !ruby/struct:SM::Flow::P 
    body: "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."
  - !ruby/struct:SM::Flow::LI 
    label: ":content_length_proc"
    body: "Synopsis:"
  - !ruby/struct:SM::Flow::VERB 
    body: "  :content_length_proc =&gt; lambda {|content_length| ... }\n"
  - !ruby/struct:SM::Flow::P 
    body: 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.
  - !ruby/struct:SM::Flow::P 
    body: If two or more transfer is done by HTTP redirection, the procedure is called only one for a last transfer.
  - !ruby/struct:SM::Flow::P 
    body: When expected content length is unknown, the procedure is called with nil. It is happen when HTTP response has no Content-Length header.
  - !ruby/struct:SM::Flow::LI 
    label: ":progress_proc"
    body: "Synopsis:"
  - !ruby/struct:SM::Flow::VERB 
    body: "  :progress_proc =&gt; lambda {|size| ...}\n"
  - !ruby/struct:SM::Flow::P 
    body: 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' `size' is a accumulated transfered size in bytes.
  - !ruby/struct:SM::Flow::P 
    body: If two or more transfer is done by HTTP redirection, the procedure is called only one for a last transfer.
  - !ruby/struct:SM::Flow::P 
    body: ":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."
  - !ruby/struct:SM::Flow::VERB 
    body: "  pbar = nil\n  open(&quot;http://...&quot;,\n    :content_length_proc =&gt; lambda {|t|\n      if t &amp;&amp; 0 &lt; t\n        pbar = ProgressBar.new(&quot;...&quot;, t)\n        pbar.file_transfer_mode\n      end\n    },\n    :progress_proc =&gt; lambda {|s|\n      pbar.set s if pbar\n    }) {|f| ... }\n"
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: OpenURI::OpenRead#open
is_singleton: false
name: open
params: (*rest, &block)
visibility: public
ri/1.8/system/OpenURI/OpenRead/cdesc-OpenRead.yaml000064400000000534150403616360015434 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin for HTTP and FTP URIs.
constants: []

full_name: OpenURI::OpenRead
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: read
name: OpenRead
superclass: 
ri/1.8/system/OpenURI/HTTPError/cdesc-HTTPError.yaml000064400000000464150403616360015626 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: io
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: OpenURI::HTTPError
includes: []

instance_methods: []

name: HTTPError
superclass: StandardError
ri/1.8/system/OpenURI/HTTPError/new-c.yaml000064400000000267150403616360013770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OpenURI::HTTPError::new
is_singleton: true
name: new
params: (message, io)
visibility: public
ri/1.8/system/OpenURI/Buffer/cdesc-Buffer.yaml000064400000000302150403616370014656 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: OpenURI::Buffer
includes: []

instance_methods: []

name: Buffer
superclass: Object
ri/1.8/system/OpenURI/cdesc-OpenURI.yaml000064400000004170150403616370013524 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::VERB 
  body: " OpenURI is an easy-to-use wrapper for net/http, net/https and net/ftp.\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: " It is possible to open http/https/ftp URL as usual like opening a file:\n\n   open(&quot;http://www.ruby-lang.org/&quot;) {|f|\n     f.each_line {|line| p line}\n   }\n\n The opened file has several methods for meta information as follows since\n it is extended by OpenURI::Meta.\n\n   open(&quot;http://www.ruby-lang.org/en&quot;) {|f|\n     f.each_line {|line| p line}\n     p f.base_uri         # &lt;URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/&gt;\n     p f.content_type     # &quot;text/html&quot;\n     p f.charset          # &quot;iso-8859-1&quot;\n     p f.content_encoding # []\n     p f.last_modified    # Thu Dec 05 02:45:02 UTC 2002\n   }\n\n Additional header fields can be specified by an optional hash argument.\n\n   open(&quot;http://www.ruby-lang.org/en/&quot;,\n     &quot;User-Agent&quot; =&gt; &quot;Ruby/#{RUBY_VERSION}&quot;,\n     &quot;From&quot; =&gt; &quot;foo@bar.invalid&quot;,\n     &quot;Referer&quot; =&gt; &quot;http://www.ruby-lang.org/&quot;) {|f|\n     # ...\n   }\n\n The environment variables such as http_proxy, https_proxy and ftp_proxy\n are in effect by default.  :proxy =&gt; nil disables proxy.\n\n   open(&quot;http://www.ruby-lang.org/en/raa.html&quot;, :proxy =&gt; nil) {|f|\n     # ...\n   }\n\n URI objects can be opened in a similar way.\n\n   uri = URI.parse(&quot;http://www.ruby-lang.org/en/&quot;)\n   uri.open {|f|\n     # ...\n   }\n\n URI objects can be read directly. The returned string is also extended by\n OpenURI::Meta.\n\n   str = uri.read\n   p str.base_uri\n\n Author:: Tanaka Akira &lt;akr@m17n.org&gt;\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Options
  value: "{     :proxy => true,     :progress_proc => true,     :content_length_proc => true,     :http_basic_authentication => true,   }"
full_name: OpenURI
includes: []

instance_methods: []

name: OpenURI
superclass: 
ri/1.8/system/Signal/cdesc-Signal.yaml000064400000003014150403616370013410 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: list
- !ruby/object:RI::MethodSummary 
  name: trap
comment: 
- !ruby/struct:SM::Flow::P 
  body: Many operating systems allow signals to be sent to running processes. Some signals have a defined effect on the process, while others may be trapped at the code level and acted upon. For example, your process may trap the USR1 signal and use it to toggle debugging, and may use TERM to initiate a controlled shutdown.
- !ruby/struct:SM::Flow::VERB 
  body: "    pid = fork do\n      Signal.trap(&quot;USR1&quot;) do\n        $debug = !$debug\n        puts &quot;Debug now: #$debug&quot;\n      end\n      Signal.trap(&quot;TERM&quot;) do\n        puts &quot;Terminating...&quot;\n        shutdown()\n      end\n      # . . . do some work . . .\n    end\n\n    Process.detach(pid)\n\n    # Controlling program:\n    Process.kill(&quot;USR1&quot;, pid)\n    # ...\n    Process.kill(&quot;USR1&quot;, pid)\n    # ...\n    Process.kill(&quot;TERM&quot;, pid)\n"
- !ruby/struct:SM::Flow::P 
  body: "produces:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Debug now: true\n    Debug now: false\n   Terminating...\n"
- !ruby/struct:SM::Flow::P 
  body: The list of available signal names and their interpretation is system dependent. Signal delivery semantics may also vary between systems; in particular signal delivery may not always be reliable.
constants: []

full_name: Signal
includes: []

instance_methods: []

name: Signal
superclass: 
ri/1.8/system/Signal/list-c.yaml000064400000002224150403616370012311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a list of signal names mapped to the corresponding underlying signal numbers.
- !ruby/struct:SM::Flow::P 
  body: "Signal.list #=&gt; {&quot;ABRT&quot;=&gt;6, &quot;ALRM&quot;=&gt;14, &quot;BUS&quot;=&gt;7, &quot;CHLD&quot;=&gt;17, &quot;CLD&quot;=&gt;17, &quot;CONT&quot;=&gt;18, &quot;FPE&quot;=&gt;8, &quot;HUP&quot;=&gt;1, &quot;ILL&quot;=&gt;4, &quot;INT&quot;=&gt;2, &quot;IO&quot;=&gt;29, &quot;IOT&quot;=&gt;6, &quot;KILL&quot;=&gt;9, &quot;PIPE&quot;=&gt;13, &quot;POLL&quot;=&gt;29, &quot;PROF&quot;=&gt;27, &quot;PWR&quot;=&gt;30, &quot;QUIT&quot;=&gt;3, &quot;SEGV&quot;=&gt;11, &quot;STOP&quot;=&gt;19, &quot;SYS&quot;=&gt;31, &quot;TERM&quot;=&gt;15, &quot;TRAP&quot;=&gt;5, &quot;TSTP&quot;=&gt;20, &quot;TTIN&quot;=&gt;21, &quot;TTOU&quot;=&gt;22, &quot;URG&quot;=&gt;23, &quot;USR1&quot;=&gt;10, &quot;USR2&quot;=&gt;12, &quot;VTALRM&quot;=&gt;26, &quot;WINCH&quot;=&gt;28, &quot;XCPU&quot;=&gt;24, &quot;XFSZ&quot;=&gt;25}"
full_name: Signal::list
is_singleton: true
name: list
params: |
  Signal.list => a_hash

visibility: public
ri/1.8/system/Signal/trap-c.yaml000064400000002562150403616400012303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Specifies the handling of signals. The first parameter is a signal name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a signal number. The characters ``SIG'' may be omitted from the signal name. The command or block specifies code to be run when the signal is raised. If the command is the string ``IGNORE'' or ``SIG_IGN'', the signal will be ignored. If the command is ``DEFAULT'' or ``SIG_DFL'', the operating system's default handler will be invoked. If the command is ``EXIT'', the script will be terminated by the signal. Otherwise, the given command or block will be run. The special signal name ``EXIT'' or signal number zero will be invoked just prior to program termination. trap returns the previous handler for the given signal.
- !ruby/struct:SM::Flow::VERB 
  body: "    Signal.trap(0, proc { puts &quot;Terminating: #{$$}&quot; })\n    Signal.trap(&quot;CLD&quot;)  { puts &quot;Child died&quot; }\n    fork &amp;&amp; Process.wait\n"
- !ruby/struct:SM::Flow::P 
  body: "produces:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Terminating: 27461\n    Child died\n    Terminating: 27460\n"
full_name: Signal::trap
is_singleton: true
name: trap
params: |
  Signal.trap( signal, proc ) => obj
  Signal.trap( signal ) {| | block } => obj

visibility: public
ri/1.8/system/XSD/XSDBoolean/new-c.yaml000064400000000264150403616410013303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDBoolean::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDBoolean/cdesc-XSDBoolean.yaml000064400000000617150403616410015311 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, BooleanLiteral)
full_name: XSD::XSDBoolean
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDBoolean
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDBoolean/screen_data-i.yaml000064400000000277150403616410014774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDBoolean#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/NamedElements/size-i.yaml000064400000000256150403616420014257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/XSD/NamedElements/%5b%5d-i.yaml000064400000000257150403616430014160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#[]
is_singleton: false
name: "[]"
params: (idx)
visibility: public
ri/1.8/system/XSD/NamedElements/empty%3f-i.yaml000064400000000262150403616430014737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/XSD/NamedElements/each-i.yaml000064400000000307150403616430014203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (element)
comment: 
full_name: XSD::NamedElements#each
is_singleton: false
name: each
params: () {|element| ...}
visibility: public
ri/1.8/system/XSD/NamedElements/elements%3d-i.yaml000064400000000276150403616430015420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#elements=
is_singleton: false
name: elements=
params: (rhs)
visibility: protected
ri/1.8/system/XSD/NamedElements/find_name-i.yaml000064400000000274150403616440015227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#find_name
is_singleton: false
name: find_name
params: (name)
visibility: public
ri/1.8/system/XSD/NamedElements/dup-i.yaml000064400000000254150403616440014075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#dup
is_singleton: false
name: dup
params: ()
visibility: public
ri/1.8/system/XSD/NamedElements/concat-i.yaml000064400000000265150403616440014556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#concat
is_singleton: false
name: concat
params: (rhs)
visibility: public
ri/1.8/system/XSD/NamedElements/delete-i.yaml000064400000000265150403616450014552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#delete
is_singleton: false
name: delete
params: (rhs)
visibility: public
ri/1.8/system/XSD/NamedElements/new-c.yaml000064400000000254150403616450014071 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/XSD/NamedElements/%2b-i.yaml000064400000000253150403616450013655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#+
is_singleton: false
name: +
params: (rhs)
visibility: public
ri/1.8/system/XSD/NamedElements/%3c%3c-i.yaml000064400000000257150403616460014157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#<<
is_singleton: false
name: "<<"
params: (rhs)
visibility: public
ri/1.8/system/XSD/NamedElements/keys-i.yaml000064400000000256150403616460014264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#keys
is_singleton: false
name: keys
params: ()
visibility: public
ri/1.8/system/XSD/NamedElements/cdesc-NamedElements.yaml000064400000002041150403616460016655 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Empty
  value: NamedElements.new.freeze
full_name: XSD::NamedElements
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: concat
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: dup
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: elements
- !ruby/object:RI::MethodSummary 
  name: elements=
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: find_name
- !ruby/object:RI::MethodSummary 
  name: freeze
- !ruby/object:RI::MethodSummary 
  name: keys
- !ruby/object:RI::MethodSummary 
  name: size
name: NamedElements
superclass: Object
ri/1.8/system/XSD/NamedElements/freeze-i.yaml000064400000000262150403616470014567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#freeze
is_singleton: false
name: freeze
params: ()
visibility: public
ri/1.8/system/XSD/NamedElements/elements-i.yaml000064400000000271150403616470015123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NamedElements#elements
is_singleton: false
name: elements
params: ()
visibility: protected
ri/1.8/system/XSD/XSDUnsignedInt/new-c.yaml000064400000000270150403616470014156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedInt::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDUnsignedInt/mininclusive-i.yaml000064400000000300150403616470016072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedInt#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDUnsignedInt/cdesc-XSDUnsignedInt.yaml000064400000000722150403616500017026 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, UnsignedIntLiteral)
full_name: XSD::XSDUnsignedInt
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDUnsignedInt
superclass: XSDUnsignedLong
ri/1.8/system/XSD/XSDUnsignedInt/maxinclusive-i.yaml000064400000000300150403616500016066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedInt#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDNil/new-c.yaml000064400000000260150403616510012443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNil::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDNil/cdesc-XSDNil.yaml000064400000000631150403616510013614 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, NilLiteral)
- !ruby/object:RI::Constant 
  comment: 
  name: Value
  value: "'true'"
full_name: XSD::XSDNil
includes: []

instance_methods: []

name: XSDNil
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XMLParser/XMLScanner/scanner_kcode%3d-i.yaml000064400000000321150403616520017437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#scanner_kcode=
is_singleton: false
name: scanner_kcode=
params: (charset)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_etag-i.yaml000064400000000373150403616520015770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def on_cdata(str); end
full_name: XSD::XMLParser::XMLScanner#on_etag
is_singleton: false
name: on_etag
params: (name)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_attr_entityref-i.yaml000064400000000323150403616520020106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_attr_entityref
is_singleton: false
name: on_attr_entityref
params: (ref)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/warning-i.yaml000064400000000277150403616530016025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#warning
is_singleton: false
name: warning
params: (msg)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_attr_value-i.yaml000064400000000313150403616530017211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_attr_value
is_singleton: false
name: on_attr_value
params: (str)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/parse_error-i.yaml000064400000000307150403616530016675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#parse_error
is_singleton: false
name: parse_error
params: (msg)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_stag_end_empty-i.yaml000064400000000430150403616530020045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def on_attribute_end(name); end
full_name: XSD::XMLParser::XMLScanner#on_stag_end_empty
is_singleton: false
name: on_stag_end_empty
params: (name)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_attr_charref-i.yaml000064400000000320150403616540017506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_attr_charref
is_singleton: false
name: on_attr_charref
params: (code)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/wellformed_error-i.yaml000064400000000321150403616540017720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#wellformed_error
is_singleton: false
name: wellformed_error
params: (msg)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/do_parse-i.yaml000064400000000320150403616540016142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#do_parse
is_singleton: false
name: do_parse
params: (string_or_readable)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_charref-i.yaml000064400000000306150403616550016461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_charref
is_singleton: false
name: on_charref
params: (code)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_xmldecl_encoding-i.yaml000064400000000327150403616550020350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_xmldecl_encoding
is_singleton: false
name: on_xmldecl_encoding
params: (str)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/cdesc-XMLScanner.yaml000064400000003121150403616550017154 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ENTITY_REF_MAP
  value: "{     'lt' => '<',     'gt' => '>',     'amp' => '&',     'quot' => '\"',     'apos' => '\\''"
full_name: XSD::XMLParser::XMLScanner
includes: 
- !ruby/object:RI::IncludedModule 
  name: XMLScan::Visitor
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_parse
- !ruby/object:RI::MethodSummary 
  name: on_attr_charref
- !ruby/object:RI::MethodSummary 
  name: on_attr_charref_hex
- !ruby/object:RI::MethodSummary 
  name: on_attr_entityref
- !ruby/object:RI::MethodSummary 
  name: on_attr_value
- !ruby/object:RI::MethodSummary 
  name: on_attribute
- !ruby/object:RI::MethodSummary 
  name: on_chardata
- !ruby/object:RI::MethodSummary 
  name: on_charref
- !ruby/object:RI::MethodSummary 
  name: on_charref_hex
- !ruby/object:RI::MethodSummary 
  name: on_entityref
- !ruby/object:RI::MethodSummary 
  name: on_etag
- !ruby/object:RI::MethodSummary 
  name: on_stag
- !ruby/object:RI::MethodSummary 
  name: on_stag_end
- !ruby/object:RI::MethodSummary 
  name: on_stag_end_empty
- !ruby/object:RI::MethodSummary 
  name: on_xmldecl_encoding
- !ruby/object:RI::MethodSummary 
  name: on_xmldecl_version
- !ruby/object:RI::MethodSummary 
  name: parse_error
- !ruby/object:RI::MethodSummary 
  name: scanner_kcode=
- !ruby/object:RI::MethodSummary 
  name: valid_error
- !ruby/object:RI::MethodSummary 
  name: warning
- !ruby/object:RI::MethodSummary 
  name: wellformed_error
name: XMLScanner
superclass: XSD::XMLParser::Parser
ri/1.8/system/XSD/XMLParser/XMLScanner/on_attribute-i.yaml000064400000000312150403616550017047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_attribute
is_singleton: false
name: on_attribute
params: (name)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_stag-i.yaml000064400000000375150403616560016014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def on_end_document; end
full_name: XSD::XMLParser::XMLScanner#on_stag
is_singleton: false
name: on_stag
params: (name)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/valid_error-i.yaml000064400000000307150403616560016665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#valid_error
is_singleton: false
name: valid_error
params: (msg)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_attr_charref_hex-i.yaml000064400000000330150403616560020355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_attr_charref_hex
is_singleton: false
name: on_attr_charref_hex
params: (code)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_chardata-i.yaml000064400000000406150403616570016621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def on_pi(target, pi); end
full_name: XSD::XMLParser::XMLScanner#on_chardata
is_singleton: false
name: on_chardata
params: (str)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_stag_end-i.yaml000064400000000310150403616570016630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_stag_end
is_singleton: false
name: on_stag_end
params: (name)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_xmldecl_version-i.yaml000064400000000415150403616570020247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def on_xmldecl; end
full_name: XSD::XMLParser::XMLScanner#on_xmldecl_version
is_singleton: false
name: on_xmldecl_version
params: (str)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_charref_hex-i.yaml000064400000000316150403616600017322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_charref_hex
is_singleton: false
name: on_charref_hex
params: (code)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLScanner/on_entityref-i.yaml000064400000000311150403616600017050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLScanner#on_entityref
is_singleton: false
name: on_entityref
params: (ref)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLParser/Listener/cdesc-Listener.yaml000064400000000426150403616610020421 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::XMLParser::Listener
includes: 
- !ruby/object:RI::IncludedModule 
  name: XML::Encoding_ja
instance_methods: []

name: Listener
superclass: XML::Parser
ri/1.8/system/XSD/XMLParser/XMLParser/do_parse-i.yaml000064400000000317150403616610016011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::XMLParser#do_parse
is_singleton: false
name: do_parse
params: (string_or_readable)
visibility: public
ri/1.8/system/XSD/XMLParser/XMLParser/cdesc-XMLParser.yaml000064400000000417150403616620016665 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::XMLParser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_parse
name: XMLParser
superclass: XSD::XMLParser::Parser
ri/1.8/system/XSD/XMLParser/create_parser-i.yaml000064400000000305150403616620015215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser#create_parser
is_singleton: false
name: create_parser
params: (host, opt)
visibility: public
ri/1.8/system/XSD/XMLParser/REXMLParser/tag_end-i.yaml000064400000000301150403616630016040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::REXMLParser#tag_end
is_singleton: false
name: tag_end
params: (name)
visibility: public
ri/1.8/system/XSD/XMLParser/REXMLParser/xmldecl-i.yaml000064400000000332150403616630016073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::REXMLParser#xmldecl
is_singleton: false
name: xmldecl
params: (version, encoding, standalone)
visibility: public
ri/1.8/system/XSD/XMLParser/REXMLParser/do_parse-i.yaml000064400000000321150403616630016235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::REXMLParser#do_parse
is_singleton: false
name: do_parse
params: (string_or_readable)
visibility: public
ri/1.8/system/XSD/XMLParser/REXMLParser/cdesc-REXMLParser.yaml000064400000001113150403616640017337 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::REXMLParser
includes: 
- !ruby/object:RI::IncludedModule 
  name: REXML::StreamListener
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_parse
- !ruby/object:RI::MethodSummary 
  name: epilogue
- !ruby/object:RI::MethodSummary 
  name: tag_end
- !ruby/object:RI::MethodSummary 
  name: tag_start
- !ruby/object:RI::MethodSummary 
  name: text
- !ruby/object:RI::MethodSummary 
  name: xmldecl
name: REXMLParser
superclass: XSD::XMLParser::Parser
ri/1.8/system/XSD/XMLParser/REXMLParser/epilogue-i.yaml000064400000000277150403616640016265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::REXMLParser#epilogue
is_singleton: false
name: epilogue
params: ()
visibility: public
ri/1.8/system/XSD/XMLParser/REXMLParser/text-i.yaml000064400000000273150403616640015434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::REXMLParser#text
is_singleton: false
name: text
params: (text)
visibility: public
ri/1.8/system/XSD/XMLParser/REXMLParser/tag_start-i.yaml000064400000000314150403616650016435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::REXMLParser#tag_start
is_singleton: false
name: tag_start
params: (name, attrs)
visibility: public
ri/1.8/system/XSD/XMLParser/filter_ns-i.yaml000064400000000275150403616650014374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser#filter_ns
is_singleton: false
name: filter_ns
params: (ns, attrs)
visibility: public
ri/1.8/system/XSD/XMLParser/cdesc-XMLParser.yaml000064400000000701150403616660015050 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: $1 is necessary.
  name: NSParseRegexp
  value: Regexp.new('^xmlns:?(.*)$')
full_name: XSD::XMLParser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_parser
- !ruby/object:RI::MethodSummary 
  name: filter_ns
name: XMLParser
superclass: 
ri/1.8/system/XSD/XMLParser/Parser/prologue-i.yaml000064400000000273150403616660015476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#prologue
is_singleton: false
name: prologue
params: ()
visibility: private
ri/1.8/system/XSD/XMLParser/Parser/FormatDecodeError/cdesc-FormatDecodeError.yaml000064400000000353150403616670023407 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::Parser::FormatDecodeError
includes: []

instance_methods: []

name: FormatDecodeError
superclass: ParseError
ri/1.8/system/XSD/XMLParser/Parser/UnknownAttributeError/cdesc-UnknownAttributeError.yaml000064400000000372150403616700025360 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::Parser::UnknownAttributeError
includes: []

instance_methods: []

name: UnknownAttributeError
superclass: FormatDecodeError
ri/1.8/system/XSD/XMLParser/Parser/parse-i.yaml000064400000000306150403616700014744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#parse
is_singleton: false
name: parse
params: (string_or_readable)
visibility: public
ri/1.8/system/XSD/XMLParser/Parser/UnknownElementError/cdesc-UnknownElementError.yaml000064400000000366150403616710024440 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::Parser::UnknownElementError
includes: []

instance_methods: []

name: UnknownElementError
superclass: FormatDecodeError
ri/1.8/system/XSD/XMLParser/Parser/ElementConstraintError/cdesc-ElementConstraintError.yaml000064400000000374150403616720025612 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::Parser::ElementConstraintError
includes: []

instance_methods: []

name: ElementConstraintError
superclass: FormatDecodeError
ri/1.8/system/XSD/XMLParser/Parser/do_parse-i.yaml000064400000000315150403616720015430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#do_parse
is_singleton: false
name: do_parse
params: (string_or_readable)
visibility: private
ri/1.8/system/XSD/XMLParser/Parser/cdesc-Parser.yaml000064400000001571150403616730015727 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: charset
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_factory
- !ruby/object:RI::MethodSummary 
  name: create_parser
- !ruby/object:RI::MethodSummary 
  name: factory
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: XSD::XMLParser::Parser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: characters
- !ruby/object:RI::MethodSummary 
  name: do_parse
- !ruby/object:RI::MethodSummary 
  name: end_element
- !ruby/object:RI::MethodSummary 
  name: epilogue
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: prologue
- !ruby/object:RI::MethodSummary 
  name: start_element
- !ruby/object:RI::MethodSummary 
  name: xmldecl_encoding=
name: Parser
superclass: Object
ri/1.8/system/XSD/XMLParser/Parser/new-c.yaml000064400000000276150403616730014426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser::new
is_singleton: true
name: new
params: (host, opt = {})
visibility: public
ri/1.8/system/XSD/XMLParser/Parser/end_element-i.yaml000064400000000305150403616730016113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#end_element
is_singleton: false
name: end_element
params: (name)
visibility: private
ri/1.8/system/XSD/XMLParser/Parser/start_element-i.yaml000064400000000320150403616730016477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#start_element
is_singleton: false
name: start_element
params: (name, attrs)
visibility: private
ri/1.8/system/XSD/XMLParser/Parser/ParseError/cdesc-ParseError.yaml000064400000000330150403616740020634 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::Parser::ParseError
includes: []

instance_methods: []

name: ParseError
superclass: Error
ri/1.8/system/XSD/XMLParser/Parser/epilogue-i.yaml000064400000000273150403616740015452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#epilogue
is_singleton: false
name: epilogue
params: ()
visibility: private
ri/1.8/system/XSD/XMLParser/Parser/characters-i.yaml000064400000000303150403616750015753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#characters
is_singleton: false
name: characters
params: (text)
visibility: private
ri/1.8/system/XSD/XMLParser/Parser/add_factory-c.yaml000064400000000307150403616750016111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser::add_factory
is_singleton: true
name: add_factory
params: (factory)
visibility: public
ri/1.8/system/XSD/XMLParser/Parser/UnexpectedElementError/cdesc-UnexpectedElementError.yaml000064400000000374150403616760025556 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::XMLParser::Parser::UnexpectedElementError
includes: []

instance_methods: []

name: UnexpectedElementError
superclass: FormatDecodeError
ri/1.8/system/XSD/XMLParser/Parser/xmldecl_encoding%3d-i.yaml000064400000000324150403616760017432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser#xmldecl_encoding=
is_singleton: false
name: xmldecl_encoding=
params: (charset)
visibility: private
ri/1.8/system/XSD/XMLParser/Parser/create_parser-c.yaml000064400000000322150403616760016447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser::create_parser
is_singleton: true
name: create_parser
params: (host, opt = {})
visibility: public
ri/1.8/system/XSD/XMLParser/Parser/factory-c.yaml000064400000000270150403616770015302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XMLParser::Parser::factory
is_singleton: true
name: factory
params: ()
visibility: public
ri/1.8/system/XSD/XSDAnySimpleType/_to_s-i.yaml000064400000000264150403616770015020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDAnySimpleType#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDAnySimpleType/init-i.yaml000064400000000275150403616770014662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDAnySimpleType#init
is_singleton: false
name: init
params: (type, value)
visibility: private
ri/1.8/system/XSD/XSDAnySimpleType/set-i.yaml000064400000000552150403616770014510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "set accepts a string which follows lexical space (ex. String: &quot;+123&quot;), or an object which follows canonical space (ex. Integer: 123)."
full_name: XSD::XSDAnySimpleType#set
is_singleton: false
name: set
params: (value)
visibility: public
ri/1.8/system/XSD/XSDAnySimpleType/new-c.yaml000064400000000272150403617000014462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDAnySimpleType::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDAnySimpleType/screen_data-i.yaml000064400000000420150403617000016142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: raises ValueSpaceError if check failed
full_name: XSD::XSDAnySimpleType#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDAnySimpleType/cdesc-XSDAnySimpleType.yaml000064400000002146150403617000017654 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "@data represents canonical space (ex. Integer: 123)."
  name: data
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "@is_nil represents this data is nil or not."
  name: is_nil
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: The base class of XSD datatypes.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, AnySimpleTypeLiteral)
full_name: XSD::XSDAnySimpleType
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSD
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: check_lexical_format
- !ruby/object:RI::MethodSummary 
  name: init
- !ruby/object:RI::MethodSummary 
  name: screen_data
- !ruby/object:RI::MethodSummary 
  name: set
- !ruby/object:RI::MethodSummary 
  name: to_s
name: XSDAnySimpleType
superclass: NSDBase
ri/1.8/system/XSD/XSDAnySimpleType/check_lexical_format-i.yaml000064400000000410150403617000020017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true or raise
full_name: XSD::XSDAnySimpleType#check_lexical_format
is_singleton: false
name: check_lexical_format
params: (value)
visibility: public
ri/1.8/system/XSD/XSDAnySimpleType/to_s-i.yaml000064400000000450150403617000014641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "to_s creates a string which follows lexical space (ex. String: &quot;123&quot;)."
full_name: XSD::XSDAnySimpleType#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/XSD/XSDAnySimpleType/_set-i.yaml000064400000000267150403617000014635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDAnySimpleType#_set
is_singleton: false
name: _set
params: (value)
visibility: private
ri/1.8/system/XSD/XSDHexBinary/string-i.yaml000064400000000261150403617010014332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDHexBinary#string
is_singleton: false
name: string
params: ()
visibility: public
ri/1.8/system/XSD/XSDHexBinary/set_encoded-i.yaml000064400000000300150403617010015272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDHexBinary#set_encoded
is_singleton: false
name: set_encoded
params: (value)
visibility: public
ri/1.8/system/XSD/XSDHexBinary/new-c.yaml000064400000000374150403617010013614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: String in Ruby could be a binary.
full_name: XSD::XSDHexBinary::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDHexBinary/screen_data-i.yaml000064400000000301150403617020015270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDHexBinary#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDHexBinary/cdesc-XSDHexBinary.yaml000064400000000774150403617020016137 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, HexBinaryLiteral)
full_name: XSD::XSDHexBinary
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: screen_data
- !ruby/object:RI::MethodSummary 
  name: set_encoded
- !ruby/object:RI::MethodSummary 
  name: string
name: XSDHexBinary
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDFloat/cdesc-XSDFloat.yaml000064400000001132150403617020014454 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: positive?
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, FloatLiteral)
full_name: XSD::XSDFloat
includes: 
- !ruby/object:RI::IncludedModule 
  name: FloatConstants
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: narrow32bit
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDFloat
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDFloat/positive%3f-c.yaml000064400000000271150403617030014335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDFloat::positive?
is_singleton: true
name: positive?
params: (value)
visibility: private
ri/1.8/system/XSD/XSDFloat/_to_s-i.yaml000064400000000254150403617030013307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDFloat#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDFloat/new-c.yaml000064400000000262150403617030012766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDFloat::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDFloat/screen_data-i.yaml000064400000000275150403617030014457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDFloat#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDFloat/narrow32bit-i.yaml000064400000000426150403617030014361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert to single-precision 32-bit floating point value.
full_name: XSD::XSDFloat#narrow32bit
is_singleton: false
name: narrow32bit
params: (f)
visibility: private
ri/1.8/system/XSD/XSDAnyURI/cdesc-XSDAnyURI.yaml000064400000000614150403617040014566 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, AnyURILiteral)
full_name: XSD::XSDAnyURI
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDAnyURI
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDAnyURI/new-c.yaml000064400000000263150403617040013032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDAnyURI::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDAnyURI/screen_data-i.yaml000064400000000276150403617040014523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDAnyURI#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDDateTime/cdesc-XSDDateTime.yaml000064400000001055150403617050015541 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, DateTimeLiteral)
full_name: XSD::XSDDateTime
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDDateTime
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDDateTime/_to_s-i.yaml000064400000000257150403617050013743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTime#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDDateTime/new-c.yaml000064400000000265150403617050013422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTime::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDDateTime/screen_data_str-i.yaml000064400000000304150403617050015771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTime#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDDateTime/_set-i.yaml000064400000000261150403617060013566 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTime#_set
is_singleton: false
name: _set
params: (data)
visibility: private
ri/1.8/system/XSD/CodeGen/CommentDef/dump_comment-i.yaml000064400000000305150403617060016574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::CommentDef#dump_comment
is_singleton: false
name: dump_comment
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/CommentDef/cdesc-CommentDef.yaml000064400000000560150403617070016763 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: comment
  rw: RW
class_methods: []

comment: 
constants: []

full_name: XSD::CodeGen::CommentDef
includes: 
- !ruby/object:RI::IncludedModule 
  name: GenSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump_comment
name: CommentDef
superclass: 
ri/1.8/system/XSD/CodeGen/GenSupport/uncapitalize-i.yaml000064400000000312150403617070016661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#uncapitalize
is_singleton: false
name: uncapitalize
params: (target)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/untab-i.yaml000064400000000303150403617070015302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#untab
is_singleton: false
name: untab
params: (line, ts = 8)
visibility: private
ri/1.8/system/XSD/CodeGen/GenSupport/trim_indent-i.yaml000064400000000306150403617100016502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#trim_indent
is_singleton: false
name: trim_indent
params: (str)
visibility: private
ri/1.8/system/XSD/CodeGen/GenSupport/safevarname%3f-i.yaml000064400000000310150403617100016747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#safevarname?
is_singleton: false
name: safevarname?
params: (name)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/safevarname-i.yaml000064400000000306150403617110016457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#safevarname
is_singleton: false
name: safevarname
params: (name)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/capitalize-i.yaml000064400000000306150403617110016314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#capitalize
is_singleton: false
name: capitalize
params: (target)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/safeconstname-i.yaml000064400000000312150403617120017013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#safeconstname
is_singleton: false
name: safeconstname
params: (name)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/safemethodname-i.yaml000064400000000314150403617120017147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#safemethodname
is_singleton: false
name: safemethodname
params: (name)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/safemethodname%3f-i.yaml000064400000000316150403617120017447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#safemethodname?
is_singleton: false
name: safemethodname?
params: (name)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/format-i.yaml000064400000000311150403617130015455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#format
is_singleton: false
name: format
params: (str, indent = nil)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/dump_emptyline-i.yaml000064400000000311150403617130017220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#dump_emptyline
is_singleton: false
name: dump_emptyline
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/GenSupport/cdesc-GenSupport.yaml000064400000001671150403617130017136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::CodeGen::GenSupport
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: capitalize
- !ruby/object:RI::MethodSummary 
  name: dump_emptyline
- !ruby/object:RI::MethodSummary 
  name: format
- !ruby/object:RI::MethodSummary 
  name: keyword?
- !ruby/object:RI::MethodSummary 
  name: safeconstname
- !ruby/object:RI::MethodSummary 
  name: safeconstname?
- !ruby/object:RI::MethodSummary 
  name: safemethodname
- !ruby/object:RI::MethodSummary 
  name: safemethodname?
- !ruby/object:RI::MethodSummary 
  name: safevarname
- !ruby/object:RI::MethodSummary 
  name: safevarname?
- !ruby/object:RI::MethodSummary 
  name: trim_eol
- !ruby/object:RI::MethodSummary 
  name: trim_indent
- !ruby/object:RI::MethodSummary 
  name: uncapitalize
- !ruby/object:RI::MethodSummary 
  name: untab
name: GenSupport
superclass: 
ri/1.8/system/XSD/CodeGen/GenSupport/keyword%3f-i.yaml000064400000000300150403617140016146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#keyword?
is_singleton: false
name: keyword?
params: (word)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/safeconstname%3f-i.yaml000064400000000314150403617140017315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#safeconstname?
is_singleton: false
name: safeconstname?
params: (name)
visibility: public
ri/1.8/system/XSD/CodeGen/GenSupport/trim_eol-i.yaml000064400000000300150403617140015776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::GenSupport#trim_eol
is_singleton: false
name: trim_eol
params: (str)
visibility: private
ri/1.8/system/XSD/CodeGen/cdesc-CodeGen.yaml000064400000000507150403617140014224 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: from the file 'keywords' in 1.9.
  name: KEYWORD
  value: "{}"
full_name: XSD::CodeGen
includes: []

instance_methods: []

name: CodeGen
superclass: 
ri/1.8/system/XSD/CodeGen/ClassDef/dump_class_def-i.yaml000064400000000307150403617150016522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#dump_class_def
is_singleton: false
name: dump_class_def
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ClassDef/dump_accessor-i.yaml000064400000000327150403617150016403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#dump_accessor
is_singleton: false
name: dump_accessor
params: (attrname, writable)
visibility: private
ri/1.8/system/XSD/CodeGen/ClassDef/dump_classvar-i.yaml000064400000000305150403617160016414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#dump_classvar
is_singleton: false
name: dump_classvar
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ClassDef/new-c.yaml000064400000000305150403617160014334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef::new
is_singleton: true
name: new
params: (name, baseclass = nil)
visibility: public
ri/1.8/system/XSD/CodeGen/ClassDef/def_classvar-i.yaml000064400000000314150403617160016205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#def_classvar
is_singleton: false
name: def_classvar
params: (var, value)
visibility: public
ri/1.8/system/XSD/CodeGen/ClassDef/cdesc-ClassDef.yaml000064400000001433150403617170016072 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: XSD::CodeGen::ClassDef
includes: 
- !ruby/object:RI::IncludedModule 
  name: GenSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_attr
- !ruby/object:RI::MethodSummary 
  name: def_classvar
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_accessor
- !ruby/object:RI::MethodSummary 
  name: dump_attribute
- !ruby/object:RI::MethodSummary 
  name: dump_attributes
- !ruby/object:RI::MethodSummary 
  name: dump_class_def
- !ruby/object:RI::MethodSummary 
  name: dump_class_def_end
- !ruby/object:RI::MethodSummary 
  name: dump_classvar
name: ClassDef
superclass: ModuleDef
ri/1.8/system/XSD/CodeGen/ClassDef/dump_class_def_end-i.yaml000064400000000317150403617170017353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#dump_class_def_end
is_singleton: false
name: dump_class_def_end
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ClassDef/dump_attributes-i.yaml000064400000000311150403617170016762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#dump_attributes
is_singleton: false
name: dump_attributes
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ClassDef/def_attr-i.yaml000064400000000342150403617170015343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#def_attr
is_singleton: false
name: def_attr
params: (attrname, writable = true, varname = nil)
visibility: public
ri/1.8/system/XSD/CodeGen/ClassDef/dump-i.yaml000064400000000262150403617200014513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#dump
is_singleton: false
name: dump
params: ()
visibility: public
ri/1.8/system/XSD/CodeGen/ClassDef/dump_attribute-i.yaml000064400000000342150403617200016575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ClassDef#dump_attribute
is_singleton: false
name: dump_attribute
params: (attrname, writable, varname)
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_package_def-i.yaml000064400000000323150403617210017163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_package_def
is_singleton: false
name: dump_package_def
params: (package)
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/def_const-i.yaml000064400000000311150403617210015666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#def_const
is_singleton: false
name: def_const
params: (const, value)
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_const-i.yaml000064400000000300150403617210016073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_const
is_singleton: false
name: dump_const
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_code-i.yaml000064400000000276150403617220015674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_code
is_singleton: false
name: dump_code
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_package_def_end-i.yaml000064400000000333150403617220020013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_package_def_end
is_singleton: false
name: dump_package_def_end
params: (package)
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_module_def_end-i.yaml000064400000000322150403617220017703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_module_def_end
is_singleton: false
name: dump_module_def_end
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/def_publicmethod-i.yaml000064400000000424150403617220017225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #def_method"
full_name: XSD::CodeGen::ModuleDef#def_publicmethod
is_singleton: false
name: def_publicmethod
params: (name, *params)
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/def_privatemethod-i.yaml000064400000000401150403617220017414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: if block_given?
comment: 
full_name: XSD::CodeGen::ModuleDef#def_privatemethod
is_singleton: false
name: def_privatemethod
params: (name, *params) {|if block_given?| ...}
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/def_require-i.yaml000064400000000305150403617220016220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#def_require
is_singleton: false
name: def_require
params: (path)
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/cdesc-ModuleDef.yaml000064400000002601150403617230016425 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: XSD::CodeGen::ModuleDef
includes: 
- !ruby/object:RI::IncludedModule 
  name: GenSupport
- !ruby/object:RI::IncludedModule 
  name: CommentDef
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: def_code
- !ruby/object:RI::MethodSummary 
  name: def_const
- !ruby/object:RI::MethodSummary 
  name: def_method
- !ruby/object:RI::MethodSummary 
  name: def_privatemethod
- !ruby/object:RI::MethodSummary 
  name: def_protectedmethod
- !ruby/object:RI::MethodSummary 
  name: def_publicmethod
- !ruby/object:RI::MethodSummary 
  name: def_require
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_code
- !ruby/object:RI::MethodSummary 
  name: dump_const
- !ruby/object:RI::MethodSummary 
  name: dump_methods
- !ruby/object:RI::MethodSummary 
  name: dump_module_def
- !ruby/object:RI::MethodSummary 
  name: dump_module_def_end
- !ruby/object:RI::MethodSummary 
  name: dump_package_def
- !ruby/object:RI::MethodSummary 
  name: dump_package_def_end
- !ruby/object:RI::MethodSummary 
  name: dump_requirepath
- !ruby/object:RI::MethodSummary 
  name: dump_static
- !ruby/object:RI::MethodSummary 
  name: dump_value
name: ModuleDef
superclass: Object
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_value-i.yaml000064400000000305150403617230016070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_value
is_singleton: false
name: dump_value
params: (value)
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/def_method-i.yaml000064400000000447150403617230016034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: def_publicmethod
block_params: if block_given?
comment: 
full_name: XSD::CodeGen::ModuleDef#def_method
is_singleton: false
name: def_method
params: (name, *params) {|if block_given?| ...}
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/new-c.yaml000064400000000265150403617230014517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef::new
is_singleton: true
name: new
params: (name)
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/def_protectedmethod-i.yaml000064400000000405150403617230017740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: if block_given?
comment: 
full_name: XSD::CodeGen::ModuleDef#def_protectedmethod
is_singleton: false
name: def_protectedmethod
params: (name, *params) {|if block_given?| ...}
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_static-i.yaml000064400000000305150403617240016244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_static
is_singleton: false
name: dump_static
params: (str)
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_methods-i.yaml000064400000000304150403617240016417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_methods
is_singleton: false
name: dump_methods
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_requirepath-i.yaml000064400000000314150403617240017306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_requirepath
is_singleton: false
name: dump_requirepath
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/def_code-i.yaml000064400000000277150403617240015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#def_code
is_singleton: false
name: def_code
params: (code)
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/dump-i.yaml000064400000000263150403617240014700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump
is_singleton: false
name: dump
params: ()
visibility: public
ri/1.8/system/XSD/CodeGen/ModuleDef/dump_module_def-i.yaml000064400000000312150403617250017057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#dump_module_def
is_singleton: false
name: dump_module_def
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/ModuleDef/add_method-i.yaml000064400000000326150403617250016024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::ModuleDef#add_method
is_singleton: false
name: add_method
params: (m, visibility = :public)
visibility: public
ri/1.8/system/XSD/CodeGen/MethodDef/dump_method_def_end-i.yaml000064400000000322150403617250017674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::MethodDef#dump_method_def_end
is_singleton: false
name: dump_method_def_end
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/MethodDef/new-c.yaml000064400000000345150403617260014514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: if block_given?
comment: 
full_name: XSD::CodeGen::MethodDef::new
is_singleton: true
name: new
params: (name, *params) {|if block_given?| ...}
visibility: public
ri/1.8/system/XSD/CodeGen/MethodDef/dump_definition-i.yaml000064400000000312150403617260017100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::MethodDef#dump_definition
is_singleton: false
name: dump_definition
params: ()
visibility: private
ri/1.8/system/XSD/CodeGen/MethodDef/cdesc-MethodDef.yaml000064400000001202150403617260016412 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definition
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: XSD::CodeGen::MethodDef
includes: 
- !ruby/object:RI::IncludedModule 
  name: GenSupport
- !ruby/object:RI::IncludedModule 
  name: CommentDef
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_definition
- !ruby/object:RI::MethodSummary 
  name: dump_method_def
- !ruby/object:RI::MethodSummary 
  name: dump_method_def_end
name: MethodDef
superclass: Object
ri/1.8/system/XSD/CodeGen/MethodDef/dump-i.yaml000064400000000263150403617260014675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::MethodDef#dump
is_singleton: false
name: dump
params: ()
visibility: public
ri/1.8/system/XSD/CodeGen/MethodDef/dump_method_def-i.yaml000064400000000312150403617270017047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::CodeGen::MethodDef#dump_method_def
is_singleton: false
name: dump_method_def
params: ()
visibility: private
ri/1.8/system/XSD/XSDNegativeInteger/new-c.yaml000064400000000274150403617270015012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNegativeInteger::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDNegativeInteger/mininclusive-i.yaml000064400000000304150403617270016726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNegativeInteger#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDNegativeInteger/cdesc-XSDNegativeInteger.yaml000064400000000744150403617300020513 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, NegativeIntegerLiteral)
full_name: XSD::XSDNegativeInteger
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDNegativeInteger
superclass: XSDNonPositiveInteger
ri/1.8/system/XSD/XSDNegativeInteger/maxinclusive-i.yaml000064400000000304150403617300016722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNegativeInteger#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/QName/eql%3f-i.yaml000064400000000251150403617300012635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#eql?
is_singleton: false
name: eql?
params: (rhs)
visibility: public
ri/1.8/system/XSD/QName/cdesc-QName.yaml000064400000002065150403617300013415 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: source
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NormalizedNameRegexp
  value: /^\{([^}]*)\}(.*)$/
- !ruby/object:RI::Constant 
  comment: 
  name: EMPTY
  value: QName.new.freeze
full_name: XSD::QName
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dup_name
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: match
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: to_s
name: QName
superclass: Object
ri/1.8/system/XSD/QName/dup_name-i.yaml000064400000000262150403617310013351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#dup_name
is_singleton: false
name: dup_name
params: (name)
visibility: public
ri/1.8/system/XSD/QName/hash-i.yaml000064400000000246150403617310012506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/XSD/QName/parse-i.yaml000064400000000253150403617310012673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#parse
is_singleton: false
name: parse
params: (str)
visibility: public
ri/1.8/system/XSD/QName/match-i.yaml000064400000000253150403617310012655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#match
is_singleton: false
name: match
params: (rhs)
visibility: public
ri/1.8/system/XSD/QName/inspect-i.yaml000064400000000254150403617310013227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/XSD/QName/new-c.yaml000064400000000277150403617320012353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName::new
is_singleton: true
name: new
params: (namespace = nil, name = nil)
visibility: public
ri/1.8/system/XSD/QName/%3d%3d%3d-i.yaml000064400000000247150403617320012730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#===
is_singleton: false
name: ===
params: (rhs)
visibility: public
ri/1.8/system/XSD/QName/to_s-i.yaml000064400000000246150403617320012530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/XSD/QName/%3d%3d-i.yaml000064400000000245150403617320012432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#==
is_singleton: false
name: ==
params: (rhs)
visibility: public
ri/1.8/system/XSD/QName/dump-i.yaml000064400000000246150403617330012532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::QName#dump
is_singleton: false
name: dump
params: ()
visibility: public
ri/1.8/system/XSD/XSDGDay/_to_s-i.yaml000064400000000253150403617330013070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGDay#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDGDay/cdesc-XSDGDay.yaml000064400000000762150403617330014026 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, GDayLiteral)
full_name: XSD::XSDGDay
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDGDay
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDGDay/new-c.yaml000064400000000261150403617340012550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGDay::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDGDay/screen_data_str-i.yaml000064400000000300150403617340015117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGDay#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDNormalizedString/cdesc-XSDNormalizedString.yaml000064400000000725150403617340021144 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Derived types
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, NormalizedStringLiteral)
full_name: XSD::XSDNormalizedString
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDNormalizedString
superclass: XSDString
ri/1.8/system/XSD/XSDNormalizedString/new-c.yaml000064400000000275150403617340015224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNormalizedString::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDNormalizedString/screen_data-i.yaml000064400000000310150403617340016677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNormalizedString#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDLong/new-c.yaml000064400000000261150403617350012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDLong::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDLong/cdesc-XSDLong.yaml000064400000000670150403617350014154 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, LongLiteral)
full_name: XSD::XSDLong
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDLong
superclass: XSDInteger
ri/1.8/system/XSD/XSDLong/mininclusive-i.yaml000064400000000271150403617360014550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDLong#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDLong/maxinclusive-i.yaml000064400000000271150403617360014552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDLong#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/NS/compare-i.yaml000064400000000266150403617360012537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#compare
is_singleton: false
name: compare
params: (ns, name, rhs)
visibility: public
ri/1.8/system/XSD/NS/assigner%3d-i.yaml000064400000000270150403617360013213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#assigner=
is_singleton: false
name: assigner=
params: (assigner)
visibility: protected
ri/1.8/system/XSD/NS/Assigner/new-c.yaml000064400000000253150403617370013444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS::Assigner::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/XSD/NS/Assigner/assign-i.yaml000064400000000263150403617370014146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS::Assigner#assign
is_singleton: false
name: assign
params: (ns)
visibility: public
ri/1.8/system/XSD/NS/Assigner/cdesc-Assigner.yaml000064400000000437150403617370015271 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: XSD::NS::Assigner
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: assign
name: Assigner
superclass: Object
ri/1.8/system/XSD/NS/cdesc-NS.yaml000064400000001712150403617400012252 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: default_namespace
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: $1 and $2 are necessary.
  name: ParseRegexp
  value: Regexp.new('^([^:]+)(?::(.+))?$')
full_name: XSD::NS
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: assign
- !ruby/object:RI::MethodSummary 
  name: assigned?
- !ruby/object:RI::MethodSummary 
  name: assigned_tag?
- !ruby/object:RI::MethodSummary 
  name: assigner=
- !ruby/object:RI::MethodSummary 
  name: clone_ns
- !ruby/object:RI::MethodSummary 
  name: compare
- !ruby/object:RI::MethodSummary 
  name: each_ns
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: parse_local
name: NS
superclass: Object
ri/1.8/system/XSD/NS/assigned_tag%3f-i.yaml000064400000000270150403617400014025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#assigned_tag?
is_singleton: false
name: assigned_tag?
params: (tag)
visibility: public
ri/1.8/system/XSD/NS/assigned%3f-i.yaml000064400000000257150403617400013177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#assigned?
is_singleton: false
name: assigned?
params: (ns)
visibility: public
ri/1.8/system/XSD/NS/parse-i.yaml000064400000000267150403617410012220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#parse
is_singleton: false
name: parse
params: (str, local = false)
visibility: public
ri/1.8/system/XSD/NS/clone_ns-i.yaml000064400000000253150403617410012701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#clone_ns
is_singleton: false
name: clone_ns
params: ()
visibility: public
ri/1.8/system/XSD/NS/FormatError/cdesc-FormatError.yaml000064400000000313150403617410016433 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::NS::FormatError
includes: []

instance_methods: []

name: FormatError
superclass: Error
ri/1.8/system/XSD/NS/new-c.yaml000064400000000254150403617420011666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS::new
is_singleton: true
name: new
params: (tag2ns = {})
visibility: public
ri/1.8/system/XSD/NS/assign-i.yaml000064400000000264150403617420012370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#assign
is_singleton: false
name: assign
params: (ns, tag = nil)
visibility: public
ri/1.8/system/XSD/NS/parse_local-i.yaml000064400000000656150403617420013375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For local attribute key parsing
- !ruby/struct:SM::Flow::VERB 
  body: "  &lt;foo xmlns=&quot;urn:a&quot; xmlns:n1=&quot;urn:a&quot; bar=&quot;1&quot; n1:baz=&quot;2&quot; /&gt;\n    =&gt;\n  {}bar, {urn:a}baz\n"
full_name: XSD::NS#parse_local
is_singleton: false
name: parse_local
params: (elem)
visibility: public
ri/1.8/system/XSD/NS/each_ns-i.yaml000064400000000302150403617420012475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (ns, tag)
comment: 
full_name: XSD::NS#each_ns
is_singleton: false
name: each_ns
params: () {|ns, tag| ...}
visibility: public
ri/1.8/system/XSD/NS/name-i.yaml000064400000000247150403617420012025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NS#name
is_singleton: false
name: name
params: (name)
visibility: public
ri/1.8/system/XSD/Error/cdesc-Error.yaml000064400000000303150403617430013572 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/XSD/XSDUnsignedLong/cdesc-XSDUnsignedLong.yaml000064400000000733150403617430017345 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, UnsignedLongLiteral)
full_name: XSD::XSDUnsignedLong
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDUnsignedLong
superclass: XSDNonNegativeInteger
ri/1.8/system/XSD/XSDUnsignedLong/new-c.yaml000064400000000271150403617440014322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedLong::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDUnsignedLong/mininclusive-i.yaml000064400000000301150403617440016236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedLong#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDUnsignedLong/maxinclusive-i.yaml000064400000000301150403617440016240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedLong#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDDate/_to_s-i.yaml000064400000000253150403617450013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDate#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDDate/new-c.yaml000064400000000261150403617450012603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDate::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDDate/screen_data_str-i.yaml000064400000000300150403617450015152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDate#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDDate/cdesc-XSDDate.yaml000064400000000762150403617450014113 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, DateLiteral)
full_name: XSD::XSDDate
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDDate
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDByte/cdesc-XSDByte.yaml000064400000000666150403617460014173 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, ByteLiteral)
full_name: XSD::XSDByte
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDByte
superclass: XSDShort
ri/1.8/system/XSD/XSDByte/new-c.yaml000064400000000261150403617460012632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDByte::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDByte/mininclusive-i.yaml000064400000000271150403617460014555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDByte#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDByte/maxinclusive-i.yaml000064400000000271150403617460014557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDByte#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDBase64Binary/cdesc-XSDBase64Binary.yaml000064400000001005150403617470016734 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, Base64BinaryLiteral)
full_name: XSD::XSDBase64Binary
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: screen_data
- !ruby/object:RI::MethodSummary 
  name: set_encoded
- !ruby/object:RI::MethodSummary 
  name: string
name: XSDBase64Binary
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDBase64Binary/string-i.yaml000064400000000264150403617470014647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDBase64Binary#string
is_singleton: false
name: string
params: ()
visibility: public
ri/1.8/system/XSD/XSDBase64Binary/set_encoded-i.yaml000064400000000303150403617470015607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDBase64Binary#set_encoded
is_singleton: false
name: set_encoded
params: (value)
visibility: public
ri/1.8/system/XSD/XSDBase64Binary/new-c.yaml000064400000000377150403617470014131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: String in Ruby could be a binary.
full_name: XSD::XSDBase64Binary::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDBase64Binary/screen_data-i.yaml000064400000000304150403617470015604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDBase64Binary#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDGMonth/cdesc-XSDGMonth.yaml000064400000000770150403617500014744 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, GMonthLiteral)
full_name: XSD::XSDGMonth
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDGMonth
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDGMonth/_to_s-i.yaml000064400000000255150403617500013441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGMonth#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDGMonth/new-c.yaml000064400000000263150403617510013121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGMonth::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDGMonth/screen_data_str-i.yaml000064400000000302150403617510015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGMonth#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDUnsignedShort/new-c.yaml000064400000000272150403617520014522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedShort::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDUnsignedShort/cdesc-XSDUnsignedShort.yaml000064400000000727150403617520017750 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, UnsignedShortLiteral)
full_name: XSD::XSDUnsignedShort
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDUnsignedShort
superclass: XSDUnsignedInt
ri/1.8/system/XSD/XSDUnsignedShort/mininclusive-i.yaml000064400000000302150403617520016436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedShort#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDUnsignedShort/maxinclusive-i.yaml000064400000000302150403617520016440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedShort#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/Mapping/obj2xml-c.yaml000064400000000312150403617530013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Mapping::obj2xml
is_singleton: true
name: obj2xml
params: (obj, elename = nil, io = nil)
visibility: public
ri/1.8/system/XSD/Mapping/xml2obj-c.yaml000064400000000264150403617530013530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Mapping::xml2obj
is_singleton: true
name: xml2obj
params: (stream)
visibility: public
ri/1.8/system/XSD/Mapping/cdesc-Mapping.yaml000064400000001003150403617530014375 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2xml
- !ruby/object:RI::MethodSummary 
  name: xml2obj
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MappingRegistry
  value: SOAP::Mapping::WSDLLiteralRegistry.new
- !ruby/object:RI::Constant 
  comment: 
  name: MappingOpt
  value: "{:default_encodingstyle => SOAP::LiteralNamespace}"
full_name: XSD::Mapping
includes: []

instance_methods: []

name: Mapping
superclass: 
ri/1.8/system/XSD/cdesc-XSD.yaml000064400000010630150403617540012054 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This program is copyrighted free software by NAKAMURA, Hiroshi. 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.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Namespace
  value: "'http://www.w3.org/2001/XMLSchema'"
- !ruby/object:RI::Constant 
  comment: 
  name: InstanceNamespace
  value: "'http://www.w3.org/2001/XMLSchema-instance'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrType
  value: "'type'"
- !ruby/object:RI::Constant 
  comment: 
  name: NilValue
  value: "'true'"
- !ruby/object:RI::Constant 
  comment: 
  name: AnyTypeLiteral
  value: "'anyType'"
- !ruby/object:RI::Constant 
  comment: 
  name: AnySimpleTypeLiteral
  value: "'anySimpleType'"
- !ruby/object:RI::Constant 
  comment: 
  name: NilLiteral
  value: "'nil'"
- !ruby/object:RI::Constant 
  comment: 
  name: StringLiteral
  value: "'string'"
- !ruby/object:RI::Constant 
  comment: 
  name: BooleanLiteral
  value: "'boolean'"
- !ruby/object:RI::Constant 
  comment: 
  name: DecimalLiteral
  value: "'decimal'"
- !ruby/object:RI::Constant 
  comment: 
  name: FloatLiteral
  value: "'float'"
- !ruby/object:RI::Constant 
  comment: 
  name: DoubleLiteral
  value: "'double'"
- !ruby/object:RI::Constant 
  comment: 
  name: DurationLiteral
  value: "'duration'"
- !ruby/object:RI::Constant 
  comment: 
  name: DateTimeLiteral
  value: "'dateTime'"
- !ruby/object:RI::Constant 
  comment: 
  name: TimeLiteral
  value: "'time'"
- !ruby/object:RI::Constant 
  comment: 
  name: DateLiteral
  value: "'date'"
- !ruby/object:RI::Constant 
  comment: 
  name: GYearMonthLiteral
  value: "'gYearMonth'"
- !ruby/object:RI::Constant 
  comment: 
  name: GYearLiteral
  value: "'gYear'"
- !ruby/object:RI::Constant 
  comment: 
  name: GMonthDayLiteral
  value: "'gMonthDay'"
- !ruby/object:RI::Constant 
  comment: 
  name: GDayLiteral
  value: "'gDay'"
- !ruby/object:RI::Constant 
  comment: 
  name: GMonthLiteral
  value: "'gMonth'"
- !ruby/object:RI::Constant 
  comment: 
  name: HexBinaryLiteral
  value: "'hexBinary'"
- !ruby/object:RI::Constant 
  comment: 
  name: Base64BinaryLiteral
  value: "'base64Binary'"
- !ruby/object:RI::Constant 
  comment: 
  name: AnyURILiteral
  value: "'anyURI'"
- !ruby/object:RI::Constant 
  comment: 
  name: QNameLiteral
  value: "'QName'"
- !ruby/object:RI::Constant 
  comment: 
  name: NormalizedStringLiteral
  value: "'normalizedString'"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: 3.3.2 token 3.3.3 language 3.3.4 NMTOKEN 3.3.5 NMTOKENS 3.3.6 Name 3.3.7 NCName 3.3.8 ID 3.3.9 IDREF 3.3.10 IDREFS 3.3.11 ENTITY 3.3.12 ENTITIES
  name: IntegerLiteral
  value: "'integer'"
- !ruby/object:RI::Constant 
  comment: 
  name: NonPositiveIntegerLiteral
  value: "'nonPositiveInteger'"
- !ruby/object:RI::Constant 
  comment: 
  name: NegativeIntegerLiteral
  value: "'negativeInteger'"
- !ruby/object:RI::Constant 
  comment: 
  name: LongLiteral
  value: "'long'"
- !ruby/object:RI::Constant 
  comment: 
  name: IntLiteral
  value: "'int'"
- !ruby/object:RI::Constant 
  comment: 
  name: ShortLiteral
  value: "'short'"
- !ruby/object:RI::Constant 
  comment: 
  name: ByteLiteral
  value: "'byte'"
- !ruby/object:RI::Constant 
  comment: 
  name: NonNegativeIntegerLiteral
  value: "'nonNegativeInteger'"
- !ruby/object:RI::Constant 
  comment: 
  name: UnsignedLongLiteral
  value: "'unsignedLong'"
- !ruby/object:RI::Constant 
  comment: 
  name: UnsignedIntLiteral
  value: "'unsignedInt'"
- !ruby/object:RI::Constant 
  comment: 
  name: UnsignedShortLiteral
  value: "'unsignedShort'"
- !ruby/object:RI::Constant 
  comment: 
  name: UnsignedByteLiteral
  value: "'unsignedByte'"
- !ruby/object:RI::Constant 
  comment: 
  name: PositiveIntegerLiteral
  value: "'positiveInteger'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrTypeName
  value: QName.new(InstanceNamespace, AttrType)
- !ruby/object:RI::Constant 
  comment: 
  name: AttrNilName
  value: QName.new(InstanceNamespace, NilLiteral)
- !ruby/object:RI::Constant 
  comment: 
  name: AnyTypeName
  value: QName.new(Namespace, AnyTypeLiteral)
- !ruby/object:RI::Constant 
  comment: 
  name: AnySimpleTypeName
  value: QName.new(Namespace, AnySimpleTypeLiteral)
full_name: XSD
includes: []

instance_methods: []

name: XSD
superclass: 
ri/1.8/system/XSD/NSDBase/init-i.yaml000064400000000254150403617540012750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NSDBase#init
is_singleton: false
name: init
params: (type)
visibility: public
ri/1.8/system/XSD/NSDBase/new-c.yaml000064400000000246150403617550012572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NSDBase::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/XSD/NSDBase/cdesc-NSDBase.yaml000064400000001014150403617550014051 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: inherited
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: types
comment: 
- !ruby/struct:SM::Flow::P 
  body: The base class of all datatypes with Namespace.
constants: []

full_name: XSD::NSDBase
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: init
name: NSDBase
superclass: Object
ri/1.8/system/XSD/NSDBase/types-c.yaml000064400000000252150403617550013142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NSDBase::types
is_singleton: true
name: types
params: ()
visibility: public
ri/1.8/system/XSD/NSDBase/inherited-c.yaml000064400000000267150403617560013760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::NSDBase::inherited
is_singleton: true
name: inherited
params: (klass)
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/cdesc-XSDDateTimeImpl.yaml000064400000001241150403617560017210 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: SecInDay
  value: "86400"
full_name: XSD::XSDDateTimeImpl
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_tz
- !ruby/object:RI::MethodSummary 
  name: of2tz
- !ruby/object:RI::MethodSummary 
  name: screen_data
- !ruby/object:RI::MethodSummary 
  name: to_date
- !ruby/object:RI::MethodSummary 
  name: to_datetime
- !ruby/object:RI::MethodSummary 
  name: to_obj
- !ruby/object:RI::MethodSummary 
  name: to_time
- !ruby/object:RI::MethodSummary 
  name: tz2of
name: XSDDateTimeImpl
superclass: 
ri/1.8/system/XSD/XSDDateTimeImpl/to_datetime-i.yaml000064400000000276150403617570015770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#to_datetime
is_singleton: false
name: to_datetime
params: ()
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/of2tz-i.yaml000064400000000270150403617570014530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#of2tz
is_singleton: false
name: of2tz
params: (offset)
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/add_tz-i.yaml000064400000000265150403617570014735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#add_tz
is_singleton: false
name: add_tz
params: (s)
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/to_time-i.yaml000064400000000266150403617570015131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#to_time
is_singleton: false
name: to_time
params: ()
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/to_obj-i.yaml000064400000000271150403617570014741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#to_obj
is_singleton: false
name: to_obj
params: (klass)
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/to_date-i.yaml000064400000000266150403617570015110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#to_date
is_singleton: false
name: to_date
params: ()
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/screen_data-i.yaml000064400000000277150403617600015735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#screen_data
is_singleton: false
name: screen_data
params: (t)
visibility: public
ri/1.8/system/XSD/XSDDateTimeImpl/tz2of-i.yaml000064400000000265150403617600014526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDateTimeImpl#tz2of
is_singleton: false
name: tz2of
params: (str)
visibility: public
ri/1.8/system/XSD/XSDNonNegativeInteger/new-c.yaml000064400000000277150403617600015465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNonNegativeInteger::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDNonNegativeInteger/cdesc-XSDNonNegativeInteger.yaml000064400000000742150403617600021642 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, NonNegativeIntegerLiteral)
full_name: XSD::XSDNonNegativeInteger
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDNonNegativeInteger
superclass: XSDInteger
ri/1.8/system/XSD/XSDNonNegativeInteger/mininclusive-i.yaml000064400000000307150403617610017402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNonNegativeInteger#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDNonNegativeInteger/maxinclusive-i.yaml000064400000000307150403617610017404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNonNegativeInteger#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDNonPositiveInteger/new-c.yaml000064400000000277150403617610015526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNonPositiveInteger::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDNonPositiveInteger/mininclusive-i.yaml000064400000000307150403617620017443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNonPositiveInteger#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDNonPositiveInteger/maxinclusive-i.yaml000064400000000307150403617620017445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDNonPositiveInteger#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDNonPositiveInteger/cdesc-XSDNonPositiveInteger.yaml000064400000000742150403617620021744 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, NonPositiveIntegerLiteral)
full_name: XSD::XSDNonPositiveInteger
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDNonPositiveInteger
superclass: XSDInteger
ri/1.8/system/XSD/XSDString/cdesc-XSDString.yaml000064400000000705150403617630015072 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Primitive datatypes.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, StringLiteral)
full_name: XSD::XSDString
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDString
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDString/new-c.yaml000064400000000263150403617630013176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDString::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDString/screen_data-i.yaml000064400000000276150403617630014667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDString#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/ValueSpaceError/cdesc-ValueSpaceError.yaml000064400000000317150403617640017524 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::ValueSpaceError
includes: []

instance_methods: []

name: ValueSpaceError
superclass: Error
ri/1.8/system/XSD/Charset/init-c.yaml000064400000000250150403617640013111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::init
is_singleton: true
name: init
params: ()
visibility: public
ri/1.8/system/XSD/Charset/encoding%3d-c.yaml000064400000000272150403617640014234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::encoding=
is_singleton: true
name: encoding=
params: (encoding)
visibility: public
ri/1.8/system/XSD/Charset/cdesc-Charset.yaml000064400000003351150403617650014404 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: charset_label
- !ruby/object:RI::MethodSummary 
  name: charset_str
- !ruby/object:RI::MethodSummary 
  name: encoding
- !ruby/object:RI::MethodSummary 
  name: encoding=
- !ruby/object:RI::MethodSummary 
  name: encoding_conv
- !ruby/object:RI::MethodSummary 
  name: encoding_from_xml
- !ruby/object:RI::MethodSummary 
  name: encoding_to_xml
- !ruby/object:RI::MethodSummary 
  name: init
- !ruby/object:RI::MethodSummary 
  name: is_ces
- !ruby/object:RI::MethodSummary 
  name: is_euc
- !ruby/object:RI::MethodSummary 
  name: is_sjis
- !ruby/object:RI::MethodSummary 
  name: is_us_ascii
- !ruby/object:RI::MethodSummary 
  name: is_utf8
- !ruby/object:RI::MethodSummary 
  name: xml_encoding_label
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Maps
  name: EncodingConvertMap
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: CharsetMap
  value: "{     'NONE' => 'us-ascii',     'EUC' => 'euc-jp',     'SJIS' => 'shift_jis',     'UTF8' => 'utf-8',     'X_ISO_8859_1' => 'iso-8859-1',     'X_UNKNOWN' => nil,   }"
- !ruby/object:RI::Constant 
  comment: 
  name: USASCIIRegexp
  value: Regexp.new("\\A#{us_ascii}*\\z", nil, "NONE")
- !ruby/object:RI::Constant 
  comment: 
  name: EUCRegexp
  value: Regexp.new("\\A#{character_euc}*\\z", nil, "NONE")
- !ruby/object:RI::Constant 
  comment: 
  name: SJISRegexp
  value: Regexp.new("\\A#{character_sjis}*\\z", nil, "NONE")
- !ruby/object:RI::Constant 
  comment: 
  name: UTF8Regexp
  value: Regexp.new("\\A#{character_utf8}*\\z", nil, "NONE")
full_name: XSD::Charset
includes: []

instance_methods: []

name: Charset
superclass: 
ri/1.8/system/XSD/Charset/CharsetConversionError/cdesc-CharsetConversionError.yaml000064400000000355150403617650024136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::Charset::CharsetConversionError
includes: []

instance_methods: []

name: CharsetConversionError
superclass: CharsetError
ri/1.8/system/XSD/Charset/is_sjis-c.yaml000064400000000261150403617660013615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::is_sjis
is_singleton: true
name: is_sjis
params: (str)
visibility: public
ri/1.8/system/XSD/Charset/is_us_ascii-c.yaml000064400000000271150403617660014445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::is_us_ascii
is_singleton: true
name: is_us_ascii
params: (str)
visibility: public
ri/1.8/system/XSD/Charset/charset_label-c.yaml000064400000000302150403617660014736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::charset_label
is_singleton: true
name: charset_label
params: (encoding)
visibility: public
ri/1.8/system/XSD/Charset/is_euc-c.yaml000064400000000257150403617670013427 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::is_euc
is_singleton: true
name: is_euc
params: (str)
visibility: public
ri/1.8/system/XSD/Charset/encoding_conv-c.yaml000064400000000317150403617670014770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::encoding_conv
is_singleton: true
name: encoding_conv
params: (str, enc_from, enc_to)
visibility: public
ri/1.8/system/XSD/Charset/is_ces-c.yaml000064400000000276150403617700013420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::is_ces
is_singleton: true
name: is_ces
params: (str, code = $KCODE)
visibility: public
ri/1.8/system/XSD/Charset/XSDError/cdesc-XSDError.yaml000064400000000322150403617700016122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::Charset::XSDError
includes: []

instance_methods: []

name: XSDError
superclass: StandardError
ri/1.8/system/XSD/Charset/encoding_to_xml-c.yaml000064400000000312150403617710015313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::encoding_to_xml
is_singleton: true
name: encoding_to_xml
params: (str, charset)
visibility: public
ri/1.8/system/XSD/Charset/charset_str-c.yaml000064400000000273150403617710014472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::charset_str
is_singleton: true
name: charset_str
params: (label)
visibility: public
ri/1.8/system/XSD/Charset/UnknownCharsetError/cdesc-UnknownCharsetError.yaml000064400000000347150403617720022761 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::Charset::UnknownCharsetError
includes: []

instance_methods: []

name: UnknownCharsetError
superclass: CharsetError
ri/1.8/system/XSD/Charset/is_utf8-c.yaml000064400000000261150403617720013530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::is_utf8
is_singleton: true
name: is_utf8
params: (str)
visibility: public
ri/1.8/system/XSD/Charset/CharsetError/cdesc-CharsetError.yaml000064400000000325150403617730020016 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XSD::Charset::CharsetError
includes: []

instance_methods: []

name: CharsetError
superclass: XSDError
ri/1.8/system/XSD/Charset/xml_encoding_label-c.yaml000064400000000304150403617740015754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::xml_encoding_label
is_singleton: true
name: xml_encoding_label
params: ()
visibility: public
ri/1.8/system/XSD/Charset/encoding_from_xml-c.yaml000064400000000316150403617740015643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::Charset::encoding_from_xml
is_singleton: true
name: encoding_from_xml
params: (str, charset)
visibility: public
ri/1.8/system/XSD/Charset/encoding-c.yaml000064400000000335150403617740013741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: handlers
full_name: XSD::Charset::encoding
is_singleton: true
name: encoding
params: ()
visibility: public
ri/1.8/system/XSD/XSDGYear/cdesc-XSDGYear.yaml000064400000000765150403617750014405 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, GYearLiteral)
full_name: XSD::XSDGYear
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDGYear
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDGYear/_to_s-i.yaml000064400000000254150403617760013263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGYear#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDGYear/new-c.yaml000064400000000262150403617760012742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGYear::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDGYear/screen_data_str-i.yaml000064400000000301150403617760015311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGYear#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDInteger/_to_s-i.yaml000064400000000256150403617760013653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDInteger/positive-i.yaml000064400000000265150403617770014413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger#positive
is_singleton: false
name: positive
params: (v)
visibility: private
ri/1.8/system/XSD/XSDInteger/new-c.yaml000064400000000264150403617770013333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDInteger/screen_data_str-i.yaml000064400000000305150403617770015704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger#screen_data_str
is_singleton: false
name: screen_data_str
params: (str)
visibility: private
ri/1.8/system/XSD/XSDInteger/validate-i.yaml000064400000000265150403620000014316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger#validate
is_singleton: false
name: validate
params: (v)
visibility: private
ri/1.8/system/XSD/XSDInteger/mininclusive-i.yaml000064400000000274150403620000015232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDInteger/maxinclusive-i.yaml000064400000000274150403620010015235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDInteger/cdesc-XSDInteger.yaml000064400000001423150403620010015330 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, IntegerLiteral)
- !ruby/object:RI::Constant 
  comment: 
  name: PositiveMinInclusive
  value: "1"
full_name: XSD::XSDInteger
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
- !ruby/object:RI::MethodSummary 
  name: positive
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
- !ruby/object:RI::MethodSummary 
  name: validate
name: XSDInteger
superclass: XSDDecimal
ri/1.8/system/XSD/XSDInteger/_set-i.yaml000064400000000261150403620020013455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInteger#_set
is_singleton: false
name: _set
params: (value)
visibility: private
ri/1.8/system/XSD/XSDShort/cdesc-XSDShort.yaml000064400000000667150403620030014547 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, ShortLiteral)
full_name: XSD::XSDShort
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDShort
superclass: XSDInt
ri/1.8/system/XSD/XSDShort/new-c.yaml000064400000000262150403620040013013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDShort::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDShort/mininclusive-i.yaml000064400000000272150403620040014736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDShort#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDShort/maxinclusive-i.yaml000064400000000272150403620040014740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDShort#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDDuration/_to_s-i.yaml000064400000000257150403620060014027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDuration#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDDuration/cdesc-XSDDuration.yaml000064400000001654150403620060015723 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: day
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: hour
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: min
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: month
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: sec
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: sign
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: year
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, DurationLiteral)
full_name: XSD::XSDDuration
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDDuration
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDDuration/new-c.yaml000064400000000265150403620070013507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDuration::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDDuration/screen_data-i.yaml000064400000000300150403620100015154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDuration#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDDuration/_set-i.yaml000064400000000261150403620100013644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDuration#_set
is_singleton: false
name: _set
params: (data)
visibility: private
ri/1.8/system/XSD/XSDPositiveInteger/cdesc-XSDPositiveInteger.yaml000064400000000744150403620110020604 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, PositiveIntegerLiteral)
full_name: XSD::XSDPositiveInteger
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDPositiveInteger
superclass: XSDNonNegativeInteger
ri/1.8/system/XSD/XSDPositiveInteger/new-c.yaml000064400000000274150403620120015036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDPositiveInteger::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDPositiveInteger/mininclusive-i.yaml000064400000000304150403620120016752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDPositiveInteger#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDPositiveInteger/maxinclusive-i.yaml000064400000000304150403620120016754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDPositiveInteger#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDTime/_to_s-i.yaml000064400000000253150403620130013132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDTime#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDTime/cdesc-XSDTime.yaml000064400000001041150403620130014131 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, TimeLiteral)
full_name: XSD::XSDTime
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDTime
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDTime/new-c.yaml000064400000000261150403620140012612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDTime::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDTime/screen_data_str-i.yaml000064400000000300150403620140015161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDTime#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDTime/_set-i.yaml000064400000000255150403620150012765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDTime#_set
is_singleton: false
name: _set
params: (data)
visibility: private
ri/1.8/system/XSD/IconvCharset/cdesc-IconvCharset.yaml000064400000000374150403620150016371 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: safe_iconv
comment: 
constants: []

full_name: XSD::IconvCharset
includes: []

instance_methods: []

name: IconvCharset
superclass: Object
ri/1.8/system/XSD/IconvCharset/safe_iconv-c.yaml000064400000000306150403620160015252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::IconvCharset::safe_iconv
is_singleton: true
name: safe_iconv
params: (to, from, str)
visibility: public
ri/1.8/system/XSD/XSDInt/cdesc-XSDInt.yaml000064400000000662150403620160013634 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, IntLiteral)
full_name: XSD::XSDInt
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDInt
superclass: XSDLong
ri/1.8/system/XSD/XSDInt/new-c.yaml000064400000000260150403620170012450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInt::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDInt/mininclusive-i.yaml000064400000000270150403620200014365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInt#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDInt/maxinclusive-i.yaml000064400000000270150403620200014367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDInt#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDGYearMonth/_to_s-i.yaml000064400000000261150403620210014247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGYearMonth#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDGYearMonth/new-c.yaml000064400000000267150403620210013735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGYearMonth::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDGYearMonth/cdesc-XSDGYearMonth.yaml000064400000001004150403620210016365 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, GYearMonthLiteral)
full_name: XSD::XSDGYearMonth
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDGYearMonth
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDGYearMonth/screen_data_str-i.yaml000064400000000306150403620220016305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGYearMonth#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDDecimal/_to_s-i.yaml000064400000000346150403620230013576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 0.0 -&gt; 0; right?
full_name: XSD::XSDDecimal#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDDecimal/cdesc-XSDDecimal.yaml000064400000001133150403620230015234 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, DecimalLiteral)
full_name: XSD::XSDDecimal
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: nonzero?
- !ruby/object:RI::MethodSummary 
  name: screen_data
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDDecimal
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDDecimal/nonzero%3f-i.yaml000064400000000263150403620230014461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDecimal#nonzero?
is_singleton: false
name: nonzero?
params: ()
visibility: public
ri/1.8/system/XSD/XSDDecimal/new-c.yaml000064400000000264150403620230013255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDecimal::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDDecimal/screen_data-i.yaml000064400000000273150403620240014743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDecimal#screen_data
is_singleton: false
name: screen_data
params: (d)
visibility: private
ri/1.8/system/XSD/XSDDecimal/screen_data_str-i.yaml000064400000000305150403620240015627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDecimal#screen_data_str
is_singleton: false
name: screen_data_str
params: (str)
visibility: private
ri/1.8/system/XSD/XSDDecimal/_set-i.yaml000064400000000260150403620250013422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDecimal#_set
is_singleton: false
name: _set
params: (data)
visibility: private
ri/1.8/system/XSD/XSDGMonthDay/_to_s-i.yaml000064400000000260150403620260014070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGMonthDay#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDGMonthDay/new-c.yaml000064400000000266150403620270013557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGMonthDay::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDGMonthDay/screen_data_str-i.yaml000064400000000305150403620270016126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDGMonthDay#screen_data_str
is_singleton: false
name: screen_data_str
params: (t)
visibility: private
ri/1.8/system/XSD/XSDGMonthDay/cdesc-XSDGMonthDay.yaml000064400000001001150403620270016022 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, GMonthDayLiteral)
full_name: XSD::XSDGMonthDay
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSDDateTimeImpl
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data_str
name: XSDGMonthDay
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDQName/_to_s-i.yaml000064400000000254150403620310013236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDQName#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDQName/new-c.yaml000064400000000262150403620310012715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDQName::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDQName/screen_data-i.yaml000064400000000275150403620310014406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDQName#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDQName/cdesc-XSDQName.yaml000064400000000750150403620320014346 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, QNameLiteral)
full_name: XSD::XSDQName
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDQName
superclass: XSDAnySimpleType
ri/1.8/system/XSD/XSDQName/_set-i.yaml000064400000000256150403620330013071 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDQName#_set
is_singleton: false
name: _set
params: (data)
visibility: private
ri/1.8/system/XSD/XSDUnsignedByte/new-c.yaml000064400000000271150403620340014317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedByte::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDUnsignedByte/cdesc-XSDUnsignedByte.yaml000064400000000726150403620350017352 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, UnsignedByteLiteral)
full_name: XSD::XSDUnsignedByte
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maxinclusive
- !ruby/object:RI::MethodSummary 
  name: mininclusive
name: XSDUnsignedByte
superclass: XSDUnsignedShort
ri/1.8/system/XSD/XSDUnsignedByte/mininclusive-i.yaml000064400000000301150403620350016234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedByte#mininclusive
is_singleton: false
name: mininclusive
params: ()
visibility: private
ri/1.8/system/XSD/XSDUnsignedByte/maxinclusive-i.yaml000064400000000301150403620350016236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDUnsignedByte#maxinclusive
is_singleton: false
name: maxinclusive
params: ()
visibility: private
ri/1.8/system/XSD/FloatConstants/cdesc-FloatConstants.yaml000064400000001271150403620360017315 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NaN
  value: 0.0/0.0
- !ruby/object:RI::Constant 
  comment: 
  name: POSITIVE_INF
  value: +1.0/0.0
- !ruby/object:RI::Constant 
  comment: 
  name: NEGATIVE_INF
  value: -1.0/0.0
- !ruby/object:RI::Constant 
  comment: 
  name: POSITIVE_ZERO
  value: +1.0/POSITIVE_INF
- !ruby/object:RI::Constant 
  comment: 
  name: NEGATIVE_ZERO
  value: -1.0/POSITIVE_INF
- !ruby/object:RI::Constant 
  comment: 
  name: MIN_POSITIVE_SINGLE
  value: 2.0 ** -149
full_name: XSD::FloatConstants
includes: []

instance_methods: []

name: FloatConstants
superclass: 
ri/1.8/system/XSD/XSDDouble/_to_s-i.yaml000064400000000255150403620370013456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDouble#_to_s
is_singleton: false
name: _to_s
params: ()
visibility: private
ri/1.8/system/XSD/XSDDouble/new-c.yaml000064400000000263150403620370013135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDouble::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/XSD/XSDDouble/screen_data-i.yaml000064400000000276150403620400014620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XSD::XSDDouble#screen_data
is_singleton: false
name: screen_data
params: (value)
visibility: private
ri/1.8/system/XSD/XSDDouble/cdesc-XSDDouble.yaml000064400000001125150403620400014764 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Ruby's Float is double-precision 64-bit floating point value.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(Namespace, DoubleLiteral)
full_name: XSD::XSDDouble
includes: 
- !ruby/object:RI::IncludedModule 
  name: FloatConstants
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _to_s
- !ruby/object:RI::MethodSummary 
  name: screen_data
name: XSDDouble
superclass: XSDAnySimpleType
ri/1.8/system/Profiler__/cdesc-Profiler__.yaml000064400000000473150403620400015111 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: PROFILE_PROC
  value: proc{|event, file, line, id, binding, klass|     case event
full_name: Profiler__
includes: []

instance_methods: []

name: Profiler__
superclass: 
ri/1.8/system/CGI/out-i.yaml000064400000004066150403620400011333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Print an HTTP header and body to $DEFAULT_OUTPUT ($&gt;)
- !ruby/struct:SM::Flow::P 
  body: "The header is provided by <tt>options</tt>, as for #header(). The body of the document is that returned by the passed- in block. This block takes no arguments. It is required."
- !ruby/struct:SM::Flow::VERB 
  body: "  cgi = CGI.new\n  cgi.out{ &quot;string&quot; }\n    # Content-Type: text/html\n    # Content-Length: 6\n    #\n    # string\n\n  cgi.out(&quot;text/plain&quot;) { &quot;string&quot; }\n    # Content-Type: text/plain\n    # Content-Length: 6\n    #\n    # string\n\n  cgi.out(&quot;nph&quot;        =&gt; true,\n          &quot;status&quot;     =&gt; &quot;OK&quot;,  # == &quot;200 OK&quot;\n          &quot;server&quot;     =&gt; ENV['SERVER_SOFTWARE'],\n          &quot;connection&quot; =&gt; &quot;close&quot;,\n          &quot;type&quot;       =&gt; &quot;text/html&quot;,\n          &quot;charset&quot;    =&gt; &quot;iso-2022-jp&quot;,\n            # Content-Type: text/html; charset=iso-2022-jp\n          &quot;language&quot;   =&gt; &quot;ja&quot;,\n          &quot;expires&quot;    =&gt; Time.now + (3600 * 24 * 30),\n          &quot;cookie&quot;     =&gt; [cookie1, cookie2],\n          &quot;my_header1&quot; =&gt; &quot;my_value&quot;,\n          &quot;my_header2&quot; =&gt; &quot;my_value&quot;) { &quot;string&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: Content-Length is automatically calculated from the size of the String returned by the content block.
- !ruby/struct:SM::Flow::P 
  body: If ENV['REQUEST_METHOD'] == &quot;HEAD&quot;, then only the header is outputted (the content block is still required, but it is ignored).
- !ruby/struct:SM::Flow::P 
  body: If the charset is &quot;iso-2022-jp&quot; or &quot;euc-jp&quot; or &quot;shift_jis&quot; then the content is converted to this charset, and the language is set to &quot;ja&quot;.
full_name: CGI#out
is_singleton: false
name: out
params: (options = "text/html") {|| ...}
visibility: public
ri/1.8/system/CGI/cdesc-CGI.yaml000064400000031074150403620400011756 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: cookie
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: inputs
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: cookie
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: escapeElement
- !ruby/object:RI::MethodSummary 
  name: escapeHTML
- !ruby/object:RI::MethodSummary 
  name: escapeHTML
- !ruby/object:RI::MethodSummary 
  name: header
- !ruby/object:RI::MethodSummary 
  name: message
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: pretty
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: rfc1123_date
- !ruby/object:RI::MethodSummary 
  name: rfc1123_date
- !ruby/object:RI::MethodSummary 
  name: tag
- !ruby/object:RI::MethodSummary 
  name: unescape
- !ruby/object:RI::MethodSummary 
  name: unescape
- !ruby/object:RI::MethodSummary 
  name: unescapeElement
- !ruby/object:RI::MethodSummary 
  name: unescapeHTML
comment: 
- !ruby/struct:SM::Flow::P 
  body: CGI class. See documentation for the file cgi.rb for an overview of the CGI protocol.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Introduction
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: Read on for more details. Examples are provided at the bottom.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Queries
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Environmental Variables
- !ruby/struct:SM::Flow::P 
  body: "The standard CGI environmental variables are available as read-only attributes of a CGI object. The following is a list of these variables:"
- !ruby/struct:SM::Flow::VERB 
  body: "  AUTH_TYPE               HTTP_HOST          REMOTE_IDENT\n  CONTENT_LENGTH          HTTP_NEGOTIATE     REMOTE_USER\n  CONTENT_TYPE            HTTP_PRAGMA        REQUEST_METHOD\n  GATEWAY_INTERFACE       HTTP_REFERER       SCRIPT_NAME\n  HTTP_ACCEPT             HTTP_USER_AGENT    SERVER_NAME\n  HTTP_ACCEPT_CHARSET     PATH_INFO          SERVER_PORT\n  HTTP_ACCEPT_ENCODING    PATH_TRANSLATED    SERVER_PROTOCOL\n  HTTP_ACCEPT_LANGUAGE    QUERY_STRING       SERVER_SOFTWARE\n  HTTP_CACHE_CONTROL      REMOTE_ADDR\n  HTTP_FROM               REMOTE_HOST\n"
- !ruby/struct:SM::Flow::P 
  body: For each of these variables, there is a corresponding attribute with the same name, except all lower case and without a preceding HTTP_. <tt>content_length</tt> and <tt>server_port</tt> are integers; the rest are strings.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::P 
  body: "For instance, suppose the request contains the parameter &quot;favourite_colours&quot; with the multiple values &quot;blue&quot; and &quot;green&quot;. The following behaviour would occur:"
- !ruby/struct:SM::Flow::VERB 
  body: "  cgi.params[&quot;favourite_colours&quot;]  # =&gt; [&quot;blue&quot;, &quot;green&quot;]\n  cgi[&quot;favourite_colours&quot;]         # =&gt; &quot;blue&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Cookies
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Multipart requests
- !ruby/struct:SM::Flow::P 
  body: "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:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "#local_path():"
    body: the path of the uploaded file on the local filesystem
  - !ruby/struct:SM::Flow::LI 
    label: "#original_filename():"
    body: the name of the file on the client computer
  - !ruby/struct:SM::Flow::LI 
    label: "#content_type():"
    body: the content type of the file
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Responses
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Writing output
- !ruby/struct:SM::Flow::P 
  body: "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 #header() method. The output stream can be written directly to using the #print() method."
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Generating HTML
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples of use
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Get form values
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;cgi&quot;\n  cgi = CGI.new\n  value = cgi['field_name']   # &lt;== value string for 'field_name'\n    # if not 'field_name' included, then return &quot;&quot;.\n  fields = cgi.keys            # &lt;== array of field names\n\n  # returns true if form has 'field_name'\n  cgi.has_key?('field_name')\n  cgi.has_key?('field_name')\n  cgi.include?('field_name')\n"
- !ruby/struct:SM::Flow::P 
  body: CAUTION! cgi['field_name'] returned an Array with the old cgi.rb(included in ruby 1.6)
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Get form values as hash
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;cgi&quot;\n  cgi = CGI.new\n  params = cgi.params\n"
- !ruby/struct:SM::Flow::P 
  body: cgi.params is a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  cgi.params['new_field_name'] = [&quot;value&quot;]  # add new param\n  cgi.params['field_name'] = [&quot;new_value&quot;]  # change value\n  cgi.params.delete('field_name')           # delete param\n  cgi.params.clear                          # delete all params\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Save form values to file
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;pstore&quot;\n  db = PStore.new(&quot;query.db&quot;)\n  db.transaction do\n    db[&quot;params&quot;] = cgi.params\n  end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Restore form values from file
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;pstore&quot;\n  db = PStore.new(&quot;query.db&quot;)\n  db.transaction do\n    cgi.params = db[&quot;params&quot;]\n  end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Get multipart form values
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;cgi&quot;\n  cgi = CGI.new\n  value = cgi['field_name']   # &lt;== value string for 'field_name'\n  value.read                  # &lt;== body of value\n  value.local_path            # &lt;== path to local file of value\n  value.original_filename     # &lt;== original filename of value\n  value.content_type          # &lt;== content_type of value\n"
- !ruby/struct:SM::Flow::P 
  body: and value has StringIO or Tempfile class methods.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Get cookie values
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;cgi&quot;\n  cgi = CGI.new\n  values = cgi.cookies['name']  # &lt;== array of 'name'\n    # if not 'name' included, then return [].\n  names = cgi.cookies.keys      # &lt;== array of cookie names\n"
- !ruby/struct:SM::Flow::P 
  body: and cgi.cookies is a hash.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Get cookie objects
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;cgi&quot;\n  cgi = CGI.new\n  for name, cookie in cgi.cookies\n    cookie.expires = Time.now + 30\n  end\n  cgi.out(&quot;cookie&quot; =&gt; cgi.cookies) {&quot;string&quot;}\n\n  cgi.cookies # { &quot;name1&quot; =&gt; cookie1, &quot;name2&quot; =&gt; cookie2, ... }\n\n  require &quot;cgi&quot;\n  cgi = CGI.new\n  cgi.cookies['name'].expires = Time.now + 30\n  cgi.out(&quot;cookie&quot; =&gt; cgi.cookies['name']) {&quot;string&quot;}\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Print http header and html string to $DEFAULT_OUTPUT ($&gt;)
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;cgi&quot;\n  cgi = CGI.new(&quot;html3&quot;)  # add HTML generation methods\n  cgi.out() do\n    cgi.html() do\n      cgi.head{ cgi.title{&quot;TITLE&quot;} } +\n      cgi.body() do\n        cgi.form() do\n          cgi.textarea(&quot;get_text&quot;) +\n          cgi.br +\n          cgi.submit\n        end +\n        cgi.pre() do\n          CGI::escapeHTML(\n            &quot;params: &quot; + cgi.params.inspect + &quot;\\n&quot; +\n            &quot;cookies: &quot; + cgi.cookies.inspect + &quot;\\n&quot; +\n            ENV.collect() do |key, value|\n              key + &quot; --&gt; &quot; + value + &quot;\\n&quot;\n            end.join(&quot;&quot;)\n          )\n        end\n      end\n    end\n  end\n\n  # add HTML generation methods\n  CGI.new(&quot;html3&quot;)    # html3.2\n  CGI.new(&quot;html4&quot;)    # html4.01 (Strict)\n  CGI.new(&quot;html4Tr&quot;)  # html4.01 Transitional\n  CGI.new(&quot;html4Fr&quot;)  # html4.01 Frameset\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CR
  value: "\"\\015\""
- !ruby/object:RI::Constant 
  comment: 
  name: LF
  value: "\"\\012\""
- !ruby/object:RI::Constant 
  comment: 
  name: EOL
  value: CR + LF
- !ruby/object:RI::Constant 
  comment: 
  name: RFC822_DAYS
  value: "%w[ Sun Mon Tue Wed Thu Fri Sat ]"
- !ruby/object:RI::Constant 
  comment: 
  name: RFC822_MONTHS
  value: "%w[ Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ]"
full_name: CGI
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: env_table
- !ruby/object:RI::MethodSummary 
  name: header
- !ruby/object:RI::MethodSummary 
  name: out
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: read_from_cmdline
- !ruby/object:RI::MethodSummary 
  name: stdinput
- !ruby/object:RI::MethodSummary 
  name: stdoutput
name: CGI
superclass: Object
ri/1.8/system/CGI/print-i.yaml000064400000000613150403620400011652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Print an argument or list of arguments to the default output stream
- !ruby/struct:SM::Flow::VERB 
  body: "  cgi = CGI.new\n  cgi.print    # default:  cgi.print == $DEFAULT_OUTPUT.print\n"
full_name: CGI#print
is_singleton: false
name: print
params: (*options)
visibility: public
ri/1.8/system/CGI/unescape-c.yaml000064400000000343150403620410012314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: unescape url encoded
full_name: CGI::unescape
is_singleton: true
name: unescape
params: (str)
visibility: public
ri/1.8/system/CGI/Html3/cdesc-Html3.yaml000064400000000416150403620420013330 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin module for HTML version 3 generation methods.
constants: []

full_name: CGI::Html3
includes: []

instance_methods: []

name: Html3
superclass: 
ri/1.8/system/CGI/error-c.yaml000064400000000353150403620430011645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: print error message to $&gt; and exit
full_name: CGI::error
is_singleton: true
name: error
params: ()
visibility: public
ri/1.8/system/CGI/unescapeElement-c.yaml000064400000001416150403620430013632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Undo escaping such as that done by CGI::escapeElement()
- !ruby/struct:SM::Flow::VERB 
  body: "  print CGI::unescapeElement(\n          CGI::escapeHTML('&lt;BR&gt;&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt;'), &quot;A&quot;, &quot;IMG&quot;)\n    # &quot;&amp;lt;BR&amp;gt;&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt;&quot;\n\n  print CGI::unescapeElement(\n          CGI::escapeHTML('&lt;BR&gt;&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt;'), [&quot;A&quot;, &quot;IMG&quot;])\n    # &quot;&amp;lt;BR&amp;gt;&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt;&quot;\n"
full_name: CGI::unescapeElement
is_singleton: true
name: unescapeElement
params: (string, *elements)
visibility: public
ri/1.8/system/CGI/header-c.yaml000064400000000347150403620440011750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: make HTTP header string
full_name: CGI::header
is_singleton: true
name: header
params: (*options)
visibility: public
ri/1.8/system/CGI/Html4Tr/cdesc-Html4Tr.yaml000064400000000437150403620450014154 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin module for HTML version 4 transitional generation methods.
constants: []

full_name: CGI::Html4Tr
includes: []

instance_methods: []

name: Html4Tr
superclass: 
ri/1.8/system/CGI/Html4Fr/cdesc-Html4Fr.yaml000064400000000431150403620450014112 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin module for generating HTML version 4 with framesets.
constants: []

full_name: CGI::Html4Fr
includes: []

instance_methods: []

name: Html4Fr
superclass: 
ri/1.8/system/CGI/rfc1123_date-c.yaml000064400000000360150403620460012573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: make rfc1123 date string
full_name: CGI::rfc1123_date
is_singleton: true
name: rfc1123_date
params: (time)
visibility: public
ri/1.8/system/CGI/parse-c.yaml000064400000001010150403620460011620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse an HTTP query string into a hash of key=&gt;value pairs.
- !ruby/struct:SM::Flow::VERB 
  body: "  params = CGI::parse(&quot;query_string&quot;)\n    # {&quot;name1&quot; =&gt; [&quot;value1&quot;, &quot;value2&quot;, ...],\n    #  &quot;name2&quot; =&gt; [&quot;value1&quot;, &quot;value2&quot;, ...], ... }\n"
full_name: CGI::parse
is_singleton: true
name: parse
params: (query)
visibility: public
ri/1.8/system/CGI/Html4/cdesc-Html4.yaml000064400000000416150403620460013336 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin module for HTML version 4 generation methods.
constants: []

full_name: CGI::Html4
includes: []

instance_methods: []

name: Html4
superclass: 
ri/1.8/system/CGI/Cookie/cdesc-Cookie.yaml000064400000004340150403620470014001 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: domain
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: expires
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: path
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: secure
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class representing an HTTP cookie.
- !ruby/struct:SM::Flow::P 
  body: In addition to its specific fields and methods, a Cookie instance is a delegator to the array of its values.
- !ruby/struct:SM::Flow::P 
  body: See RFC 2965.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples of use
- !ruby/struct:SM::Flow::VERB 
  body: "  cookie1 = CGI::Cookie::new(&quot;name&quot;, &quot;value1&quot;, &quot;value2&quot;, ...)\n  cookie1 = CGI::Cookie::new(&quot;name&quot; =&gt; &quot;name&quot;, &quot;value&quot; =&gt; &quot;value&quot;)\n  cookie1 = CGI::Cookie::new('name'    =&gt; 'name',\n                             'value'   =&gt; ['value1', 'value2', ...],\n                             'path'    =&gt; 'path',   # optional\n                             'domain'  =&gt; 'domain', # optional\n                             'expires' =&gt; Time.now, # optional\n                             'secure'  =&gt; true      # optional\n                            )\n\n  cgi.out(&quot;cookie&quot; =&gt; [cookie1, cookie2]) { &quot;string&quot; }\n\n  name    = cookie1.name\n  values  = cookie1.value\n  path    = cookie1.path\n  domain  = cookie1.domain\n  expires = cookie1.expires\n  secure  = cookie1.secure\n\n  cookie1.name    = 'name'\n  cookie1.value   = ['value1', 'value2', ...]\n  cookie1.path    = 'path'\n  cookie1.domain  = 'domain'\n  cookie1.expires = Time.now + 30\n  cookie1.secure  = true\n"
constants: []

full_name: CGI::Cookie
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: secure=
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: value=
name: Cookie
superclass: DelegateClass(Array)
ri/1.8/system/CGI/Cookie/parse-c.yaml000064400000000730150403620470013042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse a raw cookie string into a hash of cookie-name=&gt;Cookie pairs.
- !ruby/struct:SM::Flow::VERB 
  body: "  cookies = CGI::Cookie::parse(&quot;raw_cookie_string&quot;)\n    # { &quot;name1&quot; =&gt; cookie1, &quot;name2&quot; =&gt; cookie2, ... }\n"
full_name: CGI::Cookie::parse
is_singleton: true
name: parse
params: (raw_cookie)
visibility: public
ri/1.8/system/CGI/Cookie/value%3d-i.yaml000064400000000256150403620470013351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CGI::Cookie#value=
is_singleton: false
name: value=
params: (val)
visibility: public
ri/1.8/system/CGI/Cookie/secure%3d-i.yaml000064400000000512150403620470013516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set whether the Cookie is a secure cookie or not.
- !ruby/struct:SM::Flow::P 
  body: <tt>val</tt> must be a boolean.
full_name: CGI::Cookie#secure=
is_singleton: false
name: secure=
params: (val)
visibility: public
ri/1.8/system/CGI/Cookie/new-c.yaml000064400000002627150403620500012522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new CGI::Cookie object.
- !ruby/struct:SM::Flow::P 
  body: "The contents of the cookie can be specified as a <tt>name</tt> and one or more <tt>value</tt> arguments. Alternatively, the contents can be specified as a single hash argument. The possible keywords of this hash are as follows:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "name:"
    body: the name of the cookie. Required.
  - !ruby/struct:SM::Flow::LI 
    label: "value:"
    body: the cookie's value or list of values.
  - !ruby/struct:SM::Flow::LI 
    label: "path:"
    body: the path for which this cookie applies. Defaults to the base directory of the CGI script.
  - !ruby/struct:SM::Flow::LI 
    label: "domain:"
    body: the domain for which this cookie applies.
  - !ruby/struct:SM::Flow::LI 
    label: "expires:"
    body: the time at which this cookie expires, as a <tt>Time</tt> object.
  - !ruby/struct:SM::Flow::LI 
    label: "secure:"
    body: whether this cookie is a secure cookie or not (default to false). Secure cookies are only transmitted to HTTPS servers.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: These keywords correspond to attributes of the cookie object.
full_name: CGI::Cookie::new
is_singleton: true
name: new
params: (name = "", *value)
visibility: public
ri/1.8/system/CGI/Cookie/to_s-i.yaml000064400000000374150403620500012700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert the Cookie to its string representation.
full_name: CGI::Cookie#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/CGI/header-i.yaml000064400000011557150403620500011760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create an HTTP header block as a string.
- !ruby/struct:SM::Flow::P 
  body: Includes the empty line that ends the header block.
- !ruby/struct:SM::Flow::P 
  body: "<tt>options</tt> can be a string specifying the Content-Type (defaults to text/html), or a hash of header key/value pairs. The following header keys are recognized:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "type:"
    body: the Content-Type header. Defaults to &quot;text/html&quot;
  - !ruby/struct:SM::Flow::LI 
    label: "charset:"
    body: the charset of the body, appended to the Content-Type header.
  - !ruby/struct:SM::Flow::LI 
    label: "nph:"
    body: a boolean value. If true, prepend protocol string and status code, and date; and sets default values for &quot;server&quot; and &quot;connection&quot; if not explicitly set.
  - !ruby/struct:SM::Flow::LI 
    label: "status:"
    body: the HTTP status code, returned as the Status header. See the list of available status codes below.
  - !ruby/struct:SM::Flow::LI 
    label: "server:"
    body: the server software, returned as the Server header.
  - !ruby/struct:SM::Flow::LI 
    label: "connection:"
    body: the connection type, returned as the Connection header (for instance, &quot;close&quot;.
  - !ruby/struct:SM::Flow::LI 
    label: "length:"
    body: the length of the content that will be sent, returned as the Content-Length header.
  - !ruby/struct:SM::Flow::LI 
    label: "language:"
    body: the language of the content, returned as the Content-Language header.
  - !ruby/struct:SM::Flow::LI 
    label: "expires:"
    body: the time on which the current content expires, as a <tt>Time</tt> object, returned as the Expires header.
  - !ruby/struct:SM::Flow::LI 
    label: "cookie:"
    body: 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.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "Other header lines can also be set; they are appended as key: value."
- !ruby/struct:SM::Flow::VERB 
  body: "  header\n    # Content-Type: text/html\n\n  header(&quot;text/plain&quot;)\n    # Content-Type: text/plain\n\n  header(&quot;nph&quot;        =&gt; true,\n         &quot;status&quot;     =&gt; &quot;OK&quot;,  # == &quot;200 OK&quot;\n           # &quot;status&quot;     =&gt; &quot;200 GOOD&quot;,\n         &quot;server&quot;     =&gt; ENV['SERVER_SOFTWARE'],\n         &quot;connection&quot; =&gt; &quot;close&quot;,\n         &quot;type&quot;       =&gt; &quot;text/html&quot;,\n         &quot;charset&quot;    =&gt; &quot;iso-2022-jp&quot;,\n           # Content-Type: text/html; charset=iso-2022-jp\n         &quot;length&quot;     =&gt; 103,\n         &quot;language&quot;   =&gt; &quot;ja&quot;,\n         &quot;expires&quot;    =&gt; Time.now + 30,\n         &quot;cookie&quot;     =&gt; [cookie1, cookie2],\n         &quot;my_header1&quot; =&gt; &quot;my_value&quot;\n         &quot;my_header2&quot; =&gt; &quot;my_value&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: "The status codes are:"
- !ruby/struct:SM::Flow::VERB 
  body: "  &quot;OK&quot;                  --&gt; &quot;200 OK&quot;\n  &quot;PARTIAL_CONTENT&quot;     --&gt; &quot;206 Partial Content&quot;\n  &quot;MULTIPLE_CHOICES&quot;    --&gt; &quot;300 Multiple Choices&quot;\n  &quot;MOVED&quot;               --&gt; &quot;301 Moved Permanently&quot;\n  &quot;REDIRECT&quot;            --&gt; &quot;302 Found&quot;\n  &quot;NOT_MODIFIED&quot;        --&gt; &quot;304 Not Modified&quot;\n  &quot;BAD_REQUEST&quot;         --&gt; &quot;400 Bad Request&quot;\n  &quot;AUTH_REQUIRED&quot;       --&gt; &quot;401 Authorization Required&quot;\n  &quot;FORBIDDEN&quot;           --&gt; &quot;403 Forbidden&quot;\n  &quot;NOT_FOUND&quot;           --&gt; &quot;404 Not Found&quot;\n  &quot;METHOD_NOT_ALLOWED&quot;  --&gt; &quot;405 Method Not Allowed&quot;\n  &quot;NOT_ACCEPTABLE&quot;      --&gt; &quot;406 Not Acceptable&quot;\n  &quot;LENGTH_REQUIRED&quot;     --&gt; &quot;411 Length Required&quot;\n  &quot;PRECONDITION_FAILED&quot; --&gt; &quot;412 Precondition Failed&quot;\n  &quot;SERVER_ERROR&quot;        --&gt; &quot;500 Internal Server Error&quot;\n  &quot;NOT_IMPLEMENTED&quot;     --&gt; &quot;501 Method Not Implemented&quot;\n  &quot;BAD_GATEWAY&quot;         --&gt; &quot;502 Bad Gateway&quot;\n  &quot;VARIANT_ALSO_VARIES&quot; --&gt; &quot;506 Variant Also Negotiates&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: This method does not perform charset conversion.
full_name: CGI#header
is_singleton: false
name: header
params: (options = "text/html")
visibility: public
ri/1.8/system/CGI/read_from_cmdline-i.yaml000064400000000424150403620500014150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: offline mode. read name=value pairs on standard input.
full_name: CGI#read_from_cmdline
is_singleton: false
name: read_from_cmdline
params: ()
visibility: public
ri/1.8/system/CGI/cookie-c.yaml000064400000000345150403620500011764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: make raw cookie string
full_name: CGI::cookie
is_singleton: true
name: cookie
params: (options)
visibility: public
ri/1.8/system/CGI/unescapeHTML-c.yaml000064400000000716150403620500013005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unescape a string that has been HTML-escaped
- !ruby/struct:SM::Flow::VERB 
  body: "  CGI::unescapeHTML(&quot;Usage: foo &amp;quot;bar&amp;quot; &amp;lt;baz&amp;gt;&quot;)\n     # =&gt; &quot;Usage: foo \\&quot;bar\\&quot; &lt;baz&gt;&quot;\n"
full_name: CGI::unescapeHTML
is_singleton: true
name: unescapeHTML
params: (string)
visibility: public
ri/1.8/system/CGI/tag-c.yaml000064400000000543150403620500011266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ".to_s + \"</\" + escapeHTML(element) + \">\" : \"\")"
comment: 
- !ruby/struct:SM::Flow::P 
  body: make HTML tag string
full_name: CGI::tag
is_singleton: true
name: tag
params: "(element, attributes = {}) {|.to_s + \"</\" + escapeHTML(element) + \">\" : \"\")| ...}"
visibility: public
ri/1.8/system/CGI/new-c.yaml000064400000002460150403620510011305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new CGI instance.
- !ruby/struct:SM::Flow::P 
  body: "<tt>type</tt> specifies which version of HTML to load the HTML generation methods for. The following versions of HTML are supported:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "html3:"
    body: HTML 3.x
  - !ruby/struct:SM::Flow::LI 
    label: "html4:"
    body: HTML 4.0
  - !ruby/struct:SM::Flow::LI 
    label: "html4Tr:"
    body: HTML 4.0 Transitional
  - !ruby/struct:SM::Flow::LI 
    label: "html4Fr:"
    body: HTML 4.0 with Framesets
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: If not specified, no HTML generation methods will be loaded.
- !ruby/struct:SM::Flow::P 
  body: 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 &quot;offline&quot; 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.
full_name: CGI::new
is_singleton: true
name: new
params: (type = "query")
visibility: public
ri/1.8/system/CGI/QueryExtension/%5b%5d-i.yaml000064400000000636150403620510014400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the value for the parameter with a given key.
- !ruby/struct:SM::Flow::P 
  body: "If the parameter has multiple values, only the first will be retrieved; use #params() to get the array of values."
full_name: CGI::QueryExtension#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/CGI/QueryExtension/params%3d-i.yaml000064400000000365150403620510015305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set all the parameters.
full_name: CGI::QueryExtension#params=
is_singleton: false
name: params=
params: (hash)
visibility: public
ri/1.8/system/CGI/QueryExtension/read_from_cmdline-i.yaml000064400000000445150403620510017156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: offline mode. read name=value pairs on standard input.
full_name: CGI::QueryExtension#read_from_cmdline
is_singleton: false
name: read_from_cmdline
params: ()
visibility: private
ri/1.8/system/CGI/QueryExtension/Value/cdesc-Value.yaml000064400000000306150403620510016502 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: CGI::QueryExtension::Value
includes: []

instance_methods: []

name: Value
superclass: 
ri/1.8/system/CGI/QueryExtension/cdesc-QueryExtension.yaml000064400000004113150403620510017354 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Get the cookies as a hash of cookie-name=&gt;Cookie pairs.
  name: cookies
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Get the parameters as a hash of name=&gt;values pairs, where values is an Array.
  name: params
  rw: R
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Mixin module. It provides the follow functionality groups:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Access to CGI environment variables as methods. See documentation to the CGI class for a list of these variables.
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: Access to cookies, including the cookies attribute.
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: Access to parameters, including the params attribute, and overloading
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: ""
      body: to perform parameter value lookup by key.
    type: :LABELED
  - !ruby/struct:SM::Flow::LI 
    label: "4."
    body: The initialize_query method, for initialising the above mechanisms, handling multipart forms, and allowing the class to be used in &quot;offline&quot; mode.
  type: :NUMBER
constants: []

full_name: CGI::QueryExtension
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: has_key?
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: initialize_query
- !ruby/object:RI::MethodSummary 
  name: key?
- !ruby/object:RI::MethodSummary 
  name: keys
- !ruby/object:RI::MethodSummary 
  name: multipart?
- !ruby/object:RI::MethodSummary 
  name: params=
- !ruby/object:RI::MethodSummary 
  name: raw_cookie
- !ruby/object:RI::MethodSummary 
  name: raw_cookie2
- !ruby/object:RI::MethodSummary 
  name: read_from_cmdline
- !ruby/object:RI::MethodSummary 
  name: read_multipart
name: QueryExtension
superclass: 
ri/1.8/system/CGI/QueryExtension/include%3f-i.yaml000064400000000366150403620520015451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #has_key?"
full_name: CGI::QueryExtension#include?
is_singleton: false
name: include?
params: (*args)
visibility: public
ri/1.8/system/CGI/QueryExtension/raw_cookie-i.yaml000064400000000400150403620520015637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the raw cookies as a string.
full_name: CGI::QueryExtension#raw_cookie
is_singleton: false
name: raw_cookie
params: ()
visibility: public
ri/1.8/system/CGI/QueryExtension/multipart%3f-i.yaml000064400000000273150403620520016044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CGI::QueryExtension#multipart?
is_singleton: false
name: multipart?
params: ()
visibility: public
ri/1.8/system/CGI/QueryExtension/initialize_query-i.yaml000064400000000706150403620520017114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initialize the data from the query.
- !ruby/struct:SM::Flow::P 
  body: Handles multipart forms (in particular, forms that involve file uploads). Reads query parameters in the @params field, and cookies into @cookies.
full_name: CGI::QueryExtension#initialize_query
is_singleton: false
name: initialize_query
params: ()
visibility: private
ri/1.8/system/CGI/QueryExtension/keys-i.yaml000064400000000377150403620530014506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return all parameter keys as an array.
full_name: CGI::QueryExtension#keys
is_singleton: false
name: keys
params: (*args)
visibility: public
ri/1.8/system/CGI/QueryExtension/read_multipart-i.yaml000064400000000334150403620530016540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CGI::QueryExtension#read_multipart
is_singleton: false
name: read_multipart
params: (boundary, content_length)
visibility: private
ri/1.8/system/CGI/QueryExtension/raw_cookie2-i.yaml000064400000000412150403620530015725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the raw RFC2965 cookies as a string.
full_name: CGI::QueryExtension#raw_cookie2
is_singleton: false
name: raw_cookie2
params: ()
visibility: public
ri/1.8/system/CGI/QueryExtension/key%3f-i.yaml000064400000000356150403620540014617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #has_key?"
full_name: CGI::QueryExtension#key?
is_singleton: false
name: key?
params: (*args)
visibility: public
ri/1.8/system/CGI/QueryExtension/has_key%3f-i.yaml000064400000000562150403620540015451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: key?
- !ruby/object:RI::AliasName 
  name: include?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if a given parameter key exists in the query.
full_name: CGI::QueryExtension#has_key?
is_singleton: false
name: has_key?
params: (*args)
visibility: public
ri/1.8/system/CGI/Session/update-i.yaml000064400000000443150403620540013431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Store session data on the server. For some session storage types, this is a no-op.
full_name: CGI::Session#update
is_singleton: false
name: update
params: ()
visibility: public
ri/1.8/system/CGI/Session/MemoryStore/update-i.yaml000064400000000440150403620550015714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Update session state.
- !ruby/struct:SM::Flow::P 
  body: A no-op.
full_name: CGI::Session::MemoryStore#update
is_singleton: false
name: update
params: ()
visibility: public
ri/1.8/system/CGI/Session/MemoryStore/cdesc-MemoryStore.yaml000064400000001257150403620550017557 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: In-memory session storage class.
- !ruby/struct:SM::Flow::P 
  body: Implements session storage as a global in-memory hash. Session data will only persist for as long as the ruby interpreter instance does.
constants: []

full_name: CGI::Session::MemoryStore
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: restore
- !ruby/object:RI::MethodSummary 
  name: update
name: MemoryStore
superclass: Object
ri/1.8/system/CGI/Session/MemoryStore/delete-i.yaml000064400000000367150403620550015704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Delete the session state.
full_name: CGI::Session::MemoryStore#delete
is_singleton: false
name: delete
params: ()
visibility: public
ri/1.8/system/CGI/Session/MemoryStore/restore-i.yaml000064400000000472150403620560016123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Restore session state.
- !ruby/struct:SM::Flow::P 
  body: Returns session data as a hash.
full_name: CGI::Session::MemoryStore#restore
is_singleton: false
name: restore
params: ()
visibility: public
ri/1.8/system/CGI/Session/MemoryStore/new-c.yaml000064400000000707150403620560015224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new MemoryStore instance.
- !ruby/struct:SM::Flow::P 
  body: <tt>session</tt> is the session this instance is associated with. <tt>option</tt> is a list of initialisation options. None are currently recognised.
full_name: CGI::Session::MemoryStore::new
is_singleton: true
name: new
params: (session, option=nil)
visibility: public
ri/1.8/system/CGI/Session/MemoryStore/close-i.yaml000064400000000437150403620560015546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Close session storage.
- !ruby/struct:SM::Flow::P 
  body: A no-op.
full_name: CGI::Session::MemoryStore#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/CGI/Session/%5b%5d-i.yaml000064400000000375150403620560013026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieve the session data for key <tt>key</tt>.
full_name: CGI::Session#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/CGI/Session/cdesc-Session.yaml000064400000015062150403620570014431 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The id of this session.
  name: new_session
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The id of this session.
  name: session_id
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class representing an HTTP session. See documentation for the file cgi/session.rb for an introduction to HTTP sessions.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Lifecycle
- !ruby/struct:SM::Flow::P 
  body: "A CGI::Session instance is created from a CGI object. By default, this CGI::Session instance will start a new session if none currently exists, or continue the current session for this client if one does exist. The <tt>new_session</tt> option can be used to either always or never create a new session. See #new() for more details."
- !ruby/struct:SM::Flow::P 
  body: "#delete() deletes a session from session storage. It does not however remove the session id from the client. If the client makes another request with the same id, the effect will be to start a new session with the old session's id."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Setting and retrieving session data.
- !ruby/struct:SM::Flow::P 
  body: The Session class associates data with a session as key-value pairs. This data can be set and retrieved by indexing the Session instance using '[]', much the same as hashes (although other hash methods are not supported).
- !ruby/struct:SM::Flow::P 
  body: When session processing has been completed for a request, the session should be closed using the close() method. This will store the session's state to persistent storage. If you want to store the session's state to persistent storage without finishing session processing for this request, call the update() method.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Storing session state
- !ruby/struct:SM::Flow::P 
  body: "The caller can specify what form of storage to use for the session's data with the <tt>database_manager</tt> option to CGI::Session::new. The following storage classes are provided as part of the standard library:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "CGI::Session::FileStore:"
    body: stores data as plain text in a flat file. Only works with String data. This is the default storage type.
  - !ruby/struct:SM::Flow::LI 
    label: "CGI::Session::MemoryStore:"
    body: stores data in an in-memory hash. The data only persists for as long as the current ruby interpreter instance does.
  - !ruby/struct:SM::Flow::LI 
    label: "CGI::Session::PStore:"
    body: stores data in Marshalled format. Provided by cgi/session/pstore.rb. Supports data of any type, and provides file-locking and transaction support.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "Custom storage types can also be created by defining a class with the following methods:"
- !ruby/struct:SM::Flow::VERB 
  body: "   new(session, options)\n   restore  # returns hash of session data.\n   update\n   close\n   delete\n"
- !ruby/struct:SM::Flow::P 
  body: Changing storage type mid-session does not work. Note in particular that by default the FileStore and PStore session data files have the same name. If your application switches from one to the other without making sure that filenames will be different and clients still have old sessions lying around in cookies, then things will break nastily!
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Maintaining the session id.
- !ruby/struct:SM::Flow::P 
  body: Most session state is maintained on the server. However, a session id must be passed backwards and forwards between client and server to maintain a reference to this session state.
- !ruby/struct:SM::Flow::P 
  body: The simplest way to do this is via cookies. The CGI::Session class provides transparent support for session id communication via cookies if the client has cookies enabled.
- !ruby/struct:SM::Flow::P 
  body: If the client has cookies disabled, the session id must be included as a parameter of all requests sent by the client to the server. The CGI::Session class in conjunction with the CGI class will transparently add the session id as a hidden input field to all forms generated using the CGI#form() HTML generation method. No built-in support is provided for other mechanisms, such as URL re-writing. The caller is responsible for extracting the session id from the session_id attribute and manually encoding it in URLs and adding it as a hidden input to HTML forms created by other mechanisms. Also, session expiry is not automatically handled.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples of use
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Setting the user's name
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'cgi'\n  require 'cgi/session'\n  require 'cgi/session/pstore'     # provides CGI::Session::PStore\n\n  cgi = CGI.new(&quot;html4&quot;)\n\n  session = CGI::Session.new(cgi,\n      'database_manager' =&gt; CGI::Session::PStore,  # use PStore\n      'session_key' =&gt; '_rb_sess_id',              # custom session key\n      'session_expires' =&gt; Time.now + 30 * 60,     # 30 minute timeout\n      'prefix' =&gt; 'pstore_sid_')                   # PStore option\n  if cgi.has_key?('user_name') and cgi['user_name'] != ''\n      # coerce to String: cgi[] returns the\n      # string-like CGI::QueryExtension::Value\n      session['user_name'] = cgi['user_name'].to_s\n  elsif !session['user_name']\n      session['user_name'] = &quot;guest&quot;\n  end\n  session.close\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Creating a new session safely
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'cgi'\n  require 'cgi/session'\n\n  cgi = CGI.new(&quot;html4&quot;)\n\n  # We make sure to delete an old session if one exists,\n  # not just to free resources, but to prevent the session\n  # from being maliciously hijacked later on.\n  begin\n      session = CGI::Session.new(cgi, 'new_session' =&gt; false)\n      session.delete\n  rescue ArgumentError  # if no old session\n  end\n  session = CGI::Session.new(cgi, 'new_session' =&gt; true)\n  session.close\n"
constants: []

full_name: CGI::Session
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: create_new_id
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: update
name: Session
superclass: Object
ri/1.8/system/CGI/Session/delete-i.yaml000064400000000614150403620570013414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Delete the session from storage. Also closes the storage.
- !ruby/struct:SM::Flow::P 
  body: Note that the session's data is <em>not</em> automatically deleted upon the session expiring.
full_name: CGI::Session#delete
is_singleton: false
name: delete
params: ()
visibility: public
ri/1.8/system/CGI/Session/FileStore/update-i.yaml000064400000000417150403620600015323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Save session state to the session's FileStore file.
full_name: CGI::Session::FileStore#update
is_singleton: false
name: update
params: ()
visibility: public
ri/1.8/system/CGI/Session/FileStore/delete-i.yaml000064400000000412150403620600015276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Close and delete the session's FileStore file.
full_name: CGI::Session::FileStore#delete
is_singleton: false
name: delete
params: ()
visibility: public
ri/1.8/system/CGI/Session/FileStore/restore-i.yaml000064400000000537150403620600015527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Restore session state from the session's FileStore file.
- !ruby/struct:SM::Flow::P 
  body: Returns the session state as a hash.
full_name: CGI::Session::FileStore#restore
is_singleton: false
name: restore
params: ()
visibility: public
ri/1.8/system/CGI/Session/FileStore/new-c.yaml000064400000002764150403620600014633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new FileStore instance.
- !ruby/struct:SM::Flow::P 
  body: This constructor is used internally by CGI::Session. The user does not generally need to call it directly.
- !ruby/struct:SM::Flow::P 
  body: <tt>session</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: "<tt>option</tt> is a hash of options for the initializer. The following options are recognised:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "tmpdir:"
    body: the directory to use for storing the FileStore file. Defaults to Dir::tmpdir (generally &quot;/tmp&quot; on Unix systems).
  - !ruby/struct:SM::Flow::LI 
    label: "prefix:"
    body: the prefix to add to the session id when generating the filename for this session's FileStore file. Defaults to the empty string.
  - !ruby/struct:SM::Flow::LI 
    label: "suffix:"
    body: the prefix to add to the session id when generating the filename for this session's FileStore file. Defaults to the empty string.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: This session's FileStore file will be created if it does not exist, or opened if it does.
full_name: CGI::Session::FileStore::new
is_singleton: true
name: new
params: (session, option={})
visibility: public
ri/1.8/system/CGI/Session/FileStore/close-i.yaml000064400000000410150403620610015140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Update and close the session's FileStore file.
full_name: CGI::Session::FileStore#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/CGI/Session/FileStore/cdesc-FileStore.yaml000064400000001413150403620610016564 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: File-based session storage class.
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: CGI::Session::FileStore
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: restore
- !ruby/object:RI::MethodSummary 
  name: update
name: FileStore
superclass: Object
ri/1.8/system/CGI/Session/new-c.yaml000064400000006452150403620610012736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new CGI::Session object for <tt>request</tt>.
- !ruby/struct:SM::Flow::P 
  body: "<tt>request</tt> is an instance of the <tt>CGI</tt> class (see cgi.rb). <tt>option</tt> is a hash of options for initialising this CGI::Session instance. The following options are recognised:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "session_key:"
    body: the parameter name used for the session id. Defaults to '_session_id'.
  - !ruby/struct:SM::Flow::LI 
    label: "session_id:"
    body: the session id to use. If not provided, then it is retrieved from the <tt>session_key</tt> parameter of the request, or automatically generated for a new session.
  - !ruby/struct:SM::Flow::LI 
    label: "new_session:"
    body: if true, force creation of a new session. If not set, a new session is only created if none currently exists. If false, a new session is never created, and if none currently exists and the <tt>session_id</tt> option is not set, an ArgumentError is raised.
  - !ruby/struct:SM::Flow::LI 
    label: "database_manager:"
    body: the name of the class providing storage facilities for session state persistence. Built-in support is provided for <tt>FileStore</tt> (the default), <tt>MemoryStore</tt>, and <tt>PStore</tt> (from cgi/session/pstore.rb). See the documentation for these classes for more details.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: The following options are also recognised, but only apply if the session id is stored in a cookie.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "session_expires:"
    body: the time the current session expires, as a <tt>Time</tt> object. If not set, the session will terminate when the user's browser is closed.
  - !ruby/struct:SM::Flow::LI 
    label: "session_domain:"
    body: the hostname domain for which this session is valid. If not set, defaults to the hostname of the server.
  - !ruby/struct:SM::Flow::LI 
    label: "session_secure:"
    body: if <tt>true</tt>, this session will only work over HTTPS.
  - !ruby/struct:SM::Flow::LI 
    label: "session_path:"
    body: the path for which this session applies. Defaults to the directory of the CGI script.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: <tt>option</tt> is also passed on to the session storage class initializer; see the documentation for each session storage class for the options they support.
- !ruby/struct:SM::Flow::P 
  body: The retrieved or created session is automatically added to <tt>request</tt> as a cookie, and also to its <tt>output_hidden</tt> table, which is used to add hidden input elements to forms.
- !ruby/struct:SM::Flow::P 
  body: <b>WARNING</b> the <tt>output_hidden</tt> fields are surrounded by a &lt;fieldset&gt; tag in HTML 4 generation, which is <em>not</em> 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)
- !ruby/struct:SM::Flow::VERB 
  body: "  cgi = CGI.new(&quot;html4&quot;)\n  class &lt;&lt; cgi\n      undef_method :fieldset\n  end\n"
full_name: CGI::Session::new
is_singleton: true
name: new
params: (request, option={})
visibility: public
ri/1.8/system/CGI/Session/create_new_id-i.yaml000064400000000700150403620610014731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new session id.
- !ruby/struct:SM::Flow::P 
  body: The session id is an MD5 hash based upon the time, a random number, and a constant string. This routine is used internally for automatically generated session ids.
full_name: CGI::Session#create_new_id
is_singleton: false
name: create_new_id
params: ()
visibility: private
ri/1.8/system/CGI/Session/close-i.yaml000064400000000477150403620610013261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Store session data on the server and close the session storage. For some session storage types, this is a no-op.
full_name: CGI::Session#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/CGI/Session/NoSession/cdesc-NoSession.yaml000064400000000323150403620610016633 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: CGI::Session::NoSession
includes: []

instance_methods: []

name: NoSession
superclass: RuntimeError
ri/1.8/system/CGI/Session/%5b%5d%3d-i.yaml000064400000000377150403620610013320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the session date for key <tt>key</tt>.
full_name: CGI::Session#[]=
is_singleton: false
name: "[]="
params: (key, val)
visibility: public
ri/1.8/system/CGI/escapeElement-c.yaml000064400000002116150403620610013265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escape only the tags of certain HTML elements in <tt>string</tt>.
- !ruby/struct:SM::Flow::P 
  body: 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).
- !ruby/struct:SM::Flow::VERB 
  body: "  print CGI::escapeElement('&lt;BR&gt;&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt;', &quot;A&quot;, &quot;IMG&quot;)\n    # &quot;&lt;BR&gt;&amp;lt;A HREF=&amp;quot;url&amp;quot;&amp;gt;&amp;lt;/A&amp;gt&quot;\n\n  print CGI::escapeElement('&lt;BR&gt;&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt;', [&quot;A&quot;, &quot;IMG&quot;])\n    # &quot;&lt;BR&gt;&amp;lt;A HREF=&amp;quot;url&amp;quot;&amp;gt;&amp;lt;/A&amp;gt&quot;\n"
full_name: CGI::escapeElement
is_singleton: true
name: escapeElement
params: (string, *elements)
visibility: public
ri/1.8/system/CGI/TagMaker/cdesc-TagMaker.yaml000064400000000603150403620610014537 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Base module for HTML-generation mixins.
- !ruby/struct:SM::Flow::P 
  body: Provides methods for code generation for tags following the various DTD element types.
constants: []

full_name: CGI::TagMaker
includes: []

instance_methods: []

name: TagMaker
superclass: 
ri/1.8/system/CGI/escape-c.yaml000064400000000334150403620620011754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: escape url encode
full_name: CGI::escape
is_singleton: true
name: escape
params: (str)
visibility: public
ri/1.8/system/CGI/message-c.yaml000064400000000437150403620620012144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: print message to $&gt;
full_name: CGI::message
is_singleton: true
name: message
params: "(message, title = \"\", header = [\"Content-Type: text/html\"])"
visibility: public
ri/1.8/system/CGI/HtmlExtension/image_button-i.yaml000064400000002102150403620620015773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate an Image Button Input element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>src</tt> is the URL of the image to use for the button. <tt>name</tt> is the input name. <tt>alt</tt> is the alternative text for the image.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  image_button(&quot;url&quot;)\n    # &lt;INPUT TYPE=&quot;image&quot; SRC=&quot;url&quot;&gt;\n\n  image_button(&quot;url&quot;, &quot;name&quot;, &quot;string&quot;)\n    # &lt;INPUT TYPE=&quot;image&quot; SRC=&quot;url&quot; NAME=&quot;name&quot; ALT=&quot;string&quot;&gt;\n\n  image_button(&quot;SRC&quot; =&gt; &quot;url&quot;, &quot;ATL&quot; =&gt; &quot;strng&quot;)\n    # &lt;INPUT TYPE=&quot;image&quot; SRC=&quot;url&quot; ALT=&quot;string&quot;&gt;\n"
full_name: CGI::HtmlExtension#image_button
is_singleton: false
name: image_button
params: (src = "", name = nil, alt = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/text_field-i.yaml000064400000002751150403620620015457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a text field Input element, as a String.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> is the name of the input field. <tt>value</tt> is its initial value. <tt>size</tt> is the size of the input area. <tt>maxlength</tt> is the maximum length of input accepted.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  text_field(&quot;name&quot;)\n    # &lt;INPUT TYPE=&quot;text&quot; NAME=&quot;name&quot; SIZE=&quot;40&quot;&gt;\n\n  text_field(&quot;name&quot;, &quot;value&quot;)\n    # &lt;INPUT TYPE=&quot;text&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; SIZE=&quot;40&quot;&gt;\n\n  text_field(&quot;name&quot;, &quot;value&quot;, 80)\n    # &lt;INPUT TYPE=&quot;text&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; SIZE=&quot;80&quot;&gt;\n\n  text_field(&quot;name&quot;, &quot;value&quot;, 80, 200)\n    # &lt;INPUT TYPE=&quot;text&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; SIZE=&quot;80&quot; MAXLENGTH=&quot;200&quot;&gt;\n\n  text_field(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;VALUE&quot; =&gt; &quot;value&quot;)\n    # &lt;INPUT TYPE=&quot;text&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot;&gt;\n"
full_name: CGI::HtmlExtension#text_field
is_singleton: false
name: text_field
params: (name = "", value = nil, size = 40, maxlength = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/cdesc-HtmlExtension.yaml000064400000003522150403620620016757 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin module providing HTML generation methods.
- !ruby/struct:SM::Flow::P 
  body: For example,
- !ruby/struct:SM::Flow::VERB 
  body: "  cgi.a(&quot;http://www.example.com&quot;) { &quot;Example&quot; }\n    # =&gt; &quot;&lt;A HREF=\\&quot;http://www.example.com\\&quot;&gt;Example&lt;/A&gt;&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: Modules Http3, Http4, etc., contain more basic HTML-generation methods (:title, :center, etc.).
- !ruby/struct:SM::Flow::P 
  body: See class CGI for a detailed example.
constants: []

full_name: CGI::HtmlExtension
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: a
- !ruby/object:RI::MethodSummary 
  name: base
- !ruby/object:RI::MethodSummary 
  name: blockquote
- !ruby/object:RI::MethodSummary 
  name: caption
- !ruby/object:RI::MethodSummary 
  name: checkbox
- !ruby/object:RI::MethodSummary 
  name: checkbox_group
- !ruby/object:RI::MethodSummary 
  name: file_field
- !ruby/object:RI::MethodSummary 
  name: form
- !ruby/object:RI::MethodSummary 
  name: hidden
- !ruby/object:RI::MethodSummary 
  name: html
- !ruby/object:RI::MethodSummary 
  name: image_button
- !ruby/object:RI::MethodSummary 
  name: img
- !ruby/object:RI::MethodSummary 
  name: multipart_form
- !ruby/object:RI::MethodSummary 
  name: password_field
- !ruby/object:RI::MethodSummary 
  name: popup_menu
- !ruby/object:RI::MethodSummary 
  name: radio_button
- !ruby/object:RI::MethodSummary 
  name: radio_group
- !ruby/object:RI::MethodSummary 
  name: reset
- !ruby/object:RI::MethodSummary 
  name: scrolling_list
- !ruby/object:RI::MethodSummary 
  name: submit
- !ruby/object:RI::MethodSummary 
  name: text_field
- !ruby/object:RI::MethodSummary 
  name: textarea
name: HtmlExtension
superclass: 
ri/1.8/system/CGI/HtmlExtension/hidden-i.yaml000064400000002007150403620620014555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Hidden Input element as a string.
- !ruby/struct:SM::Flow::P 
  body: The attributes of the element can be specified as two arguments, <tt>name</tt> and <tt>value</tt>.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  hidden(&quot;name&quot;)\n    # &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;name&quot;&gt;\n\n  hidden(&quot;name&quot;, &quot;value&quot;)\n    # &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot;&gt;\n\n  hidden(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;VALUE&quot; =&gt; &quot;reset&quot;, &quot;ID&quot; =&gt; &quot;foo&quot;)\n    # &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; ID=&quot;foo&quot;&gt;\n"
full_name: CGI::HtmlExtension#hidden
is_singleton: false
name: hidden
params: (name = "", value = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/checkbox-i.yaml000064400000002150150403620620015107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Checkbox Input element as a string.
- !ruby/struct:SM::Flow::P 
  body: The attributes of the element can be specified as three arguments, <tt>name</tt>, <tt>value</tt>, and <tt>checked</tt>. <tt>checked</tt> is a boolean value; if true, the CHECKED attribute will be included in the element.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  checkbox(&quot;name&quot;)\n    # = checkbox(&quot;NAME&quot; =&gt; &quot;name&quot;)\n\n  checkbox(&quot;name&quot;, &quot;value&quot;)\n    # = checkbox(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;VALUE&quot; =&gt; &quot;value&quot;)\n\n  checkbox(&quot;name&quot;, &quot;value&quot;, true)\n    # = checkbox(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;VALUE&quot; =&gt; &quot;value&quot;, &quot;CHECKED&quot; =&gt; true)\n"
full_name: CGI::HtmlExtension#checkbox
is_singleton: false
name: checkbox
params: (name = "", value = nil, checked = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/checkbox_group-i.yaml000064400000005453150403620620016334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a sequence of checkbox elements, as a String.
- !ruby/struct:SM::Flow::P 
  body: The checkboxes will all have the same <tt>name</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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).
- !ruby/struct:SM::Flow::VERB 
  body: "  checkbox_group(&quot;name&quot;, &quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;)\n    # &lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;name&quot; VALUE=&quot;foo&quot;&gt;foo\n    # &lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;name&quot; VALUE=&quot;bar&quot;&gt;bar\n    # &lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;name&quot; VALUE=&quot;baz&quot;&gt;baz\n\n  checkbox_group(&quot;name&quot;, [&quot;foo&quot;], [&quot;bar&quot;, true], &quot;baz&quot;)\n    # &lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;name&quot; VALUE=&quot;foo&quot;&gt;foo\n    # &lt;INPUT TYPE=&quot;checkbox&quot; CHECKED NAME=&quot;name&quot; VALUE=&quot;bar&quot;&gt;bar\n    # &lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;name&quot; VALUE=&quot;baz&quot;&gt;baz\n\n  checkbox_group(&quot;name&quot;, [&quot;1&quot;, &quot;Foo&quot;], [&quot;2&quot;, &quot;Bar&quot;, true], &quot;Baz&quot;)\n    # &lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;name&quot; VALUE=&quot;1&quot;&gt;Foo\n    # &lt;INPUT TYPE=&quot;checkbox&quot; CHECKED NAME=&quot;name&quot; VALUE=&quot;2&quot;&gt;Bar\n    # &lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;name&quot; VALUE=&quot;Baz&quot;&gt;Baz\n\n  checkbox_group(&quot;NAME&quot; =&gt; &quot;name&quot;,\n                   &quot;VALUES&quot; =&gt; [&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;])\n\n  checkbox_group(&quot;NAME&quot; =&gt; &quot;name&quot;,\n                   &quot;VALUES&quot; =&gt; [[&quot;foo&quot;], [&quot;bar&quot;, true], &quot;baz&quot;])\n\n  checkbox_group(&quot;NAME&quot; =&gt; &quot;name&quot;,\n                   &quot;VALUES&quot; =&gt; [[&quot;1&quot;, &quot;Foo&quot;], [&quot;2&quot;, &quot;Bar&quot;, true], &quot;Baz&quot;])\n"
full_name: CGI::HtmlExtension#checkbox_group
is_singleton: false
name: checkbox_group
params: (name = "", *values)
visibility: public
ri/1.8/system/CGI/HtmlExtension/file_field-i.yaml000064400000002532150403620620015407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate an File Upload Input element as a string.
- !ruby/struct:SM::Flow::P 
  body: The attributes of the element can be specified as three arguments, <tt>name</tt>, <tt>size</tt>, and <tt>maxlength</tt>. <tt>maxlength</tt> is the maximum length of the file's <em>name</em>, not of the file's <em>contents</em>.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::P 
  body: "See #multipart_form() for forms that include file uploads."
- !ruby/struct:SM::Flow::VERB 
  body: "  file_field(&quot;name&quot;)\n    # &lt;INPUT TYPE=&quot;file&quot; NAME=&quot;name&quot; SIZE=&quot;20&quot;&gt;\n\n  file_field(&quot;name&quot;, 40)\n    # &lt;INPUT TYPE=&quot;file&quot; NAME=&quot;name&quot; SIZE=&quot;40&quot;&gt;\n\n  file_field(&quot;name&quot;, 40, 100)\n    # &lt;INPUT TYPE=&quot;file&quot; NAME=&quot;name&quot; SIZE=&quot;40&quot; MAXLENGTH=&quot;100&quot;&gt;\n\n  file_field(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;SIZE&quot; =&gt; 40)\n    # &lt;INPUT TYPE=&quot;file&quot; NAME=&quot;name&quot; SIZE=&quot;40&quot;&gt;\n"
full_name: CGI::HtmlExtension#file_field
is_singleton: false
name: file_field
params: (name = "", size = 20, maxlength = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/radio_group-i.yaml000064400000004152150403620620015637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a sequence of radio button Input elements, as a String.
- !ruby/struct:SM::Flow::P 
  body: "This works the same as #checkbox_group(). However, it is not valid to have more than one radiobutton in a group checked."
- !ruby/struct:SM::Flow::VERB 
  body: "  radio_group(&quot;name&quot;, &quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;)\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;foo&quot;&gt;foo\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;bar&quot;&gt;bar\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;baz&quot;&gt;baz\n\n  radio_group(&quot;name&quot;, [&quot;foo&quot;], [&quot;bar&quot;, true], &quot;baz&quot;)\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;foo&quot;&gt;foo\n    # &lt;INPUT TYPE=&quot;radio&quot; CHECKED NAME=&quot;name&quot; VALUE=&quot;bar&quot;&gt;bar\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;baz&quot;&gt;baz\n\n  radio_group(&quot;name&quot;, [&quot;1&quot;, &quot;Foo&quot;], [&quot;2&quot;, &quot;Bar&quot;, true], &quot;Baz&quot;)\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;1&quot;&gt;Foo\n    # &lt;INPUT TYPE=&quot;radio&quot; CHECKED NAME=&quot;name&quot; VALUE=&quot;2&quot;&gt;Bar\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;Baz&quot;&gt;Baz\n\n  radio_group(&quot;NAME&quot; =&gt; &quot;name&quot;,\n                &quot;VALUES&quot; =&gt; [&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;])\n\n  radio_group(&quot;NAME&quot; =&gt; &quot;name&quot;,\n                &quot;VALUES&quot; =&gt; [[&quot;foo&quot;], [&quot;bar&quot;, true], &quot;baz&quot;])\n\n  radio_group(&quot;NAME&quot; =&gt; &quot;name&quot;,\n                &quot;VALUES&quot; =&gt; [[&quot;1&quot;, &quot;Foo&quot;], [&quot;2&quot;, &quot;Bar&quot;, true], &quot;Baz&quot;])\n"
full_name: CGI::HtmlExtension#radio_group
is_singleton: false
name: radio_group
params: (name = "", *values)
visibility: public
ri/1.8/system/CGI/HtmlExtension/textarea-i.yaml000064400000001750150403620620015143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a TextArea element, as a String.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> is the name of the textarea. <tt>cols</tt> is the number of columns and <tt>rows</tt> is the number of rows in the display.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::P 
  body: The body is provided by the passed-in no-argument block
- !ruby/struct:SM::Flow::VERB 
  body: "  textarea(&quot;name&quot;)\n     # = textarea(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;COLS&quot; =&gt; 70, &quot;ROWS&quot; =&gt; 10)\n\n  textarea(&quot;name&quot;, 40, 5)\n     # = textarea(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;COLS&quot; =&gt; 40, &quot;ROWS&quot; =&gt; 5)\n"
full_name: CGI::HtmlExtension#textarea
is_singleton: false
name: textarea
params: (name = "", cols = 70, rows = 10) {|| ...}
visibility: public
ri/1.8/system/CGI/HtmlExtension/radio_button-i.yaml000064400000002246150403620620016020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generates a radio-button Input element.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> is the name of the input field. <tt>value</tt> is the value of the field if checked. <tt>checked</tt> specifies whether the field starts off checked.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  radio_button(&quot;name&quot;, &quot;value&quot;)\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot;&gt;\n\n  radio_button(&quot;name&quot;, &quot;value&quot;, true)\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; CHECKED&gt;\n\n  radio_button(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;VALUE&quot; =&gt; &quot;value&quot;, &quot;ID&quot; =&gt; &quot;foo&quot;)\n    # &lt;INPUT TYPE=&quot;radio&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; ID=&quot;foo&quot;&gt;\n"
full_name: CGI::HtmlExtension#radio_button
is_singleton: false
name: radio_button
params: (name = "", value = nil, checked = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/form-i.yaml000064400000003054150403620630014271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Form element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>method</tt> should be either &quot;get&quot; or &quot;post&quot;, and defaults to the latter. <tt>action</tt> defaults to the current CGI script name. <tt>enctype</tt> defaults to &quot;application/x-www-form-urlencoded&quot;.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::P 
  body: "See also #multipart_form() for forms that include file uploads."
- !ruby/struct:SM::Flow::VERB 
  body: "  form{ &quot;string&quot; }\n    # &lt;FORM METHOD=&quot;post&quot; ENCTYPE=&quot;application/x-www-form-urlencoded&quot;&gt;string&lt;/FORM&gt;\n\n  form(&quot;get&quot;) { &quot;string&quot; }\n    # &lt;FORM METHOD=&quot;get&quot; ENCTYPE=&quot;application/x-www-form-urlencoded&quot;&gt;string&lt;/FORM&gt;\n\n  form(&quot;get&quot;, &quot;url&quot;) { &quot;string&quot; }\n    # &lt;FORM METHOD=&quot;get&quot; ACTION=&quot;url&quot; ENCTYPE=&quot;application/x-www-form-urlencoded&quot;&gt;string&lt;/FORM&gt;\n\n  form(&quot;METHOD&quot; =&gt; &quot;post&quot;, &quot;ENCTYPE&quot; =&gt; &quot;enctype&quot;) { &quot;string&quot; }\n    # &lt;FORM METHOD=&quot;post&quot; ENCTYPE=&quot;enctype&quot;&gt;string&lt;/FORM&gt;\n"
full_name: CGI::HtmlExtension#form
is_singleton: false
name: form
params: (method = "post", action = script_name, enctype = "application/x-www-form-urlencoded") {|| ...}
visibility: public
ri/1.8/system/CGI/HtmlExtension/blockquote-i.yaml000064400000001541150403620630015475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a BlockQuote element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>cite</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: The body is provided by the passed-in no-argument block
- !ruby/struct:SM::Flow::VERB 
  body: "  blockquote(&quot;http://www.example.com/quotes/foo.html&quot;) { &quot;Foo!&quot; }\n    #=&gt; &quot;&lt;BLOCKQUOTE CITE=\\&quot;http://www.example.com/quotes/foo.html\\&quot;&gt;Foo!&lt;/BLOCKQUOTE&gt;\n"
full_name: CGI::HtmlExtension#blockquote
is_singleton: false
name: blockquote
params: (cite = nil) {|| ...}
visibility: public
ri/1.8/system/CGI/HtmlExtension/scrolling_list-i.yaml000064400000000420150403620630016347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #popup_menu"
full_name: CGI::HtmlExtension#scrolling_list
is_singleton: false
name: scrolling_list
params: (name = "", *values)
visibility: public
ri/1.8/system/CGI/HtmlExtension/submit-i.yaml000064400000002100150403620630014620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a submit button Input element, as a String.
- !ruby/struct:SM::Flow::P 
  body: <tt>value</tt> is the text to display on the button. <tt>name</tt> is the name of the input.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  submit\n    # &lt;INPUT TYPE=&quot;submit&quot;&gt;\n\n  submit(&quot;ok&quot;)\n    # &lt;INPUT TYPE=&quot;submit&quot; VALUE=&quot;ok&quot;&gt;\n\n  submit(&quot;ok&quot;, &quot;button1&quot;)\n    # &lt;INPUT TYPE=&quot;submit&quot; VALUE=&quot;ok&quot; NAME=&quot;button1&quot;&gt;\n\n  submit(&quot;VALUE&quot; =&gt; &quot;ok&quot;, &quot;NAME&quot; =&gt; &quot;button1&quot;, &quot;ID&quot; =&gt; &quot;foo&quot;)\n    # &lt;INPUT TYPE=&quot;submit&quot; VALUE=&quot;ok&quot; NAME=&quot;button1&quot; ID=&quot;foo&quot;&gt;\n"
full_name: CGI::HtmlExtension#submit
is_singleton: false
name: submit
params: (value = nil, name = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/popup_menu-i.yaml000064400000005441150403620630015517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: scrolling_list
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Select element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> is the name of the element. The <tt>values</tt> 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).
- !ruby/struct:SM::Flow::P 
  body: 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 &quot;VALUES&quot;.
- !ruby/struct:SM::Flow::VERB 
  body: "  popup_menu(&quot;name&quot;, &quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;)\n    # &lt;SELECT NAME=&quot;name&quot;&gt;\n    #   &lt;OPTION VALUE=&quot;foo&quot;&gt;foo&lt;/OPTION&gt;\n    #   &lt;OPTION VALUE=&quot;bar&quot;&gt;bar&lt;/OPTION&gt;\n    #   &lt;OPTION VALUE=&quot;baz&quot;&gt;baz&lt;/OPTION&gt;\n    # &lt;/SELECT&gt;\n\n  popup_menu(&quot;name&quot;, [&quot;foo&quot;], [&quot;bar&quot;, true], &quot;baz&quot;)\n    # &lt;SELECT NAME=&quot;name&quot;&gt;\n    #   &lt;OPTION VALUE=&quot;foo&quot;&gt;foo&lt;/OPTION&gt;\n    #   &lt;OPTION VALUE=&quot;bar&quot; SELECTED&gt;bar&lt;/OPTION&gt;\n    #   &lt;OPTION VALUE=&quot;baz&quot;&gt;baz&lt;/OPTION&gt;\n    # &lt;/SELECT&gt;\n\n  popup_menu(&quot;name&quot;, [&quot;1&quot;, &quot;Foo&quot;], [&quot;2&quot;, &quot;Bar&quot;, true], &quot;Baz&quot;)\n    # &lt;SELECT NAME=&quot;name&quot;&gt;\n    #   &lt;OPTION VALUE=&quot;1&quot;&gt;Foo&lt;/OPTION&gt;\n    #   &lt;OPTION SELECTED VALUE=&quot;2&quot;&gt;Bar&lt;/OPTION&gt;\n    #   &lt;OPTION VALUE=&quot;Baz&quot;&gt;Baz&lt;/OPTION&gt;\n    # &lt;/SELECT&gt;\n\n  popup_menu(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;SIZE&quot; =&gt; 2, &quot;MULTIPLE&quot; =&gt; true,\n              &quot;VALUES&quot; =&gt; [[&quot;1&quot;, &quot;Foo&quot;], [&quot;2&quot;, &quot;Bar&quot;, true], &quot;Baz&quot;])\n    # &lt;SELECT NAME=&quot;name&quot; MULTIPLE SIZE=&quot;2&quot;&gt;\n    #   &lt;OPTION VALUE=&quot;1&quot;&gt;Foo&lt;/OPTION&gt;\n    #   &lt;OPTION SELECTED VALUE=&quot;2&quot;&gt;Bar&lt;/OPTION&gt;\n    #   &lt;OPTION VALUE=&quot;Baz&quot;&gt;Baz&lt;/OPTION&gt;\n    # &lt;/SELECT&gt;\n"
full_name: CGI::HtmlExtension#popup_menu
is_singleton: false
name: popup_menu
params: (name = "", *values)
visibility: public
ri/1.8/system/CGI/HtmlExtension/base-i.yaml000064400000001276150403620630014244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Document Base URI element as a String.
- !ruby/struct:SM::Flow::P 
  body: <tt>href</tt> can either by a string, giving the base URL for the HREF attribute, or it can be a has of the element's attributes.
- !ruby/struct:SM::Flow::P 
  body: The passed-in no-argument block is ignored.
- !ruby/struct:SM::Flow::VERB 
  body: "  base(&quot;http://www.example.com/cgi&quot;)\n    # =&gt; &quot;&lt;BASE HREF=\\&quot;http://www.example.com/cgi\\&quot;&gt;&quot;\n"
full_name: CGI::HtmlExtension#base
is_singleton: false
name: base
params: (href = "") {|| ...}
visibility: public
ri/1.8/system/CGI/HtmlExtension/multipart_form-i.yaml000064400000002070150403620640016370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Form element with multipart encoding as a String.
- !ruby/struct:SM::Flow::P 
  body: Multipart encoding is used for forms that include file uploads.
- !ruby/struct:SM::Flow::P 
  body: <tt>action</tt> is the action to perform. <tt>enctype</tt> is the encoding type, which defaults to &quot;multipart/form-data&quot;.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  multipart_form{ &quot;string&quot; }\n    # &lt;FORM METHOD=&quot;post&quot; ENCTYPE=&quot;multipart/form-data&quot;&gt;string&lt;/FORM&gt;\n\n  multipart_form(&quot;url&quot;) { &quot;string&quot; }\n    # &lt;FORM METHOD=&quot;post&quot; ACTION=&quot;url&quot; ENCTYPE=&quot;multipart/form-data&quot;&gt;string&lt;/FORM&gt;\n"
full_name: CGI::HtmlExtension#multipart_form
is_singleton: false
name: multipart_form
params: (action = nil, enctype = "multipart/form-data") {|| ...}
visibility: public
ri/1.8/system/CGI/HtmlExtension/a-i.yaml000064400000001755150403620640013555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate an Anchor element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>href</tt> can either be a string, giving the URL for the HREF attribute, or it can be a hash of the element's attributes.
- !ruby/struct:SM::Flow::P 
  body: The body of the element is the string returned by the no-argument block passed in.
- !ruby/struct:SM::Flow::VERB 
  body: "  a(&quot;http://www.example.com&quot;) { &quot;Example&quot; }\n    # =&gt; &quot;&lt;A HREF=\\&quot;http://www.example.com\\&quot;&gt;Example&lt;/A&gt;&quot;\n\n  a(&quot;HREF&quot; =&gt; &quot;http://www.example.com&quot;, &quot;TARGET&quot; =&gt; &quot;_top&quot;) { &quot;Example&quot; }\n    # =&gt; &quot;&lt;A HREF=\\&quot;http://www.example.com\\&quot; TARGET=\\&quot;_top\\&quot;&gt;Example&lt;/A&gt;&quot;\n"
full_name: CGI::HtmlExtension#a
is_singleton: false
name: a
params: (href = "") {|| ...}
visibility: public
ri/1.8/system/CGI/HtmlExtension/reset-i.yaml000064400000001655150403620640014456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a reset button Input element, as a String.
- !ruby/struct:SM::Flow::P 
  body: This resets the values on a form to their initial values. <tt>value</tt> is the text displayed on the button. <tt>name</tt> is the name of this button.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  reset\n    # &lt;INPUT TYPE=&quot;reset&quot;&gt;\n\n  reset(&quot;reset&quot;)\n    # &lt;INPUT TYPE=&quot;reset&quot; VALUE=&quot;reset&quot;&gt;\n\n  reset(&quot;VALUE&quot; =&gt; &quot;reset&quot;, &quot;ID&quot; =&gt; &quot;foo&quot;)\n    # &lt;INPUT TYPE=&quot;reset&quot; VALUE=&quot;reset&quot; ID=&quot;foo&quot;&gt;\n"
full_name: CGI::HtmlExtension#reset
is_singleton: false
name: reset
params: (value = nil, name = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/caption-i.yaml000064400000001437150403620640014767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Table Caption element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>align</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: The body of the element is provided by the passed-in no-argument block.
- !ruby/struct:SM::Flow::VERB 
  body: "  caption(&quot;left&quot;) { &quot;Capital Cities&quot; }\n    # =&gt; &lt;CAPTION ALIGN=\\&quot;left\\&quot;&gt;Capital Cities&lt;/CAPTION&gt;\n"
full_name: CGI::HtmlExtension#caption
is_singleton: false
name: caption
params: (align = nil) {|| ...}
visibility: public
ri/1.8/system/CGI/HtmlExtension/password_field-i.yaml000064400000002570150403620640016336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a Password Input element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> is the name of the input field. <tt>value</tt> is its default value. <tt>size</tt> is the size of the input field display. <tt>maxlength</tt> is the maximum length of the inputted password.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  password_field(&quot;name&quot;)\n    # &lt;INPUT TYPE=&quot;password&quot; NAME=&quot;name&quot; SIZE=&quot;40&quot;&gt;\n\n  password_field(&quot;name&quot;, &quot;value&quot;)\n    # &lt;INPUT TYPE=&quot;password&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; SIZE=&quot;40&quot;&gt;\n\n  password_field(&quot;password&quot;, &quot;value&quot;, 80, 200)\n    # &lt;INPUT TYPE=&quot;password&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot; SIZE=&quot;80&quot; MAXLENGTH=&quot;200&quot;&gt;\n\n  password_field(&quot;NAME&quot; =&gt; &quot;name&quot;, &quot;VALUE&quot; =&gt; &quot;value&quot;)\n    # &lt;INPUT TYPE=&quot;password&quot; NAME=&quot;name&quot; VALUE=&quot;value&quot;&gt;\n"
full_name: CGI::HtmlExtension#password_field
is_singleton: false
name: password_field
params: (name = "", value = nil, size = 40, maxlength = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/img-i.yaml000064400000002010150403620650014073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate an Image element as a string.
- !ruby/struct:SM::Flow::P 
  body: <tt>src</tt> is the URL of the image. <tt>alt</tt> is the alternative text for the image. <tt>width</tt> is the width of the image, and <tt>height</tt> is its height.
- !ruby/struct:SM::Flow::P 
  body: Alternatively, the attributes can be specified as a hash.
- !ruby/struct:SM::Flow::VERB 
  body: "  img(&quot;src&quot;, &quot;alt&quot;, 100, 50)\n    # &lt;IMG SRC=&quot;src&quot; ALT=&quot;alt&quot; WIDTH=&quot;100&quot; HEIGHT=&quot;50&quot;&gt;\n\n  img(&quot;SRC&quot; =&gt; &quot;src&quot;, &quot;ALT&quot; =&gt; &quot;alt&quot;, &quot;WIDTH&quot; =&gt; 100, &quot;HEIGHT&quot; =&gt; 50)\n    # &lt;IMG SRC=&quot;src&quot; ALT=&quot;alt&quot; WIDTH=&quot;100&quot; HEIGHT=&quot;50&quot;&gt;\n"
full_name: CGI::HtmlExtension#img
is_singleton: false
name: img
params: (src = "", alt = "", width = nil, height = nil)
visibility: public
ri/1.8/system/CGI/HtmlExtension/html-i.yaml000064400000004425150403620650014277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a top-level HTML element as a string.
- !ruby/struct:SM::Flow::P 
  body: The attributes of the element are specified as a hash. The pseudo-attribute &quot;PRETTY&quot; can be used to specify that the generated HTML string should be indented. &quot;PRETTY&quot; can also be specified as a string as the sole argument to this method. The pseudo-attribute &quot;DOCTYPE&quot;, if given, is used as the leading DOCTYPE SGML tag; it should include the entire text of this tag, including angle brackets.
- !ruby/struct:SM::Flow::P 
  body: The body of the html element is supplied as a block.
- !ruby/struct:SM::Flow::VERB 
  body: "  html{ &quot;string&quot; }\n    # &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2 Final//EN&quot;&gt;&lt;HTML&gt;string&lt;/HTML&gt;\n\n  html(&quot;LANG&quot; =&gt; &quot;ja&quot;) { &quot;string&quot; }\n    # &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2 Final//EN&quot;&gt;&lt;HTML LANG=&quot;ja&quot;&gt;string&lt;/HTML&gt;\n\n  html(&quot;DOCTYPE&quot; =&gt; false) { &quot;string&quot; }\n    # &lt;HTML&gt;string&lt;/HTML&gt;\n\n  html(&quot;DOCTYPE&quot; =&gt; '&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;') { &quot;string&quot; }\n    # &lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;&lt;HTML&gt;string&lt;/HTML&gt;\n\n  html(&quot;PRETTY&quot; =&gt; &quot;  &quot;) { &quot;&lt;BODY&gt;&lt;/BODY&gt;&quot; }\n    # &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2 Final//EN&quot;&gt;\n    # &lt;HTML&gt;\n    #   &lt;BODY&gt;\n    #   &lt;/BODY&gt;\n    # &lt;/HTML&gt;\n\n  html(&quot;PRETTY&quot; =&gt; &quot;\\t&quot;) { &quot;&lt;BODY&gt;&lt;/BODY&gt;&quot; }\n    # &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2 Final//EN&quot;&gt;\n    # &lt;HTML&gt;\n    #         &lt;BODY&gt;\n    #         &lt;/BODY&gt;\n    # &lt;/HTML&gt;\n\n  html(&quot;PRETTY&quot;) { &quot;&lt;BODY&gt;&lt;/BODY&gt;&quot; }\n    # = html(&quot;PRETTY&quot; =&gt; &quot;  &quot;) { &quot;&lt;BODY&gt;&lt;/BODY&gt;&quot; }\n\n  html(if $VERBOSE then &quot;PRETTY&quot; end) { &quot;HTML string&quot; }\n"
full_name: CGI::HtmlExtension#html
is_singleton: false
name: html
params: (attributes = {}) {|| ...}
visibility: public
ri/1.8/system/CGI/print-c.yaml000064400000000406150403620650011653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: .to_s
comment: 
- !ruby/struct:SM::Flow::P 
  body: print HTTP header and string to $&gt;
full_name: CGI::print
is_singleton: true
name: print
params: (*options) {|.to_s| ...}
visibility: public
ri/1.8/system/CGI/stdoutput-i.yaml000064400000000252150403620650012577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CGI#stdoutput
is_singleton: false
name: stdoutput
params: ()
visibility: private
ri/1.8/system/CGI/env_table-i.yaml000064400000000252150403620650012463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CGI#env_table
is_singleton: false
name: env_table
params: ()
visibility: private
ri/1.8/system/CGI/escapeHTML-c.yaml000064400000000714150403620650012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escape special characters in HTML, namely &amp;\&quot;&lt;&gt;
- !ruby/struct:SM::Flow::VERB 
  body: "  CGI::escapeHTML('Usage: foo &quot;bar&quot; &lt;baz&gt;')\n     # =&gt; &quot;Usage: foo &amp;quot;bar&amp;quot; &amp;lt;baz&amp;gt;&quot;\n"
full_name: CGI::escapeHTML
is_singleton: true
name: escapeHTML
params: (string)
visibility: public
ri/1.8/system/CGI/stdinput-i.yaml000064400000000250150403620650012374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CGI#stdinput
is_singleton: false
name: stdinput
params: ()
visibility: private
ri/1.8/system/CGI/pretty-c.yaml000064400000001467150403620660012057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Prettify (indent) an HTML string.
- !ruby/struct:SM::Flow::P 
  body: <tt>string</tt> is the HTML string to indent. <tt>shift</tt> is the indentation unit to use; it defaults to two spaces.
- !ruby/struct:SM::Flow::VERB 
  body: "  print CGI::pretty(&quot;&lt;HTML&gt;&lt;BODY&gt;&lt;/BODY&gt;&lt;/HTML&gt;&quot;)\n    # &lt;HTML&gt;\n    #   &lt;BODY&gt;\n    #   &lt;/BODY&gt;\n    # &lt;/HTML&gt;\n\n  print CGI::pretty(&quot;&lt;HTML&gt;&lt;BODY&gt;&lt;/BODY&gt;&lt;/HTML&gt;&quot;, &quot;\\t&quot;)\n    # &lt;HTML&gt;\n    #         &lt;BODY&gt;\n    #         &lt;/BODY&gt;\n    # &lt;/HTML&gt;\n"
full_name: CGI::pretty
is_singleton: true
name: pretty
params: (string, shift = " ")
visibility: public
ri/1.8/system/Continuation/%5b%5d-i.yaml000064400000001332150403620660013446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the continuation. The program continues from the end of the <tt>callcc</tt> block. If no arguments are given, the original <tt>callcc</tt> returns <tt>nil</tt>. If one argument is given, <tt>callcc</tt> returns it. Otherwise, an array containing <em>args</em> is returned.
- !ruby/struct:SM::Flow::VERB 
  body: "   callcc {|cont|  cont.call }           #=&gt; nil\n   callcc {|cont|  cont.call 1 }         #=&gt; 1\n   callcc {|cont|  cont.call 1, 2, 3 }   #=&gt; [1, 2, 3]\n"
full_name: Continuation#[]
is_singleton: false
name: "[]"
params: |
  cont.call(args, ...) 
  cont[args, ...]

visibility: public
ri/1.8/system/Continuation/call-i.yaml000064400000001334150403620660013512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the continuation. The program continues from the end of the <tt>callcc</tt> block. If no arguments are given, the original <tt>callcc</tt> returns <tt>nil</tt>. If one argument is given, <tt>callcc</tt> returns it. Otherwise, an array containing <em>args</em> is returned.
- !ruby/struct:SM::Flow::VERB 
  body: "   callcc {|cont|  cont.call }           #=&gt; nil\n   callcc {|cont|  cont.call 1 }         #=&gt; 1\n   callcc {|cont|  cont.call 1, 2, 3 }   #=&gt; [1, 2, 3]\n"
full_name: Continuation#call
is_singleton: false
name: call
params: |
  cont.call(args, ...) 
  cont[args, ...]

visibility: public
ri/1.8/system/Continuation/cdesc-Continuation.yaml000064400000003251150403620660016102 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Continuation objects are generated by <tt>Kernel#callcc</tt>. They hold a return address and execution context, allowing a nonlocal return to the end of the <tt>callcc</tt> block from anywhere within a program. Continuations are somewhat analogous to a structured version of C's <tt>setjmp/longjmp</tt> (although they contain more state, so you might consider them closer to threads).
- !ruby/struct:SM::Flow::P 
  body: "For instance:"
- !ruby/struct:SM::Flow::VERB 
  body: "   arr = [ &quot;Freddie&quot;, &quot;Herbie&quot;, &quot;Ron&quot;, &quot;Max&quot;, &quot;Ringo&quot; ]\n   callcc{|$cc|}\n   puts(message = arr.shift)\n   $cc.call unless message =~ /Max/\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Freddie\n   Herbie\n   Ron\n   Max\n"
- !ruby/struct:SM::Flow::P 
  body: "This (somewhat contrived) example allows the inner loop to abandon processing early:"
- !ruby/struct:SM::Flow::VERB 
  body: "   callcc {|cont|\n     for i in 0..4\n       print &quot;\\n#{i}: &quot;\n       for j in i*5...(i+1)*5\n         cont.call() if j == 17\n         printf &quot;%3d&quot;, j\n       end\n     end\n   }\n   print &quot;\\n&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   0:   0  1  2  3  4\n   1:   5  6  7  8  9\n   2:  10 11 12 13 14\n   3:  15 16\n"
constants: []

full_name: Continuation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: call
name: Continuation
superclass: Object
ri/1.8/system/WeakRef/weakref_alive%3f-i.yaml000064400000000473150403620660014556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the referenced object still exists, and false if it has been garbage collected.
full_name: WeakRef#weakref_alive?
is_singleton: false
name: weakref_alive?
params: ()
visibility: public
ri/1.8/system/WeakRef/RefError/cdesc-RefError.yaml000064400000000464150403620660015561 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: RefError is raised if an object cannot be referenced by a WeakRef.
constants: []

full_name: WeakRef::RefError
includes: []

instance_methods: []

name: RefError
superclass: StandardError
ri/1.8/system/WeakRef/cdesc-WeakRef.yaml000064400000002160150403620660013624 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: WeakRef is a class to represent a reference to an object that is not seen by the tracing phase of the garbage collector. This allows the referenced object to be garbage collected as if nothing is referring to it. Because WeakRef delegates method calls to the referenced object, it may be used in place of that object, i.e. it is of the same duck type.
- !ruby/struct:SM::Flow::P 
  body: "Usage:"
- !ruby/struct:SM::Flow::VERB 
  body: "  foo = Object.new\n  foo = Object.new\n  p foo.to_s                  # original's class\n  foo = WeakRef.new(foo)\n  p foo.to_s                  # should be same class\n  ObjectSpace.garbage_collect\n  p foo.to_s                  # should raise exception (recycled)\n"
constants: []

full_name: WeakRef
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __getobj__
- !ruby/object:RI::MethodSummary 
  name: __setobj__
- !ruby/object:RI::MethodSummary 
  name: weakref_alive?
name: WeakRef
superclass: Delegator
ri/1.8/system/WeakRef/__getobj__-i.yaml000064400000000617150403620660013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the object this WeakRef references. Raises RefError if the object has been garbage collected. The object returned is the object to which method calls are delegated (see Delegator).
full_name: WeakRef#__getobj__
is_singleton: false
name: __getobj__
params: ()
visibility: public
ri/1.8/system/WeakRef/new-c.yaml000064400000000362150403620660012234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new WeakRef from <tt>orig</tt>.
full_name: WeakRef::new
is_singleton: true
name: new
params: (orig)
visibility: public
ri/1.8/system/WeakRef/__setobj__-i.yaml000064400000000262150403620660013532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WeakRef#__setobj__
is_singleton: false
name: __setobj__
params: (obj)
visibility: public
ri/1.8/system/WEBrick/CGI/cdesc-CGI.yaml000064400000001115150403620660013245 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: config
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: logger
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CGIError
  value: Class.new(StandardError)
full_name: WEBrick::CGI
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: service
- !ruby/object:RI::MethodSummary 
  name: start
name: CGI
superclass: Object
ri/1.8/system/WEBrick/CGI/%5b%5d-i.yaml000064400000000251150403620660012663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/WEBrick/CGI/service-i.yaml000064400000000266150403620660013460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI#service
is_singleton: false
name: service
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/CGI/new-c.yaml000064400000000253150403620660012577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/WEBrick/CGI/start-i.yaml000064400000000317150403620660013152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI#start
is_singleton: false
name: start
params: (env=ENV, stdin=$stdin, stdout=$stdout)
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/cert-i.yaml000064400000000260150403620660014177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#cert
is_singleton: false
name: cert
params: ()
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/each-i.yaml000064400000000303150403620660014140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (line)
comment: 
full_name: WEBrick::CGI::Socket#each
is_singleton: false
name: each
params: () {|line| ...}
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/read-i.yaml000064400000000270150403620670014157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#read
is_singleton: false
name: read
params: (size=nil)
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/peer_cert-i.yaml000064400000000272150403620670015216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#peer_cert
is_singleton: false
name: peer_cert
params: ()
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/cipher-i.yaml000064400000000264150403620670014521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#cipher
is_singleton: false
name: cipher
params: ()
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/add_header-i.yaml000064400000000315150403620670015304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#add_header
is_singleton: false
name: add_header
params: (envname, hdrname)
visibility: private
ri/1.8/system/WEBrick/CGI/Socket/peer_cert_chain-i.yaml000064400000000306150403620670016356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#peer_cert_chain
is_singleton: false
name: peer_cert_chain
params: ()
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/new-c.yaml000064400000000310150403620670014022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket::new
is_singleton: true
name: new
params: (config, env, stdin, stdout)
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/peeraddr-i.yaml000064400000000270150403620670015032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#peeraddr
is_singleton: false
name: peeraddr
params: ()
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/cdesc-Socket.yaml000064400000001741150403620670015331 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::CGI::Socket
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: add_header
- !ruby/object:RI::MethodSummary 
  name: addr
- !ruby/object:RI::MethodSummary 
  name: cert
- !ruby/object:RI::MethodSummary 
  name: cipher
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: input
- !ruby/object:RI::MethodSummary 
  name: peer_cert
- !ruby/object:RI::MethodSummary 
  name: peer_cert_chain
- !ruby/object:RI::MethodSummary 
  name: peeraddr
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: request_line
- !ruby/object:RI::MethodSummary 
  name: setup_header
name: Socket
superclass: Object
ri/1.8/system/WEBrick/CGI/Socket/addr-i.yaml000064400000000260150403620670014155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#addr
is_singleton: false
name: addr
params: ()
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/gets-i.yaml000064400000000266150403620670014213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#gets
is_singleton: false
name: gets
params: (eol=LF)
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/%3c%3c-i.yaml000064400000000262150403620700014104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#<<
is_singleton: false
name: "<<"
params: (data)
visibility: public
ri/1.8/system/WEBrick/CGI/Socket/input-i.yaml000064400000000263150403620700014377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#input
is_singleton: false
name: input
params: ()
visibility: private
ri/1.8/system/WEBrick/CGI/Socket/setup_header-i.yaml000064400000000301150403620700015701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#setup_header
is_singleton: false
name: setup_header
params: ()
visibility: private
ri/1.8/system/WEBrick/CGI/Socket/request_line-i.yaml000064400000000301150403620700015730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::CGI::Socket#request_line
is_singleton: false
name: request_line
params: ()
visibility: private
ri/1.8/system/WEBrick/HTTPUtils/unescape_form-i.yaml000064400000000303150403620700016027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#unescape_form
is_singleton: false
name: unescape_form
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/cdesc-HTTPUtils.yaml000064400000010025150403620710015635 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: []

  name: DefaultMimeTypes
  value: "{       \"ai\"    => \"application/postscript\",       \"asc\"   => \"text/plain\",       \"avi\"   => \"video/x-msvideo\",       \"bin\"   => \"application/octet-stream\",       \"bmp\"   => \"image/bmp\",       \"class\" => \"application/octet-stream\",       \"cer\"   => \"application/pkix-cert\",       \"crl\"   => \"application/pkix-crl\",       \"crt\"   => \"application/x-x509-ca-cert\",      #\"crl\"   => \"application/x-pkcs7-crl\",       \"css\"   => \"text/css\",       \"dms\"   => \"application/octet-stream\",       \"doc\"   => \"application/msword\",       \"dvi\"   => \"application/x-dvi\",       \"eps\"   => \"application/postscript\",       \"etx\"   => \"text/x-setext\",       \"exe\"   => \"application/octet-stream\",       \"gif\"   => \"image/gif\",       \"htm\"   => \"text/html\",       \"html\"  => \"text/html\",       \"jpe\"   => \"image/jpeg\",       \"jpeg\"  => \"image/jpeg\",       \"jpg\"   => \"image/jpeg\",       \"lha\"   => \"application/octet-stream\",       \"lzh\"   => \"application/octet-stream\",       \"mov\"   => \"video/quicktime\",       \"mpe\"   => \"video/mpeg\",       \"mpeg\"  => \"video/mpeg\",       \"mpg\"   => \"video/mpeg\",       \"pbm\"   => \"image/x-portable-bitmap\",       \"pdf\"   => \"application/pdf\",       \"pgm\"   => \"image/x-portable-graymap\",       \"png\"   => \"image/png\",       \"pnm\"   => \"image/x-portable-anymap\",       \"ppm\"   => \"image/x-portable-pixmap\",       \"ppt\"   => \"application/vnd.ms-powerpoint\",       \"ps\"    => \"application/postscript\",       \"qt\"    => \"video/quicktime\",       \"ras\"   => \"image/x-cmu-raster\",       \"rb\"    => \"text/plain\",       \"rd\"    => \"text/plain\",       \"rtf\"   => \"application/rtf\",       \"sgm\"   => \"text/sgml\",       \"sgml\"  => \"text/sgml\",       \"tif\"   => \"image/tiff\",       \"tiff\"  => \"image/tiff\",       \"txt\"   => \"text/plain\",       \"xbm\"   => \"image/x-xbitmap\",       \"xls\"   => \"application/vnd.ms-excel\",       \"xml\"   => \"text/xml\",       \"xpm\"   => \"image/x-xpixmap\",       \"xwd\"   => \"image/x-xwindowdump\",       \"zip\"   => \"application/zip\",     }"
- !ruby/object:RI::Constant 
  comment: 
  name: UNESCAPED
  value: _make_regex(control+space+delims+unwise+nonascii)
- !ruby/object:RI::Constant 
  comment: 
  name: UNESCAPED_FORM
  value: _make_regex(reserved+control+delims+unwise+nonascii)
- !ruby/object:RI::Constant 
  comment: 
  name: NONASCII
  value: _make_regex(nonascii)
- !ruby/object:RI::Constant 
  comment: 
  name: ESCAPED
  value: /%([0-9a-fA-F]{2})/
- !ruby/object:RI::Constant 
  comment: 
  name: UNESCAPED_PCHAR
  value: _make_regex!(unreserved+":@&=+$,")
full_name: WEBrick::HTTPUtils
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _escape
- !ruby/object:RI::MethodSummary 
  name: _make_regex
- !ruby/object:RI::MethodSummary 
  name: _make_regex!
- !ruby/object:RI::MethodSummary 
  name: _unescape
- !ruby/object:RI::MethodSummary 
  name: dequote
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: escape8bit
- !ruby/object:RI::MethodSummary 
  name: escape_form
- !ruby/object:RI::MethodSummary 
  name: escape_path
- !ruby/object:RI::MethodSummary 
  name: load_mime_types
- !ruby/object:RI::MethodSummary 
  name: mime_type
- !ruby/object:RI::MethodSummary 
  name: normalize_path
- !ruby/object:RI::MethodSummary 
  name: parse_form_data
- !ruby/object:RI::MethodSummary 
  name: parse_header
- !ruby/object:RI::MethodSummary 
  name: parse_query
- !ruby/object:RI::MethodSummary 
  name: parse_qvalues
- !ruby/object:RI::MethodSummary 
  name: parse_range_header
- !ruby/object:RI::MethodSummary 
  name: quote
- !ruby/object:RI::MethodSummary 
  name: split_header_value
- !ruby/object:RI::MethodSummary 
  name: unescape
- !ruby/object:RI::MethodSummary 
  name: unescape_form
name: HTTPUtils
superclass: 
ri/1.8/system/WEBrick/HTTPUtils/_make_regex-i.yaml000064400000000277150403620710015462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#_make_regex
is_singleton: false
name: _make_regex
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/_unescape-i.yaml000064400000000302150403620710015143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#_unescape
is_singleton: false
name: _unescape
params: (str, regex)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/%5b%5d-i.yaml000064400000000272150403620710015555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils::FormData#[]
is_singleton: false
name: "[]"
params: (*key)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/each_data-i.yaml000064400000000323150403620710016572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (tmp)
comment: 
full_name: WEBrick::HTTPUtils::FormData#each_data
is_singleton: false
name: each_data
params: () {|tmp| ...}
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/to_ary-i.yaml000064400000000362150403620710016201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #list"
full_name: WEBrick::HTTPUtils::FormData#to_ary
is_singleton: false
name: to_ary
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/new-c.yaml000064400000000273150403620710015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils::FormData::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/%3c%3c-i.yaml000064400000000271150403620720015551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils::FormData#<<
is_singleton: false
name: "<<"
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/to_s-i.yaml000064400000000270150403620720015647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils::FormData#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/list-i.yaml000064400000000342150403620720015656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: to_ary
block_params: 
comment: 
full_name: WEBrick::HTTPUtils::FormData#list
is_singleton: false
name: list
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/append_data-i.yaml000064400000000312150403620720017140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils::FormData#append_data
is_singleton: false
name: append_data
params: (data)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/FormData/cdesc-FormData.yaml000064400000001675150403620720017243 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: filename
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: next_data
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: []

constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: EmptyRawHeader
  value: "[].freeze"
- !ruby/object:RI::Constant 
  comment: 
  name: EmptyHeader
  value: "{}.freeze"
full_name: WEBrick::HTTPUtils::FormData
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: append_data
- !ruby/object:RI::MethodSummary 
  name: each_data
- !ruby/object:RI::MethodSummary 
  name: list
- !ruby/object:RI::MethodSummary 
  name: to_ary
- !ruby/object:RI::MethodSummary 
  name: to_s
name: FormData
superclass: String
ri/1.8/system/WEBrick/HTTPUtils/_make_regex%21-i.yaml000064400000000301150403620720015657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#_make_regex!
is_singleton: false
name: _make_regex!
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/mime_type-i.yaml000064400000000312150403620720015173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#mime_type
is_singleton: false
name: mime_type
params: (filename, mime_tab)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/dequote-i.yaml000064400000000272150403620720014656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: WEBrick::HTTPUtils#dequote
is_singleton: false
name: dequote
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/parse_form_data-i.yaml000064400000000320150403620720016330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#parse_form_data
is_singleton: false
name: parse_form_data
params: (io, boundary)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/normalize_path-i.yaml000064400000000306150403620730016223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#normalize_path
is_singleton: false
name: normalize_path
params: (path)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/escape_path-i.yaml000064400000000277150403620730015472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#escape_path
is_singleton: false
name: escape_path
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/escape8bit-i.yaml000064400000000275150403620730015243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#escape8bit
is_singleton: false
name: escape8bit
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/unescape-i.yaml000064400000000271150403620730015013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#unescape
is_singleton: false
name: unescape
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/escape_form-i.yaml000064400000000277150403620730015501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#escape_form
is_singleton: false
name: escape_form
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/escape-i.yaml000064400000000265150403620730014453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#escape
is_singleton: false
name: escape
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/parse_header-i.yaml000064400000000304150403620730015627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: WEBrick::HTTPUtils#parse_header
is_singleton: false
name: parse_header
params: (raw)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/split_header_value-i.yaml000064400000000315150403620740017047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#split_header_value
is_singleton: false
name: split_header_value
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/quote-i.yaml000064400000000263150403620740014347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#quote
is_singleton: false
name: quote
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/load_mime_types-i.yaml000064400000000424150403620740016363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Load Apache compatible mime.types file.
full_name: WEBrick::HTTPUtils#load_mime_types
is_singleton: false
name: load_mime_types
params: (file)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/parse_range_header-i.yaml000064400000000332150403620740017005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#parse_range_header
is_singleton: false
name: parse_range_header
params: (ranges_specifier)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/parse_query-i.yaml000064400000000277150403620740015556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#parse_query
is_singleton: false
name: parse_query
params: (str)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/parse_qvalues-i.yaml000064400000000305150403620740016061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#parse_qvalues
is_singleton: false
name: parse_qvalues
params: (value)
visibility: public
ri/1.8/system/WEBrick/HTTPUtils/_escape-i.yaml000064400000000276150403620740014615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPUtils#_escape
is_singleton: false
name: _escape
params: (str, regex)
visibility: public
ri/1.8/system/WEBrick/cdesc-WEBrick.yaml000064400000001642150403620740013533 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: accesslog.rb -- Access log handling utilities
- !ruby/struct:SM::Flow::P 
  body: "Author: IPR -- Internet Programming with Ruby -- writers Copyright (c) 2002 keita yamaguchi Copyright (c) 2002 Internet Programming with Ruby writers"
- !ruby/struct:SM::Flow::P 
  body: "$IPR: accesslog.rb,v 1.1 2002/10/01 17:16:32 gotoyuzo Exp $"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NullReader
  value: Object.new
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION
  value: "\"1.3.1\""
- !ruby/object:RI::Constant 
  comment: 
  name: CR
  value: "\"\\x0d\""
- !ruby/object:RI::Constant 
  comment: 
  name: LF
  value: "\"\\x0a\""
- !ruby/object:RI::Constant 
  comment: 
  name: CRLF
  value: "\"\\x0d\\x0a\""
full_name: WEBrick
includes: []

instance_methods: []

name: WEBrick
superclass: 
ri/1.8/system/WEBrick/SimpleServer/start-c.yaml000064400000000276150403620740015165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: WEBrick::SimpleServer::start
is_singleton: true
name: start
params: () {|| ...}
visibility: public
ri/1.8/system/WEBrick/SimpleServer/cdesc-SimpleServer.yaml000064400000000373150403620740017305 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: start
comment: 
constants: []

full_name: WEBrick::SimpleServer
includes: []

instance_methods: []

name: SimpleServer
superclass: Object
ri/1.8/system/WEBrick/HTMLUtils/escape-i.yaml000064400000000270150403620750014436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTMLUtils#escape
is_singleton: false
name: escape
params: (string)
visibility: public
ri/1.8/system/WEBrick/HTMLUtils/cdesc-HTMLUtils.yaml000064400000000360150403620750015614 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTMLUtils
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: escape
name: HTMLUtils
superclass: 
ri/1.8/system/WEBrick/Log/log-i.yaml000064400000000261150403620750012713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Log#log
is_singleton: false
name: log
params: (level, data)
visibility: public
ri/1.8/system/WEBrick/Log/new-c.yaml000064400000000275150403620750012722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Log::new
is_singleton: true
name: new
params: (log_file=nil, level=nil)
visibility: public
ri/1.8/system/WEBrick/Log/cdesc-Log.yaml000064400000000610150403620750013502 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: time_format
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::Log
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: debug
- !ruby/object:RI::MethodSummary 
  name: log
name: Log
superclass: BasicLog
ri/1.8/system/WEBrick/Log/debug-i.yaml000064400000000276150403620750013226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: WEBrick::Log#debug
is_singleton: false
name: debug
params: (msg = nil) {|| ...}
visibility: public
ri/1.8/system/WEBrick/BasicLog/info-i.yaml000064400000000260150403620750014026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#info
is_singleton: false
name: info
params: (msg)
visibility: public
ri/1.8/system/WEBrick/BasicLog/info%3f-i.yaml000064400000000257150403620750014332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#info?
is_singleton: false
name: info?
params: ()
visibility: public
ri/1.8/system/WEBrick/BasicLog/error-i.yaml000064400000000262150403620750014226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#error
is_singleton: false
name: error
params: (msg)
visibility: public
ri/1.8/system/WEBrick/BasicLog/fatal%3f-i.yaml000064400000000261150403620750014461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#fatal?
is_singleton: false
name: fatal?
params: ()
visibility: public
ri/1.8/system/WEBrick/BasicLog/fatal-i.yaml000064400000000262150403620750014164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#fatal
is_singleton: false
name: fatal
params: (msg)
visibility: public
ri/1.8/system/WEBrick/BasicLog/log-i.yaml000064400000000266150403620750013662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#log
is_singleton: false
name: log
params: (level, data)
visibility: public
ri/1.8/system/WEBrick/BasicLog/new-c.yaml000064400000000302150403620750013653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog::new
is_singleton: true
name: new
params: (log_file=nil, level=nil)
visibility: public
ri/1.8/system/WEBrick/BasicLog/format-i.yaml000064400000000265150403620750014370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#format
is_singleton: false
name: format
params: (arg)
visibility: private
ri/1.8/system/WEBrick/BasicLog/%3c%3c-i.yaml000064400000000256150403620750013745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#<<
is_singleton: false
name: "<<"
params: (obj)
visibility: public
ri/1.8/system/WEBrick/BasicLog/close-i.yaml000064400000000257150403620760014207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/WEBrick/BasicLog/debug%3f-i.yaml000064400000000261150403620760014461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#debug?
is_singleton: false
name: debug?
params: ()
visibility: public
ri/1.8/system/WEBrick/BasicLog/cdesc-BasicLog.yaml000064400000002026150403620760015412 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: level
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEBUG
  value: 1, 2, 3, 4, 5
full_name: WEBrick::BasicLog
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: debug
- !ruby/object:RI::MethodSummary 
  name: debug?
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: error?
- !ruby/object:RI::MethodSummary 
  name: fatal
- !ruby/object:RI::MethodSummary 
  name: fatal?
- !ruby/object:RI::MethodSummary 
  name: format
- !ruby/object:RI::MethodSummary 
  name: info
- !ruby/object:RI::MethodSummary 
  name: info?
- !ruby/object:RI::MethodSummary 
  name: log
- !ruby/object:RI::MethodSummary 
  name: warn
- !ruby/object:RI::MethodSummary 
  name: warn?
name: BasicLog
superclass: Object
ri/1.8/system/WEBrick/BasicLog/error%3f-i.yaml000064400000000261150403620760014524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#error?
is_singleton: false
name: error?
params: ()
visibility: public
ri/1.8/system/WEBrick/BasicLog/warn%3f-i.yaml000064400000000257150403620760014347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#warn?
is_singleton: false
name: warn?
params: ()
visibility: public
ri/1.8/system/WEBrick/BasicLog/debug-i.yaml000064400000000262150403620760014164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#debug
is_singleton: false
name: debug
params: (msg)
visibility: public
ri/1.8/system/WEBrick/BasicLog/warn-i.yaml000064400000000260150403620760014043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::BasicLog#warn
is_singleton: false
name: warn
params: (msg)
visibility: public
ri/1.8/system/WEBrick/Utils/getservername-i.yaml000064400000000274150403620760015365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Utils#getservername
is_singleton: false
name: getservername
params: ()
visibility: public
ri/1.8/system/WEBrick/Utils/random_string-i.yaml000064400000000277150403620760015367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Utils#random_string
is_singleton: false
name: random_string
params: (len)
visibility: public
ri/1.8/system/WEBrick/Utils/set_non_blocking-i.yaml000064400000000304150403620770016026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Utils#set_non_blocking
is_singleton: false
name: set_non_blocking
params: (io)
visibility: public
ri/1.8/system/WEBrick/Utils/cdesc-Utils.yaml000064400000001377150403620770014455 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RAND_CHARS
  value: "\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" +                  \"0123456789\" +                  \"abcdefghijklmnopqrstuvwxyz\""
full_name: WEBrick::Utils
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_listeners
- !ruby/object:RI::MethodSummary 
  name: create_self_signed_cert
- !ruby/object:RI::MethodSummary 
  name: getservername
- !ruby/object:RI::MethodSummary 
  name: random_string
- !ruby/object:RI::MethodSummary 
  name: set_close_on_exec
- !ruby/object:RI::MethodSummary 
  name: set_non_blocking
- !ruby/object:RI::MethodSummary 
  name: su
name: Utils
superclass: 
ri/1.8/system/WEBrick/Utils/create_listeners-i.yaml000064400000000333150403620770016046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Utils#create_listeners
is_singleton: false
name: create_listeners
params: (address, port, logger=nil)
visibility: public
ri/1.8/system/WEBrick/Utils/create_self_signed_cert-i.yaml000064400000000341150403620770017334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Utils#create_self_signed_cert
is_singleton: false
name: create_self_signed_cert
params: (bits, cn, comment)
visibility: public
ri/1.8/system/WEBrick/Utils/su-i.yaml000064400000000252150403620770013142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Utils#su
is_singleton: false
name: su
params: (user)
visibility: public
ri/1.8/system/WEBrick/Utils/set_close_on_exec-i.yaml000064400000000306150403620770016173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Utils#set_close_on_exec
is_singleton: false
name: set_close_on_exec
params: (io)
visibility: public
ri/1.8/system/WEBrick/Cookie/expires%3d-i.yaml000064400000000264150403620770014602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Cookie#expires=
is_singleton: false
name: expires=
params: (t)
visibility: public
ri/1.8/system/WEBrick/Cookie/parse_set_cookies-c.yaml000064400000000310150403620770016312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Cookie::parse_set_cookies
is_singleton: true
name: parse_set_cookies
params: (str)
visibility: public
ri/1.8/system/WEBrick/Cookie/cdesc-Cookie.yaml000064400000002057150403620770014673 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: comment
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: domain
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: max_age
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: path
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: secure
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: version
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: parse_set_cookie
- !ruby/object:RI::MethodSummary 
  name: parse_set_cookies
comment: 
constants: []

full_name: WEBrick::Cookie
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: expires
- !ruby/object:RI::MethodSummary 
  name: expires=
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Cookie
superclass: Object
ri/1.8/system/WEBrick/Cookie/parse-c.yaml000064400000000502150403620770013726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Cookie::parse()
- !ruby/struct:SM::Flow::VERB 
  body: "  It parses Cookie field sent from the user agent.\n"
full_name: WEBrick::Cookie::parse
is_singleton: true
name: parse
params: (str)
visibility: public
ri/1.8/system/WEBrick/Cookie/new-c.yaml000064400000000404150403620770013406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: attr_accessor :comment_url, :discard, :port
full_name: WEBrick::Cookie::new
is_singleton: true
name: new
params: (name, value)
visibility: public
ri/1.8/system/WEBrick/Cookie/expires-i.yaml000064400000000261150403620770014303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Cookie#expires
is_singleton: false
name: expires
params: ()
visibility: public
ri/1.8/system/WEBrick/Cookie/to_s-i.yaml000064400000000253150403620770013571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Cookie#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/WEBrick/Cookie/parse_set_cookie-c.yaml000064400000000306150403620770016134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::Cookie::parse_set_cookie
is_singleton: true
name: parse_set_cookie
params: (str)
visibility: public
ri/1.8/system/WEBrick/AccessLog/AccessLogError/cdesc-AccessLogError.yaml000064400000000344150403621000021626 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::AccessLog::AccessLogError
includes: []

instance_methods: []

name: AccessLogError
superclass: StandardError
ri/1.8/system/WEBrick/AccessLog/cdesc-AccessLog.yaml000064400000001706150403621000015742 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CLF_TIME_FORMAT
  value: "\"[%d/%b/%Y:%H:%M:%S %Z]\""
- !ruby/object:RI::Constant 
  comment: 
  name: COMMON_LOG_FORMAT
  value: "\"%h %l %u %t \\\"%r\\\" %s %b\""
- !ruby/object:RI::Constant 
  comment: 
  name: CLF
  value: COMMON_LOG_FORMAT
- !ruby/object:RI::Constant 
  comment: 
  name: REFERER_LOG_FORMAT
  value: "\"%{Referer}i -> %U\""
- !ruby/object:RI::Constant 
  comment: 
  name: AGENT_LOG_FORMAT
  value: "\"%{User-Agent}i\""
- !ruby/object:RI::Constant 
  comment: 
  name: COMBINED_LOG_FORMAT
  value: "\"#{CLF} \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\"\""
full_name: WEBrick::AccessLog
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: format
- !ruby/object:RI::MethodSummary 
  name: setup_params
name: AccessLog
superclass: 
ri/1.8/system/WEBrick/AccessLog/escape-i.yaml000064400000000266150403621000014506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::AccessLog#escape
is_singleton: false
name: escape
params: (data)
visibility: public
ri/1.8/system/WEBrick/AccessLog/format-i.yaml000064400000000307150403621010014533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::AccessLog#format
is_singleton: false
name: format
params: (format_string, params)
visibility: public
ri/1.8/system/WEBrick/AccessLog/setup_params-i.yaml000064400000000637150403621010015754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This format specification is a subset of mod_log_config of Apache.
- !ruby/struct:SM::Flow::VERB 
  body: "  http://httpd.apache.org/docs/mod/mod_log_config.html#formats\n"
full_name: WEBrick::AccessLog#setup_params
is_singleton: false
name: setup_params
params: (config, req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/chunked%3d-i.yaml000064400000000274150403621010015616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#chunked=
is_singleton: false
name: chunked=
params: (val)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/status_line-i.yaml000064400000000277150403621010016236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#status_line
is_singleton: false
name: status_line
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/%5b%5d-i.yaml000064400000000264150403621020014552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#[]
is_singleton: false
name: "[]"
params: (field)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/each-i.yaml000064400000000304150403621020014574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (k, v)
comment: 
full_name: WEBrick::HTTPResponse#each
is_singleton: false
name: each
params: () {|k, v| ...}
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/_write_data-i.yaml000064400000000314150403621020016157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#_write_data
is_singleton: false
name: _write_data
params: (socket, data)
visibility: private
ri/1.8/system/WEBrick/HTTPResponse/set_redirect-i.yaml000064400000000314150403621020016351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#set_redirect
is_singleton: false
name: set_redirect
params: (status, url)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/content_length%3d-i.yaml000064400000000312150403621030017203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#content_length=
is_singleton: false
name: content_length=
params: (len)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/content_type%3d-i.yaml000064400000000307150403621030016707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#content_type=
is_singleton: false
name: content_type=
params: (type)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/set_error-i.yaml000064400000000316150403621030015704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#set_error
is_singleton: false
name: set_error
params: (ex, backtrace=false)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/content_type-i.yaml000064400000000301150403621030016405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#content_type
is_singleton: false
name: content_type
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/new-c.yaml000064400000000265150403621030014466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse::new
is_singleton: true
name: new
params: (config)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/_send_file-i.yaml000064400000000331150403621040015765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#_send_file
is_singleton: false
name: _send_file
params: (output, input, offset, size)
visibility: private
ri/1.8/system/WEBrick/HTTPResponse/content_length-i.yaml000064400000000305150403621040016712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#content_length
is_singleton: false
name: content_length
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/send_response-i.yaml000064400000000311150403621040016543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#send_response
is_singleton: false
name: send_response
params: (socket)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/send_body-i.yaml000064400000000301150403621050015642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#send_body
is_singleton: false
name: send_body
params: (socket)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/status%3d-i.yaml000064400000000275150403621050015525 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#status=
is_singleton: false
name: status=
params: (status)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/send_body_string-i.yaml000064400000000320150403621050017231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#send_body_string
is_singleton: false
name: send_body_string
params: (socket)
visibility: private
ri/1.8/system/WEBrick/HTTPResponse/to_s-i.yaml000064400000000261150403621060014646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/send_header-i.yaml000064400000000305150403621060016142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#send_header
is_singleton: false
name: send_header
params: (socket)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/keep_alive%3f-i.yaml000064400000000277150403621060016313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#keep_alive?
is_singleton: false
name: keep_alive?
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/cdesc-HTTPResponse.yaml000064400000004601150403621060017033 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: body
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: config
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: cookies
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: filename
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: header
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: http_version
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: keep_alive
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: reason_phrase
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: request_http_version
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: request_method
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: request_uri
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: sent_size
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: status
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BUFSIZE
  value: 1024*4
full_name: WEBrick::HTTPResponse
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: _send_file
- !ruby/object:RI::MethodSummary 
  name: _write_data
- !ruby/object:RI::MethodSummary 
  name: chunked=
- !ruby/object:RI::MethodSummary 
  name: chunked?
- !ruby/object:RI::MethodSummary 
  name: content_length
- !ruby/object:RI::MethodSummary 
  name: content_length=
- !ruby/object:RI::MethodSummary 
  name: content_type
- !ruby/object:RI::MethodSummary 
  name: content_type=
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: keep_alive?
- !ruby/object:RI::MethodSummary 
  name: send_body
- !ruby/object:RI::MethodSummary 
  name: send_body_io
- !ruby/object:RI::MethodSummary 
  name: send_body_string
- !ruby/object:RI::MethodSummary 
  name: send_header
- !ruby/object:RI::MethodSummary 
  name: send_response
- !ruby/object:RI::MethodSummary 
  name: set_error
- !ruby/object:RI::MethodSummary 
  name: set_redirect
- !ruby/object:RI::MethodSummary 
  name: setup_header
- !ruby/object:RI::MethodSummary 
  name: status=
- !ruby/object:RI::MethodSummary 
  name: status_line
- !ruby/object:RI::MethodSummary 
  name: to_s
name: HTTPResponse
superclass: Object
ri/1.8/system/WEBrick/HTTPResponse/setup_header-i.yaml000064400000000301150403621060016345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#setup_header
is_singleton: false
name: setup_header
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/send_body_io-i.yaml000064400000000310150403621060016332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#send_body_io
is_singleton: false
name: send_body_io
params: (socket)
visibility: private
ri/1.8/system/WEBrick/HTTPResponse/%5b%5d%3d-i.yaml000064400000000275150403621070015055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#[]=
is_singleton: false
name: "[]="
params: (field, value)
visibility: public
ri/1.8/system/WEBrick/HTTPResponse/chunked%3f-i.yaml000064400000000271150403621070015623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPResponse#chunked?
is_singleton: false
name: chunked?
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPServerError/cdesc-HTTPServerError.yaml000064400000000331150403621100020166 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPServerError
includes: []

instance_methods: []

name: HTTPServerError
superclass: ServerError
ri/1.8/system/WEBrick/GenericServer/%5b%5d-i.yaml000064400000000263150403621100015015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/WEBrick/GenericServer/ssl_context-i.yaml000064400000000300150403621110016502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#ssl_context
is_singleton: false
name: ssl_context
params: ()
visibility: public
ri/1.8/system/WEBrick/GenericServer/shutdown-i.yaml000064400000000272150403621110016020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#shutdown
is_singleton: false
name: shutdown
params: ()
visibility: public
ri/1.8/system/WEBrick/GenericServer/stop-i.yaml000064400000000262150403621110015131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#stop
is_singleton: false
name: stop
params: ()
visibility: public
ri/1.8/system/WEBrick/GenericServer/start_thread-i.yaml000064400000000317150403621110016631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#start_thread
is_singleton: false
name: start_thread
params: (sock, &block)
visibility: private
ri/1.8/system/WEBrick/GenericServer/setup_ssl_context-i.yaml000064400000000322150403621120017727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#setup_ssl_context
is_singleton: false
name: setup_ssl_context
params: (config)
visibility: public
ri/1.8/system/WEBrick/GenericServer/new-c.yaml000064400000000322150403621120014725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer::new
is_singleton: true
name: new
params: (config={}, default=Config::General)
visibility: public
ri/1.8/system/WEBrick/GenericServer/cdesc-GenericServer.yaml000064400000002247150403621120017546 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: config
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: listeners
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: logger
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: status
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: tokens
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::GenericServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: accept_client
- !ruby/object:RI::MethodSummary 
  name: call_callback
- !ruby/object:RI::MethodSummary 
  name: listen
- !ruby/object:RI::MethodSummary 
  name: listen
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: setup_ssl_context
- !ruby/object:RI::MethodSummary 
  name: shutdown
- !ruby/object:RI::MethodSummary 
  name: ssl_context
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: start_thread
- !ruby/object:RI::MethodSummary 
  name: stop
name: GenericServer
superclass: Object
ri/1.8/system/WEBrick/GenericServer/start-i.yaml000064400000000272150403621130015304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#start
is_singleton: false
name: start
params: (&block)
visibility: public
ri/1.8/system/WEBrick/GenericServer/call_callback-i.yaml000064400000000331150403621130016672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#call_callback
is_singleton: false
name: call_callback
params: (callback_name, *args)
visibility: private
ri/1.8/system/WEBrick/GenericServer/listen-i.yaml000064400000000303150403621140015441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#listen
is_singleton: false
name: listen
params: (address, port)
visibility: public
ri/1.8/system/WEBrick/GenericServer/run-i.yaml000064400000000264150403621140014755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#run
is_singleton: false
name: run
params: (sock)
visibility: public
ri/1.8/system/WEBrick/GenericServer/accept_client-i.yaml000064400000000310150403621150016737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::GenericServer#accept_client
is_singleton: false
name: accept_client
params: (svr)
visibility: private
ri/1.8/system/WEBrick/HTTPServer/umount-i.yaml000064400000000357150403621150014707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #unmount"
full_name: WEBrick::HTTPServer#umount
is_singleton: false
name: umount
params: (dir)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/lookup_server-i.yaml000064400000000304150403621160016250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#lookup_server
is_singleton: false
name: lookup_server
params: (req)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/mount-i.yaml000064400000000307150403621160014516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#mount
is_singleton: false
name: mount
params: (dir, servlet, *options)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/do_OPTIONS-i.yaml000064400000000303150403621160015165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#do_OPTIONS
is_singleton: false
name: do_OPTIONS
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/service-i.yaml000064400000000275150403621170015021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#service
is_singleton: false
name: service
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/mount_proc-i.yaml000064400000000320150403621170015535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#mount_proc
is_singleton: false
name: mount_proc
params: (dir, proc=nil, &block)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/new-c.yaml000064400000000314150403621170014136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::new
is_singleton: true
name: new
params: (config={}, default=Config::HTTP)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/search_servlet-i.yaml000064400000000307150403621200016360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#search_servlet
is_singleton: false
name: search_servlet
params: (path)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/MountTable/%5b%5d-i.yaml000064400000000274150403621210016276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::MountTable#[]
is_singleton: false
name: "[]"
params: (dir)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/MountTable/compile-i.yaml000064400000000302150403621210017045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::MountTable#compile
is_singleton: false
name: compile
params: ()
visibility: private
ri/1.8/system/WEBrick/HTTPServer/MountTable/delete-i.yaml000064400000000302150403621210016657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::MountTable#delete
is_singleton: false
name: delete
params: (dir)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/MountTable/normalize-i.yaml000064400000000311150403621210017415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::MountTable#normalize
is_singleton: false
name: normalize
params: (dir)
visibility: private
ri/1.8/system/WEBrick/HTTPServer/MountTable/scan-i.yaml000064400000000277150403621210016354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::MountTable#scan
is_singleton: false
name: scan
params: (path)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/MountTable/new-c.yaml000064400000000271150403621210016205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::MountTable::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPServer/MountTable/cdesc-MountTable.yaml000064400000001043150403621220020324 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPServer::MountTable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: compile
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: normalize
- !ruby/object:RI::MethodSummary 
  name: scan
name: MountTable
superclass: Object
ri/1.8/system/WEBrick/HTTPServer/MountTable/%5b%5d%3d-i.yaml000064400000000303150403621220016564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer::MountTable#[]=
is_singleton: false
name: "[]="
params: (dir, val)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/unmount-i.yaml000064400000000342150403621220015055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: umount
block_params: 
comment: 
full_name: WEBrick::HTTPServer#unmount
is_singleton: false
name: unmount
params: (dir)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/access_log-i.yaml000064400000000313150403621220015450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#access_log
is_singleton: false
name: access_log
params: (config, req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/run-i.yaml000064400000000261150403621220014154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#run
is_singleton: false
name: run
params: (sock)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/virtual_host-i.yaml000064400000000305150403621220016072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServer#virtual_host
is_singleton: false
name: virtual_host
params: (server)
visibility: public
ri/1.8/system/WEBrick/HTTPServer/cdesc-HTTPServer.yaml000064400000001500150403621220016144 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: access_log
- !ruby/object:RI::MethodSummary 
  name: do_OPTIONS
- !ruby/object:RI::MethodSummary 
  name: lookup_server
- !ruby/object:RI::MethodSummary 
  name: mount
- !ruby/object:RI::MethodSummary 
  name: mount_proc
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: search_servlet
- !ruby/object:RI::MethodSummary 
  name: service
- !ruby/object:RI::MethodSummary 
  name: umount
- !ruby/object:RI::MethodSummary 
  name: unmount
- !ruby/object:RI::MethodSummary 
  name: virtual_host
name: HTTPServer
superclass: "::WEBrick::GenericServer"
ri/1.8/system/WEBrick/HTTPVersion/%3c%3d%3e-i.yaml000064400000000263150403621220014674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPVersion#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/WEBrick/HTTPVersion/convert-c.yaml000064400000000275150403621230015207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPVersion::convert
is_singleton: true
name: convert
params: (version)
visibility: public
ri/1.8/system/WEBrick/HTTPVersion/cdesc-HTTPVersion.yaml000064400000001065150403621230016511 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: major
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: minor
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: convert
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPVersion
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: to_s
name: HTTPVersion
superclass: Object
ri/1.8/system/WEBrick/HTTPVersion/new-c.yaml000064400000000265150403621230014317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPVersion::new
is_singleton: true
name: new
params: (version)
visibility: public
ri/1.8/system/WEBrick/HTTPVersion/to_s-i.yaml000064400000000260150403621230014473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPVersion#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/flush-i.yaml000064400000000303150403621230015675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htdigest#flush
is_singleton: false
name: flush
params: (output=nil)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/each-i.yaml000064400000000364150403621240015464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ([user, realm, hash[user]])
comment: 
full_name: WEBrick::HTTPAuth::Htdigest#each
is_singleton: false
name: each
params: () {|[user, realm, hash[user]]| ...}
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/reload-i.yaml000064400000000273150403621240016031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htdigest#reload
is_singleton: false
name: reload
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/get_passwd-i.yaml000064400000000331150403621240016716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htdigest#get_passwd
is_singleton: false
name: get_passwd
params: (realm, user, reload_db)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/cdesc-Htdigest.yaml000064400000001131150403621250017162 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPAuth::Htdigest
includes: 
- !ruby/object:RI::IncludedModule 
  name: UserDB
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: delete_passwd
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: get_passwd
- !ruby/object:RI::MethodSummary 
  name: reload
- !ruby/object:RI::MethodSummary 
  name: set_passwd
name: Htdigest
superclass: Object
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/new-c.yaml000064400000000271150403621250015345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htdigest::new
is_singleton: true
name: new
params: (path)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/set_passwd-i.yaml000064400000000324150403621250016735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htdigest#set_passwd
is_singleton: false
name: set_passwd
params: (realm, user, pass)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htdigest/delete_passwd-i.yaml000064400000000324150403621250017404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htdigest#delete_passwd
is_singleton: false
name: delete_passwd
params: (realm, user)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/flush-i.yaml000064400000000303150403621260015722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htpasswd#flush
is_singleton: false
name: flush
params: (output=nil)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/each-i.yaml000064400000000354150403621260015507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ([user, @passwd[user]])
comment: 
full_name: WEBrick::HTTPAuth::Htpasswd#each
is_singleton: false
name: each
params: () {|[user, @passwd[user]]| ...}
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/reload-i.yaml000064400000000273150403621260016055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htpasswd#reload
is_singleton: false
name: reload
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/get_passwd-i.yaml000064400000000331150403621270016743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htpasswd#get_passwd
is_singleton: false
name: get_passwd
params: (realm, user, reload_db)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/new-c.yaml000064400000000271150403621270015371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htpasswd::new
is_singleton: true
name: new
params: (path)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/set_passwd-i.yaml000064400000000324150403621270016761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htpasswd#set_passwd
is_singleton: false
name: set_passwd
params: (realm, user, pass)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/delete_passwd-i.yaml000064400000000324150403621300017422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htpasswd#delete_passwd
is_singleton: false
name: delete_passwd
params: (realm, user)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htpasswd/cdesc-Htpasswd.yaml000064400000001131150403621300017222 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPAuth::Htpasswd
includes: 
- !ruby/object:RI::IncludedModule 
  name: UserDB
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: delete_passwd
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: get_passwd
- !ruby/object:RI::MethodSummary 
  name: reload
- !ruby/object:RI::MethodSummary 
  name: set_passwd
name: Htpasswd
superclass: Object
ri/1.8/system/WEBrick/HTTPAuth/basic_auth-i.yaml000064400000000320150403621300015100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth#basic_auth
is_singleton: false
name: basic_auth
params: (req, res, realm, &block)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/cdesc-HTTPAuth.yaml000064400000000543150403621300015237 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPAuth
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _basic_auth
- !ruby/object:RI::MethodSummary 
  name: basic_auth
- !ruby/object:RI::MethodSummary 
  name: proxy_basic_auth
name: HTTPAuth
superclass: 
ri/1.8/system/WEBrick/HTTPAuth/Htgroup/flush-i.yaml000064400000000302150403621300015547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htgroup#flush
is_singleton: false
name: flush
params: (output=nil)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htgroup/cdesc-Htgroup.yaml000064400000000667150403621300016725 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPAuth::Htgroup
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: members
- !ruby/object:RI::MethodSummary 
  name: reload
name: Htgroup
superclass: Object
ri/1.8/system/WEBrick/HTTPAuth/Htgroup/reload-i.yaml000064400000000272150403621300015702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htgroup#reload
is_singleton: false
name: reload
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htgroup/add-i.yaml000064400000000302150403621300015156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htgroup#add
is_singleton: false
name: add
params: (group, members)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htgroup/new-c.yaml000064400000000270150403621300015215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htgroup::new
is_singleton: true
name: new
params: (path)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/Htgroup/members-i.yaml000064400000000301150403621300016057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Htgroup#members
is_singleton: false
name: members
params: (group)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/_basic_auth-i.yaml000064400000000361150403621300015244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth#_basic_auth
is_singleton: false
name: _basic_auth
params: (req, res, realm, req_field, res_field, err_type, block)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/check_nonce-i.yaml000064400000000325150403621300017303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#check_nonce
is_singleton: false
name: check_nonce
params: (req, auth_req)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/check_opaque-i.yaml000064400000000346150403621300017476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#check_opaque
is_singleton: false
name: check_opaque
params: (opaque_struct, req, auth_req)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/generate_opaque-i.yaml000064400000000323150403621300020206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#generate_opaque
is_singleton: false
name: generate_opaque
params: (req)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/challenge-i.yaml000064400000000330150403621300016762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#challenge
is_singleton: false
name: challenge
params: (req, res, stale=false)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/hexdigest-i.yaml000064400000000311150403621300017023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#hexdigest
is_singleton: false
name: hexdigest
params: (*args)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/make_passwd-c.yaml000064400000000330150403621300017330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth::make_passwd
is_singleton: true
name: make_passwd
params: (realm, user, pass)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/split_param_value-i.yaml000064400000000332150403621300020551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#split_param_value
is_singleton: false
name: split_param_value
params: (string)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/new-c.yaml000064400000000331150403621300015624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth::new
is_singleton: true
name: new
params: (config, default=Config::DigestAuth)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/cdesc-DigestAuth.yaml000064400000002626150403621300017744 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: algorithm
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: qop
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: make_passwd
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AuthScheme
  value: "\"Digest\""
- !ruby/object:RI::Constant 
  comment: 
  name: OpaqueInfo
  value: Struct.new(:time, :nonce, :nc)
- !ruby/object:RI::Constant 
  comment: 
  name: MustParams
  value: "['username','realm','nonce','uri','response']"
- !ruby/object:RI::Constant 
  comment: 
  name: MustParamsAuth
  value: "['cnonce','nc']"
full_name: WEBrick::HTTPAuth::DigestAuth
includes: 
- !ruby/object:RI::IncludedModule 
  name: Authenticator
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _authenticate
- !ruby/object:RI::MethodSummary 
  name: authenticate
- !ruby/object:RI::MethodSummary 
  name: challenge
- !ruby/object:RI::MethodSummary 
  name: check_nonce
- !ruby/object:RI::MethodSummary 
  name: check_opaque
- !ruby/object:RI::MethodSummary 
  name: check_uri
- !ruby/object:RI::MethodSummary 
  name: generate_next_nonce
- !ruby/object:RI::MethodSummary 
  name: generate_opaque
- !ruby/object:RI::MethodSummary 
  name: hexdigest
- !ruby/object:RI::MethodSummary 
  name: split_param_value
name: DigestAuth
superclass: Object
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/generate_next_nonce-i.yaml000064400000000333150403621300021055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#generate_next_nonce
is_singleton: false
name: generate_next_nonce
params: (req)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/authenticate-i.yaml000064400000000321150403621300017516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#authenticate
is_singleton: false
name: authenticate
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/check_uri-i.yaml000064400000000321150403621310016775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#check_uri
is_singleton: false
name: check_uri
params: (req, auth_req)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/DigestAuth/_authenticate-i.yaml000064400000000324150403621310017661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::DigestAuth#_authenticate
is_singleton: false
name: _authenticate
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/proxy_basic_auth-i.yaml000064400000000334150403621310016347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth#proxy_basic_auth
is_singleton: false
name: proxy_basic_auth
params: (req, res, realm, &block)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/ProxyAuthenticator/cdesc-ProxyAuthenticator.yaml000064400000001161150403621310023364 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RequestField
  value: "\"Proxy-Authorization\""
- !ruby/object:RI::Constant 
  comment: 
  name: ResponseField
  value: "\"Proxy-Authenticate\""
- !ruby/object:RI::Constant 
  comment: 
  name: InfoField
  value: "\"Proxy-Authentication-Info\""
- !ruby/object:RI::Constant 
  comment: 
  name: AuthException
  value: HTTPStatus::ProxyAuthenticationRequired
full_name: WEBrick::HTTPAuth::ProxyAuthenticator
includes: []

instance_methods: []

name: ProxyAuthenticator
superclass: 
ri/1.8/system/WEBrick/HTTPAuth/ProxyBasicAuth/cdesc-ProxyBasicAuth.yaml000064400000000432150403621310021446 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPAuth::ProxyBasicAuth
includes: 
- !ruby/object:RI::IncludedModule 
  name: ProxyAuthenticator
instance_methods: []

name: ProxyBasicAuth
superclass: BasicAuth
ri/1.8/system/WEBrick/HTTPAuth/Authenticator/info-i.yaml000064400000000307150403621320016552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Authenticator#info
is_singleton: false
name: info
params: (fmt, *args)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/Authenticator/check_init-i.yaml000064400000000317150403621330017721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Authenticator#check_init
is_singleton: false
name: check_init
params: (config)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/Authenticator/check_scheme-i.yaml000064400000000320150403621330020214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Authenticator#check_scheme
is_singleton: false
name: check_scheme
params: (req)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/Authenticator/error-i.yaml000064400000000311150403621340016745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Authenticator#error
is_singleton: false
name: error
params: (fmt, *args)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/Authenticator/log-i.yaml000064400000000313150403621350016400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::Authenticator#log
is_singleton: false
name: log
params: (meth, fmt, *args)
visibility: private
ri/1.8/system/WEBrick/HTTPAuth/Authenticator/cdesc-Authenticator.yaml000064400000002120150403621350021260 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: logger
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: realm
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: userdb
  rw: R
class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RequestField
  value: "\"Authorization\""
- !ruby/object:RI::Constant 
  comment: 
  name: ResponseField
  value: "\"WWW-Authenticate\""
- !ruby/object:RI::Constant 
  comment: 
  name: ResponseInfoField
  value: "\"Authentication-Info\""
- !ruby/object:RI::Constant 
  comment: 
  name: AuthException
  value: HTTPStatus::Unauthorized
- !ruby/object:RI::Constant 
  comment: 
  name: AuthScheme
  value: nil
full_name: WEBrick::HTTPAuth::Authenticator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_init
- !ruby/object:RI::MethodSummary 
  name: check_scheme
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: info
- !ruby/object:RI::MethodSummary 
  name: log
name: Authenticator
superclass: 
ri/1.8/system/WEBrick/HTTPAuth/ProxyDigestAuth/cdesc-ProxyDigestAuth.yaml000064400000000516150403621360022052 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPAuth::ProxyDigestAuth
includes: 
- !ruby/object:RI::IncludedModule 
  name: ProxyAuthenticator
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_uri
name: ProxyDigestAuth
superclass: DigestAuth
ri/1.8/system/WEBrick/HTTPAuth/ProxyDigestAuth/check_uri-i.yaml000064400000000325150403621360020050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::ProxyDigestAuth#check_uri
is_singleton: false
name: check_uri
params: (req, auth_req)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/BasicAuth/challenge-i.yaml000064400000000312150403621370016573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::BasicAuth#challenge
is_singleton: false
name: challenge
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/BasicAuth/make_passwd-c.yaml000064400000000327150403621370017147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::BasicAuth::make_passwd
is_singleton: true
name: make_passwd
params: (realm, user, pass)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/BasicAuth/new-c.yaml000064400000000327150403621370015442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::BasicAuth::new
is_singleton: true
name: new
params: (config, default=Config::BasicAuth)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/BasicAuth/authenticate-i.yaml000064400000000320150403621400017320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::BasicAuth#authenticate
is_singleton: false
name: authenticate
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/BasicAuth/cdesc-BasicAuth.yaml000064400000001336150403621400017346 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: logger
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: realm
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: userdb
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: make_passwd
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AuthScheme
  value: "\"Basic\""
full_name: WEBrick::HTTPAuth::BasicAuth
includes: 
- !ruby/object:RI::IncludedModule 
  name: Authenticator
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: authenticate
- !ruby/object:RI::MethodSummary 
  name: challenge
name: BasicAuth
superclass: Object
ri/1.8/system/WEBrick/HTTPAuth/UserDB/cdesc-UserDB.yaml000064400000000645150403621400016112 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: auth_type
  rw: RW
class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPAuth::UserDB
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: get_passwd
- !ruby/object:RI::MethodSummary 
  name: make_passwd
- !ruby/object:RI::MethodSummary 
  name: set_passwd
name: UserDB
superclass: 
ri/1.8/system/WEBrick/HTTPAuth/UserDB/get_passwd-i.yaml000064400000000335150403621410016272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::UserDB#get_passwd
is_singleton: false
name: get_passwd
params: (realm, user, reload_db=false)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/UserDB/make_passwd-i.yaml000064400000000324150403621410016426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::UserDB#make_passwd
is_singleton: false
name: make_passwd
params: (realm, user, pass)
visibility: public
ri/1.8/system/WEBrick/HTTPAuth/UserDB/set_passwd-i.yaml000064400000000322150403621410016302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPAuth::UserDB#set_passwd
is_singleton: false
name: set_passwd
params: (realm, user, pass)
visibility: public
ri/1.8/system/WEBrick/ServerError/cdesc-ServerError.yaml000064400000000323150403621420016774 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::ServerError
includes: []

instance_methods: []

name: ServerError
superclass: StandardError
ri/1.8/system/WEBrick/HTTPRequest/cdesc-HTTPRequest.yaml000064400000007650150403621430016527 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: accept
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: accept_charset
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: accept_encoding
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: accept_language
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: addr
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: cipher
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: client_cert
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Header and entity body
  name: cookies
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Header and entity body
  name: header
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Request-URI
  name: host
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: http_version
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: keep_alive
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Request-URI
  name: path
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: path_info
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: peeraddr
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Request-URI
  name: port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: query_string
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Header and entity body
  name: raw_header
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Request line
  name: request_line
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: request_method
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: request_time
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Request-URI
  name: request_uri
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: script_name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: server_cert
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: unparsed_uri
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Misc
  name: user
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BODY_CONTAINABLE_METHODS
  value: "[ \"POST\", \"PUT\" ]"
- !ruby/object:RI::Constant 
  comment: 
  name: BUFSIZE
  value: 1024*4
full_name: WEBrick::HTTPRequest
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: _read_data
- !ruby/object:RI::MethodSummary 
  name: body
- !ruby/object:RI::MethodSummary 
  name: content_length
- !ruby/object:RI::MethodSummary 
  name: content_type
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: fixup
- !ruby/object:RI::MethodSummary 
  name: keep_alive?
- !ruby/object:RI::MethodSummary 
  name: meta_vars
- !ruby/object:RI::MethodSummary 
  name: meta_vars
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: parse_query
- !ruby/object:RI::MethodSummary 
  name: parse_uri
- !ruby/object:RI::MethodSummary 
  name: parse_uri
- !ruby/object:RI::MethodSummary 
  name: query
- !ruby/object:RI::MethodSummary 
  name: read_body
- !ruby/object:RI::MethodSummary 
  name: read_chunk_size
- !ruby/object:RI::MethodSummary 
  name: read_chunked
- !ruby/object:RI::MethodSummary 
  name: read_data
- !ruby/object:RI::MethodSummary 
  name: read_header
- !ruby/object:RI::MethodSummary 
  name: read_line
- !ruby/object:RI::MethodSummary 
  name: read_request_line
- !ruby/object:RI::MethodSummary 
  name: to_s
name: HTTPRequest
superclass: Object
ri/1.8/system/WEBrick/HTTPRequest/%5b%5d-i.yaml000064400000000271150403621430014407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#[]
is_singleton: false
name: "[]"
params: (header_name)
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/each-i.yaml000064400000000423150403621430014435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: "(k, value.empty? ? nil : value.join(\", \"))"
comment: 
full_name: WEBrick::HTTPRequest#each
is_singleton: false
name: each
params: "() {|k, value.empty? ? nil : value.join(\", \")| ...}"
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/body-i.yaml000064400000000266150403621440014500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#body
is_singleton: false
name: body
params: (&block)
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/parse-i.yaml000064400000000274150403621440014654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#parse
is_singleton: false
name: parse
params: (socket=nil)
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/read_header-i.yaml000064400000000305150403621440015760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#read_header
is_singleton: false
name: read_header
params: (socket)
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/content_type-i.yaml000064400000000300150403621450016244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#content_type
is_singleton: false
name: content_type
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/parse_uri-i.yaml000064400000000315150403621450015530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#parse_uri
is_singleton: false
name: parse_uri
params: (str, scheme="https")
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/new-c.yaml000064400000000264150403621450014325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest::new
is_singleton: true
name: new
params: (config)
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/read_chunked-i.yaml000064400000000316150403621460016155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#read_chunked
is_singleton: false
name: read_chunked
params: (socket, block)
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/read_request_line-i.yaml000064400000000321150403621460017227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#read_request_line
is_singleton: false
name: read_request_line
params: (socket)
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/content_length-i.yaml000064400000000304150403621470016552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#content_length
is_singleton: false
name: content_length
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/read_body-i.yaml000064400000000310150403621470015464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#read_body
is_singleton: false
name: read_body
params: (socket, block)
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/parse_query-i.yaml000064400000000277150403621500016101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#parse_query
is_singleton: false
name: parse_query
params: ()
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/to_s-i.yaml000064400000000260150403621500014476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/_read_data-i.yaml000064400000000314150403621510015576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#_read_data
is_singleton: false
name: _read_data
params: (io, method, arg)
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/keep_alive%3f-i.yaml000064400000000276150403621520016145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#keep_alive?
is_singleton: false
name: keep_alive?
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/fixup-i.yaml000064400000000262150403621520014671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#fixup
is_singleton: false
name: fixup
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/read_data-i.yaml000064400000000303150403621520015436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#read_data
is_singleton: false
name: read_data
params: (io, size)
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/query-i.yaml000064400000000262150403621530014704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#query
is_singleton: false
name: query
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/read_chunk_size-i.yaml000064400000000315150403621530016673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#read_chunk_size
is_singleton: false
name: read_chunk_size
params: (socket)
visibility: private
ri/1.8/system/WEBrick/HTTPRequest/meta_vars-i.yaml000064400000000272150403621530015521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#meta_vars
is_singleton: false
name: meta_vars
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPRequest/read_line-i.yaml000064400000000275150403621540015466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPRequest#read_line
is_singleton: false
name: read_line
params: (io)
visibility: private
ri/1.8/system/WEBrick/Daemon/cdesc-Daemon.yaml000064400000000357150403621540014654 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: start
comment: 
constants: []

full_name: WEBrick::Daemon
includes: []

instance_methods: []

name: Daemon
superclass: Object
ri/1.8/system/WEBrick/Daemon/start-c.yaml000064400000000324150403621550013742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: if block_given?
comment: 
full_name: WEBrick::Daemon::start
is_singleton: true
name: start
params: () {|if block_given?| ...}
visibility: public
ri/1.8/system/WEBrick/Config/cdesc-Config.yaml000064400000010042150403621550014651 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: LIBDIR
  value: File::dirname(__FILE__)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: for GenericServer
  name: General
  value: "{       :ServerName     => Utils::getservername,       :BindAddress    => nil,   # \"0.0.0.0\" or \"::\" or nil       :Port           => nil,   # users MUST specifiy this!!       :MaxClients     => 100,   # maximum number of the concurrent connections       :ServerType     => nil,   # default: WEBrick::SimpleServer       :Logger         => nil,   # default: WEBrick::Log.new       :ServerSoftware => \"WEBrick/#{WEBrick::VERSION} \" +                          \"(Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})\",       :TempDir        => ENV['TMPDIR']||ENV['TMP']||ENV['TEMP']||'/tmp',       :DoNotListen    => false,       :StartCallback  => nil,       :StopCallback   => nil,       :AcceptCallback => nil,     }"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: for HTTPServer, HTTPRequest, HTTPResponse ...
  name: HTTP
  value: "General.dup.update(       :Port           => 80,       :RequestTimeout => 30,       :HTTPVersion    => HTTPVersion.new(\"1.1\"),       :AccessLog      => nil,       :MimeTypes      => HTTPUtils::DefaultMimeTypes,       :DirectoryIndex => [\"index.html\",\"index.htm\",\"index.cgi\",\"index.rhtml\"],       :DocumentRoot   => nil,       :DocumentRootOptions => { :FancyIndexing => true },       :RequestHandler => nil,       :RequestCallback => nil,  # alias of :RequestHandler       :ServerAlias    => nil,        # for HTTPProxyServer       :ProxyAuthProc  => nil,       :ProxyContentHandler => nil,       :ProxyVia       => true,       :ProxyTimeout   => true,       :ProxyURI       => nil,        :CGIInterpreter => nil,       :CGIPathEnv     => nil,        # workaround: if Request-URIs contain 8bit chars,       # they should be escaped before calling of URI::parse().       :Escape8bitURI  => false"
- !ruby/object:RI::Constant 
  comment: 
  name: FileHandler
  value: "{       :NondisclosureName => [\".ht*\", \"*~\"],       :FancyIndexing     => false,       :HandlerTable      => {},       :HandlerCallback   => nil,       :DirectoryCallback => nil,       :FileCallback      => nil,       :UserDir           => nil,  # e.g. \"public_html\"       :AcceptableLanguages => []"
- !ruby/object:RI::Constant 
  comment: 
  name: BasicAuth
  value: "{       :AutoReloadUserDB     => true,     }"
- !ruby/object:RI::Constant 
  comment: 
  name: DigestAuth
  value: "{       :Algorithm            => 'MD5-sess', # or 'MD5'        :Domain               => nil,        # an array includes domain names.       :Qop                  => [ 'auth' ], # 'auth' or 'auth-int' or both.       :UseOpaque            => true,       :UseNextNonce         => false,       :CheckNc              => false,       :UseAuthenticationInfoHeader => true,       :AutoReloadUserDB     => true,       :NonceExpirePeriod    => 30*60,       :NonceExpireDelta     => 60,       :InternetExplorerHack => true,       :OperaHack            => true,     }"
- !ruby/object:RI::Constant 
  comment: 
  name: SSL
  value: "{       :ServerSoftware       => \"#{svrsoft} OpenSSL/#{osslv}\",       :SSLEnable            => false,       :SSLCertificate       => nil,       :SSLPrivateKey        => nil,       :SSLClientCA          => nil,       :SSLExtraChainCert    => nil,       :SSLCACertificateFile => nil,       :SSLCACertificatePath => nil,       :SSLCertificateStore  => nil,       :SSLVerifyClient      => ::OpenSSL::SSL::VERIFY_NONE,       :SSLVerifyDepth       => nil,       :SSLVerifyCallback    => nil,   # custom verification       :SSLTimeout           => nil,       :SSLOptions           => nil,       :SSLStartImmediately  => true,       # Must specify if you use auto generated certificate.       :SSLCertName          => nil,       :SSLCertComment       => \"Generated by Ruby/OpenSSL\""
full_name: WEBrick::Config
includes: []

instance_methods: []

name: Config
superclass: 
ri/1.8/system/WEBrick/HTTPProxyServer/proxy_service-i.yaml000064400000000316150403621560017323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#proxy_service
is_singleton: false
name: proxy_service
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/proxy_uri-i.yaml000064400000000306150403621560016461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#proxy_uri
is_singleton: false
name: proxy_uri
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/do_OPTIONS-i.yaml000064400000000310150403621560016231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#do_OPTIONS
is_singleton: false
name: do_OPTIONS
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/service-i.yaml000064400000000302150403621570016056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#service
is_singleton: false
name: service
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/cdesc-HTTPProxyServer.yaml000064400000002231150403621570020262 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Some header fields should not be transferred.
  name: HopByHop
  value: "%w( connection keep-alive proxy-authenticate upgrade                    proxy-authorization te trailers transfer-encoding )"
- !ruby/object:RI::Constant 
  comment: 
  name: ShouldNotTransfer
  value: "%w( set-cookie proxy-connection )"
full_name: WEBrick::HTTPProxyServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: choose_header
- !ruby/object:RI::MethodSummary 
  name: do_OPTIONS
- !ruby/object:RI::MethodSummary 
  name: proxy_auth
- !ruby/object:RI::MethodSummary 
  name: proxy_connect
- !ruby/object:RI::MethodSummary 
  name: proxy_service
- !ruby/object:RI::MethodSummary 
  name: proxy_uri
- !ruby/object:RI::MethodSummary 
  name: service
- !ruby/object:RI::MethodSummary 
  name: set_cookie
- !ruby/object:RI::MethodSummary 
  name: set_via
- !ruby/object:RI::MethodSummary 
  name: split_field
name: HTTPProxyServer
superclass: HTTPServer
ri/1.8/system/WEBrick/HTTPProxyServer/split_field-i.yaml000064400000000303150403621570016715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#split_field
is_singleton: false
name: split_field
params: (f)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/new-c.yaml000064400000000270150403621600015177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer::new
is_singleton: true
name: new
params: (config)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/set_cookie-i.yaml000064400000000470150403621600016542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Net::HTTP is stupid about the multiple header fields. Here is workaround:"
full_name: WEBrick::HTTPProxyServer#set_cookie
is_singleton: false
name: set_cookie
params: (src, dst)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/proxy_auth-i.yaml000064400000000310150403621600016611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#proxy_auth
is_singleton: false
name: proxy_auth
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/choose_header-i.yaml000064400000000316150403621610017206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#choose_header
is_singleton: false
name: choose_header
params: (src, dst)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/proxy_connect-i.yaml000064400000000316150403621610017310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#proxy_connect
is_singleton: false
name: proxy_connect
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPProxyServer/set_via-i.yaml000064400000000273150403621610016052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPProxyServer#set_via
is_singleton: false
name: set_via
params: (h)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/shift_path_info-i.yaml000064400000000361150403621620021054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#shift_path_info
is_singleton: false
name: shift_path_info
params: (req, res, path_info, base=nil)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/exec_handler-i.yaml000064400000000326150403621630020333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#exec_handler
is_singleton: false
name: exec_handler
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/search_index_file-i.yaml000064400000000340150403621630021341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#search_index_file
is_singleton: false
name: search_index_file
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/check_filename-i.yaml000064400000000340150403621640020624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#check_filename
is_singleton: false
name: check_filename
params: (req, res, name)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/do_POST-i.yaml000064400000000313150403621640017156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#do_POST
is_singleton: false
name: do_POST
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/add_handler-c.yaml000064400000000332150403621640020127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler::add_handler
is_singleton: true
name: add_handler
params: (suffix, handler)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/do_GET-i.yaml000064400000000311150403621650017007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#do_GET
is_singleton: false
name: do_GET
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/set_dir_list-i.yaml000064400000000326150403621650020400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#set_dir_list
is_singleton: false
name: set_dir_list
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/do_OPTIONS-i.yaml000064400000000321150403621650017524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#do_OPTIONS
is_singleton: false
name: do_OPTIONS
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/service-i.yaml000064400000000313150403621660017351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#service
is_singleton: false
name: service
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/remove_handler-c.yaml000064400000000327150403621660020702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler::remove_handler
is_singleton: true
name: remove_handler
params: (suffix)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/new-c.yaml000064400000000360150403621660016476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler::new
is_singleton: true
name: new
params: (server, root, options={}, default=Config::FileHandler)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/nondisclosure_name%3f-i.yaml000064400000000340150403621670022077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#nondisclosure_name?
is_singleton: false
name: nondisclosure_name?
params: (name)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/call_callback-i.yaml000064400000000347150403621670020450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#call_callback
is_singleton: false
name: call_callback
params: (callback_name, req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/trailing_pathsep%3f-i.yaml000064400000001012150403621700021534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "RFC3253: Versioning Extensions to WebDAV"
- !ruby/struct:SM::Flow::VERB 
  body: "         (Web Distributed Authoring and Versioning)\n"
- !ruby/struct:SM::Flow::P 
  body: VERSION-CONTROL REPORT CHECKOUT CHECK_IN UNCHECKOUT MKWORKSPACE UPDATE LABEL MERGE ACTIVITY
full_name: WEBrick::HTTPServlet::FileHandler#trailing_pathsep?
is_singleton: false
name: trailing_pathsep?
params: (path)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/search_file-i.yaml000064400000000336150403621700020155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#search_file
is_singleton: false
name: search_file
params: (req, res, basename)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/set_filename-i.yaml000064400000000326150403621700020343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#set_filename
is_singleton: false
name: set_filename
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/prevent_directory_traversal-i.yaml000064400000000364150403621700023544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#prevent_directory_traversal
is_singleton: false
name: prevent_directory_traversal
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/windows_ambiguous_name%3f-i.yaml000064400000000350150403621710022751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#windows_ambiguous_name?
is_singleton: false
name: windows_ambiguous_name?
params: (name)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/cdesc-FileHandler.yaml000064400000002612150403621710020717 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_handler
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: remove_handler
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: HandlerTable
  value: Hash.new
full_name: WEBrick::HTTPServlet::FileHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: call_callback
- !ruby/object:RI::MethodSummary 
  name: check_filename
- !ruby/object:RI::MethodSummary 
  name: do_GET
- !ruby/object:RI::MethodSummary 
  name: do_OPTIONS
- !ruby/object:RI::MethodSummary 
  name: do_POST
- !ruby/object:RI::MethodSummary 
  name: exec_handler
- !ruby/object:RI::MethodSummary 
  name: get_handler
- !ruby/object:RI::MethodSummary 
  name: nondisclosure_name?
- !ruby/object:RI::MethodSummary 
  name: prevent_directory_traversal
- !ruby/object:RI::MethodSummary 
  name: search_file
- !ruby/object:RI::MethodSummary 
  name: search_index_file
- !ruby/object:RI::MethodSummary 
  name: service
- !ruby/object:RI::MethodSummary 
  name: set_dir_list
- !ruby/object:RI::MethodSummary 
  name: set_filename
- !ruby/object:RI::MethodSummary 
  name: shift_path_info
- !ruby/object:RI::MethodSummary 
  name: trailing_pathsep?
- !ruby/object:RI::MethodSummary 
  name: windows_ambiguous_name?
name: FileHandler
superclass: AbstractServlet
ri/1.8/system/WEBrick/HTTPServlet/FileHandler/get_handler-i.yaml000064400000000324150403621710020163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::FileHandler#get_handler
is_singleton: false
name: get_handler
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/ERBHandler/evaluate-i.yaml000064400000000353150403621720017251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::ERBHandler#evaluate
is_singleton: false
name: evaluate
params: (erb, servlet_request, servlet_response)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/ERBHandler/do_POST-i.yaml000064400000000402150403621730016706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #do_GET"
full_name: WEBrick::HTTPServlet::ERBHandler#do_POST
is_singleton: false
name: do_POST
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ERBHandler/do_GET-i.yaml000064400000000363150403621730016546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: do_POST
block_params: 
comment: 
full_name: WEBrick::HTTPServlet::ERBHandler#do_GET
is_singleton: false
name: do_GET
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ERBHandler/new-c.yaml000064400000000306150403621730016225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::ERBHandler::new
is_singleton: true
name: new
params: (server, name)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ERBHandler/cdesc-ERBHandler.yaml000064400000000636150403621740020210 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPServlet::ERBHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_GET
- !ruby/object:RI::MethodSummary 
  name: do_POST
- !ruby/object:RI::MethodSummary 
  name: evaluate
name: ERBHandler
superclass: AbstractServlet
ri/1.8/system/WEBrick/HTTPServlet/cdesc-HTTPServlet.yaml000064400000000306150403621740016512 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPServlet
includes: []

instance_methods: []

name: HTTPServlet
superclass: 
ri/1.8/system/WEBrick/HTTPServlet/CGIHandler/do_POST-i.yaml000064400000000402150403621750016702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #do_GET"
full_name: WEBrick::HTTPServlet::CGIHandler#do_POST
is_singleton: false
name: do_POST
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/CGIHandler/cdesc-CGIHandler.yaml000064400000001233150403621750020167 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Ruby
  value: File::join(::Config::CONFIG['bindir'],                         ::Config::CONFIG['ruby_install_name'])
- !ruby/object:RI::Constant 
  comment: 
  name: CGIRunner
  value: "\"\\\"#{Ruby}\\\" \\\"#{Config::LIBDIR}/httpservlet/cgi_runner.rb\\\"\""
full_name: WEBrick::HTTPServlet::CGIHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_GET
- !ruby/object:RI::MethodSummary 
  name: do_POST
name: CGIHandler
superclass: AbstractServlet
ri/1.8/system/WEBrick/HTTPServlet/CGIHandler/do_GET-i.yaml000064400000000363150403621760016543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: do_POST
block_params: 
comment: 
full_name: WEBrick::HTTPServlet::CGIHandler#do_GET
is_singleton: false
name: do_GET
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/CGIHandler/new-c.yaml000064400000000306150403621760016222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::CGIHandler::new
is_singleton: true
name: new
params: (server, name)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/DefaultFileHandler/do_GET-i.yaml000064400000000320150403621770020317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::DefaultFileHandler#do_GET
is_singleton: false
name: do_GET
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/DefaultFileHandler/make_partial_content-i.yaml000064400000000400150403621770023400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content
is_singleton: false
name: make_partial_content
params: (req, res, filename, filesize)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/DefaultFileHandler/prepare_range-i.yaml000064400000000345150403621770022037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::DefaultFileHandler#prepare_range
is_singleton: false
name: prepare_range
params: (range, filesize)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/DefaultFileHandler/cdesc-DefaultFileHandler.yaml000064400000000770150403622000023525 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPServlet::DefaultFileHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_GET
- !ruby/object:RI::MethodSummary 
  name: make_partial_content
- !ruby/object:RI::MethodSummary 
  name: not_modified?
- !ruby/object:RI::MethodSummary 
  name: prepare_range
name: DefaultFileHandler
superclass: AbstractServlet
ri/1.8/system/WEBrick/HTTPServlet/DefaultFileHandler/new-c.yaml000064400000000324150403622000017770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::DefaultFileHandler::new
is_singleton: true
name: new
params: (server, local_path)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/DefaultFileHandler/not_modified%3f-i.yaml000064400000000353150403622010022146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::DefaultFileHandler#not_modified?
is_singleton: false
name: not_modified?
params: (req, res, mtime, etag)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ProcHandler/do_POST-i.yaml000064400000000414150403622010017174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #do_GET"
full_name: WEBrick::HTTPServlet::ProcHandler#do_POST
is_singleton: false
name: do_POST
params: (request, response)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ProcHandler/do_GET-i.yaml000064400000000375150403622020017035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: do_POST
block_params: 
comment: 
full_name: WEBrick::HTTPServlet::ProcHandler#do_GET
is_singleton: false
name: do_GET
params: (request, response)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ProcHandler/new-c.yaml000064400000000277150403622020016520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::ProcHandler::new
is_singleton: true
name: new
params: (proc)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ProcHandler/get_instance-i.yaml000064400000000335150403622020020373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::ProcHandler#get_instance
is_singleton: false
name: get_instance
params: (server, *options)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/ProcHandler/cdesc-ProcHandler.yaml000064400000000644150403622020020765 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPServlet::ProcHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_GET
- !ruby/object:RI::MethodSummary 
  name: do_POST
- !ruby/object:RI::MethodSummary 
  name: get_instance
name: ProcHandler
superclass: AbstractServlet
ri/1.8/system/WEBrick/HTTPServlet/HTTPServletError/cdesc-HTTPServletError.yaml000064400000000352150403622030022654 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPServlet::HTTPServletError
includes: []

instance_methods: []

name: HTTPServletError
superclass: StandardError
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/get_instance-c.yaml000064400000000341150403622030021272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::AbstractServlet::get_instance
is_singleton: true
name: get_instance
params: (config, *options)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/do_GET-i.yaml000064400000000315150403622040017740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::AbstractServlet#do_GET
is_singleton: false
name: do_GET
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/do_OPTIONS-i.yaml000064400000000325150403622040020455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::AbstractServlet#do_OPTIONS
is_singleton: false
name: do_OPTIONS
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/service-i.yaml000064400000000317150403622040020301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::AbstractServlet#service
is_singleton: false
name: service
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/redirect_to_directory_uri-i.yaml000064400000000364150403622050024112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::AbstractServlet#redirect_to_directory_uri
is_singleton: false
name: redirect_to_directory_uri
params: (req, res)
visibility: private
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/cdesc-AbstractServlet.yaml000064400000001116150403622050022601 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: get_instance
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPServlet::AbstractServlet
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_GET
- !ruby/object:RI::MethodSummary 
  name: do_HEAD
- !ruby/object:RI::MethodSummary 
  name: do_OPTIONS
- !ruby/object:RI::MethodSummary 
  name: redirect_to_directory_uri
- !ruby/object:RI::MethodSummary 
  name: service
name: AbstractServlet
superclass: Object
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/new-c.yaml000064400000000317150403622060017426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::AbstractServlet::new
is_singleton: true
name: new
params: (server, *options)
visibility: public
ri/1.8/system/WEBrick/HTTPServlet/AbstractServlet/do_HEAD-i.yaml000064400000000317150403622060020026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPServlet::AbstractServlet#do_HEAD
is_singleton: false
name: do_HEAD
params: (req, res)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/client_error%3f-i.yaml000064400000000305150403622070016355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus#client_error?
is_singleton: false
name: client_error?
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/ClientError/cdesc-ClientError.yaml000064400000000327150403622070020705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPStatus::ClientError
includes: []

instance_methods: []

name: ClientError
superclass: Error
ri/1.8/system/WEBrick/HTTPStatus/EOFError/cdesc-EOFError.yaml000064400000000331150403622100017260 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPStatus::EOFError
includes: []

instance_methods: []

name: EOFError
superclass: StandardError
ri/1.8/system/WEBrick/HTTPStatus/Info/cdesc-Info.yaml000064400000000312150403622110016000 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPStatus::Info
includes: []

instance_methods: []

name: Info
superclass: Status
ri/1.8/system/WEBrick/HTTPStatus/Error/cdesc-Error.yaml000064400000000314150403622110016376 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPStatus::Error
includes: []

instance_methods: []

name: Error
superclass: Status
ri/1.8/system/WEBrick/HTTPStatus/info%3f-i.yaml000064400000000265150403622120014622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus#info?
is_singleton: false
name: info?
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/Success/cdesc-Success.yaml000064400000000320150403622120017232 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPStatus::Success
includes: []

instance_methods: []

name: Success
superclass: Status
ri/1.8/system/WEBrick/HTTPStatus/redirect%3f-i.yaml000064400000000275150403622120015471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus#redirect?
is_singleton: false
name: redirect?
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/ServerError/cdesc-ServerError.yaml000064400000000327150403622130020762 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPStatus::ServerError
includes: []

instance_methods: []

name: ServerError
superclass: Error
ri/1.8/system/WEBrick/HTTPStatus/Status/to_i-i.yaml000064400000000355150403622140015610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #code"
full_name: WEBrick::HTTPStatus::Status#to_i
is_singleton: false
name: to_i
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/Status/cdesc-Status.yaml000064400000001027150403622140016767 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: code
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: reason_phrase
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WEBrick::HTTPStatus::Status
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: code
- !ruby/object:RI::MethodSummary 
  name: reason_phrase
- !ruby/object:RI::MethodSummary 
  name: to_i
name: Status
superclass: StandardError
ri/1.8/system/WEBrick/HTTPStatus/Status/code-i.yaml000064400000000337150403622140015570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: to_i
block_params: 
comment: 
full_name: WEBrick::HTTPStatus::Status#code
is_singleton: false
name: code
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/Status/new-c.yaml000064400000000272150403622150015440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus::Status::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/Status/reason_phrase-i.yaml000064400000000311150403622150017500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus::Status#reason_phrase
is_singleton: false
name: reason_phrase
params: ()
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/Redirect/cdesc-Redirect.yaml000064400000000322150403622160017522 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WEBrick::HTTPStatus::Redirect
includes: []

instance_methods: []

name: Redirect
superclass: Status
ri/1.8/system/WEBrick/HTTPStatus/success%3f-i.yaml000064400000000273150403622160015342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus#success?
is_singleton: false
name: success?
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/reason_phrase-i.yaml000064400000000305150403622170016222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus#reason_phrase
is_singleton: false
name: reason_phrase
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/server_error%3f-i.yaml000064400000000305150403622170016406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus#server_error?
is_singleton: false
name: server_error?
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/error%3f-i.yaml000064400000000267150403622200015021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus#error?
is_singleton: false
name: error?
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/%5b%5d-c.yaml000064400000000261150403622200014227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WEBrick::HTTPStatus::[]
is_singleton: true
name: "[]"
params: (code)
visibility: public
ri/1.8/system/WEBrick/HTTPStatus/cdesc-HTTPStatus.yaml000064400000003635150403622200016210 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: StatusMessage
  value: "{       100, 'Continue',       101, 'Switching Protocols',       200, 'OK',       201, 'Created',       202, 'Accepted',       203, 'Non-Authoritative Information',       204, 'No Content',       205, 'Reset Content',       206, 'Partial Content',       300, 'Multiple Choices',       301, 'Moved Permanently',       302, 'Found',       303, 'See Other',       304, 'Not Modified',       305, 'Use Proxy',       307, 'Temporary 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, 'Request Entity Too Large',       414, 'Request-URI Too Large',       415, 'Unsupported Media Type',       416, 'Request Range Not Satisfiable',       417, 'Expectation Failed',       500, 'Internal Server Error',       501, 'Not Implemented',       502, 'Bad Gateway',       503, 'Service Unavailable',       504, 'Gateway Timeout',       505, 'HTTP Version Not Supported'"
- !ruby/object:RI::Constant 
  comment: 
  name: CodeToError
  value: "{}"
full_name: WEBrick::HTTPStatus
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: client_error?
- !ruby/object:RI::MethodSummary 
  name: error?
- !ruby/object:RI::MethodSummary 
  name: info?
- !ruby/object:RI::MethodSummary 
  name: reason_phrase
- !ruby/object:RI::MethodSummary 
  name: redirect?
- !ruby/object:RI::MethodSummary 
  name: server_error?
- !ruby/object:RI::MethodSummary 
  name: success?
name: HTTPStatus
superclass: 
ri/1.8/system/TCPSocket/new-c.yaml000064400000000744150403622210012504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens a TCP connection to <tt>remote_host</tt> on <tt>remote_port</tt>. If <tt>local_host</tt> and <tt>local_port</tt> are specified, then those parameters are used on the local end to establish the connection.
full_name: TCPSocket::new
is_singleton: true
name: new
params: |
  TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil)

visibility: public
ri/1.8/system/TCPSocket/cdesc-TCPSocket.yaml000064400000003370150403622220014350 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: gethostbyname
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: []

full_name: TCPSocket
includes: []

instance_methods: []

name: TCPSocket
superclass: Object
ri/1.8/system/TCPSocket/gethostbyname-c.yaml000064400000007505150403622220014567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Resolve <tt>host</tt> and return name and address information for it, similarly to gethostbyname(3). <tt>host</tt> can be a domain name or the presentation format of an address.
- !ruby/struct:SM::Flow::P 
  body: "Returns an array of information similar to that found in a +struct hostent+:"
- !ruby/struct:SM::Flow::VERB 
  body: "  - cannonical name: the cannonical name for host in the DNS, or a\n    string representing the address\n  - aliases: an array of aliases for the canonical name, there may be no aliases\n  - address family: usually one of Socket::AF_INET or Socket::AF_INET6\n  - address: a string, the binary value of the +struct sockaddr+ for this name, in\n    the indicated address family\n  - ...: if there are multiple addresses for this host,  a series of\n    strings/+struct sockaddr+s may follow, not all necessarily in the same\n    address family. Note that the fact that they may not be all in the same\n    address family is a departure from the behaviour of gethostbyname(3).\n"
- !ruby/struct:SM::Flow::P 
  body: "Note: I believe that the fact that the multiple addresses returned are not necessarily in the same address family may be a bug, since if this function actually called gethostbyname(3), ALL the addresses returned in the trailing address list (h_addr_list from struct hostent) would be of the same address family! Examples from my system, OS X 10.3:"
- !ruby/struct:SM::Flow::VERB 
  body: "  [&quot;localhost&quot;, [], 30, &quot;\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001&quot;, &quot;\\177\\000\\000\\001&quot;]\n    and\n  [&quot;ensemble.local&quot;, [], 30, &quot;\\376\\200\\000\\004\\000\\000\\000\\000\\002\\003\\223\\377\\376\\255\\010\\214&quot;, &quot;\\300\\250{\\232&quot; ]\n"
- !ruby/struct:SM::Flow::P 
  body: "Similar information can be returned by Socket.getaddrinfo if called as:"
- !ruby/struct:SM::Flow::VERB 
  body: "   Socket.getaddrinfo(<tt>host</tt>, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname &quot;example.com&quot;\n  =&gt; [&quot;example.com&quot;, [], 2, &quot;\\300\\000\\&quot;\\246&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This name has no DNS aliases, and a single IPv4 address.
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname &quot;smtp.telus.net&quot;\n  =&gt; [&quot;smtp.svc.telus.net&quot;, [&quot;smtp.telus.net&quot;], 2, &quot;\\307\\271\\334\\371&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This name is an an alias so the canonical name is returned, as well as the alias and a single IPv4 address.
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname &quot;localhost&quot;\n  =&gt; [&quot;localhost&quot;, [], 30, &quot;\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001&quot;, &quot;\\177\\000\\000\\001&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This machine has no aliases, returns an IPv6 address, and has an additional IPv4 address.
- !ruby/struct:SM::Flow::P 
  body: "<tt>host</tt> can also be an IP address in presentation format, in which case a reverse lookup is done on the address:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname(&quot;127.0.0.1&quot;)\n  =&gt; [&quot;localhost&quot;, [], 2, &quot;\\177\\000\\000\\001&quot;]\n\n  Socket.gethostbyname(&quot;192.0.34.166&quot;)\n  =&gt; [&quot;www.example.com&quot;, [], 2, &quot;\\300\\000\\&quot;\\246&quot;]\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: See
- !ruby/struct:SM::Flow::P 
  body: "See: Socket.getaddrinfo"
full_name: TCPSocket::gethostbyname
is_singleton: true
name: gethostbyname
params: " Socket.gethostbyname(host) => hostent\n"
visibility: public
ri/1.8/system/NameError/message/cdesc-message.yaml000064400000001172150403622230015713 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: NameError::message
includes: []

instance_methods: []

name: message
superclass: Data
ri/1.8/system/NameError/new-c.yaml000064400000000605150403622240012576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Construct a new NameError exception. If given the <em>name</em> parameter may subsequently be examined using the <tt>NameError.name</tt> method.
full_name: NameError::new
is_singleton: true
name: new
params: |
  NameError.new(msg [, name])  => name_error

visibility: public
ri/1.8/system/NameError/to_s-i.yaml000064400000000455150403622240012762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produce a nicely-formated string representing the <tt>NameError</tt>.
full_name: NameError#to_s
is_singleton: false
name: to_s
params: |
  name_error.to_s   => string

visibility: public
ri/1.8/system/NameError/cdesc-NameError.yaml000064400000001402150403622250014533 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: NameError
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: to_s
name: NameError
superclass: StandardError
ri/1.8/system/NameError/name-i.yaml000064400000000452150403622260012735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the name associated with this NameError exception.
full_name: NameError#name
is_singleton: false
name: name
params: |
  name_error.name    =>  string or nil

visibility: public
ri/1.8/system/Acceptables/cdesc-Acceptables.yaml000064400000000556150403622270015376 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Acceptable argument classes. Now contains DecimalInteger, OctalInteger and DecimalNumeric. See Acceptable argument classes (in source code).
constants: []

full_name: Acceptables
includes: []

instance_methods: []

name: Acceptables
superclass: 
ri/1.8/system/Finalizer/cdesc-Finalizer.yaml000064400000006320150403622300014615 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_dependency
- !ruby/object:RI::MethodSummary 
  name: delete_all_by_dependant
- !ruby/object:RI::MethodSummary 
  name: delete_all_dependency
- !ruby/object:RI::MethodSummary 
  name: delete_by_dependant
- !ruby/object:RI::MethodSummary 
  name: delete_dependency
- !ruby/object:RI::MethodSummary 
  name: final_of
- !ruby/object:RI::MethodSummary 
  name: finalize_all
- !ruby/object:RI::MethodSummary 
  name: finalize_all_by_dependant
- !ruby/object:RI::MethodSummary 
  name: finalize_all_dependency
- !ruby/object:RI::MethodSummary 
  name: finalize_by_dependant
- !ruby/object:RI::MethodSummary 
  name: finalize_dependency
- !ruby/object:RI::MethodSummary 
  name: safe
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Usage:"
- !ruby/struct:SM::Flow::P 
  body: add dependency R_method(obj, dependant)
- !ruby/struct:SM::Flow::VERB 
  body: "  add(obj, dependant, method = :finalize, *opt)\n  add_dependency(obj, dependant, method = :finalize, *opt)\n"
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_method(obj, dependant)
- !ruby/struct:SM::Flow::VERB 
  body: "  delete(obj_or_id, dependant, method = :finalize)\n  delete_dependency(obj_or_id, dependant, method = :finalize)\n"
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_*(obj, dependant)
- !ruby/struct:SM::Flow::VERB 
  body: "  delete_all_dependency(obj_or_id, dependant)\n"
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_method(*, dependant)
- !ruby/struct:SM::Flow::VERB 
  body: "  delete_by_dependant(dependant, method = :finalize)\n"
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_*(*, dependant)
- !ruby/struct:SM::Flow::VERB 
  body: "  delete_all_by_dependant(dependant)\n"
- !ruby/struct:SM::Flow::P 
  body: delete all dependency R_*(*, *)
- !ruby/struct:SM::Flow::VERB 
  body: "  delete_all\n"
- !ruby/struct:SM::Flow::P 
  body: finalize the dependant connected by dependency R_method(obj, dependtant).
- !ruby/struct:SM::Flow::VERB 
  body: "  finalize(obj_or_id, dependant, method = :finalize)\n  finalize_dependency(obj_or_id, dependant, method = :finalize)\n"
- !ruby/struct:SM::Flow::P 
  body: finalize all dependants connected by dependency R_*(obj, dependtant).
- !ruby/struct:SM::Flow::VERB 
  body: "  finalize_all_dependency(obj_or_id, dependant)\n"
- !ruby/struct:SM::Flow::P 
  body: finalize the dependant connected by dependency R_method(*, dependtant).
- !ruby/struct:SM::Flow::VERB 
  body: "  finalize_by_dependant(dependant, method = :finalize)\n"
- !ruby/struct:SM::Flow::P 
  body: finalize all dependants connected by dependency R_*(*, dependant).
- !ruby/struct:SM::Flow::VERB 
  body: "  finalize_all_by_dependant(dependant)\n"
- !ruby/struct:SM::Flow::P 
  body: finalize all dependency registered to the Finalizer.
- !ruby/struct:SM::Flow::VERB 
  body: "  finalize_all\n"
- !ruby/struct:SM::Flow::P 
  body: stop invoking Finalizer on GC.
- !ruby/struct:SM::Flow::VERB 
  body: "  safe{..}\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RCS_ID
  value: "'-$Id: finalize.rb,v 1.4 1998/02/27 05:34:33 keiju Exp keiju $-'"
full_name: Finalizer
includes: []

instance_methods: []

name: Finalizer
superclass: 
ri/1.8/system/Finalizer/delete_dependency-c.yaml000064400000000457150403622300015500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_method(obj, dependant)
full_name: Finalizer::delete_dependency
is_singleton: true
name: delete_dependency
params: (id, dependant, method = :finalize)
visibility: public
ri/1.8/system/Finalizer/final_of-c.yaml000064400000000406150403622300013607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: registering function to ObjectSpace#add_finalizer
full_name: Finalizer::final_of
is_singleton: true
name: final_of
params: (id)
visibility: private
ri/1.8/system/Finalizer/delete_all_dependency-c.yaml000064400000000436150403622300016325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_*(obj, dependant)
full_name: Finalizer::delete_all_dependency
is_singleton: true
name: delete_all_dependency
params: (id, dependant)
visibility: public
ri/1.8/system/Finalizer/delete_all_by_dependant-c.yaml000064400000000434150403622300016641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_*(*, dependant)
full_name: Finalizer::delete_all_by_dependant
is_singleton: true
name: delete_all_by_dependant
params: (dependant)
visibility: public
ri/1.8/system/Finalizer/finalize_by_dependant-c.yaml000064400000000517150403622310016353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: finalize the dependant connected by dependency R_method(*, dependtant)
full_name: Finalizer::finalize_by_dependant
is_singleton: true
name: finalize_by_dependant
params: (dependant, method = :finalize)
visibility: public
ri/1.8/system/Finalizer/finalize_all_dependency-c.yaml000064400000000501150403622310016656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: finalize all dependants connected by dependency R_*(obj, dependtant)
full_name: Finalizer::finalize_all_dependency
is_singleton: true
name: finalize_all_dependency
params: (id, dependant)
visibility: public
ri/1.8/system/Finalizer/delete_by_dependant-c.yaml000064400000000455150403622320016016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: delete dependency R_method(*, dependant)
full_name: Finalizer::delete_by_dependant
is_singleton: true
name: delete_by_dependant
params: (dependant, method = :finalize)
visibility: public
ri/1.8/system/Finalizer/finalize_all-c.yaml000064400000000416150403622320014466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: finalize all dependants registered to the Finalizer.
full_name: Finalizer::finalize_all
is_singleton: true
name: finalize_all
params: ()
visibility: public
ri/1.8/system/Finalizer/finalize_all_by_dependant-c.yaml000064400000000477150403622330017212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: finalize all dependants connected by dependency R_*(*, dependtant)
full_name: Finalizer::finalize_all_by_dependant
is_singleton: true
name: finalize_all_by_dependant
params: (dependant)
visibility: public
ri/1.8/system/Finalizer/finalize_dependency-c.yaml000064400000000521150403622330016032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: finalize the depandant connected by dependency R_method(obj, dependtant)
full_name: Finalizer::finalize_dependency
is_singleton: true
name: finalize_dependency
params: (id, dependant, method = :finalize)
visibility: public
ri/1.8/system/Finalizer/safe-c.yaml000064400000000366150403622340012761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: method to call finalize_* safely.
full_name: Finalizer::safe
is_singleton: true
name: safe
params: () {|| ...}
visibility: public
ri/1.8/system/Finalizer/add_dependency-c.yaml000064400000000455150403622340014770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: add dependency R_method(obj, dependant)
full_name: Finalizer::add_dependency
is_singleton: true
name: add_dependency
params: (obj, dependant, method = :finalize, *opt)
visibility: public
ri/1.8/system/SecurityError/cdesc-SecurityError.yaml000064400000001204150403622350016412 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: SecurityError
includes: []

instance_methods: []

name: SecurityError
superclass: StandardError
ri/1.8/system/Logger/info-i.yaml000064400000002076150403622360012302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Log an <tt>INFO</tt> message.
- !ruby/struct:SM::Flow::P 
  body: The message can come either from the <tt>progname</tt> argument or the <tt>block</tt>. If both are provided, then the <tt>block</tt> is used as the message, and <tt>progname</tt> is used as the program name.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  logger.info(&quot;MainApp&quot;) { &quot;Received connection from #{ip}&quot; }\n  # ...\n  logger.info &quot;Waiting for input from user&quot;\n  # ...\n  logger.info { &quot;User typed #{input}&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: You'll probably stick to the second form above, unless you want to provide a program name (which you can do with <tt>Logger#progname=</tt> as well).
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Return
- !ruby/struct:SM::Flow::P 
  body: "See #add."
full_name: Logger#info
is_singleton: false
name: info
params: (progname = nil, &block)
visibility: public
ri/1.8/system/Logger/unknown-i.yaml000064400000000577150403622370013053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Log an <tt>UNKNOWN</tt> message. This will be printed no matter what the logger level.
- !ruby/struct:SM::Flow::P 
  body: "See #info for more information."
full_name: Logger#unknown
is_singleton: false
name: unknown
params: (progname = nil, &block)
visibility: public
ri/1.8/system/Logger/Application/log%3d-i.yaml000064400000000265150403622400014660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::Application#log=
is_singleton: false
name: log=
params: (logdev)
visibility: public
ri/1.8/system/Logger/Application/level%3d-i.yaml000064400000000431150403622400015201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the logging threshold, just like <tt>Logger#level=</tt>.
full_name: Logger::Application#level=
is_singleton: false
name: level=
params: (level)
visibility: public
ri/1.8/system/Logger/Application/log-i.yaml000064400000000455150403622400014365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Logger#add. This application's <tt>appname</tt> is used.
full_name: Logger::Application#log
is_singleton: false
name: log
params: (severity, message = nil, &block)
visibility: public
ri/1.8/system/Logger/Application/cdesc-Application.yaml000064400000003312150403622400016673 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: appname
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: logdev
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Application -- Add logging support to your application.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Define your application class as a sub-class of this class.
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: Override 'run' method in your class to do many things.
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: Instantiate it and invoke 'start'.
  type: :NUMBER
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  class FooApp &lt; Application\n    def initialize(foo_app, application_specific, arguments)\n      super('FooApp') # Name of the application.\n    end\n\n    def run\n      ...\n      log(WARN, 'warning', 'my_method1')\n      ...\n      @log.error('my_method2') { 'Error!' }\n      ...\n    end\n  end\n\n  status = FooApp.new(....).start\n"
constants: []

full_name: Logger::Application
includes: 
- !ruby/object:RI::IncludedModule 
  name: Logger::Severity
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: level=
- !ruby/object:RI::MethodSummary 
  name: log
- !ruby/object:RI::MethodSummary 
  name: log=
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: set_log
- !ruby/object:RI::MethodSummary 
  name: start
name: Application
superclass: Object
ri/1.8/system/Logger/Application/new-c.yaml000064400000001307150403622410014365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  Application.new(appname = '')\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+appname+:"
    body: Name of the application.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: "Create an instance. Log device is <tt>STDERR</tt> by default. This can be changed with #set_log."
full_name: Logger::Application::new
is_singleton: true
name: new
params: (appname = nil)
visibility: public
ri/1.8/system/Logger/Application/set_log-i.yaml000064400000000550150403622410015235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the log device for this application. See the class Logger for an explanation of the arguments.
full_name: Logger::Application#set_log
is_singleton: false
name: set_log
params: (logdev, shift_age = 0, shift_size = 1024000)
visibility: public
ri/1.8/system/Logger/Application/start-i.yaml000064400000000404150403622410014734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Start the application. Return the status code.
full_name: Logger::Application#start
is_singleton: false
name: start
params: ()
visibility: public
ri/1.8/system/Logger/Application/run-i.yaml000064400000000256150403622410014410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::Application#run
is_singleton: false
name: run
params: ()
visibility: private
ri/1.8/system/Logger/ShiftingError/cdesc-ShiftingError.yaml000064400000000316150403622420017542 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Logger::ShiftingError
includes: []

instance_methods: []

name: ShiftingError
superclass: Error
ri/1.8/system/Logger/Error/cdesc-Error.yaml000064400000000305150403622420014350 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Logger::Error
includes: []

instance_methods: []

name: Error
superclass: RuntimeError
ri/1.8/system/Logger/info%3f-i.yaml000064400000000460150403622420012570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the current severity level allows for the printing of <tt>INFO</tt> messages.
full_name: Logger#info?
is_singleton: false
name: info?
params: ()
visibility: public
ri/1.8/system/Logger/error-i.yaml000064400000000503150403622420012466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Log an <tt>ERROR</tt> message.
- !ruby/struct:SM::Flow::P 
  body: "See #info for more information."
full_name: Logger#error
is_singleton: false
name: error
params: (progname = nil, &block)
visibility: public
ri/1.8/system/Logger/add-i.yaml000064400000004750150403622420012075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: log
block_params: ""
comment: 
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  Logger#add(severity, message = nil, progname = nil) { ... }\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+severity+:"
    body: "Severity. Constants are defined in Logger namespace: <tt>DEBUG</tt>, <tt>INFO</tt>, <tt>WARN</tt>, <tt>ERROR</tt>, <tt>FATAL</tt>, or <tt>UNKNOWN</tt>."
  - !ruby/struct:SM::Flow::LI 
    label: "+message+:"
    body: The log message. A String or Exception.
  - !ruby/struct:SM::Flow::LI 
    label: "+progname+:"
    body: Program name string. Can be omitted. Treated as a message if no <tt>message</tt> and <tt>block</tt> are given.
  - !ruby/struct:SM::Flow::LI 
    label: "+block+:"
    body: Can be omitted. Called to get a message string if <tt>message</tt> is nil.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Return
- !ruby/struct:SM::Flow::P 
  body: <tt>true</tt> if successful, <tt>false</tt> otherwise.
- !ruby/struct:SM::Flow::P 
  body: When the given severity is not high enough (for this particular logger), log no message, and return <tt>true</tt>.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Description
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::P 
  body: "<b>Message format</b>: <tt>message</tt> can be any object, but it has to be converted to a String in order to log it. Generally, <tt>inspect</tt> is used if the given object is not a String. A special case is an <tt>Exception</tt> object, which will be printed in detail, including message, class, and backtrace. See #msg2str for the implementation if required."
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Bugs
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Logfile is not locked.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Append open does not need to lock file.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: But on the OS which supports multi I/O, records possibly be mixed.
  type: :BULLET
full_name: Logger#add
is_singleton: false
name: add
params: (severity, message = nil, progname = nil, &block) {|| ...}
visibility: public
ri/1.8/system/Logger/cdesc-Logger.yaml000064400000024131150403622420013410 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Logging formatter. formatter#call is invoked with 4 arguments; severity, time, progname and msg for each log. Bear in mind that time is a Time and msg is an Object that user passed and it could not be a String. It is expected to return a logdev#write-able Object. Default formatter is used when no formatter is set.
  name: formatter
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Logging severity threshold (e.g. <tt>Logger::INFO</tt>).
  name: level
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Logging program name.
  name: progname
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Simple logging utility.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Author:"
    body: NAKAMURA, Hiroshi &lt;nakahiro@sarion.co.jp&gt;
  - !ruby/struct:SM::Flow::LI 
    label: "Documentation:"
    body: NAKAMURA, Hiroshi and Gavin Sinclair
  - !ruby/struct:SM::Flow::LI 
    label: "License:"
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: "Revision:"
    body: "$Id: logger.rb 31806 2011-05-30 02:08:57Z nahi $"
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: The Logger class provides a simple but sophisticated logging utility that anyone can use because it's included in the Ruby 1.8.x standard library.
- !ruby/struct:SM::Flow::P 
  body: "The HOWTOs below give a code-based overview of Logger's usage, but the basic concept is as follows. You create a Logger object (output to a file or elsewhere), and use it to log messages. The messages will have varying levels (<tt>info</tt>, <tt>error</tt>, etc), reflecting their varying importance. The levels, and their meanings, are:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+FATAL+:"
    body: an unhandleable error that results in a program crash
  - !ruby/struct:SM::Flow::LI 
    label: "+ERROR+:"
    body: a handleable error condition
  - !ruby/struct:SM::Flow::LI 
    label: "+WARN+:"
    body: a warning
  - !ruby/struct:SM::Flow::LI 
    label: "+INFO+:"
    body: generic (useful) information about system operation
  - !ruby/struct:SM::Flow::LI 
    label: "+DEBUG+:"
    body: low-level information for developers
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: So each message has a level, and the Logger itself has a level, which acts as a filter, so you can control the amount of information emitted from the logger without having to remove actual messages.
- !ruby/struct:SM::Flow::P 
  body: For instance, in a production system, you may have your logger(s) set to <tt>INFO</tt> (or <tt>WARN</tt> if you don't want the log files growing large with repetitive information). When you are developing it, though, you probably want to know about the program's internal state, and would set them to <tt>DEBUG</tt>.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::P 
  body: "A simple example demonstrates the above explanation:"
- !ruby/struct:SM::Flow::VERB 
  body: "  log = Logger.new(STDOUT)\n  log.level = Logger::WARN\n\n  log.debug(&quot;Created logger&quot;)\n  log.info(&quot;Program started&quot;)\n  log.warn(&quot;Nothing to do!&quot;)\n\n  begin\n    File.each_line(path) do |line|\n      unless line =~ /^(\\w+) = (.*)$/\n        log.error(&quot;Line in wrong format: #{line}&quot;)\n      end\n    end\n  rescue =&gt; err\n    log.fatal(&quot;Caught exception; exiting&quot;)\n    log.fatal(err)\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: Because the Logger's level is set to <tt>WARN</tt>, only the warning, error, and fatal messages are recorded. The debug and info messages are silently discarded.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Features
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: HOWTOs
- !ruby/struct:SM::Flow::H 
  level: 3
  text: How to create a logger
- !ruby/struct:SM::Flow::P 
  body: The options below give you various choices, in more or less increasing complexity.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Create a logger which logs messages to STDERR/STDOUT.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger = Logger.new(STDERR)\n  logger = Logger.new(STDOUT)\n"
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: Create a logger for the file which has the specified name.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger = Logger.new('logfile.log')\n"
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: Create a logger for the specified file.
  - !ruby/struct:SM::Flow::VERB 
    body: "  file = File.open('foo.log', File::WRONLY | File::APPEND)\n  # To create new (and to remove old) logfile, add File::CREAT like;\n  #   file = open('foo.log', File::WRONLY | File::APPEND | File::CREAT)\n  logger = Logger.new(file)\n"
  - !ruby/struct:SM::Flow::LI 
    label: "4."
    body: Create a logger which ages logfile once it reaches a certain size. Leave 10 &quot;old log files&quot; and each file is about 1,024,000 bytes.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger = Logger.new('foo.log', 10, 1024000)\n"
  - !ruby/struct:SM::Flow::LI 
    label: "5."
    body: Create a logger which ages logfile daily/weekly/monthly.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger = Logger.new('foo.log', 'daily')\n  logger = Logger.new('foo.log', 'weekly')\n  logger = Logger.new('foo.log', 'monthly')\n"
  type: :NUMBER
- !ruby/struct:SM::Flow::H 
  level: 3
  text: How to log a message
- !ruby/struct:SM::Flow::P 
  body: Notice the different methods (<tt>fatal</tt>, <tt>error</tt>, <tt>info</tt>) being used to log messages of various levels. Other methods in this family are <tt>warn</tt> and <tt>debug</tt>. <tt>add</tt> is used below to log a message of an arbitrary (perhaps dynamic) level.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Message in block.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger.fatal { &quot;Argument 'foo' not given.&quot; }\n"
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: Message as a string.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger.error &quot;Argument #{ @foo } mismatch.&quot;\n"
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: With progname.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger.info('initialize') { &quot;Initializing...&quot; }\n"
  - !ruby/struct:SM::Flow::LI 
    label: "4."
    body: With severity.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger.add(Logger::FATAL) { 'Fatal error!' }\n"
  type: :NUMBER
- !ruby/struct:SM::Flow::H 
  level: 3
  text: How to close a logger
- !ruby/struct:SM::Flow::VERB 
  body: "     logger.close\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Setting severity threshold
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Original interface.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger.sev_threshold = Logger::WARN\n"
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: Log4r (somewhat) compatible interface.
  - !ruby/struct:SM::Flow::VERB 
    body: "  logger.level = Logger::INFO\n\n  DEBUG &lt; INFO &lt; WARN &lt; ERROR &lt; FATAL &lt; UNKNOWN\n"
  type: :NUMBER
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Format
- !ruby/struct:SM::Flow::P 
  body: "Log messages are rendered in the output stream in a certain format. The default format and a sample are shown below:"
- !ruby/struct:SM::Flow::P 
  body: "Log format:"
- !ruby/struct:SM::Flow::VERB 
  body: "  SeverityID, [Date Time mSec #pid] SeverityLabel -- ProgName: message\n"
- !ruby/struct:SM::Flow::P 
  body: "Log sample:"
- !ruby/struct:SM::Flow::VERB 
  body: "  I, [Wed Mar 03 02:34:24 JST 1999 895701 #19074]  INFO -- Main: info.\n"
- !ruby/struct:SM::Flow::P 
  body: "You may change the date and time format in this manner:"
- !ruby/struct:SM::Flow::VERB 
  body: "  logger.datetime_format = &quot;%Y-%m-%d %H:%M:%S&quot;\n        # e.g. &quot;2004-01-03 00:54:26&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: There is currently no supported way to change the overall format, but you may have some luck hacking the Format constant.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION
  value: "\"1.2.6\""
- !ruby/object:RI::Constant 
  comment: 
  name: ProgName
  value: "\"#{File.basename(__FILE__)}/#{VERSION}\""
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Severity label for logging. (max 5 char)
  name: SEV_LABEL
  value: "%w(DEBUG INFO WARN ERROR FATAL ANY)"
full_name: Logger
includes: 
- !ruby/object:RI::IncludedModule 
  name: Severity
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: datetime_format
- !ruby/object:RI::MethodSummary 
  name: datetime_format=
- !ruby/object:RI::MethodSummary 
  name: debug
- !ruby/object:RI::MethodSummary 
  name: debug?
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: error?
- !ruby/object:RI::MethodSummary 
  name: fatal
- !ruby/object:RI::MethodSummary 
  name: fatal?
- !ruby/object:RI::MethodSummary 
  name: format_message
- !ruby/object:RI::MethodSummary 
  name: format_severity
- !ruby/object:RI::MethodSummary 
  name: info
- !ruby/object:RI::MethodSummary 
  name: info?
- !ruby/object:RI::MethodSummary 
  name: log
- !ruby/object:RI::MethodSummary 
  name: unknown
- !ruby/object:RI::MethodSummary 
  name: warn
- !ruby/object:RI::MethodSummary 
  name: warn?
name: Logger
superclass: Object
ri/1.8/system/Logger/fatal%3f-i.yaml000064400000000463150403622430012730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the current severity level allows for the printing of <tt>FATAL</tt> messages.
full_name: Logger#fatal?
is_singleton: false
name: fatal?
params: ()
visibility: public
ri/1.8/system/Logger/datetime_format-i.yaml000064400000000270150403622430014503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger#datetime_format
is_singleton: false
name: datetime_format
params: ()
visibility: public
ri/1.8/system/Logger/fatal-i.yaml000064400000000502150403622430012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Log a <tt>FATAL</tt> message.
- !ruby/struct:SM::Flow::P 
  body: "See #info for more information."
full_name: Logger#fatal
is_singleton: false
name: fatal
params: (progname = nil, &block)
visibility: public
ri/1.8/system/Logger/log-i.yaml000064400000000404150403622430012117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add"
full_name: Logger#log
is_singleton: false
name: log
params: (severity, message = nil, progname = nil, &block)
visibility: public
ri/1.8/system/Logger/new-c.yaml000064400000002161150403622430012123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  Logger.new(name, shift_age = 7, shift_size = 1048576)\n  Logger.new(name, shift_age = 'weekly')\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+logdev+:"
    body: The log device. This is a filename (String) or IO object (typically <tt>STDOUT</tt>, <tt>STDERR</tt>, or an open file).
  - !ruby/struct:SM::Flow::LI 
    label: "+shift_age+:"
    body: Number of old log files to keep, <b>or</b> frequency of rotation (<tt>daily</tt>, <tt>weekly</tt> or <tt>monthly</tt>).
  - !ruby/struct:SM::Flow::LI 
    label: "+shift_size+:"
    body: Maximum logfile size (only applies when <tt>shift_age</tt> is a number).
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Create an instance.
full_name: Logger::new
is_singleton: true
name: new
params: (logdev, shift_age = 0, shift_size = 1048576)
visibility: public
ri/1.8/system/Logger/LogDevice/create_logfile-i.yaml000064400000000312150403622430016141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#create_logfile
is_singleton: false
name: create_logfile
params: (filename)
visibility: private
ri/1.8/system/Logger/LogDevice/open_logfile-i.yaml000064400000000306150403622430015642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#open_logfile
is_singleton: false
name: open_logfile
params: (filename)
visibility: private
ri/1.8/system/Logger/LogDevice/LogDeviceMutex/cdesc-LogDeviceMutex.yaml000064400000000421150403622440021600 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Logger::LogDevice::LogDeviceMutex
includes: 
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
instance_methods: []

name: LogDeviceMutex
superclass: Object
ri/1.8/system/Logger/LogDevice/cdesc-LogDevice.yaml000064400000001727150403622440015703 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: dev
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: filename
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: SiD
  value: 24 * 60 * 60
full_name: Logger::LogDevice
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_log_header
- !ruby/object:RI::MethodSummary 
  name: check_shift_log
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: create_logfile
- !ruby/object:RI::MethodSummary 
  name: eod
- !ruby/object:RI::MethodSummary 
  name: open_logfile
- !ruby/object:RI::MethodSummary 
  name: previous_period_end
- !ruby/object:RI::MethodSummary 
  name: shift_log_age
- !ruby/object:RI::MethodSummary 
  name: shift_log_period
- !ruby/object:RI::MethodSummary 
  name: write
name: LogDevice
superclass: Object
ri/1.8/system/Logger/LogDevice/eod-i.yaml000064400000000255150403622450013754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#eod
is_singleton: false
name: eod
params: (t)
visibility: private
ri/1.8/system/Logger/LogDevice/new-c.yaml000064400000000276150403622450013773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice::new
is_singleton: true
name: new
params: (log = nil, opt = {})
visibility: public
ri/1.8/system/Logger/LogDevice/check_shift_log-i.yaml000064400000000304150403622450016313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#check_shift_log
is_singleton: false
name: check_shift_log
params: ()
visibility: private
ri/1.8/system/Logger/LogDevice/shift_log_age-i.yaml000064400000000300150403622450015766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#shift_log_age
is_singleton: false
name: shift_log_age
params: ()
visibility: private
ri/1.8/system/Logger/LogDevice/write-i.yaml000064400000000266150403622450014341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#write
is_singleton: false
name: write
params: (message)
visibility: public
ri/1.8/system/Logger/LogDevice/shift_log_period-i.yaml000064400000000311150403622460016517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#shift_log_period
is_singleton: false
name: shift_log_period
params: (now)
visibility: private
ri/1.8/system/Logger/LogDevice/add_log_header-i.yaml000064400000000306150403622460016104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#add_log_header
is_singleton: false
name: add_log_header
params: (file)
visibility: private
ri/1.8/system/Logger/LogDevice/close-i.yaml000064400000000257150403622470014316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Logger/LogDevice/previous_period_end-i.yaml000064400000000317150403622470017252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::LogDevice#previous_period_end
is_singleton: false
name: previous_period_end
params: (now)
visibility: private
ri/1.8/system/Logger/Formatter/call-i.yaml000064400000000312150403622500014210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::Formatter#call
is_singleton: false
name: call
params: (severity, time, progname, msg)
visibility: public
ri/1.8/system/Logger/Formatter/msg2str-i.yaml000064400000000267150403622500014707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::Formatter#msg2str
is_singleton: false
name: msg2str
params: (msg)
visibility: private
ri/1.8/system/Logger/Formatter/new-c.yaml000064400000000253150403622510014065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::Formatter::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Logger/Formatter/cdesc-Formatter.yaml000064400000001063150403622520016077 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: datetime_format
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Format
  value: "\"%s, [%s#%d] %5s -- %s: %s\\n\""
full_name: Logger::Formatter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: call
- !ruby/object:RI::MethodSummary 
  name: format_datetime
- !ruby/object:RI::MethodSummary 
  name: msg2str
name: Formatter
superclass: Object
ri/1.8/system/Logger/Formatter/format_datetime-i.yaml000064400000000310150403622520016441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger::Formatter#format_datetime
is_singleton: false
name: format_datetime
params: (time)
visibility: private
ri/1.8/system/Logger/%3c%3c-i.yaml000064400000000462150403622530012210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dump given message to the log device without any formatting. If no log device exists, return <tt>nil</tt>.
full_name: Logger#<<
is_singleton: false
name: "<<"
params: (msg)
visibility: public
ri/1.8/system/Logger/format_severity-i.yaml000064400000000301150403622530014555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger#format_severity
is_singleton: false
name: format_severity
params: (severity)
visibility: private
ri/1.8/system/Logger/format_message-i.yaml000064400000000330150403622530014331 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Logger#format_message
is_singleton: false
name: format_message
params: (severity, datetime, progname, msg)
visibility: private
ri/1.8/system/Logger/datetime_format%3d-i.yaml000064400000000454150403622540015005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Logging date-time format (string passed to <tt>strftime</tt>).
full_name: Logger#datetime_format=
is_singleton: false
name: datetime_format=
params: (datetime_format)
visibility: public
ri/1.8/system/Logger/close-i.yaml000064400000000342150403622540012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Close the logging device.
full_name: Logger#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Logger/debug%3f-i.yaml000064400000000463150403622540012731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the current severity level allows for the printing of <tt>DEBUG</tt> messages.
full_name: Logger#debug?
is_singleton: false
name: debug?
params: ()
visibility: public
ri/1.8/system/Logger/error%3f-i.yaml000064400000000463150403622550012775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the current severity level allows for the printing of <tt>ERROR</tt> messages.
full_name: Logger#error?
is_singleton: false
name: error?
params: ()
visibility: public
ri/1.8/system/Logger/warn%3f-i.yaml000064400000000460150403622550012610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the current severity level allows for the printing of <tt>WARN</tt> messages.
full_name: Logger#warn?
is_singleton: false
name: warn?
params: ()
visibility: public
ri/1.8/system/Logger/Severity/cdesc-Severity.yaml000064400000001212150403622560015615 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Logging severity.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEBUG
  value: "0"
- !ruby/object:RI::Constant 
  comment: 
  name: INFO
  value: "1"
- !ruby/object:RI::Constant 
  comment: 
  name: WARN
  value: "2"
- !ruby/object:RI::Constant 
  comment: 
  name: ERROR
  value: "3"
- !ruby/object:RI::Constant 
  comment: 
  name: FATAL
  value: "4"
- !ruby/object:RI::Constant 
  comment: 
  name: UNKNOWN
  value: "5"
full_name: Logger::Severity
includes: []

instance_methods: []

name: Severity
superclass: 
ri/1.8/system/Logger/debug-i.yaml000064400000000502150403622560012427 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Log a <tt>DEBUG</tt> message.
- !ruby/struct:SM::Flow::P 
  body: "See #info for more information."
full_name: Logger#debug
is_singleton: false
name: debug
params: (progname = nil, &block)
visibility: public
ri/1.8/system/Logger/warn-i.yaml000064400000000477150403622560012323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Log a <tt>WARN</tt> message.
- !ruby/struct:SM::Flow::P 
  body: "See #info for more information."
full_name: Logger#warn
is_singleton: false
name: warn
params: (progname = nil, &block)
visibility: public
ri/1.8/system/Rational/%25-i.yaml000064400000001105150403622570012167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the remainder when this value is divided by <tt>other</tt>.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  r = Rational(7,4)    # -&gt; Rational(7,4)\n  r % Rational(1,2)    # -&gt; Rational(1,4)\n  r % 1                # -&gt; Rational(3,4)\n  r % Rational(1,7)    # -&gt; Rational(1,28)\n  r % 0.26             # -&gt; 0.19\n"
full_name: Rational#%
is_singleton: false
name: "%"
params: (other)
visibility: public
ri/1.8/system/Rational/new%21-c.yaml000064400000000566150403622610012674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Implements the constructor. This method does not reduce to lowest terms or check for division by zero. Therefore #Rational() should be preferred in normal use."
full_name: Rational::new!
is_singleton: true
name: new!
params: (num, den = 1)
visibility: public
ri/1.8/system/Rational/%2a%2a-i.yaml000064400000001011150403622610012522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns this value raised to the given power.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  r = Rational(3,4)    # -&gt; Rational(3,4)\n  r ** 2               # -&gt; Rational(9,16)\n  r ** 2.0             # -&gt; 0.5625\n  r ** Rational(1,2)   # -&gt; 0.866025403784439\n"
full_name: Rational#**
is_singleton: false
name: "**"
params: (other)
visibility: public
ri/1.8/system/Rational/%3c%3d%3e-i.yaml000064400000000351150403622620013035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Standard comparison operator.
full_name: Rational#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/Rational/coerce-i.yaml000064400000000255150403622630013136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rational#coerce
is_singleton: false
name: coerce
params: (other)
visibility: public
ri/1.8/system/Rational/to_i-i.yaml000064400000000336150403622640012631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #truncate"
full_name: Rational#to_i
is_singleton: false
name: to_i
params: ()
visibility: public
ri/1.8/system/Rational/%2f-i.yaml000064400000000720150403622650012251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the quotient of this value and <tt>a</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  r = Rational(3,4)    # -&gt; Rational(3,4)\n  r / 2                # -&gt; Rational(3,8)\n  r / 2.0              # -&gt; 0.375\n  r / Rational(1,2)    # -&gt; Rational(3,2)\n"
full_name: Rational#/
is_singleton: false
name: /
params: (a)
visibility: public
ri/1.8/system/Rational/divmod-i.yaml000064400000000701150403622650013156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the quotient <em>and</em> remainder.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  r = Rational(7,4)        # -&gt; Rational(7,4)\n  r.divmod Rational(1,2)   # -&gt; [3, Rational(1,4)]\n"
full_name: Rational#divmod
is_singleton: false
name: divmod
params: (other)
visibility: public
ri/1.8/system/Rational/hash-i.yaml000064400000000354150403622660012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a hash code for the object.
full_name: Rational#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/Rational/abs-i.yaml000064400000000342150403622660012443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the absolute value.
full_name: Rational#abs
is_singleton: false
name: abs
params: ()
visibility: public
ri/1.8/system/Rational/%2a-i.yaml000064400000001057150403622670012252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the product of this value and <tt>a</tt>.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  r = Rational(3,4)    # -&gt; Rational(3,4)\n  r * 2                # -&gt; Rational(3,2)\n  r * 4                # -&gt; Rational(3,1)\n  r * 0.5              # -&gt; 0.375\n  r * Rational(1,2)    # -&gt; Rational(3,8)\n"
full_name: Rational#*
is_singleton: false
name: "*"
params: (a)
visibility: public
ri/1.8/system/Rational/inspect-i.yaml000064400000000553150403622700013342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a reconstructable string representation:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(5,8).inspect     # -&gt; &quot;Rational(5, 8)&quot;\n"
full_name: Rational#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Rational/ceil-i.yaml000064400000000244150403622700012606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rational#ceil
is_singleton: false
name: ceil
params: ()
visibility: public
ri/1.8/system/Rational/new-c.yaml000064400000000357150403622710012463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method is actually private.
full_name: Rational::new
is_singleton: true
name: new
params: (num, den)
visibility: public
ri/1.8/system/Rational/power2-i.yaml000064400000000255150403622720013114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rational#power2
is_singleton: false
name: power2
params: (other)
visibility: public
ri/1.8/system/Rational/cdesc-Rational.yaml000064400000005714150403622730014306 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: denominator
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: numerator
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new!
- !ruby/object:RI::MethodSummary 
  name: reduce
comment: 
- !ruby/struct:SM::Flow::P 
  body: Rational implements a rational class for numbers.
- !ruby/struct:SM::Flow::P 
  body: <em>A rational number is a number that can be expressed as a fraction p/q where p and q are integers and q != 0. A rational number p/q is said to have numerator p and denominator q. Numbers that are not rational are called irrational numbers.</em> (http://mathworld.wolfram.com/RationalNumber.html)
- !ruby/struct:SM::Flow::P 
  body: "To create a Rational Number:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(a,b)             # -&gt; a/b\n  Rational.new!(a,b)        # -&gt; a/b\n"
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(5,6)             # -&gt; 5/6\n  Rational(5)               # -&gt; 5/1\n"
- !ruby/struct:SM::Flow::P 
  body: "Rational numbers are reduced to their lowest terms:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(6,10)            # -&gt; 3/5\n"
- !ruby/struct:SM::Flow::P 
  body: "But not if you use the unusual method &quot;new!&quot;:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational.new!(6,10)       # -&gt; 6/10\n"
- !ruby/struct:SM::Flow::P 
  body: "Division by zero is obviously not allowed:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(3,0)             # -&gt; ZeroDivisionError\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Unify
  value: "true"
full_name: Rational
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "%"
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: abs
- !ruby/object:RI::MethodSummary 
  name: ceil
- !ruby/object:RI::MethodSummary 
  name: coerce
- !ruby/object:RI::MethodSummary 
  name: div
- !ruby/object:RI::MethodSummary 
  name: divmod
- !ruby/object:RI::MethodSummary 
  name: floor
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: power2
- !ruby/object:RI::MethodSummary 
  name: round
- !ruby/object:RI::MethodSummary 
  name: to_f
- !ruby/object:RI::MethodSummary 
  name: to_i
- !ruby/object:RI::MethodSummary 
  name: to_r
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: truncate
name: Rational
superclass: Object
ri/1.8/system/Rational/%2b-i.yaml000064400000000727150403622740012254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the addition of this value and <tt>a</tt>.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  r = Rational(3,4)      # -&gt; Rational(3,4)\n  r + 1                  # -&gt; Rational(7,4)\n  r + 0.5                # -&gt; 1.25\n"
full_name: Rational#+
is_singleton: false
name: +
params: (a)
visibility: public
ri/1.8/system/Rational/truncate-i.yaml000064400000000324150403622740013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: to_i
block_params: 
comment: 
full_name: Rational#truncate
is_singleton: false
name: truncate
params: ()
visibility: public
ri/1.8/system/Rational/to_s-i.yaml000064400000000673150403622750012651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string representation of the rational number.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(3,4).to_s          #  &quot;3/4&quot;\n  Rational(8).to_s            #  &quot;8&quot;\n"
full_name: Rational#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Rational/%3d%3d-i.yaml000064400000001037150403622760012550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff this value is numerically equal to <tt>other</tt>.
- !ruby/struct:SM::Flow::P 
  body: "But beware:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(1,2) == Rational(4,8)          # -&gt; true\n  Rational(1,2) == Rational.new!(4,8)     # -&gt; false\n"
- !ruby/struct:SM::Flow::P 
  body: Don't use Rational.new!
full_name: Rational#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/Rational/to_r-i.yaml000064400000000337150403622760012646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>self</tt>.
full_name: Rational#to_r
is_singleton: false
name: to_r
params: ()
visibility: public
ri/1.8/system/Rational/div-i.yaml000064400000000247150403622770012466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rational#div
is_singleton: false
name: div
params: (other)
visibility: public
ri/1.8/system/Rational/round-i.yaml000064400000000246150403623000013015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rational#round
is_singleton: false
name: round
params: ()
visibility: public
ri/1.8/system/Rational/floor-i.yaml000064400000001324150403623010013006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Converts the rational to an Integer. Not the <em>nearest</em> integer, the truncated integer. Study the following example carefully:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(+7,4).to_i             # -&gt; 1\n  Rational(-7,4).to_i             # -&gt; -1\n  (-1.75).to_i                    # -&gt; -1\n"
- !ruby/struct:SM::Flow::P 
  body: "In other words:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Rational(-7,4) == -1.75                 # -&gt; true\n  Rational(-7,4).to_i == (-1.75).to_i     # -&gt; true\n"
full_name: Rational#floor
is_singleton: false
name: floor
params: ()
visibility: public
ri/1.8/system/Rational/to_f-i.yaml000064400000000352150403623010012614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts the rational to a Float.
full_name: Rational#to_f
is_singleton: false
name: to_f
params: ()
visibility: public
ri/1.8/system/Rational/reduce-c.yaml000064400000000463150403623020013132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reduces the given numerator and denominator to their lowest terms. Use Rational() instead.
full_name: Rational::reduce
is_singleton: true
name: reduce
params: (num, den = 1)
visibility: public
ri/1.8/system/Rational/%2d-i.yaml000064400000000742150403623030012244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the difference of this value and <tt>a</tt>. subtracted.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  r = Rational(3,4)    # -&gt; Rational(3,4)\n  r - 1                # -&gt; Rational(-1,4)\n  r - 0.5              # -&gt; 0.25\n"
full_name: Rational#-
is_singleton: false
name: "-"
params: (a)
visibility: public
ri/1.8/system/Pathname/stat-i.yaml000064400000000406150403623040012627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.stat</tt>. Returns a <tt>File::Stat</tt> object.
full_name: Pathname#stat
is_singleton: false
name: stat
params: ()
visibility: public
ri/1.8/system/Pathname/split_names-i.yaml000064400000000407150403623050014174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: split_names(path) -&gt; prefix, [name, ...]
full_name: Pathname#split_names
is_singleton: false
name: split_names
params: (path)
visibility: private
ri/1.8/system/Pathname/add_trailing_separator-i.yaml000064400000000431150403623050016354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: add_trailing_separator(path) -&gt; path
full_name: Pathname#add_trailing_separator
is_singleton: false
name: add_trailing_separator
params: (path)
visibility: private
ri/1.8/system/Pathname/prepend_prefix-i.yaml000064400000000310150403623050014661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#prepend_prefix
is_singleton: false
name: prepend_prefix
params: (prefix, relpath)
visibility: private
ri/1.8/system/Pathname/size-i.yaml000064400000000344150403623060012631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.size</tt>.
full_name: Pathname#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Pathname/eql%3f-i.yaml000064400000000335150403623070012737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #=="
full_name: Pathname#eql?
is_singleton: false
name: eql?
params: (other)
visibility: public
ri/1.8/system/Pathname/ctime-i.yaml000064400000000431150403623070012756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.ctime</tt>. Returns last (directory entry, not file) change time.
full_name: Pathname#ctime
is_singleton: false
name: ctime
params: ()
visibility: public
ri/1.8/system/Pathname/basename-i.yaml000064400000000431150403623070013430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.basename</tt>. Returns the last component of the path.
full_name: Pathname#basename
is_singleton: false
name: basename
params: (*args)
visibility: public
ri/1.8/system/Pathname/chop_basename-i.yaml000064400000000431150403623070014441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: chop_basename(path) -&gt; [pre-basename, basename] or nil
full_name: Pathname#chop_basename
is_singleton: false
name: chop_basename
params: (path)
visibility: private
ri/1.8/system/Pathname/socket%3f-i.yaml000064400000000355150403623070013450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.socket?</tt>.
full_name: Pathname#socket?
is_singleton: false
name: socket?
params: ()
visibility: public
ri/1.8/system/Pathname/readable%3f-i.yaml000064400000000363150403623100013710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.readable?</tt>.
full_name: Pathname#readable?
is_singleton: false
name: readable?
params: ()
visibility: public
ri/1.8/system/Pathname/descend-i.yaml000064400000001645150403623100013264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: v
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over and yields a new Pathname object for each element in the given path in descending order.
- !ruby/struct:SM::Flow::VERB 
  body: " Pathname.new('/path/to/some/file.rb').descend {|v| p v}\n    #&lt;Pathname:/&gt;\n    #&lt;Pathname:/path&gt;\n    #&lt;Pathname:/path/to&gt;\n    #&lt;Pathname:/path/to/some&gt;\n    #&lt;Pathname:/path/to/some/file.rb&gt;\n\n Pathname.new('path/to/some/file.rb').descend {|v| p v}\n    #&lt;Pathname:path&gt;\n    #&lt;Pathname:path/to&gt;\n    #&lt;Pathname:path/to/some&gt;\n    #&lt;Pathname:path/to/some/file.rb&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: It doesn't access actual filesystem.
- !ruby/struct:SM::Flow::P 
  body: This method is available since 1.8.5.
full_name: Pathname#descend
is_singleton: false
name: descend
params: () {|v| ...}
visibility: public
ri/1.8/system/Pathname/exist%3f-i.yaml000064400000000352150403623100013303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.exist?</tt>.
full_name: Pathname#exist?
is_singleton: false
name: exist?
params: ()
visibility: public
ri/1.8/system/Pathname/foreachline-i.yaml000064400000000450150403623100014127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Pathname#foreachline is <b>obsoleted</b> at 1.8.1. Use #each_line."
full_name: Pathname#foreachline
is_singleton: false
name: foreachline
params: (*args, &block)
visibility: public
ri/1.8/system/Pathname/chardev%3f-i.yaml000064400000000360150403623110013563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.chardev?</tt>.
full_name: Pathname#chardev?
is_singleton: false
name: chardev?
params: ()
visibility: public
ri/1.8/system/Pathname/mkpath-i.yaml000064400000000475150403623110013144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileUtils.mkpath</tt>. Creates a full path, including any intermediate directories that don't yet exist.
full_name: Pathname#mkpath
is_singleton: false
name: mkpath
params: ()
visibility: public
ri/1.8/system/Pathname/chmod-i.yaml000064400000000374150403623120012751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.chmod</tt>. Changes permissions.
full_name: Pathname#chmod
is_singleton: false
name: chmod
params: (mode)
visibility: public
ri/1.8/system/Pathname/%3c%3d%3e-i.yaml000064400000000377150403623120013025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Provides for comparing pathnames, case-sensitively.
full_name: Pathname#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/Pathname/mountpoint%3f-i.yaml000064400000000444150403623120014367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "#mountpoint? returns <tt>true</tt> if <tt>self</tt> points to a mountpoint."
full_name: Pathname#mountpoint?
is_singleton: false
name: mountpoint?
params: ()
visibility: public
ri/1.8/system/Pathname/rmdir-i.yaml000064400000000403150403623130012766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Dir.rmdir</tt>. Remove the referenced directory.
full_name: Pathname#rmdir
is_singleton: false
name: rmdir
params: ()
visibility: public
ri/1.8/system/Pathname/entries-i.yaml000064400000000451150403623130013325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the entries (files and subdirectories) in the directory, each as a Pathname object.
full_name: Pathname#entries
is_singleton: false
name: entries
params: ()
visibility: public
ri/1.8/system/Pathname/find-i.yaml000064400000001214150403623130012572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: p
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#find is an iterator to traverse a directory tree in a depth first manner. It yields a Pathname for each file under &quot;this&quot; directory.
- !ruby/struct:SM::Flow::P 
  body: Since it is implemented by <tt>find.rb</tt>, <tt>Find.prune</tt> can be used to control the traverse.
- !ruby/struct:SM::Flow::P 
  body: If <tt>self</tt> is <tt>.</tt>, yielded pathnames begin with a filename in the current directory, not <tt>./</tt>.
full_name: Pathname#find
is_singleton: false
name: find
params: () {|p| ...}
visibility: public
ri/1.8/system/Pathname/glob-c.yaml000064400000000423150403623130012570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: p
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Dir.glob</tt>. Returns or yields Pathname objects.
full_name: Pathname::glob
is_singleton: true
name: glob
params: (*args) {|p| ...}
visibility: public
ri/1.8/system/Pathname/cleanpath-i.yaml000064400000001230150403623130013607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns clean pathname of <tt>self</tt> with consecutive slashes and useless dots removed. The filesystem is not accessed.
- !ruby/struct:SM::Flow::P 
  body: "If <tt>consider_symlink</tt> is <tt>true</tt>, then a more conservative algorithm is used to avoid breaking symbolic linkages. This may retain more <tt>..</tt> entries than absolutely necessary, but without accessing the filesystem, this can't be avoided. See #realpath."
full_name: Pathname#cleanpath
is_singleton: false
name: cleanpath
params: (consider_symlink=false)
visibility: public
ri/1.8/system/Pathname/read-i.yaml000064400000000456150403623130012574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>IO.read</tt>. Returns all the bytes from the file, or the first <tt>N</tt> if specified.
full_name: Pathname#read
is_singleton: false
name: read
params: (*args)
visibility: public
ri/1.8/system/Pathname/TO_PATH-i.yaml000064400000000340150403623140013010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #to_s"
full_name: Pathname#TO_PATH
is_singleton: false
name: TO_PATH
params: ()
visibility: public
ri/1.8/system/Pathname/lstat-i.yaml000064400000000343150403623140013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.lstat</tt>.
full_name: Pathname#lstat
is_singleton: false
name: lstat
params: ()
visibility: public
ri/1.8/system/Pathname/unlink-i.yaml000064400000000523150403623140013155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: delete
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a file or directory, using <tt>File.unlink</tt> or <tt>Dir.unlink</tt> as necessary.
full_name: Pathname#unlink
is_singleton: false
name: unlink
params: ()
visibility: public
ri/1.8/system/Pathname/each_line-i.yaml000064400000000613150403623140013564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: line
comment: 
- !ruby/struct:SM::Flow::P 
  body: "#each_line iterates over the line in the file. It yields a String object for each line."
- !ruby/struct:SM::Flow::P 
  body: This method has existed since 1.8.1.
full_name: Pathname#each_line
is_singleton: false
name: each_line
params: (*args) {|line| ...}
visibility: public
ri/1.8/system/Pathname/world_readable%3f-i.yaml000064400000000405150403623150015121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.world_readable?</tt>.
full_name: Pathname#world_readable?
is_singleton: false
name: world_readable?
params: ()
visibility: public
ri/1.8/system/Pathname/writable%3f-i.yaml000064400000000363150403623150013767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.writable?</tt>.
full_name: Pathname#writable?
is_singleton: false
name: writable?
params: ()
visibility: public
ri/1.8/system/Pathname/each_entry-i.yaml000064400000000633150403623150014001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: p
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over the entries (files and subdirectories) in the directory. It yields a Pathname object for each entry.
- !ruby/struct:SM::Flow::P 
  body: This method has existed since 1.8.1.
full_name: Pathname#each_entry
is_singleton: false
name: each_entry
params: () {|p| ...}
visibility: public
ri/1.8/system/Pathname/executable_real%3f-i.yaml000064400000000410150403623150015273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.executable_real?</tt>.
full_name: Pathname#executable_real?
is_singleton: false
name: executable_real?
params: ()
visibility: public
ri/1.8/system/Pathname/foreach-i.yaml000064400000000446150403623150013271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This method is <b>obsoleted</b> at 1.8.1. Use #each_line or #each_entry."
full_name: Pathname#foreach
is_singleton: false
name: foreach
params: (*args, &block)
visibility: public
ri/1.8/system/Pathname/lchmod-i.yaml000064400000000352150403623150013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.lchmod</tt>.
full_name: Pathname#lchmod
is_singleton: false
name: lchmod
params: (mode)
visibility: public
ri/1.8/system/Pathname/cleanpath_conservative-i.yaml000064400000000311150403623160016401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#cleanpath_conservative
is_singleton: false
name: cleanpath_conservative
params: ()
visibility: private
ri/1.8/system/Pathname/delete-i.yaml000064400000000340150403623160013116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #unlink"
full_name: Pathname#delete
is_singleton: false
name: delete
params: ()
visibility: public
ri/1.8/system/Pathname/expand_path-i.yaml000064400000000372150403623160014154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.expand_path</tt>.
full_name: Pathname#expand_path
is_singleton: false
name: expand_path
params: (*args)
visibility: public
ri/1.8/system/Pathname/dir_foreach-i.yaml000064400000000426150403623160014126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#dir_foreach is <b>obsoleted</b> at 1.8.1.
full_name: Pathname#dir_foreach
is_singleton: false
name: dir_foreach
params: (*args, &block)
visibility: public
ri/1.8/system/Pathname/rename-i.yaml000064400000000371150403623160013127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.rename</tt>. Rename the file.
full_name: Pathname#rename
is_singleton: false
name: rename
params: (to)
visibility: public
ri/1.8/system/Pathname/open-i.yaml000064400000000435150403623160012622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: file
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.open</tt>. Opens the file for reading or writing.
full_name: Pathname#open
is_singleton: false
name: open
params: (*args) {|file| ...}
visibility: public
ri/1.8/system/Pathname/make_link-i.yaml000064400000000402150403623170013606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.link</tt>. Creates a hard link.
full_name: Pathname#make_link
is_singleton: false
name: make_link
params: (old)
visibility: public
ri/1.8/system/Pathname/mkdir-i.yaml000064400000000410150403623170012761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Dir.mkdir</tt>. Create the referenced directory.
full_name: Pathname#mkdir
is_singleton: false
name: mkdir
params: (*args)
visibility: public
ri/1.8/system/Pathname/dirname-i.yaml000064400000000431150403623170013275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.dirname</tt>. Returns all but the last component of the path.
full_name: Pathname#dirname
is_singleton: false
name: dirname
params: ()
visibility: public
ri/1.8/system/Pathname/absolute%3f-i.yaml000064400000000511150403623170013771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Predicate method for testing whether a path is absolute. It returns <tt>true</tt> if the pathname begins with a slash.
full_name: Pathname#absolute?
is_singleton: false
name: absolute?
params: ()
visibility: public
ri/1.8/system/Pathname/new-c.yaml000064400000000547150403623200012443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a Pathname object from the given String (or String-like object). If <tt>path</tt> contains a NUL character (<tt>\0</tt>), an ArgumentError is raised.
full_name: Pathname::new
is_singleton: true
name: new
params: (path)
visibility: public
ri/1.8/system/Pathname/grpowned%3f-i.yaml000064400000000363150403623200013777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.grpowned?</tt>.
full_name: Pathname#grpowned?
is_singleton: false
name: grpowned?
params: ()
visibility: public
ri/1.8/system/Pathname/link-i.yaml000064400000000511150403623200012604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#link is confusing and <b>obsoleted</b> because the receiver/argument order is inverted to corresponding system call.
full_name: Pathname#link
is_singleton: false
name: link
params: (old)
visibility: public
ri/1.8/system/Pathname/readlink-i.yaml000064400000000400150403623200013435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.readlink</tt>. Read symbolic link.
full_name: Pathname#readlink
is_singleton: false
name: readlink
params: ()
visibility: public
ri/1.8/system/Pathname/split-i.yaml000064400000000431150403623200013003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "See <tt>File.split</tt>. Returns the #dirname and the #basename in an Array."
full_name: Pathname#split
is_singleton: false
name: split
params: ()
visibility: public
ri/1.8/system/Pathname/del_trailing_separator-i.yaml000064400000000315150403623200016366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#del_trailing_separator
is_singleton: false
name: del_trailing_separator
params: (path)
visibility: private
ri/1.8/system/Pathname/mtime-i.yaml000064400000000403150403623200012762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.mtime</tt>. Returns last modification time.
full_name: Pathname#mtime
is_singleton: false
name: mtime
params: ()
visibility: public
ri/1.8/system/Pathname/children-i.yaml000064400000002245150403623210013446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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 <tt>with_directory</tt> to <tt>false</tt>, then the returned pathnames will contain the filename only.
- !ruby/struct:SM::Flow::P 
  body: "For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p = Pathname(&quot;/usr/lib/ruby/1.8&quot;)\n  p.children\n      # -&gt; [ Pathname:/usr/lib/ruby/1.8/English.rb,\n             Pathname:/usr/lib/ruby/1.8/Env.rb,\n             Pathname:/usr/lib/ruby/1.8/abbrev.rb, ... ]\n  p.children(false)\n      # -&gt; [ Pathname:English.rb, Pathname:Env.rb, Pathname:abbrev.rb, ... ]\n"
- !ruby/struct:SM::Flow::P 
  body: Note that the result never contain the entries <tt>.</tt> and <tt>..</tt> in the directory because they are not children.
- !ruby/struct:SM::Flow::P 
  body: This method has existed since 1.8.1.
full_name: Pathname#children
is_singleton: false
name: children
params: (with_directory=true)
visibility: public
ri/1.8/system/Pathname/each_filename-i.yaml000064400000000727150403623210014421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: filename
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over each component of the path.
- !ruby/struct:SM::Flow::VERB 
  body: "  Pathname.new(&quot;/usr/bin/ruby&quot;).each_filename {|filename| ... }\n    # yields &quot;usr&quot;, &quot;bin&quot;, and &quot;ruby&quot;.\n"
full_name: Pathname#each_filename
is_singleton: false
name: each_filename
params: ( {|filename| ...}
visibility: public
ri/1.8/system/Pathname/%3d%3d%3d-i.yaml000064400000000333150403623210013015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #=="
full_name: Pathname#===
is_singleton: false
name: ===
params: (other)
visibility: public
ri/1.8/system/Pathname/rmtree-i.yaml000064400000000421150403623210013146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileUtils.rm_r</tt>. Deletes a directory and all beneath it.
full_name: Pathname#rmtree
is_singleton: false
name: rmtree
params: ()
visibility: public
ri/1.8/system/Pathname/getwd-c.yaml000064400000000427150403623220012763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Dir.getwd</tt>. Returns the current working directory as a Pathname.
full_name: Pathname::getwd
is_singleton: true
name: getwd
params: ()
visibility: public
ri/1.8/system/Pathname/lchown-i.yaml000064400000000362150403623220013147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.lchown</tt>.
full_name: Pathname#lchown
is_singleton: false
name: lchown
params: (owner, group)
visibility: public
ri/1.8/system/Pathname/zero%3f-i.yaml000064400000000347150403623220013135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.zero?</tt>.
full_name: Pathname#zero?
is_singleton: false
name: zero?
params: ()
visibility: public
ri/1.8/system/Pathname/sticky%3f-i.yaml000064400000000355150403623220013463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.sticky?</tt>.
full_name: Pathname#sticky?
is_singleton: false
name: sticky?
params: ()
visibility: public
ri/1.8/system/Pathname/%2b-i.yaml000064400000001172150403623230012226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#+ appends a pathname fragment to this one to produce a new Pathname object.
- !ruby/struct:SM::Flow::VERB 
  body: "  p1 = Pathname.new(&quot;/usr&quot;)      # Pathname:/usr\n  p2 = p1 + &quot;bin/ruby&quot;           # Pathname:/usr/bin/ruby\n  p3 = p1 + &quot;/etc/passwd&quot;        # Pathname:/etc/passwd\n"
- !ruby/struct:SM::Flow::P 
  body: This method doesn't access the file system; it is pure string manipulation.
full_name: Pathname#+
is_singleton: false
name: +
params: (other)
visibility: public
ri/1.8/system/Pathname/truncate-i.yaml000064400000000436150403623230013505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.truncate</tt>. Truncate the file to <tt>length</tt> bytes.
full_name: Pathname#truncate
is_singleton: false
name: truncate
params: (length)
visibility: public
ri/1.8/system/Pathname/readable_real%3f-i.yaml000064400000000402150403623230014711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.readable_real?</tt>.
full_name: Pathname#readable_real?
is_singleton: false
name: readable_real?
params: ()
visibility: public
ri/1.8/system/Pathname/utime-i.yaml000064400000000431150403623230012776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.utime</tt>. Update the access and modification times.
full_name: Pathname#utime
is_singleton: false
name: utime
params: (atime, mtime)
visibility: public
ri/1.8/system/Pathname/join-i.yaml000064400000000554150403623230012620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#join joins pathnames.
- !ruby/struct:SM::Flow::P 
  body: <tt>path0.join(path1, ..., pathN)</tt> is the same as <tt>path0 + path1 + ... + pathN</tt>.
full_name: Pathname#join
is_singleton: false
name: join
params: (*args)
visibility: public
ri/1.8/system/Pathname/make_symlink-i.yaml000064400000000417150403623230014342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.symlink</tt>. Creates a symbolic link.
full_name: Pathname#make_symlink
is_singleton: false
name: make_symlink
params: (old)
visibility: public
ri/1.8/system/Pathname/taint-i.yaml000064400000000246150403623240012777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#taint
is_singleton: false
name: taint
params: ()
visibility: public
ri/1.8/system/Pathname/world_writable%3f-i.yaml000064400000000405150403623240015173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.world_writable?</tt>.
full_name: Pathname#world_writable?
is_singleton: false
name: world_writable?
params: ()
visibility: public
ri/1.8/system/Pathname/realpath_rec-i.yaml000064400000000312150403623240014303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#realpath_rec
is_singleton: false
name: realpath_rec
params: (prefix, unresolved, h)
visibility: private
ri/1.8/system/Pathname/freeze-i.yaml000064400000000250150403623240013133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#freeze
is_singleton: false
name: freeze
params: ()
visibility: public
ri/1.8/system/Pathname/to_s-i.yaml000064400000000420150403623240012616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: TO_PATH
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the path as a String.
full_name: Pathname#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Pathname/directory%3f-i.yaml000064400000000366150403623250014166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.directory?</tt>.
full_name: Pathname#directory?
is_singleton: false
name: directory?
params: ()
visibility: public
ri/1.8/system/Pathname/symlink%3f-i.yaml000064400000000360150403623250013642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.symlink?</tt>.
full_name: Pathname#symlink?
is_singleton: false
name: symlink?
params: ()
visibility: public
ri/1.8/system/Pathname/%3d%3d-i.yaml000064400000000716150403623250012532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: ===
- !ruby/object:RI::AliasName 
  name: eql?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compare this pathname with <tt>other</tt>. The comparison is string-based. Be aware that two different paths (<tt>foo.txt</tt> and <tt>./foo.txt</tt>) can refer to the same file.
full_name: Pathname#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/Pathname/fnmatch-i.yaml000064400000000467150403623250013306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.fnmatch</tt>. Return <tt>true</tt> if the receiver matches the given pattern.
full_name: Pathname#fnmatch
is_singleton: false
name: fnmatch
params: (pattern, *args)
visibility: public
ri/1.8/system/Pathname/cdesc-Pathname.yaml000064400000037014150403623260014253 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: getwd
- !ruby/object:RI::MethodSummary 
  name: glob
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Pathname
- !ruby/struct:SM::Flow::P 
  body: "Pathname represents a pathname which locates a file in a filesystem. The pathname depends on OS: Unix, Windows, etc. Pathname library works with pathnames of local OS. However non-Unix pathnames are supported experimentally."
- !ruby/struct:SM::Flow::P 
  body: It does not represent the file itself. A Pathname can be relative or absolute. It's not until you try to reference the file that it even matters whether the file exists or not.
- !ruby/struct:SM::Flow::P 
  body: Pathname is immutable. It has no method for destructive update.
- !ruby/struct:SM::Flow::P 
  body: The value of this class is to manipulate file path information in a neater way than standard Ruby provides. The examples below demonstrate the difference. <b>All</b> functionality from File, FileTest, and some from Dir and FileUtils is included, in an unsurprising way. It is essentially a facade for all of these, and more.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example 1: Using Pathname"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'pathname'\n  p = Pathname.new(&quot;/usr/bin/ruby&quot;)\n  size = p.size              # 27662\n  isdir = p.directory?       # false\n  dir  = p.dirname           # Pathname:/usr/bin\n  base = p.basename          # Pathname:ruby\n  dir, base = p.split        # [Pathname:/usr/bin, Pathname:ruby]\n  data = p.read\n  p.open { |f| _ }\n  p.each_line { |line| _ }\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example 2: Using standard Ruby"
- !ruby/struct:SM::Flow::VERB 
  body: "  p = &quot;/usr/bin/ruby&quot;\n  size = File.size(p)        # 27662\n  isdir = File.directory?(p) # false\n  dir  = File.dirname(p)     # &quot;/usr/bin&quot;\n  base = File.basename(p)    # &quot;ruby&quot;\n  dir, base = File.split(p)  # [&quot;/usr/bin&quot;, &quot;ruby&quot;]\n  data = File.read(p)\n  File.open(p) { |f| _ }\n  File.foreach(p) { |line| _ }\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example 3: Special features"
- !ruby/struct:SM::Flow::VERB 
  body: "  p1 = Pathname.new(&quot;/usr/lib&quot;)   # Pathname:/usr/lib\n  p2 = p1 + &quot;ruby/1.8&quot;            # Pathname:/usr/lib/ruby/1.8\n  p3 = p1.parent                  # Pathname:/usr\n  p4 = p2.relative_path_from(p3)  # Pathname:lib/ruby/1.8\n  pwd = Pathname.pwd              # Pathname:/home/gavin\n  pwd.absolute?                   # true\n  p5 = Pathname.new &quot;.&quot;           # Pathname:.\n  p5 = p5 + &quot;music/../articles&quot;   # Pathname:music/../articles\n  p5.cleanpath                    # Pathname:articles\n  p5.realpath                     # Pathname:/home/gavin/articles\n  p5.children                     # [Pathname:/home/gavin/articles/linux, ...]\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Breakdown of functionality
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Core methods
- !ruby/struct:SM::Flow::P 
  body: "These methods are effectively manipulating a String, because that's all a path is. Except for #mountpoint?, #children, and #realpath, they don't access the filesystem."
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: +
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#join"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#parent"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#root?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#absolute?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#relative?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#relative_path_from"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#each_filename"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#cleanpath"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#realpath"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#children"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#mountpoint?"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: File status predicate methods
- !ruby/struct:SM::Flow::P 
  body: "These methods are a facade for FileTest:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#blockdev?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#chardev?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#directory?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#executable?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#executable_real?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#exist?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#file?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#grpowned?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#owned?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#pipe?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#readable?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#world_readable?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#readable_real?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#setgid?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#setuid?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#size"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#size?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#socket?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#sticky?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#symlink?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#writable?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#world_writable?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#writable_real?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#zero?"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: File property and manipulation methods
- !ruby/struct:SM::Flow::P 
  body: "These methods are a facade for File:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#atime"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#ctime"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#mtime"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#chmod(mode)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#lchmod(mode)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#chown(owner, group)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#lchown(owner, group)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#fnmatch(pattern, *args)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#fnmatch?(pattern, *args)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#ftype"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#make_link(old)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#open(*args, &amp;block)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#readlink"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rename(to)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#stat"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#lstat"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#make_symlink(old)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#truncate(length)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#utime(atime, mtime)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#basename(*args)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#dirname"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#extname"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#expand_path(*args)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#split"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Directory methods
- !ruby/struct:SM::Flow::P 
  body: "These methods are a facade for Dir:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Pathname.glob(*args)
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Pathname.getwd / Pathname.pwd
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rmdir"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#entries"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#each_entry(&amp;block)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#mkdir(*args)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#opendir(*args)"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: IO
- !ruby/struct:SM::Flow::P 
  body: "These methods are a facade for IO:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#each_line(*args, &amp;block)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#read(*args)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#readlines(*args)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#sysopen(*args)"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Utilities
- !ruby/struct:SM::Flow::P 
  body: "These methods are a mixture of Find, FileUtils, and others:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#find(&amp;block)"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#mkpath"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rmtree"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#unlink / #delete"
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Method documentation
- !ruby/struct:SM::Flow::P 
  body: As the above section shows, most of the methods in Pathname are facades. The documentation for these methods generally just says, for instance, &quot;See FileTest.writable?&quot;, as you should be familiar with the original method anyway, and its documentation (e.g. through <tt>ri</tt>) will contain more information. In some cases, a brief description will follow.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: SEPARATOR_PAT
  value: /[#{Regexp.quote File::ALT_SEPARATOR}#{Regexp.quote File::SEPARATOR}]/
- !ruby/object:RI::Constant 
  comment: 
  name: SEPARATOR_PAT
  value: /#{Regexp.quote File::SEPARATOR}/
full_name: Pathname
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: TO_PATH
- !ruby/object:RI::MethodSummary 
  name: absolute?
- !ruby/object:RI::MethodSummary 
  name: add_trailing_separator
- !ruby/object:RI::MethodSummary 
  name: ascend
- !ruby/object:RI::MethodSummary 
  name: atime
- !ruby/object:RI::MethodSummary 
  name: basename
- !ruby/object:RI::MethodSummary 
  name: blockdev?
- !ruby/object:RI::MethodSummary 
  name: chardev?
- !ruby/object:RI::MethodSummary 
  name: chdir
- !ruby/object:RI::MethodSummary 
  name: children
- !ruby/object:RI::MethodSummary 
  name: chmod
- !ruby/object:RI::MethodSummary 
  name: chop_basename
- !ruby/object:RI::MethodSummary 
  name: chown
- !ruby/object:RI::MethodSummary 
  name: chroot
- !ruby/object:RI::MethodSummary 
  name: cleanpath
- !ruby/object:RI::MethodSummary 
  name: cleanpath_aggressive
- !ruby/object:RI::MethodSummary 
  name: cleanpath_conservative
- !ruby/object:RI::MethodSummary 
  name: ctime
- !ruby/object:RI::MethodSummary 
  name: del_trailing_separator
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: descend
- !ruby/object:RI::MethodSummary 
  name: dir_foreach
- !ruby/object:RI::MethodSummary 
  name: directory?
- !ruby/object:RI::MethodSummary 
  name: dirname
- !ruby/object:RI::MethodSummary 
  name: each_entry
- !ruby/object:RI::MethodSummary 
  name: each_filename
- !ruby/object:RI::MethodSummary 
  name: each_line
- !ruby/object:RI::MethodSummary 
  name: entries
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: executable?
- !ruby/object:RI::MethodSummary 
  name: executable_real?
- !ruby/object:RI::MethodSummary 
  name: exist?
- !ruby/object:RI::MethodSummary 
  name: expand_path
- !ruby/object:RI::MethodSummary 
  name: extname
- !ruby/object:RI::MethodSummary 
  name: file?
- !ruby/object:RI::MethodSummary 
  name: find
- !ruby/object:RI::MethodSummary 
  name: fnmatch
- !ruby/object:RI::MethodSummary 
  name: fnmatch?
- !ruby/object:RI::MethodSummary 
  name: foreach
- !ruby/object:RI::MethodSummary 
  name: foreachline
- !ruby/object:RI::MethodSummary 
  name: freeze
- !ruby/object:RI::MethodSummary 
  name: ftype
- !ruby/object:RI::MethodSummary 
  name: grpowned?
- !ruby/object:RI::MethodSummary 
  name: has_trailing_separator?
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: lchmod
- !ruby/object:RI::MethodSummary 
  name: lchown
- !ruby/object:RI::MethodSummary 
  name: link
- !ruby/object:RI::MethodSummary 
  name: lstat
- !ruby/object:RI::MethodSummary 
  name: make_link
- !ruby/object:RI::MethodSummary 
  name: make_symlink
- !ruby/object:RI::MethodSummary 
  name: mkdir
- !ruby/object:RI::MethodSummary 
  name: mkpath
- !ruby/object:RI::MethodSummary 
  name: mountpoint?
- !ruby/object:RI::MethodSummary 
  name: mtime
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: opendir
- !ruby/object:RI::MethodSummary 
  name: owned?
- !ruby/object:RI::MethodSummary 
  name: parent
- !ruby/object:RI::MethodSummary 
  name: pipe?
- !ruby/object:RI::MethodSummary 
  name: plus
- !ruby/object:RI::MethodSummary 
  name: prepend_prefix
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: readable?
- !ruby/object:RI::MethodSummary 
  name: readable_real?
- !ruby/object:RI::MethodSummary 
  name: readlines
- !ruby/object:RI::MethodSummary 
  name: readlink
- !ruby/object:RI::MethodSummary 
  name: realpath
- !ruby/object:RI::MethodSummary 
  name: realpath_rec
- !ruby/object:RI::MethodSummary 
  name: relative?
- !ruby/object:RI::MethodSummary 
  name: relative_path_from
- !ruby/object:RI::MethodSummary 
  name: rename
- !ruby/object:RI::MethodSummary 
  name: rmdir
- !ruby/object:RI::MethodSummary 
  name: rmtree
- !ruby/object:RI::MethodSummary 
  name: root?
- !ruby/object:RI::MethodSummary 
  name: setgid?
- !ruby/object:RI::MethodSummary 
  name: setuid?
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: size?
- !ruby/object:RI::MethodSummary 
  name: socket?
- !ruby/object:RI::MethodSummary 
  name: split
- !ruby/object:RI::MethodSummary 
  name: split_names
- !ruby/object:RI::MethodSummary 
  name: stat
- !ruby/object:RI::MethodSummary 
  name: sticky?
- !ruby/object:RI::MethodSummary 
  name: sub
- !ruby/object:RI::MethodSummary 
  name: symlink
- !ruby/object:RI::MethodSummary 
  name: symlink?
- !ruby/object:RI::MethodSummary 
  name: sysopen
- !ruby/object:RI::MethodSummary 
  name: taint
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: truncate
- !ruby/object:RI::MethodSummary 
  name: unlink
- !ruby/object:RI::MethodSummary 
  name: untaint
- !ruby/object:RI::MethodSummary 
  name: utime
- !ruby/object:RI::MethodSummary 
  name: world_readable?
- !ruby/object:RI::MethodSummary 
  name: world_writable?
- !ruby/object:RI::MethodSummary 
  name: writable?
- !ruby/object:RI::MethodSummary 
  name: writable_real?
- !ruby/object:RI::MethodSummary 
  name: zero?
name: Pathname
superclass: Object
ri/1.8/system/Pathname/setgid%3f-i.yaml000064400000000355150403623260013440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.setgid?</tt>.
full_name: Pathname#setgid?
is_singleton: false
name: setgid?
params: ()
visibility: public
ri/1.8/system/Pathname/cleanpath_aggressive-i.yaml000064400000000546150403623260016043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Clean the path simply by resolving and removing excess &quot;.&quot; and &quot;..&quot; entries. Nothing more, nothing less.
full_name: Pathname#cleanpath_aggressive
is_singleton: false
name: cleanpath_aggressive
params: ()
visibility: private
ri/1.8/system/Pathname/setuid%3f-i.yaml000064400000000355150403623270013457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.setuid?</tt>.
full_name: Pathname#setuid?
is_singleton: false
name: setuid?
params: ()
visibility: public
ri/1.8/system/Pathname/has_trailing_separator%3f-i.yaml000064400000000434150403623270016704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: has_trailing_separator?(path) -&gt; bool
full_name: Pathname#has_trailing_separator?
is_singleton: false
name: has_trailing_separator?
params: (path)
visibility: private
ri/1.8/system/Pathname/chroot-i.yaml000064400000000372150403623270013161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#chroot is <b>obsoleted</b> at 1.8.1.
full_name: Pathname#chroot
is_singleton: false
name: chroot
params: ()
visibility: public
ri/1.8/system/Pathname/atime-i.yaml000064400000000375150403623270012765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.atime</tt>. Returns last access time.
full_name: Pathname#atime
is_singleton: false
name: atime
params: ()
visibility: public
ri/1.8/system/Pathname/sub-i.yaml000064400000000447150403623300012451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (*args)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a pathname which is substituted by String#sub.
full_name: Pathname#sub
is_singleton: false
name: sub
params: (pattern, *rest, &block) {|*args| ...}
visibility: public
ri/1.8/system/Pathname/ascend-i.yaml000064400000001646150403623300013117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: self
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over and yields a new Pathname object for each element in the given path in ascending order.
- !ruby/struct:SM::Flow::VERB 
  body: " Pathname.new('/path/to/some/file.rb').ascend {|v| p v}\n    #&lt;Pathname:/path/to/some/file.rb&gt;\n    #&lt;Pathname:/path/to/some&gt;\n    #&lt;Pathname:/path/to&gt;\n    #&lt;Pathname:/path&gt;\n    #&lt;Pathname:/&gt;\n\n Pathname.new('path/to/some/file.rb').ascend {|v| p v}\n    #&lt;Pathname:path/to/some/file.rb&gt;\n    #&lt;Pathname:path/to/some&gt;\n    #&lt;Pathname:path/to&gt;\n    #&lt;Pathname:path&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: It doesn't access actual filesystem.
- !ruby/struct:SM::Flow::P 
  body: This method is available since 1.8.5.
full_name: Pathname#ascend
is_singleton: false
name: ascend
params: () {|self| ...}
visibility: public
ri/1.8/system/Pathname/chdir-i.yaml000064400000000375150403623300012751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#chdir is <b>obsoleted</b> at 1.8.1.
full_name: Pathname#chdir
is_singleton: false
name: chdir
params: (&block)
visibility: public
ri/1.8/system/Pathname/blockdev%3f-i.yaml000064400000000363150403623300013744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.blockdev?</tt>.
full_name: Pathname#blockdev?
is_singleton: false
name: blockdev?
params: ()
visibility: public
ri/1.8/system/Pathname/extname-i.yaml000064400000000407150403623310013316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.extname</tt>. Returns the file's extension.
full_name: Pathname#extname
is_singleton: false
name: extname
params: ()
visibility: public
ri/1.8/system/Pathname/fnmatch%3f-i.yaml000064400000000417150403623310013574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "See <tt>File.fnmatch?</tt> (same as #fnmatch)."
full_name: Pathname#fnmatch?
is_singleton: false
name: fnmatch?
params: (pattern, *args)
visibility: public
ri/1.8/system/Pathname/pipe%3f-i.yaml000064400000000347150403623310013113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.pipe?</tt>.
full_name: Pathname#pipe?
is_singleton: false
name: pipe?
params: ()
visibility: public
ri/1.8/system/Pathname/plus-i.yaml000064400000000261150403623310012636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#plus
is_singleton: false
name: plus
params: (path1, path2)
visibility: private
ri/1.8/system/Pathname/ftype-i.yaml000064400000000464150403623310013007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.ftype</tt>. Returns &quot;type&quot; of file (&quot;file&quot;, &quot;directory&quot;, etc).
full_name: Pathname#ftype
is_singleton: false
name: ftype
params: ()
visibility: public
ri/1.8/system/Pathname/writable_real%3f-i.yaml000064400000000402150403623320014763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.writable_real?</tt>.
full_name: Pathname#writable_real?
is_singleton: false
name: writable_real?
params: ()
visibility: public
ri/1.8/system/Pathname/readlines-i.yaml000064400000000427150403623320013626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>IO.readlines</tt>. Returns all the lines from the file.
full_name: Pathname#readlines
is_singleton: false
name: readlines
params: (*args)
visibility: public
ri/1.8/system/Pathname/opendir-i.yaml000064400000000364150403623320013320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: dir
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Dir.open</tt>.
full_name: Pathname#opendir
is_singleton: false
name: opendir
params: () {|dir| ...}
visibility: public
ri/1.8/system/Pathname/untaint-i.yaml000064400000000252150403623320013336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Pathname#untaint
is_singleton: false
name: untaint
params: ()
visibility: public
ri/1.8/system/Pathname/root%3f-i.yaml000064400000000763150403623320013144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "#root? is a predicate for root directories. I.e. it returns <tt>true</tt> if the pathname consists of consecutive slashes."
- !ruby/struct:SM::Flow::P 
  body: It doesn't access actual filesystem. So it may return <tt>false</tt> for some pathnames which points to roots such as <tt>/usr/..</tt>.
full_name: Pathname#root?
is_singleton: false
name: root?
params: ()
visibility: public
ri/1.8/system/Pathname/relative_path_from-i.yaml000064400000001340150403623330015526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "#relative_path_from returns a relative path from the argument to the receiver. If <tt>self</tt> is absolute, the argument must be absolute too. If <tt>self</tt> is relative, the argument must be relative too."
- !ruby/struct:SM::Flow::P 
  body: "#relative_path_from doesn't access the filesystem. It assumes no symlinks."
- !ruby/struct:SM::Flow::P 
  body: ArgumentError is raised when it cannot find a relative path.
- !ruby/struct:SM::Flow::P 
  body: This method has existed since 1.8.1.
full_name: Pathname#relative_path_from
is_singleton: false
name: relative_path_from
params: (base_directory)
visibility: public
ri/1.8/system/Pathname/realpath-i.yaml000064400000000703150403623330013456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a real (absolute) pathname of <tt>self</tt> in the actual filesystem. The real pathname doesn't contain symlinks or useless dots.
- !ruby/struct:SM::Flow::P 
  body: No arguments should be given; the old behaviour is <b>obsoleted</b>.
full_name: Pathname#realpath
is_singleton: false
name: realpath
params: ()
visibility: public
ri/1.8/system/Pathname/symlink-i.yaml000064400000000522150403623330013343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pathname#symlink is confusing and <b>obsoleted</b> because the receiver/argument order is inverted to corresponding system call.
full_name: Pathname#symlink
is_singleton: false
name: symlink
params: (old)
visibility: public
ri/1.8/system/Pathname/sysopen-i.yaml000064400000000354150403623340013361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>IO.sysopen</tt>.
full_name: Pathname#sysopen
is_singleton: false
name: sysopen
params: (*args)
visibility: public
ri/1.8/system/Pathname/file%3f-i.yaml000064400000000347150403623340013100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.file?</tt>.
full_name: Pathname#file?
is_singleton: false
name: file?
params: ()
visibility: public
ri/1.8/system/Pathname/executable%3f-i.yaml000064400000000371150403623340014277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.executable?</tt>.
full_name: Pathname#executable?
is_singleton: false
name: executable?
params: ()
visibility: public
ri/1.8/system/Pathname/chown-i.yaml000064400000000417150403623340012777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>File.chown</tt>. Change owner and group of file.
full_name: Pathname#chown
is_singleton: false
name: chown
params: (owner, group)
visibility: public
ri/1.8/system/Pathname/relative%3f-i.yaml000064400000000357150403623350013776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "The opposite of #absolute?"
full_name: Pathname#relative?
is_singleton: false
name: relative?
params: ()
visibility: public
ri/1.8/system/Pathname/owned%3f-i.yaml000064400000000352150403623350013272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.owned?</tt>.
full_name: Pathname#owned?
is_singleton: false
name: owned?
params: ()
visibility: public
ri/1.8/system/Pathname/size%3f-i.yaml000064400000000347150403623350013134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>FileTest.size?</tt>.
full_name: Pathname#size?
is_singleton: false
name: size?
params: ()
visibility: public
ri/1.8/system/Pathname/parent-i.yaml000064400000000476150403623360013161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "#parent returns the parent directory."
- !ruby/struct:SM::Flow::P 
  body: This is same as <tt>self + '..'</tt>.
full_name: Pathname#parent
is_singleton: false
name: parent
params: ()
visibility: public
ri/1.8/system/Mutex/cdesc-Mutex.yaml000064400000001770150403623360013166 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Mutex implements a simple semaphore that can be used to coordinate access to shared data from multiple concurrent threads.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'thread'\n  semaphore = Mutex.new\n\n  a = Thread.new {\n    semaphore.synchronize {\n      # access shared resource\n    }\n  }\n\n  b = Thread.new {\n    semaphore.synchronize {\n      # access shared resource\n    }\n  }\n"
constants: []

full_name: Mutex
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: exclusive_unlock
- !ruby/object:RI::MethodSummary 
  name: lock
- !ruby/object:RI::MethodSummary 
  name: locked?
- !ruby/object:RI::MethodSummary 
  name: synchronize
- !ruby/object:RI::MethodSummary 
  name: try_lock
- !ruby/object:RI::MethodSummary 
  name: unlock
name: Mutex
superclass: Object
ri/1.8/system/Mutex/try_lock-i.yaml000064400000000461150403623370013056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempts to obtain the lock and returns immediately. Returns <tt>true</tt> if the lock was granted.
full_name: Mutex#try_lock
is_singleton: false
name: try_lock
params: ()
visibility: public
ri/1.8/system/Mutex/exclusive_unlock-i.yaml000064400000000517150403623370014614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: If the mutex is locked, unlocks the mutex, wakes one waiting thread, and yields in a critical section.
full_name: Mutex#exclusive_unlock
is_singleton: false
name: exclusive_unlock
params: () {|| ...}
visibility: public
ri/1.8/system/Mutex/synchronize-i.yaml000064400000000513150403623370013601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Obtains a lock, runs the block, and releases the lock when the block completes. See the example under Mutex.
full_name: Mutex#synchronize
is_singleton: false
name: synchronize
params: () {|| ...}
visibility: public
ri/1.8/system/Mutex/unlock-i.yaml000064400000000407150403623400012515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Releases the lock. Returns <tt>nil</tt> if ref wasn't locked.
full_name: Mutex#unlock
is_singleton: false
name: unlock
params: ()
visibility: public
ri/1.8/system/Mutex/locked%3f-i.yaml000064400000000420150403623400012754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if this lock is currently held by some thread.
full_name: Mutex#locked?
is_singleton: false
name: locked?
params: ()
visibility: public
ri/1.8/system/Mutex/new-c.yaml000064400000000327150403623400012006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Mutex
full_name: Mutex::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Mutex/lock-i.yaml000064400000000400150403623400012143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempts to grab the lock and waits if it isn't available.
full_name: Mutex#lock
is_singleton: false
name: lock
params: ()
visibility: public
ri/1.8/system/RiError/cdesc-RiError.yaml000064400000000301150403623400013712 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: []

constants: []

full_name: RiError
includes: []

instance_methods: []

name: RiError
superclass: Exception
ri/1.8/system/StrictPrettyExample/cdesc-StrictPrettyExample.yaml000064400000000341150403623400020736 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: StrictPrettyExample
includes: []

instance_methods: []

name: StrictPrettyExample
superclass: Test::Unit::TestCase
ri/1.8/system/Struct/yaml_tag_class_name-c.yaml000064400000000300150403623400015350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Struct::yaml_tag_class_name
is_singleton: true
name: yaml_tag_class_name
params: ()
visibility: public
ri/1.8/system/Struct/size-i.yaml000064400000000767150403623400012367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of instance variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joe.length   #=&gt; 3\n"
full_name: Struct#size
is_singleton: false
name: size
params: |
  struct.length    => fixnum
  struct.size      => fixnum

visibility: public
ri/1.8/system/Struct/eql%3f-i.yaml000064400000000674150403623410012472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "code-seq:"
- !ruby/struct:SM::Flow::VERB 
  body: "  struct.eql?(other)   =&gt; true or false\n"
- !ruby/struct:SM::Flow::P 
  body: Two structures are equal if they are the same object, or if all their fields are equal (using <tt>eql?</tt>).
full_name: Struct#eql?
is_singleton: false
name: eql?
params: (p1)
visibility: public
ri/1.8/system/Struct/%5b%5d-i.yaml000064400000001522150403623410012255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attribute Reference---Returns the value of the instance variable named by <em>symbol</em>, or indexed (0..length-1) by <em>fixnum</em>. Will raise <tt>NameError</tt> if the named variable does not exist, or <tt>IndexError</tt> if the index is out of range.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n\n   joe[&quot;name&quot;]   #=&gt; &quot;Joe Smith&quot;\n   joe[:name]    #=&gt; &quot;Joe Smith&quot;\n   joe[0]        #=&gt; &quot;Joe Smith&quot;\n"
full_name: Struct#[]
is_singleton: false
name: "[]"
params: |
  struct[symbol]    => anObject
  struct[fixnum]    => anObject 

visibility: public
ri/1.8/system/Struct/each-i.yaml000064400000001250150403623410012302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> once for each instance variable, passing the value as a parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joe.each {|x| puts(x) }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Joe Smith\n   123 Maple, Anytown NC\n   12345\n"
full_name: Struct#each
is_singleton: false
name: each
params: |
  struct.each {|obj| block }  => struct

visibility: public
ri/1.8/system/Struct/select-i.yaml000064400000001165150403623410012666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the block passing in successive elements from <em>struct</em>, returning an array containing those elements for which the block returns a true value (equivalent to <tt>Enumerable#select</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   Lots = Struct.new(:a, :b, :c, :d, :e, :f)\n   l = Lots.new(11, 22, 33, 44, 55, 66)\n   l.select {|v| (v % 2).zero? }   #=&gt; [22, 44, 66]\n"
full_name: Struct#select
is_singleton: false
name: select
params: |
  struct.select {|i| block }    => array

visibility: public
ri/1.8/system/Struct/to_a-i.yaml000064400000001034150403623410012324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the values for this instance as an array.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joe.to_a[1]   #=&gt; &quot;123 Maple, Anytown NC&quot;\n"
full_name: Struct#to_a
is_singleton: false
name: to_a
params: |
  struct.to_a     => array
  struct.values   => array

visibility: public
ri/1.8/system/Struct/yaml_tag_read_class-c.yaml000064400000000306150403623410015352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Struct::yaml_tag_read_class
is_singleton: true
name: yaml_tag_read_class
params: ( name )
visibility: public
ri/1.8/system/Struct/to_yaml-i.yaml000064400000000263150403623410013051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Struct#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Struct/hash-i.yaml000064400000000425150403623410012330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a hash value based on this struct's contents.
full_name: Struct#hash
is_singleton: false
name: hash
params: |
  struct.hash   => fixnum

visibility: public
ri/1.8/system/Struct/values_at-i.yaml000064400000001171150403623410013367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the elements in <em>self</em> corresponding to the given selector(s). The selectors may be either integer indices or ranges. See also &lt;/code&gt;.select&lt;code&gt;.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w{ a b c d e f }\n   a.values_at(1, 3, 5)\n   a.values_at(1, 3, 5, 7)\n   a.values_at(-1, -3, -5, -7)\n   a.values_at(1..3, 2...5)\n"
full_name: Struct#values_at
is_singleton: false
name: values_at
params: |
  struct.values_at(selector,... )  => an_array

visibility: public
ri/1.8/system/Struct/yaml_new-c.yaml000064400000000273150403623410013213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Struct::yaml_new
is_singleton: true
name: yaml_new
params: ( klass, tag, val )
visibility: public
ri/1.8/system/Struct/inspect-i.yaml000064400000000470150403623410013052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Describe the contents of this struct in a string.
full_name: Struct#inspect
is_singleton: false
name: inspect
params: |
  struct.to_s      => string
  struct.inspect   => string

visibility: public
ri/1.8/system/Struct/new-c.yaml000064400000000246150403623410012171 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: Struct::new
is_singleton: true
name: new
params: (...)
visibility: public
ri/1.8/system/Struct/pretty_print-i.yaml000064400000000263150403623420014151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Struct#pretty_print
is_singleton: false
name: pretty_print
params: (q)
visibility: public
ri/1.8/system/Struct/members-i.yaml000064400000001074150403623420013041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of strings representing the names of the instance variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joe.members   #=&gt; [&quot;name&quot;, &quot;address&quot;, &quot;zip&quot;]\n"
full_name: Struct#members
is_singleton: false
name: members
params: |
  struct.members    => array

visibility: public
ri/1.8/system/Struct/length-i.yaml000064400000000773150403623420012675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of instance variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joe.length   #=&gt; 3\n"
full_name: Struct#length
is_singleton: false
name: length
params: |
  struct.length    => fixnum
  struct.size      => fixnum

visibility: public
ri/1.8/system/Struct/cdesc-Struct.yaml000064400000004146150403623420013527 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: yaml_new
- !ruby/object:RI::MethodSummary 
  name: yaml_tag_class_name
- !ruby/object:RI::MethodSummary 
  name: yaml_tag_read_class
comment: 
- !ruby/struct:SM::Flow::P 
  body: A <tt>Struct</tt> is a convenient way to bundle a number of attributes together, using accessor methods, without having to write an explicit class.
- !ruby/struct:SM::Flow::P 
  body: The <tt>Struct</tt> class is a generator of specific classes, each one of which is defined to hold a set of variables and their accessors. In these examples, we'll call the generated class ``<em>Customer</em>Class,'' and we'll show an example instance of that class as ``<em>Customer</em>Inst.''
- !ruby/struct:SM::Flow::P 
  body: In the descriptions that follow, the parameter <em>symbol</em> refers to a symbol, which is either a quoted string or a <tt>Symbol</tt> (such as <tt>:name</tt>).
constants: []

full_name: Struct
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_pair
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: members
- !ruby/object:RI::MethodSummary 
  name: pretty_print
- !ruby/object:RI::MethodSummary 
  name: pretty_print_cycle
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: values
- !ruby/object:RI::MethodSummary 
  name: values_at
name: Struct
superclass: Object
ri/1.8/system/Struct/to_s-i.yaml000064400000000462150403623420012353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Describe the contents of this struct in a string.
full_name: Struct#to_s
is_singleton: false
name: to_s
params: |
  struct.to_s      => string
  struct.inspect   => string

visibility: public
ri/1.8/system/Struct/%3d%3d-i.yaml000064400000001606150403623420012257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Equality---Returns <tt>true</tt> if <em>other_struct</em> is equal to this one: they must be of the same class as generated by <tt>Struct::new</tt>, and the values of all instance variables must be equal (according to <tt>Object#==</tt>)."
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe   = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joejr = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   jane  = Customer.new(&quot;Jane Doe&quot;, &quot;456 Elm, Anytown NC&quot;, 12345)\n   joe == joejr   #=&gt; true\n   joe == jane    #=&gt; false\n"
full_name: Struct#==
is_singleton: false
name: ==
params: |
  struct == other_struct     => true or false

visibility: public
ri/1.8/system/Struct/values-i.yaml000064400000001040150403623430012700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the values for this instance as an array.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joe.to_a[1]   #=&gt; &quot;123 Maple, Anytown NC&quot;\n"
full_name: Struct#values
is_singleton: false
name: values
params: |
  struct.to_a     => array
  struct.values   => array

visibility: public
ri/1.8/system/Struct/pretty_print_cycle-i.yaml000064400000000277150403623430015336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Struct#pretty_print_cycle
is_singleton: false
name: pretty_print_cycle
params: (q)
visibility: public
ri/1.8/system/Struct/%5b%5d%3d-i.yaml000064400000001550150403623430012554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attribute Assignment---Assigns to the instance variable named by <em>symbol</em> or <em>fixnum</em> the value <em>obj</em> and returns it. Will raise a <tt>NameError</tt> if the named variable does not exist, or an <tt>IndexError</tt> if the index is out of range.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n\n   joe[&quot;name&quot;] = &quot;Luke&quot;\n   joe[:zip]   = &quot;90210&quot;\n\n   joe.name   #=&gt; &quot;Luke&quot;\n   joe.zip    #=&gt; &quot;90210&quot;\n"
full_name: Struct#[]=
is_singleton: false
name: "[]="
params: |
  struct[symbol] = obj    => obj
  struct[fixnum] = obj    => obj

visibility: public
ri/1.8/system/Struct/each_pair-i.yaml000064400000001454150403623430013325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> once for each instance variable, passing the name (as a symbol) and the value as parameters.
- !ruby/struct:SM::Flow::VERB 
  body: "   Customer = Struct.new(:name, :address, :zip)\n   joe = Customer.new(&quot;Joe Smith&quot;, &quot;123 Maple, Anytown NC&quot;, 12345)\n   joe.each_pair {|name, value| puts(&quot;#{name} =&gt; #{value}&quot;) }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   name =&gt; Joe Smith\n   address =&gt; 123 Maple, Anytown NC\n   zip =&gt; 12345\n"
full_name: Struct#each_pair
is_singleton: false
name: each_pair
params: |
  struct.each_pair {|sym, obj| block }     => struct

visibility: public
ri/1.8/system/RI/AnsiFormatter/display_heading-i.yaml000064400000000326150403623440016340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AnsiFormatter#display_heading
is_singleton: false
name: display_heading
params: (text, level, indent)
visibility: public
ri/1.8/system/RI/AnsiFormatter/cdesc-AnsiFormatter.yaml000064400000001704150403623440016624 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: This formatter uses ANSI escape sequences to colorize stuff works with pages such as man and less.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: HEADINGS
  value: "{       1 => [ \"\\033[1;32m\", \"\\033[m\" ] ,       2 => [\"\\033[4;32m\", \"\\033[m\" ],       3 => [\"\\033[32m\", \"\\033[m\" ]"
- !ruby/object:RI::Constant 
  comment: 
  name: ATTR_MAP
  value: "{       BOLD   => \"1\",       ITALIC => \"33\",       CODE   => \"36\""
full_name: RI::AnsiFormatter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: bold_print
- !ruby/object:RI::MethodSummary 
  name: display_heading
- !ruby/object:RI::MethodSummary 
  name: update_attributes
- !ruby/object:RI::MethodSummary 
  name: write_attribute_text
name: AnsiFormatter
superclass: AttributeFormatter
ri/1.8/system/RI/AnsiFormatter/write_attribute_text-i.yaml000064400000000331150403623450017472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AnsiFormatter#write_attribute_text
is_singleton: false
name: write_attribute_text
params: (prefix, line)
visibility: public
ri/1.8/system/RI/AnsiFormatter/new-c.yaml000064400000000260150403623450013775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AnsiFormatter::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RI/AnsiFormatter/update_attributes-i.yaml000064400000000314150403623450016742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AnsiFormatter#update_attributes
is_singleton: false
name: update_attributes
params: (attr)
visibility: private
ri/1.8/system/RI/AnsiFormatter/bold_print-i.yaml000064400000000274150403623450015353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AnsiFormatter#bold_print
is_singleton: false
name: bold_print
params: (txt)
visibility: public
ri/1.8/system/RI/TextFormatter/raw_print_line-i.yaml000064400000000307150403623450016262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#raw_print_line
is_singleton: false
name: raw_print_line
params: (txt)
visibility: public
ri/1.8/system/RI/TextFormatter/break_to_newline-i.yaml000064400000000564150403623450016562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: called when we want to ensure a nbew 'wrap' starts on a newline Only needed for HtmlFormatter, because the rest do their own line breaking
full_name: RI::TextFormatter#break_to_newline
is_singleton: false
name: break_to_newline
params: ()
visibility: public
ri/1.8/system/RI/TextFormatter/strip_attributes-i.yaml000064400000000310150403623450016647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TextFormatter#strip_attributes
is_singleton: false
name: strip_attributes
params: (txt)
visibility: public
ri/1.8/system/RI/TextFormatter/list-c.yaml000064400000000255150403623450014215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TextFormatter::list
is_singleton: true
name: list
params: ()
visibility: public
ri/1.8/system/RI/TextFormatter/display_heading-i.yaml000064400000000331150403623450016367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#display_heading
is_singleton: false
name: display_heading
params: (text, level, indent)
visibility: public
ri/1.8/system/RI/TextFormatter/display_verbatim_flow_item-i.yaml000064400000000360150403623450020650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#display_verbatim_flow_item
is_singleton: false
name: display_verbatim_flow_item
params: (item, prefix=@indent)
visibility: public
ri/1.8/system/RI/TextFormatter/conv_html-i.yaml000064400000000402150403623450015233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: convert HTML entities back to ASCII
full_name: RI::TextFormatter#conv_html
is_singleton: false
name: conv_html
params: (txt)
visibility: public
ri/1.8/system/RI/TextFormatter/cdesc-TextFormatter.yaml000064400000002761150403623450016715 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: indent
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: for
- !ruby/object:RI::MethodSummary 
  name: list
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finally, fill in the list of known formatters
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: FORMATTERS
  value: "{       \"ansi\"   => AnsiFormatter,       \"bs\"     => OverstrikeFormatter,       \"html\"   => HtmlFormatter,       \"plain\"  => TextFormatter,       \"simple\" => SimpleFormatter,     }"
full_name: RI::TextFormatter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: blankline
- !ruby/object:RI::MethodSummary 
  name: bold_print
- !ruby/object:RI::MethodSummary 
  name: break_to_newline
- !ruby/object:RI::MethodSummary 
  name: conv_html
- !ruby/object:RI::MethodSummary 
  name: conv_markup
- !ruby/object:RI::MethodSummary 
  name: display_flow
- !ruby/object:RI::MethodSummary 
  name: display_flow_item
- !ruby/object:RI::MethodSummary 
  name: display_heading
- !ruby/object:RI::MethodSummary 
  name: display_list
- !ruby/object:RI::MethodSummary 
  name: display_verbatim_flow_item
- !ruby/object:RI::MethodSummary 
  name: draw_line
- !ruby/object:RI::MethodSummary 
  name: raw_print_line
- !ruby/object:RI::MethodSummary 
  name: strip_attributes
- !ruby/object:RI::MethodSummary 
  name: wrap
name: TextFormatter
superclass: Object
ri/1.8/system/RI/TextFormatter/display_flow_item-i.yaml000064400000000336150403623450016762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#display_flow_item
is_singleton: false
name: display_flow_item
params: (item, prefix=@indent)
visibility: public
ri/1.8/system/RI/TextFormatter/for-c.yaml000064400000000257150403623450014032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TextFormatter::for
is_singleton: true
name: for
params: (name)
visibility: public
ri/1.8/system/RI/TextFormatter/new-c.yaml000064400000000272150403623450014032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TextFormatter::new
is_singleton: true
name: new
params: (options, indent)
visibility: public
ri/1.8/system/RI/TextFormatter/draw_line-i.yaml000064400000000303150403623450015206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#draw_line
is_singleton: false
name: draw_line
params: (label=nil)
visibility: public
ri/1.8/system/RI/TextFormatter/blankline-i.yaml000064400000000272150403623450015206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#blankline
is_singleton: false
name: blankline
params: ()
visibility: public
ri/1.8/system/RI/TextFormatter/wrap-i.yaml000064400000000323150403623450014215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#wrap
is_singleton: false
name: wrap
params: (txt, prefix=@indent, linelen=@width)
visibility: public
ri/1.8/system/RI/TextFormatter/display_flow-i.yaml000064400000000301150403623450015734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TextFormatter#display_flow
is_singleton: false
name: display_flow
params: (flow)
visibility: public
ri/1.8/system/RI/TextFormatter/bold_print-i.yaml000064400000000277150403623450015410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#bold_print
is_singleton: false
name: bold_print
params: (txt)
visibility: public
ri/1.8/system/RI/TextFormatter/display_list-i.yaml000064400000000304150403623450015743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::TextFormatter#display_list
is_singleton: false
name: display_list
params: (list)
visibility: public
ri/1.8/system/RI/TextFormatter/conv_markup-i.yaml000064400000000403150403623450015567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: convert markup into display form
full_name: RI::TextFormatter#conv_markup
is_singleton: false
name: conv_markup
params: (txt)
visibility: public
ri/1.8/system/RI/cdesc-RI.yaml000064400000000631150403623460011602 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: We handle the parsing of options, and subsequently as a singleton object to be queried for option values
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION_STRING
  value: "\"ri v1.0.1 - 20041108\""
full_name: RI
includes: []

instance_methods: []

name: RI
superclass: 
ri/1.8/system/RI/Constant/new-c.yaml000064400000000272150403623460013014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Constant::new
is_singleton: true
name: new
params: (name, value, comment)
visibility: public
ri/1.8/system/RI/Constant/cdesc-Constant.yaml000064400000000557150403623460014661 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: comment
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::Constant
includes: []

instance_methods: []

name: Constant
superclass: NamedThing
ri/1.8/system/RI/IncludedModule/cdesc-IncludedModule.yaml000064400000000321150403623460017056 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RI::IncludedModule
includes: []

instance_methods: []

name: IncludedModule
superclass: NamedThing
ri/1.8/system/RI/HtmlFormatter/break_to_newline-i.yaml000064400000000305150403623460016534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#break_to_newline
is_singleton: false
name: break_to_newline
params: ()
visibility: public
ri/1.8/system/RI/HtmlFormatter/display_heading-i.yaml000064400000000326150403623460016354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#display_heading
is_singleton: false
name: display_heading
params: (text, level, indent)
visibility: public
ri/1.8/system/RI/HtmlFormatter/display_verbatim_flow_item-i.yaml000064400000000355150403623460020635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#display_verbatim_flow_item
is_singleton: false
name: display_verbatim_flow_item
params: (item, prefix=@indent)
visibility: public
ri/1.8/system/RI/HtmlFormatter/write_attribute_text-i.yaml000064400000000331150403623460017505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#write_attribute_text
is_singleton: false
name: write_attribute_text
params: (prefix, line)
visibility: public
ri/1.8/system/RI/HtmlFormatter/new-c.yaml000064400000000260150403623460014010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RI/HtmlFormatter/draw_line-i.yaml000064400000000300150403623460015164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#draw_line
is_singleton: false
name: draw_line
params: (label=nil)
visibility: public
ri/1.8/system/RI/HtmlFormatter/blankline-i.yaml000064400000000267150403623460015173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#blankline
is_singleton: false
name: blankline
params: ()
visibility: public
ri/1.8/system/RI/HtmlFormatter/escape-i.yaml000064400000000265150403623460014472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#escape
is_singleton: false
name: escape
params: (str)
visibility: private
ri/1.8/system/RI/HtmlFormatter/update_attributes-i.yaml000064400000000327150403623460016761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#update_attributes
is_singleton: false
name: update_attributes
params: (current, wanted)
visibility: private
ri/1.8/system/RI/HtmlFormatter/bold_print-i.yaml000064400000000274150403623460015366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::HtmlFormatter#bold_print
is_singleton: false
name: bold_print
params: (txt)
visibility: public
ri/1.8/system/RI/HtmlFormatter/display_list-i.yaml000064400000000304150403623460015724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RI::HtmlFormatter#display_list
is_singleton: false
name: display_list
params: (list)
visibility: public
ri/1.8/system/RI/HtmlFormatter/tag-i.yaml000064400000000273150403623460014004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: RI::HtmlFormatter#tag
is_singleton: false
name: tag
params: (code) {|| ...}
visibility: private
ri/1.8/system/RI/HtmlFormatter/cdesc-HtmlFormatter.yaml000064400000002061150403623460016647 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: This formatter uses HTML.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ATTR_MAP
  value: "{       BOLD   => \"b>\",       ITALIC => \"i>\",       CODE   => \"tt>\""
full_name: RI::HtmlFormatter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: blankline
- !ruby/object:RI::MethodSummary 
  name: bold_print
- !ruby/object:RI::MethodSummary 
  name: break_to_newline
- !ruby/object:RI::MethodSummary 
  name: display_heading
- !ruby/object:RI::MethodSummary 
  name: display_list
- !ruby/object:RI::MethodSummary 
  name: display_verbatim_flow_item
- !ruby/object:RI::MethodSummary 
  name: draw_line
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: tag
- !ruby/object:RI::MethodSummary 
  name: update_attributes
- !ruby/object:RI::MethodSummary 
  name: write_attribute_text
name: HtmlFormatter
superclass: AttributeFormatter
ri/1.8/system/RI/RiCache/new-c.yaml000064400000000251150403623460012516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiCache::new
is_singleton: true
name: new
params: (dirs)
visibility: public
ri/1.8/system/RI/RiCache/cdesc-RiCache.yaml000064400000000633150403623460014066 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: toplevel
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: We represent everything know about all 'ri' files accessible to this program
constants: []

full_name: RI::RiCache
includes: []

instance_methods: []

name: RiCache
superclass: Object
ri/1.8/system/RI/SimpleFormatter/cdesc-SimpleFormatter.yaml000064400000001010150403623460017512 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This formatter reduces extra lines for a simpler output. It improves way output looks for tools like IRC bots.
constants: []

full_name: RI::SimpleFormatter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: blankline
- !ruby/object:RI::MethodSummary 
  name: display_heading
- !ruby/object:RI::MethodSummary 
  name: draw_line
name: SimpleFormatter
superclass: TextFormatter
ri/1.8/system/RI/SimpleFormatter/display_heading-i.yaml000064400000000460150403623470016701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Place heading level indicators inline with heading.
full_name: RI::SimpleFormatter#display_heading
is_singleton: false
name: display_heading
params: (text, level, indent)
visibility: public
ri/1.8/system/RI/SimpleFormatter/draw_line-i.yaml000064400000000404150403623470015517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Display labels only, no lines
full_name: RI::SimpleFormatter#draw_line
is_singleton: false
name: draw_line
params: (label=nil)
visibility: public
ri/1.8/system/RI/SimpleFormatter/blankline-i.yaml000064400000000362150403623470015515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: No extra blank lines
full_name: RI::SimpleFormatter#blankline
is_singleton: false
name: blankline
params: ()
visibility: public
ri/1.8/system/RI/Options/raw_path-i.yaml000064400000000257150403623470013704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Options#raw_path
is_singleton: false
name: raw_path
params: ()
visibility: public
ri/1.8/system/RI/Options/path-i.yaml000064400000000372150403623470013031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the selected documentation directories.
full_name: RI::Options#path
is_singleton: false
name: path
params: ()
visibility: public
ri/1.8/system/RI/Options/show_version-i.yaml000064400000000365150403623500014616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show the version and exit
full_name: RI::Options#show_version
is_singleton: false
name: show_version
params: ()
visibility: public
ri/1.8/system/RI/Options/parse-i.yaml000064400000000355150403623500013202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse command line options.
full_name: RI::Options#parse
is_singleton: false
name: parse
params: (args)
visibility: public
ri/1.8/system/RI/Options/OptionList/usage-c.yaml000064400000000375150403623500015274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show usage and exit
full_name: RI::Options::OptionList::usage
is_singleton: true
name: usage
params: (short_form=false)
visibility: public
ri/1.8/system/RI/Options/OptionList/error-c.yaml000064400000000363150403623500015316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show an error and exit
full_name: RI::Options::OptionList::error
is_singleton: true
name: error
params: (msg)
visibility: public
ri/1.8/system/RI/Options/OptionList/options-c.yaml000064400000000271150403623510015657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Options::OptionList::options
is_singleton: true
name: options
params: ()
visibility: public
ri/1.8/system/RI/Options/OptionList/cdesc-OptionList.yaml000064400000004157150403623510017136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: options
- !ruby/object:RI::MethodSummary 
  name: strip_output
- !ruby/object:RI::MethodSummary 
  name: usage
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: OPTION_LIST
  value: "[         [ \"--help\",          \"-h\",   nil,           \"you're looking at it\" ],          [ \"--classes\",      \"-c\",   nil,           \"Display the names of classes and modules we\\n\" +           \"know about\"],          [ \"--doc-dir\",      \"-d\",   \"<dirname>\",           \"A directory to search for documentation. If not\\n\" +           \"specified, we search the standard rdoc/ri directories.\\n\" +           \"May be repeated.\"],          [ \"--system\",       nil,    nil,           \"Include documentation from Ruby's standard library:\\n  \" +           RI::Paths::SYSDIR ],          [ \"--site\",         nil,    nil,           \"Include documentation from libraries installed in site_lib:\\n  \" +           RI::Paths::SITEDIR ],          [ \"--home\",         nil,    nil,           \"Include documentation stored in ~/.rdoc:\\n  \" +           (RI::Paths::HOMEDIR || \"No ~/.rdoc found\") ],          [ \"--gems\",         nil,    nil,           \"Include documentation from RubyGems:\\n\" +           (RI::Paths::GEMDIRS ?            Gem.path.map { |dir| \"  #{dir}/doc/*/ri\" }.join(\"\\n\") :            \"No Rubygems ri found.\") ],          [ \"--format\",       \"-f\",   \"<name>\",           \"Format to use when displaying output:\\n\" +           \"   \" + RI::TextFormatter.list + \"\\n\" +           \"Use 'bs' (backspace) with most pager programs.\\n\" +           \"To use ANSI, either also use the -T option, or\\n\" +           \"tell your pager to allow control characters\\n\" +           \"(for example using the -R option to less)\"],          [ \"--list-names\",    \"-l\",   nil,           \"List all the names known to RDoc, one per line\""
full_name: RI::Options::OptionList
includes: []

instance_methods: []

name: OptionList
superclass: 
ri/1.8/system/RI/Options/OptionList/strip_output-c.yaml000064400000000307150403623510016745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Options::OptionList::strip_output
is_singleton: true
name: strip_output
params: (text)
visibility: public
ri/1.8/system/RI/Options/displayer-i.yaml000064400000000621150403623510014061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return an instance of the displayer (the thing that actually writes the information). This allows us to load in new displayer classes at runtime (for example to help with IDE integration)
full_name: RI::Options#displayer
is_singleton: false
name: displayer
params: ()
visibility: public
ri/1.8/system/RI/Options/new-c.yaml000064400000000245150403623510012652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Options::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/RI/Options/cdesc-Options.yaml000064400000002656150403623510014363 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the directory we search for original documentation
  name: doc_dir
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the formatting we apply to the output
  name: formatter
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: should we just display a class list and exit
  name: list_classes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: should we display a list of all names
  name: list_names
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: No not use a pager. Writable, because ri sets it if it can't find a pager
  name: use_stdout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The width of the output line
  name: width
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::Options
includes: 
- !ruby/object:RI::IncludedModule 
  name: Singleton
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: displayer
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: raw_path
- !ruby/object:RI::MethodSummary 
  name: show_version
name: Options
superclass: Object
ri/1.8/system/RI/MethodSummary/new-c.yaml000064400000000262150403623510014014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::MethodSummary::new
is_singleton: true
name: new
params: (name="")
visibility: public
ri/1.8/system/RI/MethodSummary/cdesc-MethodSummary.yaml000064400000000372150403623510016662 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::MethodSummary
includes: []

instance_methods: []

name: MethodSummary
superclass: NamedThing
ri/1.8/system/RI/MethodDescription/cdesc-MethodDescription.yaml000064400000001303150403623510020331 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: aliases
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: block_params
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: is_alias_for
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: is_class_method
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: is_singleton
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: params
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: visibility
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RI::MethodDescription
includes: []

instance_methods: []

name: MethodDescription
superclass: Description
ri/1.8/system/RI/ClassEntry/full_name-i.yaml000064400000000355150403623510014467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return our full name
full_name: RI::ClassEntry#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RI/ClassEntry/classes_and_modules-i.yaml000064400000000310150403623510016523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::ClassEntry#classes_and_modules
is_singleton: false
name: classes_and_modules
params: ()
visibility: public
ri/1.8/system/RI/ClassEntry/local_methods_matching-i.yaml000064400000000721150403623510017211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a list of all our methods matching a given string. Is <tt>is_class_methods</tt> if 'nil', we don't care if the method is a class method or not, otherwise we only return those methods that match
full_name: RI::ClassEntry#local_methods_matching
is_singleton: false
name: local_methods_matching
params: (name, is_class_method)
visibility: private
ri/1.8/system/RI/ClassEntry/contained_class_named-i.yaml000064400000000437150403623510017023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return an exact match to a particular name
full_name: RI::ClassEntry#contained_class_named
is_singleton: false
name: contained_class_named
params: (name)
visibility: public
ri/1.8/system/RI/ClassEntry/all_method_names-i.yaml000064400000000414150403623510016014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a list of all out method names
full_name: RI::ClassEntry#all_method_names
is_singleton: false
name: all_method_names
params: ()
visibility: public
ri/1.8/system/RI/ClassEntry/methods_matching-i.yaml000064400000000610150403623510016034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return the list of local methods matching name We're split into two because we need distinct behavior when called from the <em>toplevel</em>
full_name: RI::ClassEntry#methods_matching
is_singleton: false
name: methods_matching
params: (name, is_class_method)
visibility: public
ri/1.8/system/RI/ClassEntry/new-c.yaml000064400000000301150403623510013277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::ClassEntry::new
is_singleton: true
name: new
params: (path_name, name, in_class)
visibility: public
ri/1.8/system/RI/ClassEntry/add_path-i.yaml000064400000000444150403623510014270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: We found this class in more tha one place, so add in the name from there.
full_name: RI::ClassEntry#add_path
is_singleton: false
name: add_path
params: (path)
visibility: public
ri/1.8/system/RI/ClassEntry/recursively_find_methods_matching-i.yaml000064400000000545150403623510021477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find methods matching 'name' in ourselves and in any classes we contain
full_name: RI::ClassEntry#recursively_find_methods_matching
is_singleton: false
name: recursively_find_methods_matching
params: (name, is_class_method)
visibility: public
ri/1.8/system/RI/ClassEntry/load_from-i.yaml000064400000000665150403623510014473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: read in our methods and any classes and modules in our namespace. Methods are stored in files called name-c|i.yaml, where the 'name' portion is the external form of the method name and the c|i is a class|instance flag
full_name: RI::ClassEntry#load_from
is_singleton: false
name: load_from
params: (dir)
visibility: public
ri/1.8/system/RI/ClassEntry/contained_modules_matching-i.yaml000064400000000520150403623510020065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a list of any classes or modules that we contain that match a given string
full_name: RI::ClassEntry#contained_modules_matching
is_singleton: false
name: contained_modules_matching
params: (name)
visibility: public
ri/1.8/system/RI/ClassEntry/cdesc-ClassEntry.yaml000064400000001717150403623510015450 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: path_names
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::ClassEntry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_path
- !ruby/object:RI::MethodSummary 
  name: all_method_names
- !ruby/object:RI::MethodSummary 
  name: classes_and_modules
- !ruby/object:RI::MethodSummary 
  name: contained_class_named
- !ruby/object:RI::MethodSummary 
  name: contained_modules_matching
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: load_from
- !ruby/object:RI::MethodSummary 
  name: local_methods_matching
- !ruby/object:RI::MethodSummary 
  name: methods_matching
- !ruby/object:RI::MethodSummary 
  name: recursively_find_methods_matching
name: ClassEntry
superclass: Object
ri/1.8/system/RI/ClassDescription/cdesc-ClassDescription.yaml000064400000000617150403623510020012 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: superclass
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RI::ClassDescription
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: display_name
- !ruby/object:RI::MethodSummary 
  name: superclass_string
name: ClassDescription
superclass: ModuleDescription
ri/1.8/system/RI/ClassDescription/display_name-i.yaml000064400000000300150403623510016342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::ClassDescription#display_name
is_singleton: false
name: display_name
params: ()
visibility: public
ri/1.8/system/RI/ClassDescription/superclass_string-i.yaml000064400000000312150403623510017452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::ClassDescription#superclass_string
is_singleton: false
name: superclass_string
params: ()
visibility: public
ri/1.8/system/RI/RiReader/find_methods-i.yaml000064400000000331150403623510014570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiReader#find_methods
is_singleton: false
name: find_methods
params: (name, is_class_method, namespaces)
visibility: public
ri/1.8/system/RI/RiReader/top_level_namespace-i.yaml000064400000000306150403623510016134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiReader#top_level_namespace
is_singleton: false
name: top_level_namespace
params: ()
visibility: public
ri/1.8/system/RI/RiReader/find_classes_in-i.yaml000064400000000363150403623510015255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::RULE 
  width: 2
full_name: RI::RiReader#find_classes_in
is_singleton: false
name: find_classes_in
params: (res, klass)
visibility: private
ri/1.8/system/RI/RiReader/lookup_namespace_in-i.yaml000064400000000330150403623510016137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiReader#lookup_namespace_in
is_singleton: false
name: lookup_namespace_in
params: (target, namespaces)
visibility: public
ri/1.8/system/RI/RiReader/cdesc-RiReader.yaml000064400000001443150403623510014460 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::RiReader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: all_names
- !ruby/object:RI::MethodSummary 
  name: find_class_by_name
- !ruby/object:RI::MethodSummary 
  name: find_classes_in
- !ruby/object:RI::MethodSummary 
  name: find_methods
- !ruby/object:RI::MethodSummary 
  name: find_names_in
- !ruby/object:RI::MethodSummary 
  name: full_class_names
- !ruby/object:RI::MethodSummary 
  name: get_class
- !ruby/object:RI::MethodSummary 
  name: get_method
- !ruby/object:RI::MethodSummary 
  name: lookup_namespace_in
- !ruby/object:RI::MethodSummary 
  name: top_level_namespace
name: RiReader
superclass: Object
ri/1.8/system/RI/RiReader/full_class_names-i.yaml000064400000000420150403623510015436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return the names of all classes and modules
full_name: RI::RiReader#full_class_names
is_singleton: false
name: full_class_names
params: ()
visibility: public
ri/1.8/system/RI/RiReader/new-c.yaml000064400000000256150403623520012717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiReader::new
is_singleton: true
name: new
params: (ri_cache)
visibility: public
ri/1.8/system/RI/RiReader/all_names-i.yaml000064400000000411150403623520014060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return a list of all classes, modules, and methods
full_name: RI::RiReader#all_names
is_singleton: false
name: all_names
params: ()
visibility: public
ri/1.8/system/RI/RiReader/get_method-i.yaml000064400000000463150403623520014253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return the MethodDescription for a given MethodEntry by deserializing the YAML
full_name: RI::RiReader#get_method
is_singleton: false
name: get_method
params: (method_entry)
visibility: public
ri/1.8/system/RI/RiReader/get_class-i.yaml000064400000000374150403623520014101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a class description
full_name: RI::RiReader#get_class
is_singleton: false
name: get_class
params: (class_entry)
visibility: public
ri/1.8/system/RI/RiReader/find_names_in-i.yaml000064400000000305150403623520014720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiReader#find_names_in
is_singleton: false
name: find_names_in
params: (res, klass)
visibility: private
ri/1.8/system/RI/RiReader/find_class_by_name-i.yaml000064400000000315150403623520015727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiReader#find_class_by_name
is_singleton: false
name: find_class_by_name
params: (full_name)
visibility: public
ri/1.8/system/RI/Attribute/cdesc-Attribute.yaml000064400000000556150403623520015201 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: comment
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: rw
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::Attribute
includes: []

instance_methods: []

name: Attribute
superclass: NamedThing
ri/1.8/system/RI/Attribute/new-c.yaml000064400000000270150403623530013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Attribute::new
is_singleton: true
name: new
params: (name, rw, comment)
visibility: public
ri/1.8/system/RI/AliasName/cdesc-AliasName.yaml000064400000000424150403623530014752 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Alias = Struct.new(:old_name, :new_name)
constants: []

full_name: RI::AliasName
includes: []

instance_methods: []

name: AliasName
superclass: NamedThing
ri/1.8/system/RI/AttributeFormatter/cdesc-AttributeFormatter.yaml000064400000002060150403623540020743 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Handle text with attributes. We're a base class: there are different presentation classes (one, for example, uses overstrikes to handle bold and underlining, while another using ANSI escape sequences"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BOLD
  value: "1"
- !ruby/object:RI::Constant 
  comment: 
  name: ITALIC
  value: "2"
- !ruby/object:RI::Constant 
  comment: 
  name: CODE
  value: "4"
- !ruby/object:RI::Constant 
  comment: 
  name: ATTR_MAP
  value: "{       \"b\"    => BOLD,       \"code\" => CODE,       \"em\"   => ITALIC,       \"i\"    => ITALIC,       \"tt\"   => CODE"
full_name: RI::AttributeFormatter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_attributes_to
- !ruby/object:RI::MethodSummary 
  name: bold_print
- !ruby/object:RI::MethodSummary 
  name: wrap
- !ruby/object:RI::MethodSummary 
  name: write_attribute_text
name: AttributeFormatter
superclass: TextFormatter
ri/1.8/system/RI/AttributeFormatter/AttributeString/empty%3f-i.yaml000064400000000307150403623540021053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AttributeFormatter::AttributeString#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/RI/AttributeFormatter/AttributeString/cdesc-AttributeString.yaml000064400000000732150403623550023405 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: txt
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::AttributeFormatter::AttributeString
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: next_word
name: AttributeString
superclass: Object
ri/1.8/system/RI/AttributeFormatter/AttributeString/next_word-i.yaml000064400000000435150403623550021433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: accept non space, then all following spaces
full_name: RI::AttributeFormatter::AttributeString#next_word
is_singleton: false
name: next_word
params: ()
visibility: public
ri/1.8/system/RI/AttributeFormatter/AttributeString/new-c.yaml000064400000000301150403623550020175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AttributeFormatter::AttributeString::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/RI/AttributeFormatter/AttributeString/%3c%3c-i.yaml000064400000000305150403623550020263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AttributeFormatter::AttributeString#<<
is_singleton: false
name: "<<"
params: (char)
visibility: public
ri/1.8/system/RI/AttributeFormatter/write_attribute_text-i.yaml000064400000000447150403623560020555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: overridden in specific formatters
full_name: RI::AttributeFormatter#write_attribute_text
is_singleton: false
name: write_attribute_text
params: (prefix, line)
visibility: protected
ri/1.8/system/RI/AttributeFormatter/wrap-i.yaml000064400000000614150403623560015241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: overrides base class. Looks for <tt>...</tt> etc sequences and generates an array of AttrChars. This array is then used as the basis for the split
full_name: RI::AttributeFormatter#wrap
is_singleton: false
name: wrap
params: (txt, prefix=@indent, linelen=@width)
visibility: public
ri/1.8/system/RI/AttributeFormatter/add_attributes_to-i.yaml000064400000000320150403623560017762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AttributeFormatter#add_attributes_to
is_singleton: false
name: add_attributes_to
params: (txt)
visibility: private
ri/1.8/system/RI/AttributeFormatter/bold_print-i.yaml000064400000000372150403623560016425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: again, overridden
full_name: RI::AttributeFormatter#bold_print
is_singleton: false
name: bold_print
params: (txt)
visibility: protected
ri/1.8/system/RI/AttributeFormatter/AttrChar/new-c.yaml000064400000000304150403623570016560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::AttributeFormatter::AttrChar::new
is_singleton: true
name: new
params: (char, attr)
visibility: public
ri/1.8/system/RI/AttributeFormatter/AttrChar/cdesc-AttrChar.yaml000064400000000657150403623570020351 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attr
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: char
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "TODO: struct?"
constants: []

full_name: RI::AttributeFormatter::AttrChar
includes: []

instance_methods: []

name: AttrChar
superclass: Object
ri/1.8/system/RI/NamedThing/eql%3f-i.yaml000064400000000257150403623570013542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::NamedThing#eql?
is_singleton: false
name: eql?
params: (other)
visibility: public
ri/1.8/system/RI/NamedThing/%3c%3d%3e-i.yaml000064400000000255150403623570013624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::NamedThing#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/RI/NamedThing/hash-i.yaml000064400000000252150403623600013373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::NamedThing#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/RI/NamedThing/new-c.yaml000064400000000254150403623600013235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::NamedThing::new
is_singleton: true
name: new
params: (name)
visibility: public
ri/1.8/system/RI/NamedThing/cdesc-NamedThing.yaml000064400000000665150403623600015327 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::NamedThing
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: hash
name: NamedThing
superclass: Object
ri/1.8/system/RI/RiWriter/add_class-i.yaml000064400000000274150403623610014123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiWriter#add_class
is_singleton: false
name: add_class
params: (class_desc)
visibility: public
ri/1.8/system/RI/RiWriter/external_to_internal-c.yaml000064400000000412150403623610016412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: And the reverse operation
full_name: RI::RiWriter::external_to_internal
is_singleton: true
name: external_to_internal
params: (name)
visibility: public
ri/1.8/system/RI/RiWriter/path_to_dir-i.yaml000064400000000301150403623610014471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiWriter#path_to_dir
is_singleton: false
name: path_to_dir
params: (class_name)
visibility: private
ri/1.8/system/RI/RiWriter/internal_to_external-c.yaml000064400000000546150403623610016422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a name from internal form (containing punctuation) to an external form (where punctuation is replaced by %xx)
full_name: RI::RiWriter::internal_to_external
is_singleton: true
name: internal_to_external
params: (name)
visibility: public
ri/1.8/system/RI/RiWriter/class_desc_path-c.yaml000064400000000315150403623620015314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiWriter::class_desc_path
is_singleton: true
name: class_desc_path
params: (dir, class_desc)
visibility: public
ri/1.8/system/RI/RiWriter/new-c.yaml000064400000000256150403623620012772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiWriter::new
is_singleton: true
name: new
params: (base_dir)
visibility: public
ri/1.8/system/RI/RiWriter/cdesc-RiWriter.yaml000064400000001167150403623620014611 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: class_desc_path
- !ruby/object:RI::MethodSummary 
  name: external_to_internal
- !ruby/object:RI::MethodSummary 
  name: internal_to_external
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::RiWriter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_class
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: path_to_dir
- !ruby/object:RI::MethodSummary 
  name: remove_class
name: RiWriter
superclass: Object
ri/1.8/system/RI/RiWriter/remove_class-i.yaml000064400000000302150403623630014662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiWriter#remove_class
is_singleton: false
name: remove_class
params: (class_desc)
visibility: public
ri/1.8/system/RI/RiWriter/add_method-i.yaml000064400000000313150403623630014272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::RiWriter#add_method
is_singleton: false
name: add_method
params: (class_desc, method_desc)
visibility: public
ri/1.8/system/RI/Paths/cdesc-Paths.yaml000064400000002432150403623630013426 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Encapsulate all the strangeness to do with finding out where to find RDoc files
- !ruby/struct:SM::Flow::P 
  body: "We basically deal with three directories:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: The 'system' documentation directory, which holds the documentation distributed with Ruby, and which is managed by the Ruby install process
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: The 'site' directory, which contains site-wide documentation added locally.
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: The 'user' documentation directory, stored under the user's own home directory.
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: "There's contention about all this, but for now:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "system:"
    body: $datadir/ri/&lt;ver&gt;/system/...
  - !ruby/struct:SM::Flow::LI 
    label: "site:"
    body: $datadir/ri/&lt;ver&gt;/site/...
  - !ruby/struct:SM::Flow::LI 
    label: "user:"
    body: ~/.rdoc
  type: :NOTE
constants: []

full_name: RI::Paths
includes: []

instance_methods: []

name: Paths
superclass: 
ri/1.8/system/RI/Description/%3c%3d%3e-i.yaml000064400000000256150403623630014067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Description#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/RI/Description/serialize-i.yaml000064400000000265150403623630014713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Description#serialize
is_singleton: false
name: serialize
params: ()
visibility: public
ri/1.8/system/RI/Description/cdesc-Description.yaml000064400000001036150403623640016036 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: comment
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: full_name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: deserialize
comment: 
constants: []

full_name: RI::Description
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: serialize
name: Description
superclass: Object
ri/1.8/system/RI/Description/deserialize-c.yaml000064400000000275150403623640015220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::Description::deserialize
is_singleton: true
name: deserialize
params: (from)
visibility: public
ri/1.8/system/RI/ModuleDescription/merge-i.yaml000064400000000276150403623640015174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::ModuleDescription#merge
is_singleton: false
name: merge
params: (into, from)
visibility: private
ri/1.8/system/RI/ModuleDescription/display_name-i.yaml000064400000000301150403623640016527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::ModuleDescription#display_name
is_singleton: false
name: display_name
params: ()
visibility: public
ri/1.8/system/RI/ModuleDescription/merge_in-i.yaml000064400000000422150403623640015653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: merge in another class desscription into this one
full_name: RI::ModuleDescription#merge_in
is_singleton: false
name: merge_in
params: (old)
visibility: public
ri/1.8/system/RI/ModuleDescription/cdesc-ModuleDescription.yaml000064400000001414150403623640020352 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: class_methods
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: constants
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: includes
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: instance_methods
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RI::ModuleDescription
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: display_name
- !ruby/object:RI::MethodSummary 
  name: merge
- !ruby/object:RI::MethodSummary 
  name: merge_in
- !ruby/object:RI::MethodSummary 
  name: superclass_string
name: ModuleDescription
superclass: Description
ri/1.8/system/RI/ModuleDescription/superclass_string-i.yaml000064400000000500150403623640017635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: the 'ClassDescription' subclass overrides this to format up the name of a parent
full_name: RI::ModuleDescription#superclass_string
is_singleton: false
name: superclass_string
params: ()
visibility: public
ri/1.8/system/RI/OverstrikeFormatter/cdesc-OverstrikeFormatter.yaml000064400000001042150403623640021327 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This formatter generates overstrike-style formatting, which works with pagers such as man and less.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BS
  value: "\"\\C-h\""
full_name: RI::OverstrikeFormatter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: bold_print
- !ruby/object:RI::MethodSummary 
  name: write_attribute_text
name: OverstrikeFormatter
superclass: AttributeFormatter
ri/1.8/system/RI/OverstrikeFormatter/write_attribute_text-i.yaml000064400000000337150403623640020744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::OverstrikeFormatter#write_attribute_text
is_singleton: false
name: write_attribute_text
params: (prefix, line)
visibility: public
ri/1.8/system/RI/OverstrikeFormatter/bold_print-i.yaml000064400000000375150403623640016621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: draw a string in bold
full_name: RI::OverstrikeFormatter#bold_print
is_singleton: false
name: bold_print
params: (text)
visibility: public
ri/1.8/system/RI/MethodEntry/full_name-i.yaml000064400000000265150403623640014646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::MethodEntry#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RI/MethodEntry/cdesc-MethodEntry.yaml000064400000000643150403623650016000 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: path_name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RI::MethodEntry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
name: MethodEntry
superclass: Object
ri/1.8/system/RI/MethodEntry/new-c.yaml000064400000000323150403623650013463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::MethodEntry::new
is_singleton: true
name: new
params: (path_name, name, is_class_method, in_class)
visibility: public
ri/1.8/system/RI/TopLevelEntry/full_name-i.yaml000064400000000267150403623650015163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TopLevelEntry#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RI/TopLevelEntry/methods_matching-i.yaml000064400000000332150403623650016527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TopLevelEntry#methods_matching
is_singleton: false
name: methods_matching
params: (name, is_class_method)
visibility: public
ri/1.8/system/RI/TopLevelEntry/cdesc-TopLevelEntry.yaml000064400000001010150403623650016611 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A TopLevelEntry is like a class entry, but when asked to search for methods searches all classes, not just itself
constants: []

full_name: RI::TopLevelEntry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: methods_matching
- !ruby/object:RI::MethodSummary 
  name: module_named
name: TopLevelEntry
superclass: ClassEntry
ri/1.8/system/RI/TopLevelEntry/module_named-i.yaml000064400000000301150403623650015637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RI::TopLevelEntry#module_named
is_singleton: false
name: module_named
params: (name)
visibility: public
ri/1.8/system/NotImplementedError/cdesc-NotImplementedError.yaml000064400000001216150403623650020653 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: NotImplementedError
includes: []

instance_methods: []

name: NotImplementedError
superclass: ScriptError
ri/1.8/system/SocketError/cdesc-SocketError.yaml000064400000003162150403623650015465 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: []

full_name: SocketError
includes: []

instance_methods: []

name: SocketError
superclass: StandardError
ri/1.8/system/IOError/cdesc-IOError.yaml000064400000007727150403623650013636 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>IO</tt> is the basis for all input and output in Ruby. An I/O stream may be <em>duplexed</em> (that is, bidirectional), and so may use more than one native operating system stream.
- !ruby/struct:SM::Flow::P 
  body: Many of the examples in this section use class <tt>File</tt>, the only standard subclass of <tt>IO</tt>. The two classes are closely associated.
- !ruby/struct:SM::Flow::P 
  body: As used in this section, <em>portname</em> may take any of the following forms.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: A plain string represents a filename suitable for the underlying operating system.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: A string starting with ``<tt>|</tt>'' indicates a subprocess. The remainder of the string following the ``<tt>|</tt>'' is invoked as a process with appropriate input/output channels connected to it.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: A string equal to ``<tt>|-</tt>'' will create another Ruby instance as a subprocess.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Ruby will convert pathnames between different operating system conventions if possible. For instance, on a Windows system the filename ``<tt>/gumby/ruby/test.rb</tt>'' will be opened as ``<tt>\\gumby\\ruby\\test.rb</tt>''. When specifying a Windows-style filename in a Ruby string, remember to escape the backslashes:"
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;c:\\gumby\\ruby\\test.rb&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: Our examples here will use the Unix-style forward slashes; <tt>File::SEPARATOR</tt> can be used to get the platform-specific separator character.
- !ruby/struct:SM::Flow::P 
  body: I/O ports may be opened in any one of several different modes, which are shown in this section as <em>mode</em>. The mode may either be a Fixnum or a String. If numeric, it should be one of the operating system specific constants (O_RDONLY, O_WRONLY, O_RDWR, O_APPEND and so on). See man open(2) for more information.
- !ruby/struct:SM::Flow::P 
  body: If the mode is given as a String, it must be one of the values listed in the following table.
- !ruby/struct:SM::Flow::VERB 
  body: "  Mode |  Meaning\n  -----+--------------------------------------------------------\n  &quot;r&quot;  |  Read-only, starts at beginning of file  (default mode).\n  -----+--------------------------------------------------------\n  &quot;r+&quot; |  Read-write, starts at beginning of file.\n  -----+--------------------------------------------------------\n  &quot;w&quot;  |  Write-only, truncates existing file\n       |  to zero length or creates a new file for writing.\n  -----+--------------------------------------------------------\n  &quot;w+&quot; |  Read-write, truncates existing file to zero length\n       |  or creates a new file for reading and writing.\n  -----+--------------------------------------------------------\n  &quot;a&quot;  |  Write-only, starts at end of file if file exists,\n       |  otherwise creates a new file for writing.\n  -----+--------------------------------------------------------\n  &quot;a+&quot; |  Read-write, starts at end of file if file exists,\n       |  otherwise creates a new file for reading and\n       |  writing.\n  -----+--------------------------------------------------------\n   &quot;b&quot; |  (DOS/Windows only) Binary file mode (may appear with\n       |  any of the key letters listed above).\n"
- !ruby/struct:SM::Flow::P 
  body: The global constant ARGF (also accessible as $&lt;) provides an IO-like stream which allows access to all files mentioned on the command line (or STDIN if no files are mentioned). ARGF provides the methods <tt>#path</tt> and <tt>#filename</tt> to access the name of the file currently being read.
constants: []

full_name: IOError
includes: []

instance_methods: []

name: IOError
superclass: StandardError
ri/1.8/system/ScriptError/cdesc-ScriptError.yaml000064400000001174150403623650015516 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: ScriptError
includes: []

instance_methods: []

name: ScriptError
superclass: Exception
ri/1.8/system/Thread/priority-i.yaml000064400000001022150403623660013212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the priority of <em>thr</em>. Default is inherited from the current thread which creating the new thread, or zero for the initial main thread; higher-priority threads will run before lower-priority threads.
- !ruby/struct:SM::Flow::VERB 
  body: "   Thread.current.priority   #=&gt; 0\n"
full_name: Thread#priority
is_singleton: false
name: priority
params: |
  thr.priority   => integer

visibility: public
ri/1.8/system/Thread/%5b%5d-i.yaml000064400000001756150403623660012220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attribute Reference---Returns the value of a thread-local variable, using either a symbol or a string name. If the specified variable does not exist, returns <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { Thread.current[&quot;name&quot;] = &quot;A&quot;; Thread.stop }\n   b = Thread.new { Thread.current[:name]  = &quot;B&quot;; Thread.stop }\n   c = Thread.new { Thread.current[&quot;name&quot;] = &quot;C&quot;; Thread.stop }\n   Thread.list.each {|x| puts &quot;#{x.inspect}: #{x[:name]}&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   #&lt;Thread:0x401b3b3c sleep&gt;: C\n   #&lt;Thread:0x401b3bc8 sleep&gt;: B\n   #&lt;Thread:0x401b3c68 sleep&gt;: A\n   #&lt;Thread:0x401bdf4c run&gt;:\n"
full_name: Thread#[]
is_singleton: false
name: "[]"
params: |
  thr[sym]   => obj or nil

visibility: public
ri/1.8/system/Thread/priority%3d-i.yaml000064400000001273150403623660013516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the priority of <em>thr</em> to <em>integer</em>. Higher-priority threads will run before lower-priority threads.
- !ruby/struct:SM::Flow::VERB 
  body: "   count1 = count2 = 0\n   a = Thread.new do\n         loop { count1 += 1 }\n       end\n   a.priority = -1\n\n   b = Thread.new do\n         loop { count2 += 1 }\n       end\n   b.priority = -2\n   sleep 1   #=&gt; 1\n   Thread.critical = 1\n   count1    #=&gt; 622504\n   count2    #=&gt; 5832\n"
full_name: Thread#priority=
is_singleton: false
name: priority=
params: |
  thr.priority= integer   => thr

visibility: public
ri/1.8/system/Thread/pass-c.yaml000064400000001375150403623660012304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the thread scheduler to pass execution to another thread.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { print &quot;a&quot;; Thread.pass;\n                    print &quot;b&quot;; Thread.pass;\n                    print &quot;c&quot; }\n   b = Thread.new { print &quot;x&quot;; Thread.pass;\n                    print &quot;y&quot;; Thread.pass;\n                    print &quot;z&quot; }\n   a.join\n   b.join\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   axbycz\n"
full_name: Thread::pass
is_singleton: true
name: pass
params: |
  Thread.pass   => nil

visibility: public
ri/1.8/system/Thread/terminate-i.yaml000064400000000710150403623660013324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminates <em>thr</em> and schedules another thread to be run, returning the terminated <tt>Thread</tt>. If this is the main thread, or the last thread, exits the process.
full_name: Thread#terminate
is_singleton: false
name: terminate
params: |
  thr.exit        => thr
  thr.kill        => thr
  thr.terminate   => thr

visibility: public
ri/1.8/system/Thread/critical%3d-c.yaml000064400000001407150403623660013420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sets the status of the global ``thread critical'' condition and returns it. When set to <tt>true</tt>, prohibits scheduling of any existing thread. Does not block new threads from being created and run. Certain thread operations (such as stopping or killing a thread, sleeping in the current thread, and raising an exception) may cause a thread to be scheduled even when in a critical section. <tt>Thread::critical</tt> is not intended for daily use: it is primarily there to support folks writing threading libraries."
full_name: Thread::critical=
is_singleton: true
name: critical=
params: |
  Thread.critical= boolean   => true or false

visibility: public
ri/1.8/system/Thread/current-c.yaml000064400000000566150403623660013021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the currently executing thread.
- !ruby/struct:SM::Flow::VERB 
  body: "   Thread.current   #=&gt; #&lt;Thread:0x401bdf4c run&gt;\n"
full_name: Thread::current
is_singleton: true
name: current
params: |
  Thread.current   => thread

visibility: public
ri/1.8/system/Thread/wakeup-i.yaml000064400000001121150403623660012625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Marks <em>thr</em> as eligible for scheduling (it may still remain blocked on I/O, however). Does not invoke the scheduler (see <tt>Thread#run</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   c = Thread.new { Thread.stop; puts &quot;hey!&quot; }\n   c.wakeup\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   hey!\n"
full_name: Thread#wakeup
is_singleton: false
name: wakeup
params: |
  thr.wakeup   => thr

visibility: public
ri/1.8/system/Thread/terminate%21-i.yaml000064400000001100150403623660013526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminates <em>thr</em> without calling ensure clauses and schedules another thread to be run, returning the terminated <tt>Thread</tt>. If this is the main thread, or the last thread, exits the process.
- !ruby/struct:SM::Flow::P 
  body: See <tt>Thread#exit</tt> for the safer version.
full_name: Thread#terminate!
is_singleton: false
name: terminate!
params: |
  thr.exit!        => thr
  thr.kill!        => thr
  thr.terminate!   => thr

visibility: public
ri/1.8/system/Thread/kill-c.yaml000064400000001057150403623660012266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Causes the given <em>thread</em> to exit (see <tt>Thread::exit</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   count = 0\n   a = Thread.new { loop { count += 1 } }\n   sleep(0.1)       #=&gt; 0\n   Thread.kill(a)   #=&gt; #&lt;Thread:0x401b3d30 dead&gt;\n   count            #=&gt; 93947\n   a.alive?         #=&gt; false\n"
full_name: Thread::kill
is_singleton: true
name: kill
params: |
  Thread.kill(thread)   => thread

visibility: public
ri/1.8/system/Thread/stop-c.yaml000064400000001244150403623670012317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Stops execution of the current thread, putting it into a ``sleep'' state, and schedules execution of another thread. Resets the ``critical'' condition to <tt>false</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { print &quot;a&quot;; Thread.stop; print &quot;c&quot; }\n   Thread.pass\n   print &quot;b&quot;\n   a.run\n   a.join\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   abc\n"
full_name: Thread::stop
is_singleton: true
name: stop
params: |
  Thread.stop   => nil

visibility: public
ri/1.8/system/Thread/raise-i.yaml000064400000001274150403623670012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises an exception (see <tt>Kernel::raise</tt>) from <em>thr</em>. The caller does not have to be <em>thr</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Thread.abort_on_exception = true\n   a = Thread.new { sleep(200) }\n   a.raise(&quot;Gotcha&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   prog.rb:3: Gotcha (RuntimeError)\n    from prog.rb:2:in `initialize'\n    from prog.rb:2:in `new'\n    from prog.rb:2\n"
full_name: Thread#raise
is_singleton: false
name: raise
params: |
  thr.raise(exception)

visibility: public
ri/1.8/system/Thread/list-c.yaml000064400000001343150403623670012305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of <tt>Thread</tt> objects for all threads that are either runnable or stopped.
- !ruby/struct:SM::Flow::VERB 
  body: "   Thread.new { sleep(200) }\n   Thread.new { 1000000.times {|i| i*i } }\n   Thread.new { Thread.stop }\n   Thread.list.each {|t| p t}\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   #&lt;Thread:0x401b3e84 sleep&gt;\n   #&lt;Thread:0x401b3f38 run&gt;\n   #&lt;Thread:0x401b3fb0 sleep&gt;\n   #&lt;Thread:0x401bdf4c run&gt;\n"
full_name: Thread::list
is_singleton: true
name: list
params: |
  Thread.list   => array

visibility: public
ri/1.8/system/Thread/main-c.yaml000064400000000553150403623670012260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the main thread for the process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Thread.main   #=&gt; #&lt;Thread:0x401bdf4c run&gt;\n"
full_name: Thread::main
is_singleton: true
name: main
params: |
  Thread.main   => thread

visibility: public
ri/1.8/system/Thread/kill-i.yaml000064400000000676150403623670012303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminates <em>thr</em> and schedules another thread to be run, returning the terminated <tt>Thread</tt>. If this is the main thread, or the last thread, exits the process.
full_name: Thread#kill
is_singleton: false
name: kill
params: |
  thr.exit        => thr
  thr.kill        => thr
  thr.terminate   => thr

visibility: public
ri/1.8/system/Thread/critical-c.yaml000064400000000463150403623670013126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the status of the global ``thread critical'' condition.
full_name: Thread::critical
is_singleton: true
name: critical
params: |
  Thread.critical   => true or false

visibility: public
ri/1.8/system/Thread/safe_level-i.yaml000064400000001050150403623670013440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the safe level in effect for <em>thr</em>. Setting thread-local safe levels can help when implementing sandboxes which run insecure code.
- !ruby/struct:SM::Flow::VERB 
  body: "   thr = Thread.new { $SAFE = 3; sleep }\n   Thread.current.safe_level   #=&gt; 0\n   thr.safe_level              #=&gt; 3\n"
full_name: Thread#safe_level
is_singleton: false
name: safe_level
params: |
  thr.safe_level   => integer

visibility: public
ri/1.8/system/Thread/abort_on_exception-i.yaml000064400000000666150403623670015230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the status of the thread-local ``abort on exception'' condition for <em>thr</em>. The default is <tt>false</tt>. See also <tt>Thread::abort_on_exception=</tt>.
full_name: Thread#abort_on_exception
is_singleton: false
name: abort_on_exception
params: |
  thr.abort_on_exception   => true or false

visibility: public
ri/1.8/system/Thread/abort_on_exception-c.yaml000064400000001234150403623670015212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the status of the global ``abort on exception'' condition. The default is <tt>false</tt>. When set to <tt>true</tt>, or if the global <tt>$DEBUG</tt> flag is <tt>true</tt> (perhaps because the command line option <tt>-d</tt> was specified) all threads will abort (the process will <tt>exit(0)</tt>) if an exception is raised in any thread. See also <tt>Thread::abort_on_exception=</tt>.
full_name: Thread::abort_on_exception
is_singleton: true
name: abort_on_exception
params: |
  Thread.abort_on_exception   => true or false

visibility: public
ri/1.8/system/Thread/exit-c.yaml000064400000000714150403623700012276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminates the currently running thread and schedules another thread to be run. If this thread is already marked to be killed, <tt>exit</tt> returns the <tt>Thread</tt>. If this is the main thread, or the last thread, exit the process.
full_name: Thread::exit
is_singleton: true
name: exit
params: |
  Thread.exit   => thread

visibility: public
ri/1.8/system/Thread/inspect-i.yaml000064400000000441150403623700012775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dump the name, id, and status of <em>thr</em> to a string.
full_name: Thread#inspect
is_singleton: false
name: inspect
params: |
  thr.inspect   => string

visibility: public
ri/1.8/system/Thread/kill%21-i.yaml000064400000001066150403623700012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminates <em>thr</em> without calling ensure clauses and schedules another thread to be run, returning the terminated <tt>Thread</tt>. If this is the main thread, or the last thread, exits the process.
- !ruby/struct:SM::Flow::P 
  body: See <tt>Thread#exit</tt> for the safer version.
full_name: Thread#kill!
is_singleton: false
name: kill!
params: |
  thr.exit!        => thr
  thr.kill!        => thr
  thr.terminate!   => thr

visibility: public
ri/1.8/system/Thread/cdesc-Thread.yaml000064400000005027150403623700013375 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: abort_on_exception
- !ruby/object:RI::MethodSummary 
  name: abort_on_exception=
- !ruby/object:RI::MethodSummary 
  name: critical
- !ruby/object:RI::MethodSummary 
  name: critical=
- !ruby/object:RI::MethodSummary 
  name: current
- !ruby/object:RI::MethodSummary 
  name: exclusive
- !ruby/object:RI::MethodSummary 
  name: exit
- !ruby/object:RI::MethodSummary 
  name: fork
- !ruby/object:RI::MethodSummary 
  name: kill
- !ruby/object:RI::MethodSummary 
  name: list
- !ruby/object:RI::MethodSummary 
  name: main
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: pass
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: stop
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Thread</tt> encapsulates the behavior of a thread of execution, including the main thread of the Ruby script.
- !ruby/struct:SM::Flow::P 
  body: In the descriptions of the methods in this class, the parameter <em>sym</em> refers to a symbol, which is either a quoted string or a <tt>Symbol</tt> (such as <tt>:name</tt>).
constants: []

full_name: Thread
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: abort_on_exception
- !ruby/object:RI::MethodSummary 
  name: abort_on_exception=
- !ruby/object:RI::MethodSummary 
  name: alive?
- !ruby/object:RI::MethodSummary 
  name: exit
- !ruby/object:RI::MethodSummary 
  name: exit!
- !ruby/object:RI::MethodSummary 
  name: group
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: key?
- !ruby/object:RI::MethodSummary 
  name: keys
- !ruby/object:RI::MethodSummary 
  name: kill
- !ruby/object:RI::MethodSummary 
  name: kill!
- !ruby/object:RI::MethodSummary 
  name: priority
- !ruby/object:RI::MethodSummary 
  name: priority=
- !ruby/object:RI::MethodSummary 
  name: raise
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: safe_level
- !ruby/object:RI::MethodSummary 
  name: status
- !ruby/object:RI::MethodSummary 
  name: stop?
- !ruby/object:RI::MethodSummary 
  name: terminate
- !ruby/object:RI::MethodSummary 
  name: terminate!
- !ruby/object:RI::MethodSummary 
  name: value
- !ruby/object:RI::MethodSummary 
  name: wakeup
name: Thread
superclass: Object
ri/1.8/system/Thread/exit-i.yaml000064400000000676150403623700012313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminates <em>thr</em> and schedules another thread to be run, returning the terminated <tt>Thread</tt>. If this is the main thread, or the last thread, exits the process.
full_name: Thread#exit
is_singleton: false
name: exit
params: |
  thr.exit        => thr
  thr.kill        => thr
  thr.terminate   => thr

visibility: public
ri/1.8/system/Thread/new-c.yaml000064400000001463150403623710012121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates and runs a new thread to execute the instructions given in <em>block</em>. Any arguments passed to <tt>Thread::new</tt> are passed into the block.
- !ruby/struct:SM::Flow::VERB 
  body: "   x = Thread.new { sleep 0.1; print &quot;x&quot;; print &quot;y&quot;; print &quot;z&quot; }\n   a = Thread.new { print &quot;a&quot;; print &quot;b&quot;; sleep 0.2; print &quot;c&quot; }\n   x.join # Let the threads finish before\n   a.join # main thread exits...\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   abxyzc\n"
full_name: Thread::new
is_singleton: true
name: new
params: |
  Thread.new([arg]*) {|args| block }   => thread

visibility: public
ri/1.8/system/Thread/exit%21-i.yaml000064400000001066150403623710012516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminates <em>thr</em> without calling ensure clauses and schedules another thread to be run, returning the terminated <tt>Thread</tt>. If this is the main thread, or the last thread, exits the process.
- !ruby/struct:SM::Flow::P 
  body: See <tt>Thread#exit</tt> for the safer version.
full_name: Thread#exit!
is_singleton: false
name: exit!
params: |
  thr.exit!        => thr
  thr.kill!        => thr
  thr.terminate!   => thr

visibility: public
ri/1.8/system/Thread/exclusive-c.yaml000064400000000477150403623710013343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Wraps a block in Thread.critical, restoring the original value upon exit from the critical section.
full_name: Thread::exclusive
is_singleton: true
name: exclusive
params: () {|| ...}
visibility: public
ri/1.8/system/Thread/status-i.yaml000064400000002077150403623710012663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the status of <em>thr</em>: ``<tt>sleep</tt>'' if <em>thr</em> is sleeping or waiting on I/O, ``<tt>run</tt>'' if <em>thr</em> is executing, ``<tt>aborting</tt>'' if <em>thr</em> is aborting, <tt>false</tt> if <em>thr</em> terminated normally, and <tt>nil</tt> if <em>thr</em> terminated with an exception."
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { raise(&quot;die now&quot;) }\n   b = Thread.new { Thread.stop }\n   c = Thread.new { Thread.exit }\n   d = Thread.new { sleep }\n   Thread.critical = true\n   d.kill                  #=&gt; #&lt;Thread:0x401b3678 aborting&gt;\n   a.status                #=&gt; nil\n   b.status                #=&gt; &quot;sleep&quot;\n   c.status                #=&gt; false\n   d.status                #=&gt; &quot;aborting&quot;\n   Thread.current.status   #=&gt; &quot;run&quot;\n"
full_name: Thread#status
is_singleton: false
name: status
params: |
  thr.status   => string, false or nil

visibility: public
ri/1.8/system/Thread/abort_on_exception%3d-c.yaml000064400000001554150403623710015506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: When set to <tt>true</tt>, all threads will abort if an exception is raised. Returns the new state.
- !ruby/struct:SM::Flow::VERB 
  body: "   Thread.abort_on_exception = true\n   t1 = Thread.new do\n     puts  &quot;In new thread&quot;\n     raise &quot;Exception from thread&quot;\n   end\n   sleep(1)\n   puts &quot;not reached&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   In new thread\n   prog.rb:4: Exception from thread (RuntimeError)\n    from prog.rb:2:in `initialize'\n    from prog.rb:2:in `new'\n    from prog.rb:2\n"
full_name: Thread::abort_on_exception=
is_singleton: true
name: abort_on_exception=
params: |
  Thread.abort_on_exception= boolean   => true or false

visibility: public
ri/1.8/system/Thread/abort_on_exception%3d-i.yaml000064400000000707150403623710015513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: When set to <tt>true</tt>, causes all threads (including the main program) to abort if an exception is raised in <em>thr</em>. The process will effectively <tt>exit(0)</tt>.
full_name: Thread#abort_on_exception=
is_singleton: false
name: abort_on_exception=
params: |
  thr.abort_on_exception= boolean   => true or false

visibility: public
ri/1.8/system/Thread/keys-i.yaml000064400000001037150403623720012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an an array of the names of the thread-local variables (as Symbols).
- !ruby/struct:SM::Flow::VERB 
  body: "   thr = Thread.new do\n     Thread.current[:cat] = 'meow'\n     Thread.current[&quot;dog&quot;] = 'woof'\n   end\n   thr.join   #=&gt; #&lt;Thread:0x401b3f10 dead&gt;\n   thr.keys   #=&gt; [:dog, :cat]\n"
full_name: Thread#keys
is_singleton: false
name: keys
params: |
  thr.keys   => array

visibility: public
ri/1.8/system/Thread/join-i.yaml000064400000003130150403623720012267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The calling thread will suspend execution and run <em>thr</em>. Does not return until <em>thr</em> exits or until <em>limit</em> seconds have passed. If the time limit expires, <tt>nil</tt> will be returned, otherwise <em>thr</em> is returned.
- !ruby/struct:SM::Flow::P 
  body: Any threads not joined will be killed when the main program exits. If <em>thr</em> had previously raised an exception and the <tt>abort_on_exception</tt> and <tt>$DEBUG</tt> flags are not set (so the exception has not yet been processed) it will be processed at this time.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { print &quot;a&quot;; sleep(10); print &quot;b&quot;; print &quot;c&quot; }\n   x = Thread.new { print &quot;x&quot;; Thread.pass; print &quot;y&quot;; print &quot;z&quot; }\n   x.join # Let x thread finish, a will be killed on exit.\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   axyz\n"
- !ruby/struct:SM::Flow::P 
  body: The following example illustrates the <em>limit</em> parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   y = Thread.new { 4.times { sleep 0.1; puts 'tick... ' }}\n   puts &quot;Waiting&quot; until y.join(0.15)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   tick...\n   Waiting\n   tick...\n   Waitingtick...\n\n   tick...\n"
full_name: Thread#join
is_singleton: false
name: join
params: |
  thr.join          => thr
  thr.join(limit)   => thr

visibility: public
ri/1.8/system/Thread/stop%3f-i.yaml000064400000000673150403623720012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>thr</em> is dead or sleeping.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { Thread.stop }\n   b = Thread.current\n   a.stop?   #=&gt; true\n   b.stop?   #=&gt; false\n"
full_name: Thread#stop?
is_singleton: false
name: stop?
params: |
  thr.stop?   => true or false

visibility: public
ri/1.8/system/Thread/alive%3f-i.yaml000064400000000777150403623720012744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>thr</em> is running or sleeping.
- !ruby/struct:SM::Flow::VERB 
  body: "   thr = Thread.new { }\n   thr.join                #=&gt; #&lt;Thread:0x401b3fb0 dead&gt;\n   Thread.current.alive?   #=&gt; true\n   thr.alive?              #=&gt; false\n"
full_name: Thread#alive?
is_singleton: false
name: alive?
params: |
  thr.alive?   => true or false

visibility: public
ri/1.8/system/Thread/run-i.yaml000064400000001175150403623720012143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Wakes up <em>thr</em>, making it eligible for scheduling. If not in a critical section, then invokes the scheduler.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { puts &quot;a&quot;; Thread.stop; puts &quot;c&quot; }\n   Thread.pass\n   puts &quot;Got here&quot;\n   a.run\n   a.join\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   a\n   Got here\n   c\n"
full_name: Thread#run
is_singleton: false
name: run
params: |
  thr.run   => thr

visibility: public
ri/1.8/system/Thread/fork-c.yaml000064400000000763150403623730012275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Basically the same as <tt>Thread::new</tt>. However, if class <tt>Thread</tt> is subclassed, then calling <tt>start</tt> in that subclass will not invoke the subclass's <tt>initialize</tt> method.
full_name: Thread::fork
is_singleton: true
name: fork
params: |
  Thread.start([args]*) {|args| block }   => thread
  Thread.fork([args]*) {|args| block }    => thread

visibility: public
ri/1.8/system/Thread/value-i.yaml000064400000000620150403623730012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits for <em>thr</em> to complete (via <tt>Thread#join</tt>) and returns its value.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Thread.new { 2 + 2 }\n   a.value   #=&gt; 4\n"
full_name: Thread#value
is_singleton: false
name: value
params: |
  thr.value   => obj

visibility: public
ri/1.8/system/Thread/start-c.yaml000064400000000765150403623730012473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Basically the same as <tt>Thread::new</tt>. However, if class <tt>Thread</tt> is subclassed, then calling <tt>start</tt> in that subclass will not invoke the subclass's <tt>initialize</tt> method.
full_name: Thread::start
is_singleton: true
name: start
params: |
  Thread.start([args]*) {|args| block }   => thread
  Thread.fork([args]*) {|args| block }    => thread

visibility: public
ri/1.8/system/Thread/%5b%5d%3d-i.yaml000064400000000555150403623730012506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attribute Assignment---Sets or creates the value of a thread-local variable, using either a symbol or a string. See also <tt>Thread#[]</tt>.
full_name: Thread#[]=
is_singleton: false
name: "[]="
params: |
  thr[sym] = obj   => obj

visibility: public
ri/1.8/system/Thread/group-i.yaml000064400000000700150403623730012465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <tt>ThreadGroup</tt> which contains <em>thr</em>, or nil if the thread is not a member of any group.
- !ruby/struct:SM::Flow::VERB 
  body: "   Thread.main.group   #=&gt; #&lt;ThreadGroup:0x4029d914&gt;\n"
full_name: Thread#group
is_singleton: false
name: group
params: |
  thr.group   => thgrp or nil

visibility: public
ri/1.8/system/Thread/key%3f-i.yaml000064400000000755150403623730012431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given string (or symbol) exists as a thread-local variable.
- !ruby/struct:SM::Flow::VERB 
  body: "   me = Thread.current\n   me[:oliver] = &quot;a&quot;\n   me.key?(:oliver)    #=&gt; true\n   me.key?(:stanley)   #=&gt; false\n"
full_name: Thread#key?
is_singleton: false
name: key?
params: |
  thr.key?(sym)   => true or false

visibility: public
ri/1.8/system/SOAP/SOAPEnvelope/encode-i.yaml000064400000000344150403623740014366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@header)
comment: 
full_name: SOAP::SOAPEnvelope#encode
is_singleton: false
name: encode
params: (generator, ns, attrs = {}) {|@header| ...}
visibility: public
ri/1.8/system/SOAP/SOAPEnvelope/to_ary-i.yaml000064400000000262150403623740014425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPEnvelope#to_ary
is_singleton: false
name: to_ary
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPEnvelope/new-c.yaml000064400000000304150403623750013711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPEnvelope::new
is_singleton: true
name: new
params: (header = nil, body = nil)
visibility: public
ri/1.8/system/SOAP/SOAPEnvelope/cdesc-SOAPEnvelope.yaml000064400000001375150403623750016230 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: body
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: external_content
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: header
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::SOAPEnvelope
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPEnvelopeElement
- !ruby/object:RI::IncludedModule 
  name: SOAPCompoundtype
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: body=
- !ruby/object:RI::MethodSummary 
  name: encode
- !ruby/object:RI::MethodSummary 
  name: header=
- !ruby/object:RI::MethodSummary 
  name: to_ary
name: SOAPEnvelope
superclass: XSD::NSDBase
ri/1.8/system/SOAP/SOAPEnvelope/header%3d-i.yaml000064400000000272150403623750014656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPEnvelope#header=
is_singleton: false
name: header=
params: (header)
visibility: public
ri/1.8/system/SOAP/SOAPEnvelope/body%3d-i.yaml000064400000000264150403623750014364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPEnvelope#body=
is_singleton: false
name: body=
params: (body)
visibility: public
ri/1.8/system/SOAP/SOAPHeader/size-i.yaml000064400000000344150403623760013520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #length"
full_name: SOAP::SOAPHeader#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPHeader/encode-i.yaml000064400000000334150403623760014002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (data)
comment: 
full_name: SOAP::SOAPHeader#encode
is_singleton: false
name: encode
params: (generator, ns, attrs = {}) {|data| ...}
visibility: public
ri/1.8/system/SOAP/SOAPHeader/cdesc-SOAPHeader.yaml000064400000000756150403623760015261 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::SOAPHeader
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPEnvelopeElement
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: encode
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: size
name: SOAPHeader
superclass: SOAPStruct
ri/1.8/system/SOAP/SOAPHeader/add-i.yaml000064400000000265150403623760013300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPHeader#add
is_singleton: false
name: add
params: (name, value)
visibility: public
ri/1.8/system/SOAP/SOAPHeader/new-c.yaml000064400000000252150403623760013327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPHeader::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPHeader/length-i.yaml000064400000000330150403623760014022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: size
block_params: 
comment: 
full_name: SOAP::SOAPHeader#length
is_singleton: false
name: length
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPNil/cdesc-SOAPNil.yaml000064400000000373150403623770014141 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPNil
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPNil
superclass: XSD::XSDNil
ri/1.8/system/SOAP/SOAPEnvelopeElement/cdesc-SOAPEnvelopeElement.yaml000064400000000405150403623770021047 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: SOAP elements
constants: []

full_name: SOAP::SOAPEnvelopeElement
includes: []

instance_methods: []

name: SOAPEnvelopeElement
superclass: 
ri/1.8/system/SOAP/SOAPShort/cdesc-SOAPShort.yaml000064400000000401150403623770015063 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPShort
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPShort
superclass: XSD::XSDShort
ri/1.8/system/SOAP/MPostUnavailableError/cdesc-MPostUnavailableError.yaml000064400000000346150403623770022167 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::MPostUnavailableError
includes: []

instance_methods: []

name: MPostUnavailableError
superclass: HTTPStreamError
ri/1.8/system/SOAP/Header/cdesc-Header.yaml000064400000000271150403624000014067 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Header
includes: []

instance_methods: []

name: Header
superclass: 
ri/1.8/system/SOAP/Header/HandlerSet/dup-i.yaml000064400000000262150403624000014667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::HandlerSet#dup
is_singleton: false
name: dup
params: ()
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/delete-i.yaml000064400000000277150403624010015350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::HandlerSet#delete
is_singleton: false
name: delete
params: (handler)
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/store%3d-i.yaml000064400000000300150403624010015521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::HandlerSet#store=
is_singleton: false
name: store=
params: (store)
visibility: protected
ri/1.8/system/SOAP/Header/HandlerSet/on_inbound-i.yaml000064400000000427150403624010016235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "headers: SOAPHeaderItem enumerable object"
full_name: SOAP::Header::HandlerSet#on_inbound
is_singleton: false
name: on_inbound
params: (headers)
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/add-i.yaml000064400000000341150403624010014626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "<<"
block_params: 
comment: 
full_name: SOAP::Header::HandlerSet#add
is_singleton: false
name: add
params: (handler)
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/include%3f-i.yaml000064400000000303150403624010016015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::HandlerSet#include?
is_singleton: false
name: include?
params: (handler)
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/new-c.yaml000064400000000262150403624020014664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::HandlerSet::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/%3c%3c-i.yaml000064400000000356150403624020014752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add"
full_name: SOAP::Header::HandlerSet#<<
is_singleton: false
name: "<<"
params: (handler)
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/on_outbound-i.yaml000064400000000411150403624020016430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "returns: Array of SOAPHeaderItem"
full_name: SOAP::Header::HandlerSet#on_outbound
is_singleton: false
name: on_outbound
params: ()
visibility: public
ri/1.8/system/SOAP/Header/HandlerSet/cdesc-HandlerSet.yaml000064400000001202150403624020016756 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Header::HandlerSet
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: dup
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: on_inbound
- !ruby/object:RI::MethodSummary 
  name: on_outbound
- !ruby/object:RI::MethodSummary 
  name: store=
name: HandlerSet
superclass: Object
ri/1.8/system/SOAP/Header/SimpleHandler/on_inbound-i.yaml000064400000000331150403624030016727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::SimpleHandler#on_inbound
is_singleton: false
name: on_inbound
params: (header, mustunderstand)
visibility: public
ri/1.8/system/SOAP/Header/SimpleHandler/new-c.yaml000064400000000274150403624030015366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::SimpleHandler::new
is_singleton: true
name: new
params: (elename)
visibility: public
ri/1.8/system/SOAP/Header/SimpleHandler/on_simple_inbound-i.yaml000064400000000462150403624030020305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given header is a Hash, String or nil.
full_name: SOAP::Header::SimpleHandler#on_simple_inbound
is_singleton: false
name: on_simple_inbound
params: (header, mustunderstand)
visibility: public
ri/1.8/system/SOAP/Header/SimpleHandler/cdesc-SimpleHandler.yaml000064400000000760150403624040020164 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Header::SimpleHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: on_inbound
- !ruby/object:RI::MethodSummary 
  name: on_outbound
- !ruby/object:RI::MethodSummary 
  name: on_simple_inbound
- !ruby/object:RI::MethodSummary 
  name: on_simple_outbound
name: SimpleHandler
superclass: SOAP::Header::Handler
ri/1.8/system/SOAP/Header/SimpleHandler/on_outbound-i.yaml000064400000000305150403624040017132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::SimpleHandler#on_outbound
is_singleton: false
name: on_outbound
params: ()
visibility: public
ri/1.8/system/SOAP/Header/SimpleHandler/on_simple_outbound-i.yaml000064400000000434150403624040020506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Should return a Hash, String or nil.
full_name: SOAP::Header::SimpleHandler#on_simple_outbound
is_singleton: false
name: on_simple_outbound
params: ()
visibility: public
ri/1.8/system/SOAP/Header/Handler/on_inbound_headeritem-i.yaml000064400000000331150403624050017746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::Handler#on_inbound_headeritem
is_singleton: false
name: on_inbound_headeritem
params: (header)
visibility: public
ri/1.8/system/SOAP/Header/Handler/on_inbound-i.yaml000064400000000450150403624050015561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given header is a SOAPHeaderItem or nil.
full_name: SOAP::Header::Handler#on_inbound
is_singleton: false
name: on_inbound
params: (header, mustunderstand = false)
visibility: public
ri/1.8/system/SOAP/Header/Handler/new-c.yaml000064400000000266150403624050014217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::Handler::new
is_singleton: true
name: new
params: (elename)
visibility: public
ri/1.8/system/SOAP/Header/Handler/on_outbound-i.yaml000064400000000425150403624050015764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Should return a SOAP/OM, a SOAPHeaderItem or nil.
full_name: SOAP::Header::Handler#on_outbound
is_singleton: false
name: on_outbound
params: ()
visibility: public
ri/1.8/system/SOAP/Header/Handler/cdesc-Handler.yaml000064400000001255150403624050015641 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: elename
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: mustunderstand
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Header::Handler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: on_inbound
- !ruby/object:RI::MethodSummary 
  name: on_inbound_headeritem
- !ruby/object:RI::MethodSummary 
  name: on_outbound
- !ruby/object:RI::MethodSummary 
  name: on_outbound_headeritem
name: Handler
superclass: Object
ri/1.8/system/SOAP/Header/Handler/on_outbound_headeritem-i.yaml000064400000000325150403624050020152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Header::Handler#on_outbound_headeritem
is_singleton: false
name: on_outbound_headeritem
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPDuration/cdesc-SOAPDuration.yaml000064400000000412150403624050016231 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPDuration
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPDuration
superclass: XSD::XSDDuration
ri/1.8/system/SOAP/SOAPDecimal/cdesc-SOAPDecimal.yaml000064400000000407150403624050015557 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPDecimal
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPDecimal
superclass: XSD::XSDDecimal
ri/1.8/system/SOAP/SOAPUnsignedShort/cdesc-SOAPUnsignedShort.yaml000064400000000431150403624050020250 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPUnsignedShort
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPUnsignedShort
superclass: XSD::XSDUnsignedShort
ri/1.8/system/SOAP/proxy%3d-i.yaml000064400000000251150403624050012336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#proxy=
is_singleton: false
name: proxy=
params: (proxy)
visibility: public
ri/1.8/system/SOAP/create_connection-i.yaml000064400000000276150403624050014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#create_connection
is_singleton: false
name: create_connection
params: (url)
visibility: private
ri/1.8/system/SOAP/SOAPDate/cdesc-SOAPDate.yaml000064400000000376150403624060014423 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPDate
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPDate
superclass: XSD::XSDDate
ri/1.8/system/SOAP/SOAPGDay/cdesc-SOAPGDay.yaml000064400000000376150403624070014342 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPGDay
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPGDay
superclass: XSD::XSDGDay
ri/1.8/system/SOAP/SOAPUnsignedInt/cdesc-SOAPUnsignedInt.yaml000064400000000423150403624100017333 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPUnsignedInt
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPUnsignedInt
superclass: XSD::XSDUnsignedInt
ri/1.8/system/SOAP/RPC/Driver/setup_options-i.yaml000064400000000300150403624110015443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#setup_options
is_singleton: false
name: setup_options
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/Driver/create_header-i.yaml000064400000000307150403624120015313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#create_header
is_singleton: false
name: create_header
params: (headers)
visibility: private
ri/1.8/system/SOAP/RPC/Driver/call-i.yaml000064400000000272150403624120013454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#call
is_singleton: false
name: call
params: (name, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/loadproperty-i.yaml000064400000000311150403624120015257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#loadproperty
is_singleton: false
name: loadproperty
params: (propertyname)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_document_method_interface-i.yaml000064400000000357150403624130020554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_document_method_interface
is_singleton: false
name: add_document_method_interface
params: (name, param_def)
visibility: private
ri/1.8/system/SOAP/RPC/Driver/__attr_proxy-c.yaml000064400000000327150403624130015246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver::__attr_proxy
is_singleton: true
name: __attr_proxy
params: (symbol, assignable = false)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_method_with_soapaction_as-i.yaml000064400000000524150403624140020571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method_with_soapaction_as"
full_name: SOAP::RPC::Driver#add_method_with_soapaction_as
is_singleton: false
name: add_method_with_soapaction_as
params: (name, name_as, soapaction, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_method_interface-i.yaml000064400000000337150403624140016655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_method_interface
is_singleton: false
name: add_method_interface
params: (name, param_count)
visibility: private
ri/1.8/system/SOAP/RPC/Driver/add_rpc_method_as-i.yaml000064400000000416150403624150016163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method_as
block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_rpc_method_as
is_singleton: false
name: add_rpc_method_as
params: (name, name_as, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/httpproxy-i.yaml000064400000000267150403624150014631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#httpproxy
is_singleton: false
name: httpproxy
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_rpc_method-i.yaml000064400000000374150403624150015503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method
block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_rpc_method
is_singleton: false
name: add_rpc_method
params: (name, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/inspect-i.yaml000064400000000263150403624150014211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Driver/new-c.yaml000064400000000332150403624150013324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver::new
is_singleton: true
name: new
params: (endpoint_url, namespace = nil, soapaction = nil)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/mandatorycharset-i.yaml000064400000000305150403624150016111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#mandatorycharset
is_singleton: false
name: mandatorycharset
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_document_method-i.yaml000064400000000361150403624150016531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_document_method
is_singleton: false
name: add_document_method
params: (name, soapaction, req_qname, res_qname)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/wiredump_dev-i.yaml000064400000000275150403624150015241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#wiredump_dev
is_singleton: false
name: wiredump_dev
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_rpc_method_interface-i.yaml000064400000000345150403624150017521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_rpc_method_interface
is_singleton: false
name: add_rpc_method_interface
params: (name, param_def)
visibility: private
ri/1.8/system/SOAP/RPC/Driver/httpproxy%3d-i.yaml000064400000000302150403624150015113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#httpproxy=
is_singleton: false
name: httpproxy=
params: (httpproxy)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_method_with_soapaction-i.yaml000064400000000502150403624150020103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method_with_soapaction"
full_name: SOAP::RPC::Driver#add_method_with_soapaction
is_singleton: false
name: add_method_with_soapaction
params: (name, soapaction, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/wiredump_file_base-i.yaml000064400000000311150403624150016363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#wiredump_file_base
is_singleton: false
name: wiredump_file_base
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Driver/wiredump_dev%3d-i.yaml000064400000000313150403624160015527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#wiredump_dev=
is_singleton: false
name: wiredump_dev=
params: (wiredump_dev)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_rpc_operation-i.yaml000064400000000363150403624160016222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_rpc_operation
is_singleton: false
name: add_rpc_operation
params: (qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_rpc_method_with_soapaction_as-i.yaml000064400000000512150403624160021434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method_with_soapaction_as
block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_rpc_method_with_soapaction_as
is_singleton: false
name: add_rpc_method_with_soapaction_as
params: (name, name_as, soapaction, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/cdesc-Driver.yaml000064400000004453150403624160014636 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: options
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: proxy
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: __attr_proxy
- !ruby/object:RI::MethodSummary 
  name: __attr_proxy
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::Driver
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_document_method
- !ruby/object:RI::MethodSummary 
  name: add_document_method_interface
- !ruby/object:RI::MethodSummary 
  name: add_document_operation
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: add_method_as
- !ruby/object:RI::MethodSummary 
  name: add_method_interface
- !ruby/object:RI::MethodSummary 
  name: add_method_interface
- !ruby/object:RI::MethodSummary 
  name: add_method_with_soapaction
- !ruby/object:RI::MethodSummary 
  name: add_method_with_soapaction_as
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_as
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_interface
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_with_soapaction
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_with_soapaction_as
- !ruby/object:RI::MethodSummary 
  name: add_rpc_operation
- !ruby/object:RI::MethodSummary 
  name: call
- !ruby/object:RI::MethodSummary 
  name: create_header
- !ruby/object:RI::MethodSummary 
  name: httpproxy
- !ruby/object:RI::MethodSummary 
  name: httpproxy=
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: invoke
- !ruby/object:RI::MethodSummary 
  name: loadproperty
- !ruby/object:RI::MethodSummary 
  name: mandatorycharset
- !ruby/object:RI::MethodSummary 
  name: mandatorycharset=
- !ruby/object:RI::MethodSummary 
  name: set_wiredump_file_base
- !ruby/object:RI::MethodSummary 
  name: setup_options
- !ruby/object:RI::MethodSummary 
  name: wiredump_dev
- !ruby/object:RI::MethodSummary 
  name: wiredump_dev=
- !ruby/object:RI::MethodSummary 
  name: wiredump_file_base
- !ruby/object:RI::MethodSummary 
  name: wiredump_file_base=
name: Driver
superclass: Object
ri/1.8/system/SOAP/RPC/Driver/add_rpc_method_with_soapaction-i.yaml000064400000000470150403624160020754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method_with_soapaction
block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_rpc_method_with_soapaction
is_singleton: false
name: add_rpc_method_with_soapaction
params: (name, soapaction, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/set_wiredump_file_base-i.yaml000064400000000326150403624160017245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#set_wiredump_file_base
is_singleton: false
name: set_wiredump_file_base
params: (name)
visibility: private
ri/1.8/system/SOAP/RPC/Driver/mandatorycharset%3d-i.yaml000064400000000327150403624170016413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#mandatorycharset=
is_singleton: false
name: mandatorycharset=
params: (mandatorycharset)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_method_as-i.yaml000064400000000430150403624170015315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method_as"
full_name: SOAP::RPC::Driver#add_method_as
is_singleton: false
name: add_method_as
params: (name, name_as, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/invoke-i.yaml000064400000000276150403624170014045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#invoke
is_singleton: false
name: invoke
params: (headers, body)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_method-i.yaml000064400000000406150403624170014635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method"
full_name: SOAP::RPC::Driver#add_method
is_singleton: false
name: add_method
params: (name, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/wiredump_file_base%3d-i.yaml000064400000000335150403624170016667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#wiredump_file_base=
is_singleton: false
name: wiredump_file_base=
params: (wiredump_file_base)
visibility: public
ri/1.8/system/SOAP/RPC/Driver/add_document_operation-i.yaml000064400000000366150403624170017260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Driver#add_document_operation
is_singleton: false
name: add_document_operation
params: (soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/cdesc-RPC.yaml000064400000000512150403624170012565 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: defined_methods
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ServerException
  value: Mapping::MappedException
full_name: SOAP::RPC
includes: []

instance_methods: []

name: RPC
superclass: 
ri/1.8/system/SOAP/RPC/defined_methods-c.yaml000064400000000276150403624170014432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::defined_methods
is_singleton: true
name: defined_methods
params: (obj)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/cdesc-SOAPMethod.yaml000064400000002741150403624170015755 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: inparam
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: outparam
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: param_def
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: retval_class_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: retval_name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_doc_param_def
- !ruby/object:RI::MethodSummary 
  name: create_rpc_param_def
- !ruby/object:RI::MethodSummary 
  name: derive_rpc_param_def
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: param_count
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RETVAL
  value: "'retval'"
- !ruby/object:RI::Constant 
  comment: 
  name: IN
  value: "'in'"
- !ruby/object:RI::Constant 
  comment: 
  name: OUT
  value: "'out'"
- !ruby/object:RI::Constant 
  comment: 
  name: INOUT
  value: "'inout'"
full_name: SOAP::RPC::SOAPMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: collect_params
- !ruby/object:RI::MethodSummary 
  name: have_outparam?
- !ruby/object:RI::MethodSummary 
  name: init_param
- !ruby/object:RI::MethodSummary 
  name: input_params
- !ruby/object:RI::MethodSummary 
  name: output_params
- !ruby/object:RI::MethodSummary 
  name: set_outparam
- !ruby/object:RI::MethodSummary 
  name: set_param
name: SOAPMethod
superclass: SOAPStruct
ri/1.8/system/SOAP/RPC/SOAPMethod/output_params-i.yaml000064400000000303150403624170016114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod#output_params
is_singleton: false
name: output_params
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/have_outparam%3f-i.yaml000064400000000305150403624170016344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod#have_outparam?
is_singleton: false
name: have_outparam?
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/derive_rpc_param_def-c.yaml000064400000000342150403624170017326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod::derive_rpc_param_def
is_singleton: true
name: derive_rpc_param_def
params: (obj, name, *param)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/set_param-i.yaml000064400000000301150403624170015162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod#set_param
is_singleton: false
name: set_param
params: (params)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/param_count-c.yaml000064400000000317150403624170015520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod::param_count
is_singleton: true
name: param_count
params: (param_def, *type)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/collect_params-i.yaml000064400000000313150403624170016202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod#collect_params
is_singleton: false
name: collect_params
params: (*type)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPMethod/new-c.yaml000064400000000305150403624170013776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod::new
is_singleton: true
name: new
params: (qname, param_def = nil)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/create_doc_param_def-c.yaml000064400000000347150403624170017301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod::create_doc_param_def
is_singleton: true
name: create_doc_param_def
params: (req_qnames, res_qnames)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/init_param-i.yaml000064400000000307150403624200015332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod#init_param
is_singleton: false
name: init_param
params: (param_def)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPMethod/create_rpc_param_def-c.yaml000064400000000334150403624200017306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod::create_rpc_param_def
is_singleton: true
name: create_rpc_param_def
params: (param_names)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/set_outparam-i.yaml000064400000000307150403624200015712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod#set_outparam
is_singleton: false
name: set_outparam
params: (params)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethod/input_params-i.yaml000064400000000301150403624200015703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethod#input_params
is_singleton: false
name: input_params
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/require_path_info%3f-i.yaml000064400000000312150403624200016550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#require_path_info?
is_singleton: false
name: require_path_info?
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/allow_content_encoding_gzip%3d-i.yaml000064400000000343150403624200020616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#allow_content_encoding_gzip=
is_singleton: false
name: allow_content_encoding_gzip=
params: (allow)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/do_POST-i.yaml000064400000000274150403624200014025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#do_POST
is_singleton: false
name: do_POST
params: (req, res)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/encode_gzip-i.yaml000064400000000313150403624210015037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#encode_gzip
is_singleton: false
name: encode_gzip
params: (req, outstring)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPlet/parse_soapaction-i.yaml000064400000000321150403624210016102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#parse_soapaction
is_singleton: false
name: parse_soapaction
params: (soapaction)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPlet/app_scope_router-i.yaml000064400000000405150403624210016124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: for backward compatibility
full_name: SOAP::RPC::SOAPlet#app_scope_router
is_singleton: false
name: app_scope_router
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/do_GET-i.yaml000064400000000272150403624220013657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#do_GET
is_singleton: false
name: do_GET
params: (req, res)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/setup_req-i.yaml000064400000000307150403624220014564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#setup_req
is_singleton: false
name: setup_req
params: (conn_data, req)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPlet/logger-i.yaml000064400000000263150403624220014035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#logger
is_singleton: false
name: logger
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/SOAPlet/encode_gzip%3f-i.yaml000064400000000302150403624220015334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#encode_gzip?
is_singleton: false
name: encode_gzip?
params: (req)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPlet/new-c.yaml000064400000000270150403624220013337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet::new
is_singleton: true
name: new
params: (router = nil)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/add_servant-i.yaml000064400000000411150403624230015044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: for backward compatibility
full_name: SOAP::RPC::SOAPlet#add_servant
is_singleton: false
name: add_servant
params: (obj, namespace)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/get_instance-i.yaml000064400000000422150403624230015217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Servlet interfaces for WEBrick.
full_name: SOAP::RPC::SOAPlet#get_instance
is_singleton: false
name: get_instance
params: (config, *options)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPlet/setup_res-i.yaml000064400000000314150403624230014565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPlet#setup_res
is_singleton: false
name: setup_res
params: (conn_data, req, res)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPlet/cdesc-SOAPlet.yaml000064400000002034150403624230014655 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: options
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::SOAPlet
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_servant
- !ruby/object:RI::MethodSummary 
  name: allow_content_encoding_gzip=
- !ruby/object:RI::MethodSummary 
  name: app_scope_router
- !ruby/object:RI::MethodSummary 
  name: do_GET
- !ruby/object:RI::MethodSummary 
  name: do_POST
- !ruby/object:RI::MethodSummary 
  name: encode_gzip
- !ruby/object:RI::MethodSummary 
  name: encode_gzip?
- !ruby/object:RI::MethodSummary 
  name: get_instance
- !ruby/object:RI::MethodSummary 
  name: logger
- !ruby/object:RI::MethodSummary 
  name: parse_soapaction
- !ruby/object:RI::MethodSummary 
  name: require_path_info?
- !ruby/object:RI::MethodSummary 
  name: setup_req
- !ruby/object:RI::MethodSummary 
  name: setup_res
name: SOAPlet
superclass: WEBrick::HTTPServlet::AbstractServlet
ri/1.8/system/SOAP/RPC/HTTPServer/generate_explicit_type%3d-i.yaml000064400000000355150403624240020311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#generate_explicit_type=
is_singleton: false
name: generate_explicit_type=
params: (generate_explicit_type)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/mapping_registry%3d-i.yaml000064400000000333150403624240017134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#mapping_registry=
is_singleton: false
name: mapping_registry=
params: (mapping_registry)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_rpc_headerhandler-i.yaml000064400000000431150403624240017516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_headerhandler"
full_name: SOAP::RPC::HTTPServer#add_rpc_headerhandler
is_singleton: false
name: add_rpc_headerhandler
params: (obj)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/shutdown-i.yaml000064400000000271150403624240015131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#shutdown
is_singleton: false
name: shutdown
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_rpc_servant-i.yaml000064400000000352150403624240016414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_rpc_servant
is_singleton: false
name: add_rpc_servant
params: (obj, namespace = @default_namespace)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/on_init-i.yaml000064400000000267150403624240014722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#on_init
is_singleton: false
name: on_init
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/mapping_registry-i.yaml000064400000000311150403624250016635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#mapping_registry
is_singleton: false
name: mapping_registry
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_rpc_request_servant-i.yaml000064400000000472150403624250020170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: servant entry interface
full_name: SOAP::RPC::HTTPServer#add_rpc_request_servant
is_singleton: false
name: add_rpc_request_servant
params: (factory, namespace = @default_namespace)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_rpc_method_as-i.yaml000064400000000426150403624250016700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method_as
block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_rpc_method_as
is_singleton: false
name: add_rpc_method_as
params: (obj, name, name_as, *param)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_rpc_request_operation-i.yaml000064400000000420150403624250020477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_rpc_request_operation
is_singleton: false
name: add_rpc_request_operation
params: (factory, qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/generate_explicit_type-i.yaml000064400000000325150403624260020014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#generate_explicit_type
is_singleton: false
name: generate_explicit_type
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_rpc_method-i.yaml000064400000000477150403624260016224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: method entry interface
full_name: SOAP::RPC::HTTPServer#add_rpc_method
is_singleton: false
name: add_rpc_method
params: (obj, name, *param)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/new-c.yaml000064400000000265150403624260014046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer::new
is_singleton: true
name: new
params: (config)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_document_request_operation-i.yaml000064400000000423150403624260021535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_document_request_operation
is_singleton: false
name: add_document_request_operation
params: (factory, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_document_method-i.yaml000064400000000374150403624260017252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_document_method
is_singleton: false
name: add_document_method
params: (obj, soapaction, name, req_qnames, res_qnames)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/status-i.yaml000064400000000265150403624260014606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#status
is_singleton: false
name: status
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_rpc_operation-i.yaml000064400000000401150403624260016727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_rpc_operation
is_singleton: false
name: add_rpc_operation
params: (receiver, qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/run-i.yaml000064400000000260150403624260014062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#run
is_singleton: false
name: run
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/HTTPServer/add_request_headerhandler-i.yaml000064400000000342150403624260020425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_request_headerhandler
is_singleton: false
name: add_request_headerhandler
params: (factory)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_headerhandler-i.yaml000064400000000407150403624260016657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_rpc_headerhandler
block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_headerhandler
is_singleton: false
name: add_headerhandler
params: (obj)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_method_as-i.yaml000064400000000440150403624260016031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method_as"
full_name: SOAP::RPC::HTTPServer#add_method_as
is_singleton: false
name: add_method_as
params: (obj, name, name_as, *param)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_method-i.yaml000064400000000416150403624260015351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method"
full_name: SOAP::RPC::HTTPServer#add_method
is_singleton: false
name: add_method
params: (obj, name, *param)
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/add_document_operation-i.yaml000064400000000404150403624270017765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::HTTPServer#add_document_operation
is_singleton: false
name: add_document_operation
params: (receiver, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/HTTPServer/cdesc-HTTPServer.yaml000064400000003260150403624270016061 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: default_namespace
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: server
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::HTTPServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_document_method
- !ruby/object:RI::MethodSummary 
  name: add_document_operation
- !ruby/object:RI::MethodSummary 
  name: add_document_request_operation
- !ruby/object:RI::MethodSummary 
  name: add_headerhandler
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: add_method_as
- !ruby/object:RI::MethodSummary 
  name: add_request_headerhandler
- !ruby/object:RI::MethodSummary 
  name: add_rpc_headerhandler
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_as
- !ruby/object:RI::MethodSummary 
  name: add_rpc_operation
- !ruby/object:RI::MethodSummary 
  name: add_rpc_request_operation
- !ruby/object:RI::MethodSummary 
  name: add_rpc_request_servant
- !ruby/object:RI::MethodSummary 
  name: add_rpc_servant
- !ruby/object:RI::MethodSummary 
  name: generate_explicit_type
- !ruby/object:RI::MethodSummary 
  name: generate_explicit_type=
- !ruby/object:RI::MethodSummary 
  name: mapping_registry
- !ruby/object:RI::MethodSummary 
  name: mapping_registry=
- !ruby/object:RI::MethodSummary 
  name: on_init
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: shutdown
- !ruby/object:RI::MethodSummary 
  name: status
name: HTTPServer
superclass: Logger::Application
ri/1.8/system/SOAP/RPC/RPCError/cdesc-RPCError.yaml000064400000000307150403624270015240 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::RPC::RPCError
includes: []

instance_methods: []

name: RPCError
superclass: Error
ri/1.8/system/SOAP/RPC/SOAPMethodRequest/create_method_response-i.yaml000064400000000357150403624300021307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethodRequest#create_method_response
is_singleton: false
name: create_method_response
params: (response_name = nil)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethodRequest/each-i.yaml000064400000000353150403624300015462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (name, @inparam[name])
comment: 
full_name: SOAP::RPC::SOAPMethodRequest#each
is_singleton: false
name: each
params: () {|name, @inparam[name]| ...}
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethodRequest/dup-i.yaml000064400000000266150403624300015355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethodRequest#dup
is_singleton: false
name: dup
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethodRequest/new-c.yaml000064400000000336150403624300015346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethodRequest::new
is_singleton: true
name: new
params: (qname, param_def = nil, soapaction = nil)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethodRequest/check_elename-i.yaml000064400000000320150403624300017317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethodRequest#check_elename
is_singleton: false
name: check_elename
params: (qname)
visibility: private
ri/1.8/system/SOAP/RPC/SOAPMethodRequest/cdesc-SOAPMethodRequest.yaml000064400000001130150403624300020661 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_request
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::SOAPMethodRequest
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_elename
- !ruby/object:RI::MethodSummary 
  name: create_method_response
- !ruby/object:RI::MethodSummary 
  name: dup
- !ruby/object:RI::MethodSummary 
  name: each
name: SOAPMethodRequest
superclass: SOAPMethod
ri/1.8/system/SOAP/RPC/SOAPMethodRequest/create_request-c.yaml000064400000000332150403624310017565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethodRequest::create_request
is_singleton: true
name: create_request
params: (qname, *params)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/generate_explicit_type%3d-i.yaml000064400000000352150403624310017576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#generate_explicit_type=
is_singleton: false
name: generate_explicit_type=
params: (generate_explicit_type)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/mapping_registry%3d-i.yaml000064400000000315150403624310016424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#mapping_registry=
is_singleton: false
name: mapping_registry=
params: (value)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_rpc_method_with_namespace_as-i.yaml000064400000000513150403624310021233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method_with_namespace_as
block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#add_rpc_method_with_namespace_as
is_singleton: false
name: add_rpc_method_with_namespace_as
params: (namespace, obj, name, name_as, *param)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/SOAPStdinRequest/%5b%5d-i.yaml000064400000000301150403624310016526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPStdinRequest#[]
is_singleton: false
name: "[]"
params: (var)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/SOAPStdinRequest/cdesc-SOAPStdinRequest.yaml000064400000000655150403624310021637 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: body
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::CGIStub::SOAPStdinRequest
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: meta_vars
name: SOAPStdinRequest
superclass: SOAPRequest
ri/1.8/system/SOAP/RPC/CGIStub/SOAPStdinRequest/new-c.yaml000064400000000304150403624310016443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPStdinRequest::new
is_singleton: true
name: new
params: (stream)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/SOAPStdinRequest/meta_vars-i.yaml000064400000000312150403624310017640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPStdinRequest#meta_vars
is_singleton: false
name: meta_vars
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_rpc_headerhandler-i.yaml000064400000000426150403624310017012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_headerhandler"
full_name: SOAP::RPC::CGIStub#add_rpc_headerhandler
is_singleton: false
name: add_rpc_headerhandler
params: (obj)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_rpc_servant-i.yaml000064400000000522150403624310015703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_servant
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: servant entry interface
full_name: SOAP::RPC::CGIStub#add_rpc_servant
is_singleton: false
name: add_rpc_servant
params: (obj, namespace = @default_namespace)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_method_with_namespace_as-i.yaml000064400000000525150403624310020372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method_with_namespace_as"
full_name: SOAP::RPC::CGIStub#add_method_with_namespace_as
is_singleton: false
name: add_method_with_namespace_as
params: (namespace, obj, name, name_as, *param)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/on_init-i.yaml000064400000000264150403624310014207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#on_init
is_singleton: false
name: on_init
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/mapping_registry-i.yaml000064400000000306150403624310016130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#mapping_registry
is_singleton: false
name: mapping_registry
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_rpc_method_as-i.yaml000064400000000423150403624310016164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method_as
block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#add_rpc_method_as
is_singleton: false
name: add_rpc_method_as
params: (obj, name, name_as, *param)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/generate_explicit_type-i.yaml000064400000000322150403624310017277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#generate_explicit_type
is_singleton: false
name: generate_explicit_type
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_rpc_method-i.yaml000064400000000474150403624310015507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: method entry interface
full_name: SOAP::RPC::CGIStub#add_rpc_method
is_singleton: false
name: add_rpc_method
params: (obj, name, *param)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/new-c.yaml000064400000000306150403624310013330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::new
is_singleton: true
name: new
params: (appname, default_namespace)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_servant-i.yaml000064400000000440150403624310015036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_servant"
full_name: SOAP::RPC::CGIStub#add_servant
is_singleton: false
name: add_servant
params: (obj, namespace = @default_namespace)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/cdesc-CGIStub.yaml000064400000003620150403624310014640 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: SYNOPSIS
- !ruby/struct:SM::Flow::VERB 
  body: "  CGIStub.new\n"
- !ruby/struct:SM::Flow::P 
  body: DESCRIPTION
- !ruby/struct:SM::Flow::VERB 
  body: "  To be written...\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: HTTPVersion
  value: WEBrick::HTTPVersion.new('1.0')
full_name: SOAP::RPC::CGIStub
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
- !ruby/object:RI::IncludedModule 
  name: WEBrick
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_document_operation
- !ruby/object:RI::MethodSummary 
  name: add_headerhandler
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: add_method_as
- !ruby/object:RI::MethodSummary 
  name: add_method_with_namespace
- !ruby/object:RI::MethodSummary 
  name: add_method_with_namespace_as
- !ruby/object:RI::MethodSummary 
  name: add_rpc_headerhandler
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_as
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_with_namespace
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_with_namespace_as
- !ruby/object:RI::MethodSummary 
  name: add_rpc_operation
- !ruby/object:RI::MethodSummary 
  name: add_rpc_servant
- !ruby/object:RI::MethodSummary 
  name: add_servant
- !ruby/object:RI::MethodSummary 
  name: generate_explicit_type
- !ruby/object:RI::MethodSummary 
  name: generate_explicit_type=
- !ruby/object:RI::MethodSummary 
  name: mapping_registry
- !ruby/object:RI::MethodSummary 
  name: mapping_registry=
- !ruby/object:RI::MethodSummary 
  name: on_init
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: set_fcgi_request
name: CGIStub
superclass: Logger::Application
ri/1.8/system/SOAP/RPC/CGIStub/add_method_with_namespace-i.yaml000064400000000503150403624320017704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method_with_namespace"
full_name: SOAP::RPC::CGIStub#add_method_with_namespace
is_singleton: false
name: add_method_with_namespace
params: (namespace, obj, name, *param)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_rpc_operation-i.yaml000064400000000376150403624320016231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#add_rpc_operation
is_singleton: false
name: add_rpc_operation
params: (receiver, qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/SOAPFCGIRequest/%5b%5d-i.yaml000064400000000300150403624320016155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPFCGIRequest#[]
is_singleton: false
name: "[]"
params: (var)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/SOAPFCGIRequest/cdesc-SOAPFCGIRequest.yaml000064400000000653150403624320020714 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: body
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::CGIStub::SOAPFCGIRequest
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: meta_vars
name: SOAPFCGIRequest
superclass: SOAPRequest
ri/1.8/system/SOAP/RPC/CGIStub/SOAPFCGIRequest/new-c.yaml000064400000000304150403624320016073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPFCGIRequest::new
is_singleton: true
name: new
params: (request)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/SOAPFCGIRequest/meta_vars-i.yaml000064400000000311150403624330017270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPFCGIRequest#meta_vars
is_singleton: false
name: meta_vars
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/run-i.yaml000064400000000255150403624330013356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#run
is_singleton: false
name: run
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/CGIStub/SOAPRequest/%5b%5d-i.yaml000064400000000274150403624330015537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPRequest#[]
is_singleton: false
name: "[]"
params: (var)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/SOAPRequest/cdesc-SOAPRequest.yaml000064400000000563150403624330017633 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: body
  rw: R
class_methods: []

comment: 
constants: []

full_name: SOAP::RPC::CGIStub::SOAPRequest
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: meta_vars
name: SOAPRequest
superclass: Object
ri/1.8/system/SOAP/RPC/CGIStub/SOAPRequest/meta_vars-i.yaml000064400000000305150403624340016643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub::SOAPRequest#meta_vars
is_singleton: false
name: meta_vars
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_headerhandler-i.yaml000064400000000404150403624340016145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_rpc_headerhandler
block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#add_headerhandler
is_singleton: false
name: add_headerhandler
params: (obj)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_method_as-i.yaml000064400000000435150403624340015326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method_as"
full_name: SOAP::RPC::CGIStub#add_method_as
is_singleton: false
name: add_method_as
params: (obj, name, name_as, *param)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/set_fcgi_request-i.yaml000064400000000315150403624340016103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#set_fcgi_request
is_singleton: false
name: set_fcgi_request
params: (request)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_method-i.yaml000064400000000413150403624340014637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_method"
full_name: SOAP::RPC::CGIStub#add_method
is_singleton: false
name: add_method
params: (obj, name, *param)
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_document_operation-i.yaml000064400000000401150403624340017252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#add_document_operation
is_singleton: false
name: add_document_operation
params: (receiver, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/CGIStub/add_rpc_method_with_namespace-i.yaml000064400000000471150403624340020556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method_with_namespace
block_params: 
comment: 
full_name: SOAP::RPC::CGIStub#add_rpc_method_with_namespace
is_singleton: false
name: add_rpc_method_with_namespace
params: (namespace, obj, name, *param)
visibility: public
ri/1.8/system/SOAP/RPC/MethodDefinitionError/cdesc-MethodDefinitionError.yaml000064400000000344150403624350022652 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::RPC::MethodDefinitionError
includes: []

instance_methods: []

name: MethodDefinitionError
superclass: RPCError
ri/1.8/system/SOAP/RPC/Proxy/endpoint_url-i.yaml000064400000000274150403624350015140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#endpoint_url
is_singleton: false
name: endpoint_url
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/marshal-i.yaml000064400000000273150403624350014064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#marshal
is_singleton: false
name: marshal
params: (env, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/create_header-i.yaml000064400000000306150403624360015206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#create_header
is_singleton: false
name: create_header
params: (headers)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/route-i.yaml000064400000000322150403624360013567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#route
is_singleton: false
name: route
params: (req_header, req_body, reqopt, resopt)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/create_request_header-i.yaml000064400000000317150403624370016761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#create_request_header
is_singleton: false
name: create_request_header
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/call-i.yaml000064400000000271150403624370013350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#call
is_singleton: false
name: call
params: (name, *params)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/cdesc-Proxy.yaml000064400000004456150403624370014420 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: allow_unqualified_element
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: default_encodingstyle
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: generate_explicit_type
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: headerhandler
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: literal_mapping_registry
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: mandatorycharset
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: mapping_registry
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: operation
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: streamhandler
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::Proxy
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_document_method
- !ruby/object:RI::MethodSummary 
  name: add_document_operation
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method
- !ruby/object:RI::MethodSummary 
  name: add_rpc_operation
- !ruby/object:RI::MethodSummary 
  name: call
- !ruby/object:RI::MethodSummary 
  name: check_fault
- !ruby/object:RI::MethodSummary 
  name: create_encoding_opt
- !ruby/object:RI::MethodSummary 
  name: create_header
- !ruby/object:RI::MethodSummary 
  name: create_mapping_opt
- !ruby/object:RI::MethodSummary 
  name: create_request_header
- !ruby/object:RI::MethodSummary 
  name: endpoint_url
- !ruby/object:RI::MethodSummary 
  name: endpoint_url=
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: invoke
- !ruby/object:RI::MethodSummary 
  name: marshal
- !ruby/object:RI::MethodSummary 
  name: receive_headers
- !ruby/object:RI::MethodSummary 
  name: reset_stream
- !ruby/object:RI::MethodSummary 
  name: route
- !ruby/object:RI::MethodSummary 
  name: set_envelopenamespace
- !ruby/object:RI::MethodSummary 
  name: set_wiredump_file_base
- !ruby/object:RI::MethodSummary 
  name: test_loopback_response
- !ruby/object:RI::MethodSummary 
  name: unmarshal
name: Proxy
superclass: Object
ri/1.8/system/SOAP/RPC/Proxy/check_fault-i.yaml000064400000000276150403624370014712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#check_fault
is_singleton: false
name: check_fault
params: (body)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/endpoint_url%3d-i.yaml000064400000000312150403624400015421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#endpoint_url=
is_singleton: false
name: endpoint_url=
params: (endpoint_url)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_doc_enc-i.yaml000064400000000353150403624400017700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_doc_enc
is_singleton: false
name: response_doc_enc
params: (body, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_doc_enc-i.yaml000064400000000353150403624400017532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_doc_enc
is_singleton: false
name: request_doc_enc
params: (values, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_rpc_enc-i.yaml000064400000000353150403624400017551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_rpc_enc
is_singleton: false
name: request_rpc_enc
params: (values, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_obj-i.yaml000064400000000374150403624410017064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_obj
is_singleton: false
name: response_obj
params: (body, mapping_registry, literal_mapping_registry, opt)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_rpc_enc-i.yaml000064400000000353150403624410017720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_rpc_enc
is_singleton: false
name: response_rpc_enc
params: (body, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_rpc_lit-i.yaml000064400000000353150403624420017576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_rpc_lit
is_singleton: false
name: request_rpc_lit
params: (values, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_doc-i.yaml000064400000000375150403624420017061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_doc
is_singleton: false
name: response_doc
params: (body, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/check_use-i.yaml000064400000000305150403624420016320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#check_use
is_singleton: false
name: check_use
params: (use)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_rpc_lit-i.yaml000064400000000353150403624430017745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_rpc_lit
is_singleton: false
name: response_rpc_lit
params: (body, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_rpc-i.yaml000064400000000375150403624430017101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_rpc
is_singleton: false
name: response_rpc
params: (body, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/new-c.yaml000064400000000317150403624430015156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation::new
is_singleton: true
name: new
params: (soapaction, param_def, opt)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_body-i.yaml000064400000000376150403624440017106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_body
is_singleton: false
name: request_body
params: (values, mapping_registry, literal_mapping_registry, opt)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_doc-i.yaml000064400000000375150403624440016715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_doc
is_singleton: false
name: request_doc
params: (values, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_default_encodingstyle-i.yaml000064400000000351150403624440022515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_default_encodingstyle
is_singleton: false
name: request_default_encodingstyle
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_rpc-i.yaml000064400000000375150403624450016735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_rpc
is_singleton: false
name: request_rpc
params: (values, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/check_style-i.yaml000064400000000313150403624450016666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#check_style
is_singleton: false
name: check_style
params: (style)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_doc_lit-i.yaml000064400000000353150403624450017730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_doc_lit
is_singleton: false
name: response_doc_lit
params: (body, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/cdesc-Operation.yaml000064400000003577150403624460017202 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attributeformdefault
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: elementformdefault
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: request_style
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: request_use
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: response_style
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: response_use
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::Proxy::Operation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_style
- !ruby/object:RI::MethodSummary 
  name: check_use
- !ruby/object:RI::MethodSummary 
  name: create_request_obj
- !ruby/object:RI::MethodSummary 
  name: raise_fault
- !ruby/object:RI::MethodSummary 
  name: request_body
- !ruby/object:RI::MethodSummary 
  name: request_default_encodingstyle
- !ruby/object:RI::MethodSummary 
  name: request_doc
- !ruby/object:RI::MethodSummary 
  name: request_doc_enc
- !ruby/object:RI::MethodSummary 
  name: request_doc_lit
- !ruby/object:RI::MethodSummary 
  name: request_rpc
- !ruby/object:RI::MethodSummary 
  name: request_rpc_enc
- !ruby/object:RI::MethodSummary 
  name: request_rpc_lit
- !ruby/object:RI::MethodSummary 
  name: response_default_encodingstyle
- !ruby/object:RI::MethodSummary 
  name: response_doc
- !ruby/object:RI::MethodSummary 
  name: response_doc_enc
- !ruby/object:RI::MethodSummary 
  name: response_doc_lit
- !ruby/object:RI::MethodSummary 
  name: response_obj
- !ruby/object:RI::MethodSummary 
  name: response_rpc
- !ruby/object:RI::MethodSummary 
  name: response_rpc_enc
- !ruby/object:RI::MethodSummary 
  name: response_rpc_lit
name: Operation
superclass: Object
ri/1.8/system/SOAP/RPC/Proxy/Operation/raise_fault-i.yaml000064400000000362150403624460016674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#raise_fault
is_singleton: false
name: raise_fault
params: (e, mapping_registry, literal_mapping_registry)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/Operation/create_request_obj-i.yaml000064400000000341150403624460020240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#create_request_obj
is_singleton: false
name: create_request_obj
params: (names, params)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/Operation/response_default_encodingstyle-i.yaml000064400000000353150403624460022667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#response_default_encodingstyle
is_singleton: false
name: response_default_encodingstyle
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/Operation/request_doc_lit-i.yaml000064400000000353150403624460017563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::Operation#request_doc_lit
is_singleton: false
name: request_doc_lit
params: (values, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/create_encoding_opt-i.yaml000064400000000325150403624460016430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#create_encoding_opt
is_singleton: false
name: create_encoding_opt
params: (hash = nil)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/add_rpc_method-i.yaml000064400000000457150403624460015377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_operation"
full_name: SOAP::RPC::Proxy#add_rpc_method
is_singleton: false
name: add_rpc_method
params: (qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/inspect-i.yaml000064400000000262150403624460014102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/new-c.yaml000064400000000313150403624470013216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy::new
is_singleton: true
name: new
params: (endpoint_url, soapaction, options)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/add_document_method-i.yaml000064400000000467150403624470016433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_document_operation"
full_name: SOAP::RPC::Proxy#add_document_method
is_singleton: false
name: add_document_method
params: (soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/create_mapping_opt-i.yaml000064400000000323150403624470016274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#create_mapping_opt
is_singleton: false
name: create_mapping_opt
params: (hash = nil)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/test_loopback_response-i.yaml000064400000000320150403624500017172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#test_loopback_response
is_singleton: false
name: test_loopback_response
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/add_rpc_operation-i.yaml000064400000000525150403624500016106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method
- !ruby/object:RI::AliasName 
  name: add_rpc_method
block_params: 
comment: 
full_name: SOAP::RPC::Proxy#add_rpc_operation
is_singleton: false
name: add_rpc_operation
params: (qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/receive_headers-i.yaml000064400000000312150403624500015541 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#receive_headers
is_singleton: false
name: receive_headers
params: (headers)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/set_wiredump_file_base-i.yaml000064400000000342150403624500017127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#set_wiredump_file_base
is_singleton: false
name: set_wiredump_file_base
params: (wiredump_file_base)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/unmarshal-i.yaml000064400000000305150403624500014420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#unmarshal
is_singleton: false
name: unmarshal
params: (conn_data, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Proxy/invoke-i.yaml000064400000000317150403624510013725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#invoke
is_singleton: false
name: invoke
params: (req_header, req_body, opt = nil)
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/add_method-i.yaml000064400000000447150403624510014526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_operation"
full_name: SOAP::RPC::Proxy#add_method
is_singleton: false
name: add_method
params: (qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/add_document_operation-i.yaml000064400000000454150403624510017142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_document_method
block_params: 
comment: 
full_name: SOAP::RPC::Proxy#add_document_operation
is_singleton: false
name: add_document_operation
params: (soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/reset_stream-i.yaml000064400000000274150403624510015131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#reset_stream
is_singleton: false
name: reset_stream
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Proxy/set_envelopenamespace-i.yaml000064400000000335150403624520017000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Proxy#set_envelopenamespace
is_singleton: false
name: set_envelopenamespace
params: (env, namespace)
visibility: private
ri/1.8/system/SOAP/RPC/StandaloneServer/new-c.yaml000064400000000356150403624520015357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::StandaloneServer::new
is_singleton: true
name: new
params: (appname, default_namespace, host = "0.0.0.0", port = 8080)
visibility: public
ri/1.8/system/SOAP/RPC/StandaloneServer/cdesc-StandaloneServer.yaml000064400000000474150403624520020705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::StandaloneServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_config
name: StandaloneServer
superclass: HTTPServer
ri/1.8/system/SOAP/RPC/StandaloneServer/create_config-i.yaml000064400000000312150403624520017354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::StandaloneServer#create_config
is_singleton: false
name: create_config
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/SOAPMethodResponse/each-i.yaml000064400000000356150403624520015637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@retval_name, @retval)
comment: 
full_name: SOAP::RPC::SOAPMethodResponse#each
is_singleton: false
name: each
params: () {|@retval_name, @retval| ...}
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethodResponse/new-c.yaml000064400000000315150403624520015515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethodResponse::new
is_singleton: true
name: new
params: (qname, param_def = nil)
visibility: public
ri/1.8/system/SOAP/RPC/SOAPMethodResponse/cdesc-SOAPMethodResponse.yaml000064400000000551150403624520021207 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::SOAPMethodResponse
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: retval=
name: SOAPMethodResponse
superclass: SOAPMethod
ri/1.8/system/SOAP/RPC/SOAPMethodResponse/retval%3d-i.yaml000064400000000305150403624530016523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPMethodResponse#retval=
is_singleton: false
name: retval=
params: (retval)
visibility: public
ri/1.8/system/SOAP/RPC/ParameterError/cdesc-ParameterError.yaml000064400000000326150403624530020030 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::RPC::ParameterError
includes: []

instance_methods: []

name: ParameterError
superclass: RPCError
ri/1.8/system/SOAP/RPC/Router/marshal-i.yaml000064400000000337150403624540014225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#marshal
is_singleton: false
name: marshal
params: (conn_data, env, default_encodingstyle = nil)
visibility: private
ri/1.8/system/SOAP/RPC/Router/route-i.yaml000064400000000270150403624540013730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#route
is_singleton: false
name: route
params: (conn_data)
visibility: public
ri/1.8/system/SOAP/RPC/Router/add_rpc_servant-i.yaml000064400000000400150403624540015723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_servant
block_params: 
comment: 
full_name: SOAP::RPC::Router#add_rpc_servant
is_singleton: false
name: add_rpc_servant
params: (obj, namespace)
visibility: public
ri/1.8/system/SOAP/RPC/Router/lookup_operation-i.yaml000064400000000326150403624550016166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#lookup_operation
is_singleton: false
name: lookup_operation
params: (soapaction, body)
visibility: private
ri/1.8/system/SOAP/RPC/Router/add_rpc_request_servant-i.yaml000064400000000446150403624550017506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: servant definition interface
full_name: SOAP::RPC::Router#add_rpc_request_servant
is_singleton: false
name: add_rpc_request_servant
params: (factory, namespace)
visibility: public
ri/1.8/system/SOAP/RPC/Router/Operation/receiver-i.yaml000064400000000301150403624550016332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#receiver
is_singleton: false
name: receiver
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/response_doc_enc-i.yaml000064400000000356150403624550020050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#response_doc_enc
is_singleton: false
name: response_doc_enc
params: (result, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/request_doc_enc-i.yaml000064400000000352150403624550017676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#request_doc_enc
is_singleton: false
name: request_doc_enc
params: (body, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/call-i.yaml000064400000000355150403624550015452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#call
is_singleton: false
name: call
params: (body, mapping_registry, literal_mapping_registry, opt)
visibility: public
ri/1.8/system/SOAP/RPC/Router/Operation/request_rpc_enc-i.yaml000064400000000355150403624550017720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#request_rpc_enc
is_singleton: false
name: request_rpc_enc
params: (request, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/response_rpc_enc-i.yaml000064400000000356150403624550020067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#response_rpc_enc
is_singleton: false
name: response_rpc_enc
params: (result, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/request_rpc_lit-i.yaml000064400000000355150403624550017743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#request_rpc_lit
is_singleton: false
name: request_rpc_lit
params: (request, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/request_document-i.yaml000064400000000406150403624550020122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#request_document
is_singleton: false
name: request_document
params: (body, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/response_doc-i.yaml000064400000000400150403624550017211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#response_doc
is_singleton: false
name: response_doc
params: (result, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/check_use-i.yaml000064400000000306150403624550016464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#check_use
is_singleton: false
name: check_use
params: (use)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/response_rpc_lit-i.yaml000064400000000356150403624550020112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#response_rpc_lit
is_singleton: false
name: response_rpc_lit
params: (result, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/response_rpc-i.yaml000064400000000400150403624550017230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#response_rpc
is_singleton: false
name: response_rpc
params: (result, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/new-c.yaml000064400000000326150403624560015321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation::new
is_singleton: true
name: new
params: (soapaction, name, param_def, opt)
visibility: public
ri/1.8/system/SOAP/RPC/Router/Operation/request_default_encodingstyle-i.yaml000064400000000352150403624570022661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#request_default_encodingstyle
is_singleton: false
name: request_default_encodingstyle
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Router/Operation/request_rpc-i.yaml000064400000000374150403624570017076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#request_rpc
is_singleton: false
name: request_rpc
params: (body, mapping_registry, literal_mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/check_style-i.yaml000064400000000314150403624570017031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#check_style
is_singleton: false
name: check_style
params: (style)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/response_doc_lit-i.yaml000064400000000356150403624600020067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#response_doc_lit
is_singleton: false
name: response_doc_lit
params: (result, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/Operation/cdesc-Operation.yaml000064400000003251150403624600017322 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: request_style
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: request_use
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: response_style
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: response_use
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::Router::Operation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: call
- !ruby/object:RI::MethodSummary 
  name: check_style
- !ruby/object:RI::MethodSummary 
  name: check_use
- !ruby/object:RI::MethodSummary 
  name: receiver
- !ruby/object:RI::MethodSummary 
  name: request_default_encodingstyle
- !ruby/object:RI::MethodSummary 
  name: request_doc_enc
- !ruby/object:RI::MethodSummary 
  name: request_doc_lit
- !ruby/object:RI::MethodSummary 
  name: request_document
- !ruby/object:RI::MethodSummary 
  name: request_rpc
- !ruby/object:RI::MethodSummary 
  name: request_rpc_enc
- !ruby/object:RI::MethodSummary 
  name: request_rpc_lit
- !ruby/object:RI::MethodSummary 
  name: response_default_encodingstyle
- !ruby/object:RI::MethodSummary 
  name: response_doc
- !ruby/object:RI::MethodSummary 
  name: response_doc_enc
- !ruby/object:RI::MethodSummary 
  name: response_doc_lit
- !ruby/object:RI::MethodSummary 
  name: response_rpc
- !ruby/object:RI::MethodSummary 
  name: response_rpc_enc
- !ruby/object:RI::MethodSummary 
  name: response_rpc_lit
name: Operation
superclass: Object
ri/1.8/system/SOAP/RPC/Router/Operation/response_default_encodingstyle-i.yaml000064400000000354150403624600023023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#response_default_encodingstyle
is_singleton: false
name: response_default_encodingstyle
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/Router/Operation/request_doc_lit-i.yaml000064400000000352150403624600017715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::Operation#request_doc_lit
is_singleton: false
name: request_doc_lit
params: (body, mapping_registry, opt)
visibility: private
ri/1.8/system/SOAP/RPC/Router/mimeize-i.yaml000064400000000302150403624600014222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#mimeize
is_singleton: false
name: mimeize
params: (conn_data, ext)
visibility: private
ri/1.8/system/SOAP/RPC/Router/add_rpc_request_operation-i.yaml000064400000000414150403624600020013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#add_rpc_request_operation
is_singleton: false
name: add_rpc_request_operation
params: (factory, qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Router/add_rpc_method-i.yaml000064400000000472150403624600015527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_operation"
full_name: SOAP::RPC::Router#add_rpc_method
is_singleton: false
name: add_rpc_method
params: (receiver, qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Router/RequestScopeOperation/receiver-i.yaml000064400000000315150403624600020676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::RequestScopeOperation#receiver
is_singleton: false
name: receiver
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/Router/RequestScopeOperation/new-c.yaml000064400000000364150403624600017661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::RequestScopeOperation::new
is_singleton: true
name: new
params: (soapaction, receiver_factory, name, param_def, opt)
visibility: public
ri/1.8/system/SOAP/RPC/Router/RequestScopeOperation/cdesc-RequestScopeOperation.yaml000064400000000510150403624600024223 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::Router::RequestScopeOperation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: receiver
name: RequestScopeOperation
superclass: Operation
ri/1.8/system/SOAP/RPC/Router/assign_operation-i.yaml000064400000000333150403624610016134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#assign_operation
is_singleton: false
name: assign_operation
params: (soapaction, qname, op)
visibility: private
ri/1.8/system/SOAP/RPC/Router/first_input_part_qname-i.yaml000064400000000333150403624610017345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#first_input_part_qname
is_singleton: false
name: first_input_part_qname
params: (param_def)
visibility: private
ri/1.8/system/SOAP/RPC/Router/new-c.yaml000064400000000260150403624610013352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::new
is_singleton: true
name: new
params: (actor)
visibility: public
ri/1.8/system/SOAP/RPC/Router/add_document_request_operation-i.yaml000064400000000417150403624610021051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#add_document_request_operation
is_singleton: false
name: add_document_request_operation
params: (factory, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Router/add_document_method-i.yaml000064400000000502150403624610016554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_document_operation"
full_name: SOAP::RPC::Router#add_document_method
is_singleton: false
name: add_document_method
params: (receiver, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Router/add_servant-i.yaml000064400000000412150403624620015061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_servant"
full_name: SOAP::RPC::Router#add_servant
is_singleton: false
name: add_servant
params: (obj, namespace)
visibility: public
ri/1.8/system/SOAP/RPC/Router/call_headers-i.yaml000064400000000313150403624620015175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#call_headers
is_singleton: false
name: call_headers
params: (headerhandler)
visibility: private
ri/1.8/system/SOAP/RPC/Router/create_mapping_opt-i.yaml000064400000000312150403624620016426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#create_mapping_opt
is_singleton: false
name: create_mapping_opt
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/Router/add_rpc_operation-i.yaml000064400000000643150403624620016251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_method
- !ruby/object:RI::AliasName 
  name: add_rpc_method
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: operation definition interface
full_name: SOAP::RPC::Router#add_rpc_operation
is_singleton: false
name: add_rpc_operation
params: (receiver, qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Router/create_styleuse_option-i.yaml000064400000000334150403624620017362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#create_styleuse_option
is_singleton: false
name: create_styleuse_option
params: (style, use)
visibility: private
ri/1.8/system/SOAP/RPC/Router/ensure_styleuse_option-i.yaml000064400000000341150403624630017417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#ensure_styleuse_option
is_singleton: false
name: ensure_styleuse_option
params: (opt, style, use)
visibility: private
ri/1.8/system/SOAP/RPC/Router/receive_headers-i.yaml000064400000000332150403624630015706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#receive_headers
is_singleton: false
name: receive_headers
params: (headerhandler, headers)
visibility: private
ri/1.8/system/SOAP/RPC/Router/fault-i.yaml000064400000000354150403624630013710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create fault response.
full_name: SOAP::RPC::Router#fault
is_singleton: false
name: fault
params: (e)
visibility: private
ri/1.8/system/SOAP/RPC/Router/ApplicationScopeOperation/receiver-i.yaml000064400000000321150403624630021511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::ApplicationScopeOperation#receiver
is_singleton: false
name: receiver
params: ()
visibility: private
ri/1.8/system/SOAP/RPC/Router/ApplicationScopeOperation/cdesc-ApplicationScopeOperation.yaml000064400000000520150403624640025656 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::Router::ApplicationScopeOperation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: receiver
name: ApplicationScopeOperation
superclass: Operation
ri/1.8/system/SOAP/RPC/Router/ApplicationScopeOperation/new-c.yaml000064400000000360150403624640020474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router::ApplicationScopeOperation::new
is_singleton: true
name: new
params: (soapaction, receiver, name, param_def, opt)
visibility: public
ri/1.8/system/SOAP/RPC/Router/unmarshal-i.yaml000064400000000301150403624640014560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#unmarshal
is_singleton: false
name: unmarshal
params: (conn_data)
visibility: private
ri/1.8/system/SOAP/RPC/Router/add_request_headerhandler-i.yaml000064400000000433150403624640017742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: header handler interface
full_name: SOAP::RPC::Router#add_request_headerhandler
is_singleton: false
name: add_request_headerhandler
params: (factory)
visibility: public
ri/1.8/system/SOAP/RPC/Router/add_headerhandler-i.yaml000064400000000316150403624650016173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::Router#add_headerhandler
is_singleton: false
name: add_headerhandler
params: (handler)
visibility: public
ri/1.8/system/SOAP/RPC/Router/cdesc-Router.yaml000064400000004227150403624650014713 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: actor
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: external_ces
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: generate_explicit_type
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: literal_mapping_registry
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: mapping_registry
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::RPC::Router
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_document_method
- !ruby/object:RI::MethodSummary 
  name: add_document_operation
- !ruby/object:RI::MethodSummary 
  name: add_document_request_operation
- !ruby/object:RI::MethodSummary 
  name: add_headerhandler
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: add_request_headerhandler
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method
- !ruby/object:RI::MethodSummary 
  name: add_rpc_operation
- !ruby/object:RI::MethodSummary 
  name: add_rpc_request_operation
- !ruby/object:RI::MethodSummary 
  name: add_rpc_request_servant
- !ruby/object:RI::MethodSummary 
  name: add_rpc_servant
- !ruby/object:RI::MethodSummary 
  name: add_servant
- !ruby/object:RI::MethodSummary 
  name: assign_operation
- !ruby/object:RI::MethodSummary 
  name: call_headers
- !ruby/object:RI::MethodSummary 
  name: create_fault_response
- !ruby/object:RI::MethodSummary 
  name: create_mapping_opt
- !ruby/object:RI::MethodSummary 
  name: create_styleuse_option
- !ruby/object:RI::MethodSummary 
  name: ensure_styleuse_option
- !ruby/object:RI::MethodSummary 
  name: fault
- !ruby/object:RI::MethodSummary 
  name: first_input_part_qname
- !ruby/object:RI::MethodSummary 
  name: lookup_operation
- !ruby/object:RI::MethodSummary 
  name: marshal
- !ruby/object:RI::MethodSummary 
  name: mimeize
- !ruby/object:RI::MethodSummary 
  name: receive_headers
- !ruby/object:RI::MethodSummary 
  name: route
- !ruby/object:RI::MethodSummary 
  name: unmarshal
name: Router
superclass: Object
ri/1.8/system/SOAP/RPC/Router/add_method-i.yaml000064400000000462150403624660014670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add_rpc_operation"
full_name: SOAP::RPC::Router#add_method
is_singleton: false
name: add_method
params: (receiver, qname, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/Router/create_fault_response-i.yaml000064400000000422150403624660017150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create fault response string.
full_name: SOAP::RPC::Router#create_fault_response
is_singleton: false
name: create_fault_response
params: (e)
visibility: public
ri/1.8/system/SOAP/RPC/Router/add_document_operation-i.yaml000064400000000467150403624670017314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_document_method
block_params: 
comment: 
full_name: SOAP::RPC::Router#add_document_operation
is_singleton: false
name: add_document_operation
params: (receiver, soapaction, name, param_def, opt = {})
visibility: public
ri/1.8/system/SOAP/RPC/SOAPVoid/new-c.yaml000064400000000255150403624670013470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::RPC::SOAPVoid::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/RPC/SOAPVoid/cdesc-SOAPVoid.yaml000064400000001133150403624670015116 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: To return(?) void explicitly.
- !ruby/struct:SM::Flow::VERB 
  body: " def foo(input_var)\n   ...\n   return SOAP::RPC::SOAPVoid.new\n end\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Name
  value: XSD::QName.new(Mapping::RubyCustomTypeNamespace, nil)
full_name: SOAP::RPC::SOAPVoid
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPVoid
superclass: XSD::XSDAnySimpleType
ri/1.8/system/SOAP/SOAPDateTime/cdesc-SOAPDateTime.yaml000064400000000412150403624700016051 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPDateTime
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPDateTime
superclass: XSD::XSDDateTime
ri/1.8/system/SOAP/SOAPHexBinary/cdesc-SOAPHexBinary.yaml000064400000000415150403624710016447 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPHexBinary
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPHexBinary
superclass: XSD::XSDHexBinary
ri/1.8/system/SOAP/SOAPBasetype/new-c.yaml000064400000000260150403624720013707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBasetype::new
is_singleton: true
name: new
params: (*arg)
visibility: public
ri/1.8/system/SOAP/SOAPBasetype/cdesc-SOAPBasetype.yaml000064400000000610150403624730016214 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: for SOAP base type
constants: []

full_name: SOAP::SOAPBasetype
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPType
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: []

name: SOAPBasetype
superclass: 
ri/1.8/system/SOAP/reset_all-i.yaml000064400000000252150403624740012642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#reset_all
is_singleton: false
name: reset_all
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/__attr_proxy-c.yaml000064400000000326150403624750015323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::__attr_proxy
is_singleton: true
name: __attr_proxy
params: (symbol, assignable = false)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/cdesc-WSDLDriver.yaml000064400000001620150403624750015374 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: __attr_proxy
- !ruby/object:RI::MethodSummary 
  name: __attr_proxy
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::WSDLDriver
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: httpproxy
- !ruby/object:RI::MethodSummary 
  name: httpproxy=
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: mandatorycharset
- !ruby/object:RI::MethodSummary 
  name: mandatorycharset=
- !ruby/object:RI::MethodSummary 
  name: reset_stream
- !ruby/object:RI::MethodSummary 
  name: wiredump_dev
- !ruby/object:RI::MethodSummary 
  name: wiredump_dev=
- !ruby/object:RI::MethodSummary 
  name: wiredump_file_base
- !ruby/object:RI::MethodSummary 
  name: wiredump_file_base=
name: WSDLDriver
superclass: Object
ri/1.8/system/SOAP/WSDLDriver/Servant__/headerhandler-i.yaml000064400000000311150403624760017321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#headerhandler
is_singleton: false
name: headerhandler
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/endpoint_url-i.yaml000064400000000307150403624760017242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#endpoint_url
is_singleton: false
name: endpoint_url
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/setup_options-i.yaml000064400000000312150403624760017447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#setup_options
is_singleton: false
name: setup_options
params: ()
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/create_request_body-i.yaml000064400000000346150403624760020573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#create_request_body
is_singleton: false
name: create_request_body
params: (op_info, *values)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/bodyitem_from_obj-i.yaml000064400000000333150403624770020231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#bodyitem_from_obj
is_singleton: false
name: bodyitem_from_obj
params: (obj, name)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/streamhandler-i.yaml000064400000000311150403624770017365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#streamhandler
is_singleton: false
name: streamhandler
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/create_request_header-i.yaml000064400000000332150403624770021062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#create_request_header
is_singleton: false
name: create_request_header
params: ()
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/add_document_method_interface-i.yaml000064400000000373150403624770022552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#add_document_method_interface
is_singleton: false
name: add_document_method_interface
params: (name, parts_names)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/create_options-i.yaml000064400000000326150403624770017560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#create_options
is_singleton: false
name: create_options
params: (hash = nil)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/endpoint_url%3d-i.yaml000064400000000325150403625000017522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#endpoint_url=
is_singleton: false
name: endpoint_url=
params: (endpoint_url)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/rpc_call-i.yaml000064400000000314150403625000016301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#rpc_call
is_singleton: false
name: rpc_call
params: (name, *values)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/document_send-i.yaml000064400000000573150403625000017360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "req_header: [[element, mustunderstand, encodingstyle(QName/String)], ...] req_body: SOAPBasetype/SOAPCompoundtype"
full_name: SOAP::WSDLDriver::Servant__#document_send
is_singleton: false
name: document_send
params: (name, header_obj, body_obj)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/create_method_obj-i.yaml000064400000000337150403625000020164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#create_method_obj
is_singleton: false
name: create_method_obj
params: (names, params)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/add_method_interface-i.yaml000064400000000337150403625010020640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#add_method_interface
is_singleton: false
name: add_method_interface
params: (op_info)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/cdesc-Servant__.yaml000064400000004416150403625010017303 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: allow_unqualified_element
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: default_encodingstyle
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: generate_explicit_type
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: mapping_registry
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: options
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: wsdl_mapping_registry
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::WSDLDriver::Servant__
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_document_method_interface
- !ruby/object:RI::MethodSummary 
  name: add_method_interface
- !ruby/object:RI::MethodSummary 
  name: add_rpc_method_interface
- !ruby/object:RI::MethodSummary 
  name: body_from_obj
- !ruby/object:RI::MethodSummary 
  name: bodyitem_from_obj
- !ruby/object:RI::MethodSummary 
  name: create_method_obj
- !ruby/object:RI::MethodSummary 
  name: create_method_struct
- !ruby/object:RI::MethodSummary 
  name: create_options
- !ruby/object:RI::MethodSummary 
  name: create_request_body
- !ruby/object:RI::MethodSummary 
  name: create_request_header
- !ruby/object:RI::MethodSummary 
  name: document_send
- !ruby/object:RI::MethodSummary 
  name: endpoint_url
- !ruby/object:RI::MethodSummary 
  name: endpoint_url=
- !ruby/object:RI::MethodSummary 
  name: header_from_obj
- !ruby/object:RI::MethodSummary 
  name: headerhandler
- !ruby/object:RI::MethodSummary 
  name: headeritem_from_obj
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: receive_headers
- !ruby/object:RI::MethodSummary 
  name: reset_stream
- !ruby/object:RI::MethodSummary 
  name: rpc_call
- !ruby/object:RI::MethodSummary 
  name: set_wiredump_file_base
- !ruby/object:RI::MethodSummary 
  name: setup_options
- !ruby/object:RI::MethodSummary 
  name: streamhandler
- !ruby/object:RI::MethodSummary 
  name: test_loopback_response
name: Servant__
superclass: Object
ri/1.8/system/SOAP/WSDLDriver/Servant__/inspect-i.yaml000064400000000275150403625010016176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/body_from_obj-i.yaml000064400000000326150403625020017341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#body_from_obj
is_singleton: false
name: body_from_obj
params: (obj, op_info)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/new-c.yaml000064400000000315150403625020015310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__::new
is_singleton: true
name: new
params: (host, wsdl, port, logdev)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/create_method_struct-i.yaml000064400000000350150403625020020733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#create_method_struct
is_singleton: false
name: create_method_struct
params: (op_info, *params)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/add_rpc_method_interface-i.yaml000064400000000361150403625030021503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#add_rpc_method_interface
is_singleton: false
name: add_rpc_method_interface
params: (name, parts_names)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/headeritem_from_obj-i.yaml000064400000000337150403625030020516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#headeritem_from_obj
is_singleton: false
name: headeritem_from_obj
params: (obj, name)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/test_loopback_response-i.yaml000064400000000333150403625040021276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#test_loopback_response
is_singleton: false
name: test_loopback_response
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/Servant__/receive_headers-i.yaml000064400000000325150403625040017645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#receive_headers
is_singleton: false
name: receive_headers
params: (headers)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/header_from_obj-i.yaml000064400000000332150403625040017633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#header_from_obj
is_singleton: false
name: header_from_obj
params: (obj, op_info)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/set_wiredump_file_base-i.yaml000064400000000340150403625040021225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#set_wiredump_file_base
is_singleton: false
name: set_wiredump_file_base
params: (name)
visibility: private
ri/1.8/system/SOAP/WSDLDriver/Servant__/reset_stream-i.yaml000064400000000307150403625040017225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::Servant__#reset_stream
is_singleton: false
name: reset_stream
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/httpproxy-i.yaml000064400000000266150403625040014675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#httpproxy
is_singleton: false
name: httpproxy
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/inspect-i.yaml000064400000000262150403625040014255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/new-c.yaml000064400000000274150403625040013376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver::new
is_singleton: true
name: new
params: (wsdl, port, logdev)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/mandatorycharset-i.yaml000064400000000304150403625040016155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#mandatorycharset
is_singleton: false
name: mandatorycharset
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/wiredump_dev-i.yaml000064400000000274150403625050015306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#wiredump_dev
is_singleton: false
name: wiredump_dev
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/httpproxy%3d-i.yaml000064400000000301150403625050015160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#httpproxy=
is_singleton: false
name: httpproxy=
params: (httpproxy)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/wiredump_file_base-i.yaml000064400000000310150403625050016430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#wiredump_file_base
is_singleton: false
name: wiredump_file_base
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriver/wiredump_dev%3d-i.yaml000064400000000312150403625050015573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#wiredump_dev=
is_singleton: false
name: wiredump_dev=
params: (wiredump_dev)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/mandatorycharset%3d-i.yaml000064400000000326150403625050016456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#mandatorycharset=
is_singleton: false
name: mandatorycharset=
params: (mandatorycharset)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/wiredump_file_base%3d-i.yaml000064400000000334150403625060016733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#wiredump_file_base=
is_singleton: false
name: wiredump_file_base=
params: (wiredump_file_base)
visibility: public
ri/1.8/system/SOAP/WSDLDriver/reset_stream-i.yaml000064400000000274150403625060015312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriver#reset_stream
is_singleton: false
name: reset_stream
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPNonNegativeInteger/cdesc-SOAPNonNegativeInteger.yaml000064400000000450150403625070022152 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPNonNegativeInteger
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPNonNegativeInteger
superclass: XSD::XSDNonNegativeInteger
ri/1.8/system/SOAP/ArrayStoreError/cdesc-ArrayStoreError.yaml000064400000000320150403625070017724 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::ArrayStoreError
includes: []

instance_methods: []

name: ArrayStoreError
superclass: Error
ri/1.8/system/SOAP/ResponseFormatError/cdesc-ResponseFormatError.yaml000064400000000330150403625100021447 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::ResponseFormatError
includes: []

instance_methods: []

name: ResponseFormatError
superclass: Error
ri/1.8/system/SOAP/SOAPGYear/cdesc-SOAPGYear.yaml000064400000000401150403625110014671 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPGYear
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPGYear
superclass: XSD::XSDGYear
ri/1.8/system/SOAP/SOAPTime/cdesc-SOAPTime.yaml000064400000000376150403625120014463 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPTime
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPTime
superclass: XSD::XSDTime
ri/1.8/system/SOAP/SOAPReference/create_refid-c.yaml000064400000000302150403625130015645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPReference::create_refid
is_singleton: true
name: create_refid
params: (obj)
visibility: public
ri/1.8/system/SOAP/SOAPReference/refidstr-i.yaml000064400000000267150403625140015074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPReference#refidstr
is_singleton: false
name: refidstr
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPReference/cdesc-SOAPReference.yaml000064400000001347150403625150016465 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: refid
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_refid
- !ruby/object:RI::MethodSummary 
  name: decode
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convenience datatypes.
constants: []

full_name: SOAP::SOAPReference
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __getobj__
- !ruby/object:RI::MethodSummary 
  name: __setobj__
- !ruby/object:RI::MethodSummary 
  name: method_missing
- !ruby/object:RI::MethodSummary 
  name: refidstr
name: SOAPReference
superclass: XSD::NSDBase
ri/1.8/system/SOAP/SOAPReference/method_missing-i.yaml000064400000001050150403625150016253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Why don't I use delegate.rb? -&gt; delegate requires target object type at initialize time. Why don't I use forwardable.rb? -&gt; forwardable requires a list of forwarding methods.
- !ruby/struct:SM::Flow::P 
  body: "ToDo: Maybe I should use forwardable.rb and give it a methods list like delegate.rb..."
full_name: SOAP::SOAPReference#method_missing
is_singleton: false
name: method_missing
params: (msg_id, *params)
visibility: public
ri/1.8/system/SOAP/SOAPReference/__getobj__-i.yaml000064400000000273150403625160015317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPReference#__getobj__
is_singleton: false
name: __getobj__
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPReference/new-c.yaml000064400000000403150403625160014027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Override the definition in SOAPBasetype.
full_name: SOAP::SOAPReference::new
is_singleton: true
name: new
params: (obj = nil)
visibility: public
ri/1.8/system/SOAP/SOAPReference/decode-c.yaml000064400000000304150403625170014462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPReference::decode
is_singleton: true
name: decode
params: (elename, refidstr)
visibility: public
ri/1.8/system/SOAP/SOAPReference/__setobj__-i.yaml000064400000000276150403625170015337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPReference#__setobj__
is_singleton: false
name: __setobj__
params: (obj)
visibility: public
ri/1.8/system/SOAP/RPCRoutingError/cdesc-RPCRoutingError.yaml000064400000000320150403625200017521 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::RPCRoutingError
includes: []

instance_methods: []

name: RPCRoutingError
superclass: Error
ri/1.8/system/SOAP/Error/cdesc-Error.yaml000064400000000304150403625220013673 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/SOAP/HTTPStreamHandler/set_options-i.yaml000064400000000302150403625230016456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#set_options
is_singleton: false
name: set_options
params: ()
visibility: private
ri/1.8/system/SOAP/HTTPStreamHandler/accept_encoding_gzip%3d-i.yaml000064400000000332150403625230020545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#accept_encoding_gzip=
is_singleton: false
name: accept_encoding_gzip=
params: (allow)
visibility: public
ri/1.8/system/SOAP/HTTPStreamHandler/send_post-i.yaml000064400000000336150403625240016116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#send_post
is_singleton: false
name: send_post
params: (endpoint_url, conn_data, charset)
visibility: private
ri/1.8/system/SOAP/HTTPStreamHandler/inspect-i.yaml000064400000000271150403625240015563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/HTTPStreamHandler/new-c.yaml000064400000000270150403625250014701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler::new
is_singleton: true
name: new
params: (options)
visibility: public
ri/1.8/system/SOAP/HTTPStreamHandler/send_accept_encoding_gzip%3f-i.yaml000064400000000340150403625250021561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#send_accept_encoding_gzip?
is_singleton: false
name: send_accept_encoding_gzip?
params: ()
visibility: private
ri/1.8/system/SOAP/HTTPStreamHandler/send-i.yaml000064400000000360150403625250015047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#send
is_singleton: false
name: send
params: (endpoint_url, conn_data, soapaction = nil, charset = @charset)
visibility: public
ri/1.8/system/SOAP/HTTPStreamHandler/cdesc-HTTPStreamHandler.yaml000064400000002601150403625250020200 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: client
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: wiredump_file_base
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Client
  value: HTTPAccess2::Client
- !ruby/object:RI::Constant 
  comment: 
  name: RETRYABLE
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: Client
  value: SOAP::NetHttpClient
- !ruby/object:RI::Constant 
  comment: 
  name: RETRYABLE
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: MAX_RETRY_COUNT
  value: "10"
full_name: SOAP::HTTPStreamHandler
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept_encoding_gzip=
- !ruby/object:RI::MethodSummary 
  name: decode_gzip
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: reset
- !ruby/object:RI::MethodSummary 
  name: send
- !ruby/object:RI::MethodSummary 
  name: send_accept_encoding_gzip?
- !ruby/object:RI::MethodSummary 
  name: send_post
- !ruby/object:RI::MethodSummary 
  name: set_cookie_store_file
- !ruby/object:RI::MethodSummary 
  name: set_options
- !ruby/object:RI::MethodSummary 
  name: test_loopback_response
name: HTTPStreamHandler
superclass: StreamHandler
ri/1.8/system/SOAP/HTTPStreamHandler/test_loopback_response-i.yaml000064400000000327150403625250020670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#test_loopback_response
is_singleton: false
name: test_loopback_response
params: ()
visibility: public
ri/1.8/system/SOAP/HTTPStreamHandler/set_cookie_store_file-i.yaml000064400000000333150403625250020455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#set_cookie_store_file
is_singleton: false
name: set_cookie_store_file
params: (value)
visibility: private
ri/1.8/system/SOAP/HTTPStreamHandler/reset-i.yaml000064400000000307150403625250015241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#reset
is_singleton: false
name: reset
params: (endpoint_url = nil)
visibility: public
ri/1.8/system/SOAP/HTTPStreamHandler/decode_gzip-i.yaml000064400000000312150403625250016367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPStreamHandler#decode_gzip
is_singleton: false
name: decode_gzip
params: (instring)
visibility: private
ri/1.8/system/SOAP/SOAPGMonthDay/cdesc-SOAPGMonthDay.yaml000064400000000415150403625260016352 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPGMonthDay
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPGMonthDay
superclass: XSD::XSDGMonthDay
ri/1.8/system/SOAP/SOAPRawString/cdesc-SOAPRawString.yaml000064400000000774150403625260016536 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: SOAPRawString is for sending raw string. In contrast to SOAPString, SOAP4R does not do XML encoding and does not convert its CES. The string it holds is embedded to XML instance directly as a 'xsd:string'.
constants: []

full_name: SOAP::SOAPRawString
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPRawString
superclass: XSD::XSDString
ri/1.8/system/SOAP/Property/%5b%5d-i.yaml000064400000000365150403625260013370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "name: a Symbol, String or an Array"
full_name: SOAP::Property#[]
is_singleton: false
name: "[]"
params: (name)
visibility: public
ri/1.8/system/SOAP/Property/empty%3f-i.yaml000064400000000256150403625260014152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/SOAP/Property/each-i.yaml000064400000000311150403625260013406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (key, value)
comment: 
full_name: SOAP::Property#each
is_singleton: false
name: each
params: () {|key, value| ...}
visibility: public
ri/1.8/system/SOAP/Property/key_max-i.yaml000064400000000261150403625270014150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#key_max
is_singleton: false
name: key_max
params: ()
visibility: private
ri/1.8/system/SOAP/Property/local_assign-i.yaml000064400000000307150403625270015152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#local_assign
is_singleton: false
name: local_assign
params: (key, value)
visibility: protected
ri/1.8/system/SOAP/Property/name_to_a-i.yaml000064400000000271150403625300014430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#name_to_a
is_singleton: false
name: name_to_a
params: (name)
visibility: private
ri/1.8/system/SOAP/Property/local_hook-i.yaml000064400000000304150403625300014615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#local_hook
is_singleton: false
name: local_hook
params: (key, direct)
visibility: protected
ri/1.8/system/SOAP/Property/loadproperty-i.yaml000064400000000375150403625300015237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: find property from $:.
full_name: SOAP::Property#loadproperty
is_singleton: false
name: loadproperty
params: (propname)
visibility: public
ri/1.8/system/SOAP/Property/load-i.yaml000064400000000260150403625300013423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#load
is_singleton: false
name: load
params: (stream)
visibility: public
ri/1.8/system/SOAP/Property/loadpropertyfile-i.yaml000064400000000307150403625300016072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#loadpropertyfile
is_singleton: false
name: loadpropertyfile
params: (file)
visibility: private
ri/1.8/system/SOAP/Property/generate_new_key-i.yaml000064400000000303150403625300016015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#generate_new_key
is_singleton: false
name: generate_new_key
params: ()
visibility: private
ri/1.8/system/SOAP/Property/local_referent-i.yaml000064400000000304150403625300015467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#local_referent
is_singleton: false
name: local_referent
params: (key)
visibility: protected
ri/1.8/system/SOAP/Property/to_key-i.yaml000064400000000263150403625300014001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#to_key
is_singleton: false
name: to_key
params: (name)
visibility: private
ri/1.8/system/SOAP/Property/each_key-i.yaml000064400000000310150403625300014250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (value)
comment: 
full_name: SOAP::Property#each_key
is_singleton: false
name: each_key
params: () {|value| ...}
visibility: private
ri/1.8/system/SOAP/Property/unlock-i.yaml000064400000000275150403625300014005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#unlock
is_singleton: false
name: unlock
params: (cascade = false)
visibility: public
ri/1.8/system/SOAP/Property/locked%3f-i.yaml000064400000000260150403625310014244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#locked?
is_singleton: false
name: locked?
params: ()
visibility: public
ri/1.8/system/SOAP/Property/local_assign_hook-i.yaml000064400000000332150403625310016163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#local_assign_hook
is_singleton: false
name: local_assign_hook
params: (key, cascade, &hook)
visibility: protected
ri/1.8/system/SOAP/Property/assign_hook-i.yaml000064400000000314150403625310015011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#assign_hook
is_singleton: false
name: assign_hook
params: (ary, cascade, &hook)
visibility: private
ri/1.8/system/SOAP/Property/Util/const_from_name-i.yaml000064400000000314150403625310016573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property::Util#const_from_name
is_singleton: false
name: const_from_name
params: (fqname)
visibility: public
ri/1.8/system/SOAP/Property/Util/cdesc-Util.yaml000064400000000462150403625310015174 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Property::Util
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: const_from_name
- !ruby/object:RI::MethodSummary 
  name: require_from_name
name: Util
superclass: 
ri/1.8/system/SOAP/Property/Util/require_from_name-i.yaml000064400000000320150403625310017116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property::Util#require_from_name
is_singleton: false
name: require_from_name
params: (fqname)
visibility: public
ri/1.8/system/SOAP/Property/new-c.yaml000064400000000250150403625310013267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/Property/assign-i.yaml000064400000000271150403625310013773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#assign
is_singleton: false
name: assign
params: (ary, value)
visibility: private
ri/1.8/system/SOAP/Property/deref_key-i.yaml000064400000000272150403625310014445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#deref_key
is_singleton: false
name: deref_key
params: (key)
visibility: protected
ri/1.8/system/SOAP/Property/load-c.yaml000064400000000260150403625310013416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property::load
is_singleton: true
name: load
params: (stream)
visibility: public
ri/1.8/system/SOAP/Property/assign_self_hook-i.yaml000064400000000321150403625310016020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#assign_self_hook
is_singleton: false
name: assign_self_hook
params: (cascade, &hook)
visibility: private
ri/1.8/system/SOAP/Property/%3c%3c-i.yaml000064400000000401150403625310013347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "value: an Object key is generated by property"
full_name: SOAP::Property#<<
is_singleton: false
name: "<<"
params: (value)
visibility: public
ri/1.8/system/SOAP/Property/keys-i.yaml000064400000000252150403625310013461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#keys
is_singleton: false
name: keys
params: ()
visibility: public
ri/1.8/system/SOAP/Property/cdesc-Property.yaml000064400000006442150403625310015172 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: loadproperty
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Property stream format:"
- !ruby/struct:SM::Flow::VERB 
  body: "  line separator is \\r?\\n.  1 line per a property.\n  line which begins with '#' is a comment line.  empty line is ignored, too.\n  key/value separator is ':' or '='.\n  '\\' as escape character.  but line separator cannot be escaped.\n  \\s at the head/tail of key/value are trimmed.\n\n  '[' + key + ']' indicates property section.  for example,\n\n    [aaa.bbb]\n    ccc = ddd\n    eee.fff = ggg\n    []\n    aaa.hhh = iii\n\n  is the same as;\n\n    aaa.bbb.ccc = ddd\n    aaa.bbb.eee.fff = ggg\n    aaa.hhh = iii\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: FrozenError
  value: "(RUBY_VERSION >= \"1.9.0\") ? RuntimeError : TypeError"
- !ruby/object:RI::Constant 
  comment: 
  name: KEY_REGSRC
  value: "'([^=:\\\\\\\\]*(?:\\\\\\\\.[^=:\\\\\\\\]*)*)'"
- !ruby/object:RI::Constant 
  comment: 
  name: DEF_REGSRC
  value: "'\\\\s*' + KEY_REGSRC + '\\\\s*[=:]\\\\s*(.*)'"
- !ruby/object:RI::Constant 
  comment: 
  name: COMMENT_REGEXP
  value: Regexp.new('^(?:#.*|)$')
- !ruby/object:RI::Constant 
  comment: 
  name: CATDEF_REGEXP
  value: Regexp.new("^\\[\\s*#{KEY_REGSRC}\\s*\\]$")
- !ruby/object:RI::Constant 
  comment: 
  name: LINE_REGEXP
  value: Regexp.new("^#{DEF_REGSRC}$")
- !ruby/object:RI::Constant 
  comment: 
  name: NO_HOOK
  value: "[].freeze"
full_name: SOAP::Property
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: add_hook
- !ruby/object:RI::MethodSummary 
  name: assign
- !ruby/object:RI::MethodSummary 
  name: assign_hook
- !ruby/object:RI::MethodSummary 
  name: assign_self_hook
- !ruby/object:RI::MethodSummary 
  name: check_lock
- !ruby/object:RI::MethodSummary 
  name: deref_key
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_key
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: generate_new_key
- !ruby/object:RI::MethodSummary 
  name: key_max
- !ruby/object:RI::MethodSummary 
  name: keys
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: loadproperty
- !ruby/object:RI::MethodSummary 
  name: loadpropertyfile
- !ruby/object:RI::MethodSummary 
  name: loadstr
- !ruby/object:RI::MethodSummary 
  name: local_assign
- !ruby/object:RI::MethodSummary 
  name: local_assign_hook
- !ruby/object:RI::MethodSummary 
  name: local_hook
- !ruby/object:RI::MethodSummary 
  name: local_referent
- !ruby/object:RI::MethodSummary 
  name: lock
- !ruby/object:RI::MethodSummary 
  name: locked?
- !ruby/object:RI::MethodSummary 
  name: name_to_a
- !ruby/object:RI::MethodSummary 
  name: propkey?
- !ruby/object:RI::MethodSummary 
  name: referent
- !ruby/object:RI::MethodSummary 
  name: to_key
- !ruby/object:RI::MethodSummary 
  name: unlock
- !ruby/object:RI::MethodSummary 
  name: values
name: Property
superclass: Object
ri/1.8/system/SOAP/Property/values-i.yaml000064400000000256150403625310014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#values
is_singleton: false
name: values
params: ()
visibility: public
ri/1.8/system/SOAP/Property/check_lock-i.yaml000064400000000272150403625320014576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#check_lock
is_singleton: false
name: check_lock
params: (key)
visibility: private
ri/1.8/system/SOAP/Property/propkey%3f-i.yaml000064400000000270150403625320014476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#propkey?
is_singleton: false
name: propkey?
params: (value)
visibility: private
ri/1.8/system/SOAP/Property/referent-i.yaml000064400000000266150403625320014326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#referent
is_singleton: false
name: referent
params: (ary)
visibility: private
ri/1.8/system/SOAP/Property/lock-i.yaml000064400000000271150403625320013440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#lock
is_singleton: false
name: lock
params: (cascade = false)
visibility: public
ri/1.8/system/SOAP/Property/loadstr-i.yaml000064400000000264150403625320014162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property#loadstr
is_singleton: false
name: loadstr
params: (str)
visibility: private
ri/1.8/system/SOAP/Property/%5b%5d%3d-i.yaml000064400000000417150403625320013657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "name: a Symbol, String or an Array value: an Object"
full_name: SOAP::Property#[]=
is_singleton: false
name: "[]="
params: (name, value)
visibility: public
ri/1.8/system/SOAP/Property/add_hook-i.yaml000064400000000651150403625320014262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "name: a Symbol, String or an Array; nil means hook to the root cascade: true/false; for cascading hook of sub key hook: block which will be called with 2 args, name and value"
full_name: SOAP::Property#add_hook
is_singleton: false
name: add_hook
params: (name = nil, cascade = false, &hook)
visibility: public
ri/1.8/system/SOAP/Property/loadproperty-c.yaml000064400000000302150403625320015221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Property::loadproperty
is_singleton: true
name: loadproperty
params: (propname)
visibility: public
ri/1.8/system/SOAP/SOAPElement/%5b%5d-i.yaml000064400000000256150403625320013614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#[]
is_singleton: false
name: "[]"
params: (idx)
visibility: public
ri/1.8/system/SOAP/SOAPElement/safe_accessor_name-i.yaml000064400000000316150403625320016540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#safe_accessor_name
is_singleton: false
name: safe_accessor_name
params: (name)
visibility: private
ri/1.8/system/SOAP/SOAPElement/each-i.yaml000064400000000346150403625320013643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@array[idx], @data[idx])
comment: 
full_name: SOAP::SOAPElement#each
is_singleton: false
name: each
params: () {|@array[idx], @data[idx]| ...}
visibility: public
ri/1.8/system/SOAP/SOAPElement/from_obj-c.yaml000064400000000311150403625320014522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement::from_obj
is_singleton: true
name: from_obj
params: (obj, namespace = nil)
visibility: public
ri/1.8/system/SOAP/SOAPElement/to_obj-i.yaml000064400000000261150403625320014213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#to_obj
is_singleton: false
name: to_obj
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPElement/add-i.yaml000064400000000350150403625320013466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element interfaces.
full_name: SOAP::SOAPElement#add
is_singleton: false
name: add
params: (value)
visibility: public
ri/1.8/system/SOAP/SOAPElement/cdesc-SOAPElement.yaml000064400000003521150403625320015646 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: elename
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: extraattr
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: id
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: position
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: precedents
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: qualified
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: root
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Text interface.
  name: text
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: decode
- !ruby/object:RI::MethodSummary 
  name: from_obj
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: to_elename
comment: 
- !ruby/struct:SM::Flow::P 
  body: SOAPElement is not typed so it is not derived from NSDBase.
constants: []

full_name: SOAP::SOAPElement
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: add_accessor
- !ruby/object:RI::MethodSummary 
  name: add_accessor
- !ruby/object:RI::MethodSummary 
  name: add_member
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: key?
- !ruby/object:RI::MethodSummary 
  name: members
- !ruby/object:RI::MethodSummary 
  name: safe_accessor_name
- !ruby/object:RI::MethodSummary 
  name: to_obj
name: SOAPElement
superclass: Object
ri/1.8/system/SOAP/SOAPElement/inspect-i.yaml000064400000000263150403625320014406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPElement/new-c.yaml000064400000000276150403625320013530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement::new
is_singleton: true
name: new
params: (elename, text = nil)
visibility: public
ri/1.8/system/SOAP/SOAPElement/members-i.yaml000064400000000263150403625330014374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#members
is_singleton: false
name: members
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPElement/add_accessor-i.yaml000064400000000302150403625330015346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#add_accessor
is_singleton: false
name: add_accessor
params: (name)
visibility: private
ri/1.8/system/SOAP/SOAPElement/to_elename-c.yaml000064400000000315150403625330015042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement::to_elename
is_singleton: true
name: to_elename
params: (obj, namespace = nil)
visibility: public
ri/1.8/system/SOAP/SOAPElement/decode-c.yaml000064400000000270150403625340014156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement::decode
is_singleton: true
name: decode
params: (elename)
visibility: public
ri/1.8/system/SOAP/SOAPElement/add_member-i.yaml000064400000000305150403625340015017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#add_member
is_singleton: false
name: add_member
params: (name, value)
visibility: private
ri/1.8/system/SOAP/SOAPElement/%5b%5d%3d-i.yaml000064400000000266150403625350014114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#[]=
is_singleton: false
name: "[]="
params: (idx, data)
visibility: public
ri/1.8/system/SOAP/SOAPElement/key%3f-i.yaml000064400000000261150403625350014030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPElement#key?
is_singleton: false
name: key?
params: (name)
visibility: public
ri/1.8/system/SOAP/save_cookie_store-i.yaml000064400000000302150403625350014365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#save_cookie_store
is_singleton: false
name: save_cookie_store
params: (filename)
visibility: public
ri/1.8/system/SOAP/SOAPNonPositiveInteger/cdesc-SOAPNonPositiveInteger.yaml000064400000000450150403625370022255 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPNonPositiveInteger
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPNonPositiveInteger
superclass: XSD::XSDNonPositiveInteger
ri/1.8/system/SOAP/Mapping/schema_attribute_definition-c.yaml000064400000000334150403625400020003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::schema_attribute_definition
is_singleton: true
name: schema_attribute_definition
params: (klass)
visibility: public
ri/1.8/system/SOAP/Mapping/SOAPException/to_e-i.yaml000064400000000270150403625420015626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::SOAPException#to_e
is_singleton: false
name: to_e
params: ()
visibility: public
ri/1.8/system/SOAP/Mapping/SOAPException/new-c.yaml000064400000000267150403625420015471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::SOAPException::new
is_singleton: true
name: new
params: (e)
visibility: public
ri/1.8/system/SOAP/Mapping/SOAPException/cdesc-SOAPException.yaml000064400000001056150403625430020156 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: cause
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: excn_type_name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Inner class to pass an exception.
constants: []

full_name: SOAP::Mapping::SOAPException
includes: 
- !ruby/object:RI::IncludedModule 
  name: Marshallable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_e
name: SOAPException
superclass: Object
ri/1.8/system/SOAP/Mapping/MappingError/cdesc-MappingError.yaml000064400000000323150403625430020122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Mapping::MappingError
includes: []

instance_methods: []

name: MappingError
superclass: Error
ri/1.8/system/SOAP/Mapping/_obj2soap-c.yaml000064400000000314150403625430014127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::_obj2soap
is_singleton: true
name: _obj2soap
params: (obj, registry, type = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/class_schema_variable-c.yaml000064400000000326150403625430016546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::class_schema_variable
is_singleton: true
name: class_schema_variable
params: (sym, klass)
visibility: private
ri/1.8/system/SOAP/Mapping/TypedArrayFactory_/cdesc-TypedArrayFactory_.yaml000064400000000557150403625440022450 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::TypedArrayFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: TypedArrayFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/TypedArrayFactory_/obj2soap-i.yaml000064400000000337150403625440017557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::TypedArrayFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/TypedArrayFactory_/new-c.yaml000064400000000331150403625440016615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::TypedArrayFactory_::new
is_singleton: true
name: new
params: (allow_original_mapping = false)
visibility: public
ri/1.8/system/SOAP/Mapping/TypedArrayFactory_/soap2obj-i.yaml000064400000000337150403625450017560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::TypedArrayFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/get_attribute-c.yaml000064400000000311150403625450015112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::get_attribute
is_singleton: true
name: get_attribute
params: (obj, attr_name)
visibility: public
ri/1.8/system/SOAP/Mapping/TraverseSupport/mark_marshalled_obj-i.yaml000064400000000345150403625450021435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::TraverseSupport#mark_marshalled_obj
is_singleton: false
name: mark_marshalled_obj
params: (obj, soap_obj)
visibility: public
ri/1.8/system/SOAP/Mapping/TraverseSupport/mark_unmarshalled_obj-i.yaml000064400000000345150403625450022000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::TraverseSupport#mark_unmarshalled_obj
is_singleton: false
name: mark_unmarshalled_obj
params: (node, obj)
visibility: public
ri/1.8/system/SOAP/Mapping/TraverseSupport/cdesc-TraverseSupport.yaml000064400000000767150403625460021507 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: TraverseSupport breaks following thread variables.
- !ruby/struct:SM::Flow::VERB 
  body: "  Thread.current[:SOAPMarshalDataKey]\n"
constants: []

full_name: SOAP::Mapping::TraverseSupport
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: mark_marshalled_obj
- !ruby/object:RI::MethodSummary 
  name: mark_unmarshalled_obj
name: TraverseSupport
superclass: 
ri/1.8/system/SOAP/Mapping/MappedException/cdesc-MappedException.yaml000064400000000324150403625460021266 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Mapping::MappedException
includes: []

instance_methods: []

name: MappedException
superclass: 
ri/1.8/system/SOAP/Mapping/class2qname-c.yaml000064400000000274150403625460014472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::class2qname
is_singleton: true
name: class2qname
params: (klass)
visibility: public
ri/1.8/system/SOAP/Mapping/ArrayFactory_/obj2soap-i.yaml000064400000000734150403625470016555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "[1], [2]"
    body: is converted to Array of Array, not 2-D Array.
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: To create M-D Array, you must call Mapping.ary2md.
full_name: SOAP::Mapping::ArrayFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/ArrayFactory_/new-c.yaml000064400000000324150403625470015614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::ArrayFactory_::new
is_singleton: true
name: new
params: (allow_original_mapping = false)
visibility: public
ri/1.8/system/SOAP/Mapping/ArrayFactory_/soap2obj-i.yaml000064400000000332150403625470016547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::ArrayFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/ArrayFactory_/cdesc-ArrayFactory_.yaml000064400000000545150403625500020426 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::ArrayFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: ArrayFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/_soap2obj-c.yaml000064400000000316150403625500014127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::_soap2obj
is_singleton: true
name: _soap2obj
params: (node, registry, klass = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/class_from_name-c.yaml000064400000000324150403625510015401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::class_from_name
is_singleton: true
name: class_from_name
params: (name, lenient = false)
visibility: public
ri/1.8/system/SOAP/Mapping/RubytypeFactory/unknownstruct2obj-i.yaml000064400000000344150403625520021156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#unknownstruct2obj
is_singleton: false
name: unknownstruct2obj
params: (node, info, map)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/rubytype2obj-i.yaml000064400000000344150403625520020075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#rubytype2obj
is_singleton: false
name: rubytype2obj
params: (node, info, map, rubytype)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/array2obj-i.yaml000064400000000475150403625520017335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Only creates empty array. Do String#replace it with real string.
full_name: SOAP::Mapping::RubytypeFactory#array2obj
is_singleton: false
name: array2obj
params: (node, map, rubytype)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/singleton_methods_true-i.yaml000064400000000342150403625530022220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#singleton_methods_true
is_singleton: false
name: singleton_methods_true
params: (obj)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/unknowntype2obj-i.yaml000064400000000340150403625530020610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#unknowntype2obj
is_singleton: false
name: unknowntype2obj
params: (node, info, map)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/obj2soap-i.yaml000064400000000334150403625530017154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/RubytypeFactory/new-c.yaml000064400000000303150403625540016215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory::new
is_singleton: true
name: new
params: (config = {})
visibility: public
ri/1.8/system/SOAP/Mapping/RubytypeFactory/soap2obj-i.yaml000064400000000334150403625540017155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/RubytypeFactory/string2obj-i.yaml000064400000000500150403625540017514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Only creates empty string. Do String#replace it with real string.
full_name: SOAP::Mapping::RubytypeFactory#string2obj
is_singleton: false
name: string2obj
params: (node, map, rubytype)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/addiv2soapattr-i.yaml000064400000000335150403625550020367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#addiv2soapattr
is_singleton: false
name: addiv2soapattr
params: (node, obj, map)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/cdesc-RubytypeFactory.yaml000064400000004201150403625550021440 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_STRING
  value: XSD::QName.new(RubyTypeNamespace, 'String')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_TIME
  value: XSD::QName.new(RubyTypeNamespace, 'Time')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_ARRAY
  value: XSD::QName.new(RubyTypeNamespace, 'Array')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_REGEXP
  value: XSD::QName.new(RubyTypeNamespace, 'Regexp')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_RANGE
  value: XSD::QName.new(RubyTypeNamespace, 'Range')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_CLASS
  value: XSD::QName.new(RubyTypeNamespace, 'Class')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_MODULE
  value: XSD::QName.new(RubyTypeNamespace, 'Module')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_SYMBOL
  value: XSD::QName.new(RubyTypeNamespace, 'Symbol')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_STRUCT
  value: XSD::QName.new(RubyTypeNamespace, 'Struct')
- !ruby/object:RI::Constant 
  comment: 
  name: TYPE_HASH
  value: XSD::QName.new(RubyTypeNamespace, 'Map')
full_name: SOAP::Mapping::RubytypeFactory
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: addiv2soapattr
- !ruby/object:RI::MethodSummary 
  name: anytype2obj
- !ruby/object:RI::MethodSummary 
  name: array2obj
- !ruby/object:RI::MethodSummary 
  name: exception2obj
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: rubytype2obj
- !ruby/object:RI::MethodSummary 
  name: rubytypestruct2obj
- !ruby/object:RI::MethodSummary 
  name: singleton_methods_true
- !ruby/object:RI::MethodSummary 
  name: singleton_methods_true
- !ruby/object:RI::MethodSummary 
  name: soap2obj
- !ruby/object:RI::MethodSummary 
  name: string2obj
- !ruby/object:RI::MethodSummary 
  name: unknownobj2soap
- !ruby/object:RI::MethodSummary 
  name: unknownstruct2obj
- !ruby/object:RI::MethodSummary 
  name: unknowntype2obj
name: RubytypeFactory
superclass: Factory
ri/1.8/system/SOAP/Mapping/RubytypeFactory/anytype2obj-i.yaml000064400000000330150403625550017701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#anytype2obj
is_singleton: false
name: anytype2obj
params: (node, info, map)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/unknownobj2soap-i.yaml000064400000000353150403625560020600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#unknownobj2soap
is_singleton: false
name: unknownobj2soap
params: (soap_class, obj, info, map)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/rubytypestruct2obj-i.yaml000064400000000360150403625560021344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#rubytypestruct2obj
is_singleton: false
name: rubytypestruct2obj
params: (node, info, map, rubytype)
visibility: private
ri/1.8/system/SOAP/Mapping/RubytypeFactory/exception2obj-i.yaml000064400000000335150403625560020214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::RubytypeFactory#exception2obj
is_singleton: false
name: exception2obj
params: (klass, node, map)
visibility: private
ri/1.8/system/SOAP/Mapping/define_attr_accessor-c.yaml000064400000000360150403625570016425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::define_attr_accessor
is_singleton: true
name: define_attr_accessor
params: (obj, name, getterproc, setterproc = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/create_empty_object-c.yaml000064400000000403150403625570016264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ruby/1.7 or later.
full_name: SOAP::Mapping::create_empty_object
is_singleton: true
name: create_empty_object
params: (klass)
visibility: public
ri/1.8/system/SOAP/Mapping/set_attributes-c.yaml000064400000000310150403625570015313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::set_attributes
is_singleton: true
name: set_attributes
params: (obj, values)
visibility: public
ri/1.8/system/SOAP/Mapping/fault2exception-c.yaml000064400000000324150403625570015373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::fault2exception
is_singleton: true
name: fault2exception
params: (fault, registry = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/Base64Factory_/cdesc-Base64Factory_.yaml000064400000000474150403625570020352 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Mapping::Base64Factory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: Base64Factory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/Base64Factory_/obj2soap-i.yaml000064400000000333150403625570016517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Base64Factory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/Base64Factory_/soap2obj-i.yaml000064400000000333150403625600016511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Base64Factory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/name2elename-c.yaml000064400000000722150403625600014604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Allow only (Letter | '_') (Letter | Digit | '-' | '_')* here. Caution: '.' is not allowed here. To follow XML spec., it should be NCName."
- !ruby/struct:SM::Flow::VERB 
  body: "  (denied chars) =&gt; .[0-F][0-F]\n  ex. a.b =&gt; a.2eb\n"
full_name: SOAP::Mapping::name2elename
is_singleton: true
name: name2elename
params: (name)
visibility: public
ri/1.8/system/SOAP/Mapping/soap2obj-c.yaml000064400000000343150403625600013771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::soap2obj
is_singleton: true
name: soap2obj
params: (node, registry = nil, klass = nil, opt = EMPTY_OPT)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/find_mapped_soap_class-i.yaml000064400000000340150403625600020542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry#find_mapped_soap_class
is_singleton: false
name: find_mapped_soap_class
params: (obj_class)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/addextend2obj-i.yaml000064400000000317150403625600016606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry#addextend2obj
is_singleton: false
name: addextend2obj
params: (obj, attr)
visibility: private
ri/1.8/system/SOAP/Mapping/Registry/_obj2soap-i.yaml000064400000000301150403625600015740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry#_obj2soap
is_singleton: false
name: _obj2soap
params: (obj)
visibility: private
ri/1.8/system/SOAP/Mapping/Registry/obj2soap-i.yaml000064400000000430150403625610015605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: general Registry ignores type_qname
full_name: SOAP::Mapping::Registry#obj2soap
is_singleton: false
name: obj2soap
params: (obj, type_qname = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/cdesc-Registry.yaml000064400000020113150403625610016527 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: default_factory
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: excn_handler_obj2soap
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: excn_handler_soap2obj
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: StringFactory
  value: StringFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: BasetypeFactory
  value: BasetypeFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: DateTimeFactory
  value: DateTimeFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: ArrayFactory
  value: ArrayFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: Base64Factory
  value: Base64Factory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: URIFactory
  value: URIFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: TypedArrayFactory
  value: TypedArrayFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: TypedStructFactory
  value: TypedStructFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: HashFactory
  value: HashFactory_.new
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPBaseMap
  value: "[     [::NilClass,     ::SOAP::SOAPNil,        BasetypeFactory],     [::TrueClass,    ::SOAP::SOAPBoolean,    BasetypeFactory],     [::FalseClass,   ::SOAP::SOAPBoolean,    BasetypeFactory],     [::String,       ::SOAP::SOAPString,     StringFactory],     [::DateTime,     ::SOAP::SOAPDateTime,   DateTimeFactory],     [::Date,         ::SOAP::SOAPDate,       DateTimeFactory],     [::Time,         ::SOAP::SOAPDateTime,   DateTimeFactory],     [::Time,         ::SOAP::SOAPTime,       DateTimeFactory],     [::Float,        ::SOAP::SOAPDouble,     BasetypeFactory,       {:derived_class => true}],     [::Float,        ::SOAP::SOAPFloat,      BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPInt,        BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPLong,       BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPInteger,    BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPShort,      BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPByte,       BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPNonPositiveInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPNegativeInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPNonNegativeInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPPositiveInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedLong, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedInt, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedShort, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedByte, BasetypeFactory,       {:derived_class => true}],     [::URI::Generic, ::SOAP::SOAPAnyURI,     URIFactory,       {:derived_class => true}],     [::String,       ::SOAP::SOAPBase64,     Base64Factory],     [::String,       ::SOAP::SOAPHexBinary,  Base64Factory],     [::String,       ::SOAP::SOAPDecimal,    BasetypeFactory],     [::String,       ::SOAP::SOAPDuration,   BasetypeFactory],     [::String,       ::SOAP::SOAPGYearMonth, BasetypeFactory],     [::String,       ::SOAP::SOAPGYear,      BasetypeFactory],     [::String,       ::SOAP::SOAPGMonthDay,  BasetypeFactory],     [::String,       ::SOAP::SOAPGDay,       BasetypeFactory],     [::String,       ::SOAP::SOAPGMonth,     BasetypeFactory],     [::String,       ::SOAP::SOAPQName,      BasetypeFactory],      [::Hash,         ::SOAP::SOAPArray,      HashFactory],     [::Hash,         ::SOAP::SOAPStruct,     HashFactory],      [::Array,        ::SOAP::SOAPArray,      ArrayFactory,       {:derived_class => true}],      [::SOAP::Mapping::SOAPException,                      ::SOAP::SOAPStruct,     TypedStructFactory,       {:type => XSD::QName.new(RubyCustomTypeNamespace, \"SOAPException\")}],  ]"
- !ruby/object:RI::Constant 
  comment: 
  name: RubyOriginalMap
  value: "[     [::NilClass,     ::SOAP::SOAPNil,        BasetypeFactory],     [::TrueClass,    ::SOAP::SOAPBoolean,    BasetypeFactory],     [::FalseClass,   ::SOAP::SOAPBoolean,    BasetypeFactory],     [::String,       ::SOAP::SOAPString,     StringFactory],     [::DateTime,     ::SOAP::SOAPDateTime,   DateTimeFactory],     [::Date,         ::SOAP::SOAPDate,       DateTimeFactory],     [::Time,         ::SOAP::SOAPDateTime,   DateTimeFactory],     [::Time,         ::SOAP::SOAPTime,       DateTimeFactory],     [::Float,        ::SOAP::SOAPDouble,     BasetypeFactory,       {:derived_class => true}],     [::Float,        ::SOAP::SOAPFloat,      BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPInt,        BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPLong,       BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPInteger,    BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPShort,      BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPByte,       BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPNonPositiveInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPNegativeInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPNonNegativeInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPPositiveInteger, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedLong, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedInt, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedShort, BasetypeFactory,       {:derived_class => true}],     [::Integer,      ::SOAP::SOAPUnsignedByte, BasetypeFactory,       {:derived_class => true}],     [::URI::Generic, ::SOAP::SOAPAnyURI,     URIFactory,       {:derived_class => true}],     [::String,       ::SOAP::SOAPBase64,     Base64Factory],     [::String,       ::SOAP::SOAPHexBinary,  Base64Factory],     [::String,       ::SOAP::SOAPDecimal,    BasetypeFactory],     [::String,       ::SOAP::SOAPDuration,   BasetypeFactory],     [::String,       ::SOAP::SOAPGYearMonth, BasetypeFactory],     [::String,       ::SOAP::SOAPGYear,      BasetypeFactory],     [::String,       ::SOAP::SOAPGMonthDay,  BasetypeFactory],     [::String,       ::SOAP::SOAPGDay,       BasetypeFactory],     [::String,       ::SOAP::SOAPGMonth,     BasetypeFactory],     [::String,       ::SOAP::SOAPQName,      BasetypeFactory],      [::Hash,         ::SOAP::SOAPArray,      HashFactory],     [::Hash,         ::SOAP::SOAPStruct,     HashFactory],      # Does not allow Array's subclass here.     [::Array,        ::SOAP::SOAPArray,      ArrayFactory],      [::SOAP::Mapping::SOAPException,                      ::SOAP::SOAPStruct,     TypedStructFactory,       {:type => XSD::QName.new(RubyCustomTypeNamespace, \"SOAPException\")}],   ]"
full_name: SOAP::Mapping::Registry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _obj2soap
- !ruby/object:RI::MethodSummary 
  name: _soap2obj
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: addextend2obj
- !ruby/object:RI::MethodSummary 
  name: addextend2obj
- !ruby/object:RI::MethodSummary 
  name: addextend2soap
- !ruby/object:RI::MethodSummary 
  name: addiv2obj
- !ruby/object:RI::MethodSummary 
  name: find_mapped_obj_class
- !ruby/object:RI::MethodSummary 
  name: find_mapped_soap_class
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: set
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: Registry
superclass: Object
ri/1.8/system/SOAP/Mapping/Registry/set-i.yaml000064400000000420150403625610014660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #add"
full_name: SOAP::Mapping::Registry#set
is_singleton: false
name: set
params: (obj_class, soap_class, factory, info = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/_soap2obj-i.yaml000064400000000431150403625610015745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Might return nil as a mapping result.
full_name: SOAP::Mapping::Registry#_soap2obj
is_singleton: false
name: _soap2obj
params: (node, klass = nil)
visibility: private
ri/1.8/system/SOAP/Mapping/Registry/add-i.yaml000064400000000402150403625620014616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: set
block_params: 
comment: 
full_name: SOAP::Mapping::Registry#add
is_singleton: false
name: add
params: (obj_class, soap_class, factory, info = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/new-c.yaml000064400000000274150403625620014660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry::new
is_singleton: true
name: new
params: (config = {})
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/addiv2obj-i.yaml000064400000000307150403625620015736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry#addiv2obj
is_singleton: false
name: addiv2obj
params: (obj, attr)
visibility: private
ri/1.8/system/SOAP/Mapping/Registry/soap2obj-i.yaml000064400000000314150403625630015610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry#soap2obj
is_singleton: false
name: soap2obj
params: (node, klass = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/find_mapped_obj_class-i.yaml000064400000000337150403625630020363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry#find_mapped_obj_class
is_singleton: false
name: find_mapped_obj_class
params: (soap_class)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/addextend2soap-i.yaml000064400000000321150403625630016774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry#addextend2soap
is_singleton: false
name: addextend2soap
params: (node, obj)
visibility: private
ri/1.8/system/SOAP/Mapping/Registry/Map/find_mapped_soap_class-i.yaml000064400000000354150403625630021267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry::Map#find_mapped_soap_class
is_singleton: false
name: find_mapped_soap_class
params: (target_obj_class)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/Map/init-i.yaml000064400000000410150403625630015546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Give priority to former entry.
full_name: SOAP::Mapping::Registry::Map#init
is_singleton: false
name: init
params: (init_map = [])
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/Map/obj2soap-i.yaml000064400000000303150403625630016323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry::Map#obj2soap
is_singleton: false
name: obj2soap
params: (obj)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/Map/add-i.yaml000064400000000435150403625630015342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Give priority to latter entry.
full_name: SOAP::Mapping::Registry::Map#add
is_singleton: false
name: add
params: (obj_class, soap_class, factory, info)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/Map/cdesc-Map.yaml000064400000001150150403625630016153 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::Registry::Map
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: clear
- !ruby/object:RI::MethodSummary 
  name: find_mapped_obj_class
- !ruby/object:RI::MethodSummary 
  name: find_mapped_soap_class
- !ruby/object:RI::MethodSummary 
  name: init
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: Map
superclass: Object
ri/1.8/system/SOAP/Mapping/Registry/Map/new-c.yaml000064400000000276150403625630015400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry::Map::new
is_singleton: true
name: new
params: (registry)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/Map/soap2obj-i.yaml000064400000000321150403625630016323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry::Map#soap2obj
is_singleton: false
name: soap2obj
params: (node, klass = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/Map/find_mapped_obj_class-i.yaml000064400000000353150403625630021076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry::Map#find_mapped_obj_class
is_singleton: false
name: find_mapped_obj_class
params: (target_soap_class)
visibility: public
ri/1.8/system/SOAP/Mapping/Registry/Map/clear-i.yaml000064400000000272150403625630015677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Registry::Map#clear
is_singleton: false
name: clear
params: ()
visibility: public
ri/1.8/system/SOAP/Mapping/schema_ns_definition-c.yaml000064400000000316150403625640016426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::schema_ns_definition
is_singleton: true
name: schema_ns_definition
params: (klass)
visibility: public
ri/1.8/system/SOAP/Mapping/protect_threadvars-c.yaml000064400000000331150403625640016156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: SOAP::Mapping::protect_threadvars
is_singleton: true
name: protect_threadvars
params: (*symbols) {|| ...}
visibility: private
ri/1.8/system/SOAP/Mapping/schema_element_definition-c.yaml000064400000000330150403625640017433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::schema_element_definition
is_singleton: true
name: schema_element_definition
params: (klass)
visibility: public
ri/1.8/system/SOAP/Mapping/Factory/setiv2struct-i.yaml000064400000000321150403625640016350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Factory#setiv2struct
is_singleton: false
name: setiv2struct
params: (obj, node, map)
visibility: private
ri/1.8/system/SOAP/Mapping/Factory/cdesc-Factory.yaml000064400000001144150403625640016133 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::Factory
includes: 
- !ruby/object:RI::IncludedModule 
  name: TraverseSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: setiv2ary
- !ruby/object:RI::MethodSummary 
  name: setiv2obj
- !ruby/object:RI::MethodSummary 
  name: setiv2soap
- !ruby/object:RI::MethodSummary 
  name: setiv2struct
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: Factory
superclass: Object
ri/1.8/system/SOAP/Mapping/Factory/obj2soap-i.yaml000064400000000324150403625640015411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Factory#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/Factory/setiv2soap-i.yaml000064400000000314150403625650015771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Factory#setiv2soap
is_singleton: false
name: setiv2soap
params: (node, obj, map)
visibility: public
ri/1.8/system/SOAP/Mapping/Factory/new-c.yaml000064400000000260150403625650014455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Factory::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/Mapping/Factory/soap2obj-i.yaml000064400000000324150403625660015413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Factory#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/Factory/setiv2obj-i.yaml000064400000000312150403625660015600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Factory#setiv2obj
is_singleton: false
name: setiv2obj
params: (obj, node, map)
visibility: public
ri/1.8/system/SOAP/Mapping/Factory/setiv2ary-i.yaml000064400000000313150403625660015622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Factory#setiv2ary
is_singleton: false
name: setiv2ary
params: (obj, node, map)
visibility: private
ri/1.8/system/SOAP/Mapping/ary2soap-c.yaml000064400000000417150403625670014023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::ary2soap
is_singleton: true
name: ary2soap
params: (ary, type_ns = XSD::Namespace, typename = XSD::AnyTypeLiteral, registry = nil, opt = EMPTY_OPT)
visibility: public
ri/1.8/system/SOAP/Mapping/ary2md-c.yaml000064400000000421150403625670013454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::ary2md
is_singleton: true
name: ary2md
params: (ary, rank, type_ns = XSD::Namespace, typename = XSD::AnyTypeLiteral, registry = nil, opt = EMPTY_OPT)
visibility: public
ri/1.8/system/SOAP/Mapping/BasetypeFactory_/obj2soap-i.yaml000064400000000335150403625700017244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::BasetypeFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/BasetypeFactory_/cdesc-BasetypeFactory_.yaml000064400000000553150403625700021623 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::BasetypeFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: BasetypeFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/BasetypeFactory_/new-c.yaml000064400000000327150403625710016312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::BasetypeFactory_::new
is_singleton: true
name: new
params: (allow_original_mapping = false)
visibility: public
ri/1.8/system/SOAP/Mapping/BasetypeFactory_/soap2obj-i.yaml000064400000000335150403625710017245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::BasetypeFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/module_from_name-c.yaml000064400000000326150403625720015566 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::module_from_name
is_singleton: true
name: module_from_name
params: (name, lenient = false)
visibility: public
ri/1.8/system/SOAP/Mapping/Object/__set_xmlele_value-i.yaml000064400000000335150403625730017326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#__set_xmlele_value
is_singleton: false
name: __set_xmlele_value
params: (key, org, value)
visibility: private
ri/1.8/system/SOAP/Mapping/Object/%5b%5d-i.yaml000064400000000264150403625730014345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#[]
is_singleton: false
name: "[]"
params: (qname)
visibility: public
ri/1.8/system/SOAP/Mapping/Object/__define_attr_accessor-i.yaml000064400000000333150403625730020135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#__define_attr_accessor
is_singleton: false
name: __define_attr_accessor
params: (qname)
visibility: private
ri/1.8/system/SOAP/Mapping/Object/__xmlele-i.yaml000064400000000271150403625740015257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#__xmlele
is_singleton: false
name: __xmlele
params: ()
visibility: public
ri/1.8/system/SOAP/Mapping/Object/inspect-i.yaml000064400000000267150403625740015145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/Mapping/Object/cdesc-Object.yaml000064400000001566150403625750015543 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "For anyType object: SOAP::Mapping::Object not ::Object"
constants: []

full_name: SOAP::Mapping::Object
includes: 
- !ruby/object:RI::IncludedModule 
  name: Marshallable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: __add_xmlele_value
- !ruby/object:RI::MethodSummary 
  name: __define_attr_accessor
- !ruby/object:RI::MethodSummary 
  name: __define_attr_accessor
- !ruby/object:RI::MethodSummary 
  name: __set_xmlele_value
- !ruby/object:RI::MethodSummary 
  name: __xmlattr
- !ruby/object:RI::MethodSummary 
  name: __xmlele
- !ruby/object:RI::MethodSummary 
  name: inspect
name: Object
superclass: Object
ri/1.8/system/SOAP/Mapping/Object/new-c.yaml000064400000000257150403625750014263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/Mapping/Object/__xmlattr-i.yaml000064400000000273150403625760015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#__xmlattr
is_singleton: false
name: __xmlattr
params: ()
visibility: public
ri/1.8/system/SOAP/Mapping/Object/__add_xmlele_value-i.yaml000064400000000331150403625770017263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#__add_xmlele_value
is_singleton: false
name: __add_xmlele_value
params: (qname, value)
visibility: public
ri/1.8/system/SOAP/Mapping/Object/%5b%5d%3d-i.yaml000064400000000275150403625770014647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::Object#[]=
is_singleton: false
name: "[]="
params: (qname, value)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/schema_element_definition-i.yaml000064400000000616150403626000023256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: it caches @@schema_element. this means that @@schema_element must not be changed while a lifetime of a WSDLLiteralRegistry.
full_name: SOAP::Mapping::WSDLLiteralRegistry#schema_element_definition
is_singleton: false
name: schema_element_definition
params: (klass)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/schema_attribute_definition-i.yaml000064400000000362150403626000023626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#schema_attribute_definition
is_singleton: false
name: schema_attribute_definition
params: (klass)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/stubobj2soap-i.yaml000064400000000331150403626000020504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#stubobj2soap
is_singleton: false
name: stubobj2soap
params: (obj, qname)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/add_elements2soap-i.yaml000064400000000341150403626000021461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#add_elements2soap
is_singleton: false
name: add_elements2soap
params: (obj, ele)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/add_elements2stubobj-i.yaml000064400000000350150403626000022167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#add_elements2stubobj
is_singleton: false
name: add_elements2stubobj
params: (node, obj)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/add_attributes2soap-i.yaml000064400000000345150403626000022037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#add_attributes2soap
is_singleton: false
name: add_attributes2soap
params: (obj, ele)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/mappingobj2soap-i.yaml000064400000000337150403626000021170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#mappingobj2soap
is_singleton: false
name: mappingobj2soap
params: (obj, qname)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/obj2soap-i.yaml000064400000000320150403626000017604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#obj2soap
is_singleton: false
name: obj2soap
params: (obj, qname)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/any2soap-i.yaml000064400000000321150403626000017622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#any2soap
is_singleton: false
name: any2soap
params: (obj, qname)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/obj2typesoap-i.yaml000064400000000343150403626010020514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#obj2typesoap
is_singleton: false
name: obj2typesoap
params: (obj, type, qualified)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/simpleobj2soap-i.yaml000064400000000334150403626010021024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#simpleobj2soap
is_singleton: false
name: simpleobj2soap
params: (obj, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/any2obj-i.yaml000064400000000332150403626010017435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#any2obj
is_singleton: false
name: any2obj
params: (node, obj_class = nil)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/obj2elesoap-i.yaml000064400000000325150403626020020301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#obj2elesoap
is_singleton: false
name: obj2elesoap
params: (obj, ele)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/new-c.yaml000064400000000421150403626020016654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry::new
is_singleton: true
name: new
params: (definedtypes = XSD::NamedElements::Empty, definedelements = XSD::NamedElements::Empty)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/soap2obj-i.yaml000064400000000434150403626020017614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: node should be a SOAPElement
full_name: SOAP::Mapping::WSDLLiteralRegistry#soap2obj
is_singleton: false
name: soap2obj
params: (node, obj_class = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/soapele2plainobj-i.yaml000064400000000333150403626030021325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#soapele2plainobj
is_singleton: false
name: soapele2plainobj
params: (node)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/cdesc-WSDLLiteralRegistry.yaml000064400000004222150403626030022545 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definedelements
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: definedtypes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: excn_handler_obj2soap
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: excn_handler_soap2obj
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MAPPING_OPT
  value: "{ :no_reference => true }"
full_name: SOAP::Mapping::WSDLLiteralRegistry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_attributes2plainobj
- !ruby/object:RI::MethodSummary 
  name: add_attributes2soap
- !ruby/object:RI::MethodSummary 
  name: add_attributes2stubobj
- !ruby/object:RI::MethodSummary 
  name: add_elements2plainobj
- !ruby/object:RI::MethodSummary 
  name: add_elements2soap
- !ruby/object:RI::MethodSummary 
  name: add_elements2stubobj
- !ruby/object:RI::MethodSummary 
  name: any2obj
- !ruby/object:RI::MethodSummary 
  name: any2soap
- !ruby/object:RI::MethodSummary 
  name: anytype2obj
- !ruby/object:RI::MethodSummary 
  name: base2soap
- !ruby/object:RI::MethodSummary 
  name: complexobj2soap
- !ruby/object:RI::MethodSummary 
  name: define_xmlattr
- !ruby/object:RI::MethodSummary 
  name: define_xmlattr
- !ruby/object:RI::MethodSummary 
  name: define_xmlattr_accessor
- !ruby/object:RI::MethodSummary 
  name: define_xmlattr_accessor
- !ruby/object:RI::MethodSummary 
  name: mappingobj2soap
- !ruby/object:RI::MethodSummary 
  name: obj2elesoap
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: obj2typesoap
- !ruby/object:RI::MethodSummary 
  name: schema_attribute_definition
- !ruby/object:RI::MethodSummary 
  name: schema_element_definition
- !ruby/object:RI::MethodSummary 
  name: simpleobj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
- !ruby/object:RI::MethodSummary 
  name: soapele2plainobj
- !ruby/object:RI::MethodSummary 
  name: soapele2stubobj
- !ruby/object:RI::MethodSummary 
  name: stubobj2soap
name: WSDLLiteralRegistry
superclass: Registry
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/define_xmlattr_accessor-i.yaml000064400000000357150403626030022771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#define_xmlattr_accessor
is_singleton: false
name: define_xmlattr_accessor
params: (obj, qname)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/add_elements2plainobj-i.yaml000064400000000352150403626030022322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#add_elements2plainobj
is_singleton: false
name: add_elements2plainobj
params: (node, obj)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/anytype2obj-i.yaml000064400000000321150403626030020337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#anytype2obj
is_singleton: false
name: anytype2obj
params: (node)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/soapele2stubobj-i.yaml000064400000000344150403626030021201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#soapele2stubobj
is_singleton: false
name: soapele2stubobj
params: (node, obj_class)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/add_attributes2stubobj-i.yaml000064400000000354150403626030022550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#add_attributes2stubobj
is_singleton: false
name: add_attributes2stubobj
params: (node, obj)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/add_attributes2plainobj-i.yaml000064400000000356150403626030022700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#add_attributes2plainobj
is_singleton: false
name: add_attributes2plainobj
params: (node, obj)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/base2soap-i.yaml000064400000000322150403626030017751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#base2soap
is_singleton: false
name: base2soap
params: (obj, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/define_xmlattr-i.yaml000064400000000326150403626030021103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#define_xmlattr
is_singleton: false
name: define_xmlattr
params: (obj)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLLiteralRegistry/complexobj2soap-i.yaml000064400000000351150403626030021203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLLiteralRegistry#complexobj2soap
is_singleton: false
name: complexobj2soap
params: (obj, type, qualified)
visibility: private
ri/1.8/system/SOAP/Mapping/HashFactory_/obj2soap-i.yaml000064400000000331150403626030016344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::HashFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/HashFactory_/cdesc-HashFactory_.yaml000064400000000543150403626030020035 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::HashFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: HashFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/HashFactory_/new-c.yaml000064400000000323150403626030015411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::HashFactory_::new
is_singleton: true
name: new
params: (allow_original_mapping = false)
visibility: public
ri/1.8/system/SOAP/Mapping/HashFactory_/soap2obj-i.yaml000064400000000331150403626030016344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::HashFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/elename2name-c.yaml000064400000000275150403626030014605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::elename2name
is_singleton: true
name: elename2name
params: (name)
visibility: public
ri/1.8/system/SOAP/Mapping/class2element-c.yaml000064400000000300150403626030015002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::class2element
is_singleton: true
name: class2element
params: (klass)
visibility: public
ri/1.8/system/SOAP/Mapping/obj2soap-c.yaml000064400000000341150403626030013765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::obj2soap
is_singleton: true
name: obj2soap
params: (obj, registry = nil, type = nil, opt = EMPTY_OPT)
visibility: public
ri/1.8/system/SOAP/Mapping/obj2element-c.yaml000064400000000272150403626030014457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::obj2element
is_singleton: true
name: obj2element
params: (obj)
visibility: public
ri/1.8/system/SOAP/Mapping/define_singleton_method-c.yaml000064400000000340150403626030017121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::define_singleton_method
is_singleton: true
name: define_singleton_method
params: (obj, name, &block)
visibility: public
ri/1.8/system/SOAP/Mapping/schema_type_definition-c.yaml000064400000000322150403626030016756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::schema_type_definition
is_singleton: true
name: schema_type_definition
params: (klass)
visibility: public
ri/1.8/system/SOAP/Mapping/URIFactory_/obj2soap-i.yaml000064400000000330150403626030016117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::URIFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/URIFactory_/soap2obj-i.yaml000064400000000330150403626030016117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::URIFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/URIFactory_/cdesc-URIFactory_.yaml000064400000000466150403626030017371 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Mapping::URIFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: URIFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/DateTimeFactory_/obj2soap-i.yaml000064400000000335150403626030017161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::DateTimeFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/DateTimeFactory_/new-c.yaml000064400000000327150403626030016226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::DateTimeFactory_::new
is_singleton: true
name: new
params: (allow_original_mapping = false)
visibility: public
ri/1.8/system/SOAP/Mapping/DateTimeFactory_/soap2obj-i.yaml000064400000000335150403626030017161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::DateTimeFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/DateTimeFactory_/cdesc-DateTimeFactory_.yaml000064400000000553150403626030021460 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::DateTimeFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: DateTimeFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/StringFactory_/cdesc-StringFactory_.yaml000064400000000547150403626030021007 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Mapping::StringFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: StringFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/StringFactory_/obj2soap-i.yaml000064400000000333150403626030016731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::StringFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/StringFactory_/new-c.yaml000064400000000325150403626030015776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::StringFactory_::new
is_singleton: true
name: new
params: (allow_original_mapping = false)
visibility: public
ri/1.8/system/SOAP/Mapping/StringFactory_/soap2obj-i.yaml000064400000000333150403626030016731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::StringFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/cdesc-Mapping.yaml000064400000006301150403626030014502 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: _obj2soap
- !ruby/object:RI::MethodSummary 
  name: _soap2obj
- !ruby/object:RI::MethodSummary 
  name: add_md_ary
- !ruby/object:RI::MethodSummary 
  name: ary2md
- !ruby/object:RI::MethodSummary 
  name: ary2soap
- !ruby/object:RI::MethodSummary 
  name: class2element
- !ruby/object:RI::MethodSummary 
  name: class2qname
- !ruby/object:RI::MethodSummary 
  name: class_from_name
- !ruby/object:RI::MethodSummary 
  name: class_schema_variable
- !ruby/object:RI::MethodSummary 
  name: const_from_name
- !ruby/object:RI::MethodSummary 
  name: create_empty_object
- !ruby/object:RI::MethodSummary 
  name: create_empty_object
- !ruby/object:RI::MethodSummary 
  name: define_attr_accessor
- !ruby/object:RI::MethodSummary 
  name: define_singleton_method
- !ruby/object:RI::MethodSummary 
  name: elename2name
- !ruby/object:RI::MethodSummary 
  name: fault2exception
- !ruby/object:RI::MethodSummary 
  name: get_attribute
- !ruby/object:RI::MethodSummary 
  name: module_from_name
- !ruby/object:RI::MethodSummary 
  name: name2elename
- !ruby/object:RI::MethodSummary 
  name: obj2element
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: protect_threadvars
- !ruby/object:RI::MethodSummary 
  name: schema_attribute_definition
- !ruby/object:RI::MethodSummary 
  name: schema_element_definition
- !ruby/object:RI::MethodSummary 
  name: schema_ns_definition
- !ruby/object:RI::MethodSummary 
  name: schema_type_definition
- !ruby/object:RI::MethodSummary 
  name: set_attributes
- !ruby/object:RI::MethodSummary 
  name: soap2obj
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RubyTypeNamespace
  value: "'http://www.ruby-lang.org/xmlns/ruby/type/1.6'"
- !ruby/object:RI::Constant 
  comment: 
  name: RubyTypeInstanceNamespace
  value: "'http://www.ruby-lang.org/xmlns/ruby/type-instance'"
- !ruby/object:RI::Constant 
  comment: 
  name: RubyCustomTypeNamespace
  value: "'http://www.ruby-lang.org/xmlns/ruby/type/custom'"
- !ruby/object:RI::Constant 
  comment: 
  name: ApacheSOAPTypeNamespace
  value: "'http://xml.apache.org/xml-soap'"
- !ruby/object:RI::Constant 
  comment: 
  name: EMPTY_OPT
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: MARSHAL_TAG
  value: "{       String => ['\"', 1],       Regexp => ['/', 2],       Array => ['[', 1],       Hash => ['{', 1]"
- !ruby/object:RI::Constant 
  comment: 
  name: RubyTypeName
  value: XSD::QName.new(RubyTypeInstanceNamespace, 'rubyType')
- !ruby/object:RI::Constant 
  comment: 
  name: RubyExtendName
  value: XSD::QName.new(RubyTypeInstanceNamespace, 'extends')
- !ruby/object:RI::Constant 
  comment: 
  name: RubyIVarName
  value: XSD::QName.new(RubyTypeInstanceNamespace, 'ivars')
- !ruby/object:RI::Constant 
  comment: 
  name: DefaultRegistry
  value: Registry.new
- !ruby/object:RI::Constant 
  comment: 
  name: RubyOriginalRegistry
  value: Registry.new(:allow_original_mapping => true)
- !ruby/object:RI::Constant 
  comment: 
  name: MapQName
  value: XSD::QName.new(ApacheSOAPTypeNamespace, 'Map')
full_name: SOAP::Mapping
includes: []

instance_methods: []

name: Mapping
superclass: 
ri/1.8/system/SOAP/Mapping/add_md_ary-c.yaml000064400000000324150403626030014332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::add_md_ary
is_singleton: true
name: add_md_ary
params: (md_ary, ary, indices, registry)
visibility: private
ri/1.8/system/SOAP/Mapping/TypedStructFactory_/obj2soap-i.yaml000064400000000340150403626030017753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::TypedStructFactory_#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/TypedStructFactory_/soap2obj-i.yaml000064400000000340150403626030017753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::TypedStructFactory_#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/TypedStructFactory_/cdesc-TypedStructFactory_.yaml000064400000000506150403626030023052 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Mapping::TypedStructFactory_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: TypedStructFactory_
superclass: Factory
ri/1.8/system/SOAP/Mapping/AttachmentFactory/obj2soap-i.yaml000064400000000336150403626030017417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::AttachmentFactory#obj2soap
is_singleton: false
name: obj2soap
params: (soap_class, obj, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/AttachmentFactory/soap2obj-i.yaml000064400000000336150403626030017417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::AttachmentFactory#soap2obj
is_singleton: false
name: soap2obj
params: (obj_class, node, info, map)
visibility: public
ri/1.8/system/SOAP/Mapping/AttachmentFactory/cdesc-AttachmentFactory.yaml000064400000000521150403626030022145 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Mapping::AttachmentFactory
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
name: AttachmentFactory
superclass: SOAP::Mapping::Factory
ri/1.8/system/SOAP/Mapping/const_from_name-c.yaml000064400000000324150403626030015420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::const_from_name
is_singleton: true
name: const_from_name
params: (name, lenient = false)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/schema_element_definition-i.yaml000064400000000616150403626030023226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: it caches @@schema_element. this means that @@schema_element must not be changed while a lifetime of a WSDLLiteralRegistry.
full_name: SOAP::Mapping::WSDLEncodedRegistry#schema_element_definition
is_singleton: false
name: schema_element_definition
params: (klass)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/add_elements2stubobj-i.yaml000064400000000350150403626030022137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#add_elements2stubobj
is_singleton: false
name: add_elements2stubobj
params: (node, obj)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/obj2soap-i.yaml000064400000000326150403626030017562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#obj2soap
is_singleton: false
name: obj2soap
params: (obj, qname = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/any2soap-i.yaml000064400000000321150403626030017572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#any2soap
is_singleton: false
name: any2soap
params: (obj, qname)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/obj2typesoap-i.yaml000064400000000330150403626030020457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#obj2typesoap
is_singleton: false
name: obj2typesoap
params: (obj, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/soap2stubobj-i.yaml000064400000000336150403626030020461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#soap2stubobj
is_singleton: false
name: soap2stubobj
params: (node, obj_class)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/simpleobj2soap-i.yaml000064400000000334150403626030020773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#simpleobj2soap
is_singleton: false
name: simpleobj2soap
params: (obj, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/any2obj-i.yaml000064400000000324150403626040017406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#any2obj
is_singleton: false
name: any2obj
params: (node, obj_class)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/struct2soap-i.yaml000064400000000342150403626040020333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#struct2soap
is_singleton: false
name: struct2soap
params: (obj, type_qname, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/new-c.yaml000064400000000344150403626040016627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry::new
is_singleton: true
name: new
params: (definedtypes = XSD::NamedElements::Empty)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/soap2obj-i.yaml000064400000000475150403626040017570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "map anything for now: must refer WSDL while mapping. [ToDo]"
full_name: SOAP::Mapping::WSDLEncodedRegistry#soap2obj
is_singleton: false
name: soap2obj
params: (node, obj_class = nil)
visibility: public
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/elements2soap-i.yaml000064400000000350150403626050020623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#elements2soap
is_singleton: false
name: elements2soap
params: (obj, soap_obj, elements)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/cdesc-WSDLEncodedRegistry.yaml000064400000003242150403626050022462 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definedelements
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: definedtypes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: excn_handler_obj2soap
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: excn_handler_soap2obj
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MapKeyName
  value: XSD::QName.new(nil, "key")
- !ruby/object:RI::Constant 
  comment: 
  name: MapValueName
  value: XSD::QName.new(nil, "value")
full_name: SOAP::Mapping::WSDLEncodedRegistry
includes: 
- !ruby/object:RI::IncludedModule 
  name: TraverseSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_elements2stubobj
- !ruby/object:RI::MethodSummary 
  name: any2obj
- !ruby/object:RI::MethodSummary 
  name: any2soap
- !ruby/object:RI::MethodSummary 
  name: array2soap
- !ruby/object:RI::MethodSummary 
  name: base2soap
- !ruby/object:RI::MethodSummary 
  name: complexobj2soap
- !ruby/object:RI::MethodSummary 
  name: elements2soap
- !ruby/object:RI::MethodSummary 
  name: map2soap
- !ruby/object:RI::MethodSummary 
  name: obj2soap
- !ruby/object:RI::MethodSummary 
  name: obj2typesoap
- !ruby/object:RI::MethodSummary 
  name: schema_element_definition
- !ruby/object:RI::MethodSummary 
  name: simpleobj2soap
- !ruby/object:RI::MethodSummary 
  name: soap2obj
- !ruby/object:RI::MethodSummary 
  name: soap2soap
- !ruby/object:RI::MethodSummary 
  name: soap2stubobj
- !ruby/object:RI::MethodSummary 
  name: struct2soap
name: WSDLEncodedRegistry
superclass: Registry
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/soap2soap-i.yaml000064400000000330150403626050017747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#soap2soap
is_singleton: false
name: soap2soap
params: (obj, type_qname)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/map2soap-i.yaml000064400000000334150403626050017566 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#map2soap
is_singleton: false
name: map2soap
params: (obj, type_qname, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/base2soap-i.yaml000064400000000322150403626050017720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#base2soap
is_singleton: false
name: base2soap
params: (obj, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/array2soap-i.yaml000064400000000340150403626060020125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#array2soap
is_singleton: false
name: array2soap
params: (obj, type_qname, type)
visibility: private
ri/1.8/system/SOAP/Mapping/WSDLEncodedRegistry/complexobj2soap-i.yaml000064400000000336150403626060021156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Mapping::WSDLEncodedRegistry#complexobj2soap
is_singleton: false
name: complexobj2soap
params: (obj, type)
visibility: private
ri/1.8/system/SOAP/SOAPAnySimpleType/cdesc-SOAPAnySimpleType.yaml000064400000000516150403626060020175 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Basic datatypes.
constants: []

full_name: SOAP::SOAPAnySimpleType
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPAnySimpleType
superclass: XSD::XSDAnySimpleType
ri/1.8/system/SOAP/post-i.yaml000064400000000272150403626060011654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#post
is_singleton: false
name: post
params: (url, req_body, header = {})
visibility: public
ri/1.8/system/SOAP/StreamError/cdesc-StreamError.yaml000064400000000310150403626070016224 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::StreamError
includes: []

instance_methods: []

name: StreamError
superclass: Error
ri/1.8/system/SOAP/SOAPNegativeInteger/cdesc-SOAPNegativeInteger.yaml000064400000000437150403626100021024 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPNegativeInteger
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPNegativeInteger
superclass: XSD::XSDNegativeInteger
ri/1.8/system/SOAP/SOAPFault/faultcode%3d-i.yaml000064400000000272150403626110014663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#faultcode=
is_singleton: false
name: faultcode=
params: (rhs)
visibility: public
ri/1.8/system/SOAP/SOAPFault/encode-i.yaml000064400000000357150403626110013662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (self.faultcode)
comment: 
full_name: SOAP::SOAPFault#encode
is_singleton: false
name: encode
params: (generator, ns, attrs = {}) {|self.faultcode| ...}
visibility: public
ri/1.8/system/SOAP/SOAPFault/faultstring-i.yaml000064400000000271150403626120014763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#faultstring
is_singleton: false
name: faultstring
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPFault/cdesc-SOAPFault.yaml000064400000001476150403626130015021 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::SOAPFault
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPEnvelopeElement
- !ruby/object:RI::IncludedModule 
  name: SOAPCompoundtype
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: detail
- !ruby/object:RI::MethodSummary 
  name: detail=
- !ruby/object:RI::MethodSummary 
  name: encode
- !ruby/object:RI::MethodSummary 
  name: faultactor
- !ruby/object:RI::MethodSummary 
  name: faultactor=
- !ruby/object:RI::MethodSummary 
  name: faultcode
- !ruby/object:RI::MethodSummary 
  name: faultcode=
- !ruby/object:RI::MethodSummary 
  name: faultstring
- !ruby/object:RI::MethodSummary 
  name: faultstring=
name: SOAPFault
superclass: SOAPStruct
ri/1.8/system/SOAP/SOAPFault/faultactor%3d-i.yaml000064400000000274150403626130015065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#faultactor=
is_singleton: false
name: faultactor=
params: (rhs)
visibility: public
ri/1.8/system/SOAP/SOAPFault/detail-i.yaml000064400000000257150403626130013670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#detail
is_singleton: false
name: detail
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPFault/new-c.yaml000064400000000353150403626140013207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault::new
is_singleton: true
name: new
params: (faultcode = nil, faultstring = nil, faultactor = nil, detail = nil)
visibility: public
ri/1.8/system/SOAP/SOAPFault/faultcode-i.yaml000064400000000265150403626140014374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#faultcode
is_singleton: false
name: faultcode
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPFault/detail%3d-i.yaml000064400000000264150403626140014163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#detail=
is_singleton: false
name: detail=
params: (rhs)
visibility: public
ri/1.8/system/SOAP/SOAPFault/faultactor-i.yaml000064400000000267150403626150014575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#faultactor
is_singleton: false
name: faultactor
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPFault/faultstring%3d-i.yaml000064400000000276150403626150015267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPFault#faultstring=
is_singleton: false
name: faultstring=
params: (rhs)
visibility: public
ri/1.8/system/SOAP/SOAPHeaderItem/cdesc-SOAPHeaderItem.yaml000064400000001171150403626150016703 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: element
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: mustunderstand
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::SOAPHeaderItem
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPEnvelopeElement
- !ruby/object:RI::IncludedModule 
  name: SOAPCompoundtype
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: encode
name: SOAPHeaderItem
superclass: XSD::NSDBase
ri/1.8/system/SOAP/SOAPHeaderItem/encode-i.yaml000064400000000350150403626150014613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@element)
comment: 
full_name: SOAP::SOAPHeaderItem#encode
is_singleton: false
name: encode
params: (generator, ns, attrs = {}) {|@element| ...}
visibility: public
ri/1.8/system/SOAP/SOAPHeaderItem/new-c.yaml000064400000000341150403626150014141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPHeaderItem::new
is_singleton: true
name: new
params: (element, mustunderstand = true, encodingstyle = nil)
visibility: public
ri/1.8/system/SOAP/FaultError/cdesc-FaultError.yaml000064400000001053150403626160015671 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: detail
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: faultactor
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: faultcode
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: faultstring
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::FaultError
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_s
name: FaultError
superclass: Error
ri/1.8/system/SOAP/FaultError/new-c.yaml000064400000000257150403626160013543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::FaultError::new
is_singleton: true
name: new
params: (fault)
visibility: public
ri/1.8/system/SOAP/FaultError/to_s-i.yaml000064400000000254150403626160013721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::FaultError#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPGYearMonth/cdesc-SOAPGYearMonth.yaml000064400000000420150403626170016715 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPGYearMonth
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPGYearMonth
superclass: XSD::XSDGYearMonth
ri/1.8/system/SOAP/SOAPFloat/cdesc-SOAPFloat.yaml000064400000000401150403626170014774 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPFloat
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPFloat
superclass: XSD::XSDFloat
ri/1.8/system/SOAP/new-c.yaml000064400000000266150403626170011457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::new
is_singleton: true
name: new
params: (proxy = nil, agent = nil)
visibility: public
ri/1.8/system/SOAP/SOAPAnyURI/cdesc-SOAPAnyURI.yaml000064400000000404150403626170015103 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPAnyURI
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPAnyURI
superclass: XSD::XSDAnyURI
ri/1.8/system/SOAP/SOAPGMonth/cdesc-SOAPGMonth.yaml000064400000000404150403626200015247 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPGMonth
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPGMonth
superclass: XSD::XSDGMonth
ri/1.8/system/SOAP/SOAPExternalReference/refidstr-i.yaml000064400000000277150403626200016576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPExternalReference#refidstr
is_singleton: false
name: refidstr
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPExternalReference/referred-i.yaml000064400000000277150403626200016552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPExternalReference#referred
is_singleton: false
name: referred
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPExternalReference/new-c.yaml000064400000000265150403626210015535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPExternalReference::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPExternalReference/cdesc-SOAPExternalReference.yaml000064400000000743150403626210021670 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::SOAPExternalReference
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: external_contentid
- !ruby/object:RI::MethodSummary 
  name: referred
- !ruby/object:RI::MethodSummary 
  name: refidstr
name: SOAPExternalReference
superclass: XSD::NSDBase
ri/1.8/system/SOAP/SOAPExternalReference/external_contentid-i.yaml000064400000000324150403626210020637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPExternalReference#external_contentid
is_singleton: false
name: external_contentid
params: ()
visibility: private
ri/1.8/system/SOAP/start-i.yaml000064400000000275150403626210012024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (worker)
comment: 
full_name: SOAP#start
is_singleton: false
name: start
params: (url) {|worker| ...}
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/createDriver-i.yaml000064400000000443150403626220016561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #create_driver"
full_name: SOAP::WSDLDriverFactory#createDriver
is_singleton: false
name: createDriver
params: (servicename = nil, portname = nil)
visibility: public
ri/1.8/system/SOAP/WSDLDriverFactory/partqname-i.yaml000064400000000302150403626220016124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#partqname
is_singleton: false
name: partqname
params: (part)
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/inspect-i.yaml000064400000000271150403626220015606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/WSDLDriverFactory/cdesc-WSDLDriverFactory.yaml000064400000001703150403626220020250 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: wsdl
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::WSDLDriverFactory
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_operation
- !ruby/object:RI::MethodSummary 
  name: createDriver
- !ruby/object:RI::MethodSummary 
  name: create_driver
- !ruby/object:RI::MethodSummary 
  name: create_param_def
- !ruby/object:RI::MethodSummary 
  name: create_rpc_driver
- !ruby/object:RI::MethodSummary 
  name: filter_parts
- !ruby/object:RI::MethodSummary 
  name: find_port
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: init_driver
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: param_def
- !ruby/object:RI::MethodSummary 
  name: partqname
name: WSDLDriverFactory
superclass: Object
ri/1.8/system/SOAP/WSDLDriverFactory/create_rpc_driver-i.yaml000064400000000356150403626220017627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#create_rpc_driver
is_singleton: false
name: create_rpc_driver
params: (servicename = nil, portname = nil)
visibility: public
ri/1.8/system/SOAP/WSDLDriverFactory/new-c.yaml000064400000000265150403626230014730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory::new
is_singleton: true
name: new
params: (wsdl)
visibility: public
ri/1.8/system/SOAP/WSDLDriverFactory/create_driver-i.yaml000064400000000523150403626230016760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: createDriver
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: depricated old interface
full_name: SOAP::WSDLDriverFactory#create_driver
is_singleton: false
name: create_driver
params: (servicename = nil, portname = nil)
visibility: public
ri/1.8/system/SOAP/WSDLDriverFactory/init_driver-i.yaml000064400000000313150403626230016455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#init_driver
is_singleton: false
name: init_driver
params: (drv, port)
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/add_operation-i.yaml000064400000000317150403626230016753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#add_operation
is_singleton: false
name: add_operation
params: (drv, port)
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/param_def-i.yaml000064400000000332150403626230016056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#param_def
is_singleton: false
name: param_def
params: (type, name, klass, partqname)
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/find_port-i.yaml000064400000000337150403626240016132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#find_port
is_singleton: false
name: find_port
params: (servicename = nil, portname = nil)
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/FactoryError/cdesc-FactoryError.yaml000064400000000345150403626240022040 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::WSDLDriverFactory::FactoryError
includes: []

instance_methods: []

name: FactoryError
superclass: StandardError
ri/1.8/system/SOAP/WSDLDriverFactory/filter_parts-i.yaml000064400000000331150403626240016636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#filter_parts
is_singleton: false
name: filter_parts
params: (partsdef, partssource)
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/create_param_def-i.yaml000064400000000323150403626250017403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#create_param_def
is_singleton: false
name: create_param_def
params: (op_bind)
visibility: private
ri/1.8/system/SOAP/WSDLDriverFactory/import-i.yaml000064400000000300150403626250015447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::WSDLDriverFactory#import
is_singleton: false
name: import
params: (location)
visibility: private
ri/1.8/system/SOAP/SOAPGenerator/prologue-i.yaml000064400000000270150403626250015133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#prologue
is_singleton: false
name: prologue
params: ()
visibility: private
ri/1.8/system/SOAP/SOAPGenerator/FormatEncodeError/cdesc-FormatEncodeError.yaml000064400000000343150403626250023071 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPGenerator::FormatEncodeError
includes: []

instance_methods: []

name: FormatEncodeError
superclass: Error
ri/1.8/system/SOAP/SOAPGenerator/encode_string-i.yaml000064400000000304150403626250016120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_string
is_singleton: false
name: encode_string
params: (str)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/cdesc-SOAPGenerator.yaml000064400000003651150403626260016550 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: charset
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: default_encodingstyle
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: generate_explicit_type
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: use_numeric_character_reference
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: assign_ns
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "CAUTION: MT-unsafe"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: EncodeMap
  value: "{     '&' => '&amp;',     '<' => '&lt;',     '>' => '&gt;',     '\"' => '&quot;',     '\\'' => '&apos;',     \"\\r\" => '&#xd;'"
- !ruby/object:RI::Constant 
  comment: 
  name: EncodeCharRegexp
  value: Regexp.new("[#{EncodeMap.keys.join}]")
full_name: SOAP::SOAPGenerator
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_reftarget
- !ruby/object:RI::MethodSummary 
  name: element_local?
- !ruby/object:RI::MethodSummary 
  name: element_qualified?
- !ruby/object:RI::MethodSummary 
  name: encode_child
- !ruby/object:RI::MethodSummary 
  name: encode_data
- !ruby/object:RI::MethodSummary 
  name: encode_element
- !ruby/object:RI::MethodSummary 
  name: encode_name
- !ruby/object:RI::MethodSummary 
  name: encode_name_end
- !ruby/object:RI::MethodSummary 
  name: encode_rawstring
- !ruby/object:RI::MethodSummary 
  name: encode_string
- !ruby/object:RI::MethodSummary 
  name: encode_tag
- !ruby/object:RI::MethodSummary 
  name: encode_tag_end
- !ruby/object:RI::MethodSummary 
  name: epilogue
- !ruby/object:RI::MethodSummary 
  name: find_handler
- !ruby/object:RI::MethodSummary 
  name: generate
- !ruby/object:RI::MethodSummary 
  name: prologue
- !ruby/object:RI::MethodSummary 
  name: xmldecl
name: SOAPGenerator
superclass: Object
ri/1.8/system/SOAP/SOAPGenerator/xmldecl-i.yaml000064400000000266150403626260014735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#xmldecl
is_singleton: false
name: xmldecl
params: ()
visibility: private
ri/1.8/system/SOAP/SOAPGenerator/encode_tag-i.yaml000064400000000317150403626260015372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_tag
is_singleton: false
name: encode_tag
params: (elename, attrs = nil)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/encode_element-i.yaml000064400000000322150403626270016245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_element
is_singleton: false
name: encode_element
params: (ns, obj, parent)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/find_handler-i.yaml000064400000000315150403626270015716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#find_handler
is_singleton: false
name: find_handler
params: (encodingstyle)
visibility: private
ri/1.8/system/SOAP/SOAPGenerator/new-c.yaml000064400000000265150403626270014070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator::new
is_singleton: true
name: new
params: (opt = {})
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/epilogue-i.yaml000064400000000270150403626300015104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#epilogue
is_singleton: false
name: epilogue
params: ()
visibility: private
ri/1.8/system/SOAP/SOAPGenerator/encode_tag_end-i.yaml000064400000000324150403626300016211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_tag_end
is_singleton: false
name: encode_tag_end
params: (elename, cr = nil)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/encode_rawstring-i.yaml000064400000000312150403626300016625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_rawstring
is_singleton: false
name: encode_rawstring
params: (str)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/encode_name-i.yaml000064400000000314150403626310015530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_name
is_singleton: false
name: encode_name
params: (ns, data, attrs)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/assign_ns-c.yaml000064400000000330150403626310015247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator::assign_ns
is_singleton: true
name: assign_ns
params: (attrs, ns, namespace, tag = nil)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/encode_child-i.yaml000064400000000320150403626310015670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_child
is_singleton: false
name: encode_child
params: (ns, child, parent)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/element_qualified%3f-i.yaml000064400000000322150403626320017245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#element_qualified?
is_singleton: false
name: element_qualified?
params: (element)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/encode_name_end-i.yaml000064400000000315150403626320016360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_name_end
is_singleton: false
name: encode_name_end
params: (ns, data)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/encode_data-i.yaml000064400000000314150403626320015522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#encode_data
is_singleton: false
name: encode_data
params: (ns, obj, parent)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/add_reftarget-i.yaml000064400000000313150403626330016067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#add_reftarget
is_singleton: false
name: add_reftarget
params: (name, node)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/element_local%3f-i.yaml000064400000000312150403626330016374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#element_local?
is_singleton: false
name: element_local?
params: (element)
visibility: public
ri/1.8/system/SOAP/SOAPGenerator/generate-i.yaml000064400000000304150403626330015066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPGenerator#generate
is_singleton: false
name: generate
params: (obj, io = nil)
visibility: public
ri/1.8/system/SOAP/SOAPBoolean/cdesc-SOAPBoolean.yaml000064400000000407150403626340015625 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPBoolean
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPBoolean
superclass: XSD::XSDBoolean
ri/1.8/system/SOAP/test_loopback_response-i.yaml000064400000000304150403626350015434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#test_loopback_response
is_singleton: false
name: test_loopback_response
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPQName/cdesc-SOAPQName.yaml000064400000000401150403626360014665 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPQName
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPQName
superclass: XSD::XSDQName
ri/1.8/system/SOAP/Processor/default_parser_option-c.yaml000064400000000315150403626360017231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Processor::default_parser_option
is_singleton: true
name: default_parser_option
params: ()
visibility: public
ri/1.8/system/SOAP/Processor/create_generator-c.yaml000064400000000307150403626360016153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Processor::create_generator
is_singleton: true
name: create_generator
params: (opt)
visibility: private
ri/1.8/system/SOAP/Processor/cdesc-Processor.yaml000064400000001026150403626370015460 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_generator
- !ruby/object:RI::MethodSummary 
  name: create_parser
- !ruby/object:RI::MethodSummary 
  name: default_parser_option
- !ruby/object:RI::MethodSummary 
  name: default_parser_option=
- !ruby/object:RI::MethodSummary 
  name: marshal
- !ruby/object:RI::MethodSummary 
  name: unmarshal
comment: 
constants: []

full_name: SOAP::Processor
includes: []

instance_methods: []

name: Processor
superclass: 
ri/1.8/system/SOAP/Processor/marshal-c.yaml000064400000000310150403626370014264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Processor::marshal
is_singleton: true
name: marshal
params: (env, opt = {}, io = nil)
visibility: public
ri/1.8/system/SOAP/Processor/unmarshal-c.yaml000064400000000305150403626400014625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Processor::unmarshal
is_singleton: true
name: unmarshal
params: (stream, opt = {})
visibility: public
ri/1.8/system/SOAP/Processor/default_parser_option%3d-c.yaml000064400000000322150403626410017517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Processor::default_parser_option=
is_singleton: true
name: default_parser_option=
params: (rhs)
visibility: public
ri/1.8/system/SOAP/Processor/create_parser-c.yaml000064400000000301150403626410015447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Processor::create_parser
is_singleton: true
name: create_parser
params: (opt)
visibility: private
ri/1.8/system/SOAP/Marshal/cdesc-Marshal.yaml000064400000001141150403626420014472 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: marshal
- !ruby/object:RI::MethodSummary 
  name: unmarshal
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Trying xsd:dateTime data to be recovered as aTime.
  name: MarshalMappingRegistry
  value: Mapping::Registry.new(     :allow_original_mapping => true)
full_name: SOAP::Marshal
includes: []

instance_methods: []

name: Marshal
superclass: 
ri/1.8/system/SOAP/Marshal/dump-c.yaml000064400000000266150403626430013221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Marshal::dump
is_singleton: true
name: dump
params: (obj, io = nil)
visibility: public
ri/1.8/system/SOAP/Marshal/load-c.yaml000064400000000257150403626430013173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Marshal::load
is_singleton: true
name: load
params: (stream)
visibility: public
ri/1.8/system/SOAP/Marshal/marshal-c.yaml000064400000000347150403626430013703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Marshal::marshal
is_singleton: true
name: marshal
params: (obj, mapping_registry = MarshalMappingRegistry, io = nil)
visibility: public
ri/1.8/system/SOAP/Marshal/unmarshal-c.yaml000064400000000344150403626440014244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Marshal::unmarshal
is_singleton: true
name: unmarshal
params: (stream, mapping_registry = MarshalMappingRegistry)
visibility: public
ri/1.8/system/SOAP/SOAPAttachment/cdesc-SOAPAttachment.yaml000064400000000577150403626440017060 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: data
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::SOAPAttachment
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: external_contentid
name: SOAPAttachment
superclass: SOAPExternalReference
ri/1.8/system/SOAP/SOAPAttachment/new-c.yaml000064400000000263150403626450014230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPAttachment::new
is_singleton: true
name: new
params: (value)
visibility: public
ri/1.8/system/SOAP/SOAPAttachment/external_contentid-i.yaml000064400000000315150403626460017335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPAttachment#external_contentid
is_singleton: false
name: external_contentid
params: ()
visibility: private
ri/1.8/system/SOAP/HTTPConfigLoader/set_options-i.yaml000064400000000317150403626470016276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPConfigLoader#set_options
is_singleton: false
name: set_options
params: (client, options)
visibility: public
ri/1.8/system/SOAP/HTTPConfigLoader/ssl_config_int-i.yaml000064400000000313150403626500016716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPConfigLoader#ssl_config_int
is_singleton: false
name: ssl_config_int
params: (value)
visibility: public
ri/1.8/system/SOAP/HTTPConfigLoader/key_from_file-i.yaml000064400000000314150403626500016531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPConfigLoader#key_from_file
is_singleton: false
name: key_from_file
params: (filename)
visibility: public
ri/1.8/system/SOAP/HTTPConfigLoader/cert_from_file-i.yaml000064400000000316150403626510016701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPConfigLoader#cert_from_file
is_singleton: false
name: cert_from_file
params: (filename)
visibility: public
ri/1.8/system/SOAP/HTTPConfigLoader/set_ssl_config-i.yaml000064400000000330150403626510016717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPConfigLoader#set_ssl_config
is_singleton: false
name: set_ssl_config
params: (client, ssl_config)
visibility: public
ri/1.8/system/SOAP/HTTPConfigLoader/cdesc-HTTPConfigLoader.yaml000064400000001034150403626520017606 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::HTTPConfigLoader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: cert_from_file
- !ruby/object:RI::MethodSummary 
  name: key_from_file
- !ruby/object:RI::MethodSummary 
  name: set_basic_auth
- !ruby/object:RI::MethodSummary 
  name: set_options
- !ruby/object:RI::MethodSummary 
  name: set_ssl_config
- !ruby/object:RI::MethodSummary 
  name: ssl_config_int
name: HTTPConfigLoader
superclass: 
ri/1.8/system/SOAP/HTTPConfigLoader/set_basic_auth-i.yaml000064400000000330150403626520016674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::HTTPConfigLoader#set_basic_auth
is_singleton: false
name: set_basic_auth
params: (client, basic_auth)
visibility: public
ri/1.8/system/SOAP/SessionManager/cdesc-SessionManager.yaml000064400000000652150403626530017360 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: connect_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: receive_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: send_timeout
  rw: RW
class_methods: []

comment: 
constants: []

full_name: SOAP::SessionManager
includes: []

instance_methods: []

name: SessionManager
superclass: Object
ri/1.8/system/SOAP/SOAPInt/cdesc-SOAPInt.yaml000064400000000373150403626540014157 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPInt
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPInt
superclass: XSD::XSDInt
ri/1.8/system/SOAP/MIMEMessage/content_str-i.yaml000064400000000273150403626550015272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#content_str
is_singleton: false
name: content_str
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Header/cdesc-Header.yaml000064400000001075150403626550016142 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: key
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: root
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: str
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::MIMEMessage::Header
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Header
superclass: Object
ri/1.8/system/SOAP/MIMEMessage/Header/%5b%5d-i.yaml000064400000000266150403626550014773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Header#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Header/new-c.yaml000064400000000263150403626550014702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Header::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Header/to_s-i.yaml000064400000000265150403626560015066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Header#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Header/%5b%5d%3d-i.yaml000064400000000277150403626560015272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Header#[]=
is_singleton: false
name: "[]="
params: (key, value)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Part/parse-c.yaml000064400000000270150403626560014740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Part::parse
is_singleton: true
name: parse
params: (str)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Part/parse-i.yaml000064400000000270150403626570014747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Part#parse
is_singleton: false
name: parse
params: (str)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Part/cdesc-Part.yaml000064400000001063150403626570015375 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: body
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: headers
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
comment: 
constants: []

full_name: SOAP::MIMEMessage::Part
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: contentid
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Part
superclass: Object
ri/1.8/system/SOAP/MIMEMessage/Part/new-c.yaml000064400000000261150403626570014420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Part::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Part/to_s-i.yaml000064400000000263150403626600014575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Part#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Part/contentid-i.yaml000064400000000275150403626600015623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Part#contentid
is_singleton: false
name: contentid
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/has_parts%3f-i.yaml000064400000000271150403626600015204 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#has_parts?
is_singleton: false
name: has_parts?
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/parse-c.yaml000064400000000270150403626600014025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::parse
is_singleton: true
name: parse
params: (head, str)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/root-i.yaml000064400000000255150403626610013710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#root
is_singleton: false
name: root
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/parse-i.yaml000064400000000270150403626610014034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#parse
is_singleton: false
name: parse
params: (head, str)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/boundary-i.yaml000064400000000265150403626610014551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#boundary
is_singleton: false
name: boundary
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/add_attachment-i.yaml000064400000000307150403626610015663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#add_attachment
is_singleton: false
name: add_attachment
params: (attach)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Headers/parse-c.yaml000064400000000273150403626620015405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Headers::parse
is_singleton: true
name: parse
params: (str)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Headers/parse-i.yaml000064400000000273150403626620015413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Headers#parse
is_singleton: false
name: parse
params: (str)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Headers/add-i.yaml000064400000000276150403626620015034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Headers#add
is_singleton: false
name: add
params: (key, value)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Headers/cdesc-Headers.yaml000064400000000754150403626620016511 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
comment: 
constants: []

full_name: SOAP::MIMEMessage::Headers
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: parse_line
- !ruby/object:RI::MethodSummary 
  name: parse_rhs
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Headers
superclass: Hash
ri/1.8/system/SOAP/MIMEMessage/Headers/parse_rhs-i.yaml000064400000000303150403626620016261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Headers#parse_rhs
is_singleton: false
name: parse_rhs
params: (str)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Headers/to_s-i.yaml000064400000000266150403626620015247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Headers#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/Headers/parse_line-i.yaml000064400000000306150403626630016420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::Headers#parse_line
is_singleton: false
name: parse_line
params: (line)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/new-c.yaml000064400000000253150403626630013510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/cdesc-MIMEMessage.yaml000064400000002266150403626630015620 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: headers
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: parts
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
comment: 
- !ruby/struct:SM::Flow::P 
  body: Classes for MIME message handling. Should be put somewhere else! Tried using the 'tmail' module but found that I needed something lighter in weight.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MultipartContentType
  value: "'multipart/\\w+'"
full_name: SOAP::MIMEMessage
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_attachment
- !ruby/object:RI::MethodSummary 
  name: add_part
- !ruby/object:RI::MethodSummary 
  name: boundary
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: content_str
- !ruby/object:RI::MethodSummary 
  name: has_parts?
- !ruby/object:RI::MethodSummary 
  name: headers_str
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: root
- !ruby/object:RI::MethodSummary 
  name: to_s
name: MIMEMessage
superclass: Object
ri/1.8/system/SOAP/MIMEMessage/add_part-i.yaml000064400000000274150403626640014507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#add_part
is_singleton: false
name: add_part
params: (content)
visibility: public
ri/1.8/system/SOAP/MIMEMessage/headers_str-i.yaml000064400000000273150403626640015233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#headers_str
is_singleton: false
name: headers_str
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/MIMEMessageError/cdesc-MIMEMessageError.yaml000064400000000347150403626650021700 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::MIMEMessage::MIMEMessageError
includes: []

instance_methods: []

name: MIMEMessageError
superclass: StandardError
ri/1.8/system/SOAP/MIMEMessage/to_s-i.yaml000064400000000255150403626650013675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SOAP/MIMEMessage/close-i.yaml000064400000000257150403626650014040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::MIMEMessage#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPByte/cdesc-SOAPByte.yaml000064400000000376150403626660014507 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPByte
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPByte
superclass: XSD::XSDByte
ri/1.8/system/SOAP/SOAPStruct/%5b%5d-i.yaml000064400000000255150403626670013517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#[]
is_singleton: false
name: "[]"
params: (idx)
visibility: public
ri/1.8/system/SOAP/SOAPStruct/each-i.yaml000064400000000345150403626670013546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@array[idx], @data[idx])
comment: 
full_name: SOAP::SOAPStruct#each
is_singleton: false
name: each
params: () {|@array[idx], @data[idx]| ...}
visibility: public
ri/1.8/system/SOAP/SOAPStruct/to_obj-i.yaml000064400000000260150403626700014110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#to_obj
is_singleton: false
name: to_obj
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPStruct/add-i.yaml000064400000000265150403626700013371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#add
is_singleton: false
name: add
params: (name, value)
visibility: public
ri/1.8/system/SOAP/SOAPStruct/new-c.yaml000064400000000264150403626710013424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct::new
is_singleton: true
name: new
params: (type = nil)
visibility: public
ri/1.8/system/SOAP/SOAPStruct/replace-i.yaml000064400000000325150403626710014252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (self[member])
comment: 
full_name: SOAP::SOAPStruct#replace
is_singleton: false
name: replace
params: () {|self[member]| ...}
visibility: public
ri/1.8/system/SOAP/SOAPStruct/members-i.yaml000064400000000262150403626710014271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#members
is_singleton: false
name: members
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPStruct/decode-c.yaml000064400000000275150403626710014060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct::decode
is_singleton: true
name: decode
params: (elename, type)
visibility: public
ri/1.8/system/SOAP/SOAPStruct/cdesc-SOAPStruct.yaml000064400000001661150403626720015444 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: decode
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compound datatypes.
constants: []

full_name: SOAP::SOAPStruct
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPCompoundtype
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: add_member
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: key?
- !ruby/object:RI::MethodSummary 
  name: members
- !ruby/object:RI::MethodSummary 
  name: replace
- !ruby/object:RI::MethodSummary 
  name: to_obj
- !ruby/object:RI::MethodSummary 
  name: to_s
name: SOAPStruct
superclass: XSD::NSDBase
ri/1.8/system/SOAP/SOAPStruct/to_s-i.yaml000064400000000254150403626720013605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPStruct/add_member-i.yaml000064400000000312150403626720014713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#add_member
is_singleton: false
name: add_member
params: (name, value = nil)
visibility: private
ri/1.8/system/SOAP/SOAPStruct/%5b%5d%3d-i.yaml000064400000000265150403626720014010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#[]=
is_singleton: false
name: "[]="
params: (idx, data)
visibility: public
ri/1.8/system/SOAP/SOAPStruct/key%3f-i.yaml000064400000000260150403626720013724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPStruct#key?
is_singleton: false
name: key?
params: (name)
visibility: public
ri/1.8/system/SOAP/SOAPType/cdesc-SOAPType.yaml000064400000001754150403626720014541 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definedtype
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: elename
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: extraattr
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: id
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: position
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: precedents
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: root
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: for SOAP type(base and compound)
constants: []

full_name: SOAP::SOAPType
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: rootnode
name: SOAPType
superclass: 
ri/1.8/system/SOAP/SOAPType/inspect-i.yaml000064400000000260150403626730013741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPType#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPType/new-c.yaml000064400000000254150403626730013062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPType::new
is_singleton: true
name: new
params: (*arg)
visibility: public
ri/1.8/system/SOAP/SOAPType/rootnode-i.yaml000064400000000262150403626730014127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPType#rootnode
is_singleton: false
name: rootnode
params: ()
visibility: public
ri/1.8/system/SOAP/UnhandledMustUnderstandHeaderError/cdesc-UnhandledMustUnderstandHeaderError.yaml000064400000000366150403626750027406 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::UnhandledMustUnderstandHeaderError
includes: []

instance_methods: []

name: UnhandledMustUnderstandHeaderError
superclass: Error
ri/1.8/system/SOAP/ArrayIndexOutOfBoundsError/cdesc-ArrayIndexOutOfBoundsError.yaml000064400000000346150403626760024151 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::ArrayIndexOutOfBoundsError
includes: []

instance_methods: []

name: ArrayIndexOutOfBoundsError
superclass: Error
ri/1.8/system/SOAP/Marshallable/cdesc-Marshallable.yaml000064400000000305150403626770016503 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Marshallable
includes: []

instance_methods: []

name: Marshallable
superclass: 
ri/1.8/system/SOAP/SOAPBody/encode-i.yaml000064400000000334150403627000013476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@data)
comment: 
full_name: SOAP::SOAPBody#encode
is_singleton: false
name: encode
params: (generator, ns, attrs = {}) {|@data| ...}
visibility: public
ri/1.8/system/SOAP/SOAPBody/fault%3d-i.yaml000064400000000263150403627010013652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBody#fault=
is_singleton: false
name: fault=
params: (fault)
visibility: public
ri/1.8/system/SOAP/SOAPBody/new-c.yaml000064400000000304150403627020013023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBody::new
is_singleton: true
name: new
params: (data = nil, is_fault = false)
visibility: public
ri/1.8/system/SOAP/SOAPBody/response-i.yaml000064400000000262150403627020014101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBody#response
is_singleton: false
name: response
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPBody/request-i.yaml000064400000000260150403627030013732 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBody#request
is_singleton: false
name: request
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPBody/fault-i.yaml000064400000000254150403627030013360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBody#fault
is_singleton: false
name: fault
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPBody/outparams-i.yaml000064400000000264150403627040014262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBody#outparams
is_singleton: false
name: outparams
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPBody/cdesc-SOAPBody.yaml000064400000001360150403627050014457 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add method definitions for RPC to common definition in element.rb
constants: []

full_name: SOAP::SOAPBody
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPEnvelopeElement
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: encode
- !ruby/object:RI::MethodSummary 
  name: fault
- !ruby/object:RI::MethodSummary 
  name: fault=
- !ruby/object:RI::MethodSummary 
  name: outparams
- !ruby/object:RI::MethodSummary 
  name: request
- !ruby/object:RI::MethodSummary 
  name: response
- !ruby/object:RI::MethodSummary 
  name: root_node
name: SOAPBody
superclass: SOAPStruct
ri/1.8/system/SOAP/SOAPBody/root_node-i.yaml000064400000000264150403627050014240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBody#root_node
is_singleton: false
name: root_node
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPLong/cdesc-SOAPLong.yaml000064400000000376150403627060014472 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPLong
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPLong
superclass: XSD::XSDLong
ri/1.8/system/SOAP/reset-i.yaml000064400000000245150403627070012013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#reset
is_singleton: false
name: reset
params: (url)
visibility: public
ri/1.8/system/SOAP/HTTPStreamError/cdesc-HTTPStreamError.yaml000064400000000326150403627100017426 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::HTTPStreamError
includes: []

instance_methods: []

name: HTTPStreamError
superclass: StreamError
ri/1.8/system/SOAP/Attachment/content-i.yaml000064400000000262150403627110014425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment#content
is_singleton: false
name: content
params: ()
visibility: public
ri/1.8/system/SOAP/Attachment/contentid%3d-i.yaml000064400000000301150403627110015230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment#contentid=
is_singleton: false
name: contentid=
params: (contentid)
visibility: public
ri/1.8/system/SOAP/Attachment/contentid-c.yaml000064400000000271150403627110014734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment::contentid
is_singleton: true
name: contentid
params: (obj)
visibility: public
ri/1.8/system/SOAP/Attachment/new-c.yaml000064400000000302150403627110013531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment::new
is_singleton: true
name: new
params: (string_or_readable = nil)
visibility: public
ri/1.8/system/SOAP/Attachment/write-i.yaml000064400000000261150403627110014104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment#write
is_singleton: false
name: write
params: (out)
visibility: public
ri/1.8/system/SOAP/Attachment/mime_contentid-c.yaml000064400000000303150403627110015737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment::mime_contentid
is_singleton: true
name: mime_contentid
params: (obj)
visibility: public
ri/1.8/system/SOAP/Attachment/save-i.yaml000064400000000264150403627110013713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment#save
is_singleton: false
name: save
params: (filename)
visibility: public
ri/1.8/system/SOAP/Attachment/cdesc-Attachment.yaml000064400000001477150403627110015705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: contenttype
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: io
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: contentid
- !ruby/object:RI::MethodSummary 
  name: mime_contentid
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Attachment
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: content
- !ruby/object:RI::MethodSummary 
  name: contentid
- !ruby/object:RI::MethodSummary 
  name: contentid=
- !ruby/object:RI::MethodSummary 
  name: mime_contentid
- !ruby/object:RI::MethodSummary 
  name: save
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: write
name: Attachment
superclass: Object
ri/1.8/system/SOAP/Attachment/to_s-i.yaml000064400000000254150403627110013720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SOAP/Attachment/contentid-i.yaml000064400000000266150403627110014746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment#contentid
is_singleton: false
name: contentid
params: ()
visibility: public
ri/1.8/system/SOAP/Attachment/mime_contentid-i.yaml000064400000000300150403627110015742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Attachment#mime_contentid
is_singleton: false
name: mime_contentid
params: ()
visibility: public
ri/1.8/system/SOAP/set_basic_auth-i.yaml000064400000000310150403627120013633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#set_basic_auth
is_singleton: false
name: set_basic_auth
params: (uri, user_id, passwd)
visibility: public
ri/1.8/system/SOAP/SOAPUnsignedLong/cdesc-SOAPUnsignedLong.yaml000064400000000426150403627120017655 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPUnsignedLong
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPUnsignedLong
superclass: XSD::XSDUnsignedLong
ri/1.8/system/SOAP/SOAPBase64/cdesc-SOAPBase64.yaml000064400000000713150403627130014735 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Type
  value: QName.new(EncodingNamespace, Base64Literal)
full_name: SOAP::SOAPBase64
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: as_xsd
name: SOAPBase64
superclass: XSD::XSDBase64Binary
ri/1.8/system/SOAP/SOAPBase64/new-c.yaml000064400000000402150403627130013153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Override the definition in SOAPBasetype.
full_name: SOAP::SOAPBase64::new
is_singleton: true
name: new
params: (value = nil)
visibility: public
ri/1.8/system/SOAP/SOAPBase64/as_xsd-i.yaml000064400000000260150403627130013653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPBase64#as_xsd
is_singleton: false
name: as_xsd
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPArray/%5b%5d-i.yaml000064400000000260150403627140013276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#[]
is_singleton: false
name: "[]"
params: (*idxary)
visibility: public
ri/1.8/system/SOAP/SOAPArray/each-i.yaml000064400000000276150403627140013334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (data)
comment: 
full_name: SOAP::SOAPArray#each
is_singleton: false
name: each
params: () {|data| ...}
visibility: public
ri/1.8/system/SOAP/SOAPArray/create_arytype-c.yaml000064400000000316150403627140015441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray::create_arytype
is_singleton: true
name: create_arytype
params: (typename, rank)
visibility: private
ri/1.8/system/SOAP/SOAPArray/to_a-i.yaml000064400000000253150403627140013351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPArray/deep_map-i.yaml000064400000000276150403627140014206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#deep_map
is_singleton: false
name: deep_map
params: (ary, &block)
visibility: public
ri/1.8/system/SOAP/SOAPArray/offset%3d-i.yaml000064400000000264150403627140014213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#offset=
is_singleton: false
name: offset=
params: (var)
visibility: public
ri/1.8/system/SOAP/SOAPArray/traverse-i.yaml000064400000000300150403627140014253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (v)
comment: 
full_name: SOAP::SOAPArray#traverse
is_singleton: false
name: traverse
params: () {|v| ...}
visibility: public
ri/1.8/system/SOAP/SOAPArray/traverse_data-i.yaml000064400000000333150403627140015252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (*v)
comment: 
full_name: SOAP::SOAPArray#traverse_data
is_singleton: false
name: traverse_data
params: (data, rank = 1) {|*v| ...}
visibility: private
ri/1.8/system/SOAP/SOAPArray/position-i.yaml000064400000000263150403627140014274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#position
is_singleton: false
name: position
params: ()
visibility: public
ri/1.8/system/SOAP/SOAPArray/add-i.yaml000064400000000256150403627140013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#add
is_singleton: false
name: add
params: (value)
visibility: public
ri/1.8/system/SOAP/SOAPArray/cdesc-SOAPArray.yaml000064400000003563150403627140015030 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: arytype
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: offset
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: rank
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: size
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: size_fixed
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: sparse
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_arytype
- !ruby/object:RI::MethodSummary 
  name: decode
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse_type
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ITEM_NAME
  value: XSD::QName.new(nil, 'item')
- !ruby/object:RI::Constant 
  comment: 
  name: TypeParseRegexp
  value: Regexp.new('^(.+)\[([\d,]*)\]$')
full_name: SOAP::SOAPArray
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPCompoundtype
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: deep_map
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: offset=
- !ruby/object:RI::MethodSummary 
  name: offsetnext
- !ruby/object:RI::MethodSummary 
  name: position
- !ruby/object:RI::MethodSummary 
  name: ranksize
- !ruby/object:RI::MethodSummary 
  name: replace
- !ruby/object:RI::MethodSummary 
  name: retrieve
- !ruby/object:RI::MethodSummary 
  name: soap2array
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: traverse
- !ruby/object:RI::MethodSummary 
  name: traverse_data
name: SOAPArray
superclass: XSD::NSDBase
ri/1.8/system/SOAP/SOAPArray/include%3f-i.yaml000064400000000266150403627140014354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#include?
is_singleton: false
name: include?
params: (var)
visibility: public
ri/1.8/system/SOAP/SOAPArray/new-c.yaml000064400000000314150403627140013210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray::new
is_singleton: true
name: new
params: (type = nil, rank = 1, arytype = nil)
visibility: public
ri/1.8/system/SOAP/SOAPArray/replace-i.yaml000064400000000302150403627140014035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (ele)
comment: 
full_name: SOAP::SOAPArray#replace
is_singleton: false
name: replace
params: () {|ele| ...}
visibility: public
ri/1.8/system/SOAP/SOAPArray/decode-c.yaml000064400000000371150403627140013645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Module function
full_name: SOAP::SOAPArray::decode
is_singleton: true
name: decode
params: (elename, type, arytype)
visibility: public
ri/1.8/system/SOAP/SOAPArray/parse_type-c.yaml000064400000000276150403627140014601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray::parse_type
is_singleton: true
name: parse_type
params: (string)
visibility: private
ri/1.8/system/SOAP/SOAPArray/retrieve-i.yaml000064400000000272150403627140014255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#retrieve
is_singleton: false
name: retrieve
params: (idxary)
visibility: private
ri/1.8/system/SOAP/SOAPArray/soap2array-i.yaml000064400000000307150403627140014512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (v)
comment: 
full_name: SOAP::SOAPArray#soap2array
is_singleton: false
name: soap2array
params: (ary) {|v| ...}
visibility: public
ri/1.8/system/SOAP/SOAPArray/ranksize-i.yaml000064400000000270150403627140014254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#ranksize
is_singleton: false
name: ranksize
params: (rank)
visibility: private
ri/1.8/system/SOAP/SOAPArray/%5b%5d%3d-i.yaml000064400000000262150403627140013574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#[]=
is_singleton: false
name: "[]="
params: (*idxary)
visibility: public
ri/1.8/system/SOAP/SOAPArray/offsetnext-i.yaml000064400000000270150403627150014614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPArray#offsetnext
is_singleton: false
name: offsetnext
params: ()
visibility: private
ri/1.8/system/SOAP/set_cookie_store-i.yaml000064400000000300150403627150014220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#set_cookie_store
is_singleton: false
name: set_cookie_store
params: (filename)
visibility: public
ri/1.8/system/SOAP/SOAPModuleUtils/cdesc-SOAPModuleUtils.yaml000064400000000564150403627150017407 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mix-in module for SOAP base type classes.
constants: []

full_name: SOAP::SOAPModuleUtils
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: decode
name: SOAPModuleUtils
superclass: 
ri/1.8/system/SOAP/SOAPModuleUtils/decode-i.yaml000064400000000274150403627150015046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPModuleUtils#decode
is_singleton: false
name: decode
params: (elename)
visibility: public
ri/1.8/system/SOAP/NetHttpClient/cdesc-NetHttpClient.yaml000064400000000457150403627150017000 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: SSLEnabled
  value: begin       require 'net/https'
full_name: SOAP::NetHttpClient
includes: []

instance_methods: []

name: NetHttpClient
superclass: Object
ri/1.8/system/SOAP/no_proxy%3f-i.yaml000064400000000256150403627150013045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#no_proxy?
is_singleton: false
name: no_proxy?
params: (uri)
visibility: private
ri/1.8/system/SOAP/Parser/find_encodingstyle-i.yaml000064400000000316150403627150015772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#find_encodingstyle
is_singleton: false
name: find_encodingstyle
params: (ns, attrs)
visibility: private
ri/1.8/system/SOAP/Parser/FormatDecodeError/cdesc-FormatDecodeError.yaml000064400000000341150403627160021667 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Parser::FormatDecodeError
includes: []

instance_methods: []

name: FormatDecodeError
superclass: ParseError
ri/1.8/system/SOAP/Parser/decode_tag_end-i.yaml000064400000000324150403627160015027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#decode_tag_end
is_singleton: false
name: decode_tag_end
params: (ns, node, encodingstyle)
visibility: private
ri/1.8/system/SOAP/Parser/parse-i.yaml000064400000000274150403627160013241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#parse
is_singleton: false
name: parse
params: (string_or_readable)
visibility: public
ri/1.8/system/SOAP/Parser/find_handler-i.yaml000064400000000306150403627160014540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#find_handler
is_singleton: false
name: find_handler
params: (encodingstyle)
visibility: private
ri/1.8/system/SOAP/Parser/cdesc-Parser.yaml000064400000002252150403627160014212 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: allow_unqualified_element
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: decode_typemap
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: default_encodingstyle
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: envelopenamespace
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Parser
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: characters
- !ruby/object:RI::MethodSummary 
  name: charset
- !ruby/object:RI::MethodSummary 
  name: decode_soap_envelope
- !ruby/object:RI::MethodSummary 
  name: decode_tag
- !ruby/object:RI::MethodSummary 
  name: decode_tag_end
- !ruby/object:RI::MethodSummary 
  name: decode_text
- !ruby/object:RI::MethodSummary 
  name: end_element
- !ruby/object:RI::MethodSummary 
  name: find_encodingstyle
- !ruby/object:RI::MethodSummary 
  name: find_handler
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: start_element
name: Parser
superclass: Object
ri/1.8/system/SOAP/Parser/new-c.yaml000064400000000256150403627160012712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser::new
is_singleton: true
name: new
params: (opt = {})
visibility: public
ri/1.8/system/SOAP/Parser/end_element-i.yaml000064400000000272150403627160014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#end_element
is_singleton: false
name: end_element
params: (name)
visibility: public
ri/1.8/system/SOAP/Parser/start_element-i.yaml000064400000000305150403627160014770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#start_element
is_singleton: false
name: start_element
params: (name, attrs)
visibility: public
ri/1.8/system/SOAP/Parser/ParseError/cdesc-ParseError.yaml000064400000000316150403627160017125 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Parser::ParseError
includes: []

instance_methods: []

name: ParseError
superclass: Error
ri/1.8/system/SOAP/Parser/charset-i.yaml000064400000000256150403627160013560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#charset
is_singleton: false
name: charset
params: ()
visibility: public
ri/1.8/system/SOAP/Parser/characters-i.yaml000064400000000270150403627160014242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#characters
is_singleton: false
name: characters
params: (text)
visibility: public
ri/1.8/system/SOAP/Parser/decode_text-i.yaml000064400000000316150403627170014414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#decode_text
is_singleton: false
name: decode_text
params: (ns, text, encodingstyle)
visibility: private
ri/1.8/system/SOAP/Parser/UnexpectedElementError/cdesc-UnexpectedElementError.yaml000064400000000353150403627170024037 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::Parser::UnexpectedElementError
includes: []

instance_methods: []

name: UnexpectedElementError
superclass: ParseError
ri/1.8/system/SOAP/Parser/decode_tag-i.yaml000064400000000333150403627200014174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#decode_tag
is_singleton: false
name: decode_tag
params: (ns, name, attrs, parent, encodingstyle)
visibility: private
ri/1.8/system/SOAP/Parser/decode_soap_envelope-i.yaml000064400000000337150403627200016264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser#decode_soap_envelope
is_singleton: false
name: decode_soap_envelope
params: (ns, ele, attrs, parent)
visibility: private
ri/1.8/system/SOAP/Parser/ParseFrame/NodeContainer/node-i.yaml000064400000000303150403627210017616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser::ParseFrame::NodeContainer#node
is_singleton: false
name: node
params: ()
visibility: public
ri/1.8/system/SOAP/Parser/ParseFrame/NodeContainer/new-c.yaml000064400000000305150403627210017456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser::ParseFrame::NodeContainer::new
is_singleton: true
name: new
params: (node)
visibility: public
ri/1.8/system/SOAP/Parser/ParseFrame/NodeContainer/replace_node-i.yaml000064400000000327150403627210021317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser::ParseFrame::NodeContainer#replace_node
is_singleton: false
name: replace_node
params: (node)
visibility: public
ri/1.8/system/SOAP/Parser/ParseFrame/NodeContainer/cdesc-NodeContainer.yaml000064400000000557150403627210022265 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Parser::ParseFrame::NodeContainer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: node
- !ruby/object:RI::MethodSummary 
  name: replace_node
name: NodeContainer
superclass: Object
ri/1.8/system/SOAP/Parser/ParseFrame/new-c.yaml000064400000000317150403627210014731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser::ParseFrame::new
is_singleton: true
name: new
params: (ns, name, node, encodingstyle)
visibility: public
ri/1.8/system/SOAP/Parser/ParseFrame/node%3d-i.yaml000064400000000272150403627210015367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Parser::ParseFrame#node=
is_singleton: false
name: node=
params: (node)
visibility: public
ri/1.8/system/SOAP/Parser/ParseFrame/cdesc-ParseFrame.yaml000064400000001047150403627220017026 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: node
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: ns
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Parser::ParseFrame
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: node=
name: ParseFrame
superclass: Object
ri/1.8/system/SOAP/SOAPUnsignedByte/cdesc-SOAPUnsignedByte.yaml000064400000000426150403627220017666 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPUnsignedByte
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPUnsignedByte
superclass: XSD::XSDUnsignedByte
ri/1.8/system/SOAP/SOAPDouble/cdesc-SOAPDouble.yaml000064400000000404150403627220015306 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPDouble
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPDouble
superclass: XSD::XSDDouble
ri/1.8/system/SOAP/get_content-i.yaml000064400000000276150403627220013203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP#get_content
is_singleton: false
name: get_content
params: (url, header = {})
visibility: public
ri/1.8/system/SOAP/PostUnavailableError/cdesc-PostUnavailableError.yaml000064400000000344150403627220021725 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::PostUnavailableError
includes: []

instance_methods: []

name: PostUnavailableError
superclass: HTTPStreamError
ri/1.8/system/SOAP/Response/new-c.yaml000064400000000253150403627220013246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Response::new
is_singleton: true
name: new
params: (res)
visibility: public
ri/1.8/system/SOAP/Response/cdesc-Response.yaml000064400000000765150403627220015122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: content
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: contenttype
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: reason
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: status
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::Response
includes: []

instance_methods: []

name: Response
superclass: Object
ri/1.8/system/SOAP/SOAPString/cdesc-SOAPString.yaml000064400000000404150403627230015377 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPString
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPString
superclass: XSD::XSDString
ri/1.8/system/SOAP/SOAPCompoundtype/new-c.yaml000064400000000264150403627230014624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::SOAPCompoundtype::new
is_singleton: true
name: new
params: (*arg)
visibility: public
ri/1.8/system/SOAP/SOAPCompoundtype/cdesc-SOAPCompoundtype.yaml000064400000000624150403627230020043 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: for SOAP compound type
constants: []

full_name: SOAP::SOAPCompoundtype
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPType
- !ruby/object:RI::IncludedModule 
  name: SOAP
instance_methods: []

name: SOAPCompoundtype
superclass: 
ri/1.8/system/SOAP/cdesc-SOAP.yaml000064400000016545150403627230012274 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: connect_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: debug_dev
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: no_proxy
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: protocol_version
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: proxy
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: receive_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: send_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: ssl_config
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: This program is copyrighted free software by NAKAMURA, Hiroshi. 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.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TypeMap
  value: "{   XSD::XSDAnySimpleType::Type => SOAPAnySimpleType,   XSD::XSDString::Type => SOAPString,   XSD::XSDBoolean::Type => SOAPBoolean,   XSD::XSDDecimal::Type => SOAPDecimal,   XSD::XSDFloat::Type => SOAPFloat,   XSD::XSDDouble::Type => SOAPDouble,   XSD::XSDDuration::Type => SOAPDuration,   XSD::XSDDateTime::Type => SOAPDateTime,   XSD::XSDTime::Type => SOAPTime,   XSD::XSDDate::Type => SOAPDate,   XSD::XSDGYearMonth::Type => SOAPGYearMonth,   XSD::XSDGYear::Type => SOAPGYear,   XSD::XSDGMonthDay::Type => SOAPGMonthDay,   XSD::XSDGDay::Type => SOAPGDay,   XSD::XSDGMonth::Type => SOAPGMonth,   XSD::XSDHexBinary::Type => SOAPHexBinary,   XSD::XSDBase64Binary::Type => SOAPBase64,   XSD::XSDAnyURI::Type => SOAPAnyURI,   XSD::XSDQName::Type => SOAPQName,   XSD::XSDInteger::Type => SOAPInteger,   XSD::XSDNonPositiveInteger::Type => SOAPNonPositiveInteger,   XSD::XSDNegativeInteger::Type => SOAPNegativeInteger,   XSD::XSDLong::Type => SOAPLong,   XSD::XSDInt::Type => SOAPInt,   XSD::XSDShort::Type => SOAPShort,   XSD::XSDByte::Type => SOAPByte,   XSD::XSDNonNegativeInteger::Type => SOAPNonNegativeInteger,   XSD::XSDUnsignedLong::Type => SOAPUnsignedLong,   XSD::XSDUnsignedInt::Type => SOAPUnsignedInt,   XSD::XSDUnsignedShort::Type => SOAPUnsignedShort,   XSD::XSDUnsignedByte::Type => SOAPUnsignedByte,   XSD::XSDPositiveInteger::Type => SOAPPositiveInteger,    SOAP::SOAPBase64::Type => SOAPBase64, }"
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION
  value: Version = '1.5.5'
- !ruby/object:RI::Constant 
  comment: 
  name: PropertyName
  value: "'soap/property'"
- !ruby/object:RI::Constant 
  comment: 
  name: EnvelopeNamespace
  value: "'http://schemas.xmlsoap.org/soap/envelope/'"
- !ruby/object:RI::Constant 
  comment: 
  name: EncodingNamespace
  value: "'http://schemas.xmlsoap.org/soap/encoding/'"
- !ruby/object:RI::Constant 
  comment: 
  name: LiteralNamespace
  value: "'http://xml.apache.org/xml-soap/literalxml'"
- !ruby/object:RI::Constant 
  comment: 
  name: NextActor
  value: "'http://schemas.xmlsoap.org/soap/actor/next'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleEnvelope
  value: "'Envelope'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleHeader
  value: "'Header'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleBody
  value: "'Body'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleFault
  value: "'Fault'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultString
  value: "'faultstring'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultActor
  value: "'faultactor'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultCode
  value: "'faultcode'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultDetail
  value: "'detail'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrMustUnderstand
  value: "'mustUnderstand'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrEncodingStyle
  value: "'encodingStyle'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrActor
  value: "'actor'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrRoot
  value: "'root'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrArrayType
  value: "'arrayType'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrOffset
  value: "'offset'"
- !ruby/object:RI::Constant 
  comment: 
  name: AttrPosition
  value: "'position'"
- !ruby/object:RI::Constant 
  comment: 
  name: ValueArray
  value: "'Array'"
- !ruby/object:RI::Constant 
  comment: 
  name: EleEnvelopeName
  value: XSD::QName.new(EnvelopeNamespace, EleEnvelope).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: EleHeaderName
  value: XSD::QName.new(EnvelopeNamespace, EleHeader).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: EleBodyName
  value: XSD::QName.new(EnvelopeNamespace, EleBody).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultName
  value: XSD::QName.new(EnvelopeNamespace, EleFault).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultStringName
  value: XSD::QName.new(nil, EleFaultString).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultActorName
  value: XSD::QName.new(nil, EleFaultActor).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultCodeName
  value: XSD::QName.new(nil, EleFaultCode).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: EleFaultDetailName
  value: XSD::QName.new(nil, EleFaultDetail).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: AttrMustUnderstandName
  value: XSD::QName.new(EnvelopeNamespace, AttrMustUnderstand).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: AttrEncodingStyleName
  value: XSD::QName.new(EnvelopeNamespace, AttrEncodingStyle).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: AttrRootName
  value: XSD::QName.new(EncodingNamespace, AttrRoot).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: AttrArrayTypeName
  value: XSD::QName.new(EncodingNamespace, AttrArrayType).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: AttrOffsetName
  value: XSD::QName.new(EncodingNamespace, AttrOffset).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: AttrPositionName
  value: XSD::QName.new(EncodingNamespace, AttrPosition).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: ValueArrayName
  value: XSD::QName.new(EncodingNamespace, ValueArray).freeze
- !ruby/object:RI::Constant 
  comment: 
  name: Base64Literal
  value: "'base64'"
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPNamespaceTag
  value: "'env'"
- !ruby/object:RI::Constant 
  comment: 
  name: XSDNamespaceTag
  value: "'xsd'"
- !ruby/object:RI::Constant 
  comment: 
  name: XSINamespaceTag
  value: "'xsi'"
- !ruby/object:RI::Constant 
  comment: 
  name: MediaType
  value: "'text/xml'"
- !ruby/object:RI::Constant 
  comment: 
  name: NO_PROXY_HOSTS
  value: "['localhost']"
full_name: SOAP
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_connection
- !ruby/object:RI::MethodSummary 
  name: get_content
- !ruby/object:RI::MethodSummary 
  name: no_proxy?
- !ruby/object:RI::MethodSummary 
  name: post
- !ruby/object:RI::MethodSummary 
  name: proxy=
- !ruby/object:RI::MethodSummary 
  name: reset
- !ruby/object:RI::MethodSummary 
  name: reset_all
- !ruby/object:RI::MethodSummary 
  name: save_cookie_store
- !ruby/object:RI::MethodSummary 
  name: set_basic_auth
- !ruby/object:RI::MethodSummary 
  name: set_cookie_store
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: test_loopback_response
name: SOAP
superclass: 
ri/1.8/system/SOAP/Env/getenv-c.yaml000064400000000255150403627230012702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::Env::getenv
is_singleton: true
name: getenv
params: (name)
visibility: public
ri/1.8/system/SOAP/Env/cdesc-Env.yaml000064400000000666150403627230013007 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: getenv
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: HTTP_PROXY
  value: "use_proxy ? getenv('http_proxy') : nil"
- !ruby/object:RI::Constant 
  comment: 
  name: NO_PROXY
  value: "use_proxy ? getenv('no_proxy') : nil"
full_name: SOAP::Env
includes: []

instance_methods: []

name: Env
superclass: 
ri/1.8/system/SOAP/EmptyResponseError/cdesc-EmptyResponseError.yaml000064400000000326150403627230021176 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::EmptyResponseError
includes: []

instance_methods: []

name: EmptyResponseError
superclass: Error
ri/1.8/system/SOAP/SOAPPositiveInteger/cdesc-SOAPPositiveInteger.yaml000064400000000437150403627230021131 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPPositiveInteger
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPPositiveInteger
superclass: XSD::XSDPositiveInteger
ri/1.8/system/SOAP/SOAPInteger/cdesc-SOAPInteger.yaml000064400000000407150403627230015660 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::SOAPInteger
includes: 
- !ruby/object:RI::IncludedModule 
  name: SOAPBasetype
instance_methods: []

name: SOAPInteger
superclass: XSD::XSDInteger
ri/1.8/system/SOAP/StreamHandler/cdesc-StreamHandler.yaml000064400000000727150403627230017007 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_media_type
- !ruby/object:RI::MethodSummary 
  name: parse_media_type
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RUBY_VERSION_STRING
  value: "\"ruby #{ RUBY_VERSION } (#{ RUBY_RELEASE_DATE }) [#{ RUBY_PLATFORM }]\""
full_name: SOAP::StreamHandler
includes: []

instance_methods: []

name: StreamHandler
superclass: Object
ri/1.8/system/SOAP/StreamHandler/create_media_type-c.yaml000064400000000320150403627230017047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::StreamHandler::create_media_type
is_singleton: true
name: create_media_type
params: (charset)
visibility: public
ri/1.8/system/SOAP/StreamHandler/ConnectionData/cdesc-ConnectionData.yaml000064400000001274150403627230022036 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: is_fault
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: receive_contenttype
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: receive_string
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: send_contenttype
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: send_string
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::StreamHandler::ConnectionData
includes: []

instance_methods: []

name: ConnectionData
superclass: Object
ri/1.8/system/SOAP/StreamHandler/ConnectionData/new-c.yaml000064400000000316150403627240017074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::StreamHandler::ConnectionData::new
is_singleton: true
name: new
params: (send_string = nil)
visibility: public
ri/1.8/system/SOAP/StreamHandler/parse_media_type-c.yaml000064400000000312150403627240016720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::StreamHandler::parse_media_type
is_singleton: true
name: parse_media_type
params: (str)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/add_handler-c.yaml000064400000000307150403627250017233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler::add_handler
is_singleton: true
name: add_handler
params: ()
visibility: private
ri/1.8/system/SOAP/EncodingStyle/Handler/decode_prologue-i.yaml000064400000000316150403627250020153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#decode_prologue
is_singleton: false
name: decode_prologue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/decode_tag_end-i.yaml000064400000000324150403627250017717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#decode_tag_end
is_singleton: false
name: decode_tag_end
params: (ns, name)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/decode_epilogue-i.yaml000064400000000316150403627250020130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#decode_epilogue
is_singleton: false
name: decode_epilogue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/uri-c.yaml000064400000000266150403627260015612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler::uri
is_singleton: true
name: uri
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/new-c.yaml000064400000000275150403627260015604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler::new
is_singleton: true
name: new
params: (charset)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/encode_prologue-i.yaml000064400000000316150403627260020166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#encode_prologue
is_singleton: false
name: encode_prologue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/encode_data_end-i.yaml000064400000000351150403627260020070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#encode_data_end
is_singleton: false
name: encode_data_end
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/decode_typemap%3d-i.yaml000064400000000332150403627260020271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#decode_typemap=
is_singleton: false
name: decode_typemap=
params: (definedtypes)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/encode_epilogue-i.yaml000064400000000316150403627270020144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#encode_epilogue
is_singleton: false
name: encode_epilogue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/handler-c.yaml000064400000000301150403627270016417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler::handler
is_singleton: true
name: handler
params: (uri)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/each-c.yaml000064400000000315150403627270015707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (value)
comment: 
full_name: SOAP::EncodingStyle::Handler::each
is_singleton: true
name: each
params: () {|value| ...}
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/cdesc-Handler.yaml000064400000002204150403627270017222 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: charset
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: generate_explicit_type
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_handler
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: handler
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: uri
comment: 
constants: []

full_name: SOAP::EncodingStyle::Handler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: decode_epilogue
- !ruby/object:RI::MethodSummary 
  name: decode_prologue
- !ruby/object:RI::MethodSummary 
  name: decode_tag
- !ruby/object:RI::MethodSummary 
  name: decode_tag_end
- !ruby/object:RI::MethodSummary 
  name: decode_text
- !ruby/object:RI::MethodSummary 
  name: decode_typemap=
- !ruby/object:RI::MethodSummary 
  name: encode_data
- !ruby/object:RI::MethodSummary 
  name: encode_data_end
- !ruby/object:RI::MethodSummary 
  name: encode_epilogue
- !ruby/object:RI::MethodSummary 
  name: encode_prologue
name: Handler
superclass: Object
ri/1.8/system/SOAP/EncodingStyle/Handler/encode_data-i.yaml000064400000000547150403627270017252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::VERB 
  body: " encode interface.\n"
- !ruby/struct:SM::Flow::P 
  body: Returns a XML instance as a string.
full_name: SOAP::EncodingStyle::Handler#encode_data
is_singleton: false
name: encode_data
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/EncodingStyleError/cdesc-EncodingStyleError.yaml000064400000000356150403627270025215 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::EncodingStyle::Handler::EncodingStyleError
includes: []

instance_methods: []

name: EncodingStyleError
superclass: Error
ri/1.8/system/SOAP/EncodingStyle/Handler/decode_text-i.yaml000064400000000316150403627300017277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::Handler#decode_text
is_singleton: false
name: decode_text
params: (ns, text)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/Handler/decode_tag-i.yaml000064400000000523150403627300017066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::VERB 
  body: " decode interface.\n"
- !ruby/struct:SM::Flow::P 
  body: Returns SOAP/OM data.
full_name: SOAP::EncodingStyle::Handler#decode_tag
is_singleton: false
name: decode_tag
params: (ns, name, attrs, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/cdesc-EncodingStyle.yaml000064400000000307150403627300017033 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SOAP::EncodingStyle
includes: []

instance_methods: []

name: EncodingStyle
superclass: 
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_basetype-i.yaml000064400000000341150403627300020610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_basetype
is_singleton: false
name: decode_basetype
params: (klass, elename)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/cdesc-SOAPHandler.yaml000064400000003726150403627300020374 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Namespace
  value: SOAP::EncodingNamespace
- !ruby/object:RI::Constant 
  comment: 
  name: NilLiteralMap
  value: "{     'true' => true,     '1' => true,     'false' => false,     '0' => false"
- !ruby/object:RI::Constant 
  comment: 
  name: RootLiteralMap
  value: "{     '1' => 1,     '0' => 0"
full_name: SOAP::EncodingStyle::SOAPHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: content_ranksize
- !ruby/object:RI::MethodSummary 
  name: content_typename
- !ruby/object:RI::MethodSummary 
  name: create_arytype
- !ruby/object:RI::MethodSummary 
  name: decode_arypos
- !ruby/object:RI::MethodSummary 
  name: decode_attr_value
- !ruby/object:RI::MethodSummary 
  name: decode_attrs
- !ruby/object:RI::MethodSummary 
  name: decode_basetype
- !ruby/object:RI::MethodSummary 
  name: decode_defined_complextype
- !ruby/object:RI::MethodSummary 
  name: decode_defined_simpletype
- !ruby/object:RI::MethodSummary 
  name: decode_definedtype
- !ruby/object:RI::MethodSummary 
  name: decode_epilogue
- !ruby/object:RI::MethodSummary 
  name: decode_parent
- !ruby/object:RI::MethodSummary 
  name: decode_prologue
- !ruby/object:RI::MethodSummary 
  name: decode_resolve_id
- !ruby/object:RI::MethodSummary 
  name: decode_tag
- !ruby/object:RI::MethodSummary 
  name: decode_tag_by_type
- !ruby/object:RI::MethodSummary 
  name: decode_tag_by_wsdl
- !ruby/object:RI::MethodSummary 
  name: decode_tag_end
- !ruby/object:RI::MethodSummary 
  name: decode_text
- !ruby/object:RI::MethodSummary 
  name: decode_textbuf
- !ruby/object:RI::MethodSummary 
  name: encode_attr_value
- !ruby/object:RI::MethodSummary 
  name: encode_attrs
- !ruby/object:RI::MethodSummary 
  name: encode_data
- !ruby/object:RI::MethodSummary 
  name: encode_data_end
name: SOAPHandler
superclass: Handler
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/SOAPUnknown/cdesc-SOAPUnknown.yaml000064400000001171150403627300022570 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definedtype
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: extraattr
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::EncodingStyle::SOAPHandler::SOAPUnknown
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: as_nil
- !ruby/object:RI::MethodSummary 
  name: as_string
- !ruby/object:RI::MethodSummary 
  name: as_struct
name: SOAPUnknown
superclass: SOAPTemporalObject
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/SOAPUnknown/as_nil-i.yaml000064400000000315150403627300021061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler::SOAPUnknown#as_nil
is_singleton: false
name: as_nil
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/SOAPUnknown/as_struct-i.yaml000064400000000323150403627300021622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler::SOAPUnknown#as_struct
is_singleton: false
name: as_struct
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/SOAPUnknown/new-c.yaml000064400000000350150403627300020376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler::SOAPUnknown::new
is_singleton: true
name: new
params: (handler, elename, type, extraattr)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/SOAPUnknown/as_string-i.yaml000064400000000323150403627300021604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler::SOAPUnknown#as_string
is_singleton: false
name: as_string
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_prologue-i.yaml000064400000000322150403627300020627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_prologue
is_singleton: false
name: decode_prologue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_tag_by_wsdl-i.yaml000064400000000414150403627300021273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_tag_by_wsdl
is_singleton: false
name: decode_tag_by_wsdl
params: (ns, elename, typestr, parent, arytypestr, extraattr)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_tag_end-i.yaml000064400000000330150403627310020374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_tag_end
is_singleton: false
name: decode_tag_end
params: (ns, node)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/SOAPTemporalObject/cdesc-SOAPTemporalObject.yaml000064400000001125150403627310025316 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: id
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: position
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: root
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: decode interface.
constants: []

full_name: SOAP::EncodingStyle::SOAPHandler::SOAPTemporalObject
includes: []

instance_methods: []

name: SOAPTemporalObject
superclass: Object
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/SOAPTemporalObject/new-c.yaml000064400000000316150403627310021654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler::SOAPTemporalObject::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_tag_by_type-i.yaml000064400000000414150403627310021304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_tag_by_type
is_singleton: false
name: decode_tag_by_type
params: (ns, elename, typestr, parent, arytypestr, extraattr)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_epilogue-i.yaml000064400000000322150403627310020605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_epilogue
is_singleton: false
name: decode_epilogue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_defined_simpletype-i.yaml000064400000000415150403627310022650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_defined_simpletype
is_singleton: false
name: decode_defined_simpletype
params: (elename, typename, typedef, arytypestr)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_textbuf-i.yaml000064400000000325150403627310020460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_textbuf
is_singleton: false
name: decode_textbuf
params: (node)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/new-c.yaml000064400000000307150403627310016257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler::new
is_singleton: true
name: new
params: (charset = nil)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/encode_data_end-i.yaml000064400000000355150403627310020553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#encode_data_end
is_singleton: false
name: encode_data_end
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_definedtype-i.yaml000064400000000377150403627310021306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_definedtype
is_singleton: false
name: decode_definedtype
params: (elename, typename, typedef, arytypestr)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_attrs-i.yaml000064400000000326150403627310020135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_attrs
is_singleton: false
name: decode_attrs
params: (ns, attrs)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/content_typename-i.yaml000064400000000335150403627310021051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#content_typename
is_singleton: false
name: content_typename
params: (typename)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_parent-i.yaml000064400000000332150403627310020266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_parent
is_singleton: false
name: decode_parent
params: (parent, node)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_arypos-i.yaml000064400000000327150403627310020316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_arypos
is_singleton: false
name: decode_arypos
params: (position)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/encode_data-i.yaml000064400000000433150403627310017722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: encode interface.
full_name: SOAP::EncodingStyle::SOAPHandler#encode_data
is_singleton: false
name: encode_data
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/encode_attrs-i.yaml000064400000000350150403627310020144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#encode_attrs
is_singleton: false
name: encode_attrs
params: (generator, ns, data, parent)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_text-i.yaml000064400000000322150403627310017760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_text
is_singleton: false
name: decode_text
params: (ns, text)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_resolve_id-i.yaml000064400000000327150403627310021134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_resolve_id
is_singleton: false
name: decode_resolve_id
params: ()
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/content_ranksize-i.yaml000064400000000335150403627310021055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#content_ranksize
is_singleton: false
name: content_ranksize
params: (typename)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_tag-i.yaml000064400000000342150403627310017551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_tag
is_singleton: false
name: decode_tag
params: (ns, elename, attrs, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/create_arytype-i.yaml000064400000000331150403627310020511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#create_arytype
is_singleton: false
name: create_arytype
params: (ns, data)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_defined_complextype-i.yaml000064400000000417150403627320023031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_defined_complextype
is_singleton: false
name: decode_defined_complextype
params: (elename, typename, typedef, arytypestr)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/encode_attr_value-i.yaml000064400000000362150403627320021161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#encode_attr_value
is_singleton: false
name: encode_attr_value
params: (generator, ns, qname, value)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/SOAPHandler/decode_attr_value-i.yaml000064400000000347150403627320021152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::SOAPHandler#decode_attr_value
is_singleton: false
name: decode_attr_value
params: (ns, qname, value)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/cdesc-ASPDotNetHandler.yaml000064400000001544150403627320022370 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Namespace
  value: "'http://tempuri.org/ASP.NET'"
full_name: SOAP::EncodingStyle::ASPDotNetHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: decode_epilogue
- !ruby/object:RI::MethodSummary 
  name: decode_parent
- !ruby/object:RI::MethodSummary 
  name: decode_prologue
- !ruby/object:RI::MethodSummary 
  name: decode_tag
- !ruby/object:RI::MethodSummary 
  name: decode_tag_end
- !ruby/object:RI::MethodSummary 
  name: decode_text
- !ruby/object:RI::MethodSummary 
  name: decode_textbuf
- !ruby/object:RI::MethodSummary 
  name: encode_data
- !ruby/object:RI::MethodSummary 
  name: encode_data_end
name: ASPDotNetHandler
superclass: Handler
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/SOAPUnknown/cdesc-SOAPUnknown.yaml000064400000000667150403627320023602 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: as_nil
- !ruby/object:RI::MethodSummary 
  name: as_string
- !ruby/object:RI::MethodSummary 
  name: as_struct
name: SOAPUnknown
superclass: SOAPTemporalObject
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/SOAPUnknown/as_nil-i.yaml000064400000000322150403627320022060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown#as_nil
is_singleton: false
name: as_nil
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/SOAPUnknown/as_struct-i.yaml000064400000000330150403627320022621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown#as_struct
is_singleton: false
name: as_struct
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/SOAPUnknown/new-c.yaml000064400000000334150403627320021401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown::new
is_singleton: true
name: new
params: (handler, elename)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/SOAPUnknown/as_string-i.yaml000064400000000330150403627320022603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler::SOAPUnknown#as_string
is_singleton: false
name: as_string
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/decode_prologue-i.yaml000064400000000327150403627320021635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#decode_prologue
is_singleton: false
name: decode_prologue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/decode_tag_end-i.yaml000064400000000335150403627320021401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#decode_tag_end
is_singleton: false
name: decode_tag_end
params: (ns, node)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/SOAPTemporalObject/cdesc-SOAPTemporalObject.yaml000064400000000630150403627330026317 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: decode interface.
constants: []

full_name: SOAP::EncodingStyle::ASPDotNetHandler::SOAPTemporalObject
includes: []

instance_methods: []

name: SOAPTemporalObject
superclass: Object
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/SOAPTemporalObject/new-c.yaml000064400000000323150403627330022653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler::SOAPTemporalObject::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/decode_epilogue-i.yaml000064400000000327150403627330021613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#decode_epilogue
is_singleton: false
name: decode_epilogue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/decode_textbuf-i.yaml000064400000000332150403627330021457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#decode_textbuf
is_singleton: false
name: decode_textbuf
params: (node)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/new-c.yaml000064400000000314150403627330017256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler::new
is_singleton: true
name: new
params: (charset = nil)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/encode_data_end-i.yaml000064400000000362150403627330021552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#encode_data_end
is_singleton: false
name: encode_data_end
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/decode_parent-i.yaml000064400000000337150403627330021274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#decode_parent
is_singleton: false
name: decode_parent
params: (parent, node)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/encode_data-i.yaml000064400000000440150403627330020721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: encode interface.
full_name: SOAP::EncodingStyle::ASPDotNetHandler#encode_data
is_singleton: false
name: encode_data
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/decode_text-i.yaml000064400000000327150403627330020766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#decode_text
is_singleton: false
name: decode_text
params: (ns, text)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/ASPDotNetHandler/decode_tag-i.yaml000064400000000347150403627330020557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::ASPDotNetHandler#decode_tag
is_singleton: false
name: decode_tag
params: (ns, elename, attrs, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/SOAPUnknown/cdesc-SOAPUnknown.yaml000064400000000666150403627330023435 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SOAP::EncodingStyle::LiteralHandler::SOAPUnknown
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: as_element
- !ruby/object:RI::MethodSummary 
  name: as_nil
- !ruby/object:RI::MethodSummary 
  name: as_string
name: SOAPUnknown
superclass: SOAPTemporalObject
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/SOAPUnknown/as_nil-i.yaml000064400000000320150403627330021712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler::SOAPUnknown#as_nil
is_singleton: false
name: as_nil
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/SOAPUnknown/new-c.yaml000064400000000345150403627330021237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler::SOAPUnknown::new
is_singleton: true
name: new
params: (handler, elename, extraattr)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/SOAPUnknown/as_element-i.yaml000064400000000330150403627330022562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler::SOAPUnknown#as_element
is_singleton: false
name: as_element
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/SOAPUnknown/as_string-i.yaml000064400000000326150403627330022444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler::SOAPUnknown#as_string
is_singleton: false
name: as_string
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_prologue-i.yaml000064400000000325150403627330021467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_prologue
is_singleton: false
name: decode_prologue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_tag_end-i.yaml000064400000000333150403627330021233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_tag_end
is_singleton: false
name: decode_tag_end
params: (ns, node)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/SOAPTemporalObject/cdesc-SOAPTemporalObject.yaml000064400000000626150403627340026160 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: decode interface.
constants: []

full_name: SOAP::EncodingStyle::LiteralHandler::SOAPTemporalObject
includes: []

instance_methods: []

name: SOAPTemporalObject
superclass: Object
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/SOAPTemporalObject/new-c.yaml000064400000000321150403627340022505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler::SOAPTemporalObject::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_epilogue-i.yaml000064400000000325150403627340021445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_epilogue
is_singleton: false
name: decode_epilogue
params: ()
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_textbuf-i.yaml000064400000000330150403627340021311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_textbuf
is_singleton: false
name: decode_textbuf
params: (node)
visibility: private
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/new-c.yaml000064400000000312150403627340017110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler::new
is_singleton: true
name: new
params: (charset = nil)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/cdesc-LiteralHandler.yaml000064400000001617150403627340022061 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Namespace
  value: SOAP::LiteralNamespace
full_name: SOAP::EncodingStyle::LiteralHandler
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: decode_attrs
- !ruby/object:RI::MethodSummary 
  name: decode_epilogue
- !ruby/object:RI::MethodSummary 
  name: decode_parent
- !ruby/object:RI::MethodSummary 
  name: decode_prologue
- !ruby/object:RI::MethodSummary 
  name: decode_tag
- !ruby/object:RI::MethodSummary 
  name: decode_tag_end
- !ruby/object:RI::MethodSummary 
  name: decode_text
- !ruby/object:RI::MethodSummary 
  name: decode_textbuf
- !ruby/object:RI::MethodSummary 
  name: encode_data
- !ruby/object:RI::MethodSummary 
  name: encode_data_end
name: LiteralHandler
superclass: Handler
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/encode_data_end-i.yaml000064400000000360150403627340021404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#encode_data_end
is_singleton: false
name: encode_data_end
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_attrs-i.yaml000064400000000330150403627340020765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_attrs
is_singleton: false
name: decode_attrs
params: (ns, attrs)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_parent-i.yaml000064400000000335150403627350021127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_parent
is_singleton: false
name: decode_parent
params: (parent, node)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/encode_data-i.yaml000064400000000436150403627350020563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: encode interface.
full_name: SOAP::EncodingStyle::LiteralHandler#encode_data
is_singleton: false
name: encode_data
params: (generator, ns, data, parent)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_text-i.yaml000064400000000325150403627350020621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_text
is_singleton: false
name: decode_text
params: (ns, text)
visibility: public
ri/1.8/system/SOAP/EncodingStyle/LiteralHandler/decode_tag-i.yaml000064400000000345150403627350020412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOAP::EncodingStyle::LiteralHandler#decode_tag
is_singleton: false
name: decode_tag
params: (ns, elename, attrs, parent)
visibility: public
ri/1.8/system/SizedQueue/deq-i.yaml000064400000000336150403627350012765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pop"
full_name: SizedQueue#deq
is_singleton: false
name: deq
params: (*args)
visibility: public
ri/1.8/system/SizedQueue/cdesc-SizedQueue.yaml000064400000001603150403627350015126 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: This class represents queues of specified size capacity. The push operation may be blocked if the capacity is full.
- !ruby/struct:SM::Flow::P 
  body: See Queue for an example of how a SizedQueue works.
constants: []

full_name: SizedQueue
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: deq
- !ruby/object:RI::MethodSummary 
  name: enq
- !ruby/object:RI::MethodSummary 
  name: max
- !ruby/object:RI::MethodSummary 
  name: max=
- !ruby/object:RI::MethodSummary 
  name: num_waiting
- !ruby/object:RI::MethodSummary 
  name: pop
- !ruby/object:RI::MethodSummary 
  name: push
- !ruby/object:RI::MethodSummary 
  name: shift
name: SizedQueue
superclass: Queue
ri/1.8/system/SizedQueue/max-i.yaml000064400000000357150403627350013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the maximum size of the queue.
full_name: SizedQueue#max
is_singleton: false
name: max
params: ()
visibility: public
ri/1.8/system/SizedQueue/enq-i.yaml000064400000000335150403627360012777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #push"
full_name: SizedQueue#enq
is_singleton: false
name: enq
params: (obj)
visibility: public
ri/1.8/system/SizedQueue/pop-i.yaml000064400000000541150403627360013011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: shift
- !ruby/object:RI::AliasName 
  name: deq
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieves data from the queue and runs a waiting thread, if any.
full_name: SizedQueue#pop
is_singleton: false
name: pop
params: (*args)
visibility: public
ri/1.8/system/SizedQueue/new-c.yaml000064400000000415150403627360012776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a fixed-length queue with a maximum size of <tt>max</tt>.
full_name: SizedQueue::new
is_singleton: true
name: new
params: (max)
visibility: public
ri/1.8/system/SizedQueue/push-i.yaml000064400000000616150403627360013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "<<"
- !ruby/object:RI::AliasName 
  name: enq
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pushes <tt>obj</tt> to the queue. If there is no space left in the queue, waits until space becomes available.
full_name: SizedQueue#push
is_singleton: false
name: push
params: (obj)
visibility: public
ri/1.8/system/SizedQueue/%3c%3c-i.yaml000064400000000335150403627360013061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #push"
full_name: SizedQueue#<<
is_singleton: false
name: "<<"
params: (obj)
visibility: public
ri/1.8/system/SizedQueue/shift-i.yaml000064400000000342150403627360013327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pop"
full_name: SizedQueue#shift
is_singleton: false
name: shift
params: (*args)
visibility: public
ri/1.8/system/SizedQueue/max%3d-i.yaml000064400000000361150403627360013274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the maximum size of the queue.
full_name: SizedQueue#max=
is_singleton: false
name: max=
params: (max)
visibility: public
ri/1.8/system/SizedQueue/num_waiting-i.yaml000064400000000414150403627360014533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of threads waiting on the queue.
full_name: SizedQueue#num_waiting
is_singleton: false
name: num_waiting
params: ()
visibility: public
ri/1.8/system/EOFError/cdesc-EOFError.yaml000064400000007723150403627370014041 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>IO</tt> is the basis for all input and output in Ruby. An I/O stream may be <em>duplexed</em> (that is, bidirectional), and so may use more than one native operating system stream.
- !ruby/struct:SM::Flow::P 
  body: Many of the examples in this section use class <tt>File</tt>, the only standard subclass of <tt>IO</tt>. The two classes are closely associated.
- !ruby/struct:SM::Flow::P 
  body: As used in this section, <em>portname</em> may take any of the following forms.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: A plain string represents a filename suitable for the underlying operating system.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: A string starting with ``<tt>|</tt>'' indicates a subprocess. The remainder of the string following the ``<tt>|</tt>'' is invoked as a process with appropriate input/output channels connected to it.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: A string equal to ``<tt>|-</tt>'' will create another Ruby instance as a subprocess.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Ruby will convert pathnames between different operating system conventions if possible. For instance, on a Windows system the filename ``<tt>/gumby/ruby/test.rb</tt>'' will be opened as ``<tt>\\gumby\\ruby\\test.rb</tt>''. When specifying a Windows-style filename in a Ruby string, remember to escape the backslashes:"
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;c:\\gumby\\ruby\\test.rb&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: Our examples here will use the Unix-style forward slashes; <tt>File::SEPARATOR</tt> can be used to get the platform-specific separator character.
- !ruby/struct:SM::Flow::P 
  body: I/O ports may be opened in any one of several different modes, which are shown in this section as <em>mode</em>. The mode may either be a Fixnum or a String. If numeric, it should be one of the operating system specific constants (O_RDONLY, O_WRONLY, O_RDWR, O_APPEND and so on). See man open(2) for more information.
- !ruby/struct:SM::Flow::P 
  body: If the mode is given as a String, it must be one of the values listed in the following table.
- !ruby/struct:SM::Flow::VERB 
  body: "  Mode |  Meaning\n  -----+--------------------------------------------------------\n  &quot;r&quot;  |  Read-only, starts at beginning of file  (default mode).\n  -----+--------------------------------------------------------\n  &quot;r+&quot; |  Read-write, starts at beginning of file.\n  -----+--------------------------------------------------------\n  &quot;w&quot;  |  Write-only, truncates existing file\n       |  to zero length or creates a new file for writing.\n  -----+--------------------------------------------------------\n  &quot;w+&quot; |  Read-write, truncates existing file to zero length\n       |  or creates a new file for reading and writing.\n  -----+--------------------------------------------------------\n  &quot;a&quot;  |  Write-only, starts at end of file if file exists,\n       |  otherwise creates a new file for writing.\n  -----+--------------------------------------------------------\n  &quot;a+&quot; |  Read-write, starts at end of file if file exists,\n       |  otherwise creates a new file for reading and\n       |  writing.\n  -----+--------------------------------------------------------\n   &quot;b&quot; |  (DOS/Windows only) Binary file mode (may appear with\n       |  any of the key letters listed above).\n"
- !ruby/struct:SM::Flow::P 
  body: The global constant ARGF (also accessible as $&lt;) provides an IO-like stream which allows access to all files mentioned on the command line (or STDIN if no files are mentioned). ARGF provides the methods <tt>#path</tt> and <tt>#filename</tt> to access the name of the file currently being read.
constants: []

full_name: EOFError
includes: []

instance_methods: []

name: EOFError
superclass: IOError
ri/1.8/system/Integer/pred-i.yaml000064400000000565150403627370012466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <tt>Integer</tt> equal to <em>int</em> - 1.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.pred      #=&gt; 0\n   (-1).pred   #=&gt; -2\n"
full_name: Integer#pred
is_singleton: false
name: pred
params: |
  int.pred    => integer

visibility: public
ri/1.8/system/Integer/odd%3f-i.yaml000064400000000433150403627370012572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>int</em> is an odd number.
full_name: Integer#odd?
is_singleton: false
name: odd?
params: |
  int.odd? -> true or false

visibility: public
ri/1.8/system/Integer/chr-i.yaml000064400000000710150403627370012300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string containing the ASCII character represented by the receiver's value.
- !ruby/struct:SM::Flow::VERB 
  body: "   65.chr    #=&gt; &quot;A&quot;\n   ?a.chr    #=&gt; &quot;a&quot;\n   230.chr   #=&gt; &quot;\\346&quot;\n"
full_name: Integer#chr
is_singleton: false
name: chr
params: |
  int.chr    => string

visibility: public
ri/1.8/system/Integer/integer%3f-i.yaml000064400000000404150403627370013457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Always returns <tt>true</tt>.
full_name: Integer#integer?
is_singleton: false
name: integer?
params: |
  int.integer? -> true

visibility: public
ri/1.8/system/Integer/to_i-i.yaml000064400000000657150403627370012470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: As <em>int</em> is already an <tt>Integer</tt>, all these methods simply return the receiver.
full_name: Integer#to_i
is_singleton: false
name: to_i
params: |
  int.to_i      => int
  int.to_int    => int
  int.floor     => int
  int.ceil      => int
  int.round     => int
  int.truncate  => int

visibility: public
ri/1.8/system/Integer/cdesc-Integer.yaml000064400000003655150403627370013765 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: from_prime_division
- !ruby/object:RI::MethodSummary 
  name: induced_from
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Integer</tt> is the basis for the two concrete classes that hold whole numbers, <tt>Bignum</tt> and <tt>Fixnum</tt>.
constants: []

full_name: Integer
includes: 
- !ruby/object:RI::IncludedModule 
  name: Precision
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ceil
- !ruby/object:RI::MethodSummary 
  name: chr
- !ruby/object:RI::MethodSummary 
  name: denominator
- !ruby/object:RI::MethodSummary 
  name: denominator
- !ruby/object:RI::MethodSummary 
  name: downto
- !ruby/object:RI::MethodSummary 
  name: even?
- !ruby/object:RI::MethodSummary 
  name: floor
- !ruby/object:RI::MethodSummary 
  name: gcd
- !ruby/object:RI::MethodSummary 
  name: gcd
- !ruby/object:RI::MethodSummary 
  name: gcd2
- !ruby/object:RI::MethodSummary 
  name: gcdlcm
- !ruby/object:RI::MethodSummary 
  name: integer?
- !ruby/object:RI::MethodSummary 
  name: lcm
- !ruby/object:RI::MethodSummary 
  name: lcm
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: numerator
- !ruby/object:RI::MethodSummary 
  name: numerator
- !ruby/object:RI::MethodSummary 
  name: odd?
- !ruby/object:RI::MethodSummary 
  name: ord
- !ruby/object:RI::MethodSummary 
  name: pred
- !ruby/object:RI::MethodSummary 
  name: prime_division
- !ruby/object:RI::MethodSummary 
  name: round
- !ruby/object:RI::MethodSummary 
  name: succ
- !ruby/object:RI::MethodSummary 
  name: times
- !ruby/object:RI::MethodSummary 
  name: to_i
- !ruby/object:RI::MethodSummary 
  name: to_int
- !ruby/object:RI::MethodSummary 
  name: to_r
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: truncate
- !ruby/object:RI::MethodSummary 
  name: upto
name: Integer
superclass: Numeric
ri/1.8/system/Integer/numerator-i.yaml000064400000000255150403627370013544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Integer#numerator
is_singleton: false
name: numerator
params: ()
visibility: public
ri/1.8/system/Integer/to_yaml-i.yaml000064400000000264150403627370013174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Integer#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Integer/upto-i.yaml000064400000001044150403627370012514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates <em>block</em>, passing in integer values from <em>int</em> up to and including <em>limit</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   5.upto(10) { |i| print i, &quot; &quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   5 6 7 8 9 10\n"
full_name: Integer#upto
is_singleton: false
name: upto
params: |
  int.upto(limit) {|i| block }     => int

visibility: public
ri/1.8/system/Integer/prime_division-i.yaml000064400000000267150403627370014553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Integer#prime_division
is_singleton: false
name: prime_division
params: ()
visibility: public
ri/1.8/system/Integer/ord-i.yaml000064400000000730150403627370012312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the int itself.
- !ruby/struct:SM::Flow::VERB 
  body: "   ?a.ord    #=&gt; 97\n"
- !ruby/struct:SM::Flow::P 
  body: This method is intended for compatibility to character constant in Ruby 1.9. For example, ?a.ord returns 97 both in 1.8 and 1.9.
full_name: Integer#ord
is_singleton: false
name: ord
params: |
  int.ord    => int

visibility: public
ri/1.8/system/Integer/gcdlcm-i.yaml000064400000000770150403627400012755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the GCD <em>and</em> the LCM (see #gcd and #lcm) of the two arguments (<tt>self</tt> and <tt>other</tt>). This is more efficient than calculating them separately."
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  6.gcdlcm 9     # -&gt; [3, 18]\n"
full_name: Integer#gcdlcm
is_singleton: false
name: gcdlcm
params: (other)
visibility: public
ri/1.8/system/Integer/next-i.yaml000064400000000615150403627400012500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <tt>Integer</tt> equal to <em>int</em> + 1.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.next      #=&gt; 2\n   (-1).next   #=&gt; 0\n"
full_name: Integer#next
is_singleton: false
name: next
params: |
  int.next    => integer
  int.succ    => integer

visibility: public
ri/1.8/system/Integer/gcd2-i.yaml000064400000000246150403627400012341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Integer#gcd2
is_singleton: false
name: gcd2
params: (int)
visibility: public
ri/1.8/system/Integer/lcm-i.yaml000064400000000711150403627400012272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <em>lowest common multiple</em> (LCM) of the two arguments (<tt>self</tt> and <tt>other</tt>).
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  6.lcm 7        # -&gt; 42\n  6.lcm 9        # -&gt; 18\n"
full_name: Integer#lcm
is_singleton: false
name: lcm
params: (other)
visibility: public
ri/1.8/system/Integer/ceil-i.yaml000064400000000657150403627400012444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: As <em>int</em> is already an <tt>Integer</tt>, all these methods simply return the receiver.
full_name: Integer#ceil
is_singleton: false
name: ceil
params: |
  int.to_i      => int
  int.to_int    => int
  int.floor     => int
  int.ceil      => int
  int.round     => int
  int.truncate  => int

visibility: public
ri/1.8/system/Integer/denominator-i.yaml000064400000000261150403627400014036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Integer#denominator
is_singleton: false
name: denominator
params: ()
visibility: public
ri/1.8/system/Integer/times-i.yaml000064400000001022150403627400012634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates block <em>int</em> times, passing in values from zero to <em>int</em> - 1.
- !ruby/struct:SM::Flow::VERB 
  body: "   5.times do |i|\n     print i, &quot; &quot;\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   0 1 2 3 4\n"
full_name: Integer#times
is_singleton: false
name: times
params: |
  int.times {|i| block }     => int

visibility: public
ri/1.8/system/Integer/truncate-i.yaml000064400000000667150403627400013356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: As <em>int</em> is already an <tt>Integer</tt>, all these methods simply return the receiver.
full_name: Integer#truncate
is_singleton: false
name: truncate
params: |
  int.to_i      => int
  int.to_int    => int
  int.floor     => int
  int.ceil      => int
  int.round     => int
  int.truncate  => int

visibility: public
ri/1.8/system/Integer/to_int-i.yaml000064400000000663150403627400013021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: As <em>int</em> is already an <tt>Integer</tt>, all these methods simply return the receiver.
full_name: Integer#to_int
is_singleton: false
name: to_int
params: |
  int.to_i      => int
  int.to_int    => int
  int.floor     => int
  int.ceil      => int
  int.round     => int
  int.truncate  => int

visibility: public
ri/1.8/system/Integer/succ-i.yaml000064400000000615150403627400012457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <tt>Integer</tt> equal to <em>int</em> + 1.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.next      #=&gt; 2\n   (-1).next   #=&gt; 0\n"
full_name: Integer#succ
is_singleton: false
name: succ
params: |
  int.next    => integer
  int.succ    => integer

visibility: public
ri/1.8/system/Integer/even%3f-i.yaml000064400000000437150403627400012757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>int</em> is an even number.
full_name: Integer#even?
is_singleton: false
name: even?
params: |
  int.even? -> true or false

visibility: public
ri/1.8/system/Integer/to_r-i.yaml000064400000000372150403627400012465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a Rational representation of this integer.
full_name: Integer#to_r
is_singleton: false
name: to_r
params: ()
visibility: public
ri/1.8/system/Integer/gcd-i.yaml000064400000001056150403627410012260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <em>greatest common denominator</em> of the two numbers (<tt>self</tt> and <tt>n</tt>).
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  72.gcd 168           # -&gt; 24\n  19.gcd 36            # -&gt; 1\n"
- !ruby/struct:SM::Flow::P 
  body: The result is positive, no matter the sign of the arguments.
full_name: Integer#gcd
is_singleton: false
name: gcd
params: (other)
visibility: public
ri/1.8/system/Integer/induced_from-c.yaml000064400000000455150403627410014155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>obj</tt> to an Integer.
full_name: Integer::induced_from
is_singleton: true
name: induced_from
params: |
  Integer.induced_from(obj)    =>  fixnum, bignum

visibility: public
ri/1.8/system/Integer/round-i.yaml000064400000000661150403627410012653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: As <em>int</em> is already an <tt>Integer</tt>, all these methods simply return the receiver.
full_name: Integer#round
is_singleton: false
name: round
params: |
  int.to_i      => int
  int.to_int    => int
  int.floor     => int
  int.ceil      => int
  int.round     => int
  int.truncate  => int

visibility: public
ri/1.8/system/Integer/from_prime_division-c.yaml000064400000000303150403627410015552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Integer::from_prime_division
is_singleton: true
name: from_prime_division
params: (pd)
visibility: public
ri/1.8/system/Integer/floor-i.yaml000064400000000661150403627410012645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: As <em>int</em> is already an <tt>Integer</tt>, all these methods simply return the receiver.
full_name: Integer#floor
is_singleton: false
name: floor
params: |
  int.to_i      => int
  int.to_int    => int
  int.floor     => int
  int.ceil      => int
  int.round     => int
  int.truncate  => int

visibility: public
ri/1.8/system/Integer/downto-i.yaml000064400000001145150403627420013035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates <em>block</em>, passing decreasing values from <em>int</em> down to and including <em>limit</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   5.downto(1) { |n| print n, &quot;.. &quot; }\n   print &quot;  Liftoff!\\n&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   5.. 4.. 3.. 2.. 1..   Liftoff!\n"
full_name: Integer#downto
is_singleton: false
name: downto
params: |
  int.downto(limit) {|i| block }     => int

visibility: public
ri/1.8/system/DRb/DRbUnknown/cdesc-DRbUnknown.yaml000064400000002664150403627420015513 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Buffer contained the marshalled, unknown object.
  name: buf
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The name of the unknown thing.
  - !ruby/struct:SM::Flow::P 
    body: Class name for unknown objects; variable name for unknown constants.
  name: name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class wrapping a marshalled object whose type is unknown locally.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: If this object is passed as an argument to a method invoked over drb, then the wrapped object is passed instead.
- !ruby/struct:SM::Flow::P 
  body: The class or constant name of the object can be read from the <tt>name</tt> attribute. The marshalled object is held in the <tt>buf</tt> attribute.
constants: []

full_name: DRb::DRbUnknown
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: exception
- !ruby/object:RI::MethodSummary 
  name: reload
name: DRbUnknown
superclass: Object
ri/1.8/system/DRb/DRbUnknown/reload-i.yaml000064400000000716150403627420014075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempt to load the wrapped marshalled object again.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: DRb::DRbUnknown#reload
is_singleton: false
name: reload
params: ()
visibility: public
ri/1.8/system/DRb/DRbUnknown/new-c.yaml000064400000000777150403627430013422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DRbUnknown object.
- !ruby/struct:SM::Flow::P 
  body: <tt>buf</tt> is a string containing a marshalled object that could not be unmarshalled. <tt>err</tt> is the error message that was raised when the unmarshalling failed. It is used to determine the name of the unmarshalled object.
full_name: DRb::DRbUnknown::new
is_singleton: true
name: new
params: (err, buf)
visibility: public
ri/1.8/system/DRb/DRbUnknown/exception-i.yaml000064400000000424150403627430014622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a DRbUnknownError exception containing this object.
full_name: DRb::DRbUnknown#exception
is_singleton: false
name: exception
params: ()
visibility: public
ri/1.8/system/DRb/GW/%5b%5d-i.yaml000064400000000244150403627430011763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::GW#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/DRb/GW/new-c.yaml000064400000000241150403627430011672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::GW::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/DRb/GW/cdesc-GW.yaml000064400000000562150403627430012263 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: DRb::GW
includes: 
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
name: GW
superclass: Object
ri/1.8/system/DRb/GW/%5b%5d%3d-i.yaml000064400000000251150403627430012255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::GW#[]=
is_singleton: false
name: "[]="
params: (key, v)
visibility: public
ri/1.8/system/DRb/DRbConnError/cdesc-DRbConnError.yaml000064400000000474150403627440016232 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised when an error occurs on the underlying communication protocol.
constants: []

full_name: DRb::DRbConnError
includes: []

instance_methods: []

name: DRbConnError
superclass: DRbError
ri/1.8/system/DRb/DRbBadURI/cdesc-DRbBadURI.yaml000064400000000550150403627440014523 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised by the DRbProtocol module when it cannot find any protocol implementation support the scheme specified in a URI.
constants: []

full_name: DRb::DRbBadURI
includes: []

instance_methods: []

name: DRbBadURI
superclass: DRbError
ri/1.8/system/DRb/install_acl-i.yaml000064400000000455150403627440013067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the default acl.
- !ruby/struct:SM::Flow::P 
  body: See DRb::DRbServer.default_acl.
full_name: DRb#install_acl
is_singleton: false
name: install_acl
params: (acl)
visibility: public
ri/1.8/system/DRb/DRbConn/cdesc-DRbConn.yaml000064400000001157150403627450014206 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class handling the connection between a DRbObject and the server the real object lives on.
- !ruby/struct:SM::Flow::P 
  body: This class maintains a pool of connections, to reduce the overhead of starting and closing down connections for each method call.
- !ruby/struct:SM::Flow::P 
  body: This class is used internally by DRbObject. The user does not normally need to deal with it directly.
constants: []

full_name: DRb::DRbConn
includes: []

instance_methods: []

name: DRbConn
superclass: Object
ri/1.8/system/DRb/DRbIdConv/to_obj-i.yaml000064400000000623150403627460013627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert an object reference id to an object.
- !ruby/struct:SM::Flow::P 
  body: This implementation looks up the reference id in the local object space and returns the object it refers to.
full_name: DRb::DRbIdConv#to_obj
is_singleton: false
name: to_obj
params: (ref)
visibility: public
ri/1.8/system/DRb/DRbIdConv/cdesc-DRbIdConv.yaml000064400000001475150403627460014764 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class responsible for converting between an object and its id.
- !ruby/struct:SM::Flow::P 
  body: This, the default implementation, uses an object's local ObjectSpace <em>id</em> 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.
- !ruby/struct:SM::Flow::P 
  body: For alternative mechanisms, see DRb::TimerIdConv in rdb/timeridconv.rb and DRbNameIdConv in sample/name.rb in the full drb distribution.
constants: []

full_name: DRb::DRbIdConv
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_id
- !ruby/object:RI::MethodSummary 
  name: to_obj
name: DRbIdConv
superclass: Object
ri/1.8/system/DRb/DRbIdConv/to_id-i.yaml000064400000000556150403627460013456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert an object into a reference id.
- !ruby/struct:SM::Flow::P 
  body: This implementation returns the object's <em>id</em> in the local object space.
full_name: DRb::DRbIdConv#to_id
is_singleton: false
name: to_id
params: (obj)
visibility: public
ri/1.8/system/DRb/ExtServ/new-c.yaml000064400000000275150403627460012767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServ::new
is_singleton: true
name: new
params: (there, name, server=nil)
visibility: public
ri/1.8/system/DRb/ExtServ/stop_service-i.yaml000064400000000270150403627470014705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServ#stop_service
is_singleton: false
name: stop_service
params: ()
visibility: public
ri/1.8/system/DRb/ExtServ/alive%3f-i.yaml000064400000000254150403627470013600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServ#alive?
is_singleton: false
name: alive?
params: ()
visibility: public
ri/1.8/system/DRb/ExtServ/front-i.yaml000064400000000252150403627470013330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServ#front
is_singleton: false
name: front
params: ()
visibility: public
ri/1.8/system/DRb/ExtServ/cdesc-ExtServ.yaml000064400000000762150403627470014437 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: server
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: DRb::ExtServ
includes: 
- !ruby/object:RI::IncludedModule 
  name: DRbUndumped
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: alive?
- !ruby/object:RI::MethodSummary 
  name: front
- !ruby/object:RI::MethodSummary 
  name: stop_service
name: ExtServ
superclass: Object
ri/1.8/system/DRb/DRbError/cdesc-DRbError.yaml000064400000000437150403627500014572 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Superclass of all errors raised in the DRb module.
constants: []

full_name: DRb::DRbError
includes: []

instance_methods: []

name: DRbError
superclass: RuntimeError
ri/1.8/system/DRb/uri-i.yaml000064400000000517150403627500011375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the URI defining the local dRuby space.
- !ruby/struct:SM::Flow::P 
  body: "This is the URI of the current server. See #current_server."
full_name: DRb#uri
is_singleton: false
name: uri
params: ()
visibility: public
ri/1.8/system/DRb/DRbArray/_load-c.yaml000064400000000254150403627500013312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbArray::_load
is_singleton: true
name: _load
params: (s)
visibility: public
ri/1.8/system/DRb/DRbArray/new-c.yaml000064400000000252150403627510013024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbArray::new
is_singleton: true
name: new
params: (ary)
visibility: public
ri/1.8/system/DRb/DRbArray/cdesc-DRbArray.yaml000064400000000512150403627510014537 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: _load
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: DRb::DRbArray
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _dump
name: DRbArray
superclass: Object
ri/1.8/system/DRb/DRbArray/_dump-i.yaml000064400000000255150403627510013350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbArray#_dump
is_singleton: false
name: _dump
params: (lv)
visibility: public
ri/1.8/system/DRb/DRbServerNotFound/cdesc-DRbServerNotFound.yaml000064400000000630150403627520020253 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "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."
constants: []

full_name: DRb::DRbServerNotFound
includes: []

instance_methods: []

name: DRbServerNotFound
superclass: DRbError
ri/1.8/system/DRb/DRbURIOption/cdesc-DRbURIOption.yaml000064400000000312150403627520016062 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: DRb::DRbURIOption
includes: []

instance_methods: []

name: DRbURIOption
superclass: Object
ri/1.8/system/DRb/cdesc-DRb.yaml000064400000002415150403627520012077 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The primary local dRuby server.
  - !ruby/struct:SM::Flow::P 
    body: "This is the server created by the #start_service call."
  name: primary_server
  rw: RW
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: for ruby-1.8.0
constants: []

full_name: DRb
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: config
- !ruby/object:RI::MethodSummary 
  name: current_server
- !ruby/object:RI::MethodSummary 
  name: fetch_server
- !ruby/object:RI::MethodSummary 
  name: front
- !ruby/object:RI::MethodSummary 
  name: here?
- !ruby/object:RI::MethodSummary 
  name: install_acl
- !ruby/object:RI::MethodSummary 
  name: install_id_conv
- !ruby/object:RI::MethodSummary 
  name: mutex
- !ruby/object:RI::MethodSummary 
  name: regist_server
- !ruby/object:RI::MethodSummary 
  name: remove_server
- !ruby/object:RI::MethodSummary 
  name: start_service
- !ruby/object:RI::MethodSummary 
  name: stop_service
- !ruby/object:RI::MethodSummary 
  name: thread
- !ruby/object:RI::MethodSummary 
  name: to_id
- !ruby/object:RI::MethodSummary 
  name: to_obj
- !ruby/object:RI::MethodSummary 
  name: uri
name: DRb
superclass: 
ri/1.8/system/DRb/DRbBadScheme/cdesc-DRbBadScheme.yaml000064400000000536150403627520016040 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised by a dRuby protocol when it doesn't support the scheme specified in a URI. See DRb::DRbProtocol.
constants: []

full_name: DRb::DRbBadScheme
includes: []

instance_methods: []

name: DRbBadScheme
superclass: DRbError
ri/1.8/system/DRb/to_obj-i.yaml000064400000000607150403627520012054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a reference into an object using the current server.
- !ruby/struct:SM::Flow::P 
  body: "This raises a DRbServerNotFound error if there is no current server. See #current_server."
full_name: DRb#to_obj
is_singleton: false
name: to_obj
params: (ref)
visibility: public
ri/1.8/system/DRb/start_service-i.yaml000064400000001560150403627520013454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Start a dRuby server locally.
- !ruby/struct:SM::Flow::P 
  body: The new dRuby server will become the primary server, even if another server is currently the primary server.
- !ruby/struct:SM::Flow::P 
  body: <tt>uri</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: <tt>front</tt> is the server's front object. This may be nil.
- !ruby/struct:SM::Flow::P 
  body: <tt>config</tt> is the configuration for the new server. This may be nil.
- !ruby/struct:SM::Flow::P 
  body: See DRbServer::new.
full_name: DRb#start_service
is_singleton: false
name: start_service
params: (uri=nil, front=nil, config=nil)
visibility: public
ri/1.8/system/DRb/DRbServer/default_load_limit-c.yaml000064400000000564150403627520016253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the default value for the :load_limit option.
- !ruby/struct:SM::Flow::P 
  body: "See #new(). The initial default value is 25 MB."
full_name: DRb::DRbServer::default_load_limit
is_singleton: true
name: default_load_limit
params: (sz)
visibility: public
ri/1.8/system/DRb/DRbServer/check_insecure_method-i.yaml000064400000001162150403627520016745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Check that a method is callable via dRuby.
- !ruby/struct:SM::Flow::P 
  body: <tt>obj</tt> is the object we want to invoke the method on. <tt>msg_id</tt> is the method name, as a Symbol.
- !ruby/struct:SM::Flow::P 
  body: "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."
full_name: DRb::DRbServer#check_insecure_method
is_singleton: false
name: check_insecure_method
params: (obj, msg_id)
visibility: public
ri/1.8/system/DRb/DRbServer/verbose%3d-i.yaml000064400000000527150403627520014400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set whether to operate in verbose mode.
- !ruby/struct:SM::Flow::P 
  body: In verbose mode, failed calls are logged to stdout.
full_name: DRb::DRbServer#verbose=
is_singleton: false
name: verbose=
params: (v)
visibility: public
ri/1.8/system/DRb/DRbServer/main_loop-i.yaml000064400000001074150403627530014413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The main loop performed by a DRbServer's internal thread.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: DRb::DRbServer#main_loop
is_singleton: false
name: main_loop
params: ()
visibility: private
ri/1.8/system/DRb/DRbServer/default_acl-c.yaml000064400000000536150403627530014675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the default value for the :acl option.
- !ruby/struct:SM::Flow::P 
  body: "See #new(). The initial default value is nil."
full_name: DRb::DRbServer::default_acl
is_singleton: true
name: default_acl
params: (acl)
visibility: public
ri/1.8/system/DRb/DRbServer/cdesc-DRbServer.yaml000064400000005754150403627530015136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The configuration of this DRbServer
  name: config
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The front object of the DRbServer.
  - !ruby/struct:SM::Flow::P 
    body: This object receives remote method calls made on the server's URI alone, with an object id.
  name: front
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: safe_level
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The main thread of this DRbServer.
  - !ruby/struct:SM::Flow::P 
    body: This is the thread that listens for and accepts connections from clients, not that handles each client's request-response session.
  name: thread
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The URI of this DRbServer.
  name: uri
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: default_acl
- !ruby/object:RI::MethodSummary 
  name: default_argc_limit
- !ruby/object:RI::MethodSummary 
  name: default_id_conv
- !ruby/object:RI::MethodSummary 
  name: default_load_limit
- !ruby/object:RI::MethodSummary 
  name: default_safe_level
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: verbose
- !ruby/object:RI::MethodSummary 
  name: verbose=
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class representing a drb server instance.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: Unless multiple servers are being used, the local DRbServer is normally started by calling DRb.start_service.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: List of insecure methods.
  - !ruby/struct:SM::Flow::P 
    body: These methods are not callable via dRuby.
  name: INSECURE_METHOD
  value: "[       :__send__"
full_name: DRb::DRbServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: alive?
- !ruby/object:RI::MethodSummary 
  name: any_to_s
- !ruby/object:RI::MethodSummary 
  name: check_insecure_method
- !ruby/object:RI::MethodSummary 
  name: insecure_method?
- !ruby/object:RI::MethodSummary 
  name: kill_sub_thread
- !ruby/object:RI::MethodSummary 
  name: main_loop
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: stop_service
- !ruby/object:RI::MethodSummary 
  name: to_id
- !ruby/object:RI::MethodSummary 
  name: to_obj
- !ruby/object:RI::MethodSummary 
  name: verbose
- !ruby/object:RI::MethodSummary 
  name: verbose=
name: DRbServer
superclass: Object
ri/1.8/system/DRb/DRbServer/to_obj-i.yaml000064400000000421150403627530013705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a dRuby reference to the local object it refers to.
full_name: DRb::DRbServer#to_obj
is_singleton: false
name: to_obj
params: (ref)
visibility: public
ri/1.8/system/DRb/DRbServer/kill_sub_thread-i.yaml000064400000000301150403627530015561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbServer#kill_sub_thread
is_singleton: false
name: kill_sub_thread
params: ()
visibility: private
ri/1.8/system/DRb/DRbServer/new-c.yaml000064400000005133150403627540013222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DRbServer instance.
- !ruby/struct:SM::Flow::P 
  body: "<tt>uri</tt> is the URI to bind to. This is normally of the form 'druby://&lt;hostname&gt;:&lt;port&gt;' where &lt;hostname&gt; 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 <tt>uri</tt> attribute. 'druby:' specifies the default dRuby transport protocol: another protocol, such as 'drbunix:', can be specified instead."
- !ruby/struct:SM::Flow::P 
  body: <tt>front</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: "If <tt>config_or_acl</tt> is a hash, it is the configuration to use for this server. The following options are recognised:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: ":idconv :"
    body: an id-to-object conversion object. This defaults to an instance of the class DRb::DRbIdConv.
  - !ruby/struct:SM::Flow::LI 
    label: ":verbose :"
    body: if true, all unsuccessful remote calls on objects in the server will be logged to $stdout. false by default.
  - !ruby/struct:SM::Flow::LI 
    label: ":tcp_acl :"
    body: the access control list for this server. See the ACL class from the main dRuby distribution.
  - !ruby/struct:SM::Flow::LI 
    label: ":load_limit :"
    body: the maximum message size in bytes accepted by the server. Defaults to 25 MB (26214400).
  - !ruby/struct:SM::Flow::LI 
    label: ":argc_limit :"
    body: the maximum number of arguments to a remote method accepted by the server. Defaults to 256.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "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="
- !ruby/struct:SM::Flow::P 
  body: If <tt>config_or_acl</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: If no other server is currently set as the primary server, this will become the primary server.
- !ruby/struct:SM::Flow::P 
  body: The server will immediately start running in its own thread.
full_name: DRb::DRbServer::new
is_singleton: true
name: new
params: (uri=nil, front=nil, config_or_acl=nil)
visibility: public
ri/1.8/system/DRb/DRbServer/InvokeMethod/cdesc-InvokeMethod.yaml000064400000000325150403627540020256 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: DRb::DRbServer::InvokeMethod
includes: []

instance_methods: []

name: InvokeMethod
superclass: Object
ri/1.8/system/DRb/DRbServer/default_id_conv-c.yaml000064400000000576150403627540015564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the default value for the :id_conv option.
- !ruby/struct:SM::Flow::P 
  body: "See #new(). The initial default value is a DRbIdConv instance."
full_name: DRb::DRbServer::default_id_conv
is_singleton: true
name: default_id_conv
params: (idconv)
visibility: public
ri/1.8/system/DRb/DRbServer/stop_service-i.yaml000064400000000360150403627540015141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Stop this server.
full_name: DRb::DRbServer#stop_service
is_singleton: false
name: stop_service
params: ()
visibility: public
ri/1.8/system/DRb/DRbServer/insecure_method%3f-i.yaml000064400000000451150403627550016111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Has a method been included in the list of insecure methods?
full_name: DRb::DRbServer#insecure_method?
is_singleton: false
name: insecure_method?
params: (msg_id)
visibility: private
ri/1.8/system/DRb/DRbServer/alive%3f-i.yaml000064400000000350150403627550014032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is this server alive?
full_name: DRb::DRbServer#alive?
is_singleton: false
name: alive?
params: ()
visibility: public
ri/1.8/system/DRb/DRbServer/run-i.yaml000064400000000251150403627550013240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbServer#run
is_singleton: false
name: run
params: ()
visibility: private
ri/1.8/system/DRb/DRbServer/verbose-c.yaml000064400000000402150403627550014071 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the default value of the :verbose option.
full_name: DRb::DRbServer::verbose
is_singleton: true
name: verbose
params: ()
visibility: public
ri/1.8/system/DRb/DRbServer/default_safe_level-c.yaml000064400000000313150403627550016236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbServer::default_safe_level
is_singleton: true
name: default_safe_level
params: (level)
visibility: public
ri/1.8/system/DRb/DRbServer/default_argc_limit-c.yaml000064400000000564150403627550016253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the default value for the :argc_limit option.
- !ruby/struct:SM::Flow::P 
  body: "See #new(). The initial default value is 256."
full_name: DRb::DRbServer::default_argc_limit
is_singleton: true
name: default_argc_limit
params: (argc)
visibility: public
ri/1.8/system/DRb/DRbServer/to_id-i.yaml000064400000000400150403627550013526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a local object to a dRuby reference.
full_name: DRb::DRbServer#to_id
is_singleton: false
name: to_id
params: (obj)
visibility: public
ri/1.8/system/DRb/DRbServer/verbose-i.yaml000064400000000527150403627550014107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get whether the server is in verbose mode.
- !ruby/struct:SM::Flow::P 
  body: In verbose mode, failed calls are logged to stdout.
full_name: DRb::DRbServer#verbose
is_singleton: false
name: verbose
params: ()
visibility: public
ri/1.8/system/DRb/DRbServer/InvokeMethod18Mixin/cdesc-InvokeMethod18Mixin.yaml000064400000000515150403627560022615 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: DRb::DRbServer::InvokeMethod18Mixin
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: block_yield
- !ruby/object:RI::MethodSummary 
  name: perform_with_block
name: InvokeMethod18Mixin
superclass: 
ri/1.8/system/DRb/DRbServer/InvokeMethod18Mixin/perform_with_block-i.yaml000064400000000333150403627560022067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbServer::InvokeMethod18Mixin#perform_with_block
is_singleton: false
name: perform_with_block
params: ()
visibility: public
ri/1.8/system/DRb/DRbServer/InvokeMethod18Mixin/block_yield-i.yaml000064400000000316150403627560020471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbServer::InvokeMethod18Mixin#block_yield
is_singleton: false
name: block_yield
params: (x)
visibility: public
ri/1.8/system/DRb/DRbServer/verbose%3d-c.yaml000064400000000534150403627570014375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the default value of the :verbose option.
- !ruby/struct:SM::Flow::P 
  body: "See #new(). The initial default value is false."
full_name: DRb::DRbServer::verbose=
is_singleton: true
name: verbose=
params: (on)
visibility: public
ri/1.8/system/DRb/DRbServer/any_to_s-i.yaml000064400000000500150403627570014246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Coerce an object to a string, providing our own representation if to_s is not defined for the object.
full_name: DRb::DRbServer#any_to_s
is_singleton: false
name: any_to_s
params: (obj)
visibility: private
ri/1.8/system/DRb/ExtServManager/command%3d-c.yaml000064400000000272150403627570015402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager::command=
is_singleton: true
name: command=
params: (cmd)
visibility: public
ri/1.8/system/DRb/ExtServManager/unregist-i.yaml000064400000000273150403627570015337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager#unregist
is_singleton: false
name: unregist
params: (name)
visibility: public
ri/1.8/system/DRb/ExtServManager/invoke_service_command-i.yaml000064400000000341150403627570020204 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager#invoke_service_command
is_singleton: false
name: invoke_service_command
params: (name, command)
visibility: private
ri/1.8/system/DRb/ExtServManager/service-i.yaml000064400000000271150403627570015135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager#service
is_singleton: false
name: service
params: (name)
visibility: public
ri/1.8/system/DRb/ExtServManager/invoke_thread-i.yaml000064400000000302150403627570016312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager#invoke_thread
is_singleton: false
name: invoke_thread
params: ()
visibility: private
ri/1.8/system/DRb/ExtServManager/invoke_service-i.yaml000064400000000310150403627570016502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager#invoke_service
is_singleton: false
name: invoke_service
params: (name)
visibility: private
ri/1.8/system/DRb/ExtServManager/new-c.yaml000064400000000255150403627570014262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/DRb/ExtServManager/cdesc-ExtServManager.yaml000064400000001513150403627570017221 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: uri
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: command
- !ruby/object:RI::MethodSummary 
  name: command=
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: DRb::ExtServManager
includes: 
- !ruby/object:RI::IncludedModule 
  name: DRbUndumped
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: invoke_service
- !ruby/object:RI::MethodSummary 
  name: invoke_service_command
- !ruby/object:RI::MethodSummary 
  name: invoke_thread
- !ruby/object:RI::MethodSummary 
  name: regist
- !ruby/object:RI::MethodSummary 
  name: service
- !ruby/object:RI::MethodSummary 
  name: unregist
name: ExtServManager
superclass: Object
ri/1.8/system/DRb/ExtServManager/regist-i.yaml000064400000000273150403627570014774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager#regist
is_singleton: false
name: regist
params: (name, ro)
visibility: public
ri/1.8/system/DRb/ExtServManager/command-c.yaml000064400000000265150403627570015110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::ExtServManager::command
is_singleton: true
name: command
params: ()
visibility: public
ri/1.8/system/DRb/remove_server-i.yaml000064400000000267150403627600013464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb#remove_server
is_singleton: false
name: remove_server
params: (server)
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/recv_reply-i.yaml000064400000000422150403627600015133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: On the client side, receive a reply from the server.
full_name: DRb::DRbTCPSocket#recv_reply
is_singleton: false
name: recv_reply
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/getservername-c.yaml000064400000000277150403627600015632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbTCPSocket::getservername
is_singleton: true
name: getservername
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/send_request-i.yaml000064400000000446150403627600015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: On the client side, send a request to the server.
full_name: DRb::DRbTCPSocket#send_request
is_singleton: false
name: send_request
params: (ref, msg_id, arg, b)
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/uri_option-c.yaml000064400000000426150403627600015146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse <tt>uri</tt> into a [uri, option] pair.
full_name: DRb::DRbTCPSocket::uri_option
is_singleton: true
name: uri_option
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/new-c.yaml000064400000000655150403627610013555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DRbTCPSocket instance.
- !ruby/struct:SM::Flow::P 
  body: <tt>uri</tt> is the URI we are connected to. <tt>soc</tt> is the tcp socket we are bound to. <tt>config</tt> is our configuration.
full_name: DRb::DRbTCPSocket::new
is_singleton: true
name: new
params: (uri, soc, config={})
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/parse_uri-c.yaml000064400000000273150403627610014751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbTCPSocket::parse_uri
is_singleton: true
name: parse_uri
params: (uri)
visibility: private
ri/1.8/system/DRb/DRbTCPSocket/peeraddr-i.yaml000064400000000447150403627610014557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the address of our TCP peer (the other end of the socket we are bound to.
full_name: DRb::DRbTCPSocket#peeraddr
is_singleton: false
name: peeraddr
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/send_reply-i.yaml000064400000000431150403627610015126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: On the server side, send a reply to the client.
full_name: DRb::DRbTCPSocket#send_reply
is_singleton: false
name: send_reply
params: (succ, result)
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/open_server-c.yaml000064400000000507150403627610015307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Open a server listening for connections at <tt>uri</tt> using configuration <tt>config</tt>.
full_name: DRb::DRbTCPSocket::open_server
is_singleton: true
name: open_server
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/stream-i.yaml000064400000000345150403627610014261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the socket.
full_name: DRb::DRbTCPSocket#stream
is_singleton: false
name: stream
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/open_server_inaddr_any-c.yaml000064400000000333150403627610017474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbTCPSocket::open_server_inaddr_any
is_singleton: true
name: open_server_inaddr_any
params: (host, port)
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/accept-i.yaml000064400000000605150403627610014224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "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."
full_name: DRb::DRbTCPSocket#accept
is_singleton: false
name: accept
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/close-i.yaml000064400000000750150403627610014073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Close the connection.
- !ruby/struct:SM::Flow::P 
  body: "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."
full_name: DRb::DRbTCPSocket#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/recv_request-i.yaml000064400000000430150403627610015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: On the server side, receive a request from the client.
full_name: DRb::DRbTCPSocket#recv_request
is_singleton: false
name: recv_request
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/alive%3f-i.yaml000064400000000377150403627610014371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Check to see if this connection is alive.
full_name: DRb::DRbTCPSocket#alive?
is_singleton: false
name: alive?
params: ()
visibility: public
ri/1.8/system/DRb/DRbTCPSocket/cdesc-DRbTCPSocket.yaml000064400000002422150403627610016004 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Get the URI that we are connected to.
  name: uri
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: getservername
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: open_server
- !ruby/object:RI::MethodSummary 
  name: open_server_inaddr_any
- !ruby/object:RI::MethodSummary 
  name: parse_uri
- !ruby/object:RI::MethodSummary 
  name: uri_option
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default drb protocol.
- !ruby/struct:SM::Flow::P 
  body: Communicates over a TCP socket.
constants: []

full_name: DRb::DRbTCPSocket
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept
- !ruby/object:RI::MethodSummary 
  name: alive?
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: peeraddr
- !ruby/object:RI::MethodSummary 
  name: recv_reply
- !ruby/object:RI::MethodSummary 
  name: recv_request
- !ruby/object:RI::MethodSummary 
  name: send_reply
- !ruby/object:RI::MethodSummary 
  name: send_request
- !ruby/object:RI::MethodSummary 
  name: stream
name: DRbTCPSocket
superclass: Object
ri/1.8/system/DRb/DRbTCPSocket/open-c.yaml000064400000000452150403627610013720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Open a client connection to <tt>uri</tt> using configuration <tt>config</tt>.
full_name: DRb::DRbTCPSocket::open
is_singleton: true
name: open
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbObject/_load-c.yaml000064400000000722150403627620013445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unmarshall a marshalled DRbObject.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: DRb::DRbObject::_load
is_singleton: true
name: _load
params: (s)
visibility: public
ri/1.8/system/DRb/DRbObject/eql%3f-i.yaml000064400000000343150403627620013453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #=="
full_name: DRb::DRbObject#eql?
is_singleton: false
name: eql?
params: (other)
visibility: public
ri/1.8/system/DRb/DRbObject/__drburi-i.yaml000064400000000370150403627620014161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the URI of the remote object.
full_name: DRb::DRbObject#__drburi
is_singleton: false
name: __drburi
params: ()
visibility: public
ri/1.8/system/DRb/DRbObject/method_missing-i.yaml000064400000000436150403627630015411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Routes method calls to the referenced object.
full_name: DRb::DRbObject#method_missing
is_singleton: false
name: method_missing
params: (msg_id, *a, &b)
visibility: public
ri/1.8/system/DRb/DRbObject/hash-i.yaml000064400000000252150403627630013317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbObject#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/DRb/DRbObject/prepare_backtrace-c.yaml000064400000000317150403627630016025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbObject::prepare_backtrace
is_singleton: true
name: prepare_backtrace
params: (uri, result)
visibility: public
ri/1.8/system/DRb/DRbObject/new_with_uri-c.yaml000064400000000412150403627630015067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DRbObject from a URI alone.
full_name: DRb::DRbObject::new_with_uri
is_singleton: true
name: new_with_uri
params: (uri)
visibility: public
ri/1.8/system/DRb/DRbObject/cdesc-DRbObject.yaml000064400000002301150403627640015021 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: _load
- !ruby/object:RI::MethodSummary 
  name: _load
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new_with
- !ruby/object:RI::MethodSummary 
  name: new_with_uri
- !ruby/object:RI::MethodSummary 
  name: prepare_backtrace
- !ruby/object:RI::MethodSummary 
  name: with_friend
comment: 
- !ruby/struct:SM::Flow::P 
  body: Object wrapping a reference to a remote drb object.
- !ruby/struct:SM::Flow::P 
  body: Method calls on this object are relayed to the remote object that this object is a stub for.
constants: []

full_name: DRb::DRbObject
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: __drbref
- !ruby/object:RI::MethodSummary 
  name: __drburi
- !ruby/object:RI::MethodSummary 
  name: _dump
- !ruby/object:RI::MethodSummary 
  name: _dump
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: method_missing
- !ruby/object:RI::MethodSummary 
  name: respond_to?
name: DRbObject
superclass: Object
ri/1.8/system/DRb/DRbObject/with_friend-c.yaml000064400000000306150403627640014671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ()
comment: 
full_name: DRb::DRbObject::with_friend
is_singleton: true
name: with_friend
params: (uri) {|| ...}
visibility: public
ri/1.8/system/DRb/DRbObject/new-c.yaml000064400000000710150403627640013157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new remote object stub.
- !ruby/struct:SM::Flow::P 
  body: <tt>obj</tt> is the (local) object we want to create a stub for. Normally this is <tt>nil</tt>. <tt>uri</tt> is the URI of the remote object that this will be a stub for.
full_name: DRb::DRbObject::new
is_singleton: true
name: new
params: (obj, uri=nil)
visibility: public
ri/1.8/system/DRb/DRbObject/respond_to%3f-i.yaml000064400000000312150403627640015044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbObject#respond_to?
is_singleton: false
name: respond_to?
params: (msg_id, priv=false)
visibility: public
ri/1.8/system/DRb/DRbObject/new_with-c.yaml000064400000000272150403627650014216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbObject::new_with
is_singleton: true
name: new_with
params: (uri, ref)
visibility: public
ri/1.8/system/DRb/DRbObject/__drbref-i.yaml000064400000000401150403627650014134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the reference of the object, if local.
full_name: DRb::DRbObject#__drbref
is_singleton: false
name: __drbref
params: ()
visibility: public
ri/1.8/system/DRb/DRbObject/%3d%3d-i.yaml000064400000000323150403627650013244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: eql?
block_params: 
comment: 
full_name: DRb::DRbObject#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/DRb/DRbObject/_dump-i.yaml000064400000000256150403627650013506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbObject#_dump
is_singleton: false
name: _dump
params: (lv)
visibility: public
ri/1.8/system/DRb/stop_service-i.yaml000064400000000570150403627660013311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Stop the local dRuby server.
- !ruby/struct:SM::Flow::P 
  body: This operates on the primary server. If there is no primary server currently running, it is a noop.
full_name: DRb#stop_service
is_singleton: false
name: stop_service
params: ()
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/cdesc-DRbSSLSocket.yaml000064400000001130150403627660016032 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: open_server
- !ruby/object:RI::MethodSummary 
  name: parse_uri
- !ruby/object:RI::MethodSummary 
  name: uri_option
comment: 
constants: []

full_name: DRb::DRbSSLSocket
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: stream
name: DRbSSLSocket
superclass: DRbTCPSocket
ri/1.8/system/DRb/DRbSSLSocket/SSLConfig/connect-i.yaml000064400000000301150403627660016216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::SSLConfig#connect
is_singleton: false
name: connect
params: (tcp)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/SSLConfig/%5b%5d-i.yaml000064400000000271150403627660015444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::SSLConfig#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/SSLConfig/setup_certificate-i.yaml000064400000000322150403627660020272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::SSLConfig#setup_certificate
is_singleton: false
name: setup_certificate
params: ()
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/SSLConfig/setup_ssl_context-i.yaml000064400000000322150403627660020355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::SSLConfig#setup_ssl_context
is_singleton: false
name: setup_ssl_context
params: ()
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/SSLConfig/new-c.yaml000064400000000274150403627670015362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::SSLConfig::new
is_singleton: true
name: new
params: (config)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/SSLConfig/accept-i.yaml000064400000000277150403627670016041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::SSLConfig#accept
is_singleton: false
name: accept
params: (tcp)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/SSLConfig/cdesc-SSLConfig.yaml000064400000002232150403627670017213 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT
  value: "{         :SSLCertificate       => nil,         :SSLPrivateKey        => nil,         :SSLClientCA          => nil,         :SSLCACertificatePath => nil,         :SSLCACertificateFile => 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\""
full_name: DRb::DRbSSLSocket::SSLConfig
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: accept
- !ruby/object:RI::MethodSummary 
  name: connect
- !ruby/object:RI::MethodSummary 
  name: setup_certificate
- !ruby/object:RI::MethodSummary 
  name: setup_ssl_context
name: SSLConfig
superclass: Object
ri/1.8/system/DRb/DRbSSLSocket/uri_option-c.yaml000064400000000304150403627670015163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::uri_option
is_singleton: true
name: uri_option
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/new-c.yaml000064400000000313150403627670013565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::new
is_singleton: true
name: new
params: (uri, soc, config, is_established)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/parse_uri-c.yaml000064400000000272150403627670014771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::parse_uri
is_singleton: true
name: parse_uri
params: (uri)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/open_server-c.yaml000064400000000306150403627670015325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::open_server
is_singleton: true
name: open_server
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/stream-i.yaml000064400000000261150403627670014277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket#stream
is_singleton: false
name: stream
params: ()
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/accept-i.yaml000064400000000261150403627670014243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket#accept
is_singleton: false
name: accept
params: ()
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/close-i.yaml000064400000000257150403627670014116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/DRb/DRbSSLSocket/open-c.yaml000064400000000270150403627670013737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbSSLSocket::open
is_singleton: true
name: open
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/uri_option-c.yaml000064400000000305150403627700015300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket::uri_option
is_singleton: true
name: uri_option
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/new-c.yaml000064400000000324150403627700013703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket::new
is_singleton: true
name: new
params: (uri, soc, config={}, server_mode = false)
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/parse_uri-c.yaml000064400000000273150403627700015106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket::parse_uri
is_singleton: true
name: parse_uri
params: (uri)
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/cdesc-DRbUNIXSocket.yaml000064400000001431150403627710016276 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: open_server
- !ruby/object:RI::MethodSummary 
  name: parse_uri
- !ruby/object:RI::MethodSummary 
  name: temp_server
- !ruby/object:RI::MethodSummary 
  name: uri_option
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: import from tempfile.rb
  name: Max_try
  value: "10"
full_name: DRb::DRbUNIXSocket
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: set_sockopt
name: DRbUNIXSocket
superclass: DRbTCPSocket
ri/1.8/system/DRb/DRbUNIXSocket/open_server-c.yaml000064400000000307150403627710015443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket::open_server
is_singleton: true
name: open_server
params: (uri, config)
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/accept-i.yaml000064400000000262150403627710014361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket#accept
is_singleton: false
name: accept
params: ()
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/close-i.yaml000064400000000260150403627710014225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/temp_server-c.yaml000064400000000275150403627720015454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket::temp_server
is_singleton: true
name: temp_server
params: ()
visibility: private
ri/1.8/system/DRb/DRbUNIXSocket/set_sockopt-i.yaml000064400000000277150403627720015466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket#set_sockopt
is_singleton: false
name: set_sockopt
params: (soc)
visibility: public
ri/1.8/system/DRb/DRbUNIXSocket/open-c.yaml000064400000000271150403627720014056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbUNIXSocket::open
is_singleton: true
name: open
params: (uri, config)
visibility: public
ri/1.8/system/DRb/fetch_server-i.yaml000064400000000262150403627720013256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb#fetch_server
is_singleton: false
name: fetch_server
params: (uri)
visibility: public
ri/1.8/system/DRb/here%3f-i.yaml000064400000000376150403627730012027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is <tt>uri</tt> the URI for the current local server?
full_name: DRb#here?
is_singleton: false
name: here?
params: (uri)
visibility: public
ri/1.8/system/DRb/regist_server-i.yaml000064400000000267150403627730013470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb#regist_server
is_singleton: false
name: regist_server
params: (server)
visibility: public
ri/1.8/system/DRb/DRbRemoteError/new-c.yaml000064400000000262150403627730014220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbRemoteError::new
is_singleton: true
name: new
params: (error)
visibility: public
ri/1.8/system/DRb/DRbRemoteError/cdesc-DRbRemoteError.yaml000064400000000720150403627730017122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the class of the error, as a string.
  name: reason
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: An exception wrapping an error object
constants: []

full_name: DRb::DRbRemoteError
includes: []

instance_methods: []

name: DRbRemoteError
superclass: DRbError
ri/1.8/system/DRb/DRbProtocol/open_server-i.yaml000064400000001346150403627740015325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Open a server listening for connections at <tt>uri</tt> with configuration <tt>config</tt>.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: DRb::DRbProtocol#open_server
is_singleton: false
name: open_server
params: (uri, config, first=true)
visibility: public
ri/1.8/system/DRb/DRbProtocol/uri_option-i.yaml000064400000001070150403627740015157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse <tt>uri</tt> into a [uri, option] pair.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: DRb::DRbProtocol#uri_option
is_singleton: false
name: uri_option
params: (uri, config, first=true)
visibility: public
ri/1.8/system/DRb/DRbProtocol/open-i.yaml000064400000001252150403627740013733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Open a client connection to <tt>uri</tt> with the configuration <tt>config</tt>.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: DRb::DRbProtocol#open
is_singleton: false
name: open
params: (uri, config, first=true)
visibility: public
ri/1.8/system/DRb/DRbProtocol/add_protocol-i.yaml000064400000000422150403627750015442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a new protocol to the DRbProtocol module.
full_name: DRb::DRbProtocol#add_protocol
is_singleton: false
name: add_protocol
params: (prot)
visibility: public
ri/1.8/system/DRb/DRbProtocol/cdesc-DRbProtocol.yaml000064400000010115150403627750016013 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Module managing the underlying network protocol(s) used by drb.
- !ruby/struct:SM::Flow::P 
  body: "By default, drb uses the DRbTCPSocket protocol. Other protocols can be defined. A protocol must define the following class methods:"
- !ruby/struct:SM::Flow::VERB 
  body: "  [open(uri, config)] Open a client connection to the server at <tt>uri</tt>,\n                      using configuration <tt>config</tt>.  Return a protocol\n                      instance for this connection.\n  [open_server(uri, config)] Open a server listening at <tt>uri</tt>,\n                             using configuration <tt>config</tt>.  Return a\n                             protocol instance for this listener.\n  [uri_option(uri, config)] Take a URI, possibly containing an option\n                            component (e.g. a trailing '?param=val'),\n                            and return a [uri, option] tuple.\n"
- !ruby/struct:SM::Flow::P 
  body: All of these methods should raise a DRbBadScheme error if the URI does not identify the protocol they support (e.g. &quot;druby:&quot; for the standard Ruby protocol). This is how the DRbProtocol module, given a URI, determines which protocol implementation serves that protocol.
- !ruby/struct:SM::Flow::P 
  body: "The protocol instance returned by #open_server must have the following methods:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: accept
    body: Accept a new connection to the server. Returns a protocol instance capable of communicating with the client.
  - !ruby/struct:SM::Flow::LI 
    label: close
    body: Close the server connection.
  - !ruby/struct:SM::Flow::LI 
    label: uri
    body: Get the URI for this server.
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: "The protocol instance returned by #open must have the following methods:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: send_request (ref, msg_id, arg, b)
    body: Send a request to <tt>ref</tt> 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.
  - !ruby/struct:SM::Flow::LI 
    label: recv_reply
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: alive?
    body: Is this connection still alive?
  - !ruby/struct:SM::Flow::LI 
    label: close
    body: Close this connection.
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: "The protocol instance returned by #open_server().accept() must have the following methods:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: recv_request
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: send_reply(succ, result)
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: close
    body: Close this connection.
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: A new protocol is registered with the DRbProtocol module using the add_protocol method.
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: DRb::DRbProtocol
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_protocol
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: open_server
- !ruby/object:RI::MethodSummary 
  name: uri_option
name: DRbProtocol
superclass: 
ri/1.8/system/DRb/config-i.yaml000064400000000621150403627750012046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the configuration of the current server.
- !ruby/struct:SM::Flow::P 
  body: "If there is no current server, this returns the default configuration. See #current_server and DRbServer::make_config."
full_name: DRb#config
is_singleton: false
name: config
params: ()
visibility: public
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/cdesc-TimerHolder2.yaml000064400000001131150403627760020413 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: DRb::TimerIdConv::TimerHolder2
includes: 
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: alternate
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: keeper
- !ruby/object:RI::MethodSummary 
  name: peek
name: TimerHolder2
superclass: Object
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/keeper-i.yaml000064400000000277150403627760016547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::TimerHolder2#keeper
is_singleton: false
name: keeper
params: ()
visibility: private
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/peek-i.yaml000064400000000275150403627760016216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::TimerHolder2#peek
is_singleton: false
name: peek
params: (key)
visibility: public
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/InvalidIndexError/cdesc-InvalidIndexError.yaml000064400000000365150403627770025104 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: DRb::TimerIdConv::TimerHolder2::InvalidIndexError
includes: []

instance_methods: []

name: InvalidIndexError
superclass: RuntimeError
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/add-i.yaml000064400000000273150403627770016021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::TimerHolder2#add
is_singleton: false
name: add
params: (obj)
visibility: public
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/include%3f-i.yaml000064400000000305150403627770017206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::TimerHolder2#include?
is_singleton: false
name: include?
params: (key)
visibility: public
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/new-c.yaml000064400000000303150403627770016046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::TimerHolder2::new
is_singleton: true
name: new
params: (timeout=600)
visibility: public
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/alternate-i.yaml000064400000000305150403630000017220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::TimerHolder2#alternate
is_singleton: false
name: alternate
params: ()
visibility: private
ri/1.8/system/DRb/TimerIdConv/TimerHolder2/fetch-i.yaml000064400000000315150403630000016333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::TimerHolder2#fetch
is_singleton: false
name: fetch
params: (key, dv=@sentinel)
visibility: public
ri/1.8/system/DRb/TimerIdConv/to_obj-i.yaml000064400000000263150403630000014220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv#to_obj
is_singleton: false
name: to_obj
params: (ref)
visibility: public
ri/1.8/system/DRb/TimerIdConv/new-c.yaml000064400000000265150403630000013531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv::new
is_singleton: true
name: new
params: (timeout=600)
visibility: public
ri/1.8/system/DRb/TimerIdConv/cdesc-TimerIdConv.yaml000064400000000524150403630010015761 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: DRb::TimerIdConv
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_id
- !ruby/object:RI::MethodSummary 
  name: to_obj
name: TimerIdConv
superclass: DRbIdConv
ri/1.8/system/DRb/TimerIdConv/to_id-i.yaml000064400000000261150403630010014041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::TimerIdConv#to_id
is_singleton: false
name: to_id
params: (obj)
visibility: public
ri/1.8/system/DRb/mutex-i.yaml000064400000000241150403630010011720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb#mutex
is_singleton: false
name: mutex
params: ()
visibility: public
ri/1.8/system/DRb/thread-i.yaml000064400000000530150403630010012026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the thread of the primary server.
- !ruby/struct:SM::Flow::P 
  body: "This returns nil if there is no primary server. See #primary_server."
full_name: DRb#thread
is_singleton: false
name: thread
params: ()
visibility: public
ri/1.8/system/DRb/current_server-i.yaml000064400000001201150403630010013623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the 'current' server.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: If the above rule fails to find a server, a DRbServerNotFound error is raised.
full_name: DRb#current_server
is_singleton: false
name: current_server
params: ()
visibility: public
ri/1.8/system/DRb/front-i.yaml000064400000000561150403630010011713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the front object of the current server.
- !ruby/struct:SM::Flow::P 
  body: "This raises a DRbServerNotFound error if there is no current server. See #current_server."
full_name: DRb#front
is_singleton: false
name: front
params: ()
visibility: public
ri/1.8/system/DRb/DRbUnknownError/new-c.yaml000064400000000446150403630010014411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DRbUnknownError for the DRb::DRbUnknown object <tt>unknown</tt>
full_name: DRb::DRbUnknownError::new
is_singleton: true
name: new
params: (unknown)
visibility: public
ri/1.8/system/DRb/DRbUnknownError/cdesc-DRbUnknownError.yaml000064400000000737150403630010017523 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Get the wrapped DRb::DRbUnknown object.
  name: unknown
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: An exception wrapping a DRb::DRbUnknown object
constants: []

full_name: DRb::DRbUnknownError
includes: []

instance_methods: []

name: DRbUnknownError
superclass: DRbError
ri/1.8/system/DRb/DRbObservable/notify_observers-i.yaml000064400000000312150403630020016634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbObservable#notify_observers
is_singleton: false
name: notify_observers
params: (*arg)
visibility: public
ri/1.8/system/DRb/DRbObservable/cdesc-DRbObservable.yaml000064400000000461150403630020016544 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: DRb::DRbObservable
includes: 
- !ruby/object:RI::IncludedModule 
  name: Observable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: notify_observers
name: DRbObservable
superclass: 
ri/1.8/system/DRb/DRbMessage/cdesc-DRbMessage.yaml000064400000001311150403630020015337 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Handler for sending and receiving drb messages.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: The user does not have to directly deal with this object in normal use.
constants: []

full_name: DRb::DRbMessage
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: make_proxy
name: DRbMessage
superclass: Object
ri/1.8/system/DRb/DRbMessage/make_proxy-i.yaml000064400000000310150403630030014707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::DRbMessage#make_proxy
is_singleton: false
name: make_proxy
params: (obj, error=false)
visibility: private
ri/1.8/system/DRb/to_id-i.yaml000064400000000603150403630030011660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get a reference id for an object using the current server.
- !ruby/struct:SM::Flow::P 
  body: "This raises a DRbServerNotFound error if there is no current server. See #current_server."
full_name: DRb#to_id
is_singleton: false
name: to_id
params: (obj)
visibility: public
ri/1.8/system/DRb/install_id_conv-i.yaml000064400000000502150403630030013727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the default id conv object.
- !ruby/struct:SM::Flow::P 
  body: See DRbServer#default_id_conv.
full_name: DRb#install_id_conv
is_singleton: false
name: install_id_conv
params: (idconv)
visibility: public
ri/1.8/system/DRb/GWIdConv/to_obj-i.yaml000064400000000260150403630030013455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DRb::GWIdConv#to_obj
is_singleton: false
name: to_obj
params: (ref)
visibility: public
ri/1.8/system/DRb/GWIdConv/cdesc-GWIdConv.yaml000064400000000363150403630040014457 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: DRb::GWIdConv
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_obj
name: GWIdConv
superclass: DRbIdConv
ri/1.8/system/DRb/DRbUndumped/cdesc-DRbUndumped.yaml000064400000001065150403630040015741 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Mixin module making an object undumpable or unmarshallable.
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: DRb::DRbUndumped
includes: []

instance_methods: []

name: DRbUndumped
superclass: 
ri/1.8/system/Matrix/eql%3f-i.yaml000064400000000333150403630050012440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #=="
full_name: Matrix#eql?
is_singleton: false
name: eql?
params: (other)
visibility: public
ri/1.8/system/Matrix/tr-i.yaml000064400000000325150403630050012007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #trace"
full_name: Matrix#tr
is_singleton: false
name: tr
params: ()
visibility: public
ri/1.8/system/Matrix/t-i.yaml000064400000000327150403630050011627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #transpose"
full_name: Matrix#t
is_singleton: false
name: t
params: ()
visibility: public
ri/1.8/system/Matrix/%5b%5d-i.yaml000064400000000455150403630060012240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns element (<tt>i</tt>,<tt>j</tt>) of the matrix. That is: row <tt>i</tt>, column <tt>j</tt>."
full_name: Matrix#[]
is_singleton: false
name: "[]"
params: (i, j)
visibility: public
ri/1.8/system/Matrix/row_size-i.yaml000064400000000352150403630060013224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of rows.
full_name: Matrix#row_size
is_singleton: false
name: row_size
params: ()
visibility: public
ri/1.8/system/Matrix/%2a%2a-i.yaml000064400000000637150403630060012230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Matrix exponentiation. Defined for integer powers only. Equivalent to multiplying the matrix by itself N times.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[7,6], [3,9]] ** 2\n    =&gt; 67 96\n       48 99\n"
full_name: Matrix#**
is_singleton: false
name: "**"
params: (other)
visibility: public
ri/1.8/system/Matrix/determinant-i.yaml000064400000000654150403630060013702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: det
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the determinant of the matrix. If the matrix is not square, the result is 0.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[7,6], [3,9]].determinant\n    =&gt; 63\n"
full_name: Matrix#determinant
is_singleton: false
name: determinant
params: ()
visibility: public
ri/1.8/system/Matrix/column-i.yaml000064400000000570150403630060012662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: e
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns column vector number <tt>j</tt> of the matrix as a Vector (starting at 0 like an array). When a block is given, the elements of that vector are iterated.
full_name: Matrix#column
is_singleton: false
name: column
params: (j) {|e| ...}
visibility: public
ri/1.8/system/Matrix/coerce-i.yaml000064400000000352150403630070012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "FIXME: describe #coerce."
full_name: Matrix#coerce
is_singleton: false
name: coerce
params: (other)
visibility: public
ri/1.8/system/Matrix/regular%3f-i.yaml000064400000000401150403630070013316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if this is a regular matrix.
full_name: Matrix#regular?
is_singleton: false
name: regular?
params: ()
visibility: public
ri/1.8/system/Matrix/to_a-i.yaml000064400000000407150403630070012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of arrays that describe the rows of the matrix.
full_name: Matrix#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/Matrix/%2f-i.yaml000064400000000556150403630100011740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Matrix division (multiplication by the inverse).
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[7,6], [3,9]] / Matrix[[2,9], [3,1]]\n    =&gt; -7  1\n       -3 -6\n"
full_name: Matrix#/
is_singleton: false
name: /
params: (other)
visibility: public
ri/1.8/system/Matrix/row_vector-c.yaml000064400000000605150403630100013542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a single-row matrix where the values of that row are as given in <tt>row</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.row_vector([4,5,6])\n    =&gt; 4 5 6\n"
full_name: Matrix::row_vector
is_singleton: true
name: row_vector
params: (row)
visibility: public
ri/1.8/system/Matrix/identity-c.yaml000064400000000537150403630100013206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates an <tt>n</tt> by <tt>n</tt> identity matrix.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.identity(2)\n    =&gt; 1 0\n       0 1\n"
full_name: Matrix::identity
is_singleton: true
name: identity
params: (n)
visibility: public
ri/1.8/system/Matrix/minor-i.yaml000064400000001154150403630100012503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a section of the matrix. The parameters are either:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: start_row, nrows, start_col, ncols; OR
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: col_range, row_range
  type: :BULLET
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.diagonal(9, 5, -3).minor(0..1, 0..2)\n    =&gt; 9 0 0\n       0 5 0\n"
full_name: Matrix#minor
is_singleton: false
name: minor
params: (*param)
visibility: public
ri/1.8/system/Matrix/rows-c.yaml000064400000001052150403630100012340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a matrix where <tt>rows</tt> is an array of arrays, each of which is a row to the matrix. If the optional argument <tt>copy</tt> is false, use the given arrays as the internal structure of the matrix without copying.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.rows([[25, 93], [-1, 66]])\n     =&gt;  25 93\n         -1 66\n"
full_name: Matrix::rows
is_singleton: true
name: rows
params: (rows, copy = true)
visibility: public
ri/1.8/system/Matrix/hash-i.yaml000064400000000352150403630100012301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a hash-code for the matrix.
full_name: Matrix#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/Matrix/column_vectors-i.yaml000064400000000434150403630100014421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of the column vectors of the matrix. See Vector.
full_name: Matrix#column_vectors
is_singleton: false
name: column_vectors
params: ()
visibility: public
ri/1.8/system/Matrix/compare_by_row_vectors-i.yaml000064400000000433150403630100016132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Not really intended for general consumption.
full_name: Matrix#compare_by_row_vectors
is_singleton: false
name: compare_by_row_vectors
params: (rows)
visibility: public
ri/1.8/system/Matrix/collect-i.yaml000064400000000730150403630110013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: map
block_params: e
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a matrix that is the result of iteration of the given block over all elements of the matrix.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[ [1,2], [3,4] ].collect { |i| i**2 }\n    =&gt; 1  4\n       9 16\n"
full_name: Matrix#collect
is_singleton: false
name: collect
params: ( {|e| ...}
visibility: public
ri/1.8/system/Matrix/cdesc-Matrix.yaml000064400000017102150403630110013455 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: column_vector
- !ruby/object:RI::MethodSummary 
  name: columns
- !ruby/object:RI::MethodSummary 
  name: diagonal
- !ruby/object:RI::MethodSummary 
  name: identity
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: row_vector
- !ruby/object:RI::MethodSummary 
  name: rows
- !ruby/object:RI::MethodSummary 
  name: scalar
- !ruby/object:RI::MethodSummary 
  name: zero
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Matrix</tt> class represents a mathematical matrix, and provides methods for creating special-case matrices (zero, identity, diagonal, singular, vector), operating on them arithmetically and algebraically, and determining their mathematical properties (trace, rank, inverse, determinant).
- !ruby/struct:SM::Flow::P 
  body: Note that although matrices should theoretically be rectangular, this is not enforced by the class.
- !ruby/struct:SM::Flow::P 
  body: Also note that the determinant of integer matrices may be incorrectly calculated unless you also <tt>require 'mathn'</tt>. This may be fixed in the future.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Method Catalogue
- !ruby/struct:SM::Flow::P 
  body: "To create a matrix:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix[*rows] </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.[](*rows) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.rows(rows, copy = true) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.columns(columns) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.diagonal(*values) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.scalar(n, value) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.scalar(n, value) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.identity(n) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.unit(n) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.I(n) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.zero(n) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.row_vector(row) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Matrix.column_vector(column) </tt>
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "To access Matrix elements/columns/rows/submatrices/properties:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> [](i, j) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #row_size </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #column_size </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #row(i) </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #column(j) </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #collect </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #map </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #minor(*param) </tt>"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Properties of a matrix:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #regular? </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #singular? </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #square? </tt>"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Matrix arithmetic:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> *(m) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> +(m) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> -(m) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #/(m) </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #inverse </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #inv </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> ** </tt>
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Matrix functions:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #determinant </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #det </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #rank </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #trace </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #tr </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #transpose </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #t </tt>"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Conversion to other data types:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #coerce(other) </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #row_vectors </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #column_vectors </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #to_a </tt>"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "String representations:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #to_s </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #inspect </tt>"
  type: :BULLET
constants: []

full_name: Matrix
includes: 
- !ruby/object:RI::IncludedModule 
  name: ExceptionForMatrix
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: coerce
- !ruby/object:RI::MethodSummary 
  name: collect
- !ruby/object:RI::MethodSummary 
  name: column
- !ruby/object:RI::MethodSummary 
  name: column_size
- !ruby/object:RI::MethodSummary 
  name: column_vectors
- !ruby/object:RI::MethodSummary 
  name: compare_by_row_vectors
- !ruby/object:RI::MethodSummary 
  name: det
- !ruby/object:RI::MethodSummary 
  name: determinant
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: init_rows
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: inv
- !ruby/object:RI::MethodSummary 
  name: inverse
- !ruby/object:RI::MethodSummary 
  name: inverse_from
- !ruby/object:RI::MethodSummary 
  name: map
- !ruby/object:RI::MethodSummary 
  name: minor
- !ruby/object:RI::MethodSummary 
  name: rank
- !ruby/object:RI::MethodSummary 
  name: regular?
- !ruby/object:RI::MethodSummary 
  name: row
- !ruby/object:RI::MethodSummary 
  name: row_size
- !ruby/object:RI::MethodSummary 
  name: row_vectors
- !ruby/object:RI::MethodSummary 
  name: singular?
- !ruby/object:RI::MethodSummary 
  name: square?
- !ruby/object:RI::MethodSummary 
  name: t
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: tr
- !ruby/object:RI::MethodSummary 
  name: trace
- !ruby/object:RI::MethodSummary 
  name: transpose
name: Matrix
superclass: Object
ri/1.8/system/Matrix/%2a-i.yaml000064400000000514150403630110011726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Matrix multiplication.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[2,4], [6,8]] * Matrix.identity(2)\n    =&gt; 2 4\n       6 8\n"
full_name: Matrix#*
is_singleton: false
name: "*"
params: (m)
visibility: public
ri/1.8/system/Matrix/det-i.yaml000064400000000335150403630110012134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #determinant"
full_name: Matrix#det
is_singleton: false
name: det
params: ()
visibility: public
ri/1.8/system/Matrix/scalar-c.yaml000064400000000621150403630110012615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates an <tt>n</tt> by <tt>n</tt> diagonal matrix where each diagonal element is <tt>value</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.scalar(2, 5)\n    =&gt; 5 0\n       0 5\n"
full_name: Matrix::scalar
is_singleton: true
name: scalar
params: (n, value)
visibility: public
ri/1.8/system/Matrix/Scalar/cdesc-Scalar.yaml000064400000000364150403630120014626 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Private CLASS
constants: []

full_name: Matrix::Scalar
includes: []

instance_methods: []

name: Scalar
superclass: Numeric
ri/1.8/system/Matrix/transpose-i.yaml000064400000000722150403630120013377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: t
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the transpose of the matrix.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[1,2], [3,4], [5,6]]\n    =&gt; 1 2\n       3 4\n       5 6\n  Matrix[[1,2], [3,4], [5,6]].transpose\n    =&gt; 1 3 5\n       2 4 6\n"
full_name: Matrix#transpose
is_singleton: false
name: transpose
params: ()
visibility: public
ri/1.8/system/Matrix/inspect-i.yaml000064400000000345150403630120013027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Overrides Object#inspect
full_name: Matrix#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Matrix/init_rows-i.yaml000064400000000267150403630120013402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Matrix#init_rows
is_singleton: false
name: init_rows
params: (rows, copy)
visibility: private
ri/1.8/system/Matrix/square%3f-i.yaml000064400000000473150403630120013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> is this is a square matrix. See note in column_size about this being unreliable, though.
full_name: Matrix#square?
is_singleton: false
name: square?
params: ()
visibility: public
ri/1.8/system/Matrix/trace-i.yaml000064400000000600150403630120012452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: tr
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the trace (sum of diagonal elements) of the matrix.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[7,6], [3,9]].trace\n    =&gt; 16\n"
full_name: Matrix#trace
is_singleton: false
name: trace
params: ()
visibility: public
ri/1.8/system/Matrix/new-c.yaml000064400000000470150403630130012145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method is used by the other methods that create matrices, and is of no use to general users.
full_name: Matrix::new
is_singleton: true
name: new
params: (init_method, *argv)
visibility: public
ri/1.8/system/Matrix/row_vectors-i.yaml000064400000000423150403630130013734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of the row vectors of the matrix. See Vector.
full_name: Matrix#row_vectors
is_singleton: false
name: row_vectors
params: ()
visibility: public
ri/1.8/system/Matrix/inverse_from-i.yaml000064400000000365150403630130014063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Not for public consumption?
full_name: Matrix#inverse_from
is_singleton: false
name: inverse_from
params: (src)
visibility: public
ri/1.8/system/Matrix/inv-i.yaml000064400000000331150403630130012152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #inverse"
full_name: Matrix#inv
is_singleton: false
name: inv
params: ()
visibility: public
ri/1.8/system/Matrix/singular%3f-i.yaml000064400000000427150403630130013506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> is this is a singular (i.e. non-regular) matrix.
full_name: Matrix#singular?
is_singleton: false
name: singular?
params: ()
visibility: public
ri/1.8/system/Matrix/inverse-i.yaml000064400000000601150403630130013031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: inv
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the inverse of the matrix.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[1, 2], [2, 1]].inverse\n    =&gt; -1  1\n        0 -1\n"
full_name: Matrix#inverse
is_singleton: false
name: inverse
params: ()
visibility: public
ri/1.8/system/Matrix/column_vector-c.yaml000064400000000652150403630130014235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a single-column matrix where the values of that column are as given in <tt>column</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.column_vector([4,5,6])\n    =&gt; 4\n       5\n       6\n"
full_name: Matrix::column_vector
is_singleton: true
name: column_vector
params: (column)
visibility: public
ri/1.8/system/Matrix/column_size-i.yaml000064400000000663150403630130013715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of columns. Note that it is possible to construct a matrix with uneven columns (e.g. Matrix[ [1,2,3], [4,5] ]), but this is mathematically unsound. This method uses the first row to determine the result.
full_name: Matrix#column_size
is_singleton: false
name: column_size
params: ()
visibility: public
ri/1.8/system/Matrix/%2b-i.yaml000064400000000511150403630130011726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Matrix addition.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.scalar(2,5) + Matrix[[1,0], [-4,7]]\n    =&gt;  6  0\n       -4 12\n"
full_name: Matrix#+
is_singleton: false
name: +
params: (m)
visibility: public
ri/1.8/system/Matrix/zero-c.yaml000064400000000517150403630130012335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates an <tt>n</tt> by <tt>n</tt> zero matrix.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.zero(2)\n    =&gt; 0 0\n       0 0\n"
full_name: Matrix::zero
is_singleton: true
name: zero
params: (n)
visibility: public
ri/1.8/system/Matrix/rank-i.yaml000064400000000745150403630140012323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the rank of the matrix. Beware that using Float values, with their usual lack of precision, can affect the value returned by this method. Use Rational values instead if this is important to you.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[7,6], [3,9]].rank\n    =&gt; 2\n"
full_name: Matrix#rank
is_singleton: false
name: rank
params: ()
visibility: public
ri/1.8/system/Matrix/row-i.yaml000064400000000557150403630140012200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: e
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns row vector number <tt>i</tt> of the matrix as a Vector (starting at 0 like an array). When a block is given, the elements of that vector are iterated.
full_name: Matrix#row
is_singleton: false
name: row
params: (i) {|e| ...}
visibility: public
ri/1.8/system/Matrix/to_s-i.yaml000064400000000334150403630140012326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Overrides Object#to_s
full_name: Matrix#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Matrix/map-i.yaml000064400000000330150403630140012133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #collect"
full_name: Matrix#map
is_singleton: false
name: map
params: (
visibility: public
ri/1.8/system/Matrix/%3d%3d-i.yaml000064400000000475150403630140012237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: eql?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if and only if the two matrices contain equal elements.
full_name: Matrix#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/Matrix/clone-i.yaml000064400000000450150403630140012461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a clone of the matrix, so that the contents of each do not reference identical objects.
full_name: Matrix#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/Matrix/diagonal-c.yaml000064400000000640150403630140013132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a matrix where the diagonal elements are composed of <tt>values</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.diagonal(9, 5, -3)\n    =&gt;  9  0  0\n        0  5  0\n        0  0 -3\n"
full_name: Matrix::diagonal
is_singleton: true
name: diagonal
params: (*values)
visibility: public
ri/1.8/system/Matrix/columns-c.yaml000064400000000617150403630140013040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a matrix using <tt>columns</tt> as an array of column vectors.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix.columns([[25, 93], [-1, 66]])\n     =&gt;  25 -1\n         93 66\n"
full_name: Matrix::columns
is_singleton: true
name: columns
params: (columns)
visibility: public
ri/1.8/system/Matrix/%5b%5d-c.yaml000064400000000545150403630140012231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a matrix where each argument is a row.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[ [25, 93], [-1, 66] ]\n     =&gt;  25 93\n         -1 66\n"
full_name: Matrix::[]
is_singleton: true
name: "[]"
params: (*rows)
visibility: public
ri/1.8/system/Matrix/%2d-i.yaml000064400000000520150403630140011731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Matrix subtraction.
- !ruby/struct:SM::Flow::VERB 
  body: "  Matrix[[1,5], [4,2]] - Matrix[[9,3], [-4,1]]\n    =&gt; -8  2\n        8  1\n"
full_name: Matrix#-
is_singleton: false
name: "-"
params: (m)
visibility: public
ri/1.8/system/Delegator/method_missing-i.yaml000064400000000441150403630150015035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Handles the magic of delegation through __getobj__.
full_name: Delegator#method_missing
is_singleton: false
name: method_missing
params: (m, *args, &block)
visibility: public
ri/1.8/system/Delegator/__getobj__-i.yaml000064400000000504150403630150014072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method must be overridden by subclasses and should return the object method calls are being delegated to.
full_name: Delegator#__getobj__
is_singleton: false
name: __getobj__
params: ()
visibility: public
ri/1.8/system/Delegator/new-c.yaml000064400000000474150403630150012615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pass in the <em>obj</em> to delegate method calls to. All methods supported by <em>obj</em> will be delegated to.
full_name: Delegator::new
is_singleton: true
name: new
params: (obj)
visibility: public
ri/1.8/system/Delegator/respond_to%3f-i.yaml000064400000000524150403630150014500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Checks for a method provided by this the delegate object by fowarding the call through __getobj__.
full_name: Delegator#respond_to?
is_singleton: false
name: respond_to?
params: (m, include_private = false)
visibility: public
ri/1.8/system/Delegator/marshal_load-i.yaml000064400000000417150403630150014455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reinitializes delegation from a serialized object.
full_name: Delegator#marshal_load
is_singleton: false
name: marshal_load
params: (obj)
visibility: public
ri/1.8/system/Delegator/cdesc-Delegator.yaml000064400000001511150403630150014562 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Delegator is an abstract class used to build delegator pattern objects from subclasses. Subclasses should redefine __getobj__. For a concrete implementation, see SimpleDelegator.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: IgnoreBacktracePat
  value: "%r\"\\A#{Regexp.quote(__FILE__)}:\\d+:in `\""
full_name: Delegator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __getobj__
- !ruby/object:RI::MethodSummary 
  name: marshal_dump
- !ruby/object:RI::MethodSummary 
  name: marshal_load
- !ruby/object:RI::MethodSummary 
  name: method_missing
- !ruby/object:RI::MethodSummary 
  name: respond_to?
name: Delegator
superclass: Object
ri/1.8/system/Delegator/marshal_dump-i.yaml000064400000000426150403630150014503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Serialization support for the object returned by __getobj__.
full_name: Delegator#marshal_dump
is_singleton: false
name: marshal_dump
params: ()
visibility: public
ri/1.8/system/UnboundMethod/arity-i.yaml000064400000002403150403630160014022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an indication of the number of arguments accepted by a method. Returns a nonnegative integer for methods that take a fixed number of arguments. For Ruby methods that take a variable number of arguments, returns -n-1, where n is the number of required arguments. For methods written in C, returns -1 if the call takes a variable number of arguments.
- !ruby/struct:SM::Flow::VERB 
  body: "   class C\n     def one;    end\n     def two(a); end\n     def three(*a);  end\n     def four(a, b); end\n     def five(a, b, *c);    end\n     def six(a, b, *c, &amp;d); end\n   end\n   c = C.new\n   c.method(:one).arity     #=&gt; 0\n   c.method(:two).arity     #=&gt; 1\n   c.method(:three).arity   #=&gt; -1\n   c.method(:four).arity    #=&gt; 2\n   c.method(:five).arity    #=&gt; -3\n   c.method(:six).arity     #=&gt; -3\n\n   &quot;cat&quot;.method(:size).arity      #=&gt; 0\n   &quot;cat&quot;.method(:replace).arity   #=&gt; 1\n   &quot;cat&quot;.method(:squeeze).arity   #=&gt; -1\n   &quot;cat&quot;.method(:count).arity     #=&gt; -1\n"
full_name: UnboundMethod#arity
is_singleton: false
name: arity
params: |
  meth.arity    => fixnum

visibility: public
ri/1.8/system/UnboundMethod/cdesc-UnboundMethod.yaml000064400000004207150403630160016302 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Ruby supports two forms of objectified methods. Class <tt>Method</tt> is used to represent methods that are associated with a particular object: these method objects are bound to that object. Bound method objects for an object can be created using <tt>Object#method</tt>."
- !ruby/struct:SM::Flow::P 
  body: Ruby also supports unbound methods; methods objects that are not associated with a particular object. These can be created either by calling <tt>Module#instance_method</tt> or by calling <tt>unbind</tt> on a bound method object. The result of both of these is an <tt>UnboundMethod</tt> object.
- !ruby/struct:SM::Flow::P 
  body: Unbound methods can only be called after they are bound to an object. That object must be be a kind_of? the method's original class.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Square\n     def area\n       @side * @side\n     end\n     def initialize(side)\n       @side = side\n     end\n   end\n\n   area_un = Square.instance_method(:area)\n\n   s = Square.new(12)\n   area = area_un.bind(s)\n   area.call   #=&gt; 144\n"
- !ruby/struct:SM::Flow::P 
  body: "Unbound methods are a reference to the method at the time it was objectified: subsequent changes to the underlying class will not affect the unbound method."
- !ruby/struct:SM::Flow::VERB 
  body: "   class Test\n     def test\n       :original\n     end\n   end\n   um = Test.instance_method(:test)\n   class Test\n     def test\n       :modified\n     end\n   end\n   t = Test.new\n   t.test            #=&gt; :modified\n   um.bind(t).call   #=&gt; :original\n"
constants: []

full_name: UnboundMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: arity
- !ruby/object:RI::MethodSummary 
  name: bind
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: owner
- !ruby/object:RI::MethodSummary 
  name: to_s
name: UnboundMethod
superclass: Object
ri/1.8/system/UnboundMethod/inspect-i.yaml000064400000000672150403630160014345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show the name of the underlying method.
- !ruby/struct:SM::Flow::VERB 
  body: "  &quot;cat&quot;.method(:count).inspect   #=&gt; &quot;#&lt;Method: String#count&gt;&quot;\n"
full_name: UnboundMethod#inspect
is_singleton: false
name: inspect
params: |
  meth.to_s      =>  string
  meth.inspect   =>  string

visibility: public
ri/1.8/system/UnboundMethod/owner-i.yaml000064400000000447150403630160014032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the class or module that defines the method.
full_name: UnboundMethod#owner
is_singleton: false
name: owner
params: |
  meth.owner    => class_or_module

visibility: public
ri/1.8/system/UnboundMethod/bind-i.yaml000064400000001707150403630170013615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Bind <em>umeth</em> to <em>obj</em>. If <tt>Klass</tt> was the class from which <em>umeth</em> was obtained, <tt>obj.kind_of?(Klass)</tt> must be true.
- !ruby/struct:SM::Flow::VERB 
  body: "   class A\n     def test\n       puts &quot;In test, class = #{self.class}&quot;\n     end\n   end\n   class B &lt; A\n   end\n   class C &lt; B\n   end\n\n   um = B.instance_method(:test)\n   bm = um.bind(C.new)\n   bm.call\n   bm = um.bind(B.new)\n   bm.call\n   bm = um.bind(A.new)\n   bm.call\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   In test, class = C\n   In test, class = B\n   prog.rb:16:in `bind': bind argument must be an instance of B (TypeError)\n    from prog.rb:16\n"
full_name: UnboundMethod#bind
is_singleton: false
name: bind
params: |
  umeth.bind(obj) -> method

visibility: public
ri/1.8/system/UnboundMethod/to_s-i.yaml000064400000000664150403630170013646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show the name of the underlying method.
- !ruby/struct:SM::Flow::VERB 
  body: "  &quot;cat&quot;.method(:count).inspect   #=&gt; &quot;#&lt;Method: String#count&gt;&quot;\n"
full_name: UnboundMethod#to_s
is_singleton: false
name: to_s
params: |
  meth.to_s      =>  string
  meth.inspect   =>  string

visibility: public
ri/1.8/system/UnboundMethod/%3d%3d-i.yaml000064400000000515150403630170013544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Two method objects are equal if that are bound to the same object and contain the same body.
full_name: UnboundMethod#==
is_singleton: false
name: ==
params: |
  meth == other_meth  => true or false

visibility: public
ri/1.8/system/UnboundMethod/clone-i.yaml000064400000000350150403630170013772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "MISSING: documentation"
full_name: UnboundMethod#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/UnboundMethod/name-i.yaml000064400000000406150403630200013606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the method.
full_name: UnboundMethod#name
is_singleton: false
name: name
params: |
  meth.name    => string

visibility: public
ri/1.8/system/Math/frexp-c.yaml000064400000001053150403630200012121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a two-element array containing the normalized fraction (a <tt>Float</tt>) and exponent (a <tt>Fixnum</tt>) of <em>numeric</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   fraction, exponent = Math.frexp(1234)   #=&gt; [0.6025390625, 11]\n   fraction * 2**exponent                  #=&gt; 1234.0\n"
full_name: Math::frexp
is_singleton: true
name: frexp
params: |
  Math.frexp(numeric)    => [ fraction, exponent ]

visibility: public
ri/1.8/system/Math/rsqrt-i.yaml000064400000000243150403630200012156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#rsqrt
is_singleton: false
name: rsqrt
params: (a)
visibility: public
ri/1.8/system/Math/tan-c.yaml000064400000000426150403630210011563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the tangent of <em>x</em> (expressed in radians).
full_name: Math::tan
is_singleton: true
name: tan
params: |
  Math.tan(x)    => float

visibility: public
ri/1.8/system/Math/tanh-c.yaml000064400000000444150403630210011733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the hyperbolic tangent of <em>x</em> (expressed in radians).
full_name: Math::tanh
is_singleton: true
name: tanh
params: |
  Math.tanh()    => float

visibility: public
ri/1.8/system/Math/ldexp-c.yaml000064400000000642150403630210012115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of <em>flt</em>*(2**<em>int</em>).
- !ruby/struct:SM::Flow::VERB 
  body: "   fraction, exponent = Math.frexp(1234)\n   Math.ldexp(fraction, exponent)   #=&gt; 1234.0\n"
full_name: Math::ldexp
is_singleton: true
name: ldexp
params: |
  Math.ldexp(flt, int) -> float

visibility: public
ri/1.8/system/Math/acos-c.yaml000064400000000425150403630210011725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the arc cosine of <em>x</em>. Returns 0..PI.
full_name: Math::acos
is_singleton: true
name: acos
params: |
  Math.acos(x)    => float

visibility: public
ri/1.8/system/Math/hypot-c.yaml000064400000000634150403630220012146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns sqrt(x**2 + y**2), the hypotenuse of a right-angled triangle with sides <em>x</em> and <em>y</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Math.hypot(3, 4)   #=&gt; 5.0\n"
full_name: Math::hypot
is_singleton: true
name: hypot
params: |
  Math.hypot(x, y)    => float

visibility: public
ri/1.8/system/Math/cdesc-Math.yaml000064400000005144150403630220012534 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: acos
- !ruby/object:RI::MethodSummary 
  name: acosh
- !ruby/object:RI::MethodSummary 
  name: asin
- !ruby/object:RI::MethodSummary 
  name: asinh
- !ruby/object:RI::MethodSummary 
  name: atan
- !ruby/object:RI::MethodSummary 
  name: atan2
- !ruby/object:RI::MethodSummary 
  name: atanh
- !ruby/object:RI::MethodSummary 
  name: cos
- !ruby/object:RI::MethodSummary 
  name: cosh
- !ruby/object:RI::MethodSummary 
  name: erf
- !ruby/object:RI::MethodSummary 
  name: erfc
- !ruby/object:RI::MethodSummary 
  name: exp
- !ruby/object:RI::MethodSummary 
  name: frexp
- !ruby/object:RI::MethodSummary 
  name: hypot
- !ruby/object:RI::MethodSummary 
  name: ldexp
- !ruby/object:RI::MethodSummary 
  name: log
- !ruby/object:RI::MethodSummary 
  name: log10
- !ruby/object:RI::MethodSummary 
  name: sin
- !ruby/object:RI::MethodSummary 
  name: sinh
- !ruby/object:RI::MethodSummary 
  name: sqrt
- !ruby/object:RI::MethodSummary 
  name: tan
- !ruby/object:RI::MethodSummary 
  name: tanh
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Math</tt> module contains module functions for basic trigonometric and transcendental functions. See class <tt>Float</tt> for a list of constants that define Ruby's floating point accuracy.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: PI
  value: rb_float_new(M_PI)
- !ruby/object:RI::Constant 
  comment: 
  name: PI
  value: rb_float_new(atan(1.0)*4.0)
- !ruby/object:RI::Constant 
  comment: 
  name: E
  value: rb_float_new(M_E)
- !ruby/object:RI::Constant 
  comment: 
  name: E
  value: rb_float_new(exp(1.0))
full_name: Math
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: acos
- !ruby/object:RI::MethodSummary 
  name: acosh
- !ruby/object:RI::MethodSummary 
  name: asin
- !ruby/object:RI::MethodSummary 
  name: asinh
- !ruby/object:RI::MethodSummary 
  name: atan
- !ruby/object:RI::MethodSummary 
  name: atan2
- !ruby/object:RI::MethodSummary 
  name: atanh
- !ruby/object:RI::MethodSummary 
  name: cos
- !ruby/object:RI::MethodSummary 
  name: cosh
- !ruby/object:RI::MethodSummary 
  name: exp
- !ruby/object:RI::MethodSummary 
  name: log
- !ruby/object:RI::MethodSummary 
  name: log10
- !ruby/object:RI::MethodSummary 
  name: rsqrt
- !ruby/object:RI::MethodSummary 
  name: sin
- !ruby/object:RI::MethodSummary 
  name: sinh
- !ruby/object:RI::MethodSummary 
  name: sqrt
- !ruby/object:RI::MethodSummary 
  name: sqrt
- !ruby/object:RI::MethodSummary 
  name: tan
- !ruby/object:RI::MethodSummary 
  name: tanh
name: Math
superclass: 
ri/1.8/system/Math/erfc-c.yaml000064400000000417150403630220011721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calculates the complementary error function of x.
full_name: Math::erfc
is_singleton: true
name: erfc
params: |
  Math.erfc(x)  => float

visibility: public
ri/1.8/system/Math/log-c.yaml000064400000000425150403630230011563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the natural logarithm of <em>numeric</em>.
full_name: Math::log
is_singleton: true
name: log
params: |
  Math.log(numeric)    => float

visibility: public
ri/1.8/system/Math/sqrt-i.yaml000064400000000241150403630230011775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#sqrt
is_singleton: false
name: sqrt
params: (a)
visibility: public
ri/1.8/system/Math/sinh-c.yaml000064400000000442150403630230011742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the hyperbolic sine of <em>x</em> (expressed in radians).
full_name: Math::sinh
is_singleton: true
name: sinh
params: |
  Math.sinh(x)    => float

visibility: public
ri/1.8/system/Math/sinh-i.yaml000064400000000241150403630240011746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#sinh
is_singleton: false
name: sinh
params: (z)
visibility: public
ri/1.8/system/Math/atan2-i.yaml000064400000000245150403630240012016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#atan2
is_singleton: false
name: atan2
params: (y,x)
visibility: public
ri/1.8/system/Math/asin-i.yaml000064400000000241150403630240011737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#asin
is_singleton: false
name: asin
params: (z)
visibility: public
ri/1.8/system/Math/log10-i.yaml000064400000000357150403630240011737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Redefined to handle a Complex argument.
full_name: Math#log10
is_singleton: false
name: log10
params: (z)
visibility: public
ri/1.8/system/Math/cosh-c.yaml000064400000000444150403630240011740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the hyperbolic cosine of <em>x</em> (expressed in radians).
full_name: Math::cosh
is_singleton: true
name: cosh
params: |
  Math.cosh(x)    => float

visibility: public
ri/1.8/system/Math/atanh-c.yaml000064400000000431150403630240012073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the inverse hyperbolic tangent of <em>x</em>.
full_name: Math::atanh
is_singleton: true
name: atanh
params: |
  Math.atanh(x)    => float

visibility: public
ri/1.8/system/Math/cosh-i.yaml000064400000000241150403630250011742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#cosh
is_singleton: false
name: cosh
params: (z)
visibility: public
ri/1.8/system/Math/acosh-c.yaml000064400000000430150403630250012075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the inverse hyperbolic cosine of <em>x</em>.
full_name: Math::acosh
is_singleton: true
name: acosh
params: |
  Math.acosh(x)    => float

visibility: public
ri/1.8/system/Math/asin-c.yaml000064400000000437150403630250011741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the arc sine of <em>x</em>. Returns -{PI/2} .. {PI/2}.
full_name: Math::asin
is_singleton: true
name: asin
params: |
  Math.asin(x)    => float

visibility: public
ri/1.8/system/Math/tan-i.yaml000064400000000353150403630260011575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Redefined to handle a Complex argument.
full_name: Math#tan
is_singleton: false
name: tan
params: (z)
visibility: public
ri/1.8/system/Math/log-i.yaml000064400000000353150403630260011574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Redefined to handle a Complex argument.
full_name: Math#log
is_singleton: false
name: log
params: (z)
visibility: public
ri/1.8/system/Math/atanh-i.yaml000064400000000243150403630260012104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#atanh
is_singleton: false
name: atanh
params: (z)
visibility: public
ri/1.8/system/Math/cos-i.yaml000064400000000353150403630270011600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Redefined to handle a Complex argument.
full_name: Math#cos
is_singleton: false
name: cos
params: (z)
visibility: public
ri/1.8/system/Math/log10-c.yaml000064400000000433150403630270011727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the base 10 logarithm of <em>numeric</em>.
full_name: Math::log10
is_singleton: true
name: log10
params: |
  Math.log10(numeric)    => float

visibility: public
ri/1.8/system/Math/cos-c.yaml000064400000000445150403630270011574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the cosine of <em>x</em> (expressed in radians). Returns -1..1.
full_name: Math::cos
is_singleton: true
name: cos
params: |
  Math.cos(x)    => float

visibility: public
ri/1.8/system/Math/exp-c.yaml000064400000000352150403630300011573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns e**x.
full_name: Math::exp
is_singleton: true
name: exp
params: |
  Math.exp(x)    => float

visibility: public
ri/1.8/system/Math/asinh-c.yaml000064400000000426150403630300012103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the inverse hyperbolic sine of <em>x</em>.
full_name: Math::asinh
is_singleton: true
name: asinh
params: |
  Math.asinh(x)    => float

visibility: public
ri/1.8/system/Math/tanh-i.yaml000064400000000241150403630300011734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#tanh
is_singleton: false
name: tanh
params: (z)
visibility: public
ri/1.8/system/Math/acos-i.yaml000064400000000241150403630300011727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#acos
is_singleton: false
name: acos
params: (z)
visibility: public
ri/1.8/system/Math/erf-c.yaml000064400000000376150403630300011561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calculates the error function of x.
full_name: Math::erf
is_singleton: true
name: erf
params: |
  Math.erf(x)  => float

visibility: public
ri/1.8/system/Math/atan-i.yaml000064400000000241150403630310011726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#atan
is_singleton: false
name: atan
params: (z)
visibility: public
ri/1.8/system/Math/sin-i.yaml000064400000000353150403630310011600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Redefined to handle a Complex argument.
full_name: Math#sin
is_singleton: false
name: sin
params: (z)
visibility: public
ri/1.8/system/Math/acosh-i.yaml000064400000000243150403630310012102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#acosh
is_singleton: false
name: acosh
params: (z)
visibility: public
ri/1.8/system/Math/asinh-i.yaml000064400000000243150403630310012107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Math#asinh
is_singleton: false
name: asinh
params: (z)
visibility: public
ri/1.8/system/Math/sqrt-c.yaml000064400000000437150403630310011775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the non-negative square root of <em>numeric</em>.
full_name: Math::sqrt
is_singleton: true
name: sqrt
params: |
  Math.sqrt(numeric)    => float

visibility: public
ri/1.8/system/Math/exp-i.yaml000064400000000353150403630320011604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Redefined to handle a Complex argument.
full_name: Math#exp
is_singleton: false
name: exp
params: (z)
visibility: public
ri/1.8/system/Math/atan-c.yaml000064400000000442150403630320011724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the arc tangent of <em>x</em>. Returns -{PI/2} .. {PI/2}.
full_name: Math::atan
is_singleton: true
name: atan
params: |
  Math.atan(x)    => float

visibility: public
ri/1.8/system/Math/atan2-c.yaml000064400000000456150403630320012013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the arc tangent given <em>y</em> and <em>x</em>. Returns -PI..PI.
full_name: Math::atan2
is_singleton: true
name: atan2
params: |
  Math.atan2(y, x)  => float

visibility: public
ri/1.8/system/Math/sin-c.yaml000064400000000443150403630320011573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Computes the sine of <em>x</em> (expressed in radians). Returns -1..1.
full_name: Math::sin
is_singleton: true
name: sin
params: |
  Math.sin(x)    => float

visibility: public
ri/1.8/system/InvalidOption/cdesc-InvalidOption.yaml000064400000000420150403630320016301 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises when switch is undefined.
constants: []

full_name: InvalidOption
includes: []

instance_methods: []

name: InvalidOption
superclass: ParseError
ri/1.8/system/URI/FTP/typecode%3d-i.yaml000064400000000266150403630330013323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::FTP#typecode=
is_singleton: false
name: typecode=
params: (typecode)
visibility: public
ri/1.8/system/URI/FTP/path-i.yaml000064400000001675150403630330012154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the path from an FTP URI.
- !ruby/struct:SM::Flow::P 
  body: "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:"
- !ruby/struct:SM::Flow::VERB 
  body: "    ftp://ftp.example.com/pub/ruby\n"
- !ruby/struct:SM::Flow::P 
  body: The above URI indicates that the client should connect to ftp.example.com then cd pub/ruby from the initial login directory.
- !ruby/struct:SM::Flow::P 
  body: "If you want to cd to an absolute directory, you must include an escaped / (%2F) in the path. Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "    ftp://ftp.example.com/%2Fpub/ruby\n"
- !ruby/struct:SM::Flow::P 
  body: This method will then return &quot;/pub/ruby&quot;
full_name: URI::FTP#path
is_singleton: false
name: path
params: ()
visibility: public
ri/1.8/system/URI/FTP/build-c.yaml000064400000002472150403630330012305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Creates a new URI::FTP object from components, with syntax checking.
- !ruby/struct:SM::Flow::P 
  body: The components accepted are <tt>userinfo</tt>, <tt>host</tt>, <tt>port</tt>, <tt>path</tt> and <tt>typecode</tt>.
- !ruby/struct:SM::Flow::P 
  body: The components should be provided either as an Array, or as a Hash with keys formed by preceding the component names with a colon.
- !ruby/struct:SM::Flow::P 
  body: If an Array is used, the components must be passed in the order [userinfo, host, port, path, typecode]
- !ruby/struct:SM::Flow::P 
  body: "If the path supplied is absolute, it will be escaped in order to make it absolute in the URI. Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'uri'\n\n    uri = URI::FTP.build(['user:password', 'ftp.example.com', nil,\n      '/path/file.&gt; zip', 'i'])\n    puts uri.to_s  -&gt;  ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=a\n\n    uri2 = URI::FTP.build({:host =&gt; 'ftp.example.com',\n      :path =&gt; 'ruby/src'})\n    puts uri2.to_s  -&gt;  ftp://ftp.example.com/ruby/src\n"
full_name: URI::FTP::build
is_singleton: true
name: build
params: (args)
visibility: public
ri/1.8/system/URI/FTP/new-c.yaml000064400000001325150403630330011773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Creates a new URI::FTP object from generic URL components with no syntax checking.
- !ruby/struct:SM::Flow::P 
  body: Unlike build(), this method does not escape the path component as required by RFC1738; instead it is treated as per RFC2396.
- !ruby/struct:SM::Flow::P 
  body: Arguments are <tt>scheme</tt>, <tt>userinfo</tt>, <tt>host</tt>, <tt>port</tt>, <tt>registry</tt>, <tt>path</tt>, <tt>opaque</tt>, <tt>query</tt> and <tt>fragment</tt>, in that order.
full_name: URI::FTP::new
is_singleton: true
name: new
params: (*arg)
visibility: public
ri/1.8/system/URI/FTP/check_typecode-i.yaml000064400000000272150403630340014162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::FTP#check_typecode
is_singleton: false
name: check_typecode
params: (v)
visibility: private
ri/1.8/system/URI/FTP/new2-c.yaml000064400000000346150403630340012060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::FTP::new2
is_singleton: true
name: new2
params: (user, password, host, port, path, typecode = nil, arg_check = true)
visibility: public
ri/1.8/system/URI/FTP/set_typecode-i.yaml000064400000000270150403630340013676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::FTP#set_typecode
is_singleton: false
name: set_typecode
params: (v)
visibility: protected
ri/1.8/system/URI/FTP/to_s-i.yaml000064400000000244150403630340012154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::FTP#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/URI/FTP/cdesc-FTP.yaml000064400000003307150403630340012475 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: typecode
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: build
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new2
comment: 
- !ruby/struct:SM::Flow::P 
  body: FTP URI syntax is defined by RFC1738 section 3.2.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_PORT
  value: "21"
- !ruby/object:RI::Constant 
  comment: 
  name: COMPONENT
  value: "[       :scheme,        :userinfo, :host, :port,       :path, :typecode"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Typecode is &quot;a&quot;, &quot;i&quot; or &quot;d&quot;.
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "*"
      body: "&quot;a&quot; indicates a text file (the FTP command was ASCII)"
    - !ruby/struct:SM::Flow::LI 
      label: "*"
      body: "&quot;i&quot; indicates a binary file (FTP command IMAGE)"
    - !ruby/struct:SM::Flow::LI 
      label: "*"
      body: "&quot;d&quot; indicates the contents of a directory should be displayed"
    type: :BULLET
  name: TYPECODE
  value: "['a', 'i', 'd'].freeze"
- !ruby/object:RI::Constant 
  comment: 
  name: TYPECODE_PREFIX
  value: "';type='.freeze"
full_name: URI::FTP
includes: 
- !ruby/object:RI::IncludedModule 
  name: OpenURI::OpenRead
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_typecode
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: set_typecode
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: typecode=
name: FTP
superclass: Object
ri/1.8/system/URI/HTTPS/cdesc-HTTPS.yaml000064400000000707150403630350013221 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_PORT
  value: "443"
full_name: URI::HTTPS
includes: []

instance_methods: []

name: HTTPS
superclass: HTTP
ri/1.8/system/URI/cdesc-URI.yaml000064400000002254150403630350012053 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: extract
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: regexp
- !ruby/object:RI::MethodSummary 
  name: split
comment: 
- !ruby/struct:SM::Flow::P 
  body: URI support for Ruby
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Author:"
    body: Akira Yamada &lt;akira@ruby-lang.org&gt;
  - !ruby/struct:SM::Flow::LI 
    label: "Documentation:"
    body: Akira Yamada &lt;akira@ruby-lang.org&gt;, Dmitry V. Sabanin &lt;sdmitry@lrn.ru&gt;
  - !ruby/struct:SM::Flow::LI 
    label: "License:"
    body: Copyright (c) 2001 akira yamada &lt;akira@ruby-lang.org&gt; You can redistribute it and/or modify it under the same term as Ruby.
  - !ruby/struct:SM::Flow::LI 
    label: "Revision:"
    body: "$Id: uri.rb 16038 2008-04-15 09:41:47Z kazu $"
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: See URI for documentation
constants: []

full_name: URI
includes: 
- !ruby/object:RI::IncludedModule 
  name: REGEXP
instance_methods: []

name: URI
superclass: 
ri/1.8/system/URI/REGEXP/PATTERN/cdesc-PATTERN.yaml000064400000000403150403630360014633 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Patterns used to parse URI's
constants: []

full_name: URI::REGEXP::PATTERN
includes: []

instance_methods: []

name: PATTERN
superclass: 
ri/1.8/system/URI/REGEXP/cdesc-REGEXP.yaml000064400000000270150403630370013376 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: URI::REGEXP
includes: []

instance_methods: []

name: REGEXP
superclass: 
ri/1.8/system/URI/InvalidURIError/cdesc-InvalidURIError.yaml000064400000000376150403630370017361 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Not a URI.
constants: []

full_name: URI::InvalidURIError
includes: []

instance_methods: []

name: InvalidURIError
superclass: Error
ri/1.8/system/URI/LDAPS/cdesc-LDAPS.yaml000064400000000707150403630370013125 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_PORT
  value: "636"
full_name: URI::LDAPS
includes: []

instance_methods: []

name: LDAPS
superclass: LDAP
ri/1.8/system/URI/InvalidComponentError/cdesc-InvalidComponentError.yaml000064400000000424150403630400022153 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Not a URI component.
constants: []

full_name: URI::InvalidComponentError
includes: []

instance_methods: []

name: InvalidComponentError
superclass: Error
ri/1.8/system/URI/Error/cdesc-Error.yaml000064400000000412150403630410013565 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Base class for all URI exceptions.
constants: []

full_name: URI::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/URI/parse-c.yaml000064400000002237150403630410011665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  URI::parse(uri_str)\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+uri_str+:"
    body: String with URI.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Creates one of the URI's subclasses instance from the string.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Raises
- !ruby/struct:SM::Flow::P 
  body: URI::InvalidURIError
- !ruby/struct:SM::Flow::VERB 
  body: "  Raised if URI given is not a correct one.\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  uri = URI.parse(&quot;http://www.ruby-lang.org/&quot;)\n  p uri\n  # =&gt; #&lt;URI::HTTP:0x202281be URL:http://www.ruby-lang.org/&gt;\n  p uri.scheme\n  # =&gt; &quot;http&quot;\n  p uri.host\n  # =&gt; &quot;www.ruby-lang.org&quot;\n"
full_name: URI::parse
is_singleton: true
name: parse
params: (uri)
visibility: public
ri/1.8/system/URI/join-c.yaml000064400000001513150403630410011506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  URI::join(str[, str, ...])\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+str+:"
    body: String(s) to work with
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Joins URIs.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  p URI.join(&quot;http://localhost/&quot;,&quot;main.rbx&quot;)\n  # =&gt; #&lt;URI::HTTP:0x2022ac02 URL:http://localhost/main.rbx&gt;\n"
full_name: URI::join
is_singleton: true
name: join
params: (*str)
visibility: public
ri/1.8/system/URI/split-c.yaml000064400000002041150403630410011677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  URI::split(uri)\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+uri+:"
    body: String with URI.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: "Splits the string on following parts and returns array with result:"
- !ruby/struct:SM::Flow::VERB 
  body: "  * Scheme\n  * Userinfo\n  * Host\n  * Port\n  * Registry\n  * Path\n  * Opaque\n  * Query\n  * Fragment\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  p URI.split(&quot;http://www.ruby-lang.org/&quot;)\n  # =&gt; [&quot;http&quot;, nil, &quot;www.ruby-lang.org&quot;, nil, nil, &quot;/&quot;, nil, nil, nil]\n"
full_name: URI::split
is_singleton: true
name: split
params: (uri)
visibility: public
ri/1.8/system/URI/Util/cdesc-Util.yaml000064400000000264150403630420013243 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: URI::Util
includes: []

instance_methods: []

name: Util
superclass: 
ri/1.8/system/URI/Generic/set_host-i.yaml000064400000000264150403630430013765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_host
is_singleton: false
name: set_host
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/route_to-i.yaml000064400000001416150403630430013775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+oth+:"
    body: URI or String
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Calculates relative path to oth from self
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  uri = URI.parse('http://my.example.com')\n  p uri.route_to('http://my.example.com/main.rbx?page=1')\n  #=&gt; #&lt;URI::Generic:0x2020c2f6 URL:/main.rbx?page=1&gt;\n"
full_name: URI::Generic#route_to
is_singleton: false
name: route_to
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/find_proxy-i.yaml000064400000001440150403630430014313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) are examined too.
- !ruby/struct:SM::Flow::P 
  body: "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."
full_name: URI::Generic#find_proxy
is_singleton: false
name: find_proxy
params: ()
visibility: public
ri/1.8/system/URI/Generic/check_opaque-i.yaml000064400000000272150403630430014563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_opaque
is_singleton: false
name: check_opaque
params: (v)
visibility: private
ri/1.8/system/URI/Generic/eql%3f-i.yaml000064400000000253150403630430013212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#eql?
is_singleton: false
name: eql?
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/check_fragment-i.yaml000064400000000276150403630440015101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_fragment
is_singleton: false
name: check_fragment
params: (v)
visibility: private
ri/1.8/system/URI/Generic/set_scheme-i.yaml000064400000000270150403630440014252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_scheme
is_singleton: false
name: set_scheme
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/cdesc-Generic.yaml000064400000011725150403630440014347 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: fragment
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: host
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: opaque
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: path
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: query
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: registry
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: scheme
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: build
- !ruby/object:RI::MethodSummary 
  name: build2
- !ruby/object:RI::MethodSummary 
  name: component
- !ruby/object:RI::MethodSummary 
  name: default_port
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: use_registry
comment: 
- !ruby/struct:SM::Flow::P 
  body: Base class for all URI classes. Implements generic URI syntax as per RFC 2396.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_PORT
  value: nil
- !ruby/object:RI::Constant 
  comment: 
  name: COMPONENT
  value: "[       :scheme,        :userinfo, :host, :port, :registry,        :path, :opaque,        :query,        :fragment"
- !ruby/object:RI::Constant 
  comment: 
  name: USE_REGISTRY
  value: "false"
full_name: URI::Generic
includes: 
- !ruby/object:RI::IncludedModule 
  name: URI
- !ruby/object:RI::IncludedModule 
  name: REGEXP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: absolute
- !ruby/object:RI::MethodSummary 
  name: absolute?
- !ruby/object:RI::MethodSummary 
  name: check_fragment
- !ruby/object:RI::MethodSummary 
  name: check_host
- !ruby/object:RI::MethodSummary 
  name: check_opaque
- !ruby/object:RI::MethodSummary 
  name: check_password
- !ruby/object:RI::MethodSummary 
  name: check_path
- !ruby/object:RI::MethodSummary 
  name: check_port
- !ruby/object:RI::MethodSummary 
  name: check_query
- !ruby/object:RI::MethodSummary 
  name: check_registry
- !ruby/object:RI::MethodSummary 
  name: check_scheme
- !ruby/object:RI::MethodSummary 
  name: check_user
- !ruby/object:RI::MethodSummary 
  name: check_userinfo
- !ruby/object:RI::MethodSummary 
  name: coerce
- !ruby/object:RI::MethodSummary 
  name: component
- !ruby/object:RI::MethodSummary 
  name: component_ary
- !ruby/object:RI::MethodSummary 
  name: default_port
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: escape_userpass
- !ruby/object:RI::MethodSummary 
  name: find_proxy
- !ruby/object:RI::MethodSummary 
  name: fragment=
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: hierarchical?
- !ruby/object:RI::MethodSummary 
  name: host=
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: merge
- !ruby/object:RI::MethodSummary 
  name: merge!
- !ruby/object:RI::MethodSummary 
  name: merge0
- !ruby/object:RI::MethodSummary 
  name: merge_path
- !ruby/object:RI::MethodSummary 
  name: normalize
- !ruby/object:RI::MethodSummary 
  name: normalize!
- !ruby/object:RI::MethodSummary 
  name: opaque=
- !ruby/object:RI::MethodSummary 
  name: password
- !ruby/object:RI::MethodSummary 
  name: password=
- !ruby/object:RI::MethodSummary 
  name: path=
- !ruby/object:RI::MethodSummary 
  name: path_query
- !ruby/object:RI::MethodSummary 
  name: port=
- !ruby/object:RI::MethodSummary 
  name: query=
- !ruby/object:RI::MethodSummary 
  name: registry=
- !ruby/object:RI::MethodSummary 
  name: relative?
- !ruby/object:RI::MethodSummary 
  name: replace!
- !ruby/object:RI::MethodSummary 
  name: route_from
- !ruby/object:RI::MethodSummary 
  name: route_from0
- !ruby/object:RI::MethodSummary 
  name: route_from_path
- !ruby/object:RI::MethodSummary 
  name: route_to
- !ruby/object:RI::MethodSummary 
  name: scheme=
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: set_fragment
- !ruby/object:RI::MethodSummary 
  name: set_host
- !ruby/object:RI::MethodSummary 
  name: set_opaque
- !ruby/object:RI::MethodSummary 
  name: set_password
- !ruby/object:RI::MethodSummary 
  name: set_path
- !ruby/object:RI::MethodSummary 
  name: set_port
- !ruby/object:RI::MethodSummary 
  name: set_query
- !ruby/object:RI::MethodSummary 
  name: set_registry
- !ruby/object:RI::MethodSummary 
  name: set_scheme
- !ruby/object:RI::MethodSummary 
  name: set_user
- !ruby/object:RI::MethodSummary 
  name: set_userinfo
- !ruby/object:RI::MethodSummary 
  name: split_path
- !ruby/object:RI::MethodSummary 
  name: split_userinfo
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: user
- !ruby/object:RI::MethodSummary 
  name: user=
- !ruby/object:RI::MethodSummary 
  name: userinfo
- !ruby/object:RI::MethodSummary 
  name: userinfo=
name: Generic
superclass: Object
ri/1.8/system/URI/Generic/merge-i.yaml000064400000001445150403630440013237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: +
block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+oth+:"
    body: URI or String
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Merges two URI's.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  uri = URI.parse(&quot;http://my.example.com&quot;)\n  p uri.merge(&quot;/main.rbx?page=1&quot;)\n  # =&gt;  #&lt;URI::HTTP:0x2021f3b0 URL:http://my.example.com/main.rbx?page=1&gt;\n"
full_name: URI::Generic#merge
is_singleton: false
name: merge
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/coerce-i.yaml000064400000000257150403630440013400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#coerce
is_singleton: false
name: coerce
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/select-i.yaml000064400000001525150403630440013416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+components+:"
    body: Multiple Symbol arguments defined in URI::HTTP
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Selects specified components from URI
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')\n  p uri.select(:userinfo, :host, :path)\n  # =&gt; [&quot;myuser:mypass&quot;, &quot;my.example.com&quot;, &quot;/test.rbx&quot;]\n"
full_name: URI::Generic#select
is_singleton: false
name: select
params: (*components)
visibility: public
ri/1.8/system/URI/Generic/merge_path-i.yaml000064400000000276150403630450014255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#merge_path
is_singleton: false
name: merge_path
params: (base, rel)
visibility: private
ri/1.8/system/URI/Generic/path_query-i.yaml000064400000000265150403630450014321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#path_query
is_singleton: false
name: path_query
params: ()
visibility: private
ri/1.8/system/URI/Generic/port%3d-i.yaml000064400000000253150403630450013415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#port=
is_singleton: false
name: port=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/set_registry-i.yaml000064400000000274150403630450014663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_registry
is_singleton: false
name: set_registry
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/default_port-c.yaml000064400000000361150403630450014617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns default port
full_name: URI::Generic::default_port
is_singleton: true
name: default_port
params: ()
visibility: public
ri/1.8/system/URI/Generic/registry%3d-i.yaml000064400000000263150403630460014303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#registry=
is_singleton: false
name: registry=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/opaque%3d-i.yaml000064400000000257150403630460013730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#opaque=
is_singleton: false
name: opaque=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/set_fragment-i.yaml000064400000000274150403630460014617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_fragment
is_singleton: false
name: set_fragment
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/split_userinfo-i.yaml000064400000000277150403630460015211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#split_userinfo
is_singleton: false
name: split_userinfo
params: (ui)
visibility: private
ri/1.8/system/URI/Generic/hash-i.yaml000064400000000250150403630470013057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/URI/Generic/user%3d-i.yaml000064400000000256150403630470013414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#user=
is_singleton: false
name: user=
params: (user)
visibility: public
ri/1.8/system/URI/Generic/set_port-i.yaml000064400000000264150403630470014000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_port
is_singleton: false
name: set_port
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/query%3d-i.yaml000064400000000255150403630470013602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#query=
is_singleton: false
name: query=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/check_path-i.yaml000064400000000266150403630470014234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_path
is_singleton: false
name: check_path
params: (v)
visibility: private
ri/1.8/system/URI/Generic/check_port-i.yaml000064400000000266150403630500014256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_port
is_singleton: false
name: check_port
params: (v)
visibility: private
ri/1.8/system/URI/Generic/merge0-i.yaml000064400000000423150403630500013307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return base and rel. you can modify `base', but can not `rel'.
full_name: URI::Generic#merge0
is_singleton: false
name: merge0
params: (oth)
visibility: private
ri/1.8/system/URI/Generic/check_scheme-i.yaml000064400000000272150403630500014533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_scheme
is_singleton: false
name: check_scheme
params: (v)
visibility: private
ri/1.8/system/URI/Generic/set_user-i.yaml000064400000000264150403630500013764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_user
is_singleton: false
name: set_user
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/build-c.yaml000064400000001223150403630500013220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::P 
  body: "See #new"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: "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."
full_name: URI::Generic::build
is_singleton: true
name: build
params: (args)
visibility: public
ri/1.8/system/URI/Generic/set_password-i.yaml000064400000000274150403630510014652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_password
is_singleton: false
name: set_password
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/normalize-i.yaml000064400000000355150403630510014135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns normalized URI
full_name: URI::Generic#normalize
is_singleton: false
name: normalize
params: ()
visibility: public
ri/1.8/system/URI/Generic/component-c.yaml000064400000000372150403630510014130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Components of the URI in the order.
full_name: URI::Generic::component
is_singleton: true
name: component
params: ()
visibility: public
ri/1.8/system/URI/Generic/route_from_path-i.yaml000064400000000307150403630510015327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#route_from_path
is_singleton: false
name: route_from_path
params: (src, dst)
visibility: private
ri/1.8/system/URI/Generic/inspect-i.yaml000064400000000256150403630510013602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/URI/Generic/host%3d-i.yaml000064400000000253150403630510013403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#host=
is_singleton: false
name: host=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/absolute%3f-i.yaml000064400000000443150403630520014250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: absolute
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Checks if URI is an absolute one
full_name: URI::Generic#absolute?
is_singleton: false
name: absolute?
params: ()
visibility: public
ri/1.8/system/URI/Generic/check_registry-i.yaml000064400000000276150403630520015145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_registry
is_singleton: false
name: check_registry
params: (v)
visibility: private
ri/1.8/system/URI/Generic/check_password-i.yaml000064400000000314150403630520015130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_password
is_singleton: false
name: check_password
params: (v, user = @user)
visibility: private
ri/1.8/system/URI/Generic/component_ary-i.yaml000064400000000275150403630520015014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#component_ary
is_singleton: false
name: component_ary
params: ()
visibility: protected
ri/1.8/system/URI/Generic/escape_userpass-i.yaml000064400000000300150403630520015311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#escape_userpass
is_singleton: false
name: escape_userpass
params: (v)
visibility: private
ri/1.8/system/URI/Generic/path%3d-i.yaml000064400000000253150403630530013364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#path=
is_singleton: false
name: path=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/new-c.yaml000064400000002621150403630530012720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+scheme+:"
    body: Protocol scheme, i.e. 'http','ftp','mailto' and so on.
  - !ruby/struct:SM::Flow::LI 
    label: "+userinfo+:"
    body: User name and password, i.e. 'sdmitry:bla'
  - !ruby/struct:SM::Flow::LI 
    label: "+host+:"
    body: Server host name
  - !ruby/struct:SM::Flow::LI 
    label: "+port+:"
    body: Server port
  - !ruby/struct:SM::Flow::LI 
    label: "+registry+:"
    body: "DOC: FIXME!"
  - !ruby/struct:SM::Flow::LI 
    label: "+path+:"
    body: Path on server
  - !ruby/struct:SM::Flow::LI 
    label: "+opaque+:"
    body: "DOC: FIXME!"
  - !ruby/struct:SM::Flow::LI 
    label: "+query+:"
    body: Query data
  - !ruby/struct:SM::Flow::LI 
    label: "+fragment+:"
    body: A part of URI after '#' sign
  - !ruby/struct:SM::Flow::LI 
    label: "+arg_check+:"
    body: Check arguments [false by default]
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Creates a new URI::Generic instance from ``generic'' components without check.
full_name: URI::Generic::new
is_singleton: true
name: new
params: (scheme, userinfo, host, port, registry, path, opaque, query, fragment, arg_check = false)
visibility: public
ri/1.8/system/URI/Generic/set_userinfo-i.yaml000064400000000317150403630530014642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_userinfo
is_singleton: false
name: set_userinfo
params: (user, password = nil)
visibility: protected
ri/1.8/system/URI/Generic/use_registry-c.yaml000064400000000352150403630530014652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "DOC: FIXME!"
full_name: URI::Generic::use_registry
is_singleton: true
name: use_registry
params: ()
visibility: public
ri/1.8/system/URI/Generic/set_query-i.yaml000064400000000266150403630540014161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_query
is_singleton: false
name: set_query
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/hierarchical%3f-i.yaml000064400000000367150403630550015060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Checks if URI has a path
full_name: URI::Generic#hierarchical?
is_singleton: false
name: hierarchical?
params: ()
visibility: public
ri/1.8/system/URI/Generic/check_userinfo-i.yaml000064400000000321150403630550015121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_userinfo
is_singleton: false
name: check_userinfo
params: (user, password = nil)
visibility: private
ri/1.8/system/URI/Generic/set_opaque-i.yaml000064400000000270150403630560014303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_opaque
is_singleton: false
name: set_opaque
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/set_path-i.yaml000064400000000264150403630560013750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#set_path
is_singleton: false
name: set_path
params: (v)
visibility: protected
ri/1.8/system/URI/Generic/%2b-i.yaml000064400000000334150403630570012510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #merge"
full_name: URI::Generic#+
is_singleton: false
name: +
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/build2-c.yaml000064400000001076150403630600013311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::P 
  body: "See #new"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: At first, tries to create a new URI::Generic instance using URI::Generic::build. But, if exception URI::InvalidComponentError is raised, then it URI::Escape.escape all URI components and tries again.
full_name: URI::Generic::build2
is_singleton: true
name: build2
params: (args)
visibility: public
ri/1.8/system/URI/Generic/merge%21-i.yaml000064400000001425150403630600013443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+oth+:"
    body: URI or String
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: "Destructive form of #merge"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  uri = URI.parse(&quot;http://my.example.com&quot;)\n  uri.merge!(&quot;/main.rbx?page=1&quot;)\n  p uri\n  # =&gt;  #&lt;URI::HTTP:0x2021f3b0 URL:http://my.example.com/main.rbx?page=1&gt;\n"
full_name: URI::Generic#merge!
is_singleton: false
name: merge!
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/default_port-i.yaml000064400000000270150403630600014621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#default_port
is_singleton: false
name: default_port
params: ()
visibility: public
ri/1.8/system/URI/Generic/normalize%21-i.yaml000064400000000374150403630610014347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Destructive version of #normalize"
full_name: URI::Generic#normalize!
is_singleton: false
name: normalize!
params: ()
visibility: public
ri/1.8/system/URI/Generic/replace%21-i.yaml000064400000000371150403630610013757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: replace self by other URI object
full_name: URI::Generic#replace!
is_singleton: false
name: replace!
params: (oth)
visibility: private
ri/1.8/system/URI/Generic/to_s-i.yaml000064400000000347150403630620013104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Constructs String from URI
full_name: URI::Generic#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/URI/Generic/%3d%3d-i.yaml000064400000000335150403630620013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares to URI's
full_name: URI::Generic#==
is_singleton: false
name: ==
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/route_from0-i.yaml000064400000000272150403630630014377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#route_from0
is_singleton: false
name: route_from0
params: (oth)
visibility: private
ri/1.8/system/URI/Generic/split_path-i.yaml000064400000000271150403630640014305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#split_path
is_singleton: false
name: split_path
params: (path)
visibility: private
ri/1.8/system/URI/Generic/check_host-i.yaml000064400000000266150403630640014254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_host
is_singleton: false
name: check_host
params: (v)
visibility: private
ri/1.8/system/URI/Generic/component-i.yaml000064400000000262150403630650014141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#component
is_singleton: false
name: component
params: ()
visibility: public
ri/1.8/system/URI/Generic/password%3d-i.yaml000064400000000272150403630650014276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#password=
is_singleton: false
name: password=
params: (password)
visibility: public
ri/1.8/system/URI/Generic/fragment%3d-i.yaml000064400000000263150403630660014240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#fragment=
is_singleton: false
name: fragment=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/route_from-i.yaml000064400000001473150403630670014327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "-"
block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+oth+:"
    body: URI or String
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Calculates relative path from oth to self
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  uri = URI.parse('http://my.example.com/main.rbx?page=1')\n  p uri.route_from('http://my.example.com')\n  #=&gt; #&lt;URI::Generic:0x20218858 URL:/main.rbx?page=1&gt;\n"
full_name: URI::Generic#route_from
is_singleton: false
name: route_from
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/user-i.yaml000064400000000250150403630670013114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#user
is_singleton: false
name: user
params: ()
visibility: public
ri/1.8/system/URI/Generic/userinfo-i.yaml000064400000000260150403630700013763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#userinfo
is_singleton: false
name: userinfo
params: ()
visibility: public
ri/1.8/system/URI/Generic/absolute-i.yaml000064400000000353150403630700013752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #absolute?"
full_name: URI::Generic#absolute
is_singleton: false
name: absolute
params: ()
visibility: public
ri/1.8/system/URI/Generic/scheme%3d-i.yaml000064400000000257150403630710013700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#scheme=
is_singleton: false
name: scheme=
params: (v)
visibility: public
ri/1.8/system/URI/Generic/password-i.yaml000064400000000260150403630710013774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#password
is_singleton: false
name: password
params: ()
visibility: public
ri/1.8/system/URI/Generic/userinfo%3d-i.yaml000064400000000421150403630720014260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets userinfo, argument is string like 'name:pass'
full_name: URI::Generic#userinfo=
is_singleton: false
name: userinfo=
params: (userinfo)
visibility: public
ri/1.8/system/URI/Generic/check_user-i.yaml000064400000000266150403630720014254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_user
is_singleton: false
name: check_user
params: (v)
visibility: private
ri/1.8/system/URI/Generic/%2d-i.yaml000064400000000343150403630730012510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #route_from"
full_name: URI::Generic#-
is_singleton: false
name: "-"
params: (oth)
visibility: public
ri/1.8/system/URI/Generic/check_query-i.yaml000064400000000270150403630730014437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::Generic#check_query
is_singleton: false
name: check_query
params: (v)
visibility: private
ri/1.8/system/URI/Generic/relative%3f-i.yaml000064400000000360150403630740014247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Checks if URI is relative
full_name: URI::Generic#relative?
is_singleton: false
name: relative?
params: ()
visibility: public
ri/1.8/system/URI/extract-c.yaml000064400000002263150403630740012232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: $&
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  URI::extract(str[, schemes][,&amp;blk])\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+str+:"
    body: String to extract URIs from.
  - !ruby/struct:SM::Flow::LI 
    label: "+schemes+:"
    body: Limit URI matching to a specific schemes.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Extracts URIs from a string. If block given, iterates through all matched URIs. Returns nil if block given or array with matches.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;uri&quot;\n\n  URI.extract(&quot;text here http://foo.example.org/bla and here mailto:test@example.com and here also.&quot;)\n  # =&gt; [&quot;http://foo.example.com/bla&quot;, &quot;mailto:test@example.com&quot;]\n"
full_name: URI::extract
is_singleton: true
name: extract
params: (str, schemes = nil, &block) {|$&| ...}
visibility: public
ri/1.8/system/URI/BadURIError/cdesc-BadURIError.yaml000064400000000413150403630740015552 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: URI is valid, bad usage is not.
constants: []

full_name: URI::BadURIError
includes: []

instance_methods: []

name: BadURIError
superclass: Error
ri/1.8/system/URI/LDAP/extensions%3d-i.yaml000064400000000266150403630750014003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#extensions=
is_singleton: false
name: extensions=
params: (val)
visibility: public
ri/1.8/system/URI/LDAP/parse_dn-i.yaml000064400000000256150403630750013102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#parse_dn
is_singleton: false
name: parse_dn
params: ()
visibility: private
ri/1.8/system/URI/LDAP/filter%3d-i.yaml000064400000000256150403630750013070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#filter=
is_singleton: false
name: filter=
params: (val)
visibility: public
ri/1.8/system/URI/LDAP/scope-i.yaml000064400000000247150403630750012420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#scope
is_singleton: false
name: scope
params: ()
visibility: public
ri/1.8/system/URI/LDAP/filter-i.yaml000064400000000251150403630760012570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#filter
is_singleton: false
name: filter
params: ()
visibility: public
ri/1.8/system/URI/LDAP/set_filter-i.yaml000064400000000267150403630760013452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#set_filter
is_singleton: false
name: set_filter
params: (val)
visibility: protected
ri/1.8/system/URI/LDAP/scope%3d-i.yaml000064400000000254150403630760012713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#scope=
is_singleton: false
name: scope=
params: (val)
visibility: public
ri/1.8/system/URI/LDAP/build-c.yaml000064400000000253150403630760012376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP::build
is_singleton: true
name: build
params: (args)
visibility: public
ri/1.8/system/URI/LDAP/dn%3d-i.yaml000064400000000246150403630770012205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#dn=
is_singleton: false
name: dn=
params: (val)
visibility: public
ri/1.8/system/URI/LDAP/set_extensions-i.yaml000064400000000277150403630770014366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#set_extensions
is_singleton: false
name: set_extensions
params: (val)
visibility: protected
ri/1.8/system/URI/LDAP/cdesc-LDAP.yaml000064400000003516150403630770012664 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: build
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: LDAP URI SCHEMA (described in RFC2255) ldap://&lt;host&gt;/&lt;dn&gt;[?&lt;attrs&gt;[?&lt;scope&gt;[?&lt;filter&gt;[?&lt;extensions&gt;]]]]
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_PORT
  value: "389"
- !ruby/object:RI::Constant 
  comment: 
  name: COMPONENT
  value: "[       :scheme,       :host, :port,       :dn,       :attributes,       :scope,       :filter,       :extensions,     ].freeze"
- !ruby/object:RI::Constant 
  comment: 
  name: SCOPE
  value: "[       SCOPE_ONE = 'one',       SCOPE_SUB = 'sub',       SCOPE_BASE = 'base',     ].freeze"
full_name: URI::LDAP
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: attributes
- !ruby/object:RI::MethodSummary 
  name: attributes=
- !ruby/object:RI::MethodSummary 
  name: build_path_query
- !ruby/object:RI::MethodSummary 
  name: dn
- !ruby/object:RI::MethodSummary 
  name: dn=
- !ruby/object:RI::MethodSummary 
  name: extensions
- !ruby/object:RI::MethodSummary 
  name: extensions=
- !ruby/object:RI::MethodSummary 
  name: filter
- !ruby/object:RI::MethodSummary 
  name: filter=
- !ruby/object:RI::MethodSummary 
  name: hierarchical?
- !ruby/object:RI::MethodSummary 
  name: parse_dn
- !ruby/object:RI::MethodSummary 
  name: parse_query
- !ruby/object:RI::MethodSummary 
  name: scope
- !ruby/object:RI::MethodSummary 
  name: scope=
- !ruby/object:RI::MethodSummary 
  name: set_attributes
- !ruby/object:RI::MethodSummary 
  name: set_dn
- !ruby/object:RI::MethodSummary 
  name: set_extensions
- !ruby/object:RI::MethodSummary 
  name: set_filter
- !ruby/object:RI::MethodSummary 
  name: set_scope
name: LDAP
superclass: Generic
ri/1.8/system/URI/LDAP/build_path_query-i.yaml000064400000000276150403630770014653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#build_path_query
is_singleton: false
name: build_path_query
params: ()
visibility: private
ri/1.8/system/URI/LDAP/new-c.yaml000064400000000247150403630770012074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP::new
is_singleton: true
name: new
params: (*arg)
visibility: public
ri/1.8/system/URI/LDAP/attributes-i.yaml000064400000000261150403631000013456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#attributes
is_singleton: false
name: attributes
params: ()
visibility: public
ri/1.8/system/URI/LDAP/hierarchical%3f-i.yaml000064400000000267150403631000014212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#hierarchical?
is_singleton: false
name: hierarchical?
params: ()
visibility: public
ri/1.8/system/URI/LDAP/extensions-i.yaml000064400000000261150403631000013467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#extensions
is_singleton: false
name: extensions
params: ()
visibility: public
ri/1.8/system/URI/LDAP/parse_query-i.yaml000064400000000264150403631000013632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#parse_query
is_singleton: false
name: parse_query
params: ()
visibility: private
ri/1.8/system/URI/LDAP/set_scope-i.yaml000064400000000265150403631000013260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#set_scope
is_singleton: false
name: set_scope
params: (val)
visibility: protected
ri/1.8/system/URI/LDAP/dn-i.yaml000064400000000241150403631000011667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#dn
is_singleton: false
name: dn
params: ()
visibility: public
ri/1.8/system/URI/LDAP/set_attributes-i.yaml000064400000000277150403631010014341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#set_attributes
is_singleton: false
name: set_attributes
params: (val)
visibility: protected
ri/1.8/system/URI/LDAP/attributes%3d-i.yaml000064400000000266150403631010013760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#attributes=
is_singleton: false
name: attributes=
params: (val)
visibility: public
ri/1.8/system/URI/LDAP/set_dn-i.yaml000064400000000257150403631010012552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::LDAP#set_dn
is_singleton: false
name: set_dn
params: (val)
visibility: protected
ri/1.8/system/URI/regexp-c.yaml000064400000002333150403631010012037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  URI::regexp([match_schemes])\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+match_schemes+:"
    body: Array of schemes. If given, resulting regexp matches to URIs whose scheme is one of the match_schemes.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: 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 it's number.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  # extract first URI from html_string\n  html_string.slice(URI.regexp)\n\n  # remove ftp URIs\n  html_string.sub(URI.regexp(['ftp'])\n\n  # You should not rely on the number of parentheses\n  html_string.scan(URI.regexp) do |*matches|\n    p $&amp;\n  end\n"
full_name: URI::regexp
is_singleton: true
name: regexp
params: (schemes = nil)
visibility: public
ri/1.8/system/URI/Escape/encode-i.yaml000064400000000367150403631020013216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #escape"
full_name: URI::Escape#encode
is_singleton: false
name: encode
params: (str, unsafe = UNSAFE)
visibility: public
ri/1.8/system/URI/Escape/unescape-i.yaml000064400000001534150403631020013561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: decode
block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  URI.unescape(str)\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+str+:"
    body: Unescapes the string.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  enc_uri = URI.escape(&quot;http://example.com/?a=\\11\\15&quot;)\n  p enc_uri\n  # =&gt; &quot;http://example.com/?a=%09%0D&quot;\n\n  p URI.unescape(enc_uri)\n  # =&gt; &quot;http://example.com/?a=\\t\\r&quot;\n"
full_name: URI::Escape#unescape
is_singleton: false
name: unescape
params: (str)
visibility: public
ri/1.8/system/URI/Escape/escape-i.yaml000064400000002520150403631020013212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: encode
block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  URI.escape(str [, unsafe])\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Args
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+str+:"
    body: String to replaces in.
  - !ruby/struct:SM::Flow::LI 
    label: "+unsafe+:"
    body: Regexp that matches all symbols that must be replaced with codes. By default uses <tt>REGEXP::UNSAFE</tt>. When this argument is a String, it represents a character set.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Escapes the string, replacing all unsafe characters with codes.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  enc_uri = URI.escape(&quot;http://example.com/?a=\\11\\15&quot;)\n  p enc_uri\n  # =&gt; &quot;http://example.com/?a=%09%0D&quot;\n\n  p URI.unescape(enc_uri)\n  # =&gt; &quot;http://example.com/?a=\\t\\r&quot;\n\n  p URI.escape(&quot;@?@!&quot;, &quot;!?&quot;)\n  # =&gt; &quot;@%3F@%21&quot;\n"
full_name: URI::Escape#escape
is_singleton: false
name: escape
params: (str, unsafe = UNSAFE)
visibility: public
ri/1.8/system/URI/Escape/decode-i.yaml000064400000000350150403631030013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #unescape"
full_name: URI::Escape#decode
is_singleton: false
name: decode
params: (str)
visibility: public
ri/1.8/system/URI/Escape/cdesc-Escape.yaml000064400000000652150403631030014010 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: URI::Escape
includes: 
- !ruby/object:RI::IncludedModule 
  name: REGEXP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: decode
- !ruby/object:RI::MethodSummary 
  name: encode
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: unescape
name: Escape
superclass: 
ri/1.8/system/URI/HTTP/request_uri-i.yaml000064400000000762150403631040013710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Returns the full path for an HTTP request, as required by Net::HTTP::Get.
- !ruby/struct:SM::Flow::P 
  body: If the URI contains a query, the full path is URI#path + '?' + URI#query. Otherwise, the path is simply URI#path.
full_name: URI::HTTP#request_uri
is_singleton: false
name: request_uri
params: ()
visibility: public
ri/1.8/system/URI/HTTP/build-c.yaml000064400000002274150403631040012432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Create a new URI::HTTP object from components, with syntax checking.
- !ruby/struct:SM::Flow::P 
  body: The components accepted are userinfo, host, port, path, query and fragment.
- !ruby/struct:SM::Flow::P 
  body: The components should be provided either as an Array, or as a Hash with keys formed by preceding the component names with a colon.
- !ruby/struct:SM::Flow::P 
  body: If an Array is used, the components must be passed in the order [userinfo, host, port, path, query, fragment].
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "    newuri = URI::HTTP.build({:host =&gt; 'www.example.com',\n      :path&gt; =&gt; '/foo/bar'})\n\n    newuri = URI::HTTP.build([nil, &quot;www.example.com&quot;, nil, &quot;/path&quot;,\n      &quot;query&quot;, 'fragment'])\n"
- !ruby/struct:SM::Flow::P 
  body: Currently, if passed userinfo components this method generates invalid HTTP URIs as per RFC 1738.
full_name: URI::HTTP::build
is_singleton: true
name: build
params: (args)
visibility: public
ri/1.8/system/URI/HTTP/new-c.yaml000064400000001512150403631040012116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Create a new URI::HTTP object from generic URI components as per RFC 2396. No HTTP-specific syntax checking (as per RFC 1738) is performed.
- !ruby/struct:SM::Flow::P 
  body: Arguments are <tt>scheme</tt>, <tt>userinfo</tt>, <tt>host</tt>, <tt>port</tt>, <tt>registry</tt>, <tt>path</tt>, <tt>opaque</tt>, <tt>query</tt> and <tt>fragment</tt>, in that order.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "    uri = URI::HTTP.new(['http', nil, &quot;www.example.com&quot;, nil, &quot;/path&quot;,\n      &quot;query&quot;, 'fragment'])\n"
full_name: URI::HTTP::new
is_singleton: true
name: new
params: (*arg)
visibility: public
ri/1.8/system/URI/HTTP/cdesc-HTTP.yaml000064400000001775150403631050012757 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: build
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: The syntax of HTTP URIs is defined in RFC1738 section 3.3.
- !ruby/struct:SM::Flow::P 
  body: 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 &lt;URL:http://support.microsoft.com/kb/834489&gt;.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_PORT
  value: "80"
- !ruby/object:RI::Constant 
  comment: 
  name: COMPONENT
  value: "[       :scheme,        :userinfo, :host, :port,        :path,        :query,        :fragment"
full_name: URI::HTTP
includes: 
- !ruby/object:RI::IncludedModule 
  name: OpenURI::OpenRead
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: request_uri
name: HTTP
superclass: Object
ri/1.8/system/URI/MailTo/set_headers-i.yaml000064400000000271150403631050014231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::MailTo#set_headers
is_singleton: false
name: set_headers
params: (v)
visibility: protected
ri/1.8/system/URI/MailTo/set_to-i.yaml000064400000000257150403631050013244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::MailTo#set_to
is_singleton: false
name: set_to
params: (v)
visibility: protected
ri/1.8/system/URI/MailTo/build-c.yaml000064400000002616150403631060013042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Creates a new URI::MailTo object from components, with syntax checking.
- !ruby/struct:SM::Flow::P 
  body: Components can be provided as an Array or Hash. If an Array is used, the components must be supplied as [to, headers].
- !ruby/struct:SM::Flow::P 
  body: If a Hash is used, the keys are the component names preceded by colons.
- !ruby/struct:SM::Flow::P 
  body: The headers can be supplied as a pre-encoded string, such as &quot;subject=subscribe&amp;cc=address&quot;, or as an Array of Arrays like [['subject', 'subscribe'], ['cc', 'address']]
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "   require 'uri'\n\n   m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby'])\n   puts m1.to_s  -&gt;  mailto:joe@example.com?subject=Ruby\n\n   m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]])\n   puts m2.to_s  -&gt;  mailto:john@example.com?Subject=Ruby&amp;Cc=jack@example.com\n\n   m3 = URI::MailTo.build({:to =&gt; 'listman@example.com', :headers =&gt; [['subject', 'subscribe']]})\n   puts m3.to_s  -&gt;  mailto:listman@example.com?subject=subscribe\n"
full_name: URI::MailTo::build
is_singleton: true
name: build
params: (args)
visibility: public
ri/1.8/system/URI/MailTo/to%3d-i.yaml000064400000000246150403631060012664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::MailTo#to=
is_singleton: false
name: to=
params: (v)
visibility: public
ri/1.8/system/URI/MailTo/new-c.yaml000064400000000736150403631060012535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: Creates a new URI::MailTo object from generic URL components with no syntax checking.
- !ruby/struct:SM::Flow::P 
  body: This method is usually called from URI::parse, which checks the validity of each component.
full_name: URI::MailTo::new
is_singleton: true
name: new
params: (*arg)
visibility: public
ri/1.8/system/URI/MailTo/headers%3d-i.yaml000064400000000260150403631070013652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::MailTo#headers=
is_singleton: false
name: headers=
params: (v)
visibility: public
ri/1.8/system/URI/MailTo/to_rfc822text-i.yaml000064400000000366150403631070014367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #to_mailtext"
full_name: URI::MailTo#to_rfc822text
is_singleton: false
name: to_rfc822text
params: ()
visibility: public
ri/1.8/system/URI/MailTo/to_mailtext-i.yaml000064400000001211150403631070014271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: to_rfc822text
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the RFC822 e-mail text equivalent of the URL, as a String.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'uri'\n\n  uri = URI.parse(&quot;mailto:ruby-list@ruby-lang.org?Subject=subscribe&amp;cc=myaddr&quot;)\n  uri.to_mailtext\n  # =&gt; &quot;To: ruby-list@ruby-lang.org\\nSubject: subscribe\\nCc: myaddr\\n\\n\\n&quot;\n"
full_name: URI::MailTo#to_mailtext
is_singleton: false
name: to_mailtext
params: ()
visibility: public
ri/1.8/system/URI/MailTo/to_s-i.yaml000064400000000247150403631100012706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::MailTo#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/URI/MailTo/check_to-i.yaml000064400000000261150403631100013515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::MailTo#check_to
is_singleton: false
name: check_to
params: (v)
visibility: private
ri/1.8/system/URI/MailTo/check_headers-i.yaml000064400000000273150403631110014512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: URI::MailTo#check_headers
is_singleton: false
name: check_headers
params: (v)
visibility: private
ri/1.8/system/URI/MailTo/cdesc-MailTo.yaml000064400000002475150403631110013766 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: E-mail headers set by the URL, as an Array of Arrays
  name: headers
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The primary e-mail address of the URL, as a String
  name: to
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: build
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: RFC2368, The mailto URL scheme
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_PORT
  value: nil
- !ruby/object:RI::Constant 
  comment: 
  name: COMPONENT
  value: "[ :scheme, :to, :headers ].freeze"
full_name: URI::MailTo
includes: 
- !ruby/object:RI::IncludedModule 
  name: REGEXP
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_headers
- !ruby/object:RI::MethodSummary 
  name: check_to
- !ruby/object:RI::MethodSummary 
  name: headers=
- !ruby/object:RI::MethodSummary 
  name: set_headers
- !ruby/object:RI::MethodSummary 
  name: set_to
- !ruby/object:RI::MethodSummary 
  name: to=
- !ruby/object:RI::MethodSummary 
  name: to_mailtext
- !ruby/object:RI::MethodSummary 
  name: to_rfc822text
- !ruby/object:RI::MethodSummary 
  name: to_s
name: MailTo
superclass: Generic
ri/1.8/system/RuntimeError/cdesc-RuntimeError.yaml000064400000001202150403631110016032 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: RuntimeError
includes: []

instance_methods: []

name: RuntimeError
superclass: StandardError
ri/1.8/system/Arguable/extend_object-c.yaml000064400000000374150403631120014452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initializes instance variable.
full_name: Arguable::extend_object
is_singleton: true
name: extend_object
params: (obj)
visibility: public
ri/1.8/system/Arguable/permute%21-i.yaml000064400000000516150403631120013532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>self</tt> destructively in permutation mode and returns <tt>self</tt> containing the rest arguments left unparsed.
full_name: Arguable#permute!
is_singleton: false
name: permute!
params: ()
visibility: public
ri/1.8/system/Arguable/cdesc-Arguable.yaml000064400000001244150403631120014213 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: extend_object
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extends command line arguments array (ARGV) to parse itself.
constants: []

full_name: Arguable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: getopts
- !ruby/object:RI::MethodSummary 
  name: options
- !ruby/object:RI::MethodSummary 
  name: options=
- !ruby/object:RI::MethodSummary 
  name: order!
- !ruby/object:RI::MethodSummary 
  name: parse!
- !ruby/object:RI::MethodSummary 
  name: permute!
name: Arguable
superclass: 
ri/1.8/system/Arguable/parse%21-i.yaml000064400000000466150403631130013170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>self</tt> destructively and returns <tt>self</tt> containing the rest arguments left unparsed.
full_name: Arguable#parse!
is_singleton: false
name: parse!
params: ()
visibility: public
ri/1.8/system/Arguable/options%3d-i.yaml000064400000000716150403631130013633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets OptionParser object, when <tt>opt</tt> is <tt>false</tt> or <tt>nil</tt>, methods OptionParser::Arguable#options and OptionParser::Arguable#options= are undefined. Thus, there is no ways to access the OptionParser object via the receiver object.
full_name: Arguable#options=
is_singleton: false
name: options=
params: (opt)
visibility: public
ri/1.8/system/Arguable/new-c.yaml000064400000000247150403631130012426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Arguable::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/Arguable/getopts-i.yaml000064400000001017150403631130013324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Substitution of getopts is possible as follows. Also see OptionParser#getopts.
- !ruby/struct:SM::Flow::VERB 
  body: "  def getopts(*args)\n    ($OPT = ARGV.getopts(*args)).each do |opt, val|\n      eval &quot;$OPT_#{opt.gsub(/[^A-Za-z0-9_]/, '_')} = val&quot;\n    end\n  rescue OptionParser::ParseError\n  end\n"
full_name: Arguable#getopts
is_singleton: false
name: getopts
params: (*args)
visibility: public
ri/1.8/system/Arguable/options-i.yaml000064400000001067150403631140013340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: "@optparse"
comment: 
- !ruby/struct:SM::Flow::P 
  body: Actual OptionParser object, automatically created if nonexistent.
- !ruby/struct:SM::Flow::P 
  body: 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 <tt>nil</tt> returned.
full_name: Arguable#options
is_singleton: false
name: options
params: () {|@optparse| ...}
visibility: public
ri/1.8/system/Arguable/order%21-i.yaml000064400000000503150403631140013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>self</tt> destructively in order and returns <tt>self</tt> containing the rest arguments left unparsed.
full_name: Arguable#order!
is_singleton: false
name: order!
params: (&blk)
visibility: public
ri/1.8/system/NoMethodError/args-i.yaml000064400000000466150403631140013610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the arguments passed in as the third parameter to the constructor.
full_name: NoMethodError#args
is_singleton: false
name: args
params: |
  no_method_error.args  => obj

visibility: public
ri/1.8/system/NoMethodError/cdesc-NoMethodError.yaml000064400000001327150403631150016232 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: NoMethodError
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: args
name: NoMethodError
superclass: NameError
ri/1.8/system/NoMethodError/new-c.yaml000064400000000760150403631150013435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Construct a NoMethodError exception for a method of the given name called with the given arguments. The name may be accessed using the <tt>#name</tt> method on the resulting object, and the arguments using the <tt>#args</tt> method.
full_name: NoMethodError::new
is_singleton: true
name: new
params: |
  NoMethodError.new(msg, name [, args])  => no_method_error

visibility: public
ri/1.8/system/LoadError/cdesc-LoadError.yaml000064400000001172150403631150014534 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: LoadError
includes: []

instance_methods: []

name: LoadError
superclass: ScriptError
ri/1.8/system/OpenStruct/cdesc-OpenStruct.yaml000064400000003011150403631160015161 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "OpenStruct allows you to create data objects and set arbitrary attributes. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'ostruct'\n\n  record = OpenStruct.new\n  record.name    = &quot;John Smith&quot;\n  record.age     = 70\n  record.pension = 300\n\n  puts record.name     # -&gt; &quot;John Smith&quot;\n  puts record.address  # -&gt; nil\n"
- !ruby/struct:SM::Flow::P 
  body: It is like a hash with a different way to access the data. In fact, it is implemented with a hash, and you can initialize it with one.
- !ruby/struct:SM::Flow::VERB 
  body: "  hash = { &quot;country&quot; =&gt; &quot;Australia&quot;, :population =&gt; 20_000_000 }\n  data = OpenStruct.new(hash)\n\n  p data        # -&gt; &lt;OpenStruct country=&quot;Australia&quot; population=20000000&gt;\n"
constants: []

full_name: OpenStruct
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: delete_field
- !ruby/object:RI::MethodSummary 
  name: initialize_copy
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: marshal_dump
- !ruby/object:RI::MethodSummary 
  name: marshal_load
- !ruby/object:RI::MethodSummary 
  name: modifiable
- !ruby/object:RI::MethodSummary 
  name: new_ostruct_member
- !ruby/object:RI::MethodSummary 
  name: to_s
name: OpenStruct
superclass: Object
ri/1.8/system/OpenStruct/inspect-i.yaml000064400000000477150403631160013704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: to_s
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string containing a detailed summary of the keys and values.
full_name: OpenStruct#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/OpenStruct/delete_field-i.yaml000064400000000406150403631160014634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Remove the named field from the object.
full_name: OpenStruct#delete_field
is_singleton: false
name: delete_field
params: (name)
visibility: public
ri/1.8/system/OpenStruct/new-c.yaml000064400000001313150403631160013010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new OpenStruct object. The optional <tt>hash</tt>, if given, will generate attributes and values. For example.
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'ostruct'\n  hash = { &quot;country&quot; =&gt; &quot;Australia&quot;, :population =&gt; 20_000_000 }\n  data = OpenStruct.new(hash)\n\n  p data        # -&gt; &lt;OpenStruct country=&quot;Australia&quot; population=20000000&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: By default, the resulting OpenStruct object will have no attributes.
full_name: OpenStruct::new
is_singleton: true
name: new
params: (hash=nil)
visibility: public
ri/1.8/system/OpenStruct/marshal_load-i.yaml000064400000000267150403631170014663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OpenStruct#marshal_load
is_singleton: false
name: marshal_load
params: (x)
visibility: public
ri/1.8/system/OpenStruct/initialize_copy-i.yaml000064400000000414150403631170015422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Duplicate an OpenStruct object members.
full_name: OpenStruct#initialize_copy
is_singleton: false
name: initialize_copy
params: (orig)
visibility: public
ri/1.8/system/OpenStruct/new_ostruct_member-i.yaml000064400000000306150403631170016132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OpenStruct#new_ostruct_member
is_singleton: false
name: new_ostruct_member
params: (name)
visibility: public
ri/1.8/system/OpenStruct/marshal_dump-i.yaml000064400000000266150403631170014710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OpenStruct#marshal_dump
is_singleton: false
name: marshal_dump
params: ()
visibility: public
ri/1.8/system/OpenStruct/to_s-i.yaml000064400000000337150403631170013177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #inspect"
full_name: OpenStruct#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/OpenStruct/%3d%3d-i.yaml000064400000000400150403631200013063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compare this object and <tt>other</tt> for equality.
full_name: OpenStruct#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/OpenStruct/modifiable-i.yaml000064400000000265150403631200014320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OpenStruct#modifiable
is_singleton: false
name: modifiable
params: ()
visibility: protected
ri/1.8/system/RubyToken/Token-i.yaml000064400000000271150403631200013116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken#Token
is_singleton: false
name: Token
params: (token, value = nil)
visibility: public
ri/1.8/system/RubyToken/TkUnknownChar/cdesc-TkUnknownChar.yaml000064400000000645150403631200020164 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RubyToken::TkUnknownChar
includes: []

instance_methods: []

name: TkUnknownChar
superclass: Token
ri/1.8/system/RubyToken/TkUnknownChar/new-c.yaml000064400000000306150403631210015355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::TkUnknownChar::new
is_singleton: true
name: new
params: (line_no, char_no, id)
visibility: public
ri/1.8/system/RubyToken/TkNode/cdesc-TkNode.yaml000064400000000551150403631210015241 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: node
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: node
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RubyToken::TkNode
includes: []

instance_methods: []

name: TkNode
superclass: Token
ri/1.8/system/RubyToken/TkNode/new-c.yaml000064400000000301150403631210014000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::TkNode::new
is_singleton: true
name: new
params: (seek, line_no, char_no)
visibility: public
ri/1.8/system/RubyToken/TkId/cdesc-TkId.yaml000064400000000623150403631220014360 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RubyToken::TkId
includes: []

instance_methods: []

name: TkId
superclass: Token
ri/1.8/system/RubyToken/TkId/new-c.yaml000064400000000277150403631220013464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::TkId::new
is_singleton: true
name: new
params: (line_no, char_no, name)
visibility: public
ri/1.8/system/RubyToken/TkError/cdesc-TkError.yaml000064400000000305150403631230015650 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RubyToken::TkError
includes: []

instance_methods: []

name: TkError
superclass: Token
ri/1.8/system/RubyToken/TkOp/cdesc-TkOp.yaml000064400000000450150403631230014423 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RubyToken::TkOp
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: name
name: TkOp
superclass: Token
ri/1.8/system/RubyToken/TkOp/name-i.yaml000064400000000253150403631230013636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::TkOp#name
is_singleton: false
name: name
params: ()
visibility: public
ri/1.8/system/RubyToken/def_token-c.yaml000064400000000341150403631230013767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::def_token
is_singleton: true
name: def_token
params: (token_n, super_token = Token, reading = nil, *opts)
visibility: public
ri/1.8/system/RubyToken/TkOPASGN/cdesc-TkOPASGN.yaml000064400000000626150403631240015453 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: op
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: op
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RubyToken::TkOPASGN
includes: []

instance_methods: []

name: TkOPASGN
superclass: TkOp
ri/1.8/system/RubyToken/TkOPASGN/new-c.yaml000064400000000301150403631240014105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::TkOPASGN::new
is_singleton: true
name: new
params: (line_no, char_no, op)
visibility: public
ri/1.8/system/RubyToken/set_token_position-i.yaml000064400000000313150403631240015756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken#set_token_position
is_singleton: false
name: set_token_position
params: (line, char)
visibility: public
ri/1.8/system/RubyToken/TkKW/cdesc-TkKW.yaml000064400000000276150403631250014341 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RubyToken::TkKW
includes: []

instance_methods: []

name: TkKW
superclass: TkId
ri/1.8/system/RubyToken/cdesc-RubyToken.yaml000064400000030043150403631250014616 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_token
- !ruby/object:RI::MethodSummary 
  name: def_token
comment: 
- !ruby/struct:SM::Flow::P 
  body: Definitions of all tokens involved in the lexical analysis
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_BEG
  value: ":EXPR_BEG"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_MID
  value: ":EXPR_MID"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_END
  value: ":EXPR_END"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_ARG
  value: ":EXPR_ARG"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_FNAME
  value: ":EXPR_FNAME"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_DOT
  value: ":EXPR_DOT"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_CLASS
  value: ":EXPR_CLASS"
- !ruby/object:RI::Constant 
  comment: 
  name: Symbol
  value: Integer
- !ruby/object:RI::Constant 
  comment: 
  name: TokenDefinitions
  value: "[     [:TkCLASS,      TkId,  \"class\",  EXPR_CLASS],     [:TkMODULE,     TkId,  \"module\", EXPR_BEG],     [:TkDEF,        TkId,  \"def\",    EXPR_FNAME],     [:TkUNDEF,      TkId,  \"undef\",  EXPR_FNAME],     [:TkBEGIN,      TkId,  \"begin\",  EXPR_BEG],     [:TkRESCUE,     TkId,  \"rescue\", EXPR_MID],     [:TkENSURE,     TkId,  \"ensure\", EXPR_BEG],     [:TkEND,        TkId,  \"end\",    EXPR_END],     [:TkIF,         TkId,  \"if\",     EXPR_BEG, :TkIF_MOD],     [:TkUNLESS,     TkId,  \"unless\", EXPR_BEG, :TkUNLESS_MOD],     [:TkTHEN,       TkId,  \"then\",   EXPR_BEG],     [:TkELSIF,      TkId,  \"elsif\",  EXPR_BEG],     [:TkELSE,       TkId,  \"else\",   EXPR_BEG],     [:TkCASE,       TkId,  \"case\",   EXPR_BEG],     [:TkWHEN,       TkId,  \"when\",   EXPR_BEG],     [:TkWHILE,      TkId,  \"while\",  EXPR_BEG, :TkWHILE_MOD],     [:TkUNTIL,      TkId,  \"until\",  EXPR_BEG, :TkUNTIL_MOD],     [:TkFOR,        TkId,  \"for\",    EXPR_BEG],     [:TkBREAK,      TkId,  \"break\",  EXPR_END],     [:TkNEXT,       TkId,  \"next\",   EXPR_END],     [:TkREDO,       TkId,  \"redo\",   EXPR_END],     [:TkRETRY,      TkId,  \"retry\",  EXPR_END],     [:TkIN,         TkId,  \"in\",     EXPR_BEG],     [:TkDO,         TkId,  \"do\",     EXPR_BEG],     [:TkRETURN,     TkId,  \"return\", EXPR_MID],     [:TkYIELD,      TkId,  \"yield\",  EXPR_END],     [:TkSUPER,      TkId,  \"super\",  EXPR_END],     [:TkSELF,       TkId,  \"self\",   EXPR_END],     [:TkNIL,        TkId,  \"nil\",    EXPR_END],     [:TkTRUE,       TkId,  \"true\",   EXPR_END],     [:TkFALSE,      TkId,  \"false\",  EXPR_END],     [:TkAND,        TkId,  \"and\",    EXPR_BEG],     [:TkOR,         TkId,  \"or\",     EXPR_BEG],     [:TkNOT,        TkId,  \"not\",    EXPR_BEG],     [:TkIF_MOD,     TkId],     [:TkUNLESS_MOD, TkId],     [:TkWHILE_MOD,  TkId],     [:TkUNTIL_MOD,  TkId],     [:TkALIAS,      TkId,  \"alias\",    EXPR_FNAME],     [:TkDEFINED,    TkId,  \"defined?\", EXPR_END],     [:TklBEGIN,     TkId,  \"BEGIN\",    EXPR_END],     [:TklEND,       TkId,  \"END\",      EXPR_END],     [:Tk__LINE__,   TkId,  \"__LINE__\", EXPR_END],     [:Tk__FILE__,   TkId,  \"__FILE__\", EXPR_END],      [:TkIDENTIFIER, TkId],     [:TkFID,        TkId],     [:TkGVAR,       TkId],     [:TkCVAR,       TkId],     [:TkIVAR,       TkId],     [:TkCONSTANT,   TkId],      [:TkINTEGER,    TkVal],     [:TkFLOAT,      TkVal],     [:TkSTRING,     TkVal],     [:TkXSTRING,    TkVal],     [:TkREGEXP,     TkVal],     [:TkSYMBOL,     TkVal],      [:TkDSTRING,    TkNode],     [:TkDXSTRING,   TkNode],     [:TkDREGEXP,    TkNode],     [:TkNTH_REF,    TkNode],     [:TkBACK_REF,   TkNode],      [:TkUPLUS,      TkOp,   \"+@\"],     [:TkUMINUS,     TkOp,   \"-@\"],     [:TkPOW,        TkOp,   \"**\"],     [:TkCMP,        TkOp,   \"<=>\"],     [:TkEQ,         TkOp,   \"==\"],     [:TkEQQ,        TkOp,   \"===\"],     [:TkNEQ,        TkOp,   \"!=\"],     [:TkGEQ,        TkOp,   \">=\"],     [:TkLEQ,        TkOp,   \"<=\"],     [:TkANDOP,      TkOp,   \"&&\"],     [:TkOROP,       TkOp,   \"||\"],     [:TkMATCH,      TkOp,   \"=~\"],     [:TkNMATCH,     TkOp,   \"!~\"],     [:TkDOT2,       TkOp,   \"..\"],     [:TkDOT3,       TkOp,   \"...\"],     [:TkAREF,       TkOp,   \"[]\"],     [:TkASET,       TkOp,   \"[]=\"],     [:TkLSHFT,      TkOp,   \"<<\"],     [:TkRSHFT,      TkOp,   \">>\"],     [:TkCOLON2,     TkOp],     [:TkCOLON3,     TkOp], #   [:OPASGN,       TkOp],               # +=, -=  etc. #     [:TkASSOC,      TkOp,   \"=>\"],     [:TkQUESTION,   TkOp,   \"?\"],        #?     [:TkCOLON,      TkOp,   \":\"],        #:          [:TkfLPAREN],         # func( #     [:TkfLBRACK],         # func[ #     [:TkfLBRACE],         # func{ #     [:TkSTAR],            # *arg     [:TkAMPER],           # &arg #     [:TkSYMBEG],          # :SYMBOL      [:TkGT,         TkOp,   \">\"],     [:TkLT,         TkOp,   \"<\"],     [:TkPLUS,       TkOp,   \"+\"],     [:TkMINUS,      TkOp,   \"-\"],     [:TkMULT,       TkOp,   \"*\"],     [:TkDIV,        TkOp,   \"/\"],     [:TkMOD,        TkOp,   \"%\"],     [:TkBITOR,      TkOp,   \"|\"],     [:TkBITXOR,     TkOp,   \"^\"],     [:TkBITAND,     TkOp,   \"&\"],     [:TkBITNOT,     TkOp,   \"~\"],     [:TkNOTOP,      TkOp,   \"!\"],      [:TkBACKQUOTE,  TkOp,   \"`\"],      [:TkASSIGN,     Token,  \"=\"],     [:TkDOT,        Token,  \".\"],     [:TkLPAREN,     Token,  \"(\"],  #(exp)     [:TkLBRACK,     Token,  \"[\"],  #[arry]     [:TkLBRACE,     Token,  \"{\"],  #{hash}     [:TkRPAREN,     Token,  \")\"],     [:TkRBRACK,     Token,  \"]\"],     [:TkRBRACE,     Token,  \"}\"],     [:TkCOMMA,      Token,  \",\"],     [:TkSEMICOLON,  Token,  \";\"],      [:TkCOMMENT],     [:TkRD_COMMENT],     [:TkSPACE],     [:TkNL],     [:TkEND_OF_SCRIPT],      [:TkBACKSLASH,  TkUnknownChar,  \"\\\\\"],     [:TkAT,         TkUnknownChar,  \"@\"],     [:TkDOLLAR,     TkUnknownChar,  \"$\"],   ]"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "{reading =&gt; token_class} {reading =&gt; [token_class, *opt]}"
  name: TkReading2Token
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: TkSymbol2Token
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_BEG
  value: ":EXPR_BEG"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_MID
  value: ":EXPR_MID"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_END
  value: ":EXPR_END"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_ARG
  value: ":EXPR_ARG"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_FNAME
  value: ":EXPR_FNAME"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_DOT
  value: ":EXPR_DOT"
- !ruby/object:RI::Constant 
  comment: 
  name: EXPR_CLASS
  value: ":EXPR_CLASS"
- !ruby/object:RI::Constant 
  comment: 
  name: TokenDefinitions
  value: "[     [:TkCLASS,      TkKW,  \"class\",  EXPR_CLASS],     [:TkMODULE,     TkKW,  \"module\", EXPR_BEG],     [:TkDEF,        TkKW,  \"def\",    EXPR_FNAME],     [:TkUNDEF,      TkKW,  \"undef\",  EXPR_FNAME],     [:TkBEGIN,      TkKW,  \"begin\",  EXPR_BEG],     [:TkRESCUE,     TkKW,  \"rescue\", EXPR_MID],     [:TkENSURE,     TkKW,  \"ensure\", EXPR_BEG],     [:TkEND,        TkKW,  \"end\",    EXPR_END],     [:TkIF,         TkKW,  \"if\",     EXPR_BEG, :TkIF_MOD],     [:TkUNLESS,     TkKW,  \"unless\", EXPR_BEG, :TkUNLESS_MOD],     [:TkTHEN,       TkKW,  \"then\",   EXPR_BEG],     [:TkELSIF,      TkKW,  \"elsif\",  EXPR_BEG],     [:TkELSE,       TkKW,  \"else\",   EXPR_BEG],     [:TkCASE,       TkKW,  \"case\",   EXPR_BEG],     [:TkWHEN,       TkKW,  \"when\",   EXPR_BEG],     [:TkWHILE,      TkKW,  \"while\",  EXPR_BEG, :TkWHILE_MOD],     [:TkUNTIL,      TkKW,  \"until\",  EXPR_BEG, :TkUNTIL_MOD],     [:TkFOR,        TkKW,  \"for\",    EXPR_BEG],     [:TkBREAK,      TkKW,  \"break\",  EXPR_END],     [:TkNEXT,       TkKW,  \"next\",   EXPR_END],     [:TkREDO,       TkKW,  \"redo\",   EXPR_END],     [:TkRETRY,      TkKW,  \"retry\",  EXPR_END],     [:TkIN,         TkKW,  \"in\",     EXPR_BEG],     [:TkDO,         TkKW,  \"do\",     EXPR_BEG],     [:TkRETURN,     TkKW,  \"return\", EXPR_MID],     [:TkYIELD,      TkKW,  \"yield\",  EXPR_END],     [:TkSUPER,      TkKW,  \"super\",  EXPR_END],     [:TkSELF,       TkKW,  \"self\",   EXPR_END],     [:TkNIL,        TkKW,  \"nil\",    EXPR_END],     [:TkTRUE,       TkKW,  \"true\",   EXPR_END],     [:TkFALSE,      TkKW,  \"false\",  EXPR_END],     [:TkAND,        TkKW,  \"and\",    EXPR_BEG],     [:TkOR,         TkKW,  \"or\",     EXPR_BEG],     [:TkNOT,        TkKW,  \"not\",    EXPR_BEG],     [:TkIF_MOD,     TkKW],     [:TkUNLESS_MOD, TkKW],     [:TkWHILE_MOD,  TkKW],     [:TkUNTIL_MOD,  TkKW],     [:TkALIAS,      TkKW,  \"alias\",    EXPR_FNAME],     [:TkDEFINED,    TkKW,  \"defined?\", EXPR_END],     [:TklBEGIN,     TkKW,  \"BEGIN\",    EXPR_END],     [:TklEND,       TkKW,  \"END\",      EXPR_END],     [:Tk__LINE__,   TkKW,  \"__LINE__\", EXPR_END],     [:Tk__FILE__,   TkKW,  \"__FILE__\", EXPR_END],      [:TkIDENTIFIER, TkId],     [:TkFID,        TkId],     [:TkGVAR,       TkId],     [:TkIVAR,       TkId],     [:TkCONSTANT,   TkId],      [:TkINTEGER,    TkVal],     [:TkFLOAT,      TkVal],     [:TkSTRING,     TkVal],     [:TkXSTRING,    TkVal],     [:TkREGEXP,     TkVal],     [:TkCOMMENT,    TkVal],      [:TkDSTRING,    TkNode],     [:TkDXSTRING,   TkNode],     [:TkDREGEXP,    TkNode],     [:TkNTH_REF,    TkId],     [:TkBACK_REF,   TkId],      [:TkUPLUS,      TkOp,   \"+@\"],     [:TkUMINUS,     TkOp,   \"-@\"],     [:TkPOW,        TkOp,   \"**\"],     [:TkCMP,        TkOp,   \"<=>\"],     [:TkEQ,         TkOp,   \"==\"],     [:TkEQQ,        TkOp,   \"===\"],     [:TkNEQ,        TkOp,   \"!=\"],     [:TkGEQ,        TkOp,   \">=\"],     [:TkLEQ,        TkOp,   \"<=\"],     [:TkANDOP,      TkOp,   \"&&\"],     [:TkOROP,       TkOp,   \"||\"],     [:TkMATCH,      TkOp,   \"=~\"],     [:TkNMATCH,     TkOp,   \"!~\"],     [:TkDOT2,       TkOp,   \"..\"],     [:TkDOT3,       TkOp,   \"...\"],     [:TkAREF,       TkOp,   \"[]\"],     [:TkASET,       TkOp,   \"[]=\"],     [:TkLSHFT,      TkOp,   \"<<\"],     [:TkRSHFT,      TkOp,   \">>\"],     [:TkCOLON2,     TkOp],     [:TkCOLON3,     TkOp], #   [:OPASGN,       TkOp],               # +=, -=  etc. #     [:TkASSOC,      TkOp,   \"=>\"],     [:TkQUESTION,   TkOp,   \"?\"],        #?     [:TkCOLON,      TkOp,   \":\"],        #:          [:TkfLPAREN],         # func( #     [:TkfLBRACK],         # func[ #     [:TkfLBRACE],         # func{ #     [:TkSTAR],            # *arg     [:TkAMPER],           # &arg #     [:TkSYMBOL,     TkId],          # :SYMBOL     [:TkSYMBEG,     TkId],      [:TkGT,         TkOp,   \">\"],     [:TkLT,         TkOp,   \"<\"],     [:TkPLUS,       TkOp,   \"+\"],     [:TkMINUS,      TkOp,   \"-\"],     [:TkMULT,       TkOp,   \"*\"],     [:TkDIV,        TkOp,   \"/\"],     [:TkMOD,        TkOp,   \"%\"],     [:TkBITOR,      TkOp,   \"|\"],     [:TkBITXOR,     TkOp,   \"^\"],     [:TkBITAND,     TkOp,   \"&\"],     [:TkBITNOT,     TkOp,   \"~\"],     [:TkNOTOP,      TkOp,   \"!\"],      [:TkBACKQUOTE,  TkOp,   \"`\"],      [:TkASSIGN,     Token,  \"=\"],     [:TkDOT,        Token,  \".\"],     [:TkLPAREN,     Token,  \"(\"],  #(exp)     [:TkLBRACK,     Token,  \"[\"],  #[arry]     [:TkLBRACE,     Token,  \"{\"],  #{hash}     [:TkRPAREN,     Token,  \")\"],     [:TkRBRACK,     Token,  \"]\"],     [:TkRBRACE,     Token,  \"}\"],     [:TkCOMMA,      Token,  \",\"],     [:TkSEMICOLON,  Token,  \";\"],      [:TkRD_COMMENT],     [:TkSPACE],     [:TkNL],     [:TkEND_OF_SCRIPT],      [:TkBACKSLASH,  TkUnknownChar,  \"\\\\\"],     [:TkAT,         TkUnknownChar,  \"@\"],     [:TkDOLLAR,     TkUnknownChar,  \"\\$\"], #\"   ]"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "{reading =&gt; token_class} {reading =&gt; [token_class, *opt]}"
  name: TkReading2Token
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: TkSymbol2Token
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: NEWLINE_TOKEN
  value: TkNL.new(0,0)
full_name: RubyToken
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: Token
- !ruby/object:RI::MethodSummary 
  name: Token
- !ruby/object:RI::MethodSummary 
  name: set_token_position
name: RubyToken
superclass: 
ri/1.8/system/RubyToken/TkVal/new-c.yaml000064400000000307150403631250013647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::TkVal::new
is_singleton: true
name: new
params: (line_no, char_no, value = nil)
visibility: public
ri/1.8/system/RubyToken/TkVal/cdesc-TkVal.yaml000064400000000527150403631260014743 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RubyToken::TkVal
includes: []

instance_methods: []

name: TkVal
superclass: Token
ri/1.8/system/RubyToken/Token/cdesc-Token.yaml000064400000001534150403631260015040 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: char_no
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: char_no
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: line_no
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: line_no
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: seek
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: text
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: text
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NO_TEXT
  value: "\"??\".freeze"
full_name: RubyToken::Token
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: set_text
name: Token
superclass: Object
ri/1.8/system/RubyToken/Token/new-c.yaml000064400000000272150403631260013710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RubyToken::Token::new
is_singleton: true
name: new
params: (line_no, char_no)
visibility: public
ri/1.8/system/RubyToken/Token/set_text-i.yaml000064400000000513150403631260014762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Because we're used in contexts that expect to return a token, we set the text string and then return ourselves
full_name: RubyToken::Token#set_text
is_singleton: false
name: set_text
params: (text)
visibility: public
ri/1.8/system/Numeric/%2b%40-i.yaml000064400000000377150403631270012315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unary Plus---Returns the receiver's value.
full_name: Numeric#+@
is_singleton: false
name: +@
params: |
  +num    => num

visibility: public
ri/1.8/system/Numeric/eql%3f-i.yaml000064400000000744150403631270012611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>num</em> and <em>numeric</em> are the same type and have equal values.
- !ruby/struct:SM::Flow::VERB 
  body: "   1 == 1.0          #=&gt; true\n   1.eql?(1.0)       #=&gt; false\n   (1.0).eql?(1.0)   #=&gt; true\n"
full_name: Numeric#eql?
is_singleton: false
name: eql?
params: |
  num.eql?(numeric)    => true or false

visibility: public
ri/1.8/system/Numeric/fdiv-i.yaml000064400000000513150403631300012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Numeric#/</tt>, but overridden in subclasses.
full_name: Numeric#fdiv
is_singleton: false
name: fdiv
params: |
  num.quo(numeric)    =>   result
  num.fdiv(numeric)   =>   result

visibility: public
ri/1.8/system/Numeric/integer%3f-i.yaml000064400000000535150403631300013455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>num</em> is an <tt>Integer</tt> (including <tt>Fixnum</tt> and <tt>Bignum</tt>).
full_name: Numeric#integer?
is_singleton: false
name: integer?
params: |
  num.integer? -> true or false

visibility: public
ri/1.8/system/Numeric/%3c%3d%3e-i.yaml000064400000000455150403631300012666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns zero if <em>num</em> equals <em>other</em>, <tt>nil</tt> otherwise.
full_name: Numeric#<=>
is_singleton: false
name: <=>
params: |
  num <=> other -> 0 or nil

visibility: public
ri/1.8/system/Numeric/coerce-i.yaml000064400000001430150403631310012756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "If <em>aNumeric</em> is the same type as <em>num</em>, returns an array containing <em>aNumeric</em> and <em>num</em>. Otherwise, returns an array with both <em>aNumeric</em> and <em>num</em> represented as <tt>Float</tt> objects. 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."
- !ruby/struct:SM::Flow::VERB 
  body: "   1.coerce(2.5)   #=&gt; [2.5, 1.0]\n   1.2.coerce(3)   #=&gt; [3.0, 1.2]\n   1.coerce(2)     #=&gt; [2, 1]\n"
full_name: Numeric#coerce
is_singleton: false
name: coerce
params: |
  num.coerce(numeric)   => array

visibility: public
ri/1.8/system/Numeric/divmod-i.yaml000064400000004044150403631310013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the quotient and modulus obtained by dividing <em>num</em> by <em>aNumeric</em>. If <tt>q, r = x.divmod(y)</tt>, then
- !ruby/struct:SM::Flow::VERB 
  body: "    q = floor(float(x)/float(y))\n    x = q*y + r\n"
- !ruby/struct:SM::Flow::P 
  body: "The quotient is rounded toward -infinity, as shown in the following table:"
- !ruby/struct:SM::Flow::VERB 
  body: "   a    |  b  |  a.divmod(b)  |   a/b   | a.modulo(b) | a.remainder(b)\n  ------+-----+---------------+---------+-------------+---------------\n   13   |  4  |   3,    1     |   3     |    1        |     1\n  ------+-----+---------------+---------+-------------+---------------\n   13   | -4  |  -4,   -3     |  -3     |   -3        |     1\n  ------+-----+---------------+---------+-------------+---------------\n  -13   |  4  |  -4,    3     |  -4     |    3        |    -1\n  ------+-----+---------------+---------+-------------+---------------\n  -13   | -4  |   3,   -1     |   3     |   -1        |    -1\n  ------+-----+---------------+---------+-------------+---------------\n   11.5 |  4  |   2,    3.5   |   2.875 |    3.5      |     3.5\n  ------+-----+---------------+---------+-------------+---------------\n   11.5 | -4  |  -3,   -0.5   |  -2.875 |   -0.5      |     3.5\n  ------+-----+---------------+---------+-------------+---------------\n  -11.5 |  4  |  -3,    0.5   |  -2.875 |    0.5      |    -3.5\n  ------+-----+---------------+---------+-------------+---------------\n  -11.5 | -4  |   2    -3.5   |   2.875 |   -3.5      |    -3.5\n"
- !ruby/struct:SM::Flow::P 
  body: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "   11.divmod(3)         #=&gt; [3, 2]\n   11.divmod(-3)        #=&gt; [-4, -1]\n   11.divmod(3.5)       #=&gt; [3, 0.5]\n   (-11).divmod(3.5)    #=&gt; [-4, 3.0]\n   (11.5).divmod(3.5)   #=&gt; [3, 1.0]\n"
full_name: Numeric#divmod
is_singleton: false
name: divmod
params: |
  num.divmod( aNumeric ) -> anArray

visibility: public
ri/1.8/system/Numeric/quo-i.yaml000064400000000511150403631310012321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Numeric#/</tt>, but overridden in subclasses.
full_name: Numeric#quo
is_singleton: false
name: quo
params: |
  num.quo(numeric)    =>   result
  num.fdiv(numeric)   =>   result

visibility: public
ri/1.8/system/Numeric/abs-i.yaml000064400000000626150403631320012272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the absolute value of <em>num</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   12.abs         #=&gt; 12\n   (-34.56).abs   #=&gt; 34.56\n   -34.56.abs     #=&gt; 34.56\n"
full_name: Numeric#abs
is_singleton: false
name: abs
params: |
  num.abs   => num or numeric

visibility: public
ri/1.8/system/Numeric/angle-i.yaml000064400000000332150403631320012605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #arg"
full_name: Numeric#angle
is_singleton: false
name: angle
params: ()
visibility: public
ri/1.8/system/Numeric/remainder-i.yaml000064400000001124150403631320013465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <em>num</em> and <em>numeric</em> have different signs, returns <em>mod</em>-<em>numeric</em>; otherwise, returns <em>mod</em>. In both cases <em>mod</em> is the value <em>num</em>.<tt>modulo(</tt><em>numeric</em><tt>)</tt>. The differences between <tt>remainder</tt> and modulo (<tt>%</tt>) are shown in the table under <tt>Numeric#divmod</tt>.
full_name: Numeric#remainder
is_singleton: false
name: remainder
params: |
  num.remainder(numeric)    => result

visibility: public
ri/1.8/system/Numeric/ceil-i.yaml000064400000001066150403631320012440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the smallest <tt>Integer</tt> greater than or equal to <em>num</em>. Class <tt>Numeric</tt> achieves this by converting itself to a <tt>Float</tt> then invoking <tt>Float#ceil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.ceil        #=&gt; 1\n   1.2.ceil      #=&gt; 2\n   (-1.2).ceil   #=&gt; -1\n   (-1.0).ceil   #=&gt; -1\n"
full_name: Numeric#ceil
is_singleton: false
name: ceil
params: |
  num.ceil    => integer

visibility: public
ri/1.8/system/Numeric/nonzero%3f-i.yaml000064400000001302150403631320013505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns <em>num</em> if <em>num</em> is not zero, <tt>nil</tt> otherwise. This behavior is useful when chaining comparisons:"
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w( z Bb bB bb BB a aA Aa AA A )\n   b = a.sort {|a,b| (a.downcase &lt;=&gt; b.downcase).nonzero? || a &lt;=&gt; b }\n   b   #=&gt; [&quot;A&quot;, &quot;a&quot;, &quot;AA&quot;, &quot;Aa&quot;, &quot;aA&quot;, &quot;BB&quot;, &quot;Bb&quot;, &quot;bB&quot;, &quot;bb&quot;, &quot;z&quot;]\n"
full_name: Numeric#nonzero?
is_singleton: false
name: nonzero?
params: |
  num.nonzero?    => num or nil

visibility: public
ri/1.8/system/Numeric/step-i.yaml000064400000002466150403631330012505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes <em>block</em> with the sequence of numbers starting at <em>num</em>, incremented by <em>step</em> on each call. The loop finishes when the value to be passed to the block is greater than <em>limit</em> (if <em>step</em> is positive) or less than <em>limit</em> (if <em>step</em> is negative). If all the arguments are integers, the loop operates using an integer counter. If any of the arguments are floating point numbers, all are converted to floats, and the loop is executed <em>floor(n + n*epsilon)+ 1</em> times, where <em>n = (limit - num)/step</em>. Otherwise, the loop starts at <em>num</em>, uses either the <tt>&lt;</tt> or <tt>&gt;</tt> operator to compare the counter against <em>limit</em>, and increments itself using the <tt>+</tt> operator.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.step(10, 2) { |i| print i, &quot; &quot; }\n   Math::E.step(Math::PI, 0.2) { |f| print f, &quot; &quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   1 3 5 7 9\n   2.71828182845905 2.91828182845905 3.11828182845905\n"
full_name: Numeric#step
is_singleton: false
name: step
params: |
  num.step(limit, step ) {|i| block }     => num

visibility: public
ri/1.8/system/Numeric/singleton_method_added-i.yaml000064400000000512150403631330016203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Trap attempts to add methods to <tt>Numeric</tt> objects. Always raises a <tt>TypeError</tt>
full_name: Numeric#singleton_method_added
is_singleton: false
name: singleton_method_added
params: (p1)
visibility: public
ri/1.8/system/Numeric/zero%3f-i.yaml000064400000000441150403631330012776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>num</em> has a zero value.
full_name: Numeric#zero?
is_singleton: false
name: zero?
params: |
  num.zero?    => true or false

visibility: public
ri/1.8/system/Numeric/im-i.yaml000064400000000370150403631330012127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a Complex number <tt>(0,<em>self</em>)</tt>.
full_name: Numeric#im
is_singleton: false
name: im
params: ()
visibility: public
ri/1.8/system/Numeric/truncate-i.yaml000064400000000604150403631340013350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>num</em> truncated to an integer. <tt>Numeric</tt> implements this by converting its value to a float and invoking <tt>Float#truncate</tt>.
full_name: Numeric#truncate
is_singleton: false
name: truncate
params: |
  num.truncate    => integer

visibility: public
ri/1.8/system/Numeric/to_int-i.yaml000064400000000474150403631340013024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the child class's <tt>to_i</tt> method to convert <em>num</em> to an integer.
full_name: Numeric#to_int
is_singleton: false
name: to_int
params: |
  num.to_int    => integer

visibility: public
ri/1.8/system/Numeric/polar-i.yaml000064400000000334150403631340012640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Complex#polar.
full_name: Numeric#polar
is_singleton: false
name: polar
params: ()
visibility: public
ri/1.8/system/Numeric/cdesc-Numeric.yaml000064400000003630150403631340013760 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Numeric is a built-in class on which Fixnum, Bignum, etc., are based. Here some methods are added so that all number types can be treated to some extent as Complex numbers.
constants: []

full_name: Numeric
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: +@
- !ruby/object:RI::MethodSummary 
  name: -@
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: abs
- !ruby/object:RI::MethodSummary 
  name: angle
- !ruby/object:RI::MethodSummary 
  name: arg
- !ruby/object:RI::MethodSummary 
  name: ceil
- !ruby/object:RI::MethodSummary 
  name: coerce
- !ruby/object:RI::MethodSummary 
  name: conj
- !ruby/object:RI::MethodSummary 
  name: conjugate
- !ruby/object:RI::MethodSummary 
  name: div
- !ruby/object:RI::MethodSummary 
  name: divmod
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: fdiv
- !ruby/object:RI::MethodSummary 
  name: floor
- !ruby/object:RI::MethodSummary 
  name: im
- !ruby/object:RI::MethodSummary 
  name: imag
- !ruby/object:RI::MethodSummary 
  name: image
- !ruby/object:RI::MethodSummary 
  name: integer?
- !ruby/object:RI::MethodSummary 
  name: modulo
- !ruby/object:RI::MethodSummary 
  name: nonzero?
- !ruby/object:RI::MethodSummary 
  name: polar
- !ruby/object:RI::MethodSummary 
  name: quo
- !ruby/object:RI::MethodSummary 
  name: real
- !ruby/object:RI::MethodSummary 
  name: remainder
- !ruby/object:RI::MethodSummary 
  name: round
- !ruby/object:RI::MethodSummary 
  name: singleton_method_added
- !ruby/object:RI::MethodSummary 
  name: step
- !ruby/object:RI::MethodSummary 
  name: to_int
- !ruby/object:RI::MethodSummary 
  name: truncate
- !ruby/object:RI::MethodSummary 
  name: zero?
name: Numeric
superclass: Object
ri/1.8/system/Numeric/conj-i.yaml000064400000000336150403631340012456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #conjugate"
full_name: Numeric#conj
is_singleton: false
name: conj
params: ()
visibility: public
ri/1.8/system/Numeric/image-i.yaml000064400000000441150403631340012604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: imag
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The imaginary part of a complex number, i.e. 0.
full_name: Numeric#image
is_singleton: false
name: image
params: ()
visibility: public
ri/1.8/system/Numeric/imag-i.yaml000064400000000332150403631340012436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #image"
full_name: Numeric#imag
is_singleton: false
name: imag
params: ()
visibility: public
ri/1.8/system/Numeric/real-i.yaml000064400000000376150403631350012455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The real part of a complex number, i.e. <em>self</em>.
full_name: Numeric#real
is_singleton: false
name: real
params: ()
visibility: public
ri/1.8/system/Numeric/%2d%40-i.yaml000064400000000415150403631350012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unary Minus---Returns the receiver's value, negated.
full_name: Numeric#-@
is_singleton: false
name: -@
params: |
  -num    => numeric

visibility: public
ri/1.8/system/Numeric/div-i.yaml000064400000000611150403631350012304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Uses <tt>/</tt> to perform division, then converts the result to an integer. <tt>Numeric</tt> does not define the <tt>/</tt> operator; this is left to subclasses.
full_name: Numeric#div
is_singleton: false
name: div
params: |
  num.div(numeric)    => integer

visibility: public
ri/1.8/system/Numeric/round-i.yaml000064400000000574150403631360012662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Rounds <em>num</em> to the nearest integer. <tt>Numeric</tt> implements this by converting itself to a <tt>Float</tt> and invoking <tt>Float#round</tt>.
full_name: Numeric#round
is_singleton: false
name: round
params: |
  num.round    => integer

visibility: public
ri/1.8/system/Numeric/conjugate-i.yaml000064400000000470150403631370013506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: conj
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "See Complex#conjugate (short answer: returns <em>self</em>)."
full_name: Numeric#conjugate
is_singleton: false
name: conjugate
params: ()
visibility: public
ri/1.8/system/Numeric/floor-i.yaml000064400000000773150403631370012656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the largest integer less than or equal to <em>num</em>. <tt>Numeric</tt> implements this by converting <em>anInteger</em> to a <tt>Float</tt> and invoking <tt>Float#floor</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.floor      #=&gt; 1\n   (-1).floor   #=&gt; -1\n"
full_name: Numeric#floor
is_singleton: false
name: floor
params: |
  num.floor    => integer

visibility: public
ri/1.8/system/Numeric/arg-i.yaml000064400000000377150403631400012300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: angle
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Complex#arg.
full_name: Numeric#arg
is_singleton: false
name: arg
params: ()
visibility: public
ri/1.8/system/Numeric/modulo-i.yaml000064400000000471150403631400013021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <em>num</em>.<tt>divmod(</tt><em>aNumeric</em><tt>)[1]</tt>.
full_name: Numeric#modulo
is_singleton: false
name: modulo
params: |
  num.modulo(numeric)    => result

visibility: public
ri/1.8/system/Process/setpgrp-c.yaml000064400000000453150403631420013216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>setpgid(0,0)</tt>. Not available on all platforms.
full_name: Process::setpgrp
is_singleton: true
name: setpgrp
params: |
  Process.setpgrp   => 0

visibility: public
ri/1.8/system/Process/exit%21-c.yaml000064400000000645150403631420012716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Exits the process immediately. No exit handlers are run. <em>fixnum</em> is returned to the underlying system as the exit status.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.exit!(0)\n"
full_name: Process::exit!
is_singleton: true
name: exit!
params: |
  Process.exit!(fixnum=-1)

visibility: public
ri/1.8/system/Process/gid%3d-c.yaml000064400000000415150403631430012570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the group ID for this process.
full_name: Process::gid=
is_singleton: true
name: gid=
params: |
  Process.gid= fixnum   => fixnum

visibility: public
ri/1.8/system/Process/getpriority-c.yaml000064400000001537150403631440014121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Gets the scheduling priority for specified process, process group, or user. <em>kind</em> indicates the kind of entity to find: one of <tt>Process::PRIO_PGRP</tt>, <tt>Process::PRIO_USER</tt>, or <tt>Process::PRIO_PROCESS</tt>. <em>integer</em> is an id indicating the particular process, process group, or user (an id of 0 means <em>current</em>). Lower priorities are more favorable for scheduling. Not available on all platforms."
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.getpriority(Process::PRIO_USER, 0)      #=&gt; 19\n   Process.getpriority(Process::PRIO_PROCESS, 0)   #=&gt; 19\n"
full_name: Process::getpriority
is_singleton: true
name: getpriority
params: |
  Process.getpriority(kind, integer)   => fixnum

visibility: public
ri/1.8/system/Process/getpgid-c.yaml000064400000000645150403631440013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the process group ID for the given process id. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.getpgid(Process.ppid())   #=&gt; 25527\n"
full_name: Process::getpgid
is_singleton: true
name: getpgid
params: |
  Process.getpgid(pid)   => integer

visibility: public
ri/1.8/system/Process/maxgroups-c.yaml000064400000000617150403631440013563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the maximum number of gids allowed in the supplemental group access list.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.maxgroups   #=&gt; 32\n"
full_name: Process::maxgroups
is_singleton: true
name: maxgroups
params: |
  Process.maxgroups   => fixnum

visibility: public
ri/1.8/system/Process/abort-c.yaml000064400000000613150403631440012641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Terminate execution immediately, effectively by calling <tt>Kernel.exit(1)</tt>. If <em>msg</em> is given, it is written to STDERR prior to terminating.
full_name: Process::abort
is_singleton: true
name: abort
params: |
  abort
  Kernel::abort
  Process::abort

visibility: public
ri/1.8/system/Process/kill-c.yaml000064400000001703150403631450012467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends the given signal to the specified process id(s), or to the current process if <em>pid</em> is zero. <em>signal</em> may be an integer signal number or a POSIX signal name (either with or without a <tt>SIG</tt> prefix). If <em>signal</em> is negative (or starts with a minus sign), kills process groups instead of processes. Not all signals are available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   pid = fork do\n      Signal.trap(&quot;HUP&quot;) { puts &quot;Ouch!&quot;; exit }\n      # ... do some work ...\n   end\n   # ...\n   Process.kill(&quot;HUP&quot;, pid)\n   Process.wait\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Ouch!\n"
full_name: Process::kill
is_singleton: true
name: kill
params: |
  Process.kill(signal, pid, ...)    => fixnum

visibility: public
ri/1.8/system/Process/times-c.yaml000064400000000731150403631450012655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>Tms</tt> structure (see <tt>Struct::Tms</tt> on page 388) that contains user and system CPU times for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Process.times\n   [ t.utime, t.stime ]   #=&gt; [0.0, 0.02]\n"
full_name: Process::times
is_singleton: true
name: times
params: |
  Process.times   => aStructTms

visibility: public
ri/1.8/system/Process/setrlimit-c.yaml000064400000004646150403631450013561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the resource limit of the process. <em>cur_limit</em> means current (soft) limit and <em>max_limit</em> means maximum (hard) limit.
- !ruby/struct:SM::Flow::P 
  body: If <em>max_limit</em> is not given, <em>cur_limit</em> is used.
- !ruby/struct:SM::Flow::P 
  body: <em>resource</em> indicates the kind of resource to limit. The list of resources are OS dependent. Ruby may support following resources.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_CORE
    body: core size (bytes) (SUSv3)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_CPU
    body: CPU time (seconds) (SUSv3)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_DATA
    body: data segment (bytes) (SUSv3)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_FSIZE
    body: file size (bytes) (SUSv3)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_NOFILE
    body: file descriptors (number) (SUSv3)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_STACK
    body: stack size (bytes) (SUSv3)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_AS
    body: total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_MEMLOCK
    body: total size for mlock(2) (bytes) (4.4BSD, GNU/Linux)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_NPROC
    body: number of processes for the user (number) (4.4BSD, GNU/Linux)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_RSS
    body: resident memory size (bytes) (4.2BSD, GNU/Linux)
  - !ruby/struct:SM::Flow::LI 
    label: Process::RLIMIT_SBSIZE
    body: all socket buffers (bytes) (NetBSD, FreeBSD)
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: Other <tt>Process::RLIMIT_???</tt> constants may be defined.
- !ruby/struct:SM::Flow::P 
  body: <em>cur_limit</em> and <em>max_limit</em> may be <tt>Process::RLIM_INFINITY</tt>, which means that the resource is not limited. They may be <tt>Process::RLIM_SAVED_MAX</tt> or <tt>Process::RLIM_SAVED_CUR</tt> too. See system setrlimit(2) manual for details.
full_name: Process::setrlimit
is_singleton: true
name: setrlimit
params: |
  Process.setrlimit(resource, cur_limit, max_limit)        => nil
  Process.setrlimit(resource, cur_limit)                   => nil

visibility: public
ri/1.8/system/Process/setpriority-c.yaml000064400000001135150403631450014130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Process#getpriority</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.setpriority(Process::PRIO_USER, 0, 19)      #=&gt; 0\n   Process.setpriority(Process::PRIO_PROCESS, 0, 19)   #=&gt; 0\n   Process.getpriority(Process::PRIO_USER, 0)          #=&gt; 19\n   Process.getpriority(Process::PRIO_PROCESS, 0)       #=&gt; 19\n"
full_name: Process::setpriority
is_singleton: true
name: setpriority
params: |
  Process.setpriority(kind, integer, priority)   => 0

visibility: public
ri/1.8/system/Process/maxgroups%3d-c.yaml000064400000000512150403631460014053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the maximum number of gids allowed in the supplemental group access list.
full_name: Process::maxgroups=
is_singleton: true
name: maxgroups=
params: |
  Process.maxgroups= fixnum   => fixnum

visibility: public
ri/1.8/system/Process/wait-c.yaml000064400000004262150403631460012504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Waits for a child process to exit, returns its process id, and sets <tt>$?</tt> to a <tt>Process::Status</tt> object containing information on that process. Which child it waits on depends on the value of <em>pid</em>:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "> 0:"
    body: Waits for the child whose process ID equals <em>pid</em>.
  - !ruby/struct:SM::Flow::LI 
    label: "0:"
    body: Waits for any child whose process group ID equals that of the calling process.
  - !ruby/struct:SM::Flow::LI 
    label: "-1:"
    body: Waits for any child process (the default if no <em>pid</em> is given).
  - !ruby/struct:SM::Flow::LI 
    label: "< -1:"
    body: Waits for any child whose process group ID equals the absolute value of <em>pid</em>.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: The <em>flags</em> argument may be a logical or of the flag values <tt>Process::WNOHANG</tt> (do not block if no child available) or <tt>Process::WUNTRACED</tt> (return stopped children that haven't been reported). Not all flags are available on all platforms, but a flag value of zero will work on all platforms.
- !ruby/struct:SM::Flow::P 
  body: Calling this method raises a <tt>SystemError</tt> if there are no child processes. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   include Process\n   fork { exit 99 }                 #=&gt; 27429\n   wait                             #=&gt; 27429\n   $?.exitstatus                    #=&gt; 99\n\n   pid = fork { sleep 3 }           #=&gt; 27440\n   Time.now                         #=&gt; Wed Apr 09 08:57:09 CDT 2003\n   waitpid(pid, Process::WNOHANG)   #=&gt; nil\n   Time.now                         #=&gt; Wed Apr 09 08:57:09 CDT 2003\n   waitpid(pid, 0)                  #=&gt; 27440\n   Time.now                         #=&gt; Wed Apr 09 08:57:12 CDT 2003\n"
full_name: Process::wait
is_singleton: true
name: wait
params: |
  Process.wait()                     => fixnum
  Process.wait(pid=-1, flags=0)      => fixnum
  Process.waitpid(pid=-1, flags=0)   => fixnum

visibility: public
ri/1.8/system/Process/euid-c.yaml000064400000000650150403631460012463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the effective user ID for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.euid   #=&gt; 501\n"
full_name: Process::euid
is_singleton: true
name: euid
params: |
  Process.euid           => fixnum
  Process::UID.eid       => fixnum
  Process::Sys.geteuid   => fixnum

visibility: public
ri/1.8/system/Process/egid-c.yaml000064400000000706150403631460012447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the effective group ID for this process. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.egid   #=&gt; 500\n"
full_name: Process::egid
is_singleton: true
name: egid
params: |
  Process.egid          => fixnum
  Process::GID.eid      => fixnum
  Process::Sys.geteid   => fixnum

visibility: public
ri/1.8/system/Process/getpgrp-c.yaml000064400000000661150403631470013210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the process group ID for this process. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.getpgid(0)   #=&gt; 25527\n   Process.getpgrp      #=&gt; 25527\n"
full_name: Process::getpgrp
is_singleton: true
name: getpgrp
params: |
  Process.getpgrp   => integer

visibility: public
ri/1.8/system/Process/detach-c.yaml000064400000003643150403631470012773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Some operating systems retain the status of terminated child processes until the parent collects that status (normally using some variant of <tt>wait()</tt>. If the parent never collects this status, the child stays around as a <em>zombie</em> process. <tt>Process::detach</tt> prevents this by setting up a separate Ruby thread whose sole job is to reap the status of the process <em>pid</em> when it terminates. Use <tt>detach</tt> only when you do not intent to explicitly wait for the child to terminate. <tt>detach</tt> only checks the status periodically (currently once each second).
- !ruby/struct:SM::Flow::P 
  body: The waiting thread returns the exit status of the detached process when it terminates, so you can use <tt>Thread#join</tt> to know the result. If specified <em>pid</em> is not a valid child process ID, the thread returns <tt>nil</tt> immediately.
- !ruby/struct:SM::Flow::P 
  body: In this first example, we don't reap the first child process, so it appears as a zombie in the process status display.
- !ruby/struct:SM::Flow::VERB 
  body: "   p1 = fork { sleep 0.1 }\n   p2 = fork { sleep 0.2 }\n   Process.waitpid(p2)\n   sleep 2\n   system(&quot;ps -ho pid,state -p #{p1}&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   27389 Z\n"
- !ruby/struct:SM::Flow::P 
  body: In the next example, <tt>Process::detach</tt> is used to reap the child automatically.
- !ruby/struct:SM::Flow::VERB 
  body: "   p1 = fork { sleep 0.1 }\n   p2 = fork { sleep 0.2 }\n   Process.detach(p1)\n   Process.waitpid(p2)\n   sleep 2\n   system(&quot;ps -ho pid,state -p #{p1}&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>(produces no output)</em>
full_name: Process::detach
is_singleton: true
name: detach
params: |
  Process.detach(pid)   => thread

visibility: public
ri/1.8/system/Process/exit-c.yaml000064400000002545150403631470012514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initiates the termination of the Ruby script by raising the <tt>SystemExit</tt> exception. This exception may be caught. The optional parameter is used to return a status code to the invoking environment.
- !ruby/struct:SM::Flow::VERB 
  body: "   begin\n     exit\n     puts &quot;never get here&quot;\n   rescue SystemExit\n     puts &quot;rescued a SystemExit exception&quot;\n   end\n   puts &quot;after begin block&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   rescued a SystemExit exception\n   after begin block\n"
- !ruby/struct:SM::Flow::P 
  body: Just prior to termination, Ruby executes any <tt>at_exit</tt> functions (see Kernel::at_exit) and runs any object finalizers (see ObjectSpace::define_finalizer).
- !ruby/struct:SM::Flow::VERB 
  body: "   at_exit { puts &quot;at_exit function&quot; }\n   ObjectSpace.define_finalizer(&quot;string&quot;,  proc { puts &quot;in finalizer&quot; })\n   exit\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   at_exit function\n   in finalizer\n"
full_name: Process::exit
is_singleton: true
name: exit
params: |
  exit(integer=0)
  Kernel::exit(integer=0)
  Process::exit(integer=0)

visibility: public
ri/1.8/system/Process/egid%3d-c.yaml000064400000000473150403631470012745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the effective group ID for this process. Not available on all platforms.
full_name: Process::egid=
is_singleton: true
name: egid=
params: |
  Process.egid = fixnum   => fixnum

visibility: public
ri/1.8/system/Process/exec-c.yaml000064400000002337150403631500012460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the current process by running the given external <em>command</em>. If <tt>exec</tt> is given a single argument, that argument is taken as a line that is subject to shell expansion before being executed. If multiple arguments are given, the second and subsequent arguments are passed as parameters to <em>command</em> with no shell expansion. If the first argument is a two-element array, the first element is the command to be executed, and the second argument is used as the <tt>argv[0]</tt> value, which may show up in process listings. In MSDOS environments, the command is executed in a subshell; otherwise, one of the <tt>exec(2)</tt> system calls is used, so the running command may inherit some of the environment of the original program (including open file descriptors).
- !ruby/struct:SM::Flow::VERB 
  body: "   exec &quot;echo *&quot;       # echoes list of files in current directory\n   # never get here\n\n   exec &quot;echo&quot;, &quot;*&quot;    # echoes an asterisk\n   # never get here\n"
full_name: Process::exec
is_singleton: true
name: exec
params: |
  exec(command [, arg, ...])

visibility: public
ri/1.8/system/Process/gid-c.yaml000064400000000640150403631500012272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the (real) group ID for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.gid   #=&gt; 500\n"
full_name: Process::gid
is_singleton: true
name: gid
params: |
  Process.gid           => fixnum
  Process::GID.rid      => fixnum
  Process::Sys.getgid   => fixnum

visibility: public
ri/1.8/system/Process/initgroups-c.yaml000064400000001505150403631500013733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initializes the supplemental group access list by reading the system group database and using all groups of which the given user is a member. The group with the specified <em>gid</em> is also added to the list. Returns the resulting <tt>Array</tt> of the gids of all the groups in the supplementary group access list. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.groups   #=&gt; [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]\n   Process.initgroups( &quot;mgranger&quot;, 30 )   #=&gt; [30, 6, 10, 11]\n   Process.groups   #=&gt; [30, 6, 10, 11]\n"
full_name: Process::initgroups
is_singleton: true
name: initgroups
params: |
  Process.initgroups(username, gid)   => array

visibility: public
ri/1.8/system/Process/setsid-c.yaml000064400000000711150403631500013021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Establishes this process as a new session and process group leader, with no controlling tty. Returns the session id. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.setsid   #=&gt; 27422\n"
full_name: Process::setsid
is_singleton: true
name: setsid
params: |
  Process.setsid   => fixnum

visibility: public
ri/1.8/system/Process/groups%3d-c.yaml000064400000001030150403631510013335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the supplemental group access list to the given <tt>Array</tt> of group IDs.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.groups   #=&gt; [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]\n   Process.groups = [27, 6, 10, 11]   #=&gt; [27, 6, 10, 11]\n   Process.groups   #=&gt; [27, 6, 10, 11]\n"
full_name: Process::groups=
is_singleton: true
name: groups=
params: |
  Process.groups= array   => array

visibility: public
ri/1.8/system/Process/uid%3d-c.yaml000064400000000470150403631510012606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the (integer) user ID for this process. Not available on all platforms.
full_name: Process::uid=
is_singleton: true
name: uid=
params: |
  Process.uid= integer   => numeric

visibility: public
ri/1.8/system/Process/setpgid-c.yaml000064400000000556150403631510013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the process group ID of <em>pid</em> (0 indicates this process) to <em>integer</em>. Not available on all platforms.
full_name: Process::setpgid
is_singleton: true
name: setpgid
params: |
  Process.setpgid(pid, integer)   => 0

visibility: public
ri/1.8/system/Process/wait2-c.yaml000064400000001404150403631510012555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits for a child process to exit (see Process::waitpid for exact semantics) and returns an array containing the process id and the exit status (a <tt>Process::Status</tt> object) of that child. Raises a <tt>SystemError</tt> if there are no child processes.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.fork { exit 99 }   #=&gt; 27437\n   pid, status = Process.wait2\n   pid                        #=&gt; 27437\n   status.exitstatus          #=&gt; 99\n"
full_name: Process::wait2
is_singleton: true
name: wait2
params: |
  Process.wait2(pid=-1, flags=0)      => [pid, status]
  Process.waitpid2(pid=-1, flags=0)   => [pid, status]

visibility: public
ri/1.8/system/Process/Status/to_i-i.yaml000064400000001047150403631520013756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the bits in <em>stat</em> as a <tt>Fixnum</tt>. Poking around in these bits is platform dependent.
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { exit 0xab }         #=&gt; 26566\n   Process.wait               #=&gt; 26566\n   sprintf('%04x', $?.to_i)   #=&gt; &quot;ab00&quot;\n"
full_name: Process::Status#to_i
is_singleton: false
name: to_i
params: |
  stat.to_i     => fixnum
  stat.to_int   => fixnum

visibility: public
ri/1.8/system/Process/Status/stopped%3f-i.yaml000064400000000617150403631520015002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if this process is stopped. This is only returned if the corresponding <tt>wait</tt> call had the <tt>WUNTRACED</tt> flag set.
full_name: Process::Status#stopped?
is_singleton: false
name: stopped?
params: |
  stat.stopped?   => true or false

visibility: public
ri/1.8/system/Process/Status/signaled%3f-i.yaml000064400000000516150403631530015111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> terminated because of an uncaught signal.
full_name: Process::Status#signaled?
is_singleton: false
name: signaled?
params: |
  stat.signaled?   => true or false

visibility: public
ri/1.8/system/Process/Status/%26-i.yaml000064400000000754150403631530013325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Logical AND of the bits in <em>stat</em> with <em>num</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { exit 0x37 }\n   Process.wait\n   sprintf('%04x', $?.to_i)       #=&gt; &quot;3700&quot;\n   sprintf('%04x', $? &amp; 0x1e00)   #=&gt; &quot;1600&quot;\n"
full_name: Process::Status#&
is_singleton: false
name: "&"
params: |
  stat & num   => fixnum

visibility: public
ri/1.8/system/Process/Status/exited%3f-i.yaml000064400000000564150403631530014610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> exited normally (for example using an <tt>exit()</tt> call or finishing the program).
full_name: Process::Status#exited?
is_singleton: false
name: exited?
params: |
  stat.exited?   => true or false

visibility: public
ri/1.8/system/Process/Status/pid-i.yaml000064400000000654150403631530013604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the process ID that this status object represents.
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { exit }   #=&gt; 26569\n   Process.wait    #=&gt; 26569\n   $?.pid          #=&gt; 26569\n"
full_name: Process::Status#pid
is_singleton: false
name: pid
params: |
  stat.pid   => fixnum

visibility: public
ri/1.8/system/Process/Status/exitstatus-i.yaml000064400000001306150403631540015241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the least significant eight bits of the return code of <em>stat</em>. Only available if <tt>exited?</tt> is <tt>true</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { }           #=&gt; 26572\n   Process.wait       #=&gt; 26572\n   $?.exited?         #=&gt; true\n   $?.exitstatus      #=&gt; 0\n\n   fork { exit 99 }   #=&gt; 26573\n   Process.wait       #=&gt; 26573\n   $?.exited?         #=&gt; true\n   $?.exitstatus      #=&gt; 99\n"
full_name: Process::Status#exitstatus
is_singleton: false
name: exitstatus
params: |
  stat.exitstatus   => fixnum or nil

visibility: public
ri/1.8/system/Process/Status/cdesc-Status.yaml000064400000004240150403631540015140 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Process::Status</tt> encapsulates the information on the status of a running or terminated system process. The built-in variable <tt>$?</tt> is either <tt>nil</tt> or a <tt>Process::Status</tt> object.
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { exit 99 }   #=&gt; 26557\n   Process.wait       #=&gt; 26557\n   $?.class           #=&gt; Process::Status\n   $?.to_i            #=&gt; 25344\n   $? &gt;&gt; 8            #=&gt; 99\n   $?.stopped?        #=&gt; false\n   $?.exited?         #=&gt; true\n   $?.exitstatus      #=&gt; 99\n"
- !ruby/struct:SM::Flow::P 
  body: Posix systems record information on processes using a 16-bit integer. The lower bits record the process status (stopped, exited, signaled) and the upper bits possibly contain additional information (for example the program's return code in the case of exited processes). Pre Ruby 1.8, these bits were exposed directly to the Ruby program. Ruby now encapsulates these in a <tt>Process::Status</tt> object. To maximize compatibility, however, these objects retain a bit-oriented interface. In the descriptions that follow, when we talk about the integer value of <em>stat</em>, we're referring to this 16 bit value.
constants: []

full_name: Process::Status
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ">>"
- !ruby/object:RI::MethodSummary 
  name: coredump?
- !ruby/object:RI::MethodSummary 
  name: exited?
- !ruby/object:RI::MethodSummary 
  name: exitstatus
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: pid
- !ruby/object:RI::MethodSummary 
  name: signaled?
- !ruby/object:RI::MethodSummary 
  name: stopped?
- !ruby/object:RI::MethodSummary 
  name: stopsig
- !ruby/object:RI::MethodSummary 
  name: success?
- !ruby/object:RI::MethodSummary 
  name: termsig
- !ruby/object:RI::MethodSummary 
  name: to_i
- !ruby/object:RI::MethodSummary 
  name: to_int
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Status
superclass: Object
ri/1.8/system/Process/Status/inspect-i.yaml000064400000000420150403631550014466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Override the inspection method.
full_name: Process::Status#inspect
is_singleton: false
name: inspect
params: |
  stat.inspect   => string

visibility: public
ri/1.8/system/Process/Status/coredump%3f-i.yaml000064400000000555150403631550015146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> generated a coredump when it terminated. Not available on all platforms.
full_name: Process::Status#coredump?
is_singleton: false
name: coredump?
params: |
  stat.coredump?   => true or false

visibility: public
ri/1.8/system/Process/Status/%3e%3e-i.yaml000064400000000737150403631550013705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Shift the bits in <em>stat</em> right <em>num</em> places.
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { exit 99 }   #=&gt; 26563\n   Process.wait       #=&gt; 26563\n   $?.to_i            #=&gt; 25344\n   $? &gt;&gt; 8            #=&gt; 99\n"
full_name: Process::Status#>>
is_singleton: false
name: ">>"
params: |
  stat >> num   => fixnum

visibility: public
ri/1.8/system/Process/Status/to_int-i.yaml000064400000001053150403631560014321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the bits in <em>stat</em> as a <tt>Fixnum</tt>. Poking around in these bits is platform dependent.
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { exit 0xab }         #=&gt; 26566\n   Process.wait               #=&gt; 26566\n   sprintf('%04x', $?.to_i)   #=&gt; &quot;ab00&quot;\n"
full_name: Process::Status#to_int
is_singleton: false
name: to_int
params: |
  stat.to_i     => fixnum
  stat.to_int   => fixnum

visibility: public
ri/1.8/system/Process/Status/success%3f-i.yaml000064400000000613150403631560014774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is successful, <tt>false</tt> if not. Returns <tt>nil</tt> if <tt>exited?</tt> is not <tt>true</tt>.
full_name: Process::Status#success?
is_singleton: false
name: success?
params: |
  stat.success?   => true, false or nil

visibility: public
ri/1.8/system/Process/Status/to_s-i.yaml000064400000000427150403631570013776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <em>stat</em><tt>.to_i.to_s</tt>.
full_name: Process::Status#to_s
is_singleton: false
name: to_s
params: |
  stat.to_s   => string

visibility: public
ri/1.8/system/Process/Status/%3d%3d-i.yaml000064400000000501150403631600013664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the integer value of <em>stat</em> equals <em>other</em>.
full_name: Process::Status#==
is_singleton: false
name: ==
params: |
  stat == other   => true or false

visibility: public
ri/1.8/system/Process/Status/termsig-i.yaml000064400000000603150403631600014472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of the signal that caused <em>stat</em> to terminate (or <tt>nil</tt> if self was not terminated by an uncaught signal).
full_name: Process::Status#termsig
is_singleton: false
name: termsig
params: |
  stat.termsig   => fixnum or nil

visibility: public
ri/1.8/system/Process/Status/stopsig-i.yaml000064400000000544150403631600014514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of the signal that caused <em>stat</em> to stop (or <tt>nil</tt> if self is not stopped).
full_name: Process::Status#stopsig
is_singleton: false
name: stopsig
params: |
  stat.stopsig   => fixnum or nil

visibility: public
ri/1.8/system/Process/waitpid-c.yaml000064400000004270150403631610013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Waits for a child process to exit, returns its process id, and sets <tt>$?</tt> to a <tt>Process::Status</tt> object containing information on that process. Which child it waits on depends on the value of <em>pid</em>:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "> 0:"
    body: Waits for the child whose process ID equals <em>pid</em>.
  - !ruby/struct:SM::Flow::LI 
    label: "0:"
    body: Waits for any child whose process group ID equals that of the calling process.
  - !ruby/struct:SM::Flow::LI 
    label: "-1:"
    body: Waits for any child process (the default if no <em>pid</em> is given).
  - !ruby/struct:SM::Flow::LI 
    label: "< -1:"
    body: Waits for any child whose process group ID equals the absolute value of <em>pid</em>.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: The <em>flags</em> argument may be a logical or of the flag values <tt>Process::WNOHANG</tt> (do not block if no child available) or <tt>Process::WUNTRACED</tt> (return stopped children that haven't been reported). Not all flags are available on all platforms, but a flag value of zero will work on all platforms.
- !ruby/struct:SM::Flow::P 
  body: Calling this method raises a <tt>SystemError</tt> if there are no child processes. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   include Process\n   fork { exit 99 }                 #=&gt; 27429\n   wait                             #=&gt; 27429\n   $?.exitstatus                    #=&gt; 99\n\n   pid = fork { sleep 3 }           #=&gt; 27440\n   Time.now                         #=&gt; Wed Apr 09 08:57:09 CDT 2003\n   waitpid(pid, Process::WNOHANG)   #=&gt; nil\n   Time.now                         #=&gt; Wed Apr 09 08:57:09 CDT 2003\n   waitpid(pid, 0)                  #=&gt; 27440\n   Time.now                         #=&gt; Wed Apr 09 08:57:12 CDT 2003\n"
full_name: Process::waitpid
is_singleton: true
name: waitpid
params: |
  Process.wait()                     => fixnum
  Process.wait(pid=-1, flags=0)      => fixnum
  Process.waitpid(pid=-1, flags=0)   => fixnum

visibility: public
ri/1.8/system/Process/euid%3d-c.yaml000064400000000456150403631610012760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the effective user ID for this process. Not available on all platforms.
full_name: Process::euid=
is_singleton: true
name: euid=
params: |
  Process.euid= integer

visibility: public
ri/1.8/system/Process/ppid-c.yaml000064400000001141150403631610012462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the process id of the parent of this process. Always returns 0 on NT. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   puts &quot;I am #{Process.pid}&quot;\n   Process.fork { puts &quot;Dad is #{Process.ppid}&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   I am 27417\n   Dad is 27417\n"
full_name: Process::ppid
is_singleton: true
name: ppid
params: |
  Process.ppid   => fixnum

visibility: public
ri/1.8/system/Process/waitall-c.yaml000064400000001556150403631620013176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits for all children, returning an array of <em>pid</em>/<em>status</em> pairs (where <em>status</em> is a <tt>Process::Status</tt> object).
- !ruby/struct:SM::Flow::VERB 
  body: "   fork { sleep 0.2; exit 2 }   #=&gt; 27432\n   fork { sleep 0.1; exit 1 }   #=&gt; 27433\n   fork {            exit 0 }   #=&gt; 27434\n   p Process.waitall\n"
- !ruby/struct:SM::Flow::P 
  body: "<em>produces</em>:"
- !ruby/struct:SM::Flow::VERB 
  body: "   [[27434, #&lt;Process::Status: pid=27434,exited(0)&gt;],\n    [27433, #&lt;Process::Status: pid=27433,exited(1)&gt;],\n    [27432, #&lt;Process::Status: pid=27432,exited(2)&gt;]]\n"
full_name: Process::waitall
is_singleton: true
name: waitall
params: |
  Process.waitall   => [ [pid1,status1], ...]

visibility: public
ri/1.8/system/Process/waitpid2-c.yaml000064400000001412150403631620013253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits for a child process to exit (see Process::waitpid for exact semantics) and returns an array containing the process id and the exit status (a <tt>Process::Status</tt> object) of that child. Raises a <tt>SystemError</tt> if there are no child processes.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.fork { exit 99 }   #=&gt; 27437\n   pid, status = Process.wait2\n   pid                        #=&gt; 27437\n   status.exitstatus          #=&gt; 99\n"
full_name: Process::waitpid2
is_singleton: true
name: waitpid2
params: |
  Process.wait2(pid=-1, flags=0)      => [pid, status]
  Process.waitpid2(pid=-1, flags=0)   => [pid, status]

visibility: public
ri/1.8/system/Process/cdesc-Process.yaml000064400000007546150403631620014023 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: abort
- !ruby/object:RI::MethodSummary 
  name: detach
- !ruby/object:RI::MethodSummary 
  name: egid
- !ruby/object:RI::MethodSummary 
  name: egid=
- !ruby/object:RI::MethodSummary 
  name: euid
- !ruby/object:RI::MethodSummary 
  name: euid=
- !ruby/object:RI::MethodSummary 
  name: exec
- !ruby/object:RI::MethodSummary 
  name: exit
- !ruby/object:RI::MethodSummary 
  name: exit!
- !ruby/object:RI::MethodSummary 
  name: fork
- !ruby/object:RI::MethodSummary 
  name: getpgid
- !ruby/object:RI::MethodSummary 
  name: getpgrp
- !ruby/object:RI::MethodSummary 
  name: getpriority
- !ruby/object:RI::MethodSummary 
  name: getrlimit
- !ruby/object:RI::MethodSummary 
  name: gid
- !ruby/object:RI::MethodSummary 
  name: gid=
- !ruby/object:RI::MethodSummary 
  name: groups
- !ruby/object:RI::MethodSummary 
  name: groups=
- !ruby/object:RI::MethodSummary 
  name: initgroups
- !ruby/object:RI::MethodSummary 
  name: kill
- !ruby/object:RI::MethodSummary 
  name: maxgroups
- !ruby/object:RI::MethodSummary 
  name: maxgroups=
- !ruby/object:RI::MethodSummary 
  name: pid
- !ruby/object:RI::MethodSummary 
  name: ppid
- !ruby/object:RI::MethodSummary 
  name: setpgid
- !ruby/object:RI::MethodSummary 
  name: setpgrp
- !ruby/object:RI::MethodSummary 
  name: setpriority
- !ruby/object:RI::MethodSummary 
  name: setrlimit
- !ruby/object:RI::MethodSummary 
  name: setsid
- !ruby/object:RI::MethodSummary 
  name: times
- !ruby/object:RI::MethodSummary 
  name: uid
- !ruby/object:RI::MethodSummary 
  name: uid=
- !ruby/object:RI::MethodSummary 
  name: wait
- !ruby/object:RI::MethodSummary 
  name: wait2
- !ruby/object:RI::MethodSummary 
  name: waitall
- !ruby/object:RI::MethodSummary 
  name: waitpid
- !ruby/object:RI::MethodSummary 
  name: waitpid2
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Process</tt> module is a collection of methods used to manipulate processes.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: WNOHANG
  value: INT2FIX(WNOHANG)
- !ruby/object:RI::Constant 
  comment: 
  name: WNOHANG
  value: INT2FIX(0)
- !ruby/object:RI::Constant 
  comment: 
  name: WUNTRACED
  value: INT2FIX(WUNTRACED)
- !ruby/object:RI::Constant 
  comment: 
  name: WUNTRACED
  value: INT2FIX(0)
- !ruby/object:RI::Constant 
  comment: 
  name: PRIO_PROCESS
  value: INT2FIX(PRIO_PROCESS)
- !ruby/object:RI::Constant 
  comment: 
  name: PRIO_PGRP
  value: INT2FIX(PRIO_PGRP)
- !ruby/object:RI::Constant 
  comment: 
  name: PRIO_USER
  value: INT2FIX(PRIO_USER)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIM_INFINITY
  value: inf
- !ruby/object:RI::Constant 
  comment: 
  name: RLIM_SAVED_MAX
  value: v
- !ruby/object:RI::Constant 
  comment: 
  name: RLIM_SAVED_CUR
  value: v
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_CORE
  value: INT2FIX(RLIMIT_CORE)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_CPU
  value: INT2FIX(RLIMIT_CPU)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_DATA
  value: INT2FIX(RLIMIT_DATA)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_FSIZE
  value: INT2FIX(RLIMIT_FSIZE)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_NOFILE
  value: INT2FIX(RLIMIT_NOFILE)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_STACK
  value: INT2FIX(RLIMIT_STACK)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_AS
  value: INT2FIX(RLIMIT_AS)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_MEMLOCK
  value: INT2FIX(RLIMIT_MEMLOCK)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_NPROC
  value: INT2FIX(RLIMIT_NPROC)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_RSS
  value: INT2FIX(RLIMIT_RSS)
- !ruby/object:RI::Constant 
  comment: 
  name: RLIMIT_SBSIZE
  value: INT2FIX(RLIMIT_SBSIZE)
full_name: Process
includes: []

instance_methods: []

name: Process
superclass: 
ri/1.8/system/Process/fork-c.yaml000064400000002056150403631630012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a subprocess. If a block is specified, that block is run in the subprocess, and the subprocess terminates with a status of zero. Otherwise, the <tt>fork</tt> call returns twice, once in the parent, returning the process ID of the child, and once in the child, returning <em>nil</em>. The child process can exit using <tt>Kernel.exit!</tt> to avoid running any <tt>at_exit</tt> functions. The parent process should use <tt>Process.wait</tt> to collect the termination statuses of its children or use <tt>Process.detach</tt> to register disinterest in their status; otherwise, the operating system may accumulate zombie processes.
- !ruby/struct:SM::Flow::P 
  body: The thread calling fork is the only thread in the created child process. fork doesn't copy other threads.
full_name: Process::fork
is_singleton: true
name: fork
params: |
  Kernel.fork  [{ block }]   => fixnum or nil
  Process.fork [{ block }]   => fixnum or nil

visibility: public
ri/1.8/system/Process/GID/eid-c.yaml000064400000000711150403631640012677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the effective group ID for this process. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.egid   #=&gt; 500\n"
full_name: Process::GID::eid
is_singleton: true
name: eid
params: |
  Process.egid          => fixnum
  Process::GID.eid      => fixnum
  Process::Sys.geteid   => fixnum

visibility: public
ri/1.8/system/Process/GID/rid-c.yaml000064400000000645150403631640012722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the (real) group ID for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.gid   #=&gt; 500\n"
full_name: Process::GID::rid
is_singleton: true
name: rid
params: |
  Process.gid           => fixnum
  Process::GID.rid      => fixnum
  Process::Sys.getgid   => fixnum

visibility: public
ri/1.8/system/Process/GID/switch-c.yaml000064400000001072150403631640013440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Switch the effective and real group IDs of the current process. If a <em>block</em> is given, the group IDs will be switched back after the block is executed. Returns the new effective group ID if called without a block, and the return value of the block if one is given.
full_name: Process::GID::switch
is_singleton: true
name: switch
params: |
  Process::GID.switch              => fixnum
  Process::GID.switch {|| block}   => object

visibility: public
ri/1.8/system/Process/GID/grant_privilege-c.yaml000064400000001312150403631640015315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the effective group ID, and if possible, the saved group ID of the process to the given <em>integer</em>. Returns the new effective group ID. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   [Process.gid, Process.egid]          #=&gt; [0, 0]\n   Process::GID.grant_privilege(31)     #=&gt; 33\n   [Process.gid, Process.egid]          #=&gt; [0, 33]\n"
full_name: Process::GID::grant_privilege
is_singleton: true
name: grant_privilege
params: |
  Process::GID.grant_privilege(integer)    => fixnum
  Process::GID.eid = integer               => fixnum

visibility: public
ri/1.8/system/Process/GID/change_privilege-c.yaml000064400000001200150403631650015424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Change the current process's real and effective group ID to that specified by <em>integer</em>. Returns the new group ID. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   [Process.gid, Process.egid]          #=&gt; [0, 0]\n   Process::GID.change_privilege(33)    #=&gt; 33\n   [Process.gid, Process.egid]          #=&gt; [33, 33]\n"
full_name: Process::GID::change_privilege
is_singleton: true
name: change_privilege
params: |
  Process::GID.change_privilege(integer)   => fixnum

visibility: public
ri/1.8/system/Process/GID/re_exchange-c.yaml000064400000001045150403631650014410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Exchange real and effective group IDs and return the new effective group ID. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   [Process.gid, Process.egid]   #=&gt; [0, 33]\n   Process::GID.re_exchange      #=&gt; 0\n   [Process.gid, Process.egid]   #=&gt; [33, 0]\n"
full_name: Process::GID::re_exchange
is_singleton: true
name: re_exchange
params: |
  Process::GID.re_exchange   => fixnum

visibility: public
ri/1.8/system/Process/GID/cdesc-GID.yaml000064400000001475150403631660013412 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: change_privilege
- !ruby/object:RI::MethodSummary 
  name: eid
- !ruby/object:RI::MethodSummary 
  name: grant_privilege
- !ruby/object:RI::MethodSummary 
  name: re_exchange
- !ruby/object:RI::MethodSummary 
  name: re_exchangeable?
- !ruby/object:RI::MethodSummary 
  name: rid
- !ruby/object:RI::MethodSummary 
  name: sid_available?
- !ruby/object:RI::MethodSummary 
  name: switch
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Process::GID</tt> module contains a collection of module functions which can be used to portably get, set, and switch the current process's real, effective, and saved group IDs.
constants: []

full_name: Process::GID
includes: []

instance_methods: []

name: GID
superclass: 
ri/1.8/system/Process/GID/sid_available%3f-c.yaml000064400000000541150403631660015216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the current platform has saved group ID functionality.
full_name: Process::GID::sid_available?
is_singleton: true
name: sid_available?
params: |
  Process::GID.sid_available?   => true or false

visibility: public
ri/1.8/system/Process/GID/re_exchangeable%3f-c.yaml000064400000000610150403631670015531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the real and effective group IDs of a process may be exchanged on the current platform.
full_name: Process::GID::re_exchangeable?
is_singleton: true
name: re_exchangeable?
params: |
  Process::GID.re_exchangeable?   => true or false

visibility: public
ri/1.8/system/Process/uid-c.yaml000064400000000636150403631670012325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the (real) user ID of this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.uid   #=&gt; 501\n"
full_name: Process::uid
is_singleton: true
name: uid
params: |
  Process.uid           => fixnum
  Process::UID.rid      => fixnum
  Process::Sys.getuid   => fixnum

visibility: public
ri/1.8/system/Process/Sys/setruid-c.yaml000064400000000534150403631700013770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the real user ID of the calling process to <em>integer</em>. Not available on all platforms.
full_name: Process::Sys::setruid
is_singleton: true
name: setruid
params: |
  Process::Sys.setruid(integer)   => nil

visibility: public
ri/1.8/system/Process/Sys/geteuid-c.yaml000064400000000663150403631710013743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the effective user ID for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.euid   #=&gt; 501\n"
full_name: Process::Sys::geteuid
is_singleton: true
name: geteuid
params: |
  Process.euid           => fixnum
  Process::UID.eid       => fixnum
  Process::Sys.geteuid   => fixnum

visibility: public
ri/1.8/system/Process/Sys/setresuid-c.yaml000064400000000772150403631710014325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the (integer) real, effective, and saved user IDs of the current process to <em>rid</em>, <em>eid</em>, and <em>sid</em> respectively. A value of <tt>-1</tt> for any value means to leave that ID unchanged. Not available on all platforms.
full_name: Process::Sys::setresuid
is_singleton: true
name: setresuid
params: |
  Process::Sys.setresuid(rid, eid, sid)   => nil

visibility: public
ri/1.8/system/Process/Sys/setuid-c.yaml000064400000000524150403631720013607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the user ID of the current process to <em>integer</em>. Not available on all platforms.
full_name: Process::Sys::setuid
is_singleton: true
name: setuid
params: |
  Process::Sys.setuid(integer)   => nil

visibility: public
ri/1.8/system/Process/Sys/setgid-c.yaml000064400000000525150403631730013573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the group ID of the current process to <em>integer</em>. Not available on all platforms.
full_name: Process::Sys::setgid
is_singleton: true
name: setgid
params: |
  Process::Sys.setgid(integer)   => nil

visibility: public
ri/1.8/system/Process/Sys/seteuid-c.yaml000064400000000541150403631730013754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the effective user ID of the calling process to <em>integer</em>. Not available on all platforms.
full_name: Process::Sys::seteuid
is_singleton: true
name: seteuid
params: |
  Process::Sys.seteuid(integer)   => nil

visibility: public
ri/1.8/system/Process/Sys/getgid-c.yaml000064400000000653150403631740013562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the (real) group ID for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.gid   #=&gt; 500\n"
full_name: Process::Sys::getgid
is_singleton: true
name: getgid
params: |
  Process.gid           => fixnum
  Process::GID.rid      => fixnum
  Process::Sys.getgid   => fixnum

visibility: public
ri/1.8/system/Process/Sys/getuid-c.yaml000064400000000651150403631740013576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the (real) user ID of this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.uid   #=&gt; 501\n"
full_name: Process::Sys::getuid
is_singleton: true
name: getuid
params: |
  Process.uid           => fixnum
  Process::UID.rid      => fixnum
  Process::Sys.getuid   => fixnum

visibility: public
ri/1.8/system/Process/Sys/getegid-c.yaml000064400000000721150403631750013724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the effective group ID for this process. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.egid   #=&gt; 500\n"
full_name: Process::Sys::getegid
is_singleton: true
name: getegid
params: |
  Process.egid          => fixnum
  Process::GID.eid      => fixnum
  Process::Sys.geteid   => fixnum

visibility: public
ri/1.8/system/Process/Sys/setregid-c.yaml000064400000000735150403631760014130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the (integer) real and/or effective group IDs of the current process to <em>rid</em> and <em>eid</em>, respectively. A value of <tt>-1</tt> for either means to leave that ID unchanged. Not available on all platforms.
full_name: Process::Sys::setregid
is_singleton: true
name: setregid
params: |
  Process::Sys.setregid(rid, eid)   => nil

visibility: public
ri/1.8/system/Process/Sys/issetugid-c.yaml000064400000001040150403631760014310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the process was created as a result of an execve(2) system call which had either of the setuid or setgid bits set (and extra privileges were given as a result) or if it has changed any of its real, effective or saved user or group IDs since it began execution.
full_name: Process::Sys::issetugid
is_singleton: true
name: issetugid
params: |
  Process::Sys.issetugid   => true or false

visibility: public
ri/1.8/system/Process/Sys/setresgid-c.yaml000064400000000772150403631770014315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the (integer) real, effective, and saved user IDs of the current process to <em>rid</em>, <em>eid</em>, and <em>sid</em> respectively. A value of <tt>-1</tt> for any value means to leave that ID unchanged. Not available on all platforms.
full_name: Process::Sys::setresgid
is_singleton: true
name: setresgid
params: |
  Process::Sys.setresgid(rid, eid, sid)   => nil

visibility: public
ri/1.8/system/Process/Sys/cdesc-Sys.yaml000064400000002346150403631770013740 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: getegid
- !ruby/object:RI::MethodSummary 
  name: geteuid
- !ruby/object:RI::MethodSummary 
  name: getgid
- !ruby/object:RI::MethodSummary 
  name: getuid
- !ruby/object:RI::MethodSummary 
  name: issetugid
- !ruby/object:RI::MethodSummary 
  name: setegid
- !ruby/object:RI::MethodSummary 
  name: seteuid
- !ruby/object:RI::MethodSummary 
  name: setgid
- !ruby/object:RI::MethodSummary 
  name: setregid
- !ruby/object:RI::MethodSummary 
  name: setresgid
- !ruby/object:RI::MethodSummary 
  name: setresuid
- !ruby/object:RI::MethodSummary 
  name: setreuid
- !ruby/object:RI::MethodSummary 
  name: setrgid
- !ruby/object:RI::MethodSummary 
  name: setruid
- !ruby/object:RI::MethodSummary 
  name: setuid
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Process::Sys</tt> module contains UID and GID functions which provide direct bindings to the system calls of the same names instead of the more-portable versions of the same functionality found in the <tt>Process</tt>, <tt>Process::UID</tt>, and <tt>Process::GID</tt> modules.
constants: []

full_name: Process::Sys
includes: []

instance_methods: []

name: Sys
superclass: 
ri/1.8/system/Process/Sys/setrgid-c.yaml000064400000000535150403631770013762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the real group ID of the calling process to <em>integer</em>. Not available on all platforms.
full_name: Process::Sys::setrgid
is_singleton: true
name: setrgid
params: |
  Process::Sys.setrgid(integer)   => nil

visibility: public
ri/1.8/system/Process/Sys/setegid-c.yaml000064400000000542150403631770013743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the effective group ID of the calling process to <em>integer</em>. Not available on all platforms.
full_name: Process::Sys::setegid
is_singleton: true
name: setegid
params: |
  Process::Sys.setegid(integer)   => nil

visibility: public
ri/1.8/system/Process/Sys/setreuid-c.yaml000064400000000734150403632000014131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the (integer) real and/or effective user IDs of the current process to <em>rid</em> and <em>eid</em>, respectively. A value of <tt>-1</tt> for either means to leave that ID unchanged. Not available on all platforms.
full_name: Process::Sys::setreuid
is_singleton: true
name: setreuid
params: |
  Process::Sys.setreuid(rid, eid)   => nil

visibility: public
ri/1.8/system/Process/pid-c.yaml000064400000000560150403632000012300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the process id of this process. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.pid   #=&gt; 27415\n"
full_name: Process::pid
is_singleton: true
name: pid
params: |
  Process.pid   => fixnum

visibility: public
ri/1.8/system/Process/groups-c.yaml000064400000000641150403632000013043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get an <tt>Array</tt> of the gids of groups in the supplemental group access list for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.groups   #=&gt; [27, 6, 10, 11]\n"
full_name: Process::groups
is_singleton: true
name: groups
params: |
  Process.groups   => array

visibility: public
ri/1.8/system/Process/getrlimit-c.yaml000064400000001544150403632000013527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets the resource limit of the process. <em>cur_limit</em> means current (soft) limit and <em>max_limit</em> means maximum (hard) limit.
- !ruby/struct:SM::Flow::P 
  body: "<em>resource</em> indicates the kind of resource to limit: such as <tt>Process::RLIMIT_CORE</tt>, <tt>Process::RLIMIT_CPU</tt>, etc. See Process.setrlimit for details."
- !ruby/struct:SM::Flow::P 
  body: <em>cur_limit</em> and <em>max_limit</em> may be <tt>Process::RLIM_INFINITY</tt>, <tt>Process::RLIM_SAVED_MAX</tt> or <tt>Process::RLIM_SAVED_CUR</tt>. See Process.setrlimit and the system getrlimit(2) manual for details.
full_name: Process::getrlimit
is_singleton: true
name: getrlimit
params: |
  Process.getrlimit(resource)   => [cur_limit, max_limit]

visibility: public
ri/1.8/system/Process/UID/cdesc-UID.yaml000064400000001474150403632010013433 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: change_privilege
- !ruby/object:RI::MethodSummary 
  name: eid
- !ruby/object:RI::MethodSummary 
  name: grant_privilege
- !ruby/object:RI::MethodSummary 
  name: re_exchange
- !ruby/object:RI::MethodSummary 
  name: re_exchangeable?
- !ruby/object:RI::MethodSummary 
  name: rid
- !ruby/object:RI::MethodSummary 
  name: sid_available?
- !ruby/object:RI::MethodSummary 
  name: switch
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Process::UID</tt> module contains a collection of module functions which can be used to portably get, set, and switch the current process's real, effective, and saved user IDs.
constants: []

full_name: Process::UID
includes: []

instance_methods: []

name: UID
superclass: 
ri/1.8/system/Process/UID/eid-c.yaml000064400000000653150403632010012712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the effective user ID for this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.euid   #=&gt; 501\n"
full_name: Process::UID::eid
is_singleton: true
name: eid
params: |
  Process.euid           => fixnum
  Process::UID.eid       => fixnum
  Process::Sys.geteuid   => fixnum

visibility: public
ri/1.8/system/Process/UID/rid-c.yaml000064400000000643150403632010012726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the (real) user ID of this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   Process.uid   #=&gt; 501\n"
full_name: Process::UID::rid
is_singleton: true
name: rid
params: |
  Process.uid           => fixnum
  Process::UID.rid      => fixnum
  Process::Sys.getuid   => fixnum

visibility: public
ri/1.8/system/Process/UID/switch-c.yaml000064400000001067150403632020013453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Switch the effective and real user IDs of the current process. If a <em>block</em> is given, the user IDs will be switched back after the block is executed. Returns the new effective user ID if called without a block, and the return value of the block if one is given.
full_name: Process::UID::switch
is_singleton: true
name: switch
params: |
  Process::UID.switch              => fixnum
  Process::UID.switch {|| block}   => object

visibility: public
ri/1.8/system/Process/UID/grant_privilege-c.yaml000064400000001305150403632020015326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the effective user ID, and if possible, the saved user ID of the process to the given <em>integer</em>. Returns the new effective user ID. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   [Process.uid, Process.euid]          #=&gt; [0, 0]\n   Process::UID.grant_privilege(31)     #=&gt; 31\n   [Process.uid, Process.euid]          #=&gt; [0, 31]\n"
full_name: Process::UID::grant_privilege
is_singleton: true
name: grant_privilege
params: |
  Process::UID.grant_privilege(integer)   => fixnum
  Process::UID.eid= integer               => fixnum

visibility: public
ri/1.8/system/Process/UID/change_privilege-c.yaml000064400000001176150403632020015446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Change the current process's real and effective user ID to that specified by <em>integer</em>. Returns the new user ID. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   [Process.uid, Process.euid]          #=&gt; [0, 0]\n   Process::UID.change_privilege(31)    #=&gt; 31\n   [Process.uid, Process.euid]          #=&gt; [31, 31]\n"
full_name: Process::UID::change_privilege
is_singleton: true
name: change_privilege
params: |
  Process::UID.change_privilege(integer)   => fixnum

visibility: public
ri/1.8/system/Process/UID/re_exchange-c.yaml000064400000001043150403632020014414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Exchange real and effective user IDs and return the new effective user ID. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   [Process.uid, Process.euid]   #=&gt; [0, 31]\n   Process::UID.re_exchange      #=&gt; 0\n   [Process.uid, Process.euid]   #=&gt; [31, 0]\n"
full_name: Process::UID::re_exchange
is_singleton: true
name: re_exchange
params: |
  Process::UID.re_exchange   => fixnum

visibility: public
ri/1.8/system/Process/UID/sid_available%3f-c.yaml000064400000000540150403632030015223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the current platform has saved user ID functionality.
full_name: Process::UID::sid_available?
is_singleton: true
name: sid_available?
params: |
  Process::UID.sid_available?   => true or false

visibility: public
ri/1.8/system/Process/UID/re_exchangeable%3f-c.yaml000064400000000607150403632030015544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the real and effective user IDs of a process may be exchanged on the current platform.
full_name: Process::UID::re_exchangeable?
is_singleton: true
name: re_exchangeable?
params: |
  Process::UID.re_exchangeable?   => true or false

visibility: public
ri/1.8/system/CSV/StringReader/cdesc-StringReader.yaml000064400000000444150403632040016367 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: CSV::StringReader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: get_row
name: StringReader
superclass: Reader
ri/1.8/system/CSV/StringReader/get_row-i.yaml000064400000000267150403632040014616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StringReader#get_row
is_singleton: false
name: get_row
params: (row)
visibility: private
ri/1.8/system/CSV/StringReader/new-c.yaml000064400000000305150403632040013724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StringReader::new
is_singleton: true
name: new
params: (string, fs = ',', rs = nil)
visibility: public
ri/1.8/system/CSV/parse_body-c.yaml000064400000000274150403632050012677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::parse_body
is_singleton: true
name: parse_body
params: (src, idx, fs, rs)
visibility: private
ri/1.8/system/CSV/parse_row-c.yaml000064400000003006150403632050012545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse a line from string. Consider using CSV.parse_line instead. To parse lines in CSV string, see EXAMPLE below.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE
- !ruby/struct:SM::Flow::VERB 
  body: "  src = &quot;a,b\\r\\nc,d\\r\\ne,f&quot;\n  idx = 0\n  begin\n    parsed = []\n    parsed_cells, idx = CSV.parse_row(src, idx, parsed)\n    puts &quot;Parsed #{ parsed_cells } cells.&quot;\n    p parsed\n  end while parsed_cells &gt; 0\n"
- !ruby/struct:SM::Flow::P 
  body: ARGS
- !ruby/struct:SM::Flow::VERB 
  body: "  src: a CSV data to be parsed.  Must respond '[](idx)'.\n    src[](idx) must return a char. (Not a string such as 'a', but 97).\n    src[](idx_out_of_bounds) must return nil.  A String satisfies this\n    requirement.\n  idx: index of parsing location of 'src'.  0 origin.\n  out_dev: buffer for parsed cells.  Must respond '&lt;&lt;(aString)'.\n  col_sep: Column separator.  ?, by default.  If you want to separate\n    fields with semicolon, give ?; here.\n  row_sep: Row separator.  nil by default.  nil means &quot;\\r\\n or \\n&quot;.  If you\n    want to separate records with \\r, give ?\\r here.\n"
- !ruby/struct:SM::Flow::P 
  body: RETURNS
- !ruby/struct:SM::Flow::VERB 
  body: "  parsed_cells: num of parsed cells.\n  idx: index of next parsing location of 'src'.\n"
full_name: CSV::parse_row
is_singleton: true
name: parse_row
params: (src, idx, out_dev, fs = nil, rs = nil)
visibility: public
ri/1.8/system/CSV/open_writer-c.yaml000064400000000337150403632070013107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (writer)
comment: 
full_name: CSV::open_writer
is_singleton: true
name: open_writer
params: (path, mode, fs, rs, &block) {|writer| ...}
visibility: private
ri/1.8/system/CSV/Cell/data-i.yaml000064400000000245150403632070012346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Cell#data
is_singleton: false
name: data
params: ()
visibility: public
ri/1.8/system/CSV/Cell/cdesc-Cell.yaml000064400000000500150403632100013131 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: deprecated
constants: []

full_name: CSV::Cell
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: data
name: Cell
superclass: String
ri/1.8/system/CSV/Cell/new-c.yaml000064400000000275150403632100012215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Cell::new
is_singleton: true
name: new
params: (data = "", is_null = false)
visibility: public
ri/1.8/system/CSV/generate_line-c.yaml000064400000000450150403632100013341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a line from cells. each cell is stringified by to_s.
full_name: CSV::generate_line
is_singleton: true
name: generate_line
params: (row, fs = nil, rs = nil)
visibility: public
ri/1.8/system/CSV/foreach-c.yaml000064400000000273150403632100012152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::foreach
is_singleton: true
name: foreach
params: (path, rs = nil, &block)
visibility: public
ri/1.8/system/CSV/generate_separator-c.yaml000064400000000321150403632110014410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::generate_separator
is_singleton: true
name: generate_separator
params: (type, out_dev, fs, rs)
visibility: private
ri/1.8/system/CSV/IllegalFormatError/cdesc-IllegalFormatError.yaml000064400000000334150403632120020672 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: CSV::IllegalFormatError
includes: []

instance_methods: []

name: IllegalFormatError
superclass: RuntimeError
ri/1.8/system/CSV/parse-c.yaml000064400000000515150403632120011656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (row)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse lines from given string or stream. Return rows as an Array of Arrays.
full_name: CSV::parse
is_singleton: true
name: parse
params: (str_or_readable, fs = nil, rs = nil, &block) {|row| ...}
visibility: public
ri/1.8/system/CSV/cdesc-CSV.yaml000064400000002271150403632130012040 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: foreach
- !ruby/object:RI::MethodSummary 
  name: generate
- !ruby/object:RI::MethodSummary 
  name: generate_body
- !ruby/object:RI::MethodSummary 
  name: generate_line
- !ruby/object:RI::MethodSummary 
  name: generate_row
- !ruby/object:RI::MethodSummary 
  name: generate_separator
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: open_reader
- !ruby/object:RI::MethodSummary 
  name: open_writer
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: parse_body
- !ruby/object:RI::MethodSummary 
  name: parse_line
- !ruby/object:RI::MethodSummary 
  name: parse_row
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: readlines
comment: 
- !ruby/struct:SM::Flow::P 
  body: This program is copyrighted free software by NAKAMURA, Hiroshi. 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.
constants: []

full_name: CSV
includes: []

instance_methods: []

name: CSV
superclass: Object
ri/1.8/system/CSV/Row/cdesc-Row.yaml000064400000000346150403632130012724 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: deprecated
constants: []

full_name: CSV::Row
includes: []

instance_methods: []

name: Row
superclass: Array
ri/1.8/system/CSV/BasicWriter/terminate-i.yaml000064400000000267150403632140014766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::BasicWriter#terminate
is_singleton: false
name: terminate
params: ()
visibility: private
ri/1.8/system/CSV/BasicWriter/cdesc-BasicWriter.yaml000064400000000541150403632140016040 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: CSV::BasicWriter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close_on_terminate
- !ruby/object:RI::MethodSummary 
  name: terminate
name: BasicWriter
superclass: Writer
ri/1.8/system/CSV/BasicWriter/close_on_terminate-i.yaml000064400000000515150403632140016643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Tell this writer to close the IO when terminated (Triggered by invoking CSV::BasicWriter#close).
full_name: CSV::BasicWriter#close_on_terminate
is_singleton: false
name: close_on_terminate
params: ()
visibility: public
ri/1.8/system/CSV/BasicWriter/new-c.yaml000064400000000315150403632150013554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::BasicWriter::new
is_singleton: true
name: new
params: (str_or_writable, fs = ',', rs = nil)
visibility: public
ri/1.8/system/CSV/open_reader-c.yaml000064400000000331150403632150013026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (row)
comment: 
full_name: CSV::open_reader
is_singleton: true
name: open_reader
params: (path, mode, fs, rs, &block) {|row| ...}
visibility: private
ri/1.8/system/CSV/read-c.yaml000064400000000277150403632160011470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::read
is_singleton: true
name: read
params: (path, length = nil, offset = nil)
visibility: public
ri/1.8/system/CSV/readlines-c.yaml000064400000000267150403632160012522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::readlines
is_singleton: true
name: readlines
params: (path, rs = nil)
visibility: public
ri/1.8/system/CSV/IOBuf/terminate-i.yaml000064400000000261150403632160013510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::IOBuf#terminate
is_singleton: false
name: terminate
params: ()
visibility: private
ri/1.8/system/CSV/IOBuf/read-i.yaml000064400000000253150403632170012435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::IOBuf#read
is_singleton: false
name: read
params: (size)
visibility: private
ri/1.8/system/CSV/IOBuf/cdesc-IOBuf.yaml000064400000001305150403632170013316 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Buffered IO.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE
- !ruby/struct:SM::Flow::VERB 
  body: "  # File 'bigdata' could be a giga-byte size one!\n  buf = CSV::IOBuf.new(File.open('bigdata', 'rb'))\n  CSV::Reader.new(buf).each do |row|\n    p row\n    break if row[0].data == 'admin'\n  end\n"
constants: []

full_name: CSV::IOBuf
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: terminate
name: IOBuf
superclass: StreamBuf
ri/1.8/system/CSV/IOBuf/new-c.yaml000064400000000245150403632170012306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::IOBuf::new
is_singleton: true
name: new
params: (s)
visibility: public
ri/1.8/system/CSV/IOBuf/close-i.yaml000064400000000250150403632170012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::IOBuf#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/CSV/Writer/terminate-i.yaml000064400000000262150403632170014022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Writer#terminate
is_singleton: false
name: terminate
params: ()
visibility: private
ri/1.8/system/CSV/Writer/cdesc-Writer.yaml000064400000001611150403632170014136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create
- !ruby/object:RI::MethodSummary 
  name: generate
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: CSV formatted string/stream writer.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE
- !ruby/struct:SM::Flow::VERB 
  body: "  Write rows to 'csvout' file.\n\n  outfile = File.open('csvout', 'wb')\n  CSV::Writer.generate(outfile) do |csv|\n    csv &lt;&lt; ['c1', nil, '', '&quot;', &quot;\\r\\n&quot;, 'c2']\n    ...\n  end\n\n  outfile.close\n"
constants: []

full_name: CSV::Writer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: add_row
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: terminate
name: Writer
superclass: Object
ri/1.8/system/CSV/Writer/new-c.yaml000064400000000250150403632170012612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Writer::new
is_singleton: true
name: new
params: (dev)
visibility: public
ri/1.8/system/CSV/Writer/create-c.yaml000064400000000442150403632170013267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: str_or_writable must handle '&lt;&lt;(string)'.
full_name: CSV::Writer::create
is_singleton: true
name: create
params: (str_or_writable, fs = ',', rs = nil)
visibility: public
ri/1.8/system/CSV/Writer/%3c%3c-i.yaml000064400000000473150403632170012703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: add_row
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: dump CSV stream to the device. argument must be an Array of String.
full_name: CSV::Writer#<<
is_singleton: false
name: "<<"
params: (row)
visibility: public
ri/1.8/system/CSV/Writer/add_row-i.yaml000064400000000352150403632170013451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #&lt;&lt;"
full_name: CSV::Writer#add_row
is_singleton: false
name: add_row
params: (row)
visibility: public
ri/1.8/system/CSV/Writer/generate-c.yaml000064400000000565150403632170013624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (writer)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given block is called with the writer instance. str_or_writable must handle '&lt;&lt;(string)'.
full_name: CSV::Writer::generate
is_singleton: true
name: generate
params: (str_or_writable, fs = ',', rs = nil, &block) {|writer| ...}
visibility: public
ri/1.8/system/CSV/Writer/close-i.yaml000064400000000251150403632170013135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Writer#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/CSV/Reader/terminate-i.yaml000064400000000262150403632170013750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Reader#terminate
is_singleton: false
name: terminate
params: ()
visibility: private
ri/1.8/system/CSV/Reader/each-i.yaml000064400000000270150403632170012657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (row)
comment: 
full_name: CSV::Reader#each
is_singleton: false
name: each
params: () {|row| ...}
visibility: public
ri/1.8/system/CSV/Reader/parse-c.yaml000064400000000631150403632170013064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (row)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse CSV data and get lines. Given block is called for each parsed row. Block value is always nil. Rows are not cached for performance reason.
full_name: CSV::Reader::parse
is_singleton: true
name: parse
params: (str_or_readable, fs = ',', rs = nil, &block) {|row| ...}
visibility: public
ri/1.8/system/CSV/Reader/cdesc-Reader.yaml000064400000001717150403632170014021 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
comment: 
- !ruby/struct:SM::Flow::P 
  body: CSV formatted string/stream reader.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE
- !ruby/struct:SM::Flow::VERB 
  body: "  read CSV lines untill the first column is 'stop'.\n\n  CSV::Reader.parse(File.open('bigdata', 'rb')) do |row|\n    p row\n    break if !row[0].is_null &amp;&amp; row[0].data == 'stop'\n  end\n"
constants: []

full_name: CSV::Reader
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: get_row
- !ruby/object:RI::MethodSummary 
  name: shift
- !ruby/object:RI::MethodSummary 
  name: terminate
name: Reader
superclass: Object
ri/1.8/system/CSV/Reader/get_row-i.yaml000064400000000261150403632170013425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Reader#get_row
is_singleton: false
name: get_row
params: (row)
visibility: private
ri/1.8/system/CSV/Reader/new-c.yaml000064400000000250150403632170012540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Reader::new
is_singleton: true
name: new
params: (dev)
visibility: public
ri/1.8/system/CSV/Reader/create-c.yaml000064400000000413150403632170013213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns reader instance.
full_name: CSV::Reader::create
is_singleton: true
name: create
params: (str_or_readable, fs = ',', rs = nil)
visibility: public
ri/1.8/system/CSV/Reader/close-i.yaml000064400000000251150403632170013063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Reader#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/CSV/Reader/shift-i.yaml000064400000000251150403632170013073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::Reader#shift
is_singleton: false
name: shift
params: ()
visibility: public
ri/1.8/system/CSV/generate-c.yaml000064400000000307150403632170012342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::generate
is_singleton: true
name: generate
params: (path, fs = nil, rs = nil, &block)
visibility: public
ri/1.8/system/CSV/IOReader/terminate-i.yaml000064400000000264150403632170014202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::IOReader#terminate
is_singleton: false
name: terminate
params: ()
visibility: private
ri/1.8/system/CSV/IOReader/close_on_terminate-i.yaml000064400000000507150403632170016063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Tell this reader to close the IO when terminated (Triggered by invoking CSV::IOReader#close).
full_name: CSV::IOReader#close_on_terminate
is_singleton: false
name: close_on_terminate
params: ()
visibility: public
ri/1.8/system/CSV/IOReader/get_row-i.yaml000064400000000263150403632200013651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::IOReader#get_row
is_singleton: false
name: get_row
params: (row)
visibility: private
ri/1.8/system/CSV/IOReader/new-c.yaml000064400000000275150403632200012771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::IOReader::new
is_singleton: true
name: new
params: (io, fs = ',', rs = nil)
visibility: public
ri/1.8/system/CSV/IOReader/cdesc-IOReader.yaml000064400000000615150403632200014467 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: CSV::IOReader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close_on_terminate
- !ruby/object:RI::MethodSummary 
  name: get_row
- !ruby/object:RI::MethodSummary 
  name: terminate
name: IOReader
superclass: Reader
ri/1.8/system/CSV/StreamBuf/%5b%5d-i.yaml000064400000001121150403632200013304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: get
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "get a char or a partial string from the stream. idx: index of a string to specify a start point of a string to get. unlike String instance, idx &lt; 0 returns nil. n: size of a string to get. returns char at idx if n == nil. returns a partial string, from idx to (idx + n) if n != nil. at EOF, the string size could not equal to arg n."
full_name: CSV::StreamBuf#[]
is_singleton: false
name: "[]"
params: (idx, n = nil)
visibility: public
ri/1.8/system/CSV/StreamBuf/terminate-i.yaml000064400000000267150403632200014435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StreamBuf#terminate
is_singleton: false
name: terminate
params: ()
visibility: protected
ri/1.8/system/CSV/StreamBuf/is_eos%3f-i.yaml000064400000000260150403632200014215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StreamBuf#is_eos?
is_singleton: false
name: is_eos?
params: ()
visibility: public
ri/1.8/system/CSV/StreamBuf/cdesc-StreamBuf.yaml000064400000005013150403632200015160 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Buffered stream.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE 1 -- an IO.
- !ruby/struct:SM::Flow::VERB 
  body: "  class MyBuf &lt; StreamBuf\n    # Do initialize myself before a super class.  Super class might call my\n    # method 'read'. (Could be awful for C++ user. :-)\n    def initialize(s)\n      @s = s\n      super()\n    end\n\n    # define my own 'read' method.\n    # CAUTION: Returning nil means EnfOfStream.\n    def read(size)\n      @s.read(size)\n    end\n\n    # release buffers. in Ruby which has GC, you do not have to call this...\n    def terminate\n      @s = nil\n      super()\n    end\n  end\n\n  buf = MyBuf.new(STDIN)\n  my_str = ''\n  p buf[0, 0]               # =&gt; '' (null string)\n  p buf[0]                  # =&gt; 97 (char code of 'a')\n  p buf[0, 1]               # =&gt; 'a'\n  my_str = buf[0, 5]\n  p my_str                  # =&gt; 'abcde' (5 chars)\n  p buf[0, 6]               # =&gt; &quot;abcde\\n&quot; (6 chars)\n  p buf[0, 7]               # =&gt; &quot;abcde\\n&quot; (6 chars)\n  p buf.drop(3)             # =&gt; 3 (dropped chars)\n  p buf.get(0, 2)           # =&gt; 'de' (2 chars)\n  p buf.is_eos?             # =&gt; false (is not EOS here)\n  p buf.drop(5)             # =&gt; 3 (dropped chars)\n  p buf.is_eos?             # =&gt; true (is EOS here)\n  p buf[0]                  # =&gt; nil (is EOS here)\n"
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE 2 -- String.
- !ruby/struct:SM::Flow::VERB 
  body: "  This is a conceptual example.  No pros with this.\n\n  class StrBuf &lt; StreamBuf\n    def initialize(s)\n      @str = s\n      @idx = 0\n      super()\n    end\n\n    def read(size)\n      str = @str[@idx, size]\n      @idx += str.size\n      str\n    end\n  end\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BufSize
  value: 1024 * 8
full_name: CSV::StreamBuf
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: add_buf
- !ruby/object:RI::MethodSummary 
  name: buf_size
- !ruby/object:RI::MethodSummary 
  name: drop
- !ruby/object:RI::MethodSummary 
  name: get
- !ruby/object:RI::MethodSummary 
  name: idx_is_eos?
- !ruby/object:RI::MethodSummary 
  name: is_eos?
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: rel_buf
- !ruby/object:RI::MethodSummary 
  name: terminate
name: StreamBuf
superclass: Object
ri/1.8/system/CSV/StreamBuf/read-i.yaml000064400000000677150403632200013365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "protected method 'read' must be defined in derived classes. CAUTION: Returning a string which size is not equal to 'size' means EnfOfStream. When it is not at EOS, you must block the callee, try to read and return the sized string."
full_name: CSV::StreamBuf#read
is_singleton: false
name: read
params: (size)
visibility: protected
ri/1.8/system/CSV/StreamBuf/add_buf-i.yaml000064400000000261150403632200014023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StreamBuf#add_buf
is_singleton: false
name: add_buf
params: ()
visibility: private
ri/1.8/system/CSV/StreamBuf/drop-i.yaml000064400000000620150403632200013402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: drop a string from the stream. returns dropped size. at EOF, dropped size might not equals to arg n. Once you drop the head of the stream, access to the dropped part via [] or get returns nil.
full_name: CSV::StreamBuf#drop
is_singleton: false
name: drop
params: (n)
visibility: public
ri/1.8/system/CSV/StreamBuf/get-i.yaml000064400000000350150403632200013215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #[]"
full_name: CSV::StreamBuf#get
is_singleton: false
name: get
params: (idx, n = nil)
visibility: public
ri/1.8/system/CSV/StreamBuf/new-c.yaml000064400000000516150403632200013225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "WARN: Do not instantiate this class directly. Define your own class which derives this class and define 'read' instance method."
full_name: CSV::StreamBuf::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/CSV/StreamBuf/idx_is_eos%3f-i.yaml000064400000000274150403632200015066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StreamBuf#idx_is_eos?
is_singleton: false
name: idx_is_eos?
params: (idx)
visibility: private
ri/1.8/system/CSV/StreamBuf/rel_buf-i.yaml000064400000000261150403632200014055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StreamBuf#rel_buf
is_singleton: false
name: rel_buf
params: ()
visibility: private
ri/1.8/system/CSV/StreamBuf/buf_size-i.yaml000064400000000266150403632200014252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::StreamBuf#buf_size
is_singleton: false
name: buf_size
params: (idx)
visibility: private
ri/1.8/system/CSV/generate_body-c.yaml000064400000000307150403632210013352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: CSV::generate_body
is_singleton: true
name: generate_body
params: (cell, out_dev, fs, rs)
visibility: private
ri/1.8/system/CSV/generate_row-c.yaml000064400000002633150403632210013230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a line from cells data to string. Consider using CSV.generate_line instead. To generate multi-row CSV string, see EXAMPLE below.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE
- !ruby/struct:SM::Flow::VERB 
  body: "  row1 = ['a', 'b']\n  row2 = ['c', 'd']\n  row3 = ['e', 'f']\n  src = [row1, row2, row3]\n  buf = ''\n  src.each do |row|\n    parsed_cells = CSV.generate_row(row, 2, buf)\n    puts &quot;Created #{ parsed_cells } cells.&quot;\n  end\n  p buf\n"
- !ruby/struct:SM::Flow::P 
  body: ARGS
- !ruby/struct:SM::Flow::VERB 
  body: "  src: an Array of String to be converted to CSV string.  Must respond to\n    'size' and '[](idx)'.  src[idx] must return String.\n  cells: num of cells in a line.\n  out_dev: buffer for generated CSV string.  Must respond to '&lt;&lt;(string)'.\n  col_sep: Column separator.  ?, by default.  If you want to separate\n    fields with semicolon, give ?; here.\n  row_sep: Row separator.  nil by default.  nil means &quot;\\r\\n or \\n&quot;.  If you\n    want to separate records with \\r, give ?\\r here.\n"
- !ruby/struct:SM::Flow::P 
  body: RETURNS
- !ruby/struct:SM::Flow::VERB 
  body: "  parsed_cells: num of converted cells.\n"
full_name: CSV::generate_row
is_singleton: true
name: generate_row
params: (src, cells, out_dev, fs = nil, rs = nil)
visibility: public
ri/1.8/system/CSV/parse_line-c.yaml000064400000001072150403632210012664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse a line from given string. Bear in mind it parses ONE LINE. Rest of the string is ignored for example &quot;a,b\r\nc,d&quot; =&gt; ['a', 'b'] and the second line 'c,d' is ignored.
- !ruby/struct:SM::Flow::P 
  body: If you don't know whether a target string to parse is exactly 1 line or not, use CSV.parse_row instead of this method.
full_name: CSV::parse_line
is_singleton: true
name: parse_line
params: (src, fs = nil, rs = nil)
visibility: public
ri/1.8/system/CSV/open-c.yaml000064400000004442150403632210011510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Open a CSV formatted file for reading or writing.
- !ruby/struct:SM::Flow::P 
  body: For reading.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE 1
- !ruby/struct:SM::Flow::VERB 
  body: "  CSV.open('csvfile.csv', 'r') do |row|\n    p row\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE 2
- !ruby/struct:SM::Flow::VERB 
  body: "  reader = CSV.open('csvfile.csv', 'r')\n  row1 = reader.shift\n  row2 = reader.shift\n  if row2.empty?\n    p 'row2 not find.'\n  end\n  reader.close\n"
- !ruby/struct:SM::Flow::P 
  body: ARGS
- !ruby/struct:SM::Flow::VERB 
  body: "  filename: filename to parse.\n  col_sep: Column separator.  ?, by default.  If you want to separate\n    fields with semicolon, give ?; here.\n  row_sep: Row separator.  nil by default.  nil means &quot;\\r\\n or \\n&quot;.  If you\n    want to separate records with \\r, give ?\\r here.\n"
- !ruby/struct:SM::Flow::P 
  body: RETURNS
- !ruby/struct:SM::Flow::VERB 
  body: "  reader instance.  To get parse result, see CSV::Reader#each.\n"
- !ruby/struct:SM::Flow::P 
  body: For writing.
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE 1
- !ruby/struct:SM::Flow::VERB 
  body: "  CSV.open('csvfile.csv', 'w') do |writer|\n    writer &lt;&lt; ['r1c1', 'r1c2']\n    writer &lt;&lt; ['r2c1', 'r2c2']\n    writer &lt;&lt; [nil, nil]\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: EXAMPLE 2
- !ruby/struct:SM::Flow::VERB 
  body: "  writer = CSV.open('csvfile.csv', 'w')\n  writer &lt;&lt; ['r1c1', 'r1c2'] &lt;&lt; ['r2c1', 'r2c2'] &lt;&lt; [nil, nil]\n  writer.close\n"
- !ruby/struct:SM::Flow::P 
  body: ARGS
- !ruby/struct:SM::Flow::VERB 
  body: "  filename: filename to generate.\n  col_sep: Column separator.  ?, by default.  If you want to separate\n    fields with semicolon, give ?; here.\n  row_sep: Row separator.  nil by default.  nil means &quot;\\r\\n or \\n&quot;.  If you\n    want to separate records with \\r, give ?\\r here.\n"
- !ruby/struct:SM::Flow::P 
  body: RETURNS
- !ruby/struct:SM::Flow::VERB 
  body: "  writer instance.  See CSV::Writer#&lt;&lt; and CSV::Writer#add_row to know how\n  to generate CSV string.\n"
full_name: CSV::open
is_singleton: true
name: open
params: (path, mode, fs = nil, rs = nil, &block)
visibility: public
ri/1.8/system/Tracer/trace_func-c.yaml000064400000000263150403632210013442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer::trace_func
is_singleton: true
name: trace_func
params: (*vars)
visibility: public
ri/1.8/system/Tracer/on-i.yaml000064400000000253150403632210011752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: Tracer#on
is_singleton: false
name: "on"
params: () {|| ...}
visibility: public
ri/1.8/system/Tracer/get_line-i.yaml000064400000000264150403632210013126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer#get_line
is_singleton: false
name: get_line
params: (file, line)
visibility: public
ri/1.8/system/Tracer/set_get_line_procs-i.yaml000064400000000314150403632210015203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer#set_get_line_procs
is_singleton: false
name: set_get_line_procs
params: (file, p = proc)
visibility: public
ri/1.8/system/Tracer/add_filter-c.yaml000064400000000266150403632210013431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer::add_filter
is_singleton: true
name: add_filter
params: (p = proc)
visibility: public
ri/1.8/system/Tracer/get_thread_no-i.yaml000064400000000264150403632210014142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer#get_thread_no
is_singleton: false
name: get_thread_no
params: ()
visibility: public
ri/1.8/system/Tracer/trace_func-i.yaml000064400000000326150403632210013450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer#trace_func
is_singleton: false
name: trace_func
params: (event, file, line, id, binding, klass, *)
visibility: public
ri/1.8/system/Tracer/on-c.yaml000064400000000253150403632210011744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: Tracer::on
is_singleton: true
name: "on"
params: () {|| ...}
visibility: public
ri/1.8/system/Tracer/off-c.yaml000064400000000242150403632210012100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer::off
is_singleton: true
name: "off"
params: ()
visibility: public
ri/1.8/system/Tracer/add_filter-i.yaml000064400000000266150403632210013437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer#add_filter
is_singleton: false
name: add_filter
params: (p = proc)
visibility: public
ri/1.8/system/Tracer/new-c.yaml000064400000000240150403632210012115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Tracer/stdout-i.yaml000064400000000246150403632210012662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer#stdout
is_singleton: false
name: stdout
params: ()
visibility: public
ri/1.8/system/Tracer/set_get_line_procs-c.yaml000064400000000321150403632210015173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer::set_get_line_procs
is_singleton: true
name: set_get_line_procs
params: (file_name, p = proc)
visibility: public
ri/1.8/system/Tracer/cdesc-Tracer.yaml000064400000002573150403632220013417 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: stdout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: verbose
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_filter
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: "off"
- !ruby/object:RI::MethodSummary 
  name: "on"
- !ruby/object:RI::MethodSummary 
  name: set_get_line_procs
- !ruby/object:RI::MethodSummary 
  name: trace_func
comment: 
- !ruby/struct:SM::Flow::P 
  body: tracer main class
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: EVENT_SYMBOL
  value: "{     \"line\" => \"-\",     \"call\" => \">\",     \"return\" => \"<\",     \"class\" => \"C\",     \"end\" => \"E\",     \"c-call\" => \">\",     \"c-return\" => \"<\",   }"
- !ruby/object:RI::Constant 
  comment: 
  name: Single
  value: new
full_name: Tracer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_filter
- !ruby/object:RI::MethodSummary 
  name: get_line
- !ruby/object:RI::MethodSummary 
  name: get_thread_no
- !ruby/object:RI::MethodSummary 
  name: "off"
- !ruby/object:RI::MethodSummary 
  name: "on"
- !ruby/object:RI::MethodSummary 
  name: set_get_line_procs
- !ruby/object:RI::MethodSummary 
  name: stdout
- !ruby/object:RI::MethodSummary 
  name: trace_func
name: Tracer
superclass: Object
ri/1.8/system/Tracer/off-i.yaml000064400000000242150403632220012107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tracer#off
is_singleton: false
name: "off"
params: ()
visibility: public
ri/1.8/system/Options/title%3d-i.yaml000064400000000517150403632220013172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the title, but only if not already set. This means that a title set from the command line trumps one set in a source file
full_name: Options#title=
is_singleton: false
name: title=
params: (string)
visibility: public
ri/1.8/system/Options/check_diagram-i.yaml000064400000000560150403632220014314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Check that the right version of 'dot' is available. Unfortuately this doesn't work correctly under Windows NT, so we'll bypass the test under Windows
full_name: Options#check_diagram
is_singleton: false
name: check_diagram
params: ()
visibility: private
ri/1.8/system/Options/setup_generator-i.yaml000064400000000445150403632220014763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set up an output generator for the format in @generator_name
full_name: Options#setup_generator
is_singleton: false
name: setup_generator
params: (generators)
visibility: private
ri/1.8/system/Options/parse-i.yaml000064400000000503150403632220012662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse command line options. We're passed a hash containing output generators, keyed by the generator name
full_name: Options#parse
is_singleton: false
name: parse
params: (argv, generators)
visibility: public
ri/1.8/system/Options/error-i.yaml000064400000000251150403632220012701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Options#error
is_singleton: false
name: error
params: (str)
visibility: private
ri/1.8/system/Options/OptionList/usage-c.yaml000064400000000370150403632220014754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show usage and exit
full_name: Options::OptionList::usage
is_singleton: true
name: usage
params: (generator_names)
visibility: public
ri/1.8/system/Options/OptionList/error-c.yaml000064400000000357150403632220015006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show an error and exit
full_name: Options::OptionList::error
is_singleton: true
name: error
params: (msg)
visibility: public
ri/1.8/system/Options/OptionList/options-c.yaml000064400000000265150403632220015346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Options::OptionList::options
is_singleton: true
name: options
params: ()
visibility: public
ri/1.8/system/Options/OptionList/cdesc-OptionList.yaml000064400000014617150403632220016624 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: help_output
- !ruby/object:RI::MethodSummary 
  name: options
- !ruby/object:RI::MethodSummary 
  name: strip_output
- !ruby/object:RI::MethodSummary 
  name: usage
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: OPTION_LIST
  value: "[       [ \"--accessor\",      \"-A\",   \"accessorname[,..]\",         \"comma separated list of additional class methods\\n\" +         \"that should be treated like 'attr_reader' and\\n\" +         \"friends. Option may be repeated. Each accessorname\\n\" +         \"may have '=text' appended, in which case that text\\n\" +         \"appears where the r/w/rw appears for normal accessors.\"],                                                                           [ \"--all\",           \"-a\",   nil,         \"include all methods (not just public)\\nin the output\" ],        [ \"--charset\",       \"-c\",   \"charset\",         \"specifies HTML character-set\" ],        [ \"--debug\",         \"-D\",   nil,         \"displays lots on internal stuff\" ],        [ \"--diagram\",       \"-d\",   nil,         \"Generate diagrams showing modules and classes.\\n\" +         \"You need dot V1.8.6 or later to use the --diagram\\n\" +         \"option correctly. Dot is available from\\n\"+         \"http://www.research.att.com/sw/tools/graphviz/\" ],        [ \"--exclude\",       \"-x\",   \"pattern\",         \"do not process files or directories matching\\n\" +         \"pattern. Files given explicitly on the command\\n\" +         \"line will never be excluded.\" ],        [ \"--extension\",     \"-E\",   \"new=old\",         \"Treat files ending with .new as if they ended with\\n\" +         \".old. Using '-E cgi=rb' will cause xxx.cgi to be\\n\" +         \"parsed as a Ruby file\"],        [ \"--fileboxes\",     \"-F\",   nil,         \"classes are put in boxes which represents\\n\" +         \"files, where these classes reside. Classes\\n\" +         \"shared between more than one file are\\n\" +         \"shown with list of files that sharing them.\\n\" +         \"Silently discarded if --diagram is not given\\n\" +         \"Experimental.\" ],        [ \"--force-update\",  \"-U\",   nil,         \"forces to scan all sources even if newer than\\n\" +         \"the flag file.\" ],        [ \"--fmt\",           \"-f\",   \"format name\",         \"set the output formatter (see below)\" ],        [ \"--help\",          \"-h\",   nil,         \"you're looking at it\" ],        [ \"--help-output\",   \"-O\",   nil,         \"explain the various output options\" ],        [ \"--image-format\",  \"-I\",   \"gif/png/jpg/jpeg\",         \"Sets output image format for diagrams. Can\\n\" +         \"be png, gif, jpeg, jpg. If this option is\\n\" +         \"omitted, png is used. Requires --diagram.\" ],        [ \"--include\",       \"-i\",   \"dir[,dir...]\",         \"set (or add to) the list of directories\\n\" +         \"to be searched when satisfying :include:\\n\" +         \"requests. Can be used more than once.\" ],        [ \"--inline-source\", \"-S\",   nil,         \"Show method source code inline, rather\\n\" +         \"than via a popup link\" ],        [ \"--line-numbers\", \"-N\", nil,         \"Include line numbers in the source code\" ],        [ \"--main\",          \"-m\",   \"name\",         \"'name' will be the initial page displayed\" ],        [ \"--merge\",         \"-M\",   nil,         \"when creating ri output, merge processed classes\\n\" +         \"into previously documented classes of the name name\"],        [ \"--one-file\",      \"-1\",   nil,         \"put all the output into a single file\" ],        [ \"--op\",            \"-o\",   \"dir\",         \"set the output directory\" ],        [ \"--opname\",       \"-n\",    \"name\",         \"Set the 'name' of the output. Has no\\n\" +         \"effect for HTML.\" ],        [ \"--promiscuous\",   \"-p\",   nil,         \"When documenting a file that contains a module\\n\" +         \"or class also defined in other files, show\\n\" +         \"all stuff for that module/class in each files\\n\" +         \"page. By default, only show stuff defined in\\n\" +         \"that particular file.\" ],        [ \"--quiet\",         \"-q\",   nil,         \"don't show progress as we parse\" ],        [ \"--ri\",            \"-r\",   nil,        \"generate output for use by 'ri.' The files are\\n\" +        \"stored in the '.rdoc' directory under your home\\n\"+        \"directory unless overridden by a subsequent\\n\" +        \"--op parameter, so no special privileges are needed.\" ],        [ \"--ri-site\",       \"-R\",   nil,        \"generate output for use by 'ri.' The files are\\n\" +        \"stored in a site-wide directory, making them accessible\\n\"+        \"to others, so special privileges are needed.\" ],        [ \"--ri-system\",     \"-Y\",   nil,        \"generate output for use by 'ri.' The files are\\n\" +        \"stored in a system-level directory, making them accessible\\n\"+        \"to others, so special privileges are needed. This option\\n\"+        \"is intended to be used during Ruby installations\" ],        [ \"--show-hash\",     \"-H\",   nil,         \"A name of the form #name in a comment\\n\" +         \"is a possible hyperlink to an instance\\n\" +         \"method name. When displayed, the '#' is\\n\" +         \"removed unless this option is specified\" ],        [ \"--style\",         \"-s\",   \"stylesheet url\",         \"specifies the URL of a separate stylesheet.\" ],        [ \"--tab-width\",     \"-w\",   \"n\",         \"Set the width of tab characters (default 8)\"],        [ \"--template\",      \"-T\",   \"template name\",         \"Set the template used when generating output\" ],        [ \"--title\",         \"-t\",   \"text\",         \"Set 'txt' as the title for the output\" ],        [ \"--version\",       \"-v\",   nil,         \"display  RDoc's version\" ],        [ \"--webcvs\",        \"-W\",   \"url\",         \"Specify a URL for linking to a web frontend\\n\" +         \"to CVS. If the URL contains a '\\%s', the\\n\" +         \"name of the current file will be substituted;\\n\" +         \"if the URL doesn't contain a '\\%s', the\\n\" +         \"filename will be appended to it.\" ],     ]"
full_name: Options::OptionList
includes: []

instance_methods: []

name: OptionList
superclass: 
ri/1.8/system/Options/OptionList/help_output-c.yaml000064400000000275150403632220016224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Options::OptionList::help_output
is_singleton: true
name: help_output
params: ()
visibility: public
ri/1.8/system/Options/OptionList/strip_output-c.yaml000064400000000303150403632220016425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Options::OptionList::strip_output
is_singleton: true
name: strip_output
params: (text)
visibility: public
ri/1.8/system/Options/check_files-i.yaml000064400000000405150403632230014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Check that the files on the command line exist
full_name: Options#check_files
is_singleton: false
name: check_files
params: ()
visibility: private
ri/1.8/system/Options/cdesc-Options.yaml000064400000010700150403632230014035 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: should the output be placed into a single file
  name: all_one_file
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: character-set
  name: charset
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: URL of stylesheet
  name: css
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: should diagrams be drawn
  name: diagram
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: files matching this pattern will be excluded
  name: exclude
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: extra_accessor_flags
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: pattern for additional attr_... style methods
  name: extra_accessors
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: should we draw fileboxes in diagrams
  name: fileboxes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: and the list of files to be processed
  name: files
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: scan newer sources than the flag file if true.
  name: force_update
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: description of the output generator (set with the <tt>-fmt</tt> option
  name: generator
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: image format for diagrams
  name: image_format
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: include line numbers in the source listings
  name: include_line_numbers
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: should source code be included inline, or displayed in a popup
  name: inline_source
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: name of the file, class or module to display in the initial index page (if not specified the first file we encounter is used)
  name: main_page
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: merge into classes of the name name when generating ri
  name: merge
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the name of the output directory
  name: op_dir
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the name to use for the output
  name: op_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Are we promiscuous about showing module contents across multiple files
  name: promiscuous
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Don't display progress as we process the files
  name: quiet
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "array of directories to search for files to satisfy an :include:"
  name: rdoc_include
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: include private and protected methods in the output
  name: show_all
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: include the '#' at the front of hyperlinked instance method names
  name: show_hash
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the number of columns in a tab
  name: tab_width
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: template to be used when generating output
  name: template
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: URL of web cvs frontend
  name: webcvs
  rw: R
class_methods: []

comment: 
constants: []

full_name: Options
includes: 
- !ruby/object:RI::IncludedModule 
  name: Singleton
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_diagram
- !ruby/object:RI::MethodSummary 
  name: check_files
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: setup_generator
- !ruby/object:RI::MethodSummary 
  name: title
- !ruby/object:RI::MethodSummary 
  name: title=
name: Options
superclass: Object
ri/1.8/system/Options/title-i.yaml000064400000000245150403632230012675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Options#title
is_singleton: false
name: title
params: ()
visibility: public
ri/1.8/system/RegAnd/%3d%7e-i.yaml000064400000000241150403632240012132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RegAnd#=~
is_singleton: false
name: =~
params: (str)
visibility: public
ri/1.8/system/RegAnd/new-c.yaml000064400000000250150403632240012041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RegAnd::new
is_singleton: true
name: new
params: (re1, re2)
visibility: public
ri/1.8/system/RegAnd/cdesc-RegAnd.yaml000064400000000416150403632240013253 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RegAnd
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: =~
name: RegAnd
superclass: Object
ri/1.8/system/RSS/ITunesModelUtils/cdesc-ITunesModelUtils.yaml000064400000000677150403632250020056 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::ITunesModelUtils
includes: 
- !ruby/object:RI::IncludedModule 
  name: Utils
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_class_accessor
- !ruby/object:RI::MethodSummary 
  name: def_element_class_accessor
- !ruby/object:RI::MethodSummary 
  name: def_elements_class_accessor
name: ITunesModelUtils
superclass: 
ri/1.8/system/RSS/ITunesModelUtils/def_elements_class_accessor-i.yaml000064400000000456150403632250021510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesModelUtils#def_elements_class_accessor
is_singleton: false
name: def_elements_class_accessor
params: (klass, name, full_name, klass_name, plural_name, recommended_attribute_name=nil)
visibility: public
ri/1.8/system/RSS/ITunesModelUtils/def_class_accessor-i.yaml000064400000000345150403632250017611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesModelUtils#def_class_accessor
is_singleton: false
name: def_class_accessor
params: (klass, name, type, *args)
visibility: public
ri/1.8/system/RSS/ITunesModelUtils/def_element_class_accessor-i.yaml000064400000000437150403632260021325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesModelUtils#def_element_class_accessor
is_singleton: false
name: def_element_class_accessor
params: (klass, name, full_name, klass_name, recommended_attribute_name=nil)
visibility: public
ri/1.8/system/RSS/RootElementMixin/setup_maker-i.yaml000064400000000304150403632260016350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#setup_maker
is_singleton: false
name: setup_maker
params: (maker)
visibility: public
ri/1.8/system/RSS/RootElementMixin/to_xml-i.yaml000064400000000305150403632260015334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#to_xml
is_singleton: false
name: to_xml
params: (type=nil, &block)
visibility: public
ri/1.8/system/RSS/RootElementMixin/to_atom-i.yaml000064400000000303150403632260015472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#to_atom
is_singleton: false
name: to_atom
params: (type, &block)
visibility: public
ri/1.8/system/RSS/RootElementMixin/xmldecl-i.yaml000064400000000270150403632270015464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#xmldecl
is_singleton: false
name: xmldecl
params: ()
visibility: private
ri/1.8/system/RSS/RootElementMixin/ns_declarations-i.yaml000064400000000310150403632270017177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#ns_declarations
is_singleton: false
name: ns_declarations
params: ()
visibility: private
ri/1.8/system/RSS/RootElementMixin/new-c.yaml000064400000000346150403632270014623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin::new
is_singleton: true
name: new
params: (feed_version, version=nil, encoding=nil, standalone=nil)
visibility: public
ri/1.8/system/RSS/RootElementMixin/to_feed-i.yaml000064400000000303150403632270015436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#to_feed
is_singleton: false
name: to_feed
params: (type, &block)
visibility: public
ri/1.8/system/RSS/RootElementMixin/maker_target-i.yaml000064400000000310150403632270016474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/RootElementMixin/cdesc-RootElementMixin.yaml000064400000002613150403632270020132 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: encoding
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: feed_subtype
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: feed_type
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: feed_version
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: output_encoding
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: standalone
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: version
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::RootElementMixin
includes: 
- !ruby/object:RI::IncludedModule 
  name: XMLStyleSheetMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: feed_info
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: ns_declarations
- !ruby/object:RI::MethodSummary 
  name: output_encoding=
- !ruby/object:RI::MethodSummary 
  name: same_feed_type?
- !ruby/object:RI::MethodSummary 
  name: setup_maker
- !ruby/object:RI::MethodSummary 
  name: tag
- !ruby/object:RI::MethodSummary 
  name: to_atom
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: to_rss
- !ruby/object:RI::MethodSummary 
  name: to_xml
- !ruby/object:RI::MethodSummary 
  name: xmldecl
name: RootElementMixin
superclass: 
ri/1.8/system/RSS/RootElementMixin/to_rss-i.yaml000064400000000301150403632300015332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#to_rss
is_singleton: false
name: to_rss
params: (type, &block)
visibility: public
ri/1.8/system/RSS/RootElementMixin/output_encoding%3d-i.yaml000064400000000314150403632300017527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#output_encoding=
is_singleton: false
name: output_encoding=
params: (enc)
visibility: public
ri/1.8/system/RSS/RootElementMixin/same_feed_type%3f-i.yaml000064400000000314150403632300017274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#same_feed_type?
is_singleton: false
name: same_feed_type?
params: (type)
visibility: private
ri/1.8/system/RSS/RootElementMixin/feed_info-i.yaml000064400000000273150403632300015747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#feed_info
is_singleton: false
name: feed_info
params: ()
visibility: public
ri/1.8/system/RSS/RootElementMixin/tag-i.yaml000064400000000310150403632300014574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RootElementMixin#tag
is_singleton: false
name: tag
params: (indent, attrs={}, &block)
visibility: private
ri/1.8/system/RSS/TaxonomyTopicModel/cdesc-TaxonomyTopicModel.yaml000064400000000407150403632300021013 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::TaxonomyTopicModel
includes: []

instance_methods: []

name: TaxonomyTopicModel
superclass: 
ri/1.8/system/RSS/TaxonomyTopicModel/append_features-c.yaml000064400000000316150403632300017522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/TaxonomyTopicModel/TaxonomyTopic/cdesc-TaxonomyTopic.yaml000064400000001215150403632310022646 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::TaxonomyTopicModel::TaxonomyTopic
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicsModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: TaxonomyTopic
superclass: Element
ri/1.8/system/RSS/TaxonomyTopicModel/TaxonomyTopic/full_name-i.yaml000064400000000314150403632310021141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicModel::TaxonomyTopic#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/TaxonomyTopicModel/TaxonomyTopic/new-c.yaml000064400000000305150403632310017762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicModel::TaxonomyTopic::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/TaxonomyTopicModel/TaxonomyTopic/required_prefix-c.yaml000064400000000330150403632310022364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicModel::TaxonomyTopic::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/TaxonomyTopicModel/TaxonomyTopic/maker_target-i.yaml000064400000000330150403632310021642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicModel::TaxonomyTopic#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: public
ri/1.8/system/RSS/TaxonomyTopicModel/TaxonomyTopic/required_uri-c.yaml000064400000000322150403632310021667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicModel::TaxonomyTopic::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/cdesc-RSS.yaml000064400000005604150403632320012074 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DC_PREFIX
  value: "'dc'"
- !ruby/object:RI::Constant 
  comment: 
  name: DC_URI
  value: "\"http://purl.org/dc/elements/1.1/\""
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: For backward compatibility
  name: DublincoreModel
  value: DublinCoreModel
- !ruby/object:RI::Constant 
  comment: 
  name: TRACKBACK_PREFIX
  value: "'trackback'"
- !ruby/object:RI::Constant 
  comment: 
  name: TRACKBACK_URI
  value: "'http://madskills.com/public/xml/rss/module/trackback/'"
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION
  value: "\"0.2.4\""
- !ruby/object:RI::Constant 
  comment: 
  name: URI
  value: "\"http://purl.org/rss/1.0/\""
- !ruby/object:RI::Constant 
  comment: 
  name: DEBUG
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: For backward compatibility :X
  name: NotExceptedTagError
  value: NotExpectedTagError
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: for backward compatibility
  name: UnknownConvertMethod
  value: UnknownConversionMethodError
- !ruby/object:RI::Constant 
  comment: 
  name: ITUNES_PREFIX
  value: "'itunes'"
- !ruby/object:RI::Constant 
  comment: 
  name: ITUNES_URI
  value: "'http://www.itunes.com/dtds/podcast-1.0.dtd'"
- !ruby/object:RI::Constant 
  comment: 
  name: SY_PREFIX
  value: "'sy'"
- !ruby/object:RI::Constant 
  comment: 
  name: SY_URI
  value: "\"http://purl.org/rss/1.0/modules/syndication/\""
- !ruby/object:RI::Constant 
  comment: 
  name: IMAGE_PREFIX
  value: "'image'"
- !ruby/object:RI::Constant 
  comment: 
  name: IMAGE_URI
  value: "'http://purl.org/rss/1.0/modules/image/'"
- !ruby/object:RI::Constant 
  comment: 
  name: IMAGE_ELEMENTS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: CONTENT_PREFIX
  value: "'content'"
- !ruby/object:RI::Constant 
  comment: 
  name: CONTENT_URI
  value: "\"http://purl.org/rss/1.0/modules/content/\""
- !ruby/object:RI::Constant 
  comment: 
  name: AVAILABLE_PARSER_LIBRARIES
  value: "[       [\"rss/xmlparser\", :XMLParserParser],       [\"rss/xmlscanner\", :XMLScanParser],       [\"rss/rexmlparser\", :REXMLParser],     ]"
- !ruby/object:RI::Constant 
  comment: 
  name: AVAILABLE_PARSERS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: TAXO_PREFIX
  value: "\"taxo\""
- !ruby/object:RI::Constant 
  comment: 
  name: TAXO_URI
  value: "\"http://purl.org/rss/1.0/modules/taxonomy/\""
- !ruby/object:RI::Constant 
  comment: 
  name: TAXO_ELEMENTS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: SLASH_PREFIX
  value: "'slash'"
- !ruby/object:RI::Constant 
  comment: 
  name: SLASH_URI
  value: "\"http://purl.org/rss/1.0/modules/slash/\""
full_name: RSS
includes: []

instance_methods: []

name: RSS
superclass: 
ri/1.8/system/RSS/REXMLListener/xmldecl-i.yaml000064400000000321150403632320014610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLListener#xmldecl
is_singleton: false
name: xmldecl
params: (version, encoding, standalone)
visibility: public
ri/1.8/system/RSS/REXMLListener/cdesc-REXMLListener.yaml000064400000000673150403632330016421 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: raise_for_undefined_entity?
comment: 
constants: []

full_name: RSS::REXMLListener
includes: 
- !ruby/object:RI::IncludedModule 
  name: REXML::StreamListener
- !ruby/object:RI::IncludedModule 
  name: ListenerMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: xmldecl
name: REXMLListener
superclass: BaseListener
ri/1.8/system/RSS/REXMLListener/raise_for_undefined_entity%3f-c.yaml000064400000000334150403632330021043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLListener::raise_for_undefined_entity?
is_singleton: true
name: raise_for_undefined_entity?
params: ()
visibility: public
ri/1.8/system/RSS/TooMuchTagError/new-c.yaml000064400000000271150403632330014377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TooMuchTagError::new
is_singleton: true
name: new
params: (tag, parent)
visibility: public
ri/1.8/system/RSS/TooMuchTagError/cdesc-TooMuchTagError.yaml000064400000000600150403632340017466 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: tag
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::TooMuchTagError
includes: []

instance_methods: []

name: TooMuchTagError
superclass: InvalidRSSError
ri/1.8/system/RSS/SetupMaker/setup_maker_elements-i.yaml000064400000000322150403632340017061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SetupMaker#setup_maker_elements
is_singleton: false
name: setup_maker_elements
params: (parent)
visibility: private
ri/1.8/system/RSS/SetupMaker/setup_maker-i.yaml000064400000000276150403632350015176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SetupMaker#setup_maker
is_singleton: false
name: setup_maker
params: (maker)
visibility: public
ri/1.8/system/RSS/SetupMaker/cdesc-SetupMaker.yaml000064400000001071150403632350015562 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::SetupMaker
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: not_need_to_call_setup_maker_variables
- !ruby/object:RI::MethodSummary 
  name: setup_maker
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element
- !ruby/object:RI::MethodSummary 
  name: setup_maker_elements
name: SetupMaker
superclass: 
ri/1.8/system/RSS/SetupMaker/setup_maker_element-i.yaml000064400000000320150403632350016675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SetupMaker#setup_maker_element
is_singleton: false
name: setup_maker_element
params: (target)
visibility: private
ri/1.8/system/RSS/SetupMaker/not_need_to_call_setup_maker_variables-i.yaml000064400000000360150403632350022570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SetupMaker#not_need_to_call_setup_maker_variables
is_singleton: false
name: not_need_to_call_setup_maker_variables
params: ()
visibility: private
ri/1.8/system/RSS/SetupMaker/maker_target-i.yaml000064400000000301150403632360015312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SetupMaker#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/SetupMaker/setup_maker_attributes-i.yaml000064400000000326150403632360017441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SetupMaker#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (target)
visibility: private
ri/1.8/system/RSS/SyndicationModel/append_features-c.yaml000064400000000314150403632370017176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SyndicationModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/SyndicationModel/cdesc-SyndicationModel.yaml000064400000001014150403632370020133 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: SY_UPDATEPERIOD_AVAILABLE_VALUES
  value: "%w(hourly daily weekly monthly yearly)"
full_name: RSS::SyndicationModel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: validate_sy_updatePeriod
name: SyndicationModel
superclass: 
ri/1.8/system/RSS/SyndicationModel/validate_sy_updatePeriod-i.yaml000064400000000337150403632370021055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SyndicationModel#validate_sy_updatePeriod
is_singleton: false
name: validate_sy_updatePeriod
params: (value)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesImage/full_name-i.yaml000064400000000312150403632400020357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesImage#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesImage/new-c.yaml000064400000000303150403632400017200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesImage::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesImage/cdesc-ITunesImage.yaml000064400000001120150403632400021416 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::ITunesChannelModel::ITunesImage
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: ITunesImage
superclass: Element
ri/1.8/system/RSS/ITunesChannelModel/ITunesImage/required_prefix-c.yaml000064400000000326150403632410021612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesImage::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesImage/maker_target-i.yaml000064400000000327150403632410021071 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesImage#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesImage/setup_maker_attributes-i.yaml000064400000000352150403632410023207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesImage#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (image)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesImage/required_uri-c.yaml000064400000000320150403632420021107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesImage::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesOwner/full_name-i.yaml000064400000000312150403632420020431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesOwner#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesOwner/cdesc-ITunesOwner.yaml000064400000001115150403632430021545 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::ITunesChannelModel::ITunesOwner
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element
name: ITunesOwner
superclass: Element
ri/1.8/system/RSS/ITunesChannelModel/ITunesOwner/new-c.yaml000064400000000303150403632430017253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesOwner::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesOwner/required_prefix-c.yaml000064400000000326150403632440021665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesOwner::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesOwner/setup_maker_element-i.yaml000064400000000344150403632440022526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesOwner#setup_maker_element
is_singleton: false
name: setup_maker_element
params: (owner)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesOwner/maker_target-i.yaml000064400000000327150403632440021144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesOwner#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesOwner/required_uri-c.yaml000064400000000320150403632450021162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesOwner::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/append_features-c.yaml000064400000000316150403632450017413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/setup_maker_elements-i.yaml000064400000000354150403632460023377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesCategory#setup_maker_elements
is_singleton: false
name: setup_maker_elements
params: (category)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/cdesc-ITunesCategory.yaml000064400000001340150403632460022716 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ITunesCategory
  value: self
full_name: RSS::ITunesChannelModel::ITunesCategory
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
- !ruby/object:RI::MethodSummary 
  name: setup_maker_elements
name: ITunesCategory
superclass: Element
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/full_name-i.yaml000064400000000315150403632470021124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesCategory#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/new-c.yaml000064400000000306150403632470017745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesCategory::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/required_prefix-c.yaml000064400000000331150403632500022341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesCategory::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/maker_target-i.yaml000064400000000336150403632500021624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesCategory#maker_target
is_singleton: false
name: maker_target
params: (categories)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/setup_maker_attributes-i.yaml000064400000000360150403632500023741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesCategory#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (category)
visibility: private
ri/1.8/system/RSS/ITunesChannelModel/ITunesCategory/required_uri-c.yaml000064400000000323150403632500021644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesChannelModel::ITunesCategory::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/ITunesChannelModel/cdesc-ITunesChannelModel.yaml000064400000001336150403632510020566 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENT_INFOS
  value: "[                      [\"category\", :elements, \"categories\", \"text\"],                      [\"image\", :attribute, \"href\"],                      [\"owner\", :element],                      [\"new-feed-url\"],                     ] + ITunesBaseModel::ELEMENT_INFOS"
full_name: RSS::ITunesChannelModel
includes: 
- !ruby/object:RI::IncludedModule 
  name: ITunesBaseModel
instance_methods: []

name: ITunesChannelModel
superclass: 
ri/1.8/system/RSS/ImageItemModel/cdesc-ImageItemModel.yaml000064400000000467150403632510017074 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::ImageItemModel
includes: 
- !ruby/object:RI::IncludedModule 
  name: ImageModelUtils
instance_methods: []

name: ImageItemModel
superclass: 
ri/1.8/system/RSS/ImageItemModel/append_features-c.yaml000064400000000312150403632520016546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageItemModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/ImageItemModel/ImageItem/full_name-i.yaml000064400000000304150403632520017213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageItemModel::ImageItem#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/ImageItemModel/ImageItem/cdesc-ImageItem.yaml000064400000001203150403632520017742 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::ImageItemModel::ImageItem
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: ImageItem
superclass: Element
ri/1.8/system/RSS/ImageItemModel/ImageItem/new-c.yaml000064400000000275150403632530016044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageItemModel::ImageItem::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/ImageItemModel/ImageItem/required_prefix-c.yaml000064400000000320150403632530020437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageItemModel::ImageItem::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/ImageItemModel/ImageItem/maker_target-i.yaml000064400000000321150403632530017716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageItemModel::ImageItem#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/ImageItemModel/ImageItem/setup_maker_attributes-i.yaml000064400000000343150403632530022042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageItemModel::ImageItem#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (item)
visibility: private
ri/1.8/system/RSS/ImageItemModel/ImageItem/required_uri-c.yaml000064400000000312150403632540017743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageItemModel::ImageItem::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/ITunesItemModel/cdesc-ITunesItemModel.yaml000064400000000711150403632540017441 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENT_INFOS
  value: ITunesBaseModel::ELEMENT_INFOS +       [["duration", :element, "content"]]
full_name: RSS::ITunesItemModel
includes: 
- !ruby/object:RI::IncludedModule 
  name: ITunesBaseModel
instance_methods: []

name: ITunesItemModel
superclass: 
ri/1.8/system/RSS/ITunesItemModel/append_features-c.yaml000064400000000313150403632540016736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/hour%3d-i.yaml000064400000000306150403632550017770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#hour=
is_singleton: false
name: hour=
params: (hour)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/full_name-i.yaml000064400000000312150403632550020456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/cdesc-ITunesDuration.yaml000064400000002243150403632550022267 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: hour
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: minute
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: second
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: construct
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::ITunesItemModel::ITunesDuration
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: content=
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: hour=
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: minute=
- !ruby/object:RI::MethodSummary 
  name: second=
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element
- !ruby/object:RI::MethodSummary 
  name: update_content
- !ruby/object:RI::MethodSummary 
  name: value=
name: ITunesDuration
superclass: Element
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/minute%3d-i.yaml000064400000000314150403632560020314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#minute=
is_singleton: false
name: minute=
params: (minute)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/parse-c.yaml000064400000000334150403632560017625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration::parse
is_singleton: true
name: parse
params: (duration, do_validate=true)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/value%3d-i.yaml000064400000000403150403632560020126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #content="
full_name: RSS::ITunesItemModel::ITunesDuration#value=
is_singleton: false
name: value=
params: (value)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/content%3d-i.yaml000064400000000367150403632570020476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: value=
block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#content=
is_singleton: false
name: content=
params: (value)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/construct-c.yaml000064400000000336150403632570020542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration::construct
is_singleton: true
name: construct
params: (hour, minute, second)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/second%3d-i.yaml000064400000000314150403632570020267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#second=
is_singleton: false
name: second=
params: (second)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/update_content-i.yaml000064400000000325150403632570021536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#update_content
is_singleton: false
name: update_content
params: ()
visibility: private
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/new-c.yaml000064400000000303150403632600017273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/required_prefix-c.yaml000064400000000326150403632600021704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/setup_maker_element-i.yaml000064400000000347150403632600022550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#setup_maker_element
is_singleton: false
name: setup_maker_element
params: (duration)
visibility: private
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/maker_target-i.yaml000064400000000327150403632610021164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/ITunesItemModel/ITunesDuration/required_uri-c.yaml000064400000000320150403632610021201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ITunesItemModel::ITunesDuration::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/XMLStyleSheet/guess_type-i.yaml000064400000000303150403632610015426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheet#guess_type
is_singleton: false
name: guess_type
params: (filename)
visibility: private
ri/1.8/system/RSS/XMLStyleSheet/setup_maker-i.yaml000064400000000301150403632620015555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheet#setup_maker
is_singleton: false
name: setup_maker
params: (maker)
visibility: public
ri/1.8/system/RSS/XMLStyleSheet/href%3d-i.yaml000064400000000265150403632620014467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheet#href=
is_singleton: false
name: href=
params: (value)
visibility: public
ri/1.8/system/RSS/XMLStyleSheet/new-c.yaml000064400000000262150403632620014027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheet::new
is_singleton: true
name: new
params: (*attrs)
visibility: public
ri/1.8/system/RSS/XMLStyleSheet/to_s-i.yaml000064400000000256150403632620014213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheet#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/RSS/XMLStyleSheet/cdesc-XMLStyleSheet.yaml000064400000001543150403632630016553 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: do_validate
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ATTRIBUTES
  value: "%w(href type title media charset alternate)"
- !ruby/object:RI::Constant 
  comment: 
  name: GUESS_TABLE
  value: "{       \"xsl\" => \"text/xsl\",       \"css\" => \"text/css\",     }"
full_name: RSS::XMLStyleSheet
includes: 
- !ruby/object:RI::IncludedModule 
  name: Utils
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: alternate=
- !ruby/object:RI::MethodSummary 
  name: guess_type
- !ruby/object:RI::MethodSummary 
  name: href=
- !ruby/object:RI::MethodSummary 
  name: setup_maker
- !ruby/object:RI::MethodSummary 
  name: to_s
name: XMLStyleSheet
superclass: Object
ri/1.8/system/RSS/XMLStyleSheet/alternate%3d-i.yaml000064400000000277150403632630015526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheet#alternate=
is_singleton: false
name: alternate=
params: (value)
visibility: public
ri/1.8/system/RSS/MissingTagError/cdesc-MissingTagError.yaml000064400000000600150403632630017556 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: tag
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::MissingTagError
includes: []

instance_methods: []

name: MissingTagError
superclass: InvalidRSSError
ri/1.8/system/RSS/MissingTagError/new-c.yaml000064400000000271150403632640014436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::MissingTagError::new
is_singleton: true
name: new
params: (tag, parent)
visibility: public
ri/1.8/system/RSS/REXMLLikeXMLParser/listener%3d-i.yaml000064400000000305150403632640016145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLLikeXMLParser#listener=
is_singleton: false
name: listener=
params: (listener)
visibility: public
ri/1.8/system/RSS/REXMLLikeXMLParser/endElement-i.yaml000064400000000303150403632650016103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLLikeXMLParser#endElement
is_singleton: false
name: endElement
params: (name)
visibility: public
ri/1.8/system/RSS/REXMLLikeXMLParser/character-i.yaml000064400000000301150403632650015755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLLikeXMLParser#character
is_singleton: false
name: character
params: (data)
visibility: public
ri/1.8/system/RSS/REXMLLikeXMLParser/processingInstruction-i.yaml000064400000000344150403632650020446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLLikeXMLParser#processingInstruction
is_singleton: false
name: processingInstruction
params: (target, content)
visibility: public
ri/1.8/system/RSS/REXMLLikeXMLParser/xmlDecl-i.yaml000064400000000326150403632650015420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLLikeXMLParser#xmlDecl
is_singleton: false
name: xmlDecl
params: (version, encoding, standalone)
visibility: public
ri/1.8/system/RSS/REXMLLikeXMLParser/startElement-i.yaml000064400000000316150403632660016477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLLikeXMLParser#startElement
is_singleton: false
name: startElement
params: (name, attrs)
visibility: public
ri/1.8/system/RSS/REXMLLikeXMLParser/cdesc-REXMLLikeXMLParser.yaml000064400000001137150403632660020115 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::REXMLLikeXMLParser
includes: 
- !ruby/object:RI::IncludedModule 
  name: "::XML::Encoding_ja"
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: character
- !ruby/object:RI::MethodSummary 
  name: endElement
- !ruby/object:RI::MethodSummary 
  name: listener=
- !ruby/object:RI::MethodSummary 
  name: processingInstruction
- !ruby/object:RI::MethodSummary 
  name: startElement
- !ruby/object:RI::MethodSummary 
  name: xmlDecl
name: REXMLLikeXMLParser
superclass: "::XML::Parser"
ri/1.8/system/RSS/BaseDublinCoreModel/append_features-i.yaml000064400000000317150403632660017546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseDublinCoreModel#append_features
is_singleton: false
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/BaseDublinCoreModel/cdesc-BaseDublinCoreModel.yaml000064400000000411150403632670021030 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::BaseDublinCoreModel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
name: BaseDublinCoreModel
superclass: 
ri/1.8/system/RSS/BaseModel/convert_attr_reader-i.yaml000064400000000317150403632670016467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#convert_attr_reader
is_singleton: false
name: convert_attr_reader
params: (*attrs)
visibility: private
ri/1.8/system/RSS/BaseModel/csv_attr_reader-i.yaml000064400000000307150403632670015601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#csv_attr_reader
is_singleton: false
name: csv_attr_reader
params: (*attrs)
visibility: private
ri/1.8/system/RSS/BaseModel/date_writer-i.yaml000064400000000323150403632670014741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#date_writer
is_singleton: false
name: date_writer
params: (name, type, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/yes_other_writer-i.yaml000064400000000327150403632670016031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#yes_other_writer
is_singleton: false
name: yes_other_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/inherit_convert_attr_reader-i.yaml000064400000000337150403632670020213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#inherit_convert_attr_reader
is_singleton: false
name: inherit_convert_attr_reader
params: (*attrs)
visibility: private
ri/1.8/system/RSS/BaseModel/cdesc-BaseModel.yaml000064400000003211150403632670015113 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::BaseModel
includes: 
- !ruby/object:RI::IncludedModule 
  name: Utils
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: boolean_writer
- !ruby/object:RI::MethodSummary 
  name: content_writer
- !ruby/object:RI::MethodSummary 
  name: convert_attr_reader
- !ruby/object:RI::MethodSummary 
  name: csv_attr_reader
- !ruby/object:RI::MethodSummary 
  name: csv_integer_writer
- !ruby/object:RI::MethodSummary 
  name: csv_writer
- !ruby/object:RI::MethodSummary 
  name: date_writer
- !ruby/object:RI::MethodSummary 
  name: def_children_accessor
- !ruby/object:RI::MethodSummary 
  name: inherit_convert_attr_reader
- !ruby/object:RI::MethodSummary 
  name: install_date_element
- !ruby/object:RI::MethodSummary 
  name: install_element
- !ruby/object:RI::MethodSummary 
  name: install_have_attribute_element
- !ruby/object:RI::MethodSummary 
  name: install_have_child_element
- !ruby/object:RI::MethodSummary 
  name: install_have_children_element
- !ruby/object:RI::MethodSummary 
  name: install_text_element
- !ruby/object:RI::MethodSummary 
  name: integer_writer
- !ruby/object:RI::MethodSummary 
  name: positive_integer_writer
- !ruby/object:RI::MethodSummary 
  name: text_type_writer
- !ruby/object:RI::MethodSummary 
  name: uri_convert_attr_reader
- !ruby/object:RI::MethodSummary 
  name: yes_clean_other_attr_reader
- !ruby/object:RI::MethodSummary 
  name: yes_clean_other_writer
- !ruby/object:RI::MethodSummary 
  name: yes_other_attr_reader
- !ruby/object:RI::MethodSummary 
  name: yes_other_writer
name: BaseModel
superclass: 
ri/1.8/system/RSS/BaseModel/csv_integer_writer-i.yaml000064400000000333150403632700016327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#csv_integer_writer
is_singleton: false
name: csv_integer_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/def_children_accessor-i.yaml000064400000000347150403632700016720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#def_children_accessor
is_singleton: false
name: def_children_accessor
params: (accessor_name, plural_name)
visibility: private
ri/1.8/system/RSS/BaseModel/yes_clean_other_attr_reader-i.yaml000064400000000337150403632700020146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#yes_clean_other_attr_reader
is_singleton: false
name: yes_clean_other_attr_reader
params: (*attrs)
visibility: private
ri/1.8/system/RSS/BaseModel/install_date_element-i.yaml000064400000000402150403632700016574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#install_date_element
is_singleton: false
name: install_date_element
params: (tag_name, uri, occurs, name=nil, type=nil, disp_name=nil)
visibility: public
ri/1.8/system/RSS/BaseModel/install_text_element-i.yaml000064400000000402150403632700016643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#install_text_element
is_singleton: false
name: install_text_element
params: (tag_name, uri, occurs, name=nil, type=nil, disp_name=nil)
visibility: public
ri/1.8/system/RSS/BaseModel/install_have_attribute_element-i.yaml000064400000000523150403632710020672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #install_have_child_element"
full_name: RSS::BaseModel#install_have_attribute_element
is_singleton: false
name: install_have_attribute_element
params: (tag_name, uri, occurs, name=nil, type=nil)
visibility: public
ri/1.8/system/RSS/BaseModel/csv_writer-i.yaml000064400000000313150403632710014611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#csv_writer
is_singleton: false
name: csv_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/boolean_writer-i.yaml000064400000000323150403632710015436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#boolean_writer
is_singleton: false
name: boolean_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/text_type_writer-i.yaml000064400000000327150403632710016050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#text_type_writer
is_singleton: false
name: text_type_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/integer_writer-i.yaml000064400000000323150403632710015454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#integer_writer
is_singleton: false
name: integer_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/install_element-i.yaml000064400000000321150403632720015601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#install_element
is_singleton: false
name: install_element
params: (name, postfix="")
visibility: private
ri/1.8/system/RSS/BaseModel/content_writer-i.yaml000064400000000323150403632720015472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#content_writer
is_singleton: false
name: content_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/yes_other_attr_reader-i.yaml000064400000000323150403632720017001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#yes_other_attr_reader
is_singleton: false
name: yes_other_attr_reader
params: (*attrs)
visibility: private
ri/1.8/system/RSS/BaseModel/install_have_child_element-i.yaml000064400000000501150403632720017747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: install_have_attribute_element
block_params: 
comment: 
full_name: RSS::BaseModel#install_have_child_element
is_singleton: false
name: install_have_child_element
params: (tag_name, uri, occurs, name=nil, type=nil)
visibility: public
ri/1.8/system/RSS/BaseModel/uri_convert_attr_reader-i.yaml000064400000000327150403632720017343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#uri_convert_attr_reader
is_singleton: false
name: uri_convert_attr_reader
params: (*attrs)
visibility: private
ri/1.8/system/RSS/BaseModel/install_have_children_element-i.yaml000064400000000414150403632730020460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#install_have_children_element
is_singleton: false
name: install_have_children_element
params: (tag_name, uri, occurs, name=nil, plural_name=nil)
visibility: public
ri/1.8/system/RSS/BaseModel/yes_clean_other_writer-i.yaml000064400000000343150403632730017166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#yes_clean_other_writer
is_singleton: false
name: yes_clean_other_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseModel/positive_integer_writer-i.yaml000064400000000345150403632730017404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseModel#positive_integer_writer
is_singleton: false
name: positive_integer_writer
params: (name, disp_name=name)
visibility: private
ri/1.8/system/RSS/BaseParser/ignore_unknown_element-i.yaml000064400000000317150403632740017400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser#ignore_unknown_element
is_singleton: false
name: ignore_unknown_element
params: ()
visibility: public
ri/1.8/system/RSS/BaseParser/do_validate%3d-i.yaml000064400000000304150403632740015370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser#do_validate=
is_singleton: false
name: do_validate=
params: (new_value)
visibility: public
ri/1.8/system/RSS/BaseParser/parse-i.yaml000064400000000255150403632740013740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser#parse
is_singleton: false
name: parse
params: ()
visibility: public
ri/1.8/system/RSS/BaseParser/cdesc-BaseParser.yaml000064400000001202150403632740015477 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: raise_for_undefined_entity?
comment: 
constants: []

full_name: RSS::BaseParser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_validate
- !ruby/object:RI::MethodSummary 
  name: do_validate=
- !ruby/object:RI::MethodSummary 
  name: ignore_unknown_element
- !ruby/object:RI::MethodSummary 
  name: ignore_unknown_element=
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: rss
name: BaseParser
superclass: Object
ri/1.8/system/RSS/BaseParser/new-c.yaml000064400000000254150403632750013411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser::new
is_singleton: true
name: new
params: (rss)
visibility: public
ri/1.8/system/RSS/BaseParser/raise_for_undefined_entity%3f-c.yaml000064400000000331150403632750020500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser::raise_for_undefined_entity?
is_singleton: true
name: raise_for_undefined_entity?
params: ()
visibility: public
ri/1.8/system/RSS/BaseParser/do_validate-i.yaml000064400000000271150403632750015100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser#do_validate
is_singleton: false
name: do_validate
params: ()
visibility: public
ri/1.8/system/RSS/BaseParser/rss-i.yaml000064400000000251150403632750013432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser#rss
is_singleton: false
name: rss
params: ()
visibility: public
ri/1.8/system/RSS/BaseParser/ignore_unknown_element%3d-i.yaml000064400000000332150403632760017673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseParser#ignore_unknown_element=
is_singleton: false
name: ignore_unknown_element=
params: (new_value)
visibility: public
ri/1.8/system/RSS/DublinCoreModel/cdesc-DublinCoreModel.yaml000064400000001736150403632760017455 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TEXT_ELEMENTS
  value: "{       \"title\" => nil,       \"description\" => nil,       \"creator\" => nil,       \"subject\" => nil,       \"publisher\" => nil,       \"contributor\" => nil,       \"type\" => nil,       \"format\" => nil,       \"identifier\" => nil,       \"source\" => nil,       \"language\" => nil,       \"relation\" => nil,       \"coverage\" => nil,       \"rights\" => \"rights_list\""
- !ruby/object:RI::Constant 
  comment: 
  name: DATE_ELEMENTS
  value: "{       \"date\" => \"w3cdtf\",     }"
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENT_NAME_INFOS
  value: DublinCoreModel::TEXT_ELEMENTS.to_a
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: TEXT_ELEMENTS.keys + DATE_ELEMENTS.keys
full_name: RSS::DublinCoreModel
includes: []

instance_methods: []

name: DublinCoreModel
superclass: 
ri/1.8/system/RSS/Rss/setup_maker_elements-i.yaml000064400000000311150403632760015554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss#setup_maker_elements
is_singleton: false
name: setup_maker_elements
params: (maker)
visibility: public
ri/1.8/system/RSS/Rss/Channel/setup_maker_elements-i.yaml000064400000000325150403632760017131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel#setup_maker_elements
is_singleton: false
name: setup_maker_elements
params: (channel)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Source/new-c.yaml000064400000000276150403632760015644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Source::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/Item/Source/maker_target-i.yaml000064400000000320150403632770017515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Source#maker_target
is_singleton: false
name: maker_target
params: (item)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Source/cdesc-Source.yaml000064400000000641150403632770017147 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::Item::Source
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: Source
superclass: Element
ri/1.8/system/RSS/Rss/Channel/Item/Source/setup_maker_attributes-i.yaml000064400000000346150403632770021645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Source#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (source)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Category/cdesc-Category.yaml000064400000000645150403632770020005 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::Item::Category
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: Category
superclass: Element
ri/1.8/system/RSS/Rss/Channel/Item/Category/new-c.yaml000064400000000300150403632770016146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Category::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/Item/Category/maker_target-i.yaml000064400000000322150403633000020017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Category#maker_target
is_singleton: false
name: maker_target
params: (item)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Category/setup_maker_attributes-i.yaml000064400000000352150403633000022142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Category#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (category)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/_setup_maker_element-i.yaml000064400000000435150403633000017771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #setup_maker_element"
full_name: RSS::Rss::Channel::Item#_setup_maker_element
is_singleton: false
name: _setup_maker_element
params: (item)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/setup_maker_element-i.yaml000064400000000326150403633000017631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item#setup_maker_element
is_singleton: false
name: setup_maker_element
params: (item)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/maker_target-i.yaml000064400000000311150403633010016241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item#maker_target
is_singleton: false
name: maker_target
params: (items)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Enclosure/cdesc-Enclosure.yaml000064400000000647150403633010020337 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::Item::Enclosure
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: Enclosure
superclass: Element
ri/1.8/system/RSS/Rss/Channel/Item/Enclosure/new-c.yaml000064400000000301150403633010016315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Enclosure::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/Item/Enclosure/maker_target-i.yaml000064400000000323150403633010020203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Enclosure#maker_target
is_singleton: false
name: maker_target
params: (item)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Enclosure/setup_maker_attributes-i.yaml000064400000000354150403633010022327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Enclosure#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (enclosure)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Guid/PermaLink%3f-i.yaml000064400000000305150403633020016650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Guid#PermaLink?
is_singleton: false
name: PermaLink?
params: ()
visibility: public
ri/1.8/system/RSS/Rss/Channel/Item/Guid/new-c.yaml000064400000000274150403633020015260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Guid::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/Item/Guid/cdesc-Guid.yaml000064400000000722150403633020016214 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::Item::Guid
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: PermaLink?
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: Guid
superclass: Element
ri/1.8/system/RSS/Rss/Channel/Item/Guid/maker_target-i.yaml000064400000000316150403633030017140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Guid#maker_target
is_singleton: false
name: maker_target
params: (item)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/Guid/setup_maker_attributes-i.yaml000064400000000342150403633030021257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Item::Guid#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (guid)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Item/cdesc-Item.yaml000064400000001320150403633030015326 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Rss::Channel::Item
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
- !ruby/object:RI::IncludedModule 
  name: ContentModel
- !ruby/object:RI::IncludedModule 
  name: TrackBackModel20
- !ruby/object:RI::IncludedModule 
  name: ITunesItemModel
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _setup_maker_element
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element
name: Item
superclass: Element
ri/1.8/system/RSS/Rss/Channel/TextInput/new-c.yaml000064400000000273150403633030015436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::TextInput::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/TextInput/cdesc-TextInput.yaml000064400000000540150403633040017446 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::TextInput
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: TextInput
superclass: Element
ri/1.8/system/RSS/Rss/Channel/TextInput/maker_target-i.yaml000064400000000316150403633040017317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::TextInput#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/Rss/Channel/Image/cdesc-Image.yaml000064400000000530150403633050015602 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::Image
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: Image
superclass: Element
ri/1.8/system/RSS/Rss/Channel/Image/new-c.yaml000064400000000267150403633050014521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Image::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/Image/maker_target-i.yaml000064400000000312150403633050016372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Image#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/Rss/Channel/SkipHours/cdesc-SkipHours.yaml000064400000000401150403633050017411 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Rss::Channel::SkipHours
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: []

name: SkipHours
superclass: Element
ri/1.8/system/RSS/Rss/Channel/SkipHours/Hour/new-c.yaml000064400000000301150403633050016330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::SkipHours::Hour::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/SkipHours/Hour/cdesc-Hour.yaml000064400000000455150403633050017325 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::SkipHours::Hour
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: []

name: Hour
superclass: Element
ri/1.8/system/RSS/Rss/Channel/cdesc-Channel.yaml000064400000001200150403633050015101 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Category
  value: Item::Category
full_name: RSS::Rss::Channel
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
- !ruby/object:RI::IncludedModule 
  name: ITunesChannelModel
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: not_need_to_call_setup_maker_variables
- !ruby/object:RI::MethodSummary 
  name: setup_maker_elements
name: Channel
superclass: Element
ri/1.8/system/RSS/Rss/Channel/Cloud/new-c.yaml000064400000000267150403633050014545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::Cloud::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/Cloud/cdesc-Cloud.yaml000064400000000444150403633050015656 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::Cloud
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: []

name: Cloud
superclass: Element
ri/1.8/system/RSS/Rss/Channel/not_need_to_call_setup_maker_variables-i.yaml000064400000000362150403633050022627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel#not_need_to_call_setup_maker_variables
is_singleton: false
name: not_need_to_call_setup_maker_variables
params: ()
visibility: private
ri/1.8/system/RSS/Rss/Channel/maker_target-i.yaml000064400000000303150403633050015350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/Rss/Channel/SkipDays/Day/cdesc-Day.yaml000064400000000452150403633050016522 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss::Channel::SkipDays::Day
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: []

name: Day
superclass: Element
ri/1.8/system/RSS/Rss/Channel/SkipDays/Day/new-c.yaml000064400000000277150403633050015744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::Channel::SkipDays::Day::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/Rss/Channel/SkipDays/cdesc-SkipDays.yaml000064400000000377150403633050017025 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Rss::Channel::SkipDays
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: []

name: SkipDays
superclass: Element
ri/1.8/system/RSS/Rss/cdesc-Rss.yaml000064400000001223150403633050012735 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: feed_version
  rw: W
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Rss
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
- !ruby/object:RI::IncludedModule 
  name: RootElementMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _attrs
- !ruby/object:RI::MethodSummary 
  name: image
- !ruby/object:RI::MethodSummary 
  name: items
- !ruby/object:RI::MethodSummary 
  name: setup_maker_elements
- !ruby/object:RI::MethodSummary 
  name: textinput
name: Rss
superclass: Element
ri/1.8/system/RSS/Rss/new-c.yaml000064400000000331150403633050012117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss::new
is_singleton: true
name: new
params: (feed_version, version=nil, encoding=nil, standalone=nil)
visibility: public
ri/1.8/system/RSS/Rss/items-i.yaml000064400000000246150403633050012462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss#items
is_singleton: false
name: items
params: ()
visibility: public
ri/1.8/system/RSS/Rss/image-i.yaml000064400000000246150403633050012423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss#image
is_singleton: false
name: image
params: ()
visibility: public
ri/1.8/system/RSS/Rss/_attrs-i.yaml000064400000000251150403633050012631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss#_attrs
is_singleton: false
name: _attrs
params: ()
visibility: private
ri/1.8/system/RSS/Rss/textinput-i.yaml000064400000000256150403633050013406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Rss#textinput
is_singleton: false
name: textinput
params: ()
visibility: public
ri/1.8/system/RSS/NotValidXMLParser/cdesc-NotValidXMLParser.yaml000064400000000376150403633050020163 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::NotValidXMLParser
includes: []

instance_methods: []

name: NotValidXMLParser
superclass: Error
ri/1.8/system/RSS/NotValidXMLParser/new-c.yaml000064400000000266150403633050014635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::NotValidXMLParser::new
is_singleton: true
name: new
params: (parser)
visibility: public
ri/1.8/system/RSS/Error/cdesc-Error.yaml000064400000000303150403633060013600 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/RSS/XMLParserNotFound/cdesc-XMLParserNotFound.yaml000064400000000376150403633060020214 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::XMLParserNotFound
includes: []

instance_methods: []

name: XMLParserNotFound
superclass: Error
ri/1.8/system/RSS/XMLParserNotFound/new-c.yaml000064400000000260150403633060014644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLParserNotFound::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/RSS/XMLParserParser/listener-c.yaml000064400000000270150403633060015401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLParserParser::listener
is_singleton: true
name: listener
params: ()
visibility: public
ri/1.8/system/RSS/XMLParserParser/cdesc-XMLParserParser.yaml000064400000000462150403633060017410 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: listener
comment: 
constants: []

full_name: RSS::XMLParserParser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _parse
name: XMLParserParser
superclass: BaseParser
ri/1.8/system/RSS/XMLParserParser/_parse-i.yaml000064400000000265150403633060015037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLParserParser#_parse
is_singleton: false
name: _parse
params: ()
visibility: private
ri/1.8/system/RSS/Utils/new_with_value_if_need-i.yaml000064400000000607150403633060016365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <tt>value</tt> is an instance of class <tt>klass</tt>, return it, else create a new instance of <tt>klass</tt> with value <tt>value</tt>.
full_name: RSS::Utils#new_with_value_if_need
is_singleton: false
name: new_with_value_if_need
params: (klass, value)
visibility: public
ri/1.8/system/RSS/Utils/cdesc-Utils.yaml000064400000001036150403633060013622 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Utils
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: element_initialize_arguments?
- !ruby/object:RI::MethodSummary 
  name: get_file_and_line_from_caller
- !ruby/object:RI::MethodSummary 
  name: h
- !ruby/object:RI::MethodSummary 
  name: html_escape
- !ruby/object:RI::MethodSummary 
  name: new_with_value_if_need
- !ruby/object:RI::MethodSummary 
  name: to_class_name
name: Utils
superclass: 
ri/1.8/system/RSS/Utils/get_file_and_line_from_caller-i.yaml000064400000000333150403633060017644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Utils#get_file_and_line_from_caller
is_singleton: false
name: get_file_and_line_from_caller
params: (i=0)
visibility: public
ri/1.8/system/RSS/Utils/YesCleanOther/cdesc-YesCleanOther.yaml000064400000000372150403633060017736 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Utils::YesCleanOther
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: YesCleanOther
superclass: 
ri/1.8/system/RSS/Utils/YesCleanOther/parse-i.yaml000064400000000274150403633070015514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Utils::YesCleanOther#parse
is_singleton: false
name: parse
params: (value)
visibility: public
ri/1.8/system/RSS/Utils/CSV/parse-i.yaml000064400000000272150403633070013440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Utils::CSV#parse
is_singleton: false
name: parse
params: (value, &block)
visibility: public
ri/1.8/system/RSS/Utils/CSV/cdesc-CSV.yaml000064400000000346150403633070013614 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Utils::CSV
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: CSV
superclass: 
ri/1.8/system/RSS/Utils/to_class_name-i.yaml000064400000000416150403633070014502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a name_with_underscores to CamelCase.
full_name: RSS::Utils#to_class_name
is_singleton: false
name: to_class_name
params: (name)
visibility: public
ri/1.8/system/RSS/Utils/InheritedReader/inherited_array_reader-i.yaml000064400000000350150403633070021421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Utils::InheritedReader#inherited_array_reader
is_singleton: false
name: inherited_array_reader
params: (constant_name)
visibility: public
ri/1.8/system/RSS/Utils/InheritedReader/inherited_hash_reader-i.yaml000064400000000346150403633070021233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Utils::InheritedReader#inherited_hash_reader
is_singleton: false
name: inherited_hash_reader
params: (constant_name)
visibility: public
ri/1.8/system/RSS/Utils/InheritedReader/inherited_reader-i.yaml000064400000000463150403633070020230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (result, klass.const_get(constant_name))
comment: 
full_name: RSS::Utils::InheritedReader#inherited_reader
is_singleton: false
name: inherited_reader
params: (constant_name) {|result, klass.const_get(constant_name)| ...}
visibility: public
ri/1.8/system/RSS/Utils/InheritedReader/cdesc-InheritedReader.yaml000064400000000612150403633070020616 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Utils::InheritedReader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: inherited_array_reader
- !ruby/object:RI::MethodSummary 
  name: inherited_hash_reader
- !ruby/object:RI::MethodSummary 
  name: inherited_reader
name: InheritedReader
superclass: 
ri/1.8/system/RSS/Utils/h-i.yaml000064400000000336150403633070012123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #html_escape"
full_name: RSS::Utils#h
is_singleton: false
name: h
params: (s)
visibility: public
ri/1.8/system/RSS/Utils/html_escape-i.yaml000064400000000473150403633070014162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: h
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: escape '&amp;', '&quot;', '&lt;' and '&gt;' for use in HTML.
full_name: RSS::Utils#html_escape
is_singleton: false
name: html_escape
params: (s)
visibility: public
ri/1.8/system/RSS/Utils/element_initialize_arguments%3f-i.yaml000064400000000334150403633070020127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Utils#element_initialize_arguments?
is_singleton: false
name: element_initialize_arguments?
params: (args)
visibility: public
ri/1.8/system/RSS/Utils/YesOther/parse-i.yaml000064400000000267150403633070014553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Utils::YesOther#parse
is_singleton: false
name: parse
params: (value)
visibility: public
ri/1.8/system/RSS/Utils/YesOther/cdesc-YesOther.yaml000064400000000360150403633070016026 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Utils::YesOther
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: YesOther
superclass: 
ri/1.8/system/RSS/OverlappedPrefixError/cdesc-OverlappedPrefixError.yaml000064400000000504150403633070022204 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: prefix
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::OverlappedPrefixError
includes: []

instance_methods: []

name: OverlappedPrefixError
superclass: Error
ri/1.8/system/RSS/OverlappedPrefixError/new-c.yaml000064400000000272150403633070015647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::OverlappedPrefixError::new
is_singleton: true
name: new
params: (prefix)
visibility: public
ri/1.8/system/RSS/ConversionError/cdesc-ConversionError.yaml000064400000000664150403633070017727 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: from
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: string
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: to
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::ConversionError
includes: []

instance_methods: []

name: ConversionError
superclass: Error
ri/1.8/system/RSS/ConversionError/new-c.yaml000064400000000276150403633070014521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ConversionError::new
is_singleton: true
name: new
params: (string, to, from)
visibility: public
ri/1.8/system/RSS/RSS10/cdesc-RSS10.yaml000064400000000570150403633070013045 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NSPOOL
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "[]"
full_name: RSS::RSS10
includes: []

instance_methods: []

name: RSS10
superclass: 
ri/1.8/system/RSS/RSS10/append_features-c.yaml000064400000000301150403633070014533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RSS10::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/NSError/new-c.yaml000064400000000276150403633070012714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::NSError::new
is_singleton: true
name: new
params: (tag, prefix, require_uri)
visibility: public
ri/1.8/system/RSS/NSError/cdesc-NSError.yaml000064400000000656150403633070014316 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: prefix
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: tag
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: uri
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::NSError
includes: []

instance_methods: []

name: NSError
superclass: InvalidRSSError
ri/1.8/system/RSS/XMLStyleSheetMixin/new-c.yaml000064400000000266150403633070015040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheetMixin::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/XMLStyleSheetMixin/cdesc-XMLStyleSheetMixin.yaml000064400000000574150403633070020567 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: xml_stylesheets
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::XMLStyleSheetMixin
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: xml_stylesheet_pi
name: XMLStyleSheetMixin
superclass: 
ri/1.8/system/RSS/XMLStyleSheetMixin/xml_stylesheet_pi-i.yaml000064400000000316150403633070020012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLStyleSheetMixin#xml_stylesheet_pi
is_singleton: false
name: xml_stylesheet_pi
params: ()
visibility: private
ri/1.8/system/RSS/RSS09/append_features-c.yaml000064400000000301150403633070014543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RSS09::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/RSS09/cdesc-RSS09.yaml000064400000000570150403633070013065 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NSPOOL
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "[]"
full_name: RSS::RSS09
includes: []

instance_methods: []

name: RSS09
superclass: 
ri/1.8/system/RSS/XMLScanListener/entity-i.yaml000064400000000270150403633100015052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#entity
is_singleton: false
name: entity
params: (ref)
visibility: private
ri/1.8/system/RSS/XMLScanListener/on_etag-i.yaml000064400000000272150403633100015154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_etag
is_singleton: false
name: on_etag
params: (name)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_xmldecl_standalone-i.yaml000064400000000325150403633100020073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_xmldecl_standalone
is_singleton: false
name: on_xmldecl_standalone
params: (str)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_attr_entityref-i.yaml000064400000000315150403633100017275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_attr_entityref
is_singleton: false
name: on_attr_entityref
params: (ref)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_attr_value-i.yaml000064400000000305150403633100016377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_attr_value
is_singleton: false
name: on_attr_value
params: (str)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_stag_end_empty-i.yaml000064400000000316150403633100017235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_stag_end_empty
is_singleton: false
name: on_stag_end_empty
params: (name)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_attr_charref-i.yaml000064400000000401150403633100016672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: on_attr_charref_hex
block_params: 
comment: 
full_name: RSS::XMLScanListener#on_attr_charref
is_singleton: false
name: on_attr_charref
params: (code)
visibility: public
ri/1.8/system/RSS/XMLScanListener/cdesc-XMLScanListener.yaml000064400000002662150403633100017351 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ENTITIES
  value: "{       'lt' => '<',       'gt' => '>',       'amp' => '&',       'quot' => '\"',       'apos' => '\\''"
full_name: RSS::XMLScanListener
includes: 
- !ruby/object:RI::IncludedModule 
  name: XMLScan::Visitor
- !ruby/object:RI::IncludedModule 
  name: ListenerMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: entity
- !ruby/object:RI::MethodSummary 
  name: on_attr_charref
- !ruby/object:RI::MethodSummary 
  name: on_attr_charref_hex
- !ruby/object:RI::MethodSummary 
  name: on_attr_entityref
- !ruby/object:RI::MethodSummary 
  name: on_attr_value
- !ruby/object:RI::MethodSummary 
  name: on_attribute
- !ruby/object:RI::MethodSummary 
  name: on_charref
- !ruby/object:RI::MethodSummary 
  name: on_charref_hex
- !ruby/object:RI::MethodSummary 
  name: on_entityref
- !ruby/object:RI::MethodSummary 
  name: on_etag
- !ruby/object:RI::MethodSummary 
  name: on_stag
- !ruby/object:RI::MethodSummary 
  name: on_stag_end
- !ruby/object:RI::MethodSummary 
  name: on_stag_end_empty
- !ruby/object:RI::MethodSummary 
  name: on_xmldecl_encoding
- !ruby/object:RI::MethodSummary 
  name: on_xmldecl_end
- !ruby/object:RI::MethodSummary 
  name: on_xmldecl_standalone
- !ruby/object:RI::MethodSummary 
  name: on_xmldecl_version
name: XMLScanListener
superclass: BaseListener
ri/1.8/system/RSS/XMLScanListener/on_charref-i.yaml000064400000000362150403633100015646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: on_charref_hex
block_params: 
comment: 
full_name: RSS::XMLScanListener#on_charref
is_singleton: false
name: on_charref
params: (code)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_xmldecl_encoding-i.yaml000064400000000321150403633100017525 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_xmldecl_encoding
is_singleton: false
name: on_xmldecl_encoding
params: (str)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_attribute-i.yaml000064400000000304150403633110016234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_attribute
is_singleton: false
name: on_attribute
params: (name)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_stag-i.yaml000064400000000272150403633110015173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_stag
is_singleton: false
name: on_stag
params: (name)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_attr_charref_hex-i.yaml000064400000000423150403633120017544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #on_attr_charref"
full_name: RSS::XMLScanListener#on_attr_charref_hex
is_singleton: false
name: on_attr_charref_hex
params: (code)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_stag_end-i.yaml000064400000000302150403633120016014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_stag_end
is_singleton: false
name: on_stag_end
params: (name)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_xmldecl_version-i.yaml000064400000000317150403633120017433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_xmldecl_version
is_singleton: false
name: on_xmldecl_version
params: (str)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_charref_hex-i.yaml000064400000000404150403633120016511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #on_charref"
full_name: RSS::XMLScanListener#on_charref_hex
is_singleton: false
name: on_charref_hex
params: (code)
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_xmldecl_end-i.yaml000064400000000304150403633130016511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_xmldecl_end
is_singleton: false
name: on_xmldecl_end
params: ()
visibility: public
ri/1.8/system/RSS/XMLScanListener/on_entityref-i.yaml000064400000000303150403633130016243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanListener#on_entityref
is_singleton: false
name: on_entityref
params: (ref)
visibility: public
ri/1.8/system/RSS/XMLScanParser/cdesc-XMLScanParser.yaml000064400000000456150403633140016472 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: listener
comment: 
constants: []

full_name: RSS::XMLScanParser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _parse
name: XMLScanParser
superclass: BaseParser
ri/1.8/system/RSS/XMLScanParser/listener-c.yaml000064400000000266150403633140015035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanParser::listener
is_singleton: true
name: listener
params: ()
visibility: public
ri/1.8/system/RSS/XMLScanParser/_parse-i.yaml000064400000000263150403633150014465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLScanParser#_parse
is_singleton: false
name: _parse
params: ()
visibility: private
ri/1.8/system/RSS/REXMLParser/listener-c.yaml000064400000000264150403633150014456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLParser::listener
is_singleton: true
name: listener
params: ()
visibility: public
ri/1.8/system/RSS/REXMLParser/cdesc-REXMLParser.yaml000064400000000452150403633150015533 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: listener
comment: 
constants: []

full_name: RSS::REXMLParser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _parse
name: REXMLParser
superclass: BaseParser
ri/1.8/system/RSS/REXMLParser/_parse-i.yaml000064400000000261150403633150014105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::REXMLParser#_parse
is_singleton: false
name: _parse
params: ()
visibility: private
ri/1.8/system/RSS/NotExpectedTagError/new-c.yaml000064400000000302150403633150015237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::NotExpectedTagError::new
is_singleton: true
name: new
params: (tag, uri, parent)
visibility: public
ri/1.8/system/RSS/NotExpectedTagError/cdesc-NotExpectedTagError.yaml000064400000000706150403633150021205 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: tag
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: uri
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::NotExpectedTagError
includes: []

instance_methods: []

name: NotExpectedTagError
superclass: InvalidRSSError
ri/1.8/system/RSS/SlashModel/cdesc-SlashModel.yaml000064400000000672150403633150015515 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENT_INFOS
  value: \     [      ["section"],      ["department"],      ["comments", :positive_integer],      ["hit_parade", :csv_integer],     ]
full_name: RSS::SlashModel
includes: []

instance_methods: []

name: SlashModel
superclass: 
ri/1.8/system/RSS/SlashModel/append_features-c.yaml000064400000000306150403633150015762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::SlashModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/BaseListener/getter-c.yaml000064400000000276150403633160014443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseListener::getter
is_singleton: true
name: getter
params: (uri, tag_name)
visibility: public
ri/1.8/system/RSS/BaseListener/cdesc-BaseListener.yaml000064400000001515150403633160016365 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: available_tags
- !ruby/object:RI::MethodSummary 
  name: class_name
- !ruby/object:RI::MethodSummary 
  name: def_get_text_element
- !ruby/object:RI::MethodSummary 
  name: getter
- !ruby/object:RI::MethodSummary 
  name: install_accessor_base
- !ruby/object:RI::MethodSummary 
  name: install_class_name
- !ruby/object:RI::MethodSummary 
  name: install_get_text_element
- !ruby/object:RI::MethodSummary 
  name: raise_for_undefined_entity?
- !ruby/object:RI::MethodSummary 
  name: register_uri
- !ruby/object:RI::MethodSummary 
  name: setter
- !ruby/object:RI::MethodSummary 
  name: uri_registered?
comment: 
constants: []

full_name: RSS::BaseListener
includes: []

instance_methods: []

name: BaseListener
superclass: Object
ri/1.8/system/RSS/BaseListener/setter-c.yaml000064400000000430150403633160014447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return the setter for the uri, tag_name pair, or nil.
full_name: RSS::BaseListener::setter
is_singleton: true
name: setter
params: (uri, tag_name)
visibility: public
ri/1.8/system/RSS/BaseListener/uri_registered%3f-c.yaml000064400000000441150403633160016455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: test if this uri is registered against this name
full_name: RSS::BaseListener::uri_registered?
is_singleton: true
name: uri_registered?
params: (uri, name)
visibility: public
ri/1.8/system/RSS/BaseListener/def_get_text_element-c.yaml000064400000000353150403633160017317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseListener::def_get_text_element
is_singleton: true
name: def_get_text_element
params: (uri, element_name, file, line)
visibility: private
ri/1.8/system/RSS/BaseListener/available_tags-c.yaml000064400000000435150403633160016104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return the tag_names for setters associated with uri
full_name: RSS::BaseListener::available_tags
is_singleton: true
name: available_tags
params: (uri)
visibility: public
ri/1.8/system/RSS/BaseListener/install_class_name-c.yaml000064400000000472150403633160017002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: record class_name for the supplied uri and tag_name
full_name: RSS::BaseListener::install_class_name
is_singleton: true
name: install_class_name
params: (uri, tag_name, class_name)
visibility: public
ri/1.8/system/RSS/BaseListener/install_get_text_element-c.yaml000064400000000355150403633160020231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseListener::install_get_text_element
is_singleton: true
name: install_get_text_element
params: (uri, name, accessor_base)
visibility: public
ri/1.8/system/RSS/BaseListener/class_name-c.yaml000064400000000515150403633170015253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: retrieve class_name for the supplied uri and tag_name If it doesn't exist, capitalize the tag_name
full_name: RSS::BaseListener::class_name
is_singleton: true
name: class_name
params: (uri, tag_name)
visibility: public
ri/1.8/system/RSS/BaseListener/register_uri-c.yaml000064400000000412150403633170015645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: register uri against this name.
full_name: RSS::BaseListener::register_uri
is_singleton: true
name: register_uri
params: (uri, name)
visibility: public
ri/1.8/system/RSS/BaseListener/install_accessor_base-c.yaml000064400000000474150403633170017474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: set the accessor for the uri, tag_name pair
full_name: RSS::BaseListener::install_accessor_base
is_singleton: true
name: install_accessor_base
params: (uri, tag_name, accessor_base)
visibility: private
ri/1.8/system/RSS/BaseListener/raise_for_undefined_entity%3f-c.yaml000064400000000333150403633170021030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseListener::raise_for_undefined_entity?
is_singleton: true
name: raise_for_undefined_entity?
params: ()
visibility: public
ri/1.8/system/RSS/UnsupportedMakerVersionError/new-c.yaml000064400000000302150403633170017241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::UnsupportedMakerVersionError::new
is_singleton: true
name: new
params: (version)
visibility: public
ri/1.8/system/RSS/UnsupportedMakerVersionError/cdesc-UnsupportedMakerVersionError.yaml000064400000000523150403633200025176 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: version
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::UnsupportedMakerVersionError
includes: []

instance_methods: []

name: UnsupportedMakerVersionError
superclass: Error
ri/1.8/system/RSS/ListenerMixin/tag_end-i.yaml000064400000000270150403633200014757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#tag_end
is_singleton: false
name: tag_end
params: (name)
visibility: public
ri/1.8/system/RSS/ListenerMixin/initial_start_RDF-i.yaml000064400000000344150403633200016721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#initial_start_RDF
is_singleton: false
name: initial_start_RDF
params: (tag_name, prefix, attrs, ns)
visibility: private
ri/1.8/system/RSS/ListenerMixin/_ns-i.yaml000064400000000267150403633200014143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#_ns
is_singleton: false
name: _ns
params: (ns, prefix)
visibility: private
ri/1.8/system/RSS/ListenerMixin/start_have_something_element-i.yaml000064400000000401150403633200021300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#start_have_something_element
is_singleton: false
name: start_have_something_element
params: (tag_name, prefix, attrs, ns, klass)
visibility: private
ri/1.8/system/RSS/ListenerMixin/xmldecl-i.yaml000064400000000451150403633200015007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: set instance vars for version, encoding, standalone
full_name: RSS::ListenerMixin#xmldecl
is_singleton: false
name: xmldecl
params: (version, encoding, standalone)
visibility: public
ri/1.8/system/RSS/ListenerMixin/collect_attributes-i.yaml000064400000000355150403633200017255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#collect_attributes
is_singleton: false
name: collect_attributes
params: (tag_name, prefix, attrs, ns, klass)
visibility: private
ri/1.8/system/RSS/ListenerMixin/initial_start_entry-i.yaml000064400000000350150403633210017445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#initial_start_entry
is_singleton: false
name: initial_start_entry
params: (tag_name, prefix, attrs, ns)
visibility: private
ri/1.8/system/RSS/ListenerMixin/check_ns-i.yaml000064400000000330150403633210015131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#check_ns
is_singleton: false
name: check_ns
params: (tag_name, prefix, ns, require_uri)
visibility: private
ri/1.8/system/RSS/ListenerMixin/initial_start_rss-i.yaml000064400000000344150403633210017116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#initial_start_rss
is_singleton: false
name: initial_start_rss
params: (tag_name, prefix, attrs, ns)
visibility: private
ri/1.8/system/RSS/ListenerMixin/initial_start_feed-i.yaml000064400000000346150403633210017214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#initial_start_feed
is_singleton: false
name: initial_start_feed
params: (tag_name, prefix, attrs, ns)
visibility: private
ri/1.8/system/RSS/ListenerMixin/setup_next_element-i.yaml000064400000000346150403633210017272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#setup_next_element
is_singleton: false
name: setup_next_element
params: (tag_name, klass, attributes)
visibility: private
ri/1.8/system/RSS/ListenerMixin/new-c.yaml000064400000000254150403633210014144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/RSS/ListenerMixin/start_else_element-i.yaml000064400000000343150403633210017236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#start_else_element
is_singleton: false
name: start_else_element
params: (local, prefix, attrs, ns)
visibility: private
ri/1.8/system/RSS/ListenerMixin/instruction-i.yaml000064400000000311150403633210015734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#instruction
is_singleton: false
name: instruction
params: (name, content)
visibility: public
ri/1.8/system/RSS/ListenerMixin/parse_pi_content-i.yaml000064400000000601150403633210016711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extract the first name=&quot;value&quot; pair from content. Works with single quotes according to the constant CONTENT_PATTERN. Return a Hash.
full_name: RSS::ListenerMixin#parse_pi_content
is_singleton: false
name: parse_pi_content
params: (content)
visibility: private
ri/1.8/system/RSS/ListenerMixin/start_get_text_element-i.yaml000064400000000365150403633210020135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#start_get_text_element
is_singleton: false
name: start_get_text_element
params: (tag_name, prefix, ns, required_uri)
visibility: private
ri/1.8/system/RSS/ListenerMixin/cdesc-ListenerMixin.yaml000064400000003226150403633210017006 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: do_validate
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: ignore_unknown_element
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: rss
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CONTENT_PATTERN
  value: /\s*([^=]+)=(["'])([^\2]+?)\2/
- !ruby/object:RI::Constant 
  comment: 
  name: NAMESPLIT
  value: /^(?:([\w:][-\w\d.]*):)?([\w:][-\w\d.]*)/
full_name: RSS::ListenerMixin
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _ns
- !ruby/object:RI::MethodSummary 
  name: check_ns
- !ruby/object:RI::MethodSummary 
  name: collect_attributes
- !ruby/object:RI::MethodSummary 
  name: initial_start_RDF
- !ruby/object:RI::MethodSummary 
  name: initial_start_entry
- !ruby/object:RI::MethodSummary 
  name: initial_start_feed
- !ruby/object:RI::MethodSummary 
  name: initial_start_rss
- !ruby/object:RI::MethodSummary 
  name: instruction
- !ruby/object:RI::MethodSummary 
  name: parse_pi_content
- !ruby/object:RI::MethodSummary 
  name: setup_next_element
- !ruby/object:RI::MethodSummary 
  name: split_name
- !ruby/object:RI::MethodSummary 
  name: start_else_element
- !ruby/object:RI::MethodSummary 
  name: start_get_text_element
- !ruby/object:RI::MethodSummary 
  name: start_have_something_element
- !ruby/object:RI::MethodSummary 
  name: tag_end
- !ruby/object:RI::MethodSummary 
  name: tag_start
- !ruby/object:RI::MethodSummary 
  name: text
- !ruby/object:RI::MethodSummary 
  name: xmldecl
name: ListenerMixin
superclass: 
ri/1.8/system/RSS/ListenerMixin/text-i.yaml000064400000000262150403633210014344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#text
is_singleton: false
name: text
params: (data)
visibility: public
ri/1.8/system/RSS/ListenerMixin/tag_start-i.yaml000064400000000310150403633210015342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#tag_start
is_singleton: false
name: tag_start
params: (name, attributes)
visibility: public
ri/1.8/system/RSS/ListenerMixin/split_name-i.yaml000064400000000277150403633210015521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ListenerMixin#split_name
is_singleton: false
name: split_name
params: (name)
visibility: private
ri/1.8/system/RSS/Converter/def_uconv_convert_if_can-i.yaml000064400000000361150403633210017544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_uconv_convert_if_can
is_singleton: false
name: def_uconv_convert_if_can
params: (meth, to_enc, from_enc, nkf_arg)
visibility: public
ri/1.8/system/RSS/Converter/def_to_shift_jis_from_utf_8-i.yaml000064400000000330150403633210020163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_shift_jis_from_utf_8
is_singleton: false
name: def_to_shift_jis_from_utf_8
params: ()
visibility: public
ri/1.8/system/RSS/Converter/convert-i.yaml000064400000000265150403633210014220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#convert
is_singleton: false
name: convert
params: (value)
visibility: public
ri/1.8/system/RSS/Converter/def_to_utf_8_from_shift_jis-i.yaml000064400000000330150403633210020163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_utf_8_from_shift_jis
is_singleton: false
name: def_to_utf_8_from_shift_jis
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_iconv_convert-i.yaml000064400000000335150403633210016232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_iconv_convert
is_singleton: false
name: def_iconv_convert
params: (to_enc, from_enc, depth=0)
visibility: public
ri/1.8/system/RSS/Converter/def_to_euc_jp_from_iso_2022_jp-i.yaml000064400000000336150403633210020357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_euc_jp_from_iso_2022_jp
is_singleton: false
name: def_to_euc_jp_from_iso_2022_jp
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_same_enc-i.yaml000064400000000272150403633210015126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_same_enc
is_singleton: false
name: def_same_enc
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_to_shift_jis_from_euc_jp-i.yaml000064400000000332150403633210020405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_shift_jis_from_euc_jp
is_singleton: false
name: def_to_shift_jis_from_euc_jp
params: ()
visibility: public
ri/1.8/system/RSS/Converter/new-c.yaml000064400000000274150403633210013323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter::new
is_singleton: true
name: new
params: (to_enc, from_enc=nil)
visibility: public
ri/1.8/system/RSS/Converter/cdesc-Converter.yaml000064400000002457150403633210015345 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Converter
includes: 
- !ruby/object:RI::IncludedModule 
  name: Utils
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: convert
- !ruby/object:RI::MethodSummary 
  name: def_convert
- !ruby/object:RI::MethodSummary 
  name: def_else_enc
- !ruby/object:RI::MethodSummary 
  name: def_iconv_convert
- !ruby/object:RI::MethodSummary 
  name: def_same_enc
- !ruby/object:RI::MethodSummary 
  name: def_to_euc_jp_from_iso_2022_jp
- !ruby/object:RI::MethodSummary 
  name: def_to_euc_jp_from_shift_jis
- !ruby/object:RI::MethodSummary 
  name: def_to_euc_jp_from_utf_8
- !ruby/object:RI::MethodSummary 
  name: def_to_iso_2022_jp_from_euc_jp
- !ruby/object:RI::MethodSummary 
  name: def_to_iso_8859_1_from_utf_8
- !ruby/object:RI::MethodSummary 
  name: def_to_shift_jis_from_euc_jp
- !ruby/object:RI::MethodSummary 
  name: def_to_shift_jis_from_utf_8
- !ruby/object:RI::MethodSummary 
  name: def_to_utf_8_from_euc_jp
- !ruby/object:RI::MethodSummary 
  name: def_to_utf_8_from_iso_8859_1
- !ruby/object:RI::MethodSummary 
  name: def_to_utf_8_from_shift_jis
- !ruby/object:RI::MethodSummary 
  name: def_uconv_convert_if_can
name: Converter
superclass: Object
ri/1.8/system/RSS/Converter/def_to_utf_8_from_iso_8859_1-i.yaml000064400000000332150403633210017712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_utf_8_from_iso_8859_1
is_singleton: false
name: def_to_utf_8_from_iso_8859_1
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_to_euc_jp_from_shift_jis-i.yaml000064400000000332150403633210020405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_euc_jp_from_shift_jis
is_singleton: false
name: def_to_euc_jp_from_shift_jis
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_to_iso_8859_1_from_utf_8-i.yaml000064400000000332150403633210017712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_iso_8859_1_from_utf_8
is_singleton: false
name: def_to_iso_8859_1_from_utf_8
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_to_euc_jp_from_utf_8-i.yaml000064400000000322150403633210017447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_euc_jp_from_utf_8
is_singleton: false
name: def_to_euc_jp_from_utf_8
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_convert-i.yaml000064400000000277150403633210015041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_convert
is_singleton: false
name: def_convert
params: (depth=0)
visibility: public
ri/1.8/system/RSS/Converter/def_to_iso_2022_jp_from_euc_jp-i.yaml000064400000000336150403633220020360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_iso_2022_jp_from_euc_jp
is_singleton: false
name: def_to_iso_2022_jp_from_euc_jp
params: ()
visibility: public
ri/1.8/system/RSS/Converter/def_else_enc-i.yaml000064400000000312150403633220015125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_else_enc
is_singleton: false
name: def_else_enc
params: (to_enc, from_enc)
visibility: public
ri/1.8/system/RSS/Converter/def_to_utf_8_from_euc_jp-i.yaml000064400000000322150403633220017450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Converter#def_to_utf_8_from_euc_jp
is_singleton: false
name: def_to_utf_8_from_euc_jp
params: ()
visibility: public
ri/1.8/system/RSS/InvalidRSSError/cdesc-InvalidRSSError.yaml000064400000000317150403633220017401 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::InvalidRSSError
includes: []

instance_methods: []

name: InvalidRSSError
superclass: Error
ri/1.8/system/RSS/Maker/AtomTextConstructBase/EnsureXMLContent/cdesc-EnsureXMLContent.yaml000064400000001003150403633220025250 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: included
comment: 
constants: []

full_name: RSS::Maker::AtomTextConstructBase::EnsureXMLContent
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ensure_xml_content
- !ruby/object:RI::MethodSummary 
  name: set_xhtml_uri_as_default_uri
- !ruby/object:RI::MethodSummary 
  name: xhtml=
- !ruby/object:RI::MethodSummary 
  name: xml_content=
name: EnsureXMLContent
superclass: 
ri/1.8/system/RSS/Maker/AtomTextConstructBase/EnsureXMLContent/xml_content%3d-i.yaml000064400000000346150403633220024101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstructBase::EnsureXMLContent#xml_content=
is_singleton: false
name: xml_content=
params: (content)
visibility: public
ri/1.8/system/RSS/Maker/AtomTextConstructBase/EnsureXMLContent/ensure_xml_content-i.yaml000064400000000362150403633220025164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstructBase::EnsureXMLContent#ensure_xml_content
is_singleton: false
name: ensure_xml_content
params: (content)
visibility: public
ri/1.8/system/RSS/Maker/AtomTextConstructBase/EnsureXMLContent/set_xhtml_uri_as_default_uri-i.yaml000064400000000410150403633220027177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstructBase::EnsureXMLContent#set_xhtml_uri_as_default_uri
is_singleton: false
name: set_xhtml_uri_as_default_uri
params: (children)
visibility: private
ri/1.8/system/RSS/Maker/AtomTextConstructBase/EnsureXMLContent/xhtml%3d-i.yaml000064400000000332150403633220022676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstructBase::EnsureXMLContent#xhtml=
is_singleton: false
name: xhtml=
params: (content)
visibility: public
ri/1.8/system/RSS/Maker/AtomTextConstructBase/EnsureXMLContent/included-c.yaml000064400000000333150403633220023030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstructBase::EnsureXMLContent::included
is_singleton: true
name: included
params: (base)
visibility: public
ri/1.8/system/RSS/Maker/AtomTextConstructBase/append_features-c.yaml000064400000000330150403633220021226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstructBase::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/AtomTextConstructBase/cdesc-AtomTextConstructBase.yaml000064400000000515150403633220023172 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::AtomTextConstructBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: EnsureXMLContent
instance_methods: []

name: AtomTextConstructBase
superclass: 
ri/1.8/system/RSS/Maker/AtomLogo/required_variable_names-i.yaml000064400000000327150403633220020221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomLogo#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/AtomLogo/to_feed-i.yaml000064400000000303150403633220014750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomLogo#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/AtomLogo/cdesc-AtomLogo.yaml000064400000000464150403633220015725 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::AtomLogo
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: AtomLogo
superclass: 
ri/1.8/system/RSS/Maker/TaxonomyTopicModel/cdesc-TaxonomyTopicModel.yaml000064400000000513150403633220022052 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: install_taxo_topic
comment: 
constants: []

full_name: RSS::Maker::TaxonomyTopicModel
includes: []

instance_methods: []

name: TaxonomyTopicModel
superclass: 
ri/1.8/system/RSS/Maker/TaxonomyTopicModel/append_features-c.yaml000064400000000325150403633220020563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TaxonomyTopicModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/TaxonomyTopicModel/TaxonomyTopicsBase/cdesc-TaxonomyTopicsBase.yaml000064400000000357150403633220025650 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::TaxonomyTopicModel::TaxonomyTopicsBase
includes: []

instance_methods: []

name: TaxonomyTopicsBase
superclass: Base
RSS/Maker/TaxonomyTopicModel/TaxonomyTopicsBase/TaxonomyTopicBase/cdesc-TaxonomyTopicBase.yaml000064400000000763150403633220031017 0ustar00ri/1.8/system--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::TaxonomyTopicModel::TaxonomyTopicsBase::TaxonomyTopicBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicsModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
name: TaxonomyTopicBase
superclass: Base
RSS/Maker/TaxonomyTopicModel/TaxonomyTopicsBase/TaxonomyTopicBase/have_required_values%3f-i.yaml000064400000000403150403633220031245 0ustar00ri/1.8/system--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TaxonomyTopicModel::TaxonomyTopicsBase::TaxonomyTopicBase#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/TaxonomyTopicModel/install_taxo_topic-c.yaml000064400000000333150403633220021314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TaxonomyTopicModel::install_taxo_topic
is_singleton: true
name: install_taxo_topic
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/Base/setup_values-i.yaml000064400000000303150403633220015213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#setup_values
is_singleton: false
name: setup_values
params: (target)
visibility: private
ri/1.8/system/RSS/Maker/Base/_set_default_values-i.yaml000064400000000334150403633220016515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: RSS::Maker::Base#_set_default_values
is_singleton: false
name: _set_default_values
params: (&block) {|| ...}
visibility: private
ri/1.8/system/RSS/Maker/Base/current_element-i.yaml000064400000000307150403633220015673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#current_element
is_singleton: false
name: current_element
params: (feed)
visibility: private
ri/1.8/system/RSS/Maker/Base/variables-i.yaml000064400000000267150403633220014455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Base/setup_other_elements-i.yaml000064400000000336150403633220016737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#setup_other_elements
is_singleton: false
name: setup_other_elements
params: (feed, current=nil)
visibility: private
ri/1.8/system/RSS/Maker/Base/add_other_element-c.yaml000064400000000323150403633220016132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::add_other_element
is_singleton: true
name: add_other_element
params: (variable_name)
visibility: public
ri/1.8/system/RSS/Maker/Base/inherited_base-c.yaml000064400000000300150403633220015430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::inherited_base
is_singleton: true
name: inherited_base
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Base/def_other_element_without_accessor-c.yaml000064400000000354150403633220021611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::def_other_element_without_accessor
is_singleton: true
name: def_other_element_without_accessor
params: (name)
visibility: public
ri/1.8/system/RSS/Maker/Base/def_classed_elements-c.yaml000064400000000636150403633220016627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (local_variable_name,                                           new_value_variable_name)
comment: 
full_name: RSS::Maker::Base::def_classed_elements
is_singleton: true
name: def_classed_elements
params: (name, attribute, plural_class_name=nil, plural_name=nil, new_name=nil) {|local_variable_name, new_value_variable_name| ...}
visibility: public
ri/1.8/system/RSS/Maker/Base/add_need_initialize_variable-c.yaml000064400000000373150403633220020306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::add_need_initialize_variable
is_singleton: true
name: add_need_initialize_variable
params: (variable_name, init_value="nil")
visibility: public
ri/1.8/system/RSS/Maker/Base/set_parent-i.yaml000064400000000307150403633220014644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#set_parent
is_singleton: false
name: set_parent
params: (target, parent)
visibility: private
ri/1.8/system/RSS/Maker/Base/variable_is_set%3f-i.yaml000064400000000304150403633220016126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#variable_is_set?
is_singleton: false
name: variable_is_set?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Base/have_required_values%3f-i.yaml000064400000000316150403633220017200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Base/def_csv_element-c.yaml000064400000000320150403633220015607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::def_csv_element
is_singleton: true
name: def_csv_element
params: (name, type=nil)
visibility: public
ri/1.8/system/RSS/Maker/Base/set_default_values-i.yaml000064400000000414150403633220016355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: if @default_values_are_set
comment: 
full_name: RSS::Maker::Base#set_default_values
is_singleton: false
name: set_default_values
params: (&block) {|if @default_values_are_set| ...}
visibility: private
ri/1.8/system/RSS/Maker/Base/new-c.yaml000064400000000257150403633220013267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::new
is_singleton: true
name: new
params: (maker)
visibility: public
ri/1.8/system/RSS/Maker/Base/initialize_variables-i.yaml000064400000000315150403633220016670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#initialize_variables
is_singleton: false
name: initialize_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Base/required_variables_are_set%3f-i.yaml000064400000000333150403633220020347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#required_variables_are_set?
is_singleton: false
name: required_variables_are_set?
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Base/cdesc-Base.yaml000064400000004016150403633220014204 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: maker
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_need_initialize_variable
- !ruby/object:RI::MethodSummary 
  name: add_other_element
- !ruby/object:RI::MethodSummary 
  name: def_array_element
- !ruby/object:RI::MethodSummary 
  name: def_classed_element
- !ruby/object:RI::MethodSummary 
  name: def_classed_element_without_accessor
- !ruby/object:RI::MethodSummary 
  name: def_classed_elements
- !ruby/object:RI::MethodSummary 
  name: def_csv_element
- !ruby/object:RI::MethodSummary 
  name: def_other_element
- !ruby/object:RI::MethodSummary 
  name: def_other_element_without_accessor
- !ruby/object:RI::MethodSummary 
  name: inherited
- !ruby/object:RI::MethodSummary 
  name: inherited_base
- !ruby/object:RI::MethodSummary 
  name: need_initialize_variables
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: other_elements
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: OTHER_ELEMENTS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: NEED_INITIALIZE_VARIABLES
  value: "[]"
full_name: RSS::Maker::Base
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set_default_values
- !ruby/object:RI::MethodSummary 
  name: current_element
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: initialize_variables
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variables_are_set?
- !ruby/object:RI::MethodSummary 
  name: set_default_values
- !ruby/object:RI::MethodSummary 
  name: set_parent
- !ruby/object:RI::MethodSummary 
  name: setup_other_elements
- !ruby/object:RI::MethodSummary 
  name: setup_values
- !ruby/object:RI::MethodSummary 
  name: variable_is_set?
- !ruby/object:RI::MethodSummary 
  name: variables
name: Base
superclass: Object
ri/1.8/system/RSS/Maker/Base/def_classed_element_without_accessor-c.yaml000064400000000400150403633220022076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::def_classed_element_without_accessor
is_singleton: true
name: def_classed_element_without_accessor
params: (name, class_name=nil)
visibility: public
ri/1.8/system/RSS/Maker/Base/def_classed_element-c.yaml000064400000000362150403633220016440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::def_classed_element
is_singleton: true
name: def_classed_element
params: (name, class_name=nil, attribute_name=nil)
visibility: public
ri/1.8/system/RSS/Maker/Base/other_elements-c.yaml000064400000000300150403633220015500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::other_elements
is_singleton: true
name: other_elements
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Base/def_array_element-c.yaml000064400000000346150403633220016142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::def_array_element
is_singleton: true
name: def_array_element
params: (name, plural=nil, klass_name=nil)
visibility: public
ri/1.8/system/RSS/Maker/Base/inherited-c.yaml000064400000000276150403633220014452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::inherited
is_singleton: true
name: inherited
params: (subclass)
visibility: public
ri/1.8/system/RSS/Maker/Base/not_set_required_variables-i.yaml000064400000000331150403633220020100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Base/need_initialize_variables-c.yaml000064400000000326150403633220017657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::need_initialize_variables
is_singleton: true
name: need_initialize_variables
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Base/def_other_element-c.yaml000064400000000312150403633230016137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Base::def_other_element
is_singleton: true
name: def_other_element
params: (name)
visibility: public
ri/1.8/system/RSS/Maker/AtomGenerator/cdesc-AtomGenerator.yaml000064400000000476150403633230020005 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::AtomGenerator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: AtomGenerator
superclass: 
ri/1.8/system/RSS/Maker/AtomGenerator/required_variable_names-i.yaml000064400000000334150403633240021247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomGenerator#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/AtomGenerator/to_feed-i.yaml000064400000000310150403633240015776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomGenerator#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/AtomLink/required_variable_names-i.yaml000064400000000327150403633250020221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomLink#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/AtomLink/to_feed-i.yaml000064400000000303150403633250014750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomLink#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/AtomLink/cdesc-AtomLink.yaml000064400000000464150403633250015722 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::AtomLink
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: AtomLink
superclass: 
ri/1.8/system/RSS/Maker/SyndicationModel/append_features-c.yaml000064400000000323150403633260020234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::SyndicationModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/SyndicationModel/cdesc-SyndicationModel.yaml000064400000000412150403633260021172 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::SyndicationModel
includes: []

instance_methods: []

name: SyndicationModel
superclass: 
ri/1.8/system/RSS/Maker/AtomCategory/variables-i.yaml000064400000000277150403633270016207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomCategory#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/AtomCategory/cdesc-AtomCategory.yaml000064400000000560150403633270017461 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::AtomCategory
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variables
name: AtomCategory
superclass: 
ri/1.8/system/RSS/Maker/AtomCategory/required_variable_names-i.yaml000064400000000333150403633300021072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomCategory#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/AtomCategory/to_feed-i.yaml000064400000000307150403633300015630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomCategory#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/ITunesChannelModel/append_features-c.yaml000064400000000325150403633310020446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesChannelModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/ITunesChannelModel/ITunesOwnerBase/required_variable_names-i.yaml000064400000000362150403633320025176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesChannelModel::ITunesOwnerBase#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/ITunesChannelModel/ITunesOwnerBase/to_feed-i.yaml000064400000000336150403633320021734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesChannelModel::ITunesOwnerBase#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/ITunesChannelModel/ITunesOwnerBase/cdesc-ITunesOwnerBase.yaml000064400000000532150403633330024174 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ITunesChannelModel::ITunesOwnerBase
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: ITunesOwnerBase
superclass: Base
RSS/Maker/ITunesChannelModel/ITunesCategoriesBase/ITunesCategoryBase/cdesc-ITunesCategoryBase.yaml000064400000000661150403633340031277 0ustar00ri/1.8/system--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: text
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ITunesChannelModel::ITunesCategoriesBase::ITunesCategoryBase
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: ITunesCategoryBase
superclass: Base
RSS/Maker/ITunesChannelModel/ITunesCategoriesBase/ITunesCategoryBase/have_required_values%3f-i.yaml000064400000000406150403633340031443 0ustar00ri/1.8/system--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesChannelModel::ITunesCategoriesBase::ITunesCategoryBase#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ITunesChannelModel/ITunesCategoriesBase/ITunesCategoryBase/to_feed-i.yaml000064400000000367150403633340026435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesChannelModel::ITunesCategoriesBase::ITunesCategoryBase#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/ITunesChannelModel/ITunesCategoriesBase/cdesc-ITunesCategoriesBase.yaml000064400000000363150403633350026166 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ITunesChannelModel::ITunesCategoriesBase
includes: []

instance_methods: []

name: ITunesCategoriesBase
superclass: Base
ri/1.8/system/RSS/Maker/ITunesChannelModel/ITunesImageBase/to_feed-i.yaml000064400000000336150403633350021667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesChannelModel::ITunesImageBase#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/ITunesChannelModel/ITunesImageBase/cdesc-ITunesImageBase.yaml000064400000000525150403633360024061 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: href
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ITunesChannelModel::ITunesImageBase
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: ITunesImageBase
superclass: Base
ri/1.8/system/RSS/Maker/ITunesChannelModel/cdesc-ITunesChannelModel.yaml000064400000000416150403633360021627 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::ITunesChannelModel
includes: []

instance_methods: []

name: ITunesChannelModel
superclass: 
ri/1.8/system/RSS/Maker/ImageItemModel/cdesc-ImageItemModel.yaml000064400000000503150403633370020127 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: install_image_item
comment: 
constants: []

full_name: RSS::Maker::ImageItemModel
includes: []

instance_methods: []

name: ImageItemModel
superclass: 
ri/1.8/system/RSS/Maker/ImageItemModel/append_features-c.yaml000064400000000321150403633370017611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageItemModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/ImageItemModel/install_image_item-c.yaml000064400000000327150403633370020300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageItemModel::install_image_item
is_singleton: true
name: install_image_item
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/ImageItemModel/ImageItemBase/cdesc-ImageItemBase.yaml000064400000001240150403633370022374 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: about
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: image_height
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: image_width
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: resource
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ImageItemModel::ImageItemBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: Maker::DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: ImageItemBase
superclass: Base
ri/1.8/system/RSS/Maker/ImageItemModel/ImageItemBase/have_required_values%3f-i.yaml000064400000000347150403633400023610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageItemModel::ImageItemBase#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ImageItemModel/ImageItemBase/to_feed-i.yaml000064400000000330150403633400020505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageItemModel::ImageItemBase#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/ITunesItemModel/ITunesDurationBase/hour%3d-i.yaml000064400000000321150403633400021612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesItemModel::ITunesDurationBase#hour=
is_singleton: false
name: hour=
params: (hour)
visibility: public
ri/1.8/system/RSS/Maker/ITunesItemModel/ITunesDurationBase/minute%3d-i.yaml000064400000000327150403633410022145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesItemModel::ITunesDurationBase#minute=
is_singleton: false
name: minute=
params: (minute)
visibility: public
ri/1.8/system/RSS/Maker/ITunesItemModel/ITunesDurationBase/content%3d-i.yaml000064400000000332150403633410022312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesItemModel::ITunesDurationBase#content=
is_singleton: false
name: content=
params: (content)
visibility: public
ri/1.8/system/RSS/Maker/ITunesItemModel/ITunesDurationBase/second%3d-i.yaml000064400000000327150403633420022120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesItemModel::ITunesDurationBase#second=
is_singleton: false
name: second=
params: (second)
visibility: public
ri/1.8/system/RSS/Maker/ITunesItemModel/ITunesDurationBase/update_content-i.yaml000064400000000340150403633420023360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesItemModel::ITunesDurationBase#update_content
is_singleton: false
name: update_content
params: ()
visibility: private
ri/1.8/system/RSS/Maker/ITunesItemModel/ITunesDurationBase/to_feed-i.yaml000064400000000336150403633420021756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesItemModel::ITunesDurationBase#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/ITunesItemModel/ITunesDurationBase/cdesc-ITunesDurationBase.yaml000064400000001132150403633420024705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: content
  rw: R
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ITunesItemModel::ITunesDurationBase
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: content=
- !ruby/object:RI::MethodSummary 
  name: hour=
- !ruby/object:RI::MethodSummary 
  name: minute=
- !ruby/object:RI::MethodSummary 
  name: second=
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: update_content
name: ITunesDurationBase
superclass: Base
ri/1.8/system/RSS/Maker/ITunesItemModel/cdesc-ITunesItemModel.yaml000064400000000410150403633420020472 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::ITunesItemModel
includes: []

instance_methods: []

name: ITunesItemModel
superclass: 
ri/1.8/system/RSS/Maker/ITunesItemModel/append_features-c.yaml000064400000000322150403633420017773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesItemModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/DublinCoreModel/append_features-c.yaml000064400000000322150403633430017774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::DublinCoreModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/DublinCoreModel/cdesc-DublinCoreModel.yaml000064400000000506150403633430020501 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: install_dublin_core
comment: 
constants: []

full_name: RSS::Maker::DublinCoreModel
includes: []

instance_methods: []

name: DublinCoreModel
superclass: 
ri/1.8/system/RSS/Maker/DublinCoreModel/install_dublin_core-c.yaml000064400000000332150403633440020644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::DublinCoreModel::install_dublin_core
is_singleton: true
name: install_dublin_core
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/maker-c.yaml000064400000000257150403633440012727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::maker
is_singleton: true
name: maker
params: (version)
visibility: public
ri/1.8/system/RSS/Maker/make-c.yaml000064400000000265150403633440012544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::make
is_singleton: true
name: make
params: (version, &block)
visibility: public
ri/1.8/system/RSS/Maker/ImageBase/link-i.yaml000064400000000261150403633450014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageBase#link
is_singleton: false
name: link
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ImageBase/cdesc-ImageBase.yaml000064400000000457150403633460016125 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ImageBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: link
name: ImageBase
superclass: Object
ri/1.8/system/RSS/Maker/AtomPersonConstructBase/append_features-c.yaml000064400000000332150403633470021561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomPersonConstructBase::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/AtomPersonConstructBase/cdesc-AtomPersonConstructBase.yaml000064400000000430150403633470024041 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::AtomPersonConstructBase
includes: []

instance_methods: []

name: AtomPersonConstructBase
superclass: 
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Title/required_variable_names-i.yaml000064400000000350150403633470022353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Title#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Title/cdesc-Title.yaml000064400000000513150403633470017416 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Title
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Title
superclass: TitleBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Title/to_feed-i.yaml000064400000000320150403633470017105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Title#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Links/Link/cdesc-Link.yaml000064400000000336150403633470020131 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Links::Link
includes: []

instance_methods: []

name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Links/cdesc-Links.yaml000064400000000411150403633470017411 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Links
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Links/to_feed-i.yaml000064400000000314150403633470017107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Links#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Title/cdesc-Title.yaml000064400000000421150403633470020654 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Title
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Title
superclass: TitleBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Title/to_feed-i.yaml000064400000000324150403633500020343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Title#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Links/Link/cdesc-Link.yaml000064400000000346150403633510021365 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Links::Link
includes: []

instance_methods: []

name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Links/cdesc-Links.yaml000064400000000421150403633510020645 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Links
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Links/to_feed-i.yaml000064400000000324150403633520020344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Links#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Subtitle/cdesc-Subtitle.yaml000064400000000432150403633530022077 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Subtitle
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Subtitle
superclass: SubtitleBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Subtitle/to_feed-i.yaml000064400000000327150403633530021063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Subtitle#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Logo/cdesc-Logo.yaml000064400000000416150403633540020314 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Logo
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Logo
superclass: LogoBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Logo/to_feed-i.yaml000064400000000323150403633540020165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Logo#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Contributors/Contributor/cdesc-Contributor.yaml000064400000000402150403633550026031 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Contributors::Contributor
includes: []

instance_methods: []

name: Contributor
superclass: ContributorBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Contributors/to_feed-i.yaml000064400000000333150403633560021765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Contributors#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Contributors/cdesc-Contributors.yaml000064400000000446150403633560023713 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Contributors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Contributors
superclass: ContributorsBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/to_feed-i.yaml000064400000000315150403633570017271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Rights/to_feed-i.yaml000064400000000325150403633570020532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Rights#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Rights/cdesc-Rights.yaml000064400000000424150403633600021210 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Rights
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Rights
superclass: RightsBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Generator/cdesc-Generator.yaml000064400000000435150403633600022366 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Generator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Generator/to_feed-i.yaml000064400000000330150403633610021207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Generator#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/cdesc-Source.yaml000064400000000414150403633610017750 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Source
superclass: SourceBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Icon/to_feed-i.yaml000064400000000323150403633620020154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Icon#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Icon/cdesc-Icon.yaml000064400000000416150403633620020273 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Icon
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Icon
superclass: IconBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Authors/Author/cdesc-Author.yaml000064400000000356150403633630022650 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Authors::Author
includes: []

instance_methods: []

name: Author
superclass: AuthorBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Authors/to_feed-i.yaml000064400000000326150403633640020716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Authors#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Authors/cdesc-Authors.yaml000064400000000427150403633640021571 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Authors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Authors
superclass: AuthorsBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Categories/cdesc-Categories.yaml000064400000000440150403633650022665 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Categories/Category/cdesc-Category.yaml000064400000000367150403633660024143 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Source::Categories::Category
includes: []

instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Source/Categories/to_feed-i.yaml000064400000000331150403633660021354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Source::Categories#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/variables-i.yaml000064400000000305150403633670016374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Items/Item/required_variable_names-i.yaml000064400000000341150403633670021274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Contributors/Contributor/cdesc-Contributor.yaml000064400000000372150403633700024574 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Contributors::Contributor
includes: []

instance_methods: []

name: Contributor
superclass: ContributorBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Contributors/to_feed-i.yaml000064400000000327150403633710020525 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Contributors#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Contributors/cdesc-Contributors.yaml000064400000000436150403633710022447 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Contributors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Contributors
superclass: ContributorsBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/to_feed-i.yaml000064400000000303150403633710016022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Content/to_feed-i.yaml000064400000000322150403633720017436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Content#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Content/cdesc-Content.yaml000064400000000417150403633730020302 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Content
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Content
superclass: ContentBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Rights/to_feed-i.yaml000064400000000321150403633730017264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Rights#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Rights/cdesc-Rights.yaml000064400000000414150403633730017753 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Rights
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Rights
superclass: RightsBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Enclosure/cdesc-Enclosure.yaml000064400000000425150403633730021153 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Enclosure
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Enclosure
superclass: EnclosureBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Enclosure/to_feed-i.yaml000064400000000320150403633730017762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Enclosure#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Description/required_variable_names-i.yaml000064400000000356150403633730023562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Description#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Description/to_feed-i.yaml000064400000000326150403633730020314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Description#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Description/cdesc-Description.yaml000064400000000535150403633730022025 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Description
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Description
superclass: DescriptionBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Authors/Author/cdesc-Author.yaml000064400000000346150403633730021410 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Authors::Author
includes: []

instance_methods: []

name: Author
superclass: AuthorBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Authors/to_feed-i.yaml000064400000000316150403633730017455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Authors#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Authors/cdesc-Authors.yaml000064400000000417150403633730020330 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Authors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Authors
superclass: AuthorsBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Categories/cdesc-Categories.yaml000064400000000430150403633740021424 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Categories/Category/cdesc-Category.yaml000064400000000357150403633740022701 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Categories::Category
includes: []

instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Categories/to_feed-i.yaml000064400000000321150403633740020112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Categories#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Guid/cdesc-Guid.yaml000064400000000406150403633740017035 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item::Guid
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Guid
superclass: GuidBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/Guid/to_feed-i.yaml000064400000000313150403633740016716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item::Guid#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Items/Item/cdesc-Item.yaml000064400000000673150403633740016161 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items::Item
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variables
name: Item
superclass: ItemBase
ri/1.8/system/RSS/Maker/RSS10/Items/Item/not_set_required_variables-i.yaml000064400000000347150403633740022033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items::Item#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Items/cdesc-Items.yaml000064400000000374150403633740015444 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Items
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Items
superclass: ItemsBase
ri/1.8/system/RSS/Maker/RSS10/Items/to_feed-i.yaml000064400000000275150403633740015137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Items#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Title/required_variable_names-i.yaml000064400000000344150403633750021750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Title#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Channel/Title/cdesc-Title.yaml000064400000000507150403633750017013 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Title
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Title
superclass: TitleBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Title/to_feed-i.yaml000064400000000317150403633750016505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Title#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Links/Link/required_variable_names-i.yaml000064400000000352150403633750022643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Links::Link#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Channel/Links/Link/to_feed-i.yaml000064400000000325150403633750017400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Links::Link#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Links/Link/cdesc-Link.yaml000064400000000513150403633750017520 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Links::Link
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Links/cdesc-Links.yaml000064400000000405150403633750017006 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Links
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Links/to_feed-i.yaml000064400000000317150403633750016504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Links#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/setup_textinput-i.yaml000064400000000320150403633750017275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel#setup_textinput
is_singleton: false
name: setup_textinput
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Channel/Copyright/to_feed-i.yaml000064400000000323150403633750017371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Copyright#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Copyright/cdesc-Copyright.yaml000064400000000421150403633750020564 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Copyright
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Copyright
superclass: CopyrightBase
ri/1.8/system/RSS/Maker/RSS10/Channel/required_variable_names-i.yaml000064400000000335150403633750020667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Channel/SkipHours/cdesc-SkipHours.yaml000064400000000421150403633750020522 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::SkipHours
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: SkipHours
superclass: SkipHoursBase
ri/1.8/system/RSS/Maker/RSS10/Channel/SkipHours/Hour/cdesc-Hour.yaml000064400000000336150403633750020432 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::SkipHours::Hour
includes: []

instance_methods: []

name: Hour
superclass: HourBase
ri/1.8/system/RSS/Maker/RSS10/Channel/SkipHours/to_feed-i.yaml000064400000000314150403633750017350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::SkipHours#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Contributors/Contributor/cdesc-Contributor.yaml000064400000000366150403633760024176 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Contributors::Contributor
includes: []

instance_methods: []

name: Contributor
superclass: ContributorBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Contributors/to_feed-i.yaml000064400000000326150403633770020123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Contributors#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Contributors/cdesc-Contributors.yaml000064400000000432150403633770022042 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Contributors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Contributors
superclass: ContributorsBase
ri/1.8/system/RSS/Maker/RSS10/Channel/setup_items-i.yaml000064400000000310150403633770016353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel#setup_items
is_singleton: false
name: setup_items
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Channel/cdesc-Channel.yaml000064400000001057150403634000016207 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: setup_image
- !ruby/object:RI::MethodSummary 
  name: setup_items
- !ruby/object:RI::MethodSummary 
  name: setup_textinput
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Channel
superclass: ChannelBase
ri/1.8/system/RSS/Maker/RSS10/Channel/to_feed-i.yaml000064400000000277150403634000015416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Cloud/to_feed-i.yaml000064400000000310150403634010016451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Cloud#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Cloud/cdesc-Cloud.yaml000064400000000405150403634010016750 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Cloud
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Cloud
superclass: CloudBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Generator/cdesc-Generator.yaml000064400000000421150403634020020507 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Generator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Generator/to_feed-i.yaml000064400000000323150403634030017337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Generator#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Description/required_variable_names-i.yaml000064400000000352150403634030023141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Description#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Channel/Description/to_feed-i.yaml000064400000000325150403634040017677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Description#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Description/cdesc-Description.yaml000064400000000531150403634040021405 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Description
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Description
superclass: DescriptionBase
ri/1.8/system/RSS/Maker/RSS10/Channel/SkipDays/Day/cdesc-Day.yaml000064400000000332150403634050017620 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::SkipDays::Day
includes: []

instance_methods: []

name: Day
superclass: DayBase
ri/1.8/system/RSS/Maker/RSS10/Channel/SkipDays/to_feed-i.yaml000064400000000313150403634060017142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::SkipDays#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/SkipDays/cdesc-SkipDays.yaml000064400000000416150403634060020121 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::SkipDays
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: SkipDays
superclass: SkipDaysBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Authors/Author/to_feed-i.yaml000064400000000331150403634070020303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Authors::Author#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Authors/Author/cdesc-Author.yaml000064400000000421150403634100020763 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Authors::Author
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Author
superclass: AuthorBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Authors/to_feed-i.yaml000064400000000321150403634100017032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Authors#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/Authors/cdesc-Authors.yaml000064400000000413150403634110017706 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Authors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Authors
superclass: AuthorsBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Categories/cdesc-Categories.yaml000064400000000424150403634110021010 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Categories/Category/cdesc-Category.yaml000064400000000353150403634120022257 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Channel::Categories::Category
includes: []

instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/RSS10/Channel/Categories/to_feed-i.yaml000064400000000315150403634120017477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel::Categories#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Channel/not_set_required_variables-i.yaml000064400000000343150403634130021412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Channel/setup_image-i.yaml000064400000000310150403634130016303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Channel#setup_image
is_singleton: false
name: setup_image
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS10/cdesc-RSS10.yaml000064400000000531150403634140014100 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Maker::RSS10
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: make_feed
- !ruby/object:RI::MethodSummary 
  name: setup_elements
name: RSS10
superclass: RSSBase
ri/1.8/system/RSS/Maker/RSS10/Image/cdesc-Image.yaml000064400000000662150403634140015341 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Image
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variables
name: Image
superclass: ImageBase
ri/1.8/system/RSS/Maker/RSS10/Image/variables-i.yaml000064400000000277150403634150015441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Image#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Image/required_variable_names-i.yaml000064400000000333150403634150020332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Image#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Image/have_required_values%3f-i.yaml000064400000000326150403634160020165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Image#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Image/to_feed-i.yaml000064400000000275150403634160015075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Image#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Textinput/cdesc-Textinput.yaml000064400000000612150403634170017303 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS10::Textinput
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Textinput
superclass: TextinputBase
ri/1.8/system/RSS/Maker/RSS10/Textinput/required_variable_names-i.yaml000064400000000337150403634170021322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Textinput#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS10/Textinput/have_required_values%3f-i.yaml000064400000000332150403634200021137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Textinput#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/RSS10/Textinput/to_feed-i.yaml000064400000000301150403634200016040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::Textinput#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS10/new-c.yaml000064400000000275150403634210013225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10::new
is_singleton: true
name: new
params: (feed_version="1.0")
visibility: public
ri/1.8/system/RSS/Maker/RSS10/setup_elements-i.yaml000064400000000305150403634210015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10#setup_elements
is_singleton: false
name: setup_elements
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS10/make_feed-i.yaml000064400000000270150403634210014335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS10#make_feed
is_singleton: false
name: make_feed
params: ()
visibility: private
ri/1.8/system/RSS/Maker/AtomPersons/def_atom_persons-i.yaml000064400000000356150403634220017434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomPersons#def_atom_persons
is_singleton: false
name: def_atom_persons
params: (klass, name, maker_name, plural=nil)
visibility: public
ri/1.8/system/RSS/Maker/AtomPersons/cdesc-AtomPersons.yaml000064400000000401150403634230017200 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::AtomPersons
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_atom_persons
name: AtomPersons
superclass: 
ri/1.8/system/RSS/Maker/versions-c.yaml000064400000000256150403634230013475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::versions
is_singleton: true
name: versions
params: ()
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Title/required_variable_names-i.yaml000064400000000350150403634240022357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Title#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Title/cdesc-Title.yaml000064400000000513150403634240017422 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Title
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Title
superclass: TitleBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Title/to_feed-i.yaml000064400000000320150403634240017111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Title#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Links/Link/required_variable_names-i.yaml000064400000000356150403634250023262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Links::Link#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Links/Link/to_feed-i.yaml000064400000000326150403634260020015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Links::Link#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Links/Link/cdesc-Link.yaml000064400000000517150403634260020140 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Links::Link
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Links/cdesc-Links.yaml000064400000000411150403634260017417 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Links
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Links/to_feed-i.yaml000064400000000320150403634270017113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Links#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Title/cdesc-Title.yaml000064400000000421150403634300020655 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Title
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Title
superclass: TitleBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Title/to_feed-i.yaml000064400000000324150403634300020352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Title#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Links/Link/cdesc-Link.yaml000064400000000346150403634320021375 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Links::Link
includes: []

instance_methods: []

name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Links/cdesc-Links.yaml000064400000000421150403634320020655 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Links
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Links/to_feed-i.yaml000064400000000324150403634330020354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Links#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Subtitle/cdesc-Subtitle.yaml000064400000000432150403634340022107 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Subtitle
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Subtitle
superclass: SubtitleBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Subtitle/to_feed-i.yaml000064400000000327150403634340021073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Subtitle#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Logo/cdesc-Logo.yaml000064400000000416150403634350020324 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Logo
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Logo
superclass: LogoBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Logo/to_feed-i.yaml000064400000000323150403634360020176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Logo#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Contributors/Contributor/cdesc-Contributor.yaml000064400000000402150403634370026042 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Contributors::Contributor
includes: []

instance_methods: []

name: Contributor
superclass: ContributorBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Contributors/to_feed-i.yaml000064400000000333150403634370021775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Contributors#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Contributors/cdesc-Contributors.yaml000064400000000446150403634400023715 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Contributors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Contributors
superclass: ContributorsBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/to_feed-i.yaml000064400000000315150403634400017272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Rights/to_feed-i.yaml000064400000000325150403634410020534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Rights#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Rights/cdesc-Rights.yaml000064400000000424150403634410021220 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Rights
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Rights
superclass: RightsBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Generator/cdesc-Generator.yaml000064400000000435150403634420022377 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Generator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Generator/to_feed-i.yaml000064400000000330150403634420021217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Generator#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/cdesc-Source.yaml000064400000000414150403634430017761 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Source
superclass: SourceBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Icon/to_feed-i.yaml000064400000000323150403634440020165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Icon#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Icon/cdesc-Icon.yaml000064400000000416150403634440020304 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Icon
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Icon
superclass: IconBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Authors/Author/cdesc-Author.yaml000064400000000356150403634460022662 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Authors::Author
includes: []

instance_methods: []

name: Author
superclass: AuthorBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Authors/to_feed-i.yaml000064400000000326150403634470020730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Authors#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Authors/cdesc-Authors.yaml000064400000000427150403634470021603 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Authors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Authors
superclass: AuthorsBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Categories/cdesc-Categories.yaml000064400000000440150403634500022670 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Categories/Category/cdesc-Category.yaml000064400000000367150403634510024146 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Source::Categories::Category
includes: []

instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Source/Categories/to_feed-i.yaml000064400000000331150403634510021357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Source::Categories#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/required_variable_names-i.yaml000064400000000341150403634520021277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Contributors/Contributor/cdesc-Contributor.yaml000064400000000372150403634530024606 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Contributors::Contributor
includes: []

instance_methods: []

name: Contributor
superclass: ContributorBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Contributors/to_feed-i.yaml000064400000000327150403634530020536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Contributors#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Contributors/cdesc-Contributors.yaml000064400000000436150403634540022461 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Contributors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Contributors
superclass: ContributorsBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/to_feed-i.yaml000064400000000303150403634540016034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Content/to_feed-i.yaml000064400000000322150403634550017450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Content#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Content/cdesc-Content.yaml000064400000000417150403634550020313 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Content
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Content
superclass: ContentBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Rights/to_feed-i.yaml000064400000000321150403634560017276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Rights#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Rights/cdesc-Rights.yaml000064400000000414150403634560017765 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Rights
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Rights
superclass: RightsBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Enclosure/cdesc-Enclosure.yaml000064400000000425150403634570021166 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Enclosure
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Enclosure
superclass: EnclosureBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Enclosure/to_feed-i.yaml000064400000000320150403634570017775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Enclosure#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Description/required_variable_names-i.yaml000064400000000356150403634600023567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Description#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Description/to_feed-i.yaml000064400000000326150403634600020321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Description#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Description/cdesc-Description.yaml000064400000000535150403634610022033 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Description
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Description
superclass: DescriptionBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Authors/Author/cdesc-Author.yaml000064400000000346150403634620021417 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Authors::Author
includes: []

instance_methods: []

name: Author
superclass: AuthorBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Authors/to_feed-i.yaml000064400000000316150403634620017464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Authors#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Authors/cdesc-Authors.yaml000064400000000417150403634630020340 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Authors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Authors
superclass: AuthorsBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Categories/cdesc-Categories.yaml000064400000000430150403634640021434 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Categories/Category/cdesc-Category.yaml000064400000000357150403634640022711 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Categories::Category
includes: []

instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Categories/to_feed-i.yaml000064400000000321150403634650020123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Categories#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Guid/cdesc-Guid.yaml000064400000000406150403634660017047 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item::Guid
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Guid
superclass: GuidBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/Guid/to_feed-i.yaml000064400000000313150403634660016730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item::Guid#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Items/Item/cdesc-Item.yaml000064400000000607150403634660016170 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items::Item
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Item
superclass: ItemBase
ri/1.8/system/RSS/Maker/RSS09/Items/Item/not_set_required_variables-i.yaml000064400000000347150403634670022046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items::Item#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Items/cdesc-Items.yaml000064400000000374150403634670015457 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Items
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Items
superclass: ItemsBase
ri/1.8/system/RSS/Maker/RSS09/Items/to_feed-i.yaml000064400000000275150403634700015144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Items#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Title/required_variable_names-i.yaml000064400000000344150403634710021755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Title#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/Title/cdesc-Title.yaml000064400000000507150403634710017020 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Title
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Title
superclass: TitleBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Title/to_feed-i.yaml000064400000000317150403634710016512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Title#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Links/Link/required_variable_names-i.yaml000064400000000352150403634720022651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Links::Link#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/Links/Link/to_feed-i.yaml000064400000000325150403634730017407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Links::Link#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Links/Link/cdesc-Link.yaml000064400000000513150403634730017527 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Links::Link
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Links/cdesc-Links.yaml000064400000000405150403634740017016 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Links
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Links/to_feed-i.yaml000064400000000317150403634740016514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Links#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/setup_textinput-i.yaml000064400000000320150403634740017305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel#setup_textinput
is_singleton: false
name: setup_textinput
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/variables-i.yaml000064400000000301150403634750015771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/Copyright/required_variable_names-i.yaml000064400000000350150403634760022646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Copyright#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/Copyright/to_feed-i.yaml000064400000000323150403634760017403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Copyright#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Copyright/cdesc-Copyright.yaml000064400000000523150403634770020602 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Copyright
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Copyright
superclass: CopyrightBase
ri/1.8/system/RSS/Maker/RSS09/Channel/required_variable_names-i.yaml000064400000000335150403634770020702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipHours/cdesc-SkipHours.yaml000064400000000421150403635000020520 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::SkipHours
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: SkipHours
superclass: SkipHoursBase
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipHours/Hour/required_variable_names-i.yaml000064400000000356150403635010023535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::SkipHours::Hour#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipHours/Hour/to_feed-i.yaml000064400000000327150403635010020270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::SkipHours::Hour#to_feed
is_singleton: false
name: to_feed
params: (rss, hours)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipHours/Hour/cdesc-Hour.yaml000064400000000517150403635010020432 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::SkipHours::Hour
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Hour
superclass: HourBase
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipHours/to_feed-i.yaml000064400000000323150403635020017350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::SkipHours#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Contributors/Contributor/cdesc-Contributor.yaml000064400000000366150403635030024176 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Contributors::Contributor
includes: []

instance_methods: []

name: Contributor
superclass: ContributorBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Contributors/to_feed-i.yaml000064400000000326150403635030020122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Contributors#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Contributors/cdesc-Contributors.yaml000064400000000432150403635040022042 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Contributors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Contributors
superclass: ContributorsBase
ri/1.8/system/RSS/Maker/RSS09/Channel/setup_items-i.yaml000064400000000310150403635040016353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel#setup_items
is_singleton: false
name: setup_items
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/cdesc-Channel.yaml000064400000001143150403635040016220 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: setup_image
- !ruby/object:RI::MethodSummary 
  name: setup_items
- !ruby/object:RI::MethodSummary 
  name: setup_textinput
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variables
name: Channel
superclass: ChannelBase
ri/1.8/system/RSS/Maker/RSS09/Channel/to_feed-i.yaml000064400000000277150403635040015433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Cloud/to_feed-i.yaml000064400000000310150403635040016465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Cloud#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Cloud/cdesc-Cloud.yaml000064400000000405150403635050016765 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Cloud
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Cloud
superclass: CloudBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Generator/cdesc-Generator.yaml000064400000000421150403635050020523 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Generator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Generator/to_feed-i.yaml000064400000000323150403635060017353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Generator#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Description/required_variable_names-i.yaml000064400000000352150403635060023155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Description#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/Description/to_feed-i.yaml000064400000000325150403635070017713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Description#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Description/cdesc-Description.yaml000064400000000531150403635070021421 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Description
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Description
superclass: DescriptionBase
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipDays/Day/required_variable_names-i.yaml000064400000000354150403635100023133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::SkipDays::Day#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipDays/Day/cdesc-Day.yaml000064400000000513150403635100017626 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::SkipDays::Day
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Day
superclass: DayBase
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipDays/Day/to_feed-i.yaml000064400000000324150403635100017665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::SkipDays::Day#to_feed
is_singleton: false
name: to_feed
params: (rss, days)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipDays/to_feed-i.yaml000064400000000322150403635100017146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::SkipDays#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/SkipDays/cdesc-SkipDays.yaml000064400000000416150403635100020125 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::SkipDays
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: SkipDays
superclass: SkipDaysBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Authors/Author/to_feed-i.yaml000064400000000331150403635100020306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Authors::Author#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Authors/Author/cdesc-Author.yaml000064400000000421150403635100020774 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Authors::Author
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Author
superclass: AuthorBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Authors/to_feed-i.yaml000064400000000321150403635100017043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Authors#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/Authors/cdesc-Authors.yaml000064400000000413150403635100017716 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Authors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Authors
superclass: AuthorsBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Categories/cdesc-Categories.yaml000064400000000424150403635110021021 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Categories/Category/cdesc-Category.yaml000064400000000353150403635110022267 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Channel::Categories::Category
includes: []

instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/RSS09/Channel/Categories/to_feed-i.yaml000064400000000315150403635120017510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel::Categories#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Channel/not_set_required_variables-i.yaml000064400000000343150403635120021422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Channel/setup_image-i.yaml000064400000000310150403635120016313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Channel#setup_image
is_singleton: false
name: setup_image
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Image/cdesc-Image.yaml000064400000000572150403635120015350 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Image
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_element?
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Image
superclass: ImageBase
ri/1.8/system/RSS/Maker/RSS09/Image/required_variable_names-i.yaml000064400000000333150403635120020340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Image#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Image/required_element%3f-i.yaml000064400000000317150403635120017321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Image#required_element?
is_singleton: false
name: required_element?
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Image/to_feed-i.yaml000064400000000275150403635120015102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Image#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/Textinput/cdesc-Textinput.yaml000064400000000512150403635120017306 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS09::Textinput
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Textinput
superclass: TextinputBase
ri/1.8/system/RSS/Maker/RSS09/Textinput/required_variable_names-i.yaml000064400000000337150403635130021327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Textinput#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS09/Textinput/to_feed-i.yaml000064400000000301150403635130016053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::Textinput#to_feed
is_singleton: false
name: to_feed
params: (rss)
visibility: public
ri/1.8/system/RSS/Maker/RSS09/new-c.yaml000064400000000276150403635130013240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09::new
is_singleton: true
name: new
params: (feed_version="0.92")
visibility: public
ri/1.8/system/RSS/Maker/RSS09/cdesc-RSS09.yaml000064400000000531150403635130014120 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Maker::RSS09
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: make_feed
- !ruby/object:RI::MethodSummary 
  name: setup_elements
name: RSS09
superclass: RSSBase
ri/1.8/system/RSS/Maker/RSS09/setup_elements-i.yaml000064400000000305150403635130015502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09#setup_elements
is_singleton: false
name: setup_elements
params: (rss)
visibility: private
ri/1.8/system/RSS/Maker/RSS09/make_feed-i.yaml000064400000000270150403635140014350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS09#make_feed
is_singleton: false
name: make_feed
params: ()
visibility: private
ri/1.8/system/RSS/Maker/TextinputBase/cdesc-TextinputBase.yaml000064400000000413150403635140020056 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::TextinputBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: []

name: TextinputBase
superclass: Object
ri/1.8/system/RSS/Maker/RSSBase/make-c.yaml000064400000000276150403635140014007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSSBase::make
is_singleton: true
name: make
params: (version, &block)
visibility: public
ri/1.8/system/RSS/Maker/RSSBase/new-c.yaml000064400000000271150403635140013656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSSBase::new
is_singleton: true
name: new
params: (feed_version)
visibility: public
ri/1.8/system/RSS/Maker/RSSBase/cdesc-RSSBase.yaml000064400000001412150403635140015164 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: encoding
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: feed_version
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: standalone
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: version
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: make
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Maker::RSSBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: make
- !ruby/object:RI::MethodSummary 
  name: make_xml_stylesheets
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: RSSBase
superclass: Object
ri/1.8/system/RSS/Maker/RSSBase/to_feed-i.yaml000064400000000265150403635140014503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSSBase#to_feed
is_singleton: false
name: to_feed
params: ()
visibility: public
ri/1.8/system/RSS/Maker/RSSBase/make_xml_stylesheets-i.yaml000064400000000320150403635140017317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSSBase#make_xml_stylesheets
is_singleton: false
name: make_xml_stylesheets
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSSBase/make-i.yaml000064400000000302150403635140014003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (self)
comment: 
full_name: RSS::Maker::RSSBase#make
is_singleton: false
name: make
params: () {|self| ...}
visibility: public
ri/1.8/system/RSS/Maker/TrackBackModel/append_features-c.yaml000064400000000321150403635140017572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TrackBackModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/TrackBackModel/cdesc-TrackBackModel.yaml000064400000000406150403635150020077 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::TrackBackModel
includes: []

instance_methods: []

name: TrackBackModel
superclass: 
ri/1.8/system/RSS/Maker/TrackBackModel/TrackBackAboutsBase/cdesc-TrackBackAboutsBase.yaml000064400000000355150403635150024670 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::TrackBackModel::TrackBackAboutsBase
includes: []

instance_methods: []

name: TrackBackAboutsBase
superclass: Base
RSS/Maker/TrackBackModel/TrackBackAboutsBase/TrackBackAboutBase/have_required_values%3f-i.yaml000064400000000401150403635150030265 0ustar00ri/1.8/system--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TrackBackModel::TrackBackAboutsBase::TrackBackAboutBase#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/TrackBackModel/TrackBackAboutsBase/TrackBackAboutBase/to_feed-i.yaml000064400000000362150403635150025257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TrackBackModel::TrackBackAboutsBase::TrackBackAboutBase#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
system/RSS/Maker/TrackBackModel/TrackBackAboutsBase/TrackBackAboutBase/cdesc-TrackBackAboutBase.yaml000064400000000655150403635150030044 0ustar00ri/1.8--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::TrackBackModel::TrackBackAboutsBase::TrackBackAboutBase
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: TrackBackAboutBase
superclass: Base
ri/1.8/system/RSS/Maker/SlashModel/cdesc-SlashModel.yaml000064400000000376150403635150016557 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::SlashModel
includes: []

instance_methods: []

name: SlashModel
superclass: 
ri/1.8/system/RSS/Maker/SlashModel/append_features-c.yaml000064400000000315150403635160017024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::SlashModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/AtomTextConstruct/variables-i.yaml000064400000000304150403635160017252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstruct#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/AtomTextConstruct/def_atom_text_construct-c.yaml000064400000000433150403635160022225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstruct::def_atom_text_construct
is_singleton: true
name: def_atom_text_construct
params: (klass, name, maker_name, klass_name=nil, atom_klass_name=nil)
visibility: public
ri/1.8/system/RSS/Maker/AtomTextConstruct/cdesc-AtomTextConstruct.yaml000064400000000607150403635160021613 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_atom_text_construct
comment: 
constants: []

full_name: RSS::Maker::AtomTextConstruct
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: variables
name: AtomTextConstruct
superclass: 
ri/1.8/system/RSS/Maker/AtomTextConstruct/required_variable_names-i.yaml000064400000000340150403635160022152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::AtomTextConstruct#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/SetupDefaultDate/_set_default_values-i.yaml000064400000000335150403635160021054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::SetupDefaultDate#_set_default_values
is_singleton: false
name: _set_default_values
params: (&block)
visibility: private
ri/1.8/system/RSS/Maker/SetupDefaultDate/_parse_date_if_needed-i.yaml000064400000000345150403635160021270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::SetupDefaultDate#_parse_date_if_needed
is_singleton: false
name: _parse_date_if_needed
params: (date_value)
visibility: private
ri/1.8/system/RSS/Maker/SetupDefaultDate/cdesc-SetupDefaultDate.yaml000064400000000516150403635160021074 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::SetupDefaultDate
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _parse_date_if_needed
- !ruby/object:RI::MethodSummary 
  name: _set_default_values
name: SetupDefaultDate
superclass: 
ri/1.8/system/RSS/Maker/Atom/Feed/cdesc-Feed.yaml000064400000000535150403635170015076 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: make_feed
- !ruby/object:RI::MethodSummary 
  name: setup_elements
name: Feed
superclass: RSSBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Links/Link/not_set_name-c.yaml000064400000000334150403635170022000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Links::Link::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Links/Link/cdesc-Link.yaml000064400000000510150403635170021055 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Links::Link
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomLink
instance_methods: []

name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Links/cdesc-Links.yaml000064400000000337150403635170020352 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Links
includes: []

instance_methods: []

name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Links/Link/not_set_name-c.yaml000064400000000344150403635170023241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Links::Link::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Links/Link/cdesc-Link.yaml000064400000000520150403635170022316 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Links::Link
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomLink
instance_methods: []

name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Links/cdesc-Links.yaml000064400000000347150403635200021605 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Links
includes: []

instance_methods: []

name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/variables-i.yaml000064400000000322150403635200020555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/required_variable_names-i.yaml000064400000000356150403635210023465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Logo/cdesc-Logo.yaml000064400000000511150403635210021237 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Logo
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomLogo
instance_methods: []

name: Logo
superclass: LogoBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Logo/not_set_name-c.yaml000064400000000335150403635220022160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Logo::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/to_feed-i.yaml000064400000000332150403635220020215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Generator/cdesc-Generator.yaml000064400000000535150403635220023322 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Generator
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomGenerator
instance_methods: []

name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Generator/not_set_name-c.yaml000064400000000342150403635230023205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Generator::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/cdesc-Source.yaml000064400000000607150403635230020707 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variables
name: Source
superclass: SourceBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Icon/required_variable_names-i.yaml000064400000000364150403635240024357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Icon#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Icon/to_feed-i.yaml000064400000000340150403635240021106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Icon#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Icon/cdesc-Icon.yaml000064400000000525150403635240021227 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Icon
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Icon
superclass: IconBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Categories/cdesc-Categories.yaml000064400000000366150403635240023624 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Categories
includes: []

instance_methods: []

name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Categories/Category/cdesc-Category.yaml000064400000000545150403635240025070 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Categories::Category
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomCategory
instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Source/Categories/Category/not_set_name-c.yaml000064400000000355150403635240025126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Source::Categories::Category::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/_set_default_values-i.yaml000064400000000344150403635240021372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item#_set_default_values
is_singleton: false
name: _set_default_values
params: (&block)
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/variables-i.yaml000064400000000312150403635240017320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/required_variable_names-i.yaml000064400000000346150403635250022230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/have_required_values%3f-i.yaml000064400000000341150403635250022053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/to_feed-i.yaml000064400000000311150403635250016755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item#to_feed
is_singleton: false
name: to_feed
params: (feed)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Content/variables-i.yaml000064400000000323150403635250020735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Content#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Content/required_variable_names-i.yaml000064400000000357150403635250023644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Content#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Content/xml_type%3f-i.yaml000064400000000323150403635250021124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Content#xml_type?
is_singleton: false
name: xml_type?
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Content/to_feed-i.yaml000064400000000333150403635250020373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Content#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Content/cdesc-Content.yaml000064400000000676150403635260021244 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Content
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variables
- !ruby/object:RI::MethodSummary 
  name: xml_type?
name: Content
superclass: ContentBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Enclosure/cdesc-Enclosure.yaml000064400000000432150403635260022104 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Enclosure
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Enclosure
superclass: EnclosureBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Enclosure/to_feed-i.yaml000064400000000335150403635260020723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Enclosure#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Categories/cdesc-Categories.yaml000064400000000356150403635270022366 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Categories
includes: []

instance_methods: []

name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Categories/Category/cdesc-Category.yaml000064400000000535150403635270023632 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Categories::Category
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomCategory
instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Categories/Category/not_set_name-c.yaml000064400000000345150403635270023670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Categories::Category::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Guid/cdesc-Guid.yaml000064400000000413150403635270017766 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item::Guid
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Guid
superclass: GuidBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/Guid/to_feed-i.yaml000064400000000330150403635270017650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item::Guid#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/cdesc-Item.yaml000064400000001076150403635270017112 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items::Item
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set_default_values
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variables
name: Item
superclass: ItemBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/Item/not_set_required_variables-i.yaml000064400000000354150403635270022764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items::Item#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Items/cdesc-Items.yaml000064400000000401150403635300016360 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Items
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Items
superclass: ItemsBase
ri/1.8/system/RSS/Maker/Atom/Feed/Items/to_feed-i.yaml000064400000000303150403635300016054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Items#to_feed
is_singleton: false
name: to_feed
params: (feed)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Links/Link/not_set_name-c.yaml000064400000000330150403635320021362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel::Links::Link::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Links/Link/cdesc-Link.yaml000064400000000504150403635320020446 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::Links::Link
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomLink
instance_methods: []

name: Link
superclass: LinkBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Links/cdesc-Links.yaml000064400000000333150403635330017735 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::Links
includes: []

instance_methods: []

name: Links
superclass: LinksBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/_set_default_values-i.yaml000064400000000340150403635330020757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel#_set_default_values
is_singleton: false
name: _set_default_values
params: (&block)
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/variables-i.yaml000064400000000306150403635330016714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/required_variable_names-i.yaml000064400000000342150403635340021615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/variable_is_set%3f-i.yaml000064400000000324150403635340020376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel#variable_is_set?
is_singleton: false
name: variable_is_set?
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/SkipHours/cdesc-SkipHours.yaml000064400000000426150403635350021460 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::SkipHours
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: SkipHours
superclass: SkipHoursBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/SkipHours/Hour/cdesc-Hour.yaml000064400000000343150403635360021362 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::SkipHours::Hour
includes: []

instance_methods: []

name: Hour
superclass: HourBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/SkipHours/to_feed-i.yaml000064400000000321150403635360020300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel::SkipHours#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/have_required_values%3f-i.yaml000064400000000335150403635360021451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/cdesc-Channel.yaml000064400000001173150403635370017154 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set_default_values
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variable_is_set?
- !ruby/object:RI::MethodSummary 
  name: variables
name: Channel
superclass: ChannelBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/to_feed-i.yaml000064400000000305150403635370016354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel#to_feed
is_singleton: false
name: to_feed
params: (feed)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Cloud/to_feed-i.yaml000064400000000315150403635400017415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel::Cloud#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Cloud/cdesc-Cloud.yaml000064400000000412150403635400017705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::Cloud
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Cloud
superclass: CloudBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Generator/cdesc-Generator.yaml000064400000000521150403635410021447 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::Generator
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomGenerator
instance_methods: []

name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Generator/not_set_name-c.yaml000064400000000326150403635420021341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel::Generator::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/SkipDays/Day/cdesc-Day.yaml000064400000000337150403635430020563 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::SkipDays::Day
includes: []

instance_methods: []

name: Day
superclass: DayBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/SkipDays/to_feed-i.yaml000064400000000320150403635430020075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel::SkipDays#to_feed
is_singleton: false
name: to_feed
params: (*args)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/SkipDays/cdesc-SkipDays.yaml000064400000000423150403635430021054 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::SkipDays
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: SkipDays
superclass: SkipDaysBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Categories/cdesc-Categories.yaml000064400000000352150403635440021752 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::Categories
includes: []

instance_methods: []

name: Categories
superclass: CategoriesBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Categories/Category/cdesc-Category.yaml000064400000000531150403635450023217 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Channel::Categories::Category
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomCategory
instance_methods: []

name: Category
superclass: CategoryBase
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/Categories/Category/not_set_name-c.yaml000064400000000341150403635450023255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel::Categories::Category::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Channel/not_set_required_variables-i.yaml000064400000000350150403635460022352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Channel#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Image/cdesc-Image.yaml000064400000000503150403635460016274 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Image
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Image
superclass: ImageBase
ri/1.8/system/RSS/Maker/Atom/Feed/Image/required_variable_names-i.yaml000064400000000340150403635470021271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Image#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/Image/to_feed-i.yaml000064400000000303150403635470016025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::Image#to_feed
is_singleton: false
name: to_feed
params: (feed)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/Textinput/cdesc-Textinput.yaml000064400000000336150403635500020237 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Feed::Textinput
includes: []

instance_methods: []

name: Textinput
superclass: TextinputBase
ri/1.8/system/RSS/Maker/Atom/Feed/new-c.yaml000064400000000302150403635500014152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed::new
is_singleton: true
name: new
params: (feed_version="1.0")
visibility: public
ri/1.8/system/RSS/Maker/Atom/Feed/setup_elements-i.yaml000064400000000313150403635510016426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed#setup_elements
is_singleton: false
name: setup_elements
params: (feed)
visibility: private
ri/1.8/system/RSS/Maker/Atom/Feed/make_feed-i.yaml000064400000000275150403635510015301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Feed#make_feed
is_singleton: false
name: make_feed
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Entry/cdesc-Entry.yaml000064400000000537150403635510015572 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Maker::Atom::Entry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: make_feed
- !ruby/object:RI::MethodSummary 
  name: setup_elements
name: Entry
superclass: RSSBase
ri/1.8/system/RSS/Maker/Atom/Entry/Items/Item/_set_default_values-i.yaml000064400000000345150403635510021631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Items::Item#_set_default_values
is_singleton: false
name: _set_default_values
params: (&block)
visibility: private
ri/1.8/system/RSS/Maker/Atom/Entry/Items/Item/variables-i.yaml000064400000000313150403635510017557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Items::Item#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Entry/Items/Item/required_variable_names-i.yaml000064400000000347150403635510022466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Items::Item#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Entry/Items/Item/variable_is_set%3f-i.yaml000064400000000331150403635510021240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Items::Item#variable_is_set?
is_singleton: false
name: variable_is_set?
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Entry/Items/Item/to_feed-i.yaml000064400000000313150403635510017214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Items::Item#to_feed
is_singleton: false
name: to_feed
params: (entry)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Entry/Items/Item/cdesc-Item.yaml000064400000003100150403635510017333 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Guid
  value: Feed::Items::Item::Guid
- !ruby/object:RI::Constant 
  comment: 
  name: Enclosure
  value: Feed::Items::Item::Enclosure
- !ruby/object:RI::Constant 
  comment: 
  name: Source
  value: Feed::Items::Item::Source
- !ruby/object:RI::Constant 
  comment: 
  name: Categories
  value: Feed::Items::Item::Categories
- !ruby/object:RI::Constant 
  comment: 
  name: Authors
  value: Feed::Items::Item::Authors
- !ruby/object:RI::Constant 
  comment: 
  name: Contributors
  value: Feed::Items::Item::Contributors
- !ruby/object:RI::Constant 
  comment: 
  name: Links
  value: Feed::Items::Item::Links
- !ruby/object:RI::Constant 
  comment: 
  name: Rights
  value: Feed::Items::Item::Rights
- !ruby/object:RI::Constant 
  comment: 
  name: Description
  value: Feed::Items::Item::Description
- !ruby/object:RI::Constant 
  comment: 
  name: Title
  value: Feed::Items::Item::Title
- !ruby/object:RI::Constant 
  comment: 
  name: Content
  value: Feed::Items::Item::Content
full_name: RSS::Maker::Atom::Entry::Items::Item
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set_default_values
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
- !ruby/object:RI::MethodSummary 
  name: variable_is_set?
- !ruby/object:RI::MethodSummary 
  name: variables
name: Item
superclass: ItemBase
ri/1.8/system/RSS/Maker/Atom/Entry/Items/Item/not_set_required_variables-i.yaml000064400000000355150403635520023221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Items::Item#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/Entry/Items/cdesc-Items.yaml000064400000000402150403635520016623 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Items
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Items
superclass: ItemsBase
ri/1.8/system/RSS/Maker/Atom/Entry/Items/to_feed-i.yaml000064400000000305150403635520016320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Items#to_feed
is_singleton: false
name: to_feed
params: (entry)
visibility: public
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/SkipHours/cdesc-SkipHours.yaml000064400000000350150403635520021711 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Channel::SkipHours
includes: []

instance_methods: []

name: SkipHours
superclass: SkipHoursBase
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/SkipHours/Hour/cdesc-Hour.yaml000064400000000344150403635520021617 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Channel::SkipHours::Hour
includes: []

instance_methods: []

name: Hour
superclass: HourBase
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/cdesc-Channel.yaml000064400000001370150403635520017406 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Categories
  value: Feed::Channel::Categories
- !ruby/object:RI::Constant 
  comment: 
  name: Links
  value: Feed::Channel::Links
- !ruby/object:RI::Constant 
  comment: 
  name: Authors
  value: Feed::Channel::Authors
- !ruby/object:RI::Constant 
  comment: 
  name: Contributors
  value: Feed::Channel::Contributors
- !ruby/object:RI::Constant 
  comment: 
  name: Copyright
  value: Feed::Channel::Copyright
- !ruby/object:RI::Constant 
  comment: 
  name: Title
  value: Feed::Channel::Title
full_name: RSS::Maker::Atom::Entry::Channel
includes: []

instance_methods: []

name: Channel
superclass: ChannelBase
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/Cloud/cdesc-Cloud.yaml000064400000000334150403635520020151 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Channel::Cloud
includes: []

instance_methods: []

name: Cloud
superclass: CloudBase
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/Generator/cdesc-Generator.yaml000064400000000522150403635520021710 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_name
comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Channel::Generator
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomGenerator
instance_methods: []

name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/Generator/not_set_name-c.yaml000064400000000327150403635520021601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::Channel::Generator::not_set_name
is_singleton: true
name: not_set_name
params: ()
visibility: public
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/Description/cdesc-Description.yaml000064400000000356150403635520022607 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Channel::Description
includes: []

instance_methods: []

name: Description
superclass: DescriptionBase
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/SkipDays/Day/cdesc-Day.yaml000064400000000340150403635520021013 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Channel::SkipDays::Day
includes: []

instance_methods: []

name: Day
superclass: DayBase
ri/1.8/system/RSS/Maker/Atom/Entry/Channel/SkipDays/cdesc-SkipDays.yaml000064400000000345150403635520021315 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Channel::SkipDays
includes: []

instance_methods: []

name: SkipDays
superclass: SkipDaysBase
ri/1.8/system/RSS/Maker/Atom/Entry/Image/cdesc-Image.yaml000064400000000323150403635530016530 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Image
includes: []

instance_methods: []

name: Image
superclass: ImageBase
ri/1.8/system/RSS/Maker/Atom/Entry/Textinput/cdesc-Textinput.yaml000064400000000337150403635530020501 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom::Entry::Textinput
includes: []

instance_methods: []

name: Textinput
superclass: TextinputBase
ri/1.8/system/RSS/Maker/Atom/Entry/new-c.yaml000064400000000303150403635530014414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry::new
is_singleton: true
name: new
params: (feed_version="1.0")
visibility: public
ri/1.8/system/RSS/Maker/Atom/Entry/setup_elements-i.yaml000064400000000315150403635540016671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry#setup_elements
is_singleton: false
name: setup_elements
params: (entry)
visibility: private
ri/1.8/system/RSS/Maker/Atom/Entry/make_feed-i.yaml000064400000000276150403635540015543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::Atom::Entry#make_feed
is_singleton: false
name: make_feed
params: ()
visibility: private
ri/1.8/system/RSS/Maker/Atom/cdesc-Atom.yaml000064400000000273150403635540014270 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::Atom
includes: []

instance_methods: []

name: Atom
superclass: 
ri/1.8/system/RSS/Maker/ITunesBaseModel/def_csv_accessor-i.yaml000064400000000337150403635540020116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesBaseModel#def_csv_accessor
is_singleton: false
name: def_csv_accessor
params: (klass, full_name)
visibility: public
ri/1.8/system/RSS/Maker/ITunesBaseModel/def_yes_other_accessor-i.yaml000064400000000353150403635540021322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesBaseModel#def_yes_other_accessor
is_singleton: false
name: def_yes_other_accessor
params: (klass, full_name)
visibility: public
ri/1.8/system/RSS/Maker/ITunesBaseModel/def_elements_class_accessor-i.yaml000064400000000514150403635540022321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesBaseModel#def_elements_class_accessor
is_singleton: false
name: def_elements_class_accessor
params: (klass, name, full_name, full_plural_name, klass_name, plural_klass_name, recommended_attribute_name=nil)
visibility: public
ri/1.8/system/RSS/Maker/ITunesBaseModel/def_class_accessor-i.yaml000064400000000353150403635540020426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesBaseModel#def_class_accessor
is_singleton: false
name: def_class_accessor
params: (klass, name, type, *args)
visibility: public
ri/1.8/system/RSS/Maker/ITunesBaseModel/cdesc-ITunesBaseModel.yaml000064400000001024150403635550020432 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ITunesBaseModel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_class_accessor
- !ruby/object:RI::MethodSummary 
  name: def_csv_accessor
- !ruby/object:RI::MethodSummary 
  name: def_elements_class_accessor
- !ruby/object:RI::MethodSummary 
  name: def_yes_clean_other_accessor
- !ruby/object:RI::MethodSummary 
  name: def_yes_other_accessor
name: ITunesBaseModel
superclass: 
ri/1.8/system/RSS/Maker/ITunesBaseModel/def_yes_clean_other_accessor-i.yaml000064400000000367150403635550022472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ITunesBaseModel#def_yes_clean_other_accessor
is_singleton: false
name: def_yes_clean_other_accessor
params: (klass, full_name)
visibility: public
ri/1.8/system/RSS/Maker/add_maker-c.yaml000064400000000322150403635550013534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::add_maker
is_singleton: true
name: add_maker
params: (version, normalized_version, maker)
visibility: public
ri/1.8/system/RSS/Maker/TaxonomyTopicsModel/append_features-c.yaml000064400000000326150403635550020757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TaxonomyTopicsModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/TaxonomyTopicsModel/install_taxo_topics-c.yaml000064400000000336150403635550021675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::TaxonomyTopicsModel::install_taxo_topics
is_singleton: true
name: install_taxo_topics
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/TaxonomyTopicsModel/TaxonomyTopicsBase/cdesc-TaxonomyTopicsBase.yaml000064400000000461150403635560026040 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: resources
  rw: R
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::TaxonomyTopicsModel::TaxonomyTopicsBase
includes: []

instance_methods: []

name: TaxonomyTopicsBase
superclass: Base
ri/1.8/system/RSS/Maker/TaxonomyTopicsModel/cdesc-TaxonomyTopicsModel.yaml000064400000000516150403635560022434 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: install_taxo_topics
comment: 
constants: []

full_name: RSS::Maker::TaxonomyTopicsModel
includes: []

instance_methods: []

name: TaxonomyTopicsModel
superclass: 
ri/1.8/system/RSS/Maker/ItemsBase/sort_if_need-i.yaml000064400000000302150403635570016147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase#sort_if_need
is_singleton: false
name: sort_if_need
params: ()
visibility: private
ri/1.8/system/RSS/Maker/ItemsBase/normalize-i.yaml000064400000000273150403635600015510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase#normalize
is_singleton: false
name: normalize
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/new-c.yaml000064400000000264150403635600014273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::new
is_singleton: true
name: new
params: (maker)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/xml_content%3d-i.yaml000064400000000407150403635600022233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: xml=
block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#xml_content=
is_singleton: false
name: xml_content=
params: (content)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/inline_other%3f-i.yaml000064400000000332150403635600022357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#inline_other?
is_singleton: false
name: inline_other?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/xml%3d-i.yaml000064400000000415150403635600020500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #xml_content="
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#xml=
is_singleton: false
name: xml=
params: (content)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/out_of_line%3f-i.yaml000064400000000330150403635610022201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#out_of_line?
is_singleton: false
name: out_of_line?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/inline_text%3f-i.yaml000064400000000330150403635610022221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#inline_text?
is_singleton: false
name: inline_text?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/inline_xhtml%3f-i.yaml000064400000000332150403635620022374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#inline_xhtml?
is_singleton: false
name: inline_xhtml?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/inline_other_text%3f-i.yaml000064400000000344150403635620023430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#inline_other_text?
is_singleton: false
name: inline_other_text?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/inline_html%3f-i.yaml000064400000000330150403635620022202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#inline_html?
is_singleton: false
name: inline_html?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/inline_other_base64%3f-i.yaml000064400000000350150403635630023526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#inline_other_base64?
is_singleton: false
name: inline_other_base64?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/inline_other_xml%3f-i.yaml000064400000000342150403635630023243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase#inline_other_xml?
is_singleton: false
name: inline_other_xml?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ContentBase/cdesc-ContentBase.yaml000064400000001542150403635630022447 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::ContentBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase::EnsureXMLContent
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: inline_html?
- !ruby/object:RI::MethodSummary 
  name: inline_other?
- !ruby/object:RI::MethodSummary 
  name: inline_other_base64?
- !ruby/object:RI::MethodSummary 
  name: inline_other_text?
- !ruby/object:RI::MethodSummary 
  name: inline_other_xml?
- !ruby/object:RI::MethodSummary 
  name: inline_text?
- !ruby/object:RI::MethodSummary 
  name: inline_xhtml?
- !ruby/object:RI::MethodSummary 
  name: out_of_line?
- !ruby/object:RI::MethodSummary 
  name: xml=
- !ruby/object:RI::MethodSummary 
  name: xml_content=
name: ContentBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/DescriptionBase/cdesc-DescriptionBase.yaml000064400000000450150403635640024167 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::DescriptionBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: DescriptionBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/%3c%3d%3e-i.yaml000064400000000276150403635640016353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/GuidBase/cdesc-GuidBase.yaml000064400000000334150403635650021203 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::GuidBase
includes: []

instance_methods: []

name: GuidBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/date%3d-i.yaml000064400000000302150403635660016411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase#date=
is_singleton: false
name: date=
params: (_date)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/updated%3d-i.yaml000064400000000307150403635660017127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase#updated=
is_singleton: false
name: updated=
params: (date)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/TitleBase/cdesc-TitleBase.yaml000064400000000434150403635660021567 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::TitleBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: TitleBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/pubDate-i.yaml000064400000000301150403635670016564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase#pubDate
is_singleton: false
name: pubDate
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/EnclosureBase/cdesc-EnclosureBase.yaml000064400000000346150403635700023320 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::EnclosureBase
includes: []

instance_methods: []

name: EnclosureBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/ITunesDuration/cdesc-ITunesDuration.yaml000064400000000366150403635710023671 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::ITunesDuration
includes: []

instance_methods: []

name: ITunesDuration
superclass: ITunesDurationBase
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/cdesc-ItemBase.yaml000064400000002534150403635710017527 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CategoriesBase
  value: ChannelBase::CategoriesBase
- !ruby/object:RI::Constant 
  comment: 
  name: AuthorsBase
  value: ChannelBase::AuthorsBase
- !ruby/object:RI::Constant 
  comment: 
  name: LinksBase
  value: ChannelBase::LinksBase
- !ruby/object:RI::Constant 
  comment: 
  name: ContributorsBase
  value: ChannelBase::ContributorsBase
full_name: RSS::Maker::ItemsBase::ItemBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
- !ruby/object:RI::IncludedModule 
  name: TrackBackModel
- !ruby/object:RI::IncludedModule 
  name: Maker::ITunesItemModel
- !ruby/object:RI::IncludedModule 
  name: Maker::ImageItemModel
- !ruby/object:RI::IncludedModule 
  name: ContentModel
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicsModel
- !ruby/object:RI::IncludedModule 
  name: SetupDefaultDate
- !ruby/object:RI::IncludedModule 
  name: SlashModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: date=
- !ruby/object:RI::MethodSummary 
  name: pubDate
- !ruby/object:RI::MethodSummary 
  name: pubDate=
- !ruby/object:RI::MethodSummary 
  name: updated
- !ruby/object:RI::MethodSummary 
  name: updated=
name: ItemBase
superclass: Object
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/pubDate%3d-i.yaml000064400000000307150403635710017061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase#pubDate=
is_singleton: false
name: pubDate=
params: (date)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/RightsBase/cdesc-RightsBase.yaml000064400000000436150403635720022124 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::RightsBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: RightsBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/updated-i.yaml000064400000000301150403635720016622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase#updated
is_singleton: false
name: updated
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/SubtitleBase/cdesc-SubtitleBase.yaml000064400000000456150403635730025050 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase::SubtitleBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: SubtitleBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/IconBase/cdesc-IconBase.yaml000064400000000350150403635740023234 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase::IconBase
includes: []

instance_methods: []

name: IconBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/cdesc-SourceBase.yaml000064400000001623150403635740022125 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AuthorsBase
  value: ChannelBase::AuthorsBase
- !ruby/object:RI::Constant 
  comment: 
  name: CategoriesBase
  value: ChannelBase::CategoriesBase
- !ruby/object:RI::Constant 
  comment: 
  name: ContributorsBase
  value: ChannelBase::ContributorsBase
- !ruby/object:RI::Constant 
  comment: 
  name: GeneratorBase
  value: ChannelBase::GeneratorBase
- !ruby/object:RI::Constant 
  comment: 
  name: LinksBase
  value: ChannelBase::LinksBase
full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: SetupDefaultDate
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: date=
- !ruby/object:RI::MethodSummary 
  name: updated
- !ruby/object:RI::MethodSummary 
  name: updated=
name: SourceBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/date%3d-i.yaml000064400000000316150403635750020451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase#date=
is_singleton: false
name: date=
params: (_date)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/updated%3d-i.yaml000064400000000323150403635760021161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase#updated=
is_singleton: false
name: updated=
params: (date)
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/TitleBase/cdesc-TitleBase.yaml000064400000000450150403635770023622 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase::TitleBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: TitleBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/RightsBase/cdesc-RightsBase.yaml000064400000000452150403636000024145 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase::RightsBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: RightsBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/updated-i.yaml000064400000000315150403636000020652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase#updated
is_singleton: false
name: updated
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ItemsBase/ItemBase/SourceBase/LogoBase/cdesc-LogoBase.yaml000064400000000350150403636010023243 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ItemsBase::ItemBase::SourceBase::LogoBase
includes: []

instance_methods: []

name: LogoBase
superclass: Base
ri/1.8/system/RSS/Maker/ItemsBase/cdesc-ItemsBase.yaml000064400000000742150403636010016212 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: do_sort
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: max_size
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Maker::ItemsBase
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: normalize
- !ruby/object:RI::MethodSummary 
  name: sort_if_need
name: ItemsBase
superclass: Object
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Source/Links/Link/to_feed-i.yaml000064400000000340150403636040021240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Source::Links::Link#to_feed
is_singleton: false
name: to_feed
params: (rss, source)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Source/Links/Link/cdesc-Link.yaml000064400000000464150403636040021370 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Source::Links::Link
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Link
superclass: RSS09::Items::Item::Source::Links::Link
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Source/Links/cdesc-Links.yaml000064400000000451150403636050020653 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Source::Links
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Links
superclass: RSS09::Items::Item::Source::Links
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Source/Links/to_feed-i.yaml000064400000000332150403636050020345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Source::Links#to_feed
is_singleton: false
name: to_feed
params: (rss, source)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Source/required_variable_names-i.yaml000064400000000351150403636060022532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Source#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Source/to_feed-i.yaml000064400000000321150403636060017264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Source#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Source/cdesc-Source.yaml000064400000000536150403636060017760 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Source
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Source
superclass: RSS09::Items::Item::Source
ri/1.8/system/RSS/Maker/RSS20/Items/Item/variables-i.yaml000064400000000305150403636060016371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item#variables
is_singleton: false
name: variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Items/Item/required_variable_names-i.yaml000064400000000341150403636070021272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Enclosure/cdesc-Enclosure.yaml000064400000000547150403636100021153 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Enclosure
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Enclosure
superclass: RSS09::Items::Item::Enclosure
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Enclosure/required_variable_names-i.yaml000064400000000354150403636100023227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Enclosure#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Enclosure/to_feed-i.yaml000064400000000324150403636100017761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Enclosure#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Authors/Author/to_feed-i.yaml000064400000000332150403636110020711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Authors::Author#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Authors/Author/cdesc-Author.yaml000064400000000456150403636120021407 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Authors::Author
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Author
superclass: RSS09::Items::Item::Authors::Author
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Authors/to_feed-i.yaml000064400000000322150403636120017447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Authors#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Authors/cdesc-Authors.yaml000064400000000437150403636130020330 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Authors
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Authors
superclass: RSS09::Items::Item::Authors
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Categories/cdesc-Categories.yaml000064400000000450150403636140021424 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: RSS09::Items::Item::Categories
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Categories/Category/cdesc-Category.yaml000064400000000574150403636150022701 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Categories::Category
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Category
superclass: RSS09::Items::Item::Categories::Category
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Categories/Category/required_variable_names-i.yaml000064400000000367150403636150025143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Categories::Category#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Categories/Category/to_feed-i.yaml000064400000000337150403636160021676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Categories::Category#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Categories/to_feed-i.yaml000064400000000325150403636160020116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Categories#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Guid/required_variable_names-i.yaml000064400000000347150403636170022171 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Guid#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Guid/cdesc-Guid.yaml000064400000000530150403636170017034 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item::Guid
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Guid
superclass: RSS09::Items::Item::Guid
ri/1.8/system/RSS/Maker/RSS20/Items/Item/Guid/to_feed-i.yaml000064400000000317150403636200016715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item::Guid#to_feed
is_singleton: false
name: to_feed
params: (rss, item)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Items/Item/cdesc-Item.yaml000064400000000623150403636200016147 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items::Item
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: not_set_required_variables
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: variables
name: Item
superclass: RSS09::Items::Item
ri/1.8/system/RSS/Maker/RSS20/Items/Item/not_set_required_variables-i.yaml000064400000000347150403636210022027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Items::Item#not_set_required_variables
is_singleton: false
name: not_set_required_variables
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Items/cdesc-Items.yaml000064400000000320150403636210015427 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Items
includes: []

instance_methods: []

name: Items
superclass: RSS09::Items
ri/1.8/system/RSS/Maker/RSS20/Channel/required_variable_names-i.yaml000064400000000335150403636220020663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Channel/SkipHours/cdesc-SkipHours.yaml000064400000000356150403636220020525 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::SkipHours
includes: []

instance_methods: []

name: SkipHours
superclass: RSS09::Channel::SkipHours
ri/1.8/system/RSS/Maker/RSS20/Channel/SkipHours/Hour/cdesc-Hour.yaml000064400000000365150403636240020432 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::SkipHours::Hour
includes: []

instance_methods: []

name: Hour
superclass: RSS09::Channel::SkipHours::Hour
ri/1.8/system/RSS/Maker/RSS20/Channel/cdesc-Channel.yaml000064400000000425150403636240016216 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
name: Channel
superclass: RSS09::Channel
ri/1.8/system/RSS/Maker/RSS20/Channel/Cloud/required_variable_names-i.yaml000064400000000344150403636250021734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel::Cloud#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Channel/Cloud/to_feed-i.yaml000064400000000317150403636260016472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel::Cloud#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Channel/Cloud/cdesc-Cloud.yaml000064400000000523150403636260016763 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::Cloud
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Cloud
superclass: RSS09::Channel::Cloud
ri/1.8/system/RSS/Maker/RSS20/Channel/Generator/required_variable_names-i.yaml000064400000000350150403636270022613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel::Generator#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Channel/Generator/cdesc-Generator.yaml000064400000000523150403636300020516 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::Generator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Generator
superclass: GeneratorBase
ri/1.8/system/RSS/Maker/RSS20/Channel/Generator/to_feed-i.yaml000064400000000323150403636310017343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel::Generator#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Channel/SkipDays/Day/cdesc-Day.yaml000064400000000360150403636320017624 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::SkipDays::Day
includes: []

instance_methods: []

name: Day
superclass: RSS09::Channel::SkipDays::Day
ri/1.8/system/RSS/Maker/RSS20/Channel/SkipDays/cdesc-SkipDays.yaml000064400000000353150403636330020124 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::SkipDays
includes: []

instance_methods: []

name: SkipDays
superclass: RSS09::Channel::SkipDays
ri/1.8/system/RSS/Maker/RSS20/Channel/Categories/cdesc-Categories.yaml000064400000000440150403636330021015 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::Categories
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Categories
superclass: RSS09::Channel::Categories
ri/1.8/system/RSS/Maker/RSS20/Channel/Categories/Category/cdesc-Category.yaml000064400000000564150403636340022272 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Channel::Categories::Category
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: Category
superclass: RSS09::Channel::Categories::Category
ri/1.8/system/RSS/Maker/RSS20/Channel/Categories/Category/required_variable_names-i.yaml000064400000000363150403636350024532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel::Categories::Category#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Channel/Categories/Category/to_feed-i.yaml000064400000000336150403636350021267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel::Categories::Category#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/Channel/Categories/to_feed-i.yaml000064400000000324150403636350017507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Channel::Categories#to_feed
is_singleton: false
name: to_feed
params: (rss, channel)
visibility: public
ri/1.8/system/RSS/Maker/RSS20/cdesc-RSS20.yaml000064400000000355150403636350014113 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Maker::RSS20
includes: []

instance_methods: []

name: RSS20
superclass: RSS09
ri/1.8/system/RSS/Maker/RSS20/Image/cdesc-Image.yaml000064400000000411150403636360015340 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Image
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: required_element?
name: Image
superclass: RSS09::Image
ri/1.8/system/RSS/Maker/RSS20/Image/required_element%3f-i.yaml000064400000000317150403636370017322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::Image#required_element?
is_singleton: false
name: required_element?
params: ()
visibility: private
ri/1.8/system/RSS/Maker/RSS20/Textinput/cdesc-Textinput.yaml000064400000000334150403636400017303 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::RSS20::Textinput
includes: []

instance_methods: []

name: Textinput
superclass: RSS09::Textinput
ri/1.8/system/RSS/Maker/RSS20/new-c.yaml000064400000000275150403636400013231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::RSS20::new
is_singleton: true
name: new
params: (feed_version="2.0")
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/LinksBase/LinkBase/cdesc-LinkBase.yaml000064400000000337150403636410021664 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::LinksBase::LinkBase
includes: []

instance_methods: []

name: LinkBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/LinksBase/cdesc-LinksBase.yaml000064400000000326150403636420020356 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::LinksBase
includes: []

instance_methods: []

name: LinksBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/DescriptionBase/cdesc-DescriptionBase.yaml000064400000000440150403636430022762 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::DescriptionBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: DescriptionBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/icon%3d-i.yaml000064400000000270150403636430015222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#icon=
is_singleton: false
name: icon=
params: (url)
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/ITunesImage/cdesc-ITunesImage.yaml000064400000000345150403636440021157 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::ITunesImage
includes: []

instance_methods: []

name: ITunesImage
superclass: ITunesImageBase
ri/1.8/system/RSS/Maker/ChannelBase/GeneratorBase/cdesc-GeneratorBase.yaml000064400000000336150403636440022075 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::GeneratorBase
includes: []

instance_methods: []

name: GeneratorBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/lastBuildDate%3d-i.yaml000064400000000314150403636450017014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#lastBuildDate=
is_singleton: false
name: lastBuildDate=
params: (_date)
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/ITunesOwner/cdesc-ITunesOwner.yaml000064400000000345150403636460021301 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::ITunesOwner
includes: []

instance_methods: []

name: ITunesOwner
superclass: ITunesOwnerBase
ri/1.8/system/RSS/Maker/ChannelBase/CloudBase/cdesc-CloudBase.yaml000064400000000326150403636460020336 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::CloudBase
includes: []

instance_methods: []

name: CloudBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/logo%3d-i.yaml000064400000000270150403636470015236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#logo=
is_singleton: false
name: logo=
params: (url)
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/icon-i.yaml000064400000000263150403636470014734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#icon
is_singleton: false
name: icon
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/logo-i.yaml000064400000000263150403636500014736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#logo
is_singleton: false
name: logo
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/CopyrightBase/cdesc-CopyrightBase.yaml000064400000000434150403636510022136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::CopyrightBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: CopyrightBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/ITunesCategories/cdesc-ITunesCategories.yaml000064400000000364150403636520023265 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::ITunesCategories
includes: []

instance_methods: []

name: ITunesCategories
superclass: ITunesCategoriesBase
ri/1.8/system/RSS/Maker/ChannelBase/ITunesCategories/ITunesCategory/cdesc-ITunesCategory.yaml000064400000000513150403636530025657 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ITunesCategory
  value: self
full_name: RSS::Maker::ChannelBase::ITunesCategories::ITunesCategory
includes: []

instance_methods: []

name: ITunesCategory
superclass: ITunesCategoryBase
ri/1.8/system/RSS/Maker/ChannelBase/date%3d-i.yaml000064400000000272150403636540015213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#date=
is_singleton: false
name: date=
params: (_date)
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/updated%3d-i.yaml000064400000000277150403636540015731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#updated=
is_singleton: false
name: updated=
params: (date)
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/cdesc-ChannelBase.yaml000064400000002065150403636550017001 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
- !ruby/object:RI::IncludedModule 
  name: Maker::ITunesChannelModel
- !ruby/object:RI::IncludedModule 
  name: SyndicationModel
- !ruby/object:RI::IncludedModule 
  name: Maker::ImageFaviconModel
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicsModel
- !ruby/object:RI::IncludedModule 
  name: SetupDefaultDate
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: date=
- !ruby/object:RI::MethodSummary 
  name: icon
- !ruby/object:RI::MethodSummary 
  name: icon=
- !ruby/object:RI::MethodSummary 
  name: lastBuildDate=
- !ruby/object:RI::MethodSummary 
  name: logo
- !ruby/object:RI::MethodSummary 
  name: logo=
- !ruby/object:RI::MethodSummary 
  name: pubDate
- !ruby/object:RI::MethodSummary 
  name: pubDate=
- !ruby/object:RI::MethodSummary 
  name: updated
- !ruby/object:RI::MethodSummary 
  name: updated=
name: ChannelBase
superclass: Object
ri/1.8/system/RSS/Maker/ChannelBase/TitleBase/cdesc-TitleBase.yaml000064400000000424150403636550020363 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::TitleBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomTextConstructBase
instance_methods: []

name: TitleBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/pubDate-i.yaml000064400000000271150403636550015366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#pubDate
is_singleton: false
name: pubDate
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/CategoriesBase/CategoryBase/cdesc-CategoryBase.yaml000064400000000354150403636570024437 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::CategoriesBase::CategoryBase
includes: []

instance_methods: []

name: CategoryBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/CategoriesBase/cdesc-CategoriesBase.yaml000064400000000340150403636570022372 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::CategoriesBase
includes: []

instance_methods: []

name: CategoriesBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/SkipHoursBase/HourBase/cdesc-HourBase.yaml000064400000000343150403636600022571 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::SkipHoursBase::HourBase
includes: []

instance_methods: []

name: HourBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/SkipHoursBase/cdesc-SkipHoursBase.yaml000064400000000336150403636610022076 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::SkipHoursBase
includes: []

instance_methods: []

name: SkipHoursBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/ContributorsBase/ContributorBase/cdesc-ContributorBase.yaml000064400000000464150403636610026336 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::ContributorsBase::ContributorBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomPersonConstructBase
instance_methods: []

name: ContributorBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/ContributorsBase/cdesc-ContributorsBase.yaml000064400000000344150403636610023411 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::ContributorsBase
includes: []

instance_methods: []

name: ContributorsBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/SkipDaysBase/DayBase/cdesc-DayBase.yaml000064400000000340150403636610021767 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::SkipDaysBase::DayBase
includes: []

instance_methods: []

name: DayBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/SkipDaysBase/cdesc-SkipDaysBase.yaml000064400000000334150403636610021474 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::SkipDaysBase
includes: []

instance_methods: []

name: SkipDaysBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/pubDate%3d-i.yaml000064400000000277150403636610015665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#pubDate=
is_singleton: false
name: pubDate=
params: (date)
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/updated-i.yaml000064400000000271150403636610015425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ChannelBase#updated
is_singleton: false
name: updated
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ChannelBase/AuthorsBase/cdesc-AuthorsBase.yaml000064400000000332150403636620021267 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::AuthorsBase
includes: []

instance_methods: []

name: AuthorsBase
superclass: Base
ri/1.8/system/RSS/Maker/ChannelBase/AuthorsBase/AuthorBase/cdesc-AuthorBase.yaml000064400000000445150403636640023150 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ChannelBase::AuthorsBase::AuthorBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: AtomPersonConstructBase
instance_methods: []

name: AuthorBase
superclass: Base
ri/1.8/system/RSS/Maker/XMLStyleSheets/XMLStyleSheet/required_variable_names-i.yaml000064400000000354150403636660024022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::XMLStyleSheets::XMLStyleSheet#required_variable_names
is_singleton: false
name: required_variable_names
params: ()
visibility: private
ri/1.8/system/RSS/Maker/XMLStyleSheets/XMLStyleSheet/guess_type_if_need-i.yaml000064400000000345150403636670023013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::XMLStyleSheets::XMLStyleSheet#guess_type_if_need
is_singleton: false
name: guess_type_if_need
params: (xss)
visibility: private
ri/1.8/system/RSS/Maker/XMLStyleSheets/XMLStyleSheet/to_feed-i.yaml000064400000000317150403636670020557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::XMLStyleSheets::XMLStyleSheet#to_feed
is_singleton: false
name: to_feed
params: (feed)
visibility: public
ri/1.8/system/RSS/Maker/XMLStyleSheets/XMLStyleSheet/cdesc-XMLStyleSheet.yaml000064400000000617150403636700022452 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::XMLStyleSheets::XMLStyleSheet
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: guess_type_if_need
- !ruby/object:RI::MethodSummary 
  name: required_variable_names
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: XMLStyleSheet
superclass: Base
ri/1.8/system/RSS/Maker/XMLStyleSheets/cdesc-XMLStyleSheets.yaml000064400000000323150403636710020156 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Maker::XMLStyleSheets
includes: []

instance_methods: []

name: XMLStyleSheets
superclass: Base
ri/1.8/system/RSS/Maker/ImageFaviconModel/install_image_favicon-c.yaml000064400000000340150403636720021453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageFaviconModel::install_image_favicon
is_singleton: true
name: install_image_favicon
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/ImageFaviconModel/append_features-c.yaml000064400000000324150403636720020305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageFaviconModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/ImageFaviconModel/cdesc-ImageFaviconModel.yaml000064400000000514150403636730021312 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: install_image_favicon
comment: 
constants: []

full_name: RSS::Maker::ImageFaviconModel
includes: []

instance_methods: []

name: ImageFaviconModel
superclass: 
ri/1.8/system/RSS/Maker/ImageFaviconModel/ImageFaviconBase/have_required_values%3f-i.yaml000064400000000355150403636730024776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageFaviconModel::ImageFaviconBase#have_required_values?
is_singleton: false
name: have_required_values?
params: ()
visibility: public
ri/1.8/system/RSS/Maker/ImageFaviconModel/ImageFaviconBase/to_feed-i.yaml000064400000000336150403636730021702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ImageFaviconModel::ImageFaviconBase#to_feed
is_singleton: false
name: to_feed
params: (feed, current)
visibility: public
ri/1.8/system/RSS/Maker/ImageFaviconModel/ImageFaviconBase/cdesc-ImageFaviconBase.yaml000064400000001034150403636730024245 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: about
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: image_size
  rw: RW
class_methods: []

comment: 
constants: []

full_name: RSS::Maker::ImageFaviconModel::ImageFaviconBase
includes: 
- !ruby/object:RI::IncludedModule 
  name: Maker::DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_required_values?
- !ruby/object:RI::MethodSummary 
  name: to_feed
name: ImageFaviconBase
superclass: Base
ri/1.8/system/RSS/Maker/cdesc-Maker.yaml000064400000000755150403636730013536 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_maker
- !ruby/object:RI::MethodSummary 
  name: make
- !ruby/object:RI::MethodSummary 
  name: maker
- !ruby/object:RI::MethodSummary 
  name: makers
- !ruby/object:RI::MethodSummary 
  name: versions
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MAKERS
  value: "{}"
full_name: RSS::Maker
includes: []

instance_methods: []

name: Maker
superclass: 
ri/1.8/system/RSS/Maker/ContentModel/cdesc-ContentModel.yaml000064400000000402150403636740017453 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Maker::ContentModel
includes: []

instance_methods: []

name: ContentModel
superclass: 
ri/1.8/system/RSS/Maker/ContentModel/append_features-c.yaml000064400000000317150403636740017373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::ContentModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Maker/makers-c.yaml000064400000000252150403636740013113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Maker::makers
is_singleton: true
name: makers
params: ()
visibility: public
ri/1.8/system/RSS/NotAvailableValueError/new-c.yaml000064400000000316150403636760015736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::NotAvailableValueError::new
is_singleton: true
name: new
params: (tag, value, attribute=nil)
visibility: public
ri/1.8/system/RSS/NotAvailableValueError/cdesc-NotAvailableValueError.yaml000064400000000721150403636760022354 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attribute
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: tag
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::NotAvailableValueError
includes: []

instance_methods: []

name: NotAvailableValueError
superclass: InvalidRSSError
ri/1.8/system/RSS/Atom/Feed/Contributor/cdesc-Contributor.yaml000064400000000511150403637010020005 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Contributor
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: PersonConstruct
instance_methods: []

name: Contributor
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/setup_maker_elements-i.yaml000064400000000323150403637020016545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed#setup_maker_elements
is_singleton: false
name: setup_maker_elements
params: (channel)
visibility: private
ri/1.8/system/RSS/Atom/Feed/cdesc-Feed.yaml000064400000001476150403637030014041 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::Atom::Feed
includes: 
- !ruby/object:RI::IncludedModule 
  name: RootElementMixin
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: DuplicateLinkChecker
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: atom_validate
- !ruby/object:RI::MethodSummary 
  name: have_author?
- !ruby/object:RI::MethodSummary 
  name: have_required_elements?
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element
- !ruby/object:RI::MethodSummary 
  name: setup_maker_elements
name: Feed
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Title/cdesc-Title.yaml000064400000000473150403637030015334 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Title
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: TextConstruct
instance_methods: []

name: Title
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Author/cdesc-Author.yaml000064400000000477150403637040015703 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Author
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: PersonConstruct
instance_methods: []

name: Author
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/atom_validate-i.yaml000064400000000337150403637040015152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed#atom_validate
is_singleton: false
name: atom_validate
params: (ignore_unknown_element, tags, uri)
visibility: private
ri/1.8/system/RSS/Atom/Feed/Subtitle/cdesc-Subtitle.yaml000064400000000501150403637050016552 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Subtitle
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: TextConstruct
instance_methods: []

name: Subtitle
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Link/cdesc-Link.yaml000064400000000464150403637060014767 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Link
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: Link
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Link/maker_target-i.yaml000064400000000310150403637070015675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Link#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/Atom/Feed/Entry/cdesc-Entry.yaml000064400000002321150403637110015365 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Author
  value: Feed::Author
- !ruby/object:RI::Constant 
  comment: 
  name: Category
  value: Feed::Category
- !ruby/object:RI::Constant 
  comment: 
  name: Contributor
  value: Feed::Contributor
- !ruby/object:RI::Constant 
  comment: 
  name: Id
  value: Feed::Id
- !ruby/object:RI::Constant 
  comment: 
  name: Link
  value: Feed::Link
- !ruby/object:RI::Constant 
  comment: 
  name: Rights
  value: Feed::Rights
- !ruby/object:RI::Constant 
  comment: 
  name: Title
  value: Feed::Title
- !ruby/object:RI::Constant 
  comment: 
  name: Updated
  value: Feed::Updated
full_name: RSS::Atom::Feed::Entry
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: DuplicateLinkChecker
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: atom_validate
- !ruby/object:RI::MethodSummary 
  name: have_author?
- !ruby/object:RI::MethodSummary 
  name: have_required_elements?
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: Entry
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Entry/Source/cdesc-Source.yaml000064400000002350150403637120016767 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Author
  value: Feed::Author
- !ruby/object:RI::Constant 
  comment: 
  name: Category
  value: Feed::Category
- !ruby/object:RI::Constant 
  comment: 
  name: Contributor
  value: Feed::Contributor
- !ruby/object:RI::Constant 
  comment: 
  name: Generator
  value: Feed::Generator
- !ruby/object:RI::Constant 
  comment: 
  name: Icon
  value: Feed::Icon
- !ruby/object:RI::Constant 
  comment: 
  name: Id
  value: Feed::Id
- !ruby/object:RI::Constant 
  comment: 
  name: Link
  value: Feed::Link
- !ruby/object:RI::Constant 
  comment: 
  name: Logo
  value: Feed::Logo
- !ruby/object:RI::Constant 
  comment: 
  name: Rights
  value: Feed::Rights
- !ruby/object:RI::Constant 
  comment: 
  name: Subtitle
  value: Feed::Subtitle
- !ruby/object:RI::Constant 
  comment: 
  name: Title
  value: Feed::Title
- !ruby/object:RI::Constant 
  comment: 
  name: Updated
  value: Feed::Updated
full_name: RSS::Atom::Feed::Entry::Source
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: have_author?
name: Source
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Entry/Source/have_author%3f-i.yaml000064400000000312150403637130017476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Source#have_author?
is_singleton: false
name: have_author?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/atom_validate-i.yaml000064400000000346150403637140016254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry#atom_validate
is_singleton: false
name: atom_validate
params: (ignore_unknown_element, tags, uri)
visibility: private
ri/1.8/system/RSS/Atom/Feed/Entry/Published/cdesc-Published.yaml000064400000000512150403637150020126 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Entry::Published
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: DateConstruct
instance_methods: []

name: Published
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Entry/have_required_elements%3f-i.yaml000064400000000331150403637150020453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry#have_required_elements?
is_singleton: false
name: have_required_elements?
params: ()
visibility: private
ri/1.8/system/RSS/Atom/Feed/Entry/Content/inline_other%3f-i.yaml000064400000000315150403637160020030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#inline_other?
is_singleton: false
name: inline_other?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/mime_split-i.yaml000064400000000307150403637160017216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#mime_split
is_singleton: false
name: mime_split
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/atom_validate-i.yaml000064400000000356150403637170017672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#atom_validate
is_singleton: false
name: atom_validate
params: (ignore_unknown_element, tags, uri)
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/out_of_line%3f-i.yaml000064400000000313150403637170017652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#out_of_line?
is_singleton: false
name: out_of_line?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/xml-i.yaml000064400000000271150403637200015647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#xml
is_singleton: false
name: xml
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/inline_text%3f-i.yaml000064400000000313150403637200017664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#inline_text?
is_singleton: false
name: inline_text?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/inline_xhtml%3f-i.yaml000064400000000315150403637200020036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#inline_xhtml?
is_singleton: false
name: inline_xhtml?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/empty_content%3f-i.yaml000064400000000320150403637210020231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#empty_content?
is_singleton: false
name: empty_content?
params: ()
visibility: private
ri/1.8/system/RSS/Atom/Feed/Entry/Content/inline_other_text%3f-i.yaml000064400000000327150403637210021073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#inline_other_text?
is_singleton: false
name: inline_other_text?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/have_xml_content%3f-i.yaml000064400000000325150403637220020704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#have_xml_content?
is_singleton: false
name: have_xml_content?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/inline_html%3f-i.yaml000064400000000313150403637220017646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#inline_html?
is_singleton: false
name: inline_html?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/cdesc-Content.yaml000064400000002367150403637220017324 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: xml
  rw: W
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: xml_getter
- !ruby/object:RI::MethodSummary 
  name: xml_setter
comment: 
constants: []

full_name: RSS::Atom::Feed::Entry::Content
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: atom_validate
- !ruby/object:RI::MethodSummary 
  name: empty_content?
- !ruby/object:RI::MethodSummary 
  name: have_xml_content?
- !ruby/object:RI::MethodSummary 
  name: inline_html?
- !ruby/object:RI::MethodSummary 
  name: inline_other?
- !ruby/object:RI::MethodSummary 
  name: inline_other_base64?
- !ruby/object:RI::MethodSummary 
  name: inline_other_text?
- !ruby/object:RI::MethodSummary 
  name: inline_other_xml?
- !ruby/object:RI::MethodSummary 
  name: inline_text?
- !ruby/object:RI::MethodSummary 
  name: inline_xhtml?
- !ruby/object:RI::MethodSummary 
  name: mime_split
- !ruby/object:RI::MethodSummary 
  name: need_base64_encode?
- !ruby/object:RI::MethodSummary 
  name: out_of_line?
- !ruby/object:RI::MethodSummary 
  name: xhtml
- !ruby/object:RI::MethodSummary 
  name: xml
name: Content
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Entry/Content/inline_other_base64%3f-i.yaml000064400000000333150403637230021172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#inline_other_base64?
is_singleton: false
name: inline_other_base64?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/need_base64_encode%3f-i.yaml000064400000000331150403637230020741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#need_base64_encode?
is_singleton: false
name: need_base64_encode?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/inline_other_xml%3f-i.yaml000064400000000325150403637240020710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#inline_other_xml?
is_singleton: false
name: inline_other_xml?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/xml_getter-c.yaml000064400000000307150403637240017217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content::xml_getter
is_singleton: true
name: xml_getter
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/xml_setter-c.yaml000064400000000307150403637240017233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content::xml_setter
is_singleton: true
name: xml_setter
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/Content/xhtml-i.yaml000064400000000275150403637240016213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry::Content#xhtml
is_singleton: false
name: xhtml
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Feed/Entry/maker_target-i.yaml000064400000000310150403637240016100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry#maker_target
is_singleton: false
name: maker_target
params: (items)
visibility: private
ri/1.8/system/RSS/Atom/Feed/Entry/Summary/cdesc-Summary.yaml000064400000000506150403637250017366 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Entry::Summary
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: TextConstruct
instance_methods: []

name: Summary
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Entry/have_author%3f-i.yaml000064400000000323150403637250016243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Entry#have_author?
is_singleton: false
name: have_author?
params: (check_parent=true)
visibility: public
ri/1.8/system/RSS/Atom/Feed/have_required_elements%3f-i.yaml000064400000000322150403637250017353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed#have_required_elements?
is_singleton: false
name: have_required_elements?
params: ()
visibility: private
ri/1.8/system/RSS/Atom/Feed/new-c.yaml000064400000000322150403637250013121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::new
is_singleton: true
name: new
params: (version=nil, encoding=nil, standalone=nil)
visibility: public
ri/1.8/system/RSS/Atom/Feed/Logo/cdesc-Logo.yaml000064400000000664150403637250015000 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Logo
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: URIContentModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element_writer
name: Logo
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Logo/setup_maker_element_writer-i.yaml000064400000000336150403637250020667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Logo#setup_maker_element_writer
is_singleton: false
name: setup_maker_element_writer
params: ()
visibility: private
ri/1.8/system/RSS/Atom/Feed/Logo/maker_target-i.yaml000064400000000307150403637250015706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Logo#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: public
ri/1.8/system/RSS/Atom/Feed/Category/cdesc-Category.yaml000064400000000474150403637260016532 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Category
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: Category
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Category/maker_target-i.yaml000064400000000314150403637260016562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Category#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/Atom/Feed/setup_maker_element-i.yaml000064400000000321150403637260016366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed#setup_maker_element
is_singleton: false
name: setup_maker_element
params: (channel)
visibility: private
ri/1.8/system/RSS/Atom/Feed/maker_target-i.yaml000064400000000301150403637260015001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/Atom/Feed/Rights/cdesc-Rights.yaml000064400000000475150403637260015701 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Rights
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: TextConstruct
instance_methods: []

name: Rights
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Generator/cdesc-Generator.yaml000064400000000600150403637260017043 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Generator
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: ContentModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: Generator
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Generator/setup_maker_attributes-i.yaml000064400000000341150403637260021053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed::Generator#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (target)
visibility: private
ri/1.8/system/RSS/Atom/Feed/Icon/cdesc-Icon.yaml000064400000000473150403637270014760 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Icon
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: URIContentModel
instance_methods: []

name: Icon
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Id/cdesc-Id.yaml000064400000000467150403637270014073 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Id
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: URIContentModel
instance_methods: []

name: Id
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/Updated/cdesc-Updated.yaml000064400000000477150403637270016160 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::Feed::Updated
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: DateConstruct
instance_methods: []

name: Updated
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Feed/have_author%3f-i.yaml000064400000000273150403637270015150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Feed#have_author?
is_singleton: false
name: have_author?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/TextConstruct/cdesc-TextConstruct.yaml000064400000001303150403637270020010 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: xhtml
  rw: W
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: xml_getter
- !ruby/object:RI::MethodSummary 
  name: xml_setter
comment: 
constants: []

full_name: RSS::Atom::TextConstruct
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: atom_validate
- !ruby/object:RI::MethodSummary 
  name: have_xml_content?
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
- !ruby/object:RI::MethodSummary 
  name: xhtml
name: TextConstruct
superclass: 
ri/1.8/system/RSS/Atom/TextConstruct/atom_validate-i.yaml000064400000000347150403637270017146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct#atom_validate
is_singleton: false
name: atom_validate
params: (ignore_unknown_element, tags, uri)
visibility: public
ri/1.8/system/RSS/Atom/TextConstruct/append_features-c.yaml000064400000000317150403637270017471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Atom/TextConstruct/have_xml_content%3f-i.yaml000064400000000316150403637270020164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct#have_xml_content?
is_singleton: false
name: have_xml_content?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/TextConstruct/maker_target-i.yaml000064400000000313150403637270016773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/Atom/TextConstruct/setup_maker_attributes-i.yaml000064400000000337150403637270021121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (target)
visibility: private
ri/1.8/system/RSS/Atom/TextConstruct/xml_getter-c.yaml000064400000000300150403637270016466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct::xml_getter
is_singleton: true
name: xml_getter
params: ()
visibility: public
ri/1.8/system/RSS/Atom/TextConstruct/xml_setter-c.yaml000064400000000300150403637270016502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct::xml_setter
is_singleton: true
name: xml_setter
params: ()
visibility: public
ri/1.8/system/RSS/Atom/TextConstruct/xhtml-i.yaml000064400000000266150403637270015471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::TextConstruct#xhtml
is_singleton: false
name: xhtml
params: ()
visibility: public
ri/1.8/system/RSS/Atom/DuplicateLinkChecker/validate_duplicate_links-i.yaml000064400000000350150403637270022536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::DuplicateLinkChecker#validate_duplicate_links
is_singleton: false
name: validate_duplicate_links
params: (links)
visibility: public
ri/1.8/system/RSS/Atom/DuplicateLinkChecker/cdesc-DuplicateLinkChecker.yaml000064400000000432150403637300022354 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::DuplicateLinkChecker
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: validate_duplicate_links
name: DuplicateLinkChecker
superclass: 
ri/1.8/system/RSS/Atom/CommonModel/append_features-c.yaml000064400000000315150403637300017041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::CommonModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Atom/CommonModel/cdesc-CommonModel.yaml000064400000000770150403637300016751 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: need_parent?
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NSPOOL
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "[]"
full_name: RSS::Atom::CommonModel
includes: []

instance_methods: []

name: CommonModel
superclass: 
ri/1.8/system/RSS/Atom/CommonModel/need_parent%3f-c.yaml000064400000000302150403637300016452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::CommonModel::need_parent?
is_singleton: true
name: need_parent?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/CommonModel/required_uri-c.yaml000064400000000302150403637300016367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::CommonModel::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Entry/setup_maker-i.yaml000064400000000277150403637300015120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Entry#setup_maker
is_singleton: false
name: setup_maker
params: (maker)
visibility: public
ri/1.8/system/RSS/Atom/Entry/cdesc-Entry.yaml000064400000003456150403637300014535 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Author
  value: Feed::Entry::Author
- !ruby/object:RI::Constant 
  comment: 
  name: Category
  value: Feed::Entry::Category
- !ruby/object:RI::Constant 
  comment: 
  name: Content
  value: Feed::Entry::Content
- !ruby/object:RI::Constant 
  comment: 
  name: Contributor
  value: Feed::Entry::Contributor
- !ruby/object:RI::Constant 
  comment: 
  name: Id
  value: Feed::Entry::Id
- !ruby/object:RI::Constant 
  comment: 
  name: Link
  value: Feed::Entry::Link
- !ruby/object:RI::Constant 
  comment: 
  name: Published
  value: Feed::Entry::Published
- !ruby/object:RI::Constant 
  comment: 
  name: Rights
  value: Feed::Entry::Rights
- !ruby/object:RI::Constant 
  comment: 
  name: Source
  value: Feed::Entry::Source
- !ruby/object:RI::Constant 
  comment: 
  name: Summary
  value: Feed::Entry::Summary
- !ruby/object:RI::Constant 
  comment: 
  name: Title
  value: Feed::Entry::Title
- !ruby/object:RI::Constant 
  comment: 
  name: Updated
  value: Feed::Entry::Updated
full_name: RSS::Atom::Entry
includes: 
- !ruby/object:RI::IncludedModule 
  name: RootElementMixin
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: DuplicateLinkChecker
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: atom_validate
- !ruby/object:RI::MethodSummary 
  name: have_author?
- !ruby/object:RI::MethodSummary 
  name: have_required_elements?
- !ruby/object:RI::MethodSummary 
  name: items
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker
name: Entry
superclass: RSS::Element
ri/1.8/system/RSS/Atom/Entry/atom_validate-i.yaml000064400000000340150403637300015401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Entry#atom_validate
is_singleton: false
name: atom_validate
params: (ignore_unknown_element, tags, uri)
visibility: private
ri/1.8/system/RSS/Atom/Entry/have_required_elements%3f-i.yaml000064400000000323150403637300017606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Entry#have_required_elements?
is_singleton: false
name: have_required_elements?
params: ()
visibility: private
ri/1.8/system/RSS/Atom/Entry/new-c.yaml000064400000000323150403637300013354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Entry::new
is_singleton: true
name: new
params: (version=nil, encoding=nil, standalone=nil)
visibility: public
ri/1.8/system/RSS/Atom/Entry/maker_target-i.yaml000064400000000302150403637310015234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Entry#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/Atom/Entry/items-i.yaml000064400000000256150403637310013720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Entry#items
is_singleton: false
name: items
params: ()
visibility: public
ri/1.8/system/RSS/Atom/Entry/have_author%3f-i.yaml000064400000000274150403637310015402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::Entry#have_author?
is_singleton: false
name: have_author?
params: ()
visibility: public
ri/1.8/system/RSS/Atom/cdesc-Atom.yaml000064400000000570150403637320013227 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: URI
  value: "\"http://www.w3.org/2005/Atom\""
- !ruby/object:RI::Constant 
  comment: 
  name: XHTML_URI
  value: "\"http://www.w3.org/1999/xhtml\""
full_name: RSS::Atom
includes: []

instance_methods: []

name: Atom
superclass: 
ri/1.8/system/RSS/Atom/PersonConstruct/Email/cdesc-Email.yaml000064400000000505150403637340017560 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::PersonConstruct::Email
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: ContentModel
instance_methods: []

name: Email
superclass: RSS::Element
ri/1.8/system/RSS/Atom/PersonConstruct/Name/cdesc-Name.yaml000064400000000503150403637350017241 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::PersonConstruct::Name
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: ContentModel
instance_methods: []

name: Name
superclass: RSS::Element
ri/1.8/system/RSS/Atom/PersonConstruct/Uri/cdesc-Uri.yaml000064400000000504150403637370017002 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::PersonConstruct::Uri
includes: 
- !ruby/object:RI::IncludedModule 
  name: CommonModel
- !ruby/object:RI::IncludedModule 
  name: URIContentModel
instance_methods: []

name: Uri
superclass: RSS::Element
ri/1.8/system/RSS/Atom/PersonConstruct/append_features-c.yaml000064400000000321150403637400020001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::PersonConstruct::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Atom/PersonConstruct/cdesc-PersonConstruct.yaml000064400000000473150403637400020656 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Atom::PersonConstruct
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: PersonConstruct
superclass: 
ri/1.8/system/RSS/Atom/PersonConstruct/maker_target-i.yaml000064400000000314150403637410017312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::PersonConstruct#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: public
ri/1.8/system/RSS/Atom/URIContentModel/append_features-c.yaml000064400000000321150403637420017603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::URIContentModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Atom/URIContentModel/cdesc-URIContentModel.yaml000064400000000474150403637430020262 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Atom::URIContentModel
includes: 
- !ruby/object:RI::IncludedModule 
  name: ContentModel
instance_methods: []

name: URIContentModel
superclass: 
ri/1.8/system/RSS/Atom/ContentModel/cdesc-ContentModel.yaml000064400000000670150403637440017321 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Atom::ContentModel
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element
- !ruby/object:RI::MethodSummary 
  name: setup_maker_element_writer
name: ContentModel
superclass: 
ri/1.8/system/RSS/Atom/ContentModel/ClassMethods/content_type-i.yaml000064400000000321150403637450021173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::ContentModel::ClassMethods#content_type
is_singleton: false
name: content_type
params: ()
visibility: public
ri/1.8/system/RSS/Atom/ContentModel/ClassMethods/cdesc-ClassMethods.yaml000064400000000414150403637450021705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::Atom::ContentModel::ClassMethods
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: content_type
name: ClassMethods
superclass: 
ri/1.8/system/RSS/Atom/ContentModel/append_features-c.yaml000064400000000316150403637460017233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::ContentModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Atom/ContentModel/setup_maker_element_writer-i.yaml000064400000000340150403637460021515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::ContentModel#setup_maker_element_writer
is_singleton: false
name: setup_maker_element_writer
params: ()
visibility: private
ri/1.8/system/RSS/Atom/ContentModel/setup_maker_element-i.yaml000064400000000330150403637470020121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::ContentModel#setup_maker_element
is_singleton: false
name: setup_maker_element
params: (target)
visibility: private
ri/1.8/system/RSS/Atom/ContentModel/maker_target-i.yaml000064400000000311150403637500016527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::ContentModel#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: public
ri/1.8/system/RSS/Atom/DateConstruct/atom_validate-i.yaml000064400000000347150403637510017074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::DateConstruct#atom_validate
is_singleton: false
name: atom_validate
params: (ignore_unknown_element, tags, uri)
visibility: public
ri/1.8/system/RSS/Atom/DateConstruct/append_features-c.yaml000064400000000317150403637520017420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Atom::DateConstruct::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Atom/DateConstruct/cdesc-DateConstruct.yaml000064400000000555150403637520017700 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::Atom::DateConstruct
includes: 
- !ruby/object:RI::IncludedModule 
  name: ContentModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: atom_validate
name: DateConstruct
superclass: 
ri/1.8/system/RSS/ITunesBaseModel/cdesc-ITunesBaseModel.yaml000064400000001101150403637540017370 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENT_INFOS
  value: "[[\"author\"],                      [\"block\", :yes_other],                      [\"explicit\", :yes_clean_other],                      [\"keywords\", :csv],                      [\"subtitle\"],                      [\"summary\"]]"
full_name: RSS::ITunesBaseModel
includes: []

instance_methods: []

name: ITunesBaseModel
superclass: 
ri/1.8/system/RSS/ImageModelUtils/validate_one_tag_name-i.yaml000064400000000364150403637550020115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageModelUtils#validate_one_tag_name
is_singleton: false
name: validate_one_tag_name
params: (ignore_unknown_element, name, tags)
visibility: public
ri/1.8/system/RSS/ImageModelUtils/cdesc-ImageModelUtils.yaml000064400000000407150403637560017504 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::ImageModelUtils
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: validate_one_tag_name
name: ImageModelUtils
superclass: 
ri/1.8/system/RSS/RDF/Item/new-c.yaml000064400000000255150403637600012673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Item::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Item/maker_target-i.yaml000064400000000300150403637610014545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Item#maker_target
is_singleton: false
name: maker_target
params: (items)
visibility: private
ri/1.8/system/RSS/RDF/Item/required_uri-c.yaml000064400000000272150403637620014602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Item::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Item/cdesc-Item.yaml000064400000001341150403637630013637 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::RDF::Item
includes: 
- !ruby/object:RI::IncludedModule 
  name: ContentModel
- !ruby/object:RI::IncludedModule 
  name: TrackBackModel10
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: ImageItemModel
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicsModel
- !ruby/object:RI::IncludedModule 
  name: SlashModel
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: Item
superclass: Object
ri/1.8/system/RSS/RDF/Channel/Items/cdesc-Items.yaml000064400000001037150403637640015560 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Seq
  value: "::RSS::RDF::Seq"
- !ruby/object:RI::Constant 
  comment: 
  name: Seq
  value: args[0]
full_name: RSS::RDF::Channel::Items
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: resources
name: Items
superclass: Element
ri/1.8/system/RSS/RDF/Channel/Items/resources-i.yaml000064400000000276150403637640015664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::Items#resources
is_singleton: false
name: resources
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Channel/Items/new-c.yaml000064400000000267150403637640014435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::Items::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Channel/Items/required_uri-c.yaml000064400000000304150403637650016334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::Items::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Channel/Image/cdesc-Image.yaml000064400000000533150403637650015463 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::RDF::Channel::Image
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: []

name: Image
superclass: Element
ri/1.8/system/RSS/RDF/Channel/Image/new-c.yaml000064400000000267150403637650014377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::Image::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Channel/Image/required_uri-c.yaml000064400000000304150403637660016276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::Image::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Channel/Textinput/cdesc-Textinput.yaml000064400000000543150403637670017432 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::RDF::Channel::Textinput
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: []

name: Textinput
superclass: Element
ri/1.8/system/RSS/RDF/Channel/Textinput/new-c.yaml000064400000000273150403637670015360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::Textinput::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Channel/Textinput/required_uri-c.yaml000064400000000310150403637700017250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::Textinput::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Channel/new-c.yaml000064400000000260150403637700013342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Channel/cdesc-Channel.yaml000064400000001276150403637710014771 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::RDF::Channel
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: SyndicationModel
- !ruby/object:RI::IncludedModule 
  name: ImageFaviconModel
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicsModel
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: Channel
superclass: Element
ri/1.8/system/RSS/RDF/Channel/maker_target-i.yaml000064400000000303150403637710015223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/RDF/Channel/setup_maker_attributes-i.yaml000064400000000331150403637720017345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (channel)
visibility: private
ri/1.8/system/RSS/RDF/Channel/required_uri-c.yaml000064400000000275150403637720015260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Channel::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/full_name-i.yaml000064400000000256150403637720013160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Image/cdesc-Image.yaml000064400000000701150403637730014107 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::RDF::Image
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: Image
superclass: Element
ri/1.8/system/RSS/RDF/Image/new-c.yaml000064400000000256150403637730013024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Image::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Image/maker_target-i.yaml000064400000000301150403637740014676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Image#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/RDF/Image/required_uri-c.yaml000064400000000273150403637740014732 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Image::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Textinput/cdesc-Textinput.yaml000064400000000711150403637750016056 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::RDF::Textinput
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maker_target
name: Textinput
superclass: Element
ri/1.8/system/RSS/RDF/Textinput/new-c.yaml000064400000000262150403637760014006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Textinput::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Textinput/maker_target-i.yaml000064400000000305150403637770015667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Textinput#maker_target
is_singleton: false
name: maker_target
params: (maker)
visibility: private
ri/1.8/system/RSS/RDF/Textinput/required_uri-c.yaml000064400000000277150403637770015723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Textinput::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/new-c.yaml000064400000000313150403640000011754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::new
is_singleton: true
name: new
params: (version=nil, encoding=nil, standalone=nil)
visibility: public
ri/1.8/system/RSS/RDF/Li/cdesc-Li.yaml000064400000000575150403640000012744 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::RDF::Li
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
name: Li
superclass: Element
ri/1.8/system/RSS/RDF/Li/full_name-i.yaml000064400000000262150403640010013503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Li#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Li/new-c.yaml000064400000000253150403640010012324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Li::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Li/required_uri-c.yaml000064400000000270150403640010014231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Li::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Seq/setup_maker-i.yaml000064400000000275150403640020014251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Seq#setup_maker
is_singleton: false
name: setup_maker
params: (target)
visibility: public
ri/1.8/system/RSS/RDF/Seq/full_name-i.yaml000064400000000263150403640030013672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Seq#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Seq/new-c.yaml000064400000000254150403640030012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Seq::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Seq/cdesc-Seq.yaml000064400000001000150403640030013277 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Li
  value: "::RSS::RDF::Li"
full_name: RSS::RDF::Seq
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: setup_maker
name: Seq
superclass: Element
ri/1.8/system/RSS/RDF/Seq/required_uri-c.yaml000064400000000271150403640040014421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Seq::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/cdesc-RDF.yaml000064400000001251150403640050012444 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: PREFIX
  value: "'rdf'"
- !ruby/object:RI::Constant 
  comment: 
  name: URI
  value: "\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\""
full_name: RSS::RDF
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: RootElementMixin
- !ruby/object:RI::IncludedModule 
  name: TaxonomyTopicModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
name: RDF
superclass: Object
ri/1.8/system/RSS/RDF/required_uri-c.yaml000064400000000264150403640060013675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Bag/setup_maker-i.yaml000064400000000275150403640060014216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Bag#setup_maker
is_singleton: false
name: setup_maker
params: (target)
visibility: public
ri/1.8/system/RSS/RDF/Bag/full_name-i.yaml000064400000000263150403640060013636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Bag#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Bag/new-c.yaml000064400000000254150403640060012457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Bag::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/RDF/Bag/required_uri-c.yaml000064400000000271150403640060014364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::RDF::Bag::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/RDF/Bag/cdesc-Bag.yaml000064400000001000150403640060013204 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Li
  value: "::RSS::RDF::Li"
full_name: RSS::RDF::Bag
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: setup_maker
name: Bag
superclass: Element
ri/1.8/system/RSS/TrackBackModel10/TrackBackAbout/full_name-i.yaml000064400000000313150403640060020315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackAbout#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel10/TrackBackAbout/new-c.yaml000064400000000304150403640060017136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackAbout::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/TrackBackModel10/TrackBackAbout/required_prefix-c.yaml000064400000000327150403640060021547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackAbout::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel10/TrackBackAbout/maker_target-i.yaml000064400000000330150403640060021017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackAbout#maker_target
is_singleton: false
name: maker_target
params: (abouts)
visibility: private
ri/1.8/system/RSS/TrackBackModel10/TrackBackAbout/cdesc-TrackBackAbout.yaml000064400000001124150403640060022025 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::TrackBackModel10::TrackBackAbout
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
name: TrackBackAbout
superclass: Element
ri/1.8/system/RSS/TrackBackModel10/TrackBackAbout/setup_maker_attributes-i.yaml000064400000000353150403640060023144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackAbout#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (about)
visibility: private
ri/1.8/system/RSS/TrackBackModel10/TrackBackAbout/required_uri-c.yaml000064400000000321150403640060021043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackAbout::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel10/cdesc-TrackBackModel10.yaml000064400000000314150403640070017335 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::TrackBackModel10
includes: []

instance_methods: []

name: TrackBackModel10
superclass: 
ri/1.8/system/RSS/TrackBackModel10/TrackBackPing/cdesc-TrackBackPing.yaml000064400000000732150403640070021500 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::TrackBackModel10::TrackBackPing
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
name: TrackBackPing
superclass: Element
ri/1.8/system/RSS/TrackBackModel10/TrackBackPing/full_name-i.yaml000064400000000312150403640070020140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackPing#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel10/TrackBackPing/new-c.yaml000064400000000303150403640070016761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackPing::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/TrackBackModel10/TrackBackPing/required_prefix-c.yaml000064400000000326150403640070021372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackPing::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel10/TrackBackPing/required_uri-c.yaml000064400000000320150403640070020666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel10::TrackBackPing::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/NotSetError/cdesc-NotSetError.yaml000064400000000562150403640070016100 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: variables
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::NotSetError
includes: []

instance_methods: []

name: NotSetError
superclass: Error
ri/1.8/system/RSS/NotSetError/new-c.yaml000064400000000271150403640070013601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::NotSetError::new
is_singleton: true
name: new
params: (name, variables)
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/TaxonomyTopics/cdesc-TaxonomyTopics.yaml000064400000001335150403640100023376 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Bag
  value: "::RSS::RDF::Bag"
- !ruby/object:RI::Constant 
  comment: 
  name: Bag
  value: args[0]
full_name: RSS::TaxonomyTopicsModel::TaxonomyTopics
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: resources
name: TaxonomyTopics
superclass: Element
ri/1.8/system/RSS/TaxonomyTopicsModel/TaxonomyTopics/full_name-i.yaml000064400000000316150403640100021505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicsModel::TaxonomyTopics#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/TaxonomyTopics/resources-i.yaml000064400000000316150403640100021555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicsModel::TaxonomyTopics#resources
is_singleton: false
name: resources
params: ()
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/TaxonomyTopics/new-c.yaml000064400000000307150403640110020327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicsModel::TaxonomyTopics::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/TaxonomyTopics/required_prefix-c.yaml000064400000000332150403640110022731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicsModel::TaxonomyTopics::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/TaxonomyTopics/maker_target-i.yaml000064400000000332150403640110022207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicsModel::TaxonomyTopics#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/TaxonomyTopics/required_uri-c.yaml000064400000000324150403640120022235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicsModel::TaxonomyTopics::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/append_features-c.yaml000064400000000317150403640120017705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TaxonomyTopicsModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/TaxonomyTopicsModel/cdesc-TaxonomyTopicsModel.yaml000064400000000411150403640120021353 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::TaxonomyTopicsModel
includes: []

instance_methods: []

name: TaxonomyTopicsModel
superclass: 
ri/1.8/system/RSS/TrackBackModel20/TrackBackAbout/full_name-i.yaml000064400000000313150403640140020315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackAbout#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel20/TrackBackAbout/new-c.yaml000064400000000304150403640140017136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackAbout::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/TrackBackModel20/TrackBackAbout/required_prefix-c.yaml000064400000000327150403640140021547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackAbout::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel20/TrackBackAbout/cdesc-TrackBackAbout.yaml000064400000000734150403640140022033 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::TrackBackModel20::TrackBackAbout
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
name: TrackBackAbout
superclass: Element
ri/1.8/system/RSS/TrackBackModel20/TrackBackAbout/required_uri-c.yaml000064400000000321150403640150021044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackAbout::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel20/cdesc-TrackBackModel20.yaml000064400000000314150403640150017336 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::TrackBackModel20
includes: []

instance_methods: []

name: TrackBackModel20
superclass: 
ri/1.8/system/RSS/TrackBackModel20/TrackBackPing/cdesc-TrackBackPing.yaml000064400000000732150403640160021501 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: []

full_name: RSS::TrackBackModel20::TrackBackPing
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS09
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
name: TrackBackPing
superclass: Element
ri/1.8/system/RSS/TrackBackModel20/TrackBackPing/full_name-i.yaml000064400000000312150403640160020141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackPing#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel20/TrackBackPing/new-c.yaml000064400000000303150403640160016762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackPing::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/TrackBackModel20/TrackBackPing/required_prefix-c.yaml000064400000000326150403640160021373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackPing::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/TrackBackModel20/TrackBackPing/required_uri-c.yaml000064400000000320150403640160020667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackModel20::TrackBackPing::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/XML/cdesc-XML.yaml000064400000000262150403640170012522 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::XML
includes: []

instance_methods: []

name: XML
superclass: 
ri/1.8/system/RSS/XML/Element/%5b%5d-i.yaml000064400000000257150403640170013477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element#[]
is_singleton: false
name: "[]"
params: (name)
visibility: public
ri/1.8/system/RSS/XML/Element/each-i.yaml000064400000000263150403640170013523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element#each
is_singleton: false
name: each
params: (&block)
visibility: public
ri/1.8/system/RSS/XML/Element/full_name-i.yaml000064400000000267150403640170014571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/XML/Element/cdesc-Element.yaml000064400000001660150403640170015047 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: children
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: prefix
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: uri
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::XML::Element
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Element
superclass: Object
ri/1.8/system/RSS/XML/Element/new-c.yaml000064400000000340150403640170013402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element::new
is_singleton: true
name: new
params: (name, prefix=nil, uri=nil, attributes={}, children=[])
visibility: public
ri/1.8/system/RSS/XML/Element/%3c%3c-i.yaml000064400000000260150403640170013465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element#<<
is_singleton: false
name: "<<"
params: (child)
visibility: public
ri/1.8/system/RSS/XML/Element/to_s-i.yaml000064400000000255150403640200013562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/RSS/XML/Element/%3d%3d-i.yaml000064400000000256150403640200013466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/RSS/XML/Element/%5b%5d%3d-i.yaml000064400000000270150403640200013760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XML::Element#[]=
is_singleton: false
name: "[]="
params: (name, value)
visibility: public
ri/1.8/system/RSS/ImageFaviconModel/append_features-c.yaml000064400000000315150403640210017233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageFaviconModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/ImageFaviconModel/cdesc-ImageFaviconModel.yaml000064400000000475150403640210020245 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: []

full_name: RSS::ImageFaviconModel
includes: 
- !ruby/object:RI::IncludedModule 
  name: ImageModelUtils
instance_methods: []

name: ImageFaviconModel
superclass: 
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/full_name-i.yaml000064400000000312150403640210020363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageFaviconModel::ImageFavicon#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/cdesc-ImageFavicon.yaml000064400000001522150403640210021606 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AVAILABLE_SIZES
  value: "%w(small medium large)"
full_name: RSS::ImageFaviconModel::ImageFavicon
includes: 
- !ruby/object:RI::IncludedModule 
  name: RSS10
- !ruby/object:RI::IncludedModule 
  name: DublinCoreModel
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: image_size=
- !ruby/object:RI::MethodSummary 
  name: maker_target
- !ruby/object:RI::MethodSummary 
  name: setup_maker_attributes
- !ruby/object:RI::MethodSummary 
  name: size=
name: ImageFavicon
superclass: Element
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/new-c.yaml000064400000000303150403640220017205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageFaviconModel::ImageFavicon::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/required_prefix-c.yaml000064400000000326150403640220021616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageFaviconModel::ImageFavicon::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/image_size%3d-i.yaml000064400000000416150403640220021037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #size="
full_name: RSS::ImageFaviconModel::ImageFavicon#image_size=
is_singleton: false
name: image_size=
params: (new_value)
visibility: public
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/maker_target-i.yaml000064400000000327150403640220021075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageFaviconModel::ImageFavicon#maker_target
is_singleton: false
name: maker_target
params: (target)
visibility: private
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/setup_maker_attributes-i.yaml000064400000000354150403640220023215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageFaviconModel::ImageFavicon#setup_maker_attributes
is_singleton: false
name: setup_maker_attributes
params: (favicon)
visibility: private
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/required_uri-c.yaml000064400000000320150403640230021113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ImageFaviconModel::ImageFavicon::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/ImageFaviconModel/ImageFavicon/size%3d-i.yaml000064400000000372150403640230017677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: image_size=
block_params: 
comment: 
full_name: RSS::ImageFaviconModel::ImageFavicon#size=
is_singleton: false
name: size=
params: (new_value)
visibility: public
ri/1.8/system/RSS/UnknownTagError/cdesc-UnknownTagError.yaml000064400000000575150403640230017640 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: tag
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: uri
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::UnknownTagError
includes: []

instance_methods: []

name: UnknownTagError
superclass: InvalidRSSError
ri/1.8/system/RSS/UnknownTagError/new-c.yaml000064400000000266150403640230014462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::UnknownTagError::new
is_singleton: true
name: new
params: (tag, uri)
visibility: public
ri/1.8/system/RSS/ContentModel/cdesc-ContentModel.yaml000064400000000535150403640240016411 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "[\"#{CONTENT_PREFIX}_encoded\"]"
full_name: RSS::ContentModel
includes: []

instance_methods: []

name: ContentModel
superclass: 
ri/1.8/system/RSS/ContentModel/append_features-c.yaml000064400000000310150403640240016313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::ContentModel::append_features
is_singleton: true
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/Parser/parse-c.yaml000064400000000370150403640260013131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Parser::parse
is_singleton: true
name: parse
params: (rss, do_validate=true, ignore_unknown_element=true, parser_class=default_parser)
visibility: public
ri/1.8/system/RSS/Parser/default_parser%3d-c.yaml000064400000000527150403640260015317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set @@default_parser to new_value if it is one of the available parsers. Else raise NotValidXMLParser error.
full_name: RSS::Parser::default_parser=
is_singleton: true
name: default_parser=
params: (new_value)
visibility: public
ri/1.8/system/RSS/Parser/cdesc-Parser.yaml000064400000001047150403640270014115 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: default_parser
- !ruby/object:RI::MethodSummary 
  name: default_parser=
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
comment: 
constants: []

full_name: RSS::Parser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: maybe_xml?
- !ruby/object:RI::MethodSummary 
  name: normalize_rss
- !ruby/object:RI::MethodSummary 
  name: to_uri
name: Parser
superclass: Object
ri/1.8/system/RSS/Parser/new-c.yaml000064400000000320150403640270012604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Parser::new
is_singleton: true
name: new
params: (rss, parser_class=self.class.default_parser)
visibility: public
ri/1.8/system/RSS/Parser/normalize_rss-i.yaml000064400000000564150403640300014714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Try to get the XML associated with <tt>rss</tt>. Return <tt>rss</tt> if it already looks like XML, or treat it as a URI, or a file to get the XML,
full_name: RSS::Parser#normalize_rss
is_singleton: false
name: normalize_rss
params: (rss)
visibility: private
ri/1.8/system/RSS/Parser/default_parser-c.yaml000064400000000273150403640310015015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Parser::default_parser
is_singleton: true
name: default_parser
params: ()
visibility: public
ri/1.8/system/RSS/Parser/maybe_xml%3f-i.yaml000064400000000432150403640310014273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: maybe_xml? tests if source is a string that looks like XML.
full_name: RSS::Parser#maybe_xml?
is_singleton: false
name: maybe_xml?
params: (source)
visibility: private
ri/1.8/system/RSS/Parser/to_uri-i.yaml000064400000000441150403640310013321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempt to convert rss to a URI, but just return it if there's a ::URI::Error
full_name: RSS::Parser#to_uri
is_singleton: false
name: to_uri
params: (rss)
visibility: private
ri/1.8/system/RSS/BaseTrackBackModel/append_features-i.yaml000064400000000316150403640320017334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::BaseTrackBackModel#append_features
is_singleton: false
name: append_features
params: (klass)
visibility: public
ri/1.8/system/RSS/BaseTrackBackModel/cdesc-BaseTrackBackModel.yaml000064400000000617150403640320020425 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ELEMENTS
  value: "%w(ping about)"
full_name: RSS::BaseTrackBackModel
includes: 
- !ruby/object:RI::IncludedModule 
  name: TrackBackUtils
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
name: BaseTrackBackModel
superclass: 
ri/1.8/system/RSS/XMLParserListener/cdesc-XMLParserListener.yaml000064400000000477150403640330020276 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::XMLParserListener
includes: 
- !ruby/object:RI::IncludedModule 
  name: ListenerMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: xmldecl
name: XMLParserListener
superclass: BaseListener
ri/1.8/system/RSS/XMLParserListener/xmldecl-i.yaml000064400000000325150403640330015542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::XMLParserListener#xmldecl
is_singleton: false
name: xmldecl
params: (version, encoding, standalone)
visibility: public
ri/1.8/system/RSS/TrackBackUtils/trackback_validate-i.yaml000064400000000355150403640330017236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::TrackBackUtils#trackback_validate
is_singleton: false
name: trackback_validate
params: (ignore_unknown_element, tags, uri)
visibility: private
ri/1.8/system/RSS/TrackBackUtils/cdesc-TrackBackUtils.yaml000064400000000402150403640340017131 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RSS::TrackBackUtils
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: trackback_validate
name: TrackBackUtils
superclass: 
ri/1.8/system/RSS/Element/have_children_elements-c.yaml000064400000000314150403640340016640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::have_children_elements
is_singleton: true
name: have_children_elements
params: ()
visibility: public
ri/1.8/system/RSS/Element/set_next_element-i.yaml000064400000000326150403640350015525 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#set_next_element
is_singleton: false
name: set_next_element
params: (tag_name, next_element)
visibility: public
ri/1.8/system/RSS/Element/calc_indent-i.yaml000064400000000366150403640350014432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For backward compatibility
full_name: RSS::Element#calc_indent
is_singleton: false
name: calc_indent
params: ()
visibility: private
ri/1.8/system/RSS/Element/add_to_element_method-c.yaml000064400000000325150403640350016457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::add_to_element_method
is_singleton: true
name: add_to_element_method
params: (method_name)
visibility: public
ri/1.8/system/RSS/Element/tag_name-c.yaml000064400000000260150403640360013726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::tag_name
is_singleton: true
name: tag_name
params: ()
visibility: public
ri/1.8/system/RSS/Element/have_content%3f-c.yaml000064400000000272150403640360015131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::have_content?
is_singleton: true
name: have_content?
params: ()
visibility: public
ri/1.8/system/RSS/Element/full_name-i.yaml000064400000000262150403640360014125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#full_name
is_singleton: false
name: full_name
params: ()
visibility: public
ri/1.8/system/RSS/Element/converter%3d-i.yaml000064400000000275150403640370014473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#converter=
is_singleton: false
name: converter=
params: (converter)
visibility: public
ri/1.8/system/RSS/Element/cdesc-Element.yaml000064400000010175150403640370014412 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: do_validate
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_have_children_element
- !ruby/object:RI::MethodSummary 
  name: add_need_initialize_variable
- !ruby/object:RI::MethodSummary 
  name: add_plural_form
- !ruby/object:RI::MethodSummary 
  name: add_to_element_method
- !ruby/object:RI::MethodSummary 
  name: content_setup
- !ruby/object:RI::MethodSummary 
  name: def_corresponded_attr_reader
- !ruby/object:RI::MethodSummary 
  name: def_corresponded_attr_writer
- !ruby/object:RI::MethodSummary 
  name: get_attributes
- !ruby/object:RI::MethodSummary 
  name: have_children_elements
- !ruby/object:RI::MethodSummary 
  name: have_content?
- !ruby/object:RI::MethodSummary 
  name: inherited
- !ruby/object:RI::MethodSummary 
  name: inherited_base
- !ruby/object:RI::MethodSummary 
  name: install_get_attribute
- !ruby/object:RI::MethodSummary 
  name: install_model
- !ruby/object:RI::MethodSummary 
  name: install_must_call_validator
- !ruby/object:RI::MethodSummary 
  name: install_ns
- !ruby/object:RI::MethodSummary 
  name: models
- !ruby/object:RI::MethodSummary 
  name: must_call_validators
- !ruby/object:RI::MethodSummary 
  name: need_initialize_variables
- !ruby/object:RI::MethodSummary 
  name: need_parent?
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: plural_forms
- !ruby/object:RI::MethodSummary 
  name: required_prefix
- !ruby/object:RI::MethodSummary 
  name: required_uri
- !ruby/object:RI::MethodSummary 
  name: tag_name
- !ruby/object:RI::MethodSummary 
  name: to_element_methods
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: INDENT
  value: "\"  \""
- !ruby/object:RI::Constant 
  comment: 
  name: MUST_CALL_VALIDATORS
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: MODELS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: GET_ATTRIBUTES
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: HAVE_CHILDREN_ELEMENTS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: TO_ELEMENT_METHODS
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: NEED_INITIALIZE_VARIABLES
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: PLURAL_FORMS
  value: "{}"
full_name: RSS::Element
includes: 
- !ruby/object:RI::IncludedModule 
  name: Utils
- !ruby/object:RI::IncludedModule 
  name: SetupMaker
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __validate
- !ruby/object:RI::MethodSummary 
  name: _attrs
- !ruby/object:RI::MethodSummary 
  name: _tags
- !ruby/object:RI::MethodSummary 
  name: _validate
- !ruby/object:RI::MethodSummary 
  name: calc_indent
- !ruby/object:RI::MethodSummary 
  name: children
- !ruby/object:RI::MethodSummary 
  name: collect_attrs
- !ruby/object:RI::MethodSummary 
  name: content_is_set?
- !ruby/object:RI::MethodSummary 
  name: convert
- !ruby/object:RI::MethodSummary 
  name: converter=
- !ruby/object:RI::MethodSummary 
  name: empty_content?
- !ruby/object:RI::MethodSummary 
  name: full_name
- !ruby/object:RI::MethodSummary 
  name: have_required_elements?
- !ruby/object:RI::MethodSummary 
  name: have_xml_content?
- !ruby/object:RI::MethodSummary 
  name: initialize_have_children_elements
- !ruby/object:RI::MethodSummary 
  name: initialize_variables
- !ruby/object:RI::MethodSummary 
  name: make_start_tag
- !ruby/object:RI::MethodSummary 
  name: need_base64_encode?
- !ruby/object:RI::MethodSummary 
  name: set_next_element
- !ruby/object:RI::MethodSummary 
  name: tag
- !ruby/object:RI::MethodSummary 
  name: tag_filter
- !ruby/object:RI::MethodSummary 
  name: tag_name
- !ruby/object:RI::MethodSummary 
  name: tag_name_with_prefix
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: valid?
- !ruby/object:RI::MethodSummary 
  name: validate
- !ruby/object:RI::MethodSummary 
  name: validate_attribute
- !ruby/object:RI::MethodSummary 
  name: validate_for_stream
- !ruby/object:RI::MethodSummary 
  name: xmled_content
name: Element
superclass: Object
ri/1.8/system/RSS/Element/inherited_base-c.yaml000064400000000274150403640370015126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::inherited_base
is_singleton: true
name: inherited_base
params: ()
visibility: public
ri/1.8/system/RSS/Element/convert-i.yaml000064400000000263150403640400013637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#convert
is_singleton: false
name: convert
params: (value)
visibility: public
ri/1.8/system/RSS/Element/install_ns-c.yaml000064400000000277150403640400014324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::install_ns
is_singleton: true
name: install_ns
params: (prefix, uri)
visibility: public
ri/1.8/system/RSS/Element/add_need_initialize_variable-c.yaml000064400000000345150403640400017763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::add_need_initialize_variable
is_singleton: true
name: add_need_initialize_variable
params: (variable_name)
visibility: public
ri/1.8/system/RSS/Element/_tags-i.yaml000064400000000253150403640410013254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#_tags
is_singleton: false
name: _tags
params: ()
visibility: private
ri/1.8/system/RSS/Element/def_corresponded_attr_reader-c.yaml000064400000000346150403640420020036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::def_corresponded_attr_reader
is_singleton: true
name: def_corresponded_attr_reader
params: (name, type=nil)
visibility: public
ri/1.8/system/RSS/Element/validate_attribute-i.yaml000064400000000305150403640430016033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#validate_attribute
is_singleton: false
name: validate_attribute
params: ()
visibility: private
ri/1.8/system/RSS/Element/content_is_set%3f-i.yaml000064400000000277150403640440015506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#content_is_set?
is_singleton: false
name: content_is_set?
params: ()
visibility: private
ri/1.8/system/RSS/Element/__validate-i.yaml000064400000000347150403640450014256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#__validate
is_singleton: false
name: __validate
params: (ignore_unknown_element, tags=_tags, recursive=true)
visibility: private
ri/1.8/system/RSS/Element/install_model-c.yaml000064400000000350150403640450015001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::install_model
is_singleton: true
name: install_model
params: (tag, uri, occurs=nil, getter=nil, plural=false)
visibility: public
ri/1.8/system/RSS/Element/must_call_validators-c.yaml000064400000000310150403640460016363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::must_call_validators
is_singleton: true
name: must_call_validators
params: ()
visibility: public
ri/1.8/system/RSS/Element/have_required_elements%3f-i.yaml000064400000000321150403640470017176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#have_required_elements?
is_singleton: false
name: have_required_elements?
params: ()
visibility: protected
ri/1.8/system/RSS/Element/install_must_call_validator-c.yaml000064400000000341150403640470017733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::install_must_call_validator
is_singleton: true
name: install_must_call_validator
params: (prefix, uri)
visibility: public
ri/1.8/system/RSS/Element/new-c.yaml000064400000000301150403640500012734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::new
is_singleton: true
name: new
params: (do_validate=true, attrs=nil)
visibility: public
ri/1.8/system/RSS/Element/add_have_children_element-c.yaml000064400000000354150403640500017267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::add_have_children_element
is_singleton: true
name: add_have_children_element
params: (variable_name, plural_name)
visibility: public
ri/1.8/system/RSS/Element/_validate-i.yaml000064400000000356150403640510014114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#_validate
is_singleton: false
name: _validate
params: (ignore_unknown_element, tags, uri, models=self.class.models)
visibility: private
ri/1.8/system/RSS/Element/empty_content%3f-i.yaml000064400000000275150403640510015352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#empty_content?
is_singleton: false
name: empty_content?
params: ()
visibility: private
ri/1.8/system/RSS/Element/valid%3f-i.yaml000064400000000307150403640520013556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#valid?
is_singleton: false
name: valid?
params: (ignore_unknown_element=true)
visibility: public
ri/1.8/system/RSS/Element/get_attributes-c.yaml000064400000000274150403640520015203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::get_attributes
is_singleton: true
name: get_attributes
params: ()
visibility: public
ri/1.8/system/RSS/Element/children-i.yaml000064400000000261150403640530013751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#children
is_singleton: false
name: children
params: ()
visibility: private
ri/1.8/system/RSS/Element/initialize_variables-i.yaml000064400000000316150403640530016353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#initialize_variables
is_singleton: false
name: initialize_variables
params: (attrs)
visibility: private
ri/1.8/system/RSS/Element/def_corresponded_attr_writer-c.yaml000064400000000365150403640540020114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::def_corresponded_attr_writer
is_singleton: true
name: def_corresponded_attr_writer
params: (name, type=nil, disp_name=nil)
visibility: public
ri/1.8/system/RSS/Element/have_xml_content%3f-i.yaml000064400000000302150403640540016011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#have_xml_content?
is_singleton: false
name: have_xml_content?
params: ()
visibility: public
ri/1.8/system/RSS/Element/required_prefix-c.yaml000064400000000276150403640540015357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::required_prefix
is_singleton: true
name: required_prefix
params: ()
visibility: public
ri/1.8/system/RSS/Element/validate-i.yaml000064400000000313150403640540013751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#validate
is_singleton: false
name: validate
params: (ignore_unknown_element=true)
visibility: public
ri/1.8/system/RSS/Element/content_setup-c.yaml000064400000000321150403640550015044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::content_setup
is_singleton: true
name: content_setup
params: (type=nil, disp_name=nil)
visibility: public
ri/1.8/system/RSS/Element/add_plural_form-c.yaml000064400000000316150403640550015310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::add_plural_form
is_singleton: true
name: add_plural_form
params: (singular, plural)
visibility: public
ri/1.8/system/RSS/Element/tag_name-i.yaml000064400000000260150403640560013736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#tag_name
is_singleton: false
name: tag_name
params: ()
visibility: public
ri/1.8/system/RSS/Element/to_s-i.yaml000064400000000304150403640560013126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#to_s
is_singleton: false
name: to_s
params: (need_convert=true, indent='')
visibility: public
ri/1.8/system/RSS/Element/tag_filter-i.yaml000064400000000271150403640560014305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#tag_filter
is_singleton: false
name: tag_filter
params: (tags)
visibility: private
ri/1.8/system/RSS/Element/plural_forms-c.yaml000064400000000270150403640570014664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::plural_forms
is_singleton: true
name: plural_forms
params: ()
visibility: public
ri/1.8/system/RSS/Element/_attrs-i.yaml000064400000000255150403640570013464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#_attrs
is_singleton: false
name: _attrs
params: ()
visibility: private
ri/1.8/system/RSS/Element/models-c.yaml000064400000000254150403640570013444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::models
is_singleton: true
name: models
params: ()
visibility: public
ri/1.8/system/RSS/Element/validate_for_stream-i.yaml000064400000000347150403640600016176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#validate_for_stream
is_singleton: false
name: validate_for_stream
params: (tags, ignore_unknown_element=true)
visibility: public
ri/1.8/system/RSS/Element/collect_attrs-i.yaml000064400000000273150403640600015024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#collect_attrs
is_singleton: false
name: collect_attrs
params: ()
visibility: private
ri/1.8/system/RSS/Element/xmled_content-i.yaml000064400000000273150403640610015026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#xmled_content
is_singleton: false
name: xmled_content
params: ()
visibility: private
ri/1.8/system/RSS/Element/need_base64_encode%3f-i.yaml000064400000000306150403640620016053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#need_base64_encode?
is_singleton: false
name: need_base64_encode?
params: ()
visibility: public
ri/1.8/system/RSS/Element/need_parent%3f-c.yaml000064400000000270150403640620014735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::need_parent?
is_singleton: true
name: need_parent?
params: ()
visibility: public
ri/1.8/system/RSS/Element/required_uri-c.yaml000064400000000270150403640620014652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::required_uri
is_singleton: true
name: required_uri
params: ()
visibility: public
ri/1.8/system/RSS/Element/to_element_methods-c.yaml000064400000000304150403640630016030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::to_element_methods
is_singleton: true
name: to_element_methods
params: ()
visibility: public
ri/1.8/system/RSS/Element/initialize_have_children_elements-i.yaml000064400000000343150403640630021073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#initialize_have_children_elements
is_singleton: false
name: initialize_have_children_elements
params: ()
visibility: private
ri/1.8/system/RSS/Element/tag-i.yaml000064400000000312150403640630012732 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#tag
is_singleton: false
name: tag
params: (indent, additional_attrs={}, &block)
visibility: private
ri/1.8/system/RSS/Element/tag_name_with_prefix-i.yaml000064400000000317150403640640016350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#tag_name_with_prefix
is_singleton: false
name: tag_name_with_prefix
params: (prefix)
visibility: private
ri/1.8/system/RSS/Element/inherited-c.yaml000064400000000267150403640640014136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::inherited
is_singleton: true
name: inherited
params: (klass)
visibility: public
ri/1.8/system/RSS/Element/need_initialize_variables-c.yaml000064400000000322150403640640017337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::need_initialize_variables
is_singleton: true
name: need_initialize_variables
params: ()
visibility: public
ri/1.8/system/RSS/Element/make_start_tag-i.yaml000064400000000327150403640650015154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element#make_start_tag
is_singleton: false
name: make_start_tag
params: (indent, next_indent, attrs)
visibility: private
ri/1.8/system/RSS/Element/install_get_attribute-c.yaml000064400000000415150403640650016547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::Element::install_get_attribute
is_singleton: true
name: install_get_attribute
params: (name, uri, required=true, type=nil, disp_name=nil, element_name=nil)
visibility: public
ri/1.8/system/RSS/NotWellFormedError/new-c.yaml000064400000000615150403640650015114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new NotWellFormedError for an error at <tt>line</tt> in <tt>element</tt>. If a block is given the return value of the block ends up in the error message.
full_name: RSS::NotWellFormedError::new
is_singleton: true
name: new
params: (line=nil, element=nil)
visibility: public
ri/1.8/system/RSS/NotWellFormedError/cdesc-NotWellFormedError.yaml000064400000000576150403640650020723 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: element
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: line
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::NotWellFormedError
includes: []

instance_methods: []

name: NotWellFormedError
superclass: Error
ri/1.8/system/RSS/UnknownConversionMethodError/cdesc-UnknownConversionMethodError.yaml000064400000000615150403640650025167 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: from
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: to
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::UnknownConversionMethodError
includes: []

instance_methods: []

name: UnknownConversionMethodError
superclass: Error
ri/1.8/system/RSS/UnknownConversionMethodError/new-c.yaml000064400000000303150403640660017234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::UnknownConversionMethodError::new
is_singleton: true
name: new
params: (to, from)
visibility: public
ri/1.8/system/RSS/MissingAttributeError/cdesc-MissingAttributeError.yaml000064400000000617150403640670022251 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attribute
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: tag
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RSS::MissingAttributeError
includes: []

instance_methods: []

name: MissingAttributeError
superclass: InvalidRSSError
ri/1.8/system/RSS/MissingAttributeError/new-c.yaml000064400000000302150403640670015663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RSS::MissingAttributeError::new
is_singleton: true
name: new
params: (tag, attribute)
visibility: public
ri/1.8/system/Resolv/IPv4/cdesc-IPv4.yaml000064400000001555150403640700013576 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The raw IPv4 address as a String.
  name: address
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create
comment: 
- !ruby/struct:SM::Flow::P 
  body: A Resolv::DNS IPv4 address.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Regular expression IPv4 addresses must match.
  name: Regex256
  value: /0                |1(?:[0-9][0-9]?)?                |2(?:[0-4][0-9]?|5[0-5]?|[6-9])?                |[3-9][0-9]?/x
- !ruby/object:RI::Constant 
  comment: 
  name: Regex
  value: /\A(#{Regex256})\.(#{Regex256})\.(#{Regex256})\.(#{Regex256})\z/
full_name: Resolv::IPv4
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_name
name: IPv4
superclass: Object
ri/1.8/system/Resolv/IPv4/to_name-i.yaml000064400000000404150403640700013575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Turns this IPv4 address into a Resolv::DNS::Name.
full_name: Resolv::IPv4#to_name
is_singleton: false
name: to_name
params: ()
visibility: public
ri/1.8/system/Resolv/IPv4/create-c.yaml000064400000000257150403640710013417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Resolv::IPv4::create
is_singleton: true
name: create
params: (arg)
visibility: public
ri/1.8/system/Resolv/Hosts/getaddresses-i.yaml000064400000000436150403640720015155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets all IP addresses for <tt>name</tt> from the hosts file.
full_name: Resolv::Hosts#getaddresses
is_singleton: false
name: getaddresses
params: (name)
visibility: public
ri/1.8/system/Resolv/Hosts/getaddress-i.yaml000064400000000427150403640720014625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets the IP address of <tt>name</tt> from the hosts file.
full_name: Resolv::Hosts#getaddress
is_singleton: false
name: getaddress
params: (name)
visibility: public
ri/1.8/system/Resolv/Hosts/cdesc-Hosts.yaml000064400000001507150403640720014431 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: DNS::Hosts is a hostname resolver that uses the system hosts file.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DefaultFileName
  value: Win32::Resolv.get_hosts_path
- !ruby/object:RI::Constant 
  comment: 
  name: DefaultFileName
  value: "'/etc/hosts'"
full_name: Resolv::Hosts
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each_address
- !ruby/object:RI::MethodSummary 
  name: each_name
- !ruby/object:RI::MethodSummary 
  name: getaddress
- !ruby/object:RI::MethodSummary 
  name: getaddresses
- !ruby/object:RI::MethodSummary 
  name: getname
- !ruby/object:RI::MethodSummary 
  name: getnames
name: Hosts
superclass: Object
ri/1.8/system/Resolv/Hosts/new-c.yaml000064400000000454150403640730013264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new DNS::Hosts, using <tt>filename</tt> for its data source.
full_name: Resolv::Hosts::new
is_singleton: true
name: new
params: (filename = DefaultFileName)
visibility: public
ri/1.8/system/Resolv/Hosts/each_address-i.yaml000064400000000470150403640730015104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all IP addresses for <tt>name</tt> retrieved from the hosts file.
full_name: Resolv::Hosts#each_address
is_singleton: false
name: each_address
params: (name, &proc)
visibility: public
ri/1.8/system/Resolv/Hosts/getnames-i.yaml000064400000000431150403640740014300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets all hostnames for <tt>address</tt> from the hosts file.
full_name: Resolv::Hosts#getnames
is_singleton: false
name: getnames
params: (address)
visibility: public
ri/1.8/system/Resolv/Hosts/each_name-i.yaml000064400000000465150403640740014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all hostnames for <tt>address</tt> retrieved from the hosts file.
full_name: Resolv::Hosts#each_name
is_singleton: false
name: each_name
params: (address, &proc)
visibility: public
ri/1.8/system/Resolv/Hosts/getname-i.yaml000064400000000425150403640740014120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets the hostname of <tt>address</tt> from the hosts file.
full_name: Resolv::Hosts#getname
is_singleton: false
name: getname
params: (address)
visibility: public
ri/1.8/system/Resolv/getaddresses-c.yaml000064400000000405150403640750014046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up all IP address for <tt>name</tt>.
full_name: Resolv::getaddresses
is_singleton: true
name: getaddresses
params: (name)
visibility: public
ri/1.8/system/Resolv/getaddresses-i.yaml000064400000000405150403640750014054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up all IP address for <tt>name</tt>.
full_name: Resolv#getaddresses
is_singleton: false
name: getaddresses
params: (name)
visibility: public
ri/1.8/system/Resolv/getname-c.yaml000064400000000376150403640760013021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up the hostname of <tt>address</tt>.
full_name: Resolv::getname
is_singleton: true
name: getname
params: (address)
visibility: public
ri/1.8/system/Resolv/ResolvError/cdesc-ResolvError.yaml000064400000000450150403640770017002 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Indicates a failure to resolve a name or address.
constants: []

full_name: Resolv::ResolvError
includes: []

instance_methods: []

name: ResolvError
superclass: StandardError
ri/1.8/system/Resolv/getnames-c.yaml000064400000000402150403640770013173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up all hostnames for <tt>address</tt>.
full_name: Resolv::getnames
is_singleton: true
name: getnames
params: (address)
visibility: public
ri/1.8/system/Resolv/getaddress-i.yaml000064400000000407150403640770013530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up the first IP address for <tt>name</tt>.
full_name: Resolv#getaddress
is_singleton: false
name: getaddress
params: (name)
visibility: public
ri/1.8/system/Resolv/IPv6/to_name-i.yaml000064400000000404150403641000013571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Turns this IPv6 address into a Resolv::DNS::Name.
full_name: Resolv::IPv6#to_name
is_singleton: false
name: to_name
params: ()
visibility: public
ri/1.8/system/Resolv/IPv6/create-c.yaml000064400000001024150403641000013403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Creates a new IPv6 address from <tt>arg</tt> which may be:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "IPv6:"
    body: returns <tt>arg</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "String:"
    body: <tt>arg</tt> must match one of the IPv6::Regex* constants
  type: :NOTE
full_name: Resolv::IPv6::create
is_singleton: true
name: create
params: (arg)
visibility: public
ri/1.8/system/Resolv/IPv6/cdesc-IPv6.yaml000064400000003431150403641010013570 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The raw IPv6 address as a String.
  name: address
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create
comment: 
- !ruby/struct:SM::Flow::P 
  body: A Resolv::DNS IPv6 address.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: IPv6 address format a:b:c:d:e:f:g:h
  name: Regex_8Hex
  value: /\A       (?:[0-9A-Fa-f]{1,4}:){7}          [0-9A-Fa-f]{1,4}       \z/x
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Compressed IPv6 address format a::b
  name: Regex_CompressedHex
  value: "/\\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"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z
  name: Regex_6Hex4Dec
  value: /\A       ((?:[0-9A-Fa-f]{1,4}:){6,6})       (\d+)\.(\d+)\.(\d+)\.(\d+)       \z/x
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z
  name: Regex_CompressedHex4Dec
  value: "/\\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"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A composite IPv6 address Regexp.
  name: Regex
  value: /       (?:#{Regex_8Hex}) |       (?:#{Regex_CompressedHex}) |       (?:#{Regex_6Hex4Dec}) |       (?:#{Regex_CompressedHex4Dec})/x
full_name: Resolv::IPv6
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_name
name: IPv6
superclass: Object
ri/1.8/system/Resolv/ResolvTimeout/cdesc-ResolvTimeout.yaml000064400000000452150403641010017662 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Indicates a timeout resolving a name or address.
constants: []

full_name: Resolv::ResolvTimeout
includes: []

instance_methods: []

name: ResolvTimeout
superclass: TimeoutError
ri/1.8/system/Resolv/new-c.yaml000064400000000421150403641020012147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Resolv using <tt>resolvers</tt>.
full_name: Resolv::new
is_singleton: true
name: new
params: (resolvers=[Hosts.new, DNS.new])
visibility: public
ri/1.8/system/Resolv/each_address-i.yaml000064400000000435150403641020013776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: name
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all IP addresses for <tt>name</tt>.
full_name: Resolv#each_address
is_singleton: false
name: each_address
params: (name) {|name| ...}
visibility: public
ri/1.8/system/Resolv/each_address-c.yaml000064400000000424150403641030013767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all IP addresses for <tt>name</tt>.
full_name: Resolv::each_address
is_singleton: true
name: each_address
params: (name, &block)
visibility: public
ri/1.8/system/Resolv/cdesc-Resolv.yaml000064400000004555150403641030013504 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: each_address
- !ruby/object:RI::MethodSummary 
  name: each_name
- !ruby/object:RI::MethodSummary 
  name: getaddress
- !ruby/object:RI::MethodSummary 
  name: getaddresses
- !ruby/object:RI::MethodSummary 
  name: getname
- !ruby/object:RI::MethodSummary 
  name: getnames
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Resolv is a thread-aware DNS resolver library written in Ruby. Resolv can handle multiple DNS requests concurrently without blocking. The ruby interpreter.
- !ruby/struct:SM::Flow::P 
  body: "See also resolv-replace.rb to replace the libc resolver with # Resolv."
- !ruby/struct:SM::Flow::P 
  body: Resolv can look up various DNS resources using the DNS module directly.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p Resolv.getaddress &quot;www.ruby-lang.org&quot;\n  p Resolv.getname &quot;210.251.121.214&quot;\n\n  Resolv::DNS.open do |dns|\n    ress = dns.getresources &quot;www.ruby-lang.org&quot;, Resolv::DNS::Resource::IN::A\n    p ress.map { |r| r.address }\n    ress = dns.getresources &quot;ruby-lang.org&quot;, Resolv::DNS::Resource::IN::MX\n    p ress.map { |r| [r.exchange.to_s, r.preference] }\n  end\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Bugs
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: NIS is not supported.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: /etc/nsswitch.conf is not supported.
  type: :BULLET
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Default resolver to use for Resolv class methods.
  name: DefaultResolver
  value: self.new
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Address Regexp to use for matching IP addresses.
  name: AddressRegex
  value: /(?:#{IPv4::Regex})|(?:#{IPv6::Regex})/
full_name: Resolv
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each_address
- !ruby/object:RI::MethodSummary 
  name: each_name
- !ruby/object:RI::MethodSummary 
  name: getaddress
- !ruby/object:RI::MethodSummary 
  name: getaddresses
- !ruby/object:RI::MethodSummary 
  name: getname
- !ruby/object:RI::MethodSummary 
  name: getnames
name: Resolv
superclass: Object
ri/1.8/system/Resolv/each_name-c.yaml000064400000000420150403641030013256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all hostnames for <tt>address</tt>.
full_name: Resolv::each_name
is_singleton: true
name: each_name
params: (address, &proc)
visibility: public
ri/1.8/system/Resolv/getnames-i.yaml000064400000000402150403641040013170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up all hostnames for <tt>address</tt>.
full_name: Resolv#getnames
is_singleton: false
name: getnames
params: (address)
visibility: public
ri/1.8/system/Resolv/each_name-i.yaml000064400000000444150403641040013273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: name.to_s
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all hostnames for <tt>address</tt>.
full_name: Resolv#each_name
is_singleton: false
name: each_name
params: (address) {|name.to_s| ...}
visibility: public
ri/1.8/system/Resolv/getname-i.yaml000064400000000376150403641050013020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up the hostname of <tt>address</tt>.
full_name: Resolv#getname
is_singleton: false
name: getname
params: (address)
visibility: public
ri/1.8/system/Resolv/getaddress-c.yaml000064400000000407150403641050013512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up the first IP address for <tt>name</tt>.
full_name: Resolv::getaddress
is_singleton: true
name: getaddress
params: (name)
visibility: public
ri/1.8/system/Resolv/DNS/OpCode/cdesc-OpCode.yaml000064400000000300150403641060015163 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::OpCode
includes: []

instance_methods: []

name: OpCode
superclass: 
ri/1.8/system/Resolv/DNS/getaddresses-i.yaml000064400000000663150403641060014501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets all IP addresses for <tt>name</tt> from the DNS resolver.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> can be a Resolv::DNS::Name or a String. Retrieved addresses will be a Resolv::IPv4 or Resolv::IPv6
full_name: Resolv::DNS#getaddresses
is_singleton: false
name: getaddresses
params: (name)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/MINFO/new-c.yaml000064400000000306150403641070015241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Resolv::DNS::Resource::MINFO::new
is_singleton: true
name: new
params: (rmailbx, emailbx)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/MINFO/cdesc-MINFO.yaml000064400000001223150403641100016150 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Mailbox to use for error messages related to the mail list or mailbox.
  name: emailbx
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Domain name responsible for this mail list or mailbox.
  name: rmailbx
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Mailing list or mailbox information.
constants: []

full_name: Resolv::DNS::Resource::MINFO
includes: []

instance_methods: []

name: MINFO
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/NS/cdesc-NS.yaml000064400000000416150403641110015274 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: An authoritative name server.
constants: []

full_name: Resolv::DNS::Resource::NS
includes: []

instance_methods: []

name: NS
superclass: DomainName
ri/1.8/system/Resolv/DNS/Resource/ANY/cdesc-ANY.yaml000064400000000415150403641110015511 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A Query type requesting any RR.
constants: []

full_name: Resolv::DNS::Resource::ANY
includes: []

instance_methods: []

name: ANY
superclass: Query
ri/1.8/system/Resolv/DNS/Resource/DomainName/new-c.yaml000064400000000420150403641120016372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new DomainName from <tt>name</tt>.
full_name: Resolv::DNS::Resource::DomainName::new
is_singleton: true
name: new
params: (name)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/DomainName/cdesc-DomainName.yaml000064400000000717150403641130020462 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The name of this DomainName.
  name: name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Domain Name resource abstract class.
constants: []

full_name: Resolv::DNS::Resource::DomainName
includes: []

instance_methods: []

name: DomainName
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/Generic/cdesc-Generic.yaml000064400000000712150403641130017365 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Data for this generic resource.
  name: data
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A generic resource abstract class.
constants: []

full_name: Resolv::DNS::Resource::Generic
includes: []

instance_methods: []

name: Generic
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/Generic/new-c.yaml000064400000000400150403641140015736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new generic resource.
full_name: Resolv::DNS::Resource::Generic::new
is_singleton: true
name: new
params: (data)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/HINFO/cdesc-HINFO.yaml000064400000001112150403641140016137 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: CPU architecture for this resource.
  name: cpu
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Operating system for this resource.
  name: os
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Host Information resource.
constants: []

full_name: Resolv::DNS::Resource::HINFO
includes: []

instance_methods: []

name: HINFO
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/HINFO/new-c.yaml000064400000000432150403641150015233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new HINFO running <tt>os</tt> on <tt>cpu</tt>.
full_name: Resolv::DNS::Resource::HINFO::new
is_singleton: true
name: new
params: (cpu, os)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/cdesc-Resource.yaml000064400000001054150403641150016226 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Remaining Time To Live for this Resource.
  name: ttl
  rw: R
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A DNS resource abstract class.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ClassInsensitiveTypes
  value: "[ # :nodoc:         NS, CNAME, SOA, PTR, HINFO, MINFO, MX, TXT, ANY"
full_name: Resolv::DNS::Resource
includes: []

instance_methods: []

name: Resource
superclass: Query
ri/1.8/system/Resolv/DNS/Resource/IN/SRV/new-c.yaml000064400000000716150403641150015355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a SRV resource record.
- !ruby/struct:SM::Flow::P 
  body: "See the documentation for #priority, #weight, #port and #target for <tt>priority</tt>, <tt>weight</tt>, +port and <tt>target</tt> respectively."
full_name: Resolv::DNS::Resource::IN::SRV::new
is_singleton: true
name: new
params: (priority, weight, port, target)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/IN/SRV/cdesc-SRV.yaml000064400000004112150403641150016067 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The port on this target host of this service.
  - !ruby/struct:SM::Flow::P 
    body: The range is 0-65535.
  name: port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The priority of this target host.
  - !ruby/struct:SM::Flow::P 
    body: 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.
  name: priority
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The domain name of the target host.
  - !ruby/struct:SM::Flow::P 
    body: A target of &quot;.&quot; means that the service is decidedly not available at this domain.
  name: target
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A server selection mechanism.
  - !ruby/struct:SM::Flow::P 
    body: 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.
  name: weight
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: SRV resource record defined in RFC 2782
- !ruby/struct:SM::Flow::P 
  body: These records identify the hostname and port that a service is available at.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TypeValue
  value: "33"
- !ruby/object:RI::Constant 
  comment: 
  name: ClassValue
  value: IN::ClassValue
full_name: Resolv::DNS::Resource::IN::SRV
includes: []

instance_methods: []

name: SRV
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/IN/AAAA/new-c.yaml000064400000000415150403641150015362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new AAAA for <tt>address</tt>.
full_name: Resolv::DNS::Resource::IN::AAAA::new
is_singleton: true
name: new
params: (address)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/IN/AAAA/cdesc-AAAA.yaml000064400000001142150403641160016112 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The Resolv::IPv6 address for this AAAA.
  name: address
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: An IPv6 address record.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TypeValue
  value: "28"
- !ruby/object:RI::Constant 
  comment: 
  name: ClassValue
  value: IN::ClassValue
full_name: Resolv::DNS::Resource::IN::AAAA
includes: []

instance_methods: []

name: AAAA
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/IN/cdesc-IN.yaml000064400000000425150403641160015255 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: module IN contains ARPA Internet specific RRs.
constants: []

full_name: Resolv::DNS::Resource::IN
includes: []

instance_methods: []

name: IN
superclass: 
ri/1.8/system/Resolv/DNS/Resource/IN/A/new-c.yaml000064400000000407150403641170015062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new A for <tt>address</tt>.
full_name: Resolv::DNS::Resource::IN::A::new
is_singleton: true
name: new
params: (address)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/IN/A/cdesc-A.yaml000064400000001126150403641170015307 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The Resolv::IPv4 address for this A.
  name: address
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: IPv4 Address resource
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TypeValue
  value: "1"
- !ruby/object:RI::Constant 
  comment: 
  name: ClassValue
  value: IN::ClassValue
full_name: Resolv::DNS::Resource::IN::A
includes: []

instance_methods: []

name: A
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/IN/WKS/cdesc-WKS.yaml000064400000002164150403641170016062 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The host these services run on.
  name: address
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A bit map of enabled services on this host.
  - !ruby/struct:SM::Flow::P 
    body: 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.
  name: bitmap
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: IP protocol number for these services.
  name: protocol
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Well Known Service resource.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TypeValue
  value: "11"
- !ruby/object:RI::Constant 
  comment: 
  name: ClassValue
  value: IN::ClassValue
full_name: Resolv::DNS::Resource::IN::WKS
includes: []

instance_methods: []

name: WKS
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/IN/WKS/new-c.yaml000064400000000321150403641200015333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Resolv::DNS::Resource::IN::WKS::new
is_singleton: true
name: new
params: (address, protocol, bitmap)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/PTR/cdesc-PTR.yaml000064400000000421150403641200015542 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A Pointer to another DNS name.
constants: []

full_name: Resolv::DNS::Resource::PTR
includes: []

instance_methods: []

name: PTR
superclass: DomainName
ri/1.8/system/Resolv/DNS/Resource/CNAME/cdesc-CNAME.yaml000064400000000427150403641210016105 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The canonical name for an alias.
constants: []

full_name: Resolv::DNS::Resource::CNAME
includes: []

instance_methods: []

name: CNAME
superclass: DomainName
ri/1.8/system/Resolv/DNS/Resource/SOA/new-c.yaml000064400000000545150403641210015014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new SOA record. See the attr documentation for the details of each argument.
full_name: Resolv::DNS::Resource::SOA::new
is_singleton: true
name: new
params: (mname, rname, serial, refresh, retry_, expire, minimum)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/SOA/cdesc-SOA.yaml000064400000003040150403641210015475 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Time in seconds that a secondary name server is to use the data before refreshing from the primary name server.
  name: expire
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The minimum number of seconds to be used for TTL values in RRs.
  name: minimum
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Name of the host where the master zone file for this zone resides.
  name: mname
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: How often, in seconds, a secondary name server is to check for updates from the primary name server.
  name: refresh
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: How often, in seconds, a secondary name server is to retry after a failure to check for a refresh.
  name: retry
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The person responsible for this domain name.
  name: rname
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The version number of the zone file.
  name: serial
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Start Of Authority resource.
constants: []

full_name: Resolv::DNS::Resource::SOA
includes: []

instance_methods: []

name: SOA
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/TXT/cdesc-TXT.yaml000064400000000773150403641220015602 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Returns an Array of Strings for this TXT record.
  name: strings
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unstructured text resource.
constants: []

full_name: Resolv::DNS::Resource::TXT
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: data
name: TXT
superclass: Resource
ri/1.8/system/Resolv/DNS/Resource/TXT/data-i.yaml000064400000000412150403641220015171 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first string from <tt>strings</tt>.
full_name: Resolv::DNS::Resource::TXT#data
is_singleton: false
name: data
params: ()
visibility: public
ri/1.8/system/Resolv/DNS/Resource/TXT/new-c.yaml000064400000000317150403641230015050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Resolv::DNS::Resource::TXT::new
is_singleton: true
name: new
params: (first_string, *rest_strings)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/MX/new-c.yaml000064400000000502150403641230014711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new MX record with <tt>preference</tt>, accepting mail at <tt>exchange</tt>.
full_name: Resolv::DNS::Resource::MX::new
is_singleton: true
name: new
params: (preference, exchange)
visibility: public
ri/1.8/system/Resolv/DNS/Resource/MX/cdesc-MX.yaml000064400000001070150403641230015304 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The host of this MX.
  name: exchange
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The preference for this MX.
  name: preference
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Mail Exchanger resource.
constants: []

full_name: Resolv::DNS::Resource::MX
includes: []

instance_methods: []

name: MX
superclass: Resource
ri/1.8/system/Resolv/DNS/Query/cdesc-Query.yaml000064400000000404150403641240015060 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A DNS query abstract class.
constants: []

full_name: Resolv::DNS::Query
includes: []

instance_methods: []

name: Query
superclass: Object
ri/1.8/system/Resolv/DNS/each_resource-i.yaml000064400000000542150403641240014627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Iterates over all <tt>typeclass</tt> DNS resources for <tt>name</tt>. See #getresource for argument details."
full_name: Resolv::DNS#each_resource
is_singleton: false
name: each_resource
params: (name, typeclass, &proc)
visibility: public
ri/1.8/system/Resolv/DNS/Name/cdesc-Name.yaml000064400000000714150403641250014413 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: create
comment: 
- !ruby/struct:SM::Flow::P 
  body: A representation of a DNS name.
constants: []

full_name: Resolv::DNS::Name
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: absolute?
- !ruby/object:RI::MethodSummary 
  name: subdomain_of?
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Name
superclass: Object
ri/1.8/system/Resolv/DNS/Name/absolute%3f-i.yaml000064400000000372150403641250015016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: True if this name is absolute.
full_name: Resolv::DNS::Name#absolute?
is_singleton: false
name: absolute?
params: ()
visibility: public
ri/1.8/system/Resolv/DNS/Name/create-c.yaml000064400000000767150403641250014147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Creates a new DNS name from <tt>arg</tt>. <tt>arg</tt> can be:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Name:"
    body: returns <tt>arg</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "String:"
    body: Creates a new Name.
  type: :NOTE
full_name: Resolv::DNS::Name::create
is_singleton: true
name: create
params: (arg)
visibility: public
ri/1.8/system/Resolv/DNS/Name/subdomain_of%3f-i.yaml000064400000001627150403641250015651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if <tt>other</tt> is a subdomain.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  domain = Resolv::DNS::Name.create(&quot;y.z&quot;)\n  p Resolv::DNS::Name.create(&quot;w.x.y.z&quot;).subdomain_of?(domain) #=&gt; true\n  p Resolv::DNS::Name.create(&quot;x.y.z&quot;).subdomain_of?(domain) #=&gt; true\n  p Resolv::DNS::Name.create(&quot;y.z&quot;).subdomain_of?(domain) #=&gt; false\n  p Resolv::DNS::Name.create(&quot;z&quot;).subdomain_of?(domain) #=&gt; false\n  p Resolv::DNS::Name.create(&quot;x.y.z.&quot;).subdomain_of?(domain) #=&gt; false\n  p Resolv::DNS::Name.create(&quot;w.z&quot;).subdomain_of?(domain) #=&gt; false\n"
full_name: Resolv::DNS::Name#subdomain_of?
is_singleton: false
name: subdomain_of?
params: (other)
visibility: public
ri/1.8/system/Resolv/DNS/Name/to_s-i.yaml000064400000001143150403641250013643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns the domain name as a string.
- !ruby/struct:SM::Flow::P 
  body: The domain name doesn't have a trailing dot even if the name object is absolute.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p Resolv::DNS::Name.create(&quot;x.y.z.&quot;).to_s #=&gt; &quot;x.y.z&quot;\n  p Resolv::DNS::Name.create(&quot;x.y.z&quot;).to_s #=&gt; &quot;x.y.z&quot;\n"
full_name: Resolv::DNS::Name#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Resolv/DNS/Requester/Sender/cdesc-Sender.yaml000064400000000321150403641260017265 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester::Sender
includes: []

instance_methods: []

name: Sender
superclass: Object
ri/1.8/system/Resolv/DNS/Requester/ConnectedUDP/cdesc-ConnectedUDP.yaml000064400000000340150403641300021347 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester::ConnectedUDP
includes: []

instance_methods: []

name: ConnectedUDP
superclass: Requester
ri/1.8/system/Resolv/DNS/Requester/ConnectedUDP/Sender/cdesc-Sender.yaml000064400000000352150403641310021540 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester::ConnectedUDP::Sender
includes: []

instance_methods: []

name: Sender
superclass: Requester::Sender
ri/1.8/system/Resolv/DNS/Requester/UnconnectedUDP/cdesc-UnconnectedUDP.yaml000064400000000344150403641320022263 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester::UnconnectedUDP
includes: []

instance_methods: []

name: UnconnectedUDP
superclass: Requester
ri/1.8/system/Resolv/DNS/Requester/UnconnectedUDP/Sender/cdesc-Sender.yaml000064400000000354150403641320022106 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester::UnconnectedUDP::Sender
includes: []

instance_methods: []

name: Sender
superclass: Requester::Sender
ri/1.8/system/Resolv/DNS/Requester/TCP/Sender/cdesc-Sender.yaml000064400000000341150403641330017713 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester::TCP::Sender
includes: []

instance_methods: []

name: Sender
superclass: Requester::Sender
ri/1.8/system/Resolv/DNS/Requester/TCP/cdesc-TCP.yaml000064400000000316150403641340015704 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester::TCP
includes: []

instance_methods: []

name: TCP
superclass: Requester
ri/1.8/system/Resolv/DNS/Requester/cdesc-Requester.yaml000064400000000314150403641340016605 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Requester
includes: []

instance_methods: []

name: Requester
superclass: Object
ri/1.8/system/Resolv/DNS/Requester/RequestError/cdesc-RequestError.yaml000064400000000462150403641350021737 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Indicates a problem with the DNS request.
constants: []

full_name: Resolv::DNS::Requester::RequestError
includes: []

instance_methods: []

name: RequestError
superclass: StandardError
ri/1.8/system/Resolv/DNS/getaddress-i.yaml000064400000000652150403641350014151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets the IP address of <tt>name</tt> from the DNS resolver.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> can be a Resolv::DNS::Name or a String. Retrieved address will be a Resolv::IPv4 or Resolv::IPv6
full_name: Resolv::DNS#getaddress
is_singleton: false
name: getaddress
params: (name)
visibility: public
ri/1.8/system/Resolv/DNS/new-c.yaml000064400000001611150403641350012603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new DNS resolver.
- !ruby/struct:SM::Flow::P 
  body: "<tt>config_info</tt> can be:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "nil:"
    body: Uses /etc/resolv.conf.
  - !ruby/struct:SM::Flow::LI 
    label: "String:"
    body: Path to a file using /etc/resolv.conf's format.
  - !ruby/struct:SM::Flow::LI 
    label: "Hash:"
    body: Must contain :nameserver, :search and :ndots keys.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Resolv::DNS.new(:nameserver =&gt; ['210.251.121.21'],\n                  :search =&gt; ['ruby-lang.org'],\n                  :ndots =&gt; 1)\n"
full_name: Resolv::DNS::new
is_singleton: true
name: new
params: (config_info=nil)
visibility: public
ri/1.8/system/Resolv/DNS/each_address-i.yaml000064400000000757150403641360014440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: resource.address
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all IP addresses for <tt>name</tt> retrieved from the DNS resolver.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> can be a Resolv::DNS::Name or a String. Retrieved addresses will be a Resolv::IPv4 or Resolv::IPv6
full_name: Resolv::DNS#each_address
is_singleton: false
name: each_address
params: (name) {|resource.address| ...}
visibility: public
ri/1.8/system/Resolv/DNS/cdesc-DNS.yaml000064400000003567150403641360013312 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
comment: 
- !ruby/struct:SM::Flow::P 
  body: Resolv::DNS is a DNS stub resolver.
- !ruby/struct:SM::Flow::P 
  body: "Information taken from the following places:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: STD0013
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: RFC 1035
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ftp://ftp.isi.edu/in-notes/iana/assignments/dns-parameters
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: etc.
  type: :BULLET
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Default DNS Port
  name: Port
  value: "53"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Default DNS UDP packet size
  name: UDPSize
  value: "512"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Group of DNS resolver threads (obsolete)
  name: DNSThreadGroup
  value: ThreadGroup.new
- !ruby/object:RI::Constant 
  comment: 
  name: RequestID
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: RequestIDMutex
  value: Mutex.new
full_name: Resolv::DNS
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: each_address
- !ruby/object:RI::MethodSummary 
  name: each_name
- !ruby/object:RI::MethodSummary 
  name: each_resource
- !ruby/object:RI::MethodSummary 
  name: getaddress
- !ruby/object:RI::MethodSummary 
  name: getaddresses
- !ruby/object:RI::MethodSummary 
  name: getname
- !ruby/object:RI::MethodSummary 
  name: getnames
- !ruby/object:RI::MethodSummary 
  name: getresource
- !ruby/object:RI::MethodSummary 
  name: getresources
name: DNS
superclass: Object
ri/1.8/system/Resolv/DNS/RCode/cdesc-RCode.yaml000064400000000276150403641360014650 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::RCode
includes: []

instance_methods: []

name: RCode
superclass: 
ri/1.8/system/Resolv/DNS/getnames-i.yaml000064400000000665150403641360013634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets all hostnames for <tt>address</tt> from the DNS resolver.
- !ruby/struct:SM::Flow::P 
  body: <tt>address</tt> must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved names will be Resolv::DNS::Name instances.
full_name: Resolv::DNS#getnames
is_singleton: false
name: getnames
params: (address)
visibility: public
ri/1.8/system/Resolv/DNS/each_name-i.yaml000064400000000755150403641360013731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: resource.name
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all hostnames for <tt>address</tt> retrieved from the DNS resolver.
- !ruby/struct:SM::Flow::P 
  body: <tt>address</tt> must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved names will be Resolv::DNS::Name instances.
full_name: Resolv::DNS#each_name
is_singleton: false
name: each_name
params: (address) {|resource.name| ...}
visibility: public
ri/1.8/system/Resolv/DNS/getresources-i.yaml000064400000000524150403641360014535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Looks up all <tt>typeclass</tt> DNS resources for <tt>name</tt>. See #getresource for argument details."
full_name: Resolv::DNS#getresources
is_singleton: false
name: getresources
params: (name, typeclass)
visibility: public
ri/1.8/system/Resolv/DNS/Config/NXDomain/cdesc-NXDomain.yaml000064400000000437150403641360017216 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Indicates no such domain was found.
constants: []

full_name: Resolv::DNS::Config::NXDomain
includes: []

instance_methods: []

name: NXDomain
superclass: ResolvError
ri/1.8/system/Resolv/DNS/Config/cdesc-Config.yaml000064400000000306150403641360015264 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Config
includes: []

instance_methods: []

name: Config
superclass: Object
ri/1.8/system/Resolv/DNS/Config/OtherResolvError/cdesc-OtherResolvError.yaml000064400000000512150403641360022632 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Indicates some other unhandled resolver error was encountered.
constants: []

full_name: Resolv::DNS::Config::OtherResolvError
includes: []

instance_methods: []

name: OtherResolvError
superclass: ResolvError
ri/1.8/system/Resolv/DNS/close-i.yaml000064400000000346150403641360013132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the DNS resolver.
full_name: Resolv::DNS#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Resolv/DNS/EncodeError/cdesc-EncodeError.yaml000064400000000464150403641360017275 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Indicates that the DNS request was unable to be encoded.
constants: []

full_name: Resolv::DNS::EncodeError
includes: []

instance_methods: []

name: EncodeError
superclass: StandardError
ri/1.8/system/Resolv/DNS/getname-i.yaml000064400000000651150403641360013444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets the hostname for <tt>address</tt> from the DNS resolver.
- !ruby/struct:SM::Flow::P 
  body: <tt>address</tt> must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved name will be a Resolv::DNS::Name.
full_name: Resolv::DNS#getname
is_singleton: false
name: getname
params: (address)
visibility: public
ri/1.8/system/Resolv/DNS/Label/Str/cdesc-Str.yaml000064400000000307150403641360015212 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Label::Str
includes: []

instance_methods: []

name: Str
superclass: Object
ri/1.8/system/Resolv/DNS/Label/cdesc-Label.yaml000064400000000276150403641360014716 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Label
includes: []

instance_methods: []

name: Label
superclass: 
ri/1.8/system/Resolv/DNS/DecodeError/cdesc-DecodeError.yaml000064400000000465150403641360017252 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Indicates that the DNS response was unable to be decoded.
constants: []

full_name: Resolv::DNS::DecodeError
includes: []

instance_methods: []

name: DecodeError
superclass: StandardError
ri/1.8/system/Resolv/DNS/getresource-i.yaml000064400000003272150403641360014355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Look up the <tt>typeclass</tt> DNS resource of <tt>name</tt>.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> must be a Resolv::DNS::Name or a String.
- !ruby/struct:SM::Flow::P 
  body: "<tt>typeclass</tt> should be one of the following:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::A
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::AAAA
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::ANY
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::CNAME
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::HINFO
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::MINFO
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::MX
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::NS
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::PTR
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::SOA
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::TXT
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Resolv::DNS::Resource::IN::WKS
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Returned resource is represented as a Resolv::DNS::Resource instance, i.e. Resolv::DNS::Resource::IN::A.
full_name: Resolv::DNS#getresource
is_singleton: false
name: getresource
params: (name, typeclass)
visibility: public
ri/1.8/system/Resolv/DNS/Message/MessageEncoder/cdesc-MessageEncoder.yaml000064400000000337150403641360022012 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Message::MessageEncoder
includes: []

instance_methods: []

name: MessageEncoder
superclass: Object
ri/1.8/system/Resolv/DNS/Message/MessageDecoder/cdesc-MessageDecoder.yaml000064400000000337150403641360021766 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Message::MessageDecoder
includes: []

instance_methods: []

name: MessageDecoder
superclass: Object
ri/1.8/system/Resolv/DNS/Message/cdesc-Message.yaml000064400000000310150403641360015615 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Resolv::DNS::Message
includes: []

instance_methods: []

name: Message
superclass: Object
ri/1.8/system/Resolv/DNS/open-c.yaml000064400000000627150403641360012762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: dns
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new DNS resolver. See Resolv::DNS.new for argument details.
- !ruby/struct:SM::Flow::P 
  body: Yields the created DNS resolver to the block, if given, otherwise returns it.
full_name: Resolv::DNS::open
is_singleton: true
name: open
params: (*args) {|dns| ...}
visibility: public
ri/1.8/system/MatchData/post_match-i.yaml000064400000001002150403641360014104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the portion of the original string after the current match. Equivalent to the special variable <tt>$'</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138: The Movie&quot;)\n   m.post_match   #=&gt; &quot;: The Movie&quot;\n"
full_name: MatchData#post_match
is_singleton: false
name: post_match
params: |
  mtch.post_match   => str

visibility: public
ri/1.8/system/MatchData/size-i.yaml000064400000000704150403641370012726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of elements in the match array.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.length   #=&gt; 5\n   m.size     #=&gt; 5\n"
full_name: MatchData#size
is_singleton: false
name: size
params: |
  mtch.length   => integer
  mtch.size     => integer

visibility: public
ri/1.8/system/MatchData/offset-i.yaml000064400000000756150403641370013251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a two-element array containing the beginning and ending offsets of the <em>n</em>th match.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.offset(0)   #=&gt; [1, 7]\n   m.offset(4)   #=&gt; [6, 7]\n"
full_name: MatchData#offset
is_singleton: false
name: offset
params: |
  mtch.offset(n)   => array

visibility: public
ri/1.8/system/MatchData/%5b%5d-i.yaml000064400000001730150403641370012625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Match Reference---<tt>MatchData</tt> acts as an array, and may be accessed using the normal array indexing techniques. <em>mtch</em>[0] is equivalent to the special variable <tt>$&amp;</tt>, and returns the entire matched string. <em>mtch</em>[1], <em>mtch</em>[2], and so on return the values of the matched backreferences (portions of the pattern between parentheses).
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m[0]       #=&gt; &quot;HX1138&quot;\n   m[1, 2]    #=&gt; [&quot;H&quot;, &quot;X&quot;]\n   m[1..3]    #=&gt; [&quot;H&quot;, &quot;X&quot;, &quot;113&quot;]\n   m[-3, 2]   #=&gt; [&quot;X&quot;, &quot;113&quot;]\n"
full_name: MatchData#[]
is_singleton: false
name: "[]"
params: |
  mtch[i]               => obj
  mtch[start, length]   => array
  mtch[range]           => array

visibility: public
ri/1.8/system/MatchData/select-i.yaml000064400000001061150403641370013230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing match strings for which <em>block</em> gives <tt>true</tt>. MatchData#select will be removed from Ruby 1.9.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138: The Movie&quot;)\n   p m.select{|x| /X/ =~ x}   #=&gt; [&quot;HX1138&quot;, &quot;X&quot;]\n"
full_name: MatchData#select
is_singleton: false
name: select
params: |
  mtch.select{|obj| block}   => array

visibility: public
ri/1.8/system/MatchData/to_a-i.yaml000064400000001724150403641370012701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the array of matches.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.to_a   #=&gt; [&quot;HX1138&quot;, &quot;H&quot;, &quot;X&quot;, &quot;113&quot;, &quot;8&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: Because <tt>to_a</tt> is called when expanding <tt>*</tt><em>variable</em>, there's a useful assignment shortcut for extracting matched fields. This is slightly slower than accessing the fields directly (as an intermediate array is generated).
- !ruby/struct:SM::Flow::VERB 
  body: "   all,f1,f2,f3 = *(/(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;))\n   all   #=&gt; &quot;HX1138&quot;\n   f1    #=&gt; &quot;H&quot;\n   f2    #=&gt; &quot;X&quot;\n   f3    #=&gt; &quot;113&quot;\n"
full_name: MatchData#to_a
is_singleton: false
name: to_a
params: |
  mtch.to_a   => anArray

visibility: public
ri/1.8/system/MatchData/string-i.yaml000064400000000662150403641370013265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a frozen copy of the string passed in to <tt>match</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.string   #=&gt; &quot;THX1138.&quot;\n"
full_name: MatchData#string
is_singleton: false
name: string
params: |
  mtch.string   => str

visibility: public
ri/1.8/system/MatchData/values_at-i.yaml000064400000001231150403641370013733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Uses each <em>index</em> to access the matching values, returning an array of the corresponding matches.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138: The Movie&quot;)\n   m.to_a               #=&gt; [&quot;HX1138&quot;, &quot;H&quot;, &quot;X&quot;, &quot;113&quot;, &quot;8&quot;]\n   m.values_at(0, 2, -2)   #=&gt; [&quot;HX1138&quot;, &quot;X&quot;, &quot;113&quot;]\n"
full_name: MatchData#values_at
is_singleton: false
name: values_at
params: |
  mtch.values_at([index]*)   => array

visibility: public
ri/1.8/system/MatchData/inspect-i.yaml000064400000001273150403641370013423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a printable version of <em>mtch</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "    puts /.$/.match(&quot;foo&quot;).inspect\n    #=&gt; #&lt;MatchData &quot;o&quot;&gt;\n\n    puts /(.)(.)(.)/.match(&quot;foo&quot;).inspect\n    #=&gt; #&lt;MatchData &quot;foo&quot; 1:&quot;f&quot; 2:&quot;o&quot; 3:&quot;o&quot;&gt;\n\n    puts /(.)(.)?(.)/.match(&quot;fo&quot;).inspect\n    #=&gt; #&lt;MatchData &quot;fo&quot; 1:&quot;f&quot; 2:nil 3:&quot;o&quot;&gt;\n"
full_name: MatchData#inspect
is_singleton: false
name: inspect
params: |
  mtch.inspect   => str

visibility: public
ri/1.8/system/MatchData/pretty_print-i.yaml000064400000000266150403641370014522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MatchData#pretty_print
is_singleton: false
name: pretty_print
params: (q)
visibility: public
ri/1.8/system/MatchData/length-i.yaml000064400000000710150403641370013232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of elements in the match array.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.length   #=&gt; 5\n   m.size     #=&gt; 5\n"
full_name: MatchData#length
is_singleton: false
name: length
params: |
  mtch.length   => integer
  mtch.size     => integer

visibility: public
ri/1.8/system/MatchData/pre_match-i.yaml000064400000000753150403641370013722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the portion of the original string before the current match. Equivalent to the special variable <tt>$`</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.pre_match   #=&gt; &quot;T&quot;\n"
full_name: MatchData#pre_match
is_singleton: false
name: pre_match
params: |
  mtch.pre_match   => str

visibility: public
ri/1.8/system/MatchData/end-i.yaml000064400000000764150403641400012522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the offset of the character immediately following the end of the <em>n</em>th element of the match array in the string.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.end(0)   #=&gt; 7\n   m.end(2)   #=&gt; 3\n"
full_name: MatchData#end
is_singleton: false
name: end
params: |
  mtch.end(n)   => integer

visibility: public
ri/1.8/system/MatchData/to_s-i.yaml000064400000000612150403641400012710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the entire matched string.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.to_s   #=&gt; &quot;HX1138&quot;\n"
full_name: MatchData#to_s
is_singleton: false
name: to_s
params: |
  mtch.to_s   => str

visibility: public
ri/1.8/system/MatchData/captures-i.yaml000064400000001047150403641400013575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the array of captures; equivalent to <tt>mtch.to_a[1..-1]</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   f1,f2,f3,f4 = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;).captures\n   f1    #=&gt; &quot;H&quot;\n   f2    #=&gt; &quot;X&quot;\n   f3    #=&gt; &quot;113&quot;\n   f4    #=&gt; &quot;8&quot;\n"
full_name: MatchData#captures
is_singleton: false
name: captures
params: |
  mtch.captures   => array

visibility: public
ri/1.8/system/MatchData/begin-i.yaml000064400000000734150403641400013035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the offset of the start of the <em>n</em>th element of the match array in the string.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = /(.)(.)(\\d+)(\\d)/.match(&quot;THX1138.&quot;)\n   m.begin(0)   #=&gt; 1\n   m.begin(2)   #=&gt; 2\n"
full_name: MatchData#begin
is_singleton: false
name: begin
params: |
  mtch.begin(n)   => integer

visibility: public
ri/1.8/system/MatchData/cdesc-MatchData.yaml000064400000002622150403641400014426 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>MatchData</tt> is the type of the special variable <tt>$~</tt>, and is the type of the object returned by <tt>Regexp#match</tt> and <tt>Regexp#last_match</tt>. It encapsulates all the results of a pattern match, results normally accessed through the special variables <tt>$&amp;</tt>, <tt>$'</tt>, <tt>$`</tt>, <tt>$1</tt>, <tt>$2</tt>, and so on. <tt>Matchdata</tt> is also known as <tt>MatchingData</tt>.
constants: []

full_name: MatchData
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: begin
- !ruby/object:RI::MethodSummary 
  name: captures
- !ruby/object:RI::MethodSummary 
  name: end
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: offset
- !ruby/object:RI::MethodSummary 
  name: post_match
- !ruby/object:RI::MethodSummary 
  name: pre_match
- !ruby/object:RI::MethodSummary 
  name: pretty_print
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: string
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: values_at
name: MatchData
superclass: Object
ri/1.8/system/XMP/StringInputMethod/new-c.yaml000064400000000260150403641400014773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XMP::StringInputMethod::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/XMP/StringInputMethod/gets-i.yaml000064400000000262150403641400015154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XMP::StringInputMethod#gets
is_singleton: false
name: gets
params: ()
visibility: public
ri/1.8/system/XMP/StringInputMethod/eof%3f-i.yaml000064400000000262150403641400015261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XMP::StringInputMethod#eof?
is_singleton: false
name: eof?
params: ()
visibility: public
ri/1.8/system/XMP/StringInputMethod/cdesc-StringInputMethod.yaml000064400000000623150403641400020473 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: XMP::StringInputMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: puts
name: StringInputMethod
superclass: IRB::InputMethod
ri/1.8/system/XMP/StringInputMethod/puts-i.yaml000064400000000266150403641400015211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XMP::StringInputMethod#puts
is_singleton: false
name: puts
params: (exps)
visibility: public
ri/1.8/system/XMP/new-c.yaml000064400000000247150403641400011351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XMP::new
is_singleton: true
name: new
params: (bind = nil)
visibility: public
ri/1.8/system/XMP/cdesc-XMP.yaml000064400000000412150403641400012055 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: XMP
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: puts
name: XMP
superclass: Object
ri/1.8/system/XMP/puts-i.yaml000064400000000243150403641400011555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: XMP#puts
is_singleton: false
name: puts
params: (exps)
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/extract_decimal-i.yaml000064400000000312150403641400017357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#extract_decimal
is_singleton: false
name: extract_decimal
params: (s)
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/extract_hex-i.yaml000064400000000302150403641400016544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#extract_hex
is_singleton: false
name: extract_hex
params: (s)
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/letter-i.yaml000064400000000266150403641400015536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#letter
is_singleton: false
name: letter
params: ()
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/match-i.yaml000064400000000267150403641400015334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#match
is_singleton: false
name: match
params: (str)
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/nil_proc-i.yaml000064400000000274150403641400016043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#nil_proc
is_singleton: false
name: nil_proc
params: (s)
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/new-c.yaml000064400000000263150403641410015020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier::new
is_singleton: true
name: new
params: (str)
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/cdesc-FormatSpecifier.yaml000064400000002433150403641410020151 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: conversion
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: matched
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: matched_string
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: re_string
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Scanf::FormatSpecifier
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: count_space?
- !ruby/object:RI::MethodSummary 
  name: extract_decimal
- !ruby/object:RI::MethodSummary 
  name: extract_float
- !ruby/object:RI::MethodSummary 
  name: extract_hex
- !ruby/object:RI::MethodSummary 
  name: extract_integer
- !ruby/object:RI::MethodSummary 
  name: extract_octal
- !ruby/object:RI::MethodSummary 
  name: extract_plain
- !ruby/object:RI::MethodSummary 
  name: letter
- !ruby/object:RI::MethodSummary 
  name: match
- !ruby/object:RI::MethodSummary 
  name: mid_match?
- !ruby/object:RI::MethodSummary 
  name: nil_proc
- !ruby/object:RI::MethodSummary 
  name: skip
- !ruby/object:RI::MethodSummary 
  name: to_re
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: width
name: FormatSpecifier
superclass: Object
ri/1.8/system/Scanf/FormatSpecifier/mid_match%3f-i.yaml000064400000000276150403641410016464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#mid_match?
is_singleton: false
name: mid_match?
params: ()
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/skip-i.yaml000064400000000263150403641410015203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#skip
is_singleton: false
name: skip
params: ()
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/to_s-i.yaml000064400000000262150403641410015200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/extract_integer-i.yaml000064400000000312150403641410017417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#extract_integer
is_singleton: false
name: extract_integer
params: (s)
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/extract_float-i.yaml000064400000000306150403641410017072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#extract_float
is_singleton: false
name: extract_float
params: (s)
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/extract_octal-i.yaml000064400000000306150403641410017067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#extract_octal
is_singleton: false
name: extract_octal
params: (s)
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/to_re-i.yaml000064400000000264150403641410015346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#to_re
is_singleton: false
name: to_re
params: ()
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/width-i.yaml000064400000000264150403641410015355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#width
is_singleton: false
name: width
params: ()
visibility: public
ri/1.8/system/Scanf/FormatSpecifier/extract_plain-i.yaml000064400000000306150403641410017070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#extract_plain
is_singleton: false
name: extract_plain
params: (s)
visibility: private
ri/1.8/system/Scanf/FormatSpecifier/count_space%3f-i.yaml000064400000000302150403641410017030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatSpecifier#count_space?
is_singleton: false
name: count_space?
params: ()
visibility: public
ri/1.8/system/Scanf/cdesc-Scanf.yaml000064400000000261150403641410013034 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Scanf
includes: []

instance_methods: []

name: Scanf
superclass: 
ri/1.8/system/Scanf/FormatString/spec_count-i.yaml000064400000000273150403641410015735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatString#spec_count
is_singleton: false
name: spec_count
params: ()
visibility: public
ri/1.8/system/Scanf/FormatString/match-i.yaml000064400000000264150403641410014667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatString#match
is_singleton: false
name: match
params: (str)
visibility: public
ri/1.8/system/Scanf/FormatString/last_spec-i.yaml000064400000000271150403641410015546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatString#last_spec
is_singleton: false
name: last_spec
params: ()
visibility: public
ri/1.8/system/Scanf/FormatString/new-c.yaml000064400000000260150403641410014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatString::new
is_singleton: true
name: new
params: (str)
visibility: public
ri/1.8/system/Scanf/FormatString/cdesc-FormatString.yaml000064400000003163150403641410017044 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: last_match_tried
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: last_spec_tried
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: matched_count
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: space
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: string_left
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: SPECIFIERS
  value: "'diuXxofeEgsc'"
- !ruby/object:RI::Constant 
  comment: 
  name: REGEX
  value: "/         # possible space, followed by...           (?:\\s*           # percent sign, followed by...             %             # another percent sign, or...               (?:%|                  # optional assignment suppression flag                  \\*?                  # optional maximum field width                  \\d*                    # named character class, ...                    (?:\\[\\[:\\w+:\\]\\]|                    # traditional character class, or...                       \\[[^\\]]*\\]|                    # specifier letter.                       [#{SPECIFIERS}])))|             # or miscellaneous characters               [^%\\s]+/ix"
full_name: Scanf::FormatString
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: last_spec
- !ruby/object:RI::MethodSummary 
  name: match
- !ruby/object:RI::MethodSummary 
  name: prune
- !ruby/object:RI::MethodSummary 
  name: spec_count
- !ruby/object:RI::MethodSummary 
  name: to_s
name: FormatString
superclass: Object
ri/1.8/system/Scanf/FormatString/prune-i.yaml000064400000000300150403641410014713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatString#prune
is_singleton: false
name: prune
params: (n=matched_count)
visibility: public
ri/1.8/system/Scanf/FormatString/to_s-i.yaml000064400000000257150403641410014541 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Scanf::FormatString#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Hash/update-i.yaml000064400000002431150403641410012265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds the contents of <em>other_hash</em> to <em>hsh</em>. If no block is specified entries with duplicate keys are overwritten with the values from <em>other_hash</em>, otherwise the value of each duplicate key is determined by calling the block with the key, its value in <em>hsh</em> and its value in <em>other_hash</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h1 = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h2 = { &quot;b&quot; =&gt; 254, &quot;c&quot; =&gt; 300 }\n   h1.merge!(h2)   #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;254, &quot;c&quot;=&gt;300}\n\n   h1 = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h2 = { &quot;b&quot; =&gt; 254, &quot;c&quot; =&gt; 300 }\n   h1.merge!(h2) { |key, v1, v2| v1 }\n                   #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;200, &quot;c&quot;=&gt;300}\n"
full_name: Hash#update
is_singleton: false
name: update
params: |
  hsh.merge!(other_hash)                                 => hsh
  hsh.update(other_hash)                                 => hsh
  hsh.merge!(other_hash){|key, oldval, newval| block}    => hsh
  hsh.update(other_hash){|key, oldval, newval| block}    => hsh

visibility: public
ri/1.8/system/Hash/size-i.yaml000064400000001051150403641410011752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of key-value pairs in the hash.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;d&quot; =&gt; 100, &quot;a&quot; =&gt; 200, &quot;v&quot; =&gt; 300, &quot;e&quot; =&gt; 400 }\n   h.length        #=&gt; 4\n   h.delete(&quot;a&quot;)   #=&gt; 200\n   h.length        #=&gt; 3\n"
full_name: Hash#size
is_singleton: false
name: size
params: |
  hsh.length    =>  fixnum
  hsh.size      =>  fixnum

visibility: public
ri/1.8/system/Hash/default%3d-i.yaml000064400000001556150403641410012732 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the default value, the value returned for a key that does not exist in the hash. It is not possible to set the a default to a <tt>Proc</tt> that will be executed on each key lookup.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.default = &quot;Go fish&quot;\n   h[&quot;a&quot;]     #=&gt; 100\n   h[&quot;z&quot;]     #=&gt; &quot;Go fish&quot;\n   # This doesn't do what you might hope...\n   h.default = proc do |hash, key|\n     hash[key] = key + key\n   end\n   h[2]       #=&gt; #&lt;Proc:0x401b3948@-:6&gt;\n   h[&quot;cat&quot;]   #=&gt; #&lt;Proc:0x401b3948@-:6&gt;\n"
full_name: Hash#default=
is_singleton: false
name: default=
params: |
  hsh.default = obj     => hsh

visibility: public
ri/1.8/system/Hash/eql%3f-i.yaml000064400000000512150403641410012060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>hash</em> and <em>other</em> are both hashes with the same content.
full_name: Hash#eql?
is_singleton: false
name: eql?
params: |
  hash.eql?(other)  -> true or false

visibility: public
ri/1.8/system/Hash/invert-i.yaml000064400000001132150403641410012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new hash created by using <em>hsh</em>'s values as keys, and the keys as values.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;n&quot; =&gt; 100, &quot;m&quot; =&gt; 100, &quot;y&quot; =&gt; 300, &quot;d&quot; =&gt; 200, &quot;a&quot; =&gt; 0 }\n   h.invert   #=&gt; {0=&gt;&quot;a&quot;, 100=&gt;&quot;n&quot;, 200=&gt;&quot;d&quot;, 300=&gt;&quot;y&quot;}\n"
full_name: Hash#invert
is_singleton: false
name: invert
params: |
  hsh.invert -> aHash

visibility: public
ri/1.8/system/Hash/indexes-i.yaml000064400000000477150403641410012452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deprecated in favor of <tt>Hash#select</tt>.
full_name: Hash#indexes
is_singleton: false
name: indexes
params: |
  hsh.indexes(key, ...)    => array
  hsh.indices(key, ...)    => array

visibility: public
ri/1.8/system/Hash/%5b%5d-i.yaml000064400000001067150403641410011660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Reference---Retrieves the <em>value</em> object corresponding to the <em>key</em> object. If not found, returns the a default value (see <tt>Hash::new</tt> for details).
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h[&quot;a&quot;]   #=&gt; 100\n   h[&quot;c&quot;]   #=&gt; nil\n"
full_name: Hash#[]
is_singleton: false
name: "[]"
params: |
  hsh[key]    =>  value

visibility: public
ri/1.8/system/Hash/empty%3f-i.yaml000064400000000562150403641410012442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>hsh</em> contains no key-value pairs.
- !ruby/struct:SM::Flow::VERB 
  body: "   {}.empty?   #=&gt; true\n"
full_name: Hash#empty?
is_singleton: false
name: empty?
params: |
  hsh.empty?    => true or false

visibility: public
ri/1.8/system/Hash/merge-i.yaml000064400000001524150403641410012104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new hash containing the contents of <em>other_hash</em> and the contents of <em>hsh</em>, overwriting entries in <em>hsh</em> with duplicate keys with those from <em>other_hash</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h1 = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h2 = { &quot;b&quot; =&gt; 254, &quot;c&quot; =&gt; 300 }\n   h1.merge(h2)   #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;254, &quot;c&quot;=&gt;300}\n   h1             #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;200}\n"
full_name: Hash#merge
is_singleton: false
name: merge
params: |
  hsh.merge(other_hash)                              -> a_hash
  hsh.merge(other_hash){|key, oldval, newval| block} -> a_hash

visibility: public
ri/1.8/system/Hash/each-i.yaml000064400000001562150403641410011707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> once for each key in <em>hsh</em>, passing the key and value to the block as a two-element array. Because of the assignment semantics of block parameters, these elements will be split out if the block has two formal parameters. Also see <tt>Hash.each_pair</tt>, which will be marginally more efficient for blocks with two parameters.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.each {|key, value| puts &quot;#{key} is #{value}&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   a is 100\n   b is 200\n"
full_name: Hash#each
is_singleton: false
name: each
params: |
  hsh.each {| key, value | block } -> hsh

visibility: public
ri/1.8/system/Hash/select-i.yaml000064400000001224150403641410012261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array consisting of <tt>[key,value]</tt> pairs for which the block returns true. Also see <tt>Hash.values_at</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200, &quot;c&quot; =&gt; 300 }\n   h.select {|k,v| k &gt; &quot;a&quot;}  #=&gt; [[&quot;b&quot;, 200], [&quot;c&quot;, 300]]\n   h.select {|k,v| v &lt; 200}  #=&gt; [[&quot;a&quot;, 100]]\n"
full_name: Hash#select
is_singleton: false
name: select
params: |
  hsh.select {|key, value| block}   => array

visibility: public
ri/1.8/system/Hash/to_a-i.yaml000064400000001046150403641410011726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>hsh</em> to a nested array of <tt>[</tt> <em>key, value</em> <tt>]</tt> arrays.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;c&quot; =&gt; 300, &quot;a&quot; =&gt; 100, &quot;d&quot; =&gt; 400, &quot;c&quot; =&gt; 300  }\n   h.to_a   #=&gt; [[&quot;a&quot;, 100], [&quot;c&quot;, 300], [&quot;d&quot;, 400]]\n"
full_name: Hash#to_a
is_singleton: false
name: to_a
params: |
  hsh.to_a -> array

visibility: public
ri/1.8/system/Hash/store-i.yaml000064400000001352150403641410012140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Assignment---Associates the value given by <em>value</em> with the key given by <em>key</em>. <em>key</em> should not have its value changed while it is in use as a key (a <tt>String</tt> passed as a key will be duplicated and frozen).
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h[&quot;a&quot;] = 9\n   h[&quot;c&quot;] = 4\n   h   #=&gt; {&quot;a&quot;=&gt;9, &quot;b&quot;=&gt;200, &quot;c&quot;=&gt;4}\n"
full_name: Hash#store
is_singleton: false
name: store
params: |
  hsh[key] = value        => value
  hsh.store(key, value)   => value

visibility: public
ri/1.8/system/Hash/default-i.yaml000064400000001746150403641410012437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the default value, the value that would be returned by <em>hsh</em>[<em>key</em>] if <em>key</em> did not exist in <em>hsh</em>. See also <tt>Hash::new</tt> and <tt>Hash#default=</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = Hash.new                            #=&gt; {}\n   h.default                               #=&gt; nil\n   h.default(2)                            #=&gt; nil\n\n   h = Hash.new(&quot;cat&quot;)                     #=&gt; {}\n   h.default                               #=&gt; &quot;cat&quot;\n   h.default(2)                            #=&gt; &quot;cat&quot;\n\n   h = Hash.new {|h,k| h[k] = k.to_i*10}   #=&gt; {}\n   h.default                               #=&gt; nil\n   h.default(2)                            #=&gt; 20\n"
full_name: Hash#default
is_singleton: false
name: default
params: |
  hsh.default(key=nil)   => obj

visibility: public
ri/1.8/system/Hash/to_yaml-i.yaml000064400000000261150403641410012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Hash#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Hash/rehash-i.yaml000064400000001566150403641410012265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Rebuilds the hash based on the current hash values for each key. If values of key objects have changed since they were inserted, this method will reindex <em>hsh</em>. If <tt>Hash#rehash</tt> is called while an iterator is traversing the hash, an <tt>IndexError</tt> will be raised in the iterator.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot; ]\n   c = [ &quot;c&quot;, &quot;d&quot; ]\n   h = { a =&gt; 100, c =&gt; 300 }\n   h[a]       #=&gt; 100\n   a[0] = &quot;z&quot;\n   h[a]       #=&gt; nil\n   h.rehash   #=&gt; {[&quot;z&quot;, &quot;b&quot;]=&gt;100, [&quot;c&quot;, &quot;d&quot;]=&gt;300}\n   h[a]       #=&gt; 100\n"
full_name: Hash#rehash
is_singleton: false
name: rehash
params: |
  hsh.rehash -> hsh

visibility: public
ri/1.8/system/Hash/hash-i.yaml000064400000000547150403641410011734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compute a hash-code for this array. Two arrays with the same content will have the same hash code (and will compare using <tt>eql?</tt>).
full_name: Hash#hash
is_singleton: false
name: hash
params: |
  array.hash   -> fixnum

visibility: public
ri/1.8/system/Hash/values_at-i.yaml000064400000001154150403641410012767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return an array containing the values associated with the given keys. Also see <tt>Hash.select</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  h = { &quot;cat&quot; =&gt; &quot;feline&quot;, &quot;dog&quot; =&gt; &quot;canine&quot;, &quot;cow&quot; =&gt; &quot;bovine&quot; }\n  h.values_at(&quot;cow&quot;, &quot;cat&quot;)  #=&gt; [&quot;bovine&quot;, &quot;feline&quot;]\n"
full_name: Hash#values_at
is_singleton: false
name: values_at
params: |
  hsh.values_at(key, ...)   => array

visibility: public
ri/1.8/system/Hash/yaml_initialize-i.yaml000064400000000300150403641410014157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Hash#yaml_initialize
is_singleton: false
name: yaml_initialize
params: ( tag, val )
visibility: public
ri/1.8/system/Hash/delete-i.yaml000064400000001564150403641410012253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes and returns a key-value pair from <em>hsh</em> whose key is equal to <em>key</em>. If the key is not found, returns <tt>nil</tt>. If the optional code block is given and the key is not found, pass in the key and return the result of <em>block</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.delete(&quot;a&quot;)                              #=&gt; 100\n   h.delete(&quot;z&quot;)                              #=&gt; nil\n   h.delete(&quot;z&quot;) { |el| &quot;#{el} not found&quot; }   #=&gt; &quot;z not found&quot;\n"
full_name: Hash#delete
is_singleton: false
name: delete
params: |
  hsh.delete(key)                   => value
  hsh.delete(key) {| key | block }  => value

visibility: public
ri/1.8/system/Hash/member%3f-i.yaml000064400000001155150403641410012552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given key is present in <em>hsh</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.has_key?(&quot;a&quot;)   #=&gt; true\n   h.has_key?(&quot;z&quot;)   #=&gt; false\n"
full_name: Hash#member?
is_singleton: false
name: member?
params: |
  hsh.has_key?(key)    => true or false
  hsh.include?(key)    => true or false
  hsh.key?(key)        => true or false
  hsh.member?(key)     => true or false

visibility: public
ri/1.8/system/Hash/reject%21-i.yaml000064400000000530150403641410012465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Hash#delete_if</tt>, but returns <tt>nil</tt> if no changes were made.
full_name: Hash#reject!
is_singleton: false
name: reject!
params: |
  hsh.reject! {| key, value | block }  -> hsh or nil

visibility: public
ri/1.8/system/Hash/each_key-i.yaml000064400000001100150403641410012543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> once for each key in <em>hsh</em>, passing the key as a parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.each_key {|key| puts key }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   a\n   b\n"
full_name: Hash#each_key
is_singleton: false
name: each_key
params: |
  hsh.each_key {| key | block } -> hsh

visibility: public
ri/1.8/system/Hash/indices-i.yaml000064400000000477150403641410012431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deprecated in favor of <tt>Hash#select</tt>.
full_name: Hash#indices
is_singleton: false
name: indices
params: |
  hsh.indexes(key, ...)    => array
  hsh.indices(key, ...)    => array

visibility: public
ri/1.8/system/Hash/index-i.yaml000064400000000727150403641410012120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the key for a given value. If not found, returns <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.index(200)   #=&gt; &quot;b&quot;\n   h.index(999)   #=&gt; nil\n"
full_name: Hash#index
is_singleton: false
name: index
params: |
  hsh.index(value)    => key

visibility: public
ri/1.8/system/Hash/delete_if-i.yaml000064400000001073150403641410012724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes every key-value pair from <em>hsh</em> for which <em>block</em> evaluates to <tt>true</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200, &quot;c&quot; =&gt; 300 }\n   h.delete_if {|key, value| key &gt;= &quot;b&quot; }   #=&gt; {&quot;a&quot;=&gt;100}\n"
full_name: Hash#delete_if
is_singleton: false
name: delete_if
params: |
  hsh.delete_if {| key, value | block }  -> hsh

visibility: public
ri/1.8/system/Hash/inspect-i.yaml000064400000000421150403641410012445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the contents of this hash as a string.
full_name: Hash#inspect
is_singleton: false
name: inspect
params: |
  hsh.inspect  => string

visibility: public
ri/1.8/system/Hash/each_value-i.yaml000064400000001124150403641410013075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> once for each key in <em>hsh</em>, passing the value as a parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.each_value {|value| puts value }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   100\n   200\n"
full_name: Hash#each_value
is_singleton: false
name: each_value
params: |
  hsh.each_value {| value | block } -> hsh

visibility: public
ri/1.8/system/Hash/include%3f-i.yaml000064400000001157150403641420012731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given key is present in <em>hsh</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.has_key?(&quot;a&quot;)   #=&gt; true\n   h.has_key?(&quot;z&quot;)   #=&gt; false\n"
full_name: Hash#include?
is_singleton: false
name: include?
params: |
  hsh.has_key?(key)    => true or false
  hsh.include?(key)    => true or false
  hsh.key?(key)        => true or false
  hsh.member?(key)     => true or false

visibility: public
ri/1.8/system/Hash/new-c.yaml000064400000003241150403641420011567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new, empty hash. If this hash is subsequently accessed by a key that doesn't correspond to a hash entry, the value returned depends on the style of <tt>new</tt> used to create the hash. In the first form, the access returns <tt>nil</tt>. If <em>obj</em> is specified, this single object will be used for all <em>default values</em>. If a block is specified, it will be called with the hash object and the key, and should return the default value. It is the block's responsibility to store the value in the hash if required.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = Hash.new(&quot;Go Fish&quot;)\n   h[&quot;a&quot;] = 100\n   h[&quot;b&quot;] = 200\n   h[&quot;a&quot;]           #=&gt; 100\n   h[&quot;c&quot;]           #=&gt; &quot;Go Fish&quot;\n   # The following alters the single default object\n   h[&quot;c&quot;].upcase!   #=&gt; &quot;GO FISH&quot;\n   h[&quot;d&quot;]           #=&gt; &quot;GO FISH&quot;\n   h.keys           #=&gt; [&quot;a&quot;, &quot;b&quot;]\n\n   # While this creates a new default object each time\n   h = Hash.new { |hash, key| hash[key] = &quot;Go Fish: #{key}&quot; }\n   h[&quot;c&quot;]           #=&gt; &quot;Go Fish: c&quot;\n   h[&quot;c&quot;].upcase!   #=&gt; &quot;GO FISH: C&quot;\n   h[&quot;d&quot;]           #=&gt; &quot;Go Fish: d&quot;\n   h.keys           #=&gt; [&quot;c&quot;, &quot;d&quot;]\n"
full_name: Hash::new
is_singleton: true
name: new
params: |
  Hash.new                          => hash
  Hash.new(obj)                     => aHash
  Hash.new {|hash, key| block }     => aHash

visibility: public
ri/1.8/system/Hash/pretty_print-i.yaml000064400000000261150403641430013547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Hash#pretty_print
is_singleton: false
name: pretty_print
params: (q)
visibility: public
ri/1.8/system/Hash/replace-i.yaml000064400000001036150403641430012420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the contents of <em>hsh</em> with the contents of <em>other_hash</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.replace({ &quot;c&quot; =&gt; 300, &quot;d&quot; =&gt; 400 })   #=&gt; {&quot;c&quot;=&gt;300, &quot;d&quot;=&gt;400}\n"
full_name: Hash#replace
is_singleton: false
name: replace
params: |
  hsh.replace(other_hash) -> hsh

visibility: public
ri/1.8/system/Hash/reject-i.yaml000064400000000603150403641430012260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>Hash#delete_if</tt>, but works on (and returns) a copy of the <em>hsh</em>. Equivalent to <tt><em>hsh</em>.dup.delete_if</tt>.
full_name: Hash#reject
is_singleton: false
name: reject
params: |
  hsh.reject {| key, value | block }  -> a_hash

visibility: public
ri/1.8/system/Hash/initialize_copy-i.yaml000064400000001056150403641440014203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the contents of <em>hsh</em> with the contents of <em>other_hash</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.replace({ &quot;c&quot; =&gt; 300, &quot;d&quot; =&gt; 400 })   #=&gt; {&quot;c&quot;=&gt;300, &quot;d&quot;=&gt;400}\n"
full_name: Hash#initialize_copy
is_singleton: false
name: initialize_copy
params: |
  hsh.replace(other_hash) -> hsh

visibility: public
ri/1.8/system/Hash/length-i.yaml000064400000001055150403641440012270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of key-value pairs in the hash.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;d&quot; =&gt; 100, &quot;a&quot; =&gt; 200, &quot;v&quot; =&gt; 300, &quot;e&quot; =&gt; 400 }\n   h.length        #=&gt; 4\n   h.delete(&quot;a&quot;)   #=&gt; 200\n   h.length        #=&gt; 3\n"
full_name: Hash#length
is_singleton: false
name: length
params: |
  hsh.length    =>  fixnum
  hsh.size      =>  fixnum

visibility: public
ri/1.8/system/Hash/merge%21-i.yaml000064400000002431150403641450012316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds the contents of <em>other_hash</em> to <em>hsh</em>. If no block is specified entries with duplicate keys are overwritten with the values from <em>other_hash</em>, otherwise the value of each duplicate key is determined by calling the block with the key, its value in <em>hsh</em> and its value in <em>other_hash</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h1 = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h2 = { &quot;b&quot; =&gt; 254, &quot;c&quot; =&gt; 300 }\n   h1.merge!(h2)   #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;254, &quot;c&quot;=&gt;300}\n\n   h1 = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h2 = { &quot;b&quot; =&gt; 254, &quot;c&quot; =&gt; 300 }\n   h1.merge!(h2) { |key, v1, v2| v1 }\n                   #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;200, &quot;c&quot;=&gt;300}\n"
full_name: Hash#merge!
is_singleton: false
name: merge!
params: |
  hsh.merge!(other_hash)                                 => hsh
  hsh.update(other_hash)                                 => hsh
  hsh.merge!(other_hash){|key, oldval, newval| block}    => hsh
  hsh.update(other_hash){|key, oldval, newval| block}    => hsh

visibility: public
ri/1.8/system/Hash/cdesc-Hash.yaml000064400000010320150403641450012517 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A <tt>Hash</tt> is a collection of key-value pairs. It is similar to an <tt>Array</tt>, except that indexing is done via arbitrary keys of any object type, not an integer index. The order in which you traverse a hash by either key or value may seem arbitrary, and will generally not be in the insertion order.
- !ruby/struct:SM::Flow::P 
  body: Hashes have a <em>default value</em> that is returned when accessing keys that do not exist in the hash. By default, that value is <tt>nil</tt>.
- !ruby/struct:SM::Flow::P 
  body: <tt>Hash</tt> uses <tt>key.eql?</tt> to test keys for equality. If you need to use instances of your own classes as keys in a <tt>Hash</tt>, it is recommended that you define both the <tt>eql?</tt> and <tt>hash</tt> methods. The <tt>hash</tt> method must have the property that <tt>a.eql?(b)</tt> implies <tt>a.hash == b.hash</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  class MyClass\n    attr_reader :str\n    def initialize(str)\n      @str = str\n    end\n    def eql?(o)\n      o.is_a?(MyClass) &amp;&amp; str == o.str\n    end\n    def hash\n      @str.hash\n    end\n  end\n\n  a = MyClass.new(&quot;some string&quot;)\n  b = MyClass.new(&quot;some string&quot;)\n  a.eql? b  #=&gt; true\n\n  h = {}\n\n  h[a] = 1\n  h[a]      #=&gt; 1\n  h[b]      #=&gt; 1\n\n  h[b] = 2\n  h[a]      #=&gt; 2\n  h[b]      #=&gt; 2\n"
constants: []

full_name: Hash
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: clear
- !ruby/object:RI::MethodSummary 
  name: default
- !ruby/object:RI::MethodSummary 
  name: default=
- !ruby/object:RI::MethodSummary 
  name: default_proc
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete_if
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_key
- !ruby/object:RI::MethodSummary 
  name: each_pair
- !ruby/object:RI::MethodSummary 
  name: each_value
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: has_key?
- !ruby/object:RI::MethodSummary 
  name: has_value?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: index
- !ruby/object:RI::MethodSummary 
  name: indexes
- !ruby/object:RI::MethodSummary 
  name: indices
- !ruby/object:RI::MethodSummary 
  name: initialize_copy
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: invert
- !ruby/object:RI::MethodSummary 
  name: key?
- !ruby/object:RI::MethodSummary 
  name: keys
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: member?
- !ruby/object:RI::MethodSummary 
  name: merge
- !ruby/object:RI::MethodSummary 
  name: merge!
- !ruby/object:RI::MethodSummary 
  name: pretty_print
- !ruby/object:RI::MethodSummary 
  name: pretty_print_cycle
- !ruby/object:RI::MethodSummary 
  name: rehash
- !ruby/object:RI::MethodSummary 
  name: reject
- !ruby/object:RI::MethodSummary 
  name: reject!
- !ruby/object:RI::MethodSummary 
  name: replace
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: shift
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: sort
- !ruby/object:RI::MethodSummary 
  name: store
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_hash
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: update
- !ruby/object:RI::MethodSummary 
  name: value?
- !ruby/object:RI::MethodSummary 
  name: values
- !ruby/object:RI::MethodSummary 
  name: values_at
- !ruby/object:RI::MethodSummary 
  name: yaml_initialize
name: Hash
superclass: Object
ri/1.8/system/Hash/keys-i.yaml000064400000001040150403641450011755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array populated with the keys from this hash. See also <tt>Hash#values</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200, &quot;c&quot; =&gt; 300, &quot;d&quot; =&gt; 400 }\n   h.keys   #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]\n"
full_name: Hash#keys
is_singleton: false
name: keys
params: |
  hsh.keys    => array

visibility: public
ri/1.8/system/Hash/default_proc-i.yaml000064400000001171150403641460013457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <tt>Hash::new</tt> was invoked with a block, return that block, otherwise return <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = Hash.new {|h,k| h[k] = k*k }   #=&gt; {}\n   p = h.default_proc                 #=&gt; #&lt;Proc:0x401b3d08@-:1&gt;\n   a = []                             #=&gt; []\n   p.call(a, 2)\n   a                                  #=&gt; [nil, nil, 4]\n"
full_name: Hash#default_proc
is_singleton: false
name: default_proc
params: |
  hsh.default_proc -> anObject

visibility: public
ri/1.8/system/Hash/to_s-i.yaml000064400000001173150403641460011756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>hsh</em> to a string by converting the hash to an array of <tt>[</tt> <em>key, value</em> <tt>]</tt> pairs and then converting that array to a string using <tt>Array#join</tt> with the default separator.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;c&quot; =&gt; 300, &quot;a&quot; =&gt; 100, &quot;d&quot; =&gt; 400, &quot;c&quot; =&gt; 300  }\n   h.to_s   #=&gt; &quot;a100c300d400&quot;\n"
full_name: Hash#to_s
is_singleton: false
name: to_s
params: |
  hsh.to_s   => string

visibility: public
ri/1.8/system/Hash/%3d%3d-i.yaml000064400000001501150403641460011654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---Two hashes are equal if they each contain the same number of keys and if each key-value pair is equal to (according to <tt>Object#==</tt>) the corresponding elements in the other hash.
- !ruby/struct:SM::Flow::VERB 
  body: "   h1 = { &quot;a&quot; =&gt; 1, &quot;c&quot; =&gt; 2 }\n   h2 = { 7 =&gt; 35, &quot;c&quot; =&gt; 2, &quot;a&quot; =&gt; 1 }\n   h3 = { &quot;a&quot; =&gt; 1, &quot;c&quot; =&gt; 2, 7 =&gt; 35 }\n   h4 = { &quot;a&quot; =&gt; 1, &quot;d&quot; =&gt; 2, &quot;f&quot; =&gt; 35 }\n   h1 == h2   #=&gt; false\n   h2 == h3   #=&gt; true\n   h3 == h4   #=&gt; false\n"
full_name: Hash#==
is_singleton: false
name: ==
params: |
  hsh == other_hash    => true or false

visibility: public
ri/1.8/system/Hash/value%3f-i.yaml000064400000001042150403641470012420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given value is present for some key in <em>hsh</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.has_value?(100)   #=&gt; true\n   h.has_value?(999)   #=&gt; false\n"
full_name: Hash#value?
is_singleton: false
name: value?
params: |
  hsh.has_value?(value)    => true or false
  hsh.value?(value)        => true or false

visibility: public
ri/1.8/system/Hash/values-i.yaml000064400000000745150403641470012316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array populated with the values from <em>hsh</em>. See also <tt>Hash#keys</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200, &quot;c&quot; =&gt; 300 }\n   h.values   #=&gt; [100, 200, 300]\n"
full_name: Hash#values
is_singleton: false
name: values
params: |
  hsh.values    => array

visibility: public
ri/1.8/system/Hash/pretty_print_cycle-i.yaml000064400000000275150403641470014737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Hash#pretty_print_cycle
is_singleton: false
name: pretty_print_cycle
params: (q)
visibility: public
ri/1.8/system/Hash/to_hash-i.yaml000064400000000370150403641500012430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>self</em>.
full_name: Hash#to_hash
is_singleton: false
name: to_hash
params: |
  hsh.to_hash   => hsh

visibility: public
ri/1.8/system/Hash/sort-i.yaml000064400000001353150403641500011774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>hsh</em> to a nested array of <tt>[</tt> <em>key, value</em> <tt>]</tt> arrays and sorts it, using <tt>Array#sort</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 20, &quot;b&quot; =&gt; 30, &quot;c&quot; =&gt; 10  }\n   h.sort                       #=&gt; [[&quot;a&quot;, 20], [&quot;b&quot;, 30], [&quot;c&quot;, 10]]\n   h.sort {|a,b| a[1]&lt;=&gt;b[1]}   #=&gt; [[&quot;c&quot;, 10], [&quot;a&quot;, 20], [&quot;b&quot;, 30]]\n"
full_name: Hash#sort
is_singleton: false
name: sort
params: |
  hsh.sort                    => array
  hsh.sort {| a, b | block }  => array

visibility: public
ri/1.8/system/Hash/shift-i.yaml000064400000001163150403641510012122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a key-value pair from <em>hsh</em> and returns it as the two-item array <tt>[</tt> <em>key, value</em> <tt>]</tt>, or the hash's default value if the hash is empty.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { 1 =&gt; &quot;a&quot;, 2 =&gt; &quot;b&quot;, 3 =&gt; &quot;c&quot; }\n   h.shift   #=&gt; [1, &quot;a&quot;]\n   h         #=&gt; {2=&gt;&quot;b&quot;, 3=&gt;&quot;c&quot;}\n"
full_name: Hash#shift
is_singleton: false
name: shift
params: |
  hsh.shift -> anArray or obj

visibility: public
ri/1.8/system/Hash/%5b%5d%3d-i.yaml000064400000001350150403641510012150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Assignment---Associates the value given by <em>value</em> with the key given by <em>key</em>. <em>key</em> should not have its value changed while it is in use as a key (a <tt>String</tt> passed as a key will be duplicated and frozen).
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h[&quot;a&quot;] = 9\n   h[&quot;c&quot;] = 4\n   h   #=&gt; {&quot;a&quot;=&gt;9, &quot;b&quot;=&gt;200, &quot;c&quot;=&gt;4}\n"
full_name: Hash#[]=
is_singleton: false
name: "[]="
params: |
  hsh[key] = value        => value
  hsh.store(key, value)   => value

visibility: public
ri/1.8/system/Hash/%5b%5d-c.yaml000064400000001462150403641510011652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new hash populated with the given objects. Equivalent to the literal <tt>{ <em>key</em>, <em>value</em>, ... }</tt>. Keys and values occur in pairs, so there must be an even number of arguments.
- !ruby/struct:SM::Flow::VERB 
  body: "   Hash[&quot;a&quot;, 100, &quot;b&quot;, 200]       #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;200}\n   Hash[&quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200]   #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;200}\n   { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }     #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;200}\n"
full_name: Hash::[]
is_singleton: true
name: "[]"
params: |
  Hash[ [key =>|, value]* ]   => hash

visibility: public
ri/1.8/system/Hash/clear-i.yaml000064400000000726150403641510012077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes all key-value pairs from <em>hsh</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }   #=&gt; {&quot;a&quot;=&gt;100, &quot;b&quot;=&gt;200}\n   h.clear                          #=&gt; {}\n"
full_name: Hash#clear
is_singleton: false
name: clear
params: |
  hsh.clear -> hsh

visibility: public
ri/1.8/system/Hash/each_pair-i.yaml000064400000001211150403641520012713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> once for each key in <em>hsh</em>, passing the key and value as parameters.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.each_pair {|key, value| puts &quot;#{key} is #{value}&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   a is 100\n   b is 200\n"
full_name: Hash#each_pair
is_singleton: false
name: each_pair
params: |
  hsh.each_pair {| key_value_array | block } -> hsh

visibility: public
ri/1.8/system/Hash/has_value%3f-i.yaml000064400000001052150403641520013250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given value is present for some key in <em>hsh</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.has_value?(100)   #=&gt; true\n   h.has_value?(999)   #=&gt; false\n"
full_name: Hash#has_value?
is_singleton: false
name: has_value?
params: |
  hsh.has_value?(value)    => true or false
  hsh.value?(value)        => true or false

visibility: public
ri/1.8/system/Hash/key%3f-i.yaml000064400000001147150403641530012077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given key is present in <em>hsh</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.has_key?(&quot;a&quot;)   #=&gt; true\n   h.has_key?(&quot;z&quot;)   #=&gt; false\n"
full_name: Hash#key?
is_singleton: false
name: key?
params: |
  hsh.has_key?(key)    => true or false
  hsh.include?(key)    => true or false
  hsh.key?(key)        => true or false
  hsh.member?(key)     => true or false

visibility: public
ri/1.8/system/Hash/fetch-i.yaml000064400000002606150403641530012103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a value from the hash for the given key. If the key can't be found, there are several options: With no other arguments, it will raise an <tt>IndexError</tt> exception; if <em>default</em> is given, then that will be returned; if the optional code block is specified, then that will be run and its result returned."
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.fetch(&quot;a&quot;)                            #=&gt; 100\n   h.fetch(&quot;z&quot;, &quot;go fish&quot;)                 #=&gt; &quot;go fish&quot;\n   h.fetch(&quot;z&quot;) { |el| &quot;go fish, #{el}&quot;}   #=&gt; &quot;go fish, z&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: The following example shows that an exception is raised if the key is not found and a default value is not supplied.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.fetch(&quot;z&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   prog.rb:2:in `fetch': key not found (IndexError)\n    from prog.rb:2\n"
full_name: Hash#fetch
is_singleton: false
name: fetch
params: |
  hsh.fetch(key [, default] )       => obj
  hsh.fetch(key) {| key | block }   => obj

visibility: public
ri/1.8/system/Hash/has_key%3f-i.yaml000064400000001157150403641530012733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given key is present in <em>hsh</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   h = { &quot;a&quot; =&gt; 100, &quot;b&quot; =&gt; 200 }\n   h.has_key?(&quot;a&quot;)   #=&gt; true\n   h.has_key?(&quot;z&quot;)   #=&gt; false\n"
full_name: Hash#has_key?
is_singleton: false
name: has_key?
params: |
  hsh.has_key?(key)    => true or false
  hsh.include?(key)    => true or false
  hsh.key?(key)        => true or false
  hsh.member?(key)     => true or false

visibility: public
ri/1.8/system/Symbol/all_symbols-c.yaml000064400000001451150403641540013704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of all the symbols currently in Ruby's symbol table.
- !ruby/struct:SM::Flow::VERB 
  body: "   Symbol.all_symbols.size    #=&gt; 903\n   Symbol.all_symbols[1,20]   #=&gt; [:floor, :ARGV, :Binding, :symlink,\n                                   :chown, :EOFError, :$;, :String,\n                                   :LOCK_SH, :&quot;setuid?&quot;, :$&lt;,\n                                   :default_proc, :compact, :extend,\n                                   :Tms, :getwd, :$=, :ThreadGroup,\n                                   :wait2, :$&gt;]\n"
full_name: Symbol::all_symbols
is_singleton: true
name: all_symbols
params: |
  Symbol.all_symbols    => array

visibility: public
ri/1.8/system/Symbol/to_i-i.yaml000064400000000674150403641550012333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an integer that is unique for each symbol within a particular execution of a program.
- !ruby/struct:SM::Flow::VERB 
  body: "   :fred.to_i           #=&gt; 9809\n   &quot;fred&quot;.to_sym.to_i   #=&gt; 9809\n"
full_name: Symbol#to_i
is_singleton: false
name: to_i
params: |
  sym.to_i      => fixnum

visibility: public
ri/1.8/system/Symbol/to_proc-i.yaml000064400000000652150403641550013042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <em>Proc</em> object which respond to the given method by <em>sym</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  (1..3).collect(&amp;:to_s)  #=&gt; [&quot;1&quot;, &quot;2&quot;, &quot;3&quot;]\n"
full_name: Symbol#to_proc
is_singleton: false
name: to_proc
params: |
  sym.to_proc

visibility: public
ri/1.8/system/Symbol/to_yaml-i.yaml000064400000000263150403641550013037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Symbol#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Symbol/id2name-i.yaml000064400000000620150403641560012710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name or string corresponding to <em>sym</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   :fred.id2name   #=&gt; &quot;fred&quot;\n"
full_name: Symbol#id2name
is_singleton: false
name: id2name
params: |
  sym.id2name   => string
  sym.to_s      => string

visibility: public
ri/1.8/system/Symbol/yaml_new-c.yaml000064400000000273150403641560013202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Symbol::yaml_new
is_singleton: true
name: yaml_new
params: ( klass, tag, val )
visibility: public
ri/1.8/system/Symbol/inspect-i.yaml000064400000000576150403641560013050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the representation of <em>sym</em> as a symbol literal.
- !ruby/struct:SM::Flow::VERB 
  body: "   :fred.inspect   #=&gt; &quot;:fred&quot;\n"
full_name: Symbol#inspect
is_singleton: false
name: inspect
params: |
  sym.inspect    => string

visibility: public
ri/1.8/system/Symbol/to_sym-i.yaml000064400000000601150403641570012703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: In general, <tt>to_sym</tt> returns the <tt>Symbol</tt> corresponding to an object. As <em>sym</em> is already a symbol, <tt>self</tt> is returned in this case.
full_name: Symbol#to_sym
is_singleton: false
name: to_sym
params: |
  sym.to_sym   => sym

visibility: public
ri/1.8/system/Symbol/%3d%3d%3d-i.yaml000064400000002516150403641570012543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---At the <tt>Object</tt> level, <tt>==</tt> returns <tt>true</tt> only if <em>obj</em> and <em>other</em> are the same object. Typically, this method is overridden in descendent classes to provide class-specific meaning.
- !ruby/struct:SM::Flow::P 
  body: "Unlike <tt>==</tt>, the <tt>equal?</tt> method should never be overridden by subclasses: it is used to determine object identity (that is, <tt>a.equal?(b)</tt> iff <tt>a</tt> is the same object as <tt>b</tt>)."
- !ruby/struct:SM::Flow::P 
  body: "The <tt>eql?</tt> method returns <tt>true</tt> if <em>obj</em> and <em>anObject</em> have the same value. Used by <tt>Hash</tt> to test members for equality. For objects of class <tt>Object</tt>, <tt>eql?</tt> is synonymous with <tt>==</tt>. Subclasses normally continue this tradition, but there are exceptions. <tt>Numeric</tt> types, for example, perform type conversion across <tt>==</tt>, but not across <tt>eql?</tt>, so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   1 == 1.0     #=&gt; true\n   1.eql? 1.0   #=&gt; false\n"
full_name: Symbol#===
is_singleton: false
name: ===
params: |
  obj == other        => true or false
  obj.equal?(other)   => true or false
  obj.eql?(other)     => true or false

visibility: public
ri/1.8/system/Symbol/to_int-i.yaml000064400000000324150403641600012661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ":nodoc:"
full_name: Symbol#to_int
is_singleton: false
name: to_int
params: ()
visibility: public
ri/1.8/system/Symbol/to_s-i.yaml000064400000000612150403641600012331 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name or string corresponding to <em>sym</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   :fred.id2name   #=&gt; &quot;fred&quot;\n"
full_name: Symbol#to_s
is_singleton: false
name: to_s
params: |
  sym.id2name   => string
  sym.to_s      => string

visibility: public
ri/1.8/system/Symbol/dclone-i.yaml000064400000000246150403641600012634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Symbol#dclone
is_singleton: false
name: dclone
params: ()
visibility: public
ri/1.8/system/Symbol/cdesc-Symbol.yaml000064400000003204150403641600013463 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: all_symbols
- !ruby/object:RI::MethodSummary 
  name: yaml_new
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Symbol</tt> objects represent names and some strings inside the Ruby interpreter. They are generated using the <tt>:name</tt> and <tt>:&quot;string&quot;</tt> literals syntax, and by the various <tt>to_sym</tt> methods. The same <tt>Symbol</tt> object will be created for a given name or string for the duration of a program's execution, regardless of the context or meaning of that name. Thus if <tt>Fred</tt> is a constant in one context, a method in another, and a class in a third, the <tt>Symbol</tt> <tt>:Fred</tt> will be the same object in all three contexts.
- !ruby/struct:SM::Flow::VERB 
  body: "   module One\n     class Fred\n     end\n     $f1 = :Fred\n   end\n   module Two\n     Fred = 1\n     $f2 = :Fred\n   end\n   def Fred()\n   end\n   $f3 = :Fred\n   $f1.id   #=&gt; 2514190\n   $f2.id   #=&gt; 2514190\n   $f3.id   #=&gt; 2514190\n"
constants: []

full_name: Symbol
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: dclone
- !ruby/object:RI::MethodSummary 
  name: id2name
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: to_i
- !ruby/object:RI::MethodSummary 
  name: to_int
- !ruby/object:RI::MethodSummary 
  name: to_proc
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_sym
- !ruby/object:RI::MethodSummary 
  name: to_yaml
name: Symbol
superclass: Object
ri/1.8/system/ArgumentError/cdesc-ArgumentError.yaml000064400000001204150403641610016340 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: ArgumentError
includes: []

instance_methods: []

name: ArgumentError
superclass: StandardError
ri/1.8/system/RegOr/%3d%7e-i.yaml000064400000000240150403641620012011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RegOr#=~
is_singleton: false
name: =~
params: (str)
visibility: public
ri/1.8/system/RegOr/cdesc-RegOr.yaml000064400000000525150403641620013012 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: this is just a proof of concept toy.
constants: []

full_name: RegOr
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: =~
name: RegOr
superclass: Object
ri/1.8/system/RegOr/new-c.yaml000064400000000247150403641630011730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RegOr::new
is_singleton: true
name: new
params: (re1, re2)
visibility: public
ri/1.8/system/Base64/b64encode-i.yaml000064400000001263150403641640012724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <em>Prints</em> the Base64 encoded version of <tt>bin</tt> (a <tt>String</tt>) in lines of <tt>len</tt> (default 60) characters.
- !ruby/struct:SM::Flow::VERB 
  body: "   require 'base64'\n   data = &quot;Now is the time for all good coders\\nto learn Ruby&quot;\n   Base64.b64encode(data)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g\n   UnVieQ==\n"
full_name: Base64#b64encode
is_singleton: false
name: b64encode
params: (bin, len = 60)
visibility: public
ri/1.8/system/Base64/encode64-i.yaml000064400000001112150403641640012553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the Base64-encoded version of <tt>str</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   require 'base64'\n   Base64.b64encode(&quot;Now is the time for all good coders\\nto learn Ruby&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g\n   UnVieQ==\n"
full_name: Base64#encode64
is_singleton: false
name: encode64
params: (bin)
visibility: public
ri/1.8/system/Base64/decode_b-i.yaml000064400000001160150403641650012674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Decodes text formatted using a subset of RFC2047 (the one used for mime-encoding mail headers).
- !ruby/struct:SM::Flow::P 
  body: Only supports an encoding type of 'b' (base 64), and only supports the character sets ISO-2022-JP and SHIFT_JIS (so the only two encoded word sequences recognized are <tt>=?ISO-2022-JP?B?...=</tt> and <tt>=?SHIFT_JIS?B?...=</tt>). Recognition of these sequences is case insensitive.
full_name: Base64#decode_b
is_singleton: false
name: decode_b
params: (str)
visibility: public
ri/1.8/system/Base64/decode64-i.yaml000064400000001224150403641650012546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the Base64-decoded version of <tt>str</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'base64'\n  str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +\n        'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +\n        'ZSB0aHJlZQpBbmQgc28gb24uLi4K'\n  puts Base64.decode64(str)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   This is line one\n   This is line two\n   This is line three\n   And so on...\n"
full_name: Base64#decode64
is_singleton: false
name: decode64
params: (str)
visibility: public
ri/1.8/system/Base64/Deprecated/cdesc-Deprecated.yaml000064400000000303150403641670016101 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Base64::Deprecated
includes: []

instance_methods: []

name: Deprecated
superclass: 
ri/1.8/system/Base64/cdesc-Base64.yaml000064400000003101150403641670013024 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Base64 module provides for the encoding (#encode64) and decoding (#decode64) of binary data using a Base64 representation.
- !ruby/struct:SM::Flow::P 
  body: "The following particular features are also provided:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: encode into lines of a given length (#b64encode)
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: decode the special format specified in RFC2047 for the representation of email headers (decode_b)
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::P 
  body: A simple encoding and decoding.
- !ruby/struct:SM::Flow::VERB 
  body: "    require &quot;base64&quot;\n\n    enc   = Base64.encode64('Send reinforcements')\n                        # -&gt; &quot;U2VuZCByZWluZm9yY2VtZW50cw==\\n&quot;\n    plain = Base64.decode64(enc)\n                        # -&gt; &quot;Send reinforcements&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: The purpose of using base64 to encode data is that it translates any binary data into purely printable characters. It is specified in RFC 2045 (http://www.faqs.org/rfcs/rfc2045.html).
constants: []

full_name: Base64
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: b64encode
- !ruby/object:RI::MethodSummary 
  name: decode64
- !ruby/object:RI::MethodSummary 
  name: decode_b
- !ruby/object:RI::MethodSummary 
  name: encode64
name: Base64
superclass: 
ri/1.8/system/Open3/popen3-i.yaml000064400000001775150403641700012324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Open stdin, stdout, and stderr streams and start external executable. Non-block form:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'open3'\n\n  stdin, stdout, stderr = Open3.popen3(cmd)\n"
- !ruby/struct:SM::Flow::P 
  body: "Block form:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'open3'\n\n  Open3.popen3(cmd) { |stdin, stdout, stderr| ... }\n"
- !ruby/struct:SM::Flow::P 
  body: The parameter <tt>cmd</tt> is passed directly to Kernel#exec.
- !ruby/struct:SM::Flow::P 
  body: _popen3_ is like <em>system</em> in that you can pass extra parameters, and the strings won't be mangled by shell expansion.
- !ruby/struct:SM::Flow::VERB 
  body: "  stdin, stdout, stderr = Open3.popen3('identify', '/weird path/with spaces/and &quot;strange&quot; characters.jpg')\n  result = stdout.read\n"
full_name: Open3#popen3
is_singleton: false
name: popen3
params: (*cmd) {|| ...}
visibility: public
ri/1.8/system/Open3/cdesc-Open3.yaml000064400000001506150403641710012726 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Open3 grants you access to stdin, stdout, and stderr when running another program. Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;open3&quot;\n  include Open3\n\n  stdin, stdout, stderr = popen3('nroff -man')\n"
- !ruby/struct:SM::Flow::P 
  body: "Open3.popen3 can also take a block which will receive stdin, stdout and stderr as parameters. This ensures stdin, stdout and stderr are closed once the block exits. Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;open3&quot;\n\n  Open3.popen3('nroff -man') { |stdin, stdout, stderr| ... }\n"
constants: []

full_name: Open3
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: popen3
name: Open3
superclass: 
ri/1.8/system/SimpleDelegator/dup-i.yaml000064400000000410150403641730013770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Duplication support for the object returned by __getobj__.
full_name: SimpleDelegator#dup
is_singleton: false
name: dup
params: ()
visibility: public
ri/1.8/system/SimpleDelegator/cdesc-SimpleDelegator.yaml000064400000001314150403641730017115 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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__ .
constants: []

full_name: SimpleDelegator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __getobj__
- !ruby/object:RI::MethodSummary 
  name: __setobj__
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: dup
name: SimpleDelegator
superclass: Delegator
ri/1.8/system/SimpleDelegator/__getobj__-i.yaml000064400000000433150403641740015254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current object method calls are being delegated to.
full_name: SimpleDelegator#__getobj__
is_singleton: false
name: __getobj__
params: ()
visibility: public
ri/1.8/system/SimpleDelegator/new-c.yaml000064400000000425150403641740013772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pass in the <em>obj</em> you would like to delegate method calls to.
full_name: SimpleDelegator::new
is_singleton: true
name: new
params: (obj)
visibility: public
ri/1.8/system/SimpleDelegator/clone-i.yaml000064400000000406150403641750014307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Clone support for the object returned by __getobj__.
full_name: SimpleDelegator#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/SimpleDelegator/__setobj__-i.yaml000064400000001457150403641760015301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes the delegate object to <em>obj</em>.
- !ruby/struct:SM::Flow::P 
  body: It's important to note that this does <b>not</b> 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.
- !ruby/struct:SM::Flow::P 
  body: Here's an example of changing the delegation object.
- !ruby/struct:SM::Flow::VERB 
  body: "  names = SimpleDelegator.new(%w{James Edward Gray II})\n  puts names[1]    # =&gt; Edward\n  names.<em>setobj</em>(%w{Gavin Sinclair})\n  puts names[1]    # =&gt; Sinclair\n"
full_name: SimpleDelegator#__setobj__
is_singleton: false
name: __setobj__
params: (obj)
visibility: public
ri/1.8/system/Exception/to_yaml-i.yaml000064400000000266150403641770013537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Exception#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Exception/yaml_new-c.yaml000064400000000276150403641770013701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Exception::yaml_new
is_singleton: true
name: yaml_new
params: ( klass, tag, val )
visibility: public
ri/1.8/system/Exception/cdesc-Exception.yaml000064400000002232150403642000014640 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: exception
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: yaml_new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: Exception
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: backtrace
- !ruby/object:RI::MethodSummary 
  name: exception
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: message
- !ruby/object:RI::MethodSummary 
  name: set_backtrace
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_str
- !ruby/object:RI::MethodSummary 
  name: to_yaml
name: Exception
superclass: Object
ri/1.8/system/Exception/to_str-i.yaml000064400000000733150403642000013367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the result of invoking <tt>exception.to_s</tt>. Normally this returns the exception's message or name. By supplying a to_str method, exceptions are agreeing to be used where Strings are expected.
full_name: Exception#to_str
is_singleton: false
name: to_str
params: |
  exception.message   =>  string
  exception.to_str    =>  string

visibility: public
ri/1.8/system/Exception/inspect-i.yaml000064400000000435150403642010013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return this exception's class name an message
full_name: Exception#inspect
is_singleton: false
name: inspect
params: |
  exception.inspect   => string

visibility: public
ri/1.8/system/Exception/new-c.yaml000064400000000465150403642010012643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Construct a new Exception object, optionally passing in a message.
full_name: Exception::new
is_singleton: true
name: new
params: |
  Exception.new(msg = nil)   =>  exception

visibility: public
ri/1.8/system/Exception/exception-i.yaml000064400000000731150403642010014052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no argument, or if the argument is the same as the receiver, return the receiver. Otherwise, create a new exception object of the same class as the receiver, but with a message equal to <tt>string.to_str</tt>.
full_name: Exception#exception
is_singleton: false
name: exception
params: |
  exc.exception(string) -> an_exception or exc

visibility: public
ri/1.8/system/Exception/message-i.yaml000064400000000735150403642020013505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the result of invoking <tt>exception.to_s</tt>. Normally this returns the exception's message or name. By supplying a to_str method, exceptions are agreeing to be used where Strings are expected.
full_name: Exception#message
is_singleton: false
name: message
params: |
  exception.message   =>  string
  exception.to_str    =>  string

visibility: public
ri/1.8/system/Exception/set_backtrace-i.yaml000064400000000661150403642020014651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the backtrace information associated with <em>exc</em>. The argument must be an array of <tt>String</tt> objects in the format described in <tt>Exception#backtrace</tt>.
full_name: Exception#set_backtrace
is_singleton: false
name: set_backtrace
params: |
  exc.set_backtrace(array)   =>  array

visibility: public
ri/1.8/system/Exception/to_s-i.yaml000064400000000470150403642020013021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns exception's message (or the name of the exception if no message is set).
full_name: Exception#to_s
is_singleton: false
name: to_s
params: |
  exception.to_s   =>  string

visibility: public
ri/1.8/system/Exception/backtrace-i.yaml000064400000001434150403642020013775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns any backtrace associated with the exception. The backtrace is an array of strings, each containing either ``filename:lineNo: in `method''' or ``filename:lineNo.''"
- !ruby/struct:SM::Flow::VERB 
  body: "   def a\n     raise &quot;boom&quot;\n   end\n\n   def b\n     a()\n   end\n\n   begin\n     b()\n   rescue =&gt; detail\n     print detail.backtrace.join(&quot;\\n&quot;)\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   prog.rb:2:in `a'\n   prog.rb:6:in `b'\n   prog.rb:10\n"
full_name: Exception#backtrace
is_singleton: false
name: backtrace
params: |
  exception.backtrace    => array

visibility: public
ri/1.8/system/Exception/exception-c.yaml000064400000000731150403642030014046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no argument, or if the argument is the same as the receiver, return the receiver. Otherwise, create a new exception object of the same class as the receiver, but with a message equal to <tt>string.to_str</tt>.
full_name: Exception::exception
is_singleton: true
name: exception
params: |
  exc.exception(string) -> an_exception or exc

visibility: public
ri/1.8/system/TokenStream/pop_token-i.yaml000064400000000261150403642030014350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TokenStream#pop_token
is_singleton: false
name: pop_token
params: ()
visibility: public
ri/1.8/system/TokenStream/add_token-i.yaml000064400000000263150403642040014305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TokenStream#add_token
is_singleton: false
name: add_token
params: (tk)
visibility: public
ri/1.8/system/TokenStream/add_tokens-i.yaml000064400000000266150403642050014474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TokenStream#add_tokens
is_singleton: false
name: add_tokens
params: (tks)
visibility: public
ri/1.8/system/TokenStream/cdesc-TokenStream.yaml000064400000001520150403642050015440 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A TokenStream is a list of tokens, gathered during the parse of some entity (say a method). Entities populate these streams by being registered with the lexer. Any class can collect tokens by including TokenStream. From the outside, you use such an object by calling the start_collecting_tokens method, followed by calls to add_token and pop_token
constants: []

full_name: TokenStream
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_token
- !ruby/object:RI::MethodSummary 
  name: add_tokens
- !ruby/object:RI::MethodSummary 
  name: pop_token
- !ruby/object:RI::MethodSummary 
  name: start_collecting_tokens
- !ruby/object:RI::MethodSummary 
  name: token_stream
name: TokenStream
superclass: 
ri/1.8/system/TokenStream/token_stream-i.yaml000064400000000267150403642050015055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TokenStream#token_stream
is_singleton: false
name: token_stream
params: ()
visibility: public
ri/1.8/system/TokenStream/start_collecting_tokens-i.yaml000064400000000315150403642060017300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TokenStream#start_collecting_tokens
is_singleton: false
name: start_collecting_tokens
params: ()
visibility: public
ri/1.8/system/MissingArgument/cdesc-MissingArgument.yaml000064400000000461150403642070017205 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises when a switch with mandatory argument has no argument.
constants: []

full_name: MissingArgument
includes: []

instance_methods: []

name: MissingArgument
superclass: ParseError
ri/1.8/system/created.rid000064400000000040150403642070011112 0ustar00Wed, 26 Jul 2023 13:45:54 +0000
ri/1.8/system/Queue/size-i.yaml000064400000000331150403642070012156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #length"
full_name: Queue#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Queue/deq-i.yaml000064400000000343150403642100011752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pop"
full_name: Queue#deq
is_singleton: false
name: deq
params: (non_block=false)
visibility: public
ri/1.8/system/Queue/empty%3f-i.yaml000064400000000366150403642110012643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> is the queue is empty.
full_name: Queue#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/Queue/enq-i.yaml000064400000000330150403642110011761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #push"
full_name: Queue#enq
is_singleton: false
name: enq
params: (obj)
visibility: public
ri/1.8/system/Queue/pop-i.yaml000064400000000767150403642110012012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: shift
- !ruby/object:RI::AliasName 
  name: deq
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieves data from the queue. If the queue is empty, the calling thread is suspended until data is pushed onto the queue. If <tt>non_block</tt> is true, the thread isn't suspended, and an exception is raised.
full_name: Queue#pop
is_singleton: false
name: pop
params: (non_block=false)
visibility: public
ri/1.8/system/Queue/new-c.yaml000064400000000330150403642120011762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new queue.
full_name: Queue::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Queue/push-i.yaml000064400000000474150403642120012167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "<<"
- !ruby/object:RI::AliasName 
  name: enq
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pushes <tt>obj</tt> to the queue.
full_name: Queue#push
is_singleton: false
name: push
params: (obj)
visibility: public
ri/1.8/system/Queue/length-i.yaml000064400000000422150403642120012462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: size
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the length of the queue.
full_name: Queue#length
is_singleton: false
name: length
params: ()
visibility: public
ri/1.8/system/Queue/%3c%3c-i.yaml000064400000000330150403642130012045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #push"
full_name: Queue#<<
is_singleton: false
name: "<<"
params: (obj)
visibility: public
ri/1.8/system/Queue/cdesc-Queue.yaml000064400000002510150403642130013117 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: This class provides a way to synchronize communication between threads.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'thread'\n\n  queue = Queue.new\n\n  producer = Thread.new do\n    5.times do |i|\n      sleep rand(i) # simulate expense\n      queue &lt;&lt; i\n      puts &quot;#{i} produced&quot;\n    end\n  end\n\n  consumer = Thread.new do\n    5.times do |i|\n      value = queue.pop\n      sleep rand(i/2) # simulate expense\n      puts &quot;consumed #{value}&quot;\n    end\n  end\n\n  consumer.join\n"
constants: []

full_name: Queue
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: clear
- !ruby/object:RI::MethodSummary 
  name: deq
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: enq
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: num_waiting
- !ruby/object:RI::MethodSummary 
  name: pop
- !ruby/object:RI::MethodSummary 
  name: push
- !ruby/object:RI::MethodSummary 
  name: shift
- !ruby/object:RI::MethodSummary 
  name: size
name: Queue
superclass: Object
ri/1.8/system/Queue/shift-i.yaml000064400000000347150403642130012325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pop"
full_name: Queue#shift
is_singleton: false
name: shift
params: (non_block=false)
visibility: public
ri/1.8/system/Queue/num_waiting-i.yaml000064400000000407150403642140013527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of threads waiting on the queue.
full_name: Queue#num_waiting
is_singleton: false
name: num_waiting
params: ()
visibility: public
ri/1.8/system/Queue/clear-i.yaml000064400000000353150403642140012274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes all objects from the queue.
full_name: Queue#clear
is_singleton: false
name: clear
params: ()
visibility: public
ri/1.8/system/Monitor/cdesc-Monitor.yaml000064400000001513150403642150014031 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Monitors provide means of mutual exclusion for Thread programming. A critical region is created by means of the synchronize method, which takes a block. The condition variables (created with #new_cond) may be used to control the execution of a monitor with #signal and #wait."
- !ruby/struct:SM::Flow::P 
  body: the Monitor class wraps MonitorMixin, and provides aliases
- !ruby/struct:SM::Flow::VERB 
  body: " alias try_enter try_mon_enter\n alias enter mon_enter\n alias exit mon_exit\n"
- !ruby/struct:SM::Flow::P 
  body: to access its methods more concisely.
constants: []

full_name: Monitor
includes: 
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
instance_methods: []

name: Monitor
superclass: Object
ri/1.8/system/UNIXServer/cdesc-UNIXServer.yaml000064400000003325150403642150014702 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: []

full_name: UNIXServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept_nonblock
- !ruby/object:RI::MethodSummary 
  name: listen
name: UNIXServer
superclass: UNIXSocket
ri/1.8/system/UNIXServer/accept_nonblock-i.yaml000064400000002550150403642160015223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     serv = UNIXServer.new(&quot;/tmp/sock&quot;)\n     begin\n       sock = serv.accept_nonblock\n     rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR\n       IO.select([serv])\n       retry\n     end\n     # sock is an accepted socket.\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#accept for the exceptions that may be thrown if the call to UNIXServer#accept_nonblock fails.
- !ruby/struct:SM::Flow::P 
  body: UNIXServer#accept_nonblock may raise any error corresponding to accept(2) failure, including Errno::EAGAIN.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: UNIXServer#accept
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#accept
  type: :BULLET
full_name: UNIXServer#accept_nonblock
is_singleton: false
name: accept_nonblock
params: |
  unixserver.accept_nonblock => unixsocket

visibility: public
ri/1.8/system/UNIXServer/listen-i.yaml000064400000012050150403642160013371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Listens for connections, using the specified <tt>int</tt> as the backlog. A call to <em>listen</em> only applies if the <tt>socket</tt> is of type SOCK_STREAM or SOCK_SEQPACKET.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameter
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>backlog</tt> - the maximum length of the queue for pending connections.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example 1
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.bind( sockaddr )\n     socket.listen( 5 )\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example 2 (listening on an arbitary port, unix-based systems only):"
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     socket.listen( 1 )\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Unix-based Exceptions
- !ruby/struct:SM::Flow::P 
  body: On unix based systems the above will work because a new <tt>sockaddr</tt> struct is created on the address ADDR_ANY, for an arbitrary port number as handed off by the kernel. It will not work on Windows, because Windows requires that the <tt>socket</tt> is bound by calling <em>bind</em> before it can <em>listen</em>.
- !ruby/struct:SM::Flow::P 
  body: If the <em>backlog</em> amount exceeds the implementation-dependent maximum queue length, the implementation's maximum queue length will be used.
- !ruby/struct:SM::Flow::P 
  body: "On unix-based based systems the following system exceptions may be raised if the call to <em>listen</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EBADF - the <em>socket</em> argument is not a valid file descriptor
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EDESTADDRREQ - the <em>socket</em> is not bound to a local address, and the protocol does not support listening on an unbound socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <em>socket</em> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <em>socket</em> argument does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the <em>socket</em> protocol does not support listen
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - the calling process does not have approriate privileges
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <em>socket</em> has been shut down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - insufficient resources are available in the system to complete the call
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Windows Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On Windows systems the following system exceptions may be raised if the call to <em>listen</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN - the network is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRINUSE - the socket's local address is already in use. This usually occurs during the execution of <em>bind</em> but could be delayed if the call to <em>bind</em> was to a partially wildcard address (involving ADDR_ANY) and if a specific address needs to be commmitted at the time of the call to <em>listen</em>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINPROGRESS - a Windows Sockets 1.1 call is in progress or the service provider is still processing a callback function
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <tt>socket</tt> has not been bound with a call to <em>bind</em>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EISCONN - the <tt>socket</tt> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EMFILE - no more socket descriptors are available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOC - <tt>socket</tt> is not a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the referenced <tt>socket</tt> is not a type that supports the <em>listen</em> method
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: listen manual pages on unix-based systems
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: listen function in Microsoft's Winsock functions reference
  type: :BULLET
full_name: UNIXServer#listen
is_singleton: false
name: listen
params: |
  socket.listen( int ) => 0

visibility: public
ri/1.8/system/PStore/%5b%5d-i.yaml000064400000000776150403642170012223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieves a value from the PStore file data, by <em>name</em>. The hierarchy of Ruby objects stored under that root <em>name</em> will be returned.
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: This method is only valid in a PStore#transaction. It will raise PStore::Error if called at any other time."
full_name: PStore#[]
is_singleton: false
name: "[]"
params: (name)
visibility: public
ri/1.8/system/PStore/abort-i.yaml000064400000001646150403642170012456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Ends the current PStore#transaction, discarding any changes to the data store.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: " require &quot;pstore&quot;\n\n store = PStore.new(&quot;data_file.pstore&quot;)\n store.transaction do  # begin transaction\n   store[:one] = 1     # this change is not applied, see below...\n   store[:two] = 2     # this change is not applied, see below...\n\n   store.abort         # end transaction here, discard all changes\n\n   store[:three] = 3   # this change is never reached\n end\n"
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: This method is only valid in a PStore#transaction. It will raise PStore::Error if called at any other time."
full_name: PStore#abort
is_singleton: false
name: abort
params: ()
visibility: public
ri/1.8/system/PStore/cdesc-PStore.yaml000064400000007042150403642200013402 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: "Usage example:"
- !ruby/struct:SM::Flow::VERB 
  body: " require &quot;pstore&quot;\n\n # a mock wiki object...\n class WikiPage\n   def initialize( page_name, author, contents )\n     @page_name = page_name\n     @revisions = Array.new\n\n     add_revision(author, contents)\n   end\n\n   attr_reader :page_name\n\n   def add_revision( author, contents )\n     @revisions &lt;&lt; { :created  =&gt; Time.now,\n                     :author   =&gt; author,\n                     :contents =&gt; contents }\n   end\n\n   def wiki_page_references\n     [@page_name] + @revisions.last[:contents].scan(/\\b(?:[A-Z]+[a-z]+){2,}/)\n   end\n\n   # ...\n end\n\n # create a new page...\n home_page = WikiPage.new( &quot;HomePage&quot;, &quot;James Edward Gray II&quot;,\n                           &quot;A page about the JoysOfDocumentation...&quot; )\n\n # then we want to update page data and the index together, or not at all...\n wiki = PStore.new(&quot;wiki_pages.pstore&quot;)\n wiki.transaction do  # begin transaction; do all of this or none of it\n   # store page...\n   wiki[home_page.page_name] = home_page\n   # ensure that an index has been created...\n   wiki[:wiki_index] ||= Array.new\n   # update wiki index...\n   wiki[:wiki_index].push(*home_page.wiki_page_references)\n end                   # commit changes to wiki data store file\n\n ### Some time later... ###\n\n # read wiki data...\n wiki.transaction(true) do  # begin read-only transaction, no changes allowed\n   wiki.roots.each do |data_root_name|\n     p data_root_name\n     p wiki[data_root_name]\n   end\n end\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RDWR_ACCESS
  value: File::RDWR | File::CREAT | binmode
- !ruby/object:RI::Constant 
  comment: 
  name: RD_ACCESS
  value: File::RDONLY | binmode
- !ruby/object:RI::Constant 
  comment: 
  name: WR_ACCESS
  value: File::WRONLY | File::CREAT | File::TRUNC | binmode
full_name: PStore
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: abort
- !ruby/object:RI::MethodSummary 
  name: commit
- !ruby/object:RI::MethodSummary 
  name: commit_new
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: in_transaction
- !ruby/object:RI::MethodSummary 
  name: in_transaction_wr
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: root?
- !ruby/object:RI::MethodSummary 
  name: roots
- !ruby/object:RI::MethodSummary 
  name: transaction
name: PStore
superclass: Object
ri/1.8/system/PStore/path-i.yaml000064400000000357150403642200012273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the path to the data store file.
full_name: PStore#path
is_singleton: false
name: path
params: ()
visibility: public
ri/1.8/system/PStore/Error/cdesc-Error.yaml000064400000000427150403642210014351 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The error type thrown by all PStore methods.
constants: []

full_name: PStore::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/PStore/delete-i.yaml000064400000000716150403642210012601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes an object hierarchy from the data store, by <em>name</em>.
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: 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."
full_name: PStore#delete
is_singleton: false
name: delete
params: (name)
visibility: public
ri/1.8/system/PStore/roots-i.yaml000064400000000656150403642220012511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the names of all object hierarchies currently in the store.
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: This method is only valid in a PStore#transaction. It will raise PStore::Error if called at any other time."
full_name: PStore#roots
is_singleton: false
name: roots
params: ()
visibility: public
ri/1.8/system/PStore/new-c.yaml000064400000000461150403642220012120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: To construct a PStore object, pass in the <em>file</em> path where you would like the data to be stored.
full_name: PStore::new
is_singleton: true
name: new
params: (file)
visibility: public
ri/1.8/system/PStore/in_transaction_wr-i.yaml000064400000000536150403642220015063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises PStore::Error if the calling code is not in a PStore#transaction or if the code is in a read-only PStore#transaction.
full_name: PStore#in_transaction_wr
is_singleton: false
name: in_transaction_wr
params: ()
visibility: private
ri/1.8/system/PStore/commit_new-i.yaml000064400000000374150403642230013502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Commits changes to the data store file.
full_name: PStore#commit_new
is_singleton: false
name: commit_new
params: (f)
visibility: private
ri/1.8/system/PStore/in_transaction-i.yaml000064400000000444150403642230014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises PStore::Error if the calling code is not in a PStore#transaction.
full_name: PStore#in_transaction
is_singleton: false
name: in_transaction
params: ()
visibility: private
ri/1.8/system/PStore/commit-i.yaml000064400000001574150403642230012634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Ends the current PStore#transaction, committing any changes to the data store immediately.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: " require &quot;pstore&quot;\n\n store = PStore.new(&quot;data_file.pstore&quot;)\n store.transaction do  # begin transaction\n   # load some data into the store...\n   store[:one] = 1\n   store[:two] = 2\n\n   store.commit        # end transaction here, committing changes\n\n   store[:three] = 3   # this change is never reached\n end\n"
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: This method is only valid in a PStore#transaction. It will raise PStore::Error if called at any other time."
full_name: PStore#commit
is_singleton: false
name: commit
params: ()
visibility: public
ri/1.8/system/PStore/%5b%5d%3d-i.yaml000064400000002241150403642240012502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Stores an individual Ruby object or a hierarchy of Ruby objects in the data store file under the root <em>name</em>. Assigning to a <em>name</em> already in the data store clobbers the old data.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: " require &quot;pstore&quot;\n\n store = PStore.new(&quot;data_file.pstore&quot;)\n store.transaction do  # begin transaction\n   # load some data into the store...\n   store[:single_object] = &quot;My data...&quot;\n   store[:obj_heirarchy] = { &quot;Kev Jackson&quot; =&gt; [&quot;rational.rb&quot;, &quot;pstore.rb&quot;],\n                             &quot;James Gray&quot;  =&gt; [&quot;erb.rb&quot;, &quot;pstore.rb&quot;] }\n end                   # commit changes to data store file\n"
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: 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."
full_name: PStore#[]=
is_singleton: false
name: "[]="
params: (name, value)
visibility: public
ri/1.8/system/PStore/root%3f-i.yaml000064400000000671150403642240012623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the supplied <em>name</em> is currently in the data store.
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: This method is only valid in a PStore#transaction. It will raise PStore::Error if called at any other time."
full_name: PStore#root?
is_singleton: false
name: root?
params: (name)
visibility: public
ri/1.8/system/PStore/transaction-i.yaml000064400000002045150403642240013664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: pstore
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: If <em>read_only</em> is set to <tt>true</tt>, 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.
- !ruby/struct:SM::Flow::P 
  body: Note that PStore does not support nested transactions.
full_name: PStore#transaction
is_singleton: false
name: transaction
params: (read_only=false) {|pstore| ...}
visibility: public
ri/1.8/system/PStore/fetch-i.yaml000064400000001304150403642250012426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method is just like PStore#[], save that you may also provide a <em>default</em> value for the object. In the event the specified <em>name</em> is not found in the data store, your <em>default</em> will be returned instead. If you do not specify a default, PStore::Error will be raised if the object is not found.
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: This method is only valid in a PStore#transaction. It will raise PStore::Error if called at any other time."
full_name: PStore#fetch
is_singleton: false
name: fetch
params: (name, default=PStore::Error)
visibility: public
ri/1.8/system/SystemCallError/cdesc-SystemCallError.yaml000064400000001416150403642260017143 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: SystemCallError
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: errno
name: SystemCallError
superclass: StandardError
ri/1.8/system/SystemCallError/errno-i.yaml000064400000000443150403642260014344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return this SystemCallError's error number.
full_name: SystemCallError#errno
is_singleton: false
name: errno
params: |
  system_call_error.errno   => fixnum

visibility: public
ri/1.8/system/SystemCallError/new-c.yaml000064400000001024150403642260013776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <em>errno</em> corresponds to a known system error code, constructs the appropriate <tt>Errno</tt> class for that error, otherwise constructs a generic <tt>SystemCallError</tt> object. The error number is subsequently available via the <tt>errno</tt> method.
full_name: SystemCallError::new
is_singleton: true
name: new
params: |
  SystemCallError.new(msg, errno)  => system_call_error_subclass

visibility: public
ri/1.8/system/SystemCallError/%3d%3d%3d-c.yaml000064400000000620150403642270014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if the receiver is a generic <tt>SystemCallError</tt>, or if the error numbers <em>self</em> and <em>other</em> are the same.
full_name: SystemCallError::===
is_singleton: true
name: ===
params: |
  system_call_error === other  => true or false

visibility: public
ri/1.8/system/RangeError/cdesc-RangeError.yaml000064400000001176150403642300015071 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: RangeError
includes: []

instance_methods: []

name: RangeError
superclass: StandardError
ri/1.8/system/ExceptionForMatrix/cdesc-ExceptionForMatrix.yaml000064400000000313150403642300020331 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ExceptionForMatrix
includes: []

instance_methods: []

name: ExceptionForMatrix
superclass: 
ri/1.8/system/StopIteration/cdesc-StopIteration.yaml000064400000000624150403642310016363 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "call-seq:"
- !ruby/struct:SM::Flow::VERB 
  body: "  e.rewind   =&gt; e\n"
- !ruby/struct:SM::Flow::P 
  body: Rewinds the enumeration sequence by the next method.
constants: []

full_name: StopIteration
includes: []

instance_methods: []

name: StopIteration
superclass: IndexError
ri/1.8/system/Net/FTP/connect-i.yaml000064400000001000150403642320012720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Establishes an FTP connection to host, optionally overriding the default port. If the environment variable <tt>SOCKS_SERVER</tt> is set, sets up the connection through a SOCKS proxy. Raises an exception (typically <tt>Errno::ECONNREFUSED</tt>) if the connection cannot be established.
full_name: Net::FTP#connect
is_singleton: false
name: connect
params: (host, port = FTP_PORT)
visibility: public
ri/1.8/system/Net/FTP/putline-i.yaml000064400000000257150403642330012765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#putline
is_singleton: false
name: putline
params: (line)
visibility: private
ri/1.8/system/Net/FTP/system-i.yaml000064400000000350150403642330012623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns system information.
full_name: Net::FTP#system
is_singleton: false
name: system
params: ()
visibility: public
ri/1.8/system/Net/FTP/site-i.yaml000064400000000342150403642340012245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Issues a SITE command.
full_name: Net::FTP#site
is_singleton: false
name: site
params: (arg)
visibility: public
ri/1.8/system/Net/FTP/storbinary-i.yaml000064400000001060150403642340013473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: data
comment: 
- !ruby/struct:SM::Flow::P 
  body: Puts the connection into binary (image) mode, issues the given server-side command (such as &quot;STOR myfile&quot;), and sends the contents of the file named <tt>file</tt> to the server. If the optional block is given, it also passes it the data, in chunks of <tt>blocksize</tt> characters.
full_name: Net::FTP#storbinary
is_singleton: false
name: storbinary
params: (cmd, file, blocksize, rest_offset = nil) {|data| ...}
visibility: public
ri/1.8/system/Net/FTP/size-i.yaml000064400000000401150403642350012250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of the given (remote) filename.
full_name: Net::FTP#size
is_singleton: false
name: size
params: (filename)
visibility: public
ri/1.8/system/Net/FTP/mdtm-i.yaml000064400000000374150403642350012250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Issues the MDTM command. TODO: more info."
full_name: Net::FTP#mdtm
is_singleton: false
name: mdtm
params: (filename)
visibility: public
ri/1.8/system/Net/FTP/sendport-i.yaml000064400000000267150403642350013146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#sendport
is_singleton: false
name: sendport
params: (host, port)
visibility: private
ri/1.8/system/Net/FTP/voidresp-i.yaml000064400000000255150403642350013140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#voidresp
is_singleton: false
name: voidresp
params: ()
visibility: private
ri/1.8/system/Net/FTP/help-i.yaml000064400000000352150403642360012234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Issues the HELP command.
full_name: Net::FTP#help
is_singleton: false
name: help
params: (arg = nil)
visibility: public
ri/1.8/system/Net/FTP/storlines-i.yaml000064400000000767150403642360013340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: line
comment: 
- !ruby/struct:SM::Flow::P 
  body: Puts the connection into ASCII (text) mode, issues the given server-side command (such as &quot;STOR myfile&quot;), and sends the contents of the file named <tt>file</tt> to the server, one line at a time. If the optional block is given, it also passes it the lines.
full_name: Net::FTP#storlines
is_singleton: false
name: storlines
params: (cmd, file) {|line| ...}
visibility: public
ri/1.8/system/Net/FTP/rmdir-i.yaml000064400000000355150403642360012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a remote directory.
full_name: Net::FTP#rmdir
is_singleton: false
name: rmdir
params: (dirname)
visibility: public
ri/1.8/system/Net/FTP/abort-i.yaml000064400000000366150403642370012421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Aborts the previous command (ABOR command).
full_name: Net::FTP#abort
is_singleton: false
name: abort
params: ()
visibility: public
ri/1.8/system/Net/FTP/makepasv-i.yaml000064400000000255150403642370013116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#makepasv
is_singleton: false
name: makepasv
params: ()
visibility: private
ri/1.8/system/Net/FTP/parse229-i.yaml000064400000000261150403642400012645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#parse229
is_singleton: false
name: parse229
params: (resp)
visibility: private
ri/1.8/system/Net/FTP/quit-i.yaml000064400000000337150403642400012264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Exits the FTP session.
full_name: Net::FTP#quit
is_singleton: false
name: quit
params: ()
visibility: public
ri/1.8/system/Net/FTP/delete-i.yaml000064400000000362150403642400012542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes a file on the server.
full_name: Net::FTP#delete
is_singleton: false
name: delete
params: (filename)
visibility: public
ri/1.8/system/Net/FTP/parse227-i.yaml000064400000000261150403642410012644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#parse227
is_singleton: false
name: parse227
params: (resp)
visibility: private
ri/1.8/system/Net/FTP/getaddress-i.yaml000064400000000261150403642410013424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#getaddress
is_singleton: false
name: getaddress
params: ()
visibility: private
ri/1.8/system/Net/FTP/puttextfile-i.yaml000064400000000761150403642410013661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: line
comment: 
- !ruby/struct:SM::Flow::P 
  body: Transfers <tt>localfile</tt> to the server in ASCII (text) mode, storing the result in <tt>remotefile</tt>. If callback or an associated block is supplied, calls it, passing in the transmitted data one line at a time.
full_name: Net::FTP#puttextfile
is_singleton: false
name: puttextfile
params: (localfile, remotefile = File.basename(localfile)) {|line| ...}
visibility: public
ri/1.8/system/Net/FTP/getdir-i.yaml000064400000000335150403642420012560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pwd"
full_name: Net::FTP#getdir
is_singleton: false
name: getdir
params: ()
visibility: public
ri/1.8/system/Net/FTP/rename-i.yaml000064400000000372150403642420012552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Renames a file on the server.
full_name: Net::FTP#rename
is_singleton: false
name: rename
params: (fromname, toname)
visibility: public
ri/1.8/system/Net/FTP/ls-i.yaml000064400000000333150403642420011716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #list"
full_name: Net::FTP#ls
is_singleton: false
name: ls
params: (*args)
visibility: public
ri/1.8/system/Net/FTP/transfercmd-i.yaml000064400000000311150403642430013605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#transfercmd
is_singleton: false
name: transfercmd
params: (cmd, rest_offset = nil)
visibility: private
ri/1.8/system/Net/FTP/retrlines-i.yaml000064400000000756150403642430013321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: line
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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 <tt>cmd</tt> is a server command (such as &quot;RETR myfile&quot;).
full_name: Net::FTP#retrlines
is_singleton: false
name: retrlines
params: (cmd) {|line| ...}
visibility: public
ri/1.8/system/Net/FTP/noop-i.yaml000064400000000337150403642440012261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Issues a NOOP command.
full_name: Net::FTP#noop
is_singleton: false
name: noop
params: ()
visibility: public
ri/1.8/system/Net/FTP/makeport-i.yaml000064400000000255150403642440013127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#makeport
is_singleton: false
name: makeport
params: ()
visibility: private
ri/1.8/system/Net/FTP/acct-i.yaml000064400000000372150403642440012217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends the ACCT command. TODO: more info."
full_name: Net::FTP#acct
is_singleton: false
name: acct
params: (account)
visibility: public
ri/1.8/system/Net/FTP/get-i.yaml000064400000000642150403642450012065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: data
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Retrieves <tt>remotefile</tt> in whatever mode the session is set (text or binary). See #gettextfile and #getbinaryfile."
full_name: Net::FTP#get
is_singleton: false
name: get
params: (remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE) {|data| ...}
visibility: public
ri/1.8/system/Net/FTP/set_socket-i.yaml000064400000000405150403642450013446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: WRITEME or make private
full_name: Net::FTP#set_socket
is_singleton: false
name: set_socket
params: (sock, get_greeting = true)
visibility: public
ri/1.8/system/Net/FTP/mkdir-i.yaml000064400000000355150403642450012415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a remote directory.
full_name: Net::FTP#mkdir
is_singleton: false
name: mkdir
params: (dirname)
visibility: public
ri/1.8/system/Net/FTP/new-c.yaml000064400000000737150403642460012077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Creates and returns a new <tt>FTP</tt> object. If a <tt>host</tt> is given, a connection is made. Additionally, if the <tt>user</tt> is given, the given user name, password, and (optionally) account are used to log in. See #login."
full_name: Net::FTP::new
is_singleton: true
name: new
params: (host = nil, user = nil, passwd = nil, acct = nil)
visibility: public
ri/1.8/system/Net/FTP/retrbinary-i.yaml000064400000001012150403642460013460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: data
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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 <tt>blocksize</tt> characters. Note that <tt>cmd</tt> is a server command (such as &quot;RETR myfile&quot;).
full_name: Net::FTP#retrbinary
is_singleton: false
name: retrbinary
params: (cmd, blocksize, rest_offset = nil) {|data| ...}
visibility: public
ri/1.8/system/Net/FTP/mtime-i.yaml000064400000000571150403642460012423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the last modification time of the (remote) file. If <tt>local</tt> is <tt>true</tt>, it is returned as a local time, otherwise it's a UTC time.
full_name: Net::FTP#mtime
is_singleton: false
name: mtime
params: (filename, local = false)
visibility: public
ri/1.8/system/Net/FTP/putbinaryfile-i.yaml000064400000001000150403642460014151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: data
comment: 
- !ruby/struct:SM::Flow::P 
  body: Transfers <tt>localfile</tt> to the server in binary mode, storing the result in <tt>remotefile</tt>. If a block is supplied, calls it, passing in the transmitted data in <tt>blocksize</tt> chunks.
full_name: Net::FTP#putbinaryfile
is_singleton: false
name: putbinaryfile
params: (localfile, remotefile = File.basename(localfile), blocksize = DEFAULT_BLOCKSIZE) {|data| ...}
visibility: public
ri/1.8/system/Net/FTP/status-i.yaml000064400000000357150403642470012636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the status (STAT command).
full_name: Net::FTP#status
is_singleton: false
name: status
params: ()
visibility: public
ri/1.8/system/Net/FTP/closed%3f-i.yaml000064400000000402150403642470013051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the connection is closed.
full_name: Net::FTP#closed?
is_singleton: false
name: closed?
params: ()
visibility: public
ri/1.8/system/Net/FTP/sanitize-i.yaml000064400000000256150403642500013131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#sanitize
is_singleton: false
name: sanitize
params: (s)
visibility: private
ri/1.8/system/Net/FTP/return_code%3d-i.yaml000064400000000342150403642500014104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Obsolete
full_name: Net::FTP#return_code=
is_singleton: false
name: return_code=
params: (s)
visibility: public
ri/1.8/system/Net/FTP/pwd-i.yaml000064400000000426150403642500012074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: getdir
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current remote directory.
full_name: Net::FTP#pwd
is_singleton: false
name: pwd
params: ()
visibility: public
ri/1.8/system/Net/FTP/return_code-i.yaml000064400000000337150403642510013615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Obsolete
full_name: Net::FTP#return_code
is_singleton: false
name: return_code
params: ()
visibility: public
ri/1.8/system/Net/FTP/login-i.yaml000064400000001211150403642510012404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Logs in to the remote host. The session must have been previously connected. If <tt>user</tt> is the string &quot;anonymous&quot; and the <tt>password</tt> is <tt>nil</tt>, a password of <tt>user@host</tt> is synthesized. If the <tt>acct</tt> parameter is not <tt>nil</tt>, an FTP ACCT command is sent following the successful login. Raises an exception on error (typically <tt>Net::FTPPermError</tt>).
full_name: Net::FTP#login
is_singleton: false
name: login
params: (user = "anonymous", passwd = nil, acct = nil)
visibility: public
ri/1.8/system/Net/FTP/dir-i.yaml000064400000000335150403642520012061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #list"
full_name: Net::FTP#dir
is_singleton: false
name: dir
params: (*args)
visibility: public
ri/1.8/system/Net/FTP/voidcmd-i.yaml000064400000000413150403642520012725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a command and expect a response beginning with '2'.
full_name: Net::FTP#voidcmd
is_singleton: false
name: voidcmd
params: (cmd)
visibility: public
ri/1.8/system/Net/FTP/gettextfile-i.yaml000064400000000702150403642520013625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: line
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieves <tt>remotefile</tt> in ASCII (text) mode, storing the result in <tt>localfile</tt>. If a block is supplied, it is passed the retrieved data one line at a time.
full_name: Net::FTP#gettextfile
is_singleton: false
name: gettextfile
params: (remotefile, localfile = File.basename(remotefile)) {|line| ...}
visibility: public
ri/1.8/system/Net/FTP/parse228-i.yaml000064400000000261150403642520012647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#parse228
is_singleton: false
name: parse228
params: (resp)
visibility: private
ri/1.8/system/Net/FTP/put-i.yaml000064400000000645150403642530012120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Transfers <tt>localfile</tt> to the server in whatever mode the session is set (text or binary). See #puttextfile and #putbinaryfile."
full_name: Net::FTP#put
is_singleton: false
name: put
params: (localfile, remotefile = File.basename(localfile), blocksize = DEFAULT_BLOCKSIZE, &block)
visibility: public
ri/1.8/system/Net/FTP/close-i.yaml000064400000000464150403642530012414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Closes the connection. Further operations are impossible until you open a new connection with #connect."
full_name: Net::FTP#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Net/FTP/sendcmd-i.yaml000064400000000373150403642540012724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a command and returns the response.
full_name: Net::FTP#sendcmd
is_singleton: false
name: sendcmd
params: (cmd)
visibility: public
ri/1.8/system/Net/FTP/getmultiline-i.yaml000064400000000265150403642540014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#getmultiline
is_singleton: false
name: getmultiline
params: ()
visibility: private
ri/1.8/system/Net/FTP/chdir-i.yaml000064400000000361150403642540012375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes the (remote) directory.
full_name: Net::FTP#chdir
is_singleton: false
name: chdir
params: (dirname)
visibility: public
ri/1.8/system/Net/FTP/getline-i.yaml000064400000000253150403642550012734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#getline
is_singleton: false
name: getline
params: ()
visibility: private
ri/1.8/system/Net/FTP/cdesc-FTP.yaml000064400000014315150403642550012573 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "When <tt>true</tt>, transfers are performed in binary mode. Default: <tt>true</tt>."
  name: binary
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "When <tt>true</tt>, all traffic to and from the server is written to +$stdout+. Default: <tt>false</tt>."
  name: debug_mode
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The server's last response.
  name: last_response
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The server's last response code.
  name: last_response_code
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "When <tt>true</tt>, the connection is in passive mode. Default: <tt>false</tt>."
  name: passive
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "Sets or retrieves the <tt>resume</tt> status, which decides whether incomplete transfers are resumed or restarted. Default: <tt>false</tt>."
  name: resume
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The server's welcome message.
  name: welcome
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'net/ftp'\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example 1
- !ruby/struct:SM::Flow::VERB 
  body: "  ftp = Net::FTP.new('ftp.netlab.co.jp')\n  ftp.login\n  files = ftp.chdir('pub/lang/ruby/contrib')\n  files = ftp.list('n*')\n  ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024)\n  ftp.close\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example 2
- !ruby/struct:SM::Flow::VERB 
  body: "  Net::FTP.open('ftp.netlab.co.jp') do |ftp|\n    ftp.login\n    files = ftp.chdir('pub/lang/ruby/contrib')\n    files = ftp.list('n*')\n    ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024)\n  end\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Major Methods
- !ruby/struct:SM::Flow::P 
  body: "The following are the methods most likely to be useful to users:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: FTP.open
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#getbinaryfile"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#gettextfile"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#putbinaryfile"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#puttextfile"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#chdir"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#nlst"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#size"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#rename"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#delete"
  type: :BULLET
constants: []

full_name: Net::FTP
includes: 
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: abort
- !ruby/object:RI::MethodSummary 
  name: acct
- !ruby/object:RI::MethodSummary 
  name: chdir
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: closed?
- !ruby/object:RI::MethodSummary 
  name: connect
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: dir
- !ruby/object:RI::MethodSummary 
  name: get
- !ruby/object:RI::MethodSummary 
  name: getaddress
- !ruby/object:RI::MethodSummary 
  name: getbinaryfile
- !ruby/object:RI::MethodSummary 
  name: getdir
- !ruby/object:RI::MethodSummary 
  name: getline
- !ruby/object:RI::MethodSummary 
  name: getmultiline
- !ruby/object:RI::MethodSummary 
  name: getresp
- !ruby/object:RI::MethodSummary 
  name: gettextfile
- !ruby/object:RI::MethodSummary 
  name: help
- !ruby/object:RI::MethodSummary 
  name: list
- !ruby/object:RI::MethodSummary 
  name: login
- !ruby/object:RI::MethodSummary 
  name: ls
- !ruby/object:RI::MethodSummary 
  name: makepasv
- !ruby/object:RI::MethodSummary 
  name: makeport
- !ruby/object:RI::MethodSummary 
  name: mdtm
- !ruby/object:RI::MethodSummary 
  name: mkdir
- !ruby/object:RI::MethodSummary 
  name: mtime
- !ruby/object:RI::MethodSummary 
  name: nlst
- !ruby/object:RI::MethodSummary 
  name: noop
- !ruby/object:RI::MethodSummary 
  name: open_socket
- !ruby/object:RI::MethodSummary 
  name: parse227
- !ruby/object:RI::MethodSummary 
  name: parse228
- !ruby/object:RI::MethodSummary 
  name: parse229
- !ruby/object:RI::MethodSummary 
  name: parse257
- !ruby/object:RI::MethodSummary 
  name: put
- !ruby/object:RI::MethodSummary 
  name: putbinaryfile
- !ruby/object:RI::MethodSummary 
  name: putline
- !ruby/object:RI::MethodSummary 
  name: puttextfile
- !ruby/object:RI::MethodSummary 
  name: pwd
- !ruby/object:RI::MethodSummary 
  name: quit
- !ruby/object:RI::MethodSummary 
  name: rename
- !ruby/object:RI::MethodSummary 
  name: retrbinary
- !ruby/object:RI::MethodSummary 
  name: retrlines
- !ruby/object:RI::MethodSummary 
  name: return_code
- !ruby/object:RI::MethodSummary 
  name: return_code=
- !ruby/object:RI::MethodSummary 
  name: rmdir
- !ruby/object:RI::MethodSummary 
  name: sanitize
- !ruby/object:RI::MethodSummary 
  name: sendcmd
- !ruby/object:RI::MethodSummary 
  name: sendport
- !ruby/object:RI::MethodSummary 
  name: set_socket
- !ruby/object:RI::MethodSummary 
  name: site
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: status
- !ruby/object:RI::MethodSummary 
  name: storbinary
- !ruby/object:RI::MethodSummary 
  name: storlines
- !ruby/object:RI::MethodSummary 
  name: system
- !ruby/object:RI::MethodSummary 
  name: transfercmd
- !ruby/object:RI::MethodSummary 
  name: voidcmd
- !ruby/object:RI::MethodSummary 
  name: voidresp
name: FTP
superclass: Object
ri/1.8/system/Net/FTP/getresp-i.yaml000064400000000253150403642560012757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#getresp
is_singleton: false
name: getresp
params: ()
visibility: private
ri/1.8/system/Net/FTP/list-i.yaml000064400000000670150403642560012264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: ls
- !ruby/object:RI::AliasName 
  name: dir
block_params: line
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::FTP#list
is_singleton: false
name: list
params: (*args) {|line| ...}
visibility: public
ri/1.8/system/Net/FTP/getbinaryfile-i.yaml000064400000000751150403642560014135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: data
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieves <tt>remotefile</tt> in binary mode, storing the result in <tt>localfile</tt>. If a block is supplied, it is passed the retrieved data in <tt>blocksize</tt> chunks.
full_name: Net::FTP#getbinaryfile
is_singleton: false
name: getbinaryfile
params: (remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE) {|data| ...}
visibility: public
ri/1.8/system/Net/FTP/nlst-i.yaml000064400000000410150403642560012261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of filenames in the remote directory.
full_name: Net::FTP#nlst
is_singleton: false
name: nlst
params: (dir = nil)
visibility: public
ri/1.8/system/Net/FTP/parse257-i.yaml000064400000000261150403642570012656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#parse257
is_singleton: false
name: parse257
params: (resp)
visibility: private
ri/1.8/system/Net/FTP/open_socket-i.yaml000064400000000275150403642570013624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::FTP#open_socket
is_singleton: false
name: open_socket
params: (host, port)
visibility: private
ri/1.8/system/Net/FTP/open-c.yaml000064400000000763150403642570012250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ftp
comment: 
- !ruby/struct:SM::Flow::P 
  body: A synonym for <tt>FTP.new</tt>, but with a mandatory host parameter.
- !ruby/struct:SM::Flow::P 
  body: If a block is given, it is passed the <tt>FTP</tt> object, which will be closed when the block finishes, or when an exception is raised.
full_name: Net::FTP::open
is_singleton: true
name: open
params: (host, user = nil, passwd = nil, acct = nil) {|ftp| ...}
visibility: public
ri/1.8/system/Net/SMTPSyntaxError/cdesc-SMTPSyntaxError.yaml000064400000000551150403642600017512 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents an SMTP command syntax error (error code 500)
constants: []

full_name: Net::SMTPSyntaxError
includes: 
- !ruby/object:RI::IncludedModule 
  name: SMTPError
instance_methods: []

name: SMTPSyntaxError
superclass: ProtoSyntaxError
ri/1.8/system/Net/HTTPRetriableError/cdesc-HTTPRetriableError.yaml000064400000000432150403642610020547 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::HTTPRetriableError
includes: 
- !ruby/object:RI::IncludedModule 
  name: HTTPExceptions
instance_methods: []

name: HTTPRetriableError
superclass: ProtoRetriableError
ri/1.8/system/Net/SMTPUnsupportedCommand/cdesc-SMTPUnsupportedCommand.yaml000064400000000537150403642620022376 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Command is not supported on server.
constants: []

full_name: Net::SMTPUnsupportedCommand
includes: 
- !ruby/object:RI::IncludedModule 
  name: SMTPError
instance_methods: []

name: SMTPUnsupportedCommand
superclass: ProtocolError
ri/1.8/system/Net/SMTPAuthenticationError/cdesc-SMTPAuthenticationError.yaml000064400000000547150403642620022703 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents an SMTP authentication error.
constants: []

full_name: Net::SMTPAuthenticationError
includes: 
- !ruby/object:RI::IncludedModule 
  name: SMTPError
instance_methods: []

name: SMTPAuthenticationError
superclass: ProtoAuthError
ri/1.8/system/Net/HTTPGenericRequest/body_stream%3d-i.yaml000064400000000310150403642620017075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#body_stream=
is_singleton: false
name: body_stream=
params: (input)
visibility: public
ri/1.8/system/Net/HTTPGenericRequest/inspect-i.yaml000064400000000271150403642630015745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Net/HTTPGenericRequest/request_body_permitted%3f-i.yaml000064400000000331150403642630021355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#request_body_permitted?
is_singleton: false
name: request_body_permitted?
params: ()
visibility: public
ri/1.8/system/Net/HTTPGenericRequest/response_body_permitted%3f-i.yaml000064400000000333150403642640021526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#response_body_permitted?
is_singleton: false
name: response_body_permitted?
params: ()
visibility: public
ri/1.8/system/Net/HTTPGenericRequest/supply_default_content_type-i.yaml000064400000000342150403642640022133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#supply_default_content_type
is_singleton: false
name: supply_default_content_type
params: ()
visibility: private
ri/1.8/system/Net/HTTPGenericRequest/send_request_with_body-i.yaml000064400000000355150403642640021055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#send_request_with_body
is_singleton: false
name: send_request_with_body
params: (sock, ver, path, body)
visibility: private
ri/1.8/system/Net/HTTPGenericRequest/cdesc-HTTPGenericRequest.yaml000064400000002622150403642650020562 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: body
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: body_stream
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: method
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: path
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parent of HTTPRequest class. Do not use this directly; use a subclass of HTTPRequest.
- !ruby/struct:SM::Flow::P 
  body: Mixes in the HTTPHeader module.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BUFSIZE
  value: 16*1024
full_name: Net::HTTPGenericRequest
includes: 
- !ruby/object:RI::IncludedModule 
  name: HTTPHeader
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: body=
- !ruby/object:RI::MethodSummary 
  name: body_exist?
- !ruby/object:RI::MethodSummary 
  name: body_stream=
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: request_body_permitted?
- !ruby/object:RI::MethodSummary 
  name: response_body_permitted?
- !ruby/object:RI::MethodSummary 
  name: send_request_with_body
- !ruby/object:RI::MethodSummary 
  name: send_request_with_body_stream
- !ruby/object:RI::MethodSummary 
  name: supply_default_content_type
- !ruby/object:RI::MethodSummary 
  name: write_header
name: HTTPGenericRequest
superclass: Object
ri/1.8/system/Net/HTTPGenericRequest/new-c.yaml000064400000000334150403642650015065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest::new
is_singleton: true
name: new
params: (m, reqbody, resbody, path, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTPGenericRequest/write_header-i.yaml000064400000000323150403642650016742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#write_header
is_singleton: false
name: write_header
params: (sock, ver, path)
visibility: private
ri/1.8/system/Net/HTTPGenericRequest/body%3d-i.yaml000064400000000270150403642660015533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#body=
is_singleton: false
name: body=
params: (str)
visibility: public
ri/1.8/system/Net/HTTPGenericRequest/send_request_with_body_stream-i.yaml000064400000000370150403642660022427 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#send_request_with_body_stream
is_singleton: false
name: send_request_with_body_stream
params: (sock, ver, path, f)
visibility: private
ri/1.8/system/Net/HTTPGenericRequest/body_exist%3f-i.yaml000064400000000301150403642660016744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPGenericRequest#body_exist?
is_singleton: false
name: body_exist?
params: ()
visibility: public
ri/1.8/system/Net/HTTPFatalError/cdesc-HTTPFatalError.yaml000064400000000416150403642670017013 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::HTTPFatalError
includes: 
- !ruby/object:RI::IncludedModule 
  name: HTTPExceptions
instance_methods: []

name: HTTPFatalError
superclass: ProtoFatalError
ri/1.8/system/Net/Protocol/cdesc-Protocol.yaml000064400000000302150403642700015077 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::Protocol
includes: []

instance_methods: []

name: Protocol
superclass: Object
ri/1.8/system/Net/POPError/cdesc-POPError.yaml000064400000000512150403642710014621 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Non-authentication POP3 protocol error (reply code &quot;-ERR&quot;, except authentication).
constants: []

full_name: Net::POPError
includes: []

instance_methods: []

name: POPError
superclass: ProtocolError
ri/1.8/system/Net/SMTPFatalError/cdesc-SMTPFatalError.yaml000064400000000554150403642710017021 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents a fatal SMTP error (error code 5xx, except for 500)
constants: []

full_name: Net::SMTPFatalError
includes: 
- !ruby/object:RI::IncludedModule 
  name: SMTPError
instance_methods: []

name: SMTPFatalError
superclass: ProtoFatalError
ri/1.8/system/Net/ProtoRetriableError/cdesc-ProtoRetriableError.yaml000064400000000337150403642720021425 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtoRetriableError
includes: []

instance_methods: []

name: ProtoRetriableError
superclass: ProtocolError
ri/1.8/system/Net/InternetMessageIO/cdesc-InternetMessageIO.yaml000064400000000330150403642730020353 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::InternetMessageIO
includes: []

instance_methods: []

name: InternetMessageIO
superclass: BufferedIO
ri/1.8/system/Net/HTTPServerException/cdesc-HTTPServerException.yaml000064400000000431150403642740021156 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::HTTPServerException
includes: 
- !ruby/object:RI::IncludedModule 
  name: HTTPExceptions
instance_methods: []

name: HTTPServerException
superclass: ProtoServerError
ri/1.8/system/Net/POPAuthenticationError/cdesc-POPAuthenticationError.yaml000064400000000445150403642740022431 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: POP3 authentication error.
constants: []

full_name: Net::POPAuthenticationError
includes: []

instance_methods: []

name: POPAuthenticationError
superclass: ProtoAuthError
ri/1.8/system/Net/HTTPError/cdesc-HTTPError.yaml000064400000000402150403642750015065 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::HTTPError
includes: 
- !ruby/object:RI::IncludedModule 
  name: HTTPExceptions
instance_methods: []

name: HTTPError
superclass: ProtocolError
ri/1.8/system/Net/HTTPHeader/basic_auth-i.yaml000064400000000461150403642750014651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Set the Authorization: header for &quot;Basic&quot; authorization."
full_name: Net::HTTPHeader#basic_auth
is_singleton: false
name: basic_auth
params: (account, password)
visibility: public
ri/1.8/system/Net/HTTPHeader/%5b%5d-i.yaml000064400000000546150403642760013425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the header field corresponding to the case-insensitive key. For example, a key of &quot;Content-Type&quot; might return &quot;text/html&quot;
full_name: Net::HTTPHeader#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/Net/HTTPHeader/each-i.yaml000064400000000347150403642760013453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #each_header"
full_name: Net::HTTPHeader#each
is_singleton: false
name: each
params: (
visibility: public
ri/1.8/system/Net/HTTPHeader/add_field-i.yaml000064400000001673150403642760014451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "[Ruby 1.8.3] Adds header field instead of replace. Second argument <tt>val</tt> must be a String. See also #[]=, #[] and #get_fields."
- !ruby/struct:SM::Flow::VERB 
  body: "  request.add_field 'X-My-Header', 'a'\n  p request['X-My-Header']              #=&gt; &quot;a&quot;\n  p request.get_fields('X-My-Header')   #=&gt; [&quot;a&quot;]\n  request.add_field 'X-My-Header', 'b'\n  p request['X-My-Header']              #=&gt; &quot;a, b&quot;\n  p request.get_fields('X-My-Header')   #=&gt; [&quot;a&quot;, &quot;b&quot;]\n  request.add_field 'X-My-Header', 'c'\n  p request['X-My-Header']              #=&gt; &quot;a, b, c&quot;\n  p request.get_fields('X-My-Header')   #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]\n"
full_name: Net::HTTPHeader#add_field
is_singleton: false
name: add_field
params: (key, val)
visibility: public
ri/1.8/system/Net/HTTPHeader/content_length%3d-i.yaml000064400000000304150403642770016054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPHeader#content_length=
is_singleton: false
name: content_length=
params: (len)
visibility: public
ri/1.8/system/Net/HTTPHeader/set_form_data-i.yaml000064400000001106150403642770015355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: form_data=
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set header fields and a body from HTML form data. <tt>params</tt> should be a Hash containing HTML form data. Optional argument <tt>sep</tt> means data record separator.
- !ruby/struct:SM::Flow::P 
  body: "This method also set Content-Type: header field to application/x-www-form-urlencoded."
full_name: Net::HTTPHeader#set_form_data
is_singleton: false
name: set_form_data
params: (params, sep = '&')
visibility: public
ri/1.8/system/Net/HTTPHeader/sub_type-i.yaml000064400000000626150403643000014371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a content type string such as &quot;html&quot;. This method returns nil if Content-Type: header field does not exist or sub-type is not given (e.g. &quot;Content-Type: text&quot;)."
full_name: Net::HTTPHeader#sub_type
is_singleton: false
name: sub_type
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/cdesc-HTTPHeader.yaml000064400000004714150403643000015262 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Header module.
- !ruby/struct:SM::Flow::P 
  body: Provides access to @header in the mixed-into class as a hash-like object, except with case-insensitive keys. Also provides methods for accessing commonly-used header values in a more convenient format.
constants: []

full_name: Net::HTTPHeader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: add_field
- !ruby/object:RI::MethodSummary 
  name: basic_auth
- !ruby/object:RI::MethodSummary 
  name: basic_encode
- !ruby/object:RI::MethodSummary 
  name: canonical_each
- !ruby/object:RI::MethodSummary 
  name: capitalize
- !ruby/object:RI::MethodSummary 
  name: chunked?
- !ruby/object:RI::MethodSummary 
  name: content_length
- !ruby/object:RI::MethodSummary 
  name: content_length=
- !ruby/object:RI::MethodSummary 
  name: content_range
- !ruby/object:RI::MethodSummary 
  name: content_type
- !ruby/object:RI::MethodSummary 
  name: content_type=
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_capitalized
- !ruby/object:RI::MethodSummary 
  name: each_capitalized_name
- !ruby/object:RI::MethodSummary 
  name: each_header
- !ruby/object:RI::MethodSummary 
  name: each_key
- !ruby/object:RI::MethodSummary 
  name: each_name
- !ruby/object:RI::MethodSummary 
  name: each_value
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: form_data=
- !ruby/object:RI::MethodSummary 
  name: get_fields
- !ruby/object:RI::MethodSummary 
  name: initialize_http_header
- !ruby/object:RI::MethodSummary 
  name: key?
- !ruby/object:RI::MethodSummary 
  name: main_type
- !ruby/object:RI::MethodSummary 
  name: proxy_basic_auth
- !ruby/object:RI::MethodSummary 
  name: range
- !ruby/object:RI::MethodSummary 
  name: range=
- !ruby/object:RI::MethodSummary 
  name: range_length
- !ruby/object:RI::MethodSummary 
  name: set_content_type
- !ruby/object:RI::MethodSummary 
  name: set_form_data
- !ruby/object:RI::MethodSummary 
  name: set_range
- !ruby/object:RI::MethodSummary 
  name: sub_type
- !ruby/object:RI::MethodSummary 
  name: to_hash
- !ruby/object:RI::MethodSummary 
  name: type_params
- !ruby/object:RI::MethodSummary 
  name: urlencode
name: HTTPHeader
superclass: 
ri/1.8/system/Net/HTTPHeader/range%3d-i.yaml000064400000000364150403643000014126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #set_range"
full_name: Net::HTTPHeader#range=
is_singleton: false
name: range=
params: (r, e = nil)
visibility: public
ri/1.8/system/Net/HTTPHeader/delete-i.yaml000064400000000356150403643010014002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a header field.
full_name: Net::HTTPHeader#delete
is_singleton: false
name: delete
params: (key)
visibility: public
ri/1.8/system/Net/HTTPHeader/get_fields-i.yaml000064400000001454150403643010014645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "[Ruby 1.8.3] Returns an array of header field strings corresponding to the case-insensitive <tt>key</tt>. This method allows you to get duplicated header fields without any processing. See also #[]."
- !ruby/struct:SM::Flow::VERB 
  body: "  p response.get_fields('Set-Cookie')\n    #=&gt; [&quot;session=al98axx; expires=Fri, 31-Dec-1999 23:58:23&quot;,\n         &quot;query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23&quot;]\n  p response['Set-Cookie']\n    #=&gt; &quot;session=al98axx; expires=Fri, 31-Dec-1999 23:58:23, query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23&quot;\n"
full_name: Net::HTTPHeader#get_fields
is_singleton: false
name: get_fields
params: (key)
visibility: public
ri/1.8/system/Net/HTTPHeader/each_key-i.yaml000064400000000356150403643010014310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #each_name"
full_name: Net::HTTPHeader#each_key
is_singleton: false
name: each_key
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/content_type%3d-i.yaml000064400000000420150403643020015540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #set_content_type"
full_name: Net::HTTPHeader#content_type=
is_singleton: false
name: content_type=
params: (type, params = {})
visibility: public
ri/1.8/system/Net/HTTPHeader/each_header-i.yaml000064400000000524150403643020014746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: each
block_params: +key+, +value+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates for each header names and values.
full_name: Net::HTTPHeader#each_header
is_singleton: false
name: each_header
params: ( {|+key+, +value+| ...}
visibility: public
ri/1.8/system/Net/HTTPHeader/content_type-i.yaml000064400000000544150403643030015254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a content type string such as &quot;text/html&quot;. This method returns nil if Content-Type: header field does not exist."
full_name: Net::HTTPHeader#content_type
is_singleton: false
name: content_type
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/proxy_basic_auth-i.yaml000064400000000477150403643030016111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Set Proxy-Authorization: header for &quot;Basic&quot; authorization."
full_name: Net::HTTPHeader#proxy_basic_auth
is_singleton: false
name: proxy_basic_auth
params: (account, password)
visibility: public
ri/1.8/system/Net/HTTPHeader/capitalize-i.yaml000064400000000274150403643030014666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPHeader#capitalize
is_singleton: false
name: capitalize
params: (name)
visibility: private
ri/1.8/system/Net/HTTPHeader/each_value-i.yaml000064400000000422150403643040014631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: +value+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates for each header values.
full_name: Net::HTTPHeader#each_value
is_singleton: false
name: each_value
params: ( {|+value+| ...}
visibility: public
ri/1.8/system/Net/HTTPHeader/basic_encode-i.yaml000064400000000315150403643040015134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPHeader#basic_encode
is_singleton: false
name: basic_encode
params: (account, password)
visibility: private
ri/1.8/system/Net/HTTPHeader/canonical_each-i.yaml000064400000000401150403643040015441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #each_capitalized"
full_name: Net::HTTPHeader#canonical_each
is_singleton: false
name: canonical_each
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/content_length-i.yaml000064400000000540150403643050015552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns an Integer object which represents the Content-Length: header field or <tt>nil</tt> if that field is not provided."
full_name: Net::HTTPHeader#content_length
is_singleton: false
name: content_length
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/urlencode-i.yaml000064400000000271150403643050014520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPHeader#urlencode
is_singleton: false
name: urlencode
params: (str)
visibility: private
ri/1.8/system/Net/HTTPHeader/range_length-i.yaml000064400000000437150403643050015201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "The length of the range represented in Content-Range: header."
full_name: Net::HTTPHeader#range_length
is_singleton: false
name: range_length
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/initialize_http_header-i.yaml000064400000000331150403643060017246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPHeader#initialize_http_header
is_singleton: false
name: initialize_http_header
params: (initheader)
visibility: public
ri/1.8/system/Net/HTTPHeader/type_params-i.yaml000064400000000504150403643060015064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns content type parameters as a Hash as like {&quot;charset&quot; =&gt; &quot;iso-2022-jp&quot;}.
full_name: Net::HTTPHeader#type_params
is_singleton: false
name: type_params
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/each_name-i.yaml000064400000000470150403643060014442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: each_key
block_params: +key+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates for each header names.
full_name: Net::HTTPHeader#each_name
is_singleton: false
name: each_name
params: () {|+key+| ...}
visibility: public
ri/1.8/system/Net/HTTPHeader/set_content_type-i.yaml000064400000000660150403643070016132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: content_type=
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Set Content-Type: header field by <tt>type</tt> and <tt>params</tt>. <tt>type</tt> must be a String, <tt>params</tt> must be a Hash."
full_name: Net::HTTPHeader#set_content_type
is_singleton: false
name: set_content_type
params: (type, params = {})
visibility: public
ri/1.8/system/Net/HTTPHeader/main_type-i.yaml000064400000000531150403643070014526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a content type string such as &quot;text&quot;. This method returns nil if Content-Type: header field does not exist."
full_name: Net::HTTPHeader#main_type
is_singleton: false
name: main_type
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/form_data%3d-i.yaml000064400000000407150403643100014765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #set_form_data"
full_name: Net::HTTPHeader#form_data=
is_singleton: false
name: form_data=
params: (params, sep = '&')
visibility: public
ri/1.8/system/Net/HTTPHeader/to_hash-i.yaml000064400000000410150403643100014154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a Hash consist of header names and values.
full_name: Net::HTTPHeader#to_hash
is_singleton: false
name: to_hash
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/content_range-i.yaml000064400000000643150403643100015365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a Range object which represents Content-Range: header field. This indicates, for a partial entity body, where this fragment fits inside the full entity body, as range of byte offsets."
full_name: Net::HTTPHeader#content_range
is_singleton: false
name: content_range
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/%5b%5d%3d-i.yaml000064400000000430150403643110013677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the header field corresponding to the case-insensitive key.
full_name: Net::HTTPHeader#[]=
is_singleton: false
name: "[]="
params: (key, val)
visibility: public
ri/1.8/system/Net/HTTPHeader/each_capitalized-i.yaml000064400000000641150403643110016007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: canonical_each
block_params: capitalize(k), v.join(', ')
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #each_header, except the keys are provided in capitalized form."
full_name: Net::HTTPHeader#each_capitalized
is_singleton: false
name: each_capitalized
params: () {|capitalize(k), v.join(', ')| ...}
visibility: public
ri/1.8/system/Net/HTTPHeader/range-i.yaml000064400000000507150403643110013633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns an Array of Range objects which represents Range: header field, or <tt>nil</tt> if there is no such header."
full_name: Net::HTTPHeader#range
is_singleton: false
name: range
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/key%3f-i.yaml000064400000000366150403643110013630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if <tt>key</tt> header exists.
full_name: Net::HTTPHeader#key?
is_singleton: false
name: key?
params: (key)
visibility: public
ri/1.8/system/Net/HTTPHeader/chunked%3f-i.yaml000064400000000727150403643110014462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns &quot;true&quot; if the &quot;transfer-encoding&quot; header is present and set to &quot;chunked&quot;. This is an HTTP/1.1 feature, allowing the the content to be sent in &quot;chunks&quot; without at the outset stating the entire content length.
full_name: Net::HTTPHeader#chunked?
is_singleton: false
name: chunked?
params: ()
visibility: public
ri/1.8/system/Net/HTTPHeader/fetch-i.yaml000064400000000664150403643110013634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: +key+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the header field corresponding to the case-insensitive key. Returns the default value <tt>args</tt>, or the result of the block, or nil, if there's no header field named key. See Hash#fetch
full_name: Net::HTTPHeader#fetch
is_singleton: false
name: fetch
params: (key, *args) {|+key+| ...}
visibility: public
ri/1.8/system/Net/HTTPHeader/each_capitalized_name-i.yaml000064400000000460150403643110017006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: +key+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates for each capitalized header names.
full_name: Net::HTTPHeader#each_capitalized_name
is_singleton: false
name: each_capitalized_name
params: () {|+key+| ...}
visibility: public
ri/1.8/system/Net/HTTPHeader/set_range-i.yaml000064400000000711150403643110014503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: range=
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Set Range: header from Range (arg r) or beginning index and length from it (arg idx&amp;len)."
- !ruby/struct:SM::Flow::VERB 
  body: "  req.range = (0..1023)\n  req.set_range 0, 1023\n"
full_name: Net::HTTPHeader#set_range
is_singleton: false
name: set_range
params: (r, e = nil)
visibility: public
ri/1.8/system/Net/cdesc-Net.yaml000064400000000255150403643110012226 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net
includes: []

instance_methods: []

name: Net
superclass: 
ri/1.8/system/Net/ProtoSyntaxError/cdesc-ProtoSyntaxError.yaml000064400000000331150403643110020343 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtoSyntaxError
includes: []

instance_methods: []

name: ProtoSyntaxError
superclass: ProtocolError
ri/1.8/system/Net/APOP/cdesc-APOP.yaml000064400000000524150403643120012776 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This class is equivalent to POP3, except that it uses APOP authentication.
constants: []

full_name: Net::APOP
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: apop?
name: APOP
superclass: POP3
ri/1.8/system/Net/APOP/apop%3f-i.yaml000064400000000340150403643120012637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Always returns true.
full_name: Net::APOP#apop?
is_singleton: false
name: apop?
params: ()
visibility: public
ri/1.8/system/Net/SMTPUnknownError/cdesc-SMTPUnknownError.yaml000064400000000537150403643120020036 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Unexpected reply code returned from server.
constants: []

full_name: Net::SMTPUnknownError
includes: 
- !ruby/object:RI::IncludedModule 
  name: SMTPError
instance_methods: []

name: SMTPUnknownError
superclass: ProtoUnknownError
ri/1.8/system/Net/SMTP/check_auth_continue-i.yaml000064400000000307150403643130015434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#check_auth_continue
is_singleton: false
name: check_auth_continue
params: (res)
visibility: private
ri/1.8/system/Net/SMTP/cram_secret-i.yaml000064400000000300150403643130013712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#cram_secret
is_singleton: false
name: cram_secret
params: (secret, mask)
visibility: private
ri/1.8/system/Net/SMTP/check_auth_method-i.yaml000064400000000304150403643130015065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#check_auth_method
is_singleton: false
name: check_auth_method
params: (type)
visibility: private
ri/1.8/system/Net/SMTP/disable_starttls-i.yaml000064400000000527150403643130015001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Disables SMTP/TLS (STARTTLS) for this object. Must be called before the connection is established to have any effect.
full_name: Net::SMTP#disable_starttls
is_singleton: false
name: disable_starttls
params: ()
visibility: public
ri/1.8/system/Net/SMTP/enable_starttls_auto-i.yaml000064400000000601150403643130015645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Enables SMTP/TLS (STARTTLS) for this object if server accepts. <tt>context</tt> is a OpenSSL::SSL::SSLContext object.
full_name: Net::SMTP#enable_starttls_auto
is_singleton: false
name: enable_starttls_auto
params: (context = SMTP.default_ssl_context)
visibility: public
ri/1.8/system/Net/SMTP/mailfrom-i.yaml000064400000000266150403643130013244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#mailfrom
is_singleton: false
name: mailfrom
params: (from_addr)
visibility: public
ri/1.8/system/Net/SMTP/enable_tls-i.yaml000064400000000761150403643130013546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: enable_ssl
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for this object. Must be called before the connection is established to have any effect. <tt>context</tt> is a OpenSSL::SSL::SSLContext object."
full_name: Net::SMTP#enable_tls
is_singleton: false
name: enable_tls
params: (context = SMTP.default_ssl_context)
visibility: public
ri/1.8/system/Net/SMTP/esmtp%3d-i.yaml000064400000000732150403643130013060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "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)."
full_name: Net::SMTP#esmtp=
is_singleton: false
name: esmtp=
params: (bool)
visibility: public
ri/1.8/system/Net/SMTP/esmtp-i.yaml000064400000000337150403643130012565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #esmtp?"
full_name: Net::SMTP#esmtp
is_singleton: false
name: esmtp
params: ()
visibility: public
ri/1.8/system/Net/SMTP/send_mail-i.yaml000064400000000411150403643130013361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #send_message"
full_name: Net::SMTP#send_mail
is_singleton: false
name: send_mail
params: (msgstr, from_addr, *to_addrs)
visibility: public
ri/1.8/system/Net/SMTP/started%3f-i.yaml000064400000000405150403643140013376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>true</tt> if the SMTP session has been started.
full_name: Net::SMTP#started?
is_singleton: false
name: started?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/enable_starttls-i.yaml000064400000000545150403643140014625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Enables SMTP/TLS (STARTTLS) for this object. <tt>context</tt> is a OpenSSL::SSL::SSLContext object.
full_name: Net::SMTP#enable_starttls
is_singleton: false
name: enable_starttls
params: (context = SMTP.default_ssl_context)
visibility: public
ri/1.8/system/Net/SMTP/disable_ssl-i.yaml000064400000000360150403643140013716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #disable_tls"
full_name: Net::SMTP#disable_ssl
is_singleton: false
name: disable_ssl
params: ()
visibility: public
ri/1.8/system/Net/SMTP/recv_response-i.yaml000064400000000270150403643140014307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#recv_response
is_singleton: false
name: recv_response
params: ()
visibility: private
ri/1.8/system/Net/SMTP/ehlo-i.yaml000064400000000253150403643140012362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#ehlo
is_singleton: false
name: ehlo
params: (domain)
visibility: public
ri/1.8/system/Net/SMTP/critical-i.yaml000064400000000277150403643140013233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ()
comment: 
full_name: Net::SMTP#critical
is_singleton: false
name: critical
params: (&block) {|| ...}
visibility: private
ri/1.8/system/Net/SMTP/check_continue-i.yaml000064400000000275150403643140014420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#check_continue
is_singleton: false
name: check_continue
params: (res)
visibility: private
ri/1.8/system/Net/SMTP/tls%3f-i.yaml000064400000000434150403643140012534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: ssl?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if this object uses SMTP/TLS (SMTPS).
full_name: Net::SMTP#tls?
is_singleton: false
name: tls?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/esmtp%3f-i.yaml000064400000000476150403643140013070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: esmtp
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>true</tt> if the SMTP object uses ESMTP (which it does by default).
full_name: Net::SMTP#esmtp?
is_singleton: false
name: esmtp?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/set_debug_output-i.yaml000064400000000377150403643140015023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #debug_output="
full_name: Net::SMTP#set_debug_output
is_singleton: false
name: set_debug_output
params: (arg)
visibility: public
ri/1.8/system/Net/SMTP/capable_starttls%3f-i.yaml000064400000000477150403643140015270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if server advertises STARTTLS. You cannot get valid value before opening SMTP session.
full_name: Net::SMTP#capable_starttls?
is_singleton: false
name: capable_starttls?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/starttls-i.yaml000064400000000351150403643150013313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: SMTP command dispatcher
full_name: Net::SMTP#starttls
is_singleton: false
name: starttls
params: ()
visibility: public
ri/1.8/system/Net/SMTP/ready-i.yaml000064400000000400150403643150012532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #open_message_stream"
full_name: Net::SMTP#ready
is_singleton: false
name: ready
params: (from_addr, *to_addrs)
visibility: public
ri/1.8/system/Net/SMTP/default_port-c.yaml000064400000000373150403643150014121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default SMTP port number, 25.
full_name: Net::SMTP::default_port
is_singleton: true
name: default_port
params: ()
visibility: public
ri/1.8/system/Net/SMTP/helo-i.yaml000064400000000253150403643160012364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#helo
is_singleton: false
name: helo
params: (domain)
visibility: public
ri/1.8/system/Net/SMTP/quit-i.yaml000064400000000245150403643160012420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#quit
is_singleton: false
name: quit
params: ()
visibility: public
ri/1.8/system/Net/SMTP/debug_output%3d-i.yaml000064400000001201150403643160014431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: set_debug_output
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "WARNING: This method causes serious security holes. Use this method for only debugging."
- !ruby/struct:SM::Flow::P 
  body: "Set an output stream for debug logging. You must call this before #start."
- !ruby/struct:SM::Flow::VERB 
  body: "  # example\n  smtp = Net::SMTP.new(addr, port)\n  smtp.set_debug_output $stderr\n  smtp.start do |smtp|\n    ....\n  end\n"
full_name: Net::SMTP#debug_output=
is_singleton: false
name: debug_output=
params: (arg)
visibility: public
ri/1.8/system/Net/SMTP/send_message-i.yaml000064400000003365150403643170014102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: send_mail
- !ruby/object:RI::AliasName 
  name: sendmail
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends <tt>msgstr</tt> as a message. Single CR (&quot;\r&quot;) and LF (&quot;\n&quot;) found in the <tt>msgstr</tt>, are converted into the CR LF pair. You cannot send a binary message with this method. <tt>msgstr</tt> should include both the message headers and body.
- !ruby/struct:SM::Flow::P 
  body: <tt>from_addr</tt> is a String representing the source mail address.
- !ruby/struct:SM::Flow::P 
  body: <tt>to_addr</tt> is a String or Strings or Array of Strings, representing the destination mail address or addresses.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::SMTP.start('smtp.example.com') do |smtp|\n      smtp.send_message msgstr,\n                        'from@example.com',\n                        ['dest@example.com', 'dest2@example.com']\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Errors
- !ruby/struct:SM::Flow::P 
  body: "This method may raise:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPServerBusy
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPSyntaxError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPFatalError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPUnknownError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: IOError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: TimeoutError
  type: :BULLET
full_name: Net::SMTP#send_message
is_singleton: false
name: send_message
params: (msgstr, from_addr, *to_addrs)
visibility: public
ri/1.8/system/Net/SMTP/data-i.yaml000064400000001572150403643170012354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: stream
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method sends a message. If <tt>msgstr</tt> 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.
- !ruby/struct:SM::Flow::VERB 
  body: "  # Example 1 (by string)\n  smtp.data(&lt;&lt;EndMessage)\n  From: john@example.com\n  To: betty@example.com\n  Subject: I found a bug\n\n  Check vm.c:58879.\n  EndMessage\n\n  # Example 2 (by block)\n  smtp.data {|f|\n    f.puts &quot;From: john@example.com&quot;\n    f.puts &quot;To: betty@example.com&quot;\n    f.puts &quot;Subject: I found a bug&quot;\n    f.puts &quot;&quot;\n    f.puts &quot;Check vm.c:58879.&quot;\n  }\n"
full_name: Net::SMTP#data
is_singleton: false
name: data
params: (msgstr = nil) {|stream| ...}
visibility: public
ri/1.8/system/Net/SMTP/check_auth_response-i.yaml000064400000000307150403643200015444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#check_auth_response
is_singleton: false
name: check_auth_response
params: (res)
visibility: private
ri/1.8/system/Net/SMTP/do_start-i.yaml000064400000000321150403643200013243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#do_start
is_singleton: false
name: do_start
params: (helo_domain, user, secret, authtype)
visibility: private
ri/1.8/system/Net/SMTP/starttls_auto%3f-i.yaml000064400000000440150403643200014634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if this object uses STARTTLS when server advertises STARTTLS.
full_name: Net::SMTP#starttls_auto?
is_singleton: false
name: starttls_auto?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/capable%3f-i.yaml000064400000000261150403643200013314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#capable?
is_singleton: false
name: capable?
params: (key)
visibility: private
ri/1.8/system/Net/SMTP/new_internet_message_io-i.yaml000064400000000315150403643210016324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#new_internet_message_io
is_singleton: false
name: new_internet_message_io
params: (s)
visibility: private
ri/1.8/system/Net/SMTP/capable_cram_md5_auth%3f-i.yaml000064400000000516150403643210016110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if server advertises AUTH CRAM-MD5. You cannot get valid value before opening SMTP session.
full_name: Net::SMTP#capable_cram_md5_auth?
is_singleton: false
name: capable_cram_md5_auth?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/capable_login_auth%3f-i.yaml000064400000000505150403643220015530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if server advertises AUTH LOGIN. You cannot get valid value before opening SMTP session.
full_name: Net::SMTP#capable_login_auth?
is_singleton: false
name: capable_login_auth?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/default_ssl_context-c.yaml000064400000000303150403643220015471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::default_ssl_context
is_singleton: true
name: default_ssl_context
params: ()
visibility: public
ri/1.8/system/Net/SMTP/check_auth_args-i.yaml000064400000000310150403643220014536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#check_auth_args
is_singleton: false
name: check_auth_args
params: (user, secret)
visibility: private
ri/1.8/system/Net/SMTP/inspect-i.yaml000064400000000406150403643220013077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Provide human-readable stringification of class state.
full_name: Net::SMTP#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Net/SMTP/finish-i.yaml000064400000000441150403643220012711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finishes the SMTP session and closes TCP connection. Raises IOError if not started.
full_name: Net::SMTP#finish
is_singleton: false
name: finish
params: ()
visibility: public
ri/1.8/system/Net/SMTP/get_response-i.yaml000064400000000275150403643220014133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#get_response
is_singleton: false
name: get_response
params: (reqline)
visibility: private
ri/1.8/system/Net/SMTP/auth_capable%3f-i.yaml000064400000000274150403643220014343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#auth_capable?
is_singleton: false
name: auth_capable?
params: (type)
visibility: private
ri/1.8/system/Net/SMTP/rcptto_list-i.yaml000064400000000306150403643220013777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: Net::SMTP#rcptto_list
is_singleton: false
name: rcptto_list
params: (to_addrs) {|| ...}
visibility: public
ri/1.8/system/Net/SMTP/capable_auth_types-i.yaml000064400000000526150403643230015272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns supported authentication methods on this server. You cannot get valid value before opening SMTP session.
full_name: Net::SMTP#capable_auth_types
is_singleton: false
name: capable_auth_types
params: ()
visibility: public
ri/1.8/system/Net/SMTP/starttls%3f-i.yaml000064400000000604150403643230013611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::SMTP#starttls?
is_singleton: false
name: starttls?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/sendmail-i.yaml000064400000000407150403643230013230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #send_message"
full_name: Net::SMTP#sendmail
is_singleton: false
name: sendmail
params: (msgstr, from_addr, *to_addrs)
visibility: public
ri/1.8/system/Net/SMTP/new-c.yaml000064400000001162150403643230012216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Net::SMTP object.
- !ruby/struct:SM::Flow::P 
  body: <tt>address</tt> is the hostname or ip address of your SMTP server. <tt>port</tt> is the port to connect to; it defaults to port 25.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::SMTP::new
is_singleton: true
name: new
params: (address, port = nil)
visibility: public
ri/1.8/system/Net/SMTP/ssl%3f-i.yaml000064400000000333150403643230012531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #tls?"
full_name: Net::SMTP#ssl?
is_singleton: false
name: ssl?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/getok-i.yaml000064400000000257150403643230012550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#getok
is_singleton: false
name: getok
params: (reqline)
visibility: private
ri/1.8/system/Net/SMTP/check_response-i.yaml000064400000000275150403643230014432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#check_response
is_singleton: false
name: check_response
params: (res)
visibility: private
ri/1.8/system/Net/SMTP/enable_ssl-i.yaml000064400000000417150403643230013544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #enable_tls"
full_name: Net::SMTP#enable_ssl
is_singleton: false
name: enable_ssl
params: (context = SMTP.default_ssl_context)
visibility: public
ri/1.8/system/Net/SMTP/start-i.yaml000064400000005121150403643240012570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: smtp
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens a TCP connection and starts the SMTP session.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/struct:SM::Flow::P 
  body: <tt>helo</tt> is the <em>HELO</em> <em>domain</em> that you'll dispatch mails from; see the discussion in the overview notes.
- !ruby/struct:SM::Flow::P 
  body: If both of <tt>user</tt> and <tt>secret</tt> are given, SMTP authentication will be attempted using the AUTH command. <tt>authtype</tt> 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Block Usage
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::P 
  body: This is very similar to the class method SMTP.start.
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/smtp'\n    smtp = Net::SMTP.new('smtp.mail.server', 25)\n    smtp.start(helo_domain, account, password, authtype) do |smtp|\n      smtp.send_message msgstr, 'from@example.com', ['dest@example.com']\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Errors
- !ruby/struct:SM::Flow::P 
  body: If session has already been started, an IOError will be raised.
- !ruby/struct:SM::Flow::P 
  body: "This method may raise:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPAuthenticationError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPServerBusy
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPSyntaxError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPFatalError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPUnknownError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: IOError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: TimeoutError
  type: :BULLET
full_name: Net::SMTP#start
is_singleton: false
name: start
params: (helo = 'localhost.localdomain', user = nil, secret = nil, authtype = nil) {|smtp| ...}
visibility: public
ri/1.8/system/Net/SMTP/cram_md5_response-i.yaml000064400000000413150403643240015037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "CRAM-MD5: [RFC2195]"
full_name: Net::SMTP#cram_md5_response
is_singleton: false
name: cram_md5_response
params: (secret, challenge)
visibility: private
ri/1.8/system/Net/SMTP/base64_encode-i.yaml000064400000000273150403643240014037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#base64_encode
is_singleton: false
name: base64_encode
params: (str)
visibility: private
ri/1.8/system/Net/SMTP/auth_login-i.yaml000064400000000275150403643240013571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#auth_login
is_singleton: false
name: auth_login
params: (user, secret)
visibility: public
ri/1.8/system/Net/SMTP/logging-i.yaml000064400000000257150403643250013067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#logging
is_singleton: false
name: logging
params: (msg)
visibility: private
ri/1.8/system/Net/SMTP/do_helo-i.yaml000064400000000267150403643250013053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#do_helo
is_singleton: false
name: do_helo
params: (helo_domain)
visibility: private
ri/1.8/system/Net/SMTP/auth_plain-i.yaml000064400000000275150403643250013565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#auth_plain
is_singleton: false
name: auth_plain
params: (user, secret)
visibility: public
ri/1.8/system/Net/SMTP/tlsconnect-i.yaml000064400000000263150403643250013612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#tlsconnect
is_singleton: false
name: tlsconnect
params: (s)
visibility: private
ri/1.8/system/Net/SMTP/read_timeout%3d-i.yaml000064400000000441150403643250014411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the number of seconds to wait until timing-out a read(2) call.
full_name: Net::SMTP#read_timeout=
is_singleton: false
name: read_timeout=
params: (sec)
visibility: public
ri/1.8/system/Net/SMTP/capable_plain_auth%3f-i.yaml000064400000000505150403643260015527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if server advertises AUTH PLAIN. You cannot get valid value before opening SMTP session.
full_name: Net::SMTP#capable_plain_auth?
is_singleton: false
name: capable_plain_auth?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/rcptto-i.yaml000064400000000260150403643260012747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#rcptto
is_singleton: false
name: rcptto
params: (to_addr)
visibility: public
ri/1.8/system/Net/SMTP/open_message_stream-i.yaml000064400000004756150403643260015472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: ready
block_params: stream
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Opens a message writer stream and gives it to the block. The stream is valid only in the block, and has these methods:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "puts(str = ''):"
    body: outputs STR and CR LF.
  - !ruby/struct:SM::Flow::LI 
    label: "print(str):"
    body: outputs STR.
  - !ruby/struct:SM::Flow::LI 
    label: "printf(fmt, *args):"
    body: outputs sprintf(fmt,*args).
  - !ruby/struct:SM::Flow::LI 
    label: "write(str):"
    body: outputs STR and returns the length of written bytes.
  - !ruby/struct:SM::Flow::LI 
    label: "<<(str):"
    body: outputs STR and returns self.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: If a single CR (&quot;\r&quot;) or LF (&quot;\n&quot;) is found in the message, it is converted to the CR LF pair. You cannot send a binary message with this method.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/struct:SM::Flow::P 
  body: <tt>from_addr</tt> is a String representing the source mail address.
- !ruby/struct:SM::Flow::P 
  body: <tt>to_addr</tt> is a String or Strings or Array of Strings, representing the destination mail address or addresses.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::SMTP.start('smtp.example.com', 25) do |smtp|\n      smtp.open_message_stream('from@example.com', ['dest@example.com']) do |f|\n        f.puts 'From: from@example.com'\n        f.puts 'To: dest@example.com'\n        f.puts 'Subject: test message'\n        f.puts\n        f.puts 'This is a test message.'\n      end\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Errors
- !ruby/struct:SM::Flow::P 
  body: "This method may raise:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPServerBusy
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPSyntaxError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPFatalError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPUnknownError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: IOError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: TimeoutError
  type: :BULLET
full_name: Net::SMTP#open_message_stream
is_singleton: false
name: open_message_stream
params: (from_addr, *to_addrs) {|stream| ...}
visibility: public
ri/1.8/system/Net/SMTP/disable_tls-i.yaml000064400000000561150403643260013725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: disable_ssl
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Disables SMTP/TLS for this object. Must be called before the connection is established to have any effect.
full_name: Net::SMTP#disable_tls
is_singleton: false
name: disable_tls
params: ()
visibility: public
ri/1.8/system/Net/SMTP/authenticate-i.yaml000064400000000337150403643260014117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#authenticate
is_singleton: false
name: authenticate
params: (user, secret, authtype = DEFAULT_AUTH_TYPE)
visibility: public
ri/1.8/system/Net/SMTP/do_finish-i.yaml000064400000000260150403643260013376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#do_finish
is_singleton: false
name: do_finish
params: ()
visibility: private
ri/1.8/system/Net/SMTP/cdesc-SMTP.yaml000064400000023112150403643260013051 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The address of the SMTP server to connect to.
  name: address
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Seconds to wait while attempting to open a connection. If the connection cannot be opened within this time, a TimeoutError is raised.
  name: open_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The port number of the SMTP server to connect to.
  name: port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Seconds to wait while reading one block (by one read(2) call). If the read(2) call does not complete within this time, a TimeoutError is raised.
  name: read_timeout
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: default_port
- !ruby/object:RI::MethodSummary 
  name: default_ssl_context
- !ruby/object:RI::MethodSummary 
  name: default_submission_port
- !ruby/object:RI::MethodSummary 
  name: default_tls_port
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: start
comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: Net::SMTP
- !ruby/struct:SM::Flow::H 
  level: 2
  text: What is This Library?
- !ruby/struct:SM::Flow::P 
  body: 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).
- !ruby/struct:SM::Flow::H 
  level: 2
  text: What is This Library NOT?
- !ruby/struct:SM::Flow::P 
  body: 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. You can get both libraries from RAA. (http://www.ruby-lang.org/en/raa.html)
- !ruby/struct:SM::Flow::P 
  body: "FYI: the official documentation on internet mail is: [RFC2822] (http://www.ietf.org/rfc/rfc2822.txt)."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Sending Messages
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/smtp'\n    Net::SMTP.start('your.smtp.server', 25) do |smtp|\n      # Use the SMTP object smtp only in this block.\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: Replace 'your.smtp.server' with your SMTP server. Normally your system manager or internet provider supplies a server for you.
- !ruby/struct:SM::Flow::P 
  body: Then you can send messages.
- !ruby/struct:SM::Flow::VERB 
  body: "    msgstr = &lt;&lt;END_OF_MESSAGE\n    From: Your Name &lt;your@mail.address&gt;\n    To: Destination Address &lt;someone@example.com&gt;\n    Subject: test message\n    Date: Sat, 23 Jun 2001 16:26:43 +0900\n    Message-Id: &lt;unique.message.id.string@example.com&gt;\n\n    This is a test message.\n    END_OF_MESSAGE\n\n    require 'net/smtp'\n    Net::SMTP.start('your.smtp.server', 25) do |smtp|\n      smtp.send_message msgstr,\n                        'your@mail.address',\n                        'his_addess@example.com'\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Closing the Session
- !ruby/struct:SM::Flow::P 
  body: "You MUST close the SMTP session after sending messages, by calling the #finish method:"
- !ruby/struct:SM::Flow::VERB 
  body: "    # using SMTP#finish\n    smtp = Net::SMTP.start('your.smtp.server', 25)\n    smtp.send_message msgstr, 'from@address', 'to@address'\n    smtp.finish\n"
- !ruby/struct:SM::Flow::P 
  body: "You can also use the block form of SMTP.start/SMTP#start. This closes the SMTP session automatically:"
- !ruby/struct:SM::Flow::VERB 
  body: "    # using block form of SMTP.start\n    Net::SMTP.start('your.smtp.server', 25) do |smtp|\n      smtp.send_message msgstr, 'from@address', 'to@address'\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: I strongly recommend this scheme. This form is simpler and more robust.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: HELO domain
- !ruby/struct:SM::Flow::P 
  body: 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 &quot;HELO domain&quot;. The SMTP server will judge whether it should send or reject the SMTP session by inspecting the HELO domain.
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::SMTP.start('your.smtp.server', 25,\n                    'mail.from.domain') { |smtp| ... }\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: SMTP Authentication
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::VERB 
  body: "    # PLAIN\n    Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',\n                    'Your Account', 'Your Password', :plain)\n    # LOGIN\n    Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',\n                    'Your Account', 'Your Password', :login)\n\n    # CRAM MD5\n    Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',\n                    'Your Account', 'Your Password', :cram_md5)\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Revision
  value: "%q$Revision: 28208 $.split[1]"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Authentication
  name: DEFAULT_AUTH_TYPE
  value: ":plain"
- !ruby/object:RI::Constant 
  comment: 
  name: IMASK
  value: "0x36"
- !ruby/object:RI::Constant 
  comment: 
  name: OMASK
  value: "0x5c"
- !ruby/object:RI::Constant 
  comment: 
  name: CRAM_BUFSIZE
  value: "64"
full_name: Net::SMTP
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: auth_capable?
- !ruby/object:RI::MethodSummary 
  name: auth_cram_md5
- !ruby/object:RI::MethodSummary 
  name: auth_login
- !ruby/object:RI::MethodSummary 
  name: auth_method
- !ruby/object:RI::MethodSummary 
  name: auth_plain
- !ruby/object:RI::MethodSummary 
  name: authenticate
- !ruby/object:RI::MethodSummary 
  name: base64_encode
- !ruby/object:RI::MethodSummary 
  name: capable?
- !ruby/object:RI::MethodSummary 
  name: capable_auth_types
- !ruby/object:RI::MethodSummary 
  name: capable_cram_md5_auth?
- !ruby/object:RI::MethodSummary 
  name: capable_login_auth?
- !ruby/object:RI::MethodSummary 
  name: capable_plain_auth?
- !ruby/object:RI::MethodSummary 
  name: capable_starttls?
- !ruby/object:RI::MethodSummary 
  name: check_auth_args
- !ruby/object:RI::MethodSummary 
  name: check_auth_continue
- !ruby/object:RI::MethodSummary 
  name: check_auth_method
- !ruby/object:RI::MethodSummary 
  name: check_auth_response
- !ruby/object:RI::MethodSummary 
  name: check_continue
- !ruby/object:RI::MethodSummary 
  name: check_response
- !ruby/object:RI::MethodSummary 
  name: cram_md5_response
- !ruby/object:RI::MethodSummary 
  name: cram_secret
- !ruby/object:RI::MethodSummary 
  name: critical
- !ruby/object:RI::MethodSummary 
  name: data
- !ruby/object:RI::MethodSummary 
  name: debug_output=
- !ruby/object:RI::MethodSummary 
  name: disable_ssl
- !ruby/object:RI::MethodSummary 
  name: disable_starttls
- !ruby/object:RI::MethodSummary 
  name: disable_tls
- !ruby/object:RI::MethodSummary 
  name: do_finish
- !ruby/object:RI::MethodSummary 
  name: do_helo
- !ruby/object:RI::MethodSummary 
  name: do_start
- !ruby/object:RI::MethodSummary 
  name: ehlo
- !ruby/object:RI::MethodSummary 
  name: enable_ssl
- !ruby/object:RI::MethodSummary 
  name: enable_starttls
- !ruby/object:RI::MethodSummary 
  name: enable_starttls_auto
- !ruby/object:RI::MethodSummary 
  name: enable_tls
- !ruby/object:RI::MethodSummary 
  name: esmtp
- !ruby/object:RI::MethodSummary 
  name: esmtp=
- !ruby/object:RI::MethodSummary 
  name: esmtp?
- !ruby/object:RI::MethodSummary 
  name: finish
- !ruby/object:RI::MethodSummary 
  name: get_response
- !ruby/object:RI::MethodSummary 
  name: getok
- !ruby/object:RI::MethodSummary 
  name: helo
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: logging
- !ruby/object:RI::MethodSummary 
  name: mailfrom
- !ruby/object:RI::MethodSummary 
  name: new_internet_message_io
- !ruby/object:RI::MethodSummary 
  name: open_message_stream
- !ruby/object:RI::MethodSummary 
  name: quit
- !ruby/object:RI::MethodSummary 
  name: rcptto
- !ruby/object:RI::MethodSummary 
  name: rcptto_list
- !ruby/object:RI::MethodSummary 
  name: read_timeout=
- !ruby/object:RI::MethodSummary 
  name: ready
- !ruby/object:RI::MethodSummary 
  name: recv_response
- !ruby/object:RI::MethodSummary 
  name: send_mail
- !ruby/object:RI::MethodSummary 
  name: send_message
- !ruby/object:RI::MethodSummary 
  name: sendmail
- !ruby/object:RI::MethodSummary 
  name: set_debug_output
- !ruby/object:RI::MethodSummary 
  name: ssl?
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: started?
- !ruby/object:RI::MethodSummary 
  name: starttls
- !ruby/object:RI::MethodSummary 
  name: starttls?
- !ruby/object:RI::MethodSummary 
  name: starttls_always?
- !ruby/object:RI::MethodSummary 
  name: starttls_auto?
- !ruby/object:RI::MethodSummary 
  name: tls?
- !ruby/object:RI::MethodSummary 
  name: tlsconnect
name: SMTP
superclass: Object
ri/1.8/system/Net/SMTP/start-c.yaml000064400000005207150403643260012571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: smtp
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Net::SMTP object and connects to the server.
- !ruby/struct:SM::Flow::P 
  body: "This method is equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Net::SMTP.new(address, port).start(helo_domain, account, password, authtype)\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::SMTP.start('your.smtp.server') do |smtp|\n      smtp.send_message msgstr, 'from@example.com', ['dest@example.com']\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Block Usage
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/struct:SM::Flow::P 
  body: <tt>address</tt> is the hostname or ip address of your smtp server.
- !ruby/struct:SM::Flow::P 
  body: <tt>port</tt> is the port to connect to; it defaults to port 25.
- !ruby/struct:SM::Flow::P 
  body: <tt>helo</tt> is the <em>HELO</em> <em>domain</em> provided by the client to the server (see overview comments); it defaults to 'localhost.localdomain'.
- !ruby/struct:SM::Flow::P 
  body: The remaining arguments are used for SMTP authentication, if required or desired. <tt>user</tt> is the account name; <tt>secret</tt> is your password or other authentication token; and <tt>authtype</tt> is the authentication type, one of :plain, :login, or :cram_md5. See the discussion of SMTP Authentication in the overview notes.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Errors
- !ruby/struct:SM::Flow::P 
  body: "This method may raise:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPAuthenticationError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPServerBusy
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPSyntaxError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPFatalError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Net::SMTPUnknownError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: IOError
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: TimeoutError
  type: :BULLET
full_name: Net::SMTP::start
is_singleton: true
name: start
params: (address, port = nil, helo = 'localhost.localdomain', user = nil, secret = nil, authtype = nil) {|smtp| ...}
visibility: public
ri/1.8/system/Net/SMTP/default_tls_port-c.yaml000064400000000405150403643260015001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default SMTPS port number, 465.
full_name: Net::SMTP::default_tls_port
is_singleton: true
name: default_tls_port
params: ()
visibility: public
ri/1.8/system/Net/SMTP/auth_method-i.yaml000064400000000270150403643260013736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#auth_method
is_singleton: false
name: auth_method
params: (type)
visibility: private
ri/1.8/system/Net/SMTP/Response/capabilities-i.yaml000064400000000277150403643260015673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response#capabilities
is_singleton: false
name: capabilities
params: ()
visibility: public
ri/1.8/system/Net/SMTP/Response/continue%3f-i.yaml000064400000000271150403643260015356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response#continue?
is_singleton: false
name: continue?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/Response/status_type_char-i.yaml000064400000000307150403643260016615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response#status_type_char
is_singleton: false
name: status_type_char
params: ()
visibility: public
ri/1.8/system/Net/SMTP/Response/parse-c.yaml000064400000000264150403643260014342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response::parse
is_singleton: true
name: parse
params: (str)
visibility: public
ri/1.8/system/Net/SMTP/Response/new-c.yaml000064400000000273150403643260014021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response::new
is_singleton: true
name: new
params: (status, string)
visibility: public
ri/1.8/system/Net/SMTP/Response/cdesc-Response.yaml000064400000001441150403643260015663 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: status
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: string
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse
comment: 
constants: []

full_name: Net::SMTP::Response
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: capabilities
- !ruby/object:RI::MethodSummary 
  name: continue?
- !ruby/object:RI::MethodSummary 
  name: cram_md5_challenge
- !ruby/object:RI::MethodSummary 
  name: exception_class
- !ruby/object:RI::MethodSummary 
  name: message
- !ruby/object:RI::MethodSummary 
  name: status_type_char
- !ruby/object:RI::MethodSummary 
  name: success?
name: Response
superclass: Object
ri/1.8/system/Net/SMTP/Response/cram_md5_challenge-i.yaml000064400000000313150403643260016722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response#cram_md5_challenge
is_singleton: false
name: cram_md5_challenge
params: ()
visibility: public
ri/1.8/system/Net/SMTP/Response/exception_class-i.yaml000064400000000305150403643260016415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response#exception_class
is_singleton: false
name: exception_class
params: ()
visibility: public
ri/1.8/system/Net/SMTP/Response/success%3f-i.yaml000064400000000267150403643260015207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response#success?
is_singleton: false
name: success?
params: ()
visibility: public
ri/1.8/system/Net/SMTP/Response/message-i.yaml000064400000000265150403643260014663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP::Response#message
is_singleton: false
name: message
params: ()
visibility: public
ri/1.8/system/Net/SMTP/auth_cram_md5-i.yaml000064400000000303150403643260014142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::SMTP#auth_cram_md5
is_singleton: false
name: auth_cram_md5
params: (user, secret)
visibility: public
ri/1.8/system/Net/SMTP/default_submission_port-c.yaml000064400000000435150403643260016375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default mail submission port number, 587.
full_name: Net::SMTP::default_submission_port
is_singleton: true
name: default_submission_port
params: ()
visibility: public
ri/1.8/system/Net/SMTP/starttls_always%3f-i.yaml000064400000000404150403643260015172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if this object uses STARTTLS.
full_name: Net::SMTP#starttls_always?
is_singleton: false
name: starttls_always?
params: ()
visibility: public
ri/1.8/system/Net/HTTPResponse/entity-i.yaml000064400000000347150403643260014471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #body"
full_name: Net::HTTPResponse#entity
is_singleton: false
name: entity
params: ()
visibility: public
ri/1.8/system/Net/HTTPResponse/read_body_0-i.yaml000064400000000300150403643260015311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPResponse#read_body_0
is_singleton: false
name: read_body_0
params: (dest)
visibility: private
ri/1.8/system/Net/HTTPResponse/procdest-i.yaml000064400000000301150403643260014766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPResponse#procdest
is_singleton: false
name: procdest
params: (dest, block)
visibility: private
ri/1.8/system/Net/HTTPResponse/read_status_line-c.yaml000064400000000312150403643270016465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPResponse::read_status_line
is_singleton: true
name: read_status_line
params: (sock)
visibility: private
ri/1.8/system/Net/HTTPResponse/each_response_header-c.yaml000064400000000377150403643270017301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: m[1], m.post_match
comment: 
full_name: Net::HTTPResponse::each_response_header
is_singleton: true
name: each_response_header
params: (sock) {|m[1], m.post_match| ...}
visibility: private
ri/1.8/system/Net/HTTPResponse/body-i.yaml000064400000001172150403643270014110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: entity
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the entity body.
- !ruby/struct:SM::Flow::P 
  body: Calling this method a second or subsequent time will return the already read string.
- !ruby/struct:SM::Flow::VERB 
  body: "  http.request_get('/index.html') {|res|\n    puts res.body\n  }\n\n  http.request_get('/index.html') {|res|\n    p res.body.object_id   # 538149362\n    p res.body.object_id   # 538149362\n  }\n"
full_name: Net::HTTPResponse#body
is_singleton: false
name: body
params: ()
visibility: public
ri/1.8/system/Net/HTTPResponse/response_class-c.yaml000064400000000306150403643270016166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPResponse::response_class
is_singleton: true
name: response_class
params: (code)
visibility: private
ri/1.8/system/Net/HTTPResponse/to_ary-i.yaml000064400000000561150403643270014451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For backward compatibility. To allow Net::HTTP 1.1 style assignment e.g.
- !ruby/struct:SM::Flow::VERB 
  body: "   response, body = Net::HTTP.get(....)\n"
full_name: Net::HTTPResponse#to_ary
is_singleton: false
name: to_ary
params: ()
visibility: public
ri/1.8/system/Net/HTTPResponse/inspect-i.yaml000064400000000263150403643270014620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPResponse#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Net/HTTPResponse/body_permitted%3f-c.yaml000064400000000406150403643270016454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if the response has body.
full_name: Net::HTTPResponse::body_permitted?
is_singleton: true
name: body_permitted?
params: ()
visibility: public
ri/1.8/system/Net/HTTPResponse/read_chunked-i.yaml000064400000000302150403643270015561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPResponse#read_chunked
is_singleton: false
name: read_chunked
params: (dest)
visibility: private
ri/1.8/system/Net/HTTPResponse/read_body-i.yaml000064400000001555150403643270015110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets entity body. If the block given, yields it to <tt>block</tt>. The body is provided in fragments, as it is read in from the socket.
- !ruby/struct:SM::Flow::P 
  body: Calling this method a second or subsequent time will return the already read string.
- !ruby/struct:SM::Flow::VERB 
  body: "  http.request_get('/index.html') {|res|\n    puts res.read_body\n  }\n\n  http.request_get('/index.html') {|res|\n    p res.read_body.object_id   # 538149362\n    p res.read_body.object_id   # 538149362\n  }\n\n  # using iterator\n  http.request_get('/index.html') {|res|\n    res.read_body do |segment|\n      print segment\n    end\n  }\n"
full_name: Net::HTTPResponse#read_body
is_singleton: false
name: read_body
params: (dest = nil, &block)
visibility: public
ri/1.8/system/Net/HTTPResponse/cdesc-HTTPResponse.yaml000064400000012422150403643270016302 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: HTTP result code string. For example, '302'. You can also determine the response type by which response subclass the response object is an instance of.
  name: code
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The HTTP version supported by the server.
  name: http_version
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: HTTP result message. For example, 'Not Found'.
  name: message
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: body_permitted?
- !ruby/object:RI::MethodSummary 
  name: each_response_header
- !ruby/object:RI::MethodSummary 
  name: read_status_line
- !ruby/object:RI::MethodSummary 
  name: response_class
comment: 
- !ruby/struct:SM::Flow::P 
  body: HTTP response class. This class wraps response header and entity. Mixes in the HTTPHeader module, which provides access to response header values both via hash-like methods and individual readers. Note that each possible HTTP response code defines its own HTTPResponse subclass. These are listed below. All classes are defined under the Net module. Indentation indicates inheritance.
- !ruby/struct:SM::Flow::VERB 
  body: "  xxx        HTTPResponse\n\n    1xx        HTTPInformation\n      100        HTTPContinue\n      101        HTTPSwitchProtocol\n\n    2xx        HTTPSuccess\n      200        HTTPOK\n      201        HTTPCreated\n      202        HTTPAccepted\n      203        HTTPNonAuthoritativeInformation\n      204        HTTPNoContent\n      205        HTTPResetContent\n      206        HTTPPartialContent\n\n    3xx        HTTPRedirection\n      300        HTTPMultipleChoice\n      301        HTTPMovedPermanently\n      302        HTTPFound\n      303        HTTPSeeOther\n      304        HTTPNotModified\n      305        HTTPUseProxy\n      307        HTTPTemporaryRedirect\n\n    4xx        HTTPClientError\n      400        HTTPBadRequest\n      401        HTTPUnauthorized\n      402        HTTPPaymentRequired\n      403        HTTPForbidden\n      404        HTTPNotFound\n      405        HTTPMethodNotAllowed\n      406        HTTPNotAcceptable\n      407        HTTPProxyAuthenticationRequired\n      408        HTTPRequestTimeOut\n      409        HTTPConflict\n      410        HTTPGone\n      411        HTTPLengthRequired\n      412        HTTPPreconditionFailed\n      413        HTTPRequestEntityTooLarge\n      414        HTTPRequestURITooLong\n      415        HTTPUnsupportedMediaType\n      416        HTTPRequestedRangeNotSatisfiable\n      417        HTTPExpectationFailed\n\n    5xx        HTTPServerError\n      500        HTTPInternalServerError\n      501        HTTPNotImplemented\n      502        HTTPBadGateway\n      503        HTTPServiceUnavailable\n      504        HTTPGatewayTimeOut\n      505        HTTPVersionNotSupported\n\n    xxx        HTTPUnknownResponse\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CODE_CLASS_TO_OBJ
  value: "{       '1' => HTTPInformation,       '2' => HTTPSuccess,       '3' => HTTPRedirection,       '4' => HTTPClientError,       '5' => HTTPServerError"
- !ruby/object:RI::Constant 
  comment: 
  name: CODE_TO_OBJ
  value: "{       '100' => HTTPContinue,       '101' => HTTPSwitchProtocol,        '200' => HTTPOK,       '201' => HTTPCreated,       '202' => HTTPAccepted,       '203' => HTTPNonAuthoritativeInformation,       '204' => HTTPNoContent,       '205' => HTTPResetContent,       '206' => HTTPPartialContent,        '300' => HTTPMultipleChoice,       '301' => HTTPMovedPermanently,       '302' => HTTPFound,       '303' => HTTPSeeOther,       '304' => HTTPNotModified,       '305' => HTTPUseProxy,       '307' => HTTPTemporaryRedirect,        '400' => HTTPBadRequest,       '401' => HTTPUnauthorized,       '402' => HTTPPaymentRequired,       '403' => HTTPForbidden,       '404' => HTTPNotFound,       '405' => HTTPMethodNotAllowed,       '406' => HTTPNotAcceptable,       '407' => HTTPProxyAuthenticationRequired,       '408' => HTTPRequestTimeOut,       '409' => HTTPConflict,       '410' => HTTPGone,       '411' => HTTPLengthRequired,       '412' => HTTPPreconditionFailed,       '413' => HTTPRequestEntityTooLarge,       '414' => HTTPRequestURITooLong,       '415' => HTTPUnsupportedMediaType,       '416' => HTTPRequestedRangeNotSatisfiable,       '417' => HTTPExpectationFailed,        '500' => HTTPInternalServerError,       '501' => HTTPNotImplemented,       '502' => HTTPBadGateway,       '503' => HTTPServiceUnavailable,       '504' => HTTPGatewayTimeOut,       '505' => HTTPVersionNotSupported"
full_name: Net::HTTPResponse
includes: 
- !ruby/object:RI::IncludedModule 
  name: HTTPHeader
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: body
- !ruby/object:RI::MethodSummary 
  name: entity
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: procdest
- !ruby/object:RI::MethodSummary 
  name: read_body
- !ruby/object:RI::MethodSummary 
  name: read_body_0
- !ruby/object:RI::MethodSummary 
  name: read_chunked
- !ruby/object:RI::MethodSummary 
  name: stream_check
- !ruby/object:RI::MethodSummary 
  name: to_ary
- !ruby/object:RI::MethodSummary 
  name: value
name: HTTPResponse
superclass: Object
ri/1.8/system/Net/HTTPResponse/stream_check-i.yaml000064400000000276150403643270015607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTPResponse#stream_check
is_singleton: false
name: stream_check
params: ()
visibility: private
ri/1.8/system/Net/HTTPResponse/value-i.yaml000064400000000401150403643270014261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises HTTP error if the response is not 2xx.
full_name: Net::HTTPResponse#value
is_singleton: false
name: value
params: ()
visibility: public
ri/1.8/system/Net/SMTPError/cdesc-SMTPError.yaml000064400000000414150403643300015070 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Module mixed in to all SMTP error classes
constants: []

full_name: Net::SMTPError
includes: []

instance_methods: []

name: SMTPError
superclass: 
ri/1.8/system/Net/BufferedIO/cdesc-BufferedIO.yaml000064400000000306150403643300015422 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::BufferedIO
includes: []

instance_methods: []

name: BufferedIO
superclass: Object
ri/1.8/system/Net/ProtoCommandError/cdesc-ProtoCommandError.yaml000064400000000333150403643300020526 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtoCommandError
includes: []

instance_methods: []

name: ProtoCommandError
superclass: ProtocolError
ri/1.8/system/Net/IMAP/uid_copy-i.yaml000064400000000435150403643300013211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #copy(), but <tt>set</tt> contains unique identifiers."
full_name: Net::IMAP#uid_copy
is_singleton: false
name: uid_copy
params: (set, mailbox)
visibility: public
ri/1.8/system/Net/IMAP/uid_thread-i.yaml000064400000000514150403643300013504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #thread(), but returns unique identifiers instead of message sequence numbers."
full_name: Net::IMAP#uid_thread
is_singleton: false
name: uid_thread
params: (algorithm, search_keys, charset)
visibility: public
ri/1.8/system/Net/IMAP/DataFormatError/cdesc-DataFormatError.yaml000064400000000454150403643300020320 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised when data is in the incorrect format.
constants: []

full_name: Net::IMAP::DataFormatError
includes: []

instance_methods: []

name: DataFormatError
superclass: Error
ri/1.8/system/Net/IMAP/receive_responses-i.yaml000064400000000300150403643300015110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#receive_responses
is_singleton: false
name: receive_responses
params: ()
visibility: private
ri/1.8/system/Net/IMAP/uid_search-i.yaml000064400000000434150403643300013503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #search(), but returns unique identifiers."
full_name: Net::IMAP#uid_search
is_singleton: false
name: uid_search
params: (keys, charset = nil)
visibility: public
ri/1.8/system/Net/IMAP/ResponseError/cdesc-ResponseError.yaml000064400000000516150403643300017647 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Superclass of all errors used to encapsulate &quot;fail&quot; responses from the server.
constants: []

full_name: Net::IMAP::ResponseError
includes: []

instance_methods: []

name: ResponseError
superclass: Error
ri/1.8/system/Net/IMAP/store_internal-i.yaml000064400000000317150403643300014425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#store_internal
is_singleton: false
name: store_internal
params: (cmd, set, attr, flags)
visibility: private
ri/1.8/system/Net/IMAP/lsub-i.yaml000064400000000767150403643300012353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a LSUB command, and returns a subset of names from the set of names that the user has declared as being &quot;active&quot; or &quot;subscribed&quot;. <tt>refname</tt> and <tt>mailbox</tt> are interpreted as for #list(). The return value is an array of +Net::IMAP::MailboxList+."
full_name: Net::IMAP#lsub
is_singleton: false
name: lsub
params: (refname, mailbox)
visibility: public
ri/1.8/system/Net/IMAP/decode_utf7-c.yaml000064400000001137150403643300013560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Decode a string from modified UTF-7 format to UTF-8.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: Net::IMAP does <em>not</em> automatically encode and decode mailbox names to and from utf7.
full_name: Net::IMAP::decode_utf7
is_singleton: true
name: decode_utf7
params: (s)
visibility: public
ri/1.8/system/Net/IMAP/select-i.yaml000064400000001515150403643300012655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a SELECT command to select a <tt>mailbox</tt> so that messages in the <tt>mailbox</tt> can be accessed.
- !ruby/struct:SM::Flow::P 
  body: "After you have selected a mailbox, you may retrieve the number of items in that mailbox from @responses[&quot;EXISTS&quot;][-1], and the number of recent messages from @responses[&quot;RECENT&quot;][-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."
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if the mailbox does not exist or is for some reason non-selectable.
full_name: Net::IMAP#select
is_singleton: false
name: select
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/normalize_searching_criteria-i.yaml000064400000000332150403643300017277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#normalize_searching_criteria
is_singleton: false
name: normalize_searching_criteria
params: (keys)
visibility: private
ri/1.8/system/Net/IMAP/disconnect-i.yaml000064400000000362150403643300013526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Disconnects from the server.
full_name: Net::IMAP#disconnect
is_singleton: false
name: disconnect
params: ()
visibility: public
ri/1.8/system/Net/IMAP/subscribe-i.yaml000064400000001047150403643310013360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a SUBSCRIBE command to add the specified <tt>mailbox</tt> name to the server's set of &quot;active&quot; or &quot;subscribed&quot; mailboxes as returned by #lsub()."
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if <tt>mailbox</tt> cannot be subscribed to, for instance because it does not exist.
full_name: Net::IMAP#subscribe
is_singleton: false
name: subscribe
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/search_internal-i.yaml000064400000000316150403643310014536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#search_internal
is_singleton: false
name: search_internal
params: (cmd, keys, charset)
visibility: private
ri/1.8/system/Net/IMAP/add_response_handler-i.yaml000064400000001323150403643310015537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds a response handler. For example, to detect when the server sends us a new EXISTS response (which normally indicates new messages being added to the mail box), you could add the following handler after selecting the mailbox.
- !ruby/struct:SM::Flow::VERB 
  body: "  imap.add_response_handler { |resp|\n    if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == &quot;EXISTS&quot;\n      puts &quot;Mailbox now has #{resp.data} messages&quot;\n    end\n  }\n"
full_name: Net::IMAP#add_response_handler
is_singleton: false
name: add_response_handler
params: (handler = Proc.new)
visibility: public
ri/1.8/system/Net/IMAP/ResponseParser/cdesc-ResponseParser.yaml000064400000000324150403643310020153 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::IMAP::ResponseParser
includes: []

instance_methods: []

name: ResponseParser
superclass: Object
ri/1.8/system/Net/IMAP/store-i.yaml000064400000002232150403643310012530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a STORE command to alter data associated with messages in the mailbox, in particular their flags. The <tt>set</tt> parameter is a number or an array of numbers or a Range object. Each number is a message sequence number. <tt>attr</tt> is the name of a data item to store: 'FLAGS' means to replace the message's flag list with the provided one; '+FLAGS' means to add the provided flags; and '-FLAGS' means to remove them. <tt>flags</tt> is a list of flags."
- !ruby/struct:SM::Flow::P 
  body: "The return value is an array of Net::IMAP::FetchData. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p imap.store(6..8, &quot;+FLAGS&quot;, [:Deleted])\n  #=&gt; [#&lt;Net::IMAP::FetchData seqno=6, attr={&quot;FLAGS&quot;=&gt;[:Seen, :Deleted]}&gt;, \\\n       #&lt;Net::IMAP::FetchData seqno=7, attr={&quot;FLAGS&quot;=&gt;[:Seen, :Deleted]}&gt;, \\\n       #&lt;Net::IMAP::FetchData seqno=8, attr={&quot;FLAGS&quot;=&gt;[:Seen, :Deleted]}&gt;]\n"
full_name: Net::IMAP#store
is_singleton: false
name: store
params: (set, attr, flags)
visibility: public
ri/1.8/system/Net/IMAP/setacl-i.yaml000064400000000761150403643310012654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends the SETACL command along with <tt>mailbox</tt>, <tt>user</tt> and the <tt>rights</tt> that user is to have on that mailbox. If <tt>rights</tt> is nil, then that user will be stripped of any rights to that mailbox. The IMAP ACL commands are described in [RFC-2086].
full_name: Net::IMAP#setacl
is_singleton: false
name: setacl
params: (mailbox, user, rights)
visibility: public
ri/1.8/system/Net/IMAP/Error/cdesc-Error.yaml000064400000000410150403643310014403 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Superclass of IMAP errors.
constants: []

full_name: Net::IMAP::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/Net/IMAP/setquota-i.yaml000064400000000766150403643320013254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a SETQUOTA command along with the specified <tt>mailbox</tt> and <tt>quota</tt>. If <tt>quota</tt> is nil, then quota will be unset for that mailbox. Typically one needs to be logged in as server admin for this to work. The IMAP quota commands are described in [RFC-2087].
full_name: Net::IMAP#setquota
is_singleton: false
name: setquota
params: (mailbox, quota)
visibility: public
ri/1.8/system/Net/IMAP/encode_utf7-c.yaml000064400000000415150403643320013572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Encode a string from UTF-8 format to modified UTF-7.
full_name: Net::IMAP::encode_utf7
is_singleton: true
name: encode_utf7
params: (s)
visibility: public
ri/1.8/system/Net/IMAP/create-i.yaml000064400000000607150403643320012644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a CREATE command to create a new <tt>mailbox</tt>.
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if a mailbox with that name cannot be created.
full_name: Net::IMAP#create
is_singleton: false
name: create
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/uid_sort-i.yaml000064400000000456150403643320013233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #sort(), but returns an array of unique identifiers."
full_name: Net::IMAP#uid_sort
is_singleton: false
name: uid_sort
params: (sort_keys, search_keys, charset)
visibility: public
ri/1.8/system/Net/IMAP/examine-i.yaml000064400000001073150403643330013026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a EXAMINE command to select a <tt>mailbox</tt> so that messages in the <tt>mailbox</tt> can be accessed. Behaves the same as #select(), except that the selected <tt>mailbox</tt> is identified as read-only."
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if the mailbox does not exist or is for some reason non-examinable.
full_name: Net::IMAP#examine
is_singleton: false
name: examine
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/send_literal-i.yaml000064400000000271150403643330014044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_literal
is_singleton: false
name: send_literal
params: (str)
visibility: private
ri/1.8/system/Net/IMAP/delete-i.yaml000064400000000743150403643330012645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a DELETE command to remove the <tt>mailbox</tt>.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::IMAP#delete
is_singleton: false
name: delete
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/MessageSet/cdesc-MessageSet.yaml000064400000000314150403643340016327 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::IMAP::MessageSet
includes: []

instance_methods: []

name: MessageSet
superclass: Object
ri/1.8/system/Net/IMAP/check-i.yaml000064400000000625150403643340012460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a CHECK command to request a checkpoint of the currently selected mailbox. This performs implementation-specific housekeeping, for instance, reconciling the mailbox's in-memory and on-disk state.
full_name: Net::IMAP#check
is_singleton: false
name: check
params: ()
visibility: public
ri/1.8/system/Net/IMAP/rename-i.yaml000064400000001143150403643340012646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a RENAME command to change the name of the <tt>mailbox</tt> to <tt>newname</tt>.
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if a mailbox with the name <tt>mailbox</tt> cannot be renamed to <tt>newname</tt> for whatever reason; for instance, because <tt>mailbox</tt> does not exist, or because there is already a mailbox with the name <tt>newname</tt>.
full_name: Net::IMAP#rename
is_singleton: false
name: rename
params: (mailbox, newname)
visibility: public
ri/1.8/system/Net/IMAP/ByeResponseError/cdesc-ByeResponseError.yaml000064400000000644150403643340020755 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised upon a &quot;BYE&quot; response from the server, indicating that the client is not being allowed to login, or has been timed out due to inactivity.
constants: []

full_name: Net::IMAP::ByeResponseError
includes: []

instance_methods: []

name: ByeResponseError
superclass: ResponseError
ri/1.8/system/Net/IMAP/record_response-i.yaml000064400000000306150403643340014573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#record_response
is_singleton: false
name: record_response
params: (name, data)
visibility: private
ri/1.8/system/Net/IMAP/noop-i.yaml000064400000000376150403643350012362 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a NOOP command to the server. It does nothing.
full_name: Net::IMAP#noop
is_singleton: false
name: noop
params: ()
visibility: public
ri/1.8/system/Net/IMAP/thread_internal-i.yaml000064400000000340150403643350014541 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#thread_internal
is_singleton: false
name: thread_internal
params: (cmd, algorithm, search_keys, charset)
visibility: private
ri/1.8/system/Net/IMAP/BadResponseError/cdesc-BadResponseError.yaml000064400000000654150403643360020676 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised upon a &quot;BAD&quot; response from the server, indicating that the client command violated the IMAP protocol, or an internal server failure has occurred.
constants: []

full_name: Net::IMAP::BadResponseError
includes: []

instance_methods: []

name: BadResponseError
superclass: ResponseError
ri/1.8/system/Net/IMAP/debug-c.yaml000064400000000343150403643360012462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the debug mode.
full_name: Net::IMAP::debug
is_singleton: true
name: debug
params: ()
visibility: public
ri/1.8/system/Net/IMAP/get_response-i.yaml000064400000000266150403643360014103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#get_response
is_singleton: false
name: get_response
params: ()
visibility: private
ri/1.8/system/Net/IMAP/add_authenticator-c.yaml000064400000001347150403643370015064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds an authenticator for Net::IMAP#authenticate. <tt>auth_type</tt> is the type of authentication this authenticator supports (for instance, &quot;LOGIN&quot;). The <tt>authenticator</tt> is an object which defines a process() method to handle authentication with the server. See Net::IMAP::LoginAuthenticator and Net::IMAP::CramMD5Authenticator for examples.
- !ruby/struct:SM::Flow::P 
  body: If <tt>auth_type</tt> refers to an existing authenticator, it will be replaced by the new one.
full_name: Net::IMAP::add_authenticator
is_singleton: true
name: add_authenticator
params: (auth_type, authenticator)
visibility: public
ri/1.8/system/Net/IMAP/capability-i.yaml000064400000001172150403643370013525 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::IMAP#capability
is_singleton: false
name: capability
params: ()
visibility: public
ri/1.8/system/Net/IMAP/new-c.yaml000064400000003007150403643370012166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Net::IMAP object and connects it to the specified <tt>port</tt> (143 by default) on the named <tt>host</tt>. If <tt>usessl</tt> 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. The <tt>certs</tt> parameter indicates the path or file containing the CA cert of the server, and the <tt>verify</tt> parameter is for the OpenSSL verification callback.
- !ruby/struct:SM::Flow::P 
  body: "The most common errors are:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Errno::ECONNREFUSED:"
    body: connection refused by <tt>host</tt> or an intervening firewall.
  - !ruby/struct:SM::Flow::LI 
    label: "Errno::ETIMEDOUT:"
    body: connection timed out (possibly due to packets being dropped by an intervening firewall).
  - !ruby/struct:SM::Flow::LI 
    label: "Errno::ENETUNREACH:"
    body: there is no route to that network.
  - !ruby/struct:SM::Flow::LI 
    label: "SocketError:"
    body: hostname not known or other socket error.
  - !ruby/struct:SM::Flow::LI 
    label: "Net::IMAP::ByeResponseError:"
    body: we connected to the host, but they immediately said goodbye to us.
  type: :NOTE
full_name: Net::IMAP::new
is_singleton: true
name: new
params: (host, port = PORT, usessl = false, certs = nil, verify = false)
visibility: public
ri/1.8/system/Net/IMAP/u16tou8-c.yaml000064400000000255150403643400012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::u16tou8
is_singleton: true
name: u16tou8
params: (s)
visibility: private
ri/1.8/system/Net/IMAP/fetch_internal-i.yaml000064400000000310150403643400014354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#fetch_internal
is_singleton: false
name: fetch_internal
params: (cmd, set, attr)
visibility: private
ri/1.8/system/Net/IMAP/copy-i.yaml000064400000000677150403643400012361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a COPY command to copy the specified message(s) to the end of the specified destination <tt>mailbox</tt>. The <tt>set</tt> parameter is a number or an array of numbers or a Range object. The number is a message sequence number.
full_name: Net::IMAP#copy
is_singleton: false
name: copy
params: (set, mailbox)
visibility: public
ri/1.8/system/Net/IMAP/QuotedString/cdesc-QuotedString.yaml000064400000000320150403643410017302 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::IMAP::QuotedString
includes: []

instance_methods: []

name: QuotedString
superclass: Object
ri/1.8/system/Net/IMAP/sort_internal-i.yaml000064400000000334150403643410014261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#sort_internal
is_singleton: false
name: sort_internal
params: (cmd, sort_keys, search_keys, charset)
visibility: private
ri/1.8/system/Net/IMAP/BodyTypeText/multipart%3f-i.yaml000064400000000277150403643410016327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::BodyTypeText#multipart?
is_singleton: false
name: multipart?
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeText/media_subtype-i.yaml000064400000000577150403643420016646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Obsolete: use <tt>subtype</tt> instead. Calling this will generate a warning message to <tt>stderr</tt>, then return the value of <tt>subtype</tt>."
full_name: Net::IMAP::BodyTypeText#media_subtype
is_singleton: false
name: media_subtype
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeText/cdesc-BodyTypeText.yaml000064400000002042150403643420017236 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Net::IMAP::BodyTypeText represents TEXT body structures of messages.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: "Fields:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "lines:"
    body: Returns the size of the body in text lines.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: And Net::IMAP::BodyTypeText has all fields of Net::IMAP::BodyTypeBasic.
constants: []

full_name: Net::IMAP::BodyTypeText
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: media_subtype
- !ruby/object:RI::MethodSummary 
  name: multipart?
name: BodyTypeText
superclass: Struct.new(:media_type, :subtype,                                     :param, :content_id,                                     :description, :encoding, :size,                                     :lines,                                     :md5, :disposition, :language,                                     :extension)
ri/1.8/system/Net/IMAP/expunge-i.yaml000064400000000517150403643430013056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a EXPUNGE command to permanently remove from the currently selected mailbox all messages that have the \Deleted flag set.
full_name: Net::IMAP#expunge
is_singleton: false
name: expunge
params: ()
visibility: public
ri/1.8/system/Net/IMAP/append-i.yaml000064400000002006150403643430012645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a APPEND command to append the <tt>message</tt> to the end of the <tt>mailbox</tt>. The optional <tt>flags</tt> argument is an array of flags to initially passing to the new message. The optional <tt>date_time</tt> argument specifies the creation time to assign to the new message; it defaults to the current time. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  imap.append(&quot;inbox&quot;, &lt;&lt;EOF.gsub(/\\n/, &quot;\\r\\n&quot;), [:Seen], Time.now)\n  Subject: hello\n  From: shugo@ruby-lang.org\n  To: shugo@ruby-lang.org\n\n  hello world\n  EOF\n"
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if the mailbox does not exist (it is not created automatically), or if the flags, date_time, or message arguments contain errors.
full_name: Net::IMAP#append
is_singleton: false
name: append
params: (mailbox, message, flags = nil, date_time = nil)
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeBasic/multipart%3f-i.yaml000064400000000300150403643440016412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::BodyTypeBasic#multipart?
is_singleton: false
name: multipart?
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeBasic/media_subtype-i.yaml000064400000000600150403643440016730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Obsolete: use <tt>subtype</tt> instead. Calling this will generate a warning message to <tt>stderr</tt>, then return the value of <tt>subtype</tt>."
full_name: Net::IMAP::BodyTypeBasic#media_subtype
is_singleton: false
name: media_subtype
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeBasic/cdesc-BodyTypeBasic.yaml000064400000004425150403643450017442 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Net::IMAP::BodyTypeBasic represents basic body structures of messages.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: "Fields:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "media_type:"
    body: Returns the content media type name as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "subtype:"
    body: Returns the content subtype name as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "param:"
    body: Returns a hash that represents parameters as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "content_id:"
    body: Returns a string giving the content id as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "description:"
    body: Returns a string giving the content description as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "encoding:"
    body: Returns a string giving the content transfer encoding as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "size:"
    body: Returns a number giving the size of the body in octets.
  - !ruby/struct:SM::Flow::LI 
    label: "md5:"
    body: Returns a string giving the body MD5 value as defined in [MD5].
  - !ruby/struct:SM::Flow::LI 
    label: "disposition:"
    body: Returns a Net::IMAP::ContentDisposition object giving the content disposition.
  - !ruby/struct:SM::Flow::LI 
    label: "language:"
    body: Returns a string or an array of strings giving the body language value as defined in [LANGUAGE-TAGS].
  - !ruby/struct:SM::Flow::LI 
    label: "extension:"
    body: Returns extension data.
  - !ruby/struct:SM::Flow::LI 
    label: "multipart?:"
    body: Returns false.
  type: :NOTE
constants: []

full_name: Net::IMAP::BodyTypeBasic
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: media_subtype
- !ruby/object:RI::MethodSummary 
  name: multipart?
name: BodyTypeBasic
superclass: Struct.new(:media_type, :subtype,                                      :param, :content_id,                                      :description, :encoding, :size,                                      :md5, :disposition, :language,                                      :extension)
ri/1.8/system/Net/IMAP/getacl-i.yaml000064400000000566150403643450012650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Send the GETACL command along with specified <tt>mailbox</tt>. If this mailbox exists, an array containing objects of Net::IMAP::MailboxACLItem will be returned.
full_name: Net::IMAP#getacl
is_singleton: false
name: getacl
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/debug%3d-c.yaml000064400000000345150403643460012761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the debug mode.
full_name: Net::IMAP::debug=
is_singleton: true
name: debug=
params: (val)
visibility: public
ri/1.8/system/Net/IMAP/generate_tag-i.yaml000064400000000266150403643460014034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#generate_tag
is_singleton: false
name: generate_tag
params: ()
visibility: private
ri/1.8/system/Net/IMAP/LoginAuthenticator/process-i.yaml000064400000000303150403643470016661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::LoginAuthenticator#process
is_singleton: false
name: process
params: (data)
visibility: public
ri/1.8/system/Net/IMAP/LoginAuthenticator/new-c.yaml000064400000000305150403643470015770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::LoginAuthenticator::new
is_singleton: true
name: new
params: (user, password)
visibility: public
ri/1.8/system/Net/IMAP/LoginAuthenticator/cdesc-LoginAuthenticator.yaml000064400000001115150403643500021633 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Authenticator for the &quot;LOGIN&quot; authentication type. See #authenticate()."
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: STATE_USER
  value: ":USER"
- !ruby/object:RI::Constant 
  comment: 
  name: STATE_PASSWORD
  value: ":PASSWORD"
full_name: Net::IMAP::LoginAuthenticator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: process
name: LoginAuthenticator
superclass: Object
ri/1.8/system/Net/IMAP/status-i.yaml000064400000002072150403643510012723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a STATUS command, and returns the status of the indicated <tt>mailbox</tt>. <tt>attr</tt> is a list of one or more attributes that we are request the status of. Supported attributes include:"
- !ruby/struct:SM::Flow::VERB 
  body: "  MESSAGES:: the number of messages in the mailbox.\n  RECENT:: the number of recent messages in the mailbox.\n  UNSEEN:: the number of unseen messages in the mailbox.\n"
- !ruby/struct:SM::Flow::P 
  body: "The return value is a hash of attributes. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p imap.status(&quot;inbox&quot;, [&quot;MESSAGES&quot;, &quot;RECENT&quot;])\n  #=&gt; {&quot;RECENT&quot;=&gt;0, &quot;MESSAGES&quot;=&gt;44}\n"
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if status values for <tt>mailbox</tt> cannot be returned, for instance because it does not exist.
full_name: Net::IMAP#status
is_singleton: false
name: status
params: (mailbox, attr)
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeMessage/multipart%3f-i.yaml000064400000000302150403643520016756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::BodyTypeMessage#multipart?
is_singleton: false
name: multipart?
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeMessage/media_subtype-i.yaml000064400000000602150403643520017274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Obsolete: use <tt>subtype</tt> instead. Calling this will generate a warning message to <tt>stderr</tt>, then return the value of <tt>subtype</tt>."
full_name: Net::IMAP::BodyTypeMessage#media_subtype
is_singleton: false
name: media_subtype
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeMessage/cdesc-BodyTypeMessage.yaml000064400000002326150403643530020345 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Net::IMAP::BodyTypeMessage represents MESSAGE/RFC822 body structures of messages.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: "Fields:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "envelope:"
    body: Returns a Net::IMAP::Envelope giving the envelope structure.
  - !ruby/struct:SM::Flow::LI 
    label: "body:"
    body: Returns an object giving the body structure.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: And Net::IMAP::BodyTypeMessage has all methods of Net::IMAP::BodyTypeText.
constants: []

full_name: Net::IMAP::BodyTypeMessage
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: media_subtype
- !ruby/object:RI::MethodSummary 
  name: multipart?
name: BodyTypeMessage
superclass: Struct.new(:media_type, :subtype,                                        :param, :content_id,                                        :description, :encoding, :size,                                        :envelope, :body, :lines,                                        :md5, :disposition, :language,                                        :extension)
ri/1.8/system/Net/IMAP/pick_up_tagged_response-i.yaml000064400000000317150403643530016265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#pick_up_tagged_response
is_singleton: false
name: pick_up_tagged_response
params: (tag)
visibility: private
ri/1.8/system/Net/IMAP/cdesc-IMAP.yaml000064400000075513150403643530012773 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The thread to receive exceptions.
  name: client_thread
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Returns an initial greeting response from the server.
  name: greeting
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Returns all response handlers.
  name: response_handlers
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "Returns recorded untagged responses. For example:"
  - !ruby/struct:SM::Flow::VERB 
    body: "  imap.select(&quot;inbox&quot;)\n  p imap.responses[&quot;EXISTS&quot;][-1]\n  #=&gt; 2\n  p imap.responses[&quot;UIDVALIDITY&quot;][-1]\n  #=&gt; 968263756\n"
  name: responses
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_authenticator
- !ruby/object:RI::MethodSummary 
  name: debug
- !ruby/object:RI::MethodSummary 
  name: debug=
- !ruby/object:RI::MethodSummary 
  name: decode_utf7
- !ruby/object:RI::MethodSummary 
  name: encode_utf7
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: u16tou8
- !ruby/object:RI::MethodSummary 
  name: u8tou16
comment: 
- !ruby/struct:SM::Flow::P 
  body: Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality. The protocol is described in [IMAP].
- !ruby/struct:SM::Flow::H 
  level: 2
  text: IMAP Overview
- !ruby/struct:SM::Flow::P 
  body: "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 a files in mailbox format within a hierarchy of directories."
- !ruby/struct:SM::Flow::P 
  body: "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 <em>selected</em> state, and that mailbox becomes the <em>current</em> mailbox, on which mail-item related commands implicitly operate."
- !ruby/struct:SM::Flow::P 
  body: "Messages have two sorts of identifiers: message sequence numbers, and UIDs."
- !ruby/struct:SM::Flow::P 
  body: Message sequence numbers number messages within a mail box from 1 up to the number of items in the mail box. If new message arrives during a session, it receives a sequence number equal to the new size of the mail box. If messages are expunged from the mailbox, remaining messages have their sequence numbers &quot;shuffled down&quot; to fill the gaps.
- !ruby/struct:SM::Flow::P 
  body: 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 cannot thus rearrange message orders.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples of Usage
- !ruby/struct:SM::Flow::H 
  level: 3
  text: List sender and subject of all recent messages in the default mailbox
- !ruby/struct:SM::Flow::VERB 
  body: "  imap = Net::IMAP.new('mail.example.com')\n  imap.authenticate('LOGIN', 'joe_user', 'joes_password')\n  imap.examine('INBOX')\n  imap.search([&quot;RECENT&quot;]).each do |message_id|\n    envelope = imap.fetch(message_id, &quot;ENVELOPE&quot;)[0].attr[&quot;ENVELOPE&quot;]\n    puts &quot;#{envelope.from[0].name}: \\t#{envelope.subject}&quot;\n  end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Move all messages from April 2003 from &quot;Mail/sent-mail&quot; to &quot;Mail/sent-apr03&quot;
- !ruby/struct:SM::Flow::VERB 
  body: "  imap = Net::IMAP.new('mail.example.com')\n  imap.authenticate('LOGIN', 'joe_user', 'joes_password')\n  imap.select('Mail/sent-mail')\n  if not imap.list('Mail/', 'sent-apr03')\n    imap.create('Mail/sent-apr03')\n  end\n  imap.search([&quot;BEFORE&quot;, &quot;30-Apr-2003&quot;, &quot;SINCE&quot;, &quot;1-Apr-2003&quot;]).each do |message_id|\n    imap.copy(message_id, &quot;Mail/sent-apr03&quot;)\n    imap.store(message_id, &quot;+FLAGS&quot;, [:Deleted])\n  end\n  imap.expunge\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Thread Safety
- !ruby/struct:SM::Flow::P 
  body: Net::IMAP supports concurrent threads. For example,
- !ruby/struct:SM::Flow::VERB 
  body: "  imap = Net::IMAP.new(&quot;imap.foo.net&quot;, &quot;imap2&quot;)\n  imap.authenticate(&quot;cram-md5&quot;, &quot;bar&quot;, &quot;password&quot;)\n  imap.select(&quot;inbox&quot;)\n  fetch_thread = Thread.start { imap.fetch(1..-1, &quot;UID&quot;) }\n  search_result = imap.search([&quot;BODY&quot;, &quot;hello&quot;])\n  fetch_result = fetch_thread.value\n  imap.disconnect\n"
- !ruby/struct:SM::Flow::P 
  body: This script invokes the FETCH command and the SEARCH command concurrently.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Errors
- !ruby/struct:SM::Flow::P 
  body: "An IMAP server can send three different types of responses to indicate failure:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "NO:"
    body: the attempted command could not be successfully completed. For instance, the username/password used for logging in are incorrect; the selected mailbox does not exists; etc.
  - !ruby/struct:SM::Flow::LI 
    label: "BAD:"
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: "BYE:"
    body: 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 our 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.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: References
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "[IMAP]"
    body: "M. Crispin, &quot;INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1&quot;, RFC 2060, December 1996. (Note: since obsoleted by RFC 3501)"
  - !ruby/struct:SM::Flow::LI 
    label: "[LANGUAGE-TAGS]"
    body: Alvestrand, H., &quot;Tags for the Identification of Languages&quot;, RFC 1766, March 1995.
  - !ruby/struct:SM::Flow::LI 
    label: "[MD5]"
    body: Myers, J., and M. Rose, &quot;The Content-MD5 Header Field&quot;, RFC 1864, October 1995.
  - !ruby/struct:SM::Flow::LI 
    label: "[MIME-IMB]"
    body: "Freed, N., and N. Borenstein, &quot;MIME (Multipurpose Internet Mail Extensions) Part One: Format of Internet Message Bodies&quot;, RFC 2045, November 1996."
  - !ruby/struct:SM::Flow::LI 
    label: "[RFC-822]"
    body: Crocker, D., &quot;Standard for the Format of ARPA Internet Text Messages&quot;, STD 11, RFC 822, University of Delaware, August 1982.
  - !ruby/struct:SM::Flow::LI 
    label: "[RFC-2087]"
    body: Myers, J., &quot;IMAP4 QUOTA extension&quot;, RFC 2087, January 1997.
  - !ruby/struct:SM::Flow::LI 
    label: "[RFC-2086]"
    body: Myers, J., &quot;IMAP4 ACL extension&quot;, RFC 2086, January 1997.
  - !ruby/struct:SM::Flow::LI 
    label: "[RFC-2195]"
    body: Klensin, J., Catoe, R., and Krumviede, P., &quot;IMAP/POP AUTHorize Extension for Simple Challenge/Response&quot;, RFC 2195, September 1997.
  - !ruby/struct:SM::Flow::LI 
    label: "[SORT-THREAD-EXT]"
    body: Crispin, M., &quot;INTERNET MESSAGE ACCESS PROTOCOL - SORT and THREAD Extensions&quot;, draft-ietf-imapext-sort, May 2003.
  - !ruby/struct:SM::Flow::LI 
    label: "[OSSL]"
    body: http://www.openssl.org
  - !ruby/struct:SM::Flow::LI 
    label: "[RSSL]"
    body: http://savannah.gnu.org/projects/rubypki
  - !ruby/struct:SM::Flow::LI 
    label: "[UTF7]"
    body: "Goldsmith, D. and Davis, M., &quot;UTF-7: A Mail-Safe Transformation Format of Unicode&quot;, RFC 2152, May 1997."
  type: :LABELED
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating a message has been seen
  name: SEEN
  value: ":Seen"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating a message has been answered
  name: ANSWERED
  value: ":Answered"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating a message has been flagged for special or urgent attention
  name: FLAGGED
  value: ":Flagged"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating a message has been marked for deletion. This will occur when the mailbox is closed or expunged.
  name: DELETED
  value: ":Deleted"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating a message is only a draft or work-in-progress version.
  name: DRAFT
  value: ":Draft"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating that the message is &quot;recent&quot;, meaning that this session is the first session in which the client has been notified of this message.
  name: RECENT
  value: ":Recent"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating that a mailbox context name cannot contain children.
  name: NOINFERIORS
  value: ":Noinferiors"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating that a mailbox is not selected.
  name: NOSELECT
  value: ":Noselect"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating that a mailbox has been marked &quot;interesting&quot; by the server; this commonly indicates that the mailbox contains new messages.
  name: MARKED
  value: ":Marked"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag indicating that the mailbox does not contains new messages.
  name: UNMARKED
  value: ":Unmarked"
- !ruby/object:RI::Constant 
  comment: 
  name: DATE_MONTH
  value: "%w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::ContinuationRequest represents command continuation requests.
  - !ruby/struct:SM::Flow::P 
    body: The command continuation request response is indicated by a &quot;+&quot; 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.
  - !ruby/struct:SM::Flow::VERB 
    body: "  continue_req    ::= &quot;+&quot; SPACE (resp_text / base64)\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "data:"
      body: Returns the data (Net::IMAP::ResponseText).
    - !ruby/struct:SM::Flow::LI 
      label: "raw_data:"
      body: Returns the raw data string.
    type: :NOTE
  name: ContinuationRequest
  value: Struct.new(:data, :raw_data)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::UntaggedResponse represents untagged responses.
  - !ruby/struct:SM::Flow::P 
    body: Data transmitted by the server to the client and status responses that do not indicate command completion are prefixed with the token &quot;*&quot;, and are called untagged responses.
  - !ruby/struct:SM::Flow::VERB 
    body: "  response_data   ::= &quot;*&quot; SPACE (resp_cond_state / resp_cond_bye /\n                      mailbox_data / message_data / capability_data)\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "name:"
      body: Returns the name such as &quot;FLAGS&quot;, &quot;LIST&quot;, &quot;FETCH&quot;....
    - !ruby/struct:SM::Flow::LI 
      label: "data:"
      body: Returns the data such as an array of flag symbols,
    - !ruby/struct:SM::Flow::VERB 
      body: " a ((&lt;Net::IMAP::MailboxList&gt;)) object....\n"
    - !ruby/struct:SM::Flow::LI 
      label: "raw_data:"
      body: Returns the raw data string.
    type: :NOTE
  name: UntaggedResponse
  value: Struct.new(:name, :data, :raw_data)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::TaggedResponse represents tagged responses.
  - !ruby/struct:SM::Flow::P 
    body: 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.
  - !ruby/struct:SM::Flow::VERB 
    body: "  response_tagged ::= tag SPACE resp_cond_state CRLF\n\n  tag             ::= 1*&lt;any ATOM_CHAR except &quot;+&quot;&gt;\n\n  resp_cond_state ::= (&quot;OK&quot; / &quot;NO&quot; / &quot;BAD&quot;) SPACE resp_text\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "tag:"
      body: Returns the tag.
    - !ruby/struct:SM::Flow::LI 
      label: "name:"
      body: Returns the name. the name is one of &quot;OK&quot;, &quot;NO&quot;, &quot;BAD&quot;.
    - !ruby/struct:SM::Flow::LI 
      label: "data:"
      body: Returns the data. See ((&lt;Net::IMAP::ResponseText&gt;)).
    - !ruby/struct:SM::Flow::LI 
      label: "raw_data:"
      body: Returns the raw data string.
    type: :NOTE
  name: TaggedResponse
  value: Struct.new(:tag, :name, :data, :raw_data)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::ResponseText represents texts of responses. The text may be prefixed by the response code.
  - !ruby/struct:SM::Flow::VERB 
    body: "  resp_text       ::= [&quot;[&quot; resp_text_code &quot;]&quot; SPACE] (text_mime2 / text)\n                      ;; text SHOULD NOT begin with &quot;[&quot; or &quot;=&quot;\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "code:"
      body: Returns the response code. See ((&lt;Net::IMAP::ResponseCode&gt;)).
    - !ruby/struct:SM::Flow::LI 
      label: "text:"
      body: Returns the text.
    type: :NOTE
  name: ResponseText
  value: Struct.new(:code, :text)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::ResponseCode represents response codes.
  - !ruby/struct:SM::Flow::VERB 
    body: "  resp_text_code  ::= &quot;ALERT&quot; / &quot;PARSE&quot; /\n                      &quot;PERMANENTFLAGS&quot; SPACE &quot;(&quot; #(flag / &quot;*&quot;) &quot;)&quot; /\n                      &quot;READ-ONLY&quot; / &quot;READ-WRITE&quot; / &quot;TRYCREATE&quot; /\n                      &quot;UIDVALIDITY&quot; SPACE nz_number /\n                      &quot;UNSEEN&quot; SPACE nz_number /\n                      atom [SPACE 1*&lt;any TEXT_CHAR except &quot;]&quot;&gt;]\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "name:"
      body: Returns the name such as &quot;ALERT&quot;, &quot;PERMANENTFLAGS&quot;, &quot;UIDVALIDITY&quot;....
    - !ruby/struct:SM::Flow::LI 
      label: "data:"
      body: Returns the data if it exists.
    type: :NOTE
  name: ResponseCode
  value: Struct.new(:name, :data)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::MailboxList represents contents of the LIST response.
  - !ruby/struct:SM::Flow::VERB 
    body: "  mailbox_list    ::= &quot;(&quot; #(&quot;\\Marked&quot; / &quot;\\Noinferiors&quot; /\n                      &quot;\\Noselect&quot; / &quot;\\Unmarked&quot; / flag_extension) &quot;)&quot;\n                      SPACE (&lt;&quot;&gt; QUOTED_CHAR &lt;&quot;&gt; / nil) SPACE mailbox\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "attr:"
      body: Returns the name attributes. Each name attribute is a symbol capitalized by String#capitalize, such as :Noselect (not :NoSelect).
    - !ruby/struct:SM::Flow::LI 
      label: "delim:"
      body: Returns the hierarchy delimiter
    - !ruby/struct:SM::Flow::LI 
      label: "name:"
      body: Returns the mailbox name.
    type: :NOTE
  name: MailboxList
  value: Struct.new(:attr, :delim, :name)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: 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 &quot;#&quot; construct is a single space (SPACE).
  - !ruby/struct:SM::Flow::VERB 
    body: "   quota_list      ::= &quot;(&quot; #quota_resource &quot;)&quot;\n\n   quota_resource  ::= atom SPACE number SPACE number\n\n   quota_response  ::= &quot;QUOTA&quot; SPACE astring SPACE quota_list\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "mailbox:"
      body: The mailbox with the associated quota.
    - !ruby/struct:SM::Flow::LI 
      label: "usage:"
      body: Current storage usage of mailbox.
    - !ruby/struct:SM::Flow::LI 
      label: "quota:"
      body: Quota limit imposed on mailbox.
    type: :NOTE
  name: MailboxQuota
  value: Struct.new(:mailbox, :usage, :quota)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::MailboxQuotaRoot represents part of the GETQUOTAROOT response. (GETQUOTAROOT can also return Net::IMAP::MailboxQuota.)
  - !ruby/struct:SM::Flow::VERB 
    body: "   quotaroot_response ::= &quot;QUOTAROOT&quot; SPACE astring *(SPACE astring)\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "mailbox:"
      body: The mailbox with the associated quota.
    - !ruby/struct:SM::Flow::LI 
      label: "quotaroots:"
      body: Zero or more quotaroots that effect the quota on the specified mailbox.
    type: :NOTE
  name: MailboxQuotaRoot
  value: Struct.new(:mailbox, :quotaroots)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::MailboxACLItem represents response from GETACL.
  - !ruby/struct:SM::Flow::VERB 
    body: "   acl_data        ::= &quot;ACL&quot; SPACE mailbox *(SPACE identifier SPACE rights)\n\n   identifier      ::= astring\n\n   rights          ::= astring\n"
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "user:"
      body: Login name that has certain rights to the mailbox that was specified with the getacl command.
    - !ruby/struct:SM::Flow::LI 
      label: "rights:"
      body: The access rights the indicated user has to the mailbox.
    type: :NOTE
  name: MailboxACLItem
  value: Struct.new(:user, :rights)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::StatusData represents contents of the STATUS response.
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "mailbox:"
      body: Returns the mailbox name.
    - !ruby/struct:SM::Flow::LI 
      label: "attr:"
      body: Returns a hash. Each key is one of &quot;MESSAGES&quot;, &quot;RECENT&quot;, &quot;UIDNEXT&quot;, &quot;UIDVALIDITY&quot;, &quot;UNSEEN&quot;. Each value is a number.
    type: :NOTE
  name: StatusData
  value: Struct.new(:mailbox, :attr)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::FetchData represents contents of the FETCH response.
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "seqno:"
      body: "Returns the message sequence number. (Note: not the unique identifier, even for the UID command response.)"
    - !ruby/struct:SM::Flow::LI 
      label: "attr:"
      body: Returns a hash. Each key is a data item name, and each value is its value.
    - !ruby/struct:SM::Flow::P 
      body: "The current data items are:"
    - !ruby/object:SM::Flow::LIST 
      contents: 
      - !ruby/struct:SM::Flow::LI 
        label: BODY
        body: A form of BODYSTRUCTURE without extension data.
      - !ruby/struct:SM::Flow::LI 
        label: BODY[<section>]<<origin_octet>>
        body: A string expressing the body contents of the specified section.
      - !ruby/struct:SM::Flow::LI 
        label: BODYSTRUCTURE
        body: 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.
      - !ruby/struct:SM::Flow::LI 
        label: ENVELOPE
        body: A Net::IMAP::Envelope object that describes the envelope structure of a message.
      - !ruby/struct:SM::Flow::LI 
        label: FLAGS
        body: A array of flag symbols that are set for this message. flag symbols are capitalized by String#capitalize.
      - !ruby/struct:SM::Flow::LI 
        label: INTERNALDATE
        body: A string representing the internal date of the message.
      - !ruby/struct:SM::Flow::LI 
        label: RFC822
        body: Equivalent to BODY[].
      - !ruby/struct:SM::Flow::LI 
        label: RFC822.HEADER
        body: Equivalent to BODY.PEEK[HEADER].
      - !ruby/struct:SM::Flow::LI 
        label: RFC822.SIZE
        body: A number expressing the [RFC-822] size of the message.
      - !ruby/struct:SM::Flow::LI 
        label: RFC822.TEXT
        body: Equivalent to BODY[TEXT].
      - !ruby/struct:SM::Flow::LI 
        label: UID
        body: A number expressing the unique identifier of the message.
      type: :LABELED
    type: :NOTE
  name: FetchData
  value: Struct.new(:seqno, :attr)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::Envelope represents envelope structures of messages.
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "date:"
      body: Returns a string that represents the date.
    - !ruby/struct:SM::Flow::LI 
      label: "subject:"
      body: Returns a string that represents the subject.
    - !ruby/struct:SM::Flow::LI 
      label: "from:"
      body: Returns an array of Net::IMAP::Address that represents the from.
    - !ruby/struct:SM::Flow::LI 
      label: "sender:"
      body: Returns an array of Net::IMAP::Address that represents the sender.
    - !ruby/struct:SM::Flow::LI 
      label: "reply_to:"
      body: Returns an array of Net::IMAP::Address that represents the reply-to.
    - !ruby/struct:SM::Flow::LI 
      label: "to:"
      body: Returns an array of Net::IMAP::Address that represents the to.
    - !ruby/struct:SM::Flow::LI 
      label: "cc:"
      body: Returns an array of Net::IMAP::Address that represents the cc.
    - !ruby/struct:SM::Flow::LI 
      label: "bcc:"
      body: Returns an array of Net::IMAP::Address that represents the bcc.
    - !ruby/struct:SM::Flow::LI 
      label: "in_reply_to:"
      body: Returns a string that represents the in-reply-to.
    - !ruby/struct:SM::Flow::LI 
      label: "message_id:"
      body: Returns a string that represents the message-id.
    type: :NOTE
  name: Envelope
  value: Struct.new(:date, :subject, :from, :sender, :reply_to,                           :to, :cc, :bcc, :in_reply_to, :message_id)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::Address represents electronic mail addresses.
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "name:"
      body: Returns the phrase from [RFC-822] mailbox.
    - !ruby/struct:SM::Flow::LI 
      label: "route:"
      body: Returns the route from [RFC-822] route-addr.
    - !ruby/struct:SM::Flow::LI 
      label: "mailbox:"
      body: 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
    - !ruby/struct:SM::Flow::LI 
      label: "host:"
      body: nil indicates [RFC-822] group syntax. Otherwise, returns [RFC-822] domain name.
    type: :NOTE
  name: Address
  value: Struct.new(:name, :route, :mailbox, :host)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::ContentDisposition represents Content-Disposition fields.
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "dsp_type:"
      body: Returns the disposition type.
    - !ruby/struct:SM::Flow::LI 
      label: "param:"
      body: Returns a hash that represents parameters of the Content-Disposition field.
    type: :NOTE
  name: ContentDisposition
  value: Struct.new(:dsp_type, :param)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Net::IMAP::ThreadMember represents a thread-node returned by Net::IMAP#thread
  - !ruby/struct:SM::Flow::H 
    level: 4
    text: "Fields:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "seqno:"
      body: The sequence number of this message.
    - !ruby/struct:SM::Flow::LI 
      label: "children:"
      body: an array of Net::IMAP::ThreadMember objects for mail
    type: :NOTE
  - !ruby/struct:SM::Flow::P 
    body: items that are children of this in the thread.
  name: ThreadMember
  value: Struct.new(:seqno, :children)
full_name: Net::IMAP
includes: 
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
- !ruby/object:RI::IncludedModule 
  name: OpenSSL
- !ruby/object:RI::IncludedModule 
  name: SSL
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_response_handler
- !ruby/object:RI::MethodSummary 
  name: append
- !ruby/object:RI::MethodSummary 
  name: authenticate
- !ruby/object:RI::MethodSummary 
  name: capability
- !ruby/object:RI::MethodSummary 
  name: check
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: copy
- !ruby/object:RI::MethodSummary 
  name: copy_internal
- !ruby/object:RI::MethodSummary 
  name: create
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: disconnect
- !ruby/object:RI::MethodSummary 
  name: disconnected?
- !ruby/object:RI::MethodSummary 
  name: examine
- !ruby/object:RI::MethodSummary 
  name: expunge
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: fetch_internal
- !ruby/object:RI::MethodSummary 
  name: generate_tag
- !ruby/object:RI::MethodSummary 
  name: get_response
- !ruby/object:RI::MethodSummary 
  name: get_tagged_response
- !ruby/object:RI::MethodSummary 
  name: getacl
- !ruby/object:RI::MethodSummary 
  name: getquota
- !ruby/object:RI::MethodSummary 
  name: getquotaroot
- !ruby/object:RI::MethodSummary 
  name: list
- !ruby/object:RI::MethodSummary 
  name: login
- !ruby/object:RI::MethodSummary 
  name: logout
- !ruby/object:RI::MethodSummary 
  name: lsub
- !ruby/object:RI::MethodSummary 
  name: noop
- !ruby/object:RI::MethodSummary 
  name: normalize_searching_criteria
- !ruby/object:RI::MethodSummary 
  name: pick_up_tagged_response
- !ruby/object:RI::MethodSummary 
  name: put_string
- !ruby/object:RI::MethodSummary 
  name: receive_responses
- !ruby/object:RI::MethodSummary 
  name: record_response
- !ruby/object:RI::MethodSummary 
  name: remove_response_handler
- !ruby/object:RI::MethodSummary 
  name: rename
- !ruby/object:RI::MethodSummary 
  name: search
- !ruby/object:RI::MethodSummary 
  name: search_internal
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: send_command
- !ruby/object:RI::MethodSummary 
  name: send_data
- !ruby/object:RI::MethodSummary 
  name: send_list_data
- !ruby/object:RI::MethodSummary 
  name: send_literal
- !ruby/object:RI::MethodSummary 
  name: send_number_data
- !ruby/object:RI::MethodSummary 
  name: send_quoted_string
- !ruby/object:RI::MethodSummary 
  name: send_string_data
- !ruby/object:RI::MethodSummary 
  name: send_symbol_data
- !ruby/object:RI::MethodSummary 
  name: send_time_data
- !ruby/object:RI::MethodSummary 
  name: setacl
- !ruby/object:RI::MethodSummary 
  name: setquota
- !ruby/object:RI::MethodSummary 
  name: sort
- !ruby/object:RI::MethodSummary 
  name: sort_internal
- !ruby/object:RI::MethodSummary 
  name: status
- !ruby/object:RI::MethodSummary 
  name: store
- !ruby/object:RI::MethodSummary 
  name: store_internal
- !ruby/object:RI::MethodSummary 
  name: subscribe
- !ruby/object:RI::MethodSummary 
  name: thread
- !ruby/object:RI::MethodSummary 
  name: thread_internal
- !ruby/object:RI::MethodSummary 
  name: uid_copy
- !ruby/object:RI::MethodSummary 
  name: uid_fetch
- !ruby/object:RI::MethodSummary 
  name: uid_search
- !ruby/object:RI::MethodSummary 
  name: uid_sort
- !ruby/object:RI::MethodSummary 
  name: uid_store
- !ruby/object:RI::MethodSummary 
  name: uid_thread
- !ruby/object:RI::MethodSummary 
  name: unsubscribe
name: IMAP
superclass: Object
ri/1.8/system/Net/IMAP/send_number_data-i.yaml000064400000000301150403643530014665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_number_data
is_singleton: false
name: send_number_data
params: (num)
visibility: private
ri/1.8/system/Net/IMAP/u8tou16-c.yaml000064400000000255150403643530012630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::u8tou16
is_singleton: true
name: u8tou16
params: (s)
visibility: private
ri/1.8/system/Net/IMAP/put_string-i.yaml000064400000000265150403643530013602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#put_string
is_singleton: false
name: put_string
params: (str)
visibility: private
ri/1.8/system/Net/IMAP/send_data-i.yaml000064400000000264150403643530013325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_data
is_singleton: false
name: send_data
params: (data)
visibility: private
ri/1.8/system/Net/IMAP/CramMD5Authenticator/process-i.yaml000064400000000312150403643530016776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::CramMD5Authenticator#process
is_singleton: false
name: process
params: (challenge)
visibility: public
ri/1.8/system/Net/IMAP/CramMD5Authenticator/new-c.yaml000064400000000307150403643530016107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::CramMD5Authenticator::new
is_singleton: true
name: new
params: (user, password)
visibility: public
ri/1.8/system/Net/IMAP/CramMD5Authenticator/cdesc-CramMD5Authenticator.yaml000064400000000750150403643530022102 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Authenticator for the &quot;CRAM-MD5&quot; authentication type. See #authenticate()."
constants: []

full_name: Net::IMAP::CramMD5Authenticator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: hmac_md5
- !ruby/object:RI::MethodSummary 
  name: process
name: CramMD5Authenticator
superclass: Object
ri/1.8/system/Net/IMAP/CramMD5Authenticator/hmac_md5-i.yaml000064400000000315150403643530017000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::CramMD5Authenticator#hmac_md5
is_singleton: false
name: hmac_md5
params: (text, key)
visibility: private
ri/1.8/system/Net/IMAP/NoResponseError/cdesc-NoResponseError.yaml000064400000000606150403643540020447 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised upon a &quot;NO&quot; response from the server, indicating that the client command could not be completed successfully.
constants: []

full_name: Net::IMAP::NoResponseError
includes: []

instance_methods: []

name: NoResponseError
superclass: ResponseError
ri/1.8/system/Net/IMAP/remove_response_handler-i.yaml000064400000000424150403643540016312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes the response handler.
full_name: Net::IMAP#remove_response_handler
is_singleton: false
name: remove_response_handler
params: (handler)
visibility: public
ri/1.8/system/Net/IMAP/login-i.yaml000064400000001114150403643540012507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a LOGIN command to identify the client and carries the plaintext <tt>password</tt> authenticating this <tt>user</tt>. Note that, unlike calling #authenticate() with an <tt>auth_type</tt> of &quot;LOGIN&quot;, #login() does <b>not</b> use the login authenticator."
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if authentication fails.
full_name: Net::IMAP#login
is_singleton: false
name: login
params: (user, password)
visibility: public
ri/1.8/system/Net/IMAP/Atom/cdesc-Atom.yaml000064400000000300150403643540014024 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::IMAP::Atom
includes: []

instance_methods: []

name: Atom
superclass: Object
ri/1.8/system/Net/IMAP/send_symbol_data-i.yaml000064400000000304150403643540014706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_symbol_data
is_singleton: false
name: send_symbol_data
params: (symbol)
visibility: private
ri/1.8/system/Net/IMAP/RawData/cdesc-RawData.yaml000064400000000306150403643550015101 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::IMAP::RawData
includes: []

instance_methods: []

name: RawData
superclass: Object
ri/1.8/system/Net/IMAP/thread-i.yaml000064400000001670150403643550012656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #search(), but returns message sequence numbers in threaded format, as a Net::IMAP::ThreadMember tree. The supported algorithms are:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "ORDEREDSUBJECT:"
    body: split into single-level threads according to subject, ordered by date.
  - !ruby/struct:SM::Flow::LI 
    label: "REFERENCES:"
    body: split into threads by parent/child relationships determined by which message is a reply to which.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "Unlike #search(), <tt>charset</tt> is a required argument. US-ASCII and UTF-8 are sample values."
- !ruby/struct:SM::Flow::P 
  body: See [SORT-THREAD-EXT] for more details.
full_name: Net::IMAP#thread
is_singleton: false
name: thread
params: (algorithm, search_keys, charset)
visibility: public
ri/1.8/system/Net/IMAP/copy_internal-i.yaml000064400000000311150403643560014245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#copy_internal
is_singleton: false
name: copy_internal
params: (cmd, set, mailbox)
visibility: private
ri/1.8/system/Net/IMAP/disconnected%3f-i.yaml000064400000000411150403643560014340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if disconnected from the server.
full_name: Net::IMAP#disconnected?
is_singleton: false
name: disconnected?
params: ()
visibility: public
ri/1.8/system/Net/IMAP/close-i.yaml000064400000000557150403643560012520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a CLOSE command to close the currently selected mailbox. The CLOSE command permanently removes from the mailbox all messages that have the \Deleted flag set.
full_name: Net::IMAP#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Net/IMAP/authenticate-i.yaml000064400000002746150403643560014073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends an AUTHENTICATE command to authenticate the client. The <tt>auth_type</tt> parameter is a string that represents the authentication mechanism to be used. Currently Net::IMAP supports authentication mechanisms:"
- !ruby/struct:SM::Flow::VERB 
  body: "  LOGIN:: login using cleartext user and password.\n  CRAM-MD5:: login with cleartext user and encrypted password\n             (see [RFC-2195] for a full description).  This\n             mechanism requires that the server have the user's\n             password stored in clear-text password.\n"
- !ruby/struct:SM::Flow::P 
  body: "For both these mechanisms, there should be two <tt>args</tt>: username and (cleartext) password. A server may not support one or other of these mechanisms; check #capability() for a capability of the form &quot;AUTH=LOGIN&quot; or &quot;AUTH=CRAM-MD5&quot;."
- !ruby/struct:SM::Flow::P 
  body: "Authentication is done using the appropriate authenticator object: see @@authenticators for more information on plugging in your own authenticator."
- !ruby/struct:SM::Flow::P 
  body: "For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "   imap.authenticate('LOGIN', user, password)\n"
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if authentication fails.
full_name: Net::IMAP#authenticate
is_singleton: false
name: authenticate
params: (auth_type, *args)
visibility: public
ri/1.8/system/Net/IMAP/send_time_data-i.yaml000064400000000276150403643570014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_time_data
is_singleton: false
name: send_time_data
params: (time)
visibility: private
ri/1.8/system/Net/IMAP/unsubscribe-i.yaml000064400000001070150403643570013727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a UNSUBSCRIBE command to remove the specified <tt>mailbox</tt> name from the server's set of &quot;active&quot; or &quot;subscribed&quot; mailboxes.
- !ruby/struct:SM::Flow::P 
  body: A Net::IMAP::NoResponseError is raised if <tt>mailbox</tt> cannot be unsubscribed from, for instance because the client is not currently subscribed to it.
full_name: Net::IMAP#unsubscribe
is_singleton: false
name: unsubscribe
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/Literal/cdesc-Literal.yaml000064400000000306150403643600015217 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::IMAP::Literal
includes: []

instance_methods: []

name: Literal
superclass: Object
ri/1.8/system/Net/IMAP/send_string_data-i.yaml000064400000000301150403643600014701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_string_data
is_singleton: false
name: send_string_data
params: (str)
visibility: private
ri/1.8/system/Net/IMAP/search-i.yaml000064400000004700150403643600012645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a SEARCH command to search the mailbox for messages that match the given searching criteria, and returns message sequence numbers. <tt>keys</tt> can either be a string holding the entire search string, or a single-dimension array of search keywords and arguments. The following are some common search criteria; see [IMAP] section 6.4.4 for a full list.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<message set>:"
    body: a set of message sequence numbers. ',' indicates an interval, ':' indicates a range. For instance, '2,10:12,15' means &quot;2,10,11,12,15&quot;.
  - !ruby/struct:SM::Flow::LI 
    label: "BEFORE <date>:"
    body: messages with an internal date strictly before &lt;date&gt;. The date argument has a format similar to 8-Aug-2002.
  - !ruby/struct:SM::Flow::LI 
    label: "BODY <string>:"
    body: messages that contain &lt;string&gt; within their body.
  - !ruby/struct:SM::Flow::LI 
    label: "CC <string>:"
    body: messages containing &lt;string&gt; in their CC field.
  - !ruby/struct:SM::Flow::LI 
    label: "FROM <string>:"
    body: messages that contain &lt;string&gt; in their FROM field.
  - !ruby/struct:SM::Flow::LI 
    label: "NEW:"
    body: messages with the \Recent, but not the \Seen, flag set.
  - !ruby/struct:SM::Flow::LI 
    label: "NOT <search-key>:"
    body: negate the following search key.
  - !ruby/struct:SM::Flow::LI 
    label: "OR <search-key> <search-key>:"
    body: "&quot;or&quot; two search keys together."
  - !ruby/struct:SM::Flow::LI 
    label: "ON <date>:"
    body: messages with an internal date exactly equal to &lt;date&gt;, which has a format similar to 8-Aug-2002.
  - !ruby/struct:SM::Flow::LI 
    label: "SINCE <date>:"
    body: messages with an internal date on or after &lt;date&gt;.
  - !ruby/struct:SM::Flow::LI 
    label: "SUBJECT <string>:"
    body: messages with &lt;string&gt; in their subject.
  - !ruby/struct:SM::Flow::LI 
    label: "TO <string>:"
    body: messages with &lt;string&gt; in their TO field.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p imap.search([&quot;SUBJECT&quot;, &quot;hello&quot;, &quot;NOT&quot;, &quot;NEW&quot;])\n  #=&gt; [1, 6, 7, 8]\n"
full_name: Net::IMAP#search
is_singleton: false
name: search
params: (keys, charset = nil)
visibility: public
ri/1.8/system/Net/IMAP/sort-i.yaml000064400000001275150403643600012373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a SORT command to sort messages in the mailbox. Returns an array of message sequence numbers. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p imap.sort([&quot;FROM&quot;], [&quot;ALL&quot;], &quot;US-ASCII&quot;)\n  #=&gt; [1, 2, 3, 5, 6, 7, 8, 4, 9]\n  p imap.sort([&quot;DATE&quot;], [&quot;SUBJECT&quot;, &quot;hello&quot;], &quot;US-ASCII&quot;)\n  #=&gt; [6, 7, 8, 1]\n"
- !ruby/struct:SM::Flow::P 
  body: See [SORT-THREAD-EXT] for more details.
full_name: Net::IMAP#sort
is_singleton: false
name: sort
params: (sort_keys, search_keys, charset)
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeMultipart/multipart%3f-i.yaml000064400000000304150403643600017354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP::BodyTypeMultipart#multipart?
is_singleton: false
name: multipart?
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeMultipart/media_subtype-i.yaml000064400000000604150403643600017672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Obsolete: use <tt>subtype</tt> instead. Calling this will generate a warning message to <tt>stderr</tt>, then return the value of <tt>subtype</tt>."
full_name: Net::IMAP::BodyTypeMultipart#media_subtype
is_singleton: false
name: media_subtype
params: ()
visibility: public
ri/1.8/system/Net/IMAP/BodyTypeMultipart/cdesc-BodyTypeMultipart.yaml000064400000003246150403643600021337 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Net::IMAP::BodyTypeMultipart represents multipart body structures of messages.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: "Fields:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "media_type:"
    body: Returns the content media type name as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "subtype:"
    body: Returns the content subtype name as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "parts:"
    body: Returns multiple parts.
  - !ruby/struct:SM::Flow::LI 
    label: "param:"
    body: Returns a hash that represents parameters as defined in [MIME-IMB].
  - !ruby/struct:SM::Flow::LI 
    label: "disposition:"
    body: Returns a Net::IMAP::ContentDisposition object giving the content disposition.
  - !ruby/struct:SM::Flow::LI 
    label: "language:"
    body: Returns a string or an array of strings giving the body language value as defined in [LANGUAGE-TAGS].
  - !ruby/struct:SM::Flow::LI 
    label: "extension:"
    body: Returns extension data.
  - !ruby/struct:SM::Flow::LI 
    label: "multipart?:"
    body: Returns true.
  type: :NOTE
constants: []

full_name: Net::IMAP::BodyTypeMultipart
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: media_subtype
- !ruby/object:RI::MethodSummary 
  name: multipart?
name: BodyTypeMultipart
superclass: Struct.new(:media_type, :subtype,                                          :parts,                                          :param, :disposition, :language,                                          :extension)
ri/1.8/system/Net/IMAP/get_tagged_response-i.yaml000064400000000307150403643600015407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#get_tagged_response
is_singleton: false
name: get_tagged_response
params: (tag)
visibility: private
ri/1.8/system/Net/IMAP/send_command-i.yaml000064400000000310150403643600014020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_command
is_singleton: false
name: send_command
params: (cmd, *args, &block)
visibility: private
ri/1.8/system/Net/IMAP/uid_store-i.yaml000064400000000444150403643600013376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #store(), but <tt>set</tt> contains unique identifiers."
full_name: Net::IMAP#uid_store
is_singleton: false
name: uid_store
params: (set, attr, flags)
visibility: public
ri/1.8/system/Net/IMAP/list-i.yaml000064400000003161150403643600012353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a LIST command, and returns a subset of names from the complete set of all names available to the client. <tt>refname</tt> provides a context (for instance, a base directory in a directory-based mailbox hierarchy). <tt>mailbox</tt> specifies a mailbox or (via wildcards) mailboxes under that context. Two wildcards may be used in <tt>mailbox</tt>: '*', which matches all characters <b>including</b> the hierarchy delimiter (for instance, '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%', which matches all characters <b>except</b> the hierarchy delimiter."
- !ruby/struct:SM::Flow::P 
  body: If <tt>refname</tt> is empty, <tt>mailbox</tt> is used directly to determine which mailboxes to match. If <tt>mailbox</tt> is empty, the root name of <tt>refname</tt> and the hierarchy delimiter are returned.
- !ruby/struct:SM::Flow::P 
  body: "The return value is an array of +Net::IMAP::MailboxList+. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  imap.create(&quot;foo/bar&quot;)\n  imap.create(&quot;foo/baz&quot;)\n  p imap.list(&quot;&quot;, &quot;foo/%&quot;)\n  #=&gt; [#&lt;Net::IMAP::MailboxList attr=[:Noselect], delim=&quot;/&quot;, name=&quot;foo/&quot;&gt;, \\\n       #&lt;Net::IMAP::MailboxList attr=[:Noinferiors, :Marked], delim=&quot;/&quot;, name=&quot;foo/bar&quot;&gt;, \\\n       #&lt;Net::IMAP::MailboxList attr=[:Noinferiors], delim=&quot;/&quot;, name=&quot;foo/baz&quot;&gt;]\n"
full_name: Net::IMAP#list
is_singleton: false
name: list
params: (refname, mailbox)
visibility: public
ri/1.8/system/Net/IMAP/getquotaroot-i.yaml000064400000000725150403643600014140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends the GETQUOTAROOT command along with specified <tt>mailbox</tt>. This command is generally available to both admin and user. If mailbox exists, returns an array containing objects of Net::IMAP::MailboxQuotaRoot and Net::IMAP::MailboxQuota.
full_name: Net::IMAP#getquotaroot
is_singleton: false
name: getquotaroot
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/uid_fetch-i.yaml000064400000000435150403643600013333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "As for #fetch(), but <tt>set</tt> contains unique identifiers."
full_name: Net::IMAP#uid_fetch
is_singleton: false
name: uid_fetch
params: (set, attr)
visibility: public
ri/1.8/system/Net/IMAP/getquota-i.yaml000064400000000663150403643600013235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends the GETQUOTA command along with specified <tt>mailbox</tt>. If this mailbox exists, then an array containing a Net::IMAP::MailboxQuota object is returned. This command generally is only available to server admin.
full_name: Net::IMAP#getquota
is_singleton: false
name: getquota
params: (mailbox)
visibility: public
ri/1.8/system/Net/IMAP/logout-i.yaml000064400000000446150403643600012714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a LOGOUT command to inform the server that the client is done with the connection.
full_name: Net::IMAP#logout
is_singleton: false
name: logout
params: ()
visibility: public
ri/1.8/system/Net/IMAP/send_quoted_string-i.yaml000064400000000305150403643600015275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_quoted_string
is_singleton: false
name: send_quoted_string
params: (str)
visibility: private
ri/1.8/system/Net/IMAP/ResponseParseError/cdesc-ResponseParseError.yaml000064400000000476150403643600021645 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Error raised when a response from the server is non-parseable.
constants: []

full_name: Net::IMAP::ResponseParseError
includes: []

instance_methods: []

name: ResponseParseError
superclass: Error
ri/1.8/system/Net/IMAP/fetch-i.yaml000064400000002642150403643600012474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Sends a FETCH command to retrieve data associated with a message in the mailbox. The <tt>set</tt> parameter is a number or an array of numbers or a Range object. The number is a message sequence number. <tt>attr</tt> 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. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  p imap.fetch(6..8, &quot;UID&quot;)\n  #=&gt; [#&lt;Net::IMAP::FetchData seqno=6, attr={&quot;UID&quot;=&gt;98}&gt;, \\\n       #&lt;Net::IMAP::FetchData seqno=7, attr={&quot;UID&quot;=&gt;99}&gt;, \\\n       #&lt;Net::IMAP::FetchData seqno=8, attr={&quot;UID&quot;=&gt;100}&gt;]\n  p imap.fetch(6, &quot;BODY[HEADER.FIELDS (SUBJECT)]&quot;)\n  #=&gt; [#&lt;Net::IMAP::FetchData seqno=6, attr={&quot;BODY[HEADER.FIELDS (SUBJECT)]&quot;=&gt;&quot;Subject: test\\r\\n\\r\\n&quot;}&gt;]\n  data = imap.uid_fetch(98, [&quot;RFC822.SIZE&quot;, &quot;INTERNALDATE&quot;])[0]\n  p data.seqno\n  #=&gt; 6\n  p data.attr[&quot;RFC822.SIZE&quot;]\n  #=&gt; 611\n  p data.attr[&quot;INTERNALDATE&quot;]\n  #=&gt; &quot;12-Oct-2000 22:40:59 +0900&quot;\n  p data.attr[&quot;UID&quot;]\n  #=&gt; 98\n"
full_name: Net::IMAP#fetch
is_singleton: false
name: fetch
params: (set, attr)
visibility: public
ri/1.8/system/Net/IMAP/send_list_data-i.yaml000064400000000276150403643600014361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::IMAP#send_list_data
is_singleton: false
name: send_list_data
params: (list)
visibility: private
ri/1.8/system/Net/ReadAdapter/cdesc-ReadAdapter.yaml000064400000000310150403643610016025 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ReadAdapter
includes: []

instance_methods: []

name: ReadAdapter
superclass: Object
ri/1.8/system/Net/POPBadResponse/cdesc-POPBadResponse.yaml000064400000000431150403643620017052 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Unexpected response from the server.
constants: []

full_name: Net::POPBadResponse
includes: []

instance_methods: []

name: POPBadResponse
superclass: POPError
ri/1.8/system/Net/HTTPRequest/cdesc-HTTPRequest.yaml000064400000000646150403643630015773 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: HTTP request class. This class wraps request header and entity path. You <b>must</b> use its subclass, Net::HTTP::Get, Post, Head.
constants: []

full_name: Net::HTTPRequest
includes: []

instance_methods: []

name: HTTPRequest
superclass: HTTPGenericRequest
ri/1.8/system/Net/HTTPRequest/new-c.yaml000064400000000401150403643630013562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates HTTP request object.
full_name: Net::HTTPRequest::new
is_singleton: true
name: new
params: (path, initheader = nil)
visibility: public
ri/1.8/system/Net/ProtocolError/cdesc-ProtocolError.yaml000064400000000323150403643640017132 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtocolError
includes: []

instance_methods: []

name: ProtocolError
superclass: StandardError
ri/1.8/system/Net/Telnet/binmode%3d-i.yaml000064400000000411150403643650014016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Turn newline conversion on (false) or off (true).
full_name: Net::Telnet#binmode=
is_singleton: false
name: binmode=
params: (mode)
visibility: public
ri/1.8/system/Net/Telnet/print-i.yaml000064400000000766150403643650013256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a string to the host.
- !ruby/struct:SM::Flow::P 
  body: This does <em>not</em> automatically append a newline to the string. Embedded newlines may be converted and telnet command sequences escaped depending upon the values of telnetmode, binmode, and telnet options set by the host.
full_name: Net::Telnet#print
is_singleton: false
name: print
params: (string)
visibility: public
ri/1.8/system/Net/Telnet/binmode-i.yaml000064400000000555150403643650013533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Turn newline conversion on (<tt>mode</tt> == false) or off (<tt>mode</tt> == true), or return the current value (<tt>mode</tt> is not specified).
full_name: Net::Telnet#binmode
is_singleton: false
name: binmode
params: (mode = nil)
visibility: public
ri/1.8/system/Net/Telnet/telnetmode-i.yaml000064400000000755150403643660014261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set telnet command interpretation on (<tt>mode</tt> == true) or off (<tt>mode</tt> == false), or return the current value (<tt>mode</tt> not provided). It should be on for true telnet sessions, off if using Net::Telnet to connect to a non-telnet service such as SMTP.
full_name: Net::Telnet#telnetmode
is_singleton: false
name: telnetmode
params: (mode = nil)
visibility: public
ri/1.8/system/Net/Telnet/new-c.yaml000064400000013363150403643660012703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: "mesg "
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Net::Telnet object.
- !ruby/struct:SM::Flow::P 
  body: "Attempts to connect to the host (unless the Proxy option is provided: see below). If a block is provided, it is yielded status messages on the attempt to connect to the server, of the form:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Trying localhost...\n  Connected to localhost.\n"
- !ruby/struct:SM::Flow::P 
  body: <tt>options</tt> is a hash of options. The following example lists all options and their default values.
- !ruby/struct:SM::Flow::VERB 
  body: "  host = Net::Telnet::new(\n           &quot;Host&quot;       =&gt; &quot;localhost&quot;,  # default: &quot;localhost&quot;\n           &quot;Port&quot;       =&gt; 23,           # default: 23\n           &quot;Binmode&quot;    =&gt; false,        # default: false\n           &quot;Output_log&quot; =&gt; &quot;output_log&quot;, # default: nil (no output)\n           &quot;Dump_log&quot;   =&gt; &quot;dump_log&quot;,   # default: nil (no output)\n           &quot;Prompt&quot;     =&gt; /[$%#&gt;] \\z/n, # default: /[$%#&gt;] \\z/n\n           &quot;Telnetmode&quot; =&gt; true,         # default: true\n           &quot;Timeout&quot;    =&gt; 10,           # default: 10\n             # if ignore timeout then set &quot;Timeout&quot; to false.\n           &quot;Waittime&quot;   =&gt; 0,            # default: 0\n           &quot;Proxy&quot;      =&gt; proxy         # default: nil\n                           # proxy is Net::Telnet or IO object\n         )\n"
- !ruby/struct:SM::Flow::P 
  body: "The options have the following meanings:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Host:"
    body: the hostname or IP address of the host to connect to, as a String. Defaults to &quot;localhost&quot;.
  - !ruby/struct:SM::Flow::LI 
    label: "Port:"
    body: the port to connect to. Defaults to 23.
  - !ruby/struct:SM::Flow::LI 
    label: "Binmode:"
    body: "if false (the default), newline substitution is performed. Outgoing LF is converted to CRLF, and incoming CRLF is converted to LF. If true, this substitution is not performed. This value can also be set with the #binmode() method. The outgoing conversion only applies to the #puts() and #print() methods, not the #write() method. The precise nature of the newline conversion is also affected by the telnet options SGA and BIN."
  - !ruby/struct:SM::Flow::LI 
    label: "Output_log:"
    body: the name of the file to write connection status messages and all received traffic to. In the case of a proper Telnet session, this will include the client input as echoed by the host; otherwise, it only includes server responses. Output is appended verbatim to this file. By default, no output log is kept.
  - !ruby/struct:SM::Flow::LI 
    label: "Dump_log:"
    body: as for Output_log, except that output is written in hexdump format (16 bytes per line as hex pairs, followed by their printable equivalent), with connection status messages preceded by '#', sent traffic preceded by '&gt;', and received traffic preceded by '&lt;'. By default, not dump log is kept.
  - !ruby/struct:SM::Flow::LI 
    label: "Prompt:"
    body: a regular expression matching the host's command-line prompt sequence. This is needed by the Telnet class to determine when the output from a command has finished and the host is ready to receive a new command. By default, this regular expression is /[$%#&gt;] \z/n.
  - !ruby/struct:SM::Flow::LI 
    label: "Telnetmode:"
    body: "a boolean value, true by default. In telnet mode, traffic received from the host is parsed for special command sequences, and these sequences are escaped in outgoing traffic sent using #puts() or #print() (but not #write()). If you are using the Net::Telnet object to connect to a non-telnet service (such as SMTP or POP), this should be set to &quot;false&quot; to prevent undesired data corruption. This value can also be set by the #telnetmode() method."
  - !ruby/struct:SM::Flow::LI 
    label: "Timeout:"
    body: "the number of seconds to wait before timing out both the initial attempt to connect to host (in this constructor), and all attempts to read data from the host (in #waitfor(), #cmd(), and #login()). Exceeding this timeout causes a TimeoutError to be raised. The default value is 10 seconds. You can disable the timeout by setting this value to false. In this case, the connect attempt will eventually timeout on the underlying connect(2) socket call with an Errno::ETIMEDOUT error (but generally only after a few minutes), but other attempts to read data from the host will hand indefinitely if no data is forthcoming."
  - !ruby/struct:SM::Flow::LI 
    label: "Waittime:"
    body: the amount of time to wait after seeing what looks like a prompt (that is, received data that matches the Prompt option regular expression) to see if more data arrives. If more data does arrive in this time, Net::Telnet assumes that what it saw was not really a prompt. This is to try to avoid false matches, but it can also lead to missing real prompts (if, for instance, a background process writes to the terminal soon after the prompt is displayed). By default, set to 0, meaning not to wait for more data.
  - !ruby/struct:SM::Flow::LI 
    label: "Proxy:"
    body: a proxy object to used instead of opening a direct connection to the host. Must be either another Net::Telnet object or an IO object. If it is another Net::Telnet object, this instance will use that one's socket for communication. If an IO object, it is used directly for communication. Any other kind of object will cause an error to be raised.
  type: :NOTE
full_name: Net::Telnet::new
is_singleton: true
name: new
params: (options) {|mesg| ...}
visibility: public
ri/1.8/system/Net/Telnet/write-i.yaml000064400000000627150403643670013252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Write <tt>string</tt> to the host.
- !ruby/struct:SM::Flow::P 
  body: Does not perform any conversions on <tt>string</tt>. Will log <tt>string</tt> to the dumplog, if the Dump_log option is set.
full_name: Net::Telnet#write
is_singleton: false
name: write
params: (string)
visibility: public
ri/1.8/system/Net/Telnet/cdesc-Telnet.yaml000064400000011743150403643670014205 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The socket the Telnet object is using. Note that this object becomes a delegate of the Telnet object, so normally you invoke its methods directly on the Telnet object.
  name: sock
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Net::Telnet
- !ruby/struct:SM::Flow::P 
  body: Provides telnet client functionality.
- !ruby/struct:SM::Flow::P 
  body: This class also has, through delegation, all the methods of a socket object (by default, a <tt>TCPSocket</tt>, but can be set by the <tt>Proxy</tt> option to <tt>new()</tt>). This provides methods such as <tt>close()</tt> to end the session and <tt>sysread()</tt> to read data directly from the host, instead of via the <tt>waitfor()</tt> mechanism. Note that if you do use <tt>sysread()</tt> directly when in telnet mode, you should probably pass the output through <tt>preprocess()</tt> to extract telnet command sequences.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Overview
- !ruby/struct:SM::Flow::P 
  body: "The telnet protocol allows a client to login remotely to a user account on a server and execute commands via a shell. The equivalent is done by creating a Net::Telnet class with the <tt>Host</tt> option set to your host, calling #login() with your user and password, issuing one or more #cmd() calls, and then calling #close() to end the session. The #waitfor(), #print(), #puts(), and #write() methods, which #cmd() is implemented on top of, are only needed if you are doing something more complicated."
- !ruby/struct:SM::Flow::P 
  body: "A Net::Telnet object can also be used to connect to non-telnet services, such as SMTP or HTTP. In this case, you normally want to provide the <tt>Port</tt> option to specify the port to connect to, and set the <tt>Telnetmode</tt> option to false to prevent the client from attempting to interpret telnet command sequences. Generally, #login() will not work with other protocols, and you have to handle authentication yourself."
- !ruby/struct:SM::Flow::P 
  body: "For some protocols, it will be possible to specify the <tt>Prompt</tt> option once when you create the Telnet object and use #cmd() calls; for others, you will have to specify the response sequence to look for as the Match option to every #cmd() call, or call #puts() and #waitfor() directly; for yet others, you will have to use #sysread() instead of #waitfor() and parse server responses yourself."
- !ruby/struct:SM::Flow::P 
  body: It is worth noting that when you create a new Net::Telnet object, you can supply a proxy IO channel via the Proxy option. This can be used to attach the Telnet object to other Telnet objects, to already open sockets, or to any read-write IO object. This can be useful, for instance, for setting up a test fixture for unit testing.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Log in and send a command, echoing all output to stdout
- !ruby/struct:SM::Flow::VERB 
  body: "  localhost = Net::Telnet::new(&quot;Host&quot; =&gt; &quot;localhost&quot;,\n                               &quot;Timeout&quot; =&gt; 10,\n                               &quot;Prompt&quot; =&gt; /[$%#&gt;] \\z/n)\n  localhost.login(&quot;username&quot;, &quot;password&quot;) { |c| print c }\n  localhost.cmd(&quot;command&quot;) { |c| print c }\n  localhost.close\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Check a POP server to see if you have mail
- !ruby/struct:SM::Flow::VERB 
  body: "  pop = Net::Telnet::new(&quot;Host&quot; =&gt; &quot;your_destination_host_here&quot;,\n                         &quot;Port&quot; =&gt; 110,\n                         &quot;Telnetmode&quot; =&gt; false,\n                         &quot;Prompt&quot; =&gt; /^+OK/n)\n  pop.cmd(&quot;user &quot; + &quot;your_username_here&quot;) { |c| print c }\n  pop.cmd(&quot;pass &quot; + &quot;your_password_here&quot;) { |c| print c }\n  pop.cmd(&quot;list&quot;) { |c| print c }\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: References
- !ruby/struct:SM::Flow::P 
  body: There are a large number of RFCs relevant to the Telnet protocol. RFCs 854-861 define the base protocol. For a complete listing of relevant RFCs, see http://www.omnifarious.org/~hopper/technical/telnet-rfc.html
constants: []

full_name: Net::Telnet
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: binmode
- !ruby/object:RI::MethodSummary 
  name: binmode=
- !ruby/object:RI::MethodSummary 
  name: cmd
- !ruby/object:RI::MethodSummary 
  name: login
- !ruby/object:RI::MethodSummary 
  name: preprocess
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: puts
- !ruby/object:RI::MethodSummary 
  name: telnetmode
- !ruby/object:RI::MethodSummary 
  name: telnetmode=
- !ruby/object:RI::MethodSummary 
  name: waitfor
- !ruby/object:RI::MethodSummary 
  name: write
name: Telnet
superclass: SimpleDelegator
ri/1.8/system/Net/Telnet/login-i.yaml000064400000002675150403643670013235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: recvdata
comment: 
- !ruby/struct:SM::Flow::P 
  body: Login to the host with a given username and password.
- !ruby/struct:SM::Flow::P 
  body: The username and password can either be provided as two string arguments in that order, or as a hash with keys &quot;Name&quot; and &quot;Password&quot;.
- !ruby/struct:SM::Flow::P 
  body: This method looks for the strings &quot;login&quot; and &quot;Password&quot; from the host to determine when to send the username and password. If the login sequence does not follow this pattern (for instance, you are connecting to a service other than telnet), you will need to handle login yourself.
- !ruby/struct:SM::Flow::P 
  body: The password can be omitted, either by only provided one String argument, which will be used as the username, or by providing a has that has no &quot;Password&quot; key. In this case, the method will not look for the &quot;Password:&quot; prompt; if it is sent, it will have to be dealt with by later calls.
- !ruby/struct:SM::Flow::P 
  body: The method returns all data received during the login process from the host, including the echoed username but not the password (which the host should not echo). If a block is passed in, this received data is also yielded to the block as it is received.
full_name: Net::Telnet#login
is_singleton: false
name: login
params: (options, password = nil) {|recvdata| ...}
visibility: public
ri/1.8/system/Net/Telnet/cmd-i.yaml000064400000003375150403643700012660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: recvdata
comment: 
- !ruby/struct:SM::Flow::P 
  body: Send a command to the host.
- !ruby/struct:SM::Flow::P 
  body: More exactly, sends a string to the host, and reads in all received data until is sees the prompt or other matched sequence.
- !ruby/struct:SM::Flow::P 
  body: If a block is given, the received data will be yielded to it as it is read in. Whether a block is given or not, the received data will be return as a string. Note that the received data includes the prompt and in most cases the host's echo of our command.
- !ruby/struct:SM::Flow::P 
  body: "<tt>options</tt> is either a String, specified the string or command to send to the host; or it is a hash of options. If a hash, the following options can be specified:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "String:"
    body: the command or other string to send to the host.
  - !ruby/struct:SM::Flow::LI 
    label: "Match:"
    body: a regular expression, the sequence to look for in the received data before returning. If not specified, the Prompt option value specified when this instance was created will be used, or, failing that, the default prompt of /[$%#&gt;] \z/n.
  - !ruby/struct:SM::Flow::LI 
    label: "Timeout:"
    body: the seconds to wait for data from the host before raising a Timeout error. If not specified, the Timeout option value specified when this instance was created will be used, or, failing that, the default value of 10 seconds.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: The command or other string will have the newline sequence appended to it.
full_name: Net::Telnet#cmd
is_singleton: false
name: cmd
params: (options) {|recvdata| ...}
visibility: public
ri/1.8/system/Net/Telnet/waitfor-i.yaml000064400000004730150403643700013564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: recvdata
comment: 
- !ruby/struct:SM::Flow::P 
  body: Read data from the host until a certain sequence is matched.
- !ruby/struct:SM::Flow::P 
  body: If a block is given, the received data will be yielded as it is read in (not necessarily all in one go), or nil if EOF occurs before any data is received. Whether a block is given or not, all data read will be returned in a single string, or again nil if EOF occurs before any data is received. Note that received data includes the matched sequence we were looking for.
- !ruby/struct:SM::Flow::P 
  body: "<tt>options</tt> can be either a regular expression or a hash of options. If a regular expression, this specifies the data to wait for. If a hash, this can specify the following options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Match:"
    body: a regular expression, specifying the data to wait for.
  - !ruby/struct:SM::Flow::LI 
    label: "Prompt:"
    body: as for Match; used only if Match is not specified.
  - !ruby/struct:SM::Flow::LI 
    label: "String:"
    body: as for Match, except a string that will be converted into a regular expression. Used only if Match and Prompt are not specified.
  - !ruby/struct:SM::Flow::LI 
    label: "Timeout:"
    body: the number of seconds to wait for data from the host before raising a TimeoutError. If set to false, no timeout will occur. If not specified, the Timeout option value specified when this instance was created will be used, or, failing that, the default value of 10 seconds.
  - !ruby/struct:SM::Flow::LI 
    label: "Waittime:"
    body: the number of seconds to wait after matching against the input data to see if more data arrives. If more data arrives within this time, we will judge ourselves not to have matched successfully, and will continue trying to match. If not specified, the Waittime option value specified when this instance was created will be used, or, failing that, the default value of 0 seconds, which means not to wait for more input.
  - !ruby/struct:SM::Flow::LI 
    label: "FailEOF:"
    body: if true, when the remote end closes the connection then an EOFError will be raised. Otherwise, defaults to the old behaviour that the function will return whatever data has been received already, or nil if nothing was received.
  type: :NOTE
full_name: Net::Telnet#waitfor
is_singleton: false
name: waitfor
params: (options) {|recvdata| ...}
visibility: public
ri/1.8/system/Net/Telnet/preprocess-i.yaml000064400000001034150403643710014271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Preprocess received data from the host.
- !ruby/struct:SM::Flow::P 
  body: "Performs newline conversion and detects telnet command sequences. Called automatically by #waitfor(). You should only use this method yourself if you have read input directly using sysread() or similar, and even then only if in telnet mode."
full_name: Net::Telnet#preprocess
is_singleton: false
name: preprocess
params: (string)
visibility: public
ri/1.8/system/Net/Telnet/puts-i.yaml000064400000000512150403643710013077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a string to the host.
- !ruby/struct:SM::Flow::P 
  body: "Same as #print(), but appends a newline to the string."
full_name: Net::Telnet#puts
is_singleton: false
name: puts
params: (string)
visibility: public
ri/1.8/system/Net/Telnet/telnetmode%3d-i.yaml000064400000000616150403643710014545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Turn telnet command interpretation on (true) or off (false). It should be on for true telnet sessions, off if using Net::Telnet to connect to a non-telnet service such as SMTP.
full_name: Net::Telnet#telnetmode=
is_singleton: false
name: telnetmode=
params: (mode)
visibility: public
ri/1.8/system/Net/WriteAdapter/print-i.yaml000064400000000351150403643730014403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #write"
full_name: Net::WriteAdapter#print
is_singleton: false
name: print
params: (str)
visibility: public
ri/1.8/system/Net/WriteAdapter/printf-i.yaml000064400000000266150403643740014557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::WriteAdapter#printf
is_singleton: false
name: printf
params: (*args)
visibility: public
ri/1.8/system/Net/WriteAdapter/inspect-i.yaml000064400000000263150403643740014717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::WriteAdapter#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Net/WriteAdapter/new-c.yaml000064400000000271150403643750014035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::WriteAdapter::new
is_singleton: true
name: new
params: (socket, method)
visibility: public
ri/1.8/system/Net/WriteAdapter/write-i.yaml000064400000000333150403643760014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: print
block_params: 
comment: 
full_name: Net::WriteAdapter#write
is_singleton: false
name: write
params: (str)
visibility: public
ri/1.8/system/Net/WriteAdapter/cdesc-WriteAdapter.yaml000064400000001120150403643770016472 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: The writer adapter class
constants: []

full_name: Net::WriteAdapter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: printf
- !ruby/object:RI::MethodSummary 
  name: puts
- !ruby/object:RI::MethodSummary 
  name: write
name: WriteAdapter
superclass: Object
ri/1.8/system/Net/WriteAdapter/%3c%3c-i.yaml000064400000000256150403643770014124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::WriteAdapter#<<
is_singleton: false
name: "<<"
params: (str)
visibility: public
ri/1.8/system/Net/WriteAdapter/puts-i.yaml000064400000000265150403644000014235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::WriteAdapter#puts
is_singleton: false
name: puts
params: (str = '')
visibility: public
ri/1.8/system/Net/ProtoAuthError/cdesc-ProtoAuthError.yaml000064400000000325150403644010017374 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtoAuthError
includes: []

instance_methods: []

name: ProtoAuthError
superclass: ProtocolError
ri/1.8/system/Net/POPMail/cdesc-POPMail.yaml000064400000002304150403644020014200 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The length of the message in octets.
  name: length
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The sequence number of the message on the server.
  name: number
  rw: R
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: Net::POPMail
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: all
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete!
- !ruby/object:RI::MethodSummary 
  name: deleted?
- !ruby/object:RI::MethodSummary 
  name: header
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: mail
- !ruby/object:RI::MethodSummary 
  name: pop
- !ruby/object:RI::MethodSummary 
  name: top
- !ruby/object:RI::MethodSummary 
  name: uidl
- !ruby/object:RI::MethodSummary 
  name: unique_id
name: POPMail
superclass: Object
ri/1.8/system/Net/POPMail/pop-i.yaml000064400000003043150403644030012706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: all
- !ruby/object:RI::AliasName 
  name: mail
block_params: message_chunk
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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 <tt>dest</tt> argument will be prepended to the returned String; this argument is essentially obsolete.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example without block
- !ruby/struct:SM::Flow::VERB 
  body: "    POP3.start('pop.example.com', 110,\n               'YourAccount, 'YourPassword') do |pop|\n      n = 1\n      pop.mails.each do |popmail|\n        File.open(&quot;inbox/#{n}&quot;, 'w') do |f|\n          f.write popmail.pop\n        end\n        popmail.delete\n        n += 1\n      end\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example with block
- !ruby/struct:SM::Flow::VERB 
  body: "    POP3.start('pop.example.com', 110,\n               'YourAccount, 'YourPassword') do |pop|\n      n = 1\n      pop.mails.each do |popmail|\n        File.open(&quot;inbox/#{n}&quot;, 'w') do |f|\n          popmail.pop do |chunk|            ####\n            f.write chunk\n          end\n        end\n        n += 1\n      end\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POPMail#pop
is_singleton: false
name: pop
params: ( dest = '' ) {|message_chunk| ...}
visibility: public
ri/1.8/system/Net/POPMail/unique_id-i.yaml000064400000000662150403644030014076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: uidl
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the unique-id of the message. Normally the unique-id is a hash string of the message.
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POPMail#unique_id
is_singleton: false
name: unique_id
params: ()
visibility: public
ri/1.8/system/Net/POPMail/delete-i.yaml000064400000001654150403644030013360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: delete!
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Marks a message for deletion on the server. Deletion does not actually occur until the end of the session; deletion may be cancelled for <em>all</em> marked messages by calling POP3#reset().
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "    POP3.start('pop.example.com', 110,\n               'YourAccount, 'YourPassword') do |pop|\n      n = 1\n      pop.mails.each do |popmail|\n        File.open(&quot;inbox/#{n}&quot;, 'w') do |f|\n          f.write popmail.pop\n        end\n        popmail.delete         ####\n        n += 1\n      end\n    end\n"
full_name: Net::POPMail#delete
is_singleton: false
name: delete
params: ()
visibility: public
ri/1.8/system/Net/POPMail/header-i.yaml000064400000000640150403644040013341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fetches the message header.
- !ruby/struct:SM::Flow::P 
  body: The optional <tt>dest</tt> argument is obsolete.
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POPMail#header
is_singleton: false
name: header
params: (dest = '')
visibility: public
ri/1.8/system/Net/POPMail/top-i.yaml000064400000000702150403644040012712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fetches the message header and <tt>lines</tt> lines of body.
- !ruby/struct:SM::Flow::P 
  body: The optional <tt>dest</tt> argument is obsolete.
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POPMail#top
is_singleton: false
name: top
params: (lines, dest = '')
visibility: public
ri/1.8/system/Net/POPMail/inspect-i.yaml000064400000000411150403644050013553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Provide human-readable stringification of class state.
full_name: Net::POPMail#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Net/POPMail/delete%21-i.yaml000064400000000346150403644050013567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #delete"
full_name: Net::POPMail#delete!
is_singleton: false
name: delete!
params: ()
visibility: public
ri/1.8/system/Net/POPMail/deleted%3f-i.yaml000064400000000367150403644060014025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: True if the mail has been deleted.
full_name: Net::POPMail#deleted?
is_singleton: false
name: deleted?
params: ()
visibility: public
ri/1.8/system/Net/POPMail/all-i.yaml000064400000000346150403644070012667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pop"
full_name: Net::POPMail#all
is_singleton: false
name: all
params: ( dest = '' )
visibility: public
ri/1.8/system/Net/POPMail/mail-i.yaml000064400000000350150403644100013026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pop"
full_name: Net::POPMail#mail
is_singleton: false
name: mail
params: ( dest = '' )
visibility: public
ri/1.8/system/Net/POPMail/uidl-i.yaml000064400000000343150403644100013043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #unique_id"
full_name: Net::POPMail#uidl
is_singleton: false
name: uidl
params: ()
visibility: public
ri/1.8/system/Net/ProtoServerError/cdesc-ProtoServerError.yaml000064400000000331150403644120020305 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtoServerError
includes: []

instance_methods: []

name: ProtoServerError
superclass: ProtocolError
ri/1.8/system/Net/SMTPServerBusy/cdesc-SMTPServerBusy.yaml000064400000000550150403644140017134 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents SMTP error code 420 or 450, a temporary error.
constants: []

full_name: Net::SMTPServerBusy
includes: 
- !ruby/object:RI::IncludedModule 
  name: SMTPError
instance_methods: []

name: SMTPServerBusy
superclass: ProtoServerError
ri/1.8/system/Net/NetPrivate/cdesc-NetPrivate.yaml000064400000000300150403644150015636 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::NetPrivate
includes: []

instance_methods: []

name: NetPrivate
superclass: 
ri/1.8/system/Net/HTTP/head2-i.yaml000064400000000403150403644170012413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #request_head"
full_name: Net::HTTP#head2
is_singleton: false
name: head2
params: (path, initheader = nil, &block)
visibility: public
ri/1.8/system/Net/HTTP/connect-i.yaml000064400000000254150403644200013057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#connect
is_singleton: false
name: connect
params: ()
visibility: private
ri/1.8/system/Net/HTTP/proxy_user-i.yaml000064400000000427150403644200013647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: User name for accessing proxy. If self does not use a proxy, nil.
full_name: Net::HTTP#proxy_user
is_singleton: false
name: proxy_user
params: ()
visibility: public
ri/1.8/system/Net/HTTP/Put/cdesc-Put.yaml000064400000000656150403644220013607 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'PUT'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Put
includes: []

instance_methods: []

name: Put
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/get_response-c.yaml000064400000001412150403644230014115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Send a GET request to the target and return the response as a Net::HTTPResponse object. The target can either be specified as (<tt>uri</tt>), or as (<tt>host</tt>, <tt>path</tt>, <tt>port</tt> = 80); so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   res = Net::HTTP.get_response(URI.parse('http://www.example.com/index.html'))\n   print res.body\n"
- !ruby/struct:SM::Flow::P 
  body: "or:"
- !ruby/struct:SM::Flow::VERB 
  body: "   res = Net::HTTP.get_response('www.example.com', '/index.html')\n   print res.body\n"
full_name: Net::HTTP::get_response
is_singleton: true
name: get_response
params: (uri_or_host, path = nil, port = nil, &block)
visibility: public
ri/1.8/system/Net/HTTP/move-i.yaml000064400000000471150403644240012401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a MOVE request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#move
is_singleton: false
name: move
params: (path, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/ProxyDelta/cdesc-ProxyDelta.yaml000064400000000306150403644250016450 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::HTTP::ProxyDelta
includes: []

instance_methods: []

name: ProxyDelta
superclass: 
ri/1.8/system/Net/HTTP/proxyport-i.yaml000064400000000353150403644260013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #proxy_port"
full_name: Net::HTTP#proxyport
is_singleton: false
name: proxyport
params: ()
visibility: public
ri/1.8/system/Net/HTTP/Move/cdesc-Move.yaml000064400000000662150403644270014105 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'MOVE'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Move
includes: []

instance_methods: []

name: Move
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/started%3f-i.yaml000064400000000451150403644300013372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: active?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns true if the HTTP session is started.
full_name: Net::HTTP#started?
is_singleton: false
name: started?
params: ()
visibility: public
ri/1.8/system/Net/HTTP/ssl_timeout-i.yaml000064400000000263150403644310013777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#ssl_timeout
is_singleton: false
name: ssl_timeout
params: ()
visibility: public
ri/1.8/system/Net/HTTP/proxy_pass-i.yaml000064400000000433150403644320013637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: User password for accessing proxy. If self does not use a proxy, nil.
full_name: Net::HTTP#proxy_pass
is_singleton: false
name: proxy_pass
params: ()
visibility: public
ri/1.8/system/Net/HTTP/http_default_port-c.yaml000064400000000436150403644330015155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default port to use for HTTP requests; defaults to 80.
full_name: Net::HTTP::http_default_port
is_singleton: true
name: http_default_port
params: ()
visibility: public
ri/1.8/system/Net/HTTP/Lock/cdesc-Lock.yaml000064400000000661150403644340014046 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'LOCK'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Lock
includes: []

instance_methods: []

name: Lock
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/set_debug_output-i.yaml000064400000001014150403644350015010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <b>WARNING</b> This method causes serious security hole. Never use this method in production code.
- !ruby/struct:SM::Flow::P 
  body: Set an output stream for debugging.
- !ruby/struct:SM::Flow::VERB 
  body: "  http = Net::HTTP.new\n  http.set_debug_output $stderr\n  http.start { .... }\n"
full_name: Net::HTTP#set_debug_output
is_singleton: false
name: set_debug_output
params: (output)
visibility: public
ri/1.8/system/Net/HTTP/use_ssl%3f-i.yaml000064400000000255150403644360013411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#use_ssl?
is_singleton: false
name: use_ssl?
params: ()
visibility: public
ri/1.8/system/Net/HTTP/default_port-c.yaml000064400000000424150403644370014117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default port to use for HTTP requests; defaults to 80.
full_name: Net::HTTP::default_port
is_singleton: true
name: default_port
params: ()
visibility: public
ri/1.8/system/Net/HTTP/request_head-i.yaml000064400000001177150403644370014114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: head2
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a HEAD request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: Returns the response.
- !ruby/struct:SM::Flow::P 
  body: This method never raises Net::* exceptions.
- !ruby/struct:SM::Flow::VERB 
  body: "    response = http.request_head('/index.html')\n    p response['content-type']\n"
full_name: Net::HTTP#request_head
is_singleton: false
name: request_head
params: (path, initheader = nil, &block)
visibility: public
ri/1.8/system/Net/HTTP/use_ssl-i.yaml000064400000000345150403644400013106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #use_ssl?"
full_name: Net::HTTP#use_ssl
is_singleton: false
name: use_ssl
params: ()
visibility: public
ri/1.8/system/Net/HTTP/peer_cert-i.yaml000064400000000257150403644410013404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#peer_cert
is_singleton: false
name: peer_cert
params: ()
visibility: public
ri/1.8/system/Net/HTTP/conn_port-i.yaml000064400000000260150403644420013430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#conn_port
is_singleton: false
name: conn_port
params: ()
visibility: private
ri/1.8/system/Net/HTTP/do_start-i.yaml000064400000000256150403644430013254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#do_start
is_singleton: false
name: do_start
params: ()
visibility: private
ri/1.8/system/Net/HTTP/head-i.yaml000064400000001556150403644430012342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets only the header from <tt>path</tt> on the connected-to host. <tt>header</tt> is a Hash like { 'Accept' =&gt; '*/*', ... }.
- !ruby/struct:SM::Flow::P 
  body: This method returns a Net::HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: In version 1.1, this method might raise an exception for 3xx (redirect). On the case you can get a HTTPResponse object by &quot;anException.response&quot;. In version 1.2, this method never raises an exception.
- !ruby/struct:SM::Flow::VERB 
  body: "    response = nil\n    Net::HTTP.start('some.www.server', 80) {|http|\n      response = http.head('/index.html')\n    }\n    p response['content-type']\n"
full_name: Net::HTTP#head
is_singleton: false
name: head
params: (path, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/Options/cdesc-Options.yaml000064400000000674150403644440015361 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'OPTIONS'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "false"
full_name: Net::HTTP::Options
includes: []

instance_methods: []

name: Options
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/Head/cdesc-Head.yaml000064400000000663150403644450013774 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'HEAD'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "false"
full_name: Net::HTTP::Head
includes: []

instance_methods: []

name: Head
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/delete-i.yaml000064400000000523150403644450012676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a DELETE request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#delete
is_singleton: false
name: delete
params: (path, initheader = {'Depth' => 'Infinity'})
visibility: public
ri/1.8/system/Net/HTTP/post2-i.yaml000064400000000401150403644460012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #request_post"
full_name: Net::HTTP#post2
is_singleton: false
name: post2
params: (path, data, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/proppatch-i.yaml000064400000000516150403644460013437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a PROPPATCH request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#proppatch
is_singleton: false
name: proppatch
params: (path, body, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/on_connect-i.yaml000064400000000262150403644470013563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#on_connect
is_singleton: false
name: on_connect
params: ()
visibility: private
ri/1.8/system/Net/HTTP/conn_address-i.yaml000064400000000350150403644500014070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: without proxy
full_name: Net::HTTP#conn_address
is_singleton: false
name: conn_address
params: ()
visibility: private
ri/1.8/system/Net/HTTP/Propfind/cdesc-Propfind.yaml000064400000000774150403644510015634 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: WebDAV methods --- RFC2518
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'PROPFIND'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Propfind
includes: []

instance_methods: []

name: Propfind
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/active%3f-i.yaml000064400000000345150403644510013204 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #started?"
full_name: Net::HTTP#active?
is_singleton: false
name: active?
params: ()
visibility: public
ri/1.8/system/Net/HTTP/proxy_port-i.yaml000064400000000500150403644510013651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: proxyport
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Port number of proxy host. If self does not use a proxy, nil.
full_name: Net::HTTP#proxy_port
is_singleton: false
name: proxy_port
params: ()
visibility: public
ri/1.8/system/Net/HTTP/unlock-i.yaml000064400000000505150403644510012724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a UNLOCK request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#unlock
is_singleton: false
name: unlock
params: (path, body, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/post-i.yaml000064400000003421150403644510012416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: +body_segment+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Posts <tt>data</tt> (must be a String) to <tt>path</tt>. <tt>header</tt> must be a Hash like { 'Accept' =&gt; '*/*', ... }.
- !ruby/struct:SM::Flow::P 
  body: In version 1.1 (ruby 1.6), this method returns a pair of objects, a Net::HTTPResponse object and an entity body string. In version 1.2 (ruby 1.8), this method returns a Net::HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: If called with a block, yields each fragment of the entity body in turn as a string as it are read from the socket. Note that in this case, the returned response object will <b>not</b> contain a (meaningful) body.
- !ruby/struct:SM::Flow::P 
  body: <tt>dest</tt> argument is obsolete. It still works but you must not use it.
- !ruby/struct:SM::Flow::P 
  body: In version 1.1, this method might raise an exception for 3xx (redirect). In this case you can get an HTTPResponse object by &quot;anException.response&quot;. In version 1.2, this method never raises exception.
- !ruby/struct:SM::Flow::VERB 
  body: "    # version 1.1\n    response, body = http.post('/cgi-bin/search.rb', 'query=foo')\n\n    # version 1.2\n    response = http.post('/cgi-bin/search.rb', 'query=foo')\n\n    # using block\n    File.open('result.txt', 'w') {|f|\n      http.post('/cgi-bin/search.rb', 'query=foo') do |str|\n        f.write str\n      end\n    }\n"
- !ruby/struct:SM::Flow::P 
  body: "You should set Content-Type: header field for POST. If no Content-Type: field given, this method uses &quot;application/x-www-form-urlencoded&quot; by default."
full_name: Net::HTTP#post
is_singleton: false
name: post
params: (path, data, initheader = nil, dest = nil) {|+body_segment+| ...}
visibility: public
ri/1.8/system/Net/HTTP/send_request-i.yaml000064400000001147150403644510014135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends an HTTP request to the HTTP server. This method also sends DATA string if DATA is given.
- !ruby/struct:SM::Flow::P 
  body: Returns a HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: This method never raises Net::* exceptions.
- !ruby/struct:SM::Flow::VERB 
  body: "   response = http.send_request('GET', '/index.html')\n   puts response.body\n"
full_name: Net::HTTP#send_request
is_singleton: false
name: send_request
params: (name, path, data = nil, header = nil)
visibility: public
ri/1.8/system/Net/HTTP/D-i.yaml000064400000000243150403644510011613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#D
is_singleton: false
name: D
params: (msg)
visibility: private
ri/1.8/system/Net/HTTP/get-c.yaml000064400000001246150403644510012205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Send a GET request to the target and return the response as a string. The target can either be specified as (<tt>uri</tt>), or as (<tt>host</tt>, <tt>path</tt>, <tt>port</tt> = 80); so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   print Net::HTTP.get(URI.parse('http://www.example.com/index.html'))\n"
- !ruby/struct:SM::Flow::P 
  body: "or:"
- !ruby/struct:SM::Flow::VERB 
  body: "   print Net::HTTP.get('www.example.com', '/index.html')\n"
full_name: Net::HTTP::get
is_singleton: true
name: get
params: (uri_or_host, path = nil, port = nil)
visibility: public
ri/1.8/system/Net/HTTP/get-i.yaml000064400000003131150403644510012206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: +body_segment+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets data from <tt>path</tt> on the connected-to host. <tt>header</tt> must be a Hash like { 'Accept' =&gt; '*/*', ... }.
- !ruby/struct:SM::Flow::P 
  body: In version 1.1 (ruby 1.6), this method returns a pair of objects, a Net::HTTPResponse object and the entity body string. In version 1.2 (ruby 1.8), this method returns a Net::HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: 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 <b>not</b> contain a (meaningful) body.
- !ruby/struct:SM::Flow::P 
  body: <tt>dest</tt> argument is obsolete. It still works but you must not use it.
- !ruby/struct:SM::Flow::P 
  body: In version 1.1, this method might raise an exception for 3xx (redirect). In this case you can get a HTTPResponse object by &quot;anException.response&quot;.
- !ruby/struct:SM::Flow::P 
  body: In version 1.2, this method never raises exception.
- !ruby/struct:SM::Flow::VERB 
  body: "    # version 1.1 (bundled with Ruby 1.6)\n    response, body = http.get('/index.html')\n\n    # version 1.2 (bundled with Ruby 1.8 or later)\n    response = http.get('/index.html')\n\n    # using block\n    File.open('result.txt', 'w') {|f|\n      http.get('/~foo/') do |str|\n        f.write str\n      end\n    }\n"
full_name: Net::HTTP#get
is_singleton: false
name: get
params: (path, initheader = nil, dest = nil) {|+body_segment+| ...}
visibility: public
ri/1.8/system/Net/HTTP/inspect-i.yaml000064400000000253150403644510013076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Net/HTTP/finish-i.yaml000064400000000435150403644510012713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finishes HTTP session and closes TCP connection. Raises IOError if not started.
full_name: Net::HTTP#finish
is_singleton: false
name: finish
params: ()
visibility: public
ri/1.8/system/Net/HTTP/end_transport-i.yaml000064400000000300150403644520014305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#end_transport
is_singleton: false
name: end_transport
params: (req, res)
visibility: private
ri/1.8/system/Net/HTTP/ssl_context_accessor-c.yaml000064400000000311150403644520015646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP::ssl_context_accessor
is_singleton: true
name: ssl_context_accessor
params: (name)
visibility: public
ri/1.8/system/Net/HTTP/trace-i.yaml000064400000000474150403644520012535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a TRACE request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#trace
is_singleton: false
name: trace
params: (path, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/new-c.yaml000064400000000513150403644520012214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Net::HTTP object for the specified <tt>address</tt>. This method does not open the TCP connection.
full_name: Net::HTTP::new
is_singleton: true
name: new
params: (address, port = nil)
visibility: public
ri/1.8/system/Net/HTTP/version_1_1%3f-c.yaml000064400000000437150403644530014054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if net/http is in version 1.1 compatible mode. Defaults to true.
full_name: Net::HTTP::version_1_1?
is_singleton: true
name: version_1_1?
params: ()
visibility: public
ri/1.8/system/Net/HTTP/request_get-i.yaml000064400000002156150403644530013766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: get2
block_params: +response+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a GET request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: When called with a block, yields an HTTPResponse object. The body of this response will not have been read yet; the caller can process it using HTTPResponse#read_body, if desired.
- !ruby/struct:SM::Flow::P 
  body: Returns the response.
- !ruby/struct:SM::Flow::P 
  body: This method never raises Net::* exceptions.
- !ruby/struct:SM::Flow::VERB 
  body: "    response = http.request_get('/index.html')\n    # The entity body is already read here.\n    p response['content-type']\n    puts response.body\n\n    # using block\n    http.request_get('/index.html') {|response|\n      p response['content-type']\n      response.read_body do |str|   # read body now\n        print str\n      end\n    }\n"
full_name: Net::HTTP#request_get
is_singleton: false
name: request_get
params: (path, initheader = nil) {|+response+| ...}
visibility: public
ri/1.8/system/Net/HTTP/copy-i.yaml000064400000000471150403644530012407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a COPY request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#copy
is_singleton: false
name: copy
params: (path, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/request_post-i.yaml000064400000002274150403644530014175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: post2
block_params: +response+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a POST request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: When called with a block, yields an HTTPResponse object. The body of this response will not have been read yet; the caller can process it using HTTPResponse#read_body, if desired.
- !ruby/struct:SM::Flow::P 
  body: Returns the response.
- !ruby/struct:SM::Flow::P 
  body: This method never raises Net::* exceptions.
- !ruby/struct:SM::Flow::VERB 
  body: "    # example\n    response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')\n    p response.status\n    puts response.body          # body is already read\n\n    # using block\n    http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|\n      p response.status\n      p response['content-type']\n      response.read_body do |str|   # read body now\n        print str\n      end\n    }\n"
full_name: Net::HTTP#request_post
is_singleton: false
name: request_post
params: (path, data, initheader = nil) {|+response+| ...}
visibility: public
ri/1.8/system/Net/HTTP/request-i.yaml000064400000001432150403644540013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: +response+
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends an HTTPRequest object REQUEST to the HTTP server. This method also sends DATA string if REQUEST is a post/put request. Giving DATA for get/head request causes ArgumentError.
- !ruby/struct:SM::Flow::P 
  body: When called with a block, yields an HTTPResponse object. The body of this response will not have been read yet; the caller can process it using HTTPResponse#read_body, if desired.
- !ruby/struct:SM::Flow::P 
  body: Returns a HTTPResponse object.
- !ruby/struct:SM::Flow::P 
  body: This method never raises Net::* exceptions.
full_name: Net::HTTP#request
is_singleton: false
name: request
params: (req, body = nil) {|+response+| ...}
visibility: public
ri/1.8/system/Net/HTTP/start-i.yaml000064400000001063150403644540012571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: http
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens TCP connection and HTTP session.
- !ruby/struct:SM::Flow::P 
  body: When this method is called with block, gives a HTTP object to the block and closes the TCP connection / HTTP session after the block executed.
- !ruby/struct:SM::Flow::P 
  body: When called with a block, returns the return value of the block; otherwise, returns self.
full_name: Net::HTTP#start
is_singleton: false
name: start
params: ( {|http| ...}
visibility: public
ri/1.8/system/Net/HTTP/https_default_port-c.yaml000064400000000442150403644540015340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default port to use for HTTPS requests; defaults to 443.
full_name: Net::HTTP::https_default_port
is_singleton: true
name: https_default_port
params: ()
visibility: public
ri/1.8/system/Net/HTTP/Post/cdesc-Post.yaml000064400000000661150403644540014142 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'POST'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Post
includes: []

instance_methods: []

name: Post
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/begin_transport-i.yaml000064400000000277150403644540014642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#begin_transport
is_singleton: false
name: begin_transport
params: (req)
visibility: private
ri/1.8/system/Net/HTTP/Mkcol/cdesc-Mkcol.yaml000064400000000664150403644540014405 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'MKCOL'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Mkcol
includes: []

instance_methods: []

name: Mkcol
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/addr_port-i.yaml000064400000000332150403644540013410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: utils
full_name: Net::HTTP#addr_port
is_singleton: false
name: addr_port
params: ()
visibility: private
ri/1.8/system/Net/HTTP/timeout%3d-i.yaml000064400000000356150403644540013422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #ssl_timeout="
full_name: Net::HTTP#timeout=
is_singleton: false
name: timeout=
params: (sec)
visibility: public
ri/1.8/system/Net/HTTP/proxy_class%3f-c.yaml000064400000000433150403644540014272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns true if self is a class which was created by HTTP::Proxy.
full_name: Net::HTTP::proxy_class?
is_singleton: true
name: proxy_class?
params: ()
visibility: public
ri/1.8/system/Net/HTTP/proxyaddr-i.yaml000064400000000356150403644540013454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #proxy_address"
full_name: Net::HTTP#proxyaddr
is_singleton: false
name: proxyaddr
params: ()
visibility: public
ri/1.8/system/Net/HTTP/Proppatch/cdesc-Proppatch.yaml000064400000000700150403644550016163 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'PROPPATCH'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Proppatch
includes: []

instance_methods: []

name: Proppatch
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/Get/cdesc-Get.yaml000064400000000760150403644550013527 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: HTTP 1.1 methods --- RFC2616
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'GET'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Get
includes: []

instance_methods: []

name: Get
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/edit_path-i.yaml000064400000000264150403644550013400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#edit_path
is_singleton: false
name: edit_path
params: (path)
visibility: private
ri/1.8/system/Net/HTTP/mkcol-i.yaml000064400000000510150403644550012536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a MKCOL request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#mkcol
is_singleton: false
name: mkcol
params: (path, body = nil, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/read_timeout%3d-i.yaml000064400000000405150403644560014412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Setter for the read_timeout attribute.
full_name: Net::HTTP#read_timeout=
is_singleton: false
name: read_timeout=
params: (sec)
visibility: public
ri/1.8/system/Net/HTTP/version_1_2%3f-c.yaml000064400000000424150403644560014054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: true if net/http is in version 1.2 mode. Defaults to true.
full_name: Net::HTTP::version_1_2?
is_singleton: true
name: version_1_2?
params: ()
visibility: public
ri/1.8/system/Net/HTTP/version_1_1-c.yaml000064400000000437150403644570013562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Turns on net/http 1.1 (ruby 1.6) features. Defaults to OFF in ruby 1.8.
full_name: Net::HTTP::version_1_1
is_singleton: true
name: version_1_1
params: ()
visibility: public
ri/1.8/system/Net/HTTP/keep_alive%3f-i.yaml000064400000000274150403644570014044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#keep_alive?
is_singleton: false
name: keep_alive?
params: (req, res)
visibility: private
ri/1.8/system/Net/HTTP/options-i.yaml000064400000000502150403644570013127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a OPTIONS request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#options
is_singleton: false
name: options
params: (path, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/do_finish-i.yaml000064400000000260150403644570013377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::HTTP#do_finish
is_singleton: false
name: do_finish
params: ()
visibility: private
ri/1.8/system/Net/HTTP/lock-i.yaml000064400000000477150403644600012371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a LOCK request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#lock
is_singleton: false
name: lock
params: (path, body, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/get2-i.yaml000064400000000370150403644600012272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #request_get"
full_name: Net::HTTP#get2
is_singleton: false
name: get2
params: (path, initheader = nil)
visibility: public
ri/1.8/system/Net/HTTP/cdesc-HTTP.yaml000064400000033763150403644610013056 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The host name to connect to.
  name: address
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: close_on_empty_response
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Seconds to wait until connection is opened. If the HTTP object cannot open a connection in this many seconds, it raises a TimeoutError exception.
  name: open_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The port number to connect to.
  name: port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: proxy_address
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: proxy_pass
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: proxy_port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: proxy_user
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Seconds to wait until reading one block (by one read(2) call). If the HTTP object cannot open a connection in this many seconds, it raises a TimeoutError exception.
  name: read_timeout
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: Proxy
- !ruby/object:RI::MethodSummary 
  name: default_port
- !ruby/object:RI::MethodSummary 
  name: get
- !ruby/object:RI::MethodSummary 
  name: get_print
- !ruby/object:RI::MethodSummary 
  name: get_response
- !ruby/object:RI::MethodSummary 
  name: http_default_port
- !ruby/object:RI::MethodSummary 
  name: https_default_port
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: post_form
- !ruby/object:RI::MethodSummary 
  name: proxy_class?
- !ruby/object:RI::MethodSummary 
  name: ssl_context_accessor
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: version_1_1
- !ruby/object:RI::MethodSummary 
  name: version_1_1?
- !ruby/object:RI::MethodSummary 
  name: version_1_2
- !ruby/object:RI::MethodSummary 
  name: version_1_2?
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: What Is This Library?
- !ruby/struct:SM::Flow::P 
  body: This library provides your program functions to access WWW documents via HTTP, Hyper Text Transfer Protocol version 1.1. For details of HTTP, refer [RFC2616] (http://www.ietf.org/rfc/rfc2616.txt).
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Getting Document From WWW Server
- !ruby/struct:SM::Flow::P 
  body: "Example #1: Simple GET+print"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n    Net::HTTP.get_print 'www.example.com', '/index.html'\n"
- !ruby/struct:SM::Flow::P 
  body: "Example #2: Simple GET+print by URL"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n    require 'uri'\n    Net::HTTP.get_print URI.parse('http://www.example.com/index.html')\n"
- !ruby/struct:SM::Flow::P 
  body: "Example #3: More generic GET+print"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n    require 'uri'\n\n    url = URI.parse('http://www.example.com/index.html')\n    res = Net::HTTP.start(url.host, url.port) {|http|\n      http.get('/index.html')\n    }\n    puts res.body\n"
- !ruby/struct:SM::Flow::P 
  body: "Example #4: More generic GET+print"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n\n    url = URI.parse('http://www.example.com/index.html')\n    req = Net::HTTP::Get.new(url.path)\n    res = Net::HTTP.start(url.host, url.port) {|http|\n      http.request(req)\n    }\n    puts res.body\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Posting Form Data
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n    require 'uri'\n\n    #1: Simple POST\n    res = Net::HTTP.post_form(URI.parse('http://www.example.com/search.cgi'),\n                              {'q'=&gt;'ruby', 'max'=&gt;'50'})\n    puts res.body\n\n    #2: POST with basic authentication\n    res = Net::HTTP.post_form(URI.parse('http://jack:pass@www.example.com/todo.cgi'),\n                                        {'from'=&gt;'2005-01-01', 'to'=&gt;'2005-03-31'})\n    puts res.body\n\n    #3: Detailed control\n    url = URI.parse('http://www.example.com/todo.cgi')\n    req = Net::HTTP::Post.new(url.path)\n    req.basic_auth 'jack', 'pass'\n    req.set_form_data({'from'=&gt;'2005-01-01', 'to'=&gt;'2005-03-31'}, ';')\n    res = Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }\n    case res\n    when Net::HTTPSuccess, Net::HTTPRedirection\n      # OK\n    else\n      res.error!\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Accessing via Proxy
- !ruby/struct:SM::Flow::P 
  body: Net::HTTP.Proxy creates http proxy class. It has same methods of Net::HTTP but its instances always connect to proxy, instead of given host.
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n\n    proxy_addr = 'your.proxy.host'\n    proxy_port = 8080\n            :\n    Net::HTTP::Proxy(proxy_addr, proxy_port).start('www.example.com') {|http|\n      # always connect to your.proxy.addr:8080\n            :\n    }\n"
- !ruby/struct:SM::Flow::P 
  body: Since Net::HTTP.Proxy returns Net::HTTP itself when proxy_addr is nil, there's no need to change code if there's proxy or not.
- !ruby/struct:SM::Flow::P 
  body: "There are two additional parameters in Net::HTTP.Proxy which allow to specify proxy user name and password:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::HTTP::Proxy(proxy_addr, proxy_port, proxy_user = nil, proxy_pass = nil)\n"
- !ruby/struct:SM::Flow::P 
  body: "You may use them to work with authorization-enabled proxies:"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n    require 'uri'\n\n    proxy_host = 'your.proxy.host'\n    proxy_port = 8080\n    uri = URI.parse(ENV['http_proxy'])\n    proxy_user, proxy_pass = uri.userinfo.split(/:/) if uri.userinfo\n    Net::HTTP::Proxy(proxy_host, proxy_port,\n                     proxy_user, proxy_pass).start('www.example.com') {|http|\n      # always connect to your.proxy.addr:8080 using specified username and password\n            :\n    }\n"
- !ruby/struct:SM::Flow::P 
  body: Note that net/http never rely on HTTP_PROXY environment variable. If you want to use proxy, set it explicitly.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Following Redirection
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n    require 'uri'\n\n    def fetch(uri_str, limit = 10)\n      # You should choose better exception.\n      raise ArgumentError, 'HTTP redirect too deep' if limit == 0\n\n      response = Net::HTTP.get_response(URI.parse(uri_str))\n      case response\n      when Net::HTTPSuccess     then response\n      when Net::HTTPRedirection then fetch(response['location'], limit - 1)\n      else\n        response.error!\n      end\n    end\n\n    print fetch('http://www.ruby-lang.org')\n"
- !ruby/struct:SM::Flow::P 
  body: Net::HTTPSuccess and Net::HTTPRedirection is a HTTPResponse class. All HTTPResponse objects belong to its own response class which indicate HTTP result status. For details of response classes, see section &quot;HTTP Response Classes&quot;.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Basic Authentication
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/http'\n\n    Net::HTTP.start('www.example.com') {|http|\n      req = Net::HTTP::Get.new('/secret-page.html')\n      req.basic_auth 'account', 'password'\n      response = http.request(req)\n      print response.body\n    }\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: HTTP Request Classes
- !ruby/struct:SM::Flow::P 
  body: Here is HTTP request class hierarchy.
- !ruby/struct:SM::Flow::VERB 
  body: "  Net::HTTPRequest\n      Net::HTTP::Get\n      Net::HTTP::Head\n      Net::HTTP::Post\n      Net::HTTP::Put\n      Net::HTTP::Proppatch\n      Net::HTTP::Lock\n      Net::HTTP::Unlock\n      Net::HTTP::Options\n      Net::HTTP::Propfind\n      Net::HTTP::Delete\n      Net::HTTP::Move\n      Net::HTTP::Copy\n      Net::HTTP::Mkcol\n      Net::HTTP::Trace\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: HTTP Response Classes
- !ruby/struct:SM::Flow::P 
  body: Here is HTTP response class hierarchy. All classes are defined in Net module.
- !ruby/struct:SM::Flow::VERB 
  body: "  HTTPResponse\n      HTTPUnknownResponse\n      HTTPInformation                    # 1xx\n          HTTPContinue                       # 100\n          HTTPSwitchProtocl                  # 101\n      HTTPSuccess                        # 2xx\n          HTTPOK                             # 200\n          HTTPCreated                        # 201\n          HTTPAccepted                       # 202\n          HTTPNonAuthoritativeInformation    # 203\n          HTTPNoContent                      # 204\n          HTTPResetContent                   # 205\n          HTTPPartialContent                 # 206\n      HTTPRedirection                    # 3xx\n          HTTPMultipleChoice                 # 300\n          HTTPMovedPermanently               # 301\n          HTTPFound                          # 302\n          HTTPSeeOther                       # 303\n          HTTPNotModified                    # 304\n          HTTPUseProxy                       # 305\n          HTTPTemporaryRedirect              # 307\n      HTTPClientError                    # 4xx\n          HTTPBadRequest                     # 400\n          HTTPUnauthorized                   # 401\n          HTTPPaymentRequired                # 402\n          HTTPForbidden                      # 403\n          HTTPNotFound                       # 404\n          HTTPMethodNotAllowed               # 405\n          HTTPNotAcceptable                  # 406\n          HTTPProxyAuthenticationRequired    # 407\n          HTTPRequestTimeOut                 # 408\n          HTTPConflict                       # 409\n          HTTPGone                           # 410\n          HTTPLengthRequired                 # 411\n          HTTPPreconditionFailed             # 412\n          HTTPRequestEntityTooLarge          # 413\n          HTTPRequestURITooLong              # 414\n          HTTPUnsupportedMediaType           # 415\n          HTTPRequestedRangeNotSatisfiable   # 416\n          HTTPExpectationFailed              # 417\n      HTTPServerError                    # 5xx\n          HTTPInternalServerError            # 500\n          HTTPNotImplemented                 # 501\n          HTTPBadGateway                     # 502\n          HTTPServiceUnavailable             # 503\n          HTTPGatewayTimeOut                 # 504\n          HTTPVersionNotSupported            # 505\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Switching Net::HTTP versions
- !ruby/struct:SM::Flow::P 
  body: You can use net/http.rb 1.1 features (bundled with Ruby 1.6) by calling HTTP.version_1_1. Calling Net::HTTP.version_1_2 allows you to use 1.2 features again.
- !ruby/struct:SM::Flow::VERB 
  body: "    # example\n    Net::HTTP.start {|http1| ...(http1 has 1.2 features)... }\n\n    Net::HTTP.version_1_1\n    Net::HTTP.start {|http2| ...(http2 has 1.1 features)... }\n\n    Net::HTTP.version_1_2\n    Net::HTTP.start {|http3| ...(http3 has 1.2 features)... }\n"
- !ruby/struct:SM::Flow::P 
  body: This function is NOT thread-safe.
constants: []

full_name: Net::HTTP
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: D
- !ruby/object:RI::MethodSummary 
  name: active?
- !ruby/object:RI::MethodSummary 
  name: addr_port
- !ruby/object:RI::MethodSummary 
  name: begin_transport
- !ruby/object:RI::MethodSummary 
  name: conn_address
- !ruby/object:RI::MethodSummary 
  name: conn_port
- !ruby/object:RI::MethodSummary 
  name: connect
- !ruby/object:RI::MethodSummary 
  name: copy
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: do_finish
- !ruby/object:RI::MethodSummary 
  name: do_start
- !ruby/object:RI::MethodSummary 
  name: edit_path
- !ruby/object:RI::MethodSummary 
  name: end_transport
- !ruby/object:RI::MethodSummary 
  name: finish
- !ruby/object:RI::MethodSummary 
  name: get
- !ruby/object:RI::MethodSummary 
  name: get2
- !ruby/object:RI::MethodSummary 
  name: head
- !ruby/object:RI::MethodSummary 
  name: head2
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: keep_alive?
- !ruby/object:RI::MethodSummary 
  name: lock
- !ruby/object:RI::MethodSummary 
  name: mkcol
- !ruby/object:RI::MethodSummary 
  name: move
- !ruby/object:RI::MethodSummary 
  name: on_connect
- !ruby/object:RI::MethodSummary 
  name: options
- !ruby/object:RI::MethodSummary 
  name: peer_cert
- !ruby/object:RI::MethodSummary 
  name: post
- !ruby/object:RI::MethodSummary 
  name: post2
- !ruby/object:RI::MethodSummary 
  name: propfind
- !ruby/object:RI::MethodSummary 
  name: proppatch
- !ruby/object:RI::MethodSummary 
  name: proxy?
- !ruby/object:RI::MethodSummary 
  name: proxy_address
- !ruby/object:RI::MethodSummary 
  name: proxy_pass
- !ruby/object:RI::MethodSummary 
  name: proxy_port
- !ruby/object:RI::MethodSummary 
  name: proxy_user
- !ruby/object:RI::MethodSummary 
  name: proxyaddr
- !ruby/object:RI::MethodSummary 
  name: proxyport
- !ruby/object:RI::MethodSummary 
  name: read_timeout=
- !ruby/object:RI::MethodSummary 
  name: request
- !ruby/object:RI::MethodSummary 
  name: request_get
- !ruby/object:RI::MethodSummary 
  name: request_head
- !ruby/object:RI::MethodSummary 
  name: request_post
- !ruby/object:RI::MethodSummary 
  name: send_request
- !ruby/object:RI::MethodSummary 
  name: set_debug_output
- !ruby/object:RI::MethodSummary 
  name: ssl_timeout
- !ruby/object:RI::MethodSummary 
  name: ssl_timeout=
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: started?
- !ruby/object:RI::MethodSummary 
  name: timeout=
- !ruby/object:RI::MethodSummary 
  name: trace
- !ruby/object:RI::MethodSummary 
  name: unlock
- !ruby/object:RI::MethodSummary 
  name: use_ssl
- !ruby/object:RI::MethodSummary 
  name: use_ssl=
- !ruby/object:RI::MethodSummary 
  name: use_ssl?
- !ruby/object:RI::MethodSummary 
  name: use_ssl?
name: HTTP
superclass: Protocol
ri/1.8/system/Net/HTTP/Delete/cdesc-Delete.yaml000064400000000670150403644610014672 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'DELETE'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Delete
includes: []

instance_methods: []

name: Delete
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/use_ssl%3d-i.yaml000064400000000553150403644620013407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::HTTP#use_ssl=
is_singleton: false
name: use_ssl=
params: (flag)
visibility: public
ri/1.8/system/Net/HTTP/Trace/cdesc-Trace.yaml000064400000000665150403644630014370 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'TRACE'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Trace
includes: []

instance_methods: []

name: Trace
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/propfind-i.yaml000064400000000536150403644630013261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends a PROPFIND request to the <tt>path</tt> and gets a response, as an HTTPResponse object.
full_name: Net::HTTP#propfind
is_singleton: false
name: propfind
params: (path, body = nil, initheader = {'Depth' => '0'})
visibility: public
ri/1.8/system/Net/HTTP/ssl_timeout%3d-i.yaml000064400000000344150403644640014301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: timeout=
block_params: 
comment: 
full_name: Net::HTTP#ssl_timeout=
is_singleton: false
name: ssl_timeout=
params: (sec)
visibility: public
ri/1.8/system/Net/HTTP/start-c.yaml000064400000001342150403644650012565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: +http+
comment: 
- !ruby/struct:SM::Flow::P 
  body: creates a new Net::HTTP object and opens its TCP connection and HTTP session. 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.
full_name: Net::HTTP::start
is_singleton: true
name: start
params: (address, port = nil, p_addr = nil, p_port = nil, p_user = nil, p_pass = nil) {|+http+| ...}
visibility: public
ri/1.8/system/Net/HTTP/get_print-c.yaml000064400000001233150403644650013422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Get body from target and output it to +$stdout+. The target can either be specified as (<tt>uri</tt>), or as (<tt>host</tt>, <tt>path</tt>, <tt>port</tt> = 80); so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   Net::HTTP.get_print URI.parse('http://www.example.com/index.html')\n"
- !ruby/struct:SM::Flow::P 
  body: "or:"
- !ruby/struct:SM::Flow::VERB 
  body: "   Net::HTTP.get_print 'www.example.com', '/index.html'\n"
full_name: Net::HTTP::get_print
is_singleton: true
name: get_print
params: (uri_or_host, path = nil, port = nil)
visibility: public
ri/1.8/system/Net/HTTP/Copy/cdesc-Copy.yaml000064400000000662150403644660014120 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'COPY'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Copy
includes: []

instance_methods: []

name: Copy
superclass: HTTPRequest
ri/1.8/system/Net/HTTP/proxy_address-i.yaml000064400000000502150403644670014323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: proxyaddr
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Address of proxy host. If self does not use a proxy, nil.
full_name: Net::HTTP#proxy_address
is_singleton: false
name: proxy_address
params: ()
visibility: public
ri/1.8/system/Net/HTTP/version_1_2-c.yaml000064400000000714150403644670013562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Turns on net/http 1.2 (ruby 1.8) features. Defaults to ON in ruby 1.8.
- !ruby/struct:SM::Flow::P 
  body: I strongly recommend to call this method always.
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'net/http'\n  Net::HTTP.version_1_2\n"
full_name: Net::HTTP::version_1_2
is_singleton: true
name: version_1_2
params: ()
visibility: public
ri/1.8/system/Net/HTTP/Proxy-c.yaml000064400000001443150403644700012547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates an HTTP proxy class. Arguments are address/port of proxy host and username/password if authorization on proxy server is required. You can replace the HTTP class with created proxy class.
- !ruby/struct:SM::Flow::P 
  body: If ADDRESS is nil, this method returns self (Net::HTTP).
- !ruby/struct:SM::Flow::VERB 
  body: "    # Example\n    proxy_class = Net::HTTP::Proxy('proxy.example.com', 8080)\n                    :\n    proxy_class.start('www.ruby-lang.org') {|http|\n      # connecting proxy.foo.org:8080\n                    :\n    }\n"
full_name: Net::HTTP::Proxy
is_singleton: true
name: Proxy
params: (p_addr, p_port = nil, p_user = nil, p_pass = nil)
visibility: public
ri/1.8/system/Net/HTTP/post_form-c.yaml000064400000001604150403644700013435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Posts HTML form data to the <tt>URL</tt>. Form data must be represented as a Hash of String to String, e.g:"
- !ruby/struct:SM::Flow::VERB 
  body: "  { &quot;cmd&quot; =&gt; &quot;search&quot;, &quot;q&quot; =&gt; &quot;ruby&quot;, &quot;max&quot; =&gt; &quot;50&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: This method also does Basic Authentication iff <tt>URL</tt>.user exists.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'net/http'\n  require 'uri'\n\n  HTTP.post_form URI.parse('http://www.example.com/search.cgi'),\n                 { &quot;q&quot; =&gt; &quot;ruby&quot;, &quot;max&quot; =&gt; &quot;50&quot; }\n"
full_name: Net::HTTP::post_form
is_singleton: true
name: post_form
params: (url, params)
visibility: public
ri/1.8/system/Net/HTTP/proxy%3f-i.yaml000064400000000361150403644700013111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: True if self is a HTTP proxy class.
full_name: Net::HTTP#proxy?
is_singleton: false
name: proxy?
params: ()
visibility: public
ri/1.8/system/Net/HTTP/Unlock/cdesc-Unlock.yaml000064400000000667150403644700014762 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD
  value: "'UNLOCK'"
- !ruby/object:RI::Constant 
  comment: 
  name: REQUEST_HAS_BODY
  value: "true"
- !ruby/object:RI::Constant 
  comment: 
  name: RESPONSE_HAS_BODY
  value: "true"
full_name: Net::HTTP::Unlock
includes: []

instance_methods: []

name: Unlock
superclass: HTTPRequest
ri/1.8/system/Net/POP3/started%3f-i.yaml000064400000000453150403644710013343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: active?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>true</tt> if the POP3 session has started.
full_name: Net::POP3#started?
is_singleton: false
name: started?
params: ()
visibility: public
ri/1.8/system/Net/POP3/each-i.yaml000064400000000340150403644710012272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #each_mail"
full_name: Net::POP3#each
is_singleton: false
name: each
params: ()
visibility: public
ri/1.8/system/Net/POP3/enable_ssl-c.yaml000064400000000527150403644720013503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Enable SSL for all new instances. <tt>params</tt> is passed to OpenSSL::SSLContext#set_params.
full_name: Net::POP3::enable_ssl
is_singleton: true
name: enable_ssl
params: |
  Net::POP.enable_ssl(params = {})

visibility: public
ri/1.8/system/Net/POP3/disable_ssl-i.yaml000064400000000263150403644720013663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3#disable_ssl
is_singleton: false
name: disable_ssl
params: ()
visibility: public
ri/1.8/system/Net/POP3/mails-i.yaml000064400000001034150403644720012501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POP3#mails
is_singleton: false
name: mails
params: ()
visibility: public
ri/1.8/system/Net/POP3/default_pop3_port-c.yaml000064400000000423150403644730015021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default port for POP3 connections, port 110
full_name: Net::POP3::default_pop3_port
is_singleton: true
name: default_pop3_port
params: ()
visibility: public
ri/1.8/system/Net/POP3/foreach-c.yaml000064400000001705150403644730013003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: message
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Starts a POP3 session and iterates over each POPMail object, yielding it to the <tt>block</tt>. This method is equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::POP3.start(address, port, account, password) do |pop|\n      pop.each_mail do |m|\n        yield m\n      end\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPAuthenticationError if authentication fails.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::POP3.foreach('pop.example.com', 110,\n                      'YourAccount', 'YourPassword') do |m|\n      file.write m.pop\n      m.delete if $DELETE\n    end\n"
full_name: Net::POP3::foreach
is_singleton: true
name: foreach
params: (address, port = nil, account = nil, password = nil, isapop = false) {|message| ...}
visibility: public
ri/1.8/system/Net/POP3/set_debug_output-i.yaml000064400000001151150403644740014757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "<b>WARNING</b>: This method causes a serious security hole. Use this method only for debugging."
- !ruby/struct:SM::Flow::P 
  body: Set an output stream for debugging.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  pop = Net::POP.new(addr, port)\n  pop.set_debug_output $stderr\n  pop.start(account, passwd) do |pop|\n    ....\n  end\n"
full_name: Net::POP3#set_debug_output
is_singleton: false
name: set_debug_output
params: (arg)
visibility: public
ri/1.8/system/Net/POP3/use_ssl%3f-i.yaml000064400000000355150403644740013356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: does this instance use SSL?
full_name: Net::POP3#use_ssl?
is_singleton: false
name: use_ssl?
params: ()
visibility: public
ri/1.8/system/Net/POP3/n_bytes-i.yaml000064400000000426150403644750013046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the total size in bytes of all the messages on the POP server.
full_name: Net::POP3#n_bytes
is_singleton: false
name: n_bytes
params: ()
visibility: public
ri/1.8/system/Net/POP3/default_port-c.yaml000064400000000352150403644750014063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class Parameters
full_name: Net::POP3::default_port
is_singleton: true
name: default_port
params: ()
visibility: public
ri/1.8/system/Net/POP3/cdesc-POP3.yaml000064400000020450150403644760012755 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The address to connect to.
  name: address
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Seconds to wait until a connection is opened. If the POP3 object cannot open a connection within this time, it raises a TimeoutError exception.
  name: open_timeout
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: 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 TimeoutError exception.
  name: read_timeout
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: APOP
- !ruby/object:RI::MethodSummary 
  name: auth_only
- !ruby/object:RI::MethodSummary 
  name: certs
- !ruby/object:RI::MethodSummary 
  name: create_ssl_params
- !ruby/object:RI::MethodSummary 
  name: default_pop3_port
- !ruby/object:RI::MethodSummary 
  name: default_pop3s_port
- !ruby/object:RI::MethodSummary 
  name: default_port
- !ruby/object:RI::MethodSummary 
  name: delete_all
- !ruby/object:RI::MethodSummary 
  name: disable_ssl
- !ruby/object:RI::MethodSummary 
  name: enable_ssl
- !ruby/object:RI::MethodSummary 
  name: foreach
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: ssl_params
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: use_ssl?
- !ruby/object:RI::MethodSummary 
  name: verify
comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: Net::POP3
- !ruby/struct:SM::Flow::H 
  level: 2
  text: What is This Library?
- !ruby/struct:SM::Flow::P 
  body: 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).
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Retrieving Messages
- !ruby/struct:SM::Flow::P 
  body: This example retrieves messages from the server and deletes them on the server.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/pop'\n\n    pop = Net::POP3.new('pop.example.com')\n    pop.start('YourAccount', 'YourPassword')             # (1)\n    if pop.mails.empty?\n      puts 'No mail.'\n    else\n      i = 0\n      pop.each_mail do |m|   # or &quot;pop.mails.each ...&quot;   # (2)\n        File.open(&quot;inbox/#{i}&quot;, 'w') do |f|\n          f.write m.pop\n        end\n        m.delete\n        i += 1\n      end\n      puts &quot;#{pop.mails.size} mails popped.&quot;\n    end\n    pop.finish                                           # (3)\n"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Call Net::POP3#start and start POP session.
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: Access messages by using POP3#each_mail and/or POP3#mails.
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: "Close POP session by calling POP3#finish or use the block form of #start."
  type: :NUMBER
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Shortened Code
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/pop'\n\n    Net::POP3.start('pop.example.com', 110,\n                    'YourAccount', 'YourPassword') do |pop|\n      if pop.mails.empty?\n        puts 'No mail.'\n      else\n        i = 0\n        pop.each_mail do |m|   # or &quot;pop.mails.each ...&quot;\n          File.open(&quot;inbox/#{i}&quot;, 'w') do |f|\n            f.write m.pop\n          end\n          m.delete\n          i += 1\n        end\n        puts &quot;#{pop.mails.size} mails popped.&quot;\n      end\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: "POP3#delete_all is an alternative for #each_mail and #delete."
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/pop'\n\n    Net::POP3.start('pop.example.com', 110,\n                    'YourAccount', 'YourPassword') do |pop|\n      if pop.mails.empty?\n        puts 'No mail.'\n      else\n        i = 1\n        pop.delete_all do |m|\n          File.open(&quot;inbox/#{i}&quot;, 'w') do |f|\n            f.write m.pop\n          end\n          i += 1\n        end\n      end\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: And here is an even shorter example.
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/pop'\n\n    i = 0\n    Net::POP3.delete_all('pop.example.com', 110,\n                         'YourAccount', 'YourPassword') do |m|\n      File.open(&quot;inbox/#{i}&quot;, 'w') do |f|\n        f.write m.pop\n      end\n      i += 1\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Memory Space Issues
- !ruby/struct:SM::Flow::P 
  body: All the examples above get each message as one big string. This example avoids this.
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/pop'\n\n    i = 1\n    Net::POP3.delete_all('pop.example.com', 110,\n                         'YourAccount', 'YourPassword') do |m|\n      File.open(&quot;inbox/#{i}&quot;, 'w') do |f|\n        m.pop do |chunk|    # get a message little by little.\n          f.write chunk\n        end\n        i += 1\n      end\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Using APOP
- !ruby/struct:SM::Flow::P 
  body: "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:"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'net/pop'\n\n    # Use APOP authentication if $isapop == true\n    pop = Net::POP3.APOP($is_apop).new('apop.example.com', 110)\n    pop.start(YourAccount', 'YourPassword') do |pop|\n      # Rest of the code is the same.\n    end\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Fetch Only Selected Mail Using 'UIDL' POP Command
- !ruby/struct:SM::Flow::P 
  body: If your POP server provides UIDL functionality, you can grab only selected mails from the POP server. e.g.
- !ruby/struct:SM::Flow::VERB 
  body: "    def need_pop?( id )\n      # determine if we need pop this mail...\n    end\n\n    Net::POP3.start('pop.example.com', 110,\n                    'Your account', 'Your password') do |pop|\n      pop.mails.select { |m| need_pop?(m.unique_id) }.each do |m|\n        do_something(m.pop)\n      end\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Revision
  value: "%q$Revision: 29903 $.split[1]"
full_name: Net::POP3
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: active?
- !ruby/object:RI::MethodSummary 
  name: apop?
- !ruby/object:RI::MethodSummary 
  name: auth_only
- !ruby/object:RI::MethodSummary 
  name: command
- !ruby/object:RI::MethodSummary 
  name: delete_all
- !ruby/object:RI::MethodSummary 
  name: disable_ssl
- !ruby/object:RI::MethodSummary 
  name: do_finish
- !ruby/object:RI::MethodSummary 
  name: do_start
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_mail
- !ruby/object:RI::MethodSummary 
  name: enable_ssl
- !ruby/object:RI::MethodSummary 
  name: finish
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: logging
- !ruby/object:RI::MethodSummary 
  name: mails
- !ruby/object:RI::MethodSummary 
  name: n_bytes
- !ruby/object:RI::MethodSummary 
  name: n_mails
- !ruby/object:RI::MethodSummary 
  name: on_connect
- !ruby/object:RI::MethodSummary 
  name: port
- !ruby/object:RI::MethodSummary 
  name: read_timeout=
- !ruby/object:RI::MethodSummary 
  name: reset
- !ruby/object:RI::MethodSummary 
  name: set_debug_output
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: started?
- !ruby/object:RI::MethodSummary 
  name: use_ssl?
name: POP3
superclass: Protocol
ri/1.8/system/Net/POP3/ssl_params-c.yaml000064400000000261150403644760013537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3::ssl_params
is_singleton: true
name: ssl_params
params: ()
visibility: public
ri/1.8/system/Net/POP3/do_start-i.yaml000064400000000277150403644760013227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3#do_start
is_singleton: false
name: do_start
params: (account, password)
visibility: private
ri/1.8/system/Net/POP3/command-i.yaml000064400000000254150403644760013021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3#command
is_singleton: false
name: command
params: ()
visibility: private
ri/1.8/system/Net/POP3/on_connect-i.yaml000064400000000262150403644770013530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3#on_connect
is_singleton: false
name: on_connect
params: ()
visibility: private
ri/1.8/system/Net/POP3/active%3f-i.yaml000064400000000345150403644770013156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #started?"
full_name: Net::POP3#active?
is_singleton: false
name: active?
params: ()
visibility: public
ri/1.8/system/Net/POP3/n_mails-i.yaml000064400000000401150403644770013020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of messages on the POP server.
full_name: Net::POP3#n_mails
is_singleton: false
name: n_mails
params: ()
visibility: public
ri/1.8/system/Net/POP3/inspect-i.yaml000064400000000406150403644770013050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Provide human-readable stringification of class state.
full_name: Net::POP3#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Net/POP3/certs-c.yaml000064400000000247150403645000012503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3::certs
is_singleton: true
name: certs
params: ()
visibility: public
ri/1.8/system/Net/POP3/finish-i.yaml000064400000000400150403645000012640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finishes a POP3 session and closes TCP connection.
full_name: Net::POP3#finish
is_singleton: false
name: finish
params: ()
visibility: public
ri/1.8/system/Net/POP3/use_ssl%3f-c.yaml000064400000000255150403645010013336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3::use_ssl?
is_singleton: true
name: use_ssl?
params: ()
visibility: public
ri/1.8/system/Net/POP3/new-c.yaml000064400000001304150403645010012150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new POP3 object.
- !ruby/struct:SM::Flow::P 
  body: <tt>address</tt> is the hostname or ip address of your POP3 server.
- !ruby/struct:SM::Flow::P 
  body: The optional <tt>port</tt> is the port to connect to.
- !ruby/struct:SM::Flow::P 
  body: The optional <tt>isapop</tt> specifies whether this connection is going to use APOP authentication; it defaults to <tt>false</tt>.
- !ruby/struct:SM::Flow::P 
  body: This method does <b>not</b> open the TCP connection.
full_name: Net::POP3::new
is_singleton: true
name: new
params: (addr, port = nil, isapop = false)
visibility: public
ri/1.8/system/Net/POP3/apop%3f-i.yaml000064400000000367150403645010012632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Does this instance use APOP authentication?
full_name: Net::POP3#apop?
is_singleton: false
name: apop?
params: ()
visibility: public
ri/1.8/system/Net/POP3/enable_ssl-i.yaml000064400000000770150403645020013503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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. <tt>params</tt> (except :port) is passed to OpenSSL::SSLContext#set_params.
full_name: Net::POP3#enable_ssl
is_singleton: false
name: enable_ssl
params: |
  Net::POP#enable_ssl(params = {})

visibility: public
ri/1.8/system/Net/POP3/create_ssl_params-c.yaml000064400000000341150403645020015047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3::create_ssl_params
is_singleton: true
name: create_ssl_params
params: (verify_or_params = {}, certs = nil)
visibility: public
ri/1.8/system/Net/POP3/start-i.yaml000064400000000772150403645020012533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: pop
comment: 
- !ruby/struct:SM::Flow::P 
  body: Starts a POP3 session.
- !ruby/struct:SM::Flow::P 
  body: When called with block, gives a POP3 object to the block and closes the session after block call finishes.
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPAuthenticationError if authentication fails.
full_name: Net::POP3#start
is_singleton: false
name: start
params: (account, password) {|pop| ...}
visibility: public
ri/1.8/system/Net/POP3/verify-c.yaml000064400000000251150403645020012664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3::verify
is_singleton: true
name: verify
params: ()
visibility: public
ri/1.8/system/Net/POP3/auth_only-c.yaml000064400000001547150403645030013374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens a POP3 session, attempts authentication, and quits.
- !ruby/struct:SM::Flow::P 
  body: This method raises POPAuthenticationError if authentication fails.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example: normal POP3"
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::POP3.auth_only('pop.example.com', 110,\n                        'YourAccount', 'YourPassword')\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example: APOP"
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::POP3.auth_only('pop.example.com', 110,\n                        'YourAccount', 'YourPassword', true)\n"
full_name: Net::POP3::auth_only
is_singleton: true
name: auth_only
params: (address, port = nil, account = nil, password = nil, isapop = false)
visibility: public
ri/1.8/system/Net/POP3/logging-i.yaml000064400000000256150403645030013022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3#logging
is_singleton: false
name: logging
params: (msg)
visibility: public
ri/1.8/system/Net/POP3/disable_ssl-c.yaml000064400000000372150403645040013652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Disable SSL for all new instances.
full_name: Net::POP3::disable_ssl
is_singleton: true
name: disable_ssl
params: ()
visibility: public
ri/1.8/system/Net/POP3/read_timeout%3d-i.yaml000064400000000364150403645040014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the read timeout.
full_name: Net::POP3#read_timeout=
is_singleton: false
name: read_timeout=
params: (sec)
visibility: public
ri/1.8/system/Net/POP3/do_finish-i.yaml000064400000000260150403645040013332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Net::POP3#do_finish
is_singleton: false
name: do_finish
params: ()
visibility: private
ri/1.8/system/Net/POP3/port-i.yaml000064400000000350150403645050012355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The port number to connect to.
full_name: Net::POP3#port
is_singleton: false
name: port
params: ()
visibility: public
ri/1.8/system/Net/POP3/APOP-c.yaml000064400000001005150403645050012120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the APOP class if <tt>isapop</tt> is true; otherwise, returns the POP class. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "    # Example 1\n    pop = Net::POP3::APOP($is_apop).new(addr, port)\n\n    # Example 2\n    Net::POP3::APOP($is_apop).start(addr, port) do |pop|\n      ....\n    end\n"
full_name: Net::POP3::APOP
is_singleton: true
name: APOP
params: (isapop)
visibility: public
ri/1.8/system/Net/POP3/reset-i.yaml000064400000000556150403645050012523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Resets the session. This clears all &quot;deleted&quot; marks from messages.
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POP3#reset
is_singleton: false
name: reset
params: ()
visibility: public
ri/1.8/system/Net/POP3/auth_only-i.yaml000064400000000637150403645060013404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::POP3#auth_only
is_singleton: false
name: auth_only
params: (account, password)
visibility: public
ri/1.8/system/Net/POP3/start-c.yaml000064400000001541150403645060012524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: pop
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new POP3 object and open the connection. Equivalent to
- !ruby/struct:SM::Flow::VERB 
  body: "  Net::POP3.new(address, port, isapop).start(account, password)\n"
- !ruby/struct:SM::Flow::P 
  body: If <tt>block</tt> is provided, yields the newly-opened POP3 object to it, and automatically closes it at the end of the session.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "   Net::POP3.start(addr, port, account, password) do |pop|\n     pop.each_mail do |m|\n       file.write m.pop\n       m.delete\n     end\n   end\n"
full_name: Net::POP3::start
is_singleton: true
name: start
params: (address, port = nil, account = nil, password = nil, isapop = false) {|pop| ...}
visibility: public
ri/1.8/system/Net/POP3/delete_all-c.yaml000064400000001412150403645060013456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPAuthenticationError if authentication fails.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "    Net::POP3.delete_all('pop.example.com', 110,\n                         'YourAccount', 'YourPassword') do |m|\n      file.write m.pop\n    end\n"
full_name: Net::POP3::delete_all
is_singleton: true
name: delete_all
params: (address, port = nil, account = nil, password = nil, isapop = false, &block)
visibility: public
ri/1.8/system/Net/POP3/default_pop3s_port-c.yaml000064400000000426150403645070015205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The default port for POP3S connections, port 995
full_name: Net::POP3::default_pop3s_port
is_singleton: true
name: default_pop3s_port
params: ()
visibility: public
ri/1.8/system/Net/POP3/delete_all-i.yaml000064400000001301150403645070013462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: message
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes all messages on the server.
- !ruby/struct:SM::Flow::P 
  body: If called with a block, yields each message in turn before deleting it.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "    n = 1\n    pop.delete_all do |m|\n      File.open(&quot;inbox/#{n}&quot;) do |f|\n        f.write m.pop\n      end\n      n += 1\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POP3#delete_all
is_singleton: false
name: delete_all
params: ( {|message| ...}
visibility: public
ri/1.8/system/Net/POP3/each_mail-i.yaml000064400000001010150403645070013267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: each
block_params: message
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Yields each message to the passed-in block in turn. Equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "  pop3.mails.each do |popmail|\n    ....\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: This method raises a POPError if an error occurs.
full_name: Net::POP3#each_mail
is_singleton: false
name: each_mail
params: () {|message| ...}
visibility: public
ri/1.8/system/Net/ProtoFatalError/cdesc-ProtoFatalError.yaml000064400000000327150403645110017654 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtoFatalError
includes: []

instance_methods: []

name: ProtoFatalError
superclass: ProtocolError
ri/1.8/system/Net/HTTPExceptions/cdesc-HTTPExceptions.yaml000064400000000537150403645120017150 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: response
  rw: R
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: HTTP exception class. You must use its subclasses.
constants: []

full_name: Net::HTTPExceptions
includes: []

instance_methods: []

name: HTTPExceptions
superclass: 
ri/1.8/system/Net/ProtoUnknownError/cdesc-ProtoUnknownError.yaml000064400000000333150403645130020673 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::ProtoUnknownError
includes: []

instance_methods: []

name: ProtoUnknownError
superclass: ProtocolError
ri/1.8/system/Net/POP3Command/cdesc-POP3Command.yaml000064400000000310150403645150015536 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Net::POP3Command
includes: []

instance_methods: []

name: POP3Command
superclass: Object
ri/1.8/system/FloatDomainError/cdesc-FloatDomainError.yaml000064400000000453150403645160017377 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Turn off floating point exceptions for overflow, etc.
constants: []

full_name: FloatDomainError
includes: []

instance_methods: []

name: FloatDomainError
superclass: RangeError
ri/1.8/system/IRB/FileInputMethod/new-c.yaml000064400000000262150403645210014361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::FileInputMethod::new
is_singleton: true
name: new
params: (file)
visibility: public
ri/1.8/system/IRB/FileInputMethod/gets-i.yaml000064400000000260150403645220014537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::FileInputMethod#gets
is_singleton: false
name: gets
params: ()
visibility: public
ri/1.8/system/IRB/FileInputMethod/eof%3f-i.yaml000064400000000260150403645220014644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::FileInputMethod#eof?
is_singleton: false
name: eof?
params: ()
visibility: public
ri/1.8/system/IRB/FileInputMethod/cdesc-FileInputMethod.yaml000064400000000634150403645230017474 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: file_name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::FileInputMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: gets
name: FileInputMethod
superclass: InputMethod
ri/1.8/system/IRB/ContextExtender/cdesc-ContextExtender.yaml000064400000000722150403645240017641 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_extend_command
- !ruby/object:RI::MethodSummary 
  name: install_extend_commands
comment: 
- !ruby/struct:SM::Flow::P 
  body: extension support for Context
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CE
  value: ContextExtender
full_name: IRB::ContextExtender
includes: []

instance_methods: []

name: ContextExtender
superclass: 
ri/1.8/system/IRB/ContextExtender/def_extend_command-c.yaml000064400000000351150403645250017461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ContextExtender::def_extend_command
is_singleton: true
name: def_extend_command
params: (cmd_name, load_file, *aliases)
visibility: public
ri/1.8/system/IRB/ContextExtender/install_extend_commands-c.yaml000064400000000326150403645260020557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ContextExtender::install_extend_commands
is_singleton: true
name: install_extend_commands
params: ()
visibility: public
ri/1.8/system/IRB/InputCompletor/cdesc-InputCompletor.yaml000064400000002277150403645270017355 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: select_message
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ReservedWords
  value: "[       \"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\",     ]"
- !ruby/object:RI::Constant 
  comment: 
  name: CompletionProc
  value: proc { |input|       bind = IRB.conf[:MAIN_CONTEXT].workspace.binding
- !ruby/object:RI::Constant 
  comment: 
  name: Operators
  value: "[\"%\", \"&\", \"*\", \"**\", \"+\",  \"-\",  \"/\",       \"<\", \"<<\", \"<=\", \"<=>\", \"==\", \"===\", \"=~\", \">\", \">=\", \">>\",       \"[]\", \"[]=\", \"^\",]"
full_name: IRB::InputCompletor
includes: []

instance_methods: []

name: InputCompletor
superclass: 
ri/1.8/system/IRB/InputCompletor/select_message-c.yaml000064400000000340150403645270016502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::InputCompletor::select_message
is_singleton: true
name: select_message
params: (receiver, message, candidates)
visibility: public
ri/1.8/system/IRB/cdesc-IRB.yaml000064400000003710150403645300012004 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: CurrentContext
- !ruby/object:RI::MethodSummary 
  name: CurrentContext
- !ruby/object:RI::MethodSummary 
  name: JobManager
- !ruby/object:RI::MethodSummary 
  name: conf
- !ruby/object:RI::MethodSummary 
  name: delete_caller
- !ruby/object:RI::MethodSummary 
  name: init_config
- !ruby/object:RI::MethodSummary 
  name: init_error
- !ruby/object:RI::MethodSummary 
  name: initialize_tracer
- !ruby/object:RI::MethodSummary 
  name: irb
- !ruby/object:RI::MethodSummary 
  name: irb_abort
- !ruby/object:RI::MethodSummary 
  name: irb_at_exit
- !ruby/object:RI::MethodSummary 
  name: irb_exit
- !ruby/object:RI::MethodSummary 
  name: load_modules
- !ruby/object:RI::MethodSummary 
  name: parse_opts
- !ruby/object:RI::MethodSummary 
  name: print_usage
- !ruby/object:RI::MethodSummary 
  name: rc_file
- !ruby/object:RI::MethodSummary 
  name: rc_file_generators
- !ruby/object:RI::MethodSummary 
  name: run_config
- !ruby/object:RI::MethodSummary 
  name: setup
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: version
comment: 
- !ruby/struct:SM::Flow::VERB 
  body: "  irb/help.rb - print usage module\n      $Release Version: 0.9.5$\n      $Revision: 16857 $\n      $Date: 2008-06-06 17:05:24 +0900 (Fri, 06 Jun 2008) $\n      by Keiju ISHITSUKA(keiju@ishitsuka.com)\n"
- !ruby/struct:SM::Flow::P 
  body: --
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: InputMethod
  - !ruby/struct:SM::Flow::VERB 
    body: "    StdioInputMethod\n    FileInputMethod\n    (ReadlineInputMethod)\n"
  name: STDIN_FILE_NAME
  value: "\"(line)\""
- !ruby/object:RI::Constant 
  comment: 
  name: FEATURE_IOPT_CHANGE_VERSION
  value: "\"1.9.0\""
- !ruby/object:RI::Constant 
  comment: 
  name: IRBRC_EXT
  value: "\"rc\""
full_name: IRB
includes: []

instance_methods: []

name: IRB
superclass: 
ri/1.8/system/IRB/HistorySavingAbility/save_history-i.yaml000064400000000305150403645310017403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::HistorySavingAbility#save_history
is_singleton: false
name: save_history
params: ()
visibility: public
ri/1.8/system/IRB/HistorySavingAbility/load_history-i.yaml000064400000000305150403645320017365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::HistorySavingAbility#load_history
is_singleton: false
name: load_history
params: ()
visibility: public
ri/1.8/system/IRB/HistorySavingAbility/extended-c.yaml000064400000001253150403645320016462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def HistorySavingAbility.create_finalizer
- !ruby/struct:SM::Flow::VERB 
  body: "  proc do\n  if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) &gt; 0\n    if hf = IRB.conf[:HISTORY_FILE]\n      file = File.expand_path(hf)\n    end\n    file = IRB.rc_file(&quot;_history&quot;) unless file\n    open(file, 'w' ) do |f|\n      hist = HISTORY.to_a\n      f.puts(hist[-num..-1] || hist)\n    end\n  end\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: end
full_name: IRB::HistorySavingAbility::extended
is_singleton: true
name: extended
params: (obj)
visibility: public
ri/1.8/system/IRB/HistorySavingAbility/cdesc-HistorySavingAbility.yaml000064400000000640150403645330021650 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: extended
comment: 
constants: []

full_name: IRB::HistorySavingAbility
includes: 
- !ruby/object:RI::IncludedModule 
  name: Readline
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: load_history
- !ruby/object:RI::MethodSummary 
  name: save_history
name: HistorySavingAbility
superclass: 
ri/1.8/system/IRB/ExtendCommandBundle/extend_object-c.yaml000064400000000311150403645330017223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommandBundle::extend_object
is_singleton: true
name: extend_object
params: (obj)
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/irb_require-i.yaml000064400000000313150403645330016726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommandBundle#irb_require
is_singleton: false
name: irb_require
params: (*opts, &b)
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/install_alias_method-i.yaml000064400000000526150403645330020603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: override = {NO_OVERRIDE, OVERRIDE_PRIVATE_ONLY, OVERRIDE_ALL}
full_name: IRB::ExtendCommandBundle#install_alias_method
is_singleton: false
name: install_alias_method
params: (to, from, override = NO_OVERRIDE)
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/def_extend_command-c.yaml000064400000000510150403645340020213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: aliases = [commands_alias, flag], ...
full_name: IRB::ExtendCommandBundle::def_extend_command
is_singleton: true
name: def_extend_command
params: (cmd_name, cmd_class, load_file = nil, *aliases)
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/irb_context-i.yaml000064400000000302150403645340016735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommandBundle#irb_context
is_singleton: false
name: irb_context
params: ()
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/irb_load-i.yaml000064400000000305150403645350016174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommandBundle#irb_load
is_singleton: false
name: irb_load
params: (*opts, &b)
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/irb_original_method_name-c.yaml000064400000000347150403645350021421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommandBundle::irb_original_method_name
is_singleton: true
name: irb_original_method_name
params: (method_name)
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/irb_exit-i.yaml000064400000000303150403645350016224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommandBundle#irb_exit
is_singleton: false
name: irb_exit
params: (ret = 0)
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/install_extend_commands-c.yaml000064400000000332150403645350021311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommandBundle::install_extend_commands
is_singleton: true
name: install_extend_commands
params: ()
visibility: public
ri/1.8/system/IRB/ExtendCommandBundle/cdesc-ExtendCommandBundle.yaml000064400000002117150403645360021136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_extend_command
- !ruby/object:RI::MethodSummary 
  name: extend_object
- !ruby/object:RI::MethodSummary 
  name: install_extend_commands
- !ruby/object:RI::MethodSummary 
  name: irb_original_method_name
comment: 
- !ruby/struct:SM::Flow::P 
  body: IRB extended command
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: EXCB
  value: ExtendCommandBundle
- !ruby/object:RI::Constant 
  comment: 
  name: NO_OVERRIDE
  value: "0"
- !ruby/object:RI::Constant 
  comment: 
  name: OVERRIDE_PRIVATE_ONLY
  value: "0x01"
- !ruby/object:RI::Constant 
  comment: 
  name: OVERRIDE_ALL
  value: "0x02"
full_name: IRB::ExtendCommandBundle
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: install_alias_method
- !ruby/object:RI::MethodSummary 
  name: irb_context
- !ruby/object:RI::MethodSummary 
  name: irb_exit
- !ruby/object:RI::MethodSummary 
  name: irb_load
- !ruby/object:RI::MethodSummary 
  name: irb_require
name: ExtendCommandBundle
superclass: 
ri/1.8/system/IRB/rc_file-c.yaml000064400000000264150403645370012144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::rc_file
is_singleton: true
name: rc_file
params: (ext = IRBRC_EXT)
visibility: public
ri/1.8/system/IRB/init_error-c.yaml000064400000000253150403645400012705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::init_error
is_singleton: true
name: init_error
params: ()
visibility: public
ri/1.8/system/IRB/run_config-c.yaml000064400000000336150403645400012664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: running config
full_name: IRB::run_config
is_singleton: true
name: run_config
params: ()
visibility: public
ri/1.8/system/IRB/IrbLoader/search_file_from_ruby_path-i.yaml000064400000000330150403645410017743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::IrbLoader#search_file_from_ruby_path
is_singleton: false
name: search_file_from_ruby_path
params: (fn)
visibility: public
ri/1.8/system/IRB/IrbLoader/old-i.yaml000064400000000250150403645410013156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::IrbLoader#old
is_singleton: false
name: old
params: ()
visibility: public
ri/1.8/system/IRB/IrbLoader/irb_load-i.yaml000064400000000300150403645420014150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::IrbLoader#irb_load
is_singleton: false
name: irb_load
params: (fn, priv = nil)
visibility: public
ri/1.8/system/IRB/IrbLoader/load_file-i.yaml000064400000000304150403645430014320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::IrbLoader#load_file
is_singleton: false
name: load_file
params: (path, priv = nil)
visibility: public
ri/1.8/system/IRB/IrbLoader/cdesc-IrbLoader.yaml000064400000000713150403645440015103 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::IrbLoader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: irb_load
- !ruby/object:RI::MethodSummary 
  name: load_file
- !ruby/object:RI::MethodSummary 
  name: old
- !ruby/object:RI::MethodSummary 
  name: search_file_from_ruby_path
- !ruby/object:RI::MethodSummary 
  name: source_file
name: IrbLoader
superclass: 
ri/1.8/system/IRB/IrbLoader/source_file-i.yaml000064400000000274150403645440014710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::IrbLoader#source_file
is_singleton: false
name: source_file
params: (path)
visibility: public
ri/1.8/system/IRB/Frame/trace_func-i.yaml000064400000000320150403645450013702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Frame#trace_func
is_singleton: false
name: trace_func
params: (event, file, line, id, binding)
visibility: public
ri/1.8/system/IRB/Frame/top-i.yaml000064400000000251150403645450012376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Frame#top
is_singleton: false
name: top
params: (n = 0)
visibility: public
ri/1.8/system/IRB/Frame/new-c.yaml000064400000000244150403645450012361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Frame::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/IRB/Frame/cdesc-Frame.yaml000064400000001244150403645460013463 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: bottom
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: sender
- !ruby/object:RI::MethodSummary 
  name: top
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: INIT_STACK_TIMES
  value: "3"
- !ruby/object:RI::Constant 
  comment: 
  name: CALL_STACK_OFFSET
  value: "3"
full_name: IRB::Frame
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: bottom
- !ruby/object:RI::MethodSummary 
  name: top
- !ruby/object:RI::MethodSummary 
  name: trace_func
name: Frame
superclass: Object
ri/1.8/system/IRB/Frame/bottom-c.yaml000064400000000347150403645460013101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: singleton functions
full_name: IRB::Frame::bottom
is_singleton: true
name: bottom
params: (n = 0)
visibility: public
ri/1.8/system/IRB/Frame/top-c.yaml000064400000000251150403645460012371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Frame::top
is_singleton: true
name: top
params: (n = 0)
visibility: public
ri/1.8/system/IRB/Frame/sender-c.yaml000064400000000252150403645470013051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Frame::sender
is_singleton: true
name: sender
params: ()
visibility: public
ri/1.8/system/IRB/Frame/bottom-i.yaml000064400000000257150403645470013110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Frame#bottom
is_singleton: false
name: bottom
params: (n = 0)
visibility: public
ri/1.8/system/IRB/irb_at_exit-c.yaml000064400000000255150403645470013033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::irb_at_exit
is_singleton: true
name: irb_at_exit
params: ()
visibility: public
ri/1.8/system/IRB/Context/use_loader%3f-i.yaml000064400000000362150403645470014613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #use_loader"
full_name: IRB::Context#use_loader?
is_singleton: false
name: use_loader?
params: ()
visibility: public
ri/1.8/system/IRB/Context/evaluate-i.yaml000064400000000275150403645470014004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#evaluate
is_singleton: false
name: evaluate
params: (line, line_no)
visibility: public
ri/1.8/system/IRB/Context/save_history-i.yaml000064400000000270150403645470014710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#save_history
is_singleton: false
name: save_history
params: ()
visibility: public
ri/1.8/system/IRB/Context/pop_workspace-i.yaml000064400000000272150403645470015047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#pop_workspace
is_singleton: false
name: pop_workspace
params: ()
visibility: public
ri/1.8/system/IRB/Context/save_history%3d-i.yaml000064400000000275150403645470015211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#save_history=
is_singleton: false
name: save_history=
params: (val)
visibility: public
ri/1.8/system/IRB/Context/use_loader-i.yaml000064400000000343150403645500014306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: use_loader?
block_params: 
comment: 
full_name: IRB::Context#use_loader
is_singleton: false
name: use_loader
params: ()
visibility: public
ri/1.8/system/IRB/Context/verbose%3f-i.yaml000064400000000260150403645500014125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#verbose?
is_singleton: false
name: verbose?
params: ()
visibility: public
ri/1.8/system/IRB/Context/history_file%3d-i.yaml000064400000000276150403645500015165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#history_file=
is_singleton: false
name: history_file=
params: (hist)
visibility: public
ri/1.8/system/IRB/Context/use_loader%3d-i.yaml000064400000000271150403645510014603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#use_loader=
is_singleton: false
name: use_loader=
params: (opt)
visibility: public
ri/1.8/system/IRB/Context/inspect%3f-i.yaml000064400000000260150403645510014126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#inspect?
is_singleton: false
name: inspect?
params: ()
visibility: public
ri/1.8/system/IRB/Context/home_workspace-i.yaml000064400000000274150403645510015176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#home_workspace
is_singleton: false
name: home_workspace
params: ()
visibility: public
ri/1.8/system/IRB/Context/eval_history%3d-i.yaml000064400000000274150403645520015175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#eval_history=
is_singleton: false
name: eval_history=
params: (no)
visibility: public
ri/1.8/system/IRB/Context/debug_level%3d-i.yaml000064400000000275150403645520014743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#debug_level=
is_singleton: false
name: debug_level=
params: (value)
visibility: public
ri/1.8/system/IRB/Context/inspect_mode%3d-i.yaml000064400000000275150403645520015137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#inspect_mode=
is_singleton: false
name: inspect_mode=
params: (opt)
visibility: public
ri/1.8/system/IRB/Context/set_last_value-i.yaml000064400000000364150403645530015204 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: _set_last_value
block_params: 
comment: 
full_name: IRB::Context#set_last_value
is_singleton: false
name: set_last_value
params: (value)
visibility: public
ri/1.8/system/IRB/Context/use_tracer%3d-i.yaml000064400000000271150403645530014617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#use_tracer=
is_singleton: false
name: use_tracer=
params: (opt)
visibility: public
ri/1.8/system/IRB/Context/change_workspace-i.yaml000064400000000306150403645530015471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#change_workspace
is_singleton: false
name: change_workspace
params: (*_main)
visibility: public
ri/1.8/system/IRB/Context/inspect-i.yaml000064400000000326150403645530013635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: to_s
block_params: 
comment: 
full_name: IRB::Context#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/IRB/Context/use_readline%3d-i.yaml000064400000000275150403645530015126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#use_readline=
is_singleton: false
name: use_readline=
params: (opt)
visibility: public
ri/1.8/system/IRB/Context/history_file-i.yaml000064400000000270150403645530014666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#history_file
is_singleton: false
name: history_file
params: ()
visibility: public
ri/1.8/system/IRB/Context/exit-i.yaml000064400000000257150403645530013144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#exit
is_singleton: false
name: exit
params: (ret = 0)
visibility: public
ri/1.8/system/IRB/Context/new-c.yaml000064400000000674150403645530012761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Arguments:"
- !ruby/struct:SM::Flow::VERB 
  body: "  input_method: nil -- stdin or readline\n                String -- File\n                other -- using this as InputMethod\n"
full_name: IRB::Context::new
is_singleton: true
name: new
params: (irb, workspace = nil, input_method = nil, output_method = nil)
visibility: public
ri/1.8/system/IRB/Context/init_save_history-i.yaml000064400000000302150403645530015724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#init_save_history
is_singleton: false
name: init_save_history
params: ()
visibility: public
ri/1.8/system/IRB/Context/cdesc-Context.yaml000064400000010560150403645530014446 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: ap_name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: auto_indent_mode
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: back_trace_limit
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: debug_level
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: echo
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: eval_history
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: ignore_eof
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: ignore_sigint
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: inspect_mode
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: io
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: irb
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: irb_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: irb_name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: irb_path
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: last_value
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: load_modules
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: math_mode
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: prompt_c
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: prompt_i
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: prompt_mode
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: prompt_n
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: prompt_s
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: rc
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: return_format
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: thread
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: use_readline
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: use_tracer
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: verbose
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: workspace
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: workspace_home
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NOPRINTING_IVARS
  value: "[\"@last_value\"]"
- !ruby/object:RI::Constant 
  comment: 
  name: NO_INSPECTING_IVARS
  value: "[\"@irb\", \"@io\"]"
- !ruby/object:RI::Constant 
  comment: 
  name: IDNAME_IVARS
  value: "[\"@prompt_mode\"]"
full_name: IRB::Context
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _set_last_value
- !ruby/object:RI::MethodSummary 
  name: change_workspace
- !ruby/object:RI::MethodSummary 
  name: debug?
- !ruby/object:RI::MethodSummary 
  name: debug_level=
- !ruby/object:RI::MethodSummary 
  name: eval_history=
- !ruby/object:RI::MethodSummary 
  name: evaluate
- !ruby/object:RI::MethodSummary 
  name: exit
- !ruby/object:RI::MethodSummary 
  name: file_input?
- !ruby/object:RI::MethodSummary 
  name: history_file
- !ruby/object:RI::MethodSummary 
  name: history_file=
- !ruby/object:RI::MethodSummary 
  name: home_workspace
- !ruby/object:RI::MethodSummary 
  name: init_save_history
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: inspect?
- !ruby/object:RI::MethodSummary 
  name: inspect?
- !ruby/object:RI::MethodSummary 
  name: inspect_mode=
- !ruby/object:RI::MethodSummary 
  name: irb_level
- !ruby/object:RI::MethodSummary 
  name: main
- !ruby/object:RI::MethodSummary 
  name: math_mode=
- !ruby/object:RI::MethodSummary 
  name: pop_workspace
- !ruby/object:RI::MethodSummary 
  name: prompt_mode=
- !ruby/object:RI::MethodSummary 
  name: prompting?
- !ruby/object:RI::MethodSummary 
  name: push_workspace
- !ruby/object:RI::MethodSummary 
  name: save_history
- !ruby/object:RI::MethodSummary 
  name: save_history=
- !ruby/object:RI::MethodSummary 
  name: set_last_value
- !ruby/object:RI::MethodSummary 
  name: set_last_value
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: use_loader
- !ruby/object:RI::MethodSummary 
  name: use_loader=
- !ruby/object:RI::MethodSummary 
  name: use_loader?
- !ruby/object:RI::MethodSummary 
  name: use_readline=
- !ruby/object:RI::MethodSummary 
  name: use_tracer=
- !ruby/object:RI::MethodSummary 
  name: verbose?
- !ruby/object:RI::MethodSummary 
  name: workspaces
name: Context
superclass: Object
ri/1.8/system/IRB/Context/workspaces-i.yaml000064400000000264150403645530014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#workspaces
is_singleton: false
name: workspaces
params: ()
visibility: public
ri/1.8/system/IRB/Context/file_input%3f-i.yaml000064400000000266150403645530014627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#file_input?
is_singleton: false
name: file_input?
params: ()
visibility: public
ri/1.8/system/IRB/Context/to_s-i.yaml000064400000000341150403645530013131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #inspect"
full_name: IRB::Context#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/IRB/Context/debug%3f-i.yaml000064400000000254150403645530013554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#debug?
is_singleton: false
name: debug?
params: ()
visibility: public
ri/1.8/system/IRB/Context/irb_level-i.yaml000064400000000262150403645530014132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#irb_level
is_singleton: false
name: irb_level
params: ()
visibility: public
ri/1.8/system/IRB/Context/push_workspace-i.yaml000064400000000302150403645530015217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#push_workspace
is_singleton: false
name: push_workspace
params: (*_main)
visibility: public
ri/1.8/system/IRB/Context/prompt_mode%3d-i.yaml000064400000000274150403645540015014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#prompt_mode=
is_singleton: false
name: prompt_mode=
params: (mode)
visibility: public
ri/1.8/system/IRB/Context/main-i.yaml000064400000000250150403645540013111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#main
is_singleton: false
name: main
params: ()
visibility: public
ri/1.8/system/IRB/Context/_set_last_value-i.yaml000064400000000403150403645540015336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #set_last_value"
full_name: IRB::Context#_set_last_value
is_singleton: false
name: _set_last_value
params: (value)
visibility: public
ri/1.8/system/IRB/Context/prompting%3f-i.yaml000064400000000264150403645540014507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#prompting?
is_singleton: false
name: prompting?
params: ()
visibility: public
ri/1.8/system/IRB/Context/math_mode%3d-i.yaml000064400000000267150403645540014426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Context#math_mode=
is_singleton: false
name: math_mode=
params: (opt)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Require/cdesc-Require.yaml000064400000000455150403645540017157 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Require
includes: 
- !ruby/object:RI::IncludedModule 
  name: IrbLoader
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Require
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/Require/execute-i.yaml000064400000000306150403645540016347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Require#execute
is_singleton: false
name: execute
params: (file_name)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Source/execute-i.yaml000064400000000305150403645540016172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Source#execute
is_singleton: false
name: execute
params: (file_name)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Source/cdesc-Source.yaml000064400000000453150403645540016625 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Source
includes: 
- !ruby/object:RI::IncludedModule 
  name: IrbLoader
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Source
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/PopWorkspace/execute-i.yaml000064400000000306150403645540017350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::PopWorkspace#execute
is_singleton: false
name: execute
params: (*obj)
visibility: public
ri/1.8/system/IRB/ExtendCommand/PopWorkspace/cdesc-PopWorkspace.yaml000064400000000414150403645540021154 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::PopWorkspace
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: PopWorkspace
superclass: Workspaces
ri/1.8/system/IRB/ExtendCommand/Help/execute-c.yaml000064400000000311150403645550015612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Help::execute
is_singleton: true
name: execute
params: (context, *names)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Help/cdesc-Help.yaml000064400000000362150403645550015705 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
comment: 
constants: []

full_name: IRB::ExtendCommand::Help
includes: []

instance_methods: []

name: Help
superclass: 
ri/1.8/system/IRB/ExtendCommand/IrbCommand/execute-i.yaml000064400000000304150403645560016746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::IrbCommand#execute
is_singleton: false
name: execute
params: (*obj)
visibility: public
ri/1.8/system/IRB/ExtendCommand/IrbCommand/cdesc-IrbCommand.yaml000064400000000401150403645570020147 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::IrbCommand
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: IrbCommand
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/PushWorkspace/execute-i.yaml000064400000000307150403645600017527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::PushWorkspace#execute
is_singleton: false
name: execute
params: (*obj)
visibility: public
ri/1.8/system/IRB/ExtendCommand/PushWorkspace/cdesc-PushWorkspace.yaml000064400000000416150403645610021516 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::PushWorkspace
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: PushWorkspace
superclass: Workspaces
ri/1.8/system/IRB/ExtendCommand/CurrentWorkingWorkspace/execute-i.yaml000064400000000321150403645620021571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::CurrentWorkingWorkspace#execute
is_singleton: false
name: execute
params: (*obj)
visibility: public
ri/1.8/system/IRB/ExtendCommand/CurrentWorkingWorkspace/cdesc-CurrentWorkingWorkspace.yaml000064400000000433150403645620025626 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::CurrentWorkingWorkspace
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: CurrentWorkingWorkspace
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/ChangeWorkspace/execute-i.yaml000064400000000311150403645630017773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::ChangeWorkspace#execute
is_singleton: false
name: execute
params: (*obj)
visibility: public
ri/1.8/system/IRB/ExtendCommand/ChangeWorkspace/cdesc-ChangeWorkspace.yaml000064400000000413150403645630022231 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::ChangeWorkspace
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: ChangeWorkspace
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/Nop/irb-i.yaml000064400000000261150403645630014601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Nop#irb
is_singleton: false
name: irb
params: ()
visibility: public
ri/1.8/system/IRB/ExtendCommand/Nop/cdesc-Nop.yaml000064400000000704150403645640015415 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: irb_context
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::ExtendCommand::Nop
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
- !ruby/object:RI::MethodSummary 
  name: irb
name: Nop
superclass: Object
ri/1.8/system/IRB/ExtendCommand/Nop/execute-c.yaml000064400000000304150403645640015460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Nop::execute
is_singleton: true
name: execute
params: (conf, *opts)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Nop/execute-i.yaml000064400000000276150403645640015476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Nop#execute
is_singleton: false
name: execute
params: (*opts)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Nop/new-c.yaml000064400000000265150403645650014616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Nop::new
is_singleton: true
name: new
params: (conf)
visibility: public
ri/1.8/system/IRB/ExtendCommand/cdesc-ExtendCommand.yaml000064400000000306150403645650016652 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand
includes: []

instance_methods: []

name: ExtendCommand
superclass: 
ri/1.8/system/IRB/ExtendCommand/Jobs/execute-i.yaml000064400000000272150403645650015634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Jobs#execute
is_singleton: false
name: execute
params: ()
visibility: public
ri/1.8/system/IRB/ExtendCommand/Jobs/cdesc-Jobs.yaml000064400000000365150403645650015723 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Jobs
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Jobs
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/Foreground/execute-i.yaml000064400000000303150403645650017044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Foreground#execute
is_singleton: false
name: execute
params: (key)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Foreground/cdesc-Foreground.yaml000064400000000401150403645650020344 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Foreground
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Foreground
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/Workspaces/execute-i.yaml000064400000000304150403645650017054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Workspaces#execute
is_singleton: false
name: execute
params: (*obj)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Workspaces/cdesc-Workspaces.yaml000064400000000401150403645650020362 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Workspaces
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Workspaces
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/Kill/cdesc-Kill.yaml000064400000000365150403645650015717 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Kill
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Kill
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/Kill/execute-i.yaml000064400000000277150403645650015637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Kill#execute
is_singleton: false
name: execute
params: (*keys)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Load/execute-i.yaml000064400000000317150403645660015617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ExtendCommand::Load#execute
is_singleton: false
name: execute
params: (file_name, priv = nil)
visibility: public
ri/1.8/system/IRB/ExtendCommand/Load/cdesc-Load.yaml000064400000000447150403645660015671 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Load
includes: 
- !ruby/object:RI::IncludedModule 
  name: IrbLoader
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Load
superclass: Nop
ri/1.8/system/IRB/ExtendCommand/Fork/execute-i.yaml000064400000000313150403645660015635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: IRB::ExtendCommand::Fork#execute
is_singleton: false
name: execute
params: (&block) {|| ...}
visibility: public
ri/1.8/system/IRB/ExtendCommand/Fork/cdesc-Fork.yaml000064400000000365150403645660015734 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::ExtendCommand::Fork
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: execute
name: Fork
superclass: Nop
ri/1.8/system/IRB/JobManager/irb-i.yaml000064400000000254150403645670013332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#irb
is_singleton: false
name: irb
params: (key)
visibility: public
ri/1.8/system/IRB/JobManager/main_thread-i.yaml000064400000000271150403645670015030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#main_thread
is_singleton: false
name: main_thread
params: ()
visibility: public
ri/1.8/system/IRB/JobManager/n_jobs-i.yaml000064400000000257150403645670014033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#n_jobs
is_singleton: false
name: n_jobs
params: ()
visibility: public
ri/1.8/system/IRB/JobManager/main_irb-i.yaml000064400000000263150403645700014330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#main_irb
is_singleton: false
name: main_irb
params: ()
visibility: public
ri/1.8/system/IRB/JobManager/delete-i.yaml000064400000000262150403645700014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#delete
is_singleton: false
name: delete
params: (key)
visibility: public
ri/1.8/system/IRB/JobManager/kill-i.yaml000064400000000260150403645710013501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#kill
is_singleton: false
name: kill
params: (*keys)
visibility: public
ri/1.8/system/IRB/JobManager/inspect-i.yaml000064400000000261150403645710014214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/IRB/JobManager/switch-i.yaml000064400000000262150403645720014052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#switch
is_singleton: false
name: switch
params: (key)
visibility: public
ri/1.8/system/IRB/JobManager/new-c.yaml000064400000000251150403645720013332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/IRB/JobManager/cdesc-JobManager.yaml000064400000001611150403645730015407 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: current_job
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: job management class
constants: []

full_name: IRB::JobManager
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: insert
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: irb
- !ruby/object:RI::MethodSummary 
  name: kill
- !ruby/object:RI::MethodSummary 
  name: main_irb
- !ruby/object:RI::MethodSummary 
  name: main_thread
- !ruby/object:RI::MethodSummary 
  name: n_jobs
- !ruby/object:RI::MethodSummary 
  name: search
- !ruby/object:RI::MethodSummary 
  name: switch
- !ruby/object:RI::MethodSummary 
  name: thread
name: JobManager
superclass: Object
ri/1.8/system/IRB/JobManager/thread-i.yaml000064400000000262150403645730014021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#thread
is_singleton: false
name: thread
params: (key)
visibility: public
ri/1.8/system/IRB/JobManager/insert-i.yaml000064400000000262150403645730014056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#insert
is_singleton: false
name: insert
params: (irb)
visibility: public
ri/1.8/system/IRB/JobManager/search-i.yaml000064400000000262150403645740014020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager#search
is_singleton: false
name: search
params: (key)
visibility: public
ri/1.8/system/IRB/SLex/postproc-i.yaml000064400000000354150403645750013275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "\e$BMW%A%'%C%/\e(B?"
full_name: IRB::SLex#postproc
is_singleton: false
name: postproc
params: (token)
visibility: public
ri/1.8/system/IRB/SLex/Node/match_io-i.yaml000064400000000276150403645760014100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex::Node#match_io
is_singleton: false
name: match_io
params: (io, op = "")
visibility: public
ri/1.8/system/IRB/SLex/Node/match-i.yaml000064400000000634150403645770013410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "chrs: String"
- !ruby/struct:SM::Flow::VERB 
  body: "      character array\n      io must have getc()/ungetc(); and ungetc() must be\n      able to be called arbitrary number of times.\n"
full_name: IRB::SLex::Node#match
is_singleton: false
name: match
params: (chrs, op = "")
visibility: public
ri/1.8/system/IRB/SLex/Node/create_subnode-i.yaml000064400000000342150403646000015255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex::Node#create_subnode
is_singleton: false
name: create_subnode
params: (chrs, preproc = nil, postproc = nil)
visibility: public
ri/1.8/system/IRB/SLex/Node/new-c.yaml000064400000000517150403646010013063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: if postproc is nil, this node is an abstract node. if postproc is non-nil, this node is a real node.
full_name: IRB::SLex::Node::new
is_singleton: true
name: new
params: (preproc = nil, postproc = nil)
visibility: public
ri/1.8/system/IRB/SLex/Node/cdesc-Node.yaml000064400000001071150403646010014012 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: postproc
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: preproc
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::SLex::Node
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_subnode
- !ruby/object:RI::MethodSummary 
  name: match
- !ruby/object:RI::MethodSummary 
  name: match_io
- !ruby/object:RI::MethodSummary 
  name: search
name: Node
superclass: Object
ri/1.8/system/IRB/SLex/Node/search-i.yaml000064400000000276150403646020013550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex::Node#search
is_singleton: false
name: search
params: (chrs, opt = nil)
visibility: public
ri/1.8/system/IRB/SLex/create-i.yaml000064400000000315150403646020012653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex#create
is_singleton: false
name: create
params: (token, preproc = nil, postproc = nil)
visibility: public
ri/1.8/system/IRB/SLex/match-i.yaml000064400000000254150403646030012507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex#match
is_singleton: false
name: match
params: (token)
visibility: public
ri/1.8/system/IRB/SLex/inspect-i.yaml000064400000000253150403646030013057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/IRB/SLex/new-c.yaml000064400000000243150403646040012175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/IRB/SLex/def_rule-i.yaml000064400000000331150403646040013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex#def_rule
is_singleton: false
name: def_rule
params: (token, preproc = nil, postproc = nil, &block)
visibility: public
ri/1.8/system/IRB/SLex/def_rules-i.yaml000064400000000276150403646050013371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex#def_rules
is_singleton: false
name: def_rules
params: (*tokens, &block)
visibility: public
ri/1.8/system/IRB/SLex/cdesc-SLex.yaml000064400000002004150403646050013114 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DOUT
  value: Notifier::def_notifier("SLex::")
- !ruby/object:RI::Constant 
  comment: 
  name: D_WARN
  value: "DOUT::def_notifier(1, \"Warn: \")"
- !ruby/object:RI::Constant 
  comment: 
  name: D_DEBUG
  value: "DOUT::def_notifier(2, \"Debug: \")"
- !ruby/object:RI::Constant 
  comment: 
  name: D_DETAIL
  value: "DOUT::def_notifier(4, \"Detail: \")"
full_name: IRB::SLex
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create
- !ruby/object:RI::MethodSummary 
  name: def_rule
- !ruby/object:RI::MethodSummary 
  name: def_rules
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: match
- !ruby/object:RI::MethodSummary 
  name: postproc
- !ruby/object:RI::MethodSummary 
  name: preproc
- !ruby/object:RI::MethodSummary 
  name: search
name: SLex
superclass: Object
ri/1.8/system/IRB/SLex/preproc-i.yaml000064400000000266150403646050013072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex#preproc
is_singleton: false
name: preproc
params: (token, proc)
visibility: public
ri/1.8/system/IRB/SLex/search-i.yaml000064400000000256150403646050012664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::SLex#search
is_singleton: false
name: search
params: (token)
visibility: public
ri/1.8/system/IRB/rc_file_generators-c.yaml000064400000000557150403646050014376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: "proc{|rc|  rc == \"rc\" ? irbrc : irbrc+rc"
comment: 
- !ruby/struct:SM::Flow::P 
  body: enumerate possible rc-file base name generators
full_name: IRB::rc_file_generators
is_singleton: true
name: rc_file_generators
params: "() {|proc{|rc| rc == \"rc\" ? irbrc : irbrc+rc| ...}"
visibility: public
ri/1.8/system/IRB/MethodExtender/cdesc-MethodExtender.yaml000064400000000555150403646050017235 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::MethodExtender
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_post_proc
- !ruby/object:RI::MethodSummary 
  name: def_pre_proc
- !ruby/object:RI::MethodSummary 
  name: new_alias_name
name: MethodExtender
superclass: 
ri/1.8/system/IRB/MethodExtender/new_alias_name-i.yaml000064400000000503150403646050016420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "return #{prefix}#{name}#{postfix}&lt;num&gt;"
full_name: IRB::MethodExtender#new_alias_name
is_singleton: false
name: new_alias_name
params: (name, prefix = "__alias_of__", postfix = "__")
visibility: public
ri/1.8/system/IRB/MethodExtender/def_pre_proc-i.yaml000064400000000331150403646050016104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::MethodExtender#def_pre_proc
is_singleton: false
name: def_pre_proc
params: (base_method, extend_method)
visibility: public
ri/1.8/system/IRB/MethodExtender/def_post_proc-i.yaml000064400000000333150403646050016305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::MethodExtender#def_post_proc
is_singleton: false
name: def_post_proc
params: (base_method, extend_method)
visibility: public
ri/1.8/system/IRB/irb_exit-c.yaml000064400000000257150403646050012344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::irb_exit
is_singleton: true
name: irb_exit
params: (irb, ret)
visibility: public
ri/1.8/system/IRB/Locale/print-i.yaml000064400000000256150403646050013077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#print
is_singleton: false
name: print
params: (*opts)
visibility: public
ri/1.8/system/IRB/Locale/printf-i.yaml000064400000000260150403646050013240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#printf
is_singleton: false
name: printf
params: (*opts)
visibility: public
ri/1.8/system/IRB/Locale/lc2kconv-i.yaml000064400000000264150403646050013463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#lc2kconv
is_singleton: false
name: lc2kconv
params: (lang)
visibility: private
ri/1.8/system/IRB/Locale/find-i.yaml000064400000000270150403646050012657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#find
is_singleton: false
name: find
params: (file , paths = $:)
visibility: public
ri/1.8/system/IRB/Locale/String-i.yaml000064400000000256150403646050013211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#String
is_singleton: false
name: String
params: (mes)
visibility: public
ri/1.8/system/IRB/Locale/readline-i.yaml000064400000000262150403646050013523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#readline
is_singleton: false
name: readline
params: (*rs)
visibility: public
ri/1.8/system/IRB/Locale/cdesc-Locale.yaml000064400000002165150403646050013774 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: lang
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: JPDefaultLocale
  value: "\"ja\""
- !ruby/object:RI::Constant 
  comment: 
  name: LOCALE_DIR
  value: "\"/lc/\""
full_name: IRB::Locale
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: String
- !ruby/object:RI::MethodSummary 
  name: find
- !ruby/object:RI::MethodSummary 
  name: format
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: lc2kconv
- !ruby/object:RI::MethodSummary 
  name: lc_path
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: printf
- !ruby/object:RI::MethodSummary 
  name: puts
- !ruby/object:RI::MethodSummary 
  name: readline
- !ruby/object:RI::MethodSummary 
  name: real_load
- !ruby/object:RI::MethodSummary 
  name: require
- !ruby/object:RI::MethodSummary 
  name: search_file
name: Locale
superclass: Object
ri/1.8/system/IRB/Locale/load-i.yaml000064400000000265150403646050012662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#load
is_singleton: false
name: load
params: (file, priv=nil)
visibility: public
ri/1.8/system/IRB/Locale/lc_path-i.yaml000064400000000303150403646050013346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#lc_path
is_singleton: false
name: lc_path
params: (file = "", lc = @lang)
visibility: private
ri/1.8/system/IRB/Locale/require-i.yaml000064400000000275150403646050013420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#require
is_singleton: false
name: require
params: (file, priv = nil)
visibility: public
ri/1.8/system/IRB/Locale/new-c.yaml000064400000000261150403646050012522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale::new
is_singleton: true
name: new
params: (locale = nil)
visibility: public
ri/1.8/system/IRB/Locale/gets-i.yaml000064400000000252150403646050012701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#gets
is_singleton: false
name: gets
params: (*rs)
visibility: public
ri/1.8/system/IRB/Locale/format-i.yaml000064400000000260150403646050013226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#format
is_singleton: false
name: format
params: (*opts)
visibility: public
ri/1.8/system/IRB/Locale/real_load-i.yaml000064400000000274150403646050013665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#real_load
is_singleton: false
name: real_load
params: (path, priv)
visibility: private
ri/1.8/system/IRB/Locale/search_file-i.yaml000064400000000300150403646060014176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#search_file
is_singleton: false
name: search_file
params: (path, file)
visibility: private
ri/1.8/system/IRB/Locale/puts-i.yaml000064400000000254150403646060012735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Locale#puts
is_singleton: false
name: puts
params: (*opts)
visibility: public
ri/1.8/system/IRB/Irb/suspend_input_method-i.yaml000064400000000347150403646060015522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: back_io
comment: 
full_name: IRB::Irb#suspend_input_method
is_singleton: false
name: suspend_input_method
params: (input_method) {|back_io| ...}
visibility: public
ri/1.8/system/IRB/Irb/suspend_workspace-i.yaml000064400000000354150403646060015017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: back_workspace
comment: 
full_name: IRB::Irb#suspend_workspace
is_singleton: false
name: suspend_workspace
params: (workspace) {|back_workspace| ...}
visibility: public
ri/1.8/system/IRB/Irb/cdesc-Irb.yaml000064400000002006150403646060012621 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: context
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: scanner
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: irb interpriter main routine
constants: []

full_name: IRB::Irb
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: eval_input
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: output_value
- !ruby/object:RI::MethodSummary 
  name: prompt
- !ruby/object:RI::MethodSummary 
  name: signal_handle
- !ruby/object:RI::MethodSummary 
  name: signal_handle
- !ruby/object:RI::MethodSummary 
  name: signal_status
- !ruby/object:RI::MethodSummary 
  name: suspend_context
- !ruby/object:RI::MethodSummary 
  name: suspend_input_method
- !ruby/object:RI::MethodSummary 
  name: suspend_name
- !ruby/object:RI::MethodSummary 
  name: suspend_workspace
name: Irb
superclass: Object
ri/1.8/system/IRB/Irb/prompt-i.yaml000064400000000306150403646070012577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Irb#prompt
is_singleton: false
name: prompt
params: (prompt, ltype, indent, line_no)
visibility: public
ri/1.8/system/IRB/Irb/inspect-i.yaml000064400000000252150403646070012723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Irb#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/IRB/Irb/suspend_name-i.yaml000064400000000373150403646070013743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: back_path, back_name
comment: 
full_name: IRB::Irb#suspend_name
is_singleton: false
name: suspend_name
params: (path = nil, name = nil) {|back_path, back_name| ...}
visibility: public
ri/1.8/system/IRB/Irb/new-c.yaml000064400000000332150403646070012040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Irb::new
is_singleton: true
name: new
params: (workspace = nil, input_method = nil, output_method = nil)
visibility: public
ri/1.8/system/IRB/Irb/signal_handle-i.yaml000064400000000266150403646070014053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Irb#signal_handle
is_singleton: false
name: signal_handle
params: ()
visibility: public
ri/1.8/system/IRB/Irb/signal_status-i.yaml000064400000000377150403646100014140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: if @signal_status == :IN_LOAD
comment: 
full_name: IRB::Irb#signal_status
is_singleton: false
name: signal_status
params: (status) {|if @signal_status == :IN_LOAD| ...}
visibility: public
ri/1.8/system/IRB/Irb/output_value-i.yaml000064400000000264150403646100014007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Irb#output_value
is_singleton: false
name: output_value
params: ()
visibility: public
ri/1.8/system/IRB/Irb/eval_input-i.yaml000064400000000260150403646100013415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Irb#eval_input
is_singleton: false
name: eval_input
params: ()
visibility: public
ri/1.8/system/IRB/Irb/suspend_context-i.yaml000064400000000342150403646100014475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: back_context
comment: 
full_name: IRB::Irb#suspend_context
is_singleton: false
name: suspend_context
params: (context) {|back_context| ...}
visibility: public
ri/1.8/system/IRB/CurrentContext-c.yaml000064400000000263150403646100013517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::CurrentContext
is_singleton: true
name: CurrentContext
params: ()
visibility: public
ri/1.8/system/IRB/irb-c.yaml000064400000000343150403646100011303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: invoke multi-irb
full_name: IRB::irb
is_singleton: true
name: irb
params: (file = nil, *main)
visibility: public
ri/1.8/system/IRB/conf-c.yaml000064400000000237150403646110011457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::conf
is_singleton: true
name: conf
params: ()
visibility: public
ri/1.8/system/IRB/Notifier/def_notifier-i.yaml000064400000000353150403646110014753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier#def_notifier
is_singleton: false
name: def_notifier
params: (prefix = "", output_method = StdioOutputMethod.new)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/print-i.yaml000064400000000302150403646110016733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier#print
is_singleton: false
name: print
params: (*opts)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/printf-i.yaml000064400000000314150403646110017104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier#printf
is_singleton: false
name: printf
params: (format, *opts)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/ppx-i.yaml000064400000000306150403646120016413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier#ppx
is_singleton: false
name: ppx
params: (prefix, *objs)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/pp-i.yaml000064400000000274150403646120016227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier#pp
is_singleton: false
name: pp
params: (*objs)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/new-c.yaml000064400000000316150403646120016370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier::new
is_singleton: true
name: new
params: (prefix, base_notifier)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/notify%3f-i.yaml000064400000000301150403646120017405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier#notify?
is_singleton: false
name: notify?
params: ()
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/cdesc-AbstructNotifier.yaml000064400000001302150403646120021721 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: prefix
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::Notifier::AbstructNotifier
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: exec_if
- !ruby/object:RI::MethodSummary 
  name: notify?
- !ruby/object:RI::MethodSummary 
  name: pp
- !ruby/object:RI::MethodSummary 
  name: ppx
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: printf
- !ruby/object:RI::MethodSummary 
  name: printn
- !ruby/object:RI::MethodSummary 
  name: puts
name: AbstructNotifier
superclass: Object
ri/1.8/system/IRB/Notifier/AbstructNotifier/printn-i.yaml000064400000000304150403646120017114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier#printn
is_singleton: false
name: printn
params: (*opts)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/puts-i.yaml000064400000000300150403646130016572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::AbstructNotifier#puts
is_singleton: false
name: puts
params: (*objs)
visibility: public
ri/1.8/system/IRB/Notifier/AbstructNotifier/exec_if-i.yaml000064400000000350150403646130017206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@base_notifier)
comment: 
full_name: IRB::Notifier::AbstructNotifier#exec_if
is_singleton: false
name: exec_if
params: () {|@base_notifier| ...}
visibility: public
ri/1.8/system/IRB/Notifier/CompositeNotifier/cdesc-CompositeNotifier.yaml000064400000001074150403646130022256 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: level_notifier
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: notifiers
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::Notifier::CompositeNotifier
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_notifier
- !ruby/object:RI::MethodSummary 
  name: level=
- !ruby/object:RI::MethodSummary 
  name: level_notifier=
name: CompositeNotifier
superclass: AbstructNotifier
ri/1.8/system/IRB/Notifier/CompositeNotifier/def_notifier-i.yaml000064400000000336150403646130020420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::CompositeNotifier#def_notifier
is_singleton: false
name: def_notifier
params: (level, prefix = "")
visibility: public
ri/1.8/system/IRB/Notifier/CompositeNotifier/level%3d-i.yaml000064400000000406150403646140017365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #level_notifier="
full_name: IRB::Notifier::CompositeNotifier#level=
is_singleton: false
name: level=
params: (value)
visibility: public
ri/1.8/system/IRB/Notifier/CompositeNotifier/level_notifier%3d-i.yaml000064400000000401150403646140021257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: level=
block_params: 
comment: 
full_name: IRB::Notifier::CompositeNotifier#level_notifier=
is_singleton: false
name: level_notifier=
params: (value)
visibility: public
ri/1.8/system/IRB/Notifier/CompositeNotifier/new-c.yaml000064400000000317150403646140016546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::CompositeNotifier::new
is_singleton: true
name: new
params: (prefix, base_notifier)
visibility: public
ri/1.8/system/IRB/Notifier/LeveledNotifier/cdesc-LeveledNotifier.yaml000064400000000734150403646140021315 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: level
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::Notifier::LeveledNotifier
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: notify?
name: LeveledNotifier
superclass: AbstructNotifier
ri/1.8/system/IRB/Notifier/LeveledNotifier/%3c%3d%3e-i.yaml000064400000000275150403646140016547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::LeveledNotifier#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/IRB/Notifier/LeveledNotifier/new-c.yaml000064400000000313150403646150016161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::LeveledNotifier::new
is_singleton: true
name: new
params: (base, level, prefix)
visibility: public
ri/1.8/system/IRB/Notifier/LeveledNotifier/notify%3f-i.yaml000064400000000300150403646150017200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::LeveledNotifier#notify?
is_singleton: false
name: notify?
params: ()
visibility: public
ri/1.8/system/IRB/Notifier/cdesc-Notifier.yaml000064400000000501150403646150014725 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: D_NOMSG
  value: NoMsgNotifier.new
full_name: IRB::Notifier
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_notifier
name: Notifier
superclass: 
ri/1.8/system/IRB/Notifier/NoMsgNotifier/cdesc-NoMsgNotifier.yaml000064400000000471150403646160020423 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::Notifier::NoMsgNotifier
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: notify?
name: NoMsgNotifier
superclass: LeveledNotifier
ri/1.8/system/IRB/Notifier/NoMsgNotifier/new-c.yaml000064400000000266150403646160015634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::NoMsgNotifier::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/IRB/Notifier/NoMsgNotifier/notify%3f-i.yaml000064400000000276150403646160016660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::Notifier::NoMsgNotifier#notify?
is_singleton: false
name: notify?
params: ()
visibility: public
ri/1.8/system/IRB/Abort/cdesc-Abort.yaml000064400000000277150403646170013521 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::Abort
includes: []

instance_methods: []

name: Abort
superclass: Exception
ri/1.8/system/IRB/JobManager-c.yaml000064400000000253150403646170012543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::JobManager
is_singleton: true
name: JobManager
params: ()
visibility: public
ri/1.8/system/IRB/irb_abort-c.yaml000064400000000277150403646170012507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::irb_abort
is_singleton: true
name: irb_abort
params: (irb, exception = Abort)
visibility: public
ri/1.8/system/IRB/LoadAbort/cdesc-LoadAbort.yaml000064400000000307150403646170015113 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::LoadAbort
includes: []

instance_methods: []

name: LoadAbort
superclass: Exception
ri/1.8/system/IRB/print_usage-c.yaml000064400000000255150403646170013060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::print_usage
is_singleton: true
name: print_usage
params: ()
visibility: public
ri/1.8/system/IRB/InputMethod/new-c.yaml000064400000000300150403646170013560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::InputMethod::new
is_singleton: true
name: new
params: (file = STDIN_FILE_NAME)
visibility: public
ri/1.8/system/IRB/InputMethod/gets-i.yaml000064400000000254150403646170013747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::InputMethod#gets
is_singleton: false
name: gets
params: ()
visibility: public
ri/1.8/system/IRB/InputMethod/cdesc-InputMethod.yaml000064400000000740150403646170016076 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: file_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: prompt
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::InputMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: readable_atfer_eof?
name: InputMethod
superclass: Object
ri/1.8/system/IRB/InputMethod/readable_atfer_eof%3f-i.yaml000064400000000312150403646170017047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::InputMethod#readable_atfer_eof?
is_singleton: false
name: readable_atfer_eof?
params: ()
visibility: public
ri/1.8/system/IRB/StdioOutputMethod/print-i.yaml000064400000000271150403646170015344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::StdioOutputMethod#print
is_singleton: false
name: print
params: (*opts)
visibility: public
ri/1.8/system/IRB/StdioOutputMethod/cdesc-StdioOutputMethod.yaml000064400000000407150403646170020506 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: IRB::StdioOutputMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: print
name: StdioOutputMethod
superclass: OutputMethod
ri/1.8/system/IRB/version-c.yaml000064400000000334150403646170012223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: IRB version method
full_name: IRB::version
is_singleton: true
name: version
params: ()
visibility: public
ri/1.8/system/IRB/initialize_tracer-c.yaml000064400000000371150403646170014240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: initialize tracing function
full_name: IRB::initialize_tracer
is_singleton: true
name: initialize_tracer
params: ()
visibility: public
ri/1.8/system/IRB/delete_caller-c.yaml000064400000000261150403646170013321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::delete_caller
is_singleton: true
name: delete_caller
params: ()
visibility: public
ri/1.8/system/IRB/ReadlineInputMethod/line-i.yaml000064400000000273150403646170015401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ReadlineInputMethod#line
is_singleton: false
name: line
params: (line_no)
visibility: public
ri/1.8/system/IRB/ReadlineInputMethod/cdesc-ReadlineInputMethod.yaml000064400000001001150403646170021175 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::ReadlineInputMethod
includes: 
- !ruby/object:RI::IncludedModule 
  name: Readline
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: line
- !ruby/object:RI::MethodSummary 
  name: readable_atfer_eof?
name: ReadlineInputMethod
superclass: InputMethod
ri/1.8/system/IRB/ReadlineInputMethod/new-c.yaml000064400000000262150403646170015233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ReadlineInputMethod::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/IRB/ReadlineInputMethod/gets-i.yaml000064400000000264150403646170015414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ReadlineInputMethod#gets
is_singleton: false
name: gets
params: ()
visibility: public
ri/1.8/system/IRB/ReadlineInputMethod/eof%3f-i.yaml000064400000000264150403646170015521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ReadlineInputMethod#eof?
is_singleton: false
name: eof?
params: ()
visibility: public
ri/1.8/system/IRB/ReadlineInputMethod/readable_atfer_eof%3f-i.yaml000064400000000322150403646170020514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::ReadlineInputMethod#readable_atfer_eof?
is_singleton: false
name: readable_atfer_eof?
params: ()
visibility: public
ri/1.8/system/IRB/setup-c.yaml000064400000000336150403646170011700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: initialize config
full_name: IRB::setup
is_singleton: true
name: setup
params: (ap_path)
visibility: public
ri/1.8/system/IRB/History/size-i.yaml000064400000000254150403646170013160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::History#size
is_singleton: false
name: size
params: (size)
visibility: public
ri/1.8/system/IRB/History/%5b%5d-i.yaml000064400000000251150403646170013054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::History#[]
is_singleton: false
name: "[]"
params: (idx)
visibility: public
ri/1.8/system/IRB/History/cdesc-History.yaml000064400000000647150403646170014506 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::History
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: push
- !ruby/object:RI::MethodSummary 
  name: size
name: History
superclass: Object
ri/1.8/system/IRB/History/inspect-i.yaml000064400000000256150403646170013655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::History#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/IRB/History/new-c.yaml000064400000000257150403646200012766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::History::new
is_singleton: true
name: new
params: (size = 16)
visibility: public
ri/1.8/system/IRB/History/push-i.yaml000064400000000257150403646200013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::History#push
is_singleton: false
name: push
params: (no, val)
visibility: public
ri/1.8/system/IRB/init_config-c.yaml000064400000000360150403646200013017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "@CONF default setting"
full_name: IRB::init_config
is_singleton: true
name: init_config
params: (ap_path)
visibility: public
ri/1.8/system/IRB/WorkSpace/evaluate-i.yaml000064400000000335150403646200014243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::WorkSpace#evaluate
is_singleton: false
name: evaluate
params: (context, statements, file = nil, line = nil)
visibility: public
ri/1.8/system/IRB/WorkSpace/filter_backtrace-i.yaml000064400000000402150403646200015714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: error message manipulator
full_name: IRB::WorkSpace#filter_backtrace
is_singleton: false
name: filter_backtrace
params: (bt)
visibility: public
ri/1.8/system/IRB/WorkSpace/cdesc-WorkSpace.yaml000064400000001102150403646200015155 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: binding
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: main
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::WorkSpace
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __evaluate__
- !ruby/object:RI::MethodSummary 
  name: evaluate
- !ruby/object:RI::MethodSummary 
  name: evaluate
- !ruby/object:RI::MethodSummary 
  name: filter_backtrace
name: WorkSpace
superclass: Object
ri/1.8/system/IRB/WorkSpace/new-c.yaml000064400000000464150403646200013223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: create new workspace. set self to main if specified, otherwise inherit main from TOPLEVEL_BINDING.
full_name: IRB::WorkSpace::new
is_singleton: true
name: new
params: (*main)
visibility: public
ri/1.8/system/IRB/WorkSpace/__evaluate__-i.yaml000064400000000451150403646200015036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #evaluate"
full_name: IRB::WorkSpace#__evaluate__
is_singleton: false
name: __evaluate__
params: (context, statements, file = __FILE__, line = __LINE__)
visibility: public
ri/1.8/system/IRB/parse_opts-c.yaml000064400000000340150403646200012704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: option analyzing
full_name: IRB::parse_opts
is_singleton: true
name: parse_opts
params: ()
visibility: public
ri/1.8/system/IRB/load_modules-c.yaml000064400000000343150403646200013177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: loading modules
full_name: IRB::load_modules
is_singleton: true
name: load_modules
params: ()
visibility: public
ri/1.8/system/IRB/start-c.yaml000064400000000371150403646200011666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: initialize IRB and start TOP_LEVEL irb
full_name: IRB::start
is_singleton: true
name: start
params: (ap_path = nil)
visibility: public
ri/1.8/system/IRB/StdioInputMethod/line-i.yaml000064400000000270150403646200014727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::StdioInputMethod#line
is_singleton: false
name: line
params: (line_no)
visibility: public
ri/1.8/system/IRB/StdioInputMethod/cdesc-StdioInputMethod.yaml000064400000000712150403646200020075 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: IRB::StdioInputMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: line
- !ruby/object:RI::MethodSummary 
  name: readable_atfer_eof?
name: StdioInputMethod
superclass: InputMethod
ri/1.8/system/IRB/StdioInputMethod/new-c.yaml000064400000000257150403646200014570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::StdioInputMethod::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/IRB/StdioInputMethod/gets-i.yaml000064400000000261150403646200014742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::StdioInputMethod#gets
is_singleton: false
name: gets
params: ()
visibility: public
ri/1.8/system/IRB/StdioInputMethod/eof%3f-i.yaml000064400000000261150403646200015047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::StdioInputMethod#eof?
is_singleton: false
name: eof?
params: ()
visibility: public
ri/1.8/system/IRB/StdioInputMethod/readable_atfer_eof%3f-i.yaml000064400000000317150403646200020051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::StdioInputMethod#readable_atfer_eof?
is_singleton: false
name: readable_atfer_eof?
params: ()
visibility: public
ri/1.8/system/IRB/OutputMethod/print-i.yaml000064400000000264150403646210014336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::OutputMethod#print
is_singleton: false
name: print
params: (*opts)
visibility: public
ri/1.8/system/IRB/OutputMethod/printf-i.yaml000064400000000360150403646220014502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: extend printf
full_name: IRB::OutputMethod#printf
is_singleton: false
name: printf
params: (format, *opts)
visibility: public
ri/1.8/system/IRB/OutputMethod/ppx-i.yaml000064400000000270150403646220014007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::OutputMethod#ppx
is_singleton: false
name: ppx
params: (prefix, *objs)
visibility: public
ri/1.8/system/IRB/OutputMethod/foo-i.yaml000064400000000261150403646220013763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::OutputMethod#foo
is_singleton: false
name: foo
params: (format)
visibility: public
ri/1.8/system/IRB/OutputMethod/parse_printf_format-i.yaml000064400000001145150403646220017246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "% &lt;\xA5\xD5\xA5\xE9\xA5\xB0&gt; [#0- +] &lt;\xBA\xC7\xBE\xAE\xA5\xD5\xA5\xA3\xA1\xBC\xA5\xEB\xA5\xC9\xC9\xFD&gt; (*|*[1-9][0-9]*\\$|[1-9][0-9]*) &lt;\xC0\xBA\xC5\xD9&gt;.(*|*[1-9][0-9]*\\$|[1-9][0-9]*|)? #&lt;\xC4\xB9\xA4\xB5\xBD\xA4\xC0\xB5\xCA\xB8\xBB\xFA&gt;(hh|h|l|ll|L|q|j|z|t) &lt;\xCA\xD1\xB4\xB9\xBD\xA4\xC0\xB5\xCA\xB8\xBB\xFA&gt;[diouxXeEfgGcsb%]"
full_name: IRB::OutputMethod#parse_printf_format
is_singleton: false
name: parse_printf_format
params: (format, opts)
visibility: public
ri/1.8/system/IRB/OutputMethod/pp-i.yaml000064400000000256150403646230013624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::OutputMethod#pp
is_singleton: false
name: pp
params: (*objs)
visibility: public
ri/1.8/system/IRB/OutputMethod/printn-i.yaml000064400000000266150403646230014520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::OutputMethod#printn
is_singleton: false
name: printn
params: (*opts)
visibility: public
ri/1.8/system/IRB/OutputMethod/puts-i.yaml000064400000000262150403646240014176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: IRB::OutputMethod#puts
is_singleton: false
name: puts
params: (*objs)
visibility: public
ri/1.8/system/IRB/OutputMethod/cdesc-OutputMethod.yaml000064400000001277150403646240016504 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: OutputMethod
- !ruby/struct:SM::Flow::VERB 
  body: "  StdioOutputMethod\n"
constants: []

full_name: IRB::OutputMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: foo
- !ruby/object:RI::MethodSummary 
  name: parse_printf_format
- !ruby/object:RI::MethodSummary 
  name: pp
- !ruby/object:RI::MethodSummary 
  name: ppx
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: printf
- !ruby/object:RI::MethodSummary 
  name: printn
- !ruby/object:RI::MethodSummary 
  name: puts
name: OutputMethod
superclass: Object
ri/1.8/system/Prime/each-i.yaml000064400000000262150403646240012102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: succ
comment: 
full_name: Prime#each
is_singleton: false
name: each
params: () {|succ| ...}
visibility: public
ri/1.8/system/Prime/cdesc-Prime.yaml000064400000000637150403646250013116 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Prime
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: succ
name: Prime
superclass: Object
ri/1.8/system/Prime/next-i.yaml000064400000000327150403646250012163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #succ"
full_name: Prime#next
is_singleton: false
name: next
params: ()
visibility: public
ri/1.8/system/Prime/new-c.yaml000064400000000237150403646260011771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Prime::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Prime/succ-i.yaml000064400000000311150403646260012134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: next
block_params: 
comment: 
full_name: Prime#succ
is_singleton: false
name: succ
params: ()
visibility: public
ri/1.8/system/Sync/new-c.yaml000064400000000236150403646260011630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Sync::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Sync/cdesc-Sync.yaml000064400000000417150403646260012613 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Sync
includes: 
- !ruby/object:RI::IncludedModule 
  name: Sync_m
instance_methods: []

name: Sync
superclass: Object
ri/1.8/system/TCPServer/cdesc-TCPServer.yaml000064400000003322150403646260014413 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: []

full_name: TCPServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept_nonblock
- !ruby/object:RI::MethodSummary 
  name: listen
name: TCPServer
superclass: TCPSocket
ri/1.8/system/TCPServer/accept_nonblock-i.yaml000064400000002517150403646260015076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     serv = TCPServer.new(2202)\n     begin\n       sock = serv.accept_nonblock\n     rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR\n       IO.select([serv])\n       retry\n     end\n     # sock is an accepted socket.\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#accept for the exceptions that may be thrown if the call to TCPServer#accept_nonblock fails.
- !ruby/struct:SM::Flow::P 
  body: TCPServer#accept_nonblock may raise any error corresponding to accept(2) failure, including Errno::EAGAIN.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: TCPServer#accept
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#accept
  type: :BULLET
full_name: TCPServer#accept_nonblock
is_singleton: false
name: accept_nonblock
params: |
  tcpserver.accept_nonblock => tcpsocket

visibility: public
ri/1.8/system/TCPServer/listen-i.yaml000064400000012047150403646260013247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Listens for connections, using the specified <tt>int</tt> as the backlog. A call to <em>listen</em> only applies if the <tt>socket</tt> is of type SOCK_STREAM or SOCK_SEQPACKET.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameter
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>backlog</tt> - the maximum length of the queue for pending connections.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example 1
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.bind( sockaddr )\n     socket.listen( 5 )\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example 2 (listening on an arbitary port, unix-based systems only):"
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     socket.listen( 1 )\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Unix-based Exceptions
- !ruby/struct:SM::Flow::P 
  body: On unix based systems the above will work because a new <tt>sockaddr</tt> struct is created on the address ADDR_ANY, for an arbitrary port number as handed off by the kernel. It will not work on Windows, because Windows requires that the <tt>socket</tt> is bound by calling <em>bind</em> before it can <em>listen</em>.
- !ruby/struct:SM::Flow::P 
  body: If the <em>backlog</em> amount exceeds the implementation-dependent maximum queue length, the implementation's maximum queue length will be used.
- !ruby/struct:SM::Flow::P 
  body: "On unix-based based systems the following system exceptions may be raised if the call to <em>listen</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EBADF - the <em>socket</em> argument is not a valid file descriptor
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EDESTADDRREQ - the <em>socket</em> is not bound to a local address, and the protocol does not support listening on an unbound socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <em>socket</em> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <em>socket</em> argument does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the <em>socket</em> protocol does not support listen
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - the calling process does not have approriate privileges
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <em>socket</em> has been shut down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - insufficient resources are available in the system to complete the call
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Windows Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On Windows systems the following system exceptions may be raised if the call to <em>listen</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN - the network is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRINUSE - the socket's local address is already in use. This usually occurs during the execution of <em>bind</em> but could be delayed if the call to <em>bind</em> was to a partially wildcard address (involving ADDR_ANY) and if a specific address needs to be commmitted at the time of the call to <em>listen</em>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINPROGRESS - a Windows Sockets 1.1 call is in progress or the service provider is still processing a callback function
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <tt>socket</tt> has not been bound with a call to <em>bind</em>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EISCONN - the <tt>socket</tt> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EMFILE - no more socket descriptors are available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOC - <tt>socket</tt> is not a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the referenced <tt>socket</tt> is not a type that supports the <em>listen</em> method
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: listen manual pages on unix-based systems
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: listen function in Microsoft's Winsock functions reference
  type: :BULLET
full_name: TCPServer#listen
is_singleton: false
name: listen
params: |
  socket.listen( int ) => 0

visibility: public
ri/1.8/system/NonString/cdesc-NonString.yaml000064400000000315150403646270014623 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: NonString
includes: []

instance_methods: []

name: NonString
superclass: Test::Unit::TestCase
ri/1.8/system/SystemExit/cdesc-SystemExit.yaml000064400000001406150403646270015217 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: SystemExit
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: status
- !ruby/object:RI::MethodSummary 
  name: success?
name: SystemExit
superclass: Exception
ri/1.8/system/SystemExit/new-c.yaml000064400000000466150403646270013040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new <tt>SystemExit</tt> exception with the given status.
full_name: SystemExit::new
is_singleton: true
name: new
params: |
  SystemExit.new(status=0)   => system_exit

visibility: public
ri/1.8/system/SystemExit/status-i.yaml000064400000000451150403646300013564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the status value associated with this system exit.
full_name: SystemExit#status
is_singleton: false
name: status
params: |
  system_exit.status   => fixnum

visibility: public
ri/1.8/system/SystemExit/success%3f-i.yaml000064400000000477150403646300014217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if exiting successful, <tt>false</tt> if not.
full_name: SystemExit#success?
is_singleton: false
name: success?
params: |
  system_exit.success?  => true or false

visibility: public
ri/1.8/system/PP/ObjectMixin/pretty_print_instance_variables-i.yaml000064400000000710150403646300021332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a sorted array of instance variable names.
- !ruby/struct:SM::Flow::P 
  body: "This method should return an array of names of instance variables as symbols or strings as: +[:@a, :@b]+."
full_name: PP::ObjectMixin#pretty_print_instance_variables
is_singleton: false
name: pretty_print_instance_variables
params: ()
visibility: public
ri/1.8/system/PP/ObjectMixin/pretty_print-i.yaml000064400000001261150403646300015420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A default pretty printing method for general objects. It calls #pretty_print_instance_variables to list instance variables."
- !ruby/struct:SM::Flow::P 
  body: "If <tt>self</tt> has a customized (redefined) #inspect method, the result of self.inspect is used but it obviously has no line break hints."
- !ruby/struct:SM::Flow::P 
  body: "This module provides predefined #pretty_print methods for some of the most commonly used built-in classes for convenience."
full_name: PP::ObjectMixin#pretty_print
is_singleton: false
name: pretty_print
params: (q)
visibility: public
ri/1.8/system/PP/ObjectMixin/pretty_print_cycle-i.yaml000064400000000507150403646300016601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A default pretty printing method for general objects that are detected as part of a cycle.
full_name: PP::ObjectMixin#pretty_print_cycle
is_singleton: false
name: pretty_print_cycle
params: (q)
visibility: public
ri/1.8/system/PP/ObjectMixin/cdesc-ObjectMixin.yaml000064400000000673150403646300015727 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: PP::ObjectMixin
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: pretty_print
- !ruby/object:RI::MethodSummary 
  name: pretty_print_cycle
- !ruby/object:RI::MethodSummary 
  name: pretty_print_inspect
- !ruby/object:RI::MethodSummary 
  name: pretty_print_instance_variables
name: ObjectMixin
superclass: 
ri/1.8/system/PP/ObjectMixin/pretty_print_inspect-i.yaml000064400000001126150403646300017145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Is #inspect implementation using #pretty_print. If you implement #pretty_print, it can be used as follows."
- !ruby/struct:SM::Flow::VERB 
  body: "  alias inspect pretty_print_inspect\n"
- !ruby/struct:SM::Flow::P 
  body: "However, doing this requires that every class that #inspect is called on implement #pretty_print, or a RuntimeError will be raised."
full_name: PP::ObjectMixin#pretty_print_inspect
is_singleton: false
name: pretty_print_inspect
params: ()
visibility: public
ri/1.8/system/PP/singleline_pp-c.yaml000064400000000572150403646300013270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Outputs <tt>obj</tt> to <tt>out</tt> like PP.pp but with no indent and newline.
- !ruby/struct:SM::Flow::P 
  body: PP.singleline_pp returns <tt>out</tt>.
full_name: PP::singleline_pp
is_singleton: true
name: singleline_pp
params: (obj, out=$>)
visibility: public
ri/1.8/system/PP/SingleLine/cdesc-SingleLine.yaml000064400000000410150403646300015350 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: PP::SingleLine
includes: 
- !ruby/object:RI::IncludedModule 
  name: PPMethods
instance_methods: []

name: SingleLine
superclass: PrettyPrint::SingleLine
ri/1.8/system/PP/pp-c.yaml000064400000000766150403646300011064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Outputs <tt>obj</tt> to <tt>out</tt> in pretty printed format of <tt>width</tt> columns in width.
- !ruby/struct:SM::Flow::P 
  body: If <tt>out</tt> is omitted, +$&gt;+ is assumed. If <tt>width</tt> is omitted, 79 is assumed.
- !ruby/struct:SM::Flow::P 
  body: PP.pp returns <tt>out</tt>.
full_name: PP::pp
is_singleton: true
name: pp
params: (obj, out=$>, width=79)
visibility: public
ri/1.8/system/PP/cdesc-PP.yaml000064400000001013150403646300011605 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Returns the sharing detection flag as a boolean value. It is false by default.
  name: sharing_detection
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: pp
- !ruby/object:RI::MethodSummary 
  name: singleline_pp
comment: 
constants: []

full_name: PP
includes: 
- !ruby/object:RI::IncludedModule 
  name: PPMethods
instance_methods: []

name: PP
superclass: PrettyPrint
ri/1.8/system/PP/PPMethods/cdesc-PPMethods.yaml000064400000001300150403646300014773 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: InspectKey
  value: ":__inspect_key__"
full_name: PP::PPMethods
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: comma_breakable
- !ruby/object:RI::MethodSummary 
  name: guard_inspect_key
- !ruby/object:RI::MethodSummary 
  name: object_address_group
- !ruby/object:RI::MethodSummary 
  name: object_group
- !ruby/object:RI::MethodSummary 
  name: pp
- !ruby/object:RI::MethodSummary 
  name: pp_hash
- !ruby/object:RI::MethodSummary 
  name: pp_object
- !ruby/object:RI::MethodSummary 
  name: seplist
name: PPMethods
superclass: 
ri/1.8/system/PP/PPMethods/pp-i.yaml000064400000000716150403646300012730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds <tt>obj</tt> to the pretty printing buffer using Object#pretty_print or Object#pretty_print_cycle.
- !ruby/struct:SM::Flow::P 
  body: Object#pretty_print_cycle is used when <tt>obj</tt> is already printed, a.k.a the object reference chain has a cycle.
full_name: PP::PPMethods#pp
is_singleton: false
name: pp
params: (obj)
visibility: public
ri/1.8/system/PP/PPMethods/guard_inspect_key-i.yaml000064400000000316150403646300016004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: PP::PPMethods#guard_inspect_key
is_singleton: false
name: guard_inspect_key
params: () {|| ...}
visibility: public
ri/1.8/system/PP/PPMethods/pp_hash-i.yaml000064400000000262150403646300013727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PP::PPMethods#pp_hash
is_singleton: false
name: pp_hash
params: (obj)
visibility: public
ri/1.8/system/PP/PPMethods/seplist-i.yaml000064400000002241150403646300013767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: element
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds a separated list. The list is separated by comma with breakable space, by default.
- !ruby/struct:SM::Flow::P 
  body: "#seplist iterates the <tt>list</tt> using <tt>iter_method</tt>. It yields each object to the block given for #seplist. The procedure <tt>separator_proc</tt> is called between each yields."
- !ruby/struct:SM::Flow::P 
  body: If the iteration is zero times, <tt>separator_proc</tt> is not called at all.
- !ruby/struct:SM::Flow::P 
  body: If <tt>separator_proc</tt> is nil or not given, +lambda { comma_breakable }+ is used. If <tt>iter_method</tt> is not given, :each is used.
- !ruby/struct:SM::Flow::P 
  body: For example, following 3 code fragments has similar effect.
- !ruby/struct:SM::Flow::VERB 
  body: "  q.seplist([1,2,3]) {|v| xxx v }\n\n  q.seplist([1,2,3], lambda { comma_breakable }, :each) {|v| xxx v }\n\n  xxx 1\n  q.comma_breakable\n  xxx 2\n  q.comma_breakable\n  xxx 3\n"
full_name: PP::PPMethods#seplist
is_singleton: false
name: seplist
params: (list, sep=nil, iter_method=:each) {|element| ...}
visibility: public
ri/1.8/system/PP/PPMethods/pp_object-i.yaml000064400000000266150403646300014256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PP::PPMethods#pp_object
is_singleton: false
name: pp_object
params: (obj)
visibility: public
ri/1.8/system/PP/PPMethods/object_group-i.yaml000064400000000574150403646300014775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A convenience method which is same as follows:"
- !ruby/struct:SM::Flow::VERB 
  body: "  group(1, '#&lt;' + obj.class.name, '&gt;') { ... }\n"
full_name: PP::PPMethods#object_group
is_singleton: false
name: object_group
params: (obj) {|| ...}
visibility: public
ri/1.8/system/PP/PPMethods/object_address_group-i.yaml000064400000000324150403646300016473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PP::PPMethods#object_address_group
is_singleton: false
name: object_address_group
params: (obj, &block)
visibility: public
ri/1.8/system/PP/PPMethods/comma_breakable-i.yaml000064400000000527150403646300015375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A convenience method which is same as follows:"
- !ruby/struct:SM::Flow::VERB 
  body: "  text ','\n  breakable\n"
full_name: PP::PPMethods#comma_breakable
is_singleton: false
name: comma_breakable
params: ()
visibility: public
ri/1.8/system/Foo/cdesc-Foo.yaml000064400000000556150403646300012230 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Foo
includes: 
- !ruby/object:RI::IncludedModule 
  name: DRbUndumped
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: hello
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Foo
superclass: Object
ri/1.8/system/Foo/new-c.yaml000064400000000240150403646300011425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Foo::new
is_singleton: true
name: new
params: (str)
visibility: public
ri/1.8/system/Foo/hello-i.yaml000064400000000243150403646300011750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Foo#hello
is_singleton: false
name: hello
params: (it)
visibility: public
ri/1.8/system/Foo/to_s-i.yaml000064400000000237150403646300011614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Foo#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SingleForwardable/def_singleton_delegators-i.yaml000064400000001464150403646300020553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: def_delegators
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Shortcut for defining multiple delegator methods, but with no provision for using a different name. The following two code samples have the same effect:"
- !ruby/struct:SM::Flow::VERB 
  body: "  single_forwardable.def_delegators :@records, :size, :&lt;&lt;, :map\n\n  single_forwardable.def_delegator :@records, :size\n  single_forwardable.def_delegator :@records, :&lt;&lt;\n  single_forwardable.def_delegator :@records, :map\n"
- !ruby/struct:SM::Flow::P 
  body: See the example at forwardable.rb.
full_name: SingleForwardable#def_singleton_delegators
is_singleton: false
name: def_singleton_delegators
params: (accessor, *methods)
visibility: public
ri/1.8/system/SingleForwardable/def_delegator-i.yaml000064400000000446150403646300016305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #def_singleton_delegator"
full_name: SingleForwardable#def_delegator
is_singleton: false
name: def_delegator
params: (accessor, method, ali = method)
visibility: public
ri/1.8/system/SingleForwardable/cdesc-SingleForwardable.yaml000064400000001460150403646300017741 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "The SingleForwardable module provides delegation of specified methods to a designated object, using the methods #def_delegator and #def_delegators. This module is similar to Forwardable, but it works on objects themselves, instead of their defining classes."
- !ruby/struct:SM::Flow::P 
  body: Also see the example at forwardable.rb.
constants: []

full_name: SingleForwardable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_delegator
- !ruby/object:RI::MethodSummary 
  name: def_delegators
- !ruby/object:RI::MethodSummary 
  name: def_singleton_delegator
- !ruby/object:RI::MethodSummary 
  name: def_singleton_delegators
name: SingleForwardable
superclass: 
ri/1.8/system/SingleForwardable/def_delegators-i.yaml000064400000000435150403646300016466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #def_singleton_delegators"
full_name: SingleForwardable#def_delegators
is_singleton: false
name: def_delegators
params: (accessor, *methods)
visibility: public
ri/1.8/system/SingleForwardable/def_singleton_delegator-i.yaml000064400000001135150403646300020363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: def_delegator
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Defines a method <em>method</em> which delegates to <em>obj</em> (i.e. it calls the method of the same name in <em>obj</em>). If <em>new_name</em> is provided, it is used as the name for the delegate method.
- !ruby/struct:SM::Flow::P 
  body: See the example at forwardable.rb.
full_name: SingleForwardable#def_singleton_delegator
is_singleton: false
name: def_singleton_delegator
params: (accessor, method, ali = method)
visibility: public
ri/1.8/system/SOCKSSocket/cdesc-SOCKSSocket.yaml000064400000003226150403646310015046 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: []

full_name: SOCKSSocket
includes: []

instance_methods: []

name: SOCKSSocket
superclass: Object
ri/1.8/system/SOCKSSocket/new-c.yaml000064400000000257150403646310012746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SOCKSSocket::new
is_singleton: true
name: new
params: (host, serv)
visibility: public
ri/1.8/system/File/copy-c.yaml000064400000000643150403646320011753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Copies a file <tt>from</tt> to <tt>to</tt> using #syscopy. If <tt>to</tt> is a directory, copies <tt>from</tt> to <tt>to/from</tt>. If <tt>verbose</tt> is true, <tt>from -&gt; to</tt> is printed."
full_name: File::copy
is_singleton: true
name: copy
params: (from, to, verbose = false)
visibility: public
ri/1.8/system/File/chown-c.yaml000064400000001275150403646320012121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes the owner and group of the named file(s) to the given numeric owner and group id's. Only a process with superuser privileges may change the owner of a file. The current owner of a file may change the file's group to any group to which the owner belongs. A <tt>nil</tt> or -1 owner or group id is ignored. Returns the number of files processed.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.chown(nil, 100, &quot;testfile&quot;)\n"
full_name: File::chown
is_singleton: true
name: chown
params: |
  File.chown(owner_int, group_int, file_name,... ) -> integer

visibility: public
ri/1.8/system/File/delete-c.yaml000064400000000650150403646320012241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the named files, returning the number of names passed as arguments. Raises an exception on any error. See also <tt>Dir::rmdir</tt>.
full_name: File::delete
is_singleton: true
name: delete
params: |
  File.delete(file_name, ...)  => integer
  File.unlink(file_name, ...)  => integer

visibility: public
ri/1.8/system/File/mtime-c.yaml000064400000000640150403646330012112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the modification time for the named file as a Time object.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.mtime(&quot;testfile&quot;)   #=&gt; Tue Apr 08 12:58:04 CDT 2003\n"
full_name: File::mtime
is_singleton: true
name: mtime
params: |
  File.mtime(file_name)  =>  time

visibility: public
ri/1.8/system/File/umask-c.yaml000064400000001220150403646330012112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current umask value for this process. If the optional argument is given, set the umask to that value and return the previous value. Umask values are <em>subtracted</em> from the default permissions, so a umask of <tt>0222</tt> would make a file read-only for everyone.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.umask(0006)   #=&gt; 18\n   File.umask         #=&gt; 6\n"
full_name: File::umask
is_singleton: true
name: umask
params: |
  File.umask()          => integer
  File.umask(integer)   => integer

visibility: public
ri/1.8/system/File/ctime-i.yaml000064400000000731150403646330012107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the change time for <em>file</em> (that is, the time directory information about the file was changed, not the file itself).
- !ruby/struct:SM::Flow::VERB 
  body: "   File.new(&quot;testfile&quot;).ctime   #=&gt; Wed Apr 09 08:53:14 CDT 2003\n"
full_name: File#ctime
is_singleton: false
name: ctime
params: |
  file.ctime -> time

visibility: public
ri/1.8/system/File/makedirs-c.yaml000064400000001300150403646340012571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a directory and all its parent directories. For example,
- !ruby/struct:SM::Flow::VERB 
  body: "    File.makedirs '/usr/lib/ruby'\n"
- !ruby/struct:SM::Flow::P 
  body: causes the following directories to be made, if they do not exist.
- !ruby/struct:SM::Flow::VERB 
  body: "    * /usr\n    * /usr/lib\n    * /usr/lib/ruby\n"
- !ruby/struct:SM::Flow::P 
  body: You can pass several directories, each as a parameter. If the last parameter isn't a String, verbose mode will be enabled.
full_name: File::makedirs
is_singleton: true
name: makedirs
params: (*dirs)
visibility: public
ri/1.8/system/File/file%3f-c.yaml000064400000000467150403646340012224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and is a regular file.
full_name: File::file?
is_singleton: true
name: file?
params: |
  File.file?(file_name)   => true or false

visibility: public
ri/1.8/system/File/readable_real%3f-c.yaml000064400000000545150403646340014044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is readable by the real user id of this process.
full_name: File::readable_real?
is_singleton: true
name: readable_real?
params: |
  File.readable_real?(file_name)   => true or false

visibility: public
ri/1.8/system/File/flock-i.yaml000064400000002517150403646350012112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Locks or unlocks a file according to <em>locking_constant</em> (a logical <em>or</em> of the values in the table below). Returns <tt>false</tt> if <tt>File::LOCK_NB</tt> is specified and the operation would otherwise have blocked. Not available on all platforms.
- !ruby/struct:SM::Flow::P 
  body: "Locking constants (in class File):"
- !ruby/struct:SM::Flow::VERB 
  body: "   LOCK_EX   | Exclusive lock. Only one process may hold an\n             | exclusive lock for a given file at a time.\n   ----------+------------------------------------------------\n   LOCK_NB   | Don't block when locking. May be combined\n             | with other lock options using logical or.\n   ----------+------------------------------------------------\n   LOCK_SH   | Shared lock. Multiple processes may each hold a\n             | shared lock for a given file at the same time.\n   ----------+------------------------------------------------\n   LOCK_UN   | Unlock.\n"
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "   File.new(&quot;testfile&quot;).flock(File::LOCK_UN)   #=&gt; 0\n"
full_name: File#flock
is_singleton: false
name: flock
params: |
  file.flock (locking_constant ) =>  0 or false

visibility: public
ri/1.8/system/File/fnmatch-c.yaml000064400000011374150403646350012427 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true if <em>path</em> matches against <em>pattern</em> The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<code>*</code>:"
    body: Matches any file. Can be restricted by other values in the glob. <tt>*</tt> will match all files; <tt>c*</tt> will match all files beginning with <tt>c</tt>; <tt>*c</tt> will match all files ending with <tt>c</tt>; and <b><tt>c</tt></b> will match all files that have <tt>c</tt> in them (including at the beginning or end). Equivalent to <tt>/ .* /x</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>**</code>:"
    body: Matches directories recursively or files expansively.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>?</code>:"
    body: Matches any one character. Equivalent to <tt>/.{1}/</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>[set]</code>:"
    body: Matches any one character in <tt>set</tt>. Behaves exactly like character sets in Regexp, including set negation (<tt>[^a-z]</tt>).
  - !ruby/struct:SM::Flow::LI 
    label: "<code>\\</code>:"
    body: Escapes the next metacharacter.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: <em>flags</em> is a bitwise OR of the <tt>FNM_xxx</tt> parameters. The same glob pattern and flags are used by <tt>Dir::glob</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.fnmatch('cat',       'cat')        #=&gt; true  : match entire string\n   File.fnmatch('cat',       'category')   #=&gt; false : only match partial string\n   File.fnmatch('c{at,ub}s', 'cats')       #=&gt; false : { } isn't supported\n\n   File.fnmatch('c?t',     'cat')          #=&gt; true  : '?' match only 1 character\n   File.fnmatch('c??t',    'cat')          #=&gt; false : ditto\n   File.fnmatch('c*',      'cats')         #=&gt; true  : '*' match 0 or more characters\n   File.fnmatch('c*t',     'c/a/b/t')      #=&gt; true  : ditto\n   File.fnmatch('ca[a-z]', 'cat')          #=&gt; true  : inclusive bracket expression\n   File.fnmatch('ca[^t]',  'cat')          #=&gt; false : exclusive bracket expression ('^' or '!')\n\n   File.fnmatch('cat', 'CAT')                     #=&gt; false : case sensitive\n   File.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=&gt; true  : case insensitive\n\n   File.fnmatch('?',   '/', File::FNM_PATHNAME)  #=&gt; false : wildcard doesn't match '/' on FNM_PATHNAME\n   File.fnmatch('*',   '/', File::FNM_PATHNAME)  #=&gt; false : ditto\n   File.fnmatch('[/]', '/', File::FNM_PATHNAME)  #=&gt; false : ditto\n\n   File.fnmatch('\\?',   '?')                       #=&gt; true  : escaped wildcard becomes ordinary\n   File.fnmatch('\\a',   'a')                       #=&gt; true  : escaped ordinary remains ordinary\n   File.fnmatch('\\a',   '\\a', File::FNM_NOESCAPE)  #=&gt; true  : FNM_NOESACPE makes '\\' ordinary\n   File.fnmatch('[\\?]', '?')                       #=&gt; true  : can escape inside bracket expression\n\n   File.fnmatch('*',   '.profile')                      #=&gt; false : wildcard doesn't match leading\n   File.fnmatch('*',   '.profile', File::FNM_DOTMATCH)  #=&gt; true    period by default.\n   File.fnmatch('.*',  '.profile')                      #=&gt; true\n\n   rbfiles = '**' '/' '*.rb' # you don't have to do like this. just write in single string.\n   File.fnmatch(rbfiles, 'main.rb')                    #=&gt; false\n   File.fnmatch(rbfiles, './main.rb')                  #=&gt; false\n   File.fnmatch(rbfiles, 'lib/song.rb')                #=&gt; true\n   File.fnmatch('**.rb', 'main.rb')                    #=&gt; true\n   File.fnmatch('**.rb', './main.rb')                  #=&gt; false\n   File.fnmatch('**.rb', 'lib/song.rb')                #=&gt; true\n   File.fnmatch('*',           'dave/.profile')                      #=&gt; true\n\n   pattern = '*' '/' '*'\n   File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME)  #=&gt; false\n   File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=&gt; true\n\n   pattern = '**' '/' 'foo'\n   File.fnmatch(pattern, 'a/b/c/foo', File::FNM_PATHNAME)     #=&gt; true\n   File.fnmatch(pattern, '/a/b/c/foo', File::FNM_PATHNAME)    #=&gt; true\n   File.fnmatch(pattern, 'c:/a/b/c/foo', File::FNM_PATHNAME)  #=&gt; true\n   File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME)    #=&gt; false\n   File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=&gt; true\n"
full_name: File::fnmatch
is_singleton: true
name: fnmatch
params: |
  File.fnmatch( pattern, path, [flags] ) => (true or false)
  File.fnmatch?( pattern, path, [flags] ) => (true or false)

visibility: public
ri/1.8/system/File/ctime-c.yaml000064400000000742150403646360012106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself).
- !ruby/struct:SM::Flow::VERB 
  body: "   File.ctime(&quot;testfile&quot;)   #=&gt; Wed Apr 09 08:53:13 CDT 2003\n"
full_name: File::ctime
is_singleton: true
name: ctime
params: |
  File.ctime(file_name)  => time

visibility: public
ri/1.8/system/File/chmod-i.yaml000064400000001170150403646360012101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: o_chmod
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes permission bits on <em>file</em> to the bit pattern represented by <em>mode_int</em>. Actual effects are platform dependent; on Unix systems, see <tt>chmod(2)</tt> for details. Follows symbolic links. Also see <tt>File#lchmod</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   f = File.new(&quot;out&quot;, &quot;w&quot;);\n   f.chmod(0644)   #=&gt; 0\n"
full_name: File#chmod
is_singleton: false
name: chmod
params: |
  file.chmod(mode_int)   => 0

visibility: public
ri/1.8/system/File/lchown-c.yaml000064400000000754150403646360012302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>File::chown</tt>, but does not follow symbolic links (so it will change the owner associated with the link, not the file referenced by the link). Often not available. Returns number of files in the argument list.
full_name: File::lchown
is_singleton: true
name: lchown
params: |
  file.lchown(owner_int, group_int, file_name,..) => integer

visibility: public
ri/1.8/system/File/pipe%3f-c.yaml000064400000000445150403646360012240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a pipe.
full_name: File::pipe?
is_singleton: true
name: pipe?
params: |
  File.pipe?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/setgid%3f-c.yaml000064400000000470150403646360012560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file has the setgid bit set.
full_name: File::setgid?
is_singleton: true
name: setgid?
params: |
  File.setgid?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/blockdev%3f-c.yaml000064400000000471150403646360013073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a block device.
full_name: File::blockdev?
is_singleton: true
name: blockdev?
params: |
  File.blockdev?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/lchmod-c.yaml000064400000000673150403646360012256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>File::chmod</tt>, but does not follow symbolic links (so it will change the permissions associated with the link, not the file referenced by the link). Often not available.
full_name: File::lchmod
is_singleton: true
name: lchmod
params: |
  File.lchmod(mode_int, file_name, ...)  => integer

visibility: public
ri/1.8/system/File/cdesc-File.yaml000064400000012721150403646360012523 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: atime
- !ruby/object:RI::MethodSummary 
  name: basename
- !ruby/object:RI::MethodSummary 
  name: blockdev?
- !ruby/object:RI::MethodSummary 
  name: catname
- !ruby/object:RI::MethodSummary 
  name: chardev?
- !ruby/object:RI::MethodSummary 
  name: chmod
- !ruby/object:RI::MethodSummary 
  name: chmod
- !ruby/object:RI::MethodSummary 
  name: chown
- !ruby/object:RI::MethodSummary 
  name: compare
- !ruby/object:RI::MethodSummary 
  name: copy
- !ruby/object:RI::MethodSummary 
  name: ctime
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: directory?
- !ruby/object:RI::MethodSummary 
  name: dirname
- !ruby/object:RI::MethodSummary 
  name: executable?
- !ruby/object:RI::MethodSummary 
  name: executable_real?
- !ruby/object:RI::MethodSummary 
  name: exist?
- !ruby/object:RI::MethodSummary 
  name: exists?
- !ruby/object:RI::MethodSummary 
  name: expand_path
- !ruby/object:RI::MethodSummary 
  name: extname
- !ruby/object:RI::MethodSummary 
  name: file?
- !ruby/object:RI::MethodSummary 
  name: fnmatch
- !ruby/object:RI::MethodSummary 
  name: fnmatch?
- !ruby/object:RI::MethodSummary 
  name: ftype
- !ruby/object:RI::MethodSummary 
  name: grpowned?
- !ruby/object:RI::MethodSummary 
  name: identical?
- !ruby/object:RI::MethodSummary 
  name: install
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: lchmod
- !ruby/object:RI::MethodSummary 
  name: lchown
- !ruby/object:RI::MethodSummary 
  name: link
- !ruby/object:RI::MethodSummary 
  name: lstat
- !ruby/object:RI::MethodSummary 
  name: makedirs
- !ruby/object:RI::MethodSummary 
  name: move
- !ruby/object:RI::MethodSummary 
  name: mtime
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: owned?
- !ruby/object:RI::MethodSummary 
  name: pipe?
- !ruby/object:RI::MethodSummary 
  name: readable?
- !ruby/object:RI::MethodSummary 
  name: readable_real?
- !ruby/object:RI::MethodSummary 
  name: readlink
- !ruby/object:RI::MethodSummary 
  name: rename
- !ruby/object:RI::MethodSummary 
  name: safe_unlink
- !ruby/object:RI::MethodSummary 
  name: setgid?
- !ruby/object:RI::MethodSummary 
  name: setuid?
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: size?
- !ruby/object:RI::MethodSummary 
  name: socket?
- !ruby/object:RI::MethodSummary 
  name: split
- !ruby/object:RI::MethodSummary 
  name: stat
- !ruby/object:RI::MethodSummary 
  name: sticky?
- !ruby/object:RI::MethodSummary 
  name: symlink
- !ruby/object:RI::MethodSummary 
  name: symlink?
- !ruby/object:RI::MethodSummary 
  name: syscopy
- !ruby/object:RI::MethodSummary 
  name: truncate
- !ruby/object:RI::MethodSummary 
  name: umask
- !ruby/object:RI::MethodSummary 
  name: unlink
- !ruby/object:RI::MethodSummary 
  name: utime
- !ruby/object:RI::MethodSummary 
  name: writable?
- !ruby/object:RI::MethodSummary 
  name: writable_real?
- !ruby/object:RI::MethodSummary 
  name: zero?
comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: "ftools.rb: Extra tools for the File class"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Author:"
    body: WATANABE, Hirofumi
  - !ruby/struct:SM::Flow::LI 
    label: "Documentation:"
    body: Zachary Landau
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: This library can be distributed under the terms of the Ruby license. You can freely distribute/modify this library.
- !ruby/struct:SM::Flow::P 
  body: It is included in the Ruby standard library.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: ftools adds several (class, not instance) methods to the File class, for copying, moving, deleting, installing, and comparing files, as well as creating a directory path. See the File class for details.
- !ruby/struct:SM::Flow::P 
  body: FileUtils contains all or nearly all the same functionality and more, and is a recommended option over ftools
- !ruby/struct:SM::Flow::P 
  body: When you
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'ftools'\n"
- !ruby/struct:SM::Flow::P 
  body: then the File class aquires some utility methods for copying, moving, and deleting files, and more.
- !ruby/struct:SM::Flow::P 
  body: See the method descriptions below, and consider using FileUtils as it is more comprehensive.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Separator
  value: separator
- !ruby/object:RI::Constant 
  comment: 
  name: SEPARATOR
  value: separator
- !ruby/object:RI::Constant 
  comment: 
  name: ALT_SEPARATOR
  value: rb_obj_freeze(rb_str_new2("\\"))
- !ruby/object:RI::Constant 
  comment: 
  name: ALT_SEPARATOR
  value: Qnil
- !ruby/object:RI::Constant 
  comment: 
  name: PATH_SEPARATOR
  value: rb_obj_freeze(rb_str_new2(PATH_SEP))
- !ruby/object:RI::Constant 
  comment: 
  name: BUFSIZE
  value: 8 * 1024
full_name: File
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: atime
- !ruby/object:RI::MethodSummary 
  name: chmod
- !ruby/object:RI::MethodSummary 
  name: chown
- !ruby/object:RI::MethodSummary 
  name: ctime
- !ruby/object:RI::MethodSummary 
  name: flock
- !ruby/object:RI::MethodSummary 
  name: lstat
- !ruby/object:RI::MethodSummary 
  name: mtime
- !ruby/object:RI::MethodSummary 
  name: o_chmod
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: truncate
name: File
superclass: IO
ri/1.8/system/File/ftype-c.yaml000064400000001366150403646360012137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Identifies the type of the named file; the return string is one of ``<tt>file</tt>'', ``<tt>directory</tt>'', ``<tt>characterSpecial</tt>'', ``<tt>blockSpecial</tt>'', ``<tt>fifo</tt>'', ``<tt>link</tt>'', ``<tt>socket</tt>'', or ``<tt>unknown</tt>''.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.ftype(&quot;testfile&quot;)            #=&gt; &quot;file&quot;\n   File.ftype(&quot;/dev/tty&quot;)            #=&gt; &quot;characterSpecial&quot;\n   File.ftype(&quot;/tmp/.X11-unix/X0&quot;)   #=&gt; &quot;socket&quot;\n"
full_name: File::ftype
is_singleton: true
name: ftype
params: |
  File.ftype(file_name)   => string

visibility: public
ri/1.8/system/File/move-c.yaml000064400000000647150403646370011760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Moves a file <tt>from</tt> to <tt>to</tt> using #syscopy. If <tt>to</tt> is a directory, copies from <tt>from</tt> to <tt>to/from</tt>. If <tt>verbose</tt> is true, <tt>from -&gt; to</tt> is printed."
full_name: File::move
is_singleton: true
name: move
params: (from, to, verbose = false)
visibility: public
ri/1.8/system/File/lstat-i.yaml000064400000001217150403646370012141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>IO#stat</tt>, but does not follow the last symbolic link. Instead, reports on the link itself.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.symlink(&quot;testfile&quot;, &quot;link2test&quot;)   #=&gt; 0\n   File.stat(&quot;testfile&quot;).size              #=&gt; 66\n   f = File.new(&quot;link2test&quot;)\n   f.lstat.size                            #=&gt; 8\n   f.stat.size                             #=&gt; 66\n"
full_name: File#lstat
is_singleton: false
name: lstat
params: |
  file.lstat   =>  stat

visibility: public
ri/1.8/system/File/expand_path-c.yaml000064400000001670150403646370013302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process unless <em>dir_string</em> is given, in which case it will be used as the starting point. The given pathname may start with a ``<tt>~</tt>'', which expands to the process owner's home directory (the environment variable <tt>HOME</tt> must be set correctly). ``<tt>~</tt><em>user</em>'' expands to the named user's home directory.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.expand_path(&quot;~oracle/bin&quot;)           #=&gt; &quot;/home/oracle/bin&quot;\n   File.expand_path(&quot;../../bin&quot;, &quot;/tmp/x&quot;)   #=&gt; &quot;/bin&quot;\n"
full_name: File::expand_path
is_singleton: true
name: expand_path
params: |
  File.expand_path(file_name [, dir_string] ) -> abs_file_name

visibility: public
ri/1.8/system/File/lstat-c.yaml000064400000001210150403646400012116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>File::stat</tt>, but does not follow the last symbolic link. Instead, reports on the link itself.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.symlink(&quot;testfile&quot;, &quot;link2test&quot;)   #=&gt; 0\n   File.stat(&quot;testfile&quot;).size              #=&gt; 66\n   File.lstat(&quot;link2test&quot;).size            #=&gt; 8\n   File.stat(&quot;link2test&quot;).size             #=&gt; 66\n"
full_name: File::lstat
is_singleton: true
name: lstat
params: |
  File.lstat(file_name)   => stat

visibility: public
ri/1.8/system/File/path-i.yaml000064400000001027150403646400011737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the pathname used to create <em>file</em> as a string. Does not normalize the name.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.new(&quot;testfile&quot;).path               #=&gt; &quot;testfile&quot;\n   File.new(&quot;/tmp/../tmp/xxx&quot;, &quot;w&quot;).path   #=&gt; &quot;/tmp/../tmp/xxx&quot;\n"
full_name: File#path
is_singleton: false
name: path
params: |
  file.path -> filename

visibility: public
ri/1.8/system/File/stat-c.yaml000064400000000663150403646410011756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>File::Stat</tt> object for the named file (see <tt>File::Stat</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).mtime   #=&gt; Tue Apr 08 12:58:04 CDT 2003\n"
full_name: File::stat
is_singleton: true
name: stat
params: |
  File.stat(file_name)   =>  stat

visibility: public
ri/1.8/system/File/rename-c.yaml000064400000000711150403646410012244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Renames the given file to the new name. Raises a <tt>SystemCallError</tt> if the file cannot be renamed.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.rename(&quot;afile&quot;, &quot;afile.bak&quot;)   #=&gt; 0\n"
full_name: File::rename
is_singleton: true
name: rename
params: |
  File.rename(old_name, new_name)   => 0

visibility: public
ri/1.8/system/File/exist%3f-c.yaml000064400000000541150403646410012430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if the named file exists.
full_name: File::exist?
is_singleton: true
name: exist?
params: |
  File.exist?(file_name)    =>  true or false
  File.exists?(file_name)   =>  true or false    (obsolete)

visibility: public
ri/1.8/system/File/join-c.yaml000064400000000712150403646410011735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new string formed by joining the strings using <tt>File::SEPARATOR</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.join(&quot;usr&quot;, &quot;mail&quot;, &quot;gumby&quot;)   #=&gt; &quot;usr/mail/gumby&quot;\n"
full_name: File::join
is_singleton: true
name: join
params: |
  File.join(string, ...) -> path

visibility: public
ri/1.8/system/File/symlink-c.yaml000064400000001035150403646420012464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a symbolic link called <em>new_name</em> for the existing file <em>old_name</em>. Raises a <tt>NotImplemented</tt> exception on platforms that do not support symbolic links.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.symlink(&quot;testfile&quot;, &quot;link2test&quot;)   #=&gt; 0\n"
full_name: File::symlink
is_singleton: true
name: symlink
params: |
  File.symlink(old_name, new_name)   => 0

visibility: public
ri/1.8/system/File/atime-c.yaml000064400000000640150403646420012076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the last access time for the named file as a Time object).
- !ruby/struct:SM::Flow::VERB 
  body: "   File.atime(&quot;testfile&quot;)   #=&gt; Wed Apr 09 08:51:48 CDT 2003\n"
full_name: File::atime
is_singleton: true
name: atime
params: |
  File.atime(file_name)  =>  time

visibility: public
ri/1.8/system/File/grpowned%3f-c.yaml000064400000000633150403646420013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and the effective group id of the calling process is the owner of the file. Returns <tt>false</tt> on Windows.
full_name: File::grpowned?
is_singleton: true
name: grpowned?
params: |
  File.grpowned?(file_name)   => true or false

visibility: public
ri/1.8/system/File/extname-c.yaml000064400000001165150403646430012444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the extension (the portion of file name in <em>path</em> after the period).
- !ruby/struct:SM::Flow::VERB 
  body: "   File.extname(&quot;test.rb&quot;)         #=&gt; &quot;.rb&quot;\n   File.extname(&quot;a/b/d/test.rb&quot;)   #=&gt; &quot;.rb&quot;\n   File.extname(&quot;test&quot;)            #=&gt; &quot;&quot;\n   File.extname(&quot;.profile&quot;)        #=&gt; &quot;&quot;\n"
full_name: File::extname
is_singleton: true
name: extname
params: |
  File.extname(path) -> string

visibility: public
ri/1.8/system/File/exists%3f-c.yaml000064400000000543150403646430012617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if the named file exists.
full_name: File::exists?
is_singleton: true
name: exists?
params: |
  File.exist?(file_name)    =>  true or false
  File.exists?(file_name)   =>  true or false    (obsolete)

visibility: public
ri/1.8/system/File/zero%3f-c.yaml000064400000000465150403646440012263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and has a zero size.
full_name: File::zero?
is_singleton: true
name: zero?
params: |
  File.zero?(file_name)   => true or false

visibility: public
ri/1.8/system/File/writable%3f-c.yaml000064400000000533150403646440013111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is writable by the effective user id of this process.
full_name: File::writable?
is_singleton: true
name: writable?
params: |
  File.writable?(file_name)   => true or false

visibility: public
ri/1.8/system/File/size-c.yaml000064400000000420150403646440011747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of <tt>file_name</tt>.
full_name: File::size
is_singleton: true
name: size
params: |
  File.size(file_name)   => integer

visibility: public
ri/1.8/system/File/split-c.yaml000064400000001041150403646450012131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Splits the given string into a directory and a file component and returns them in a two-element array. See also <tt>File::dirname</tt> and <tt>File::basename</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.split(&quot;/home/gumby/.profile&quot;)   #=&gt; [&quot;/home/gumby&quot;, &quot;.profile&quot;]\n"
full_name: File::split
is_singleton: true
name: split
params: |
  File.split(file_name)   => array

visibility: public
ri/1.8/system/File/chardev%3f-c.yaml000064400000000472150403646450012717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a character device.
full_name: File::chardev?
is_singleton: true
name: chardev?
params: |
  File.chardev?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/Stat/size-i.yaml000064400000000556150403646450012703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of <em>stat</em> in bytes.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).size   #=&gt; 66\n"
full_name: File::Stat#size
is_singleton: false
name: size
params: |
  stat.size    => fixnum

visibility: public
ri/1.8/system/File/Stat/ctime-i.yaml000064400000000741150403646450013026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the change time for <em>stat</em> (that is, the time directory information about the file was changed, not the file itself).
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).ctime   #=&gt; Wed Apr 09 08:53:14 CDT 2003\n"
full_name: File::Stat#ctime
is_singleton: false
name: ctime
params: |
  stat.ctime -> aTime

visibility: public
ri/1.8/system/File/Stat/cdesc-Stat.yaml000064400000005510150403646450013470 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Objects of class <tt>File::Stat</tt> encapsulate common status information for <tt>File</tt> objects. The information is recorded at the moment the <tt>File::Stat</tt> object is created; changes made to the file after that point will not be reflected. <tt>File::Stat</tt> objects are returned by <tt>IO#stat</tt>, <tt>File::stat</tt>, <tt>File#lstat</tt>, and <tt>File::lstat</tt>. Many of these methods return platform-specific values, and not all values are meaningful on all systems. See also <tt>Kernel#test</tt>.
constants: []

full_name: File::Stat
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: atime
- !ruby/object:RI::MethodSummary 
  name: blksize
- !ruby/object:RI::MethodSummary 
  name: blockdev?
- !ruby/object:RI::MethodSummary 
  name: blocks
- !ruby/object:RI::MethodSummary 
  name: chardev?
- !ruby/object:RI::MethodSummary 
  name: ctime
- !ruby/object:RI::MethodSummary 
  name: dev
- !ruby/object:RI::MethodSummary 
  name: dev_major
- !ruby/object:RI::MethodSummary 
  name: dev_minor
- !ruby/object:RI::MethodSummary 
  name: directory?
- !ruby/object:RI::MethodSummary 
  name: executable?
- !ruby/object:RI::MethodSummary 
  name: executable_real?
- !ruby/object:RI::MethodSummary 
  name: file?
- !ruby/object:RI::MethodSummary 
  name: ftype
- !ruby/object:RI::MethodSummary 
  name: gid
- !ruby/object:RI::MethodSummary 
  name: grpowned?
- !ruby/object:RI::MethodSummary 
  name: ino
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: mode
- !ruby/object:RI::MethodSummary 
  name: mtime
- !ruby/object:RI::MethodSummary 
  name: nlink
- !ruby/object:RI::MethodSummary 
  name: owned?
- !ruby/object:RI::MethodSummary 
  name: pipe?
- !ruby/object:RI::MethodSummary 
  name: pretty_print
- !ruby/object:RI::MethodSummary 
  name: rdev
- !ruby/object:RI::MethodSummary 
  name: rdev_major
- !ruby/object:RI::MethodSummary 
  name: rdev_minor
- !ruby/object:RI::MethodSummary 
  name: readable?
- !ruby/object:RI::MethodSummary 
  name: readable_real?
- !ruby/object:RI::MethodSummary 
  name: setgid?
- !ruby/object:RI::MethodSummary 
  name: setuid?
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: size?
- !ruby/object:RI::MethodSummary 
  name: socket?
- !ruby/object:RI::MethodSummary 
  name: sticky?
- !ruby/object:RI::MethodSummary 
  name: symlink?
- !ruby/object:RI::MethodSummary 
  name: uid
- !ruby/object:RI::MethodSummary 
  name: writable?
- !ruby/object:RI::MethodSummary 
  name: writable_real?
- !ruby/object:RI::MethodSummary 
  name: zero?
name: Stat
superclass: Object
ri/1.8/system/File/Stat/socket%3f-i.yaml000064400000000740150403646450013512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is a socket, <tt>false</tt> if it isn't or if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).socket?   #=&gt; false\n"
full_name: File::Stat#socket?
is_singleton: false
name: socket?
params: |
  stat.socket?    => true or false

visibility: public
ri/1.8/system/File/Stat/readable%3f-i.yaml000064400000000674150403646450013767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is readable by the effective user id of this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).readable?   #=&gt; true\n"
full_name: File::Stat#readable?
is_singleton: false
name: readable?
params: |
  stat.readable?    => true or false

visibility: public
ri/1.8/system/File/Stat/nlink-i.yaml000064400000001011150403646450013027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of hard links to <em>stat</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).nlink             #=&gt; 1\n   File.link(&quot;testfile&quot;, &quot;testfile.bak&quot;)   #=&gt; 0\n   File.stat(&quot;testfile&quot;).nlink             #=&gt; 2\n"
full_name: File::Stat#nlink
is_singleton: false
name: nlink
params: |
  stat.nlink   => fixnum

visibility: public
ri/1.8/system/File/Stat/chardev%3f-i.yaml000064400000000750150403646450013637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the file is a character device, <tt>false</tt> if it isn't or if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/dev/tty&quot;).chardev?   #=&gt; true\n"
full_name: File::Stat#chardev?
is_singleton: false
name: chardev?
params: |
  stat.chardev?    => true or false

visibility: public
ri/1.8/system/File/Stat/dev_minor-i.yaml000064400000000717150403646450013712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the minor part of <tt>File_Stat#dev</tt> or <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/dev/fd1&quot;).dev_minor   #=&gt; 1\n   File.stat(&quot;/dev/tty&quot;).dev_minor   #=&gt; 0\n"
full_name: File::Stat#dev_minor
is_singleton: false
name: dev_minor
params: |
  stat.dev_minor   => fixnum

visibility: public
ri/1.8/system/File/Stat/%3c%3d%3e-i.yaml000064400000001006150403646450013063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares <tt>File::Stat</tt> objects by comparing their respective modification times.
- !ruby/struct:SM::Flow::VERB 
  body: "   f1 = File.new(&quot;f1&quot;, &quot;w&quot;)\n   sleep 1\n   f2 = File.new(&quot;f2&quot;, &quot;w&quot;)\n   f1.stat &lt;=&gt; f2.stat   #=&gt; -1\n"
full_name: File::Stat#<=>
is_singleton: false
name: <=>
params: |
  stat <=> other_stat    => -1, 0, 1

visibility: public
ri/1.8/system/File/Stat/dev_major-i.yaml000064400000000717150403646460013677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the major part of <tt>File_Stat#dev</tt> or <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/dev/fd1&quot;).dev_major   #=&gt; 2\n   File.stat(&quot;/dev/tty&quot;).dev_major   #=&gt; 5\n"
full_name: File::Stat#dev_major
is_singleton: false
name: dev_major
params: |
  stat.dev_major   => fixnum

visibility: public
ri/1.8/system/File/Stat/rdev_major-i.yaml000064400000000725150403646460014060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the major part of <tt>File_Stat#rdev</tt> or <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/dev/fd1&quot;).rdev_major   #=&gt; 2\n   File.stat(&quot;/dev/tty&quot;).rdev_major   #=&gt; 5\n"
full_name: File::Stat#rdev_major
is_singleton: false
name: rdev_major
params: |
  stat.rdev_major   => fixnum

visibility: public
ri/1.8/system/File/Stat/mode-i.yaml000064400000001115150403646460012646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an integer representing the permission bits of <em>stat</em>. The meaning of the bits is platform dependent; on Unix systems, see <tt>stat(2)</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.chmod(0644, &quot;testfile&quot;)   #=&gt; 1\n   s = File.stat(&quot;testfile&quot;)\n   sprintf(&quot;%o&quot;, s.mode)          #=&gt; &quot;100644&quot;\n"
full_name: File::Stat#mode
is_singleton: false
name: mode
params: |
  stat.mode   => fixnum

visibility: public
ri/1.8/system/File/Stat/rdev_minor-i.yaml000064400000000725150403646460014074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the minor part of <tt>File_Stat#rdev</tt> or <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/dev/fd1&quot;).rdev_minor   #=&gt; 1\n   File.stat(&quot;/dev/tty&quot;).rdev_minor   #=&gt; 0\n"
full_name: File::Stat#rdev_minor
is_singleton: false
name: rdev_minor
params: |
  stat.rdev_minor   => fixnum

visibility: public
ri/1.8/system/File/Stat/writable%3f-i.yaml000064400000000671150403646460014037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is writable by the effective user id of this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).writable?   #=&gt; true\n"
full_name: File::Stat#writable?
is_singleton: false
name: writable?
params: |
  stat.writable? -> true or false

visibility: public
ri/1.8/system/File/Stat/executable_real%3f-i.yaml000064400000000533150403646460015347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>executable?</tt>, but tests using the real owner of the process.
full_name: File::Stat#executable_real?
is_singleton: false
name: executable_real?
params: |
  stat.executable_real?    => true or false

visibility: public
ri/1.8/system/File/Stat/dev-i.yaml000064400000000612150403646460012501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an integer representing the device on which <em>stat</em> resides.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).dev   #=&gt; 774\n"
full_name: File::Stat#dev
is_singleton: false
name: dev
params: |
  stat.dev    => fixnum

visibility: public
ri/1.8/system/File/Stat/gid-i.yaml000064400000000572150403646460012473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the numeric group id of the owner of <em>stat</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).gid   #=&gt; 500\n"
full_name: File::Stat#gid
is_singleton: false
name: gid
params: |
  stat.gid   => fixnum

visibility: public
ri/1.8/system/File/Stat/inspect-i.yaml000064400000001256150403646460013375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produce a nicely formatted description of <em>stat</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  File.stat(&quot;/etc/passwd&quot;).inspect\n     #=&gt; &quot;#&lt;File::Stat dev=0xe000005, ino=1078078, mode=0100644,\n          nlink=1, uid=0, gid=0, rdev=0x0, size=1374, blksize=4096,\n          blocks=8, atime=Wed Dec 10 10:16:12 CST 2003,\n          mtime=Fri Sep 12 15:41:41 CDT 2003,\n          ctime=Mon Oct 27 11:20:27 CST 2003&gt;&quot;\n"
full_name: File::Stat#inspect
is_singleton: false
name: inspect
params: |
  stat.inspect  =>  string

visibility: public
ri/1.8/system/File/Stat/new-c.yaml000064400000000603150403646460012506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::VERB 
  body: "  File::Stat.new(file_name)  =&gt; stat\n"
- !ruby/struct:SM::Flow::P 
  body: Create a File::Stat object for the given file name (raising an exception if the file doesn't exist).
full_name: File::Stat::new
is_singleton: true
name: new
params: |
  

visibility: public
ri/1.8/system/File/Stat/pretty_print-i.yaml000064400000000267150403646460014474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: File::Stat#pretty_print
is_singleton: false
name: pretty_print
params: (q)
visibility: public
ri/1.8/system/File/Stat/grpowned%3f-i.yaml000064400000001054150403646470014050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the effective group id of the process is the same as the group id of <em>stat</em>. On Windows NT, returns <tt>false</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).grpowned?      #=&gt; true\n   File.stat(&quot;/etc/passwd&quot;).grpowned?   #=&gt; false\n"
full_name: File::Stat#grpowned?
is_singleton: false
name: grpowned?
params: |
  stat.grpowned?   => true or false

visibility: public
ri/1.8/system/File/Stat/ino-i.yaml000064400000000556150403646470012520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the inode number for <em>stat</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).ino   #=&gt; 1083669\n"
full_name: File::Stat#ino
is_singleton: false
name: ino
params: |
  stat.ino   => fixnum

visibility: public
ri/1.8/system/File/Stat/mtime-i.yaml000064400000000614150403646470013041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the modification time of <em>stat</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).mtime   #=&gt; Wed Apr 09 08:53:14 CDT 2003\n"
full_name: File::Stat#mtime
is_singleton: false
name: mtime
params: |
  stat.mtime -> aTime

visibility: public
ri/1.8/system/File/Stat/blksize-i.yaml000064400000000717150403646500013367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the native file system's block size. Will return <tt>nil</tt> on platforms that don't support this information.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).blksize   #=&gt; 4096\n"
full_name: File::Stat#blksize
is_singleton: false
name: blksize
params: |
  stat.blksize   => integer or nil

visibility: public
ri/1.8/system/File/Stat/zero%3f-i.yaml000064400000000650150403646500013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is a zero-length file; <tt>false</tt> otherwise.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).zero?   #=&gt; false\n"
full_name: File::Stat#zero?
is_singleton: false
name: zero?
params: |
  stat.zero?    => true or false

visibility: public
ri/1.8/system/File/Stat/sticky%3f-i.yaml000064400000000755150403646500013532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> has its sticky bit set, <tt>false</tt> if it doesn't or if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).sticky?   #=&gt; false\n"
full_name: File::Stat#sticky?
is_singleton: false
name: sticky?
params: |
  stat.sticky?    => true or false

visibility: public
ri/1.8/system/File/Stat/blocks-i.yaml000064400000000740150403646500013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of native file system blocks allocated for this file, or <tt>nil</tt> if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).blocks   #=&gt; 2\n"
full_name: File::Stat#blocks
is_singleton: false
name: blocks
params: |
  stat.blocks    => integer or nil

visibility: public
ri/1.8/system/File/Stat/rdev-i.yaml000064400000001034150403646510012656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an integer representing the device type on which <em>stat</em> resides. Returns <tt>nil</tt> if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/dev/fd1&quot;).rdev   #=&gt; 513\n   File.stat(&quot;/dev/tty&quot;).rdev   #=&gt; 1280\n"
full_name: File::Stat#rdev
is_singleton: false
name: rdev
params: |
  stat.rdev   =>  fixnum or nil

visibility: public
ri/1.8/system/File/Stat/readable_real%3f-i.yaml000064400000000710150403646510014756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is readable by the real user id of this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).readable_real?   #=&gt; true\n"
full_name: File::Stat#readable_real?
is_singleton: false
name: readable_real?
params: |
  stat.readable_real? -> true or false

visibility: public
ri/1.8/system/File/Stat/directory%3f-i.yaml000064400000000761150403646520014227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is a directory, <tt>false</tt> otherwise.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).directory?   #=&gt; false\n   File.stat(&quot;.&quot;).directory?          #=&gt; true\n"
full_name: File::Stat#directory?
is_singleton: false
name: directory?
params: |
  stat.directory?   => true or false

visibility: public
ri/1.8/system/File/Stat/symlink%3f-i.yaml000064400000001415150403646520013706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is a symbolic link, <tt>false</tt> if it isn't or if the operating system doesn't support this feature. As <tt>File::stat</tt> automatically follows symbolic links, <tt>symlink?</tt> will always be <tt>false</tt> for an object returned by <tt>File::stat</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.symlink(&quot;testfile&quot;, &quot;alink&quot;)   #=&gt; 0\n   File.stat(&quot;alink&quot;).symlink?         #=&gt; false\n   File.lstat(&quot;alink&quot;).symlink?        #=&gt; true\n"
full_name: File::Stat#symlink?
is_singleton: false
name: symlink?
params: |
  stat.symlink?    => true or false

visibility: public
ri/1.8/system/File/Stat/setgid%3f-i.yaml000064400000001001150403646520013466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> has the set-group-id permission bit set, <tt>false</tt> if it doesn't or if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/usr/sbin/lpc&quot;).setgid?   #=&gt; true\n"
full_name: File::Stat#setgid?
is_singleton: false
name: setgid?
params: |
  stat.setgid?   => true or false

visibility: public
ri/1.8/system/File/Stat/setuid%3f-i.yaml000064400000000773150403646520013523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> has the set-user-id permission bit set, <tt>false</tt> if it doesn't or if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/bin/su&quot;).setuid?   #=&gt; true\n"
full_name: File::Stat#setuid?
is_singleton: false
name: setuid?
params: |
  stat.setuid?    => true or false

visibility: public
ri/1.8/system/File/Stat/atime-i.yaml000064400000000655150403646520013026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the last access time for this file as an object of class <tt>Time</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).atime   #=&gt; Wed Dec 31 18:00:00 CST 1969\n"
full_name: File::Stat#atime
is_singleton: false
name: atime
params: |
  stat.atime   => time

visibility: public
ri/1.8/system/File/Stat/blockdev%3f-i.yaml000064400000001046150403646520014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the file is a block device, <tt>false</tt> if it isn't or if the operating system doesn't support this feature.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).blockdev?    #=&gt; false\n   File.stat(&quot;/dev/hda1&quot;).blockdev?   #=&gt; true\n"
full_name: File::Stat#blockdev?
is_singleton: false
name: blockdev?
params: |
  stat.blockdev?   => true or false

visibility: public
ri/1.8/system/File/Stat/pipe%3f-i.yaml000064400000000541150403646520013154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the operating system supports pipes and <em>stat</em> is a pipe; <tt>false</tt> otherwise.
full_name: File::Stat#pipe?
is_singleton: false
name: pipe?
params: |
  stat.pipe?    => true or false

visibility: public
ri/1.8/system/File/Stat/ftype-i.yaml000064400000001135150403646520013050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Identifies the type of <em>stat</em>. The return string is one of: ``<tt>file</tt>'', ``<tt>directory</tt>'', ``<tt>characterSpecial</tt>'', ``<tt>blockSpecial</tt>'', ``<tt>fifo</tt>'', ``<tt>link</tt>'', ``<tt>socket</tt>'', or ``<tt>unknown</tt>''."
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;/dev/tty&quot;).ftype   #=&gt; &quot;characterSpecial&quot;\n"
full_name: File::Stat#ftype
is_singleton: false
name: ftype
params: |
  stat.ftype   => string

visibility: public
ri/1.8/system/File/Stat/writable_real%3f-i.yaml000064400000000710150403646520015031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is writable by the real user id of this process.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).writable_real?   #=&gt; true\n"
full_name: File::Stat#writable_real?
is_singleton: false
name: writable_real?
params: |
  stat.writable_real? -> true or false

visibility: public
ri/1.8/system/File/Stat/file%3f-i.yaml000064400000000661150403646520013141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is a regular file (not a device file, pipe, socket, etc.).
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).file?   #=&gt; true\n"
full_name: File::Stat#file?
is_singleton: false
name: file?
params: |
  stat.file?    => true or false

visibility: public
ri/1.8/system/File/Stat/uid-i.yaml000064400000000572150403646520012506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the numeric user id of the owner of <em>stat</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).uid   #=&gt; 501\n"
full_name: File::Stat#uid
is_singleton: false
name: uid
params: |
  stat.uid    => fixnum

visibility: public
ri/1.8/system/File/Stat/executable%3f-i.yaml000064400000001064150403646530014342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>stat</em> is executable or if the operating system doesn't distinguish executable files from nonexecutable files. The tests are made using the effective owner of the process.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).executable?   #=&gt; false\n"
full_name: File::Stat#executable?
is_singleton: false
name: executable?
params: |
  stat.executable?    => true or false

visibility: public
ri/1.8/system/File/Stat/owned%3f-i.yaml000064400000000774150403646530013344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the effective user id of the process is the same as the owner of <em>stat</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).owned?      #=&gt; true\n   File.stat(&quot;/etc/passwd&quot;).owned?   #=&gt; false\n"
full_name: File::Stat#owned?
is_singleton: false
name: owned?
params: |
  stat.owned?    => true or false

visibility: public
ri/1.8/system/File/Stat/size%3f-i.yaml000064400000000562150403646530013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of <em>stat</em> in bytes.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.stat(&quot;testfile&quot;).size   #=&gt; 66\n"
full_name: File::Stat#size?
is_singleton: false
name: size?
params: |
  state.size    => integer

visibility: public
ri/1.8/system/File/link-c.yaml000064400000001175150403646530011742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new name for an existing file using a hard link. Will not overwrite <em>new_name</em> if it already exists (raising a subclass of <tt>SystemCallError</tt>). Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.link(&quot;testfile&quot;, &quot;.testfile&quot;)   #=&gt; 0\n   IO.readlines(&quot;.testfile&quot;)[0]         #=&gt; &quot;This is line one\\n&quot;\n"
full_name: File::link
is_singleton: true
name: link
params: |
  File.link(old_name, new_name)    => 0

visibility: public
ri/1.8/system/File/readable%3f-c.yaml000064400000000533150403646540013040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is readable by the effective user id of this process.
full_name: File::readable?
is_singleton: true
name: readable?
params: |
  File.readable?(file_name)   => true or false

visibility: public
ri/1.8/system/File/sticky%3f-c.yaml000064400000000470150403646540012607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file has the sticky bit set.
full_name: File::sticky?
is_singleton: true
name: sticky?
params: |
  File.sticky?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/truncate-c.yaml000064400000001177150403646540012635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Truncates the file <em>file_name</em> to be at most <em>integer</em> bytes long. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   f = File.new(&quot;out&quot;, &quot;w&quot;)\n   f.write(&quot;1234567890&quot;)     #=&gt; 10\n   f.close                   #=&gt; nil\n   File.truncate(&quot;out&quot;, 5)   #=&gt; 0\n   File.size(&quot;out&quot;)          #=&gt; 5\n"
full_name: File::truncate
is_singleton: true
name: truncate
params: |
  File.truncate(file_name, integer)  => 0

visibility: public
ri/1.8/system/File/new-c.yaml000064400000002024150403646540011571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens the file named by <em>filename</em> according to <em>mode</em> (default is ``r'') and returns a new <tt>File</tt> object. See the description of class <tt>IO</tt> for a description of <em>mode</em>. The file mode may optionally be specified as a <tt>Fixnum</tt> by <em>or</em>-ing together the flags (O_RDONLY etc, again described under <tt>IO</tt>). Optional permission bits may be given in <em>perm</em>. These mode and permission bits are platform dependent; on Unix systems, see <tt>open(2)</tt> for details.
- !ruby/struct:SM::Flow::VERB 
  body: "   f = File.new(&quot;testfile&quot;, &quot;r&quot;)\n   f = File.new(&quot;newfile&quot;,  &quot;w+&quot;)\n   f = File.new(&quot;newfile&quot;, File::CREAT|File::TRUNC|File::RDWR, 0644)\n"
full_name: File::new
is_singleton: true
name: new
params: |
  File.new(filename, mode="r")            => file
  File.new(filename [, mode [, perm]])    => file

visibility: public
ri/1.8/system/File/Constants/cdesc-Constants.yaml000064400000000367150403646550015600 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: this is IO's method
constants: []

full_name: File::Constants
includes: []

instance_methods: []

name: Constants
superclass: 
ri/1.8/system/File/mtime-i.yaml000064400000000605150403646550012125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the modification time for <em>file</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.new(&quot;testfile&quot;).mtime   #=&gt; Wed Apr 09 08:53:14 CDT 2003\n"
full_name: File#mtime
is_singleton: false
name: mtime
params: |
  file.mtime -> time

visibility: public
ri/1.8/system/File/size%3f-c.yaml000064400000000535150403646550012256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>nil</tt> if <tt>file_name</tt> doesn't exist or has zero size, the size of the file otherwise.
full_name: File::size?
is_singleton: true
name: size?
params: |
  File.size?(file_name)   => Integer or nil

visibility: public
ri/1.8/system/File/symlink%3f-c.yaml000064400000000467150403646560012777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a symbolic link.
full_name: File::symlink?
is_singleton: true
name: symlink?
params: |
  File.symlink?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/utime-c.yaml000064400000000613150403646560012127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the access and modification times of each named file to the first two arguments. Returns the number of file names in the argument list.
full_name: File::utime
is_singleton: true
name: utime
params: |
  File.utime(atime, mtime, file_name,...)   =>  integer

visibility: public
ri/1.8/system/File/dirname-c.yaml000064400000001116150403646560012422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns all components of the filename given in <em>file_name</em> except the last one. The filename must be formed using forward slashes (``<tt>/</tt>'') regardless of the separator used on the local file system.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.dirname(&quot;/home/gumby/work/ruby.rb&quot;)   #=&gt; &quot;/home/gumby/work&quot;\n"
full_name: File::dirname
is_singleton: true
name: dirname
params: |
  File.dirname(file_name ) -> dir_name

visibility: public
ri/1.8/system/File/unlink-c.yaml000064400000000650150403646560012305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the named files, returning the number of names passed as arguments. Raises an exception on any error. See also <tt>Dir::rmdir</tt>.
full_name: File::unlink
is_singleton: true
name: unlink
params: |
  File.delete(file_name, ...)  => integer
  File.unlink(file_name, ...)  => integer

visibility: public
ri/1.8/system/File/socket%3f-c.yaml000064400000000455150403646560012576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a socket.
full_name: File::socket?
is_singleton: true
name: socket?
params: |
  File.socket?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/truncate-i.yaml000064400000001177150403646560012645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Truncates <em>file</em> to at most <em>integer</em> bytes. The file must be opened for writing. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   f = File.new(&quot;out&quot;, &quot;w&quot;)\n   f.syswrite(&quot;1234567890&quot;)   #=&gt; 10\n   f.truncate(5)              #=&gt; 0\n   f.close()                  #=&gt; nil\n   File.size(&quot;out&quot;)           #=&gt; 5\n"
full_name: File#truncate
is_singleton: false
name: truncate
params: |
  file.truncate(integer)    => 0

visibility: public
ri/1.8/system/File/install-c.yaml000064400000001040150403646560012445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <tt>src</tt> is not the same as <tt>dest</tt>, copies it and changes the permission mode to <tt>mode</tt>. If <tt>dest</tt> is a directory, destination is <tt>dest/src</tt>. If <tt>mode</tt> is not set, default is used. If <tt>verbose</tt> is set to true, the name of each file copied will be printed.
full_name: File::install
is_singleton: true
name: install
params: (from, to, mode = nil, verbose = false)
visibility: public
ri/1.8/system/File/executable_real%3f-c.yaml000064400000000555150403646570014434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is executable by the real user id of this process.
full_name: File::executable_real?
is_singleton: true
name: executable_real?
params: |
  File.executable_real?(file_name)   => true or false

visibility: public
ri/1.8/system/File/readlink-c.yaml000064400000001024150403646570012573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the file referenced by the given link. Not available on all platforms.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.symlink(&quot;testfile&quot;, &quot;link2test&quot;)   #=&gt; 0\n   File.readlink(&quot;link2test&quot;)              #=&gt; &quot;testfile&quot;\n"
full_name: File::readlink
is_singleton: true
name: readlink
params: |
  File.readlink(link_name) -> file_name

visibility: public
ri/1.8/system/File/setuid%3f-c.yaml000064400000000470150403646570012601 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file has the setuid bit set.
full_name: File::setuid?
is_singleton: true
name: setuid?
params: |
  File.setuid?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/catname-c.yaml000064400000000746150403646570012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <tt>to</tt> is a valid directory, <tt>from</tt> will be appended to <tt>to</tt>, adding and escaping backslashes as necessary. Otherwise, <tt>to</tt> will be returned. Useful for appending <tt>from</tt> to <tt>to</tt> only if the filename was not specified in <tt>to</tt>.
full_name: File::catname
is_singleton: true
name: catname
params: (from, to)
visibility: public
ri/1.8/system/File/o_chmod-i.yaml000064400000000337150403646570012426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #chmod"
full_name: File#o_chmod
is_singleton: false
name: o_chmod
params: (p1)
visibility: public
ri/1.8/system/File/identical%3f-c.yaml000064400000001572150403646570013244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named files are identical.
- !ruby/struct:SM::Flow::VERB 
  body: "    open(&quot;a&quot;, &quot;w&quot;) {}\n    p File.identical?(&quot;a&quot;, &quot;a&quot;)      #=&gt; true\n    p File.identical?(&quot;a&quot;, &quot;./a&quot;)    #=&gt; true\n    File.link(&quot;a&quot;, &quot;b&quot;)\n    p File.identical?(&quot;a&quot;, &quot;b&quot;)      #=&gt; true\n    File.symlink(&quot;a&quot;, &quot;c&quot;)\n    p File.identical?(&quot;a&quot;, &quot;c&quot;)      #=&gt; true\n    open(&quot;d&quot;, &quot;w&quot;) {}\n    p File.identical?(&quot;a&quot;, &quot;d&quot;)      #=&gt; false\n"
full_name: File::identical?
is_singleton: true
name: identical?
params: |
  File.identical?(file_1, file_2)   =>  true or false

visibility: public
ri/1.8/system/File/fnmatch%3f-c.yaml000064400000011376150403646600012725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true if <em>path</em> matches against <em>pattern</em> The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<code>*</code>:"
    body: Matches any file. Can be restricted by other values in the glob. <tt>*</tt> will match all files; <tt>c*</tt> will match all files beginning with <tt>c</tt>; <tt>*c</tt> will match all files ending with <tt>c</tt>; and <b><tt>c</tt></b> will match all files that have <tt>c</tt> in them (including at the beginning or end). Equivalent to <tt>/ .* /x</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>**</code>:"
    body: Matches directories recursively or files expansively.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>?</code>:"
    body: Matches any one character. Equivalent to <tt>/.{1}/</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>[set]</code>:"
    body: Matches any one character in <tt>set</tt>. Behaves exactly like character sets in Regexp, including set negation (<tt>[^a-z]</tt>).
  - !ruby/struct:SM::Flow::LI 
    label: "<code>\\</code>:"
    body: Escapes the next metacharacter.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: <em>flags</em> is a bitwise OR of the <tt>FNM_xxx</tt> parameters. The same glob pattern and flags are used by <tt>Dir::glob</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.fnmatch('cat',       'cat')        #=&gt; true  : match entire string\n   File.fnmatch('cat',       'category')   #=&gt; false : only match partial string\n   File.fnmatch('c{at,ub}s', 'cats')       #=&gt; false : { } isn't supported\n\n   File.fnmatch('c?t',     'cat')          #=&gt; true  : '?' match only 1 character\n   File.fnmatch('c??t',    'cat')          #=&gt; false : ditto\n   File.fnmatch('c*',      'cats')         #=&gt; true  : '*' match 0 or more characters\n   File.fnmatch('c*t',     'c/a/b/t')      #=&gt; true  : ditto\n   File.fnmatch('ca[a-z]', 'cat')          #=&gt; true  : inclusive bracket expression\n   File.fnmatch('ca[^t]',  'cat')          #=&gt; false : exclusive bracket expression ('^' or '!')\n\n   File.fnmatch('cat', 'CAT')                     #=&gt; false : case sensitive\n   File.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=&gt; true  : case insensitive\n\n   File.fnmatch('?',   '/', File::FNM_PATHNAME)  #=&gt; false : wildcard doesn't match '/' on FNM_PATHNAME\n   File.fnmatch('*',   '/', File::FNM_PATHNAME)  #=&gt; false : ditto\n   File.fnmatch('[/]', '/', File::FNM_PATHNAME)  #=&gt; false : ditto\n\n   File.fnmatch('\\?',   '?')                       #=&gt; true  : escaped wildcard becomes ordinary\n   File.fnmatch('\\a',   'a')                       #=&gt; true  : escaped ordinary remains ordinary\n   File.fnmatch('\\a',   '\\a', File::FNM_NOESCAPE)  #=&gt; true  : FNM_NOESACPE makes '\\' ordinary\n   File.fnmatch('[\\?]', '?')                       #=&gt; true  : can escape inside bracket expression\n\n   File.fnmatch('*',   '.profile')                      #=&gt; false : wildcard doesn't match leading\n   File.fnmatch('*',   '.profile', File::FNM_DOTMATCH)  #=&gt; true    period by default.\n   File.fnmatch('.*',  '.profile')                      #=&gt; true\n\n   rbfiles = '**' '/' '*.rb' # you don't have to do like this. just write in single string.\n   File.fnmatch(rbfiles, 'main.rb')                    #=&gt; false\n   File.fnmatch(rbfiles, './main.rb')                  #=&gt; false\n   File.fnmatch(rbfiles, 'lib/song.rb')                #=&gt; true\n   File.fnmatch('**.rb', 'main.rb')                    #=&gt; true\n   File.fnmatch('**.rb', './main.rb')                  #=&gt; false\n   File.fnmatch('**.rb', 'lib/song.rb')                #=&gt; true\n   File.fnmatch('*',           'dave/.profile')                      #=&gt; true\n\n   pattern = '*' '/' '*'\n   File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME)  #=&gt; false\n   File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=&gt; true\n\n   pattern = '**' '/' 'foo'\n   File.fnmatch(pattern, 'a/b/c/foo', File::FNM_PATHNAME)     #=&gt; true\n   File.fnmatch(pattern, '/a/b/c/foo', File::FNM_PATHNAME)    #=&gt; true\n   File.fnmatch(pattern, 'c:/a/b/c/foo', File::FNM_PATHNAME)  #=&gt; true\n   File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME)    #=&gt; false\n   File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=&gt; true\n"
full_name: File::fnmatch?
is_singleton: true
name: fnmatch?
params: |
  File.fnmatch( pattern, path, [flags] ) => (true or false)
  File.fnmatch?( pattern, path, [flags] ) => (true or false)

visibility: public
ri/1.8/system/File/basename-c.yaml000064400000001401150403646600012546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the last component of the filename given in <em>file_name</em>, which must be formed using forward slashes (``<tt>/</tt>'') regardless of the separator used on the local file system. If <em>suffix</em> is given and present at the end of <em>file_name</em>, it is removed.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.basename(&quot;/home/gumby/work/ruby.rb&quot;)          #=&gt; &quot;ruby.rb&quot;\n   File.basename(&quot;/home/gumby/work/ruby.rb&quot;, &quot;.rb&quot;)   #=&gt; &quot;ruby&quot;\n"
full_name: File::basename
is_singleton: true
name: basename
params: |
  File.basename(file_name [, suffix] ) -> base_name

visibility: public
ri/1.8/system/File/compare-c.yaml000064400000000630150403646600012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if and only if the contents of files <tt>from</tt> and <tt>to</tt> are identical. If <tt>verbose</tt> is <tt>true</tt>, <tt>from &lt;=&gt; to</tt> is printed.
full_name: File::compare
is_singleton: true
name: compare
params: (from, to, verbose = false)
visibility: public
ri/1.8/system/File/executable%3f-c.yaml000064400000000543150403646600013420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is executable by the effective user id of this process.
full_name: File::executable?
is_singleton: true
name: executable?
params: |
  File.executable?(file_name)   => true or false

visibility: public
ri/1.8/system/File/atime-i.yaml000064400000000725150403646600012110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the last access time (a <tt>Time</tt> object)
- !ruby/struct:SM::Flow::VERB 
  body: " for <em>file</em>, or epoch if <em>file</em> has not been accessed.\n\n   File.new(&quot;testfile&quot;).atime   #=&gt; Wed Dec 31 18:00:00 CST 1969\n"
full_name: File#atime
is_singleton: false
name: atime
params: |
  file.atime    => time

visibility: public
ri/1.8/system/File/directory%3f-c.yaml000064400000000640150403646600013301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a directory, <tt>false</tt> otherwise.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.directory?(&quot;.&quot;)\n"
full_name: File::directory?
is_singleton: true
name: directory?
params: |
  File.directory?(file_name)   =>  true or false

visibility: public
ri/1.8/system/File/syscopy-c.yaml000064400000000507150403646600012512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Copies a file <tt>from</tt> to <tt>to</tt>. If <tt>to</tt> is a directory, copies <tt>from</tt> to <tt>to/from</tt>.
full_name: File::syscopy
is_singleton: true
name: syscopy
params: (from, to)
visibility: public
ri/1.8/system/File/safe_unlink-c.yaml000064400000000623150403646600013276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a list of files. Each parameter should be the name of the file to delete. If the last parameter isn't a String, verbose mode will be enabled. Returns the number of files deleted.
full_name: File::safe_unlink
is_singleton: true
name: safe_unlink
params: (*files)
visibility: public
ri/1.8/system/File/chmod-c.yaml000064400000001172150403646600012072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes permission bits on the named file(s) to the bit pattern represented by <em>mode_int</em>. Actual effects are operating system dependent (see the beginning of this section). On Unix systems, see <tt>chmod(2)</tt> for details. Returns the number of files processed.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.chmod(0644, &quot;testfile&quot;, &quot;out&quot;)   #=&gt; 2\n"
full_name: File::chmod
is_singleton: true
name: chmod
params: |
  File.chmod(mode_int, file_name, ... ) -> integer

visibility: public
ri/1.8/system/File/writable_real%3f-c.yaml000064400000000545150403646600014115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is writable by the real user id of this process.
full_name: File::writable_real?
is_singleton: true
name: writable_real?
params: |
  File.writable_real?(file_name)   => true or false

visibility: public
ri/1.8/system/File/chown-i.yaml000064400000001273150403646600012126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes the owner and group of <em>file</em> to the given numeric owner and group id's. Only a process with superuser privileges may change the owner of a file. The current owner of a file may change the file's group to any group to which the owner belongs. A <tt>nil</tt> or -1 owner or group id is ignored. Follows symbolic links. See also <tt>File#lchown</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.new(&quot;testfile&quot;).chown(502, 1000)\n"
full_name: File#chown
is_singleton: false
name: chown
params: |
  file.chown(owner_int, group_int )   => 0

visibility: public
ri/1.8/system/File/owned%3f-c.yaml000064400000000556150403646610012420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and the effective used id of the calling process is the owner of the file.
full_name: File::owned?
is_singleton: true
name: owned?
params: |
  File.owned?(file_name)   => true or false

visibility: public
ri/1.8/system/TrueClass/cdesc-TrueClass.yaml000064400000001256150403646620014577 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The global value <tt>true</tt> is the only instance of class <tt>TrueClass</tt> and represents a logically true value in boolean expressions. The class provides operators allowing <tt>true</tt> to be used in logical expressions.
constants: []

full_name: TrueClass
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: ^
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: "|"
name: TrueClass
superclass: Object
ri/1.8/system/TrueClass/%7c-i.yaml000064400000001125150403646620012412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Or---Returns <tt>true</tt>. As <em>anObject</em> is an argument to a method call, it is always evaluated; there is no short-circuit evaluation in this case.
- !ruby/struct:SM::Flow::VERB 
  body: "   true |  puts(&quot;or&quot;)\n   true || puts(&quot;logical or&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   or\n"
full_name: TrueClass#|
is_singleton: false
name: "|"
params: |
  true | obj   => true

visibility: public
ri/1.8/system/TrueClass/%26-i.yaml000064400000000517150403646620012334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: And---Returns <tt>false</tt> if <em>obj</em> is <tt>nil</tt> or <tt>false</tt>, <tt>true</tt> otherwise.
full_name: TrueClass#&
is_singleton: false
name: "&"
params: |
  true & obj    => true or false

visibility: public
ri/1.8/system/TrueClass/to_yaml-i.yaml000064400000000266150403646620013505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TrueClass#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/TrueClass/to_s-i.yaml000064400000000442150403646630013002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The string representation of <tt>true</tt> is &quot;true&quot;.
full_name: TrueClass#to_s
is_singleton: false
name: to_s
params: |
  true.to_s   =>  "true"

visibility: public
ri/1.8/system/TrueClass/%5e-i.yaml000064400000000514150403646630012414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Exclusive Or---Returns <tt>true</tt> if <em>obj</em> is <tt>nil</tt> or <tt>false</tt>, <tt>false</tt> otherwise.
full_name: TrueClass#^
is_singleton: false
name: ^
params: |
  true ^ obj   => !obj

visibility: public
ri/1.8/system/Vector/elements-c.yaml000064400000000536150403646640013206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a vector from an Array. The optional second argument specifies whether the array itself or a copy is used internally.
full_name: Vector::elements
is_singleton: true
name: elements
params: (array, copy = true)
visibility: public
ri/1.8/system/Vector/size-i.yaml000064400000000364150403646660012353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of elements in the vector.
full_name: Vector#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Vector/eql%3f-i.yaml000064400000000333150403646660012454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #=="
full_name: Vector#eql?
is_singleton: false
name: eql?
params: (other)
visibility: public
ri/1.8/system/Vector/%5b%5d-i.yaml000064400000000411150403646660012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns element number <tt>i</tt> (starting at zero) of the vector.
full_name: Vector#[]
is_singleton: false
name: "[]"
params: (i)
visibility: public
ri/1.8/system/Vector/covector-i.yaml000064400000000374150403646660013226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a single-row matrix from this vector.
full_name: Vector#covector
is_singleton: false
name: covector
params: ()
visibility: public
ri/1.8/system/Vector/r-i.yaml000064400000000511150403646660011634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the modulus (Pythagorean distance) of the vector.
- !ruby/struct:SM::Flow::VERB 
  body: "  Vector[5,8,2].r =&gt; 9.643650761\n"
full_name: Vector#r
is_singleton: false
name: r
params: ()
visibility: public
ri/1.8/system/Vector/coerce-i.yaml000064400000000360150403646660012635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "FIXME: describe Vector#coerce."
full_name: Vector#coerce
is_singleton: false
name: coerce
params: (other)
visibility: public
ri/1.8/system/Vector/to_a-i.yaml000064400000000366150403646660012325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the elements of the vector in an array.
full_name: Vector#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/Vector/compare_by-i.yaml000064400000000354150403646660013520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For internal use.
full_name: Vector#compare_by
is_singleton: false
name: compare_by
params: (elements)
visibility: public
ri/1.8/system/Vector/each2-i.yaml000064400000000446150403646660012364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: e1, e2
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterate over the elements of this vector and <tt>v</tt> in conjunction.
full_name: Vector#each2
is_singleton: false
name: each2
params: (v) {|e1, e2| ...}
visibility: public
ri/1.8/system/Vector/init_elements-i.yaml000064400000000365150403646660014241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For internal use.
full_name: Vector#init_elements
is_singleton: false
name: init_elements
params: (array, copy)
visibility: public
ri/1.8/system/Vector/hash-i.yaml000064400000000351150403646660012320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a hash-code for the vector.
full_name: Vector#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/Vector/collect2-i.yaml000064400000000510150403646660013101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: e1, e2
comment: 
- !ruby/struct:SM::Flow::P 
  body: Collects (as in Enumerable#collect) over the elements of this vector and <tt>v</tt> in conjunction.
full_name: Vector#collect2
is_singleton: false
name: collect2
params: (v) {|e1, e2| ...}
visibility: public
ri/1.8/system/Vector/collect-i.yaml000064400000000421150403646660013020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: map
block_params: e
comment: 
- !ruby/struct:SM::Flow::P 
  body: Like Array#collect.
full_name: Vector#collect
is_singleton: false
name: collect
params: ( {|e| ...}
visibility: public
ri/1.8/system/Vector/%2a-i.yaml000064400000000430150403646660011742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Multiplies the vector by <tt>x</tt>, where <tt>x</tt> is a number or another vector.
full_name: Vector#*
is_singleton: false
name: "*"
params: (x)
visibility: public
ri/1.8/system/Vector/inspect-i.yaml000064400000000345150403646660013045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Overrides Object#inspect
full_name: Vector#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Vector/new-c.yaml000064400000000351150403646660012160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For internal use.
full_name: Vector::new
is_singleton: true
name: new
params: (method, array, copy)
visibility: public
ri/1.8/system/Vector/%2b-i.yaml000064400000000322150403646660011743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Vector addition.
full_name: Vector#+
is_singleton: false
name: +
params: (v)
visibility: public
ri/1.8/system/Vector/cdesc-Vector.yaml000064400000010015150403646660013466 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: elements
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Vector</tt> class represents a mathematical vector, which is useful in its own right, and also constitutes a row or column of a Matrix.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Method Catalogue
- !ruby/struct:SM::Flow::P 
  body: "To create a Vector:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Vector.[](*array) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> Vector.elements(array, copy = true) </tt>
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "To access elements:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> [](i) </tt>
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "To enumerate the elements:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #each2(v) </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #collect2(v) </tt>"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Vector arithmetic:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> *(x) &quot;is matrix or number&quot; </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> +(v) </tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt> -(v) </tt>
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Vector functions:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #inner_product(v) </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #collect </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #map </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #map2(v) </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #r </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #size </tt>"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Conversion to other data types:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #covector </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #to_a </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #coerce(other) </tt>"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "String representations:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #to_s </tt>"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt> #inspect </tt>"
  type: :BULLET
constants: []

full_name: Vector
includes: 
- !ruby/object:RI::IncludedModule 
  name: ExceptionForMatrix
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: coerce
- !ruby/object:RI::MethodSummary 
  name: collect
- !ruby/object:RI::MethodSummary 
  name: collect2
- !ruby/object:RI::MethodSummary 
  name: compare_by
- !ruby/object:RI::MethodSummary 
  name: covector
- !ruby/object:RI::MethodSummary 
  name: each2
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: init_elements
- !ruby/object:RI::MethodSummary 
  name: inner_product
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: map
- !ruby/object:RI::MethodSummary 
  name: map2
- !ruby/object:RI::MethodSummary 
  name: r
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Vector
superclass: Object
ri/1.8/system/Vector/to_s-i.yaml000064400000000334150403646660012342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Overrides Object#to_s
full_name: Vector#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Vector/map-i.yaml000064400000000330150403646660012147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #collect"
full_name: Vector#map
is_singleton: false
name: map
params: (
visibility: public
ri/1.8/system/Vector/inner_product-i.yaml000064400000000560150403646660014252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the inner product of this vector with the other.
- !ruby/struct:SM::Flow::VERB 
  body: "  Vector[4,7].inner_product Vector[10,1]  =&gt; 47\n"
full_name: Vector#inner_product
is_singleton: false
name: inner_product
params: (v)
visibility: public
ri/1.8/system/Vector/%3d%3d-i.yaml000064400000000503150403646660012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: eql?
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> iff the two vectors have the same elements in the same order.
full_name: Vector#==
is_singleton: false
name: ==
params: (other)
visibility: public
ri/1.8/system/Vector/clone-i.yaml000064400000000345150403646660012500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a copy of the vector.
full_name: Vector#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/Vector/map2-i.yaml000064400000000434150403646660012236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: e1, e2
comment: 
- !ruby/struct:SM::Flow::P 
  body: Like Vector#collect2, but returns a Vector instead of an Array.
full_name: Vector#map2
is_singleton: false
name: map2
params: (v) {|e1, e2| ...}
visibility: public
ri/1.8/system/Vector/%5b%5d-c.yaml000064400000000463150403646660012244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a Vector from a list of elements.
- !ruby/struct:SM::Flow::VERB 
  body: "  Vector[7, 4, ...]\n"
full_name: Vector::[]
is_singleton: true
name: "[]"
params: (*array)
visibility: public
ri/1.8/system/Vector/%2d-i.yaml000064400000000327150403646660011752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Vector subtraction.
full_name: Vector#-
is_singleton: false
name: "-"
params: (v)
visibility: public
ri/1.8/system/ParseError/set_option-i.yaml000064400000000271150403646670014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ParseError#set_option
is_singleton: false
name: set_option
params: (opt, eq)
visibility: public
ri/1.8/system/ParseError/cdesc-ParseError.yaml000064400000001603150403646670015136 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: args
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: reason
  rw: W
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Base class of exceptions from OptionParser.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Reason which caused the error.
  name: Reason
  value: "'parse error'.freeze"
full_name: ParseError
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: message
- !ruby/object:RI::MethodSummary 
  name: reason
- !ruby/object:RI::MethodSummary 
  name: recover
- !ruby/object:RI::MethodSummary 
  name: set_option
- !ruby/object:RI::MethodSummary 
  name: to_s
name: ParseError
superclass: RuntimeError
ri/1.8/system/ParseError/inspect-i.yaml000064400000000254150403646670013667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ParseError#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/ParseError/new-c.yaml000064400000000251150403646700012774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ParseError::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/ParseError/message-i.yaml000064400000000463150403646700013642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: to_s
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Default stringizing method to emit standard error message.
full_name: ParseError#message
is_singleton: false
name: message
params: ()
visibility: public
ri/1.8/system/ParseError/to_s-i.yaml000064400000000337150403646700013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #message"
full_name: ParseError#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/ParseError/recover-i.yaml000064400000000404150403646700013656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pushes back erred argument(s) to <tt>argv</tt>.
full_name: ParseError#recover
is_singleton: false
name: recover
params: (argv)
visibility: public
ri/1.8/system/ParseError/reason-i.yaml000064400000000374150403646700013506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns error reason. Override this for I18N.
full_name: ParseError#reason
is_singleton: false
name: reason
params: ()
visibility: public
ri/1.8/system/TypeError/cdesc-TypeError.yaml000064400000001174150403646700014651 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: TypeError
includes: []

instance_methods: []

name: TypeError
superclass: StandardError
ri/1.8/system/ConditionVariable/wait-i.yaml000064400000000451150403646710014470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Releases the lock held in <tt>mutex</tt> and waits; reacquires the lock on wakeup.
full_name: ConditionVariable#wait
is_singleton: false
name: wait
params: (mutex)
visibility: public
ri/1.8/system/ConditionVariable/new-c.yaml000064400000000357150403646710014314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new ConditionVariable
full_name: ConditionVariable::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/ConditionVariable/broadcast-i.yaml000064400000000407150403646710015467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Wakes up all threads waiting for this lock.
full_name: ConditionVariable#broadcast
is_singleton: false
name: broadcast
params: ()
visibility: public
ri/1.8/system/ConditionVariable/cdesc-ConditionVariable.yaml000064400000002070150403646710017750 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: ConditionVariable objects augment class Mutex. Using condition variables, it is possible to suspend while in the middle of a critical section until a resource becomes available.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'thread'\n\n  mutex = Mutex.new\n  resource = ConditionVariable.new\n\n  a = Thread.new {\n    mutex.synchronize {\n      # Thread 'a' now needs the resource\n      resource.wait(mutex)\n      # 'a' can now have the resource\n    }\n  }\n\n  b = Thread.new {\n    mutex.synchronize {\n      # Thread 'b' has finished using the resource\n      resource.signal\n    }\n  }\n"
constants: []

full_name: ConditionVariable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: broadcast
- !ruby/object:RI::MethodSummary 
  name: signal
- !ruby/object:RI::MethodSummary 
  name: wait
name: ConditionVariable
superclass: Object
ri/1.8/system/ConditionVariable/signal-i.yaml000064400000000416150403646710015002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Wakes up the first thread in line waiting for this lock.
full_name: ConditionVariable#signal
is_singleton: false
name: signal
params: ()
visibility: public
ri/1.8/system/MonitorMixin/mon_exit_for_cond-i.yaml000064400000000303150403646710016253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin#mon_exit_for_cond
is_singleton: false
name: mon_exit_for_cond
params: ()
visibility: private
ri/1.8/system/MonitorMixin/mon_check_owner-i.yaml000064400000000456150403646720015732 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Throw a ThreadError exception if the current thread does't own the monitor
full_name: MonitorMixin#mon_check_owner
is_singleton: false
name: mon_check_owner
params: ()
visibility: private
ri/1.8/system/MonitorMixin/extend_object-c.yaml000064400000000275150403646720015400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin::extend_object
is_singleton: true
name: extend_object
params: (obj)
visibility: public
ri/1.8/system/MonitorMixin/mon_try_enter-i.yaml000064400000000532150403646720015451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: try_mon_enter
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Attempts to enter exclusive section. Returns <tt>false</tt> if lock fails.
full_name: MonitorMixin#mon_try_enter
is_singleton: false
name: mon_try_enter
params: ()
visibility: public
ri/1.8/system/MonitorMixin/new_cond-i.yaml000064400000000630150403646720014360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "FIXME: This isn't documented in Nutshell."
- !ruby/struct:SM::Flow::P 
  body: "Create a new condition variable for this monitor. This facilitates control of the monitor with #signal and #wait."
full_name: MonitorMixin#new_cond
is_singleton: false
name: new_cond
params: ()
visibility: public
ri/1.8/system/MonitorMixin/mon_initialize-i.yaml000064400000000445150403646720015602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: called by initialize method to set defaults for instance variables.
full_name: MonitorMixin#mon_initialize
is_singleton: false
name: mon_initialize
params: ()
visibility: private
ri/1.8/system/MonitorMixin/mon_enter_for_cond-i.yaml000064400000000312150403646720016420 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin#mon_enter_for_cond
is_singleton: false
name: mon_enter_for_cond
params: (count)
visibility: private
ri/1.8/system/MonitorMixin/synchronize-i.yaml000064400000000367150403646720015146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #mon_synchronize"
full_name: MonitorMixin#synchronize
is_singleton: false
name: synchronize
params: ()
visibility: public
ri/1.8/system/MonitorMixin/try_mon_enter-i.yaml000064400000000371150403646730015453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #mon_try_enter"
full_name: MonitorMixin#try_mon_enter
is_singleton: false
name: try_mon_enter
params: ()
visibility: public
ri/1.8/system/MonitorMixin/mon_acquire-i.yaml000064400000000274150403646730015073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin#mon_acquire
is_singleton: false
name: mon_acquire
params: (queue)
visibility: private
ri/1.8/system/MonitorMixin/mon_exit-i.yaml000064400000000356150403646730014414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Leaves exclusive section.
full_name: MonitorMixin#mon_exit
is_singleton: false
name: mon_exit
params: ()
visibility: public
ri/1.8/system/MonitorMixin/new-c.yaml000064400000000253150403646730013351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/MonitorMixin/mon_release-i.yaml000064400000000410150403646730015052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: mon_release requires Thread.critical == true
full_name: MonitorMixin#mon_release
is_singleton: false
name: mon_release
params: ()
visibility: private
ri/1.8/system/MonitorMixin/ConditionVariable/wait_until-i.yaml000064400000000450150403646730020340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "call #wait until the supplied block returns <tt>true</tt>."
full_name: MonitorMixin::ConditionVariable#wait_until
is_singleton: false
name: wait_until
params: ()
visibility: public
ri/1.8/system/MonitorMixin/ConditionVariable/wait_while-i.yaml000064400000000450150403646730020315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "call #wait while the supplied block returns <tt>true</tt>."
full_name: MonitorMixin::ConditionVariable#wait_while
is_singleton: false
name: wait_while
params: ()
visibility: public
ri/1.8/system/MonitorMixin/ConditionVariable/wait-i.yaml000064400000000643150403646730017131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Create a new timer with the argument timeout, and add the current thread to the list of waiters. Then the thread is stopped. It will be resumed when a corresponding #signal occurs."
full_name: MonitorMixin::ConditionVariable#wait
is_singleton: false
name: wait
params: (timeout = nil)
visibility: public
ri/1.8/system/MonitorMixin/ConditionVariable/new-c.yaml000064400000000300150403646740016737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin::ConditionVariable::new
is_singleton: true
name: new
params: (monitor)
visibility: public
ri/1.8/system/MonitorMixin/ConditionVariable/broadcast-i.yaml000064400000000402150403646740020121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Wake up all the waiters.
full_name: MonitorMixin::ConditionVariable#broadcast
is_singleton: false
name: broadcast
params: ()
visibility: public
ri/1.8/system/MonitorMixin/ConditionVariable/count_waiters-i.yaml000064400000000315150403646750021051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin::ConditionVariable#count_waiters
is_singleton: false
name: count_waiters
params: ()
visibility: public
ri/1.8/system/MonitorMixin/ConditionVariable/Timeout/cdesc-Timeout.yaml000064400000000337150403646750022074 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: MonitorMixin::ConditionVariable::Timeout
includes: []

instance_methods: []

name: Timeout
superclass: Exception
ri/1.8/system/MonitorMixin/ConditionVariable/cdesc-ConditionVariable.yaml000064400000001563150403646750022416 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "FIXME: This isn't documented in Nutshell."
- !ruby/struct:SM::Flow::P 
  body: Since MonitorMixin.new_cond returns a ConditionVariable, and the example above calls while_wait and signal, this class should be documented.
constants: []

full_name: MonitorMixin::ConditionVariable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: broadcast
- !ruby/object:RI::MethodSummary 
  name: count_waiters
- !ruby/object:RI::MethodSummary 
  name: create_timer
- !ruby/object:RI::MethodSummary 
  name: signal
- !ruby/object:RI::MethodSummary 
  name: wait
- !ruby/object:RI::MethodSummary 
  name: wait_until
- !ruby/object:RI::MethodSummary 
  name: wait_while
name: ConditionVariable
superclass: Object
ri/1.8/system/MonitorMixin/ConditionVariable/signal-i.yaml000064400000000403150403646760017437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Wake up and run the next waiter
full_name: MonitorMixin::ConditionVariable#signal
is_singleton: false
name: signal
params: ()
visibility: public
ri/1.8/system/MonitorMixin/ConditionVariable/create_timer-i.yaml000064400000000323150403646760020626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: MonitorMixin::ConditionVariable#create_timer
is_singleton: false
name: create_timer
params: (timeout)
visibility: private
ri/1.8/system/MonitorMixin/mon_synchronize-i.yaml000064400000000667150403646760016026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: synchronize
block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Enters exclusive section and executes the block. Leaves the exclusive section automatically when the block exits. See example under <tt>MonitorMixin</tt>.
full_name: MonitorMixin#mon_synchronize
is_singleton: false
name: mon_synchronize
params: () {|| ...}
visibility: public
ri/1.8/system/MonitorMixin/mon_enter-i.yaml000064400000000360150403646770014557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Enters exclusive section.
full_name: MonitorMixin#mon_enter
is_singleton: false
name: mon_enter
params: ()
visibility: public
ri/1.8/system/MonitorMixin/cdesc-MonitorMixin.yaml000064400000003470150403646770016063 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: extend_object
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Adds monitor functionality to an arbitrary object by mixing the module with <tt>include</tt>. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "   require 'monitor.rb'\n\n   buf = []\n   buf.extend(MonitorMixin)\n   empty_cond = buf.new_cond\n\n   # consumer\n   Thread.start do\n     loop do\n       buf.synchronize do\n         empty_cond.wait_while { buf.empty? }\n         print buf.shift\n       end\n     end\n   end\n\n   # producer\n   while line = ARGF.gets\n     buf.synchronize do\n       buf.push(line)\n       empty_cond.signal\n     end\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: The consumer thread waits for the producer thread to push a line to buf while buf.empty?, and the producer thread (main thread) reads a line from ARGF and push it to buf, then call empty_cond.signal.
constants: []

full_name: MonitorMixin
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: mon_acquire
- !ruby/object:RI::MethodSummary 
  name: mon_check_owner
- !ruby/object:RI::MethodSummary 
  name: mon_enter
- !ruby/object:RI::MethodSummary 
  name: mon_enter_for_cond
- !ruby/object:RI::MethodSummary 
  name: mon_exit
- !ruby/object:RI::MethodSummary 
  name: mon_exit_for_cond
- !ruby/object:RI::MethodSummary 
  name: mon_initialize
- !ruby/object:RI::MethodSummary 
  name: mon_release
- !ruby/object:RI::MethodSummary 
  name: mon_synchronize
- !ruby/object:RI::MethodSummary 
  name: mon_try_enter
- !ruby/object:RI::MethodSummary 
  name: new_cond
- !ruby/object:RI::MethodSummary 
  name: synchronize
- !ruby/object:RI::MethodSummary 
  name: try_mon_enter
name: MonitorMixin
superclass: 
ri/1.8/system/TSort/tsort_each_child-i.yaml000064400000000614150403647000014473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: child
comment: 
- !ruby/struct:SM::Flow::P 
  body: Should be implemented by a extended class.
- !ruby/struct:SM::Flow::P 
  body: "#tsort_each_child is used to iterate for child nodes of <em>node</em>."
full_name: TSort#tsort_each_child
is_singleton: false
name: tsort_each_child
params: (node) {|child| ...}
visibility: public
ri/1.8/system/TSort/each_strongly_connected_component-i.yaml000064400000001213150403647000020136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: nodes
comment: 
- !ruby/struct:SM::Flow::P 
  body: "The iterator version of the #strongly_connected_components method. <tt><em>obj</em>.each_strongly_connected_component</tt> is similar to <tt><em>obj</em>.strongly_connected_components.each</tt>, but modification of <em>obj</em> during the iteration may lead to unexpected results."
- !ruby/struct:SM::Flow::P 
  body: "#each_strongly_connected_component returns <tt>nil</tt>."
full_name: TSort#each_strongly_connected_component
is_singleton: false
name: each_strongly_connected_component
params: ( {|nodes| ...}
visibility: public
ri/1.8/system/TSort/tsort_each_node-i.yaml000064400000000574150403647010014343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: node
comment: 
- !ruby/struct:SM::Flow::P 
  body: Should be implemented by a extended class.
- !ruby/struct:SM::Flow::P 
  body: "#tsort_each_node is used to iterate for all nodes over a graph."
full_name: TSort#tsort_each_node
is_singleton: false
name: tsort_each_node
params: ( {|node| ...}
visibility: public
ri/1.8/system/TSort/tsort-i.yaml000064400000000673150403647010012356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: If there is a cycle, TSort::Cyclic is raised.
full_name: TSort#tsort
is_singleton: false
name: tsort
params: ()
visibility: public
ri/1.8/system/TSort/each_strongly_connected_component_from-i.yaml000064400000001074150403647010021167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: nodes
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over strongly connected component in the subgraph reachable from <em>node</em>.
- !ruby/struct:SM::Flow::P 
  body: Return value is unspecified.
- !ruby/struct:SM::Flow::P 
  body: "#each_strongly_connected_component_from doesn't call #tsort_each_node."
full_name: TSort#each_strongly_connected_component_from
is_singleton: false
name: each_strongly_connected_component_from
params: (node, id_map={}, stack=[]) {|nodes| ...}
visibility: public
ri/1.8/system/TSort/strongly_connected_components-i.yaml000064400000000661150403647020017351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: TSort#strongly_connected_components
is_singleton: false
name: strongly_connected_components
params: ()
visibility: public
ri/1.8/system/TSort/cdesc-TSort.yaml000064400000011641150403647020013105 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: TSort implements topological sorting using Tarjan's algorithm for strongly connected components.
- !ruby/struct:SM::Flow::P 
  body: TSort is designed to be able to be used with any object which can be interpreted as a directed graph.
- !ruby/struct:SM::Flow::P 
  body: TSort requires two methods to interpret an object as a graph, tsort_each_node and tsort_each_child.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: tsort_each_node is used to iterate for all nodes over a graph.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: tsort_each_child is used to iterate for child nodes of a given node.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: The equality of nodes are defined by eql? and hash since TSort uses Hash internally.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: A Simple Example
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'tsort'\n\n  class Hash\n    include TSort\n    alias tsort_each_node each_key\n    def tsort_each_child(node, &amp;block)\n      fetch(node).each(&amp;block)\n    end\n  end\n\n  {1=&gt;[2, 3], 2=&gt;[3], 3=&gt;[], 4=&gt;[]}.tsort\n  #=&gt; [3, 2, 1, 4]\n\n  {1=&gt;[2], 2=&gt;[3, 4], 3=&gt;[2], 4=&gt;[]}.strongly_connected_components\n  #=&gt; [[4], [2, 3], [1]]\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: A More Realistic Example
- !ruby/struct:SM::Flow::P 
  body: "A very simple `make' like tool can be implemented as follows:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'tsort'\n\n  class Make\n    def initialize\n      @dep = {}\n      @dep.default = []\n    end\n\n    def rule(outputs, inputs=[], &amp;block)\n      triple = [outputs, inputs, block]\n      outputs.each {|f| @dep[f] = [triple]}\n      @dep[triple] = inputs\n    end\n\n    def build(target)\n      each_strongly_connected_component_from(target) {|ns|\n        if ns.length != 1\n          fs = ns.delete_if {|n| Array === n}\n          raise TSort::Cyclic.new(&quot;cyclic dependencies: #{fs.join ', '}&quot;)\n        end\n        n = ns.first\n        if Array === n\n          outputs, inputs, block = n\n          inputs_time = inputs.map {|f| File.mtime f}.max\n          begin\n            outputs_time = outputs.map {|f| File.mtime f}.min\n          rescue Errno::ENOENT\n            outputs_time = nil\n          end\n          if outputs_time == nil ||\n             inputs_time != nil &amp;&amp; outputs_time &lt;= inputs_time\n            sleep 1 if inputs_time != nil &amp;&amp; inputs_time.to_i == Time.now.to_i\n            block.call\n          end\n        end\n      }\n    end\n\n    def tsort_each_child(node, &amp;block)\n      @dep[node].each(&amp;block)\n    end\n    include TSort\n  end\n\n  def command(arg)\n    print arg, &quot;\\n&quot;\n    system arg\n  end\n\n  m = Make.new\n  m.rule(%w[t1]) { command 'date &gt; t1' }\n  m.rule(%w[t2]) { command 'date &gt; t2' }\n  m.rule(%w[t3]) { command 'date &gt; t3' }\n  m.rule(%w[t4], %w[t1 t3]) { command 'cat t1 t3 &gt; t4' }\n  m.rule(%w[t5], %w[t4 t2]) { command 'cat t4 t2 &gt; t5' }\n  m.build('t5')\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Bugs
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "'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."
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: References
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: R.
    body: E. Tarjan, &quot;Depth First Search and Linear Graph Algorithms&quot;,
  type: :UPPERALPHA
- !ruby/struct:SM::Flow::P 
  body: <em>SIAM Journal on Computing</em>, Vol. 1, No. 2, pp. 146-160, June 1972.
constants: []

full_name: TSort
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each_strongly_connected_component
- !ruby/object:RI::MethodSummary 
  name: each_strongly_connected_component_from
- !ruby/object:RI::MethodSummary 
  name: strongly_connected_components
- !ruby/object:RI::MethodSummary 
  name: tsort
- !ruby/object:RI::MethodSummary 
  name: tsort_each
- !ruby/object:RI::MethodSummary 
  name: tsort_each_child
- !ruby/object:RI::MethodSummary 
  name: tsort_each_node
name: TSort
superclass: 
ri/1.8/system/TSort/tsort_each-i.yaml000064400000001053150403647020013330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: node
comment: 
- !ruby/struct:SM::Flow::P 
  body: "The iterator version of the #tsort method. <tt><em>obj</em>.tsort_each</tt> is similar to <tt><em>obj</em>.tsort.each</tt>, but modification of <em>obj</em> during the iteration may lead to unexpected results."
- !ruby/struct:SM::Flow::P 
  body: "#tsort_each returns <tt>nil</tt>. If there is a cycle, TSort::Cyclic is raised."
full_name: TSort#tsort_each
is_singleton: false
name: tsort_each
params: ( {|node| ...}
visibility: public
ri/1.8/system/TSort/Cyclic/cdesc-Cyclic.yaml000064400000000307150403647030014444 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: TSort::Cyclic
includes: []

instance_methods: []

name: Cyclic
superclass: StandardError
ri/1.8/system/RDoc/Fortran95parser/find_arguments-i.yaml000064400000001115150403647040016765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return comments of definitions of arguments
- !ruby/struct:SM::Flow::P 
  body: If &quot;all&quot; argument is true, information of all arguments are returned. If &quot;modified_params&quot; is true, list of arguments are decorated, for example, optional arguments are parenthetic as &quot;[arg]&quot;.
full_name: RDoc::Fortran95parser#find_arguments
is_singleton: false
name: find_arguments
params: (args, text, all=nil, indent=nil, modified_params=nil)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/comment_out%3f-i.yaml000064400000000376150403647040016617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comment out checker
full_name: RDoc::Fortran95parser#comment_out?
is_singleton: false
name: comment_out?
params: (line)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/parse_program_or_module-i.yaml000064400000000411150403647040020664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Fortran95parser#parse_program_or_module
is_singleton: false
name: parse_program_or_module
params: (container, code, visibility=:public, external=nil)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/progress-i.yaml000064400000000276150403647040015633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Fortran95parser#progress
is_singleton: false
name: progress
params: (char)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/definition_info-i.yaml000064400000000507150403647040017127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse string argument &quot;text&quot;, and Return Array of Fortran95Definition object
full_name: RDoc::Fortran95parser#definition_info
is_singleton: false
name: definition_info
params: (text)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/block_end%3f-i.yaml000064400000000515150403647040016201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Which &quot;line&quot; is end of block (module, program, block data, subroutine, function) statement ?
full_name: RDoc::Fortran95parser#block_end?
is_singleton: false
name: block_end?
params: (line)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/remove_header_marker-i.yaml000064400000000467150403647040020137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: header marker &quot;=&quot;, &quot;==&quot;, ... are removed
full_name: RDoc::Fortran95parser#remove_header_marker
is_singleton: false
name: remove_header_marker
params: (text)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/collect_first_comment-i.yaml000064400000000434150403647040020341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Collect comment for file entity
full_name: RDoc::Fortran95parser#collect_first_comment
is_singleton: false
name: collect_first_comment
params: (body)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/find_namelists-i.yaml000064400000000457150403647040016767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return comments of definitions of namelists
full_name: RDoc::Fortran95parser#find_namelists
is_singleton: false
name: find_namelists
params: (text, before_contains=nil)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/find_comments-i.yaml000064400000000625150403647040016612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comments just after module or subprogram, or arguments are returned. If &quot;COMMENTS_ARE_UPPER&quot; is true, comments just before modules or subprograms are returned
full_name: RDoc::Fortran95parser#find_comments
is_singleton: false
name: find_comments
params: (text)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/remove_private_comments-i.yaml000064400000000334150403647040020716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Fortran95parser#remove_private_comments
is_singleton: false
name: remove_private_comments
params: (body)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/find_visibility-i.yaml000064400000000437150403647040017155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find visibility
full_name: RDoc::Fortran95parser#find_visibility
is_singleton: false
name: find_visibility
params: (container, subname, visibility_info)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/semicolon_to_linefeed-i.yaml000064400000000442150403647040020307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Semicolons are replaced to line feed.
full_name: RDoc::Fortran95parser#semicolon_to_linefeed
is_singleton: false
name: semicolon_to_linefeed
params: (text)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/scan-i.yaml000064400000000354150403647040014710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: define code constructs
full_name: RDoc::Fortran95parser#scan
is_singleton: false
name: scan
params: ()
visibility: public
ri/1.8/system/RDoc/Fortran95parser/block_start%3f-i.yaml000064400000000523150403647040016567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Which &quot;line&quot; is start of block (module, program, block data, subroutine, function) statement ?
full_name: RDoc::Fortran95parser#block_start?
is_singleton: false
name: block_start?
params: (line)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/remove_trailing_alias-i.yaml000064400000000454150403647040020324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Remove &quot;Alias for&quot; in end of comments
full_name: RDoc::Fortran95parser#remove_trailing_alias
is_singleton: false
name: remove_trailing_alias
params: (text)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/new-c.yaml000064400000000440150403647040014543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: prepare to parse a Fortran 95 file
full_name: RDoc::Fortran95parser::new
is_singleton: true
name: new
params: (top_level, file_name, body, options, stats)
visibility: public
ri/1.8/system/RDoc/Fortran95parser/continuous_line%3f-i.yaml000064400000000412150403647040017472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Continuous line checker
full_name: RDoc::Fortran95parser#continuous_line?
is_singleton: false
name: continuous_line?
params: (line)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/check_external_aliases-i.yaml000064400000000463150403647040020445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Check external aliases
full_name: RDoc::Fortran95parser#check_external_aliases
is_singleton: false
name: check_external_aliases
params: (subname, params, comment, test=nil)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/set_visibility-i.yaml000064400000000635150403647040017030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set visibility
- !ruby/struct:SM::Flow::P 
  body: "&quot;subname&quot; element of &quot;visibility_info&quot; is deleted."
full_name: RDoc::Fortran95parser#set_visibility
is_singleton: false
name: set_visibility
params: (container, subname, visibility_default, visibility_info)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/cdesc-Fortran95parser.yaml000064400000004754150403647040017633 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: See rdoc/parsers/parse_f95.rb
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "\"false\":"
      body: Comments are below source code
    - !ruby/struct:SM::Flow::LI 
      label: "\"true\" :"
      body: Comments are upper source code
    type: :NOTE
  name: COMMENTS_ARE_UPPER
  value: "false"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Internal alias message
  name: INTERNAL_ALIAS_MES
  value: "\"Alias for\""
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: External alias message
  name: EXTERNAL_ALIAS_MES
  value: "\"The entity is\""
full_name: RDoc::Fortran95parser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: block_end?
- !ruby/object:RI::MethodSummary 
  name: block_start?
- !ruby/object:RI::MethodSummary 
  name: check_external_aliases
- !ruby/object:RI::MethodSummary 
  name: check_public_methods
- !ruby/object:RI::MethodSummary 
  name: collect_first_comment
- !ruby/object:RI::MethodSummary 
  name: comment_out?
- !ruby/object:RI::MethodSummary 
  name: continuous_line?
- !ruby/object:RI::MethodSummary 
  name: definition_info
- !ruby/object:RI::MethodSummary 
  name: find_arguments
- !ruby/object:RI::MethodSummary 
  name: find_comments
- !ruby/object:RI::MethodSummary 
  name: find_namelists
- !ruby/object:RI::MethodSummary 
  name: find_visibility
- !ruby/object:RI::MethodSummary 
  name: initialize_external_method
- !ruby/object:RI::MethodSummary 
  name: initialize_public_method
- !ruby/object:RI::MethodSummary 
  name: parse_program_or_module
- !ruby/object:RI::MethodSummary 
  name: parse_subprogram
- !ruby/object:RI::MethodSummary 
  name: parse_visibility
- !ruby/object:RI::MethodSummary 
  name: progress
- !ruby/object:RI::MethodSummary 
  name: remove_empty_head_lines
- !ruby/object:RI::MethodSummary 
  name: remove_header_marker
- !ruby/object:RI::MethodSummary 
  name: remove_private_comments
- !ruby/object:RI::MethodSummary 
  name: remove_trailing_alias
- !ruby/object:RI::MethodSummary 
  name: scan
- !ruby/object:RI::MethodSummary 
  name: semicolon_to_linefeed
- !ruby/object:RI::MethodSummary 
  name: set_visibility
- !ruby/object:RI::MethodSummary 
  name: united_to_one_line
name: Fortran95parser
superclass: Object
ri/1.8/system/RDoc/Fortran95parser/Fortran95Definition/cdesc-Fortran95Definition.yaml000064400000002300150403647040024212 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Suffix of array
  name: arraysuffix
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Comments
  name: comment
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Initial Value
  name: inivalue
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Flag of non documentation
  name: nodoc
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Types of variable
  name: types
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Name of variable
  name: varname
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Information of arguments of subroutines and functions in Fortran95
constants: []

full_name: RDoc::Fortran95parser::Fortran95Definition
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: include_attr?
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Fortran95Definition
superclass: Object
ri/1.8/system/RDoc/Fortran95parser/Fortran95Definition/new-c.yaml000064400000000377150403647040020356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Fortran95parser::Fortran95Definition::new
is_singleton: true
name: new
params: (varname, types, inivalue, arraysuffix, comment, nodoc=false)
visibility: public
ri/1.8/system/RDoc/Fortran95parser/Fortran95Definition/include_attr%3f-i.yaml000064400000000446150403647040022543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If attr is included, true is returned
full_name: RDoc::Fortran95parser::Fortran95Definition#include_attr?
is_singleton: false
name: include_attr?
params: (attr)
visibility: public
ri/1.8/system/RDoc/Fortran95parser/Fortran95Definition/to_s-i.yaml000064400000000306150403647040020527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Fortran95parser::Fortran95Definition#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/RDoc/Fortran95parser/check_public_methods-i.yaml000064400000000431150403647040020116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Check public_methods
full_name: RDoc::Fortran95parser#check_public_methods
is_singleton: false
name: check_public_methods
params: (method, parent)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/parse_visibility-i.yaml000064400000000427150403647040017346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse visibility
full_name: RDoc::Fortran95parser#parse_visibility
is_singleton: false
name: parse_visibility
params: (code, default, container)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/initialize_external_method-i.yaml000064400000000706150403647040021370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create method for external alias
- !ruby/struct:SM::Flow::P 
  body: If argument &quot;internal&quot; is true, file is ignored.
full_name: RDoc::Fortran95parser#initialize_external_method
is_singleton: false
name: initialize_external_method
params: (new, old, params, file, comment, token=nil, internal=nil, nolink=nil)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/parse_subprogram-i.yaml000064400000000622150403647040017335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse arguments, comment, code of subroutine and function. Return AnyMethod object.
full_name: RDoc::Fortran95parser#parse_subprogram
is_singleton: false
name: parse_subprogram
params: (subprogram, params, comment, code, before_contains=nil, function=nil, prefix=nil)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/initialize_public_method-i.yaml000064400000000455150403647040021025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create method for internal alias
full_name: RDoc::Fortran95parser#initialize_public_method
is_singleton: false
name: initialize_public_method
params: (method, parent)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/remove_empty_head_lines-i.yaml000064400000000442150403647040020650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Empty lines in header are removed
full_name: RDoc::Fortran95parser#remove_empty_head_lines
is_singleton: false
name: remove_empty_head_lines
params: (text)
visibility: private
ri/1.8/system/RDoc/Fortran95parser/united_to_one_line-i.yaml000064400000000543150403647040017626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Continuous lines are united.
- !ruby/struct:SM::Flow::P 
  body: Comments in continuous lines are removed.
full_name: RDoc::Fortran95parser#united_to_one_line
is_singleton: false
name: united_to_one_line
params: (f90src)
visibility: private
ri/1.8/system/RDoc/no_comment-c.yaml000064400000000404150403647040013102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Report the fact that no doc comment count be found
full_name: RDoc::no_comment
is_singleton: true
name: no_comment
params: ()
visibility: private
ri/1.8/system/RDoc/Constant/new-c.yaml000064400000000274150403647040013333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Constant::new
is_singleton: true
name: new
params: (name, value, comment)
visibility: public
ri/1.8/system/RDoc/Constant/cdesc-Constant.yaml000064400000000651150403647040015171 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: value
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Represent a constant
constants: []

full_name: RDoc::Constant
includes: []

instance_methods: []

name: Constant
superclass: CodeObject
ri/1.8/system/RDoc/extract_sections-c.yaml000064400000000717150403647040014334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given an array of flow items and an array of section names, extract those sections from the flow which have headings corresponding to a section name in the list. Return them in the order of names in the <tt>sections</tt> array.
full_name: RDoc::extract_sections
is_singleton: true
name: extract_sections
params: (flow, sections)
visibility: private
ri/1.8/system/RDoc/Require/cdesc-Require.yaml000064400000000541150403647040014635 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: a required file
constants: []

full_name: RDoc::Require
includes: []

instance_methods: []

name: Require
superclass: CodeObject
ri/1.8/system/RDoc/Require/new-c.yaml000064400000000264150403647040013155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Require::new
is_singleton: true
name: new
params: (name, comment)
visibility: public
ri/1.8/system/RDoc/usage-c.yaml000064400000000642150403647040012054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Display usage information from the comment at the top of the file. String arguments identify specific sections of the comment to display. An optional integer first argument specifies the exit status (defaults to 0)
full_name: RDoc::usage
is_singleton: true
name: usage
params: (*args)
visibility: public
ri/1.8/system/RDoc/usage_no_exit-c.yaml000064400000000351150403647050013577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Display usage
full_name: RDoc::usage_no_exit
is_singleton: true
name: usage_no_exit
params: (*args)
visibility: public
ri/1.8/system/RDoc/Context/add_class-i.yaml000064400000000317150403647050014317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_class
is_singleton: false
name: add_class
params: (class_type, name, superclass)
visibility: public
ri/1.8/system/RDoc/Context/initialize_classes_and_modules-i.yaml000064400000000335150403647050020632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#initialize_classes_and_modules
is_singleton: false
name: initialize_classes_and_modules
params: ()
visibility: public
ri/1.8/system/RDoc/Context/add_module-i.yaml000064400000000305150403647050014474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_module
is_singleton: false
name: add_module
params: (class_type, name)
visibility: public
ri/1.8/system/RDoc/Context/defined_in%3f-i.yaml000064400000000447150403647050014770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return true if at least part of this thing was defined in <tt>file</tt>
full_name: RDoc::Context#defined_in?
is_singleton: false
name: defined_in?
params: (file)
visibility: public
ri/1.8/system/RDoc/Context/%3c%3d%3e-i.yaml000064400000000361150403647050013544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: allow us to sort modules by name
full_name: RDoc::Context#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/RDoc/Context/classes-i.yaml000064400000000375150403647050014043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: map the class hash to an array externally
full_name: RDoc::Context#classes
is_singleton: false
name: classes
params: ()
visibility: public
ri/1.8/system/RDoc/Context/set_visibility_for-i.yaml000064400000000560150403647050016312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given an array <tt>methods</tt> of method names, set the visibility of the corresponding AnyMethod object
full_name: RDoc::Context#set_visibility_for
is_singleton: false
name: set_visibility_for
params: (methods, vis, singleton=false)
visibility: public
ri/1.8/system/RDoc/Context/find_enclosing_module_named-i.yaml000064400000000437150403647050020077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: find a module at a higher scope
full_name: RDoc::Context#find_enclosing_module_named
is_singleton: false
name: find_enclosing_module_named
params: (name)
visibility: public
ri/1.8/system/RDoc/Context/modules-i.yaml000064400000000376150403647050014057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: map the module hash to an array externally
full_name: RDoc::Context#modules
is_singleton: false
name: modules
params: ()
visibility: public
ri/1.8/system/RDoc/Context/find_module_named-i.yaml000064400000000377150403647050016041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find a named module
full_name: RDoc::Context#find_module_named
is_singleton: false
name: find_module_named
params: (name)
visibility: public
ri/1.8/system/RDoc/Context/add_to-i.yaml000064400000000271150403647050013633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_to
is_singleton: false
name: add_to
params: (array, thing)
visibility: public
ri/1.8/system/RDoc/Context/find_symbol-i.yaml000064400000000545150403647050014712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Look up the given symbol. If method is non-nil, then we assume the symbol references a module that contains that method
full_name: RDoc::Context#find_symbol
is_singleton: false
name: find_symbol
params: (symbol, method=nil)
visibility: public
ri/1.8/system/RDoc/Context/add_class_or_module-i.yaml000064400000000363150403647050016365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_class_or_module
is_singleton: false
name: add_class_or_module
params: (collection, class_type, name, superclass=nil)
visibility: public
ri/1.8/system/RDoc/Context/add_attribute-i.yaml000064400000000307150403647050015214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_attribute
is_singleton: false
name: add_attribute
params: (an_attribute)
visibility: public
ri/1.8/system/RDoc/Context/add_alias-i.yaml000064400000000273150403647050014304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_alias
is_singleton: false
name: add_alias
params: (an_alias)
visibility: public
ri/1.8/system/RDoc/Context/find_instance_method_named-i.yaml000064400000000452150403647050017712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find a named instance method, or return nil
full_name: RDoc::Context#find_instance_method_named
is_singleton: false
name: find_instance_method_named
params: (name)
visibility: private
ri/1.8/system/RDoc/Context/each_constant-i.yaml000064400000000306150403647060015212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: c
comment: 
full_name: RDoc::Context#each_constant
is_singleton: false
name: each_constant
params: () {|c| ...}
visibility: public
ri/1.8/system/RDoc/Context/find_method_named-i.yaml000064400000000417150403647060016030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find a named method, or return nil
full_name: RDoc::Context#find_method_named
is_singleton: false
name: find_method_named
params: (name)
visibility: private
ri/1.8/system/RDoc/Context/add_require-i.yaml000064400000000436150403647060014671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Requires always get added to the top-level (file) context
full_name: RDoc::Context#add_require
is_singleton: false
name: add_require
params: (a_require)
visibility: public
ri/1.8/system/RDoc/Context/ongoing_visibility%3d-i.yaml000064400000000434150403647060016606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Change the default visibility for new methods
full_name: RDoc::Context#ongoing_visibility=
is_singleton: false
name: ongoing_visibility=
params: (vis)
visibility: public
ri/1.8/system/RDoc/Context/new-c.yaml000064400000000247150403647070013171 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/RDoc/Context/each_classmodule-i.yaml000064400000000450150403647070015675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: m
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterate over all the classes and modules in this object
full_name: RDoc::Context#each_classmodule
is_singleton: false
name: each_classmodule
params: () {|m| ...}
visibility: public
ri/1.8/system/RDoc/Context/record_location-i.yaml000064400000000430150403647070015546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Record the file that we happen to find it in
full_name: RDoc::Context#record_location
is_singleton: false
name: record_location
params: (toplevel)
visibility: public
ri/1.8/system/RDoc/Context/cdesc-Context.yaml000064400000006064150403647070014666 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: aliases
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: constants
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: in_files
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: includes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: method_list
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: requires
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: sections
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: visibility
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A Context is something that can hold modules, classes, methods, attributes, aliases, requires, and includes. Classes, modules, and files are all Contexts.
constants: []

full_name: RDoc::Context
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: add_alias
- !ruby/object:RI::MethodSummary 
  name: add_attribute
- !ruby/object:RI::MethodSummary 
  name: add_class
- !ruby/object:RI::MethodSummary 
  name: add_class_or_module
- !ruby/object:RI::MethodSummary 
  name: add_constant
- !ruby/object:RI::MethodSummary 
  name: add_include
- !ruby/object:RI::MethodSummary 
  name: add_method
- !ruby/object:RI::MethodSummary 
  name: add_module
- !ruby/object:RI::MethodSummary 
  name: add_require
- !ruby/object:RI::MethodSummary 
  name: add_to
- !ruby/object:RI::MethodSummary 
  name: classes
- !ruby/object:RI::MethodSummary 
  name: defined_in?
- !ruby/object:RI::MethodSummary 
  name: each_attribute
- !ruby/object:RI::MethodSummary 
  name: each_classmodule
- !ruby/object:RI::MethodSummary 
  name: each_constant
- !ruby/object:RI::MethodSummary 
  name: each_method
- !ruby/object:RI::MethodSummary 
  name: find_attribute_named
- !ruby/object:RI::MethodSummary 
  name: find_constant_named
- !ruby/object:RI::MethodSummary 
  name: find_enclosing_module_named
- !ruby/object:RI::MethodSummary 
  name: find_instance_method_named
- !ruby/object:RI::MethodSummary 
  name: find_local_symbol
- !ruby/object:RI::MethodSummary 
  name: find_method_named
- !ruby/object:RI::MethodSummary 
  name: find_module_named
- !ruby/object:RI::MethodSummary 
  name: find_symbol
- !ruby/object:RI::MethodSummary 
  name: initialize_classes_and_modules
- !ruby/object:RI::MethodSummary 
  name: initialize_methods_etc
- !ruby/object:RI::MethodSummary 
  name: modules
- !ruby/object:RI::MethodSummary 
  name: ongoing_visibility=
- !ruby/object:RI::MethodSummary 
  name: record_location
- !ruby/object:RI::MethodSummary 
  name: remove_classes_and_modules
- !ruby/object:RI::MethodSummary 
  name: remove_methods_etc
- !ruby/object:RI::MethodSummary 
  name: set_current_section
- !ruby/object:RI::MethodSummary 
  name: set_visibility_for
- !ruby/object:RI::MethodSummary 
  name: toplevel
name: Context
superclass: CodeObject
ri/1.8/system/RDoc/Context/remove_classes_and_modules-i.yaml000064400000000464150403647100017765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "and remove classes and modules when we see a :nodoc: all"
full_name: RDoc::Context#remove_classes_and_modules
is_singleton: false
name: remove_classes_and_modules
params: ()
visibility: public
ri/1.8/system/RDoc/Context/set_current_section-i.yaml000064400000000411150403647100016452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Handle sections
full_name: RDoc::Context#set_current_section
is_singleton: false
name: set_current_section
params: (title, comment)
visibility: public
ri/1.8/system/RDoc/Context/Section/new-c.yaml000064400000000276150403647100014571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context::Section::new
is_singleton: true
name: new
params: (title, comment)
visibility: public
ri/1.8/system/RDoc/Context/Section/cdesc-Section.yaml000064400000000752150403647100016242 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: comment
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: sequence
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: title
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: RDoc::Context::Section
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: set_comment
name: Section
superclass: Object
ri/1.8/system/RDoc/Context/Section/set_comment-i.yaml000064400000000310150403647100016310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context::Section#set_comment
is_singleton: false
name: set_comment
params: (comment)
visibility: private
ri/1.8/system/RDoc/Context/find_constant_named-i.yaml000064400000000425150403647100016373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find a named constant, or return nil
full_name: RDoc::Context#find_constant_named
is_singleton: false
name: find_constant_named
params: (name)
visibility: private
ri/1.8/system/RDoc/Context/find_attribute_named-i.yaml000064400000000430150403647110016542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find a named attribute, or return nil
full_name: RDoc::Context#find_attribute_named
is_singleton: false
name: find_attribute_named
params: (name)
visibility: private
ri/1.8/system/RDoc/Context/remove_methods_etc-i.yaml000064400000000542150403647110016252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If a class's documentation is turned off after we've started collecting methods etc., we need to remove the ones we have
full_name: RDoc::Context#remove_methods_etc
is_singleton: false
name: remove_methods_etc
params: ()
visibility: public
ri/1.8/system/RDoc/Context/each_method-i.yaml000064400000000302150403647110014631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: m
comment: 
full_name: RDoc::Context#each_method
is_singleton: false
name: each_method
params: () {|m| ...}
visibility: public
ri/1.8/system/RDoc/Context/initialize_methods_etc-i.yaml000064400000000315150403647110017114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#initialize_methods_etc
is_singleton: false
name: initialize_methods_etc
params: ()
visibility: public
ri/1.8/system/RDoc/Context/toplevel-i.yaml000064400000000366150403647110014235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the toplevel that owns us
full_name: RDoc::Context#toplevel
is_singleton: false
name: toplevel
params: ()
visibility: public
ri/1.8/system/RDoc/Context/add_method-i.yaml000064400000000275150403647120014473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_method
is_singleton: false
name: add_method
params: (a_method)
visibility: public
ri/1.8/system/RDoc/Context/find_local_symbol-i.yaml000064400000000311150403647120016051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#find_local_symbol
is_singleton: false
name: find_local_symbol
params: (symbol)
visibility: public
ri/1.8/system/RDoc/Context/add_include-i.yaml000064400000000301150403647120014624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_include
is_singleton: false
name: add_include
params: (an_include)
visibility: public
ri/1.8/system/RDoc/Context/add_constant-i.yaml000064400000000276150403647120015045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Context#add_constant
is_singleton: false
name: add_constant
params: (const)
visibility: public
ri/1.8/system/RDoc/Context/each_attribute-i.yaml000064400000000310150403647120015354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: a
comment: 
full_name: RDoc::Context#each_attribute
is_singleton: false
name: each_attribute
params: () {|a| ...}
visibility: public
ri/1.8/system/RDoc/C_Parser/handle_attr-i.yaml000064400000000337150403647130014742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#handle_attr
is_singleton: false
name: handle_attr
params: (var_name, attr_name, reader, writer)
visibility: private
ri/1.8/system/RDoc/C_Parser/handle_tab_width-i.yaml000064400000000307150403647130015732 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::C_Parser#handle_tab_width
is_singleton: false
name: handle_tab_width
params: (body)
visibility: private
ri/1.8/system/RDoc/C_Parser/find_const_comment-i.yaml000064400000000571150403647130016325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finds a comment matching <tt>type</tt> and <tt>const_name</tt> either above the comment or in the matching Document- section.
full_name: RDoc::C_Parser#find_const_comment
is_singleton: false
name: find_const_comment
params: (type, const_name)
visibility: private
ri/1.8/system/RDoc/C_Parser/handle_ifdefs_in-i.yaml000064400000000435150403647130015715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Removes #ifdefs that would otherwise confuse us"
full_name: RDoc::C_Parser#handle_ifdefs_in
is_singleton: false
name: handle_ifdefs_in
params: (body)
visibility: private
ri/1.8/system/RDoc/C_Parser/progress-i.yaml000064400000000272150403647130014317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#progress
is_singleton: false
name: progress
params: (char)
visibility: private
ri/1.8/system/RDoc/C_Parser/find_override_comment-i.yaml000064400000000331150403647130017010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#find_override_comment
is_singleton: false
name: find_override_comment
params: (meth_name)
visibility: private
ri/1.8/system/RDoc/C_Parser/find_class_comment-i.yaml000064400000001720150403647140016302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Look for class or module documentation above Init_+class_name+(void), in a Document-class <tt>class_name</tt> (or module) comment or above an rb_define_class (or module). If a comment is supplied above a matching Init_ and a rb_define_class the Init_ comment is used.
- !ruby/struct:SM::Flow::VERB 
  body: "  /*\n   * This is a comment for Foo\n   */\n  Init_Foo(void) {\n      VALUE cFoo = rb_define_class(&quot;Foo&quot;, rb_cObject);\n  }\n\n  /*\n   * Document-class: Foo\n   * This is a comment for Foo\n   */\n  Init_foo(void) {\n      VALUE cFoo = rb_define_class(&quot;Foo&quot;, rb_cObject);\n  }\n\n  /*\n   * This is a comment for Foo\n   */\n  VALUE cFoo = rb_define_class(&quot;Foo&quot;, rb_cObject);\n"
full_name: RDoc::C_Parser#find_class_comment
is_singleton: false
name: find_class_comment
params: (class_name, class_meth)
visibility: private
ri/1.8/system/RDoc/C_Parser/do_classes-i.yaml000064400000000272150403647140014573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#do_classes
is_singleton: false
name: do_classes
params: ()
visibility: private
ri/1.8/system/RDoc/C_Parser/handle_method-i.yaml000064400000000404150403647140015244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#handle_method
is_singleton: false
name: handle_method
params: (type, var_name, meth_name, meth_body, param_count, source_file = nil)
visibility: private
ri/1.8/system/RDoc/C_Parser/remove_private_comments-i.yaml000064400000000330150403647140017403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::C_Parser#remove_private_comments
is_singleton: false
name: remove_private_comments
params: (comment)
visibility: private
ri/1.8/system/RDoc/C_Parser/do_constants-i.yaml000064400000000276150403647150015157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#do_constants
is_singleton: false
name: do_constants
params: ()
visibility: private
ri/1.8/system/RDoc/C_Parser/scan-i.yaml000064400000000462150403647150013402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extract the classes/modules and methods from a C file and return the corresponding top-level object
full_name: RDoc::C_Parser#scan
is_singleton: false
name: scan
params: ()
visibility: public
ri/1.8/system/RDoc/C_Parser/handle_class_module-i.yaml000064400000000373150403647160016445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::C_Parser#handle_class_module
is_singleton: false
name: handle_class_module
params: (var_name, class_mod, class_name, parent, in_module)
visibility: private
ri/1.8/system/RDoc/C_Parser/cdesc-C_Parser.yaml000064400000012323150403647160015005 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: progress
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "We attempt to parse C extension files. Basically we look for the standard patterns that you find in extensions: <tt>rb_define_class, rb_define_method</tt> and so on. We also try to find the corresponding C source for the methods and extract comments, but if we fail we don't worry too much."
- !ruby/struct:SM::Flow::P 
  body: "The comments associated with a Ruby method are extracted from the C comment block associated with the routine that <em>implements</em> that method, that is to say the method whose name is given in the <tt>rb_define_method</tt> call. For example, you might write:"
- !ruby/struct:SM::Flow::VERB 
  body: " /*\n  * Returns a new array that is a one-dimensional flattening of this\n  * array (recursively). That is, for every element that is an array,\n  * extract its elements into the new array.\n  *\n  *    s = [ 1, 2, 3 ]           #=&gt; [1, 2, 3]\n  *    t = [ 4, 5, 6, [7, 8] ]   #=&gt; [4, 5, 6, [7, 8]]\n  *    a = [ s, t, 9, 10 ]       #=&gt; [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]\n  *    a.flatten                 #=&gt; [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n  */\n  static VALUE\n  rb_ary_flatten(ary)\n      VALUE ary;\n  {\n      ary = rb_obj_dup(ary);\n      rb_ary_flatten_bang(ary);\n      return ary;\n  }\n\n  ...\n\n  void\n  Init_Array()\n  {\n    ...\n    rb_define_method(rb_cArray, &quot;flatten&quot;, rb_ary_flatten, 0);\n"
- !ruby/struct:SM::Flow::P 
  body: Here RDoc will determine from the rb_define_method line that there's a method called &quot;flatten&quot; in class Array, and will look for the implementation in the method rb_ary_flatten. It will then use the comment from that method in the HTML output. This method must be in the same source file as the rb_define_method.
- !ruby/struct:SM::Flow::P 
  body: C classes can be diagrammed (see /tc/dl/ruby/ruby/error.c), and RDoc integrates C and Ruby source into one tree
- !ruby/struct:SM::Flow::P 
  body: "The comment blocks may include special directives:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Document-class: <i>name</i>"
    body: This comment block is documentation for the given class. Use this when the <tt>Init_xxx</tt> method is not named after the class.
  - !ruby/struct:SM::Flow::LI 
    label: "Document-method: <i>name</i>"
    body: This comment documents the named method. Use when RDoc cannot automatically find the method from it's declaration
  - !ruby/struct:SM::Flow::LI 
    label: "call-seq:  <i>text up to an empty line</i>"
    body: Because C source doesn't give descriptive names to Ruby-level parameters, you need to document the calling sequence explicitly
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: In addition, RDoc assumes by default that the C method implementing a Ruby function is in the same source file as the rb_define_method call. If this isn't the case, add the comment
- !ruby/struct:SM::Flow::VERB 
  body: "   rb_define_method(....);  // in: filename\n"
- !ruby/struct:SM::Flow::P 
  body: As an example, we might have an extension that defines multiple classes in its Init_xxx method. We could document them using
- !ruby/struct:SM::Flow::VERB 
  body: " /*\n  * Document-class:  MyClass\n  *\n  * Encapsulate the writing and reading of the configuration\n  * file. ...\n  */\n\n /*\n  * Document-method: read_value\n  *\n  * call-seq:\n  *   cfg.read_value(key)            -&gt; value\n  *   cfg.read_value(key} { |key| }  -&gt; value\n  *\n  * Return the value corresponding to <tt>key</tt> from the configuration.\n  * In the second form, if the key isn't found, invoke the\n  * block and return its value.\n  */\n"
constants: []

full_name: RDoc::C_Parser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_aliases
- !ruby/object:RI::MethodSummary 
  name: do_classes
- !ruby/object:RI::MethodSummary 
  name: do_constants
- !ruby/object:RI::MethodSummary 
  name: do_includes
- !ruby/object:RI::MethodSummary 
  name: do_methods
- !ruby/object:RI::MethodSummary 
  name: find_attr_comment
- !ruby/object:RI::MethodSummary 
  name: find_body
- !ruby/object:RI::MethodSummary 
  name: find_class
- !ruby/object:RI::MethodSummary 
  name: find_class_comment
- !ruby/object:RI::MethodSummary 
  name: find_const_comment
- !ruby/object:RI::MethodSummary 
  name: find_modifiers
- !ruby/object:RI::MethodSummary 
  name: find_override_comment
- !ruby/object:RI::MethodSummary 
  name: handle_attr
- !ruby/object:RI::MethodSummary 
  name: handle_class_module
- !ruby/object:RI::MethodSummary 
  name: handle_constants
- !ruby/object:RI::MethodSummary 
  name: handle_ifdefs_in
- !ruby/object:RI::MethodSummary 
  name: handle_method
- !ruby/object:RI::MethodSummary 
  name: handle_tab_width
- !ruby/object:RI::MethodSummary 
  name: mangle_comment
- !ruby/object:RI::MethodSummary 
  name: progress
- !ruby/object:RI::MethodSummary 
  name: remove_commented_out_lines
- !ruby/object:RI::MethodSummary 
  name: remove_private_comments
- !ruby/object:RI::MethodSummary 
  name: scan
- !ruby/object:RI::MethodSummary 
  name: warn
name: C_Parser
superclass: Object
ri/1.8/system/RDoc/C_Parser/new-c.yaml000064400000000420150403647160013234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: prepare to parse a C file
full_name: RDoc::C_Parser::new
is_singleton: true
name: new
params: (top_level, file_name, body, options, stats)
visibility: public
ri/1.8/system/RDoc/C_Parser/mangle_comment-i.yaml000064400000000440150403647170015441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Remove the /*'s and leading asterisks from C comments
full_name: RDoc::C_Parser#mangle_comment
is_singleton: false
name: mangle_comment
params: (comment)
visibility: private
ri/1.8/system/RDoc/C_Parser/do_includes-i.yaml000064400000000533150403647170014747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Look for includes of the form:"
- !ruby/struct:SM::Flow::VERB 
  body: "    rb_include_module(rb_cArray, rb_mEnumerable);\n"
full_name: RDoc::C_Parser#do_includes
is_singleton: false
name: do_includes
params: ()
visibility: private
ri/1.8/system/RDoc/C_Parser/find_attr_comment-i.yaml000064400000000321150403647200016140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#find_attr_comment
is_singleton: false
name: find_attr_comment
params: (attr_name)
visibility: private
ri/1.8/system/RDoc/C_Parser/remove_commented_out_lines-i.yaml000064400000000551150403647200020062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: removes lines that are commented out that might otherwise get picked up when scanning for classes and methods
full_name: RDoc::C_Parser#remove_commented_out_lines
is_singleton: false
name: remove_commented_out_lines
params: ()
visibility: private
ri/1.8/system/RDoc/C_Parser/do_methods-i.yaml000064400000000272150403647210014577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#do_methods
is_singleton: false
name: do_methods
params: ()
visibility: private
ri/1.8/system/RDoc/C_Parser/find_modifiers-i.yaml000064400000000571150403647210015435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "If the comment block contains a section that looks like:"
- !ruby/struct:SM::Flow::P 
  body: use it for the parameters.
full_name: RDoc::C_Parser#find_modifiers
is_singleton: false
name: find_modifiers
params: |
  Array.new
  Array.new(10)

visibility: private
ri/1.8/system/RDoc/C_Parser/do_aliases-i.yaml000064400000000272150403647220014556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::C_Parser#do_aliases
is_singleton: false
name: do_aliases
params: ()
visibility: private
ri/1.8/system/RDoc/C_Parser/find_class-i.yaml000064400000000305150403647220014555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::C_Parser#find_class
is_singleton: false
name: find_class
params: (raw_name, name)
visibility: private
ri/1.8/system/RDoc/C_Parser/find_body-i.yaml000064400000000460150403647220014407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find the C code corresponding to a Ruby method
full_name: RDoc::C_Parser#find_body
is_singleton: false
name: find_body
params: (meth_name, meth_obj, body, quiet = false)
visibility: private
ri/1.8/system/RDoc/C_Parser/handle_constants-i.yaml000064400000001324150403647220016001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Adds constant comments. By providing some_value: at the start ofthe comment you can override the C value of the comment to give a friendly definition."
- !ruby/struct:SM::Flow::VERB 
  body: "  /* 300: The perfect score in bowling */\n  rb_define_const(cFoo, &quot;PERFECT&quot;, INT2FIX(300);\n"
- !ruby/struct:SM::Flow::P 
  body: Will override +INT2FIX(300)+ with the value +300+ in the output RDoc. Values may include quotes and escaped colons (\:).
full_name: RDoc::C_Parser#handle_constants
is_singleton: false
name: handle_constants
params: (type, var_name, const_name, definition)
visibility: private
ri/1.8/system/RDoc/C_Parser/warn-i.yaml000064400000000256150403647230013425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::C_Parser#warn
is_singleton: false
name: warn
params: (msg)
visibility: private
ri/1.8/system/RDoc/NormalModule/is_module%3f-i.yaml000064400000000272150403647230015632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::NormalModule#is_module?
is_singleton: false
name: is_module?
params: ()
visibility: public
ri/1.8/system/RDoc/NormalModule/cdesc-NormalModule.yaml000064400000000455150403647240016607 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Module
constants: []

full_name: RDoc::NormalModule
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: is_module?
name: NormalModule
superclass: ClassModule
ri/1.8/system/RDoc/cdesc-RDoc.yaml000064400000011647150403647240012447 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: extract_sections
- !ruby/object:RI::MethodSummary 
  name: find_comment
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: no_comment
- !ruby/object:RI::MethodSummary 
  name: usage
- !ruby/object:RI::MethodSummary 
  name: usage_no_exit
comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: CSS2 RDoc HTML template
- !ruby/struct:SM::Flow::P 
  body: This is a template for RDoc that uses XHTML 1.0 Transitional and dictates a bit more of the appearance of the output to cascading stylesheets than the default. It was designed for clean inline code display, and uses DHTMl to toggle the visbility of each method's source with each click on the '[source]' link.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Authors
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Michael Granger &lt;ged@FaerieMUD.org&gt;
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Copyright (c) 2002, 2003 The FaerieMUD Consortium. Some rights reserved.
- !ruby/struct:SM::Flow::P 
  body: This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Ruby's built-in classes.
  name: KNOWN_CLASSES
  value: "{     \"rb_cObject\"           => \"Object\",     \"rb_cArray\"            => \"Array\",     \"rb_cBignum\"           => \"Bignum\",     \"rb_cClass\"            => \"Class\",     \"rb_cDir\"              => \"Dir\",     \"rb_cData\"             => \"Data\",     \"rb_cFalseClass\"       => \"FalseClass\",     \"rb_cFile\"             => \"File\",     \"rb_cFixnum\"           => \"Fixnum\",     \"rb_cFloat\"            => \"Float\",     \"rb_cHash\"             => \"Hash\",     \"rb_cInteger\"          => \"Integer\",     \"rb_cIO\"               => \"IO\",     \"rb_cModule\"           => \"Module\",     \"rb_cNilClass\"         => \"NilClass\",     \"rb_cNumeric\"          => \"Numeric\",     \"rb_cProc\"             => \"Proc\",     \"rb_cRange\"            => \"Range\",     \"rb_cRegexp\"           => \"Regexp\",     \"rb_cString\"           => \"String\",     \"rb_cSymbol\"           => \"Symbol\",     \"rb_cThread\"           => \"Thread\",     \"rb_cTime\"             => \"Time\",     \"rb_cTrueClass\"        => \"TrueClass\",     \"rb_cStruct\"           => \"Struct\",     \"rb_eException\"        => \"Exception\",     \"rb_eStandardError\"    => \"StandardError\",     \"rb_eSystemExit\"       => \"SystemExit\",     \"rb_eInterrupt\"        => \"Interrupt\",     \"rb_eSignal\"           => \"Signal\",     \"rb_eFatal\"            => \"Fatal\",     \"rb_eArgError\"         => \"ArgError\",     \"rb_eEOFError\"         => \"EOFError\",     \"rb_eIndexError\"       => \"IndexError\",     \"rb_eRangeError\"       => \"RangeError\",     \"rb_eIOError\"          => \"IOError\",     \"rb_eRuntimeError\"     => \"RuntimeError\",     \"rb_eSecurityError\"    => \"SecurityError\",     \"rb_eSystemCallError\"  => \"SystemCallError\",     \"rb_eTypeError\"        => \"TypeError\",     \"rb_eZeroDivError\"     => \"ZeroDivError\",     \"rb_eNotImpError\"      => \"NotImpError\",     \"rb_eNoMemError\"       => \"NoMemError\",     \"rb_eFloatDomainError\" => \"FloatDomainError\",     \"rb_eScriptError\"      => \"ScriptError\",     \"rb_eNameError\"        => \"NameError\",     \"rb_eSyntaxError\"      => \"SyntaxError\",     \"rb_eLoadError\"        => \"LoadError\",      \"rb_mKernel\"           => \"Kernel\",     \"rb_mComparable\"       => \"Comparable\",     \"rb_mEnumerable\"       => \"Enumerable\",     \"rb_mPrecision\"        => \"Precision\",     \"rb_mErrno\"            => \"Errno\",     \"rb_mFileTest\"         => \"FileTest\",     \"rb_mGC\"               => \"GC\",     \"rb_mMath\"             => \"Math\",     \"rb_mProcess\"          => \"Process\""
- !ruby/object:RI::Constant 
  comment: 
  name: GENERAL_MODIFIERS
  value: "[ 'nodoc' ].freeze"
- !ruby/object:RI::Constant 
  comment: 
  name: CLASS_MODIFIERS
  value: GENERAL_MODIFIERS
- !ruby/object:RI::Constant 
  comment: 
  name: ATTR_MODIFIERS
  value: GENERAL_MODIFIERS
- !ruby/object:RI::Constant 
  comment: 
  name: CONSTANT_MODIFIERS
  value: GENERAL_MODIFIERS
- !ruby/object:RI::Constant 
  comment: 
  name: METHOD_MODIFIERS
  value: GENERAL_MODIFIERS +      [ 'arg', 'args', 'yield', 'yields', 'notnew', 'not-new', 'not_new', 'doc' ]
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Name of the dotfile that contains the description of files to be processed in the current directory
  name: DOT_DOC_FILENAME
  value: "\".document\""
full_name: RDoc
includes: []

instance_methods: []

name: RDoc
superclass: 
ri/1.8/system/RDoc/Attr/%3c%3d%3e-i.yaml000064400000000251150403647240013031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Attr#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/RDoc/Attr/cdesc-Attr.yaml000064400000001176150403647240013440 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: rw
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: text
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: visibility
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Represent attributes
constants: []

full_name: RDoc::Attr
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Attr
superclass: CodeObject
ri/1.8/system/RDoc/Attr/new-c.yaml000064400000000273150403647240012455 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Attr::new
is_singleton: true
name: new
params: (text, name, rw, comment)
visibility: public
ri/1.8/system/RDoc/Attr/to_s-i.yaml000064400000000246150403647250012637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Attr#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/RDoc/RDocError/cdesc-RDocError.yaml000064400000000477150403647250015322 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Exception thrown by any rdoc error. Only the #message part is of use externally."
constants: []

full_name: RDoc::RDocError
includes: []

instance_methods: []

name: RDocError
superclass: Exception
ri/1.8/system/RDoc/Alias/new-c.yaml000064400000000306150403647250012572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Alias::new
is_singleton: true
name: new
params: (text, old_name, new_name, comment)
visibility: public
ri/1.8/system/RDoc/Alias/to_s-i.yaml000064400000000247150403647260012760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Alias#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/RDoc/Alias/cdesc-Alias.yaml000064400000001241150403647260013671 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: comment
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: new_name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: old_name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: text
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Represent an alias, which is an old_name/ new_name pair associated with a particular context
constants: []

full_name: RDoc::Alias
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Alias
superclass: CodeObject
ri/1.8/system/RDoc/RubyParser/peek_tk-i.yaml000064400000000263150403647260014501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#peek_tk
is_singleton: false
name: peek_tk
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_symbol_in_arg-i.yaml000064400000000313150403647270017072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_symbol_in_arg
is_singleton: false
name: parse_symbol_in_arg
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_statements-i.yaml000064400000000375150403647270016445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_statements
is_singleton: false
name: parse_statements
params: (container, single=NORMAL, current_method=nil, comment='')
visibility: private
ri/1.8/system/RDoc/RubyParser/skip_method-i.yaml000064400000000304150403647300015354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#skip_method
is_singleton: false
name: skip_method
params: (container)
visibility: private
ri/1.8/system/RDoc/RubyParser/read_documentation_modifiers-i.yaml000064400000000353150403647310020760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#read_documentation_modifiers
is_singleton: false
name: read_documentation_modifiers
params: (context, allow)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_attr-i.yaml000064400000000325150403647310015216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_attr
is_singleton: false
name: parse_attr
params: (context, single, tk, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/get_constant_with_optional_parens-i.yaml000064400000000473150403647320022057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get a constant that may be surrounded by parens
full_name: RDoc::RubyParser#get_constant_with_optional_parens
is_singleton: false
name: get_constant_with_optional_parens
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/remove_token_listener-i.yaml000064400000000322150403647320017452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#remove_token_listener
is_singleton: false
name: remove_token_listener
params: (obj)
visibility: private
ri/1.8/system/RDoc/RubyParser/get_constant-i.yaml000064400000000461150403647330015545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse a constant, which might be qualified by one or more class or module names
full_name: RDoc::RubyParser#get_constant
is_singleton: false
name: get_constant
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/progress-i.yaml000064400000000271150403647330014720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#progress
is_singleton: false
name: progress
params: (char)
visibility: private
ri/1.8/system/RDoc/RubyParser/skip_optional_do_after_expression-i.yaml000064400000000462150403647330022053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: while, until, and for have an optional
full_name: RDoc::RubyParser#skip_optional_do_after_expression
is_singleton: false
name: skip_optional_do_after_expression
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_require-i.yaml000064400000000317150403647340015724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_require
is_singleton: false
name: parse_require
params: (context, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/collect_first_comment-i.yaml000064400000000463150403647340017436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Look for the first comment in a file that isn't a shebang line.
full_name: RDoc::RubyParser#collect_first_comment
is_singleton: false
name: collect_first_comment
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/get_tkread-i.yaml000064400000000271150403647350015167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#get_tkread
is_singleton: false
name: get_tkread
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_call_parameters-i.yaml000064400000000321150403647350017402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_call_parameters
is_singleton: false
name: parse_call_parameters
params: (tk)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_include-i.yaml000064400000000317150403647350015674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_include
is_singleton: false
name: parse_include
params: (context, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/remove_private_comments-i.yaml000064400000000332150403647350020010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#remove_private_comments
is_singleton: false
name: remove_private_comments
params: (comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/skip_for_variable-i.yaml000064400000000427150403647350016542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: skip the var [in] part of a 'for' statement
full_name: RDoc::RubyParser#skip_for_variable
is_singleton: false
name: skip_for_variable
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/error-i.yaml000064400000000262150403647360014210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#error
is_singleton: false
name: error
params: (msg)
visibility: private
ri/1.8/system/RDoc/RubyParser/look_for_directives_in-i.yaml000064400000000746150403647360017607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Look for directives in a normal comment block:"
- !ruby/struct:SM::Flow::VERB 
  body: "  #--       - don't display comment from this point forward\n"
- !ruby/struct:SM::Flow::P 
  body: This routine modifies it's parameter
full_name: RDoc::RubyParser#look_for_directives_in
is_singleton: false
name: look_for_directives_in
params: (context, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_method_parameters-i.yaml000064400000000734150403647360017760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Capture the method's parameters. Along the way, look for a comment containing
- !ruby/struct:SM::Flow::VERB 
  body: "   # yields: ....\n"
- !ruby/struct:SM::Flow::P 
  body: and add this as the block_params for the method
full_name: RDoc::RubyParser#parse_method_parameters
is_singleton: false
name: parse_method_parameters
params: (method)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_method_or_yield_parameters-i.yaml000064400000000413150403647370021641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_method_or_yield_parameters
is_singleton: false
name: parse_method_or_yield_parameters
params: (method=nil, modifiers=METHOD_MODIFIERS)
visibility: private
ri/1.8/system/RDoc/RubyParser/scan-i.yaml000064400000000254150403647370014005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#scan
is_singleton: false
name: scan
params: ()
visibility: public
ri/1.8/system/RDoc/RubyParser/get_class_or_module-i.yaml000064400000001004150403647400017056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Look for the name of a class of module (optionally with a leading :"
    body: or
  - !ruby/struct:SM::Flow::LI 
    label: "with :"
    body: separated named) and return the ultimate name and container
  type: :NOTE
full_name: RDoc::RubyParser#get_class_or_module
is_singleton: false
name: get_class_or_module
params: (container)
visibility: private
ri/1.8/system/RDoc/RubyParser/new-c.yaml000064400000000327150403647400013637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser::new
is_singleton: true
name: new
params: (top_level, file_name, content, options, stats)
visibility: public
ri/1.8/system/RDoc/RubyParser/skip_tkspace-i.yaml000064400000000313150403647410015530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#skip_tkspace
is_singleton: false
name: skip_tkspace
params: (skip_nl = true)
visibility: private
ri/1.8/system/RDoc/RubyParser/skip_tkspace_comment-i.yaml000064400000000333150403647420017255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#skip_tkspace_comment
is_singleton: false
name: skip_tkspace_comment
params: (skip_nl = true)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_alias-i.yaml000064400000000327150403647420015341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_alias
is_singleton: false
name: parse_alias
params: (context, single, tk, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/get_class_specification-i.yaml000064400000000474150403647430017726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a superclass, which can be either a constant of an expression
full_name: RDoc::RubyParser#get_class_specification
is_singleton: false
name: get_class_specification
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/peek_read-i.yaml000064400000000267150403647440015002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#peek_read
is_singleton: false
name: peek_read
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/get_bool-i.yaml000064400000000265150403647440014653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#get_bool
is_singleton: false
name: get_bool
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_constant-i.yaml000064400000000337150403647450016105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_constant
is_singleton: false
name: parse_constant
params: (container, single, tk, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/make_message-i.yaml000064400000000300150403647460015472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#make_message
is_singleton: false
name: make_message
params: (msg)
visibility: private
ri/1.8/system/RDoc/RubyParser/add_token_listener-i.yaml000064400000000314150403647500016706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#add_token_listener
is_singleton: false
name: add_token_listener
params: (obj)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_toplevel_statements-i.yaml000064400000000340150403647510020344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_toplevel_statements
is_singleton: false
name: parse_toplevel_statements
params: (container)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_symbol_arg-i.yaml000064400000000315150403647510016403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_symbol_arg
is_singleton: false
name: parse_symbol_arg
params: (no = nil)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_class-i.yaml000064400000000341150403647520015352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_class
is_singleton: false
name: parse_class
params: (container, single, tk, comment, &block)
visibility: private
ri/1.8/system/RDoc/RubyParser/cdesc-RubyParser.yaml000064400000006264150403647520016014 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NORMAL
  value: "\"::\""
- !ruby/object:RI::Constant 
  comment: 
  name: SINGLE
  value: "\"<<\""
full_name: RDoc::RubyParser
includes: 
- !ruby/object:RI::IncludedModule 
  name: RubyToken
- !ruby/object:RI::IncludedModule 
  name: TokenStream
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_token_listener
- !ruby/object:RI::MethodSummary 
  name: collect_first_comment
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: get_bool
- !ruby/object:RI::MethodSummary 
  name: get_class_or_module
- !ruby/object:RI::MethodSummary 
  name: get_class_specification
- !ruby/object:RI::MethodSummary 
  name: get_constant
- !ruby/object:RI::MethodSummary 
  name: get_constant_with_optional_parens
- !ruby/object:RI::MethodSummary 
  name: get_symbol_or_name
- !ruby/object:RI::MethodSummary 
  name: get_tk
- !ruby/object:RI::MethodSummary 
  name: get_tkread
- !ruby/object:RI::MethodSummary 
  name: look_for_directives_in
- !ruby/object:RI::MethodSummary 
  name: make_message
- !ruby/object:RI::MethodSummary 
  name: parse_alias
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_attr_accessor
- !ruby/object:RI::MethodSummary 
  name: parse_call_parameters
- !ruby/object:RI::MethodSummary 
  name: parse_class
- !ruby/object:RI::MethodSummary 
  name: parse_constant
- !ruby/object:RI::MethodSummary 
  name: parse_include
- !ruby/object:RI::MethodSummary 
  name: parse_method
- !ruby/object:RI::MethodSummary 
  name: parse_method_or_yield_parameters
- !ruby/object:RI::MethodSummary 
  name: parse_method_parameters
- !ruby/object:RI::MethodSummary 
  name: parse_module
- !ruby/object:RI::MethodSummary 
  name: parse_require
- !ruby/object:RI::MethodSummary 
  name: parse_statements
- !ruby/object:RI::MethodSummary 
  name: parse_symbol_arg
- !ruby/object:RI::MethodSummary 
  name: parse_symbol_in_arg
- !ruby/object:RI::MethodSummary 
  name: parse_toplevel_statements
- !ruby/object:RI::MethodSummary 
  name: parse_visibility
- !ruby/object:RI::MethodSummary 
  name: parse_yield
- !ruby/object:RI::MethodSummary 
  name: parse_yield_parameters
- !ruby/object:RI::MethodSummary 
  name: peek_read
- !ruby/object:RI::MethodSummary 
  name: peek_tk
- !ruby/object:RI::MethodSummary 
  name: progress
- !ruby/object:RI::MethodSummary 
  name: read_directive
- !ruby/object:RI::MethodSummary 
  name: read_documentation_modifiers
- !ruby/object:RI::MethodSummary 
  name: remove_private_comments
- !ruby/object:RI::MethodSummary 
  name: remove_token_listener
- !ruby/object:RI::MethodSummary 
  name: scan
- !ruby/object:RI::MethodSummary 
  name: skip_for_variable
- !ruby/object:RI::MethodSummary 
  name: skip_method
- !ruby/object:RI::MethodSummary 
  name: skip_optional_do_after_expression
- !ruby/object:RI::MethodSummary 
  name: skip_tkspace
- !ruby/object:RI::MethodSummary 
  name: skip_tkspace_comment
- !ruby/object:RI::MethodSummary 
  name: unget_tk
- !ruby/object:RI::MethodSummary 
  name: warn
name: RubyParser
superclass: Object
ri/1.8/system/RDoc/RubyParser/parse_module-i.yaml000064400000000333150403647530015534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_module
is_singleton: false
name: parse_module
params: (container, single, tk, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_method-i.yaml000064400000000333150403647540015530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_method
is_singleton: false
name: parse_method
params: (container, single, tk, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_yield-i.yaml000064400000000326150403647540015360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_yield
is_singleton: false
name: parse_yield
params: (context, single, tk, method)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_yield_parameters-i.yaml000064400000000321150403647540017576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_yield_parameters
is_singleton: false
name: parse_yield_parameters
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_visibility-i.yaml000064400000000332150403647550016437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_visibility
is_singleton: false
name: parse_visibility
params: (container, single, tk)
visibility: private
ri/1.8/system/RDoc/RubyParser/unget_tk-i.yaml000064400000000267150403647550014705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#unget_tk
is_singleton: false
name: unget_tk
params: (tk)
visibility: private
ri/1.8/system/RDoc/RubyParser/read_directive-i.yaml000064400000001154150403647560016033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Directives are modifier comments that can appear after class, module, or method names. For example
- !ruby/struct:SM::Flow::VERB 
  body: "  def fred    # :yields:  a, b\n"
- !ruby/struct:SM::Flow::P 
  body: or
- !ruby/struct:SM::Flow::VERB 
  body: "  class SM  # :nodoc:\n"
- !ruby/struct:SM::Flow::P 
  body: we return the directive name and any parameters as a two element array
full_name: RDoc::RubyParser#read_directive
is_singleton: false
name: read_directive
params: (allowed)
visibility: private
ri/1.8/system/RDoc/RubyParser/get_tk-i.yaml000064400000000261150403647560014335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#get_tk
is_singleton: false
name: get_tk
params: ()
visibility: private
ri/1.8/system/RDoc/RubyParser/warn-i.yaml000064400000000260150403647560014026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#warn
is_singleton: false
name: warn
params: (msg)
visibility: private
ri/1.8/system/RDoc/RubyParser/parse_attr_accessor-i.yaml000064400000000347150403647570017114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#parse_attr_accessor
is_singleton: false
name: parse_attr_accessor
params: (context, single, tk, comment)
visibility: private
ri/1.8/system/RDoc/RubyParser/get_symbol_or_name-i.yaml000064400000000311150403647570016721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::RubyParser#get_symbol_or_name
is_singleton: false
name: get_symbol_or_name
params: ()
visibility: private
ri/1.8/system/RDoc/Diagram/find_full_name-i.yaml000064400000000307150403647600015264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Diagram#find_full_name
is_singleton: false
name: find_full_name
params: (name, mod)
visibility: private
ri/1.8/system/RDoc/Diagram/convert_to_png-i.yaml000064400000000316150403647610015351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Diagram#convert_to_png
is_singleton: false
name: convert_to_png
params: (file_base, graph)
visibility: private
ri/1.8/system/RDoc/Diagram/draw_module-i.yaml000064400000000340150403647610014622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Diagram#draw_module
is_singleton: false
name: draw_module
params: (mod, graph, toplevel = false, file = nil)
visibility: private
ri/1.8/system/RDoc/Diagram/wrap_in_image_map-i.yaml000064400000000642150403647620015764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extract the client-side image map from dot, and use it to generate the imagemap proper. Return the whole &lt;map&gt;..&lt;img&gt; combination, suitable for inclusion on the page
full_name: RDoc::Diagram#wrap_in_image_map
is_singleton: false
name: wrap_in_image_map
params: (src, dot)
visibility: private
ri/1.8/system/RDoc/Diagram/new-c.yaml000064400000000472150403647630013113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pass in the set of top level objects. The method also creates the subdirectory to hold the images
full_name: RDoc::Diagram::new
is_singleton: true
name: new
params: (info, options)
visibility: public
ri/1.8/system/RDoc/Diagram/add_classes-i.yaml000064400000000325150403647630014572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::Diagram#add_classes
is_singleton: false
name: add_classes
params: (container, graph, file = nil )
visibility: private
ri/1.8/system/RDoc/Diagram/find_names-i.yaml000064400000000274150403647630014433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RDoc::Diagram#find_names
is_singleton: false
name: find_names
params: (mod)
visibility: private
ri/1.8/system/RDoc/Diagram/draw-i.yaml000064400000000562150403647640013266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Draw the diagrams. We traverse the files, drawing a diagram for each. We also traverse each top-level class and module in that file drawing a diagram for these too.
full_name: RDoc::Diagram#draw
is_singleton: false
name: draw
params: ()
visibility: public
ri/1.8/system/RDoc/Diagram/cdesc-Diagram.yaml000064400000002736150403647640014533 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Draw a set of diagrams representing the modules and classes in the system. We draw one diagram for each file, and one for each toplevel class or module. This means there will be overlap. However, it also means that you'll get better context for objects.
- !ruby/struct:SM::Flow::P 
  body: To use, simply
- !ruby/struct:SM::Flow::VERB 
  body: "  d = Diagram.new(info)   # pass in collection of top level infos\n  d.draw\n"
- !ruby/struct:SM::Flow::P 
  body: The results will be written to the <tt>dot</tt> subdirectory. The process also sets the <tt>diagram</tt> attribute in each object it graphs to the name of the file containing the image. This can be used by output generators to insert images.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: FONT
  value: "\"Arial\""
- !ruby/object:RI::Constant 
  comment: 
  name: DOT_PATH
  value: "\"dot\""
full_name: RDoc::Diagram
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_classes
- !ruby/object:RI::MethodSummary 
  name: convert_to_png
- !ruby/object:RI::MethodSummary 
  name: draw
- !ruby/object:RI::MethodSummary 
  name: draw_module
- !ruby/object:RI::MethodSummary 
  name: find_full_name
- !ruby/object:RI::MethodSummary 
  name: find_names
- !ruby/object:RI::MethodSummary 
  name: wrap_in_image_map
name: Diagram
superclass: Object
ri/1.8/system/RDoc/gets-c.yaml000064400000000532150403647650011717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find the first comment in the file (that isn't a shebang line) If the file doesn't start with a comment, report the fact and return empty string
full_name: RDoc::gets
is_singleton: true
name: gets
params: (file)
visibility: private
ri/1.8/system/RDoc/RDoc/list_files_in_directory-i.yaml000064400000000750150403647660016524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a list of the files to be processed in a directory. We know that this directory doesn't have a .document file, so we're looking for real files. However we may well contain subdirectories which must be tested for .document files
full_name: RDoc::RDoc#list_files_in_directory
is_singleton: false
name: list_files_in_directory
params: (dir, options)
visibility: private
ri/1.8/system/RDoc/RDoc/document-i.yaml000064400000001351150403647670013432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Format up one or more files according to the given arguments. For simplicity, <em>argv</em> is an array of strings, equivalent to the strings that would be passed on the command line. (This isn't a coincidence, as we <em>do</em> pass in ARGV when running interactively). For a list of options, see rdoc/rdoc.rb. By default, output will be stored in a directory called <tt>doc</tt> below the current directory, so make sure you're somewhere writable before invoking.
- !ruby/struct:SM::Flow::P 
  body: "Throws: RDocError on error"
full_name: RDoc::RDoc#document
is_singleton: false
name: document
params: (argv)
visibility: public
ri/1.8/system/RDoc/RDoc/cdesc-RDoc.yaml000064400000002610150403647700013265 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Encapsulate the production of rdoc documentation. Basically you can use this as you would invoke rdoc from the command line:"
- !ruby/struct:SM::Flow::VERB 
  body: "   rdoc = RDoc::RDoc.new\n   rdoc.document(args)\n"
- !ruby/struct:SM::Flow::P 
  body: where <em>args</em> is an array of strings, each corresponding to an argument you'd give rdoc on the command line. See rdoc/rdoc.rb for details.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: This is the list of output generators that we support
  name: Generator
  value: Struct.new(:file_name, :class_name, :key)
- !ruby/object:RI::Constant 
  comment: 
  name: GENERATORS
  value: "{}"
full_name: RDoc::RDoc
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: document
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: list_files_in_directory
- !ruby/object:RI::MethodSummary 
  name: normalized_file_list
- !ruby/object:RI::MethodSummary 
  name: output_flag_file
- !ruby/object:RI::MethodSummary 
  name: parse_dot_doc_file
- !ruby/object:RI::MethodSummary 
  name: parse_files
- !ruby/object:RI::MethodSummary 
  name: setup_output_dir
- !ruby/object:RI::MethodSummary 
  name: update_output_dir
name: RDoc
superclass: Object
ri/1.8/system/RDoc/RDoc/parse_dot_doc_file-i.yaml000064400000000644150403647700015416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The .document file contains a list of file and directory name patterns, representing candidates for documentation. It may also contain comments (starting with '#')
full_name: RDoc::RDoc#parse_dot_doc_file
is_singleton: false
name: parse_dot_doc_file
params: (in_dir, filename, options)
visibility: private
ri/1.8/system/RDoc/RDoc/update_output_dir-i.yaml000064400000000436150403647700015351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Update the flag file in an output directory.
full_name: RDoc::RDoc#update_output_dir
is_singleton: false
name: update_output_dir
params: (op_dir, time)
visibility: private
ri/1.8/system/RDoc/RDoc/parse_files-i.yaml000064400000000446150403647700014106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parse each file on the command line, recursively entering directories
full_name: RDoc::RDoc#parse_files
is_singleton: false
name: parse_files
params: (options)
visibility: private
ri/1.8/system/RDoc/RDoc/error-i.yaml000064400000000361150403647700012737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Report an error message and exit
full_name: RDoc::RDoc#error
is_singleton: false
name: error
params: (msg)
visibility: private
ri/1.8/system/RDoc/RDoc/setup_output_dir-i.yaml000064400000000665150403647700015233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create an output dir if it doesn't exist. If it does exist, but doesn't contain the flag file <tt>created.rid</tt> then we refuse to use it, as we may clobber some manually generated documentation
full_name: RDoc::RDoc#setup_output_dir
is_singleton: false
name: setup_output_dir
params: (op_dir, force)
visibility: private
ri/1.8/system/RDoc/RDoc/normalized_file_list-i.yaml000064400000001433150403647700016005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given a list of files and directories, create a list of all the Ruby files they contain.
- !ruby/struct:SM::Flow::P 
  body: If <tt>force_doc</tt> is true, we always add the given files. If false, only add files that we guarantee we can parse It is true when looking at files given on the command line, false when recursing through subdirectories.
- !ruby/struct:SM::Flow::P 
  body: The effect of this is that if you want a file with a non- standard extension parsed, you must name it explicity.
full_name: RDoc::RDoc#normalized_file_list
is_singleton: false
name: normalized_file_list
params: (options, relative_files, force_doc = false, exclude_pattern=nil)
visibility: private
ri/1.8/system/RDoc/RDoc/output_flag_file-i.yaml000064400000000447150403647710015144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the path name of the flag file in an output directory.
full_name: RDoc::RDoc#output_flag_file
is_singleton: false
name: output_flag_file
params: (op_dir)
visibility: private
ri/1.8/system/RDoc/NormalClass/cdesc-NormalClass.yaml000064400000000401150403647710016240 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Normal classes
constants: []

full_name: RDoc::NormalClass
includes: []

instance_methods: []

name: NormalClass
superclass: ClassModule
ri/1.8/system/RDoc/AnyMethod/%3c%3d%3e-i.yaml000064400000000256150403647710014016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::AnyMethod#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/RDoc/AnyMethod/cdesc-AnyMethod.yaml000064400000002173150403647710015374 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: aliases
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: block_params
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: call_seq
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: dont_rename_initialize
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: is_alias_for
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: singleton
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: visibility
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: AnyMethod is the base class for objects representing methods
constants: []

full_name: RDoc::AnyMethod
includes: 
- !ruby/object:RI::IncludedModule 
  name: TokenStream
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: add_alias
- !ruby/object:RI::MethodSummary 
  name: param_seq
- !ruby/object:RI::MethodSummary 
  name: to_s
name: AnyMethod
superclass: CodeObject
ri/1.8/system/RDoc/AnyMethod/param_seq-i.yaml000064400000000265150403647710014623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::AnyMethod#param_seq
is_singleton: false
name: param_seq
params: ()
visibility: public
ri/1.8/system/RDoc/AnyMethod/add_alias-i.yaml000064400000000273150403647710014553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::AnyMethod#add_alias
is_singleton: false
name: add_alias
params: (method)
visibility: public
ri/1.8/system/RDoc/AnyMethod/new-c.yaml000064400000000263150403647720013435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RDoc::AnyMethod::new
is_singleton: true
name: new
params: (text, name)
visibility: public
ri/1.8/system/RDoc/AnyMethod/to_s-i.yaml000064400000000253150403647720013615 0ustar00ri/1.8/system/RDoc/ClassModule/full_name-i.yaml000064400000000423150403647720015135 0ustar00ri/1.8/system/RDoc/ClassModule/http_url-i.yaml000064400000000273150403647720015037 0ustar00ri/1.8/system/RDoc/ClassModule/is_module%3f-i.yaml000064400000000425150403647720015453 0ustar00ri/1.8/system/RDoc/ClassModule/cdesc-ClassModule.yaml000064400000001364150403647730016245 0ustar00ri/1.8/system/RDoc/ClassModule/new-c.yaml000064400000000301150403647730013752 0ustar00ri/1.8/system/RDoc/ClassModule/to_s-i.yaml000064400000000356150403647730014145 0ustar00ri/1.8/system/RDoc/ClassModule/find_class_named-i.yaml000064400000000311150403647730016441 0ustar00ri/1.8/system/RDoc/find_comment-c.yaml000064400000000265150403647740013422 0ustar00ri/1.8/system/RDoc/ParserFactory/parser_for-c.yaml000064400000000557150403647750015713 0ustar00ri/1.8/system/RDoc/ParserFactory/parse_files_matching-i.yaml000064400000000513150403647750017715 0ustar00ri/1.8/system/RDoc/ParserFactory/can_parse-c.yaml000064400000000435150403647760015500 0ustar00ri/1.8/system/RDoc/ParserFactory/alias_extension-c.yaml000064400000000620150403647770016727 0ustar00ri/1.8/system/RDoc/ParserFactory/cdesc-ParserFactory.yaml000064400000003452150403650000017147 0ustar00ri/1.8/system/RDoc/SingleClass/cdesc-SingleClass.yaml000064400000000404150403650010016210 0ustar00ri/1.8/system/RDoc/Stats/print-i.yaml000064400000000251150403650020013174 0ustar00ri/1.8/system/RDoc/Stats/cdesc-Stats.yaml000064400000001147150403650030013775 0ustar00ri/1.8/system/RDoc/Stats/new-c.yaml000064400000000245150403650040012630 0ustar00ri/1.8/system/RDoc/Page/cdesc-Page.yaml000064400000177202150403650050013341 0ustar00ri/1.8/system/RDoc/Page/write_extra_pages-i.yaml000064400000000300150403650060015331 0ustar00ri/1.8/system/RDoc/Include/new-c.yaml000064400000000264150403650070013121 0ustar00ri/1.8/system/RDoc/Include/cdesc-Include.yaml000064400000000544150403650070014553 0ustar00ri/1.8/system/RDoc/CodeObject/document_self%3d-i.yaml000064400000000303150403650070016071 0ustar00ri/1.8/system/RDoc/CodeObject/start_doc-i.yaml000064400000000476150403650100014735 0ustar00ri/1.8/system/RDoc/CodeObject/document_children%3d-i.yaml000064400000000313150403650100016723 0ustar00ri/1.8/system/RDoc/CodeObject/cdesc-CodeObject.yaml000064400000004146150403650100015603 0ustar00ri/1.8/system/RDoc/CodeObject/attr_overridable-c.yaml000064400000001055150403650100016267 0ustar00ri/1.8/system/RDoc/CodeObject/new-c.yaml000064400000000252150403650100013526 0ustar00ri/1.8/system/RDoc/CodeObject/comment%3d-i.yaml000064400000000450150403650100014701 0ustar00ri/1.8/system/RDoc/CodeObject/remove_classes_and_modules-i.yaml000064400000000511150403650100020325 0ustar00ri/1.8/system/RDoc/CodeObject/remove_methods_etc-i.yaml000064400000000310150403650100016611 0ustar00ri/1.8/system/RDoc/CodeObject/stop_doc-i.yaml000064400000000264150403650110014561 0ustar00ri/1.8/system/RDoc/AnonClass/cdesc-AnonClass.yaml000064400000000400150403650110015331 0ustar00ri/1.8/system/RDoc/TopLevel/full_name-i.yaml000064400000000264150403650110014442 0ustar00ri/1.8/system/RDoc/TopLevel/find_module_named-i.yaml000064400000000400150403650110016121 0ustar00ri/1.8/system/RDoc/TopLevel/add_class_or_module-i.yaml000064400000001045150403650110016460 0ustar00ri/1.8/system/RDoc/TopLevel/new-c.yaml000064400000000261150403650110013260 0ustar00ri/1.8/system/RDoc/TopLevel/reset-c.yaml000064400000000254150403650110013613 0ustar00ri/1.8/system/RDoc/TopLevel/find_class_or_module_named-i.yaml000064400000000334150403650110020014 0ustar00ri/1.8/system/RDoc/TopLevel/all_classes_and_modules-c.yaml000064400000000320150403650110017322 0ustar00ri/1.8/system/RDoc/TopLevel/cdesc-TopLevel.yaml000064400000002061150403650120015061 0ustar00ri/1.8/system/RDoc/TopLevel/find_local_symbol-i.yaml000064400000000312150403650120016152 0ustar00ri/1.8/system/RDoc/TopLevel/find_class_named-c.yaml000064400000000306150403650120015741 0ustar00ri/1.8/system/RDoc/SimpleParser/cdesc-SimpleParser.yaml000064400000000644150403650120016616 0ustar00ri/1.8/system/RDoc/SimpleParser/remove_private_comments-i.yaml000064400000000333150403650120020306 0ustar00ri/1.8/system/RDoc/SimpleParser/scan-i.yaml000064400000000431150403650120014275 0ustar00ri/1.8/system/RDoc/SimpleParser/new-c.yaml000064400000000430150403650120014133 0ustar00ri/1.8/system/RDoc/Token/cdesc-Token.yaml000064400000001047150403650130013741 0ustar00ri/1.8/system/RDoc/Token/new-c.yaml000064400000000265150403650130012614 0ustar00ri/1.8/system/RDoc/Token/set_text-i.yaml000064400000000506150403650130013666 0ustar00ri/1.8/system/AmbiguousOption/cdesc-AmbiguousOption.yaml000064400000000456150403650140017226 0ustar00ri/1.8/system/ThreadGroup/enclosed%3f-i.yaml000064400000000515150403650150014440 0ustar00ri/1.8/system/ThreadGroup/cdesc-ThreadGroup.yaml000064400000001537150403650150015430 0ustar00ri/1.8/system/ThreadGroup/add-i.yaml000064400000002067150403650150013102 0ustar00ri/1.8/system/ThreadGroup/enclose-i.yaml000064400000001516150403650150014000 0ustar00ri/1.8/system/ThreadGroup/list-i.yaml000064400000000651150403650160013323 0ustar00ri/1.8/system/NilClass/to_i-i.yaml000064400000000457150403650170012573 0ustar00ri/1.8/system/NilClass/to_a-i.yaml000064400000000476150403650170012564 0ustar00ri/1.8/system/NilClass/%7c-i.yaml000064400000000562150403650170012214 0ustar00ri/1.8/system/NilClass/%26-i.yaml000064400000000621150403650200012120 0ustar00ri/1.8/system/NilClass/to_yaml-i.yaml000064400000000265150403650210013275 0ustar00ri/1.8/system/NilClass/cdesc-NilClass.yaml000064400000001345150403650210014172 0ustar00ri/1.8/system/NilClass/inspect-i.yaml000064400000000421150403650220013271 0ustar00ri/1.8/system/NilClass/to_s-i.yaml000064400000000512150403650220012571 0ustar00ri/1.8/system/NilClass/%5e-i.yaml000064400000000602150403650230012204 0ustar00ri/1.8/system/NilClass/to_f-i.yaml000064400000000466150403650230012565 0ustar00ri/1.8/system/NilClass/nil%3f-i.yaml000064400000000615150403650240012713 0ustar00ri/1.8/system/NoMemoryError/cdesc-NoMemoryError.yaml000064400000001200150403650240016301 0ustar00ri/1.8/system/Data/cdesc-Data.yaml000064400000000344150403650250012476 0ustar00ri/1.8/system/Test/Unit/AssertionFailedError/cdesc-AssertionFailedError.yaml000064400000000506150403650270022770 0ustar00ri/1.8/system/Test/Unit/TestResult/failure_count-i.yaml000064400000000445150403650270016742 0ustar00ri/1.8/system/Test/Unit/TestResult/passed%3f-i.yaml000064400000000445150403650270015660 0ustar00ri/1.8/system/Test/Unit/TestResult/add_run-i.yaml000064400000000360150403650270015513 0ustar00ri/1.8/system/Test/Unit/TestResult/new-c.yaml000064400000000370150403650270014663 0ustar00ri/1.8/system/Test/Unit/TestResult/add_failure-i.yaml000064400000000412150403650300016326 0ustar00ri/1.8/system/Test/Unit/TestResult/cdesc-TestResult.yaml000064400000002317150403650300017044 0ustar00ri/1.8/system/Test/Unit/TestResult/add_assertion-i.yaml000064400000000411150403650300016705 0ustar00ri/1.8/system/Test/Unit/TestResult/to_s-i.yaml000064400000000466150403650310015045 0ustar00ri/1.8/system/Test/Unit/TestResult/error_count-i.yaml000064400000000437150403650310016440 0ustar00ri/1.8/system/Test/Unit/TestResult/add_error-i.yaml000064400000000402150403650320016031 0ustar00ri/1.8/system/Test/Unit/Error/cdesc-Error.yaml000064400000001671150403650340015000 0ustar00ri/1.8/system/Test/Unit/Error/long_display-i.yaml000064400000000425150403650350015537 0ustar00ri/1.8/system/Test/Unit/Error/short_display-i.yaml000064400000000425150403650360015740 0ustar00ri/1.8/system/Test/Unit/Error/new-c.yaml000064400000000437150403650370013643 0ustar00ri/1.8/system/Test/Unit/Error/single_character_display-i.yaml000064400000000460150403650400020070 0ustar00ri/1.8/system/Test/Unit/Error/message-i.yaml000064400000000406150403650400014472 0ustar00ri/1.8/system/Test/Unit/Error/to_s-i.yaml000064400000000364150403650410014016 0ustar00ri/1.8/system/Test/Unit/TestCase/size-i.yaml000064400000000260150403650420014442 0ustar00ri/1.8/system/Test/Unit/TestCase/teardown-i.yaml000064400000000457150403650420015323 0ustar00ri/1.8/system/Test/Unit/TestCase/passed%3f-i.yaml000064400000000545150403650420015253 0ustar00ri/1.8/system/Test/Unit/TestCase/new-c.yaml000064400000000476150403650430014265 0ustar00ri/1.8/system/Test/Unit/TestCase/suite-c.yaml000064400000000517150403650430014621 0ustar00ri/1.8/system/Test/Unit/TestCase/default_test-i.yaml000064400000000300150403650430016147 0ustar00ri/1.8/system/Test/Unit/TestCase/add_failure-i.yaml000064400000000336150403650430015734 0ustar00ri/1.8/system/Test/Unit/TestCase/add_assertion-i.yaml000064400000000303150403650430016306 0ustar00ri/1.8/system/Test/Unit/TestCase/cdesc-TestCase.yaml000064400000003427150403650440016046 0ustar00ri/1.8/system/Test/Unit/TestCase/to_s-i.yaml000064400000000362150403650440014441 0ustar00ri/1.8/system/Test/Unit/TestCase/%3d%3d-i.yaml000064400000000412150403650440014340 0ustar00ri/1.8/system/Test/Unit/TestCase/setup-i.yaml000064400000000447150403650450014642 0ustar00ri/1.8/system/Test/Unit/TestCase/run-i.yaml000064400000000600150403650450014275 0ustar00ri/1.8/system/Test/Unit/TestCase/name-i.yaml000064400000000463150403650450014420 0ustar00ri/1.8/system/Test/Unit/TestCase/add_error-i.yaml000064400000000304150403650450015433 0ustar00ri/1.8/system/Test/Unit/TestSuite/size-i.yaml000064400000000566150403650460014675 0ustar00ri/1.8/system/Test/Unit/TestSuite/empty%3f-i.yaml000064400000000265150403650460015353 0ustar00ri/1.8/system/Test/Unit/TestSuite/delete-i.yaml000064400000000271150403650460015156 0ustar00ri/1.8/system/Test/Unit/TestSuite/new-c.yaml000064400000000430150403650460014474 0ustar00ri/1.8/system/Test/Unit/TestSuite/%3c%3c-i.yaml000064400000000363150403650460014563 0ustar00ri/1.8/system/Test/Unit/TestSuite/to_s-i.yaml000064400000000420150403650460014654 0ustar00ri/1.8/system/Test/Unit/TestSuite/%3d%3d-i.yaml000064400000000414150403650460014562 0ustar00ri/1.8/system/Test/Unit/TestSuite/run-i.yaml000064400000000511150403650460014515 0ustar00ri/1.8/system/Test/Unit/TestSuite/cdesc-TestSuite.yaml000064400000002342150403650460016477 0ustar00ri/1.8/system/Test/Unit/AutoRunner/run-c.yaml000064400000000352150403650470014664 0ustar00ri/1.8/system/Test/Unit/AutoRunner/cdesc-AutoRunner.yaml000064400000000705150403650470017023 0ustar00ri/1.8/system/Test/Unit/AutoRunner/standalone%3f-c.yaml000064400000000300150403650470016477 0ustar00ri/1.8/system/Test/Unit/Util/ProcWrapper/eql%3f-i.yaml000064400000000362150403650500016217 0ustar00ri/1.8/system/Test/Unit/Util/ProcWrapper/to_proc-i.yaml000064400000000277150403650500016612 0ustar00ri/1.8/system/Test/Unit/Util/ProcWrapper/hash-i.yaml000064400000000271150403650500016062 0ustar00ri/1.8/system/Test/Unit/Util/ProcWrapper/new-c.yaml000064400000000403150403650500015717 0ustar00ri/1.8/system/Test/Unit/Util/ProcWrapper/%3d%3d-i.yaml000064400000000342150403650500016005 0ustar00ri/1.8/system/Test/Unit/Util/ProcWrapper/cdesc-ProcWrapper.yaml000064400000001442150403650500020235 0ustar00ri/1.8/system/Test/Unit/Util/cdesc-Util.yaml000064400000000273150403650510014444 0ustar00ri/1.8/system/Test/Unit/Util/BacktraceFilter/filter_backtrace-i.yaml000064400000000352150403650510021205 0ustar00ri/1.8/system/Test/Unit/Util/BacktraceFilter/cdesc-BacktraceFilter.yaml000064400000001074150403650510021601 0ustar00ri/1.8/system/Test/Unit/Util/Observable/add_listener-i.yaml000064400000001372150403650510017420 0ustar00ri/1.8/system/Test/Unit/Util/Observable/remove_listener-i.yaml000064400000000636150403650520020170 0ustar00ri/1.8/system/Test/Unit/Util/Observable/channels-i.yaml000064400000000301150403650520016546 0ustar00ri/1.8/system/Test/Unit/Util/Observable/cdesc-Observable.yaml000064400000001365150403650520017703 0ustar00ri/1.8/system/Test/Unit/Util/Observable/notify_listeners-i.yaml000064400000000667150403650520020372 0ustar00ri/1.8/system/Test/Unit/run%3f-c.yaml000064400000000342150403650520013053 0ustar00ri/1.8/system/Test/Unit/Failure/long_display-i.yaml000064400000000427150403650520016036 0ustar00ri/1.8/system/Test/Unit/Failure/short_display-i.yaml000064400000000427150403650520016236 0ustar00ri/1.8/system/Test/Unit/Failure/new-c.yaml000064400000000450150403650520014131 0ustar00ri/1.8/system/Test/Unit/Failure/single_character_display-i.yaml000064400000000463150403650520020374 0ustar00ri/1.8/system/Test/Unit/Failure/to_s-i.yaml000064400000000366150403650520014320 0ustar00ri/1.8/system/Test/Unit/Failure/cdesc-Failure.yaml000064400000001536150403650530015575 0ustar00ri/1.8/system/Test/Unit/cdesc-Unit.yaml000064400000030710150403650530013532 0ustar00ri/1.8/system/Test/Unit/Collector/filter%3d-i.yaml000064400000000276150403650530015475 0ustar00ri/1.8/system/Test/Unit/Collector/cdesc-Collector.yaml000064400000000665150403650530016475 0ustar00ri/1.8/system/Test/Unit/Collector/include%3f-i.yaml000064400000000275150403650530015634 0ustar00ri/1.8/system/Test/Unit/Collector/new-c.yaml000064400000000257150403650530014476 0ustar00ri/1.8/system/Test/Unit/Collector/Dir/cdesc-Dir.yaml000064400000001366150403650530016002 0ustar00ri/1.8/system/Test/Unit/Collector/Dir/collect-i.yaml000064400000000301150403650530016044 0ustar00ri/1.8/system/Test/Unit/Collector/Dir/new-c.yaml000064400000000357150403650540015216 0ustar00ri/1.8/system/Test/Unit/Collector/Dir/find_test_cases-i.yaml000064400000000325150403650540017563 0ustar00ri/1.8/system/Test/Unit/Collector/Dir/recursive_collect-i.yaml000064400000000346150403650540020145 0ustar00ri/1.8/system/Test/Unit/Collector/Dir/realdir-i.yaml000064400000000300150403650550016042 0ustar00ri/1.8/system/Test/Unit/Collector/Dir/collect_file-i.yaml000064400000000344150403650550017054 0ustar00ri/1.8/system/Test/Unit/Collector/sort-i.yaml000064400000000267150403650550014705 0ustar00ri/1.8/system/Test/Unit/Collector/add_suite-i.yaml000064400000000315150403650550015651 0ustar00ri/1.8/system/Test/Unit/Collector/ObjectSpace/cdesc-ObjectSpace.yaml000064400000000705150403650550021110 0ustar00ri/1.8/system/Test/Unit/Collector/ObjectSpace/collect-i.yaml000064400000000315150403650560017520 0ustar00ri/1.8/system/Test/Unit/Collector/ObjectSpace/new-c.yaml000064400000000320150403650560016652 0ustar00ri/1.8/system/Test/Unit/run%3d-c.yaml000064400000000456150403650560013063 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/clear_fault-i.yaml000064400000000311150403650600017237 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/create_count_label-i.yaml000064400000000344150403650600020576 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/stop-i.yaml000064400000000273150403650600015752 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/test_started-i.yaml000064400000000324150403650600017467 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/attach_to_mediator-i.yaml000064400000000327150403650600020617 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/started-i.yaml000064400000000307150403650610016432 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/show_fault-i.yaml000064400000000314150403650610017135 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/setup_ui-i.yaml000064400000000303150403650610016615 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/new-c.yaml000064400000000457150403650620015556 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/start-i.yaml000064400000000365150403650620016126 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/add_fault-i.yaml000064400000000312150403650630016705 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/output_status-i.yaml000064400000000323150403650630017727 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/cdesc-TestRunner.yaml000064400000002536150403650630017736 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/finished-i.yaml000064400000000317150403650630016560 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/run_test-i.yaml000064400000000303150403650630016625 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/raw_show_fault-i.yaml000064400000000325150403650630020012 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/result_changed-i.yaml000064400000000325150403650630017755 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/reset_ui-i.yaml000064400000000310150403650630016577 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/start_ui-i.yaml000064400000000303150403650640016615 0ustar00ri/1.8/system/Test/Unit/UI/Tk/TestRunner/setup_mediator-i.yaml000064400000000317150403650640020014 0ustar00ri/1.8/system/Test/Unit/UI/Tk/cdesc-Tk.yaml000064400000000273150403650650014070 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/green_style-i.yaml000064400000000313150403650660017437 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/clear_fault-i.yaml000064400000000313150403650660017400 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/run_button-i.yaml000064400000000310150403650660017313 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/stop-i.yaml000064400000000275150403650670016114 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/status_panel-i.yaml000064400000000315150403650670017624 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/test_started-i.yaml000064400000000326150403650670017631 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/attach_to_mediator-i.yaml000064400000000331150403650700020744 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/fault_list-i.yaml000064400000000311150403650700017256 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/started-i.yaml000064400000000311150403650700016556 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/lazy_initialize-i.yaml000064400000000344150403650710020317 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/list_panel-i.yaml000064400000000311150403650710017243 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/progress_panel-i.yaml000064400000000320150403650710020134 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/fault_detail_label-i.yaml000064400000000331150403650710020707 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/status_entry-i.yaml000064400000000315150403650720017662 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/show_fault-i.yaml000064400000000316150403650720017272 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/run_count_label-i.yaml000064400000000323150403650720020270 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/list_scrolled_window-i.yaml000064400000000335150403650720021351 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/setup_ui-i.yaml000064400000000305150403650730016753 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/failure_count_label-i.yaml000064400000000333150403650730021115 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/assertion_count_label-i.yaml000064400000000337150403650740021502 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/new-c.yaml000064400000000326150403650740015705 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/detail_scrolled_window-i.yaml000064400000000341150403650750021640 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/start-i.yaml000064400000000276150403650750016264 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/test_progress_bar-i.yaml000064400000000327150403650760020654 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/add_fault-i.yaml000064400000000314150403650760017044 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/red_style-i.yaml000064400000000307150403650760017115 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/error_count_label-i.yaml000064400000000327150403650760020625 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/output_status-i.yaml000064400000000325150403650760020066 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/cdesc-TestRunner.yaml000064400000005136150403650760020072 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/test_finished-i.yaml000064400000000324150403650770017753 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/finished-i.yaml000064400000000321150403650770016711 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/main_panel-i.yaml000064400000000311150403651000017205 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/run_test-i.yaml000064400000000305150403651000016750 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/main_window-i.yaml000064400000000313150403651000017417 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/raw_show_fault-i.yaml000064400000000327150403651000020135 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/result_changed-i.yaml000064400000000327150403651000020100 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/detail_panel-i.yaml000064400000000315150403651000017527 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/suite_panel-i.yaml000064400000000313150403651000017414 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/suite_name_entry-i.yaml000064400000000325150403651010020462 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/reset_ui-i.yaml000064400000000312150403651010016723 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/start_ui-i.yaml000064400000000305150403651010016740 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/info_panel-i.yaml000064400000000311150403651010017215 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/outer_detail_sub_panel-i.yaml000064400000000341150403651010021616 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/setup_mediator-i.yaml000064400000000321150403651010020130 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/TestRunner/inner_detail_sub_panel-i.yaml000064400000000341150403651010021573 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/EnhancedLabel/cdesc-EnhancedLabel.yaml000064400000000421150403651010020737 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/EnhancedLabel/set_text-i.yaml000064400000000313150403651010017300 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/FaultList/get_fault-i.yaml000064400000000311150403651020016654 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/FaultList/new-c.yaml000064400000000271150403651020015472 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/FaultList/cdesc-FaultList.yaml000064400000000634150403651030017453 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/FaultList/add_fault-i.yaml000064400000000312150403651030016627 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/FaultList/clear-i.yaml000064400000000275150403651030016002 0ustar00ri/1.8/system/Test/Unit/UI/GTK2/cdesc-GTK2.yaml000064400000000277150403651030014347 0ustar00ri/1.8/system/Test/Unit/UI/cdesc-UI.yaml000064400000000720150403651040013440 0ustar00ri/1.8/system/Test/Unit/UI/GTK/FaultListItem/cdesc-FaultListItem.yaml000064400000000513150403651050021025 0ustar00ri/1.8/system/Test/Unit/UI/GTK/FaultListItem/new-c.yaml000064400000000301150403651050016224 0ustar00ri/1.8/system/Test/Unit/UI/GTK/cdesc-GTK.yaml000064400000000275150403651050014203 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/green_style-i.yaml000064400000000312150403651060017347 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/clear_fault-i.yaml000064400000000312150403651060017310 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/run_button-i.yaml000064400000000310150403651060017224 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/stop-i.yaml000064400000000275150403651060016024 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/status_panel-i.yaml000064400000000314150403651070017534 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/test_started-i.yaml000064400000000325150403651070017541 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/attach_to_mediator-i.yaml000064400000000330150403651070020662 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/fault_list-i.yaml000064400000000310150403651070017174 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/started-i.yaml000064400000000310150403651070016474 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/lazy_initialize-i.yaml000064400000000343150403651070020234 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/list_panel-i.yaml000064400000000310150403651070017160 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/progress_panel-i.yaml000064400000000320150403651070020052 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/fault_detail_label-i.yaml000064400000000330150403651070020624 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/status_entry-i.yaml000064400000000314150403651100017570 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/show_fault-i.yaml000064400000000315150403651100017200 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/run_count_label-i.yaml000064400000000322150403651100020176 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/list_scrolled_window-i.yaml000064400000000334150403651110021260 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/setup_ui-i.yaml000064400000000304150403651110016661 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/failure_count_label-i.yaml000064400000000332150403651120021024 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/assertion_count_label-i.yaml000064400000000336150403651120021410 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/new-c.yaml000064400000000460150403651120015613 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/detail_scrolled_window-i.yaml000064400000000340150403651130021546 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/start-i.yaml000064400000000366150403651130016173 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/test_progress_bar-i.yaml000064400000000326150403651130020561 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/add_fault-i.yaml000064400000000313150403651140016752 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/red_style-i.yaml000064400000000306150403651140017023 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/error_count_label-i.yaml000064400000000326150403651150020534 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/output_status-i.yaml000064400000000324150403651150017775 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/cdesc-TestRunner.yaml000064400000005471150403651150020004 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/test_finished-i.yaml000064400000000327150403651150017665 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/finished-i.yaml000064400000000320150403651160016620 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/main_panel-i.yaml000064400000000310150403651160017131 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/run_test-i.yaml000064400000000305150403651170016676 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/main_window-i.yaml000064400000000312150403651170017344 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/raw_show_fault-i.yaml000064400000000326150403651170020062 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/result_changed-i.yaml000064400000000326150403651200020017 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/detail_panel-i.yaml000064400000000314150403651200017446 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/suite_panel-i.yaml000064400000000312150403651200017333 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/suite_name_entry-i.yaml000064400000000324150403651200020400 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/reset_ui-i.yaml000064400000000311150403651200016641 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/start_ui-i.yaml000064400000000304150403651200016656 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/info_panel-i.yaml000064400000000310150403651200017133 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/outer_detail_sub_panel-i.yaml000064400000000340150403651210021535 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/setup_mediator-i.yaml000064400000000320150403651210020047 0ustar00ri/1.8/system/Test/Unit/UI/GTK/TestRunner/inner_detail_sub_panel-i.yaml000064400000000340150403651220021513 0ustar00ri/1.8/system/Test/Unit/UI/GTK/EnhancedLabel/cdesc-EnhancedLabel.yaml000064400000000420150403651230020660 0ustar00ri/1.8/system/Test/Unit/UI/GTK/EnhancedLabel/set_text-i.yaml000064400000000312150403651230017221 0ustar00ri/1.8/system/Test/Unit/UI/GTK/EnhancedProgressBar/set_style-i.yaml000064400000000323150403651240020612 0ustar00ri/1.8/system/Test/Unit/UI/GTK/EnhancedProgressBar/cdesc-EnhancedProgressBar.yaml000064400000000443150403651250023313 0ustar00ri/1.8/system/Test/Unit/UI/Fox/FaultListItem/cdesc-FaultListItem.yaml000064400000000510150403651260021134 0ustar00ri/1.8/system/Test/Unit/UI/Fox/FaultListItem/new-c.yaml000064400000000301150403651260016336 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_info_panel-i.yaml000064400000000333150403651270020601 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/clear_fault-i.yaml000064400000000311150403651300017413 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_label-i.yaml000064400000000327150403651300017543 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_detail_panel-i.yaml000064400000000337150403651300021106 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/stop-i.yaml000064400000000273150403651300016126 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/test_started-i.yaml000064400000000324150403651300017643 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/attach_to_mediator-i.yaml000064400000000327150403651300020773 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/started-i.yaml000064400000000307150403651300016605 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_application-i.yaml000064400000000327150403651310020770 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/show_fault-i.yaml000064400000000314150403651310017311 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_progress_bar-i.yaml000064400000000337150403651310021156 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/setup_ui-i.yaml000064400000000303150403651320016772 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/new-c.yaml000064400000000460150403651320015724 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_list_panel-i.yaml000064400000000333150403651320020615 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/start-i.yaml000064400000000366150403651320016303 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/add_fault-i.yaml000064400000000312150403651320017060 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/output_status-i.yaml000064400000000323150403651320020102 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_suite_panel-i.yaml000064400000000335150403651320020775 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_tooltip-i.yaml000064400000000322150403651320020153 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_window-i.yaml000064400000000320150403651320017766 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/cdesc-TestRunner.yaml000064400000004437150403651320020113 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_text-i.yaml000064400000000317150403651320017451 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/finished-i.yaml000064400000000317150403651330016734 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_button-i.yaml000064400000000341150403651330017776 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_entry-i.yaml000064400000000321150403651330017622 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_fault_list-i.yaml000064400000000333150403651330020632 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/create_main_panel-i.yaml000064400000000333150403651330020567 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/raw_show_fault-i.yaml000064400000000325150403651330020166 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/result_changed-i.yaml000064400000000325150403651330020131 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/reset_ui-i.yaml000064400000000310150403651340016754 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/start_ui-i.yaml000064400000000303150403651340016771 0ustar00ri/1.8/system/Test/Unit/UI/Fox/TestRunner/setup_mediator-i.yaml000064400000000317150403651340020170 0ustar00ri/1.8/system/Test/Unit/UI/Fox/cdesc-Fox.yaml000064400000000275150403651340014423 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/create_mediator-i.yaml000064400000000333150403651340021137 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/output-i.yaml000064400000000333150403651350017351 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/test_started-i.yaml000064400000000324150403651350020516 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/attach_to_mediator-i.yaml000064400000000334150403651350021644 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/output_single-i.yaml000064400000000351150403651350020712 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/started-i.yaml000064400000000314150403651350017456 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/new-c.yaml000064400000000770150403651360016602 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/output%3f-i.yaml000064400000000313150403651360017646 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/start-i.yaml000064400000000372150403651360017152 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/add_fault-i.yaml000064400000000317150403651370017740 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/cdesc-TestRunner.yaml000064400000002074150403651370020761 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/test_finished-i.yaml000064400000000326150403651370020645 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/finished-i.yaml000064400000000324150403651370017604 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/nl-i.yaml000064400000000310150403651400016411 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/start_mediator-i.yaml000064400000000324150403651400021026 0ustar00ri/1.8/system/Test/Unit/UI/Console/TestRunner/setup_mediator-i.yaml000064400000000324150403651400021031 0ustar00ri/1.8/system/Test/Unit/UI/Console/cdesc-Console.yaml000064400000000305150403651400016126 0ustar00ri/1.8/system/Test/Unit/UI/TestRunnerMediator/cdesc-TestRunnerMediator.yaml000064400000001454150403651410022525 0ustar00ri/1.8/system/Test/Unit/UI/TestRunnerMediator/run_suite-i.yaml000064400000000444150403651410020111 0ustar00ri/1.8/system/Test/Unit/UI/TestRunnerMediator/new-c.yaml000064400000000453150403651420016660 0ustar00ri/1.8/system/Test/Unit/UI/TestRunnerMediator/create_result-i.yaml000064400000000601150403651420020731 0ustar00ri/1.8/system/Test/Unit/UI/TestRunnerUtilities/start_command_line_test-i.yaml000064400000000604150403651430023204 0ustar00ri/1.8/system/Test/Unit/UI/TestRunnerUtilities/cdesc-TestRunnerUtilities.yaml000064400000000657150403651440023152 0ustar00ri/1.8/system/Test/Unit/UI/TestRunnerUtilities/run-i.yaml000064400000000450150403651440017107 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_equal-i.yaml000064400000001173150403651450016607 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_not_nil-i.yaml000064400000000644150403651450017144 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_not_same-i.yaml000064400000000701150403651450017301 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_throws-i.yaml000064400000000711150403651460017024 0ustar00ri/1.8/system/Test/Unit/Assertions/flunk-i.yaml000064400000000567150403651460015245 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_nothing_thrown-i.yaml000064400000000674150403651470020556 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_block-i.yaml000064400000001020150403651470016563 0ustar00ri/1.8/system/Test/Unit/Assertions/build_message-i.yaml000064400000000633150403651470016724 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_send-i.yaml000064400000001403150403651500016421 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_operator-i.yaml000064400000001052150403651510017324 0ustar00ri/1.8/system/Test/Unit/Assertions/use_pp%3d-c.yaml000064400000000555150403651510015700 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_nothing_raised-i.yaml000064400000000702150403651520020470 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_not_equal-i.yaml000064400000000667150403651520017474 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_nil-i.yaml000064400000000612150403651530016256 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_match-i.yaml000064400000000663150403651530016576 0ustar00ri/1.8/system/Test/Unit/Assertions/add_assertion-i.yaml000064400000000546150403651540016741 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_raises-i.yaml000064400000000537150403651540016771 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_respond_to-i.yaml000064400000000701150403651550017651 0ustar00ri/1.8/system/Test/Unit/Assertions/assert-i.yaml000064400000000627150403651560015425 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_in_delta-i.yaml000064400000001017150403651560017256 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_same-i.yaml000064400000000726150403651570016433 0ustar00ri/1.8/system/Test/Unit/Assertions/cdesc-Assertions.yaml000064400000005525150403651570017112 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_instance_of-i.yaml000064400000000677150403651600017775 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_raise-i.yaml000064400000000716150403651600016602 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_no_match-i.yaml000064400000000665150403651610017273 0ustar00ri/1.8/system/Test/Unit/Assertions/_wrap_assertion-i.yaml000064400000000324150403651610017311 0ustar00ri/1.8/system/Test/Unit/Assertions/assert_kind_of-i.yaml000064400000000657150403651620017116 0ustar00ri/1.8/system/Test/cdesc-Test.yaml000064400000000257150403651620012617 0ustar00ri/1.8/system/SingletonClassMethods/cdesc-SingletonClassMethods.yaml000064400000000632150403651630021507 0ustar00ri/1.8/system/SingletonClassMethods/_instantiate%3f-i.yaml000064400000000372150403651630017363 0ustar00ri/1.8/system/SingletonClassMethods/_load-i.yaml000064400000000266150403651640015464 0ustar00ri/1.8/system/SingletonClassMethods/inherited-i.yaml000064400000000441150403651640016354 0ustar00ri/1.8/system/SingletonClassMethods/clone-i.yaml000064400000000463150403651650015506 0ustar00ri/1.8/system/IO/flush-i.yaml000064400000001126150403651660011560 0ustar00ri/1.8/system/IO/stat-i.yaml000064400000001036150403651660011412 0ustar00ri/1.8/system/IO/readbyte-i.yaml000064400000000501150403651670012233 0ustar00ri/1.8/system/IO/lines-i.yaml000064400000001247150403651670011556 0ustar00ri/1.8/system/IO/chars-i.yaml000064400000001151150403651670011536 0ustar00ri/1.8/system/IO/select-c.yaml000064400000000503150403651700011701 0ustar00ri/1.8/system/IO/fcntl-i.yaml000064400000001231150403651700011535 0ustar00ri/1.8/system/IO/fsync-i.yaml000064400000001117150403651710011555 0ustar00ri/1.8/system/IO/print-i.yaml000064400000001606150403651710011572 0ustar00ri/1.8/system/IO/printf-i.yaml000064400000000600150403651720011732 0ustar00ri/1.8/system/IO/each-i.yaml000064400000001457150403651720011343 0ustar00ri/1.8/system/IO/cdesc-IO.yaml000064400000017370150403651730011605 0ustar00ri/1.8/system/IO/to_i-i.yaml000064400000000326150403651730011370 0ustar00ri/1.8/system/IO/scanf-i.yaml000064400000002372150403651740011534 0ustar00ri/1.8/system/IO/lineno-i.yaml000064400000001460150403651740011723 0ustar00ri/1.8/system/IO/read-i.yaml000064400000001716150403651740011356 0ustar00ri/1.8/system/IO/foreach-c.yaml000064400000001241150403651750012036 0ustar00ri/1.8/system/IO/readline-i.yaml000064400000000513150403651750012221 0ustar00ri/1.8/system/IO/each_line-i.yaml000064400000001471150403651760012352 0ustar00ri/1.8/system/IO/pipe-c.yaml000064400000002430150403651760011366 0ustar00ri/1.8/system/IO/popen-c.yaml000064400000004035150403651760011555 0ustar00ri/1.8/system/IO/readpartial-i.yaml000064400000007343150403651770012740 0ustar00ri/1.8/system/IO/sysread-i.yaml000064400000001211150403651770012106 0ustar00ri/1.8/system/IO/binmode-i.yaml000064400000000577150403652000012052 0ustar00ri/1.8/system/IO/pid-i.yaml000064400000001310150403652000011173 0ustar00ri/1.8/system/IO/block_scanf-i.yaml000064400000000311150403652000012663 0ustar00ri/1.8/system/IO/sysseek-i.yaml000064400000001160150403652000012110 0ustar00ri/1.8/system/IO/tell-i.yaml000064400000000735150403652000011371 0ustar00ri/1.8/system/IO/for_fd-c.yaml000064400000000403150403652010011653 0ustar00ri/1.8/system/IO/close_read-i.yaml000064400000001320150403652010012521 0ustar00ri/1.8/system/IO/rewind-i.yaml000064400000001045150403652010011715 0ustar00ri/1.8/system/IO/getbyte-i.yaml000064400000000712150403652020012071 0ustar00ri/1.8/system/IO/ungetc-i.yaml000064400000001474150403652020011721 0ustar00ri/1.8/system/IO/inspect-i.yaml000064400000000415150403652020012073 0ustar00ri/1.8/system/IO/eof-i.yaml000064400000002232150403652030011177 0ustar00ri/1.8/system/IO/soak_up_spaces-i.yaml000064400000000263150403652030013427 0ustar00ri/1.8/system/IO/read_nonblock-i.yaml000064400000001747150403652040013241 0ustar00ri/1.8/system/IO/new-c.yaml000064400000001217150403652040011214 0ustar00ri/1.8/system/IO/write_nonblock-i.yaml000064400000001174150403652040013452 0ustar00ri/1.8/system/IO/lineno%3d-i.yaml000064400000001354150403652050012214 0ustar00ri/1.8/system/IO/each_byte-i.yaml000064400000001175150403652050012360 0ustar00ri/1.8/system/IO/isatty-i.yaml000064400000001015150403652050011743 0ustar00ri/1.8/system/IO/read-c.yaml000064400000001416150403652060011341 0ustar00ri/1.8/system/IO/write-i.yaml000064400000001336150403652060011567 0ustar00ri/1.8/system/IO/syswrite-i.yaml000064400000001146150403652060012325 0ustar00ri/1.8/system/IO/closed%3f-i.yaml000064400000001261150403652060012201 0ustar00ri/1.8/system/IO/gets-i.yaml000064400000001577150403652070011407 0ustar00ri/1.8/system/IO/eof%3f-i.yaml000064400000002234150403652070011503 0ustar00ri/1.8/system/IO/%3c%3c-i.yaml000064400000001060150403652100011267 0ustar00ri/1.8/system/IO/readlines-c.yaml000064400000001031150403652100012360 0ustar00ri/1.8/system/IO/reopen-i.yaml000064400000001355150403652110011722 0ustar00ri/1.8/system/IO/pos-i.yaml000064400000000733150403652110011232 0ustar00ri/1.8/system/IO/getc-i.yaml000064400000000704150403652120011352 0ustar00ri/1.8/system/IO/readbytes-i.yaml000064400000000731150403652130012413 0ustar00ri/1.8/system/IO/tty%3f-i.yaml000064400000001011150403652130011537 0ustar00ri/1.8/system/IO/putc-i.yaml000064400000001130150403652130011376 0ustar00ri/1.8/system/IO/close-i.yaml000064400000001144150403652140011536 0ustar00ri/1.8/system/IO/each_char-i.yaml000064400000001161150403652150012326 0ustar00ri/1.8/system/IO/seek-i.yaml000064400000002015150403652160011360 0ustar00ri/1.8/system/IO/to_io-i.yaml000064400000000355150403652160011547 0ustar00ri/1.8/system/IO/sync%3d-i.yaml000064400000001166150403652170011710 0ustar00ri/1.8/system/IO/readchar-i.yaml000064400000000501150403652170012201 0ustar00ri/1.8/system/IO/fileno-i.yaml000064400000000726150403652200011707 0ustar00ri/1.8/system/IO/ioctl-i.yaml000064400000001112150403652200011533 0ustar00ri/1.8/system/IO/sysopen-c.yaml000064400000000645150403652210012126 0ustar00ri/1.8/system/IO/sync-i.yaml000064400000001040150403652210011376 0ustar00ri/1.8/system/IO/readlines-i.yaml000064400000001267150403652220012404 0ustar00ri/1.8/system/IO/pos%3d-i.yaml000064400000000660150403652220011527 0ustar00ri/1.8/system/IO/puts-i.yaml000064400000001423150403652240011425 0ustar00ri/1.8/system/IO/close_write-i.yaml000064400000001377150403652240012761 0ustar00ri/1.8/system/IO/bytes-i.yaml000064400000001070150403652240011556 0ustar00ri/1.8/system/IO/open-c.yaml000064400000001127150403652250011367 0ustar00ri/1.8/system/Racc/ParseError/cdesc-ParseError.yaml000064400000000316150403652250015775 0ustar00ri/1.8/system/Racc/Parser/racc_print_stacks-i.yaml000064400000000307150403652260015725 0ustar00ri/1.8/system/Racc/Parser/next_token-i.yaml000064400000000265150403652260014412 0ustar00ri/1.8/system/Racc/Parser/racc_reduce-i.yaml000064400000000320150403652270014464 0ustar00ri/1.8/system/Racc/Parser/_racc_evalact-i.yaml000064400000000356150403652270015004 0ustar00ri/1.8/system/Racc/Parser/yyparse-i.yaml000064400000000344150403652270013727 0ustar00ri/1.8/system/Racc/Parser/racc_accept-i.yaml000064400000000267150403652270014466 0ustar00ri/1.8/system/Racc/Parser/on_error-i.yaml000064400000000277150403652300014057 0ustar00ri/1.8/system/Racc/Parser/racc_runtime_type-c.yaml000064400000000302150403652300015725 0ustar00ri/1.8/system/Racc/Parser/racc_token2str-i.yaml000064400000000300150403652300015140 0ustar00ri/1.8/system/Racc/Parser/_racc_yyparse_rb-i.yaml000064400000000330150403652310015527 0ustar00ri/1.8/system/Racc/Parser/do_parse-i.yaml000064400000000336150403652310014023 0ustar00ri/1.8/system/Racc/Parser/_racc_do_reduce-i.yaml000064400000000307150403652310015305 0ustar00ri/1.8/system/Racc/Parser/cdesc-Parser.yaml000064400000006145150403652310014320 0ustar00ri/1.8/system/Racc/Parser/_racc_do_parse_rb-i.yaml000064400000000320150403652320015627 0ustar00ri/1.8/system/Racc/Parser/yyerror-i.yaml000064400000000257150403652320013745 0ustar00ri/1.8/system/Racc/Parser/racc_e_pop-i.yaml000064400000000312150403652320014314 0ustar00ri/1.8/system/Racc/Parser/yyerrok-i.yaml000064400000000257150403652320013736 0ustar00ri/1.8/system/Racc/Parser/token_to_str-i.yaml000064400000000272150403652330014742 0ustar00ri/1.8/system/Racc/Parser/racc_next_state-i.yaml000064400000000316150403652330015375 0ustar00ri/1.8/system/Racc/Parser/racc_print_states-i.yaml000064400000000304150403652330015733 0ustar00ri/1.8/system/Racc/Parser/racc_read_token-i.yaml000064400000000403150403652340015330 0ustar00ri/1.8/system/Racc/Parser/_racc_setup-i.yaml000064400000000267150403652340014524 0ustar00ri/1.8/system/Racc/Parser/yyaccept-i.yaml000064400000000261150403652350014051 0ustar00ri/1.8/system/Racc/Parser/racc_shift-i.yaml000064400000000310150403652350014330 0ustar00ri/1.8/system/Racc/Parser/_racc_init_sysvars-i.yaml000064400000000305150403652360016114 0ustar00ri/1.8/system/Racc/cdesc-Racc.yaml000064400000000401150403652360012472 0ustar00ri/1.8/system/SortedSet/cdesc-SortedSet.yaml000064400000000450150403652370014607 0ustar00ri/1.8/system/Sync_m/extend_object-c.yaml000064400000000267150403652400014165 0ustar00ri/1.8/system/Sync_m/sync_locked%3f-i.yaml000064400000000340150403652400014141 0ustar00ri/1.8/system/Sync_m/sync_initialize-i.yaml000064400000000271150403652400014546 0ustar00ri/1.8/system/Sync_m/Err/cdesc-Err.yaml000064400000000435150403652410013465 0ustar00ri/1.8/system/Sync_m/Err/Fail-c.yaml000064400000000253150403652410012747 0ustar00ri/1.8/system/Sync_m/Err/UnknownLocker/cdesc-UnknownLocker.yaml000064400000000531150403652420020331 0ustar00ri/1.8/system/Sync_m/Err/UnknownLocker/Fail-c.yaml000064400000000270150403652420015546 0ustar00ri/1.8/system/Sync_m/Err/LockModeFailer/cdesc-LockModeFailer.yaml000064400000000532150403652420020374 0ustar00ri/1.8/system/Sync_m/Err/LockModeFailer/Fail-c.yaml000064400000000273150403652430015573 0ustar00ri/1.8/system/Sync_m/append_features-c.yaml000064400000000272150403652430014514 0ustar00ri/1.8/system/Sync_m/new-c.yaml000064400000000245150403652430012140 0ustar00ri/1.8/system/Sync_m/sync_lock-i.yaml000064400000000262150403652430013340 0ustar00ri/1.8/system/Sync_m/sync_exclusive%3f-i.yaml000064400000000270150403652440014715 0ustar00ri/1.8/system/Sync_m/sync_try_lock_sub-i.yaml000064400000000276150403652440015115 0ustar00ri/1.8/system/Sync_m/sync_shared%3f-i.yaml000064400000000262150403652440014155 0ustar00ri/1.8/system/Sync_m/sync_synchronize-i.yaml000064400000000316150403652440014764 0ustar00ri/1.8/system/Sync_m/define_aliases-c.yaml000064400000000270150403652450014302 0ustar00ri/1.8/system/Sync_m/sync_try_lock-i.yaml000064400000000362150403652450014241 0ustar00ri/1.8/system/Sync_m/sync_extended-i.yaml000064400000000264150403652450014214 0ustar00ri/1.8/system/Sync_m/cdesc-Sync_m.yaml000064400000003270150403652460013442 0ustar00ri/1.8/system/Sync_m/sync_unlock-i.yaml000064400000000266150403652460013712 0ustar00ri/1.8/system/DOT/DOTSubgraph/pop-i.yaml000064400000000252150403652470013475 0ustar00ri/1.8/system/DOT/DOTSubgraph/cdesc-DOTSubgraph.yaml000064400000001125150403652470015652 0ustar00ri/1.8/system/DOT/DOTSubgraph/new-c.yaml000064400000000321150403652470013457 0ustar00ri/1.8/system/DOT/DOTSubgraph/push-i.yaml000064400000000263150403652470013660 0ustar00ri/1.8/system/DOT/DOTSubgraph/each_node-i.yaml000064400000000301150403652500014571 0ustar00ri/1.8/system/DOT/DOTSubgraph/%3c%3c-i.yaml000064400000000261150403652500013536 0ustar00ri/1.8/system/DOT/DOTSubgraph/to_s-i.yaml000064400000000264150403652500013640 0ustar00ri/1.8/system/DOT/DOTSimpleElement/cdesc-DOTSimpleElement.yaml000064400000000667150403652510017637 0ustar00ri/1.8/system/DOT/DOTSimpleElement/new-c.yaml000064400000000274150403652510014451 0ustar00ri/1.8/system/DOT/DOTSimpleElement/to_s-i.yaml000064400000000261150403652510014626 0ustar00ri/1.8/system/DOT/change_tab-i.yaml000064400000000407150403652520012626 0ustar00ri/1.8/system/DOT/DOTPort/new-c.yaml000064400000000263150403652520012631 0ustar00ri/1.8/system/DOT/DOTPort/cdesc-DOTPort.yaml000064400000000727150403652520014177 0ustar00ri/1.8/system/DOT/DOTPort/to_s-i.yaml000064400000000250150403652520013006 0ustar00ri/1.8/system/DOT/DOTEdge/new-c.yaml000064400000000314150403652530012547 0ustar00ri/1.8/system/DOT/DOTEdge/cdesc-DOTEdge.yaml000064400000000707150403652530014036 0ustar00ri/1.8/system/DOT/DOTEdge/to_s-i.yaml000064400000000260150403652530012730 0ustar00ri/1.8/system/DOT/DOTNode/each_port-i.yaml000064400000000275150403652530013757 0ustar00ri/1.8/system/DOT/DOTNode/cdesc-DOTNode.yaml000064400000001014150403652530014070 0ustar00ri/1.8/system/DOT/DOTNode/pop-i.yaml000064400000000246150403652530012607 0ustar00ri/1.8/system/DOT/DOTNode/new-c.yaml000064400000000314150403652530012570 0ustar00ri/1.8/system/DOT/DOTNode/push-i.yaml000064400000000257150403652530012772 0ustar00ri/1.8/system/DOT/DOTNode/%3c%3c-i.yaml000064400000000255150403652540012657 0ustar00ri/1.8/system/DOT/DOTNode/to_s-i.yaml000064400000000260150403652540012752 0ustar00ri/1.8/system/DOT/DOTElement/each_option-i.yaml000064400000000304150403652540015001 0ustar00ri/1.8/system/DOT/DOTElement/cdesc-DOTElement.yaml000064400000001271150403652550015307 0ustar00ri/1.8/system/DOT/DOTElement/new-c.yaml000064400000000310150403652550013272 0ustar00ri/1.8/system/DOT/DOTElement/each_option_pair-i.yaml000064400000000334150403652550016020 0ustar00ri/1.8/system/DOT/cdesc-DOT.yaml000064400000003151150403652560012035 0ustar00ri/1.8/system/DOT/DOTDigraph/new-c.yaml000064400000000320150403652560013261 0ustar00ri/1.8/system/DOT/DOTDigraph/cdesc-DOTDigraph.yaml000064400000000450150403652570015261 0ustar00ri/1.8/system/UNIXSocket/cdesc-UNIXSocket.yaml000064400000003156150403652570014657 0ustar00ri/1.8/system/IPAddr/%3c%3d%3e-i.yaml000064400000000353150403652600012372 0ustar00ri/1.8/system/IPAddr/to_i-i.yaml000064400000000370150403652600012160 0ustar00ri/1.8/system/IPAddr/ipv4_compat%3f-i.yaml000064400000000425150403652610013753 0ustar00ri/1.8/system/IPAddr/%7c-i.yaml000064400000000361150403652610011605 0ustar00ri/1.8/system/IPAddr/%26-i.yaml000064400000000362150403652610011524 0ustar00ri/1.8/system/IPAddr/ntop-c.yaml000064400000000440150403652620012200 0ustar00ri/1.8/system/IPAddr/ipv4_mapped-i.yaml000064400000000467150403652620013447 0ustar00ri/1.8/system/IPAddr/_to_string-i.yaml000064400000000263150403652620013400 0ustar00ri/1.8/system/IPAddr/set-i.yaml000064400000000260150403652630012022 0ustar00ri/1.8/system/IPAddr/%7e-i.yaml000064400000000362150403652630011612 0ustar00ri/1.8/system/IPAddr/inspect-i.yaml000064400000000514150403652630012676 0ustar00ri/1.8/system/IPAddr/mask%21-i.yaml000064400000000253150403652640012375 0ustar00ri/1.8/system/IPAddr/new_ntoh-c.yaml000064400000000457150403652640013053 0ustar00ri/1.8/system/IPAddr/include%3f-i.yaml000064400000001170150403652650013153 0ustar00ri/1.8/system/IPAddr/new-c.yaml000064400000002276150403652650012025 0ustar00ri/1.8/system/IPAddr/reverse-i.yaml000064400000000456150403652660012714 0ustar00ri/1.8/system/IPAddr/%3d%3d%3d-i.yaml000064400000000337150403652660012402 0ustar00ri/1.8/system/IPAddr/%3e%3e-i.yaml000064400000000372150403652660012107 0ustar00ri/1.8/system/IPAddr/ip6_arpa-i.yaml000064400000000417150403652670012740 0ustar00ri/1.8/system/IPAddr/hton-i.yaml000064400000000404150403652670012203 0ustar00ri/1.8/system/IPAddr/ipv4_compat-i.yaml000064400000000473150403652700013460 0ustar00ri/1.8/system/IPAddr/%3c%3c-i.yaml000064400000000371150403652700012075 0ustar00ri/1.8/system/IPAddr/ipv4_mapped%3f-i.yaml000064400000000421150403652700013732 0ustar00ri/1.8/system/IPAddr/addr_mask-i.yaml000064400000000261150403652710013154 0ustar00ri/1.8/system/IPAddr/succ-i.yaml000064400000000353150403652710012166 0ustar00ri/1.8/system/IPAddr/to_s-i.yaml000064400000000401150403652710012167 0ustar00ri/1.8/system/IPAddr/%3d%3d-i.yaml000064400000000356150403652720012104 0ustar00ri/1.8/system/IPAddr/ipv6%3f-i.yaml000064400000000367150403652720012421 0ustar00ri/1.8/system/IPAddr/to_string-i.yaml000064400000000435150403652720013243 0ustar00ri/1.8/system/IPAddr/native-i.yaml000064400000000567150403652730012530 0ustar00ri/1.8/system/IPAddr/cdesc-IPAddr.yaml000064400000006464150403652740013201 0ustar00ri/1.8/system/IPAddr/ip6_int-i.yaml000064400000000415150403652740012603 0ustar00ri/1.8/system/IPAddr/coerce_other-i.yaml000064400000000270150403652750013674 0ustar00ri/1.8/system/IPAddr/ipv4%3f-i.yaml000064400000000367150403652750012422 0ustar00ri/1.8/system/IPAddr/_reverse-i.yaml000064400000000253150403652760013047 0ustar00ri/1.8/system/IPAddr/in6_addr-i.yaml000064400000000257150403652760012727 0ustar00ri/1.8/system/IPAddr/in_addr-i.yaml000064400000000255150403652760012637 0ustar00ri/1.8/system/IPAddr/to_range-i.yaml000064400000000376150403652770013042 0ustar00ri/1.8/system/IPAddr/mask-i.yaml000064400000000520150403652770012166 0ustar00ri/1.8/system/Float/cdesc-Float.yaml000064400000005614150403653000013067 0ustar00ri/1.8/system/Float/infinite%3f-i.yaml000064400000000755150403653010013276 0ustar00ri/1.8/system/Float/eql%3f-i.yaml000064400000000734150403653010012247 0ustar00ri/1.8/system/Float/%25-i.yaml000064400000000715150403653020011463 0ustar00ri/1.8/system/Float/%2a%2a-i.yaml000064400000000475150403653030012033 0ustar00ri/1.8/system/Float/%3c%3d%3e-i.yaml000064400000000615150403653030012333 0ustar00ri/1.8/system/Float/coerce-i.yaml000064400000000344150403653040012430 0ustar00ri/1.8/system/Float/to_i-i.yaml000064400000000520150403653040012116 0ustar00ri/1.8/system/Float/%2f-i.yaml000064400000000460150403653040011543 0ustar00ri/1.8/system/Float/divmod-i.yaml000064400000000410150403653050012445 0ustar00ri/1.8/system/Float/to_yaml-i.yaml000064400000000262150403653060012635 0ustar00ri/1.8/system/Float/%3c-i.yaml000064400000000435150403653060011545 0ustar00ri/1.8/system/Float/hash-i.yaml000064400000000401150403653070012110 0ustar00ri/1.8/system/Float/%3c%3d-i.yaml000064400000000454150403653070012043 0ustar00ri/1.8/system/Float/abs-i.yaml000064400000000557150403653070011746 0ustar00ri/1.8/system/Float/%3e%3d-i.yaml000064400000000461150403653100012035 0ustar00ri/1.8/system/Float/%2a-i.yaml000064400000000453150403653100011535 0ustar00ri/1.8/system/Float/ceil-i.yaml000064400000000703150403653100012100 0ustar00ri/1.8/system/Float/zero%3f-i.yaml000064400000000422150403653110012440 0ustar00ri/1.8/system/Float/%2b-i.yaml000064400000000445150403653120011541 0ustar00ri/1.8/system/Float/truncate-i.yaml000064400000000530150403653130013012 0ustar00ri/1.8/system/Float/to_int-i.yaml000064400000000524150403653130012464 0ustar00ri/1.8/system/Float/nan%3f-i.yaml000064400000000723150403653140012244 0ustar00ri/1.8/system/Float/to_s-i.yaml000064400000000642150403653150012137 0ustar00ri/1.8/system/Float/finite%3f-i.yaml000064400000000561150403653160012750 0ustar00ri/1.8/system/Float/%3e-i.yaml000064400000000442150403653160011546 0ustar00ri/1.8/system/Float/%3d%3d-i.yaml000064400000000721150403653170012042 0ustar00ri/1.8/system/Float/induced_from-c.yaml000064400000000435150403653200013617 0ustar00ri/1.8/system/Float/%2d%40-i.yaml000064400000000355150403653200011753 0ustar00ri/1.8/system/Float/round-i.yaml000064400000001005150403653210012311 0ustar00ri/1.8/system/Float/dclone-i.yaml000064400000000245150403653220012434 0ustar00ri/1.8/system/Float/floor-i.yaml000064400000000674150403653220012317 0ustar00ri/1.8/system/Float/to_f-i.yaml000064400000000424150403653230012117 0ustar00ri/1.8/system/Float/modulo-i.yaml000064400000000725150403653240012474 0ustar00ri/1.8/system/Float/%2d-i.yaml000064400000000456150403653250011551 0ustar00ri/1.8/system/REXML/ExternalEntity/new-c.yaml000064400000000264150403653270014562 0ustar00ri/1.8/system/REXML/ExternalEntity/cdesc-ExternalEntity.yaml000064400000000526150403653300017602 0ustar00ri/1.8/system/REXML/ExternalEntity/write-i.yaml000064400000000303150403653310015116 0ustar00ri/1.8/system/REXML/ExternalEntity/to_s-i.yaml000064400000000261150403653310014733 0ustar00ri/1.8/system/REXML/Declaration/cdesc-Declaration.yaml000064400000000747150403653330016326 0ustar00ri/1.8/system/REXML/Declaration/new-c.yaml000064400000000257150403653340014030 0ustar00ri/1.8/system/REXML/Declaration/write-i.yaml000064400000000464150403653340014377 0ustar00ri/1.8/system/REXML/Declaration/to_s-i.yaml000064400000000256150403653350014211 0ustar00ri/1.8/system/REXML/cdesc-REXML.yaml000064400000001757150403653350012547 0ustar00ri/1.8/system/REXML/Document/entity_expansion_limit-c.yaml000064400000000471150403653350017365 0ustar00ri/1.8/system/REXML/Document/add_element-i.yaml000064400000000312150403653360015031 0ustar00ri/1.8/system/REXML/Document/doctype-i.yaml000064400000000444150403653360014245 0ustar00ri/1.8/system/REXML/Document/entity_expansion_text_limit%3d-c.yaml000064400000000652150403653360020727 0ustar00ri/1.8/system/REXML/Document/expanded_name-i.yaml000064400000000505150403653360015364 0ustar00ri/1.8/system/REXML/Document/root-i.yaml000064400000000444150403653360013561 0ustar00ri/1.8/system/REXML/Document/entity_expansion_text_limit-c.yaml000064400000000642150403653370020433 0ustar00ri/1.8/system/REXML/Document/cdesc-Document.yaml000064400000004122150403653370015203 0ustar00ri/1.8/system/REXML/Document/add-i.yaml000064400000000521150403653370013323 0ustar00ri/1.8/system/REXML/Document/encoding-i.yaml000064400000000516150403653370014365 0ustar00ri/1.8/system/REXML/Document/parse_stream-c.yaml000064400000000315150403653370015253 0ustar00ri/1.8/system/REXML/Document/new-c.yaml000064400000001057150403653400013355 0ustar00ri/1.8/system/REXML/Document/xml_decl-i.yaml000064400000000500150403653400014351 0ustar00ri/1.8/system/REXML/Document/node_type-i.yaml000064400000000265150403653400014560 0ustar00ri/1.8/system/REXML/Document/write-i.yaml000064400000005053150403653400013724 0ustar00ri/1.8/system/REXML/Document/%3c%3c-i.yaml000064400000000345150403653400013436 0ustar00ri/1.8/system/REXML/Document/clone-i.yaml000064400000000343150403653410013670 0ustar00ri/1.8/system/REXML/Document/stand_alone%3f-i.yaml000064400000000535150403653410015360 0ustar00ri/1.8/system/REXML/Document/record_entity_expansion-i.yaml000064400000000321150403653410017522 0ustar00ri/1.8/system/REXML/Document/name-i.yaml000064400000000352150403653420013511 0ustar00ri/1.8/system/REXML/Document/entity_expansion_limit%3d-c.yaml000064400000000500150403653420017650 0ustar00ri/1.8/system/REXML/Document/build-i.yaml000064400000000266150403653420013674 0ustar00ri/1.8/system/REXML/Document/version-i.yaml000064400000000512150403653420014254 0ustar00ri/1.8/system/REXML/Source/match_to-i.yaml000064400000000300150403653430014043 0ustar00ri/1.8/system/REXML/Source/empty%3f-i.yaml000064400000000373150403653430013713 0ustar00ri/1.8/system/REXML/Source/current_line-i.yaml000064400000000406150403653440014746 0ustar00ri/1.8/system/REXML/Source/read-i.yaml000064400000000251150403653440013166 0ustar00ri/1.8/system/REXML/Source/position-i.yaml000064400000000261150403653440014120 0ustar00ri/1.8/system/REXML/Source/consume-i.yaml000064400000000270150403653440013725 0ustar00ri/1.8/system/REXML/Source/match-i.yaml000064400000000276150403653440013356 0ustar00ri/1.8/system/REXML/Source/scan-i.yaml000064400000002144150403653440013202 0ustar00ri/1.8/system/REXML/Source/new-c.yaml000064400000000626150403653440013044 0ustar00ri/1.8/system/REXML/Source/match_to_consume-i.yaml000064400000000320150403653440015577 0ustar00ri/1.8/system/REXML/Source/cdesc-Source.yaml000064400000002423150403653440014347 0ustar00ri/1.8/system/REXML/Source/encoding%3d-i.yaml000064400000000436150403653450014343 0ustar00ri/1.8/system/REXML/XPath/first-c.yaml000064400000001630150403653450013163 0ustar00ri/1.8/system/REXML/XPath/cdesc-XPath.yaml000064400000001044150403653460013717 0ustar00ri/1.8/system/REXML/XPath/match-c.yaml000064400000000457150403653460013137 0ustar00ri/1.8/system/REXML/XPath/each-c.yaml000064400000001607150403653470012742 0ustar00ri/1.8/system/REXML/Parent/delete_at-i.yaml000064400000000272150403653470014200 0ustar00ri/1.8/system/REXML/Parent/size-i.yaml000064400000000447150403653500013222 0ustar00ri/1.8/system/REXML/Parent/cdesc-Parent.yaml000064400000003036150403653500014327 0ustar00ri/1.8/system/REXML/Parent/%5b%5d-i.yaml000064400000000450150403653500013113 0ustar00ri/1.8/system/REXML/Parent/each-i.yaml000064400000000335150403653500013144 0ustar00ri/1.8/system/REXML/Parent/to_a-i.yaml000064400000000325150403653510013166 0ustar00ri/1.8/system/REXML/Parent/insert_after-i.yaml000064400000001047150403653510014733 0ustar00ri/1.8/system/REXML/Parent/parent%3f-i.yaml000064400000000257150403653510014037 0ustar00ri/1.8/system/REXML/Parent/delete-i.yaml000064400000000265150403653510013511 0ustar00ri/1.8/system/REXML/Parent/replace_child-i.yaml000064400000000701150403653510015020 0ustar00ri/1.8/system/REXML/Parent/index-i.yaml000064400000000570150403653510013355 0ustar00ri/1.8/system/REXML/Parent/delete_if-i.yaml000064400000000273150403653520014167 0ustar00ri/1.8/system/REXML/Parent/add-i.yaml000064400000000327150403653520012777 0ustar00ri/1.8/system/REXML/Parent/unshift-i.yaml000064400000000267150403653520013732 0ustar00ri/1.8/system/REXML/Parent/new-c.yaml000064400000000445150403653520013033 0ustar00ri/1.8/system/REXML/Parent/each_child-i.yaml000064400000000361150403653530014311 0ustar00ri/1.8/system/REXML/Parent/children-i.yaml000064400000000347150403653530014042 0ustar00ri/1.8/system/REXML/Parent/push-i.yaml000064400000000416150403653530013226 0ustar00ri/1.8/system/REXML/Parent/deep_clone-i.yaml000064400000000501150403653540014340 0ustar00ri/1.8/system/REXML/Parent/length-i.yaml000064400000000343150403653540013530 0ustar00ri/1.8/system/REXML/Parent/%3c%3c-i.yaml000064400000000345150403653540013116 0ustar00ri/1.8/system/REXML/Parent/insert_before-i.yaml000064400000001054150403653540015075 0ustar00ri/1.8/system/REXML/Parent/each_index-i.yaml000064400000000275150403653550014343 0ustar00ri/1.8/system/REXML/Parent/%5b%5d%3d-i.yaml000064400000000663150403653550013422 0ustar00ri/1.8/system/REXML/entity_expansion_text_limit%3d-c.yaml000064400000000500150403653550017142 0ustar00ri/1.8/system/REXML/EntityConst/cdesc-EntityConst.yaml000064400000002046150403653560016421 0ustar00ri/1.8/system/REXML/Attributes/size-i.yaml000064400000000345150403653560014122 0ustar00ri/1.8/system/REXML/Attributes/%5b%5d-i.yaml000064400000001621150403653570014020 0ustar00ri/1.8/system/REXML/Attributes/each-i.yaml000064400000001066150403653600014044 0ustar00ri/1.8/system/REXML/Attributes/to_a-i.yaml000064400000000255150403653600014065 0ustar00ri/1.8/system/REXML/Attributes/namespaces-i.yaml000064400000000271150403653610015261 0ustar00ri/1.8/system/REXML/Attributes/delete-i.yaml000064400000001745150403653610014413 0ustar00ri/1.8/system/REXML/Attributes/cdesc-Attributes.yaml000064400000002173150403653610016124 0ustar00ri/1.8/system/REXML/Attributes/add-i.yaml000064400000000755150403653610013701 0ustar00ri/1.8/system/REXML/Attributes/new-c.yaml000064400000000605150403653610013726 0ustar00ri/1.8/system/REXML/Attributes/length-i.yaml000064400000000720150403653610014422 0ustar00ri/1.8/system/REXML/Attributes/get_attribute-i.yaml000064400000001736150403653620016014 0ustar00ri/1.8/system/REXML/Attributes/%3c%3c-i.yaml000064400000000353150403653620014011 0ustar00ri/1.8/system/REXML/Attributes/prefixes-i.yaml000064400000001162150403653620014770 0ustar00ri/1.8/system/REXML/Attributes/get_attribute_ns-i.yaml000064400000000776150403653620016517 0ustar00ri/1.8/system/REXML/Attributes/%5b%5d%3d-i.yaml000064400000001636150403653620014316 0ustar00ri/1.8/system/REXML/Attributes/delete_all-i.yaml000064400000001107150403653620015234 0ustar00ri/1.8/system/REXML/Attributes/each_attribute-i.yaml000064400000001062150403653630016126 0ustar00ri/1.8/system/REXML/SAX2Listener/entitydecl-i.yaml000064400000003207150403653630015407 0ustar00ri/1.8/system/REXML/SAX2Listener/start_prefix_mapping-i.yaml000064400000000332150403653630017464 0ustar00ri/1.8/system/REXML/SAX2Listener/doctype-i.yaml000064400000001234150403653630014710 0ustar00ri/1.8/system/REXML/SAX2Listener/attlistdecl-i.yaml000064400000001040150403653640015551 0ustar00ri/1.8/system/REXML/SAX2Listener/progress-i.yaml000064400000000277150403653640015114 0ustar00ri/1.8/system/REXML/SAX2Listener/xmldecl-i.yaml000064400000001147150403653640014675 0ustar00ri/1.8/system/REXML/SAX2Listener/start_document-i.yaml000064400000000303150403653650016272 0ustar00ri/1.8/system/REXML/SAX2Listener/elementdecl-i.yaml000064400000000377150403653660015534 0ustar00ri/1.8/system/REXML/SAX2Listener/end_element-i.yaml000064400000000322150403653660015520 0ustar00ri/1.8/system/REXML/SAX2Listener/cdesc-SAX2Listener.yaml000064400000003556150403653670016332 0ustar00ri/1.8/system/REXML/SAX2Listener/start_element-i.yaml000064400000000342150403653700016104 0ustar00ri/1.8/system/REXML/SAX2Listener/cdata-i.yaml000064400000000471150403653700014315 0ustar00ri/1.8/system/REXML/SAX2Listener/characters-i.yaml000064400000000277150403653710015365 0ustar00ri/1.8/system/REXML/SAX2Listener/end_prefix_mapping-i.yaml000064400000000321150403653710017072 0ustar00ri/1.8/system/REXML/SAX2Listener/comment-i.yaml000064400000000454150403653720014706 0ustar00ri/1.8/system/REXML/SAX2Listener/notationdecl-i.yaml000064400000000402150403653720015720 0ustar00ri/1.8/system/REXML/SAX2Listener/end_document-i.yaml000064400000000277150403653730015714 0ustar00ri/1.8/system/REXML/SAX2Listener/processing_instruction-i.yaml000064400000000337150403653740020063 0ustar00ri/1.8/system/REXML/Node/each_recursive-i.yaml000064400000000440150403653750014673 0ustar00ri/1.8/system/REXML/Node/previous_sibling_node-i.yaml000064400000000433150403653760016277 0ustar00ri/1.8/system/REXML/Node/parent%3f-i.yaml000064400000000255150403653760013500 0ustar00ri/1.8/system/REXML/Node/find_first_recursive-i.yaml000064400000000571150403653770016131 0ustar00ri/1.8/system/REXML/Node/indent-i.yaml000064400000000262150403653770013171 0ustar00ri/1.8/system/REXML/Node/cdesc-Node.yaml000064400000001420150403654000013406 0ustar00ri/1.8/system/REXML/Node/to_s-i.yaml000064400000000655150403654010012646 0ustar00ri/1.8/system/REXML/Node/next_sibling_node-i.yaml000064400000000417150403654010015370 0ustar00ri/1.8/system/REXML/Node/index_in_parent-i.yaml000064400000000466150403654020015051 0ustar00ri/1.8/system/REXML/UndefinedNamespaceException/new-c.yaml000064400000000324150403654030017170 0ustar00ri/1.8/system/REXML/UndefinedNamespaceException/cdesc-UndefinedNamespaceException.yaml000064400000000435150403654040024637 0ustar00ri/1.8/system/REXML/XMLTokens/cdesc-XMLTokens.yaml000064400000001734150403654050015321 0ustar00ri/1.8/system/REXML/Comment/%3c%3d%3e-i.yaml000064400000000453150403654060013563 0ustar00ri/1.8/system/REXML/Comment/new-c.yaml000064400000001125150403654070013201 0ustar00ri/1.8/system/REXML/Comment/cdesc-Comment.yaml000064400000001574150403654100014653 0ustar00ri/1.8/system/REXML/Comment/node_type-i.yaml000064400000000264150403654110014402 0ustar00ri/1.8/system/REXML/Comment/write-i.yaml000064400000001711150403654110013544 0ustar00ri/1.8/system/REXML/Comment/%3d%3d-i.yaml000064400000000453150403654110013263 0ustar00ri/1.8/system/REXML/Comment/clone-i.yaml000064400000000254150403654110013513 0ustar00ri/1.8/system/REXML/Validation/Optional/expected-i.yaml000064400000000277150403654130016500 0ustar00ri/1.8/system/REXML/Validation/Optional/next-i.yaml000064400000000276150403654130015654 0ustar00ri/1.8/system/REXML/Validation/Optional/matches%3f-i.yaml000064400000000304150403654130016610 0ustar00ri/1.8/system/REXML/Validation/Optional/cdesc-Optional.yaml000064400000000541150403654130017307 0ustar00ri/1.8/system/REXML/Validation/Sequence/matches%3f-i.yaml000064400000000304150403654140016574 0ustar00ri/1.8/system/REXML/Validation/Sequence/cdesc-Sequence.yaml000064400000000377150403654140017265 0ustar00ri/1.8/system/REXML/Validation/Choice/expected-i.yaml000064400000000275150403654140016104 0ustar00ri/1.8/system/REXML/Validation/Choice/next-i.yaml000064400000000274150403654150015261 0ustar00ri/1.8/system/REXML/Validation/Choice/cdesc-Choice.yaml000064400000001125150403654150016322 0ustar00ri/1.8/system/REXML/Validation/Choice/inspect-i.yaml000064400000000273150403654150015747 0ustar00ri/1.8/system/REXML/Validation/Choice/new-c.yaml000064400000000272150403654160015065 0ustar00ri/1.8/system/REXML/Validation/Choice/%3c%3c-i.yaml000064400000000272150403654160015147 0ustar00ri/1.8/system/REXML/Validation/Choice/matches%3f-i.yaml000064400000000304150403654170016221 0ustar00ri/1.8/system/REXML/Validation/Choice/reset-i.yaml000064400000000267150403654200015423 0ustar00ri/1.8/system/REXML/Validation/Choice/add_event_to_arry-i.yaml000064400000000335150403654200017765 0ustar00ri/1.8/system/REXML/Validation/State/expected-i.yaml000064400000000274150403654200015766 0ustar00ri/1.8/system/REXML/Validation/State/previous%3d-i.yaml000064400000000310150403654210016325 0ustar00ri/1.8/system/REXML/Validation/State/next-i.yaml000064400000000273150403654210015143 0ustar00ri/1.8/system/REXML/Validation/State/expand_ref_in-i.yaml000064400000000324150403654210016763 0ustar00ri/1.8/system/REXML/Validation/State/inspect-i.yaml000064400000000272150403654210015631 0ustar00ri/1.8/system/REXML/Validation/State/cdesc-State.yaml000064400000001365150403654220016102 0ustar00ri/1.8/system/REXML/Validation/State/new-c.yaml000064400000000273150403654220014751 0ustar00ri/1.8/system/REXML/Validation/State/%3c%3c-i.yaml000064400000000271150403654220015031 0ustar00ri/1.8/system/REXML/Validation/State/to_s-i.yaml000064400000000264150403654220015132 0ustar00ri/1.8/system/REXML/Validation/State/reset-i.yaml000064400000000266150403654230015313 0ustar00ri/1.8/system/REXML/Validation/State/generate_event-i.yaml000064400000000322150403654230017155 0ustar00ri/1.8/system/REXML/Validation/State/add_event_to_arry-i.yaml000064400000000334150403654230017655 0ustar00ri/1.8/system/REXML/Validation/cdesc-Validation.yaml000064400000000302150403654230016023 0ustar00ri/1.8/system/REXML/Validation/RelaxNG/new-c.yaml000064400000000362150403654240015172 0ustar00ri/1.8/system/REXML/Validation/RelaxNG/cdesc-RelaxNG.yaml000064400000005056150403654240016545 0ustar00ri/1.8/system/REXML/Validation/RelaxNG/receive-i.yaml000064400000000301150403654240016022 0ustar00ri/1.8/system/REXML/Validation/Validator/cdesc-Validator.yaml000064400000000645150403654250017617 0ustar00ri/1.8/system/REXML/Validation/Validator/validate-i.yaml000064400000000307150403654250016625 0ustar00ri/1.8/system/REXML/Validation/Validator/dump-i.yaml000064400000000270150403654250016000 0ustar00ri/1.8/system/REXML/Validation/Validator/reset-i.yaml000064400000000272150403654260016160 0ustar00ri/1.8/system/REXML/Validation/Interleave/expected-i.yaml000064400000000301150403654260017001 0ustar00ri/1.8/system/REXML/Validation/Interleave/next_current-i.yaml000064400000000320150403654260017721 0ustar00ri/1.8/system/REXML/Validation/Interleave/next-i.yaml000064400000000300150403654270016156 0ustar00ri/1.8/system/REXML/Validation/Interleave/cdesc-Interleave.yaml000064400000001052150403654270020134 0ustar00ri/1.8/system/REXML/Validation/Interleave/inspect-i.yaml000064400000000277150403654270016662 0ustar00ri/1.8/system/REXML/Validation/Interleave/new-c.yaml000064400000000276150403654270015777 0ustar00ri/1.8/system/REXML/Validation/Interleave/matches%3f-i.yaml000064400000000310150403654300017115 0ustar00ri/1.8/system/REXML/Validation/Interleave/reset-i.yaml000064400000000273150403654300016325 0ustar00ri/1.8/system/REXML/Validation/Ref/inspect-i.yaml000064400000000270150403654300015263 0ustar00ri/1.8/system/REXML/Validation/Ref/new-c.yaml000064400000000265150403654310014406 0ustar00ri/1.8/system/REXML/Validation/Ref/to_s-i.yaml000064400000000262150403654310014564 0ustar00ri/1.8/system/REXML/Validation/Ref/cdesc-Ref.yaml000064400000000517150403654310015170 0ustar00ri/1.8/system/REXML/Validation/ZeroOrMore/expected-i.yaml000064400000000301150403654320016743 0ustar00ri/1.8/system/REXML/Validation/ZeroOrMore/next-i.yaml000064400000000300150403654320016117 0ustar00ri/1.8/system/REXML/Validation/ZeroOrMore/cdesc-ZeroOrMore.yaml000064400000000465150403654320020051 0ustar00ri/1.8/system/REXML/Validation/ValidationException/new-c.yaml000064400000000303150403654330017636 0ustar00ri/1.8/system/REXML/Validation/ValidationException/cdesc-ValidationException.yaml000064400000000427150403654330023664 0ustar00ri/1.8/system/REXML/Validation/OneOrMore/expected-i.yaml000064400000000300150403654340016546 0ustar00ri/1.8/system/REXML/Validation/OneOrMore/cdesc-OneOrMore.yaml000064400000000676150403654340017463 0ustar00ri/1.8/system/REXML/Validation/OneOrMore/next-i.yaml000064400000000277150403654340015740 0ustar00ri/1.8/system/REXML/Validation/OneOrMore/new-c.yaml000064400000000275150403654340015543 0ustar00ri/1.8/system/REXML/Validation/OneOrMore/matches%3f-i.yaml000064400000000307150403654340016676 0ustar00ri/1.8/system/REXML/Validation/OneOrMore/reset-i.yaml000064400000000272150403654340016077 0ustar00ri/1.8/system/REXML/Validation/Event/inspect-i.yaml000064400000000272150403654340015636 0ustar00ri/1.8/system/REXML/Validation/Event/single%3f-i.yaml000064400000000272150403654340015750 0ustar00ri/1.8/system/REXML/Validation/Event/new-c.yaml000064400000000314150403654350014752 0ustar00ri/1.8/system/REXML/Validation/Event/done%3f-i.yaml000064400000000266150403654350015420 0ustar00ri/1.8/system/REXML/Validation/Event/matches%3f-i.yaml000064400000000303150403654350016107 0ustar00ri/1.8/system/REXML/Validation/Event/cdesc-Event.yaml000064400000001234150403654350016103 0ustar00ri/1.8/system/REXML/Validation/Event/to_s-i.yaml000064400000000264150403654350015137 0ustar00ri/1.8/system/REXML/Validation/Event/%3d%3d-i.yaml000064400000000267150403654350015045 0ustar00ri/1.8/system/REXML/Child/document-i.yaml000064400000000635150403654360013664 0ustar00ri/1.8/system/REXML/Child/parent%3d-i.yaml000064400000001267150403654360013635 0ustar00ri/1.8/system/REXML/Child/replace_with-i.yaml000064400000000661150403654360014513 0ustar00ri/1.8/system/REXML/Child/remove-i.yaml000064400000000562150403654360013342 0ustar00ri/1.8/system/REXML/Child/new-c.yaml000064400000001036150403654370012626 0ustar00ri/1.8/system/REXML/Child/cdesc-Child.yaml000064400000001573150403654370013725 0ustar00ri/1.8/system/REXML/Child/previous_sibling%3d-i.yaml000064400000001052150403654370015720 0ustar00ri/1.8/system/REXML/Child/next_sibling%3d-i.yaml000064400000001033150403654370015021 0ustar00ri/1.8/system/REXML/Child/bytes-i.yaml000064400000000360150403654400013162 0ustar00ri/1.8/system/REXML/SourceFactory/create_from-c.yaml000064400000000531150403654400016061 0ustar00ri/1.8/system/REXML/SourceFactory/cdesc-SourceFactory.yaml000064400000000511150403654400017220 0ustar00ri/1.8/system/REXML/XPathParser/compare-i.yaml000064400000000275150403654410014646 0ustar00ri/1.8/system/REXML/XPathParser/preceding_node_of-i.yaml000064400000000317150403654410016646 0ustar00ri/1.8/system/REXML/XPathParser/equality_relational_compare-i.yaml000064400000000355150403654410020774 0ustar00ri/1.8/system/REXML/XPathParser/predicate-i.yaml000064400000000305150403654410015152 0ustar00ri/1.8/system/REXML/XPathParser/parse-i.yaml000064400000000275150403654410014332 0ustar00ri/1.8/system/REXML/XPathParser/descendant_or_self-i.yaml000064400000000767150403654420017050 0ustar00ri/1.8/system/REXML/XPathParser/following_node_of-i.yaml000064400000000317150403654420016707 0ustar00ri/1.8/system/REXML/XPathParser/match-i.yaml000064400000000305150403654420014307 0ustar00ri/1.8/system/REXML/XPathParser/preceding-i.yaml000064400000001066150403654420015160 0ustar00ri/1.8/system/REXML/XPathParser/new-c.yaml000064400000000255150403654430014003 0ustar00ri/1.8/system/REXML/XPathParser/following-i.yaml000064400000000277150403654430015224 0ustar00ri/1.8/system/REXML/XPathParser/first-i.yaml000064400000000676150403654430014356 0ustar00ri/1.8/system/REXML/XPathParser/norm-i.yaml000064400000000260150403654430014167 0ustar00ri/1.8/system/REXML/XPathParser/recurse-i.yaml000064400000000327150403654430014670 0ustar00ri/1.8/system/REXML/XPathParser/namespaces%3d-i.yaml000064400000000313150403654430015626 0ustar00ri/1.8/system/REXML/XPathParser/document_order-i.yaml000064400000001326150403654430016231 0ustar00ri/1.8/system/REXML/XPathParser/d_o_s-i.yaml000064400000000273150403654430014303 0ustar00ri/1.8/system/REXML/XPathParser/expr-i.yaml000064400000000321150403654430014170 0ustar00ri/1.8/system/REXML/XPathParser/cdesc-XPathParser.yaml000064400000004231150403654430016250 0ustar00ri/1.8/system/REXML/XPathParser/get_first-i.yaml000064400000000305150403654430015202 0ustar00ri/1.8/system/REXML/XPathParser/next_sibling_node-i.yaml000064400000000315150403654440016710 0ustar00ri/1.8/system/REXML/XPathParser/get_namespace-i.yaml000064400000000742150403654440016015 0ustar00ri/1.8/system/REXML/XPathParser/variables%3d-i.yaml000064400000000303150403654440015457 0ustar00ri/1.8/system/REXML/XPathParser/%5b%5d%3d-i.yaml000064400000000304150403654440014361 0ustar00ri/1.8/system/REXML/entity_expansion_text_limit-c.yaml000064400000000471150403654440016654 0ustar00ri/1.8/system/REXML/CData/new-c.yaml000064400000001061150403654440012553 0ustar00ri/1.8/system/REXML/CData/cdesc-CData.yaml000064400000001201150403654440013571 0ustar00ri/1.8/system/REXML/CData/write-i.yaml000064400000002017150403654450013125 0ustar00ri/1.8/system/REXML/CData/to_s-i.yaml000064400000000654150403654450012744 0ustar00ri/1.8/system/REXML/CData/clone-i.yaml000064400000000656150403654450013102 0ustar00ri/1.8/system/REXML/CData/value-i.yaml000064400000000252150403654450013106 0ustar00ri/1.8/system/REXML/ParseException/context-i.yaml000064400000000267150403654460015442 0ustar00ri/1.8/system/REXML/ParseException/line-i.yaml000064400000000261150403654460014677 0ustar00ri/1.8/system/REXML/ParseException/position-i.yaml000064400000000271150403654460015615 0ustar00ri/1.8/system/REXML/ParseException/new-c.yaml000064400000000337150403654460014537 0ustar00ri/1.8/system/REXML/ParseException/to_s-i.yaml000064400000000261150403654460014714 0ustar00ri/1.8/system/REXML/ParseException/cdesc-ParseException.yaml000064400000001221150403654460017527 0ustar00ri/1.8/system/REXML/DTD/cdesc-DTD.yaml000064400000000264150403654470012702 0ustar00ri/1.8/system/REXML/DTD/ElementDecl/cdesc-ElementDecl.yaml000064400000001166150403654470016633 0ustar00ri/1.8/system/REXML/DTD/ElementDecl/new-c.yaml000064400000000433150403654470014400 0ustar00ri/1.8/system/REXML/DTD/EntityDecl/parse_source-c.yaml000064400000000322150403654500016153 0ustar00ri/1.8/system/REXML/DTD/EntityDecl/new-c.yaml000064400000000452150403654500014256 0ustar00ri/1.8/system/REXML/DTD/EntityDecl/write-i.yaml000064400000000304150403654500014621 0ustar00ri/1.8/system/REXML/DTD/EntityDecl/to_s-i.yaml000064400000000262150403654500014436 0ustar00ri/1.8/system/REXML/DTD/EntityDecl/cdesc-EntityDecl.yaml000064400000002055150403654510016372 0ustar00ri/1.8/system/REXML/DTD/AttlistDecl/cdesc-AttlistDecl.yaml000064400000000712150403654510016710 0ustar00ri/1.8/system/REXML/DTD/NotationDecl/cdesc-NotationDecl.yaml000064400000001454150403654520017233 0ustar00ri/1.8/system/REXML/DTD/NotationDecl/parse_source-c.yaml000064400000000324150403654520016476 0ustar00ri/1.8/system/REXML/DTD/NotationDecl/new-c.yaml000064400000000265150403654520014601 0ustar00ri/1.8/system/REXML/DTD/NotationDecl/write-i.yaml000064400000000306150403654520015144 0ustar00ri/1.8/system/REXML/DTD/NotationDecl/to_s-i.yaml000064400000000264150403654520014761 0ustar00ri/1.8/system/REXML/DTD/Parser/parse-c.yaml000064400000000267150403654520013775 0ustar00ri/1.8/system/REXML/DTD/Parser/cdesc-Parser.yaml000064400000000451150403654520014751 0ustar00ri/1.8/system/REXML/DTD/Parser/parse_helper-c.yaml000064400000000412150403654520015324 0ustar00ri/1.8/system/REXML/ElementDecl/cdesc-ElementDecl.yaml000064400000000372150403654520016212 0ustar00ri/1.8/system/REXML/ElementDecl/new-c.yaml000064400000000261150403654520013760 0ustar00ri/1.8/system/REXML/IOSource/cdesc-IOSource.yaml000064400000001264150403654520015031 0ustar00ri/1.8/system/REXML/IOSource/empty%3f-i.yaml000064400000000257150403654520014145 0ustar00ri/1.8/system/REXML/IOSource/current_line-i.yaml000064400000000410150403654520015171 0ustar00ri/1.8/system/REXML/IOSource/read-i.yaml000064400000000253150403654520013420 0ustar00ri/1.8/system/REXML/IOSource/position-i.yaml000064400000000263150403654520014352 0ustar00ri/1.8/system/REXML/IOSource/consume-i.yaml000064400000000272150403654520014157 0ustar00ri/1.8/system/REXML/IOSource/match-i.yaml000064400000000302150403654520013574 0ustar00ri/1.8/system/REXML/IOSource/scan-i.yaml000064400000000276150403654530013437 0ustar00ri/1.8/system/REXML/IOSource/new-c.yaml000064400000000415150403654530013271 0ustar00ri/1.8/system/REXML/Attribute/cdesc-Attribute.yaml000064400000003303150403654530015554 0ustar00ri/1.8/system/REXML/Attribute/prefix-i.yaml000064400000001331150403654530014254 0ustar00ri/1.8/system/REXML/Attribute/namespace-i.yaml000064400000000764150403654530014724 0ustar00ri/1.8/system/REXML/Attribute/hash-i.yaml000064400000000412150403654530013701 0ustar00ri/1.8/system/REXML/Attribute/element%3d-i.yaml000064400000000572150403654530014712 0ustar00ri/1.8/system/REXML/Attribute/remove-i.yaml000064400000000552150403654530014260 0ustar00ri/1.8/system/REXML/Attribute/inspect-i.yaml000064400000000262150403654530014426 0ustar00ri/1.8/system/REXML/Attribute/new-c.yaml000064400000002612150403654530013545 0ustar00ri/1.8/system/REXML/Attribute/node_type-i.yaml000064400000000266150403654530014753 0ustar00ri/1.8/system/REXML/Attribute/write-i.yaml000064400000000454150403654530014116 0ustar00ri/1.8/system/REXML/Attribute/to_s-i.yaml000064400000000404150403654530013723 0ustar00ri/1.8/system/REXML/Attribute/%3d%3d-i.yaml000064400000000453150403654530013632 0ustar00ri/1.8/system/REXML/Attribute/clone-i.yaml000064400000000363150403654530014063 0ustar00ri/1.8/system/REXML/Attribute/to_string-i.yaml000064400000001007150403654530014767 0ustar00ri/1.8/system/REXML/Attribute/xpath-i.yaml000064400000000256150403654530014110 0ustar00ri/1.8/system/REXML/Attribute/value-i.yaml000064400000000471150403654530014077 0ustar00ri/1.8/system/REXML/Entity/unnormalized-i.yaml000064400000000650150403654540015003 0ustar00ri/1.8/system/REXML/Entity/new-c.yaml000064400000001556150403654550013066 0ustar00ri/1.8/system/REXML/Entity/matches%3f-c.yaml000064400000000506150403654550014211 0ustar00ri/1.8/system/REXML/Entity/write-i.yaml000064400000001157150403654550013432 0ustar00ri/1.8/system/REXML/Entity/normalized-i.yaml000064400000000542150403654550014441 0ustar00ri/1.8/system/REXML/Entity/to_s-i.yaml000064400000000373150403654550013243 0ustar00ri/1.8/system/REXML/Entity/cdesc-Entity.yaml000064400000004775150403654550014416 0ustar00ri/1.8/system/REXML/Entity/value-i.yaml000064400000001276150403654550013416 0ustar00ri/1.8/system/REXML/StreamListener/entity-i.yaml000064400000000466150403654550015303 0ustar00ri/1.8/system/REXML/StreamListener/tag_end-i.yaml000064400000000552150403654550015364 0ustar00ri/1.8/system/REXML/StreamListener/entitydecl-i.yaml000064400000003206150403654550016126 0ustar00ri/1.8/system/REXML/StreamListener/doctype-i.yaml000064400000001236150403654550015432 0ustar00ri/1.8/system/REXML/StreamListener/attlistdecl-i.yaml000064400000001057150403654550016300 0ustar00ri/1.8/system/REXML/StreamListener/xmldecl-i.yaml000064400000001063150403654550015411 0ustar00ri/1.8/system/REXML/StreamListener/elementdecl-i.yaml000064400000000401150403654550016235 0ustar00ri/1.8/system/REXML/StreamListener/instruction-i.yaml000064400000000721150403654550016342 0ustar00ri/1.8/system/REXML/StreamListener/cdata-i.yaml000064400000000473150403654550015041 0ustar00ri/1.8/system/REXML/StreamListener/comment-i.yaml000064400000000456150403654550015430 0ustar00ri/1.8/system/REXML/StreamListener/cdesc-StreamListener.yaml000064400000002225150403654550017554 0ustar00ri/1.8/system/REXML/StreamListener/notationdecl-i.yaml000064400000000404150403654550016442 0ustar00ri/1.8/system/REXML/StreamListener/doctype_end-i.yaml000064400000000403150403654550016253 0ustar00ri/1.8/system/REXML/StreamListener/text-i.yaml000064400000000443150403654550014746 0ustar00ri/1.8/system/REXML/StreamListener/tag_start-i.yaml000064400000001100150403654550015741 0ustar00ri/1.8/system/REXML/QuickPath/first-c.yaml000064400000000322150403654550014027 0ustar00ri/1.8/system/REXML/QuickPath/cdesc-QuickPath.yaml000064400000001627150403654550015441 0ustar00ri/1.8/system/REXML/QuickPath/parse_args-c.yaml000064400000000311150403654550015024 0ustar00ri/1.8/system/REXML/QuickPath/attribute-c.yaml000064400000000274150403654550014711 0ustar00ri/1.8/system/REXML/QuickPath/axe-c.yaml000064400000000304150403654550013455 0ustar00ri/1.8/system/REXML/QuickPath/filter-c.yaml000064400000000604150403654560014171 0ustar00ri/1.8/system/REXML/QuickPath/predicate-c.yaml000064400000002231150403654560014642 0ustar00ri/1.8/system/REXML/QuickPath/method_missing-c.yaml000064400000000313150403654560015712 0ustar00ri/1.8/system/REXML/QuickPath/function-c.yaml000064400000000313150403654560014526 0ustar00ri/1.8/system/REXML/QuickPath/match-c.yaml000064400000000322150403654560013775 0ustar00ri/1.8/system/REXML/QuickPath/each-c.yaml000064400000000330150403654560013600 0ustar00ri/1.8/system/REXML/QuickPath/name-c.yaml000064400000000254150403654560013625 0ustar00ri/1.8/system/REXML/Output/cdesc-Output.yaml000064400000000667150403654560014463 0ustar00ri/1.8/system/REXML/Output/new-c.yaml000064400000000301150403654560013076 0ustar00ri/1.8/system/REXML/Output/%3c%3c-i.yaml000064400000000260150403654560013164 0ustar00ri/1.8/system/REXML/Output/to_s-i.yaml000064400000000251150403654560013263 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/entity-i.yaml000064400000000317150403654560016004 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/empty%3f-i.yaml000064400000000407150403654560016124 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/stream%3d-i.yaml000064400000000304150403654560016253 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/peek-i.yaml000064400000001171150403654560015413 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/position-i.yaml000064400000000276150403654560016340 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/add_listener-i.yaml000064400000000320150403654560017117 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/cdesc-BaseParser.yaml000064400000021013150403654560017344 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/normalize-i.yaml000064400000000452150403654560016470 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/unshift-i.yaml000064400000000503150403654560016145 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/new-c.yaml000064400000000274150403654560015255 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/unnormalize-i.yaml000064400000000452150403654560017033 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/has_next%3f-i.yaml000064400000000443150403654560016577 0ustar00ri/1.8/system/REXML/Parsers/BaseParser/pull-i.yaml000064400000000427150403654560015446 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/parse_args-i.yaml000064400000000314150403654560016765 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/MultiplicativeExpr-i.yaml000064400000000515150403654560020474 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/LocationPath-i.yaml000064400000000607150403654560017231 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/AdditiveExpr-i.yaml000064400000000477150403654560017241 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/AndExpr-i.yaml000064400000000440150403654560016200 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/EqualityExpr-i.yaml000064400000000466150403654560017303 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/get_group-i.yaml000064400000000433150403654560016634 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/predicate-i.yaml000064400000000305150403654560016577 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/parse-i.yaml000064400000000275150403654560015757 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/abbreviate-i.yaml000064400000000311150403654560016740 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/NodeTest-i.yaml000064400000000314150403654560016364 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/predicate_to_string-i.yaml000064400000000370150403654560020671 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/FilterExpr-i.yaml000064400000000433150403654560016725 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/PrimaryExpr-i.yaml000064400000000322150403654560017120 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/UnionExpr-i.yaml000064400000000430150403654560016565 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/Predicate-i.yaml000064400000000443150403654560016542 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/FunctionCall-i.yaml000064400000000452150403654560017223 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/RelationalExpr-i.yaml000064400000000521150403654560017570 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/namespaces%3d-i.yaml000064400000000321150403654560017250 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/cdesc-XPathParser.yaml000064400000007363150403654560017704 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/UnaryExpr-i.yaml000064400000000420150403654560016572 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/expand-i.yaml000064400000000301150403654560016112 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/RelativeLocationPath-i.yaml000064400000000344150403654560020723 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/PathExpr-i.yaml000064400000000460150403654560016374 0ustar00ri/1.8/system/REXML/Parsers/XPathParser/OrExpr-i.yaml000064400000000422150403654560016056 0ustar00ri/1.8/system/REXML/Parsers/UltraLightParser/parse-i.yaml000064400000000276150403654560017013 0ustar00ri/1.8/system/REXML/Parsers/UltraLightParser/add_listener-i.yaml000064400000000326150403654560020332 0ustar00ri/1.8/system/REXML/Parsers/UltraLightParser/rewind-i.yaml000064400000000300150403654560017155 0ustar00ri/1.8/system/REXML/Parsers/UltraLightParser/new-c.yaml000064400000000300150403654560016450 0ustar00ri/1.8/system/REXML/Parsers/UltraLightParser/cdesc-UltraLightParser.yaml000064400000000635150403654560021765 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/%5b%5d-i.yaml000064400000000303150403654560015223 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/instruction%3f-i.yaml000064400000000404150403654560017233 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/end_element%3f-i.yaml000064400000000410150403654560017126 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/xmldecl%3f-i.yaml000064400000000443150403654560016305 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/elementdecl%3f-i.yaml000064400000000404150403654560017133 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/cdata%3f-i.yaml000064400000000370150403654560015730 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/entitydecl%3f-i.yaml000064400000001252150403654560017020 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/inspect-i.yaml000064400000000273150403654560016025 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/entity%3f-i.yaml000064400000000372150403654560016172 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/new-c.yaml000064400000000633150403654570015144 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/attlistdecl%3f-i.yaml000064400000000404150403654570017167 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/text%3f-i.yaml000064400000000424150403654570015641 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/start_element%3f-i.yaml000064400000000435150403654570017525 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/cdesc-PullEvent.yaml000064400000002673150403654570017136 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/notationdecl%3f-i.yaml000064400000000406150403654570017340 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/error%3f-i.yaml000064400000000271150403654570016006 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/comment%3f-i.yaml000064400000000374150403654570016323 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/doctype%3f-i.yaml000064400000000452150403654570016325 0ustar00ri/1.8/system/REXML/Parsers/PullEvent/event_type-i.yaml000064400000000301150403654570016533 0ustar00ri/1.8/system/REXML/Parsers/LightParser/parse-i.yaml000064400000000271150403654570015777 0ustar00ri/1.8/system/REXML/Parsers/LightParser/add_listener-i.yaml000064400000000321150403654570017316 0ustar00ri/1.8/system/REXML/Parsers/LightParser/rewind-i.yaml000064400000000273150403654570016157 0ustar00ri/1.8/system/REXML/Parsers/LightParser/new-c.yaml000064400000000273150403654570015452 0ustar00ri/1.8/system/REXML/Parsers/LightParser/cdesc-LightParser.yaml000064400000000623150403654570017743 0ustar00ri/1.8/system/REXML/Parsers/cdesc-Parsers.yaml000064400000000274150403654570014714 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/deafen-i.yaml000064400000000317150403654570015556 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/source-i.yaml000064400000000272150403654570015634 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/parse-i.yaml000064400000000270150403654570015444 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/cdesc-SAX2Parser.yaml000064400000001445150403654570017062 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/add_listener-i.yaml000064400000000320150403654570016763 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/add-i.yaml000064400000000273150403654570015065 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/new-c.yaml000064400000000272150403654570015117 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/get_listeners-i.yaml000064400000000327150403654570017204 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/handle-i.yaml000064400000000317150403654570015567 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/listen-i.yaml000064400000003425150403654570015635 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/get_namespace-i.yaml000064400000000321150403654570017122 0ustar00ri/1.8/system/REXML/Parsers/SAX2Parser/get_procs-i.yaml000064400000000476150403654570016327 0ustar00ri/1.8/system/REXML/Parsers/PullParser/each-i.yaml000064400000000321150403654570015426 0ustar00ri/1.8/system/REXML/Parsers/PullParser/peek-i.yaml000064400000000275150403654570015462 0ustar00ri/1.8/system/REXML/Parsers/PullParser/cdesc-PullParser.yaml000064400000002705150403654570017460 0ustar00ri/1.8/system/REXML/Parsers/PullParser/add_listener-i.yaml000064400000000320150403654570017162 0ustar00ri/1.8/system/REXML/Parsers/PullParser/unshift-i.yaml000064400000000301150403654570016204 0ustar00ri/1.8/system/REXML/Parsers/PullParser/new-c.yaml000064400000000272150403654570015316 0ustar00ri/1.8/system/REXML/Parsers/PullParser/pull-i.yaml000064400000000266150403654570015512 0ustar00ri/1.8/system/REXML/Parsers/StreamParser/parse-i.yaml000064400000000272150403654570016164 0ustar00ri/1.8/system/REXML/Parsers/StreamParser/add_listener-i.yaml000064400000000322150403654570017503 0ustar00ri/1.8/system/REXML/Parsers/StreamParser/new-c.yaml000064400000000306150403654570015633 0ustar00ri/1.8/system/REXML/Parsers/StreamParser/cdesc-StreamParser.yaml000064400000000544150403654570020315 0ustar00ri/1.8/system/REXML/Parsers/TreeParser/cdesc-TreeParser.yaml000064400000000540150403654570017421 0ustar00ri/1.8/system/REXML/Parsers/TreeParser/parse-i.yaml000064400000000270150403654570015626 0ustar00ri/1.8/system/REXML/Parsers/TreeParser/add_listener-i.yaml000064400000000320150403654570017145 0ustar00ri/1.8/system/REXML/Parsers/TreeParser/new-c.yaml000064400000000332150403654570015276 0ustar00ri/1.8/system/REXML/DocType/context-i.yaml000064400000000260150403654570014053 0ustar00ri/1.8/system/REXML/DocType/system-i.yaml000064400000000551150403654570013716 0ustar00ri/1.8/system/REXML/DocType/entity-i.yaml000064400000000264150403654570013707 0ustar00ri/1.8/system/REXML/DocType/add-i.yaml000064400000000255150403654570013123 0ustar00ri/1.8/system/REXML/DocType/attributes_of-i.yaml000064400000000303150403654570015237 0ustar00ri/1.8/system/REXML/DocType/new-c.yaml000064400000001363150403654570013157 0ustar00ri/1.8/system/REXML/DocType/cdesc-DocType.yaml000064400000004574150403654570014603 0ustar00ri/1.8/system/REXML/DocType/node_type-i.yaml000064400000000264150403654570014361 0ustar00ri/1.8/system/REXML/DocType/write-i.yaml000064400000001336150403654570013526 0ustar00ri/1.8/system/REXML/DocType/notations-i.yaml000064400000000676150403654570014420 0ustar00ri/1.8/system/REXML/DocType/public-i.yaml000064400000000552150403654570013651 0ustar00ri/1.8/system/REXML/DocType/clone-i.yaml000064400000000254150403654570013472 0ustar00ri/1.8/system/REXML/DocType/attribute_of-i.yaml000064400000000314150403654600015050 0ustar00ri/1.8/system/REXML/DocType/notation-i.yaml000064400000000607150403654600014221 0ustar00ri/1.8/system/REXML/DocType/strip_quotes-i.yaml000064400000000424150403654600015124 0ustar00ri/1.8/system/REXML/Formatters/Pretty/write_text-i.yaml000064400000000322150403654600016624 0ustar00ri/1.8/system/REXML/Formatters/Pretty/indent_text-i.yaml000064400000000365150403654600016762 0ustar00ri/1.8/system/REXML/Formatters/Pretty/new-c.yaml000064400000001636150403654600015222 0ustar00ri/1.8/system/REXML/Formatters/Pretty/wrap-i.yaml000064400000000303150403654600015376 0ustar00ri/1.8/system/REXML/Formatters/Pretty/write_element-i.yaml000064400000000326150403654600017275 0ustar00ri/1.8/system/REXML/Formatters/Pretty/cdesc-Pretty.yaml000064400000002303150403654600016547 0ustar00ri/1.8/system/REXML/Formatters/Pretty/write_document-i.yaml000064400000000332150403654600017457 0ustar00ri/1.8/system/REXML/Formatters/Pretty/write_cdata-i.yaml000064400000000323150403654600016715 0ustar00ri/1.8/system/REXML/Formatters/Pretty/write_comment-i.yaml000064400000000327150403654600017307 0ustar00ri/1.8/system/REXML/Formatters/Transitive/write_text-i.yaml000064400000000326150403654600017471 0ustar00ri/1.8/system/REXML/Formatters/Transitive/new-c.yaml000064400000000306150403654600016054 0ustar00ri/1.8/system/REXML/Formatters/Transitive/write_element-i.yaml000064400000000334150403654600020135 0ustar00ri/1.8/system/REXML/Formatters/Transitive/cdesc-Transitive.yaml000064400000001703150403654600020254 0ustar00ri/1.8/system/REXML/Formatters/cdesc-Formatters.yaml000064400000000302150403654600016114 0ustar00ri/1.8/system/REXML/Formatters/Default/write_text-i.yaml000064400000000323150403654600016722 0ustar00ri/1.8/system/REXML/Formatters/Default/new-c.yaml000064400000001041150403654600015305 0ustar00ri/1.8/system/REXML/Formatters/Default/write-i.yaml000064400000001070150403654600015656 0ustar00ri/1.8/system/REXML/Formatters/Default/write_instruction-i.yaml000064400000000341150403654600020317 0ustar00ri/1.8/system/REXML/Formatters/Default/write_element-i.yaml000064400000000331150403654600017366 0ustar00ri/1.8/system/REXML/Formatters/Default/cdesc-Default.yaml000064400000001166150403654610016750 0ustar00ri/1.8/system/REXML/Formatters/Default/write_document-i.yaml000064400000000333150403654610017556 0ustar00ri/1.8/system/REXML/Formatters/Default/write_cdata-i.yaml000064400000000325150403654610017015 0ustar00ri/1.8/system/REXML/Formatters/Default/write_comment-i.yaml000064400000000331150403654610017400 0ustar00ri/1.8/system/REXML/SyncEnumerator/size-i.yaml000064400000000445150403654610014750 0ustar00ri/1.8/system/REXML/SyncEnumerator/each-i.yaml000064400000000435150403654610014675 0ustar00ri/1.8/system/REXML/SyncEnumerator/cdesc-SyncEnumerator.yaml000064400000000672150403654610017607 0ustar00ri/1.8/system/REXML/SyncEnumerator/new-c.yaml000064400000000451150403654610014556 0ustar00ri/1.8/system/REXML/SyncEnumerator/length-i.yaml000064400000000451150403654610015254 0ustar00ri/1.8/system/REXML/XMLDecl/dowrite-i.yaml000064400000000260150403654610013720 0ustar00ri/1.8/system/REXML/XMLDecl/content-i.yaml000064400000000264150403654610013721 0ustar00ri/1.8/system/REXML/XMLDecl/xmldecl-i.yaml000064400000000315150403654610013674 0ustar00ri/1.8/system/REXML/XMLDecl/cdesc-XMLDecl.yaml000064400000003034150403654610014326 0ustar00ri/1.8/system/REXML/XMLDecl/inspect-i.yaml000064400000000260150403654610013710 0ustar00ri/1.8/system/REXML/XMLDecl/new-c.yaml000064400000000335150403654610013031 0ustar00ri/1.8/system/REXML/XMLDecl/default-c.yaml000064400000000755150403654610013672 0ustar00ri/1.8/system/REXML/XMLDecl/node_type-i.yaml000064400000000264150403654610014235 0ustar00ri/1.8/system/REXML/XMLDecl/write-i.yaml000064400000001046150403654610013400 0ustar00ri/1.8/system/REXML/XMLDecl/%3d%3d-i.yaml000064400000000255150403654610013116 0ustar00ri/1.8/system/REXML/XMLDecl/clone-i.yaml000064400000000254150403654610013346 0ustar00ri/1.8/system/REXML/XMLDecl/encoding%3d-i.yaml000064400000000271150403654610014327 0ustar00ri/1.8/system/REXML/XMLDecl/nowrite-i.yaml000064400000000260150403654610013732 0ustar00ri/1.8/system/REXML/Namespace/name%3d-i.yaml000064400000000374150403654610014131 0ustar00ri/1.8/system/REXML/Namespace/fully_expanded_name-i.yaml000064400000000475150403654610016722 0ustar00ri/1.8/system/REXML/Namespace/has_name%3f-i.yaml000064400000000423150403654610014761 0ustar00ri/1.8/system/REXML/Namespace/cdesc-Namespace.yaml000064400000002001150403654610015427 0ustar00ri/1.8/system/REXML/Elements/size-i.yaml000064400000000776150403654610013555 0ustar00ri/1.8/system/REXML/Elements/%5b%5d-i.yaml000064400000003252150403654610013444 0ustar00ri/1.8/system/REXML/Elements/empty%3f-i.yaml000064400000000455150403654610014231 0ustar00ri/1.8/system/REXML/Elements/each-i.yaml000064400000002372150403654610013475 0ustar00ri/1.8/system/REXML/Elements/to_a-i.yaml000064400000001411150403654610013510 0ustar00ri/1.8/system/REXML/Elements/literalize-i.yaml000064400000000431150403654610014733 0ustar00ri/1.8/system/REXML/Elements/delete-i.yaml000064400000001746150403654610014043 0ustar00ri/1.8/system/REXML/Elements/collect-i.yaml000064400000000321150403654610014212 0ustar00ri/1.8/system/REXML/Elements/index-i.yaml000064400000000710150403654610013676 0ustar00ri/1.8/system/REXML/Elements/add-i.yaml000064400000001511150403654610013317 0ustar00ri/1.8/system/REXML/Elements/new-c.yaml000064400000000552150403654610013356 0ustar00ri/1.8/system/REXML/Elements/%3c%3c-i.yaml000064400000000351150403654610013435 0ustar00ri/1.8/system/REXML/Elements/cdesc-Elements.yaml000064400000002336150403654610015202 0ustar00ri/1.8/system/REXML/Elements/inject-i.yaml000064400000000360150403654610014044 0ustar00ri/1.8/system/REXML/Elements/%5b%5d%3d-i.yaml000064400000002154150403654610013740 0ustar00ri/1.8/system/REXML/Elements/delete_all-i.yaml000064400000001456150403654610014671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes multiple elements. Filters for Element children, regardless of XPath matching.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "xpath:"
    body: all elements matching this String path are removed.
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: an Array of Elements that have been removed
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new '&lt;a&gt;&lt;c/&gt;&lt;c/&gt;&lt;c/&gt;&lt;c/&gt;&lt;/a&gt;'\n deleted = doc.elements.delete_all 'a/c' #-&gt; [&lt;c/&gt;, &lt;c/&gt;, &lt;c/&gt;, &lt;c/&gt;]\n"
full_name: REXML::Elements#delete_all
is_singleton: false
name: delete_all
params: ( xpath )
visibility: public
ri/1.8/system/REXML/Encoding/apply-c.yaml000064400000000265150403654610013665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding::apply
is_singleton: true
name: apply
params: (obj, enc)
visibility: public
ri/1.8/system/REXML/Encoding/encoding_method-c.yaml000064400000000304150403654610015660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding::encoding_method
is_singleton: true
name: encoding_method
params: (enc)
visibility: public
ri/1.8/system/REXML/Encoding/encode_ascii-i.yaml000064400000000371150403654610015151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert from UTF-8
full_name: REXML::Encoding#encode_ascii
is_singleton: false
name: encode_ascii
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/decode_unile-i.yaml000064400000000276150403654610015167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#decode_unile
is_singleton: false
name: decode_unile
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/register-c.yaml000064400000000276150403654610014366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding::register
is_singleton: true
name: register
params: (enc, &block)
visibility: public
ri/1.8/system/REXML/Encoding/encode_utf8-i.yaml000064400000000300150403654610014737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#encode_utf8
is_singleton: false
name: encode_utf8
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/decode_eucjp-i.yaml000064400000000276150403654610015161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#decode_eucjp
is_singleton: false
name: decode_eucjp
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/decode_ascii-i.yaml000064400000000363150403654610015140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert to UTF-8
full_name: REXML::Encoding#decode_ascii
is_singleton: false
name: decode_ascii
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/encode_sjis-i.yaml000064400000000300150403654610015021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#encode_sjis
is_singleton: false
name: encode_sjis
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/from_iso_8859_15-i.yaml000064400000000373150403654610015365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert to UTF-8
full_name: REXML::Encoding#from_iso_8859_15
is_singleton: false
name: from_iso_8859_15
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/decode_utf8-i.yaml000064400000000274150403654610014737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#decode_utf8
is_singleton: false
name: decode_utf8
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/encode_unile-i.yaml000064400000000302150403654620015170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#encode_unile
is_singleton: false
name: encode_unile
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/decode_utf16-i.yaml000064400000000276150403654620015021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#decode_utf16
is_singleton: false
name: decode_utf16
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/encode_utf16-i.yaml000064400000000302150403654620015021 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#encode_utf16
is_singleton: false
name: encode_utf16
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/decode_sjis-i.yaml000064400000000274150403654620015022 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#decode_sjis
is_singleton: false
name: decode_sjis
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/decode_iconv-i.yaml000064400000000276150403654620015172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#decode_iconv
is_singleton: false
name: decode_iconv
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/encode_eucjp-i.yaml000064400000000302150403654620015162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#encode_eucjp
is_singleton: false
name: encode_eucjp
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/decode_cp1252-i.yaml000064400000000365150403654620014767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert to UTF-8
full_name: REXML::Encoding#decode_cp1252
is_singleton: false
name: decode_cp1252
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/encode_iconv-i.yaml000064400000000302150403654620015172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#encode_iconv
is_singleton: false
name: encode_iconv
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/to_iso_8859_15-i.yaml000064400000000375150403654620015047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert from UTF-8
full_name: REXML::Encoding#to_iso_8859_15
is_singleton: false
name: to_iso_8859_15
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/encode_cp1252-i.yaml000064400000000373150403654620015000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert from UTF-8
full_name: REXML::Encoding#encode_cp1252
is_singleton: false
name: encode_cp1252
params: (content)
visibility: public
ri/1.8/system/REXML/Encoding/cdesc-Encoding.yaml000064400000004631150403654620015127 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: ID ---&gt; Encoding name
  name: encoding
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: apply
- !ruby/object:RI::MethodSummary 
  name: encoding_method
- !ruby/object:RI::MethodSummary 
  name: register
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Native, default format is UTF-8, so it is declared here rather than in an encodings/ definition.
  name: UTF_8
  value: "'UTF-8'"
- !ruby/object:RI::Constant 
  comment: 
  name: UTF_16
  value: "'UTF-16'"
- !ruby/object:RI::Constant 
  comment: 
  name: UNILE
  value: "'UNILE'"
- !ruby/object:RI::Constant 
  comment: 
  name: SJISTOU8
  value: "'-Swm0x'"
- !ruby/object:RI::Constant 
  comment: 
  name: U8TOSJIS
  value: "'-Wsm0x'"
- !ruby/object:RI::Constant 
  comment: 
  name: EUCTOU8
  value: "'-Ewm0'"
- !ruby/object:RI::Constant 
  comment: 
  name: U8TOEUC
  value: "'-Wem0'"
full_name: REXML::Encoding
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_encoding
- !ruby/object:RI::MethodSummary 
  name: decode_ascii
- !ruby/object:RI::MethodSummary 
  name: decode_cp1252
- !ruby/object:RI::MethodSummary 
  name: decode_eucjp
- !ruby/object:RI::MethodSummary 
  name: decode_eucjp
- !ruby/object:RI::MethodSummary 
  name: decode_iconv
- !ruby/object:RI::MethodSummary 
  name: decode_sjis
- !ruby/object:RI::MethodSummary 
  name: decode_sjis
- !ruby/object:RI::MethodSummary 
  name: decode_unile
- !ruby/object:RI::MethodSummary 
  name: decode_utf16
- !ruby/object:RI::MethodSummary 
  name: decode_utf8
- !ruby/object:RI::MethodSummary 
  name: encode_ascii
- !ruby/object:RI::MethodSummary 
  name: encode_cp1252
- !ruby/object:RI::MethodSummary 
  name: encode_eucjp
- !ruby/object:RI::MethodSummary 
  name: encode_eucjp
- !ruby/object:RI::MethodSummary 
  name: encode_iconv
- !ruby/object:RI::MethodSummary 
  name: encode_sjis
- !ruby/object:RI::MethodSummary 
  name: encode_sjis
- !ruby/object:RI::MethodSummary 
  name: encode_unile
- !ruby/object:RI::MethodSummary 
  name: encode_utf16
- !ruby/object:RI::MethodSummary 
  name: encode_utf8
- !ruby/object:RI::MethodSummary 
  name: encoding=
- !ruby/object:RI::MethodSummary 
  name: from_iso_8859_15
- !ruby/object:RI::MethodSummary 
  name: to_iso_8859_15
name: Encoding
superclass: 
ri/1.8/system/REXML/Encoding/check_encoding-i.yaml000064400000000302150403654620015462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#check_encoding
is_singleton: false
name: check_encoding
params: (str)
visibility: public
ri/1.8/system/REXML/Encoding/encoding%3d-i.yaml000064400000000272150403654620014627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Encoding#encoding=
is_singleton: false
name: encoding=
params: ( enc )
visibility: public
ri/1.8/system/REXML/Light/Node/namespace%3d-i.yaml000064400000000305150403654620015200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#namespace=
is_singleton: false
name: namespace=
params: ( namespace )
visibility: public
ri/1.8/system/REXML/Light/Node/size-i.yaml000064400000000256150403654620013727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/REXML/Light/Node/%5b%5d-i.yaml000064400000000277150403654620013631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#[]
is_singleton: false
name: "[]"
params: ( reference, ns=nil )
visibility: public
ri/1.8/system/REXML/Light/Node/%3d%7e-i.yaml000064400000000260150403654620013624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#=~
is_singleton: false
name: =~
params: ( path )
visibility: public
ri/1.8/system/REXML/Light/Node/each-i.yaml000064400000000322150403654620013647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ( at(x+4) )
comment: 
full_name: REXML::Light::Node#each
is_singleton: false
name: each
params: ( &block ) {|at(x+4 )| ...}
visibility: public
ri/1.8/system/REXML/Light/Node/namespace_of-i.yaml000064400000000321150403654620015366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#namespace_of
is_singleton: false
name: namespace_of
params: ( node, prefix=nil )
visibility: private
ri/1.8/system/REXML/Light/Node/prefix-i.yaml000064400000000301150403654620014241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#prefix
is_singleton: false
name: prefix
params: ( namespace=nil )
visibility: public
ri/1.8/system/REXML/Light/Node/namespace-i.yaml000064400000000311150403654620014701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#namespace
is_singleton: false
name: namespace
params: ( prefix=prefix() )
visibility: public
ri/1.8/system/REXML/Light/Node/parent%3d-i.yaml000064400000000272150403654620014540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#parent=
is_singleton: false
name: parent=
params: ( node )
visibility: public
ri/1.8/system/REXML/Light/Node/root-i.yaml000064400000000256150403654620013740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#root
is_singleton: false
name: root
params: ()
visibility: public
ri/1.8/system/REXML/Light/Node/name%3d-i.yaml000064400000000302150403654620014161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#name=
is_singleton: false
name: name=
params: ( name_str, ns=nil )
visibility: public
ri/1.8/system/REXML/Light/Node/has_name%3f-i.yaml000064400000000316150403654620015023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#has_name?
is_singleton: false
name: has_name?
params: ( name, namespace = '' )
visibility: public
ri/1.8/system/REXML/Light/Node/prefix_of-i.yaml000064400000000316150403654620014733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#prefix_of
is_singleton: false
name: prefix_of
params: ( node, namespace=nil )
visibility: private
ri/1.8/system/REXML/Light/Node/new-c.yaml000064400000000356150403654620013541 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new element.
full_name: REXML::Light::Node::new
is_singleton: true
name: new
params: (node=nil)
visibility: public
ri/1.8/system/REXML/Light/Node/text%3d-i.yaml000064400000000265150403654620014235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#text=
is_singleton: false
name: text=
params: ( foo )
visibility: public
ri/1.8/system/REXML/Light/Node/children-i.yaml000064400000000266150403654620014546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#children
is_singleton: false
name: children
params: ()
visibility: public
ri/1.8/system/REXML/Light/Node/node_type-i.yaml000064400000000270150403654620014737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#node_type
is_singleton: false
name: node_type
params: ()
visibility: public
ri/1.8/system/REXML/Light/Node/cdesc-Node.yaml000064400000003444150403654620014475 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents a tagged XML element. Elements are characterized by having children, attributes, and names, and can themselves be children.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: NAMESPLIT
  value: /^(?:(#{XMLTokens::NCNAME_STR}):)?(#{XMLTokens::NCNAME_STR})/u
- !ruby/object:RI::Constant 
  comment: 
  name: PARENTS
  value: "[ :element, :document, :doctype ]"
full_name: REXML::Light::Node
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: =~
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: children
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: has_name?
- !ruby/object:RI::MethodSummary 
  name: local_name
- !ruby/object:RI::MethodSummary 
  name: local_name=
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: name=
- !ruby/object:RI::MethodSummary 
  name: namespace
- !ruby/object:RI::MethodSummary 
  name: namespace=
- !ruby/object:RI::MethodSummary 
  name: namespace_of
- !ruby/object:RI::MethodSummary 
  name: namesplit
- !ruby/object:RI::MethodSummary 
  name: node_type
- !ruby/object:RI::MethodSummary 
  name: parent
- !ruby/object:RI::MethodSummary 
  name: parent=
- !ruby/object:RI::MethodSummary 
  name: prefix
- !ruby/object:RI::MethodSummary 
  name: prefix_of
- !ruby/object:RI::MethodSummary 
  name: root
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: text=
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Node
superclass: Object
ri/1.8/system/REXML/Light/Node/%3c%3c-i.yaml000064400000000743150403654620013623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Append a child to this element, optionally under a provided namespace. The namespace argument is ignored if the element argument is an Element object. Otherwise, the element argument is a string, the namespace (if provided) is the namespace the element is created in.
full_name: REXML::Light::Node#<<
is_singleton: false
name: "<<"
params: (element)
visibility: public
ri/1.8/system/REXML/Light/Node/local_name-i.yaml000064400000000272150403654620015045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#local_name
is_singleton: false
name: local_name
params: ()
visibility: public
ri/1.8/system/REXML/Light/Node/to_s-i.yaml000064400000000256150403654620013721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/REXML/Light/Node/name-i.yaml000064400000000256150403654620013675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#name
is_singleton: false
name: name
params: ()
visibility: public
ri/1.8/system/REXML/Light/Node/namesplit-i.yaml000064400000000271150403654620014746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#namesplit
is_singleton: false
name: namesplit
params: ()
visibility: private
ri/1.8/system/REXML/Light/Node/%5b%5d%3d-i.yaml000064400000000412150403654620014114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Doesn't handle namespaces yet
full_name: REXML::Light::Node#[]=
is_singleton: false
name: "[]="
params: ( reference, ns, value=nil )
visibility: public
ri/1.8/system/REXML/Light/Node/local_name%3d-i.yaml000064400000000306150403654620015337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#local_name=
is_singleton: false
name: local_name=
params: ( name_str )
visibility: public
ri/1.8/system/REXML/Light/Node/parent-i.yaml000064400000000262150403654620014243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Light::Node#parent
is_singleton: false
name: parent
params: ()
visibility: public
ri/1.8/system/REXML/Light/cdesc-Light.yaml000064400000000270150403654620013764 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: REXML::Light
includes: []

instance_methods: []

name: Light
superclass: 
ri/1.8/system/REXML/Functions/starts_with-c.yaml000064400000000377150403654620015342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fixed by Mike Stok
full_name: REXML::Functions::starts_with
is_singleton: true
name: starts_with
params: ( string, test )
visibility: public
ri/1.8/system/REXML/Functions/string_value-c.yaml000064400000000277150403654620015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::string_value
is_singleton: true
name: string_value
params: ( o )
visibility: public
ri/1.8/system/REXML/Functions/string_length-c.yaml000064400000000363150403654620015631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::string_length
is_singleton: true
name: string_length
params: ( string )
visibility: public
ri/1.8/system/REXML/Functions/false-c.yaml000064400000000336150403654620014054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::false
is_singleton: true
name: "false"
params: ( )
visibility: public
ri/1.8/system/REXML/Functions/local_name-c.yaml000064400000000363150403654620015054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::local_name
is_singleton: true
name: local_name
params: ( node_set=nil )
visibility: public
ri/1.8/system/REXML/Functions/number-c.yaml000064400000001707150403654620014255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: a string that consists of optional whitespace followed by an optional minus sign followed by a Number followed by whitespace is converted to the IEEE 754 number that is nearest (according to the IEEE 754 round-to-nearest rule) to the mathematical value represented by the string; any other string is converted to NaN
- !ruby/struct:SM::Flow::P 
  body: boolean true is converted to 1; boolean false is converted to 0
- !ruby/struct:SM::Flow::P 
  body: a node-set is first converted to a string as if by a call to the string function and then converted in the same way as a string argument
- !ruby/struct:SM::Flow::P 
  body: an object of a type other than the four basic types is converted to a number in a way that is dependent on that type
full_name: REXML::Functions::number
is_singleton: true
name: number
params: ( object=nil )
visibility: public
ri/1.8/system/REXML/Functions/count-c.yaml000064400000000270150403654620014107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::count
is_singleton: true
name: count
params: ( node_set )
visibility: public
ri/1.8/system/REXML/Functions/string-c.yaml000064400000003760150403654620014274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A node-set is converted to a string by returning the string-value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned.
- !ruby/struct:SM::Flow::P 
  body: A number is converted to a string as follows
- !ruby/struct:SM::Flow::P 
  body: NaN is converted to the string NaN
- !ruby/struct:SM::Flow::P 
  body: positive zero is converted to the string 0
- !ruby/struct:SM::Flow::P 
  body: negative zero is converted to the string 0
- !ruby/struct:SM::Flow::P 
  body: positive infinity is converted to the string Infinity
- !ruby/struct:SM::Flow::P 
  body: negative infinity is converted to the string -Infinity
- !ruby/struct:SM::Flow::P 
  body: if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative
- !ruby/struct:SM::Flow::P 
  body: otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values.
- !ruby/struct:SM::Flow::P 
  body: The boolean false value is converted to the string false. The boolean true value is converted to the string true.
- !ruby/struct:SM::Flow::P 
  body: An object of a type other than the four basic types is converted to a string in a way that is dependent on that type.
full_name: REXML::Functions::string
is_singleton: true
name: string
params: ( object=nil )
visibility: public
ri/1.8/system/REXML/Functions/substring_after-c.yaml000064400000000412150403654620016156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Kouhei fixed this too
full_name: REXML::Functions::substring_after
is_singleton: true
name: substring_after
params: ( string, test )
visibility: public
ri/1.8/system/REXML/Functions/last-c.yaml000064400000000255150403654620013725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::last
is_singleton: true
name: last
params: ( )
visibility: public
ri/1.8/system/REXML/Functions/translate-c.yaml000064400000000417150403654620014757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This is entirely Mike Stok's beast
full_name: REXML::Functions::translate
is_singleton: true
name: translate
params: ( string, tr1, tr2 )
visibility: public
ri/1.8/system/REXML/Functions/variables-c.yaml000064400000000266150403654620014734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::variables
is_singleton: true
name: variables
params: ()
visibility: public
ri/1.8/system/REXML/Functions/floor-c.yaml000064400000000266150403654620014105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::floor
is_singleton: true
name: floor
params: ( number )
visibility: public
ri/1.8/system/REXML/Functions/concat-c.yaml000064400000000347150403654620014233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::concat
is_singleton: true
name: concat
params: ( *objects )
visibility: public
ri/1.8/system/REXML/Functions/boolean-c.yaml000064400000000353150403654620014400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::boolean
is_singleton: true
name: boolean
params: ( object=nil )
visibility: public
ri/1.8/system/REXML/Functions/cdesc-Functions.yaml000064400000005132150403654620015570 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: boolean
- !ruby/object:RI::MethodSummary 
  name: ceiling
- !ruby/object:RI::MethodSummary 
  name: compare_language
- !ruby/object:RI::MethodSummary 
  name: concat
- !ruby/object:RI::MethodSummary 
  name: contains
- !ruby/object:RI::MethodSummary 
  name: context=
- !ruby/object:RI::MethodSummary 
  name: count
- !ruby/object:RI::MethodSummary 
  name: "false"
- !ruby/object:RI::MethodSummary 
  name: floor
- !ruby/object:RI::MethodSummary 
  name: get_namespace
- !ruby/object:RI::MethodSummary 
  name: id
- !ruby/object:RI::MethodSummary 
  name: lang
- !ruby/object:RI::MethodSummary 
  name: last
- !ruby/object:RI::MethodSummary 
  name: local_name
- !ruby/object:RI::MethodSummary 
  name: method_missing
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: namespace_context
- !ruby/object:RI::MethodSummary 
  name: namespace_context=
- !ruby/object:RI::MethodSummary 
  name: namespace_uri
- !ruby/object:RI::MethodSummary 
  name: normalize_space
- !ruby/object:RI::MethodSummary 
  name: not
- !ruby/object:RI::MethodSummary 
  name: number
- !ruby/object:RI::MethodSummary 
  name: position
- !ruby/object:RI::MethodSummary 
  name: processing_instruction
- !ruby/object:RI::MethodSummary 
  name: round
- !ruby/object:RI::MethodSummary 
  name: starts_with
- !ruby/object:RI::MethodSummary 
  name: string
- !ruby/object:RI::MethodSummary 
  name: string_length
- !ruby/object:RI::MethodSummary 
  name: string_value
- !ruby/object:RI::MethodSummary 
  name: substring
- !ruby/object:RI::MethodSummary 
  name: substring_after
- !ruby/object:RI::MethodSummary 
  name: substring_before
- !ruby/object:RI::MethodSummary 
  name: sum
- !ruby/object:RI::MethodSummary 
  name: text
- !ruby/object:RI::MethodSummary 
  name: translate
- !ruby/object:RI::MethodSummary 
  name: "true"
- !ruby/object:RI::MethodSummary 
  name: variables
- !ruby/object:RI::MethodSummary 
  name: variables=
comment: 
- !ruby/struct:SM::Flow::P 
  body: "If you add a method, keep in mind two things: (1) the first argument will always be a list of nodes from which to filter. In the case of context methods (such as position), the function should return an array with a value for each child in the array. (2) all method calls from XML will have &quot;-&quot; replaced with &quot;_&quot;. Therefore, in XML, &quot;local-name()&quot; is identical (and actually becomes) &quot;local_name()&quot;"
constants: []

full_name: REXML::Functions
includes: []

instance_methods: []

name: Functions
superclass: 
ri/1.8/system/REXML/Functions/substring-c.yaml000064400000000554150403654620015004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Take equal portions of Mike Stok and Sean Russell; mix vigorously, and pour into a tall, chilled glass. Serves 10,000.
full_name: REXML::Functions::substring
is_singleton: true
name: substring
params: ( string, start, length=nil )
visibility: public
ri/1.8/system/REXML/Functions/not-c.yaml000064400000000337150403654620013563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::not
is_singleton: true
name: not
params: ( object )
visibility: public
ri/1.8/system/REXML/Functions/substring_before-c.yaml000064400000000410150403654620016315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Kouhei fixed this
full_name: REXML::Functions::substring_before
is_singleton: true
name: substring_before
params: ( string, test )
visibility: public
ri/1.8/system/REXML/Functions/true-c.yaml000064400000000334150403654620013737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::true
is_singleton: true
name: "true"
params: ( )
visibility: public
ri/1.8/system/REXML/Functions/namespace_uri-c.yaml000064400000000314150403654620015571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::namespace_uri
is_singleton: true
name: namespace_uri
params: ( node_set=nil )
visibility: public
ri/1.8/system/REXML/Functions/namespace_context-c.yaml000064400000000306150403654620016457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::namespace_context
is_singleton: true
name: namespace_context
params: ()
visibility: public
ri/1.8/system/REXML/Functions/text-c.yaml000064400000000255150403654620013746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::text
is_singleton: true
name: text
params: ( )
visibility: public
ri/1.8/system/REXML/Functions/sum-c.yaml000064400000000261150403654620013563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::sum
is_singleton: true
name: sum
params: ( nodes )
visibility: public
ri/1.8/system/REXML/Functions/round-c.yaml000064400000000266150403654620014113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::round
is_singleton: true
name: round
params: ( number )
visibility: public
ri/1.8/system/REXML/Functions/variables%3d-c.yaml000064400000000271150403654620015224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::variables=
is_singleton: true
name: variables=
params: (x)
visibility: public
ri/1.8/system/REXML/Functions/position-c.yaml000064400000000265150403654620014627 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::position
is_singleton: true
name: position
params: ( )
visibility: public
ri/1.8/system/REXML/Functions/lang-c.yaml000064400000000343150403654620013701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::lang
is_singleton: true
name: lang
params: ( language )
visibility: public
ri/1.8/system/REXML/Functions/namespace_context%3d-c.yaml000064400000000311150403654620016747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::namespace_context=
is_singleton: true
name: namespace_context=
params: (x)
visibility: public
ri/1.8/system/REXML/Functions/processing_instruction-c.yaml000064400000000326150403654620017576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::processing_instruction
is_singleton: true
name: processing_instruction
params: ( node )
visibility: public
ri/1.8/system/REXML/Functions/method_missing-c.yaml000064400000000304150403654620015766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::method_missing
is_singleton: true
name: method_missing
params: ( id )
visibility: public
ri/1.8/system/REXML/Functions/ceiling-c.yaml000064400000000272150403654620014373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::ceiling
is_singleton: true
name: ceiling
params: ( number )
visibility: public
ri/1.8/system/REXML/Functions/context%3d-c.yaml000064400000000271150403654620014740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::context=
is_singleton: true
name: context=
params: (value)
visibility: public
ri/1.8/system/REXML/Functions/compare_language-c.yaml000064400000000320150403654620016244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::compare_language
is_singleton: true
name: compare_language
params: (lang1, lang2)
visibility: public
ri/1.8/system/REXML/Functions/get_namespace-c.yaml000064400000000572150403654620015557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: "@@context[:node] if defined? @@context[:node].namespace"
comment: 
- !ruby/struct:SM::Flow::P 
  body: Helper method.
full_name: REXML::Functions::get_namespace
is_singleton: true
name: get_namespace
params: ( node_set = nil ) {|@@context[:node] if defined? @@context[:node].namespace| ...}
visibility: public
ri/1.8/system/REXML/Functions/id-c.yaml000064400000000447150403654620013361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Since REXML is non-validating, this method is not implemented as it requires a DTD
full_name: REXML::Functions::id
is_singleton: true
name: id
params: ( object )
visibility: public
ri/1.8/system/REXML/Functions/normalize_space-c.yaml000064400000000373150403654620016136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: UNTESTED
full_name: REXML::Functions::normalize_space
is_singleton: true
name: normalize_space
params: ( string=nil )
visibility: public
ri/1.8/system/REXML/Functions/name-c.yaml000064400000000272150403654620013701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Functions::name
is_singleton: true
name: name
params: ( node_set=nil )
visibility: public
ri/1.8/system/REXML/Functions/contains-c.yaml000064400000000371150403654620014577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fixed by Mike Stok
full_name: REXML::Functions::contains
is_singleton: true
name: contains
params: ( string, test )
visibility: public
ri/1.8/system/REXML/AttlistDecl/%5b%5d-i.yaml000064400000000520150403654620014100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Access the attlist attribute/value pairs.
- !ruby/struct:SM::Flow::VERB 
  body: " value = attlist_decl[ attribute_name ]\n"
full_name: REXML::AttlistDecl#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/REXML/AttlistDecl/each-i.yaml000064400000000544150403654620014135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Iterate over the key/value pairs:"
- !ruby/struct:SM::Flow::VERB 
  body: " attlist_decl.each { |attribute_name, attribute_value| ... }\n"
full_name: REXML::AttlistDecl#each
is_singleton: false
name: each
params: (&block)
visibility: public
ri/1.8/system/REXML/AttlistDecl/include%3f-i.yaml000064400000000602150403654620015151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Whether an attlist declaration includes the given attribute definition
- !ruby/struct:SM::Flow::VERB 
  body: " if attlist_decl.include? &quot;xmlns:foobar&quot;\n"
full_name: REXML::AttlistDecl#include?
is_singleton: false
name: include?
params: (key)
visibility: public
ri/1.8/system/REXML/AttlistDecl/new-c.yaml000064400000001051150403654620014012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create an AttlistDecl, pulling the information from a Source. Notice that this isn't very convenient; to create an AttlistDecl, you basically have to format it yourself, and then have the initializer parse it. Sorry, but for the forseeable future, DTD support in REXML is pretty weak on convenience. Have I mentioned how much I hate DTDs?
full_name: REXML::AttlistDecl::new
is_singleton: true
name: new
params: (source)
visibility: public
ri/1.8/system/REXML/AttlistDecl/node_type-i.yaml000064400000000270150403654630015220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::AttlistDecl#node_type
is_singleton: false
name: node_type
params: ()
visibility: public
ri/1.8/system/REXML/AttlistDecl/write-i.yaml000064400000000404150403654630014363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Write out exactly what we got in.
full_name: REXML::AttlistDecl#write
is_singleton: false
name: write
params: (out, indent=-1)
visibility: public
ri/1.8/system/REXML/AttlistDecl/cdesc-AttlistDecl.yaml000064400000002706150403654630016305 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: What is this? Got me.
  name: element_name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This class needs:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Documentation
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Work! Not all types of attlists are intelligently parsed, so we just
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: spew back out what we get in. This works, but it would be better if we formatted the output ourselves.
- !ruby/struct:SM::Flow::P 
  body: AttlistDecls provide <b>just</b> enough support to allow namespace declarations. If you need some sort of generalized support, or have an interesting idea about how to map the hideous, terrible design of DTD AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate for anything to make DTDs more palateable.
constants: []

full_name: REXML::AttlistDecl
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: node_type
- !ruby/object:RI::MethodSummary 
  name: write
name: AttlistDecl
superclass: Child
ri/1.8/system/REXML/NotationDecl/cdesc-NotationDecl.yaml000064400000001002150403654640016610 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: public
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: system
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: REXML::NotationDecl
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: write
name: NotationDecl
superclass: Child
ri/1.8/system/REXML/NotationDecl/new-c.yaml000064400000000303150403654640014162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::NotationDecl::new
is_singleton: true
name: new
params: (name, middle, pub, sys)
visibility: public
ri/1.8/system/REXML/NotationDecl/write-i.yaml000064400000000304150403654640014532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::NotationDecl#write
is_singleton: false
name: write
params: ( output, indent=-1 )
visibility: public
ri/1.8/system/REXML/NotationDecl/to_s-i.yaml000064400000000257150403654650014354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::NotationDecl#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/REXML/NotationDecl/name-i.yaml000064400000000517150403654650014327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method retrieves the name of the notation.
- !ruby/struct:SM::Flow::P 
  body: Method contributed by Henrik Martensson
full_name: REXML::NotationDecl#name
is_singleton: false
name: name
params: ()
visibility: public
ri/1.8/system/REXML/Instruction/cdesc-Instruction.yaml000064400000002303150403654650016512 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: target is the &quot;name&quot; of the Instruction; IE, the &quot;tag&quot; in &lt;?tag ...?&gt; content is everything else.
  name: content
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: target is the &quot;name&quot; of the Instruction; IE, the &quot;tag&quot; in &lt;?tag ...?&gt; content is everything else.
  name: target
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Represents an XML Instruction; IE, &lt;? ... ?&gt; TODO: Add parent arg (3rd arg) to constructor"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: START
  value: "'<\\?'"
- !ruby/object:RI::Constant 
  comment: 
  name: STOP
  value: "'\\?>'"
full_name: REXML::Instruction
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: node_type
- !ruby/object:RI::MethodSummary 
  name: write
name: Instruction
superclass: Child
ri/1.8/system/REXML/Instruction/inspect-i.yaml000064400000000264150403654660015012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Instruction#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/REXML/Instruction/new-c.yaml000064400000001317150403654660014130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Constructs a new Instruction @param target can be one of a number of things. If String, then the target of this instruction is set to this. If an Instruction, then the Instruction is shallowly cloned (target and content are copied). If a Source, then the source is scanned and parsed for an Instruction declaration. @param content Must be either a String, or a Parent. Can only be a Parent if the target argument is a Source. Otherwise, this String is set as the content of this instruction.
full_name: REXML::Instruction::new
is_singleton: true
name: new
params: (target, content=nil)
visibility: public
ri/1.8/system/REXML/Instruction/node_type-i.yaml000064400000000270150403654660015330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Instruction#node_type
is_singleton: false
name: node_type
params: ()
visibility: public
ri/1.8/system/REXML/Instruction/write-i.yaml000064400000000541150403654670014476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: DEPRECATED
- !ruby/struct:SM::Flow::P 
  body: See the rexml/formatters package
full_name: REXML::Instruction#write
is_singleton: false
name: write
params: (writer, indent=-1, transitive=false, ie_hack=false)
visibility: public
ri/1.8/system/REXML/Instruction/%3d%3d-i.yaml000064400000000527150403654670014217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "@return true if other is an Instruction, and the content and target of the other matches the target and content of this object."
full_name: REXML::Instruction#==
is_singleton: false
name: ==
params: ( other )
visibility: public
ri/1.8/system/REXML/Instruction/clone-i.yaml000064400000000260150403654670014442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Instruction#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/REXML/Element/add_element-i.yaml000064400000002014150403654670014652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds a child to this element, optionally setting attributes in the element.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "element:"
    body: optional. If Element, the element is added. Otherwise, a new Element is constructed with the argument (see Element.initialize).
  - !ruby/struct:SM::Flow::LI 
    label: "attrs:"
    body: If supplied, must be a Hash containing String name,value pairs, which will be used to set the attributes of the new Element.
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: the Element that was added
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " el = doc.add_element 'my-tag'\n el = doc.add_element 'my-tag', {'attr1'=&gt;'val1', 'attr2'=&gt;'val2'}\n el = Element.new 'my-tag'\n doc.add_element el\n"
full_name: REXML::Element#add_element
is_singleton: false
name: add_element
params: (element, attrs=nil)
visibility: public
ri/1.8/system/REXML/Element/delete_attribute-i.yaml000064400000002104150403654700015730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes an attribute
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "key:"
    body: either an Attribute or a String. In either case, the attribute is found by matching the attribute name to the argument, and then removed. If no attribute is found, no action is taken.
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: the attribute removed, or nil if this Element did not contain a matching attribute
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " e = Element.new('E')\n e.add_attribute( 'name', 'Sean' )             #-&gt; &lt;E name='Sean'/&gt;\n r = e.add_attribute( 'sur:name', 'Russell' )  #-&gt; &lt;E name='Sean' sur:name='Russell'/&gt;\n e.delete_attribute( 'name' )                  #-&gt; &lt;E sur:name='Russell'/&gt;\n e.delete_attribute( r )                       #-&gt; &lt;E/&gt;\n"
full_name: REXML::Element#delete_attribute
is_singleton: false
name: delete_attribute
params: (key)
visibility: public
ri/1.8/system/REXML/Element/document-i.yaml000064400000000504150403654700014223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates to the document to which this element belongs, or nil if this element doesn't belong to a document.
full_name: REXML::Element#document
is_singleton: false
name: document
params: ()
visibility: public
ri/1.8/system/REXML/Element/delete_namespace-i.yaml000064400000001341150403654700015663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a namespace from this node. This only works if the namespace is actually declared in this node. If no argument is passed, deletes the default namespace.
- !ruby/struct:SM::Flow::P 
  body: "Evaluates to: this element"
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new &quot;&lt;a xmlns:foo='bar' xmlns='twiddle'/&gt;&quot;\n doc.root.delete_namespace\n puts doc     # -&gt; &lt;a xmlns:foo='bar'/&gt;\n doc.root.delete_namespace 'foo'\n puts doc     # -&gt; &lt;a/&gt;\n"
full_name: REXML::Element#delete_namespace
is_singleton: false
name: delete_namespace
params: (namespace="xmlns")
visibility: public
ri/1.8/system/REXML/Element/raw-i.yaml000064400000001000150403654710013167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates to <tt>true</tt> if raw mode is set for this element. This is the case if the context has :<tt>raw</tt> set to :<tt>all</tt> or an array containing the name of this element.
- !ruby/struct:SM::Flow::P 
  body: The evaluation is tested against <tt>expanded_name</tt>, and so is namespace sensitive.
full_name: REXML::Element#raw
is_singleton: false
name: raw
params: ()
visibility: public
ri/1.8/system/REXML/Element/each_element_with_attribute-i.yaml000064400000002607150403654710020143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: Element
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates through the child elements, yielding for each Element that has a particular attribute set.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "key:"
    body: the name of the attribute to search for
  - !ruby/struct:SM::Flow::LI 
    label: "value:"
    body: the value of the attribute
  - !ruby/struct:SM::Flow::LI 
    label: "max:"
    body: (optional) causes this method to return after yielding for this number of matching children
  - !ruby/struct:SM::Flow::LI 
    label: "name:"
    body: (optional) if supplied, this is an XPath that filters the children to check.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new &quot;&lt;a&gt;&lt;b @id='1'/&gt;&lt;c @id='2'/&gt;&lt;d @id='1'/&gt;&lt;e/&gt;&lt;/a&gt;&quot;\n # Yields b, c, d\n doc.root.each_element_with_attribute( 'id' ) {|e| p e}\n # Yields b, d\n doc.root.each_element_with_attribute( 'id', '1' ) {|e| p e}\n # Yields b\n doc.root.each_element_with_attribute( 'id', '1', 1 ) {|e| p e}\n # Yields d\n doc.root.each_element_with_attribute( 'id', '1', 0, 'd' ) {|e| p e}\n"
full_name: REXML::Element#each_element_with_attribute
is_singleton: false
name: each_element_with_attribute
params: ( key, value=nil, max=0, name=nil ) {|Element| ...}
visibility: public
ri/1.8/system/REXML/Element/cdesc-Element.yaml000064400000006354150403654710014641 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Mechanisms for accessing attributes and child elements of this element.
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The context holds information about the processing environment, such as whitespace handling.
  name: context
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Mechanisms for accessing attributes and child elements of this element.
  name: elements
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents a tagged XML element. Elements are characterized by having children, attributes, and names, and can themselves be children.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: UNDEFINED
  value: "\"UNDEFINED\";"
full_name: REXML::Element
includes: 
- !ruby/object:RI::IncludedModule 
  name: Namespace
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __to_xpath_helper
- !ruby/object:RI::MethodSummary 
  name: add_attribute
- !ruby/object:RI::MethodSummary 
  name: add_attributes
- !ruby/object:RI::MethodSummary 
  name: add_element
- !ruby/object:RI::MethodSummary 
  name: add_namespace
- !ruby/object:RI::MethodSummary 
  name: add_text
- !ruby/object:RI::MethodSummary 
  name: attribute
- !ruby/object:RI::MethodSummary 
  name: cdatas
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: comments
- !ruby/object:RI::MethodSummary 
  name: delete_attribute
- !ruby/object:RI::MethodSummary 
  name: delete_element
- !ruby/object:RI::MethodSummary 
  name: delete_namespace
- !ruby/object:RI::MethodSummary 
  name: document
- !ruby/object:RI::MethodSummary 
  name: each_element
- !ruby/object:RI::MethodSummary 
  name: each_element_with_attribute
- !ruby/object:RI::MethodSummary 
  name: each_element_with_text
- !ruby/object:RI::MethodSummary 
  name: each_with_something
- !ruby/object:RI::MethodSummary 
  name: get_elements
- !ruby/object:RI::MethodSummary 
  name: get_text
- !ruby/object:RI::MethodSummary 
  name: has_attributes?
- !ruby/object:RI::MethodSummary 
  name: has_elements?
- !ruby/object:RI::MethodSummary 
  name: has_text?
- !ruby/object:RI::MethodSummary 
  name: ignore_whitespace_nodes
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: instructions
- !ruby/object:RI::MethodSummary 
  name: namespace
- !ruby/object:RI::MethodSummary 
  name: namespaces
- !ruby/object:RI::MethodSummary 
  name: next_element
- !ruby/object:RI::MethodSummary 
  name: node_type
- !ruby/object:RI::MethodSummary 
  name: prefixes
- !ruby/object:RI::MethodSummary 
  name: previous_element
- !ruby/object:RI::MethodSummary 
  name: raw
- !ruby/object:RI::MethodSummary 
  name: root
- !ruby/object:RI::MethodSummary 
  name: root_node
- !ruby/object:RI::MethodSummary 
  name: text
- !ruby/object:RI::MethodSummary 
  name: text=
- !ruby/object:RI::MethodSummary 
  name: texts
- !ruby/object:RI::MethodSummary 
  name: whitespace
- !ruby/object:RI::MethodSummary 
  name: write
- !ruby/object:RI::MethodSummary 
  name: xpath
name: Element
superclass: Parent
ri/1.8/system/REXML/Element/whitespace-i.yaml000064400000001631150403654710014544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Evaluates to <tt>true</tt> if whitespace is respected for this element. This is the case if:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Neither :<tt>respect_whitespace</tt> nor :<tt>compress_whitespace</tt> has any value
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: The context has :<tt>respect_whitespace</tt> set to :<tt>all</tt> or an array containing the name of this element, and :<tt>compress_whitespace</tt> isn't set to :<tt>all</tt> or an array containing the name of this element.
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: The evaluation is tested against <tt>expanded_name</tt>, and so is namespace sensitive.
full_name: REXML::Element#whitespace
is_singleton: false
name: whitespace
params: ()
visibility: public
ri/1.8/system/REXML/Element/get_elements-i.yaml000064400000001131150403654710015056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Synonym for Element.to_a This is a little slower than calling elements.each directly.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "xpath:"
    body: any XPath by which to search for elements in the tree
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: an array of Elements that match the supplied path
  type: :NOTE
full_name: REXML::Element#get_elements
is_singleton: false
name: get_elements
params: ( xpath )
visibility: public
ri/1.8/system/REXML/Element/get_text-i.yaml000064400000001241150403654710014230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first child Text node, if any, or <tt>nil</tt> otherwise. This method returns the actual <tt>Text</tt> node, rather than the String content.
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new &quot;&lt;p&gt;some text <b>this is bold!</b> more text&lt;/p&gt;&quot;\n # The element 'p' has two text elements, &quot;some text &quot; and &quot; more text&quot;.\n doc.root.get_text.value            #-&gt; &quot;some text &quot;\n"
full_name: REXML::Element#get_text
is_singleton: false
name: get_text
params: (path = nil)
visibility: public
ri/1.8/system/REXML/Element/namespace-i.yaml000064400000002052150403654710014342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evalutas to the URI for a prefix, or the empty string if no such namespace is declared for this element. Evaluates recursively for ancestors. Returns the default namespace, if there is one.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "prefix:"
    body: the prefix to search for. If not supplied, returns the default namespace if one exists
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: the namespace URI as a String, or nil if no such namespace exists. If the namespace is undefined, returns an empty string
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new(&quot;&lt;a xmlns='1' xmlns:y='2'&gt;&lt;b/&gt;&lt;c xmlns:z='3'/&gt;&lt;/a&gt;&quot;)\n b = doc.elements['//b']\n b.namespace           # -&gt; '1'\n b.namespace(&quot;y&quot;)      # -&gt; '2'\n"
full_name: REXML::Element#namespace
is_singleton: false
name: namespace
params: (prefix=nil)
visibility: public
ri/1.8/system/REXML/Element/add_attribute-i.yaml000064400000002463150403654710015227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds an attribute to this element, overwriting any existing attribute by the same name.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "key:"
    body: can be either an Attribute or a String. If an Attribute, the attribute is added to the list of Element attributes. If String, the argument is used as the name of the new attribute, and the value parameter must be supplied.
  - !ruby/struct:SM::Flow::LI 
    label: "value:"
    body: Required if <tt>key</tt> is a String, and ignored if the first argument is an Attribute. This is a String, and is used as the value of the new Attribute. This should be the unnormalized value of the attribute (without entities).
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: the Attribute added
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " e = Element.new 'e'\n e.add_attribute( 'a', 'b' )               #-&gt; &lt;e a='b'/&gt;\n e.add_attribute( 'x:a', 'c' )             #-&gt; &lt;e a='b' x:a='c'/&gt;\n e.add_attribute Attribute.new('b', 'd')   #-&gt; &lt;e a='b' x:a='c' b='d'/&gt;\n"
full_name: REXML::Element#add_attribute
is_singleton: false
name: add_attribute
params: ( key, value=nil )
visibility: public
ri/1.8/system/REXML/Element/namespaces-i.yaml000064400000000266150403654710014532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Element#namespaces
is_singleton: false
name: namespaces
params: ()
visibility: public
ri/1.8/system/REXML/Element/has_text%3f-i.yaml000064400000000437150403654710014530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates to <tt>true</tt> if this element has at least one Text child
full_name: REXML::Element#has_text?
is_singleton: false
name: has_text?
params: ()
visibility: public
ri/1.8/system/REXML/Element/root-i.yaml000064400000000252150403654710013371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Element#root
is_singleton: false
name: root
params: ()
visibility: public
ri/1.8/system/REXML/Element/add_attributes-i.yaml000064400000001256150403654710015411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add multiple attributes to this element.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "hash:"
    body: is either a hash, or array of arrays
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " el.add_attributes( {&quot;name1&quot;=&gt;&quot;value1&quot;, &quot;name2&quot;=&gt;&quot;value2&quot;} )\n el.add_attributes( [ [&quot;name1&quot;,&quot;value1&quot;], [&quot;name2&quot;=&gt;&quot;value2&quot;] ] )\n"
full_name: REXML::Element#add_attributes
is_singleton: false
name: add_attributes
params: (hash)
visibility: public
ri/1.8/system/REXML/Element/add_namespace-i.yaml000064400000001727150403654710015162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds a namespace to this element.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "prefix:"
    body: the prefix string, or the namespace URI if <tt>uri</tt> is not supplied
  - !ruby/struct:SM::Flow::LI 
    label: "uri:"
    body: the namespace URI. May be nil, in which <tt>prefix</tt> is used as the URI
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "Evaluates to: this Element"
- !ruby/struct:SM::Flow::VERB 
  body: " a = Element.new(&quot;a&quot;)\n a.add_namespace(&quot;xmlns:foo&quot;, &quot;bar&quot; )\n a.add_namespace(&quot;foo&quot;, &quot;bar&quot;)  # shorthand for previous line\n a.add_namespace(&quot;twiddle&quot;)\n puts a   #-&gt; &lt;a xmlns:foo='bar' xmlns='twiddle'/&gt;\n"
full_name: REXML::Element#add_namespace
is_singleton: false
name: add_namespace
params: ( prefix, uri=nil )
visibility: public
ri/1.8/system/REXML/Element/texts-i.yaml000064400000000375150403654710013563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get an array of all Text children. IMMUTABLE
full_name: REXML::Element#texts
is_singleton: false
name: texts
params: ()
visibility: public
ri/1.8/system/REXML/Element/inspect-i.yaml000064400000000260150403654710014052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Element#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/REXML/Element/has_elements%3f-i.yaml000064400000001131150403654710015350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates to <tt>true</tt> if this element has at least one child Element
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new &quot;&lt;a&gt;&lt;b/&gt;&lt;c&gt;Text&lt;/c&gt;&lt;/a&gt;&quot;\n doc.root.has_elements               # -&gt; true\n doc.elements[&quot;/a/b&quot;].has_elements   # -&gt; false\n doc.elements[&quot;/a/c&quot;].has_elements   # -&gt; false\n"
full_name: REXML::Element#has_elements?
is_singleton: false
name: has_elements?
params: ()
visibility: public
ri/1.8/system/REXML/Element/add_text-i.yaml000064400000002003150403654710014176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A helper method to add a Text child. Actual Text instances can be added with regular Parent methods, such as add() and &lt;&lt;()
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "text:"
    body: if a String, a new Text instance is created and added to the parent. If Text, the object is added directly.
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: this Element
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " e = Element.new('a')          #-&gt; &lt;e/&gt;\n e.add_text 'foo'              #-&gt; &lt;e&gt;foo&lt;/e&gt;\n e.add_text Text.new(' bar')    #-&gt; &lt;e&gt;foo bar&lt;/e&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: Note that at the end of this example, the branch has <b>3</b> nodes; the 'e' element and <b>2</b> Text node children.
full_name: REXML::Element#add_text
is_singleton: false
name: add_text
params: ( text )
visibility: public
ri/1.8/system/REXML/Element/new-c.yaml000064400000003723150403654710013177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Constructor
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "arg:"
    body: if not supplied, will be set to the default value. If a String, the name of this object will be set to the argument. If an Element, the object will be shallowly cloned; name, attributes, and namespaces will be copied. Children will <tt>not</tt> be copied.
  - !ruby/struct:SM::Flow::LI 
    label: "parent:"
    body: if supplied, must be a Parent, and will be used as the parent of this object.
  - !ruby/struct:SM::Flow::LI 
    label: "context:"
    body: "If supplied, must be a hash containing context items. Context items include:"
  type: :NOTE
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:respect_whitespace</tt> the value of this is :<tt>all</tt> or an array of strings being the names of the elements to respect whitespace for. Defaults to :<tt>all</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:compress_whitespace</tt> the value can be :<tt>all</tt> or an array of strings being the names of the elements to ignore whitespace on. Overrides :<tt>respect_whitespace</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:ignore_whitespace_nodes</tt> the value can be :<tt>all</tt> or an array of strings being the names of the elements in which to ignore whitespace-only nodes. If this is set, Text nodes which contain only whitespace will not be added to the document tree.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:raw</tt> can be :<tt>all</tt>, or an array of strings being the names of the elements to process in raw mode. In raw mode, special characters in text is not converted to or from entities.
  type: :BULLET
full_name: REXML::Element::new
is_singleton: true
name: new
params: ( arg = UNDEFINED, parent=nil, context=nil )
visibility: public
ri/1.8/system/REXML/Element/text%3d-i.yaml000064400000002741150403654710013673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the first Text child of this object. See text() for a discussion about Text children.
- !ruby/struct:SM::Flow::P 
  body: If a Text child already exists, the child is replaced by this content. This means that Text content can be deleted by calling this method with a nil argument. In this case, the next Text child becomes the first Text child. In no case is the order of any siblings disturbed.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "text:"
    body: If a String, a new Text child is created and added to this Element as the first Text child. If Text, the text is set as the first Child element. If nil, then any existing first Text child is removed.
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: this Element.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new '&lt;a&gt;&lt;b/&gt;&lt;/a&gt;'\n doc.root.text = 'Sean'      #-&gt; '&lt;a&gt;&lt;b/&gt;Sean&lt;/a&gt;'\n doc.root.text = 'Elliott'   #-&gt; '&lt;a&gt;&lt;b/&gt;Elliott&lt;/a&gt;'\n doc.root.add_element 'c'    #-&gt; '&lt;a&gt;&lt;b/&gt;Elliott&lt;c/&gt;&lt;/a&gt;'\n doc.root.text = 'Russell'   #-&gt; '&lt;a&gt;&lt;b/&gt;Russell&lt;c/&gt;&lt;/a&gt;'\n doc.root.text = nil         #-&gt; '&lt;a&gt;&lt;b/&gt;&lt;c/&gt;&lt;/a&gt;'\n"
full_name: REXML::Element#text=
is_singleton: false
name: text=
params: ( text )
visibility: public
ri/1.8/system/REXML/Element/previous_element-i.yaml000064400000001077150403654710016001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the previous sibling that is an element, or nil if there is no Element sibling prior to this one
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new '&lt;a&gt;&lt;b/&gt;text&lt;c/&gt;&lt;/a&gt;'\n doc.root.elements['c'].previous_element          #-&gt; &lt;b/&gt;\n doc.root.elements['b'].previous_element          #-&gt; nil\n"
full_name: REXML::Element#previous_element
is_singleton: false
name: previous_element
params: ()
visibility: public
ri/1.8/system/REXML/Element/each_element_with_text-i.yaml000064400000002435150403654710017123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: Element
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates through the children, yielding for each Element that has a particular text set.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "text:"
    body: the text to search for. If nil, or not supplied, will iterate over all <tt>Element</tt> children that contain at least one <tt>Text</tt> node.
  - !ruby/struct:SM::Flow::LI 
    label: "max:"
    body: (optional) causes this method to return after yielding for this number of matching children
  - !ruby/struct:SM::Flow::LI 
    label: "name:"
    body: (optional) if supplied, this is an XPath that filters the children to check.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new '&lt;a&gt;<b>b</b>&lt;c&gt;b&lt;/c&gt;&lt;d&gt;d&lt;/d&gt;&lt;e/&gt;&lt;/a&gt;'\n # Yields b, c, d\n doc.each_element_with_text {|e|p e}\n # Yields b, c\n doc.each_element_with_text('b'){|e|p e}\n # Yields b\n doc.each_element_with_text('b', 1){|e|p e}\n # Yields d\n doc.each_element_with_text(nil, 0, 'd'){|e|p e}\n"
full_name: REXML::Element#each_element_with_text
is_singleton: false
name: each_element_with_text
params: ( text=nil, max=0, name=nil ) {|Element| ...}
visibility: public
ri/1.8/system/REXML/Element/attribute-i.yaml000064400000000374150403654710014416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Attributes #"
full_name: REXML::Element#attribute
is_singleton: false
name: attribute
params: ( name, namespace=nil )
visibility: public
ri/1.8/system/REXML/Element/node_type-i.yaml000064400000000264150403654710014377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Element#node_type
is_singleton: false
name: node_type
params: ()
visibility: public
ri/1.8/system/REXML/Element/write-i.yaml000064400000003365150403654710013550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: DEPRECATED
- !ruby/struct:SM::Flow::P 
  body: See REXML::Formatters
- !ruby/struct:SM::Flow::P 
  body: Writes out this element, and recursively, all children.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "output:"
    body: output an object which supports '&lt;&lt; string'; this is where the
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: "  document will be written.\n"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "indent:"
    body: An integer. If -1, no indenting will be used; otherwise, the indentation will be this number of spaces, and children will be indented an additional amount. Defaults to -1
  - !ruby/struct:SM::Flow::LI 
    label: "transitive:"
    body: If transitive is true and indent is &gt;= 0, then the output will be pretty-printed in such a way that the added whitespace does not affect the parse tree of the document
  - !ruby/struct:SM::Flow::LI 
    label: "ie_hack:"
    body: Internet Explorer is the worst piece of crap to have ever been written, with the possible exception of Windows itself. Since IE is unable to parse proper XML, we have to provide a hack to generate XML that IE's limited abilities can handle. This hack inserts a space before the /&gt; on empty tags. Defaults to false
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " out = ''\n doc.write( out )     #-&gt; doc is written to the string 'out'\n doc.write( $stdout ) #-&gt; doc written to the console\n"
full_name: REXML::Element#write
is_singleton: false
name: write
params: (writer=$stdout, indent=-1, transitive=false, ie_hack=false)
visibility: public
ri/1.8/system/REXML/Element/has_attributes%3f-i.yaml000064400000000470150403654710015727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates to <tt>true</tt> if this element has any attributes set, false otherwise.
full_name: REXML::Element#has_attributes?
is_singleton: false
name: has_attributes?
params: ()
visibility: public
ri/1.8/system/REXML/Element/cdatas-i.yaml000064400000000400150403654710013640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get an array of all CData children. IMMUTABLE
full_name: REXML::Element#cdatas
is_singleton: false
name: cdatas
params: ()
visibility: public
ri/1.8/system/REXML/Element/instructions-i.yaml000064400000000422150403654710015151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get an array of all Instruction children. IMMUTABLE
full_name: REXML::Element#instructions
is_singleton: false
name: instructions
params: ()
visibility: public
ri/1.8/system/REXML/Element/ignore_whitespace_nodes-i.yaml000064400000000320150403654710017271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Element#ignore_whitespace_nodes
is_singleton: false
name: ignore_whitespace_nodes
params: ()
visibility: public
ri/1.8/system/REXML/Element/next_element-i.yaml000064400000001050150403654710015072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the next sibling that is an element, or nil if there is no Element sibling after this one
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new '&lt;a&gt;&lt;b/&gt;text&lt;c/&gt;&lt;/a&gt;'\n doc.root.elements['b'].next_element          #-&gt; &lt;c/&gt;\n doc.root.elements['c'].next_element          #-&gt; nil\n"
full_name: REXML::Element#next_element
is_singleton: false
name: next_element
params: ()
visibility: public
ri/1.8/system/REXML/Element/comments-i.yaml000064400000000406150403654710014234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get an array of all Comment children. IMMUTABLE
full_name: REXML::Element#comments
is_singleton: false
name: comments
params: ()
visibility: public
ri/1.8/system/REXML/Element/clone-i.yaml000064400000000705150403654710013511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a shallow copy of self.
- !ruby/struct:SM::Flow::VERB 
  body: "  d = Document.new &quot;&lt;a&gt;&lt;b/&gt;&lt;b/&gt;&lt;c&gt;&lt;d/&gt;&lt;/c&gt;&lt;/a&gt;&quot;\n  new_a = d.root.clone\n  puts new_a  # =&gt; &quot;&lt;a/&gt;&quot;\n"
full_name: REXML::Element#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/REXML/Element/xpath-i.yaml000064400000000254150403654710013534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Element#xpath
is_singleton: false
name: xpath
params: ()
visibility: public
ri/1.8/system/REXML/Element/__to_xpath_helper-i.yaml000064400000000311150403654710016065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Element#__to_xpath_helper
is_singleton: false
name: __to_xpath_helper
params: (node)
visibility: private
ri/1.8/system/REXML/Element/prefixes-i.yaml000064400000001017150403654710014233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates to an <tt>Array</tt> containing the prefixes (names) of all defined namespaces at this context node.
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new(&quot;&lt;a xmlns:x='1' xmlns:y='2'&gt;&lt;b/&gt;&lt;c xmlns:z='3'/&gt;&lt;/a&gt;&quot;)\n doc.elements['//b'].prefixes # -&gt; ['x', 'y']\n"
full_name: REXML::Element#prefixes
is_singleton: false
name: prefixes
params: ()
visibility: public
ri/1.8/system/REXML/Element/text-i.yaml000064400000002036150403654710013374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A convenience method which returns the String value of the <em>first</em> child text element, if one exists, and <tt>nil</tt> otherwise.
- !ruby/struct:SM::Flow::P 
  body: <em>Note that an element may have multiple Text elements, perhaps separated by other children</em>. Be aware that this method only returns the first Text node.
- !ruby/struct:SM::Flow::P 
  body: This method returns the <tt>value</tt> of the first text child node, which ignores the <tt>raw</tt> setting, so always returns normalized text. See the Text::value documentation.
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new &quot;&lt;p&gt;some text <b>this is bold!</b> more text&lt;/p&gt;&quot;\n # The element 'p' has two text elements, &quot;some text &quot; and &quot; more text&quot;.\n doc.root.text              #-&gt; &quot;some text &quot;\n"
full_name: REXML::Element#text
is_singleton: false
name: text
params: ( path = nil )
visibility: public
ri/1.8/system/REXML/Element/delete_element-i.yaml000064400000001647150403654710015372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes a child element.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "element:"
    body: Must be an <tt>Element</tt>, <tt>String</tt>, or <tt>Integer</tt>. If Element, the element is removed. If String, the element is found (via XPath) and removed. &lt;em&gt;This means that any parent can remove any descendant.&lt;em&gt; If Integer, the Element indexed by that number will be removed.
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: the element that was removed.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " doc.delete_element &quot;/a/b/c[@id='4']&quot;\n doc.delete_element doc.elements[&quot;//k&quot;]\n doc.delete_element 1\n"
full_name: REXML::Element#delete_element
is_singleton: false
name: delete_element
params: (element)
visibility: public
ri/1.8/system/REXML/Element/each_element-i.yaml000064400000000442150403654710015020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: Element
comment: 
- !ruby/struct:SM::Flow::P 
  body: Synonym for Element.elements.each
full_name: REXML::Element#each_element
is_singleton: false
name: each_element
params: ( xpath=nil ) {|Element| ...}
visibility: public
ri/1.8/system/REXML/Element/each_with_something-i.yaml000064400000000561150403654710016421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: child if test.call(child) and num += 1
comment: 
- !ruby/struct:SM::Flow::P 
  body: A private helper method
full_name: REXML::Element#each_with_something
is_singleton: false
name: each_with_something
params: ( test, max=0, name=nil ) {|child if test.call(child) and num += 1| ...}
visibility: private
ri/1.8/system/REXML/Element/root_node-i.yaml000064400000002367150403654710014407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates to the root node of the document that this element belongs to. If this element doesn't belong to a document, but does belong to another Element, the parent's root will be returned, until the earliest ancestor is found.
- !ruby/struct:SM::Flow::P 
  body: "Note that this is not the same as the document element. In the following example, &lt;a&gt; is the document element, and the root node is the parent node of the document element. You may ask yourself why the root node is useful: consider the doctype and XML declaration, and any processing instructions before the document element... they are children of the root node, or siblings of the document element. The only time this isn't true is when an Element is created that is not part of any Document. In this case, the ancestor that has no parent acts as the root node."
- !ruby/struct:SM::Flow::VERB 
  body: " d = Document.new '&lt;a&gt;<b>&lt;c/&gt;</b>&lt;/a&gt;'\n a = d[1] ; c = a[1][1]\n d.root_node == d   # TRUE\n a.root_node        # namely, d\n c.root_node        # again, d\n"
full_name: REXML::Element#root_node
is_singleton: false
name: root_node
params: ()
visibility: public
ri/1.8/system/REXML/Text/normalize-c.yaml000064400000000432150403654710013733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escapes all possible entities
full_name: REXML::Text::normalize
is_singleton: true
name: normalize
params: ( input, doctype=nil, entity_filter=nil )
visibility: public
ri/1.8/system/REXML/Text/empty%3f-i.yaml000064400000000253150403654710013376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Text#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/REXML/Text/%3c%3d%3e-i.yaml000064400000000453150403654710013107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>other</tt> a String or a Text <tt>returns</tt> the result of (to_s &lt;=&gt; arg.to_s)
full_name: REXML::Text#<=>
is_singleton: false
name: <=>
params: ( other )
visibility: public
ri/1.8/system/REXML/Text/cdesc-Text.yaml000064400000004710150403654710013521 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: If <tt>raw</tt> is true, then REXML leaves the value alone
  name: raw
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: expand
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: normalize
- !ruby/object:RI::MethodSummary 
  name: read_with_substitution
- !ruby/object:RI::MethodSummary 
  name: unnormalize
comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents text nodes in an XML document
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The order in which the substitutions occur
  name: SPECIALS
  value: "[ /&(?!#?[\\w-]+;)/u, /</u, />/u, /\"/u, /'/u, /\\r/u ]"
- !ruby/object:RI::Constant 
  comment: 
  name: SUBSTITUTES
  value: "['&amp;', '&lt;', '&gt;', '&quot;', '&apos;', '&#13;']"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Characters which are substituted in written strings
  name: SLAICEPS
  value: "[ '<', '>', '\"', \"'\", '&' ]"
- !ruby/object:RI::Constant 
  comment: 
  name: SETUTITSBUS
  value: "[ /&lt;/u, /&gt;/u, /&quot;/u, /&apos;/u, /&amp;/u ]"
- !ruby/object:RI::Constant 
  comment: 
  name: ILLEGAL
  value: /(<|&(?!(#{Entity::NAME})|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));))/um
- !ruby/object:RI::Constant 
  comment: 
  name: NUMERICENTITY
  value: /&#0*((?:\d+)|(?:x[a-fA-F0-9]+));/
- !ruby/object:RI::Constant 
  comment: 
  name: REFERENCE
  value: /#{Entity::REFERENCE}/
- !ruby/object:RI::Constant 
  comment: 
  name: EREFERENCE
  value: /&(?!#{Entity::NAME};)/
full_name: REXML::Text
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: indent_text
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: node_type
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: value
- !ruby/object:RI::MethodSummary 
  name: value=
- !ruby/object:RI::MethodSummary 
  name: wrap
- !ruby/object:RI::MethodSummary 
  name: write
- !ruby/object:RI::MethodSummary 
  name: write_with_substitution
- !ruby/object:RI::MethodSummary 
  name: xpath
name: Text
superclass: Child
ri/1.8/system/REXML/Text/value%3d-i.yaml000064400000001112150403654710013345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the contents of this text node. This expects the text to be unnormalized. It returns self.
- !ruby/struct:SM::Flow::VERB 
  body: "  e = Element.new( &quot;a&quot; )\n  e.add_text( &quot;foo&quot; )   # &lt;a&gt;foo&lt;/a&gt;\n  e[0].value = &quot;bar&quot;    # &lt;a&gt;bar&lt;/a&gt;\n  e[0].value = &quot;&lt;a&gt;&quot;    # &lt;a&gt;&amp;lt;a&amp;gt;&lt;/a&gt;\n"
full_name: REXML::Text#value=
is_singleton: false
name: value=
params: ( val )
visibility: public
ri/1.8/system/REXML/Text/inspect-i.yaml000064400000000255150403654710013411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Text#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/REXML/Text/indent_text-i.yaml000064400000000346150403654710014272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Text#indent_text
is_singleton: false
name: indent_text
params: (string, level=1, style="\t", indentfirstline=true)
visibility: public
ri/1.8/system/REXML/Text/new-c.yaml000064400000005244150403654710012532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Constructor <tt>arg</tt> if a String, the content is set to the String. If a Text, the object is shallowly cloned.
- !ruby/struct:SM::Flow::P 
  body: <tt>respect_whitespace</tt> (boolean, false) if true, whitespace is respected
- !ruby/struct:SM::Flow::P 
  body: <tt>parent</tt> (nil) if this is a Parent object, the parent will be set to this.
- !ruby/struct:SM::Flow::P 
  body: <tt>raw</tt> (nil) This argument can be given three values. If true, then the value of used to construct this object is expected to contain no unescaped XML markup, and REXML will not change the text. If this value is false, the string may contain any characters, and REXML will escape any and all defined entities whose values are contained in the text. If this value is nil (the default), then the raw value of the parent will be used as the raw value for this node. If there is no raw value for the parent, and no value is supplied, the default is false. Use this field if you have entities defined for some text, and you don't want REXML to escape that text in output.
- !ruby/struct:SM::Flow::VERB 
  body: "  Text.new( &quot;&lt;&amp;&quot;, false, nil, false ) #-&gt; &quot;&amp;lt;&amp;amp;&quot;\n  Text.new( &quot;&amp;lt;&amp;amp;&quot;, false, nil, false ) #-&gt; &quot;&amp;amp;lt;&amp;amp;amp;&quot;\n  Text.new( &quot;&lt;&amp;&quot;, false, nil, true )  #-&gt; Parse exception\n  Text.new( &quot;&amp;lt;&amp;amp;&quot;, false, nil, true )  #-&gt; &quot;&amp;lt;&amp;amp;&quot;\n  # Assume that the entity &quot;s&quot; is defined to be &quot;sean&quot;\n  # and that the entity    &quot;r&quot; is defined to be &quot;russell&quot;\n  Text.new( &quot;sean russell&quot; )          #-&gt; &quot;&amp;s; &amp;r;&quot;\n  Text.new( &quot;sean russell&quot;, false, nil, true ) #-&gt; &quot;sean russell&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <tt>entity_filter</tt> (nil) This can be an array of entities to match in the supplied text. This argument is only useful if <tt>raw</tt> is set to false.
- !ruby/struct:SM::Flow::VERB 
  body: "  Text.new( &quot;sean russell&quot;, false, nil, false, [&quot;s&quot;] ) #-&gt; &quot;&amp;s; russell&quot;\n  Text.new( &quot;sean russell&quot;, false, nil, true, [&quot;s&quot;] ) #-&gt; &quot;sean russell&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: In the last example, the <tt>entity_filter</tt> argument is ignored.
- !ruby/struct:SM::Flow::P 
  body: <tt>pattern</tt> INTERNAL USE ONLY
full_name: REXML::Text::new
is_singleton: true
name: new
params: (arg, respect_whitespace=false, parent=nil, raw=nil, entity_filter=nil, illegal=ILLEGAL )
visibility: public
ri/1.8/system/REXML/Text/write_with_substitution-i.yaml000064400000001277150403654710016772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Writes out text, substituting special characters beforehand. <tt>out</tt> A String, IO, or any other object supporting &lt;&lt;( String ) <tt>input</tt> the text to substitute and the write out
- !ruby/struct:SM::Flow::VERB 
  body: "  z=utf8.unpack(&quot;U*&quot;)\n  ascOut=&quot;&quot;\n  z.each{|r|\n    if r &lt;  0x100\n      ascOut.concat(r.chr)\n    else\n      ascOut.concat(sprintf(&quot;&amp;#x%x;&quot;, r))\n    end\n  }\n  puts ascOut\n"
full_name: REXML::Text#write_with_substitution
is_singleton: false
name: write_with_substitution
params: (out, input)
visibility: public
ri/1.8/system/REXML/Text/node_type-i.yaml000064400000000261150403654710013727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Text#node_type
is_singleton: false
name: node_type
params: ()
visibility: public
ri/1.8/system/REXML/Text/wrap-i.yaml000064400000000306150403654710012712 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Text#wrap
is_singleton: false
name: wrap
params: (string, width, addnewline=false)
visibility: public
ri/1.8/system/REXML/Text/write-i.yaml000064400000000521150403654710013072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: DEPRECATED
- !ruby/struct:SM::Flow::P 
  body: See REXML::Formatters
full_name: REXML::Text#write
is_singleton: false
name: write
params: ( writer, indent=-1, transitive=false, ie_hack=false )
visibility: public
ri/1.8/system/REXML/Text/%3c%3c-i.yaml000064400000000465150403654710012614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Appends text to this text node. The text is appended in the <tt>raw</tt> mode of this text node.
full_name: REXML::Text#<<
is_singleton: false
name: "<<"
params: ( to_append )
visibility: public
ri/1.8/system/REXML/Text/to_s-i.yaml000064400000002017150403654710012706 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the string value of this text node. This string is always escaped, meaning that it is a valid XML text node string, and all entities that can be escaped, have been inserted. This method respects the entity filter set in the constructor.
- !ruby/struct:SM::Flow::VERB 
  body: "  # Assume that the entity &quot;s&quot; is defined to be &quot;sean&quot;, and that the\n  # entity &quot;r&quot; is defined to be &quot;russell&quot;\n  t = Text.new( &quot;&lt; &amp; sean russell&quot;, false, nil, false, ['s'] )\n  t.to_s   #-&gt; &quot;&amp;lt; &amp;amp; &amp;s; russell&quot;\n  t = Text.new( &quot;&lt; &amp; &amp;s; russell&quot;, false, nil, false )\n  t.to_s   #-&gt; &quot;&amp;lt; &amp;amp; &amp;s; russell&quot;\n  u = Text.new( &quot;sean russell&quot;, false, nil, true )\n  u.to_s   #-&gt; &quot;sean russell&quot;\n"
full_name: REXML::Text#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/REXML/Text/clone-i.yaml000064400000000251150403654710013040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Text#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/REXML/Text/unnormalize-c.yaml000064400000000447150403654720014305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unescapes all possible entities
full_name: REXML::Text::unnormalize
is_singleton: true
name: unnormalize
params: ( string, doctype=nil, filter=nil, illegal=nil )
visibility: public
ri/1.8/system/REXML/Text/xpath-i.yaml000064400000000365150403654720013073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: FIXME This probably won't work properly
full_name: REXML::Text#xpath
is_singleton: false
name: xpath
params: ()
visibility: public
ri/1.8/system/REXML/Text/expand-c.yaml000064400000000277150403654720013222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: REXML::Text::expand
is_singleton: true
name: expand
params: (ref, doctype, filter)
visibility: public
ri/1.8/system/REXML/Text/value-i.yaml000064400000001725150403654720013064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the string value of this text. This is the text without entities, as it might be used programmatically, or printed to the console. This ignores the 'raw' attribute setting, and any entity_filter.
- !ruby/struct:SM::Flow::VERB 
  body: "  # Assume that the entity &quot;s&quot; is defined to be &quot;sean&quot;, and that the\n  # entity &quot;r&quot; is defined to be &quot;russell&quot;\n  t = Text.new( &quot;&lt; &amp; sean russell&quot;, false, nil, false, ['s'] )\n  t.value   #-&gt; &quot;&lt; &amp; sean russell&quot;\n  t = Text.new( &quot;&lt; &amp; &amp;s; russell&quot;, false, nil, false )\n  t.value   #-&gt; &quot;&lt; &amp; sean russell&quot;\n  u = Text.new( &quot;sean russell&quot;, false, nil, true )\n  u.value   #-&gt; &quot;sean russell&quot;\n"
full_name: REXML::Text#value
is_singleton: false
name: value
params: ()
visibility: public
ri/1.8/system/REXML/Text/read_with_substitution-c.yaml000064400000000445150403654720016542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reads text, substituting entities
full_name: REXML::Text::read_with_substitution
is_singleton: true
name: read_with_substitution
params: ( input, illegal=nil )
visibility: public
ri/1.8/system/Iconv/IllegalSequence/cdesc-IllegalSequence.yaml000064400000000676150403654730020155 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Input conversion stopped due to an input byte that does not belong to the input codeset, or the output codeset does not contain the character.
constants: []

full_name: Iconv::IllegalSequence
includes: 
- !ruby/object:RI::IncludedModule 
  name: Iconv::Failure
instance_methods: []

name: IllegalSequence
superclass: ArgError
ri/1.8/system/Iconv/OutOfRange/cdesc-OutOfRange.yaml000064400000000527150403654730016066 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Iconv library internal error. Must not occur.
constants: []

full_name: Iconv::OutOfRange
includes: 
- !ruby/object:RI::IncludedModule 
  name: Iconv::Failure
instance_methods: []

name: OutOfRange
superclass: RuntimeError
ri/1.8/system/Iconv/conv-c.yaml000064400000000664150403654730012154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: Iconv::conv"
- !ruby/struct:SM::Flow::P 
  body: Shorthand for
- !ruby/struct:SM::Flow::VERB 
  body: "  Iconv.iconv(to, from, str).join\n"
- !ruby/struct:SM::Flow::P 
  body: See Iconv.iconv.
full_name: Iconv::conv
is_singleton: true
name: conv
params: " Iconv.conv(to, from, str)\n"
visibility: public
ri/1.8/system/Iconv/InvalidCharacter/cdesc-InvalidCharacter.yaml000064400000000633150403654740020451 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Input conversion stopped due to an incomplete character or shift sequence at the end of the input buffer.
constants: []

full_name: Iconv::InvalidCharacter
includes: 
- !ruby/object:RI::IncludedModule 
  name: Iconv::Failure
instance_methods: []

name: InvalidCharacter
superclass: ArgError
ri/1.8/system/Iconv/new-c.yaml000064400000002063150403654740011774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates new code converter from a coding-system designated with <tt>from</tt> to another one designated with <tt>to</tt>.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+to+:"
    body: encoding name for destination
  - !ruby/struct:SM::Flow::LI 
    label: "+from+:"
    body: encoding name for source
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exceptions
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "TypeError:"
    body: if <tt>to</tt> or <tt>from</tt> aren't String
  - !ruby/struct:SM::Flow::LI 
    label: "InvalidEncoding:"
    body: if designated converter couldn't find out
  - !ruby/struct:SM::Flow::LI 
    label: "SystemCallError:"
    body: if <tt>iconv_open(3)</tt> fails
  type: :NOTE
full_name: Iconv::new
is_singleton: true
name: new
params: " Iconv.new(to, from)\n"
visibility: public
ri/1.8/system/Iconv/cdesc-Iconv.yaml000064400000001502150403654740013115 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: charset_map
- !ruby/object:RI::MethodSummary 
  name: conv
- !ruby/object:RI::MethodSummary 
  name: iconv
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-class: Iconv::BrokenLibrary"
- !ruby/struct:SM::Flow::P 
  body: Detected a bug of underlying iconv(3) libray.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: returns an error without setting errno properly
  type: :BULLET
constants: []

full_name: Iconv
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: iconv
name: Iconv
superclass: Data
ri/1.8/system/Iconv/charset_map-c.yaml000064400000000445150403654750013474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the map from canonical name to system dependent name.
full_name: Iconv::charset_map
is_singleton: true
name: charset_map
params: " Iconv.charset_map\n"
visibility: public
ri/1.8/system/Iconv/Failure/success-i.yaml000064400000001111150403654750014242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns string(s) translated successfully until the exception occurred.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: In the case of failure occurred within Iconv.iconv, returned value is an array of strings translated successfully preceding failure and the last element is string on the way.
  type: :BULLET
full_name: Iconv::Failure#success
is_singleton: false
name: success
params: " success\n"
visibility: public
ri/1.8/system/Iconv/Failure/inspect-i.yaml000064400000000475150403654750014253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns inspected string like as: #&lt;<em>class</em>: <em>success</em>, <em>failed</em>&gt;"
full_name: Iconv::Failure#inspect
is_singleton: false
name: inspect
params: " inspect\n"
visibility: public
ri/1.8/system/Iconv/Failure/new-c.yaml000064400000002074150403654750013366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates new code converter from a coding-system designated with <tt>from</tt> to another one designated with <tt>to</tt>.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+to+:"
    body: encoding name for destination
  - !ruby/struct:SM::Flow::LI 
    label: "+from+:"
    body: encoding name for source
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exceptions
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "TypeError:"
    body: if <tt>to</tt> or <tt>from</tt> aren't String
  - !ruby/struct:SM::Flow::LI 
    label: "InvalidEncoding:"
    body: if designated converter couldn't find out
  - !ruby/struct:SM::Flow::LI 
    label: "SystemCallError:"
    body: if <tt>iconv_open(3)</tt> fails
  type: :NOTE
full_name: Iconv::Failure::new
is_singleton: true
name: new
params: " Iconv.new(to, from)\n"
visibility: public
ri/1.8/system/Iconv/Failure/failed-i.yaml000064400000000507150403654750014026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns substring of the original string passed to Iconv that starts at the character caused the exception.
full_name: Iconv::Failure#failed
is_singleton: false
name: failed
params: " failed\n"
visibility: public
ri/1.8/system/Iconv/Failure/cdesc-Failure.yaml000064400000000703150403654750015020 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Base attributes for Iconv exceptions.
constants: []

full_name: Iconv::Failure
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: failed
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: success
name: Failure
superclass: 
ri/1.8/system/Iconv/close-i.yaml000064400000001016150403654750012314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finishes conversion.
- !ruby/struct:SM::Flow::P 
  body: "After calling this, calling Iconv#iconv will cause an exception, but multiple calls of #close are guaranteed to end successfully."
- !ruby/struct:SM::Flow::P 
  body: Returns a string containing the byte sequence to change the output buffer to its initial shift state.
full_name: Iconv#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Iconv/iconv-i.yaml000064400000003346150403654750012335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: Iconv#iconv"
- !ruby/struct:SM::Flow::P 
  body: Converts string and returns the result.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: If <tt>str</tt> is a String, converts <tt>str[start, length]</tt> and returns the converted string.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: If <tt>str</tt> is <tt>nil</tt>, places converter itself into initial shift state and just returns a string containing the byte sequence to change the output buffer to its initial shift state.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Otherwise, raises an exception.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "str:"
    body: string to be converted, or nil
  - !ruby/struct:SM::Flow::LI 
    label: "start:"
    body: starting offset
  - !ruby/struct:SM::Flow::LI 
    label: "length:"
    body: conversion length; nil or -1 means whole the string from start
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exceptions
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: IconvIllegalSequence
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: IconvInvalidCharacter
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: IconvOutOfRange
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Examples
- !ruby/struct:SM::Flow::P 
  body: See the Iconv documentation.
full_name: Iconv#iconv
is_singleton: false
name: iconv
params: " iconv(str, start=0, length=-1)\n"
visibility: public
ri/1.8/system/Iconv/BrokenLibrary/cdesc-BrokenLibrary.yaml000064400000001001150403654750017344 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Detected a bug of underlying iconv(3) libray.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: returns an error without setting errno properly
  type: :BULLET
constants: []

full_name: Iconv::BrokenLibrary
includes: 
- !ruby/object:RI::IncludedModule 
  name: Iconv::Failure
instance_methods: []

name: BrokenLibrary
superclass: RuntimeError
ri/1.8/system/Iconv/InvalidEncoding/cdesc-InvalidEncoding.yaml000064400000000550150403654750020134 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Requested coding-system is not available on this system.
constants: []

full_name: Iconv::InvalidEncoding
includes: 
- !ruby/object:RI::IncludedModule 
  name: Iconv::Failure
instance_methods: []

name: InvalidEncoding
superclass: ArgError
ri/1.8/system/Iconv/iconv-c.yaml000064400000001570150403654750012324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: Iconv::iconv"
- !ruby/struct:SM::Flow::P 
  body: Shorthand for
- !ruby/struct:SM::Flow::VERB 
  body: "  Iconv.open(to, from) { |cd|\n    (strs + [nil]).collect { |s| cd.iconv(s) }\n  }\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>to, from</tt>:"
    body: see Iconv.new
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>strs</tt>:"
    body: strings to be converted
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exceptions
- !ruby/struct:SM::Flow::P 
  body: Exceptions thrown by Iconv.new, Iconv.open and Iconv#iconv.
full_name: Iconv::iconv
is_singleton: true
name: iconv
params: " Iconv.iconv(to, from, *strs)\n"
visibility: public
ri/1.8/system/Iconv/open-c.yaml000064400000000625150403654750012147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to Iconv.new except that when it is called with a block, it yields with the new instance and closes it, and returns the result which returned from the block.
full_name: Iconv::open
is_singleton: true
name: open
params: " Iconv.open(to, from) { |iconv| ... }\n"
visibility: public
ri/1.8/system/Array/permutation-i.yaml000064400000002525150403654750013564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: When invoked with a block, yield all permutations of length <em>n</em> of the elements of <em>ary</em>, then return the array itself. If <em>n</em> is not specified, yield all permutations of all elements. The implementation makes no guarantees about the order in which the permutations are yielded.
- !ruby/struct:SM::Flow::P 
  body: When invoked without a block, return an enumerator object instead.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "    a = [1, 2, 3]\n    a.permutation.to_a     #=&gt; [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n    a.permutation(1).to_a  #=&gt; [[1],[2],[3]]\n    a.permutation(2).to_a  #=&gt; [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]\n    a.permutation(3).to_a  #=&gt; [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n    a.permutation(0).to_a  #=&gt; [[]] # one permutation of length 0\n    a.permutation(4).to_a  #=&gt; []   # no permutations of length 4\n"
full_name: Array#permutation
is_singleton: false
name: permutation
params: |
  ary.permutation { |p| block }          -> array
  ary.permutation                        -> enumerator
  ary.permutation(n) { |p| block }       -> array
  ary.permutation(n)                     -> enumerator

visibility: public
ri/1.8/system/Array/shuffle-i.yaml000064400000000651150403654750012647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array with elements of this array shuffled.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ 1, 2, 3 ]           #=&gt; [1, 2, 3]\n   a.shuffle                 #=&gt; [2, 3, 1]\n"
full_name: Array#shuffle
is_singleton: false
name: shuffle
params: |
  array.shuffle -> an_array

visibility: public
ri/1.8/system/Array/shuffle%21-i.yaml000064400000000442150403654750013055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Shuffles elements in <em>self</em> in place.
full_name: Array#shuffle!
is_singleton: false
name: shuffle!
params: |
  array.shuffle!        -> array or nil

visibility: public
ri/1.8/system/Array/delete_at-i.yaml000064400000001160150403654750013135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the element at the specified index, returning that element, or <tt>nil</tt> if the index is out of range. See also <tt>Array#slice!</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w( ant bat cat dog )\n   a.delete_at(2)    #=&gt; &quot;cat&quot;\n   a                 #=&gt; [&quot;ant&quot;, &quot;bat&quot;, &quot;dog&quot;]\n   a.delete_at(99)   #=&gt; nil\n"
full_name: Array#delete_at
is_singleton: false
name: delete_at
params: |
  array.delete_at(index)  -> obj or nil

visibility: public
ri/1.8/system/Array/rassoc-i.yaml000064400000001331150403654750012501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Searches through the array whose elements are also arrays. Compares <em>key</em> with the second element of each contained array using <tt>==</tt>. Returns the first contained array that matches. See also <tt>Array#assoc</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ [ 1, &quot;one&quot;], [2, &quot;two&quot;], [3, &quot;three&quot;], [&quot;ii&quot;, &quot;two&quot;] ]\n   a.rassoc(&quot;two&quot;)    #=&gt; [2, &quot;two&quot;]\n   a.rassoc(&quot;four&quot;)   #=&gt; nil\n"
full_name: Array#rassoc
is_singleton: false
name: rassoc
params: |
  array.rassoc(key) -> an_array or nil

visibility: public
ri/1.8/system/Array/size-i.yaml000064400000000331150403654750012160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #length"
full_name: Array#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Array/reverse%21-i.yaml000064400000001001150403654750013064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reverses <em>self</em> in place.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.reverse!       #=&gt; [&quot;c&quot;, &quot;b&quot;, &quot;a&quot;]\n   a                #=&gt; [&quot;c&quot;, &quot;b&quot;, &quot;a&quot;]\n"
full_name: Array#reverse!
is_singleton: false
name: reverse!
params: |
  array.reverse!   -> array 

visibility: public
ri/1.8/system/Array/eql%3f-i.yaml000064400000000545150403654750012274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>array</em> and <em>other</em> are the same object, or are both arrays with the same content.
full_name: Array#eql?
is_singleton: false
name: eql?
params: |
  array.eql?(other)  -> true or false

visibility: public
ri/1.8/system/Array/slice-i.yaml000064400000002751150403654750012315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Reference---Returns the element at <em>index</em>, or returns a subarray starting at <em>start</em> and continuing for <em>length</em> elements, or returns a subarray specified by <em>range</em>. Negative indices count backward from the end of the array (-1 is the last element). Returns nil if the index (or starting index) are out of range.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   a[2] +  a[0] + a[1]    #=&gt; &quot;cab&quot;\n   a[6]                   #=&gt; nil\n   a[1, 2]                #=&gt; [ &quot;b&quot;, &quot;c&quot; ]\n   a[1..3]                #=&gt; [ &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a[4..7]                #=&gt; [ &quot;e&quot; ]\n   a[6..10]               #=&gt; nil\n   a[-3, 3]               #=&gt; [ &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   # special cases\n   a[5]                   #=&gt; nil\n   a[5, 1]                #=&gt; []\n   a[5..10]               #=&gt; []\n"
full_name: Array#slice
is_singleton: false
name: slice
params: |
  array[index]                -> obj      or nil
  array[start, length]        -> an_array or nil
  array[range]                -> an_array or nil
  array.slice(index)          -> obj      or nil
  array.slice(start, length)  -> an_array or nil
  array.slice(range)          -> an_array or nil

visibility: public
ri/1.8/system/Array/slice%21-i.yaml000064400000001725150403654760012526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Deletes the element(s) given by an index (optionally with a length) or by a range. Returns the deleted object, subarray, or <tt>nil</tt> if the index is out of range. Equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "   def slice!(*args)\n     result = self[*args]\n     self[*args] = nil\n     result\n   end\n\n   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.slice!(1)     #=&gt; &quot;b&quot;\n   a               #=&gt; [&quot;a&quot;, &quot;c&quot;]\n   a.slice!(-1)    #=&gt; &quot;c&quot;\n   a               #=&gt; [&quot;a&quot;]\n   a.slice!(100)   #=&gt; nil\n   a               #=&gt; [&quot;a&quot;]\n"
full_name: Array#slice!
is_singleton: false
name: slice!
params: |
  array.slice!(index)         -> obj or nil
  array.slice!(start, length) -> sub_array or nil
  array.slice!(range)         -> sub_array or nil 

visibility: public
ri/1.8/system/Array/indexes-i.yaml000064400000000525150403654760012653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deprecated; use <tt>Array#values_at</tt>.
full_name: Array#indexes
is_singleton: false
name: indexes
params: |
  array.indexes( i1, i2, ... iN )   -> an_array
  array.indices( i1, i2, ... iN )   -> an_array

visibility: public
ri/1.8/system/Array/pack-i.yaml000064400000011024150403654760012126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Packs the contents of <em>arr</em> into a binary sequence according to the directives in <em>aTemplateString</em> (see the table below) Directives ``A,'' ``a,'' and ``Z'' may be followed by a count, which gives the width of the resulting field. The remaining directives also may take a count, indicating the number of array elements to convert. If the count is an asterisk (``<tt>*</tt>''), all remaining array elements will be converted. Any of the directives ``<tt>sSiIlL</tt>'' may be followed by an underscore (``<tt>_</tt>'') to use the underlying platform's native size for the specified type; otherwise, they use a platform-independent size. Spaces are ignored in the template string. See also <tt>String#unpack</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   n = [ 65, 66, 67 ]\n   a.pack(&quot;A3A3A3&quot;)   #=&gt; &quot;a  b  c  &quot;\n   a.pack(&quot;a3a3a3&quot;)   #=&gt; &quot;a\\000\\000b\\000\\000c\\000\\000&quot;\n   n.pack(&quot;ccc&quot;)      #=&gt; &quot;ABC&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: Directives for <tt>pack</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: " Integer   | Array   |\n Directive | Element | Meaning\n ------------------------------------------------------------------------\n    C      | Integer | 8-bit unsigned integer (unsigned char)\n    S      | Integer | 16-bit unsigned integer, native endian (uint16_t)\n    L      | Integer | 32-bit unsigned integer, native endian (uint32_t)\n    Q      | Integer | 64-bit unsigned integer, native endian (uint64_t)\n           |         |\n    c      | Integer | 8-bit signed integer (char)\n    s      | Integer | 16-bit signed integer, native endian (int16_t)\n    l      | Integer | 32-bit signed integer, native endian (int32_t)\n    q      | Integer | 64-bit signed integer, native endian (int64_t)\n           |         |\n    S_     | Integer | unsigned short, native endian\n    I, I_  | Integer | unsigned int, native endian\n    L_     | Integer | unsigned long, native endian\n           |         |\n    s_     | Integer | signed short, native endian\n    i, i_  | Integer | signed int, native endian\n    l_     | Integer | signed long, native endian\n           |         |\n    n      | Integer | 16-bit unsigned integer, network (big-endian) byte order\n    N      | Integer | 32-bit unsigned integer, network (big-endian) byte order\n    v      | Integer | 16-bit unsigned integer, VAX (little-endian) byte order\n    V      | Integer | 32-bit unsigned integer, VAX (little-endian) byte order\n           |         |\n    U      | Integer | UTF-8 character\n    w      | Integer | BER-compressed integer\n\n Float     |         |\n Directive |         | Meaning\n ------------------------------------------------------------------------\n    D, d   | Float   | double-precision float, native format\n    F, f   | Float   | single-precision float, native format\n    E      | Float   | double-precision float, little-endian byte order\n    e      | Float   | single-precision float, little-endian byte order\n    G      | Float   | double-precision float, network (big-endian) byte order\n    g      | Float   | single-precision float, network (big-endian) byte order\n\n String    |         |\n Directive |         | Meaning\n ------------------------------------------------------------------------\n    A      | String  | arbitrary binary string (space padded, count is width)\n    a      | String  | arbitrary binary string (null padded, count is width)\n    Z      | String  | same as ``a'', except that null is added with *\n    B      | String  | bit string (MSB first)\n    b      | String  | bit string (LSB first)\n    H      | String  | hex string (high nibble first)\n    h      | String  | hex string (low nibble first)\n    u      | String  | UU-encoded string\n    M      | String  | quoted printable, MIME encoding (see RFC2045)\n    m      | String  | base64 encoded string (see RFC 2045, count is width)\n    P      | String  | pointer to a structure (fixed-length string)\n    p      | String  | pointer to a null-terminated string\n\n Misc.     |         |\n Directive |         | Meaning\n ------------------------------------------------------------------------\n    @      | ---     | moves to absolute position\n    X      | ---     | back up a byte\n    x      | ---     | null byte\n"
full_name: Array#pack
is_singleton: false
name: pack
params: |
  arr.pack ( aTemplateString ) -> aBinaryString

visibility: public
ri/1.8/system/Array/flatten-i.yaml000064400000001602150403654760012646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array that is a one-dimensional flattening of this array (recursively). That is, for every element that is an array, extract its elements into the new array. If the optional <em>level</em> argument determines the level of recursion to flatten.
- !ruby/struct:SM::Flow::VERB 
  body: "   s = [ 1, 2, 3 ]           #=&gt; [1, 2, 3]\n   t = [ 4, 5, 6, [7, 8] ]   #=&gt; [4, 5, 6, [7, 8]]\n   a = [ s, t, 9, 10 ]       #=&gt; [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]\n   a.flatten                 #=&gt; [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n   a = [ 1, 2, [3, [4, 5] ] ]\n   a.flatten(1)              #=&gt; [1, 2, 3, [4, 5]]\n"
full_name: Array#flatten
is_singleton: false
name: flatten
params: |
  array.flatten -> an_array
  array.flatten(level) -> an_array

visibility: public
ri/1.8/system/Array/%5b%5d-i.yaml000064400000002745150403654760012073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Reference---Returns the element at <em>index</em>, or returns a subarray starting at <em>start</em> and continuing for <em>length</em> elements, or returns a subarray specified by <em>range</em>. Negative indices count backward from the end of the array (-1 is the last element). Returns nil if the index (or starting index) are out of range.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   a[2] +  a[0] + a[1]    #=&gt; &quot;cab&quot;\n   a[6]                   #=&gt; nil\n   a[1, 2]                #=&gt; [ &quot;b&quot;, &quot;c&quot; ]\n   a[1..3]                #=&gt; [ &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a[4..7]                #=&gt; [ &quot;e&quot; ]\n   a[6..10]               #=&gt; nil\n   a[-3, 3]               #=&gt; [ &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   # special cases\n   a[5]                   #=&gt; nil\n   a[5, 1]                #=&gt; []\n   a[5..10]               #=&gt; []\n"
full_name: Array#[]
is_singleton: false
name: "[]"
params: |
  array[index]                -> obj      or nil
  array[start, length]        -> an_array or nil
  array[range]                -> an_array or nil
  array.slice(index)          -> obj      or nil
  array.slice(start, length)  -> an_array or nil
  array.slice(range)          -> an_array or nil

visibility: public
ri/1.8/system/Array/empty%3f-i.yaml000064400000000564150403654760012653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>self</em> array contains no elements.
- !ruby/struct:SM::Flow::VERB 
  body: "   [].empty?   #=&gt; true\n"
full_name: Array#empty?
is_singleton: false
name: empty?
params: |
  array.empty?   -> true or false

visibility: public
ri/1.8/system/Array/each-i.yaml000064400000001114150403654760012107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> once for each element in <em>self</em>, passing that element as a parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.each {|x| print x, &quot; -- &quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: "produces:"
- !ruby/struct:SM::Flow::VERB 
  body: "   a -- b -- c --\n"
full_name: Array#each
is_singleton: false
name: each
params: |
  array.each {|item| block }   ->   array

visibility: public
ri/1.8/system/Array/frozen%3f-i.yaml000064400000000506150403654760013014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if this array is frozen (or temporarily frozen while being sorted).
full_name: Array#frozen?
is_singleton: false
name: frozen?
params: |
  array.frozen?  -> true or false

visibility: public
ri/1.8/system/Array/%3c%3d%3e-i.yaml000064400000001767150403654760012370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comparison---Returns an integer (-1, 0, or +1) if this array is less than, equal to, or greater than other_array. Each object in each array is compared (using &lt;=&gt;). If any value isn't equal, then that inequality is the return value. If all the values found are equal, then the return is based on a comparison of the array lengths. Thus, two arrays are ``equal'' according to <tt>Array#&lt;=&gt;</tt> if and only if they have the same length and the value of each element is equal to the value of the corresponding element in the other array.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, &quot;a&quot;, &quot;c&quot; ]    &lt;=&gt; [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]   #=&gt; -1\n   [ 1, 2, 3, 4, 5, 6 ] &lt;=&gt; [ 1, 2 ]            #=&gt; +1\n"
full_name: Array#<=>
is_singleton: false
name: <=>
params: |
  array <=> other_array   ->  -1, 0, +1

visibility: public
ri/1.8/system/Array/select-i.yaml000064400000001112150403654760012464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the block passing in successive elements from <em>array</em>, returning an array containing those elements for which the block returns a true value (equivalent to <tt>Enumerable#select</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w{ a b c d e f }\n   a.select {|v| v =~ /[aeiou]/}   #=&gt; [&quot;a&quot;, &quot;e&quot;]\n"
full_name: Array#select
is_singleton: false
name: select
params: |
  array.select {|item| block } -> an_array

visibility: public
ri/1.8/system/Array/to_a-i.yaml000064400000000502150403654760012131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>self</em>. If called on a subclass of Array, converts the receiver to an Array object.
full_name: Array#to_a
is_singleton: false
name: to_a
params: |
  array.to_a     -> array

visibility: public
ri/1.8/system/Array/last-i.yaml000064400000000766150403654760012166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the last element(s) of <em>self</em>. If the array is empty, the first form returns <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;w&quot;, &quot;x&quot;, &quot;y&quot;, &quot;z&quot; ].last   #=&gt; &quot;z&quot;\n"
full_name: Array#last
is_singleton: false
name: last
params: |
  array.last     ->  obj or nil
  array.last(n)  ->  an_array

visibility: public
ri/1.8/system/Array/at-i.yaml000064400000001304150403654760011614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the element at <em>index</em>. A negative index counts from the end of <em>self</em>. Returns <tt>nil</tt> if the index is out of range. See also <tt>Array#[]</tt>. (<tt>Array#at</tt> is slightly faster than <tt>Array#[]</tt>, as it does not accept ranges and so on.)
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   a.at(0)     #=&gt; &quot;a&quot;\n   a.at(-1)    #=&gt; &quot;e&quot;\n"
full_name: Array#at
is_singleton: false
name: at
params: |
  array.at(index)   ->   obj  or nil

visibility: public
ri/1.8/system/Array/cdesc-Array.yaml000064400000012103150403654760013116 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Arrays are ordered, integer-indexed collections of any object. Array indexing starts at 0, as in C or Java. A negative index is assumed to be relative to the end of the array---that is, an index of -1 indicates the last element of the array, -2 is the next to last element in the array, and so on.
constants: []

full_name: Array
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: abbrev
- !ruby/object:RI::MethodSummary 
  name: assoc
- !ruby/object:RI::MethodSummary 
  name: at
- !ruby/object:RI::MethodSummary 
  name: choice
- !ruby/object:RI::MethodSummary 
  name: clear
- !ruby/object:RI::MethodSummary 
  name: collect
- !ruby/object:RI::MethodSummary 
  name: collect!
- !ruby/object:RI::MethodSummary 
  name: combination
- !ruby/object:RI::MethodSummary 
  name: compact
- !ruby/object:RI::MethodSummary 
  name: compact!
- !ruby/object:RI::MethodSummary 
  name: concat
- !ruby/object:RI::MethodSummary 
  name: count
- !ruby/object:RI::MethodSummary 
  name: cycle
- !ruby/object:RI::MethodSummary 
  name: dclone
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete_at
- !ruby/object:RI::MethodSummary 
  name: delete_if
- !ruby/object:RI::MethodSummary 
  name: drop
- !ruby/object:RI::MethodSummary 
  name: drop_while
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_index
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: fill
- !ruby/object:RI::MethodSummary 
  name: find_index
- !ruby/object:RI::MethodSummary 
  name: first
- !ruby/object:RI::MethodSummary 
  name: flatten
- !ruby/object:RI::MethodSummary 
  name: flatten!
- !ruby/object:RI::MethodSummary 
  name: frozen?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: index
- !ruby/object:RI::MethodSummary 
  name: indexes
- !ruby/object:RI::MethodSummary 
  name: indices
- !ruby/object:RI::MethodSummary 
  name: initialize_copy
- !ruby/object:RI::MethodSummary 
  name: insert
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: last
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: map
- !ruby/object:RI::MethodSummary 
  name: map!
- !ruby/object:RI::MethodSummary 
  name: nitems
- !ruby/object:RI::MethodSummary 
  name: pack
- !ruby/object:RI::MethodSummary 
  name: permutation
- !ruby/object:RI::MethodSummary 
  name: pop
- !ruby/object:RI::MethodSummary 
  name: pretty_print
- !ruby/object:RI::MethodSummary 
  name: pretty_print_cycle
- !ruby/object:RI::MethodSummary 
  name: product
- !ruby/object:RI::MethodSummary 
  name: push
- !ruby/object:RI::MethodSummary 
  name: rassoc
- !ruby/object:RI::MethodSummary 
  name: reject
- !ruby/object:RI::MethodSummary 
  name: reject!
- !ruby/object:RI::MethodSummary 
  name: replace
- !ruby/object:RI::MethodSummary 
  name: reverse
- !ruby/object:RI::MethodSummary 
  name: reverse!
- !ruby/object:RI::MethodSummary 
  name: reverse_each
- !ruby/object:RI::MethodSummary 
  name: rindex
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: shelljoin
- !ruby/object:RI::MethodSummary 
  name: shift
- !ruby/object:RI::MethodSummary 
  name: shuffle
- !ruby/object:RI::MethodSummary 
  name: shuffle!
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: slice
- !ruby/object:RI::MethodSummary 
  name: slice!
- !ruby/object:RI::MethodSummary 
  name: sort
- !ruby/object:RI::MethodSummary 
  name: sort!
- !ruby/object:RI::MethodSummary 
  name: take
- !ruby/object:RI::MethodSummary 
  name: take_while
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_ary
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: transpose
- !ruby/object:RI::MethodSummary 
  name: uniq
- !ruby/object:RI::MethodSummary 
  name: uniq!
- !ruby/object:RI::MethodSummary 
  name: unshift
- !ruby/object:RI::MethodSummary 
  name: values_at
- !ruby/object:RI::MethodSummary 
  name: yaml_initialize
- !ruby/object:RI::MethodSummary 
  name: zip
- !ruby/object:RI::MethodSummary 
  name: "|"
name: Array
superclass: Object
ri/1.8/system/Array/nitems-i.yaml000064400000000650150403654760012512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of non-<tt>nil</tt> elements in <em>self</em>.
- !ruby/struct:SM::Flow::P 
  body: May be zero.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, nil, 3, nil, 5 ].nitems   #=&gt; 3\n"
full_name: Array#nitems
is_singleton: false
name: nitems
params: |
  array.nitems -> int

visibility: public
ri/1.8/system/Array/pop-i.yaml000064400000001354150403654760012013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes the last element from <em>self</em> and returns it, or <tt>nil</tt> if the array is empty.
- !ruby/struct:SM::Flow::P 
  body: If a number <em>n</em> is given, returns an array of the last n elements (or less) just like <tt>array.slice!(-n, n)</tt> does.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a.pop     #=&gt; &quot;d&quot;\n   a.pop(2)  #=&gt; [&quot;b&quot;, &quot;c&quot;]\n   a         #=&gt; [&quot;a&quot;]\n"
full_name: Array#pop
is_singleton: false
name: pop
params: |
  array.pop    -> obj or nil
  array.pop(n) -> array

visibility: public
ri/1.8/system/Array/%7c-i.yaml000064400000001046150403654760011571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set Union---Returns a new array by joining this array with other_array, removing duplicates.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ] | [ &quot;c&quot;, &quot;d&quot;, &quot;a&quot; ]\n          #=&gt; [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n"
full_name: Array#|
is_singleton: false
name: "|"
params: |
  array | other_array     ->  an_array

visibility: public
ri/1.8/system/Array/drop_while-i.yaml000064400000001025150403654770013345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Drops elements up to, but not including, the first element for which the block returns nil or false and returns an array containing the remaining elements.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.drop_while {|i| i &lt; 3 }   # =&gt; [3, 4, 5, 0]\n"
full_name: Array#drop_while
is_singleton: false
name: drop_while
params: |
  ary.drop_while {|arr| block }   => array

visibility: public
ri/1.8/system/Array/cycle-i.yaml000064400000001311150403654770012306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> for each element repeatedly <em>n</em> times or forever if none or nil is given. If a non-positive number is given or the array is empty, does nothing. Returns nil if the loop has finished without getting interrupted.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]\n   a.cycle {|x| puts x }  # print, a, b, c, a, b, c,.. forever.\n   a.cycle(2) {|x| puts x }  # print, a, b, c, a, b, c.\n"
full_name: Array#cycle
is_singleton: false
name: cycle
params: |
  ary.cycle {|obj| block }
  ary.cycle(n) {|obj| block }

visibility: public
ri/1.8/system/Array/abbrev-i.yaml000064400000001353150403654770012456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calculates the set of unambiguous abbreviations for the strings in <tt>self</tt>. If passed a pattern or a string, only the strings matching the pattern or starting with the string are considered.
- !ruby/struct:SM::Flow::VERB 
  body: "  %w{ car cone }.abbrev   #=&gt; { &quot;ca&quot; =&gt; &quot;car&quot;, &quot;car&quot; =&gt; &quot;car&quot;,\n                                &quot;co&quot; =&gt; &quot;cone&quot;, &quot;con&quot; =&gt; cone&quot;,\n                                &quot;cone&quot; =&gt; &quot;cone&quot; }\n"
full_name: Array#abbrev
is_singleton: false
name: abbrev
params: (pattern = nil)
visibility: public
ri/1.8/system/Array/%26-i.yaml000064400000000641150403654770011510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set Intersection---Returns a new array containing elements common to the two arrays, with no duplicates.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, 1, 3, 5 ] &amp; [ 1, 2, 3 ]   #=&gt; [ 1, 3 ]\n"
full_name: Array#&
is_singleton: false
name: "&"
params: |
  array & other_array

visibility: public
ri/1.8/system/Array/to_yaml-i.yaml000064400000000262150403654770012657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Array#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Array/concat-i.yaml000064400000000745150403654770012470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Appends the elements in other_array to <em>self</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, &quot;b&quot; ].concat( [&quot;c&quot;, &quot;d&quot;] ) #=&gt; [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n"
full_name: Array#concat
is_singleton: false
name: concat
params: |
  array.concat(other_array)   ->  array

visibility: public
ri/1.8/system/Array/compact-i.yaml000064400000000766150403654770012652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>self</em> with all <tt>nil</tt> elements removed.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, nil, &quot;b&quot;, nil, &quot;c&quot;, nil ].compact\n                     #=&gt; [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n"
full_name: Array#compact
is_singleton: false
name: compact
params: |
  array.compact     ->  an_array

visibility: public
ri/1.8/system/Array/hash-i.yaml000064400000000550150403654770012136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compute a hash-code for this array. Two arrays with the same content will have the same hash code (and will compare using <tt>eql?</tt>).
full_name: Array#hash
is_singleton: false
name: hash
params: |
  array.hash   -> fixnum

visibility: public
ri/1.8/system/Array/values_at-i.yaml000064400000001154150403654770013177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the elements in <em>self</em> corresponding to the given selector(s). The selectors may be either integer indices or ranges. See also <tt>Array#select</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w{ a b c d e f }\n   a.values_at(1, 3, 5)\n   a.values_at(1, 3, 5, 7)\n   a.values_at(-1, -3, -5, -7)\n   a.values_at(1..3, 2...5)\n"
full_name: Array#values_at
is_singleton: false
name: values_at
params: |
  array.values_at(selector,... )  -> an_array

visibility: public
ri/1.8/system/Array/take_while-i.yaml000064400000000767150403654770013341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes elements to the block until the block returns nil or false, then stops iterating and returns an array of all prior elements.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.take_while {|i| i &lt; 3 }   # =&gt; [1, 2]\n"
full_name: Array#take_while
is_singleton: false
name: take_while
params: |
  ary.take_while {|arr| block }   => array

visibility: public
ri/1.8/system/Array/yaml_initialize-i.yaml000064400000000301150403654770014370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Array#yaml_initialize
is_singleton: false
name: yaml_initialize
params: ( tag, val )
visibility: public
ri/1.8/system/Array/sort%21-i.yaml000064400000001607150403654770012416 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sorts <em>self</em>. Comparisons for the sort will be done using the <tt>&lt;=&gt;</tt> operator or using an optional code block. The block implements a comparison between <em>a</em> and <em>b</em>, returning -1, 0, or +1. See also <tt>Enumerable#sort_by</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;d&quot;, &quot;a&quot;, &quot;e&quot;, &quot;c&quot;, &quot;b&quot; ]\n   a.sort                    #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;]\n   a.sort {|x,y| y &lt;=&gt; x }   #=&gt; [&quot;e&quot;, &quot;d&quot;, &quot;c&quot;, &quot;b&quot;, &quot;a&quot;]\n"
full_name: Array#sort!
is_singleton: false
name: sort!
params: |
  array.sort!                   -> array
  array.sort! {| a,b | block }  -> array 

visibility: public
ri/1.8/system/Array/delete-i.yaml000064400000001624150403654770012460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes items from <em>self</em> that are equal to <em>obj</em>. If the item is not found, returns <tt>nil</tt>. If the optional code block is given, returns the result of <em>block</em> if the item is not found.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;b&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.delete(&quot;b&quot;)                   #=&gt; &quot;b&quot;\n   a                               #=&gt; [&quot;a&quot;, &quot;c&quot;]\n   a.delete(&quot;z&quot;)                   #=&gt; nil\n   a.delete(&quot;z&quot;) { &quot;not found&quot; }   #=&gt; &quot;not found&quot;\n"
full_name: Array#delete
is_singleton: false
name: delete
params: |
  array.delete(obj)            -> obj or nil 
  array.delete(obj) { block }  -> obj or nil

visibility: public
ri/1.8/system/Array/reject%21-i.yaml000064400000000707150403654770012703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>Array#delete_if</tt>, deleting elements from <em>self</em> for which the block evaluates to true, but returns <tt>nil</tt> if no changes were made. Also see <tt>Enumerable#reject</tt>.
full_name: Array#reject!
is_singleton: false
name: reject!
params: |
  array.reject! {|item| block }  -> array or nil

visibility: public
ri/1.8/system/Array/collect-i.yaml000064400000001420150403654770012635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes <em>block</em> once for each element of <em>self</em>. Creates a new array containing the values returned by the block. See also <tt>Enumerable#collect</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a.collect {|x| x + &quot;!&quot; }   #=&gt; [&quot;a!&quot;, &quot;b!&quot;, &quot;c!&quot;, &quot;d!&quot;]\n   a                          #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]\n"
full_name: Array#collect
is_singleton: false
name: collect
params: |
  array.collect {|item| block }  -> an_array
  array.map     {|item| block }  -> an_array

visibility: public
ri/1.8/system/Array/%2a-i.yaml000064400000001106150403654770011560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Repetition---With a String argument, equivalent to self.join(str). Otherwise, returns a new array built by concatenating the <em>int</em> copies of <em>self</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, 2, 3 ] * 3    #=&gt; [ 1, 2, 3, 1, 2, 3, 1, 2, 3 ]\n   [ 1, 2, 3 ] * &quot;,&quot;  #=&gt; &quot;1,2,3&quot;\n"
full_name: Array#*
is_singleton: false
name: "*"
params: |
  array * int     ->    an_array
  array * str     ->    a_string

visibility: public
ri/1.8/system/Array/indices-i.yaml000064400000000525150403654770012633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deprecated; use <tt>Array#values_at</tt>.
full_name: Array#indices
is_singleton: false
name: indices
params: |
  array.indexes( i1, i2, ... iN )   -> an_array
  array.indices( i1, i2, ... iN )   -> an_array

visibility: public
ri/1.8/system/Array/index-i.yaml000064400000001501150403654770012317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the index of the first object in <em>self</em> such that is <tt>==</tt> to <em>obj</em>. If a block is given instead of an argument, returns first object for which <em>block</em> is true. Returns <tt>nil</tt> if no match is found.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.index(&quot;b&quot;)        #=&gt; 1\n   a.index(&quot;z&quot;)        #=&gt; nil\n   a.index{|x|x==&quot;b&quot;}  #=&gt; 1\n"
- !ruby/struct:SM::Flow::P 
  body: This is an alias of <tt>#find_index</tt>.
full_name: Array#index
is_singleton: false
name: index
params: |
  array.index(obj)           ->  int or nil
  array.index {|item| block} ->  int or nil

visibility: public
ri/1.8/system/Array/delete_if-i.yaml000064400000000777150403654770013146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes every element of <em>self</em> for which <em>block</em> evaluates to <tt>true</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.delete_if {|x| x &gt;= &quot;b&quot; }   #=&gt; [&quot;a&quot;]\n"
full_name: Array#delete_if
is_singleton: false
name: delete_if
params: |
  array.delete_if {|item| block }  -> array

visibility: public
ri/1.8/system/Array/uniq-i.yaml000064400000000745150403654770012175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array by removing duplicate values in <em>self</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;a&quot;, &quot;b&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.uniq   #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]\n"
full_name: Array#uniq
is_singleton: false
name: uniq
params: |
  array.uniq   -> an_array

visibility: public
ri/1.8/system/Array/to_ary-i.yaml000064400000000370150403654770012510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>self</em>.
full_name: Array#to_ary
is_singleton: false
name: to_ary
params: |
  array.to_ary -> array

visibility: public
ri/1.8/system/Array/drop-i.yaml000064400000000654150403654770012164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Drops first n elements from <em>ary</em>, and returns rest elements in an array.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.drop(3)             # =&gt; [4, 5, 0]\n"
full_name: Array#drop
is_singleton: false
name: drop
params: |
  ary.drop(n)               => array

visibility: public
ri/1.8/system/Array/transpose-i.yaml000064400000000673150403654770013237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Assumes that <em>self</em> is an array of arrays and transposes the rows and columns.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [[1,2], [3,4], [5,6]]\n   a.transpose   #=&gt; [[1, 3, 5], [2, 4, 6]]\n"
full_name: Array#transpose
is_singleton: false
name: transpose
params: |
  array.transpose -> an_array

visibility: public
ri/1.8/system/Array/inspect-i.yaml000064400000000424150403655000012643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a printable version of <em>array</em>.
full_name: Array#inspect
is_singleton: false
name: inspect
params: |
  array.inspect  -> string

visibility: public
ri/1.8/system/Array/take-i.yaml000064400000000607150403655000012125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns first n elements from <em>ary</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.take(3)             # =&gt; [1, 2, 3]\n"
full_name: Array#take
is_singleton: false
name: take
params: |
  ary.take(n)               => array

visibility: public
ri/1.8/system/Array/unshift-i.yaml000064400000001134150403655000012655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Prepends objects to the front of <em>array</em>. other elements up one.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a.unshift(&quot;a&quot;)   #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]\n   a.unshift(1, 2)  #=&gt; [ 1, 2, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]\n"
full_name: Array#unshift
is_singleton: false
name: unshift
params: |
  array.unshift(obj, ...)  -> array

visibility: public
ri/1.8/system/Array/uniq%21-i.yaml000064400000001170150403655000012361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes duplicate elements from <em>self</em>. Returns <tt>nil</tt> if no changes are made (that is, no duplicates are found).
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;a&quot;, &quot;b&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.uniq!   #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]\n   b = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   b.uniq!   #=&gt; nil\n"
full_name: Array#uniq!
is_singleton: false
name: uniq!
params: |
  array.uniq! -> array or nil

visibility: public
ri/1.8/system/Array/include%3f-i.yaml000064400000001111150403655000013111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given object is present in <em>self</em> (that is, if any object <tt>==</tt> <em>anObject</em>), <tt>false</tt> otherwise.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.include?(&quot;b&quot;)   #=&gt; true\n   a.include?(&quot;z&quot;)   #=&gt; false\n"
full_name: Array#include?
is_singleton: false
name: include?
params: |
  array.include?(obj)   -> true or false

visibility: public
ri/1.8/system/Array/new-c.yaml000064400000002301150403655000011755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array. In the first form, the new array is empty. In the second it is created with <em>size</em> copies of <em>obj</em> (that is, <em>size</em> references to the same <em>obj</em>). The third form creates a copy of the array passed as a parameter (the array is generated by calling to_ary on the parameter). In the last form, an array of the given size is created. Each element in this array is calculated by passing the element's index to the given block and storing the return value.
- !ruby/struct:SM::Flow::VERB 
  body: "   Array.new\n   Array.new(2)\n   Array.new(5, &quot;A&quot;)\n\n   # only one copy of the object is created\n   a = Array.new(2, Hash.new)\n   a[0]['cat'] = 'feline'\n   a\n   a[1]['cat'] = 'Felix'\n   a\n\n   # here multiple copies are created\n   a = Array.new(2) { Hash.new }\n   a[0]['cat'] = 'feline'\n   a\n\n   squares = Array.new(5) {|i| i*i}\n   squares\n\n   copy = Array.new(squares)\n"
full_name: Array::new
is_singleton: true
name: new
params: |
  Array.new(size=0, obj=nil)
  Array.new(array)
  Array.new(size) {|index| block }

visibility: public
ri/1.8/system/Array/pretty_print-i.yaml000064400000000262150403655010013742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Array#pretty_print
is_singleton: false
name: pretty_print
params: (q)
visibility: public
ri/1.8/system/Array/reverse-i.yaml000064400000000771150403655010012657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array containing <em>self</em>'s elements in reverse order.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ].reverse   #=&gt; [&quot;c&quot;, &quot;b&quot;, &quot;a&quot;]\n   [ 1 ].reverse               #=&gt; [1]\n"
full_name: Array#reverse
is_singleton: false
name: reverse
params: |
  array.reverse -> an_array

visibility: public
ri/1.8/system/Array/flatten%21-i.yaml000064400000001355150403655020013051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Flattens <em>self</em> in place. Returns <tt>nil</tt> if no modifications were made (i.e., <em>array</em> contains no subarrays.) If the optional <em>level</em> argument determines the level of recursion to flatten.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ 1, 2, [3, [4, 5] ] ]\n   a.flatten!   #=&gt; [1, 2, 3, 4, 5]\n   a.flatten!   #=&gt; nil\n   a            #=&gt; [1, 2, 3, 4, 5]\n   a = [ 1, 2, [3, [4, 5] ] ]\n   a.flatten!(1) #=&gt; [1, 2, 3, [4, 5]]\n"
full_name: Array#flatten!
is_singleton: false
name: flatten!
params: |
  array.flatten! -> array or nil
  array.flatten!(level) -> array or nil

visibility: public
ri/1.8/system/Array/replace-i.yaml000064400000001270150403655020012613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the contents of <em>self</em> with the contents of <em>other_array</em>, truncating or expanding if necessary.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   a.replace([ &quot;x&quot;, &quot;y&quot;, &quot;z&quot; ])   #=&gt; [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;]\n   a                              #=&gt; [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;]\n"
full_name: Array#replace
is_singleton: false
name: replace
params: |
  array.replace(other_array)  -> array

visibility: public
ri/1.8/system/Array/zip-i.yaml000064400000001773150403655020012012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts any arguments to arrays, then merges elements of <em>self</em> with corresponding elements from each argument. This generates a sequence of <tt>self.size</tt> <em>n</em>-element arrays, where <em>n</em> is one more that the count of arguments. If the size of any argument is less than <tt>enumObj.size</tt>, <tt>nil</tt> values are supplied. If a block given, it is invoked for each output array, otherwise an array of arrays is returned.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ 4, 5, 6 ]\n   b = [ 7, 8, 9 ]\n\n   [1,2,3].zip(a, b)      #=&gt; [[1, 4, 7], [2, 5, 8], [3, 6, 9]]\n   [1,2].zip(a,b)         #=&gt; [[1, 4, 7], [2, 5, 8]]\n   a.zip([1,2],[8])       #=&gt; [[4,1,8], [5,2,nil], [6,nil,nil]]\n"
full_name: Array#zip
is_singleton: false
name: zip
params: |
  array.zip(arg, ...)                   -> an_array
  array.zip(arg, ...) {| arr | block }  -> nil

visibility: public
ri/1.8/system/Array/push-i.yaml000064400000001207150403655030012160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Append---Pushes the given object(s) on to the end of this array. This expression returns the array itself, so several appends may be chained together.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.push(&quot;d&quot;, &quot;e&quot;, &quot;f&quot;)\n           #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;, &quot;f&quot;]\n"
full_name: Array#push
is_singleton: false
name: push
params: |
  array.push(obj, ... )   -> array

visibility: public
ri/1.8/system/Array/fill-i.yaml000064400000002657150403655030012141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The first three forms set the selected elements of <em>self</em> (which may be the entire array) to <em>obj</em>. A <em>start</em> of <tt>nil</tt> is equivalent to zero. A <em>length</em> of <tt>nil</tt> is equivalent to <em>self.length</em>. The last three forms fill the array with the value of the block. The block is passed the absolute index of each element to be filled.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a.fill(&quot;x&quot;)              #=&gt; [&quot;x&quot;, &quot;x&quot;, &quot;x&quot;, &quot;x&quot;]\n   a.fill(&quot;z&quot;, 2, 2)        #=&gt; [&quot;x&quot;, &quot;x&quot;, &quot;z&quot;, &quot;z&quot;]\n   a.fill(&quot;y&quot;, 0..1)        #=&gt; [&quot;y&quot;, &quot;y&quot;, &quot;z&quot;, &quot;z&quot;]\n   a.fill {|i| i*i}         #=&gt; [0, 1, 4, 9]\n   a.fill(-2) {|i| i*i*i}   #=&gt; [0, 1, 8, 27]\n"
full_name: Array#fill
is_singleton: false
name: fill
params: |
  array.fill(obj)                                -> array
  array.fill(obj, start [, length])              -> array
  array.fill(obj, range )                        -> array
  array.fill {|index| block }                    -> array
  array.fill(start [, length] ) {|index| block } -> array
  array.fill(range) {|index| block }             -> array

visibility: public
ri/1.8/system/Array/compact%21-i.yaml000064400000001107150403655030013036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes <tt>nil</tt> elements from array. Returns <tt>nil</tt> if no changes were made.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, nil, &quot;b&quot;, nil, &quot;c&quot; ].compact! #=&gt; [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ].compact!           #=&gt; nil\n"
full_name: Array#compact!
is_singleton: false
name: compact!
params: |
  array.compact!    ->   array  or  nil

visibility: public
ri/1.8/system/Array/reject-i.yaml000064400000000520150403655030012452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array containing the items in <em>self</em> for which the block is not true.
full_name: Array#reject
is_singleton: false
name: reject
params: |
  array.reject {|item| block }  -> an_array

visibility: public
ri/1.8/system/Array/initialize_copy-i.yaml000064400000001310150403655030014367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the contents of <em>self</em> with the contents of <em>other_array</em>, truncating or expanding if necessary.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   a.replace([ &quot;x&quot;, &quot;y&quot;, &quot;z&quot; ])   #=&gt; [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;]\n   a                              #=&gt; [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;]\n"
full_name: Array#initialize_copy
is_singleton: false
name: initialize_copy
params: |
  array.replace(other_array)  -> array

visibility: public
ri/1.8/system/Array/rindex-i.yaml000064400000001327150403655040012476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the index of the last object in <em>array</em> <tt>==</tt> to <em>obj</em>. If a block is given instead of an argument, returns first object for which <em>block</em> is true. Returns <tt>nil</tt> if no match is found.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;b&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.rindex(&quot;b&quot;)        #=&gt; 3\n   a.rindex(&quot;z&quot;)        #=&gt; nil\n   a.rindex{|x|x==&quot;b&quot;}  #=&gt; 3\n"
full_name: Array#rindex
is_singleton: false
name: rindex
params: |
  array.rindex(obj)    ->  int or nil

visibility: public
ri/1.8/system/Array/find_index-i.yaml000064400000001513150403655040013311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the index of the first object in <em>self</em> such that is <tt>==</tt> to <em>obj</em>. If a block is given instead of an argument, returns first object for which <em>block</em> is true. Returns <tt>nil</tt> if no match is found.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.index(&quot;b&quot;)        #=&gt; 1\n   a.index(&quot;z&quot;)        #=&gt; nil\n   a.index{|x|x==&quot;b&quot;}  #=&gt; 1\n"
- !ruby/struct:SM::Flow::P 
  body: This is an alias of <tt>#find_index</tt>.
full_name: Array#find_index
is_singleton: false
name: find_index
params: |
  array.index(obj)           ->  int or nil
  array.index {|item| block} ->  int or nil

visibility: public
ri/1.8/system/Array/first-i.yaml000064400000001266150403655040012336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first element, or the first <tt>n</tt> elements, of the array. If the array is empty, the first form returns <tt>nil</tt>, and the second form returns an empty array.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;q&quot;, &quot;r&quot;, &quot;s&quot;, &quot;t&quot; ]\n   a.first    #=&gt; &quot;q&quot;\n   a.first(1) #=&gt; [&quot;q&quot;]\n   a.first(3) #=&gt; [&quot;q&quot;, &quot;r&quot;, &quot;s&quot;]\n"
full_name: Array#first
is_singleton: false
name: first
params: |
  array.first   ->   obj or nil
  array.first(n) -> an_array

visibility: public
ri/1.8/system/Array/length-i.yaml000064400000000627150403655040012470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: size
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of elements in <em>self</em>. May be zero.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, 2, 3, 4, 5 ].length   #=&gt; 5\n"
full_name: Array#length
is_singleton: false
name: length
params: |
  array.length -> int

visibility: public
ri/1.8/system/Array/%2b-i.yaml000064400000000661150403655050011556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Concatenation---Returns a new array built by concatenating the two arrays together to produce a third array.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, 2, 3 ] + [ 4, 5 ]    #=&gt; [ 1, 2, 3, 4, 5 ]\n"
full_name: Array#+
is_singleton: false
name: +
params: |
  array + other_array   -> an_array

visibility: public
ri/1.8/system/Array/%3c%3c-i.yaml000064400000001066150403655050012053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Append---Pushes the given object on to the end of this array. This expression returns the array itself, so several appends may be chained together.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, 2 ] &lt;&lt; &quot;c&quot; &lt;&lt; &quot;d&quot; &lt;&lt; [ 3, 4 ]\n           #=&gt;  [ 1, 2, &quot;c&quot;, &quot;d&quot;, [ 3, 4 ] ]\n"
full_name: Array#<<
is_singleton: false
name: "<<"
params: |
  array << obj            -> array

visibility: public
ri/1.8/system/Array/join-i.yaml000064400000001061150403655050012140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string created by converting each element of the array to a string, separated by <em>sep</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ].join        #=&gt; &quot;abc&quot;\n   [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ].join(&quot;-&quot;)   #=&gt; &quot;a-b-c&quot;\n"
full_name: Array#join
is_singleton: false
name: join
params: |
  array.join(sep=$,)    -> str

visibility: public
ri/1.8/system/Array/choice-i.yaml000064400000000415150403655050012435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Choose a random element from an array.
full_name: Array#choice
is_singleton: false
name: choice
params: |
  array.choice        -> obj

visibility: public
ri/1.8/system/Array/combination-i.yaml000064400000002164150403655050013510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: When invoked with a block, yields all combinations of length <em>n</em> of elements from <em>ary</em> and then returns <em>ary</em> itself. The implementation makes no guarantees about the order in which the combinations are yielded.
- !ruby/struct:SM::Flow::P 
  body: When invoked without a block, returns an enumerator object instead.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "    a = [1, 2, 3, 4]\n    a.combination(1).to_a  #=&gt; [[1],[2],[3],[4]]\n    a.combination(2).to_a  #=&gt; [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]\n    a.combination(3).to_a  #=&gt; [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]\n    a.combination(4).to_a  #=&gt; [[1,2,3,4]]\n    a.combination(0).to_a  #=&gt; [[]] # one combination of length 0\n    a.combination(5).to_a  #=&gt; []   # no combinations of length 5\n"
full_name: Array#combination
is_singleton: false
name: combination
params: |
  ary.combination(n) { |c| block }    -> ary
  ary.combination(n)                  -> enumerator

visibility: public
ri/1.8/system/Array/to_s-i.yaml000064400000000615150403655050012151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>self</em><tt>.join</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, &quot;e&quot;, &quot;i&quot;, &quot;o&quot; ].to_s   #=&gt; &quot;aeio&quot;\n"
full_name: Array#to_s
is_singleton: false
name: to_s
params: |
  array.to_s -> string

visibility: public
ri/1.8/system/Array/map-i.yaml000064400000001410150403655050011754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes <em>block</em> once for each element of <em>self</em>. Creates a new array containing the values returned by the block. See also <tt>Enumerable#collect</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a.collect {|x| x + &quot;!&quot; }   #=&gt; [&quot;a!&quot;, &quot;b!&quot;, &quot;c!&quot;, &quot;d!&quot;]\n   a                          #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]\n"
full_name: Array#map
is_singleton: false
name: map
params: |
  array.collect {|item| block }  -> an_array
  array.map     {|item| block }  -> an_array

visibility: public
ri/1.8/system/Array/%3d%3d-i.yaml000064400000001352150403655050012053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---Two arrays are equal if they contain the same number of elements and if each element is equal to (according to Object.==) the corresponding element in the other array.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ &quot;a&quot;, &quot;c&quot; ]    == [ &quot;a&quot;, &quot;c&quot;, 7 ]     #=&gt; false\n   [ &quot;a&quot;, &quot;c&quot;, 7 ] == [ &quot;a&quot;, &quot;c&quot;, 7 ]     #=&gt; true\n   [ &quot;a&quot;, &quot;c&quot;, 7 ] == [ &quot;a&quot;, &quot;d&quot;, &quot;f&quot; ]   #=&gt; false\n"
full_name: Array#==
is_singleton: false
name: ==
params: |
  array == other_array   ->   bool

visibility: public
ri/1.8/system/Array/map%21-i.yaml000064400000001270150403655050012170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the block once for each element of <em>self</em>, replacing the element with the value returned by <em>block</em>. See also <tt>Enumerable#collect</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a.collect! {|x| x + &quot;!&quot; }\n   a             #=&gt;  [ &quot;a!&quot;, &quot;b!&quot;, &quot;c!&quot;, &quot;d!&quot; ]\n"
full_name: Array#map!
is_singleton: false
name: map!
params: |
  array.collect! {|item| block }   ->   array
  array.map!     {|item| block }   ->   array

visibility: public
ri/1.8/system/Array/assoc-i.yaml000064400000001665150403655050012323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Searches through an array whose elements are also arrays comparing <em>obj</em> with the first element of each contained array using obj.==. Returns the first contained array that matches (that is, the first associated array), or <tt>nil</tt> if no match is found. See also <tt>Array#rassoc</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   s1 = [ &quot;colors&quot;, &quot;red&quot;, &quot;blue&quot;, &quot;green&quot; ]\n   s2 = [ &quot;letters&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   s3 = &quot;foo&quot;\n   a  = [ s1, s2, s3 ]\n   a.assoc(&quot;letters&quot;)  #=&gt; [ &quot;letters&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.assoc(&quot;foo&quot;)      #=&gt; nil\n"
full_name: Array#assoc
is_singleton: false
name: assoc
params: |
  array.assoc(obj)   ->  an_array  or  nil

visibility: public
ri/1.8/system/Array/insert-i.yaml000064400000001134150403655050012506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Inserts the given values before the element with the given index (which may be negative).
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w{ a b c d }\n   a.insert(2, 99)         #=&gt; [&quot;a&quot;, &quot;b&quot;, 99, &quot;c&quot;, &quot;d&quot;]\n   a.insert(-2, 1, 2, 3)   #=&gt; [&quot;a&quot;, &quot;b&quot;, 99, &quot;c&quot;, 1, 2, 3, &quot;d&quot;]\n"
full_name: Array#insert
is_singleton: false
name: insert
params: |
  array.insert(index, obj...)  -> array

visibility: public
ri/1.8/system/Array/pretty_print_cycle-i.yaml000064400000000276150403655050015132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Array#pretty_print_cycle
is_singleton: false
name: pretty_print_cycle
params: (q)
visibility: public
ri/1.8/system/Array/dclone-i.yaml000064400000000245150403655050012450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Array#dclone
is_singleton: false
name: dclone
params: ()
visibility: public
ri/1.8/system/Array/sort-i.yaml000064400000001653150403655050012177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array created by sorting <em>self</em>. Comparisons for the sort will be done using the <tt>&lt;=&gt;</tt> operator or using an optional code block. The block implements a comparison between <em>a</em> and <em>b</em>, returning -1, 0, or +1. See also <tt>Enumerable#sort_by</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;d&quot;, &quot;a&quot;, &quot;e&quot;, &quot;c&quot;, &quot;b&quot; ]\n   a.sort                    #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;]\n   a.sort {|x,y| y &lt;=&gt; x }   #=&gt; [&quot;e&quot;, &quot;d&quot;, &quot;c&quot;, &quot;b&quot;, &quot;a&quot;]\n"
full_name: Array#sort
is_singleton: false
name: sort
params: |
  array.sort                   -> an_array 
  array.sort {| a,b | block }  -> an_array 

visibility: public
ri/1.8/system/Array/shift-i.yaml000064400000001677150403655050012333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first element of <em>self</em> and removes it (shifting all other elements down by one). Returns <tt>nil</tt> if the array is empty.
- !ruby/struct:SM::Flow::P 
  body: If a number <em>n</em> is given, returns an array of the first n elements (or less) just like <tt>array.slice!(0, n)</tt> does.
- !ruby/struct:SM::Flow::VERB 
  body: "   args = [ &quot;-m&quot;, &quot;-q&quot;, &quot;filename&quot; ]\n   args.shift     #=&gt; &quot;-m&quot;\n   args           #=&gt; [&quot;-q&quot;, &quot;filename&quot;]\n\n   args = [ &quot;-m&quot;, &quot;-q&quot;, &quot;filename&quot; ]\n   args.shift(2)  #=&gt; [&quot;-m&quot;, &quot;-q&quot;]\n   args           #=&gt; [&quot;filename&quot;]\n"
full_name: Array#shift
is_singleton: false
name: shift
params: |
  array.shift    -> obj or nil
  array.shift(n) -> array

visibility: public
ri/1.8/system/Array/product-i.yaml000064400000001452150403655050012665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of all combinations of elements from all arrays. The length of the returned array is the product of the length of ary and the argument arrays
- !ruby/struct:SM::Flow::VERB 
  body: "   [1,2,3].product([4,5])     # =&gt; [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]\n   [1,2].product([1,2])       # =&gt; [[1,1],[1,2],[2,1],[2,2]]\n   [1,2].product([3,4],[5,6]) # =&gt; [[1,3,5],[1,3,6],[1,4,5],[1,4,6],\n                              #     [2,3,5],[2,3,6],[2,4,5],[2,4,6]]\n   [1,2].product()            # =&gt; [[1],[2]]\n   [1,2].product([])          # =&gt; []\n"
full_name: Array#product
is_singleton: false
name: product
params: |
  ary.product(other_ary, ...)

visibility: public
ri/1.8/system/Array/each_index-i.yaml000064400000001141150403655050013267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>Array#each</tt>, but passes the index of the element instead of the element itself.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.each_index {|x| print x, &quot; -- &quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: "produces:"
- !ruby/struct:SM::Flow::VERB 
  body: "   0 -- 1 -- 2 --\n"
full_name: Array#each_index
is_singleton: false
name: each_index
params: |
  array.each_index {|index| block }  ->  array

visibility: public
ri/1.8/system/Array/%5b%5d%3d-i.yaml000064400000003233150403655050012351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Assignment---Sets the element at <em>index</em>, or replaces a subarray starting at <em>start</em> and continuing for <em>length</em> elements, or replaces a subarray specified by <em>range</em>. If indices are greater than the current capacity of the array, the array grows automatically. A negative indices will count backward from the end of the array. Inserts elements if <em>length</em> is zero. If <tt>nil</tt> is used in the second and third form, deletes elements from <em>self</em>. An <tt>IndexError</tt> is raised if a negative index points past the beginning of the array. See also <tt>Array#push</tt>, and <tt>Array#unshift</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Array.new\n   a[4] = &quot;4&quot;;                 #=&gt; [nil, nil, nil, nil, &quot;4&quot;]\n   a[0, 3] = [ 'a', 'b', 'c' ] #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, nil, &quot;4&quot;]\n   a[1..2] = [ 1, 2 ]          #=&gt; [&quot;a&quot;, 1, 2, nil, &quot;4&quot;]\n   a[0, 2] = &quot;?&quot;               #=&gt; [&quot;?&quot;, 2, nil, &quot;4&quot;]\n   a[0..2] = &quot;A&quot;               #=&gt; [&quot;A&quot;, &quot;4&quot;]\n   a[-1]   = &quot;Z&quot;               #=&gt; [&quot;A&quot;, &quot;Z&quot;]\n   a[1..-1] = nil              #=&gt; [&quot;A&quot;]\n"
full_name: Array#[]=
is_singleton: false
name: "[]="
params: |
  array[index]         = obj                     ->  obj
  array[start, length] = obj or an_array or nil  ->  obj or an_array or nil
  array[range]         = obj or an_array or nil  ->  obj or an_array or nil

visibility: public
ri/1.8/system/Array/%5b%5d-c.yaml000064400000000557150403655050012055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array populated with the given objects.
- !ruby/struct:SM::Flow::VERB 
  body: "  Array.[]( 1, 'a', /^A/ )\n  Array[ 1, 'a', /^A/ ]\n  [ 1, 'a', /^A/ ]\n"
full_name: Array::[]
is_singleton: true
name: "[]"
params: (...)
visibility: public
ri/1.8/system/Array/clear-i.yaml000064400000000645150403655050012276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes all elements from <em>self</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]\n   a.clear    #=&gt; [ ]\n"
full_name: Array#clear
is_singleton: false
name: clear
params: |
  array.clear    ->  array

visibility: public
ri/1.8/system/Array/count-i.yaml000064400000001216150403655050012333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of elements. If an argument is given, counts the number of elements which equals to <em>obj</em>. If a block is given, counts the number of elements yielding a true value.
- !ruby/struct:SM::Flow::VERB 
  body: "   ary = [1, 2, 4, 2]\n   ary.count             # =&gt; 4\n   ary.count(2)          # =&gt; 2\n   ary.count{|x|x%2==0}  # =&gt; 3\n"
full_name: Array#count
is_singleton: false
name: count
params: |
  array.count      -> int
  array.count(obj) -> int
  array.count { |item| block }  -> int

visibility: public
ri/1.8/system/Array/fetch-i.yaml000064400000001626150403655060012302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Tries to return the element at position <em>index</em>. If the index lies outside the array, the first form throws an <tt>IndexError</tt> exception, the second form returns <em>default</em>, and the third form returns the value of invoking the block, passing in the index. Negative values of <em>index</em> count from the end of the array.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ 11, 22, 33, 44 ]\n   a.fetch(1)               #=&gt; 22\n   a.fetch(-1)              #=&gt; 44\n   a.fetch(4, 'cat')        #=&gt; &quot;cat&quot;\n   a.fetch(4) { |i| i*i }   #=&gt; 16\n"
full_name: Array#fetch
is_singleton: false
name: fetch
params: |
  array.fetch(index)                    -> obj
  array.fetch(index, default )          -> obj
  array.fetch(index) {|index| block }   -> obj

visibility: public
ri/1.8/system/Array/shelljoin-i.yaml000064400000000636150403655060013200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Builds a command line string from an argument list <tt>array</tt> joining all elements escaped for Bourne shell and separated by a space. See +Shellwords::shelljoin+ for details.
full_name: Array#shelljoin
is_singleton: false
name: shelljoin
params: |
  array.shelljoin => string

visibility: public
ri/1.8/system/Array/%2d-i.yaml000064400000001017150403655060011555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Array Difference---Returns a new array that is a copy of the original array, removing any items that also appear in other_array. (If you need set-like behavior, see the library class Set.)
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ]  #=&gt;  [ 3, 3, 5 ]\n"
full_name: Array#-
is_singleton: false
name: "-"
params: |
  array - other_array    -> an_array

visibility: public
ri/1.8/system/Array/reverse_each-i.yaml000064400000001075150403655060013642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>Array#each</tt>, but traverses <em>self</em> in reverse order.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.reverse_each {|x| print x, &quot; &quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: "produces:"
- !ruby/struct:SM::Flow::VERB 
  body: "   c b a\n"
full_name: Array#reverse_each
is_singleton: false
name: reverse_each
params: |
  array.reverse_each {|item| block } 

visibility: public
ri/1.8/system/Array/collect%21-i.yaml000064400000001300150403655060013033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the block once for each element of <em>self</em>, replacing the element with the value returned by <em>block</em>. See also <tt>Enumerable#collect</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot; ]\n   a.collect! {|x| x + &quot;!&quot; }\n   a             #=&gt;  [ &quot;a!&quot;, &quot;b!&quot;, &quot;c!&quot;, &quot;d!&quot; ]\n"
full_name: Array#collect!
is_singleton: false
name: collect!
params: |
  array.collect! {|item| block }   ->   array
  array.map!     {|item| block }   ->   array

visibility: public
ri/1.8/system/TruncatedDataError/cdesc-TruncatedDataError.yaml000064400000000721150403655060020251 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The read portion of an IO#readbytes attempt.
  name: data
  rw: R
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: TruncatedDataError is raised when IO#readbytes fails to read enough data.
constants: []

full_name: TruncatedDataError
includes: []

instance_methods: []

name: TruncatedDataError
superclass: IOError
ri/1.8/system/Generators/HtmlClass/parent_name-i.yaml000064400000000277150403655070016431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#parent_name
is_singleton: false
name: parent_name
params: ()
visibility: public
ri/1.8/system/Generators/HtmlClass/%3c%3d%3e-i.yaml000064400000000264150403655070015277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/Generators/HtmlClass/build_attribute_list-i.yaml000064400000000330150403655070020343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#build_attribute_list
is_singleton: false
name: build_attribute_list
params: (section)
visibility: public
ri/1.8/system/Generators/HtmlClass/http_url-i.yaml000064400000000472150403655070015776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return the relative file name to store this class in, which is also its url
full_name: Generators::HtmlClass#http_url
is_singleton: false
name: http_url
params: (full_name, prefix)
visibility: public
ri/1.8/system/Generators/HtmlClass/write_on-i.yaml000064400000000272150403655100015753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#write_on
is_singleton: false
name: write_on
params: (f)
visibility: public
ri/1.8/system/Generators/HtmlClass/cdesc-HtmlClass.yaml000064400000001526150403655100016653 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: path
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Wrap a ClassModule context
constants: []

full_name: Generators::HtmlClass
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: build_attribute_list
- !ruby/object:RI::MethodSummary 
  name: class_attribute_values
- !ruby/object:RI::MethodSummary 
  name: http_url
- !ruby/object:RI::MethodSummary 
  name: index_name
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: parent_name
- !ruby/object:RI::MethodSummary 
  name: value_hash
- !ruby/object:RI::MethodSummary 
  name: write_on
name: HtmlClass
superclass: ContextUser
ri/1.8/system/Generators/HtmlClass/new-c.yaml000064400000000322150403655100014704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass::new
is_singleton: true
name: new
params: (context, html_file, prefix, options)
visibility: public
ri/1.8/system/Generators/HtmlClass/index_name-i.yaml000064400000000275150403655100016237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#index_name
is_singleton: false
name: index_name
params: ()
visibility: public
ri/1.8/system/Generators/HtmlClass/value_hash-i.yaml000064400000000275150403655110016250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#value_hash
is_singleton: false
name: value_hash
params: ()
visibility: public
ri/1.8/system/Generators/HtmlClass/name-i.yaml000064400000000261150403655110015044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#name
is_singleton: false
name: name
params: ()
visibility: public
ri/1.8/system/Generators/HtmlClass/class_attribute_values-i.yaml000064400000000325150403655110020674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlClass#class_attribute_values
is_singleton: false
name: class_attribute_values
params: ()
visibility: public
ri/1.8/system/Generators/RIGenerator/process_class-i.yaml000064400000000317150403655110017260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::RIGenerator#process_class
is_singleton: false
name: process_class
params: (from_class)
visibility: public
ri/1.8/system/Generators/RIGenerator/cdesc-RIGenerator.yaml000064400000001344150403655110017430 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: for
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Generators::RIGenerator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: generate
- !ruby/object:RI::MethodSummary 
  name: generate_class_info
- !ruby/object:RI::MethodSummary 
  name: generate_method_info
- !ruby/object:RI::MethodSummary 
  name: markup
- !ruby/object:RI::MethodSummary 
  name: method_list
- !ruby/object:RI::MethodSummary 
  name: params_of
- !ruby/object:RI::MethodSummary 
  name: process_class
- !ruby/object:RI::MethodSummary 
  name: update_or_replace
name: RIGenerator
superclass: Object
ri/1.8/system/Generators/RIGenerator/params_of-i.yaml000064400000000304150403655110016360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::RIGenerator#params_of
is_singleton: false
name: params_of
params: (method)
visibility: private
ri/1.8/system/Generators/RIGenerator/for-c.yaml000064400000000547150403655110015202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generators may need to return specific subclasses depending on the options they are passed. Because of this we create them using a factory
full_name: Generators::RIGenerator::for
is_singleton: true
name: for
params: (options)
visibility: public
ri/1.8/system/Generators/RIGenerator/new-c.yaml000064400000000470150403655110015200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set up a new HTML generator. Basically all we do here is load up the correct output temlate
full_name: Generators::RIGenerator::new
is_singleton: true
name: new
params: (options)
visibility: public
ri/1.8/system/Generators/RIGenerator/update_or_replace-i.yaml000064400000000752150403655110020075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: By default we replace existing classes with the same name. If the --merge option was given, we instead merge this definition into an existing class. We add our methods, aliases, etc to that class, but do not change the class's description.
full_name: Generators::RIGenerator#update_or_replace
is_singleton: false
name: update_or_replace
params: (cls_desc)
visibility: private
ri/1.8/system/Generators/RIGenerator/markup-i.yaml000064400000000277150403655110015721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::RIGenerator#markup
is_singleton: false
name: markup
params: (comment)
visibility: private
ri/1.8/system/Generators/RIGenerator/generate-i.yaml000064400000000541150403655110016206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
full_name: Generators::RIGenerator#generate
is_singleton: false
name: generate
params: (toplevels)
visibility: public
ri/1.8/system/Generators/RIGenerator/generate_method_info-i.yaml000064400000000343150403655110020561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::RIGenerator#generate_method_info
is_singleton: false
name: generate_method_info
params: (cls_desc, method)
visibility: public
ri/1.8/system/Generators/RIGenerator/method_list-i.yaml000064400000000457150403655120016736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return a list of class and instance methods that we'll be documenting
full_name: Generators::RIGenerator#method_list
is_singleton: false
name: method_list
params: (cls)
visibility: private
ri/1.8/system/Generators/RIGenerator/generate_class_info-i.yaml000064400000000324150403655120020406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::RIGenerator#generate_class_info
is_singleton: false
name: generate_class_info
params: (cls)
visibility: public
ri/1.8/system/Generators/XMLGenerator/gen_method_index-i.yaml000064400000000314150403655120020041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::XMLGenerator#gen_method_index
is_singleton: false
name: gen_method_index
params: ()
visibility: public
ri/1.8/system/Generators/XMLGenerator/build_class_list-i.yaml000064400000000346150403655120020065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::XMLGenerator#build_class_list
is_singleton: false
name: build_class_list
params: (from, html_file, class_dir)
visibility: public
ri/1.8/system/Generators/XMLGenerator/gen_class_index-i.yaml000064400000000312150403655120017664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::XMLGenerator#gen_class_index
is_singleton: false
name: gen_class_index
params: ()
visibility: public
ri/1.8/system/Generators/XMLGenerator/for-c.yaml000064400000000370150403655120015323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Standard generator factory
full_name: Generators::XMLGenerator::for
is_singleton: true
name: for
params: (options)
visibility: public
ri/1.8/system/Generators/XMLGenerator/new-c.yaml000064400000000267150403655130015334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::XMLGenerator::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/Generators/XMLGenerator/gen_an_index-i.yaml000064400000000325150403655130017162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::XMLGenerator#gen_an_index
is_singleton: false
name: gen_an_index
params: (collection, title)
visibility: public
ri/1.8/system/Generators/XMLGenerator/generate_xml-i.yaml000064400000000511150403655140017214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate all the HTML. For the one-file case, we generate all the information in to one big hash
full_name: Generators::XMLGenerator#generate_xml
is_singleton: false
name: generate_xml
params: ()
visibility: public
ri/1.8/system/Generators/XMLGenerator/gen_file_index-i.yaml000064400000000310150403655140017476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::XMLGenerator#gen_file_index
is_singleton: false
name: gen_file_index
params: ()
visibility: public
ri/1.8/system/Generators/XMLGenerator/build_indices-i.yaml000064400000001273150403655140017345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Generate:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a list of HtmlFile objects for each TopLevel object.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a list of HtmlClass objects for each first level class or module in the TopLevel objects
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a complete list of all hyperlinkable terms (file, class, module, and method names)
  type: :BULLET
full_name: Generators::XMLGenerator#build_indices
is_singleton: false
name: build_indices
params: ()
visibility: public
ri/1.8/system/Generators/XMLGenerator/generate-i.yaml000064400000000535150403655140016342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
full_name: Generators::XMLGenerator#generate
is_singleton: false
name: generate
params: (info)
visibility: public
ri/1.8/system/Generators/XMLGenerator/cdesc-XMLGenerator.yaml000064400000001553150403655150017712 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: for
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate XML output as one big file
constants: []

full_name: Generators::XMLGenerator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: build_class_list
- !ruby/object:RI::MethodSummary 
  name: build_indices
- !ruby/object:RI::MethodSummary 
  name: gen_an_index
- !ruby/object:RI::MethodSummary 
  name: gen_class_index
- !ruby/object:RI::MethodSummary 
  name: gen_file_index
- !ruby/object:RI::MethodSummary 
  name: gen_into
- !ruby/object:RI::MethodSummary 
  name: gen_method_index
- !ruby/object:RI::MethodSummary 
  name: generate
- !ruby/object:RI::MethodSummary 
  name: generate_xml
name: XMLGenerator
superclass: HTMLGenerator
ri/1.8/system/Generators/XMLGenerator/gen_into-i.yaml000064400000000300150403655150016341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::XMLGenerator#gen_into
is_singleton: false
name: gen_into
params: (list)
visibility: public
ri/1.8/system/Generators/HtmlFile/parent_name-i.yaml000064400000000276150403655160016242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#parent_name
is_singleton: false
name: parent_name
params: ()
visibility: public
ri/1.8/system/Generators/HtmlFile/%3c%3d%3e-i.yaml000064400000000263150403655160015110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/Generators/HtmlFile/file_attribute_values-i.yaml000064400000000322150403655160020322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#file_attribute_values
is_singleton: false
name: file_attribute_values
params: ()
visibility: public
ri/1.8/system/Generators/HtmlFile/http_url-i.yaml000064400000000300150403655170015577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#http_url
is_singleton: false
name: http_url
params: (file_dir)
visibility: public
ri/1.8/system/Generators/HtmlFile/write_on-i.yaml000064400000000271150403655170015573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#write_on
is_singleton: false
name: write_on
params: (f)
visibility: public
ri/1.8/system/Generators/HtmlFile/cdesc-HtmlFile.yaml000064400000002105150403655170016300 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: path
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Handles the mapping of a file's information to HTML. In reality, a file corresponds to a <tt>TopLevel</tt> object, containing modules, classes, and top-level methods. In theory it <em>could</em> contain attributes and aliases, but we ignore these for now.
constants: []

full_name: Generators::HtmlFile
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: file_attribute_values
- !ruby/object:RI::MethodSummary 
  name: filename_to_label
- !ruby/object:RI::MethodSummary 
  name: http_url
- !ruby/object:RI::MethodSummary 
  name: index_name
- !ruby/object:RI::MethodSummary 
  name: parent_name
- !ruby/object:RI::MethodSummary 
  name: value_hash
- !ruby/object:RI::MethodSummary 
  name: write_on
name: HtmlFile
superclass: ContextUser
ri/1.8/system/Generators/HtmlFile/new-c.yaml000064400000000310150403655170014522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile::new
is_singleton: true
name: new
params: (context, options, file_dir)
visibility: public
ri/1.8/system/Generators/HtmlFile/index_name-i.yaml000064400000000274150403655200016051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#index_name
is_singleton: false
name: index_name
params: ()
visibility: public
ri/1.8/system/Generators/HtmlFile/value_hash-i.yaml000064400000000274150403655200016061 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#value_hash
is_singleton: false
name: value_hash
params: ()
visibility: public
ri/1.8/system/Generators/HtmlFile/filename_to_label-i.yaml000064400000000312150403655210017355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlFile#filename_to_label
is_singleton: false
name: filename_to_label
params: ()
visibility: public
ri/1.8/system/Generators/ContextUser/build_include_list-i.yaml000064400000000326150403655210020355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::ContextUser#build_include_list
is_singleton: false
name: build_include_list
params: (context)
visibility: public
ri/1.8/system/Generators/ContextUser/build_constants_summary_list-i.yaml000064400000000450150403655210022521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build a list of constants
full_name: Generators::ContextUser#build_constants_summary_list
is_singleton: false
name: build_constants_summary_list
params: (section)
visibility: public
ri/1.8/system/Generators/ContextUser/build_requires_list-i.yaml000064400000000330150403655220020565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::ContextUser#build_requires_list
is_singleton: false
name: build_requires_list
params: (context)
visibility: public
ri/1.8/system/Generators/ContextUser/collect_methods-i.yaml000064400000000724150403655220017673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a list of HtmlMethod objects for each method in the corresponding context object. If the @options.show_all variable is set (corresponding to the <tt>--all</tt> option, we include all methods, otherwise just the public ones.
full_name: Generators::ContextUser#collect_methods
is_singleton: false
name: collect_methods
params: ()
visibility: public
ri/1.8/system/Generators/ContextUser/find_symbol-i.yaml000064400000000440150403655220017023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find a symbol in ourselves or our parent
full_name: Generators::ContextUser#find_symbol
is_singleton: false
name: find_symbol
params: (symbol, method=nil)
visibility: public
ri/1.8/system/Generators/ContextUser/build_method_detail_list-i.yaml000064400000000740150403655220021535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build an array of arrays of method details. The outer array has up to six entries, public, private, and protected for both class methods, the other for instance methods. The inner arrays contain a hash for each method
full_name: Generators::ContextUser#build_method_detail_list
is_singleton: false
name: build_method_detail_list
params: (section)
visibility: public
ri/1.8/system/Generators/ContextUser/build_alias_summary_list-i.yaml000064400000000520150403655220021575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build a list of aliases for which we couldn't find a corresponding method
full_name: Generators::ContextUser#build_alias_summary_list
is_singleton: false
name: build_alias_summary_list
params: (section)
visibility: public
ri/1.8/system/Generators/ContextUser/build_class_list-i.yaml000064400000000533150403655220020040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build the structured list of classes and modules contained in this context.
full_name: Generators::ContextUser#build_class_list
is_singleton: false
name: build_class_list
params: (level, from, section, infile=nil)
visibility: public
ri/1.8/system/Generators/ContextUser/url-i.yaml000064400000000267150403655220015327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::ContextUser#url
is_singleton: false
name: url
params: (target)
visibility: public
ri/1.8/system/Generators/ContextUser/cdesc-ContextUser.yaml000064400000003103150403655230017632 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: context
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A Context is built by the parser to represent a container: contexts hold classes, modules, methods, require lists and include lists. ClassModule and TopLevel are the context objects we process here"
constants: []

full_name: Generators::ContextUser
includes: 
- !ruby/object:RI::IncludedModule 
  name: MarkUp
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_table_of_sections
- !ruby/object:RI::MethodSummary 
  name: aref_to
- !ruby/object:RI::MethodSummary 
  name: as_href
- !ruby/object:RI::MethodSummary 
  name: build_alias_summary_list
- !ruby/object:RI::MethodSummary 
  name: build_class_list
- !ruby/object:RI::MethodSummary 
  name: build_constants_summary_list
- !ruby/object:RI::MethodSummary 
  name: build_include_list
- !ruby/object:RI::MethodSummary 
  name: build_method_detail_list
- !ruby/object:RI::MethodSummary 
  name: build_method_summary_list
- !ruby/object:RI::MethodSummary 
  name: build_requires_list
- !ruby/object:RI::MethodSummary 
  name: collect_methods
- !ruby/object:RI::MethodSummary 
  name: diagram_reference
- !ruby/object:RI::MethodSummary 
  name: document_self
- !ruby/object:RI::MethodSummary 
  name: find_symbol
- !ruby/object:RI::MethodSummary 
  name: href
- !ruby/object:RI::MethodSummary 
  name: potentially_referenced_list
- !ruby/object:RI::MethodSummary 
  name: url
name: ContextUser
superclass: Object
ri/1.8/system/Generators/ContextUser/new-c.yaml000064400000000301150403655230015276 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::ContextUser::new
is_singleton: true
name: new
params: (context, options)
visibility: public
ri/1.8/system/Generators/ContextUser/document_self-i.yaml000064400000000305150403655230017346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::ContextUser#document_self
is_singleton: false
name: document_self
params: ()
visibility: public
ri/1.8/system/Generators/ContextUser/as_href-i.yaml000064400000000544150403655240016134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return a reference to outselves to be used as an href= the form depends on whether we're all in one file or in multiple files
full_name: Generators::ContextUser#as_href
is_singleton: false
name: as_href
params: (from_path)
visibility: public
ri/1.8/system/Generators/ContextUser/aref_to-i.yaml000064400000000277150403655240016147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::ContextUser#aref_to
is_singleton: false
name: aref_to
params: (target)
visibility: public
ri/1.8/system/Generators/ContextUser/diagram_reference-i.yaml000064400000000324150403655240020143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::ContextUser#diagram_reference
is_singleton: false
name: diagram_reference
params: (diagram)
visibility: public
ri/1.8/system/Generators/ContextUser/potentially_referenced_list-i.yaml000064400000001371150403655240022305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (i.name)
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Build a list from an array of <em>Htmlxxx</em> items. Look up each in the AllReferences hash: if we find a corresponding entry, we generate a hyperlink to it, otherwise just output the name. However, some names potentially need massaging. For example, you may require a Ruby file without the .rb extension, but the file names we know about may have it. To deal with this, we pass in a block which performs the massaging, returning an array of alternative names to match"
full_name: Generators::ContextUser#potentially_referenced_list
is_singleton: false
name: potentially_referenced_list
params: (array) {|i.name| ...}
visibility: public
ri/1.8/system/Generators/ContextUser/build_method_summary_list-i.yaml000064400000000507150403655250021774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build a summary list of all the methods in this context
full_name: Generators::ContextUser#build_method_summary_list
is_singleton: false
name: build_method_summary_list
params: (path_prefix="")
visibility: public
ri/1.8/system/Generators/ContextUser/href-i.yaml000064400000000416150403655250015450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: convenience method to build a hyperlink
full_name: Generators::ContextUser#href
is_singleton: false
name: href
params: (link, cls, name)
visibility: public
ri/1.8/system/Generators/ContextUser/add_table_of_sections-i.yaml000064400000000451150403655250021015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: create table of contents if we contain sections
full_name: Generators::ContextUser#add_table_of_sections
is_singleton: false
name: add_table_of_sections
params: ()
visibility: public
ri/1.8/system/Generators/CHMGenerator/create_project_file-i.yaml000064400000000511150403655260020504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The project file links together all the various files that go to make up the help.
full_name: Generators::CHMGenerator#create_project_file
is_singleton: false
name: create_project_file
params: ()
visibility: public
ri/1.8/system/Generators/CHMGenerator/create_contents_and_index-i.yaml000064400000000655150403655270021717 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The contents is a list of all files and modules. For each we include as sub-entries the list of methods they contain. As we build the contents we also build an index file
full_name: Generators::CHMGenerator#create_contents_and_index
is_singleton: false
name: create_contents_and_index
params: ()
visibility: public
ri/1.8/system/Generators/CHMGenerator/create_help_project-i.yaml000064400000000476150403655270020530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The project contains the project file, a table of contents and an index
full_name: Generators::CHMGenerator#create_help_project
is_singleton: false
name: create_help_project
params: ()
visibility: public
ri/1.8/system/Generators/CHMGenerator/for-c.yaml000064400000000370150403655300015272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Standard generator factory
full_name: Generators::CHMGenerator::for
is_singleton: true
name: for
params: (options)
visibility: public
ri/1.8/system/Generators/CHMGenerator/new-c.yaml000064400000000267150403655300015302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::CHMGenerator::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/Generators/CHMGenerator/check_for_html_help_workshop-i.yaml000064400000000344150403655300022426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::CHMGenerator#check_for_html_help_workshop
is_singleton: false
name: check_for_html_help_workshop
params: ()
visibility: public
ri/1.8/system/Generators/CHMGenerator/compile_project-i.yaml000064400000000447150403655300017675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invoke the windows help compiler to compiler the project
full_name: Generators::CHMGenerator#compile_project
is_singleton: false
name: compile_project
params: ()
visibility: public
ri/1.8/system/Generators/CHMGenerator/generate-i.yaml000064400000000440150403655300016302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate the html as normal, then wrap it in a help project
full_name: Generators::CHMGenerator#generate
is_singleton: false
name: generate
params: (info)
visibility: public
ri/1.8/system/Generators/CHMGenerator/cdesc-CHMGenerator.yaml000064400000001424150403655300017622 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: for
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: HHC_PATH
  value: "\"c:/Program Files/HTML Help Workshop/hhc.exe\""
full_name: Generators::CHMGenerator
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_for_html_help_workshop
- !ruby/object:RI::MethodSummary 
  name: compile_project
- !ruby/object:RI::MethodSummary 
  name: create_contents_and_index
- !ruby/object:RI::MethodSummary 
  name: create_help_project
- !ruby/object:RI::MethodSummary 
  name: create_project_file
- !ruby/object:RI::MethodSummary 
  name: generate
name: CHMGenerator
superclass: HTMLGenerator
ri/1.8/system/Generators/HTMLGenerator/gen_method_index-i.yaml000064400000000316150403655300020147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGenerator#gen_method_index
is_singleton: false
name: gen_method_index
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/build_class_list-i.yaml000064400000000350150403655300020164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGenerator#build_class_list
is_singleton: false
name: build_class_list
params: (from, html_file, class_dir)
visibility: private
ri/1.8/system/Generators/HTMLGenerator/gen_class_index-i.yaml000064400000000314150403655300017772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGenerator#gen_class_index
is_singleton: false
name: gen_class_index
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/gen_sub_directories-i.yaml000064400000000501150403655310020662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See the comments at the top for a description of the directory structure
full_name: Generators::HTMLGenerator#gen_sub_directories
is_singleton: false
name: gen_sub_directories
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/gen_url-c.yaml000064400000000450150403655310016274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: convert a target url to one that is relative to a given path
full_name: Generators::HTMLGenerator::gen_url
is_singleton: true
name: gen_url
params: (path, target)
visibility: public
ri/1.8/system/Generators/HTMLGenerator/for-c.yaml000064400000000551150403655310015431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generators may need to return specific subclasses depending on the options they are passed. Because of this we create them using a factory
full_name: Generators::HTMLGenerator::for
is_singleton: true
name: for
params: (options)
visibility: public
ri/1.8/system/Generators/HTMLGenerator/write_style_sheet-i.yaml000064400000000446150403655320020417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Write out the style sheet used by the main frames
full_name: Generators::HTMLGenerator#write_style_sheet
is_singleton: false
name: write_style_sheet
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/new-c.yaml000064400000000472150403655320015437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set up a new HTML generator. Basically all we do here is load up the correct output temlate
full_name: Generators::HTMLGenerator::new
is_singleton: true
name: new
params: (options)
visibility: public
ri/1.8/system/Generators/HTMLGenerator/gen_an_index-i.yaml000064400000000353150403655320017270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGenerator#gen_an_index
is_singleton: false
name: gen_an_index
params: (collection, title, template, filename)
visibility: private
ri/1.8/system/Generators/HTMLGenerator/generate_html-i.yaml000064400000000402150403655320017463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate all the HTML
full_name: Generators::HTMLGenerator#generate_html
is_singleton: false
name: generate_html
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/gen_file_index-i.yaml000064400000000312150403655330017605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGenerator#gen_file_index
is_singleton: false
name: gen_file_index
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/build_indices-i.yaml000064400000001275150403655330017454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Generate:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a list of HtmlFile objects for each TopLevel object.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a list of HtmlClass objects for each first level class or module in the TopLevel objects
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a complete list of all hyperlinkable terms (file, class, module, and method names)
  type: :BULLET
full_name: Generators::HTMLGenerator#build_indices
is_singleton: false
name: build_indices
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/generate-i.yaml000064400000000543150403655330016446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
full_name: Generators::HTMLGenerator#generate
is_singleton: false
name: generate
params: (toplevels)
visibility: public
ri/1.8/system/Generators/HTMLGenerator/gen_into-i.yaml000064400000000302150403655330016447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGenerator#gen_into
is_singleton: false
name: gen_into
params: (list)
visibility: private
ri/1.8/system/Generators/HTMLGenerator/gen_main_index-i.yaml000064400000000706150403655330017621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The main index page is mostly a template frameset, but includes the initial page. If the <tt>--main</tt> option was given, we use this as our main page, otherwise we use the first file specified on the command line.
full_name: Generators::HTMLGenerator#gen_main_index
is_singleton: false
name: gen_main_index
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/load_html_template-i.yaml000064400000000542150403655330020511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Load up the HTML template specified in the options. If the template name contains a slash, use it literally
full_name: Generators::HTMLGenerator#load_html_template
is_singleton: false
name: load_html_template
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/main_url-i.yaml000064400000000402150403655330016454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return the url of the main page
full_name: Generators::HTMLGenerator#main_url
is_singleton: false
name: main_url
params: ()
visibility: private
ri/1.8/system/Generators/HTMLGenerator/cdesc-HTMLGenerator.yaml000064400000002246150403655330020122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: for
- !ruby/object:RI::MethodSummary 
  name: gen_url
- !ruby/object:RI::MethodSummary 
  name: new
comment: []

constants: []

full_name: Generators::HTMLGenerator
includes: 
- !ruby/object:RI::IncludedModule 
  name: MarkUp
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: build_class_list
- !ruby/object:RI::MethodSummary 
  name: build_indices
- !ruby/object:RI::MethodSummary 
  name: gen_an_index
- !ruby/object:RI::MethodSummary 
  name: gen_class_index
- !ruby/object:RI::MethodSummary 
  name: gen_file_index
- !ruby/object:RI::MethodSummary 
  name: gen_into
- !ruby/object:RI::MethodSummary 
  name: gen_main_index
- !ruby/object:RI::MethodSummary 
  name: gen_method_index
- !ruby/object:RI::MethodSummary 
  name: gen_sub_directories
- !ruby/object:RI::MethodSummary 
  name: generate
- !ruby/object:RI::MethodSummary 
  name: generate_html
- !ruby/object:RI::MethodSummary 
  name: load_html_template
- !ruby/object:RI::MethodSummary 
  name: main_url
- !ruby/object:RI::MethodSummary 
  name: write_style_sheet
name: HTMLGenerator
superclass: Object
ri/1.8/system/Generators/MarkUp/style_url-i.yaml000064400000000626150403655340015465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Qualify a stylesheet URL; if if <tt>css_name</tt> does not begin with '/' or 'http[s]://', prepend a prefix relative to <tt>path</tt>. Otherwise, return it unmodified.
full_name: Generators::MarkUp#style_url
is_singleton: false
name: style_url
params: (path, css_name=nil)
visibility: public
ri/1.8/system/Generators/MarkUp/markup-i.yaml000064400000000571150403655340014741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a string in markup format into HTML. We keep a cached SimpleMarkup object lying around after the first time we're called per object.
full_name: Generators::MarkUp#markup
is_singleton: false
name: markup
params: (str, remove_para=false)
visibility: public
ri/1.8/system/Generators/MarkUp/cdesc-MarkUp.yaml000064400000000657150403655350015500 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Handle common markup tasks for the various Html classes
constants: []

full_name: Generators::MarkUp
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: cvs_url
- !ruby/object:RI::MethodSummary 
  name: markup
- !ruby/object:RI::MethodSummary 
  name: style_url
name: MarkUp
superclass: 
ri/1.8/system/Generators/MarkUp/cvs_url-i.yaml000064400000000605150403655350015116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build a webcvs URL with the given 'url' argument. URLs with a '%s' in them get the file's path sprintfed into them; otherwise they're just catenated together.
full_name: Generators::MarkUp#cvs_url
is_singleton: false
name: cvs_url
params: (url, full_path)
visibility: public
ri/1.8/system/Generators/AllReferences/keys-c.yaml000064400000000265150403655350015723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::AllReferences::keys
is_singleton: true
name: keys
params: ()
visibility: public
ri/1.8/system/Generators/AllReferences/reset-c.yaml000064400000000267150403655360016075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::AllReferences::reset
is_singleton: true
name: reset
params: ()
visibility: public
ri/1.8/system/Generators/AllReferences/cdesc-AllReferences.yaml000064400000001377150403655360020327 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: keys
- !ruby/object:RI::MethodSummary 
  name: reset
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Build a hash of all items that can be cross-referenced. This is used when we output required and included names: if the names appear in this hash, we can generate an html cross reference to the appropriate description. We also use this when parsing comment blocks: any decorated words matching an entry in this list are hyperlinked."
constants: []

full_name: Generators::AllReferences
includes: []

instance_methods: []

name: AllReferences
superclass: Object
ri/1.8/system/Generators/AllReferences/add-c.yaml000064400000000303150403655360015472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::AllReferences::add
is_singleton: true
name: add
params: (name, html_class)
visibility: public
ri/1.8/system/Generators/AllReferences/%5b%5d-c.yaml000064400000000267150403655360015624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::AllReferences::[]
is_singleton: true
name: "[]"
params: (name)
visibility: public
ri/1.8/system/Generators/HyperlinkHtml/cdesc-HyperlinkHtml.yaml000064400000001305150403655370020457 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Subclass of the SM::ToHtml class that supports looking up words in the AllReferences list. Those that are found (like AllReferences in this comment) will be hyperlinked
constants: []

full_name: Generators::HyperlinkHtml
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: gen_url
- !ruby/object:RI::MethodSummary 
  name: handle_special_CROSSREF
- !ruby/object:RI::MethodSummary 
  name: handle_special_HYPERLINK
- !ruby/object:RI::MethodSummary 
  name: handle_special_TIDYLINK
name: HyperlinkHtml
superclass: SM::ToHtml
ri/1.8/system/Generators/HyperlinkHtml/handle_special_CROSSREF-i.yaml000064400000001163150403655370021277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "We're invoked when any text matches the CROSSREF pattern (defined in MarkUp). If we fine the corresponding reference, generate a hyperlink. If the name we're looking for contains no punctuation, we look for it up the module/class chain. For example, HyperlinkHtml is found, even without the Generators:: prefix, because we look for it in module Generators first."
full_name: Generators::HyperlinkHtml#handle_special_CROSSREF
is_singleton: false
name: handle_special_CROSSREF
params: (special)
visibility: public
ri/1.8/system/Generators/HyperlinkHtml/gen_url-i.yaml000064400000000560150403655400016463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Generate a hyperlink for url, labeled with text. Handle the special cases for img: and link: described under handle_special_HYPEDLINK"
full_name: Generators::HyperlinkHtml#gen_url
is_singleton: false
name: gen_url
params: (url, text)
visibility: public
ri/1.8/system/Generators/HyperlinkHtml/handle_special_TIDYLINK-i.yaml000064400000000600150403655400021265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: HEre's a hypedlink where the label is different to the URL
- !ruby/struct:SM::Flow::VERB 
  body: " &lt;label&gt;[url]\n"
full_name: Generators::HyperlinkHtml#handle_special_TIDYLINK
is_singleton: false
name: handle_special_TIDYLINK
params: (special)
visibility: public
ri/1.8/system/Generators/HyperlinkHtml/handle_special_HYPERLINK-i.yaml000064400000001211150403655400021402 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "And we're invoked with a potential external hyperlink mailto: just gets inserted. http: links are checked to see if they reference an image. If so, that image gets inserted using an &lt;img&gt; tag. Otherwise a conventional &lt;a href&gt; is used. We also support a special type of hyperlink, link:, which is a reference to a local file whose path is relative to the --op directory."
full_name: Generators::HyperlinkHtml#handle_special_HYPERLINK
is_singleton: false
name: handle_special_HYPERLINK
params: (special)
visibility: public
ri/1.8/system/Generators/HyperlinkHtml/new-c.yaml000064400000000541150403655410015613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: We need to record the html path of our caller so we can generate correct relative paths for any hyperlinks that we find
full_name: Generators::HyperlinkHtml::new
is_singleton: true
name: new
params: (from_path, context)
visibility: public
ri/1.8/system/Generators/HtmlMethod/description-i.yaml000064400000000300150403655410016617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#description
is_singleton: false
name: description
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/visibility-i.yaml000064400000000276150403655420016500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#visibility
is_singleton: false
name: visibility
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/parent_name-i.yaml000064400000000300150403655420016566 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#parent_name
is_singleton: false
name: parent_name
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/%3c%3d%3e-i.yaml000064400000000265150403655420015452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/Generators/HtmlMethod/find_symbol-i.yaml000064400000000322150403655430016607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#find_symbol
is_singleton: false
name: find_symbol
params: (symbol, method=nil)
visibility: public
ri/1.8/system/Generators/HtmlMethod/path-i.yaml000064400000000262150403655430015241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#path
is_singleton: false
name: path
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/call_seq-i.yaml000064400000000272150403655430016071 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#call_seq
is_singleton: false
name: call_seq
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/new-c.yaml000064400000000314150403655440015067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod::new
is_singleton: true
name: new
params: (context, html_class, options)
visibility: public
ri/1.8/system/Generators/HtmlMethod/markup_code-i.yaml000064400000000474150403655440016604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given a sequence of source tokens, mark up the source code to make it look purty.
full_name: Generators::HtmlMethod#markup_code
is_singleton: false
name: markup_code
params: (tokens)
visibility: public
ri/1.8/system/Generators/HtmlMethod/index_name-i.yaml000064400000000276150403655450016423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#index_name
is_singleton: false
name: index_name
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/document_self-i.yaml000064400000000304150403655450017133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#document_self
is_singleton: false
name: document_self
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/create_source_code_file-i.yaml000064400000000341150403655450021121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#create_source_code_file
is_singleton: false
name: create_source_code_file
params: (code_body)
visibility: public
ri/1.8/system/Generators/HtmlMethod/singleton-i.yaml000064400000000274150403655450016314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#singleton
is_singleton: false
name: singleton
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/reset-c.yaml000064400000000264150403655460015426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod::reset
is_singleton: true
name: reset
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/as_href-i.yaml000064400000000543150403655460015721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: return a reference to outselves to be used as an href= the form depends on whether we're all in one file or in multiple files
full_name: Generators::HtmlMethod#as_href
is_singleton: false
name: as_href
params: (from_path)
visibility: public
ri/1.8/system/Generators/HtmlMethod/params-i.yaml000064400000000266150403655460015577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#params
is_singleton: false
name: params
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/section-i.yaml000064400000000270150403655470015754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#section
is_singleton: false
name: section
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/all_methods-c.yaml000064400000000300150403655470016567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod::all_methods
is_singleton: true
name: all_methods
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/aliases-i.yaml000064400000000270150403655470015731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#aliases
is_singleton: false
name: aliases
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/aref-i.yaml000064400000000262150403655470015226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#aref
is_singleton: false
name: aref
params: ()
visibility: public
ri/1.8/system/Generators/HtmlMethod/add_line_numbers-i.yaml000064400000000574150403655500017603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: we rely on the fact that the first line of a source code listing has
- !ruby/struct:SM::Flow::VERB 
  body: "   # File xxxxx, line dddd\n"
full_name: Generators::HtmlMethod#add_line_numbers
is_singleton: false
name: add_line_numbers
params: (src)
visibility: public
ri/1.8/system/Generators/HtmlMethod/cdesc-HtmlMethod.yaml000064400000003166150403655500017207 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: context
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: img_url
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: source_code
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: src_url
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: all_methods
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: reset
comment: []

constants: []

full_name: Generators::HtmlMethod
includes: 
- !ruby/object:RI::IncludedModule 
  name: MarkUp
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: add_line_numbers
- !ruby/object:RI::MethodSummary 
  name: aliases
- !ruby/object:RI::MethodSummary 
  name: aref
- !ruby/object:RI::MethodSummary 
  name: as_href
- !ruby/object:RI::MethodSummary 
  name: call_seq
- !ruby/object:RI::MethodSummary 
  name: create_source_code_file
- !ruby/object:RI::MethodSummary 
  name: description
- !ruby/object:RI::MethodSummary 
  name: document_self
- !ruby/object:RI::MethodSummary 
  name: find_symbol
- !ruby/object:RI::MethodSummary 
  name: index_name
- !ruby/object:RI::MethodSummary 
  name: markup_code
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: params
- !ruby/object:RI::MethodSummary 
  name: parent_name
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: section
- !ruby/object:RI::MethodSummary 
  name: singleton
- !ruby/object:RI::MethodSummary 
  name: visibility
name: HtmlMethod
superclass: Object
ri/1.8/system/Generators/HtmlMethod/name-i.yaml000064400000000262150403655500015223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HtmlMethod#name
is_singleton: false
name: name
params: ()
visibility: public
ri/1.8/system/Generators/cdesc-Generators.yaml000064400000001035150403655500015177 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Name of sub-direcories that hold file and class/module descriptions
  name: FILE_DIR
  value: "\"files\""
- !ruby/object:RI::Constant 
  comment: 
  name: CLASS_DIR
  value: "\"classes\""
- !ruby/object:RI::Constant 
  comment: 
  name: CSS_NAME
  value: "\"rdoc-style.css\""
full_name: Generators
includes: []

instance_methods: []

name: Generators
superclass: 
ri/1.8/system/Generators/HTMLGeneratorInOne/gen_method_index-i.yaml000064400000000322150403655500021077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGeneratorInOne#gen_method_index
is_singleton: false
name: gen_method_index
params: ()
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/build_class_list-i.yaml000064400000000354150403655500021123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGeneratorInOne#build_class_list
is_singleton: false
name: build_class_list
params: (from, html_file, class_dir)
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/gen_class_index-i.yaml000064400000000320150403655500020722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGeneratorInOne#gen_class_index
is_singleton: false
name: gen_class_index
params: ()
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/new-c.yaml000064400000000275150403655500016371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGeneratorInOne::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/gen_an_index-i.yaml000064400000000333150403655500020217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGeneratorInOne#gen_an_index
is_singleton: false
name: gen_an_index
params: (collection, title)
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/generate_xml-i.yaml000064400000000517150403655500020257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate all the HTML. For the one-file case, we generate all the information in to one big hash
full_name: Generators::HTMLGeneratorInOne#generate_xml
is_singleton: false
name: generate_xml
params: ()
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/cdesc-HTMLGeneratorInOne.yaml000064400000001404150403655500021776 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: []

constants: []

full_name: Generators::HTMLGeneratorInOne
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: build_class_list
- !ruby/object:RI::MethodSummary 
  name: build_indices
- !ruby/object:RI::MethodSummary 
  name: gen_an_index
- !ruby/object:RI::MethodSummary 
  name: gen_class_index
- !ruby/object:RI::MethodSummary 
  name: gen_file_index
- !ruby/object:RI::MethodSummary 
  name: gen_into
- !ruby/object:RI::MethodSummary 
  name: gen_method_index
- !ruby/object:RI::MethodSummary 
  name: generate
- !ruby/object:RI::MethodSummary 
  name: generate_xml
name: HTMLGeneratorInOne
superclass: HTMLGenerator
ri/1.8/system/Generators/HTMLGeneratorInOne/gen_file_index-i.yaml000064400000000316150403655500020541 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGeneratorInOne#gen_file_index
is_singleton: false
name: gen_file_index
params: ()
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/build_indices-i.yaml000064400000001301150403655500020372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Generate:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a list of HtmlFile objects for each TopLevel object.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a list of HtmlClass objects for each first level class or module in the TopLevel objects
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: a complete list of all hyperlinkable terms (file, class, module, and method names)
  type: :BULLET
full_name: Generators::HTMLGeneratorInOne#build_indices
is_singleton: false
name: build_indices
params: ()
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/generate-i.yaml000064400000000543150403655500017376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
full_name: Generators::HTMLGeneratorInOne#generate
is_singleton: false
name: generate
params: (info)
visibility: public
ri/1.8/system/Generators/HTMLGeneratorInOne/gen_into-i.yaml000064400000000306150403655500017403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Generators::HTMLGeneratorInOne#gen_into
is_singleton: false
name: gen_into
params: (list)
visibility: public
ri/1.8/system/TSortArray/cdesc-TSortArray.yaml000064400000000300150403655510015074 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: TSortArray
includes: []

instance_methods: []

name: TSortArray
superclass: Array
ri/1.8/system/Generator/each-i.yaml000064400000000427150403655510012757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: self.next
comment: 
- !ruby/struct:SM::Flow::P 
  body: Rewinds the generator and enumerates the elements.
full_name: Generator#each
is_singleton: false
name: each
params: () {|self.next| ...}
visibility: public
ri/1.8/system/Generator/next%3f-i.yaml000064400000000406150403655510013330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the generator has not reached the end yet.
full_name: Generator#next?
is_singleton: false
name: next?
params: ()
visibility: public
ri/1.8/system/Generator/next-i.yaml000064400000000410150403655520013026 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the element at the current position and moves forward.
full_name: Generator#next
is_singleton: false
name: next
params: ()
visibility: public
ri/1.8/system/Generator/cdesc-Generator.yaml000064400000002626150403655520014642 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generator converts an internal iterator (i.e. an Enumerable object) to an external iterator.
- !ruby/struct:SM::Flow::P 
  body: Note that it is not very fast since it is implemented using continuations, which are currently slow.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'generator'\n\n  # Generator from an Enumerable object\n  g = Generator.new(['A', 'B', 'C', 'Z'])\n\n  while g.next?\n    puts g.next\n  end\n\n  # Generator from a block\n  g = Generator.new { |g|\n    for i in 'A'..'C'\n      g.yield i\n    end\n\n    g.yield 'Z'\n  }\n\n  # The same result as above\n  while g.next?\n    puts g.next\n  end\n"
constants: []

full_name: Generator
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: current
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: end?
- !ruby/object:RI::MethodSummary 
  name: index
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: next?
- !ruby/object:RI::MethodSummary 
  name: pos
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: yield
name: Generator
superclass: Object
ri/1.8/system/Generator/rewind-i.yaml000064400000000344150403655520013346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Rewinds the generator.
full_name: Generator#rewind
is_singleton: false
name: rewind
params: ()
visibility: public
ri/1.8/system/Generator/index-i.yaml000064400000000404150403655530013163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current index (position) counting from zero.
full_name: Generator#index
is_singleton: false
name: index
params: ()
visibility: public
ri/1.8/system/Generator/new-c.yaml000064400000001037150403655530012642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new generator either from an Enumerable object or from a block.
- !ruby/struct:SM::Flow::P 
  body: In the former, block is ignored even if given.
- !ruby/struct:SM::Flow::P 
  body: In the latter, the given block is called with the generator itself, and expected to call the <tt>yield</tt> method for each element.
full_name: Generator::new
is_singleton: true
name: new
params: (enum = nil, &block)
visibility: public
ri/1.8/system/Generator/current-i.yaml000064400000000374150403655530013544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the element at the current position.
full_name: Generator#current
is_singleton: false
name: current
params: ()
visibility: public
ri/1.8/system/Generator/pos-i.yaml000064400000000400150403655530012651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current index (position) counting from zero.
full_name: Generator#pos
is_singleton: false
name: pos
params: ()
visibility: public
ri/1.8/system/Generator/end%3f-i.yaml000064400000000374150403655530013126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the generator has reached the end.
full_name: Generator#end?
is_singleton: false
name: end?
params: ()
visibility: public
ri/1.8/system/Generator/yield-i.yaml000064400000000364150403655540013170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Yields an element to the generator.
full_name: Generator#yield
is_singleton: false
name: yield
params: (value)
visibility: public
ri/1.8/system/Shellwords/shellwords-i.yaml000064400000000362150403655540014446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #shellsplit"
full_name: Shellwords#shellwords
is_singleton: false
name: shellwords
params: (line)
visibility: public
ri/1.8/system/Shellwords/shellsplit-i.yaml000064400000001475150403655540014451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: shellwords
- !ruby/object:RI::AliasName 
  name: split
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Splits a string into an array of tokens in the same way the UNIX Bourne shell does.
- !ruby/struct:SM::Flow::VERB 
  body: "  argv = Shellwords.split('here are &quot;two words&quot;')\n  argv #=&gt; [&quot;here&quot;, &quot;are&quot;, &quot;two words&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: +String#shellsplit+ is a shorthand for this function.
- !ruby/struct:SM::Flow::VERB 
  body: "  argv = 'here are &quot;two words&quot;'.shellsplit\n  argv #=&gt; [&quot;here&quot;, &quot;are&quot;, &quot;two words&quot;]\n"
full_name: Shellwords#shellsplit
is_singleton: false
name: shellsplit
params: (line)
visibility: public
ri/1.8/system/Shellwords/split-i.yaml000064400000000350150403655550013411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #shellsplit"
full_name: Shellwords#split
is_singleton: false
name: split
params: (line)
visibility: public
ri/1.8/system/Shellwords/escape-i.yaml000064400000000352150403655550013520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #shellescape"
full_name: Shellwords#escape
is_singleton: false
name: escape
params: (str)
visibility: public
ri/1.8/system/Shellwords/join-i.yaml000064400000000346150403655550013222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #shelljoin"
full_name: Shellwords#join
is_singleton: false
name: join
params: (array)
visibility: public
ri/1.8/system/Shellwords/shelljoin-i.yaml000064400000001326150403655550014251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: join
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Builds a command line string from an argument list <tt>array</tt> joining all elements escaped for Bourne shell and separated by a space.
- !ruby/struct:SM::Flow::VERB 
  body: "  open('|' + Shellwords.join(['grep', pattern, *files])) { |pipe|\n    # ...\n  }\n"
- !ruby/struct:SM::Flow::P 
  body: +Array#shelljoin+ is a shorthand for this function.
- !ruby/struct:SM::Flow::VERB 
  body: "  open('|' + ['grep', pattern, *files].shelljoin) { |pipe|\n    # ...\n  }\n"
full_name: Shellwords#shelljoin
is_singleton: false
name: shelljoin
params: (array)
visibility: public
ri/1.8/system/Shellwords/shellescape-i.yaml000064400000001507150403655560014554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: escape
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escapes a string so that it can be safely used in a Bourne shell command line.
- !ruby/struct:SM::Flow::P 
  body: Note that a resulted string should be used unquoted and is not intended for use in double quotes nor in single quotes.
- !ruby/struct:SM::Flow::VERB 
  body: "  open(&quot;| grep #{Shellwords.escape(pattern)} file&quot;) { |pipe|\n    # ...\n  }\n"
- !ruby/struct:SM::Flow::P 
  body: +String#shellescape+ is a shorthand for this function.
- !ruby/struct:SM::Flow::VERB 
  body: "  open(&quot;| grep #{pattern.shellescape} file&quot;) { |pipe|\n    # ...\n  }\n"
full_name: Shellwords#shellescape
is_singleton: false
name: shellescape
params: (str)
visibility: public
ri/1.8/system/Shellwords/cdesc-Shellwords.yaml000064400000002166150403655560015245 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This module manipulates strings according to the word parsing rules of the UNIX Bourne shell.
- !ruby/struct:SM::Flow::P 
  body: The shellwords() function was originally a port of shellwords.pl, but modified to conform to POSIX / SUSv3 (IEEE Std 1003.1-2001).
- !ruby/struct:SM::Flow::P 
  body: "Authors:"
- !ruby/struct:SM::Flow::VERB 
  body: "  - Wakou Aoyama\n  - Akinori MUSHA &lt;knu@iDaemons.org&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: "Contact:"
- !ruby/struct:SM::Flow::VERB 
  body: "  - Akinori MUSHA &lt;knu@iDaemons.org&gt; (current maintainer)\n"
constants: []

full_name: Shellwords
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: shellescape
- !ruby/object:RI::MethodSummary 
  name: shelljoin
- !ruby/object:RI::MethodSummary 
  name: shellsplit
- !ruby/object:RI::MethodSummary 
  name: shellwords
- !ruby/object:RI::MethodSummary 
  name: split
name: Shellwords
superclass: 
ri/1.8/system/Object/methods-i.yaml000064400000001512150403655570013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a list of the names of methods publicly accessible in <em>obj</em>. This will include all the methods accessible in <em>obj</em>'s ancestors.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Klass\n     def kMethod()\n     end\n   end\n   k = Klass.new\n   k.methods[0..9]    #=&gt; [&quot;kMethod&quot;, &quot;freeze&quot;, &quot;nil?&quot;, &quot;is_a?&quot;,\n                           &quot;class&quot;, &quot;instance_variable_set&quot;,\n                            &quot;methods&quot;, &quot;extend&quot;, &quot;<em>send</em>&quot;, &quot;instance_eval&quot;]\n   k.methods.length   #=&gt; 42\n"
full_name: Object#methods
is_singleton: false
name: methods
params: |
  obj.methods    => array

visibility: public
ri/1.8/system/Object/instance_variables-i.yaml000064400000001143150403655600015167 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of instance variable names for the receiver. Note that simply defining an accessor does not create the corresponding instance variable.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Fred\n     attr_accessor :a1\n     def initialize\n       @iv = 3\n     end\n   end\n   Fred.new.instance_variables   #=&gt; [&quot;@iv&quot;]\n"
full_name: Object#instance_variables
is_singleton: false
name: instance_variables
params: |
  obj.instance_variables    => array

visibility: public
ri/1.8/system/Object/eql%3f-i.yaml000064400000002520150403655600012412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---At the <tt>Object</tt> level, <tt>==</tt> returns <tt>true</tt> only if <em>obj</em> and <em>other</em> are the same object. Typically, this method is overridden in descendent classes to provide class-specific meaning.
- !ruby/struct:SM::Flow::P 
  body: "Unlike <tt>==</tt>, the <tt>equal?</tt> method should never be overridden by subclasses: it is used to determine object identity (that is, <tt>a.equal?(b)</tt> iff <tt>a</tt> is the same object as <tt>b</tt>)."
- !ruby/struct:SM::Flow::P 
  body: "The <tt>eql?</tt> method returns <tt>true</tt> if <em>obj</em> and <em>anObject</em> have the same value. Used by <tt>Hash</tt> to test members for equality. For objects of class <tt>Object</tt>, <tt>eql?</tt> is synonymous with <tt>==</tt>. Subclasses normally continue this tradition, but there are exceptions. <tt>Numeric</tt> types, for example, perform type conversion across <tt>==</tt>, but not across <tt>eql?</tt>, so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   1 == 1.0     #=&gt; true\n   1.eql? 1.0   #=&gt; false\n"
full_name: Object#eql?
is_singleton: false
name: eql?
params: |
  obj == other        => true or false
  obj.equal?(other)   => true or false
  obj.eql?(other)     => true or false

visibility: public
ri/1.8/system/Object/class-i.yaml000064400000001115150403655610012440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the class of <em>obj</em>, now preferred over <tt>Object#type</tt>, as an object's type in Ruby is only loosely tied to that object's class. This method must always be called with an explicit receiver, as <tt>class</tt> is also a reserved word in Ruby.
- !ruby/struct:SM::Flow::VERB 
  body: "   1.class      #=&gt; Fixnum\n   self.class   #=&gt; Object\n"
full_name: Object#class
is_singleton: false
name: class
params: |
  obj.class    => class

visibility: public
ri/1.8/system/Object/__send__-i.yaml000064400000001355150403655620013067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the method identified by <em>symbol</em>, passing it any arguments specified. You can use <tt>__send__</tt> if the name <tt>send</tt> clashes with an existing method in <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Klass\n     def hello(*args)\n       &quot;Hello &quot; + args.join(' ')\n     end\n   end\n   k = Klass.new\n   k.send :hello, &quot;gentle&quot;, &quot;readers&quot;   #=&gt; &quot;Hello gentle readers&quot;\n"
full_name: Object#__send__
is_singleton: false
name: __send__
params: |
  obj.send(symbol [, args...])        => obj
  obj.__send__(symbol [, args...])    => obj

visibility: public
ri/1.8/system/Object/%3d%7e-i.yaml000064400000000542150403655620012213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pattern Match---Overridden by descendents (notably <tt>Regexp</tt> and <tt>String</tt>) to provide meaningful pattern-match semantics.
full_name: Object#=~
is_singleton: false
name: =~
params: |
  obj =~ other  => false

visibility: public
ri/1.8/system/Object/frozen%3f-i.yaml000064400000000734150403655620013143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the freeze status of <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.freeze    #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]\n   a.frozen?   #=&gt; true\n"
full_name: Object#frozen?
is_singleton: false
name: frozen?
params: |
  obj.frozen?    => true or false

visibility: public
ri/1.8/system/Object/to_a-i.yaml000064400000001321150403655630012256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array representation of <em>obj</em>. For objects of class <tt>Object</tt> and others that don't explicitly override the method, the return value is an array containing <tt>self</tt>. However, this latter behavior will soon be obsolete.
- !ruby/struct:SM::Flow::VERB 
  body: "   self.to_a       #=&gt; -:1: warning: default `to_a' will be obsolete\n   &quot;hello&quot;.to_a    #=&gt; [&quot;hello&quot;]\n   Time.new.to_a   #=&gt; [39, 54, 8, 9, 4, 2003, 3, 99, true, &quot;CDT&quot;]\n"
full_name: Object#to_a
is_singleton: false
name: to_a
params: |
  obj.to_a -> anArray

visibility: public
ri/1.8/system/Object/object_id-i.yaml000064400000001144150403655630013261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an integer identifier for <em>obj</em>. The same number will be returned on all calls to <tt>id</tt> for a given object, and no two active objects will share an id. <tt>Object#object_id</tt> is a different concept from the <tt>:name</tt> notation, which returns the symbol id of <tt>name</tt>. Replaces the deprecated <tt>Object#id</tt>.
full_name: Object#object_id
is_singleton: false
name: object_id
params: |
  obj.__id__       => fixnum
  obj.object_id    => fixnum

visibility: public
ri/1.8/system/Object/is_a%3f-i.yaml000064400000001604150403655640012552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>class</em> is the class of <em>obj</em>, or if <em>class</em> is one of the superclasses of <em>obj</em> or modules included in <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   module M;    end\n   class A\n     include M\n   end\n   class B &lt; A; end\n   class C &lt; B; end\n   b = B.new\n   b.instance_of? A   #=&gt; false\n   b.instance_of? B   #=&gt; true\n   b.instance_of? C   #=&gt; false\n   b.instance_of? M   #=&gt; false\n   b.kind_of? A       #=&gt; true\n   b.kind_of? B       #=&gt; true\n   b.kind_of? C       #=&gt; false\n   b.kind_of? M       #=&gt; true\n"
full_name: Object#is_a?
is_singleton: false
name: is_a?
params: |
  obj.is_a?(class)       => true or false
  obj.kind_of?(class)    => true or false

visibility: public
ri/1.8/system/Object/public_methods-i.yaml000064400000000656150403655640014350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the list of public methods accessible to <em>obj</em>. If the <em>all</em> parameter is set to <tt>false</tt>, only those methods in the receiver will be listed.
full_name: Object#public_methods
is_singleton: false
name: public_methods
params: |
  obj.public_methods(all=true)   => array

visibility: public
ri/1.8/system/Object/dup-i.yaml000064400000001613150403655650012132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produces a shallow copy of <em>obj</em>---the instance variables of <em>obj</em> are copied, but not the objects they reference. <tt>dup</tt> copies the tainted state of <em>obj</em>. See also the discussion under <tt>Object#clone</tt>. In general, <tt>clone</tt> and <tt>dup</tt> may have different semantics in descendent classes. While <tt>clone</tt> is used to duplicate an object, including its internal state, <tt>dup</tt> typically uses the class of the descendent object to create the new instance.
- !ruby/struct:SM::Flow::P 
  body: "This method may have class-specific behavior. If so, that behavior will be documented under the #<tt>initialize_copy</tt> method of the class."
full_name: Object#dup
is_singleton: false
name: dup
params: |
  obj.dup -> an_object

visibility: public
ri/1.8/system/Object/to_yaml-i.yaml000064400000000263150403655660013007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Object#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Object/tap-i.yaml000064400000001413150403655660012125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Yields <tt>x</tt> to the block, and then returns <tt>x</tt>. The primary purpose of this method is to &quot;tap into&quot; a method chain, in order to perform operations on intermediate results within the chain.
- !ruby/struct:SM::Flow::VERB 
  body: "    (1..10).tap {\n      |x| puts &quot;original: #{x.inspect}&quot;\n    }.to_a.tap {\n      |x| puts &quot;array: #{x.inspect}&quot;\n    }.select {|x| x%2==0}.tap {\n      |x| puts &quot;evens: #{x.inspect}&quot;\n    }.map {|x| x*x}.tap {\n      |x| puts &quot;squares: #{x.inspect}&quot;\n    }\n"
full_name: Object#tap
is_singleton: false
name: tap
params: |
  obj.tap{|x|...}    => obj

visibility: public
ri/1.8/system/Object/equal%3f-i.yaml000064400000002524150403655670012753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---At the <tt>Object</tt> level, <tt>==</tt> returns <tt>true</tt> only if <em>obj</em> and <em>other</em> are the same object. Typically, this method is overridden in descendent classes to provide class-specific meaning.
- !ruby/struct:SM::Flow::P 
  body: "Unlike <tt>==</tt>, the <tt>equal?</tt> method should never be overridden by subclasses: it is used to determine object identity (that is, <tt>a.equal?(b)</tt> iff <tt>a</tt> is the same object as <tt>b</tt>)."
- !ruby/struct:SM::Flow::P 
  body: "The <tt>eql?</tt> method returns <tt>true</tt> if <em>obj</em> and <em>anObject</em> have the same value. Used by <tt>Hash</tt> to test members for equality. For objects of class <tt>Object</tt>, <tt>eql?</tt> is synonymous with <tt>==</tt>. Subclasses normally continue this tradition, but there are exceptions. <tt>Numeric</tt> types, for example, perform type conversion across <tt>==</tt>, but not across <tt>eql?</tt>, so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   1 == 1.0     #=&gt; true\n   1.eql? 1.0   #=&gt; false\n"
full_name: Object#equal?
is_singleton: false
name: equal?
params: |
  obj == other        => true or false
  obj.equal?(other)   => true or false
  obj.eql?(other)     => true or false

visibility: public
ri/1.8/system/Object/hash-i.yaml000064400000001010150403655700012250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generates a <tt>Fixnum</tt> hash value for this object. This function must have the property that <tt>a.eql?(b)</tt> implies <tt>a.hash == b.hash</tt>. The hash value is used by class <tt>Hash</tt>. Any hash value that exceeds the capacity of a <tt>Fixnum</tt> will be truncated before being used.
full_name: Object#hash
is_singleton: false
name: hash
params: |
  obj.hash    => fixnum

visibility: public
ri/1.8/system/Object/enum_for-i.yaml000064400000001236150403655700013151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns Enumerable::Enumerator.new(self, method, *args).
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "   str = &quot;xyz&quot;\n\n   enum = str.enum_for(:each_byte)\n   a = enum.map {|b| '%02x' % b } #=&gt; [&quot;78&quot;, &quot;79&quot;, &quot;7a&quot;]\n\n   # protects an array from being modified\n   a = [1, 2, 3]\n   some_method(a.to_enum)\n"
full_name: Object#enum_for
is_singleton: false
name: enum_for
params: |
  obj.to_enum(method = :each, *args)
  obj.enum_for(method = :each, *args)

visibility: public
ri/1.8/system/Object/instance_of%3f-i.yaml000064400000000560150403655710014125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>obj</em> is an instance of the given class. See also <tt>Object#kind_of?</tt>.
full_name: Object#instance_of?
is_singleton: false
name: instance_of?
params: |
  obj.instance_of?(class)    => true or false

visibility: public
ri/1.8/system/Object/instance_variable_set-i.yaml000064400000001662150403655720015670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the instance variable names by <em>symbol</em> to <em>object</em>, thereby frustrating the efforts of the class's author to attempt to provide proper encapsulation. The variable did not have to exist prior to this call.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Fred\n     def initialize(p1, p2)\n       @a, @b = p1, p2\n     end\n   end\n   fred = Fred.new('cat', 99)\n   fred.instance_variable_set(:@a, 'dog')   #=&gt; &quot;dog&quot;\n   fred.instance_variable_set(:@c, 'cat')   #=&gt; &quot;cat&quot;\n   fred.inspect                             #=&gt; &quot;#&lt;Fred:0x401b3da8 @a=\\&quot;dog\\&quot;, @b=99, @c=\\&quot;cat\\&quot;&gt;&quot;\n"
full_name: Object#instance_variable_set
is_singleton: false
name: instance_variable_set
params: |
  obj.instance_variable_set(symbol, obj)    => obj

visibility: public
ri/1.8/system/Object/type-i.yaml000064400000000412150403655720012315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deprecated synonym for <tt>Object#class</tt>.
full_name: Object#type
is_singleton: false
name: type
params: |
  obj.type   => class

visibility: public
ri/1.8/system/Object/inspect-i.yaml000064400000001126150403655730013005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string containing a human-readable representation of <em>obj</em>. If not overridden, uses the <tt>to_s</tt> method to generate the string.
- !ruby/struct:SM::Flow::VERB 
  body: "   [ 1, 2, 3..4, 'five' ].inspect   #=&gt; &quot;[1, 2, 3..4, \\&quot;five\\&quot;]&quot;\n   Time.new.inspect                 #=&gt; &quot;Wed Apr 09 08:54:39 CDT 2003&quot;\n"
full_name: Object#inspect
is_singleton: false
name: inspect
params: |
  obj.inspect   => string

visibility: public
ri/1.8/system/Object/cdesc-Object.yaml000064400000014223150403655730013401 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Object</tt> is the parent class of all classes in Ruby. Its methods are therefore available to all objects unless explicitly overridden.
- !ruby/struct:SM::Flow::P 
  body: <tt>Object</tt> mixes in the <tt>Kernel</tt> module, making the built-in kernel functions globally accessible. Although the instance methods of <tt>Object</tt> are defined by the <tt>Kernel</tt> module, we have chosen to document them here for clarity.
- !ruby/struct:SM::Flow::P 
  body: In the descriptions of Object's methods, the parameter <em>symbol</em> refers to a symbol, which is either a quoted string or a <tt>Symbol</tt> (such as <tt>:name</tt>).
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TOPLEVEL_BINDING
  value: rb_f_binding(ruby_top_self)
- !ruby/object:RI::Constant 
  comment: 
  name: RUBY_VERSION
  value: v
- !ruby/object:RI::Constant 
  comment: 
  name: RUBY_RELEASE_DATE
  value: d
- !ruby/object:RI::Constant 
  comment: 
  name: RUBY_PLATFORM
  value: p
- !ruby/object:RI::Constant 
  comment: 
  name: RUBY_PATCHLEVEL
  value: INT2FIX(RUBY_PATCHLEVEL)
- !ruby/object:RI::Constant 
  comment: 
  name: RUBY_DESCRIPTION
  value: tmp
- !ruby/object:RI::Constant 
  comment: 
  name: RUBY_COPYRIGHT
  value: tmp
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: obsolete constants
  name: VERSION
  value: v
- !ruby/object:RI::Constant 
  comment: 
  name: RELEASE_DATE
  value: d
- !ruby/object:RI::Constant 
  comment: 
  name: PLATFORM
  value: p
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: constants to hold original stdin/stdout/stderr
  name: STDIN
  value: rb_stdin
- !ruby/object:RI::Constant 
  comment: 
  name: STDOUT
  value: rb_stdout
- !ruby/object:RI::Constant 
  comment: 
  name: STDERR
  value: rb_stderr
- !ruby/object:RI::Constant 
  comment: 
  name: ARGF
  value: argf
- !ruby/object:RI::Constant 
  comment: 
  name: ENV
  value: envtbl
- !ruby/object:RI::Constant 
  comment: 
  name: ENV
  value: envtbl
- !ruby/object:RI::Constant 
  comment: 
  name: MatchingData
  value: rb_cMatch
- !ruby/object:RI::Constant 
  comment: 
  name: NIL
  value: Qnil
- !ruby/object:RI::Constant 
  comment: 
  name: "TRUE"
  value: Qtrue
- !ruby/object:RI::Constant 
  comment: 
  name: "FALSE"
  value: Qfalse
- !ruby/object:RI::Constant 
  comment: 
  name: DATA
  value: f
- !ruby/object:RI::Constant 
  comment: 
  name: ARGV
  value: rb_argv
- !ruby/object:RI::Constant 
  comment: 
  name: IPsocket
  value: rb_cIPSocket
- !ruby/object:RI::Constant 
  comment: 
  name: TCPsocket
  value: rb_cTCPSocket
- !ruby/object:RI::Constant 
  comment: 
  name: SOCKSsocket
  value: rb_cSOCKSSocket
- !ruby/object:RI::Constant 
  comment: 
  name: TCPserver
  value: rb_cTCPServer
- !ruby/object:RI::Constant 
  comment: 
  name: UDPsocket
  value: rb_cUDPSocket
- !ruby/object:RI::Constant 
  comment: 
  name: UNIXsocket
  value: rb_cUNIXSocket
- !ruby/object:RI::Constant 
  comment: 
  name: UNIXserver
  value: rb_cUNIXServer
full_name: Object
includes: 
- !ruby/object:RI::IncludedModule 
  name: Kernel
- !ruby/object:RI::IncludedModule 
  name: PP::ObjectMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: =~
- !ruby/object:RI::MethodSummary 
  name: __id__
- !ruby/object:RI::MethodSummary 
  name: __send__
- !ruby/object:RI::MethodSummary 
  name: class
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: dclone
- !ruby/object:RI::MethodSummary 
  name: display
- !ruby/object:RI::MethodSummary 
  name: dup
- !ruby/object:RI::MethodSummary 
  name: enum_for
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: equal?
- !ruby/object:RI::MethodSummary 
  name: extend
- !ruby/object:RI::MethodSummary 
  name: freeze
- !ruby/object:RI::MethodSummary 
  name: frozen?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: id
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: instance_eval
- !ruby/object:RI::MethodSummary 
  name: instance_exec
- !ruby/object:RI::MethodSummary 
  name: instance_of?
- !ruby/object:RI::MethodSummary 
  name: instance_variable_defined?
- !ruby/object:RI::MethodSummary 
  name: instance_variable_get
- !ruby/object:RI::MethodSummary 
  name: instance_variable_get
- !ruby/object:RI::MethodSummary 
  name: instance_variable_set
- !ruby/object:RI::MethodSummary 
  name: instance_variable_set
- !ruby/object:RI::MethodSummary 
  name: instance_variables
- !ruby/object:RI::MethodSummary 
  name: is_a?
- !ruby/object:RI::MethodSummary 
  name: kind_of?
- !ruby/object:RI::MethodSummary 
  name: method
- !ruby/object:RI::MethodSummary 
  name: methods
- !ruby/object:RI::MethodSummary 
  name: nil?
- !ruby/object:RI::MethodSummary 
  name: object_id
- !ruby/object:RI::MethodSummary 
  name: private_methods
- !ruby/object:RI::MethodSummary 
  name: protected_methods
- !ruby/object:RI::MethodSummary 
  name: public_methods
- !ruby/object:RI::MethodSummary 
  name: remove_instance_variable
- !ruby/object:RI::MethodSummary 
  name: respond_to?
- !ruby/object:RI::MethodSummary 
  name: send
- !ruby/object:RI::MethodSummary 
  name: singleton_method_added
- !ruby/object:RI::MethodSummary 
  name: singleton_method_removed
- !ruby/object:RI::MethodSummary 
  name: singleton_method_undefined
- !ruby/object:RI::MethodSummary 
  name: singleton_methods
- !ruby/object:RI::MethodSummary 
  name: taint
- !ruby/object:RI::MethodSummary 
  name: tainted?
- !ruby/object:RI::MethodSummary 
  name: tap
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_enum
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: to_yaml_properties
- !ruby/object:RI::MethodSummary 
  name: to_yaml_style
- !ruby/object:RI::MethodSummary 
  name: type
- !ruby/object:RI::MethodSummary 
  name: untaint
name: Object
superclass: 
ri/1.8/system/Object/new-c.yaml000064400000000323150403655740012122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Not documented
full_name: Object::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Object/respond_to%3f-i.yaml000064400000000713150403655750014015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt>&gt; if <em>obj</em> responds to the given method. Private methods are included in the search only if the optional second parameter evaluates to <tt>true</tt>.
full_name: Object#respond_to?
is_singleton: false
name: respond_to?
params: |
  obj.respond_to?(symbol, include_private=false) => true or false

visibility: public
ri/1.8/system/Object/singleton_method_undefined-i.yaml000064400000001350150403655750016724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invoked as a callback whenever a singleton method is undefined in the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Chatty\n     def Chatty.singleton_method_undefined(id)\n       puts &quot;Undefining #{id.id2name}&quot;\n     end\n     def Chatty.one()   end\n     class &lt;&lt; self\n        undef_method(:one)\n     end\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Undefining one\n"
full_name: Object#singleton_method_undefined
is_singleton: false
name: singleton_method_undefined
params: |
  singleton_method_undefined(symbol)

visibility: public
ri/1.8/system/Object/%3d%3d%3d-i.yaml000064400000000645150403655760012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Case Equality---For class <tt>Object</tt>, effectively the same as calling <tt>#==</tt>, but typically overridden by descendents to provide meaningful semantics in <tt>case</tt> statements.
full_name: Object#===
is_singleton: false
name: ===
params: |
  obj === other   => true or false

visibility: public
ri/1.8/system/Object/instance_exec-i.yaml000064400000001423150403655760014153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Executes the given block within the context of the receiver (<em>obj</em>). In order to set the context, the variable <tt>self</tt> is set to <em>obj</em> while the code is executing, giving the code access to <em>obj</em>'s instance variables. Arguments are passed as block parameters.
- !ruby/struct:SM::Flow::VERB 
  body: "   class KlassWithSecret\n     def initialize\n       @secret = 99\n     end\n   end\n   k = KlassWithSecret.new\n   k.instance_exec(5) {|x| @secret+x }   #=&gt; 104\n"
full_name: Object#instance_exec
is_singleton: false
name: instance_exec
params: |
  obj.instance_exec(arg...) {|var...| block }                       => obj

visibility: public
ri/1.8/system/Object/singleton_method_added-i.yaml000064400000001371150403655770016031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invoked as a callback whenever a singleton method is added to the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Chatty\n     def Chatty.singleton_method_added(id)\n       puts &quot;Adding #{id.id2name}&quot;\n     end\n     def self.one()     end\n     def two()          end\n     def Chatty.three() end\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Adding singleton_method_added\n   Adding one\n   Adding three\n"
full_name: Object#singleton_method_added
is_singleton: false
name: singleton_method_added
params: |
  singleton_method_added(symbol)

visibility: public
ri/1.8/system/Object/tainted%3f-i.yaml000064400000000441150403655770013271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the object is tainted.
full_name: Object#tainted?
is_singleton: false
name: tainted?
params: |
  obj.tainted?    => true or false

visibility: public
ri/1.8/system/Object/send-i.yaml000064400000001345150403656000012263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the method identified by <em>symbol</em>, passing it any arguments specified. You can use <tt>__send__</tt> if the name <tt>send</tt> clashes with an existing method in <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Klass\n     def hello(*args)\n       &quot;Hello &quot; + args.join(' ')\n     end\n   end\n   k = Klass.new\n   k.send :hello, &quot;gentle&quot;, &quot;readers&quot;   #=&gt; &quot;Hello gentle readers&quot;\n"
full_name: Object#send
is_singleton: false
name: send
params: |
  obj.send(symbol [, args...])        => obj
  obj.__send__(symbol [, args...])    => obj

visibility: public
ri/1.8/system/Object/to_yaml_properties-i.yaml000064400000000276150403656000015254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Object#to_yaml_properties
is_singleton: false
name: to_yaml_properties
params: ()
visibility: public
ri/1.8/system/Object/id-i.yaml000064400000000424150403656000011723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Soon-to-be deprecated version of <tt>Object#object_id</tt>.
full_name: Object#id
is_singleton: false
name: id
params: |
  obj.id    => fixnum

visibility: public
ri/1.8/system/Object/private_methods-i.yaml000064400000000662150403656000014530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the list of private methods accessible to <em>obj</em>. If the <em>all</em> parameter is set to <tt>false</tt>, only those methods in the receiver will be listed.
full_name: Object#private_methods
is_singleton: false
name: private_methods
params: |
  obj.private_methods(all=true)   => array

visibility: public
ri/1.8/system/Object/to_yaml_style-i.yaml000064400000000264150403656000014215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Object#to_yaml_style
is_singleton: false
name: to_yaml_style
params: ()
visibility: public
ri/1.8/system/Object/instance_variable_defined%3f-i.yaml000064400000001334150403656010016756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given instance variable is defined in <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Fred\n     def initialize(p1, p2)\n       @a, @b = p1, p2\n     end\n   end\n   fred = Fred.new('cat', 99)\n   fred.instance_variable_defined?(:@a)    #=&gt; true\n   fred.instance_variable_defined?(&quot;@b&quot;)   #=&gt; true\n   fred.instance_variable_defined?(&quot;@c&quot;)   #=&gt; false\n"
full_name: Object#instance_variable_defined?
is_singleton: false
name: instance_variable_defined?
params: |
  obj.instance_variable_defined?(symbol)    => true or false

visibility: public
ri/1.8/system/Object/taint-i.yaml000064400000000631150403656010012447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Marks <em>obj</em> as tainted---if the <tt>$SAFE</tt> level is set appropriately, many method calls which might alter the running programs environment will refuse to accept tainted strings.
full_name: Object#taint
is_singleton: false
name: taint
params: |
  obj.taint -> obj

visibility: public
ri/1.8/system/Object/to_enum-i.yaml000064400000001234150403656010012776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns Enumerable::Enumerator.new(self, method, *args).
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "   str = &quot;xyz&quot;\n\n   enum = str.enum_for(:each_byte)\n   a = enum.map {|b| '%02x' % b } #=&gt; [&quot;78&quot;, &quot;79&quot;, &quot;7a&quot;]\n\n   # protects an array from being modified\n   a = [1, 2, 3]\n   some_method(a.to_enum)\n"
full_name: Object#to_enum
is_singleton: false
name: to_enum
params: |
  obj.to_enum(method = :each, *args)
  obj.enum_for(method = :each, *args)

visibility: public
ri/1.8/system/Object/freeze-i.yaml000064400000001346150403656020012615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Prevents further modifications to <em>obj</em>. A <tt>TypeError</tt> will be raised if modification is attempted. There is no way to unfreeze a frozen object. See also <tt>Object#frozen?</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot; ]\n   a.freeze\n   a &lt;&lt; &quot;z&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   prog.rb:3:in `&lt;&lt;': can't modify frozen array (TypeError)\n    from prog.rb:3\n"
full_name: Object#freeze
is_singleton: false
name: freeze
params: |
  obj.freeze    => obj

visibility: public
ri/1.8/system/Object/to_s-i.yaml000064400000000721150403656020012275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string representing <em>obj</em>. The default <tt>to_s</tt> prints the object's class and an encoding of the object id. As a special case, the top-level object that is the initial execution context of Ruby programs returns ``main.''
full_name: Object#to_s
is_singleton: false
name: to_s
params: |
  obj.to_s    => string

visibility: public
ri/1.8/system/Object/singleton_methods-i.yaml000064400000001665150403656020015066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of the names of singleton methods for <em>obj</em>. If the optional <em>all</em> parameter is true, the list will include methods in modules included in <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Other\n     def three() end\n   end\n\n   class Single\n     def Single.four() end\n   end\n\n   a = Single.new\n\n   def a.one()\n   end\n\n   class &lt;&lt; a\n     include Other\n     def two()\n     end\n   end\n\n   Single.singleton_methods    #=&gt; [&quot;four&quot;]\n   a.singleton_methods(false)  #=&gt; [&quot;two&quot;, &quot;one&quot;]\n   a.singleton_methods         #=&gt; [&quot;two&quot;, &quot;one&quot;, &quot;three&quot;]\n"
full_name: Object#singleton_methods
is_singleton: false
name: singleton_methods
params: |
  obj.singleton_methods(all=true)    => array

visibility: public
ri/1.8/system/Object/instance_eval-i.yaml000064400000001764150403656020014154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates a string containing Ruby source code, or the given block, within the context of the receiver (<em>obj</em>). In order to set the context, the variable <tt>self</tt> is set to <em>obj</em> while the code is executing, giving the code access to <em>obj</em>'s instance variables. In the version of <tt>instance_eval</tt> that takes a <tt>String</tt>, the optional second and third parameters supply a filename and starting line number that are used when reporting compilation errors.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Klass\n     def initialize\n       @secret = 99\n     end\n   end\n   k = Klass.new\n   k.instance_eval { @secret }   #=&gt; 99\n"
full_name: Object#instance_eval
is_singleton: false
name: instance_eval
params: |
  obj.instance_eval(string [, filename [, lineno]] )   => obj
  obj.instance_eval {| | block }                       => obj

visibility: public
ri/1.8/system/Object/%3d%3d-i.yaml000064400000002514150403656020012202 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---At the <tt>Object</tt> level, <tt>==</tt> returns <tt>true</tt> only if <em>obj</em> and <em>other</em> are the same object. Typically, this method is overridden in descendent classes to provide class-specific meaning.
- !ruby/struct:SM::Flow::P 
  body: "Unlike <tt>==</tt>, the <tt>equal?</tt> method should never be overridden by subclasses: it is used to determine object identity (that is, <tt>a.equal?(b)</tt> iff <tt>a</tt> is the same object as <tt>b</tt>)."
- !ruby/struct:SM::Flow::P 
  body: "The <tt>eql?</tt> method returns <tt>true</tt> if <em>obj</em> and <em>anObject</em> have the same value. Used by <tt>Hash</tt> to test members for equality. For objects of class <tt>Object</tt>, <tt>eql?</tt> is synonymous with <tt>==</tt>. Subclasses normally continue this tradition, but there are exceptions. <tt>Numeric</tt> types, for example, perform type conversion across <tt>==</tt>, but not across <tt>eql?</tt>, so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   1 == 1.0     #=&gt; true\n   1.eql? 1.0   #=&gt; false\n"
full_name: Object#==
is_singleton: false
name: ==
params: |
  obj == other        => true or false
  obj.equal?(other)   => true or false
  obj.eql?(other)     => true or false

visibility: public
ri/1.8/system/Object/remove_instance_variable-i.yaml000064400000001242150403656020016356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes the named instance variable from <em>obj</em>, returning that variable's value.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Dummy\n     attr_reader :var\n     def initialize\n       @var = 99\n     end\n     def remove\n       remove_instance_variable(:@var)\n     end\n   end\n   d = Dummy.new\n   d.var      #=&gt; 99\n   d.remove   #=&gt; 99\n   d.var      #=&gt; nil\n"
full_name: Object#remove_instance_variable
is_singleton: false
name: remove_instance_variable
params: |
  obj.remove_instance_variable(symbol)    => obj

visibility: public
ri/1.8/system/Object/clone-i.yaml000064400000002220150403656020012425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produces a shallow copy of <em>obj</em>---the instance variables of <em>obj</em> are copied, but not the objects they reference. Copies the frozen and tainted state of <em>obj</em>. See also the discussion under <tt>Object#dup</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Klass\n      attr_accessor :str\n   end\n   s1 = Klass.new      #=&gt; #&lt;Klass:0x401b3a38&gt;\n   s1.str = &quot;Hello&quot;    #=&gt; &quot;Hello&quot;\n   s2 = s1.clone       #=&gt; #&lt;Klass:0x401b3998 @str=&quot;Hello&quot;&gt;\n   s2.str[1,4] = &quot;i&quot;   #=&gt; &quot;i&quot;\n   s1.inspect          #=&gt; &quot;#&lt;Klass:0x401b3a38 @str=\\&quot;Hi\\&quot;&gt;&quot;\n   s2.inspect          #=&gt; &quot;#&lt;Klass:0x401b3998 @str=\\&quot;Hi\\&quot;&gt;&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: "This method may have class-specific behavior. If so, that behavior will be documented under the #<tt>initialize_copy</tt> method of the class."
full_name: Object#clone
is_singleton: false
name: clone
params: |
  obj.clone -> an_object

visibility: public
ri/1.8/system/Object/__id__-i.yaml000064400000001237150403656020012524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: object_id"
- !ruby/struct:SM::Flow::P 
  body: Returns an integer identifier for <em>obj</em>. The same number will be returned on all calls to <tt>id</tt> for a given object, and no two active objects will share an id. <tt>Object#object_id</tt> is a different concept from the <tt>:name</tt> notation, which returns the symbol id of <tt>name</tt>. Replaces the deprecated <tt>Object#id</tt>.
full_name: Object#__id__
is_singleton: false
name: __id__
params: |
  obj.__id__       => fixnum
  obj.object_id    => fixnum

visibility: public
ri/1.8/system/Object/extend-i.yaml000064400000001335150403656020012622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds to <em>obj</em> the instance methods from each module given as a parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     def hello\n       &quot;Hello from Mod.\\n&quot;\n     end\n   end\n\n   class Klass\n     def hello\n       &quot;Hello from Klass.\\n&quot;\n     end\n   end\n\n   k = Klass.new\n   k.hello         #=&gt; &quot;Hello from Klass.\\n&quot;\n   k.extend(Mod)   #=&gt; #&lt;Klass:0x401b3bc8&gt;\n   k.hello         #=&gt; &quot;Hello from Mod.\\n&quot;\n"
full_name: Object#extend
is_singleton: false
name: extend
params: |
  obj.extend(module, ...)    => obj

visibility: public
ri/1.8/system/Object/protected_methods-i.yaml000064400000000672150403656020015052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the list of protected methods accessible to <em>obj</em>. If the <em>all</em> parameter is set to <tt>false</tt>, only those methods in the receiver will be listed.
full_name: Object#protected_methods
is_singleton: false
name: protected_methods
params: |
  obj.protected_methods(all=true)   => array

visibility: public
ri/1.8/system/Object/method-i.yaml000064400000001605150403656020012613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up the named method as a receiver in <em>obj</em>, returning a <tt>Method</tt> object (or raising <tt>NameError</tt>). The <tt>Method</tt> object acts as a closure in <em>obj</em>'s object instance, so instance variables and the value of <tt>self</tt> remain available.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Demo\n     def initialize(n)\n       @iv = n\n     end\n     def hello()\n       &quot;Hello, @iv = #{@iv}&quot;\n     end\n   end\n\n   k = Demo.new(99)\n   m = k.method(:hello)\n   m.call   #=&gt; &quot;Hello, @iv = 99&quot;\n\n   l = Demo.new('Fred')\n   m = l.method(&quot;hello&quot;)\n   m.call   #=&gt; &quot;Hello, @iv = Fred&quot;\n"
full_name: Object#method
is_singleton: false
name: method
params: |
  obj.method(sym)    => method

visibility: public
ri/1.8/system/Object/dclone-i.yaml000064400000000246150403656020012577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Object#dclone
is_singleton: false
name: dclone
params: ()
visibility: public
ri/1.8/system/Object/display-i.yaml000064400000001267150403656020013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Prints <em>obj</em> on the given port (default <tt>$&gt;</tt>). Equivalent to:"
- !ruby/struct:SM::Flow::VERB 
  body: "   def display(port=$&gt;)\n     port.write self\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: "For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "   1.display\n   &quot;cat&quot;.display\n   [ 4, 5, 6 ].display\n   puts\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   1cat456\n"
full_name: Object#display
is_singleton: false
name: display
params: |
  obj.display(port=$>)    => nil

visibility: public
ri/1.8/system/Object/singleton_method_removed-i.yaml000064400000001504150403656020016414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invoked as a callback whenever a singleton method is removed from the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Chatty\n     def Chatty.singleton_method_removed(id)\n       puts &quot;Removing #{id.id2name}&quot;\n     end\n     def self.one()     end\n     def two()          end\n     def Chatty.three() end\n     class &lt;&lt;self\n       remove_method :three\n       remove_method :one\n     end\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Removing three\n   Removing one\n"
full_name: Object#singleton_method_removed
is_singleton: false
name: singleton_method_removed
params: |
  singleton_method_removed(symbol)

visibility: public
ri/1.8/system/Object/nil%3f-i.yaml000064400000000667150403656020012422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "call_seq:"
- !ruby/struct:SM::Flow::VERB 
  body: "  nil.nil?               =&gt; true\n  &lt;anything_else&gt;.nil?   =&gt; false\n"
- !ruby/struct:SM::Flow::P 
  body: Only the object <em>nil</em> responds <tt>true</tt> to <tt>nil?</tt>.
full_name: Object#nil?
is_singleton: false
name: nil?
params: ()
visibility: public
ri/1.8/system/Object/untaint-i.yaml000064400000000411150403656020013007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes the taint from <em>obj</em>.
full_name: Object#untaint
is_singleton: false
name: untaint
params: |
  obj.untaint    => obj

visibility: public
ri/1.8/system/Object/instance_variable_get-i.yaml000064400000001520150403656030015640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of the given instance variable, or nil if the instance variable is not set. The <tt>@</tt> part of the variable name should be included for regular instance variables. Throws a <tt>NameError</tt> exception if the supplied symbol is not valid as an instance variable name.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Fred\n     def initialize(p1, p2)\n       @a, @b = p1, p2\n     end\n   end\n   fred = Fred.new('cat', 99)\n   fred.instance_variable_get(:@a)    #=&gt; &quot;cat&quot;\n   fred.instance_variable_get(&quot;@b&quot;)   #=&gt; 99\n"
full_name: Object#instance_variable_get
is_singleton: false
name: instance_variable_get
params: |
  obj.instance_variable_get(symbol)    => obj

visibility: public
ri/1.8/system/Object/kind_of%3f-i.yaml000064400000001612150403656030013241 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>class</em> is the class of <em>obj</em>, or if <em>class</em> is one of the superclasses of <em>obj</em> or modules included in <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   module M;    end\n   class A\n     include M\n   end\n   class B &lt; A; end\n   class C &lt; B; end\n   b = B.new\n   b.instance_of? A   #=&gt; false\n   b.instance_of? B   #=&gt; true\n   b.instance_of? C   #=&gt; false\n   b.instance_of? M   #=&gt; false\n   b.kind_of? A       #=&gt; true\n   b.kind_of? B       #=&gt; true\n   b.kind_of? C       #=&gt; false\n   b.kind_of? M       #=&gt; true\n"
full_name: Object#kind_of?
is_singleton: false
name: kind_of?
params: |
  obj.is_a?(class)       => true or false
  obj.kind_of?(class)    => true or false

visibility: public
ri/1.8/system/DEBUGGER__/debug_thread_info-c.yaml000064400000000316150403656030015230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::debug_thread_info
is_singleton: true
name: debug_thread_info
params: (input, binding)
visibility: public
ri/1.8/system/DEBUGGER__/thread_list_all-c.yaml000064400000000274150403656040014736 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::thread_list_all
is_singleton: true
name: thread_list_all
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/suspend-c.yaml000064400000000254150403656050013264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::suspend
is_singleton: true
name: suspend
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/get_thread-c.yaml000064400000000265150403656060013714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::get_thread
is_singleton: true
name: get_thread
params: (num)
visibility: public
ri/1.8/system/DEBUGGER__/Mutex/cdesc-Mutex.yaml000064400000000575150403656060014655 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: DEBUGGER__::Mutex
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: lock
- !ruby/object:RI::MethodSummary 
  name: locked?
- !ruby/object:RI::MethodSummary 
  name: unlock
name: Mutex
superclass: Object
ri/1.8/system/DEBUGGER__/Mutex/unlock-i.yaml000064400000000261150403656060014205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Mutex#unlock
is_singleton: false
name: unlock
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Mutex/locked%3f-i.yaml000064400000000263150403656060014453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Mutex#locked?
is_singleton: false
name: locked?
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Mutex/new-c.yaml000064400000000253150403656060013476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Mutex::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Mutex/lock-i.yaml000064400000000255150403656060013645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Mutex#lock
is_singleton: false
name: lock
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/thnum-i.yaml000064400000000261150403656060014367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#thnum
is_singleton: false
name: thnum
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/context-i.yaml000064400000000267150403656060014726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#context
is_singleton: false
name: context
params: (th)
visibility: public
ri/1.8/system/DEBUGGER__/Context/trace%3f-i.yaml000064400000000263150403656070014633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#trace?
is_singleton: false
name: trace?
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/var_list-i.yaml000064400000000303150403656070015055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#var_list
is_singleton: false
name: var_list
params: (ary, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/debug_eval-i.yaml000064400000000307150403656070015333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#debug_eval
is_singleton: false
name: debug_eval
params: (str, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/stop_next-i.yaml000064400000000274150403656070015264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#stop_next
is_singleton: false
name: stop_next
params: (n=1)
visibility: public
ri/1.8/system/DEBUGGER__/Context/excn_handle-i.yaml000064400000000324150403656070015505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#excn_handle
is_singleton: false
name: excn_handle
params: (file, line, id, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/debug_print_help-i.yaml000064400000000307150403656100016542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#debug_print_help
is_singleton: false
name: debug_print_help
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/readline-i.yaml000064400000000303150403656110015010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#readline
is_singleton: false
name: readline
params: (prompt, hist)
visibility: public
ri/1.8/system/DEBUGGER__/Context/check_break_points-i.yaml000064400000000350150403656110017044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#check_break_points
is_singleton: false
name: check_break_points
params: (file, klass, pos, binding, id)
visibility: public
ri/1.8/system/DEBUGGER__/Context/frame_set_pos-i.yaml000064400000000313150403656110016054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#frame_set_pos
is_singleton: false
name: frame_set_pos
params: (file, line)
visibility: public
ri/1.8/system/DEBUGGER__/Context/debug_command-i.yaml000064400000000330150403656120016012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#debug_command
is_singleton: false
name: debug_command
params: (file, line, id, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/display_expressions-i.yaml000064400000000324150403656120017340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#display_expressions
is_singleton: false
name: display_expressions
params: (binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/debug_variable_info-i.yaml000064400000000333150403656120017177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#debug_variable_info
is_singleton: false
name: debug_variable_info
params: (input, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/format_frame-i.yaml000064400000000302150403656120015667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#format_frame
is_singleton: false
name: format_frame
params: (pos)
visibility: public
ri/1.8/system/DEBUGGER__/Context/clear_suspend-i.yaml000064400000000301150403656120016053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#clear_suspend
is_singleton: false
name: clear_suspend
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/break_points-i.yaml000064400000000277150403656120015720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#break_points
is_singleton: false
name: break_points
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/trace_func-i.yaml000064400000000340150403656120015340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#trace_func
is_singleton: false
name: trace_func
params: (event, file, line, id, binding, klass)
visibility: public
ri/1.8/system/DEBUGGER__/Context/resume_all-i.yaml000064400000000273150403656120015364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#resume_all
is_singleton: false
name: resume_all
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/debug_silent_eval-i.yaml000064400000000325150403656120016705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#debug_silent_eval
is_singleton: false
name: debug_silent_eval
params: (str, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/display_expression-i.yaml000064400000000327150403656120017160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#display_expression
is_singleton: false
name: display_expression
params: (exp, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/new-c.yaml000064400000000255150403656120014017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/debug_method_info-i.yaml000064400000000327150403656120016675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#debug_method_info
is_singleton: false
name: debug_method_info
params: (input, binding)
visibility: public
ri/1.8/system/DEBUGGER__/Context/set_last_thread-i.yaml000064400000000307150403656120016377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#set_last_thread
is_singleton: false
name: set_last_thread
params: (th)
visibility: public
ri/1.8/system/DEBUGGER__/Context/set_trace-i.yaml000064400000000274150403656120015206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#set_trace
is_singleton: false
name: set_trace
params: (arg)
visibility: public
ri/1.8/system/DEBUGGER__/Context/display_frames-i.yaml000064400000000306150403656120016233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#display_frames
is_singleton: false
name: display_frames
params: (pos)
visibility: public
ri/1.8/system/DEBUGGER__/Context/cdesc-Context.yaml000064400000004405150403656120015512 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEBUG_LAST_CMD
  value: "[]"
- !ruby/object:RI::Constant 
  comment: 
  name: USE_READLINE
  value: "false"
full_name: DEBUGGER__::Context
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: break_points
- !ruby/object:RI::MethodSummary 
  name: check_break_points
- !ruby/object:RI::MethodSummary 
  name: check_suspend
- !ruby/object:RI::MethodSummary 
  name: clear_suspend
- !ruby/object:RI::MethodSummary 
  name: context
- !ruby/object:RI::MethodSummary 
  name: debug_command
- !ruby/object:RI::MethodSummary 
  name: debug_eval
- !ruby/object:RI::MethodSummary 
  name: debug_funcname
- !ruby/object:RI::MethodSummary 
  name: debug_method_info
- !ruby/object:RI::MethodSummary 
  name: debug_print_help
- !ruby/object:RI::MethodSummary 
  name: debug_silent_eval
- !ruby/object:RI::MethodSummary 
  name: debug_variable_info
- !ruby/object:RI::MethodSummary 
  name: display
- !ruby/object:RI::MethodSummary 
  name: display_expression
- !ruby/object:RI::MethodSummary 
  name: display_expressions
- !ruby/object:RI::MethodSummary 
  name: display_frames
- !ruby/object:RI::MethodSummary 
  name: display_list
- !ruby/object:RI::MethodSummary 
  name: excn_handle
- !ruby/object:RI::MethodSummary 
  name: format_frame
- !ruby/object:RI::MethodSummary 
  name: frame_set_pos
- !ruby/object:RI::MethodSummary 
  name: line_at
- !ruby/object:RI::MethodSummary 
  name: readline
- !ruby/object:RI::MethodSummary 
  name: readline
- !ruby/object:RI::MethodSummary 
  name: resume_all
- !ruby/object:RI::MethodSummary 
  name: set_last_thread
- !ruby/object:RI::MethodSummary 
  name: set_suspend
- !ruby/object:RI::MethodSummary 
  name: set_trace
- !ruby/object:RI::MethodSummary 
  name: set_trace_all
- !ruby/object:RI::MethodSummary 
  name: stdout
- !ruby/object:RI::MethodSummary 
  name: stop_next
- !ruby/object:RI::MethodSummary 
  name: suspend_all
- !ruby/object:RI::MethodSummary 
  name: thnum
- !ruby/object:RI::MethodSummary 
  name: trace?
- !ruby/object:RI::MethodSummary 
  name: trace_func
- !ruby/object:RI::MethodSummary 
  name: var_list
name: Context
superclass: Object
ri/1.8/system/DEBUGGER__/Context/set_suspend-i.yaml000064400000000275150403656130015573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#set_suspend
is_singleton: false
name: set_suspend
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/check_suspend-i.yaml000064400000000301150403656130016043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#check_suspend
is_singleton: false
name: check_suspend
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/line_at-i.yaml000064400000000277150403656130014654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#line_at
is_singleton: false
name: line_at
params: (file, line)
visibility: public
ri/1.8/system/DEBUGGER__/Context/stdout-i.yaml000064400000000263150403656130014556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#stdout
is_singleton: false
name: stdout
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/display_list-i.yaml000064400000000317150403656130015734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#display_list
is_singleton: false
name: display_list
params: (b, e, file, line)
visibility: public
ri/1.8/system/DEBUGGER__/Context/display-i.yaml000064400000000265150403656130014703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#display
is_singleton: false
name: display
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/Context/set_trace_all-i.yaml000064400000000304150403656140016032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#set_trace_all
is_singleton: false
name: set_trace_all
params: (arg)
visibility: public
ri/1.8/system/DEBUGGER__/Context/debug_funcname-i.yaml000064400000000305150403656140016174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#debug_funcname
is_singleton: false
name: debug_funcname
params: (id)
visibility: public
ri/1.8/system/DEBUGGER__/Context/suspend_all-i.yaml000064400000000275150403656140015551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::Context#suspend_all
is_singleton: false
name: suspend_all
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/make_thread_list-c.yaml000064400000000276150403656140015106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::make_thread_list
is_singleton: true
name: make_thread_list
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/interrupt-c.yaml000064400000000260150403656140013634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::interrupt
is_singleton: true
name: interrupt
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/stdout%3d-c.yaml000064400000000255150403656140013422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::stdout=
is_singleton: true
name: stdout=
params: (s)
visibility: public
ri/1.8/system/DEBUGGER__/stdout-c.yaml000064400000000252150403656150013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::stdout
is_singleton: true
name: stdout
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/thread_list-c.yaml000064400000000267150403656150014112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::thread_list
is_singleton: true
name: thread_list
params: (num)
visibility: public
ri/1.8/system/DEBUGGER__/break_points-c.yaml000064400000000266150403656150014267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::break_points
is_singleton: true
name: break_points
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/cdesc-DEBUGGER__.yaml000064400000002126150403656150014125 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: break_points
- !ruby/object:RI::MethodSummary 
  name: context
- !ruby/object:RI::MethodSummary 
  name: debug_thread_info
- !ruby/object:RI::MethodSummary 
  name: display
- !ruby/object:RI::MethodSummary 
  name: get_thread
- !ruby/object:RI::MethodSummary 
  name: interrupt
- !ruby/object:RI::MethodSummary 
  name: make_thread_list
- !ruby/object:RI::MethodSummary 
  name: resume
- !ruby/object:RI::MethodSummary 
  name: set_last_thread
- !ruby/object:RI::MethodSummary 
  name: set_trace
- !ruby/object:RI::MethodSummary 
  name: stdout
- !ruby/object:RI::MethodSummary 
  name: stdout=
- !ruby/object:RI::MethodSummary 
  name: suspend
- !ruby/object:RI::MethodSummary 
  name: thread_list
- !ruby/object:RI::MethodSummary 
  name: thread_list_all
- !ruby/object:RI::MethodSummary 
  name: waiting
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MUTEX
  value: Mutex.new
full_name: DEBUGGER__
includes: []

instance_methods: []

name: DEBUGGER__
superclass: Object
ri/1.8/system/DEBUGGER__/set_trace-c.yaml000064400000000265150403656150013557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::set_trace
is_singleton: true
name: set_trace
params: ( arg )
visibility: public
ri/1.8/system/DEBUGGER__/resume-c.yaml000064400000000252150403656150013102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::resume
is_singleton: true
name: resume
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/set_last_thread-c.yaml000064400000000276150403656160014756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::set_last_thread
is_singleton: true
name: set_last_thread
params: (th)
visibility: public
ri/1.8/system/DEBUGGER__/display-c.yaml000064400000000254150403656160013252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::display
is_singleton: true
name: display
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/waiting-c.yaml000064400000000254150403656160013247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::waiting
is_singleton: true
name: waiting
params: ()
visibility: public
ri/1.8/system/DEBUGGER__/context-c.yaml000064400000000301150403656170013263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DEBUGGER__::context
is_singleton: true
name: context
params: (thread=Thread.current)
visibility: public
ri/1.8/system/FileUtils/have_option%3f-c.yaml000064400000000772150403656170014642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the method <tt>mid</tt> have an option <tt>opt</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  p FileUtils.have_option?(:cp, :noop)     #=&gt; true\n  p FileUtils.have_option?(:rm, :force)    #=&gt; true\n  p FileUtils.have_option?(:rm, :perserve) #=&gt; false\n"
full_name: FileUtils::have_option?
is_singleton: true
name: have_option?
params: (mid, opt)
visibility: private
ri/1.8/system/FileUtils/options_of-c.yaml000064400000000637150403656170014210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an Array of option names of the method <tt>mid</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  p FileUtils.options(:rm)  #=&gt; [&quot;noop&quot;, &quot;verbose&quot;, &quot;force&quot;]\n"
full_name: FileUtils::options_of
is_singleton: true
name: options_of
params: (mid)
visibility: private
ri/1.8/system/FileUtils/move-i.yaml000064400000000360150403656170012776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #mv"
full_name: FileUtils#move
is_singleton: false
name: move
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/rm_rf-i.yaml000064400000001042150403656170013133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: rmtree
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose secure"
- !ruby/struct:SM::Flow::P 
  body: Equivalent to
- !ruby/struct:SM::Flow::VERB 
  body: "  #rm_r(list, :force =&gt; true)\n"
- !ruby/struct:SM::Flow::P 
  body: "WARNING: This method causes local vulnerability. Read the documentation of #rm_r first."
full_name: FileUtils#rm_rf
is_singleton: false
name: rm_rf
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/cdesc-FileUtils.yaml000064400000014100150403656200014550 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: collect_method
- !ruby/object:RI::MethodSummary 
  name: commands
- !ruby/object:RI::MethodSummary 
  name: have_option?
- !ruby/object:RI::MethodSummary 
  name: options
- !ruby/object:RI::MethodSummary 
  name: options_of
comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: fileutils.rb
- !ruby/struct:SM::Flow::P 
  body: Copyright (c) 2000-2006 Minero Aoki
- !ruby/struct:SM::Flow::P 
  body: This program is free software. You can distribute/modify this program under the same terms of ruby.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: module FileUtils
- !ruby/struct:SM::Flow::P 
  body: Namespace for several file utility methods for copying, moving, removing, etc.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Module Functions
- !ruby/struct:SM::Flow::VERB 
  body: "  cd(dir, options)\n  cd(dir, options) {|dir| .... }\n  pwd()\n  mkdir(dir, options)\n  mkdir(list, options)\n  mkdir_p(dir, options)\n  mkdir_p(list, options)\n  rmdir(dir, options)\n  rmdir(list, options)\n  ln(old, new, options)\n  ln(list, destdir, options)\n  ln_s(old, new, options)\n  ln_s(list, destdir, options)\n  ln_sf(src, dest, options)\n  cp(src, dest, options)\n  cp(list, dir, options)\n  cp_r(src, dest, options)\n  cp_r(list, dir, options)\n  mv(src, dest, options)\n  mv(list, dir, options)\n  rm(list, options)\n  rm_r(list, options)\n  rm_rf(list, options)\n  install(src, dest, mode = &lt;src's&gt;, options)\n  chmod(mode, list, options)\n  chmod_R(mode, list, options)\n  chown(user, group, list, options)\n  chown_R(user, group, list, options)\n  touch(list, options)\n"
- !ruby/struct:SM::Flow::P 
  body: The <tt>options</tt> parameter is a hash of options, taken from the list <tt>:force</tt>, <tt>:noop</tt>, <tt>:preserve</tt>, and <tt>:verbose</tt>. <tt>:noop</tt> means that no changes are made. The other two are obvious. Each method documents the options that it honours.
- !ruby/struct:SM::Flow::P 
  body: All methods that have the concept of a &quot;source&quot; file or directory can take either one file or a list of files in that argument. See the method documentation for examples.
- !ruby/struct:SM::Flow::P 
  body: "There are some `low level' methods, which do not accept any option:"
- !ruby/struct:SM::Flow::VERB 
  body: "  copy_entry(src, dest, preserve = false, dereference = false)\n  copy_file(src, dest, preserve = false, dereference = true)\n  copy_stream(srcstream, deststream)\n  remove_entry(path, force = false)\n  remove_entry_secure(path, force = false)\n  remove_file(path, force = false)\n  compare_file(path_a, path_b)\n  compare_stream(stream_a, stream_b)\n  uptodate?(file, cmp_list)\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: module FileUtils::Verbose
- !ruby/struct:SM::Flow::P 
  body: This module has all methods of FileUtils module, but it outputs messages before acting. This equates to passing the <tt>:verbose</tt> flag to methods in FileUtils.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: module FileUtils::NoWrite
- !ruby/struct:SM::Flow::P 
  body: This module has all methods of FileUtils module, but never changes files/directories. This equates to passing the <tt>:noop</tt> flag to methods in FileUtils.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: module FileUtils::DryRun
- !ruby/struct:SM::Flow::P 
  body: This module has all methods of FileUtils module, but never changes files/directories. This equates to passing the <tt>:noop</tt> and <tt>:verbose</tt> flags to methods in FileUtils.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: METHODS
  value: singleton_methods() - %w( private_module_function       commands options have_option? options_of collect_method )
full_name: FileUtils
includes: 
- !ruby/object:RI::IncludedModule 
  name: StreamUtils_
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: cd
- !ruby/object:RI::MethodSummary 
  name: chdir
- !ruby/object:RI::MethodSummary 
  name: chmod
- !ruby/object:RI::MethodSummary 
  name: chmod_R
- !ruby/object:RI::MethodSummary 
  name: chown
- !ruby/object:RI::MethodSummary 
  name: chown_R
- !ruby/object:RI::MethodSummary 
  name: cmp
- !ruby/object:RI::MethodSummary 
  name: compare_file
- !ruby/object:RI::MethodSummary 
  name: compare_stream
- !ruby/object:RI::MethodSummary 
  name: copy
- !ruby/object:RI::MethodSummary 
  name: copy_entry
- !ruby/object:RI::MethodSummary 
  name: copy_file
- !ruby/object:RI::MethodSummary 
  name: copy_stream
- !ruby/object:RI::MethodSummary 
  name: cp
- !ruby/object:RI::MethodSummary 
  name: cp_r
- !ruby/object:RI::MethodSummary 
  name: fu_have_symlink?
- !ruby/object:RI::MethodSummary 
  name: fu_world_writable?
- !ruby/object:RI::MethodSummary 
  name: getwd
- !ruby/object:RI::MethodSummary 
  name: identical?
- !ruby/object:RI::MethodSummary 
  name: install
- !ruby/object:RI::MethodSummary 
  name: link
- !ruby/object:RI::MethodSummary 
  name: ln
- !ruby/object:RI::MethodSummary 
  name: ln_s
- !ruby/object:RI::MethodSummary 
  name: ln_sf
- !ruby/object:RI::MethodSummary 
  name: makedirs
- !ruby/object:RI::MethodSummary 
  name: mkdir
- !ruby/object:RI::MethodSummary 
  name: mkdir_p
- !ruby/object:RI::MethodSummary 
  name: mkpath
- !ruby/object:RI::MethodSummary 
  name: move
- !ruby/object:RI::MethodSummary 
  name: mv
- !ruby/object:RI::MethodSummary 
  name: pwd
- !ruby/object:RI::MethodSummary 
  name: remove
- !ruby/object:RI::MethodSummary 
  name: remove_dir
- !ruby/object:RI::MethodSummary 
  name: remove_entry
- !ruby/object:RI::MethodSummary 
  name: remove_entry_secure
- !ruby/object:RI::MethodSummary 
  name: remove_file
- !ruby/object:RI::MethodSummary 
  name: rm
- !ruby/object:RI::MethodSummary 
  name: rm_f
- !ruby/object:RI::MethodSummary 
  name: rm_r
- !ruby/object:RI::MethodSummary 
  name: rm_rf
- !ruby/object:RI::MethodSummary 
  name: rmdir
- !ruby/object:RI::MethodSummary 
  name: rmtree
- !ruby/object:RI::MethodSummary 
  name: safe_unlink
- !ruby/object:RI::MethodSummary 
  name: symlink
- !ruby/object:RI::MethodSummary 
  name: touch
- !ruby/object:RI::MethodSummary 
  name: uptodate?
name: FileUtils
superclass: 
ri/1.8/system/FileUtils/cp-i.yaml000064400000001564150403656210012434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: copy
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: preserve noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Copies a file content <tt>src</tt> to <tt>dest</tt>. If <tt>dest</tt> is a directory, copies <tt>src</tt> to +dest/src+.
- !ruby/struct:SM::Flow::P 
  body: If <tt>src</tt> is a list of files, then <tt>dest</tt> must be a directory.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.cp 'eval.c', 'eval.c.org'\n  FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6'\n  FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6', :verbose =&gt; true\n  FileUtils.cp 'symlink', 'dest'   # copy content, &quot;dest&quot; is not a symlink\n"
full_name: FileUtils#cp
is_singleton: false
name: cp
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/rm_r-i.yaml000064400000002272150403656210012766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: force noop verbose secure"
- !ruby/struct:SM::Flow::P 
  body: remove files <tt>list</tt>[0] <tt>list</tt>[1]... If <tt>list</tt>[n] is a directory, removes its all contents recursively. This method ignores StandardError when :force option is set.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.rm_r Dir.glob('/tmp/*')\n  FileUtils.rm_r '/', :force =&gt; true          #  :-)\n"
- !ruby/struct:SM::Flow::P 
  body: "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=&gt;false."
- !ruby/struct:SM::Flow::P 
  body: "NOTE: This method calls #remove_entry_secure if :secure option is set. See also #remove_entry_secure."
full_name: FileUtils#rm_r
is_singleton: false
name: rm_r
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/NoWrite/cdesc-NoWrite.yaml000064400000000665150403656220015643 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This module has all methods of FileUtils module, but never changes files/directories. This equates to passing the <tt>:noop</tt> flag to methods in FileUtils.
constants: []

full_name: FileUtils::NoWrite
includes: 
- !ruby/object:RI::IncludedModule 
  name: FileUtils
instance_methods: []

name: NoWrite
superclass: 
ri/1.8/system/FileUtils/copy_file-i.yaml000064400000000565150403656220014004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Copies file contents of <tt>src</tt> to <tt>dest</tt>. Both of <tt>src</tt> and <tt>dest</tt> must be a path name.
full_name: FileUtils#copy_file
is_singleton: false
name: copy_file
params: (src, dest, preserve = false, dereference = true)
visibility: public
ri/1.8/system/FileUtils/mkpath-i.yaml000064400000000364150403656230013315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #mkdir_p"
full_name: FileUtils#mkpath
is_singleton: false
name: mkpath
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/chmod-i.yaml000064400000001126150403656230013120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Changes permission bits on the named files (in <tt>list</tt>) to the bit pattern represented by <tt>mode</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.chmod 0755, 'somecommand'\n  FileUtils.chmod 0644, %w(my.rb your.rb his.rb her.rb)\n  FileUtils.chmod 0755, '/usr/bin/ruby', :verbose =&gt; true\n"
full_name: FileUtils#chmod
is_singleton: false
name: chmod
params: (mode, list, options = {})
visibility: public
ri/1.8/system/FileUtils/rmdir-i.yaml000064400000001055150403656240013145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop, verbose"
- !ruby/struct:SM::Flow::P 
  body: Removes one or more directories.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.rmdir 'somedir'\n  FileUtils.rmdir %w(somedir anydir otherdir)\n  # Does not really remove directory; outputs message.\n  FileUtils.rmdir 'somedir', :verbose =&gt; true, :noop =&gt; true\n"
full_name: FileUtils#rmdir
is_singleton: false
name: rmdir
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/cmp-i.yaml000064400000000345150403656250012611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #compare_file"
full_name: FileUtils#cmp
is_singleton: false
name: cmp
params: (a, b)
visibility: public
ri/1.8/system/FileUtils/compare_stream-i.yaml000064400000000463150403656250015034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the contents of a stream <tt>a</tt> and <tt>b</tt> are identical.
full_name: FileUtils#compare_stream
is_singleton: false
name: compare_stream
params: (a, b)
visibility: public
ri/1.8/system/FileUtils/fu_have_symlink%3f-i.yaml000064400000000274150403656260015515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: FileUtils#fu_have_symlink?
is_singleton: false
name: fu_have_symlink?
params: (
visibility: public
ri/1.8/system/FileUtils/makedirs-i.yaml000064400000000370150403656260013630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #mkdir_p"
full_name: FileUtils#makedirs
is_singleton: false
name: makedirs
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/collect_method-c.yaml000064400000000712150403656260015010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an Array of method names which have the option <tt>opt</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  p FileUtils.collect_method(:preserve) #=&gt; [&quot;cp&quot;, &quot;cp_r&quot;, &quot;copy&quot;, &quot;install&quot;]\n"
full_name: FileUtils::collect_method
is_singleton: true
name: collect_method
params: (opt)
visibility: private
ri/1.8/system/FileUtils/copy_entry-i.yaml000064400000002052150403656260014223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Copies a file system entry <tt>src</tt> to <tt>dest</tt>. If <tt>src</tt> 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)
- !ruby/struct:SM::Flow::P 
  body: Both of <tt>src</tt> and <tt>dest</tt> must be a path name. <tt>src</tt> must exist, <tt>dest</tt> must not exist.
- !ruby/struct:SM::Flow::P 
  body: If <tt>preserve</tt> is true, this method preserves owner, group, permissions and modified time.
- !ruby/struct:SM::Flow::P 
  body: If <tt>dereference_root</tt> is true, this method dereference tree root.
- !ruby/struct:SM::Flow::P 
  body: If <tt>remove_destination</tt> is true, this method removes each destination file before copy.
full_name: FileUtils#copy_entry
is_singleton: false
name: copy_entry
params: (src, dest, preserve = false, dereference_root = false, remove_destination = false)
visibility: public
ri/1.8/system/FileUtils/remove-i.yaml000064400000000357150403656260013333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #rm"
full_name: FileUtils#remove
is_singleton: false
name: remove
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/Entry_/cdesc-Entry_.yaml000064400000000304150403656260015357 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: FileUtils::Entry_
includes: []

instance_methods: []

name: Entry_
superclass: Object
ri/1.8/system/FileUtils/StreamUtils_/fu_blksize-i.yaml000064400000000302150403656260016574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: FileUtils::StreamUtils_#fu_blksize
is_singleton: false
name: fu_blksize
params: (st)
visibility: private
ri/1.8/system/FileUtils/StreamUtils_/cdesc-StreamUtils_.yaml000064400000000653150403656260017714 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: FileUtils::StreamUtils_
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: fu_blksize
- !ruby/object:RI::MethodSummary 
  name: fu_default_blksize
- !ruby/object:RI::MethodSummary 
  name: fu_stream_blksize
- !ruby/object:RI::MethodSummary 
  name: fu_windows?
name: StreamUtils_
superclass: 
ri/1.8/system/FileUtils/StreamUtils_/fu_default_blksize-i.yaml000064400000000320150403656270020301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: FileUtils::StreamUtils_#fu_default_blksize
is_singleton: false
name: fu_default_blksize
params: ()
visibility: private
ri/1.8/system/FileUtils/StreamUtils_/fu_stream_blksize-i.yaml000064400000000326150403656270020156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: FileUtils::StreamUtils_#fu_stream_blksize
is_singleton: false
name: fu_stream_blksize
params: (*streams)
visibility: private
ri/1.8/system/FileUtils/StreamUtils_/fu_windows%3f-i.yaml000064400000000302150403656270017122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: FileUtils::StreamUtils_#fu_windows?
is_singleton: false
name: fu_windows?
params: ()
visibility: private
ri/1.8/system/FileUtils/fu_world_writable%3f-i.yaml000064400000000303150403656270016036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: FileUtils#fu_world_writable?
is_singleton: false
name: fu_world_writable?
params: (st)
visibility: public
ri/1.8/system/FileUtils/cd-i.yaml000064400000001200150403656270012411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: chdir
block_params: dir
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: verbose"
- !ruby/struct:SM::Flow::P 
  body: Changes the current directory to the directory <tt>dir</tt>.
- !ruby/struct:SM::Flow::P 
  body: If this method is called with block, resumes to the old working directory after the block execution finished.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.cd('/', :verbose =&gt; true)   # chdir and report it\n"
full_name: FileUtils#cd
is_singleton: false
name: cd
params: (dir, options = {}) {|dir| ...}
visibility: public
ri/1.8/system/FileUtils/mkdir-i.yaml000064400000001033150403656270013135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: mode noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Creates one or more directories.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.mkdir 'test'\n  FileUtils.mkdir %w( tmp data )\n  FileUtils.mkdir 'notexist', :noop =&gt; true  # Does not really create.\n  FileUtils.mkdir 'tmp', :mode =&gt; 0700\n"
full_name: FileUtils#mkdir
is_singleton: false
name: mkdir
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/mv-i.yaml000064400000001423150403656300012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: move
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: force noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Moves file(s) <tt>src</tt> to <tt>dest</tt>. If <tt>file</tt> and <tt>dest</tt> exist on the different disk partition, the file is copied instead.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.mv 'badname.rb', 'goodname.rb'\n  FileUtils.mv 'stuff.rb', '/notexist/lib/ruby', :force =&gt; true  # no error\n\n  FileUtils.mv %w(junk.txt dust.txt), '/home/aamine/.trash/'\n  FileUtils.mv Dir.glob('test*.rb'), 'test', :noop =&gt; true, :verbose =&gt; true\n"
full_name: FileUtils#mv
is_singleton: false
name: mv
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/DryRun/cdesc-DryRun.yaml000064400000000756150403656300015333 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This module has all methods of FileUtils module, but never changes files/directories, with printing message before acting. This equates to passing the <tt>:noop</tt> and <tt>:verbose</tt> flag to methods in FileUtils.
constants: []

full_name: FileUtils::DryRun
includes: 
- !ruby/object:RI::IncludedModule 
  name: FileUtils
instance_methods: []

name: DryRun
superclass: 
ri/1.8/system/FileUtils/link-i.yaml000064400000000360150403656300012760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #ln"
full_name: FileUtils#link
is_singleton: false
name: link
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/copy-i.yaml000064400000000360150403656300012775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #cp"
full_name: FileUtils#copy
is_singleton: false
name: copy
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/ln_sf-i.yaml000064400000000554150403656300013131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Same as
- !ruby/struct:SM::Flow::VERB 
  body: "  #ln_s(src, dest, :force)\n"
full_name: FileUtils#ln_sf
is_singleton: false
name: ln_sf
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/compare_file-i.yaml000064400000001051150403656310014447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: identical?
- !ruby/object:RI::AliasName 
  name: cmp
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the contents of a file A and a file B are identical.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.compare_file('somefile', 'somefile')  #=&gt; true\n  FileUtils.compare_file('/bin/cp', '/bin/mv')    #=&gt; maybe false\n"
full_name: FileUtils#compare_file
is_singleton: false
name: compare_file
params: (a, b)
visibility: public
ri/1.8/system/FileUtils/rmtree-i.yaml000064400000000362150403656310013324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #rm_rf"
full_name: FileUtils#rmtree
is_singleton: false
name: rmtree
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/chmod_R-i.yaml000064400000000770150403656310013404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose force"
- !ruby/struct:SM::Flow::P 
  body: Changes permission bits on the named files (in <tt>list</tt>) to the bit pattern represented by <tt>mode</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.chmod_R 0700, &quot;/tmp/app.#{$$}&quot;\n"
full_name: FileUtils#chmod_R
is_singleton: false
name: chmod_R
params: (mode, list, options = {})
visibility: public
ri/1.8/system/FileUtils/ln-i.yaml000064400000002356150403656310012444 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: link
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: force noop verbose"
- !ruby/struct:SM::Flow::P 
  body: <b><tt>ln(old, new, options = {})</tt></b>
- !ruby/struct:SM::Flow::P 
  body: Creates a hard link <tt>new</tt> which points to <tt>old</tt>. If <tt>new</tt> already exists and it is a directory, creates a link +new/old+. If <tt>new</tt> already exists and it is not a directory, raises Errno::EEXIST. But if :force option is set, overwrite <tt>new</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.ln 'gcc', 'cc', :verbose =&gt; true\n  FileUtils.ln '/usr/bin/emacs21', '/usr/bin/emacs'\n"
- !ruby/struct:SM::Flow::P 
  body: <b><tt>ln(list, destdir, options = {})</tt></b>
- !ruby/struct:SM::Flow::P 
  body: Creates several hard links in a directory, with each one pointing to the item in <tt>list</tt>. If <tt>destdir</tt> is not a directory, raises Errno::ENOTDIR.
- !ruby/struct:SM::Flow::VERB 
  body: "  include FileUtils\n  cd '/sbin'\n  FileUtils.ln %w(cp mv mkdir), '/bin'   # Now /sbin/cp and /bin/cp are linked.\n"
full_name: FileUtils#ln
is_singleton: false
name: ln
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/remove_entry-i.yaml000064400000000742150403656310014546 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method removes a file system entry <tt>path</tt>. <tt>path</tt> might be a regular file, a directory, or something. If <tt>path</tt> is a directory, remove it recursively.
- !ruby/struct:SM::Flow::P 
  body: "See also #remove_entry_secure."
full_name: FileUtils#remove_entry
is_singleton: false
name: remove_entry
params: (path, force = false)
visibility: public
ri/1.8/system/FileUtils/remove_file-i.yaml000064400000000505150403656320014322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a file <tt>path</tt>. This method ignores StandardError if <tt>force</tt> is true.
full_name: FileUtils#remove_file
is_singleton: false
name: remove_file
params: (path, force = false)
visibility: public
ri/1.8/system/FileUtils/options-c.yaml000064400000000636150403656320013520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an Array of option names.
- !ruby/struct:SM::Flow::VERB 
  body: "  p FileUtils.options  #=&gt; [&quot;noop&quot;, &quot;force&quot;, &quot;verbose&quot;, &quot;preserve&quot;, &quot;mode&quot;]\n"
full_name: FileUtils::options
is_singleton: true
name: options
params: ()
visibility: private
ri/1.8/system/FileUtils/Verbose/cdesc-Verbose.yaml000064400000000672150403656320015676 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This module has all methods of FileUtils module, but it outputs messages before acting. This equates to passing the <tt>:verbose</tt> flag to methods in FileUtils.
constants: []

full_name: FileUtils::Verbose
includes: 
- !ruby/object:RI::IncludedModule 
  name: FileUtils
instance_methods: []

name: Verbose
superclass: 
ri/1.8/system/FileUtils/pwd-i.yaml000064400000000521150403656330012617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: getwd
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: (none)"
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the current directory.
full_name: FileUtils#pwd
is_singleton: false
name: pwd
params: ()
visibility: public
ri/1.8/system/FileUtils/copy_stream-i.yaml000064400000000544150403656330014357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Copies stream <tt>src</tt> to <tt>dest</tt>. <tt>src</tt> must respond to #read(n) and <tt>dest</tt> must respond to #write(str)."
full_name: FileUtils#copy_stream
is_singleton: false
name: copy_stream
params: (src, dest)
visibility: public
ri/1.8/system/FileUtils/touch-i.yaml000064400000001023150403656330013145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Updates modification time (mtime) and access time (atime) of file(s) in <tt>list</tt>. Files are created if they don't exist.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.touch 'timestamp'\n  FileUtils.touch Dir.glob('*.c');  system 'make'\n"
full_name: FileUtils#touch
is_singleton: false
name: touch
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/cp_r-i.yaml000064400000002446150403656340012761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: preserve noop verbose dereference_root remove_destination"
- !ruby/struct:SM::Flow::P 
  body: Copies <tt>src</tt> to <tt>dest</tt>. If <tt>src</tt> is a directory, this method copies all its contents recursively. If <tt>dest</tt> is a directory, copies <tt>src</tt> to +dest/src+.
- !ruby/struct:SM::Flow::P 
  body: <tt>src</tt> can be a list of files.
- !ruby/struct:SM::Flow::VERB 
  body: "  # Installing ruby library &quot;mylib&quot; under the site_ruby\n  FileUtils.rm_r site_ruby + '/mylib', :force\n  FileUtils.cp_r 'lib/', site_ruby + '/mylib'\n\n  # Examples of copying several files to target directory.\n  FileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail'\n  FileUtils.cp_r Dir.glob('*.rb'), '/home/aamine/lib/ruby', :noop =&gt; true, :verbose =&gt; true\n\n  # If you want to copy all contents of a directory instead of the\n  # directory itself, c.f. src/x -&gt; dest/x, src/y -&gt; dest/y,\n  # use following code.\n  FileUtils.cp_r 'src/.', 'dest'     # cp_r('src', 'dest') makes src/dest,\n                                     # but this doesn't.\n"
full_name: FileUtils#cp_r
is_singleton: false
name: cp_r
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/chown_R-i.yaml000064400000001375150403656350013436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose force"
- !ruby/struct:SM::Flow::P 
  body: Changes owner and group on the named files (in <tt>list</tt>) to the user <tt>user</tt> and the group <tt>group</tt> recursively. <tt>user</tt> and <tt>group</tt> may be an ID (Integer/String) or a name (String). If <tt>user</tt> or <tt>group</tt> is nil, this method does not change the attribute.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.chown_R 'www', 'www', '/var/www/htdocs'\n  FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', :verbose =&gt; true\n"
full_name: FileUtils#chown_R
is_singleton: false
name: chown_R
params: (user, group, list, options = {})
visibility: public
ri/1.8/system/FileUtils/safe_unlink-i.yaml000064400000000373150403656350014332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #rm_f"
full_name: FileUtils#safe_unlink
is_singleton: false
name: safe_unlink
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/ln_s-i.yaml000064400000002514150403656350012766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: symlink
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: force noop verbose"
- !ruby/struct:SM::Flow::P 
  body: <b><tt>ln_s(old, new, options = {})</tt></b>
- !ruby/struct:SM::Flow::P 
  body: Creates a symbolic link <tt>new</tt> which points to <tt>old</tt>. If <tt>new</tt> already exists and it is a directory, creates a symbolic link +new/old+. If <tt>new</tt> already exists and it is not a directory, raises Errno::EEXIST. But if :force option is set, overwrite <tt>new</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.ln_s '/usr/bin/ruby', '/usr/local/bin/ruby'\n  FileUtils.ln_s 'verylongsourcefilename.c', 'c', :force =&gt; true\n"
- !ruby/struct:SM::Flow::P 
  body: <b><tt>ln_s(list, destdir, options = {})</tt></b>
- !ruby/struct:SM::Flow::P 
  body: Creates several symbolic links in a directory, with each one pointing to the item in <tt>list</tt>. If <tt>destdir</tt> is not a directory, raises Errno::ENOTDIR.
- !ruby/struct:SM::Flow::P 
  body: If <tt>destdir</tt> is not a directory, raises Errno::ENOTDIR.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.ln_s Dir.glob('bin/*.rb'), '/home/aamine/bin'\n"
full_name: FileUtils#ln_s
is_singleton: false
name: ln_s
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/rm_f-i.yaml000064400000000636150403656360012762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: safe_unlink
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Equivalent to
- !ruby/struct:SM::Flow::VERB 
  body: "  #rm(list, :force =&gt; true)\n"
full_name: FileUtils#rm_f
is_singleton: false
name: rm_f
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/remove_dir-i.yaml000064400000000544150403656360014170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes a directory <tt>dir</tt> and its contents recursively. This method ignores StandardError if <tt>force</tt> is true.
full_name: FileUtils#remove_dir
is_singleton: false
name: remove_dir
params: (path, force = false)
visibility: public
ri/1.8/system/FileUtils/commands-c.yaml000064400000000645150403656360013632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an Array of method names which have any options.
- !ruby/struct:SM::Flow::VERB 
  body: "  p FileUtils.commands  #=&gt; [&quot;chmod&quot;, &quot;cp&quot;, &quot;cp_r&quot;, &quot;install&quot;, ...]\n"
full_name: FileUtils::commands
is_singleton: true
name: commands
params: ()
visibility: private
ri/1.8/system/FileUtils/chdir-i.yaml000064400000000354150403656370013126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #cd"
full_name: FileUtils#chdir
is_singleton: false
name: chdir
params: (dir, options = {})
visibility: public
ri/1.8/system/FileUtils/identical%3f-i.yaml000064400000000363150403656370014267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #compare_file"
full_name: FileUtils#identical?
is_singleton: false
name: identical?
params: (a, b)
visibility: public
ri/1.8/system/FileUtils/mkdir_p-i.yaml000064400000001504150403656370013460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: mkpath
- !ruby/object:RI::AliasName 
  name: makedirs
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: mode noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Creates a directory and all its parent directories. For example,
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.mkdir_p '/usr/local/lib/ruby'\n"
- !ruby/struct:SM::Flow::P 
  body: causes to make following directories, if it does not exist.
- !ruby/struct:SM::Flow::VERB 
  body: "    * /usr\n    * /usr/local\n    * /usr/local/lib\n    * /usr/local/lib/ruby\n"
- !ruby/struct:SM::Flow::P 
  body: You can pass several directories at a time in a list.
full_name: FileUtils#mkdir_p
is_singleton: false
name: mkdir_p
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/remove_entry_secure-i.yaml000064400000003606150403656400016116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This method removes a file system entry <tt>path</tt>. <tt>path</tt> shall be a regular file, a directory, or something. If <tt>path</tt> 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:"
- !ruby/struct:SM::Flow::VERB 
  body: "  * Parent directory is world writable (including /tmp).\n  * Removing directory tree includes world writable directory.\n  * The system has symbolic link.\n"
- !ruby/struct:SM::Flow::P 
  body: To avoid this security hole, this method applies special preprocess. If <tt>path</tt> 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).
- !ruby/struct:SM::Flow::P 
  body: "WARNING: You must ensure that <b>ALL</b> 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."
- !ruby/struct:SM::Flow::P 
  body: "WARNING: Only the owner of the removing directory tree, or Unix super user (root) should invoke this method. Otherwise this method does not work."
- !ruby/struct:SM::Flow::P 
  body: "For details of this security vulnerability, see Perl's case:"
- !ruby/struct:SM::Flow::VERB 
  body: "  http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448\n  http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452\n"
- !ruby/struct:SM::Flow::P 
  body: For fileutils.rb, this vulnerability is reported in [ruby-dev:26100].
full_name: FileUtils#remove_entry_secure
is_singleton: false
name: remove_entry_secure
params: (path, force = false)
visibility: public
ri/1.8/system/FileUtils/install-i.yaml000064400000001353150403656400013475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: mode preserve noop verbose"
- !ruby/struct:SM::Flow::P 
  body: If <tt>src</tt> is not same as <tt>dest</tt>, copies it and changes the permission mode to <tt>mode</tt>. If <tt>dest</tt> is a directory, destination is <tt>dest</tt>/<tt>src</tt>. This method removes destination before copy.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.install 'ruby', '/usr/local/bin/ruby', :mode =&gt; 0755, :verbose =&gt; true\n  FileUtils.install 'lib.rb', '/usr/local/lib/ruby/site_ruby', :verbose =&gt; true\n"
full_name: FileUtils#install
is_singleton: false
name: install
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/getwd-i.yaml000064400000000334150403656410013140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #pwd"
full_name: FileUtils#getwd
is_singleton: false
name: getwd
params: ()
visibility: public
ri/1.8/system/FileUtils/rm-i.yaml000064400000001223150403656410012442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: remove
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: force noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Remove file(s) specified in <tt>list</tt>. This method cannot remove directories. All StandardErrors are ignored when the :force option is set.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.rm %w( junk.txt dust.txt )\n  FileUtils.rm Dir.glob('*.so')\n  FileUtils.rm 'NotExistFile', :force =&gt; true   # never raises exception\n"
full_name: FileUtils#rm
is_singleton: false
name: rm
params: (list, options = {})
visibility: public
ri/1.8/system/FileUtils/symlink-i.yaml000064400000000370150403656410013514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #ln_s"
full_name: FileUtils#symlink
is_singleton: false
name: symlink
params: (src, dest, options = {})
visibility: public
ri/1.8/system/FileUtils/uptodate%3f-i.yaml000064400000001032150403656420014146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: (none)"
- !ruby/struct:SM::Flow::P 
  body: Returns true if <tt>newer</tt> is newer than all <tt>old_list</tt>. Non-existent files are older than any file.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or    #       system 'make hello.o'\n"
full_name: FileUtils#uptodate?
is_singleton: false
name: uptodate?
params: (new, old_list, options = nil)
visibility: public
ri/1.8/system/FileUtils/chown-i.yaml000064400000001364150403656420013151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Options: noop verbose"
- !ruby/struct:SM::Flow::P 
  body: Changes owner and group on the named files (in <tt>list</tt>) to the user <tt>user</tt> and the group <tt>group</tt>. <tt>user</tt> and <tt>group</tt> may be an ID (Integer/String) or a name (String). If <tt>user</tt> or <tt>group</tt> is nil, this method does not change the attribute.
- !ruby/struct:SM::Flow::VERB 
  body: "  FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby'\n  FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), :verbose =&gt; true\n"
full_name: FileUtils#chown
is_singleton: false
name: chown
params: (user, group, list, options = {})
visibility: public
ri/1.8/system/Method/receiver-i.yaml000064400000000434150403656420013154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the bound receiver of the method object.
full_name: Method#receiver
is_singleton: false
name: receiver
params: |
  meth.receiver    => object

visibility: public
ri/1.8/system/Method/arity-i.yaml000064400000002374150403656430012506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an indication of the number of arguments accepted by a method. Returns a nonnegative integer for methods that take a fixed number of arguments. For Ruby methods that take a variable number of arguments, returns -n-1, where n is the number of required arguments. For methods written in C, returns -1 if the call takes a variable number of arguments.
- !ruby/struct:SM::Flow::VERB 
  body: "   class C\n     def one;    end\n     def two(a); end\n     def three(*a);  end\n     def four(a, b); end\n     def five(a, b, *c);    end\n     def six(a, b, *c, &amp;d); end\n   end\n   c = C.new\n   c.method(:one).arity     #=&gt; 0\n   c.method(:two).arity     #=&gt; 1\n   c.method(:three).arity   #=&gt; -1\n   c.method(:four).arity    #=&gt; 2\n   c.method(:five).arity    #=&gt; -3\n   c.method(:six).arity     #=&gt; -3\n\n   &quot;cat&quot;.method(:size).arity      #=&gt; 0\n   &quot;cat&quot;.method(:replace).arity   #=&gt; 1\n   &quot;cat&quot;.method(:squeeze).arity   #=&gt; -1\n   &quot;cat&quot;.method(:count).arity     #=&gt; -1\n"
full_name: Method#arity
is_singleton: false
name: arity
params: |
  meth.arity    => fixnum

visibility: public
ri/1.8/system/Method/%5b%5d-i.yaml000064400000000744150403656440012227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the <em>meth</em> with the specified arguments, returning the method's return value.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = 12.method(&quot;+&quot;)\n   m.call(3)    #=&gt; 15\n   m.call(20)   #=&gt; 32\n"
full_name: Method#[]
is_singleton: false
name: "[]"
params: |
  meth.call(args, ...)    => obj
  meth[args, ...]         => obj

visibility: public
ri/1.8/system/Method/call-i.yaml000064400000000746150403656440012273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the <em>meth</em> with the specified arguments, returning the method's return value.
- !ruby/struct:SM::Flow::VERB 
  body: "   m = 12.method(&quot;+&quot;)\n   m.call(3)    #=&gt; 15\n   m.call(20)   #=&gt; 32\n"
full_name: Method#call
is_singleton: false
name: call
params: |
  meth.call(args, ...)    => obj
  meth[args, ...]         => obj

visibility: public
ri/1.8/system/Method/to_proc-i.yaml000064400000000442150403656450013017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>Proc</tt> object corresponding to this method.
full_name: Method#to_proc
is_singleton: false
name: to_proc
params: |
  meth.to_proc    => prc

visibility: public
ri/1.8/system/Method/unbind-i.yaml000064400000000642150403656450012633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dissociates <em>meth</em> from it's current receiver. The resulting <tt>UnboundMethod</tt> can subsequently be bound to a new object of the same class (see <tt>UnboundMethod</tt>).
full_name: Method#unbind
is_singleton: false
name: unbind
params: |
  meth.unbind    => unbound_method

visibility: public
ri/1.8/system/Method/inspect-i.yaml000064400000000663150403656450013024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show the name of the underlying method.
- !ruby/struct:SM::Flow::VERB 
  body: "  &quot;cat&quot;.method(:count).inspect   #=&gt; &quot;#&lt;Method: String#count&gt;&quot;\n"
full_name: Method#inspect
is_singleton: false
name: inspect
params: |
  meth.to_s      =>  string
  meth.inspect   =>  string

visibility: public
ri/1.8/system/Method/owner-i.yaml000064400000000440150403656450012502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the class or module that defines the method.
full_name: Method#owner
is_singleton: false
name: owner
params: |
  meth.owner    => class_or_module

visibility: public
ri/1.8/system/Method/to_s-i.yaml000064400000000655150403656460012325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Show the name of the underlying method.
- !ruby/struct:SM::Flow::VERB 
  body: "  &quot;cat&quot;.method(:count).inspect   #=&gt; &quot;#&lt;Method: String#count&gt;&quot;\n"
full_name: Method#to_s
is_singleton: false
name: to_s
params: |
  meth.to_s      =>  string
  meth.inspect   =>  string

visibility: public
ri/1.8/system/Method/%3d%3d-i.yaml000064400000000506150403656460012223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Two method objects are equal if that are bound to the same object and contain the same body.
full_name: Method#==
is_singleton: false
name: ==
params: |
  meth == other_meth  => true or false

visibility: public
ri/1.8/system/Method/clone-i.yaml000064400000000341150403656470012452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "MISSING: documentation"
full_name: Method#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/Method/cdesc-Method.yaml000064400000002377150403656500013430 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Proc</tt> objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   def gen_times(factor)\n     return Proc.new {|n| n*factor }\n   end\n\n   times3 = gen_times(3)\n   times5 = gen_times(5)\n\n   times3.call(12)               #=&gt; 36\n   times5.call(5)                #=&gt; 25\n   times3.call(times5.call(4))   #=&gt; 60\n"
constants: []

full_name: Method
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: arity
- !ruby/object:RI::MethodSummary 
  name: call
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: owner
- !ruby/object:RI::MethodSummary 
  name: receiver
- !ruby/object:RI::MethodSummary 
  name: to_proc
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: unbind
name: Method
superclass: Object
ri/1.8/system/Method/name-i.yaml000064400000000377150403656500012275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the method.
full_name: Method#name
is_singleton: false
name: name
params: |
  meth.name    => string

visibility: public
ri/1.8/system/Enumerable/minmax-i.yaml000064400000001423150403656510013477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns two elements array which contains the minimum and the maximum value in the enumerable. The first form assumes all objects implement <tt>Comparable</tt>; the second uses the block to return <em>a &lt;=&gt; b</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w(albatross dog horse)\n   a.minmax                                  #=&gt; [&quot;albatross&quot;, &quot;horse&quot;]\n   a.minmax {|a,b| a.length &lt;=&gt; b.length }   #=&gt; [&quot;dog&quot;, &quot;albatross&quot;]\n"
full_name: Enumerable#minmax
is_singleton: false
name: minmax
params: |
  enum.minmax                   => [min,max]
  enum.minmax {|a,b| block }    => [min,max]

visibility: public
ri/1.8/system/Enumerable/max-i.yaml000064400000001246150403656520012777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the object in <em>enum</em> with the maximum value. The first form assumes all objects implement <tt>Comparable</tt>; the second uses the block to return <em>a &lt;=&gt; b</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w(albatross dog horse)\n   a.max                                  #=&gt; &quot;horse&quot;\n   a.max {|a,b| a.length &lt;=&gt; b.length }   #=&gt; &quot;albatross&quot;\n"
full_name: Enumerable#max
is_singleton: false
name: max
params: |
  enum.max                   => obj
  enum.max {|a,b| block }    => obj

visibility: public
ri/1.8/system/Enumerable/select-i.yaml000064400000001031150403656520013461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing all elements of <em>enum</em> for which <em>block</em> is not <tt>false</tt> (see also <tt>Enumerable#reject</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).find_all {|i|  i % 3 == 0 }   #=&gt; [3, 6, 9]\n"
full_name: Enumerable#select
is_singleton: false
name: select
params: |
  enum.find_all {| obj | block }  => array
  enum.select   {| obj | block }  => array

visibility: public
ri/1.8/system/Enumerable/to_a-i.yaml000064400000001034150403656520013127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the items in <em>enum</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..7).to_a                       #=&gt; [1, 2, 3, 4, 5, 6, 7]\n   { 'a'=&gt;1, 'b'=&gt;2, 'c'=&gt;3 }.to_a   #=&gt; [[&quot;a&quot;, 1], [&quot;b&quot;, 2], [&quot;c&quot;, 3]]\n"
full_name: Enumerable#to_a
is_singleton: false
name: to_a
params: |
  enum.to_a      =>    array
  enum.entries   =>    array

visibility: public
ri/1.8/system/Enumerable/any%3f-i.yaml000064400000001555150403656530013303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each element of the collection to the given block. The method returns <tt>true</tt> if the block ever returns a value other than <tt>false</tt> or <tt>nil</tt>. If the block is not given, Ruby adds an implicit block of <tt>{|obj| obj}</tt> (that is <tt>any?</tt> will return <tt>true</tt> if at least one of the collection members is not <tt>false</tt> or <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   %w{ ant bear cat}.any? {|word| word.length &gt;= 3}   #=&gt; true\n   %w{ ant bear cat}.any? {|word| word.length &gt;= 4}   #=&gt; true\n   [ nil, true, 99 ].any?                             #=&gt; true\n"
full_name: Enumerable#any?
is_singleton: false
name: any?
params: |
  enum.any? [{|obj| block } ]   => true or false

visibility: public
ri/1.8/system/Enumerable/entries-i.yaml000064400000001042150403656540013657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the items in <em>enum</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..7).to_a                       #=&gt; [1, 2, 3, 4, 5, 6, 7]\n   { 'a'=&gt;1, 'b'=&gt;2, 'c'=&gt;3 }.to_a   #=&gt; [[&quot;a&quot;, 1], [&quot;b&quot;, 2], [&quot;c&quot;, 3]]\n"
full_name: Enumerable#entries
is_singleton: false
name: entries
params: |
  enum.to_a      =>    array
  enum.entries   =>    array

visibility: public
ri/1.8/system/Enumerable/each_cons-i.yaml000064400000001171150403656550014134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates the given block for each array of consecutive &lt;n&gt; elements. If no block is given, returns an enumerator.a
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "    (1..10).each_cons(3) {|a| p a}\n    # outputs below\n    [1, 2, 3]\n    [2, 3, 4]\n    [3, 4, 5]\n    [4, 5, 6]\n    [5, 6, 7]\n    [6, 7, 8]\n    [7, 8, 9]\n    [8, 9, 10]\n"
full_name: Enumerable#each_cons
is_singleton: false
name: each_cons
params: |
  each_cons(n) {...}
  each_cons(n)

visibility: public
ri/1.8/system/Enumerable/find-i.yaml000064400000001330150403656550013127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each entry in <em>enum</em> to <em>block</em>. Returns the first for which <em>block</em> is not <tt>false</tt>. If no object matches, calls <em>ifnone</em> and returns its result when it is specified, or returns <tt>nil</tt>
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).detect  {|i| i % 5 == 0 and i % 7 == 0 }   #=&gt; nil\n   (1..100).detect {|i| i % 5 == 0 and i % 7 == 0 }   #=&gt; 35\n"
full_name: Enumerable#find
is_singleton: false
name: find
params: |
  enum.detect(ifnone = nil) {| obj | block }  => obj or nil
  enum.find(ifnone = nil)   {| obj | block }  => obj or nil

visibility: public
ri/1.8/system/Enumerable/drop_while-i.yaml000064400000001033150403656560014344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Drops elements up to, but not including, the first element for which the block returns nil or false and returns an array containing the remaining elements.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.drop_while {|i| i &lt; 3 }   # =&gt; [3, 4, 5, 0]\n"
full_name: Enumerable#drop_while
is_singleton: false
name: drop_while
params: |
  enum.drop_while {|arr| block }   => array

visibility: public
ri/1.8/system/Enumerable/cycle-i.yaml000064400000001600150403656560013307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> for each element of <em>enum</em> repeatedly <em>n</em> times or forever if none or nil is given. If a non-positive number is given or the collection is empty, does nothing. Returns nil if the loop has finished without getting interrupted.
- !ruby/struct:SM::Flow::P 
  body: Enumerable#cycle saves elements in an internal array so changes to <em>enum</em> after the first pass have no effect.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]\n   a.cycle {|x| puts x }  # print, a, b, c, a, b, c,.. forever.\n   a.cycle(2) {|x| puts x }  # print, a, b, c, a, b, c.\n"
full_name: Enumerable#cycle
is_singleton: false
name: cycle
params: |
  enum.cycle {|obj| block }
  enum.cycle(n) {|obj| block }

visibility: public
ri/1.8/system/Enumerable/take_while-i.yaml000064400000000775150403656570014341 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes elements to the block until the block returns nil or false, then stops iterating and returns an array of all prior elements.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.take_while {|i| i &lt; 3 }   # =&gt; [1, 2]\n"
full_name: Enumerable#take_while
is_singleton: false
name: take_while
params: |
  enum.take_while {|arr| block }   => array

visibility: public
ri/1.8/system/Enumerable/member%3f-i.yaml000064400000001107150403656570013760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if any member of <em>enum</em> equals <em>obj</em>. Equality is tested using <tt>==</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   IO.constants.include? &quot;SEEK_SET&quot;          #=&gt; true\n   IO.constants.include? &quot;SEEK_NO_FURTHER&quot;   #=&gt; false\n"
full_name: Enumerable#member?
is_singleton: false
name: member?
params: |
  enum.include?(obj)     => true or false
  enum.member?(obj)      => true or false

visibility: public
ri/1.8/system/Enumerable/detect-i.yaml000064400000001334150403656600013457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each entry in <em>enum</em> to <em>block</em>. Returns the first for which <em>block</em> is not <tt>false</tt>. If no object matches, calls <em>ifnone</em> and returns its result when it is specified, or returns <tt>nil</tt>
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).detect  {|i| i % 5 == 0 and i % 7 == 0 }   #=&gt; nil\n   (1..100).detect {|i| i % 5 == 0 and i % 7 == 0 }   #=&gt; 35\n"
full_name: Enumerable#detect
is_singleton: false
name: detect
params: |
  enum.detect(ifnone = nil) {| obj | block }  => obj or nil
  enum.find(ifnone = nil)   {| obj | block }  => obj or nil

visibility: public
ri/1.8/system/Enumerable/collect-i.yaml000064400000001141150403656610013631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array with the results of running <em>block</em> once for every element in <em>enum</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..4).collect {|i| i*i }   #=&gt; [1, 4, 9, 16]\n   (1..4).collect { &quot;cat&quot;  }   #=&gt; [&quot;cat&quot;, &quot;cat&quot;, &quot;cat&quot;, &quot;cat&quot;]\n"
full_name: Enumerable#collect
is_singleton: false
name: collect
params: |
  enum.collect {| obj | block }  => array
  enum.map     {| obj | block }  => array

visibility: public
ri/1.8/system/Enumerable/cdesc-Enumerable.yaml000064400000005634150403656610015127 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Enumerable</tt> mixin provides collection classes with several traversal and searching methods, and with the ability to sort. The class must provide a method <tt>each</tt>, which yields successive members of the collection. If <tt>Enumerable#max</tt>, <tt>#min</tt>, or <tt>#sort</tt> is used, the objects in the collection must also implement a meaningful <tt>&lt;=&gt;</tt> operator, as these methods rely on an ordering between members of the collection.
constants: []

full_name: Enumerable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: all?
- !ruby/object:RI::MethodSummary 
  name: any?
- !ruby/object:RI::MethodSummary 
  name: collect
- !ruby/object:RI::MethodSummary 
  name: count
- !ruby/object:RI::MethodSummary 
  name: cycle
- !ruby/object:RI::MethodSummary 
  name: detect
- !ruby/object:RI::MethodSummary 
  name: drop
- !ruby/object:RI::MethodSummary 
  name: drop_while
- !ruby/object:RI::MethodSummary 
  name: each_cons
- !ruby/object:RI::MethodSummary 
  name: each_slice
- !ruby/object:RI::MethodSummary 
  name: each_with_index
- !ruby/object:RI::MethodSummary 
  name: entries
- !ruby/object:RI::MethodSummary 
  name: enum_cons
- !ruby/object:RI::MethodSummary 
  name: enum_slice
- !ruby/object:RI::MethodSummary 
  name: enum_with_index
- !ruby/object:RI::MethodSummary 
  name: find
- !ruby/object:RI::MethodSummary 
  name: find_all
- !ruby/object:RI::MethodSummary 
  name: find_index
- !ruby/object:RI::MethodSummary 
  name: first
- !ruby/object:RI::MethodSummary 
  name: grep
- !ruby/object:RI::MethodSummary 
  name: group_by
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: inject
- !ruby/object:RI::MethodSummary 
  name: inject
- !ruby/object:RI::MethodSummary 
  name: map
- !ruby/object:RI::MethodSummary 
  name: max
- !ruby/object:RI::MethodSummary 
  name: max_by
- !ruby/object:RI::MethodSummary 
  name: member?
- !ruby/object:RI::MethodSummary 
  name: min
- !ruby/object:RI::MethodSummary 
  name: min_by
- !ruby/object:RI::MethodSummary 
  name: minmax
- !ruby/object:RI::MethodSummary 
  name: minmax_by
- !ruby/object:RI::MethodSummary 
  name: none?
- !ruby/object:RI::MethodSummary 
  name: one?
- !ruby/object:RI::MethodSummary 
  name: partition
- !ruby/object:RI::MethodSummary 
  name: reduce
- !ruby/object:RI::MethodSummary 
  name: reject
- !ruby/object:RI::MethodSummary 
  name: reverse_each
- !ruby/object:RI::MethodSummary 
  name: select
- !ruby/object:RI::MethodSummary 
  name: sort
- !ruby/object:RI::MethodSummary 
  name: sort_by
- !ruby/object:RI::MethodSummary 
  name: take
- !ruby/object:RI::MethodSummary 
  name: take_while
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_set
- !ruby/object:RI::MethodSummary 
  name: zip
name: Enumerable
superclass: 
ri/1.8/system/Enumerable/min-i.yaml000064400000001246150403656610012775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the object in <em>enum</em> with the minimum value. The first form assumes all objects implement <tt>Comparable</tt>; the second uses the block to return <em>a &lt;=&gt; b</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w(albatross dog horse)\n   a.min                                  #=&gt; &quot;albatross&quot;\n   a.min {|a,b| a.length &lt;=&gt; b.length }   #=&gt; &quot;dog&quot;\n"
full_name: Enumerable#min
is_singleton: false
name: min
params: |
  enum.min                    => obj
  enum.min {| a,b | block }   => obj

visibility: public
ri/1.8/system/Enumerable/each_slice-i.yaml000064400000001063150403656620014267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates the given block for each slice of &lt;n&gt; elements. If no block is given, returns an enumerator.
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "    (1..10).each_slice(3) {|a| p a}\n    # outputs below\n    [1, 2, 3]\n    [4, 5, 6]\n    [7, 8, 9]\n    [10]\n"
full_name: Enumerable#each_slice
is_singleton: false
name: each_slice
params: |
  e.each_slice(n) {...}
  e.each_slice(n)

visibility: public
ri/1.8/system/Enumerable/find_all-i.yaml000064400000001035150403656620013757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing all elements of <em>enum</em> for which <em>block</em> is not <tt>false</tt> (see also <tt>Enumerable#reject</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).find_all {|i|  i % 3 == 0 }   #=&gt; [3, 6, 9]\n"
full_name: Enumerable#find_all
is_singleton: false
name: find_all
params: |
  enum.find_all {| obj | block }  => array
  enum.select   {| obj | block }  => array

visibility: public
ri/1.8/system/Enumerable/drop-i.yaml000064400000000663150403656630013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Drops first n elements from <em>enum</em>, and returns rest elements in an array.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.drop(3)             # =&gt; [4, 5, 0]\n"
full_name: Enumerable#drop
is_singleton: false
name: drop
params: |
  enum.drop(n)               => array

visibility: public
ri/1.8/system/Enumerable/take-i.yaml000064400000000616150403656630013140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns first n elements from <em>enum</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [1, 2, 3, 4, 5, 0]\n   a.take(3)             # =&gt; [1, 2, 3]\n"
full_name: Enumerable#take
is_singleton: false
name: take
params: |
  enum.take(n)               => array

visibility: public
ri/1.8/system/Enumerable/enum_cons-i.yaml000064400000001171150403656640014200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates the given block for each array of consecutive &lt;n&gt; elements. If no block is given, returns an enumerator.a
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "    (1..10).each_cons(3) {|a| p a}\n    # outputs below\n    [1, 2, 3]\n    [2, 3, 4]\n    [3, 4, 5]\n    [4, 5, 6]\n    [5, 6, 7]\n    [6, 7, 8]\n    [7, 8, 9]\n    [8, 9, 10]\n"
full_name: Enumerable#enum_cons
is_singleton: false
name: enum_cons
params: |
  each_cons(n) {...}
  each_cons(n)

visibility: public
ri/1.8/system/Enumerable/grep-i.yaml000064400000001515150403656640013151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of every element in <em>enum</em> for which <tt>Pattern === element</tt>. If the optional <em>block</em> is supplied, each matching element is passed to it, and the block's result is stored in the output array.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..100).grep 38..44   #=&gt; [38, 39, 40, 41, 42, 43, 44]\n   c = IO.constants\n   c.grep(/SEEK/)         #=&gt; [&quot;SEEK_END&quot;, &quot;SEEK_SET&quot;, &quot;SEEK_CUR&quot;]\n   res = c.grep(/SEEK/) {|v| IO.const_get(v) }\n   res                    #=&gt; [2, 0, 1]\n"
full_name: Enumerable#grep
is_singleton: false
name: grep
params: |
  enum.grep(pattern)                   => array
  enum.grep(pattern) {| obj | block }  => array

visibility: public
ri/1.8/system/Enumerable/include%3f-i.yaml000064400000001111150403656640014125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if any member of <em>enum</em> equals <em>obj</em>. Equality is tested using <tt>==</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   IO.constants.include? &quot;SEEK_SET&quot;          #=&gt; true\n   IO.constants.include? &quot;SEEK_NO_FURTHER&quot;   #=&gt; false\n"
full_name: Enumerable#include?
is_singleton: false
name: include?
params: |
  enum.include?(obj)     => true or false
  enum.member?(obj)      => true or false

visibility: public
ri/1.8/system/Enumerable/Enumerator/each-i.yaml000064400000000543150403656650015236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates the given block using the object and the method specified in the first place. If no block is given, returns self.
full_name: Enumerable::Enumerator#each
is_singleton: false
name: each
params: |
  enum.each {...}

visibility: public
ri/1.8/system/Enumerable/Enumerator/cdesc-Enumerator.yaml000064400000001453150403656650017311 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A class which provides a method `each' to be used as an Enumerable object.
constants: []

full_name: Enumerable::Enumerator
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: __generator
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_with_index
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: with_index
name: Enumerator
superclass: Object
ri/1.8/system/Enumerable/Enumerator/next-i.yaml000064400000001363150403656660015316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the next object in the enumerator, and move the internal position forward. When the position reached at the end, internal position is rewinded then StopIteration is raised.
- !ruby/struct:SM::Flow::P 
  body: Note that enumeration sequence by next method does not affect other non-external enumeration methods, unless underlying iteration methods itself has side-effect, e.g. IO#each_line.
- !ruby/struct:SM::Flow::P 
  body: "Caution: Calling this method causes the &quot;generator&quot; library to be loaded."
full_name: Enumerable::Enumerator#next
is_singleton: false
name: next
params: |
  e.next   => object

visibility: public
ri/1.8/system/Enumerable/Enumerator/with_index-i.yaml000064400000000621150403656660016476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates the given block for each elements with an index, which start from 0. If no block is given, returns an enumerator.
full_name: Enumerable::Enumerator#with_index
is_singleton: false
name: with_index
params: |
  e.with_index {|(*args), idx| ... }
  e.with_index

visibility: public
ri/1.8/system/Enumerable/Enumerator/rewind-i.yaml000064400000000441150403656660015624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Rewinds the enumeration sequence by the next method.
full_name: Enumerable::Enumerator#rewind
is_singleton: false
name: rewind
params: |
  e.rewind   => e

visibility: public
ri/1.8/system/Enumerable/Enumerator/__generator-i.yaml000064400000000301150403656660016613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Enumerable::Enumerator#__generator
is_singleton: false
name: __generator
params: ()
visibility: private
ri/1.8/system/Enumerable/Enumerator/new-c.yaml000064400000001014150403656670015115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Enumerable::Enumerator object, which is to be used as an Enumerable object using the given object's given method with the given arguments.
- !ruby/struct:SM::Flow::P 
  body: Use of this method is discouraged. Use Kernel#enum_for() instead.
full_name: Enumerable::Enumerator::new
is_singleton: true
name: new
params: |
  Enumerable::Enumerator.new(obj, method = :each, *args)

visibility: public
ri/1.8/system/Enumerable/Enumerator/each_with_index-i.yaml000064400000000633150403656670017462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates the given block for each elements with an index, which start from 0. If no block is given, returns an enumerator.
full_name: Enumerable::Enumerator#each_with_index
is_singleton: false
name: each_with_index
params: |
  e.with_index {|(*args), idx| ... }
  e.with_index

visibility: public
ri/1.8/system/Enumerable/partition-i.yaml000064400000001031150403656670014221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns two arrays, the first containing the elements of <em>enum</em> for which the block evaluates to true, the second containing the rest.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..6).partition {|i| (i&amp;1).zero?}   #=&gt; [[2, 4, 6], [1, 3, 5]]\n"
full_name: Enumerable#partition
is_singleton: false
name: partition
params: |
  enum.partition {| obj | block }  => [ true_array, false_array ]

visibility: public
ri/1.8/system/Enumerable/zip-i.yaml000064400000002011150403656670013011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts any arguments to arrays, then merges elements of <em>enum</em> with corresponding elements from each argument. This generates a sequence of <tt>enum#size</tt> <em>n</em>-element arrays, where <em>n</em> is one more that the count of arguments. If the size of any argument is less than <tt>enum#size</tt>, <tt>nil</tt> values are supplied. If a block given, it is invoked for each output array, otherwise an array of arrays is returned.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = [ 4, 5, 6 ]\n   b = [ 7, 8, 9 ]\n\n   (1..3).zip(a, b)      #=&gt; [[1, 4, 7], [2, 5, 8], [3, 6, 9]]\n   &quot;cat\\ndog&quot;.zip([1])   #=&gt; [[&quot;cat\\n&quot;, 1], [&quot;dog&quot;, nil]]\n   (1..3).zip            #=&gt; [[1], [2], [3]]\n"
full_name: Enumerable#zip
is_singleton: false
name: zip
params: |
  enum.zip(arg, ...)                   => array
  enum.zip(arg, ...) {|arr| block }    => nil

visibility: public
ri/1.8/system/Enumerable/reject-i.yaml000064400000000745150403656670013477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array for all elements of <em>enum</em> for which <em>block</em> is false (see also <tt>Enumerable#find_all</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).reject {|i|  i % 3 == 0 }   #=&gt; [1, 2, 4, 5, 7, 8, 10]\n"
full_name: Enumerable#reject
is_singleton: false
name: reject
params: |
  enum.reject {| obj | block }  => array

visibility: public
ri/1.8/system/Enumerable/each_with_index-i.yaml000064400000001141150403656670015334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> with two arguments, the item and its index, for each item in <em>enum</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   hash = Hash.new\n   %w(cat dog wombat).each_with_index {|item, index|\n     hash[item] = index\n   }\n   hash   #=&gt; {&quot;cat&quot;=&gt;0, &quot;wombat&quot;=&gt;2, &quot;dog&quot;=&gt;1}\n"
full_name: Enumerable#each_with_index
is_singleton: false
name: each_with_index
params: |
  enum.each_with_index {|obj, i| block }  -> enum

visibility: public
ri/1.8/system/Enumerable/find_index-i.yaml000064400000001401150403656700014312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares each entry in <em>enum</em> with <em>value</em> or passes to <em>block</em>. Returns the index for the first for which the evaluated value is non-false. If no object matches, returns <tt>nil</tt>
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).find_index  {|i| i % 5 == 0 and i % 7 == 0 }   #=&gt; nil\n   (1..100).find_index {|i| i % 5 == 0 and i % 7 == 0 }   #=&gt; 34\n   (1..100).find_index(50)                                #=&gt; 49\n"
full_name: Enumerable#find_index
is_singleton: false
name: find_index
params: |
  enum.find_index(value)            => int or nil
  enum.find_index {| obj | block }  => int or nil

visibility: public
ri/1.8/system/Enumerable/enum_slice-i.yaml000064400000001063150403656700014332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates the given block for each slice of &lt;n&gt; elements. If no block is given, returns an enumerator.
- !ruby/struct:SM::Flow::P 
  body: "e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "    (1..10).each_slice(3) {|a| p a}\n    # outputs below\n    [1, 2, 3]\n    [4, 5, 6]\n    [7, 8, 9]\n    [10]\n"
full_name: Enumerable#enum_slice
is_singleton: false
name: enum_slice
params: |
  e.each_slice(n) {...}
  e.each_slice(n)

visibility: public
ri/1.8/system/Enumerable/first-i.yaml000064400000000707150403656700013342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first element, or the first <tt>n</tt> elements, of the enumerable. If the enumerable is empty, the first form returns <tt>nil</tt>, and the second form returns an empty array.
full_name: Enumerable#first
is_singleton: false
name: first
params: |
  enum.first      -> obj or nil
  enum.first(n)   -> an_array

visibility: public
ri/1.8/system/Enumerable/group_by-i.yaml000064400000001007150403656710014034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a hash, which keys are evaluated result from the block, and values are arrays of elements in <em>enum</em> corresponding to the key.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..6).group_by {|i| i%3}   #=&gt; {0=&gt;[3, 6], 1=&gt;[1, 4], 2=&gt;[2, 5]}\n"
full_name: Enumerable#group_by
is_singleton: false
name: group_by
params: |
  enum.group_by {| obj | block }  => a_hash

visibility: public
ri/1.8/system/Enumerable/one%3f-i.yaml000064400000001575150403656710013277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each element of the collection to the given block. The method returns <tt>true</tt> if the block returns <tt>true</tt> exactly once. If the block is not given, <tt>one?</tt> will return <tt>true</tt> only if exactly one of the collection members is true.
- !ruby/struct:SM::Flow::VERB 
  body: "   %w{ant bear cat}.one? {|word| word.length == 4}   #=&gt; true\n   %w{ant bear cat}.one? {|word| word.length &gt; 4}    #=&gt; false\n   %w{ant bear cat}.one? {|word| word.length &lt; 4}    #=&gt; false\n   [ nil, true, 99 ].one?                            #=&gt; false\n   [ nil, true, false ].one?                         #=&gt; true\n"
full_name: Enumerable#one?
is_singleton: false
name: one?
params: |
  enum.one? [{|obj| block }]   => true or false

visibility: public
ri/1.8/system/Enumerable/min_by-i.yaml000064400000000714150403656710013467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the object in <em>enum</em> that gives the minimum value from the given block.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w(albatross dog horse)\n   a.min_by {|x| x.length }   #=&gt; &quot;dog&quot;\n"
full_name: Enumerable#min_by
is_singleton: false
name: min_by
params: |
  enum.min_by {| obj| block }   => obj

visibility: public
ri/1.8/system/Enumerable/max_by-i.yaml000064400000000722150403656720013471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the object in <em>enum</em> that gives the maximum value from the given block.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w(albatross dog horse)\n   a.max_by {|x| x.length }   #=&gt; &quot;albatross&quot;\n"
full_name: Enumerable#max_by
is_singleton: false
name: max_by
params: |
  enum.max_by {| obj| block }   => obj

visibility: public
ri/1.8/system/Enumerable/none%3f-i.yaml000064400000001577150403656720013460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each element of the collection to the given block. The method returns <tt>true</tt> if the block never returns <tt>true</tt> for all elements. If the block is not given, <tt>none?</tt> will return <tt>true</tt> only if none of the collection members is true.
- !ruby/struct:SM::Flow::VERB 
  body: "   %w{ant bear cat}.none? {|word| word.length == 5}  #=&gt; true\n   %w{ant bear cat}.none? {|word| word.length &gt;= 4}  #=&gt; false\n   [].none?                                          #=&gt; true\n   [nil].none?                                       #=&gt; true\n   [nil,false].none?                                 #=&gt; true\n"
full_name: Enumerable#none?
is_singleton: false
name: none?
params: |
  enum.none? [{|obj| block }]   => true or false

visibility: public
ri/1.8/system/Enumerable/map-i.yaml000064400000001131150403656720012762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new array with the results of running <em>block</em> once for every element in <em>enum</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..4).collect {|i| i*i }   #=&gt; [1, 4, 9, 16]\n   (1..4).collect { &quot;cat&quot;  }   #=&gt; [&quot;cat&quot;, &quot;cat&quot;, &quot;cat&quot;, &quot;cat&quot;]\n"
full_name: Enumerable#map
is_singleton: false
name: map
params: |
  enum.collect {| obj | block }  => array
  enum.map     {| obj | block }  => array

visibility: public
ri/1.8/system/Enumerable/all%3f-i.yaml000064400000001530150403656730013257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each element of the collection to the given block. The method returns <tt>true</tt> if the block never returns <tt>false</tt> or <tt>nil</tt>. If the block is not given, Ruby adds an implicit block of <tt>{|obj| obj}</tt> (that is <tt>all?</tt> will return <tt>true</tt> only if none of the collection members are <tt>false</tt> or <tt>nil</tt>.)
- !ruby/struct:SM::Flow::VERB 
  body: "   %w{ ant bear cat}.all? {|word| word.length &gt;= 3}   #=&gt; true\n   %w{ ant bear cat}.all? {|word| word.length &gt;= 4}   #=&gt; false\n   [ nil, true, 99 ].all?                             #=&gt; false\n"
full_name: Enumerable#all?
is_singleton: false
name: all?
params: |
  enum.all? [{|obj| block } ]   => true or false

visibility: public
ri/1.8/system/Enumerable/to_set-i.yaml000064400000000534150403656730013511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Makes a set from the enumerable object with given arguments. Needs to +require &quot;set&quot;+ to use this method.
full_name: Enumerable#to_set
is_singleton: false
name: to_set
params: (klass = Set, *args, &block)
visibility: public
ri/1.8/system/Enumerable/reduce-i.yaml000064400000004065150403656740013467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::VERB 
  body: "   enum.reduce(initial, sym) =&gt; obj\n   enum.reduce(sym)          =&gt; obj\n   enum.reduce(initial) {| memo, obj | block }  =&gt; obj\n   enum.reduce          {| memo, obj | block }  =&gt; obj\n"
- !ruby/struct:SM::Flow::P 
  body: Combines all elements of <em>enum</em> by applying a binary operation, specified by a block or a symbol that names a method or operator.
- !ruby/struct:SM::Flow::P 
  body: If you specify a block, then for each element in <em>enum&lt;i&gt; the block is passed an accumulator value (&lt;i&gt;memo</em>) and the element. If you specify a symbol instead, then each element in the collection will be passed to the named method of <em>memo</em>. In either case, the result becomes the new value for <em>memo</em>. At the end of the iteration, the final value of <em>memo</em> is the return value fo the method.
- !ruby/struct:SM::Flow::P 
  body: If you do not explicitly specify an <em>initial</em> value for <em>memo</em>, then uses the first element of collection is used as the initial value of <em>memo</em>.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "   # Sum some numbers\n   (5..10).reduce(:+)                            #=&gt; 45\n   # Same using a block and inject\n   (5..10).inject {|sum, n| sum + n }            #=&gt; 45\n   # Multiply some numbers\n   (5..10).reduce(1, :*)                         #=&gt; 151200\n   # Same using a block\n   (5..10).inject(1) {|product, n| product * n } #=&gt; 151200\n   # find the longest word\n   longest = %w{ cat sheep bear }.inject do |memo,word|\n      memo.length &gt; word.length ? memo : word\n   end\n   longest                                       #=&gt; &quot;sheep&quot;\n"
full_name: Enumerable#reduce
is_singleton: false
name: reduce
params: |
  enum.inject(initial, sym) => obj
  enum.inject(sym)          => obj
  enum.inject(initial) {| memo, obj | block }  => obj
  enum.inject          {| memo, obj | block }  => obj

visibility: public
ri/1.8/system/Enumerable/sort-i.yaml000064400000001636150403656740013210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the items in <em>enum</em> sorted, either according to their own <tt>&lt;=&gt;</tt> method, or by using the results of the supplied block. The block should return -1, 0, or +1 depending on the comparison between <em>a</em> and <em>b</em>. As of Ruby 1.8, the method <tt>Enumerable#sort_by</tt> implements a built-in Schwartzian Transform, useful when key computation or comparison is expensive..
- !ruby/struct:SM::Flow::VERB 
  body: "   %w(rhea kea flea).sort         #=&gt; [&quot;flea&quot;, &quot;kea&quot;, &quot;rhea&quot;]\n   (1..10).sort {|a,b| b &lt;=&gt; a}   #=&gt; [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n"
full_name: Enumerable#sort
is_singleton: false
name: sort
params: |
  enum.sort                     => array
  enum.sort {| a, b | block }   => array

visibility: public
ri/1.8/system/Enumerable/inject-i.yaml000064400000000321150403656750013464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (result, item)
comment: 
full_name: Enumerable#inject
is_singleton: false
name: inject
params: (init) {|result, item| ...}
visibility: public
ri/1.8/system/Enumerable/minmax_by-i.yaml000064400000001067150403656750014203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns two elements array array containing the objects in <em>enum</em> that gives the minimum and maximum values respectively from the given block.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = %w(albatross dog horse)\n   a.minmax_by {|x| x.length }   #=&gt; [&quot;dog&quot;, &quot;albatross&quot;]\n"
full_name: Enumerable#minmax_by
is_singleton: false
name: minmax_by
params: |
  enum.minmax_by {| obj| block }   => [min, max]

visibility: public
ri/1.8/system/Enumerable/count-i.yaml000064400000001457150403656760013354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the number of items in <em>enum</em>, where #size is called if it responds to it, otherwise the items are counted through enumeration. If an argument is given, counts the number of items in <em>enum</em>, for which equals to <em>item</em>. If a block is given, counts the number of elements yielding a true value."
- !ruby/struct:SM::Flow::VERB 
  body: "   ary = [1, 2, 4, 2]\n   ary.count             # =&gt; 4\n   ary.count(2)          # =&gt; 2\n   ary.count{|x|x%2==0}  # =&gt; 3\n"
full_name: Enumerable#count
is_singleton: false
name: count
params: |
  enum.count                   => int
  enum.count(item)             => int
  enum.count {| obj | block }  => int

visibility: public
ri/1.8/system/Enumerable/enum_with_index-i.yaml000064400000001141150403656760015400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <em>block</em> with two arguments, the item and its index, for each item in <em>enum</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   hash = Hash.new\n   %w(cat dog wombat).each_with_index {|item, index|\n     hash[item] = index\n   }\n   hash   #=&gt; {&quot;cat&quot;=&gt;0, &quot;wombat&quot;=&gt;2, &quot;dog&quot;=&gt;1}\n"
full_name: Enumerable#enum_with_index
is_singleton: false
name: enum_with_index
params: |
  enum.each_with_index {|obj, i| block }  -> enum

visibility: public
ri/1.8/system/Enumerable/sort_by-i.yaml000064400000006250150403656760013701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sorts <em>enum</em> using a set of keys generated by mapping the values in <em>enum</em> through the given block.
- !ruby/struct:SM::Flow::VERB 
  body: "   %w{ apple pear fig }.sort_by {|word| word.length}\n                #=&gt; [&quot;fig&quot;, &quot;pear&quot;, &quot;apple&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: The current implementation of <tt>sort_by</tt> generates an array of tuples containing the original collection element and the mapped value. This makes <tt>sort_by</tt> fairly expensive when the keysets are simple
- !ruby/struct:SM::Flow::VERB 
  body: "   require 'benchmark'\n   include Benchmark\n\n   a = (1..100000).map {rand(100000)}\n\n   bm(10) do |b|\n     b.report(&quot;Sort&quot;)    { a.sort }\n     b.report(&quot;Sort by&quot;) { a.sort_by {|a| a} }\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   user     system      total        real\n   Sort        0.180000   0.000000   0.180000 (  0.175469)\n   Sort by     1.980000   0.040000   2.020000 (  2.013586)\n"
- !ruby/struct:SM::Flow::P 
  body: However, consider the case where comparing the keys is a non-trivial operation. The following code sorts some files on modification time using the basic <tt>sort</tt> method.
- !ruby/struct:SM::Flow::VERB 
  body: "   files = Dir[&quot;*&quot;]\n   sorted = files.sort {|a,b| File.new(a).mtime &lt;=&gt; File.new(b).mtime}\n   sorted   #=&gt; [&quot;mon&quot;, &quot;tues&quot;, &quot;wed&quot;, &quot;thurs&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: "This sort is inefficient: it generates two new <tt>File</tt> objects during every comparison. A slightly better technique is to use the <tt>Kernel#test</tt> method to generate the modification times directly."
- !ruby/struct:SM::Flow::VERB 
  body: "   files = Dir[&quot;*&quot;]\n   sorted = files.sort { |a,b|\n     test(?M, a) &lt;=&gt; test(?M, b)\n   }\n   sorted   #=&gt; [&quot;mon&quot;, &quot;tues&quot;, &quot;wed&quot;, &quot;thurs&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This still generates many unnecessary <tt>Time</tt> objects. A more efficient technique is to cache the sort keys (modification times in this case) before the sort. Perl users often call this approach a Schwartzian Transform, after Randal Schwartz. We construct a temporary array, where each element is an array containing our sort key along with the filename. We sort this array, and then extract the filename from the result.
- !ruby/struct:SM::Flow::VERB 
  body: "   sorted = Dir[&quot;*&quot;].collect { |f|\n      [test(?M, f), f]\n   }.sort.collect { |f| f[1] }\n   sorted   #=&gt; [&quot;mon&quot;, &quot;tues&quot;, &quot;wed&quot;, &quot;thurs&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This is exactly what <tt>sort_by</tt> does internally.
- !ruby/struct:SM::Flow::VERB 
  body: "   sorted = Dir[&quot;*&quot;].sort_by {|f| test(?M, f)}\n   sorted   #=&gt; [&quot;mon&quot;, &quot;tues&quot;, &quot;wed&quot;, &quot;thurs&quot;]\n"
full_name: Enumerable#sort_by
is_singleton: false
name: sort_by
params: |
  enum.sort_by {| obj | block }    => array

visibility: public
ri/1.8/system/Enumerable/reverse_each-i.yaml000064400000000451150403656760014650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Traverses <em>enum</em> in reverse order.
full_name: Enumerable#reverse_each
is_singleton: false
name: reverse_each
params: |
  enum.reverse_each {|item| block } 

visibility: public
ri/1.8/system/SystemStackError/cdesc-SystemStackError.yaml000064400000001334150403656770017541 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Proc</tt> objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   def gen_times(factor)\n     return Proc.new {|n| n*factor }\n   end\n\n   times3 = gen_times(3)\n   times5 = gen_times(5)\n\n   times3.call(12)               #=&gt; 36\n   times5.call(5)                #=&gt; 25\n   times3.call(times5.call(4))   #=&gt; 60\n"
constants: []

full_name: SystemStackError
includes: []

instance_methods: []

name: SystemStackError
superclass: StandardError
ri/1.8/system/StandardError/cdesc-StandardError.yaml000064400000001200150403656770016305 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: StandardError
includes: []

instance_methods: []

name: StandardError
superclass: Exception
ri/1.8/system/SignalException/cdesc-SignalException.yaml000064400000001204150403656770017155 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: SignalException
includes: []

instance_methods: []

name: SignalException
superclass: Exception
ri/1.8/system/NKF/guess1-c.yaml000064400000001406150403657000011742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns guessed encoding of <em>str</em> as integer.
- !ruby/struct:SM::Flow::P 
  body: "Algorithm described in: Ken Lunde. `Understanding Japanese Information Processing' Sebastopol, CA: O'Reilly &amp; Associates."
- !ruby/struct:SM::Flow::VERB 
  body: "    case NKF.guess1(input)\n    when NKF::JIS\n      &quot;ISO-2022-JP&quot;\n    when NKF::SJIS\n      &quot;Shift_JIS&quot;\n    when NKF::EUC\n      &quot;EUC-JP&quot;\n    when NKF::UNKNOWN\n      &quot;UNKNOWN(ASCII)&quot;\n    when NKF::BINARY\n      &quot;BINARY&quot;\n    end\n"
full_name: NKF::guess1
is_singleton: true
name: guess1
params: |
  NKF.guess1(str)  -> integer

visibility: public
ri/1.8/system/NKF/guess2-c.yaml000064400000001341150403657000011741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns guessed encoding of <em>str</em> as integer by nkf routine.
- !ruby/struct:SM::Flow::VERB 
  body: "   case NKF.guess(input)\n   when NKF::ASCII\n     &quot;ASCII&quot;\n   when NKF::JIS\n     &quot;ISO-2022-JP&quot;\n   when NKF::SJIS\n     &quot;Shift_JIS&quot;\n   when NKF::EUC\n     &quot;EUC-JP&quot;\n   when NKF::UTF8\n     &quot;UTF-8&quot;\n   when NKF::UTF16\n     &quot;UTF-16&quot;\n   when NKF::UNKNOWN\n     &quot;UNKNOWN&quot;\n   when NKF::BINARY\n     &quot;BINARY&quot;\n   end\n"
full_name: NKF::guess2
is_singleton: true
name: guess2
params: |
  NKF.guess2(str)  -> integer

visibility: public
ri/1.8/system/NKF/cdesc-NKF.yaml000064400000031557150403657010012023 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: guess1
- !ruby/object:RI::MethodSummary 
  name: guess2
- !ruby/object:RI::MethodSummary 
  name: nkf
comment: 
- !ruby/struct:SM::Flow::P 
  body: NKF - Ruby extension for Network Kanji Filter
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Description
- !ruby/struct:SM::Flow::P 
  body: This is a Ruby Extension version of nkf (Netowrk Kanji Filter). It converts the first argument and return converted result. Conversion details are specified by flags as the first argument.
- !ruby/struct:SM::Flow::P 
  body: <b>Nkf</b> is a yet another kanji code converter among networks, hosts and terminals. It converts input kanji code to designated kanji code such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 or UTF-16.
- !ruby/struct:SM::Flow::P 
  body: One of the most unique faculty of <b>nkf</b> is the guess of the input kanji encodings. It currently recognizes ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 and UTF-16. So users needn't set the input kanji code explicitly.
- !ruby/struct:SM::Flow::P 
  body: By default, X0201 kana is converted into X0208 kana. For X0201 kana, SO/SI, SSO and ESC-(-I methods are supported. For automatic code detection, nkf assumes no X0201 kana in Shift_JIS. To accept X0201 in Shift_JIS, use <b>-X</b>, <b>-x</b> or <b>-S</b>.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Flags
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -b -u
- !ruby/struct:SM::Flow::P 
  body: Output is buffered (DEFAULT), Output is unbuffered.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -j -s -e -w -w16
- !ruby/struct:SM::Flow::P 
  body: Output code is ISO-2022-JP (7bit JIS), Shift_JIS, EUC-JP, UTF-8N, UTF-16BE. Without this option and compile option, ISO-2022-JP is assumed.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -J -S -E -W -W16
- !ruby/struct:SM::Flow::P 
  body: Input assumption is JIS 7 bit, Shift_JIS, EUC-JP, UTF-8, UTF-16LE.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: -J
- !ruby/struct:SM::Flow::P 
  body: Assume JIS input. It also accepts EUC-JP. This is the default. This flag does not exclude Shift_JIS.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: -S
- !ruby/struct:SM::Flow::P 
  body: Assume Shift_JIS and X0201 kana input. It also accepts JIS. EUC-JP is recognized as X0201 kana. Without <b>-x</b> flag, X0201 kana (halfwidth kana) is converted into X0208.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: -E
- !ruby/struct:SM::Flow::P 
  body: Assume EUC-JP input. It also accepts JIS. Same as -J.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -t
- !ruby/struct:SM::Flow::P 
  body: No conversion.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -i_
- !ruby/struct:SM::Flow::P 
  body: Output sequence to designate JIS-kanji. (DEFAULT B)
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -o_
- !ruby/struct:SM::Flow::P 
  body: Output sequence to designate ASCII. (DEFAULT B)
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -r
- !ruby/struct:SM::Flow::P 
  body: "{de/en}crypt ROT13/47"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -h[123] --hiragana --katakana --katakana-hiragana
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -h1 --hiragana
    body: Katakana to Hiragana conversion.
  - !ruby/struct:SM::Flow::LI 
    label: -h2 --katakana
    body: Hiragana to Katakana conversion.
  - !ruby/struct:SM::Flow::LI 
    label: -h3 --katakana-hiragana
    body: Katakana to Hiragana and Hiragana to Katakana conversion.
  type: :LABELED
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -T
- !ruby/struct:SM::Flow::P 
  body: Text mode output (MS-DOS)
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -l
- !ruby/struct:SM::Flow::P 
  body: ISO8859-1 (Latin-1) support
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -f[<tt>m</tt> [- <tt>n</tt>]]
- !ruby/struct:SM::Flow::P 
  body: Folding on <tt>m</tt> length with <tt>n</tt> margin in a line. Without this option, fold length is 60 and fold margin is 10.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -F
- !ruby/struct:SM::Flow::P 
  body: New line preserving line folding.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -Z[0-3]
- !ruby/struct:SM::Flow::P 
  body: Convert X0208 alphabet (Fullwidth Alphabets) to ASCII.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -Z -Z0
    body: Convert X0208 alphabet to ASCII.
  - !ruby/struct:SM::Flow::LI 
    label: -Z1
    body: Converts X0208 kankaku to single ASCII space.
  - !ruby/struct:SM::Flow::LI 
    label: -Z2
    body: Converts X0208 kankaku to double ASCII spaces.
  - !ruby/struct:SM::Flow::LI 
    label: -Z3
    body: Replacing Fullwidth &gt;, &lt;, &quot;, &amp; into '&amp;gt;', '&amp;lt;', '&amp;quot;', '&amp;amp;' as in HTML.
  type: :LABELED
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -X -x
- !ruby/struct:SM::Flow::P 
  body: Assume X0201 kana in MS-Kanji. With <b>-X</b> or without this option, X0201 is converted into X0208 Kana. With <b>-x</b>, try to preserve X0208 kana and do not convert X0201 kana to X0208. In JIS output, ESC-(-I is used. In EUC output, SSO is used.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -B[0-2]
- !ruby/struct:SM::Flow::P 
  body: Assume broken JIS-Kanji input, which lost ESC. Useful when your site is using old B-News Nihongo patch.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -B1
    body: allows any char after ESC-( or ESC-$.
  - !ruby/struct:SM::Flow::LI 
    label: -B2
    body: forces ASCII after NL.
  type: :LABELED
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -I
- !ruby/struct:SM::Flow::P 
  body: Replacing non iso-2022-jp char into a geta character (substitute character in Japanese).
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -d -c
- !ruby/struct:SM::Flow::P 
  body: Delete \r in line feed, Add \r in line feed.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -m[BQN0]
- !ruby/struct:SM::Flow::P 
  body: MIME ISO-2022-JP/ISO8859-1 decode. (DEFAULT) To see ISO8859-1 (Latin-1) -l is necessary.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -mB
    body: Decode MIME base64 encoded stream. Remove header or other part before
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: conversion.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -mQ
    body: Decode MIME quoted stream. '_' in quoted stream is converted to space.
  - !ruby/struct:SM::Flow::LI 
    label: -mN
    body: Non-strict decoding.
  type: :LABELED
- !ruby/struct:SM::Flow::P 
  body: It allows line break in the middle of the base64 encoding.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -m0
    body: No MIME decode.
  type: :LABELED
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -M
- !ruby/struct:SM::Flow::P 
  body: MIME encode. Header style. All ASCII code and control characters are intact. Kanji conversion is performed before encoding, so this cannot be used as a picture encoder.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -MB
    body: MIME encode Base64 stream.
  - !ruby/struct:SM::Flow::LI 
    label: -MQ
    body: Perfome quoted encoding.
  type: :LABELED
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -l
- !ruby/struct:SM::Flow::P 
  body: Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP. <b>-s</b>, <b>-e</b> and <b>-x</b> are not compatible with this option.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: -L[uwm]
- !ruby/struct:SM::Flow::P 
  body: new line mode Without this option, nkf doesn't convert line breaks.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: -Lu
    body: unix (LF)
  - !ruby/struct:SM::Flow::LI 
    label: -Lw
    body: windows (CRLF)
  - !ruby/struct:SM::Flow::LI 
    label: -Lm
    body: mac (CR)
  type: :LABELED
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --fj --unix --mac --msdos --windows
- !ruby/struct:SM::Flow::P 
  body: convert for these system
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --jis --euc --sjis --mime --base64
- !ruby/struct:SM::Flow::P 
  body: convert for named code
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --jis-input --euc-input --sjis-input --mime-input --base64-input
- !ruby/struct:SM::Flow::P 
  body: assume input system
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --ic=<tt>input codeset</tt> --oc=<tt>output codeset</tt>
- !ruby/struct:SM::Flow::P 
  body: Set the input or output codeset. NKF supports following codesets and those codeset name are case insensitive.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: ISO-2022-JP
    body: a.k.a. RFC1468, 7bit JIS, JUNET
  - !ruby/struct:SM::Flow::LI 
    label: EUC-JP (eucJP-nkf)
    body: a.k.a. AT&amp;T JIS, Japanese EUC, UJIS
  - !ruby/struct:SM::Flow::LI 
    label: eucJP-ascii
    body: a.k.a. x-eucjp-open-19970715-ascii
  - !ruby/struct:SM::Flow::LI 
    label: eucJP-ms
    body: a.k.a. x-eucjp-open-19970715-ms
  - !ruby/struct:SM::Flow::LI 
    label: CP51932
    body: Microsoft Version of EUC-JP.
  - !ruby/struct:SM::Flow::LI 
    label: Shift_JIS
    body: SJIS, MS-Kanji
  - !ruby/struct:SM::Flow::LI 
    label: CP932
    body: a.k.a. Windows-31J
  - !ruby/struct:SM::Flow::LI 
    label: UTF-8
    body: same as UTF-8N
  - !ruby/struct:SM::Flow::LI 
    label: UTF-8N
    body: UTF-8 without BOM
  - !ruby/struct:SM::Flow::LI 
    label: UTF-8-BOM
    body: UTF-8 with BOM
  - !ruby/struct:SM::Flow::LI 
    label: UTF-16
    body: same as UTF-16BE
  - !ruby/struct:SM::Flow::LI 
    label: UTF-16BE
    body: UTF-16 Big Endian without BOM
  - !ruby/struct:SM::Flow::LI 
    label: UTF-16BE-BOM
    body: UTF-16 Big Endian with BOM
  - !ruby/struct:SM::Flow::LI 
    label: UTF-16LE
    body: UTF-16 Little Endian without BOM
  - !ruby/struct:SM::Flow::LI 
    label: UTF-16LE-BOM
    body: UTF-16 Little Endian with BOM
  - !ruby/struct:SM::Flow::LI 
    label: UTF8-MAC
    body: NKDed UTF-8, a.k.a. UTF8-NFD (input only)
  type: :LABELED
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --fb-{skip, html, xml, perl, java, subchar}
- !ruby/struct:SM::Flow::P 
  body: Specify the way that nkf handles unassigned characters. Without this option, --fb-skip is assumed.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --prefix= <tt>escape character</tt> <tt>target character</tt> ..
- !ruby/struct:SM::Flow::P 
  body: When nkf converts to Shift_JIS, nkf adds a specified escape character to specified 2nd byte of Shift_JIS characters. 1st byte of argument is the escape character and following bytes are target characters.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --disable-cp932ext
- !ruby/struct:SM::Flow::P 
  body: Handle the characters extended in CP932 as unassigned characters.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --cap-input
- !ruby/struct:SM::Flow::P 
  body: Decode hex encoded characters.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --url-input
- !ruby/struct:SM::Flow::P 
  body: Unescape percent escaped characters.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: --
- !ruby/struct:SM::Flow::P 
  body: Ignore rest of -option.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Auto-Detect
  name: AUTO
  value: INT2FIX(_AUTO)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: ISO-2022-JP
  name: JIS
  value: INT2FIX(_JIS)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: EUC-JP
  name: EUC
  value: INT2FIX(_EUC)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Shift_JIS
  name: SJIS
  value: INT2FIX(_SJIS)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: BINARY
  name: BINARY
  value: INT2FIX(_BINARY)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: No conversion
  name: NOCONV
  value: INT2FIX(_NOCONV)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: ASCII
  name: ASCII
  value: INT2FIX(_ASCII)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UTF-8
  name: UTF8
  value: INT2FIX(_UTF8)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UTF-16
  name: UTF16
  value: INT2FIX(_UTF16)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UTF-32
  name: UTF32
  value: INT2FIX(_UTF32)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: UNKNOWN
  name: UNKNOWN
  value: INT2FIX(_UNKNOWN)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Full version string of nkf
  name: VERSION
  value: rb_str_new2(RUBY_NKF_VERSION)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Version of nkf
  name: NKF_VERSION
  value: rb_str_new2(NKF_VERSION)
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Release date of nkf
  name: NKF_RELEASE_DATE
  value: rb_str_new2(NKF_RELEASE_DATE)
full_name: NKF
includes: []

instance_methods: []

name: NKF
superclass: 
ri/1.8/system/NKF/nkf-c.yaml000064400000001127150403657010011312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <em>str</em> and return converted result. Conversion details are specified by <em>opt</em> as String.
- !ruby/struct:SM::Flow::VERB 
  body: "   require 'nkf'\n   output = NKF.nkf(&quot;-s&quot;, input)\n"
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> By default, nkf decodes MIME encoded string. If you want not to decode input, use NKF.nkf with <b>-m0</b> flag.
full_name: NKF::nkf
is_singleton: true
name: nkf
params: |
  NKF.nkf(opt, str)   -> string

visibility: public
ri/1.8/system/Marshal/cdesc-Marshal.yaml000064400000004356150403657010013742 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: load
- !ruby/object:RI::MethodSummary 
  name: restore
comment: 
- !ruby/struct:SM::Flow::P 
  body: The marshaling library converts collections of Ruby objects into a byte stream, allowing them to be stored outside the currently active script. This data may subsequently be read and the original objects reconstituted. Marshaled data has major and minor version numbers stored along with the object information. In normal use, marshaling can only load data written with the same major version number and an equal or lower minor version number. If Ruby's ``verbose'' flag is set (normally using -d, -v, -w, or --verbose) the major and minor numbers must match exactly. Marshal versioning is independent of Ruby's version numbers. You can extract the version by reading the first two bytes of marshaled data.
- !ruby/struct:SM::Flow::VERB 
  body: "    str = Marshal.dump(&quot;thing&quot;)\n    RUBY_VERSION   #=&gt; &quot;1.8.0&quot;\n    str[0]         #=&gt; 4\n    str[1]         #=&gt; 8\n"
- !ruby/struct:SM::Flow::P 
  body: "Some objects cannot be dumped: if the objects to be dumped include bindings, procedure or method objects, instances of class IO, or singleton objects, a TypeError will be raised. If your class has special serialization needs (for example, if you want to serialize in some specific format), or if it contains objects that would otherwise not be serializable, you can implement your own serialization strategy by defining two methods, _dump and _load: The instance method _dump should return a String object containing all the information necessary to reconstitute objects of this class and all referenced objects up to a maximum depth given as an integer parameter (a value of -1 implies that you should disable depth checking). The class method _load should take a String and return an object of this class."
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MAJOR_VERSION
  value: INT2FIX(MARSHAL_MAJOR)
- !ruby/object:RI::Constant 
  comment: 
  name: MINOR_VERSION
  value: INT2FIX(MARSHAL_MINOR)
full_name: Marshal
includes: []

instance_methods: []

name: Marshal
superclass: 
ri/1.8/system/Marshal/restore-c.yaml000064400000001054150403657020013170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the result of converting the serialized data in source into a Ruby object (possibly with associated subordinate objects). source may be either an instance of IO or an object that responds to to_str. If proc is specified, it will be passed each object as it is deserialized.
full_name: Marshal::restore
is_singleton: true
name: restore
params: |
  load( source [, proc] ) => obj
  restore( source [, proc] ) => obj

visibility: public
ri/1.8/system/Marshal/dump-c.yaml000064400000001700150403657020012450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Serializes obj and all descendent objects. If anIO is specified, the serialized data will be written to it, otherwise the data will be returned as a String. If limit is specified, the traversal of subobjects will be limited to that depth. If limit is negative, no checking of depth will be performed.
- !ruby/struct:SM::Flow::VERB 
  body: "    class Klass\n      def initialize(str)\n        @str = str\n      end\n      def sayHello\n        @str\n      end\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: (produces no output)
- !ruby/struct:SM::Flow::VERB 
  body: "    o = Klass.new(&quot;hello\\n&quot;)\n    data = Marshal.dump(o)\n    obj = Marshal.load(data)\n    obj.sayHello   #=&gt; &quot;hello\\n&quot;\n"
full_name: Marshal::dump
is_singleton: true
name: dump
params: |
  dump( obj [, anIO] , limit=--1 ) => anIO

visibility: public
ri/1.8/system/Marshal/load-c.yaml000064400000001046150403657020012425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the result of converting the serialized data in source into a Ruby object (possibly with associated subordinate objects). source may be either an instance of IO or an object that responds to to_str. If proc is specified, it will be passed each object as it is deserialized.
full_name: Marshal::load
is_singleton: true
name: load
params: |
  load( source [, proc] ) => obj
  restore( source [, proc] ) => obj

visibility: public
ri/1.8/system/Bignum/size-i.yaml000064400000000672150403657020012324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of bytes in the machine representation of <em>big</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   (256**10 - 1).size   #=&gt; 12\n   (256**20 - 1).size   #=&gt; 20\n   (256**40 - 1).size   #=&gt; 40\n"
full_name: Bignum#size
is_singleton: false
name: size
params: |
  big.size -> integer

visibility: public
ri/1.8/system/Bignum/eql%3f-i.yaml000064400000000763150403657020012432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> only if <em>obj</em> is a <tt>Bignum</tt> with the same value as <em>big</em>. Contrast this with <tt>Bignum#==</tt>, which performs type conversions.
- !ruby/struct:SM::Flow::VERB 
  body: "   68719476736.eql?(68719476736.0)   #=&gt; false\n"
full_name: Bignum#eql?
is_singleton: false
name: eql?
params: |
  big.eql?(obj)   => true or false

visibility: public
ri/1.8/system/Bignum/rpower-i.yaml000064400000000521150403657020012661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "**"
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a Rational number if the result is in fact rational (i.e. <tt>other</tt> &lt; 0).
full_name: Bignum#rpower
is_singleton: false
name: rpower
params: (other)
visibility: public
ri/1.8/system/Bignum/%25-i.yaml000064400000000507150403657020011642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns big modulo other. See Numeric.divmod for more information.
full_name: Bignum#%
is_singleton: false
name: "%"
params: |
  big % other         => Numeric
  big.modulo(other)   => Numeric

visibility: public
ri/1.8/system/Bignum/%5b%5d-i.yaml000064400000001160150403657030012215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Bit Reference---Returns the <em>n</em>th bit in the (assumed) binary representation of <em>big</em>, where <em>big</em>[0] is the least significant bit.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = 9**15\n   50.downto(0) do |n|\n     print a[n]\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   000101110110100000111000011110010100111100010111001\n"
full_name: Bignum#[]
is_singleton: false
name: "[]"
params: |
  big[n] -> 0, 1

visibility: public
ri/1.8/system/Bignum/fdiv-i.yaml000064400000000775150403657030012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the floating point result of dividing <em>big</em> by <em>numeric</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   -1234567890987654321.quo(13731)      #=&gt; -89910996357705.5\n   -1234567890987654321.quo(13731.24)   #=&gt; -89909424858035.7\n"
full_name: Bignum#fdiv
is_singleton: false
name: fdiv
params: |
  big.quo(numeric) -> float
  big.fdiv(numeric) -> float

visibility: public
ri/1.8/system/Bignum/%2a%2a-i.yaml000064400000001165150403657030012210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: power!
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises <em>big</em> to the <em>exponent</em> power (which may be an integer, float, or anything that will coerce to a number). The result may be a Fixnum, Bignum, or Float
- !ruby/struct:SM::Flow::VERB 
  body: "  123456789 ** 2      #=&gt; 15241578750190521\n  123456789 ** 1.2    #=&gt; 5126464716.09932\n  123456789 ** -2     #=&gt; 6.5610001194102e-17\n"
full_name: Bignum#**
is_singleton: false
name: "**"
params: |
  big ** exponent   #=> numeric

visibility: public
ri/1.8/system/Bignum/%3c%3d%3e-i.yaml000064400000000633150403657030012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comparison---Returns -1, 0, or +1 depending on whether <em>big</em> is less than, equal to, or greater than <em>numeric</em>. This is the basis for the tests in <tt>Comparable</tt>.
full_name: Bignum#<=>
is_singleton: false
name: <=>
params: |
  big <=> numeric   => -1, 0, +1

visibility: public
ri/1.8/system/Bignum/coerce-i.yaml000064400000000345150403657030012610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "MISSING: documentation"
full_name: Bignum#coerce
is_singleton: false
name: coerce
params: (p1)
visibility: public
ri/1.8/system/Bignum/%2f-i.yaml000064400000000323150403657030011720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #quo"
full_name: Bignum#/
is_singleton: false
name: /
params: (p1)
visibility: public
ri/1.8/system/Bignum/%7c-i.yaml000064400000000450150403657040011724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Performs bitwise <tt>or</tt> between <em>big</em> and <em>numeric</em>.
full_name: Bignum#|
is_singleton: false
name: "|"
params: |
  big | numeric   =>  integer

visibility: public
ri/1.8/system/Bignum/divmod-i.yaml000064400000000410150403657040012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See <tt>Numeric#divmod</tt>.
full_name: Bignum#divmod
is_singleton: false
name: divmod
params: |
  big.divmod(numeric)   => array

visibility: public
ri/1.8/system/Bignum/%26-i.yaml000064400000000451150403657040011643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Performs bitwise <tt>and</tt> between <em>big</em> and <em>numeric</em>.
full_name: Bignum#&
is_singleton: false
name: "&"
params: |
  big & numeric   =>  integer

visibility: public
ri/1.8/system/Bignum/quo-i.yaml000064400000001113150403657040012147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: /
- !ruby/object:RI::AliasName 
  name: rdiv
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the floating point result of dividing <em>big</em> by <em>numeric</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   -1234567890987654321.quo(13731)      #=&gt; -89910996357705.5\n   -1234567890987654321.quo(13731.24)   #=&gt; -89909424858035.7\n"
full_name: Bignum#quo
is_singleton: false
name: quo
params: |
  big.quo(numeric) -> float
  big.fdiv(numeric) -> float

visibility: public
ri/1.8/system/Bignum/hash-i.yaml000064400000000420150403657040012266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compute a hash based on the value of <em>big</em>.
full_name: Bignum#hash
is_singleton: false
name: hash
params: |
  big.hash   => fixnum

visibility: public
ri/1.8/system/Bignum/abs-i.yaml000064400000000551150403657040012115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the absolute value of <em>big</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   -1234567890987654321.abs   #=&gt; 1234567890987654321\n"
full_name: Bignum#abs
is_singleton: false
name: abs
params: |
  big.abs -> aBignum

visibility: public
ri/1.8/system/Bignum/%2a-i.yaml000064400000000414150403657040011715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Multiplies big and other, returning the result.
full_name: Bignum#*
is_singleton: false
name: "*"
params: |
  big * other  => Numeric

visibility: public
ri/1.8/system/Bignum/remainder-i.yaml000064400000000753150403657050013323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the remainder after dividing <em>big</em> by <em>numeric</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   -1234567890987654321.remainder(13731)      #=&gt; -6966\n   -1234567890987654321.remainder(13731.24)   #=&gt; -9906.22531493148\n"
full_name: Bignum#remainder
is_singleton: false
name: remainder
params: |
  big.remainder(numeric)    => number

visibility: public
ri/1.8/system/Bignum/power%21-i.yaml000064400000000334150403657050012714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #**"
full_name: Bignum#power!
is_singleton: false
name: power!
params: (p1)
visibility: public
ri/1.8/system/Bignum/%7e-i.yaml000064400000001061150403657050011726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Inverts the bits in big. As Bignums are conceptually infinite length, the result acts as if it had an infinite number of one bits to the left. In hex representations, this is displayed as two periods to the left of the digits.
- !ruby/struct:SM::Flow::VERB 
  body: "  sprintf(&quot;%X&quot;, ~0x1122334455)    #=&gt; &quot;..FEEDDCCBBAA&quot;\n"
full_name: Bignum#~
is_singleton: false
name: "~"
params: |
  ~big  =>  integer

visibility: public
ri/1.8/system/Bignum/rdiv-i.yaml000064400000000331150403657060012312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #quo"
full_name: Bignum#rdiv
is_singleton: false
name: rdiv
params: (p1)
visibility: public
ri/1.8/system/Bignum/cdesc-Bignum.yaml000064400000004734150403657060013433 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Bignum objects hold integers outside the range of Fixnum. Bignum objects are created automatically when integer calculations would otherwise overflow a Fixnum. When a calculation involving Bignum objects returns a result that will fit in a Fixnum, the result is automatically converted.
- !ruby/struct:SM::Flow::P 
  body: For the purposes of the bitwise operations and <tt>[]</tt>, a Bignum is treated as if it were an infinite-length bitstring with 2's complement representation.
- !ruby/struct:SM::Flow::P 
  body: While Fixnum values are immediate, Bignum objects are not---assignment and parameter passing work with references to objects, not the objects themselves.
constants: []

full_name: Bignum
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "%"
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: "**"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: -@
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ">>"
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: ^
- !ruby/object:RI::MethodSummary 
  name: abs
- !ruby/object:RI::MethodSummary 
  name: coerce
- !ruby/object:RI::MethodSummary 
  name: div
- !ruby/object:RI::MethodSummary 
  name: divmod
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: fdiv
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: modulo
- !ruby/object:RI::MethodSummary 
  name: power!
- !ruby/object:RI::MethodSummary 
  name: quo
- !ruby/object:RI::MethodSummary 
  name: quo
- !ruby/object:RI::MethodSummary 
  name: rdiv
- !ruby/object:RI::MethodSummary 
  name: remainder
- !ruby/object:RI::MethodSummary 
  name: rpower
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: to_f
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: "|"
- !ruby/object:RI::MethodSummary 
  name: "~"
name: Bignum
superclass: Integer
ri/1.8/system/Bignum/%3e%3e-i.yaml000064400000000467150403657060012231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Shifts big right <em>numeric</em> positions (left if <em>numeric</em> is negative).
full_name: Bignum#>>
is_singleton: false
name: ">>"
params: |
  big >> numeric   =>  integer

visibility: public
ri/1.8/system/Bignum/%2b-i.yaml000064400000000404150403657070011720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds big and other, returning the result.
full_name: Bignum#+
is_singleton: false
name: +
params: |
  big + other  => Numeric

visibility: public
ri/1.8/system/Bignum/%3c%3c-i.yaml000064400000000467150403657070012226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Shifts big left <em>numeric</em> positions (right if <em>numeric</em> is negative).
full_name: Bignum#<<
is_singleton: false
name: "<<"
params: |
  big << numeric   =>  integer

visibility: public
ri/1.8/system/Bignum/to_s-i.yaml000064400000001264150403657070012321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string containing the representation of <em>big</em> radix <em>base</em> (2 through 36).
- !ruby/struct:SM::Flow::VERB 
  body: "   12345654321.to_s         #=&gt; &quot;12345654321&quot;\n   12345654321.to_s(2)      #=&gt; &quot;1011011111110110111011110000110001&quot;\n   12345654321.to_s(8)      #=&gt; &quot;133766736061&quot;\n   12345654321.to_s(16)     #=&gt; &quot;2dfdbbc31&quot;\n   78546939656932.to_s(36)  #=&gt; &quot;rubyrules&quot;\n"
full_name: Bignum#to_s
is_singleton: false
name: to_s
params: |
  big.to_s(base=10)   =>  string

visibility: public
ri/1.8/system/Bignum/%3d%3d-i.yaml000064400000000747150403657070012231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> only if <em>obj</em> has the same value as <em>big</em>. Contrast this with <tt>Bignum#eql?</tt>, which requires <em>obj</em> to be a <tt>Bignum</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   68719476736 == 68719476736.0   #=&gt; true\n"
full_name: Bignum#==
is_singleton: false
name: ==
params: |
  big == obj  => true or false

visibility: public
ri/1.8/system/Bignum/%2d%40-i.yaml000064400000000421150403657070012132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unary minus (returns a new Bignum whose value is 0-big)
full_name: Bignum#-@
is_singleton: false
name: -@
params: |
  -big   =>  other_big

visibility: public
ri/1.8/system/Bignum/div-i.yaml000064400000000452150403657070012135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Divides big by other, returning the result.
full_name: Bignum#div
is_singleton: false
name: div
params: |
  big / other     => Numeric
  big.div(other)  => Numeric

visibility: public
ri/1.8/system/Bignum/%5e-i.yaml000064400000000451150403657100011722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Performs bitwise +exclusive or+ between <em>big</em> and <em>numeric</em>.
full_name: Bignum#^
is_singleton: false
name: ^
params: |
  big ^ numeric   =>  integer

visibility: public
ri/1.8/system/Bignum/to_f-i.yaml000064400000000516150403657100012275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>big</em> to a <tt>Float</tt>. If <em>big</em> doesn't fit in a <tt>Float</tt>, the result is infinity.
full_name: Bignum#to_f
is_singleton: false
name: to_f
params: |
  big.to_f -> float

visibility: public
ri/1.8/system/Bignum/modulo-i.yaml000064400000000517150403657100012646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns big modulo other. See Numeric.divmod for more information.
full_name: Bignum#modulo
is_singleton: false
name: modulo
params: |
  big % other         => Numeric
  big.modulo(other)   => Numeric

visibility: public
ri/1.8/system/Bignum/%2d-i.yaml000064400000000414150403657110011716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Subtracts other from big, returning the result.
full_name: Bignum#-
is_singleton: false
name: "-"
params: |
  big - other  => Numeric

visibility: public
ri/1.8/system/Rinda/cdesc-Rinda.yaml000064400000001243150403657110013047 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A module to implement the Linda distributed computing paradigm in Ruby.
- !ruby/struct:SM::Flow::P 
  body: Rinda is part of DRb (dRuby).
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example(s)
- !ruby/struct:SM::Flow::P 
  body: See the sample/drb/ directory in the Ruby distribution, from 1.8.2 onwards.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The default port Ring discovery will use.
  name: Ring_PORT
  value: "7647"
full_name: Rinda
includes: []

instance_methods: []

name: Rinda
superclass: 
ri/1.8/system/Rinda/Template/match-i.yaml000064400000002043150403657110014027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Matches this template against <tt>tuple</tt>. The <tt>tuple</tt> must be the same size as the template. An element with a <tt>nil</tt> value in a template acts as a wildcard, matching any value in the corresponding position in the tuple. Elements of the template match the <tt>tuple</tt> if the are #== or #===."
- !ruby/struct:SM::Flow::VERB 
  body: "  Template.new([:foo, 5]).match   Tuple.new([:foo, 5]) # =&gt; true\n  Template.new([:foo, nil]).match Tuple.new([:foo, 5]) # =&gt; true\n  Template.new([String]).match    Tuple.new(['hello']) # =&gt; true\n\n  Template.new([:foo]).match      Tuple.new([:foo, 5]) # =&gt; false\n  Template.new([:foo, 6]).match   Tuple.new([:foo, 5]) # =&gt; false\n  Template.new([:foo, nil]).match Tuple.new([:foo])    # =&gt; false\n  Template.new([:foo, 6]).match   Tuple.new([:foo])    # =&gt; false\n"
full_name: Rinda::Template#match
is_singleton: false
name: match
params: (tuple)
visibility: public
ri/1.8/system/Rinda/Template/%3d%3d%3d-i.yaml000064400000000346150403657110014102 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #match."
full_name: Rinda::Template#===
is_singleton: false
name: ===
params: (tuple)
visibility: public
ri/1.8/system/Rinda/Template/cdesc-Template.yaml000064400000000557150403657110015347 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Templates are used to match tuples in Rinda.
constants: []

full_name: Rinda::Template
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: match
name: Template
superclass: Tuple
ri/1.8/system/Rinda/WaitTemplateEntry/cdesc-WaitTemplateEntry.yaml000064400000001076150403657110021062 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: found
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: <em>Documentation?</em>
constants: []

full_name: Rinda::WaitTemplateEntry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: cancel
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: signal
- !ruby/object:RI::MethodSummary 
  name: wait
name: WaitTemplateEntry
superclass: TemplateEntry
ri/1.8/system/Rinda/WaitTemplateEntry/read-i.yaml000064400000000271150403657110015516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::WaitTemplateEntry#read
is_singleton: false
name: read
params: (tuple)
visibility: public
ri/1.8/system/Rinda/WaitTemplateEntry/wait-i.yaml000064400000000264150403657110015551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::WaitTemplateEntry#wait
is_singleton: false
name: wait
params: ()
visibility: public
ri/1.8/system/Rinda/WaitTemplateEntry/new-c.yaml000064400000000311150403657110015361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::WaitTemplateEntry::new
is_singleton: true
name: new
params: (place, ary, expires=nil)
visibility: public
ri/1.8/system/Rinda/WaitTemplateEntry/signal-i.yaml000064400000000270150403657110016057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::WaitTemplateEntry#signal
is_singleton: false
name: signal
params: ()
visibility: public
ri/1.8/system/Rinda/WaitTemplateEntry/cancel-i.yaml000064400000000270150403657110016027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::WaitTemplateEntry#cancel
is_singleton: false
name: cancel
params: ()
visibility: public
ri/1.8/system/Rinda/TupleEntry/size-i.yaml000064400000000350150403657110014244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The size of the tuple.
full_name: Rinda::TupleEntry#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Rinda/TupleEntry/%5b%5d-i.yaml000064400000000371150403657110014146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieves <tt>key</tt> from the tuple.
full_name: Rinda::TupleEntry#[]
is_singleton: false
name: "[]"
params: (key)
visibility: public
ri/1.8/system/Rinda/TupleEntry/cdesc-TupleEntry.yaml000064400000002120150403657110016233 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: expires
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A TupleEntry is a Tuple (i.e. a possible entry in some Tuplespace) together with expiry and cancellation data.
constants: []

full_name: Rinda::TupleEntry
includes: 
- !ruby/object:RI::IncludedModule 
  name: DRbUndumped
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: alive?
- !ruby/object:RI::MethodSummary 
  name: cancel
- !ruby/object:RI::MethodSummary 
  name: canceled?
- !ruby/object:RI::MethodSummary 
  name: expired?
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: get_renewer
- !ruby/object:RI::MethodSummary 
  name: make_expires
- !ruby/object:RI::MethodSummary 
  name: make_tuple
- !ruby/object:RI::MethodSummary 
  name: renew
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: value
name: TupleEntry
superclass: Object
ri/1.8/system/Rinda/TupleEntry/renew-i.yaml000064400000001361150403657110014415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reset the expiry time according to <tt>sec_or_renewer</tt>.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+nil+:"
    body: it is set to expire in the far future.
  - !ruby/struct:SM::Flow::LI 
    label: "+false+:"
    body: it has expired.
  - !ruby/struct:SM::Flow::LI 
    label: "Numeric:"
    body: it will expire in that many seconds.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: Otherwise the argument refers to some kind of renewer object which will reset its expiry time.
full_name: Rinda::TupleEntry#renew
is_singleton: false
name: renew
params: (sec_or_renewer)
visibility: public
ri/1.8/system/Rinda/TupleEntry/make_expires-i.yaml000064400000001313150403657110015746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns an expiry Time based on <tt>sec</tt> which can be one of:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Numeric:"
    body: <tt>sec</tt> seconds into the future
  - !ruby/struct:SM::Flow::LI 
    label: "+true+:"
    body: the expiry time is the start of 1970 (i.e. expired)
  - !ruby/struct:SM::Flow::LI 
    label: "+nil+:"
    body: it is Tue Jan 19 03:14:07 GMT Standard Time 2038 (i.e. when UNIX clocks will die)
  type: :NOTE
full_name: Rinda::TupleEntry#make_expires
is_singleton: false
name: make_expires
params: (sec=nil)
visibility: public
ri/1.8/system/Rinda/TupleEntry/get_renewer-i.yaml000064400000000775150403657110015613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a valid argument to make_expires and the renewer or nil.
- !ruby/struct:SM::Flow::P 
  body: Given <tt>true</tt>, <tt>nil</tt>, or Numeric, returns that value and <tt>nil</tt> (no actual renewer). Otherwise it returns an expiry value from calling +it.renew+ and the renewer.
full_name: Rinda::TupleEntry#get_renewer
is_singleton: false
name: get_renewer
params: (it)
visibility: private
ri/1.8/system/Rinda/TupleEntry/new-c.yaml000064400000000741150403657120014062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a TupleEntry based on <tt>ary</tt> with an optional renewer or expiry time <tt>sec</tt>.
- !ruby/struct:SM::Flow::P 
  body: A renewer must implement the <tt>renew</tt> method which returns a Numeric, nil, or true to indicate when the tuple has expired.
full_name: Rinda::TupleEntry::new
is_singleton: true
name: new
params: (ary, sec=nil)
visibility: public
ri/1.8/system/Rinda/TupleEntry/make_tuple-i.yaml000064400000000411150403657120015417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a Rinda::Tuple for <tt>ary</tt>.
full_name: Rinda::TupleEntry#make_tuple
is_singleton: false
name: make_tuple
params: (ary)
visibility: public
ri/1.8/system/Rinda/TupleEntry/canceled%3f-i.yaml000064400000000370150403657120015331 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the canceled status.
full_name: Rinda::TupleEntry#canceled?
is_singleton: false
name: canceled?
params: ()
visibility: public
ri/1.8/system/Rinda/TupleEntry/alive%3f-i.yaml000064400000000412150403657130014671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A TupleEntry is dead when it is canceled or expired.
full_name: Rinda::TupleEntry#alive?
is_singleton: false
name: alive?
params: ()
visibility: public
ri/1.8/system/Rinda/TupleEntry/value-i.yaml000064400000000433150403657130014412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Return the object which makes up the tuple itself: the Array or Hash."
full_name: Rinda::TupleEntry#value
is_singleton: false
name: value
params: ()
visibility: public
ri/1.8/system/Rinda/TupleEntry/cancel-i.yaml000064400000000370150403657140014524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Marks this TupleEntry as canceled.
full_name: Rinda::TupleEntry#cancel
is_singleton: false
name: cancel
params: ()
visibility: public
ri/1.8/system/Rinda/TupleEntry/expired%3f-i.yaml000064400000000613150403657140015235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Has this tuple expired? (true/false).
- !ruby/struct:SM::Flow::P 
  body: "A tuple has expired when its expiry timer based on the <tt>sec</tt> argument to #initialize runs out."
full_name: Rinda::TupleEntry#expired?
is_singleton: false
name: expired?
params: ()
visibility: public
ri/1.8/system/Rinda/TupleEntry/fetch-i.yaml000064400000000373150403657140014373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fetches <tt>key</tt> from the tuple.
full_name: Rinda::TupleEntry#fetch
is_singleton: false
name: fetch
params: (key)
visibility: public
ri/1.8/system/Rinda/RingFinger/primary-c.yaml000064400000000400150403657150014666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first advertised TupleSpace.
full_name: Rinda::RingFinger::primary
is_singleton: true
name: primary
params: ()
visibility: public
ri/1.8/system/Rinda/RingFinger/lookup_ring-i.yaml000064400000000620150403657150015545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Looks up RingServers waiting <tt>timeout</tt> seconds. RingServers will be given <tt>block</tt> as a callback, which will be called with the remote TupleSpace.
full_name: Rinda::RingFinger#lookup_ring
is_singleton: false
name: lookup_ring
params: (timeout=5, &block)
visibility: public
ri/1.8/system/Rinda/RingFinger/each-i.yaml000064400000000460150403657150014117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (@primary)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over all discovered TupleSpaces starting with the primary.
full_name: Rinda::RingFinger#each
is_singleton: false
name: each
params: () {|@primary| ...}
visibility: public
ri/1.8/system/Rinda/RingFinger/lookup_ring_any-i.yaml000064400000000544150403657160016422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first found remote TupleSpace. Any further recovered TupleSpaces can be found by calling <tt>to_a</tt>.
full_name: Rinda::RingFinger#lookup_ring_any
is_singleton: false
name: lookup_ring_any
params: (timeout=5)
visibility: public
ri/1.8/system/Rinda/RingFinger/to_a-i.yaml000064400000000415150403657160014142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Contains all discovered TupleSpaces except for the primary.
full_name: Rinda::RingFinger#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/Rinda/RingFinger/cdesc-RingFinger.yaml000064400000002507150403657160016107 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The list of addresses where RingFinger will send query packets.
  name: broadcast_list
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The port that RingFinger will send query packets to.
  name: port
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Contain the first advertised TupleSpace after lookup_ring_any is called.
  name: primary
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: finger
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: primary
- !ruby/object:RI::MethodSummary 
  name: to_a
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: Rinda::RingFinger
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: lookup_ring
- !ruby/object:RI::MethodSummary 
  name: lookup_ring_any
- !ruby/object:RI::MethodSummary 
  name: to_a
name: RingFinger
superclass: Object
ri/1.8/system/Rinda/RingFinger/new-c.yaml000064400000000564150403657170014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new RingFinger that will look for RingServers at <tt>port</tt> on the addresses in <tt>broadcast_list</tt>.
full_name: Rinda::RingFinger::new
is_singleton: true
name: new
params: (broadcast_list=@@broadcast_list, port=Ring_PORT)
visibility: public
ri/1.8/system/Rinda/RingFinger/finger-c.yaml000064400000000460150403657170014465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a singleton RingFinger and looks for a RingServer. Returns the created RingFinger.
full_name: Rinda::RingFinger::finger
is_singleton: true
name: finger
params: ()
visibility: public
ri/1.8/system/Rinda/RingFinger/to_a-c.yaml000064400000000415150403657170014135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Contains all discovered TupleSpaces except for the primary.
full_name: Rinda::RingFinger::to_a
is_singleton: true
name: to_a
params: ()
visibility: public
ri/1.8/system/Rinda/RequestCanceledError/cdesc-RequestCanceledError.yaml000064400000000461150403657170022163 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raised when trying to use a canceled tuple.
constants: []

full_name: Rinda::RequestCanceledError
includes: []

instance_methods: []

name: RequestCanceledError
superclass: ThreadError
ri/1.8/system/Rinda/TemplateEntry/match-i.yaml000064400000000567150403657170015070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: ===
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Matches this TemplateEntry against <tt>tuple</tt>. See Template#match for details on how a Template matches a Tuple.
full_name: Rinda::TemplateEntry#match
is_singleton: false
name: match
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TemplateEntry/%3d%3d%3d-i.yaml000064400000000352150403657170015127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #match"
full_name: Rinda::TemplateEntry#===
is_singleton: false
name: ===
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TemplateEntry/cdesc-TemplateEntry.yaml000064400000000633150403657170017414 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A TemplateEntry is a Template together with expiry and cancellation data.
constants: []

full_name: Rinda::TemplateEntry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: match
name: TemplateEntry
superclass: TupleEntry
ri/1.8/system/Rinda/RindaError/cdesc-RindaError.yaml000064400000000411150403657200016124 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Rinda error base class
constants: []

full_name: Rinda::RindaError
includes: []

instance_methods: []

name: RindaError
superclass: RuntimeError
ri/1.8/system/Rinda/SimpleRenewer/cdesc-SimpleRenewer.yaml000064400000000714150403657200017356 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: An SimpleRenewer allows a TupleSpace to check if a TupleEntry is still alive.
constants: []

full_name: Rinda::SimpleRenewer
includes: 
- !ruby/object:RI::IncludedModule 
  name: DRbUndumped
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: renew
name: SimpleRenewer
superclass: Object
ri/1.8/system/Rinda/SimpleRenewer/renew-i.yaml000064400000000426150403657200015064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Called by the TupleSpace to check if the object is still alive.
full_name: Rinda::SimpleRenewer#renew
is_singleton: false
name: renew
params: ()
visibility: public
ri/1.8/system/Rinda/SimpleRenewer/new-c.yaml000064400000000462150403657200014527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new SimpleRenewer that keeps an object alive for another <tt>sec</tt> seconds.
full_name: Rinda::SimpleRenewer::new
is_singleton: true
name: new
params: (sec=180)
visibility: public
ri/1.8/system/Rinda/RingProvider/cdesc-RingProvider.yaml000064400000001226150403657200017037 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: Services are registered with a tuple of the format [:name, klass, DRbObject, description].
constants: []

full_name: Rinda::RingProvider
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: provide
name: RingProvider
superclass: Object
ri/1.8/system/Rinda/RingProvider/new-c.yaml000064400000000612150403657210014356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a RingProvider that will provide a <tt>klass</tt> service running on <tt>front</tt>, with a <tt>description</tt>. <tt>renewer</tt> is optional.
full_name: Rinda::RingProvider::new
is_singleton: true
name: new
params: (klass, front, desc, renewer = nil)
visibility: public
ri/1.8/system/Rinda/RingProvider/provide-i.yaml000064400000000423150403657220015244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Advertises this service on the primary remote TupleSpace.
full_name: Rinda::RingProvider#provide
is_singleton: false
name: provide
params: ()
visibility: public
ri/1.8/system/Rinda/TupleBag/find-i.yaml000064400000000412150403657220013603 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finds a live tuple that matches <tt>template</tt>.
full_name: Rinda::TupleBag#find
is_singleton: false
name: find
params: (template)
visibility: public
ri/1.8/system/Rinda/TupleBag/each_entry-i.yaml000064400000000274150403657220015012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::TupleBag#each_entry
is_singleton: false
name: each_entry
params: (&blk)
visibility: private
ri/1.8/system/Rinda/TupleBag/bin_for_find-i.yaml000064400000000304150403657220015301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::TupleBag#bin_for_find
is_singleton: false
name: bin_for_find
params: (template)
visibility: private
ri/1.8/system/Rinda/TupleBag/delete_unless_alive-i.yaml000064400000000476150403657230016711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Delete tuples which dead tuples from the TupleBag, returning the deleted tuples.
full_name: Rinda::TupleBag#delete_unless_alive
is_singleton: false
name: delete_unless_alive
params: ()
visibility: public
ri/1.8/system/Rinda/TupleBag/delete-i.yaml000064400000000402150403657230014125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes <tt>tuple</tt> from the TupleBag.
full_name: Rinda::TupleBag#delete
is_singleton: false
name: delete
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TupleBag/find_all-i.yaml000064400000000423150403657230014436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finds all live tuples that match <tt>template</tt>.
full_name: Rinda::TupleBag#find_all
is_singleton: false
name: find_all
params: (template)
visibility: public
ri/1.8/system/Rinda/TupleBag/bin_key-i.yaml000064400000000267150403657230014314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::TupleBag#bin_key
is_singleton: false
name: bin_key
params: (tuple)
visibility: private
ri/1.8/system/Rinda/TupleBag/push-i.yaml000064400000000370150403657230013646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add <tt>tuple</tt> to the TupleBag.
full_name: Rinda::TupleBag#push
is_singleton: false
name: push
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TupleBag/find_all_template-i.yaml000064400000000524150403657230016333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finds all tuples in the TupleBag which when treated as templates, match <tt>tuple</tt> and are alive.
full_name: Rinda::TupleBag#find_all_template
is_singleton: false
name: find_all_template
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TupleBag/cdesc-TupleBag.yaml000064400000001504150403657230015223 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: TupleBag is an unordered collection of tuples. It is the basis of Tuplespace.
constants: []

full_name: Rinda::TupleBag
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: bin_for_find
- !ruby/object:RI::MethodSummary 
  name: bin_key
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete_unless_alive
- !ruby/object:RI::MethodSummary 
  name: each_entry
- !ruby/object:RI::MethodSummary 
  name: find
- !ruby/object:RI::MethodSummary 
  name: find_all
- !ruby/object:RI::MethodSummary 
  name: find_all_template
- !ruby/object:RI::MethodSummary 
  name: has_expires?
- !ruby/object:RI::MethodSummary 
  name: push
name: TupleBag
superclass: Object
ri/1.8/system/Rinda/TupleBag/TupleBin/find-i.yaml000064400000000306150403657240015331 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (x)
comment: 
full_name: Rinda::TupleBag::TupleBin#find
is_singleton: false
name: find
params: (&blk) {|x| ...}
visibility: public
ri/1.8/system/Rinda/TupleBag/TupleBin/delete-i.yaml000064400000000276150403657240015661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::TupleBag::TupleBin#delete
is_singleton: false
name: delete
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TupleBag/TupleBin/add-i.yaml000064400000000270150403657240015141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::TupleBag::TupleBin#add
is_singleton: false
name: add
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TupleBag/TupleBin/new-c.yaml000064400000000263150403657240015176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::TupleBag::TupleBin::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/Rinda/TupleBag/TupleBin/cdesc-TupleBin.yaml000064400000000604150403657240016765 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: Rinda::TupleBag::TupleBin
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: find
name: TupleBin
superclass: Object
ri/1.8/system/Rinda/TupleBag/has_expires%3f-i.yaml000064400000000443150403657240015501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>true</tt> if the TupleBag to see if it has any expired entries.
full_name: Rinda::TupleBag#has_expires?
is_singleton: false
name: has_expires?
params: ()
visibility: public
ri/1.8/system/Rinda/TupleSpace/move-i.yaml000064400000000447150403657240014205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (template)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Moves <tt>tuple</tt> to <tt>port</tt>.
full_name: Rinda::TupleSpace#move
is_singleton: false
name: move
params: (port, tuple, sec=nil) {|template| ...}
visibility: public
ri/1.8/system/Rinda/TupleSpace/read-i.yaml000064400000000450150403657240014144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (template)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reads <tt>tuple</tt>, but does not remove it.
full_name: Rinda::TupleSpace#read
is_singleton: false
name: read
params: (tuple, sec=nil) {|template| ...}
visibility: public
ri/1.8/system/Rinda/TupleSpace/read_all-i.yaml000064400000000454150403657240015000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns all tuples matching <tt>tuple</tt>. Does not remove the found tuples.
full_name: Rinda::TupleSpace#read_all
is_singleton: false
name: read_all
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TupleSpace/notify_event-i.yaml000064400000000511150403657240015740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Notifies all registered listeners for <tt>event</tt> of a status change of <tt>tuple</tt>.
full_name: Rinda::TupleSpace#notify_event
is_singleton: false
name: notify_event
params: (event, tuple)
visibility: private
ri/1.8/system/Rinda/TupleSpace/take-i.yaml000064400000000376150403657240014164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes <tt>tuple</tt>
full_name: Rinda::TupleSpace#take
is_singleton: false
name: take
params: (tuple, sec=nil, &block)
visibility: public
ri/1.8/system/Rinda/TupleSpace/new-c.yaml000064400000001005150403657240014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new TupleSpace. <tt>period</tt> is used to control how often to look for dead tuples after modifications to the TupleSpace.
- !ruby/struct:SM::Flow::P 
  body: If no dead tuples are found <tt>period</tt> seconds after the last modification, the TupleSpace will stop looking for dead tuples.
full_name: Rinda::TupleSpace::new
is_singleton: true
name: new
params: (period=60)
visibility: public
ri/1.8/system/Rinda/TupleSpace/notify-i.yaml000064400000001636150403657240014550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Registers for notifications of <tt>event</tt>. Returns a NotifyTemplateEntry. See NotifyTemplateEntry for examples of how to listen for notifications.
- !ruby/struct:SM::Flow::P 
  body: "<tt>event</tt> can be:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "'write':"
    body: A tuple was added
  - !ruby/struct:SM::Flow::LI 
    label: "'take':"
    body: A tuple was taken or moved
  - !ruby/struct:SM::Flow::LI 
    label: "'delete':"
    body: A tuple was lost after being overwritten or expiring
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: The TupleSpace will also notify you of the 'close' event when the NotifyTemplateEntry has expired.
full_name: Rinda::TupleSpace#notify
is_singleton: false
name: notify
params: (event, tuple, sec=nil)
visibility: public
ri/1.8/system/Rinda/TupleSpace/write-i.yaml000064400000000365150403657240014370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds <tt>tuple</tt>
full_name: Rinda::TupleSpace#write
is_singleton: false
name: write
params: (tuple, sec=nil)
visibility: public
ri/1.8/system/Rinda/TupleSpace/cdesc-TupleSpace.yaml000064400000002301150403657240016124 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: The Tuplespace manages access to the tuples it contains, ensuring mutual exclusion requirements are met.
- !ruby/struct:SM::Flow::P 
  body: The <tt>sec</tt> option for the write, take, move, read and notify methods may either be a number of seconds or a Renewer object.
constants: []

full_name: Rinda::TupleSpace
includes: 
- !ruby/object:RI::IncludedModule 
  name: DRbUndumped
- !ruby/object:RI::IncludedModule 
  name: MonitorMixin
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_entry
- !ruby/object:RI::MethodSummary 
  name: keep_clean
- !ruby/object:RI::MethodSummary 
  name: move
- !ruby/object:RI::MethodSummary 
  name: need_keeper?
- !ruby/object:RI::MethodSummary 
  name: notify
- !ruby/object:RI::MethodSummary 
  name: notify_event
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: read_all
- !ruby/object:RI::MethodSummary 
  name: start_keeper
- !ruby/object:RI::MethodSummary 
  name: take
- !ruby/object:RI::MethodSummary 
  name: write
name: TupleSpace
superclass: Object
ri/1.8/system/Rinda/TupleSpace/keep_clean-i.yaml000064400000000363150403657240015322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes dead tuples.
full_name: Rinda::TupleSpace#keep_clean
is_singleton: false
name: keep_clean
params: ()
visibility: private
ri/1.8/system/Rinda/TupleSpace/create_entry-i.yaml000064400000000310150403657240015710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::TupleSpace#create_entry
is_singleton: false
name: create_entry
params: (tuple, sec)
visibility: private
ri/1.8/system/Rinda/TupleSpace/need_keeper%3f-i.yaml000064400000000425150403657240015777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Checks the tuplespace to see if it needs cleaning.
full_name: Rinda::TupleSpace#need_keeper?
is_singleton: false
name: need_keeper?
params: ()
visibility: private
ri/1.8/system/Rinda/TupleSpace/start_keeper-i.yaml000064400000000441150403657240015721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a thread that scans the tuplespace for expired tuples.
full_name: Rinda::TupleSpace#start_keeper
is_singleton: false
name: start_keeper
params: ()
visibility: private
ri/1.8/system/Rinda/RingServer/cdesc-RingServer.yaml000064400000002170150403657240016172 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A RingServer allows a Rinda::TupleSpace to be located via UDP broadcasts. Service location uses the following steps:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: A RingServer begins listening on the broadcast UDP address.
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: A RingFinger sends a UDP packet containing the DRb URI where it will listen for a reply.
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: The RingServer receives the UDP packet and connects back to the provided DRb URI with the DRb service.
  type: :NUMBER
constants: []

full_name: Rinda::RingServer
includes: 
- !ruby/object:RI::IncludedModule 
  name: DRbUndumped
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: do_reply
- !ruby/object:RI::MethodSummary 
  name: do_write
- !ruby/object:RI::MethodSummary 
  name: reply_service
- !ruby/object:RI::MethodSummary 
  name: write_service
name: RingServer
superclass: Object
ri/1.8/system/Rinda/RingServer/new-c.yaml000064400000000447150403657240014043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Advertises <tt>ts</tt> on the UDP broadcast address at <tt>port</tt>.
full_name: Rinda::RingServer::new
is_singleton: true
name: new
params: (ts, port=Ring_PORT)
visibility: public
ri/1.8/system/Rinda/RingServer/do_write-i.yaml000064400000000551150403657240015070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extracts the response URI from <tt>msg</tt> and adds it to TupleSpace where it will be picked up by <tt>reply_service</tt> for notification.
full_name: Rinda::RingServer#do_write
is_singleton: false
name: do_write
params: (msg)
visibility: public
ri/1.8/system/Rinda/RingServer/write_service-i.yaml000064400000000470150403657240016126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a thread that picks up UDP packets and passes them to do_write for decoding.
full_name: Rinda::RingServer#write_service
is_singleton: false
name: write_service
params: ()
visibility: public
ri/1.8/system/Rinda/RingServer/reply_service-i.yaml000064400000000447150403657240016133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a thread that notifies waiting clients from the TupleSpace.
full_name: Rinda::RingServer#reply_service
is_singleton: false
name: reply_service
params: ()
visibility: public
ri/1.8/system/Rinda/RingServer/do_reply-i.yaml000064400000000503150403657240015066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pulls lookup tuples out of the TupleSpace and sends their DRb object the address of the local TupleSpace.
full_name: Rinda::RingServer#do_reply
is_singleton: false
name: do_reply
params: ()
visibility: public
ri/1.8/system/Rinda/InvalidHashTupleKey/cdesc-InvalidHashTupleKey.yaml000064400000000465150403657240021555 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raised when a hash-based tuple has an invalid key.
constants: []

full_name: Rinda::InvalidHashTupleKey
includes: []

instance_methods: []

name: InvalidHashTupleKey
superclass: RindaError
ri/1.8/system/Rinda/RequestExpiredError/cdesc-RequestExpiredError.yaml000064400000000457150403657240021772 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raised when trying to use an expired tuple.
constants: []

full_name: Rinda::RequestExpiredError
includes: []

instance_methods: []

name: RequestExpiredError
superclass: ThreadError
ri/1.8/system/Rinda/TupleSpaceProxy/read-i.yaml000064400000000463150403657240015212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reads <tt>tuple</tt> from the proxied TupleSpace. See TupleSpace#read.
full_name: Rinda::TupleSpaceProxy#read
is_singleton: false
name: read
params: (tuple, sec=nil, &block)
visibility: public
ri/1.8/system/Rinda/TupleSpaceProxy/read_all-i.yaml000064400000000502150403657250016035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reads all tuples matching <tt>tuple</tt> from the proxied TupleSpace. See TupleSpace#read_all.
full_name: Rinda::TupleSpaceProxy#read_all
is_singleton: false
name: read_all
params: (tuple)
visibility: public
ri/1.8/system/Rinda/TupleSpaceProxy/cdesc-TupleSpaceProxy.yaml000064400000001117150403657250020235 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: TupleSpaceProxy allows a remote Tuplespace to appear as local.
constants: []

full_name: Rinda::TupleSpaceProxy
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: notify
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: read_all
- !ruby/object:RI::MethodSummary 
  name: take
- !ruby/object:RI::MethodSummary 
  name: write
name: TupleSpaceProxy
superclass: Object
ri/1.8/system/Rinda/TupleSpaceProxy/take-i.yaml000064400000000463150403657250015224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Takes <tt>tuple</tt> from the proxied TupleSpace. See TupleSpace#take.
full_name: Rinda::TupleSpaceProxy#take
is_singleton: false
name: take
params: (tuple, sec=nil, &block)
visibility: public
ri/1.8/system/Rinda/TupleSpaceProxy/new-c.yaml000064400000000411150403657250015054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new TupleSpaceProxy to wrap <tt>ts</tt>.
full_name: Rinda::TupleSpaceProxy::new
is_singleton: true
name: new
params: (ts)
visibility: public
ri/1.8/system/Rinda/TupleSpaceProxy/notify-i.yaml000064400000000516150403657260015610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Registers for notifications of event <tt>ev</tt> on the proxied TupleSpace. See TupleSpace#notify
full_name: Rinda::TupleSpaceProxy#notify
is_singleton: false
name: notify
params: (ev, tuple, sec=nil)
visibility: public
ri/1.8/system/Rinda/TupleSpaceProxy/write-i.yaml000064400000000453150403657260015432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds <tt>tuple</tt> to the proxied TupleSpace. See TupleSpace#write.
full_name: Rinda::TupleSpaceProxy#write
is_singleton: false
name: write
params: (tuple, sec=nil)
visibility: public
ri/1.8/system/Rinda/DRbObjectTemplate/new-c.yaml000064400000000475150403657260015252 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new DRbObjectTemplate that will match against <tt>uri</tt> and <tt>ref</tt>.
full_name: Rinda::DRbObjectTemplate::new
is_singleton: true
name: new
params: (uri=nil, ref=nil)
visibility: public
ri/1.8/system/Rinda/DRbObjectTemplate/%3d%3d%3d-i.yaml000064400000000536150403657260015630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This DRbObjectTemplate matches <tt>ro</tt> if the remote object's drburi and drbref are the same. <tt>nil</tt> is used as a wildcard.
full_name: Rinda::DRbObjectTemplate#===
is_singleton: false
name: ===
params: (ro)
visibility: public
ri/1.8/system/Rinda/DRbObjectTemplate/cdesc-DRbObjectTemplate.yaml000064400000000550150403657270020605 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: <em>Documentation?</em>
constants: []

full_name: Rinda::DRbObjectTemplate
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ===
name: DRbObjectTemplate
superclass: Object
ri/1.8/system/Rinda/NotifyTemplateEntry/each-i.yaml000064400000000473150403657270016062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: event, tuple
comment: 
- !ruby/struct:SM::Flow::P 
  body: Yields event/tuple pairs until this NotifyTemplateEntry expires.
full_name: Rinda::NotifyTemplateEntry#each
is_singleton: false
name: each
params: ( {|event, tuple| ...}
visibility: public
ri/1.8/system/Rinda/NotifyTemplateEntry/pop-i.yaml000064400000000464150403657270015760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Retrieves a notification. Raises RequestExpiredError when this NotifyTemplateEntry expires.
full_name: Rinda::NotifyTemplateEntry#pop
is_singleton: false
name: pop
params: ()
visibility: public
ri/1.8/system/Rinda/NotifyTemplateEntry/new-c.yaml000064400000000536150403657270015745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new NotifyTemplateEntry that watches <tt>place</tt> for +event+s that match <tt>tuple</tt>.
full_name: Rinda::NotifyTemplateEntry::new
is_singleton: true
name: new
params: (place, event, tuple, expires=nil)
visibility: public
ri/1.8/system/Rinda/NotifyTemplateEntry/notify-i.yaml000064400000000450150403657270016465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Called by TupleSpace to notify this NotifyTemplateEntry of a new event.
full_name: Rinda::NotifyTemplateEntry#notify
is_singleton: false
name: notify
params: (ev)
visibility: public
ri/1.8/system/Rinda/NotifyTemplateEntry/cdesc-NotifyTemplateEntry.yaml000064400000002156150403657300021773 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: See TupleSpace#notify_event for valid notification types.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  ts = Rinda::TupleSpace.new\n  observer = ts.notify 'write', [nil]\n\n  Thread.start do\n    observer.each { |t| p t }\n  end\n\n  3.times { |i| ts.write [i] }\n"
- !ruby/struct:SM::Flow::P 
  body: "Outputs:"
- !ruby/struct:SM::Flow::VERB 
  body: "  ['write', [0]]\n  ['write', [1]]\n  ['write', [2]]\n"
constants: []

full_name: Rinda::NotifyTemplateEntry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: notify
- !ruby/object:RI::MethodSummary 
  name: pop
name: NotifyTemplateEntry
superclass: TemplateEntry
ri/1.8/system/Rinda/Tuple/init_with_ary-i.yaml000064400000000412150403657300015121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Munges <tt>ary</tt> into a valid Tuple.
full_name: Rinda::Tuple#init_with_ary
is_singleton: false
name: init_with_ary
params: (ary)
visibility: private
ri/1.8/system/Rinda/Tuple/size-i.yaml000064400000000361150403657310013226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The number of elements in the tuple.
full_name: Rinda::Tuple#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Rinda/Tuple/%5b%5d-i.yaml000064400000000366150403657310013132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Accessor method for elements of the tuple.
full_name: Rinda::Tuple#[]
is_singleton: false
name: "[]"
params: (k)
visibility: public
ri/1.8/system/Rinda/Tuple/cdesc-Tuple.yaml000064400000001450150403657320014177 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: Rinda::Tuple
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: hash?
- !ruby/object:RI::MethodSummary 
  name: init_with_ary
- !ruby/object:RI::MethodSummary 
  name: init_with_hash
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: value
name: Tuple
superclass: Object
ri/1.8/system/Rinda/Tuple/each-i.yaml000064400000000532150403657320013155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (k, v)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterate through the tuple, yielding the index or key, and the value, thus ensuring arrays are iterated similarly to hashes.
full_name: Rinda::Tuple#each
is_singleton: false
name: each
params: ( {|k, v| ...}
visibility: public
ri/1.8/system/Rinda/Tuple/hash%3f-i.yaml000064400000000266150403657320013502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Rinda::Tuple#hash?
is_singleton: false
name: hash?
params: (ary_or_hash)
visibility: private
ri/1.8/system/Rinda/Tuple/init_with_hash-i.yaml000064400000000415150403657320015256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Ensures <tt>hash</tt> is a valid Tuple.
full_name: Rinda::Tuple#init_with_hash
is_singleton: false
name: init_with_hash
params: (hash)
visibility: private
ri/1.8/system/Rinda/Tuple/new-c.yaml000064400000000443150403657320013041 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new Tuple from <tt>ary_or_hash</tt> which must be an Array or Hash.
full_name: Rinda::Tuple::new
is_singleton: true
name: new
params: (ary_or_hash)
visibility: public
ri/1.8/system/Rinda/Tuple/value-i.yaml000064400000000346150403657330013375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the tuple itself
full_name: Rinda::Tuple#value
is_singleton: false
name: value
params: ()
visibility: public
ri/1.8/system/Rinda/Tuple/fetch-i.yaml000064400000000367150403657330013355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fetches item <tt>k</tt> from the tuple.
full_name: Rinda::Tuple#fetch
is_singleton: false
name: fetch
params: (k)
visibility: public
ri/1.8/system/ParseDate/parsedate-i.yaml000064400000002006150403657330013746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Parse a string representation of a date into values. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'parsedate'\n\n  ParseDate.parsedate &quot;Tuesday, July 5th, 2007, 18:35:20 UTC&quot;\n  # =&gt; [2007, 7, 5, 18, 35, 20, &quot;UTC&quot;, 2]\n"
- !ruby/struct:SM::Flow::P 
  body: The order is of the form [year, month, day of month, hour, minute, second, timezone, day of week].
- !ruby/struct:SM::Flow::P 
  body: "ParseDate.parsedate can also take a second argument, <tt>comp</tt>, which is a boolean telling the method to compensate for dates with years expressed as two digits. Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'parsedate'\n\n  ParseDate.parsedate &quot;Mon Dec 25 00 06:53:24 UTC&quot;, true\n  # =&gt; [2000, 12, 25, 6, 53, 24, &quot;UTC&quot;, 1]\n"
full_name: ParseDate#parsedate
is_singleton: false
name: parsedate
params: (str, comp=false)
visibility: public
ri/1.8/system/ParseDate/cdesc-ParseDate.yaml000064400000000352150403657330014501 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ParseDate
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parsedate
name: ParseDate
superclass: 
ri/1.8/system/Singleton/dup-i.yaml000064400000000243150403657330012661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Singleton#dup
is_singleton: false
name: dup
params: ()
visibility: public
ri/1.8/system/Singleton/cdesc-Singleton.yaml000064400000006256150403657340014677 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Singleton module implements the Singleton pattern.
- !ruby/struct:SM::Flow::P 
  body: "Usage:"
- !ruby/struct:SM::Flow::VERB 
  body: "   class Klass\n      include Singleton\n      # ...\n   end\n"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: this ensures that only one instance of Klass lets call it ``the instance'' can be created.
  - !ruby/struct:SM::Flow::P 
    body: "a,b = Klass.instance, Klass.instance a == b # =&gt; true a.new # NoMethodError - new is private ..."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ``The instance'' is created at instantiation time, in other words the first call of Klass.instance(), thus
  - !ruby/struct:SM::Flow::VERB 
    body: "  class OtherKlass\n    include Singleton\n    # ...\n  end\n  ObjectSpace.each_object(OtherKlass){} # =&gt; 0.\n"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: This behavior is preserved under inheritance and cloning.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: This is achieved by marking
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Klass.new and Klass.allocate - as private
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Providing (or modifying) the class methods
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Klass.inherited(sub_klass) and Klass.clone() - to ensure that the Singleton pattern is properly inherited and cloned.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Klass.instance() - returning ``the instance''. After a successful self modifying (normally the first) call the method body is a simple:"
  - !ruby/struct:SM::Flow::VERB 
    body: "   def Klass.instance()\n     return @<em>instance</em>\n   end\n"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Klass._load(str) - calling Klass.instance()
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Klass._instantiate?() - returning ``the instance'' or nil. This hook method puts a second (or nth) thread calling Klass.instance() on a waiting loop. The return value signifies the successful completion or premature termination of the first, or more generally, current &quot;instantiation thread&quot;.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: The instance method of Singleton are
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: clone and dup - raising TypeErrors to prevent cloning or duping
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: _dump(depth) - returning the empty string. Marshalling strips by default all state information, e.g. instance variables and taint state, from ``the instance''. Providing custom _load(str) and _dump(depth) hooks allows the (partially) resurrections of a previous state of ``the instance''.
  type: :BULLET
constants: []

full_name: Singleton
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: _dump
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: dup
name: Singleton
superclass: 
ri/1.8/system/Singleton/clone-i.yaml000064400000000354150403657340013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: disable build-in copying methods
full_name: Singleton#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/Singleton/_dump-i.yaml000064400000000360150403657340013176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: default marshalling strategy
full_name: Singleton#_dump
is_singleton: false
name: _dump
params: (depth=-1)
visibility: public
ri/1.8/system/DateTime/jd-c.yaml000064400000001673150403657340012223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object corresponding to the specified Julian Day Number <tt>jd</tt> and hour <tt>h</tt>, minute <tt>min</tt>, second <tt>s</tt>.
- !ruby/struct:SM::Flow::P 
  body: The 24-hour clock is used. Negative values of <tt>h</tt>, <tt>min</tt>, and <tt>sec</tt> are treating as counting backwards from the end of the next larger unit (e.g. a <tt>min</tt> of -2 is treated as 58). No wraparound is performed. If an invalid time portion is specified, an ArgumentError is raised.
- !ruby/struct:SM::Flow::P 
  body: <tt>of</tt> is the offset from UTC as a fraction of a day (defaults to 0). <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: All day/time values default to 0.
full_name: DateTime::jd
is_singleton: true
name: jd
params: (jd=0, h=0, min=0, s=0, of=0, sg=ITALY)
visibility: public
ri/1.8/system/DateTime/civil-c.yaml000064400000002034150403657340012724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object corresponding to the specified Civil Date and hour <tt>h</tt>, minute <tt>min</tt>, second <tt>s</tt>.
- !ruby/struct:SM::Flow::P 
  body: The 24-hour clock is used. Negative values of <tt>h</tt>, <tt>min</tt>, and <tt>sec</tt> are treating as counting backwards from the end of the next larger unit (e.g. a <tt>min</tt> of -2 is treated as 58). No wraparound is performed. If an invalid time portion is specified, an ArgumentError is raised.
- !ruby/struct:SM::Flow::P 
  body: <tt>of</tt> is the offset from UTC as a fraction of a day (defaults to 0). <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt> defaults to -4712, <tt>m</tt> to 1, and <tt>d</tt> to 1; this is Julian Day Number day 0. The time values default to 0.
full_name: DateTime::civil
is_singleton: true
name: civil
params: (y=-4712, m=1, d=1, h=0, min=0, s=0, of=0, sg=ITALY)
visibility: public
ri/1.8/system/DateTime/parse-c.yaml000064400000001700150403657340012727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object by parsing from a String, without specifying the format.
- !ruby/struct:SM::Flow::P 
  body: "<tt>str</tt> is a String holding a date-time representation. <tt>comp</tt> specifies whether to interpret 2-digit years as 19XX (&gt;= 69) or 20XX (&lt; 69); the default is not to. The method will attempt to parse a date-time from the String using various heuristics; see #_parse in date/format.rb for more details. If parsing fails, an ArgumentError will be raised."
- !ruby/struct:SM::Flow::P 
  body: The default <tt>str</tt> is '-4712-01-01T00:00:00+00:00'; this is Julian Day Number day 0.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: DateTime::parse
is_singleton: true
name: parse
params: (str='-4712-01-01T00:00:00+00:00', comp=false, sg=ITALY)
visibility: public
ri/1.8/system/DateTime/_strptime-c.yaml000064400000000300150403657340013616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DateTime::_strptime
is_singleton: true
name: _strptime
params: (str, fmt='%FT%T%z')
visibility: public
ri/1.8/system/DateTime/strftime-i.yaml000064400000000272150403657340013463 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DateTime#strftime
is_singleton: false
name: strftime
params: (fmt='%FT%T%:z')
visibility: public
ri/1.8/system/DateTime/strptime-c.yaml000064400000001640150403657340013467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object by parsing from a String according to a specified format.
- !ruby/struct:SM::Flow::P 
  body: <tt>str</tt> is a String holding a date-time representation. <tt>fmt</tt> is the format that the date-time is in. See date/format.rb for details on supported formats.
- !ruby/struct:SM::Flow::P 
  body: The default <tt>str</tt> is '-4712-01-01T00:00:00+00:00', and the default <tt>fmt</tt> is '%FT%T%z'. This gives midnight on Julian Day Number day 0.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: An ArgumentError will be raised if <tt>str</tt> cannot be parsed.
full_name: DateTime::strptime
is_singleton: true
name: strptime
params: (str='-4712-01-01T00:00:00+00:00', fmt='%FT%T%z', sg=ITALY)
visibility: public
ri/1.8/system/DateTime/to_s-i.yaml000064400000000354150403657350012574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ":minute, :second, :second_fraction"
full_name: DateTime#to_s
is_singleton: false
name: to_s
params: (
visibility: public
ri/1.8/system/DateTime/commercial-c.yaml000064400000002123150403657350013731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object corresponding to the specified Commercial Date and hour <tt>h</tt>, minute <tt>min</tt>, second <tt>s</tt>.
- !ruby/struct:SM::Flow::P 
  body: The 24-hour clock is used. Negative values of <tt>h</tt>, <tt>min</tt>, and <tt>sec</tt> are treating as counting backwards from the end of the next larger unit (e.g. a <tt>min</tt> of -2 is treated as 58). No wraparound is performed. If an invalid time portion is specified, an ArgumentError is raised.
- !ruby/struct:SM::Flow::P 
  body: <tt>of</tt> is the offset from UTC as a fraction of a day (defaults to 0). <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt> defaults to 1582, <tt>w</tt> to 41, and <tt>d</tt> to 5; this is the Day of Calendar Reform for Italy and the Catholic countries. The time values default to 0.
full_name: DateTime::commercial
is_singleton: true
name: commercial
params: (y=1582, w=41, d=5, h=0, min=0, s=0, of=0, sg=ITALY)
visibility: public
ri/1.8/system/DateTime/cdesc-DateTime.yaml000064400000004767150403657350014171 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: _strptime
- !ruby/object:RI::MethodSummary 
  name: civil
- !ruby/object:RI::MethodSummary 
  name: commercial
- !ruby/object:RI::MethodSummary 
  name: jd
- !ruby/object:RI::MethodSummary 
  name: ordinal
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: strptime
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class representing a date and time.
- !ruby/struct:SM::Flow::P 
  body: See the documentation to the file date.rb for an overview.
- !ruby/struct:SM::Flow::P 
  body: DateTime objects are immutable once created.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Other methods.
- !ruby/struct:SM::Flow::P 
  body: The following methods are defined in Date, but declared private there. They are made public in DateTime. They are documented here.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: hour()
- !ruby/struct:SM::Flow::P 
  body: Get the hour-of-the-day of the time. This is given using the 24-hour clock, counting from midnight. The first hour after midnight is hour 0; the last hour of the day is hour 23.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: min()
- !ruby/struct:SM::Flow::P 
  body: Get the minute-of-the-hour of the time.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: sec()
- !ruby/struct:SM::Flow::P 
  body: Get the second-of-the-minute of the time.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: sec_fraction()
- !ruby/struct:SM::Flow::P 
  body: Get the fraction of a second of the time. This is returned as a <tt>Rational</tt>. The unit is in days. I do NOT recommend you to use this method.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: zone()
- !ruby/struct:SM::Flow::P 
  body: Get the time zone as a String. This is representation of the time offset such as &quot;+1000&quot;, not the true time-zone name.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: offset()
- !ruby/struct:SM::Flow::P 
  body: Get the time zone offset as a fraction of a day. This is returned as a <tt>Rational</tt>.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: new_offset(of=0)
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object, identical to the current one, except with a new time zone offset of <tt>of</tt>. <tt>of</tt> is the new offset from UTC as a fraction of a day.
constants: []

full_name: DateTime
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: strftime
- !ruby/object:RI::MethodSummary 
  name: to_s
name: DateTime
superclass: Date
ri/1.8/system/DateTime/ordinal-c.yaml000064400000002014150403657350013245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object corresponding to the specified Ordinal Date and hour <tt>h</tt>, minute <tt>min</tt>, second <tt>s</tt>.
- !ruby/struct:SM::Flow::P 
  body: The 24-hour clock is used. Negative values of <tt>h</tt>, <tt>min</tt>, and <tt>sec</tt> are treating as counting backwards from the end of the next larger unit (e.g. a <tt>min</tt> of -2 is treated as 58). No wraparound is performed. If an invalid time portion is specified, an ArgumentError is raised.
- !ruby/struct:SM::Flow::P 
  body: <tt>of</tt> is the offset from UTC as a fraction of a day (defaults to 0). <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt> defaults to -4712, and <tt>d</tt> to 1; this is Julian Day Number day 0. The time values default to 0.
full_name: DateTime::ordinal
is_singleton: true
name: ordinal
params: (y=-4712, d=1, h=0, min=0, s=0, of=0, sg=ITALY)
visibility: public
ri/1.8/system/List/update-i.yaml000064400000001365150403657350012334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds <tt>sw</tt> according to <tt>sopts</tt>, <tt>lopts</tt> and <tt>nlopts</tt>.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+sw+:"
    body: OptionParser::Switch instance to be added.
  - !ruby/struct:SM::Flow::LI 
    label: "+sopts+:"
    body: Short style option list.
  - !ruby/struct:SM::Flow::LI 
    label: "+lopts+:"
    body: Long style option list.
  - !ruby/struct:SM::Flow::LI 
    label: "+nlopts+:"
    body: Negated long style options list.
  type: :NOTE
full_name: List#update
is_singleton: false
name: update
params: (sw, sopts, lopts, nsw = nil, nlopts = nil)
visibility: private
ri/1.8/system/List/each_option-i.yaml000064400000000435150403657360013340 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over each option, passing the option to the <tt>block</tt>.
full_name: List#each_option
is_singleton: false
name: each_option
params: (&block)
visibility: public
ri/1.8/system/List/cdesc-List.yaml000064400000003027150403657360012614 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Map from acceptable argument types to pattern and converter pairs.
  name: atype
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: List of all switches and summary string.
  name: list
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Map from long style option switches to actual switch objects.
  name: long
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Map from short style option switches to actual switch objects.
  name: short
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: List
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept
- !ruby/object:RI::MethodSummary 
  name: append
- !ruby/object:RI::MethodSummary 
  name: complete
- !ruby/object:RI::MethodSummary 
  name: each_option
- !ruby/object:RI::MethodSummary 
  name: prepend
- !ruby/object:RI::MethodSummary 
  name: reject
- !ruby/object:RI::MethodSummary 
  name: search
- !ruby/object:RI::MethodSummary 
  name: summarize
- !ruby/object:RI::MethodSummary 
  name: update
name: List
superclass: Object
ri/1.8/system/List/new-c.yaml000064400000000353150403657360011632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Just initializes all instance variables.
full_name: List::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/List/append-i.yaml000064400000001611150403657360012314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Appends <tt>switch</tt> at the tail of the list, and associates short, long and negated long options. Arguments are:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+switch+:"
    body: OptionParser::Switch instance to be inserted.
  - !ruby/struct:SM::Flow::LI 
    label: "+short_opts+:"
    body: List of short style options.
  - !ruby/struct:SM::Flow::LI 
    label: "+long_opts+:"
    body: List of long style options.
  - !ruby/struct:SM::Flow::LI 
    label: "+nolong_opts+:"
    body: List of long style options with &quot;no-&quot; prefix.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: "  append(switch, short_opts, long_opts, nolong_opts)\n"
full_name: List#append
is_singleton: false
name: append
params: (*args)
visibility: public
ri/1.8/system/List/reject-i.yaml000064400000000342150403657370012322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See OptionParser.reject.
full_name: List#reject
is_singleton: false
name: reject
params: (t)
visibility: public
ri/1.8/system/List/accept-i.yaml000064400000000370150403657370012306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See OptionParser.accept.
full_name: List#accept
is_singleton: false
name: accept
params: (t, pat = /.*/nm, &block)
visibility: public
ri/1.8/system/List/search-i.yaml000064400000000546150403657400012313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (val)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Searches <tt>key</tt> in <tt>id</tt> list. The result is returned or yielded if a block is given. If it isn't found, nil is returned.
full_name: List#search
is_singleton: false
name: search
params: (id, key) {|val| ...}
visibility: public
ri/1.8/system/List/complete-i.yaml000064400000000750150403657400012653 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Searches list <tt>id</tt> for <tt>opt</tt> and the optional patterns for completion <tt>pat</tt>. If <tt>icase</tt> 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.
full_name: List#complete
is_singleton: false
name: complete
params: (id, opt, icase = false, *pat, &block)
visibility: public
ri/1.8/system/List/summarize-i.yaml000064400000000627150403657400013062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates the summary table, passing each line to the <tt>block</tt> (without newline). The arguments <tt>args</tt> are passed along to the summarize method which is called on every option.
full_name: List#summarize
is_singleton: false
name: summarize
params: (*args, &block)
visibility: public
ri/1.8/system/List/prepend-i.yaml000064400000001614150403657410012501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Inserts <tt>switch</tt> at the head of the list, and associates short, long and negated long options. Arguments are:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+switch+:"
    body: OptionParser::Switch instance to be inserted.
  - !ruby/struct:SM::Flow::LI 
    label: "+short_opts+:"
    body: List of short style options.
  - !ruby/struct:SM::Flow::LI 
    label: "+long_opts+:"
    body: List of long style options.
  - !ruby/struct:SM::Flow::LI 
    label: "+nolong_opts+:"
    body: List of long style options with &quot;no-&quot; prefix.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: "  prepend(switch, short_opts, long_opts, nolong_opts)\n"
full_name: List#prepend
is_singleton: false
name: prepend
params: (*args)
visibility: public
ri/1.8/system/GServer/serve-i.yaml000064400000000247150403657410012633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#serve
is_singleton: false
name: serve
params: (io)
visibility: public
ri/1.8/system/GServer/shutdown-i.yaml000064400000000253150403657410013357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#shutdown
is_singleton: false
name: shutdown
params: ()
visibility: public
ri/1.8/system/GServer/stopped%3f-i.yaml000064400000000253150403657410013460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#stopped?
is_singleton: false
name: stopped?
params: ()
visibility: public
ri/1.8/system/GServer/stop-i.yaml000064400000000243150403657420012471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#stop
is_singleton: false
name: stop
params: ()
visibility: public
ri/1.8/system/GServer/stop-c.yaml000064400000000274150403657420012467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer::stop
is_singleton: true
name: stop
params: (port, host = DEFAULT_HOST)
visibility: public
ri/1.8/system/GServer/starting-i.yaml000064400000000256150403657420013343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#starting
is_singleton: false
name: starting
params: ()
visibility: protected
ri/1.8/system/GServer/error-i.yaml000064400000000256150403657420012641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#error
is_singleton: false
name: error
params: (detail)
visibility: protected
ri/1.8/system/GServer/in_service%3f-c.yaml000064400000000312150403657430014120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer::in_service?
is_singleton: true
name: in_service?
params: (port, host = DEFAULT_HOST)
visibility: public
ri/1.8/system/GServer/disconnecting-i.yaml000064400000000302150403657430014330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#disconnecting
is_singleton: false
name: disconnecting
params: (clientPort)
visibility: protected
ri/1.8/system/GServer/log-i.yaml000064400000000247150403657430012272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#log
is_singleton: false
name: log
params: (msg)
visibility: protected
ri/1.8/system/GServer/new-c.yaml000064400000000376150403657430012277 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer::new
is_singleton: true
name: new
params: (port, host = DEFAULT_HOST, maxConnections = 4, stdlog = $stderr, audit = false, debug = false)
visibility: public
ri/1.8/system/GServer/start-i.yaml000064400000000270150403657440012643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#start
is_singleton: false
name: start
params: (maxConnections = -1)
visibility: public
ri/1.8/system/GServer/cdesc-GServer.yaml000064400000010176150403657440013722 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: audit
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: debug
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: host
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: maxConnections
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: port
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: stdlog
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: in_service?
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: stop
comment: 
- !ruby/struct:SM::Flow::P 
  body: GServer implements a generic server, featuring thread pool management, simple logging, and multi-server management. See HttpServer in <tt>xmlrpc/httpserver.rb</tt> in the Ruby standard library for an example of GServer in action.
- !ruby/struct:SM::Flow::P 
  body: Any kind of application-level server can be implemented using this class. It accepts multiple simultaneous connections from clients, up to an optional maximum number. Several <em>services</em> (i.e. one service per TCP port) can be run simultaneously, and stopped at any time through the class method <tt>GServer.stop(port)</tt>. All the threading issues are handled, saving you the effort. All events are optionally logged, but you can provide your own event handlers if you wish.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::P 
  body: "Using GServer is simple. Below we implement a simple time server, run it, query it, and shut it down. Try this code in <tt>irb</tt>:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'gserver'\n\n  #\n  # A server that returns the time in seconds since 1970.\n  #\n  class TimeServer &lt; GServer\n    def initialize(port=10001, *args)\n      super(port, *args)\n    end\n    def serve(io)\n      io.puts(Time.now.to_i)\n    end\n  end\n\n  # Run the server with logging enabled (it's a separate thread).\n  server = TimeServer.new\n  server.audit = true                  # Turn logging on.\n  server.start\n\n  # *** Now point your browser to http://localhost:10001 to see it working ***\n\n  # See if it's still running.\n  GServer.in_service?(10001)           # -&gt; true\n  server.stopped?                      # -&gt; false\n\n  # Shut the server down gracefully.\n  server.shutdown\n\n  # Alternatively, stop it immediately.\n  GServer.stop(10001)\n  # or, of course, &quot;server.stop&quot;.\n"
- !ruby/struct:SM::Flow::P 
  body: All the business of accepting connections and exception handling is taken care of. All we have to do is implement the method that actually serves the client.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Advanced
- !ruby/struct:SM::Flow::P 
  body: As the example above shows, the way to use GServer is to subclass it to create a specific server, overriding the <tt>serve</tt> method. You can override other methods as well if you wish, perhaps to collect statistics, or emit more detailed logging.
- !ruby/struct:SM::Flow::VERB 
  body: "  connecting\n  disconnecting\n  starting\n  stopping\n"
- !ruby/struct:SM::Flow::P 
  body: The above methods are only called if auditing is enabled.
- !ruby/struct:SM::Flow::P 
  body: You can also override <tt>log</tt> and <tt>error</tt> if, for example, you wish to use a more sophisticated logging system.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_HOST
  value: "\"127.0.0.1\""
full_name: GServer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: connecting
- !ruby/object:RI::MethodSummary 
  name: connections
- !ruby/object:RI::MethodSummary 
  name: disconnecting
- !ruby/object:RI::MethodSummary 
  name: error
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: log
- !ruby/object:RI::MethodSummary 
  name: serve
- !ruby/object:RI::MethodSummary 
  name: shutdown
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: starting
- !ruby/object:RI::MethodSummary 
  name: stop
- !ruby/object:RI::MethodSummary 
  name: stopped?
- !ruby/object:RI::MethodSummary 
  name: stopping
name: GServer
superclass: Object
ri/1.8/system/GServer/join-i.yaml000064400000000243150403657440012445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#join
is_singleton: false
name: join
params: ()
visibility: public
ri/1.8/system/GServer/connections-i.yaml000064400000000261150403657440014030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#connections
is_singleton: false
name: connections
params: ()
visibility: public
ri/1.8/system/GServer/connecting-i.yaml000064400000000270150403657450013636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#connecting
is_singleton: false
name: connecting
params: (client)
visibility: protected
ri/1.8/system/GServer/stopping-i.yaml000064400000000256150403657450013356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: GServer#stopping
is_singleton: false
name: stopping
params: ()
visibility: protected
ri/1.8/system/TemplatePage/Context/find_scalar-i.yaml000064400000000532150403657450016374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Find a scalar value, throwing an exception if not found. This method is used when substituting the %xxx% constructs
full_name: TemplatePage::Context#find_scalar
is_singleton: false
name: find_scalar
params: (key)
visibility: public
ri/1.8/system/TemplatePage/Context/pop-i.yaml000064400000000257150403657450014731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TemplatePage::Context#pop
is_singleton: false
name: pop
params: ()
visibility: public
ri/1.8/system/TemplatePage/Context/new-c.yaml000064400000000257150403657450014716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TemplatePage::Context::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/TemplatePage/Context/lookup-i.yaml000064400000000402150403657450015434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Lookup any key in the stack of hashes
full_name: TemplatePage::Context#lookup
is_singleton: false
name: lookup
params: (key)
visibility: public
ri/1.8/system/TemplatePage/Context/push-i.yaml000064400000000265150403657460015112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: TemplatePage::Context#push
is_singleton: false
name: push
params: (hash)
visibility: public
ri/1.8/system/TemplatePage/Context/cdesc-Context.yaml000064400000001257150403657460016412 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A context holds a stack of key/value pairs (like a symbol table). When asked to resolve a key, it first searches the top of the stack, then the next level, and so on until it finds a match (or runs out of entries)
constants: []

full_name: TemplatePage::Context
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find_scalar
- !ruby/object:RI::MethodSummary 
  name: lookup
- !ruby/object:RI::MethodSummary 
  name: pop
- !ruby/object:RI::MethodSummary 
  name: push
name: Context
superclass: Object
ri/1.8/system/TemplatePage/write_html_on-i.yaml000064400000000667150403657460015367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Render the templates into HTML, storing the result on <tt>op</tt> using the method <tt>&lt;&lt;</tt>. The <tt>value_hash</tt> contains key/value pairs used to drive the substitution (as described above)
full_name: TemplatePage#write_html_on
is_singleton: false
name: write_html_on
params: (op, value_hash)
visibility: public
ri/1.8/system/TemplatePage/new-c.yaml000064400000001340150403657460013265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>templates</tt> is an array of strings containing the templates. We start at the first, and substitute in subsequent ones where the string <tt>!INCLUDE!</tt> occurs. For example, we could have the overall page template containing
- !ruby/struct:SM::Flow::VERB 
  body: "  &lt;html&gt;&lt;body&gt;\n    &lt;h1&gt;Master&lt;/h1&gt;\n    !INCLUDE!\n  &lt;/bost&gt;&lt;/html&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: and substitute subpages in to it by passing [master, sub_page]. This gives us a cheap way of framing pages
full_name: TemplatePage::new
is_singleton: true
name: new
params: (*templates)
visibility: public
ri/1.8/system/TemplatePage/substitute_into-i.yaml000064400000001412150403657460015746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Substitute a set of key/value pairs into the given template. Keys with scalar values have them substituted directly into the page. Those with array values invoke <tt>substitute_array</tt> (below), which examples a block of the template once for each row in the array.
- !ruby/struct:SM::Flow::P 
  body: "This routine also copes with the <tt>IF:</tt><em>key</em> directive, removing chunks of the template if the corresponding key does not appear in the hash, and the START: directive, which loops its contents for each value in an array"
full_name: TemplatePage#substitute_into
is_singleton: false
name: substitute_into
params: (lines, values)
visibility: public
ri/1.8/system/TemplatePage/expand_line-i.yaml000064400000000515150403657470014774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Given an individual line, we look for %xxx% constructs and HREF:ref:name: constructs, substituting for each."
full_name: TemplatePage#expand_line
is_singleton: false
name: expand_line
params: (line)
visibility: public
ri/1.8/system/TemplatePage/LineReader/read-i.yaml000064400000000353150403657470015433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: read the next line
full_name: TemplatePage::LineReader#read
is_singleton: false
name: read
params: ()
visibility: public
ri/1.8/system/TemplatePage/LineReader/read_up_to-i.yaml000064400000000506150403657470016641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a list of lines up to the line that matches a pattern. That last line is discarded.
full_name: TemplatePage::LineReader#read_up_to
is_singleton: false
name: read_up_to
params: (pattern)
visibility: public
ri/1.8/system/TemplatePage/LineReader/dup-i.yaml000064400000000433150403657470015307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a copy of ourselves that can be modified without affecting us
full_name: TemplatePage::LineReader#dup
is_singleton: false
name: dup
params: ()
visibility: public
ri/1.8/system/TemplatePage/LineReader/new-c.yaml000064400000000404150403657470015300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: we're initialized with an array of lines
full_name: TemplatePage::LineReader::new
is_singleton: true
name: new
params: (lines)
visibility: public
ri/1.8/system/TemplatePage/LineReader/cdesc-LineReader.yaml000064400000000730150403657470017362 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Simple class to read lines out of a string
constants: []

full_name: TemplatePage::LineReader
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dup
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: read_up_to
name: LineReader
superclass: Object
ri/1.8/system/TemplatePage/cdesc-TemplatePage.yaml000064400000003524150403657500015704 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Cheap-n-cheerful HTML page template system. You create a template containing:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: variable names between percent signs (<tt>%fred%</tt>)
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "blocks of repeating stuff:"
  - !ruby/struct:SM::Flow::VERB 
    body: "  START:key\n    ... stuff\n  END:key\n"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: You feed the code a hash. For simple variables, the values are resolved directly from the hash. For blocks, the hash entry corresponding to <tt>key</tt> will be an array of hashes. The block will be generated once for each entry. Blocks can be nested arbitrarily deeply.
- !ruby/struct:SM::Flow::P 
  body: The template may also contain
- !ruby/struct:SM::Flow::VERB 
  body: "  IF:key\n    ... stuff\n  ENDIF:key\n"
- !ruby/struct:SM::Flow::P 
  body: <em>stuff</em> will only be included in the output if the corresponding key is set in the value hash.
- !ruby/struct:SM::Flow::P 
  body: "Usage: Given a set of templates <tt>T1, T2,</tt> etc"
- !ruby/struct:SM::Flow::VERB 
  body: "           values = { &quot;name&quot; =&gt; &quot;Dave&quot;, state =&gt; &quot;TX&quot; }\n\n           t = TemplatePage.new(T1, T2, T3)\n           File.open(name, &quot;w&quot;) {|f| t.write_html_on(f, values)}\n        or\n           res = ''\n           t.write_html_on(res, values)\n"
constants: []

full_name: TemplatePage
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: expand_line
- !ruby/object:RI::MethodSummary 
  name: substitute_into
- !ruby/object:RI::MethodSummary 
  name: write_html_on
name: TemplatePage
superclass: Object
ri/1.8/system/PrettyPrint/flush-i.yaml000064400000000344150403657500013555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: outputs buffered data.
full_name: PrettyPrint#flush
is_singleton: false
name: flush
params: ()
visibility: public
ri/1.8/system/PrettyPrint/singleline_format-c.yaml000064400000001164150403657500016130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: q
comment: 
- !ruby/struct:SM::Flow::P 
  body: This is similar to PrettyPrint::format but the result has no breaks.
- !ruby/struct:SM::Flow::P 
  body: <tt>maxwidth</tt>, <tt>newline</tt> and <tt>genspace</tt> are ignored.
- !ruby/struct:SM::Flow::P 
  body: The invocation of <tt>breakable</tt> in the block doesn't break a line and is treated as just an invocation of <tt>text</tt>.
full_name: PrettyPrint::singleline_format
is_singleton: true
name: singleline_format
params: (output='', maxwidth=nil, newline=nil, genspace=nil) {|q| ...}
visibility: public
ri/1.8/system/PrettyPrint/current_group-i.yaml000064400000000271150403657500015331 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint#current_group
is_singleton: false
name: current_group
params: ()
visibility: public
ri/1.8/system/PrettyPrint/Group/cdesc-Group.yaml000064400000001000150403657500015443 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: breakables
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: depth
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: PrettyPrint::Group
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: break
- !ruby/object:RI::MethodSummary 
  name: break?
- !ruby/object:RI::MethodSummary 
  name: first?
name: Group
superclass: Object
ri/1.8/system/PrettyPrint/Group/break%3f-i.yaml000064400000000262150403657500015111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Group#break?
is_singleton: false
name: break?
params: ()
visibility: public
ri/1.8/system/PrettyPrint/Group/new-c.yaml000064400000000261150403657500014311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Group::new
is_singleton: true
name: new
params: (depth)
visibility: public
ri/1.8/system/PrettyPrint/Group/break-i.yaml000064400000000260150403657510014612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Group#break
is_singleton: false
name: break
params: ()
visibility: public
ri/1.8/system/PrettyPrint/Group/first%3f-i.yaml000064400000000262150403657510015155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Group#first?
is_singleton: false
name: first?
params: ()
visibility: public
ri/1.8/system/PrettyPrint/break_outmost_groups-i.yaml000064400000000307150403657510016711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint#break_outmost_groups
is_singleton: false
name: break_outmost_groups
params: ()
visibility: public
ri/1.8/system/PrettyPrint/new-c.yaml000064400000002156150403657510013223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a buffer for pretty printing.
- !ruby/struct:SM::Flow::P 
  body: <tt>output</tt> is an output target. If it is not specified, '' is assumed. It should have a &lt;&lt; method which accepts the first argument <tt>obj</tt> of PrettyPrint#text, the first argument <tt>sep</tt> of PrettyPrint#breakable, the first argument <tt>newline</tt> of PrettyPrint.new, and the result of a given block for PrettyPrint.new.
- !ruby/struct:SM::Flow::P 
  body: <tt>maxwidth</tt> specifies maximum line length. If it is not specified, 79 is assumed. However actual outputs may overflow <tt>maxwidth</tt> if long non-breakable texts are provided.
- !ruby/struct:SM::Flow::P 
  body: <tt>newline</tt> is used for line breaks. &quot;\n&quot; is used if it is not specified.
- !ruby/struct:SM::Flow::P 
  body: The block is used to generate spaces. {|width| ' ' * width} is used if it is not given.
full_name: PrettyPrint::new
is_singleton: true
name: new
params: (output='', maxwidth=79, newline="\n", &genspace)
visibility: public
ri/1.8/system/PrettyPrint/format-c.yaml000064400000000764150403657520013726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: q
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This is a convenience method which is same as follows:"
- !ruby/struct:SM::Flow::VERB 
  body: "  begin\n    q = PrettyPrint.new(output, maxwidth, newline, &amp;genspace)\n    ...\n    q.flush\n    output\n  end\n"
full_name: PrettyPrint::format
is_singleton: true
name: format
params: (output='', maxwidth=79, newline="\n", genspace=lambda {|n| ' ' * n} {|q| ...}
visibility: public
ri/1.8/system/PrettyPrint/SingleLine/flush-i.yaml000064400000000265150403657520015612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::SingleLine#flush
is_singleton: false
name: flush
params: ()
visibility: public
ri/1.8/system/PrettyPrint/SingleLine/new-c.yaml000064400000000322150403657520015246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::SingleLine::new
is_singleton: true
name: new
params: (output, maxwidth=nil, newline=nil)
visibility: public
ri/1.8/system/PrettyPrint/SingleLine/nest-i.yaml000064400000000304150403657530015435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: PrettyPrint::SingleLine#nest
is_singleton: false
name: nest
params: (indent) {|| ...}
visibility: public
ri/1.8/system/PrettyPrint/SingleLine/text-i.yaml000064400000000301150403657530015445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::SingleLine#text
is_singleton: false
name: text
params: (obj, width=nil)
visibility: public
ri/1.8/system/PrettyPrint/SingleLine/cdesc-SingleLine.yaml000064400000001031150403657540017345 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: PrettyPrint::SingleLine
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: breakable
- !ruby/object:RI::MethodSummary 
  name: first?
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: group
- !ruby/object:RI::MethodSummary 
  name: nest
- !ruby/object:RI::MethodSummary 
  name: text
name: SingleLine
superclass: Object
ri/1.8/system/PrettyPrint/SingleLine/breakable-i.yaml000064400000000317150403657540016401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::SingleLine#breakable
is_singleton: false
name: breakable
params: (sep=' ', width=nil)
visibility: public
ri/1.8/system/PrettyPrint/SingleLine/group-i.yaml000064400000000406150403657540015624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: PrettyPrint::SingleLine#group
is_singleton: false
name: group
params: (indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil) {|| ...}
visibility: public
ri/1.8/system/PrettyPrint/SingleLine/first%3f-i.yaml000064400000000267150403657550016123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::SingleLine#first?
is_singleton: false
name: first?
params: ()
visibility: public
ri/1.8/system/PrettyPrint/group_sub-i.yaml000064400000000274150403657550014450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
full_name: PrettyPrint#group_sub
is_singleton: false
name: group_sub
params: () {|| ...}
visibility: public
ri/1.8/system/PrettyPrint/nest-i.yaml000064400000000471150403657550013413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Increases left margin after newline with <tt>indent</tt> for line breaks added in the block.
full_name: PrettyPrint#nest
is_singleton: false
name: nest
params: (indent) {|| ...}
visibility: public
ri/1.8/system/PrettyPrint/cdesc-PrettyPrint.yaml000064400000006200150403657550015573 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: genspace
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: group_queue
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: indent
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: maxwidth
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: newline
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: output
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: format
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: singleline_format
comment: 
- !ruby/struct:SM::Flow::P 
  body: This class implements a pretty printing algorithm. It finds line breaks and nice indentations for grouped structure.
- !ruby/struct:SM::Flow::P 
  body: "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:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: newline object and space generation block for PrettyPrint.new
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: optional width argument for PrettyPrint#text
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: PrettyPrint#breakable
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "There are several candidate uses:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: text formatting using proportional fonts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: multibyte characters which has columns different to number of bytes
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: non-string formatting
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Bugs
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Box based formatting?
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Other (better) model/algorithm?
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: References
- !ruby/struct:SM::Flow::P 
  body: Christian Lindig, Strictly Pretty, March 2000, http://www.st.cs.uni-sb.de/~lindig/papers/#pretty
- !ruby/struct:SM::Flow::P 
  body: Philip Wadler, A prettier printer, March 1998, http://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Author
- !ruby/struct:SM::Flow::P 
  body: Tanaka Akira &lt;akr@m17n.org&gt;
constants: []

full_name: PrettyPrint
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: break_outmost_groups
- !ruby/object:RI::MethodSummary 
  name: breakable
- !ruby/object:RI::MethodSummary 
  name: current_group
- !ruby/object:RI::MethodSummary 
  name: fill_breakable
- !ruby/object:RI::MethodSummary 
  name: first?
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: group
- !ruby/object:RI::MethodSummary 
  name: group_sub
- !ruby/object:RI::MethodSummary 
  name: nest
- !ruby/object:RI::MethodSummary 
  name: text
name: PrettyPrint
superclass: Object
ri/1.8/system/PrettyPrint/text-i.yaml000064400000000601150403657560013422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This adds <tt>obj</tt> as a text of <tt>width</tt> columns in width.
- !ruby/struct:SM::Flow::P 
  body: If <tt>width</tt> is not specified, obj.length is used.
full_name: PrettyPrint#text
is_singleton: false
name: text
params: (obj, width=obj.length)
visibility: public
ri/1.8/system/PrettyPrint/breakable-i.yaml000064400000001240150403657560014346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This tells &quot;you can break a line here if necessary&quot;, and a <tt>width</tt>\-column text <tt>sep</tt> is inserted if a line is not broken at the point.
- !ruby/struct:SM::Flow::P 
  body: If <tt>sep</tt> is not specified, &quot; &quot; is used.
- !ruby/struct:SM::Flow::P 
  body: If <tt>width</tt> is not specified, +sep.length+ is used. You will have to specify this when <tt>sep</tt> is a multibyte character, for example.
full_name: PrettyPrint#breakable
is_singleton: false
name: breakable
params: (sep=' ', width=sep.length)
visibility: public
ri/1.8/system/PrettyPrint/fill_breakable-i.yaml000064400000000324150403657560015356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint#fill_breakable
is_singleton: false
name: fill_breakable
params: (sep=' ', width=sep.length)
visibility: public
ri/1.8/system/PrettyPrint/GroupQueue/deq-i.yaml000064400000000261150403657570015313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::GroupQueue#deq
is_singleton: false
name: deq
params: ()
visibility: public
ri/1.8/system/PrettyPrint/GroupQueue/enq-i.yaml000064400000000266150403657570015332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::GroupQueue#enq
is_singleton: false
name: enq
params: (group)
visibility: public
ri/1.8/system/PrettyPrint/GroupQueue/delete-i.yaml000064400000000274150403657570016010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::GroupQueue#delete
is_singleton: false
name: delete
params: (group)
visibility: public
ri/1.8/system/PrettyPrint/GroupQueue/new-c.yaml000064400000000270150403657570015325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::GroupQueue::new
is_singleton: true
name: new
params: (*groups)
visibility: public
ri/1.8/system/PrettyPrint/GroupQueue/cdesc-GroupQueue.yaml000064400000000603150403657600017466 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: PrettyPrint::GroupQueue
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: deq
- !ruby/object:RI::MethodSummary 
  name: enq
name: GroupQueue
superclass: Object
ri/1.8/system/PrettyPrint/group-i.yaml000064400000001375150403657600013576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Groups line break hints added in the block. The line break hints are all to be used or not.
- !ruby/struct:SM::Flow::P 
  body: If <tt>indent</tt> is specified, the method call is regarded as nested by nest(indent) { ... }.
- !ruby/struct:SM::Flow::P 
  body: If <tt>open_obj</tt> is specified, <tt>text open_obj, open_width</tt> is called before grouping. If <tt>close_obj</tt> is specified, <tt>text close_obj, close_width</tt> is called after grouping.
full_name: PrettyPrint#group
is_singleton: false
name: group
params: (indent=0, open_obj='', close_obj='', open_width=open_obj.length, close_width=close_obj.length) {|| ...}
visibility: public
ri/1.8/system/PrettyPrint/Breakable/output-i.yaml000064400000000307150403657600015644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Breakable#output
is_singleton: false
name: output
params: (out, output_width)
visibility: public
ri/1.8/system/PrettyPrint/Breakable/new-c.yaml000064400000000275150403657610015074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Breakable::new
is_singleton: true
name: new
params: (sep, width, q)
visibility: public
ri/1.8/system/PrettyPrint/Breakable/cdesc-Breakable.yaml000064400000000741150403657610017010 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: indent
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: obj
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: width
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: PrettyPrint::Breakable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: output
name: Breakable
superclass: Object
ri/1.8/system/PrettyPrint/first%3f-i.yaml000064400000001221150403657610014056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: first? is a predicate to test the call is a first call to first? with current group.
- !ruby/struct:SM::Flow::P 
  body: "It is useful to format comma separated values as:"
- !ruby/struct:SM::Flow::VERB 
  body: "  q.group(1, '[', ']') {\n    xxx.each {|yyy|\n      unless q.first?\n        q.text ','\n        q.breakable\n      end\n      ... pretty printing yyy ...\n    }\n  }\n"
- !ruby/struct:SM::Flow::P 
  body: first? is obsoleted in 1.8.2.
full_name: PrettyPrint#first?
is_singleton: false
name: first?
params: ()
visibility: public
ri/1.8/system/PrettyPrint/Text/output-i.yaml000064400000000302150403657610014714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Text#output
is_singleton: false
name: output
params: (out, output_width)
visibility: public
ri/1.8/system/PrettyPrint/Text/cdesc-Text.yaml000064400000000606150403657620015141 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: width
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: PrettyPrint::Text
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: output
name: Text
superclass: Object
ri/1.8/system/PrettyPrint/Text/add-i.yaml000064400000000265150403657620014115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Text#add
is_singleton: false
name: add
params: (obj, width)
visibility: public
ri/1.8/system/PrettyPrint/Text/new-c.yaml000064400000000253150403657620014145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: PrettyPrint::Text::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/StringIO/flush-i.yaml000064400000000433150403657630012752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <b>strio</b> itself. Just for compatibility to IO.
full_name: StringIO#flush
is_singleton: false
name: flush
params: " strio.flush -> strio "
visibility: public
ri/1.8/system/StringIO/readbyte-i.yaml000064400000000376150403657630013436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#readchar.
full_name: StringIO#readbyte
is_singleton: false
name: readbyte
params: |
  strio.readchar   -> fixnum

visibility: public
ri/1.8/system/StringIO/lines-i.yaml000064400000000515150403657630012744 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#each.
full_name: StringIO#lines
is_singleton: false
name: lines
params: |
  strio.each(sep_string=$/)      {|line| block }  -> strio
  strio.each_line(sep_string=$/) {|line| block }  -> strio

visibility: public
ri/1.8/system/StringIO/chars-i.yaml000064400000000410150403657640012725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#each_char.
full_name: StringIO#chars
is_singleton: false
name: chars
params: |
  strio.each_char {|char| block }  -> strio

visibility: public
ri/1.8/system/StringIO/size-i.yaml000064400000000411150403657640012600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of the buffer string.
full_name: StringIO#size
is_singleton: false
name: size
params: |
  strio.size   -> integer

visibility: public
ri/1.8/system/StringIO/fcntl-i.yaml000064400000000363150403657640012742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises NotImplementedError.
full_name: StringIO#fcntl
is_singleton: false
name: fcntl
params: " strio.fcntl "
visibility: public
ri/1.8/system/StringIO/fsync-i.yaml000064400000000405150403657640012753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns 0. Just for compatibility to IO.
full_name: StringIO#fsync
is_singleton: false
name: fsync
params: " strio.fsync -> 0 "
visibility: public
ri/1.8/system/StringIO/print-i.yaml000064400000000436150403657640012771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#print.
full_name: StringIO#print
is_singleton: false
name: print
params: |
  strio.print()             -> nil
  strio.print(obj, ...)     -> nil

visibility: public
ri/1.8/system/StringIO/printf-i.yaml000064400000000420150403657640013130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#printf.
full_name: StringIO#printf
is_singleton: false
name: printf
params: |
  strio.printf(format_string [, obj, ...] )   -> nil

visibility: public
ri/1.8/system/StringIO/each-i.yaml000064400000000513150403657640012531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#each.
full_name: StringIO#each
is_singleton: false
name: each
params: |
  strio.each(sep_string=$/)      {|line| block }  -> strio
  strio.each_line(sep_string=$/) {|line| block }  -> strio

visibility: public
ri/1.8/system/StringIO/lineno-i.yaml000064400000001065150403657640013120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current line number in <b>strio</b>. The stringio must be opened for reading. <tt>lineno</tt> counts the number of times <tt>gets</tt> is called, rather than the number of newlines encountered. The two values will differ if <tt>gets</tt> is called with a separator other than newline. See also the <tt>$.</tt> variable.
full_name: StringIO#lineno
is_singleton: false
name: lineno
params: |
  strio.lineno    -> integer

visibility: public
ri/1.8/system/StringIO/string-i.yaml000064400000000436150403657640013143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns underlying String object, the subject of IO.
full_name: StringIO#string
is_singleton: false
name: string
params: " strio.string     -> string\n"
visibility: public
ri/1.8/system/StringIO/read-i.yaml000064400000000424150403657640012545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#read.
full_name: StringIO#read
is_singleton: false
name: read
params: |
  strio.read([length [, buffer]])    -> string, buffer, or nil

visibility: public
ri/1.8/system/StringIO/readline-i.yaml000064400000000415150403657640013415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#readline.
full_name: StringIO#readline
is_singleton: false
name: readline
params: |
  strio.readline(sep_string=$/)   -> string

visibility: public
ri/1.8/system/StringIO/each_line-i.yaml000064400000000525150403657640013543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#each.
full_name: StringIO#each_line
is_singleton: false
name: each_line
params: |
  strio.each(sep_string=$/)      {|line| block }  -> strio
  strio.each_line(sep_string=$/) {|line| block }  -> strio

visibility: public
ri/1.8/system/StringIO/sysread-i.yaml000064400000000577150403657640013315 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Similar to #read, but raises <tt>EOFError</tt> at end of string instead of returning <tt>nil</tt>, as well as IO#sysread does."
full_name: StringIO#sysread
is_singleton: false
name: sysread
params: |
  strio.sysread(integer[, outbuf])    -> string

visibility: public
ri/1.8/system/StringIO/binmode-i.yaml000064400000000440150403657640013245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <b>strio</b> itself. Just for compatibility to IO.
full_name: StringIO#binmode
is_singleton: false
name: binmode
params: " strio.binmode -> true "
visibility: public
ri/1.8/system/StringIO/path-i.yaml000064400000000417150403657640012570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>nil</tt>. Just for compatibility to IO.
full_name: StringIO#path
is_singleton: false
name: path
params: " strio.path -> nil "
visibility: public
ri/1.8/system/StringIO/pid-i.yaml000064400000000414150403657640012405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>nil</tt>. Just for compatibility to IO.
full_name: StringIO#pid
is_singleton: false
name: pid
params: " strio.pid -> nil "
visibility: public
ri/1.8/system/StringIO/tell-i.yaml000064400000000465150403657640012577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current offset (in bytes) of <b>strio</b>.
full_name: StringIO#tell
is_singleton: false
name: tell
params: |
  strio.pos     -> integer
  strio.tell    -> integer

visibility: public
ri/1.8/system/StringIO/close_read-i.yaml000064400000000530150403657640013730 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the read end of a StringIO. Will raise an <tt>IOError</tt> if the <b>strio</b> is not readable.
full_name: StringIO#close_read
is_singleton: false
name: close_read
params: |
  strio.close_read    -> nil

visibility: public
ri/1.8/system/StringIO/rewind-i.yaml000064400000000250150403657650013120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: StringIO#rewind
is_singleton: false
name: rewind
params: ()
visibility: public
ri/1.8/system/StringIO/getbyte-i.yaml000064400000000373150403657650013301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#getc.
full_name: StringIO#getbyte
is_singleton: false
name: getbyte
params: |
  strio.getc   -> fixnum or nil

visibility: public
ri/1.8/system/StringIO/ungetc-i.yaml000064400000001035150403657650013117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pushes back one character (passed as a parameter) onto <b>strio</b> such that a subsequent buffered read will return it. Pushing back behind the beginning of the buffer string is not possible. Nothing will be done if such an attempt is made. In other case, there is no limitation for multiple pushbacks.
full_name: StringIO#ungetc
is_singleton: false
name: ungetc
params: |
  strio.ungetc(integer)   -> nil

visibility: public
ri/1.8/system/StringIO/eof-i.yaml000064400000000607150403657650012407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if <b>strio</b> is at end of file. The stringio must be opened for reading or an <tt>IOError</tt> will be raised.
full_name: StringIO#eof
is_singleton: false
name: eof
params: |
  strio.eof     -> true or false
  strio.eof?    -> true or false

visibility: public
ri/1.8/system/StringIO/new-c.yaml000064400000000465150403657660012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates new StringIO instance from with <em>string</em> and <em>mode</em>.
full_name: StringIO::new
is_singleton: true
name: new
params: " StringIO.new(string=\"\"[, mode])\n"
visibility: public
ri/1.8/system/StringIO/lineno%3d-i.yaml000064400000000535150403657660013417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Manually sets the current line number to the given value. <tt>$.</tt> is updated only on the next read.
full_name: StringIO#lineno=
is_singleton: false
name: lineno=
params: |
  strio.lineno = integer    -> integer

visibility: public
ri/1.8/system/StringIO/each_byte-i.yaml000064400000000420150403657660013553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#each_byte.
full_name: StringIO#each_byte
is_singleton: false
name: each_byte
params: |
  strio.each_byte {|byte| block }  -> strio

visibility: public
ri/1.8/system/StringIO/isatty-i.yaml000064400000000454150403657670013155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>false</tt>. Just for compatibility to IO.
full_name: StringIO#isatty
is_singleton: false
name: isatty
params: |
  strio.isatty -> nil
  strio.tty? -> nil

visibility: public
ri/1.8/system/StringIO/write-i.yaml000064400000001015150403657670012764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Appends the given string to the underlying buffer string of <b>strio</b>. The stream must be opened for writing. If the argument is not a string, it will be converted to a string using <tt>to_s</tt>. Returns the number of bytes written. See IO#write.
full_name: StringIO#write
is_singleton: false
name: write
params: |
  strio.write(string)    -> integer
  strio.syswrite(string) -> integer

visibility: public
ri/1.8/system/StringIO/syswrite-i.yaml000064400000001023150403657670013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Appends the given string to the underlying buffer string of <b>strio</b>. The stream must be opened for writing. If the argument is not a string, it will be converted to a string using <tt>to_s</tt>. Returns the number of bytes written. See IO#write.
full_name: StringIO#syswrite
is_singleton: false
name: syswrite
params: |
  strio.write(string)    -> integer
  strio.syswrite(string) -> integer

visibility: public
ri/1.8/system/StringIO/closed%3f-i.yaml000064400000000510150403657670013400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <b>strio</b> is completely closed, <tt>false</tt> otherwise.
full_name: StringIO#closed?
is_singleton: false
name: closed?
params: |
  strio.closed?    -> true or false

visibility: public
ri/1.8/system/StringIO/gets-i.yaml000064400000000404150403657670012575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#gets.
full_name: StringIO#gets
is_singleton: false
name: gets
params: |
  strio.gets(sep_string=$/)   -> string or nil

visibility: public
ri/1.8/system/StringIO/eof%3f-i.yaml000064400000000331150403657700012673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #eof"
full_name: StringIO#eof?
is_singleton: false
name: eof?
params: ()
visibility: public
ri/1.8/system/StringIO/length-i.yaml000064400000000415150403657700013110 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of the buffer string.
full_name: StringIO#length
is_singleton: false
name: length
params: |
  strio.size   -> integer

visibility: public
ri/1.8/system/StringIO/truncate-i.yaml000064400000000536150403657710013461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Truncates the buffer string to at most <em>integer</em> bytes. The <b>strio</b> must be opened for writing.
full_name: StringIO#truncate
is_singleton: false
name: truncate
params: |
  strio.truncate(integer)    -> 0

visibility: public
ri/1.8/system/StringIO/%3c%3c-i.yaml000064400000000363150403657710012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#&lt;&lt;.
full_name: StringIO#<<
is_singleton: false
name: "<<"
params: |
  strio << obj     -> strio

visibility: public
ri/1.8/system/StringIO/reopen-i.yaml000064400000000626150403657710013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reinitializes <b>strio</b> with the given <em>other_StrIO</em> or <em>string</em> and <em>mode</em> (see StringIO#new).
full_name: StringIO#reopen
is_singleton: false
name: reopen
params: |
  strio.reopen(other_StrIO)     -> strio
  strio.reopen(string, mode)    -> strio

visibility: public
ri/1.8/system/StringIO/pos-i.yaml000064400000000463150403657720012435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current offset (in bytes) of <b>strio</b>.
full_name: StringIO#pos
is_singleton: false
name: pos
params: |
  strio.pos     -> integer
  strio.tell    -> integer

visibility: public
ri/1.8/system/StringIO/getc-i.yaml000064400000000365150403657720012557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#getc.
full_name: StringIO#getc
is_singleton: false
name: getc
params: |
  strio.getc   -> fixnum or nil

visibility: public
ri/1.8/system/StringIO/tty%3f-i.yaml000064400000000450150403657720012746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>false</tt>. Just for compatibility to IO.
full_name: StringIO#tty?
is_singleton: false
name: tty?
params: |
  strio.isatty -> nil
  strio.tty? -> nil

visibility: public
ri/1.8/system/StringIO/putc-i.yaml000064400000000361150403657730012605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#putc.
full_name: StringIO#putc
is_singleton: false
name: putc
params: |
  strio.putc(obj)    -> obj

visibility: public
ri/1.8/system/StringIO/close-i.yaml000064400000000551150403657730012740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes strio. The <b>strio</b> is unavailable for any further data operations; an <tt>IOError</tt> is raised if such an attempt is made.
full_name: StringIO#close
is_singleton: false
name: close
params: |
  strio.close  -> nil

visibility: public
ri/1.8/system/StringIO/each_char-i.yaml000064400000000420150403657730013523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#each_char.
full_name: StringIO#each_char
is_singleton: false
name: each_char
params: |
  strio.each_char {|char| block }  -> strio

visibility: public
ri/1.8/system/StringIO/seek-i.yaml000064400000000542150403657740012563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Seeks to a given offset <em>amount</em> in the stream according to the value of <em>whence</em> (see IO#seek).
full_name: StringIO#seek
is_singleton: false
name: seek
params: |
  strio.seek(amount, whence=SEEK_SET) -> 0

visibility: public
ri/1.8/system/StringIO/closed_read%3f-i.yaml000064400000000522150403657740014374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <b>strio</b> is not readable, <tt>false</tt> otherwise.
full_name: StringIO#closed_read?
is_singleton: false
name: closed_read?
params: |
  strio.closed_read?    -> true or false

visibility: public
ri/1.8/system/StringIO/sync%3d-i.yaml000064400000000451150403657740013103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the argument unchanged. Just for compatibility to IO.
full_name: StringIO#sync=
is_singleton: false
name: sync=
params: " strio.sync = boolean -> boolean "
visibility: public
ri/1.8/system/StringIO/readchar-i.yaml000064400000000376150403657750013413 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#readchar.
full_name: StringIO#readchar
is_singleton: false
name: readchar
params: |
  strio.readchar   -> fixnum

visibility: public
ri/1.8/system/StringIO/fileno-i.yaml000064400000000425150403657750013111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>nil</tt>. Just for compatibility to IO.
full_name: StringIO#fileno
is_singleton: false
name: fileno
params: " strio.fileno -> nil "
visibility: public
ri/1.8/system/StringIO/sync-i.yaml000064400000000376150403657750012616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> always.
full_name: StringIO#sync
is_singleton: false
name: sync
params: |
  strio.sync    -> true

visibility: public
ri/1.8/system/StringIO/readlines-i.yaml000064400000000421150403657750013577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#readlines.
full_name: StringIO#readlines
is_singleton: false
name: readlines
params: |
  strio.readlines(sep_string=$/)  ->   array

visibility: public
ri/1.8/system/StringIO/pos%3d-i.yaml000064400000000444150403657750012733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Seeks to the given position (in bytes) in <b>strio</b>.
full_name: StringIO#pos=
is_singleton: false
name: pos=
params: |
  strio.pos = integer    -> integer

visibility: public
ri/1.8/system/StringIO/string%3d-i.yaml000064400000000446150403657760013443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes underlying String object, the subject of IO.
full_name: StringIO#string=
is_singleton: false
name: string=
params: |
  strio.string = string  -> string

visibility: public
ri/1.8/system/StringIO/puts-i.yaml000064400000000366150403657760012635 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#puts.
full_name: StringIO#puts
is_singleton: false
name: puts
params: |
  strio.puts(obj, ...)    -> nil

visibility: public
ri/1.8/system/StringIO/cdesc-StringIO.yaml000064400000006615150403657760014174 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
comment: 
- !ruby/struct:SM::Flow::P 
  body: Pseudo I/O on String object.
constants: []

full_name: StringIO
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: binmode
- !ruby/object:RI::MethodSummary 
  name: bytes
- !ruby/object:RI::MethodSummary 
  name: chars
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: close_read
- !ruby/object:RI::MethodSummary 
  name: close_write
- !ruby/object:RI::MethodSummary 
  name: closed?
- !ruby/object:RI::MethodSummary 
  name: closed_read?
- !ruby/object:RI::MethodSummary 
  name: closed_write?
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_byte
- !ruby/object:RI::MethodSummary 
  name: each_char
- !ruby/object:RI::MethodSummary 
  name: each_line
- !ruby/object:RI::MethodSummary 
  name: eof
- !ruby/object:RI::MethodSummary 
  name: eof
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: fcntl
- !ruby/object:RI::MethodSummary 
  name: fileno
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: fsync
- !ruby/object:RI::MethodSummary 
  name: getbyte
- !ruby/object:RI::MethodSummary 
  name: getc
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: isatty
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: lineno
- !ruby/object:RI::MethodSummary 
  name: lineno=
- !ruby/object:RI::MethodSummary 
  name: lines
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: pid
- !ruby/object:RI::MethodSummary 
  name: pos
- !ruby/object:RI::MethodSummary 
  name: pos
- !ruby/object:RI::MethodSummary 
  name: pos=
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: printf
- !ruby/object:RI::MethodSummary 
  name: putc
- !ruby/object:RI::MethodSummary 
  name: puts
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: readbyte
- !ruby/object:RI::MethodSummary 
  name: readchar
- !ruby/object:RI::MethodSummary 
  name: readline
- !ruby/object:RI::MethodSummary 
  name: readline
- !ruby/object:RI::MethodSummary 
  name: readlines
- !ruby/object:RI::MethodSummary 
  name: reopen
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: seek
- !ruby/object:RI::MethodSummary 
  name: seek
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: string
- !ruby/object:RI::MethodSummary 
  name: string=
- !ruby/object:RI::MethodSummary 
  name: sync
- !ruby/object:RI::MethodSummary 
  name: sync=
- !ruby/object:RI::MethodSummary 
  name: sysread
- !ruby/object:RI::MethodSummary 
  name: syswrite
- !ruby/object:RI::MethodSummary 
  name: tell
- !ruby/object:RI::MethodSummary 
  name: truncate
- !ruby/object:RI::MethodSummary 
  name: tty?
- !ruby/object:RI::MethodSummary 
  name: ungetc
- !ruby/object:RI::MethodSummary 
  name: write
name: StringIO
superclass: Object
ri/1.8/system/StringIO/closed_write%3f-i.yaml000064400000000525150403657770014621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <b>strio</b> is not writable, <tt>false</tt> otherwise.
full_name: StringIO#closed_write?
is_singleton: false
name: closed_write?
params: |
  strio.closed_write?    -> true or false

visibility: public
ri/1.8/system/StringIO/close_write-i.yaml000064400000000535150403657770014160 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the write end of a StringIO. Will raise an <tt>IOError</tt> if the <b>strio</b> is not writeable.
full_name: StringIO#close_write
is_singleton: false
name: close_write
params: |
  strio.close_write    -> nil

visibility: public
ri/1.8/system/StringIO/bytes-i.yaml000064400000000410150403657770012757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See IO#each_byte.
full_name: StringIO#bytes
is_singleton: false
name: bytes
params: |
  strio.each_byte {|byte| block }  -> strio

visibility: public
ri/1.8/system/StringIO/open-c.yaml000064400000000647150403657770012600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to StringIO.new except that when it is called with a block, it yields with the new instance and closes it, and returns the result which returned from the block.
full_name: StringIO::open
is_singleton: true
name: open
params: " StringIO.open(string=\"\"[, mode]) {|strio| ...}\n"
visibility: public
ri/1.8/system/String/lines-i.yaml000064400000001202150403657770012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an enumerator that gives each line in the string. If a block is given, it iterates over each line in the string.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;foo\\nbar\\n&quot;.lines.to_a   #=&gt; [&quot;foo\\n&quot;, &quot;bar\\n&quot;]\n   &quot;foo\\nb ar&quot;.lines.sort    #=&gt; [&quot;b ar&quot;, &quot;foo\\n&quot;]\n"
full_name: String#lines
is_singleton: false
name: lines
params: |
  str.lines(separator=$/)   => anEnumerator
  str.lines(separator=$/) {|substr| block }        => str

visibility: public
ri/1.8/system/String/center-i.yaml000064400000001326150403660000012644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <em>integer</em> is greater than the length of <em>str</em>, returns a new <tt>String</tt> of length <em>integer</em> with <em>str</em> centered and padded with <em>padstr</em>; otherwise, returns <em>str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.center(4)         #=&gt; &quot;hello&quot;\n   &quot;hello&quot;.center(20)        #=&gt; &quot;       hello        &quot;\n   &quot;hello&quot;.center(20, '123') #=&gt; &quot;1231231hello12312312&quot;\n"
full_name: String#center
is_singleton: false
name: center
params: |
  str.center(integer, padstr)   => new_str

visibility: public
ri/1.8/system/String/chars-i.yaml000064400000001034150403660000012460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an enumerator that gives each character in the string. If a block is given, it iterates over each character in the string.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;foo&quot;.chars.to_a   #=&gt; [&quot;f&quot;,&quot;o&quot;,&quot;o&quot;]\n"
full_name: String#chars
is_singleton: false
name: chars
params: |
  str.chars                   => anEnumerator
  str.chars {|substr| block } => str

visibility: public
ri/1.8/system/String/size-i.yaml000064400000000404150403660000012332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the length of <em>str</em>.
full_name: String#size
is_singleton: false
name: size
params: |
  str.length   => integer

visibility: public
ri/1.8/system/String/reverse%21-i.yaml000064400000000406150403660000013245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reverses <em>str</em> in place.
full_name: String#reverse!
is_singleton: false
name: reverse!
params: |
  str.reverse!   => str

visibility: public
ri/1.8/system/String/eql%3f-i.yaml000064400000000452150403660000012442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Two strings are equal if the have the same length and content.
full_name: String#eql?
is_singleton: false
name: eql?
params: |
  str.eql?(other)   => true or false

visibility: public
ri/1.8/system/String/slice-i.yaml000064400000004574150403660000012473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Reference---If passed a single <tt>Fixnum</tt>, returns the code of the character at that position. If passed two <tt>Fixnum</tt> objects, returns a substring starting at the offset given by the first, and a length given by the second. If given a range, a substring containing characters at offsets given by the range is returned. In all three cases, if an offset is negative, it is counted from the end of <em>str</em>. Returns <tt>nil</tt> if the initial offset falls outside the string, the length is negative, or the beginning of the range is greater than the end.
- !ruby/struct:SM::Flow::P 
  body: If a <tt>Regexp</tt> is supplied, the matching portion of <em>str</em> is returned. If a numeric parameter follows the regular expression, that component of the <tt>MatchData</tt> is returned instead. If a <tt>String</tt> is given, that string is returned if it occurs in <em>str</em>. In both cases, <tt>nil</tt> is returned if there is no match.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;hello there&quot;\n   a[1]                   #=&gt; 101\n   a[1,3]                 #=&gt; &quot;ell&quot;\n   a[1..3]                #=&gt; &quot;ell&quot;\n   a[-3,2]                #=&gt; &quot;er&quot;\n   a[-4..-2]              #=&gt; &quot;her&quot;\n   a[12..-1]              #=&gt; nil\n   a[-2..-4]              #=&gt; &quot;&quot;\n   a[/[aeiou](.)\\1/]      #=&gt; &quot;ell&quot;\n   a[/[aeiou](.)\\1/, 0]   #=&gt; &quot;ell&quot;\n   a[/[aeiou](.)\\1/, 1]   #=&gt; &quot;l&quot;\n   a[/[aeiou](.)\\1/, 2]   #=&gt; nil\n   a[&quot;lo&quot;]                #=&gt; &quot;lo&quot;\n   a[&quot;bye&quot;]               #=&gt; nil\n"
full_name: String#slice
is_singleton: false
name: slice
params: |
  str[fixnum]                 => fixnum or nil
  str[fixnum, fixnum]         => new_str or nil
  str[range]                  => new_str or nil
  str[regexp]                 => new_str or nil
  str[regexp, fixnum]         => new_str or nil
  str[other_str]              => new_str or nil
  str.slice(fixnum)           => fixnum or nil
  str.slice(fixnum, fixnum)   => new_str or nil
  str.slice(range)            => new_str or nil
  str.slice(regexp)           => new_str or nil
  str.slice(regexp, fixnum)   => new_str or nil
  str.slice(other_str)        => new_str or nil

visibility: public
ri/1.8/system/String/slice%21-i.yaml000064400000002133150403660010012671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the specified portion from <em>str</em>, and returns the portion deleted. The forms that take a <tt>Fixnum</tt> will raise an <tt>IndexError</tt> if the value is out of range; the <tt>Range</tt> form will raise a <tt>RangeError</tt>, and the <tt>Regexp</tt> and <tt>String</tt> forms will silently ignore the assignment.
- !ruby/struct:SM::Flow::VERB 
  body: "   string = &quot;this is a string&quot;\n   string.slice!(2)        #=&gt; 105\n   string.slice!(3..6)     #=&gt; &quot; is &quot;\n   string.slice!(/s.*t/)   #=&gt; &quot;sa st&quot;\n   string.slice!(&quot;r&quot;)      #=&gt; &quot;r&quot;\n   string                  #=&gt; &quot;thing&quot;\n"
full_name: String#slice!
is_singleton: false
name: slice!
params: |
  str.slice!(fixnum)           => fixnum or nil
  str.slice!(fixnum, fixnum)   => 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

visibility: public
ri/1.8/system/String/tr-i.yaml000064400000001664150403660010012017 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with the characters in <em>from_str</em> replaced by the corresponding characters in <em>to_str</em>. If <em>to_str</em> is shorter than <em>from_str</em>, it is padded with its last character. Both strings may use the c1--c2 notation to denote ranges of characters, and <em>from_str</em> may start with a <tt>^</tt>, which denotes all characters except those listed.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.tr('aeiou', '*')    #=&gt; &quot;h*ll*&quot;\n   &quot;hello&quot;.tr('^aeiou', '*')   #=&gt; &quot;<b>e</b>*o&quot;\n   &quot;hello&quot;.tr('el', 'ip')      #=&gt; &quot;hippo&quot;\n   &quot;hello&quot;.tr('a-y', 'b-z')    #=&gt; &quot;ifmmp&quot;\n"
full_name: String#tr
is_singleton: false
name: tr
params: |
  str.tr(from_str, to_str)   => new_str

visibility: public
ri/1.8/system/String/crypt-i.yaml000064400000000723150403660010012526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Applies a one-way cryptographic hash to <em>str</em> by invoking the standard library function <tt>crypt</tt>. The argument is the salt string, which should be two characters long, each character drawn from <tt>[a-zA-Z0-9./]</tt>.
full_name: String#crypt
is_singleton: false
name: crypt
params: |
  str.crypt(other_str)   => new_str

visibility: public
ri/1.8/system/String/%25-i.yaml000064400000001357150403660020011665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Format---Uses <em>str</em> as a format specification, and returns the result of applying it to <em>arg</em>. If the format specification contains more than one substitution, then <em>arg</em> must be an <tt>Array</tt> containing the values to be substituted. See <tt>Kernel::sprintf</tt> for details of the format string.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;%05d&quot; % 123                       #=&gt; &quot;00123&quot;\n   &quot;%-5s: %08x&quot; % [ &quot;ID&quot;, self.id ]   #=&gt; &quot;ID   : 200e14d6&quot;\n"
full_name: String#%
is_singleton: false
name: "%"
params: |
  str % arg   => new_str

visibility: public
ri/1.8/system/String/%5b%5d-i.yaml000064400000004570150403660020012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Reference---If passed a single <tt>Fixnum</tt>, returns the code of the character at that position. If passed two <tt>Fixnum</tt> objects, returns a substring starting at the offset given by the first, and a length given by the second. If given a range, a substring containing characters at offsets given by the range is returned. In all three cases, if an offset is negative, it is counted from the end of <em>str</em>. Returns <tt>nil</tt> if the initial offset falls outside the string, the length is negative, or the beginning of the range is greater than the end.
- !ruby/struct:SM::Flow::P 
  body: If a <tt>Regexp</tt> is supplied, the matching portion of <em>str</em> is returned. If a numeric parameter follows the regular expression, that component of the <tt>MatchData</tt> is returned instead. If a <tt>String</tt> is given, that string is returned if it occurs in <em>str</em>. In both cases, <tt>nil</tt> is returned if there is no match.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;hello there&quot;\n   a[1]                   #=&gt; 101\n   a[1,3]                 #=&gt; &quot;ell&quot;\n   a[1..3]                #=&gt; &quot;ell&quot;\n   a[-3,2]                #=&gt; &quot;er&quot;\n   a[-4..-2]              #=&gt; &quot;her&quot;\n   a[12..-1]              #=&gt; nil\n   a[-2..-4]              #=&gt; &quot;&quot;\n   a[/[aeiou](.)\\1/]      #=&gt; &quot;ell&quot;\n   a[/[aeiou](.)\\1/, 0]   #=&gt; &quot;ell&quot;\n   a[/[aeiou](.)\\1/, 1]   #=&gt; &quot;l&quot;\n   a[/[aeiou](.)\\1/, 2]   #=&gt; nil\n   a[&quot;lo&quot;]                #=&gt; &quot;lo&quot;\n   a[&quot;bye&quot;]               #=&gt; nil\n"
full_name: String#[]
is_singleton: false
name: "[]"
params: |
  str[fixnum]                 => fixnum or nil
  str[fixnum, fixnum]         => new_str or nil
  str[range]                  => new_str or nil
  str[regexp]                 => new_str or nil
  str[regexp, fixnum]         => new_str or nil
  str[other_str]              => new_str or nil
  str.slice(fixnum)           => fixnum or nil
  str.slice(fixnum, fixnum)   => new_str or nil
  str.slice(range)            => new_str or nil
  str.slice(regexp)           => new_str or nil
  str.slice(regexp, fixnum)   => new_str or nil
  str.slice(other_str)        => new_str or nil

visibility: public
ri/1.8/system/String/toutf16-i.yaml000064400000000711150403660020012673 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>self</tt> to UTF-16
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-w16xm0', str).
full_name: String#toutf16
is_singleton: false
name: toutf16
params: |
  String#toutf16   -> string

visibility: public
ri/1.8/system/String/tosjis-i.yaml000064400000000707150403660030012704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>self</tt> to Shift_JIS
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-sxm0', str).
full_name: String#tosjis
is_singleton: false
name: tosjis
params: |
  String#tosjis   -> string

visibility: public
ri/1.8/system/String/empty%3f-i.yaml000064400000000647150403660030013030 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>str</em> has a length of zero.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.empty?   #=&gt; false\n   &quot;&quot;.empty?        #=&gt; true\n"
full_name: String#empty?
is_singleton: false
name: empty?
params: |
  str.empty?   => true or false

visibility: public
ri/1.8/system/String/hex-i.yaml000064400000001145150403660040012153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Treats leading characters from <em>str</em> as a string of hexadecimal digits (with an optional sign and an optional <tt>0x</tt>) and returns the corresponding number. Zero is returned on error.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;0x0a&quot;.hex     #=&gt; 10\n   &quot;-1234&quot;.hex    #=&gt; -4660\n   &quot;0&quot;.hex        #=&gt; 0\n   &quot;wombat&quot;.hex   #=&gt; 0\n"
full_name: String#hex
is_singleton: false
name: hex
params: |
  str.hex   => integer

visibility: public
ri/1.8/system/String/strip-i.yaml000064400000000733150403660040012532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with leading and trailing whitespace removed.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;    hello    &quot;.strip   #=&gt; &quot;hello&quot;\n   &quot;\\tgoodbye\\r\\n&quot;.strip   #=&gt; &quot;goodbye&quot;\n"
full_name: String#strip
is_singleton: false
name: strip
params: |
  str.strip   => new_str

visibility: public
ri/1.8/system/String/%3d%7e-i.yaml000064400000001262150403660040012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Match---If <em>obj</em> is a <tt>Regexp</tt>, use it as a pattern to match against <em>str</em>,and returns the position the match starts, or <tt>nil</tt> if there is no match. Otherwise, invokes <em>obj.=~</em>, passing <em>str</em> as an argument. The default <tt>=~</tt> in <tt>Object</tt> returns <tt>false</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;cat o' 9 tails&quot; =~ /\\d/   #=&gt; 7\n   &quot;cat o' 9 tails&quot; =~ 9      #=&gt; false\n"
full_name: String#=~
is_singleton: false
name: =~
params: |
  str =~ obj   => fixnum or nil

visibility: public
ri/1.8/system/String/each-i.yaml000064400000002310150403660050012263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Splits <em>str</em> using the supplied parameter as the record separator (<tt>$/</tt> by default), passing each substring in turn to the supplied block. If a zero-length record separator is supplied, the string is split into paragraphs delimited by multiple successive newlines.
- !ruby/struct:SM::Flow::VERB 
  body: "   print &quot;Example one\\n&quot;\n   &quot;hello\\nworld&quot;.each {|s| p s}\n   print &quot;Example two\\n&quot;\n   &quot;hello\\nworld&quot;.each('l') {|s| p s}\n   print &quot;Example three\\n&quot;\n   &quot;hello\\n\\n\\nworld&quot;.each('') {|s| p s}\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Example one\n   &quot;hello\\n&quot;\n   &quot;world&quot;\n   Example two\n   &quot;hel&quot;\n   &quot;l&quot;\n   &quot;o\\nworl&quot;\n   &quot;d&quot;\n   Example three\n   &quot;hello\\n\\n\\n&quot;\n   &quot;world&quot;\n"
full_name: String#each
is_singleton: false
name: each
params: |
  str.each(separator=$/) {|substr| block }        => str
  str.each_line(separator=$/) {|substr| block }   => str

visibility: public
ri/1.8/system/String/cdesc-String.yaml000064400000020464150403660050013474 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: yaml_new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A <tt>String</tt> object holds and manipulates an arbitrary sequence of bytes, typically representing characters. String objects may be created using <tt>String::new</tt> or as literals.
- !ruby/struct:SM::Flow::P 
  body: Because of aliasing issues, users of strings should be aware of the methods that modify the contents of a <tt>String</tt> object. Typically, methods with names ending in ``!'' modify their receiver, while those without a ``!'' return a new <tt>String</tt>. However, there are exceptions, such as <tt>String#[]=</tt>.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: PATTERN_SJIS
  value: "'[\\x81-\\x9f\\xe0-\\xef][\\x40-\\x7e\\x80-\\xfc]'"
- !ruby/object:RI::Constant 
  comment: 
  name: PATTERN_EUC
  value: "'[\\xa1-\\xfe][\\xa1-\\xfe]'"
- !ruby/object:RI::Constant 
  comment: 
  name: PATTERN_UTF8
  value: "'[\\xc0-\\xdf][\\x80-\\xbf]|[\\xe0-\\xef][\\x80-\\xbf][\\x80-\\xbf]'"
- !ruby/object:RI::Constant 
  comment: 
  name: RE_SJIS
  value: Regexp.new(PATTERN_SJIS, 0, 'n')
- !ruby/object:RI::Constant 
  comment: 
  name: RE_EUC
  value: Regexp.new(PATTERN_EUC, 0, 'n')
- !ruby/object:RI::Constant 
  comment: 
  name: RE_UTF8
  value: Regexp.new(PATTERN_UTF8, 0, 'n')
- !ruby/object:RI::Constant 
  comment: 
  name: SUCC
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: HashCache
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: TrPatternCache
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: DeletePatternCache
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  name: SqueezePatternCache
  value: "{}"
full_name: String
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "%"
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: =~
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: "[]="
- !ruby/object:RI::MethodSummary 
  name: _expand_ch
- !ruby/object:RI::MethodSummary 
  name: _regex_quote
- !ruby/object:RI::MethodSummary 
  name: block_scanf
- !ruby/object:RI::MethodSummary 
  name: bytes
- !ruby/object:RI::MethodSummary 
  name: bytesize
- !ruby/object:RI::MethodSummary 
  name: capitalize
- !ruby/object:RI::MethodSummary 
  name: capitalize!
- !ruby/object:RI::MethodSummary 
  name: casecmp
- !ruby/object:RI::MethodSummary 
  name: center
- !ruby/object:RI::MethodSummary 
  name: chars
- !ruby/object:RI::MethodSummary 
  name: chomp
- !ruby/object:RI::MethodSummary 
  name: chomp!
- !ruby/object:RI::MethodSummary 
  name: chop
- !ruby/object:RI::MethodSummary 
  name: chop
- !ruby/object:RI::MethodSummary 
  name: chop!
- !ruby/object:RI::MethodSummary 
  name: chop!
- !ruby/object:RI::MethodSummary 
  name: concat
- !ruby/object:RI::MethodSummary 
  name: count
- !ruby/object:RI::MethodSummary 
  name: crypt
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: delete!
- !ruby/object:RI::MethodSummary 
  name: delete!
- !ruby/object:RI::MethodSummary 
  name: downcase
- !ruby/object:RI::MethodSummary 
  name: downcase!
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_byte
- !ruby/object:RI::MethodSummary 
  name: each_char
- !ruby/object:RI::MethodSummary 
  name: each_char
- !ruby/object:RI::MethodSummary 
  name: each_line
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: end_regexp
- !ruby/object:RI::MethodSummary 
  name: end_with?
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: expand_ch_hash
- !ruby/object:RI::MethodSummary 
  name: gsub
- !ruby/object:RI::MethodSummary 
  name: gsub!
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: hex
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: index
- !ruby/object:RI::MethodSummary 
  name: initialize_copy
- !ruby/object:RI::MethodSummary 
  name: insert
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: intern
- !ruby/object:RI::MethodSummary 
  name: is_binary_data?
- !ruby/object:RI::MethodSummary 
  name: is_complex_yaml?
- !ruby/object:RI::MethodSummary 
  name: iseuc
- !ruby/object:RI::MethodSummary 
  name: issjis
- !ruby/object:RI::MethodSummary 
  name: isutf8
- !ruby/object:RI::MethodSummary 
  name: jcount
- !ruby/object:RI::MethodSummary 
  name: jlength
- !ruby/object:RI::MethodSummary 
  name: jsize
- !ruby/object:RI::MethodSummary 
  name: kconv
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: lines
- !ruby/object:RI::MethodSummary 
  name: ljust
- !ruby/object:RI::MethodSummary 
  name: lstrip
- !ruby/object:RI::MethodSummary 
  name: lstrip!
- !ruby/object:RI::MethodSummary 
  name: match
- !ruby/object:RI::MethodSummary 
  name: mbchar?
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: next!
- !ruby/object:RI::MethodSummary 
  name: oct
- !ruby/object:RI::MethodSummary 
  name: original_succ
- !ruby/object:RI::MethodSummary 
  name: original_succ!
- !ruby/object:RI::MethodSummary 
  name: partition
- !ruby/object:RI::MethodSummary 
  name: replace
- !ruby/object:RI::MethodSummary 
  name: reverse
- !ruby/object:RI::MethodSummary 
  name: reverse!
- !ruby/object:RI::MethodSummary 
  name: rindex
- !ruby/object:RI::MethodSummary 
  name: rjust
- !ruby/object:RI::MethodSummary 
  name: rpartition
- !ruby/object:RI::MethodSummary 
  name: rstrip
- !ruby/object:RI::MethodSummary 
  name: rstrip!
- !ruby/object:RI::MethodSummary 
  name: scan
- !ruby/object:RI::MethodSummary 
  name: scanf
- !ruby/object:RI::MethodSummary 
  name: shellescape
- !ruby/object:RI::MethodSummary 
  name: shellsplit
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: slice
- !ruby/object:RI::MethodSummary 
  name: slice!
- !ruby/object:RI::MethodSummary 
  name: split
- !ruby/object:RI::MethodSummary 
  name: squeeze
- !ruby/object:RI::MethodSummary 
  name: squeeze
- !ruby/object:RI::MethodSummary 
  name: squeeze!
- !ruby/object:RI::MethodSummary 
  name: squeeze!
- !ruby/object:RI::MethodSummary 
  name: start_with?
- !ruby/object:RI::MethodSummary 
  name: strip
- !ruby/object:RI::MethodSummary 
  name: strip!
- !ruby/object:RI::MethodSummary 
  name: sub
- !ruby/object:RI::MethodSummary 
  name: sub!
- !ruby/object:RI::MethodSummary 
  name: succ
- !ruby/object:RI::MethodSummary 
  name: succ
- !ruby/object:RI::MethodSummary 
  name: succ!
- !ruby/object:RI::MethodSummary 
  name: succ!
- !ruby/object:RI::MethodSummary 
  name: sum
- !ruby/object:RI::MethodSummary 
  name: swapcase
- !ruby/object:RI::MethodSummary 
  name: swapcase!
- !ruby/object:RI::MethodSummary 
  name: to_f
- !ruby/object:RI::MethodSummary 
  name: to_i
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_str
- !ruby/object:RI::MethodSummary 
  name: to_sym
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: toeuc
- !ruby/object:RI::MethodSummary 
  name: tojis
- !ruby/object:RI::MethodSummary 
  name: tosjis
- !ruby/object:RI::MethodSummary 
  name: toutf16
- !ruby/object:RI::MethodSummary 
  name: toutf8
- !ruby/object:RI::MethodSummary 
  name: tr
- !ruby/object:RI::MethodSummary 
  name: tr
- !ruby/object:RI::MethodSummary 
  name: tr!
- !ruby/object:RI::MethodSummary 
  name: tr!
- !ruby/object:RI::MethodSummary 
  name: tr_s
- !ruby/object:RI::MethodSummary 
  name: tr_s
- !ruby/object:RI::MethodSummary 
  name: tr_s!
- !ruby/object:RI::MethodSummary 
  name: tr_s!
- !ruby/object:RI::MethodSummary 
  name: unpack
- !ruby/object:RI::MethodSummary 
  name: upcase
- !ruby/object:RI::MethodSummary 
  name: upcase!
- !ruby/object:RI::MethodSummary 
  name: upto
name: String
superclass: Object
ri/1.8/system/String/is_binary_data%3f-i.yaml000064400000000270150403660050014634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#is_binary_data?
is_singleton: false
name: is_binary_data?
params: ()
visibility: public
ri/1.8/system/String/succ%21-i.yaml000064400000000554150403660050012540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: original_succ!
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>String#succ</tt>, but modifies the receiver in place.
full_name: String#succ!
is_singleton: false
name: succ!
params: |
  str.succ!   => str
  str.next!   => str

visibility: public
ri/1.8/system/String/squeeze-i.yaml000064400000001602150403660050013047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Builds a set of characters from the <em>other_str</em> parameter(s) using the procedure described for <tt>String#count</tt>. Returns a new string where runs of the same character that occur in this set are replaced by a single character. If no arguments are given, all runs of identical characters are replaced by a single character.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;yellow moon&quot;.squeeze                  #=&gt; &quot;yelow mon&quot;\n   &quot;  now   is  the&quot;.squeeze(&quot; &quot;)         #=&gt; &quot; now is the&quot;\n   &quot;putters shoot balls&quot;.squeeze(&quot;m-z&quot;)   #=&gt; &quot;puters shot balls&quot;\n"
full_name: String#squeeze
is_singleton: false
name: squeeze
params: |
  str.squeeze([other_str]*)    => new_str

visibility: public
ri/1.8/system/String/%3c%3d%3e-i.yaml000064400000002621150403660050012533 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comparison---Returns -1 if <em>other_str</em> is less than, 0 if <em>other_str</em> is equal to, and +1 if <em>other_str</em> is greater than <em>str</em>. If the strings are of different lengths, and the strings are equal when compared up to the shortest length, then the longer string is considered greater than the shorter one. If the variable <tt>$=</tt> is <tt>false</tt>, the comparison is based on comparing the binary values of each character in the string. In older versions of Ruby, setting <tt>$=</tt> allowed case-insensitive comparisons; this is now deprecated in favor of using <tt>String#casecmp</tt>.
- !ruby/struct:SM::Flow::P 
  body: <tt>&lt;=&gt;</tt> is the basis for the methods <tt>&lt;</tt>, <tt>&lt;=</tt>, <tt>&gt;</tt>, <tt>&gt;=</tt>, and <tt>between?</tt>, included from module <tt>Comparable</tt>. The method <tt>String#==</tt> does not use <tt>Comparable#==</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;abcdef&quot; &lt;=&gt; &quot;abcde&quot;     #=&gt; 1\n   &quot;abcdef&quot; &lt;=&gt; &quot;abcdef&quot;    #=&gt; 0\n   &quot;abcdef&quot; &lt;=&gt; &quot;abcdefg&quot;   #=&gt; -1\n   &quot;abcdef&quot; &lt;=&gt; &quot;ABCDEF&quot;    #=&gt; 1\n"
full_name: String#<=>
is_singleton: false
name: <=>
params: |
  str <=> other_str   => -1, 0, +1

visibility: public
ri/1.8/system/String/to_i-i.yaml000064400000002024150403660050012317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the result of interpreting leading characters in <em>str</em> as an integer base <em>base</em> (between 2 and 36). Extraneous characters past the end of a valid number are ignored. If there is not a valid number at the start of <em>str</em>, <tt>0</tt> is returned. This method never raises an exception.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;12345&quot;.to_i             #=&gt; 12345\n   &quot;99 red balloons&quot;.to_i   #=&gt; 99\n   &quot;0a&quot;.to_i                #=&gt; 0\n   &quot;0a&quot;.to_i(16)            #=&gt; 10\n   &quot;hello&quot;.to_i             #=&gt; 0\n   &quot;1100101&quot;.to_i(2)        #=&gt; 101\n   &quot;1100101&quot;.to_i(8)        #=&gt; 294977\n   &quot;1100101&quot;.to_i(10)       #=&gt; 1100101\n   &quot;1100101&quot;.to_i(16)       #=&gt; 17826049\n"
full_name: String#to_i
is_singleton: false
name: to_i
params: |
  str.to_i(base=10)   => integer

visibility: public
ri/1.8/system/String/gsub-i.yaml000064400000003450150403660060012332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with <em>all</em> occurrences of <em>pattern</em> replaced with either <em>replacement</em> or the value of the block. The <em>pattern</em> will typically be a <tt>Regexp</tt>; if it is a <tt>String</tt> then no regular expression metacharacters will be interpreted (that is <tt>/\d/</tt> will match a digit, but <tt>'\d'</tt> will match a backslash followed by a 'd').
- !ruby/struct:SM::Flow::P 
  body: If a string is used as the replacement, special variables from the match (such as <tt>$&amp;</tt> and <tt>$1</tt>) cannot be substituted into it, as substitution into the string occurs before the pattern match starts. However, the sequences <tt>\1</tt>, <tt>\2</tt>, and so on may be used to interpolate successive groups in the match.
- !ruby/struct:SM::Flow::P 
  body: In the block form, the current match string is passed in as a parameter, and variables such as <tt>$1</tt>, <tt>$2</tt>, <tt>$`</tt>, <tt>$&amp;</tt>, and <tt>$'</tt> will be set appropriately. The value returned by the block will be substituted for the match on each call.
- !ruby/struct:SM::Flow::P 
  body: The result inherits any tainting in the original string or any supplied replacement string.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.gsub(/[aeiou]/, '*')              #=&gt; &quot;h*ll*&quot;\n   &quot;hello&quot;.gsub(/([aeiou])/, '&lt;\\1&gt;')         #=&gt; &quot;h&lt;e&gt;ll&lt;o&gt;&quot;\n   &quot;hello&quot;.gsub(/./) {|s| s[0].to_s + ' '}   #=&gt; &quot;104 101 108 108 111 &quot;\n"
full_name: String#gsub
is_singleton: false
name: gsub
params: |
  str.gsub(pattern, replacement)       => new_str
  str.gsub(pattern) {|match| block }   => new_str

visibility: public
ri/1.8/system/String/expand_ch_hash-i.yaml000064400000000277150403660060014332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#expand_ch_hash
is_singleton: false
name: expand_ch_hash
params: (from, to)
visibility: private
ri/1.8/system/String/kconv-i.yaml000064400000001037150403660060012511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>self</tt> to out_code. <tt>out_code</tt> and <tt>in_code</tt> are given as constants of Kconv.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want to decode them, use NKF.nkf.
full_name: String#kconv
is_singleton: false
name: kconv
params: |
  String#kconv(out_code, in_code = Kconv::AUTO)

visibility: public
ri/1.8/system/String/scanf-i.yaml000064400000000253150403660060012462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#scanf
is_singleton: false
name: scanf
params: (fstr,&b)
visibility: public
ri/1.8/system/String/oct-i.yaml000064400000001116150403660070012155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Treats leading characters of <em>str</em> as a string of octal digits (with an optional sign) and returns the corresponding number. Returns 0 if the conversion fails.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;123&quot;.oct       #=&gt; 83\n   &quot;-377&quot;.oct      #=&gt; -255\n   &quot;bad&quot;.oct       #=&gt; 0\n   &quot;0377bad&quot;.oct   #=&gt; 255\n"
full_name: String#oct
is_singleton: false
name: oct
params: |
  str.oct   => integer

visibility: public
ri/1.8/system/String/chomp-i.yaml000064400000002063150403660070012500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new <tt>String</tt> with the given record separator removed from the end of <em>str</em> (if present). If <tt>$/</tt> has not been changed from the default Ruby record separator, then <tt>chomp</tt> also removes carriage return characters (that is it will remove <tt>\n</tt>, <tt>\r</tt>, and <tt>\r\n</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.chomp            #=&gt; &quot;hello&quot;\n   &quot;hello\\n&quot;.chomp          #=&gt; &quot;hello&quot;\n   &quot;hello\\r\\n&quot;.chomp        #=&gt; &quot;hello&quot;\n   &quot;hello\\n\\r&quot;.chomp        #=&gt; &quot;hello\\n&quot;\n   &quot;hello\\r&quot;.chomp          #=&gt; &quot;hello&quot;\n   &quot;hello \\n there&quot;.chomp   #=&gt; &quot;hello \\n there&quot;\n   &quot;hello&quot;.chomp(&quot;llo&quot;)     #=&gt; &quot;he&quot;\n"
full_name: String#chomp
is_singleton: false
name: chomp
params: |
  str.chomp(separator=$/)   => new_str

visibility: public
ri/1.8/system/String/downcase-i.yaml000064400000001007150403660070013172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with all uppercase letters replaced with their lowercase counterparts. The operation is locale insensitive---only characters ``A'' to ``Z'' are affected.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hEllO&quot;.downcase   #=&gt; &quot;hello&quot;\n"
full_name: String#downcase
is_singleton: false
name: downcase
params: |
  str.downcase   => new_str

visibility: public
ri/1.8/system/String/unpack-i.yaml000064400000017523150403660070012662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Decodes <em>str</em> (which may contain binary data) according to the format string, returning an array of each value extracted. The format string consists of a sequence of single-character directives, summarized in the table at the end of this entry. Each directive may be followed by a number, indicating the number of times to repeat with this directive. An asterisk (``<tt>*</tt>'') will use up all remaining elements. The directives <tt>sSiIlL</tt> may each be followed by an underscore (``<tt>_</tt>'') to use the underlying platform's native size for the specified type; otherwise, it uses a platform-independent consistent size. Spaces are ignored in the format string. See also <tt>Array#pack</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;abc \\0\\0abc \\0\\0&quot;.unpack('A6Z6')   #=&gt; [&quot;abc&quot;, &quot;abc &quot;]\n   &quot;abc \\0\\0&quot;.unpack('a3a3')           #=&gt; [&quot;abc&quot;, &quot; \\000\\000&quot;]\n   &quot;abc \\0abc \\0&quot;.unpack('Z*Z*')       #=&gt; [&quot;abc &quot;, &quot;abc &quot;]\n   &quot;aa&quot;.unpack('b8B8')                 #=&gt; [&quot;10000110&quot;, &quot;01100001&quot;]\n   &quot;aaa&quot;.unpack('h2H2c')               #=&gt; [&quot;16&quot;, &quot;61&quot;, 97]\n   &quot;\\xfe\\xff\\xfe\\xff&quot;.unpack('sS')     #=&gt; [-2, 65534]\n   &quot;now=20is&quot;.unpack('M*')             #=&gt; [&quot;now is&quot;]\n   &quot;whole&quot;.unpack('xax2aX2aX1aX2a')    #=&gt; [&quot;h&quot;, &quot;e&quot;, &quot;l&quot;, &quot;l&quot;, &quot;o&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This table summarizes the various formats and the Ruby classes returned by each.
- !ruby/struct:SM::Flow::VERB 
  body: "   Format | Returns | Function\n   -------+---------+-----------------------------------------\n     A    | String  | with trailing nulls and spaces removed\n   -------+---------+-----------------------------------------\n     a    | String  | string\n   -------+---------+-----------------------------------------\n     B    | String  | extract bits from each character (msb first)\n   -------+---------+-----------------------------------------\n     b    | String  | extract bits from each character (lsb first)\n   -------+---------+-----------------------------------------\n     C    | Fixnum  | extract a character as an unsigned integer\n   -------+---------+-----------------------------------------\n     c    | Fixnum  | extract a character as an integer\n   -------+---------+-----------------------------------------\n     d,D  | Float   | treat sizeof(double) characters as\n          |         | a native double\n   -------+---------+-----------------------------------------\n     E    | Float   | treat sizeof(double) characters as\n          |         | a double in little-endian byte order\n   -------+---------+-----------------------------------------\n     e    | Float   | treat sizeof(float) characters as\n          |         | a float in little-endian byte order\n   -------+---------+-----------------------------------------\n     f,F  | Float   | treat sizeof(float) characters as\n          |         | a native float\n   -------+---------+-----------------------------------------\n     G    | Float   | treat sizeof(double) characters as\n          |         | a double in network byte order\n   -------+---------+-----------------------------------------\n     g    | Float   | treat sizeof(float) characters as a\n          |         | float in network byte order\n   -------+---------+-----------------------------------------\n     H    | String  | extract hex nibbles from each character\n          |         | (most significant first)\n   -------+---------+-----------------------------------------\n     h    | String  | extract hex nibbles from each character\n          |         | (least significant first)\n   -------+---------+-----------------------------------------\n     I    | Integer | treat sizeof(int) (modified by _)\n          |         | successive characters as an unsigned\n          |         | native integer\n   -------+---------+-----------------------------------------\n     i    | Integer | treat sizeof(int) (modified by _)\n          |         | successive characters as a signed\n          |         | native integer\n   -------+---------+-----------------------------------------\n     L    | Integer | treat four (modified by _) successive\n          |         | characters as an unsigned native\n          |         | long integer\n   -------+---------+-----------------------------------------\n     l    | Integer | treat four (modified by _) successive\n          |         | characters as a signed native\n          |         | long integer\n   -------+---------+-----------------------------------------\n     M    | String  | quoted-printable\n   -------+---------+-----------------------------------------\n     m    | String  | base64-encoded\n   -------+---------+-----------------------------------------\n     N    | Integer | treat four characters as an unsigned\n          |         | long in network byte order\n   -------+---------+-----------------------------------------\n     n    | Fixnum  | treat two characters as an unsigned\n          |         | short in network byte order\n   -------+---------+-----------------------------------------\n     P    | String  | treat sizeof(char *) characters as a\n          |         | pointer, and  return \\emph{len} characters\n          |         | from the referenced location\n   -------+---------+-----------------------------------------\n     p    | String  | treat sizeof(char *) characters as a\n          |         | pointer to a  null-terminated string\n   -------+---------+-----------------------------------------\n     Q    | Integer | treat 8 characters as an unsigned\n          |         | quad word (64 bits)\n   -------+---------+-----------------------------------------\n     q    | Integer | treat 8 characters as a signed\n          |         | quad word (64 bits)\n   -------+---------+-----------------------------------------\n     S    | Fixnum  | treat two (different if _ used)\n          |         | successive characters as an unsigned\n          |         | short in native byte order\n   -------+---------+-----------------------------------------\n     s    | Fixnum  | Treat two (different if _ used)\n          |         | successive characters as a signed short\n          |         | in native byte order\n   -------+---------+-----------------------------------------\n     U    | Integer | UTF-8 characters as unsigned integers\n   -------+---------+-----------------------------------------\n     u    | String  | UU-encoded\n   -------+---------+-----------------------------------------\n     V    | Fixnum  | treat four characters as an unsigned\n          |         | long in little-endian byte order\n   -------+---------+-----------------------------------------\n     v    | Fixnum  | treat two characters as an unsigned\n          |         | short in little-endian byte order\n   -------+---------+-----------------------------------------\n     w    | Integer | BER-compressed integer (see Array.pack)\n   -------+---------+-----------------------------------------\n     X    | ---     | skip backward one character\n   -------+---------+-----------------------------------------\n     x    | ---     | skip forward one character\n   -------+---------+-----------------------------------------\n     Z    | String  | with trailing nulls removed\n          |         | upto first null with *\n   -------+---------+-----------------------------------------\n     @    | ---     | skip to the offset given by the\n          |         | length argument\n   -------+---------+-----------------------------------------\n"
full_name: String#unpack
is_singleton: false
name: unpack
params: |
  str.unpack(format)   => anArray

visibility: public
ri/1.8/system/String/gsub%21-i.yaml000064400000000677150403660100012545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Performs the substitutions of <tt>String#gsub</tt> in place, returning <em>str</em>, or <tt>nil</tt> if no substitutions were performed.
full_name: String#gsub!
is_singleton: false
name: gsub!
params: |
  str.gsub!(pattern, replacement)        => str or nil
  str.gsub!(pattern) {|match| block }    => str or nil

visibility: public
ri/1.8/system/String/isutf8-i.yaml000064400000000601150403660100012602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns whether <tt>self</tt>'s encoding is UTF-8 or not.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> don't expect this return value is MatchData.
full_name: String#isutf8
is_singleton: false
name: isutf8
params: |
  String#isutf8   -> obj or nil

visibility: public
ri/1.8/system/String/jlength-i.yaml000064400000000321150403660100013012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: jsize
block_params: 
comment: 
full_name: String#jlength
is_singleton: false
name: jlength
params: ()
visibility: public
ri/1.8/system/String/rjust-i.yaml000064400000001344150403660100012534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <em>integer</em> is greater than the length of <em>str</em>, returns a new <tt>String</tt> of length <em>integer</em> with <em>str</em> right justified and padded with <em>padstr</em>; otherwise, returns <em>str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.rjust(4)            #=&gt; &quot;hello&quot;\n   &quot;hello&quot;.rjust(20)           #=&gt; &quot;               hello&quot;\n   &quot;hello&quot;.rjust(20, '1234')   #=&gt; &quot;123412341234123hello&quot;\n"
full_name: String#rjust
is_singleton: false
name: rjust
params: |
  str.rjust(integer, padstr=' ')   => new_str

visibility: public
ri/1.8/system/String/each_line-i.yaml000064400000002322150403660100013271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Splits <em>str</em> using the supplied parameter as the record separator (<tt>$/</tt> by default), passing each substring in turn to the supplied block. If a zero-length record separator is supplied, the string is split into paragraphs delimited by multiple successive newlines.
- !ruby/struct:SM::Flow::VERB 
  body: "   print &quot;Example one\\n&quot;\n   &quot;hello\\nworld&quot;.each {|s| p s}\n   print &quot;Example two\\n&quot;\n   &quot;hello\\nworld&quot;.each('l') {|s| p s}\n   print &quot;Example three\\n&quot;\n   &quot;hello\\n\\n\\nworld&quot;.each('') {|s| p s}\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Example one\n   &quot;hello\\n&quot;\n   &quot;world&quot;\n   Example two\n   &quot;hel&quot;\n   &quot;l&quot;\n   &quot;o\\nworl&quot;\n   &quot;d&quot;\n   Example three\n   &quot;hello\\n\\n\\n&quot;\n   &quot;world&quot;\n"
full_name: String#each_line
is_singleton: false
name: each_line
params: |
  str.each(separator=$/) {|substr| block }        => str
  str.each_line(separator=$/) {|substr| block }   => str

visibility: public
ri/1.8/system/String/to_yaml-i.yaml000064400000000263150403660110013031 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/String/upto-i.yaml000064400000001650150403660110012355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates through successive values, starting at <em>str</em> and ending at <em>other_str</em> inclusive, passing each value in turn to the block. The <tt>String#succ</tt> method is used to generate each value. If optional second argument exclusive is omitted or is <tt>false</tt>, the last value will be included; otherwise it will be excluded.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;a8&quot;.upto(&quot;b6&quot;) {|s| print s, ' ' }\n   for s in &quot;a8&quot;..&quot;b6&quot;\n     print s, ' '\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   a8 a9 b0 b1 b2 b3 b4 b5 b6\n   a8 a9 b0 b1 b2 b3 b4 b5 b6\n"
full_name: String#upto
is_singleton: false
name: upto
params: |
  str.upto(other_str, exclusive=false) {|s| block }   => str

visibility: public
ri/1.8/system/String/concat-i.yaml000064400000001237150403660110012636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Append---Concatenates the given object to <em>str</em>. If the object is a <tt>Fixnum</tt> between 0 and 255, it is converted to a character before concatenation.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;hello &quot;\n   a &lt;&lt; &quot;world&quot;   #=&gt; &quot;hello world&quot;\n   a.concat(33)   #=&gt; &quot;hello world!&quot;\n"
full_name: String#concat
is_singleton: false
name: concat
params: |
  str << fixnum        => str
  str.concat(fixnum)   => str
  str << obj           => str
  str.concat(obj)      => str

visibility: public
ri/1.8/system/String/tr%21-i.yaml000064400000000575150403660110012230 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Translates <em>str</em> in place, using the same rules as <tt>String#tr</tt>. Returns <em>str</em>, or <tt>nil</tt> if no changes were made.
full_name: String#tr!
is_singleton: false
name: tr!
params: |
  str.tr!(from_str, to_str)   => str or nil

visibility: public
ri/1.8/system/String/jsize-i.yaml000064400000000335150403660110012511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #jlength"
full_name: String#jsize
is_singleton: false
name: jsize
params: ()
visibility: public
ri/1.8/system/String/hash-i.yaml000064400000000425150403660110012310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a hash based on the string's length and content.
full_name: String#hash
is_singleton: false
name: hash
params: |
  str.hash   => fixnum

visibility: public
ri/1.8/system/String/rstrip%21-i.yaml000064400000001033150403660110013114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes trailing whitespace from <em>str</em>, returning <tt>nil</tt> if no change was made. See also <tt>String#lstrip!</tt> and <tt>String#strip!</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;  hello  &quot;.rstrip   #=&gt; &quot;  hello&quot;\n   &quot;hello&quot;.rstrip!      #=&gt; nil\n"
full_name: String#rstrip!
is_singleton: false
name: rstrip!
params: |
  str.rstrip!   => self or nil

visibility: public
ri/1.8/system/String/block_scanf-i.yaml000064400000000320150403660110013623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (current)
comment: 
full_name: String#block_scanf
is_singleton: false
name: block_scanf
params: (fstr,&b) {|current| ...}
visibility: public
ri/1.8/system/String/rstrip-i.yaml000064400000001004150403660110012702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with trailing whitespace removed. See also <tt>String#lstrip</tt> and <tt>String#strip</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;  hello  &quot;.rstrip   #=&gt; &quot;  hello&quot;\n   &quot;hello&quot;.rstrip       #=&gt; &quot;hello&quot;\n"
full_name: String#rstrip
is_singleton: false
name: rstrip
params: |
  str.rstrip   => new_str

visibility: public
ri/1.8/system/String/upcase%21-i.yaml000064400000000500150403660120013050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Upcases the contents of <em>str</em>, returning <tt>nil</tt> if no changes were made.
full_name: String#upcase!
is_singleton: false
name: upcase!
params: |
  str.upcase!   => str or nil

visibility: public
ri/1.8/system/String/delete-i.yaml000064400000001431150403660120012626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with all characters in the intersection of its arguments deleted. Uses the same rules for building the set of characters as <tt>String#count</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.delete &quot;l&quot;,&quot;lo&quot;        #=&gt; &quot;heo&quot;\n   &quot;hello&quot;.delete &quot;lo&quot;            #=&gt; &quot;he&quot;\n   &quot;hello&quot;.delete &quot;aeiou&quot;, &quot;^e&quot;   #=&gt; &quot;hell&quot;\n   &quot;hello&quot;.delete &quot;ej-m&quot;          #=&gt; &quot;ho&quot;\n"
full_name: String#delete
is_singleton: false
name: delete
params: |
  str.delete([other_str]+)   => new_str

visibility: public
ri/1.8/system/String/next-i.yaml000064400000002426150403660120012347 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the successor to <em>str</em>. The successor is calculated by incrementing characters starting from the rightmost alphanumeric (or the rightmost character if there are no alphanumerics) in the string. Incrementing a digit always results in another digit, and incrementing a letter results in another letter of the same case. Incrementing nonalphanumerics uses the underlying character set's collating sequence.
- !ruby/struct:SM::Flow::P 
  body: If the increment generates a ``carry,'' the character to the left of it is incremented. This process repeats until there is no carry, adding an additional character if necessary.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;abcd&quot;.succ        #=&gt; &quot;abce&quot;\n   &quot;THX1138&quot;.succ     #=&gt; &quot;THX1139&quot;\n   &quot;&lt;&lt;koala&gt;&gt;&quot;.succ   #=&gt; &quot;&lt;&lt;koalb&gt;&gt;&quot;\n   &quot;1999zzz&quot;.succ     #=&gt; &quot;2000aaa&quot;\n   &quot;ZZZ9999&quot;.succ     #=&gt; &quot;AAAA0000&quot;\n   &quot;***&quot;.succ         #=&gt; &quot;**+&quot;\n"
full_name: String#next
is_singleton: false
name: next
params: |
  str.succ   => new_str
  str.next   => new_str

visibility: public
ri/1.8/system/String/chomp%21-i.yaml000064400000000603150403660120012702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Modifies <em>str</em> in place as described for <tt>String#chomp</tt>, returning <em>str</em>, or <tt>nil</tt> if no modifications were made.
full_name: String#chomp!
is_singleton: false
name: chomp!
params: |
  str.chomp!(separator=$/)   => str or nil

visibility: public
ri/1.8/system/String/yaml_new-c.yaml000064400000000273150403660120013174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String::yaml_new
is_singleton: true
name: yaml_new
params: ( klass, tag, val )
visibility: public
ri/1.8/system/String/%2a-i.yaml000064400000000635150403660130011741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Copy---Returns a new <tt>String</tt> containing <em>integer</em> copies of the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;Ho! &quot; * 3   #=&gt; &quot;Ho! Ho! Ho! &quot;\n"
full_name: String#*
is_singleton: false
name: "*"
params: |
  str * integer   => new_str

visibility: public
ri/1.8/system/String/downcase%21-i.yaml000064400000000510150403660130013375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Downcases the contents of <em>str</em>, returning <tt>nil</tt> if no changes were made.
full_name: String#downcase!
is_singleton: false
name: downcase!
params: |
  str.downcase!   => str or nil

visibility: public
ri/1.8/system/String/start_with%3f-i.yaml000064400000000477150403660130014064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if <em>str</em> starts with the prefix given.
full_name: String#start_with?
is_singleton: false
name: start_with?
params: |
  str.start_with?([prefix]+)   => true or false

visibility: public
ri/1.8/system/String/_regex_quote-i.yaml000064400000000266150403660130014060 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#_regex_quote
is_singleton: false
name: _regex_quote
params: (str)
visibility: private
ri/1.8/system/String/ljust-i.yaml000064400000001343150403660130012530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <em>integer</em> is greater than the length of <em>str</em>, returns a new <tt>String</tt> of length <em>integer</em> with <em>str</em> left justified and padded with <em>padstr</em>; otherwise, returns <em>str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.ljust(4)            #=&gt; &quot;hello&quot;\n   &quot;hello&quot;.ljust(20)           #=&gt; &quot;hello               &quot;\n   &quot;hello&quot;.ljust(20, '1234')   #=&gt; &quot;hello123412341234123&quot;\n"
full_name: String#ljust
is_singleton: false
name: ljust
params: |
  str.ljust(integer, padstr=' ')   => new_str

visibility: public
ri/1.8/system/String/index-i.yaml000064400000001673150403660130012504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the index of the first occurrence of the given <em>substring</em>, character (<em>fixnum</em>), or pattern (<em>regexp</em>) in <em>str</em>. Returns <tt>nil</tt> if not found. If the second parameter is present, it specifies the position in the string to begin the search.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.index('e')             #=&gt; 1\n   &quot;hello&quot;.index('lo')            #=&gt; 3\n   &quot;hello&quot;.index('a')             #=&gt; nil\n   &quot;hello&quot;.index(101)             #=&gt; 1\n   &quot;hello&quot;.index(/[aeiou]/, -3)   #=&gt; 4\n"
full_name: String#index
is_singleton: false
name: index
params: |
  str.index(substring [, offset])   => fixnum or nil
  str.index(fixnum [, offset])      => fixnum or nil
  str.index(regexp [, offset])      => fixnum or nil

visibility: public
ri/1.8/system/String/squeeze%21-i.yaml000064400000000261150403660130013256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#squeeze!
is_singleton: false
name: squeeze!
params: (del=nil)
visibility: public
ri/1.8/system/String/match-i.yaml000064400000001176150403660130012467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>pattern</em> to a <tt>Regexp</tt> (if it isn't already one), then invokes its <tt>match</tt> method on <em>str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   'hello'.match('(.)\\1')      #=&gt; #&lt;MatchData:0x401b3d30&gt;\n   'hello'.match('(.)\\1')[0]   #=&gt; &quot;ll&quot;\n   'hello'.match(/(.)\\1/)[0]   #=&gt; &quot;ll&quot;\n   'hello'.match('xx')         #=&gt; nil\n"
full_name: String#match
is_singleton: false
name: match
params: |
  str.match(pattern)   => matchdata or nil

visibility: public
ri/1.8/system/String/next%21-i.yaml000064400000000472150403660130012557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>String#succ</tt>, but modifies the receiver in place.
full_name: String#next!
is_singleton: false
name: next!
params: |
  str.succ!   => str
  str.next!   => str

visibility: public
ri/1.8/system/String/to_str-i.yaml000064400000000414150403660130012677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the receiver.
full_name: String#to_str
is_singleton: false
name: to_str
params: |
  str.to_s     => str
  str.to_str   => str

visibility: public
ri/1.8/system/String/bytesize-i.yaml000064400000000414150403660130013223 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the length of <em>str</em>.
full_name: String#bytesize
is_singleton: false
name: bytesize
params: |
  str.length   => integer

visibility: public
ri/1.8/system/String/inspect-i.yaml000064400000000674150403660130013042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a printable version of <em>str</em>, with special characters escaped.
- !ruby/struct:SM::Flow::VERB 
  body: "   str = &quot;hello&quot;\n   str[3] = 8\n   str.inspect       #=&gt; &quot;hel\\010o&quot;\n"
full_name: String#inspect
is_singleton: false
name: inspect
params: |
  str.inspect   => string

visibility: public
ri/1.8/system/String/sub%21-i.yaml000064400000000676150403660130012400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Performs the substitutions of <tt>String#sub</tt> in place, returning <em>str</em>, or <tt>nil</tt> if no substitutions were performed.
full_name: String#sub!
is_singleton: false
name: sub!
params: |
  str.sub!(pattern, replacement)          => str or nil
  str.sub!(pattern) {|match| block }      => str or nil

visibility: public
ri/1.8/system/String/capitalize-i.yaml000064400000001101150403660130013504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with the first character converted to uppercase and the remainder to lowercase.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.capitalize    #=&gt; &quot;Hello&quot;\n   &quot;HELLO&quot;.capitalize    #=&gt; &quot;Hello&quot;\n   &quot;123ABC&quot;.capitalize   #=&gt; &quot;123abc&quot;\n"
full_name: String#capitalize
is_singleton: false
name: capitalize
params: |
  str.capitalize   => new_str

visibility: public
ri/1.8/system/String/scan-i.yaml000064400000003043150403660140012313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Both forms iterate through <em>str</em>, matching the pattern (which may be a <tt>Regexp</tt> or a <tt>String</tt>). For each match, a result is generated and either added to the result array or passed to the block. If the pattern contains no groups, each individual result consists of the matched string, <tt>$&amp;</tt>. If the pattern contains groups, each individual result is itself an array containing one entry per group.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;cruel world&quot;\n   a.scan(/\\w+/)        #=&gt; [&quot;cruel&quot;, &quot;world&quot;]\n   a.scan(/.../)        #=&gt; [&quot;cru&quot;, &quot;el &quot;, &quot;wor&quot;]\n   a.scan(/(...)/)      #=&gt; [[&quot;cru&quot;], [&quot;el &quot;], [&quot;wor&quot;]]\n   a.scan(/(..)(..)/)   #=&gt; [[&quot;cr&quot;, &quot;ue&quot;], [&quot;l &quot;, &quot;wo&quot;]]\n"
- !ruby/struct:SM::Flow::P 
  body: "And the block form:"
- !ruby/struct:SM::Flow::VERB 
  body: "   a.scan(/\\w+/) {|w| print &quot;&lt;&lt;#{w}&gt;&gt; &quot; }\n   print &quot;\\n&quot;\n   a.scan(/(.)(.)/) {|x,y| print y, x }\n   print &quot;\\n&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   &lt;&lt;cruel&gt;&gt; &lt;&lt;world&gt;&gt;\n   rceu lowlr\n"
full_name: String#scan
is_singleton: false
name: scan
params: |
  str.scan(pattern)                         => array
  str.scan(pattern) {|match, ...| block }   => str

visibility: public
ri/1.8/system/String/shellsplit-i.yaml000064400000000556150403660140013560 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Splits <tt>str</tt> into an array of tokens in the same way the UNIX Bourne shell does. See +Shellwords::shellsplit+ for details.
full_name: String#shellsplit
is_singleton: false
name: shellsplit
params: |
  str.shellsplit => array

visibility: public
ri/1.8/system/String/include%3f-i.yaml000064400000001111150403660140013302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>str</em> contains the given string or character.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.include? &quot;lo&quot;   #=&gt; true\n   &quot;hello&quot;.include? &quot;ol&quot;   #=&gt; false\n   &quot;hello&quot;.include? ?h     #=&gt; true\n"
full_name: String#include?
is_singleton: false
name: include?
params: |
  str.include? other_str   => true or false
  str.include? fixnum      => true or false

visibility: public
ri/1.8/system/String/new-c.yaml000064400000000445150403660140012155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new string object containing a copy of <em>str</em>.
full_name: String::new
is_singleton: true
name: new
params: |
  String.new(str="")   => new_str

visibility: public
ri/1.8/system/String/reverse-i.yaml000064400000000635150403660140013046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new string with the characters from <em>str</em> in reverse order.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;stressed&quot;.reverse   #=&gt; &quot;desserts&quot;\n"
full_name: String#reverse
is_singleton: false
name: reverse
params: |
  str.reverse   => new_str

visibility: public
ri/1.8/system/String/end_regexp-i.yaml000064400000000256150403660150013513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#end_regexp
is_singleton: false
name: end_regexp
params: ()
visibility: public
ri/1.8/system/String/intern-i.yaml000064400000001560150403660150012671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <tt>Symbol</tt> corresponding to <em>str</em>, creating the symbol if it did not previously exist. See <tt>Symbol#id2name</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;Koala&quot;.intern         #=&gt; :Koala\n   s = 'cat'.to_sym       #=&gt; :cat\n   s == :cat              #=&gt; true\n   s = '@cat'.to_sym      #=&gt; :@cat\n   s == :@cat             #=&gt; true\n"
- !ruby/struct:SM::Flow::P 
  body: This can also be used to create symbols that cannot be represented using the <tt>:xxx</tt> notation.
- !ruby/struct:SM::Flow::VERB 
  body: "   'cat and dog'.to_sym   #=&gt; :&quot;cat and dog&quot;\n"
full_name: String#intern
is_singleton: false
name: intern
params: |
  str.intern   => symbol
  str.to_sym   => symbol

visibility: public
ri/1.8/system/String/split-i.yaml000064400000005520150403660150012525 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Divides <em>str</em> into substrings based on a delimiter, returning an array of these substrings.
- !ruby/struct:SM::Flow::P 
  body: If <em>pattern</em> is a <tt>String</tt>, then its contents are used as the delimiter when splitting <em>str</em>. If <em>pattern</em> is a single space, <em>str</em> is split on whitespace, with leading whitespace and runs of contiguous whitespace characters ignored.
- !ruby/struct:SM::Flow::P 
  body: If <em>pattern</em> is a <tt>Regexp</tt>, <em>str</em> is divided where the pattern matches. Whenever the pattern matches a zero-length string, <em>str</em> is split into individual characters.
- !ruby/struct:SM::Flow::P 
  body: If <em>pattern</em> is omitted, the value of <tt>$;</tt> is used. If <tt>$;</tt> is <tt>nil</tt> (which is the default), <em>str</em> is split on whitespace as if ` ' were specified.
- !ruby/struct:SM::Flow::P 
  body: If the <em>limit</em> parameter is omitted, trailing null fields are suppressed. If <em>limit</em> is a positive number, at most that number of fields will be returned (if <em>limit</em> is <tt>1</tt>, the entire string is returned as the only entry in an array). If negative, there is no limit to the number of fields returned, and trailing null fields are not suppressed.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot; now's  the time&quot;.split        #=&gt; [&quot;now's&quot;, &quot;the&quot;, &quot;time&quot;]\n   &quot; now's  the time&quot;.split(' ')   #=&gt; [&quot;now's&quot;, &quot;the&quot;, &quot;time&quot;]\n   &quot; now's  the time&quot;.split(/ /)   #=&gt; [&quot;&quot;, &quot;now's&quot;, &quot;&quot;, &quot;the&quot;, &quot;time&quot;]\n   &quot;1, 2.34,56, 7&quot;.split(%r{,\\s*}) #=&gt; [&quot;1&quot;, &quot;2.34&quot;, &quot;56&quot;, &quot;7&quot;]\n   &quot;hello&quot;.split(//)               #=&gt; [&quot;h&quot;, &quot;e&quot;, &quot;l&quot;, &quot;l&quot;, &quot;o&quot;]\n   &quot;hello&quot;.split(//, 3)            #=&gt; [&quot;h&quot;, &quot;e&quot;, &quot;llo&quot;]\n   &quot;hi mom&quot;.split(%r{\\s*})         #=&gt; [&quot;h&quot;, &quot;i&quot;, &quot;m&quot;, &quot;o&quot;, &quot;m&quot;]\n\n   &quot;mellow yellow&quot;.split(&quot;ello&quot;)   #=&gt; [&quot;m&quot;, &quot;w y&quot;, &quot;w&quot;]\n   &quot;1,2,,3,4,,&quot;.split(',')         #=&gt; [&quot;1&quot;, &quot;2&quot;, &quot;&quot;, &quot;3&quot;, &quot;4&quot;]\n   &quot;1,2,,3,4,,&quot;.split(',', 4)      #=&gt; [&quot;1&quot;, &quot;2&quot;, &quot;&quot;, &quot;3,4,,&quot;]\n   &quot;1,2,,3,4,,&quot;.split(',', -4)     #=&gt; [&quot;1&quot;, &quot;2&quot;, &quot;&quot;, &quot;3&quot;, &quot;4&quot;, &quot;&quot;, &quot;&quot;]\n"
full_name: String#split
is_singleton: false
name: split
params: |
  str.split(pattern=$;, [limit])   => anArray

visibility: public
ri/1.8/system/String/delete%21-i.yaml000064400000000253150403660150013042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#delete!
is_singleton: false
name: delete!
params: (del)
visibility: public
ri/1.8/system/String/to_sym-i.yaml000064400000001560150403660150012704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the <tt>Symbol</tt> corresponding to <em>str</em>, creating the symbol if it did not previously exist. See <tt>Symbol#id2name</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;Koala&quot;.intern         #=&gt; :Koala\n   s = 'cat'.to_sym       #=&gt; :cat\n   s == :cat              #=&gt; true\n   s = '@cat'.to_sym      #=&gt; :@cat\n   s == :@cat             #=&gt; true\n"
- !ruby/struct:SM::Flow::P 
  body: This can also be used to create symbols that cannot be represented using the <tt>:xxx</tt> notation.
- !ruby/struct:SM::Flow::VERB 
  body: "   'cat and dog'.to_sym   #=&gt; :&quot;cat and dog&quot;\n"
full_name: String#to_sym
is_singleton: false
name: to_sym
params: |
  str.intern   => symbol
  str.to_sym   => symbol

visibility: public
ri/1.8/system/String/replace-i.yaml000064400000000771150403660150013010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the contents and taintedness of <em>str</em> with the corresponding values in <em>other_str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   s = &quot;hello&quot;         #=&gt; &quot;hello&quot;\n   s.replace &quot;world&quot;   #=&gt; &quot;world&quot;\n"
full_name: String#replace
is_singleton: false
name: replace
params: |
  str.replace(other_str)   => str

visibility: public
ri/1.8/system/String/partition-i.yaml000064400000001376150403660150013410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Searches the string for <em>sep</em> and returns the part before it, the <em>sep</em>, and the part after it. If <em>sep</em> is not found, returns <em>str</em> and two empty strings. If no argument is given, Enumerable#partition is called.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.partition(&quot;l&quot;)         #=&gt; [&quot;he&quot;, &quot;l&quot;, &quot;lo&quot;]\n   &quot;hello&quot;.partition(&quot;x&quot;)         #=&gt; [&quot;hello&quot;, &quot;&quot;, &quot;&quot;]\n"
full_name: String#partition
is_singleton: false
name: partition
params: |
  str.partition(sep)              => [head, sep, tail]

visibility: public
ri/1.8/system/String/tr_s-i.yaml000064400000000252150403660150012336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#tr_s
is_singleton: false
name: tr_s
params: (from, to)
visibility: public
ri/1.8/system/String/each_byte-i.yaml000064400000001010150403660150013303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each byte in <em>str</em> to the given block.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.each_byte {|c| print c, ' ' }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   104 101 108 108 111\n"
full_name: String#each_byte
is_singleton: false
name: each_byte
params: |
  str.each_byte {|fixnum| block }    => str

visibility: public
ri/1.8/system/String/tojis-i.yaml000064400000000706150403660150012523 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>self</tt> to ISO-2022-JP
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-jxm0', str).
full_name: String#tojis
is_singleton: false
name: tojis
params: |
  String#tojis   -> string

visibility: public
ri/1.8/system/String/swapcase%21-i.yaml000064400000000575150403660150013415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to <tt>String#swapcase</tt>, but modifies the receiver in place, returning <em>str</em>, or <tt>nil</tt> if no changes were made.
full_name: String#swapcase!
is_singleton: false
name: swapcase!
params: |
  str.swapcase!   => str or nil

visibility: public
ri/1.8/system/String/issjis-i.yaml000064400000000605150403660150012675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns whether <tt>self</tt>'s encoding is Shift_JIS or not.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> don't expect this return value is MatchData.
full_name: String#issjis
is_singleton: false
name: issjis
params: |
  String#issjis   -> obj or nil

visibility: public
ri/1.8/system/String/initialize_copy-i.yaml000064400000001011150403660150014554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Replaces the contents and taintedness of <em>str</em> with the corresponding values in <em>other_str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   s = &quot;hello&quot;         #=&gt; &quot;hello&quot;\n   s.replace &quot;world&quot;   #=&gt; &quot;world&quot;\n"
full_name: String#initialize_copy
is_singleton: false
name: initialize_copy
params: |
  str.replace(other_str)   => str

visibility: public
ri/1.8/system/String/rindex-i.yaml000064400000001762150403660150012667 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the index of the last occurrence of the given <em>substring</em>, character (<em>fixnum</em>), or pattern (<em>regexp</em>) in <em>str</em>. Returns <tt>nil</tt> if not found. If the second parameter is present, it specifies the position in the string to end the search---characters beyond this point will not be considered.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.rindex('e')             #=&gt; 1\n   &quot;hello&quot;.rindex('l')             #=&gt; 3\n   &quot;hello&quot;.rindex('a')             #=&gt; nil\n   &quot;hello&quot;.rindex(101)             #=&gt; 1\n   &quot;hello&quot;.rindex(/[aeiou]/, -2)   #=&gt; 1\n"
full_name: String#rindex
is_singleton: false
name: rindex
params: |
  str.rindex(substring [, fixnum])   => fixnum or nil
  str.rindex(fixnum [, fixnum])   => fixnum or nil
  str.rindex(regexp [, fixnum])   => fixnum or nil

visibility: public
ri/1.8/system/String/original_succ-i.yaml000064400000000353150403660150014212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #succ"
full_name: String#original_succ
is_singleton: false
name: original_succ
params: ()
visibility: private
ri/1.8/system/String/upcase-i.yaml000064400000000777150403660150012663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with all lowercase letters replaced with their uppercase counterparts. The operation is locale insensitive---only characters ``a'' to ``z'' are affected.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hEllO&quot;.upcase   #=&gt; &quot;HELLO&quot;\n"
full_name: String#upcase
is_singleton: false
name: upcase
params: |
  str.upcase   => new_str

visibility: public
ri/1.8/system/String/toutf8-i.yaml000064400000000703150403660150012621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>self</tt> to UTF-8
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-wxm0', str).
full_name: String#toutf8
is_singleton: false
name: toutf8
params: |
  String#toutf8   -> string

visibility: public
ri/1.8/system/String/length-i.yaml000064400000000410150403660150012644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the length of <em>str</em>.
full_name: String#length
is_singleton: false
name: length
params: |
  str.length   => integer

visibility: public
ri/1.8/system/String/swapcase-i.yaml000064400000001051150403660150013173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with uppercase alphabetic characters converted to lowercase and lowercase characters converted to uppercase.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;Hello&quot;.swapcase          #=&gt; &quot;hELLO&quot;\n   &quot;cYbEr_PuNk11&quot;.swapcase   #=&gt; &quot;CyBeR_pUnK11&quot;\n"
full_name: String#swapcase
is_singleton: false
name: swapcase
params: |
  str.swapcase   => new_str

visibility: public
ri/1.8/system/String/%2b-i.yaml000064400000000700150403660150011735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Concatenation---Returns a new <tt>String</tt> containing <em>other_str</em> concatenated to <em>str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;Hello from &quot; + self.to_s   #=&gt; &quot;Hello from main&quot;\n"
full_name: String#+
is_singleton: false
name: +
params: |
  str + other_str   => new_str

visibility: public
ri/1.8/system/String/%3c%3c-i.yaml000064400000001231150403660150012232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Append---Concatenates the given object to <em>str</em>. If the object is a <tt>Fixnum</tt> between 0 and 255, it is converted to a character before concatenation.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;hello &quot;\n   a &lt;&lt; &quot;world&quot;   #=&gt; &quot;hello world&quot;\n   a.concat(33)   #=&gt; &quot;hello world!&quot;\n"
full_name: String#<<
is_singleton: false
name: "<<"
params: |
  str << fixnum        => str
  str.concat(fixnum)   => str
  str << obj           => str
  str.concat(obj)      => str

visibility: public
ri/1.8/system/String/capitalize%21-i.yaml000064400000001105150403660150013722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Modifies <em>str</em> by converting the first character to uppercase and the remainder to lowercase. Returns <tt>nil</tt> if no changes are made.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;hello&quot;\n   a.capitalize!   #=&gt; &quot;Hello&quot;\n   a               #=&gt; &quot;Hello&quot;\n   a.capitalize!   #=&gt; nil\n"
full_name: String#capitalize!
is_singleton: false
name: capitalize!
params: |
  str.capitalize!   => str or nil

visibility: public
ri/1.8/system/String/chop%21-i.yaml000064400000000244150403660150012531 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#chop!
is_singleton: false
name: chop!
params: ()
visibility: public
ri/1.8/system/String/original_succ%21-i.yaml000064400000000356150403660150014425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #succ!"
full_name: String#original_succ!
is_singleton: false
name: original_succ!
params: ()
visibility: private
ri/1.8/system/String/casecmp-i.yaml000064400000001122150403660150012777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Case-insensitive version of <tt>String#&lt;=&gt;</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;abcdef&quot;.casecmp(&quot;abcde&quot;)     #=&gt; 1\n   &quot;aBcDeF&quot;.casecmp(&quot;abcdef&quot;)    #=&gt; 0\n   &quot;abcdef&quot;.casecmp(&quot;abcdefg&quot;)   #=&gt; -1\n   &quot;abcdef&quot;.casecmp(&quot;ABCDEF&quot;)    #=&gt; 0\n"
full_name: String#casecmp
is_singleton: false
name: casecmp
params: |
  str.casecmp(other_str)   => -1, 0, +1

visibility: public
ri/1.8/system/String/succ-i.yaml000064400000000242150403660150012323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#succ
is_singleton: false
name: succ
params: ()
visibility: public
ri/1.8/system/String/toeuc-i.yaml000064400000000701150403660150012505 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert <tt>self</tt> to EUC-JP
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-exm0', str).
full_name: String#toeuc
is_singleton: false
name: toeuc
params: |
  String#toeuc   -> string

visibility: public
ri/1.8/system/String/mbchar%3f-i.yaml000064400000000250150403660150013117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#mbchar?
is_singleton: false
name: mbchar?
params: ()
visibility: public
ri/1.8/system/String/to_s-i.yaml000064400000000410150403660150012327 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the receiver.
full_name: String#to_s
is_singleton: false
name: to_s
params: |
  str.to_s     => str
  str.to_str   => str

visibility: public
ri/1.8/system/String/lstrip%21-i.yaml000064400000001032150403660150013111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes leading whitespace from <em>str</em>, returning <tt>nil</tt> if no change was made. See also <tt>String#rstrip!</tt> and <tt>String#strip!</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;  hello  &quot;.lstrip   #=&gt; &quot;hello  &quot;\n   &quot;hello&quot;.lstrip!      #=&gt; nil\n"
full_name: String#lstrip!
is_singleton: false
name: lstrip!
params: |
  str.lstrip!   => self or nil

visibility: public
ri/1.8/system/String/%3d%3d-i.yaml000064400000000616150403660150012242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---If <em>obj</em> is not a <tt>String</tt>, returns <tt>false</tt>. Otherwise, returns <tt>true</tt> if <em>str</em> <tt>&lt;=&gt;</tt> <em>obj</em> returns zero.
full_name: String#==
is_singleton: false
name: ==
params: |
  str == obj   => true or false

visibility: public
ri/1.8/system/String/insert-i.yaml000064400000001570150403660150012677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Inserts <em>other_str</em> before the character at the given <em>index</em>, modifying <em>str</em>. Negative indices count from the end of the string, and insert <em>after</em> the given character. The intent is insert <em>aString</em> so that it starts at the given <em>index</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;abcd&quot;.insert(0, 'X')    #=&gt; &quot;Xabcd&quot;\n   &quot;abcd&quot;.insert(3, 'X')    #=&gt; &quot;abcXd&quot;\n   &quot;abcd&quot;.insert(4, 'X')    #=&gt; &quot;abcdX&quot;\n   &quot;abcd&quot;.insert(-3, 'X')   #=&gt; &quot;abXcd&quot;\n   &quot;abcd&quot;.insert(-1, 'X')   #=&gt; &quot;abcdX&quot;\n"
full_name: String#insert
is_singleton: false
name: insert
params: |
  str.insert(index, other_str)   => str

visibility: public
ri/1.8/system/String/each_char-i.yaml000064400000001001150403660150013255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Passes each character in <em>str</em> to the given block.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.each_char {|c| print c, ' ' }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   h e l l o\n"
full_name: String#each_char
is_singleton: false
name: each_char
params: |
  str.each_char {|cstr| block }    => str

visibility: public
ri/1.8/system/String/sub-i.yaml000064400000003306150403660150012163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with the <em>first</em> occurrence of <em>pattern</em> replaced with either <em>replacement</em> or the value of the block. The <em>pattern</em> will typically be a <tt>Regexp</tt>; if it is a <tt>String</tt> then no regular expression metacharacters will be interpreted (that is <tt>/\d/</tt> will match a digit, but <tt>'\d'</tt> will match a backslash followed by a 'd').
- !ruby/struct:SM::Flow::P 
  body: If the method call specifies <em>replacement</em>, special variables such as <tt>$&amp;</tt> will not be useful, as substitution into the string occurs before the pattern match starts. However, the sequences <tt>\1</tt>, <tt>\2</tt>, etc., may be used.
- !ruby/struct:SM::Flow::P 
  body: In the block form, the current match string is passed in as a parameter, and variables such as <tt>$1</tt>, <tt>$2</tt>, <tt>$`</tt>, <tt>$&amp;</tt>, and <tt>$'</tt> will be set appropriately. The value returned by the block will be substituted for the match on each call.
- !ruby/struct:SM::Flow::P 
  body: The result inherits any tainting in the original string or any supplied replacement string.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.sub(/[aeiou]/, '*')               #=&gt; &quot;h*llo&quot;\n   &quot;hello&quot;.sub(/([aeiou])/, '&lt;\\1&gt;')          #=&gt; &quot;h&lt;e&gt;llo&quot;\n   &quot;hello&quot;.sub(/./) {|s| s[0].to_s + ' ' }   #=&gt; &quot;104 ello&quot;\n"
full_name: String#sub
is_singleton: false
name: sub
params: |
  str.sub(pattern, replacement)         => new_str
  str.sub(pattern) {|match| block }     => new_str

visibility: public
ri/1.8/system/String/sum-i.yaml000064400000001017150403660150012173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a basic <em>n</em>-bit checksum of the characters in <em>str</em>, where <em>n</em> is the optional <tt>Fixnum</tt> parameter, defaulting to 16. The result is simply the sum of the binary value of each character in <em>str</em> modulo <tt>2n - 1</tt>. This is not a particularly good checksum.
full_name: String#sum
is_singleton: false
name: sum
params: |
  str.sum(n=16)   => integer

visibility: public
ri/1.8/system/String/tr_s%21-i.yaml000064400000000572150403660150012553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Performs <tt>String#tr_s</tt> processing on <em>str</em> in place, returning <em>str</em>, or <tt>nil</tt> if no changes were made.
full_name: String#tr_s!
is_singleton: false
name: tr_s!
params: |
  str.tr_s!(from_str, to_str)   => str or nil

visibility: public
ri/1.8/system/String/dump-i.yaml000064400000000550150403660160012336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produces a version of <em>str</em> with all nonprinting characters replaced by <tt>\nnn</tt> notation and all special characters escaped.
full_name: String#dump
is_singleton: false
name: dump
params: |
  str.dump   => new_str

visibility: public
ri/1.8/system/String/_expand_ch-i.yaml000064400000000262150403660160013461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#_expand_ch
is_singleton: false
name: _expand_ch
params: (str)
visibility: private
ri/1.8/system/String/lstrip-i.yaml000064400000001003150403660160012700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of <em>str</em> with leading whitespace removed. See also <tt>String#rstrip</tt> and <tt>String#strip</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;  hello  &quot;.lstrip   #=&gt; &quot;hello  &quot;\n   &quot;hello&quot;.lstrip       #=&gt; &quot;hello&quot;\n"
full_name: String#lstrip
is_singleton: false
name: lstrip
params: |
  str.lstrip   => new_str

visibility: public
ri/1.8/system/String/strip%21-i.yaml000064400000000530150403660160012740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes leading and trailing whitespace from <em>str</em>. Returns <tt>nil</tt> if <em>str</em> was not altered.
full_name: String#strip!
is_singleton: false
name: strip!
params: |
  str.strip!   => str or nil

visibility: public
ri/1.8/system/String/is_complex_yaml%3f-i.yaml000064400000000272150403660160015054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#is_complex_yaml?
is_singleton: false
name: is_complex_yaml?
params: ()
visibility: public
ri/1.8/system/String/to_f-i.yaml000064400000001275150403660170012326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the result of interpreting leading characters in <em>str</em> as a floating point number. Extraneous characters past the end of a valid number are ignored. If there is not a valid number at the start of <em>str</em>, <tt>0.0</tt> is returned. This method never raises an exception.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;123.45e1&quot;.to_f        #=&gt; 1234.5\n   &quot;45.67 degrees&quot;.to_f   #=&gt; 45.67\n   &quot;thx1138&quot;.to_f         #=&gt; 0.0\n"
full_name: String#to_f
is_singleton: false
name: to_f
params: |
  str.to_f   => float

visibility: public
ri/1.8/system/String/%5b%5d%3d-i.yaml000064400000002331150403660170012536 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Element Assignment---Replaces some or all of the content of <em>str</em>. The portion of the string affected is determined using the same criteria as <tt>String#[]</tt>. If the replacement string is not the same length as the text it is replacing, the string will be adjusted accordingly. If the regular expression or string is used as the index doesn't match a position in the string, <tt>IndexError</tt> is raised. If the regular expression form is used, the optional second <tt>Fixnum</tt> allows you to specify which portion of the match to replace (effectively using the <tt>MatchData</tt> indexing rules. The forms that take a <tt>Fixnum</tt> will raise an <tt>IndexError</tt> if the value is out of range; the <tt>Range</tt> form will raise a <tt>RangeError</tt>, and the <tt>Regexp</tt> and <tt>String</tt> forms will silently ignore the assignment.
full_name: String#[]=
is_singleton: false
name: "[]="
params: |
  str[fixnum] = fixnum
  str[fixnum] = new_str
  str[fixnum, fixnum] = new_str
  str[range] = aString
  str[regexp] = new_str
  str[regexp, fixnum] = new_str
  str[other_str] = new_str

visibility: public
ri/1.8/system/String/iseuc-i.yaml000064400000000577150403660170012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns whether <tt>self</tt>'s encoding is EUC-JP or not.
- !ruby/struct:SM::Flow::P 
  body: <b>Note</b> don't expect this return value is MatchData.
full_name: String#iseuc
is_singleton: false
name: iseuc
params: |
  String#iseuc   -> obj or nil

visibility: public
ri/1.8/system/String/chop-i.yaml000064400000000242150403660170012321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#chop
is_singleton: false
name: chop
params: ()
visibility: public
ri/1.8/system/String/rpartition-i.yaml000064400000001343150403660170013566 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Searches <em>sep</em> in the string from the end of the string, and returns the part before it, the <em>sep</em>, and the part after it. If <em>sep</em> is not found, returns two empty strings and <em>str</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.rpartition(&quot;l&quot;)         #=&gt; [&quot;hel&quot;, &quot;l&quot;, &quot;o&quot;]\n   &quot;hello&quot;.rpartition(&quot;x&quot;)         #=&gt; [&quot;&quot;, &quot;&quot;, &quot;hello&quot;]\n"
full_name: String#rpartition
is_singleton: false
name: rpartition
params: |
  str.rpartition(sep)            => [head, sep, tail]

visibility: public
ri/1.8/system/String/count-i.yaml000064400000001434150403660170012524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Each <em>other_str</em> parameter defines a set of characters to count. The intersection of these sets defines the characters to count in <em>str</em>. Any <em>other_str</em> that starts with a caret (^) is negated. The sequence c1--c2 means all characters between c1 and c2.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;hello world&quot;\n   a.count &quot;lo&quot;            #=&gt; 5\n   a.count &quot;lo&quot;, &quot;o&quot;       #=&gt; 2\n   a.count &quot;hello&quot;, &quot;^l&quot;   #=&gt; 4\n   a.count &quot;ej-m&quot;          #=&gt; 4\n"
full_name: String#count
is_singleton: false
name: count
params: |
  str.count([other_str]+)   => fixnum

visibility: public
ri/1.8/system/String/end_with%3f-i.yaml000064400000000467150403660200013472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if <em>str</em> ends with the suffix given.
full_name: String#end_with?
is_singleton: false
name: end_with?
params: |
  str.end_with?([suffix]+)   => true or false

visibility: public
ri/1.8/system/String/jcount-i.yaml000064400000000251150403660200012664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: String#jcount
is_singleton: false
name: jcount
params: (str)
visibility: public
ri/1.8/system/String/shellescape-i.yaml000064400000000556150403660200013662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escapes <tt>str</tt> so that it can be safely used in a Bourne shell command line. See +Shellwords::shellescape+ for details.
full_name: String#shellescape
is_singleton: false
name: shellescape
params: |
  str.shellescape => string

visibility: public
ri/1.8/system/String/bytes-i.yaml000064400000000772150403660200012520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an enumerator that gives each byte in the string. If a block is given, it iterates over each byte in the string.
- !ruby/struct:SM::Flow::VERB 
  body: "   &quot;hello&quot;.bytes.to_a        #=&gt; [104, 101, 108, 108, 111]\n"
full_name: String#bytes
is_singleton: false
name: bytes
params: |
  str.bytes   => anEnumerator
  str.bytes {|fixnum| block }    => str

visibility: public
ri/1.8/system/Benchmark/realtime-i.yaml000064400000000433150403660200013612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the elapsed real time used to execute the given block.
full_name: Benchmark#realtime
is_singleton: false
name: realtime
params: () {|| ...}
visibility: public
ri/1.8/system/Benchmark/bm-i.yaml000064400000002102150403660200012401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: report
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A simple interface to the #benchmark method, #bm is generates sequential reports with labels. The parameters have the same meaning as for #benchmark."
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'benchmark'\n\n    n = 50000\n    Benchmark.bm(7) do |x|\n      x.report(&quot;for:&quot;)   { for i in 1..n; a = &quot;1&quot;; end }\n      x.report(&quot;times:&quot;) { n.times do   ; a = &quot;1&quot;; end }\n      x.report(&quot;upto:&quot;)  { 1.upto(n) do ; a = &quot;1&quot;; end }\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "                    user     system      total        real\n       for:     1.050000   0.000000   1.050000 (  0.503462)\n       times:   1.533333   0.016667   1.550000 (  0.735473)\n       upto:    1.500000   0.016667   1.516667 (  0.711239)\n"
full_name: Benchmark#bm
is_singleton: false
name: bm
params: (label_width = 0, *labels) {|report| ...}
visibility: public
ri/1.8/system/Benchmark/bmbm-i.yaml000064400000003501150403660210012725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: job
comment: 
- !ruby/struct:SM::Flow::P 
  body: "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. <tt>GC.start</tt> 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."
- !ruby/struct:SM::Flow::P 
  body: "Because #bmbm takes two passes through the tests, it can calculate the required label width."
- !ruby/struct:SM::Flow::VERB 
  body: "      require 'benchmark'\n\n      array = (1..1000000).map { rand }\n\n      Benchmark.bmbm do |x|\n        x.report(&quot;sort!&quot;) { array.dup.sort! }\n        x.report(&quot;sort&quot;)  { array.dup.sort  }\n      end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "       Rehearsal -----------------------------------------\n       sort!  11.928000   0.010000  11.938000 ( 12.756000)\n       sort   13.048000   0.020000  13.068000 ( 13.857000)\n       ------------------------------- total: 25.006000sec\n\n                   user     system      total        real\n       sort!  12.959000   0.010000  12.969000 ( 13.793000)\n       sort   12.007000   0.000000  12.007000 ( 12.791000)\n"
- !ruby/struct:SM::Flow::P 
  body: "#bmbm yields a Benchmark::Job object and returns an array of Benchmark::Tms objects."
full_name: Benchmark#bmbm
is_singleton: false
name: bmbm
params: (width = 0) {|job| ...}
visibility: public
ri/1.8/system/Benchmark/Job/cdesc-Job.yaml000064400000000544150403660210014071 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
constants: []

full_name: Benchmark::Job
includes: []

instance_methods: []

name: Job
superclass: Object
ri/1.8/system/Benchmark/measure-i.yaml000064400000000461150403660210013453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the time used to execute the given block as a Benchmark::Tms object.
full_name: Benchmark#measure
is_singleton: false
name: measure
params: (label = "") {|| ...}
visibility: public
ri/1.8/system/Benchmark/cdesc-Benchmark.yaml000064400000012706150403660210014542 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Benchmark module provides methods to measure and report the time used to execute Ruby code.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Measure the time to construct the string given by the expression <tt>&quot;a&quot;*1_000_000</tt>:"
  - !ruby/struct:SM::Flow::VERB 
    body: "    require 'benchmark'\n\n    puts Benchmark.measure { &quot;a&quot;*1_000_000 }\n"
  - !ruby/struct:SM::Flow::P 
    body: "On my machine (FreeBSD 3.2 on P5, 100MHz) this generates:"
  - !ruby/struct:SM::Flow::VERB 
    body: "    1.166667   0.050000   1.216667 (  0.571355)\n"
  - !ruby/struct:SM::Flow::P 
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Do some experiments sequentially using the #bm method:"
  - !ruby/struct:SM::Flow::VERB 
    body: "    require 'benchmark'\n\n    n = 50000\n    Benchmark.bm do |x|\n      x.report { for i in 1..n; a = &quot;1&quot;; end }\n      x.report { n.times do   ; a = &quot;1&quot;; end }\n      x.report { 1.upto(n) do ; a = &quot;1&quot;; end }\n    end\n"
  - !ruby/struct:SM::Flow::P 
    body: "The result:"
  - !ruby/struct:SM::Flow::VERB 
    body: "           user     system      total        real\n       1.033333   0.016667   1.016667 (  0.492106)\n       1.483333   0.000000   1.483333 (  0.694605)\n       1.516667   0.000000   1.516667 (  0.711077)\n"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Continuing the previous example, put a label in each report:"
  - !ruby/struct:SM::Flow::VERB 
    body: "    require 'benchmark'\n\n    n = 50000\n    Benchmark.bm(7) do |x|\n      x.report(&quot;for:&quot;)   { for i in 1..n; a = &quot;1&quot;; end }\n      x.report(&quot;times:&quot;) { n.times do   ; a = &quot;1&quot;; end }\n      x.report(&quot;upto:&quot;)  { 1.upto(n) do ; a = &quot;1&quot;; end }\n    end\n"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "The result:"
- !ruby/struct:SM::Flow::VERB 
  body: "                    user     system      total        real\n       for:     1.050000   0.000000   1.050000 (  0.503462)\n       times:   1.533333   0.016667   1.550000 (  0.735473)\n       upto:    1.500000   0.016667   1.516667 (  0.711239)\n"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "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:"
  - !ruby/struct:SM::Flow::VERB 
    body: "    require 'benchmark'\n\n    array = (1..1000000).map { rand }\n\n    Benchmark.bmbm do |x|\n      x.report(&quot;sort!&quot;) { array.dup.sort! }\n      x.report(&quot;sort&quot;)  { array.dup.sort  }\n    end\n"
  - !ruby/struct:SM::Flow::P 
    body: "The result:"
  - !ruby/struct:SM::Flow::VERB 
    body: "     Rehearsal -----------------------------------------\n     sort!  11.928000   0.010000  11.938000 ( 12.756000)\n     sort   13.048000   0.020000  13.068000 ( 13.857000)\n     ------------------------------- total: 25.006000sec\n\n                 user     system      total        real\n     sort!  12.959000   0.010000  12.969000 ( 13.793000)\n     sort   12.007000   0.000000  12.007000 ( 12.791000)\n"
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Report statistics of sequential experiments with unique labels, using the #benchmark method:"
  - !ruby/struct:SM::Flow::VERB 
    body: "    require 'benchmark'\n\n    n = 50000\n    Benchmark.benchmark(&quot; &quot;*7 + CAPTION, 7, FMTSTR, &quot;&gt;total:&quot;, &quot;&gt;avg:&quot;) do |x|\n      tf = x.report(&quot;for:&quot;)   { for i in 1..n; a = &quot;1&quot;; end }\n      tt = x.report(&quot;times:&quot;) { n.times do   ; a = &quot;1&quot;; end }\n      tu = x.report(&quot;upto:&quot;)  { 1.upto(n) do ; a = &quot;1&quot;; end }\n      [tf+tt+tu, (tf+tt+tu)/3]\n    end\n"
  - !ruby/struct:SM::Flow::P 
    body: "The result:"
  - !ruby/struct:SM::Flow::VERB 
    body: "                  user     system      total        real\n     for:     1.016667   0.016667   1.033333 (  0.485749)\n     times:   1.450000   0.016667   1.466667 (  0.681367)\n     upto:    1.533333   0.000000   1.533333 (  0.722166)\n     &gt;total:  4.000000   0.033333   4.033333 (  1.889282)\n     &gt;avg:    1.333333   0.011111   1.344444 (  0.629761)\n"
  type: :BULLET
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BENCHMARK_VERSION
  value: "\"2002-04-25\""
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The default caption string (heading above the output times).
  name: CAPTION
  value: Benchmark::Tms::CAPTION
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The default format string used to display times. See also Benchmark::Tms#format.
  name: FMTSTR
  value: Benchmark::Tms::FMTSTR
full_name: Benchmark
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: benchmark
- !ruby/object:RI::MethodSummary 
  name: bm
- !ruby/object:RI::MethodSummary 
  name: bmbm
- !ruby/object:RI::MethodSummary 
  name: measure
- !ruby/object:RI::MethodSummary 
  name: realtime
name: Benchmark
superclass: 
ri/1.8/system/Benchmark/benchmark-i.yaml000064400000004077150403660210013753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: report
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the block with a <tt>Benchmark::Report</tt> object, which may be used to collect and report on the results of individual benchmark tests. Reserves <em>label_width</em> leading spaces for labels on each line. Prints <em>caption</em> at the top of the report, and uses <em>fmt</em> to format each line. If the block returns an array of <tt>Benchmark::Tms</tt> objects, these will be used to format additional lines of output. If <em>label</em> parameters are given, these are used to label these extra lines.
- !ruby/struct:SM::Flow::P 
  body: "<em>Note</em>: 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."
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'benchmark'\n    include Benchmark          # we need the CAPTION and FMTSTR constants\n\n    n = 50000\n    Benchmark.benchmark(&quot; &quot;*7 + CAPTION, 7, FMTSTR, &quot;&gt;total:&quot;, &quot;&gt;avg:&quot;) do |x|\n      tf = x.report(&quot;for:&quot;)   { for i in 1..n; a = &quot;1&quot;; end }\n      tt = x.report(&quot;times:&quot;) { n.times do   ; a = &quot;1&quot;; end }\n      tu = x.report(&quot;upto:&quot;)  { 1.upto(n) do ; a = &quot;1&quot;; end }\n      [tf+tt+tu, (tf+tt+tu)/3]\n    end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "                    user     system      total        real\n       for:     1.016667   0.016667   1.033333 (  0.485749)\n       times:   1.450000   0.016667   1.466667 (  0.681367)\n       upto:    1.533333   0.000000   1.533333 (  0.722166)\n       &gt;total:  4.000000   0.033333   4.033333 (  1.889282)\n       &gt;avg:    1.333333   0.011111   1.344444 (  0.629761)\n"
full_name: Benchmark#benchmark
is_singleton: false
name: benchmark
params: (caption = "", label_width = nil, fmtstr = nil, *labels) {|report| ...}
visibility: public
ri/1.8/system/Benchmark/Report/cdesc-Report.yaml000064400000000535150403660220015374 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This class is used by the Benchmark.benchmark and Benchmark.bm methods. It is of little direct interest to the user.
constants: []

full_name: Benchmark::Report
includes: []

instance_methods: []

name: Report
superclass: Object
ri/1.8/system/Benchmark/Tms/add%21-i.yaml000064400000000355150403660220013520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "An in-place version of #add."
full_name: Benchmark::Tms#add!
is_singleton: false
name: add!
params: ()
visibility: public
ri/1.8/system/Benchmark/Tms/to_a-i.yaml000064400000000562150403660220013502 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Benchmark::Tms#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/Benchmark/Tms/%2f-i.yaml000064400000000566150403660220013140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a new Tms object obtained by memberwise division of the individual times for this Tms object by <em>x</em>. This method and #+() are useful for taking statistics."
full_name: Benchmark::Tms#/
is_singleton: false
name: /
params: (x)
visibility: public
ri/1.8/system/Benchmark/Tms/memberwise-i.yaml000064400000000276150403660220014721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Benchmark::Tms#memberwise
is_singleton: false
name: memberwise
params: (op, x)
visibility: protected
ri/1.8/system/Benchmark/Tms/%2a-i.yaml000064400000000505150403660220013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new Tms object obtained by memberwise multiplication of the individual times for this Tms object by <em>x</em>.
full_name: Benchmark::Tms#*
is_singleton: false
name: "*"
params: (x)
visibility: public
ri/1.8/system/Benchmark/Tms/add-i.yaml000064400000000553150403660220013310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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 (<em>blk</em>).
full_name: Benchmark::Tms#add
is_singleton: false
name: add
params: () {|| ...}
visibility: public
ri/1.8/system/Benchmark/Tms/new-c.yaml000064400000001025150403660220013336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an initialized Tms object which has <em>u</em> as the user CPU time, <em>s</em> as the system CPU time, <em>cu</em> as the children's user CPU time, <em>cs</em> as the children's system CPU time, <em>real</em> as the elapsed real time and <em>l</em> as the label.
full_name: Benchmark::Tms::new
is_singleton: true
name: new
params: (u = 0.0, s = 0.0, cu = 0.0, cs = 0.0, real = 0.0, l = nil)
visibility: public
ri/1.8/system/Benchmark/Tms/%2b-i.yaml000064400000000620150403660220013123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "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."
full_name: Benchmark::Tms#+
is_singleton: false
name: +
params: (other)
visibility: public
ri/1.8/system/Benchmark/Tms/format-i.yaml000064400000003065150403660220014051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "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:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>%u</tt>:"
    body: Replaced by the user CPU time, as reported by Tms#utime.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>%y</tt>:"
    body: "Replaced by the system CPU time, as reported by #stime (Mnemonic: y of &quot;s*y*stem&quot;)"
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>%U</tt>:"
    body: Replaced by the children's user CPU time, as reported by Tms#cutime
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>%Y</tt>:"
    body: Replaced by the children's system CPU time, as reported by Tms#cstime
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>%t</tt>:"
    body: Replaced by the total CPU time, as reported by Tms#total
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>%r</tt>:"
    body: Replaced by the elapsed real time, as reported by Tms#real
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>%n</tt>:"
    body: "Replaced by the label string, as reported by Tms#label (Mnemonic: n of &quot;*n*ame&quot;)"
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: If <em>fmtstr</em> is not given, FMTSTR is used as default value, detailing the user, system and real elapsed time.
full_name: Benchmark::Tms#format
is_singleton: false
name: format
params: (arg0 = nil, *args)
visibility: public
ri/1.8/system/Benchmark/Tms/cdesc-Tms.yaml000064400000003643150403660220014157 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: System CPU time of children
  name: cstime
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: User CPU time of children
  name: cutime
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Label
  name: label
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Elapsed real time
  name: real
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: System CPU time
  name: stime
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Total time, that is <em>utime</em> + <em>stime</em> + <em>cutime</em> + <em>cstime</em>
  name: total
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: User CPU time
  name: utime
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A data object, representing the times associated with a benchmark measurement.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CAPTION
  value: "\"      user     system      total        real\\n\""
- !ruby/object:RI::Constant 
  comment: 
  name: FMTSTR
  value: "\"%10.6u %10.6y %10.6t %10.6r\\n\""
full_name: Benchmark::Tms
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "*"
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: /
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: add!
- !ruby/object:RI::MethodSummary 
  name: format
- !ruby/object:RI::MethodSummary 
  name: memberwise
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Tms
superclass: Object
ri/1.8/system/Benchmark/Tms/to_s-i.yaml000064400000000341150403660220013517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Same as #format."
full_name: Benchmark::Tms#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Benchmark/Tms/%2d-i.yaml000064400000000533150403660220013130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new Tms object obtained by memberwise subtraction of the individual times for the other Tms object from those of this Tms object.
full_name: Benchmark::Tms#-
is_singleton: false
name: "-"
params: (other)
visibility: public
ri/1.8/system/BasicSocket/recv_nonblock-i.yaml000064400000003614150403660220015142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Receives up to <em>maxlen</em> bytes from <tt>socket</tt> using recvfrom(2) after O_NONBLOCK is set for the underlying file descriptor. <em>flags</em> is zero or more of the <tt>MSG_</tt> options. The result, <em>mesg</em>, is the data received.
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>maxlen</tt> - the number of bytes to receive from the socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>flags</tt> - zero or more of the <tt>MSG_</tt> options
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     serv = TCPServer.new(&quot;127.0.0.1&quot;, 0)\n     af, port, host, addr = serv.addr\n     c = TCPSocket.new(addr, port)\n     s = serv.accept\n     c.send &quot;aaa&quot;, 0\n     IO.select([s])\n     p s.recv_nonblock(10) #=&gt; &quot;aaa&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#recvfrom for the exceptions that may be thrown if the call to <em>recv_nonblock</em> fails.
- !ruby/struct:SM::Flow::P 
  body: BasicSocket#recv_nonblock may raise any error corresponding to recvfrom(2) failure, including Errno::EAGAIN.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#recvfrom
  type: :BULLET
full_name: BasicSocket#recv_nonblock
is_singleton: false
name: recv_nonblock
params: |
  basicsocket.recv_nonblock(maxlen) => mesg
  basicsocket.recv_nonblock(maxlen, flags) => mesg

visibility: public
ri/1.8/system/BasicSocket/setsockopt-i.yaml000064400000005426150403660230014520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets a socket option. These are protocol and system specific, see your local sytem documentation for details.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>level</tt> is an integer, usually one of the SOL_ constants such as Socket::SOL_SOCKET, or a protocol level.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>optname</tt> is an integer, usually one of the SO_ constants, such as Socket::SO_REUSEADDR.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt>optval</tt> is the value of the option, it is passed to the underlying setsockopt() as a pointer to a certain number of bytes. How this is done depends on the type:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: "Fixnum: value is assigned to an int, and a pointer to the int is passed, with length of sizeof(int)."
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: "true or false: 1 or 0 (respectively) is assigned to an int, and the int is passed as for a Fixnum. Note that <tt>false</tt> must be passed, not <tt>nil</tt>."
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: "String: the string's data and length is passed to the socket."
    type: :BULLET
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Examples
- !ruby/struct:SM::Flow::P 
  body: "Some socket options are integers with boolean values, in this case #setsockopt could be called like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  sock.setsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR, true)\n"
- !ruby/struct:SM::Flow::P 
  body: "Some socket options are integers with numeric values, in this case #setsockopt could be called like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_TTL, 255)\n"
- !ruby/struct:SM::Flow::P 
  body: "Option values may be structs. Passing them can be complex as it involves examining your system headers to determine the correct definition. An example is an <tt>ip_mreq</tt>, which may be defined in your system headers as:"
- !ruby/struct:SM::Flow::VERB 
  body: "  struct ip_mreq {\n    struct  in_addr imr_multiaddr;\n    struct  in_addr imr_interface;\n  };\n"
- !ruby/struct:SM::Flow::P 
  body: "In this case #setsockopt could be called like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  optval =  IPAddr.new(&quot;224.0.0.251&quot;) + Socket::INADDR_ANY\n  sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_ADD_MEMBERSHIP, optval)\n"
full_name: BasicSocket#setsockopt
is_singleton: false
name: setsockopt
params: " setsockopt(level, optname, optval)\n"
visibility: public
ri/1.8/system/BasicSocket/getsockopt-i.yaml000064400000004214150403660230014476 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Gets a socket option. These are protocol and system specific, see your local sytem documentation for details. The option is returned as a String with the data being the binary value of the socket option.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>level</tt> is an integer, usually one of the SOL_ constants such as Socket::SOL_SOCKET, or a protocol level.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>optname</tt> is an integer, usually one of the SO_ constants, such as Socket::SO_REUSEADDR.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Examples
- !ruby/struct:SM::Flow::P 
  body: "Some socket options are integers with boolean values, in this case #getsockopt could be called like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  optval = sock.getsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR)\n  optval = optval.unpack &quot;i&quot;\n  reuseaddr = optval[0] == 0 ? false : true\n"
- !ruby/struct:SM::Flow::P 
  body: "Some socket options are integers with numeric values, in this case #getsockopt could be called like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  optval = sock.getsockopt(Socket::IPPROTO_IP, Socket::IP_TTL)\n  ipttl = optval.unpack(&quot;i&quot;)[0]\n"
- !ruby/struct:SM::Flow::P 
  body: "Option values may be structs. Decoding them can be complex as it involves examining your system headers to determine the correct definition. An example is a +struct linger+, which may be defined in your system headers as:"
- !ruby/struct:SM::Flow::VERB 
  body: "  struct linger {\n    int l_onoff;\n    int l_linger;\n  };\n"
- !ruby/struct:SM::Flow::P 
  body: "In this case #getsockopt could be called like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  optval =  sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER)\n  onoff, linger = optval.unpack &quot;ii&quot;\n"
full_name: BasicSocket#getsockopt
is_singleton: false
name: getsockopt
params: " getsockopt(level, optname)\n"
visibility: public
ri/1.8/system/BasicSocket/cdesc-BasicSocket.yaml000064400000003406150403660230015341 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: []

full_name: BasicSocket
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: getsockopt
- !ruby/object:RI::MethodSummary 
  name: recv_nonblock
- !ruby/object:RI::MethodSummary 
  name: setsockopt
name: BasicSocket
superclass: IO
ri/1.8/system/Dir/chroot-c.yaml000064400000000644150403660230012133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes this process's idea of the file system root. Only a privileged process may make this call. Not available on all platforms. On Unix systems, see <tt>chroot(2)</tt> for more information.
full_name: Dir::chroot
is_singleton: true
name: chroot
params: |
  Dir.chroot( string ) => 0

visibility: public
ri/1.8/system/Dir/delete-c.yaml000064400000000603150403660230012072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the named directory. Raises a subclass of <tt>SystemCallError</tt> if the directory isn't empty.
full_name: Dir::delete
is_singleton: true
name: delete
params: |
  Dir.delete( string ) => 0
  Dir.rmdir( string ) => 0
  Dir.unlink( string ) => 0

visibility: public
ri/1.8/system/Dir/cdesc-Dir.yaml000064400000003737150403660230012220 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: chdir
- !ruby/object:RI::MethodSummary 
  name: chroot
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: entries
- !ruby/object:RI::MethodSummary 
  name: foreach
- !ruby/object:RI::MethodSummary 
  name: getwd
- !ruby/object:RI::MethodSummary 
  name: glob
- !ruby/object:RI::MethodSummary 
  name: mkdir
- !ruby/object:RI::MethodSummary 
  name: mktmpdir
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: pwd
- !ruby/object:RI::MethodSummary 
  name: rmdir
- !ruby/object:RI::MethodSummary 
  name: tmpdir
- !ruby/object:RI::MethodSummary 
  name: unlink
comment: 
- !ruby/struct:SM::Flow::P 
  body: Objects of class <tt>Dir</tt> are directory streams representing directories in the underlying file system. They provide a variety of ways to list directories and their contents. See also <tt>File</tt>.
- !ruby/struct:SM::Flow::P 
  body: The directory used in these examples contains the two regular files (<tt>config.h</tt> and <tt>main.rb</tt>), the parent directory (<tt>..</tt>), and the directory itself (<tt>.</tt>).
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: CSIDL_LOCAL_APPDATA
  value: "0x001c"
full_name: Dir
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: pos
- !ruby/object:RI::MethodSummary 
  name: pos=
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: seek
- !ruby/object:RI::MethodSummary 
  name: tell
name: Dir
superclass: Object
ri/1.8/system/Dir/each-i.yaml000064400000001165150403660230011542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls the block once for each entry in this directory, passing the filename of each entry as a parameter to the block.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)\n   d.each  {|x| puts &quot;Got #{x}&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Got .\n   Got ..\n   Got config.h\n   Got main.rb\n"
full_name: Dir#each
is_singleton: false
name: each
params: |
  dir.each { |filename| block }  => dir

visibility: public
ri/1.8/system/Dir/glob-c.yaml000064400000006730150403660230011562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the filenames found by expanding <em>pattern</em> which is an <tt>Array</tt> of the patterns or the pattern <tt>String</tt>, either as an <em>array</em> or as parameters to the block. Note that this pattern is not a regexp (it's closer to a shell glob). See <tt>File::fnmatch</tt> for the meaning of the <em>flags</em> parameter. Note that case sensitivity depends on your system (so <tt>File::FNM_CASEFOLD</tt> is ignored)
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<code>*</code>:"
    body: Matches any file. Can be restricted by other values in the glob. <tt>*</tt> will match all files; <tt>c*</tt> will match all files beginning with <tt>c</tt>; <tt>*c</tt> will match all files ending with <tt>c</tt>; and <b><tt>c</tt></b> will match all files that have <tt>c</tt> in them (including at the beginning or end). Equivalent to <tt>/ .* /x</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>**</code>:"
    body: Matches directories recursively.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>?</code>:"
    body: Matches any one character. Equivalent to <tt>/.{1}/</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>[set]</code>:"
    body: Matches any one character in <tt>set</tt>. Behaves exactly like character sets in Regexp, including set negation (<tt>[^a-z]</tt>).
  - !ruby/struct:SM::Flow::LI 
    label: "<code>{p,q}</code>:"
    body: Matches either literal <tt>p</tt> or literal <tt>q</tt>. Matching literals may be more than one character in length. More than two literals may be specified. Equivalent to pattern alternation in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>\\</code>:"
    body: Escapes the next metacharacter.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: "   Dir[&quot;config.?&quot;]                     #=&gt; [&quot;config.h&quot;]\n   Dir.glob(&quot;config.?&quot;)                #=&gt; [&quot;config.h&quot;]\n   Dir.glob(&quot;*.[a-z][a-z]&quot;)            #=&gt; [&quot;main.rb&quot;]\n   Dir.glob(&quot;*.[^r]*&quot;)                 #=&gt; [&quot;config.h&quot;]\n   Dir.glob(&quot;*.{rb,h}&quot;)                #=&gt; [&quot;main.rb&quot;, &quot;config.h&quot;]\n   Dir.glob(&quot;*&quot;)                       #=&gt; [&quot;config.h&quot;, &quot;main.rb&quot;]\n   Dir.glob(&quot;*&quot;, File::FNM_DOTMATCH)   #=&gt; [&quot;.&quot;, &quot;..&quot;, &quot;config.h&quot;, &quot;main.rb&quot;]\n\n   rbfiles = File.join(&quot;**&quot;, &quot;*.rb&quot;)\n   Dir.glob(rbfiles)                   #=&gt; [&quot;main.rb&quot;,\n                                            &quot;lib/song.rb&quot;,\n                                            &quot;lib/song/karaoke.rb&quot;]\n   libdirs = File.join(&quot;**&quot;, &quot;lib&quot;)\n   Dir.glob(libdirs)                   #=&gt; [&quot;lib&quot;]\n\n   librbfiles = File.join(&quot;**&quot;, &quot;lib&quot;, &quot;**&quot;, &quot;*.rb&quot;)\n   Dir.glob(librbfiles)                #=&gt; [&quot;lib/song.rb&quot;,\n                                            &quot;lib/song/karaoke.rb&quot;]\n\n   librbfiles = File.join(&quot;**&quot;, &quot;lib&quot;, &quot;*.rb&quot;)\n   Dir.glob(librbfiles)                #=&gt; [&quot;lib/song.rb&quot;]\n"
full_name: Dir::glob
is_singleton: true
name: glob
params: |
  Dir.glob( pattern, [flags] ) => array
  Dir.glob( pattern, [flags] ) {| filename | block }  => nil

visibility: public
ri/1.8/system/Dir/read-i.yaml000064400000001016150403660230011550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Reads the next entry from <em>dir</em> and returns it as a string. Returns <tt>nil</tt> at the end of the stream.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)\n   d.read   #=&gt; &quot;.&quot;\n   d.read   #=&gt; &quot;..&quot;\n   d.read   #=&gt; &quot;config.h&quot;\n"
full_name: Dir#read
is_singleton: false
name: read
params: |
  dir.read => string or nil

visibility: public
ri/1.8/system/Dir/foreach-c.yaml000064400000001203150403660230012234 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls the block once for each entry in the named directory, passing the filename of each entry as a parameter to the block.
- !ruby/struct:SM::Flow::VERB 
  body: "   Dir.foreach(&quot;testdir&quot;) {|x| puts &quot;Got #{x}&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Got .\n   Got ..\n   Got config.h\n   Got main.rb\n"
full_name: Dir::foreach
is_singleton: true
name: foreach
params: |
  Dir.foreach( dirname ) {| filename | block }  => nil

visibility: public
ri/1.8/system/Dir/path-i.yaml000064400000000615150403660230011575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the path parameter passed to <em>dir</em>'s constructor.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;..&quot;)\n   d.path   #=&gt; &quot;..&quot;\n"
full_name: Dir#path
is_singleton: false
name: path
params: |
  dir.path => string or nil

visibility: public
ri/1.8/system/Dir/pwd-c.yaml000064400000000677150403660230011435 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the path to the current working directory of this process as a string.
- !ruby/struct:SM::Flow::VERB 
  body: "   Dir.chdir(&quot;/tmp&quot;)   #=&gt; 0\n   Dir.getwd           #=&gt; &quot;/tmp&quot;\n"
full_name: Dir::pwd
is_singleton: true
name: pwd
params: |
  Dir.getwd => string
  Dir.pwd => string

visibility: public
ri/1.8/system/Dir/tell-i.yaml000064400000000726150403660230011604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current position in <em>dir</em>. See also <tt>Dir#seek</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)\n   d.tell   #=&gt; 0\n   d.read   #=&gt; &quot;.&quot;\n   d.tell   #=&gt; 12\n"
full_name: Dir#tell
is_singleton: false
name: tell
params: |
  dir.pos => integer
  dir.tell => integer

visibility: public
ri/1.8/system/Dir/tmpdir-c.yaml000064400000000373150403660230012133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the operating system's temporary file path.
full_name: Dir::tmpdir
is_singleton: true
name: tmpdir
params: ()
visibility: public
ri/1.8/system/Dir/rewind-i.yaml000064400000000715150403660230012132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Repositions <em>dir</em> to the first entry.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)\n   d.read     #=&gt; &quot;.&quot;\n   d.rewind   #=&gt; #&lt;Dir:0x401b3fb0&gt;\n   d.read     #=&gt; &quot;.&quot;\n"
full_name: Dir#rewind
is_singleton: false
name: rewind
params: |
  dir.rewind => dir

visibility: public
ri/1.8/system/Dir/inspect-i.yaml000064400000000415150403660230012304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a string describing this Dir object.
full_name: Dir#inspect
is_singleton: false
name: inspect
params: |
  dir.inspect => string

visibility: public
ri/1.8/system/Dir/new-c.yaml000064400000000425150403660230011423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new directory object for the named directory.
full_name: Dir::new
is_singleton: true
name: new
params: |
  Dir.new( string ) -> aDir

visibility: public
ri/1.8/system/Dir/getwd-c.yaml000064400000000703150403660230011743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the path to the current working directory of this process as a string.
- !ruby/struct:SM::Flow::VERB 
  body: "   Dir.chdir(&quot;/tmp&quot;)   #=&gt; 0\n   Dir.getwd           #=&gt; &quot;/tmp&quot;\n"
full_name: Dir::getwd
is_singleton: true
name: getwd
params: |
  Dir.getwd => string
  Dir.pwd => string

visibility: public
ri/1.8/system/Dir/unlink-c.yaml000064400000000603150403660230012130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the named directory. Raises a subclass of <tt>SystemCallError</tt> if the directory isn't empty.
full_name: Dir::unlink
is_singleton: true
name: unlink
params: |
  Dir.delete( string ) => 0
  Dir.rmdir( string ) => 0
  Dir.unlink( string ) => 0

visibility: public
ri/1.8/system/Dir/pos-i.yaml000064400000000724150403660230011443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the current position in <em>dir</em>. See also <tt>Dir#seek</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)\n   d.tell   #=&gt; 0\n   d.read   #=&gt; &quot;.&quot;\n   d.tell   #=&gt; 12\n"
full_name: Dir#pos
is_singleton: false
name: pos
params: |
  dir.pos => integer
  dir.tell => integer

visibility: public
ri/1.8/system/Dir/entries-c.yaml000064400000001043150403660230012300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing all of the filenames in the given directory. Will raise a <tt>SystemCallError</tt> if the named directory doesn't exist.
- !ruby/struct:SM::Flow::VERB 
  body: "   Dir.entries(&quot;testdir&quot;)   #=&gt; [&quot;.&quot;, &quot;..&quot;, &quot;config.h&quot;, &quot;main.rb&quot;]\n"
full_name: Dir::entries
is_singleton: true
name: entries
params: |
  Dir.entries( dirname ) => array

visibility: public
ri/1.8/system/Dir/rmdir-c.yaml000064400000000601150403660230011743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deletes the named directory. Raises a subclass of <tt>SystemCallError</tt> if the directory isn't empty.
full_name: Dir::rmdir
is_singleton: true
name: rmdir
params: |
  Dir.delete( string ) => 0
  Dir.rmdir( string ) => 0
  Dir.unlink( string ) => 0

visibility: public
ri/1.8/system/Dir/chdir-c.yaml000064400000002731150403660230011725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes the current working directory of the process to the given string. When called without an argument, changes the directory to the value of the environment variable <tt>HOME</tt>, or <tt>LOGDIR</tt>. <tt>SystemCallError</tt> (probably <tt>Errno::ENOENT</tt>) if the target directory does not exist.
- !ruby/struct:SM::Flow::P 
  body: If a block is given, it is passed the name of the new current directory, and the block is executed with that as the current directory. The original working directory is restored when the block exits. The return value of <tt>chdir</tt> is the value of the block. <tt>chdir</tt> blocks can be nested, but in a multi-threaded program an error will be raised if a thread attempts to open a <tt>chdir</tt> block while another thread has one open.
- !ruby/struct:SM::Flow::VERB 
  body: "   Dir.chdir(&quot;/var/spool/mail&quot;)\n   puts Dir.pwd\n   Dir.chdir(&quot;/tmp&quot;) do\n     puts Dir.pwd\n     Dir.chdir(&quot;/usr&quot;) do\n       puts Dir.pwd\n     end\n     puts Dir.pwd\n   end\n   puts Dir.pwd\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   /var/spool/mail\n   /tmp\n   /usr\n   /tmp\n   /var/spool/mail\n"
full_name: Dir::chdir
is_singleton: true
name: chdir
params: |
  Dir.chdir( [ string] ) => 0
  Dir.chdir( [ string] ) {| path | block }  => anObject

visibility: public
ri/1.8/system/Dir/close-i.yaml000064400000000651150403660230011746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the directory stream. Any further attempts to access <em>dir</em> will raise an <tt>IOError</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)\n   d.close   #=&gt; nil\n"
full_name: Dir#close
is_singleton: false
name: close
params: |
  dir.close => nil

visibility: public
ri/1.8/system/Dir/seek-i.yaml000064400000001273150403660230011571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Seeks to a particular location in <em>dir</em>. <em>integer</em> must be a value returned by <tt>Dir#tell</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)   #=&gt; #&lt;Dir:0x401b3c40&gt;\n   d.read                   #=&gt; &quot;.&quot;\n   i = d.tell               #=&gt; 12\n   d.read                   #=&gt; &quot;..&quot;\n   d.seek(i)                #=&gt; #&lt;Dir:0x401b3c40&gt;\n   d.read                   #=&gt; &quot;..&quot;\n"
full_name: Dir#seek
is_singleton: false
name: seek
params: |
  dir.seek( integer ) => dir

visibility: public
ri/1.8/system/Dir/mktmpdir-c.yaml000064400000004541150403660230012464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: path
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dir.mktmpdir creates a temporary directory.
- !ruby/struct:SM::Flow::P 
  body: The directory is created with 0700 permission.
- !ruby/struct:SM::Flow::P 
  body: The prefix and suffix of the name of the directory is specified by the optional first argument, <em>prefix_suffix</em>.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: If it is not specified or nil, &quot;d&quot; is used as the prefix and no suffix is used.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: If it is a string, it is used as the prefix and no suffix is used.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: If it is an array, first element is used as the prefix and second element is used as a suffix.
  type: :BULLET
- !ruby/struct:SM::Flow::VERB 
  body: " Dir.mktmpdir {|dir| dir is &quot;.../d...&quot; }\n Dir.mktmpdir(&quot;foo&quot;) {|dir| dir is &quot;.../foo...&quot; }\n Dir.mktmpdir([&quot;foo&quot;, &quot;bar&quot;]) {|dir| dir is &quot;.../foo...bar&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: The directory is created under Dir.tmpdir or the optional second argument <em>tmpdir</em> if non-nil value is given.
- !ruby/struct:SM::Flow::VERB 
  body: " Dir.mktmpdir {|dir| dir is &quot;#{Dir.tmpdir}/d...&quot; }\n Dir.mktmpdir(nil, &quot;/var/tmp&quot;) {|dir| dir is &quot;/var/tmp/d...&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: 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_secure before Dir.mktmpdir returns. The value of the block is returned.
- !ruby/struct:SM::Flow::VERB 
  body: " Dir.mktmpdir {|dir|\n   # use the directory...\n   open(&quot;#{dir}/foo&quot;, &quot;w&quot;) { ... }\n }\n"
- !ruby/struct:SM::Flow::P 
  body: If a block is not given, The path of the directory is returned. In this case, Dir.mktmpdir doesn't remove the directory.
- !ruby/struct:SM::Flow::VERB 
  body: " dir = Dir.mktmpdir\n begin\n   # use the directory...\n   open(&quot;#{dir}/foo&quot;, &quot;w&quot;) { ... }\n ensure\n   # remove the directory.\n   FileUtils.remove_entry_secure dir\n end\n"
full_name: Dir::mktmpdir
is_singleton: true
name: mktmpdir
params: (prefix_suffix=nil, tmpdir=nil) {|path| ...}
visibility: public
ri/1.8/system/Dir/mkdir-c.yaml000064400000001135150403660230011737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Makes a new directory named by <em>string</em>, with permissions specified by the optional parameter <em>anInteger</em>. The permissions may be modified by the value of <tt>File::umask</tt>, and are ignored on NT. Raises a <tt>SystemCallError</tt> if the directory cannot be created. See also the discussion of permissions in the class documentation for <tt>File</tt>.
full_name: Dir::mkdir
is_singleton: true
name: mkdir
params: |
  Dir.mkdir( string [, integer] ) => 0

visibility: public
ri/1.8/system/Dir/%5b%5d-c.yaml000064400000000615150403660230011504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to calling <tt>Dir.glob(</tt><em>array,</em><tt>0)</tt> and <tt>Dir.glob([</tt><em>string,...</em><tt>],0)</tt>.
full_name: Dir::[]
is_singleton: true
name: "[]"
params: |
  Dir[ array ]                 => array
  Dir[ string [, string ...] ] => array

visibility: public
ri/1.8/system/Dir/pos%3d-i.yaml000064400000001174150403660240011740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Synonym for <tt>Dir#seek</tt>, but returns the position parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   d = Dir.new(&quot;testdir&quot;)   #=&gt; #&lt;Dir:0x401b3c40&gt;\n   d.read                   #=&gt; &quot;.&quot;\n   i = d.pos                #=&gt; 12\n   d.read                   #=&gt; &quot;..&quot;\n   d.pos = i                #=&gt; 12\n   d.read                   #=&gt; &quot;..&quot;\n"
full_name: Dir#pos=
is_singleton: false
name: pos=
params: |
  dir.pos( integer ) => integer

visibility: public
ri/1.8/system/Dir/open-c.yaml000064400000000776150403660240011605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no block, <tt>open</tt> is a synonym for <tt>Dir::new</tt>. If a block is present, it is passed <em>aDir</em> as a parameter. The directory is closed at the end of the block, and <tt>Dir::open</tt> returns the value of the block.
full_name: Dir::open
is_singleton: true
name: open
params: |
  Dir.open( string ) => aDir
  Dir.open( string ) {| aDir | block } => anObject

visibility: public
ri/1.8/system/Zlib/zlib_version-c.yaml000064400000000425150403660240013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the string which represents the version of zlib library.
full_name: Zlib::zlib_version
is_singleton: true
name: zlib_version
params: ()
visibility: public
ri/1.8/system/Zlib/GzipWriter/flush-i.yaml000064400000000726150403660240014256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Flushes all the internal buffers of the GzipWriter object. The meaning of <tt>flush</tt> is same as in Zlib::Deflate#deflate. <tt>Zlib::SYNC_FLUSH</tt> is used if <tt>flush</tt> is omitted. It is no use giving flush <tt>Zlib::NO_FLUSH</tt>.
full_name: Zlib::GzipWriter#flush
is_singleton: false
name: flush
params: " flush(flush=nil)\n"
visibility: public
ri/1.8/system/Zlib/GzipWriter/print-i.yaml000064400000000452150403660240014265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: print Same as IO."
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipWriter#print
is_singleton: false
name: print
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipWriter/printf-i.yaml000064400000000455150403660240014436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: printf Same as IO."
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipWriter#printf
is_singleton: false
name: printf
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipWriter/mtime%3d-i.yaml000064400000000332150403660240014535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipWriter#mtime=
is_singleton: false
name: mtime=
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipWriter/tell-i.yaml000064400000000324150403660240014067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipWriter#tell
is_singleton: false
name: tell
params: ()
visibility: public
ri/1.8/system/Zlib/GzipWriter/orig_name%3d-i.yaml000064400000000342150403660240015363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipWriter#orig_name=
is_singleton: false
name: orig_name=
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipWriter/new-c.yaml000064400000001073150403660240013714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a GzipWriter object associated with <tt>io</tt>. <tt>level</tt> and <tt>strategy</tt> should be the same as the arguments of Zlib::Deflate.new. The GzipWriter object writes gzipped data to <tt>io</tt>. At least, <tt>io</tt> must respond to the <tt>write</tt> method that behaves same as write method in IO class.
full_name: Zlib::GzipWriter::new
is_singleton: true
name: new
params: " Zlib::GzipWriter.new(io, level, strategy)\n"
visibility: public
ri/1.8/system/Zlib/GzipWriter/comment%3d-i.yaml000064400000000336150403660240015070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipWriter#comment=
is_singleton: false
name: comment=
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipWriter/cdesc-GzipWriter.yaml000064400000003275150403660250016077 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
comment: 
- !ruby/struct:SM::Flow::P 
  body: Zlib::GzipWriter is a class for writing gzipped files. GzipWriter should be used with an instance of IO, or IO-like, object.
- !ruby/struct:SM::Flow::P 
  body: "For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::GzipWriter.open('hoge.gz') do |gz|\n    gz.write 'jugemu jugemu gokou no surikire...'\n  end\n\n  File.open('hoge.gz', 'w') do |f|\n    gz = Zlib::GzipWriter.new(f)\n    gz.write 'jugemu jugemu gokou no surikire...'\n    gz.close\n  end\n\n  # TODO: test these.  Are they equivalent?  Can GzipWriter.new take a\n  # block?\n"
- !ruby/struct:SM::Flow::P 
  body: "NOTE: Due to the limitation of Ruby's finalizer, you must explicitly close GzipWriter objects by Zlib::GzipWriter#close etc. Otherwise, GzipWriter will be not able to write the gzip footer and will generate a broken gzip file."
constants: []

full_name: Zlib::GzipWriter
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: comment=
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: mtime=
- !ruby/object:RI::MethodSummary 
  name: orig_name=
- !ruby/object:RI::MethodSummary 
  name: pos
- !ruby/object:RI::MethodSummary 
  name: print
- !ruby/object:RI::MethodSummary 
  name: printf
- !ruby/object:RI::MethodSummary 
  name: putc
- !ruby/object:RI::MethodSummary 
  name: puts
- !ruby/object:RI::MethodSummary 
  name: tell
- !ruby/object:RI::MethodSummary 
  name: write
name: GzipWriter
superclass: Zlib::GzipFile
ri/1.8/system/Zlib/GzipWriter/write-i.yaml000064400000000340150403660250014260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipWriter#write
is_singleton: false
name: write
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipWriter/%3c%3c-i.yaml000064400000000450150403660250013775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: &lt;&lt; Same as IO."
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipWriter#<<
is_singleton: false
name: "<<"
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipWriter/pos-i.yaml000064400000000322150403660250013727 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipWriter#pos
is_singleton: false
name: pos
params: ()
visibility: public
ri/1.8/system/Zlib/GzipWriter/putc-i.yaml000064400000000336150403660250014106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipWriter#putc
is_singleton: false
name: putc
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipWriter/puts-i.yaml000064400000000447150403660250014131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: puts Same as IO."
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipWriter#puts
is_singleton: false
name: puts
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipWriter/open-c.yaml000064400000000775150403660250014075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens a file specified by <tt>filename</tt> for writing gzip compressed data, and returns a GzipWriter object associated with that file. Further details of this method are found in Zlib::GzipWriter.new and Zlib::GzipWriter#wrap.
full_name: Zlib::GzipWriter::open
is_singleton: true
name: open
params: " Zlib::GzipWriter.open(filename, level=nil, strategy=nil) { |gz| ... }\n"
visibility: public
ri/1.8/system/Zlib/Error/cdesc-Error.yaml000064400000002021150403660260014032 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The superclass for all exceptions raised by Ruby/zlib.
- !ruby/struct:SM::Flow::P 
  body: The following exceptions are defined as subclasses of Zlib::Error. These exceptions are raised when zlib library functions return with an error status.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Zlib::StreamEnd
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Zlib::NeedDict
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Zlib::DataError
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Zlib::StreamError
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Zlib::MemError
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Zlib::BufError
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: Zlib::VersionError
  type: :BULLET
constants: []

full_name: Zlib::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/Zlib/BufError/cdesc-BufError.yaml000064400000004705150403660260015137 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Zlib module contains several classes for compressing and decompressing streams, and for working with &quot;gzip&quot; files.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Classes
- !ruby/struct:SM::Flow::P 
  body: "Following are the classes that are most likely to be of interest to the user: Zlib::Inflate Zlib::Deflate Zlib::GzipReader Zlib::GzipWriter"
- !ruby/struct:SM::Flow::P 
  body: "There are two important base classes for the classes above: Zlib::ZStream and Zlib::GzipFile. Everything else is an error class."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Constants
- !ruby/struct:SM::Flow::P 
  body: Here's a list.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::VERSION\n      The Ruby/zlib version string.\n\n  Zlib::ZLIB_VERSION\n      The string which represents the version of zlib.h.\n\n  Zlib::BINARY\n  Zlib::ASCII\n  Zlib::UNKNOWN\n      The integers representing data types which Zlib::ZStream#data_type\n      method returns.\n\n  Zlib::NO_COMPRESSION\n  Zlib::BEST_SPEED\n  Zlib::BEST_COMPRESSION\n  Zlib::DEFAULT_COMPRESSION\n      The integers representing compression levels which are an argument\n      for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.\n\n  Zlib::FILTERED\n  Zlib::HUFFMAN_ONLY\n  Zlib::DEFAULT_STRATEGY\n      The integers representing compression methods which are an argument\n      for Zlib::Deflate.new and Zlib::Deflate#params.\n\n  Zlib::DEF_MEM_LEVEL\n  Zlib::MAX_MEM_LEVEL\n      The integers representing memory levels which are an argument for\n      Zlib::Deflate.new, Zlib::Deflate#params, and so on.\n\n  Zlib::MAX_WBITS\n      The default value of windowBits which is an argument for\n      Zlib::Deflate.new and Zlib::Inflate.new.\n\n  Zlib::NO_FLUSH\n  Zlib::SYNC_FLUSH\n  Zlib::FULL_FLUSH\n  Zlib::FINISH\n      The integers to control the output of the deflate stream, which are\n      an argument for Zlib::Deflate#deflate and so on.\n\n  Zlib::OS_CODE\n  Zlib::OS_MSDOS\n  Zlib::OS_AMIGA\n  Zlib::OS_VMS\n  Zlib::OS_UNIX\n  Zlib::OS_VMCMS\n  Zlib::OS_ATARI\n  Zlib::OS_OS2\n  Zlib::OS_MACOS\n  Zlib::OS_ZSYSTEM\n  Zlib::OS_CPM\n  Zlib::OS_TOPS20\n  Zlib::OS_WIN32\n  Zlib::OS_QDOS\n  Zlib::OS_RISCOS\n  Zlib::OS_UNKNOWN\n      The return values of Zlib::GzipFile#os_code method.\n"
constants: []

full_name: Zlib::BufError
includes: []

instance_methods: []

name: BufError
superclass: Zlib::Error
ri/1.8/system/Zlib/ZStream/finished%3f-i.yaml000064400000000377150403660260014507 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the stream is finished.
full_name: Zlib::ZStream#finished?
is_singleton: false
name: finished?
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/cdesc-ZStream.yaml000064400000010475150403660260014636 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Zlib::ZStream is the abstract class for the stream which handles the compressed data. The operations are defined in the subclasses: Zlib::Deflate for compression, and Zlib::Inflate for decompression."
- !ruby/struct:SM::Flow::P 
  body: An instance of Zlib::ZStream has one stream (struct zstream in the source) and two variable-length buffers which associated to the input (next_in) of the stream and the output (next_out) of the stream. In this document, &quot;input buffer&quot; means the buffer for input, and &quot;output buffer&quot; means the buffer for output.
- !ruby/struct:SM::Flow::P 
  body: Data input into an instance of Zlib::ZStream are temporally stored into the end of input buffer, and then data in input buffer are processed from the beginning of the buffer until no more output from the stream is produced (i.e. until avail_out &gt; 0 after processing). During processing, output buffer is allocated and expanded automatically to hold all output data.
- !ruby/struct:SM::Flow::P 
  body: Some particular instance methods consume the data in output buffer and return them as a String.
- !ruby/struct:SM::Flow::P 
  body: "Here is an ascii art for describing above:"
- !ruby/struct:SM::Flow::VERB 
  body: "   +================ an instance of Zlib::ZStream ================+\n   ||                                                            ||\n   ||     +--------+          +-------+          +--------+      ||\n   ||  +--| output |&lt;---------|zstream|&lt;---------| input  |&lt;--+  ||\n   ||  |  | buffer |  next_out+-------+next_in   | buffer |   |  ||\n   ||  |  +--------+                             +--------+   |  ||\n   ||  |                                                      |  ||\n   +===|======================================================|===+\n       |                                                      |\n       v                                                      |\n   &quot;output data&quot;                                         &quot;input data&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: If an error occurs during processing input buffer, an exception which is a subclass of Zlib::Error is raised. At that time, both input and output buffer keep their conditions at the time when the error occurs.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Method Catalogue
- !ruby/struct:SM::Flow::P 
  body: Many of the methods in this class are fairly low-level and unlikely to be of interest to users. In fact, users are unlikely to use this class directly; rather they will be interested in Zlib::Inflate and Zlib::Deflate.
- !ruby/struct:SM::Flow::P 
  body: The higher level methods are listed below.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#total_in"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#total_out"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#data_type"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#adler"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#reset"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#finish"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#finished?"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#close"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#closed?"
  type: :BULLET
constants: []

full_name: Zlib::ZStream
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: adler
- !ruby/object:RI::MethodSummary 
  name: avail_in
- !ruby/object:RI::MethodSummary 
  name: avail_out
- !ruby/object:RI::MethodSummary 
  name: avail_out=
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: closed?
- !ruby/object:RI::MethodSummary 
  name: data_type
- !ruby/object:RI::MethodSummary 
  name: end
- !ruby/object:RI::MethodSummary 
  name: ended?
- !ruby/object:RI::MethodSummary 
  name: finish
- !ruby/object:RI::MethodSummary 
  name: finished?
- !ruby/object:RI::MethodSummary 
  name: flush_next_in
- !ruby/object:RI::MethodSummary 
  name: flush_next_out
- !ruby/object:RI::MethodSummary 
  name: reset
- !ruby/object:RI::MethodSummary 
  name: stream_end?
- !ruby/object:RI::MethodSummary 
  name: total_in
- !ruby/object:RI::MethodSummary 
  name: total_out
name: ZStream
superclass: Object
ri/1.8/system/Zlib/ZStream/flush_next_out-i.yaml000064400000000434150403660260015460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Flushes output buffer and returns all data in that buffer.
full_name: Zlib::ZStream#flush_next_out
is_singleton: false
name: flush_next_out
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/data_type-i.yaml000064400000000602150403660260014361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Guesses the type of the data which have been inputed into the stream. The returned value is either <tt>Zlib::BINARY</tt>, <tt>Zlib::ASCII</tt>, or <tt>Zlib::UNKNOWN</tt>.
full_name: Zlib::ZStream#data_type
is_singleton: false
name: data_type
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/avail_out%3d-i.yaml000064400000000722150403660260014671 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Allocates <tt>size</tt> bytes of free space in the output buffer. If there are more than <tt>size</tt> bytes already in the buffer, the buffer is truncated. Because free space is allocated automatically, you usually don't need to use this method.
full_name: Zlib::ZStream#avail_out=
is_singleton: false
name: avail_out=
params: (p1)
visibility: public
ri/1.8/system/Zlib/ZStream/adler-i.yaml000064400000000356150403660260013504 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the adler-32 checksum.
full_name: Zlib::ZStream#adler
is_singleton: false
name: adler
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/stream_end%3f-i.yaml000064400000000403150403660260015025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the stream is finished.
full_name: Zlib::ZStream#stream_end?
is_singleton: false
name: stream_end?
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/avail_out-i.yaml000064400000000543150403660260014376 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns number of bytes of free spaces in output buffer. Because the free space is allocated automatically, this method returns 0 normally.
full_name: Zlib::ZStream#avail_out
is_singleton: false
name: avail_out
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/avail_in-i.yaml000064400000000425150403660260014174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns bytes of data in the input buffer. Normally, returns 0.
full_name: Zlib::ZStream#avail_in
is_singleton: false
name: avail_in
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/finish-i.yaml000064400000000520150403660260013666 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Finishes the stream and flushes output buffer. See Zlib::Deflate#finish and Zlib::Inflate#finish for details of this behavior.
full_name: Zlib::ZStream#finish
is_singleton: false
name: finish
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/total_in-i.yaml000064400000000424150403660260014222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the total bytes of the input data to the stream. FIXME
full_name: Zlib::ZStream#total_in
is_singleton: false
name: total_in
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/flush_next_in-i.yaml000064400000000431150403660260015254 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Flushes input buffer and returns all data in that buffer.
full_name: Zlib::ZStream#flush_next_in
is_singleton: false
name: flush_next_in
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/closed%3f-i.yaml000064400000000371150403660260014161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the stream is closed.
full_name: Zlib::ZStream#closed?
is_singleton: false
name: closed?
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/end-i.yaml000064400000000433150403660260013157 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the stream. All operations on the closed stream will raise an exception.
full_name: Zlib::ZStream#end
is_singleton: false
name: end
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/ended%3f-i.yaml000064400000000367150403660260013774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the stream is closed.
full_name: Zlib::ZStream#ended?
is_singleton: false
name: ended?
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/close-i.yaml000064400000000437150403660260013522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the stream. All operations on the closed stream will raise an exception.
full_name: Zlib::ZStream#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/reset-i.yaml000064400000000452150403660260013534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Resets and initializes the stream. All data in both input and output buffer are discarded.
full_name: Zlib::ZStream#reset
is_singleton: false
name: reset
params: ()
visibility: public
ri/1.8/system/Zlib/ZStream/total_out-i.yaml000064400000000431150403660260014421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the total bytes of the output data from the stream. FIXME
full_name: Zlib::ZStream#total_out
is_singleton: false
name: total_out
params: ()
visibility: public
ri/1.8/system/Zlib/StreamError/cdesc-StreamError.yaml000064400000004713150403660260016374 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Zlib module contains several classes for compressing and decompressing streams, and for working with &quot;gzip&quot; files.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Classes
- !ruby/struct:SM::Flow::P 
  body: "Following are the classes that are most likely to be of interest to the user: Zlib::Inflate Zlib::Deflate Zlib::GzipReader Zlib::GzipWriter"
- !ruby/struct:SM::Flow::P 
  body: "There are two important base classes for the classes above: Zlib::ZStream and Zlib::GzipFile. Everything else is an error class."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Constants
- !ruby/struct:SM::Flow::P 
  body: Here's a list.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::VERSION\n      The Ruby/zlib version string.\n\n  Zlib::ZLIB_VERSION\n      The string which represents the version of zlib.h.\n\n  Zlib::BINARY\n  Zlib::ASCII\n  Zlib::UNKNOWN\n      The integers representing data types which Zlib::ZStream#data_type\n      method returns.\n\n  Zlib::NO_COMPRESSION\n  Zlib::BEST_SPEED\n  Zlib::BEST_COMPRESSION\n  Zlib::DEFAULT_COMPRESSION\n      The integers representing compression levels which are an argument\n      for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.\n\n  Zlib::FILTERED\n  Zlib::HUFFMAN_ONLY\n  Zlib::DEFAULT_STRATEGY\n      The integers representing compression methods which are an argument\n      for Zlib::Deflate.new and Zlib::Deflate#params.\n\n  Zlib::DEF_MEM_LEVEL\n  Zlib::MAX_MEM_LEVEL\n      The integers representing memory levels which are an argument for\n      Zlib::Deflate.new, Zlib::Deflate#params, and so on.\n\n  Zlib::MAX_WBITS\n      The default value of windowBits which is an argument for\n      Zlib::Deflate.new and Zlib::Inflate.new.\n\n  Zlib::NO_FLUSH\n  Zlib::SYNC_FLUSH\n  Zlib::FULL_FLUSH\n  Zlib::FINISH\n      The integers to control the output of the deflate stream, which are\n      an argument for Zlib::Deflate#deflate and so on.\n\n  Zlib::OS_CODE\n  Zlib::OS_MSDOS\n  Zlib::OS_AMIGA\n  Zlib::OS_VMS\n  Zlib::OS_UNIX\n  Zlib::OS_VMCMS\n  Zlib::OS_ATARI\n  Zlib::OS_OS2\n  Zlib::OS_MACOS\n  Zlib::OS_ZSYSTEM\n  Zlib::OS_CPM\n  Zlib::OS_TOPS20\n  Zlib::OS_WIN32\n  Zlib::OS_QDOS\n  Zlib::OS_RISCOS\n  Zlib::OS_UNKNOWN\n      The return values of Zlib::GzipFile#os_code method.\n"
constants: []

full_name: Zlib::StreamError
includes: []

instance_methods: []

name: StreamError
superclass: Zlib::Error
ri/1.8/system/Zlib/Inflate/inflate-c.yaml000064400000001201150403660260014014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Decompresses <tt>string</tt>. Raises a Zlib::NeedDict exception if a preset dictionary is needed for decompression.
- !ruby/struct:SM::Flow::P 
  body: "This method is almost equivalent to the following code:"
- !ruby/struct:SM::Flow::VERB 
  body: "  def inflate(string)\n    zstream = Zlib::Inflate.new\n    buf = zstream.inflate(string)\n    zstream.finish\n    zstream.close\n    buf\n  end\n"
full_name: Zlib::Inflate::inflate
is_singleton: true
name: inflate
params: " Zlib::Inflate.inflate(string)\n"
visibility: public
ri/1.8/system/Zlib/Inflate/new-c.yaml000064400000000705150403660270013174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new inflate stream for decompression. See zlib.h for details of the argument. If <tt>window_bits</tt> is <tt>nil</tt>, the default value is used.
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Inflate::new
is_singleton: true
name: new
params: " Zlib::Inflate.new(window_bits)\n"
visibility: public
ri/1.8/system/Zlib/Inflate/set_dictionary-i.yaml000064400000000700150403660270015424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the preset dictionary and returns <tt>string</tt>. This method is available just only after a Zlib::NeedDict exception was raised. See zlib.h for details.
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Inflate#set_dictionary
is_singleton: false
name: set_dictionary
params: (p1)
visibility: public
ri/1.8/system/Zlib/Inflate/%3c%3c-i.yaml000064400000000331150403660270013251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::Inflate#<<
is_singleton: false
name: "<<"
params: (p1)
visibility: public
ri/1.8/system/Zlib/Inflate/inflate-i.yaml000064400000001430150403660270014027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Inputs <tt>string</tt> into the inflate stream and returns the output from the stream. Calling this method, both the input and the output buffer of the stream are flushed. If string is <tt>nil</tt>, this method finishes the stream, just like Zlib::ZStream#finish.
- !ruby/struct:SM::Flow::P 
  body: Raises a Zlib::NeedDict exception if a preset dictionary is needed to decompress. Set the dictionary by Zlib::Inflate#set_dictionary and then call this method again with an empty string. (<em>???</em>)
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Inflate#inflate
is_singleton: false
name: inflate
params: " inflate(string)\n"
visibility: public
ri/1.8/system/Zlib/Inflate/sync_point%3f-i.yaml000064400000000565150403660270015100 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Quoted verbatim from original documentation:"
- !ruby/struct:SM::Flow::VERB 
  body: "  What is this?\n"
- !ruby/struct:SM::Flow::P 
  body: <tt>:)</tt>
full_name: Zlib::Inflate#sync_point?
is_singleton: false
name: sync_point?
params: ()
visibility: public
ri/1.8/system/Zlib/Inflate/sync-i.yaml000064400000001007150403660270013361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Inputs <tt>string</tt> into the end of input buffer and skips data until a full flush point can be found. If the point is found in the buffer, this method flushes the buffer and returns false. Otherwise it returns <tt>true</tt> and the following data of full flush point is preserved in the buffer.
full_name: Zlib::Inflate#sync
is_singleton: false
name: sync
params: " sync(string)\n"
visibility: public
ri/1.8/system/Zlib/Inflate/cdesc-Inflate.yaml000064400000001340150403660270014620 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: inflate
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Zlib:Inflate is the class for decompressing compressed data. Unlike Zlib::Deflate, an instance of this class is not able to duplicate (clone, dup) itself.
constants: []

full_name: Zlib::Inflate
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: inflate
- !ruby/object:RI::MethodSummary 
  name: set_dictionary
- !ruby/object:RI::MethodSummary 
  name: sync
- !ruby/object:RI::MethodSummary 
  name: sync_point?
name: Inflate
superclass: Zlib::ZStream
ri/1.8/system/Zlib/Deflate/flush-i.yaml000064400000000744150403660270013517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This method is equivalent to <tt>deflate('', flush)</tt>. If flush is omitted, <tt>Zlib::SYNC_FLUSH</tt> is used as flush. This method is just provided to improve the readability of your Ruby program.
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Deflate#flush
is_singleton: false
name: flush
params: " flush(flush)\n"
visibility: public
ri/1.8/system/Zlib/Deflate/deflate-i.yaml000064400000001411150403660300013764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Inputs <tt>string</tt> into the deflate stream and returns the output from the stream. On calling this method, both the input and the output buffers of the stream are flushed. If <tt>string</tt> is nil, this method finishes the stream, just like Zlib::ZStream#finish.
- !ruby/struct:SM::Flow::P 
  body: The value of <tt>flush</tt> should be either <tt>Zlib::NO_FLUSH</tt>, <tt>Zlib::SYNC_FLUSH</tt>, <tt>Zlib::FULL_FLUSH</tt>, or <tt>Zlib::FINISH</tt>. See zlib.h for details.
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Deflate#deflate
is_singleton: false
name: deflate
params: " deflate(string[, flush])\n"
visibility: public
ri/1.8/system/Zlib/Deflate/new-c.yaml000064400000000755150403660300013155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new deflate stream for compression. See zlib.h for details of each argument. If an argument is nil, the default value of that argument is used.
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Deflate::new
is_singleton: true
name: new
params: " Zlib::Deflate.new(level=nil, windowBits=nil, memlevel=nil, strategy=nil)\n"
visibility: public
ri/1.8/system/Zlib/Deflate/cdesc-Deflate.yaml000064400000001323150403660300014557 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: deflate
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Zlib::Deflate is the class for compressing data. See Zlib::Stream for more information.
constants: []

full_name: Zlib::Deflate
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: deflate
- !ruby/object:RI::MethodSummary 
  name: flush
- !ruby/object:RI::MethodSummary 
  name: initialize_copy
- !ruby/object:RI::MethodSummary 
  name: params
- !ruby/object:RI::MethodSummary 
  name: set_dictionary
name: Deflate
superclass: Zlib::ZStream
ri/1.8/system/Zlib/Deflate/initialize_copy-i.yaml000064400000000404150403660300015554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Duplicates the deflate stream.
full_name: Zlib::Deflate#initialize_copy
is_singleton: false
name: initialize_copy
params: (p1)
visibility: public
ri/1.8/system/Zlib/Deflate/set_dictionary-i.yaml000064400000000754150403660300015411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the preset dictionary and returns <tt>string</tt>. This method is available just only after Zlib::Deflate.new or Zlib::ZStream#reset method was called. See zlib.h for details.
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Deflate#set_dictionary
is_singleton: false
name: set_dictionary
params: " set_dictionary(string)\n"
visibility: public
ri/1.8/system/Zlib/Deflate/params-i.yaml000064400000000677150403660300013660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Changes the parameters of the deflate stream. See zlib.h for details. The output from the stream by changing the params is preserved in output buffer.
- !ruby/struct:SM::Flow::P 
  body: "TODO: document better!"
full_name: Zlib::Deflate#params
is_singleton: false
name: params
params: " params(level, strategy)\n"
visibility: public
ri/1.8/system/Zlib/Deflate/%3c%3c-i.yaml000064400000000331150403660300013225 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::Deflate#<<
is_singleton: false
name: "<<"
params: (p1)
visibility: public
ri/1.8/system/Zlib/Deflate/deflate-c.yaml000064400000001473150403660300013766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compresses the given <tt>string</tt>. Valid values of level are <tt>Zlib::NO_COMPRESSION</tt>, <tt>Zlib::BEST_SPEED</tt>, <tt>Zlib::BEST_COMPRESSION</tt>, <tt>Zlib::DEFAULT_COMPRESSION</tt>, and an integer from 0 to 9.
- !ruby/struct:SM::Flow::P 
  body: "This method is almost equivalent to the following code:"
- !ruby/struct:SM::Flow::VERB 
  body: "  def deflate(string, level)\n    z = Zlib::Deflate.new(level)\n    dst = z.deflate(string, Zlib::FINISH)\n    z.close\n    dst\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "TODO: what's default value of <tt>level</tt>?"
full_name: Zlib::Deflate::deflate
is_singleton: true
name: deflate
params: " Zlib::Deflate.deflate(string[, level])\n"
visibility: public
ri/1.8/system/Zlib/crc_table-c.yaml000064400000000412150403660300012724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the table for calculating CRC checksum as an array.
full_name: Zlib::crc_table
is_singleton: true
name: crc_table
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/each-i.yaml000064400000000411150403660300013747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#each
is_singleton: false
name: each
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipReader/lineno-i.yaml000064400000000330150403660300014333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipReader#lineno
is_singleton: false
name: lineno
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/read-i.yaml000064400000000411150403660300013762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#read
is_singleton: false
name: read
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipReader/readline-i.yaml000064400000000421150403660300014633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#readline
is_singleton: false
name: readline
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipReader/each_line-i.yaml000064400000000423150403660300014761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#each_line
is_singleton: false
name: each_line
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipReader/tell-i.yaml000064400000000324150403660300014012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipReader#tell
is_singleton: false
name: tell
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/rewind-i.yaml000064400000000557150403660300014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Resets the position of the file pointer to the point created the GzipReader object. The associated IO object needs to respond to the <tt>seek</tt> method.
full_name: Zlib::GzipReader#rewind
is_singleton: false
name: rewind
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/ungetc-i.yaml000064400000000414150403660300014337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#ungetc
is_singleton: false
name: ungetc
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipReader/eof-i.yaml000064400000000322150403660300013621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipReader#eof
is_singleton: false
name: eof
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/new-c.yaml000064400000001142150403660300013634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a GzipReader object associated with <tt>io</tt>. The GzipReader object reads gzipped data from <tt>io</tt>, and parses/decompresses them. At least, <tt>io</tt> must have a <tt>read</tt> method that behaves same as the <tt>read</tt> method in IO class.
- !ruby/struct:SM::Flow::P 
  body: If the gzip file header is incorrect, raises an Zlib::GzipFile::Error exception.
full_name: Zlib::GzipReader::new
is_singleton: true
name: new
params: " Zlib::GzipReader.new(io)\n"
visibility: public
ri/1.8/system/Zlib/GzipReader/lineno%3d-i.yaml000064400000000334150403660300014633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipReader#lineno=
is_singleton: false
name: lineno=
params: (p1)
visibility: public
ri/1.8/system/Zlib/GzipReader/each_byte-i.yaml000064400000000420150403660300014772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#each_byte
is_singleton: false
name: each_byte
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/unused-i.yaml000064400000000523150403660300014356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the rest of the data which had read for parsing gzip format, or <tt>nil</tt> if the whole gzip file is not parsed yet.
full_name: Zlib::GzipReader#unused
is_singleton: false
name: unused
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/gets-i.yaml000064400000000411150403660300014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#gets
is_singleton: false
name: gets
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipReader/eof%3f-i.yaml000064400000000324150403660300014121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipReader#eof?
is_singleton: false
name: eof?
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/pos-i.yaml000064400000000322150403660300013651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ???
full_name: Zlib::GzipReader#pos
is_singleton: false
name: pos
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/getc-i.yaml000064400000000406150403660300013775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#getc
is_singleton: false
name: getc
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/readchar-i.yaml000064400000000416150403660300014625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#readchar
is_singleton: false
name: readchar
params: ()
visibility: public
ri/1.8/system/Zlib/GzipReader/readlines-i.yaml000064400000000423150403660300015020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader documentation for a description.
full_name: Zlib::GzipReader#readlines
is_singleton: false
name: readlines
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipReader/cdesc-GzipReader.yaml000064400000007474150403660300015754 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
comment: 
- !ruby/struct:SM::Flow::P 
  body: Zlib::GzipReader is the class for reading a gzipped file. GzipReader should be used an IO, or -IO-lie, object.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::GzipReader.open('hoge.gz') {|gz|\n    print gz.read\n  }\n\n  File.open('hoge.gz') do |f|\n    gz = Zlib::GzipReader.new(f)\n    print gz.read\n    gz.close\n  end\n\n  # TODO: test these.  Are they equivalent?  Can GzipReader.new take a\n  # block?\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Method Catalogue
- !ruby/struct:SM::Flow::P 
  body: The following methods in Zlib::GzipReader are just like their counterparts in IO, but they raise Zlib::Error or Zlib::GzipFile::Error exception if an error was found in the gzip file.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#each"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#each_line"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#each_byte"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#gets"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#getc"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#lineno"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#lineno="
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#read"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#readchar"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#readline"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#readlines"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "#ungetc"
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Be careful of the footer of the gzip file. A gzip file has the checksum of pre-compressed data in its footer. GzipReader checks all uncompressed data against that checksum at the following cases, and if it fails, raises <tt>Zlib::GzipFile::NoFooter</tt>, <tt>Zlib::GzipFile::CRCError</tt>, or <tt>Zlib::GzipFile::LengthError</tt> exception.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: When an reading request is received beyond the end of file (the end of compressed data). That is, when Zlib::GzipReader#read, Zlib::GzipReader#gets, or some other methods for reading returns nil.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: When Zlib::GzipFile#close method is called after the object reaches the end of file.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: When Zlib::GzipReader#unused method is called after the object reaches the end of file.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: The rest of the methods are adequately described in their own documentation.
constants: []

full_name: Zlib::GzipReader
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: each_byte
- !ruby/object:RI::MethodSummary 
  name: each_line
- !ruby/object:RI::MethodSummary 
  name: eof
- !ruby/object:RI::MethodSummary 
  name: eof?
- !ruby/object:RI::MethodSummary 
  name: getc
- !ruby/object:RI::MethodSummary 
  name: gets
- !ruby/object:RI::MethodSummary 
  name: lineno
- !ruby/object:RI::MethodSummary 
  name: lineno=
- !ruby/object:RI::MethodSummary 
  name: pos
- !ruby/object:RI::MethodSummary 
  name: read
- !ruby/object:RI::MethodSummary 
  name: readchar
- !ruby/object:RI::MethodSummary 
  name: readline
- !ruby/object:RI::MethodSummary 
  name: readlines
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: tell
- !ruby/object:RI::MethodSummary 
  name: ungetc
- !ruby/object:RI::MethodSummary 
  name: unused
name: GzipReader
superclass: Zlib::GzipFile
ri/1.8/system/Zlib/GzipReader/open-c.yaml000064400000000716150403660310014013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens a file specified by <tt>filename</tt> as a gzipped file, and returns a GzipReader object associated with that file. Further details of this method are in Zlib::GzipReader.new and ZLib::GzipReader.wrap.
full_name: Zlib::GzipReader::open
is_singleton: true
name: open
params: " Zlib::GzipReader.open(filename) {|gz| ... }\n"
visibility: public
ri/1.8/system/Zlib/adler32-c.yaml000064400000001042150403660310012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calculates Adler-32 checksum for <tt>string</tt>, and returns updated value of <tt>adler</tt>. If <tt>string</tt> is omitted, it returns the Adler-32 initial value. If <tt>adler</tt> is omitted, it assumes that the initial value is given to <tt>adler</tt>.
- !ruby/struct:SM::Flow::P 
  body: "FIXME: expression."
full_name: Zlib::adler32
is_singleton: true
name: adler32
params: " Zlib.adler32(string, adler)\n"
visibility: public
ri/1.8/system/Zlib/DataError/cdesc-DataError.yaml000064400000004707150403660310015427 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Zlib module contains several classes for compressing and decompressing streams, and for working with &quot;gzip&quot; files.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Classes
- !ruby/struct:SM::Flow::P 
  body: "Following are the classes that are most likely to be of interest to the user: Zlib::Inflate Zlib::Deflate Zlib::GzipReader Zlib::GzipWriter"
- !ruby/struct:SM::Flow::P 
  body: "There are two important base classes for the classes above: Zlib::ZStream and Zlib::GzipFile. Everything else is an error class."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Constants
- !ruby/struct:SM::Flow::P 
  body: Here's a list.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::VERSION\n      The Ruby/zlib version string.\n\n  Zlib::ZLIB_VERSION\n      The string which represents the version of zlib.h.\n\n  Zlib::BINARY\n  Zlib::ASCII\n  Zlib::UNKNOWN\n      The integers representing data types which Zlib::ZStream#data_type\n      method returns.\n\n  Zlib::NO_COMPRESSION\n  Zlib::BEST_SPEED\n  Zlib::BEST_COMPRESSION\n  Zlib::DEFAULT_COMPRESSION\n      The integers representing compression levels which are an argument\n      for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.\n\n  Zlib::FILTERED\n  Zlib::HUFFMAN_ONLY\n  Zlib::DEFAULT_STRATEGY\n      The integers representing compression methods which are an argument\n      for Zlib::Deflate.new and Zlib::Deflate#params.\n\n  Zlib::DEF_MEM_LEVEL\n  Zlib::MAX_MEM_LEVEL\n      The integers representing memory levels which are an argument for\n      Zlib::Deflate.new, Zlib::Deflate#params, and so on.\n\n  Zlib::MAX_WBITS\n      The default value of windowBits which is an argument for\n      Zlib::Deflate.new and Zlib::Inflate.new.\n\n  Zlib::NO_FLUSH\n  Zlib::SYNC_FLUSH\n  Zlib::FULL_FLUSH\n  Zlib::FINISH\n      The integers to control the output of the deflate stream, which are\n      an argument for Zlib::Deflate#deflate and so on.\n\n  Zlib::OS_CODE\n  Zlib::OS_MSDOS\n  Zlib::OS_AMIGA\n  Zlib::OS_VMS\n  Zlib::OS_UNIX\n  Zlib::OS_VMCMS\n  Zlib::OS_ATARI\n  Zlib::OS_OS2\n  Zlib::OS_MACOS\n  Zlib::OS_ZSYSTEM\n  Zlib::OS_CPM\n  Zlib::OS_TOPS20\n  Zlib::OS_WIN32\n  Zlib::OS_QDOS\n  Zlib::OS_RISCOS\n  Zlib::OS_UNKNOWN\n      The return values of Zlib::GzipFile#os_code method.\n"
constants: []

full_name: Zlib::DataError
includes: []

instance_methods: []

name: DataError
superclass: Zlib::Error
ri/1.8/system/Zlib/cdesc-Zlib.yaml000064400000006720150403660310012556 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: adler32
- !ruby/object:RI::MethodSummary 
  name: crc32
- !ruby/object:RI::MethodSummary 
  name: crc_table
- !ruby/object:RI::MethodSummary 
  name: zlib_version
comment: 
- !ruby/struct:SM::Flow::P 
  body: GZIP_SUPPORT
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION
  value: rb_str_new2(RUBY_ZLIB_VERSION)
- !ruby/object:RI::Constant 
  comment: 
  name: ZLIB_VERSION
  value: rb_str_new2(ZLIB_VERSION)
- !ruby/object:RI::Constant 
  comment: 
  name: BINARY
  value: INT2FIX(Z_BINARY)
- !ruby/object:RI::Constant 
  comment: 
  name: ASCII
  value: INT2FIX(Z_ASCII)
- !ruby/object:RI::Constant 
  comment: 
  name: UNKNOWN
  value: INT2FIX(Z_UNKNOWN)
- !ruby/object:RI::Constant 
  comment: 
  name: NO_COMPRESSION
  value: INT2FIX(Z_NO_COMPRESSION)
- !ruby/object:RI::Constant 
  comment: 
  name: BEST_SPEED
  value: INT2FIX(Z_BEST_SPEED)
- !ruby/object:RI::Constant 
  comment: 
  name: BEST_COMPRESSION
  value: INT2FIX(Z_BEST_COMPRESSION)
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_COMPRESSION
  value: INT2FIX(Z_DEFAULT_COMPRESSION)
- !ruby/object:RI::Constant 
  comment: 
  name: FILTERED
  value: INT2FIX(Z_FILTERED)
- !ruby/object:RI::Constant 
  comment: 
  name: HUFFMAN_ONLY
  value: INT2FIX(Z_HUFFMAN_ONLY)
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_STRATEGY
  value: INT2FIX(Z_DEFAULT_STRATEGY)
- !ruby/object:RI::Constant 
  comment: 
  name: MAX_WBITS
  value: INT2FIX(MAX_WBITS)
- !ruby/object:RI::Constant 
  comment: 
  name: DEF_MEM_LEVEL
  value: INT2FIX(DEF_MEM_LEVEL)
- !ruby/object:RI::Constant 
  comment: 
  name: MAX_MEM_LEVEL
  value: INT2FIX(MAX_MEM_LEVEL)
- !ruby/object:RI::Constant 
  comment: 
  name: NO_FLUSH
  value: INT2FIX(Z_NO_FLUSH)
- !ruby/object:RI::Constant 
  comment: 
  name: SYNC_FLUSH
  value: INT2FIX(Z_SYNC_FLUSH)
- !ruby/object:RI::Constant 
  comment: 
  name: FULL_FLUSH
  value: INT2FIX(Z_FULL_FLUSH)
- !ruby/object:RI::Constant 
  comment: 
  name: FINISH
  value: INT2FIX(Z_FINISH)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_CODE
  value: INT2FIX(OS_CODE)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_MSDOS
  value: INT2FIX(OS_MSDOS)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_AMIGA
  value: INT2FIX(OS_AMIGA)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_VMS
  value: INT2FIX(OS_VMS)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_UNIX
  value: INT2FIX(OS_UNIX)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_ATARI
  value: INT2FIX(OS_ATARI)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_OS2
  value: INT2FIX(OS_OS2)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_MACOS
  value: INT2FIX(OS_MACOS)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_TOPS20
  value: INT2FIX(OS_TOPS20)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_WIN32
  value: INT2FIX(OS_WIN32)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_VMCMS
  value: INT2FIX(OS_VMCMS)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_ZSYSTEM
  value: INT2FIX(OS_ZSYSTEM)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_CPM
  value: INT2FIX(OS_CPM)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_QDOS
  value: INT2FIX(OS_QDOS)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_RISCOS
  value: INT2FIX(OS_RISCOS)
- !ruby/object:RI::Constant 
  comment: 
  name: OS_UNKNOWN
  value: INT2FIX(OS_UNKNOWN)
full_name: Zlib
includes: []

instance_methods: []

name: Zlib
superclass: 
ri/1.8/system/Zlib/VersionError/cdesc-VersionError.yaml000064400000004715150403660310016756 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Zlib module contains several classes for compressing and decompressing streams, and for working with &quot;gzip&quot; files.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Classes
- !ruby/struct:SM::Flow::P 
  body: "Following are the classes that are most likely to be of interest to the user: Zlib::Inflate Zlib::Deflate Zlib::GzipReader Zlib::GzipWriter"
- !ruby/struct:SM::Flow::P 
  body: "There are two important base classes for the classes above: Zlib::ZStream and Zlib::GzipFile. Everything else is an error class."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Constants
- !ruby/struct:SM::Flow::P 
  body: Here's a list.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::VERSION\n      The Ruby/zlib version string.\n\n  Zlib::ZLIB_VERSION\n      The string which represents the version of zlib.h.\n\n  Zlib::BINARY\n  Zlib::ASCII\n  Zlib::UNKNOWN\n      The integers representing data types which Zlib::ZStream#data_type\n      method returns.\n\n  Zlib::NO_COMPRESSION\n  Zlib::BEST_SPEED\n  Zlib::BEST_COMPRESSION\n  Zlib::DEFAULT_COMPRESSION\n      The integers representing compression levels which are an argument\n      for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.\n\n  Zlib::FILTERED\n  Zlib::HUFFMAN_ONLY\n  Zlib::DEFAULT_STRATEGY\n      The integers representing compression methods which are an argument\n      for Zlib::Deflate.new and Zlib::Deflate#params.\n\n  Zlib::DEF_MEM_LEVEL\n  Zlib::MAX_MEM_LEVEL\n      The integers representing memory levels which are an argument for\n      Zlib::Deflate.new, Zlib::Deflate#params, and so on.\n\n  Zlib::MAX_WBITS\n      The default value of windowBits which is an argument for\n      Zlib::Deflate.new and Zlib::Inflate.new.\n\n  Zlib::NO_FLUSH\n  Zlib::SYNC_FLUSH\n  Zlib::FULL_FLUSH\n  Zlib::FINISH\n      The integers to control the output of the deflate stream, which are\n      an argument for Zlib::Deflate#deflate and so on.\n\n  Zlib::OS_CODE\n  Zlib::OS_MSDOS\n  Zlib::OS_AMIGA\n  Zlib::OS_VMS\n  Zlib::OS_UNIX\n  Zlib::OS_VMCMS\n  Zlib::OS_ATARI\n  Zlib::OS_OS2\n  Zlib::OS_MACOS\n  Zlib::OS_ZSYSTEM\n  Zlib::OS_CPM\n  Zlib::OS_TOPS20\n  Zlib::OS_WIN32\n  Zlib::OS_QDOS\n  Zlib::OS_RISCOS\n  Zlib::OS_UNKNOWN\n      The return values of Zlib::GzipFile#os_code method.\n"
constants: []

full_name: Zlib::VersionError
includes: []

instance_methods: []

name: VersionError
superclass: Zlib::Error
ri/1.8/system/Zlib/crc32-c.yaml000064400000001014150403660310011722 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calculates CRC checksum for <tt>string</tt>, and returns updated value of <tt>crc</tt>. If <tt>string</tt> is omitted, it returns the CRC initial value. If <tt>crc</tt> is omitted, it assumes that the initial value is given to <tt>crc</tt>.
- !ruby/struct:SM::Flow::P 
  body: "FIXME: expression."
full_name: Zlib::crc32
is_singleton: true
name: crc32
params: " Zlib.crc32(string, adler)\n"
visibility: public
ri/1.8/system/Zlib/GzipFile/os_code-i.yaml000064400000000415150403660310014144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns OS code number recorded in the gzip file header.
full_name: Zlib::GzipFile#os_code
is_singleton: false
name: os_code
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/crc-i.yaml000064400000000370150403660310013300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns CRC value of the uncompressed data.
full_name: Zlib::GzipFile#crc
is_singleton: false
name: crc
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/cdesc-GzipFile.yaml000064400000002201150403660310015066 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: wrap
comment: 
- !ruby/struct:SM::Flow::P 
  body: Zlib::GzipFile is an abstract class for handling a gzip formatted compressed file. The operations are defined in the subclasses, Zlib::GzipReader for reading, and Zlib::GzipWriter for writing.
- !ruby/struct:SM::Flow::P 
  body: GzipReader should be used by associating an IO, or IO-like, object.
constants: []

full_name: Zlib::GzipFile
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: closed?
- !ruby/object:RI::MethodSummary 
  name: comment
- !ruby/object:RI::MethodSummary 
  name: crc
- !ruby/object:RI::MethodSummary 
  name: finish
- !ruby/object:RI::MethodSummary 
  name: level
- !ruby/object:RI::MethodSummary 
  name: mtime
- !ruby/object:RI::MethodSummary 
  name: orig_name
- !ruby/object:RI::MethodSummary 
  name: os_code
- !ruby/object:RI::MethodSummary 
  name: sync
- !ruby/object:RI::MethodSummary 
  name: sync=
- !ruby/object:RI::MethodSummary 
  name: to_io
name: GzipFile
superclass: Object
ri/1.8/system/Zlib/GzipFile/LengthError/cdesc-LengthError.yaml000064400000000604150403660310020050 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raised when the data length recorded in the gzip file footer is not equivalent to the length of the actual uncompressed data.
constants: []

full_name: Zlib::GzipFile::LengthError
includes: []

instance_methods: []

name: LengthError
superclass: Zlib::GzipFile::Error
ri/1.8/system/Zlib/GzipFile/CRCError/cdesc-CRCError.yaml000064400000000601150403660310016421 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raised when the CRC checksum recorded in gzip file footer is not equivalent to the CRC checksum of the actual uncompressed data.
constants: []

full_name: Zlib::GzipFile::CRCError
includes: []

instance_methods: []

name: CRCError
superclass: Zlib::GzipFile::Error
ri/1.8/system/Zlib/GzipFile/NoFooter/cdesc-NoFooter.yaml000064400000000453150403660310016652 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raised when gzip file footer is not found.
constants: []

full_name: Zlib::GzipFile::NoFooter
includes: []

instance_methods: []

name: NoFooter
superclass: Zlib::GzipFile::Error
ri/1.8/system/Zlib/GzipFile/Error/cdesc-Error.yaml000064400000000454150403660310015547 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Base class of errors that occur when processing GZIP files.
constants: []

full_name: Zlib::GzipFile::Error
includes: []

instance_methods: []

name: Error
superclass: Zlib::Error
ri/1.8/system/Zlib/GzipFile/finish-i.yaml000064400000000563150403660310014015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the GzipFile object. Unlike Zlib::GzipFile#close, this method never calls the close method of the associated IO object. Returns the associated IO object.
full_name: Zlib::GzipFile#finish
is_singleton: false
name: finish
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/mtime-i.yaml000064400000000421150403660310013641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns last modification time recorded in the gzip file header.
full_name: Zlib::GzipFile#mtime
is_singleton: false
name: mtime
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/level-i.yaml000064400000000353150403660310013641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns compression level.
full_name: Zlib::GzipFile#level
is_singleton: false
name: level
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/closed%3f-i.yaml000064400000000340150403660310014275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipFile#closed?
is_singleton: false
name: closed?
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/wrap-c.yaml000064400000000406150403660310013474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
full_name: Zlib::GzipFile::wrap
is_singleton: true
name: wrap
params: (...)
visibility: public
ri/1.8/system/Zlib/GzipFile/comment-i.yaml000064400000000456150403660310014200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns comments recorded in the gzip file header, or nil if the comments is not present.
full_name: Zlib::GzipFile#comment
is_singleton: false
name: comment
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/close-i.yaml000064400000000512150403660310013634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the GzipFile object. This method calls close method of the associated IO object. Returns the associated IO object.
full_name: Zlib::GzipFile#close
is_singleton: false
name: close
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/to_io-i.yaml000064400000000334150403660310013642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipFile#to_io
is_singleton: false
name: to_io
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/sync%3d-i.yaml000064400000000634150403660310014004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO. If flag is <tt>true</tt>, the associated IO object must respond to the <tt>flush</tt> method. While <tt>sync</tt> mode is <tt>true</tt>, the compression ratio decreases sharply.
full_name: Zlib::GzipFile#sync=
is_singleton: false
name: sync=
params: " sync = flag\n"
visibility: public
ri/1.8/system/Zlib/GzipFile/orig_name-i.yaml000064400000000511150403660310014466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns original filename recorded in the gzip file header, or <tt>nil</tt> if original filename is not present.
full_name: Zlib::GzipFile#orig_name
is_singleton: false
name: orig_name
params: ()
visibility: public
ri/1.8/system/Zlib/GzipFile/sync-i.yaml000064400000000332150403660310013503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as IO.
full_name: Zlib::GzipFile#sync
is_singleton: false
name: sync
params: ()
visibility: public
ri/1.8/system/Zlib/MemError/cdesc-MemError.yaml000064400000004705150403660320015140 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Zlib module contains several classes for compressing and decompressing streams, and for working with &quot;gzip&quot; files.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Classes
- !ruby/struct:SM::Flow::P 
  body: "Following are the classes that are most likely to be of interest to the user: Zlib::Inflate Zlib::Deflate Zlib::GzipReader Zlib::GzipWriter"
- !ruby/struct:SM::Flow::P 
  body: "There are two important base classes for the classes above: Zlib::ZStream and Zlib::GzipFile. Everything else is an error class."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Constants
- !ruby/struct:SM::Flow::P 
  body: Here's a list.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::VERSION\n      The Ruby/zlib version string.\n\n  Zlib::ZLIB_VERSION\n      The string which represents the version of zlib.h.\n\n  Zlib::BINARY\n  Zlib::ASCII\n  Zlib::UNKNOWN\n      The integers representing data types which Zlib::ZStream#data_type\n      method returns.\n\n  Zlib::NO_COMPRESSION\n  Zlib::BEST_SPEED\n  Zlib::BEST_COMPRESSION\n  Zlib::DEFAULT_COMPRESSION\n      The integers representing compression levels which are an argument\n      for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.\n\n  Zlib::FILTERED\n  Zlib::HUFFMAN_ONLY\n  Zlib::DEFAULT_STRATEGY\n      The integers representing compression methods which are an argument\n      for Zlib::Deflate.new and Zlib::Deflate#params.\n\n  Zlib::DEF_MEM_LEVEL\n  Zlib::MAX_MEM_LEVEL\n      The integers representing memory levels which are an argument for\n      Zlib::Deflate.new, Zlib::Deflate#params, and so on.\n\n  Zlib::MAX_WBITS\n      The default value of windowBits which is an argument for\n      Zlib::Deflate.new and Zlib::Inflate.new.\n\n  Zlib::NO_FLUSH\n  Zlib::SYNC_FLUSH\n  Zlib::FULL_FLUSH\n  Zlib::FINISH\n      The integers to control the output of the deflate stream, which are\n      an argument for Zlib::Deflate#deflate and so on.\n\n  Zlib::OS_CODE\n  Zlib::OS_MSDOS\n  Zlib::OS_AMIGA\n  Zlib::OS_VMS\n  Zlib::OS_UNIX\n  Zlib::OS_VMCMS\n  Zlib::OS_ATARI\n  Zlib::OS_OS2\n  Zlib::OS_MACOS\n  Zlib::OS_ZSYSTEM\n  Zlib::OS_CPM\n  Zlib::OS_TOPS20\n  Zlib::OS_WIN32\n  Zlib::OS_QDOS\n  Zlib::OS_RISCOS\n  Zlib::OS_UNKNOWN\n      The return values of Zlib::GzipFile#os_code method.\n"
constants: []

full_name: Zlib::MemError
includes: []

instance_methods: []

name: MemError
superclass: Zlib::Error
ri/1.8/system/Zlib/NeedDict/cdesc-NeedDict.yaml000064400000004705150403660320015016 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Zlib module contains several classes for compressing and decompressing streams, and for working with &quot;gzip&quot; files.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Classes
- !ruby/struct:SM::Flow::P 
  body: "Following are the classes that are most likely to be of interest to the user: Zlib::Inflate Zlib::Deflate Zlib::GzipReader Zlib::GzipWriter"
- !ruby/struct:SM::Flow::P 
  body: "There are two important base classes for the classes above: Zlib::ZStream and Zlib::GzipFile. Everything else is an error class."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Constants
- !ruby/struct:SM::Flow::P 
  body: Here's a list.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::VERSION\n      The Ruby/zlib version string.\n\n  Zlib::ZLIB_VERSION\n      The string which represents the version of zlib.h.\n\n  Zlib::BINARY\n  Zlib::ASCII\n  Zlib::UNKNOWN\n      The integers representing data types which Zlib::ZStream#data_type\n      method returns.\n\n  Zlib::NO_COMPRESSION\n  Zlib::BEST_SPEED\n  Zlib::BEST_COMPRESSION\n  Zlib::DEFAULT_COMPRESSION\n      The integers representing compression levels which are an argument\n      for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.\n\n  Zlib::FILTERED\n  Zlib::HUFFMAN_ONLY\n  Zlib::DEFAULT_STRATEGY\n      The integers representing compression methods which are an argument\n      for Zlib::Deflate.new and Zlib::Deflate#params.\n\n  Zlib::DEF_MEM_LEVEL\n  Zlib::MAX_MEM_LEVEL\n      The integers representing memory levels which are an argument for\n      Zlib::Deflate.new, Zlib::Deflate#params, and so on.\n\n  Zlib::MAX_WBITS\n      The default value of windowBits which is an argument for\n      Zlib::Deflate.new and Zlib::Inflate.new.\n\n  Zlib::NO_FLUSH\n  Zlib::SYNC_FLUSH\n  Zlib::FULL_FLUSH\n  Zlib::FINISH\n      The integers to control the output of the deflate stream, which are\n      an argument for Zlib::Deflate#deflate and so on.\n\n  Zlib::OS_CODE\n  Zlib::OS_MSDOS\n  Zlib::OS_AMIGA\n  Zlib::OS_VMS\n  Zlib::OS_UNIX\n  Zlib::OS_VMCMS\n  Zlib::OS_ATARI\n  Zlib::OS_OS2\n  Zlib::OS_MACOS\n  Zlib::OS_ZSYSTEM\n  Zlib::OS_CPM\n  Zlib::OS_TOPS20\n  Zlib::OS_WIN32\n  Zlib::OS_QDOS\n  Zlib::OS_RISCOS\n  Zlib::OS_UNKNOWN\n      The return values of Zlib::GzipFile#os_code method.\n"
constants: []

full_name: Zlib::NeedDict
includes: []

instance_methods: []

name: NeedDict
superclass: Zlib::Error
ri/1.8/system/Zlib/StreamEnd/cdesc-StreamEnd.yaml000064400000004707150403660320015426 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The Zlib module contains several classes for compressing and decompressing streams, and for working with &quot;gzip&quot; files.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Classes
- !ruby/struct:SM::Flow::P 
  body: "Following are the classes that are most likely to be of interest to the user: Zlib::Inflate Zlib::Deflate Zlib::GzipReader Zlib::GzipWriter"
- !ruby/struct:SM::Flow::P 
  body: "There are two important base classes for the classes above: Zlib::ZStream and Zlib::GzipFile. Everything else is an error class."
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Constants
- !ruby/struct:SM::Flow::P 
  body: Here's a list.
- !ruby/struct:SM::Flow::VERB 
  body: "  Zlib::VERSION\n      The Ruby/zlib version string.\n\n  Zlib::ZLIB_VERSION\n      The string which represents the version of zlib.h.\n\n  Zlib::BINARY\n  Zlib::ASCII\n  Zlib::UNKNOWN\n      The integers representing data types which Zlib::ZStream#data_type\n      method returns.\n\n  Zlib::NO_COMPRESSION\n  Zlib::BEST_SPEED\n  Zlib::BEST_COMPRESSION\n  Zlib::DEFAULT_COMPRESSION\n      The integers representing compression levels which are an argument\n      for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.\n\n  Zlib::FILTERED\n  Zlib::HUFFMAN_ONLY\n  Zlib::DEFAULT_STRATEGY\n      The integers representing compression methods which are an argument\n      for Zlib::Deflate.new and Zlib::Deflate#params.\n\n  Zlib::DEF_MEM_LEVEL\n  Zlib::MAX_MEM_LEVEL\n      The integers representing memory levels which are an argument for\n      Zlib::Deflate.new, Zlib::Deflate#params, and so on.\n\n  Zlib::MAX_WBITS\n      The default value of windowBits which is an argument for\n      Zlib::Deflate.new and Zlib::Inflate.new.\n\n  Zlib::NO_FLUSH\n  Zlib::SYNC_FLUSH\n  Zlib::FULL_FLUSH\n  Zlib::FINISH\n      The integers to control the output of the deflate stream, which are\n      an argument for Zlib::Deflate#deflate and so on.\n\n  Zlib::OS_CODE\n  Zlib::OS_MSDOS\n  Zlib::OS_AMIGA\n  Zlib::OS_VMS\n  Zlib::OS_UNIX\n  Zlib::OS_VMCMS\n  Zlib::OS_ATARI\n  Zlib::OS_OS2\n  Zlib::OS_MACOS\n  Zlib::OS_ZSYSTEM\n  Zlib::OS_CPM\n  Zlib::OS_TOPS20\n  Zlib::OS_WIN32\n  Zlib::OS_QDOS\n  Zlib::OS_RISCOS\n  Zlib::OS_UNKNOWN\n      The return values of Zlib::GzipFile#os_code method.\n"
constants: []

full_name: Zlib::StreamEnd
includes: []

instance_methods: []

name: StreamEnd
superclass: Zlib::Error
ri/1.8/system/RiDriver/report_class_stuff-i.yaml000064400000000315150403660320015555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RiDriver#report_class_stuff
is_singleton: false
name: report_class_stuff
params: (namespaces)
visibility: public
ri/1.8/system/RiDriver/report_missing_documentation-i.yaml000064400000000506150403660320017645 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Couldn't find documentation in <tt>path</tt>, so tell the user what to do
full_name: RiDriver#report_missing_documentation
is_singleton: false
name: report_missing_documentation
params: (path)
visibility: public
ri/1.8/system/RiDriver/process_args-i.yaml000064400000000267150403660320014346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RiDriver#process_args
is_singleton: false
name: process_args
params: ()
visibility: public
ri/1.8/system/RiDriver/cdesc-RiDriver.yaml000064400000001030150403660320014220 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: []

constants: []

full_name: RiDriver
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: get_info_for
- !ruby/object:RI::MethodSummary 
  name: process_args
- !ruby/object:RI::MethodSummary 
  name: report_class_stuff
- !ruby/object:RI::MethodSummary 
  name: report_method_stuff
- !ruby/object:RI::MethodSummary 
  name: report_missing_documentation
name: RiDriver
superclass: Object
ri/1.8/system/RiDriver/new-c.yaml000064400000000242150403660320012430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RiDriver::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/RiDriver/get_info_for-i.yaml000064400000000272150403660320014310 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: RiDriver#get_info_for
is_singleton: false
name: get_info_for
params: (arg)
visibility: public
ri/1.8/system/RiDriver/report_method_stuff-i.yaml000064400000000723150403660320015733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If the list of matching methods contains exactly one entry, or if it contains an entry that exactly matches the requested method, then display that entry, otherwise display the list of matching method names
full_name: RiDriver#report_method_stuff
is_singleton: false
name: report_method_stuff
params: (requested_method_name, methods)
visibility: public
ri/1.8/system/SyncEnumerator/size-i.yaml000064400000000436150403660320014054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of enumerated Enumerable objects, i.e. the size of each row.
full_name: SyncEnumerator#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/SyncEnumerator/each-i.yaml000064400000000410150403660320013772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ret
comment: 
- !ruby/struct:SM::Flow::P 
  body: Enumerates rows of the Enumerable objects.
full_name: SyncEnumerator#each
is_singleton: false
name: each
params: () {|ret| ...}
visibility: public
ri/1.8/system/SyncEnumerator/cdesc-SyncEnumerator.yaml000064400000001572150403660320016713 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: SyncEnumerator creates an Enumerable object from multiple Enumerable objects and enumerates them synchronously.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'generator'\n\n  s = SyncEnumerator.new([1,2,3], ['a', 'b', 'c'])\n\n  # Yields [1, 'a'], [2, 'b'], and [3,'c']\n  s.each { |row| puts row.join(', ') }\n"
constants: []

full_name: SyncEnumerator
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: end?
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: size
name: SyncEnumerator
superclass: Object
ri/1.8/system/SyncEnumerator/new-c.yaml000064400000000442150403660320013662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new SyncEnumerator which enumerates rows of given Enumerable objects.
full_name: SyncEnumerator::new
is_singleton: true
name: new
params: (*enums)
visibility: public
ri/1.8/system/SyncEnumerator/length-i.yaml000064400000000442150403660320014360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of enumerated Enumerable objects, i.e. the size of each row.
full_name: SyncEnumerator#length
is_singleton: false
name: length
params: ()
visibility: public
ri/1.8/system/SyncEnumerator/end%3f-i.yaml000064400000000566150403660320014152 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns true if the given nth Enumerable object has reached the end. If no argument is given, returns true if any of the Enumerable objects has reached the end.
full_name: SyncEnumerator#end?
is_singleton: false
name: end?
params: (i = nil)
visibility: public
ri/1.8/system/RUNIT/ToPublic/cdesc-ToPublic.yaml000064400000000276150403660320015122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RUNIT::ToPublic
includes: []

instance_methods: []

name: ToPublic
superclass: 
ri/1.8/system/RUNIT/TestResult/error_size-i.yaml000064400000000271150403660320015323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestResult#error_size
is_singleton: false
name: error_size
params: ()
visibility: public
ri/1.8/system/RUNIT/TestResult/run_tests-i.yaml000064400000000267150403660320015173 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestResult#run_tests
is_singleton: false
name: run_tests
params: ()
visibility: public
ri/1.8/system/RUNIT/TestResult/failure_size-i.yaml000064400000000275150403660320015625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestResult#failure_size
is_singleton: false
name: failure_size
params: ()
visibility: public
ri/1.8/system/RUNIT/TestResult/succeed%3f-i.yaml000064400000000265150403660320015054 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestResult#succeed?
is_singleton: false
name: succeed?
params: ()
visibility: public
ri/1.8/system/RUNIT/TestResult/add_failure-i.yaml000064400000000302150403660320015372 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestResult#add_failure
is_singleton: false
name: add_failure
params: (failure)
visibility: public
ri/1.8/system/RUNIT/TestResult/cdesc-TestResult.yaml000064400000001311150403660320016103 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: errors
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: failures
  rw: R
class_methods: []

comment: 
constants: []

full_name: RUNIT::TestResult
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_error
- !ruby/object:RI::MethodSummary 
  name: add_failure
- !ruby/object:RI::MethodSummary 
  name: error_size
- !ruby/object:RI::MethodSummary 
  name: failure_size
- !ruby/object:RI::MethodSummary 
  name: run_asserts
- !ruby/object:RI::MethodSummary 
  name: run_tests
- !ruby/object:RI::MethodSummary 
  name: succeed?
name: TestResult
superclass: Test::Unit::TestResult
ri/1.8/system/RUNIT/TestResult/run_asserts-i.yaml000064400000000273150403660320015512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestResult#run_asserts
is_singleton: false
name: run_asserts
params: ()
visibility: public
ri/1.8/system/RUNIT/TestResult/add_error-i.yaml000064400000000274150403660320015104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestResult#add_error
is_singleton: false
name: add_error
params: (error)
visibility: public
ri/1.8/system/RUNIT/CUI/TestRunner/create_mediator-i.yaml000064400000000315150403660320016701 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::CUI::TestRunner#create_mediator
is_singleton: false
name: create_mediator
params: (suite)
visibility: public
ri/1.8/system/RUNIT/CUI/TestRunner/quiet_mode%3d-c.yaml000064400000000307150403660320016174 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::CUI::TestRunner::quiet_mode=
is_singleton: true
name: quiet_mode=
params: (boolean)
visibility: public
ri/1.8/system/RUNIT/CUI/TestRunner/new-c.yaml000064400000000260150403660320014334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::CUI::TestRunner::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/RUNIT/CUI/TestRunner/cdesc-TestRunner.yaml000064400000001026150403660320016514 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: quiet_mode=
- !ruby/object:RI::MethodSummary 
  name: run
comment: 
constants: []

full_name: RUNIT::CUI::TestRunner
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: create_mediator
- !ruby/object:RI::MethodSummary 
  name: create_result
- !ruby/object:RI::MethodSummary 
  name: run
name: TestRunner
superclass: Test::Unit::UI::Console::TestRunner
ri/1.8/system/RUNIT/CUI/TestRunner/run-c.yaml000064400000000265150403660320014354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::CUI::TestRunner::run
is_singleton: true
name: run
params: (suite)
visibility: public
ri/1.8/system/RUNIT/CUI/TestRunner/create_result-i.yaml000064400000000304150403660320016411 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::CUI::TestRunner#create_result
is_singleton: false
name: create_result
params: ()
visibility: public
ri/1.8/system/RUNIT/CUI/TestRunner/run-i.yaml000064400000000316150403660320014357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::CUI::TestRunner#run
is_singleton: false
name: run
params: (suite, quiet_mode=@@quiet_mode)
visibility: public
ri/1.8/system/RUNIT/CUI/cdesc-CUI.yaml000064400000000264150403660320012715 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RUNIT::CUI
includes: []

instance_methods: []

name: CUI
superclass: 
ri/1.8/system/RUNIT/TestCase/new-c.yaml000064400000000316150403660330013321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestCase::new
is_singleton: true
name: new
params: (test_name, suite_name=self.class.name)
visibility: public
ri/1.8/system/RUNIT/TestCase/suite-c.yaml000064400000000255150403660330013663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestCase::suite
is_singleton: true
name: suite
params: ()
visibility: public
ri/1.8/system/RUNIT/TestCase/cdesc-TestCase.yaml000064400000000765150403660330015112 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: suite
comment: 
constants: []

full_name: RUNIT::TestCase
includes: 
- !ruby/object:RI::IncludedModule 
  name: RUNIT::Assert
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: assert_equals
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: run
name: TestCase
superclass: Test::Unit::TestCase
ri/1.8/system/RUNIT/TestCase/run-i.yaml000064400000000300150403660330013333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestCase#run
is_singleton: false
name: run
params: (result, &progress_block)
visibility: public
ri/1.8/system/RUNIT/TestCase/name-i.yaml000064400000000253150403660330013456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestCase#name
is_singleton: false
name: name
params: ()
visibility: public
ri/1.8/system/RUNIT/TestCase/assert_equals-i.yaml000064400000000302150403660330015404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestCase#assert_equals
is_singleton: false
name: assert_equals
params: (*args)
visibility: public
ri/1.8/system/RUNIT/TestSuite/count_test_cases-i.yaml000064400000000304150403660330016316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestSuite#count_test_cases
is_singleton: false
name: count_test_cases
params: ()
visibility: public
ri/1.8/system/RUNIT/TestSuite/add-i.yaml000064400000000257150403660330013510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestSuite#add
is_singleton: false
name: add
params: (*args)
visibility: public
ri/1.8/system/RUNIT/TestSuite/add_test-i.yaml000064400000000271150403660330014543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestSuite#add_test
is_singleton: false
name: add_test
params: (*args)
visibility: public
ri/1.8/system/RUNIT/TestSuite/run-i.yaml000064400000000301150403660330013552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::TestSuite#run
is_singleton: false
name: run
params: (result, &progress_block)
visibility: public
ri/1.8/system/RUNIT/TestSuite/cdesc-TestSuite.yaml000064400000000634150403660330015541 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RUNIT::TestSuite
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: add_test
- !ruby/object:RI::MethodSummary 
  name: count_test_cases
- !ruby/object:RI::MethodSummary 
  name: run
name: TestSuite
superclass: Test::Unit::TestSuite
ri/1.8/system/RUNIT/cdesc-RUNIT.yaml000064400000001167150403660330012562 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "Author:"
    body: Nathaniel Talbott.
  - !ruby/struct:SM::Flow::LI 
    label: "Copyright:"
    body: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
  - !ruby/struct:SM::Flow::LI 
    label: "License:"
    body: Ruby license.
  type: :NOTE
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AssertionFailedError
  value: Test::Unit::AssertionFailedError
full_name: RUNIT
includes: []

instance_methods: []

name: RUNIT
superclass: 
ri/1.8/system/RUNIT/Assert/assert_matches-i.yaml000064400000000302150403660330015264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_matches
is_singleton: false
name: assert_matches
params: (*args)
visibility: public
ri/1.8/system/RUNIT/Assert/assert_not_nil-i.yaml000064400000000317150403660340015311 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_not_nil
is_singleton: false
name: assert_not_nil
params: (actual, message="")
visibility: public
ri/1.8/system/RUNIT/Assert/assert_equal_float-i.yaml000064400000000350150403660340016140 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_equal_float
is_singleton: false
name: assert_equal_float
params: (expected, actual, delta, message="")
visibility: public
ri/1.8/system/RUNIT/Assert/assert_exception-i.yaml000064400000000336150403660340015646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_exception
is_singleton: false
name: assert_exception
params: (exception, message="", &block)
visibility: public
ri/1.8/system/RUNIT/Assert/setup_assert-i.yaml000064400000000271150403660340015006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#setup_assert
is_singleton: false
name: setup_assert
params: ()
visibility: public
ri/1.8/system/RUNIT/Assert/assert_not_match-i.yaml000064400000000347150403660340015626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_not_match
is_singleton: false
name: assert_not_match
params: (actual_string, expected_re, message="")
visibility: public
ri/1.8/system/RUNIT/Assert/assert_send-i.yaml000064400000000314150403660340014575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_send
is_singleton: false
name: assert_send
params: (object, method, *args)
visibility: public
ri/1.8/system/RUNIT/Assert/assert_fail-i.yaml000064400000000301150403660340014553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_fail
is_singleton: false
name: assert_fail
params: (message="")
visibility: public
ri/1.8/system/RUNIT/Assert/assert_no_exception-i.yaml000064400000000324150403660340016337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_no_exception
is_singleton: false
name: assert_no_exception
params: (*args, &block)
visibility: public
ri/1.8/system/RUNIT/Assert/assert_match-i.yaml000064400000000677150403660340014754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: To deal with the fact that RubyUnit does not check that the regular expression is, indeed, a regular expression, if it is not, we do our own assertion using the same semantics as RubyUnit
full_name: RUNIT::Assert#assert_match
is_singleton: false
name: assert_match
params: (actual_string, expected_re, message="")
visibility: public
ri/1.8/system/RUNIT/Assert/assert_respond_to-i.yaml000064400000000335150403660340016023 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#assert_respond_to
is_singleton: false
name: assert_respond_to
params: (method, object, message="")
visibility: public
ri/1.8/system/RUNIT/Assert/called_internally%3f-i.yaml000064400000000305150403660340016246 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RUNIT::Assert#called_internally?
is_singleton: false
name: called_internally?
params: ()
visibility: public
ri/1.8/system/RUNIT/Assert/cdesc-Assert.yaml000064400000001654150403660350014366 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: RUNIT::Assert
includes: 
- !ruby/object:RI::IncludedModule 
  name: Test::Unit::Assertions
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: assert_equal_float
- !ruby/object:RI::MethodSummary 
  name: assert_exception
- !ruby/object:RI::MethodSummary 
  name: assert_fail
- !ruby/object:RI::MethodSummary 
  name: assert_match
- !ruby/object:RI::MethodSummary 
  name: assert_matches
- !ruby/object:RI::MethodSummary 
  name: assert_no_exception
- !ruby/object:RI::MethodSummary 
  name: assert_not_match
- !ruby/object:RI::MethodSummary 
  name: assert_not_nil
- !ruby/object:RI::MethodSummary 
  name: assert_respond_to
- !ruby/object:RI::MethodSummary 
  name: assert_send
- !ruby/object:RI::MethodSummary 
  name: called_internally?
- !ruby/object:RI::MethodSummary 
  name: setup_assert
name: Assert
superclass: 
ri/1.8/system/Observable/delete_observer-i.yaml000064400000000511150403660350015356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Delete <tt>observer</tt> as an observer on this object. It will no longer receive notifications.
full_name: Observable#delete_observer
is_singleton: false
name: delete_observer
params: (observer)
visibility: public
ri/1.8/system/Observable/notify_observers-i.yaml000064400000000660150403660350015614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If this object's changed state is <tt>true</tt>, invoke the update method in each currently associated observer in turn, passing it the given arguments. The changed state is then set to <tt>false</tt>.
full_name: Observable#notify_observers
is_singleton: false
name: notify_observers
params: (*arg)
visibility: public
ri/1.8/system/Observable/delete_observers-i.yaml000064400000000424150403660350015544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Delete all observers associated with this object.
full_name: Observable#delete_observers
is_singleton: false
name: delete_observers
params: ()
visibility: public
ri/1.8/system/Observable/add_observer-i.yaml000064400000000511150403660350014644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add <tt>observer</tt> as an observer on this object. <tt>observer</tt> will now receive notifications.
full_name: Observable#add_observer
is_singleton: false
name: add_observer
params: (observer)
visibility: public
ri/1.8/system/Observable/changed%3f-i.yaml000064400000000372150403660350014101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Query the changed state of this object.
full_name: Observable#changed?
is_singleton: false
name: changed?
params: ()
visibility: public
ri/1.8/system/Observable/changed-i.yaml000064400000000520150403660350013576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set the changed state of this object. Notifications will be sent only if the changed <tt>state</tt> is <tt>true</tt>.
full_name: Observable#changed
is_singleton: false
name: changed
params: (state=true)
visibility: public
ri/1.8/system/Observable/cdesc-Observable.yaml000064400000001375150403660350015133 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Implements the Observable design pattern as a mixin so that other objects can be notified of changes in state. See observer.rb for details and an example.
constants: []

full_name: Observable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_observer
- !ruby/object:RI::MethodSummary 
  name: changed
- !ruby/object:RI::MethodSummary 
  name: changed?
- !ruby/object:RI::MethodSummary 
  name: count_observers
- !ruby/object:RI::MethodSummary 
  name: delete_observer
- !ruby/object:RI::MethodSummary 
  name: delete_observers
- !ruby/object:RI::MethodSummary 
  name: notify_observers
name: Observable
superclass: 
ri/1.8/system/Observable/count_observers-i.yaml000064400000000434150403660350015433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the number of observers associated with this object.
full_name: Observable#count_observers
is_singleton: false
name: count_observers
params: ()
visibility: public
ri/1.8/system/Binding/eval-i.yaml000064400000001223150403660350012423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates the Ruby expression(s) in <em>string</em>, in the <em>binding</em>'s context. If the optional <em>filename</em> and <em>lineno</em> parameters are present, they will be used when reporting syntax errors.
- !ruby/struct:SM::Flow::VERB 
  body: "   def getBinding(param)\n     return binding\n   end\n   b = getBinding(&quot;hello&quot;)\n   b.eval(&quot;param&quot;)   #=&gt; &quot;hello&quot;\n"
full_name: Binding#eval
is_singleton: false
name: eval
params: |
  binding.eval(string [, filename [,lineno]])  => obj

visibility: public
ri/1.8/system/Binding/clone-i.yaml000064400000000342150403660350012575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "MISSING: documentation"
full_name: Binding#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/Binding/cdesc-Binding.yaml000064400000002571150403660350013706 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Objects of class <tt>Binding</tt> encapsulate the execution context at some particular place in the code and retain this context for future use. The variables, methods, value of <tt>self</tt>, and possibly an iterator block that can be accessed in this context are all retained. Binding objects can be created using <tt>Kernel#binding</tt>, and are made available to the callback of <tt>Kernel#set_trace_func</tt>.
- !ruby/struct:SM::Flow::P 
  body: These binding objects can be passed as the second argument of the <tt>Kernel#eval</tt> method, establishing an environment for the evaluation.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Demo\n     def initialize(n)\n       @secret = n\n     end\n     def getBinding\n       return binding()\n     end\n   end\n\n   k1 = Demo.new(99)\n   b1 = k1.getBinding\n   k2 = Demo.new(-3)\n   b2 = k2.getBinding\n\n   eval(&quot;@secret&quot;, b1)   #=&gt; 99\n   eval(&quot;@secret&quot;, b2)   #=&gt; -3\n   eval(&quot;@secret&quot;)       #=&gt; nil\n"
- !ruby/struct:SM::Flow::P 
  body: Binding objects have no class-specific methods.
constants: []

full_name: Binding
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: eval
name: Binding
superclass: Object
ri/1.8/system/CompletingHash/match-i.yaml000064400000000354150403660350014127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Completion for hash key.
full_name: CompletingHash#match
is_singleton: false
name: match
params: (key)
visibility: public
ri/1.8/system/CompletingHash/cdesc-CompletingHash.yaml000064400000000616150403660350016572 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Hash with completion search feature. See OptionParser::Completion.
constants: []

full_name: CompletingHash
includes: 
- !ruby/object:RI::IncludedModule 
  name: Completion
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: match
name: CompletingHash
superclass: Hash
ri/1.8/system/FileTest/size-i.yaml000064400000000424150403660350012615 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of <tt>file_name</tt>.
full_name: FileTest#size
is_singleton: false
name: size
params: |
  File.size(file_name)   => integer

visibility: public
ri/1.8/system/FileTest/socket%3f-i.yaml000064400000000461150403660350013432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a socket.
full_name: FileTest#socket?
is_singleton: false
name: socket?
params: |
  File.socket?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/readable%3f-i.yaml000064400000000537150403660350013705 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is readable by the effective user id of this process.
full_name: FileTest#readable?
is_singleton: false
name: readable?
params: |
  File.readable?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/exist%3f-i.yaml000064400000000545150403660350013301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if the named file exists.
full_name: FileTest#exist?
is_singleton: false
name: exist?
params: |
  File.exist?(file_name)    =>  true or false
  File.exists?(file_name)   =>  true or false    (obsolete)

visibility: public
ri/1.8/system/FileTest/chardev%3f-i.yaml000064400000000476150403660350013564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a character device.
full_name: FileTest#chardev?
is_singleton: false
name: chardev?
params: |
  File.chardev?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/writable%3f-i.yaml000064400000000537150403660350013757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is writable by the effective user id of this process.
full_name: FileTest#writable?
is_singleton: false
name: writable?
params: |
  File.writable?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/executable_real%3f-i.yaml000064400000000561150403660350015267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is executable by the real user id of this process.
full_name: FileTest#executable_real?
is_singleton: false
name: executable_real?
params: |
  File.executable_real?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/cdesc-FileTest.yaml000064400000003257150403660350014222 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "<tt>FileTest</tt> implements file test operations similar to those used in <tt>File::Stat</tt>. It exists as a standalone module, and its methods are also insinuated into the <tt>File</tt> class. (Note that this is not done by inclusion: the interpreter cheats)."
constants: []

full_name: FileTest
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: blockdev?
- !ruby/object:RI::MethodSummary 
  name: chardev?
- !ruby/object:RI::MethodSummary 
  name: directory?
- !ruby/object:RI::MethodSummary 
  name: executable?
- !ruby/object:RI::MethodSummary 
  name: executable_real?
- !ruby/object:RI::MethodSummary 
  name: exist?
- !ruby/object:RI::MethodSummary 
  name: exists?
- !ruby/object:RI::MethodSummary 
  name: file?
- !ruby/object:RI::MethodSummary 
  name: grpowned?
- !ruby/object:RI::MethodSummary 
  name: identical?
- !ruby/object:RI::MethodSummary 
  name: owned?
- !ruby/object:RI::MethodSummary 
  name: pipe?
- !ruby/object:RI::MethodSummary 
  name: readable?
- !ruby/object:RI::MethodSummary 
  name: readable_real?
- !ruby/object:RI::MethodSummary 
  name: setgid?
- !ruby/object:RI::MethodSummary 
  name: setuid?
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: size?
- !ruby/object:RI::MethodSummary 
  name: socket?
- !ruby/object:RI::MethodSummary 
  name: sticky?
- !ruby/object:RI::MethodSummary 
  name: symlink?
- !ruby/object:RI::MethodSummary 
  name: writable?
- !ruby/object:RI::MethodSummary 
  name: writable_real?
- !ruby/object:RI::MethodSummary 
  name: zero?
name: FileTest
superclass: 
ri/1.8/system/FileTest/grpowned%3f-i.yaml000064400000000637150403660350013774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and the effective group id of the calling process is the owner of the file. Returns <tt>false</tt> on Windows.
full_name: FileTest#grpowned?
is_singleton: false
name: grpowned?
params: |
  File.grpowned?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/zero%3f-i.yaml000064400000000471150403660350013122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and has a zero size.
full_name: FileTest#zero?
is_singleton: false
name: zero?
params: |
  File.zero?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/sticky%3f-i.yaml000064400000000474150403660350013454 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file has the sticky bit set.
full_name: FileTest#sticky?
is_singleton: false
name: sticky?
params: |
  File.sticky?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/readable_real%3f-i.yaml000064400000000551150403660350014704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is readable by the real user id of this process.
full_name: FileTest#readable_real?
is_singleton: false
name: readable_real?
params: |
  File.readable_real?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/directory%3f-i.yaml000064400000000644150403660350014151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a directory, <tt>false</tt> otherwise.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.directory?(&quot;.&quot;)\n"
full_name: FileTest#directory?
is_singleton: false
name: directory?
params: |
  File.directory?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/symlink%3f-i.yaml000064400000000473150403660350013633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a symbolic link.
full_name: FileTest#symlink?
is_singleton: false
name: symlink?
params: |
  File.symlink?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/setgid%3f-i.yaml000064400000000474150403660350013425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file has the setgid bit set.
full_name: FileTest#setgid?
is_singleton: false
name: setgid?
params: |
  File.setgid?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/setuid%3f-i.yaml000064400000000474150403660350013443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file has the setuid bit set.
full_name: FileTest#setuid?
is_singleton: false
name: setuid?
params: |
  File.setuid?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/blockdev%3f-i.yaml000064400000000475150403660350013740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a block device.
full_name: FileTest#blockdev?
is_singleton: false
name: blockdev?
params: |
  File.blockdev?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/exists%3f-i.yaml000064400000000547150403660350013466 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if the named file exists.
full_name: FileTest#exists?
is_singleton: false
name: exists?
params: |
  File.exist?(file_name)    =>  true or false
  File.exists?(file_name)   =>  true or false    (obsolete)

visibility: public
ri/1.8/system/FileTest/identical%3f-i.yaml000064400000001576150403660350014106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named files are identical.
- !ruby/struct:SM::Flow::VERB 
  body: "    open(&quot;a&quot;, &quot;w&quot;) {}\n    p File.identical?(&quot;a&quot;, &quot;a&quot;)      #=&gt; true\n    p File.identical?(&quot;a&quot;, &quot;./a&quot;)    #=&gt; true\n    File.link(&quot;a&quot;, &quot;b&quot;)\n    p File.identical?(&quot;a&quot;, &quot;b&quot;)      #=&gt; true\n    File.symlink(&quot;a&quot;, &quot;c&quot;)\n    p File.identical?(&quot;a&quot;, &quot;c&quot;)      #=&gt; true\n    open(&quot;d&quot;, &quot;w&quot;) {}\n    p File.identical?(&quot;a&quot;, &quot;d&quot;)      #=&gt; false\n"
full_name: FileTest#identical?
is_singleton: false
name: identical?
params: |
  File.identical?(file_1, file_2)   =>  true or false

visibility: public
ri/1.8/system/FileTest/pipe%3f-i.yaml000064400000000451150403660350013076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is a pipe.
full_name: FileTest#pipe?
is_singleton: false
name: pipe?
params: |
  File.pipe?(file_name)   =>  true or false

visibility: public
ri/1.8/system/FileTest/writable_real%3f-i.yaml000064400000000551150403660350014756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is writable by the real user id of this process.
full_name: FileTest#writable_real?
is_singleton: false
name: writable_real?
params: |
  File.writable_real?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/file%3f-i.yaml000064400000000473150403660360013065 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and is a regular file.
full_name: FileTest#file?
is_singleton: false
name: file?
params: |
  File.file?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/executable%3f-i.yaml000064400000000547150403660360014271 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file is executable by the effective user id of this process.
full_name: FileTest#executable?
is_singleton: false
name: executable?
params: |
  File.executable?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/owned%3f-i.yaml000064400000000562150403660360013261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named file exists and the effective used id of the calling process is the owner of the file.
full_name: FileTest#owned?
is_singleton: false
name: owned?
params: |
  File.owned?(file_name)   => true or false

visibility: public
ri/1.8/system/FileTest/size%3f-i.yaml000064400000000541150403660360013114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>nil</tt> if <tt>file_name</tt> doesn't exist or has zero size, the size of the file otherwise.
full_name: FileTest#size?
is_singleton: false
name: size?
params: |
  File.size?(file_name)   => Integer or nil

visibility: public
ri/1.8/system/Regexp/eql%3f-i.yaml000064400000001111150403660360012430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---Two regexps are equal if their patterns are identical, they have the same character set code, and their <tt>casefold?</tt> values are the same.
- !ruby/struct:SM::Flow::VERB 
  body: "   /abc/  == /abc/x   #=&gt; false\n   /abc/  == /abc/i   #=&gt; false\n   /abc/u == /abc/n   #=&gt; false\n"
full_name: Regexp#eql?
is_singleton: false
name: eql?
params: |
  rxp == other_rxp      => true or false
  rxp.eql?(other_rxp)   => true or false

visibility: public
ri/1.8/system/Regexp/%3d%7e-i.yaml000064400000001036150403660360012233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>MatchData</tt> object describing the match, or <tt>nil</tt> if there was no match. This is equivalent to retrieving the value of the special variable <tt>$~</tt> following a normal match.
- !ruby/struct:SM::Flow::VERB 
  body: "   /(.)(.)(.)/.match(&quot;abc&quot;)[2]   #=&gt; &quot;b&quot;\n"
full_name: Regexp#=~
is_singleton: false
name: =~
params: |
  rxp.match(str)   => matchdata or nil

visibility: public
ri/1.8/system/Regexp/source-i.yaml000064400000000544150403660360012662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the original string of the pattern.
- !ruby/struct:SM::Flow::VERB 
  body: "   /ab+c/ix.source   #=&gt; &quot;ab+c&quot;\n"
full_name: Regexp#source
is_singleton: false
name: source
params: |
  rxp.source   => str

visibility: public
ri/1.8/system/Regexp/%7c-i.yaml000064400000000243150403660360011734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Regexp#|
is_singleton: false
name: "|"
params: (other)
visibility: public
ri/1.8/system/Regexp/%26-i.yaml000064400000000243150403660360011652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Regexp#&
is_singleton: false
name: "&"
params: (other)
visibility: public
ri/1.8/system/Regexp/to_yaml-i.yaml000064400000000263150403660360013024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Regexp#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Regexp/last_match-c.yaml000064400000001435150403660360013473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The first form returns the <tt>MatchData</tt> object generated by the last successful pattern match. Equivalent to reading the global variable <tt>$~</tt>. The second form returns the nth field in this <tt>MatchData</tt> object.
- !ruby/struct:SM::Flow::VERB 
  body: "   /c(.)t/ =~ 'cat'       #=&gt; 0\n   Regexp.last_match      #=&gt; #&lt;MatchData:0x401b3d30&gt;\n   Regexp.last_match(0)   #=&gt; &quot;cat&quot;\n   Regexp.last_match(1)   #=&gt; &quot;a&quot;\n   Regexp.last_match(2)   #=&gt; nil\n"
full_name: Regexp::last_match
is_singleton: true
name: last_match
params: |
  Regexp.last_match           => matchdata
  Regexp.last_match(fixnum)   => str

visibility: public
ri/1.8/system/Regexp/kcode-i.yaml000064400000000414150403660360012443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the character set code for the regexp.
full_name: Regexp#kcode
is_singleton: false
name: kcode
params: |
  rxp.kcode   => str

visibility: public
ri/1.8/system/Regexp/hash-i.yaml000064400000000446150403660360012306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produce a hash based on the text and options of this regular expression.
full_name: Regexp#hash
is_singleton: false
name: hash
params: |
  rxp.hash   => fixnum

visibility: public
ri/1.8/system/Regexp/quote-c.yaml000064400000001117150403660360012506 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escapes any characters that would have special meaning in a regular expression. Returns a new escaped string, or self if no characters are escaped. For any string, <tt>Regexp.escape(<em>str</em>)=~<em>str</em></tt> will be true.
- !ruby/struct:SM::Flow::VERB 
  body: "   Regexp.escape('\\*?{}.')   #=&gt; \\\\*\\?\\{\\}\\.\n"
full_name: Regexp::quote
is_singleton: true
name: quote
params: |
  Regexp.escape(str)   => a_str
  Regexp.quote(str)    => a_str

visibility: public
ri/1.8/system/Regexp/yaml_new-c.yaml000064400000000273150403660360013166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Regexp::yaml_new
is_singleton: true
name: yaml_new
params: ( klass, tag, val )
visibility: public
ri/1.8/system/Regexp/match-i.yaml000064400000001044150403660360012452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>MatchData</tt> object describing the match, or <tt>nil</tt> if there was no match. This is equivalent to retrieving the value of the special variable <tt>$~</tt> following a normal match.
- !ruby/struct:SM::Flow::VERB 
  body: "   /(.)(.)(.)/.match(&quot;abc&quot;)[2]   #=&gt; &quot;b&quot;\n"
full_name: Regexp#match
is_singleton: false
name: match
params: |
  rxp.match(str)   => matchdata or nil

visibility: public
ri/1.8/system/Regexp/%7e-i.yaml000064400000000653150403660360011743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Match---Matches <em>rxp</em> against the contents of <tt>$_</tt>. Equivalent to <tt><em>rxp</em> =~ $_</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   $_ = &quot;input data&quot;\n   ~ /at/   #=&gt; 7\n"
full_name: Regexp#~
is_singleton: false
name: "~"
params: |
  ~ rxp   => integer or nil

visibility: public
ri/1.8/system/Regexp/inspect-i.yaml000064400000000754150403660370013033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produce a nicely formatted string-version of <em>rxp</em>. Perhaps surprisingly, <tt>#inspect</tt> actually produces the more natural version of the string than <tt>#to_s</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "    /ab+c/ix.to_s         #=&gt; /ab+c/ix\n"
full_name: Regexp#inspect
is_singleton: false
name: inspect
params: |
  rxp.inspect   => string

visibility: public
ri/1.8/system/Regexp/new-c.yaml000064400000002552150403660370012147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Constructs a new regular expression from <em>pattern</em>, which can be either a <tt>String</tt> or a <tt>Regexp</tt> (in which case that regexp's options are propagated, and new options may not be specified (a change as of Ruby 1.8). If <em>options</em> is a <tt>Fixnum</tt>, it should be one or more of the constants <tt>Regexp::EXTENDED</tt>, <tt>Regexp::IGNORECASE</tt>, and <tt>Regexp::MULTILINE</tt>, <em>or</em>-ed together. Otherwise, if <em>options</em> is not <tt>nil</tt>, the regexp will be case insensitive. The <em>lang</em> parameter enables multibyte support for the regexp: `n', `N' = none, `e', `E' = EUC, `s', `S' = SJIS, `u', `U' = UTF-8."
- !ruby/struct:SM::Flow::VERB 
  body: "   r1 = Regexp.new('^a-z+:\\s+\\w+')           #=&gt; /^a-z+:\\s+\\w+/\n   r2 = Regexp.new('cat', true)               #=&gt; /cat/i\n   r3 = Regexp.new('dog', Regexp::EXTENDED)   #=&gt; /dog/x\n   r4 = Regexp.new(r2)                        #=&gt; /cat/i\n"
full_name: Regexp::new
is_singleton: true
name: new
params: |
  Regexp.new(string [, options [, lang]])       => regexp
  Regexp.new(regexp)                            => regexp
  Regexp.compile(string [, options [, lang]])   => regexp
  Regexp.compile(regexp)                        => regexp

visibility: public
ri/1.8/system/Regexp/%3d%3d%3d-i.yaml000064400000001223150403660370012521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Case Equality---Synonym for <tt>Regexp#=~</tt> used in case statements.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = &quot;HELLO&quot;\n   case a\n   when /^[a-z]*$/; print &quot;Lower case\\n&quot;\n   when /^[A-Z]*$/; print &quot;Upper case\\n&quot;\n   else;            print &quot;Mixed case\\n&quot;\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Upper case\n"
full_name: Regexp#===
is_singleton: false
name: ===
params: |
  rxp === str   => true or false

visibility: public
ri/1.8/system/Regexp/to_s-i.yaml000064400000001776150403660370012337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string containing the regular expression and its options (using the <tt>(?xxx:yyy)</tt> notation. This string can be fed back in to <tt>Regexp::new</tt> to a regular expression with the same semantics as the original. (However, <tt>Regexp#==</tt> may not return true when comparing the two, as the source of the regular expression itself may differ, as the example shows). <tt>Regexp#inspect</tt> produces a generally more readable version of <em>rxp</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   r1 = /ab+c/ix         #=&gt; /ab+c/ix\n   s1 = r1.to_s          #=&gt; &quot;(?ix-m:ab+c)&quot;\n   r2 = Regexp.new(s1)   #=&gt; /(?ix-m:ab+c)/\n   r1 == r2              #=&gt; false\n   r1.source             #=&gt; &quot;ab+c&quot;\n   r2.source             #=&gt; &quot;(?ix-m:ab+c)&quot;\n"
full_name: Regexp#to_s
is_singleton: false
name: to_s
params: |
  rxp.to_s   => str

visibility: public
ri/1.8/system/Regexp/%3d%3d-i.yaml000064400000001105150403660370012224 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---Two regexps are equal if their patterns are identical, they have the same character set code, and their <tt>casefold?</tt> values are the same.
- !ruby/struct:SM::Flow::VERB 
  body: "   /abc/  == /abc/x   #=&gt; false\n   /abc/  == /abc/i   #=&gt; false\n   /abc/u == /abc/n   #=&gt; false\n"
full_name: Regexp#==
is_singleton: false
name: ==
params: |
  rxp == other_rxp      => true or false
  rxp.eql?(other_rxp)   => true or false

visibility: public
ri/1.8/system/Regexp/options-i.yaml000064400000001777150403660370013067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns the set of bits corresponding to the options used when creating this Regexp (see <tt>Regexp::new</tt> for details. Note that additional bits may be set in the returned options: these are used internally by the regular expression code. These extra bits are ignored if the options are passed to <tt>Regexp::new</tt>."
- !ruby/struct:SM::Flow::VERB 
  body: "   Regexp::IGNORECASE                  #=&gt; 1\n   Regexp::EXTENDED                    #=&gt; 2\n   Regexp::MULTILINE                   #=&gt; 4\n\n   /cat/.options                       #=&gt; 128\n   /cat/ix.options                     #=&gt; 131\n   Regexp.new('cat', true).options     #=&gt; 129\n   Regexp.new('cat', 0, 's').options   #=&gt; 384\n\n   r = /cat/ix\n   Regexp.new(r.source, r.options)     #=&gt; /cat/ix\n"
full_name: Regexp#options
is_singleton: false
name: options
params: |
  rxp.options   => fixnum

visibility: public
ri/1.8/system/Regexp/escape-c.yaml000064400000001121150403660370012605 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escapes any characters that would have special meaning in a regular expression. Returns a new escaped string, or self if no characters are escaped. For any string, <tt>Regexp.escape(<em>str</em>)=~<em>str</em></tt> will be true.
- !ruby/struct:SM::Flow::VERB 
  body: "   Regexp.escape('\\*?{}.')   #=&gt; \\\\*\\?\\{\\}\\.\n"
full_name: Regexp::escape
is_singleton: true
name: escape
params: |
  Regexp.escape(str)   => a_str
  Regexp.quote(str)    => a_str

visibility: public
ri/1.8/system/Regexp/casefold%3f-i.yaml000064400000000443150403660370013437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of the case-insensitive flag.
full_name: Regexp#casefold?
is_singleton: false
name: casefold?
params: |
  rxp.casefold?   => true or false

visibility: public
ri/1.8/system/Regexp/union-c.yaml000064400000002052150403660370012501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a <tt>Regexp</tt> object that is the union of the given <em>pattern</em>s, i.e., will match any of its parts. The <em>pattern</em>s can be Regexp objects, in which case their options will be preserved, or Strings. If no patterns are given, returns <tt>/(?!)/</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Regexp.union                         #=&gt; /(?!)/\n   Regexp.union(&quot;penzance&quot;)             #=&gt; /penzance/\n   Regexp.union(&quot;a+b*c&quot;)                #=&gt; /a+b*c/\n   Regexp.union(&quot;skiing&quot;, &quot;sledding&quot;)   #=&gt; /skiing|sledding/\n   Regexp.union([&quot;skiing&quot;, &quot;sledding&quot;]) #=&gt; /skiing|sledding/\n   Regexp.union(/dogs/, /cats/i)        #=&gt; /(?-mix:dogs)|(?i-mx:cats)/\n"
full_name: Regexp::union
is_singleton: true
name: union
params: |
  Regexp.union(pat1, pat2, ...)            => new_regexp
  Regexp.union(pats_ary)                   => new_regexp

visibility: public
ri/1.8/system/Regexp/compile-c.yaml000064400000000357150403660370013007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Synonym for <tt>Regexp.new</tt>
full_name: Regexp::compile
is_singleton: true
name: compile
params: (...)
visibility: public
ri/1.8/system/Regexp/cdesc-Regexp.yaml000064400000003527150403660370013452 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: compile
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: last_match
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: quote
- !ruby/object:RI::MethodSummary 
  name: union
- !ruby/object:RI::MethodSummary 
  name: yaml_new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-class: Regexp"
- !ruby/struct:SM::Flow::P 
  body: A <tt>Regexp</tt> holds a regular expression, used to match a pattern against strings. Regexps are created using the <tt>/.../</tt> and <tt>%r{...}</tt> literals, and by the <tt>Regexp::new</tt> constructor.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: IGNORECASE
  value: INT2FIX(RE_OPTION_IGNORECASE)
- !ruby/object:RI::Constant 
  comment: 
  name: EXTENDED
  value: INT2FIX(RE_OPTION_EXTENDED)
- !ruby/object:RI::Constant 
  comment: 
  name: MULTILINE
  value: INT2FIX(RE_OPTION_MULTILINE)
full_name: Regexp
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "&"
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: =~
- !ruby/object:RI::MethodSummary 
  name: casefold?
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: kcode
- !ruby/object:RI::MethodSummary 
  name: match
- !ruby/object:RI::MethodSummary 
  name: options
- !ruby/object:RI::MethodSummary 
  name: source
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: "|"
- !ruby/object:RI::MethodSummary 
  name: "~"
name: Regexp
superclass: Object
ri/1.8/system/Mutex_m/extend_object-c.yaml000064400000000270150403660370014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m::extend_object
is_singleton: true
name: extend_object
params: (obj)
visibility: public
ri/1.8/system/Mutex_m/mu_unlock-i.yaml000064400000000255150403660400013534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m#mu_unlock
is_singleton: false
name: mu_unlock
params: ()
visibility: public
ri/1.8/system/Mutex_m/mu_try_lock-i.yaml000064400000000261150403660400014064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m#mu_try_lock
is_singleton: false
name: mu_try_lock
params: ()
visibility: public
ri/1.8/system/Mutex_m/mu_locked%3f-i.yaml000064400000000257150403660400014002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m#mu_locked?
is_singleton: false
name: mu_locked?
params: ()
visibility: public
ri/1.8/system/Mutex_m/mu_initialize-i.yaml000064400000000266150403660400014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m#mu_initialize
is_singleton: false
name: mu_initialize
params: ()
visibility: private
ri/1.8/system/Mutex_m/mu_synchronize-i.yaml000064400000000356150403660400014616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: locking
full_name: Mutex_m#mu_synchronize
is_singleton: false
name: mu_synchronize
params: () {|| ...}
visibility: public
ri/1.8/system/Mutex_m/append_features-c.yaml000064400000000273150403660400014677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m::append_features
is_singleton: true
name: append_features
params: (cl)
visibility: public
ri/1.8/system/Mutex_m/new-c.yaml000064400000000246150403660400012323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/Mutex_m/mu_extended-i.yaml000064400000000261150403660400014036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m#mu_extended
is_singleton: false
name: mu_extended
params: ()
visibility: public
ri/1.8/system/Mutex_m/mu_lock-i.yaml000064400000000251150403660400013165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m#mu_lock
is_singleton: false
name: mu_lock
params: ()
visibility: public
ri/1.8/system/Mutex_m/define_aliases-c.yaml000064400000000271150403660410014464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Mutex_m::define_aliases
is_singleton: true
name: define_aliases
params: (cl)
visibility: public
ri/1.8/system/Mutex_m/cdesc-Mutex_m.yaml000064400000002363150403660410014012 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: define_aliases
- !ruby/object:RI::MethodSummary 
  name: extend_object
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Usage
- !ruby/struct:SM::Flow::P 
  body: "Extend an object and use it like a Mutex object:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;mutex_m.rb&quot;\n  obj = Object.new\n  obj.extend Mutex_m\n  # ...\n"
- !ruby/struct:SM::Flow::P 
  body: "Or, include Mutex_m in a class to have its instances behave like a Mutex object:"
- !ruby/struct:SM::Flow::VERB 
  body: "  class Foo\n    include Mutex_m\n    # ...\n  end\n\n  obj = Foo.new\n"
constants: []

full_name: Mutex_m
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: mu_extended
- !ruby/object:RI::MethodSummary 
  name: mu_initialize
- !ruby/object:RI::MethodSummary 
  name: mu_lock
- !ruby/object:RI::MethodSummary 
  name: mu_locked?
- !ruby/object:RI::MethodSummary 
  name: mu_synchronize
- !ruby/object:RI::MethodSummary 
  name: mu_try_lock
- !ruby/object:RI::MethodSummary 
  name: mu_unlock
name: Mutex_m
superclass: 
ri/1.8/system/RegexpError/cdesc-RegexpError.yaml000064400000000773150403660410015471 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-class: Regexp"
- !ruby/struct:SM::Flow::P 
  body: A <tt>Regexp</tt> holds a regular expression, used to match a pattern against strings. Regexps are created using the <tt>/.../</tt> and <tt>%r{...}</tt> literals, and by the <tt>Regexp::new</tt> constructor.
constants: []

full_name: RegexpError
includes: []

instance_methods: []

name: RegexpError
superclass: StandardError
ri/1.8/system/Range/eql%3f-i.yaml000064400000001115150403660410012232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns <tt>true</tt> only if <em>obj</em> is a Range, has equivalent beginning and end items (by comparing them with #eql?), and has the same #exclude_end? setting as <em>rng</em>."
- !ruby/struct:SM::Flow::VERB 
  body: "  (0..2) == (0..2)            #=&gt; true\n  (0..2) == Range.new(0,2)    #=&gt; true\n  (0..2) == (0...2)           #=&gt; false\n"
full_name: Range#eql?
is_singleton: false
name: eql?
params: |
  rng.eql?(obj)    => true or false

visibility: public
ri/1.8/system/Range/each-i.yaml000064400000001254150403660410012057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over the elements <em>rng</em>, passing each in turn to the block. You can only iterate if the start object of the range supports the <tt>succ</tt> method (which means that you can't iterate over ranges of <tt>Float</tt> objects).
- !ruby/struct:SM::Flow::VERB 
  body: "   (10..15).each do |n|\n      print n, ' '\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   10 11 12 13 14 15\n"
full_name: Range#each
is_singleton: false
name: each
params: |
  rng.each {| i | block } => rng

visibility: public
ri/1.8/system/Range/last-i.yaml000064400000000612150403660410012117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the object that defines the end of <em>rng</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).end    #=&gt; 10\n   (1...10).end   #=&gt; 10\n"
full_name: Range#last
is_singleton: false
name: last
params: |
  rng.end    => obj
  rng.last   => obj

visibility: public
ri/1.8/system/Range/to_yaml-i.yaml000064400000000262150403660410012621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Range#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Range/hash-i.yaml000064400000000603150403660410012077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate a hash value such that two ranges with the same start and end points, and the same value for the &quot;exclude end&quot; flag, generate the same hash value.
full_name: Range#hash
is_singleton: false
name: hash
params: |
  rng.hash    => fixnum

visibility: public
ri/1.8/system/Range/exclude_end%3f-i.yaml000064400000000472150403660410013735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>rng</em> excludes its end value.
full_name: Range#exclude_end?
is_singleton: false
name: exclude_end?
params: |
  rng.exclude_end?    => true or false

visibility: public
ri/1.8/system/Range/member%3f-i.yaml000064400000001463150403660410012726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>obj</em> is an element of <em>rng</em>, <tt>false</tt> otherwise. Conveniently, <tt>===</tt> is the comparison operator used by <tt>case</tt> statements.
- !ruby/struct:SM::Flow::VERB 
  body: "   case 79\n   when 1..50   then   print &quot;low\\n&quot;\n   when 51..75  then   print &quot;medium\\n&quot;\n   when 76..100 then   print &quot;high\\n&quot;\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   high\n"
full_name: Range#member?
is_singleton: false
name: member?
params: |
  rng === obj       =>  true or false
  rng.member?(val)  =>  true or false
  rng.include?(val) =>  true or false

visibility: public
ri/1.8/system/Range/yaml_new-c.yaml000064400000000272150403660410012763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Range::yaml_new
is_singleton: true
name: yaml_new
params: ( klass, tag, val )
visibility: public
ri/1.8/system/Range/inspect-i.yaml000064400000000521150403660410012620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert this range object to a printable form (using <tt>inspect</tt> to convert the start and end objects).
full_name: Range#inspect
is_singleton: false
name: inspect
params: |
  rng.inspect  => string

visibility: public
ri/1.8/system/Range/cdesc-Range.yaml000064400000006136150403660410013050 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: yaml_new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A <tt>Range</tt> represents an interval---a set of values with a start and an end. Ranges may be constructed using the <em>s</em><tt>..</tt><em>e</em> and <em>s</em><tt>...</tt><em>e</em> literals, or with <tt>Range::new</tt>. Ranges constructed using <tt>..</tt> run from the start to the end inclusively. Those created using <tt>...</tt> exclude the end value. When used as an iterator, ranges return each value in the sequence.
- !ruby/struct:SM::Flow::VERB 
  body: "   (-1..-5).to_a      #=&gt; []\n   (-5..-1).to_a      #=&gt; [-5, -4, -3, -2, -1]\n   ('a'..'e').to_a    #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;]\n   ('a'...'e').to_a   #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: Ranges can be constructed using objects of any type, as long as the objects can be compared using their <tt>&lt;=&gt;</tt> operator and they support the <tt>succ</tt> method to return the next object in sequence.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Xs                # represent a string of 'x's\n     include Comparable\n     attr :length\n     def initialize(n)\n       @length = n\n     end\n     def succ\n       Xs.new(@length + 1)\n     end\n     def &lt;=&gt;(other)\n       @length &lt;=&gt; other.length\n     end\n     def to_s\n       sprintf &quot;%2d #{inspect}&quot;, @length\n     end\n     def inspect\n       'x' * @length\n     end\n   end\n\n   r = Xs.new(3)..Xs.new(6)   #=&gt; xxx..xxxxxx\n   r.to_a                     #=&gt; [xxx, xxxx, xxxxx, xxxxxx]\n   r.member?(Xs.new(5))       #=&gt; true\n"
- !ruby/struct:SM::Flow::P 
  body: In the previous code example, class <tt>Xs</tt> includes the <tt>Comparable</tt> module. This is because <tt>Enumerable#member?</tt> checks for equality using <tt>==</tt>. Including <tt>Comparable</tt> ensures that the <tt>==</tt> method is defined in terms of the <tt>&lt;=&gt;</tt> method implemented in <tt>Xs</tt>.
constants: []

full_name: Range
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: begin
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: end
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: exclude_end?
- !ruby/object:RI::MethodSummary 
  name: first
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: last
- !ruby/object:RI::MethodSummary 
  name: member?
- !ruby/object:RI::MethodSummary 
  name: pretty_print
- !ruby/object:RI::MethodSummary 
  name: step
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
name: Range
superclass: Object
ri/1.8/system/Range/include%3f-i.yaml000064400000001465150403660410013104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>obj</em> is an element of <em>rng</em>, <tt>false</tt> otherwise. Conveniently, <tt>===</tt> is the comparison operator used by <tt>case</tt> statements.
- !ruby/struct:SM::Flow::VERB 
  body: "   case 79\n   when 1..50   then   print &quot;low\\n&quot;\n   when 51..75  then   print &quot;medium\\n&quot;\n   when 76..100 then   print &quot;high\\n&quot;\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   high\n"
full_name: Range#include?
is_singleton: false
name: include?
params: |
  rng === obj       =>  true or false
  rng.member?(val)  =>  true or false
  rng.include?(val) =>  true or false

visibility: public
ri/1.8/system/Range/new-c.yaml000064400000000704150403660410011741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Constructs a range using the given <em>start</em> and <em>end</em>. If the third parameter is omitted or is <tt>false</tt>, the <em>range</em> will include the end object; otherwise, it will be excluded.
full_name: Range::new
is_singleton: true
name: new
params: |
  Range.new(start, end, exclusive=false)    => range

visibility: public
ri/1.8/system/Range/pretty_print-i.yaml000064400000000262150403660410013720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Range#pretty_print
is_singleton: false
name: pretty_print
params: (q)
visibility: public
ri/1.8/system/Range/%3d%3d%3d-i.yaml000064400000001453150403660410012323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>obj</em> is an element of <em>rng</em>, <tt>false</tt> otherwise. Conveniently, <tt>===</tt> is the comparison operator used by <tt>case</tt> statements.
- !ruby/struct:SM::Flow::VERB 
  body: "   case 79\n   when 1..50   then   print &quot;low\\n&quot;\n   when 51..75  then   print &quot;medium\\n&quot;\n   when 76..100 then   print &quot;high\\n&quot;\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   high\n"
full_name: Range#===
is_singleton: false
name: ===
params: |
  rng === obj       =>  true or false
  rng.member?(val)  =>  true or false
  rng.include?(val) =>  true or false

visibility: public
ri/1.8/system/Range/step-i.yaml000064400000001624150403660410012133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Iterates over <em>rng</em>, passing each <em>n</em>th element to the block. If the range contains numbers, <em>n</em> is added for each iteration. Otherwise <tt>step</tt> invokes <tt>succ</tt> to iterate through range elements. The following code uses class <tt>Xs</tt>, which is defined in the class-level documentation.
- !ruby/struct:SM::Flow::VERB 
  body: "   range = Xs.new(1)..Xs.new(10)\n   range.step(2) {|x| puts x}\n   range.step(3) {|x| puts x}\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "    1 x\n    3 xxx\n    5 xxxxx\n    7 xxxxxxx\n    9 xxxxxxxxx\n    1 x\n    4 xxxx\n    7 xxxxxxx\n   10 xxxxxxxxxx\n"
full_name: Range#step
is_singleton: false
name: step
params: |
  rng.step(n=1) {| obj | block }    => rng

visibility: public
ri/1.8/system/Range/first-i.yaml000064400000000435150403660410012306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first object in <em>rng</em>.
full_name: Range#first
is_singleton: false
name: first
params: |
  rng.first    => obj
  rng.begin    => obj

visibility: public
ri/1.8/system/Range/end-i.yaml000064400000000610150403660410011720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the object that defines the end of <em>rng</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   (1..10).end    #=&gt; 10\n   (1...10).end   #=&gt; 10\n"
full_name: Range#end
is_singleton: false
name: end
params: |
  rng.end    => obj
  rng.last   => obj

visibility: public
ri/1.8/system/Range/to_s-i.yaml000064400000000413150403660410012117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert this range object to a printable form.
full_name: Range#to_s
is_singleton: false
name: to_s
params: |
  rng.to_s   => string

visibility: public
ri/1.8/system/Range/%3d%3d-i.yaml000064400000001126150403660410012024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns <tt>true</tt> only if <em>obj</em> is a Range, has equivalent beginning and end items (by comparing them with <tt>==</tt>), and has the same #exclude_end? setting as &lt;i&gt;rng&lt;/t&gt;."
- !ruby/struct:SM::Flow::VERB 
  body: "  (0..2) == (0..2)            #=&gt; true\n  (0..2) == Range.new(0,2)    #=&gt; true\n  (0..2) == (0...2)           #=&gt; false\n"
full_name: Range#==
is_singleton: false
name: ==
params: |
  rng == obj    => true or false

visibility: public
ri/1.8/system/Range/begin-i.yaml000064400000000435150403660410012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the first object in <em>rng</em>.
full_name: Range#begin
is_singleton: false
name: begin
params: |
  rng.first    => obj
  rng.begin    => obj

visibility: public
ri/1.8/system/Exception2MessageMapper/fail-i.yaml000064400000000303150403660410015522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Exception2MessageMapper#fail
is_singleton: false
name: fail
params: (err = nil, *rest)
visibility: public
ri/1.8/system/Exception2MessageMapper/Raise-i.yaml000064400000000612150403660410015655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: Fail
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fail(err, *rest)
- !ruby/struct:SM::Flow::VERB 
  body: "    err:        exception\n    rest:       message arguments\n"
full_name: Exception2MessageMapper#Raise
is_singleton: false
name: Raise
params: (err = nil, *rest)
visibility: public
ri/1.8/system/Exception2MessageMapper/Fail-i.yaml000064400000000372150403660410015470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #Raise"
full_name: Exception2MessageMapper#Fail
is_singleton: false
name: Fail
params: (err = nil, *rest)
visibility: public
ri/1.8/system/Exception2MessageMapper/def_e2message-i.yaml000064400000000604150403660410017304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def_e2message(c, m)
- !ruby/struct:SM::Flow::VERB 
  body: "        c:  exception\n        m:  message_form\n    define exception c with message m.\n"
full_name: Exception2MessageMapper#def_e2message
is_singleton: false
name: def_e2message
params: (c, m)
visibility: public
ri/1.8/system/Exception2MessageMapper/E2MM/extend_object-c.yaml000064400000000315150403660410020121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Exception2MessageMapper::E2MM::extend_object
is_singleton: true
name: extend_object
params: (cl)
visibility: public
ri/1.8/system/Exception2MessageMapper/E2MM/e2mm_message-c.yaml000064400000000323150403660410017647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Exception2MessageMapper::E2MM::e2mm_message
is_singleton: true
name: e2mm_message
params: (klass, exp)
visibility: public
ri/1.8/system/Exception2MessageMapper/E2MM/cdesc-E2MM.yaml000064400000001010150403660410016634 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: Raise
- !ruby/object:RI::MethodSummary 
  name: def_e2message
- !ruby/object:RI::MethodSummary 
  name: def_exception
- !ruby/object:RI::MethodSummary 
  name: e2mm_message
- !ruby/object:RI::MethodSummary 
  name: extend_object
- !ruby/object:RI::MethodSummary 
  name: extend_to
comment: 
constants: []

full_name: Exception2MessageMapper::E2MM
includes: []

instance_methods: []

name: E2MM
superclass: 
ri/1.8/system/Exception2MessageMapper/E2MM/Raise-c.yaml000064400000000653150403660410016354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Fail(klass, err, *rest)
- !ruby/struct:SM::Flow::VERB 
  body: "    klass:  class to define exception under.\n    err:        exception\n    rest:       message arguments\n"
full_name: Exception2MessageMapper::E2MM::Raise
is_singleton: true
name: Raise
params: (klass = E2MM, err = nil, *rest)
visibility: public
ri/1.8/system/Exception2MessageMapper/E2MM/def_e2message-c.yaml000064400000000703150403660410017776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: E2MM.def_exception(k, e, m)
- !ruby/struct:SM::Flow::VERB 
  body: "        k:  class to define exception under.\n        e:  exception\n        m:  message_form\n    define exception c with message m.\n"
full_name: Exception2MessageMapper::E2MM::def_e2message
is_singleton: true
name: def_e2message
params: (k, c, m)
visibility: public
ri/1.8/system/Exception2MessageMapper/E2MM/def_exception-c.yaml000064400000001034150403660410020117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: E2MM.def_exception(k, n, m, s)
- !ruby/struct:SM::Flow::VERB 
  body: "        k:  class to define exception under.\n        n:  exception_name\n        m:  message_form\n        s:      superclass(default: StandardError)\n    define exception named ``c'' with message m.\n"
full_name: Exception2MessageMapper::E2MM::def_exception
is_singleton: true
name: def_exception
params: (k, n, m, s = StandardError)
visibility: public
ri/1.8/system/Exception2MessageMapper/E2MM/extend_to-c.yaml000064400000000377150403660410017305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: backward compatibility
full_name: Exception2MessageMapper::E2MM::extend_to
is_singleton: true
name: extend_to
params: (b)
visibility: public
ri/1.8/system/Exception2MessageMapper/bind-i.yaml000064400000000265150403660410015532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Exception2MessageMapper#bind
is_singleton: false
name: bind
params: (cl)
visibility: public
ri/1.8/system/Exception2MessageMapper/cdesc-Exception2MessageMapper.yaml000064400000001123150403660410022133 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: E2MM
  value: Exception2MessageMapper
full_name: Exception2MessageMapper
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: Fail
- !ruby/object:RI::MethodSummary 
  name: Raise
- !ruby/object:RI::MethodSummary 
  name: bind
- !ruby/object:RI::MethodSummary 
  name: def_e2message
- !ruby/object:RI::MethodSummary 
  name: def_exception
- !ruby/object:RI::MethodSummary 
  name: fail
name: Exception2MessageMapper
superclass: 
ri/1.8/system/Exception2MessageMapper/def_exception-i.yaml000064400000000735150403660410017434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def_exception(n, m, s)
- !ruby/struct:SM::Flow::VERB 
  body: "        n:  exception_name\n        m:  message_form\n        s:      superclass(default: StandardError)\n    define exception named ``c'' with message m.\n"
full_name: Exception2MessageMapper#def_exception
is_singleton: false
name: def_exception
params: (n, m, s = StandardError)
visibility: public
ri/1.8/system/Socket/connect-i.yaml000064400000021427150403660410013010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Requests a connection to be made on the given <tt>server_sockaddr</tt>. Returns 0 if successful, otherwise an exception is raised.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameter
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>server_sockaddr</tt> - the <tt>struct</tt> sockaddr contained in a string
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "     # Pull down Google's web page\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 80, 'www.google.com' )\n     socket.connect( sockaddr )\n     socket.write( &quot;GET / HTTP/1.0\\r\\n\\r\\n&quot; )\n     results = socket.read\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Unix-based Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On unix-based systems the following system exceptions may be raised if the call to <em>connect</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - search permission is denied for a component of the prefix path or write access to the <tt>socket</tt> is denided
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRINUSE - the <em>sockaddr</em> is already in use
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRNOTAVAIL - the specified <em>sockaddr</em> is not available from the local machine
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EAFNOSUPPORT - the specified <em>sockaddr</em> is not a valid address for the address family of the specified <tt>socket</tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EALREADY - a connection is already in progress for the specified socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EBADF - the <tt>socket</tt> is not a valid file descriptor
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ECONNREFUSED - the target <em>sockaddr</em> was not listening for connections refused the connection request
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ECONNRESET - the remote host reset the connection request
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the <em>sockaddr</em> cannot be accessed
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EHOSTUNREACH - the destination host cannot be reached (probably because the host is down or a remote router cannot reach it)
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINPROGRESS - the O_NONBLOCK is set for the <tt>socket</tt> and the connection cnanot be immediately established; the connection will be established asynchronously
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINTR - the attempt to establish the connection was interrupted by delivery of a signal that was caught; the connection will be established asynchronously
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EISCONN - the specified <tt>socket</tt> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the address length used for the <em>sockaddr</em> is not a valid length for the address family or there is an invalid family in <em>sockaddr</em>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENAMETOOLONG - the pathname resolved had a length which exceeded PATH_MAX
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN - the local interface used to reach the destination is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETUNREACH - no route to the network is present
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOSR - there were insufficient STREAMS resources available to complete the operation
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <tt>socket</tt> argument does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the calling <tt>socket</tt> is listening and cannot be connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EPROTOTYPE - the <em>sockaddr</em> has a different type than the socket bound to the specified peer address
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ETIMEDOUT - the attempt to connect time out before a connection was made.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "On unix-based systems if the address family of the calling <tt>socket</tt> is AF_UNIX the follow exceptions may be raised if the call to <em>connect</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EIO - an i/o error occured while reading from or writing to the file system
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ELOOP - too many symbolic links were encountered in translating the pathname in <em>sockaddr</em>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENAMETOOLLONG - a component of a pathname exceeded NAME_MAX characters, or an entired pathname exceeded PATH_MAX characters
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOENT - a component of the pathname does not name an existing file or the pathname is an empty string
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTDIR - a component of the path prefix of the pathname in <em>sockaddr</em> is not a directory
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Windows Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On Windows systems the following system exceptions may be raised if the call to <em>connect</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN - the network is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRINUSE - the socket's local address is already in use
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINTR - the socket was cancelled
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINPROGRESS - a blocking socket is in progress or the service provider is still processing a callback function. Or a nonblocking connect call is in progress on the <tt>socket</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EALREADY - see Errno::EINVAL
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRNOTAVAIL - the remote address is not a valid address, such as ADDR_ANY TODO check ADDRANY TO INADDR_ANY
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EAFNOSUPPORT - addresses in the specified family cannot be used with with this <tt>socket</tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ECONNREFUSED - the target <em>sockaddr</em> was not listening for connections refused the connection request
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the socket's internal address or address length parameter is too small or is not a valid part of the user space address
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <tt>socket</tt> is a listening socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EISCONN - the <tt>socket</tt> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETUNREACH - the network cannot be reached from this host at this time
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EHOSTUNREACH - no route to the network is present
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <tt>socket</tt> argument does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ETIMEDOUT - the attempt to connect time out before a connection was made.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EWOULDBLOCK - the socket is marked as nonblocking and the connection cannot be completed immediately
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - the attempt to connect the datagram socket to the broadcast address failed
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: connect manual pages on unix-based systems
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: connect function in Microsoft's Winsock functions reference
  type: :BULLET
full_name: Socket#connect
is_singleton: false
name: connect
params: |
  socket.connect(server_sockaddr) => 0

visibility: public
ri/1.8/system/Socket/recvfrom-i.yaml000064400000016601150403660410013200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Receives up to <em>maxlen</em> bytes from <tt>socket</tt>. <em>flags</em> is zero or more of the <tt>MSG_</tt> options. The first element of the results, <em>mesg</em>, is the data received. The second element, <em>sender_sockaddr</em>, contains protocol-specific information on the sender.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>maxlen</tt> - the number of bytes to receive from the socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>flags</tt> - zero or more of the <tt>MSG_</tt> options
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     # In one file, start this first\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.bind( sockaddr )\n     socket.listen( 5 )\n     client, client_sockaddr = socket.accept\n     data = client.recvfrom( 20 )[0].chomp\n     puts &quot;I only received 20 bytes '#{data}'&quot;\n     sleep 1\n     socket.close\n\n     # In another file, start this second\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.connect( sockaddr )\n     socket.puts &quot;Watch this get cut short!&quot;\n     socket.close\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Unix-based Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On unix-based based systems the following system exceptions may be raised if the call to <em>recvfrom</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EAGAIN - the <tt>socket</tt> file descriptor is marked as O_NONBLOCK and no data is waiting to be received; or MSG_OOB is set and no out-of-band data is available and either the <tt>socket</tt> file descriptor is marked as O_NONBLOCK or the <tt>socket</tt> does not support blocking to wait for out-of-band-data
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EWOULDBLOCK - see Errno::EAGAIN
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EBADF - the <tt>socket</tt> is not a valid file descriptor
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ECONNRESET - a connection was forcibly closed by a peer
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the socket's internal buffer, address or address length cannot be accessed or written
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINTR - a signal interupted <em>recvfrom</em> before any data was available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the MSG_OOB flag is set and no out-of-band data is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EIO - an i/o error occurred while reading from or writing to the filesystem
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - insufficient resources were available in the system to perform the operation
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOMEM - insufficient memory was available to fulfill the request
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOSR - there were insufficient STREAMS resources available to complete the operation
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTCONN - a receive is attempted on a connection-mode socket that is not connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <tt>socket</tt> does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the specified flags are not supported for this socket type
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ETIMEDOUT - the connection timed out during connection establishment or due to a transmission timeout on an active connection
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Windows Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On Windows systems the following system exceptions may be raised if the call to <em>recvfrom</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN - the network is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the internal buffer and from parameters on <tt>socket</tt> are not part of the user address space, or the internal fromlen parameter is too small to accomodate the peer address
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINTR - the (blocking) call was cancelled by an internal call to the WinSock function WSACancelBlockingCall
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINPROGRESS - a blocking Windows Sockets 1.1 call is in progress or the service provider is still processing a callback function
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - <tt>socket</tt> has not been bound with a call to <em>bind</em>, or an unknown flag was specified, or MSG_OOB was specified for a socket with SO_OOBINLINE enabled, or (for byte stream-style sockets only) the internal len parameter on <tt>socket</tt> was zero or negative
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EISCONN - <tt>socket</tt> is already connected. The call to <em>recvfrom</em> is not permitted with a connected socket on a socket that is connetion oriented or connectionless.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETRESET - the connection has been broken due to the keep-alive activity detecting a failure while the operation was in progress.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - MSG_OOB was specified, but <tt>socket</tt> is not stream-style such as type SOCK_STREAM. OOB data is not supported in the communication domain associated with <tt>socket</tt>, or <tt>socket</tt> is unidirectional and supports only send operations
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ESHUTDOWN - <tt>socket</tt> has been shutdown. It is not possible to call <em>recvfrom</em> on a socket after <em>shutdown</em> has been invoked.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EWOULDBLOCK - <tt>socket</tt> is marked as nonblocking and a call to <em>recvfrom</em> would block.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EMSGSIZE - the message was too large to fit into the specified buffer and was truncated.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ETIMEDOUT - the connection has been dropped, because of a network failure or because the system on the other end went down without notice
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ECONNRESET - the virtual circuit was reset by the remote side executing a hard or abortive close. The application should close the socket; it is no longer usable. On a UDP-datagram socket this error indicates a previous send operation resulted in an ICMP Port Unreachable message.
  type: :BULLET
full_name: Socket#recvfrom
is_singleton: false
name: recvfrom
params: |
  socket.recvfrom(maxlen) => [mesg, sender_sockaddr]
  socket.recvfrom(maxlen, flags) => [mesg, sender_sockaddr]

visibility: public
ri/1.8/system/Socket/getservbyname-c.yaml000064400000001331150403660410014214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> is a service name (&quot;ftp&quot;, &quot;telnet&quot;, ...) and proto is a protocol name (&quot;udp&quot;, &quot;tcp&quot;, ...). '/etc/services' (or your system's equivalent) is searched for a service for <tt>name</tt> and <tt>proto</tt>, and the port number is returned.
- !ruby/struct:SM::Flow::P 
  body: Note that unlike Socket.getaddrinfo, <tt>proto</tt> may not be specified using the Socket::SOCK_* constants, a string must must be used.
full_name: Socket::getservbyname
is_singleton: true
name: getservbyname
params: " Socket.getservbyname(name, proto=\"tcp\") => port\n"
visibility: public
ri/1.8/system/Socket/Constants/cdesc-Constants.yaml000064400000000357150403660410016137 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: constants
constants: []

full_name: Socket::Constants
includes: []

instance_methods: []

name: Constants
superclass: 
ri/1.8/system/Socket/cdesc-Socket.yaml000064400000004447150403660410013443 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: getaddrinfo
- !ruby/object:RI::MethodSummary 
  name: gethostbyname
- !ruby/object:RI::MethodSummary 
  name: getservbyname
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AF_INET6
  value: Object.new
full_name: Socket
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept
- !ruby/object:RI::MethodSummary 
  name: accept_nonblock
- !ruby/object:RI::MethodSummary 
  name: bind
- !ruby/object:RI::MethodSummary 
  name: connect
- !ruby/object:RI::MethodSummary 
  name: connect_nonblock
- !ruby/object:RI::MethodSummary 
  name: listen
- !ruby/object:RI::MethodSummary 
  name: recvfrom
- !ruby/object:RI::MethodSummary 
  name: recvfrom_nonblock
- !ruby/object:RI::MethodSummary 
  name: sysaccept
name: Socket
superclass: Object
ri/1.8/system/Socket/recvfrom_nonblock-i.yaml000064400000005247150403660410015071 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Receives up to <em>maxlen</em> bytes from <tt>socket</tt> using recvfrom(2) after O_NONBLOCK is set for the underlying file descriptor. <em>flags</em> is zero or more of the <tt>MSG_</tt> options. The first element of the results, <em>mesg</em>, is the data received. The second element, <em>sender_sockaddr</em>, contains protocol-specific information on the sender.
- !ruby/struct:SM::Flow::P 
  body: "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."
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>maxlen</tt> - the number of bytes to receive from the socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>flags</tt> - zero or more of the <tt>MSG_</tt> options
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     # In one file, start this first\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new(AF_INET, SOCK_STREAM, 0)\n     sockaddr = Socket.sockaddr_in(2200, 'localhost')\n     socket.bind(sockaddr)\n     socket.listen(5)\n     client, client_sockaddr = socket.accept\n     begin\n       pair = client.recvfrom_nonblock(20)\n     rescue Errno::EAGAIN, Errno::EWOULDBLOCK\n       IO.select([client])\n       retry\n     end\n     data = pair[0].chomp\n     puts &quot;I only received 20 bytes '#{data}'&quot;\n     sleep 1\n     socket.close\n\n     # In another file, start this second\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new(AF_INET, SOCK_STREAM, 0)\n     sockaddr = Socket.sockaddr_in(2200, 'localhost')\n     socket.connect(sockaddr)\n     socket.puts &quot;Watch this get cut short!&quot;\n     socket.close\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#recvfrom for the exceptions that may be thrown if the call to <em>recvfrom_nonblock</em> fails.
- !ruby/struct:SM::Flow::P 
  body: Socket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, including Errno::EAGAIN.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#recvfrom
  type: :BULLET
full_name: Socket#recvfrom_nonblock
is_singleton: false
name: recvfrom_nonblock
params: |
  socket.recvfrom_nonblock(maxlen) => [mesg, sender_sockaddr]
  socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_sockaddr]

visibility: public
ri/1.8/system/Socket/bind-i.yaml000064400000014131150403660410012265 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Binds to the given <tt>struct</tt> sockaddr.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameter
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>server_sockaddr</tt> - the <tt>struct</tt> sockaddr contained in a string
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.bind( sockaddr )\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Unix-based Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On unix-based based systems the following system exceptions may be raised if the call to <em>bind</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - the specified <em>sockaddr</em> is protected and the current user does not have permission to bind to it
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRINUSE - the specified <em>sockaddr</em> is already in use
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRNOTAVAIL - the specified <em>sockaddr</em> is not available from the local machine
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EAFNOSUPPORT - the specified <em>sockaddr</em> isnot a valid address for the family of the calling <tt>socket</tt>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EBADF - the <em>sockaddr</em> specified is not a valid file descriptor
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the <em>sockaddr</em> argument cannot be accessed
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <tt>socket</tt> is already bound to an address, and the protocol does not support binding to the new <em>sockaddr</em> or the <tt>socket</tt> has been shut down.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the address length is not a valid length for the address family
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENAMETOOLONG - the pathname resolved had a length which exceeded PATH_MAX
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOSR - there were insufficient STREAMS resources available to complete the operation
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <tt>socket</tt> does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the socket type of the <tt>socket</tt> does not support binding to an address
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "On unix-based based systems if the address family of the calling <tt>socket</tt> is Socket::AF_UNIX the follow exceptions may be raised if the call to <em>bind</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - search permission is denied for a component of the prefix path or write access to the <tt>socket</tt> is denided
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EDESTADDRREQ - the <em>sockaddr</em> argument is a null pointer
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EISDIR - same as Errno::EDESTADDRREQ
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EIO - an i/o error occurred
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ELOOP - too many symbolic links were encountered in translating the pathname in <em>sockaddr</em>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENAMETOOLLONG - a component of a pathname exceeded NAME_MAX characters, or an entired pathname exceeded PATH_MAX characters
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOENT - a component of the pathname does not name an existing file or the pathname is an empty string
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTDIR - a component of the path prefix of the pathname in <em>sockaddr</em> is not a directory
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EROFS - the name would reside on a read only filesystem
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Windows Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On Windows systems the following system exceptions may be raised if the call to <em>bind</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN-- the network is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - the attempt to connect the datagram socket to the broadcast address failed
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRINUSE - the socket's local address is already in use
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRNOTAVAIL - the specified address is not a valid address for this computer
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the socket's internal address or address length parameter is too small or is not a valid part of the user space addressed
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <tt>socket</tt> is already bound to an address
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <tt>socket</tt> argument does not refer to a socket
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: bind manual pages on unix-based systems
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: bind function in Microsoft's Winsock functions reference
  type: :BULLET
full_name: Socket#bind
is_singleton: false
name: bind
params: |
  socket.bind(server_sockaddr) => 0

visibility: public
ri/1.8/system/Socket/accept_nonblock-i.yaml000064400000004172150403660410014501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Accepts an incoming connection using accept(2) after O_NONBLOCK is set for the underlying file descriptor. It returns an array containg the accpeted socket for the incoming connection, <em>client_socket</em>, and a string that contains the <tt>struct</tt> sockaddr information about the caller, <em>client_sockaddr</em>.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     # In one script, start this first\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new(AF_INET, SOCK_STREAM, 0)\n     sockaddr = Socket.sockaddr_in(2200, 'localhost')\n     socket.bind(sockaddr)\n     socket.listen(5)\n     begin\n       client_socket, client_sockaddr = socket.accept_nonblock\n     rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR\n       IO.select([socket])\n       retry\n     end\n     puts &quot;The client said, '#{client_socket.readline.chomp}'&quot;\n     client_socket.puts &quot;Hello from script one!&quot;\n     socket.close\n\n     # In another script, start this second\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new(AF_INET, SOCK_STREAM, 0)\n     sockaddr = Socket.sockaddr_in(2200, 'localhost')\n     socket.connect(sockaddr)\n     socket.puts &quot;Hello from script 2.&quot;\n     puts &quot;The server said, '#{socket.readline.chomp}'&quot;\n     socket.close\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#accept for the exceptions that may be thrown if the call to <em>accept_nonblock</em> fails.
- !ruby/struct:SM::Flow::P 
  body: Socket#accept_nonblock may raise any error corresponding to accept(2) failure, including Errno::EAGAIN.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#accept
  type: :BULLET
full_name: Socket#accept_nonblock
is_singleton: false
name: accept_nonblock
params: |
  socket.accept_nonblock => [client_socket, client_sockaddr]

visibility: public
ri/1.8/system/Socket/gethostbyname-c.yaml000064400000007502150403660410014220 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Resolve <tt>host</tt> and return name and address information for it, similarly to gethostbyname(3). <tt>host</tt> can be a domain name or the presentation format of an address.
- !ruby/struct:SM::Flow::P 
  body: "Returns an array of information similar to that found in a +struct hostent+:"
- !ruby/struct:SM::Flow::VERB 
  body: "  - cannonical name: the cannonical name for host in the DNS, or a\n    string representing the address\n  - aliases: an array of aliases for the canonical name, there may be no aliases\n  - address family: usually one of Socket::AF_INET or Socket::AF_INET6\n  - address: a string, the binary value of the +struct sockaddr+ for this name, in\n    the indicated address family\n  - ...: if there are multiple addresses for this host,  a series of\n    strings/+struct sockaddr+s may follow, not all necessarily in the same\n    address family. Note that the fact that they may not be all in the same\n    address family is a departure from the behaviour of gethostbyname(3).\n"
- !ruby/struct:SM::Flow::P 
  body: "Note: I believe that the fact that the multiple addresses returned are not necessarily in the same address family may be a bug, since if this function actually called gethostbyname(3), ALL the addresses returned in the trailing address list (h_addr_list from struct hostent) would be of the same address family! Examples from my system, OS X 10.3:"
- !ruby/struct:SM::Flow::VERB 
  body: "  [&quot;localhost&quot;, [], 30, &quot;\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001&quot;, &quot;\\177\\000\\000\\001&quot;]\n    and\n  [&quot;ensemble.local&quot;, [], 30, &quot;\\376\\200\\000\\004\\000\\000\\000\\000\\002\\003\\223\\377\\376\\255\\010\\214&quot;, &quot;\\300\\250{\\232&quot; ]\n"
- !ruby/struct:SM::Flow::P 
  body: "Similar information can be returned by Socket.getaddrinfo if called as:"
- !ruby/struct:SM::Flow::VERB 
  body: "   Socket.getaddrinfo(<tt>host</tt>, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname &quot;example.com&quot;\n  =&gt; [&quot;example.com&quot;, [], 2, &quot;\\300\\000\\&quot;\\246&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This name has no DNS aliases, and a single IPv4 address.
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname &quot;smtp.telus.net&quot;\n  =&gt; [&quot;smtp.svc.telus.net&quot;, [&quot;smtp.telus.net&quot;], 2, &quot;\\307\\271\\334\\371&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This name is an an alias so the canonical name is returned, as well as the alias and a single IPv4 address.
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname &quot;localhost&quot;\n  =&gt; [&quot;localhost&quot;, [], 30, &quot;\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001&quot;, &quot;\\177\\000\\000\\001&quot;]\n"
- !ruby/struct:SM::Flow::P 
  body: This machine has no aliases, returns an IPv6 address, and has an additional IPv4 address.
- !ruby/struct:SM::Flow::P 
  body: "<tt>host</tt> can also be an IP address in presentation format, in which case a reverse lookup is done on the address:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Socket.gethostbyname(&quot;127.0.0.1&quot;)\n  =&gt; [&quot;localhost&quot;, [], 2, &quot;\\177\\000\\000\\001&quot;]\n\n  Socket.gethostbyname(&quot;192.0.34.166&quot;)\n  =&gt; [&quot;www.example.com&quot;, [], 2, &quot;\\300\\000\\&quot;\\246&quot;]\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: See
- !ruby/struct:SM::Flow::P 
  body: "See: Socket.getaddrinfo"
full_name: Socket::gethostbyname
is_singleton: true
name: gethostbyname
params: " Socket.gethostbyname(host) => hostent\n"
visibility: public
ri/1.8/system/Socket/getaddrinfo-c.yaml000064400000013612150403660410013634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return address information for <tt>host</tt> and <tt>port</tt>. The remaining arguments are hints that limit the address information returned.
- !ruby/struct:SM::Flow::P 
  body: This method corresponds closely to the POSIX.1g getaddrinfo() definition.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: <tt>host</tt> is a host name or an address string (dotted decimal for IPv4, or a hex string for IPv6) for which to return information. A nil is also allowed, its meaning depends on <tt>flags</tt>, see below.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: <tt>service</tt> is a service name (&quot;http&quot;, &quot;ssh&quot;, ...), or a port number (80, 22, ...), see Socket.getservbyname for more information. A nil is also allowed, meaning zero.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: <tt>family</tt> limits the output to a specific address family, one of the Socket::AF_* constants. Socket::AF_INET (IPv4) and Socket::AF_INET6 (IPv6) are the most commonly used families. You will usually pass either nil or Socket::AF_UNSPEC, allowing the IPv6 information to be returned first if <tt>host</tt> is reachable via IPv6, and IPv4 information otherwise. The two strings &quot;AF_INET&quot; or &quot;AF_INET6&quot; are also allowed, they are converted to their respective Socket::AF_* constants.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: <tt>socktype</tt> limits the output to a specific type of socket, one of the Socket::SOCK_* constants. Socket::SOCK_STREAM (for TCP) and Socket::SOCK_DGRAM (for UDP) are the most commonly used socket types. If nil, then information for all types of sockets supported by <tt>service</tt> will be returned. You will usually know what type of socket you intend to create, and should pass that socket type in.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: <tt>protocol</tt> limits the output to a specific protocol numpber, one of the Socket::IPPROTO_* constants. It is usually implied by the socket type (Socket::SOCK_STREAM =&gt; Socket::IPPROTO_TCP, ...), if you pass other than nil you already know what this is for.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "<tt>flags</tt> is one of the Socket::AI_* constants. They mean:"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: "Socket::AI_PASSIVE: when set, if <tt>host</tt> is nil the 'any' address will be returned, Socket::INADDR_ANY or 0 for IPv4, &quot;0::0&quot; or &quot;::&quot; for IPv6. This address is suitable for use by servers that will bind their socket and do a passive listen, thus the name of the flag. Otherwise the local or loopback address will be returned, this is &quot;127.0.0.1&quot; for IPv4 and &quot;::1' for IPv6."
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: ...
    type: :BULLET
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Returns
- !ruby/struct:SM::Flow::P 
  body: "Returns an array of arrays, where each subarray contains:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: address family, a string like &quot;AF_INET&quot; or &quot;AF_INET6&quot;
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: port number, the port number for <tt>service</tt>
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: host name, either a canonical name for <tt>host</tt>, or it's address in presentation format if the address could not be looked up.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: host IP, the address of <tt>host</tt> in presentation format
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: address family, as a numeric value (one of the Socket::AF_* constants).
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: socket type, as a numeric value (one of the Socket::SOCK_* constants).
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: protocol number, as a numeric value (one of the Socket::IPPROTO_* constants).
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: The first four values are identical to what is commonly returned as an address array, see IPSocket for more information.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Examples
- !ruby/struct:SM::Flow::P 
  body: Not all input combinations are valid, and while there are many combinations, only a few cases are common.
- !ruby/struct:SM::Flow::P 
  body: "A typical client will call getaddrinfo with the <tt>host</tt> and <tt>service</tt> it wants to connect to. It knows that it will attempt to connect with either TCP or UDP, and specifies <tt>socktype</tt> accordingly. It loops through all returned addresses, and try to connect to them in turn:"
- !ruby/struct:SM::Flow::VERB 
  body: "  addrinfo = Socket::getaddrinfo('www.example.com', 'www', nil, Socket::SOCK_STREAM)\n  addrinfo.each do |af, port, name, addr|\n    begin\n      sock = TCPSocket.new(addr, port)\n      # ...\n      exit 1\n    rescue\n    end\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: With UDP you don't know if connect suceeded, but if communication fails, the next address can be tried.
- !ruby/struct:SM::Flow::P 
  body: "A typical server will call getaddrinfo with a <tt>host</tt> of nil, the <tt>service</tt> it listens to, and a <tt>flags</tt> of Socket::AI_PASSIVE. It will listen for connections on the first returned address:"
- !ruby/struct:SM::Flow::VERB 
  body: "  addrinfo = Socket::getaddrinfo(nil, 'www', nil, Socket::SOCK_STREAM, nil, Socket::AI_PASSIVE)\n  af, port, name, addr = addrinfo.first\n  sock = TCPServer(addr, port)\n  while( client = s.accept )\n    # ...\n  end\n"
full_name: Socket::getaddrinfo
is_singleton: true
name: getaddrinfo
params: " Socket.getaddrinfo(host, service, family=nil, socktype=nil, protocol=nil, flags=nil) => addrinfo\n"
visibility: public
ri/1.8/system/Socket/accept-i.yaml000064400000013132150403660410012610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Accepts an incoming connection returning an array containing a new Socket object and a string holding the <tt>struct</tt> sockaddr information about the caller.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     # In one script, start this first\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.bind( sockaddr )\n     socket.listen( 5 )\n     client, client_sockaddr = socket.accept\n     puts &quot;The client said, '#{client.readline.chomp}'&quot;\n     client.puts &quot;Hello from script one!&quot;\n     socket.close\n\n     # In another script, start this second\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.connect( sockaddr )\n     socket.puts &quot;Hello from script 2.&quot;\n     puts &quot;The server said, '#{socket.readline.chomp}'&quot;\n     socket.close\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Unix-based Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On unix-based based systems the following system exceptions may be raised if the call to <em>accept</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EAGAIN - O_NONBLOCK is set for the <tt>socket</tt> file descriptor and no connections are parent to be accepted
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EWOULDBLOCK - same as Errno::EAGAIN
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EBADF - the <tt>socket</tt> is not a valid file descriptor
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ECONNABORTED - a connection has been aborted
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the socket's internal address or address length parameter cannot be access or written
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINTR - the <em>accept</em> method was interrupted by a signal that was caught before a valid connection arrived
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <tt>socket</tt> is not accepting connections
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EMFILE - OPEN_MAX file descriptors are currently open in the calling process
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOMEM - there was insufficient memory available to complete the operation
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOSR - there was insufficient STREAMS resources available to complete the operation
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENFILE - the maximum number of file descriptors in the system are already open
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <tt>socket</tt> does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the socket type for the calling <tt>socket</tt> does not support accept connections
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EPROTO - a protocol error has occurred
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Windows Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On Windows systems the following system exceptions may be raised if the call to <em>accept</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ECONNRESET - an incoming connection was indicated, but was terminated by the remote peer prior to accepting the connection
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EFAULT - the socket's internal address or address length parameter is too small or is not a valid part of the user space address
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <em>listen</em> method was not invoked prior to calling <em>accept</em>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINPROGRESS - a blocking Windows Sockets 1.1 call is in progress or the service provider is still processing a callback function
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EMFILE - the queue is not empty, upong etry to <em>accept</em> and there are no socket descriptors available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN - the network is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - <tt>socket</tt> is not a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - <tt>socket</tt> is not a type that supports connection-oriented service.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EWOULDBLOCK - <tt>socket</tt> is marked as nonblocking and no connections are present to be accepted
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: accept manual pages on unix-based systems
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: accept function in Microsoft's Winsock functions reference
  type: :BULLET
full_name: Socket#accept
is_singleton: false
name: accept
params: |
  socket.accept => [ socket, string ]

visibility: public
ri/1.8/system/Socket/listen-i.yaml000064400000012044150403660420012651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Listens for connections, using the specified <tt>int</tt> as the backlog. A call to <em>listen</em> only applies if the <tt>socket</tt> is of type SOCK_STREAM or SOCK_SEQPACKET.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameter
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>backlog</tt> - the maximum length of the queue for pending connections.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example 1
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.bind( sockaddr )\n     socket.listen( 5 )\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example 2 (listening on an arbitary port, unix-based systems only):"
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     socket.listen( 1 )\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Unix-based Exceptions
- !ruby/struct:SM::Flow::P 
  body: On unix based systems the above will work because a new <tt>sockaddr</tt> struct is created on the address ADDR_ANY, for an arbitrary port number as handed off by the kernel. It will not work on Windows, because Windows requires that the <tt>socket</tt> is bound by calling <em>bind</em> before it can <em>listen</em>.
- !ruby/struct:SM::Flow::P 
  body: If the <em>backlog</em> amount exceeds the implementation-dependent maximum queue length, the implementation's maximum queue length will be used.
- !ruby/struct:SM::Flow::P 
  body: "On unix-based based systems the following system exceptions may be raised if the call to <em>listen</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EBADF - the <em>socket</em> argument is not a valid file descriptor
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EDESTADDRREQ - the <em>socket</em> is not bound to a local address, and the protocol does not support listening on an unbound socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <em>socket</em> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOCK - the <em>socket</em> argument does not refer to a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the <em>socket</em> protocol does not support listen
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EACCES - the calling process does not have approriate privileges
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <em>socket</em> has been shut down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - insufficient resources are available in the system to complete the call
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Windows Exceptions
- !ruby/struct:SM::Flow::P 
  body: "On Windows systems the following system exceptions may be raised if the call to <em>listen</em> fails:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENETDOWN - the network is down
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EADDRINUSE - the socket's local address is already in use. This usually occurs during the execution of <em>bind</em> but could be delayed if the call to <em>bind</em> was to a partially wildcard address (involving ADDR_ANY) and if a specific address needs to be commmitted at the time of the call to <em>listen</em>
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINPROGRESS - a Windows Sockets 1.1 call is in progress or the service provider is still processing a callback function
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EINVAL - the <tt>socket</tt> has not been bound with a call to <em>bind</em>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EISCONN - the <tt>socket</tt> is already connected
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EMFILE - no more socket descriptors are available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOBUFS - no buffer space is available
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::ENOTSOC - <tt>socket</tt> is not a socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Errno::EOPNOTSUPP - the referenced <tt>socket</tt> is not a type that supports the <em>listen</em> method
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: listen manual pages on unix-based systems
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: listen function in Microsoft's Winsock functions reference
  type: :BULLET
full_name: Socket#listen
is_singleton: false
name: listen
params: |
  socket.listen( int ) => 0

visibility: public
ri/1.8/system/Socket/sysaccept-i.yaml000064400000003466150403660420013361 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Accepts an incoming connection returnings an array containg the (integer) file descriptor for the incoming connection, <em>client_socket_fd</em>, and a string that contains the <tt>struct</tt> sockaddr information about the caller, <em>client_sockaddr</em>.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     # In one script, start this first\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.bind( sockaddr )\n     socket.listen( 5 )\n     client_fd, client_sockaddr = socket.sysaccept\n     client_socket = Socket.for_fd( client_fd )\n     puts &quot;The client said, '#{client_socket.readline.chomp}'&quot;\n     client_socket.puts &quot;Hello from script one!&quot;\n     socket.close\n\n     # In another script, start this second\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new( AF_INET, SOCK_STREAM, 0 )\n     sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )\n     socket.connect( sockaddr )\n     socket.puts &quot;Hello from script 2.&quot;\n     puts &quot;The server said, '#{socket.readline.chomp}'&quot;\n     socket.close\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#accept for the exceptions that may be thrown if the call to <em>sysaccept</em> fails.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#accept
  type: :BULLET
full_name: Socket#sysaccept
is_singleton: false
name: sysaccept
params: |
  socket.sysaccept => [client_socket_fd, client_sockaddr]

visibility: public
ri/1.8/system/Socket/connect_nonblock-i.yaml000064400000003412150403660420014670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Requests a connection to be made on the given <tt>server_sockaddr</tt> after O_NONBLOCK is set for the underlying file descriptor. Returns 0 if successful, otherwise an exception is raised.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameter
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>server_sockaddr</tt> - the <tt>struct</tt> sockaddr contained in a string
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "     # Pull down Google's web page\n     require 'socket'\n     include Socket::Constants\n     socket = Socket.new(AF_INET, SOCK_STREAM, 0)\n     sockaddr = Socket.sockaddr_in(80, 'www.google.com')\n     begin\n       socket.connect_nonblock(sockaddr)\n     rescue Errno::EINPROGRESS\n       IO.select(nil, [socket])\n       begin\n         socket.connect_nonblock(sockaddr)\n       rescue Errno::EISCONN\n       end\n     end\n     socket.write(&quot;GET / HTTP/1.0\\r\\n\\r\\n&quot;)\n     results = socket.read\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#connect for the exceptions that may be thrown if the call to <em>connect_nonblock</em> fails.
- !ruby/struct:SM::Flow::P 
  body: Socket#connect_nonblock may raise any error corresponding to connect(2) failure, including Errno::EINPROGRESS.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#connect
  type: :BULLET
full_name: Socket#connect_nonblock
is_singleton: false
name: connect_nonblock
params: |
  socket.connect_nonblock(server_sockaddr) => 0

visibility: public
ri/1.8/system/LocalJumpError/cdesc-LocalJumpError.yaml000064400000001473150403660420016560 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Proc</tt> objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   def gen_times(factor)\n     return Proc.new {|n| n*factor }\n   end\n\n   times3 = gen_times(3)\n   times5 = gen_times(5)\n\n   times3.call(12)               #=&gt; 36\n   times5.call(5)                #=&gt; 25\n   times3.call(times5.call(4))   #=&gt; 60\n"
constants: []

full_name: LocalJumpError
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: exit_value
- !ruby/object:RI::MethodSummary 
  name: reason
name: LocalJumpError
superclass: StandardError
ri/1.8/system/LocalJumpError/exit_value-i.yaml000064400000000643150403660420015172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "call_seq:"
- !ruby/struct:SM::Flow::VERB 
  body: "  local_jump_error.exit_value  =&gt; obj\n"
- !ruby/struct:SM::Flow::P 
  body: Returns the exit value associated with this <tt>LocalJumpError</tt>.
full_name: LocalJumpError#exit_value
is_singleton: false
name: exit_value
params: ()
visibility: public
ri/1.8/system/LocalJumpError/reason-i.yaml000064400000000525150403660420014313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "The reason this block was terminated: :break, :redo, :retry, :next, :return, or :noreason."
full_name: LocalJumpError#reason
is_singleton: false
name: reason
params: |
  local_jump_error.reason   => symbol

visibility: public
ri/1.8/system/ThreadsWait/finished%3f-i.yaml000064400000000411150403660420014424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if any thread has terminated.
full_name: ThreadsWait#finished?
is_singleton: false
name: finished?
params: ()
visibility: public
ri/1.8/system/ThreadsWait/empty%3f-i.yaml000064400000000421150403660420013772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if there are no threads to be synchronized.
full_name: ThreadsWait#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/ThreadsWait/all_waits-i.yaml000064400000000756150403660420014330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: th if block_given?
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits until all of the specified threads are terminated. If a block is supplied for the method, it is executed for each thread termination.
- !ruby/struct:SM::Flow::P 
  body: Raises exceptions in the same manner as <tt>next_wait</tt>.
full_name: ThreadsWait#all_waits
is_singleton: false
name: all_waits
params: () {|th if block_given?| ...}
visibility: public
ri/1.8/system/ThreadsWait/cdesc-ThreadsWait.yaml000064400000002504150403660420015412 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Returns the array of threads in the wait queue.
  name: threads
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: all_waits
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: This class watches for termination of multiple threads. Basic functionality (wait until specified threads have terminated) can be accessed through the class method ThreadsWait::all_waits. Finer control can be gained using instance methods.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  ThreadsWait.all_wait(thr1, thr2, ...) do |t|\n    STDERR.puts &quot;Thread #{t} has terminated.&quot;\n  end\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: RCS_ID
  value: "'-$Id: thwait.rb,v 1.3 1998/06/26 03:19:34 keiju Exp keiju $-'"
full_name: ThreadsWait
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: all_waits
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: finished?
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: join_nowait
- !ruby/object:RI::MethodSummary 
  name: next_wait
name: ThreadsWait
superclass: Object
ri/1.8/system/ThreadsWait/join_nowait-i.yaml000064400000000463150403660420014664 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Specifies the threads that this object will wait for, but does not actually wait.
full_name: ThreadsWait#join_nowait
is_singleton: false
name: join_nowait
params: (*threads)
visibility: public
ri/1.8/system/ThreadsWait/new-c.yaml000064400000000440150403660420013122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a ThreadsWait object, specifying the threads to wait on. Non-blocking.
full_name: ThreadsWait::new
is_singleton: true
name: new
params: (*threads)
visibility: public
ri/1.8/system/ThreadsWait/join-i.yaml000064400000000455150403660420013304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits for specified threads to terminate, and returns when one of the threads terminated.
full_name: ThreadsWait#join
is_singleton: false
name: join
params: (*threads)
visibility: public
ri/1.8/system/ThreadsWait/all_waits-c.yaml000064400000000551150403660420014313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: thread
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits until all specified threads have terminated. If a block is provided, it is executed for each thread termination.
full_name: ThreadsWait::all_waits
is_singleton: true
name: all_waits
params: (*threads) {|thread| ...}
visibility: public
ri/1.8/system/ThreadsWait/next_wait-i.yaml000064400000001010150403660420014333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Waits until any of the specified threads has terminated, and returns the one that does.
- !ruby/struct:SM::Flow::P 
  body: If there is no thread to wait, raises <tt>ErrNoWaitingThread</tt>. If <tt>nonblock</tt> is true, and there is no terminated thread, raises <tt>ErrNoFinishedThread</tt>.
full_name: ThreadsWait#next_wait
is_singleton: false
name: next_wait
params: (nonblock = nil)
visibility: public
ri/1.8/system/IPSocket/cdesc-IPSocket.yaml000064400000002625150403660420014122 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: IPSocket is the parent of TCPSocket and UDPSocket and implements functionality common to them.
- !ruby/struct:SM::Flow::P 
  body: "A number of APIs in IPSocket, Socket, and their descendants return an address as an array. The members of that array are:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "address family: A string like &quot;AF_INET&quot; or &quot;AF_INET6&quot; if it is one of the commonly used families, the string &quot;unknown:#&quot; (where `#' is the address family number) if it is not one of the common ones. The strings map to the Socket::AF_* constants."
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "port: The port number."
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "name: Either the canonical name from looking the address up in the DNS, or the address in presentation format"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "address: The address in presentation format (a dotted decimal string for IPv4, a hex string for IPv6)."
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: The address and port can be used directly to create sockets and to bind or connect them to the address.
constants: []

full_name: IPSocket
includes: []

instance_methods: []

name: IPSocket
superclass: BasicSocket
ri/1.8/system/ERB/set_eoutvar-i.yaml000064400000000665150403660420013101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Can be used to set <em>eoutvar</em> 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 <em>compiler</em> object.
full_name: ERB#set_eoutvar
is_singleton: false
name: set_eoutvar
params: (compiler, eoutvar = '_erbout')
visibility: public
ri/1.8/system/ERB/result-i.yaml000064400000001031150403660420012043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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 <em>safe_level</em>.)
- !ruby/struct:SM::Flow::P 
  body: <em>b</em> accepts a Binding or Proc object which is used to set the context of code evaluation.
full_name: ERB#result
is_singleton: false
name: result
params: (b=TOPLEVEL_BINDING)
visibility: public
ri/1.8/system/ERB/cdesc-ERB.yaml000064400000021726150403660420012003 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The optional <em>filename</em> argument passed to Kernel#eval when the ERB code is run
  name: filename
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The Ruby code generated by ERB
  name: src
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: version
comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: ERB -- Ruby Templating
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Introduction
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: "A very simple example is this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'erb'\n\n  x = 42\n  template = ERB.new &lt;&lt;-EOF\n    The value of x is: &lt;%= x %&gt;\n  EOF\n  puts template.result(binding)\n"
- !ruby/struct:SM::Flow::P 
  body: "<em>Prints:</em> The value of x is: 42"
- !ruby/struct:SM::Flow::P 
  body: More complex examples are given below.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Recognized Tags
- !ruby/struct:SM::Flow::P 
  body: "ERB recognizes certain tags in the provided template and converts them based on the rules below:"
- !ruby/struct:SM::Flow::VERB 
  body: "  &lt;% Ruby code -- inline with output %&gt;\n  &lt;%= Ruby expression -- replace with result %&gt;\n  &lt;%# comment -- ignored -- useful in testing %&gt;\n  % a line of Ruby code -- treated as &lt;% line %&gt; (optional -- see ERB.new)\n  %% replaced with % if first thing on a line and % processing is used\n  &lt;%% or %%&gt; -- replace with &lt;% or %&gt; respectively\n"
- !ruby/struct:SM::Flow::P 
  body: All other text is passed through ERB filtering unchanged.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Options
- !ruby/struct:SM::Flow::P 
  body: "There are several settings you can change when you use ERB:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: the nature of the tags that are recognized;
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: the value of <tt>$SAFE</tt> under which the template is run;
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: the binding used to resolve local variables in the template.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: See the ERB.new and ERB#result methods for more detail.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Examples
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Plain Text
- !ruby/struct:SM::Flow::P 
  body: ERB is useful for any generic templating situation. Note that in this example, we use the convenient &quot;% at start of line&quot; tag, and we quote the template literally with <tt>%q{...}</tt> to avoid trouble with the backslash.
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;erb&quot;\n\n  # Create template.\n  template = %q{\n    From:  James Edward Gray II &lt;james@grayproductions.net&gt;\n    To:  &lt;%= to %&gt;\n    Subject:  Addressing Needs\n\n    &lt;%= to[/\\w+/] %&gt;:\n\n    Just wanted to send a quick note assuring that your needs are being\n    addressed.\n\n    I want you to know that my team will keep working on the issues,\n    especially:\n\n    &lt;%# ignore numerous minor requests -- focus on priorities %&gt;\n    % priorities.each do |priority|\n      * &lt;%= priority %&gt;\n    % end\n\n    Thanks for your patience.\n\n    James Edward Gray II\n  }.gsub(/^  /, '')\n\n  message = ERB.new(template, 0, &quot;%&lt;&gt;&quot;)\n\n  # Set up template data.\n  to = &quot;Community Spokesman &lt;spokesman@ruby_community.org&gt;&quot;\n  priorities = [ &quot;Run Ruby Quiz&quot;,\n                 &quot;Document Modules&quot;,\n                 &quot;Answer Questions on Ruby Talk&quot; ]\n\n  # Produce result.\n  email = message.result\n  puts email\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "  From:  James Edward Gray II &lt;james@grayproductions.net&gt;\n  To:  Community Spokesman &lt;spokesman@ruby_community.org&gt;\n  Subject:  Addressing Needs\n\n  Community:\n\n  Just wanted to send a quick note assuring that your needs are being addressed.\n\n  I want you to know that my team will keep working on the issues, especially:\n\n      * Run Ruby Quiz\n      * Document Modules\n      * Answer Questions on Ruby Talk\n\n  Thanks for your patience.\n\n  James Edward Gray II\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Ruby in HTML
- !ruby/struct:SM::Flow::P 
  body: ERB is often used in <tt>.rhtml</tt> 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.
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;erb&quot;\n\n  # Build template data class.\n  class Product\n    def initialize( code, name, desc, cost )\n      @code = code\n      @name = name\n      @desc = desc\n      @cost = cost\n\n      @features = [ ]\n    end\n\n    def add_feature( feature )\n      @features &lt;&lt; feature\n    end\n\n    # Support templating of member data.\n    def get_binding\n      binding\n    end\n\n    # ...\n  end\n\n  # Create template.\n  template = %{\n    &lt;html&gt;\n      &lt;head&gt;&lt;title&gt;Ruby Toys -- &lt;%= @name %&gt;&lt;/title&gt;&lt;/head&gt;\n      &lt;body&gt;\n\n        &lt;h1&gt;&lt;%= @name %&gt; (&lt;%= @code %&gt;)&lt;/h1&gt;\n        &lt;p&gt;&lt;%= @desc %&gt;&lt;/p&gt;\n\n        &lt;ul&gt;\n          &lt;% @features.each do |f| %&gt;\n            &lt;li&gt;<b>&lt;%= f %&gt;</b>&lt;/li&gt;\n          &lt;% end %&gt;\n        &lt;/ul&gt;\n\n        &lt;p&gt;\n          &lt;% if @cost &lt; 10 %&gt;\n            <b>Only &lt;%= @cost %&gt;!!!</b>\n          &lt;% else %&gt;\n             Call for a price, today!\n          &lt;% end %&gt;\n        &lt;/p&gt;\n\n      &lt;/body&gt;\n    &lt;/html&gt;\n  }.gsub(/^  /, '')\n\n  rhtml = ERB.new(template)\n\n  # Set up template data.\n  toy = Product.new( &quot;TZ-1002&quot;,\n                     &quot;Rubysapien&quot;,\n                     &quot;Geek's Best Friend!  Responds to Ruby commands...&quot;,\n                     999.95 )\n  toy.add_feature(&quot;Listens for verbal commands in the Ruby language!&quot;)\n  toy.add_feature(&quot;Ignores Perl, Java, and all C variants.&quot;)\n  toy.add_feature(&quot;Karate-Chop Action!!!&quot;)\n  toy.add_feature(&quot;Matz signature on left leg.&quot;)\n  toy.add_feature(&quot;Gem studded eyes... Rubies, of course!&quot;)\n\n  # Produce result.\n  rhtml.run(toy.get_binding)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates (some blank lines removed):</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   &lt;html&gt;\n     &lt;head&gt;&lt;title&gt;Ruby Toys -- Rubysapien&lt;/title&gt;&lt;/head&gt;\n     &lt;body&gt;\n\n       &lt;h1&gt;Rubysapien (TZ-1002)&lt;/h1&gt;\n       &lt;p&gt;Geek's Best Friend!  Responds to Ruby commands...&lt;/p&gt;\n\n       &lt;ul&gt;\n           &lt;li&gt;<b>Listens for verbal commands in the Ruby language!</b>&lt;/li&gt;\n           &lt;li&gt;<b>Ignores Perl, Java, and all C variants.</b>&lt;/li&gt;\n           &lt;li&gt;<b>Karate-Chop Action!!!</b>&lt;/li&gt;\n           &lt;li&gt;<b>Matz signature on left leg.</b>&lt;/li&gt;\n           &lt;li&gt;<b>Gem studded eyes... Rubies, of course!</b>&lt;/li&gt;\n       &lt;/ul&gt;\n\n       &lt;p&gt;\n            Call for a price, today!\n       &lt;/p&gt;\n\n     &lt;/body&gt;\n   &lt;/html&gt;\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Notes
- !ruby/struct:SM::Flow::P 
  body: "There are a variety of templating solutions available in various Ruby projects:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ERB's big brother, eRuby, works the same but is written in C for speed;
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Amrita (smart at producing HTML/XML);
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: cs/Template (written in C for speed);
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: RDoc, distributed with Ruby, uses its own template engine, which can be reused elsewhere;
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: and others; search the RAA.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Rails, the web application framework, uses ERB to create views.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Revision
  value: "'$Date: 2009-02-24 02:44:50 +0900 (Tue, 24 Feb 2009) $'"
full_name: ERB
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_class
- !ruby/object:RI::MethodSummary 
  name: def_method
- !ruby/object:RI::MethodSummary 
  name: def_module
- !ruby/object:RI::MethodSummary 
  name: result
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: set_eoutvar
name: ERB
superclass: Object
ri/1.8/system/ERB/def_class-i.yaml000064400000001356150403660420012462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Define unnamed class which has <em>methodname</em> as instance method, and return it.
- !ruby/struct:SM::Flow::P 
  body: "example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  class MyClass_\n    def initialize(arg1, arg2)\n      @arg1 = arg1;  @arg2 = arg2\n    end\n  end\n  filename = 'example.rhtml'  # @arg1 and @arg2 are used in example.rhtml\n  erb = ERB.new(File.read(filename))\n  erb.filename = filename\n  MyClass = erb.def_class(MyClass_, 'render()')\n  print MyClass.new('foo', 123).render()\n"
full_name: ERB#def_class
is_singleton: false
name: def_class
params: (superklass=Object, methodname='result')
visibility: public
ri/1.8/system/ERB/Util/cdesc-Util.yaml000064400000000742150403660420013220 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A utility module for conversion routines, often handy in HTML generation.
constants: []

full_name: ERB::Util
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: h
- !ruby/object:RI::MethodSummary 
  name: html_escape
- !ruby/object:RI::MethodSummary 
  name: u
- !ruby/object:RI::MethodSummary 
  name: url_encode
name: Util
superclass: 
ri/1.8/system/ERB/Util/u-i.yaml000064400000000334150403660420011713 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #url_encode"
full_name: ERB::Util#u
is_singleton: false
name: u
params: (s)
visibility: public
ri/1.8/system/ERB/Util/h-i.yaml000064400000000335150403660420011677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #html_escape"
full_name: ERB::Util#h
is_singleton: false
name: h
params: (s)
visibility: public
ri/1.8/system/ERB/Util/html_escape-i.yaml000064400000001145150403660420013734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: h
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A utility method for escaping HTML tag characters in <em>s</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;erb&quot;\n  include ERB::Util\n\n  puts html_escape(&quot;is a &gt; 0 &amp; a &lt; 10?&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates</em>
- !ruby/struct:SM::Flow::VERB 
  body: "  is a &amp;gt; 0 &amp;amp; a &amp;lt; 10?\n"
full_name: ERB::Util#html_escape
is_singleton: false
name: html_escape
params: (s)
visibility: public
ri/1.8/system/ERB/Util/url_encode-i.yaml000064400000001221150403660420013562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: u
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A utility method for encoding the String <em>s</em> as a URL.
- !ruby/struct:SM::Flow::VERB 
  body: "  require &quot;erb&quot;\n  include ERB::Util\n\n  puts url_encode(&quot;Programming Ruby:  The Pragmatic Programmer's Guide&quot;)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates</em>
- !ruby/struct:SM::Flow::VERB 
  body: "  Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide\n"
full_name: ERB::Util#url_encode
is_singleton: false
name: url_encode
params: (s)
visibility: public
ri/1.8/system/ERB/def_method-i.yaml000064400000001166150403660420012634 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Define <em>methodname</em> as instance method of <em>mod</em> from compiled ruby source.
- !ruby/struct:SM::Flow::P 
  body: "example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  filename = 'example.rhtml'   # 'arg1' and 'arg2' are used in example.rhtml\n  erb = ERB.new(File.read(filename))\n  erb.def_method(MyClass, 'render(arg1, arg2)', filename)\n  print MyClass.new.render('foo', 123)\n"
full_name: ERB#def_method
is_singleton: false
name: def_method
params: (mod, methodname, fname='(ERB)')
visibility: public
ri/1.8/system/ERB/new-c.yaml000064400000005274150403660420011325 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Constructs a new ERB object with the template specified in <em>str</em>.
- !ruby/struct:SM::Flow::P 
  body: An ERB object works by building a chunk of Ruby code that will output the completed template when run. If <em>safe_level</em> is set to a non-nil value, ERB code will be run in a separate thread with <b>$SAFE</b> set to the provided level.
- !ruby/struct:SM::Flow::P 
  body: "If <em>trim_mode</em> is passed a String containing one or more of the following modifiers, ERB will adjust its code generation as listed:"
- !ruby/struct:SM::Flow::VERB 
  body: "    %  enables Ruby code processing for lines beginning with %\n    &lt;&gt; omit newline for lines starting with &lt;% and ending in %&gt;\n    &gt;  omit newline for lines ending in %&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>eoutvar</em> 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: " require &quot;erb&quot;\n\n # build data class\n class Listings\n   PRODUCT = { :name =&gt; &quot;Chicken Fried Steak&quot;,\n               :desc =&gt; &quot;A well messages pattie, breaded and fried.&quot;,\n               :cost =&gt; 9.95 }\n\n   attr_reader :product, :price\n\n   def initialize( product = &quot;&quot;, price = &quot;&quot; )\n     @product = product\n     @price = price\n   end\n\n   def build\n     b = binding\n     # create and run templates, filling member data variables\n     ERB.new(&lt;&lt;-'END_PRODUCT'.gsub(/^\\s+/, &quot;&quot;), 0, &quot;&quot;, &quot;@product&quot;).result b\n       &lt;%= PRODUCT[:name] %&gt;\n       &lt;%= PRODUCT[:desc] %&gt;\n     END_PRODUCT\n     ERB.new(&lt;&lt;-'END_PRICE'.gsub(/^\\s+/, &quot;&quot;), 0, &quot;&quot;, &quot;@price&quot;).result b\n       &lt;%= PRODUCT[:name] %&gt; -- &lt;%= PRODUCT[:cost] %&gt;\n       &lt;%= PRODUCT[:desc] %&gt;\n     END_PRICE\n   end\n end\n\n # setup template data\n listings = Listings.new\n listings.build\n\n puts listings.product + &quot;\\n&quot; + listings.price\n"
- !ruby/struct:SM::Flow::P 
  body: <em>Generates</em>
- !ruby/struct:SM::Flow::VERB 
  body: " Chicken Fried Steak\n A well messages pattie, breaded and fried.\n\n Chicken Fried Steak -- 9.95\n A well messages pattie, breaded and fried.\n"
full_name: ERB::new
is_singleton: true
name: new
params: (str, safe_level=nil, trim_mode=nil, eoutvar='_erbout')
visibility: public
ri/1.8/system/ERB/def_module-i.yaml000064400000001203150403660420012631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create unnamed module, define <em>methodname</em> as instance method of it, and return it.
- !ruby/struct:SM::Flow::P 
  body: "example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  filename = 'example.rhtml'   # 'arg1' and 'arg2' are used in example.rhtml\n  erb = ERB.new(File.read(filename))\n  erb.filename = filename\n  MyModule = erb.def_module('render(arg1, arg2)')\n  class MyClass\n    include MyModule\n  end\n"
full_name: ERB#def_module
is_singleton: false
name: def_module
params: (methodname='erb')
visibility: public
ri/1.8/system/ERB/DefMethod/cdesc-DefMethod.yaml000064400000001761150403660420015066 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Utility module to define eRuby script as instance method.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::P 
  body: "example.rhtml:"
- !ruby/struct:SM::Flow::VERB 
  body: "  &lt;% for item in @items %&gt;\n  <b>&lt;%= item %&gt;</b>\n  &lt;% end %&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: "example.rb:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'erb'\n  class MyClass\n    extend ERB::DefMethod\n    def_erb_method('render()', 'example.rhtml')\n    def initialize(items)\n      @items = items\n    end\n  end\n  print MyClass.new([10,20,30]).render()\n"
- !ruby/struct:SM::Flow::P 
  body: "result:"
- !ruby/struct:SM::Flow::VERB 
  body: "  <b>10</b>\n\n  <b>20</b>\n\n  <b>30</b>\n"
constants: []

full_name: ERB::DefMethod
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_erb_method
name: DefMethod
superclass: 
ri/1.8/system/ERB/DefMethod/def_erb_method-i.yaml000064400000000532150403660420015317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: define <em>methodname</em> as instance method of current module, using ERB object or eRuby file
full_name: ERB::DefMethod#def_erb_method
is_singleton: false
name: def_erb_method
params: (methodname, erb_or_fname)
visibility: public
ri/1.8/system/ERB/version-c.yaml000064400000000375150403660420012216 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns revision information for the erb.rb module.
full_name: ERB::version
is_singleton: true
name: version
params: ()
visibility: public
ri/1.8/system/ERB/Compiler/cdesc-Compiler.yaml000064400000000302150403660420014702 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler
includes: []

instance_methods: []

name: Compiler
superclass: Object
ri/1.8/system/ERB/Compiler/Scanner/cdesc-Scanner.yaml000064400000000312150403660420016113 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler::Scanner
includes: []

instance_methods: []

name: Scanner
superclass: Object
ri/1.8/system/ERB/Compiler/ExplicitScanner/cdesc-ExplicitScanner.yaml000064400000000333150403660420021322 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler::ExplicitScanner
includes: []

instance_methods: []

name: ExplicitScanner
superclass: Scanner
ri/1.8/system/ERB/Compiler/Buffer/cdesc-Buffer.yaml000064400000000310150403660420015551 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler::Buffer
includes: []

instance_methods: []

name: Buffer
superclass: Object
ri/1.8/system/ERB/Compiler/PercentLine/cdesc-PercentLine.yaml000064400000000322150403660420017552 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler::PercentLine
includes: []

instance_methods: []

name: PercentLine
superclass: Object
ri/1.8/system/ERB/Compiler/SimpleScanner2/cdesc-SimpleScanner2.yaml000064400000000331150403660420020604 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler::SimpleScanner2
includes: []

instance_methods: []

name: SimpleScanner2
superclass: Scanner
ri/1.8/system/ERB/Compiler/TrimScanner/cdesc-TrimScanner.yaml000064400000000323150403660420017605 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler::TrimScanner
includes: []

instance_methods: []

name: TrimScanner
superclass: Scanner
ri/1.8/system/ERB/Compiler/SimpleScanner/cdesc-SimpleScanner.yaml000064400000000327150403660420020445 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: ERB::Compiler::SimpleScanner
includes: []

instance_methods: []

name: SimpleScanner
superclass: Scanner
ri/1.8/system/ERB/run-i.yaml000064400000000405150403660420011335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Generate results and print them. (see ERB#result)
full_name: ERB#run
is_singleton: false
name: run
params: (b=TOPLEVEL_BINDING)
visibility: public
ri/1.8/system/Module/const_defined%3f-i.yaml000064400000000672150403660420014456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if a constant with the given name is defined by <em>mod</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Math.const_defined? &quot;PI&quot;   #=&gt; true\n"
full_name: Module#const_defined?
is_singleton: false
name: const_defined?
params: |
  mod.const_defined?(sym)   => true or false

visibility: public
ri/1.8/system/Module/instance_method-i.yaml000064400000002117150403660430014515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an <tt>UnboundMethod</tt> representing the given instance method in <em>mod</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Interpreter\n     def do_a() print &quot;there, &quot;; end\n     def do_d() print &quot;Hello &quot;;  end\n     def do_e() print &quot;!\\n&quot;;     end\n     def do_v() print &quot;Dave&quot;;    end\n     Dispatcher = {\n      ?a =&gt; instance_method(:do_a),\n      ?d =&gt; instance_method(:do_d),\n      ?e =&gt; instance_method(:do_e),\n      ?v =&gt; instance_method(:do_v)\n     }\n     def interpret(string)\n       string.each_byte {|b| Dispatcher[b].bind(self).call }\n     end\n   end\n\n   interpreter = Interpreter.new\n   interpreter.interpret('dave')\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Hello there, Dave!\n"
full_name: Module#instance_method
is_singleton: false
name: instance_method
params: |
  mod.instance_method(symbol)   => unbound_method

visibility: public
ri/1.8/system/Module/module_function-i.yaml000064400000002245150403660430014545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates module functions for the named methods. These functions may be called with the module as a receiver, and also become available as instance methods to classes that mix in the module. Module functions are copies of the original, and so may be changed independently. The instance-method versions are made private. If used with no arguments, subsequently defined methods become module functions.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     def one\n       &quot;This is one&quot;\n     end\n     module_function :one\n   end\n   class Cls\n     include Mod\n     def callOne\n       one\n     end\n   end\n   Mod.one     #=&gt; &quot;This is one&quot;\n   c = Cls.new\n   c.callOne   #=&gt; &quot;This is one&quot;\n   module Mod\n     def one\n       &quot;This is the new one&quot;\n     end\n   end\n   Mod.one     #=&gt; &quot;This is one&quot;\n   c.callOne   #=&gt; &quot;This is the new one&quot;\n"
full_name: Module#module_function
is_singleton: false
name: module_function
params: |
  module_function(symbol, ...)    => self

visibility: public
ri/1.8/system/Module/method_removed-i.yaml000064400000000353150403660430014352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Not documented
full_name: Module#method_removed
is_singleton: false
name: method_removed
params: (p1)
visibility: public
ri/1.8/system/Module/extended-i.yaml000064400000000337150403660430013153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Not documented
full_name: Module#extended
is_singleton: false
name: extended
params: (p1)
visibility: public
ri/1.8/system/Module/class_variable_defined%3f-i.yaml000064400000001067150403660430016302 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the given class variable is defined in <em>obj</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Fred\n     @@foo = 99\n   end\n   Fred.class_variable_defined?(:@@foo)    #=&gt; true\n   Fred.class_variable_defined?(:@@bar)    #=&gt; false\n"
full_name: Module#class_variable_defined?
is_singleton: false
name: class_variable_defined?
params: |
  obj.class_variable_defined?(symbol)    => true or false

visibility: public
ri/1.8/system/Module/remove_const-i.yaml000064400000000626150403660430014057 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes the definition of the given constant, returning that constant's value. Predefined classes and singleton objects (such as <em>true</em>) cannot be removed.
full_name: Module#remove_const
is_singleton: false
name: remove_const
params: |
  remove_const(sym)   => obj

visibility: public
ri/1.8/system/Module/autoload-i.yaml000064400000001121150403660430013153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Registers <em>filename</em> to be loaded (using <tt>Kernel::require</tt>) the first time that <em>name</em> (which may be a <tt>String</tt> or a symbol) is accessed in the namespace of <em>mod</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n   end\n   A.autoload(:B, &quot;b&quot;)\n   A::B.doit            # autoloads &quot;b&quot;\n"
full_name: Module#autoload
is_singleton: false
name: autoload
params: |
  mod.autoload(name, filename)   => nil

visibility: public
ri/1.8/system/Module/%3c%3d%3e-i.yaml000064400000001036150403660430012513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comparison---Returns -1 if <em>mod</em> includes <em>other_mod</em>, 0 if <em>mod</em> is the same as <em>other_mod</em>, and +1 if <em>mod</em> is included by <em>other_mod</em> or if <em>mod</em> has no relationship with <em>other_mod</em>. Returns <tt>nil</tt> if <em>other_mod</em> is not a module.
full_name: Module#<=>
is_singleton: false
name: <=>
params: |
  mod <=> other_mod   => -1, 0, +1, or nil

visibility: public
ri/1.8/system/Module/module_eval-i.yaml000064400000002032150403660430013641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates the string or block in the context of <em>mod</em>. This can be used to add methods to a class. <tt>module_eval</tt> returns the result of evaluating its argument. The optional <em>filename</em> and <em>lineno</em> parameters set the text for error messages.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Thing\n   end\n   a = %q{def hello() &quot;Hello there!&quot; end}\n   Thing.module_eval(a)\n   puts Thing.new.hello()\n   Thing.module_eval(&quot;invalid code&quot;, &quot;dummy&quot;, 123)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Hello there!\n   dummy:123:in `module_eval': undefined local variable\n       or method `code' for Thing:Class\n"
full_name: Module#module_eval
is_singleton: false
name: module_eval
params: |
  mod.class_eval(string [, filename [, lineno]])  => obj
  mod.module_eval {|| block }                     => obj

visibility: public
ri/1.8/system/Module/public_class_method-i.yaml000064400000000504150403660430015352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Makes a list of existing class methods public.
full_name: Module#public_class_method
is_singleton: false
name: public_class_method
params: |
  mod.public_class_method(symbol, ...)    => mod

visibility: public
ri/1.8/system/Module/class_exec-i.yaml000064400000001331150403660430013457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates the given block in the context of the class/module. The method defined in the block will belong to the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Thing\n   end\n   Thing.class_exec{\n     def hello() &quot;Hello there!&quot; end\n   }\n   puts Thing.new.hello()\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Hello there!\n"
full_name: Module#class_exec
is_singleton: false
name: class_exec
params: |
  mod.module_exec(arg...) {|var...| block }       => obj
  mod.class_exec(arg...) {|var...| block }        => obj

visibility: public
ri/1.8/system/Module/autoload%3f-i.yaml000064400000001014150403660430013452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>filename</em> to be loaded if <em>name</em> is registered as <tt>autoload</tt> in the namespace of <em>mod</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n   end\n   A.autoload(:B, &quot;b&quot;)\n   A.autoload?(:B)            # =&gt; &quot;b&quot;\n"
full_name: Module#autoload?
is_singleton: false
name: autoload?
params: |
  mod.autoload?(name)   => String or nil

visibility: public
ri/1.8/system/Module/protected-i.yaml000064400000000671150403660430013345 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no arguments, sets the default visibility for subsequently defined methods to protected. With arguments, sets the named methods to have protected visibility.
full_name: Module#protected
is_singleton: false
name: protected
params: |
  protected                => self
  protected(symbol, ...)   => self

visibility: public
ri/1.8/system/Module/attr_writer-i.yaml000064400000000534150403660430013720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates an accessor method to allow assignment to the attribute <em>aSymbol</em><tt>.id2name</tt>.
full_name: Module#attr_writer
is_singleton: false
name: attr_writer
params: |
  attr_writer(symbol, ...)    => nil

visibility: public
ri/1.8/system/Module/const_get-i.yaml000064400000000604150403660430013335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of the named constant in <em>mod</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Math.const_get(:PI)   #=&gt; 3.14159265358979\n"
full_name: Module#const_get
is_singleton: false
name: const_get
params: |
  mod.const_get(sym)    => obj

visibility: public
ri/1.8/system/Module/%3c-i.yaml000064400000000734150403660430011726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true if <em>mod</em> is a subclass of <em>other</em>. Returns <tt>nil</tt> if there's no relationship between the two. (Think of the relationship in terms of the class definition: &quot;class A&lt;B&quot; implies &quot;A&lt;B&quot;)."
full_name: Module#<
is_singleton: false
name: <
params: |
  mod < other   =>  true, false, or nil

visibility: public
ri/1.8/system/Module/%3c%3d-i.yaml000064400000001000150403660430012205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true if <em>mod</em> is a subclass of <em>other</em> or is the same as <em>other</em>. Returns <tt>nil</tt> if there's no relationship between the two. (Think of the relationship in terms of the class definition: &quot;class A&lt;B&quot; implies &quot;A&lt;B&quot;)."
full_name: Module#<=
is_singleton: false
name: <=
params: |
  mod <= other   =>  true, false, or nil

visibility: public
ri/1.8/system/Module/protected_method_defined%3f-i.yaml000064400000001636150403660430016663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named protected method is defined by <em>mod</em> (or its included modules and, if <em>mod</em> is a class, its ancestors).
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n     def method1()  end\n   end\n   class B\n     protected\n     def method2()  end\n   end\n   class C &lt; B\n     include A\n     def method3()  end\n   end\n\n   A.method_defined? :method1              #=&gt; true\n   C.protected_method_defined? &quot;method1&quot;   #=&gt; false\n   C.protected_method_defined? &quot;method2&quot;   #=&gt; true\n   C.method_defined? &quot;method2&quot;             #=&gt; true\n"
full_name: Module#protected_method_defined?
is_singleton: false
name: protected_method_defined?
params: |
  mod.protected_method_defined?(symbol)   => true or false

visibility: public
ri/1.8/system/Module/%3e%3d-i.yaml000064400000001003150403660430012212 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true if <em>mod</em> is an ancestor of <em>other</em>, or the two modules are the same. Returns <tt>nil</tt> if there's no relationship between the two. (Think of the relationship in terms of the class definition: &quot;class A&lt;B&quot; implies &quot;B&gt;A&quot;)."
full_name: Module#>=
is_singleton: false
name: ">="
params: |
  mod >= other   =>  true, false, or nil

visibility: public
ri/1.8/system/Module/const_set-i.yaml000064400000001117150403660430013351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the named constant to the given object, returning that object. Creates a new constant if no constant with the given name previously existed.
- !ruby/struct:SM::Flow::VERB 
  body: "   Math.const_set(&quot;HIGH_SCHOOL_PI&quot;, 22.0/7.0)   #=&gt; 3.14285714285714\n   Math::HIGH_SCHOOL_PI - Math::PI              #=&gt; 0.00126448926734968\n"
full_name: Module#const_set
is_singleton: false
name: const_set
params: |
  mod.const_set(sym, obj)    => obj

visibility: public
ri/1.8/system/Module/append_features-i.yaml000064400000001163150403660430014516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: When this module is included in another, Ruby calls <tt>append_features</tt> in this module, passing it the receiving module in <em>mod</em>. Ruby's default implementation is to add the constants, methods, and module variables of this module to <em>mod</em> if this module has not already been added to <em>mod</em> or one of its ancestors. See also <tt>Module#include</tt>.
full_name: Module#append_features
is_singleton: false
name: append_features
params: |
  append_features(mod)   => mod

visibility: public
ri/1.8/system/Module/method_added-i.yaml000064400000000347150403660430013755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Not documented
full_name: Module#method_added
is_singleton: false
name: method_added
params: (p1)
visibility: public
ri/1.8/system/Module/alias_method-i.yaml000064400000001362150403660430014003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Makes <em>new_name</em> a new copy of the method <em>old_name</em>. This can be used to retain access to methods that are overridden.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     alias_method :orig_exit, :exit\n     def exit(code=0)\n       puts &quot;Exiting with code #{code}&quot;\n       orig_exit(code)\n     end\n   end\n   include Mod\n   exit(99)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Exiting with code 99\n"
full_name: Module#alias_method
is_singleton: false
name: alias_method
params: |
  alias_method(new_name, old_name)   => self

visibility: public
ri/1.8/system/Module/constants-c.yaml000064400000001210150403660430013350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of the names of all constants defined in the system. This list includes the names of all modules and classes.
- !ruby/struct:SM::Flow::VERB 
  body: "   p Module.constants.sort[1..5]\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   [&quot;ARGV&quot;, &quot;ArgumentError&quot;, &quot;Array&quot;, &quot;Bignum&quot;, &quot;Binding&quot;]\n"
full_name: Module::constants
is_singleton: true
name: constants
params: |
  Module.constants   => array

visibility: public
ri/1.8/system/Module/private_method_defined%3f-i.yaml000064400000001610150403660430016334 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named private method is defined by _ mod_ (or its included modules and, if <em>mod</em> is a class, its ancestors).
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n     def method1()  end\n   end\n   class B\n     private\n     def method2()  end\n   end\n   class C &lt; B\n     include A\n     def method3()  end\n   end\n\n   A.method_defined? :method1            #=&gt; true\n   C.private_method_defined? &quot;method1&quot;   #=&gt; false\n   C.private_method_defined? &quot;method2&quot;   #=&gt; true\n   C.method_defined? &quot;method2&quot;           #=&gt; false\n"
full_name: Module#private_method_defined?
is_singleton: false
name: private_method_defined?
params: |
  mod.private_method_defined?(symbol)    => true or false

visibility: public
ri/1.8/system/Module/private_class_method-i.yaml000064400000001155150403660430015551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Makes existing class methods private. Often used to hide the default constructor <tt>new</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class SimpleSingleton  # Not thread safe\n     private_class_method :new\n     def SimpleSingleton.create(*args, &amp;block)\n       @me = new(*args, &amp;block) if ! @me\n       @me\n     end\n   end\n"
full_name: Module#private_class_method
is_singleton: false
name: private_class_method
params: |
  mod.private_class_method(symbol, ...)   => mod

visibility: public
ri/1.8/system/Module/include%3f-i.yaml000064400000001101150403660430013262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>module</em> is included in <em>mod</em> or one of <em>mod</em>'s ancestors.
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n   end\n   class B\n     include A\n   end\n   class C &lt; B\n   end\n   B.include?(A)   #=&gt; true\n   C.include?(A)   #=&gt; true\n   A.include?(A)   #=&gt; false\n"
full_name: Module#include?
is_singleton: false
name: include?
params: |
  mod.include?(module)    => true or false

visibility: public
ri/1.8/system/Module/new-c.yaml000064400000001423150403660430012133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new anonymous module. If a block is given, it is passed the module object, and the block is evaluated in the context of this module using <tt>module_eval</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Fred = Module.new do\n     def meth1\n       &quot;hello&quot;\n     end\n     def meth2\n       &quot;bye&quot;\n     end\n   end\n   a = &quot;my string&quot;\n   a.extend(Fred)   #=&gt; &quot;my string&quot;\n   a.meth1          #=&gt; &quot;hello&quot;\n   a.meth2          #=&gt; &quot;bye&quot;\n"
full_name: Module::new
is_singleton: true
name: new
params: |
  Module.new                  => mod
  Module.new {|mod| block }   => mod

visibility: public
ri/1.8/system/Module/module_exec-i.yaml000064400000001333150403660430013641 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates the given block in the context of the class/module. The method defined in the block will belong to the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Thing\n   end\n   Thing.class_exec{\n     def hello() &quot;Hello there!&quot; end\n   }\n   puts Thing.new.hello()\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Hello there!\n"
full_name: Module#module_exec
is_singleton: false
name: module_exec
params: |
  mod.module_exec(arg...) {|var...| block }       => obj
  mod.class_exec(arg...) {|var...| block }        => obj

visibility: public
ri/1.8/system/Module/public_method_defined%3f-i.yaml000064400000001606150403660430016145 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named public method is defined by <em>mod</em> (or its included modules and, if <em>mod</em> is a class, its ancestors).
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n     def method1()  end\n   end\n   class B\n     protected\n     def method2()  end\n   end\n   class C &lt; B\n     include A\n     def method3()  end\n   end\n\n   A.method_defined? :method1           #=&gt; true\n   C.public_method_defined? &quot;method1&quot;   #=&gt; true\n   C.public_method_defined? &quot;method2&quot;   #=&gt; false\n   C.method_defined? &quot;method2&quot;          #=&gt; true\n"
full_name: Module#public_method_defined?
is_singleton: false
name: public_method_defined?
params: |
  mod.public_method_defined?(symbol)   => true or false

visibility: public
ri/1.8/system/Module/%3d%3d%3d-i.yaml000064400000000714150403660430012515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Case Equality---Returns <tt>true</tt> if <em>anObject</em> is an instance of <em>mod</em> or one of <em>mod</em>'s descendents. Of limited use for modules, but can be used in <tt>case</tt> statements to classify objects by class.
full_name: Module#===
is_singleton: false
name: ===
params: |
  mod === obj    => true or false

visibility: public
ri/1.8/system/Module/remove_class_variable-i.yaml000064400000001157150403660430015703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes the definition of the <em>sym</em>, returning that constant's value.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Dummy\n     @@var = 99\n     puts @@var\n     remove_class_variable(:@@var)\n     puts(defined? @@var)\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   99\n   nil\n"
full_name: Module#remove_class_variable
is_singleton: false
name: remove_class_variable
params: |
  remove_class_variable(sym)    => obj

visibility: public
ri/1.8/system/Module/remove_method-i.yaml000064400000000565150403660430014213 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes the method identified by <em>symbol</em> from the current class. For an example, see <tt>Module.undef_method</tt>.
full_name: Module#remove_method
is_singleton: false
name: remove_method
params: |
  remove_method(symbol)   => self

visibility: public
ri/1.8/system/Module/public_instance_methods-i.yaml000064400000000714150403660430016237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a list of the public instance methods defined in <em>mod</em>. If the optional parameter is not <tt>false</tt>, the methods of any ancestors are included.
full_name: Module#public_instance_methods
is_singleton: false
name: public_instance_methods
params: |
  mod.public_instance_methods(include_super=true)   => array

visibility: public
ri/1.8/system/Module/cdesc-Module.yaml000064400000010775150403660430013440 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: constants
- !ruby/object:RI::MethodSummary 
  name: nesting
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A <tt>Module</tt> is a collection of methods and constants. The methods in a module may be instance methods or module methods. Instance methods appear as methods in a class when the module is included, module methods do not. Conversely, module methods may be called without creating an encapsulating object, while instance methods may not. (See <tt>Module#module_function</tt>)
- !ruby/struct:SM::Flow::P 
  body: In the descriptions that follow, the parameter <em>syml</em> refers to a symbol, which is either a quoted string or a <tt>Symbol</tt> (such as <tt>:name</tt>).
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     include Math\n     CONST = 1\n     def meth\n       #  ...\n     end\n   end\n   Mod.class              #=&gt; Module\n   Mod.constants          #=&gt; [&quot;E&quot;, &quot;PI&quot;, &quot;CONST&quot;]\n   Mod.instance_methods   #=&gt; [&quot;meth&quot;]\n"
constants: []

full_name: Module
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <
- !ruby/object:RI::MethodSummary 
  name: <=
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: ">"
- !ruby/object:RI::MethodSummary 
  name: ">="
- !ruby/object:RI::MethodSummary 
  name: alias_method
- !ruby/object:RI::MethodSummary 
  name: ancestors
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: attr
- !ruby/object:RI::MethodSummary 
  name: attr_accessor
- !ruby/object:RI::MethodSummary 
  name: attr_reader
- !ruby/object:RI::MethodSummary 
  name: attr_writer
- !ruby/object:RI::MethodSummary 
  name: autoload
- !ruby/object:RI::MethodSummary 
  name: autoload?
- !ruby/object:RI::MethodSummary 
  name: class_eval
- !ruby/object:RI::MethodSummary 
  name: class_exec
- !ruby/object:RI::MethodSummary 
  name: class_variable_defined?
- !ruby/object:RI::MethodSummary 
  name: class_variable_get
- !ruby/object:RI::MethodSummary 
  name: class_variable_set
- !ruby/object:RI::MethodSummary 
  name: class_variables
- !ruby/object:RI::MethodSummary 
  name: const_defined?
- !ruby/object:RI::MethodSummary 
  name: const_get
- !ruby/object:RI::MethodSummary 
  name: const_missing
- !ruby/object:RI::MethodSummary 
  name: const_set
- !ruby/object:RI::MethodSummary 
  name: constants
- !ruby/object:RI::MethodSummary 
  name: define_method
- !ruby/object:RI::MethodSummary 
  name: extend_object
- !ruby/object:RI::MethodSummary 
  name: extended
- !ruby/object:RI::MethodSummary 
  name: freeze
- !ruby/object:RI::MethodSummary 
  name: include
- !ruby/object:RI::MethodSummary 
  name: include?
- !ruby/object:RI::MethodSummary 
  name: included
- !ruby/object:RI::MethodSummary 
  name: included_modules
- !ruby/object:RI::MethodSummary 
  name: instance_method
- !ruby/object:RI::MethodSummary 
  name: instance_methods
- !ruby/object:RI::MethodSummary 
  name: method_added
- !ruby/object:RI::MethodSummary 
  name: method_defined?
- !ruby/object:RI::MethodSummary 
  name: method_removed
- !ruby/object:RI::MethodSummary 
  name: method_undefined
- !ruby/object:RI::MethodSummary 
  name: module_eval
- !ruby/object:RI::MethodSummary 
  name: module_exec
- !ruby/object:RI::MethodSummary 
  name: module_function
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: private
- !ruby/object:RI::MethodSummary 
  name: private_class_method
- !ruby/object:RI::MethodSummary 
  name: private_instance_methods
- !ruby/object:RI::MethodSummary 
  name: private_method_defined?
- !ruby/object:RI::MethodSummary 
  name: protected
- !ruby/object:RI::MethodSummary 
  name: protected_instance_methods
- !ruby/object:RI::MethodSummary 
  name: protected_method_defined?
- !ruby/object:RI::MethodSummary 
  name: public
- !ruby/object:RI::MethodSummary 
  name: public_class_method
- !ruby/object:RI::MethodSummary 
  name: public_instance_methods
- !ruby/object:RI::MethodSummary 
  name: public_method_defined?
- !ruby/object:RI::MethodSummary 
  name: remove_class_variable
- !ruby/object:RI::MethodSummary 
  name: remove_const
- !ruby/object:RI::MethodSummary 
  name: remove_method
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: undef_method
name: Module
superclass: 
ri/1.8/system/Module/private_instance_methods-i.yaml000064400000001333150403660430016431 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a list of the private instance methods defined in <em>mod</em>. If the optional parameter is not <tt>false</tt>, the methods of any ancestors are included.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     def method1()  end\n     private :method1\n     def method2()  end\n   end\n   Mod.instance_methods           #=&gt; [&quot;method2&quot;]\n   Mod.private_instance_methods   #=&gt; [&quot;method1&quot;]\n"
full_name: Module#private_instance_methods
is_singleton: false
name: private_instance_methods
params: |
  mod.private_instance_methods(include_super=true)    => array

visibility: public
ri/1.8/system/Module/class_variable_set-i.yaml000064400000001145150403660430015176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the class variable names by <em>symbol</em> to <em>object</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Fred\n     @@foo = 99\n     def foo\n       @@foo\n     end\n   end\n\n   def Fred.foo\n     class_variable_set(:@@foo, 101)      #=&gt; 101\n   end\n   Fred.foo\n   Fred.new.foo                             #=&gt; 101\n"
full_name: Module#class_variable_set
is_singleton: false
name: class_variable_set
params: |
  obj.class_variable_set(symbol, obj)    => obj

visibility: public
ri/1.8/system/Module/private-i.yaml000064400000001221150403660430013016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no arguments, sets the default visibility for subsequently defined methods to private. With arguments, sets the named methods to have private visibility.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     def a()  end\n     def b()  end\n     private\n     def c()  end\n     private :a\n   end\n   Mod.private_instance_methods   #=&gt; [&quot;a&quot;, &quot;c&quot;]\n"
full_name: Module#private
is_singleton: false
name: private
params: |
  private                 => self
  private(symbol, ...)    => self

visibility: public
ri/1.8/system/Module/constants-i.yaml000064400000000623150403660430013365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of the names of the constants accessible in <em>mod</em>. This includes the names of constants in any included modules (example at start of section).
full_name: Module#constants
is_singleton: false
name: constants
params: |
  mod.constants    => array

visibility: public
ri/1.8/system/Module/attr-i.yaml000064400000001535150403660430012326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Defines a named attribute for this module, where the name is <em>symbol.</em><tt>id2name</tt>, creating an instance variable (<tt>@name</tt>) and a corresponding access method to read it. If the optional <em>writable</em> argument is <tt>true</tt>, also creates a method called <tt>name=</tt> to set the attribute.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     attr  :size, true\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: <em>is equivalent to:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     def size\n       @size\n     end\n     def size=(val)\n       @size = val\n     end\n   end\n"
full_name: Module#attr
is_singleton: false
name: attr
params: |
  attr(symbol, writable=false)    => nil

visibility: public
ri/1.8/system/Module/class_eval-i.yaml000064400000002030150403660430013457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Evaluates the string or block in the context of <em>mod</em>. This can be used to add methods to a class. <tt>module_eval</tt> returns the result of evaluating its argument. The optional <em>filename</em> and <em>lineno</em> parameters set the text for error messages.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Thing\n   end\n   a = %q{def hello() &quot;Hello there!&quot; end}\n   Thing.module_eval(a)\n   puts Thing.new.hello()\n   Thing.module_eval(&quot;invalid code&quot;, &quot;dummy&quot;, 123)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Hello there!\n   dummy:123:in `module_eval': undefined local variable\n       or method `code' for Thing:Class\n"
full_name: Module#class_eval
is_singleton: false
name: class_eval
params: |
  mod.class_eval(string [, filename [, lineno]])  => obj
  mod.module_eval {|| block }                     => obj

visibility: public
ri/1.8/system/Module/attr_accessor-i.yaml000064400000001065150403660430014206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equivalent to calling ``<tt>attr</tt><em>symbol</em><tt>, true</tt>'' on each <em>symbol</em> in turn.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     attr_accessor(:one, :two)\n   end\n   Mod.instance_methods.sort   #=&gt; [&quot;one&quot;, &quot;one=&quot;, &quot;two&quot;, &quot;two=&quot;]\n"
full_name: Module#attr_accessor
is_singleton: false
name: attr_accessor
params: |
  attr_accessor(symbol, ...)    => nil

visibility: public
ri/1.8/system/Module/instance_methods-i.yaml000064400000002107150403660430014677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array containing the names of public instance methods in the receiver. For a module, these are the public methods; for a class, they are the instance (not singleton) methods. With no argument, or with an argument that is <tt>false</tt>, the instance methods in <em>mod</em> are returned, otherwise the methods in <em>mod</em> and <em>mod</em>'s superclasses are returned.
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n     def method1()  end\n   end\n   class B\n     def method2()  end\n   end\n   class C &lt; B\n     def method3()  end\n   end\n\n   A.instance_methods                #=&gt; [&quot;method1&quot;]\n   B.instance_methods(false)         #=&gt; [&quot;method2&quot;]\n   C.instance_methods(false)         #=&gt; [&quot;method3&quot;]\n   C.instance_methods(true).length   #=&gt; 43\n"
full_name: Module#instance_methods
is_singleton: false
name: instance_methods
params: |
  mod.instance_methods(include_super=true)   => array

visibility: public
ri/1.8/system/Module/freeze-i.yaml000064400000000407150403660430012631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Prevents further modifications to <em>mod</em>.
full_name: Module#freeze
is_singleton: false
name: freeze
params: |
  mod.freeze

visibility: public
ri/1.8/system/Module/public-i.yaml000064400000000651150403660430012630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: With no arguments, sets the default visibility for subsequently defined methods to public. With arguments, sets the named methods to have public visibility.
full_name: Module#public
is_singleton: false
name: public
params: |
  public                 => self
  public(symbol, ...)    => self

visibility: public
ri/1.8/system/Module/undef_method-i.yaml000064400000002215150403660430014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Prevents the current class from responding to calls to the named method. Contrast this with <tt>remove_method</tt>, which deletes the method from the particular class; Ruby will still search superclasses and mixed-in modules for a possible receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   class Parent\n     def hello\n       puts &quot;In parent&quot;\n     end\n   end\n   class Child &lt; Parent\n     def hello\n       puts &quot;In child&quot;\n     end\n   end\n\n   c = Child.new\n   c.hello\n\n   class Child\n     remove_method :hello  # remove from child, still in parent\n   end\n   c.hello\n\n   class Child\n     undef_method :hello   # prevent any calls to 'hello'\n   end\n   c.hello\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   In child\n   In parent\n   prog.rb:23: undefined method `hello' for #&lt;Child:0x401b3bb4&gt; (NoMethodError)\n"
full_name: Module#undef_method
is_singleton: false
name: undef_method
params: |
  undef_method(symbol)    => self

visibility: public
ri/1.8/system/Module/to_s-i.yaml000064400000000615150403660430012316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a string representing this module or class. For basic classes and modules, this is the name. For singletons, we show information on the thing we're attached to as well.
full_name: Module#to_s
is_singleton: false
name: to_s
params: |
  mod.to_s   => string

visibility: public
ri/1.8/system/Module/%3e-i.yaml000064400000000737150403660430011733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true if <em>mod</em> is an ancestor of <em>other</em>. Returns <tt>nil</tt> if there's no relationship between the two. (Think of the relationship in terms of the class definition: &quot;class A&lt;B&quot; implies &quot;B&gt;A&quot;)."
full_name: Module#>
is_singleton: false
name: ">"
params: |
  mod > other   =>  true, false, or nil

visibility: public
ri/1.8/system/Module/%3d%3d-i.yaml000064400000002514150403660430012221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Equality---At the <tt>Object</tt> level, <tt>==</tt> returns <tt>true</tt> only if <em>obj</em> and <em>other</em> are the same object. Typically, this method is overridden in descendent classes to provide class-specific meaning.
- !ruby/struct:SM::Flow::P 
  body: "Unlike <tt>==</tt>, the <tt>equal?</tt> method should never be overridden by subclasses: it is used to determine object identity (that is, <tt>a.equal?(b)</tt> iff <tt>a</tt> is the same object as <tt>b</tt>)."
- !ruby/struct:SM::Flow::P 
  body: "The <tt>eql?</tt> method returns <tt>true</tt> if <em>obj</em> and <em>anObject</em> have the same value. Used by <tt>Hash</tt> to test members for equality. For objects of class <tt>Object</tt>, <tt>eql?</tt> is synonymous with <tt>==</tt>. Subclasses normally continue this tradition, but there are exceptions. <tt>Numeric</tt> types, for example, perform type conversion across <tt>==</tt>, but not across <tt>eql?</tt>, so:"
- !ruby/struct:SM::Flow::VERB 
  body: "   1 == 1.0     #=&gt; true\n   1.eql? 1.0   #=&gt; false\n"
full_name: Module#==
is_singleton: false
name: ==
params: |
  obj == other        => true or false
  obj.equal?(other)   => true or false
  obj.eql?(other)     => true or false

visibility: public
ri/1.8/system/Module/method_defined%3f-i.yaml000064400000001641150403660430014606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if the named method is defined by <em>mod</em> (or its included modules and, if <em>mod</em> is a class, its ancestors). Public and protected methods are matched.
- !ruby/struct:SM::Flow::VERB 
  body: "   module A\n     def method1()  end\n   end\n   class B\n     def method2()  end\n   end\n   class C &lt; B\n     include A\n     def method3()  end\n   end\n\n   A.method_defined? :method1    #=&gt; true\n   C.method_defined? &quot;method1&quot;   #=&gt; true\n   C.method_defined? &quot;method2&quot;   #=&gt; true\n   C.method_defined? &quot;method3&quot;   #=&gt; true\n   C.method_defined? &quot;method4&quot;   #=&gt; false\n"
full_name: Module#method_defined?
is_singleton: false
name: method_defined?
params: |
  mod.method_defined?(symbol)    => true or false

visibility: public
ri/1.8/system/Module/included-i.yaml000064400000001256150403660430013143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Callback invoked whenever the receiver is included in another module or class. This should be used in preference to <tt>Module.append_features</tt> if your code wants to perform some action when a module is included in another.
- !ruby/struct:SM::Flow::VERB 
  body: "       module A\n         def A.included(mod)\n           puts &quot;#{self} included in #{mod}&quot;\n         end\n       end\n       module Enumerable\n         include A\n       end\n"
full_name: Module#included
is_singleton: false
name: included
params: |
  included( othermod )

visibility: public
ri/1.8/system/Module/include-i.yaml000064400000000461150403660430012774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes <tt>Module.append_features</tt> on each parameter in turn.
full_name: Module#include
is_singleton: false
name: include
params: |
  include(module, ...)    => self

visibility: public
ri/1.8/system/Module/class_variables-i.yaml000064400000001142150403660430014503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an array of the names of class variables in <em>mod</em> and the ancestors of <em>mod</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class One\n     @@var1 = 1\n   end\n   class Two &lt; One\n     @@var2 = 2\n   end\n   One.class_variables   #=&gt; [&quot;@@var1&quot;]\n   Two.class_variables   #=&gt; [&quot;@@var2&quot;, &quot;@@var1&quot;]\n"
full_name: Module#class_variables
is_singleton: false
name: class_variables
params: |
  mod.class_variables   => array

visibility: public
ri/1.8/system/Module/const_missing-i.yaml000064400000002223150403660440014227 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Invoked when a reference is made to an undefined constant in <em>mod</em>. It is passed a symbol for the undefined constant, and returns a value to be used for that constant. The following code is a (very bad) example: if reference is made to an undefined constant, it attempts to load a file whose name is the lowercase version of the constant (thus class <tt>Fred</tt> is assumed to be in file <tt>fred.rb</tt>). If found, it returns the value of the loaded class. It therefore implements a perverse kind of autoload facility."
- !ruby/struct:SM::Flow::VERB 
  body: "  def Object.const_missing(name)\n    @looked_for ||= {}\n    str_name = name.to_s\n    raise &quot;Class not found: #{name}&quot; if @looked_for[str_name]\n    @looked_for[str_name] = 1\n    file = str_name.downcase\n    require file\n    klass = const_get(name)\n    return klass if klass\n    raise &quot;Class not found: #{name}&quot;\n  end\n"
full_name: Module#const_missing
is_singleton: false
name: const_missing
params: |
  mod.const_missing(sym)    => obj

visibility: public
ri/1.8/system/Module/name-i.yaml000064400000000413150403660440012267 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the module <em>mod</em>.
full_name: Module#name
is_singleton: false
name: name
params: |
  mod.name    => string

visibility: public
ri/1.8/system/Module/extend_object-i.yaml000064400000001705150403660440014171 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extends the specified object by adding this module's constants and methods (which are added as singleton methods). This is the callback method used by <tt>Object#extend</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Picky\n     def Picky.extend_object(o)\n       if String === o\n         puts &quot;Can't add Picky to a String&quot;\n       else\n         puts &quot;Picky added to #{o.class}&quot;\n         super\n       end\n     end\n   end\n   (s = Array.new).extend Picky  # Call Object.extend\n   (s = &quot;quick brown fox&quot;).extend Picky\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Picky added to Array\n   Can't add Picky to a String\n"
full_name: Module#extend_object
is_singleton: false
name: extend_object
params: |
  extend_object(obj)    => obj

visibility: public
ri/1.8/system/Module/nesting-c.yaml000064400000000761150403660440013016 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the list of <tt>Modules</tt> nested at the point of call.
- !ruby/struct:SM::Flow::VERB 
  body: "   module M1\n     module M2\n       $a = Module.nesting\n     end\n   end\n   $a           #=&gt; [M1::M2, M1]\n   $a[0].name   #=&gt; &quot;M1::M2&quot;\n"
full_name: Module::nesting
is_singleton: true
name: nesting
params: |
  Module.nesting    => array

visibility: public
ri/1.8/system/Module/define_method-i.yaml000064400000002426150403660440014147 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Defines an instance method in the receiver. The <em>method</em> parameter can be a <tt>Proc</tt> or <tt>Method</tt> object. If a block is specified, it is used as the method body. This block is evaluated using <tt>instance_eval</tt>, a point that is tricky to demonstrate because <tt>define_method</tt> is private. (This is why we resort to the <tt>send</tt> hack in this example.)
- !ruby/struct:SM::Flow::VERB 
  body: "   class A\n     def fred\n       puts &quot;In Fred&quot;\n     end\n     def create_method(name, &amp;block)\n       self.class.send(:define_method, name, &amp;block)\n     end\n     define_method(:wilma) { puts &quot;Charge it!&quot; }\n   end\n   class B &lt; A\n     define_method(:barney, instance_method(:fred))\n   end\n   a = B.new\n   a.barney\n   a.wilma\n   a.create_method(:betty) { p self }\n   a.betty\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   In Fred\n   Charge it!\n   #&lt;B:0x401b39e8&gt;\n"
full_name: Module#define_method
is_singleton: false
name: define_method
params: |
  define_method(symbol, method)     => new_method
  define_method(symbol) { block }   => proc

visibility: public
ri/1.8/system/Module/class_variable_get-i.yaml000064400000001134150403660440015161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of the given class variable (or throws a <tt>NameError</tt> exception). The <tt>@@</tt> part of the variable name should be included for regular class variables
- !ruby/struct:SM::Flow::VERB 
  body: "   class Fred\n     @@foo = 99\n   end\n\n   def Fred.foo\n     class_variable_get(:@@foo)     #=&gt; 99\n   end\n"
full_name: Module#class_variable_get
is_singleton: false
name: class_variable_get
params: |
  mod.class_variable_get(symbol)    => obj

visibility: public
ri/1.8/system/Module/ancestors-i.yaml000064400000001003150403660440013344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a list of modules included in <em>mod</em> (including <em>mod</em> itself).
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mod\n     include Math\n     include Comparable\n   end\n\n   Mod.ancestors    #=&gt; [Mod, Comparable, Math]\n   Math.ancestors   #=&gt; [Math]\n"
full_name: Module#ancestors
is_singleton: false
name: ancestors
params: |
  mod.ancestors -> array

visibility: public
ri/1.8/system/Module/method_undefined-i.yaml000064400000000357150403660440014657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Not documented
full_name: Module#method_undefined
is_singleton: false
name: method_undefined
params: (p1)
visibility: public
ri/1.8/system/Module/protected_instance_methods-i.yaml000064400000000730150403660440016751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a list of the protected instance methods defined in <em>mod</em>. If the optional parameter is not <tt>false</tt>, the methods of any ancestors are included.
full_name: Module#protected_instance_methods
is_singleton: false
name: protected_instance_methods
params: |
  mod.protected_instance_methods(include_super=true)   => array

visibility: public
ri/1.8/system/Module/included_modules-i.yaml000064400000000773150403660440014677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the list of modules included in <em>mod</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   module Mixin\n   end\n\n   module Outer\n     include Mixin\n   end\n\n   Mixin.included_modules   #=&gt; []\n   Outer.included_modules   #=&gt; [Mixin]\n"
full_name: Module#included_modules
is_singleton: false
name: included_modules
params: |
  mod.included_modules -> array

visibility: public
ri/1.8/system/Module/attr_reader-i.yaml000064400000000653150403660440013651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates instance variables and corresponding methods that return the value of each instance variable. Equivalent to calling ``<tt>attr</tt><em>:name</em>'' on each name in turn.
full_name: Module#attr_reader
is_singleton: false
name: attr_reader
params: |
  attr_reader(symbol, ...)    => nil

visibility: public
ri/1.8/system/TSortTest/cdesc-TSortTest.yaml000064400000000315150403660440014602 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: TSortTest
includes: []

instance_methods: []

name: TSortTest
superclass: Test::Unit::TestCase
ri/1.8/system/WSDL/Service/parse_attr-i.yaml000064400000000300150403660440014432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Service#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Service/parse_element-i.yaml000064400000000302150403660440015113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Service#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Service/new-c.yaml000064400000000247150403660440013063 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Service::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Service/targetnamespace-i.yaml000064400000000277150403660440015446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Service#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/Service/cdesc-Service.yaml000064400000001121150403660440014521 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: ports
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soap_address
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Service
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Service
superclass: Info
ri/1.8/system/WSDL/Documentation/parse_attr-i.yaml000064400000000306150403660440015651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Documentation#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Documentation/parse_element-i.yaml000064400000000310150403660440016323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Documentation#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Documentation/new-c.yaml000064400000000255150403660440014273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Documentation::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Documentation/cdesc-Documentation.yaml000064400000000540150403660440017147 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Documentation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Documentation
superclass: Info
ri/1.8/system/WSDL/Part/parse_attr-i.yaml000064400000000275150403660440013753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Part#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Part/parse_element-i.yaml000064400000000277150403660440014434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Part#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Part/cdesc-Part.yaml000064400000001013150403660440013335 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: element
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Part
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Part
superclass: Info
ri/1.8/system/WSDL/Part/new-c.yaml000064400000000244150403660440012366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Part::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/MethodDefCreator/dump_method-i.yaml000064400000000331150403660440017120 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#dump_method
is_singleton: false
name: dump_method
params: (operation, binding)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/elementqualified-i.yaml000064400000000325150403660440020133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#elementqualified
is_singleton: false
name: elementqualified
params: (part)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/param2str-i.yaml000064400000000311150403660440016524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#param2str
is_singleton: false
name: param2str
params: (params)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/cdesc-MethodDefCreator.yaml000064400000002117150403660440020627 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definitions
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::MethodDefCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: cdr
- !ruby/object:RI::MethodSummary 
  name: collect_documentparameter
- !ruby/object:RI::MethodSummary 
  name: collect_rpcparameter
- !ruby/object:RI::MethodSummary 
  name: collect_type
- !ruby/object:RI::MethodSummary 
  name: documentdefinedtype
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_method
- !ruby/object:RI::MethodSummary 
  name: ele2str
- !ruby/object:RI::MethodSummary 
  name: elementqualified
- !ruby/object:RI::MethodSummary 
  name: param2str
- !ruby/object:RI::MethodSummary 
  name: param_set
- !ruby/object:RI::MethodSummary 
  name: rpcdefinedtype
- !ruby/object:RI::MethodSummary 
  name: type2str
name: MethodDefCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/MethodDefCreator/collect_documentparameter-i.yaml000064400000000353150403660440022043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#collect_documentparameter
is_singleton: false
name: collect_documentparameter
params: (operation)
visibility: public
ri/1.8/system/WSDL/SOAP/MethodDefCreator/new-c.yaml000064400000000301150403660440015373 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/MethodDefCreator/rpcdefinedtype-i.yaml000064400000000321150403660440017617 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#rpcdefinedtype
is_singleton: false
name: rpcdefinedtype
params: (part)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/collect_rpcparameter-i.yaml000064400000000341150403660440021006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#collect_rpcparameter
is_singleton: false
name: collect_rpcparameter
params: (operation)
visibility: public
ri/1.8/system/WSDL/SOAP/MethodDefCreator/collect_type-i.yaml000064400000000315150403660440017303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#collect_type
is_singleton: false
name: collect_type
params: (type)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/ele2str-i.yaml000064400000000302150403660440016171 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#ele2str
is_singleton: false
name: ele2str
params: (ele)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/type2str-i.yaml000064400000000305150403660440016410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#type2str
is_singleton: false
name: type2str
params: (type)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/param_set-i.yaml000064400000000341150403660450016570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#param_set
is_singleton: false
name: param_set
params: (io_type, name, type, ele = nil)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/dump-i.yaml000064400000000300150403660450015555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#dump
is_singleton: false
name: dump
params: (porttype)
visibility: public
ri/1.8/system/WSDL/SOAP/MethodDefCreator/cdr-i.yaml000064400000000272150403660450015370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#cdr
is_singleton: false
name: cdr
params: (ary)
visibility: private
ri/1.8/system/WSDL/SOAP/MethodDefCreator/documentdefinedtype-i.yaml000064400000000333150403660450020655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MethodDefCreator#documentdefinedtype
is_singleton: false
name: documentdefinedtype
params: (part)
visibility: private
ri/1.8/system/WSDL/SOAP/Header/cdesc-Header.yaml000064400000001613150403660450014652 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: headerfault
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: message
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: part
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: use
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::Header
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find_message
- !ruby/object:RI::MethodSummary 
  name: find_part
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Header
superclass: Info
ri/1.8/system/WSDL/SOAP/Header/parse_attr-i.yaml000064400000000305150403660450014772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Header#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/SOAP/Header/parse_element-i.yaml000064400000000307150403660450015453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Header#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/SOAP/Header/find_part-i.yaml000064400000000270150403660450014575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Header#find_part
is_singleton: false
name: find_part
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Header/find_message-i.yaml000064400000000276150403660450015261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Header#find_message
is_singleton: false
name: find_message
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Header/new-c.yaml000064400000000254150403660450013414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Header::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Header/targetnamespace-i.yaml000064400000000304150403660450015770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Header#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_file-i.yaml000064400000000300150403660450015370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_file
is_singleton: false
name: create_file
params: ()
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/check_file-i.yaml000064400000000306150403660450015210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#check_file
is_singleton: false
name: check_file
params: (filename)
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/cdesc-WSDL2Ruby.yaml000064400000002322150403660450015462 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: basedir
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: location
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: logger
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: opt
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::WSDL2Ruby
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_file
- !ruby/object:RI::MethodSummary 
  name: create_cgi_stub
- !ruby/object:RI::MethodSummary 
  name: create_classdef
- !ruby/object:RI::MethodSummary 
  name: create_client_skelton
- !ruby/object:RI::MethodSummary 
  name: create_driver
- !ruby/object:RI::MethodSummary 
  name: create_file
- !ruby/object:RI::MethodSummary 
  name: create_name
- !ruby/object:RI::MethodSummary 
  name: create_servant_skelton
- !ruby/object:RI::MethodSummary 
  name: create_standalone_server_stub
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: shbang
- !ruby/object:RI::MethodSummary 
  name: write_file
name: WSDL2Ruby
superclass: Object
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_name-i.yaml000064400000000304150403660450015375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_name
is_singleton: false
name: create_name
params: (name)
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/write_file-i.yaml000064400000000321150403660450015262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: f
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#write_file
is_singleton: false
name: write_file
params: (filename) {|f| ...}
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/new-c.yaml000064400000000257150403660450013724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_servant_skelton-i.yaml000064400000000342150403660450017700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_servant_skelton
is_singleton: false
name: create_servant_skelton
params: (porttypename)
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_driver-i.yaml000064400000000320150403660450015746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_driver
is_singleton: false
name: create_driver
params: (porttypename)
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_client_skelton-i.yaml000064400000000337150403660460017501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_client_skelton
is_singleton: false
name: create_client_skelton
params: (servicename)
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/run-i.yaml000064400000000257150403660460013746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#run
is_singleton: false
name: run
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_classdef-i.yaml000064400000000310150403660470016240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_classdef
is_singleton: false
name: create_classdef
params: ()
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_standalone_server_stub-i.yaml000064400000000357150403660470021242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_standalone_server_stub
is_singleton: false
name: create_standalone_server_stub
params: (servicename)
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/create_cgi_stub-i.yaml000064400000000323150403660500016251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#create_cgi_stub
is_singleton: false
name: create_cgi_stub
params: (servicename)
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/shbang-i.yaml000064400000000266150403660510014400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#shbang
is_singleton: false
name: shbang
params: ()
visibility: private
ri/1.8/system/WSDL/SOAP/WSDL2Ruby/import-i.yaml000064400000000276150403660510014451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::WSDL2Ruby#import
is_singleton: false
name: import
params: (location)
visibility: private
ri/1.8/system/WSDL/SOAP/Fault/parse_attr-i.yaml000064400000000304150403660510014651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Fault#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/SOAP/Fault/parse_element-i.yaml000064400000000306150403660520015333 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Fault#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/SOAP/Fault/new-c.yaml000064400000000253150403660520013274 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Fault::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Fault/targetnamespace-i.yaml000064400000000303150403660520015650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Fault#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Fault/cdesc-Fault.yaml000064400000001226150403660520014416 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: use
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::Fault
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Fault
superclass: Info
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump_simpleclassdef-i.yaml000064400000000345150403660520020467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump_simpleclassdef
is_singleton: false
name: dump_simpleclassdef
params: (type_or_element)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump_simpletypedef-i.yaml000064400000000345150403660530020344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump_simpletypedef
is_singleton: false
name: dump_simpletypedef
params: (qname, simpletype)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/attribute_basetype-i.yaml000064400000000330150403660530020336 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#attribute_basetype
is_singleton: false
name: attribute_basetype
params: (attr)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump_simpletype-i.yaml000064400000000316150403660530017663 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump_simpletype
is_singleton: false
name: dump_simpletype
params: ()
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump_classdef-i.yaml000064400000000353150403660530017255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump_classdef
is_singleton: false
name: dump_classdef
params: (qname, typedef, qualified = false)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/cdesc-ClassDefCreator.yaml000064400000002305150403660530020300 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: DEFAULT_ITEM_NAME
  value: XSD::QName.new(nil, 'item')
full_name: WSDL::SOAP::ClassDefCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: attribute_basetype
- !ruby/object:RI::MethodSummary 
  name: basetype_class
- !ruby/object:RI::MethodSummary 
  name: define_attribute
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_arraydef
- !ruby/object:RI::MethodSummary 
  name: dump_classdef
- !ruby/object:RI::MethodSummary 
  name: dump_complextype
- !ruby/object:RI::MethodSummary 
  name: dump_element
- !ruby/object:RI::MethodSummary 
  name: dump_simpleclassdef
- !ruby/object:RI::MethodSummary 
  name: dump_simpletype
- !ruby/object:RI::MethodSummary 
  name: dump_simpletypedef
- !ruby/object:RI::MethodSummary 
  name: element_basetype
- !ruby/object:RI::MethodSummary 
  name: name_attribute
- !ruby/object:RI::MethodSummary 
  name: name_element
name: ClassDefCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump_complextype-i.yaml000064400000000320150403660530020034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump_complextype
is_singleton: false
name: dump_complextype
params: ()
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/name_attribute-i.yaml000064400000000325150403660530017446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#name_attribute
is_singleton: false
name: name_attribute
params: (attribute)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/new-c.yaml000064400000000300150403660530015217 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreator/element_basetype-i.yaml000064400000000323150403660530017766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#element_basetype
is_singleton: false
name: element_basetype
params: (ele)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/name_element-i.yaml000064400000000317150403660540017076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#name_element
is_singleton: false
name: name_element
params: (element)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump_element-i.yaml000064400000000310150403660540017114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump_element
is_singleton: false
name: dump_element
params: ()
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump-i.yaml000064400000000301150403660540015403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump
is_singleton: false
name: dump
params: (type = nil)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreator/define_attribute-i.yaml000064400000000335150403660540017762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#define_attribute
is_singleton: false
name: define_attribute
params: (c, attributes)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/basetype_class-i.yaml000064400000000320150403660540017440 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#basetype_class
is_singleton: false
name: basetype_class
params: (type)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreator/dump_arraydef-i.yaml000064400000000325150403660540017266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreator#dump_arraydef
is_singleton: false
name: dump_arraydef
params: (complextype)
visibility: private
ri/1.8/system/WSDL/SOAP/Body/parse_attr-i.yaml000064400000000303150403660540014475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Body#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/SOAP/Body/parse_element-i.yaml000064400000000305150403660540015156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Body#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/SOAP/Body/new-c.yaml000064400000000252150403660540013117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Body::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Body/cdesc-Body.yaml000064400000001133150403660540014061 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: parts
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: use
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::Body
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Body
superclass: Info
ri/1.8/system/WSDL/SOAP/DriverCreator/cdesc-DriverCreator.yaml000064400000000744150403660540017624 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definitions
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::DriverCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_porttype
name: DriverCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/DriverCreator/dump_porttype-i.yaml000064400000000314150403660550017125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::DriverCreator#dump_porttype
is_singleton: false
name: dump_porttype
params: (name)
visibility: private
ri/1.8/system/WSDL/SOAP/DriverCreator/new-c.yaml000064400000000276150403660550015004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::DriverCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/DriverCreator/dump-i.yaml000064400000000303150403660550015155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::DriverCreator#dump
is_singleton: false
name: dump
params: (porttype = nil)
visibility: public
ri/1.8/system/WSDL/SOAP/Operation/parse_attr-i.yaml000064400000000310150403660560015540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/SOAP/Operation/parse_element-i.yaml000064400000000312150403660560016221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/SOAP/Operation/parent_binding-i.yaml000064400000000306150403660560016364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation#parent_binding
is_singleton: false
name: parent_binding
params: ()
visibility: private
ri/1.8/system/WSDL/SOAP/Operation/OperationInfo/new-c.yaml000064400000000410150403660570016735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation::OperationInfo::new
is_singleton: true
name: new
params: (style, op_name, optype_name, headerparts, bodyparts, faultpart, soapaction)
visibility: public
ri/1.8/system/WSDL/SOAP/Operation/OperationInfo/cdesc-OperationInfo.yaml000064400000001341150403660570021563 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: bodyparts
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: faultpart
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: headerparts
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: op_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: optype_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: style
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::Operation::OperationInfo
includes: []

instance_methods: []

name: OperationInfo
superclass: Object
ri/1.8/system/WSDL/SOAP/Operation/new-c.yaml000064400000000257150403660570014172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Operation/input_info-i.yaml000064400000000275150403660570015561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation#input_info
is_singleton: false
name: input_info
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Operation/param_info-i.yaml000064400000000316150403660600015510 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation#param_info
is_singleton: false
name: param_info
params: (name_info, param)
visibility: private
ri/1.8/system/WSDL/SOAP/Operation/cdesc-Operation.yaml000064400000001363150403660600016171 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: soapaction
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: style
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::Operation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: input_info
- !ruby/object:RI::MethodSummary 
  name: operation_style
- !ruby/object:RI::MethodSummary 
  name: output_info
- !ruby/object:RI::MethodSummary 
  name: param_info
- !ruby/object:RI::MethodSummary 
  name: parent_binding
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Operation
superclass: Info
ri/1.8/system/WSDL/SOAP/Operation/operation_style-i.yaml000064400000000307150403660610016616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation#operation_style
is_singleton: false
name: operation_style
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Operation/output_info-i.yaml000064400000000277150403660620015760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Operation#output_info
is_singleton: false
name: output_info
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/dqname-i.yaml000064400000000307150403660620017305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#dqname
is_singleton: false
name: dqname
params: (qname)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/ndq-i.yaml000064400000000277150403660620016630 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#ndq
is_singleton: false
name: ndq
params: (ele)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/sym-i.yaml000064400000000277150403660630016657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#sym
is_singleton: false
name: sym
params: (ele)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/dq-i.yaml000064400000000275150403660630016451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#dq
is_singleton: false
name: dq
params: (ele)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/basetype_mapped_class-i.yaml000064400000000344150403660630022371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#basetype_mapped_class
is_singleton: false
name: basetype_mapped_class
params: (name)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/dump_inputparam-i.yaml000064400000000332150403660630021244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#dump_inputparam
is_singleton: false
name: dump_inputparam
params: (input)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/add_at-i.yaml000064400000000321150403660630017251 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#add_at
is_singleton: false
name: add_at
params: (base, str, pos)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/dump_inout_type-i.yaml000064400000000332150403660630021263 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#dump_inout_type
is_singleton: false
name: dump_inout_type
params: (param)
visibility: private
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/dump_method_signature-i.yaml000064400000000351150403660630022426 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#dump_method_signature
is_singleton: false
name: dump_method_signature
params: (operation)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/create_class_name-i.yaml000064400000000335150403660630021472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClassDefCreatorSupport#create_class_name
is_singleton: false
name: create_class_name
params: (qname)
visibility: public
ri/1.8/system/WSDL/SOAP/ClassDefCreatorSupport/cdesc-ClassDefCreatorSupport.yaml000064400000001470150403660630023275 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::SOAP::ClassDefCreatorSupport
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSD::CodeGen::GenSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_at
- !ruby/object:RI::MethodSummary 
  name: basetype_mapped_class
- !ruby/object:RI::MethodSummary 
  name: create_class_name
- !ruby/object:RI::MethodSummary 
  name: dq
- !ruby/object:RI::MethodSummary 
  name: dqname
- !ruby/object:RI::MethodSummary 
  name: dump_inout_type
- !ruby/object:RI::MethodSummary 
  name: dump_inputparam
- !ruby/object:RI::MethodSummary 
  name: dump_method_signature
- !ruby/object:RI::MethodSummary 
  name: ndq
- !ruby/object:RI::MethodSummary 
  name: sym
name: ClassDefCreatorSupport
superclass: 
ri/1.8/system/WSDL/SOAP/ClientSkeltonCreator/cdesc-ClientSkeltonCreator.yaml000064400000001145150403660630022466 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definitions
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::ClientSkeltonCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_input_init
- !ruby/object:RI::MethodSummary 
  name: dump_operation
- !ruby/object:RI::MethodSummary 
  name: dump_porttype
name: ClientSkeltonCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/ClientSkeltonCreator/dump_operation-i.yaml000064400000000332150403660630020561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClientSkeltonCreator#dump_operation
is_singleton: false
name: dump_operation
params: (operation)
visibility: private
ri/1.8/system/WSDL/SOAP/ClientSkeltonCreator/dump_porttype-i.yaml000064400000000323150403660640020450 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClientSkeltonCreator#dump_porttype
is_singleton: false
name: dump_porttype
params: (name)
visibility: private
ri/1.8/system/WSDL/SOAP/ClientSkeltonCreator/dump_input_init-i.yaml000064400000000330150403660650020743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClientSkeltonCreator#dump_input_init
is_singleton: false
name: dump_input_init
params: (input)
visibility: private
ri/1.8/system/WSDL/SOAP/ClientSkeltonCreator/new-c.yaml000064400000000305150403660650016321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClientSkeltonCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/ClientSkeltonCreator/dump-i.yaml000064400000000310150403660660016500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ClientSkeltonCreator#dump
is_singleton: false
name: dump
params: (service_name)
visibility: public
ri/1.8/system/WSDL/SOAP/CGIStubCreator/dump_porttype-i.yaml000064400000000315150403660660017135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::CGIStubCreator#dump_porttype
is_singleton: false
name: dump_porttype
params: (name)
visibility: private
ri/1.8/system/WSDL/SOAP/CGIStubCreator/new-c.yaml000064400000000277150403660670015015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::CGIStubCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/CGIStubCreator/dump-i.yaml000064400000000302150403660700015156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::CGIStubCreator#dump
is_singleton: false
name: dump
params: (service_name)
visibility: public
ri/1.8/system/WSDL/SOAP/CGIStubCreator/cdesc-CGIStubCreator.yaml000064400000000746150403660700017636 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definitions
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::CGIStubCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_porttype
name: CGIStubCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/ServantSkeltonCreator/dump_porttype-i.yaml000064400000000324150403660700020652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ServantSkeltonCreator#dump_porttype
is_singleton: false
name: dump_porttype
params: (name)
visibility: private
ri/1.8/system/WSDL/SOAP/ServantSkeltonCreator/new-c.yaml000064400000000306150403660700016522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ServantSkeltonCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/ServantSkeltonCreator/dump-i.yaml000064400000000313150403660700016702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::ServantSkeltonCreator#dump
is_singleton: false
name: dump
params: (porttype = nil)
visibility: public
ri/1.8/system/WSDL/SOAP/ServantSkeltonCreator/cdesc-ServantSkeltonCreator.yaml000064400000001070150403660700023071 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definitions
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::ServantSkeltonCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
- !ruby/object:RI::IncludedModule 
  name: XSD::CodeGen::GenSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_porttype
name: ServantSkeltonCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/HeaderFault/parse_attr-i.yaml000064400000000312150403660700015762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::HeaderFault#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/SOAP/HeaderFault/parse_element-i.yaml000064400000000314150403660700016443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::HeaderFault#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/SOAP/HeaderFault/cdesc-HeaderFault.yaml000064400000001252150403660700016637 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: encodingstyle
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: message
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: part
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: use
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::HeaderFault
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: HeaderFault
superclass: Info
ri/1.8/system/WSDL/SOAP/HeaderFault/new-c.yaml000064400000000261150403660700014404 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::HeaderFault::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/MappingRegistryCreator/dump_array_typemap-i.yaml000064400000000346150403660700022007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MappingRegistryCreator#dump_array_typemap
is_singleton: false
name: dump_array_typemap
params: (definedtype)
visibility: private
ri/1.8/system/WSDL/SOAP/MappingRegistryCreator/dump_typemap-i.yaml000064400000000323150403660700020604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MappingRegistryCreator#dump_typemap
is_singleton: false
name: dump_typemap
params: (type)
visibility: private
ri/1.8/system/WSDL/SOAP/MappingRegistryCreator/new-c.yaml000064400000000307150403660700016665 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MappingRegistryCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/MappingRegistryCreator/cdesc-MappingRegistryCreator.yaml000064400000001160150403660700023375 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definitions
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::MappingRegistryCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_array_typemap
- !ruby/object:RI::MethodSummary 
  name: dump_struct_typemap
- !ruby/object:RI::MethodSummary 
  name: dump_typemap
name: MappingRegistryCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/MappingRegistryCreator/dump_struct_typemap-i.yaml000064400000000350150403660700022210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MappingRegistryCreator#dump_struct_typemap
is_singleton: false
name: dump_struct_typemap
params: (definedtype)
visibility: private
ri/1.8/system/WSDL/SOAP/MappingRegistryCreator/dump-i.yaml000064400000000303150403660700017043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::MappingRegistryCreator#dump
is_singleton: false
name: dump
params: (types)
visibility: public
ri/1.8/system/WSDL/SOAP/Binding/parse_attr-i.yaml000064400000000306150403660700015153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Binding#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/SOAP/Binding/parse_element-i.yaml000064400000000310150403660700015625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Binding#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/SOAP/Binding/new-c.yaml000064400000000255150403660700013575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Binding::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/Binding/cdesc-Binding.yaml000064400000000733150403660710015217 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: style
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: transport
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::Binding
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Binding
superclass: Info
ri/1.8/system/WSDL/SOAP/StandaloneServerStubCreator/cdesc-StandaloneServerStubCreator.yaml000064400000001000150403660710025351 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: definitions
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::StandaloneServerStubCreator
includes: 
- !ruby/object:RI::IncludedModule 
  name: ClassDefCreatorSupport
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dump
- !ruby/object:RI::MethodSummary 
  name: dump_porttype
name: StandaloneServerStubCreator
superclass: Object
ri/1.8/system/WSDL/SOAP/StandaloneServerStubCreator/dump_porttype-i.yaml000064400000000332150403660710022005 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::StandaloneServerStubCreator#dump_porttype
is_singleton: false
name: dump_porttype
params: (name)
visibility: private
ri/1.8/system/WSDL/SOAP/StandaloneServerStubCreator/new-c.yaml000064400000000314150403660710017655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::StandaloneServerStubCreator::new
is_singleton: true
name: new
params: (definitions)
visibility: public
ri/1.8/system/WSDL/SOAP/StandaloneServerStubCreator/dump-i.yaml000064400000000317150403660710020042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::StandaloneServerStubCreator#dump
is_singleton: false
name: dump
params: (service_name)
visibility: public
ri/1.8/system/WSDL/SOAP/Address/cdesc-Address.yaml000064400000000632150403660720015244 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: location
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::SOAP::Address
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Address
superclass: Info
ri/1.8/system/WSDL/SOAP/Address/parse_attr-i.yaml000064400000000306150403660720015170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Address#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/SOAP/Address/parse_element-i.yaml000064400000000310150403660720015642 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Address#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/SOAP/Address/new-c.yaml000064400000000255150403660720013612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::SOAP::Address::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/SOAP/cdesc-SOAP.yaml000064400000002663150403660720013042 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: HeaderFaultName
  value: XSD::QName.new(SOAPBindingNamespace, 'headerfault')
- !ruby/object:RI::Constant 
  comment: 
  name: LocationAttrName
  value: XSD::QName.new(nil, 'location')
- !ruby/object:RI::Constant 
  comment: 
  name: StyleAttrName
  value: XSD::QName.new(nil, 'style')
- !ruby/object:RI::Constant 
  comment: 
  name: TransportAttrName
  value: XSD::QName.new(nil, 'transport')
- !ruby/object:RI::Constant 
  comment: 
  name: UseAttrName
  value: XSD::QName.new(nil, 'use')
- !ruby/object:RI::Constant 
  comment: 
  name: PartsAttrName
  value: XSD::QName.new(nil, 'parts')
- !ruby/object:RI::Constant 
  comment: 
  name: PartAttrName
  value: XSD::QName.new(nil, 'part')
- !ruby/object:RI::Constant 
  comment: 
  name: NameAttrName
  value: XSD::QName.new(nil, 'name')
- !ruby/object:RI::Constant 
  comment: 
  name: MessageAttrName
  value: XSD::QName.new(nil, 'message')
- !ruby/object:RI::Constant 
  comment: 
  name: EncodingStyleAttrName
  value: XSD::QName.new(nil, 'encodingStyle')
- !ruby/object:RI::Constant 
  comment: 
  name: NamespaceAttrName
  value: XSD::QName.new(nil, 'namespace')
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPActionAttrName
  value: XSD::QName.new(nil, 'soapAction')
full_name: WSDL::SOAP
includes: []

instance_methods: []

name: SOAP
superclass: 
ri/1.8/system/WSDL/Info/parse_epilogue-i.yaml000064400000000272150403660720014575 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Info#parse_epilogue
is_singleton: false
name: parse_epilogue
params: ()
visibility: public
ri/1.8/system/WSDL/Info/parse_attr-i.yaml000064400000000275150403660720013741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Info#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Info/cdesc-Info.yaml000064400000001170150403660720013314 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: id
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: parent
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: root
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Info
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: parse_epilogue
name: Info
superclass: Object
ri/1.8/system/WSDL/Info/parse_element-i.yaml000064400000000277150403660720014422 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Info#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Info/inspect-i.yaml000064400000000254150403660720013237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Info#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/WSDL/Info/new-c.yaml000064400000000244150403660720012354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Info::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Annotation/parse_attr-i.yaml000064400000000316150403660720016735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Annotation#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Annotation/parse_element-i.yaml000064400000000320150403660720017407 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Annotation#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Annotation/cdesc-Annotation.yaml000064400000000545150403660720017540 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Annotation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Annotation
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Annotation/new-c.yaml000064400000000265150403660720015357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Annotation::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Pattern/parse_attr-i.yaml000064400000000313150403660720016235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Pattern#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Pattern/parse_element-i.yaml000064400000000315150403660720016716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Pattern#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Pattern/new-c.yaml000064400000000262150403660720014657 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Pattern::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Pattern/cdesc-Pattern.yaml000064400000000537150403660720016347 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Pattern
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Pattern
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Length/parse_attr-i.yaml000064400000000312150403660720016040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Length#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Length/parse_element-i.yaml000064400000000314150403660720016521 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Length#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Length/new-c.yaml000064400000000261150403660720014462 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Length::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Length/cdesc-Length.yaml000064400000000535150403660720015755 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Length
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Length
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Sequence/parse_attr-i.yaml000064400000000314150403660720016371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Sequence#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Sequence/parse_element-i.yaml000064400000000316150403660720017052 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Sequence#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Sequence/new-c.yaml000064400000000263150403660720015013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Sequence::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Sequence/targetnamespace-i.yaml000064400000000313150403660720017367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Sequence#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Sequence/%3c%3c-i.yaml000064400000000272150403660720015075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Sequence#<<
is_singleton: false
name: "<<"
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Sequence/cdesc-Sequence.yaml000064400000001317150403660720016632 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: elements
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: maxoccurs
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: minoccurs
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Sequence
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: elementformdefault
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Sequence
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Sequence/elementformdefault-i.yaml000064400000000321150403660720020105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Sequence#elementformdefault
is_singleton: false
name: elementformdefault
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Any/parse_attr-i.yaml000064400000000307150403660720015352 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Any#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Any/parse_element-i.yaml000064400000000311150403660720016024 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Any#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Any/cdesc-Any.yaml000064400000001251150403660720014565 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: maxoccurs
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: minoccurs
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: process_contents
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Any
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Any
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Any/new-c.yaml000064400000000256150403660720013774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Any::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Any/targetnamespace-i.yaml000064400000000306150403660720016350 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Any#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Choice/parse_attr-i.yaml000064400000000312150403660720016011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Choice#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Choice/parse_element-i.yaml000064400000000314150403660720016472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Choice#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Choice/cdesc-Choice.yaml000064400000001313150403660720015672 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: elements
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: maxoccurs
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: minoccurs
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Choice
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: elementformdefault
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Choice
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Choice/new-c.yaml000064400000000261150403660720014433 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Choice::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Choice/targetnamespace-i.yaml000064400000000311150403660720017007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Choice#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Choice/%3c%3c-i.yaml000064400000000270150403660720014515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Choice#<<
is_singleton: false
name: "<<"
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Choice/elementformdefault-i.yaml000064400000000317150403660720017534 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Choice#elementformdefault
is_singleton: false
name: elementformdefault
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleType/parse_attr-i.yaml000064400000000316150403660720016716 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleType#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleType/parse_element-i.yaml000064400000000320150403660720017370 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleType#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleType/check_restriction-i.yaml000064400000000327150403660720020256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleType#check_restriction
is_singleton: false
name: check_restriction
params: (value)
visibility: private
ri/1.8/system/WSDL/XMLSchema/SimpleType/new-c.yaml000064400000000277150403660720015343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleType::new
is_singleton: true
name: new
params: (name = nil)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleType/targetnamespace-i.yaml000064400000000315150403660720017714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleType#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleType/check_lexical_format-i.yaml000064400000000334150403660720020700 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleType#check_lexical_format
is_singleton: false
name: check_lexical_format
params: (value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleType/base-i.yaml000064400000000267150403660720015471 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleType#base
is_singleton: false
name: base
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleType/cdesc-SimpleType.yaml000064400000001314150403660720017475 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: restriction
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::SimpleType
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: base
- !ruby/object:RI::MethodSummary 
  name: check_lexical_format
- !ruby/object:RI::MethodSummary 
  name: check_restriction
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: SimpleType
superclass: Info
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/create_classname-i.yaml000064400000000321150403660720017326 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby#create_classname
is_singleton: false
name: create_classname
params: (xsd)
visibility: private
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/create_file-i.yaml000064400000000304150403660720016300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby#create_file
is_singleton: false
name: create_file
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/check_file-i.yaml000064400000000312150403660720016111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby#check_file
is_singleton: false
name: check_file
params: (filename)
visibility: private
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/write_file-i.yaml000064400000000325150403660720016172 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: f
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby#write_file
is_singleton: false
name: write_file
params: (filename) {|f| ...}
visibility: private
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/new-c.yaml000064400000000263150403660720014625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/cdesc-XSD2Ruby.yaml000064400000001556150403660720016263 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: basedir
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: location
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: logger
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: opt
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::XSD2Ruby
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_file
- !ruby/object:RI::MethodSummary 
  name: create_classdef
- !ruby/object:RI::MethodSummary 
  name: create_classname
- !ruby/object:RI::MethodSummary 
  name: create_file
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: run
- !ruby/object:RI::MethodSummary 
  name: write_file
name: XSD2Ruby
superclass: Object
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/run-i.yaml000064400000000263150403660720014646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby#run
is_singleton: false
name: run
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/create_classdef-i.yaml000064400000000314150403660720017146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby#create_classdef
is_singleton: false
name: create_classdef
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/XSD2Ruby/import-i.yaml000064400000000302150403660720015346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::XSD2Ruby#import
is_singleton: false
name: import
params: (location)
visibility: private
ri/1.8/system/WSDL/XMLSchema/SimpleExtension/parse_attr-i.yaml000064400000000323150403660720017747 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleExtension#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleExtension/cdesc-SimpleExtension.yaml000064400000001133150403660720021562 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: base
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::SimpleExtension
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
- !ruby/object:RI::MethodSummary 
  name: valid?
name: SimpleExtension
superclass: Info
ri/1.8/system/WSDL/XMLSchema/SimpleExtension/parse_element-i.yaml000064400000000325150403660720020430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleExtension#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleExtension/new-c.yaml000064400000000272150403660720016371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleExtension::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleExtension/targetnamespace-i.yaml000064400000000322150403660720020745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleExtension#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleExtension/valid%3f-i.yaml000064400000000305150403660720017200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleExtension#valid?
is_singleton: false
name: valid?
params: (value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleContent/content-i.yaml000064400000000301150403660720016707 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleContent#content
is_singleton: false
name: content
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/SimpleContent/parse_element-i.yaml000064400000000323150403660720020064 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleContent#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleContent/check-i.yaml000064400000000302150403660720016313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleContent#check
is_singleton: false
name: check
params: (value)
visibility: private
ri/1.8/system/WSDL/XMLSchema/SimpleContent/new-c.yaml000064400000000270150403660720016025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleContent::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleContent/targetnamespace-i.yaml000064400000000320150403660720020401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleContent#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleContent/check_lexical_format-i.yaml000064400000000337150403660720021374 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleContent#check_lexical_format
is_singleton: false
name: check_lexical_format
params: (value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleContent/base-i.yaml000064400000000272150403660720016156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleContent#base
is_singleton: false
name: base
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleContent/cdesc-SimpleContent.yaml000064400000001307150403660720020661 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: extension
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: restriction
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::SimpleContent
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: base
- !ruby/object:RI::MethodSummary 
  name: check
- !ruby/object:RI::MethodSummary 
  name: check_lexical_format
- !ruby/object:RI::MethodSummary 
  name: content
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: SimpleContent
superclass: Info
ri/1.8/system/WSDL/XMLSchema/cdesc-XMLSchema.yaml000064400000011161150403660730015072 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AllName
  value: XSD::QName.new(XSD::Namespace, 'all')
- !ruby/object:RI::Constant 
  comment: 
  name: AnnotationName
  value: XSD::QName.new(XSD::Namespace, 'annotation')
- !ruby/object:RI::Constant 
  comment: 
  name: AnyName
  value: XSD::QName.new(XSD::Namespace, 'any')
- !ruby/object:RI::Constant 
  comment: 
  name: AttributeName
  value: XSD::QName.new(XSD::Namespace, 'attribute')
- !ruby/object:RI::Constant 
  comment: 
  name: ChoiceName
  value: XSD::QName.new(XSD::Namespace, 'choice')
- !ruby/object:RI::Constant 
  comment: 
  name: ComplexContentName
  value: XSD::QName.new(XSD::Namespace, 'complexContent')
- !ruby/object:RI::Constant 
  comment: 
  name: ComplexTypeName
  value: XSD::QName.new(XSD::Namespace, 'complexType')
- !ruby/object:RI::Constant 
  comment: 
  name: ElementName
  value: XSD::QName.new(XSD::Namespace, 'element')
- !ruby/object:RI::Constant 
  comment: 
  name: EnumerationName
  value: XSD::QName.new(XSD::Namespace, 'enumeration')
- !ruby/object:RI::Constant 
  comment: 
  name: ExtensionName
  value: XSD::QName.new(XSD::Namespace, 'extension')
- !ruby/object:RI::Constant 
  comment: 
  name: ImportName
  value: XSD::QName.new(XSD::Namespace, 'import')
- !ruby/object:RI::Constant 
  comment: 
  name: IncludeName
  value: XSD::QName.new(XSD::Namespace, 'include')
- !ruby/object:RI::Constant 
  comment: 
  name: LengthName
  value: XSD::QName.new(XSD::Namespace, 'length')
- !ruby/object:RI::Constant 
  comment: 
  name: PatternName
  value: XSD::QName.new(XSD::Namespace, 'pattern')
- !ruby/object:RI::Constant 
  comment: 
  name: RestrictionName
  value: XSD::QName.new(XSD::Namespace, 'restriction')
- !ruby/object:RI::Constant 
  comment: 
  name: SequenceName
  value: XSD::QName.new(XSD::Namespace, 'sequence')
- !ruby/object:RI::Constant 
  comment: 
  name: SchemaName
  value: XSD::QName.new(XSD::Namespace, 'schema')
- !ruby/object:RI::Constant 
  comment: 
  name: SimpleContentName
  value: XSD::QName.new(XSD::Namespace, 'simpleContent')
- !ruby/object:RI::Constant 
  comment: 
  name: SimpleTypeName
  value: XSD::QName.new(XSD::Namespace, 'simpleType')
- !ruby/object:RI::Constant 
  comment: 
  name: UniqueName
  value: XSD::QName.new(XSD::Namespace, 'unique')
- !ruby/object:RI::Constant 
  comment: 
  name: AttributeFormDefaultAttrName
  value: XSD::QName.new(nil, 'attributeFormDefault')
- !ruby/object:RI::Constant 
  comment: 
  name: BaseAttrName
  value: XSD::QName.new(nil, 'base')
- !ruby/object:RI::Constant 
  comment: 
  name: DefaultAttrName
  value: XSD::QName.new(nil, 'default')
- !ruby/object:RI::Constant 
  comment: 
  name: ElementFormDefaultAttrName
  value: XSD::QName.new(nil, 'elementFormDefault')
- !ruby/object:RI::Constant 
  comment: 
  name: FinalAttrName
  value: XSD::QName.new(nil, 'final')
- !ruby/object:RI::Constant 
  comment: 
  name: FixedAttrName
  value: XSD::QName.new(nil, 'fixed')
- !ruby/object:RI::Constant 
  comment: 
  name: FormAttrName
  value: XSD::QName.new(nil, 'form')
- !ruby/object:RI::Constant 
  comment: 
  name: IdAttrName
  value: XSD::QName.new(nil, 'id')
- !ruby/object:RI::Constant 
  comment: 
  name: MaxOccursAttrName
  value: XSD::QName.new(nil, 'maxOccurs')
- !ruby/object:RI::Constant 
  comment: 
  name: MinOccursAttrName
  value: XSD::QName.new(nil, 'minOccurs')
- !ruby/object:RI::Constant 
  comment: 
  name: MixedAttrName
  value: XSD::QName.new(nil, 'mixed')
- !ruby/object:RI::Constant 
  comment: 
  name: NameAttrName
  value: XSD::QName.new(nil, 'name')
- !ruby/object:RI::Constant 
  comment: 
  name: NamespaceAttrName
  value: XSD::QName.new(nil, 'namespace')
- !ruby/object:RI::Constant 
  comment: 
  name: NillableAttrName
  value: XSD::QName.new(nil, 'nillable')
- !ruby/object:RI::Constant 
  comment: 
  name: ProcessContentsAttrName
  value: XSD::QName.new(nil, 'processContents')
- !ruby/object:RI::Constant 
  comment: 
  name: RefAttrName
  value: XSD::QName.new(nil, 'ref')
- !ruby/object:RI::Constant 
  comment: 
  name: SchemaLocationAttrName
  value: XSD::QName.new(nil, 'schemaLocation')
- !ruby/object:RI::Constant 
  comment: 
  name: TargetNamespaceAttrName
  value: XSD::QName.new(nil, 'targetNamespace')
- !ruby/object:RI::Constant 
  comment: 
  name: TypeAttrName
  value: XSD::QName.new(nil, 'type')
- !ruby/object:RI::Constant 
  comment: 
  name: UseAttrName
  value: XSD::QName.new(nil, 'use')
- !ruby/object:RI::Constant 
  comment: 
  name: ValueAttrName
  value: XSD::QName.new(nil, 'value')
full_name: WSDL::XMLSchema
includes: []

instance_methods: []

name: XMLSchema
superclass: 
ri/1.8/system/WSDL/XMLSchema/Attribute/directelement%3f-i.yaml000064400000000313150403660730017542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Attribute#directelement?
is_singleton: false
name: directelement?
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/Attribute/refelement-i.yaml000064400000000302150403660730016544 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Attribute#refelement
is_singleton: false
name: refelement
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Attribute/parse_attr-i.yaml000064400000000315150403660730016566 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Attribute#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Attribute/attr_reader_ref-c.yaml000064400000000322150403660730017542 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Attribute::attr_reader_ref
is_singleton: true
name: attr_reader_ref
params: (symbol)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Attribute/parse_element-i.yaml000064400000000317150403660730017247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Attribute#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Attribute/cdesc-Attribute.yaml000064400000002306150403660730017220 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: arytype
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: default
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: fixed
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: form
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: local_simpletype
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: ref
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: use
  rw: W
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: attr_reader_ref
- !ruby/object:RI::MethodSummary 
  name: attr_reader_ref
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Attribute
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: directelement?
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: refelement
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Attribute
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Attribute/new-c.yaml000064400000000264150403660730015210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Attribute::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Attribute/targetnamespace-i.yaml000064400000000314150403660730017564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Attribute#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Content/parse_epilogue-i.yaml000064400000000310150403660730017067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Content#parse_epilogue
is_singleton: false
name: parse_epilogue
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Content/parse_attr-i.yaml000064400000000313150403660730016233 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Content#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Content/each-i.yaml000064400000000313150403660730014767 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: content
comment: 
full_name: WSDL::XMLSchema::Content#each
is_singleton: false
name: each
params: () {|content| ...}
visibility: public
ri/1.8/system/WSDL/XMLSchema/Content/parse_element-i.yaml000064400000000315150403660730016714 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Content#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Content/new-c.yaml000064400000000262150403660730014655 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Content::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Content/targetnamespace-i.yaml000064400000000312150403660730017231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Content#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Content/update_elements-i.yaml000064400000000313150403660730017245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Content#update_elements
is_singleton: false
name: update_elements
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/Content/cdesc-Content.yaml000064400000001657150403660730016346 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: contents
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: elements
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: final
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: mixed
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Content
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: parse_epilogue
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
- !ruby/object:RI::MethodSummary 
  name: update_elements
name: Content
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Content/%3c%3c-i.yaml000064400000000271150403660730014737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Content#<<
is_singleton: false
name: "<<"
params: (content)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexContent/parse_attr-i.yaml000064400000000322150403660730017563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexContent#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexContent/parse_element-i.yaml000064400000000324150403660730020244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexContent#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexContent/cdesc-ComplexContent.yaml000064400000001440150403660730021214 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: base
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: content
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: derivetype
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::ComplexContent
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: basetype
- !ruby/object:RI::MethodSummary 
  name: elementformdefault
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: ComplexContent
superclass: Info
ri/1.8/system/WSDL/XMLSchema/ComplexContent/new-c.yaml000064400000000271150403660730016205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexContent::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexContent/targetnamespace-i.yaml000064400000000321150403660730020561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexContent#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexContent/basetype-i.yaml000064400000000303150403660730017232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexContent#basetype
is_singleton: false
name: basetype
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexContent/elementformdefault-i.yaml000064400000000327150403660730021306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexContent#elementformdefault
is_singleton: false
name: elementformdefault
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Enumeration/parse_attr-i.yaml000064400000000317150403660730017113 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Enumeration#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Enumeration/parse_element-i.yaml000064400000000321150403660730017565 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Enumeration#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Enumeration/new-c.yaml000064400000000266150403660730015535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Enumeration::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Enumeration/cdesc-Enumeration.yaml000064400000000547150403660730020073 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Enumeration
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Enumeration
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Schema/location%3d-i.yaml000064400000000305150403660730015762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#location=
is_singleton: false
name: location=
params: (location)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/parse_attr-i.yaml000064400000000312150403660730016020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/parse_element-i.yaml000064400000000314150403660730016501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/collect_attributes-i.yaml000064400000000317150403660730017554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#collect_attributes
is_singleton: false
name: collect_attributes
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/parse_element-c.yaml000064400000000314150403660730016473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema::parse_element
is_singleton: true
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/location-i.yaml000064400000000273150403660730015472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#location
is_singleton: false
name: location
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/collect_elements-i.yaml000064400000000313150403660730017176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#collect_elements
is_singleton: false
name: collect_elements
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/collect_complextypes-i.yaml000064400000000323150403660730020117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#collect_complextypes
is_singleton: false
name: collect_complextypes
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/new-c.yaml000064400000000261150403660730014442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/collect_simpletypes-i.yaml000064400000000321150403660730017737 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Schema#collect_simpletypes
is_singleton: false
name: collect_simpletypes
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Schema/cdesc-Schema.yaml000064400000002566150403660730015722 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attributeformdefault
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: complextypes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: elementformdefault
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: elements
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: importedschema
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: imports
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: simpletypes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: targetnamespace
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse_element
comment: 
constants: []

full_name: WSDL::XMLSchema::Schema
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: collect_attributes
- !ruby/object:RI::MethodSummary 
  name: collect_complextypes
- !ruby/object:RI::MethodSummary 
  name: collect_elements
- !ruby/object:RI::MethodSummary 
  name: collect_simpletypes
- !ruby/object:RI::MethodSummary 
  name: location
- !ruby/object:RI::MethodSummary 
  name: location=
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Schema
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Import/cdesc-Import.yaml000064400000001132150403660730016032 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: content
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: schemalocation
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Import
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Import
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Import/parse_attr-i.yaml000064400000000312150403660740016073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Import#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Import/parse_element-i.yaml000064400000000314150403660740016554 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Import#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Import/new-c.yaml000064400000000261150403660740014515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Import::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Import/import-i.yaml000064400000000300150403660740015236 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Import#import
is_singleton: false
name: import
params: (location)
visibility: private
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/parse_attr-i.yaml000064400000000325150403660740020304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleRestriction#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/parse_element-i.yaml000064400000000327150403660740020765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleRestriction#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/cdesc-SimpleRestriction.yaml000064400000001526150403660740022454 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: base
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: enumeration
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: length
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: pattern
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::SimpleRestriction
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: check_length
- !ruby/object:RI::MethodSummary 
  name: check_pattern
- !ruby/object:RI::MethodSummary 
  name: check_restriction
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: valid?
name: SimpleRestriction
superclass: Info
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/check_restriction-i.yaml000064400000000336150403660740021644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleRestriction#check_restriction
is_singleton: false
name: check_restriction
params: (value)
visibility: private
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/check_length-i.yaml000064400000000324150403660740020555 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleRestriction#check_length
is_singleton: false
name: check_length
params: (value)
visibility: private
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/new-c.yaml000064400000000274150403660740016726 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleRestriction::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/valid%3f-i.yaml000064400000000307150403660740017535 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleRestriction#valid?
is_singleton: false
name: valid?
params: (value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/SimpleRestriction/check_pattern-i.yaml000064400000000326150403660740020753 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::SimpleRestriction#check_pattern
is_singleton: false
name: check_pattern
params: (value)
visibility: private
ri/1.8/system/WSDL/XMLSchema/Importer/parse-i.yaml000064400000000327150403660750015377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Importer#parse
is_singleton: false
name: parse
params: (content, location, originalroot)
visibility: private
ri/1.8/system/WSDL/XMLSchema/Importer/import-c.yaml000064400000000325150403660750015567 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Importer::import
is_singleton: true
name: import
params: (location, originalroot = nil)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Importer/new-c.yaml000064400000000263150403660750015047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Importer::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Importer/web_client-i.yaml000064400000000302150403660750016371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Importer#web_client
is_singleton: false
name: web_client
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/Importer/cdesc-Importer.yaml000064400000000755150403660750016724 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Importer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: fetch
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: web_client
name: Importer
superclass: Object
ri/1.8/system/WSDL/XMLSchema/Importer/fetch-i.yaml000064400000000300150403660760015346 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Importer#fetch
is_singleton: false
name: fetch
params: (location)
visibility: private
ri/1.8/system/WSDL/XMLSchema/Importer/import-i.yaml000064400000000325150403660770015577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Importer#import
is_singleton: false
name: import
params: (location, originalroot = nil)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/AttributeConstraintError/cdesc-AttributeConstraintError.yaml000064400000000401150403661000026573 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::AttributeConstraintError
includes: []

instance_methods: []

name: AttributeConstraintError
superclass: FormatDecodeError
ri/1.8/system/WSDL/XMLSchema/Parser/FormatDecodeError/cdesc-FormatDecodeError.yaml000064400000000354150403661000023452 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::FormatDecodeError
includes: []

instance_methods: []

name: FormatDecodeError
superclass: ParseError
ri/1.8/system/WSDL/XMLSchema/Parser/decode_tag_end-i.yaml000064400000000320150403661000016602 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#decode_tag_end
is_singleton: false
name: decode_tag_end
params: (ns, node)
visibility: private
ri/1.8/system/WSDL/XMLSchema/Parser/UnknownAttributeError/cdesc-UnknownAttributeError.yaml000064400000000373150403661000025431 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::UnknownAttributeError
includes: []

instance_methods: []

name: UnknownAttributeError
superclass: FormatDecodeError
ri/1.8/system/WSDL/XMLSchema/Parser/parse-i.yaml000064400000000307150403661000015015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#parse
is_singleton: false
name: parse
params: (string_or_readable)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/UnknownElementError/cdesc-UnknownElementError.yaml000064400000000367150403661000024510 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::UnknownElementError
includes: []

instance_methods: []

name: UnknownElementError
superclass: FormatDecodeError
ri/1.8/system/WSDL/XMLSchema/Parser/ElementConstraintError/cdesc-ElementConstraintError.yaml000064400000000375150403661000025661 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::ElementConstraintError
includes: []

instance_methods: []

name: ElementConstraintError
superclass: FormatDecodeError
ri/1.8/system/WSDL/XMLSchema/Parser/cdesc-Parser.yaml000064400000001307150403661010015772 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Parser
includes: 
- !ruby/object:RI::IncludedModule 
  name: XSD
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: characters
- !ruby/object:RI::MethodSummary 
  name: charset
- !ruby/object:RI::MethodSummary 
  name: decode_tag
- !ruby/object:RI::MethodSummary 
  name: decode_tag_end
- !ruby/object:RI::MethodSummary 
  name: decode_text
- !ruby/object:RI::MethodSummary 
  name: end_element
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: start_element
name: Parser
superclass: Object
ri/1.8/system/WSDL/XMLSchema/Parser/new-c.yaml000064400000000271150403661010014467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser::new
is_singleton: true
name: new
params: (opt = {})
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/end_element-i.yaml000064400000000305150403661010016161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#end_element
is_singleton: false
name: end_element
params: (name)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/start_element-i.yaml000064400000000320150403661010016545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#start_element
is_singleton: false
name: start_element
params: (name, attrs)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/ParseError/cdesc-ParseError.yaml000064400000000331150403661010020702 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::ParseError
includes: []

instance_methods: []

name: ParseError
superclass: Error
ri/1.8/system/WSDL/XMLSchema/Parser/charset-i.yaml000064400000000271150403661010015335 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#charset
is_singleton: false
name: charset
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/characters-i.yaml000064400000000303150403661020016020 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#characters
is_singleton: false
name: characters
params: (text)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/decode_text-i.yaml000064400000000312150403661020016170 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#decode_text
is_singleton: false
name: decode_text
params: (ns, text)
visibility: private
ri/1.8/system/WSDL/XMLSchema/Parser/UnexpectedElementError/cdesc-UnexpectedElementError.yaml000064400000000375150403661020025623 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::UnexpectedElementError
includes: []

instance_methods: []

name: UnexpectedElementError
superclass: FormatDecodeError
ri/1.8/system/WSDL/XMLSchema/Parser/decode_tag-i.yaml000064400000000327150403661020015765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser#decode_tag
is_singleton: false
name: decode_tag
params: (ns, name, attrs, parent)
visibility: private
ri/1.8/system/WSDL/XMLSchema/Parser/ParseFrame/new-c.yaml000064400000000313150403661020016512 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Parser::ParseFrame::new
is_singleton: true
name: new
params: (ns, name, node)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Parser/ParseFrame/cdesc-ParseFrame.yaml000064400000000676150403661030020622 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: node
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: ns
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Parser::ParseFrame
includes: []

instance_methods: []

name: ParseFrame
superclass: Object
ri/1.8/system/WSDL/XMLSchema/ComplexType/check_type-i.yaml000064400000000304150403661030017036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#check_type
is_singleton: false
name: check_type
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/find_element_by_name-i.yaml000064400000000334150403661030021046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#find_element_by_name
is_singleton: false
name: find_element_by_name
params: (name)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/parse_attr-i.yaml000064400000000317150403661030017070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/child_defined_complextype-i.yaml000064400000000346150403661040022121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#child_defined_complextype
is_singleton: false
name: child_defined_complextype
params: (name)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/sequence_elements%3d-i.yaml000064400000000334150403661040020724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#sequence_elements=
is_singleton: false
name: sequence_elements=
params: (elements)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/parse_element-i.yaml000064400000000321150403661040017543 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/child_type-i.yaml000064400000000316150403661040017050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#child_type
is_singleton: false
name: child_type
params: (name = nil)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/compoundtype-i.yaml000064400000000310150403661050017445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#compoundtype
is_singleton: false
name: compoundtype
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/cdesc-ComplexType.yaml000064400000003542150403661050020033 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: attributes
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: complexcontent
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: content
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: final
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: mixed
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: simplecontent
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: AnyAsElement
  value: Element.new(XSD::QName.new(nil, 'any'), XSD::AnyTypeName)
full_name: WSDL::XMLSchema::ComplexType
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: all_elements=
- !ruby/object:RI::MethodSummary 
  name: check_array_content
- !ruby/object:RI::MethodSummary 
  name: check_type
- !ruby/object:RI::MethodSummary 
  name: child_defined_complextype
- !ruby/object:RI::MethodSummary 
  name: child_type
- !ruby/object:RI::MethodSummary 
  name: compoundtype
- !ruby/object:RI::MethodSummary 
  name: content_arytype
- !ruby/object:RI::MethodSummary 
  name: each_element
- !ruby/object:RI::MethodSummary 
  name: element_simpletype
- !ruby/object:RI::MethodSummary 
  name: elementformdefault
- !ruby/object:RI::MethodSummary 
  name: find_aryelement
- !ruby/object:RI::MethodSummary 
  name: find_arytype
- !ruby/object:RI::MethodSummary 
  name: find_element
- !ruby/object:RI::MethodSummary 
  name: find_element_by_name
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: sequence_elements=
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: ComplexType
superclass: Info
ri/1.8/system/WSDL/XMLSchema/ComplexType/new-c.yaml000064400000000300150403661050015501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType::new
is_singleton: true
name: new
params: (name = nil)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/targetnamespace-i.yaml000064400000000316150403661050020070 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/find_element-i.yaml000064400000000314150403661050017354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#find_element
is_singleton: false
name: find_element
params: (name)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/element_simpletype-i.yaml000064400000000334150403661050020631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#element_simpletype
is_singleton: false
name: element_simpletype
params: (element)
visibility: private
ri/1.8/system/WSDL/XMLSchema/ComplexType/find_aryelement-i.yaml000064400000000316150403661050020072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#find_aryelement
is_singleton: false
name: find_aryelement
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/content_arytype-i.yaml000064400000000317150403661050020155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#content_arytype
is_singleton: false
name: content_arytype
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/ComplexType/all_elements%3d-i.yaml000064400000000322150403661050017662 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#all_elements=
is_singleton: false
name: all_elements=
params: (elements)
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/each_element-i.yaml000064400000000353150403661050017337 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (AnyAsElement)
comment: 
full_name: WSDL::XMLSchema::ComplexType#each_element
is_singleton: false
name: each_element
params: () {|AnyAsElement| ...}
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/elementformdefault-i.yaml000064400000000324150403661050020606 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#elementformdefault
is_singleton: false
name: elementformdefault
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/ComplexType/check_array_content-i.yaml000064400000000336150403661050020734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#check_array_content
is_singleton: false
name: check_array_content
params: (content)
visibility: private
ri/1.8/system/WSDL/XMLSchema/ComplexType/find_arytype-i.yaml000064400000000310150403661050017414 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::ComplexType#find_arytype
is_singleton: false
name: find_arytype
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Include/parse_attr-i.yaml000064400000000313150403661050016200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Include#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Include/parse_element-i.yaml000064400000000315150403661050016661 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Include#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Include/new-c.yaml000064400000000262150403661050014622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Include::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Include/cdesc-Include.yaml000064400000001030150403661050016245 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: content
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: schemalocation
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Include
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Include
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Include/import-i.yaml000064400000000301150403661050015343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Include#import
is_singleton: false
name: import
params: (location)
visibility: private
ri/1.8/system/WSDL/XMLSchema/Element/directelement%3f-i.yaml000064400000000311150403661050017162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#directelement?
is_singleton: false
name: directelement?
params: ()
visibility: private
ri/1.8/system/WSDL/XMLSchema/Element/refelement-i.yaml000064400000000300150403661050016164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#refelement
is_singleton: false
name: refelement
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/elementform-i.yaml000064400000000302150403661050016355 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#elementform
is_singleton: false
name: elementform
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/parse_attr-i.yaml000064400000000313150403661060016207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/attr_reader_ref-c.yaml000064400000000320150403661060017163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element::attr_reader_ref
is_singleton: true
name: attr_reader_ref
params: (symbol)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/parse_element-i.yaml000064400000000315150403661060016670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/cdesc-Element.yaml000064400000002773150403661060016301 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: constraint
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: form
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: local_complextype
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: local_simpletype
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: maxoccurs
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: minoccurs
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: nillable
  rw: W
- !ruby/object:RI::Attribute 
  comment: 
  name: ref
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: W
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: attr_reader_ref
- !ruby/object:RI::MethodSummary 
  name: attr_reader_ref
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Element
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: attributes
- !ruby/object:RI::MethodSummary 
  name: directelement?
- !ruby/object:RI::MethodSummary 
  name: elementform
- !ruby/object:RI::MethodSummary 
  name: elementformdefault
- !ruby/object:RI::MethodSummary 
  name: map_as_array?
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: refelement
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Element
superclass: Info
ri/1.8/system/WSDL/XMLSchema/Element/new-c.yaml000064400000000310150403661060014623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element::new
is_singleton: true
name: new
params: (name = nil, type = nil)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/targetnamespace-i.yaml000064400000000312150403661060017205 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/map_as_array%3f-i.yaml000064400000000306150403661070017002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#map_as_array?
is_singleton: false
name: map_as_array?
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/attributes-i.yaml000064400000000300150403661070016226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#attributes
is_singleton: false
name: attributes
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Element/elementformdefault-i.yaml000064400000000320150403661070017724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Element#elementformdefault
is_singleton: false
name: elementformdefault
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/All/parse_attr-i.yaml000064400000000307150403661070015332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::All#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/All/parse_element-i.yaml000064400000000311150403661070016004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::All#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/All/new-c.yaml000064400000000256150403661070013754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::All::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/All/targetnamespace-i.yaml000064400000000306150403661070016330 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::All#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/All/%3c%3c-i.yaml000064400000000265150403661070014036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::All#<<
is_singleton: false
name: "<<"
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/All/cdesc-All.yaml000064400000001305150403661070014526 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: elements
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: maxoccurs
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: minoccurs
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::All
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: elementformdefault
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: All
superclass: Info
ri/1.8/system/WSDL/XMLSchema/All/elementformdefault-i.yaml000064400000000314150403661100017040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::All#elementformdefault
is_singleton: false
name: elementformdefault
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Unique/parse_attr-i.yaml000064400000000312150403661100016056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Unique#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Unique/parse_element-i.yaml000064400000000314150403661100016537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Unique#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/XMLSchema/Unique/new-c.yaml000064400000000261150403661100014500 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::XMLSchema::Unique::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/XMLSchema/Unique/cdesc-Unique.yaml000064400000000535150403661100016020 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::XMLSchema::Unique
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Unique
superclass: Info
ri/1.8/system/WSDL/Error/cdesc-Error.yaml000064400000000304150403661100013677 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Error
includes: []

instance_methods: []

name: Error
superclass: StandardError
ri/1.8/system/WSDL/Operation/inputparts-i.yaml000064400000000267150403661100015045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#inputparts
is_singleton: false
name: inputparts
params: ()
visibility: public
ri/1.8/system/WSDL/Operation/inputname-i.yaml000064400000000265150403661100014632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#inputname
is_singleton: false
name: inputname
params: ()
visibility: public
ri/1.8/system/WSDL/Operation/parse_attr-i.yaml000064400000000302150403661100014766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Operation/parse_element-i.yaml000064400000000304150403661100015447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Operation/new-c.yaml000064400000000251150403661100013410 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Operation/targetnamespace-i.yaml000064400000000301150403661100015764 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/Operation/NameInfo/new-c.yaml000064400000000316150403661110015107 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation::NameInfo::new
is_singleton: true
name: new
params: (op_name, optype_name, parts)
visibility: public
ri/1.8/system/WSDL/Operation/NameInfo/cdesc-NameInfo.yaml000064400000000676150403661110016662 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: op_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: optype_name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: parts
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Operation::NameInfo
includes: []

instance_methods: []

name: NameInfo
superclass: Object
ri/1.8/system/WSDL/Operation/input_info-i.yaml000064400000000267150403661110015007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#input_info
is_singleton: false
name: input_info
params: ()
visibility: public
ri/1.8/system/WSDL/Operation/sort_parts-i.yaml000064400000000275150403661110015034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#sort_parts
is_singleton: false
name: sort_parts
params: (parts)
visibility: private
ri/1.8/system/WSDL/Operation/cdesc-Operation.yaml000064400000002214150403661110015420 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: fault
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: input
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: output
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: parameter_order
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Operation
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: input_info
- !ruby/object:RI::MethodSummary 
  name: inputname
- !ruby/object:RI::MethodSummary 
  name: inputparts
- !ruby/object:RI::MethodSummary 
  name: output_info
- !ruby/object:RI::MethodSummary 
  name: outputname
- !ruby/object:RI::MethodSummary 
  name: outputparts
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: sort_parts
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Operation
superclass: Info
ri/1.8/system/WSDL/Operation/outputname-i.yaml000064400000000267150403661110015036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#outputname
is_singleton: false
name: outputname
params: ()
visibility: public
ri/1.8/system/WSDL/Operation/outputparts-i.yaml000064400000000271150403661110015242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#outputparts
is_singleton: false
name: outputparts
params: ()
visibility: public
ri/1.8/system/WSDL/Operation/output_info-i.yaml000064400000000271150403661110015203 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Operation#output_info
is_singleton: false
name: output_info
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/parse_attr-i.yaml000064400000000311150403661110016262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/OperationBinding/parse_element-i.yaml000064400000000313150403661110016743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/OperationBinding/soapoperation_style-i.yaml000064400000000320150403661110020221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#soapoperation_style
is_singleton: false
name: soapoperation_style
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/find_operation-i.yaml000064400000000306150403661110017122 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#find_operation
is_singleton: false
name: find_operation
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/new-c.yaml000064400000000260150403661110014704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/targetnamespace-i.yaml000064400000000310150403661110017260 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/soapaction-i.yaml000064400000000276150403661110016270 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#soapaction
is_singleton: false
name: soapaction
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/soapoperation_name-i.yaml000064400000000316150403661110020006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#soapoperation_name
is_singleton: false
name: soapoperation_name
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/porttype-i.yaml000064400000000272150403661110016012 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::OperationBinding#porttype
is_singleton: false
name: porttype
params: ()
visibility: public
ri/1.8/system/WSDL/OperationBinding/cdesc-OperationBinding.yaml000064400000002001150403661110020200 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: fault
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: input
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: output
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapoperation
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::OperationBinding
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find_operation
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: porttype
- !ruby/object:RI::MethodSummary 
  name: soapaction
- !ruby/object:RI::MethodSummary 
  name: soapoperation_name
- !ruby/object:RI::MethodSummary 
  name: soapoperation_style
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: OperationBinding
superclass: Info
ri/1.8/system/WSDL/cdesc-WSDL.yaml000064400000010044150403661110012271 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: This program is copyrighted free software by NAKAMURA, Hiroshi. 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.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ArrayTypeAttrName
  value: XSD::QName.new(Namespace, 'arrayType')
- !ruby/object:RI::Constant 
  comment: 
  name: BindingName
  value: XSD::QName.new(Namespace, 'binding')
- !ruby/object:RI::Constant 
  comment: 
  name: DefinitionsName
  value: XSD::QName.new(Namespace, 'definitions')
- !ruby/object:RI::Constant 
  comment: 
  name: DocumentationName
  value: XSD::QName.new(Namespace, 'documentation')
- !ruby/object:RI::Constant 
  comment: 
  name: FaultName
  value: XSD::QName.new(Namespace, 'fault')
- !ruby/object:RI::Constant 
  comment: 
  name: ImportName
  value: XSD::QName.new(Namespace, 'import')
- !ruby/object:RI::Constant 
  comment: 
  name: InputName
  value: XSD::QName.new(Namespace, 'input')
- !ruby/object:RI::Constant 
  comment: 
  name: MessageName
  value: XSD::QName.new(Namespace, 'message')
- !ruby/object:RI::Constant 
  comment: 
  name: OperationName
  value: XSD::QName.new(Namespace, 'operation')
- !ruby/object:RI::Constant 
  comment: 
  name: OutputName
  value: XSD::QName.new(Namespace, 'output')
- !ruby/object:RI::Constant 
  comment: 
  name: PartName
  value: XSD::QName.new(Namespace, 'part')
- !ruby/object:RI::Constant 
  comment: 
  name: PortName
  value: XSD::QName.new(Namespace, 'port')
- !ruby/object:RI::Constant 
  comment: 
  name: PortTypeName
  value: XSD::QName.new(Namespace, 'portType')
- !ruby/object:RI::Constant 
  comment: 
  name: ServiceName
  value: XSD::QName.new(Namespace, 'service')
- !ruby/object:RI::Constant 
  comment: 
  name: TypesName
  value: XSD::QName.new(Namespace, 'types')
- !ruby/object:RI::Constant 
  comment: 
  name: SchemaName
  value: XSD::QName.new(XSD::Namespace, 'schema')
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPAddressName
  value: XSD::QName.new(SOAPBindingNamespace, 'address')
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPBindingName
  value: XSD::QName.new(SOAPBindingNamespace, 'binding')
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPHeaderName
  value: XSD::QName.new(SOAPBindingNamespace, 'header')
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPBodyName
  value: XSD::QName.new(SOAPBindingNamespace, 'body')
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPFaultName
  value: XSD::QName.new(SOAPBindingNamespace, 'fault')
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPOperationName
  value: XSD::QName.new(SOAPBindingNamespace, 'operation')
- !ruby/object:RI::Constant 
  comment: 
  name: BindingAttrName
  value: XSD::QName.new(nil, 'binding')
- !ruby/object:RI::Constant 
  comment: 
  name: ElementAttrName
  value: XSD::QName.new(nil, 'element')
- !ruby/object:RI::Constant 
  comment: 
  name: LocationAttrName
  value: XSD::QName.new(nil, 'location')
- !ruby/object:RI::Constant 
  comment: 
  name: MessageAttrName
  value: XSD::QName.new(nil, 'message')
- !ruby/object:RI::Constant 
  comment: 
  name: NameAttrName
  value: XSD::QName.new(nil, 'name')
- !ruby/object:RI::Constant 
  comment: 
  name: NamespaceAttrName
  value: XSD::QName.new(nil, 'namespace')
- !ruby/object:RI::Constant 
  comment: 
  name: ParameterOrderAttrName
  value: XSD::QName.new(nil, 'parameterOrder')
- !ruby/object:RI::Constant 
  comment: 
  name: TargetNamespaceAttrName
  value: XSD::QName.new(nil, 'targetNamespace')
- !ruby/object:RI::Constant 
  comment: 
  name: TypeAttrName
  value: XSD::QName.new(nil, 'type')
- !ruby/object:RI::Constant 
  comment: 
  name: Version
  value: "'0.0.2'"
- !ruby/object:RI::Constant 
  comment: 
  name: Namespace
  value: "'http://schemas.xmlsoap.org/wsdl/'"
- !ruby/object:RI::Constant 
  comment: 
  name: SOAPBindingNamespace
  value: "'http://schemas.xmlsoap.org/wsdl/soap/'"
full_name: WSDL
includes: []

instance_methods: []

name: WSDL
superclass: 
ri/1.8/system/WSDL/Definitions/porttypes-i.yaml000064400000000267150403661110015221 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#porttypes
is_singleton: false
name: porttypes
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/binding-i.yaml000064400000000267150403661110014562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#binding
is_singleton: false
name: binding
params: (name)
visibility: public
ri/1.8/system/WSDL/Definitions/parse_attr-i.yaml000064400000000304150403661110015304 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Definitions/porttype_binding-i.yaml000064400000000311150403661110016516 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#porttype_binding
is_singleton: false
name: porttype_binding
params: (name)
visibility: public
ri/1.8/system/WSDL/Definitions/bindings-i.yaml000064400000000265150403661110014743 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#bindings
is_singleton: false
name: bindings
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/array_complextype-c.yaml000064400000000307150403661110016704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions::array_complextype
is_singleton: true
name: array_complextype
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/services-i.yaml000064400000000265150403661110014771 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#services
is_singleton: false
name: services
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/parse_element-i.yaml000064400000000306150403661120015766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Definitions/collect_attributes-i.yaml000064400000000311150403661120017032 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#collect_attributes
is_singleton: false
name: collect_attributes
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/parse_element-c.yaml000064400000000306150403661130015761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions::parse_element
is_singleton: true
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Definitions/service-i.yaml000064400000000267150403661130014612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#service
is_singleton: false
name: service
params: (name)
visibility: public
ri/1.8/system/WSDL/Definitions/collect_elements-i.yaml000064400000000305150403661130016464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#collect_elements
is_singleton: false
name: collect_elements
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/collect_complextypes-i.yaml000064400000000315150403661140017406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#collect_complextypes
is_singleton: false
name: collect_complextypes
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/inspect-i.yaml000064400000000263150403661140014614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/fault_complextype-c.yaml000064400000000307150403661140016704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions::fault_complextype
is_singleton: true
name: fault_complextype
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/new-c.yaml000064400000000253150403661140013731 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/cdesc-Definitions.yaml000064400000004301150403661140016250 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: importedschema
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: imports
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: location
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: targetnamespace
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: array_complextype
- !ruby/object:RI::MethodSummary 
  name: exception_complextype
- !ruby/object:RI::MethodSummary 
  name: fault_complextype
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: soap_rpc_complextypes
comment: 
constants: []

full_name: WSDL::Definitions
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_type
- !ruby/object:RI::MethodSummary 
  name: binding
- !ruby/object:RI::MethodSummary 
  name: bindings
- !ruby/object:RI::MethodSummary 
  name: collect_attributes
- !ruby/object:RI::MethodSummary 
  name: collect_complextypes
- !ruby/object:RI::MethodSummary 
  name: collect_elements
- !ruby/object:RI::MethodSummary 
  name: collect_fault_messages
- !ruby/object:RI::MethodSummary 
  name: collect_faulttypes
- !ruby/object:RI::MethodSummary 
  name: collect_simpletypes
- !ruby/object:RI::MethodSummary 
  name: elements_from_message
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: message
- !ruby/object:RI::MethodSummary 
  name: messages
- !ruby/object:RI::MethodSummary 
  name: op_bind_rpc?
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: porttype
- !ruby/object:RI::MethodSummary 
  name: porttype_binding
- !ruby/object:RI::MethodSummary 
  name: porttypes
- !ruby/object:RI::MethodSummary 
  name: rpc_operation_complextypes
- !ruby/object:RI::MethodSummary 
  name: service
- !ruby/object:RI::MethodSummary 
  name: services
- !ruby/object:RI::MethodSummary 
  name: soap_rpc_complextypes
- !ruby/object:RI::MethodSummary 
  name: targetnamespace=
name: Definitions
superclass: Info
ri/1.8/system/WSDL/Definitions/exception_complextype-c.yaml000064400000000317150403661140017570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions::exception_complextype
is_singleton: true
name: exception_complextype
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/add_type-i.yaml000064400000000413150403661140014735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "ToDo: simpletype must be accepted..."
full_name: WSDL::Definitions#add_type
is_singleton: false
name: add_type
params: (complextype)
visibility: public
ri/1.8/system/WSDL/Definitions/collect_faulttypes-i.yaml000064400000000311150403661140017046 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#collect_faulttypes
is_singleton: false
name: collect_faulttypes
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/soap_rpc_complextypes-c.yaml000064400000000317150403661140017563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions::soap_rpc_complextypes
is_singleton: true
name: soap_rpc_complextypes
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/soap_rpc_complextypes-i.yaml000064400000000326150403661140017571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#soap_rpc_complextypes
is_singleton: false
name: soap_rpc_complextypes
params: (binding)
visibility: public
ri/1.8/system/WSDL/Definitions/message-i.yaml000064400000000267150403661140014577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#message
is_singleton: false
name: message
params: (name)
visibility: public
ri/1.8/system/WSDL/Definitions/collect_simpletypes-i.yaml000064400000000313150403661140017226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#collect_simpletypes
is_singleton: false
name: collect_simpletypes
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/op_bind_rpc%3f-i.yaml000064400000000305150403661140015720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#op_bind_rpc?
is_singleton: false
name: op_bind_rpc?
params: (op_bind)
visibility: private
ri/1.8/system/WSDL/Definitions/rpc_operation_complextypes-i.yaml000064400000000341150403661140020624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#rpc_operation_complextypes
is_singleton: false
name: rpc_operation_complextypes
params: (binding)
visibility: private
ri/1.8/system/WSDL/Definitions/elements_from_message-i.yaml000064400000000327150403661140017513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#elements_from_message
is_singleton: false
name: elements_from_message
params: (message)
visibility: private
ri/1.8/system/WSDL/Definitions/targetnamespace%3d-i.yaml000064400000000324150403661140016604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#targetnamespace=
is_singleton: false
name: targetnamespace=
params: (targetnamespace)
visibility: public
ri/1.8/system/WSDL/Definitions/porttype-i.yaml000064400000000271150403661140015034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#porttype
is_singleton: false
name: porttype
params: (name)
visibility: public
ri/1.8/system/WSDL/Definitions/messages-i.yaml000064400000000265150403661140014760 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#messages
is_singleton: false
name: messages
params: ()
visibility: public
ri/1.8/system/WSDL/Definitions/collect_fault_messages-i.yaml000064400000000322150403661140017652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Definitions#collect_fault_messages
is_singleton: false
name: collect_fault_messages
params: ()
visibility: private
ri/1.8/system/WSDL/Types/cdesc-Types.yaml000064400000000617150403661140013740 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: schemas
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Types
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Types
superclass: Info
ri/1.8/system/WSDL/Types/parse_attr-i.yaml000064400000000276150403661140014150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Types#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Types/parse_element-i.yaml000064400000000300150403661140014613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Types#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Types/new-c.yaml000064400000000245150403661140012563 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Types::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Import/cdesc-Import.yaml000064400000001111150403661150014243 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: content
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: location
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: namespace
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Import
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: import
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
name: Import
superclass: Info
ri/1.8/system/WSDL/Import/parse_attr-i.yaml000064400000000277150403661150014320 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Import#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Import/parse_element-i.yaml000064400000000301150403661150014763 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Import#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Import/new-c.yaml000064400000000246150403661150012733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Import::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Import/import-i.yaml000064400000000265150403661160013464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Import#import
is_singleton: false
name: import
params: (location)
visibility: private
ri/1.8/system/WSDL/Param/parse_attr-i.yaml000064400000000276150403661160014106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Param#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Param/parse_element-i.yaml000064400000000300150403661170014552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Param#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Param/find_message-i.yaml000064400000000267150403661170014367 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Param#find_message
is_singleton: false
name: find_message
params: ()
visibility: public
ri/1.8/system/WSDL/Param/new-c.yaml000064400000000245150403661170012522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Param::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Param/targetnamespace-i.yaml000064400000000275150403661170015105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Param#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/Param/cdesc-Param.yaml000064400000001502150403661170013625 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: message
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapbody
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapfault
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapheader
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Param
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find_message
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: soapbody_use
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Param
superclass: Info
ri/1.8/system/WSDL/Param/soapbody_use-i.yaml000064400000000267150403661170014437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Param#soapbody_use
is_singleton: false
name: soapbody_use
params: ()
visibility: public
ri/1.8/system/WSDL/Binding/parse_attr-i.yaml000064400000000300150403661170014405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Binding#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Binding/parse_element-i.yaml000064400000000302150403661170015066 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Binding#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Binding/new-c.yaml000064400000000247150403661170013036 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Binding::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Binding/targetnamespace-i.yaml000064400000000277150403661170015421 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Binding#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/Binding/cdesc-Binding.yaml000064400000001224150403661170014452 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: operations
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soapbinding
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Binding
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Binding
superclass: Info
ri/1.8/system/WSDL/Importer/parse-i.yaml000064400000000314150403661170013607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Importer#parse
is_singleton: false
name: parse
params: (content, location, originalroot)
visibility: private
ri/1.8/system/WSDL/Importer/import-c.yaml000064400000000312150403661170013777 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Importer::import
is_singleton: true
name: import
params: (location, originalroot = nil)
visibility: public
ri/1.8/system/WSDL/Importer/cdesc-Importer.yaml000064400000000461150403661170015132 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: import
comment: 
constants: []

full_name: WSDL::Importer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: Importer
superclass: WSDL::XMLSchema::Importer
ri/1.8/system/WSDL/Port/outputoperation_map-i.yaml000064400000000304150403661170015735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port#outputoperation_map
is_singleton: false
name: outputoperation_map
params: ()
visibility: public
ri/1.8/system/WSDL/Port/parse_attr-i.yaml000064400000000275150403661170013772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Port/parse_element-i.yaml000064400000000277150403661170014453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Port/new-c.yaml000064400000000244150403661170012405 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Port/targetnamespace-i.yaml000064400000000274150403661170014770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/Port/find_binding-i.yaml000064400000000266150403661170014240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port#find_binding
is_singleton: false
name: find_binding
params: ()
visibility: public
ri/1.8/system/WSDL/Port/cdesc-Port.yaml000064400000001462150403661170013402 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: binding
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: soap_address
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Port
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find_binding
- !ruby/object:RI::MethodSummary 
  name: inputoperation_map
- !ruby/object:RI::MethodSummary 
  name: outputoperation_map
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: porttype
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Port
superclass: Info
ri/1.8/system/WSDL/Port/inputoperation_map-i.yaml000064400000000302150403661170015532 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port#inputoperation_map
is_singleton: false
name: inputoperation_map
params: ()
visibility: public
ri/1.8/system/WSDL/Port/porttype-i.yaml000064400000000256150403661170013513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Port#porttype
is_singleton: false
name: porttype
params: ()
visibility: public
ri/1.8/system/WSDL/PortType/parse_attr-i.yaml000064400000000301150403661170014622 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::PortType#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/PortType/parse_element-i.yaml000064400000000303150403661170015303 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::PortType#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/PortType/new-c.yaml000064400000000250150403661170013244 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::PortType::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/PortType/targetnamespace-i.yaml000064400000000300150403661170015620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::PortType#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/PortType/find_binding-i.yaml000064400000000272150403661170015077 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::PortType#find_binding
is_singleton: false
name: find_binding
params: ()
visibility: public
ri/1.8/system/WSDL/PortType/cdesc-PortType.yaml000064400000001174150403661170015106 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: operations
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::PortType
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find_binding
- !ruby/object:RI::MethodSummary 
  name: locations
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: PortType
superclass: Info
ri/1.8/system/WSDL/PortType/locations-i.yaml000064400000000264150403661170014461 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::PortType#locations
is_singleton: false
name: locations
params: ()
visibility: public
ri/1.8/system/WSDL/Parser/AttributeConstraintError/cdesc-AttributeConstraintError.yaml000064400000000366150403661170025034 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Parser::AttributeConstraintError
includes: []

instance_methods: []

name: AttributeConstraintError
superclass: FormatDecodeError
ri/1.8/system/WSDL/Parser/FormatDecodeError/cdesc-FormatDecodeError.yaml000064400000000341150403661170021675 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Parser::FormatDecodeError
includes: []

instance_methods: []

name: FormatDecodeError
superclass: ParseError
ri/1.8/system/WSDL/Parser/decode_tag_end-i.yaml000064400000000305150403661170015034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#decode_tag_end
is_singleton: false
name: decode_tag_end
params: (ns, node)
visibility: private
ri/1.8/system/WSDL/Parser/UnknownAttributeError/cdesc-UnknownAttributeError.yaml000064400000000360150403661170023654 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Parser::UnknownAttributeError
includes: []

instance_methods: []

name: UnknownAttributeError
superclass: FormatDecodeError
ri/1.8/system/WSDL/Parser/parse-i.yaml000064400000000274150403661170013247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#parse
is_singleton: false
name: parse
params: (string_or_readable)
visibility: public
ri/1.8/system/WSDL/Parser/UnknownElementError/cdesc-UnknownElementError.yaml000064400000000354150403661170022733 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Parser::UnknownElementError
includes: []

instance_methods: []

name: UnknownElementError
superclass: FormatDecodeError
ri/1.8/system/WSDL/Parser/ElementConstraintError/cdesc-ElementConstraintError.yaml000064400000000362150403661170024104 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Parser::ElementConstraintError
includes: []

instance_methods: []

name: ElementConstraintError
superclass: FormatDecodeError
ri/1.8/system/WSDL/Parser/cdesc-Parser.yaml000064400000001275150403661170014224 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Parser
includes: 
- !ruby/object:RI::IncludedModule 
  name: WSDL
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: characters
- !ruby/object:RI::MethodSummary 
  name: charset
- !ruby/object:RI::MethodSummary 
  name: decode_tag
- !ruby/object:RI::MethodSummary 
  name: decode_tag_end
- !ruby/object:RI::MethodSummary 
  name: decode_text
- !ruby/object:RI::MethodSummary 
  name: end_element
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: start_element
name: Parser
superclass: Object
ri/1.8/system/WSDL/Parser/new-c.yaml000064400000000256150403661170012720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser::new
is_singleton: true
name: new
params: (opt = {})
visibility: public
ri/1.8/system/WSDL/Parser/end_element-i.yaml000064400000000272150403661170014412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#end_element
is_singleton: false
name: end_element
params: (name)
visibility: public
ri/1.8/system/WSDL/Parser/start_element-i.yaml000064400000000305150403661170014776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#start_element
is_singleton: false
name: start_element
params: (name, attrs)
visibility: public
ri/1.8/system/WSDL/Parser/ParseError/cdesc-ParseError.yaml000064400000000316150403661170017133 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Parser::ParseError
includes: []

instance_methods: []

name: ParseError
superclass: Error
ri/1.8/system/WSDL/Parser/charset-i.yaml000064400000000256150403661170013566 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#charset
is_singleton: false
name: charset
params: ()
visibility: public
ri/1.8/system/WSDL/Parser/characters-i.yaml000064400000000270150403661170014250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#characters
is_singleton: false
name: characters
params: (text)
visibility: public
ri/1.8/system/WSDL/Parser/decode_text-i.yaml000064400000000277150403661170014427 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#decode_text
is_singleton: false
name: decode_text
params: (ns, text)
visibility: private
ri/1.8/system/WSDL/Parser/UnexpectedElementError/cdesc-UnexpectedElementError.yaml000064400000000362150403661170024044 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WSDL::Parser::UnexpectedElementError
includes: []

instance_methods: []

name: UnexpectedElementError
superclass: FormatDecodeError
ri/1.8/system/WSDL/Parser/decode_tag-i.yaml000064400000000314150403661170014206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser#decode_tag
is_singleton: false
name: decode_tag
params: (ns, name, attrs, parent)
visibility: private
ri/1.8/system/WSDL/Parser/ParseFrame/new-c.yaml000064400000000300150403661170014733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Parser::ParseFrame::new
is_singleton: true
name: new
params: (ns, name, node)
visibility: public
ri/1.8/system/WSDL/Parser/ParseFrame/cdesc-ParseFrame.yaml000064400000000663150403661170017042 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: node
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: ns
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Parser::ParseFrame
includes: []

instance_methods: []

name: ParseFrame
superclass: Object
ri/1.8/system/WSDL/Message/parse_attr-i.yaml000064400000000300150403661170014417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Message#parse_attr
is_singleton: false
name: parse_attr
params: (attr, value)
visibility: public
ri/1.8/system/WSDL/Message/parse_element-i.yaml000064400000000302150403661200015072 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Message#parse_element
is_singleton: false
name: parse_element
params: (element)
visibility: public
ri/1.8/system/WSDL/Message/new-c.yaml000064400000000247150403661200013042 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Message::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/WSDL/Message/targetnamespace-i.yaml000064400000000277150403661200015425 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: WSDL::Message#targetnamespace
is_singleton: false
name: targetnamespace
params: ()
visibility: public
ri/1.8/system/WSDL/Message/cdesc-Message.yaml000064400000001012150403661200014463 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: name
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: parts
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: WSDL::Message
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse_attr
- !ruby/object:RI::MethodSummary 
  name: parse_element
- !ruby/object:RI::MethodSummary 
  name: targetnamespace
name: Message
superclass: Info
ri/1.8/system/XML/cdesc-XML.yaml000064400000000255150403661200012052 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XML
includes: []

instance_methods: []

name: XML
superclass: 
ri/1.8/system/XML/Parser/cdesc-Parser.yaml000064400000000416150403661200014101 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: Error
  value: "::XMLParserError"
full_name: XML::Parser
includes: []

instance_methods: []

name: Parser
superclass: Object
ri/1.8/system/Errno/ECONNABORTED/cdesc-ECONNABORTED.yaml000064400000000325150403661200015543 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Errno::ECONNABORTED
includes: []

instance_methods: []

name: ECONNABORTED
superclass: SystemCallError
ri/1.8/system/Errno/EPROTO/cdesc-EPROTO.yaml000064400000000311150403661200014050 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Errno::EPROTO
includes: []

instance_methods: []

name: EPROTO
superclass: SystemCallError
ri/1.8/system/Errno/cdesc-Errno.yaml000064400000001055150403661200013123 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: compat.rb -- cross platform compatibility
- !ruby/struct:SM::Flow::P 
  body: "Author: IPR -- Internet Programming with Ruby -- writers Copyright (c) 2002 GOTOU Yuuzou Copyright (c) 2002 Internet Programming with Ruby writers. All rights reserved."
- !ruby/struct:SM::Flow::P 
  body: "$IPR: compat.rb,v 1.6 2002/10/01 17:16:32 gotoyuzo Exp $"
constants: []

full_name: Errno
includes: []

instance_methods: []

name: Errno
superclass: 
ri/1.8/system/Errno/ECONNRESET/cdesc-ECONNRESET.yaml000064400000000321150403661200015143 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Errno::ECONNRESET
includes: []

instance_methods: []

name: ECONNRESET
superclass: SystemCallError
ri/1.8/system/TSortHash/cdesc-TSortHash.yaml000064400000000275150403661200014512 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: TSortHash
includes: []

instance_methods: []

name: TSortHash
superclass: Hash
ri/1.8/system/RiDisplay/append_features-c.yaml000064400000000310150403661200015150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RiDisplay::append_features
is_singleton: true
name: append_features
params: (display_class)
visibility: public
ri/1.8/system/RiDisplay/new-c.yaml000064400000000250150403661200012577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: RiDisplay::new
is_singleton: true
name: new
params: (*args)
visibility: public
ri/1.8/system/RiDisplay/cdesc-RiDisplay.yaml000064400000001620150403661200014547 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: append_features
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: This is a kind of 'flag' module. If you want to write your own 'ri' display module (perhaps because you'r writing an IDE or somesuch beast), you simply write a class which implements the various 'display' methods in 'DefaultDisplay', and include the 'RiDisplay' module in that class.
- !ruby/struct:SM::Flow::P 
  body: To access your class from the command line, you can do
- !ruby/struct:SM::Flow::VERB 
  body: "   ruby -r &lt;your source file&gt;  ../ri ....\n"
- !ruby/struct:SM::Flow::P 
  body: If folks <em>really</em> want to do this from the command line, I'll build an option in
constants: []

full_name: RiDisplay
includes: []

instance_methods: []

name: RiDisplay
superclass: 
ri/1.8/system/Timeout/Error/cdesc-Error.yaml000064400000000433150403661200014560 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raised by Timeout#timeout when the block times out.
constants: []

full_name: Timeout::Error
includes: []

instance_methods: []

name: Error
superclass: Interrupt
ri/1.8/system/Timeout/ExitException/cdesc-ExitException.yaml000064400000000327150403661200017760 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Timeout::ExitException
includes: []

instance_methods: []

name: ExitException
superclass: "::Exception"
ri/1.8/system/Timeout/timeout-i.yaml000064400000001356150403661200013240 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: if sec == nil or sec.zero?
comment: 
- !ruby/struct:SM::Flow::P 
  body: Executes the method's block. If the block execution terminates before <tt>sec</tt> seconds has passed, it returns true. If not, it terminates the execution and raises <tt>exception</tt> (which defaults to Timeout::Error).
- !ruby/struct:SM::Flow::P 
  body: "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()."
full_name: Timeout#timeout
is_singleton: false
name: timeout
params: (sec, klass = nil) {|if sec == nil or sec.zero?| ...}
visibility: public
ri/1.8/system/Timeout/cdesc-Timeout.yaml000064400000002120150403661210014020 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::H 
  level: 1
  text: Description
- !ruby/struct:SM::Flow::P 
  body: A way of performing a potentially long-running operation in a thread, and terminating it's execution if it hasn't finished within fixed amount of time.
- !ruby/struct:SM::Flow::P 
  body: "Previous versions of timeout didn't use a module for namespace. This version provides both Timeout.timeout, and a backwards-compatible #timeout."
- !ruby/struct:SM::Flow::H 
  level: 1
  text: Synopsis
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'timeout'\n  status = Timeout::timeout(5) {\n    # Something that should be interrupted if it takes too much time...\n  }\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: THIS_FILE
  value: /\A#{Regexp.quote(__FILE__)}:/o
- !ruby/object:RI::Constant 
  comment: 
  name: CALLER_OFFSET
  value: "((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0"
full_name: Timeout
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: timeout
name: Timeout
superclass: 
ri/1.8/system/fatal/cdesc-fatal.yaml000064400000001160150403661210013125 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Descendents of class <tt>Exception</tt> are used to communicate between <tt>raise</tt> methods and <tt>rescue</tt> statements in <tt>begin/end</tt> blocks. <tt>Exception</tt> objects carry information about the exception---its type (the exception's class name), an optional descriptive string, and optional traceback information. Programs may subclass <tt>Exception</tt> to add additional information.
constants: []

full_name: fatal
includes: []

instance_methods: []

name: fatal
superclass: Exception
ri/1.8/system/Precision/prec_i-i.yaml000064400000000514150403661210013314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an <tt>Integer</tt> converted from <em>num</em>. It is equivalent to <tt>prec(Integer)</tt>.
full_name: Precision#prec_i
is_singleton: false
name: prec_i
params: |
  num.prec_i  =>  Integer

visibility: public
ri/1.8/system/Precision/cdesc-Precision.yaml000064400000001317150403661210014641 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: included
comment: 
- !ruby/struct:SM::Flow::P 
  body: Precision is a mixin for concrete numeric classes with precision. Here, `precision' means the fineness of approximation of a real number, so, this module should not be included into anything which is not a subset of Real (so it should not be included in classes such as <tt>Complex</tt> or <tt>Matrix</tt>).
constants: []

full_name: Precision
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: prec
- !ruby/object:RI::MethodSummary 
  name: prec_f
- !ruby/object:RI::MethodSummary 
  name: prec_i
name: Precision
superclass: 
ri/1.8/system/Precision/prec-i.yaml000064400000001112150403661220013000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>self</em> into an instance of <em>klass</em>. By default, <tt>prec</tt> invokes
- !ruby/struct:SM::Flow::VERB 
  body: "   klass.induced_from(num)\n"
- !ruby/struct:SM::Flow::P 
  body: and returns its value. So, if <tt>klass.induced_from</tt> doesn't return an instance of <em>klass</em>, it will be necessary to reimplement <tt>prec</tt>.
full_name: Precision#prec
is_singleton: false
name: prec
params: |
  num.prec(klass)   => a_klass

visibility: public
ri/1.8/system/Precision/prec_f-i.yaml000064400000000505150403661220013312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>Float</tt> converted from <em>num</em>. It is equivalent to <tt>prec(Float)</tt>.
full_name: Precision#prec_f
is_singleton: false
name: prec_f
params: |
  num.prec_f  =>  Float

visibility: public
ri/1.8/system/Precision/included-c.yaml000064400000000745150403661220013643 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "call_seq:"
- !ruby/struct:SM::Flow::VERB 
  body: "  included\n"
- !ruby/struct:SM::Flow::P 
  body: When the <tt>Precision</tt> module is mixed-in to a class, this <tt>included</tt> method is used to add our default <tt>induced_from</tt> implementation to the host class.
full_name: Precision::included
is_singleton: true
name: included
params: (p1)
visibility: public
ri/1.8/system/AmbiguousArgument/cdesc-AmbiguousArgument.yaml000064400000000475150403661230020055 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises when the given argument word can't be completed uniquely.
constants: []

full_name: AmbiguousArgument
includes: []

instance_methods: []

name: AmbiguousArgument
superclass: InvalidArgument
ri/1.8/system/SM/SimpleMarkup/content-i.yaml000064400000000422150403661230014522 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: for debugging, we allow access to our line contents as text
full_name: SM::SimpleMarkup#content
is_singleton: false
name: content
params: ()
visibility: public
ri/1.8/system/SM/SimpleMarkup/group_lines-i.yaml000064400000001046150403661230015401 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Return a block consisting of fragments which are paragraphs, list entries or verbatim text. We merge consecutive lines of the same type and level together. We are also slightly tricky with lists: the lines following a list introduction look like paragraph lines at the next level, and we remap them into list entries instead"
full_name: SM::SimpleMarkup#group_lines
is_singleton: false
name: group_lines
params: ()
visibility: private
ri/1.8/system/SM/SimpleMarkup/convert-i.yaml000064400000000674150403661230014541 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: We take a string, split it into lines, work out the type of each line, and from there deduce groups of lines (for example all lines in a paragraph). We then invoke the output formatter using a Visitor to display the result
full_name: SM::SimpleMarkup#convert
is_singleton: false
name: convert
params: (str, op)
visibility: public
ri/1.8/system/SM/SimpleMarkup/handled_labeled_list-i.yaml000064400000002035150403661230017154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Handle labeled list entries, We have a special case to deal with. Because the labels can be long, they force the remaining block of text over the to right:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "this is a long label that I wrote:"
    body: and here is the block of text with a silly margin
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: So we allow the special case. If the label is followed by nothing, and if the following line is indented, then we take the indent of that line as the new margin
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "this is a long label that I wrote:"
    body: here is a more reasonably indented block which will ab attached to the label.
  type: :NOTE
full_name: SM::SimpleMarkup#handled_labeled_list
is_singleton: false
name: handled_labeled_list
params: (line, level, margin, offset, prefix)
visibility: private
ri/1.8/system/SM/SimpleMarkup/add_html-i.yaml000064400000000423150403661230014625 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add to the sequences recognized as general markup
full_name: SM::SimpleMarkup#add_html
is_singleton: false
name: add_html
params: (tag, name)
visibility: public
ri/1.8/system/SM/SimpleMarkup/new-c.yaml000064400000000565150403661240013644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: take a block of text and use various heuristics to determine it's structure (paragraphs, lists, and so on). Invoke an event handler as we identify significant chunks.
full_name: SM::SimpleMarkup::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SM/SimpleMarkup/add_special-i.yaml000064400000001052150403661240015301 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Add to other inline sequences. For example, we could add WikiWords using something like:"
- !ruby/struct:SM::Flow::VERB 
  body: "   parser.add_special(/\\b([A-Z][a-z]+[A-Z]\\w+)/, :WIKIWORD)\n"
- !ruby/struct:SM::Flow::P 
  body: Each wiki word will be presented to the output formatter via the accept_special method
full_name: SM::SimpleMarkup#add_special
is_singleton: false
name: add_special
params: (pattern, name)
visibility: public
ri/1.8/system/SM/SimpleMarkup/add_word_pair-i.yaml000064400000000665150403661240015660 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add to the sequences used to add formatting to an individual word (such as <b>bold</b>). Matching entries will generate attibutes that the output formatters can recognize by their <tt>name</tt>
full_name: SM::SimpleMarkup#add_word_pair
is_singleton: false
name: add_word_pair
params: (start, stop, name)
visibility: public
ri/1.8/system/SM/SimpleMarkup/get_line_types-i.yaml000064400000000421150403661240016062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: for debugging, return the list of line types
full_name: SM::SimpleMarkup#get_line_types
is_singleton: false
name: get_line_types
params: ()
visibility: public
ri/1.8/system/SM/SimpleMarkup/assign_types_to_lines-i.yaml000064400000000603150403661240017456 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Look through the text at line indentation. We flag each line as being Blank, a paragraph, a list element, or verbatim text
full_name: SM::SimpleMarkup#assign_types_to_lines
is_singleton: false
name: assign_types_to_lines
params: (margin = 0, level = 0)
visibility: private
ri/1.8/system/SM/SimpleMarkup/cdesc-SimpleMarkup.yaml000064400000006550150403661250016324 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Synopsis
- !ruby/struct:SM::Flow::P 
  body: This code converts <tt>input_string</tt>, which is in the format described in markup/simple_markup.rb, to HTML. The conversion takes place in the <tt>convert</tt> method, so you can use the same SimpleMarkup object to convert multiple input strings.
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'rdoc/markup/simple_markup'\n  require 'rdoc/markup/simple_markup/to_html'\n\n  p = SM::SimpleMarkup.new\n  h = SM::ToHtml.new\n\n  puts p.convert(input_string, h)\n"
- !ruby/struct:SM::Flow::P 
  body: "You can extend the SimpleMarkup parser to recognise new markup sequences, and to add special processing for text that matches a regular epxression. Here we make WikiWords significant to the parser, and also make the sequences {word} and &lt;no&gt;text...&lt;/no&gt; signify strike-through text. When then subclass the HTML output class to deal with these:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'rdoc/markup/simple_markup'\n  require 'rdoc/markup/simple_markup/to_html'\n\n  class WikiHtml &lt; SM::ToHtml\n    def handle_special_WIKIWORD(special)\n      &quot;&lt;font color=red&gt;&quot; + special.text + &quot;&lt;/font&gt;&quot;\n    end\n  end\n\n  p = SM::SimpleMarkup.new\n  p.add_word_pair(&quot;{&quot;, &quot;}&quot;, :STRIKE)\n  p.add_html(&quot;no&quot;, :STRIKE)\n\n  p.add_special(/\\b([A-Z][a-z]+[A-Z]\\w+)/, :WIKIWORD)\n\n  h = WikiHtml.new\n  h.add_tag(:STRIKE, &quot;&lt;strike&gt;&quot;, &quot;&lt;/strike&gt;&quot;)\n\n  puts &quot;&lt;body&gt;&quot; + p.convert(ARGF.read, h) + &quot;&lt;/body&gt;&quot;\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Output Formatters
- !ruby/struct:SM::Flow::P 
  body: <em>missing</em>
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: SPACE
  value: ?\s
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: "List entries look like:"
  - !ruby/struct:SM::Flow::VERB 
    body: " *       text\n 1.      text\n [label] text\n label:: text\n"
  - !ruby/struct:SM::Flow::P 
    body: Flag it as a list entry, and work out the indent for subsequent lines
  name: SIMPLE_LIST_RE
  value: /^(                   (  \*          (?# bullet)                     |-           (?# bullet)                     |\d+\.       (?# numbered )                     |[A-Za-z]\.  (?# alphabetically numbered )                   )                   \s+                 )\S/x
- !ruby/object:RI::Constant 
  comment: 
  name: LABEL_LIST_RE
  value: "/^(                         (  \\[.*?\\]    (?# labeled  )                           |\\S.*::     (?# note     )                         )(?:\\s+|$)                       )/x"
full_name: SM::SimpleMarkup
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_html
- !ruby/object:RI::MethodSummary 
  name: add_special
- !ruby/object:RI::MethodSummary 
  name: add_word_pair
- !ruby/object:RI::MethodSummary 
  name: assign_types_to_lines
- !ruby/object:RI::MethodSummary 
  name: content
- !ruby/object:RI::MethodSummary 
  name: convert
- !ruby/object:RI::MethodSummary 
  name: get_line_types
- !ruby/object:RI::MethodSummary 
  name: group_lines
- !ruby/object:RI::MethodSummary 
  name: handled_labeled_list
name: SimpleMarkup
superclass: Object
ri/1.8/system/SM/Line/isBlank%3f-i.yaml000064400000000362150403661260013215 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return true if this line is blank
full_name: SM::Line#isBlank?
is_singleton: false
name: isBlank?
params: ()
visibility: public
ri/1.8/system/SM/Line/new-c.yaml000064400000000246150403661270012121 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Line::new
is_singleton: true
name: new
params: (text)
visibility: public
ri/1.8/system/SM/Line/to_s-i.yaml000064400000000244150403661270012300 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Line#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SM/Line/stamp-i.yaml000064400000000441150403661300012451 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: stamp a line with a type, a level, a prefix, and a flag
full_name: SM::Line#stamp
is_singleton: false
name: stamp
params: (type, level, param="", flag=nil)
visibility: public
ri/1.8/system/SM/Line/cdesc-Line.yaml000064400000003675150403661300013061 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: true if this line has been deleted from the list of lines
  name: deleted
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A flag. For list lines, this is the type of the list
  name: flag
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the number of leading spaces
  name: leading_spaces
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The indentation nesting level
  name: level
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A prefix or parameter. For LIST lines, this is the text that introduced the list item (the label)
  name: param
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The contents
  name: text
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: line type
  name: type
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: INFINITY
  value: "9999"
- !ruby/object:RI::Constant 
  comment: 
  name: BLANK
  value: ":BLANK"
- !ruby/object:RI::Constant 
  comment: 
  name: HEADING
  value: ":HEADING"
- !ruby/object:RI::Constant 
  comment: 
  name: LIST
  value: ":LIST"
- !ruby/object:RI::Constant 
  comment: 
  name: RULE
  value: ":RULE"
- !ruby/object:RI::Constant 
  comment: 
  name: PARAGRAPH
  value: ":PARAGRAPH"
- !ruby/object:RI::Constant 
  comment: 
  name: VERBATIM
  value: ":VERBATIM"
full_name: SM::Line
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: isBlank?
- !ruby/object:RI::MethodSummary 
  name: stamp
- !ruby/object:RI::MethodSummary 
  name: strip_leading
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Line
superclass: Object
ri/1.8/system/SM/Line/strip_leading-i.yaml000064400000000373150403661310014156 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Strip off the leading margin
full_name: SM::Line#strip_leading
is_singleton: false
name: strip_leading
params: (size)
visibility: public
ri/1.8/system/SM/Paragraph/cdesc-Paragraph.yaml000064400000000552150403661310015105 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A paragraph is a fragment which gets wrapped to fit. We remove all newlines when we're created, and have them put back on output
constants: []

full_name: SM::Paragraph
includes: []

instance_methods: []

name: Paragraph
superclass: Fragment
ri/1.8/system/SM/ListEnd/new-c.yaml000064400000000260150403661320012564 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ListEnd::new
is_singleton: true
name: new
params: (level, type)
visibility: public
ri/1.8/system/SM/ListEnd/cdesc-ListEnd.yaml000064400000000354150403661320014200 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SM::ListEnd
includes: []

instance_methods: []

name: ListEnd
superclass: ListBase
ri/1.8/system/SM/BlankLine/cdesc-BlankLine.yaml000064400000000306150403661330014770 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SM::BlankLine
includes: []

instance_methods: []

name: BlankLine
superclass: Paragraph
ri/1.8/system/SM/Fragment/add_text-i.yaml000064400000000263150403661330014002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Fragment#add_text
is_singleton: false
name: add_text
params: (txt)
visibility: public
ri/1.8/system/SM/Fragment/type_name-c.yaml000064400000000266150403661340014165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Fragment::type_name
is_singleton: true
name: type_name
params: (name)
visibility: public
ri/1.8/system/SM/Fragment/for-c.yaml000064400000000252150403661350012766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Fragment::for
is_singleton: true
name: for
params: (line)
visibility: public
ri/1.8/system/SM/Fragment/new-c.yaml000064400000000275150403661350012776 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Fragment::new
is_singleton: true
name: new
params: (level, param, type, txt)
visibility: public
ri/1.8/system/SM/Fragment/to_s-i.yaml000064400000000250150403661360013151 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Fragment#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SM/Fragment/cdesc-Fragment.yaml000064400000002000150403661360014574 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: level
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: param
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: txt
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: RW
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: for
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: type_name
comment: 
- !ruby/struct:SM::Flow::P 
  body: A Fragment is a chunk of text, subclassed as a paragraph, a list entry, or verbatim text
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: This is a simple factory system that lets us associate fragement types (a string) with a subclass of fragment
  name: TYPE_MAP
  value: "{}"
full_name: SM::Fragment
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_text
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Fragment
superclass: Object
ri/1.8/system/SM/ListStart/cdesc-ListStart.yaml000064400000000360150403661370015160 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SM::ListStart
includes: []

instance_methods: []

name: ListStart
superclass: ListBase
ri/1.8/system/SM/ListStart/new-c.yaml000064400000000271150403661370013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ListStart::new
is_singleton: true
name: new
params: (level, param, type)
visibility: public
ri/1.8/system/SM/ListBase/cdesc-ListBase.yaml000064400000001425150403661400014507 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A List is a fragment with some kind of label
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: List types
  name: BULLET
  value: ":BULLET"
- !ruby/object:RI::Constant 
  comment: 
  name: NUMBER
  value: ":NUMBER"
- !ruby/object:RI::Constant 
  comment: 
  name: UPPERALPHA
  value: ":UPPERALPHA"
- !ruby/object:RI::Constant 
  comment: 
  name: LOWERALPHA
  value: ":LOWERALPHA"
- !ruby/object:RI::Constant 
  comment: 
  name: LABELED
  value: ":LABELED"
- !ruby/object:RI::Constant 
  comment: 
  name: NOTE
  value: ":NOTE"
full_name: SM::ListBase
includes: []

instance_methods: []

name: ListBase
superclass: Paragraph
ri/1.8/system/SM/Attribute/cdesc-Attribute.yaml000064400000001027150403661400015177 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: as_string
- !ruby/object:RI::MethodSummary 
  name: bitmap_for
- !ruby/object:RI::MethodSummary 
  name: each_name_of
comment: 
- !ruby/struct:SM::Flow::P 
  body: We manage a set of attributes. Each attribute has a symbol name and a bit value
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: SPECIAL
  value: "1"
full_name: SM::Attribute
includes: []

instance_methods: []

name: Attribute
superclass: Object
ri/1.8/system/SM/Attribute/as_string-c.yaml000064400000000271150403661400014366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Attribute::as_string
is_singleton: true
name: as_string
params: (bitmap)
visibility: public
ri/1.8/system/SM/Attribute/each_name_of-c.yaml000064400000000410150403661400014754 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: name.to_s if (bitmap & bit) != 0
comment: 
full_name: SM::Attribute::each_name_of
is_singleton: true
name: each_name_of
params: (bitmap) {|name.to_s if (bitmap & bit) != 0| ...}
visibility: public
ri/1.8/system/SM/Attribute/bitmap_for-c.yaml000064400000000271150403661400014517 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Attribute::bitmap_for
is_singleton: true
name: bitmap_for
params: (name)
visibility: public
ri/1.8/system/SM/Lines/empty%3f-i.yaml000064400000000251150403661400013144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines#empty?
is_singleton: false
name: empty?
params: ()
visibility: public
ri/1.8/system/SM/Lines/each-i.yaml000064400000000336150403661410012415 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: line unless line.deleted
comment: 
full_name: SM::Lines#each
is_singleton: false
name: each
params: () {|line unless line.deleted| ...}
visibility: public
ri/1.8/system/SM/Lines/unget-i.yaml000064400000000247150403661410012640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines#unget
is_singleton: false
name: unget
params: ()
visibility: public
ri/1.8/system/SM/Lines/delete-i.yaml000064400000000257150403661410012761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines#delete
is_singleton: false
name: delete
params: (a_line)
visibility: public
ri/1.8/system/SM/Lines/next-i.yaml000064400000000245150403661420012473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines#next
is_singleton: false
name: next
params: ()
visibility: public
ri/1.8/system/SM/Lines/normalize-i.yaml000064400000000257150403661420013520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines#normalize
is_singleton: false
name: normalize
params: ()
visibility: public
ri/1.8/system/SM/Lines/rewind-i.yaml000064400000000476150403661420013013 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def [](index)
- !ruby/struct:SM::Flow::VERB 
  body: "  @lines[index]\n"
- !ruby/struct:SM::Flow::P 
  body: end
full_name: SM::Lines#rewind
is_singleton: false
name: rewind
params: ()
visibility: public
ri/1.8/system/SM/Lines/new-c.yaml000064400000000250150403661430012275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines::new
is_singleton: true
name: new
params: (lines)
visibility: public
ri/1.8/system/SM/Lines/as_text-i.yaml000064400000000253150403661430013164 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines#as_text
is_singleton: false
name: as_text
params: ()
visibility: public
ri/1.8/system/SM/Lines/line_types-i.yaml000064400000000261150403661440013670 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Lines#line_types
is_singleton: false
name: line_types
params: ()
visibility: public
ri/1.8/system/SM/Lines/cdesc-Lines.yaml000064400000001521150403661440013420 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: lines
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A container for all the lines
constants: []

full_name: SM::Lines
includes: 
- !ruby/object:RI::IncludedModule 
  name: Enumerable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: as_text
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: empty?
- !ruby/object:RI::MethodSummary 
  name: line_types
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: normalize
- !ruby/object:RI::MethodSummary 
  name: rewind
- !ruby/object:RI::MethodSummary 
  name: unget
name: Lines
superclass: Object
ri/1.8/system/SM/cdesc-SM.yaml000064400000000376150403661440011622 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: require 'rdoc/markup/simple_markup/to_flow.rb'
constants: []

full_name: SM
includes: []

instance_methods: []

name: SM
superclass: 
ri/1.8/system/SM/AttrSpan/%5b%5d-i.yaml000064400000000247150403661450013055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttrSpan#[]
is_singleton: false
name: "[]"
params: (n)
visibility: public
ri/1.8/system/SM/AttrSpan/cdesc-AttrSpan.yaml000064400000000662150403661450014572 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: An array of attributes which parallels the characters in a string
constants: []

full_name: SM::AttrSpan
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: set_attrs
name: AttrSpan
superclass: Object
ri/1.8/system/SM/AttrSpan/new-c.yaml000064400000000254150403661450012765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttrSpan::new
is_singleton: true
name: new
params: (length)
visibility: public
ri/1.8/system/SM/AttrSpan/set_attrs-i.yaml000064400000000305150403661460014210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttrSpan#set_attrs
is_singleton: false
name: set_attrs
params: (start, length, bits)
visibility: public
ri/1.8/system/SM/LineCollection/each-i.yaml000064400000000260150403661460014247 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::LineCollection#each
is_singleton: false
name: each
params: (&b)
visibility: public
ri/1.8/system/SM/LineCollection/to_a-i.yaml000064400000000336150403661460014275 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: For testing
full_name: SM::LineCollection#to_a
is_singleton: false
name: to_a
params: ()
visibility: public
ri/1.8/system/SM/LineCollection/tidy_blank_lines-i.yaml000064400000001002150403661460016654 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Finally tidy up the blank lines:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: change Blank/ListEnd into ListEnd/Blank
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: remove blank lines at the front
  type: :BULLET
full_name: SM::LineCollection#tidy_blank_lines
is_singleton: false
name: tidy_blank_lines
params: ()
visibility: private
ri/1.8/system/SM/LineCollection/change_verbatim_blank_lines-i.yaml000064400000001264150403661460021033 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "If you have:"
- !ruby/struct:SM::Flow::VERB 
  body: "   normal paragraph text.\n\n      this is code\n\n      and more code\n"
- !ruby/struct:SM::Flow::P 
  body: You'll end up with the fragments Paragraph, BlankLine, Verbatim, BlankLine, Verbatim, BlankLine, etc
- !ruby/struct:SM::Flow::P 
  body: The BlankLine in the middle of the verbatim chunk needs to be changed to a real verbatim newline, and the two verbatim blocks merged
full_name: SM::LineCollection#change_verbatim_blank_lines
is_singleton: false
name: change_verbatim_blank_lines
params: ()
visibility: private
ri/1.8/system/SM/LineCollection/normalize-i.yaml000064400000000357150403661470015357 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: tidy up at the end
full_name: SM::LineCollection#normalize
is_singleton: false
name: normalize
params: ()
visibility: public
ri/1.8/system/SM/LineCollection/add-i.yaml000064400000000264150403661470014104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::LineCollection#add
is_singleton: false
name: add
params: (fragment)
visibility: public
ri/1.8/system/SM/LineCollection/add_list_breaks-i.yaml000064400000000510150403661470016460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: now insert start/ends between list entries at the same level that have different element types
full_name: SM::LineCollection#add_list_breaks
is_singleton: false
name: add_list_breaks
params: ()
visibility: private
ri/1.8/system/SM/LineCollection/add_list_start_and_ends-i.yaml000064400000000560150403661500020200 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: List nesting is implicit given the level of Make it explicit, just to make life a tad easier for the output processors
full_name: SM::LineCollection#add_list_start_and_ends
is_singleton: false
name: add_list_start_and_ends
params: ()
visibility: private
ri/1.8/system/SM/LineCollection/new-c.yaml000064400000000254150403661500014130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::LineCollection::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SM/LineCollection/cdesc-LineCollection.yaml000064400000001700150403661500017076 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Collect groups of lines together. Each group will end up containing a flow of text
constants: []

full_name: SM::LineCollection
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: add_list_breaks
- !ruby/object:RI::MethodSummary 
  name: add_list_start_and_ends
- !ruby/object:RI::MethodSummary 
  name: change_verbatim_blank_lines
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: fragment_for
- !ruby/object:RI::MethodSummary 
  name: normalize
- !ruby/object:RI::MethodSummary 
  name: tidy_blank_lines
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_s
name: LineCollection
superclass: Object
ri/1.8/system/SM/LineCollection/to_s-i.yaml000064400000000256150403661500014313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::LineCollection#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SM/LineCollection/accept-i.yaml000064400000000275150403661500014607 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::LineCollection#accept
is_singleton: false
name: accept
params: (am, visitor)
visibility: public
ri/1.8/system/SM/LineCollection/fragment_for-i.yaml000064400000000414150403661500016014 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Factory for different fragment types
full_name: SM::LineCollection#fragment_for
is_singleton: false
name: fragment_for
params: (*args)
visibility: public
ri/1.8/system/SM/AttributeManager/mask_protected_sequences-i.yaml000064400000000330150403661500020752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#mask_protected_sequences
is_singleton: false
name: mask_protected_sequences
params: ()
visibility: public
ri/1.8/system/SM/AttributeManager/add_html-i.yaml000064400000000301150403661500015445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#add_html
is_singleton: false
name: add_html
params: (tag, name)
visibility: public
ri/1.8/system/SM/AttributeManager/display_attributes-i.yaml000064400000000314150403661500017610 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#display_attributes
is_singleton: false
name: display_attributes
params: ()
visibility: public
ri/1.8/system/SM/AttributeManager/flow-i.yaml000064400000000263150403661500014647 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#flow
is_singleton: false
name: flow
params: (str)
visibility: public
ri/1.8/system/SM/AttributeManager/changed_attribute_by_name-i.yaml000064400000000356150403661500021051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#changed_attribute_by_name
is_singleton: false
name: changed_attribute_by_name
params: (current_set, new_set)
visibility: public
ri/1.8/system/SM/AttributeManager/new-c.yaml000064400000000256150403661500014465 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SM/AttributeManager/copy_string-i.yaml000064400000000320150403661500016232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#copy_string
is_singleton: false
name: copy_string
params: (start_pos, end_pos)
visibility: public
ri/1.8/system/SM/AttributeManager/change_attribute-i.yaml000064400000000324150403661500017206 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#change_attribute
is_singleton: false
name: change_attribute
params: (current, new)
visibility: public
ri/1.8/system/SM/AttributeManager/add_special-i.yaml000064400000000313150403661500016124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#add_special
is_singleton: false
name: add_special
params: (pattern, name)
visibility: public
ri/1.8/system/SM/AttributeManager/add_word_pair-i.yaml000064400000000323150403661500016473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#add_word_pair
is_singleton: false
name: add_word_pair
params: (start, stop, name)
visibility: public
ri/1.8/system/SM/AttributeManager/attribute-i.yaml000064400000000467150403661500015711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return an attribute object with the given turn_on and turn_off bits set
full_name: SM::AttributeManager#attribute
is_singleton: false
name: attribute
params: (turn_on, turn_off)
visibility: public
ri/1.8/system/SM/AttributeManager/split_into_flow-i.yaml000064400000000306150403661500017111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#split_into_flow
is_singleton: false
name: split_into_flow
params: ()
visibility: public
ri/1.8/system/SM/AttributeManager/convert_html-i.yaml000064400000000312150403661500016377 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#convert_html
is_singleton: false
name: convert_html
params: (str, attrs)
visibility: public
ri/1.8/system/SM/AttributeManager/convert_specials-i.yaml000064400000000322150403661500017237 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#convert_specials
is_singleton: false
name: convert_specials
params: (str, attrs)
visibility: public
ri/1.8/system/SM/AttributeManager/unmask_protected_sequences-i.yaml000064400000000334150403661510021322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttributeManager#unmask_protected_sequences
is_singleton: false
name: unmask_protected_sequences
params: ()
visibility: public
ri/1.8/system/SM/AttributeManager/convert_attrs-i.yaml000064400000000602150403661510016573 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Map attributes like <b>text</b>to the sequence \001\002&lt;char&gt;\001\003&lt;char&gt;, where &lt;char&gt; is a per-attribute specific character
full_name: SM::AttributeManager#convert_attrs
is_singleton: false
name: convert_attrs
params: (str, attrs)
visibility: public
ri/1.8/system/SM/AttributeManager/cdesc-AttributeManager.yaml000064400000005342150403661520017774 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: "NULL"
  value: "\"\\000\".freeze"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: We work by substituting non-printing characters in to the text. For now I'm assuming that I can substitute a character in the range 0..8 for a 7 bit character without damaging the encoded string, but this might be optimistic
  name: A_PROTECT
  value: "004"
- !ruby/object:RI::Constant 
  comment: 
  name: PROTECT_ATTR
  value: A_PROTECT.chr
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: This maps delimiters that occur around words (such as <b>bold</b> or <tt>tt</tt>) where the start and end delimiters and the same. This lets us optimize the regexp
  name: MATCHING_WORD_PAIRS
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: And this is used when the delimiters aren't the same. In this case the hash maps a pattern to the attribute character
  name: WORD_PAIR_MAP
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: This maps HTML tags to the corresponding attribute char
  name: HTML_TAGS
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: And this maps <em>special</em> sequences to a name. A special sequence is something like a WikiWord
  name: SPECIAL
  value: "{}"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A \ in front of a character that would normally be processed turns off processing. We do this by turning &lt; into &lt;#{PROTECT}
  name: PROTECTABLE
  value: "[ \"<\" << \"\\\\\" ]"
full_name: SM::AttributeManager
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_html
- !ruby/object:RI::MethodSummary 
  name: add_special
- !ruby/object:RI::MethodSummary 
  name: add_word_pair
- !ruby/object:RI::MethodSummary 
  name: attribute
- !ruby/object:RI::MethodSummary 
  name: change_attribute
- !ruby/object:RI::MethodSummary 
  name: changed_attribute_by_name
- !ruby/object:RI::MethodSummary 
  name: convert_attrs
- !ruby/object:RI::MethodSummary 
  name: convert_html
- !ruby/object:RI::MethodSummary 
  name: convert_specials
- !ruby/object:RI::MethodSummary 
  name: copy_string
- !ruby/object:RI::MethodSummary 
  name: display_attributes
- !ruby/object:RI::MethodSummary 
  name: flow
- !ruby/object:RI::MethodSummary 
  name: mask_protected_sequences
- !ruby/object:RI::MethodSummary 
  name: split_into_flow
- !ruby/object:RI::MethodSummary 
  name: unmask_protected_sequences
name: AttributeManager
superclass: Object
ri/1.8/system/SM/Verbatim/add_text-i.yaml000064400000000263150403661520014011 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Verbatim#add_text
is_singleton: false
name: add_text
params: (txt)
visibility: public
ri/1.8/system/SM/Verbatim/cdesc-Verbatim.yaml000064400000000514150403661520014616 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Verbatim code contains lines that don't get wrapped.
constants: []

full_name: SM::Verbatim
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add_text
name: Verbatim
superclass: Fragment
ri/1.8/system/SM/ListItem/cdesc-ListItem.yaml000064400000000303150403661530014555 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SM::ListItem
includes: []

instance_methods: []

name: ListItem
superclass: ListBase
ri/1.8/system/SM/ToHtml/accept_blank_line-i.yaml000064400000000314150403661530015266 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_blank_line
is_singleton: false
name: accept_blank_line
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/init_tags-i.yaml000064400000000413150403661530013632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set up the standard mapping of attributes to HTML tags
full_name: SM::ToHtml#init_tags
is_singleton: false
name: init_tags
params: ()
visibility: public
ri/1.8/system/SM/ToHtml/on_tags-i.yaml000064400000000271150403661530013305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: SM::ToHtml#on_tags
is_singleton: false
name: on_tags
params: (res, item)
visibility: private
ri/1.8/system/SM/ToHtml/accept_list_start-i.yaml000064400000000314150403661530015360 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_list_start
is_singleton: false
name: accept_list_start
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/convert_heading-i.yaml000064400000000310150403661530015004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#convert_heading
is_singleton: false
name: convert_heading
params: (level, flow)
visibility: private
ri/1.8/system/SM/ToHtml/off_tags-i.yaml000064400000000270150403661530013442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#off_tags
is_singleton: false
name: off_tags
params: (res, item)
visibility: private
ri/1.8/system/SM/ToHtml/convert_flow-i.yaml000064400000000273150403661530014364 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#convert_flow
is_singleton: false
name: convert_flow
params: (flow)
visibility: private
ri/1.8/system/SM/ToHtml/new-c.yaml000064400000000244150403661530012436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SM/ToHtml/start_accepting-i.yaml000064400000000416150403661540015027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Here's the client side of the visitor pattern
full_name: SM::ToHtml#start_accepting
is_singleton: false
name: start_accepting
params: ()
visibility: public
ri/1.8/system/SM/ToHtml/list_item_start-i.yaml000064400000000311150403661550015056 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#list_item_start
is_singleton: false
name: list_item_start
params: (am, fragment)
visibility: private
ri/1.8/system/SM/ToHtml/html_list_name-i.yaml000064400000000321150403661560014651 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#html_list_name
is_singleton: false
name: html_list_name
params: (list_type, is_open_tag)
visibility: private
ri/1.8/system/SM/ToHtml/wrap-i.yaml000064400000000420150403661570012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This is a higher speed (if messier) version of wrap
full_name: SM::ToHtml#wrap
is_singleton: false
name: wrap
params: (txt, line_len = 76)
visibility: public
ri/1.8/system/SM/ToHtml/accept_verbatim-i.yaml000064400000000310150403661600014773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_verbatim
is_singleton: false
name: accept_verbatim
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/end_accepting-i.yaml000064400000000270150403661610014434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#end_accepting
is_singleton: false
name: end_accepting
params: ()
visibility: public
ri/1.8/system/SM/ToHtml/convert_string-i.yaml000064400000000430150403661610014715 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: some of these patterns are taken from SmartyPants...
full_name: SM::ToHtml#convert_string
is_singleton: false
name: convert_string
params: (item)
visibility: private
ri/1.8/system/SM/ToHtml/accept_paragraph-i.yaml000064400000000312150403661620015133 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_paragraph
is_singleton: false
name: accept_paragraph
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/add_tag-i.yaml000064400000000503150403661630013235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a new set of HTML tags for an attribute. We allow separate start and end tags for flexibility
full_name: SM::ToHtml#add_tag
is_singleton: false
name: add_tag
params: (name, start, stop)
visibility: public
ri/1.8/system/SM/ToHtml/annotate-i.yaml000064400000000615150403661630013467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given an HTML tag, decorate it with class information and the like if required. This is a no-op in the base class, but is overridden in HTML output classes that implement style sheets
full_name: SM::ToHtml#annotate
is_singleton: false
name: annotate
params: (tag)
visibility: public
ri/1.8/system/SM/ToHtml/accept_rule-i.yaml000064400000000300150403661640014134 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_rule
is_singleton: false
name: accept_rule
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/cdesc-ToHtml.yaml000064400000003734150403661650013725 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: LIST_TYPE_TO_HTML
  value: "{       ListBase::BULLET =>  [ \"<ul>\", \"</ul>\" ],       ListBase::NUMBER =>  [ \"<ol>\", \"</ol>\" ],       ListBase::UPPERALPHA =>  [ \"<ol>\", \"</ol>\" ],       ListBase::LOWERALPHA =>  [ \"<ol>\", \"</ol>\" ],       ListBase::LABELED => [ \"<dl>\", \"</dl>\" ],       ListBase::NOTE    => [ \"<table>\", \"</table>\" ],     }"
- !ruby/object:RI::Constant 
  comment: 
  name: InlineTag
  value: Struct.new(:bit, :on, :off)
full_name: SM::ToHtml
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept_blank_line
- !ruby/object:RI::MethodSummary 
  name: accept_heading
- !ruby/object:RI::MethodSummary 
  name: accept_list_end
- !ruby/object:RI::MethodSummary 
  name: accept_list_item
- !ruby/object:RI::MethodSummary 
  name: accept_list_start
- !ruby/object:RI::MethodSummary 
  name: accept_paragraph
- !ruby/object:RI::MethodSummary 
  name: accept_rule
- !ruby/object:RI::MethodSummary 
  name: accept_verbatim
- !ruby/object:RI::MethodSummary 
  name: add_tag
- !ruby/object:RI::MethodSummary 
  name: annotate
- !ruby/object:RI::MethodSummary 
  name: convert_flow
- !ruby/object:RI::MethodSummary 
  name: convert_heading
- !ruby/object:RI::MethodSummary 
  name: convert_special
- !ruby/object:RI::MethodSummary 
  name: convert_string
- !ruby/object:RI::MethodSummary 
  name: end_accepting
- !ruby/object:RI::MethodSummary 
  name: html_list_name
- !ruby/object:RI::MethodSummary 
  name: init_tags
- !ruby/object:RI::MethodSummary 
  name: list_end_for
- !ruby/object:RI::MethodSummary 
  name: list_item_start
- !ruby/object:RI::MethodSummary 
  name: off_tags
- !ruby/object:RI::MethodSummary 
  name: on_tags
- !ruby/object:RI::MethodSummary 
  name: start_accepting
- !ruby/object:RI::MethodSummary 
  name: wrap
name: ToHtml
superclass: Object
ri/1.8/system/SM/ToHtml/accept_list_item-i.yaml000064400000000312150403661650015162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_list_item
is_singleton: false
name: accept_list_item
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/list_end_for-i.yaml000064400000000304150403661660014323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#list_end_for
is_singleton: false
name: list_end_for
params: (fragment_type)
visibility: private
ri/1.8/system/SM/ToHtml/accept_heading-i.yaml000064400000000306150403661660014574 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_heading
is_singleton: false
name: accept_heading
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/accept_list_end-i.yaml000064400000000310150403661670014772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#accept_list_end
is_singleton: false
name: accept_list_end
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToHtml/convert_special-i.yaml000064400000000304150403661670015035 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToHtml#convert_special
is_singleton: false
name: convert_special
params: (special)
visibility: private
ri/1.8/system/SM/Flow/LIST/cdesc-LIST.yaml000064400000000625150403661700013534 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: contents
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: SM::Flow::LIST
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: "<<"
name: LIST
superclass: Object
ri/1.8/system/SM/Flow/LIST/new-c.yaml000064400000000254150403661700012711 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Flow::LIST::new
is_singleton: true
name: new
params: (type)
visibility: public
ri/1.8/system/SM/Flow/LIST/%3c%3c-i.yaml000064400000000255150403661710012775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Flow::LIST#<<
is_singleton: false
name: "<<"
params: (stuff)
visibility: public
ri/1.8/system/SM/Flow/cdesc-Flow.yaml000064400000001116150403661710013112 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: P
  value: Struct.new(:body)
- !ruby/object:RI::Constant 
  comment: 
  name: VERB
  value: Struct.new(:body)
- !ruby/object:RI::Constant 
  comment: 
  name: RULE
  value: Struct.new(:width)
- !ruby/object:RI::Constant 
  comment: 
  name: LI
  value: Struct.new(:label, :body)
- !ruby/object:RI::Constant 
  comment: 
  name: H
  value: Struct.new(:level, :text)
full_name: SM::Flow
includes: []

instance_methods: []

name: Flow
superclass: 
ri/1.8/system/SM/AttrChanger/cdesc-AttrChanger.yaml000064400000000363150403661720015704 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SM::AttrChanger
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: to_s
name: AttrChanger
superclass: Object
ri/1.8/system/SM/AttrChanger/to_s-i.yaml000064400000000253150403661720013613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::AttrChanger#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SM/Special/new-c.yaml000064400000000257150403661720012614 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Special::new
is_singleton: true
name: new
params: (type, text)
visibility: public
ri/1.8/system/SM/Special/cdesc-Special.yaml000064400000001006150403661720014233 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: text
  rw: RW
- !ruby/object:RI::Attribute 
  comment: 
  name: type
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Hold details of a special sequence
constants: []

full_name: SM::Special
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Special
superclass: Object
ri/1.8/system/SM/Special/to_s-i.yaml000064400000000247150403661720012774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Special#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/SM/Special/%3d%3d-i.yaml000064400000000244150403661720012674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Special#==
is_singleton: false
name: ==
params: (o)
visibility: public
ri/1.8/system/SM/Heading/cdesc-Heading.yaml000064400000000364150403661730014200 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: SM::Heading
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: head_level
name: Heading
superclass: Paragraph
ri/1.8/system/SM/Heading/head_level-i.yaml000064400000000263150403661730014076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::Heading#head_level
is_singleton: false
name: head_level
params: ()
visibility: public
ri/1.8/system/SM/Rule/cdesc-Rule.yaml000064400000000361150403661730013115 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: A horizontal rule
constants: []

full_name: SM::Rule
includes: []

instance_methods: []

name: Rule
superclass: Fragment
ri/1.8/system/SM/ToFlow/accept_blank_line-i.yaml000064400000000314150403661730015273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_blank_line
is_singleton: false
name: accept_blank_line
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/init_tags-i.yaml000064400000000413150403661730013637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set up the standard mapping of attributes to HTML tags
full_name: SM::ToFlow#init_tags
is_singleton: false
name: init_tags
params: ()
visibility: public
ri/1.8/system/SM/ToFlow/on_tags-i.yaml000064400000000271150403661730013312 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: SM::ToFlow#on_tags
is_singleton: false
name: on_tags
params: (res, item)
visibility: private
ri/1.8/system/SM/ToFlow/accept_list_start-i.yaml000064400000000314150403661730015365 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_list_start
is_singleton: false
name: accept_list_start
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/off_tags-i.yaml000064400000000270150403661730013447 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#off_tags
is_singleton: false
name: off_tags
params: (res, item)
visibility: private
ri/1.8/system/SM/ToFlow/convert_flow-i.yaml000064400000000273150403661730014371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#convert_flow
is_singleton: false
name: convert_flow
params: (flow)
visibility: private
ri/1.8/system/SM/ToFlow/new-c.yaml000064400000000244150403661730012443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SM/ToFlow/start_accepting-i.yaml000064400000000416150403661740015034 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Here's the client side of the visitor pattern
full_name: SM::ToFlow#start_accepting
is_singleton: false
name: start_accepting
params: ()
visibility: public
ri/1.8/system/SM/ToFlow/accept_verbatim-i.yaml000064400000000310150403661740015003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_verbatim
is_singleton: false
name: accept_verbatim
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/end_accepting-i.yaml000064400000000270150403661740014443 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#end_accepting
is_singleton: false
name: end_accepting
params: ()
visibility: public
ri/1.8/system/SM/ToFlow/convert_string-i.yaml000064400000000430150403661740014724 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: some of these patterns are taken from SmartyPants...
full_name: SM::ToFlow#convert_string
is_singleton: false
name: convert_string
params: (item)
visibility: private
ri/1.8/system/SM/ToFlow/accept_paragraph-i.yaml000064400000000312150403661740015141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_paragraph
is_singleton: false
name: accept_paragraph
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/add_tag-i.yaml000064400000000503150403661740013242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a new set of HTML tags for an attribute. We allow separate start and end tags for flexibility
full_name: SM::ToFlow#add_tag
is_singleton: false
name: add_tag
params: (name, start, stop)
visibility: public
ri/1.8/system/SM/ToFlow/cdesc-ToFlow.yaml000064400000003361150403661750013730 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: LIST_TYPE_TO_HTML
  value: "{       SM::ListBase::BULLET     =>  [ \"<ul>\", \"</ul>\" ],       SM::ListBase::NUMBER     =>  [ \"<ol>\", \"</ol>\" ],       SM::ListBase::UPPERALPHA =>  [ \"<ol>\", \"</ol>\" ],       SM::ListBase::LOWERALPHA =>  [ \"<ol>\", \"</ol>\" ],       SM::ListBase::LABELED    =>  [ \"<dl>\", \"</dl>\" ],       SM::ListBase::NOTE       =>  [ \"<table>\", \"</table>\" ],     }"
- !ruby/object:RI::Constant 
  comment: 
  name: InlineTag
  value: Struct.new(:bit, :on, :off)
full_name: SM::ToFlow
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept_blank_line
- !ruby/object:RI::MethodSummary 
  name: accept_heading
- !ruby/object:RI::MethodSummary 
  name: accept_list_end
- !ruby/object:RI::MethodSummary 
  name: accept_list_item
- !ruby/object:RI::MethodSummary 
  name: accept_list_start
- !ruby/object:RI::MethodSummary 
  name: accept_paragraph
- !ruby/object:RI::MethodSummary 
  name: accept_rule
- !ruby/object:RI::MethodSummary 
  name: accept_verbatim
- !ruby/object:RI::MethodSummary 
  name: add_tag
- !ruby/object:RI::MethodSummary 
  name: annotate
- !ruby/object:RI::MethodSummary 
  name: convert_flow
- !ruby/object:RI::MethodSummary 
  name: convert_special
- !ruby/object:RI::MethodSummary 
  name: convert_string
- !ruby/object:RI::MethodSummary 
  name: end_accepting
- !ruby/object:RI::MethodSummary 
  name: init_tags
- !ruby/object:RI::MethodSummary 
  name: off_tags
- !ruby/object:RI::MethodSummary 
  name: on_tags
- !ruby/object:RI::MethodSummary 
  name: start_accepting
name: ToFlow
superclass: Object
ri/1.8/system/SM/ToFlow/annotate-i.yaml000064400000000615150403661750013475 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Given an HTML tag, decorate it with class information and the like if required. This is a no-op in the base class, but is overridden in HTML output classes that implement style sheets
full_name: SM::ToFlow#annotate
is_singleton: false
name: annotate
params: (tag)
visibility: public
ri/1.8/system/SM/ToFlow/accept_rule-i.yaml000064400000000300150403661750014141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_rule
is_singleton: false
name: accept_rule
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/accept_list_item-i.yaml000064400000000312150403661750015166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_list_item
is_singleton: false
name: accept_list_item
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/accept_heading-i.yaml000064400000000306150403661750014577 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_heading
is_singleton: false
name: accept_heading
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/accept_list_end-i.yaml000064400000000310150403661750014774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#accept_list_end
is_singleton: false
name: accept_list_end
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToFlow/convert_special-i.yaml000064400000000304150403661750015037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToFlow#convert_special
is_singleton: false
name: convert_special
params: (special)
visibility: private
ri/1.8/system/SM/PreProcess/cdesc-PreProcess.yaml000064400000001056150403661750015455 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Handle common directives that can occur in a block of text:"
- !ruby/struct:SM::Flow::P 
  body: ": include : filename"
constants: []

full_name: SM::PreProcess
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: find_include_file
- !ruby/object:RI::MethodSummary 
  name: handle
- !ruby/object:RI::MethodSummary 
  name: include_file
name: PreProcess
superclass: Object
ri/1.8/system/SM/PreProcess/new-c.yaml000064400000000305150403661750013316 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::PreProcess::new
is_singleton: true
name: new
params: (input_file_name, include_path)
visibility: public
ri/1.8/system/SM/PreProcess/find_include_file-i.yaml000064400000000572150403661750016163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Look for the given file in the directory containing the current file, and then in each of the directories specified in the RDOC_INCLUDE path
full_name: SM::PreProcess#find_include_file
is_singleton: false
name: find_include_file
params: (name)
visibility: private
ri/1.8/system/SM/PreProcess/handle-i.yaml000064400000000576150403661750014000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (directive, param)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Look for common options in a chunk of text. Options that we don't handle are passed back to our caller as |directive, param|
full_name: SM::PreProcess#handle
is_singleton: false
name: handle
params: (text) {|directive, param| ...}
visibility: public
ri/1.8/system/SM/PreProcess/include_file-i.yaml000064400000000422150403661750015155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Include a file, indenting it correctly
full_name: SM::PreProcess#include_file
is_singleton: false
name: include_file
params: (name, indent)
visibility: private
ri/1.8/system/SM/ToLaTeX/l-i.yaml000064400000000244150403661750012163 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#l
is_singleton: false
name: l
params: (arg)
visibility: public
ri/1.8/system/SM/ToLaTeX/l-c.yaml000064400000000244150403661750012155 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX::l
is_singleton: true
name: l
params: (str)
visibility: public
ri/1.8/system/SM/ToLaTeX/accept_blank_line-i.yaml000064400000000315150403661750015344 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_blank_line
is_singleton: false
name: accept_blank_line
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/init_tags-i.yaml000064400000000410150403661750013704 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Set up the standard mapping of attributes to LaTeX
full_name: SM::ToLaTeX#init_tags
is_singleton: false
name: init_tags
params: ()
visibility: public
ri/1.8/system/SM/ToLaTeX/on_tags-i.yaml000064400000000272150403661750013363 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: SM::ToLaTeX#on_tags
is_singleton: false
name: on_tags
params: (res, item)
visibility: private
ri/1.8/system/SM/ToLaTeX/accept_list_start-i.yaml000064400000000315150403661750015436 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_list_start
is_singleton: false
name: accept_list_start
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/convert_heading-i.yaml000064400000000311150403661750015062 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#convert_heading
is_singleton: false
name: convert_heading
params: (level, flow)
visibility: private
ri/1.8/system/SM/ToLaTeX/cdesc-ToLaTeX.yaml000064400000006251150403661750014045 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: l
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert SimpleMarkup to basic LaTeX report format
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: BS
  value: "\"\\020\""
- !ruby/object:RI::Constant 
  comment: 
  name: CB
  value: "\"\\022\""
- !ruby/object:RI::Constant 
  comment: 
  name: DL
  value: "\"\\023\""
- !ruby/object:RI::Constant 
  comment: 
  name: BACKSLASH
  value: "\"#{BS}symbol#{OB}92#{CB}\""
- !ruby/object:RI::Constant 
  comment: 
  name: HAT
  value: "\"#{BS}symbol#{OB}94#{CB}\""
- !ruby/object:RI::Constant 
  comment: 
  name: BACKQUOTE
  value: "\"#{BS}symbol#{OB}0#{CB}\""
- !ruby/object:RI::Constant 
  comment: 
  name: TILDE
  value: "\"#{DL}#{BS}sim#{DL}\""
- !ruby/object:RI::Constant 
  comment: 
  name: LESSTHAN
  value: "\"#{DL}<#{DL}\""
- !ruby/object:RI::Constant 
  comment: 
  name: GREATERTHAN
  value: "\"#{DL}>#{DL}\""
- !ruby/object:RI::Constant 
  comment: 
  name: LIST_TYPE_TO_LATEX
  value: "{       ListBase::BULLET =>  [ l(\"\\\\begin{itemize}\"), l(\"\\\\end{itemize}\") ],       ListBase::NUMBER =>  [ l(\"\\\\begin{enumerate}\"), l(\"\\\\end{enumerate}\"), \"\\\\arabic\" ],       ListBase::UPPERALPHA =>  [ l(\"\\\\begin{enumerate}\"), l(\"\\\\end{enumerate}\"), \"\\\\Alph\" ],       ListBase::LOWERALPHA =>  [ l(\"\\\\begin{enumerate}\"), l(\"\\\\end{enumerate}\"), \"\\\\alph\" ],       ListBase::LABELED => [ l(\"\\\\begin{description}\"), l(\"\\\\end{description}\") ],       ListBase::NOTE    => [         l(\"\\\\begin{tabularx}{\\\\linewidth}{@{} l X @{}}\"),          l(\"\\\\end{tabularx}\") ],     }"
- !ruby/object:RI::Constant 
  comment: 
  name: InlineTag
  value: Struct.new(:bit, :on, :off)
full_name: SM::ToLaTeX
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: accept_blank_line
- !ruby/object:RI::MethodSummary 
  name: accept_heading
- !ruby/object:RI::MethodSummary 
  name: accept_list_end
- !ruby/object:RI::MethodSummary 
  name: accept_list_item
- !ruby/object:RI::MethodSummary 
  name: accept_list_start
- !ruby/object:RI::MethodSummary 
  name: accept_paragraph
- !ruby/object:RI::MethodSummary 
  name: accept_rule
- !ruby/object:RI::MethodSummary 
  name: accept_verbatim
- !ruby/object:RI::MethodSummary 
  name: add_tag
- !ruby/object:RI::MethodSummary 
  name: convert_flow
- !ruby/object:RI::MethodSummary 
  name: convert_heading
- !ruby/object:RI::MethodSummary 
  name: convert_special
- !ruby/object:RI::MethodSummary 
  name: convert_string
- !ruby/object:RI::MethodSummary 
  name: end_accepting
- !ruby/object:RI::MethodSummary 
  name: escape
- !ruby/object:RI::MethodSummary 
  name: init_tags
- !ruby/object:RI::MethodSummary 
  name: l
- !ruby/object:RI::MethodSummary 
  name: list_end_for
- !ruby/object:RI::MethodSummary 
  name: list_item_start
- !ruby/object:RI::MethodSummary 
  name: list_name
- !ruby/object:RI::MethodSummary 
  name: off_tags
- !ruby/object:RI::MethodSummary 
  name: on_tags
- !ruby/object:RI::MethodSummary 
  name: start_accepting
- !ruby/object:RI::MethodSummary 
  name: wrap
name: ToLaTeX
superclass: Object
ri/1.8/system/SM/ToLaTeX/off_tags-i.yaml000064400000000271150403661750013520 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#off_tags
is_singleton: false
name: off_tags
params: (res, item)
visibility: private
ri/1.8/system/SM/ToLaTeX/convert_flow-i.yaml000064400000000274150403661750014442 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#convert_flow
is_singleton: false
name: convert_flow
params: (flow)
visibility: private
ri/1.8/system/SM/ToLaTeX/new-c.yaml000064400000000245150403661750012514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/SM/ToLaTeX/start_accepting-i.yaml000064400000000417150403661750015104 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Here's the client side of the visitor pattern
full_name: SM::ToLaTeX#start_accepting
is_singleton: false
name: start_accepting
params: ()
visibility: public
ri/1.8/system/SM/ToLaTeX/list_item_start-i.yaml000064400000000312150403661750015132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#list_item_start
is_singleton: false
name: list_item_start
params: (am, fragment)
visibility: private
ri/1.8/system/SM/ToLaTeX/escape-i.yaml000064400000000350150403661750013166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Escape a LaTeX string
full_name: SM::ToLaTeX#escape
is_singleton: false
name: escape
params: (str)
visibility: public
ri/1.8/system/SM/ToLaTeX/wrap-i.yaml000064400000000421150403661750012676 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This is a higher speed (if messier) version of wrap
full_name: SM::ToLaTeX#wrap
is_singleton: false
name: wrap
params: (txt, line_len = 76)
visibility: public
ri/1.8/system/SM/ToLaTeX/accept_verbatim-i.yaml000064400000000311150403661750015053 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_verbatim
is_singleton: false
name: accept_verbatim
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/end_accepting-i.yaml000064400000000271150403661750014513 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#end_accepting
is_singleton: false
name: end_accepting
params: ()
visibility: public
ri/1.8/system/SM/ToLaTeX/convert_string-i.yaml000064400000000431150403661750014774 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: some of these patterns are taken from SmartyPants...
full_name: SM::ToLaTeX#convert_string
is_singleton: false
name: convert_string
params: (item)
visibility: private
ri/1.8/system/SM/ToLaTeX/accept_paragraph-i.yaml000064400000000313150403661750015211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_paragraph
is_singleton: false
name: accept_paragraph
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/add_tag-i.yaml000064400000000505150403661750013313 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Add a new set of LaTeX tags for an attribute. We allow separate start and end tags for flexibility
full_name: SM::ToLaTeX#add_tag
is_singleton: false
name: add_tag
params: (name, start, stop)
visibility: public
ri/1.8/system/SM/ToLaTeX/accept_rule-i.yaml000064400000000301150403661750014210 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_rule
is_singleton: false
name: accept_rule
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/list_name-i.yaml000064400000000310150403661750013675 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#list_name
is_singleton: false
name: list_name
params: (list_type, is_open_tag)
visibility: private
ri/1.8/system/SM/ToLaTeX/accept_list_item-i.yaml000064400000000313150403661750015235 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_list_item
is_singleton: false
name: accept_list_item
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/list_end_for-i.yaml000064400000000305150403661750014375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#list_end_for
is_singleton: false
name: list_end_for
params: (fragment_type)
visibility: private
ri/1.8/system/SM/ToLaTeX/accept_heading-i.yaml000064400000000307150403661750014646 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_heading
is_singleton: false
name: accept_heading
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/accept_list_end-i.yaml000064400000000311150403661750015043 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#accept_list_end
is_singleton: false
name: accept_list_end
params: (am, fragment)
visibility: public
ri/1.8/system/SM/ToLaTeX/convert_special-i.yaml000064400000000305150403661750015106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: SM::ToLaTeX#convert_special
is_singleton: false
name: convert_special
params: (special)
visibility: private
ri/1.8/system/Comparable/%3c-i.yaml000064400000000517150403661750012553 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares two objects based on the receiver's <tt>&lt;=&gt;</tt> method, returning true if it returns -1.
full_name: Comparable#<
is_singleton: false
name: <
params: |
  obj < other    => true or false

visibility: public
ri/1.8/system/Comparable/%3c%3d-i.yaml000064400000000527150403661750013050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares two objects based on the receiver's <tt>&lt;=&gt;</tt> method, returning true if it returns -1 or 0.
full_name: Comparable#<=
is_singleton: false
name: <=
params: |
  obj <= other    => true or false

visibility: public
ri/1.8/system/Comparable/%3e%3d-i.yaml000064400000000530150403661750013044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares two objects based on the receiver's <tt>&lt;=&gt;</tt> method, returning true if it returns 0 or 1.
full_name: Comparable#>=
is_singleton: false
name: ">="
params: |
  obj >= other    => true or false

visibility: public
ri/1.8/system/Comparable/cdesc-Comparable.yaml000064400000003273150403661750015101 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>Comparable</tt> mixin is used by classes whose objects may be ordered. The class must define the <tt>&lt;=&gt;</tt> operator, which compares the receiver against another object, returning -1, 0, or +1 depending on whether the receiver is less than, equal to, or greater than the other object. <tt>Comparable</tt> uses <tt>&lt;=&gt;</tt> to implement the conventional comparison operators (<tt>&lt;</tt>, <tt>&lt;=</tt>, <tt>==</tt>, <tt>&gt;=</tt>, and <tt>&gt;</tt>) and the method <tt>between?</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   class SizeMatters\n     include Comparable\n     attr :str\n     def &lt;=&gt;(anOther)\n       str.size &lt;=&gt; anOther.str.size\n     end\n     def initialize(str)\n       @str = str\n     end\n     def inspect\n       @str\n     end\n   end\n\n   s1 = SizeMatters.new(&quot;Z&quot;)\n   s2 = SizeMatters.new(&quot;YY&quot;)\n   s3 = SizeMatters.new(&quot;XXX&quot;)\n   s4 = SizeMatters.new(&quot;WWWW&quot;)\n   s5 = SizeMatters.new(&quot;VVVVV&quot;)\n\n   s1 &lt; s2                       #=&gt; true\n   s4.between?(s1, s3)           #=&gt; false\n   s4.between?(s3, s5)           #=&gt; true\n   [ s3, s2, s5, s4, s1 ].sort   #=&gt; [Z, YY, XXX, WWWW, VVVVV]\n"
constants: []

full_name: Comparable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: <
- !ruby/object:RI::MethodSummary 
  name: <=
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: ">"
- !ruby/object:RI::MethodSummary 
  name: ">="
- !ruby/object:RI::MethodSummary 
  name: between?
name: Comparable
superclass: 
ri/1.8/system/Comparable/%3e-i.yaml000064400000000520150403661750012547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares two objects based on the receiver's <tt>&lt;=&gt;</tt> method, returning true if it returns 1.
full_name: Comparable#>
is_singleton: false
name: ">"
params: |
  obj > other    => true or false

visibility: public
ri/1.8/system/Comparable/%3d%3d-i.yaml000064400000000633150403661750013047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compares two objects based on the receiver's <tt>&lt;=&gt;</tt> method, returning true if it returns 0. Also returns true if <em>obj</em> and <em>other</em> are the same object.
full_name: Comparable#==
is_singleton: false
name: ==
params: |
  obj == other    => true or false

visibility: public
ri/1.8/system/Comparable/between%3f-i.yaml000064400000001247150403661750014131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>false</tt> if <em>obj</em> <tt>&lt;=&gt;</tt> <em>min</em> is less than zero or if <em>anObject</em> <tt>&lt;=&gt;</tt> <em>max</em> is greater than zero, <tt>true</tt> otherwise.
- !ruby/struct:SM::Flow::VERB 
  body: "   3.between?(1, 5)               #=&gt; true\n   6.between?(1, 5)               #=&gt; false\n   'cat'.between?('ant', 'dog')   #=&gt; true\n   'gnu'.between?('ant', 'dog')   #=&gt; false\n"
full_name: Comparable#between?
is_singleton: false
name: between?
params: |
  obj.between?(min, max)    => true or false

visibility: public
ri/1.8/system/WadlerExample/cdesc-WadlerExample.yaml000064400000000325150403661750016246 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WadlerExample
includes: []

instance_methods: []

name: WadlerExample
superclass: Test::Unit::TestCase
ri/1.8/system/WadlerExample/Tree/cdesc-Tree.yaml000064400000000304150403661750015307 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: WadlerExample::Tree
includes: []

instance_methods: []

name: Tree
superclass: Object
ri/1.8/system/NeedlessArgument/cdesc-NeedlessArgument.yaml000064400000000474150403661750017501 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises when there is an argument for a switch which takes no argument.
constants: []

full_name: NeedlessArgument
includes: []

instance_methods: []

name: NeedlessArgument
superclass: ParseError
ri/1.8/system/GC/stress%3d-c.yaml000064400000000746150403661750012242 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: updates GC stress mode.
- !ruby/struct:SM::Flow::P 
  body: "When GC.stress = true, GC is invoked for all GC opportunity: all memory and object allocation."
- !ruby/struct:SM::Flow::P 
  body: Since it makes Ruby very slow, it is only for debugging.
full_name: GC::stress=
is_singleton: true
name: stress=
params: |
  GC.stress = bool          => bool

visibility: public
ri/1.8/system/GC/garbage_collect-i.yaml000064400000000602150403661750013515 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initiates garbage collection, unless manually disabled.
full_name: GC#garbage_collect
is_singleton: false
name: garbage_collect
params: |
  GC.start                     => nil
  gc.garbage_collect           => nil
  ObjectSpace.garbage_collect  => nil

visibility: public
ri/1.8/system/GC/cdesc-GC.yaml000064400000001264150403661750011547 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: disable
- !ruby/object:RI::MethodSummary 
  name: enable
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: stress
- !ruby/object:RI::MethodSummary 
  name: stress=
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>GC</tt> module provides an interface to Ruby's mark and sweep garbage collection mechanism. Some of the underlying methods are also available via the <tt>ObjectSpace</tt> module.
constants: []

full_name: GC
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: garbage_collect
name: GC
superclass: 
ri/1.8/system/GC/stress-c.yaml000064400000000435150403661750011741 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: returns current status of GC stress mode.
full_name: GC::stress
is_singleton: true
name: stress
params: |
  GC.stress                 => true or false

visibility: public
ri/1.8/system/GC/disable-c.yaml000064400000000657150403661750012027 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Disables garbage collection, returning <tt>true</tt> if garbage collection was already disabled.
- !ruby/struct:SM::Flow::VERB 
  body: "   GC.disable   #=&gt; false\n   GC.disable   #=&gt; true\n"
full_name: GC::disable
is_singleton: true
name: disable
params: |
  GC.disable    => true or false

visibility: public
ri/1.8/system/GC/enable-c.yaml000064400000000714150403661750011644 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Enables garbage collection, returning <tt>true</tt> if garbage collection was previously disabled.
- !ruby/struct:SM::Flow::VERB 
  body: "   GC.disable   #=&gt; false\n   GC.enable    #=&gt; true\n   GC.enable    #=&gt; false\n"
full_name: GC::enable
is_singleton: true
name: enable
params: |
  GC.enable    => true or false

visibility: public
ri/1.8/system/GC/start-c.yaml000064400000000556150403661750011557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initiates garbage collection, unless manually disabled.
full_name: GC::start
is_singleton: true
name: start
params: |
  GC.start                     => nil
  gc.garbage_collect           => nil
  ObjectSpace.garbage_collect  => nil

visibility: public
ri/1.8/system/Ping/cdesc-Ping.yaml000064400000001711150403661750012554 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Ping contains routines to test for the reachability of remote hosts. Currently the only routine implemented is pingecho().
- !ruby/struct:SM::Flow::P 
  body: Ping.pingecho uses a TCP echo (not an ICMP echo) to determine if the remote host is reachable. This is usually adequate to tell that a remote host is available to telnet, ftp, or ssh to.
- !ruby/struct:SM::Flow::P 
  body: "Warning: Ping.pingecho may block for a long time if DNS resolution is slow. Requiring 'resolv-replace' allows non-blocking name resolution."
- !ruby/struct:SM::Flow::P 
  body: "Usage:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'ping'\n\n  puts &quot;'jimmy' is alive and kicking&quot; if Ping.pingecho('jimmy', 10)\n"
constants: []

full_name: Ping
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: pingecho
name: Ping
superclass: 
ri/1.8/system/Ping/pingecho-i.yaml000064400000001113150403661750012616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return true if we can open a connection to the hostname or IP address <tt>host</tt> on port <tt>service</tt> (which defaults to the &quot;echo&quot; port) waiting up to <tt>timeout</tt> seconds.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'ping'\n\n  Ping.pingecho &quot;google.com&quot;, 10, 80\n"
full_name: Ping#pingecho
is_singleton: false
name: pingecho
params: (host, timeout=5, service="echo")
visibility: public
ri/1.8/system/NameDescriptor/new-c.yaml000064400000001625150403661750013637 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: arg may be
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: a class or module name (optionally qualified with other class or module names (Kernel, File::Stat etc)
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: a method name
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: a method name qualified by a optionally fully qualified class or module name
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: "We're fairly casual about delimiters: folks can say Kernel::puts, Kernel.puts, or Kernel\\#puts for example. There's one exception: if you say IO::read, we look for a class method, but if you say IO.read, we look for an instance method"
full_name: NameDescriptor::new
is_singleton: true
name: new
params: (arg)
visibility: public
ri/1.8/system/NameDescriptor/full_class_name-i.yaml000064400000000513150403661750016176 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the full class name (with '::' between the components) or &quot;&quot; if there's no class name
full_name: NameDescriptor#full_class_name
is_singleton: false
name: full_class_name
params: ()
visibility: public
ri/1.8/system/NameDescriptor/cdesc-NameDescriptor.yaml000064400000001361150403661750016621 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: class_names
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: true and false have the obvious meaning. nil means we don't care
  name: is_class_method
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: method_name
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Break argument into its constituent class or module names, an optional method type, and a method name
constants: []

full_name: NameDescriptor
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: full_class_name
name: NameDescriptor
superclass: Object
ri/1.8/system/Time/_load-c.yaml000064400000000416150403661760012101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unmarshal a dumped <tt>Time</tt> object.
full_name: Time::_load
is_singleton: true
name: _load
params: |
  Time._load(string)   => time

visibility: public
ri/1.8/system/Time/utc-i.yaml000064400000001267150403661760011631 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>time</em> to UTC (GMT), modifying the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.gmt?         #=&gt; false\n   t.gmtime       #=&gt; Wed Apr 09 13:56:03 UTC 2003\n   t.gmt?         #=&gt; true\n\n   t = Time.now   #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.utc?         #=&gt; false\n   t.utc          #=&gt; Wed Apr 09 13:56:04 UTC 2003\n   t.utc?         #=&gt; true\n"
full_name: Time#utc
is_singleton: false
name: utc
params: |
  time.gmtime    => time
  time.utc       => time

visibility: public
ri/1.8/system/Time/tv_sec-i.yaml000064400000000755150403661760012322 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of <em>time</em> as an integer number of seconds since epoch.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now\n   &quot;%10.5f&quot; % t.to_f   #=&gt; &quot;1049896564.17839&quot;\n   t.to_i              #=&gt; 1049896564\n"
full_name: Time#tv_sec
is_singleton: false
name: tv_sec
params: |
  time.to_i   => int
  time.tv_sec => int

visibility: public
ri/1.8/system/Time/mon-i.yaml000064400000000702150403661760011620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the month of the year (1..12) for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.mon          #=&gt; 4\n   t.month        #=&gt; 4\n"
full_name: Time#mon
is_singleton: false
name: mon
params: |
  time.mon   => fixnum
  time.month => fixnum

visibility: public
ri/1.8/system/Time/gmtime-i.yaml000064400000001275150403661760012317 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>time</em> to UTC (GMT), modifying the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.gmt?         #=&gt; false\n   t.gmtime       #=&gt; Wed Apr 09 13:56:03 UTC 2003\n   t.gmt?         #=&gt; true\n\n   t = Time.now   #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.utc?         #=&gt; false\n   t.utc          #=&gt; Wed Apr 09 13:56:04 UTC 2003\n   t.utc?         #=&gt; true\n"
full_name: Time#gmtime
is_singleton: false
name: gmtime
params: |
  time.gmtime    => time
  time.utc       => time

visibility: public
ri/1.8/system/Time/day-i.yaml000064400000000676150403661760011616 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the day of the month (1..n) for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.day          #=&gt; 9\n   t.mday         #=&gt; 9\n"
full_name: Time#day
is_singleton: false
name: day
params: |
  time.day  => fixnum
  time.mday => fixnum

visibility: public
ri/1.8/system/Time/eql%3f-i.yaml000064400000000547150403661760012115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if <em>time</em> and <em>other_time</em> are both <tt>Time</tt> objects with the same seconds and fractional seconds.
full_name: Time#eql?
is_singleton: false
name: eql?
params: |
  time.eql?(other_time)

visibility: public
ri/1.8/system/Time/ctime-i.yaml000064400000000641150403661760012132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a canonical string representation of <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.now.asctime   #=&gt; &quot;Wed Apr  9 08:56:03 2003&quot;\n"
full_name: Time#ctime
is_singleton: false
name: ctime
params: |
  time.asctime => string
  time.ctime   => string

visibility: public
ri/1.8/system/Time/isdst-i.yaml000064400000001106150403661760012154 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>time</em> occurs during Daylight Saving Time in its time zone.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.local(2000, 7, 1).isdst   #=&gt; true\n   Time.local(2000, 1, 1).isdst   #=&gt; false\n   Time.local(2000, 7, 1).dst?    #=&gt; true\n   Time.local(2000, 1, 1).dst?    #=&gt; false\n"
full_name: Time#isdst
is_singleton: false
name: isdst
params: |
  time.isdst => true or false
  time.dst?  => true or false

visibility: public
ri/1.8/system/Time/iso8601-i.yaml000064400000000362150403661760012142 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #xmlschema"
full_name: Time#iso8601
is_singleton: false
name: iso8601
params: (fraction_digits=0)
visibility: public
ri/1.8/system/Time/mday-i.yaml000064400000000700150403661760011757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the day of the month (1..n) for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.day          #=&gt; 9\n   t.mday         #=&gt; 9\n"
full_name: Time#mday
is_singleton: false
name: mday
params: |
  time.day  => fixnum
  time.mday => fixnum

visibility: public
ri/1.8/system/Time/w3cdtf-c.yaml000064400000000250150403661760012211 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time::w3cdtf
is_singleton: true
name: w3cdtf
params: (date)
visibility: public
ri/1.8/system/Time/%3c%3d%3e-i.yaml000064400000001265150403661760012177 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Comparison---Compares <em>time</em> with <em>other_time</em> or with <em>numeric</em>, which is the number of seconds (possibly fractional) since epoch.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now       #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t2 = t + 2592000   #=&gt; Fri May 09 08:56:03 CDT 2003\n   t &lt;=&gt; t2           #=&gt; -1\n   t2 &lt;=&gt; t           #=&gt; 1\n   t &lt;=&gt; t            #=&gt; 0\n"
full_name: Time#<=>
is_singleton: false
name: <=>
params: |
  time <=> other_time => -1, 0, +1 
  time <=> numeric    => -1, 0, +1

visibility: public
ri/1.8/system/Time/at-c.yaml000064400000001321150403661760011423 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new time object with the value given by <em>aTime</em>, or the given number of <em>seconds</em> (and optional <em>microseconds</em>) from epoch. A non-portable feature allows the offset to be negative on some systems.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.at(0)            #=&gt; Wed Dec 31 18:00:00 CST 1969\n   Time.at(946702800)    #=&gt; Fri Dec 31 23:00:00 CST 1999\n   Time.at(-284061600)   #=&gt; Sat Dec 31 00:00:00 CST 1960\n"
full_name: Time::at
is_singleton: true
name: at
params: |
  Time.at( aTime ) => time
  Time.at( seconds [, microseconds] ) => time

visibility: public
ri/1.8/system/Time/to_i-i.yaml000064400000000751150403661760011765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of <em>time</em> as an integer number of seconds since epoch.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now\n   &quot;%10.5f&quot; % t.to_f   #=&gt; &quot;1049896564.17839&quot;\n   t.to_i              #=&gt; 1049896564\n"
full_name: Time#to_i
is_singleton: false
name: to_i
params: |
  time.to_i   => int
  time.tv_sec => int

visibility: public
ri/1.8/system/Time/w3cdtf-i.yaml000064400000000244150403661760012222 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time#w3cdtf
is_singleton: false
name: w3cdtf
params: ()
visibility: public
ri/1.8/system/Time/mktime-c.yaml000064400000001152150403661760012307 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>Time::gm</tt>, but interprets the values in the local time zone.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.local(2000,&quot;jan&quot;,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 CST 2000\n"
full_name: Time::mktime
is_singleton: true
name: mktime
params: |
  Time.local( year [, month, day, hour, min, sec, usec] ) => time
  Time.local( sec, min, hour, day, month, year, wday, yday, isdst,
  tz ) => time
  Time.mktime( year, month, day, hour, min, sec, usec )   => time

visibility: public
ri/1.8/system/Time/to_a-i.yaml000064400000001341150403661760011751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a ten-element <em>array</em> of values for <em>time</em>: {<tt>[ sec, min, hour, day, month, year, wday, yday, isdst, zone ]</tt>}. See the individual methods for an explanation of the valid ranges of each value. The ten elements can be passed directly to <tt>Time::utc</tt> or <tt>Time::local</tt> to create a new <tt>Time</tt>."
- !ruby/struct:SM::Flow::VERB 
  body: "   now = Time.now   #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t = now.to_a     #=&gt; [4, 56, 8, 9, 4, 2003, 3, 99, true, &quot;CDT&quot;]\n"
full_name: Time#to_a
is_singleton: false
name: to_a
params: |
  time.to_a => array

visibility: public
ri/1.8/system/Time/hour-i.yaml000064400000000616150403661760012010 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the hour of the day (0..23) for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.hour         #=&gt; 8\n"
full_name: Time#hour
is_singleton: false
name: hour
params: |
  time.hour => fixnum

visibility: public
ri/1.8/system/Time/times-c.yaml000064400000000420150403661760012137 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Deprecated in favor of <tt>Process::times</tt>
full_name: Time::times
is_singleton: true
name: times
params: |
  Time.times => struct_tms

visibility: public
ri/1.8/system/Time/to_datetime-i.yaml000064400000000257150403661760013332 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time#to_datetime
is_singleton: false
name: to_datetime
params: ()
visibility: private
ri/1.8/system/Time/apply_offset-c.yaml000064400000000324150403661760013514 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time::apply_offset
is_singleton: true
name: apply_offset
params: (year, mon, day, hour, min, sec, off)
visibility: private
ri/1.8/system/Time/gm-c.yaml000064400000002177150403661760011434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a time based on given values, interpreted as UTC (GMT). The year must be specified. Other values default to the minimum value for that field (and may be <tt>nil</tt> or omitted). Months may be specified by numbers from 1 to 12, or by the three-letter English month names. Hours are specified on a 24-hour clock (0..23). Raises an <tt>ArgumentError</tt> if any values are out of range. Will also accept ten arguments in the order output by <tt>Time#to_a</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.utc(2000,&quot;jan&quot;,1,20,15,1)  #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   Time.gm(2000,&quot;jan&quot;,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n"
full_name: Time::gm
is_singleton: true
name: gm
params: |
  Time.utc( year [, month, day, hour, min, sec, usec] ) => time
  Time.utc( sec, min, hour, day, month, year, wday, yday, isdst, tz
  ) => time
  Time.gm( year [, month, day, hour, min, sec, usec] ) => time
  Time.gm( sec, min, hour, day, month, year, wday, yday, isdst, tz
  ) => time

visibility: public
ri/1.8/system/Time/sec-i.yaml000064400000001137150403661760011604 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the second of the minute (0..60)<em>[Yes, seconds really can range from zero to 60. This allows the system to inject leap seconds every now and then to correct for the fact that years are not really a convenient number of hours long.]</em> for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.sec          #=&gt; 4\n"
full_name: Time#sec
is_singleton: false
name: sec
params: |
  time.sec => fixnum

visibility: public
ri/1.8/system/Time/to_yaml-i.yaml000064400000000261150403661760012473 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Time/month_days-c.yaml000064400000000261150403661760013166 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time::month_days
is_singleton: true
name: month_days
params: (y, m)
visibility: private
ri/1.8/system/Time/hash-i.yaml000064400000000405150403661760011752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a hash code for this time object.
full_name: Time#hash
is_singleton: false
name: hash
params: |
  time.hash   => fixnum

visibility: public
ri/1.8/system/Time/parse-c.yaml000064400000005174150403661760012143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (year)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>date</tt> using Date._parse and converts it to a Time object.
- !ruby/struct:SM::Flow::P 
  body: "If a block is given, the year described in <tt>date</tt> is converted by the block. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "    Time.parse(...) {|y| y &lt; 100 ? (y &gt;= 69 ? y + 1900 : y + 2000) : y}\n"
- !ruby/struct:SM::Flow::P 
  body: "If the upper components of the given time are broken or missing, they are supplied with those of <tt>now</tt>. For the lower components, the minimum values (1 or 0) are assumed if broken or missing. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "    # Suppose it is &quot;Thu Nov 29 14:33:20 GMT 2001&quot; now and\n    # your timezone is GMT:\n    Time.parse(&quot;16:30&quot;)     #=&gt; Thu Nov 29 16:30:00 GMT 2001\n    Time.parse(&quot;7/23&quot;)      #=&gt; Mon Jul 23 00:00:00 GMT 2001\n    Time.parse(&quot;Aug 31&quot;)    #=&gt; Fri Aug 31 00:00:00 GMT 2001\n"
- !ruby/struct:SM::Flow::P 
  body: "Since there are numerous conflicts among locally defined timezone abbreviations all over the world, this method is not made to understand all of them. For example, the abbreviation &quot;CST&quot; is used variously as:"
- !ruby/struct:SM::Flow::VERB 
  body: "    -06:00 in America/Chicago,\n    -05:00 in America/Havana,\n    +08:00 in Asia/Harbin,\n    +09:30 in Australia/Darwin,\n    +10:30 in Australia/Adelaide,\n    etc.\n"
- !ruby/struct:SM::Flow::P 
  body: Based on the fact, this method only understands the timezone abbreviations described in RFC 822 and the system timezone, in the order named. (i.e. a definition in RFC 822 overrides the system timezone definition.) The system timezone is taken from <tt>Time.local(year, 1, 1).zone</tt> and <tt>Time.local(year, 7, 1).zone</tt>. If the extracted timezone abbreviation does not match any of them, it is ignored and the given time is regarded as a local time.
- !ruby/struct:SM::Flow::P 
  body: ArgumentError is raised if Date._parse cannot extract information from <tt>date</tt> or Time class cannot represent specified date.
- !ruby/struct:SM::Flow::P 
  body: "This method can be used as fail-safe for other parsing methods as:"
- !ruby/struct:SM::Flow::VERB 
  body: "  Time.rfc2822(date) rescue Time.parse(date)\n  Time.httpdate(date) rescue Time.parse(date)\n  Time.xmlschema(date) rescue Time.parse(date)\n"
- !ruby/struct:SM::Flow::P 
  body: A failure for Time.parse should be checked, though.
full_name: Time::parse
is_singleton: true
name: parse
params: (date, now=self.now) {|year| ...}
visibility: public
ri/1.8/system/Time/utc_offset-i.yaml000064400000001212150403661760013165 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the offset in seconds between the timezone of <em>time</em> and UTC.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.gm(2000,1,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.gmt_offset                    #=&gt; 0\n   l = t.getlocal                  #=&gt; Sat Jan 01 14:15:01 CST 2000\n   l.gmt_offset                    #=&gt; -21600\n"
full_name: Time#utc_offset
is_singleton: false
name: utc_offset
params: |
  time.gmt_offset => fixnum
  time.gmtoff     => fixnum
  time.utc_offset => fixnum

visibility: public
ri/1.8/system/Time/gmt%3f-i.yaml000064400000001575150403661760012125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>time</em> represents a time in UTC (GMT).
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now                        #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.utc?                              #=&gt; false\n   t = Time.gm(2000,&quot;jan&quot;,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.utc?                              #=&gt; true\n\n   t = Time.now                        #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.gmt?                              #=&gt; false\n   t = Time.gm(2000,1,1,20,15,1)       #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.gmt?                              #=&gt; true\n"
full_name: Time#gmt?
is_singleton: false
name: gmt?
params: |
  time.utc? => true or false
  time.gmt? => true or false

visibility: public
ri/1.8/system/Time/tv_usec-i.yaml000064400000001004150403661770012474 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns just the number of microseconds for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now        #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   &quot;%10.6f&quot; % t.to_f   #=&gt; &quot;1049896564.259970&quot;\n   t.usec              #=&gt; 259970\n"
full_name: Time#tv_usec
is_singleton: false
name: tv_usec
params: |
  time.usec    => int
  time.tv_usec => int

visibility: public
ri/1.8/system/Time/getutc-i.yaml000064400000001240150403661770012321 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new <tt>new_time</tt> object representing <em>time</em> in UTC.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.local(2000,1,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 CST 2000\n   t.gmt?                             #=&gt; false\n   y = t.getgm                        #=&gt; Sun Jan 02 02:15:01 UTC 2000\n   y.gmt?                             #=&gt; true\n   t == y                             #=&gt; true\n"
full_name: Time#getutc
is_singleton: false
name: getutc
params: |
  time.getgm  => new_time
  time.getutc => new_time

visibility: public
ri/1.8/system/Time/yaml_new-c.yaml000064400000000271150403661770012636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time::yaml_new
is_singleton: true
name: yaml_new
params: ( klass, tag, val )
visibility: public
ri/1.8/system/Time/min-i.yaml000064400000000617150403661770011620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the minute of the hour (0..59) for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.min          #=&gt; 56\n"
full_name: Time#min
is_singleton: false
name: min
params: |
  time.min => fixnum

visibility: public
ri/1.8/system/Time/to_date-i.yaml000064400000000346150403661770012453 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: def to_time() getlocal end
full_name: Time#to_date
is_singleton: false
name: to_date
params: ()
visibility: private
ri/1.8/system/Time/year-i.yaml000064400000000626150403661770011775 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the year for <em>time</em> (including the century).
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.year         #=&gt; 2003\n"
full_name: Time#year
is_singleton: false
name: year
params: |
  time.year => fixnum

visibility: public
ri/1.8/system/Time/strftime-i.yaml000064400000003425150403661770012672 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Formats <em>time</em> according to the directives in the given format string. Any text not listed as a directive will be passed through to the output string.
- !ruby/struct:SM::Flow::P 
  body: "Format meaning:"
- !ruby/struct:SM::Flow::VERB 
  body: "  %a - The abbreviated weekday name (``Sun'')\n  %A - The  full  weekday  name (``Sunday'')\n  %b - The abbreviated month name (``Jan'')\n  %B - The  full  month  name (``January'')\n  %c - The preferred local date and time representation\n  %d - Day of the month (01..31)\n  %H - Hour of the day, 24-hour clock (00..23)\n  %I - Hour of the day, 12-hour clock (01..12)\n  %j - Day of the year (001..366)\n  %m - Month of the year (01..12)\n  %M - Minute of the hour (00..59)\n  %p - Meridian indicator (``AM''  or  ``PM'')\n  %S - Second of the minute (00..60)\n  %U - Week  number  of the current year,\n          starting with the first Sunday as the first\n          day of the first week (00..53)\n  %W - Week  number  of the current year,\n          starting with the first Monday as the first\n          day of the first week (00..53)\n  %w - Day of the week (Sunday is 0, 0..6)\n  %x - Preferred representation for the date alone, no time\n  %X - Preferred representation for the time alone, no date\n  %y - Year without a century (00..99)\n  %Y - Year with century\n  %Z - Time zone name\n  %% - Literal ``%'' character\n\n   t = Time.now\n   t.strftime(&quot;Printed on %m/%d/%Y&quot;)   #=&gt; &quot;Printed on 04/09/2003&quot;\n   t.strftime(&quot;at %I:%M%p&quot;)            #=&gt; &quot;at 08:56AM&quot;\n"
full_name: Time#strftime
is_singleton: false
name: strftime
params: |
  time.strftime( string ) => string

visibility: public
ri/1.8/system/Time/inspect-i.yaml000064400000001057150403661770012501 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string representing <em>time</em>. Equivalent to calling <tt>Time#strftime</tt> with a format string of ``<tt>%a</tt> <tt>%b</tt> <tt>%d</tt> <tt>%H:%M:%S</tt> <tt>%Z</tt> <tt>%Y</tt>''.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.now.to_s   #=&gt; &quot;Wed Apr 09 08:56:04 CDT 2003&quot;\n"
full_name: Time#inspect
is_singleton: false
name: inspect
params: |
  time.inspect => string
  time.to_s    => string

visibility: public
ri/1.8/system/Time/wday-i.yaml000064400000000644150403661770012001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an integer representing the day of the week, 0..6, with Sunday == 0.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.wday         #=&gt; 3\n"
full_name: Time#wday
is_singleton: false
name: wday
params: |
  time.wday => fixnum

visibility: public
ri/1.8/system/Time/localtime-i.yaml000064400000001055150403661770013003 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts <em>time</em> to local time (using the local time zone in effect for this process) modifying the receiver.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.gm(2000, &quot;jan&quot;, 1, 20, 15, 1)\n   t.gmt?        #=&gt; true\n   t.localtime   #=&gt; Sat Jan 01 14:15:01 CST 2000\n   t.gmt?        #=&gt; false\n"
full_name: Time#localtime
is_singleton: false
name: localtime
params: |
  time.localtime => time

visibility: public
ri/1.8/system/Time/httpdate-i.yaml000064400000000723150403661770012650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a string which represents the time as rfc1123-date of HTTP-date defined by RFC 2616:"
- !ruby/struct:SM::Flow::VERB 
  body: "  day-of-week, DD month-name CCYY hh:mm:ss GMT\n"
- !ruby/struct:SM::Flow::P 
  body: Note that the result is always UTC (GMT).
full_name: Time#httpdate
is_singleton: false
name: httpdate
params: ()
visibility: public
ri/1.8/system/Time/local-c.yaml000064400000001150150403661770012112 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Same as <tt>Time::gm</tt>, but interprets the values in the local time zone.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.local(2000,&quot;jan&quot;,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 CST 2000\n"
full_name: Time::local
is_singleton: true
name: local
params: |
  Time.local( year [, month, day, hour, min, sec, usec] ) => time
  Time.local( sec, min, hour, day, month, year, wday, yday, isdst,
  tz ) => time
  Time.mktime( year, month, day, hour, min, sec, usec )   => time

visibility: public
ri/1.8/system/Time/new-c.yaml000064400000001670150403661770011620 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Document-method: now"
- !ruby/struct:SM::Flow::P 
  body: Synonym for <tt>Time.new</tt>. Returns a <tt>Time</tt> object initialized tot he current system time.
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>Time</tt> object initialized to the current system time. <b>Note:</b> The object created will be created using the resolution available on your system clock, and so may include fractional seconds.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Time.new      #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   b = Time.new      #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   a == b            #=&gt; false\n   &quot;%.6f&quot; % a.to_f   #=&gt; &quot;1049896563.230740&quot;\n   &quot;%.6f&quot; % b.to_f   #=&gt; &quot;1049896563.231466&quot;\n"
full_name: Time::new
is_singleton: true
name: new
params: |
  Time.new -> time

visibility: public
ri/1.8/system/Time/marshal_load-i.yaml000064400000000343150403661770013457 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: undocumented
full_name: Time#marshal_load
is_singleton: false
name: marshal_load
params: (p1)
visibility: public
ri/1.8/system/Time/rfc822-i.yaml000064400000000335150403661770012040 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #rfc2822"
full_name: Time#rfc822
is_singleton: false
name: rfc822
params: ()
visibility: public
ri/1.8/system/Time/usec-i.yaml000064400000000776150403661770012002 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns just the number of microseconds for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now        #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   &quot;%10.6f&quot; % t.to_f   #=&gt; &quot;1049896564.259970&quot;\n   t.usec              #=&gt; 259970\n"
full_name: Time#usec
is_singleton: false
name: usec
params: |
  time.usec    => int
  time.tv_usec => int

visibility: public
ri/1.8/system/Time/zone_offset-c.yaml000064400000000306150403661770013343 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time::zone_offset
is_singleton: true
name: zone_offset
params: (zone, year=self.now.year)
visibility: public
ri/1.8/system/Time/cdesc-Time.yaml000064400000012506150403661770012564 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: _load
- !ruby/object:RI::MethodSummary 
  name: apply_offset
- !ruby/object:RI::MethodSummary 
  name: at
- !ruby/object:RI::MethodSummary 
  name: gm
- !ruby/object:RI::MethodSummary 
  name: httpdate
- !ruby/object:RI::MethodSummary 
  name: local
- !ruby/object:RI::MethodSummary 
  name: make_time
- !ruby/object:RI::MethodSummary 
  name: mktime
- !ruby/object:RI::MethodSummary 
  name: month_days
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: now
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: rfc2822
- !ruby/object:RI::MethodSummary 
  name: times
- !ruby/object:RI::MethodSummary 
  name: utc
- !ruby/object:RI::MethodSummary 
  name: w3cdtf
- !ruby/object:RI::MethodSummary 
  name: xmlschema
- !ruby/object:RI::MethodSummary 
  name: yaml_new
- !ruby/object:RI::MethodSummary 
  name: zone_offset
- !ruby/object:RI::MethodSummary 
  name: zone_utc?
comment: 
- !ruby/struct:SM::Flow::P 
  body: Implements the extensions to the Time class that are described in the documentation for the time.rb library.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: ZoneOffset
  value: "{       '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,     }"
- !ruby/object:RI::Constant 
  comment: 
  name: LeapYearMonthDays
  value: "[31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]"
- !ruby/object:RI::Constant 
  comment: 
  name: CommonYearMonthDays
  value: "[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]"
- !ruby/object:RI::Constant 
  comment: 
  name: MonthValue
  value: "{       'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6,       'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' =>10, 'NOV' =>11, 'DEC' =>12"
- !ruby/object:RI::Constant 
  comment: 
  name: RFC2822_DAY_NAME
  value: "[     'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'"
- !ruby/object:RI::Constant 
  comment: 
  name: RFC2822_MONTH_NAME
  value: "[     'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',     'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'"
full_name: Time
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: _dump
- !ruby/object:RI::MethodSummary 
  name: asctime
- !ruby/object:RI::MethodSummary 
  name: ctime
- !ruby/object:RI::MethodSummary 
  name: day
- !ruby/object:RI::MethodSummary 
  name: dst?
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: getgm
- !ruby/object:RI::MethodSummary 
  name: getlocal
- !ruby/object:RI::MethodSummary 
  name: getutc
- !ruby/object:RI::MethodSummary 
  name: gmt?
- !ruby/object:RI::MethodSummary 
  name: gmt_offset
- !ruby/object:RI::MethodSummary 
  name: gmtime
- !ruby/object:RI::MethodSummary 
  name: gmtoff
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: hour
- !ruby/object:RI::MethodSummary 
  name: httpdate
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: isdst
- !ruby/object:RI::MethodSummary 
  name: iso8601
- !ruby/object:RI::MethodSummary 
  name: localtime
- !ruby/object:RI::MethodSummary 
  name: marshal_dump
- !ruby/object:RI::MethodSummary 
  name: marshal_load
- !ruby/object:RI::MethodSummary 
  name: mday
- !ruby/object:RI::MethodSummary 
  name: min
- !ruby/object:RI::MethodSummary 
  name: mon
- !ruby/object:RI::MethodSummary 
  name: month
- !ruby/object:RI::MethodSummary 
  name: rfc2822
- !ruby/object:RI::MethodSummary 
  name: rfc822
- !ruby/object:RI::MethodSummary 
  name: sec
- !ruby/object:RI::MethodSummary 
  name: strftime
- !ruby/object:RI::MethodSummary 
  name: succ
- !ruby/object:RI::MethodSummary 
  name: to_a
- !ruby/object:RI::MethodSummary 
  name: to_date
- !ruby/object:RI::MethodSummary 
  name: to_datetime
- !ruby/object:RI::MethodSummary 
  name: to_f
- !ruby/object:RI::MethodSummary 
  name: to_i
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: tv_sec
- !ruby/object:RI::MethodSummary 
  name: tv_usec
- !ruby/object:RI::MethodSummary 
  name: usec
- !ruby/object:RI::MethodSummary 
  name: utc
- !ruby/object:RI::MethodSummary 
  name: utc?
- !ruby/object:RI::MethodSummary 
  name: utc_offset
- !ruby/object:RI::MethodSummary 
  name: w3cdtf
- !ruby/object:RI::MethodSummary 
  name: wday
- !ruby/object:RI::MethodSummary 
  name: xmlschema
- !ruby/object:RI::MethodSummary 
  name: yday
- !ruby/object:RI::MethodSummary 
  name: year
- !ruby/object:RI::MethodSummary 
  name: zone
name: Time
superclass: Object
ri/1.8/system/Time/gmtoff-i.yaml000064400000001202150403661770012306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the offset in seconds between the timezone of <em>time</em> and UTC.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.gm(2000,1,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.gmt_offset                    #=&gt; 0\n   l = t.getlocal                  #=&gt; Sat Jan 01 14:15:01 CST 2000\n   l.gmt_offset                    #=&gt; -21600\n"
full_name: Time#gmtoff
is_singleton: false
name: gmtoff
params: |
  time.gmt_offset => fixnum
  time.gmtoff     => fixnum
  time.utc_offset => fixnum

visibility: public
ri/1.8/system/Time/zone-i.yaml000064400000001066150403661770012007 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the name of the time zone used for <em>time</em>. As of Ruby 1.8, returns ``UTC'' rather than ``GMT'' for UTC times.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.gm(2000, &quot;jan&quot;, 1, 20, 15, 1)\n   t.zone   #=&gt; &quot;UTC&quot;\n   t = Time.local(2000, &quot;jan&quot;, 1, 20, 15, 1)\n   t.zone   #=&gt; &quot;CST&quot;\n"
full_name: Time#zone
is_singleton: false
name: zone
params: |
  time.zone => string

visibility: public
ri/1.8/system/Time/zone_utc%3f-c.yaml000064400000000257150403661770013153 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time::zone_utc?
is_singleton: true
name: zone_utc?
params: (zone)
visibility: private
ri/1.8/system/Time/xmlschema-c.yaml000064400000001146150403661770013006 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>date</tt> as dateTime defined by XML Schema and converts it to a Time object. The format is restricted version of the format defined by ISO 8601.
- !ruby/struct:SM::Flow::P 
  body: ArgumentError is raised if <tt>date</tt> is not compliant with the format or Time class cannot represent specified date.
- !ruby/struct:SM::Flow::P 
  body: "See #xmlschema for more information on this format."
full_name: Time::xmlschema
is_singleton: true
name: xmlschema
params: (date)
visibility: public
ri/1.8/system/Time/getgm-i.yaml000064400000001236150403661770012136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new <tt>new_time</tt> object representing <em>time</em> in UTC.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.local(2000,1,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 CST 2000\n   t.gmt?                             #=&gt; false\n   y = t.getgm                        #=&gt; Sun Jan 02 02:15:01 UTC 2000\n   y.gmt?                             #=&gt; true\n   t == y                             #=&gt; true\n"
full_name: Time#getgm
is_singleton: false
name: getgm
params: |
  time.getgm  => new_time
  time.getutc => new_time

visibility: public
ri/1.8/system/Time/month-i.yaml000064400000000706150403661770012161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the month of the year (1..12) for <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.mon          #=&gt; 4\n   t.month        #=&gt; 4\n"
full_name: Time#month
is_singleton: false
name: month
params: |
  time.mon   => fixnum
  time.month => fixnum

visibility: public
ri/1.8/system/Time/%2b-i.yaml000064400000000757150403661770011412 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Addition---Adds some number of seconds (possibly fractional) to <em>time</em> and returns that value as a new time.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now         #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t + (60 * 60 * 24)   #=&gt; Thu Apr 10 08:56:03 CDT 2003\n"
full_name: Time#+
is_singleton: false
name: +
params: |
  time + numeric => time

visibility: public
ri/1.8/system/Time/httpdate-c.yaml000064400000001034150403661770012636 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>date</tt> as HTTP-date defined by RFC 2616 and converts it to a Time object.
- !ruby/struct:SM::Flow::P 
  body: ArgumentError is raised if <tt>date</tt> is not compliant with RFC 2616 or Time class cannot represent specified date.
- !ruby/struct:SM::Flow::P 
  body: "See #httpdate for more information on this format."
full_name: Time::httpdate
is_singleton: true
name: httpdate
params: (date)
visibility: public
ri/1.8/system/Time/succ-i.yaml000064400000000435150403661770011770 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a new time object, one second later than <tt>time</tt>.
full_name: Time#succ
is_singleton: false
name: succ
params: |
  time.succ   => new_time

visibility: public
ri/1.8/system/Time/marshal_dump-i.yaml000064400000000341150403661770013503 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: undocumented
full_name: Time#marshal_dump
is_singleton: false
name: marshal_dump
params: ()
visibility: public
ri/1.8/system/Time/getlocal-i.yaml000064400000001273150403661770012626 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a new <tt>new_time</tt> object representing <em>time</em> in local time (using the local time zone in effect for this process).
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.gm(2000,1,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.gmt?                          #=&gt; true\n   l = t.getlocal                  #=&gt; Sat Jan 01 14:15:01 CST 2000\n   l.gmt?                          #=&gt; false\n   t == l                          #=&gt; true\n"
full_name: Time#getlocal
is_singleton: false
name: getlocal
params: |
  time.getlocal => new_time

visibility: public
ri/1.8/system/Time/to_s-i.yaml000064400000001051150403661770011772 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a string representing <em>time</em>. Equivalent to calling <tt>Time#strftime</tt> with a format string of ``<tt>%a</tt> <tt>%b</tt> <tt>%d</tt> <tt>%H:%M:%S</tt> <tt>%Z</tt> <tt>%Y</tt>''.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.now.to_s   #=&gt; &quot;Wed Apr 09 08:56:04 CDT 2003&quot;\n"
full_name: Time#to_s
is_singleton: false
name: to_s
params: |
  time.inspect => string
  time.to_s    => string

visibility: public
ri/1.8/system/Time/_dump-i.yaml000064400000000402150403661770012131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dump <em>time</em> for marshaling.
full_name: Time#_dump
is_singleton: false
name: _dump
params: |
  time._dump   => string

visibility: public
ri/1.8/system/Time/rfc2822-i.yaml000064400000001065150403661770012123 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: rfc822
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a string which represents the time as date-time defined by RFC 2822:"
- !ruby/struct:SM::Flow::VERB 
  body: "  day-of-week, DD month-name CCYY hh:mm:ss zone\n"
- !ruby/struct:SM::Flow::P 
  body: where zone is [+-]hhmm.
- !ruby/struct:SM::Flow::P 
  body: If <tt>self</tt> is a UTC time, -0000 is used as zone.
full_name: Time#rfc2822
is_singleton: false
name: rfc2822
params: ()
visibility: public
ri/1.8/system/Time/utc-c.yaml000064400000002201150403661770011611 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a time based on given values, interpreted as UTC (GMT). The year must be specified. Other values default to the minimum value for that field (and may be <tt>nil</tt> or omitted). Months may be specified by numbers from 1 to 12, or by the three-letter English month names. Hours are specified on a 24-hour clock (0..23). Raises an <tt>ArgumentError</tt> if any values are out of range. Will also accept ten arguments in the order output by <tt>Time#to_a</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.utc(2000,&quot;jan&quot;,1,20,15,1)  #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   Time.gm(2000,&quot;jan&quot;,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n"
full_name: Time::utc
is_singleton: true
name: utc
params: |
  Time.utc( year [, month, day, hour, min, sec, usec] ) => time
  Time.utc( sec, min, hour, day, month, year, wday, yday, isdst, tz
  ) => time
  Time.gm( year [, month, day, hour, min, sec, usec] ) => time
  Time.gm( sec, min, hour, day, month, year, wday, yday, isdst, tz
  ) => time

visibility: public
ri/1.8/system/Time/gmt_offset-i.yaml000064400000001212150403661770013162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the offset in seconds between the timezone of <em>time</em> and UTC.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.gm(2000,1,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.gmt_offset                    #=&gt; 0\n   l = t.getlocal                  #=&gt; Sat Jan 01 14:15:01 CST 2000\n   l.gmt_offset                    #=&gt; -21600\n"
full_name: Time#gmt_offset
is_singleton: false
name: gmt_offset
params: |
  time.gmt_offset => fixnum
  time.gmtoff     => fixnum
  time.utc_offset => fixnum

visibility: public
ri/1.8/system/Time/rfc2822-c.yaml000064400000001160150403661770012111 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>date</tt> 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.
- !ruby/struct:SM::Flow::P 
  body: ArgumentError is raised if <tt>date</tt> is not compliant with RFC 2822 or Time class cannot represent specified date.
- !ruby/struct:SM::Flow::P 
  body: "See #rfc2822 for more information on this format."
full_name: Time::rfc2822
is_singleton: true
name: rfc2822
params: (date)
visibility: public
ri/1.8/system/Time/utc%3f-i.yaml000064400000001575150403661770012132 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>time</em> represents a time in UTC (GMT).
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now                        #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.utc?                              #=&gt; false\n   t = Time.gm(2000,&quot;jan&quot;,1,20,15,1)   #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.utc?                              #=&gt; true\n\n   t = Time.now                        #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t.gmt?                              #=&gt; false\n   t = Time.gm(2000,1,1,20,15,1)       #=&gt; Sat Jan 01 20:15:01 UTC 2000\n   t.gmt?                              #=&gt; true\n"
full_name: Time#utc?
is_singleton: false
name: utc?
params: |
  time.utc? => true or false
  time.gmt? => true or false

visibility: public
ri/1.8/system/Time/dst%3f-i.yaml000064400000001104150403661770012115 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <tt>true</tt> if <em>time</em> occurs during Daylight Saving Time in its time zone.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.local(2000, 7, 1).isdst   #=&gt; true\n   Time.local(2000, 1, 1).isdst   #=&gt; false\n   Time.local(2000, 7, 1).dst?    #=&gt; true\n   Time.local(2000, 1, 1).dst?    #=&gt; false\n"
full_name: Time#dst?
is_singleton: false
name: dst?
params: |
  time.isdst => true or false
  time.dst?  => true or false

visibility: public
ri/1.8/system/Time/to_f-i.yaml000064400000000732150403661770011762 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the value of <em>time</em> as a floating point number of seconds since epoch.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now\n   &quot;%10.5f&quot; % t.to_f   #=&gt; &quot;1049896564.13654&quot;\n   t.to_i              #=&gt; 1049896564\n"
full_name: Time#to_f
is_singleton: false
name: to_f
params: |
  time.to_f => float

visibility: public
ri/1.8/system/Time/xmlschema-i.yaml000064400000001363150403661770013015 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: iso8601
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns a string which represents the time as dateTime defined by XML Schema:"
- !ruby/struct:SM::Flow::VERB 
  body: "  CCYY-MM-DDThh:mm:ssTZD\n  CCYY-MM-DDThh:mm:ss.sssTZD\n"
- !ruby/struct:SM::Flow::P 
  body: where TZD is Z or [+-]hh:mm.
- !ruby/struct:SM::Flow::P 
  body: If self is a UTC time, Z is used as TZD. [+-]hh:mm is used otherwise.
- !ruby/struct:SM::Flow::P 
  body: <tt>fractional_seconds</tt> specifies a number of digits of fractional seconds. Its default value is 0.
full_name: Time#xmlschema
is_singleton: false
name: xmlschema
params: (fraction_digits=0)
visibility: public
ri/1.8/system/Time/now-c.yaml000064400000001575150403662000011621 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Synonym for <tt>Time.new</tt>. Returns a <tt>Time</tt> object initialized tot he current system time.
- !ruby/struct:SM::Flow::P 
  body: Returns a <tt>Time</tt> object initialized to the current system time. <b>Note:</b> The object created will be created using the resolution available on your system clock, and so may include fractional seconds.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = Time.new      #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   b = Time.new      #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   a == b            #=&gt; false\n   &quot;%.6f&quot; % a.to_f   #=&gt; &quot;1049896563.230740&quot;\n   &quot;%.6f&quot; % b.to_f   #=&gt; &quot;1049896563.231466&quot;\n"
full_name: Time::now
is_singleton: true
name: now
params: |
  Time.new -> time

visibility: public
ri/1.8/system/Time/make_time-c.yaml000064400000000342150403662000012740 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Time::make_time
is_singleton: true
name: make_time
params: (year, mon, day, hour, min, sec, sec_fraction, zone, now)
visibility: private
ri/1.8/system/Time/yday-i.yaml000064400000000625150403662000011765 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns an integer representing the day of the year, 1..366.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now   #=&gt; Wed Apr 09 08:56:04 CDT 2003\n   t.yday         #=&gt; 99\n"
full_name: Time#yday
is_singleton: false
name: yday
params: |
  time.yday => fixnum

visibility: public
ri/1.8/system/Time/asctime-i.yaml000064400000000645150403662000012446 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a canonical string representation of <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   Time.now.asctime   #=&gt; &quot;Wed Apr  9 08:56:03 2003&quot;\n"
full_name: Time#asctime
is_singleton: false
name: asctime
params: |
  time.asctime => string
  time.ctime   => string

visibility: public
ri/1.8/system/Time/%2d-i.yaml000064400000001237150403662000011371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Difference---Returns a new time that represents the difference between two times, or subtracts the given number of seconds in <em>numeric</em> from <em>time</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "   t = Time.now       #=&gt; Wed Apr 09 08:56:03 CDT 2003\n   t2 = t + 2592000   #=&gt; Fri May 09 08:56:03 CDT 2003\n   t2 - t             #=&gt; 2592000.0\n   t2 - 2592000       #=&gt; Wed Apr 09 08:56:03 CDT 2003\n"
full_name: Time#-
is_singleton: false
name: "-"
params: |
  time - other_time => float
  time - numeric    => time

visibility: public
ri/1.8/system/OptionParser/RequiredArgument/cdesc-RequiredArgument.yaml000064400000000511150403662000022137 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Switch that takes an argument.
constants: []

full_name: OptionParser::RequiredArgument
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: RequiredArgument
superclass: self
ri/1.8/system/OptionParser/RequiredArgument/parse-i.yaml000064400000000431150403662000017136 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises an exception if argument is not present.
full_name: OptionParser::RequiredArgument#parse
is_singleton: false
name: parse
params: (arg, argv)
visibility: public
ri/1.8/system/OptionParser/cdesc-OptionParser.yaml000064400000021032150403662000016017 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Developer Documentation (not for RDoc output)
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Class tree
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "OptionParser:: front end"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "OptionParser::Switch:: each switches"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "OptionParser::List:: options list"
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: "OptionParser::ParseError:: errors on parsing"
  - !ruby/object:SM::Flow::LIST 
    contents: 
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: OptionParser::AmbiguousOption
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: OptionParser::NeedlessArgument
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: OptionParser::MissingArgument
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: OptionParser::InvalidOption
    - !ruby/struct:SM::Flow::LI 
      label: "-"
      body: OptionParser::InvalidArgument
    - !ruby/object:SM::Flow::LIST 
      contents: 
      - !ruby/struct:SM::Flow::LI 
        label: "-"
        body: OptionParser::AmbiguousArgument
      type: :BULLET
    type: :BULLET
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Object relationship diagram
- !ruby/struct:SM::Flow::VERB 
  body: "  +--------------+\n  | OptionParser |&lt;&gt;-----+\n  +--------------+       |                      +--------+\n                         |                    ,-| Switch |\n       on_head --------&gt;+---------------+    /  +--------+\n       accept/reject --&gt;| List          |&lt;|&gt;-\n                        |               |&lt;|&gt;-  +----------+\n       on -------------&gt;+---------------+    `-| argument |\n                          :           :        |  class   |\n                        +---------------+      |==========|\n       on_tail --------&gt;|               |      |pattern   |\n                        +---------------+      |----------|\n  OptionParser.accept -&gt;| DefaultList   |      |converter |\n               reject   |(shared between|      +----------+\n                        | all instances)|\n                        +---------------+\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: OptionParser
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Introduction
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Features
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: The argument specification and the code to handle it are written in the same place.
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: It can output an option summary; you don't need to maintain this string separately.
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: Optional and mandatory arguments are specified very gracefully.
  - !ruby/struct:SM::Flow::LI 
    label: "4."
    body: Arguments can be automatically converted to a specified class.
  - !ruby/struct:SM::Flow::LI 
    label: "5."
    body: Arguments can be restricted to a certain set.
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: All of these features are demonstrated in the examples below.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Minimal example
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'optparse'\n\n  options = {}\n  OptionParser.new do |opts|\n    opts.banner = &quot;Usage: example.rb [options]&quot;\n\n    opts.on(&quot;-v&quot;, &quot;--[no-]verbose&quot;, &quot;Run verbosely&quot;) do |v|\n      options[:verbose] = v\n    end\n  end.parse!\n\n  p options\n  p ARGV\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Complete example
- !ruby/struct:SM::Flow::P 
  body: 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 <tt>optparse</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'optparse'\n  require 'optparse/time'\n  require 'ostruct'\n  require 'pp'\n\n  class OptparseExample\n\n    CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary]\n    CODE_ALIASES = { &quot;jis&quot; =&gt; &quot;iso-2022-jp&quot;, &quot;sjis&quot; =&gt; &quot;shift_jis&quot; }\n\n    #\n    # Return a structure describing the options.\n    #\n    def self.parse(args)\n      # The options specified on the command line will be collected in <b>options</b>.\n      # We set default values here.\n      options = OpenStruct.new\n      options.library = []\n      options.inplace = false\n      options.encoding = &quot;utf8&quot;\n      options.transfer_type = :auto\n      options.verbose = false\n\n      opts = OptionParser.new do |opts|\n        opts.banner = &quot;Usage: example.rb [options]&quot;\n\n        opts.separator &quot;&quot;\n        opts.separator &quot;Specific options:&quot;\n\n        # Mandatory argument.\n        opts.on(&quot;-r&quot;, &quot;--require LIBRARY&quot;,\n                &quot;Require the LIBRARY before executing your script&quot;) do |lib|\n          options.library &lt;&lt; lib\n        end\n\n        # Optional argument; multi-line description.\n        opts.on(&quot;-i&quot;, &quot;--inplace [EXTENSION]&quot;,\n                &quot;Edit ARGV files in place&quot;,\n                &quot;  (make backup if EXTENSION supplied)&quot;) do |ext|\n          options.inplace = true\n          options.extension = ext || ''\n          options.extension.sub!(/\\A\\.?(?=.)/, &quot;.&quot;)  # Ensure extension begins with dot.\n        end\n\n        # Cast 'delay' argument to a Float.\n        opts.on(&quot;--delay N&quot;, Float, &quot;Delay N seconds before executing&quot;) do |n|\n          options.delay = n\n        end\n\n        # Cast 'time' argument to a Time object.\n        opts.on(&quot;-t&quot;, &quot;--time [TIME]&quot;, Time, &quot;Begin execution at given time&quot;) do |time|\n          options.time = time\n        end\n\n        # Cast to octal integer.\n        opts.on(&quot;-F&quot;, &quot;--irs [OCTAL]&quot;, OptionParser::OctalInteger,\n                &quot;Specify record separator (default \\0)&quot;) do |rs|\n          options.record_separator = rs\n        end\n\n        # List of arguments.\n        opts.on(&quot;--list x,y,z&quot;, Array, &quot;Example 'list' of arguments&quot;) do |list|\n          options.list = list\n        end\n\n        # Keyword completion.  We are specifying a specific set of arguments (CODES\n        # and CODE_ALIASES - notice the latter is a Hash), and the user may provide\n        # the shortest unambiguous text.\n        code_list = (CODE_ALIASES.keys + CODES).join(',')\n        opts.on(&quot;--code CODE&quot;, CODES, CODE_ALIASES, &quot;Select encoding&quot;,\n                &quot;  (#{code_list})&quot;) do |encoding|\n          options.encoding = encoding\n        end\n\n        # Optional argument with keyword completion.\n        opts.on(&quot;--type [TYPE]&quot;, [:text, :binary, :auto],\n                &quot;Select transfer type (text, binary, auto)&quot;) do |t|\n          options.transfer_type = t\n        end\n\n        # Boolean switch.\n        opts.on(&quot;-v&quot;, &quot;--[no-]verbose&quot;, &quot;Run verbosely&quot;) do |v|\n          options.verbose = v\n        end\n\n        opts.separator &quot;&quot;\n        opts.separator &quot;Common options:&quot;\n\n        # No argument, shows at tail.  This will print an options summary.\n        # Try it and see!\n        opts.on_tail(&quot;-h&quot;, &quot;--help&quot;, &quot;Show this message&quot;) do\n          puts opts\n          exit\n        end\n\n        # Another typical switch to print the version.\n        opts.on_tail(&quot;--version&quot;, &quot;Show version&quot;) do\n          puts OptionParser::Version.join('.')\n          exit\n        end\n      end\n\n      opts.parse!(args)\n      options\n    end  # parse()\n\n  end  # class OptparseExample\n\n  options = OptparseExample.parse(ARGV)\n  pp options\n"
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Further documentation
- !ruby/struct:SM::Flow::P 
  body: The above examples should be enough to learn how to use this class. If you have any questions, email me (gsinclair@soyabean.com.au) and I will update this document.
constants: []

full_name: OptionParser
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: switch_name
name: OptionParser
superclass: Object
ri/1.8/system/OptionParser/OptionMap/cdesc-OptionMap.yaml000064400000000534150403662010017213 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Map from option/keyword string to object with completion.
constants: []

full_name: OptionParser::OptionMap
includes: 
- !ruby/object:RI::IncludedModule 
  name: Completion
instance_methods: []

name: OptionMap
superclass: Hash
ri/1.8/system/OptionParser/NoArgument/parse-i.yaml000064400000000504150403662010015734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (NeedlessArgument, arg)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Raises an exception if any arguments given.
full_name: OptionParser::NoArgument#parse
is_singleton: false
name: parse
params: (arg, argv) {|NeedlessArgument, arg| ...}
visibility: public
ri/1.8/system/OptionParser/NoArgument/incompatible_argument_styles-c.yaml000064400000000345150403662010022572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OptionParser::NoArgument::incompatible_argument_styles
is_singleton: true
name: incompatible_argument_styles
params: (*)
visibility: public
ri/1.8/system/OptionParser/NoArgument/cdesc-NoArgument.yaml000064400000000664150403662010017541 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: incompatible_argument_styles
- !ruby/object:RI::MethodSummary 
  name: pattern
comment: 
- !ruby/struct:SM::Flow::P 
  body: Switch that takes no arguments.
constants: []

full_name: OptionParser::NoArgument
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: NoArgument
superclass: self
ri/1.8/system/OptionParser/NoArgument/pattern-c.yaml000064400000000272150403662010016273 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OptionParser::NoArgument::pattern
is_singleton: true
name: pattern
params: ()
visibility: public
ri/1.8/system/OptionParser/Completion/convert-i.yaml000064400000000321150403662010016331 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OptionParser::Completion#convert
is_singleton: false
name: convert
params: (opt = nil, val = nil, *)
visibility: public
ri/1.8/system/OptionParser/Completion/cdesc-Completion.yaml000064400000000712150403662010017617 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Keyword completion module. This allows partial arguments to be specified and resolved against a list of acceptable values.
constants: []

full_name: OptionParser::Completion
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: complete
- !ruby/object:RI::MethodSummary 
  name: convert
name: Completion
superclass: 
ri/1.8/system/OptionParser/Completion/complete-i.yaml000064400000000364150403662010016470 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (key, *sw)
comment: 
full_name: OptionParser::Completion#complete
is_singleton: false
name: complete
params: (key, icase = false, pat = nil) {|key, *sw| ...}
visibility: public
ri/1.8/system/OptionParser/OptionalArgument/cdesc-OptionalArgument.yaml000064400000000511150403662010022152 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Switch that can omit argument.
constants: []

full_name: OptionParser::OptionalArgument
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: OptionalArgument
superclass: self
ri/1.8/system/OptionParser/OptionalArgument/parse-i.yaml000064400000000442150403662010017146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses argument if given, or uses default value.
full_name: OptionParser::OptionalArgument#parse
is_singleton: false
name: parse
params: (arg, argv, &error)
visibility: public
ri/1.8/system/OptionParser/PlacedArgument/cdesc-PlacedArgument.yaml000064400000000544150403662010021166 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Switch that takes an argument, which does not begin with '-'.
constants: []

full_name: OptionParser::PlacedArgument
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: parse
name: PlacedArgument
superclass: self
ri/1.8/system/OptionParser/PlacedArgument/parse-i.yaml000064400000000452150403662010016552 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns nil if argument is not present or begins with '-'.
full_name: OptionParser::PlacedArgument#parse
is_singleton: false
name: parse
params: (arg, argv, &error)
visibility: public
ri/1.8/system/OptionParser/switch_name-i.yaml000064400000000363150403662010015047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Main name of the switch.
full_name: OptionParser#switch_name
is_singleton: false
name: switch_name
params: ()
visibility: public
ri/1.8/system/OptionParser/Switch/cdesc-Switch.yaml000064400000002310150403662010016073 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: arg
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: block
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: conv
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: desc
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: long
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: pattern
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  name: short
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: guess
- !ruby/object:RI::MethodSummary 
  name: incompatible_argument_styles
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: pattern
comment: 
- !ruby/struct:SM::Flow::P 
  body: Individual switch class. Not important to the user.
- !ruby/struct:SM::Flow::P 
  body: "Defined within Switch are several Switch-derived classes: NoArgument, RequiredArgument, etc."
constants: []

full_name: OptionParser::Switch
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: conv_arg
- !ruby/object:RI::MethodSummary 
  name: parse_arg
- !ruby/object:RI::MethodSummary 
  name: summarize
name: Switch
superclass: Object
ri/1.8/system/OptionParser/Switch/guess-c.yaml000064400000000516150403662010015127 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Guesses argument style from <tt>arg</tt>. Returns corresponding OptionParser::Switch class (OptionalArgument, etc.).
full_name: OptionParser::Switch::guess
is_singleton: true
name: guess
params: (arg)
visibility: public
ri/1.8/system/OptionParser/Switch/conv_arg-i.yaml000064400000000610150403662010015600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses argument, converts and returns <tt>arg</tt>, <tt>block</tt> and result of conversion. Yields at semi-error condition instead of raising an exception.
full_name: OptionParser::Switch#conv_arg
is_singleton: false
name: conv_arg
params: (arg, val = nil)
visibility: private
ri/1.8/system/OptionParser/Switch/incompatible_argument_styles-c.yaml000064400000000346150403662010021755 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OptionParser::Switch::incompatible_argument_styles
is_singleton: true
name: incompatible_argument_styles
params: (arg, t)
visibility: public
ri/1.8/system/OptionParser/Switch/new-c.yaml000064400000000433150403662010014570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OptionParser::Switch::new
is_singleton: true
name: new
params: (pattern = nil, conv = nil, short = nil, long = nil, arg = nil, desc = ([] if short or long), block = Proc.new)
visibility: public
ri/1.8/system/OptionParser/Switch/parse_arg-i.yaml000064400000000650150403662010015751 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (InvalidArgument, arg)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Parses <tt>arg</tt> and returns rest of <tt>arg</tt> and matched portion to the argument pattern. Yields when the pattern doesn't match substring.
full_name: OptionParser::Switch#parse_arg
is_singleton: false
name: parse_arg
params: (arg) {|InvalidArgument, arg| ...}
visibility: private
ri/1.8/system/OptionParser/Switch/summarize-i.yaml000064400000002156150403662010016025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (indent + l)
comment: 
- !ruby/struct:SM::Flow::P 
  body: Produces the summary text. Each line of the summary is yielded to the block (without newline).
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "+sdone+:"
    body: Already summarized short style options keyed hash.
  - !ruby/struct:SM::Flow::LI 
    label: "+ldone+:"
    body: Already summarized long style options keyed hash.
  - !ruby/struct:SM::Flow::LI 
    label: "+width+:"
    body: Width of left side (option part). In other words, the right side (description part) starts after <tt>width</tt> columns.
  - !ruby/struct:SM::Flow::LI 
    label: "+max+:"
    body: Maximum width of left side -&gt; the options are filled within <tt>max</tt> columns.
  - !ruby/struct:SM::Flow::LI 
    label: "+indent+:"
    body: Prefix string indents all summarized lines.
  type: :NOTE
full_name: OptionParser::Switch#summarize
is_singleton: false
name: summarize
params: (sdone = [], ldone = [], width = 1, max = width - 1, indent = "") {|indent + l| ...}
visibility: public
ri/1.8/system/OptionParser/Switch/pattern-c.yaml000064400000000266150403662010015460 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: OptionParser::Switch::pattern
is_singleton: true
name: pattern
params: ()
visibility: public
ri/1.8/system/UDPSocket/connect-i.yaml000064400000000265150403662010013354 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: UDPSocket#connect
is_singleton: false
name: connect
params: (host, port)
visibility: public
ri/1.8/system/UDPSocket/cdesc-UDPSocket.yaml000064400000003460150403662010014355 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Class <tt>Socket</tt> provides access to the underlying operating system socket implementations. It can be used to provide more operating system specific functionality than the protocol-specific socket classes but at the expense of greater complexity. In particular, the class handles addresses using +struct sockaddr+ structures packed into Ruby strings, which can be a joy to manipulate.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Exception Handling
- !ruby/struct:SM::Flow::P 
  body: Ruby's implementation of <tt>Socket</tt> causes an exception to be raised based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions. If more information on particular exception is needed please refer to the Unix manual pages or the Windows WinSock reference.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Documentation by
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Zach Dennis
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Sam Roberts
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <em>Programming Ruby</em> from The Pragmatic Bookshelf.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: Much material in this documentation is taken with permission from <em>Programming Ruby</em> from The Pragmatic Bookshelf.
constants: []

full_name: UDPSocket
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: bind
- !ruby/object:RI::MethodSummary 
  name: connect
- !ruby/object:RI::MethodSummary 
  name: recvfrom_nonblock
- !ruby/object:RI::MethodSummary 
  name: send
name: UDPSocket
superclass: Object
ri/1.8/system/UDPSocket/send-i.yaml000064400000000267150403662010012656 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: UDPSocket#send
is_singleton: false
name: send
params: (mesg, flags, *rest)
visibility: public
ri/1.8/system/UDPSocket/recvfrom_nonblock-i.yaml000064400000004305150403662010015432 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Receives up to <em>maxlen</em> bytes from <tt>udpsocket</tt> using recvfrom(2) after O_NONBLOCK is set for the underlying file descriptor. <em>flags</em> is zero or more of the <tt>MSG_</tt> options. The first element of the results, <em>mesg</em>, is the data received. The second element, <em>sender_inet_addr</em>, is an array to represent the sender address.
- !ruby/struct:SM::Flow::P 
  body: When recvfrom(2) returns 0, Socket#recvfrom_nonblock returns an empty string as data. It means an empty packet.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>maxlen</tt> - the number of bytes to receive from the socket
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>flags</tt> - zero or more of the <tt>MSG_</tt> options
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "     require 'socket'\n     s1 = UDPSocket.new\n     s1.bind(&quot;127.0.0.1&quot;, 0)\n     s2 = UDPSocket.new\n     s2.bind(&quot;127.0.0.1&quot;, 0)\n     s2.connect(*s1.addr.values_at(3,1))\n     s1.connect(*s2.addr.values_at(3,1))\n     s1.send &quot;aaa&quot;, 0\n     IO.select([s2])\n     p s2.recvfrom_nonblock(10)  #=&gt; [&quot;aaa&quot;, [&quot;AF_INET&quot;, 33302, &quot;localhost.localdomain&quot;, &quot;127.0.0.1&quot;]]\n"
- !ruby/struct:SM::Flow::P 
  body: Refer to Socket#recvfrom for the exceptions that may be thrown if the call to <em>recvfrom_nonblock</em> fails.
- !ruby/struct:SM::Flow::P 
  body: UDPSocket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, including Errno::EAGAIN.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: See
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Socket#recvfrom
  type: :BULLET
full_name: UDPSocket#recvfrom_nonblock
is_singleton: false
name: recvfrom_nonblock
params: |
  udpsocket.recvfrom_nonblock(maxlen) => [mesg, sender_inet_addr]
  udpsocket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_inet_addr]

visibility: public
ri/1.8/system/UDPSocket/bind-i.yaml000064400000000257150403662010012640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: UDPSocket#bind
is_singleton: false
name: bind
params: (host, port)
visibility: public
ri/1.8/system/Fill/cdesc-Fill.yaml000064400000000303150403662010012520 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Fill
includes: []

instance_methods: []

name: Fill
superclass: Test::Unit::TestCase
ri/1.8/system/XMLEncoding_ja/SJISHandler/cdesc-SJISHandler.yaml000064400000000401150403662010017640 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XMLEncoding_ja::SJISHandler
includes: 
- !ruby/object:RI::IncludedModule 
  name: Kconv
instance_methods: []

name: SJISHandler
superclass: Object
ri/1.8/system/XMLEncoding_ja/cdesc-XMLEncoding_ja.yaml000064400000000303150403662010016306 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: XMLEncoding_ja
includes: []

instance_methods: []

name: XMLEncoding_ja
superclass: 
ri/1.8/system/ObjectSpace/define_finalizer-c.yaml000064400000000550150403662010015570 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds <em>aProc</em> as a finalizer, to be called after <em>obj</em> was destroyed.
full_name: ObjectSpace::define_finalizer
is_singleton: true
name: define_finalizer
params: |
  ObjectSpace.define_finalizer(obj, aProc=proc())

visibility: public
ri/1.8/system/ObjectSpace/undefine_finalizer-c.yaml000064400000000466150403662010016141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Removes all finalizers for <em>obj</em>.
full_name: ObjectSpace::undefine_finalizer
is_singleton: true
name: undefine_finalizer
params: |
  ObjectSpace.undefine_finalizer(obj)

visibility: public
ri/1.8/system/ObjectSpace/call_finalizer-c.yaml000064400000000354150403662010015253 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: deprecated
full_name: ObjectSpace::call_finalizer
is_singleton: true
name: call_finalizer
params: (p1)
visibility: public
ri/1.8/system/ObjectSpace/_id2ref-c.yaml000064400000001176150403662010013612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Converts an object id to a reference to the object. May not be called on an object id passed as a parameter to a finalizer.
- !ruby/struct:SM::Flow::VERB 
  body: "   s = &quot;I am a string&quot;                    #=&gt; &quot;I am a string&quot;\n   r = ObjectSpace._id2ref(s.object_id)   #=&gt; &quot;I am a string&quot;\n   r == s                                 #=&gt; true\n"
full_name: ObjectSpace::_id2ref
is_singleton: true
name: _id2ref
params: |
  ObjectSpace._id2ref(object_id) -> an_object

visibility: public
ri/1.8/system/ObjectSpace/cdesc-ObjectSpace.yaml000064400000003204150403662010015313 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: _id2ref
- !ruby/object:RI::MethodSummary 
  name: add_finalizer
- !ruby/object:RI::MethodSummary 
  name: call_finalizer
- !ruby/object:RI::MethodSummary 
  name: define_finalizer
- !ruby/object:RI::MethodSummary 
  name: each_object
- !ruby/object:RI::MethodSummary 
  name: finalizers
- !ruby/object:RI::MethodSummary 
  name: garbage_collect
- !ruby/object:RI::MethodSummary 
  name: remove_finalizer
- !ruby/object:RI::MethodSummary 
  name: undefine_finalizer
comment: 
- !ruby/struct:SM::Flow::P 
  body: The <tt>ObjectSpace</tt> module contains a number of routines that interact with the garbage collection facility and allow you to traverse all living objects with an iterator.
- !ruby/struct:SM::Flow::P 
  body: <tt>ObjectSpace</tt> also provides support for object finalizers, procs that will be called when a specific object is about to be destroyed by garbage collection.
- !ruby/struct:SM::Flow::VERB 
  body: "   include ObjectSpace\n\n   a = &quot;A&quot;\n   b = &quot;B&quot;\n   c = &quot;C&quot;\n\n   define_finalizer(a, proc {|id| puts &quot;Finalizer one on #{id}&quot; })\n   define_finalizer(a, proc {|id| puts &quot;Finalizer two on #{id}&quot; })\n   define_finalizer(b, proc {|id| puts &quot;Finalizer three on #{id}&quot; })\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Finalizer three on 537763470\n   Finalizer one on 537763480\n   Finalizer two on 537763480\n"
constants: []

full_name: ObjectSpace
includes: []

instance_methods: []

name: ObjectSpace
superclass: 
ri/1.8/system/ObjectSpace/remove_finalizer-c.yaml000064400000000360150403662020015633 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: deprecated
full_name: ObjectSpace::remove_finalizer
is_singleton: true
name: remove_finalizer
params: (p1)
visibility: public
ri/1.8/system/ObjectSpace/garbage_collect-c.yaml000064400000000613150403662020015371 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Initiates garbage collection, unless manually disabled.
full_name: ObjectSpace::garbage_collect
is_singleton: true
name: garbage_collect
params: |
  GC.start                     => nil
  gc.garbage_collect           => nil
  ObjectSpace.garbage_collect  => nil

visibility: public
ri/1.8/system/ObjectSpace/each_object-c.yaml000064400000002372150403662020014526 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls the block once for each living, nonimmediate object in this Ruby process. If <em>module</em> is specified, calls the block for only those classes or modules that match (or are a subclass of) <em>module</em>. Returns the number of objects found. Immediate objects (<tt>Fixnum</tt>s, <tt>Symbol</tt>s <tt>true</tt>, <tt>false</tt>, and <tt>nil</tt>) are never returned. In the example below, <tt>each_object</tt> returns both the numbers we defined and several constants defined in the <tt>Math</tt> module.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = 102.7\n   b = 95       # Won't be returned\n   c = 12345678987654321\n   count = ObjectSpace.each_object(Numeric) {|x| p x }\n   puts &quot;Total count: #{count}&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   12345678987654321\n   102.7\n   2.71828182845905\n   3.14159265358979\n   2.22044604925031e-16\n   1.7976931348623157e+308\n   2.2250738585072e-308\n   Total count: 7\n"
full_name: ObjectSpace::each_object
is_singleton: true
name: each_object
params: |
  ObjectSpace.each_object([module]) {|obj| ... } => fixnum

visibility: public
ri/1.8/system/ObjectSpace/add_finalizer-c.yaml000064400000000352150403662020015067 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: deprecated
full_name: ObjectSpace::add_finalizer
is_singleton: true
name: add_finalizer
params: (p1)
visibility: public
ri/1.8/system/ObjectSpace/finalizers-c.yaml000064400000000342150403662020014441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: deprecated
full_name: ObjectSpace::finalizers
is_singleton: true
name: finalizers
params: ()
visibility: public
ri/1.8/system/Tempfile/size-i.yaml000064400000000542150403662020012640 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: length
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the size of the temporary file. As a side effect, the IO buffer is flushed before determining the size.
full_name: Tempfile#size
is_singleton: false
name: size
params: ()
visibility: public
ri/1.8/system/Tempfile/unlink-i.yaml000064400000000675150403662020013175 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: delete
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Unlinks the file. On UNIX-like systems, it is often a good idea to unlink a temporary file immediately after creating and opening it, because it leaves other programs zero chance to access the file.
full_name: Tempfile#unlink
is_singleton: false
name: unlink
params: ()
visibility: public
ri/1.8/system/Tempfile/path-i.yaml000064400000000372150403662020012623 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the full path name of the temporary file.
full_name: Tempfile#path
is_singleton: false
name: path
params: ()
visibility: public
ri/1.8/system/Tempfile/delete-i.yaml000064400000000340150403662020013124 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #unlink"
full_name: Tempfile#delete
is_singleton: false
name: delete
params: ()
visibility: public
ri/1.8/system/Tempfile/open-i.yaml000064400000000374150403662020012632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens or reopens the file with mode &quot;r+&quot;.
full_name: Tempfile#open
is_singleton: false
name: open
params: ()
visibility: public
ri/1.8/system/Tempfile/new-c.yaml000064400000001722150403662020012452 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a temporary file of mode 0600 in the temporary directory, opens it with mode &quot;w+&quot;, and returns a Tempfile object which represents the created temporary file. A Tempfile object can be treated just like a normal File object.
- !ruby/struct:SM::Flow::P 
  body: The basename parameter is used to determine the name of a temporary file. If an Array is given, the first element is used as prefix string and the second as suffix string, respectively. Otherwise it is treated as prefix string.
- !ruby/struct:SM::Flow::P 
  body: If tmpdir is omitted, the temporary directory is determined by Dir::tmpdir provided by 'tmpdir.rb'. When $SAFE &gt; 0 and the given tmpdir is tainted, it uses /tmp. (Note that ENV values are tainted by default)
full_name: Tempfile::new
is_singleton: true
name: new
params: (basename, tmpdir=Dir::tmpdir)
visibility: public
ri/1.8/system/Tempfile/make_tmpname-i.yaml000064400000000300150403662020014314 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Tempfile#make_tmpname
is_singleton: false
name: make_tmpname
params: (basename, n)
visibility: private
ri/1.8/system/Tempfile/length-i.yaml000064400000000336150403662020013150 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #size"
full_name: Tempfile#length
is_singleton: false
name: length
params: ()
visibility: public
ri/1.8/system/Tempfile/close-i.yaml000064400000000673150403662020013000 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes the file. If the optional flag is true, unlinks the file after closing.
- !ruby/struct:SM::Flow::P 
  body: If you don't explicitly unlink the temporary file, the removal will be delayed until the object is finalized.
full_name: Tempfile#close
is_singleton: false
name: close
params: (unlink_now=false)
visibility: public
ri/1.8/system/Tempfile/cdesc-Tempfile.yaml000064400000001622150403662020014264 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: open
comment: 
- !ruby/struct:SM::Flow::P 
  body: A class for managing temporary files. This library is written to be thread safe.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: MAX_TRY
  value: "10"
full_name: Tempfile
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: close
- !ruby/object:RI::MethodSummary 
  name: close!
- !ruby/object:RI::MethodSummary 
  name: delete
- !ruby/object:RI::MethodSummary 
  name: length
- !ruby/object:RI::MethodSummary 
  name: make_tmpname
- !ruby/object:RI::MethodSummary 
  name: open
- !ruby/object:RI::MethodSummary 
  name: path
- !ruby/object:RI::MethodSummary 
  name: size
- !ruby/object:RI::MethodSummary 
  name: unlink
name: Tempfile
superclass: DelegateClass(File)
ri/1.8/system/Tempfile/close%21-i.yaml000064400000000351150403662020013201 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Closes and unlinks the file.
full_name: Tempfile#close!
is_singleton: false
name: close!
params: ()
visibility: public
ri/1.8/system/Tempfile/open-c.yaml000064400000000752150403662020012624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: (tempfile)
comment: 
- !ruby/struct:SM::Flow::P 
  body: If no block is given, this is a synonym for new().
- !ruby/struct:SM::Flow::P 
  body: If a block is given, it will be passed tempfile as an argument, and the tempfile will automatically be closed when the block terminates. In this case, open() returns nil.
full_name: Tempfile::open
is_singleton: true
name: open
params: (*args) {|tempfile| ...}
visibility: public
ri/1.8/system/Date/_load-c.yaml000064400000000343150403662020012045 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Load from Marshal format.
full_name: Date::_load
is_singleton: true
name: _load
params: (str)
visibility: public
ri/1.8/system/Date/england-i.yaml000064400000000443150403662020012406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a copy of this Date object that uses the English/Colonial Day of Calendar Reform.
full_name: Date#england
is_singleton: false
name: england
params: ()
visibility: public
ri/1.8/system/Date/Format/cdesc-Format.yaml000064400000000271150403662020014306 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Date::Format
includes: []

instance_methods: []

name: Format
superclass: 
ri/1.8/system/Date/Format/Bag/cdesc-Bag.yaml000064400000000301150403662020014232 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Date::Format::Bag
includes: []

instance_methods: []

name: Bag
superclass: Object
ri/1.8/system/Date/cdesc-Date.yaml000064400000021310150403662020012500 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: _load
- !ruby/object:RI::MethodSummary 
  name: _parse
- !ruby/object:RI::MethodSummary 
  name: _strptime
- !ruby/object:RI::MethodSummary 
  name: ajd_to_amjd
- !ruby/object:RI::MethodSummary 
  name: ajd_to_jd
- !ruby/object:RI::MethodSummary 
  name: amjd_to_ajd
- !ruby/object:RI::MethodSummary 
  name: civil
- !ruby/object:RI::MethodSummary 
  name: civil_to_jd
- !ruby/object:RI::MethodSummary 
  name: commercial
- !ruby/object:RI::MethodSummary 
  name: commercial_to_jd
- !ruby/object:RI::MethodSummary 
  name: day_fraction_to_time
- !ruby/object:RI::MethodSummary 
  name: gregorian?
- !ruby/object:RI::MethodSummary 
  name: gregorian_leap?
- !ruby/object:RI::MethodSummary 
  name: jd
- !ruby/object:RI::MethodSummary 
  name: jd_to_ajd
- !ruby/object:RI::MethodSummary 
  name: jd_to_civil
- !ruby/object:RI::MethodSummary 
  name: jd_to_commercial
- !ruby/object:RI::MethodSummary 
  name: jd_to_ld
- !ruby/object:RI::MethodSummary 
  name: jd_to_mjd
- !ruby/object:RI::MethodSummary 
  name: jd_to_ordinal
- !ruby/object:RI::MethodSummary 
  name: jd_to_wday
- !ruby/object:RI::MethodSummary 
  name: julian?
- !ruby/object:RI::MethodSummary 
  name: julian_leap?
- !ruby/object:RI::MethodSummary 
  name: ld_to_jd
- !ruby/object:RI::MethodSummary 
  name: mjd_to_jd
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: now
- !ruby/object:RI::MethodSummary 
  name: ordinal
- !ruby/object:RI::MethodSummary 
  name: ordinal_to_jd
- !ruby/object:RI::MethodSummary 
  name: parse
- !ruby/object:RI::MethodSummary 
  name: s3e
- !ruby/object:RI::MethodSummary 
  name: strptime
- !ruby/object:RI::MethodSummary 
  name: time_to_day_fraction
- !ruby/object:RI::MethodSummary 
  name: time_to_day_fraction
- !ruby/object:RI::MethodSummary 
  name: today
- !ruby/object:RI::MethodSummary 
  name: valid_civil?
- !ruby/object:RI::MethodSummary 
  name: valid_commercial?
- !ruby/object:RI::MethodSummary 
  name: valid_jd?
- !ruby/object:RI::MethodSummary 
  name: valid_ordinal?
- !ruby/object:RI::MethodSummary 
  name: valid_time?
comment: 
- !ruby/struct:SM::Flow::P 
  body: Class representing a date.
- !ruby/struct:SM::Flow::P 
  body: See the documentation to the file date.rb for an overview.
- !ruby/struct:SM::Flow::P 
  body: Internally, the date is represented as an Astronomical Julian Day Number, <tt>ajd</tt>. The Day of Calendar Reform, <tt>sg</tt>, is also stored, for conversions to other date formats. (There is also an <tt>of</tt> field for a time zone offset, but this is only for the use of the DateTime subclass.)
- !ruby/struct:SM::Flow::P 
  body: A new Date object is created using one of the object creation class methods named after the corresponding date format, and the arguments appropriate to that date format; for instance, Date::civil() (aliased to Date::new()) with year, month, and day-of-month, or Date::ordinal() with year and day-of-year. All of these object creation class methods also take the Day of Calendar Reform as an optional argument.
- !ruby/struct:SM::Flow::P 
  body: Date objects are immutable once created.
- !ruby/struct:SM::Flow::P 
  body: "Once a Date has been created, date values can be retrieved for the different date formats supported using instance methods. For instance, #mon() gives the Civil month, #cwday() gives the Commercial day of the week, and #yday() gives the Ordinal day of the year. Date values can be retrieved in any format, regardless of what format was used to create the Date instance."
- !ruby/struct:SM::Flow::P 
  body: The Date class includes the Comparable module, allowing date objects to be compared and sorted, ranges of dates to be created, and so forth.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Full month names, in English. Months count from 1 to 12; a month's numerical representation indexed into this array gives the name of that month (hence the first element is nil).
  name: MONTHNAMES
  value: "[nil] + %w(January February March April May June July                           August September October November December)"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Full names of days of the week, in English. Days of the week count from 0 to 6 (except in the commercial week); a day's numerical representation indexed into this array gives the name of that day.
  name: DAYNAMES
  value: "%w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Abbreviated month names, in English.
  name: ABBR_MONTHNAMES
  value: "[nil] + %w(Jan Feb Mar Apr May Jun                                Jul Aug Sep Oct Nov Dec)"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Abbreviated day names, in English.
  name: ABBR_DAYNAMES
  value: "%w(Sun Mon Tue Wed Thu Fri Sat)"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The Julian Day Number of the Day of Calendar Reform for Italy and the Catholic countries.
  name: ITALY
  value: "2299161"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: The Julian Day Number of the Day of Calendar Reform for England and her Colonies.
  name: ENGLAND
  value: "2361222"
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A constant used to indicate that a Date should always use the Julian calendar.
  name: JULIAN
  value: Infinity.new
- !ruby/object:RI::Constant 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: A constant used to indicate that a Date should always use the Gregorian calendar.
  name: GREGORIAN
  value: -Infinity.new
full_name: Date
includes: 
- !ruby/object:RI::IncludedModule 
  name: Comparable
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: +
- !ruby/object:RI::MethodSummary 
  name: "-"
- !ruby/object:RI::MethodSummary 
  name: "<<"
- !ruby/object:RI::MethodSummary 
  name: <=>
- !ruby/object:RI::MethodSummary 
  name: ===
- !ruby/object:RI::MethodSummary 
  name: ">>"
- !ruby/object:RI::MethodSummary 
  name: _dump
- !ruby/object:RI::MethodSummary 
  name: ajd
- !ruby/object:RI::MethodSummary 
  name: amjd
- !ruby/object:RI::MethodSummary 
  name: asctime
- !ruby/object:RI::MethodSummary 
  name: civil
- !ruby/object:RI::MethodSummary 
  name: commercial
- !ruby/object:RI::MethodSummary 
  name: ctime
- !ruby/object:RI::MethodSummary 
  name: cwday
- !ruby/object:RI::MethodSummary 
  name: cweek
- !ruby/object:RI::MethodSummary 
  name: cwyear
- !ruby/object:RI::MethodSummary 
  name: day
- !ruby/object:RI::MethodSummary 
  name: day_fraction
- !ruby/object:RI::MethodSummary 
  name: downto
- !ruby/object:RI::MethodSummary 
  name: england
- !ruby/object:RI::MethodSummary 
  name: eql?
- !ruby/object:RI::MethodSummary 
  name: gregorian
- !ruby/object:RI::MethodSummary 
  name: gregorian?
- !ruby/object:RI::MethodSummary 
  name: hash
- !ruby/object:RI::MethodSummary 
  name: hour
- !ruby/object:RI::MethodSummary 
  name: inspect
- !ruby/object:RI::MethodSummary 
  name: italy
- !ruby/object:RI::MethodSummary 
  name: jd
- !ruby/object:RI::MethodSummary 
  name: julian
- !ruby/object:RI::MethodSummary 
  name: julian?
- !ruby/object:RI::MethodSummary 
  name: ld
- !ruby/object:RI::MethodSummary 
  name: leap?
- !ruby/object:RI::MethodSummary 
  name: mday
- !ruby/object:RI::MethodSummary 
  name: min
- !ruby/object:RI::MethodSummary 
  name: mjd
- !ruby/object:RI::MethodSummary 
  name: mon
- !ruby/object:RI::MethodSummary 
  name: month
- !ruby/object:RI::MethodSummary 
  name: new_offset
- !ruby/object:RI::MethodSummary 
  name: new_start
- !ruby/object:RI::MethodSummary 
  name: next
- !ruby/object:RI::MethodSummary 
  name: next_day
- !ruby/object:RI::MethodSummary 
  name: offset
- !ruby/object:RI::MethodSummary 
  name: ordinal
- !ruby/object:RI::MethodSummary 
  name: sec
- !ruby/object:RI::MethodSummary 
  name: sec_fraction
- !ruby/object:RI::MethodSummary 
  name: start
- !ruby/object:RI::MethodSummary 
  name: step
- !ruby/object:RI::MethodSummary 
  name: strftime
- !ruby/object:RI::MethodSummary 
  name: succ
- !ruby/object:RI::MethodSummary 
  name: time
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_yaml
- !ruby/object:RI::MethodSummary 
  name: upto
- !ruby/object:RI::MethodSummary 
  name: wday
- !ruby/object:RI::MethodSummary 
  name: weeknum0
- !ruby/object:RI::MethodSummary 
  name: weeknum1
- !ruby/object:RI::MethodSummary 
  name: wnum0
- !ruby/object:RI::MethodSummary 
  name: wnum1
- !ruby/object:RI::MethodSummary 
  name: yday
- !ruby/object:RI::MethodSummary 
  name: year
- !ruby/object:RI::MethodSummary 
  name: zone
name: Date
superclass: Object
ri/1.8/system/Date/gregorian_leap%3f-c.yaml000064400000000645150403662020014250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is a year a leap year in the Gregorian calendar?
- !ruby/struct:SM::Flow::P 
  body: All years divisible by 4 are leap years in the Gregorian calendar, except for years divisible by 100 and not by 400.
full_name: Date::gregorian_leap?
is_singleton: true
name: gregorian_leap?
params: (y)
visibility: public
ri/1.8/system/Date/mon-i.yaml000064400000000477150403662020011576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: month
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the month of this date.
- !ruby/struct:SM::Flow::P 
  body: January is month 1.
full_name: Date#mon
is_singleton: false
name: mon
params: ()
visibility: public
ri/1.8/system/Date/cwyear-i.yaml000064400000000517150403662020012272 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the commercial year of this date. See <b>Commercial</b> <b>Date</b> in the introduction for how this differs from the normal year.
full_name: Date#cwyear
is_singleton: false
name: cwyear
params: ()
visibility: public
ri/1.8/system/Date/day-i.yaml000064400000000324150403662020011551 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #mday"
full_name: Date#day
is_singleton: false
name: day
params: ()
visibility: public
ri/1.8/system/Date/julian_leap%3f-c.yaml000064400000000547150403662020013556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is a year a leap year in the Julian calendar?
- !ruby/struct:SM::Flow::P 
  body: All years divisible by 4 are leap years in the Julian calendar.
full_name: Date::julian_leap?
is_singleton: true
name: julian_leap?
params: (y)
visibility: public
ri/1.8/system/Date/eql%3f-i.yaml000064400000000533150403662020012055 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is this Date equal to <tt>other</tt>?
- !ruby/struct:SM::Flow::P 
  body: <tt>other</tt> must both be a Date object, and represent the same date.
full_name: Date#eql?
is_singleton: false
name: eql?
params: (other)
visibility: public
ri/1.8/system/Date/offset-i.yaml000064400000000245150403662020012264 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#offset
is_singleton: false
name: offset
params: ()
visibility: private
ri/1.8/system/Date/ctime-i.yaml000064400000000333150403662020012075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #asctime"
full_name: Date#ctime
is_singleton: false
name: ctime
params: ()
visibility: public
ri/1.8/system/Date/ordinal-i.yaml000064400000000400150403662020012417 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as an Ordinal Date, [year, day_of_year]
full_name: Date#ordinal
is_singleton: false
name: ordinal
params: ()
visibility: private
ri/1.8/system/Date/civil-i.yaml000064400000000401150403662020012076 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as a Civil Date, [year, month, day_of_month]
full_name: Date#civil
is_singleton: false
name: civil
params: ()
visibility: private
ri/1.8/system/Date/gregorian-i.yaml000064400000000431150403662020012750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a copy of this Date object that always uses the Gregorian Calendar.
full_name: Date#gregorian
is_singleton: false
name: gregorian
params: ()
visibility: public
ri/1.8/system/Date/mday-i.yaml000064400000000422150403662020011725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: day
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the day-of-the-month of this date.
full_name: Date#mday
is_singleton: false
name: mday
params: ()
visibility: public
ri/1.8/system/Date/today-c.yaml000064400000000521150403662020012105 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object representing today.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::today
is_singleton: true
name: today
params: (sg=ITALY)
visibility: public
ri/1.8/system/Date/jd_to_ld-c.yaml000064400000000471150403662020012547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Julian Day Number to the number of days since the adoption of the Gregorian Calendar (in Italy).
full_name: Date::jd_to_ld
is_singleton: true
name: jd_to_ld
params: (jd)
visibility: public
ri/1.8/system/Date/ld_to_jd-c.yaml000064400000000504150403662030012545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a count of the number of days since the adoption of the Gregorian Calendar (in Italy) to a Julian Day Number.
full_name: Date::ld_to_jd
is_singleton: true
name: ld_to_jd
params: (ld)
visibility: public
ri/1.8/system/Date/%3c%3d%3e-i.yaml000064400000001345150403662030012144 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Compare this date with another date.
- !ruby/struct:SM::Flow::P 
  body: <tt>other</tt> can also be a Numeric value, in which case it is interpreted as an Astronomical Julian Day Number.
- !ruby/struct:SM::Flow::P 
  body: Comparison is by Astronomical Julian Day Number, including fractional days. This means that both the time and the timezone offset are taken into account when comparing two DateTime instances. When comparing a DateTime instance with a Date instance, the time of the latter will be considered as falling on midnight UTC.
full_name: Date#<=>
is_singleton: false
name: <=>
params: (other)
visibility: public
ri/1.8/system/Date/jd_to_ajd-c.yaml000064400000001123150403662030012702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a (civil) Julian Day Number to an Astronomical Julian Day Number.
- !ruby/struct:SM::Flow::P 
  body: <tt>jd</tt> is the Julian Day Number to convert, and <tt>fr</tt> is a fractional day. <tt>of</tt> is the offset from UTC as a fraction of a day (defaults to 0).
- !ruby/struct:SM::Flow::P 
  body: Returns the Astronomical Julian Day Number as a single numeric value.
full_name: Date::jd_to_ajd
is_singleton: true
name: jd_to_ajd
params: (jd, fr, of=0)
visibility: public
ri/1.8/system/Date/amjd-i.yaml000064400000000400150403662030011703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as an Astronomical Modified Julian Day Number.
full_name: Date#amjd
is_singleton: false
name: amjd
params: ()
visibility: public
ri/1.8/system/Date/hour-i.yaml000064400000000340150403662030011750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the hour of this date.
full_name: Date#hour
is_singleton: false
name: hour
params: ()
visibility: private
ri/1.8/system/Date/weeknum0-i.yaml000064400000000251150403662030012527 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#weeknum0
is_singleton: false
name: weeknum0
params: ()
visibility: private
ri/1.8/system/Date/jd_to_commercial-c.yaml000064400000001042150403662030014257 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Julian Day Number to a Commercial Date
- !ruby/struct:SM::Flow::P 
  body: <tt>jd</tt> is the Julian Day Number to convert. <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: Returns the corresponding Commercial Date as [commercial_year, week_of_year, day_of_week]
full_name: Date::jd_to_commercial
is_singleton: true
name: jd_to_commercial
params: (jd, sg=GREGORIAN)
visibility: public
ri/1.8/system/Date/day_fraction-i.yaml000064400000000375150403662030013445 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get any fractional day part of the date.
full_name: Date#day_fraction
is_singleton: false
name: day_fraction
params: ()
visibility: public
ri/1.8/system/Date/jd-c.yaml000064400000000641150403662030011366 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object from a Julian Day Number.
- !ruby/struct:SM::Flow::P 
  body: <tt>jd</tt> is the Julian Day Number; if not specified, it defaults to 0. <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::jd
is_singleton: true
name: jd
params: (jd=0, sg=ITALY)
visibility: public
ri/1.8/system/Date/sec_fraction-i.yaml000064400000000500150403662030013430 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the fraction-of-a-second of this date. The unit is in days. I do NOT recommend you to use this method.
full_name: Date#sec_fraction
is_singleton: false
name: sec_fraction
params: ()
visibility: private
ri/1.8/system/Date/leap%3f-i.yaml000064400000000333150403662030012214 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is this a leap year?
full_name: Date#leap?
is_singleton: false
name: leap?
params: ()
visibility: public
ri/1.8/system/Date/jd_to_mjd-c.yaml000064400000000415150403662030012721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Julian Day Number to a Modified Julian Day Number.
full_name: Date::jd_to_mjd
is_singleton: true
name: jd_to_mjd
params: (jd)
visibility: public
ri/1.8/system/Date/cweek-i.yaml000064400000000370150403662030012074 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the commercial week of the year of this date.
full_name: Date#cweek
is_singleton: false
name: cweek
params: ()
visibility: public
ri/1.8/system/Date/civil-c.yaml000064400000001530150403662030012075 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object for the Civil Date specified by year <tt>y</tt>, month <tt>m</tt>, and day-of-month <tt>d</tt>.
- !ruby/struct:SM::Flow::P 
  body: <tt>m</tt> and <tt>d</tt> can be negative, in which case they count backwards from the end of the year and the end of the month respectively. No wraparound is performed, however, and invalid values cause an ArgumentError to be raised. can be negative
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt> defaults to -4712, <tt>m</tt> to 1, and <tt>d</tt> to 1; this is Julian Day Number day 0.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::civil
is_singleton: true
name: civil
params: (y=-4712, m=1, d=1, sg=ITALY)
visibility: public
ri/1.8/system/Date/jd_to_wday-c.yaml000064400000000536150403662030013117 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Julian Day Number to the day of the week.
- !ruby/struct:SM::Flow::P 
  body: Sunday is day-of-week 0; Saturday is day-of-week 6.
full_name: Date::jd_to_wday
is_singleton: true
name: jd_to_wday
params: (jd)
visibility: public
ri/1.8/system/Date/sec-i.yaml000064400000000340150403662030011545 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the second of this date.
full_name: Date#sec
is_singleton: false
name: sec
params: ()
visibility: private
ri/1.8/system/Date/to_yaml-i.yaml000064400000000261150403662030012441 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Date/upto-i.yaml000064400000000475150403662030011773 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: date
comment: 
- !ruby/struct:SM::Flow::P 
  body: Step forward one day at a time until we reach <tt>max</tt> (inclusive), yielding each date as we go.
full_name: Date#upto
is_singleton: false
name: upto
params: (max) {|date| ...}
visibility: public
ri/1.8/system/Date/jd-i.yaml000064400000000345150403662030011375 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as a Julian Day Number.
full_name: Date#jd
is_singleton: false
name: jd
params: ()
visibility: public
ri/1.8/system/Date/next_day-i.yaml000064400000000254150403662030012612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#next_day
is_singleton: false
name: next_day
params: (n=1)
visibility: private
ri/1.8/system/Date/hash-i.yaml000064400000000352150403662030011721 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calculate a hash value for this date.
full_name: Date#hash
is_singleton: false
name: hash
params: ()
visibility: public
ri/1.8/system/Date/parse-c.yaml000064400000001620150403662030012101 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object by parsing from a String, without specifying the format.
- !ruby/struct:SM::Flow::P 
  body: "<tt>str</tt> is a String holding a date representation. <tt>comp</tt> specifies whether to interpret 2-digit years as 19XX (&gt;= 69) or 20XX (&lt; 69); the default is not to. The method will attempt to parse a date from the String using various heuristics; see #_parse in date/format.rb for more details. If parsing fails, an ArgumentError will be raised."
- !ruby/struct:SM::Flow::P 
  body: The default <tt>str</tt> is '-4712-01-01'; this is Julian Day Number day 0.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::parse
is_singleton: true
name: parse
params: (str='-4712-01-01', comp=false, sg=ITALY)
visibility: public
ri/1.8/system/Date/wnum1-i.yaml000064400000000243150403662030012044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#wnum1
is_singleton: false
name: wnum1
params: ()
visibility: private
ri/1.8/system/Date/Infinity/cdesc-Infinity.yaml000064400000000304150403662030015206 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
constants: []

full_name: Date::Infinity
includes: []

instance_methods: []

name: Infinity
superclass: Numeric
ri/1.8/system/Date/amjd_to_ajd-c.yaml000064400000000457150403662030013231 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert an Astronomical Modified Julian Day Number to an Astronomical Julian Day Number.
full_name: Date::amjd_to_ajd
is_singleton: true
name: amjd_to_ajd
params: (amjd)
visibility: public
ri/1.8/system/Date/next-i.yaml000064400000000426150403662030011756 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: succ
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a new Date one day after this one.
full_name: Date#next
is_singleton: false
name: next
params: ()
visibility: public
ri/1.8/system/Date/weeknum1-i.yaml000064400000000251150403662030012530 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#weeknum1
is_singleton: false
name: weeknum1
params: ()
visibility: private
ri/1.8/system/Date/ajd-i.yaml000064400000000365150403662030011540 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as an Astronomical Julian Day Number.
full_name: Date#ajd
is_singleton: false
name: ajd
params: ()
visibility: public
ri/1.8/system/Date/_parse-c.yaml000064400000000263150403662040012243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date::_parse
is_singleton: true
name: _parse
params: (str, comp=false)
visibility: public
ri/1.8/system/Date/wnum0-i.yaml000064400000000243150403662040012044 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#wnum0
is_singleton: false
name: wnum0
params: ()
visibility: private
ri/1.8/system/Date/min-i.yaml000064400000000340150403662040011557 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the minute of this date.
full_name: Date#min
is_singleton: false
name: min
params: ()
visibility: private
ri/1.8/system/Date/year-i.yaml000064400000000337150403662040011742 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the year of this date.
full_name: Date#year
is_singleton: false
name: year
params: ()
visibility: public
ri/1.8/system/Date/mjd_to_jd-c.yaml000064400000000416150403662040012723 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Modified Julian Day Number to a Julian Day Number.
full_name: Date::mjd_to_jd
is_singleton: true
name: mjd_to_jd
params: (mjd)
visibility: public
ri/1.8/system/Date/_strptime-c.yaml000064400000000267150403662040013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date::_strptime
is_singleton: true
name: _strptime
params: (str, fmt='%F')
visibility: public
ri/1.8/system/Date/strftime-i.yaml000064400000000260150403662040012632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#strftime
is_singleton: false
name: strftime
params: (fmt='%F')
visibility: public
ri/1.8/system/Date/inspect-i.yaml000064400000000410150403662040012437 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return internal object state as a programmer-readable string.
full_name: Date#inspect
is_singleton: false
name: inspect
params: ()
visibility: public
ri/1.8/system/Date/commercial_to_jd-c.yaml000064400000001004150403662040014256 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Commercial Date to a Julian Day Number.
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt>, <tt>w</tt>, and <tt>d</tt> are the (commercial) year, week of the year, and day of the week of the Commercial Date to convert. <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::commercial_to_jd
is_singleton: true
name: commercial_to_jd
params: (y, w, d, ns=GREGORIAN)
visibility: public
ri/1.8/system/Date/wday-i.yaml000064400000000427150403662040011746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the week day of this date. Sunday is day-of-week 0; Saturday is day-of-week 6.
full_name: Date#wday
is_singleton: false
name: wday
params: ()
visibility: public
ri/1.8/system/Date/new-c.yaml000064400000001710150403662040011561 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "<b>NOTE</b> this is the documentation for the method new!(). If you are reading this as the documentation for new(), that is because rdoc doesn't fully support the aliasing of the initialize() method. new() is in fact an alias for #civil(): read the documentation for that method instead."
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object.
- !ruby/struct:SM::Flow::P 
  body: <tt>ajd</tt> is the Astronomical Julian Day Number. <tt>of</tt> is the offset from UTC as a fraction of a day. Both default to 0.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform to use for this Date object.
- !ruby/struct:SM::Flow::P 
  body: Using one of the factory methods such as Date::civil is generally easier and safer.
full_name: Date::new
is_singleton: true
name: new
params: (ajd=0, of=0, sg=ITALY)
visibility: public
ri/1.8/system/Date/valid_jd%3f-c.yaml000064400000000572150403662040013047 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is <tt>jd</tt> a valid Julian Day Number?
- !ruby/struct:SM::Flow::P 
  body: If it is, returns it. In fact, any value is treated as a valid Julian Day Number.
full_name: Date::valid_jd?
is_singleton: true
name: valid_jd?
params: (jd, sg=ITALY)
visibility: public
ri/1.8/system/Date/gregorian%3f-i.yaml000064400000000404150403662040013250 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is the current date new-style (Gregorian Calendar)?
full_name: Date#gregorian?
is_singleton: false
name: gregorian?
params: ()
visibility: public
ri/1.8/system/Date/%3d%3d%3d-i.yaml000064400000000720150403662040012141 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The relationship operator for Date.
- !ruby/struct:SM::Flow::P 
  body: Compares dates by Julian Day Number. When comparing two DateTime instances, or a DateTime with a Date, the instances will be regarded as equivalent if they fall on the same date in local time.
full_name: Date#===
is_singleton: false
name: ===
params: (other)
visibility: public
ri/1.8/system/Date/valid_commercial%3f-c.yaml000064400000001666150403662040014572 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Do year <tt>y</tt>, week-of-year <tt>w</tt>, and day-of-week <tt>d</tt> make a valid Commercial Date? Returns the corresponding Julian Day Number if they do, nil if they don't.
- !ruby/struct:SM::Flow::P 
  body: Monday is day-of-week 1; Sunday is day-of-week 7.
- !ruby/struct:SM::Flow::P 
  body: <tt>w</tt> and <tt>d</tt> can be negative, in which case they count backwards from the end of the year and the end of the week respectively. No wraparound is performed, however, and invalid values cause an ArgumentError to be raised. A date falling in the period skipped in the Day of Calendar Reform adjustment is not valid.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::valid_commercial?
is_singleton: true
name: valid_commercial?
params: (y, w, d, sg=ITALY)
visibility: public
ri/1.8/system/Date/step-i.yaml000064400000000636150403662040011757 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: date
comment: 
- !ruby/struct:SM::Flow::P 
  body: Step the current date forward <tt>step</tt> days at a time (or backward, if <tt>step</tt> is negative) until we reach <tt>limit</tt> (inclusive), yielding the resultant date at each step.
full_name: Date#step
is_singleton: false
name: step
params: (limit, step=1) {|date| ...}
visibility: public
ri/1.8/system/Date/start-i.yaml000064400000000377150403662040012143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: When is the Day of Calendar Reform for this Date object?
full_name: Date#start
is_singleton: false
name: start
params: ()
visibility: public
ri/1.8/system/Date/%3e%3e-i.yaml000064400000000750150403662040011652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a new Date object that is <tt>n</tt> months later than the current one.
- !ruby/struct:SM::Flow::P 
  body: If the day-of-the-month of the current Date is greater than the last day of the target month, the day-of-the-month of the returned Date will be the last day of the target month.
full_name: Date#>>
is_singleton: false
name: ">>"
params: (n)
visibility: public
ri/1.8/system/Date/commercial-i.yaml000064400000000426150403662040013114 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as a Commercial Date, [year, week_of_year, day_of_week]
full_name: Date#commercial
is_singleton: false
name: commercial
params: ()
visibility: private
ri/1.8/system/Date/time-i.yaml000064400000000422150403662040011733 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the time of this date as [hours, minutes, seconds, fraction_of_a_second]
full_name: Date#time
is_singleton: false
name: time
params: ()
visibility: private
ri/1.8/system/Date/cwday-i.yaml000064400000000477150403662040012116 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the commercial day of the week of this date. Monday is commercial day-of-week 1; Sunday is commercial day-of-week 7.
full_name: Date#cwday
is_singleton: false
name: cwday
params: ()
visibility: public
ri/1.8/system/Date/jd_to_civil-c.yaml000064400000000733150403662040013261 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Julian Day Number to a Civil Date. <tt>jd</tt> is the Julian Day Number. <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: Returns the corresponding [year, month, day_of_month] as a three-element array.
full_name: Date::jd_to_civil
is_singleton: true
name: jd_to_civil
params: (jd, sg=GREGORIAN)
visibility: public
ri/1.8/system/Date/zone-i.yaml000064400000000352150403662040011752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: ":minute, :second, :second_fraction"
full_name: Date#zone
is_singleton: false
name: zone
params: ()
visibility: private
ri/1.8/system/Date/julian-i.yaml000064400000000420150403662040012255 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a copy of this Date object that always uses the Julian Calendar.
full_name: Date#julian
is_singleton: false
name: julian
params: ()
visibility: public
ri/1.8/system/Date/valid_ordinal%3f-c.yaml000064400000001566150403662040014106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Do the year <tt>y</tt> and day-of-year <tt>d</tt> make a valid Ordinal Date? Returns the corresponding Julian Day Number if they do, or nil if they don't.
- !ruby/struct:SM::Flow::P 
  body: <tt>d</tt> can be a negative number, in which case it counts backwards from the end of the year (-1 being the last day of the year). No year wraparound is performed, however, so valid values of <tt>d</tt> are -365 .. -1, 1 .. 365 on a non-leap-year, -366 .. -1, 1 .. 366 on a leap year. A date falling in the period skipped in the Day of Calendar Reform adjustment is not valid.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::valid_ordinal?
is_singleton: true
name: valid_ordinal?
params: (y, d, sg=ITALY)
visibility: public
ri/1.8/system/Date/jd_to_ordinal-c.yaml000064400000000777150403662040013613 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Julian Day Number to an Ordinal Date.
- !ruby/struct:SM::Flow::P 
  body: <tt>jd</tt> is the Julian Day Number to convert. <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: Returns the corresponding Ordinal Date as [year, day_of_year]
full_name: Date::jd_to_ordinal
is_singleton: true
name: jd_to_ordinal
params: (jd, sg=GREGORIAN)
visibility: public
ri/1.8/system/Date/month-i.yaml000064400000000327150403662040012126 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #mon"
full_name: Date#month
is_singleton: false
name: month
params: ()
visibility: public
ri/1.8/system/Date/%2b-i.yaml000064400000001121150403662040011342 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a new Date object that is <tt>n</tt> days later than the current one.
- !ruby/struct:SM::Flow::P 
  body: "<tt>n</tt> may be a negative value, in which case the new Date is earlier than the current one; however, #-() might be more intuitive."
- !ruby/struct:SM::Flow::P 
  body: If <tt>n</tt> is not a Numeric, a TypeError will be thrown. In particular, two Dates cannot be added to each other.
full_name: Date#+
is_singleton: false
name: +
params: (n)
visibility: public
ri/1.8/system/Date/strptime-c.yaml000064400000001577150403662040012652 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object by parsing from a String according to a specified format.
- !ruby/struct:SM::Flow::P 
  body: <tt>str</tt> is a String holding a date representation. <tt>fmt</tt> is the format that the date is in. See date/format.rb for details on supported formats.
- !ruby/struct:SM::Flow::P 
  body: The default <tt>str</tt> is '-4712-01-01', and the default <tt>fmt</tt> is '%F', which means Year-Month-Day_of_Month. This gives Julian Day Number day 0.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: An ArgumentError will be raised if <tt>str</tt> cannot be parsed.
full_name: Date::strptime
is_singleton: true
name: strptime
params: (str='-4712-01-01', fmt='%F', sg=ITALY)
visibility: public
ri/1.8/system/Date/%3c%3c-i.yaml000064400000000752150403662040011650 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return a new Date object that is <tt>n</tt> months earlier than the current one.
- !ruby/struct:SM::Flow::P 
  body: If the day-of-the-month of the current Date is greater than the last day of the target month, the day-of-the-month of the returned Date will be the last day of the target month.
full_name: Date#<<
is_singleton: false
name: "<<"
params: (n)
visibility: public
ri/1.8/system/Date/mjd-i.yaml000064400000000360150403662040011550 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as a Modified Julian Day Number.
full_name: Date#mjd
is_singleton: false
name: mjd
params: ()
visibility: public
ri/1.8/system/Date/time_to_day_fraction-c.yaml000064400000000311150403662040015146 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date::time_to_day_fraction
is_singleton: true
name: time_to_day_fraction
params: (h, min, s)
visibility: public
ri/1.8/system/Date/succ-i.yaml000064400000000326150403662040011735 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #next"
full_name: Date#succ
is_singleton: false
name: succ
params: ()
visibility: public
ri/1.8/system/Date/julian%3f-i.yaml000064400000000373150403662040012562 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Is the current date old-style (Julian Calendar)?
full_name: Date#julian?
is_singleton: false
name: julian?
params: ()
visibility: public
ri/1.8/system/Date/ajd_to_jd-c.yaml000064400000001132150403662040012703 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert an Astronomical Julian Day Number to a (civil) Julian Day Number.
- !ruby/struct:SM::Flow::P 
  body: <tt>ajd</tt> is the Astronomical Julian Day Number to convert. <tt>of</tt> is the offset from UTC as a fraction of a day (defaults to 0).
- !ruby/struct:SM::Flow::P 
  body: Returns the (civil) Julian Day Number as [day_number, fraction] where <tt>fraction</tt> is always 1/2.
full_name: Date::ajd_to_jd
is_singleton: true
name: ajd_to_jd
params: (ajd, of=0)
visibility: public
ri/1.8/system/Date/to_s-i.yaml000064400000000463150403662040011746 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return the date as a human-readable string.
- !ruby/struct:SM::Flow::P 
  body: The format used is YYYY-MM-DD.
full_name: Date#to_s
is_singleton: false
name: to_s
params: ()
visibility: public
ri/1.8/system/Date/day_fraction_to_time-c.yaml000064400000000476150403662040015162 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a fractional day <tt>fr</tt> to [hours, minutes, seconds, fraction_of_a_second]
full_name: Date::day_fraction_to_time
is_singleton: true
name: day_fraction_to_time
params: (fr)
visibility: public
ri/1.8/system/Date/new_start-i.yaml000064400000000450150403662040013004 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a copy of this Date object using a new Day of Calendar Reform.
full_name: Date#new_start
is_singleton: false
name: new_start
params: (sg=self.class::ITALY)
visibility: public
ri/1.8/system/Date/ld-i.yaml000064400000000453150403662040011400 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the date as the number of days since the Day of Calendar Reform (in Italy and the Catholic countries).
full_name: Date#ld
is_singleton: false
name: ld
params: ()
visibility: public
ri/1.8/system/Date/julian%3f-c.yaml000064400000001151150403662040012547 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Does a given Julian Day Number fall inside the old-style (Julian) calendar?
- !ruby/struct:SM::Flow::P 
  body: <tt>jd</tt> is the Julian Day Number in question. <tt>sg</tt> may be Date::GREGORIAN, in which case the answer is false; it may be Date::JULIAN, in which case the answer is true; or it may a number representing the Day of Calendar Reform. Date::ENGLAND and Date::ITALY are two possible such days.
full_name: Date::julian?
is_singleton: true
name: julian?
params: (jd, sg)
visibility: public
ri/1.8/system/Date/s3e-c.yaml000064400000000263150403662040011464 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date::s3e
is_singleton: true
name: s3e
params: (e, y, m, d, bc=false)
visibility: private
ri/1.8/system/Date/_dump-i.yaml000064400000000343150403662040012103 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dump to Marshal format.
full_name: Date#_dump
is_singleton: false
name: _dump
params: (limit)
visibility: public
ri/1.8/system/Date/valid_time%3f-c.yaml000064400000001263150403662040013406 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Do hour <tt>h</tt>, minute <tt>min</tt>, and second <tt>s</tt> constitute a valid time?
- !ruby/struct:SM::Flow::P 
  body: If they do, returns their value as a fraction of a day. If not, returns nil.
- !ruby/struct:SM::Flow::P 
  body: The 24-hour clock is used. Negative values of <tt>h</tt>, <tt>min</tt>, and <tt>sec</tt> are treating as counting backwards from the end of the next larger unit (e.g. a <tt>min</tt> of -2 is treated as 58). No wraparound is performed.
full_name: Date::valid_time?
is_singleton: true
name: valid_time?
params: (h, min, s)
visibility: public
ri/1.8/system/Date/new_offset-i.yaml000064400000000261150403662040013135 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Date#new_offset
is_singleton: false
name: new_offset
params: (of=0)
visibility: private
ri/1.8/system/Date/ordinal_to_jd-c.yaml000064400000001002150403662040013571 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert an Ordinal Date to a Julian Day Number.
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt> and <tt>d</tt> are the year and day-of-year to convert. <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: Returns the corresponding Julian Day Number.
full_name: Date::ordinal_to_jd
is_singleton: true
name: ordinal_to_jd
params: (y, d, sg=GREGORIAN)
visibility: public
ri/1.8/system/Date/commercial-c.yaml000064400000001722150403662040013106 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object for the Commercial Date specified by year <tt>y</tt>, week-of-year <tt>w</tt>, and day-of-week <tt>d</tt>.
- !ruby/struct:SM::Flow::P 
  body: Monday is day-of-week 1; Sunday is day-of-week 7.
- !ruby/struct:SM::Flow::P 
  body: <tt>w</tt> and <tt>d</tt> can be negative, in which case they count backwards from the end of the year and the end of the week respectively. No wraparound is performed, however, and invalid values cause an ArgumentError to be raised.
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt> defaults to 1582, <tt>w</tt> to 41, and <tt>d</tt> to 5, the Day of Calendar Reform for Italy and the Catholic countries.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::commercial
is_singleton: true
name: commercial
params: (y=1582, w=41, d=5, sg=ITALY)
visibility: public
ri/1.8/system/Date/italy-i.yaml000064400000000437150403662040012125 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a copy of this Date object that uses the Italian/Catholic Day of Calendar Reform.
full_name: Date#italy
is_singleton: false
name: italy
params: ()
visibility: public
ri/1.8/system/Date/downto-i.yaml000064400000000502150403662040012306 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: date
comment: 
- !ruby/struct:SM::Flow::P 
  body: Step backward one day at a time until we reach <tt>min</tt> (inclusive), yielding each date as we go.
full_name: Date#downto
is_singleton: false
name: downto
params: (min) {|date| ...}
visibility: public
ri/1.8/system/Date/gregorian%3f-c.yaml000064400000000631150403662050013245 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Does a given Julian Day Number fall inside the new-style (Gregorian) calendar?
- !ruby/struct:SM::Flow::P 
  body: The reverse of self.os? See the documentation for that method for more details.
full_name: Date::gregorian?
is_singleton: true
name: gregorian?
params: (jd, sg)
visibility: public
ri/1.8/system/Date/now-c.yaml000064400000000535150403662050011600 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new DateTime object representing the current time.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::now
is_singleton: true
name: now
params: (sg=ITALY)
visibility: private
ri/1.8/system/Date/yday-i.yaml000064400000000455150403662050011752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Get the day-of-the-year of this date.
- !ruby/struct:SM::Flow::P 
  body: January 1 is day-of-the-year 1
full_name: Date#yday
is_singleton: false
name: yday
params: ()
visibility: public
ri/1.8/system/Date/asctime-i.yaml000064400000000423150403662050012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: ctime
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: alias_method :format, :strftime
full_name: Date#asctime
is_singleton: false
name: asctime
params: ()
visibility: public
ri/1.8/system/Date/ordinal-c.yaml000064400000001335150403662050012424 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new Date object from an Ordinal Date, specified by year <tt>y</tt> and day-of-year <tt>d</tt>. <tt>d</tt> can be negative, in which it counts backwards from the end of the year. No year wraparound is performed, however. An invalid value for <tt>d</tt> results in an ArgumentError being raised.
- !ruby/struct:SM::Flow::P 
  body: <tt>y</tt> defaults to -4712, and <tt>d</tt> to 1; this is Julian Day Number day 0.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::ordinal
is_singleton: true
name: ordinal
params: (y=-4712, d=1, sg=ITALY)
visibility: public
ri/1.8/system/Date/valid_civil%3f-c.yaml000064400000001514150403662050013556 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Do year <tt>y</tt>, month <tt>m</tt>, and day-of-month <tt>d</tt> make a valid Civil Date? Returns the corresponding Julian Day Number if they do, nil if they don't.
- !ruby/struct:SM::Flow::P 
  body: <tt>m</tt> and <tt>d</tt> can be negative, in which case they count backwards from the end of the year and the end of the month respectively. No wraparound is performed, however, and invalid values cause an ArgumentError to be raised. A date falling in the period skipped in the Day of Calendar Reform adjustment is not valid.
- !ruby/struct:SM::Flow::P 
  body: <tt>sg</tt> specifies the Day of Calendar Reform.
full_name: Date::valid_civil?
is_singleton: true
name: valid_civil?
params: (y, m, d, sg=ITALY)
visibility: public
ri/1.8/system/Date/%2d-i.yaml000064400000001125150403662050011351 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: If <tt>x</tt> is a Numeric value, create a new Date object that is <tt>x</tt> days earlier than the current one.
- !ruby/struct:SM::Flow::P 
  body: If <tt>x</tt> is a Date, return the number of days between the two dates; or, more precisely, how many days later the current date is than <tt>x</tt>.
- !ruby/struct:SM::Flow::P 
  body: If <tt>x</tt> is neither Numeric nor a Date, a TypeError is raised.
full_name: Date#-
is_singleton: false
name: "-"
params: (x)
visibility: public
ri/1.8/system/Date/civil_to_jd-c.yaml000064400000000751150403662050013262 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert a Civil Date to a Julian Day Number. <tt>y</tt>, <tt>m</tt>, and <tt>d</tt> are the year, month, and day of the month. <tt>sg</tt> specifies the Day of Calendar Reform.
- !ruby/struct:SM::Flow::P 
  body: Returns the corresponding Julian Day Number.
full_name: Date::civil_to_jd
is_singleton: true
name: civil_to_jd
params: (y, m, d, sg=GREGORIAN)
visibility: public
ri/1.8/system/Date/ajd_to_amjd-c.yaml000064400000000456150403662050013232 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Convert an Astronomical Julian Day Number to an Astronomical Modified Julian Day Number.
full_name: Date::ajd_to_amjd
is_singleton: true
name: ajd_to_amjd
params: (ajd)
visibility: public
ri/1.8/system/Proc/arity-i.yaml000064400000001642150403662050012161 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the number of arguments that would not be ignored. If the block is declared to take no arguments, returns 0. If the block is known to take exactly n arguments, returns n. If the block has optional arguments, return -n-1, where n is the number of mandatory arguments. A <tt>proc</tt> with no argument declarations is the same a block declaring <tt>||</tt> as its arguments.
- !ruby/struct:SM::Flow::VERB 
  body: "   Proc.new {}.arity          #=&gt;  0\n   Proc.new {||}.arity        #=&gt;  0\n   Proc.new {|a|}.arity       #=&gt;  1\n   Proc.new {|a,b|}.arity     #=&gt;  2\n   Proc.new {|a,b,c|}.arity   #=&gt;  3\n   Proc.new {|*a|}.arity      #=&gt; -1\n   Proc.new {|a,*b|}.arity    #=&gt; -2\n"
full_name: Proc#arity
is_singleton: false
name: arity
params: |
  prc.arity -> fixnum

visibility: public
ri/1.8/system/Proc/%5b%5d-i.yaml000064400000002566150403662050011710 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the block, setting the block's parameters to the values in <em>params</em> using something close to method calling semantics. Generates a warning if multiple values are passed to a proc that expects just one (previously this silently converted the parameters to an array).
- !ruby/struct:SM::Flow::P 
  body: For procs created using <tt>Kernel.proc</tt>, generates an error if the wrong number of parameters are passed to a proc with multiple parameters. For procs created using <tt>Proc.new</tt>, extra parameters are silently discarded.
- !ruby/struct:SM::Flow::P 
  body: Returns the value of the last expression evaluated in the block. See also <tt>Proc#yield</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a_proc = Proc.new {|a, *b| b.collect {|i| i*a }}\n   a_proc.call(9, 1, 2, 3)   #=&gt; [9, 18, 27]\n   a_proc[9, 1, 2, 3]        #=&gt; [9, 18, 27]\n   a_proc = Proc.new {|a,b| a}\n   a_proc.call(1,2,3)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   prog.rb:5: wrong number of arguments (3 for 2) (ArgumentError)\n    from prog.rb:4:in `call'\n    from prog.rb:5\n"
full_name: Proc#[]
is_singleton: false
name: "[]"
params: |
  prc.call(params,...)   => obj
  prc[params,...]        => obj

visibility: public
ri/1.8/system/Proc/binding-i.yaml000064400000001131150403662050012434 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the binding associated with <em>prc</em>. Note that <tt>Kernel#eval</tt> accepts either a <tt>Proc</tt> or a <tt>Binding</tt> object as its second parameter.
- !ruby/struct:SM::Flow::VERB 
  body: "   def fred(param)\n     proc {}\n   end\n\n   b = fred(99)\n   eval(&quot;param&quot;, b.binding)   #=&gt; 99\n   eval(&quot;param&quot;, b)           #=&gt; 99\n"
full_name: Proc#binding
is_singleton: false
name: binding
params: |
  prc.binding    => binding

visibility: public
ri/1.8/system/Proc/call-i.yaml000064400000002570150403662050011745 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Invokes the block, setting the block's parameters to the values in <em>params</em> using something close to method calling semantics. Generates a warning if multiple values are passed to a proc that expects just one (previously this silently converted the parameters to an array).
- !ruby/struct:SM::Flow::P 
  body: For procs created using <tt>Kernel.proc</tt>, generates an error if the wrong number of parameters are passed to a proc with multiple parameters. For procs created using <tt>Proc.new</tt>, extra parameters are silently discarded.
- !ruby/struct:SM::Flow::P 
  body: Returns the value of the last expression evaluated in the block. See also <tt>Proc#yield</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   a_proc = Proc.new {|a, *b| b.collect {|i| i*a }}\n   a_proc.call(9, 1, 2, 3)   #=&gt; [9, 18, 27]\n   a_proc[9, 1, 2, 3]        #=&gt; [9, 18, 27]\n   a_proc = Proc.new {|a,b| a}\n   a_proc.call(1,2,3)\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   prog.rb:5: wrong number of arguments (3 for 2) (ArgumentError)\n    from prog.rb:4:in `call'\n    from prog.rb:5\n"
full_name: Proc#call
is_singleton: false
name: call
params: |
  prc.call(params,...)   => obj
  prc[params,...]        => obj

visibility: public
ri/1.8/system/Proc/to_proc-i.yaml000064400000000540150403662050012472 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Part of the protocol for converting objects to <tt>Proc</tt> objects. Instances of class <tt>Proc</tt> simply return themselves.
full_name: Proc#to_proc
is_singleton: false
name: to_proc
params: |
  prc.to_proc -> prc

visibility: public
ri/1.8/system/Proc/cdesc-Proc.yaml000064400000002143150403662050012562 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Proc</tt> objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables.
- !ruby/struct:SM::Flow::VERB 
  body: "   def gen_times(factor)\n     return Proc.new {|n| n*factor }\n   end\n\n   times3 = gen_times(3)\n   times5 = gen_times(5)\n\n   times3.call(12)               #=&gt; 36\n   times5.call(5)                #=&gt; 25\n   times3.call(times5.call(4))   #=&gt; 60\n"
constants: []

full_name: Proc
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: ==
- !ruby/object:RI::MethodSummary 
  name: "[]"
- !ruby/object:RI::MethodSummary 
  name: arity
- !ruby/object:RI::MethodSummary 
  name: binding
- !ruby/object:RI::MethodSummary 
  name: call
- !ruby/object:RI::MethodSummary 
  name: clone
- !ruby/object:RI::MethodSummary 
  name: to_proc
- !ruby/object:RI::MethodSummary 
  name: to_s
name: Proc
superclass: Object
ri/1.8/system/Proc/new-c.yaml000064400000001226150403662050011612 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new <tt>Proc</tt> object, bound to the current context. <tt>Proc::new</tt> may be called without a block only within a method with an attached block, in which case that block is converted to the <tt>Proc</tt> object.
- !ruby/struct:SM::Flow::VERB 
  body: "   def proc_from\n     Proc.new\n   end\n   proc = proc_from { &quot;hello&quot; }\n   proc.call   #=&gt; &quot;hello&quot;\n"
full_name: Proc::new
is_singleton: true
name: new
params: |
  Proc.new {|...| block } => a_proc 
  Proc.new                => a_proc 

visibility: public
ri/1.8/system/Proc/to_s-i.yaml000064400000000476150403662050012001 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Shows the unique identifier for this proc, along with an indication of where the proc was defined.
full_name: Proc#to_s
is_singleton: false
name: to_s
params: |
  prc.to_s   => string

visibility: public
ri/1.8/system/Proc/%3d%3d-i.yaml000064400000000546150403662050011702 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Return <tt>true</tt> if <em>prc</em> is the same object as <em>other_proc</em>, or if they are both procs with the same body.
full_name: Proc#==
is_singleton: false
name: ==
params: |
  prc == other_proc   =>  true or false

visibility: public
ri/1.8/system/Proc/clone-i.yaml000064400000000337150403662050012131 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "MISSING: documentation"
full_name: Proc#clone
is_singleton: false
name: clone
params: ()
visibility: public
ri/1.8/system/ACL/ACLEntry/cdesc-ACLEntry.yaml000064400000000602150403662050014413 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: ACL::ACLEntry
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: dot_pat
- !ruby/object:RI::MethodSummary 
  name: dot_pat_str
- !ruby/object:RI::MethodSummary 
  name: match
name: ACLEntry
superclass: Object
ri/1.8/system/ACL/ACLEntry/match-i.yaml000064400000000257150403662050013243 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::ACLEntry#match
is_singleton: false
name: match
params: (addr)
visibility: public
ri/1.8/system/ACL/ACLEntry/new-c.yaml000064400000000252150403662050012725 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::ACLEntry::new
is_singleton: true
name: new
params: (str)
visibility: public
ri/1.8/system/ACL/ACLEntry/dot_pat_str-i.yaml000064400000000273150403662050014467 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::ACLEntry#dot_pat_str
is_singleton: false
name: dot_pat_str
params: (str)
visibility: private
ri/1.8/system/ACL/ACLEntry/dot_pat-i.yaml000064400000000263150403662050013576 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::ACLEntry#dot_pat
is_singleton: false
name: dot_pat
params: (str)
visibility: private
ri/1.8/system/ACL/new-c.yaml000064400000000271150403662050011305 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::new
is_singleton: true
name: new
params: (list=nil, order = DENY_ALLOW)
visibility: public
ri/1.8/system/ACL/allow_addr%3f-i.yaml000064400000000261150403662060013130 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL#allow_addr?
is_singleton: false
name: allow_addr?
params: (addr)
visibility: public
ri/1.8/system/ACL/allow_socket%3f-i.yaml000064400000000264150403662060013511 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL#allow_socket?
is_singleton: false
name: allow_socket?
params: (soc)
visibility: public
ri/1.8/system/ACL/install_list-i.yaml000064400000000263150403662070013226 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL#install_list
is_singleton: false
name: install_list
params: (list)
visibility: public
ri/1.8/system/ACL/cdesc-ACL.yaml000064400000001137150403662070011756 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: VERSION
  value: "[\"2.0.0\"]"
- !ruby/object:RI::Constant 
  comment: 
  name: DENY_ALLOW
  value: "0"
- !ruby/object:RI::Constant 
  comment: 
  name: ALLOW_DENY
  value: "1"
full_name: ACL
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: allow_addr?
- !ruby/object:RI::MethodSummary 
  name: allow_socket?
- !ruby/object:RI::MethodSummary 
  name: install_list
name: ACL
superclass: Object
ri/1.8/system/ACL/ACLList/match-i.yaml000064400000000256150403662100013050 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::ACLList#match
is_singleton: false
name: match
params: (addr)
visibility: public
ri/1.8/system/ACL/ACLList/add-i.yaml000064400000000251150403662100012477 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::ACLList#add
is_singleton: false
name: add
params: (str)
visibility: public
ri/1.8/system/ACL/ACLList/new-c.yaml000064400000000246150403662110012537 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: ACL::ACLList::new
is_singleton: true
name: new
params: ()
visibility: public
ri/1.8/system/ACL/ACLList/cdesc-ACLList.yaml000064400000000506150403662110014037 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
constants: []

full_name: ACL::ACLList
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: add
- !ruby/object:RI::MethodSummary 
  name: match
name: ACLList
superclass: Object
ri/1.8/system/Class/superclass-i.yaml000064400000000714150403662110013353 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns the superclass of <em>class</em>, or <tt>nil</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.superclass     #=&gt; IO\n   IO.superclass       #=&gt; Object\n   Object.superclass   #=&gt; nil\n"
full_name: Class#superclass
is_singleton: false
name: superclass
params: |
  class.superclass -> a_super_class or nil

visibility: public
ri/1.8/system/Class/cdesc-Class.yaml000064400000004713150403662120013071 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Classes in Ruby are first-class objects---each is an instance of class <tt>Class</tt>.
- !ruby/struct:SM::Flow::P 
  body: "When a new class is created (typically using <tt>class Name ... end</tt>), an object of type <tt>Class</tt> is created and assigned to a global constant (<tt>Name</tt> in this case). When <tt>Name.new</tt> is called to create a new object, the <tt>new</tt> method in <tt>Class</tt> is run by default. This can be demonstrated by overriding <tt>new</tt> in <tt>Class</tt>:"
- !ruby/struct:SM::Flow::VERB 
  body: "   class Class\n      alias oldNew  new\n      def new(*args)\n        print &quot;Creating a new &quot;, self.name, &quot;\\n&quot;\n        oldNew(*args)\n      end\n    end\n\n    class Name\n    end\n\n    n = Name.new\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   Creating a new Name\n"
- !ruby/struct:SM::Flow::P 
  body: Classes, modules, and objects are interrelated. In the diagram that follows, the vertical arrows represent inheritance, and the parentheses meta-classes. All metaclasses are instances of the class `Class'.
- !ruby/struct:SM::Flow::VERB 
  body: "                          +------------------+\n                          |                  |\n            Object----&gt;(Object)              |\n             ^  ^        ^  ^                |\n             |  |        |  |                |\n             |  |  +-----+  +---------+      |\n             |  |  |                  |      |\n             |  +-----------+         |      |\n             |     |        |         |      |\n      +------+     |     Module---&gt;(Module)  |\n      |            |        ^         ^      |\n OtherClass--&gt;(OtherClass)  |         |      |\n                            |         |      |\n                          Class----&gt;(Class)  |\n                            ^                |\n                            |                |\n                            +----------------+\n"
constants: []

full_name: Class
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: allocate
- !ruby/object:RI::MethodSummary 
  name: inherited
- !ruby/object:RI::MethodSummary 
  name: new
- !ruby/object:RI::MethodSummary 
  name: superclass
- !ruby/object:RI::MethodSummary 
  name: to_yaml
name: Class
superclass: Module
ri/1.8/system/Class/to_yaml-i.yaml000064400000000262150403662120012632 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: Class#to_yaml
is_singleton: false
name: to_yaml
params: ( opts = {} )
visibility: public
ri/1.8/system/Class/allocate-i.yaml000064400000001231150403662130012750 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Allocates space for a new object of <em>class</em>'s class and does not call initialize on the new instance. The returned object must be an instance of <em>class</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "    klass = Class.new do\n      def initialize(*args)\n        @initialized = true\n      end\n\n      def initialized?\n        @initialized || false\n      end\n    end\n\n    klass.allocate.initialized? #=&gt; false\n"
full_name: Class#allocate
is_singleton: false
name: allocate
params: |
  class.allocate()   =>   obj

visibility: public
ri/1.8/system/Class/new-c.yaml000064400000000655150403662140011761 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a new anonymous (unnamed) class with the given superclass (or <tt>Object</tt> if no parameter is given). You can give a class a name by assigning the class object to a constant.
full_name: Class::new
is_singleton: true
name: new
params: |
  Class.new(super_class=Object)   =>    a_class

visibility: public
ri/1.8/system/Class/new-i.yaml000064400000000735150403662140011766 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Calls <tt>allocate</tt> to create a new object of <em>class</em>'s class, then invokes that object's <tt>initialize</tt> method, passing it <em>args</em>. This is the method that ends up getting called whenever an object is constructed using .new.
full_name: Class#new
is_singleton: false
name: new
params: |
  class.new(args, ...)    =>  obj

visibility: public
ri/1.8/system/Class/inherited-i.yaml000064400000001306150403662140013143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Callback invoked whenever a subclass of the current class is created.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "   class Foo\n      def self.inherited(subclass)\n         puts &quot;New subclass: #{subclass}&quot;\n      end\n   end\n\n   class Bar &lt; Foo\n   end\n\n   class Baz &lt; Bar\n   end\n"
- !ruby/struct:SM::Flow::P 
  body: "produces:"
- !ruby/struct:SM::Flow::VERB 
  body: "   New subclass: Bar\n   New subclass: Baz\n"
full_name: Class#inherited
is_singleton: false
name: inherited
params: |
  inherited(subclass)

visibility: public
ri/1.8/system/DefaultDisplay/page-i.yaml000064400000000353150403662140013752 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: unless pager = setup_pager
comment: []

full_name: DefaultDisplay#page
is_singleton: false
name: page
params: () {|unless pager = setup_pager| ...}
visibility: private
ri/1.8/system/DefaultDisplay/cdesc-DefaultDisplay.yaml000064400000002120150403662140016573 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: A paging display module. Uses the ri_formatter class to do the actual presentation
constants: []

full_name: DefaultDisplay
includes: 
- !ruby/object:RI::IncludedModule 
  name: RiDisplay
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: display_class_info
- !ruby/object:RI::MethodSummary 
  name: display_class_list
- !ruby/object:RI::MethodSummary 
  name: display_flow
- !ruby/object:RI::MethodSummary 
  name: display_method_info
- !ruby/object:RI::MethodSummary 
  name: display_method_list
- !ruby/object:RI::MethodSummary 
  name: display_params
- !ruby/object:RI::MethodSummary 
  name: display_usage
- !ruby/object:RI::MethodSummary 
  name: list_known_classes
- !ruby/object:RI::MethodSummary 
  name: list_known_names
- !ruby/object:RI::MethodSummary 
  name: page
- !ruby/object:RI::MethodSummary 
  name: setup_pager
- !ruby/object:RI::MethodSummary 
  name: warn_no_database
name: DefaultDisplay
superclass: Object
ri/1.8/system/DefaultDisplay/display_usage-i.yaml000064400000000277150403662140015674 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#display_usage
is_singleton: false
name: display_usage
params: ()
visibility: public
ri/1.8/system/DefaultDisplay/display_method_list-i.yaml000064400000000422150403662140017073 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Display a list of method names
full_name: DefaultDisplay#display_method_list
is_singleton: false
name: display_method_list
params: (methods)
visibility: public
ri/1.8/system/DefaultDisplay/display_class_list-i.yaml000064400000000323150403662140016720 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#display_class_list
is_singleton: false
name: display_class_list
params: (namespaces)
visibility: public
ri/1.8/system/DefaultDisplay/warn_no_database-i.yaml000064400000000306150403662140016323 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#warn_no_database
is_singleton: false
name: warn_no_database
params: ()
visibility: private
ri/1.8/system/DefaultDisplay/list_known_classes-i.yaml000064400000000320150403662140016734 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#list_known_classes
is_singleton: false
name: list_known_classes
params: (classes)
visibility: public
ri/1.8/system/DefaultDisplay/new-c.yaml000064400000000257150403662140013624 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
full_name: DefaultDisplay::new
is_singleton: true
name: new
params: (options)
visibility: public
ri/1.8/system/DefaultDisplay/setup_pager-i.yaml000064400000000274150403662140015356 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#setup_pager
is_singleton: false
name: setup_pager
params: ()
visibility: private
ri/1.8/system/DefaultDisplay/display_class_info-i.yaml000064400000000331150403662140016677 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#display_class_info
is_singleton: false
name: display_class_info
params: (klass, ri_reader)
visibility: public
ri/1.8/system/DefaultDisplay/display_flow-i.yaml000064400000000302150403662140015524 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#display_flow
is_singleton: false
name: display_flow
params: (flow)
visibility: private
ri/1.8/system/DefaultDisplay/display_method_info-i.yaml000064400000000321150403662140017051 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#display_method_info
is_singleton: false
name: display_method_info
params: (method)
visibility: public
ri/1.8/system/DefaultDisplay/list_known_names-i.yaml000064400000000312150403662140016403 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#list_known_names
is_singleton: false
name: list_known_names
params: (names)
visibility: public
ri/1.8/system/DefaultDisplay/display_params-i.yaml000064400000000310150403662140016037 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: []

full_name: DefaultDisplay#display_params
is_singleton: false
name: display_params
params: (method)
visibility: private
ri/1.8/system/ThreadError/cdesc-ThreadError.yaml000064400000001064150403662140015417 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: <tt>Thread</tt> encapsulates the behavior of a thread of execution, including the main thread of the Ruby script.
- !ruby/struct:SM::Flow::P 
  body: In the descriptions of the methods in this class, the parameter <em>sym</em> refers to a symbol, which is either a quoted string or a <tt>Symbol</tt> (such as <tt>:name</tt>).
constants: []

full_name: ThreadError
includes: []

instance_methods: []

name: ThreadError
superclass: StandardError
ri/1.8/system/Forwardable/cdesc-Forwardable.yaml000064400000003111150403662140015430 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: force Forwardable to show up in stack backtraces of delegated methods
  name: debug
  rw: RW
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: "The Forwardable module provides delegation of specified methods to a designated object, using the methods #def_delegator and #def_delegators."
- !ruby/struct:SM::Flow::P 
  body: "For example, say you have a class RecordCollection which contains an array <tt>@records</tt>. You could provide the lookup method #record_number(), which simply calls #[] on the <tt>@records</tt> array, like this:"
- !ruby/struct:SM::Flow::VERB 
  body: "  class RecordCollection\n    extend Forwardable\n    def_delegator :@records, :[], :record_number\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "Further, if you wish to provide the methods #size, #&lt;&lt;, and #map, all of which delegate to @records, this is how you can do it:"
- !ruby/struct:SM::Flow::VERB 
  body: "  class RecordCollection\n    # extend Forwardable, but we did that above\n    def_delegators :@records, :size, :&lt;&lt;, :map\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: Also see the example at forwardable.rb.
constants: []

full_name: Forwardable
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: def_delegator
- !ruby/object:RI::MethodSummary 
  name: def_delegators
- !ruby/object:RI::MethodSummary 
  name: def_instance_delegator
- !ruby/object:RI::MethodSummary 
  name: def_instance_delegators
name: Forwardable
superclass: 
ri/1.8/system/Forwardable/def_delegator-i.yaml000064400000000437150403662140015143 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #def_instance_delegator"
full_name: Forwardable#def_delegator
is_singleton: false
name: def_delegator
params: (accessor, method, ali = method)
visibility: public
ri/1.8/system/Forwardable/def_instance_delegators-i.yaml000064400000001361150403662140017207 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: def_delegators
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Shortcut for defining multiple delegator methods, but with no provision for using a different name. The following two code samples have the same effect:"
- !ruby/struct:SM::Flow::VERB 
  body: "  def_delegators :@records, :size, :&lt;&lt;, :map\n\n  def_delegator :@records, :size\n  def_delegator :@records, :&lt;&lt;\n  def_delegator :@records, :map\n"
- !ruby/struct:SM::Flow::P 
  body: See the examples at Forwardable and forwardable.rb.
full_name: Forwardable#def_instance_delegators
is_singleton: false
name: def_instance_delegators
params: (accessor, *methods)
visibility: public
ri/1.8/system/Forwardable/def_instance_delegator-i.yaml000064400000001146150403662140017025 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: def_delegator
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Defines a method <em>method</em> which delegates to <em>obj</em> (i.e. it calls the method of the same name in <em>obj</em>). If <em>new_name</em> is provided, it is used as the name for the delegate method.
- !ruby/struct:SM::Flow::P 
  body: See the examples at Forwardable and forwardable.rb.
full_name: Forwardable#def_instance_delegator
is_singleton: false
name: def_instance_delegator
params: (accessor, method, ali = method)
visibility: public
ri/1.8/system/Forwardable/def_delegators-i.yaml000064400000000426150403662140015324 0ustar00--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Alias for #def_instance_delegators"
full_name: Forwardable#def_delegators
is_singleton: false
name: def_delegators
params: (accessor, *methods)
visibility: public
ri/1.8/system/ZeroDivisionError/cdesc-ZeroDivisionError.yaml000064400000000460150403662140020050 0ustar00--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Turn off floating point exceptions for overflow, etc.
constants: []

full_name: ZeroDivisionError
includes: []

instance_methods: []

name: ZeroDivisionError
superclass: StandardError
man/man1/python2.7.1000064400000034366150404023520010014 0ustar00.TH PYTHON "1"

.\" To view this file while editing, run it through groff:
.\"   groff -Tascii -man python.man | less

.SH NAME
python \- an interpreted, interactive, object-oriented programming language
.SH SYNOPSIS
.B python
[
.B \-B
]
[
.B \-d
]
[
.B \-E
]
[
.B \-h
]
[
.B \-i
]
[
.B \-m 
.I module-name
]
.br
       [
.B \-O
]
[
.B \-OO
]
[
.B \-R
]
[
.B -Q
.I argument
]
[
.B \-s
]
[
.B \-S
]
[
.B \-t
]
[
.B \-u
]
.br
       [
.B \-v
]
[
.B \-V
]
[
.B \-W
.I argument
]
[
.B \-x
]
[
.B \-3
]
[
.B \-?
]
.br
       [
.B \-c
.I command
|
.I script
|
\-
]
[
.I arguments
]
.SH DESCRIPTION
Python is an interpreted, interactive, object-oriented programming
language that combines remarkable power with very clear syntax.
For an introduction to programming in Python, see the Python Tutorial.
The Python Library Reference documents built-in and standard types,
constants, functions and modules.
Finally, the Python Reference Manual describes the syntax and
semantics of the core language in (perhaps too) much detail.
(These documents may be located via the
.B "INTERNET RESOURCES"
below; they may be installed on your system as well.)
.PP
Python's basic power can be extended with your own modules written in
C or C++.
On most systems such modules may be dynamically loaded.
Python is also adaptable as an extension language for existing
applications.
See the internal documentation for hints.
.PP
Documentation for installed Python modules and packages can be 
viewed by running the 
.B pydoc
program.  
.SH COMMAND LINE OPTIONS
.TP
.B \-B
Don't write
.I .py[co]
files on import. See also PYTHONDONTWRITEBYTECODE.
.TP
.BI "\-c " command
Specify the command to execute (see next section).
This terminates the option list (following options are passed as
arguments to the command).
.TP
.B \-d
Turn on parser debugging output (for wizards only, depending on
compilation options).
.TP
.B \-E
Ignore environment variables like PYTHONPATH and PYTHONHOME that modify
the behavior of the interpreter.
.TP
.B \-h ", " \-? ", "\-\-help
Prints the usage for the interpreter executable and exits.
.TP
.B \-i
When a script is passed as first argument or the \fB\-c\fP option is
used, enter interactive mode after executing the script or the
command.  It does not read the $PYTHONSTARTUP file.  This can be
useful to inspect global variables or a stack trace when a script
raises an exception.
.TP
.BI "\-m " module-name
Searches 
.I sys.path 
for the named module and runs the corresponding 
.I .py 
file as a script.
.TP
.B \-O
Turn on basic optimizations.  This changes the filename extension for
compiled (bytecode) files from
.I .pyc
to \fI.pyo\fP.  Given twice, causes docstrings to be discarded.
.TP
.B \-OO
Discard docstrings in addition to the \fB-O\fP optimizations.
.TP
.B \-R
Turn on "hash randomization", so that the hash() values of str, bytes and
datetime objects are "salted" with an unpredictable pseudo-random value.
Although they remain constant within an individual Python process, they are
not predictable between repeated invocations of Python.
.IP
This is intended to provide protection against a denial of service
caused by carefully-chosen inputs that exploit the worst case performance
of a dict construction, O(n^2) complexity.  See
http://www.ocert.org/advisories/ocert-2011-003.html
for details.
.TP
.BI "\-Q " argument
Division control; see PEP 238.  The argument must be one of "old" (the
default, int/int and long/long return an int or long), "new" (new
division semantics, i.e. int/int and long/long returns a float),
"warn" (old division semantics with a warning for int/int and
long/long), or "warnall" (old division semantics with a warning for
all use of the division operator).  For a use of "warnall", see the
Tools/scripts/fixdiv.py script.
.TP
.B \-s
Don't add user site directory to sys.path.
.TP
.B \-S
Disable the import of the module
.I site
and the site-dependent manipulations of
.I sys.path
that it entails.
.TP
.B \-t
Issue a warning when a source file mixes tabs and spaces for
indentation in a way that makes it depend on the worth of a tab
expressed in spaces.  Issue an error when the option is given twice.
.TP
.B \-u
Force stdin, stdout and stderr to be totally unbuffered.  On systems
where it matters, also put stdin, stdout and stderr in binary mode.
Note that there is internal buffering in xreadlines(), readlines() and
file-object iterators ("for line in sys.stdin") which is not
influenced by this option.  To work around this, you will want to use
"sys.stdin.readline()" inside a "while 1:" loop.
.TP
.B \-v
Print a message each time a module is initialized, showing the place
(filename or built-in module) from which it is loaded.  When given
twice, print a message for each file that is checked for when 
searching for a module.  Also provides information on module cleanup
at exit.
.TP
.B \-V ", " \-\-version
Prints the Python version number of the executable and exits.
.TP
.BI "\-W " argument
Warning control.  Python sometimes prints warning message to
.IR sys.stderr .
A typical warning message has the following form:
.IB file ":" line ": " category ": " message.
By default, each warning is printed once for each source line where it
occurs.  This option controls how often warnings are printed.
Multiple
.B \-W
options may be given; when a warning matches more than one
option, the action for the last matching option is performed.
Invalid
.B \-W
options are ignored (a warning message is printed about invalid
options when the first warning is issued).  Warnings can also be
controlled from within a Python program using the
.I warnings
module.

The simplest form of
.I argument
is one of the following
.I action
strings (or a unique abbreviation):
.B ignore
to ignore all warnings;
.B default
to explicitly request the default behavior (printing each warning once
per source line);
.B all
to print a warning each time it occurs (this may generate many
messages if a warning is triggered repeatedly for the same source
line, such as inside a loop);
.B module
to print each warning only the first time it occurs in each
module;
.B once
to print each warning only the first time it occurs in the program; or
.B error
to raise an exception instead of printing a warning message.

The full form of
.I argument
is
.IB action : message : category : module : line.
Here,
.I action
is as explained above but only applies to messages that match the
remaining fields.  Empty fields match all values; trailing empty
fields may be omitted.  The
.I message
field matches the start of the warning message printed; this match is
case-insensitive.  The
.I category
field matches the warning category.  This must be a class name; the
match test whether the actual warning category of the message is a
subclass of the specified warning category.  The full class name must
be given.  The
.I module
field matches the (fully-qualified) module name; this match is
case-sensitive.  The
.I line
field matches the line number, where zero matches all line numbers and
is thus equivalent to an omitted line number.
.TP
.B \-x
Skip the first line of the source.  This is intended for a DOS
specific hack only.  Warning: the line numbers in error messages will
be off by one!
.TP
.B \-3
Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix.
.SH INTERPRETER INTERFACE
The interpreter interface resembles that of the UNIX shell: when
called with standard input connected to a tty device, it prompts for
commands and executes them until an EOF is read; when called with a
file name argument or with a file as standard input, it reads and
executes a
.I script
from that file;
when called with
.B \-c
.IR command ,
it executes the Python statement(s) given as
.IR command .
Here
.I command
may contain multiple statements separated by newlines.
Leading whitespace is significant in Python statements!
In non-interactive mode, the entire input is parsed before it is
executed.
.PP
If available, the script name and additional arguments thereafter are
passed to the script in the Python variable
.IR sys.argv ,
which is a list of strings (you must first
.I import sys
to be able to access it).
If no script name is given,
.I sys.argv[0]
is an empty string; if
.B \-c
is used,
.I sys.argv[0]
contains the string
.I '-c'.
Note that options interpreted by the Python interpreter itself
are not placed in
.IR sys.argv .
.PP
In interactive mode, the primary prompt is `>>>'; the second prompt
(which appears when a command is not complete) is `...'.
The prompts can be changed by assignment to
.I sys.ps1
or
.IR sys.ps2 .
The interpreter quits when it reads an EOF at a prompt.
When an unhandled exception occurs, a stack trace is printed and
control returns to the primary prompt; in non-interactive mode, the
interpreter exits after printing the stack trace.
The interrupt signal raises the
.I Keyboard\%Interrupt
exception; other UNIX signals are not caught (except that SIGPIPE is
sometimes ignored, in favor of the
.I IOError
exception).  Error messages are written to stderr.
.SH FILES AND DIRECTORIES
These are subject to difference depending on local installation
conventions; ${prefix} and ${exec_prefix} are installation-dependent
and should be interpreted as for GNU software; they may be the same.
The default for both is \fI/usr/local\fP.
.IP \fI${exec_prefix}/bin/python\fP
Recommended location of the interpreter.
.PP
.I ${prefix}/lib/python<version>
.br
.I ${exec_prefix}/lib/python<version>
.RS
Recommended locations of the directories containing the standard
modules.
.RE
.PP
.I ${prefix}/include/python<version>
.br
.I ${exec_prefix}/include/python<version>
.RS
Recommended locations of the directories containing the include files
needed for developing Python extensions and embedding the
interpreter.
.RE
.IP \fI~/.pythonrc.py\fP
User-specific initialization file loaded by the \fIuser\fP module;
not used by default or by most applications.
.SH ENVIRONMENT VARIABLES
.IP PYTHONHOME
Change the location of the standard Python libraries.  By default, the
libraries are searched in ${prefix}/lib/python<version> and
${exec_prefix}/lib/python<version>, where ${prefix} and ${exec_prefix}
are installation-dependent directories, both defaulting to
\fI/usr/local\fP.  When $PYTHONHOME is set to a single directory, its value
replaces both ${prefix} and ${exec_prefix}.  To specify different values
for these, set $PYTHONHOME to ${prefix}:${exec_prefix}.
.IP PYTHONPATH
Augments the default search path for module files.
The format is the same as the shell's $PATH: one or more directory
pathnames separated by colons.
Non-existent directories are silently ignored.
The default search path is installation dependent, but generally
begins with ${prefix}/lib/python<version> (see PYTHONHOME above).
The default search path is always appended to $PYTHONPATH.
If a script argument is given, the directory containing the script is
inserted in the path in front of $PYTHONPATH.
The search path can be manipulated from within a Python program as the
variable
.IR sys.path .
.IP PYTHONSTARTUP
If this is the name of a readable file, the Python commands in that
file are executed before the first prompt is displayed in interactive
mode.
The file is executed in the same name space where interactive commands
are executed so that objects defined or imported in it can be used
without qualification in the interactive session.
You can also change the prompts
.I sys.ps1
and
.I sys.ps2
in this file.
.IP PYTHONY2K
Set this to a non-empty string to cause the \fItime\fP module to
require dates specified as strings to include 4-digit years, otherwise
2-digit years are converted based on rules described in the \fItime\fP
module documentation.
.IP PYTHONOPTIMIZE
If this is set to a non-empty string it is equivalent to specifying
the \fB\-O\fP option. If set to an integer, it is equivalent to
specifying \fB\-O\fP multiple times.
.IP PYTHONDEBUG
If this is set to a non-empty string it is equivalent to specifying
the \fB\-d\fP option. If set to an integer, it is equivalent to
specifying \fB\-d\fP multiple times.
.IP PYTHONDONTWRITEBYTECODE
If this is set to a non-empty string it is equivalent to specifying
the \fB\-B\fP option (don't try to write
.I .py[co]
files).
.IP PYTHONINSPECT
If this is set to a non-empty string it is equivalent to specifying
the \fB\-i\fP option.
.IP PYTHONIOENCODING
If this is set before running the interpreter, it overrides the encoding used
for stdin/stdout/stderr, in the syntax
.IB encodingname ":" errorhandler
The
.IB errorhandler
part is optional and has the same meaning as in str.encode. For stderr, the
.IB errorhandler
 part is ignored; the handler will always be \'backslashreplace\'.
.IP PYTHONNOUSERSITE
If this is set to a non-empty string it is equivalent to specifying the
\fB\-s\fP option (Don't add the user site directory to sys.path).
.IP PYTHONUNBUFFERED
If this is set to a non-empty string it is equivalent to specifying
the \fB\-u\fP option.
.IP PYTHONVERBOSE
If this is set to a non-empty string it is equivalent to specifying
the \fB\-v\fP option. If set to an integer, it is equivalent to
specifying \fB\-v\fP multiple times. 
.IP PYTHONWARNINGS
If this is set to a comma-separated string it is equivalent to
specifying the \fB\-W\fP option for each separate value.
.IP PYTHONHASHSEED
If this variable is set to "random", the effect is the same as specifying
the \fB-R\fP option: a random value is used to seed the hashes of str,
bytes and datetime objects.

If PYTHONHASHSEED is set to an integer value, it is used as a fixed seed for
generating the hash() of the types covered by the hash randomization.  Its
purpose is to allow repeatable hashing, such as for selftests for the
interpreter itself, or to allow a cluster of python processes to share hash
values.

The integer must be a decimal number in the range [0,4294967295].  Specifying
the value 0 will lead to the same hash values as when hash randomization is
disabled.
.SH AUTHOR
The Python Software Foundation: https://www.python.org/psf/
.SH INTERNET RESOURCES
Main website:  https://www.python.org/
.br
Documentation:  https://docs.python.org/2/
.br
Developer resources:  https://docs.python.org/devguide/
.br
Downloads:  https://www.python.org/downloads/
.br
Module repository:  https://pypi.python.org/
.br
Newsgroups:  comp.lang.python, comp.lang.python.announce
.SH LICENSING
Python is distributed under an Open Source license.  See the file
"LICENSE" in the Python source distribution for information on terms &
conditions for accessing and otherwise using Python and for a
DISCLAIMER OF ALL WARRANTIES.
bash-completion/completions/pip2000064400000000444150404023520012756 0ustar00
# pip bash completion start
_pip2_completion()
{
    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
                   PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
}
complete -o default -F _pip2_completion pip pip{,-}{2,2.7}}
# pip bash completion end

licenses/alt-python27-libs/LICENSE000064400000030747150404023520012563 0ustar00A. HISTORY OF THE SOFTWARE
==========================

Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC.  Guido remains Python's
principal author, although it includes many contributions from others.

In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.

In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
year, the PythonLabs team moved to Digital Creations, which became
Zope Corporation.  In 2001, the Python Software Foundation (PSF, see
https://www.python.org/psf/) was formed, a non-profit organization
created specifically to own Python-related Intellectual Property.
Zope Corporation was a sponsoring member of the PSF.

All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition).  Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.

    Release         Derived     Year        Owner       GPL-
                    from                                compatible? (1)

    0.9.0 thru 1.2              1991-1995   CWI         yes
    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
    1.6             1.5.2       2000        CNRI        no
    2.0             1.6         2000        BeOpen.com  no
    1.6.1           1.6         2001        CNRI        yes (2)
    2.1             2.0+1.6.1   2001        PSF         no
    2.0.1           2.0+1.6.1   2001        PSF         yes
    2.1.1           2.1+2.0.1   2001        PSF         yes
    2.1.2           2.1.1       2002        PSF         yes
    2.1.3           2.1.2       2002        PSF         yes
    2.2 and above   2.1.1       2001-now    PSF         yes

Footnotes:

(1) GPL-compatible doesn't mean that we're distributing Python under
    the GPL.  All Python licenses, unlike the GPL, let you distribute
    a modified version without making your changes open source.  The
    GPL-compatible licenses make it possible to combine Python with
    other software that is released under the GPL; the others don't.

(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
    because its license has a choice of law clause.  According to
    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
    is "not incompatible" with the GPL.

Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.


B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================

PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;
All Rights Reserved" are retained in Python alone or in any derivative version
prepared by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee.  This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------

BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1

1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").

2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.

3. BeOpen is making the Software available to Licensee on an "AS IS"
basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions.  Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee.  This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party.  As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.

7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------

1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.

2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee.  Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement.  This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013.  This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.

4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee.  This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.

8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.

        ACCEPT


CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands.  All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
licenses/alt-python27-pip/LICENSE.txt000064400000002102150404023530013221 0ustar00Copyright (c) 2008-2019 The pip developers (see AUTHORS.txt file)

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:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

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.
licenses/alt-python27/LICENSE000064400000030747150404023530011635 0ustar00A. HISTORY OF THE SOFTWARE
==========================

Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC.  Guido remains Python's
principal author, although it includes many contributions from others.

In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.

In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
year, the PythonLabs team moved to Digital Creations, which became
Zope Corporation.  In 2001, the Python Software Foundation (PSF, see
https://www.python.org/psf/) was formed, a non-profit organization
created specifically to own Python-related Intellectual Property.
Zope Corporation was a sponsoring member of the PSF.

All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition).  Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.

    Release         Derived     Year        Owner       GPL-
                    from                                compatible? (1)

    0.9.0 thru 1.2              1991-1995   CWI         yes
    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
    1.6             1.5.2       2000        CNRI        no
    2.0             1.6         2000        BeOpen.com  no
    1.6.1           1.6         2001        CNRI        yes (2)
    2.1             2.0+1.6.1   2001        PSF         no
    2.0.1           2.0+1.6.1   2001        PSF         yes
    2.1.1           2.1+2.0.1   2001        PSF         yes
    2.1.2           2.1.1       2002        PSF         yes
    2.1.3           2.1.2       2002        PSF         yes
    2.2 and above   2.1.1       2001-now    PSF         yes

Footnotes:

(1) GPL-compatible doesn't mean that we're distributing Python under
    the GPL.  All Python licenses, unlike the GPL, let you distribute
    a modified version without making your changes open source.  The
    GPL-compatible licenses make it possible to combine Python with
    other software that is released under the GPL; the others don't.

(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
    because its license has a choice of law clause.  According to
    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
    is "not incompatible" with the GPL.

Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.


B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================

PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;
All Rights Reserved" are retained in Python alone or in any derivative version
prepared by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee.  This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------

BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1

1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").

2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.

3. BeOpen is making the Software available to Licensee on an "AS IS"
basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions.  Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee.  This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party.  As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.

7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------

1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.

2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee.  Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement.  This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013.  This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.

4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee.  This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.

8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.

        ACCEPT


CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands.  All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
doc/alt-python27-libs/README000064400000154060150404023530011372 0ustar00This is Python version 2.7.18
=============================

Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation.  All
rights reserved.

Copyright (c) 2000 BeOpen.com.
All rights reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All rights reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
All rights reserved.


License information
-------------------

See the file "LICENSE" for information on the history of this
software, terms & conditions for usage, and a DISCLAIMER OF ALL
WARRANTIES.

This Python distribution contains no GNU General Public Licensed
(GPLed) code so it may be used in proprietary projects just like prior
Python distributions.  There are interfaces to some GNU code but these
are entirely optional.

All trademarks referenced herein are property of their respective
holders.


What's new in this release?
---------------------------

See the file "Misc/NEWS".


If you don't read instructions
------------------------------

Congratulations on getting this far. :-)

To start building right away (on UNIX): type "./configure" in the
current directory and when it finishes, type "make".  This creates an
executable "./python"; to install in /usr/local, first do "su root"
and then "make install".

The section `Build instructions' below is still recommended reading.


What is Python anyway?
----------------------

Python is an interpreted, interactive object-oriented programming
language suitable (amongst other uses) for distributed application
development, scripting, numeric computing and system testing.  Python
is often compared to Tcl, Perl, Java, JavaScript, Visual Basic or
Scheme.  To find out more about what Python can do for you, point your
browser to http://www.python.org/.


How do I learn Python?
----------------------

The official tutorial is still a good place to start; see
http://docs.python.org/ for online and downloadable versions, as well
as a list of other introductions, and reference documentation.

There's a quickly growing set of books on Python.  See
http://wiki.python.org/moin/PythonBooks for a list.


Documentation
-------------

All documentation is provided online in a variety of formats.  In
order of importance for new users: Tutorial, Library Reference,
Language Reference, Extending & Embedding, and the Python/C API.  The
Library Reference is especially of immense value since much of
Python's power is described there, including the built-in data types
and functions!

All documentation is also available online at the Python web site
(http://docs.python.org/, see below).  It is available online for occasional
reference, or can be downloaded in many formats for faster access.  The
documentation is downloadable in HTML, PostScript, PDF, LaTeX, and
reStructuredText (2.6+) formats; the LaTeX and reStructuredText versions are
primarily for documentation authors, translators, and people with special
formatting requirements.

If you would like to contribute to the development of Python, relevant
documentation is available at:

    http://docs.python.org/devguide/

For information about building Python's documentation, refer to Doc/README.txt.


Web sites
---------

New Python releases and related technologies are published at
http://www.python.org/.  Come visit us!


Newsgroups and Mailing Lists
----------------------------

Read comp.lang.python, a high-volume discussion newsgroup about
Python, or comp.lang.python.announce, a low-volume moderated newsgroup
for Python-related announcements.  These are also accessible as
mailing lists: see http://www.python.org/community/lists/ for an
overview of these and many other Python-related mailing lists.

Archives are accessible via the Google Groups Usenet archive; see
http://groups.google.com/.  The mailing lists are also archived, see
http://www.python.org/community/lists/ for details.


Bug reports
-----------

To report or search for bugs, please use the Python Bug
Tracker at http://bugs.python.org/.


Patches and contributions
-------------------------

To submit a patch or other contribution, please use the Python Patch
Manager at http://bugs.python.org/.  Guidelines
for patch submission may be found at http://www.python.org/dev/patches/.

If you have a proposal to change Python, you may want to send an email to the
comp.lang.python or python-ideas mailing lists for inital feedback. A Python
Enhancement Proposal (PEP) may be submitted if your idea gains ground. All
current PEPs, as well as guidelines for submitting a new PEP, are listed at
http://www.python.org/dev/peps/.


Questions
---------

For help, if you can't find it in the manuals or on the web site, it's
best to post to the comp.lang.python or the Python mailing list (see
above).  If you specifically don't want to involve the newsgroup or
mailing list, send questions to help@python.org (a group of volunteers
who answer questions as they can).  The newsgroup is the most
efficient way to ask public questions.


Build instructions
==================

Before you can build Python, you must first configure it.
Fortunately, the configuration and build process has been automated
for Unix and Linux installations, so all you usually have to do is
type a few commands and sit back.  There are some platforms where
things are not quite as smooth; see the platform specific notes below.
If you want to build for multiple platforms sharing the same source
tree, see the section on VPATH below.

Start by running the script "./configure", which determines your
system configuration and creates the Makefile.  (It takes a minute or
two -- please be patient!)  You may want to pass options to the
configure script -- see the section below on configuration options and
variables.  When it's done, you are ready to run make.

To build Python, you normally type "make" in the toplevel directory.
If you have changed the configuration, the Makefile may have to be
rebuilt.  In this case, you may have to run make again to correctly
build your desired target.  The interpreter executable is built in the
top level directory.

To get an optimized build of Python, "configure --enable-optimizations" before
you run make.  This sets the default make targets up to enable Profile Guided
Optimization (PGO) and may be used to auto-enable Link Time Optimization (LTO)
on some platforms.  For more details, see the sections bellow.

Once you have built a Python interpreter, see the subsections below on
testing and installation.  If you run into trouble, see the next
section.

Previous versions of Python used a manual configuration process that
involved editing the file Modules/Setup.  While this file still exists
and manual configuration is still supported, it is rarely needed any
more: almost all modules are automatically built as appropriate under
guidance of the setup.py script, which is run by Make after the
interpreter has been built.


Profile Guided Optimization
---------------------------

PGO takes advantage of recent versions of the GCC or Clang compilers.
If ran, "make profile-opt" will do several steps.

First, the entire Python directory is cleaned of temporary files that
may have resulted in a previous compilation.

Then, an instrumented version of the interpreter is built, using suitable
compiler flags for each flavour. Note that this is just an intermediary
step and the binary resulted after this step is not good for real life
workloads, as it has profiling instructions embedded inside.

After this instrumented version of the interpreter is built, the Makefile
will automatically run a training workload. This is necessary in order to
profile the interpreter execution. Note also that any output, both stdout
and stderr, that may appear at this step is suppressed.

Finally, the last step is to rebuild the interpreter, using the information
collected in the previous one. The end result will be a Python binary
that is optimized and suitable for distribution or production installation.


Link Time Optimization
----------------------

Enabled via configure's --with-lto flag.  LTO takes advantages of recent
compiler toolchains ability to optimize across the otherwise arbitrary .o file
boundary when building final executables or shared libraries for additional
performance gains.


Troubleshooting
---------------

See also the platform specific notes in the next section.

If you run into other trouble, see the FAQ
(http://www.python.org/doc/faq/) for hints on what can go wrong, and
how to fix it.

If you rerun the configure script with different options, remove all
object files by running "make clean" before rebuilding.  Believe it or
not, "make clean" sometimes helps to clean up other inexplicable
problems as well.  Try it before sending in a bug report!

If the configure script fails or doesn't seem to find things that
should be there, inspect the config.log file.

If you get a warning for every file about the -Olimit option being no
longer supported, you can ignore it.  There's no foolproof way to know
whether this option is needed; all we can do is test whether it is
accepted without error.  On some systems, e.g. older SGI compilers, it
is essential for performance (specifically when compiling ceval.c,
which has more basic blocks than the default limit of 1000).  If the
warning bothers you, edit the Makefile to remove "-Olimit 1500" from
the OPT variable.

If you get failures in test_long, or sys.maxint gets set to -1, you
are probably experiencing compiler bugs, usually related to
optimization.  This is a common problem with some versions of gcc, and
some vendor-supplied compilers, which can sometimes be worked around
by turning off optimization.  Consider switching to stable versions
(gcc 2.95.2, gcc 3.x, or contact your vendor.)

From Python 2.0 onward, all Python C code is ANSI C.  Compiling using
old K&R-C-only compilers is no longer possible.  ANSI C compilers are
available for all modern systems, either in the form of updated
compilers from the vendor, or one of the free compilers (gcc).

If "make install" fails mysteriously during the "compiling the library"
step, make sure that you don't have any of the PYTHONPATH or PYTHONHOME
environment variables set, as they may interfere with the newly built
executable which is compiling the library.

Unsupported systems
-------------------

A number of systems are not supported in Python 2.7 anymore. Some
support code is still present, but will be removed in later versions.
If you still need to use current Python versions on these systems,
please send a message to python-dev@python.org indicating that you
volunteer to support this system. For a more detailed discussion 
regarding no-longer-supported and resupporting platforms, as well
as a list of platforms that became or will be unsupported, see PEP 11.

More specifically, the following systems are not supported any
longer:
- SunOS 4
- DYNIX
- dgux
- Minix
- NeXT
- Irix 4 and --with-sgi-dl
- Linux 1
- Systems defining __d6_pthread_create (configure.ac)
- Systems defining PY_PTHREAD_D4, PY_PTHREAD_D6,
  or PY_PTHREAD_D7 in thread_pthread.h
- Systems using --with-dl-dld
- Systems using --without-universal-newlines
- MacOS 9
- Systems using --with-wctype-functions
- Win9x, WinME


Platform specific notes
-----------------------

(Some of these may no longer apply.  If you find you can build Python
on these platforms without the special directions mentioned here,
submit a documentation bug report to SourceForge (see Bug Reports
above) so we can remove them!)

Unix platforms: If your vendor still ships (and you still use) Berkeley DB
        1.85 you will need to edit Modules/Setup to build the bsddb185
        module and add a line to sitecustomize.py which makes it the
        default.  In Modules/Setup a line like

            bsddb185 bsddbmodule.c

        should work.  (You may need to add -I, -L or -l flags to direct the
        compiler and linker to your include files and libraries.)

XXX I think this next bit is out of date:

64-bit platforms: The modules audioop, and imageop don't work.
        The setup.py script disables them on 64-bit installations.
        Don't try to enable them in the Modules/Setup file.  They
        contain code that is quite wordsize sensitive.  (If you have a
        fix, let us know!)

Solaris: When using Sun's C compiler with threads, at least on Solaris
        2.5.1, you need to add the "-mt" compiler option (the simplest
        way is probably to specify the compiler with this option as
        the "CC" environment variable when running the configure
        script).

        When using GCC on Solaris, beware of binutils 2.13 or GCC
        versions built using it.  This mistakenly enables the
        -zcombreloc option which creates broken shared libraries on
        Solaris.  binutils 2.12 works, and the binutils maintainers
        are aware of the problem.  Binutils 2.13.1 only partially
        fixed things.  It appears that 2.13.2 solves the problem
        completely.  This problem is known to occur with Solaris 2.7
        and 2.8, but may also affect earlier and later versions of the
        OS.

        When the dynamic loader complains about errors finding shared
        libraries, such as

        ld.so.1: ./python: fatal: libstdc++.so.5: open failed:
        No such file or directory

        you need to first make sure that the library is available on
        your system. Then, you need to instruct the dynamic loader how
        to find it. You can choose any of the following strategies:

        1. When compiling Python, set LD_RUN_PATH to the directories
           containing missing libraries.
        2. When running Python, set LD_LIBRARY_PATH to these directories.
        3. Use crle(8) to extend the search path of the loader.
        4. Modify the installed GCC specs file, adding -R options into the
           *link: section.

        The complex object fails to compile on Solaris 10 with gcc 3.4 (at
        least up to 3.4.3).  To work around it, define Py_HUGE_VAL as
        HUGE_VAL(), e.g.:

          make CPPFLAGS='-D"Py_HUGE_VAL=HUGE_VAL()" -I. -I$(srcdir)/Include'
          ./python setup.py CPPFLAGS='-D"Py_HUGE_VAL=HUGE_VAL()"'

Linux:  A problem with threads and fork() was tracked down to a bug in
        the pthreads code in glibc version 2.0.5; glibc version 2.0.7
        solves the problem.  This causes the popen2 test to fail;
        problem and solution reported by Pablo Bleyer.

Red Hat Linux: Red Hat 9 built Python2.2 in UCS-4 mode and hacked
        Tcl to support it. To compile Python2.3 with Tkinter, you will
        need to pass --enable-unicode=ucs4 flag to ./configure.

        There's an executable /usr/bin/python which is Python
        1.5.2 on most older Red Hat installations; several key Red Hat tools
        require this version.  Python 2.1.x may be installed as
        /usr/bin/python2.  The Makefile installs Python as
        /usr/local/bin/python, which may or may not take precedence
        over /usr/bin/python, depending on how you have set up $PATH.

FreeBSD 3.x and probably platforms with NCurses that use libmytinfo or
        similar: When using cursesmodule, the linking is not done in
        the correct order with the defaults.  Remove "-ltermcap" from
        the readline entry in Setup, and use as curses entry: "curses
        cursesmodule.c -lmytinfo -lncurses -ltermcap" - "mytinfo" (so
        called on FreeBSD) should be the name of the auxiliary library
        required on your platform.  Normally, it would be linked
        automatically, but not necessarily in the correct order.

BSDI:   BSDI versions before 4.1 have known problems with threads,
        which can cause strange errors in a number of modules (for
        instance, the 'test_signal' test script will hang forever.)
        Turning off threads (with --with-threads=no) or upgrading to
        BSDI 4.1 solves this problem.

DEC Unix: Run configure with --with-dec-threads, or with
        --with-threads=no if no threads are desired (threads are on by
        default).  When using GCC, it is possible to get an internal
        compiler error if optimization is used.  This was reported for
        GCC 2.7.2.3 on selectmodule.c.  Manually compile the affected
        file without optimization to solve the problem.

DEC Ultrix: compile with GCC to avoid bugs in the native compiler,
        and pass SHELL=/bin/sh5 to Make when installing.

AIX:    A complete overhaul of the shared library support is now in
        place.  See Misc/AIX-NOTES for some notes on how it's done.
        (The optimizer bug reported at this place in previous releases
        has been worked around by a minimal code change.) If you get
        errors about pthread_* functions, during compile or during
        testing, try setting CC to a thread-safe (reentrant) compiler,
        like "cc_r".  For full C++ module support, set CC="xlC_r" (or
        CC="xlC" without thread support).

AIX 5.3: To build a 64-bit version with IBM's compiler, I used the
        following:

        export PATH=/usr/bin:/usr/vacpp/bin
        ./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" \
                    --disable-ipv6 AR="ar -X64"
        make

HP-UX:  When using threading, you may have to add -D_REENTRANT to the
        OPT variable in the top-level Makefile; reported by Pat Knight,
        this seems to make a difference (at least for HP-UX 10.20)
        even though pyconfig.h defines it. This seems unnecessary when
        using HP/UX 11 and later - threading seems to work "out of the
        box".

HP-UX ia64: When building on the ia64 (Itanium) platform using HP's
        compiler, some experience has shown that the compiler's
        optimiser produces a completely broken version of python
        (see http://bugs.python.org/814976). To work around this,
        edit the Makefile and remove -O from the OPT line.

        To build a 64-bit executable on an Itanium 2 system using HP's
        compiler, use these environment variables:

                CC=cc
                CXX=aCC
                BASECFLAGS="+DD64"
                LDFLAGS="+DD64 -lxnet"

        and call configure as:

                ./configure --without-gcc

        then *unset* the environment variables again before running
        make.  (At least one of these flags causes the build to fail
        if it remains set.)  You still have to edit the Makefile and
        remove -O from the OPT line.

HP PA-RISC 2.0: A recent bug report (http://bugs.python.org/546117)
        suggests that the C compiler in this 64-bit system has bugs
        in the optimizer that break Python.  Compiling without
        optimization solves the problems.

SCO:    The following apply to SCO 3 only; Python builds out of the box
        on SCO 5 (or so we've heard).

        1) Everything works much better if you add -U__STDC__ to the
        defs.  This is because all the SCO header files are broken.
        Anything that isn't mentioned in the C standard is
        conditionally excluded when __STDC__ is defined.

        2) Due to the U.S. export restrictions, SCO broke the crypt
        stuff out into a separate library, libcrypt_i.a so the LIBS
        needed be set to:

                LIBS=' -lsocket -lcrypt_i'

UnixWare: There are known bugs in the math library of the system, as well as
        problems in the handling of threads (calling fork in one
        thread may interrupt system calls in others). Therefore, test_math and
        tests involving threads will fail until those problems are fixed.

QNX:    Chris Herborth (chrish@qnx.com) writes:
        configure works best if you use GNU bash; a port is available on
        ftp.qnx.com in /usr/free.  I used the following process to build,
        test and install Python 1.5.x under QNX:

        1) CONFIG_SHELL=/usr/local/bin/bash CC=cc RANLIB=: \
            ./configure --verbose --without-gcc --with-libm=""

        2) edit Modules/Setup to activate everything that makes sense for
           your system... tested here at QNX with the following modules:

                array, audioop, binascii, cPickle, cStringIO, cmath,
                crypt, curses, errno, fcntl, gdbm, grp, imageop,
                _locale, math, md5, new, operator, parser, pcre,
                posix, pwd, readline, regex, reop,
                select, signal, socket, soundex, strop, struct,
                syslog, termios, time, timing, zlib, audioop, imageop

        3) make SHELL=/usr/local/bin/bash

           or, if you feel the need for speed:

           make SHELL=/usr/local/bin/bash OPT="-5 -Oil+nrt"

        4) make SHELL=/usr/local/bin/bash test

           Using GNU readline 2.2 seems to behave strangely, but I
           think that's a problem with my readline 2.2 port.  :-\

        5) make SHELL=/usr/local/bin/bash install

        If you get SIGSEGVs while running Python (I haven't yet, but
        I've only run small programs and the test cases), you're
        probably running out of stack; the default 32k could be a
        little tight.  To increase the stack size, edit the Makefile
        to read: LDFLAGS = -N 48k

BeOS:   See Misc/BeOS-NOTES for notes about compiling/installing
        Python on BeOS R3 or later.  Note that only the PowerPC
        platform is supported for R3; both PowerPC and x86 are
        supported for R4.

Cray T3E: Mark Hadfield (m.hadfield@niwa.co.nz) writes:
        Python can be built satisfactorily on a Cray T3E but based on
        my experience with the NIWA T3E (2002-05-22, version 2.2.1)
        there are a few bugs and gotchas. For more information see a
        thread on comp.lang.python in May 2002 entitled "Building
        Python on Cray T3E".

        1) Use Cray's cc and not gcc. The latter was reported not to
           work by Konrad Hinsen. It may work now, but it may not.

        2) To set sys.platform to something sensible, pass the
           following environment variable to the configure script:

             MACHDEP=unicosmk

        2) Run configure with option "--enable-unicode=ucs4".

        3) The Cray T3E does not support dynamic linking, so extension
           modules have to be built by adding (or uncommenting) lines
           in Modules/Setup. The minimum set of modules is

             posix, new, _sre, unicodedata

           On NIWA's vanilla T3E system the following have also been
           included successfully:

             _codecs, _locale, _socket, _symtable, _testcapi, _weakref
             array, binascii, cmath, cPickle, crypt, cStringIO, dbm
             errno, fcntl, grp, math, md5, operator, parser, pcre, pwd
             regex, rotor, select, struct, strop, syslog, termios
             time, timing, xreadlines

        4) Once the python executable and library have been built, make
           will execute setup.py, which will attempt to build remaining
           extensions and link them dynamically. Each of these attempts
           will fail but should not halt the make process. This is
           normal.

        5) Running "make test" uses a lot of resources and causes
           problems on our system. You might want to try running tests
           singly or in small groups.

SGI:    SGI's standard "make" utility (/bin/make or /usr/bin/make)
        does not check whether a command actually changed the file it
        is supposed to build.  This means that whenever you say "make"
        it will redo the link step.  The remedy is to use SGI's much
        smarter "smake" utility (/usr/sbin/smake), or GNU make.  If
        you set the first line of the Makefile to #!/usr/sbin/smake
        smake will be invoked by make (likewise for GNU make).

        WARNING: There are bugs in the optimizer of some versions of
        SGI's compilers that can cause bus errors or other strange
        behavior, especially on numerical operations.  To avoid this,
        try building with "make OPT=".

OS/2:   If you are running Warp3 or Warp4 and have IBM's VisualAge C/C++
        compiler installed, just change into the pc\os2vacpp directory
        and type NMAKE.  Threading and sockets are supported by default
        in the resulting binaries of PYTHON15.DLL and PYTHON.EXE.

Reliant UNIX: The thread support does not compile on Reliant UNIX, and
        there is a (minor) problem in the configure script for that
        platform as well.  This should be resolved in time for a
        future release.

macOS:  Building a complete Python installation requires the use of various
        additional third-party libraries, depending on your build platform and
        configure options.  Not all standard library modules are buildable or
        useable on all platforms.  Refer to the "Install Dependencies" section
        section of the "Developer Guide" for current detailed information on
        dependencies for macOS:
            https://devguide.python.org/setup/#install-dependencies

        On macOS, there are additional configure and build options related
        to macOS framework and universal builds.  Refer to Mac/README.rst.

        The tests will crash on both 10.1 and 10.2 with SEGV in
        test_re and test_sre due to the small default stack size.  If
        you set the stack size to 2048 before doing a "make test" the
        failure can be avoided.  If you're using the tcsh or csh shells,
        use "limit stacksize 2048" and for the bash shell (the default
        as of macOS 10.3), use "ulimit -s 2048".

        On naked Darwin you may want to add the configure option
        "--disable-toolbox-glue" to disable the glue code for the Carbon
        interface modules. The modules themselves are currently only built
        if you add the --enable-framework option, see below.

        On a clean macOS /usr/local does not exist. Do a
        "sudo mkdir -m 775 /usr/local"
        before you do a make install. It is probably not a good idea to
        do "sudo make install" which installs everything as superuser,
        as this may later cause problems when installing distutils-based
        additions.

        Some people have reported problems building Python after using "fink"
        to install additional unix software. Disabling fink (remove all 
        references to /sw from your .profile or .login) should solve this.

Cygwin: With recent (relative to the time of writing, 2001-12-19)
        Cygwin installations, there are problems with the interaction
        of dynamic linking and fork().  This manifests itself in build
        failures during the execution of setup.py.

        There are two workarounds that both enable Python (albeit
        without threading support) to build and pass all tests on
        NT/2000 (and most likely XP as well, though reports of testing
        on XP would be appreciated).

        The workarounds:

        (a) the band-aid fix is to link the _socket module statically
        rather than dynamically (which is the default).

        To do this, run "./configure --with-threads=no" including any
        other options you need (--prefix, etc.).  Then in Modules/Setup
        uncomment the lines:

        #SSL=/usr/local/ssl
        #_socket socketmodule.c \
        #       -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
        #       -L$(SSL)/lib -lssl -lcrypto

        and remove "local/" from the SSL variable.  Finally, just run
        "make"!

        (b) The "proper" fix is to rebase the Cygwin DLLs to prevent
        base address conflicts.  Details on how to do this can be
        found in the following mail:

           http://sources.redhat.com/ml/cygwin/2001-12/msg00894.html

        It is hoped that a version of this solution will be
        incorporated into the Cygwin distribution fairly soon.

        Two additional problems:

        (1) Threading support should still be disabled due to a known
        bug in Cygwin pthreads that causes test_threadedtempfile to
        hang.

        (2) The _curses module does not build.  This is a known
        Cygwin ncurses problem that should be resolved the next time
        that this package is released.

        On older versions of Cygwin, test_poll may hang and test_strftime
        may fail.

        The situation on 9X/Me is not accurately known at present.
        Some time ago, there were reports that the following
        regression tests failed:

            test_pwd
            test_select (hang)
            test_socket

        Due to the test_select hang on 9X/Me, one should run the
        regression test using the following:

            make TESTOPTS='-l -x test_select' test

        News regarding these platforms with more recent Cygwin
        versions would be appreciated!

Windows: When executing Python scripts on the command line using file type
        associations (i.e. starting "script.py" instead of "python script.py"),
        redirects may not work unless you set a specific registry key.  See
        the Knowledge Base article <http://support.microsoft.com/kb/321788>.


Configuring the bsddb and dbm modules
-------------------------------------

Beginning with Python version 2.3, the PyBsddb package
<http://pybsddb.sf.net/> was adopted into Python as the bsddb package,
exposing a set of package-level functions which provide
backwards-compatible behavior.  Only versions 3.3 through 4.4 of
Sleepycat's libraries provide the necessary API, so older versions
aren't supported through this interface.  The old bsddb module has
been retained as bsddb185, though it is not built by default.  Users
wishing to use it will have to tweak Modules/Setup to build it.  The
dbm module will still be built against the Sleepycat libraries if
other preferred alternatives (ndbm, gdbm) are not found.

Building the sqlite3 module
---------------------------

To build the sqlite3 module, you'll need the sqlite3 or libsqlite3
packages installed, including the header files. Many modern operating
systems distribute the headers in a separate package to the library -
often it will be the same name as the main package, but with a -dev or
-devel suffix. 

The version of pysqlite2 that's including in Python needs sqlite3 3.0.8
or later. setup.py attempts to check that it can find a correct version.

Configuring threads
-------------------

As of Python 2.0, threads are enabled by default.  If you wish to
compile without threads, or if your thread support is broken, pass the
--with-threads=no switch to configure.  Unfortunately, on some
platforms, additional compiler and/or linker options are required for
threads to work properly.  Below is a table of those options,
collected by Bill Janssen.  We would love to automate this process
more, but the information below is not enough to write a patch for the
configure.ac file, so manual intervention is required.  If you patch
the configure.ac file and are confident that the patch works, please
send in the patch.  (Don't bother patching the configure script itself
-- it is regenerated each time the configure.ac file changes.)

Compiler switches for threads
.............................

The definition of _REENTRANT should be configured automatically, if
that does not work on your system, or if _REENTRANT is defined
incorrectly, please report that as a bug.

    OS/Compiler/threads                     Switches for use with threads
    (POSIX is draft 10, DCE is draft 4)     compile & link

    SunOS 5.{1-5}/{gcc,SunPro cc}/solaris   -mt
    SunOS 5.5/{gcc,SunPro cc}/POSIX         (nothing)
    DEC OSF/1 3.x/cc/DCE                    -threads
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/cc/DCE                 -threads
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/cc/POSIX               -pthread
            (butenhof@zko.dec.com)
    AIX 4.1.4/cc_r/d7                       (nothing)
            (buhrt@iquest.net)
    AIX 4.1.4/cc_r4/DCE                     (nothing)
            (buhrt@iquest.net)
    IRIX 6.2/cc/POSIX                       (nothing)
            (robertl@cwi.nl)


Linker (ld) libraries and flags for threads
...........................................

    OS/threads                          Libraries/switches for use with threads

    SunOS 5.{1-5}/solaris               -lthread
    SunOS 5.5/POSIX                     -lpthread
    DEC OSF/1 3.x/DCE                   -lpthreads -lmach -lc_r -lc
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/DCE                -lpthreads -lpthread -lmach -lexc -lc
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/POSIX              -lpthread -lmach -lexc -lc
            (butenhof@zko.dec.com)
    AIX 4.1.4/{draft7,DCE}              (nothing)
            (buhrt@iquest.net)
    IRIX 6.2/POSIX                      -lpthread
            (jph@emilia.engr.sgi.com)


Building a shared libpython
---------------------------

Starting with Python 2.3, the majority of the interpreter can be built
into a shared library, which can then be used by the interpreter
executable, and by applications embedding Python. To enable this feature,
configure with --enable-shared.

If you enable this feature, the same object files will be used to create
a static library.  In particular, the static library will contain object
files using position-independent code (PIC) on platforms where PIC flags
are needed for the shared library.


Configuring additional built-in modules
---------------------------------------

Starting with Python 2.1, the setup.py script at the top of the source
distribution attempts to detect which modules can be built and
automatically compiles them.  Autodetection doesn't always work, so
you can still customize the configuration by editing the Modules/Setup
file; but this should be considered a last resort.  The rest of this
section only applies if you decide to edit the Modules/Setup file.
You also need this to enable static linking of certain modules (which
is needed to enable profiling on some systems).

This file is initially copied from Setup.dist by the configure script;
if it does not exist yet, create it by copying Modules/Setup.dist
yourself (configure will never overwrite it).  Never edit Setup.dist
-- always edit Setup or Setup.local (see below).  Read the comments in
the file for information on what kind of edits are allowed.  When you
have edited Setup in the Modules directory, the interpreter will
automatically be rebuilt the next time you run make (in the toplevel
directory).

Many useful modules can be built on any Unix system, but some optional
modules can't be reliably autodetected.  Often the quickest way to
determine whether a particular module works or not is to see if it
will build: enable it in Setup, then if you get compilation or link
errors, disable it -- you're either missing support or need to adjust
the compilation and linking parameters for that module.

On SGI IRIX, there are modules that interface to many SGI specific
system libraries, e.g. the GL library and the audio hardware.  These
modules will not be built by the setup.py script.

In addition to the file Setup, you can also edit the file Setup.local.
(the makesetup script processes both).  You may find it more
convenient to edit Setup.local and leave Setup alone.  Then, when
installing a new Python version, you can copy your old Setup.local
file.


Setting the optimization/debugging options
------------------------------------------

If you want or need to change the optimization/debugging options for
the C compiler, assign to the OPT variable on the toplevel make
command; e.g. "make OPT=-g" will build a debugging version of Python
on most platforms.  The default is OPT=-O; a value for OPT in the
environment when the configure script is run overrides this default
(likewise for CC; and the initial value for LIBS is used as the base
set of libraries to link with).

When compiling with GCC, the default value of OPT will also include
the -Wall and -Wstrict-prototypes options.

Additional debugging code to help debug memory management problems can
be enabled by using the --with-pydebug option to the configure script.

For flags that change binary compatibility, use the EXTRA_CFLAGS
variable.


Profiling
---------

If you want C profiling turned on, the easiest way is to run configure
with the CC environment variable to the necessary compiler
invocation.  For example, on Linux, this works for profiling using
gprof(1):

    CC="gcc -pg" ./configure

Note that on Linux, gprof apparently does not work for shared
libraries.  The Makefile/Setup mechanism can be used to compile and
link most extension modules statically.


Coverage checking
-----------------

For C coverage checking using gcov, run "make coverage".  This will
build a Python binary with profiling activated, and a ".gcno" and
".gcda" file for every source file compiled with that option.  With
the built binary, now run the code whose coverage you want to check.
Then, you can see coverage statistics for each individual source file
by running gcov, e.g.

    gcov -o Modules zlibmodule

This will create a "zlibmodule.c.gcov" file in the current directory
containing coverage info for that source file.

This works only for source files statically compiled into the
executable; use the Makefile/Setup mechanism to compile and link
extension modules you want to coverage-check statically.


Testing
-------

To test the interpreter, type "make test" in the top-level directory.
This runs the test set twice (once with no compiled files, once with
the compiled files left by the previous test run).  The test set
produces some output.  You can generally ignore the messages about
skipped tests due to optional features which can't be imported.
If a message is printed about a failed test or a traceback or core
dump is produced, something is wrong.  On some Linux systems (those
that are not yet using glibc 6), test_strftime fails due to a
non-standard implementation of strftime() in the C library. Please
ignore this, or upgrade to glibc version 6.

By default, tests are prevented from overusing resources like disk space and
memory.  To enable these tests, run "make testall".

IMPORTANT: If the tests fail and you decide to mail a bug report,
*don't* include the output of "make test".  It is useless.  Run the
failing test manually, as follows:

        ./python Lib/test/regrtest.py -v test_whatever

(substituting the top of the source tree for '.' if you built in a
different directory).  This runs the test in verbose mode.


Installing
----------

To install the Python binary, library modules, shared library modules
(see below), include files, configuration files, and the manual page,
just type

        make install

This will install all platform-independent files in subdirectories of
the directory given with the --prefix option to configure or to the
`prefix' Make variable (default /usr/local).  All binary and other
platform-specific files will be installed in subdirectories if the
directory given by --exec-prefix or the `exec_prefix' Make variable
(defaults to the --prefix directory) is given.

If DESTDIR is set, it will be taken as the root directory of the
installation, and files will be installed into $(DESTDIR)$(prefix),
$(DESTDIR)$(exec_prefix), etc.

All subdirectories created will have Python's version number in their
name, e.g. the library modules are installed in
"/usr/local/lib/python<version>/" by default, where <version> is the
<major>.<minor> release number (e.g. "2.1").  The Python binary is
installed as "python<version>" and a hard link named "python" is
created.  The only file not installed with a version number in its
name is the manual page, installed as "/usr/local/man/man1/python.1"
by default.

If you want to install multiple versions of Python see the section below
entitled "Installing multiple versions".

The only thing you may have to install manually is the Python mode for
Emacs found in Misc/python-mode.el.  (But then again, more recent
versions of Emacs may already have it.)  Follow the instructions that
came with Emacs for installation of site-specific files.


Installing multiple versions
----------------------------

On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument to the configure
script) you must take care that your primary python executable is not
overwritten by the installation of a different version.  All files and
directories installed using "make altinstall" contain the major and minor
version and can thus live side-by-side.  "make install" also creates
${prefix}/bin/python which refers to ${prefix}/bin/pythonX.Y.  If you intend
to install multiple versions using the same prefix you must decide which
version (if any) is your "primary" version.  Install that version using
"make install".  Install all other versions using "make altinstall".

For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being
the primary version, you would execute "make install" in your 2.6 build
directory and "make altinstall" in the others.


Configuration options and variables
-----------------------------------

Some special cases are handled by passing options to the configure
script.

WARNING: if you rerun the configure script with different options, you
must run "make clean" before rebuilding.  Exceptions to this rule:
after changing --prefix or --exec-prefix, all you need to do is remove
Modules/getpath.o.

--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
        it finds it.  If you don't want this, or if this compiler is
        installed but broken on your platform, pass the option
        --without-gcc.  You can also pass "CC=cc" (or whatever the
        name of the proper C compiler is) in the environment, but the
        advantage of using --without-gcc is that this option is
        remembered by the config.status script for its --recheck
        option.

--prefix, --exec-prefix: If you want to install the binaries and the
        Python library somewhere else than in /usr/local/{bin,lib},
        you can pass the option --prefix=DIRECTORY; the interpreter
        binary will be installed as DIRECTORY/bin/python and the
        library files as DIRECTORY/lib/python/*.  If you pass
        --exec-prefix=DIRECTORY (as well) this overrides the
        installation prefix for architecture-dependent files (like the
        interpreter binary).  Note that --prefix=DIRECTORY also
        affects the default module search path (sys.path), when
        Modules/config.c is compiled.  Passing make the option
        prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
        prefix set at configuration time; this may be more convenient
        than re-running the configure script if you change your mind
        about the install prefix.

--with-readline: This option is no longer supported.  GNU
        readline is automatically enabled by setup.py when present.

--with-threads: On most Unix systems, you can now use multiple
        threads, and support for this is enabled by default.  To
        disable this, pass --with-threads=no.  If the library required
        for threads lives in a peculiar place, you can use
        --with-thread=DIRECTORY.  IMPORTANT: run "make clean" after
        changing (either enabling or disabling) this option, or you
        will get link errors!  Note: for DEC Unix use
        --with-dec-threads instead.

--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
        supported by the "dl" library by Jack Jansen, which is
        ftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
        This is enabled (after you've ftp'ed and compiled the dl
        library) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
        is the absolute pathname of the dl library.  (Don't bother on
        IRIX 5, it already has dynamic linking using SunOS style
        shared libraries.)  THIS OPTION IS UNSUPPORTED.

--with-dl-dld: Dynamic loading of modules is rumored to be supported
        on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
        Symmetry (Dynix), and Atari ST.  This is done using a
        combination of the GNU dynamic loading package
        (ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an
        emulation of the SGI dl library mentioned above (the emulation
        can be found at
        ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z).  To
        enable this, ftp and compile both libraries, then call
        configure, passing it the option
        --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
        the absolute pathname of the dl emulation library and
        DLD_DIRECTORY is the absolute pathname of the GNU dld library.
        (Don't bother on SunOS 4 or 5, they already have dynamic
        linking using shared libraries.)  THIS OPTION IS UNSUPPORTED.

--with-libm, --with-libc: It is possible to specify alternative
        versions for the Math library (default -lm) and the C library
        (default the empty string) using the options
        --with-libm=STRING and --with-libc=STRING, respectively.  For
        example, if your system requires that you pass -lc_s to the C
        compiler to use the shared C library, you can pass
        --with-libc=-lc_s. These libraries are passed after all other
        libraries, the C library last.

--with-libs='libs': Add 'libs' to the LIBS that the python interpreter
        is linked against.

--with-cxx-main=<compiler>: If you plan to use C++ extension modules,
        then -- on some platforms -- you need to compile python's main()
        function with the C++ compiler. With this option, make will use
        <compiler> to compile main() *and* to link the python executable.
        It is likely that the resulting executable depends on the C++
        runtime library of <compiler>. (The default is --without-cxx-main.)

        There are platforms that do not require you to build Python
        with a C++ compiler in order to use C++ extension modules.
        E.g., x86 Linux with ELF shared binaries and GCC 3.x, 4.x is such
        a platform. We recommend that you configure Python
        --without-cxx-main on those platforms because a mismatch
        between the C++ compiler version used to build Python and to
        build a C++ extension module is likely to cause a crash at
        runtime.

        The Python installation also stores the variable CXX that
        determines, e.g., the C++ compiler distutils calls by default
        to build C++ extensions. If you set CXX on the configure command
        line to any string of non-zero length, then configure won't
        change CXX. If you do not preset CXX but pass
        --with-cxx-main=<compiler>, then configure sets CXX=<compiler>.
        In all other cases, configure looks for a C++ compiler by
        some common names (c++, g++, gcc, CC, cxx, cc++, cl) and sets
        CXX to the first compiler it finds. If it does not find any
        C++ compiler, then it sets CXX="".

        Similarly, if you want to change the command used to link the
        python executable, then set LINKCC on the configure command line.


--with-pydebug:  Enable additional debugging code to help track down
        memory management problems.  This allows printing a list of all
        live objects when the interpreter terminates.

--with(out)-universal-newlines: enable reading of text files with
        foreign newline convention (default: enabled). In other words,
        any of \r, \n or \r\n is acceptable as end-of-line character.
        If enabled import and execfile will automatically accept any newline
        in files. Python code can open a file with open(file, 'U') to
        read it in universal newline mode. THIS OPTION IS UNSUPPORTED.

--with-tsc: Profile using the Pentium timestamping counter (TSC).

--with-system-ffi:  Build the _ctypes extension module using an ffi
        library installed on the system.

--with-dbmliborder=db1:db2:...:  Specify the order that backends for the
	dbm extension are checked. Valid value is a colon separated string
	with the backend names `ndbm', `gdbm' and `bdb'.

Building for multiple architectures (using the VPATH feature)
-------------------------------------------------------------

If your file system is shared between multiple architectures, it
usually is not necessary to make copies of the sources for each
architecture you want to support.  If the make program supports the
VPATH feature, you can create an empty build directory for each
architecture, and in each directory run the configure script (on the
appropriate machine with the appropriate options).  This creates the
necessary subdirectories and the Makefiles therein.  The Makefiles
contain a line VPATH=... which points to a directory containing the
actual sources.  (On SGI systems, use "smake -J1" instead of "make" if
you use VPATH -- don't try gnumake.)

For example, the following is all you need to build a minimal Python
in /usr/tmp/python (assuming ~guido/src/python is the toplevel
directory and you want to build in /usr/tmp/python):

        $ mkdir /usr/tmp/python
        $ cd /usr/tmp/python
        $ ~guido/src/python/configure
        [...]
        $ make
        [...]
        $

Note that configure copies the original Setup file to the build
directory if it finds no Setup file there.  This means that you can
edit the Setup file for each architecture independently.  For this
reason, subsequent changes to the original Setup file are not tracked
automatically, as they might overwrite local changes.  To force a copy
of a changed original Setup file, delete the target Setup file.  (The
makesetup script supports multiple input files, so if you want to be
fancy you can change the rules to create an empty Setup.local if it
doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
however this assumes that you only need to add modules.)

Also note that you can't use a workspace for VPATH and non VPATH builds. The
object files left behind by one version confuses the other.


Building on non-UNIX systems
----------------------------

For Windows (2000/NT/ME/98/95), assuming you have MS VC++ 7.1, the
project files are in PCbuild, the workspace is pcbuild.dsw.  See
PCbuild\readme.txt for detailed instructions.

For other non-Unix Windows compilers, in particular MS VC++ 6.0 and
for OS/2, enter the directory "PC" and read the file "readme.txt".

For the Mac, a separate source distribution will be made available,
for use with the CodeWarrior compiler.  If you are interested in Mac
development, join the PythonMac Special Interest Group
(http://www.python.org/sigs/pythonmac-sig/, or send email to
pythonmac-sig-request@python.org).

Of course, there are also binary distributions available for these
platforms -- see http://www.python.org/.

To port Python to a new non-UNIX system, you will have to fake the
effect of running the configure script manually (for Mac and PC, this
has already been done for you).  A good start is to copy the file
pyconfig.h.in to pyconfig.h and edit the latter to reflect the actual
configuration of your system.  Most symbols must simply be defined as
1 only if the corresponding feature is present and can be left alone
otherwise; however the *_t type symbols must be defined as some
variant of int if they need to be defined at all.

For all platforms, it's important that the build arrange to define the
preprocessor symbol NDEBUG on the compiler command line in a release
build of Python (else assert() calls remain in the code, hurting
release-build performance).  The Unix, Windows and Mac builds already
do this.


Miscellaneous issues
====================

Emacs mode
----------

There's an excellent Emacs editing mode for Python code; see the file
Misc/python-mode.el.  Originally written by the famous Tim Peters, it is now
maintained by the equally famous Barry Warsaw.  The latest version, along with
various other contributed Python-related Emacs goodies, is online at
http://launchpad.net/python-mode/.


Tkinter
-------

The setup.py script automatically configures this when it detects a
usable Tcl/Tk installation.  This requires Tcl/Tk version 8.0 or
higher.

For more Tkinter information, see the Tkinter Resource page:
http://www.python.org/topics/tkinter/

There are demos in the Demo/tkinter directory.

Note that there's a Python module called "Tkinter" (capital T) which
lives in Lib/lib-tk/Tkinter.py, and a C module called "_tkinter"
(lower case t and leading underscore) which lives in
Modules/_tkinter.c.  Demos and normal Tk applications import only the
Python Tkinter module -- only the latter imports the C _tkinter
module.  In order to find the C _tkinter module, it must be compiled
and linked into the Python interpreter -- the setup.py script does
this.  In order to find the Python Tkinter module, sys.path must be
set correctly -- normal installation takes care of this.


Distribution structure
----------------------

Most subdirectories have their own README files.  Most files have
comments.

Demo/           Demonstration scripts, modules and programs
Doc/            Documentation sources (reStructuredText)
Grammar/        Input for the parser generator
Include/        Public header files
LICENSE         Licensing information
Lib/            Python library modules
Mac/            Macintosh specific resources
Makefile.pre.in Source from which config.status creates the Makefile.pre
Misc/           Miscellaneous useful files
Modules/        Implementation of most built-in modules
Objects/        Implementation of most built-in object types
PC/             Files specific to PC ports (DOS, Windows, OS/2)
PCbuild/        Build directory for Microsoft Visual C++
Parser/         The parser and tokenizer and their input handling
Python/         The byte-compiler and interpreter
README          The file you're reading now
RISCOS/         Files specific to RISC OS port
Tools/          Some useful programs written in Python
pyconfig.h.in   Source from which pyconfig.h is created (GNU autoheader output)
configure       Configuration shell script (GNU autoconf output)
configure.ac    Configuration specification (input for GNU autoconf)
install-sh      Shell script used to install files
setup.py        Python script used to build extension modules

The following files will (may) be created in the toplevel directory by
the configuration and build processes:

Makefile        Build rules
Makefile.pre    Build rules before running Modules/makesetup
buildno         Keeps track of the build number
config.cache    Cache of configuration variables
pyconfig.h      Configuration header
config.log      Log from last configure run
config.status   Status from last run of the configure script
getbuildinfo.o  Object file from Modules/getbuildinfo.c
libpython<version>.a    The library archive
python          The executable interpreter
reflog.txt      Output from running the regression suite with the -R flag 
tags, TAGS      Tags files for vi and Emacs


That's all, folks!
------------------


--Guido van Rossum (home page: http://www.python.org/~guido/)
doc/alt-python27-contextlib2/LICENSE.txt000064400000013646150404023530013645 0ustar00

A. HISTORY OF THE SOFTWARE
==========================

contextlib2 is a derivative of the contextlib module distributed by the PSF
as part of the Python standard library. According, it is itself redistributed
under the PSF license (reproduced in full below). As the contextlib module
was added only in Python 2.5, the licenses for earlier Python versions are
not applicable and have not been included.

Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC.  Guido remains Python's
principal author, although it includes many contributions from others.

In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.

In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
year, the PythonLabs team moved to Digital Creations (now Zope
Corporation, see http://www.zope.com).  In 2001, the Python Software
Foundation (PSF, see http://www.python.org/psf/) was formed, a
non-profit organization created specifically to own Python-related
Intellectual Property.  Zope Corporation is a sponsoring member of
the PSF.

All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition).  Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases that included the contextlib module.

    Release         Derived     Year        Owner       GPL-
                    from                                compatible? (1)

    2.5             2.4         2006        PSF         yes
    2.5.1           2.5         2007        PSF         yes
    2.5.2           2.5.1       2008        PSF         yes
    2.5.3           2.5.2       2008        PSF         yes
    2.6             2.5         2008        PSF         yes
    2.6.1           2.6         2008        PSF         yes
    2.6.2           2.6.1       2009        PSF         yes
    2.6.3           2.6.2       2009        PSF         yes
    2.6.4           2.6.3       2009        PSF         yes
    2.6.5           2.6.4       2010        PSF         yes
    3.0             2.6         2008        PSF         yes
    3.0.1           3.0         2009        PSF         yes
    3.1             3.0.1       2009        PSF         yes
    3.1.1           3.1         2009        PSF         yes
    3.1.2           3.1.1       2010        PSF         yes
    3.1.3           3.1.2       2010        PSF         yes
    3.1.4           3.1.3       2011        PSF         yes
    3.2             3.1         2011        PSF         yes
    3.2.1           3.2         2011        PSF         yes
    3.2.2           3.2.1       2011        PSF         yes
    3.3             3.2         2012        PSF         yes

Footnotes:

(1) GPL-compatible doesn't mean that we're distributing Python under
    the GPL.  All Python licenses, unlike the GPL, let you distribute
    a modified version without making your changes open source.  The
    GPL-compatible licenses make it possible to combine Python with
    other software that is released under the GPL; the others don't.

Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.


B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================

PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011 Python Software Foundation; All Rights Reserved" are retained in Python
alone or in any derivative version prepared by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee.  This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
doc/alt-python27-contextlib2/VERSION.txt000064400000000006150404023530013672 0ustar000.5.4
doc/alt-python27-contextlib2/README.rst000064400000003372150404023530013504 0ustar00.. image:: https://jazzband.co/static/img/badge.svg
   :target: https://jazzband.co/
   :alt: Jazzband

.. image:: https://readthedocs.org/projects/contextlib2/badge/?version=latest
   :target: https://contextlib2.readthedocs.org/
   :alt: Latest Docs

.. image:: https://img.shields.io/travis/jazzband/contextlib2/master.svg
   :target: http://travis-ci.org/jazzband/contextlib2

.. image:: https://coveralls.io/repos/github/jazzband/contextlib2/badge.svg?branch=master
   :target: https://coveralls.io/github/jazzband/contextlib2?branch=master

.. image:: https://landscape.io/github/jazzband/contextlib2/master/landscape.svg
   :target: https://landscape.io/github/jazzband/contextlib2/

contextlib2 is a backport of the `standard library's contextlib
module <https://docs.python.org/3.5/library/contextlib.html>`_ to
earlier Python versions.

It also serves as a real world proving ground for possible future
enhancements to the standard library version.

Development
-----------

contextlib2 has no runtime dependencies, but requires ``unittest2`` for testing
on Python 2.x.

Local testing is just a matter of running ``python test_contextlib2.py``.

You can test against multiple versions of Python with
`tox <https://tox.testrun.org/>`_::

    pip install tox
    tox

Versions currently tested in both tox and Travis CI are:

* CPython 2.6
* CPython 2.7
* CPython 3.4
* CPython 3.5
* CPython 3.6 (CPython development branch)
* PyPy

tox also has a PyPy3 configuration, but it is not configured in Travis
due to a
`known incompatibility <https://bitbucket.org/pypy/pypy/issues/1903>`_.

To install several of the relevant runtimes on Fedora 23::

    sudo dnf install python python3 pypy pypy3
    sudo dnf copr enable -y mstuchli/Python3.5
    sudo dnf install python35-python3
doc/alt-python27-contextlib2/NEWS.rst000064400000007425150404023530013326 0ustar00Release History
---------------

0.5.4 (2016-07-31)
^^^^^^^^^^^^^^^^^^

* Thanks to the welcome efforts of Jannis Leidel, contextlib2 is now a
  [Jazzband](https://jazzband.co/) project! This means that I (Nick Coghlan)
  am no longer a single point of failure for backports of future contextlib
  updates to earlier Python versions.

* Issue `#7 <https://github.com/jazzband/contextlib2/issues/7>`__: Backported
  fix for CPython issue `#27122 <http://bugs.python.org/issue27122>`__,
  preventing a potential infinite loop on Python 3.5 when handling
  ``RuntimeError`` (CPython updates by Gregory P. Smith & Serhiy Storchaka)


0.5.3 (2016-05-02)
^^^^^^^^^^^^^^^^^^

* ``ExitStack`` now correctly handles context managers implemented as old-style
  classes in Python 2.x (such as ``codecs.StreamReader`` and
  ``codecs.StreamWriter``)

* ``setup.py`` has been migrated to setuptools and configured to emit a
  universal wheel file by default

0.5.2 (2016-05-02)
^^^^^^^^^^^^^^^^^^

* development migrated from BitBucket to GitHub

* ``redirect_stream``, ``redirect_stdout``, ``redirect_stderr`` and ``suppress``
  now explicitly inherit from ``object``, ensuring compatibility with
  ``ExitStack`` when run under Python 2.x (patch contributed by Devin
  Jeanpierre).

* ``MANIFEST.in`` is now included in the published sdist, ensuring the archive
  can be precisely recreated even without access to the original source repo
  (patch contributed by Guy Rozendorn)


0.5.1 (2016-01-13)
^^^^^^^^^^^^^^^^^^

* Python 2.6 compatilibity restored (patch contributed by Armin Ronacher)

* README converted back to reStructured Text formatting


0.5.0 (2016-01-12)
^^^^^^^^^^^^^^^^^^

* Updated to include all features from the Python 3.4 and 3.5 releases of
  contextlib (also includes some ``ExitStack`` enhancements made following
  the integration into the standard library for Python 3.3)

* The legacy ``ContextStack`` and ``ContextDecorator.refresh_cm`` APIs are
  no longer documented and emit ``DeprecationWarning`` when used

* Python 2.6, 3.2 and 3.3 have been dropped from compatibility testing

* tox is now supported for local version compatibility testing (patch by
  Marc Abramowitz)


0.4.0 (2012-05-05)
^^^^^^^^^^^^^^^^^^

* (BitBucket) Issue #8: Replace ContextStack with ExitStack (old ContextStack
  API retained for backwards compatibility)

* Fall back to unittest2 if unittest is missing required functionality


0.3.1 (2012-01-17)
^^^^^^^^^^^^^^^^^^

* (BitBucket) Issue #7: Add MANIFEST.in so PyPI package contains all relevant
  files (patch contributed by Doug Latornell)


0.3 (2012-01-04)
^^^^^^^^^^^^^^^^

* (BitBucket) Issue #5: ContextStack.register no longer pointlessly returns the
  wrapped function
* (BitBucket) Issue #2: Add examples and recipes section to docs
* (BitBucket) Issue #3: ContextStack.register_exit() now accepts objects with
  __exit__ attributes in addition to accepting exit callbacks directly
* (BitBucket) Issue #1: Add ContextStack.preserve() to move all registered
  callbacks to a new ContextStack object
* Wrapped callbacks now expose __wrapped__ (for direct callbacks) or __self__
  (for context manager methods) attributes to aid in introspection
* Moved version number to a VERSION.txt file (read by both docs and setup.py)
* Added NEWS.rst (and incorporated into documentation)


0.2 (2011-12-15)
^^^^^^^^^^^^^^^^

* Renamed CleanupManager to ContextStack (hopefully before anyone started
  using the module for anything, since I didn't alias the old name at all)


0.1 (2011-12-13)
^^^^^^^^^^^^^^^^

* Initial release as a backport module
* Added CleanupManager (based on a `Python feature request`_)
* Added ContextDecorator.refresh_cm() (based on a `Python tracker issue`_)
  
.. _Python feature request: http://bugs.python.org/issue13585
.. _Python tracker issue: http://bugs.python.org/issue11647
doc/alt-python27-devel/README.valgrind000064400000010462150404023530013342 0ustar00This document describes some caveats about the use of Valgrind with
Python.  Valgrind is used periodically by Python developers to try
to ensure there are no memory leaks or invalid memory reads/writes.

If you don't want to read about the details of using Valgrind, there
are still two things you must do to suppress the warnings.  First,
you must use a suppressions file.  One is supplied in
Misc/valgrind-python.supp.  Second, you must do one of the following:

  * Uncomment Py_USING_MEMORY_DEBUGGER in Objects/obmalloc.c,
    then rebuild Python
  * Uncomment the lines in Misc/valgrind-python.supp that
    suppress the warnings for PyObject_Free and PyObject_Realloc

If you want to use Valgrind more effectively and catch even more
memory leaks, you will need to configure python --without-pymalloc.
PyMalloc allocates a few blocks in big chunks and most object
allocations don't call malloc, they use chunks doled about by PyMalloc
from the big blocks.  This means Valgrind can't detect
many allocations (and frees), except for those that are forwarded
to the system malloc.  Note: configuring python --without-pymalloc
makes Python run much slower, especially when running under Valgrind.
You may need to run the tests in batches under Valgrind to keep
the memory usage down to allow the tests to complete.  It seems to take
about 5 times longer to run --without-pymalloc.

Apr 15, 2006:
  test_ctypes causes Valgrind 3.1.1 to fail (crash).
  test_socket_ssl should be skipped when running valgrind.
	The reason is that it purposely uses uninitialized memory.
	This causes many spurious warnings, so it's easier to just skip it.


Details:
--------
Python uses its own small-object allocation scheme on top of malloc,
called PyMalloc.

Valgrind may show some unexpected results when PyMalloc is used.
Starting with Python 2.3, PyMalloc is used by default.  You can disable
PyMalloc when configuring python by adding the --without-pymalloc option.
If you disable PyMalloc, most of the information in this document and
the supplied suppressions file will not be useful.  As discussed above,
disabling PyMalloc can catch more problems.

If you use valgrind on a default build of Python,  you will see
many errors like:

        ==6399== Use of uninitialised value of size 4
        ==6399== at 0x4A9BDE7E: PyObject_Free (obmalloc.c:711)
        ==6399== by 0x4A9B8198: dictresize (dictobject.c:477)

These are expected and not a problem.  Tim Peters explains
the situation:

        PyMalloc needs to know whether an arbitrary address is one
	that's managed by it, or is managed by the system malloc.
	The current scheme allows this to be determined in constant
	time, regardless of how many memory areas are under pymalloc's
	control.

        The memory pymalloc manages itself is in one or more "arenas",
	each a large contiguous memory area obtained from malloc.
	The base address of each arena is saved by pymalloc
	in a vector.  Each arena is carved into "pools", and a field at
	the start of each pool contains the index of that pool's arena's
	base address in that vector.

        Given an arbitrary address, pymalloc computes the pool base
	address corresponding to it, then looks at "the index" stored
	near there.  If the index read up is out of bounds for the
	vector of arena base addresses pymalloc maintains, then
	pymalloc knows for certain that this address is not under
	pymalloc's control.  Otherwise the index is in bounds, and
	pymalloc compares

            the arena base address stored at that index in the vector

        to

            the arbitrary address pymalloc is investigating

        pymalloc controls this arbitrary address if and only if it lies
        in the arena the address's pool's index claims it lies in.

        It doesn't matter whether the memory pymalloc reads up ("the
	index") is initialized.  If it's not initialized, then
	whatever trash gets read up will lead pymalloc to conclude
	(correctly) that the address isn't controlled by it, either
	because the index is out of bounds, or the index is in bounds
	but the arena it represents doesn't contain the address.

        This determination has to be made on every call to one of
	pymalloc's free/realloc entry points, so its speed is critical
	(Python allocates and frees dynamic memory at a ferocious rate
	-- everything in Python, from integers to "stack frames",
	lives in the heap).
doc/alt-python27-devel/valgrind-python.supp000064400000016441150404023530014716 0ustar00#
# This is a valgrind suppression file that should be used when using valgrind.
#
#  Here's an example of running valgrind:
#
#	cd python/dist/src
#	valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \
#		./python -E -tt ./Lib/test/regrtest.py -u bsddb,network
#
# You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER
# to use the preferred suppressions with Py_ADDRESS_IN_RANGE.
#
# If you do not want to recompile Python, you can uncomment
# suppressions for PyObject_Free and PyObject_Realloc.
#
# See Misc/README.valgrind for more information.

# all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif
{
   ADDRESS_IN_RANGE/Invalid read of size 4
   Memcheck:Addr4
   fun:Py_ADDRESS_IN_RANGE
}

{
   ADDRESS_IN_RANGE/Invalid read of size 4
   Memcheck:Value4
   fun:Py_ADDRESS_IN_RANGE
}

{
   ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64)
   Memcheck:Value8
   fun:Py_ADDRESS_IN_RANGE
}

{
   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
   Memcheck:Cond
   fun:Py_ADDRESS_IN_RANGE
}

#
# Leaks (including possible leaks)
#    Hmmm, I wonder if this masks some real leaks.  I think it does.
#    Will need to fix that.
#

{
   Suppress leaking the GIL.  Happens once per process, see comment in ceval.c.
   Memcheck:Leak
   fun:malloc
   fun:PyThread_allocate_lock
   fun:PyEval_InitThreads
}

{
   Suppress leaking the GIL after a fork.
   Memcheck:Leak
   fun:malloc
   fun:PyThread_allocate_lock
   fun:PyEval_ReInitThreads
}

{
   Suppress leaking the autoTLSkey.  This looks like it shouldn't leak though.
   Memcheck:Leak
   fun:malloc
   fun:PyThread_create_key
   fun:_PyGILState_Init
   fun:Py_InitializeEx
   fun:Py_Main
}

{
   Hmmm, is this a real leak or like the GIL?
   Memcheck:Leak
   fun:malloc
   fun:PyThread_ReInitTLS
}

{
   Handle PyMalloc confusing valgrind (possibly leaked)
   Memcheck:Leak
   fun:realloc
   fun:_PyObject_GC_Resize
   fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
}

{
   Handle PyMalloc confusing valgrind (possibly leaked)
   Memcheck:Leak
   fun:malloc
   fun:_PyObject_GC_New
   fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
}

{
   Handle PyMalloc confusing valgrind (possibly leaked)
   Memcheck:Leak
   fun:malloc
   fun:_PyObject_GC_NewVar
   fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
}

{
   bpo-37329: _PyWarnings_Init allocates memory at startup, but doesn't release it at exit
   Memcheck:Leak
   fun:malloc
   ...
   fun:_PyWarnings_Init
}

#
# Non-python specific leaks
#

{
   Handle pthread issue (possibly leaked)
   Memcheck:Leak
   fun:calloc
   fun:allocate_dtv
   fun:_dl_allocate_tls_storage
   fun:_dl_allocate_tls
}

{
   Handle pthread issue (possibly leaked)
   Memcheck:Leak
   fun:memalign
   fun:_dl_allocate_tls_storage
   fun:_dl_allocate_tls
}

###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Addr4
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Value4
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Addr8
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Value8
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
###   Memcheck:Cond
###   fun:PyObject_Free
###}

###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Addr4
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Value4
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Addr8
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Value8
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
###   Memcheck:Cond
###   fun:PyObject_Realloc
###}

###
### All the suppressions below are for errors that occur within libraries
### that Python uses.  The problems to not appear to be related to Python's
### use of the libraries.
###

{
   Generic ubuntu ld problems
   Memcheck:Addr8
   obj:/lib/ld-2.4.so
   obj:/lib/ld-2.4.so
   obj:/lib/ld-2.4.so
   obj:/lib/ld-2.4.so
}

{
   Generic gentoo ld problems
   Memcheck:Cond
   obj:/lib/ld-2.3.4.so
   obj:/lib/ld-2.3.4.so
   obj:/lib/ld-2.3.4.so
   obj:/lib/ld-2.3.4.so
}

{
   DBM problems, see test_dbm
   Memcheck:Param
   write(buf)
   fun:write
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_close
}

{
   DBM problems, see test_dbm
   Memcheck:Value8
   fun:memmove
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_store
   fun:dbm_ass_sub
}

{
   DBM problems, see test_dbm
   Memcheck:Cond
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_store
   fun:dbm_ass_sub
}

{
   DBM problems, see test_dbm
   Memcheck:Cond
   fun:memmove
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_store
   fun:dbm_ass_sub
}

{
   GDBM problems, see test_gdbm
   Memcheck:Param
   write(buf)
   fun:write
   fun:gdbm_open

}

{
   ZLIB problems, see test_gzip
   Memcheck:Cond
   obj:/lib/libz.so.1.2.3
   obj:/lib/libz.so.1.2.3
   fun:deflate
}

{
   Avoid problems w/readline doing a putenv and leaking on exit
   Memcheck:Leak
   fun:malloc
   fun:xmalloc
   fun:sh_set_lines_and_columns
   fun:_rl_get_screen_size
   fun:_rl_init_terminal_io
   obj:/lib/libreadline.so.4.3
   fun:rl_initialize
}

###
### These occur from somewhere within the SSL, when running
###  test_socket_sll.  They are too general to leave on by default.
###
###{
###   somewhere in SSL stuff
###   Memcheck:Cond
###   fun:memset
###}
###{
###   somewhere in SSL stuff
###   Memcheck:Value4
###   fun:memset
###}
###
###{
###   somewhere in SSL stuff
###   Memcheck:Cond
###   fun:MD5_Update
###}
###
###{
###   somewhere in SSL stuff
###   Memcheck:Value4
###   fun:MD5_Update
###}

#
# All of these problems come from using test_socket_ssl
#
{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_bin2bn
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_num_bits_word
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:BN_num_bits_word
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_mod_exp_mont_word
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_mod_exp_mont
}

{
   from test_socket_ssl
   Memcheck:Param
   write(buf)
   fun:write
   obj:/usr/lib/libcrypto.so.0.9.7
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:RSA_verify
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:RSA_verify
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:DES_set_key_unchecked
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:DES_encrypt2
}

{
   from test_socket_ssl
   Memcheck:Cond
   obj:/usr/lib/libssl.so.0.9.7
}

{
   from test_socket_ssl
   Memcheck:Value4
   obj:/usr/lib/libssl.so.0.9.7
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BUF_MEM_grow_clean
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:memcpy
   fun:ssl3_read_bytes
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:SHA1_Update
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:SHA1_Update
}


doc/alt-python27-devel/gdbinit000064400000011325150404023530012217 0ustar00# If you use the GNU debugger gdb to debug the Python C runtime, you
# might find some of the following commands useful.  Copy this to your
# ~/.gdbinit file and it'll get loaded into gdb automatically when you
# start it up.  Then, at the gdb prompt you can do things like:
#
#    (gdb) pyo apyobjectptr
#    <module 'foobar' (built-in)>
#    refcounts: 1
#    address    : 84a7a2c
#    $1 = void
#    (gdb)
#
# NOTE: If you have gdb 7 or later, it supports debugging of Python directly
# with embedded macros that you may find superior to what is in here.
# See Tools/gdb/libpython.py and http://bugs.python.org/issue8032.

# Prints a representation of the object to stderr, along with the
# number of reference counts it current has and the hex address the
# object is allocated at.  The argument must be a PyObject*
define pyo
    # side effect of calling _PyObject_Dump is to dump the object's
    # info - assigning just prevents gdb from printing the
    # NULL return value
    set $_unused_void = _PyObject_Dump($arg0)
end

# Prints a representation of the object to stderr, along with the
# number of reference counts it current has and the hex address the
# object is allocated at.  The argument must be a PyGC_Head*
define pyg
    print _PyGC_Dump($arg0)
end

# print the local variables of the current frame
define pylocals
    set $_i = 0
    while $_i < f->f_code->co_nlocals
	if f->f_localsplus + $_i != 0
	    set $_names = co->co_varnames
	    set $_name = PyString_AsString(PyTuple_GetItem($_names, $_i))
	    printf "%s:\n", $_name
            pyo f->f_localsplus[$_i]
	end
        set $_i = $_i + 1
    end
end

# A rewrite of the Python interpreter's line number calculator in GDB's
# command language
define lineno
    set $__continue = 1
    set $__co = f->f_code
    set $__lasti = f->f_lasti
    set $__sz = ((PyStringObject *)$__co->co_lnotab)->ob_size/2
    set $__p = (unsigned char *)((PyStringObject *)$__co->co_lnotab)->ob_sval
    set $__li = $__co->co_firstlineno
    set $__ad = 0
    while ($__sz-1 >= 0 && $__continue)
      set $__sz = $__sz - 1
      set $__ad = $__ad + *$__p
      set $__p = $__p + 1
      if ($__ad > $__lasti)
	set $__continue = 0
      else
        set $__li = $__li + *$__p
        set $__p = $__p + 1
      end
    end
    printf "%d", $__li
end

# print the current frame - verbose
define pyframev
    pyframe
    pylocals
end

define pyframe
    set $__fn = (char *)((PyStringObject *)co->co_filename)->ob_sval
    set $__n = (char *)((PyStringObject *)co->co_name)->ob_sval
    printf "%s (", $__fn
    lineno
    printf "): %s\n", $__n
### Uncomment these lines when using from within Emacs/XEmacs so it will
### automatically track/display the current Python source line
#    printf "%c%c%s:", 032, 032, $__fn
#    lineno
#    printf ":1\n"
end

### Use these at your own risk.  It appears that a bug in gdb causes it
### to crash in certain circumstances.

#define up
#    up-silently 1
#    printframe
#end

#define down
#    down-silently 1
#    printframe
#end

define printframe
    if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
	pyframe
    else
        frame
    end
end

# Here's a somewhat fragile way to print the entire Python stack from gdb.
# It's fragile because the tests for the value of $pc depend on the layout
# of specific functions in the C source code.

# Explanation of while and if tests: We want to pop up the stack until we
# land in Py_Main (this is probably an incorrect assumption in an embedded
# interpreter, but the test can be extended by an interested party).  If
# Py_Main <= $pc <= Py_GetArgcArv is true, $pc is in Py_Main(), so the while
# tests succeeds as long as it's not true.  In a similar fashion the if
# statement tests to see if we are in PyEval_EvalFrameEx().

# Note: The name of the main interpreter function and the function which
# follow it has changed over time.  This version of pystack works with this
# version of Python.  If you try using it with older or newer versions of
# the interpreter you may will have to change the functions you compare with
# $pc.

# print the entire Python call stack
define pystack
    while $pc < Py_Main || $pc > Py_GetArgcArgv
        if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
	    pyframe
        end
        up-silently 1
    end
    select-frame 0
end

# print the entire Python call stack - verbose mode
define pystackv
    while $pc < Py_Main || $pc > Py_GetArgcArgv
        if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
	    pyframev
        end
        up-silently 1
    end
    select-frame 0
end

# generally useful macro to print a Unicode string
def pu
  set $uni = $arg0 
  set $i = 0
  while (*$uni && $i++<100)
    if (*$uni < 0x80) 
      print *(char*)$uni++
    else
      print /x *(short*)$uni++
    end
  end
end
doc/alt-python27-pip/README.rst000064400000004606150404023530012040 0ustar00pip - The Python Package Installer
==================================

.. image:: https://img.shields.io/pypi/v/pip.svg
   :target: https://pypi.org/project/pip/

.. image:: https://readthedocs.org/projects/pip/badge/?version=latest
   :target: https://pip.pypa.io/en/latest

pip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.

Please take a look at our documentation for how to install and use pip:

* `Installation`_
* `Usage`_

We release updates regularly, with a new version every 3 months. Find more details in our documentation:

* `Release notes`_
* `Release process`_

In 2020, we're working on improvements to the heart of pip. Please `learn more and take our survey`_ to help us do it right.

If you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:

* `Issue tracking`_
* `Discourse channel`_
* `User IRC`_

If you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:

* `GitHub page`_
* `Development documentation`_
* `Development mailing list`_
* `Development IRC`_

Code of Conduct
---------------

Everyone interacting in the pip project's codebases, issue trackers, chat
rooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_.

.. _package installer: https://packaging.python.org/guides/tool-recommendations/
.. _Python Package Index: https://pypi.org
.. _Installation: https://pip.pypa.io/en/stable/installing.html
.. _Usage: https://pip.pypa.io/en/stable/
.. _Release notes: https://pip.pypa.io/en/stable/news.html
.. _Release process: https://pip.pypa.io/en/latest/development/release-process/
.. _GitHub page: https://github.com/pypa/pip
.. _Development documentation: https://pip.pypa.io/en/latest/development
.. _learn more and take our survey: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html
.. _Issue tracking: https://github.com/pypa/pip/issues
.. _Discourse channel: https://discuss.python.org/c/packaging
.. _Development mailing list: https://mail.python.org/mailman3/lists/distutils-sig.python.org/
.. _User IRC: https://webchat.freenode.net/?channels=%23pypa
.. _Development IRC: https://webchat.freenode.net/?channels=%23pypa-dev
.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/
doc/alt-python27-raven/README.rst000064400000006674150404023530012372 0ustar00.. raw:: html

    <p align="center">

.. image:: docs/_static/logo.png
    :target: https://sentry.io
    :align: center
    :width: 116
    :alt: Sentry website

.. raw:: html

    </p>

Raven - Sentry for Python
=========================

.. image:: https://img.shields.io/pypi/v/raven.svg
    :target: https://pypi.python.org/pypi/raven
    :alt: PyPi page link -- version

.. image:: https://travis-ci.org/getsentry/raven-python.svg?branch=master
    :target: https://travis-ci.org/getsentry/raven-python

.. image:: https://img.shields.io/pypi/l/raven.svg
    :target: https://pypi.python.org/pypi/raven
    :alt: PyPi page link -- MIT licence

.. image:: https://img.shields.io/pypi/pyversions/raven.svg
    :target: https://pypi.python.org/pypi/raven
    :alt: PyPi page link -- Python versions

.. image:: https://codeclimate.com/github/getsentry/raven-python/badges/gpa.svg
   :target: https://codeclimate.com/github/codeclimate/codeclimate
   :alt: Code Climate


Raven is the official Python client for `Sentry`_, officially supports
Python 2.6–2.7 & 3.3–3.7, and runs on PyPy and Google App Engine.

It tracks errors and exceptions that happen during the
execution of your application and provides instant notification with detailed
information needed to prioritize, identify, reproduce and fix each issue.

It provides full out-of-the-box support for many of the popular python frameworks, including
Django, and Flask. Raven also includes drop-in support for any WSGI-compatible
web application.

Your application doesn't live on the web? No problem! Raven is easy to use in
any Python application.

For more information, see our `Python Documentation`_ for framework integrations and other goodies.


Features
--------

- Automatically report (un)handled exceptions and errors
- Send customized diagnostic data
- Process and sanitize data before sending it over the network


Quickstart
----------

It's really easy to get started with Raven. After you complete setting up a project in Sentry,
you’ll be given a value which we call a DSN, or Data Source Name. You will need it to configure the client.


Install the latest package with *pip* and configure the client::

    pip install raven --upgrade

Create a client and capture an example exception:

.. sourcecode:: python

    from raven import Client

    client = Client('___DSN___')

    try:
        1 / 0
    except ZeroDivisionError:
        client.captureException()


Raven Python is more than that however. Checkout our `Python Documentation`_.


Contributing
------------

Raven is under active development and contributions are more than welcome!
There are many ways to contribute:

* Join in on discussions on our `Mailing List`_ or in our `IRC Channel`_.

* Report bugs on our `Issue Tracker`_.

* Submit a pull request!


Resources
---------

* `Sentry`_
* `Python Documentation`_
* `Issue Tracker`_
* `Code`_ on Github
* `Mailing List`_
* `IRC Channel`_ (irc.freenode.net, #sentry)
* `Travis CI`_

.. _Sentry: https://getsentry.com/
.. _Python Documentation: https://docs.getsentry.com/hosted/clients/python/
.. _SDKs for other platforms: https://docs.sentry.io/#platforms
.. _Issue Tracker: https://github.com/getsentry/raven-python/issues
.. _Code: https://github.com/getsentry/raven-python
.. _Mailing List: https://groups.google.com/group/getsentry
.. _IRC Channel: irc://irc.freenode.net/sentry
.. _Travis CI: http://travis-ci.org/getsentry/raven-python





Not using Python? Check out our `SDKs for other platforms`_.
doc/alt-python27-raven/LICENSE000064400000002764150404023530011704 0ustar00Copyright (c) 2015 Functional Software, Inc and individual contributors.
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.

    3. Neither the name of the Raven nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
doc/alt-python27-raven/PKG-INFO000064400000002564150404023530011772 0ustar00Metadata-Version: 1.1
Name: raven
Version: 6.3.0
Summary: Raven is a client for Sentry (https://getsentry.com)
Home-page: https://github.com/getsentry/raven-python
Author: Sentry
Author-email: hello@getsentry.com
License: BSD
Description: 
        Raven
        =====
        
        Raven is a Python client for `Sentry <http://getsentry.com/>`_. It provides
        full out-of-the-box support for many of the popular frameworks, including
        `Django <djangoproject.com>`_, `Flask <http://flask.pocoo.org/>`_, and `Pylons
        <http://www.pylonsproject.org/>`_. Raven also includes drop-in support for any
        `WSGI <https://wsgi.readthedocs.io/>`_-compatible web application.
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
doc/alt-python27/README000064400000154060150404023530010443 0ustar00This is Python version 2.7.18
=============================

Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation.  All
rights reserved.

Copyright (c) 2000 BeOpen.com.
All rights reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All rights reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
All rights reserved.


License information
-------------------

See the file "LICENSE" for information on the history of this
software, terms & conditions for usage, and a DISCLAIMER OF ALL
WARRANTIES.

This Python distribution contains no GNU General Public Licensed
(GPLed) code so it may be used in proprietary projects just like prior
Python distributions.  There are interfaces to some GNU code but these
are entirely optional.

All trademarks referenced herein are property of their respective
holders.


What's new in this release?
---------------------------

See the file "Misc/NEWS".


If you don't read instructions
------------------------------

Congratulations on getting this far. :-)

To start building right away (on UNIX): type "./configure" in the
current directory and when it finishes, type "make".  This creates an
executable "./python"; to install in /usr/local, first do "su root"
and then "make install".

The section `Build instructions' below is still recommended reading.


What is Python anyway?
----------------------

Python is an interpreted, interactive object-oriented programming
language suitable (amongst other uses) for distributed application
development, scripting, numeric computing and system testing.  Python
is often compared to Tcl, Perl, Java, JavaScript, Visual Basic or
Scheme.  To find out more about what Python can do for you, point your
browser to http://www.python.org/.


How do I learn Python?
----------------------

The official tutorial is still a good place to start; see
http://docs.python.org/ for online and downloadable versions, as well
as a list of other introductions, and reference documentation.

There's a quickly growing set of books on Python.  See
http://wiki.python.org/moin/PythonBooks for a list.


Documentation
-------------

All documentation is provided online in a variety of formats.  In
order of importance for new users: Tutorial, Library Reference,
Language Reference, Extending & Embedding, and the Python/C API.  The
Library Reference is especially of immense value since much of
Python's power is described there, including the built-in data types
and functions!

All documentation is also available online at the Python web site
(http://docs.python.org/, see below).  It is available online for occasional
reference, or can be downloaded in many formats for faster access.  The
documentation is downloadable in HTML, PostScript, PDF, LaTeX, and
reStructuredText (2.6+) formats; the LaTeX and reStructuredText versions are
primarily for documentation authors, translators, and people with special
formatting requirements.

If you would like to contribute to the development of Python, relevant
documentation is available at:

    http://docs.python.org/devguide/

For information about building Python's documentation, refer to Doc/README.txt.


Web sites
---------

New Python releases and related technologies are published at
http://www.python.org/.  Come visit us!


Newsgroups and Mailing Lists
----------------------------

Read comp.lang.python, a high-volume discussion newsgroup about
Python, or comp.lang.python.announce, a low-volume moderated newsgroup
for Python-related announcements.  These are also accessible as
mailing lists: see http://www.python.org/community/lists/ for an
overview of these and many other Python-related mailing lists.

Archives are accessible via the Google Groups Usenet archive; see
http://groups.google.com/.  The mailing lists are also archived, see
http://www.python.org/community/lists/ for details.


Bug reports
-----------

To report or search for bugs, please use the Python Bug
Tracker at http://bugs.python.org/.


Patches and contributions
-------------------------

To submit a patch or other contribution, please use the Python Patch
Manager at http://bugs.python.org/.  Guidelines
for patch submission may be found at http://www.python.org/dev/patches/.

If you have a proposal to change Python, you may want to send an email to the
comp.lang.python or python-ideas mailing lists for inital feedback. A Python
Enhancement Proposal (PEP) may be submitted if your idea gains ground. All
current PEPs, as well as guidelines for submitting a new PEP, are listed at
http://www.python.org/dev/peps/.


Questions
---------

For help, if you can't find it in the manuals or on the web site, it's
best to post to the comp.lang.python or the Python mailing list (see
above).  If you specifically don't want to involve the newsgroup or
mailing list, send questions to help@python.org (a group of volunteers
who answer questions as they can).  The newsgroup is the most
efficient way to ask public questions.


Build instructions
==================

Before you can build Python, you must first configure it.
Fortunately, the configuration and build process has been automated
for Unix and Linux installations, so all you usually have to do is
type a few commands and sit back.  There are some platforms where
things are not quite as smooth; see the platform specific notes below.
If you want to build for multiple platforms sharing the same source
tree, see the section on VPATH below.

Start by running the script "./configure", which determines your
system configuration and creates the Makefile.  (It takes a minute or
two -- please be patient!)  You may want to pass options to the
configure script -- see the section below on configuration options and
variables.  When it's done, you are ready to run make.

To build Python, you normally type "make" in the toplevel directory.
If you have changed the configuration, the Makefile may have to be
rebuilt.  In this case, you may have to run make again to correctly
build your desired target.  The interpreter executable is built in the
top level directory.

To get an optimized build of Python, "configure --enable-optimizations" before
you run make.  This sets the default make targets up to enable Profile Guided
Optimization (PGO) and may be used to auto-enable Link Time Optimization (LTO)
on some platforms.  For more details, see the sections bellow.

Once you have built a Python interpreter, see the subsections below on
testing and installation.  If you run into trouble, see the next
section.

Previous versions of Python used a manual configuration process that
involved editing the file Modules/Setup.  While this file still exists
and manual configuration is still supported, it is rarely needed any
more: almost all modules are automatically built as appropriate under
guidance of the setup.py script, which is run by Make after the
interpreter has been built.


Profile Guided Optimization
---------------------------

PGO takes advantage of recent versions of the GCC or Clang compilers.
If ran, "make profile-opt" will do several steps.

First, the entire Python directory is cleaned of temporary files that
may have resulted in a previous compilation.

Then, an instrumented version of the interpreter is built, using suitable
compiler flags for each flavour. Note that this is just an intermediary
step and the binary resulted after this step is not good for real life
workloads, as it has profiling instructions embedded inside.

After this instrumented version of the interpreter is built, the Makefile
will automatically run a training workload. This is necessary in order to
profile the interpreter execution. Note also that any output, both stdout
and stderr, that may appear at this step is suppressed.

Finally, the last step is to rebuild the interpreter, using the information
collected in the previous one. The end result will be a Python binary
that is optimized and suitable for distribution or production installation.


Link Time Optimization
----------------------

Enabled via configure's --with-lto flag.  LTO takes advantages of recent
compiler toolchains ability to optimize across the otherwise arbitrary .o file
boundary when building final executables or shared libraries for additional
performance gains.


Troubleshooting
---------------

See also the platform specific notes in the next section.

If you run into other trouble, see the FAQ
(http://www.python.org/doc/faq/) for hints on what can go wrong, and
how to fix it.

If you rerun the configure script with different options, remove all
object files by running "make clean" before rebuilding.  Believe it or
not, "make clean" sometimes helps to clean up other inexplicable
problems as well.  Try it before sending in a bug report!

If the configure script fails or doesn't seem to find things that
should be there, inspect the config.log file.

If you get a warning for every file about the -Olimit option being no
longer supported, you can ignore it.  There's no foolproof way to know
whether this option is needed; all we can do is test whether it is
accepted without error.  On some systems, e.g. older SGI compilers, it
is essential for performance (specifically when compiling ceval.c,
which has more basic blocks than the default limit of 1000).  If the
warning bothers you, edit the Makefile to remove "-Olimit 1500" from
the OPT variable.

If you get failures in test_long, or sys.maxint gets set to -1, you
are probably experiencing compiler bugs, usually related to
optimization.  This is a common problem with some versions of gcc, and
some vendor-supplied compilers, which can sometimes be worked around
by turning off optimization.  Consider switching to stable versions
(gcc 2.95.2, gcc 3.x, or contact your vendor.)

From Python 2.0 onward, all Python C code is ANSI C.  Compiling using
old K&R-C-only compilers is no longer possible.  ANSI C compilers are
available for all modern systems, either in the form of updated
compilers from the vendor, or one of the free compilers (gcc).

If "make install" fails mysteriously during the "compiling the library"
step, make sure that you don't have any of the PYTHONPATH or PYTHONHOME
environment variables set, as they may interfere with the newly built
executable which is compiling the library.

Unsupported systems
-------------------

A number of systems are not supported in Python 2.7 anymore. Some
support code is still present, but will be removed in later versions.
If you still need to use current Python versions on these systems,
please send a message to python-dev@python.org indicating that you
volunteer to support this system. For a more detailed discussion 
regarding no-longer-supported and resupporting platforms, as well
as a list of platforms that became or will be unsupported, see PEP 11.

More specifically, the following systems are not supported any
longer:
- SunOS 4
- DYNIX
- dgux
- Minix
- NeXT
- Irix 4 and --with-sgi-dl
- Linux 1
- Systems defining __d6_pthread_create (configure.ac)
- Systems defining PY_PTHREAD_D4, PY_PTHREAD_D6,
  or PY_PTHREAD_D7 in thread_pthread.h
- Systems using --with-dl-dld
- Systems using --without-universal-newlines
- MacOS 9
- Systems using --with-wctype-functions
- Win9x, WinME


Platform specific notes
-----------------------

(Some of these may no longer apply.  If you find you can build Python
on these platforms without the special directions mentioned here,
submit a documentation bug report to SourceForge (see Bug Reports
above) so we can remove them!)

Unix platforms: If your vendor still ships (and you still use) Berkeley DB
        1.85 you will need to edit Modules/Setup to build the bsddb185
        module and add a line to sitecustomize.py which makes it the
        default.  In Modules/Setup a line like

            bsddb185 bsddbmodule.c

        should work.  (You may need to add -I, -L or -l flags to direct the
        compiler and linker to your include files and libraries.)

XXX I think this next bit is out of date:

64-bit platforms: The modules audioop, and imageop don't work.
        The setup.py script disables them on 64-bit installations.
        Don't try to enable them in the Modules/Setup file.  They
        contain code that is quite wordsize sensitive.  (If you have a
        fix, let us know!)

Solaris: When using Sun's C compiler with threads, at least on Solaris
        2.5.1, you need to add the "-mt" compiler option (the simplest
        way is probably to specify the compiler with this option as
        the "CC" environment variable when running the configure
        script).

        When using GCC on Solaris, beware of binutils 2.13 or GCC
        versions built using it.  This mistakenly enables the
        -zcombreloc option which creates broken shared libraries on
        Solaris.  binutils 2.12 works, and the binutils maintainers
        are aware of the problem.  Binutils 2.13.1 only partially
        fixed things.  It appears that 2.13.2 solves the problem
        completely.  This problem is known to occur with Solaris 2.7
        and 2.8, but may also affect earlier and later versions of the
        OS.

        When the dynamic loader complains about errors finding shared
        libraries, such as

        ld.so.1: ./python: fatal: libstdc++.so.5: open failed:
        No such file or directory

        you need to first make sure that the library is available on
        your system. Then, you need to instruct the dynamic loader how
        to find it. You can choose any of the following strategies:

        1. When compiling Python, set LD_RUN_PATH to the directories
           containing missing libraries.
        2. When running Python, set LD_LIBRARY_PATH to these directories.
        3. Use crle(8) to extend the search path of the loader.
        4. Modify the installed GCC specs file, adding -R options into the
           *link: section.

        The complex object fails to compile on Solaris 10 with gcc 3.4 (at
        least up to 3.4.3).  To work around it, define Py_HUGE_VAL as
        HUGE_VAL(), e.g.:

          make CPPFLAGS='-D"Py_HUGE_VAL=HUGE_VAL()" -I. -I$(srcdir)/Include'
          ./python setup.py CPPFLAGS='-D"Py_HUGE_VAL=HUGE_VAL()"'

Linux:  A problem with threads and fork() was tracked down to a bug in
        the pthreads code in glibc version 2.0.5; glibc version 2.0.7
        solves the problem.  This causes the popen2 test to fail;
        problem and solution reported by Pablo Bleyer.

Red Hat Linux: Red Hat 9 built Python2.2 in UCS-4 mode and hacked
        Tcl to support it. To compile Python2.3 with Tkinter, you will
        need to pass --enable-unicode=ucs4 flag to ./configure.

        There's an executable /usr/bin/python which is Python
        1.5.2 on most older Red Hat installations; several key Red Hat tools
        require this version.  Python 2.1.x may be installed as
        /usr/bin/python2.  The Makefile installs Python as
        /usr/local/bin/python, which may or may not take precedence
        over /usr/bin/python, depending on how you have set up $PATH.

FreeBSD 3.x and probably platforms with NCurses that use libmytinfo or
        similar: When using cursesmodule, the linking is not done in
        the correct order with the defaults.  Remove "-ltermcap" from
        the readline entry in Setup, and use as curses entry: "curses
        cursesmodule.c -lmytinfo -lncurses -ltermcap" - "mytinfo" (so
        called on FreeBSD) should be the name of the auxiliary library
        required on your platform.  Normally, it would be linked
        automatically, but not necessarily in the correct order.

BSDI:   BSDI versions before 4.1 have known problems with threads,
        which can cause strange errors in a number of modules (for
        instance, the 'test_signal' test script will hang forever.)
        Turning off threads (with --with-threads=no) or upgrading to
        BSDI 4.1 solves this problem.

DEC Unix: Run configure with --with-dec-threads, or with
        --with-threads=no if no threads are desired (threads are on by
        default).  When using GCC, it is possible to get an internal
        compiler error if optimization is used.  This was reported for
        GCC 2.7.2.3 on selectmodule.c.  Manually compile the affected
        file without optimization to solve the problem.

DEC Ultrix: compile with GCC to avoid bugs in the native compiler,
        and pass SHELL=/bin/sh5 to Make when installing.

AIX:    A complete overhaul of the shared library support is now in
        place.  See Misc/AIX-NOTES for some notes on how it's done.
        (The optimizer bug reported at this place in previous releases
        has been worked around by a minimal code change.) If you get
        errors about pthread_* functions, during compile or during
        testing, try setting CC to a thread-safe (reentrant) compiler,
        like "cc_r".  For full C++ module support, set CC="xlC_r" (or
        CC="xlC" without thread support).

AIX 5.3: To build a 64-bit version with IBM's compiler, I used the
        following:

        export PATH=/usr/bin:/usr/vacpp/bin
        ./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" \
                    --disable-ipv6 AR="ar -X64"
        make

HP-UX:  When using threading, you may have to add -D_REENTRANT to the
        OPT variable in the top-level Makefile; reported by Pat Knight,
        this seems to make a difference (at least for HP-UX 10.20)
        even though pyconfig.h defines it. This seems unnecessary when
        using HP/UX 11 and later - threading seems to work "out of the
        box".

HP-UX ia64: When building on the ia64 (Itanium) platform using HP's
        compiler, some experience has shown that the compiler's
        optimiser produces a completely broken version of python
        (see http://bugs.python.org/814976). To work around this,
        edit the Makefile and remove -O from the OPT line.

        To build a 64-bit executable on an Itanium 2 system using HP's
        compiler, use these environment variables:

                CC=cc
                CXX=aCC
                BASECFLAGS="+DD64"
                LDFLAGS="+DD64 -lxnet"

        and call configure as:

                ./configure --without-gcc

        then *unset* the environment variables again before running
        make.  (At least one of these flags causes the build to fail
        if it remains set.)  You still have to edit the Makefile and
        remove -O from the OPT line.

HP PA-RISC 2.0: A recent bug report (http://bugs.python.org/546117)
        suggests that the C compiler in this 64-bit system has bugs
        in the optimizer that break Python.  Compiling without
        optimization solves the problems.

SCO:    The following apply to SCO 3 only; Python builds out of the box
        on SCO 5 (or so we've heard).

        1) Everything works much better if you add -U__STDC__ to the
        defs.  This is because all the SCO header files are broken.
        Anything that isn't mentioned in the C standard is
        conditionally excluded when __STDC__ is defined.

        2) Due to the U.S. export restrictions, SCO broke the crypt
        stuff out into a separate library, libcrypt_i.a so the LIBS
        needed be set to:

                LIBS=' -lsocket -lcrypt_i'

UnixWare: There are known bugs in the math library of the system, as well as
        problems in the handling of threads (calling fork in one
        thread may interrupt system calls in others). Therefore, test_math and
        tests involving threads will fail until those problems are fixed.

QNX:    Chris Herborth (chrish@qnx.com) writes:
        configure works best if you use GNU bash; a port is available on
        ftp.qnx.com in /usr/free.  I used the following process to build,
        test and install Python 1.5.x under QNX:

        1) CONFIG_SHELL=/usr/local/bin/bash CC=cc RANLIB=: \
            ./configure --verbose --without-gcc --with-libm=""

        2) edit Modules/Setup to activate everything that makes sense for
           your system... tested here at QNX with the following modules:

                array, audioop, binascii, cPickle, cStringIO, cmath,
                crypt, curses, errno, fcntl, gdbm, grp, imageop,
                _locale, math, md5, new, operator, parser, pcre,
                posix, pwd, readline, regex, reop,
                select, signal, socket, soundex, strop, struct,
                syslog, termios, time, timing, zlib, audioop, imageop

        3) make SHELL=/usr/local/bin/bash

           or, if you feel the need for speed:

           make SHELL=/usr/local/bin/bash OPT="-5 -Oil+nrt"

        4) make SHELL=/usr/local/bin/bash test

           Using GNU readline 2.2 seems to behave strangely, but I
           think that's a problem with my readline 2.2 port.  :-\

        5) make SHELL=/usr/local/bin/bash install

        If you get SIGSEGVs while running Python (I haven't yet, but
        I've only run small programs and the test cases), you're
        probably running out of stack; the default 32k could be a
        little tight.  To increase the stack size, edit the Makefile
        to read: LDFLAGS = -N 48k

BeOS:   See Misc/BeOS-NOTES for notes about compiling/installing
        Python on BeOS R3 or later.  Note that only the PowerPC
        platform is supported for R3; both PowerPC and x86 are
        supported for R4.

Cray T3E: Mark Hadfield (m.hadfield@niwa.co.nz) writes:
        Python can be built satisfactorily on a Cray T3E but based on
        my experience with the NIWA T3E (2002-05-22, version 2.2.1)
        there are a few bugs and gotchas. For more information see a
        thread on comp.lang.python in May 2002 entitled "Building
        Python on Cray T3E".

        1) Use Cray's cc and not gcc. The latter was reported not to
           work by Konrad Hinsen. It may work now, but it may not.

        2) To set sys.platform to something sensible, pass the
           following environment variable to the configure script:

             MACHDEP=unicosmk

        2) Run configure with option "--enable-unicode=ucs4".

        3) The Cray T3E does not support dynamic linking, so extension
           modules have to be built by adding (or uncommenting) lines
           in Modules/Setup. The minimum set of modules is

             posix, new, _sre, unicodedata

           On NIWA's vanilla T3E system the following have also been
           included successfully:

             _codecs, _locale, _socket, _symtable, _testcapi, _weakref
             array, binascii, cmath, cPickle, crypt, cStringIO, dbm
             errno, fcntl, grp, math, md5, operator, parser, pcre, pwd
             regex, rotor, select, struct, strop, syslog, termios
             time, timing, xreadlines

        4) Once the python executable and library have been built, make
           will execute setup.py, which will attempt to build remaining
           extensions and link them dynamically. Each of these attempts
           will fail but should not halt the make process. This is
           normal.

        5) Running "make test" uses a lot of resources and causes
           problems on our system. You might want to try running tests
           singly or in small groups.

SGI:    SGI's standard "make" utility (/bin/make or /usr/bin/make)
        does not check whether a command actually changed the file it
        is supposed to build.  This means that whenever you say "make"
        it will redo the link step.  The remedy is to use SGI's much
        smarter "smake" utility (/usr/sbin/smake), or GNU make.  If
        you set the first line of the Makefile to #!/usr/sbin/smake
        smake will be invoked by make (likewise for GNU make).

        WARNING: There are bugs in the optimizer of some versions of
        SGI's compilers that can cause bus errors or other strange
        behavior, especially on numerical operations.  To avoid this,
        try building with "make OPT=".

OS/2:   If you are running Warp3 or Warp4 and have IBM's VisualAge C/C++
        compiler installed, just change into the pc\os2vacpp directory
        and type NMAKE.  Threading and sockets are supported by default
        in the resulting binaries of PYTHON15.DLL and PYTHON.EXE.

Reliant UNIX: The thread support does not compile on Reliant UNIX, and
        there is a (minor) problem in the configure script for that
        platform as well.  This should be resolved in time for a
        future release.

macOS:  Building a complete Python installation requires the use of various
        additional third-party libraries, depending on your build platform and
        configure options.  Not all standard library modules are buildable or
        useable on all platforms.  Refer to the "Install Dependencies" section
        section of the "Developer Guide" for current detailed information on
        dependencies for macOS:
            https://devguide.python.org/setup/#install-dependencies

        On macOS, there are additional configure and build options related
        to macOS framework and universal builds.  Refer to Mac/README.rst.

        The tests will crash on both 10.1 and 10.2 with SEGV in
        test_re and test_sre due to the small default stack size.  If
        you set the stack size to 2048 before doing a "make test" the
        failure can be avoided.  If you're using the tcsh or csh shells,
        use "limit stacksize 2048" and for the bash shell (the default
        as of macOS 10.3), use "ulimit -s 2048".

        On naked Darwin you may want to add the configure option
        "--disable-toolbox-glue" to disable the glue code for the Carbon
        interface modules. The modules themselves are currently only built
        if you add the --enable-framework option, see below.

        On a clean macOS /usr/local does not exist. Do a
        "sudo mkdir -m 775 /usr/local"
        before you do a make install. It is probably not a good idea to
        do "sudo make install" which installs everything as superuser,
        as this may later cause problems when installing distutils-based
        additions.

        Some people have reported problems building Python after using "fink"
        to install additional unix software. Disabling fink (remove all 
        references to /sw from your .profile or .login) should solve this.

Cygwin: With recent (relative to the time of writing, 2001-12-19)
        Cygwin installations, there are problems with the interaction
        of dynamic linking and fork().  This manifests itself in build
        failures during the execution of setup.py.

        There are two workarounds that both enable Python (albeit
        without threading support) to build and pass all tests on
        NT/2000 (and most likely XP as well, though reports of testing
        on XP would be appreciated).

        The workarounds:

        (a) the band-aid fix is to link the _socket module statically
        rather than dynamically (which is the default).

        To do this, run "./configure --with-threads=no" including any
        other options you need (--prefix, etc.).  Then in Modules/Setup
        uncomment the lines:

        #SSL=/usr/local/ssl
        #_socket socketmodule.c \
        #       -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
        #       -L$(SSL)/lib -lssl -lcrypto

        and remove "local/" from the SSL variable.  Finally, just run
        "make"!

        (b) The "proper" fix is to rebase the Cygwin DLLs to prevent
        base address conflicts.  Details on how to do this can be
        found in the following mail:

           http://sources.redhat.com/ml/cygwin/2001-12/msg00894.html

        It is hoped that a version of this solution will be
        incorporated into the Cygwin distribution fairly soon.

        Two additional problems:

        (1) Threading support should still be disabled due to a known
        bug in Cygwin pthreads that causes test_threadedtempfile to
        hang.

        (2) The _curses module does not build.  This is a known
        Cygwin ncurses problem that should be resolved the next time
        that this package is released.

        On older versions of Cygwin, test_poll may hang and test_strftime
        may fail.

        The situation on 9X/Me is not accurately known at present.
        Some time ago, there were reports that the following
        regression tests failed:

            test_pwd
            test_select (hang)
            test_socket

        Due to the test_select hang on 9X/Me, one should run the
        regression test using the following:

            make TESTOPTS='-l -x test_select' test

        News regarding these platforms with more recent Cygwin
        versions would be appreciated!

Windows: When executing Python scripts on the command line using file type
        associations (i.e. starting "script.py" instead of "python script.py"),
        redirects may not work unless you set a specific registry key.  See
        the Knowledge Base article <http://support.microsoft.com/kb/321788>.


Configuring the bsddb and dbm modules
-------------------------------------

Beginning with Python version 2.3, the PyBsddb package
<http://pybsddb.sf.net/> was adopted into Python as the bsddb package,
exposing a set of package-level functions which provide
backwards-compatible behavior.  Only versions 3.3 through 4.4 of
Sleepycat's libraries provide the necessary API, so older versions
aren't supported through this interface.  The old bsddb module has
been retained as bsddb185, though it is not built by default.  Users
wishing to use it will have to tweak Modules/Setup to build it.  The
dbm module will still be built against the Sleepycat libraries if
other preferred alternatives (ndbm, gdbm) are not found.

Building the sqlite3 module
---------------------------

To build the sqlite3 module, you'll need the sqlite3 or libsqlite3
packages installed, including the header files. Many modern operating
systems distribute the headers in a separate package to the library -
often it will be the same name as the main package, but with a -dev or
-devel suffix. 

The version of pysqlite2 that's including in Python needs sqlite3 3.0.8
or later. setup.py attempts to check that it can find a correct version.

Configuring threads
-------------------

As of Python 2.0, threads are enabled by default.  If you wish to
compile without threads, or if your thread support is broken, pass the
--with-threads=no switch to configure.  Unfortunately, on some
platforms, additional compiler and/or linker options are required for
threads to work properly.  Below is a table of those options,
collected by Bill Janssen.  We would love to automate this process
more, but the information below is not enough to write a patch for the
configure.ac file, so manual intervention is required.  If you patch
the configure.ac file and are confident that the patch works, please
send in the patch.  (Don't bother patching the configure script itself
-- it is regenerated each time the configure.ac file changes.)

Compiler switches for threads
.............................

The definition of _REENTRANT should be configured automatically, if
that does not work on your system, or if _REENTRANT is defined
incorrectly, please report that as a bug.

    OS/Compiler/threads                     Switches for use with threads
    (POSIX is draft 10, DCE is draft 4)     compile & link

    SunOS 5.{1-5}/{gcc,SunPro cc}/solaris   -mt
    SunOS 5.5/{gcc,SunPro cc}/POSIX         (nothing)
    DEC OSF/1 3.x/cc/DCE                    -threads
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/cc/DCE                 -threads
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/cc/POSIX               -pthread
            (butenhof@zko.dec.com)
    AIX 4.1.4/cc_r/d7                       (nothing)
            (buhrt@iquest.net)
    AIX 4.1.4/cc_r4/DCE                     (nothing)
            (buhrt@iquest.net)
    IRIX 6.2/cc/POSIX                       (nothing)
            (robertl@cwi.nl)


Linker (ld) libraries and flags for threads
...........................................

    OS/threads                          Libraries/switches for use with threads

    SunOS 5.{1-5}/solaris               -lthread
    SunOS 5.5/POSIX                     -lpthread
    DEC OSF/1 3.x/DCE                   -lpthreads -lmach -lc_r -lc
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/DCE                -lpthreads -lpthread -lmach -lexc -lc
            (butenhof@zko.dec.com)
    Digital UNIX 4.x/POSIX              -lpthread -lmach -lexc -lc
            (butenhof@zko.dec.com)
    AIX 4.1.4/{draft7,DCE}              (nothing)
            (buhrt@iquest.net)
    IRIX 6.2/POSIX                      -lpthread
            (jph@emilia.engr.sgi.com)


Building a shared libpython
---------------------------

Starting with Python 2.3, the majority of the interpreter can be built
into a shared library, which can then be used by the interpreter
executable, and by applications embedding Python. To enable this feature,
configure with --enable-shared.

If you enable this feature, the same object files will be used to create
a static library.  In particular, the static library will contain object
files using position-independent code (PIC) on platforms where PIC flags
are needed for the shared library.


Configuring additional built-in modules
---------------------------------------

Starting with Python 2.1, the setup.py script at the top of the source
distribution attempts to detect which modules can be built and
automatically compiles them.  Autodetection doesn't always work, so
you can still customize the configuration by editing the Modules/Setup
file; but this should be considered a last resort.  The rest of this
section only applies if you decide to edit the Modules/Setup file.
You also need this to enable static linking of certain modules (which
is needed to enable profiling on some systems).

This file is initially copied from Setup.dist by the configure script;
if it does not exist yet, create it by copying Modules/Setup.dist
yourself (configure will never overwrite it).  Never edit Setup.dist
-- always edit Setup or Setup.local (see below).  Read the comments in
the file for information on what kind of edits are allowed.  When you
have edited Setup in the Modules directory, the interpreter will
automatically be rebuilt the next time you run make (in the toplevel
directory).

Many useful modules can be built on any Unix system, but some optional
modules can't be reliably autodetected.  Often the quickest way to
determine whether a particular module works or not is to see if it
will build: enable it in Setup, then if you get compilation or link
errors, disable it -- you're either missing support or need to adjust
the compilation and linking parameters for that module.

On SGI IRIX, there are modules that interface to many SGI specific
system libraries, e.g. the GL library and the audio hardware.  These
modules will not be built by the setup.py script.

In addition to the file Setup, you can also edit the file Setup.local.
(the makesetup script processes both).  You may find it more
convenient to edit Setup.local and leave Setup alone.  Then, when
installing a new Python version, you can copy your old Setup.local
file.


Setting the optimization/debugging options
------------------------------------------

If you want or need to change the optimization/debugging options for
the C compiler, assign to the OPT variable on the toplevel make
command; e.g. "make OPT=-g" will build a debugging version of Python
on most platforms.  The default is OPT=-O; a value for OPT in the
environment when the configure script is run overrides this default
(likewise for CC; and the initial value for LIBS is used as the base
set of libraries to link with).

When compiling with GCC, the default value of OPT will also include
the -Wall and -Wstrict-prototypes options.

Additional debugging code to help debug memory management problems can
be enabled by using the --with-pydebug option to the configure script.

For flags that change binary compatibility, use the EXTRA_CFLAGS
variable.


Profiling
---------

If you want C profiling turned on, the easiest way is to run configure
with the CC environment variable to the necessary compiler
invocation.  For example, on Linux, this works for profiling using
gprof(1):

    CC="gcc -pg" ./configure

Note that on Linux, gprof apparently does not work for shared
libraries.  The Makefile/Setup mechanism can be used to compile and
link most extension modules statically.


Coverage checking
-----------------

For C coverage checking using gcov, run "make coverage".  This will
build a Python binary with profiling activated, and a ".gcno" and
".gcda" file for every source file compiled with that option.  With
the built binary, now run the code whose coverage you want to check.
Then, you can see coverage statistics for each individual source file
by running gcov, e.g.

    gcov -o Modules zlibmodule

This will create a "zlibmodule.c.gcov" file in the current directory
containing coverage info for that source file.

This works only for source files statically compiled into the
executable; use the Makefile/Setup mechanism to compile and link
extension modules you want to coverage-check statically.


Testing
-------

To test the interpreter, type "make test" in the top-level directory.
This runs the test set twice (once with no compiled files, once with
the compiled files left by the previous test run).  The test set
produces some output.  You can generally ignore the messages about
skipped tests due to optional features which can't be imported.
If a message is printed about a failed test or a traceback or core
dump is produced, something is wrong.  On some Linux systems (those
that are not yet using glibc 6), test_strftime fails due to a
non-standard implementation of strftime() in the C library. Please
ignore this, or upgrade to glibc version 6.

By default, tests are prevented from overusing resources like disk space and
memory.  To enable these tests, run "make testall".

IMPORTANT: If the tests fail and you decide to mail a bug report,
*don't* include the output of "make test".  It is useless.  Run the
failing test manually, as follows:

        ./python Lib/test/regrtest.py -v test_whatever

(substituting the top of the source tree for '.' if you built in a
different directory).  This runs the test in verbose mode.


Installing
----------

To install the Python binary, library modules, shared library modules
(see below), include files, configuration files, and the manual page,
just type

        make install

This will install all platform-independent files in subdirectories of
the directory given with the --prefix option to configure or to the
`prefix' Make variable (default /usr/local).  All binary and other
platform-specific files will be installed in subdirectories if the
directory given by --exec-prefix or the `exec_prefix' Make variable
(defaults to the --prefix directory) is given.

If DESTDIR is set, it will be taken as the root directory of the
installation, and files will be installed into $(DESTDIR)$(prefix),
$(DESTDIR)$(exec_prefix), etc.

All subdirectories created will have Python's version number in their
name, e.g. the library modules are installed in
"/usr/local/lib/python<version>/" by default, where <version> is the
<major>.<minor> release number (e.g. "2.1").  The Python binary is
installed as "python<version>" and a hard link named "python" is
created.  The only file not installed with a version number in its
name is the manual page, installed as "/usr/local/man/man1/python.1"
by default.

If you want to install multiple versions of Python see the section below
entitled "Installing multiple versions".

The only thing you may have to install manually is the Python mode for
Emacs found in Misc/python-mode.el.  (But then again, more recent
versions of Emacs may already have it.)  Follow the instructions that
came with Emacs for installation of site-specific files.


Installing multiple versions
----------------------------

On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument to the configure
script) you must take care that your primary python executable is not
overwritten by the installation of a different version.  All files and
directories installed using "make altinstall" contain the major and minor
version and can thus live side-by-side.  "make install" also creates
${prefix}/bin/python which refers to ${prefix}/bin/pythonX.Y.  If you intend
to install multiple versions using the same prefix you must decide which
version (if any) is your "primary" version.  Install that version using
"make install".  Install all other versions using "make altinstall".

For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being
the primary version, you would execute "make install" in your 2.6 build
directory and "make altinstall" in the others.


Configuration options and variables
-----------------------------------

Some special cases are handled by passing options to the configure
script.

WARNING: if you rerun the configure script with different options, you
must run "make clean" before rebuilding.  Exceptions to this rule:
after changing --prefix or --exec-prefix, all you need to do is remove
Modules/getpath.o.

--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
        it finds it.  If you don't want this, or if this compiler is
        installed but broken on your platform, pass the option
        --without-gcc.  You can also pass "CC=cc" (or whatever the
        name of the proper C compiler is) in the environment, but the
        advantage of using --without-gcc is that this option is
        remembered by the config.status script for its --recheck
        option.

--prefix, --exec-prefix: If you want to install the binaries and the
        Python library somewhere else than in /usr/local/{bin,lib},
        you can pass the option --prefix=DIRECTORY; the interpreter
        binary will be installed as DIRECTORY/bin/python and the
        library files as DIRECTORY/lib/python/*.  If you pass
        --exec-prefix=DIRECTORY (as well) this overrides the
        installation prefix for architecture-dependent files (like the
        interpreter binary).  Note that --prefix=DIRECTORY also
        affects the default module search path (sys.path), when
        Modules/config.c is compiled.  Passing make the option
        prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
        prefix set at configuration time; this may be more convenient
        than re-running the configure script if you change your mind
        about the install prefix.

--with-readline: This option is no longer supported.  GNU
        readline is automatically enabled by setup.py when present.

--with-threads: On most Unix systems, you can now use multiple
        threads, and support for this is enabled by default.  To
        disable this, pass --with-threads=no.  If the library required
        for threads lives in a peculiar place, you can use
        --with-thread=DIRECTORY.  IMPORTANT: run "make clean" after
        changing (either enabling or disabling) this option, or you
        will get link errors!  Note: for DEC Unix use
        --with-dec-threads instead.

--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
        supported by the "dl" library by Jack Jansen, which is
        ftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
        This is enabled (after you've ftp'ed and compiled the dl
        library) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
        is the absolute pathname of the dl library.  (Don't bother on
        IRIX 5, it already has dynamic linking using SunOS style
        shared libraries.)  THIS OPTION IS UNSUPPORTED.

--with-dl-dld: Dynamic loading of modules is rumored to be supported
        on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
        Symmetry (Dynix), and Atari ST.  This is done using a
        combination of the GNU dynamic loading package
        (ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an
        emulation of the SGI dl library mentioned above (the emulation
        can be found at
        ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z).  To
        enable this, ftp and compile both libraries, then call
        configure, passing it the option
        --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
        the absolute pathname of the dl emulation library and
        DLD_DIRECTORY is the absolute pathname of the GNU dld library.
        (Don't bother on SunOS 4 or 5, they already have dynamic
        linking using shared libraries.)  THIS OPTION IS UNSUPPORTED.

--with-libm, --with-libc: It is possible to specify alternative
        versions for the Math library (default -lm) and the C library
        (default the empty string) using the options
        --with-libm=STRING and --with-libc=STRING, respectively.  For
        example, if your system requires that you pass -lc_s to the C
        compiler to use the shared C library, you can pass
        --with-libc=-lc_s. These libraries are passed after all other
        libraries, the C library last.

--with-libs='libs': Add 'libs' to the LIBS that the python interpreter
        is linked against.

--with-cxx-main=<compiler>: If you plan to use C++ extension modules,
        then -- on some platforms -- you need to compile python's main()
        function with the C++ compiler. With this option, make will use
        <compiler> to compile main() *and* to link the python executable.
        It is likely that the resulting executable depends on the C++
        runtime library of <compiler>. (The default is --without-cxx-main.)

        There are platforms that do not require you to build Python
        with a C++ compiler in order to use C++ extension modules.
        E.g., x86 Linux with ELF shared binaries and GCC 3.x, 4.x is such
        a platform. We recommend that you configure Python
        --without-cxx-main on those platforms because a mismatch
        between the C++ compiler version used to build Python and to
        build a C++ extension module is likely to cause a crash at
        runtime.

        The Python installation also stores the variable CXX that
        determines, e.g., the C++ compiler distutils calls by default
        to build C++ extensions. If you set CXX on the configure command
        line to any string of non-zero length, then configure won't
        change CXX. If you do not preset CXX but pass
        --with-cxx-main=<compiler>, then configure sets CXX=<compiler>.
        In all other cases, configure looks for a C++ compiler by
        some common names (c++, g++, gcc, CC, cxx, cc++, cl) and sets
        CXX to the first compiler it finds. If it does not find any
        C++ compiler, then it sets CXX="".

        Similarly, if you want to change the command used to link the
        python executable, then set LINKCC on the configure command line.


--with-pydebug:  Enable additional debugging code to help track down
        memory management problems.  This allows printing a list of all
        live objects when the interpreter terminates.

--with(out)-universal-newlines: enable reading of text files with
        foreign newline convention (default: enabled). In other words,
        any of \r, \n or \r\n is acceptable as end-of-line character.
        If enabled import and execfile will automatically accept any newline
        in files. Python code can open a file with open(file, 'U') to
        read it in universal newline mode. THIS OPTION IS UNSUPPORTED.

--with-tsc: Profile using the Pentium timestamping counter (TSC).

--with-system-ffi:  Build the _ctypes extension module using an ffi
        library installed on the system.

--with-dbmliborder=db1:db2:...:  Specify the order that backends for the
	dbm extension are checked. Valid value is a colon separated string
	with the backend names `ndbm', `gdbm' and `bdb'.

Building for multiple architectures (using the VPATH feature)
-------------------------------------------------------------

If your file system is shared between multiple architectures, it
usually is not necessary to make copies of the sources for each
architecture you want to support.  If the make program supports the
VPATH feature, you can create an empty build directory for each
architecture, and in each directory run the configure script (on the
appropriate machine with the appropriate options).  This creates the
necessary subdirectories and the Makefiles therein.  The Makefiles
contain a line VPATH=... which points to a directory containing the
actual sources.  (On SGI systems, use "smake -J1" instead of "make" if
you use VPATH -- don't try gnumake.)

For example, the following is all you need to build a minimal Python
in /usr/tmp/python (assuming ~guido/src/python is the toplevel
directory and you want to build in /usr/tmp/python):

        $ mkdir /usr/tmp/python
        $ cd /usr/tmp/python
        $ ~guido/src/python/configure
        [...]
        $ make
        [...]
        $

Note that configure copies the original Setup file to the build
directory if it finds no Setup file there.  This means that you can
edit the Setup file for each architecture independently.  For this
reason, subsequent changes to the original Setup file are not tracked
automatically, as they might overwrite local changes.  To force a copy
of a changed original Setup file, delete the target Setup file.  (The
makesetup script supports multiple input files, so if you want to be
fancy you can change the rules to create an empty Setup.local if it
doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
however this assumes that you only need to add modules.)

Also note that you can't use a workspace for VPATH and non VPATH builds. The
object files left behind by one version confuses the other.


Building on non-UNIX systems
----------------------------

For Windows (2000/NT/ME/98/95), assuming you have MS VC++ 7.1, the
project files are in PCbuild, the workspace is pcbuild.dsw.  See
PCbuild\readme.txt for detailed instructions.

For other non-Unix Windows compilers, in particular MS VC++ 6.0 and
for OS/2, enter the directory "PC" and read the file "readme.txt".

For the Mac, a separate source distribution will be made available,
for use with the CodeWarrior compiler.  If you are interested in Mac
development, join the PythonMac Special Interest Group
(http://www.python.org/sigs/pythonmac-sig/, or send email to
pythonmac-sig-request@python.org).

Of course, there are also binary distributions available for these
platforms -- see http://www.python.org/.

To port Python to a new non-UNIX system, you will have to fake the
effect of running the configure script manually (for Mac and PC, this
has already been done for you).  A good start is to copy the file
pyconfig.h.in to pyconfig.h and edit the latter to reflect the actual
configuration of your system.  Most symbols must simply be defined as
1 only if the corresponding feature is present and can be left alone
otherwise; however the *_t type symbols must be defined as some
variant of int if they need to be defined at all.

For all platforms, it's important that the build arrange to define the
preprocessor symbol NDEBUG on the compiler command line in a release
build of Python (else assert() calls remain in the code, hurting
release-build performance).  The Unix, Windows and Mac builds already
do this.


Miscellaneous issues
====================

Emacs mode
----------

There's an excellent Emacs editing mode for Python code; see the file
Misc/python-mode.el.  Originally written by the famous Tim Peters, it is now
maintained by the equally famous Barry Warsaw.  The latest version, along with
various other contributed Python-related Emacs goodies, is online at
http://launchpad.net/python-mode/.


Tkinter
-------

The setup.py script automatically configures this when it detects a
usable Tcl/Tk installation.  This requires Tcl/Tk version 8.0 or
higher.

For more Tkinter information, see the Tkinter Resource page:
http://www.python.org/topics/tkinter/

There are demos in the Demo/tkinter directory.

Note that there's a Python module called "Tkinter" (capital T) which
lives in Lib/lib-tk/Tkinter.py, and a C module called "_tkinter"
(lower case t and leading underscore) which lives in
Modules/_tkinter.c.  Demos and normal Tk applications import only the
Python Tkinter module -- only the latter imports the C _tkinter
module.  In order to find the C _tkinter module, it must be compiled
and linked into the Python interpreter -- the setup.py script does
this.  In order to find the Python Tkinter module, sys.path must be
set correctly -- normal installation takes care of this.


Distribution structure
----------------------

Most subdirectories have their own README files.  Most files have
comments.

Demo/           Demonstration scripts, modules and programs
Doc/            Documentation sources (reStructuredText)
Grammar/        Input for the parser generator
Include/        Public header files
LICENSE         Licensing information
Lib/            Python library modules
Mac/            Macintosh specific resources
Makefile.pre.in Source from which config.status creates the Makefile.pre
Misc/           Miscellaneous useful files
Modules/        Implementation of most built-in modules
Objects/        Implementation of most built-in object types
PC/             Files specific to PC ports (DOS, Windows, OS/2)
PCbuild/        Build directory for Microsoft Visual C++
Parser/         The parser and tokenizer and their input handling
Python/         The byte-compiler and interpreter
README          The file you're reading now
RISCOS/         Files specific to RISC OS port
Tools/          Some useful programs written in Python
pyconfig.h.in   Source from which pyconfig.h is created (GNU autoheader output)
configure       Configuration shell script (GNU autoconf output)
configure.ac    Configuration specification (input for GNU autoconf)
install-sh      Shell script used to install files
setup.py        Python script used to build extension modules

The following files will (may) be created in the toplevel directory by
the configuration and build processes:

Makefile        Build rules
Makefile.pre    Build rules before running Modules/makesetup
buildno         Keeps track of the build number
config.cache    Cache of configuration variables
pyconfig.h      Configuration header
config.log      Log from last configure run
config.status   Status from last run of the configure script
getbuildinfo.o  Object file from Modules/getbuildinfo.c
libpython<version>.a    The library archive
python          The executable interpreter
reflog.txt      Output from running the regression suite with the -R flag 
tags, TAGS      Tags files for vi and Emacs


That's all, folks!
------------------


--Guido van Rossum (home page: http://www.python.org/~guido/)
doc/alt-python27-setuptools/easy_install.txt000064400000223431150404023530015231 0ustar00============
Easy Install
============

Easy Install is a python module (``easy_install``) bundled with ``setuptools``
that lets you automatically download, build, install, and manage Python
packages.

Please share your experiences with us! If you encounter difficulty installing
a package, please contact us via the `distutils mailing list
<http://mail.python.org/pipermail/distutils-sig/>`_.  (Note: please DO NOT send
private email directly to the author of setuptools; it will be discarded.  The
mailing list is a searchable archive of previously-asked and answered
questions; you should begin your research there before reporting something as a
bug -- and then do so via list discussion first.)

(Also, if you'd like to learn about how you can use ``setuptools`` to make your
own packages work better with EasyInstall, or provide EasyInstall-like features
without requiring your users to use EasyInstall directly, you'll probably want
to check out the full `setuptools`_ documentation as well.)

.. contents:: **Table of Contents**


Using "Easy Install"
====================


.. _installation instructions:

Installing "Easy Install"
-------------------------

Please see the `setuptools PyPI page <https://pypi.python.org/pypi/setuptools>`_
for download links and basic installation instructions for each of the
supported platforms.

You will need at least Python 2.6.  An ``easy_install`` script will be
installed in the normal location for Python scripts on your platform.

Note that the instructions on the setuptools PyPI page assume that you are
are installing to Python's primary ``site-packages`` directory.  If this is
not the case, you should consult the section below on `Custom Installation
Locations`_ before installing.  (And, on Windows, you should not use the
``.exe`` installer when installing to an alternate location.)

Note that ``easy_install`` normally works by downloading files from the
internet.  If you are behind an NTLM-based firewall that prevents Python
programs from accessing the net directly, you may wish to first install and use
the `APS proxy server <http://ntlmaps.sf.net/>`_, which lets you get past such
firewalls in the same way that your web browser(s) do.

(Alternately, if you do not wish easy_install to actually download anything, you
can restrict it from doing so with the ``--allow-hosts`` option; see the
sections on `restricting downloads with --allow-hosts`_ and `command-line
options`_ for more details.)


Troubleshooting
~~~~~~~~~~~~~~~

If EasyInstall/setuptools appears to install correctly, and you can run the
``easy_install`` command but it fails with an ``ImportError``, the most likely
cause is that you installed to a location other than ``site-packages``,
without taking any of the steps described in the `Custom Installation
Locations`_ section below.  Please see that section and follow the steps to
make sure that your custom location will work correctly.  Then re-install.

Similarly, if you can run ``easy_install``, and it appears to be installing
packages, but then you can't import them, the most likely issue is that you
installed EasyInstall correctly but are using it to install packages to a
non-standard location that hasn't been properly prepared.  Again, see the
section on `Custom Installation Locations`_ for more details.


Windows Notes
~~~~~~~~~~~~~

Installing setuptools will provide an ``easy_install`` command according to
the techniques described in `Executables and Launchers`_. If the
``easy_install`` command is not available after installation, that section
provides details on how to configure Windows to make the commands available.


Downloading and Installing a Package
------------------------------------

For basic use of ``easy_install``, you need only supply the filename or URL of
a source distribution or .egg file (`Python Egg`__).

__ http://peak.telecommunity.com/DevCenter/PythonEggs

**Example 1**. Install a package by name, searching PyPI for the latest
version, and automatically downloading, building, and installing it::

    easy_install SQLObject

**Example 2**. Install or upgrade a package by name and version by finding
links on a given "download page"::

    easy_install -f http://pythonpaste.org/package_index.html SQLObject

**Example 3**. Download a source distribution from a specified URL,
automatically building and installing it::

    easy_install http://example.com/path/to/MyPackage-1.2.3.tgz

**Example 4**. Install an already-downloaded .egg file::

    easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg

**Example 5**.  Upgrade an already-installed package to the latest version
listed on PyPI::

    easy_install --upgrade PyProtocols

**Example 6**.  Install a source distribution that's already downloaded and
extracted in the current directory (New in 0.5a9)::

    easy_install .

**Example 7**.  (New in 0.6a1) Find a source distribution or Subversion
checkout URL for a package, and extract it or check it out to
``~/projects/sqlobject`` (the name will always be in all-lowercase), where it
can be examined or edited.  (The package will not be installed, but it can
easily be installed with ``easy_install ~/projects/sqlobject``.  See `Editing
and Viewing Source Packages`_ below for more info.)::

    easy_install --editable --build-directory ~/projects SQLObject

**Example 7**. (New in 0.6.11) Install a distribution within your home dir::

    easy_install --user SQLAlchemy

Easy Install accepts URLs, filenames, PyPI package names (i.e., ``distutils``
"distribution" names), and package+version specifiers.  In each case, it will
attempt to locate the latest available version that meets your criteria.

When downloading or processing downloaded files, Easy Install recognizes
distutils source distribution files with extensions of .tgz, .tar, .tar.gz,
.tar.bz2, or .zip.  And of course it handles already-built .egg
distributions as well as ``.win32.exe`` installers built using distutils.

By default, packages are installed to the running Python installation's
``site-packages`` directory, unless you provide the ``-d`` or ``--install-dir``
option to specify an alternative directory, or specify an alternate location
using distutils configuration files.  (See `Configuration Files`_, below.)

By default, any scripts included with the package are installed to the running
Python installation's standard script installation location.  However, if you
specify an installation directory via the command line or a config file, then
the default directory for installing scripts will be the same as the package
installation directory, to ensure that the script will have access to the
installed package.  You can override this using the ``-s`` or ``--script-dir``
option.

Installed packages are added to an ``easy-install.pth`` file in the install
directory, so that Python will always use the most-recently-installed version
of the package.  If you would like to be able to select which version to use at
runtime, you should use the ``-m`` or ``--multi-version`` option.


Upgrading a Package
-------------------

You don't need to do anything special to upgrade a package: just install the
new version, either by requesting a specific version, e.g.::

    easy_install "SomePackage==2.0"

a version greater than the one you have now::

    easy_install "SomePackage>2.0"

using the upgrade flag, to find the latest available version on PyPI::

    easy_install --upgrade SomePackage

or by using a download page, direct download URL, or package filename::

    easy_install -f http://example.com/downloads ExamplePackage

    easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg

    easy_install my_downloads/ExamplePackage-2.0.tgz

If you're using ``-m`` or ``--multi-version`` , using the ``require()``
function at runtime automatically selects the newest installed version of a
package that meets your version criteria.  So, installing a newer version is
the only step needed to upgrade such packages.

If you're installing to a directory on PYTHONPATH, or a configured "site"
directory (and not using ``-m``), installing a package automatically replaces
any previous version in the ``easy-install.pth`` file, so that Python will
import the most-recently installed version by default.  So, again, installing
the newer version is the only upgrade step needed.

If you haven't suppressed script installation (using ``--exclude-scripts`` or
``-x``), then the upgraded version's scripts will be installed, and they will
be automatically patched to ``require()`` the corresponding version of the
package, so that you can use them even if they are installed in multi-version
mode.

``easy_install`` never actually deletes packages (unless you're installing a
package with the same name and version number as an existing package), so if
you want to get rid of older versions of a package, please see `Uninstalling
Packages`_, below.


Changing the Active Version
---------------------------

If you've upgraded a package, but need to revert to a previously-installed
version, you can do so like this::

    easy_install PackageName==1.2.3

Where ``1.2.3`` is replaced by the exact version number you wish to switch to.
If a package matching the requested name and version is not already installed
in a directory on ``sys.path``, it will be located via PyPI and installed.

If you'd like to switch to the latest installed version of ``PackageName``, you
can do so like this::

    easy_install PackageName

This will activate the latest installed version.  (Note: if you have set any
``find_links`` via distutils configuration files, those download pages will be
checked for the latest available version of the package, and it will be
downloaded and installed if it is newer than your current version.)

Note that changing the active version of a package will install the newly
active version's scripts, unless the ``--exclude-scripts`` or ``-x`` option is
specified.


Uninstalling Packages
---------------------

If you have replaced a package with another version, then you can just delete
the package(s) you don't need by deleting the PackageName-versioninfo.egg file
or directory (found in the installation directory).

If you want to delete the currently installed version of a package (or all
versions of a package), you should first run::

    easy_install -m PackageName

This will ensure that Python doesn't continue to search for a package you're
planning to remove. After you've done this, you can safely delete the .egg
files or directories, along with any scripts you wish to remove.


Managing Scripts
----------------

Whenever you install, upgrade, or change versions of a package, EasyInstall
automatically installs the scripts for the selected package version, unless
you tell it not to with ``-x`` or ``--exclude-scripts``.  If any scripts in
the script directory have the same name, they are overwritten.

Thus, you do not normally need to manually delete scripts for older versions of
a package, unless the newer version of the package does not include a script
of the same name.  However, if you are completely uninstalling a package, you
may wish to manually delete its scripts.

EasyInstall's default behavior means that you can normally only run scripts
from one version of a package at a time.  If you want to keep multiple versions
of a script available, however, you can simply use the ``--multi-version`` or
``-m`` option, and rename the scripts that EasyInstall creates.  This works
because EasyInstall installs scripts as short code stubs that ``require()`` the
matching version of the package the script came from, so renaming the script
has no effect on what it executes.

For example, suppose you want to use two versions of the ``rst2html`` tool
provided by the `docutils <http://docutils.sf.net/>`_ package.  You might
first install one version::

    easy_install -m docutils==0.3.9

then rename the ``rst2html.py`` to ``r2h_039``, and install another version::

    easy_install -m docutils==0.3.10

This will create another ``rst2html.py`` script, this one using docutils
version 0.3.10 instead of 0.3.9.  You now have two scripts, each using a
different version of the package.  (Notice that we used ``-m`` for both
installations, so that Python won't lock us out of using anything but the most
recently-installed version of the package.)


Executables and Launchers
-------------------------

On Unix systems, scripts are installed with as natural files with a "#!"
header and no extension and they launch under the Python version indicated in
the header.

On Windows, there is no mechanism to "execute" files without extensions, so
EasyInstall provides two techniques to mirror the Unix behavior. The behavior
is indicated by the SETUPTOOLS_LAUNCHER environment variable, which may be
"executable" (default) or "natural".

Regardless of the technique used, the script(s) will be installed to a Scripts
directory (by default in the Python installation directory). It is recommended
for EasyInstall that you ensure this directory is in the PATH environment
variable. The easiest way to ensure the Scripts directory is in the PATH is
to run ``Tools\Scripts\win_add2path.py`` from the Python directory (requires
Python 2.6 or later).

Note that instead of changing your ``PATH`` to include the Python scripts
directory, you can also retarget the installation location for scripts so they
go on a directory that's already on the ``PATH``.  For more information see
`Command-Line Options`_ and `Configuration Files`_.  During installation,
pass command line options (such as ``--script-dir``) to
``ez_setup.py`` to control where ``easy_install.exe`` will be installed.


Windows Executable Launcher
~~~~~~~~~~~~~~~~~~~~~~~~~~~

If the "executable" launcher is used, EasyInstall will create a '.exe'
launcher of the same name beside each installed script (including
``easy_install`` itself). These small .exe files launch the script of the
same name using the Python version indicated in the '#!' header.

This behavior is currently default. To force
the use of executable launchers, set ``SETUPTOOLS_LAUNCHER`` to "executable".

Natural Script Launcher
~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall also supports deferring to an external launcher such as
`pylauncher <https://bitbucket.org/pypa/pylauncher>`_ for launching scripts.
Enable this experimental functionality by setting the
``SETUPTOOLS_LAUNCHER`` environment variable to "natural". EasyInstall will
then install scripts as simple
scripts with a .pya (or .pyw) extension appended. If these extensions are
associated with the pylauncher and listed in the PATHEXT environment variable,
these scripts can then be invoked simply and directly just like any other
executable. This behavior may become default in a future version.

EasyInstall uses the .pya extension instead of simply
the typical '.py' extension. This distinct extension is necessary to prevent
Python
from treating the scripts as importable modules (where name conflicts exist).
Current releases of pylauncher do not yet associate with .pya files by
default, but future versions should do so.


Tips & Techniques
-----------------

Multiple Python Versions
~~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall installs itself under two names:
``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version
used to install it.  Thus, if you install EasyInstall for both Python 3.2 and
2.7, you can use the ``easy_install-3.2`` or ``easy_install-2.7`` scripts to
install packages for the respective Python version.

Setuptools also supplies easy_install as a runnable module which may be
invoked using ``python -m easy_install`` for any Python with Setuptools
installed.

Restricting Downloads with ``--allow-hosts``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can use the ``--allow-hosts`` (``-H``) option to restrict what domains
EasyInstall will look for links and downloads on.  ``--allow-hosts=None``
prevents downloading altogether.  You can also use wildcards, for example
to restrict downloading to hosts in your own intranet.  See the section below
on `Command-Line Options`_ for more details on the ``--allow-hosts`` option.

By default, there are no host restrictions in effect, but you can change this
default by editing the appropriate `configuration files`_ and adding:

.. code-block:: ini

    [easy_install]
    allow_hosts = *.myintranet.example.com,*.python.org

The above example would then allow downloads only from hosts in the
``python.org`` and ``myintranet.example.com`` domains, unless overridden on the
command line.


Installing on Un-networked Machines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Just copy the eggs or source packages you need to a directory on the target
machine, then use the ``-f`` or ``--find-links`` option to specify that
directory's location.  For example::

    easy_install -H None -f somedir SomePackage

will attempt to install SomePackage using only eggs and source packages found
in ``somedir`` and disallowing all remote access.  You should of course make
sure you have all of SomePackage's dependencies available in somedir.

If you have another machine of the same operating system and library versions
(or if the packages aren't platform-specific), you can create the directory of
eggs using a command like this::

    easy_install -zmaxd somedir SomePackage

This will tell EasyInstall to put zipped eggs or source packages for
SomePackage and all its dependencies into ``somedir``, without creating any
scripts or .pth files.  You can then copy the contents of ``somedir`` to the
target machine.  (``-z`` means zipped eggs, ``-m`` means multi-version, which
prevents .pth files from being used, ``-a`` means to copy all the eggs needed,
even if they're installed elsewhere on the machine, and ``-d`` indicates the
directory to place the eggs in.)

You can also build the eggs from local development packages that were installed
with the ``setup.py develop`` command, by including the ``-l`` option, e.g.::

    easy_install -zmaxld somedir SomePackage

This will use locally-available source distributions to build the eggs.


Packaging Others' Projects As Eggs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Need to distribute a package that isn't published in egg form?  You can use
EasyInstall to build eggs for a project.  You'll want to use the ``--zip-ok``,
``--exclude-scripts``, and possibly ``--no-deps`` options (``-z``, ``-x`` and
``-N``, respectively).  Use ``-d`` or ``--install-dir`` to specify the location
where you'd like the eggs placed.  By placing them in a directory that is
published to the web, you can then make the eggs available for download, either
in an intranet or to the internet at large.

If someone distributes a package in the form of a single ``.py`` file, you can
wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL.
So, something like this::

    easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo

will install the package as an egg, and this::

    easy_install -zmaxd. \
        -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo

will create a ``.egg`` file in the current directory.


Creating your own Package Index
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In addition to local directories and the Python Package Index, EasyInstall can
find download links on most any web page whose URL is given to the ``-f``
(``--find-links``) option.  In the simplest case, you can simply have a web
page with links to eggs or Python source packages, even an automatically
generated directory listing (such as the Apache web server provides).

If you are setting up an intranet site for package downloads, you may want to
configure the target machines to use your download site by default, adding
something like this to their `configuration files`_:

.. code-block:: ini

    [easy_install]
    find_links = http://mypackages.example.com/somedir/
                 http://turbogears.org/download/
                 http://peak.telecommunity.com/dist/

As you can see, you can list multiple URLs separated by whitespace, continuing
on multiple lines if necessary (as long as the subsequent lines are indented.

If you are more ambitious, you can also create an entirely custom package index
or PyPI mirror.  See the ``--index-url`` option under `Command-Line Options`_,
below, and also the section on `Package Index "API"`_.


Password-Protected Sites
------------------------

If a site you want to download from is password-protected using HTTP "Basic"
authentication, you can specify your credentials in the URL, like so::

    http://some_userid:some_password@some.example.com/some_path/

You can do this with both index page URLs and direct download URLs.  As long
as any HTML pages read by easy_install use *relative* links to point to the
downloads, the same user ID and password will be used to do the downloading.

Using .pypirc Credentials
-------------------------

In additional to supplying credentials in the URL, ``easy_install`` will also
honor credentials if present in the .pypirc file. Teams maintaining a private
repository of packages may already have defined access credentials for
uploading packages according to the distutils documentation. ``easy_install``
will attempt to honor those if present. Refer to the distutils documentation
for Python 2.5 or later for details on the syntax.

Controlling Build Options
~~~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall respects standard distutils `Configuration Files`_, so you can use
them to configure build options for packages that it installs from source.  For
example, if you are on Windows using the MinGW compiler, you can configure the
default compiler by putting something like this:

.. code-block:: ini

    [build]
    compiler = mingw32

into the appropriate distutils configuration file.  In fact, since this is just
normal distutils configuration, it will affect any builds using that config
file, not just ones done by EasyInstall.  For example, if you add those lines
to ``distutils.cfg`` in the ``distutils`` package directory, it will be the
default compiler for *all* packages you build.  See `Configuration Files`_
below for a list of the standard configuration file locations, and links to
more documentation on using distutils configuration files.


Editing and Viewing Source Packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sometimes a package's source distribution  contains additional documentation,
examples, configuration files, etc., that are not part of its actual code.  If
you want to be able to examine these files, you can use the ``--editable``
option to EasyInstall, and EasyInstall will look for a source distribution
or Subversion URL for the package, then download and extract it or check it out
as a subdirectory of the ``--build-directory`` you specify.  If you then wish
to install the package after editing or configuring it, you can do so by
rerunning EasyInstall with that directory as the target.

Note that using ``--editable`` stops EasyInstall from actually building or
installing the package; it just finds, obtains, and possibly unpacks it for
you.  This allows you to make changes to the package if necessary, and to
either install it in development mode using ``setup.py develop`` (if the
package uses setuptools, that is), or by running ``easy_install projectdir``
(where ``projectdir`` is the subdirectory EasyInstall created for the
downloaded package.

In order to use ``--editable`` (``-e`` for short), you *must* also supply a
``--build-directory`` (``-b`` for short).  The project will be placed in a
subdirectory of the build directory.  The subdirectory will have the same
name as the project itself, but in all-lowercase.  If a file or directory of
that name already exists, EasyInstall will print an error message and exit.

Also, when using ``--editable``, you cannot use URLs or filenames as arguments.
You *must* specify project names (and optional version requirements) so that
EasyInstall knows what directory name(s) to create.  If you need to force
EasyInstall to use a particular URL or filename, you should specify it as a
``--find-links`` item (``-f`` for short), and then also specify
the project name, e.g.::

    easy_install -eb ~/projects \
     -fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \
     ctypes==0.9.6


Dealing with Installation Conflicts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(NOTE: As of 0.6a11, this section is obsolete; it is retained here only so that
people using older versions of EasyInstall can consult it.  As of version
0.6a11, installation conflicts are handled automatically without deleting the
old or system-installed packages, and without ignoring the issue.  Instead,
eggs are automatically shifted to the front of ``sys.path`` using special
code added to the ``easy-install.pth`` file.  So, if you are using version
0.6a11 or better of setuptools, you do not need to worry about conflicts,
and the following issues do not apply to you.)

EasyInstall installs distributions in a "managed" way, such that each
distribution can be independently activated or deactivated on ``sys.path``.
However, packages that were not installed by EasyInstall are "unmanaged",
in that they usually live all in one directory and cannot be independently
activated or deactivated.

As a result, if you are using EasyInstall to upgrade an existing package, or
to install a package with the same name as an existing package, EasyInstall
will warn you of the conflict.  (This is an improvement over ``setup.py
install``, because the ``distutils`` just install new packages on top of old
ones, possibly combining two unrelated packages or leaving behind modules that
have been deleted in the newer version of the package.)

EasyInstall will stop the installation if it detects a conflict
between an existing, "unmanaged" package, and a module or package in any of
the distributions you're installing.  It will display a list of all of the
existing files and directories that would need to be deleted for the new
package to be able to function correctly.  To proceed, you must manually
delete these conflicting files and directories and re-run EasyInstall.

Of course, once you've replaced all of your existing "unmanaged" packages with
versions managed by EasyInstall, you won't have any more conflicts to worry
about!


Compressed Installation
~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall tries to install packages in zipped form, if it can.  Zipping
packages can improve Python's overall import performance if you're not using
the ``--multi-version`` option, because Python processes zipfile entries on
``sys.path`` much faster than it does directories.

As of version 0.5a9, EasyInstall analyzes packages to determine whether they
can be safely installed as a zipfile, and then acts on its analysis.  (Previous
versions would not install a package as a zipfile unless you used the
``--zip-ok`` option.)

The current analysis approach is fairly conservative; it currently looks for:

 * Any use of the ``__file__`` or ``__path__`` variables (which should be
   replaced with ``pkg_resources`` API calls)

 * Possible use of ``inspect`` functions that expect to manipulate source files
   (e.g. ``inspect.getsource()``)

 * Top-level modules that might be scripts used with ``python -m`` (Python 2.4)

If any of the above are found in the package being installed, EasyInstall will
assume that the package cannot be safely run from a zipfile, and unzip it to
a directory instead.  You can override this analysis with the ``-zip-ok`` flag,
which will tell EasyInstall to install the package as a zipfile anyway.  Or,
you can use the ``--always-unzip`` flag, in which case EasyInstall will always
unzip, even if its analysis says the package is safe to run as a zipfile.

Normally, however, it is simplest to let EasyInstall handle the determination
of whether to zip or unzip, and only specify overrides when needed to work
around a problem.  If you find you need to override EasyInstall's guesses, you
may want to contact the package author and the EasyInstall maintainers, so that
they can make appropriate changes in future versions.

(Note: If a package uses ``setuptools`` in its setup script, the package author
has the option to declare the package safe or unsafe for zipped usage via the
``zip_safe`` argument to ``setup()``.  If the package author makes such a
declaration, EasyInstall believes the package's author and does not perform its
own analysis.  However, your command-line option, if any, will still override
the package author's choice.)


Reference Manual
================

Configuration Files
-------------------

(New in 0.4a2)

You may specify default options for EasyInstall using the standard
distutils configuration files, under the command heading ``easy_install``.
EasyInstall will look first for a ``setup.cfg`` file in the current directory,
then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes
and Windows, respectively), and finally a ``distutils.cfg`` file in the
``distutils`` package directory.  Here's a simple example:

.. code-block:: ini

    [easy_install]

    # set the default location to install packages
    install_dir = /home/me/lib/python

    # Notice that indentation can be used to continue an option
    # value; this is especially useful for the "--find-links"
    # option, which tells easy_install to use download links on
    # these pages before consulting PyPI:
    #
    find_links = http://sqlobject.org/
                 http://peak.telecommunity.com/dist/

In addition to accepting configuration for its own options under
``[easy_install]``, EasyInstall also respects defaults specified for other
distutils commands.  For example, if you don't set an ``install_dir`` for
``[easy_install]``, but *have* set an ``install_lib`` for the ``[install]``
command, this will become EasyInstall's default installation directory.  Thus,
if you are already using distutils configuration files to set default install
locations, build options, etc., EasyInstall will respect your existing settings
until and unless you override them explicitly in an ``[easy_install]`` section.

For more information, see also the current Python documentation on the `use and
location of distutils configuration files <https://docs.python.org/install/index.html#inst-config-files>`_.

Notice that ``easy_install`` will use the ``setup.cfg`` from the current
working directory only if it was triggered from ``setup.py`` through the
``install_requires`` option. The standalone command will not use that file.

Command-Line Options
--------------------

``--zip-ok, -z``
    Install all packages as zip files, even if they are marked as unsafe for
    running as a zipfile.  This can be useful when EasyInstall's analysis
    of a non-setuptools package is too conservative, but keep in mind that
    the package may not work correctly.  (Changed in 0.5a9; previously this
    option was required in order for zipped installation to happen at all.)

``--always-unzip, -Z``
    Don't install any packages as zip files, even if the packages are marked
    as safe for running as a zipfile.  This can be useful if a package does
    something unsafe, but not in a way that EasyInstall can easily detect.
    EasyInstall's default analysis is currently very conservative, however, so
    you should only use this option if you've had problems with a particular
    package, and *after* reporting the problem to the package's maintainer and
    to the EasyInstall maintainers.

    (Note: the ``-z/-Z`` options only affect the installation of newly-built
    or downloaded packages that are not already installed in the target
    directory; if you want to convert an existing installed version from
    zipped to unzipped or vice versa, you'll need to delete the existing
    version first, and re-run EasyInstall.)

``--multi-version, -m``
    "Multi-version" mode. Specifying this option prevents ``easy_install`` from
    adding an ``easy-install.pth`` entry for the package being installed, and
    if an entry for any version the package already exists, it will be removed
    upon successful installation. In multi-version mode, no specific version of
    the package is available for importing, unless you use
    ``pkg_resources.require()`` to put it on ``sys.path``. This can be as
    simple as::

        from pkg_resources import require
        require("SomePackage", "OtherPackage", "MyPackage")

    which will put the latest installed version of the specified packages on
    ``sys.path`` for you. (For more advanced uses, like selecting specific
    versions and enabling optional dependencies, see the ``pkg_resources`` API
    doc.)

    Changed in 0.6a10: this option is no longer silently enabled when
    installing to a non-PYTHONPATH, non-"site" directory.  You must always
    explicitly use this option if you want it to be active.

``--upgrade, -U``   (New in 0.5a4)
    By default, EasyInstall only searches online if a project/version
    requirement can't be met by distributions already installed
    on sys.path or the installation directory.  However, if you supply the
    ``--upgrade`` or ``-U`` flag, EasyInstall will always check the package
    index and ``--find-links`` URLs before selecting a version to install.  In
    this way, you can force EasyInstall to use the latest available version of
    any package it installs (subject to any version requirements that might
    exclude such later versions).

``--install-dir=DIR, -d DIR``
    Set the installation directory. It is up to you to ensure that this
    directory is on ``sys.path`` at runtime, and to use
    ``pkg_resources.require()`` to enable the installed package(s) that you
    need.

    (New in 0.4a2) If this option is not directly specified on the command line
    or in a distutils configuration file, the distutils default installation
    location is used.  Normally, this would be the ``site-packages`` directory,
    but if you are using distutils configuration files, setting things like
    ``prefix`` or ``install_lib``, then those settings are taken into
    account when computing the default installation directory, as is the
    ``--prefix`` option.

``--script-dir=DIR, -s DIR``
    Set the script installation directory.  If you don't supply this option
    (via the command line or a configuration file), but you *have* supplied
    an ``--install-dir`` (via command line or config file), then this option
    defaults to the same directory, so that the scripts will be able to find
    their associated package installation.  Otherwise, this setting defaults
    to the location where the distutils would normally install scripts, taking
    any distutils configuration file settings into account.

``--exclude-scripts, -x``
    Don't install scripts.  This is useful if you need to install multiple
    versions of a package, but do not want to reset the version that will be
    run by scripts that are already installed.

``--user`` (New in 0.6.11)
    Use the user-site-packages as specified in :pep:`370`
    instead of the global site-packages.

``--always-copy, -a``   (New in 0.5a4)
    Copy all needed distributions to the installation directory, even if they
    are already present in a directory on sys.path.  In older versions of
    EasyInstall, this was the default behavior, but now you must explicitly
    request it.  By default, EasyInstall will no longer copy such distributions
    from other sys.path directories to the installation directory, unless you
    explicitly gave the distribution's filename on the command line.

    Note that as of 0.6a10, using this option excludes "system" and
    "development" eggs from consideration because they can't be reliably
    copied.  This may cause EasyInstall to choose an older version of a package
    than what you expected, or it may cause downloading and installation of a
    fresh copy of something that's already installed.  You will see warning
    messages for any eggs that EasyInstall skips, before it falls back to an
    older version or attempts to download a fresh copy.

``--find-links=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES``
    Scan the specified "download pages" or directories for direct links to eggs
    or other distributions.  Any existing file or directory names or direct
    download URLs are immediately added to EasyInstall's search cache, and any
    indirect URLs (ones that don't point to eggs or other recognized archive
    formats) are added to a list of additional places to search for download
    links.  As soon as EasyInstall has to go online to find a package (either
    because it doesn't exist locally, or because ``--upgrade`` or ``-U`` was
    used), the specified URLs will be downloaded and scanned for additional
    direct links.

    Eggs and archives found by way of ``--find-links`` are only downloaded if
    they are needed to meet a requirement specified on the command line; links
    to unneeded packages are ignored.

    If all requested packages can be found using links on the specified
    download pages, the Python Package Index will not be consulted unless you
    also specified the ``--upgrade`` or ``-U`` option.

    (Note: if you want to refer to a local HTML file containing links, you must
    use a ``file:`` URL, as filenames that do not refer to a directory, egg, or
    archive are ignored.)

    You may specify multiple URLs or file/directory names with this option,
    separated by whitespace.  Note that on the command line, you will probably
    have to surround the URL list with quotes, so that it is recognized as a
    single option value.  You can also specify URLs in a configuration file;
    see `Configuration Files`_, above.

    Changed in 0.6a10: previously all URLs and directories passed to this
    option were scanned as early as possible, but from 0.6a10 on, only
    directories and direct archive links are scanned immediately; URLs are not
    retrieved unless a package search was already going to go online due to a
    package not being available locally, or due to the use of the ``--update``
    or ``-U`` option.

``--no-find-links`` Blocks the addition of any link.
    This parameter is useful if you want to avoid adding links defined in a
    project easy_install is installing (whether it's a requested project or a
    dependency). When used, ``--find-links`` is ignored.

    Added in Distribute 0.6.11 and Setuptools 0.7.

``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7)
    Specifies the base URL of the Python Package Index.  The default is
    https://pypi.python.org/simple if not specified.  When a package is requested
    that is not locally available or linked from a ``--find-links`` download
    page, the package index will be searched for download pages for the needed
    package, and those download pages will be searched for links to download
    an egg or source distribution.

``--editable, -e`` (New in 0.6a1)
    Only find and download source distributions for the specified projects,
    unpacking them to subdirectories of the specified ``--build-directory``.
    EasyInstall will not actually build or install the requested projects or
    their dependencies; it will just find and extract them for you.  See
    `Editing and Viewing Source Packages`_ above for more details.

``--build-directory=DIR, -b DIR`` (UPDATED in 0.6a1)
    Set the directory used to build source packages.  If a package is built
    from a source distribution or checkout, it will be extracted to a
    subdirectory of the specified directory.  The subdirectory will have the
    same name as the extracted distribution's project, but in all-lowercase.
    If a file or directory of that name already exists in the given directory,
    a warning will be printed to the console, and the build will take place in
    a temporary directory instead.

    This option is most useful in combination with the ``--editable`` option,
    which forces EasyInstall to *only* find and extract (but not build and
    install) source distributions.  See `Editing and Viewing Source Packages`_,
    above, for more information.

``--verbose, -v, --quiet, -q`` (New in 0.4a4)
    Control the level of detail of EasyInstall's progress messages.  The
    default detail level is "info", which prints information only about
    relatively time-consuming operations like running a setup script, unpacking
    an archive, or retrieving a URL.  Using ``-q`` or ``--quiet`` drops the
    detail level to "warn", which will only display installation reports,
    warnings, and errors.  Using ``-v`` or ``--verbose`` increases the detail
    level to include individual file-level operations, link analysis messages,
    and distutils messages from any setup scripts that get run.  If you include
    the ``-v`` option more than once, the second and subsequent uses are passed
    down to any setup scripts, increasing the verbosity of their reporting as
    well.

``--dry-run, -n`` (New in 0.4a4)
    Don't actually install the package or scripts.  This option is passed down
    to any setup scripts run, so packages should not actually build either.
    This does *not* skip downloading, nor does it skip extracting source
    distributions to a temporary/build directory.

``--optimize=LEVEL``, ``-O LEVEL`` (New in 0.4a4)
    If you are installing from a source distribution, and are *not* using the
    ``--zip-ok`` option, this option controls the optimization level for
    compiling installed ``.py`` files to ``.pyo`` files.  It does not affect
    the compilation of modules contained in ``.egg`` files, only those in
    ``.egg`` directories.  The optimization level can be set to 0, 1, or 2;
    the default is 0 (unless it's set under ``install`` or ``install_lib`` in
    one of your distutils configuration files).

``--record=FILENAME``  (New in 0.5a4)
    Write a record of all installed files to FILENAME.  This is basically the
    same as the same option for the standard distutils "install" command, and
    is included for compatibility with tools that expect to pass this option
    to "setup.py install".

``--site-dirs=DIRLIST, -S DIRLIST``   (New in 0.6a1)
    Specify one or more custom "site" directories (separated by commas).
    "Site" directories are directories where ``.pth`` files are processed, such
    as the main Python ``site-packages`` directory.  As of 0.6a10, EasyInstall
    automatically detects whether a given directory processes ``.pth`` files
    (or can be made to do so), so you should not normally need to use this
    option.  It is is now only necessary if you want to override EasyInstall's
    judgment and force an installation directory to be treated as if it
    supported ``.pth`` files.

``--no-deps, -N``  (New in 0.6a6)
    Don't install any dependencies.  This is intended as a convenience for
    tools that wrap eggs in a platform-specific packaging system.  (We don't
    recommend that you use it for anything else.)

``--allow-hosts=PATTERNS, -H PATTERNS``   (New in 0.6a6)
    Restrict downloading and spidering to hosts matching the specified glob
    patterns.  E.g. ``-H *.python.org`` restricts web access so that only
    packages listed and downloadable from machines in the ``python.org``
    domain.  The glob patterns must match the *entire* user/host/port section of
    the target URL(s).  For example, ``*.python.org`` will NOT accept a URL
    like ``http://python.org/foo`` or ``http://www.python.org:8080/``.
    Multiple patterns can be specified by separating them with commas.  The
    default pattern is ``*``, which matches anything.

    In general, this option is mainly useful for blocking EasyInstall's web
    access altogether (e.g. ``-Hlocalhost``), or to restrict it to an intranet
    or other trusted site.  EasyInstall will do the best it can to satisfy
    dependencies given your host restrictions, but of course can fail if it
    can't find suitable packages.  EasyInstall displays all blocked URLs, so
    that you can adjust your ``--allow-hosts`` setting if it is more strict
    than you intended.  Some sites may wish to define a restrictive default
    setting for this option in their `configuration files`_, and then manually
    override the setting on the command line as needed.

``--prefix=DIR`` (New in 0.6a10)
    Use the specified directory as a base for computing the default
    installation and script directories.  On Windows, the resulting default
    directories will be ``prefix\\Lib\\site-packages`` and ``prefix\\Scripts``,
    while on other platforms the defaults will be
    ``prefix/lib/python2.X/site-packages`` (with the appropriate version
    substituted) for libraries and ``prefix/bin`` for scripts.

    Note that the ``--prefix`` option only sets the *default* installation and
    script directories, and does not override the ones set on the command line
    or in a configuration file.

``--local-snapshots-ok, -l`` (New in 0.6c6)
    Normally, EasyInstall prefers to only install *released* versions of
    projects, not in-development ones, because such projects may not
    have a currently-valid version number.  So, it usually only installs them
    when their ``setup.py`` directory is explicitly passed on the command line.

    However, if this option is used, then any in-development projects that were
    installed using the ``setup.py develop`` command, will be used to build
    eggs, effectively upgrading the "in-development" project to a snapshot
    release.  Normally, this option is used only in conjunction with the
    ``--always-copy`` option to create a distributable snapshot of every egg
    needed to run an application.

    Note that if you use this option, you must make sure that there is a valid
    version number (such as an SVN revision number tag) for any in-development
    projects that may be used, as otherwise EasyInstall may not be able to tell
    what version of the project is "newer" when future installations or
    upgrades are attempted.


.. _non-root installation:

Custom Installation Locations
-----------------------------

By default, EasyInstall installs python packages into Python's main ``site-packages`` directory,
and manages them using a custom ``.pth`` file in that same directory.

Very often though, a user or developer wants ``easy_install`` to install and manage python packages
in an alternative location, usually for one of 3 reasons:

1. They don't have access to write to the main Python site-packages directory.

2. They want a user-specific stash of packages, that is not visible to other users.

3. They want to isolate a set of packages to a specific python application, usually to minimize
   the possibility of version conflicts.

Historically, there have been many approaches to achieve custom installation.
The following section lists only the easiest and most relevant approaches [1]_.

`Use the "--user" option`_

`Use the "--user" option and customize "PYTHONUSERBASE"`_

`Use "virtualenv"`_

.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_ in Python 2.6.

.. _PEP-370: http://www.python.org/dev/peps/pep-0370/


Use the "--user" option
~~~~~~~~~~~~~~~~~~~~~~~
With Python 2.6 came the User scheme for installation, which means that all
python distributions support an alternative install location that is specific to a user [2]_ [3]_.
The Default location for each OS is explained in the python documentation
for the ``site.USER_BASE`` variable.  This mode of installation can be turned on by
specifying the ``--user`` option to ``setup.py install`` or ``easy_install``.
This approach serves the need to have a user-specific stash of packages.

.. [2] Prior to Python2.6, Mac OS X offered a form of the User scheme. That is now subsumed into the User scheme introduced in Python 2.6.
.. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized.

Use the "--user" option and customize "PYTHONUSERBASE"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The User scheme install location can be customized by setting the ``PYTHONUSERBASE`` environment
variable, which updates the value of ``site.USER_BASE``.  To isolate packages to a specific
application, simply set the OS environment of that application to a specific value of
``PYTHONUSERBASE``, that contains just those packages.

Use "virtualenv"
~~~~~~~~~~~~~~~~
"virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby
creating an isolated location to install packages.  The evolution of "virtualenv" started before the existence
of the User installation scheme.  "virtualenv" provides a version of ``easy_install`` that is
scoped to the cloned python install and is used in the normal way. "virtualenv" does offer various features
that the User installation scheme alone does not provide, e.g. the ability to hide the main python site-packages.

Please refer to the `virtualenv`_ documentation for more details.

.. _virtualenv: https://pypi.python.org/pypi/virtualenv



Package Index "API"
-------------------

Custom package indexes (and PyPI) must follow the following rules for
EasyInstall to be able to look up and download packages:

1. Except where stated otherwise, "pages" are HTML or XHTML, and "links"
   refer to ``href`` attributes.

2. Individual project version pages' URLs must be of the form
   ``base/projectname/version``, where ``base`` is the package index's base URL.

3. Omitting the ``/version`` part of a project page's URL (but keeping the
   trailing ``/``) should result in a page that is either:

   a) The single active version of that project, as though the version had been
      explicitly included, OR

   b) A page with links to all of the active version pages for that project.

4. Individual project version pages should contain direct links to downloadable
   distributions where possible.  It is explicitly permitted for a project's
   "long_description" to include URLs, and these should be formatted as HTML
   links by the package index, as EasyInstall does no special processing to
   identify what parts of a page are index-specific and which are part of the
   project's supplied description.

5. Where available, MD5 information should be added to download URLs by
   appending a fragment identifier of the form ``#md5=...``, where ``...`` is
   the 32-character hex MD5 digest.  EasyInstall will verify that the
   downloaded file's MD5 digest matches the given value.

6. Individual project version pages should identify any "homepage" or
   "download" URLs using ``rel="homepage"`` and ``rel="download"`` attributes
   on the HTML elements linking to those URLs. Use of these attributes will
   cause EasyInstall to always follow the provided links, unless it can be
   determined by inspection that they are downloadable distributions. If the
   links are not to downloadable distributions, they are retrieved, and if they
   are HTML, they are scanned for download links. They are *not* scanned for
   additional "homepage" or "download" links, as these are only processed for
   pages that are part of a package index site.

7. The root URL of the index, if retrieved with a trailing ``/``, must result
   in a page containing links to *all* projects' active version pages.

   (Note: This requirement is a workaround for the absence of case-insensitive
   ``safe_name()`` matching of project names in URL paths. If project names are
   matched in this fashion (e.g. via the PyPI server, mod_rewrite, or a similar
   mechanism), then it is not necessary to include this all-packages listing
   page.)

8. If a package index is accessed via a ``file://`` URL, then EasyInstall will
   automatically use ``index.html`` files, if present, when trying to read a
   directory with a trailing ``/`` on the URL.


Backward Compatibility
~~~~~~~~~~~~~~~~~~~~~~

Package indexes that wish to support setuptools versions prior to 0.6b4 should
also follow these rules:

* Homepage and download links must be preceded with ``"<th>Home Page"`` or
  ``"<th>Download URL"``, in addition to (or instead of) the ``rel=""``
  attributes on the actual links.  These marker strings do not need to be
  visible, or uncommented, however!  For example, the following is a valid
  homepage link that will work with any version of setuptools::

    <li>
     <strong>Home Page:</strong>
     <!-- <th>Home Page -->
     <a rel="homepage" href="http://sqlobject.org">http://sqlobject.org</a>
    </li>

  Even though the marker string is in an HTML comment, older versions of
  EasyInstall will still "see" it and know that the link that follows is the
  project's home page URL.

* The pages described by paragraph 3(b) of the preceding section *must*
  contain the string ``"Index of Packages</title>"`` somewhere in their text.
  This can be inside of an HTML comment, if desired, and it can be anywhere
  in the page.  (Note: this string MUST NOT appear on normal project pages, as
  described in paragraphs 2 and 3(a)!)

In addition, for compatibility with PyPI versions that do not use ``#md5=``
fragment IDs, EasyInstall uses the following regular expression to match PyPI's
displayed MD5 info (broken onto two lines for readability)::

    <a href="([^"#]+)">([^<]+)</a>\n\s+\(<a href="[^?]+\?:action=show_md5
    &amp;digest=([0-9a-f]{32})">md5</a>\)

History
=======

0.6c9
 * Fixed ``win32.exe`` support for .pth files, so unnecessary directory nesting
   is flattened out in the resulting egg.  (There was a case-sensitivity
   problem that affected some distributions, notably ``pywin32``.)

 * Prevent ``--help-commands`` and other junk from showing under Python 2.5
   when running ``easy_install --help``.

 * Fixed GUI scripts sometimes not executing on Windows

 * Fixed not picking up dependency links from recursive dependencies.

 * Only make ``.py``, ``.dll`` and ``.so`` files executable when unpacking eggs

 * Changes for Jython compatibility

 * Improved error message when a requirement is also a directory name, but the
   specified directory is not a source package.

 * Fixed ``--allow-hosts`` option blocking ``file:`` URLs

 * Fixed HTTP SVN detection failing when the page title included a project
   name (e.g. on SourceForge-hosted SVN)

 * Fix Jython script installation to handle ``#!`` lines better when
   ``sys.executable`` is a script.

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Keep site directories (e.g. ``site-packages``) from being included in
   ``.pth`` files.

0.6c7
 * ``ftp:`` download URLs now work correctly.

 * The default ``--index-url`` is now ``https://pypi.python.org/simple``, to use
   the Python Package Index's new simpler (and faster!) REST API.

0.6c6
 * EasyInstall no longer aborts the installation process if a URL it wants to
   retrieve can't be downloaded, unless the URL is an actual package download.
   Instead, it issues a warning and tries to keep going.

 * Fixed distutils-style scripts originally built on Windows having their line
   endings doubled when installed on any platform.

 * Added ``--local-snapshots-ok`` flag, to allow building eggs from projects
   installed using ``setup.py develop``.

 * Fixed not HTML-decoding URLs scraped from web pages

0.6c5
 * Fixed ``.dll`` files on Cygwin not having executable permissions when an egg
   is installed unzipped.

0.6c4
 * Added support for HTTP "Basic" authentication using ``http://user:pass@host``
   URLs.  If a password-protected page contains links to the same host (and
   protocol), those links will inherit the credentials used to access the
   original page.

 * Removed all special support for Sourceforge mirrors, as Sourceforge's
   mirror system now works well for non-browser downloads.

 * Fixed not recognizing ``win32.exe`` installers that included a custom
   bitmap.

 * Fixed not allowing ``os.open()`` of paths outside the sandbox, even if they
   are opened read-only (e.g. reading ``/dev/urandom`` for random numbers, as
   is done by ``os.urandom()`` on some platforms).

 * Fixed a problem with ``.pth`` testing on Windows when ``sys.executable``
   has a space in it (e.g., the user installed Python to a ``Program Files``
   directory).

0.6c3
 * You can once again use "python -m easy_install" with Python 2.4 and above.

 * Python 2.5 compatibility fixes added.

0.6c2
 * Windows script wrappers now support quoted arguments and arguments
   containing spaces.  (Patch contributed by Jim Fulton.)

 * The ``ez_setup.py`` script now actually works when you put a setuptools
   ``.egg`` alongside it for bootstrapping an offline machine.

 * A writable installation directory on ``sys.path`` is no longer required to
   download and extract a source distribution using ``--editable``.

 * Generated scripts now use ``-x`` on the ``#!`` line when ``sys.executable``
   contains non-ASCII characters, to prevent deprecation warnings about an
   unspecified encoding when the script is run.

0.6c1
 * EasyInstall now includes setuptools version information in the
   ``User-Agent`` string sent to websites it visits.

0.6b4
 * Fix creating Python wrappers for non-Python scripts

 * Fix ``ftp://`` directory listing URLs from causing a crash when used in the
   "Home page" or "Download URL" slots on PyPI.

 * Fix ``sys.path_importer_cache`` not being updated when an existing zipfile
   or directory is deleted/overwritten.

 * Fix not recognizing HTML 404 pages from package indexes.

 * Allow ``file://`` URLs to be used as a package index.  URLs that refer to
   directories will use an internally-generated directory listing if there is
   no ``index.html`` file in the directory.

 * Allow external links in a package index to be specified using
   ``rel="homepage"`` or ``rel="download"``, without needing the old
   PyPI-specific visible markup.

 * Suppressed warning message about possibly-misspelled project name, if an egg
   or link for that project name has already been seen.

0.6b3
 * Fix local ``--find-links`` eggs not being copied except with
   ``--always-copy``.

 * Fix sometimes not detecting local packages installed outside of "site"
   directories.

 * Fix mysterious errors during initial ``setuptools`` install, caused by
   ``ez_setup`` trying to run ``easy_install`` twice, due to a code fallthru
   after deleting the egg from which it's running.

0.6b2
 * Don't install or update a ``site.py`` patch when installing to a
   ``PYTHONPATH`` directory with ``--multi-version``, unless an
   ``easy-install.pth`` file is already in use there.

 * Construct ``.pth`` file paths in such a way that installing an egg whose
   name begins with ``import`` doesn't cause a syntax error.

 * Fixed a bogus warning message that wasn't updated since the 0.5 versions.

0.6b1
 * Better ambiguity management: accept ``#egg`` name/version even if processing
   what appears to be a correctly-named distutils file, and ignore ``.egg``
   files with no ``-``, since valid Python ``.egg`` files always have a version
   number (but Scheme eggs often don't).

 * Support ``file://`` links to directories in ``--find-links``, so that
   easy_install can build packages from local source checkouts.

 * Added automatic retry for Sourceforge mirrors.  The new download process is
   to first just try dl.sourceforge.net, then randomly select mirror IPs and
   remove ones that fail, until something works.  The removed IPs stay removed
   for the remainder of the run.

 * Ignore bdist_dumb distributions when looking at download URLs.

0.6a11
 * Process ``dependency_links.txt`` if found in a distribution, by adding the
   URLs to the list for scanning.

 * Use relative paths in ``.pth`` files when eggs are being installed to the
   same directory as the ``.pth`` file.  This maximizes portability of the
   target directory when building applications that contain eggs.

 * Added ``easy_install-N.N`` script(s) for convenience when using multiple
   Python versions.

 * Added automatic handling of installation conflicts.  Eggs are now shifted to
   the front of sys.path, in an order consistent with where they came from,
   making EasyInstall seamlessly co-operate with system package managers.

   The ``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk`` options
   are now no longer necessary, and will generate warnings at the end of a
   run if you use them.

 * Don't recursively traverse subdirectories given to ``--find-links``.

0.6a10
 * Added exhaustive testing of the install directory, including a spawn test
   for ``.pth`` file support, and directory writability/existence checks.  This
   should virtually eliminate the need to set or configure ``--site-dirs``.

 * Added ``--prefix`` option for more do-what-I-mean-ishness in the absence of
   RTFM-ing.  :)

 * Enhanced ``PYTHONPATH`` support so that you don't have to put any eggs on it
   manually to make it work.  ``--multi-version`` is no longer a silent
   default; you must explicitly use it if installing to a non-PYTHONPATH,
   non-"site" directory.

 * Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``,
   ``--install-dir``, and ``--script-dir`` options, whether on the command line
   or in configuration files.

 * Improved SourceForge mirror processing to work faster and be less affected
   by transient HTML changes made by SourceForge.

 * PyPI searches now use the exact spelling of requirements specified on the
   command line or in a project's ``install_requires``.  Previously, a
   normalized form of the name was used, which could lead to unnecessary
   full-index searches when a project's name had an underscore (``_``) in it.

 * EasyInstall can now download bare ``.py`` files and wrap them in an egg,
   as long as you include an ``#egg=name-version`` suffix on the URL, or if
   the ``.py`` file is listed as the "Download URL" on the project's PyPI page.
   This allows third parties to "package" trivial Python modules just by
   linking to them (e.g. from within their own PyPI page or download links
   page).

 * The ``--always-copy`` option now skips "system" and "development" eggs since
   they can't be reliably copied.  Note that this may cause EasyInstall to
   choose an older version of a package than what you expected, or it may cause
   downloading and installation of a fresh version of what's already installed.

 * The ``--find-links`` option previously scanned all supplied URLs and
   directories as early as possible, but now only directories and direct
   archive links are scanned immediately.  URLs are not retrieved unless a
   package search was already going to go online due to a package not being
   available locally, or due to the use of the ``--update`` or ``-U`` option.

 * Fixed the annoying ``--help-commands`` wart.

0.6a9
 * Fixed ``.pth`` file processing picking up nested eggs (i.e. ones inside
   "baskets") when they weren't explicitly listed in the ``.pth`` file.

 * If more than one URL appears to describe the exact same distribution, prefer
   the shortest one.  This helps to avoid "table of contents" CGI URLs like the
   ones on effbot.org.

 * Quote arguments to python.exe (including python's path) to avoid problems
   when Python (or a script) is installed in a directory whose name contains
   spaces on Windows.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.

0.6a8
 * Update for changed SourceForge mirror format

 * Fixed not installing dependencies for some packages fetched via Subversion

 * Fixed dependency installation with ``--always-copy`` not using the same
   dependency resolution procedure as other operations.

 * Fixed not fully removing temporary directories on Windows, if a Subversion
   checkout left read-only files behind

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

0.6a7
 * Fixed not being able to install Windows script wrappers using Python 2.3

0.6a6
 * Added support for "traditional" PYTHONPATH-based non-root installation, and
   also the convenient ``virtual-python.py`` script, based on a contribution
   by Ian Bicking.  The setuptools egg now contains a hacked ``site`` module
   that makes the PYTHONPATH-based approach work with .pth files, so that you
   can get the full EasyInstall feature set on such installations.

 * Added ``--no-deps`` and ``--allow-hosts`` options.

 * Improved Windows ``.exe`` script wrappers so that the script can have the
   same name as a module without confusing Python.

 * Changed dependency processing so that it's breadth-first, allowing a
   depender's preferences to override those of a dependee, to prevent conflicts
   when a lower version is acceptable to the dependee, but not the depender.
   Also, ensure that currently installed/selected packages aren't given
   precedence over ones desired by a package being installed, which could
   cause conflict errors.

0.6a3
 * Improved error message when trying to use old ways of running
   ``easy_install``.  Removed the ability to run via ``python -m`` or by
   running ``easy_install.py``; ``easy_install`` is the command to run on all
   supported platforms.

 * Improved wrapper script generation and runtime initialization so that a
   VersionConflict doesn't occur if you later install a competing version of a
   needed package as the default version of that package.

 * Fixed a problem parsing version numbers in ``#egg=`` links.

0.6a2
 * EasyInstall can now install "console_scripts" defined by packages that use
   ``setuptools`` and define appropriate entry points.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are installed without a file extension.

 * Using ``python -m easy_install`` or running ``easy_install.py`` is now
   DEPRECATED, since an ``easy_install`` wrapper is now available on all
   platforms.

0.6a1
 * EasyInstall now does MD5 validation of downloads from PyPI, or from any link
   that has an "#md5=..." trailer with a 32-digit lowercase hex md5 digest.

 * EasyInstall now handles symlinks in target directories by removing the link,
   rather than attempting to overwrite the link's destination.  This makes it
   easier to set up an alternate Python "home" directory (as described above in
   the `Non-Root Installation`_ section).

 * Added support for handling MacOS platform information in ``.egg`` filenames,
   based on a contribution by Kevin Dangoor.  You may wish to delete and
   reinstall any eggs whose filename includes "darwin" and "Power_Macintosh",
   because the format for this platform information has changed so that minor
   OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a
   previous OS version to become obsolete.

 * easy_install's dependency processing algorithms have changed.  When using
   ``--always-copy``, it now ensures that dependencies are copied too.  When
   not using ``--always-copy``, it tries to use a single resolution loop,
   rather than recursing.

 * Fixed installing extra ``.pyc`` or ``.pyo`` files for scripts with ``.py``
   extensions.

 * Added ``--site-dirs`` option to allow adding custom "site" directories.
   Made ``easy-install.pth`` work in platform-specific alternate site
   directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X).

 * If you manually delete the current version of a package, the next run of
   EasyInstall against the target directory will now remove the stray entry
   from the ``easy-install.pth`` file.

 * EasyInstall now recognizes URLs with a ``#egg=project_name`` fragment ID
   as pointing to the named project's source checkout.  Such URLs have a lower
   match precedence than any other kind of distribution, so they'll only be
   used if they have a higher version number than any other available
   distribution, or if you use the ``--editable`` option.  The ``#egg``
   fragment can contain a version if it's formatted as ``#egg=proj-ver``,
   where ``proj`` is the project name, and ``ver`` is the version number.  You
   *must* use the format for these values that the ``bdist_egg`` command uses;
   i.e., all non-alphanumeric runs must be condensed to single underscore
   characters.

 * Added the ``--editable`` option; see `Editing and Viewing Source Packages`_
   above for more info.  Also, slightly changed the behavior of the
   ``--build-directory`` option.

 * Fixed the setup script sandbox facility not recognizing certain paths as
   valid on case-insensitive platforms.

0.5a12
 * Fix ``python -m easy_install`` not working due to setuptools being installed
   as a zipfile.  Update safety scanner to check for modules that might be used
   as ``python -m`` scripts.

 * Misc. fixes for win32.exe support, including changes to support Python 2.4's
   changed ``bdist_wininst`` format.

0.5a10
 * Put the ``easy_install`` module back in as a module, as it's needed for
   ``python -m`` to run it!

 * Allow ``--find-links/-f`` to accept local directories or filenames as well
   as URLs.

0.5a9
 * EasyInstall now automatically detects when an "unmanaged" package or
   module is going to be on ``sys.path`` ahead of a package you're installing,
   thereby preventing the newer version from being imported.  By default, it
   will abort installation to alert you of the problem, but there are also
   new options (``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk``)
   available to change the default behavior.  (Note: this new feature doesn't
   take effect for egg files that were built with older ``setuptools``
   versions, because they lack the new metadata file required to implement it.)

 * The ``easy_install`` distutils command now uses ``DistutilsError`` as its
   base error type for errors that should just issue a message to stderr and
   exit the program without a traceback.

 * EasyInstall can now be given a path to a directory containing a setup
   script, and it will attempt to build and install the package there.

 * EasyInstall now performs a safety analysis on module contents to determine
   whether a package is likely to run in zipped form, and displays
   information about what modules may be doing introspection that would break
   when running as a zipfile.

 * Added the ``--always-unzip/-Z`` option, to force unzipping of packages that
   would ordinarily be considered safe to unzip, and changed the meaning of
   ``--zip-ok/-z`` to "always leave everything zipped".

0.5a8
 * There is now a separate documentation page for `setuptools`_; revision
   history that's not specific to EasyInstall has been moved to that page.

 .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools

0.5a5
 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

0.5a4
 * Added ``--always-copy/-a`` option to always copy needed packages to the
   installation directory, even if they're already present elsewhere on
   sys.path. (In previous versions, this was the default behavior, but now
   you must request it.)

 * Added ``--upgrade/-U`` option to force checking PyPI for latest available
   version(s) of all packages requested by name and version, even if a matching
   version is available locally.

 * Added automatic installation of dependencies declared by a distribution
   being installed.  These dependencies must be listed in the distribution's
   ``EGG-INFO`` directory, so the distribution has to have declared its
   dependencies by using setuptools.  If a package has requirements it didn't
   declare, you'll still have to deal with them yourself.  (E.g., by asking
   EasyInstall to find and install them.)

 * Added the ``--record`` option to ``easy_install`` for the benefit of tools
   that run ``setup.py install --record=filename`` on behalf of another
   packaging system.)

0.5a3
 * Fixed not setting script permissions to allow execution.

 * Improved sandboxing so that setup scripts that want a temporary directory
   (e.g. pychecker) can still run in the sandbox.

0.5a2
 * Fix stupid stupid refactoring-at-the-last-minute typos.  :(

0.5a1
 * Added support for converting ``.win32.exe`` installers to eggs on the fly.
   EasyInstall will now recognize such files by name and install them.

 * Fixed a problem with picking the "best" version to install (versions were
   being sorted as strings, rather than as parsed values)

0.4a4
 * Added support for the distutils "verbose/quiet" and "dry-run" options, as
   well as the "optimize" flag.

 * Support downloading packages that were uploaded to PyPI (by scanning all
   links on package pages, not just the homepage/download links).

0.4a3
 * Add progress messages to the search/download process so that you can tell
   what URLs it's reading to find download links.  (Hopefully, this will help
   people report out-of-date and broken links to package authors, and to tell
   when they've asked for a package that doesn't exist.)

0.4a2
 * Added support for installing scripts

 * Added support for setting options via distutils configuration files, and
   using distutils' default options as a basis for EasyInstall's defaults.

 * Renamed ``--scan-url/-s`` to ``--find-links/-f`` to free up ``-s`` for the
   script installation directory option.

 * Use ``urllib2`` instead of ``urllib``, to allow use of ``https:`` URLs if
   Python includes SSL support.

0.4a1
 * Added ``--scan-url`` and ``--index-url`` options, to scan download pages
   and search PyPI for needed packages.

0.3a4
 * Restrict ``--build-directory=DIR/-b DIR`` option to only be used with single
   URL installs, to avoid running the wrong setup.py.

0.3a3
 * Added ``--build-directory=DIR/-b DIR`` option.

 * Added "installation report" that explains how to use 'require()' when doing
   a multiversion install or alternate installation directory.

 * Added SourceForge mirror auto-select (Contributed by Ian Bicking)

 * Added "sandboxing" that stops a setup script from running if it attempts to
   write to the filesystem outside of the build area

 * Added more workarounds for packages with quirky ``install_data`` hacks

0.3a2
 * Added subversion download support for ``svn:`` and ``svn+`` URLs, as well as
   automatic recognition of HTTP subversion URLs (Contributed by Ian Bicking)

 * Misc. bug fixes

0.3a1
 * Initial release.


Future Plans
============

* Additional utilities to list/remove/verify packages
* Signature checking?  SSL?  Ability to suppress PyPI search?
* Display byte progress meter when downloading distributions and long pages?
* Redirect stdout/stderr to log during run_setup?

doc/alt-python27-setuptools/developer-guide.txt000064400000010026150404023530015614 0ustar00================================
Developer's Guide for Setuptools
================================

If you want to know more about contributing on Setuptools, this is the place.


.. contents:: **Table of Contents**


-------------------
Recommended Reading
-------------------

Please read `How to write the perfect pull request
<https://blog.jaraco.com/how-to-write-perfect-pull-request/>`_ for some tips
on contributing to open source projects. Although the article is not
authoritative, it was authored by the maintainer of Setuptools, so reflects
his opinions and will improve the likelihood of acceptance and quality of
contribution.

------------------
Project Management
------------------

Setuptools is maintained primarily in Github at `this home
<https://github.com/pypa/setuptools>`_. Setuptools is maintained under the
Python Packaging Authority (PyPA) with several core contributors. All bugs
for Setuptools are filed and the canonical source is maintained in Github.

User support and discussions are done through the issue tracker (for specific)
issues, through the distutils-sig mailing list, or on IRC (Freenode) at
#pypa.

Discussions about development happen on the pypa-dev mailing list or on
`Gitter <https://gitter.im/pypa/setuptools>`_.

-----------------
Authoring Tickets
-----------------

Before authoring any source code, it's often prudent to file a ticket
describing the motivation behind making changes. First search to see if a
ticket already exists for your issue. If not, create one. Try to think from
the perspective of the reader. Explain what behavior you expected, what you
got instead, and what factors might have contributed to the unexpected
behavior. In Github, surround a block of code or traceback with the triple
backtick "\`\`\`" so that it is formatted nicely.

Filing a ticket provides a forum for justification, discussion, and
clarification. The ticket provides a record of the purpose for the change and
any hard decisions that were made. It provides a single place for others to
reference when trying to understand why the software operates the way it does
or why certain changes were made.

Setuptools makes extensive use of hyperlinks to tickets in the changelog so
that system integrators and other users can get a quick summary, but then
jump to the in-depth discussion about any subject referenced.

-----------
Source Code
-----------

Grab the code at Github::

    $ git checkout https://github.com/pypa/setuptools

If you want to contribute changes, we recommend you fork the repository on
Github, commit the changes to your repository, and then make a pull request
on Github. If you make some changes, don't forget to:

- add a note in CHANGES.rst

Please commit all changes in the 'master' branch against the latest available
commit or for bug-fixes, against an earlier commit or release in which the
bug occurred.

If you find yourself working on more than one issue at a time, Setuptools
generally prefers Git-style branches, so use Mercurial bookmarks or Git
branches or multiple forks to maintain separate efforts.

The Continuous Integration tests that validate every release are run
from this repository.

For posterity, the old `Bitbucket mirror
<https://bitbucket.org/pypa/setuptools>`_ is available.

-------
Testing
-------

The primary tests are run using tox. To run the tests, first make
sure you have tox installed, then invoke it::

    $ tox

Under continuous integration, additional tests may be run. See the
``.travis.yml`` file for full details on the tests run under Travis-CI.

-------------------
Semantic Versioning
-------------------

Setuptools follows ``semver``.

.. explain value of reflecting meaning in versions.

----------------------
Building Documentation
----------------------

Setuptools relies on the Sphinx system for building documentation.
To accommodate RTD, docs must be built from the docs/ directory.

To build them, you need to have installed the requirements specified
in docs/requirements.txt. One way to do this is to use rwt:

    setuptools/docs$ python -m rwt -r requirements.txt -- -m sphinx . html
doc/alt-python27-setuptools/development.txt000064400000002702150404023530015060 0ustar00-------------------------
Development on Setuptools
-------------------------

Setuptools is maintained by the Python community under the Python Packaging
Authority (PyPA) and led by Jason R. Coombs.

This document describes the process by which Setuptools is developed.
This document assumes the reader has some passing familiarity with
*using* setuptools, the ``pkg_resources`` module, and EasyInstall.  It
does not attempt to explain basic concepts like inter-project
dependencies, nor does it contain detailed lexical syntax for most
file formats.  Neither does it explain concepts like "namespace
packages" or "resources" in any detail, as all of these subjects are
covered at length in the setuptools developer's guide and the
``pkg_resources`` reference manual.

Instead, this is **internal** documentation for how those concepts and
features are *implemented* in concrete terms.  It is intended for people
who are working on the setuptools code base, who want to be able to
troubleshoot setuptools problems, want to write code that reads the file
formats involved, or want to otherwise tinker with setuptools-generated
files and directories.

Note, however, that these are all internal implementation details and
are therefore subject to change; stick to the published API if you don't
want to be responsible for keeping your code from breaking when
setuptools changes.  You have been warned.

.. toctree::
   :maxdepth: 1

   developer-guide
   formats
   releases
doc/alt-python27-setuptools/roadmap.txt000064400000000247150404023530014163 0ustar00=======
Roadmap
=======

Setuptools is primarily in maintenance mode. The project attempts to address
user issues, concerns, and feature requests in a timely fashion.
doc/alt-python27-setuptools/formats.txt000064400000075012150404023530014215 0ustar00=====================================
The Internal Structure of Python Eggs
=====================================

STOP! This is not the first document you should read!



.. contents:: **Table of Contents**


----------------------
Eggs and their Formats
----------------------

A "Python egg" is a logical structure embodying the release of a
specific version of a Python project, comprising its code, resources,
and metadata. There are multiple formats that can be used to physically
encode a Python egg, and others can be developed. However, a key
principle of Python eggs is that they should be discoverable and
importable. That is, it should be possible for a Python application to
easily and efficiently find out what eggs are present on a system, and
to ensure that the desired eggs' contents are importable.

There are two basic formats currently implemented for Python eggs:

1. ``.egg`` format: a directory or zipfile *containing* the project's
   code and resources, along with an ``EGG-INFO`` subdirectory that
   contains the project's metadata

2. ``.egg-info`` format: a file or directory placed *adjacent* to the
   project's code and resources, that directly contains the project's
   metadata.

Both formats can include arbitrary Python code and resources, including
static data files, package and non-package directories, Python
modules, C extension modules, and so on.  But each format is optimized
for different purposes.

The ``.egg`` format is well-suited to distribution and the easy
uninstallation or upgrades of code, since the project is essentially
self-contained within a single directory or file, unmingled with any
other projects' code or resources.  It also makes it possible to have
multiple versions of a project simultaneously installed, such that
individual programs can select the versions they wish to use.

The ``.egg-info`` format, on the other hand, was created to support
backward-compatibility, performance, and ease of installation for system
packaging tools that expect to install all projects' code and resources
to a single directory (e.g. ``site-packages``).  Placing the metadata
in that same directory simplifies the installation process, since it
isn't necessary to create ``.pth`` files or otherwise modify
``sys.path`` to include each installed egg.

Its disadvantage, however, is that it provides no support for clean
uninstallation or upgrades, and of course only a single version of a
project can be installed to a given directory. Thus, support from a
package management tool is required. (This is why setuptools' "install"
command refers to this type of egg installation as "single-version,
externally managed".)  Also, they lack sufficient data to allow them to
be copied from their installation source.  easy_install can "ship" an
application by copying ``.egg`` files or directories to a target
location, but it cannot do this for ``.egg-info`` installs, because
there is no way to tell what code and resources belong to a particular
egg -- there may be several eggs "scrambled" together in a single
installation location, and the ``.egg-info`` format does not currently
include a way to list the files that were installed.  (This may change
in a future version.)


Code and Resources
==================

The layout of the code and resources is dictated by Python's normal
import layout, relative to the egg's "base location".

For the ``.egg`` format, the base location is the ``.egg`` itself. That
is, adding the ``.egg`` filename or directory name to ``sys.path``
makes its contents importable.

For the ``.egg-info`` format, however, the base location is the
directory that *contains* the ``.egg-info``, and thus it is the
directory that must be added to ``sys.path`` to make the egg importable.
(Note that this means that the "normal" installation of a package to a
``sys.path`` directory is sufficient to make it an "egg" if it has an
``.egg-info`` file or directory installed alongside of it.)


Project Metadata
=================

If eggs contained only code and resources, there would of course be
no difference between them and any other directory or zip file on
``sys.path``.  Thus, metadata must also be included, using a metadata
file or directory.

For the ``.egg`` format, the metadata is placed in an ``EGG-INFO``
subdirectory, directly within the ``.egg`` file or directory.  For the
``.egg-info`` format, metadata is stored directly within the
``.egg-info`` directory itself.

The minimum project metadata that all eggs must have is a standard
Python ``PKG-INFO`` file, named ``PKG-INFO`` and placed within the
metadata directory appropriate to the format.  Because it's possible for
this to be the only metadata file included, ``.egg-info`` format eggs
are not required to be a directory; they can just be a ``.egg-info``
file that directly contains the ``PKG-INFO`` metadata.  This eliminates
the need to create a directory just to store one file.  This option is
*not* available for ``.egg`` formats, since setuptools always includes
other metadata.  (In fact, setuptools itself never generates
``.egg-info`` files, either; the support for using files was added so
that the requirement could easily be satisfied by other tools, such
as the distutils in Python 2.5).

In addition to the ``PKG-INFO`` file, an egg's metadata directory may
also include files and directories representing various forms of
optional standard metadata (see the section on `Standard Metadata`_,
below) or user-defined metadata required by the project.  For example,
some projects may define a metadata format to describe their application
plugins, and metadata in this format would then be included by plugin
creators in their projects' metadata directories.


Filename-Embedded Metadata
==========================

To allow introspection of installed projects and runtime resolution of
inter-project dependencies, a certain amount of information is embedded
in egg filenames.  At a minimum, this includes the project name, and
ideally will also include the project version number.  Optionally, it
can also include the target Python version and required runtime
platform if platform-specific C code is included.  The syntax of an
egg filename is as follows::

    name ["-" version ["-py" pyver ["-" required_platform]]] "." ext

The "name" and "version" should be escaped using the ``to_filename()``
function provided by ``pkg_resources``, after first processing them with
``safe_name()`` and ``safe_version()`` respectively.  These latter two
functions can also be used to later "unescape" these parts of the
filename.  (For a detailed description of these transformations, please
see the "Parsing Utilities" section of the ``pkg_resources`` manual.)

The "pyver" string is the Python major version, as found in the first
3 characters of ``sys.version``.  "required_platform" is essentially
a distutils ``get_platform()`` string, but with enhancements to properly
distinguish Mac OS versions.  (See the ``get_build_platform()``
documentation in the "Platform Utilities" section of the
``pkg_resources`` manual for more details.)

Finally, the "ext" is either ``.egg`` or ``.egg-info``, as appropriate
for the egg's format.

Normally, an egg's filename should include at least the project name and
version, as this allows the runtime system to find desired project
versions without having to read the egg's PKG-INFO to determine its
version number.

Setuptools, however, only includes the version number in the filename
when an ``.egg`` file is built using the ``bdist_egg`` command, or when
an ``.egg-info`` directory is being installed by the
``install_egg_info`` command. When generating metadata for use with the
original source tree, it only includes the project name, so that the
directory will not have to be renamed each time the project's version
changes.

This is especially important when version numbers change frequently, and
the source metadata directory is kept under version control with the
rest of the project.  (As would be the case when the project's source
includes project-defined metadata that is not generated from by
setuptools from data in the setup script.)


Egg Links
=========

In addition to the ``.egg`` and ``.egg-info`` formats, there is a third
egg-related extension that you may encounter on occasion: ``.egg-link``
files.

These files are not eggs, strictly speaking. They simply provide a way
to reference an egg that is not physically installed in the desired
location. They exist primarily as a cross-platform alternative to
symbolic links, to support "installing" code that is being developed in
a different location than the desired installation location. For
example, if a user is developing an application plugin in their home
directory, but the plugin needs to be "installed" in an application
plugin directory, running "setup.py develop -md /path/to/app/plugins"
will install an ``.egg-link`` file in ``/path/to/app/plugins``, that
tells the egg runtime system where to find the actual egg (the user's
project source directory and its ``.egg-info`` subdirectory).

``.egg-link`` files are named following the format for ``.egg`` and
``.egg-info`` names, but only the project name is included; no version,
Python version, or platform information is included.  When the runtime
searches for available eggs, ``.egg-link`` files are opened and the
actual egg file/directory name is read from them.

Each ``.egg-link`` file should contain a single file or directory name,
with no newlines.  This filename should be the base location of one or
more eggs.  That is, the name must either end in ``.egg``, or else it
should be the parent directory of one or more ``.egg-info`` format eggs.

As of setuptools 0.6c6, the path may be specified as a platform-independent
(i.e. ``/``-separated) relative path from the directory containing the
``.egg-link`` file, and a second line may appear in the file, specifying a
platform-independent relative path from the egg's base directory to its
setup script directory.  This allows installation tools such as EasyInstall
to find the project's setup directory and build eggs or perform other setup
commands on it.


-----------------
Standard Metadata
-----------------

In addition to the minimum required ``PKG-INFO`` metadata, projects can
include a variety of standard metadata files or directories, as
described below.  Except as otherwise noted, these files and directories
are automatically generated by setuptools, based on information supplied
in the setup script or through analysis of the project's code and
resources.

Most of these files and directories are generated via "egg-info
writers" during execution of the setuptools ``egg_info`` command, and
are listed in the ``egg_info.writers`` entry point group defined by
setuptools' own ``setup.py`` file.

Project authors can register their own metadata writers as entry points
in this group (as described in the setuptools manual under "Adding new
EGG-INFO Files") to cause setuptools to generate project-specific
metadata files or directories during execution of the ``egg_info``
command.  It is up to project authors to document these new metadata
formats, if they create any.


``.txt`` File Formats
=====================

Files described in this section that have ``.txt`` extensions have a
simple lexical format consisting of a sequence of text lines, each line
terminated by a linefeed character (regardless of platform).  Leading
and trailing whitespace on each line is ignored, as are blank lines and
lines whose first nonblank character is a ``#`` (comment symbol).  (This
is the parsing format defined by the ``yield_lines()`` function of
the ``pkg_resources`` module.)

All ``.txt`` files defined by this section follow this format, but some
are also "sectioned" files, meaning that their contents are divided into
sections, using square-bracketed section headers akin to Windows
``.ini`` format.  Note that this does *not* imply that the lines within
the sections follow an ``.ini`` format, however.  Please see an
individual metadata file's documentation for a description of what the
lines and section names mean in that particular file.

Sectioned files can be parsed using the ``split_sections()`` function;
see the "Parsing Utilities" section of the ``pkg_resources`` manual for
for details.


Dependency Metadata
===================


``requires.txt``
----------------

This is a "sectioned" text file.  Each section is a sequence of
"requirements", as parsed by the ``parse_requirements()`` function;
please see the ``pkg_resources`` manual for the complete requirement
parsing syntax.

The first, unnamed section (i.e., before the first section header) in
this file is the project's core requirements, which must be installed
for the project to function.  (Specified using the ``install_requires``
keyword to ``setup()``).

The remaining (named) sections describe the project's "extra"
requirements, as specified using the ``extras_require`` keyword to
``setup()``.  The section name is the name of the optional feature, and
the section body lists that feature's dependencies.

Note that it is not normally necessary to inspect this file directly;
``pkg_resources.Distribution`` objects have a ``requires()`` method
that can be used to obtain ``Requirement`` objects describing the
project's core and optional dependencies.


``setup_requires.txt``
----------------------

Much like ``requires.txt`` except represents the requirements
specified by the ``setup_requires`` parameter to the Distribution.


``dependency_links.txt``
------------------------

A list of dependency URLs, one per line, as specified using the
``dependency_links`` keyword to ``setup()``.  These may be direct
download URLs, or the URLs of web pages containing direct download
links, and will be used by EasyInstall to find dependencies, as though
the user had manually provided them via the ``--find-links`` command
line option.  Please see the setuptools manual and EasyInstall manual
for more information on specifying this option, and for information on
how EasyInstall processes ``--find-links`` URLs.


``depends.txt`` -- Obsolete, do not create!
-------------------------------------------

This file follows an identical format to ``requires.txt``, but is
obsolete and should not be used.  The earliest versions of setuptools
required users to manually create and maintain this file, so the runtime
still supports reading it, if it exists.  The new filename was created
so that it could be automatically generated from ``setup()`` information
without overwriting an existing hand-created ``depends.txt``, if one
was already present in the project's source ``.egg-info`` directory.


``namespace_packages.txt`` -- Namespace Package Metadata
========================================================

A list of namespace package names, one per line, as supplied to the
``namespace_packages`` keyword to ``setup()``.  Please see the manuals
for setuptools and ``pkg_resources`` for more information about
namespace packages.


``entry_points.txt`` -- "Entry Point"/Plugin Metadata
=====================================================

This is a "sectioned" text file, whose contents encode the
``entry_points`` keyword supplied to ``setup()``.  All sections are
named, as the section names specify the entry point groups in which the
corresponding section's entry points are registered.

Each section is a sequence of "entry point" lines, each parseable using
the ``EntryPoint.parse`` classmethod; please see the ``pkg_resources``
manual for the complete entry point parsing syntax.

Note that it is not necessary to parse this file directly; the
``pkg_resources`` module provides a variety of APIs to locate and load
entry points automatically.  Please see the setuptools and
``pkg_resources`` manuals for details on the nature and uses of entry
points.


The ``scripts`` Subdirectory
============================

This directory is currently only created for ``.egg`` files built by
the setuptools ``bdist_egg`` command.  It will contain copies of all
of the project's "traditional" scripts (i.e., those specified using the
``scripts`` keyword to ``setup()``).  This is so that they can be
reconstituted when an ``.egg`` file is installed.

The scripts are placed here using the distutils' standard
``install_scripts`` command, so any ``#!`` lines reflect the Python
installation where the egg was built.  But instead of copying the
scripts to the local script installation directory, EasyInstall writes
short wrapper scripts that invoke the original scripts from inside the
egg, after ensuring that sys.path includes the egg and any eggs it
depends on.  For more about `script wrappers`_, see the section below on
`Installation and Path Management Issues`_.


Zip Support Metadata
====================


``native_libs.txt``
-------------------

A list of C extensions and other dynamic link libraries contained in
the egg, one per line.  Paths are ``/``-separated and relative to the
egg's base location.

This file is generated as part of ``bdist_egg`` processing, and as such
only appears in ``.egg`` files (and ``.egg`` directories created by
unpacking them).  It is used to ensure that all libraries are extracted
from a zipped egg at the same time, in case there is any direct linkage
between them.  Please see the `Zip File Issues`_ section below for more
information on library and resource extraction from ``.egg`` files.


``eager_resources.txt``
-----------------------

A list of resource files and/or directories, one per line, as specified
via the ``eager_resources`` keyword to ``setup()``.  Paths are
``/``-separated and relative to the egg's base location.

Resource files or directories listed here will be extracted
simultaneously, if any of the named resources are extracted, or if any
native libraries listed in ``native_libs.txt`` are extracted.  Please
see the setuptools manual for details on what this feature is used for
and how it works, as well as the `Zip File Issues`_ section below.


``zip-safe`` and ``not-zip-safe``
---------------------------------

These are zero-length files, and either one or the other should exist.
If ``zip-safe`` exists, it means that the project will work properly
when installed as an ``.egg`` zipfile, and conversely the existence of
``not-zip-safe`` means the project should not be installed as an
``.egg`` file.  The ``zip_safe`` option to setuptools' ``setup()``
determines which file will be written. If the option isn't provided,
setuptools attempts to make its own assessment of whether the package
can work, based on code and content analysis.

If neither file is present at installation time, EasyInstall defaults
to assuming that the project should be unzipped.  (Command-line options
to EasyInstall, however, take precedence even over an existing
``zip-safe`` or ``not-zip-safe`` file.)

Note that these flag files appear only in ``.egg`` files generated by
``bdist_egg``, and in ``.egg`` directories created by unpacking such an
``.egg`` file.



``top_level.txt`` -- Conflict Management Metadata
=================================================

This file is a list of the top-level module or package names provided
by the project, one Python identifier per line.

Subpackages are not included; a project containing both a ``foo.bar``
and a ``foo.baz`` would include only one line, ``foo``, in its
``top_level.txt``.

This data is used by ``pkg_resources`` at runtime to issue a warning if
an egg is added to ``sys.path`` when its contained packages may have
already been imported.

(It was also once used to detect conflicts with non-egg packages at
installation time, but in more recent versions, setuptools installs eggs
in such a way that they always override non-egg packages, thus
preventing a problem from arising.)


``SOURCES.txt`` -- Source Files Manifest
========================================

This file is roughly equivalent to the distutils' ``MANIFEST`` file.
The differences are as follows:

* The filenames always use ``/`` as a path separator, which must be
  converted back to a platform-specific path whenever they are read.

* The file is automatically generated by setuptools whenever the
  ``egg_info`` or ``sdist`` commands are run, and it is *not*
  user-editable.

Although this metadata is included with distributed eggs, it is not
actually used at runtime for any purpose.  Its function is to ensure
that setuptools-built *source* distributions can correctly discover
what files are part of the project's source, even if the list had been
generated using revision control metadata on the original author's
system.

In other words, ``SOURCES.txt`` has little or no runtime value for being
included in distributed eggs, and it is possible that future versions of
the ``bdist_egg`` and ``install_egg_info`` commands will strip it before
installation or distribution.  Therefore, do not rely on its being
available outside of an original source directory or source
distribution.


------------------------------
Other Technical Considerations
------------------------------


Zip File Issues
===============

Although zip files resemble directories, they are not fully
substitutable for them.  Most platforms do not support loading dynamic
link libraries contained in zipfiles, so it is not possible to directly
import C extensions from ``.egg`` zipfiles.  Similarly, there are many
existing libraries -- whether in Python or C -- that require actual
operating system filenames, and do not work with arbitrary "file-like"
objects or in-memory strings, and thus cannot operate directly on the
contents of zip files.

To address these issues, the ``pkg_resources`` module provides a
"resource API" to support obtaining either the contents of a resource,
or a true operating system filename for the resource.  If the egg
containing the resource is a directory, the resource's real filename
is simply returned.  However, if the egg is a zipfile, then the
resource is first extracted to a cache directory, and the filename
within the cache is returned.

The cache directory is determined by the ``pkg_resources`` API; please
see the ``set_cache_path()`` and ``get_default_cache()`` documentation
for details.


The Extraction Process
----------------------

Resources are extracted to a cache subdirectory whose name is based
on the enclosing ``.egg`` filename and the path to the resource.  If
there is already a file of the correct name, size, and timestamp, its
filename is returned to the requester.  Otherwise, the desired file is
extracted first to a temporary name generated using
``mkstemp(".$extract",target_dir)``, and then its timestamp is set to
match the one in the zip file, before renaming it to its final name.
(Some collision detection and resolution code is used to handle the
fact that Windows doesn't overwrite files when renaming.)

If a resource directory is requested, all of its contents are
recursively extracted in this fashion, to ensure that the directory
name can be used as if it were valid all along.

If the resource requested for extraction is listed in the
``native_libs.txt`` or ``eager_resources.txt`` metadata files, then
*all* resources listed in *either* file will be extracted before the
requested resource's filename is returned, thus ensuring that all
C extensions and data used by them will be simultaneously available.


Extension Import Wrappers
-------------------------

Since Python's built-in zip import feature does not support loading
C extension modules from zipfiles, the setuptools ``bdist_egg`` command
generates special import wrappers to make it work.

The wrappers are ``.py`` files (along with corresponding ``.pyc``
and/or ``.pyo`` files) that have the same module name as the
corresponding C extension.  These wrappers are located in the same
package directory (or top-level directory) within the zipfile, so that
say, ``foomodule.so`` will get a corresponding ``foo.py``, while
``bar/baz.pyd`` will get a corresponding ``bar/baz.py``.

These wrapper files contain a short stanza of Python code that asks
``pkg_resources`` for the filename of the corresponding C extension,
then reloads the module using the obtained filename.  This will cause
``pkg_resources`` to first ensure that all of the egg's C extensions
(and any accompanying "eager resources") are extracted to the cache
before attempting to link to the C library.

Note, by the way, that ``.egg`` directories will also contain these
wrapper files.  However, Python's default import priority is such that
C extensions take precedence over same-named Python modules, so the
import wrappers are ignored unless the egg is a zipfile.


Installation and Path Management Issues
=======================================

Python's initial setup of ``sys.path`` is very dependent on the Python
version and installation platform, as well as how Python was started
(i.e., script vs. ``-c`` vs. ``-m`` vs. interactive interpreter).
In fact, Python also provides only two relatively robust ways to affect
``sys.path`` outside of direct manipulation in code: the ``PYTHONPATH``
environment variable, and ``.pth`` files.

However, with no cross-platform way to safely and persistently change
environment variables, this leaves ``.pth`` files as EasyInstall's only
real option for persistent configuration of ``sys.path``.

But ``.pth`` files are rather strictly limited in what they are allowed
to do normally.  They add directories only to the *end* of ``sys.path``,
after any locally-installed ``site-packages`` directory, and they are
only processed *in* the ``site-packages`` directory to start with.

This is a double whammy for users who lack write access to that
directory, because they can't create a ``.pth`` file that Python will
read, and even if a sympathetic system administrator adds one for them
that calls ``site.addsitedir()`` to allow some other directory to
contain ``.pth`` files, they won't be able to install newer versions of
anything that's installed in the systemwide ``site-packages``, because
their paths will still be added *after* ``site-packages``.

So EasyInstall applies two workarounds to solve these problems.

The first is that EasyInstall leverages ``.pth`` files' "import" feature
to manipulate ``sys.path`` and ensure that anything EasyInstall adds
to a ``.pth`` file will always appear before both the standard library
and the local ``site-packages`` directories.  Thus, it is always
possible for a user who can write a Python-read ``.pth`` file to ensure
that their packages come first in their own environment.

Second, when installing to a ``PYTHONPATH`` directory (as opposed to
a "site" directory like ``site-packages``) EasyInstall will also install
a special version of the ``site`` module.  Because it's in a
``PYTHONPATH`` directory, this module will get control before the
standard library version of ``site`` does.  It will record the state of
``sys.path`` before invoking the "real" ``site`` module, and then
afterwards it processes any ``.pth`` files found in ``PYTHONPATH``
directories, including all the fixups needed to ensure that eggs always
appear before the standard library in sys.path, but are in a relative
order to one another that is defined by their ``PYTHONPATH`` and
``.pth``-prescribed sequence.

The net result of these changes is that ``sys.path`` order will be
as follows at runtime:

1. The ``sys.argv[0]`` directory, or an empty string if no script
   is being executed.

2. All eggs installed by EasyInstall in any ``.pth`` file in each
   ``PYTHONPATH`` directory, in order first by ``PYTHONPATH`` order,
   then normal ``.pth`` processing order (which is to say alphabetical
   by ``.pth`` filename, then by the order of listing within each
   ``.pth`` file).

3. All eggs installed by EasyInstall in any ``.pth`` file in each "site"
   directory (such as ``site-packages``), following the same ordering
   rules as for the ones on ``PYTHONPATH``.

4. The ``PYTHONPATH`` directories themselves, in their original order

5. Any paths from ``.pth`` files found on ``PYTHONPATH`` that were *not*
   eggs installed by EasyInstall, again following the same relative
   ordering rules.

6. The standard library and "site" directories, along with the contents
   of any ``.pth`` files found in the "site" directories.

Notice that sections 1, 4, and 6 comprise the "normal" Python setup for
``sys.path``.  Sections 2 and 3 are inserted to support eggs, and
section 5 emulates what the "normal" semantics of ``.pth`` files on
``PYTHONPATH`` would be if Python natively supported them.

For further discussion of the tradeoffs that went into this design, as
well as notes on the actual magic inserted into ``.pth`` files to make
them do these things, please see also the following messages to the
distutils-SIG mailing list:

* http://mail.python.org/pipermail/distutils-sig/2006-February/006026.html
* http://mail.python.org/pipermail/distutils-sig/2006-March/006123.html


Script Wrappers
---------------

EasyInstall never directly installs a project's original scripts to
a script installation directory.  Instead, it writes short wrapper
scripts that first ensure that the project's dependencies are active
on sys.path, before invoking the original script.  These wrappers
have a #! line that points to the version of Python that was used to
install them, and their second line is always a comment that indicates
the type of script wrapper, the project version required for the script
to run, and information identifying the script to be invoked.

The format of this marker line is::

    "# EASY-INSTALL-" script_type ": " tuple_of_strings "\n"

The ``script_type`` is one of ``SCRIPT``, ``DEV-SCRIPT``, or
``ENTRY-SCRIPT``.  The ``tuple_of_strings`` is a comma-separated
sequence of Python string constants.  For ``SCRIPT`` and ``DEV-SCRIPT``
wrappers, there are two strings: the project version requirement, and
the script name (as a filename within the ``scripts`` metadata
directory).  For ``ENTRY-SCRIPT`` wrappers, there are three:
the project version requirement, the entry point group name, and the
entry point name.  (See the "Automatic Script Creation" section in the
setuptools manual for more information about entry point scripts.)

In each case, the project version requirement string will be a string
parseable with the ``pkg_resources`` modules' ``Requirement.parse()``
classmethod.  The only difference between a ``SCRIPT`` wrapper and a
``DEV-SCRIPT`` is that a ``DEV-SCRIPT`` actually executes the original
source script in the project's source tree, and is created when the
"setup.py develop" command is run.  A ``SCRIPT`` wrapper, on the other
hand, uses the "installed" script written to the ``EGG-INFO/scripts``
subdirectory of the corresponding ``.egg`` zipfile or directory.
(``.egg-info`` eggs do not have script wrappers associated with them,
except in the "setup.py develop" case.)

The purpose of including the marker line in generated script wrappers is
to facilitate introspection of installed scripts, and their relationship
to installed eggs.  For example, an uninstallation tool could use this
data to identify what scripts can safely be removed, and/or identify
what scripts would stop working if a particular egg is uninstalled.

doc/alt-python27-setuptools/python3.txt000064400000007602150404023530014146 0ustar00=====================================================
Supporting both Python 2 and Python 3 with Setuptools
=====================================================

Starting with Distribute version 0.6.2 and Setuptools 0.7, the Setuptools
project supported Python 3. Installing and
using setuptools for Python 3 code works exactly the same as for Python 2
code.

Setuptools provides a facility to invoke 2to3 on the code as a part of the
build process, by setting the keyword parameter ``use_2to3`` to True, but
the Setuptools strongly recommends instead developing a unified codebase
using `six <https://pypi.python.org/pypi/six>`_,
`future <https://pypi.python.org/pypi/future>`_, or another compatibility
library.


Using 2to3
==========

Setuptools attempts to make the porting process easier by automatically
running
2to3 as a part of running tests. To do so, you need to configure the
setup.py so that you can run the unit tests with ``python setup.py test``.

See :ref:`test` for more information on this.

Once you have the tests running under Python 2, you can add the use_2to3
keyword parameters to setup(), and start running the tests under Python 3.
The test command will now first run the build command during which the code
will be converted with 2to3, and the tests will then be run from the build
directory, as opposed from the source directory as is normally done.

Setuptools will convert all Python files, and also all doctests in Python
files. However, if you have doctests located in separate text files, these
will not automatically be converted. By adding them to the
``convert_2to3_doctests`` keyword parameter Setuptools will convert them as
well.

By default, the conversion uses all fixers in the ``lib2to3.fixers`` package.
To use additional fixers, the parameter ``use_2to3_fixers`` can be set
to a list of names of packages containing fixers. To exclude fixers, the
parameter ``use_2to3_exclude_fixers`` can be set to fixer names to be
skipped.

An example setup.py might look something like this::

    from setuptools import setup

    setup(
        name='your.module',
        version='1.0',
        description='This is your awesome module',
        author='You',
        author_email='your@email',
        package_dir={'': 'src'},
        packages=['your', 'you.module'],
        test_suite='your.module.tests',
        use_2to3=True,
        convert_2to3_doctests=['src/your/module/README.txt'],
        use_2to3_fixers=['your.fixers'],
        use_2to3_exclude_fixers=['lib2to3.fixes.fix_import'],
    )

Differential conversion
-----------------------

Note that a file will only be copied and converted during the build process
if the source file has been changed. If you add a file to the doctests
that should be converted, it will not be converted the next time you run
the tests, since it hasn't been modified. You need to remove it from the
build directory. Also if you run the build, install or test commands before
adding the use_2to3 parameter, you will have to remove the build directory
before you run the test command, as the files otherwise will seem updated,
and no conversion will happen.

In general, if code doesn't seem to be converted, deleting the build directory
and trying again is a good safeguard against the build directory getting
"out of sync" with the source directory.

Distributing Python 3 modules
=============================

You can distribute your modules with Python 3 support in different ways. A
normal source distribution will work, but can be slow in installing, as the
2to3 process will be run during the install. But you can also distribute
the module in binary format, such as a binary egg. That egg will contain the
already converted code, and hence no 2to3 conversion is needed during install.

Advanced features
=================

If you don't want to run the 2to3 conversion on the doctests in Python files,
you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``.
doc/alt-python27-setuptools/pkg_resources.txt000064400000270267150404023540015427 0ustar00=============================================================
Package Discovery and Resource Access using ``pkg_resources``
=============================================================

The ``pkg_resources`` module distributed with ``setuptools`` provides an API
for Python libraries to access their resource files, and for extensible
applications and frameworks to automatically discover plugins.  It also
provides runtime support for using C extensions that are inside zipfile-format
eggs, support for merging packages that have separately-distributed modules or
subpackages, and APIs for managing Python's current "working set" of active
packages.


.. contents:: **Table of Contents**


--------
Overview
--------

The ``pkg_resources`` module provides runtime facilities for finding,
introspecting, activating and using installed Python distributions. Some
of the more advanced features (notably the support for parallel installation
of multiple versions) rely specifically on the "egg" format (either as a
zip archive or subdirectory), while others (such as plugin discovery) will
work correctly so long as "egg-info" metadata directories are available for
relevant distributions.

Eggs are a distribution format for Python modules, similar in concept to
Java's "jars" or Ruby's "gems", or the "wheel" format defined in PEP 427.
However, unlike a pure distribution format, eggs can also be installed and
added directly to ``sys.path`` as an import location. When installed in
this way, eggs are *discoverable*, meaning that they carry metadata that
unambiguously identifies their contents and dependencies. This means that
an installed egg can be *automatically* found and added to ``sys.path`` in
response to simple requests of the form, "get me everything I need to use
docutils' PDF support". This feature allows mutually conflicting versions of
a distribution to co-exist in the same Python installation, with individual
applications activating the desired version at runtime by manipulating the
contents of ``sys.path`` (this differs from the virtual environment
approach, which involves creating isolated environments for each
application).

The following terms are needed in order to explain the capabilities offered
by this module:

project
    A library, framework, script, plugin, application, or collection of data
    or other resources, or some combination thereof.  Projects are assumed to
    have "relatively unique" names, e.g. names registered with PyPI.

release
    A snapshot of a project at a particular point in time, denoted by a version
    identifier.

distribution
    A file or files that represent a particular release.

importable distribution
    A file or directory that, if placed on ``sys.path``, allows Python to
    import any modules contained within it.

pluggable distribution
    An importable distribution whose filename unambiguously identifies its
    release (i.e. project and version), and whose contents unambiguously
    specify what releases of other projects will satisfy its runtime
    requirements.

extra
    An "extra" is an optional feature of a release, that may impose additional
    runtime requirements.  For example, if docutils PDF support required a
    PDF support library to be present, docutils could define its PDF support as
    an "extra", and list what other project releases need to be available in
    order to provide it.

environment
    A collection of distributions potentially available for importing, but not
    necessarily active.  More than one distribution (i.e. release version) for
    a given project may be present in an environment.

working set
    A collection of distributions actually available for importing, as on
    ``sys.path``.  At most one distribution (release version) of a given
    project may be present in a working set, as otherwise there would be
    ambiguity as to what to import.

eggs
    Eggs are pluggable distributions in one of the three formats currently
    supported by ``pkg_resources``.  There are built eggs, development eggs,
    and egg links.  Built eggs are directories or zipfiles whose name ends
    with ``.egg`` and follows the egg naming conventions, and contain an
    ``EGG-INFO`` subdirectory (zipped or otherwise).  Development eggs are
    normal directories of Python code with one or more ``ProjectName.egg-info``
    subdirectories. The development egg format is also used to provide a
    default version of a distribution that is available to software that
    doesn't use ``pkg_resources`` to request specific versions. Egg links
    are ``*.egg-link`` files that contain the name of a built or
    development egg, to support symbolic linking on platforms that do not
    have native symbolic links (or where the symbolic link support is
    limited).

(For more information about these terms and concepts, see also this
`architectural overview`_ of ``pkg_resources`` and Python Eggs in general.)

.. _architectural overview: http://mail.python.org/pipermail/distutils-sig/2005-June/004652.html


.. -----------------
.. Developer's Guide
.. -----------------

.. This section isn't written yet.  Currently planned topics include
    Accessing Resources
    Finding and Activating Package Distributions
        get_provider()
        require()
        WorkingSet
        iter_distributions
    Running Scripts
    Configuration
    Namespace Packages
    Extensible Applications and Frameworks
        Locating entry points
        Activation listeners
        Metadata access
        Extended Discovery and Installation
    Supporting Custom PEP 302 Implementations
.. For now, please check out the extensive `API Reference`_ below.


-------------
API Reference
-------------

Namespace Package Support
=========================

A namespace package is a package that only contains other packages and modules,
with no direct contents of its own.  Such packages can be split across
multiple, separately-packaged distributions.  They are normally used to split
up large packages produced by a single organization, such as in the ``zope``
namespace package for Zope Corporation packages, and the ``peak`` namespace
package for the Python Enterprise Application Kit.

To create a namespace package, you list it in the ``namespace_packages``
argument to ``setup()``, in your project's ``setup.py``.  (See the
:ref:`setuptools documentation on namespace packages <Namespace Packages>` for
more information on this.)  Also, you must add a ``declare_namespace()`` call
in the package's ``__init__.py`` file(s):

``declare_namespace(name)``
    Declare that the dotted package name `name` is a "namespace package" whose
    contained packages and modules may be spread across multiple distributions.
    The named package's ``__path__`` will be extended to include the
    corresponding package in all distributions on ``sys.path`` that contain a
    package of that name.  (More precisely, if an importer's
    ``find_module(name)`` returns a loader, then it will also be searched for
    the package's contents.)  Whenever a Distribution's ``activate()`` method
    is invoked, it checks for the presence of namespace packages and updates
    their ``__path__`` contents accordingly.

Applications that manipulate namespace packages or directly alter ``sys.path``
at runtime may also need to use this API function:

``fixup_namespace_packages(path_item)``
    Declare that `path_item` is a newly added item on ``sys.path`` that may
    need to be used to update existing namespace packages.  Ordinarily, this is
    called for you when an egg is automatically added to ``sys.path``, but if
    your application modifies ``sys.path`` to include locations that may
    contain portions of a namespace package, you will need to call this
    function to ensure they are added to the existing namespace packages.

Although by default ``pkg_resources`` only supports namespace packages for
filesystem and zip importers, you can extend its support to other "importers"
compatible with PEP 302 using the ``register_namespace_handler()`` function.
See the section below on `Supporting Custom Importers`_ for details.


``WorkingSet`` Objects
======================

The ``WorkingSet`` class provides access to a collection of "active"
distributions.  In general, there is only one meaningful ``WorkingSet``
instance: the one that represents the distributions that are currently active
on ``sys.path``.  This global instance is available under the name
``working_set`` in the ``pkg_resources`` module.  However, specialized
tools may wish to manipulate working sets that don't correspond to
``sys.path``, and therefore may wish to create other ``WorkingSet`` instances.

It's important to note that the global ``working_set`` object is initialized
from ``sys.path`` when ``pkg_resources`` is first imported, but is only updated
if you do all future ``sys.path`` manipulation via ``pkg_resources`` APIs.  If
you manually modify ``sys.path``, you must invoke the appropriate methods on
the ``working_set`` instance to keep it in sync.  Unfortunately, Python does
not provide any way to detect arbitrary changes to a list object like
``sys.path``, so ``pkg_resources`` cannot automatically update the
``working_set`` based on changes to ``sys.path``.

``WorkingSet(entries=None)``
    Create a ``WorkingSet`` from an iterable of path entries.  If `entries`
    is not supplied, it defaults to the value of ``sys.path`` at the time
    the constructor is called.

    Note that you will not normally construct ``WorkingSet`` instances
    yourself, but instead you will implicitly or explicitly use the global
    ``working_set`` instance.  For the most part, the ``pkg_resources`` API
    is designed so that the ``working_set`` is used by default, such that you
    don't have to explicitly refer to it most of the time.

All distributions available directly on ``sys.path`` will be activated
automatically when ``pkg_resources`` is imported. This behaviour can cause
version conflicts for applications which require non-default versions of
those distributions. To handle this situation, ``pkg_resources`` checks for a
``__requires__`` attribute in the ``__main__`` module when initializing the
default working set, and uses this to ensure a suitable version of each
affected distribution is activated. For example::

    __requires__ = ["CherryPy < 3"] # Must be set before pkg_resources import
    import pkg_resources


Basic ``WorkingSet`` Methods
----------------------------

The following methods of ``WorkingSet`` objects are also available as module-
level functions in ``pkg_resources`` that apply to the default ``working_set``
instance.  Thus, you can use e.g. ``pkg_resources.require()`` as an
abbreviation for ``pkg_resources.working_set.require()``:


``require(*requirements)``
    Ensure that distributions matching `requirements` are activated

    `requirements` must be a string or a (possibly-nested) sequence
    thereof, specifying the distributions and versions required.  The
    return value is a sequence of the distributions that needed to be
    activated to fulfill the requirements; all relevant distributions are
    included, even if they were already activated in this working set.

    For the syntax of requirement specifiers, see the section below on
    `Requirements Parsing`_.

    In general, it should not be necessary for you to call this method
    directly.  It's intended more for use in quick-and-dirty scripting and
    interactive interpreter hacking than for production use. If you're creating
    an actual library or application, it's strongly recommended that you create
    a "setup.py" script using ``setuptools``, and declare all your requirements
    there.  That way, tools like EasyInstall can automatically detect what
    requirements your package has, and deal with them accordingly.

    Note that calling ``require('SomePackage')`` will not install
    ``SomePackage`` if it isn't already present.  If you need to do this, you
    should use the ``resolve()`` method instead, which allows you to pass an
    ``installer`` callback that will be invoked when a needed distribution
    can't be found on the local machine.  You can then have this callback
    display a dialog, automatically download the needed distribution, or
    whatever else is appropriate for your application. See the documentation
    below on the ``resolve()`` method for more information, and also on the
    ``obtain()`` method of ``Environment`` objects.

``run_script(requires, script_name)``
    Locate distribution specified by `requires` and run its `script_name`
    script.  `requires` must be a string containing a requirement specifier.
    (See `Requirements Parsing`_ below for the syntax.)

    The script, if found, will be executed in *the caller's globals*.  That's
    because this method is intended to be called from wrapper scripts that
    act as a proxy for the "real" scripts in a distribution.  A wrapper script
    usually doesn't need to do anything but invoke this function with the
    correct arguments.

    If you need more control over the script execution environment, you
    probably want to use the ``run_script()`` method of a ``Distribution``
    object's `Metadata API`_ instead.

``iter_entry_points(group, name=None)``
    Yield entry point objects from `group` matching `name`

    If `name` is None, yields all entry points in `group` from all
    distributions in the working set, otherwise only ones matching both
    `group` and `name` are yielded.  Entry points are yielded from the active
    distributions in the order that the distributions appear in the working
    set.  (For the global ``working_set``, this should be the same as the order
    that they are listed in ``sys.path``.)  Note that within the entry points
    advertised by an individual distribution, there is no particular ordering.

    Please see the section below on `Entry Points`_ for more information.


``WorkingSet`` Methods and Attributes
-------------------------------------

These methods are used to query or manipulate the contents of a specific
working set, so they must be explicitly invoked on a particular ``WorkingSet``
instance:

``add_entry(entry)``
    Add a path item to the ``entries``, finding any distributions on it.  You
    should use this when you add additional items to ``sys.path`` and you want
    the global ``working_set`` to reflect the change.  This method is also
    called by the ``WorkingSet()`` constructor during initialization.

    This method uses ``find_distributions(entry,True)`` to find distributions
    corresponding to the path entry, and then ``add()`` them.  `entry` is
    always appended to the ``entries`` attribute, even if it is already
    present, however. (This is because ``sys.path`` can contain the same value
    more than once, and the ``entries`` attribute should be able to reflect
    this.)

``__contains__(dist)``
    True if `dist` is active in this ``WorkingSet``.  Note that only one
    distribution for a given project can be active in a given ``WorkingSet``.

``__iter__()``
    Yield distributions for non-duplicate projects in the working set.
    The yield order is the order in which the items' path entries were
    added to the working set.

``find(req)``
    Find a distribution matching `req` (a ``Requirement`` instance).
    If there is an active distribution for the requested project, this
    returns it, as long as it meets the version requirement specified by
    `req`.  But, if there is an active distribution for the project and it
    does *not* meet the `req` requirement, ``VersionConflict`` is raised.
    If there is no active distribution for the requested project, ``None``
    is returned.

``resolve(requirements, env=None, installer=None)``
    List all distributions needed to (recursively) meet `requirements`

    `requirements` must be a sequence of ``Requirement`` objects.  `env`,
    if supplied, should be an ``Environment`` instance.  If
    not supplied, an ``Environment`` is created from the working set's
    ``entries``.  `installer`, if supplied, will be invoked with each
    requirement that cannot be met by an already-installed distribution; it
    should return a ``Distribution`` or ``None``.  (See the ``obtain()`` method
    of `Environment Objects`_, below, for more information on the `installer`
    argument.)

``add(dist, entry=None)``
    Add `dist` to working set, associated with `entry`

    If `entry` is unspecified, it defaults to ``dist.location``.  On exit from
    this routine, `entry` is added to the end of the working set's ``.entries``
    (if it wasn't already present).

    `dist` is only added to the working set if it's for a project that
    doesn't already have a distribution active in the set.  If it's
    successfully added, any  callbacks registered with the ``subscribe()``
    method will be called.  (See `Receiving Change Notifications`_, below.)

    Note: ``add()`` is automatically called for you by the ``require()``
    method, so you don't normally need to use this method directly.

``entries``
    This attribute represents a "shadow" ``sys.path``, primarily useful for
    debugging.  If you are experiencing import problems, you should check
    the global ``working_set`` object's ``entries`` against ``sys.path``, to
    ensure that they match.  If they do not, then some part of your program
    is manipulating ``sys.path`` without updating the ``working_set``
    accordingly.  IMPORTANT NOTE: do not directly manipulate this attribute!
    Setting it equal to ``sys.path`` will not fix your problem, any more than
    putting black tape over an "engine warning" light will fix your car!  If
    this attribute is out of sync with ``sys.path``, it's merely an *indicator*
    of the problem, not the cause of it.


Receiving Change Notifications
------------------------------

Extensible applications and frameworks may need to receive notification when
a new distribution (such as a plug-in component) has been added to a working
set.  This is what the ``subscribe()`` method and ``add_activation_listener()``
function are for.

``subscribe(callback)``
    Invoke ``callback(distribution)`` once for each active distribution that is
    in the set now, or gets added later.  Because the callback is invoked for
    already-active distributions, you do not need to loop over the working set
    yourself to deal with the existing items; just register the callback and
    be prepared for the fact that it will be called immediately by this method.

    Note that callbacks *must not* allow exceptions to propagate, or they will
    interfere with the operation of other callbacks and possibly result in an
    inconsistent working set state.  Callbacks should use a try/except block
    to ignore, log, or otherwise process any errors, especially since the code
    that caused the callback to be invoked is unlikely to be able to handle
    the errors any better than the callback itself.

``pkg_resources.add_activation_listener()`` is an alternate spelling of
``pkg_resources.working_set.subscribe()``.


Locating Plugins
----------------

Extensible applications will sometimes have a "plugin directory" or a set of
plugin directories, from which they want to load entry points or other
metadata.  The ``find_plugins()`` method allows you to do this, by scanning an
environment for the newest version of each project that can be safely loaded
without conflicts or missing requirements.

``find_plugins(plugin_env, full_env=None, fallback=True)``
   Scan `plugin_env` and identify which distributions could be added to this
   working set without version conflicts or missing requirements.

   Example usage::

       distributions, errors = working_set.find_plugins(
           Environment(plugin_dirlist)
       )
       map(working_set.add, distributions)  # add plugins+libs to sys.path
       print "Couldn't load", errors        # display errors

   The `plugin_env` should be an ``Environment`` instance that contains only
   distributions that are in the project's "plugin directory" or directories.
   The `full_env`, if supplied, should be an ``Environment`` instance that
   contains all currently-available distributions.

   If `full_env` is not supplied, one is created automatically from the
   ``WorkingSet`` this method is called on, which will typically mean that
   every directory on ``sys.path`` will be scanned for distributions.

   This method returns a 2-tuple: (`distributions`, `error_info`), where
   `distributions` is a list of the distributions found in `plugin_env` that
   were loadable, along with any other distributions that are needed to resolve
   their dependencies.  `error_info` is a dictionary mapping unloadable plugin
   distributions to an exception instance describing the error that occurred.
   Usually this will be a ``DistributionNotFound`` or ``VersionConflict``
   instance.

   Most applications will use this method mainly on the master ``working_set``
   instance in ``pkg_resources``, and then immediately add the returned
   distributions to the working set so that they are available on sys.path.
   This will make it possible to find any entry points, and allow any other
   metadata tracking and hooks to be activated.

   The resolution algorithm used by ``find_plugins()`` is as follows.  First,
   the project names of the distributions present in `plugin_env` are sorted.
   Then, each project's eggs are tried in descending version order (i.e.,
   newest version first).

   An attempt is made to resolve each egg's dependencies. If the attempt is
   successful, the egg and its dependencies are added to the output list and to
   a temporary copy of the working set.  The resolution process continues with
   the next project name, and no older eggs for that project are tried.

   If the resolution attempt fails, however, the error is added to the error
   dictionary.  If the `fallback` flag is true, the next older version of the
   plugin is tried, until a working version is found.  If false, the resolution
   process continues with the next plugin project name.

   Some applications may have stricter fallback requirements than others. For
   example, an application that has a database schema or persistent objects
   may not be able to safely downgrade a version of a package. Others may want
   to ensure that a new plugin configuration is either 100% good or else
   revert to a known-good configuration.  (That is, they may wish to revert to
   a known configuration if the `error_info` return value is non-empty.)

   Note that this algorithm gives precedence to satisfying the dependencies of
   alphabetically prior project names in case of version conflicts. If two
   projects named "AaronsPlugin" and "ZekesPlugin" both need different versions
   of "TomsLibrary", then "AaronsPlugin" will win and "ZekesPlugin" will be
   disabled due to version conflict.


``Environment`` Objects
=======================

An "environment" is a collection of ``Distribution`` objects, usually ones
that are present and potentially importable on the current platform.
``Environment`` objects are used by ``pkg_resources`` to index available
distributions during dependency resolution.

``Environment(search_path=None, platform=get_supported_platform(), python=PY_MAJOR)``
    Create an environment snapshot by scanning `search_path` for distributions
    compatible with `platform` and `python`.  `search_path` should be a
    sequence of strings such as might be used on ``sys.path``.  If a
    `search_path` isn't supplied, ``sys.path`` is used.

    `platform` is an optional string specifying the name of the platform
    that platform-specific distributions must be compatible with.  If
    unspecified, it defaults to the current platform.  `python` is an
    optional string naming the desired version of Python (e.g. ``'2.4'``);
    it defaults to the currently-running version.

    You may explicitly set `platform` (and/or `python`) to ``None`` if you
    wish to include *all* distributions, not just those compatible with the
    running platform or Python version.

    Note that `search_path` is scanned immediately for distributions, and the
    resulting ``Environment`` is a snapshot of the found distributions.  It
    is not automatically updated if the system's state changes due to e.g.
    installation or removal of distributions.

``__getitem__(project_name)``
    Returns a list of distributions for the given project name, ordered
    from newest to oldest version.  (And highest to lowest format precedence
    for distributions that contain the same version of the project.)  If there
    are no distributions for the project, returns an empty list.

``__iter__()``
    Yield the unique project names of the distributions in this environment.
    The yielded names are always in lower case.

``add(dist)``
    Add `dist` to the environment if it matches the platform and python version
    specified at creation time, and only if the distribution hasn't already
    been added. (i.e., adding the same distribution more than once is a no-op.)

``remove(dist)``
    Remove `dist` from the environment.

``can_add(dist)``
    Is distribution `dist` acceptable for this environment?  If it's not
    compatible with the ``platform`` and ``python`` version values specified
    when the environment was created, a false value is returned.

``__add__(dist_or_env)``  (``+`` operator)
    Add a distribution or environment to an ``Environment`` instance, returning
    a *new* environment object that contains all the distributions previously
    contained by both.  The new environment will have a ``platform`` and
    ``python`` of ``None``, meaning that it will not reject any distributions
    from being added to it; it will simply accept whatever is added.  If you
    want the added items to be filtered for platform and Python version, or
    you want to add them to the *same* environment instance, you should use
    in-place addition (``+=``) instead.

``__iadd__(dist_or_env)``  (``+=`` operator)
    Add a distribution or environment to an ``Environment`` instance
    *in-place*, updating the existing instance and returning it.  The
    ``platform`` and ``python`` filter attributes take effect, so distributions
    in the source that do not have a suitable platform string or Python version
    are silently ignored.

``best_match(req, working_set, installer=None)``
    Find distribution best matching `req` and usable on `working_set`

    This calls the ``find(req)`` method of the `working_set` to see if a
    suitable distribution is already active.  (This may raise
    ``VersionConflict`` if an unsuitable version of the project is already
    active in the specified `working_set`.)  If a suitable distribution isn't
    active, this method returns the newest distribution in the environment
    that meets the ``Requirement`` in `req`.  If no suitable distribution is
    found, and `installer` is supplied, then the result of calling
    the environment's ``obtain(req, installer)`` method will be returned.

``obtain(requirement, installer=None)``
    Obtain a distro that matches requirement (e.g. via download).  In the
    base ``Environment`` class, this routine just returns
    ``installer(requirement)``, unless `installer` is None, in which case
    None is returned instead.  This method is a hook that allows subclasses
    to attempt other ways of obtaining a distribution before falling back
    to the `installer` argument.

``scan(search_path=None)``
    Scan `search_path` for distributions usable on `platform`

    Any distributions found are added to the environment.  `search_path` should
    be a sequence of strings such as might be used on ``sys.path``.  If not
    supplied, ``sys.path`` is used.  Only distributions conforming to
    the platform/python version defined at initialization are added.  This
    method is a shortcut for using the ``find_distributions()`` function to
    find the distributions from each item in `search_path`, and then calling
    ``add()`` to add each one to the environment.


``Requirement`` Objects
=======================

``Requirement`` objects express what versions of a project are suitable for
some purpose.  These objects (or their string form) are used by various
``pkg_resources`` APIs in order to find distributions that a script or
distribution needs.


Requirements Parsing
--------------------

``parse_requirements(s)``
    Yield ``Requirement`` objects for a string or iterable of lines.  Each
    requirement must start on a new line.  See below for syntax.

``Requirement.parse(s)``
    Create a ``Requirement`` object from a string or iterable of lines.  A
    ``ValueError`` is raised if the string or lines do not contain a valid
    requirement specifier, or if they contain more than one specifier.  (To
    parse multiple specifiers from a string or iterable of strings, use
    ``parse_requirements()`` instead.)

    The syntax of a requirement specifier is defined in full in PEP 508.

    Some examples of valid requirement specifiers::

        FooProject >= 1.2
        Fizzy [foo, bar]
        PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1
        SomethingWhoseVersionIDontCareAbout
        SomethingWithMarker[foo]>1.0;python_version<"2.7"

    The project name is the only required portion of a requirement string, and
    if it's the only thing supplied, the requirement will accept any version
    of that project.

    The "extras" in a requirement are used to request optional features of a
    project, that may require additional project distributions in order to
    function.  For example, if the hypothetical "Report-O-Rama" project offered
    optional PDF support, it might require an additional library in order to
    provide that support.  Thus, a project needing Report-O-Rama's PDF features
    could use a requirement of ``Report-O-Rama[PDF]`` to request installation
    or activation of both Report-O-Rama and any libraries it needs in order to
    provide PDF support.  For example, you could use::

        easy_install.py Report-O-Rama[PDF]

    To install the necessary packages using the EasyInstall program, or call
    ``pkg_resources.require('Report-O-Rama[PDF]')`` to add the necessary
    distributions to sys.path at runtime.

    The "markers" in a requirement are used to specify when a requirement
    should be installed -- the requirement will be installed if the marker
    evaluates as true in the current environment. For example, specifying
    ``argparse;python_version<"2.7"`` will not install in an Python 2.7 or 3.3
    environment, but will in a Python 2.6 environment.

``Requirement`` Methods and Attributes
--------------------------------------

``__contains__(dist_or_version)``
    Return true if `dist_or_version` fits the criteria for this requirement.
    If `dist_or_version` is a ``Distribution`` object, its project name must
    match the requirement's project name, and its version must meet the
    requirement's version criteria.  If `dist_or_version` is a string, it is
    parsed using the ``parse_version()`` utility function.  Otherwise, it is
    assumed to be an already-parsed version.

    The ``Requirement`` object's version specifiers (``.specs``) are internally
    sorted into ascending version order, and used to establish what ranges of
    versions are acceptable.  Adjacent redundant conditions are effectively
    consolidated (e.g. ``">1, >2"`` produces the same results as ``">2"``, and
    ``"<2,<3"`` produces the same results as``"<2"``). ``"!="`` versions are
    excised from the ranges they fall within.  The version being tested for
    acceptability is then checked for membership in the resulting ranges.

``__eq__(other_requirement)``
    A requirement compares equal to another requirement if they have
    case-insensitively equal project names, version specifiers, and "extras".
    (The order that extras and version specifiers are in is also ignored.)
    Equal requirements also have equal hashes, so that requirements can be
    used in sets or as dictionary keys.

``__str__()``
    The string form of a ``Requirement`` is a string that, if passed to
    ``Requirement.parse()``, would return an equal ``Requirement`` object.

``project_name``
    The name of the required project

``key``
    An all-lowercase version of the ``project_name``, useful for comparison
    or indexing.

``extras``
    A tuple of names of "extras" that this requirement calls for.  (These will
    be all-lowercase and normalized using the ``safe_extra()`` parsing utility
    function, so they may not exactly equal the extras the requirement was
    created with.)

``specs``
    A list of ``(op,version)`` tuples, sorted in ascending parsed-version
    order.  The `op` in each tuple is a comparison operator, represented as
    a string.  The `version` is the (unparsed) version number.

``marker``
    An instance of ``packaging.markers.Marker`` that allows evaluation
    against the current environment. May be None if no marker specified.

``url``
    The location to download the requirement from if specified.

Entry Points
============

Entry points are a simple way for distributions to "advertise" Python objects
(such as functions or classes) for use by other distributions.  Extensible
applications and frameworks can search for entry points with a particular name
or group, either from a specific distribution or from all active distributions
on sys.path, and then inspect or load the advertised objects at will.

Entry points belong to "groups" which are named with a dotted name similar to
a Python package or module name.  For example, the ``setuptools`` package uses
an entry point named ``distutils.commands`` in order to find commands defined
by distutils extensions.  ``setuptools`` treats the names of entry points
defined in that group as the acceptable commands for a setup script.

In a similar way, other packages can define their own entry point groups,
either using dynamic names within the group (like ``distutils.commands``), or
possibly using predefined names within the group.  For example, a blogging
framework that offers various pre- or post-publishing hooks might define an
entry point group and look for entry points named "pre_process" and
"post_process" within that group.

To advertise an entry point, a project needs to use ``setuptools`` and provide
an ``entry_points`` argument to ``setup()`` in its setup script, so that the
entry points will be included in the distribution's metadata.  For more
details, see the ``setuptools`` documentation.  (XXX link here to setuptools)

Each project distribution can advertise at most one entry point of a given
name within the same entry point group.  For example, a distutils extension
could advertise two different ``distutils.commands`` entry points, as long as
they had different names.  However, there is nothing that prevents *different*
projects from advertising entry points of the same name in the same group.  In
some cases, this is a desirable thing, since the application or framework that
uses the entry points may be calling them as hooks, or in some other way
combining them.  It is up to the application or framework to decide what to do
if multiple distributions advertise an entry point; some possibilities include
using both entry points, displaying an error message, using the first one found
in sys.path order, etc.


Convenience API
---------------

In the following functions, the `dist` argument can be a ``Distribution``
instance, a ``Requirement`` instance, or a string specifying a requirement
(i.e. project name, version, etc.).  If the argument is a string or
``Requirement``, the specified distribution is located (and added to sys.path
if not already present).  An error will be raised if a matching distribution is
not available.

The `group` argument should be a string containing a dotted identifier,
identifying an entry point group.  If you are defining an entry point group,
you should include some portion of your package's name in the group name so as
to avoid collision with other packages' entry point groups.

``load_entry_point(dist, group, name)``
    Load the named entry point from the specified distribution, or raise
    ``ImportError``.

``get_entry_info(dist, group, name)``
    Return an ``EntryPoint`` object for the given `group` and `name` from
    the specified distribution.  Returns ``None`` if the distribution has not
    advertised a matching entry point.

``get_entry_map(dist, group=None)``
    Return the distribution's entry point map for `group`, or the full entry
    map for the distribution.  This function always returns a dictionary,
    even if the distribution advertises no entry points.  If `group` is given,
    the dictionary maps entry point names to the corresponding ``EntryPoint``
    object.  If `group` is None, the dictionary maps group names to
    dictionaries that then map entry point names to the corresponding
    ``EntryPoint`` instance in that group.

``iter_entry_points(group, name=None)``
    Yield entry point objects from `group` matching `name`.

    If `name` is None, yields all entry points in `group` from all
    distributions in the working set on sys.path, otherwise only ones matching
    both `group` and `name` are yielded.  Entry points are yielded from
    the active distributions in the order that the distributions appear on
    sys.path.  (Within entry points for a particular distribution, however,
    there is no particular ordering.)

    (This API is actually a method of the global ``working_set`` object; see
    the section above on `Basic WorkingSet Methods`_ for more information.)


Creating and Parsing
--------------------

``EntryPoint(name, module_name, attrs=(), extras=(), dist=None)``
    Create an ``EntryPoint`` instance.  `name` is the entry point name.  The
    `module_name` is the (dotted) name of the module containing the advertised
    object.  `attrs` is an optional tuple of names to look up from the
    module to obtain the advertised object.  For example, an `attrs` of
    ``("foo","bar")`` and a `module_name` of ``"baz"`` would mean that the
    advertised object could be obtained by the following code::

        import baz
        advertised_object = baz.foo.bar

    The `extras` are an optional tuple of "extra feature" names that the
    distribution needs in order to provide this entry point.  When the
    entry point is loaded, these extra features are looked up in the `dist`
    argument to find out what other distributions may need to be activated
    on sys.path; see the ``load()`` method for more details.  The `extras`
    argument is only meaningful if `dist` is specified.  `dist` must be
    a ``Distribution`` instance.

``EntryPoint.parse(src, dist=None)`` (classmethod)
    Parse a single entry point from string `src`

    Entry point syntax follows the form::

        name = some.module:some.attr [extra1,extra2]

    The entry name and module name are required, but the ``:attrs`` and
    ``[extras]`` parts are optional, as is the whitespace shown between
    some of the items.  The `dist` argument is passed through to the
    ``EntryPoint()`` constructor, along with the other values parsed from
    `src`.

``EntryPoint.parse_group(group, lines, dist=None)`` (classmethod)
    Parse `lines` (a string or sequence of lines) to create a dictionary
    mapping entry point names to ``EntryPoint`` objects.  ``ValueError`` is
    raised if entry point names are duplicated, if `group` is not a valid
    entry point group name, or if there are any syntax errors.  (Note: the
    `group` parameter is used only for validation and to create more
    informative error messages.)  If `dist` is provided, it will be used to
    set the ``dist`` attribute of the created ``EntryPoint`` objects.

``EntryPoint.parse_map(data, dist=None)`` (classmethod)
    Parse `data` into a dictionary mapping group names to dictionaries mapping
    entry point names to ``EntryPoint`` objects.  If `data` is a dictionary,
    then the keys are used as group names and the values are passed to
    ``parse_group()`` as the `lines` argument.  If `data` is a string or
    sequence of lines, it is first split into .ini-style sections (using
    the ``split_sections()`` utility function) and the section names are used
    as group names.  In either case, the `dist` argument is passed through to
    ``parse_group()`` so that the entry points will be linked to the specified
    distribution.


``EntryPoint`` Objects
----------------------

For simple introspection, ``EntryPoint`` objects have attributes that
correspond exactly to the constructor argument names: ``name``,
``module_name``, ``attrs``, ``extras``, and ``dist`` are all available.  In
addition, the following methods are provided:

``load()``
    Load the entry point, returning the advertised Python object.  Effectively
    calls ``self.require()`` then returns ``self.resolve()``.

``require(env=None, installer=None)``
    Ensure that any "extras" needed by the entry point are available on
    sys.path.  ``UnknownExtra`` is raised if the ``EntryPoint`` has ``extras``,
    but no ``dist``, or if the named extras are not defined by the
    distribution.  If `env` is supplied, it must be an ``Environment``, and it
    will be used to search for needed distributions if they are not already
    present on sys.path.  If `installer` is supplied, it must be a callable
    taking a ``Requirement`` instance and returning a matching importable
    ``Distribution`` instance or None.

``resolve()``
    Resolve the entry point from its module and attrs, returning the advertised
    Python object. Raises ``ImportError`` if it cannot be obtained.

``__str__()``
    The string form of an ``EntryPoint`` is a string that could be passed to
    ``EntryPoint.parse()`` to produce an equivalent ``EntryPoint``.


``Distribution`` Objects
========================

``Distribution`` objects represent collections of Python code that may or may
not be importable, and may or may not have metadata and resources associated
with them.  Their metadata may include information such as what other projects
the distribution depends on, what entry points the distribution advertises, and
so on.


Getting or Creating Distributions
---------------------------------

Most commonly, you'll obtain ``Distribution`` objects from a ``WorkingSet`` or
an ``Environment``.  (See the sections above on `WorkingSet Objects`_ and
`Environment Objects`_, which are containers for active distributions and
available distributions, respectively.)  You can also obtain ``Distribution``
objects from one of these high-level APIs:

``find_distributions(path_item, only=False)``
    Yield distributions accessible via `path_item`.  If `only` is true, yield
    only distributions whose ``location`` is equal to `path_item`.  In other
    words, if `only` is true, this yields any distributions that would be
    importable if `path_item` were on ``sys.path``.  If `only` is false, this
    also yields distributions that are "in" or "under" `path_item`, but would
    not be importable unless their locations were also added to ``sys.path``.

``get_distribution(dist_spec)``
    Return a ``Distribution`` object for a given ``Requirement`` or string.
    If `dist_spec` is already a ``Distribution`` instance, it is returned.
    If it is a ``Requirement`` object or a string that can be parsed into one,
    it is used to locate and activate a matching distribution, which is then
    returned.

However, if you're creating specialized tools for working with distributions,
or creating a new distribution format, you may also need to create
``Distribution`` objects directly, using one of the three constructors below.

These constructors all take an optional `metadata` argument, which is used to
access any resources or metadata associated with the distribution.  `metadata`
must be an object that implements the ``IResourceProvider`` interface, or None.
If it is None, an ``EmptyProvider`` is used instead.  ``Distribution`` objects
implement both the `IResourceProvider`_ and `IMetadataProvider Methods`_ by
delegating them to the `metadata` object.

``Distribution.from_location(location, basename, metadata=None, **kw)`` (classmethod)
    Create a distribution for `location`, which must be a string such as a
    URL, filename, or other string that might be used on ``sys.path``.
    `basename` is a string naming the distribution, like ``Foo-1.2-py2.4.egg``.
    If `basename` ends with ``.egg``, then the project's name, version, python
    version and platform are extracted from the filename and used to set those
    properties of the created distribution.  Any additional keyword arguments
    are forwarded to the ``Distribution()`` constructor.

``Distribution.from_filename(filename, metadata=None**kw)`` (classmethod)
    Create a distribution by parsing a local filename.  This is a shorter way
    of saying  ``Distribution.from_location(normalize_path(filename),
    os.path.basename(filename), metadata)``.  In other words, it creates a
    distribution whose location is the normalize form of the filename, parsing
    name and version information from the base portion of the filename.  Any
    additional keyword arguments are forwarded to the ``Distribution()``
    constructor.

``Distribution(location,metadata,project_name,version,py_version,platform,precedence)``
    Create a distribution by setting its properties.  All arguments are
    optional and default to None, except for `py_version` (which defaults to
    the current Python version) and `precedence` (which defaults to
    ``EGG_DIST``; for more details see ``precedence`` under `Distribution
    Attributes`_ below).  Note that it's usually easier to use the
    ``from_filename()`` or ``from_location()`` constructors than to specify
    all these arguments individually.


``Distribution`` Attributes
---------------------------

location
    A string indicating the distribution's location.  For an importable
    distribution, this is the string that would be added to ``sys.path`` to
    make it actively importable.  For non-importable distributions, this is
    simply a filename, URL, or other way of locating the distribution.

project_name
    A string, naming the project that this distribution is for.  Project names
    are defined by a project's setup script, and they are used to identify
    projects on PyPI.  When a ``Distribution`` is constructed, the
    `project_name` argument is passed through the ``safe_name()`` utility
    function to filter out any unacceptable characters.

key
    ``dist.key`` is short for ``dist.project_name.lower()``.  It's used for
    case-insensitive comparison and indexing of distributions by project name.

extras
    A list of strings, giving the names of extra features defined by the
    project's dependency list (the ``extras_require`` argument specified in
    the project's setup script).

version
    A string denoting what release of the project this distribution contains.
    When a ``Distribution`` is constructed, the `version` argument is passed
    through the ``safe_version()`` utility function to filter out any
    unacceptable characters.  If no `version` is specified at construction
    time, then attempting to access this attribute later will cause the
    ``Distribution`` to try to discover its version by reading its ``PKG-INFO``
    metadata file.  If ``PKG-INFO`` is unavailable or can't be parsed,
    ``ValueError`` is raised.

parsed_version
    The ``parsed_version`` is an object representing a "parsed" form of the
    distribution's ``version``.  ``dist.parsed_version`` is a shortcut for
    calling ``parse_version(dist.version)``.  It is used to compare or sort
    distributions by version.  (See the `Parsing Utilities`_ section below for
    more information on the ``parse_version()`` function.)  Note that accessing
    ``parsed_version`` may result in a ``ValueError`` if the ``Distribution``
    was constructed without a `version` and without `metadata` capable of
    supplying the missing version info.

py_version
    The major/minor Python version the distribution supports, as a string.
    For example, "2.7" or "3.4".  The default is the current version of Python.

platform
    A string representing the platform the distribution is intended for, or
    ``None`` if the distribution is "pure Python" and therefore cross-platform.
    See `Platform Utilities`_ below for more information on platform strings.

precedence
    A distribution's ``precedence`` is used to determine the relative order of
    two distributions that have the same ``project_name`` and
    ``parsed_version``.  The default precedence is ``pkg_resources.EGG_DIST``,
    which is the highest (i.e. most preferred) precedence.  The full list
    of predefined precedences, from most preferred to least preferred, is:
    ``EGG_DIST``, ``BINARY_DIST``, ``SOURCE_DIST``, ``CHECKOUT_DIST``, and
    ``DEVELOP_DIST``.  Normally, precedences other than ``EGG_DIST`` are used
    only by the ``setuptools.package_index`` module, when sorting distributions
    found in a package index to determine their suitability for installation.
    "System" and "Development" eggs (i.e., ones that use the ``.egg-info``
    format), however, are automatically given a precedence of ``DEVELOP_DIST``.



``Distribution`` Methods
------------------------

``activate(path=None)``
    Ensure distribution is importable on `path`.  If `path` is None,
    ``sys.path`` is used instead.  This ensures that the distribution's
    ``location`` is in the `path` list, and it also performs any necessary
    namespace package fixups or declarations.  (That is, if the distribution
    contains namespace packages, this method ensures that they are declared,
    and that the distribution's contents for those namespace packages are
    merged with the contents provided by any other active distributions.  See
    the section above on `Namespace Package Support`_ for more information.)

    ``pkg_resources`` adds a notification callback to the global ``working_set``
    that ensures this method is called whenever a distribution is added to it.
    Therefore, you should not normally need to explicitly call this method.
    (Note that this means that namespace packages on ``sys.path`` are always
    imported as soon as ``pkg_resources`` is, which is another reason why
    namespace packages should not contain any code or import statements.)

``as_requirement()``
    Return a ``Requirement`` instance that matches this distribution's project
    name and version.

``requires(extras=())``
    List the ``Requirement`` objects that specify this distribution's
    dependencies.  If `extras` is specified, it should be a sequence of names
    of "extras" defined by the distribution, and the list returned will then
    include any dependencies needed to support the named "extras".

``clone(**kw)``
    Create a copy of the distribution.  Any supplied keyword arguments override
    the corresponding argument to the ``Distribution()`` constructor, allowing
    you to change some of the copied distribution's attributes.

``egg_name()``
    Return what this distribution's standard filename should be, not including
    the ".egg" extension.  For example, a distribution for project "Foo"
    version 1.2 that runs on Python 2.3 for Windows would have an ``egg_name()``
    of ``Foo-1.2-py2.3-win32``.  Any dashes in the name or version are
    converted to underscores.  (``Distribution.from_location()`` will convert
    them back when parsing a ".egg" file name.)

``__cmp__(other)``, ``__hash__()``
    Distribution objects are hashed and compared on the basis of their parsed
    version and precedence, followed by their key (lowercase project name),
    location, Python version, and platform.

The following methods are used to access ``EntryPoint`` objects advertised
by the distribution.  See the section above on `Entry Points`_ for more
detailed information about these operations:

``get_entry_info(group, name)``
    Return the ``EntryPoint`` object for `group` and `name`, or None if no
    such point is advertised by this distribution.

``get_entry_map(group=None)``
    Return the entry point map for `group`.  If `group` is None, return
    a dictionary mapping group names to entry point maps for all groups.
    (An entry point map is a dictionary of entry point names to ``EntryPoint``
    objects.)

``load_entry_point(group, name)``
    Short for ``get_entry_info(group, name).load()``.  Returns the object
    advertised by the named entry point, or raises ``ImportError`` if
    the entry point isn't advertised by this distribution, or there is some
    other import problem.

In addition to the above methods, ``Distribution`` objects also implement all
of the `IResourceProvider`_ and `IMetadataProvider Methods`_ (which are
documented in later sections):

* ``has_metadata(name)``
* ``metadata_isdir(name)``
* ``metadata_listdir(name)``
* ``get_metadata(name)``
* ``get_metadata_lines(name)``
* ``run_script(script_name, namespace)``
* ``get_resource_filename(manager, resource_name)``
* ``get_resource_stream(manager, resource_name)``
* ``get_resource_string(manager, resource_name)``
* ``has_resource(resource_name)``
* ``resource_isdir(resource_name)``
* ``resource_listdir(resource_name)``

If the distribution was created with a `metadata` argument, these resource and
metadata access methods are all delegated to that `metadata` provider.
Otherwise, they are delegated to an ``EmptyProvider``, so that the distribution
will appear to have no resources or metadata.  This delegation approach is used
so that supporting custom importers or new distribution formats can be done
simply by creating an appropriate `IResourceProvider`_ implementation; see the
section below on `Supporting Custom Importers`_ for more details.


``ResourceManager`` API
=======================

The ``ResourceManager`` class provides uniform access to package resources,
whether those resources exist as files and directories or are compressed in
an archive of some kind.

Normally, you do not need to create or explicitly manage ``ResourceManager``
instances, as the ``pkg_resources`` module creates a global instance for you,
and makes most of its methods available as top-level names in the
``pkg_resources`` module namespace.  So, for example, this code actually
calls the ``resource_string()`` method of the global ``ResourceManager``::

    import pkg_resources
    my_data = pkg_resources.resource_string(__name__, "foo.dat")

Thus, you can use the APIs below without needing an explicit
``ResourceManager`` instance; just import and use them as needed.


Basic Resource Access
---------------------

In the following methods, the `package_or_requirement` argument may be either
a Python package/module name (e.g. ``foo.bar``) or a ``Requirement`` instance.
If it is a package or module name, the named module or package must be
importable (i.e., be in a distribution or directory on ``sys.path``), and the
`resource_name` argument is interpreted relative to the named package.  (Note
that if a module name is used, then the resource name is relative to the
package immediately containing the named module.  Also, you should not use use
a namespace package name, because a namespace package can be spread across
multiple distributions, and is therefore ambiguous as to which distribution
should be searched for the resource.)

If it is a ``Requirement``, then the requirement is automatically resolved
(searching the current ``Environment`` if necessary) and a matching
distribution is added to the ``WorkingSet`` and ``sys.path`` if one was not
already present.  (Unless the ``Requirement`` can't be satisfied, in which
case an exception is raised.)  The `resource_name` argument is then interpreted
relative to the root of the identified distribution; i.e. its first path
segment will be treated as a peer of the top-level modules or packages in the
distribution.

Note that resource names must be ``/``-separated paths and cannot be absolute
(i.e. no leading ``/``) or contain relative names like ``".."``.  Do *not* use
``os.path`` routines to manipulate resource paths, as they are *not* filesystem
paths.

``resource_exists(package_or_requirement, resource_name)``
    Does the named resource exist?  Return ``True`` or ``False`` accordingly.

``resource_stream(package_or_requirement, resource_name)``
    Return a readable file-like object for the specified resource; it may be
    an actual file, a ``StringIO``, or some similar object.  The stream is
    in "binary mode", in the sense that whatever bytes are in the resource
    will be read as-is.

``resource_string(package_or_requirement, resource_name)``
    Return the specified resource as a string.  The resource is read in
    binary fashion, such that the returned string contains exactly the bytes
    that are stored in the resource.

``resource_isdir(package_or_requirement, resource_name)``
    Is the named resource a directory?  Return ``True`` or ``False``
    accordingly.

``resource_listdir(package_or_requirement, resource_name)``
    List the contents of the named resource directory, just like ``os.listdir``
    except that it works even if the resource is in a zipfile.

Note that only ``resource_exists()`` and ``resource_isdir()`` are insensitive
as to the resource type.  You cannot use ``resource_listdir()`` on a file
resource, and you can't use ``resource_string()`` or ``resource_stream()`` on
directory resources.  Using an inappropriate method for the resource type may
result in an exception or undefined behavior, depending on the platform and
distribution format involved.


Resource Extraction
-------------------

``resource_filename(package_or_requirement, resource_name)``
    Sometimes, it is not sufficient to access a resource in string or stream
    form, and a true filesystem filename is needed.  In such cases, you can
    use this method (or module-level function) to obtain a filename for a
    resource.  If the resource is in an archive distribution (such as a zipped
    egg), it will be extracted to a cache directory, and the filename within
    the cache will be returned.  If the named resource is a directory, then
    all resources within that directory (including subdirectories) are also
    extracted.  If the named resource is a C extension or "eager resource"
    (see the ``setuptools`` documentation for details), then all C extensions
    and eager resources are extracted at the same time.

    Archived resources are extracted to a cache location that can be managed by
    the following two methods:

``set_extraction_path(path)``
    Set the base path where resources will be extracted to, if needed.

    If you do not call this routine before any extractions take place, the
    path defaults to the return value of ``get_default_cache()``.  (Which is
    based on the ``PYTHON_EGG_CACHE`` environment variable, with various
    platform-specific fallbacks.  See that routine's documentation for more
    details.)

    Resources are extracted to subdirectories of this path based upon
    information given by the resource provider.  You may set this to a
    temporary directory, but then you must call ``cleanup_resources()`` to
    delete the extracted files when done.  There is no guarantee that
    ``cleanup_resources()`` will be able to remove all extracted files.  (On
    Windows, for example, you can't unlink .pyd or .dll files that are still
    in use.)

    Note that you may not change the extraction path for a given resource
    manager once resources have been extracted, unless you first call
    ``cleanup_resources()``.

``cleanup_resources(force=False)``
    Delete all extracted resource files and directories, returning a list
    of the file and directory names that could not be successfully removed.
    This function does not have any concurrency protection, so it should
    generally only be called when the extraction path is a temporary
    directory exclusive to a single process.  This method is not
    automatically called; you must call it explicitly or register it as an
    ``atexit`` function if you wish to ensure cleanup of a temporary
    directory used for extractions.


"Provider" Interface
--------------------

If you are implementing an ``IResourceProvider`` and/or ``IMetadataProvider``
for a new distribution archive format, you may need to use the following
``IResourceManager`` methods to co-ordinate extraction of resources to the
filesystem.  If you're not implementing an archive format, however, you have
no need to use these methods.  Unlike the other methods listed above, they are
*not* available as top-level functions tied to the global ``ResourceManager``;
you must therefore have an explicit ``ResourceManager`` instance to use them.

``get_cache_path(archive_name, names=())``
    Return absolute location in cache for `archive_name` and `names`

    The parent directory of the resulting path will be created if it does
    not already exist.  `archive_name` should be the base filename of the
    enclosing egg (which may not be the name of the enclosing zipfile!),
    including its ".egg" extension.  `names`, if provided, should be a
    sequence of path name parts "under" the egg's extraction location.

    This method should only be called by resource providers that need to
    obtain an extraction location, and only for names they intend to
    extract, as it tracks the generated names for possible cleanup later.

``extraction_error()``
    Raise an ``ExtractionError`` describing the active exception as interfering
    with the extraction process.  You should call this if you encounter any
    OS errors extracting the file to the cache path; it will format the
    operating system exception for you, and add other information to the
    ``ExtractionError`` instance that may be needed by programs that want to
    wrap or handle extraction errors themselves.

``postprocess(tempname, filename)``
    Perform any platform-specific postprocessing of `tempname`.
    Resource providers should call this method ONLY after successfully
    extracting a compressed resource.  They must NOT call it on resources
    that are already in the filesystem.

    `tempname` is the current (temporary) name of the file, and `filename`
    is the name it will be renamed to by the caller after this routine
    returns.


Metadata API
============

The metadata API is used to access metadata resources bundled in a pluggable
distribution.  Metadata resources are virtual files or directories containing
information about the distribution, such as might be used by an extensible
application or framework to connect "plugins".  Like other kinds of resources,
metadata resource names are ``/``-separated and should not contain ``..`` or
begin with a ``/``.  You should not use ``os.path`` routines to manipulate
resource paths.

The metadata API is provided by objects implementing the ``IMetadataProvider``
or ``IResourceProvider`` interfaces.  ``Distribution`` objects implement this
interface, as do objects returned by the ``get_provider()`` function:

``get_provider(package_or_requirement)``
    If a package name is supplied, return an ``IResourceProvider`` for the
    package.  If a ``Requirement`` is supplied, resolve it by returning a
    ``Distribution`` from the current working set (searching the current
    ``Environment`` if necessary and adding the newly found ``Distribution``
    to the working set).  If the named package can't be imported, or the
    ``Requirement`` can't be satisfied, an exception is raised.

    NOTE: if you use a package name rather than a ``Requirement``, the object
    you get back may not be a pluggable distribution, depending on the method
    by which the package was installed.  In particular, "development" packages
    and "single-version externally-managed" packages do not have any way to
    map from a package name to the corresponding project's metadata.  Do not
    write code that passes a package name to ``get_provider()`` and then tries
    to retrieve project metadata from the returned object.  It may appear to
    work when the named package is in an ``.egg`` file or directory, but
    it will fail in other installation scenarios.  If you want project
    metadata, you need to ask for a *project*, not a package.


``IMetadataProvider`` Methods
-----------------------------

The methods provided by objects (such as ``Distribution`` instances) that
implement the ``IMetadataProvider`` or ``IResourceProvider`` interfaces are:

``has_metadata(name)``
    Does the named metadata resource exist?

``metadata_isdir(name)``
    Is the named metadata resource a directory?

``metadata_listdir(name)``
    List of metadata names in the directory (like ``os.listdir()``)

``get_metadata(name)``
    Return the named metadata resource as a string.  The data is read in binary
    mode; i.e., the exact bytes of the resource file are returned.

``get_metadata_lines(name)``
    Yield named metadata resource as list of non-blank non-comment lines.  This
    is short for calling ``yield_lines(provider.get_metadata(name))``.  See the
    section on `yield_lines()`_ below for more information on the syntax it
    recognizes.

``run_script(script_name, namespace)``
    Execute the named script in the supplied namespace dictionary.  Raises
    ``ResolutionError`` if there is no script by that name in the ``scripts``
    metadata directory.  `namespace` should be a Python dictionary, usually
    a module dictionary if the script is being run as a module.


Exceptions
==========

``pkg_resources`` provides a simple exception hierarchy for problems that may
occur when processing requests to locate and activate packages::

    ResolutionError
        DistributionNotFound
        VersionConflict
        UnknownExtra

    ExtractionError

``ResolutionError``
    This class is used as a base class for the other three exceptions, so that
    you can catch all of them with a single "except" clause.  It is also raised
    directly for miscellaneous requirement-resolution problems like trying to
    run a script that doesn't exist in the distribution it was requested from.

``DistributionNotFound``
    A distribution needed to fulfill a requirement could not be found.

``VersionConflict``
    The requested version of a project conflicts with an already-activated
    version of the same project.

``UnknownExtra``
    One of the "extras" requested was not recognized by the distribution it
    was requested from.

``ExtractionError``
    A problem occurred extracting a resource to the Python Egg cache.  The
    following attributes are available on instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail


Supporting Custom Importers
===========================

By default, ``pkg_resources`` supports normal filesystem imports, and
``zipimport`` importers.  If you wish to use the ``pkg_resources`` features
with other (PEP 302-compatible) importers or module loaders, you may need to
register various handlers and support functions using these APIs:

``register_finder(importer_type, distribution_finder)``
    Register `distribution_finder` to find distributions in ``sys.path`` items.
    `importer_type` is the type or class of a PEP 302 "Importer" (``sys.path``
    item handler), and `distribution_finder` is a callable that, when passed a
    path item, the importer instance, and an `only` flag, yields
    ``Distribution`` instances found under that path item.  (The `only` flag,
    if true, means the finder should yield only ``Distribution`` objects whose
    ``location`` is equal to the path item provided.)

    See the source of the ``pkg_resources.find_on_path`` function for an
    example finder function.

``register_loader_type(loader_type, provider_factory)``
    Register `provider_factory` to make ``IResourceProvider`` objects for
    `loader_type`.  `loader_type` is the type or class of a PEP 302
    ``module.__loader__``, and `provider_factory` is a function that, when
    passed a module object, returns an `IResourceProvider`_ for that module,
    allowing it to be used with the `ResourceManager API`_.

``register_namespace_handler(importer_type, namespace_handler)``
    Register `namespace_handler` to declare namespace packages for the given
    `importer_type`.  `importer_type` is the type or class of a PEP 302
    "importer" (sys.path item handler), and `namespace_handler` is a callable
    with a signature like this::

        def namespace_handler(importer, path_entry, moduleName, module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the relevant importer object has
    already agreed that it can handle the relevant path item.  The handler
    should only return a subpath if the module ``__path__`` does not already
    contain an equivalent subpath.  Otherwise, it should return None.

    For an example namespace handler, see the source of the
    ``pkg_resources.file_ns_handler`` function, which is used for both zipfile
    importing and regular importing.


IResourceProvider
-----------------

``IResourceProvider`` is an abstract class that documents what methods are
required of objects returned by a `provider_factory` registered with
``register_loader_type()``.  ``IResourceProvider`` is a subclass of
``IMetadataProvider``, so objects that implement this interface must also
implement all of the `IMetadataProvider Methods`_ as well as the methods
shown here.  The `manager` argument to the methods below must be an object
that supports the full `ResourceManager API`_ documented above.

``get_resource_filename(manager, resource_name)``
    Return a true filesystem path for `resource_name`, coordinating the
    extraction with `manager`, if the resource must be unpacked to the
    filesystem.

``get_resource_stream(manager, resource_name)``
    Return a readable file-like object for `resource_name`.

``get_resource_string(manager, resource_name)``
    Return a string containing the contents of `resource_name`.

``has_resource(resource_name)``
    Does the package contain the named resource?

``resource_isdir(resource_name)``
    Is the named resource a directory?  Return a false value if the resource
    does not exist or is not a directory.

``resource_listdir(resource_name)``
    Return a list of the contents of the resource directory, ala
    ``os.listdir()``.  Requesting the contents of a non-existent directory may
    raise an exception.

Note, by the way, that your provider classes need not (and should not) subclass
``IResourceProvider`` or ``IMetadataProvider``!  These classes exist solely
for documentation purposes and do not provide any useful implementation code.
You may instead wish to subclass one of the `built-in resource providers`_.


Built-in Resource Providers
---------------------------

``pkg_resources`` includes several provider classes that are automatically used
where appropriate.  Their inheritance tree looks like this::

    NullProvider
        EggProvider
            DefaultProvider
                PathMetadata
            ZipProvider
                EggMetadata
        EmptyProvider
            FileMetadata


``NullProvider``
    This provider class is just an abstract base that provides for common
    provider behaviors (such as running scripts), given a definition for just
    a few abstract methods.

``EggProvider``
    This provider class adds in some egg-specific features that are common
    to zipped and unzipped eggs.

``DefaultProvider``
    This provider class is used for unpacked eggs and "plain old Python"
    filesystem modules.

``ZipProvider``
    This provider class is used for all zipped modules, whether they are eggs
    or not.

``EmptyProvider``
    This provider class always returns answers consistent with a provider that
    has no metadata or resources.  ``Distribution`` objects created without
    a ``metadata`` argument use an instance of this provider class instead.
    Since all ``EmptyProvider`` instances are equivalent, there is no need
    to have more than one instance.  ``pkg_resources`` therefore creates a
    global instance of this class under the name ``empty_provider``, and you
    may use it if you have need of an ``EmptyProvider`` instance.

``PathMetadata(path, egg_info)``
    Create an ``IResourceProvider`` for a filesystem-based distribution, where
    `path` is the filesystem location of the importable modules, and `egg_info`
    is the filesystem location of the distribution's metadata directory.
    `egg_info` should usually be the ``EGG-INFO`` subdirectory of `path` for an
    "unpacked egg", and a ``ProjectName.egg-info`` subdirectory of `path` for
    a "development egg".  However, other uses are possible for custom purposes.

``EggMetadata(zipimporter)``
    Create an ``IResourceProvider`` for a zipfile-based distribution.  The
    `zipimporter` should be a ``zipimport.zipimporter`` instance, and may
    represent a "basket" (a zipfile containing multiple ".egg" subdirectories)
    a specific egg *within* a basket, or a zipfile egg (where the zipfile
    itself is a ".egg").  It can also be a combination, such as a zipfile egg
    that also contains other eggs.

``FileMetadata(path_to_pkg_info)``
    Create an ``IResourceProvider`` that provides exactly one metadata
    resource: ``PKG-INFO``.  The supplied path should be a distutils PKG-INFO
    file.  This is basically the same as an ``EmptyProvider``, except that
    requests for ``PKG-INFO`` will be answered using the contents of the
    designated file.  (This provider is used to wrap ``.egg-info`` files
    installed by vendor-supplied system packages.)


Utility Functions
=================

In addition to its high-level APIs, ``pkg_resources`` also includes several
generally-useful utility routines.  These routines are used to implement the
high-level APIs, but can also be quite useful by themselves.


Parsing Utilities
-----------------

``parse_version(version)``
    Parsed a project's version string as defined by PEP 440. The returned
    value will be an object that represents the version. These objects may
    be compared to each other and sorted. The sorting algorithm is as defined
    by PEP 440 with the addition that any version which is not a valid PEP 440
    version will be considered less than any valid PEP 440 version and the
    invalid versions will continue sorting using the original algorithm.

.. _yield_lines():

``yield_lines(strs)``
    Yield non-empty/non-comment lines from a string/unicode or a possibly-
    nested sequence thereof.  If `strs` is an instance of ``basestring``, it
    is split into lines, and each non-blank, non-comment line is yielded after
    stripping leading and trailing whitespace.  (Lines whose first non-blank
    character is ``#`` are considered comment lines.)

    If `strs` is not an instance of ``basestring``, it is iterated over, and
    each item is passed recursively to ``yield_lines()``, so that an arbitrarily
    nested sequence of strings, or sequences of sequences of strings can be
    flattened out to the lines contained therein.  So for example, passing
    a file object or a list of strings to ``yield_lines`` will both work.
    (Note that between each string in a sequence of strings there is assumed to
    be an implicit line break, so lines cannot bridge two strings in a
    sequence.)

    This routine is used extensively by ``pkg_resources`` to parse metadata
    and file formats of various kinds, and most other ``pkg_resources``
    parsing functions that yield multiple values will use it to break up their
    input.  However, this routine is idempotent, so calling ``yield_lines()``
    on the output of another call to ``yield_lines()`` is completely harmless.

``split_sections(strs)``
    Split a string (or possibly-nested iterable thereof), yielding ``(section,
    content)`` pairs found using an ``.ini``-like syntax.  Each ``section`` is
    a whitespace-stripped version of the section name ("``[section]``")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any non-blank, non-comment lines before
    the first section header, they're yielded in a first ``section`` of
    ``None``.

    This routine uses ``yield_lines()`` as its front end, so you can pass in
    anything that ``yield_lines()`` accepts, such as an open text file, string,
    or sequence of strings.  ``ValueError`` is raised if a malformed section
    header is found (i.e. a line starting with ``[`` but not ending with
    ``]``).

    Note that this simplistic parser assumes that any line whose first nonblank
    character is ``[`` is a section heading, so it can't support .ini format
    variations that allow ``[`` as the first nonblank character on other lines.

``safe_name(name)``
    Return a "safe" form of a project's name, suitable for use in a
    ``Requirement`` string, as a distribution name, or a PyPI project name.
    All non-alphanumeric runs are condensed to single "-" characters, such that
    a name like "The $$$ Tree" becomes "The-Tree".  Note that if you are
    generating a filename from this value you should combine it with a call to
    ``to_filename()`` so all dashes ("-") are replaced by underscores ("_").
    See ``to_filename()``.

``safe_version(version)``
    This will return the normalized form of any PEP 440 version, if the version
    string is not PEP 440 compatible than it is similar to ``safe_name()``
    except that spaces in the input become dots, and dots are allowed to exist
    in the output.  As with ``safe_name()``, if you are generating a filename
    from this you should replace any "-" characters in the output with
    underscores.

``safe_extra(extra)``
    Return a "safe" form of an extra's name, suitable for use in a requirement
    string or a setup script's ``extras_require`` keyword.  This routine is
    similar to ``safe_name()`` except that non-alphanumeric runs are replaced
    by a single underbar (``_``), and the result is lowercased.

``to_filename(name_or_version)``
    Escape a name or version string so it can be used in a dash-separated
    filename (or ``#egg=name-version`` tag) without ambiguity.  You
    should only pass in values that were returned by ``safe_name()`` or
    ``safe_version()``.


Platform Utilities
------------------

``get_build_platform()``
    Return this platform's identifier string.  For Windows, the return value
    is ``"win32"``, and for Mac OS X it is a string of the form
    ``"macosx-10.4-ppc"``.  All other platforms return the same uname-based
    string that the ``distutils.util.get_platform()`` function returns.
    This string is the minimum platform version required by distributions built
    on the local machine.  (Backward compatibility note: setuptools versions
    prior to 0.6b1 called this function ``get_platform()``, and the function is
    still available under that name for backward compatibility reasons.)

``get_supported_platform()`` (New in 0.6b1)
    This is the similar to ``get_build_platform()``, but is the maximum
    platform version that the local machine supports.  You will usually want
    to use this value as the ``provided`` argument to the
    ``compatible_platforms()`` function.

``compatible_platforms(provided, required)``
    Return true if a distribution built on the `provided` platform may be used
    on the `required` platform.  If either platform value is ``None``, it is
    considered a wildcard, and the platforms are therefore compatible.
    Likewise, if the platform strings are equal, they're also considered
    compatible, and ``True`` is returned.  Currently, the only non-equal
    platform strings that are considered compatible are Mac OS X platform
    strings with the same hardware type (e.g. ``ppc``) and major version
    (e.g. ``10``) with the `provided` platform's minor version being less than
    or equal to the `required` platform's minor version.

``get_default_cache()``
    Determine the default cache location for extracting resources from zipped
    eggs.  This routine returns the ``PYTHON_EGG_CACHE`` environment variable,
    if set.  Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of
    the user's "Application Data" directory.  On all other systems, it returns
    ``os.path.expanduser("~/.python-eggs")`` if ``PYTHON_EGG_CACHE`` is not
    set.


PEP 302 Utilities
-----------------

``get_importer(path_item)``
    Retrieve a PEP 302 "importer" for the given path item (which need not
    actually be on ``sys.path``).  This routine simulates the PEP 302 protocol
    for obtaining an "importer" object.  It first checks for an importer for
    the path item in ``sys.path_importer_cache``, and if not found it calls
    each of the ``sys.path_hooks`` and caches the result if a good importer is
    found.  If no importer is found, this routine returns an ``ImpWrapper``
    instance that wraps the builtin import machinery as a PEP 302-compliant
    "importer" object.  This ``ImpWrapper`` is *not* cached; instead a new
    instance is returned each time.

    (Note: When run under Python 2.5, this function is simply an alias for
    ``pkgutil.get_importer()``, and instead of ``pkg_resources.ImpWrapper``
    instances, it may return ``pkgutil.ImpImporter`` instances.)


File/Path Utilities
-------------------

``ensure_directory(path)``
    Ensure that the parent directory (``os.path.dirname``) of `path` actually
    exists, using ``os.makedirs()`` if necessary.

``normalize_path(path)``
    Return a "normalized" version of `path`, such that two paths represent
    the same filesystem location if they have equal ``normalized_path()``
    values.  Specifically, this is a shortcut for calling ``os.path.realpath``
    and ``os.path.normcase`` on `path`.  Unfortunately, on certain platforms
    (notably Cygwin and Mac OS X) the ``normcase`` function does not accurately
    reflect the platform's case-sensitivity, so there is always the possibility
    of two apparently-different paths being equal on such platforms.

History
-------

0.6c9
 * Fix ``resource_listdir('')`` always returning an empty list for zipped eggs.

0.6c7
 * Fix package precedence problem where single-version eggs installed in
   ``site-packages`` would take precedence over ``.egg`` files (or directories)
   installed in ``site-packages``.

0.6c6
 * Fix extracted C extensions not having executable permissions under Cygwin.

 * Allow ``.egg-link`` files to contain relative paths.

 * Fix cache dir defaults on Windows when multiple environment vars are needed
   to construct a path.

0.6c4
 * Fix "dev" versions being considered newer than release candidates.

0.6c3
 * Python 2.5 compatibility fixes.

0.6c2
 * Fix a problem with eggs specified directly on ``PYTHONPATH`` on
   case-insensitive filesystems possibly not showing up in the default
   working set, due to differing normalizations of ``sys.path`` entries.

0.6b3
 * Fixed a duplicate path insertion problem on case-insensitive filesystems.

0.6b1
 * Split ``get_platform()`` into ``get_supported_platform()`` and
   ``get_build_platform()`` to work around a Mac versioning problem that caused
   the behavior of ``compatible_platforms()`` to be platform specific.

 * Fix entry point parsing when a standalone module name has whitespace
   between it and the extras.

0.6a11
 * Added ``ExtractionError`` and ``ResourceManager.extraction_error()`` so that
   cache permission problems get a more user-friendly explanation of the
   problem, and so that programs can catch and handle extraction errors if they
   need to.

0.6a10
 * Added the ``extras`` attribute to ``Distribution``, the ``find_plugins()``
   method to ``WorkingSet``, and the ``__add__()`` and ``__iadd__()`` methods
   to ``Environment``.

 * ``safe_name()`` now allows dots in project names.

 * There is a new ``to_filename()`` function that escapes project names and
   versions for safe use in constructing egg filenames from a Distribution
   object's metadata.

 * Added ``Distribution.clone()`` method, and keyword argument support to other
   ``Distribution`` constructors.

 * Added the ``DEVELOP_DIST`` precedence, and automatically assign it to
   eggs using ``.egg-info`` format.

0.6a9
 * Don't raise an error when an invalid (unfinished) distribution is found
   unless absolutely necessary.  Warn about skipping invalid/unfinished eggs
   when building an Environment.

 * Added support for ``.egg-info`` files or directories with version/platform
   information embedded in the filename, so that system packagers have the
   option of including ``PKG-INFO`` files to indicate the presence of a
   system-installed egg, without needing to use ``.egg`` directories, zipfiles,
   or ``.pth`` manipulation.

 * Changed ``parse_version()`` to remove dashes before pre-release tags, so
   that ``0.2-rc1`` is considered an *older* version than ``0.2``, and is equal
   to ``0.2rc1``.  The idea that a dash *always* meant a post-release version
   was highly non-intuitive to setuptools users and Python developers, who
   seem to want to use ``-rc`` version numbers a lot.

0.6a8
 * Fixed a problem with ``WorkingSet.resolve()`` that prevented version
   conflicts from being detected at runtime.

 * Improved runtime conflict warning message to identify a line in the user's
   program, rather than flagging the ``warn()`` call in ``pkg_resources``.

 * Avoid giving runtime conflict warnings for namespace packages, even if they
   were declared by a different package than the one currently being activated.

 * Fix path insertion algorithm for case-insensitive filesystems.

 * Fixed a problem with nested namespace packages (e.g. ``peak.util``) not
   being set as an attribute of their parent package.

0.6a6
 * Activated distributions are now inserted in ``sys.path`` (and the working
   set) just before the directory that contains them, instead of at the end.
   This allows e.g. eggs in ``site-packages`` to override unmanaged modules in
   the same location, and allows eggs found earlier on ``sys.path`` to override
   ones found later.

 * When a distribution is activated, it now checks whether any contained
   non-namespace modules have already been imported and issues a warning if
   a conflicting module has already been imported.

 * Changed dependency processing so that it's breadth-first, allowing a
   depender's preferences to override those of a dependee, to prevent conflicts
   when a lower version is acceptable to the dependee, but not the depender.

 * Fixed a problem extracting zipped files on Windows, when the egg in question
   has had changed contents but still has the same version number.

0.6a4
 * Fix a bug in ``WorkingSet.resolve()`` that was introduced in 0.6a3.

0.6a3
 * Added ``safe_extra()`` parsing utility routine, and use it for Requirement,
   EntryPoint, and Distribution objects' extras handling.

0.6a1
 * Enhanced performance of ``require()`` and related operations when all
   requirements are already in the working set, and enhanced performance of
   directory scanning for distributions.

 * Fixed some problems using ``pkg_resources`` w/PEP 302 loaders other than
   ``zipimport``, and the previously-broken "eager resource" support.

 * Fixed ``pkg_resources.resource_exists()`` not working correctly, along with
   some other resource API bugs.

 * Many API changes and enhancements:

   * Added ``EntryPoint``, ``get_entry_map``, ``load_entry_point``, and
     ``get_entry_info`` APIs for dynamic plugin discovery.

   * ``list_resources`` is now ``resource_listdir`` (and it actually works)

   * Resource API functions like ``resource_string()`` that accepted a package
     name and resource name, will now also accept a ``Requirement`` object in
     place of the package name (to allow access to non-package data files in
     an egg).

   * ``get_provider()`` will now accept a ``Requirement`` instance or a module
     name.  If it is given a ``Requirement``, it will return a corresponding
     ``Distribution`` (by calling ``require()`` if a suitable distribution
     isn't already in the working set), rather than returning a metadata and
     resource provider for a specific module.  (The difference is in how
     resource paths are interpreted; supplying a module name means resources
     path will be module-relative, rather than relative to the distribution's
     root.)

   * ``Distribution`` objects now implement the ``IResourceProvider`` and
     ``IMetadataProvider`` interfaces, so you don't need to reference the (no
     longer available) ``metadata`` attribute to get at these interfaces.

   * ``Distribution`` and ``Requirement`` both have a ``project_name``
     attribute for the project name they refer to.  (Previously these were
     ``name`` and ``distname`` attributes.)

   * The ``path`` attribute of ``Distribution`` objects is now ``location``,
     because it isn't necessarily a filesystem path (and hasn't been for some
     time now).  The ``location`` of ``Distribution`` objects in the filesystem
     should always be normalized using ``pkg_resources.normalize_path()``; all
     of the setuptools and EasyInstall code that generates distributions from
     the filesystem (including ``Distribution.from_filename()``) ensure this
     invariant, but if you use a more generic API like ``Distribution()`` or
     ``Distribution.from_location()`` you should take care that you don't
     create a distribution with an un-normalized filesystem path.

   * ``Distribution`` objects now have an ``as_requirement()`` method that
     returns a ``Requirement`` for the distribution's project name and version.

   * Distribution objects no longer have an ``installed_on()`` method, and the
     ``install_on()`` method is now ``activate()`` (but may go away altogether
     soon).  The ``depends()`` method has also been renamed to ``requires()``,
     and ``InvalidOption`` is now ``UnknownExtra``.

   * ``find_distributions()`` now takes an additional argument called ``only``,
     that tells it to only yield distributions whose location is the passed-in
     path.  (It defaults to False, so that the default behavior is unchanged.)

   * ``AvailableDistributions`` is now called ``Environment``, and the
     ``get()``, ``__len__()``, and ``__contains__()`` methods were removed,
     because they weren't particularly useful.  ``__getitem__()`` no longer
     raises ``KeyError``; it just returns an empty list if there are no
     distributions for the named project.

   * The ``resolve()`` method of ``Environment`` is now a method of
     ``WorkingSet`` instead, and the ``best_match()`` method now uses a working
     set instead of a path list as its second argument.

   * There is a new ``pkg_resources.add_activation_listener()`` API that lets
     you register a callback for notifications about distributions added to
     ``sys.path`` (including the distributions already on it).  This is
     basically a hook for extensible applications and frameworks to be able to
     search for plugin metadata in distributions added at runtime.

0.5a13
 * Fixed a bug in resource extraction from nested packages in a zipped egg.

0.5a12
 * Updated extraction/cache mechanism for zipped resources to avoid inter-
   process and inter-thread races during extraction.  The default cache
   location can now be set via the ``PYTHON_EGGS_CACHE`` environment variable,
   and the default Windows cache is now a ``Python-Eggs`` subdirectory of the
   current user's "Application Data" directory, if the ``PYTHON_EGGS_CACHE``
   variable isn't set.

0.5a10
 * Fix a problem with ``pkg_resources`` being confused by non-existent eggs on
   ``sys.path`` (e.g. if a user deletes an egg without removing it from the
   ``easy-install.pth`` file).

 * Fix a problem with "basket" support in ``pkg_resources``, where egg-finding
   never actually went inside ``.egg`` files.

 * Made ``pkg_resources`` import the module you request resources from, if it's
   not already imported.

0.5a4
 * ``pkg_resources.AvailableDistributions.resolve()`` and related methods now
   accept an ``installer`` argument: a callable taking one argument, a
   ``Requirement`` instance.  The callable must return a ``Distribution``
   object, or ``None`` if no distribution is found.  This feature is used by
   EasyInstall to resolve dependencies by recursively invoking itself.

0.4a4
 * Fix problems with ``resource_listdir()``, ``resource_isdir()`` and resource
   directory extraction for zipped eggs.

0.4a3
 * Fixed scripts not being able to see a ``__file__`` variable in ``__main__``

 * Fixed a problem with ``resource_isdir()`` implementation that was introduced
   in 0.4a2.

0.4a1
 * Fixed a bug in requirements processing for exact versions (i.e. ``==`` and
   ``!=``) when only one condition was included.

 * Added ``safe_name()`` and ``safe_version()`` APIs to clean up handling of
   arbitrary distribution names and versions found on PyPI.

0.3a4
 * ``pkg_resources`` now supports resource directories, not just the resources
   in them.  In particular, there are ``resource_listdir()`` and
   ``resource_isdir()`` APIs.

 * ``pkg_resources`` now supports "egg baskets" -- .egg zipfiles which contain
   multiple distributions in subdirectories whose names end with ``.egg``.
   Having such a "basket" in a directory on ``sys.path`` is equivalent to
   having the individual eggs in that directory, but the contained eggs can
   be individually added (or not) to ``sys.path``.  Currently, however, there
   is no automated way to create baskets.

 * Namespace package manipulation is now protected by the Python import lock.

0.3a1
 * Initial release.

doc/alt-python27-setuptools/zpl.txt000064400000004026150404023540013345 0ustar00Zope Public License (ZPL) Version 2.1

A copyright notice accompanies this license document that identifies the
copyright holders.

This license has been certified as open source. It has also been designated as
GPL compatible by the Free Software Foundation (FSF).

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.

2. Redistributions in binary form must reproduce the accompanying copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission from the
copyright holders.

4. The right to distribute this software or to use it for any purpose does not
give you the right to use Servicemarks (sm) or Trademarks (tm) of the
copyright
holders. Use of them is covered by separate agreement with the copyright
holders.

5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of any
change.

Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
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 COPYRIGHT HOLDERS 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.
doc/alt-python27-setuptools/psfl.txt000064400000030737150404023540013514 0ustar00A. HISTORY OF THE SOFTWARE
==========================

Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC.  Guido remains Python's
principal author, although it includes many contributions from others.

In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.

In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
year, the PythonLabs team moved to Digital Creations (now Zope
Corporation, see http://www.zope.com).  In 2001, the Python Software
Foundation (PSF, see http://www.python.org/psf/) was formed, a
non-profit organization created specifically to own Python-related
Intellectual Property.  Zope Corporation is a sponsoring member of
the PSF.

All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition).  Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.

    Release         Derived     Year        Owner       GPL-
                    from                                compatible? (1)

    0.9.0 thru 1.2              1991-1995   CWI         yes
    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
    1.6             1.5.2       2000        CNRI        no
    2.0             1.6         2000        BeOpen.com  no
    1.6.1           1.6         2001        CNRI        yes (2)
    2.1             2.0+1.6.1   2001        PSF         no
    2.0.1           2.0+1.6.1   2001        PSF         yes
    2.1.1           2.1+2.0.1   2001        PSF         yes
    2.1.2           2.1.1       2002        PSF         yes
    2.1.3           2.1.2       2002        PSF         yes
    2.2 and above   2.1.1       2001-now    PSF         yes

Footnotes:

(1) GPL-compatible doesn't mean that we're distributing Python under
    the GPL.  All Python licenses, unlike the GPL, let you distribute
    a modified version without making your changes open source.  The
    GPL-compatible licenses make it possible to combine Python with
    other software that is released under the GPL; the others don't.

(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
    because its license has a choice of law clause.  According to
    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
    is "not incompatible" with the GPL.

Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.


B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================

PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016 Python Software Foundation; All Rights
Reserved" are retained in Python alone or in any derivative version prepared by
Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee.  This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------

BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1

1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").

2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.

3. BeOpen is making the Software available to Licensee on an "AS IS"
basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions.  Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee.  This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party.  As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.

7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------

1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.

2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee.  Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement.  This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013.  This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.

4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee.  This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.

8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.

        ACCEPT


CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands.  All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
doc/alt-python27-setuptools/requirements.txt000064400000000075150404023540015263 0ustar00sphinx
rst.linker>=1.9
jaraco.packaging>=3.2

setuptools>=34
doc/alt-python27-setuptools/history.txt000064400000003537150404023540014247 0ustar00:tocdepth: 2

.. _changes:

History
*******

.. include:: ../CHANGES (links).rst

Credits
*******

* The original design for the ``.egg`` format and the ``pkg_resources`` API was
  co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first
  version of ``pkg_resources``, and supplied the OS X operating system version
  compatibility algorithm.

* Ian Bicking implemented many early "creature comfort" features of
  easy_install, including support for downloading via Sourceforge and
  Subversion repositories. Ian's comments on the Web-SIG about WSGI
  application deployment also inspired the concept of "entry points" in eggs,
  and he has given talks at PyCon and elsewhere to inform and educate the
  community about eggs and setuptools.

* Jim Fulton contributed time and effort to build automated tests of various
  aspects of ``easy_install``, and supplied the doctests for the command-line
  ``.exe`` wrappers on Windows.

* Phillip J. Eby is the seminal author of setuptools, and
  first proposed the idea of an importable binary distribution format for
  Python application plug-ins.

* Significant parts of the implementation of setuptools were funded by the Open
  Source Applications Foundation, to provide a plug-in infrastructure for the
  Chandler PIM application. In addition, many OSAF staffers (such as Mike
  "Code Bear" Taylor) contributed their time and stress as guinea pigs for the
  use of eggs and setuptools, even before eggs were "cool".  (Thanks, guys!)

* Tarek Ziadé is the principal author of the Distribute fork, which
  re-invigorated the community on the project, encouraged renewed innovation,
  and addressed many defects.

* Since the merge with Distribute, Jason R. Coombs is the
  maintainer of setuptools. The project is maintained in coordination with
  the Python Packaging Authority (PyPA) and the larger Python community.

doc/alt-python27-setuptools/asl.txt000064400000026136150404023540013325 0ustar00
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
doc/alt-python27-setuptools/index.txt000064400000001031150404023540013640 0ustar00Welcome to Setuptools' documentation!
=====================================

Setuptools is a fully-featured, actively-maintained, and stable library
designed to facilitate packaging Python projects, where packaging includes:

 - Python package and module definitions
 - Distribution package metadata
 - Test hooks
 - Project installation
 - Platform-specific details
 - Python 3 support

Documentation content:

.. toctree::
   :maxdepth: 2

   setuptools
   easy_install
   pkg_resources
   python3
   development
   roadmap
   history
doc/alt-python27-setuptools/setuptools.txt000064400000367272150404023540015000 0ustar00==================================================
Building and Distributing Packages with Setuptools
==================================================

``Setuptools`` is a collection of enhancements to the Python ``distutils``
(for Python 2.6 and up) that allow developers to more easily build and
distribute Python packages, especially ones that have dependencies on other
packages.

Packages built and distributed using ``setuptools`` look to the user like
ordinary Python packages based on the ``distutils``.  Your users don't need to
install or even know about setuptools in order to use them, and you don't
have to include the entire setuptools package in your distributions.  By
including just a single `bootstrap module`_ (a 12K .py file), your package will
automatically download and install ``setuptools`` if the user is building your
package from source and doesn't have a suitable version already installed.

.. _bootstrap module: https://bootstrap.pypa.io/ez_setup.py

Feature Highlights:

* Automatically find/download/install/upgrade dependencies at build time using
  the `EasyInstall tool <easy_install.html>`_,
  which supports downloading via HTTP, FTP, Subversion, and SourceForge, and
  automatically scans web pages linked from PyPI to find download links.  (It's
  the closest thing to CPAN currently available for Python.)

* Create `Python Eggs <http://peak.telecommunity.com/DevCenter/PythonEggs>`_ -
  a single-file importable distribution format

* Enhanced support for accessing data files hosted in zipped packages.

* Automatically include all packages in your source tree, without listing them
  individually in setup.py

* Automatically include all relevant files in your source distributions,
  without needing to create a ``MANIFEST.in`` file, and without having to force
  regeneration of the ``MANIFEST`` file when your source tree changes.

* Automatically generate wrapper scripts or Windows (console and GUI) .exe
  files for any number of "main" functions in your project.  (Note: this is not
  a py2exe replacement; the .exe files rely on the local Python installation.)

* Transparent Pyrex support, so that your setup.py can list ``.pyx`` files and
  still work even when the end-user doesn't have Pyrex installed (as long as
  you include the Pyrex-generated C in your source distribution)

* Command aliases - create project-specific, per-user, or site-wide shortcut
  names for commonly used commands and options

* PyPI upload support - upload your source distributions and eggs to PyPI

* Deploy your project in "development mode", such that it's available on
  ``sys.path``, yet can still be edited directly from its source checkout.

* Easily extend the distutils with new commands or ``setup()`` arguments, and
  distribute/reuse your extensions for multiple projects, without copying code.

* Create extensible applications and frameworks that automatically discover
  extensions, using simple "entry points" declared in a project's setup script.

.. contents:: **Table of Contents**

.. _ez_setup.py: `bootstrap module`_


-----------------
Developer's Guide
-----------------


Installing ``setuptools``
=========================

Please follow the `EasyInstall Installation Instructions`_ to install the
current stable version of setuptools.  In particular, be sure to read the
section on `Custom Installation Locations`_ if you are installing anywhere
other than Python's ``site-packages`` directory.

.. _EasyInstall Installation Instructions: easy_install.html#installation-instructions

.. _Custom Installation Locations: easy_install.html#custom-installation-locations

If you want the current in-development version of setuptools, you should first
install a stable version, and then run::

    ez_setup.py setuptools==dev

This will download and install the latest development (i.e. unstable) version
of setuptools from the Python Subversion sandbox.


Basic Use
=========

For basic use of setuptools, just import things from setuptools instead of
the distutils.  Here's a minimal setup script using setuptools::

    from setuptools import setup, find_packages
    setup(
        name="HelloWorld",
        version="0.1",
        packages=find_packages(),
    )

As you can see, it doesn't take much to use setuptools in a project.
Run that script in your project folder, alongside the Python packages
you have developed.

Invoke that script to produce eggs, upload to
PyPI, and automatically include all packages in the directory where the
setup.py lives.  See the `Command Reference`_ section below to see what
commands you can give to this setup script. For example,
to produce a source distribution, simply invoke::

    python setup.py sdist

Of course, before you release your project to PyPI, you'll want to add a bit
more information to your setup script to help people find or learn about your
project.  And maybe your project will have grown by then to include a few
dependencies, and perhaps some data files and scripts::

    from setuptools import setup, find_packages
    setup(
        name="HelloWorld",
        version="0.1",
        packages=find_packages(),
        scripts=['say_hello.py'],

        # Project uses reStructuredText, so ensure that the docutils get
        # installed or upgraded on the target machine
        install_requires=['docutils>=0.3'],

        package_data={
            # If any package contains *.txt or *.rst files, include them:
            '': ['*.txt', '*.rst'],
            # And include any *.msg files found in the 'hello' package, too:
            'hello': ['*.msg'],
        },

        # metadata for upload to PyPI
        author="Me",
        author_email="me@example.com",
        description="This is an Example Package",
        license="PSF",
        keywords="hello world example examples",
        url="http://example.com/HelloWorld/",   # project home page, if any

        # could also include long_description, download_url, classifiers, etc.
    )

In the sections that follow, we'll explain what most of these ``setup()``
arguments do (except for the metadata ones), and the various ways you might use
them in your own project(s).


Specifying Your Project's Version
---------------------------------

Setuptools can work well with most versioning schemes; there are, however, a
few special things to watch out for, in order to ensure that setuptools and
EasyInstall can always tell what version of your package is newer than another
version.  Knowing these things will also help you correctly specify what
versions of other projects your project depends on.

A version consists of an alternating series of release numbers and pre-release
or post-release tags.  A release number is a series of digits punctuated by
dots, such as ``2.4`` or ``0.5``.  Each series of digits is treated
numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the
same release number, denoting the first subrelease of release 2.  But  ``2.10``
is the *tenth* subrelease of release 2, and so is a different and newer release
from ``2.1`` or ``2.1.0``.  Leading zeros within a series of digits are also
ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``.

Following a release number, you can have either a pre-release or post-release
tag.  Pre-release tags make a version be considered *older* than the version
they are appended to.  So, revision ``2.4`` is *newer* than revision ``2.4c1``,
which in turn is newer than ``2.4b1`` or ``2.4a1``.  Postrelease tags make
a version be considered *newer* than the version they are appended to.  So,
revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older*
than ``2.4.1`` (which has a higher release number).

A pre-release tag is a series of letters that are alphabetically before
"final".  Some examples of prerelease tags would include ``alpha``, ``beta``,
``a``, ``c``, ``dev``, and so on.  You do not have to place a dot or dash
before the prerelease tag if it's immediately after a number, but it's okay to
do so if you prefer.  Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all
represent release candidate 1 of version ``2.4``, and are treated as identical
by setuptools.

In addition, there are three special prerelease tags that are treated as if
they were the letter ``c``: ``pre``, ``preview``, and ``rc``.  So, version
``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as
``2.4c1``, and are treated as identical by setuptools.

A post-release tag is either a series of letters that are alphabetically
greater than or equal to "final", or a dash (``-``).  Post-release tags are
generally used to separate patch numbers, port numbers, build numbers, revision
numbers, or date stamps from the release number.  For example, the version
``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of
version ``2.4``.  Or you might use ``2.4-20051127`` to denote a date-stamped
post-release.

Notice that after each pre or post-release tag, you are free to place another
release number, followed again by more pre- or post-release tags.  For example,
``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in-
development version of the ninth alpha of release 0.6.  Notice that ``dev`` is
a pre-release tag, so this version is a *lower* version number than ``0.6a9``,
which would be the actual ninth alpha of release 0.6.  But the ``-r41475`` is
a post-release tag, so this version is *newer* than ``0.6a9.dev``.

For the most part, setuptools' interpretation of version numbers is intuitive,
but here are a few tips that will keep you out of trouble in the corner cases:

* Don't stick adjoining pre-release tags together without a dot or number
  between them.  Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``,
  *not* a development pre-release of ``1.9a``.  Use ``.dev`` instead, as in
  ``1.9a.dev``, or separate the prerelease tags with a number, as in
  ``1.9a0dev``.  ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are
  identical versions from setuptools' point of view, so you can use whatever
  scheme you prefer.

* If you want to be certain that your chosen numbering scheme works the way
  you think it will, you can use the ``pkg_resources.parse_version()`` function
  to compare different version numbers::

    >>> from pkg_resources import parse_version
    >>> parse_version('1.9.a.dev') == parse_version('1.9a0dev')
    True
    >>> parse_version('2.1-rc2') < parse_version('2.1')
    True
    >>> parse_version('0.6a9dev-r41475') < parse_version('0.6a9')
    True

Once you've decided on a version numbering scheme for your project, you can
have setuptools automatically tag your in-development releases with various
pre- or post-release tags.  See the following sections for more details:

* `Tagging and "Daily Build" or "Snapshot" Releases`_
* `Managing "Continuous Releases" Using Subversion`_
* The `egg_info`_ command


New and Changed ``setup()`` Keywords
====================================

The following keyword arguments to ``setup()`` are added or changed by
``setuptools``.  All of them are optional; you do not have to supply them
unless you need the associated ``setuptools`` feature.

``include_package_data``
    If set to ``True``, this tells ``setuptools`` to automatically include any
    data files it finds inside your package directories that are specified by
    your ``MANIFEST.in`` file.  For more information, see the section below on
    `Including Data Files`_.

``exclude_package_data``
    A dictionary mapping package names to lists of glob patterns that should
    be *excluded* from your package directories.  You can use this to trim back
    any excess files included by ``include_package_data``.  For a complete
    description and examples, see the section below on `Including Data Files`_.

``package_data``
    A dictionary mapping package names to lists of glob patterns.  For a
    complete description and examples, see the section below on `Including
    Data Files`_.  You do not need to use this option if you are using
    ``include_package_data``, unless you need to add e.g. files that are
    generated by your setup script and build process.  (And are therefore not
    in source control or are files that you don't want to include in your
    source distribution.)

``zip_safe``
    A boolean (True or False) flag specifying whether the project can be
    safely installed and run from a zip file.  If this argument is not
    supplied, the ``bdist_egg`` command will have to analyze all of your
    project's contents for possible problems each time it builds an egg.

``install_requires``
    A string or list of strings specifying what other distributions need to
    be installed when this one is.  See the section below on `Declaring
    Dependencies`_ for details and examples of the format of this argument.

``entry_points``
    A dictionary mapping entry point group names to strings or lists of strings
    defining the entry points.  Entry points are used to support dynamic
    discovery of services or plugins provided by a project.  See `Dynamic
    Discovery of Services and Plugins`_ for details and examples of the format
    of this argument.  In addition, this keyword is used to support `Automatic
    Script Creation`_.

``extras_require``
    A dictionary mapping names of "extras" (optional features of your project)
    to strings or lists of strings specifying what other distributions must be
    installed to support those features.  See the section below on `Declaring
    Dependencies`_ for details and examples of the format of this argument.

``python_requires``
    A string corresponding to a version specifier (as defined in PEP 440) for
    the Python version, used to specify the Requires-Python defined in PEP 345.

``setup_requires``
    A string or list of strings specifying what other distributions need to
    be present in order for the *setup script* to run.  ``setuptools`` will
    attempt to obtain these (even going so far as to download them using
    ``EasyInstall``) before processing the rest of the setup script or commands.
    This argument is needed if you are using distutils extensions as part of
    your build process; for example, extensions that process setup() arguments
    and turn them into EGG-INFO metadata files.

    (Note: projects listed in ``setup_requires`` will NOT be automatically
    installed on the system where the setup script is being run.  They are
    simply downloaded to the ./.eggs directory if they're not locally available
    already.  If you want them to be installed, as well as being available
    when the setup script is run, you should add them to ``install_requires``
    **and** ``setup_requires``.)

``dependency_links``
    A list of strings naming URLs to be searched when satisfying dependencies.
    These links will be used if needed to install packages specified by
    ``setup_requires`` or ``tests_require``.  They will also be written into
    the egg's metadata for use by tools like EasyInstall to use when installing
    an ``.egg`` file.

``namespace_packages``
    A list of strings naming the project's "namespace packages".  A namespace
    package is a package that may be split across multiple project
    distributions.  For example, Zope 3's ``zope`` package is a namespace
    package, because subpackages like ``zope.interface`` and ``zope.publisher``
    may be distributed separately.  The egg runtime system can automatically
    merge such subpackages into a single parent package at runtime, as long
    as you declare them in each project that contains any subpackages of the
    namespace package, and as long as the namespace package's ``__init__.py``
    does not contain any code other than a namespace declaration.  See the
    section below on `Namespace Packages`_ for more information.

``test_suite``
    A string naming a ``unittest.TestCase`` subclass (or a package or module
    containing one or more of them, or a method of such a subclass), or naming
    a function that can be called with no arguments and returns a
    ``unittest.TestSuite``.  If the named suite is a module, and the module
    has an ``additional_tests()`` function, it is called and the results are
    added to the tests to be run.  If the named suite is a package, any
    submodules and subpackages are recursively added to the overall test suite.

    Specifying this argument enables use of the `test`_ command to run the
    specified test suite, e.g. via ``setup.py test``.  See the section on the
    `test`_ command below for more details.

``tests_require``
    If your project's tests need one or more additional packages besides those
    needed to install it, you can use this option to specify them.  It should
    be a string or list of strings specifying what other distributions need to
    be present for the package's tests to run.  When you run the ``test``
    command, ``setuptools`` will  attempt to obtain these (even going
    so far as to download them using ``EasyInstall``).  Note that these
    required projects will *not* be installed on the system where the tests
    are run, but only downloaded to the project's setup directory if they're
    not already installed locally.

.. _test_loader:

``test_loader``
    If you would like to use a different way of finding tests to run than what
    setuptools normally uses, you can specify a module name and class name in
    this argument.  The named class must be instantiable with no arguments, and
    its instances must support the ``loadTestsFromNames()`` method as defined
    in the Python ``unittest`` module's ``TestLoader`` class.  Setuptools will
    pass only one test "name" in the `names` argument: the value supplied for
    the ``test_suite`` argument.  The loader you specify may interpret this
    string in any way it likes, as there are no restrictions on what may be
    contained in a ``test_suite`` string.

    The module name and class name must be separated by a ``:``.  The default
    value of this argument is ``"setuptools.command.test:ScanningLoader"``.  If
    you want to use the default ``unittest`` behavior, you can specify
    ``"unittest:TestLoader"`` as your ``test_loader`` argument instead.  This
    will prevent automatic scanning of submodules and subpackages.

    The module and class you specify here may be contained in another package,
    as long as you use the ``tests_require`` option to ensure that the package
    containing the loader class is available when the ``test`` command is run.

``eager_resources``
    A list of strings naming resources that should be extracted together, if
    any of them is needed, or if any C extensions included in the project are
    imported.  This argument is only useful if the project will be installed as
    a zipfile, and there is a need to have all of the listed resources be
    extracted to the filesystem *as a unit*.  Resources listed here
    should be '/'-separated paths, relative to the source root, so to list a
    resource ``foo.png`` in package ``bar.baz``, you would include the string
    ``bar/baz/foo.png`` in this argument.

    If you only need to obtain resources one at a time, or you don't have any C
    extensions that access other files in the project (such as data files or
    shared libraries), you probably do NOT need this argument and shouldn't
    mess with it.  For more details on how this argument works, see the section
    below on `Automatic Resource Extraction`_.

``use_2to3``
    Convert the source code from Python 2 to Python 3 with 2to3 during the
    build process. See :doc:`python3` for more details.

``convert_2to3_doctests``
    List of doctest source files that need to be converted with 2to3.
    See :doc:`python3` for more details.

``use_2to3_fixers``
    A list of modules to search for additional fixers to be used during
    the 2to3 conversion. See :doc:`python3` for more details.


Using ``find_packages()``
-------------------------

For simple projects, it's usually easy enough to manually add packages to
the ``packages`` argument of ``setup()``.  However, for very large projects
(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the
package list updated.  That's what ``setuptools.find_packages()`` is for.

``find_packages()`` takes a source directory and two lists of package name
patterns to exclude and include.  If omitted, the source directory defaults to
the same
directory as the setup script.  Some projects use a ``src`` or ``lib``
directory as the root of their source tree, and those projects would of course
use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``.  (And
such projects also need something like ``package_dir={'':'src'}`` in their
``setup()`` arguments, but that's just a normal distutils thing.)

Anyway, ``find_packages()`` walks the target directory, filtering by inclusion
patterns, and finds Python packages (any directory). On Python 3.2 and
earlier, packages are only recognized if they include an ``__init__.py`` file.
Finally, exclusion patterns are applied to remove matching packages.

Inclusion and exclusion patterns are package names, optionally including
wildcards.  For
example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose
last name part is ``tests``.   Or, ``find_packages(exclude=["*.tests",
"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``,
but it still won't exclude a top-level ``tests`` package or the children
thereof.  In fact, if you really want no ``tests`` packages at all, you'll need
something like this::

    find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])

in order to cover all the bases.  Really, the exclusion patterns are intended
to cover simpler use cases than this, like excluding a single, specified
package and its subpackages.

Regardless of the parameters, the ``find_packages()``
function returns a list of package names suitable for use as the ``packages``
argument to ``setup()``, and so is usually the easiest way to set that
argument in your setup script.  Especially since it frees you from having to
remember to modify your setup script whenever your project grows additional
top-level packages or subpackages.


Automatic Script Creation
=========================

Packaging and installing scripts can be a bit awkward with the distutils.  For
one thing, there's no easy way to have a script's filename match local
conventions on both Windows and POSIX platforms.  For another, you often have
to create a separate file just for the "main" script, when your actual "main"
is a function in a module somewhere.  And even in Python 2.4, using the ``-m``
option only works for actual ``.py`` files that aren't installed in a package.

``setuptools`` fixes all of these problems by automatically generating scripts
for you with the correct extension, and on Windows it will even create an
``.exe`` file so that users don't have to change their ``PATHEXT`` settings.
The way to use this feature is to define "entry points" in your setup script
that indicate what function the generated script should import and run.  For
example, to create two console scripts called ``foo`` and ``bar``, and a GUI
script called ``baz``, you might do something like this::

    setup(
        # other arguments here...
        entry_points={
            'console_scripts': [
                'foo = my_package.some_module:main_func',
                'bar = other_module:some_func',
            ],
            'gui_scripts': [
                'baz = my_package_gui:start_func',
            ]
        }
    )

When this project is installed on non-Windows platforms (using "setup.py
install", "setup.py develop", or by using EasyInstall), a set of ``foo``,
``bar``, and ``baz`` scripts will be installed that import ``main_func`` and
``some_func`` from the specified modules.  The functions you specify are called
with no arguments, and their return value is passed to ``sys.exit()``, so you
can return an errorlevel or message to print to stderr.

On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are
created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files.  The
``.exe`` wrappers find and execute the right version of Python to run the
``.py`` or ``.pyw`` file.

You may define as many "console script" and "gui script" entry points as you
like, and each one can optionally specify "extras" that it depends on, that
will be added to ``sys.path`` when the script is run.  For more information on
"extras", see the section below on `Declaring Extras`_.  For more information
on "entry points" in general, see the section below on `Dynamic Discovery of
Services and Plugins`_.


"Eggsecutable" Scripts
----------------------

Occasionally, there are situations where it's desirable to make an ``.egg``
file directly executable.  You can do this by including an entry point such
as the following::

    setup(
        # other arguments here...
        entry_points={
            'setuptools.installation': [
                'eggsecutable = my_package.some_module:main_func',
            ]
        }
    )

Any eggs built from the above setup script will include a short executable
prelude that imports and calls ``main_func()`` from ``my_package.some_module``.
The prelude can be run on Unix-like platforms (including Mac and Linux) by
invoking the egg with ``/bin/sh``, or by enabling execute permissions on the
``.egg`` file.  For the executable prelude to run, the appropriate version of
Python must be available via the ``PATH`` environment variable, under its
"long" name.  That is, if the egg is built for Python 2.3, there must be a
``python2.3`` executable present in a directory on ``PATH``.

This feature is primarily intended to support ez_setup the installation of
setuptools itself on non-Windows platforms, but may also be useful for other
projects as well.

IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or
invoked via symlinks.  They *must* be invoked using their original filename, in
order to ensure that, once running, ``pkg_resources`` will know what project
and version is in use.  The header script will check this and exit with an
error if the ``.egg`` file has been renamed or is invoked via a symlink that
changes its base name.


Declaring Dependencies
======================

``setuptools`` supports automatically installing dependencies when a package is
installed, and including information about dependencies in Python Eggs (so that
package management tools like EasyInstall can use the information).

``setuptools`` and ``pkg_resources`` use a common syntax for specifying a
project's required dependencies.  This syntax consists of a project's PyPI
name, optionally followed by a comma-separated list of "extras" in square
brackets, optionally followed by a comma-separated list of version
specifiers.  A version specifier is one of the operators ``<``, ``>``, ``<=``,
``>=``, ``==`` or ``!=``, followed by a version identifier.  Tokens may be
separated by whitespace, but any whitespace or nonstandard characters within a
project name or version identifier must be replaced with ``-``.

Version specifiers for a given project are internally sorted into ascending
version order, and used to establish what ranges of versions are acceptable.
Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes
``">1"``, and ``"<2,<3"`` becomes ``"<3"``). ``"!="`` versions are excised from
the ranges they fall within.  A project's version is then checked for
membership in the resulting ranges. (Note that providing conflicting conditions
for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may
therefore produce bizarre results.)

Here are some example requirement specifiers::

    docutils >= 0.3

    # comment lines and \ continuations are allowed in requirement strings
    BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \
        ==1.6, ==1.7  # and so are line-end comments

    PEAK[FastCGI, reST]>=0.5a4

    setuptools==0.5a7

The simplest way to include requirement specifiers is to use the
``install_requires`` argument to ``setup()``.  It takes a string or list of
strings containing requirement specifiers.  If you include more than one
requirement in a string, each requirement must begin on a new line.

This has three effects:

1. When your project is installed, either by using EasyInstall, ``setup.py
   install``, or ``setup.py develop``, all of the dependencies not already
   installed will be located (via PyPI), downloaded, built (if necessary),
   and installed.

2. Any scripts in your project will be installed with wrappers that verify
   the availability of the specified dependencies at runtime, and ensure that
   the correct versions are added to ``sys.path`` (e.g. if multiple versions
   have been installed).

3. Python Egg distributions will include a metadata file listing the
   dependencies.

Note, by the way, that if you declare your dependencies in ``setup.py``, you do
*not* need to use the ``require()`` function in your scripts or modules, as
long as you either install the project or use ``setup.py develop`` to do
development work on it.  (See `"Development Mode"`_ below for more details on
using ``setup.py develop``.)


Dependencies that aren't in PyPI
--------------------------------

If your project depends on packages that aren't registered in PyPI, you may
still be able to depend on them, as long as they are available for download
as:

- an egg, in the standard distutils ``sdist`` format,
- a single ``.py`` file, or
- a VCS repository (Subversion, Mercurial, or Git).

You just need to add some URLs to the ``dependency_links`` argument to
``setup()``.

The URLs must be either:

1. direct download URLs,
2. the URLs of web pages that contain direct download links, or
3. the repository's URL

In general, it's better to link to web pages, because it is usually less
complex to update a web page than to release a new version of your project.
You can also use a SourceForge ``showfiles.php`` link in the case where a
package you depend on is distributed via SourceForge.

If you depend on a package that's distributed as a single ``.py`` file, you
must include an ``"#egg=project-version"`` suffix to the URL, to give a project
name and version number.  (Be sure to escape any dashes in the name or version
by replacing them with underscores.)  EasyInstall will recognize this suffix
and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file
as an egg.

In the case of a VCS checkout, you should also append ``#egg=project-version``
in order to identify for what package that checkout should be used. You can
append ``@REV`` to the URL's path (before the fragment) to specify a revision.
Additionally, you can also force the VCS being used by prepending the URL with
a certain prefix. Currently available are:

-  ``svn+URL`` for Subversion,
-  ``git+URL`` for Git, and
-  ``hg+URL`` for Mercurial

A more complete example would be:

    ``vcs+proto://host/path@revision#egg=project-version``

Be careful with the version. It should match the one inside the project files.
If you want to disregard the version, you have to omit it both in the
``requires`` and in the URL's fragment.

This will do a checkout (or a clone, in Git and Mercurial parlance) to a
temporary folder and run ``setup.py bdist_egg``.

The ``dependency_links`` option takes the form of a list of URL strings.  For
example, the below will cause EasyInstall to search the specified page for
eggs or source distributions, if the package's dependencies aren't already
installed::

    setup(
        ...
        dependency_links=[
            "http://peak.telecommunity.com/snapshots/"
        ],
    )


.. _Declaring Extras:


Declaring "Extras" (optional features with their own dependencies)
------------------------------------------------------------------

Sometimes a project has "recommended" dependencies, that are not required for
all uses of the project.  For example, a project might offer optional PDF
output if ReportLab is installed, and reStructuredText support if docutils is
installed.  These optional features are called "extras", and setuptools allows
you to define their requirements as well.  In this way, other projects that
require these optional features can force the additional requirements to be
installed, by naming the desired extras in their ``install_requires``.

For example, let's say that Project A offers optional PDF and reST support::

    setup(
        name="Project-A",
        ...
        extras_require={
            'PDF':  ["ReportLab>=1.2", "RXP"],
            'reST': ["docutils>=0.3"],
        }
    )

As you can see, the ``extras_require`` argument takes a dictionary mapping
names of "extra" features, to strings or lists of strings describing those
features' requirements.  These requirements will *not* be automatically
installed unless another package depends on them (directly or indirectly) by
including the desired "extras" in square brackets after the associated project
name.  (Or if the extras were listed in a requirement spec on the EasyInstall
command line.)

Extras can be used by a project's `entry points`_ to specify dynamic
dependencies.  For example, if Project A includes a "rst2pdf" script, it might
declare it like this, so that the "PDF" requirements are only resolved if the
"rst2pdf" script is run::

    setup(
        name="Project-A",
        ...
        entry_points={
            'console_scripts': [
                'rst2pdf = project_a.tools.pdfgen [PDF]',
                'rst2html = project_a.tools.htmlgen',
                # more script entry points ...
            ],
        }
    )

Projects can also use another project's extras when specifying dependencies.
For example, if project B needs "project A" with PDF support installed, it
might declare the dependency like this::

    setup(
        name="Project-B",
        install_requires=["Project-A[PDF]"],
        ...
    )

This will cause ReportLab to be installed along with project A, if project B is
installed -- even if project A was already installed.  In this way, a project
can encapsulate groups of optional "downstream dependencies" under a feature
name, so that packages that depend on it don't have to know what the downstream
dependencies are.  If a later version of Project A builds in PDF support and
no longer needs ReportLab, or if it ends up needing other dependencies besides
ReportLab in order to provide PDF support, Project B's setup information does
not need to change, but the right packages will still be installed if needed.

Note, by the way, that if a project ends up not needing any other packages to
support a feature, it should keep an empty requirements list for that feature
in its ``extras_require`` argument, so that packages depending on that feature
don't break (due to an invalid feature name).  For example, if Project A above
builds in PDF support and no longer needs ReportLab, it could change its
setup to this::

    setup(
        name="Project-A",
        ...
        extras_require={
            'PDF':  [],
            'reST': ["docutils>=0.3"],
        }
    )

so that Package B doesn't have to remove the ``[PDF]`` from its requirement
specifier.


.. _Platform Specific Dependencies:


Declaring platform specific dependencies
----------------------------------------

Sometimes a project might require a dependency to run on a specific platform.
This could to a package that back ports a module so that it can be used in
older python versions.  Or it could be a package that is required to run on a
specific operating system.  This will allow a project to work on multiple
different platforms without installing dependencies that are not required for
a platform that is installing the project.

For example, here is a project that uses the ``enum`` module and ``pywin32``::

    setup(
        name="Project",
        ...
        install_requires=[
            'enum34;python_version<"3.4"',
            'pywin32 >= 1.0;platform_system=="Windows"'
        ]
    )

Since the ``enum`` module was added in Python 3.4, it should only be installed
if the python version is earlier.  Since ``pywin32`` will only be used on
windows, it should only be installed when the operating system is Windows.
Specifying version requirements for the dependencies is supported as normal.

The environmental markers that may be used for testing platform types are
detailed in `PEP 508`_.

.. _PEP 508: https://www.python.org/dev/peps/pep-0508/

Including Data Files
====================

The distutils have traditionally allowed installation of "data files", which
are placed in a platform-specific location.  However, the most common use case
for data files distributed with a package is for use *by* the package, usually
by including the data files in the package directory.

Setuptools offers three ways to specify data files to be included in your
packages.  First, you can simply use the ``include_package_data`` keyword,
e.g.::

    from setuptools import setup, find_packages
    setup(
        ...
        include_package_data=True
    )

This tells setuptools to install any data files it finds in your packages.
The data files must be specified via the distutils' ``MANIFEST.in`` file.
(They can also be tracked by a revision control system, using an appropriate
plugin.  See the section below on `Adding Support for Revision Control
Systems`_ for information on how to write such plugins.)

If you want finer-grained control over what files are included (for example,
if you have documentation files in your package directories and want to exclude
them from installation), then you can also use the ``package_data`` keyword,
e.g.::

    from setuptools import setup, find_packages
    setup(
        ...
        package_data={
            # If any package contains *.txt or *.rst files, include them:
            '': ['*.txt', '*.rst'],
            # And include any *.msg files found in the 'hello' package, too:
            'hello': ['*.msg'],
        }
    )

The ``package_data`` argument is a dictionary that maps from package names to
lists of glob patterns.  The globs may include subdirectory names, if the data
files are contained in a subdirectory of the package.  For example, if the
package tree looks like this::

    setup.py
    src/
        mypkg/
            __init__.py
            mypkg.txt
            data/
                somefile.dat
                otherdata.dat

The setuptools setup file might look like this::

    from setuptools import setup, find_packages
    setup(
        ...
        packages=find_packages('src'),  # include all packages under src
        package_dir={'':'src'},   # tell distutils packages are under src

        package_data={
            # If any package contains *.txt files, include them:
            '': ['*.txt'],
            # And include any *.dat files found in the 'data' subdirectory
            # of the 'mypkg' package, also:
            'mypkg': ['data/*.dat'],
        }
    )

Notice that if you list patterns in ``package_data`` under the empty string,
these patterns are used to find files in every package, even ones that also
have their own patterns listed.  Thus, in the above example, the ``mypkg.txt``
file gets included even though it's not listed in the patterns for ``mypkg``.

Also notice that if you use paths, you *must* use a forward slash (``/``) as
the path separator, even if you are on Windows.  Setuptools automatically
converts slashes to appropriate platform-specific separators at build time.

(Note: although the ``package_data`` argument was previously only available in
``setuptools``, it was also added to the Python ``distutils`` package as of
Python 2.4; there is `some documentation for the feature`__ available on the
python.org website.  If using the setuptools-specific ``include_package_data``
argument, files specified by ``package_data`` will *not* be automatically
added to the manifest unless they are listed in the MANIFEST.in file.)

__ http://docs.python.org/dist/node11.html

Sometimes, the ``include_package_data`` or ``package_data`` options alone
aren't sufficient to precisely define what files you want included.  For
example, you may want to include package README files in your revision control
system and source distributions, but exclude them from being installed.  So,
setuptools offers an ``exclude_package_data`` option as well, that allows you
to do things like this::

    from setuptools import setup, find_packages
    setup(
        ...
        packages=find_packages('src'),  # include all packages under src
        package_dir={'':'src'},   # tell distutils packages are under src

        include_package_data=True,    # include everything in source control

        # ...but exclude README.txt from all packages
        exclude_package_data={'': ['README.txt']},
    )

The ``exclude_package_data`` option is a dictionary mapping package names to
lists of wildcard patterns, just like the ``package_data`` option.  And, just
as with that option, a key of ``''`` will apply the given pattern(s) to all
packages.  However, any files that match these patterns will be *excluded*
from installation, even if they were listed in ``package_data`` or were
included as a result of using ``include_package_data``.

In summary, the three options allow you to:

``include_package_data``
    Accept all data files and directories matched by ``MANIFEST.in``.

``package_data``
    Specify additional patterns to match files and directories that may or may
    not be matched by ``MANIFEST.in`` or found in source control.

``exclude_package_data``
    Specify patterns for data files and directories that should *not* be
    included when a package is installed, even if they would otherwise have
    been included due to the use of the preceding options.

NOTE: Due to the way the distutils build process works, a data file that you
include in your project and then stop including may be "orphaned" in your
project's build directories, requiring you to run ``setup.py clean --all`` to
fully remove them.  This may also be important for your users and contributors
if they track intermediate revisions of your project using Subversion; be sure
to let them know when you make changes that remove files from inclusion so they
can run ``setup.py clean --all``.


Accessing Data Files at Runtime
-------------------------------

Typically, existing programs manipulate a package's ``__file__`` attribute in
order to find the location of data files.  However, this manipulation isn't
compatible with PEP 302-based import hooks, including importing from zip files
and Python Eggs.  It is strongly recommended that, if you are using data files,
you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access
them.  The ``pkg_resources`` module is distributed as part of setuptools, so if
you're using setuptools to distribute your package, there is no reason not to
use its resource management API.  See also `Accessing Package Resources`_ for
a quick example of converting code that uses ``__file__`` to use
``pkg_resources`` instead.

.. _Accessing Package Resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources


Non-Package Data Files
----------------------

The ``distutils`` normally install general "data files" to a platform-specific
location (e.g. ``/usr/share``).  This feature intended to be used for things
like documentation, example configuration files, and the like.  ``setuptools``
does not install these data files in a separate location, however.  They are
bundled inside the egg file or directory, alongside the Python modules and
packages.  The data files can also be accessed using the :ref:`ResourceManager
API`, by specifying a ``Requirement`` instead of a package name::

    from pkg_resources import Requirement, resource_filename
    filename = resource_filename(Requirement.parse("MyProject"),"sample.conf")

The above code will obtain the filename of the "sample.conf" file in the data
root of the "MyProject" distribution.

Note, by the way, that this encapsulation of data files means that you can't
actually install data files to some arbitrary location on a user's machine;
this is a feature, not a bug.  You can always include a script in your
distribution that extracts and copies your the documentation or data files to
a user-specified location, at their discretion.  If you put related data files
in a single directory, you can use ``resource_filename()`` with the directory
name to get a filesystem directory that then can be copied with the ``shutil``
module.  (Even if your package is installed as a zipfile, calling
``resource_filename()`` on a directory will return an actual filesystem
directory, whose contents will be that entire subtree of your distribution.)

(Of course, if you're writing a new package, you can just as easily place your
data files or directories inside one of your packages, rather than using the
distutils' approach.  However, if you're updating an existing application, it
may be simpler not to change the way it currently specifies these data files.)


Automatic Resource Extraction
-----------------------------

If you are using tools that expect your resources to be "real" files, or your
project includes non-extension native libraries or other files that your C
extensions expect to be able to access, you may need to list those files in
the ``eager_resources`` argument to ``setup()``, so that the files will be
extracted together, whenever a C extension in the project is imported.

This is especially important if your project includes shared libraries *other*
than distutils-built C extensions, and those shared libraries use file
extensions other than ``.dll``, ``.so``, or ``.dylib``, which are the
extensions that setuptools 0.6a8 and higher automatically detects as shared
libraries and adds to the ``native_libs.txt`` file for you.  Any shared
libraries whose names do not end with one of those extensions should be listed
as ``eager_resources``, because they need to be present in the filesystem when
he C extensions that link to them are used.

The ``pkg_resources`` runtime for compressed packages will automatically
extract *all* C extensions and ``eager_resources`` at the same time, whenever
*any* C extension or eager resource is requested via the ``resource_filename()``
API.  (C extensions are imported using ``resource_filename()`` internally.)
This ensures that C extensions will see all of the "real" files that they
expect to see.

Note also that you can list directory resource names in ``eager_resources`` as
well, in which case the directory's contents (including subdirectories) will be
extracted whenever any C extension or eager resource is requested.

Please note that if you're not sure whether you need to use this argument, you
don't!  It's really intended to support projects with lots of non-Python
dependencies and as a last resort for crufty projects that can't otherwise
handle being compressed.  If your package is pure Python, Python plus data
files, or Python plus C, you really don't need this.  You've got to be using
either C or an external program that needs "real" files in your project before
there's any possibility of ``eager_resources`` being relevant to your project.


Extensible Applications and Frameworks
======================================


.. _Entry Points:

Dynamic Discovery of Services and Plugins
-----------------------------------------

``setuptools`` supports creating libraries that "plug in" to extensible
applications and frameworks, by letting you register "entry points" in your
project that can be imported by the application or framework.

For example, suppose that a blogging tool wants to support plugins
that provide translation for various file types to the blog's output format.
The framework might define an "entry point group" called ``blogtool.parsers``,
and then allow plugins to register entry points for the file extensions they
support.

This would allow people to create distributions that contain one or more
parsers for different file types, and then the blogging tool would be able to
find the parsers at runtime by looking up an entry point for the file
extension (or mime type, or however it wants to).

Note that if the blogging tool includes parsers for certain file formats, it
can register these as entry points in its own setup script, which means it
doesn't have to special-case its built-in formats.  They can just be treated
the same as any other plugin's entry points would be.

If you're creating a project that plugs in to an existing application or
framework, you'll need to know what entry points or entry point groups are
defined by that application or framework.  Then, you can register entry points
in your setup script.  Here are a few examples of ways you might register an
``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group,
for our hypothetical blogging tool::

    setup(
        # ...
        entry_points={'blogtool.parsers': '.rst = some_module:SomeClass'}
    )

    setup(
        # ...
        entry_points={'blogtool.parsers': ['.rst = some_module:a_func']}
    )

    setup(
        # ...
        entry_points="""
            [blogtool.parsers]
            .rst = some.nested.module:SomeClass.some_classmethod [reST]
        """,
        extras_require=dict(reST="Docutils>=0.3.5")
    )

The ``entry_points`` argument to ``setup()`` accepts either a string with
``.ini``-style sections, or a dictionary mapping entry point group names to
either strings or lists of strings containing entry point specifiers.  An
entry point specifier consists of a name and value, separated by an ``=``
sign.  The value consists of a dotted module name, optionally followed by a
``:`` and a dotted identifier naming an object within the module.  It can
also include a bracketed list of "extras" that are required for the entry
point to be used.  When the invoking application or framework requests loading
of an entry point, any requirements implied by the associated extras will be
passed to ``pkg_resources.require()``, so that an appropriate error message
can be displayed if the needed package(s) are missing.  (Of course, the
invoking app or framework can ignore such errors if it wants to make an entry
point optional if a requirement isn't installed.)


Defining Additional Metadata
----------------------------

Some extensible applications and frameworks may need to define their own kinds
of metadata to include in eggs, which they can then access using the
``pkg_resources`` metadata APIs.  Ordinarily, this is done by having plugin
developers include additional files in their ``ProjectName.egg-info``
directory.  However, since it can be tedious to create such files by hand, you
may want to create a distutils extension that will create the necessary files
from arguments to ``setup()``, in much the same way that ``setuptools`` does
for many of the ``setup()`` arguments it adds.  See the section below on
`Creating distutils Extensions`_ for more details, especially the subsection on
`Adding new EGG-INFO Files`_.


"Development Mode"
==================

Under normal circumstances, the ``distutils`` assume that you are going to
build a distribution of your project, not use it in its "raw" or "unbuilt"
form.  If you were to use the ``distutils`` that way, you would have to rebuild
and reinstall your project every time you made a change to it during
development.

Another problem that sometimes comes up with the ``distutils`` is that you may
need to do development on two related projects at the same time.  You may need
to put both projects' packages in the same directory to run them, but need to
keep them separate for revision control purposes.  How can you do this?

Setuptools allows you to deploy your projects for use in a common directory or
staging area, but without copying any files.  Thus, you can edit each project's
code in its checkout directory, and only need to run build commands when you
change a project's C extensions or similarly compiled files.  You can even
deploy a project into another project's checkout directory, if that's your
preferred way of working (as opposed to using a common independent staging area
or the site-packages directory).

To do this, use the ``setup.py develop`` command.  It works very similarly to
``setup.py install`` or the EasyInstall tool, except that it doesn't actually
install anything.  Instead, it creates a special ``.egg-link`` file in the
deployment directory, that links to your project's source code.  And, if your
deployment directory is Python's ``site-packages`` directory, it will also
update the ``easy-install.pth`` file to include your project's source code,
thereby making it available on ``sys.path`` for all programs using that Python
installation.

If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link``
will not link directly to your source code when run under Python 3, since
that source code would be made for Python 2 and not work under Python 3.
Instead the ``setup.py develop`` will build Python 3 code under the ``build``
directory, and link there. This means that after doing code changes you will
have to run ``setup.py build`` before these changes are picked up by your
Python 3 installation.

In addition, the ``develop`` command creates wrapper scripts in the target
script directory that will run your in-development scripts after ensuring that
all your ``install_requires`` packages are available on ``sys.path``.

You can deploy the same project to multiple staging areas, e.g. if you have
multiple projects on the same machine that are sharing the same project you're
doing development work.

When you're done with a given development task, you can remove the project
source from a staging area using ``setup.py develop --uninstall``, specifying
the desired staging area if it's not the default.

There are several options to control the precise behavior of the ``develop``
command; see the section on the `develop`_ command below for more details.

Note that you can also apply setuptools commands to non-setuptools projects,
using commands like this::

   python -c "import setuptools; execfile('setup.py')" develop

That is, you can simply list the normal setup commands and options following
the quoted part.


Distributing a ``setuptools``-based project
===========================================

Using ``setuptools``...  Without bundling it!
---------------------------------------------

.. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support.

Your users might not have ``setuptools`` installed on their machines, or even
if they do, it might not be the right version.  Fixing this is easy; just
download `ez_setup.py`_, and put it in the same directory as your ``setup.py``
script.  (Be sure to add it to your revision control system, too.)  Then add
these two lines to the very top of your setup script, before the script imports
anything from setuptools:

.. code-block:: python

    import ez_setup
    ez_setup.use_setuptools()

That's it.  The ``ez_setup`` module will automatically download a matching
version of ``setuptools`` from PyPI, if it isn't present on the target system.
Whenever you install an updated version of setuptools, you should also update
your projects' ``ez_setup.py`` files, so that a matching version gets installed
on the target machine(s).

By the way, setuptools supports the new PyPI "upload" command, so you can use
``setup.py sdist upload`` or ``setup.py bdist_egg upload`` to upload your
source or egg distributions respectively.  Your project's current version must
be registered with PyPI first, of course; you can use ``setup.py register`` to
do that.  Or you can do it all in one step, e.g. ``setup.py register sdist
bdist_egg upload`` will register the package, build source and egg
distributions, and then upload them both to PyPI, where they'll be easily
found by other projects that depend on them.

(By the way, if you need to distribute a specific version of ``setuptools``,
you can specify the exact version and base download URL as parameters to the
``use_setuptools()`` function.  See the function's docstring for details.)


What Your Users Should Know
---------------------------

In general, a setuptools-based project looks just like any distutils-based
project -- as long as your users have an internet connection and are installing
to ``site-packages``, that is.  But for some users, these conditions don't
apply, and they may become frustrated if this is their first encounter with
a setuptools-based project.  To keep these users happy, you should review the
following topics in your project's installation instructions, if they are
relevant to your project and your target audience isn't already familiar with
setuptools and ``easy_install``.

Network Access
    If your project is using ``ez_setup``, you should inform users of the
    need to either have network access, or to preinstall the correct version of
    setuptools using the `EasyInstall installation instructions`_.  Those
    instructions also have tips for dealing with firewalls as well as how to
    manually download and install setuptools.

Custom Installation Locations
    You should inform your users that if they are installing your project to
    somewhere other than the main ``site-packages`` directory, they should
    first install setuptools using the instructions for `Custom Installation
    Locations`_, before installing your project.

Your Project's Dependencies
    If your project depends on other projects that may need to be downloaded
    from PyPI or elsewhere, you should list them in your installation
    instructions, or tell users how to find out what they are.  While most
    users will not need this information, any users who don't have unrestricted
    internet access may have to find, download, and install the other projects
    manually.  (Note, however, that they must still install those projects
    using ``easy_install``, or your project will not know they are installed,
    and your setup script will try to download them again.)

    If you want to be especially friendly to users with limited network access,
    you may wish to build eggs for your project and its dependencies, making
    them all available for download from your site, or at least create a page
    with links to all of the needed eggs.  In this way, users with limited
    network access can manually download all the eggs to a single directory,
    then use the ``-f`` option of ``easy_install`` to specify the directory
    to find eggs in.  Users who have full network access can just use ``-f``
    with the URL of your download page, and ``easy_install`` will find all the
    needed eggs using your links directly.  This is also useful when your
    target audience isn't able to compile packages (e.g. most Windows users)
    and your package or some of its dependencies include C code.

Revision Control System Users and Co-Developers
    Users and co-developers who are tracking your in-development code using
    a revision control system should probably read this manual's sections
    regarding such development.  Alternately, you may wish to create a
    quick-reference guide containing the tips from this manual that apply to
    your particular situation.  For example, if you recommend that people use
    ``setup.py develop`` when tracking your in-development code, you should let
    them know that this needs to be run after every update or commit.

    Similarly, if you remove modules or data files from your project, you
    should remind them to run ``setup.py clean --all`` and delete any obsolete
    ``.pyc`` or ``.pyo``.  (This tip applies to the distutils in general, not
    just setuptools, but not everybody knows about them; be kind to your users
    by spelling out your project's best practices rather than leaving them
    guessing.)

Creating System Packages
    Some users want to manage all Python packages using a single package
    manager, and sometimes that package manager isn't ``easy_install``!
    Setuptools currently supports ``bdist_rpm``, ``bdist_wininst``, and
    ``bdist_dumb`` formats for system packaging.  If a user has a locally-
    installed "bdist" packaging tool that internally uses the distutils
    ``install`` command, it should be able to work with ``setuptools``.  Some
    examples of "bdist" formats that this should work with include the
    ``bdist_nsi`` and ``bdist_msi`` formats for Windows.

    However, packaging tools that build binary distributions by running
    ``setup.py install`` on the command line or as a subprocess will require
    modification to work with setuptools.  They should use the
    ``--single-version-externally-managed`` option to the ``install`` command,
    combined with the standard ``--root`` or ``--record`` options.
    See the `install command`_ documentation below for more details.  The
    ``bdist_deb`` command is an example of a command that currently requires
    this kind of patching to work with setuptools.

    If you or your users have a problem building a usable system package for
    your project, please report the problem via the mailing list so that
    either the "bdist" tool in question or setuptools can be modified to
    resolve the issue.


Setting the ``zip_safe`` flag
-----------------------------

For some use cases (such as bundling as part of a larger application), Python
packages may be run directly from a zip file.
Not all packages, however, are capable of running in compressed form, because
they may expect to be able to access either source code or data files as
normal operating system files.  So, ``setuptools`` can install your project
as a zipfile or a directory, and its default choice is determined by the
project's ``zip_safe`` flag.

You can pass a True or False value for the ``zip_safe`` argument to the
``setup()`` function, or you can omit it.  If you omit it, the ``bdist_egg``
command will analyze your project's contents to see if it can detect any
conditions that would prevent it from working in a zipfile.  It will output
notices to the console about any such conditions that it finds.

Currently, this analysis is extremely conservative: it will consider the
project unsafe if it contains any C extensions or datafiles whatsoever.  This
does *not* mean that the project can't or won't work as a zipfile!  It just
means that the ``bdist_egg`` authors aren't yet comfortable asserting that
the project *will* work.  If the project contains no C or data files, and does
no ``__file__`` or ``__path__`` introspection or source code manipulation, then
there is an extremely solid chance the project will work when installed as a
zipfile.  (And if the project uses ``pkg_resources`` for all its data file
access, then C extensions and other data files shouldn't be a problem at all.
See the `Accessing Data Files at Runtime`_ section above for more information.)

However, if ``bdist_egg`` can't be *sure* that your package will work, but
you've checked over all the warnings it issued, and you are either satisfied it
*will* work (or if you want to try it for yourself), then you should set
``zip_safe`` to ``True`` in your ``setup()`` call.  If it turns out that it
doesn't work, you can always change it to ``False``, which will force
``setuptools`` to install your project as a directory rather than as a zipfile.

Of course, the end-user can still override either decision, if they are using
EasyInstall to install your package.  And, if you want to override for testing
purposes, you can just run ``setup.py easy_install --zip-ok .`` or ``setup.py
easy_install --always-unzip .`` in your project directory. to install the
package as a zipfile or directory, respectively.

In the future, as we gain more experience with different packages and become
more satisfied with the robustness of the ``pkg_resources`` runtime, the
"zip safety" analysis may become less conservative.  However, we strongly
recommend that you determine for yourself whether your project functions
correctly when installed as a zipfile, correct any problems if you can, and
then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe``
flag, so that it will not be necessary for ``bdist_egg`` or ``EasyInstall`` to
try to guess whether your project can work as a zipfile.


Namespace Packages
------------------

Sometimes, a large package is more useful if distributed as a collection of
smaller eggs.  However, Python does not normally allow the contents of a
package to be retrieved from more than one location.  "Namespace packages"
are a solution for this problem.  When you declare a package to be a namespace
package, it means that the package has no meaningful contents in its
``__init__.py``, and that it is merely a container for modules and subpackages.

The ``pkg_resources`` runtime will then automatically ensure that the contents
of namespace packages that are spread over multiple eggs or directories are
combined into a single "virtual" package.

The ``namespace_packages`` argument to ``setup()`` lets you declare your
project's namespace packages, so that they will be included in your project's
metadata.  The argument should list the namespace packages that the egg
participates in.  For example, the ZopeInterface project might do this::

    setup(
        # ...
        namespace_packages=['zope']
    )

because it contains a ``zope.interface`` package that lives in the ``zope``
namespace package.  Similarly, a project for a standalone ``zope.publisher``
would also declare the ``zope`` namespace package.  When these projects are
installed and used, Python will see them both as part of a "virtual" ``zope``
package, even though they will be installed in different locations.

Namespace packages don't have to be top-level packages.  For example, Zope 3's
``zope.app`` package is a namespace package, and in the future PEAK's
``peak.util`` package will be too.

Note, by the way, that your project's source tree must include the namespace
packages' ``__init__.py`` files (and the ``__init__.py`` of any parent
packages), in a normal Python package layout.  These ``__init__.py`` files
*must* contain the line::

    __import__('pkg_resources').declare_namespace(__name__)

This code ensures that the namespace package machinery is operating and that
the current package is registered as a namespace package.

You must NOT include any other code and data in a namespace package's
``__init__.py``.  Even though it may appear to work during development, or when
projects are installed as ``.egg`` files, it will not work when the projects
are installed using "system" packaging tools -- in such cases the
``__init__.py`` files will not be installed, let alone executed.

You must include the ``declare_namespace()``  line in the ``__init__.py`` of
*every* project that has contents for the namespace package in question, in
order to ensure that the namespace will be declared regardless of which
project's copy of ``__init__.py`` is loaded first.  If the first loaded
``__init__.py`` doesn't declare it, it will never *be* declared, because no
other copies will ever be loaded!


TRANSITIONAL NOTE
~~~~~~~~~~~~~~~~~

Setuptools automatically calls ``declare_namespace()`` for you at runtime,
but future versions may *not*.  This is because the automatic declaration
feature has some negative side effects, such as needing to import all namespace
packages during the initialization of the ``pkg_resources`` runtime, and also
the need for ``pkg_resources`` to be explicitly imported before any namespace
packages work at all.  In some future releases, you'll be responsible
for including your own declaration lines, and the automatic declaration feature
will be dropped to get rid of the negative side effects.

During the remainder of the current development cycle, therefore, setuptools
will warn you about missing ``declare_namespace()`` calls in your
``__init__.py`` files, and you should correct these as soon as possible
before the compatibility support is removed.
Namespace packages without declaration lines will not work
correctly once a user has upgraded to a later version, so it's important that
you make this change now in order to avoid having your code break in the field.
Our apologies for the inconvenience, and thank you for your patience.



Tagging and "Daily Build" or "Snapshot" Releases
------------------------------------------------

When a set of related projects are under development, it may be important to
track finer-grained version increments than you would normally use for e.g.
"stable" releases.  While stable releases might be measured in dotted numbers
with alpha/beta/etc. status codes, development versions of a project often
need to be tracked by revision or build number or even build date.  This is
especially true when projects in development need to refer to one another, and
therefore may literally need an up-to-the-minute version of something!

To support these scenarios, ``setuptools`` allows you to "tag" your source and
egg distributions by adding one or more of the following to the project's
"official" version identifier:

* A manually-specified pre-release tag, such as "build" or "dev", or a
  manually-specified post-release tag, such as a build or revision number
  (``--tag-build=STRING, -bSTRING``)

* An 8-character representation of the build date (``--tag-date, -d``), as
  a postrelease tag

You can add these tags by adding ``egg_info`` and the desired options to
the command line ahead of the ``sdist`` or ``bdist`` commands that you want
to generate a daily build or snapshot for.  See the section below on the
`egg_info`_ command for more details.

(Also, before you release your project, be sure to see the section above on
`Specifying Your Project's Version`_ for more information about how pre- and
post-release tags affect how setuptools and EasyInstall interpret version
numbers.  This is important in order to make sure that dependency processing
tools will know which versions of your project are newer than others.)

Finally, if you are creating builds frequently, and either building them in a
downloadable location or are copying them to a distribution server, you should
probably also check out the `rotate`_ command, which lets you automatically
delete all but the N most-recently-modified distributions matching a glob
pattern.  So, you can use a command line like::

    setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3

to build an egg whose version info includes 'DEV-rNNNN' (where NNNN is the
most recent Subversion revision that affected the source tree), and then
delete any egg files from the distribution directory except for the three
that were built most recently.

If you have to manage automated builds for multiple packages, each with
different tagging and rotation policies, you may also want to check out the
`alias`_ command, which would let each package define an alias like ``daily``
that would perform the necessary tag, build, and rotate commands.  Then, a
simpler script or cron job could just run ``setup.py daily`` in each project
directory.  (And, you could also define sitewide or per-user default versions
of the ``daily`` alias, so that projects that didn't define their own would
use the appropriate defaults.)


Generating Source Distributions
-------------------------------

``setuptools`` enhances the distutils' default algorithm for source file
selection with pluggable endpoints for looking up files to include. If you are
using a revision control system, and your source distributions only need to
include files that you're tracking in revision control, use a corresponding
plugin instead of writing a ``MANIFEST.in`` file. See the section below on
`Adding Support for Revision Control Systems`_ for information on plugins.

If you need to include automatically generated files, or files that are kept in
an unsupported revision control system, you'll need to create a ``MANIFEST.in``
file to specify any files that the default file location algorithm doesn't
catch.  See the distutils documentation for more information on the format of
the ``MANIFEST.in`` file.

But, be sure to ignore any part of the distutils documentation that deals with
``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you
from these issues and doesn't work the same way in any case.  Unlike the
distutils, setuptools regenerates the source distribution manifest file
every time you build a source distribution, and it builds it inside the
project's ``.egg-info`` directory, out of the way of your main project
directory.  You therefore need not worry about whether it is up-to-date or not.

Indeed, because setuptools' approach to determining the contents of a source
distribution is so much simpler, its ``sdist`` command omits nearly all of
the options that the distutils' more complex ``sdist`` process requires.  For
all practical purposes, you'll probably use only the ``--formats`` option, if
you use any option at all.


Making your package available for EasyInstall
---------------------------------------------

If you use the ``register`` command (``setup.py register``) to register your
package with PyPI, that's most of the battle right there.  (See the
`docs for the register command`_ for more details.)

.. _docs for the register command: http://docs.python.org/dist/package-index.html

If you also use the `upload`_ command to upload actual distributions of your
package, that's even better, because EasyInstall will be able to find and
download them directly from your project's PyPI page.

However, there may be reasons why you don't want to upload distributions to
PyPI, and just want your existing distributions (or perhaps a Subversion
checkout) to be used instead.

So here's what you need to do before running the ``register`` command.  There
are three ``setup()`` arguments that affect EasyInstall:

``url`` and ``download_url``
   These become links on your project's PyPI page.  EasyInstall will examine
   them to see if they link to a package ("primary links"), or whether they are
   HTML pages.  If they're HTML pages, EasyInstall scans all HREF's on the
   page for primary links

``long_description``
   EasyInstall will check any URLs contained in this argument to see if they
   are primary links.

A URL is considered a "primary link" if it is a link to a .tar.gz, .tgz, .zip,
.egg, .egg.zip, .tar.bz2, or .exe file, or if it has an ``#egg=project`` or
``#egg=project-version`` fragment identifier attached to it.  EasyInstall
attempts to determine a project name and optional version number from the text
of a primary link *without* downloading it.  When it has found all the primary
links, EasyInstall will select the best match based on requested version,
platform compatibility, and other criteria.

So, if your ``url`` or ``download_url`` point either directly to a downloadable
source distribution, or to HTML page(s) that have direct links to such, then
EasyInstall will be able to locate downloads automatically.  If you want to
make Subversion checkouts available, then you should create links with either
``#egg=project`` or ``#egg=project-version`` added to the URL.  You should
replace ``project`` and ``version`` with the values they would have in an egg
filename.  (Be sure to actually generate an egg and then use the initial part
of the filename, rather than trying to guess what the escaped form of the
project name and version number will be.)

Note that Subversion checkout links are of lower precedence than other kinds
of distributions, so EasyInstall will not select a Subversion checkout for
downloading unless it has a version included in the ``#egg=`` suffix, and
it's a higher version than EasyInstall has seen in any other links for your
project.

As a result, it's a common practice to use mark checkout URLs with a version of
"dev" (i.e., ``#egg=projectname-dev``), so that users can do something like
this::

    easy_install --editable projectname==dev

in order to check out the in-development version of ``projectname``.


Making "Official" (Non-Snapshot) Releases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When you make an official release, creating source or binary distributions,
you will need to override the tag settings from ``setup.cfg``, so that you
don't end up registering versions like ``foobar-0.7a1.dev-r34832``.  This is
easy to do if you are developing on the trunk and using tags or branches for
your releases - just make the change to ``setup.cfg`` after branching or
tagging the release, so the trunk will still produce development snapshots.

Alternately, if you are not branching for releases, you can override the
default version options on the command line, using something like::

    python setup.py egg_info -Db "" sdist bdist_egg register upload

The first part of this command (``egg_info -Db ""``) will override the
configured tag information, before creating source and binary eggs, registering
the project with PyPI, and uploading the files.  Thus, these commands will use
the plain version from your ``setup.py``, without adding the build designation
string.

Of course, if you will be doing this a lot, you may wish to create a personal
alias for this operation, e.g.::

    python setup.py alias -u release egg_info -Db ""

You can then use it like this::

    python setup.py release sdist bdist_egg register upload

Or of course you can create more elaborate aliases that do all of the above.
See the sections below on the `egg_info`_ and `alias`_ commands for more ideas.



Distributing Extensions compiled with Pyrex
-------------------------------------------

``setuptools`` includes transparent support for building Pyrex extensions, as
long as you define your extensions using ``setuptools.Extension``, *not*
``distutils.Extension``.  You must also not import anything from Pyrex in
your setup script.

If you follow these rules, you can safely list ``.pyx`` files as the source
of your ``Extension`` objects in the setup script.  ``setuptools`` will detect
at build time whether Pyrex is installed or not.  If it is, then ``setuptools``
will use it.  If not, then ``setuptools`` will silently change the
``Extension`` objects to refer to the ``.c`` counterparts of the ``.pyx``
files, so that the normal distutils C compilation process will occur.

Of course, for this to work, your source distributions must include the C
code generated by Pyrex, as well as your original ``.pyx`` files.  This means
that you will probably want to include current ``.c`` files in your revision
control system, rebuilding them whenever you check changes in for the ``.pyx``
source files.  This will ensure that people tracking your project in a revision
control system will be able to build it even if they don't have Pyrex
installed, and that your source releases will be similarly usable with or
without Pyrex.


-----------------
Command Reference
-----------------

.. _alias:

``alias`` - Define shortcuts for commonly used commands
=======================================================

Sometimes, you need to use the same commands over and over, but you can't
necessarily set them as defaults.  For example, if you produce both development
snapshot releases and "stable" releases of a project, you may want to put
the distributions in different places, or use different ``egg_info`` tagging
options, etc.  In these cases, it doesn't make sense to set the options in
a distutils configuration file, because the values of the options changed based
on what you're trying to do.

Setuptools therefore allows you to define "aliases" - shortcut names for
an arbitrary string of commands and options, using ``setup.py alias aliasname
expansion``, where aliasname is the name of the new alias, and the remainder of
the command line supplies its expansion.  For example, this command defines
a sitewide alias called "daily", that sets various ``egg_info`` tagging
options::

    setup.py alias --global-config daily egg_info --tag-build=development

Once the alias is defined, it can then be used with other setup commands,
e.g.::

    setup.py daily bdist_egg        # generate a daily-build .egg file
    setup.py daily sdist            # generate a daily-build source distro
    setup.py daily sdist bdist_egg  # generate both

The above commands are interpreted as if the word ``daily`` were replaced with
``egg_info --tag-build=development``.

Note that setuptools will expand each alias *at most once* in a given command
line.  This serves two purposes.  First, if you accidentally create an alias
loop, it will have no effect; you'll instead get an error message about an
unknown command.  Second, it allows you to define an alias for a command, that
uses that command.  For example, this (project-local) alias::

    setup.py alias bdist_egg bdist_egg rotate -k1 -m.egg

redefines the ``bdist_egg`` command so that it always runs the ``rotate``
command afterwards to delete all but the newest egg file.  It doesn't loop
indefinitely on ``bdist_egg`` because the alias is only expanded once when
used.

You can remove a defined alias with the ``--remove`` (or ``-r``) option, e.g.::

    setup.py alias --global-config --remove daily

would delete the "daily" alias we defined above.

Aliases can be defined on a project-specific, per-user, or sitewide basis.  The
default is to define or remove a project-specific alias, but you can use any of
the `configuration file options`_ (listed under the `saveopts`_ command, below)
to determine which distutils configuration file an aliases will be added to
(or removed from).

Note that if you omit the "expansion" argument to the ``alias`` command,
you'll get output showing that alias' current definition (and what
configuration file it's defined in).  If you omit the alias name as well,
you'll get a listing of all current aliases along with their configuration
file locations.


``bdist_egg`` - Create a Python Egg for the project
===================================================

This command generates a Python Egg (``.egg`` file) for the project.  Python
Eggs are the preferred binary distribution format for EasyInstall, because they
are cross-platform (for "pure" packages), directly importable, and contain
project metadata including scripts and information about the project's
dependencies.  They can be simply downloaded and added to ``sys.path``
directly, or they can be placed in a directory on ``sys.path`` and then
automatically discovered by the egg runtime system.

This command runs the `egg_info`_ command (if it hasn't already run) to update
the project's metadata (``.egg-info``) directory.  If you have added any extra
metadata files to the ``.egg-info`` directory, those files will be included in
the new egg file's metadata directory, for use by the egg runtime system or by
any applications or frameworks that use that metadata.

You won't usually need to specify any special options for this command; just
use ``bdist_egg`` and you're done.  But there are a few options that may
be occasionally useful:

``--dist-dir=DIR, -d DIR``
    Set the directory where the ``.egg`` file will be placed.  If you don't
    supply this, then the ``--dist-dir`` setting of the ``bdist`` command
    will be used, which is usually a directory named ``dist`` in the project
    directory.

``--plat-name=PLATFORM, -p PLATFORM``
    Set the platform name string that will be embedded in the egg's filename
    (assuming the egg contains C extensions).  This can be used to override
    the distutils default platform name with something more meaningful.  Keep
    in mind, however, that the egg runtime system expects to see eggs with
    distutils platform names, so it may ignore or reject eggs with non-standard
    platform names.  Similarly, the EasyInstall program may ignore them when
    searching web pages for download links.  However, if you are
    cross-compiling or doing some other unusual things, you might find a use
    for this option.

``--exclude-source-files``
    Don't include any modules' ``.py`` files in the egg, just compiled Python,
    C, and data files.  (Note that this doesn't affect any ``.py`` files in the
    EGG-INFO directory or its subdirectories, since for example there may be
    scripts with a ``.py`` extension which must still be retained.)  We don't
    recommend that you use this option except for packages that are being
    bundled for proprietary end-user applications, or for "embedded" scenarios
    where space is at an absolute premium.  On the other hand, if your package
    is going to be installed and used in compressed form, you might as well
    exclude the source because Python's ``traceback`` module doesn't currently
    understand how to display zipped source code anyway, or how to deal with
    files that are in a different place from where their code was compiled.

There are also some options you will probably never need, but which are there
because they were copied from similar ``bdist`` commands used as an example for
creating this one.  They may be useful for testing and debugging, however,
which is why we kept them:

``--keep-temp, -k``
    Keep the contents of the ``--bdist-dir`` tree around after creating the
    ``.egg`` file.

``--bdist-dir=DIR, -b DIR``
    Set the temporary directory for creating the distribution.  The entire
    contents of this directory are zipped to create the ``.egg`` file, after
    running various installation commands to copy the package's modules, data,
    and extensions here.

``--skip-build``
    Skip doing any "build" commands; just go straight to the
    install-and-compress phases.


.. _develop:

``develop`` - Deploy the project source in "Development Mode"
=============================================================

This command allows you to deploy your project's source for use in one or more
"staging areas" where it will be available for importing.  This deployment is
done in such a way that changes to the project source are immediately available
in the staging area(s), without needing to run a build or install step after
each change.

The ``develop`` command works by creating an ``.egg-link`` file (named for the
project) in the given staging area.  If the staging area is Python's
``site-packages`` directory, it also updates an ``easy-install.pth`` file so
that the project is on ``sys.path`` by default for all programs run using that
Python installation.

The ``develop`` command also installs wrapper scripts in the staging area (or
a separate directory, as specified) that will ensure the project's dependencies
are available on ``sys.path`` before running the project's source scripts.
And, it ensures that any missing project dependencies are available in the
staging area, by downloading and installing them if necessary.

Last, but not least, the ``develop`` command invokes the ``build_ext -i``
command to ensure any C extensions in the project have been built and are
up-to-date, and the ``egg_info`` command to ensure the project's metadata is
updated (so that the runtime and wrappers know what the project's dependencies
are).  If you make any changes to the project's setup script or C extensions,
you should rerun the ``develop`` command against all relevant staging areas to
keep the project's scripts, metadata and extensions up-to-date.  Most other
kinds of changes to your project should not require any build operations or
rerunning ``develop``, but keep in mind that even minor changes to the setup
script (e.g. changing an entry point definition) require you to re-run the
``develop`` or ``test`` commands to keep the distribution updated.

Here are some of the options that the ``develop`` command accepts.  Note that
they affect the project's dependencies as well as the project itself, so if you
have dependencies that need to be installed and you use ``--exclude-scripts``
(for example), the dependencies' scripts will not be installed either!  For
this reason, you may want to use EasyInstall to install the project's
dependencies before using the ``develop`` command, if you need finer control
over the installation options for dependencies.

``--uninstall, -u``
    Un-deploy the current project.  You may use the ``--install-dir`` or ``-d``
    option to designate the staging area.  The created ``.egg-link`` file will
    be removed, if present and it is still pointing to the project directory.
    The project directory will be removed from ``easy-install.pth`` if the
    staging area is Python's ``site-packages`` directory.

    Note that this option currently does *not* uninstall script wrappers!  You
    must uninstall them yourself, or overwrite them by using EasyInstall to
    activate a different version of the package.  You can also avoid installing
    script wrappers in the first place, if you use the ``--exclude-scripts``
    (aka ``-x``) option when you run ``develop`` to deploy the project.

``--multi-version, -m``
    "Multi-version" mode. Specifying this option prevents ``develop`` from
    adding an ``easy-install.pth`` entry for the project(s) being deployed, and
    if an entry for any version of a project already exists, the entry will be
    removed upon successful deployment.  In multi-version mode, no specific
    version of the package is available for importing, unless you use
    ``pkg_resources.require()`` to put it on ``sys.path``, or you are running
    a wrapper script generated by ``setuptools`` or EasyInstall.  (In which
    case the wrapper script calls ``require()`` for you.)

    Note that if you install to a directory other than ``site-packages``,
    this option is automatically in effect, because ``.pth`` files can only be
    used in ``site-packages`` (at least in Python 2.3 and 2.4). So, if you use
    the ``--install-dir`` or ``-d`` option (or they are set via configuration
    file(s)) your project and its dependencies will be deployed in multi-
    version mode.

``--install-dir=DIR, -d DIR``
    Set the installation directory (staging area).  If this option is not
    directly specified on the command line or in a distutils configuration
    file, the distutils default installation location is used.  Normally, this
    will be the ``site-packages`` directory, but if you are using distutils
    configuration files, setting things like ``prefix`` or ``install_lib``,
    then those settings are taken into account when computing the default
    staging area.

``--script-dir=DIR, -s DIR``
    Set the script installation directory.  If you don't supply this option
    (via the command line or a configuration file), but you *have* supplied
    an ``--install-dir`` (via command line or config file), then this option
    defaults to the same directory, so that the scripts will be able to find
    their associated package installation.  Otherwise, this setting defaults
    to the location where the distutils would normally install scripts, taking
    any distutils configuration file settings into account.

``--exclude-scripts, -x``
    Don't deploy script wrappers.  This is useful if you don't want to disturb
    existing versions of the scripts in the staging area.

``--always-copy, -a``
    Copy all needed distributions to the staging area, even if they
    are already present in another directory on ``sys.path``.  By default, if
    a requirement can be met using a distribution that is already available in
    a directory on ``sys.path``, it will not be copied to the staging area.

``--egg-path=DIR``
    Force the generated ``.egg-link`` file to use a specified relative path
    to the source directory.  This can be useful in circumstances where your
    installation directory is being shared by code running under multiple
    platforms (e.g. Mac and Windows) which have different absolute locations
    for the code under development, but the same *relative* locations with
    respect to the installation directory.  If you use this option when
    installing, you must supply the same relative path when uninstalling.

In addition to the above options, the ``develop`` command also accepts all of
the same options accepted by ``easy_install``.  If you've configured any
``easy_install`` settings in your ``setup.cfg`` (or other distutils config
files), the ``develop`` command will use them as defaults, unless you override
them in a ``[develop]`` section or on the command line.


``easy_install`` - Find and install packages
============================================

This command runs the `EasyInstall tool
<easy_install.html>`_ for you.  It is exactly
equivalent to running the ``easy_install`` command.  All command line arguments
following this command are consumed and not processed further by the distutils,
so this must be the last command listed on the command line.  Please see
the EasyInstall documentation for the options reference and usage examples.
Normally, there is no reason to use this command via the command line, as you
can just use ``easy_install`` directly.  It's only listed here so that you know
it's a distutils command, which means that you can:

* create command aliases that use it,
* create distutils extensions that invoke it as a subcommand, and
* configure options for it in your ``setup.cfg`` or other distutils config
  files.


.. _egg_info:

``egg_info`` - Create egg metadata and set build tags
=====================================================

This command performs two operations: it updates a project's ``.egg-info``
metadata directory (used by the ``bdist_egg``, ``develop``, and ``test``
commands), and it allows you to temporarily change a project's version string,
to support "daily builds" or "snapshot" releases.  It is run automatically by
the ``sdist``, ``bdist_egg``, ``develop``, ``register``, and ``test`` commands
in order to update the project's metadata, but you can also specify it
explicitly in order to temporarily change the project's version string while
executing other commands.  (It also generates the``.egg-info/SOURCES.txt``
manifest file, which is used when you are building source distributions.)

In addition to writing the core egg metadata defined by ``setuptools`` and
required by ``pkg_resources``, this command can be extended to write other
metadata files as well, by defining entry points in the ``egg_info.writers``
group.  See the section on `Adding new EGG-INFO Files`_ below for more details.
Note that using additional metadata writers may require you to include a
``setup_requires`` argument to ``setup()`` in order to ensure that the desired
writers are available on ``sys.path``.


Release Tagging Options
-----------------------

The following options can be used to modify the project's version string for
all remaining commands on the setup command line.  The options are processed
in the order shown, so if you use more than one, the requested tags will be
added in the following order:

``--tag-build=NAME, -b NAME``
    Append NAME to the project's version string.  Due to the way setuptools
    processes "pre-release" version suffixes beginning with the letters "a"
    through "e" (like "alpha", "beta", and "candidate"), you will usually want
    to use a tag like ".build" or ".dev", as this will cause the version number
    to be considered *lower* than the project's default version.  (If you
    want to make the version number *higher* than the default version, you can
    always leave off --tag-build and then use one or both of the following
    options.)

    If you have a default build tag set in your ``setup.cfg``, you can suppress
    it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument
    to the ``egg_info`` command.

``--tag-date, -d``
    Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the
    project's version number.

``--no-date, -D``
    Don't include a date stamp in the version number.  This option is included
    so you can override a default setting in ``setup.cfg``.


(Note: Because these options modify the version number used for source and
binary distributions of your project, you should first make sure that you know
how the resulting version numbers will be interpreted by automated tools
like EasyInstall.  See the section above on `Specifying Your Project's
Version`_ for an explanation of pre- and post-release tags, as well as tips on
how to choose and verify a versioning scheme for your your project.)

For advanced uses, there is one other option that can be set, to change the
location of the project's ``.egg-info`` directory.  Commands that need to find
the project's source directory or metadata should get it from this setting:


Other ``egg_info`` Options
--------------------------

``--egg-base=SOURCEDIR, -e SOURCEDIR``
    Specify the directory that should contain the .egg-info directory.  This
    should normally be the root of your project's source tree (which is not
    necessarily the same as your project directory; some projects use a ``src``
    or ``lib`` subdirectory as the source root).  You should not normally need
    to specify this directory, as it is normally determined from the
    ``package_dir`` argument to the ``setup()`` function, if any.  If there is
    no ``package_dir`` set, this option defaults to the current directory.


``egg_info`` Examples
---------------------

Creating a dated "nightly build" snapshot egg::

    python setup.py egg_info --tag-date --tag-build=DEV bdist_egg

Creating and uploading a release with no version tags, even if some default
tags are specified in ``setup.cfg``::

    python setup.py egg_info -RDb "" sdist bdist_egg register upload

(Notice that ``egg_info`` must always appear on the command line *before* any
commands that you want the version changes to apply to.)


.. _install command:

``install`` - Run ``easy_install`` or old-style installation
============================================================

The setuptools ``install`` command is basically a shortcut to run the
``easy_install`` command on the current project.  However, for convenience
in creating "system packages" of setuptools-based projects, you can also
use this option:

``--single-version-externally-managed``
    This boolean option tells the ``install`` command to perform an "old style"
    installation, with the addition of an ``.egg-info`` directory so that the
    installed project will still have its metadata available and operate
    normally.  If you use this option, you *must* also specify the ``--root``
    or ``--record`` options (or both), because otherwise you will have no way
    to identify and remove the installed files.

This option is automatically in effect when ``install`` is invoked by another
distutils command, so that commands like ``bdist_wininst`` and ``bdist_rpm``
will create system packages of eggs.  It is also automatically in effect if
you specify the ``--root`` option.


``install_egg_info`` - Install an ``.egg-info`` directory in ``site-packages``
==============================================================================

Setuptools runs this command as part of ``install`` operations that use the
``--single-version-externally-managed`` options.  You should not invoke it
directly; it is documented here for completeness and so that distutils
extensions such as system package builders can make use of it.  This command
has only one option:

``--install-dir=DIR, -d DIR``
    The parent directory where the ``.egg-info`` directory will be placed.
    Defaults to the same as the ``--install-dir`` option specified for the
    ``install_lib`` command, which is usually the system ``site-packages``
    directory.

This command assumes that the ``egg_info`` command has been given valid options
via the command line or ``setup.cfg``, as it will invoke the ``egg_info``
command and use its options to locate the project's source ``.egg-info``
directory.


.. _rotate:

``rotate`` - Delete outdated distribution files
===============================================

As you develop new versions of your project, your distribution (``dist``)
directory will gradually fill up with older source and/or binary distribution
files.  The ``rotate`` command lets you automatically clean these up, keeping
only the N most-recently modified files matching a given pattern.

``--match=PATTERNLIST, -m PATTERNLIST``
    Comma-separated list of glob patterns to match.  This option is *required*.
    The project name and ``-*`` is prepended to the supplied patterns, in order
    to match only distributions belonging to the current project (in case you
    have a shared distribution directory for multiple projects).  Typically,
    you will use a glob pattern like ``.zip`` or ``.egg`` to match files of
    the specified type.  Note that each supplied pattern is treated as a
    distinct group of files for purposes of selecting files to delete.

``--keep=COUNT, -k COUNT``
    Number of matching distributions to keep.  For each group of files
    identified by a pattern specified with the ``--match`` option, delete all
    but the COUNT most-recently-modified files in that group.  This option is
    *required*.

``--dist-dir=DIR, -d DIR``
    Directory where the distributions are.  This defaults to the value of the
    ``bdist`` command's ``--dist-dir`` option, which will usually be the
    project's ``dist`` subdirectory.

**Example 1**: Delete all .tar.gz files from the distribution directory, except
for the 3 most recently modified ones::

    setup.py rotate --match=.tar.gz --keep=3

**Example 2**: Delete all Python 2.3 or Python 2.4 eggs from the distribution
directory, except the most recently modified one for each Python version::

    setup.py rotate --match=-py2.3*.egg,-py2.4*.egg --keep=1


.. _saveopts:

``saveopts`` - Save used options to a configuration file
========================================================

Finding and editing ``distutils`` configuration files can be a pain, especially
since you also have to translate the configuration options from command-line
form to the proper configuration file format.  You can avoid these hassles by
using the ``saveopts`` command.  Just add it to the command line to save the
options you used.  For example, this command builds the project using
the ``mingw32`` C compiler, then saves the --compiler setting as the default
for future builds (even those run implicitly by the ``install`` command)::

    setup.py build --compiler=mingw32 saveopts

The ``saveopts`` command saves all options for every command specified on the
command line to the project's local ``setup.cfg`` file, unless you use one of
the `configuration file options`_ to change where the options are saved.  For
example, this command does the same as above, but saves the compiler setting
to the site-wide (global) distutils configuration::

    setup.py build --compiler=mingw32 saveopts -g

Note that it doesn't matter where you place the ``saveopts`` command on the
command line; it will still save all the options specified for all commands.
For example, this is another valid way to spell the last example::

    setup.py saveopts -g build --compiler=mingw32

Note, however, that all of the commands specified are always run, regardless of
where ``saveopts`` is placed on the command line.


Configuration File Options
--------------------------

Normally, settings such as options and aliases are saved to the project's
local ``setup.cfg`` file.  But you can override this and save them to the
global or per-user configuration files, or to a manually-specified filename.

``--global-config, -g``
    Save settings to the global ``distutils.cfg`` file inside the ``distutils``
    package directory.  You must have write access to that directory to use
    this option.  You also can't combine this option with ``-u`` or ``-f``.

``--user-config, -u``
    Save settings to the current user's ``~/.pydistutils.cfg`` (POSIX) or
    ``$HOME/pydistutils.cfg`` (Windows) file.  You can't combine this option
    with ``-g`` or ``-f``.

``--filename=FILENAME, -f FILENAME``
    Save settings to the specified configuration file to use.  You can't
    combine this option with ``-g`` or ``-u``.  Note that if you specify a
    non-standard filename, the ``distutils`` and ``setuptools`` will not
    use the file's contents.  This option is mainly included for use in
    testing.

These options are used by other ``setuptools`` commands that modify
configuration files, such as the `alias`_ and `setopt`_ commands.


.. _setopt:

``setopt`` - Set a distutils or setuptools option in a config file
==================================================================

This command is mainly for use by scripts, but it can also be used as a quick
and dirty way to change a distutils configuration option without having to
remember what file the options are in and then open an editor.

**Example 1**.  Set the default C compiler to ``mingw32`` (using long option
names)::

    setup.py setopt --command=build --option=compiler --set-value=mingw32

**Example 2**.  Remove any setting for the distutils default package
installation directory (short option names)::

    setup.py setopt -c install -o install_lib -r


Options for the ``setopt`` command:

``--command=COMMAND, -c COMMAND``
    Command to set the option for.  This option is required.

``--option=OPTION, -o OPTION``
    The name of the option to set.  This option is required.

``--set-value=VALUE, -s VALUE``
    The value to set the option to.  Not needed if ``-r`` or ``--remove`` is
    set.

``--remove, -r``
    Remove (unset) the option, instead of setting it.

In addition to the above options, you may use any of the `configuration file
options`_ (listed under the `saveopts`_ command, above) to determine which
distutils configuration file the option will be added to (or removed from).


.. _test:

``test`` - Build package and run a unittest suite
=================================================

When doing test-driven development, or running automated builds that need
testing before they are deployed for downloading or use, it's often useful
to be able to run a project's unit tests without actually deploying the project
anywhere, even using the ``develop`` command.  The ``test`` command runs a
project's unit tests without actually deploying it, by temporarily putting the
project's source on ``sys.path``, after first running ``build_ext -i`` and
``egg_info`` to ensure that any C extensions and project metadata are
up-to-date.

To use this command, your project's tests must be wrapped in a ``unittest``
test suite by either a function, a ``TestCase`` class or method, or a module
or package containing ``TestCase`` classes.  If the named suite is a module,
and the module has an ``additional_tests()`` function, it is called and the
result (which must be a ``unittest.TestSuite``) is added to the tests to be
run.  If the named suite is a package, any submodules and subpackages are
recursively added to the overall test suite.  (Note: if your project specifies
a ``test_loader``, the rules for processing the chosen ``test_suite`` may
differ; see the `test_loader`_ documentation for more details.)

Note that many test systems including ``doctest`` support wrapping their
non-``unittest`` tests in ``TestSuite`` objects.  So, if you are using a test
package that does not support this, we suggest you encourage its developers to
implement test suite support, as this is a convenient and standard way to
aggregate a collection of tests to be run under a common test harness.

By default, tests will be run in the "verbose" mode of the ``unittest``
package's text test runner, but you can get the "quiet" mode (just dots) if
you supply the ``-q`` or ``--quiet`` option, either as a global option to
the setup script (e.g. ``setup.py -q test``) or as an option for the ``test``
command itself (e.g. ``setup.py test -q``).  There is one other option
available:

``--test-suite=NAME, -s NAME``
    Specify the test suite (or module, class, or method) to be run
    (e.g. ``some_module.test_suite``).  The default for this option can be
    set by giving a ``test_suite`` argument to the ``setup()`` function, e.g.::

        setup(
            # ...
            test_suite="my_package.tests.test_all"
        )

    If you did not set a ``test_suite`` in your ``setup()`` call, and do not
    provide a ``--test-suite`` option, an error will occur.


.. _upload:

``upload`` - Upload source and/or egg distributions to PyPI
===========================================================

The ``upload`` command is implemented and `documented
<https://docs.python.org/3.1/distutils/uploading.html>`_
in distutils.

Setuptools augments the ``upload`` command with support
for `keyring <https://pypi.python.org/pypi/keyring>`_,
allowing the password to be stored in a secure
location and not in plaintext in the .pypirc file. To use
keyring, first install keyring and set the password for
the relevant repository, e.g.::

    python -m keyring set <repository> <username>
    Password for '<username>' in '<repository>': ********

Then, in .pypirc, set the repository configuration as normal,
but omit the password. Thereafter, uploads will use the
password from the keyring.

New in 20.1: Added keyring support.


-----------------------------------------
Configuring setup() using setup.cfg files
-----------------------------------------

.. note:: New in 30.3.0 (8 Dec 2016).

.. important:: ``setup.py`` with ``setup()`` function call is still required even 
                if your configuration resides in ``setup.cfg``.

``Setuptools`` allows using configuration files (usually `setup.cfg`)
to define package’s metadata and other options which are normally supplied
to ``setup()`` function.

This approach not only allows automation scenarios, but also reduces
boilerplate code in some cases.

.. note::
    Implementation presents limited compatibility with distutils2-like
    ``setup.cfg`` sections (used by ``pbr`` and ``d2to1`` packages).

    Namely: only metadata related keys from ``metadata`` section are supported
    (except for ``description-file``); keys from ``files``, ``entry_points``
    and ``backwards_compat`` are not supported.


.. code-block:: ini

    [metadata]
    name = my_package
    version = attr: src.VERSION
    description = My package description
    long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst
    keywords = one, two
    license = BSD 3-Clause License
    classifiers =
        Framework :: Django
        Programming Language :: Python :: 3
        Programming Language :: Python :: 3.5

    [options]
    zip_safe = False
    include_package_data = True
    packages = find:
    scripts =
      bin/first.py
      bin/second.py

    [options.package_data]
    * = *.txt, *.rst
    hello = *.msg

    [options.extras_require]
    pdf = ReportLab>=1.2; RXP
    rest = docutils>=0.3; pack ==1.1, ==1.3

    [options.packages.find]
    exclude =
        src.subpackage1
        src.subpackage2


Metadata and options could be set in sections with the same names.

* Keys are the same as keyword arguments one provides to ``setup()`` function.

* Complex values could be placed comma-separated or one per line
  in *dangling* sections. The following are the same:

  .. code-block:: ini

      [metadata]
      keywords = one, two

      [metadata]
      keywords =
        one
        two

* In some cases complex values could be provided in subsections for clarity.

* Some keys allow ``file:``, ``attr:`` and ``find:`` directives to cover
  common usecases.

* Unknown keys are ignored.


Specifying values
=================

Some values are treated as simple strings, some allow more logic.

Type names used below:

* ``str`` - simple string
* ``list-comma`` - dangling list or comma-separated values string
* ``list-semi`` - dangling list or semicolon-separated values string
* ``bool`` -  ``True`` is 1, yes, true
* ``dict`` - list-comma where keys from values are separated by =
* ``section`` - values could be read from a dedicated (sub)section


Special directives:

* ``attr:`` - value could be read from module attribute
* ``file:`` - value could be read from a list of files and then concatenated


.. note::
    ``file:`` directive is sandboxed and won't reach anything outside
    directory with ``setup.py``.


Metadata
--------

.. note::
    Aliases given below are supported for compatibility reasons,
    but not advised.

=================  =================  =====
Key                Aliases            Accepted value type
=================  =================  =====
name                                  str
version                               attr:, str
url                home-page          str
download_url       download-url       str
author                                str
author_email       author-email       str
maintainer                            str
maintainer_email   maintainer-email   str
classifiers        classifier         file:, list-comma
license                               file:, str
description        summary            file:, str
long_description   long-description   file:, str
keywords                              list-comma
platforms          platform           list-comma
provides                              list-comma
requires                              list-comma
obsoletes                             list-comma
=================  =================  =====

.. note::

    **version** - ``attr:`` supports callables; supports iterables;
    unsupported types are casted using ``str()``.


Options
-------

=======================  =====
Key                      Accepted value type
=======================  =====
zip_safe                 bool
setup_requires           list-semi
install_requires         list-semi
extras_require           section
python_requires          str
entry_points             file:, section
use_2to3                 bool
use_2to3_fixers          list-comma
use_2to3_exclude_fixers  list-comma
convert_2to3_doctests    list-comma
scripts                  list-comma
eager_resources          list-comma
dependency_links         list-comma
tests_require            list-semi
include_package_data     bool
packages                 find:, list-comma
package_dir              dict
package_data             section
exclude_package_data     section
namespace_packages       list-comma
py_modules               list-comma
=======================  =====

.. note::

    **packages** - ``find:`` directive can be further configured
    in a dedicated subsection `options.packages.find`. This subsection
    accepts the same keys as `setuptools.find` function:
    `where`, `include`, `exclude`.


Configuration API
=================

Some automation tools may wish to access data from a configuration file.

``Setuptools`` exposes ``read_configuration()`` function allowing
parsing ``metadata`` and ``options`` sections into a dictionary.


.. code-block:: python

    from setuptools.config import read_configuration

    conf_dict = read_configuration('/home/user/dev/package/setup.cfg')


By default ``read_configuration()`` will read only file provided
in the first argument. To include values from other configuration files
which could be in various places set `find_others` function argument
to ``True``.

If you have only a configuration file but not the whole package you can still
try to get data out of it with the help of `ignore_option_errors` function
argument. When it is set to ``True`` all options with errors possibly produced
by directives, such as ``attr:`` and others will be silently ignored.
As a consequence the resulting dictionary will include no such options.


--------------------------------
Extending and Reusing Setuptools
--------------------------------

Creating ``distutils`` Extensions
=================================

It can be hard to add new commands or setup arguments to the distutils.  But
the ``setuptools`` package makes it a bit easier, by allowing you to distribute
a distutils extension as a separate project, and then have projects that need
the extension just refer to it in their ``setup_requires`` argument.

With ``setuptools``, your distutils extension projects can hook in new
commands and ``setup()`` arguments just by defining "entry points".  These
are mappings from command or argument names to a specification of where to
import a handler from.  (See the section on `Dynamic Discovery of Services and
Plugins`_ above for some more background on entry points.)


Adding Commands
---------------

You can add new ``setup`` commands by defining entry points in the
``distutils.commands`` group.  For example, if you wanted to add a ``foo``
command, you might add something like this to your distutils extension
project's setup script::

    setup(
        # ...
        entry_points={
            "distutils.commands": [
                "foo = mypackage.some_module:foo",
            ],
        },
    )

(Assuming, of course, that the ``foo`` class in ``mypackage.some_module`` is
a ``setuptools.Command`` subclass.)

Once a project containing such entry points has been activated on ``sys.path``,
(e.g. by running "install" or "develop" with a site-packages installation
directory) the command(s) will be available to any ``setuptools``-based setup
scripts.  It is not necessary to use the ``--command-packages`` option or
to monkeypatch the ``distutils.command`` package to install your commands;
``setuptools`` automatically adds a wrapper to the distutils to search for
entry points in the active distributions on ``sys.path``.  In fact, this is
how setuptools' own commands are installed: the setuptools project's setup
script defines entry points for them!


Adding ``setup()`` Arguments
----------------------------

Sometimes, your commands may need additional arguments to the ``setup()``
call.  You can enable this by defining entry points in the
``distutils.setup_keywords`` group.  For example, if you wanted a ``setup()``
argument called ``bar_baz``, you might add something like this to your
distutils extension project's setup script::

    setup(
        # ...
        entry_points={
            "distutils.commands": [
                "foo = mypackage.some_module:foo",
            ],
            "distutils.setup_keywords": [
                "bar_baz = mypackage.some_module:validate_bar_baz",
            ],
        },
    )

The idea here is that the entry point defines a function that will be called
to validate the ``setup()`` argument, if it's supplied.  The ``Distribution``
object will have the initial value of the attribute set to ``None``, and the
validation function will only be called if the ``setup()`` call sets it to
a non-None value.  Here's an example validation function::

    def assert_bool(dist, attr, value):
        """Verify that value is True, False, 0, or 1"""
        if bool(value) != value:
            raise DistutilsSetupError(
                "%r must be a boolean value (got %r)" % (attr,value)
            )

Your function should accept three arguments: the ``Distribution`` object,
the attribute name, and the attribute value.  It should raise a
``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument
is invalid.  Remember, your function will only be called with non-None values,
and the default value of arguments defined this way is always None.  So, your
commands should always be prepared for the possibility that the attribute will
be ``None`` when they access it later.

If more than one active distribution defines an entry point for the same
``setup()`` argument, *all* of them will be called.  This allows multiple
distutils extensions to define a common argument, as long as they agree on
what values of that argument are valid.

Also note that as with commands, it is not necessary to subclass or monkeypatch
the distutils ``Distribution`` class in order to add your arguments; it is
sufficient to define the entry points in your extension, as long as any setup
script using your extension lists your project in its ``setup_requires``
argument.


Adding new EGG-INFO Files
-------------------------

Some extensible applications or frameworks may want to allow third parties to
develop plugins with application or framework-specific metadata included in
the plugins' EGG-INFO directory, for easy access via the ``pkg_resources``
metadata API.  The easiest way to allow this is to create a distutils extension
to be used from the plugin projects' setup scripts (via ``setup_requires``)
that defines a new setup keyword, and then uses that data to write an EGG-INFO
file when the ``egg_info`` command is run.

The ``egg_info`` command looks for extension points in an ``egg_info.writers``
group, and calls them to write the files.  Here's a simple example of a
distutils extension defining a setup argument ``foo_bar``, which is a list of
lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any
project that uses the argument::

    setup(
        # ...
        entry_points={
            "distutils.setup_keywords": [
                "foo_bar = setuptools.dist:assert_string_list",
            ],
            "egg_info.writers": [
                "foo_bar.txt = setuptools.command.egg_info:write_arg",
            ],
        },
    )

This simple example makes use of two utility functions defined by setuptools
for its own use: a routine to validate that a setup keyword is a sequence of
strings, and another one that looks up a setup argument and writes it to
a file.  Here's what the writer utility looks like::

    def write_arg(cmd, basename, filename):
        argname = os.path.splitext(basename)[0]
        value = getattr(cmd.distribution, argname, None)
        if value is not None:
            value = '\n'.join(value) + '\n'
        cmd.write_or_delete_file(argname, filename, value)

As you can see, ``egg_info.writers`` entry points must be a function taking
three arguments: a ``egg_info`` command instance, the basename of the file to
write (e.g. ``foo_bar.txt``), and the actual full filename that should be
written to.

In general, writer functions should honor the command object's ``dry_run``
setting when writing files, and use the ``distutils.log`` object to do any
console output.  The easiest way to conform to this requirement is to use
the ``cmd`` object's ``write_file()``, ``delete_file()``, and
``write_or_delete_file()`` methods exclusively for your file operations.  See
those methods' docstrings for more details.


Adding Support for Revision Control Systems
-------------------------------------------------

If the files you want to include in the source distribution are tracked using
Git, Mercurial or SVN, you can use the following packages to achieve that:

- Git and Mercurial: `setuptools_scm <https://pypi.python.org/pypi/setuptools_scm>`_
- SVN: `setuptools_svn <https://pypi.python.org/pypi/setuptools_svn>`_

If you would like to create a plugin for ``setuptools`` to find files tracked
by another revision control system, you can do so by adding an entry point to
the ``setuptools.file_finders`` group.  The entry point should be a function
accepting a single directory name, and should yield all the filenames within
that directory (and any subdirectories thereof) that are under revision
control.

For example, if you were going to create a plugin for a revision control system
called "foobar", you would write a function something like this:

.. code-block:: python

    def find_files_for_foobar(dirname):
        # loop to yield paths that start with `dirname`

And you would register it in a setup script using something like this::

    entry_points={
        "setuptools.file_finders": [
            "foobar = my_foobar_module:find_files_for_foobar",
        ]
    }

Then, anyone who wants to use your plugin can simply install it, and their
local setuptools installation will be able to find the necessary files.

It is not necessary to distribute source control plugins with projects that
simply use the other source control system, or to specify the plugins in
``setup_requires``.  When you create a source distribution with the ``sdist``
command, setuptools automatically records what files were found in the
``SOURCES.txt`` file.  That way, recipients of source distributions don't need
to have revision control at all.  However, if someone is working on a package
by checking out with that system, they will need the same plugin(s) that the
original author is using.

A few important points for writing revision control file finders:

* Your finder function MUST return relative paths, created by appending to the
  passed-in directory name.  Absolute paths are NOT allowed, nor are relative
  paths that reference a parent directory of the passed-in directory.

* Your finder function MUST accept an empty string as the directory name,
  meaning the current directory.  You MUST NOT convert this to a dot; just
  yield relative paths.  So, yielding a subdirectory named ``some/dir`` under
  the current directory should NOT be rendered as ``./some/dir`` or
  ``/somewhere/some/dir``, but *always* as simply ``some/dir``

* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully
  with the absence of needed programs (i.e., ones belonging to the revision
  control system itself.  It *may*, however, use ``distutils.log.warn()`` to
  inform the user of the missing program(s).


Subclassing ``Command``
-----------------------

Sorry, this section isn't written yet, and neither is a lot of what's below
this point.

XXX


Reusing ``setuptools`` Code
===========================

``ez_setup``
------------

XXX


``setuptools.archive_util``
---------------------------

XXX


``setuptools.sandbox``
----------------------

XXX


``setuptools.package_index``
----------------------------

XXX


Mailing List and Bug Tracker
============================

Please use the `distutils-sig mailing list`_ for questions and discussion about
setuptools, and the `setuptools bug tracker`_ ONLY for issues you have
confirmed via the list are actual bugs, and which you have reduced to a minimal
set of steps to reproduce.

.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/
.. _setuptools bug tracker: https://github.com/pypa/setuptools/
doc/alt-python27-setuptools/releases.txt000064400000004102150404023540014336 0ustar00===============
Release Process
===============

In order to allow for rapid, predictable releases, Setuptools uses a
mechanical technique for releases, enacted by Travis following a
successful build of a tagged release per
`PyPI deployment <https://docs.travis-ci.com/user/deployment/pypi>`_.

Prior to cutting a release, please check that the CHANGES.rst reflects
the summary of changes since the last release.
Ideally, these changelog entries would have been added
along with the changes, but it's always good to check.
Think about it from the
perspective of a user not involved with the development--what would
that person want to know about what has changed--or from the
perspective of your future self wanting to know when a particular
change landed.

To cut a release, install and run ``bump2version {part}`` where ``part``
is major, minor, or patch based on the scope of the changes in the
release. Then, push the commits to the master branch. If tests pass,
the release will be uploaded to PyPI (from the Python 3.6 tests).

Release Frequency
-----------------

Some have asked why Setuptools is released so frequently. Because Setuptools
uses a mechanical release process, it's very easy to make releases whenever the
code is stable (tests are passing). As a result, the philosophy is to release
early and often.

While some find the frequent releases somewhat surprising, they only empower
the user. Although releases are made frequently, users can choose the frequency
at which they use those releases. If instead Setuptools contributions were only
released in batches, the user would be constrained to only use Setuptools when
those official releases were made. With frequent releases, the user can govern
exactly how often he wishes to update.

Frequent releases also then obviate the need for dev or beta releases in most
cases. Because releases are made early and often, bugs are discovered and
corrected quickly, in many cases before other users have yet to encounter them.

Release Managers
----------------

Additionally, anyone with push access to the master branch has access to cut
releases.
man/man1/python3.4.1000064400000032340150404236370010011 0ustar00.TH PYTHON "1"

.\" To view this file while editing, run it through groff:
.\"   groff -Tascii -man python.man | less

.SH NAME
python \- an interpreted, interactive, object-oriented programming language
.SH SYNOPSIS
.B python
[
.B \-B
]
[
.B \-b
]
[
.B \-d
]
[
.B \-E
]
[
.B \-h
]
[
.B \-i
]
[
.B \-I
]
.br
       [
.B \-m
.I module-name
]
[
.B \-q
]
[
.B \-O
]
[
.B \-OO
]
[
.B \-s
]
[
.B \-S
]
[
.B \-u
]
.br
       [
.B \-v
]
[
.B \-V
]
[
.B \-W
.I argument
]
[
.B \-x
]
[
[
.B \-X
.I option
]
.B \-?
]
.br
       [
.B \-c
.I command
|
.I script
|
\-
]
[
.I arguments
]
.SH DESCRIPTION
Python is an interpreted, interactive, object-oriented programming
language that combines remarkable power with very clear syntax.
For an introduction to programming in Python, see the Python Tutorial.
The Python Library Reference documents built-in and standard types,
constants, functions and modules.
Finally, the Python Reference Manual describes the syntax and
semantics of the core language in (perhaps too) much detail.
(These documents may be located via the
.B "INTERNET RESOURCES"
below; they may be installed on your system as well.)
.PP
Python's basic power can be extended with your own modules written in
C or C++.
On most systems such modules may be dynamically loaded.
Python is also adaptable as an extension language for existing
applications.
See the internal documentation for hints.
.PP
Documentation for installed Python modules and packages can be 
viewed by running the 
.B pydoc
program.  
.SH COMMAND LINE OPTIONS
.TP
.B \-B
Don't write
.I .py[co]
files on import. See also PYTHONDONTWRITEBYTECODE.
.TP
.B \-b
Issue warnings about str(bytes_instance), str(bytearray_instance)
and comparing bytes/bytearray with str. (-bb: issue errors)
.TP
.BI "\-c " command
Specify the command to execute (see next section).
This terminates the option list (following options are passed as
arguments to the command).
.TP
.B \-d
Turn on parser debugging output (for wizards only, depending on
compilation options).
.TP
.B \-E
Ignore environment variables like PYTHONPATH and PYTHONHOME that modify
the behavior of the interpreter.
.TP
.B \-h ", " \-? ", "\-\-help
Prints the usage for the interpreter executable and exits.
.TP
.B \-i
When a script is passed as first argument or the \fB\-c\fP option is
used, enter interactive mode after executing the script or the
command.  It does not read the $PYTHONSTARTUP file.  This can be
useful to inspect global variables or a stack trace when a script
raises an exception.
.TP
.B \-I
Run Python in isolated mode. This also implies \fB\-E\fP and \fB\-s\fP. In
isolated mode sys.path contains neither the script’s directory nor the user’s
site-packages directory. All PYTHON* environment variables are ignored, too.
Further restrictions may be imposed to prevent the user from injecting
malicious code.
.TP
.BI "\-m " module-name
Searches 
.I sys.path 
for the named module and runs the corresponding 
.I .py 
file as a script.
.TP
.B \-O
Turn on basic optimizations.  This changes the filename extension for
compiled (bytecode) files from
.I .pyc
to \fI.pyo\fP.  Given twice, causes docstrings to be discarded.
.TP
.B \-OO
Discard docstrings in addition to the \fB-O\fP optimizations.
.TP
.B \-q
Do not print the version and copyright messages. These messages are 
also suppressed in non-interactive mode.
.TP
.B \-s
Don't add user site directory to sys.path.
.TP
.B \-S
Disable the import of the module
.I site
and the site-dependent manipulations of
.I sys.path
that it entails.  Also disable these manipulations if
.I site
is explicitly imported later.
.TP
.B \-u
Force the binary I/O layers of stdout and stderr to be unbuffered.
stdin is always buffered.
The text I/O layer will still be line-buffered.
.\" Note that there is internal buffering in readlines() and
.\" file-object iterators ("for line in sys.stdin") which is not
.\" influenced by this option.  To work around this, you will want to use
.\" "sys.stdin.readline()" inside a "while 1:" loop.
.TP
.B \-v
Print a message each time a module is initialized, showing the place
(filename or built-in module) from which it is loaded.  When given
twice, print a message for each file that is checked for when 
searching for a module.  Also provides information on module cleanup
at exit.
.TP
.B \-V ", " \-\-version
Prints the Python version number of the executable and exits.
.TP
.BI "\-W " argument
Warning control.  Python sometimes prints warning message to
.IR sys.stderr .
A typical warning message has the following form:
.IB file ":" line ": " category ": " message.
By default, each warning is printed once for each source line where it
occurs.  This option controls how often warnings are printed.
Multiple
.B \-W
options may be given; when a warning matches more than one
option, the action for the last matching option is performed.
Invalid
.B \-W
options are ignored (a warning message is printed about invalid
options when the first warning is issued).  Warnings can also be
controlled from within a Python program using the
.I warnings
module.

The simplest form of
.I argument
is one of the following
.I action
strings (or a unique abbreviation):
.B ignore
to ignore all warnings;
.B default
to explicitly request the default behavior (printing each warning once
per source line);
.B all
to print a warning each time it occurs (this may generate many
messages if a warning is triggered repeatedly for the same source
line, such as inside a loop);
.B module
to print each warning only the first time it occurs in each
module;
.B once
to print each warning only the first time it occurs in the program; or
.B error
to raise an exception instead of printing a warning message.

The full form of
.I argument
is
.IB action : message : category : module : line.
Here,
.I action
is as explained above but only applies to messages that match the
remaining fields.  Empty fields match all values; trailing empty
fields may be omitted.  The
.I message
field matches the start of the warning message printed; this match is
case-insensitive.  The
.I category
field matches the warning category.  This must be a class name; the
match test whether the actual warning category of the message is a
subclass of the specified warning category.  The full class name must
be given.  The
.I module
field matches the (fully-qualified) module name; this match is
case-sensitive.  The
.I line
field matches the line number, where zero matches all line numbers and
is thus equivalent to an omitted line number.
.TP
.BI "\-X " option
Set implementation specific option.
.TP
.B \-x
Skip the first line of the source.  This is intended for a DOS
specific hack only.  Warning: the line numbers in error messages will
be off by one!
.SH INTERPRETER INTERFACE
The interpreter interface resembles that of the UNIX shell: when
called with standard input connected to a tty device, it prompts for
commands and executes them until an EOF is read; when called with a
file name argument or with a file as standard input, it reads and
executes a
.I script
from that file;
when called with
.B \-c
.IR command ,
it executes the Python statement(s) given as
.IR command .
Here
.I command
may contain multiple statements separated by newlines.
Leading whitespace is significant in Python statements!
In non-interactive mode, the entire input is parsed before it is
executed.
.PP
If available, the script name and additional arguments thereafter are
passed to the script in the Python variable
.IR sys.argv ,
which is a list of strings (you must first
.I import sys
to be able to access it).
If no script name is given,
.I sys.argv[0]
is an empty string; if
.B \-c
is used,
.I sys.argv[0]
contains the string
.I '-c'.
Note that options interpreted by the Python interpreter itself
are not placed in
.IR sys.argv .
.PP
In interactive mode, the primary prompt is `>>>'; the second prompt
(which appears when a command is not complete) is `...'.
The prompts can be changed by assignment to
.I sys.ps1
or
.IR sys.ps2 .
The interpreter quits when it reads an EOF at a prompt.
When an unhandled exception occurs, a stack trace is printed and
control returns to the primary prompt; in non-interactive mode, the
interpreter exits after printing the stack trace.
The interrupt signal raises the
.I Keyboard\%Interrupt
exception; other UNIX signals are not caught (except that SIGPIPE is
sometimes ignored, in favor of the
.I IOError
exception).  Error messages are written to stderr.
.SH FILES AND DIRECTORIES
These are subject to difference depending on local installation
conventions; ${prefix} and ${exec_prefix} are installation-dependent
and should be interpreted as for GNU software; they may be the same.
The default for both is \fI/usr/local\fP.
.IP \fI${exec_prefix}/bin/python\fP
Recommended location of the interpreter.
.PP
.I ${prefix}/lib/python<version>
.br
.I ${exec_prefix}/lib/python<version>
.RS
Recommended locations of the directories containing the standard
modules.
.RE
.PP
.I ${prefix}/include/python<version>
.br
.I ${exec_prefix}/include/python<version>
.RS
Recommended locations of the directories containing the include files
needed for developing Python extensions and embedding the
interpreter.
.RE
.SH ENVIRONMENT VARIABLES
.IP PYTHONHOME
Change the location of the standard Python libraries.  By default, the
libraries are searched in ${prefix}/lib/python<version> and
${exec_prefix}/lib/python<version>, where ${prefix} and ${exec_prefix}
are installation-dependent directories, both defaulting to
\fI/usr/local\fP.  When $PYTHONHOME is set to a single directory, its value
replaces both ${prefix} and ${exec_prefix}.  To specify different values
for these, set $PYTHONHOME to ${prefix}:${exec_prefix}.
.IP PYTHONPATH
Augments the default search path for module files.
The format is the same as the shell's $PATH: one or more directory
pathnames separated by colons.
Non-existent directories are silently ignored.
The default search path is installation dependent, but generally
begins with ${prefix}/lib/python<version> (see PYTHONHOME above).
The default search path is always appended to $PYTHONPATH.
If a script argument is given, the directory containing the script is
inserted in the path in front of $PYTHONPATH.
The search path can be manipulated from within a Python program as the
variable
.IR sys.path .
.IP PYTHONSTARTUP
If this is the name of a readable file, the Python commands in that
file are executed before the first prompt is displayed in interactive
mode.
The file is executed in the same name space where interactive commands
are executed so that objects defined or imported in it can be used
without qualification in the interactive session.
You can also change the prompts
.I sys.ps1
and
.I sys.ps2
in this file.
.IP PYTHONOPTIMIZE
If this is set to a non-empty string it is equivalent to specifying
the \fB\-O\fP option. If set to an integer, it is equivalent to
specifying \fB\-O\fP multiple times.
.IP PYTHONDEBUG
If this is set to a non-empty string it is equivalent to specifying
the \fB\-d\fP option. If set to an integer, it is equivalent to
specifying \fB\-d\fP multiple times.
.IP PYTHONDONTWRITEBYTECODE
If this is set to a non-empty string it is equivalent to specifying
the \fB\-B\fP option (don't try to write
.I .py[co]
files).
.IP PYTHONINSPECT
If this is set to a non-empty string it is equivalent to specifying
the \fB\-i\fP option.
.IP PYTHONIOENCODING
If this is set before running the interpreter, it overrides the encoding used
for stdin/stdout/stderr, in the syntax
.IB encodingname ":" errorhandler
The
.IB errorhandler
part is optional and has the same meaning as in str.encode. For stderr, the
.IB errorhandler
 part is ignored; the handler will always be \'backslashreplace\'.
.IP PYTHONNOUSERSITE
If this is set to a non-empty string it is equivalent to specifying the
\fB\-s\fP option (Don't add the user site directory to sys.path).
.IP PYTHONUNBUFFERED
If this is set to a non-empty string it is equivalent to specifying
the \fB\-u\fP option.
.IP PYTHONVERBOSE
If this is set to a non-empty string it is equivalent to specifying
the \fB\-v\fP option. If set to an integer, it is equivalent to
specifying \fB\-v\fP multiple times. 
.IP PYTHONWARNINGS
If this is set to a comma-separated string it is equivalent to
specifying the \fB\-W\fP option for each separate value.
.IP PYTHONHASHSEED
If this variable is set to "random", a random value is used to seed the hashes
of str, bytes and datetime objects.

If PYTHONHASHSEED is set to an integer value, it is used as a fixed seed for
generating the hash() of the types covered by the hash randomization.  Its
purpose is to allow repeatable hashing, such as for selftests for the
interpreter itself, or to allow a cluster of python processes to share hash
values.

The integer must be a decimal number in the range [0,4294967295].  Specifying
the value 0 will disable hash randomization.
.SH AUTHOR
The Python Software Foundation: https://www.python.org/psf/
.SH INTERNET RESOURCES
Main website:  https://www.python.org/
.br
Documentation:  https://docs.python.org/
.br
Developer resources:  https://docs.python.org/devguide/
.br
Downloads:  https://www.python.org/downloads/
.br
Module repository:  https://pypi.python.org/
.br
Newsgroups:  comp.lang.python, comp.lang.python.announce
.SH LICENSING
Python is distributed under an Open Source license.  See the file
"LICENSE" in the Python source distribution for information on terms &
conditions for accessing and otherwise using Python and for a
DISCLAIMER OF ALL WARRANTIES.
systemptap/tapset/libpython3.4-64.stp000064400000001050150404236400013463 0ustar00/* Systemtap tapset to make it easier to trace Python */

/*
   Define python.function.entry/return:
*/
probe python.function.entry = process("python3").library("/opt/alt/python34/lib64/libpython3.4m.so.1.0").mark("function__entry")
{
    filename = user_string($arg1);
    funcname = user_string($arg2);
    lineno = $arg3;
}
probe python.function.return = process("python3").library("/opt/alt/python34/lib64/libpython3.4m.so.1.0").mark("function__return")
{
    filename = user_string($arg1);
    funcname = user_string($arg2);
    lineno = $arg3;
}
doc/alt-python34-libs/systemtap-example.stp000064400000001145150404236400014717 0ustar00/*
    Example usage of the Python systemtap tapset to show a nested view of all
    Python function calls (and returns) across the whole system.

    Run this using
        stap systemtap-example.stp
    to instrument all Python processes on the system, or (for example) using
        stap systemtap-example.stp -c COMMAND
    to instrument a specific program (implemented in Python)
*/
probe python.function.entry
{
  printf("%s => %s in %s:%d\n", thread_indent(1), funcname, filename, lineno);
}

probe python.function.return
{
  printf("%s <= %s in %s:%d\n", thread_indent(-1), funcname, filename, lineno);
}
doc/alt-python34-libs/LICENSE000064400000030761150404236410011521 0ustar00A. HISTORY OF THE SOFTWARE
==========================

Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC.  Guido remains Python's
principal author, although it includes many contributions from others.

In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.

In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
year, the PythonLabs team moved to Digital Creations (now Zope
Corporation, see http://www.zope.com).  In 2001, the Python Software
Foundation (PSF, see http://www.python.org/psf/) was formed, a
non-profit organization created specifically to own Python-related
Intellectual Property.  Zope Corporation is a sponsoring member of
the PSF.

All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition).  Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.

    Release         Derived     Year        Owner       GPL-
                    from                                compatible? (1)

    0.9.0 thru 1.2              1991-1995   CWI         yes
    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
    1.6             1.5.2       2000        CNRI        no
    2.0             1.6         2000        BeOpen.com  no
    1.6.1           1.6         2001        CNRI        yes (2)
    2.1             2.0+1.6.1   2001        PSF         no
    2.0.1           2.0+1.6.1   2001        PSF         yes
    2.1.1           2.1+2.0.1   2001        PSF         yes
    2.1.2           2.1.1       2002        PSF         yes
    2.1.3           2.1.2       2002        PSF         yes
    2.2 and above   2.1.1       2001-now    PSF         yes

Footnotes:

(1) GPL-compatible doesn't mean that we're distributing Python under
    the GPL.  All Python licenses, unlike the GPL, let you distribute
    a modified version without making your changes open source.  The
    GPL-compatible licenses make it possible to combine Python with
    other software that is released under the GPL; the others don't.

(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
    because its license has a choice of law clause.  According to
    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
    is "not incompatible" with the GPL.

Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.


B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================

PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software
Foundation; All Rights Reserved" are retained in Python alone or in any
derivative version prepared by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee.  This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------

BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1

1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").

2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.

3. BeOpen is making the Software available to Licensee on an "AS IS"
basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions.  Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee.  This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party.  As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.

7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------

1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.

2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee.  Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement.  This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013.  This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.

4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee.  This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.

8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.

        ACCEPT


CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands.  All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
doc/alt-python34-libs/README000064400000016634150404236410011377 0ustar00This is Python version 3.4.10
=============================

Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software
Foundation.  All rights reserved.

Python 3.4 Is No Longer Supported
---------------------------------

Python 3.4.10 is the final release in the Python 3.4 series.  As of this
release, the 3.4 branch has been retired, no further changes to 3.4 will be
accepted, and no new releases will be made.  This is standard Python policy;
Python releases get five years of support and are then retired.

If you're still using Python 3.4, you should consider upgrading to the
current version--3.7.2 as of this writing.  Newer versions of Python
have many new features, performance improvements, and bug fixes, which
should all serve to enhance your Python programming experience.

We in the Python core development community thank you for your interest
in 3.4, and we wish you all the best!

Python 3.x
----------

Python 3.x is a new version of the language, which is incompatible with the 2.x
line of releases.  The language is mostly the same, but many details, especially
how built-in objects like dictionaries and strings work, have changed
considerably, and a lot of deprecated features have finally been removed.


Build Instructions
------------------

On Unix, Linux, BSD, OSX, and Cygwin:

New text

    ./configure
    make
    make test
    sudo make install

This will install Python as python3.

You can pass many options to the configure script; run "./configure --help" to
find out more.  On OSX and Cygwin, the executable is called python.exe;
elsewhere it's just python.

On Mac OS X, if you have configured Python with --enable-framework, you should
use "make frameworkinstall" to do the installation.  Note that this installs the
Python executable in a place that is not normally on your PATH, you may want to
set up a symlink in /usr/local/bin.

On Windows, see PCbuild/readme.txt.

If you wish, you can create a subdirectory and invoke configure from there.  For
example:

    mkdir debug
    cd debug
    ../configure --with-pydebug
    make
    make test

(This will fail if you *also* built at the top-level directory.  You should do a
"make clean" at the toplevel first.)


What's New
----------

We try to have a comprehensive overview of the changes in the "What's New in
Python 3.4" document, found at

    http://docs.python.org/3.4/whatsnew/3.4.html

For a more detailed change log, read Misc/NEWS (though this file, too, is
incomplete, and also doesn't list anything merged in from the 2.7 release under
development).

If you want to install multiple versions of Python see the section below
entitled "Installing multiple versions".


Documentation
-------------

Documentation for Python 3.4 is online, updated daily:

    http://docs.python.org/3.4/

It can also be downloaded in many formats for faster access.  The documentation
is downloadable in HTML, PDF, and reStructuredText formats; the latter version
is primarily for documentation authors, translators, and people with special
formatting requirements.

If you would like to contribute to the development of Python, relevant
documentation is available at:

    http://docs.python.org/devguide/

For information about building Python's documentation, refer to Doc/README.txt.


Converting From Python 2.x to 3.x
---------------------------------

Python starting with 2.6 contains features to help locating code that needs to
be changed, such as optional warnings when deprecated features are used, and
backported versions of certain key Python 3.x features.

A source-to-source translation tool, "2to3", can take care of the mundane task
of converting large amounts of source code.  It is not a complete solution but
is complemented by the deprecation warnings in 2.6.  See
http://docs.python.org/3.4/library/2to3.html for more information.


Testing
-------

To test the interpreter, type "make test" in the top-level directory.  The test
set produces some output.  You can generally ignore the messages about skipped
tests due to optional features which can't be imported.  If a message is printed
about a failed test or a traceback or core dump is produced, something is wrong.

By default, tests are prevented from overusing resources like disk space and
memory.  To enable these tests, run "make testall".

IMPORTANT: If the tests fail and you decide to mail a bug report, *don't*
include the output of "make test".  It is useless.  Run the failing test
manually, as follows:

        ./python -m test -v test_whatever

(substituting the top of the source tree for '.' if you built in a different
directory).  This runs the test in verbose mode.


Installing multiple versions
----------------------------

On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument to the configure script)
you must take care that your primary python executable is not overwritten by the
installation of a different version.  All files and directories installed using
"make altinstall" contain the major and minor version and can thus live
side-by-side.  "make install" also creates ${prefix}/bin/python3 which refers to
${prefix}/bin/pythonX.Y.  If you intend to install multiple versions using the
same prefix you must decide which version (if any) is your "primary" version.
Install that version using "make install".  Install all other versions using
"make altinstall".

For example, if you want to install Python 2.6, 2.7 and 3.4 with 2.7 being the
primary version, you would execute "make install" in your 2.7 build directory
and "make altinstall" in the others.


Issue Tracker and Mailing List
------------------------------

We're soliciting bug reports about all aspects of the language.  Fixes are also
welcome, preferable in unified diff format.  Please use the issue tracker:

    http://bugs.python.org/

If you're not sure whether you're dealing with a bug or a feature, use the
mailing list:

    python-dev@python.org

To subscribe to the list, use the mailman form:

    http://mail.python.org/mailman/listinfo/python-dev/


Proposals for enhancement
-------------------------

If you have a proposal to change Python, you may want to send an email to the
comp.lang.python or python-ideas mailing lists for inital feedback.  A Python
Enhancement Proposal (PEP) may be submitted if your idea gains ground.  All
current PEPs, as well as guidelines for submitting a new PEP, are listed at
http://www.python.org/dev/peps/.


Release Schedule
----------------

See PEP 429 for release details: http://www.python.org/dev/peps/pep-0429/


Copyright and License Information
---------------------------------

Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software
Foundation.  All rights reserved.

Copyright (c) 2000 BeOpen.com.  All rights reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.  All
rights reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum.  All rights reserved.

See the file "LICENSE" for information on the history of this software, terms &
conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

This Python distribution contains *no* GNU General Public License (GPL) code, so
it may be used in proprietary projects.  There are interfaces to some GNU code
but these are entirely optional.

All trademarks referenced herein are property of their respective holders.
doc/alt-python34-libs/pyfuntop.stp000064400000001031150404236420013115 0ustar00#!/usr/bin/stap 

global fn_calls;

probe python.function.entry
{ 
  fn_calls[pid(), filename, funcname, lineno] += 1;
}

probe timer.ms(1000) {
    printf("\033[2J\033[1;1H") /* clear screen */
    printf("%6s %80s %6s %30s %6s\n",
           "PID", "FILENAME", "LINE", "FUNCTION", "CALLS")
    foreach ([pid, filename, funcname, lineno] in fn_calls- limit 20) {
        printf("%6d %80s %6d %30s %6d\n",
            pid, filename, lineno, funcname,
            fn_calls[pid, filename, funcname, lineno]);
    }

    delete fn_calls;
}
doc/alt-python34-setuptools/CHANGES.txt000064400000144723150404236420013622 0ustar00=======
CHANGES
=======

---
2.0
---

* Issue #121: Exempt lib2to3 pickled grammars from DirectorySandbox.
* Issue #41: Dropped support for Python 2.4 and Python 2.5. Clients requiring
  setuptools for those versions of Python should use setuptools 1.x.
* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients
  expecting this boolean variable should use ``site.ENABLE_USER_SITE``
  instead.
* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class
  should use ``pkgutil.ImpImporter`` instead.

-----
1.4.2
-----

* Issue #116: Correct TypeError when reading a local package index on Python
  3.

-----
1.4.1
-----

* Issue #114: Use ``sys.getfilesystemencoding`` for decoding config in
  ``bdist_wininst`` distributions.

* Issue #105 and Issue #113: Establish a more robust technique for
  determining the terminal encoding::

    1. Try ``getpreferredencoding``
    2. If that returns US_ASCII or None, try the encoding from
       ``getdefaultlocale``. If that encoding was a "fallback" because Python
       could not figure it out from the environment or OS, encoding remains
       unresolved.
    3. If the encoding is resolved, then make sure Python actually implements
       the encoding.
    4. On the event of an error or unknown codec, revert to fallbacks
       (UTF-8 on Darwin, ASCII on everything else).
    5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was
       a bug on older Python releases.

    On a side note, it would seem that the encoding only matters for when SVN
    does not yet support ``--xml`` and when getting repository and svn version
    numbers. The ``--xml`` technique should yield UTF-8 according to some
    messages on the SVN mailing lists. So if the version numbers are always
    7-bit ASCII clean, it may be best to only support the file parsing methods
    for legacy SVN releases and support for SVN without the subprocess command
    would simple go away as support for the older SVNs does.

---
1.4
---

* Issue #27: ``easy_install`` will now use credentials from .pypirc if
  present for connecting to the package index.
* Pull Request #21: Omit unwanted newlines in ``package_index._encode_auth``
  when the username/password pair length indicates wrapping.

-----
1.3.2
-----

* Issue #99: Fix filename encoding issues in SVN support.

-----
1.3.1
-----

* Remove exuberant warning in SVN support when SVN is not used.

---
1.3
---

* Address security vulnerability in SSL match_hostname check as reported in
  Python #17997.
* Prefer `backports.ssl_match_hostname
  <https://pypi.python.org/pypi/backports.ssl_match_hostname>`_ for backport
  implementation if present.
* Correct NameError in ``ssl_support`` module (``socket.error``).

---
1.2
---

* Issue #26: Add support for SVN 1.7. Special thanks to Philip Thiem for the
  contribution.
* Issue #93: Wheels are now distributed with every release. Note that as
  reported in Issue #108, as of Pip 1.4, scripts aren't installed properly
  from wheels. Therefore, if using Pip to install setuptools from a wheel,
  the ``easy_install`` command will not be available.
* Setuptools "natural" launcher support, introduced in 1.0, is now officially
  supported.

-----
1.1.7
-----

* Fixed behavior of NameError handling in 'script template (dev).py' (script
  launcher for 'develop' installs).
* ``ez_setup.py`` now ensures partial downloads are cleaned up following
  a failed download.
* Distribute #363 and Issue #55: Skip an sdist test that fails on locales
  other than UTF-8.

-----
1.1.6
-----

* Distribute #349: ``sandbox.execfile`` now opens the target file in binary
  mode, thus honoring a BOM in the file when compiled.

-----
1.1.5
-----

* Issue #69: Second attempt at fix (logic was reversed).

-----
1.1.4
-----

* Issue #77: Fix error in upload command (Python 2.4).

-----
1.1.3
-----

* Fix NameError in previous patch.

-----
1.1.2
-----

* Issue #69: Correct issue where 404 errors are returned for URLs with
  fragments in them (such as #egg=).

-----
1.1.1
-----

* Issue #75: Add ``--insecure`` option to ez_setup.py to accommodate
  environments where a trusted SSL connection cannot be validated.
* Issue #76: Fix AttributeError in upload command with Python 2.4.

---
1.1
---

* Issue #71 (Distribute #333): EasyInstall now puts less emphasis on the
  condition when a host is blocked via ``--allow-hosts``.
* Issue #72: Restored Python 2.4 compatibility in ``ez_setup.py``.

---
1.0
---

* Issue #60: On Windows, Setuptools supports deferring to another launcher,
  such as Vinay Sajip's `pylauncher <https://bitbucket.org/pypa/pylauncher>`_
  (included with Python 3.3) to launch console and GUI scripts and not install
  its own launcher executables. This experimental functionality is currently
  only enabled if  the ``SETUPTOOLS_LAUNCHER`` environment variable is set to
  "natural". In the future, this behavior may become default, but only after
  it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER``
  also accepts "executable" to force the default behavior of creating launcher
  executables.
* Issue #63: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or
  wget for retrieving the Setuptools tarball for improved security of the
  install. The script will still fall back to a simple ``urlopen`` on
  platforms that do not have these tools.
* Issue #65: Deprecated the ``Features`` functionality.
* Issue #52: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied)
  connection.

Backward-Incompatible Changes
=============================

This release includes a couple of backward-incompatible changes, but most if
not all users will find 1.0 a drop-in replacement for 0.9.

* Issue #50: Normalized API of environment marker support. Specifically,
  removed line number and filename from SyntaxErrors when returned from
  `pkg_resources.invalid_marker`. Any clients depending on the specific
  string representation of exceptions returned by that function may need to
  be updated to account for this change.
* Issue #50: SyntaxErrors generated by `pkg_resources.invalid_marker` are
  normalized for cross-implementation consistency.
* Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting``
  options to easy_install. These options have been deprecated since 0.6a11.

-----
0.9.8
-----

* Issue #53: Fix NameErrors in `_vcs_split_rev_from_url`.

-----
0.9.7
-----

* Issue #49: Correct AttributeError on PyPy where a hashlib.HASH object does
  not have a `.name` attribute.
* Issue #34: Documentation now refers to bootstrap script in code repository
  referenced by bookmark.
* Add underscore-separated keys to environment markers (markerlib).

-----
0.9.6
-----

* Issue #44: Test failure on Python 2.4 when MD5 hash doesn't have a `.name`
  attribute.

-----
0.9.5
-----

* Python #17980: Fix security vulnerability in SSL certificate validation.

-----
0.9.4
-----

* Issue #43: Fix issue (introduced in 0.9.1) with version resolution when
  upgrading over other releases of Setuptools.

-----
0.9.3
-----

* Issue #42: Fix new ``AttributeError`` introduced in last fix.

-----
0.9.2
-----

* Issue #42: Fix regression where blank checksums would trigger an
  ``AttributeError``.

-----
0.9.1
-----

* Distribute #386: Allow other positional and keyword arguments to os.open.
* Corrected dependency on certifi mis-referenced in 0.9.

---
0.9
---

* `package_index` now validates hashes other than MD5 in download links.

---
0.8
---

* Code base now runs on Python 2.4 - Python 3.3 without Python 2to3
  conversion.

-----
0.7.8
-----

* Distribute #375: Yet another fix for yet another regression.

-----
0.7.7
-----

* Distribute #375: Repair AttributeError created in last release (redo).
* Issue #30: Added test for get_cache_path.

-----
0.7.6
-----

* Distribute #375: Repair AttributeError created in last release.

-----
0.7.5
-----

* Issue #21: Restore Python 2.4 compatibility in ``test_easy_install``.
* Distribute #375: Merged additional warning from Distribute 0.6.46.
* Now honor the environment variable
  ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now
  deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``.

-----
0.7.4
-----

* Issue #20: Fix comparison of parsed SVN version on Python 3.

-----
0.7.3
-----

* Issue #1: Disable installation of Windows-specific files on non-Windows systems.
* Use new sysconfig module with Python 2.7 or >=3.2.

-----
0.7.2
-----

* Issue #14: Use markerlib when the `parser` module is not available.
* Issue #10: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI.

-----
0.7.1
-----

* Fix NameError (Issue #3) again - broken in bad merge.

---
0.7
---

* Merged Setuptools and Distribute. See docs/merge.txt for details.

Added several features that were slated for setuptools 0.6c12:

* Index URL now defaults to HTTPS.
* Added experimental environment marker support. Now clients may designate a
  PEP-426 environment marker for "extra" dependencies. Setuptools uses this
  feature in ``setup.py`` for optional SSL and certificate validation support
  on older platforms. Based on Distutils-SIG discussions, the syntax is
  somewhat tentative. There should probably be a PEP with a firmer spec before
  the feature should be considered suitable for use.
* Added support for SSL certificate validation when installing packages from
  an HTTPS service.

-----
0.7b4
-----

* Issue #3: Fixed NameError in SSL support.

------
0.6.49
------

* Move warning check in ``get_cache_path`` to follow the directory creation
  to avoid errors when the cache path does not yet exist. Fixes the error
  reported in Distribute #375.

------
0.6.48
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46 (redo).

------
0.6.47
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46.

------
0.6.46
------

* Distribute #375: Issue a warning if the PYTHON_EGG_CACHE or otherwise
  customized egg cache location specifies a directory that's group- or
  world-writable.

------
0.6.45
------

* Distribute #379: ``distribute_setup.py`` now traps VersionConflict as well,
  restoring ability to upgrade from an older setuptools version.

------
0.6.44
------

* ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to
  satisfy use_setuptools.

------
0.6.43
------

* Distribute #378: Restore support for Python 2.4 Syntax (regression in 0.6.42).

------
0.6.42
------

* External links finder no longer yields duplicate links.
* Distribute #337: Moved site.py to setuptools/site-patch.py (graft of very old
  patch from setuptools trunk which inspired PR #31).

------
0.6.41
------

* Distribute #27: Use public api for loading resources from zip files rather than
  the private method `_zip_directory_cache`.
* Added a new function ``easy_install.get_win_launcher`` which may be used by
  third-party libraries such as buildout to get a suitable script launcher.

------
0.6.40
------

* Distribute #376: brought back cli.exe and gui.exe that were deleted in the
  previous release.

------
0.6.39
------

* Add support for console launchers on ARM platforms.
* Fix possible issue in GUI launchers where the subsystem was not supplied to
  the linker.
* Launcher build script now refactored for robustness.
* Distribute #375: Resources extracted from a zip egg to the file system now also
  check the contents of the file against the zip contents during each
  invocation of get_resource_filename.

------
0.6.38
------

* Distribute #371: The launcher manifest file is now installed properly.

------
0.6.37
------

* Distribute #143: Launcher scripts, including easy_install itself, are now
  accompanied by a manifest on 32-bit Windows environments to avoid the
  Installer Detection Technology and thus undesirable UAC elevation described
  in `this Microsoft article
  <http://technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx>`_.

------
0.6.36
------

* Pull Request #35: In Buildout #64, it was reported that
  under Python 3, installation of distutils scripts could attempt to copy
  the ``__pycache__`` directory as a file, causing an error, apparently only
  under Windows. Easy_install now skips all directories when processing
  metadata scripts.

------
0.6.35
------


Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in
how it parses version numbers.

* Distribute #278: Restored compatibility with distribute 0.6.22 and setuptools
  0.6. Updated the documentation to match more closely with the version
  parsing as intended in setuptools 0.6.

------
0.6.34
------

* Distribute #341: 0.6.33 fails to build under Python 2.4.

------
0.6.33
------

* Fix 2 errors with Jython 2.5.
* Fix 1 failure with Jython 2.5 and 2.7.
* Disable workaround for Jython scripts on Linux systems.
* Distribute #336: `setup.py` no longer masks failure exit code when tests fail.
* Fix issue in pkg_resources where try/except around a platform-dependent
  import would trigger hook load failures on Mercurial. See pull request 32
  for details.
* Distribute #341: Fix a ResourceWarning.

------
0.6.32
------

* Fix test suite with Python 2.6.
* Fix some DeprecationWarnings and ResourceWarnings.
* Distribute #335: Backed out `setup_requires` superceding installed requirements
  until regression can be addressed.

------
0.6.31
------

* Distribute #303: Make sure the manifest only ever contains UTF-8 in Python 3.
* Distribute #329: Properly close files created by tests for compatibility with
  Jython.
* Work around Jython #1980 and Jython #1981.
* Distribute #334: Provide workaround for packages that reference `sys.__stdout__`
  such as numpy does. This change should address
  `virtualenv #359 <https://github.com/pypa/virtualenv/issues/359>`_ as long
  as the system encoding is UTF-8 or the IO encoding is specified in the
  environment, i.e.::

     PYTHONIOENCODING=utf8 pip install numpy

* Fix for encoding issue when installing from Windows executable on Python 3.
* Distribute #323: Allow `setup_requires` requirements to supercede installed
  requirements. Added some new keyword arguments to existing pkg_resources
  methods. Also had to updated how __path__ is handled for namespace packages
  to ensure that when a new egg distribution containing a namespace package is
  placed on sys.path, the entries in __path__ are found in the same order they
  would have been in had that egg been on the path when pkg_resources was
  first imported.

------
0.6.30
------

* Distribute #328: Clean up temporary directories in distribute_setup.py.
* Fix fatal bug in distribute_setup.py.

------
0.6.29
------

* Pull Request #14: Honor file permissions in zip files.
* Distribute #327: Merged pull request #24 to fix a dependency problem with pip.
* Merged pull request #23 to fix https://github.com/pypa/virtualenv/issues/301.
* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx`
  to produce uploadable documentation.
* Distribute #326: `upload_docs` provided mangled auth credentials under Python 3.
* Distribute #320: Fix check for "createable" in distribute_setup.py.
* Distribute #305: Remove a warning that was triggered during normal operations.
* Distribute #311: Print metadata in UTF-8 independent of platform.
* Distribute #303: Read manifest file with UTF-8 encoding under Python 3.
* Distribute #301: Allow to run tests of namespace packages when using 2to3.
* Distribute #304: Prevent import loop in site.py under Python 3.3.
* Distribute #283: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3.
* Distribute #299: The develop command didn't work on Python 3, when using 2to3,
  as the egg link would go to the Python 2 source. Linking to the 2to3'd code
  in build/lib makes it work, although you will have to rebuild the module
  before testing it.
* Distribute #306: Even if 2to3 is used, we build in-place under Python 2.
* Distribute #307: Prints the full path when .svn/entries is broken.
* Distribute #313: Support for sdist subcommands (Python 2.7)
* Distribute #314: test_local_index() would fail an OS X.
* Distribute #310: Non-ascii characters in a namespace __init__.py causes errors.
* Distribute #218: Improved documentation on behavior of `package_data` and
  `include_package_data`. Files indicated by `package_data` are now included
  in the manifest.
* `distribute_setup.py` now allows a `--download-base` argument for retrieving
  distribute from a specified location.

------
0.6.28
------

* Distribute #294: setup.py can now be invoked from any directory.
* Scripts are now installed honoring the umask.
* Added support for .dist-info directories.
* Distribute #283: Fix and disable scanning of `*.pyc` / `*.pyo` files on
  Python 3.3.

------
0.6.27
------

* Support current snapshots of CPython 3.3.
* Distribute now recognizes README.rst as a standard, default readme file.
* Exclude 'encodings' modules when removing modules from sys.modules.
  Workaround for #285.
* Distribute #231: Don't fiddle with system python when used with buildout
  (bootstrap.py)

------
0.6.26
------

* Distribute #183: Symlinked files are now extracted from source distributions.
* Distribute #227: Easy_install fetch parameters are now passed during the
  installation of a source distribution; now fulfillment of setup_requires
  dependencies will honor the parameters passed to easy_install.

------
0.6.25
------

* Distribute #258: Workaround a cache issue
* Distribute #260: distribute_setup.py now accepts the --user parameter for
  Python 2.6 and later.
* Distribute #262: package_index.open_with_auth no longer throws LookupError
  on Python 3.
* Distribute #269: AttributeError when an exception occurs reading Manifest.in
  on late releases of Python.
* Distribute #272: Prevent TypeError when namespace package names are unicode
  and single-install-externally-managed is used. Also fixes PIP issue
  449.
* Distribute #273: Legacy script launchers now install with Python2/3 support.

------
0.6.24
------

* Distribute #249: Added options to exclude 2to3 fixers

------
0.6.23
------

* Distribute #244: Fixed a test
* Distribute #243: Fixed a test
* Distribute #239: Fixed a test
* Distribute #240: Fixed a test
* Distribute #241: Fixed a test
* Distribute #237: Fixed a test
* Distribute #238: easy_install now uses 64bit executable wrappers on 64bit Python
* Distribute #208: Fixed parsed_versions, it now honors post-releases as noted in the documentation
* Distribute #207: Windows cli and gui wrappers pass CTRL-C to child python process
* Distribute #227: easy_install now passes its arguments to setup.py bdist_egg
* Distribute #225: Fixed a NameError on Python 2.5, 2.4

------
0.6.21
------

* Distribute #225: FIxed a regression on py2.4

------
0.6.20
------

* Distribute #135: Include url in warning when processing URLs in package_index.
* Distribute #212: Fix issue where easy_instal fails on Python 3 on windows installer.
* Distribute #213: Fix typo in documentation.

------
0.6.19
------

* Distribute #206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

------
0.6.18
------

* Distribute #210: Fixed a regression introduced by Distribute #204 fix.

------
0.6.17
------

* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment
  variable to allow to disable installation of easy_install-${version} script.
* Support Python >=3.1.4 and >=3.2.1.
* Distribute #204: Don't try to import the parent of a namespace package in
  declare_namespace
* Distribute #196: Tolerate responses with multiple Content-Length headers
* Distribute #205: Sandboxing doesn't preserve working_set. Leads to setup_requires
  problems.

------
0.6.16
------

* Builds sdist gztar even on Windows (avoiding Distribute #193).
* Distribute #192: Fixed metadata omitted on Windows when package_dir
  specified with forward-slash.
* Distribute #195: Cython build support.
* Distribute #200: Issues with recognizing 64-bit packages on Windows.

------
0.6.15
------

* Fixed typo in bdist_egg
* Several issues under Python 3 has been solved.
* Distribute #146: Fixed missing DLL files after easy_install of windows exe package.

------
0.6.14
------

* Distribute #170: Fixed unittest failure. Thanks to Toshio.
* Distribute #171: Fixed race condition in unittests cause deadlocks in test suite.
* Distribute #143: Fixed a lookup issue with easy_install.
  Thanks to David and Zooko.
* Distribute #174: Fixed the edit mode when its used with setuptools itself

------
0.6.13
------

* Distribute #160: 2.7 gives ValueError("Invalid IPv6 URL")
* Distribute #150: Fixed using ~/.local even in a --no-site-packages virtualenv
* Distribute #163: scan index links before external links, and don't use the md5 when
  comparing two distributions

------
0.6.12
------

* Distribute #149: Fixed various failures on 2.3/2.4

------
0.6.11
------

* Found another case of SandboxViolation - fixed
* Distribute #15 and Distribute #48: Introduced a socket timeout of 15 seconds on url openings
* Added indexsidebar.html into MANIFEST.in
* Distribute #108: Fixed TypeError with Python3.1
* Distribute #121: Fixed --help install command trying to actually install.
* Distribute #112: Added an os.makedirs so that Tarek's solution will work.
* Distribute #133: Added --no-find-links to easy_install
* Added easy_install --user
* Distribute #100: Fixed develop --user not taking '.' in PYTHONPATH into account
* Distribute #134: removed spurious UserWarnings. Patch by VanLindberg
* Distribute #138: cant_write_to_target error when setup_requires is used.
* Distribute #147: respect the sys.dont_write_bytecode flag

------
0.6.10
------

* Reverted change made for the DistributionNotFound exception because
  zc.buildout uses the exception message to get the name of the
  distribution.

-----
0.6.9
-----

* Distribute #90: unknown setuptools version can be added in the working set
* Distribute #87: setupt.py doesn't try to convert distribute_setup.py anymore
  Initial Patch by arfrever.
* Distribute #89: added a side bar with a download link to the doc.
* Distribute #86: fixed missing sentence in pkg_resources doc.
* Added a nicer error message when a DistributionNotFound is raised.
* Distribute #80: test_develop now works with Python 3.1
* Distribute #93: upload_docs now works if there is an empty sub-directory.
* Distribute #70: exec bit on non-exec files
* Distribute #99: now the standalone easy_install command doesn't uses a
  "setup.cfg" if any exists in the working directory. It will use it
  only if triggered by ``install_requires`` from a setup.py call
  (install, develop, etc).
* Distribute #101: Allowing ``os.devnull`` in Sandbox
* Distribute #92: Fixed the "no eggs" found error with MacPort
  (platform.mac_ver() fails)
* Distribute #103: test_get_script_header_jython_workaround not run
  anymore under py3 with C or POSIX local. Contributed by Arfrever.
* Distribute #104: remvoved the assertion when the installation fails,
  with a nicer message for the end user.
* Distribute #100: making sure there's no SandboxViolation when
  the setup script patches setuptools.

-----
0.6.8
-----

* Added "check_packages" in dist. (added in Setuptools 0.6c11)
* Fixed the DONT_PATCH_SETUPTOOLS state.

-----
0.6.7
-----

* Distribute #58: Added --user support to the develop command
* Distribute #11: Generated scripts now wrap their call to the script entry point
  in the standard "if name == 'main'"
* Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv
  can drive an installation that doesn't patch a global setuptools.
* Reviewed unladen-swallow specific change from
  http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719
  and determined that it no longer applies. Distribute should work fine with
  Unladen Swallow 2009Q3.
* Distribute #21: Allow PackageIndex.open_url to gracefully handle all cases of a
  httplib.HTTPException instead of just InvalidURL and BadStatusLine.
* Removed virtual-python.py from this distribution and updated documentation
  to point to the actively maintained virtualenv instead.
* Distribute #64: use_setuptools no longer rebuilds the distribute egg every
  time it is run
* use_setuptools now properly respects the requested version
* use_setuptools will no longer try to import a distribute egg for the
  wrong Python version
* Distribute #74: no_fake should be True by default.
* Distribute #72: avoid a bootstrapping issue with easy_install -U

-----
0.6.6
-----

* Unified the bootstrap file so it works on both py2.x and py3k without 2to3
  (patch by Holger Krekel)

-----
0.6.5
-----

* Distribute #65: cli.exe and gui.exe are now generated at build time,
  depending on the platform in use.

* Distribute #67: Fixed doc typo (PEP 381/382)

* Distribute no longer shadows setuptools if we require a 0.7-series
  setuptools.  And an error is raised when installing a 0.7 setuptools with
  distribute.

* When run from within buildout, no attempt is made to modify an existing
  setuptools egg, whether in a shared egg directory or a system setuptools.

* Fixed a hole in sandboxing allowing builtin file to write outside of
  the sandbox.

-----
0.6.4
-----

* Added the generation of `distribute_setup_3k.py` during the release.
  This closes Distribute #52.

* Added an upload_docs command to easily upload project documentation to
  PyPI's https://pythonhosted.org. This close issue Distribute #56.

* Fixed a bootstrap bug on the use_setuptools() API.

-----
0.6.3
-----

setuptools
==========

* Fixed a bunch of calls to file() that caused crashes on Python 3.

bootstrapping
=============

* Fixed a bug in sorting that caused bootstrap to fail on Python 3.

-----
0.6.2
-----

setuptools
==========

* Added Python 3 support; see docs/python3.txt.
  This closes Old Setuptools #39.

* Added option to run 2to3 automatically when installing on Python 3.
  This closes issue Distribute #31.

* Fixed invalid usage of requirement.parse, that broke develop -d.
  This closes Old Setuptools #44.

* Fixed script launcher for 64-bit Windows.
  This closes Old Setuptools #2.

* KeyError when compiling extensions.
  This closes Old Setuptools #41.

bootstrapping
=============

* Fixed bootstrap not working on Windows. This closes issue Distribute #49.

* Fixed 2.6 dependencies. This closes issue Distribute #50.

* Make sure setuptools is patched when running through easy_install
  This closes Old Setuptools #40.

-----
0.6.1
-----

setuptools
==========

* package_index.urlopen now catches BadStatusLine and malformed url errors.
  This closes Distribute #16 and Distribute #18.

* zip_ok is now False by default. This closes Old Setuptools #33.

* Fixed invalid URL error catching. Old Setuptools #20.

* Fixed invalid bootstraping with easy_install installation (Distribute #40).
  Thanks to Florian Schulze for the help.

* Removed buildout/bootstrap.py. A new repository will create a specific
  bootstrap.py script.


bootstrapping
=============

* The boostrap process leave setuptools alone if detected in the system
  and --root or --prefix is provided, but is not in the same location.
  This closes Distribute #10.

---
0.6
---

setuptools
==========

* Packages required at build time where not fully present at install time.
  This closes Distribute #12.

* Protected against failures in tarfile extraction. This closes Distribute #10.

* Made Jython api_tests.txt doctest compatible. This closes Distribute #7.

* sandbox.py replaced builtin type file with builtin function open. This
  closes Distribute #6.

* Immediately close all file handles. This closes Distribute #3.

* Added compatibility with Subversion 1.6. This references Distribute #1.

pkg_resources
=============

* Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API
  instead. Based on a patch from ronaldoussoren. This closes issue #5.

* Fixed a SandboxViolation for mkdir that could occur in certain cases.
  This closes Distribute #13.

* Allow to find_on_path on systems with tight permissions to fail gracefully.
  This closes Distribute #9.

* Corrected inconsistency between documentation and code of add_entry.
  This closes Distribute #8.

* Immediately close all file handles. This closes Distribute #3.

easy_install
============

* Immediately close all file handles. This closes Distribute #3.

-----
0.6c9
-----

 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.

 * Updated Pyrex support to work with Pyrex 0.9.6 and higher.

 * Minor changes for Jython compatibility, including skipping tests that can't
   work on Jython.

 * Fixed not installing eggs in ``install_requires`` if they were also used for
   ``setup_requires`` or ``tests_require``.

 * Fixed not fetching eggs in ``install_requires`` when running tests.

 * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools
   installations when called from a standalone ``setup.py``.

 * Added a warning if a namespace package is declared, but its parent package
   is not also declared as a namespace.

 * Support Subversion 1.5

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice

 * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's
   ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``.

 * Ensure that _full_name is set on all shared libs before extensions are
   checked for shared lib usage.  (Fixes a bug in the experimental shared
   library build support.)

 * Fix to allow unpacked eggs containing native libraries to fail more
   gracefully under Google App Engine (with an ``ImportError`` loading the
   C-based module, instead of getting a ``NameError``).

-----
0.6c7
-----

 * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and
   ``egg_info`` command failing on new, uncommitted SVN directories.

 * Fix import problems with nested namespace packages installed via
   ``--root`` or ``--single-version-externally-managed``, due to the
   parent package not having the child package as an attribute.

-----
0.6c6
-----

 * Added ``--egg-path`` option to ``develop`` command, allowing you to force
   ``.egg-link`` files to use relative paths (allowing them to be shared across
   platforms on a networked drive).

 * Fix not building binary RPMs correctly.

 * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with
   bash-compatible shells.

 * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there
   was whitespace inside a quoted argument or at the end of the ``#!`` line
   (a regression introduced in 0.6c4).

 * Fix ``test`` command possibly failing if an older version of the project
   being tested was installed on ``sys.path`` ahead of the test source
   directory.

 * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in
   their names as packages.

-----
0.6c5
-----

 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg``
   packages under Python versions less than 2.5.

 * Fix uploaded ``bdist_wininst`` packages being described as suitable for
   "any" version by Python 2.5, even if a ``--target-version`` was specified.

-----
0.6c4
-----

 * Overhauled Windows script wrapping to support ``bdist_wininst`` better.
   Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or
   ``#!pythonw.exe`` as the executable name (even when built on non-Windows
   platforms!), and the wrappers will look for the executable in the script's
   parent directory (which should find the right version of Python).

 * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
   ``bdist_wininst`` under Python 2.3 and 2.4.

 * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is
   prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish
   platforms.  (This is mainly so that setuptools itself can have a single-file
   installer on Unix, without doing multiple downloads, dealing with firewalls,
   etc.)

 * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files

 * Use cross-platform relative paths in ``easy-install.pth`` when doing
   ``develop`` and the source directory is a subdirectory of the installation
   target directory.

 * Fix a problem installing eggs with a system packaging tool if the project
   contained an implicit namespace package; for example if the ``setup()``
   listed a namespace package ``foo.bar`` without explicitly listing ``foo``
   as a namespace package.

-----
0.6c3
-----

 * Fixed breakages caused by Subversion 1.4's new "working copy" format

-----
0.6c2
-----

 * The ``ez_setup`` module displays the conflicting version of setuptools (and
   its installation location) when a script requests a version that's not
   available.

 * Running ``setup.py develop`` on a setuptools-using project will now install
   setuptools if needed, instead of only downloading the egg.

-----
0.6c1
-----

 * Fixed ``AttributeError`` when trying to download a ``setup_requires``
   dependency when a distribution lacks a ``dependency_links`` setting.

 * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so
   as to play better with packaging tools that complain about zero-length
   files.

 * Made ``setup.py develop`` respect the ``--no-deps`` option, which it
   previously was ignoring.

 * Support ``extra_path`` option to ``setup()`` when ``install`` is run in
   backward-compatibility mode.

 * Source distributions now always include a ``setup.cfg`` file that explicitly
   sets ``egg_info`` options such that they produce an identical version number
   to the source distribution's version number.  (Previously, the default
   version number could be different due to the use of ``--tag-date``, or if
   the version was overridden on the command line that built the source
   distribution.)

-----
0.6b4
-----

 * Fix ``register`` not obeying name/version set by ``egg_info`` command, if
   ``egg_info`` wasn't explicitly run first on the same command line.

 * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info``
   command, to allow suppressing tags configured in ``setup.cfg``.

 * Fixed redundant warnings about missing ``README`` file(s); it should now
   appear only if you are actually a source distribution.

-----
0.6b3
-----

 * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``.

 * Allow ``.py`` files found by the ``include_package_data`` option to be
   automatically included.  Remove duplicate data file matches if both
   ``include_package_data`` and ``package_data`` are used to refer to the same
   files.

-----
0.6b1
-----

 * Strip ``module`` from the end of compiled extension modules when computing
   the name of a ``.py`` loader/wrapper.  (Python's import machinery ignores
   this suffix when searching for an extension module.)

------
0.6a11
------

 * Added ``test_loader`` keyword to support custom test loaders

 * Added ``setuptools.file_finders`` entry point group to allow implementing
   revision control plugins.

 * Added ``--identity`` option to ``upload`` command.

 * Added ``dependency_links`` to allow specifying URLs for ``--find-links``.

 * Enhanced test loader to scan packages as well as modules, and call
   ``additional_tests()`` if present to get non-unittest tests.

 * Support namespace packages in conjunction with system packagers, by omitting
   the installation of any ``__init__.py`` files for namespace packages, and
   adding a special ``.pth`` file to create a working package in
   ``sys.modules``.

 * Made ``--single-version-externally-managed`` automatic when ``--root`` is
   used, so that most system packagers won't require special support for
   setuptools.

 * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or
   other configuration files for their option defaults when installing, and
   also made the install use ``--multi-version`` mode so that the project
   directory doesn't need to support .pth files.

 * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading
   it.  Previously, the file could be left open and the actual error would be
   masked by problems trying to remove the open file on Windows systems.

------
0.6a10
------

 * Fixed the ``develop`` command ignoring ``--find-links``.

-----
0.6a9
-----

 * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to
   create source distributions.  ``MANIFEST.in`` is still read and processed,
   as are the standard defaults and pruning.  But the manifest is built inside
   the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt
   every time the ``egg_info`` command is run.

 * Added the ``include_package_data`` keyword to ``setup()``, allowing you to
   automatically include any package data listed in revision control or
   ``MANIFEST.in``

 * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to
   trim back files included via the ``package_data`` and
   ``include_package_data`` options.

 * Fixed ``--tag-svn-revision`` not working when run from a source
   distribution.

 * Added warning for namespace packages with missing ``declare_namespace()``

 * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages
   requiring ``nose`` to run unit tests can make this dependency optional
   unless the ``test`` command is run.

 * Made all commands that use ``easy_install`` respect its configuration
   options, as this was causing some problems with ``setup.py install``.

 * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so
   that you can process a directory tree through a processing filter as if it
   were a zipfile or tarfile.

 * Added an internal ``install_egg_info`` command to use as part of old-style
   ``install`` operations, that installs an ``.egg-info`` directory with the
   package.

 * Added a ``--single-version-externally-managed`` option to the ``install``
   command so that you can more easily wrap a "flat" egg in a system package.

 * Enhanced ``bdist_rpm`` so that it installs single-version eggs that
   don't rely on a ``.pth`` file.  The ``--no-egg`` option has been removed,
   since all RPMs are now built in a more backwards-compatible format.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.


-----
0.6a8
-----

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

 * Made ``develop`` command accept all the same options as ``easy_install``,
   and use the ``easy_install`` command's configuration settings as defaults.

 * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision
   number from ``PKG-INFO`` in case it is being run on a source distribution of
   a snapshot taken from a Subversion-based project.

 * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being
   installed as data, adding them to ``native_libs.txt`` automatically.

 * Fixed some problems with fresh checkouts of projects that don't include
   ``.egg-info/PKG-INFO`` under revision control and put the project's source
   code directly in the project directory.  If such a package had any
   requirements that get processed before the ``egg_info`` command can be run,
   the setup scripts would fail with a "Missing 'Version:' header and/or
   PKG-INFO file" error, because the egg runtime interpreted the unbuilt
   metadata in a directory on ``sys.path`` (i.e. the current directory) as
   being a corrupted egg.  Setuptools now monkeypatches the distribution
   metadata cache to pretend that the egg has valid version information, until
   it has a chance to make it actually be so (via the ``egg_info`` command).

-----
0.6a5
-----

 * Fixed missing gui/cli .exe files in distribution.  Fixed bugs in tests.

-----
0.6a3
-----

 * Added ``gui_scripts`` entry point group to allow installing GUI scripts
   on Windows and other platforms.  (The special handling is only for Windows;
   other platforms are treated the same as for ``console_scripts``.)

-----
0.6a2
-----

 * Added ``console_scripts`` entry point group to allow installing scripts
   without the need to create separate script files.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are written without a file extension.

-----
0.6a1
-----

 * Added support for building "old-style" RPMs that don't install an egg for
   the target package, using a ``--no-egg`` option.

 * The ``build_ext`` command now works better when using the ``--inplace``
   option and multiple Python versions.  It now makes sure that all extensions
   match the current Python version, even if newer copies were built for a
   different Python version.

 * The ``upload`` command no longer attaches an extra ``.zip`` when uploading
   eggs, as PyPI now supports egg uploads without trickery.

 * The ``ez_setup`` script/module now displays a warning before downloading
   the setuptools egg, and attempts to check the downloaded egg against an
   internal MD5 checksum table.

 * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the
   latest revision number; it was using the revision number of the directory
   containing ``setup.py``, not the highest revision number in the project.

 * Added ``eager_resources`` setup argument

 * The ``sdist`` command now recognizes Subversion "deleted file" entries and
   does not include them in source distributions.

 * ``setuptools`` now embeds itself more thoroughly into the distutils, so that
   other distutils extensions (e.g. py2exe, py2app) will subclass setuptools'
   versions of things, rather than the native distutils ones.

 * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``;
   ``setup_requires`` allows you to automatically find and download packages
   that are needed in order to *build* your project (as opposed to running it).

 * ``setuptools`` now finds its commands, ``setup()`` argument validators, and
   metadata writers using entry points, so that they can be extended by
   third-party packages.  See `Creating distutils Extensions
   <http://pythonhosted.org/setuptools/setuptools.html#creating-distutils-extensions>`_
   for more details.

 * The vestigial ``depends`` command has been removed.  It was never finished
   or documented, and never would have worked without EasyInstall - which it
   pre-dated and was never compatible with.

------
0.5a12
------

 * The zip-safety scanner now checks for modules that might be used with
   ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't
   handle ``-m`` on zipped modules.

------
0.5a11
------

 * Fix breakage of the "develop" command that was caused by the addition of
   ``--always-unzip`` to the ``easy_install`` command.

-----
0.5a9
-----

 * Include ``svn:externals`` directories in source distributions as well as
   normal subversion-controlled files and directories.

 * Added ``exclude=patternlist`` option to ``setuptools.find_packages()``

 * Changed --tag-svn-revision to include an "r" in front of the revision number
   for better readability.

 * Added ability to build eggs without including source files (except for any
   scripts, of course), using the ``--exclude-source-files`` option to
   ``bdist_egg``.

 * ``setup.py install`` now automatically detects when an "unmanaged" package
   or module is going to be on ``sys.path`` ahead of a package being installed,
   thereby preventing the newer version from being imported.  If this occurs,
   a warning message is output to ``sys.stderr``, but installation proceeds
   anyway.  The warning message informs the user what files or directories
   need deleting, and advises them they can also use EasyInstall (with the
   ``--delete-conflicting`` option) to do it automatically.

 * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata
   directory that lists all top-level modules and packages in the distribution.
   This is used by the ``easy_install`` command to find possibly-conflicting
   "unmanaged" packages when installing the distribution.

 * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``.
   Added package analysis to determine zip-safety if the ``zip_safe`` flag
   is not given, and advise the author regarding what code might need changing.

 * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``.

-----
0.5a8
-----

 * The "egg_info" command now always sets the distribution metadata to "safe"
   forms of the distribution name and version, so that distribution files will
   be generated with parseable names (i.e., ones that don't include '-' in the
   name or version).  Also, this means that if you use the various ``--tag``
   options of "egg_info", any distributions generated will use the tags in the
   version, not just egg distributions.

 * Added support for defining command aliases in distutils configuration files,
   under the "[aliases]" section.  To prevent recursion and to allow aliases to
   call the command of the same name, a given alias can be expanded only once
   per command-line invocation.  You can define new aliases with the "alias"
   command, either for the local, global, or per-user configuration.

 * Added "rotate" command to delete old distribution files, given a set of
   patterns to match and the number of files to keep.  (Keeps the most
   recently-modified distribution files matching each pattern.)

 * Added "saveopts" command that saves all command-line options for the current
   invocation to the local, global, or per-user configuration file.  Useful for
   setting defaults without having to hand-edit a configuration file.

 * Added a "setopt" command that sets a single option in a specified distutils
   configuration file.

-----
0.5a7
-----

 * Added "upload" support for egg and source distributions, including a bug
   fix for "upload" and a temporary workaround for lack of .egg support in
   PyPI.

-----
0.5a6
-----

 * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it
   will include all files under revision control (CVS or Subversion) in the
   current directory, and it will regenerate the list every time you create a
   source distribution, not just when you tell it to.  This should make the
   default "do what you mean" more often than the distutils' default behavior
   did, while still retaining the old behavior in the presence of MANIFEST.in.

 * Fixed the "develop" command always updating .pth files, even if you
   specified ``-n`` or ``--dry-run``.

 * Slightly changed the format of the generated version when you use
   ``--tag-build`` on the "egg_info" command, so that you can make tagged
   revisions compare *lower* than the version specified in setup.py (e.g. by
   using ``--tag-build=dev``).

-----
0.5a5
-----

 * Added ``develop`` command to ``setuptools``-based packages.  This command
   installs an ``.egg-link`` pointing to the package's source directory, and
   script wrappers that ``execfile()`` the source versions of the package's
   scripts.  This lets you put your development checkout(s) on sys.path without
   having to actually install them.  (To uninstall the link, use
   use ``setup.py develop --uninstall``.)

 * Added ``egg_info`` command to ``setuptools``-based packages.  This command
   just creates or updates the "projectname.egg-info" directory, without
   building an egg.  (It's used by the ``bdist_egg``, ``test``, and ``develop``
   commands.)

 * Enhanced the ``test`` command so that it doesn't install the package, but
   instead builds any C extensions in-place, updates the ``.egg-info``
   metadata, adds the source directory to ``sys.path``, and runs the tests
   directly on the source.  This avoids an "unmanaged" installation of the
   package to ``site-packages`` or elsewhere.

 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

-----
0.5a4
-----

 * Setup scripts using setuptools can now list their dependencies directly in
   the setup.py file, without having to manually create a ``depends.txt`` file.
   The ``install_requires`` and ``extras_require`` arguments to ``setup()``
   are used to create a dependencies file automatically.  If you are manually
   creating ``depends.txt`` right now, please switch to using these setup
   arguments as soon as practical, because ``depends.txt`` support will be
   removed in the 0.6 release cycle.  For documentation on the new arguments,
   see the ``setuptools.dist.Distribution`` class.

 * Setup scripts using setuptools now always install using ``easy_install``
   internally, for ease of uninstallation and upgrading.

-----
0.5a1
-----

 * Added support for "self-installation" bootstrapping.  Packages can now
   include ``ez_setup.py`` in their source distribution, and add the following
   to their ``setup.py``, in order to automatically bootstrap installation of
   setuptools as part of their setup process::

    from ez_setup import use_setuptools
    use_setuptools()

    from setuptools import setup
    # etc...

-----
0.4a2
-----

 * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools
   installation easier, and to allow distributions using setuptools to avoid
   having to include setuptools in their source distribution.

 * All downloads are now managed by the ``PackageIndex`` class (which is now
   subclassable and replaceable), so that embedders can more easily override
   download logic, give download progress reports, etc.  The class has also
   been moved to the new ``setuptools.package_index`` module.

 * The ``Installer`` class no longer handles downloading, manages a temporary
   directory, or tracks the ``zip_ok`` option.  Downloading is now handled
   by ``PackageIndex``, and ``Installer`` has become an ``easy_install``
   command class based on ``setuptools.Command``.

 * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup
   script in a directory sandbox, and a new ``setuptools.archive_util`` module
   with an ``unpack_archive()`` API.  These were split out of EasyInstall to
   allow reuse by other tools and applications.

 * ``setuptools.Command`` now supports reinitializing commands using keyword
   arguments to set/reset options.  Also, ``Command`` subclasses can now set
   their ``command_consumes_arguments`` attribute to ``True`` in order to
   receive an ``args`` option containing the rest of the command line.

-----
0.3a2
-----

 * Added new options to ``bdist_egg`` to allow tagging the egg's version number
   with a subversion revision number, the current date, or an explicit tag
   value.  Run ``setup.py bdist_egg --help`` to get more information.

 * Misc. bug fixes

-----
0.3a1
-----

 * Initial release.
doc/alt-python34-setuptools/zpl.txt000064400000004476150404236430013360 0ustar00Zope Public License (ZPL) Version 2.0
-----------------------------------------------

This software is Copyright (c) Zope Corporation (tm) and
Contributors. All rights reserved.

This license has been certified as open source. It has also
been designated as GPL compatible by the Free Software
Foundation (FSF).

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the
following conditions are met:

1. Redistributions in 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.

3. The name Zope Corporation (tm) must not be used to
   endorse or promote products derived from this software
   without prior written permission from Zope Corporation.

4. The right to distribute this software or to use it for
   any purpose does not give you the right to use Servicemarks
   (sm) or Trademarks (tm) of Zope Corporation. Use of them is
   covered in a separate agreement (see
   http://www.zope.com/Marks).

5. If any files are modified, you must cause the modified
   files to carry prominent notices stating that you changed
   the files and the date of any change.

Disclaimer

  THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS''
  AND ANY EXPRESSED 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 ZOPE CORPORATION OR ITS 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.


This software consists of contributions made by Zope
Corporation and many individuals on behalf of Zope
Corporation.  Specific attributions are listed in the
accompanying credits file.
doc/alt-python34-setuptools/psfl.txt000064400000027174150404236430013517 0ustar00Python Software Foundation License
Python 2.1.1 license

This is the official license for the Python 2.1.1 release:
A. HISTORY OF THE SOFTWARE
==========================

Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI) in the Netherlands as a successor of a language
called ABC. Guido is Python's principal author, although it includes many
contributions from others. The last version released from CWI was Python 1.2.
In 1995, Guido continued his work on Python at the Corporation for National
Research Initiatives (CNRI) in Reston, Virginia where he released several
versions of the software. Python 1.6 was the last of the versions released by
CNRI. In 2000, Guido and the Python core development team moved to BeOpen.com
to form the BeOpen PythonLabs team. Python 2.0 was the first and only release
from BeOpen.com.

Following the release of Python 1.6, and after Guido van Rossum left CNRI to
work with commercial software developers, it became clear that the ability to
use Python with software available under the GNU Public License (GPL) was very
desirable. CNRI and the Free Software Foundation (FSF) interacted to develop
enabling wording changes to the Python license. Python 1.6.1 is essentially the
same as Python 1.6, with a few minor bug fixes, and with a different license
that enables later versions to be GPL-compatible. Python 2.1 is a derivative
work of Python 1.6.1, as well as of Python 2.0.

After Python 2.0 was released by BeOpen.com, Guido van Rossum and the other
PythonLabs developers joined Digital Creations. All intellectual property added
from this point on, starting with Python 2.1 and its alpha and beta releases,
is owned by the Python Software Foundation (PSF), a non-profit modeled after
the Apache Software Foundation. See http://www.python.org/psf/ for more
information about the PSF.

Thanks to the many outside volunteers who have worked under Guido's direction
to make these releases possible.

B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================

PSF LICENSE AGREEMENT
---------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"),
and the Individual or Organization ("Licensee") accessing and otherwise using
Python 2.1.1 software in source or binary form and its associated
documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python 2.1.1 alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001 Python Software Foundation; All Rights Reserved" are
retained in Python 2.1.1 alone or in any derivative version prepared by
Licensee.

3. In the event Licensee prepares a derivative work that is based on or
incorporates Python 2.1.1 or any part thereof, and wants to make the derivative
work available to others as provided herein, then Licensee hereby agrees to
include in any such work a brief summary of the changes made to Python 2.1.1.

4. PSF is making Python 2.1.1 available to Licensee on an "AS IS" basis. PSF
MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE,
BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY
OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
PYTHON 2.1.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 2.1.1 FOR
ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.1.1, OR ANY DERIVATIVE
THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material breach
of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any relationship
of agency, partnership, or joint venture between PSF and Licensee. This License
Agreement does not grant permission to use PSF trademarks or trade name in a
trademark sense to endorse or promote products or services of Licensee, or any
third party.

8. By copying, installing or otherwise using Python 2.1.1, Licensee agrees to
be bound by the terms and conditions of this License Agreement.

BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0
----------------------------------------------

BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1

1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at
160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization
("Licensee") accessing and otherwise using this software in source or binary
form and its associated documentation ("the Software").

2. Subject to the terms and conditions of this BeOpen Python License Agreement,
BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license
to reproduce, analyze, test, perform and/or display publicly, prepare
derivative works, distribute, and otherwise use the Software alone or in any
derivative version, provided, however, that the BeOpen Python License is
retained in the Software, alone or in any derivative version prepared by
Licensee.

3. BeOpen is making the Software available to Licensee on an "AS IS" basis.
BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF
EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION
OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.

4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN
IF ADVISED OF THE POSSIBILITY THEREOF.

5. This License Agreement will automatically terminate upon a material breach
of its terms and conditions.

6. This License Agreement shall be governed by and interpreted in all respects
by the law of the State of California, excluding conflict of law provisions.
Nothing in this License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between BeOpen and Licensee. This License
Agreement does not grant permission to use BeOpen trademarks or trade names in
a trademark sense to endorse or promote products or services of Licensee, or
any third party. As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the permissions
granted on that web page.

7. By copying, installing or otherwise using the software, Licensee agrees to
be bound by the terms and conditions of this License Agreement.

CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT
-------------------------------------------------

1. This LICENSE AGREEMENT is between the Corporation for National Research
Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191
("CNRI"), and the Individual or Organization ("Licensee") accessing and
otherwise using Python 1.6.1 software in source or binary form and its
associated documentation.

2. Subject to the terms and conditions of this License Agreement, CNRI hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python 1.6.1 alone or in any derivative version,
provided, however, that CNRI's License Agreement and CNRI's notice of
copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research
Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any
derivative version prepared by Licensee. Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the quotes):
"Python 1.6.1 is made available subject to the terms and conditions in CNRI's
License Agreement. This Agreement together with Python 1.6.1 may be located on
the Internet using the following unique, persistent identifier (known as a
handle): 1895.22/1013. This Agreement may also be obtained from a proxy server
on the Internet using the following URL: http://hdl.handle.net/1895.22/1013".

3. In the event Licensee prepares a derivative work that is based on or
incorporates Python 1.6.1 or any part thereof, and wants to make the derivative
work available to others as provided herein, then Licensee hereby agrees to
include in any such work a brief summary of the changes made to Python 1.6.1.

4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI
MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE,
BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY
OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.

5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR
ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE
THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material breach
of its terms and conditions.

7. This License Agreement shall be governed by the federal intellectual
property law of the United States, including without limitation the federal
copyright law, and, to the extent such U.S. federal law does not apply, by the
law of the Commonwealth of Virginia, excluding Virginia's conflict of law
provisions. Notwithstanding the foregoing, with regard to derivative works
based on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the law of
the Commonwealth of Virginia shall govern this License Agreement only as to
issues arising under or with respect to Paragraphs 4, 5, and 7 of this License
Agreement. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between CNRI and
Licensee. This License Agreement does not grant permission to use CNRI
trademarks or trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.

8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the
terms and conditions of this License Agreement.

        ACCEPT

CWI PERMISSIONS STATEMENT AND DISCLAIMER
----------------------------------------

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The
Netherlands. All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation, and that
the name of Stichting Mathematisch Centrum or CWI not be used in advertising or
publicity pertaining to distribution of the software without specific, written
prior permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL,
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.

doc/alt-python34-setuptools/DEVGUIDE.txt000064400000001160150404236430013732 0ustar00============================
Quick notes for contributors
============================

Setuptools is developed using the DVCS Mercurial.

Grab the code at bitbucket::

    $ hg clone https://bitbucket.org/pypa/setuptools

If you want to contribute changes, we recommend you fork the repository on
bitbucket, commit the changes to your repository, and then make a pull request
on bitbucket. If you make some changes, don't forget to:

- add a note in CHANGES.txt

Please commit bug-fixes against the current maintenance branch and new
features to the default branch.

You can run the tests via::

    $ python setup.py test
doc/alt-python34-setuptools/CONTRIBUTORS.txt000064400000001203150404236430014471 0ustar00============
Contributors
============

* Alex Grönholm
* Alice Bevan-McGregor
* Arfrever Frehtes Taifersar Arahesis
* Christophe Combelles
* Daniel Stutzbach
* Daniel Holth
* Dirley Rodrigues
* Donald Stufft
* Grigory Petrov
* Hanno Schlichting
* Jannis Leidel
* Jason R. Coombs
* Jim Fulton
* Jonathan Lange
* Justin Azoff
* Lennart Regebro
* Marc Abramowitz
* Martin von Löwis
* Noufal Ibrahim
* Pedro Algarvio
* Pete Hollobon
* Phillip J. Eby
* Philip Jenvey
* Philip Thiem
* Reinout van Rees
* Robert Myers
* Stefan H. Holek
* Tarek Ziadé
* Toshio Kuratomi

If you think you name is missing, please add it (alpha order by first name)

doc/alt-python34-setuptools/docs/easy_install.txt000064400000223414150404236430016165 0ustar00============
Easy Install
============

Easy Install is a python module (``easy_install``) bundled with ``setuptools``
that lets you automatically download, build, install, and manage Python
packages.

Please share your experiences with us! If you encounter difficulty installing
a package, please contact us via the `distutils mailing list
<http://mail.python.org/pipermail/distutils-sig/>`_.  (Note: please DO NOT send
private email directly to the author of setuptools; it will be discarded.  The
mailing list is a searchable archive of previously-asked and answered
questions; you should begin your research there before reporting something as a
bug -- and then do so via list discussion first.)

(Also, if you'd like to learn about how you can use ``setuptools`` to make your
own packages work better with EasyInstall, or provide EasyInstall-like features
without requiring your users to use EasyInstall directly, you'll probably want
to check out the full `setuptools`_ documentation as well.)

.. contents:: **Table of Contents**


Using "Easy Install"
====================


.. _installation instructions:

Installing "Easy Install"
-------------------------

Please see the `setuptools PyPI page <https://pypi.python.org/pypi/setuptools>`_
for download links and basic installation instructions for each of the
supported platforms.

You will need at least Python 2.6.  An ``easy_install`` script will be
installed in the normal location for Python scripts on your platform.

Note that the instructions on the setuptools PyPI page assume that you are
are installling to Python's primary ``site-packages`` directory.  If this is
not the case, you should consult the section below on `Custom Installation
Locations`_ before installing.  (And, on Windows, you should not use the
``.exe`` installer when installing to an alternate location.)

Note that ``easy_install`` normally works by downloading files from the
internet.  If you are behind an NTLM-based firewall that prevents Python
programs from accessing the net directly, you may wish to first install and use
the `APS proxy server <http://ntlmaps.sf.net/>`_, which lets you get past such
firewalls in the same way that your web browser(s) do.

(Alternately, if you do not wish easy_install to actually download anything, you
can restrict it from doing so with the ``--allow-hosts`` option; see the
sections on `restricting downloads with --allow-hosts`_ and `command-line
options`_ for more details.)


Troubleshooting
~~~~~~~~~~~~~~~

If EasyInstall/setuptools appears to install correctly, and you can run the
``easy_install`` command but it fails with an ``ImportError``, the most likely
cause is that you installed to a location other than ``site-packages``,
without taking any of the steps described in the `Custom Installation
Locations`_ section below.  Please see that section and follow the steps to
make sure that your custom location will work correctly.  Then re-install.

Similarly, if you can run ``easy_install``, and it appears to be installing
packages, but then you can't import them, the most likely issue is that you
installed EasyInstall correctly but are using it to install packages to a
non-standard location that hasn't been properly prepared.  Again, see the
section on `Custom Installation Locations`_ for more details.


Windows Notes
~~~~~~~~~~~~~

Installing setuptools will provide an ``easy_install`` command according to
the techniques described in `Executables and Launchers`_. If the
``easy_install`` command is not available after installation, that section
provides details on how to configure Windows to make the commands available.


Downloading and Installing a Package
------------------------------------

For basic use of ``easy_install``, you need only supply the filename or URL of
a source distribution or .egg file (`Python Egg`__).

__ http://peak.telecommunity.com/DevCenter/PythonEggs

**Example 1**. Install a package by name, searching PyPI for the latest
version, and automatically downloading, building, and installing it::

    easy_install SQLObject

**Example 2**. Install or upgrade a package by name and version by finding
links on a given "download page"::

    easy_install -f http://pythonpaste.org/package_index.html SQLObject

**Example 3**. Download a source distribution from a specified URL,
automatically building and installing it::

    easy_install http://example.com/path/to/MyPackage-1.2.3.tgz

**Example 4**. Install an already-downloaded .egg file::

    easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg

**Example 5**.  Upgrade an already-installed package to the latest version
listed on PyPI::

    easy_install --upgrade PyProtocols

**Example 6**.  Install a source distribution that's already downloaded and
extracted in the current directory (New in 0.5a9)::

    easy_install .

**Example 7**.  (New in 0.6a1) Find a source distribution or Subversion
checkout URL for a package, and extract it or check it out to
``~/projects/sqlobject`` (the name will always be in all-lowercase), where it
can be examined or edited.  (The package will not be installed, but it can
easily be installed with ``easy_install ~/projects/sqlobject``.  See `Editing
and Viewing Source Packages`_ below for more info.)::

    easy_install --editable --build-directory ~/projects SQLObject

**Example 7**. (New in 0.6.11) Install a distribution within your home dir::

    easy_install --user SQLAlchemy

Easy Install accepts URLs, filenames, PyPI package names (i.e., ``distutils``
"distribution" names), and package+version specifiers.  In each case, it will
attempt to locate the latest available version that meets your criteria.

When downloading or processing downloaded files, Easy Install recognizes
distutils source distribution files with extensions of .tgz, .tar, .tar.gz,
.tar.bz2, or .zip.  And of course it handles already-built .egg
distributions as well as ``.win32.exe`` installers built using distutils.

By default, packages are installed to the running Python installation's
``site-packages`` directory, unless you provide the ``-d`` or ``--install-dir``
option to specify an alternative directory, or specify an alternate location
using distutils configuration files.  (See `Configuration Files`_, below.)

By default, any scripts included with the package are installed to the running
Python installation's standard script installation location.  However, if you
specify an installation directory via the command line or a config file, then
the default directory for installing scripts will be the same as the package
installation directory, to ensure that the script will have access to the
installed package.  You can override this using the ``-s`` or ``--script-dir``
option.

Installed packages are added to an ``easy-install.pth`` file in the install
directory, so that Python will always use the most-recently-installed version
of the package.  If you would like to be able to select which version to use at
runtime, you should use the ``-m`` or ``--multi-version`` option.


Upgrading a Package
-------------------

You don't need to do anything special to upgrade a package: just install the
new version, either by requesting a specific version, e.g.::

    easy_install "SomePackage==2.0"

a version greater than the one you have now::

    easy_install "SomePackage>2.0"

using the upgrade flag, to find the latest available version on PyPI::

    easy_install --upgrade SomePackage

or by using a download page, direct download URL, or package filename::

    easy_install -f http://example.com/downloads ExamplePackage

    easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg

    easy_install my_downloads/ExamplePackage-2.0.tgz

If you're using ``-m`` or ``--multi-version`` , using the ``require()``
function at runtime automatically selects the newest installed version of a
package that meets your version criteria.  So, installing a newer version is
the only step needed to upgrade such packages.

If you're installing to a directory on PYTHONPATH, or a configured "site"
directory (and not using ``-m``), installing a package automatically replaces
any previous version in the ``easy-install.pth`` file, so that Python will
import the most-recently installed version by default.  So, again, installing
the newer version is the only upgrade step needed.

If you haven't suppressed script installation (using ``--exclude-scripts`` or
``-x``), then the upgraded version's scripts will be installed, and they will
be automatically patched to ``require()`` the corresponding version of the
package, so that you can use them even if they are installed in multi-version
mode.

``easy_install`` never actually deletes packages (unless you're installing a
package with the same name and version number as an existing package), so if
you want to get rid of older versions of a package, please see `Uninstalling
Packages`_, below.


Changing the Active Version
---------------------------

If you've upgraded a package, but need to revert to a previously-installed
version, you can do so like this::

    easy_install PackageName==1.2.3

Where ``1.2.3`` is replaced by the exact version number you wish to switch to.
If a package matching the requested name and version is not already installed
in a directory on ``sys.path``, it will be located via PyPI and installed.

If you'd like to switch to the latest installed version of ``PackageName``, you
can do so like this::

    easy_install PackageName

This will activate the latest installed version.  (Note: if you have set any
``find_links`` via distutils configuration files, those download pages will be
checked for the latest available version of the package, and it will be
downloaded and installed if it is newer than your current version.)

Note that changing the active version of a package will install the newly
active version's scripts, unless the ``--exclude-scripts`` or ``-x`` option is
specified.


Uninstalling Packages
---------------------

If you have replaced a package with another version, then you can just delete
the package(s) you don't need by deleting the PackageName-versioninfo.egg file
or directory (found in the installation directory).

If you want to delete the currently installed version of a package (or all
versions of a package), you should first run::

    easy_install -m PackageName

This will ensure that Python doesn't continue to search for a package you're
planning to remove. After you've done this, you can safely delete the .egg
files or directories, along with any scripts you wish to remove.


Managing Scripts
----------------

Whenever you install, upgrade, or change versions of a package, EasyInstall
automatically installs the scripts for the selected package version, unless
you tell it not to with ``-x`` or ``--exclude-scripts``.  If any scripts in
the script directory have the same name, they are overwritten.

Thus, you do not normally need to manually delete scripts for older versions of
a package, unless the newer version of the package does not include a script
of the same name.  However, if you are completely uninstalling a package, you
may wish to manually delete its scripts.

EasyInstall's default behavior means that you can normally only run scripts
from one version of a package at a time.  If you want to keep multiple versions
of a script available, however, you can simply use the ``--multi-version`` or
``-m`` option, and rename the scripts that EasyInstall creates.  This works
because EasyInstall installs scripts as short code stubs that ``require()`` the
matching version of the package the script came from, so renaming the script
has no effect on what it executes.

For example, suppose you want to use two versions of the ``rst2html`` tool
provided by the `docutils <http://docutils.sf.net/>`_ package.  You might
first install one version::

    easy_install -m docutils==0.3.9

then rename the ``rst2html.py`` to ``r2h_039``, and install another version::

    easy_install -m docutils==0.3.10

This will create another ``rst2html.py`` script, this one using docutils
version 0.3.10 instead of 0.3.9.  You now have two scripts, each using a
different version of the package.  (Notice that we used ``-m`` for both
installations, so that Python won't lock us out of using anything but the most
recently-installed version of the package.)


Executables and Launchers
-------------------------

On Unix systems, scripts are installed with as natural files with a "#!"
header and no extension and they launch under the Python version indicated in
the header.

On Windows, there is no mechanism to "execute" files without extensions, so
EasyInstall provides two techniques to mirror the Unix behavior. The behavior
is indicated by the SETUPTOOLS_LAUNCHER environment variable, which may be
"executable" (default) or "natural".

Regardless of the technique used, the script(s) will be installed to a Scripts
directory (by default in the Python installation directory). It is recommended
for EasyInstall that you ensure this directory is in the PATH environment
variable. The easiest way to ensure the Scripts directory is in the PATH is
to run ``Tools\Scripts\win_add2path.py`` from the Python directory (requires
Python 2.6 or later).

Note that instead of changing your ``PATH`` to include the Python scripts
directory, you can also retarget the installation location for scripts so they
go on a directory that's already on the ``PATH``.  For more information see
`Command-Line Options`_ and `Configuration Files`_.  During installation,
pass command line options (such as ``--script-dir``) to
``ez_setup.py`` to control where ``easy_install.exe`` will be installed.


Windows Executable Launcher
~~~~~~~~~~~~~~~~~~~~~~~~~~~

If the "executable" launcher is used, EasyInstall will create a '.exe'
launcher of the same name beside each installed script (including
``easy_install`` itself). These small .exe files launch the script of the
same name using the Python version indicated in the '#!' header.

This behavior is currently default. To force
the use of executable launchers, set ``SETUPTOOLS_LAUNCHER`` to "executable".

Natural Script Launcher
~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall also supports deferring to an external launcher such as
`pylauncher <https://bitbucket.org/pypa/pylauncher>`_ for launching scripts.
Enable this experimental functionality by setting the
``SETUPTOOLS_LAUNCHER`` environment variable to "natural". EasyInstall will
then install scripts as simple
scripts with a .pya (or .pyw) extension appended. If these extensions are
associated with the pylauncher and listed in the PATHEXT environment variable,
these scripts can then be invoked simply and directly just like any other
executable. This behavior may become default in a future version.

EasyInstall uses the .pya extension instead of simply
the typical '.py' extension. This distinct extension is necessary to prevent
Python
from treating the scripts as importable modules (where name conflicts exist).
Current releases of pylauncher do not yet associate with .pya files by
default, but future versions should do so.


Tips & Techniques
-----------------

Multiple Python Versions
~~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall installs itself under two names:
``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version
used to install it.  Thus, if you install EasyInstall for both Python 3.2 and
2.7, you can use the ``easy_install-3.2`` or ``easy_install-2.7`` scripts to
install packages for the respective Python version.

Setuptools also supplies easy_install as a runnable module which may be
invoked using ``python -m easy_install`` for any Python with Setuptools
installed.

Restricting Downloads with ``--allow-hosts``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can use the ``--allow-hosts`` (``-H``) option to restrict what domains
EasyInstall will look for links and downloads on.  ``--allow-hosts=None``
prevents downloading altogether.  You can also use wildcards, for example
to restrict downloading to hosts in your own intranet.  See the section below
on `Command-Line Options`_ for more details on the ``--allow-hosts`` option.

By default, there are no host restrictions in effect, but you can change this
default by editing the appropriate `configuration files`_ and adding:

.. code-block:: ini

    [easy_install]
    allow_hosts = *.myintranet.example.com,*.python.org

The above example would then allow downloads only from hosts in the
``python.org`` and ``myintranet.example.com`` domains, unless overridden on the
command line.


Installing on Un-networked Machines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Just copy the eggs or source packages you need to a directory on the target
machine, then use the ``-f`` or ``--find-links`` option to specify that
directory's location.  For example::

    easy_install -H None -f somedir SomePackage

will attempt to install SomePackage using only eggs and source packages found
in ``somedir`` and disallowing all remote access.  You should of course make
sure you have all of SomePackage's dependencies available in somedir.

If you have another machine of the same operating system and library versions
(or if the packages aren't platform-specific), you can create the directory of
eggs using a command like this::

    easy_install -zmaxd somedir SomePackage

This will tell EasyInstall to put zipped eggs or source packages for
SomePackage and all its dependencies into ``somedir``, without creating any
scripts or .pth files.  You can then copy the contents of ``somedir`` to the
target machine.  (``-z`` means zipped eggs, ``-m`` means multi-version, which
prevents .pth files from being used, ``-a`` means to copy all the eggs needed,
even if they're installed elsewhere on the machine, and ``-d`` indicates the
directory to place the eggs in.)

You can also build the eggs from local development packages that were installed
with the ``setup.py develop`` command, by including the ``-l`` option, e.g.::

    easy_install -zmaxld somedir SomePackage

This will use locally-available source distributions to build the eggs.


Packaging Others' Projects As Eggs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Need to distribute a package that isn't published in egg form?  You can use
EasyInstall to build eggs for a project.  You'll want to use the ``--zip-ok``,
``--exclude-scripts``, and possibly ``--no-deps`` options (``-z``, ``-x`` and
``-N``, respectively).  Use ``-d`` or ``--install-dir`` to specify the location
where you'd like the eggs placed.  By placing them in a directory that is
published to the web, you can then make the eggs available for download, either
in an intranet or to the internet at large.

If someone distributes a package in the form of a single ``.py`` file, you can
wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL.
So, something like this::

    easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo

will install the package as an egg, and this::

    easy_install -zmaxd. \
        -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo

will create a ``.egg`` file in the current directory.


Creating your own Package Index
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In addition to local directories and the Python Package Index, EasyInstall can
find download links on most any web page whose URL is given to the ``-f``
(``--find-links``) option.  In the simplest case, you can simply have a web
page with links to eggs or Python source packages, even an automatically
generated directory listing (such as the Apache web server provides).

If you are setting up an intranet site for package downloads, you may want to
configure the target machines to use your download site by default, adding
something like this to their `configuration files`_:

.. code-block:: ini

    [easy_install]
    find_links = http://mypackages.example.com/somedir/
                 http://turbogears.org/download/
                 http://peak.telecommunity.com/dist/

As you can see, you can list multiple URLs separated by whitespace, continuing
on multiple lines if necessary (as long as the subsequent lines are indented.

If you are more ambitious, you can also create an entirely custom package index
or PyPI mirror.  See the ``--index-url`` option under `Command-Line Options`_,
below, and also the section on `Package Index "API"`_.


Password-Protected Sites
------------------------

If a site you want to download from is password-protected using HTTP "Basic"
authentication, you can specify your credentials in the URL, like so::

    http://some_userid:some_password@some.example.com/some_path/

You can do this with both index page URLs and direct download URLs.  As long
as any HTML pages read by easy_install use *relative* links to point to the
downloads, the same user ID and password will be used to do the downloading.

Using .pypirc Credentials
-------------------------

In additional to supplying credentials in the URL, ``easy_install`` will also
honor credentials if present in the .pypirc file. Teams maintaining a private
repository of packages may already have defined access credentials for
uploading packages according to the distutils documentation. ``easy_install``
will attempt to honor those if present. Refer to the distutils documentation
for Python 2.5 or later for details on the syntax.

Controlling Build Options
~~~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall respects standard distutils `Configuration Files`_, so you can use
them to configure build options for packages that it installs from source.  For
example, if you are on Windows using the MinGW compiler, you can configure the
default compiler by putting something like this:

.. code-block:: ini

    [build]
    compiler = mingw32

into the appropriate distutils configuration file.  In fact, since this is just
normal distutils configuration, it will affect any builds using that config
file, not just ones done by EasyInstall.  For example, if you add those lines
to ``distutils.cfg`` in the ``distutils`` package directory, it will be the
default compiler for *all* packages you build.  See `Configuration Files`_
below for a list of the standard configuration file locations, and links to
more documentation on using distutils configuration files.


Editing and Viewing Source Packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sometimes a package's source distribution  contains additional documentation,
examples, configuration files, etc., that are not part of its actual code.  If
you want to be able to examine these files, you can use the ``--editable``
option to EasyInstall, and EasyInstall will look for a source distribution
or Subversion URL for the package, then download and extract it or check it out
as a subdirectory of the ``--build-directory`` you specify.  If you then wish
to install the package after editing or configuring it, you can do so by
rerunning EasyInstall with that directory as the target.

Note that using ``--editable`` stops EasyInstall from actually building or
installing the package; it just finds, obtains, and possibly unpacks it for
you.  This allows you to make changes to the package if necessary, and to
either install it in development mode using ``setup.py develop`` (if the
package uses setuptools, that is), or by running ``easy_install projectdir``
(where ``projectdir`` is the subdirectory EasyInstall created for the
downloaded package.

In order to use ``--editable`` (``-e`` for short), you *must* also supply a
``--build-directory`` (``-b`` for short).  The project will be placed in a
subdirectory of the build directory.  The subdirectory will have the same
name as the project itself, but in all-lowercase.  If a file or directory of
that name already exists, EasyInstall will print an error message and exit.

Also, when using ``--editable``, you cannot use URLs or filenames as arguments.
You *must* specify project names (and optional version requirements) so that
EasyInstall knows what directory name(s) to create.  If you need to force
EasyInstall to use a particular URL or filename, you should specify it as a
``--find-links`` item (``-f`` for short), and then also specify
the project name, e.g.::

    easy_install -eb ~/projects \
     -fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \
     ctypes==0.9.6


Dealing with Installation Conflicts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(NOTE: As of 0.6a11, this section is obsolete; it is retained here only so that
people using older versions of EasyInstall can consult it.  As of version
0.6a11, installation conflicts are handled automatically without deleting the
old or system-installed packages, and without ignoring the issue.  Instead,
eggs are automatically shifted to the front of ``sys.path`` using special
code added to the ``easy-install.pth`` file.  So, if you are using version
0.6a11 or better of setuptools, you do not need to worry about conflicts,
and the following issues do not apply to you.)

EasyInstall installs distributions in a "managed" way, such that each
distribution can be independently activated or deactivated on ``sys.path``.
However, packages that were not installed by EasyInstall are "unmanaged",
in that they usually live all in one directory and cannot be independently
activated or deactivated.

As a result, if you are using EasyInstall to upgrade an existing package, or
to install a package with the same name as an existing package, EasyInstall
will warn you of the conflict.  (This is an improvement over ``setup.py
install``, becuase the ``distutils`` just install new packages on top of old
ones, possibly combining two unrelated packages or leaving behind modules that
have been deleted in the newer version of the package.)

EasyInstall will stop the installation if it detects a conflict
between an existing, "unmanaged" package, and a module or package in any of
the distributions you're installing.  It will display a list of all of the
existing files and directories that would need to be deleted for the new
package to be able to function correctly.  To proceed, you must manually
delete these conflicting files and directories and re-run EasyInstall.

Of course, once you've replaced all of your existing "unmanaged" packages with
versions managed by EasyInstall, you won't have any more conflicts to worry
about!


Compressed Installation
~~~~~~~~~~~~~~~~~~~~~~~

EasyInstall tries to install packages in zipped form, if it can.  Zipping
packages can improve Python's overall import performance if you're not using
the ``--multi-version`` option, because Python processes zipfile entries on
``sys.path`` much faster than it does directories.

As of version 0.5a9, EasyInstall analyzes packages to determine whether they
can be safely installed as a zipfile, and then acts on its analysis.  (Previous
versions would not install a package as a zipfile unless you used the
``--zip-ok`` option.)

The current analysis approach is fairly conservative; it currenly looks for:

 * Any use of the ``__file__`` or ``__path__`` variables (which should be
   replaced with ``pkg_resources`` API calls)

 * Possible use of ``inspect`` functions that expect to manipulate source files
   (e.g. ``inspect.getsource()``)

 * Top-level modules that might be scripts used with ``python -m`` (Python 2.4)

If any of the above are found in the package being installed, EasyInstall will
assume that the package cannot be safely run from a zipfile, and unzip it to
a directory instead.  You can override this analysis with the ``-zip-ok`` flag,
which will tell EasyInstall to install the package as a zipfile anyway.  Or,
you can use the ``--always-unzip`` flag, in which case EasyInstall will always
unzip, even if its analysis says the package is safe to run as a zipfile.

Normally, however, it is simplest to let EasyInstall handle the determination
of whether to zip or unzip, and only specify overrides when needed to work
around a problem.  If you find you need to override EasyInstall's guesses, you
may want to contact the package author and the EasyInstall maintainers, so that
they can make appropriate changes in future versions.

(Note: If a package uses ``setuptools`` in its setup script, the package author
has the option to declare the package safe or unsafe for zipped usage via the
``zip_safe`` argument to ``setup()``.  If the package author makes such a
declaration, EasyInstall believes the package's author and does not perform its
own analysis.  However, your command-line option, if any, will still override
the package author's choice.)


Reference Manual
================

Configuration Files
-------------------

(New in 0.4a2)

You may specify default options for EasyInstall using the standard
distutils configuration files, under the command heading ``easy_install``.
EasyInstall will look first for a ``setup.cfg`` file in the current directory,
then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes
and Windows, respectively), and finally a ``distutils.cfg`` file in the
``distutils`` package directory.  Here's a simple example:

.. code-block:: ini

    [easy_install]

    # set the default location to install packages
    install_dir = /home/me/lib/python

    # Notice that indentation can be used to continue an option
    # value; this is especially useful for the "--find-links"
    # option, which tells easy_install to use download links on
    # these pages before consulting PyPI:
    #
    find_links = http://sqlobject.org/
                 http://peak.telecommunity.com/dist/

In addition to accepting configuration for its own options under
``[easy_install]``, EasyInstall also respects defaults specified for other
distutils commands.  For example, if you don't set an ``install_dir`` for
``[easy_install]``, but *have* set an ``install_lib`` for the ``[install]``
command, this will become EasyInstall's default installation directory.  Thus,
if you are already using distutils configuration files to set default install
locations, build options, etc., EasyInstall will respect your existing settings
until and unless you override them explicitly in an ``[easy_install]`` section.

For more information, see also the current Python documentation on the `use and
location of distutils configuration files <http://docs.python.org/inst/config-syntax.html>`_.

Notice that ``easy_install`` will use the ``setup.cfg`` from the current
working directory only if it was triggered from ``setup.py`` through the
``install_requires`` option. The standalone command will not use that file.

Command-Line Options
--------------------

``--zip-ok, -z``
    Install all packages as zip files, even if they are marked as unsafe for
    running as a zipfile.  This can be useful when EasyInstall's analysis
    of a non-setuptools package is too conservative, but keep in mind that
    the package may not work correctly.  (Changed in 0.5a9; previously this
    option was required in order for zipped installation to happen at all.)

``--always-unzip, -Z``
    Don't install any packages as zip files, even if the packages are marked
    as safe for running as a zipfile.  This can be useful if a package does
    something unsafe, but not in a way that EasyInstall can easily detect.
    EasyInstall's default analysis is currently very conservative, however, so
    you should only use this option if you've had problems with a particular
    package, and *after* reporting the problem to the package's maintainer and
    to the EasyInstall maintainers.

    (Note: the ``-z/-Z`` options only affect the installation of newly-built
    or downloaded packages that are not already installed in the target
    directory; if you want to convert an existing installed version from
    zipped to unzipped or vice versa, you'll need to delete the existing
    version first, and re-run EasyInstall.)

``--multi-version, -m``
    "Multi-version" mode. Specifying this option prevents ``easy_install`` from
    adding an ``easy-install.pth`` entry for the package being installed, and
    if an entry for any version the package already exists, it will be removed
    upon successful installation. In multi-version mode, no specific version of
    the package is available for importing, unless you use
    ``pkg_resources.require()`` to put it on ``sys.path``. This can be as
    simple as::

        from pkg_resources import require
        require("SomePackage", "OtherPackage", "MyPackage")

    which will put the latest installed version of the specified packages on
    ``sys.path`` for you. (For more advanced uses, like selecting specific
    versions and enabling optional dependencies, see the ``pkg_resources`` API
    doc.)

    Changed in 0.6a10: this option is no longer silently enabled when
    installing to a non-PYTHONPATH, non-"site" directory.  You must always
    explicitly use this option if you want it to be active.

``--upgrade, -U``   (New in 0.5a4)
    By default, EasyInstall only searches online if a project/version
    requirement can't be met by distributions already installed
    on sys.path or the installation directory.  However, if you supply the
    ``--upgrade`` or ``-U`` flag, EasyInstall will always check the package
    index and ``--find-links`` URLs before selecting a version to install.  In
    this way, you can force EasyInstall to use the latest available version of
    any package it installs (subject to any version requirements that might
    exclude such later versions).

``--install-dir=DIR, -d DIR``
    Set the installation directory. It is up to you to ensure that this
    directory is on ``sys.path`` at runtime, and to use
    ``pkg_resources.require()`` to enable the installed package(s) that you
    need.

    (New in 0.4a2) If this option is not directly specified on the command line
    or in a distutils configuration file, the distutils default installation
    location is used.  Normally, this would be the ``site-packages`` directory,
    but if you are using distutils configuration files, setting things like
    ``prefix`` or ``install_lib``, then those settings are taken into
    account when computing the default installation directory, as is the
    ``--prefix`` option.

``--script-dir=DIR, -s DIR``
    Set the script installation directory.  If you don't supply this option
    (via the command line or a configuration file), but you *have* supplied
    an ``--install-dir`` (via command line or config file), then this option
    defaults to the same directory, so that the scripts will be able to find
    their associated package installation.  Otherwise, this setting defaults
    to the location where the distutils would normally install scripts, taking
    any distutils configuration file settings into account.

``--exclude-scripts, -x``
    Don't install scripts.  This is useful if you need to install multiple
    versions of a package, but do not want to reset the version that will be
    run by scripts that are already installed.

``--user`` (New in 0.6.11)
    Use the the user-site-packages as specified in :pep:`370`
    instead of the global site-packages.

``--always-copy, -a``   (New in 0.5a4)
    Copy all needed distributions to the installation directory, even if they
    are already present in a directory on sys.path.  In older versions of
    EasyInstall, this was the default behavior, but now you must explicitly
    request it.  By default, EasyInstall will no longer copy such distributions
    from other sys.path directories to the installation directory, unless you
    explicitly gave the distribution's filename on the command line.

    Note that as of 0.6a10, using this option excludes "system" and
    "development" eggs from consideration because they can't be reliably
    copied.  This may cause EasyInstall to choose an older version of a package
    than what you expected, or it may cause downloading and installation of a
    fresh copy of something that's already installed.  You will see warning
    messages for any eggs that EasyInstall skips, before it falls back to an
    older version or attempts to download a fresh copy.

``--find-links=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES``
    Scan the specified "download pages" or directories for direct links to eggs
    or other distributions.  Any existing file or directory names or direct
    download URLs are immediately added to EasyInstall's search cache, and any
    indirect URLs (ones that don't point to eggs or other recognized archive
    formats) are added to a list of additional places to search for download
    links.  As soon as EasyInstall has to go online to find a package (either
    because it doesn't exist locally, or because ``--upgrade`` or ``-U`` was
    used), the specified URLs will be downloaded and scanned for additional
    direct links.

    Eggs and archives found by way of ``--find-links`` are only downloaded if
    they are needed to meet a requirement specified on the command line; links
    to unneeded packages are ignored.

    If all requested packages can be found using links on the specified
    download pages, the Python Package Index will not be consulted unless you
    also specified the ``--upgrade`` or ``-U`` option.

    (Note: if you want to refer to a local HTML file containing links, you must
    use a ``file:`` URL, as filenames that do not refer to a directory, egg, or
    archive are ignored.)

    You may specify multiple URLs or file/directory names with this option,
    separated by whitespace.  Note that on the command line, you will probably
    have to surround the URL list with quotes, so that it is recognized as a
    single option value.  You can also specify URLs in a configuration file;
    see `Configuration Files`_, above.

    Changed in 0.6a10: previously all URLs and directories passed to this
    option were scanned as early as possible, but from 0.6a10 on, only
    directories and direct archive links are scanned immediately; URLs are not
    retrieved unless a package search was already going to go online due to a
    package not being available locally, or due to the use of the ``--update``
    or ``-U`` option.

``--no-find-links`` Blocks the addition of any link.
    This parameter is useful if you want to avoid adding links defined in a
    project easy_install is installing (whether it's a requested project or a
    dependency). When used, ``--find-links`` is ignored.

    Added in Distribute 0.6.11 and Setuptools 0.7.

``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7)
    Specifies the base URL of the Python Package Index.  The default is
    https://pypi.python.org/simple if not specified.  When a package is requested
    that is not locally available or linked from a ``--find-links`` download
    page, the package index will be searched for download pages for the needed
    package, and those download pages will be searched for links to download
    an egg or source distribution.

``--editable, -e`` (New in 0.6a1)
    Only find and download source distributions for the specified projects,
    unpacking them to subdirectories of the specified ``--build-directory``.
    EasyInstall will not actually build or install the requested projects or
    their dependencies; it will just find and extract them for you.  See
    `Editing and Viewing Source Packages`_ above for more details.

``--build-directory=DIR, -b DIR`` (UPDATED in 0.6a1)
    Set the directory used to build source packages.  If a package is built
    from a source distribution or checkout, it will be extracted to a
    subdirectory of the specified directory.  The subdirectory will have the
    same name as the extracted distribution's project, but in all-lowercase.
    If a file or directory of that name already exists in the given directory,
    a warning will be printed to the console, and the build will take place in
    a temporary directory instead.

    This option is most useful in combination with the ``--editable`` option,
    which forces EasyInstall to *only* find and extract (but not build and
    install) source distributions.  See `Editing and Viewing Source Packages`_,
    above, for more information.

``--verbose, -v, --quiet, -q`` (New in 0.4a4)
    Control the level of detail of EasyInstall's progress messages.  The
    default detail level is "info", which prints information only about
    relatively time-consuming operations like running a setup script, unpacking
    an archive, or retrieving a URL.  Using ``-q`` or ``--quiet`` drops the
    detail level to "warn", which will only display installation reports,
    warnings, and errors.  Using ``-v`` or ``--verbose`` increases the detail
    level to include individual file-level operations, link analysis messages,
    and distutils messages from any setup scripts that get run.  If you include
    the ``-v`` option more than once, the second and subsequent uses are passed
    down to any setup scripts, increasing the verbosity of their reporting as
    well.

``--dry-run, -n`` (New in 0.4a4)
    Don't actually install the package or scripts.  This option is passed down
    to any setup scripts run, so packages should not actually build either.
    This does *not* skip downloading, nor does it skip extracting source
    distributions to a temporary/build directory.

``--optimize=LEVEL``, ``-O LEVEL`` (New in 0.4a4)
    If you are installing from a source distribution, and are *not* using the
    ``--zip-ok`` option, this option controls the optimization level for
    compiling installed ``.py`` files to ``.pyo`` files.  It does not affect
    the compilation of modules contained in ``.egg`` files, only those in
    ``.egg`` directories.  The optimization level can be set to 0, 1, or 2;
    the default is 0 (unless it's set under ``install`` or ``install_lib`` in
    one of your distutils configuration files).

``--record=FILENAME``  (New in 0.5a4)
    Write a record of all installed files to FILENAME.  This is basically the
    same as the same option for the standard distutils "install" command, and
    is included for compatibility with tools that expect to pass this option
    to "setup.py install".

``--site-dirs=DIRLIST, -S DIRLIST``   (New in 0.6a1)
    Specify one or more custom "site" directories (separated by commas).
    "Site" directories are directories where ``.pth`` files are processed, such
    as the main Python ``site-packages`` directory.  As of 0.6a10, EasyInstall
    automatically detects whether a given directory processes ``.pth`` files
    (or can be made to do so), so you should not normally need to use this
    option.  It is is now only necessary if you want to override EasyInstall's
    judgment and force an installation directory to be treated as if it
    supported ``.pth`` files.

``--no-deps, -N``  (New in 0.6a6)
    Don't install any dependencies.  This is intended as a convenience for
    tools that wrap eggs in a platform-specific packaging system.  (We don't
    recommend that you use it for anything else.)

``--allow-hosts=PATTERNS, -H PATTERNS``   (New in 0.6a6)
    Restrict downloading and spidering to hosts matching the specified glob
    patterns.  E.g. ``-H *.python.org`` restricts web access so that only
    packages listed and downloadable from machines in the ``python.org``
    domain.  The glob patterns must match the *entire* user/host/port section of
    the target URL(s).  For example, ``*.python.org`` will NOT accept a URL
    like ``http://python.org/foo`` or ``http://www.python.org:8080/``.
    Multiple patterns can be specified by separting them with commas.  The
    default pattern is ``*``, which matches anything.

    In general, this option is mainly useful for blocking EasyInstall's web
    access altogether (e.g. ``-Hlocalhost``), or to restrict it to an intranet
    or other trusted site.  EasyInstall will do the best it can to satisfy
    dependencies given your host restrictions, but of course can fail if it
    can't find suitable packages.  EasyInstall displays all blocked URLs, so
    that you can adjust your ``--allow-hosts`` setting if it is more strict
    than you intended.  Some sites may wish to define a restrictive default
    setting for this option in their `configuration files`_, and then manually
    override the setting on the command line as needed.

``--prefix=DIR`` (New in 0.6a10)
    Use the specified directory as a base for computing the default
    installation and script directories.  On Windows, the resulting default
    directories will be ``prefix\\Lib\\site-packages`` and ``prefix\\Scripts``,
    while on other platforms the defaults will be
    ``prefix/lib/python2.X/site-packages`` (with the appropriate version
    substituted) for libraries and ``prefix/bin`` for scripts.

    Note that the ``--prefix`` option only sets the *default* installation and
    script directories, and does not override the ones set on the command line
    or in a configuration file.

``--local-snapshots-ok, -l`` (New in 0.6c6)
    Normally, EasyInstall prefers to only install *released* versions of
    projects, not in-development ones, because such projects may not
    have a currently-valid version number.  So, it usually only installs them
    when their ``setup.py`` directory is explicitly passed on the command line.

    However, if this option is used, then any in-development projects that were
    installed using the ``setup.py develop`` command, will be used to build
    eggs, effectively upgrading the "in-development" project to a snapshot
    release.  Normally, this option is used only in conjunction with the
    ``--always-copy`` option to create a distributable snapshot of every egg
    needed to run an application.

    Note that if you use this option, you must make sure that there is a valid
    version number (such as an SVN revision number tag) for any in-development
    projects that may be used, as otherwise EasyInstall may not be able to tell
    what version of the project is "newer" when future installations or
    upgrades are attempted.


.. _non-root installation:

Custom Installation Locations
-----------------------------

By default, EasyInstall installs python packages into Python's main ``site-packages`` directory,
and manages them using a custom ``.pth`` file in that same directory.

Very often though, a user or developer wants ``easy_install`` to install and manage python packages
in an alternative location, usually for one of 3 reasons:

1. They don't have access to write to the main Python site-packages directory.

2. They want a user-specific stash of packages, that is not visible to other users.

3. They want to isolate a set of packages to a specific python application, usually to minimize
   the possibility of version conflicts.

Historically, there have been many approaches to achieve custom installation.
The following section lists only the easiest and most relevant approaches [1]_.

`Use the "--user" option`_

`Use the "--user" option and customize "PYTHONUSERBASE"`_

`Use "virtualenv"`_

.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_ in Python 2.6.

.. _PEP-370: http://www.python.org/dev/peps/pep-0370/


Use the "--user" option
~~~~~~~~~~~~~~~~~~~~~~~
With Python 2.6 came the User scheme for installation, which means that all
python distributions support an alternative install location that is specific to a user [2]_ [3]_.
The Default location for each OS is explained in the python documentation
for the ``site.USER_BASE`` variable.  This mode of installation can be turned on by
specifying the ``--user`` option to ``setup.py install`` or ``easy_install``.
This approach serves the need to have a user-specific stash of packages.

.. [2] Prior to Python2.6, Mac OS X offered a form of the User scheme. That is now subsumed into the User scheme introduced in Python 2.6.
.. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized.

Use the "--user" option and customize "PYTHONUSERBASE"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The User scheme install location can be customized by setting the ``PYTHONUSERBASE`` environment
variable, which updates the value of ``site.USER_BASE``.  To isolate packages to a specific
application, simply set the OS environment of that application to a specific value of
``PYTHONUSERBASE``, that contains just those packages.

Use "virtualenv"
~~~~~~~~~~~~~~~~
"virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby
creating an isolated location to intall packages.  The evolution of "virtualenv" started before the existence
of the User installation scheme.  "virtualenv" provides a version of ``easy_install`` that is
scoped to the cloned python install and is used in the normal way. "virtualenv" does offer various features
that the User installation scheme alone does not provide, e.g. the ability to hide the main python site-packages.

Please refer to the `virtualenv`_ documentation for more details.

.. _virtualenv: https://pypi.python.org/pypi/virtualenv



Package Index "API"
-------------------

Custom package indexes (and PyPI) must follow the following rules for
EasyInstall to be able to look up and download packages:

1. Except where stated otherwise, "pages" are HTML or XHTML, and "links"
   refer to ``href`` attributes.

2. Individual project version pages' URLs must be of the form
   ``base/projectname/version``, where ``base`` is the package index's base URL.

3. Omitting the ``/version`` part of a project page's URL (but keeping the
   trailing ``/``) should result in a page that is either:

   a) The single active version of that project, as though the version had been
      explicitly included, OR

   b) A page with links to all of the active version pages for that project.

4. Individual project version pages should contain direct links to downloadable
   distributions where possible.  It is explicitly permitted for a project's
   "long_description" to include URLs, and these should be formatted as HTML
   links by the package index, as EasyInstall does no special processing to
   identify what parts of a page are index-specific and which are part of the
   project's supplied description.

5. Where available, MD5 information should be added to download URLs by
   appending a fragment identifier of the form ``#md5=...``, where ``...`` is
   the 32-character hex MD5 digest.  EasyInstall will verify that the
   downloaded file's MD5 digest matches the given value.

6. Individual project version pages should identify any "homepage" or
   "download" URLs using ``rel="homepage"`` and ``rel="download"`` attributes
   on the HTML elements linking to those URLs. Use of these attributes will
   cause EasyInstall to always follow the provided links, unless it can be
   determined by inspection that they are downloadable distributions. If the
   links are not to downloadable distributions, they are retrieved, and if they
   are HTML, they are scanned for download links. They are *not* scanned for
   additional "homepage" or "download" links, as these are only processed for
   pages that are part of a package index site.

7. The root URL of the index, if retrieved with a trailing ``/``, must result
   in a page containing links to *all* projects' active version pages.

   (Note: This requirement is a workaround for the absence of case-insensitive
   ``safe_name()`` matching of project names in URL paths. If project names are
   matched in this fashion (e.g. via the PyPI server, mod_rewrite, or a similar
   mechanism), then it is not necessary to include this all-packages listing
   page.)

8. If a package index is accessed via a ``file://`` URL, then EasyInstall will
   automatically use ``index.html`` files, if present, when trying to read a
   directory with a trailing ``/`` on the URL.


Backward Compatibility
~~~~~~~~~~~~~~~~~~~~~~

Package indexes that wish to support setuptools versions prior to 0.6b4 should
also follow these rules:

* Homepage and download links must be preceded with ``"<th>Home Page"`` or
  ``"<th>Download URL"``, in addition to (or instead of) the ``rel=""``
  attributes on the actual links.  These marker strings do not need to be
  visible, or uncommented, however!  For example, the following is a valid
  homepage link that will work with any version of setuptools::

    <li>
     <strong>Home Page:</strong>
     <!-- <th>Home Page -->
     <a rel="homepage" href="http://sqlobject.org">http://sqlobject.org</a>
    </li>

  Even though the marker string is in an HTML comment, older versions of
  EasyInstall will still "see" it and know that the link that follows is the
  project's home page URL.

* The pages described by paragraph 3(b) of the preceding section *must*
  contain the string ``"Index of Packages</title>"`` somewhere in their text.
  This can be inside of an HTML comment, if desired, and it can be anywhere
  in the page.  (Note: this string MUST NOT appear on normal project pages, as
  described in paragraphs 2 and 3(a)!)

In addition, for compatibility with PyPI versions that do not use ``#md5=``
fragment IDs, EasyInstall uses the following regular expression to match PyPI's
displayed MD5 info (broken onto two lines for readability)::

    <a href="([^"#]+)">([^<]+)</a>\n\s+\(<a href="[^?]+\?:action=show_md5
    &amp;digest=([0-9a-f]{32})">md5</a>\)

History
=======

0.6c9
 * Fixed ``win32.exe`` support for .pth files, so unnecessary directory nesting
   is flattened out in the resulting egg.  (There was a case-sensitivity
   problem that affected some distributions, notably ``pywin32``.)

 * Prevent ``--help-commands`` and other junk from showing under Python 2.5
   when running ``easy_install --help``.

 * Fixed GUI scripts sometimes not executing on Windows

 * Fixed not picking up dependency links from recursive dependencies.

 * Only make ``.py``, ``.dll`` and ``.so`` files executable when unpacking eggs

 * Changes for Jython compatibility

 * Improved error message when a requirement is also a directory name, but the
   specified directory is not a source package.

 * Fixed ``--allow-hosts`` option blocking ``file:`` URLs

 * Fixed HTTP SVN detection failing when the page title included a project
   name (e.g. on SourceForge-hosted SVN)

 * Fix Jython script installation to handle ``#!`` lines better when
   ``sys.executable`` is a script.

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Keep site directories (e.g. ``site-packages``) from being included in
   ``.pth`` files.

0.6c7
 * ``ftp:`` download URLs now work correctly.

 * The default ``--index-url`` is now ``https://pypi.python.org/simple``, to use
   the Python Package Index's new simpler (and faster!) REST API.

0.6c6
 * EasyInstall no longer aborts the installation process if a URL it wants to
   retrieve can't be downloaded, unless the URL is an actual package download.
   Instead, it issues a warning and tries to keep going.

 * Fixed distutils-style scripts originally built on Windows having their line
   endings doubled when installed on any platform.

 * Added ``--local-snapshots-ok`` flag, to allow building eggs from projects
   installed using ``setup.py develop``.

 * Fixed not HTML-decoding URLs scraped from web pages

0.6c5
 * Fixed ``.dll`` files on Cygwin not having executable permisions when an egg
   is installed unzipped.

0.6c4
 * Added support for HTTP "Basic" authentication using ``http://user:pass@host``
   URLs.  If a password-protected page contains links to the same host (and
   protocol), those links will inherit the credentials used to access the
   original page.

 * Removed all special support for Sourceforge mirrors, as Sourceforge's
   mirror system now works well for non-browser downloads.

 * Fixed not recognizing ``win32.exe`` installers that included a custom
   bitmap.

 * Fixed not allowing ``os.open()`` of paths outside the sandbox, even if they
   are opened read-only (e.g. reading ``/dev/urandom`` for random numbers, as
   is done by ``os.urandom()`` on some platforms).

 * Fixed a problem with ``.pth`` testing on Windows when ``sys.executable``
   has a space in it (e.g., the user installed Python to a ``Program Files``
   directory).

0.6c3
 * You can once again use "python -m easy_install" with Python 2.4 and above.

 * Python 2.5 compatibility fixes added.

0.6c2
 * Windows script wrappers now support quoted arguments and arguments
   containing spaces.  (Patch contributed by Jim Fulton.)

 * The ``ez_setup.py`` script now actually works when you put a setuptools
   ``.egg`` alongside it for bootstrapping an offline machine.

 * A writable installation directory on ``sys.path`` is no longer required to
   download and extract a source distribution using ``--editable``.

 * Generated scripts now use ``-x`` on the ``#!`` line when ``sys.executable``
   contains non-ASCII characters, to prevent deprecation warnings about an
   unspecified encoding when the script is run.

0.6c1
 * EasyInstall now includes setuptools version information in the
   ``User-Agent`` string sent to websites it visits.

0.6b4
 * Fix creating Python wrappers for non-Python scripts

 * Fix ``ftp://`` directory listing URLs from causing a crash when used in the
   "Home page" or "Download URL" slots on PyPI.

 * Fix ``sys.path_importer_cache`` not being updated when an existing zipfile
   or directory is deleted/overwritten.

 * Fix not recognizing HTML 404 pages from package indexes.

 * Allow ``file://`` URLs to be used as a package index.  URLs that refer to
   directories will use an internally-generated directory listing if there is
   no ``index.html`` file in the directory.

 * Allow external links in a package index to be specified using
   ``rel="homepage"`` or ``rel="download"``, without needing the old
   PyPI-specific visible markup.

 * Suppressed warning message about possibly-misspelled project name, if an egg
   or link for that project name has already been seen.

0.6b3
 * Fix local ``--find-links`` eggs not being copied except with
   ``--always-copy``.

 * Fix sometimes not detecting local packages installed outside of "site"
   directories.

 * Fix mysterious errors during initial ``setuptools`` install, caused by
   ``ez_setup`` trying to run ``easy_install`` twice, due to a code fallthru
   after deleting the egg from which it's running.

0.6b2
 * Don't install or update a ``site.py`` patch when installing to a
   ``PYTHONPATH`` directory with ``--multi-version``, unless an
   ``easy-install.pth`` file is already in use there.

 * Construct ``.pth`` file paths in such a way that installing an egg whose
   name begins with ``import`` doesn't cause a syntax error.

 * Fixed a bogus warning message that wasn't updated since the 0.5 versions.

0.6b1
 * Better ambiguity management: accept ``#egg`` name/version even if processing
   what appears to be a correctly-named distutils file, and ignore ``.egg``
   files with no ``-``, since valid Python ``.egg`` files always have a version
   number (but Scheme eggs often don't).

 * Support ``file://`` links to directories in ``--find-links``, so that
   easy_install can build packages from local source checkouts.

 * Added automatic retry for Sourceforge mirrors.  The new download process is
   to first just try dl.sourceforge.net, then randomly select mirror IPs and
   remove ones that fail, until something works.  The removed IPs stay removed
   for the remainder of the run.

 * Ignore bdist_dumb distributions when looking at download URLs.

0.6a11
 * Process ``dependency_links.txt`` if found in a distribution, by adding the
   URLs to the list for scanning.

 * Use relative paths in ``.pth`` files when eggs are being installed to the
   same directory as the ``.pth`` file.  This maximizes portability of the
   target directory when building applications that contain eggs.

 * Added ``easy_install-N.N`` script(s) for convenience when using multiple
   Python versions.

 * Added automatic handling of installation conflicts.  Eggs are now shifted to
   the front of sys.path, in an order consistent with where they came from,
   making EasyInstall seamlessly co-operate with system package managers.

   The ``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk`` options
   are now no longer necessary, and will generate warnings at the end of a
   run if you use them.

 * Don't recursively traverse subdirectories given to ``--find-links``.

0.6a10
 * Added exhaustive testing of the install directory, including a spawn test
   for ``.pth`` file support, and directory writability/existence checks.  This
   should virtually eliminate the need to set or configure ``--site-dirs``.

 * Added ``--prefix`` option for more do-what-I-mean-ishness in the absence of
   RTFM-ing.  :)

 * Enhanced ``PYTHONPATH`` support so that you don't have to put any eggs on it
   manually to make it work.  ``--multi-version`` is no longer a silent
   default; you must explicitly use it if installing to a non-PYTHONPATH,
   non-"site" directory.

 * Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``,
   ``--install-dir``, and ``--script-dir`` options, whether on the command line
   or in configuration files.

 * Improved SourceForge mirror processing to work faster and be less affected
   by transient HTML changes made by SourceForge.

 * PyPI searches now use the exact spelling of requirements specified on the
   command line or in a project's ``install_requires``.  Previously, a
   normalized form of the name was used, which could lead to unnecessary
   full-index searches when a project's name had an underscore (``_``) in it.

 * EasyInstall can now download bare ``.py`` files and wrap them in an egg,
   as long as you include an ``#egg=name-version`` suffix on the URL, or if
   the ``.py`` file is listed as the "Download URL" on the project's PyPI page.
   This allows third parties to "package" trivial Python modules just by
   linking to them (e.g. from within their own PyPI page or download links
   page).

 * The ``--always-copy`` option now skips "system" and "development" eggs since
   they can't be reliably copied.  Note that this may cause EasyInstall to
   choose an older version of a package than what you expected, or it may cause
   downloading and installation of a fresh version of what's already installed.

 * The ``--find-links`` option previously scanned all supplied URLs and
   directories as early as possible, but now only directories and direct
   archive links are scanned immediately.  URLs are not retrieved unless a
   package search was already going to go online due to a package not being
   available locally, or due to the use of the ``--update`` or ``-U`` option.

 * Fixed the annoying ``--help-commands`` wart.

0.6a9
 * Fixed ``.pth`` file processing picking up nested eggs (i.e. ones inside
   "baskets") when they weren't explicitly listed in the ``.pth`` file.

 * If more than one URL appears to describe the exact same distribution, prefer
   the shortest one.  This helps to avoid "table of contents" CGI URLs like the
   ones on effbot.org.

 * Quote arguments to python.exe (including python's path) to avoid problems
   when Python (or a script) is installed in a directory whose name contains
   spaces on Windows.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.

0.6a8
 * Update for changed SourceForge mirror format

 * Fixed not installing dependencies for some packages fetched via Subversion

 * Fixed dependency installation with ``--always-copy`` not using the same
   dependency resolution procedure as other operations.

 * Fixed not fully removing temporary directories on Windows, if a Subversion
   checkout left read-only files behind

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

0.6a7
 * Fixed not being able to install Windows script wrappers using Python 2.3

0.6a6
 * Added support for "traditional" PYTHONPATH-based non-root installation, and
   also the convenient ``virtual-python.py`` script, based on a contribution
   by Ian Bicking.  The setuptools egg now contains a hacked ``site`` module
   that makes the PYTHONPATH-based approach work with .pth files, so that you
   can get the full EasyInstall feature set on such installations.

 * Added ``--no-deps`` and ``--allow-hosts`` options.

 * Improved Windows ``.exe`` script wrappers so that the script can have the
   same name as a module without confusing Python.

 * Changed dependency processing so that it's breadth-first, allowing a
   depender's preferences to override those of a dependee, to prevent conflicts
   when a lower version is acceptable to the dependee, but not the depender.
   Also, ensure that currently installed/selected packages aren't given
   precedence over ones desired by a package being installed, which could
   cause conflict errors.

0.6a3
 * Improved error message when trying to use old ways of running
   ``easy_install``.  Removed the ability to run via ``python -m`` or by
   running ``easy_install.py``; ``easy_install`` is the command to run on all
   supported platforms.

 * Improved wrapper script generation and runtime initialization so that a
   VersionConflict doesn't occur if you later install a competing version of a
   needed package as the default version of that package.

 * Fixed a problem parsing version numbers in ``#egg=`` links.

0.6a2
 * EasyInstall can now install "console_scripts" defined by packages that use
   ``setuptools`` and define appropriate entry points.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are installed without a file extension.

 * Using ``python -m easy_install`` or running ``easy_install.py`` is now
   DEPRECATED, since an ``easy_install`` wrapper is now available on all
   platforms.

0.6a1
 * EasyInstall now does MD5 validation of downloads from PyPI, or from any link
   that has an "#md5=..." trailer with a 32-digit lowercase hex md5 digest.

 * EasyInstall now handles symlinks in target directories by removing the link,
   rather than attempting to overwrite the link's destination.  This makes it
   easier to set up an alternate Python "home" directory (as described above in
   the `Non-Root Installation`_ section).

 * Added support for handling MacOS platform information in ``.egg`` filenames,
   based on a contribution by Kevin Dangoor.  You may wish to delete and
   reinstall any eggs whose filename includes "darwin" and "Power_Macintosh",
   because the format for this platform information has changed so that minor
   OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a
   previous OS version to become obsolete.

 * easy_install's dependency processing algorithms have changed.  When using
   ``--always-copy``, it now ensures that dependencies are copied too.  When
   not using ``--always-copy``, it tries to use a single resolution loop,
   rather than recursing.

 * Fixed installing extra ``.pyc`` or ``.pyo`` files for scripts with ``.py``
   extensions.

 * Added ``--site-dirs`` option to allow adding custom "site" directories.
   Made ``easy-install.pth`` work in platform-specific alternate site
   directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X).

 * If you manually delete the current version of a package, the next run of
   EasyInstall against the target directory will now remove the stray entry
   from the ``easy-install.pth`` file.

 * EasyInstall now recognizes URLs with a ``#egg=project_name`` fragment ID
   as pointing to the named project's source checkout.  Such URLs have a lower
   match precedence than any other kind of distribution, so they'll only be
   used if they have a higher version number than any other available
   distribution, or if you use the ``--editable`` option.  The ``#egg``
   fragment can contain a version if it's formatted as ``#egg=proj-ver``,
   where ``proj`` is the project name, and ``ver`` is the version number.  You
   *must* use the format for these values that the ``bdist_egg`` command uses;
   i.e., all non-alphanumeric runs must be condensed to single underscore
   characters.

 * Added the ``--editable`` option; see `Editing and Viewing Source Packages`_
   above for more info.  Also, slightly changed the behavior of the
   ``--build-directory`` option.

 * Fixed the setup script sandbox facility not recognizing certain paths as
   valid on case-insensitive platforms.

0.5a12
 * Fix ``python -m easy_install`` not working due to setuptools being installed
   as a zipfile.  Update safety scanner to check for modules that might be used
   as ``python -m`` scripts.

 * Misc. fixes for win32.exe support, including changes to support Python 2.4's
   changed ``bdist_wininst`` format.

0.5a10
 * Put the ``easy_install`` module back in as a module, as it's needed for
   ``python -m`` to run it!

 * Allow ``--find-links/-f`` to accept local directories or filenames as well
   as URLs.

0.5a9
 * EasyInstall now automatically detects when an "unmanaged" package or
   module is going to be on ``sys.path`` ahead of a package you're installing,
   thereby preventing the newer version from being imported.  By default, it
   will abort installation to alert you of the problem, but there are also
   new options (``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk``)
   available to change the default behavior.  (Note: this new feature doesn't
   take effect for egg files that were built with older ``setuptools``
   versions, because they lack the new metadata file required to implement it.)

 * The ``easy_install`` distutils command now uses ``DistutilsError`` as its
   base error type for errors that should just issue a message to stderr and
   exit the program without a traceback.

 * EasyInstall can now be given a path to a directory containing a setup
   script, and it will attempt to build and install the package there.

 * EasyInstall now performs a safety analysis on module contents to determine
   whether a package is likely to run in zipped form, and displays
   information about what modules may be doing introspection that would break
   when running as a zipfile.

 * Added the ``--always-unzip/-Z`` option, to force unzipping of packages that
   would ordinarily be considered safe to unzip, and changed the meaning of
   ``--zip-ok/-z`` to "always leave everything zipped".

0.5a8
 * There is now a separate documentation page for `setuptools`_; revision
   history that's not specific to EasyInstall has been moved to that page.

 .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools

0.5a5
 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

0.5a4
 * Added ``--always-copy/-a`` option to always copy needed packages to the
   installation directory, even if they're already present elsewhere on
   sys.path. (In previous versions, this was the default behavior, but now
   you must request it.)

 * Added ``--upgrade/-U`` option to force checking PyPI for latest available
   version(s) of all packages requested by name and version, even if a matching
   version is available locally.

 * Added automatic installation of dependencies declared by a distribution
   being installed.  These dependencies must be listed in the distribution's
   ``EGG-INFO`` directory, so the distribution has to have declared its
   dependencies by using setuptools.  If a package has requirements it didn't
   declare, you'll still have to deal with them yourself.  (E.g., by asking
   EasyInstall to find and install them.)

 * Added the ``--record`` option to ``easy_install`` for the benefit of tools
   that run ``setup.py install --record=filename`` on behalf of another
   packaging system.)

0.5a3
 * Fixed not setting script permissions to allow execution.

 * Improved sandboxing so that setup scripts that want a temporary directory
   (e.g. pychecker) can still run in the sandbox.

0.5a2
 * Fix stupid stupid refactoring-at-the-last-minute typos.  :(

0.5a1
 * Added support for converting ``.win32.exe`` installers to eggs on the fly.
   EasyInstall will now recognize such files by name and install them.

 * Fixed a problem with picking the "best" version to install (versions were
   being sorted as strings, rather than as parsed values)

0.4a4
 * Added support for the distutils "verbose/quiet" and "dry-run" options, as
   well as the "optimize" flag.

 * Support downloading packages that were uploaded to PyPI (by scanning all
   links on package pages, not just the homepage/download links).

0.4a3
 * Add progress messages to the search/download process so that you can tell
   what URLs it's reading to find download links.  (Hopefully, this will help
   people report out-of-date and broken links to package authors, and to tell
   when they've asked for a package that doesn't exist.)

0.4a2
 * Added support for installing scripts

 * Added support for setting options via distutils configuration files, and
   using distutils' default options as a basis for EasyInstall's defaults.

 * Renamed ``--scan-url/-s`` to ``--find-links/-f`` to free up ``-s`` for the
   script installation directory option.

 * Use ``urllib2`` instead of ``urllib``, to allow use of ``https:`` URLs if
   Python includes SSL support.

0.4a1
 * Added ``--scan-url`` and ``--index-url`` options, to scan download pages
   and search PyPI for needed packages.

0.3a4
 * Restrict ``--build-directory=DIR/-b DIR`` option to only be used with single
   URL installs, to avoid running the wrong setup.py.

0.3a3
 * Added ``--build-directory=DIR/-b DIR`` option.

 * Added "installation report" that explains how to use 'require()' when doing
   a multiversion install or alternate installation directory.

 * Added SourceForge mirror auto-select (Contributed by Ian Bicking)

 * Added "sandboxing" that stops a setup script from running if it attempts to
   write to the filesystem outside of the build area

 * Added more workarounds for packages with quirky ``install_data`` hacks

0.3a2
 * Added subversion download support for ``svn:`` and ``svn+`` URLs, as well as
   automatic recognition of HTTP subversion URLs (Contributed by Ian Bicking)

 * Misc. bug fixes

0.3a1
 * Initial release.


Future Plans
============

* Additional utilities to list/remove/verify packages
* Signature checking?  SSL?  Ability to suppress PyPI search?
* Display byte progress meter when downloading distributions and long pages?
* Redirect stdout/stderr to log during run_setup?

doc/alt-python34-setuptools/docs/development.txt000064400000002660150404236430016016 0ustar00-------------------------
Development on Setuptools
-------------------------

Setuptools is maintained by the Python community under the Python Packaging
Authority (PyPA) and led by Jason R. Coombs.

This document describes the process by which Setuptools is developed.
This document assumes the reader has some passing familiarity with
*using* setuptools, the ``pkg_resources`` module, and EasyInstall.  It
does not attempt to explain basic concepts like inter-project
dependencies, nor does it contain detailed lexical syntax for most
file formats.  Neither does it explain concepts like "namespace
packages" or "resources" in any detail, as all of these subjects are
covered at length in the setuptools developer's guide and the
``pkg_resources`` reference manual.

Instead, this is **internal** documentation for how those concepts and
features are *implemented* in concrete terms.  It is intended for people
who are working on the setuptools code base, who want to be able to
troubleshoot setuptools problems, want to write code that reads the file
formats involved, or want to otherwise tinker with setuptools-generated
files and directories.

Note, however, that these are all internal implementation details and
are therefore subject to change; stick to the published API if you don't
want to be responsible for keeping your code from breaking when
setuptools changes.  You have been warned.

.. toctree::
   :maxdepth: 1

   formats
   releases

doc/alt-python34-setuptools/docs/Makefile000064400000004443150404236430014374 0ustar00# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build
PAPER         =

# Internal variables.
PAPEROPT_a4     = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html web pickle htmlhelp latex changes linkcheck

help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  html      to make standalone HTML files"
	@echo "  pickle    to make pickle files"
	@echo "  json      to make JSON files"
	@echo "  htmlhelp  to make HTML files and a HTML help project"
	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
	@echo "  changes   to make an overview over all changed/added/deprecated items"
	@echo "  linkcheck to check all external links for integrity"

clean:
	-rm -rf build/*

html:
	mkdir -p build/html build/doctrees
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
	@echo
	@echo "Build finished. The HTML pages are in build/html."

pickle:
	mkdir -p build/pickle build/doctrees
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
	@echo
	@echo "Build finished; now you can process the pickle files."

web: pickle

json:
	mkdir -p build/json build/doctrees
	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
	@echo
	@echo "Build finished; now you can process the JSON files."

htmlhelp:
	mkdir -p build/htmlhelp build/doctrees
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
	@echo
	@echo "Build finished; now you can run HTML Help Workshop with the" \
	      ".hhp project file in build/htmlhelp."

latex:
	mkdir -p build/latex build/doctrees
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
	@echo
	@echo "Build finished; the LaTeX files are in build/latex."
	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
	      "run these through (pdf)latex."

changes:
	mkdir -p build/changes build/doctrees
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
	@echo
	@echo "The overview file is in build/changes."

linkcheck:
	mkdir -p build/linkcheck build/doctrees
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
	@echo
	@echo "Link check complete; look for any errors in the above output " \
	      "or in build/linkcheck/output.txt."
doc/alt-python34-setuptools/docs/_theme/nature/static/pygments.css000064400000005235150404236430021342 0ustar00.c { color: #999988; font-style: italic } /* Comment */
.k { font-weight: bold } /* Keyword */
.o { font-weight: bold } /* Operator */
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
.cp { color: #999999; font-weight: bold } /* Comment.preproc */
.c1 { color: #999988; font-style: italic } /* Comment.Single */
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.ge { font-style: italic } /* Generic.Emph */
.gr { color: #aa0000 } /* Generic.Error */
.gh { color: #999999 } /* Generic.Heading */
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.go { color: #111 } /* Generic.Output */
.gp { color: #555555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaaaaa } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc { font-weight: bold } /* Keyword.Constant */
.kd { font-weight: bold } /* Keyword.Declaration */
.kp { font-weight: bold } /* Keyword.Pseudo */
.kr { font-weight: bold } /* Keyword.Reserved */
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
.m { color: #009999 } /* Literal.Number */
.s { color: #bb8844 } /* Literal.String */
.na { color: #008080 } /* Name.Attribute */
.nb { color: #999999 } /* Name.Builtin */
.nc { color: #445588; font-weight: bold } /* Name.Class */
.no { color: #ff99ff } /* Name.Constant */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #990000; font-weight: bold } /* Name.Exception */
.nf { color: #990000; font-weight: bold } /* Name.Function */
.nn { color: #555555 } /* Name.Namespace */
.nt { color: #000080 } /* Name.Tag */
.nv { color: purple } /* Name.Variable */
.ow { font-weight: bold } /* Operator.Word */
.mf { color: #009999 } /* Literal.Number.Float */
.mh { color: #009999 } /* Literal.Number.Hex */
.mi { color: #009999 } /* Literal.Number.Integer */
.mo { color: #009999 } /* Literal.Number.Oct */
.sb { color: #bb8844 } /* Literal.String.Backtick */
.sc { color: #bb8844 } /* Literal.String.Char */
.sd { color: #bb8844 } /* Literal.String.Doc */
.s2 { color: #bb8844 } /* Literal.String.Double */
.se { color: #bb8844 } /* Literal.String.Escape */
.sh { color: #bb8844 } /* Literal.String.Heredoc */
.si { color: #bb8844 } /* Literal.String.Interpol */
.sx { color: #bb8844 } /* Literal.String.Other */
.sr { color: #808000 } /* Literal.String.Regex */
.s1 { color: #bb8844 } /* Literal.String.Single */
.ss { color: #bb8844 } /* Literal.String.Symbol */
.bp { color: #999999 } /* Name.Builtin.Pseudo */
.vc { color: #ff99ff } /* Name.Variable.Class */
.vg { color: #ff99ff } /* Name.Variable.Global */
.vi { color: #ff99ff } /* Name.Variable.Instance */
.il { color: #009999 } /* Literal.Number.Integer.Long */doc/alt-python34-setuptools/docs/_theme/nature/static/nature.css_t000064400000007415150404236430021317 0ustar00/**
 * Sphinx stylesheet -- default theme
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */
 
@import url("basic.css");
 
/* -- page layout ----------------------------------------------------------- */
 
body {
    font-family: Arial, sans-serif;
    font-size: 100%;
    background-color: #111111;
    color: #555555;
    margin: 0;
    padding: 0;
}

div.documentwrapper {
    float: left;
    width: 100%;
}

div.bodywrapper {
    margin: 0 0 0 300px;
}

hr{
    border: 1px solid #B1B4B6;
}
 
div.document {
    background-color: #fafafa;
}
 
div.body {
    background-color: #ffffff;
    color: #3E4349;
    padding: 1em 30px 30px 30px;
    font-size: 0.9em;
}
 
div.footer {
    color: #555;
    width: 100%;
    padding: 13px 0;
    text-align: center;
    font-size: 75%;
}
 
div.footer a {
    color: #444444;
}
 
div.related {
    background-color: #6BA81E;
    line-height: 36px;
    color: #ffffff;
    text-shadow: 0px 1px 0 #444444;
    font-size: 1.1em;
}
 
div.related a {
    color: #E2F3CC;
}

div.related .right {
    font-size: 0.9em;
}

div.sphinxsidebar {
    font-size: 0.9em;
    line-height: 1.5em;
    width: 300px;
}

div.sphinxsidebarwrapper{
    padding: 20px 0;
}
 
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
    font-family: Arial, sans-serif;
    color: #222222;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
    padding: 5px 10px;
    text-shadow: 1px 1px 0 white
}

div.sphinxsidebar h3 a {
    color: #444444;
}

div.sphinxsidebar p {
    color: #888888;
    padding: 5px 20px;
    margin: 0.5em 0px;
}
 
div.sphinxsidebar p.topless {
}
 
div.sphinxsidebar ul {
    margin: 10px 10px 10px 20px;
    padding: 0;
    color: #000000;
}
 
div.sphinxsidebar a {
    color: #444444;
}

div.sphinxsidebar a:hover {
    color: #E32E00;
}

div.sphinxsidebar input {
    border: 1px solid #cccccc;
    font-family: sans-serif;
    font-size: 1.1em;
    padding: 0.15em 0.3em;
}

div.sphinxsidebar input[type=text]{
    margin-left: 20px;
}
 
/* -- body styles ----------------------------------------------------------- */
 
a {
    color: #005B81;
    text-decoration: none;
}
 
a:hover {
    color: #E32E00;
}
 
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
    font-family: Arial, sans-serif;
    font-weight: normal;
    color: #212224;
    margin: 30px 0px 10px 0px;
    padding: 5px 0 5px 0px;
    text-shadow: 0px 1px 0 white;
    border-bottom: 1px solid #C8D5E3;
}
 
div.body h1 { margin-top: 0; font-size: 200%; }
div.body h2 { font-size: 150%; }
div.body h3 { font-size: 120%; }
div.body h4 { font-size: 110%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
 
a.headerlink {
    color: #c60f0f;
    font-size: 0.8em;
    padding: 0 4px 0 4px;
    text-decoration: none;
}
 
a.headerlink:hover {
    background-color: #c60f0f;
    color: white;
}
 
div.body p, div.body dd, div.body li {
    line-height: 1.8em;
}
 
div.admonition p.admonition-title + p {
    display: inline;
}

div.highlight{
    background-color: white;
}

div.note {
    background-color: #eeeeee;
    border: 1px solid #cccccc;
}
 
div.seealso {
    background-color: #ffffcc;
    border: 1px solid #ffff66;
}
 
div.topic {
    background-color: #fafafa;
    border-width: 0;
}
 
div.warning {
    background-color: #ffe4e4;
    border: 1px solid #ff6666;
}
 
p.admonition-title {
    display: inline;
}
 
p.admonition-title:after {
    content: ":";
}
 
pre {
    padding: 10px;
    background-color: #fafafa;
    color: #222222;
    line-height: 1.5em;
    font-size: 1.1em;
    margin: 1.5em 0 1.5em 0;
    -webkit-box-shadow: 0px 0px 4px #d8d8d8;
    -moz-box-shadow: 0px 0px 4px #d8d8d8;
    box-shadow: 0px 0px 4px #d8d8d8;
}
 
tt {
    color: #222222;
    padding: 1px 2px;
    font-size: 1.2em;
    font-family: monospace;
}

#table-of-contents ul {
    padding-left: 2em;
}

doc/alt-python34-setuptools/docs/_theme/nature/theme.conf000064400000000107150404236430017435 0ustar00[theme]
inherit = basic
stylesheet = nature.css
pygments_style = tango
doc/alt-python34-setuptools/docs/roadmap.txt000064400000000247150404236430015116 0ustar00=======
Roadmap
=======

Setuptools is primarily in maintenance mode. The project attempts to address
user issues, concerns, and feature requests in a timely fashion.
doc/alt-python34-setuptools/docs/formats.txt000064400000074527150404236430015162 0ustar00=====================================
The Internal Structure of Python Eggs
=====================================

STOP! This is not the first document you should read!



.. contents:: **Table of Contents**


----------------------
Eggs and their Formats
----------------------

A "Python egg" is a logical structure embodying the release of a
specific version of a Python project, comprising its code, resources,
and metadata. There are multiple formats that can be used to physically
encode a Python egg, and others can be developed. However, a key
principle of Python eggs is that they should be discoverable and
importable. That is, it should be possible for a Python application to
easily and efficiently find out what eggs are present on a system, and
to ensure that the desired eggs' contents are importable.

There are two basic formats currently implemented for Python eggs:

1. ``.egg`` format: a directory or zipfile *containing* the project's
   code and resources, along with an ``EGG-INFO`` subdirectory that
   contains the project's metadata

2. ``.egg-info`` format: a file or directory placed *adjacent* to the
   project's code and resources, that directly contains the project's
   metadata.

Both formats can include arbitrary Python code and resources, including
static data files, package and non-package directories, Python
modules, C extension modules, and so on.  But each format is optimized
for different purposes.

The ``.egg`` format is well-suited to distribution and the easy
uninstallation or upgrades of code, since the project is essentially
self-contained within a single directory or file, unmingled with any
other projects' code or resources.  It also makes it possible to have
multiple versions of a project simultaneously installed, such that
individual programs can select the versions they wish to use.

The ``.egg-info`` format, on the other hand, was created to support
backward-compatibility, performance, and ease of installation for system
packaging tools that expect to install all projects' code and resources
to a single directory (e.g. ``site-packages``).  Placing the metadata
in that same directory simplifies the installation process, since it
isn't necessary to create ``.pth`` files or otherwise modify
``sys.path`` to include each installed egg.

Its disadvantage, however, is that it provides no support for clean
uninstallation or upgrades, and of course only a single version of a
project can be installed to a given directory. Thus, support from a
package management tool is required. (This is why setuptools' "install"
command refers to this type of egg installation as "single-version,
externally managed".)  Also, they lack sufficient data to allow them to
be copied from their installation source.  easy_install can "ship" an
application by copying ``.egg`` files or directories to a target
location, but it cannot do this for ``.egg-info`` installs, because
there is no way to tell what code and resources belong to a particular
egg -- there may be several eggs "scrambled" together in a single
installation location, and the ``.egg-info`` format does not currently
include a way to list the files that were installed.  (This may change
in a future version.)


Code and Resources
==================

The layout of the code and resources is dictated by Python's normal
import layout, relative to the egg's "base location".

For the ``.egg`` format, the base location is the ``.egg`` itself. That
is, adding the ``.egg`` filename or directory name to ``sys.path``
makes its contents importable.

For the ``.egg-info`` format, however, the base location is the
directory that *contains* the ``.egg-info``, and thus it is the
directory that must be added to ``sys.path`` to make the egg importable.
(Note that this means that the "normal" installation of a package to a
``sys.path`` directory is sufficient to make it an "egg" if it has an
``.egg-info`` file or directory installed alongside of it.)


Project Metadata
=================

If eggs contained only code and resources, there would of course be
no difference between them and any other directory or zip file on
``sys.path``.  Thus, metadata must also be included, using a metadata
file or directory.

For the ``.egg`` format, the metadata is placed in an ``EGG-INFO``
subdirectory, directly within the ``.egg`` file or directory.  For the
``.egg-info`` format, metadata is stored directly within the
``.egg-info`` directory itself.

The minimum project metadata that all eggs must have is a standard
Python ``PKG-INFO`` file, named ``PKG-INFO`` and placed within the
metadata directory appropriate to the format.  Because it's possible for
this to be the only metadata file included, ``.egg-info`` format eggs
are not required to be a directory; they can just be a ``.egg-info``
file that directly contains the ``PKG-INFO`` metadata.  This eliminates
the need to create a directory just to store one file.  This option is
*not* available for ``.egg`` formats, since setuptools always includes
other metadata.  (In fact, setuptools itself never generates
``.egg-info`` files, either; the support for using files was added so
that the requirement could easily be satisfied by other tools, such
as the distutils in Python 2.5).

In addition to the ``PKG-INFO`` file, an egg's metadata directory may
also include files and directories representing various forms of
optional standard metadata (see the section on `Standard Metadata`_,
below) or user-defined metadata required by the project.  For example,
some projects may define a metadata format to describe their application
plugins, and metadata in this format would then be included by plugin
creators in their projects' metadata directories.


Filename-Embedded Metadata
==========================

To allow introspection of installed projects and runtime resolution of
inter-project dependencies, a certain amount of information is embedded
in egg filenames.  At a minimum, this includes the project name, and
ideally will also include the project version number.  Optionally, it
can also include the target Python version and required runtime
platform if platform-specific C code is included.  The syntax of an
egg filename is as follows::

    name ["-" version ["-py" pyver ["-" required_platform]]] "." ext

The "name" and "version" should be escaped using the ``to_filename()``
function provided by ``pkg_resources``, after first processing them with
``safe_name()`` and ``safe_version()`` respectively.  These latter two
functions can also be used to later "unescape" these parts of the
filename.  (For a detailed description of these transformations, please
see the "Parsing Utilities" section of the ``pkg_resources`` manual.)

The "pyver" string is the Python major version, as found in the first
3 characters of ``sys.version``.  "required_platform" is essentially
a distutils ``get_platform()`` string, but with enhancements to properly
distinguish Mac OS versions.  (See the ``get_build_platform()``
documentation in the "Platform Utilities" section of the
``pkg_resources`` manual for more details.)

Finally, the "ext" is either ``.egg`` or ``.egg-info``, as appropriate
for the egg's format.

Normally, an egg's filename should include at least the project name and
version, as this allows the runtime system to find desired project
versions without having to read the egg's PKG-INFO to determine its
version number.

Setuptools, however, only includes the version number in the filename
when an ``.egg`` file is built using the ``bdist_egg`` command, or when
an ``.egg-info`` directory is being installed by the
``install_egg_info`` command. When generating metadata for use with the
original source tree, it only includes the project name, so that the
directory will not have to be renamed each time the project's version
changes.

This is especially important when version numbers change frequently, and
the source metadata directory is kept under version control with the
rest of the project.  (As would be the case when the project's source
includes project-defined metadata that is not generated from by
setuptools from data in the setup script.)


Egg Links
=========

In addition to the ``.egg`` and ``.egg-info`` formats, there is a third
egg-related extension that you may encounter on occasion: ``.egg-link``
files.

These files are not eggs, strictly speaking. They simply provide a way
to reference an egg that is not physically installed in the desired
location. They exist primarily as a cross-platform alternative to
symbolic links, to support "installing" code that is being developed in
a different location than the desired installation location. For
example, if a user is developing an application plugin in their home
directory, but the plugin needs to be "installed" in an application
plugin directory, running "setup.py develop -md /path/to/app/plugins"
will install an ``.egg-link`` file in ``/path/to/app/plugins``, that
tells the egg runtime system where to find the actual egg (the user's
project source directory and its ``.egg-info`` subdirectory).

``.egg-link`` files are named following the format for ``.egg`` and
``.egg-info`` names, but only the project name is included; no version,
Python version, or platform information is included.  When the runtime
searches for available eggs, ``.egg-link`` files are opened and the
actual egg file/directory name is read from them.

Each ``.egg-link`` file should contain a single file or directory name,
with no newlines.  This filename should be the base location of one or
more eggs.  That is, the name must either end in ``.egg``, or else it
should be the parent directory of one or more ``.egg-info`` format eggs.

As of setuptools 0.6c6, the path may be specified as a platform-independent
(i.e. ``/``-separated) relative path from the directory containing the
``.egg-link`` file, and a second line may appear in the file, specifying a
platform-independent relative path from the egg's base directory to its
setup script directory.  This allows installation tools such as EasyInstall
to find the project's setup directory and build eggs or perform other setup
commands on it.


-----------------
Standard Metadata
-----------------

In addition to the minimum required ``PKG-INFO`` metadata, projects can
include a variety of standard metadata files or directories, as
described below.  Except as otherwise noted, these files and directories
are automatically generated by setuptools, based on information supplied
in the setup script or through analysis of the project's code and
resources.

Most of these files and directories are generated via "egg-info
writers" during execution of the setuptools ``egg_info`` command, and
are listed in the ``egg_info.writers`` entry point group defined by
setuptools' own ``setup.py`` file.

Project authors can register their own metadata writers as entry points
in this group (as described in the setuptools manual under "Adding new
EGG-INFO Files") to cause setuptools to generate project-specific
metadata files or directories during execution of the ``egg_info``
command.  It is up to project authors to document these new metadata
formats, if they create any.


``.txt`` File Formats
=====================

Files described in this section that have ``.txt`` extensions have a
simple lexical format consisting of a sequence of text lines, each line
terminated by a linefeed character (regardless of platform).  Leading
and trailing whitespace on each line is ignored, as are blank lines and
lines whose first nonblank character is a ``#`` (comment symbol).  (This
is the parsing format defined by the ``yield_lines()`` function of
the ``pkg_resources`` module.)

All ``.txt`` files defined by this section follow this format, but some
are also "sectioned" files, meaning that their contents are divided into
sections, using square-bracketed section headers akin to Windows
``.ini`` format.  Note that this does *not* imply that the lines within
the sections follow an ``.ini`` format, however.  Please see an
individual metadata file's documentation for a description of what the
lines and section names mean in that particular file.

Sectioned files can be parsed using the ``split_sections()`` function;
see the "Parsing Utilities" section of the ``pkg_resources`` manual for
for details.


Dependency Metadata
===================


``requires.txt``
----------------

This is a "sectioned" text file.  Each section is a sequence of
"requirements", as parsed by the ``parse_requirements()`` function;
please see the ``pkg_resources`` manual for the complete requirement
parsing syntax.

The first, unnamed section (i.e., before the first section header) in
this file is the project's core requirements, which must be installed
for the project to function.  (Specified using the ``install_requires``
keyword to ``setup()``).

The remaining (named) sections describe the project's "extra"
requirements, as specified using the ``extras_require`` keyword to
``setup()``.  The section name is the name of the optional feature, and
the section body lists that feature's dependencies.

Note that it is not normally necessary to inspect this file directly;
``pkg_resources.Distribution`` objects have a ``requires()`` method
that can be used to obtain ``Requirement`` objects describing the
project's core and optional dependencies.



``dependency_links.txt``
------------------------

A list of dependency URLs, one per line, as specified using the
``dependency_links`` keyword to ``setup()``.  These may be direct
download URLs, or the URLs of web pages containing direct download
links, and will be used by EasyInstall to find dependencies, as though
the user had manually provided them via the ``--find-links`` command
line option.  Please see the setuptools manual and EasyInstall manual
for more information on specifying this option, and for information on
how EasyInstall processes ``--find-links`` URLs.


``depends.txt`` -- Obsolete, do not create!
-------------------------------------------

This file follows an identical format to ``requires.txt``, but is
obsolete and should not be used.  The earliest versions of setuptools
required users to manually create and maintain this file, so the runtime
still supports reading it, if it exists.  The new filename was created
so that it could be automatically generated from ``setup()`` information
without overwriting an existing hand-created ``depends.txt``, if one
was already present in the project's source ``.egg-info`` directory.


``namespace_packages.txt`` -- Namespace Package Metadata
========================================================

A list of namespace package names, one per line, as supplied to the
``namespace_packages`` keyword to ``setup()``.  Please see the manuals
for setuptools and ``pkg_resources`` for more information about
namespace packages.


``entry_points.txt`` -- "Entry Point"/Plugin Metadata
=====================================================

This is a "sectioned" text file, whose contents encode the
``entry_points`` keyword supplied to ``setup()``.  All sections are
named, as the section names specify the entry point groups in which the
corresponding section's entry points are registered.

Each section is a sequence of "entry point" lines, each parseable using
the ``EntryPoint.parse`` classmethod; please see the ``pkg_resources``
manual for the complete entry point parsing syntax.

Note that it is not necessary to parse this file directly; the
``pkg_resources`` module provides a variety of APIs to locate and load
entry points automatically.  Please see the setuptools and
``pkg_resources`` manuals for details on the nature and uses of entry
points.


The ``scripts`` Subdirectory
============================

This directory is currently only created for ``.egg`` files built by
the setuptools ``bdist_egg`` command.  It will contain copies of all
of the project's "traditional" scripts (i.e., those specified using the
``scripts`` keyword to ``setup()``).  This is so that they can be
reconstituted when an ``.egg`` file is installed.

The scripts are placed here using the disutils' standard
``install_scripts`` command, so any ``#!`` lines reflect the Python
installation where the egg was built.  But instead of copying the
scripts to the local script installation directory, EasyInstall writes
short wrapper scripts that invoke the original scripts from inside the
egg, after ensuring that sys.path includes the egg and any eggs it
depends on.  For more about `script wrappers`_, see the section below on
`Installation and Path Management Issues`_.


Zip Support Metadata
====================


``native_libs.txt``
-------------------

A list of C extensions and other dynamic link libraries contained in
the egg, one per line.  Paths are ``/``-separated and relative to the
egg's base location.

This file is generated as part of ``bdist_egg`` processing, and as such
only appears in ``.egg`` files (and ``.egg`` directories created by
unpacking them).  It is used to ensure that all libraries are extracted
from a zipped egg at the same time, in case there is any direct linkage
between them.  Please see the `Zip File Issues`_ section below for more
information on library and resource extraction from ``.egg`` files.


``eager_resources.txt``
-----------------------

A list of resource files and/or directories, one per line, as specified
via the ``eager_resources`` keyword to ``setup()``.  Paths are
``/``-separated and relative to the egg's base location.

Resource files or directories listed here will be extracted
simultaneously, if any of the named resources are extracted, or if any
native libraries listed in ``native_libs.txt`` are extracted.  Please
see the setuptools manual for details on what this feature is used for
and how it works, as well as the `Zip File Issues`_ section below.


``zip-safe`` and ``not-zip-safe``
---------------------------------

These are zero-length files, and either one or the other should exist.
If ``zip-safe`` exists, it means that the project will work properly
when installedas an ``.egg`` zipfile, and conversely the existence of
``not-zip-safe`` means the project should not be installed as an
``.egg`` file.  The ``zip_safe`` option to setuptools' ``setup()``
determines which file will be written. If the option isn't provided,
setuptools attempts to make its own assessment of whether the package
can work, based on code and content analysis.

If neither file is present at installation time, EasyInstall defaults
to assuming that the project should be unzipped.  (Command-line options
to EasyInstall, however, take precedence even over an existing
``zip-safe`` or ``not-zip-safe`` file.)

Note that these flag files appear only in ``.egg`` files generated by
``bdist_egg``, and in ``.egg`` directories created by unpacking such an
``.egg`` file.



``top_level.txt`` -- Conflict Management Metadata
=================================================

This file is a list of the top-level module or package names provided
by the project, one Python identifier per line.

Subpackages are not included; a project containing both a ``foo.bar``
and a ``foo.baz`` would include only one line, ``foo``, in its
``top_level.txt``.

This data is used by ``pkg_resources`` at runtime to issue a warning if
an egg is added to ``sys.path`` when its contained packages may have
already been imported.

(It was also once used to detect conflicts with non-egg packages at
installation time, but in more recent versions, setuptools installs eggs
in such a way that they always override non-egg packages, thus
preventing a problem from arising.)


``SOURCES.txt`` -- Source Files Manifest
========================================

This file is roughly equivalent to the distutils' ``MANIFEST`` file.
The differences are as follows:

* The filenames always use ``/`` as a path separator, which must be
  converted back to a platform-specific path whenever they are read.

* The file is automatically generated by setuptools whenever the
  ``egg_info`` or ``sdist`` commands are run, and it is *not*
  user-editable.

Although this metadata is included with distributed eggs, it is not
actually used at runtime for any purpose.  Its function is to ensure
that setuptools-built *source* distributions can correctly discover
what files are part of the project's source, even if the list had been
generated using revision control metadata on the original author's
system.

In other words, ``SOURCES.txt`` has little or no runtime value for being
included in distributed eggs, and it is possible that future versions of
the ``bdist_egg`` and ``install_egg_info`` commands will strip it before
installation or distribution.  Therefore, do not rely on its being
available outside of an original source directory or source
distribution.


------------------------------
Other Technical Considerations
------------------------------


Zip File Issues
===============

Although zip files resemble directories, they are not fully
substitutable for them.  Most platforms do not support loading dynamic
link libraries contained in zipfiles, so it is not possible to directly
import C extensions from ``.egg`` zipfiles.  Similarly, there are many
existing libraries -- whether in Python or C -- that require actual
operating system filenames, and do not work with arbitrary "file-like"
objects or in-memory strings, and thus cannot operate directly on the
contents of zip files.

To address these issues, the ``pkg_resources`` module provides a
"resource API" to support obtaining either the contents of a resource,
or a true operating system filename for the resource.  If the egg
containing the resource is a directory, the resource's real filename
is simply returned.  However, if the egg is a zipfile, then the
resource is first extracted to a cache directory, and the filename
within the cache is returned.

The cache directory is determined by the ``pkg_resources`` API; please
see the ``set_cache_path()`` and ``get_default_cache()`` documentation
for details.


The Extraction Process
----------------------

Resources are extracted to a cache subdirectory whose name is based
on the enclosing ``.egg`` filename and the path to the resource.  If
there is already a file of the correct name, size, and timestamp, its
filename is returned to the requester.  Otherwise, the desired file is
extracted first to a temporary name generated using
``mkstemp(".$extract",target_dir)``, and then its timestamp is set to
match the one in the zip file, before renaming it to its final name.
(Some collision detection and resolution code is used to handle the
fact that Windows doesn't overwrite files when renaming.)

If a resource directory is requested, all of its contents are
recursively extracted in this fashion, to ensure that the directory
name can be used as if it were valid all along.

If the resource requested for extraction is listed in the
``native_libs.txt`` or ``eager_resources.txt`` metadata files, then
*all* resources listed in *either* file will be extracted before the
requested resource's filename is returned, thus ensuring that all
C extensions and data used by them will be simultaneously available.


Extension Import Wrappers
-------------------------

Since Python's built-in zip import feature does not support loading
C extension modules from zipfiles, the setuptools ``bdist_egg`` command
generates special import wrappers to make it work.

The wrappers are ``.py`` files (along with corresponding ``.pyc``
and/or ``.pyo`` files) that have the same module name as the
corresponding C extension.  These wrappers are located in the same
package directory (or top-level directory) within the zipfile, so that
say, ``foomodule.so`` will get a corresponding ``foo.py``, while
``bar/baz.pyd`` will get a corresponding ``bar/baz.py``.

These wrapper files contain a short stanza of Python code that asks
``pkg_resources`` for the filename of the corresponding C extension,
then reloads the module using the obtained filename.  This will cause
``pkg_resources`` to first ensure that all of the egg's C extensions
(and any accompanying "eager resources") are extracted to the cache
before attempting to link to the C library.

Note, by the way, that ``.egg`` directories will also contain these
wrapper files.  However, Python's default import priority is such that
C extensions take precedence over same-named Python modules, so the
import wrappers are ignored unless the egg is a zipfile.


Installation and Path Management Issues
=======================================

Python's initial setup of ``sys.path`` is very dependent on the Python
version and installation platform, as well as how Python was started
(i.e., script vs. ``-c`` vs. ``-m`` vs. interactive interpreter).
In fact, Python also provides only two relatively robust ways to affect
``sys.path`` outside of direct manipulation in code: the ``PYTHONPATH``
environment variable, and ``.pth`` files.

However, with no cross-platform way to safely and persistently change
environment variables, this leaves ``.pth`` files as EasyInstall's only
real option for persistent configuration of ``sys.path``.

But ``.pth`` files are rather strictly limited in what they are allowed
to do normally.  They add directories only to the *end* of ``sys.path``,
after any locally-installed ``site-packages`` directory, and they are
only processed *in* the ``site-packages`` directory to start with.

This is a double whammy for users who lack write access to that
directory, because they can't create a ``.pth`` file that Python will
read, and even if a sympathetic system administrator adds one for them
that calls ``site.addsitedir()`` to allow some other directory to
contain ``.pth`` files, they won't be able to install newer versions of
anything that's installed in the systemwide ``site-packages``, because
their paths will still be added *after* ``site-packages``.

So EasyInstall applies two workarounds to solve these problems.

The first is that EasyInstall leverages ``.pth`` files' "import" feature
to manipulate ``sys.path`` and ensure that anything EasyInstall adds
to a ``.pth`` file will always appear before both the standard library
and the local ``site-packages`` directories.  Thus, it is always
possible for a user who can write a Python-read ``.pth`` file to ensure
that their packages come first in their own environment.

Second, when installing to a ``PYTHONPATH`` directory (as opposed to
a "site" directory like ``site-packages``) EasyInstall will also install
a special version of the ``site`` module.  Because it's in a
``PYTHONPATH`` directory, this module will get control before the
standard library version of ``site`` does.  It will record the state of
``sys.path`` before invoking the "real" ``site`` module, and then
afterwards it processes any ``.pth`` files found in ``PYTHONPATH``
directories, including all the fixups needed to ensure that eggs always
appear before the standard library in sys.path, but are in a relative
order to one another that is defined by their ``PYTHONPATH`` and
``.pth``-prescribed sequence.

The net result of these changes is that ``sys.path`` order will be
as follows at runtime:

1. The ``sys.argv[0]`` directory, or an emtpy string if no script
   is being executed.

2. All eggs installed by EasyInstall in any ``.pth`` file in each
   ``PYTHONPATH`` directory, in order first by ``PYTHONPATH`` order,
   then normal ``.pth`` processing order (which is to say alphabetical
   by ``.pth`` filename, then by the order of listing within each
   ``.pth`` file).

3. All eggs installed by EasyInstall in any ``.pth`` file in each "site"
   directory (such as ``site-packages``), following the same ordering
   rules as for the ones on ``PYTHONPATH``.

4. The ``PYTHONPATH`` directories themselves, in their original order

5. Any paths from ``.pth`` files found on ``PYTHONPATH`` that were *not*
   eggs installed by EasyInstall, again following the same relative
   ordering rules.

6. The standard library and "site" directories, along with the contents
   of any ``.pth`` files found in the "site" directories.

Notice that sections 1, 4, and 6 comprise the "normal" Python setup for
``sys.path``.  Sections 2 and 3 are inserted to support eggs, and
section 5 emulates what the "normal" semantics of ``.pth`` files on
``PYTHONPATH`` would be if Python natively supported them.

For further discussion of the tradeoffs that went into this design, as
well as notes on the actual magic inserted into ``.pth`` files to make
them do these things, please see also the following messages to the
distutils-SIG mailing list:

* http://mail.python.org/pipermail/distutils-sig/2006-February/006026.html
* http://mail.python.org/pipermail/distutils-sig/2006-March/006123.html


Script Wrappers
---------------

EasyInstall never directly installs a project's original scripts to
a script installation directory.  Instead, it writes short wrapper
scripts that first ensure that the project's dependencies are active
on sys.path, before invoking the original script.  These wrappers
have a #! line that points to the version of Python that was used to
install them, and their second line is always a comment that indicates
the type of script wrapper, the project version required for the script
to run, and information identifying the script to be invoked.

The format of this marker line is::

    "# EASY-INSTALL-" script_type ": " tuple_of_strings "\n"

The ``script_type`` is one of ``SCRIPT``, ``DEV-SCRIPT``, or
``ENTRY-SCRIPT``.  The ``tuple_of_strings`` is a comma-separated
sequence of Python string constants.  For ``SCRIPT`` and ``DEV-SCRIPT``
wrappers, there are two strings: the project version requirement, and
the script name (as a filename within the ``scripts`` metadata
directory).  For ``ENTRY-SCRIPT`` wrappers, there are three:
the project version requirement, the entry point group name, and the
entry point name.  (See the "Automatic Script Creation" section in the
setuptools manual for more information about entry point scripts.)

In each case, the project version requirement string will be a string
parseable with the ``pkg_resources`` modules' ``Requirement.parse()``
classmethod.  The only difference between a ``SCRIPT`` wrapper and a
``DEV-SCRIPT`` is that a ``DEV-SCRIPT`` actually executes the original
source script in the project's source tree, and is created when the
"setup.py develop" command is run.  A ``SCRIPT`` wrapper, on the other
hand, uses the "installed" script written to the ``EGG-INFO/scripts``
subdirectory of the corresponding ``.egg`` zipfile or directory.
(``.egg-info`` eggs do not have script wrappers associated with them,
except in the "setup.py develop" case.)

The purpose of including the marker line in generated script wrappers is
to facilitate introspection of installed scripts, and their relationship
to installed eggs.  For example, an uninstallation tool could use this
data to identify what scripts can safely be removed, and/or identify
what scripts would stop working if a particular egg is uninstalled.

doc/alt-python34-setuptools/docs/python3.txt000064400000012035150404236440015076 0ustar00=====================================================
Supporting both Python 2 and Python 3 with Setuptools
=====================================================

Starting with Distribute version 0.6.2 and Setuptools 0.7, the Setuptools
project supported Python 3. Installing and
using setuptools for Python 3 code works exactly the same as for Python 2
code, but Setuptools also helps you to support Python 2 and Python 3 from
the same source code by letting you run 2to3 on the code as a part of the
build process, by setting the keyword parameter ``use_2to3`` to True.


Setuptools as help during porting
=================================

Setuptools can make the porting process much easier by automatically running
2to3 as a part of the test running. To do this you need to configure the
setup.py so that you can run the unit tests with ``python setup.py test``.

See :ref:`test` for more information on this.

Once you have the tests running under Python 2, you can add the use_2to3
keyword parameters to setup(), and start running the tests under Python 3.
The test command will now first run the build command during which the code
will be converted with 2to3, and the tests will then be run from the build
directory, as opposed from the source directory as is normally done.

Setuptools will convert all Python files, and also all doctests in Python
files. However, if you have doctests located in separate text files, these
will not automatically be converted. By adding them to the
``convert_2to3_doctests`` keyword parameter Setuptools will convert them as
well.

By default, the conversion uses all fixers in the ``lib2to3.fixers`` package.
To use additional fixers, the parameter ``use_2to3_fixers`` can be set
to a list of names of packages containing fixers. To exclude fixers, the
parameter ``use_2to3_exclude_fixers`` can be set to fixer names to be
skipped.

A typical setup.py can look something like this::

    from setuptools import setup

    setup(
        name='your.module',
        version = '1.0',
        description='This is your awesome module',
        author='You',
        author_email='your@email',
        package_dir = {'': 'src'},
        packages = ['your', 'you.module'],
        test_suite = 'your.module.tests',
        use_2to3 = True,
        convert_2to3_doctests = ['src/your/module/README.txt'],
        use_2to3_fixers = ['your.fixers'],
        use_2to3_exclude_fixers = ['lib2to3.fixes.fix_import'],
    )

Differential conversion
-----------------------

Note that a file will only be copied and converted during the build process
if the source file has been changed. If you add a file to the doctests
that should be converted, it will not be converted the next time you run
the tests, since it hasn't been modified. You need to remove it from the
build directory. Also if you run the build, install or test commands before
adding the use_2to3 parameter, you will have to remove the build directory
before you run the test command, as the files otherwise will seem updated,
and no conversion will happen.

In general, if code doesn't seem to be converted, deleting the build directory
and trying again is a good saferguard against the build directory getting
"out of sync" with the source directory.

Distributing Python 3 modules
=============================

You can distribute your modules with Python 3 support in different ways. A
normal source distribution will work, but can be slow in installing, as the
2to3 process will be run during the install. But you can also distribute
the module in binary format, such as a binary egg. That egg will contain the
already converted code, and hence no 2to3 conversion is needed during install.

Advanced features
=================

If you don't want to run the 2to3 conversion on the doctests in Python files,
you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``.

Note on compatibility with older versions of setuptools
=======================================================

Setuptools earlier than 0.7 does not know about the new keyword parameters to
support Python 3.
As a result it will warn about the unknown keyword parameters if you use
those versions of setuptools instead of Distribute under Python 2. This output
is not an error, and
install process will continue as normal, but if you want to get rid of that
error this is easy. Simply conditionally add the new parameters into an extra
dict and pass that dict into setup()::

    from setuptools import setup
    import sys

    extra = {}
    if sys.version_info >= (3,):
        extra['use_2to3'] = True
        extra['convert_2to3_doctests'] = ['src/your/module/README.txt']
        extra['use_2to3_fixers'] = ['your.fixers']

    setup(
        name='your.module',
        version = '1.0',
        description='This is your awesome module',
        author='You',
        author_email='your@email',
        package_dir = {'': 'src'},
        packages = ['your', 'you.module'],
        test_suite = 'your.module.tests',
        **extra
    )

This way the parameters will only be used under Python 3, where Distribute or
Setuptools 0.7 or later is required.
doc/alt-python34-setuptools/docs/pkg_resources.txt000064400000273732150404236440016362 0ustar00=============================================================
Package Discovery and Resource Access using ``pkg_resources``
=============================================================

The ``pkg_resources`` module distributed with ``setuptools`` provides an API
for Python libraries to access their resource files, and for extensible
applications and frameworks to automatically discover plugins.  It also
provides runtime support for using C extensions that are inside zipfile-format
eggs, support for merging packages that have separately-distributed modules or
subpackages, and APIs for managing Python's current "working set" of active
packages.


.. contents:: **Table of Contents**


--------
Overview
--------

The ``pkg_resources`` module provides runtime facilities for finding,
introspecting, activating and using installed Python distributions. Some
of the more advanced features (notably the support for parallel installation
of multiple versions) rely specifically on the "egg" format (either as a
zip archive or subdirectory), while others (such as plugin discovery) will
work correctly so long as "egg-info" metadata directories are available for
relevant distributions.

Eggs are a distribution format for Python modules, similar in concept to
Java's "jars" or Ruby's "gems", or the "wheel" format defined in PEP 427.
However, unlike a pure distribution format, eggs can also be installed and
added directly to ``sys.path`` as an import location. When installed in
this way, eggs are *discoverable*, meaning that they carry metadata that
unambiguously identifies their contents and dependencies. This means that
an installed egg can be *automatically* found and added to ``sys.path`` in
response to simple requests of the form, "get me everything I need to use
docutils' PDF support". This feature allows mutually conflicting versions of
a distribution to co-exist in the same Python installation, with individual
applications activating the desired version at runtime by manipulating the
contents of ``sys.path`` (this differs from the virtual environment
approach, which involves creating isolated environments for each
application).

The following terms are needed in order to explain the capabilities offered
by this module:

project
    A library, framework, script, plugin, application, or collection of data
    or other resources, or some combination thereof.  Projects are assumed to
    have "relatively unique" names, e.g. names registered with PyPI.

release
    A snapshot of a project at a particular point in time, denoted by a version
    identifier.

distribution
    A file or files that represent a particular release.

importable distribution
    A file or directory that, if placed on ``sys.path``, allows Python to
    import any modules contained within it.

pluggable distribution
    An importable distribution whose filename unambiguously identifies its
    release (i.e. project and version), and whose contents unamabiguously
    specify what releases of other projects will satisfy its runtime
    requirements.

extra
    An "extra" is an optional feature of a release, that may impose additional
    runtime requirements.  For example, if docutils PDF support required a
    PDF support library to be present, docutils could define its PDF support as
    an "extra", and list what other project releases need to be available in
    order to provide it.

environment
    A collection of distributions potentially available for importing, but not
    necessarily active.  More than one distribution (i.e. release version) for
    a given project may be present in an environment.

working set
    A collection of distributions actually available for importing, as on
    ``sys.path``.  At most one distribution (release version) of a given
    project may be present in a working set, as otherwise there would be
    ambiguity as to what to import.

eggs
    Eggs are pluggable distributions in one of the three formats currently
    supported by ``pkg_resources``.  There are built eggs, development eggs,
    and egg links.  Built eggs are directories or zipfiles whose name ends
    with ``.egg`` and follows the egg naming conventions, and contain an
    ``EGG-INFO`` subdirectory (zipped or otherwise).  Development eggs are
    normal directories of Python code with one or more ``ProjectName.egg-info``
    subdirectories. The development egg format is also used to provide a
    default version of a distribution that is available to software that
    doesn't use ``pkg_resources`` to request specific versions. Egg links
    are ``*.egg-link`` files that contain the name of a built or
    development egg, to support symbolic linking on platforms that do not
    have native symbolic links (or where the symbolic link support is
    limited).

(For more information about these terms and concepts, see also this
`architectural overview`_ of ``pkg_resources`` and Python Eggs in general.)

.. _architectural overview: http://mail.python.org/pipermail/distutils-sig/2005-June/004652.html


.. -----------------
.. Developer's Guide
.. -----------------

.. This section isn't written yet.  Currently planned topics include
    Accessing Resources
    Finding and Activating Package Distributions
        get_provider()
        require()
        WorkingSet
        iter_distributions
    Running Scripts
    Configuration
    Namespace Packages
    Extensible Applications and Frameworks
        Locating entry points
        Activation listeners
        Metadata access
        Extended Discovery and Installation
    Supporting Custom PEP 302 Implementations
.. For now, please check out the extensive `API Reference`_ below.


-------------
API Reference
-------------

Namespace Package Support
=========================

A namespace package is a package that only contains other packages and modules,
with no direct contents of its own.  Such packages can be split across
multiple, separately-packaged distributions.  Normally, you do not need to use
the namespace package APIs directly; instead you should supply the
``namespace_packages`` argument to ``setup()`` in your project's ``setup.py``.
See the `setuptools documentation on namespace packages`_ for more information.

However, if for some reason you need to manipulate namespace packages or
directly alter ``sys.path`` at runtime, you may find these APIs useful:

``declare_namespace(name)``
    Declare that the dotted package name `name` is a "namespace package" whose
    contained packages and modules may be spread across multiple distributions.
    The named package's ``__path__`` will be extended to include the
    corresponding package in all distributions on ``sys.path`` that contain a
    package of that name.  (More precisely, if an importer's
    ``find_module(name)`` returns a loader, then it will also be searched for
    the package's contents.)  Whenever a Distribution's ``activate()`` method
    is invoked, it checks for the presence of namespace packages and updates
    their ``__path__`` contents accordingly.

Applications that manipulate namespace packages or directly alter ``sys.path``
at runtime may also need to use this API function:

``fixup_namespace_packages(path_item)``
    Declare that `path_item` is a newly added item on ``sys.path`` that may
    need to be used to update existing namespace packages.  Ordinarily, this is
    called for you when an egg is automatically added to ``sys.path``, but if
    your application modifies ``sys.path`` to include locations that may
    contain portions of a namespace package, you will need to call this
    function to ensure they are added to the existing namespace packages.

Although by default ``pkg_resources`` only supports namespace packages for
filesystem and zip importers, you can extend its support to other "importers"
compatible with PEP 302 using the ``register_namespace_handler()`` function.
See the section below on `Supporting Custom Importers`_ for details.

.. _setuptools documentation on namespace packages: http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages


``WorkingSet`` Objects
======================

The ``WorkingSet`` class provides access to a collection of "active"
distributions.  In general, there is only one meaningful ``WorkingSet``
instance: the one that represents the distributions that are currently active
on ``sys.path``.  This global instance is available under the name
``working_set`` in the ``pkg_resources`` module.  However, specialized
tools may wish to manipulate working sets that don't correspond to
``sys.path``, and therefore may wish to create other ``WorkingSet`` instances.

It's important to note that the global ``working_set`` object is initialized
from ``sys.path`` when ``pkg_resources`` is first imported, but is only updated
if you do all future ``sys.path`` manipulation via ``pkg_resources`` APIs.  If
you manually modify ``sys.path``, you must invoke the appropriate methods on
the ``working_set`` instance to keep it in sync.  Unfortunately, Python does
not provide any way to detect arbitrary changes to a list object like
``sys.path``, so ``pkg_resources`` cannot automatically update the
``working_set`` based on changes to ``sys.path``.

``WorkingSet(entries=None)``
    Create a ``WorkingSet`` from an iterable of path entries.  If `entries`
    is not supplied, it defaults to the value of ``sys.path`` at the time
    the constructor is called.

    Note that you will not normally construct ``WorkingSet`` instances
    yourself, but instead you will implicitly or explicitly use the global
    ``working_set`` instance.  For the most part, the ``pkg_resources`` API
    is designed so that the ``working_set`` is used by default, such that you
    don't have to explicitly refer to it most of the time.

All distributions available directly on ``sys.path`` will be activated
automatically when ``pkg_resources`` is imported. This behaviour can cause
version conflicts for applications which require non-default versions of
those distributions. To handle this situation, ``pkg_resources`` checks for a
``__requires__`` attribute in the ``__main__`` module when initializing the
default working set, and uses this to ensure a suitable version of each
affected distribution is activated. For example::

    __requires__ = ["CherryPy < 3"] # Must be set before pkg_resources import
    import pkg_resources


Basic ``WorkingSet`` Methods
----------------------------

The following methods of ``WorkingSet`` objects are also available as module-
level functions in ``pkg_resources`` that apply to the default ``working_set``
instance.  Thus, you can use e.g. ``pkg_resources.require()`` as an
abbreviation for ``pkg_resources.working_set.require()``:


``require(*requirements)``
    Ensure that distributions matching `requirements` are activated

    `requirements` must be a string or a (possibly-nested) sequence
    thereof, specifying the distributions and versions required.  The
    return value is a sequence of the distributions that needed to be
    activated to fulfill the requirements; all relevant distributions are
    included, even if they were already activated in this working set.

    For the syntax of requirement specifiers, see the section below on
    `Requirements Parsing`_.

    In general, it should not be necessary for you to call this method
    directly.  It's intended more for use in quick-and-dirty scripting and
    interactive interpreter hacking than for production use. If you're creating
    an actual library or application, it's strongly recommended that you create
    a "setup.py" script using ``setuptools``, and declare all your requirements
    there.  That way, tools like EasyInstall can automatically detect what
    requirements your package has, and deal with them accordingly.

    Note that calling ``require('SomePackage')`` will not install
    ``SomePackage`` if it isn't already present.  If you need to do this, you
    should use the ``resolve()`` method instead, which allows you to pass an
    ``installer`` callback that will be invoked when a needed distribution
    can't be found on the local machine.  You can then have this callback
    display a dialog, automatically download the needed distribution, or
    whatever else is appropriate for your application. See the documentation
    below on the ``resolve()`` method for more information, and also on the
    ``obtain()`` method of ``Environment`` objects.

``run_script(requires, script_name)``
    Locate distribution specified by `requires` and run its `script_name`
    script.  `requires` must be a string containing a requirement specifier.
    (See `Requirements Parsing`_ below for the syntax.)

    The script, if found, will be executed in *the caller's globals*.  That's
    because this method is intended to be called from wrapper scripts that
    act as a proxy for the "real" scripts in a distribution.  A wrapper script
    usually doesn't need to do anything but invoke this function with the
    correct arguments.

    If you need more control over the script execution environment, you
    probably want to use the ``run_script()`` method of a ``Distribution``
    object's `Metadata API`_ instead.

``iter_entry_points(group, name=None)``
    Yield entry point objects from `group` matching `name`

    If `name` is None, yields all entry points in `group` from all
    distributions in the working set, otherwise only ones matching both
    `group` and `name` are yielded.  Entry points are yielded from the active
    distributions in the order that the distributions appear in the working
    set.  (For the global ``working_set``, this should be the same as the order
    that they are listed in ``sys.path``.)  Note that within the entry points
    advertised by an individual distribution, there is no particular ordering.

    Please see the section below on `Entry Points`_ for more information.


``WorkingSet`` Methods and Attributes
-------------------------------------

These methods are used to query or manipulate the contents of a specific
working set, so they must be explicitly invoked on a particular ``WorkingSet``
instance:

``add_entry(entry)``
    Add a path item to the ``entries``, finding any distributions on it.  You
    should use this when you add additional items to ``sys.path`` and you want
    the global ``working_set`` to reflect the change.  This method is also
    called by the ``WorkingSet()`` constructor during initialization.

    This method uses ``find_distributions(entry,True)`` to find distributions
    corresponding to the path entry, and then ``add()`` them.  `entry` is
    always appended to the ``entries`` attribute, even if it is already
    present, however. (This is because ``sys.path`` can contain the same value
    more than once, and the ``entries`` attribute should be able to reflect
    this.)

``__contains__(dist)``
    True if `dist` is active in this ``WorkingSet``.  Note that only one
    distribution for a given project can be active in a given ``WorkingSet``.

``__iter__()``
    Yield distributions for non-duplicate projects in the working set.
    The yield order is the order in which the items' path entries were
    added to the working set.

``find(req)``
    Find a distribution matching `req` (a ``Requirement`` instance).
    If there is an active distribution for the requested project, this
    returns it, as long as it meets the version requirement specified by
    `req`.  But, if there is an active distribution for the project and it
    does *not* meet the `req` requirement, ``VersionConflict`` is raised.
    If there is no active distribution for the requested project, ``None``
    is returned.

``resolve(requirements, env=None, installer=None)``
    List all distributions needed to (recursively) meet `requirements`

    `requirements` must be a sequence of ``Requirement`` objects.  `env`,
    if supplied, should be an ``Environment`` instance.  If
    not supplied, an ``Environment`` is created from the working set's
    ``entries``.  `installer`, if supplied, will be invoked with each
    requirement that cannot be met by an already-installed distribution; it
    should return a ``Distribution`` or ``None``.  (See the ``obtain()`` method
    of `Environment Objects`_, below, for more information on the `installer`
    argument.)

``add(dist, entry=None)``
    Add `dist` to working set, associated with `entry`

    If `entry` is unspecified, it defaults to ``dist.location``.  On exit from
    this routine, `entry` is added to the end of the working set's ``.entries``
    (if it wasn't already present).

    `dist` is only added to the working set if it's for a project that
    doesn't already have a distribution active in the set.  If it's
    successfully added, any  callbacks registered with the ``subscribe()``
    method will be called.  (See `Receiving Change Notifications`_, below.)

    Note: ``add()`` is automatically called for you by the ``require()``
    method, so you don't normally need to use this method directly.

``entries``
    This attribute represents a "shadow" ``sys.path``, primarily useful for
    debugging.  If you are experiencing import problems, you should check
    the global ``working_set`` object's ``entries`` against ``sys.path``, to
    ensure that they match.  If they do not, then some part of your program
    is manipulating ``sys.path`` without updating the ``working_set``
    accordingly.  IMPORTANT NOTE: do not directly manipulate this attribute!
    Setting it equal to ``sys.path`` will not fix your problem, any more than
    putting black tape over an "engine warning" light will fix your car!  If
    this attribute is out of sync with ``sys.path``, it's merely an *indicator*
    of the problem, not the cause of it.


Receiving Change Notifications
------------------------------

Extensible applications and frameworks may need to receive notification when
a new distribution (such as a plug-in component) has been added to a working
set.  This is what the ``subscribe()`` method and ``add_activation_listener()``
function are for.

``subscribe(callback)``
    Invoke ``callback(distribution)`` once for each active distribution that is
    in the set now, or gets added later.  Because the callback is invoked for
    already-active distributions, you do not need to loop over the working set
    yourself to deal with the existing items; just register the callback and
    be prepared for the fact that it will be called immediately by this method.

    Note that callbacks *must not* allow exceptions to propagate, or they will
    interfere with the operation of other callbacks and possibly result in an
    inconsistent working set state.  Callbacks should use a try/except block
    to ignore, log, or otherwise process any errors, especially since the code
    that caused the callback to be invoked is unlikely to be able to handle
    the errors any better than the callback itself.

``pkg_resources.add_activation_listener()`` is an alternate spelling of
``pkg_resources.working_set.subscribe()``.


Locating Plugins
----------------

Extensible applications will sometimes have a "plugin directory" or a set of
plugin directories, from which they want to load entry points or other
metadata.  The ``find_plugins()`` method allows you to do this, by scanning an
environment for the newest version of each project that can be safely loaded
without conflicts or missing requirements.

``find_plugins(plugin_env, full_env=None, fallback=True)``
   Scan `plugin_env` and identify which distributions could be added to this
   working set without version conflicts or missing requirements.

   Example usage::

       distributions, errors = working_set.find_plugins(
           Environment(plugin_dirlist)
       )
       map(working_set.add, distributions)  # add plugins+libs to sys.path
       print "Couldn't load", errors        # display errors

   The `plugin_env` should be an ``Environment`` instance that contains only
   distributions that are in the project's "plugin directory" or directories.
   The `full_env`, if supplied, should be an ``Environment`` instance that
   contains all currently-available distributions.

   If `full_env` is not supplied, one is created automatically from the
   ``WorkingSet`` this method is called on, which will typically mean that
   every directory on ``sys.path`` will be scanned for distributions.

   This method returns a 2-tuple: (`distributions`, `error_info`), where
   `distributions` is a list of the distributions found in `plugin_env` that
   were loadable, along with any other distributions that are needed to resolve
   their dependencies.  `error_info` is a dictionary mapping unloadable plugin
   distributions to an exception instance describing the error that occurred.
   Usually this will be a ``DistributionNotFound`` or ``VersionConflict``
   instance.

   Most applications will use this method mainly on the master ``working_set``
   instance in ``pkg_resources``, and then immediately add the returned
   distributions to the working set so that they are available on sys.path.
   This will make it possible to find any entry points, and allow any other
   metadata tracking and hooks to be activated.

   The resolution algorithm used by ``find_plugins()`` is as follows.  First,
   the project names of the distributions present in `plugin_env` are sorted.
   Then, each project's eggs are tried in descending version order (i.e.,
   newest version first).

   An attempt is made to resolve each egg's dependencies. If the attempt is
   successful, the egg and its dependencies are added to the output list and to
   a temporary copy of the working set.  The resolution process continues with
   the next project name, and no older eggs for that project are tried.

   If the resolution attempt fails, however, the error is added to the error
   dictionary.  If the `fallback` flag is true, the next older version of the
   plugin is tried, until a working version is found.  If false, the resolution
   process continues with the next plugin project name.

   Some applications may have stricter fallback requirements than others. For
   example, an application that has a database schema or persistent objects
   may not be able to safely downgrade a version of a package. Others may want
   to ensure that a new plugin configuration is either 100% good or else
   revert to a known-good configuration.  (That is, they may wish to revert to
   a known configuration if the `error_info` return value is non-empty.)

   Note that this algorithm gives precedence to satisfying the dependencies of
   alphabetically prior project names in case of version conflicts. If two
   projects named "AaronsPlugin" and "ZekesPlugin" both need different versions
   of "TomsLibrary", then "AaronsPlugin" will win and "ZekesPlugin" will be
   disabled due to version conflict.


``Environment`` Objects
=======================

An "environment" is a collection of ``Distribution`` objects, usually ones
that are present and potentially importable on the current platform.
``Environment`` objects are used by ``pkg_resources`` to index available
distributions during dependency resolution.

``Environment(search_path=None, platform=get_supported_platform(), python=PY_MAJOR)``
    Create an environment snapshot by scanning `search_path` for distributions
    compatible with `platform` and `python`.  `search_path` should be a
    sequence of strings such as might be used on ``sys.path``.  If a
    `search_path` isn't supplied, ``sys.path`` is used.

    `platform` is an optional string specifying the name of the platform
    that platform-specific distributions must be compatible with.  If
    unspecified, it defaults to the current platform.  `python` is an
    optional string naming the desired version of Python (e.g. ``'2.4'``);
    it defaults to the currently-running version.

    You may explicitly set `platform` (and/or `python`) to ``None`` if you
    wish to include *all* distributions, not just those compatible with the
    running platform or Python version.

    Note that `search_path` is scanned immediately for distributions, and the
    resulting ``Environment`` is a snapshot of the found distributions.  It
    is not automatically updated if the system's state changes due to e.g.
    installation or removal of distributions.

``__getitem__(project_name)``
    Returns a list of distributions for the given project name, ordered
    from newest to oldest version.  (And highest to lowest format precedence
    for distributions that contain the same version of the project.)  If there
    are no distributions for the project, returns an empty list.

``__iter__()``
    Yield the unique project names of the distributions in this environment.
    The yielded names are always in lower case.

``add(dist)``
    Add `dist` to the environment if it matches the platform and python version
    specified at creation time, and only if the distribution hasn't already
    been added. (i.e., adding the same distribution more than once is a no-op.)

``remove(dist)``
    Remove `dist` from the environment.

``can_add(dist)``
    Is distribution `dist` acceptable for this environment?  If it's not
    compatible with the ``platform`` and ``python`` version values specified
    when the environment was created, a false value is returned.

``__add__(dist_or_env)``  (``+`` operator)
    Add a distribution or environment to an ``Environment`` instance, returning
    a *new* environment object that contains all the distributions previously
    contained by both.  The new environment will have a ``platform`` and
    ``python`` of ``None``, meaning that it will not reject any distributions
    from being added to it; it will simply accept whatever is added.  If you
    want the added items to be filtered for platform and Python version, or
    you want to add them to the *same* environment instance, you should use
    in-place addition (``+=``) instead.

``__iadd__(dist_or_env)``  (``+=`` operator)
    Add a distribution or environment to an ``Environment`` instance
    *in-place*, updating the existing instance and returning it.  The
    ``platform`` and ``python`` filter attributes take effect, so distributions
    in the source that do not have a suitable platform string or Python version
    are silently ignored.

``best_match(req, working_set, installer=None)``
    Find distribution best matching `req` and usable on `working_set`

    This calls the ``find(req)`` method of the `working_set` to see if a
    suitable distribution is already active.  (This may raise
    ``VersionConflict`` if an unsuitable version of the project is already
    active in the specified `working_set`.)  If a suitable distribution isn't
    active, this method returns the newest distribution in the environment
    that meets the ``Requirement`` in `req`.  If no suitable distribution is
    found, and `installer` is supplied, then the result of calling
    the environment's ``obtain(req, installer)`` method will be returned.

``obtain(requirement, installer=None)``
    Obtain a distro that matches requirement (e.g. via download).  In the
    base ``Environment`` class, this routine just returns
    ``installer(requirement)``, unless `installer` is None, in which case
    None is returned instead.  This method is a hook that allows subclasses
    to attempt other ways of obtaining a distribution before falling back
    to the `installer` argument.

``scan(search_path=None)``
    Scan `search_path` for distributions usable on `platform`

    Any distributions found are added to the environment.  `search_path` should
    be a sequence of strings such as might be used on ``sys.path``.  If not
    supplied, ``sys.path`` is used.  Only distributions conforming to
    the platform/python version defined at initialization are added.  This
    method is a shortcut for using the ``find_distributions()`` function to
    find the distributions from each item in `search_path`, and then calling
    ``add()`` to add each one to the environment.


``Requirement`` Objects
=======================

``Requirement`` objects express what versions of a project are suitable for
some purpose.  These objects (or their string form) are used by various
``pkg_resources`` APIs in order to find distributions that a script or
distribution needs.


Requirements Parsing
--------------------

``parse_requirements(s)``
    Yield ``Requirement`` objects for a string or iterable of lines.  Each
    requirement must start on a new line.  See below for syntax.

``Requirement.parse(s)``
    Create a ``Requirement`` object from a string or iterable of lines.  A
    ``ValueError`` is raised if the string or lines do not contain a valid
    requirement specifier, or if they contain more than one specifier.  (To
    parse multiple specifiers from a string or iterable of strings, use
    ``parse_requirements()`` instead.)

    The syntax of a requirement specifier can be defined in EBNF as follows::

        requirement  ::= project_name versionspec? extras?
        versionspec  ::= comparison version (',' comparison version)*
        comparison   ::= '<' | '<=' | '!=' | '==' | '>=' | '>'
        extras       ::= '[' extralist? ']'
        extralist    ::= identifier (',' identifier)*
        project_name ::= identifier
        identifier   ::= [-A-Za-z0-9_]+
        version      ::= [-A-Za-z0-9_.]+

    Tokens can be separated by whitespace, and a requirement can be continued
    over multiple lines using a backslash (``\\``).  Line-end comments (using
    ``#``) are also allowed.

    Some examples of valid requirement specifiers::

        FooProject >= 1.2
        Fizzy [foo, bar]
        PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1
        SomethingWhoseVersionIDontCareAbout

    The project name is the only required portion of a requirement string, and
    if it's the only thing supplied, the requirement will accept any version
    of that project.

    The "extras" in a requirement are used to request optional features of a
    project, that may require additional project distributions in order to
    function.  For example, if the hypothetical "Report-O-Rama" project offered
    optional PDF support, it might require an additional library in order to
    provide that support.  Thus, a project needing Report-O-Rama's PDF features
    could use a requirement of ``Report-O-Rama[PDF]`` to request installation
    or activation of both Report-O-Rama and any libraries it needs in order to
    provide PDF support.  For example, you could use::

        easy_install.py Report-O-Rama[PDF]

    To install the necessary packages using the EasyInstall program, or call
    ``pkg_resources.require('Report-O-Rama[PDF]')`` to add the necessary
    distributions to sys.path at runtime.


``Requirement`` Methods and Attributes
--------------------------------------

``__contains__(dist_or_version)``
    Return true if `dist_or_version` fits the criteria for this requirement.
    If `dist_or_version` is a ``Distribution`` object, its project name must
    match the requirement's project name, and its version must meet the
    requirement's version criteria.  If `dist_or_version` is a string, it is
    parsed using the ``parse_version()`` utility function.  Otherwise, it is
    assumed to be an already-parsed version.

    The ``Requirement`` object's version specifiers (``.specs``) are internally
    sorted into ascending version order, and used to establish what ranges of
    versions are acceptable.  Adjacent redundant conditions are effectively
    consolidated (e.g. ``">1, >2"`` produces the same results as ``">1"``, and
    ``"<2,<3"`` produces the same results as``"<3"``). ``"!="`` versions are
    excised from the ranges they fall within.  The version being tested for
    acceptability is then checked for membership in the resulting ranges.
    (Note that providing conflicting conditions for the same version (e.g.
    ``"<2,>=2"`` or ``"==2,!=2"``) is meaningless and may therefore produce
    bizarre results when compared with actual version number(s).)

``__eq__(other_requirement)``
    A requirement compares equal to another requirement if they have
    case-insensitively equal project names, version specifiers, and "extras".
    (The order that extras and version specifiers are in is also ignored.)
    Equal requirements also have equal hashes, so that requirements can be
    used in sets or as dictionary keys.

``__str__()``
    The string form of a ``Requirement`` is a string that, if passed to
    ``Requirement.parse()``, would return an equal ``Requirement`` object.

``project_name``
    The name of the required project

``key``
    An all-lowercase version of the ``project_name``, useful for comparison
    or indexing.

``extras``
    A tuple of names of "extras" that this requirement calls for.  (These will
    be all-lowercase and normalized using the ``safe_extra()`` parsing utility
    function, so they may not exactly equal the extras the requirement was
    created with.)

``specs``
    A list of ``(op,version)`` tuples, sorted in ascending parsed-version
    order.  The `op` in each tuple is a comparison operator, represented as
    a string.  The `version` is the (unparsed) version number.  The relative
    order of tuples containing the same version numbers is undefined, since
    having more than one operator for a given version is either redundant or
    self-contradictory.


Entry Points
============

Entry points are a simple way for distributions to "advertise" Python objects
(such as functions or classes) for use by other distributions.  Extensible
applications and frameworks can search for entry points with a particular name
or group, either from a specific distribution or from all active distributions
on sys.path, and then inspect or load the advertised objects at will.

Entry points belong to "groups" which are named with a dotted name similar to
a Python package or module name.  For example, the ``setuptools`` package uses
an entry point named ``distutils.commands`` in order to find commands defined
by distutils extensions.  ``setuptools`` treats the names of entry points
defined in that group as the acceptable commands for a setup script.

In a similar way, other packages can define their own entry point groups,
either using dynamic names within the group (like ``distutils.commands``), or
possibly using predefined names within the group.  For example, a blogging
framework that offers various pre- or post-publishing hooks might define an
entry point group and look for entry points named "pre_process" and
"post_process" within that group.

To advertise an entry point, a project needs to use ``setuptools`` and provide
an ``entry_points`` argument to ``setup()`` in its setup script, so that the
entry points will be included in the distribution's metadata.  For more
details, see the ``setuptools`` documentation.  (XXX link here to setuptools)

Each project distribution can advertise at most one entry point of a given
name within the same entry point group.  For example, a distutils extension
could advertise two different ``distutils.commands`` entry points, as long as
they had different names.  However, there is nothing that prevents *different*
projects from advertising entry points of the same name in the same group.  In
some cases, this is a desirable thing, since the application or framework that
uses the entry points may be calling them as hooks, or in some other way
combining them.  It is up to the application or framework to decide what to do
if multiple distributions advertise an entry point; some possibilities include
using both entry points, displaying an error message, using the first one found
in sys.path order, etc.


Convenience API
---------------

In the following functions, the `dist` argument can be a ``Distribution``
instance, a ``Requirement`` instance, or a string specifying a requirement
(i.e. project name, version, etc.).  If the argument is a string or
``Requirement``, the specified distribution is located (and added to sys.path
if not already present).  An error will be raised if a matching distribution is
not available.

The `group` argument should be a string containing a dotted identifier,
identifying an entry point group.  If you are defining an entry point group,
you should include some portion of your package's name in the group name so as
to avoid collision with other packages' entry point groups.

``load_entry_point(dist, group, name)``
    Load the named entry point from the specified distribution, or raise
    ``ImportError``.

``get_entry_info(dist, group, name)``
    Return an ``EntryPoint`` object for the given `group` and `name` from
    the specified distribution.  Returns ``None`` if the distribution has not
    advertised a matching entry point.

``get_entry_map(dist, group=None)``
    Return the distribution's entry point map for `group`, or the full entry
    map for the distribution.  This function always returns a dictionary,
    even if the distribution advertises no entry points.  If `group` is given,
    the dictionary maps entry point names to the corresponding ``EntryPoint``
    object.  If `group` is None, the dictionary maps group names to
    dictionaries that then map entry point names to the corresponding
    ``EntryPoint`` instance in that group.

``iter_entry_points(group, name=None)``
    Yield entry point objects from `group` matching `name`.

    If `name` is None, yields all entry points in `group` from all
    distributions in the working set on sys.path, otherwise only ones matching
    both `group` and `name` are yielded.  Entry points are yielded from
    the active distributions in the order that the distributions appear on
    sys.path.  (Within entry points for a particular distribution, however,
    there is no particular ordering.)

    (This API is actually a method of the global ``working_set`` object; see
    the section above on `Basic WorkingSet Methods`_ for more information.)


Creating and Parsing
--------------------

``EntryPoint(name, module_name, attrs=(), extras=(), dist=None)``
    Create an ``EntryPoint`` instance.  `name` is the entry point name.  The
    `module_name` is the (dotted) name of the module containing the advertised
    object.  `attrs` is an optional tuple of names to look up from the
    module to obtain the advertised object.  For example, an `attrs` of
    ``("foo","bar")`` and a `module_name` of ``"baz"`` would mean that the
    advertised object could be obtained by the following code::

        import baz
        advertised_object = baz.foo.bar

    The `extras` are an optional tuple of "extra feature" names that the
    distribution needs in order to provide this entry point.  When the
    entry point is loaded, these extra features are looked up in the `dist`
    argument to find out what other distributions may need to be activated
    on sys.path; see the ``load()`` method for more details.  The `extras`
    argument is only meaningful if `dist` is specified.  `dist` must be
    a ``Distribution`` instance.

``EntryPoint.parse(src, dist=None)`` (classmethod)
    Parse a single entry point from string `src`

    Entry point syntax follows the form::

        name = some.module:some.attr [extra1,extra2]

    The entry name and module name are required, but the ``:attrs`` and
    ``[extras]`` parts are optional, as is the whitespace shown between
    some of the items.  The `dist` argument is passed through to the
    ``EntryPoint()`` constructor, along with the other values parsed from
    `src`.

``EntryPoint.parse_group(group, lines, dist=None)`` (classmethod)
    Parse `lines` (a string or sequence of lines) to create a dictionary
    mapping entry point names to ``EntryPoint`` objects.  ``ValueError`` is
    raised if entry point names are duplicated, if `group` is not a valid
    entry point group name, or if there are any syntax errors.  (Note: the
    `group` parameter is used only for validation and to create more
    informative error messages.)  If `dist` is provided, it will be used to
    set the ``dist`` attribute of the created ``EntryPoint`` objects.

``EntryPoint.parse_map(data, dist=None)`` (classmethod)
    Parse `data` into a dictionary mapping group names to dictionaries mapping
    entry point names to ``EntryPoint`` objects.  If `data` is a dictionary,
    then the keys are used as group names and the values are passed to
    ``parse_group()`` as the `lines` argument.  If `data` is a string or
    sequence of lines, it is first split into .ini-style sections (using
    the ``split_sections()`` utility function) and the section names are used
    as group names.  In either case, the `dist` argument is passed through to
    ``parse_group()`` so that the entry points will be linked to the specified
    distribution.


``EntryPoint`` Objects
----------------------

For simple introspection, ``EntryPoint`` objects have attributes that
correspond exactly to the constructor argument names: ``name``,
``module_name``, ``attrs``, ``extras``, and ``dist`` are all available.  In
addition, the following methods are provided:

``load(require=True, env=None, installer=None)``
    Load the entry point, returning the advertised Python object, or raise
    ``ImportError`` if it cannot be obtained.  If `require` is a true value,
    then ``require(env, installer)`` is called before attempting the import.

``require(env=None, installer=None)``
    Ensure that any "extras" needed by the entry point are available on
    sys.path.  ``UnknownExtra`` is raised if the ``EntryPoint`` has ``extras``,
    but no ``dist``, or if the named extras are not defined by the
    distribution.  If `env` is supplied, it must be an ``Environment``, and it
    will be used to search for needed distributions if they are not already
    present on sys.path.  If `installer` is supplied, it must be a callable
    taking a ``Requirement`` instance and returning a matching importable
    ``Distribution`` instance or None.

``__str__()``
    The string form of an ``EntryPoint`` is a string that could be passed to
    ``EntryPoint.parse()`` to produce an equivalent ``EntryPoint``.


``Distribution`` Objects
========================

``Distribution`` objects represent collections of Python code that may or may
not be importable, and may or may not have metadata and resources associated
with them.  Their metadata may include information such as what other projects
the distribution depends on, what entry points the distribution advertises, and
so on.


Getting or Creating Distributions
---------------------------------

Most commonly, you'll obtain ``Distribution`` objects from a ``WorkingSet`` or
an ``Environment``.  (See the sections above on `WorkingSet Objects`_ and
`Environment Objects`_, which are containers for active distributions and
available distributions, respectively.)  You can also obtain ``Distribution``
objects from one of these high-level APIs:

``find_distributions(path_item, only=False)``
    Yield distributions accessible via `path_item`.  If `only` is true, yield
    only distributions whose ``location`` is equal to `path_item`.  In other
    words, if `only` is true, this yields any distributions that would be
    importable if `path_item` were on ``sys.path``.  If `only` is false, this
    also yields distributions that are "in" or "under" `path_item`, but would
    not be importable unless their locations were also added to ``sys.path``.

``get_distribution(dist_spec)``
    Return a ``Distribution`` object for a given ``Requirement`` or string.
    If `dist_spec` is already a ``Distribution`` instance, it is returned.
    If it is a ``Requirement`` object or a string that can be parsed into one,
    it is used to locate and activate a matching distribution, which is then
    returned.

However, if you're creating specialized tools for working with distributions,
or creating a new distribution format, you may also need to create
``Distribution`` objects directly, using one of the three constructors below.

These constructors all take an optional `metadata` argument, which is used to
access any resources or metadata associated with the distribution.  `metadata`
must be an object that implements the ``IResourceProvider`` interface, or None.
If it is None, an ``EmptyProvider`` is used instead.  ``Distribution`` objects
implement both the `IResourceProvider`_ and `IMetadataProvider Methods`_ by
delegating them to the `metadata` object.

``Distribution.from_location(location, basename, metadata=None, **kw)`` (classmethod)
    Create a distribution for `location`, which must be a string such as a
    URL, filename, or other string that might be used on ``sys.path``.
    `basename` is a string naming the distribution, like ``Foo-1.2-py2.4.egg``.
    If `basename` ends with ``.egg``, then the project's name, version, python
    version and platform are extracted from the filename and used to set those
    properties of the created distribution.  Any additional keyword arguments
    are forwarded to the ``Distribution()`` constructor.

``Distribution.from_filename(filename, metadata=None**kw)`` (classmethod)
    Create a distribution by parsing a local filename.  This is a shorter way
    of saying  ``Distribution.from_location(normalize_path(filename),
    os.path.basename(filename), metadata)``.  In other words, it creates a
    distribution whose location is the normalize form of the filename, parsing
    name and version information from the base portion of the filename.  Any
    additional keyword arguments are forwarded to the ``Distribution()``
    constructor.

``Distribution(location,metadata,project_name,version,py_version,platform,precedence)``
    Create a distribution by setting its properties.  All arguments are
    optional and default to None, except for `py_version` (which defaults to
    the current Python version) and `precedence` (which defaults to
    ``EGG_DIST``; for more details see ``precedence`` under `Distribution
    Attributes`_ below).  Note that it's usually easier to use the
    ``from_filename()`` or ``from_location()`` constructors than to specify
    all these arguments individually.


``Distribution`` Attributes
---------------------------

location
    A string indicating the distribution's location.  For an importable
    distribution, this is the string that would be added to ``sys.path`` to
    make it actively importable.  For non-importable distributions, this is
    simply a filename, URL, or other way of locating the distribution.

project_name
    A string, naming the project that this distribution is for.  Project names
    are defined by a project's setup script, and they are used to identify
    projects on PyPI.  When a ``Distribution`` is constructed, the
    `project_name` argument is passed through the ``safe_name()`` utility
    function to filter out any unacceptable characters.

key
    ``dist.key`` is short for ``dist.project_name.lower()``.  It's used for
    case-insensitive comparison and indexing of distributions by project name.

extras
    A list of strings, giving the names of extra features defined by the
    project's dependency list (the ``extras_require`` argument specified in
    the project's setup script).

version
    A string denoting what release of the project this distribution contains.
    When a ``Distribution`` is constructed, the `version` argument is passed
    through the ``safe_version()`` utility function to filter out any
    unacceptable characters.  If no `version` is specified at construction
    time, then attempting to access this attribute later will cause the
    ``Distribution`` to try to discover its version by reading its ``PKG-INFO``
    metadata file.  If ``PKG-INFO`` is unavailable or can't be parsed,
    ``ValueError`` is raised.

parsed_version
    The ``parsed_version`` is a tuple representing a "parsed" form of the
    distribution's ``version``.  ``dist.parsed_version`` is a shortcut for
    calling ``parse_version(dist.version)``.  It is used to compare or sort
    distributions by version.  (See the `Parsing Utilities`_ section below for
    more information on the ``parse_version()`` function.)  Note that accessing
    ``parsed_version`` may result in a ``ValueError`` if the ``Distribution``
    was constructed without a `version` and without `metadata` capable of
    supplying the missing version info.

py_version
    The major/minor Python version the distribution supports, as a string.
    For example, "2.7" or "3.4".  The default is the current version of Python.

platform
    A string representing the platform the distribution is intended for, or
    ``None`` if the distribution is "pure Python" and therefore cross-platform.
    See `Platform Utilities`_ below for more information on platform strings.

precedence
    A distribution's ``precedence`` is used to determine the relative order of
    two distributions that have the same ``project_name`` and
    ``parsed_version``.  The default precedence is ``pkg_resources.EGG_DIST``,
    which is the highest (i.e. most preferred) precedence.  The full list
    of predefined precedences, from most preferred to least preferred, is:
    ``EGG_DIST``, ``BINARY_DIST``, ``SOURCE_DIST``, ``CHECKOUT_DIST``, and
    ``DEVELOP_DIST``.  Normally, precedences other than ``EGG_DIST`` are used
    only by the ``setuptools.package_index`` module, when sorting distributions
    found in a package index to determine their suitability for installation.
    "System" and "Development" eggs (i.e., ones that use the ``.egg-info``
    format), however, are automatically given a precedence of ``DEVELOP_DIST``.



``Distribution`` Methods
------------------------

``activate(path=None)``
    Ensure distribution is importable on `path`.  If `path` is None,
    ``sys.path`` is used instead.  This ensures that the distribution's
    ``location`` is in the `path` list, and it also performs any necessary
    namespace package fixups or declarations.  (That is, if the distribution
    contains namespace packages, this method ensures that they are declared,
    and that the distribution's contents for those namespace packages are
    merged with the contents provided by any other active distributions.  See
    the section above on `Namespace Package Support`_ for more information.)

    ``pkg_resources`` adds a notification callback to the global ``working_set``
    that ensures this method is called whenever a distribution is added to it.
    Therefore, you should not normally need to explicitly call this method.
    (Note that this means that namespace packages on ``sys.path`` are always
    imported as soon as ``pkg_resources`` is, which is another reason why
    namespace packages should not contain any code or import statements.)

``as_requirement()``
    Return a ``Requirement`` instance that matches this distribution's project
    name and version.

``requires(extras=())``
    List the ``Requirement`` objects that specify this distribution's
    dependencies.  If `extras` is specified, it should be a sequence of names
    of "extras" defined by the distribution, and the list returned will then
    include any dependencies needed to support the named "extras".

``clone(**kw)``
    Create a copy of the distribution.  Any supplied keyword arguments override
    the corresponding argument to the ``Distribution()`` constructor, allowing
    you to change some of the copied distribution's attributes.

``egg_name()``
    Return what this distribution's standard filename should be, not including
    the ".egg" extension.  For example, a distribution for project "Foo"
    version 1.2 that runs on Python 2.3 for Windows would have an ``egg_name()``
    of ``Foo-1.2-py2.3-win32``.  Any dashes in the name or version are
    converted to underscores.  (``Distribution.from_location()`` will convert
    them back when parsing a ".egg" file name.)

``__cmp__(other)``, ``__hash__()``
    Distribution objects are hashed and compared on the basis of their parsed
    version and precedence, followed by their key (lowercase project name),
    location, Python version, and platform.

The following methods are used to access ``EntryPoint`` objects advertised
by the distribution.  See the section above on `Entry Points`_ for more
detailed information about these operations:

``get_entry_info(group, name)``
    Return the ``EntryPoint`` object for `group` and `name`, or None if no
    such point is advertised by this distribution.

``get_entry_map(group=None)``
    Return the entry point map for `group`.  If `group` is None, return
    a dictionary mapping group names to entry point maps for all groups.
    (An entry point map is a dictionary of entry point names to ``EntryPoint``
    objects.)

``load_entry_point(group, name)``
    Short for ``get_entry_info(group, name).load()``.  Returns the object
    advertised by the named entry point, or raises ``ImportError`` if
    the entry point isn't advertised by this distribution, or there is some
    other import problem.

In addition to the above methods, ``Distribution`` objects also implement all
of the `IResourceProvider`_ and `IMetadataProvider Methods`_ (which are
documented in later sections):

* ``has_metadata(name)``
* ``metadata_isdir(name)``
* ``metadata_listdir(name)``
* ``get_metadata(name)``
* ``get_metadata_lines(name)``
* ``run_script(script_name, namespace)``
* ``get_resource_filename(manager, resource_name)``
* ``get_resource_stream(manager, resource_name)``
* ``get_resource_string(manager, resource_name)``
* ``has_resource(resource_name)``
* ``resource_isdir(resource_name)``
* ``resource_listdir(resource_name)``

If the distribution was created with a `metadata` argument, these resource and
metadata access methods are all delegated to that `metadata` provider.
Otherwise, they are delegated to an ``EmptyProvider``, so that the distribution
will appear to have no resources or metadata.  This delegation approach is used
so that supporting custom importers or new distribution formats can be done
simply by creating an appropriate `IResourceProvider`_ implementation; see the
section below on `Supporting Custom Importers`_ for more details.


``ResourceManager`` API
=======================

The ``ResourceManager`` class provides uniform access to package resources,
whether those resources exist as files and directories or are compressed in
an archive of some kind.

Normally, you do not need to create or explicitly manage ``ResourceManager``
instances, as the ``pkg_resources`` module creates a global instance for you,
and makes most of its methods available as top-level names in the
``pkg_resources`` module namespace.  So, for example, this code actually
calls the ``resource_string()`` method of the global ``ResourceManager``::

    import pkg_resources
    my_data = pkg_resources.resource_string(__name__, "foo.dat")

Thus, you can use the APIs below without needing an explicit
``ResourceManager`` instance; just import and use them as needed.


Basic Resource Access
---------------------

In the following methods, the `package_or_requirement` argument may be either
a Python package/module name (e.g. ``foo.bar``) or a ``Requirement`` instance.
If it is a package or module name, the named module or package must be
importable (i.e., be in a distribution or directory on ``sys.path``), and the
`resource_name` argument is interpreted relative to the named package.  (Note
that if a module name is used, then the resource name is relative to the
package immediately containing the named module.  Also, you should not use use
a namespace package name, because a namespace package can be spread across
multiple distributions, and is therefore ambiguous as to which distribution
should be searched for the resource.)

If it is a ``Requirement``, then the requirement is automatically resolved
(searching the current ``Environment`` if necessary) and a matching
distribution is added to the ``WorkingSet`` and ``sys.path`` if one was not
already present.  (Unless the ``Requirement`` can't be satisfied, in which
case an exception is raised.)  The `resource_name` argument is then interpreted
relative to the root of the identified distribution; i.e. its first path
segment will be treated as a peer of the top-level modules or packages in the
distribution.

Note that resource names must be ``/``-separated paths and cannot be absolute
(i.e. no leading ``/``) or contain relative names like ``".."``.  Do *not* use
``os.path`` routines to manipulate resource paths, as they are *not* filesystem
paths.

``resource_exists(package_or_requirement, resource_name)``
    Does the named resource exist?  Return ``True`` or ``False`` accordingly.

``resource_stream(package_or_requirement, resource_name)``
    Return a readable file-like object for the specified resource; it may be
    an actual file, a ``StringIO``, or some similar object.  The stream is
    in "binary mode", in the sense that whatever bytes are in the resource
    will be read as-is.

``resource_string(package_or_requirement, resource_name)``
    Return the specified resource as a string.  The resource is read in
    binary fashion, such that the returned string contains exactly the bytes
    that are stored in the resource.

``resource_isdir(package_or_requirement, resource_name)``
    Is the named resource a directory?  Return ``True`` or ``False``
    accordingly.

``resource_listdir(package_or_requirement, resource_name)``
    List the contents of the named resource directory, just like ``os.listdir``
    except that it works even if the resource is in a zipfile.

Note that only ``resource_exists()`` and ``resource_isdir()`` are insensitive
as to the resource type.  You cannot use ``resource_listdir()`` on a file
resource, and you can't use ``resource_string()`` or ``resource_stream()`` on
directory resources.  Using an inappropriate method for the resource type may
result in an exception or undefined behavior, depending on the platform and
distribution format involved.


Resource Extraction
-------------------

``resource_filename(package_or_requirement, resource_name)``
    Sometimes, it is not sufficient to access a resource in string or stream
    form, and a true filesystem filename is needed.  In such cases, you can
    use this method (or module-level function) to obtain a filename for a
    resource.  If the resource is in an archive distribution (such as a zipped
    egg), it will be extracted to a cache directory, and the filename within
    the cache will be returned.  If the named resource is a directory, then
    all resources within that directory (including subdirectories) are also
    extracted.  If the named resource is a C extension or "eager resource"
    (see the ``setuptools`` documentation for details), then all C extensions
    and eager resources are extracted at the same time.

    Archived resources are extracted to a cache location that can be managed by
    the following two methods:

``set_extraction_path(path)``
    Set the base path where resources will be extracted to, if needed.

    If you do not call this routine before any extractions take place, the
    path defaults to the return value of ``get_default_cache()``.  (Which is
    based on the ``PYTHON_EGG_CACHE`` environment variable, with various
    platform-specific fallbacks.  See that routine's documentation for more
    details.)

    Resources are extracted to subdirectories of this path based upon
    information given by the resource provider.  You may set this to a
    temporary directory, but then you must call ``cleanup_resources()`` to
    delete the extracted files when done.  There is no guarantee that
    ``cleanup_resources()`` will be able to remove all extracted files.  (On
    Windows, for example, you can't unlink .pyd or .dll files that are still
    in use.)

    Note that you may not change the extraction path for a given resource
    manager once resources have been extracted, unless you first call
    ``cleanup_resources()``.

``cleanup_resources(force=False)``
    Delete all extracted resource files and directories, returning a list
    of the file and directory names that could not be successfully removed.
    This function does not have any concurrency protection, so it should
    generally only be called when the extraction path is a temporary
    directory exclusive to a single process.  This method is not
    automatically called; you must call it explicitly or register it as an
    ``atexit`` function if you wish to ensure cleanup of a temporary
    directory used for extractions.


"Provider" Interface
--------------------

If you are implementing an ``IResourceProvider`` and/or ``IMetadataProvider``
for a new distribution archive format, you may need to use the following
``IResourceManager`` methods to co-ordinate extraction of resources to the
filesystem.  If you're not implementing an archive format, however, you have
no need to use these methods.  Unlike the other methods listed above, they are
*not* available as top-level functions tied to the global ``ResourceManager``;
you must therefore have an explicit ``ResourceManager`` instance to use them.

``get_cache_path(archive_name, names=())``
    Return absolute location in cache for `archive_name` and `names`

    The parent directory of the resulting path will be created if it does
    not already exist.  `archive_name` should be the base filename of the
    enclosing egg (which may not be the name of the enclosing zipfile!),
    including its ".egg" extension.  `names`, if provided, should be a
    sequence of path name parts "under" the egg's extraction location.

    This method should only be called by resource providers that need to
    obtain an extraction location, and only for names they intend to
    extract, as it tracks the generated names for possible cleanup later.

``extraction_error()``
    Raise an ``ExtractionError`` describing the active exception as interfering
    with the extraction process.  You should call this if you encounter any
    OS errors extracting the file to the cache path; it will format the
    operating system exception for you, and add other information to the
    ``ExtractionError`` instance that may be needed by programs that want to
    wrap or handle extraction errors themselves.

``postprocess(tempname, filename)``
    Perform any platform-specific postprocessing of `tempname`.
    Resource providers should call this method ONLY after successfully
    extracting a compressed resource.  They must NOT call it on resources
    that are already in the filesystem.

    `tempname` is the current (temporary) name of the file, and `filename`
    is the name it will be renamed to by the caller after this routine
    returns.


Metadata API
============

The metadata API is used to access metadata resources bundled in a pluggable
distribution.  Metadata resources are virtual files or directories containing
information about the distribution, such as might be used by an extensible
application or framework to connect "plugins".  Like other kinds of resources,
metadata resource names are ``/``-separated and should not contain ``..`` or
begin with a ``/``.  You should not use ``os.path`` routines to manipulate
resource paths.

The metadata API is provided by objects implementing the ``IMetadataProvider``
or ``IResourceProvider`` interfaces.  ``Distribution`` objects implement this
interface, as do objects returned by the ``get_provider()`` function:

``get_provider(package_or_requirement)``
    If a package name is supplied, return an ``IResourceProvider`` for the
    package.  If a ``Requirement`` is supplied, resolve it by returning a
    ``Distribution`` from the current working set (searching the current
    ``Environment`` if necessary and adding the newly found ``Distribution``
    to the working set).  If the named package can't be imported, or the
    ``Requirement`` can't be satisfied, an exception is raised.

    NOTE: if you use a package name rather than a ``Requirement``, the object
    you get back may not be a pluggable distribution, depending on the method
    by which the package was installed.  In particular, "development" packages
    and "single-version externally-managed" packages do not have any way to
    map from a package name to the corresponding project's metadata.  Do not
    write code that passes a package name to ``get_provider()`` and then tries
    to retrieve project metadata from the returned object.  It may appear to
    work when the named package is in an ``.egg`` file or directory, but
    it will fail in other installation scenarios.  If you want project
    metadata, you need to ask for a *project*, not a package.


``IMetadataProvider`` Methods
-----------------------------

The methods provided by objects (such as ``Distribution`` instances) that
implement the ``IMetadataProvider`` or ``IResourceProvider`` interfaces are:

``has_metadata(name)``
    Does the named metadata resource exist?

``metadata_isdir(name)``
    Is the named metadata resource a directory?

``metadata_listdir(name)``
    List of metadata names in the directory (like ``os.listdir()``)

``get_metadata(name)``
    Return the named metadata resource as a string.  The data is read in binary
    mode; i.e., the exact bytes of the resource file are returned.

``get_metadata_lines(name)``
    Yield named metadata resource as list of non-blank non-comment lines.  This
    is short for calling ``yield_lines(provider.get_metadata(name))``.  See the
    section on `yield_lines()`_ below for more information on the syntax it
    recognizes.

``run_script(script_name, namespace)``
    Execute the named script in the supplied namespace dictionary.  Raises
    ``ResolutionError`` if there is no script by that name in the ``scripts``
    metadata directory.  `namespace` should be a Python dictionary, usually
    a module dictionary if the script is being run as a module.


Exceptions
==========

``pkg_resources`` provides a simple exception hierarchy for problems that may
occur when processing requests to locate and activate packages::

    ResolutionError
        DistributionNotFound
        VersionConflict
        UnknownExtra

    ExtractionError

``ResolutionError``
    This class is used as a base class for the other three exceptions, so that
    you can catch all of them with a single "except" clause.  It is also raised
    directly for miscellaneous requirement-resolution problems like trying to
    run a script that doesn't exist in the distribution it was requested from.

``DistributionNotFound``
    A distribution needed to fulfill a requirement could not be found.

``VersionConflict``
    The requested version of a project conflicts with an already-activated
    version of the same project.

``UnknownExtra``
    One of the "extras" requested was not recognized by the distribution it
    was requested from.

``ExtractionError``
    A problem occurred extracting a resource to the Python Egg cache.  The
    following attributes are available on instances of this exception:

    manager
        The resource manager that raised this exception

    cache_path
        The base directory for resource extraction

    original_error
        The exception instance that caused extraction to fail


Supporting Custom Importers
===========================

By default, ``pkg_resources`` supports normal filesystem imports, and
``zipimport`` importers.  If you wish to use the ``pkg_resources`` features
with other (PEP 302-compatible) importers or module loaders, you may need to
register various handlers and support functions using these APIs:

``register_finder(importer_type, distribution_finder)``
    Register `distribution_finder` to find distributions in ``sys.path`` items.
    `importer_type` is the type or class of a PEP 302 "Importer" (``sys.path``
    item handler), and `distribution_finder` is a callable that, when passed a
    path item, the importer instance, and an `only` flag, yields
    ``Distribution`` instances found under that path item.  (The `only` flag,
    if true, means the finder should yield only ``Distribution`` objects whose
    ``location`` is equal to the path item provided.)

    See the source of the ``pkg_resources.find_on_path`` function for an
    example finder function.

``register_loader_type(loader_type, provider_factory)``
    Register `provider_factory` to make ``IResourceProvider`` objects for
    `loader_type`.  `loader_type` is the type or class of a PEP 302
    ``module.__loader__``, and `provider_factory` is a function that, when
    passed a module object, returns an `IResourceProvider`_ for that module,
    allowing it to be used with the `ResourceManager API`_.

``register_namespace_handler(importer_type, namespace_handler)``
    Register `namespace_handler` to declare namespace packages for the given
    `importer_type`.  `importer_type` is the type or class of a PEP 302
    "importer" (sys.path item handler), and `namespace_handler` is a callable
    with a signature like this::

        def namespace_handler(importer, path_entry, moduleName, module):
            # return a path_entry to use for child packages

    Namespace handlers are only called if the relevant importer object has
    already agreed that it can handle the relevant path item.  The handler
    should only return a subpath if the module ``__path__`` does not already
    contain an equivalent subpath.  Otherwise, it should return None.

    For an example namespace handler, see the source of the
    ``pkg_resources.file_ns_handler`` function, which is used for both zipfile
    importing and regular importing.


IResourceProvider
-----------------

``IResourceProvider`` is an abstract class that documents what methods are
required of objects returned by a `provider_factory` registered with
``register_loader_type()``.  ``IResourceProvider`` is a subclass of
``IMetadataProvider``, so objects that implement this interface must also
implement all of the `IMetadataProvider Methods`_ as well as the methods
shown here.  The `manager` argument to the methods below must be an object
that supports the full `ResourceManager API`_ documented above.

``get_resource_filename(manager, resource_name)``
    Return a true filesystem path for `resource_name`, co-ordinating the
    extraction with `manager`, if the resource must be unpacked to the
    filesystem.

``get_resource_stream(manager, resource_name)``
    Return a readable file-like object for `resource_name`.

``get_resource_string(manager, resource_name)``
    Return a string containing the contents of `resource_name`.

``has_resource(resource_name)``
    Does the package contain the named resource?

``resource_isdir(resource_name)``
    Is the named resource a directory?  Return a false value if the resource
    does not exist or is not a directory.

``resource_listdir(resource_name)``
    Return a list of the contents of the resource directory, ala
    ``os.listdir()``.  Requesting the contents of a non-existent directory may
    raise an exception.

Note, by the way, that your provider classes need not (and should not) subclass
``IResourceProvider`` or ``IMetadataProvider``!  These classes exist solely
for documentation purposes and do not provide any useful implementation code.
You may instead wish to subclass one of the `built-in resource providers`_.


Built-in Resource Providers
---------------------------

``pkg_resources`` includes several provider classes that are automatically used
where appropriate.  Their inheritance tree looks like this::

    NullProvider
        EggProvider
            DefaultProvider
                PathMetadata
            ZipProvider
                EggMetadata
        EmptyProvider
            FileMetadata


``NullProvider``
    This provider class is just an abstract base that provides for common
    provider behaviors (such as running scripts), given a definition for just
    a few abstract methods.

``EggProvider``
    This provider class adds in some egg-specific features that are common
    to zipped and unzipped eggs.

``DefaultProvider``
    This provider class is used for unpacked eggs and "plain old Python"
    filesystem modules.

``ZipProvider``
    This provider class is used for all zipped modules, whether they are eggs
    or not.

``EmptyProvider``
    This provider class always returns answers consistent with a provider that
    has no metadata or resources.  ``Distribution`` objects created without
    a ``metadata`` argument use an instance of this provider class instead.
    Since all ``EmptyProvider`` instances are equivalent, there is no need
    to have more than one instance.  ``pkg_resources`` therefore creates a
    global instance of this class under the name ``empty_provider``, and you
    may use it if you have need of an ``EmptyProvider`` instance.

``PathMetadata(path, egg_info)``
    Create an ``IResourceProvider`` for a filesystem-based distribution, where
    `path` is the filesystem location of the importable modules, and `egg_info`
    is the filesystem location of the distribution's metadata directory.
    `egg_info` should usually be the ``EGG-INFO`` subdirectory of `path` for an
    "unpacked egg", and a ``ProjectName.egg-info`` subdirectory of `path` for
    a "development egg".  However, other uses are possible for custom purposes.

``EggMetadata(zipimporter)``
    Create an ``IResourceProvider`` for a zipfile-based distribution.  The
    `zipimporter` should be a ``zipimport.zipimporter`` instance, and may
    represent a "basket" (a zipfile containing multiple ".egg" subdirectories)
    a specific egg *within* a basket, or a zipfile egg (where the zipfile
    itself is a ".egg").  It can also be a combination, such as a zipfile egg
    that also contains other eggs.

``FileMetadata(path_to_pkg_info)``
    Create an ``IResourceProvider`` that provides exactly one metadata
    resource: ``PKG-INFO``.  The supplied path should be a distutils PKG-INFO
    file.  This is basically the same as an ``EmptyProvider``, except that
    requests for ``PKG-INFO`` will be answered using the contents of the
    designated file.  (This provider is used to wrap ``.egg-info`` files
    installed by vendor-supplied system packages.)


Utility Functions
=================

In addition to its high-level APIs, ``pkg_resources`` also includes several
generally-useful utility routines.  These routines are used to implement the
high-level APIs, but can also be quite useful by themselves.


Parsing Utilities
-----------------

``parse_version(version)``
    Parse a project's version string, returning a value that can be used to
    compare versions by chronological order.  Semantically, the format is a
    rough cross between distutils' ``StrictVersion`` and ``LooseVersion``
    classes; if you give it versions that would work with ``StrictVersion``,
    then they will compare the same way.  Otherwise, comparisons are more like
    a "smarter" form of ``LooseVersion``.  It is *possible* to create
    pathological version coding schemes that will fool this parser, but they
    should be very rare in practice.

    The returned value will be a tuple of strings.  Numeric portions of the
    version are padded to 8 digits so they will compare numerically, but
    without relying on how numbers compare relative to strings.  Dots are
    dropped, but dashes are retained.  Trailing zeros between alpha segments
    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    "2.4". Alphanumeric parts are lower-cased.

    The algorithm assumes that strings like "-" and any alpha string that
    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    considered newer than "2.4-1", which in turn is newer than "2.4".

    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    come before "final" alphabetically) are assumed to be pre-release versions,
    so that the version "2.4" is considered newer than "2.4a1".  Any "-"
    characters preceding a pre-release indicator are removed.  (In versions of
    setuptools prior to 0.6a9, "-" characters were not removed, leading to the
    unintuitive result that "0.2-rc1" was considered a newer version than
    "0.2".)

    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    "rc" are treated as if they were "c", i.e. as though they were release
    candidates, and therefore are not as new as a version string that does not
    contain them.  And the string "dev" is treated as if it were an "@" sign;
    that is, a version coming before even "a" or "alpha".

.. _yield_lines():

``yield_lines(strs)``
    Yield non-empty/non-comment lines from a string/unicode or a possibly-
    nested sequence thereof.  If `strs` is an instance of ``basestring``, it
    is split into lines, and each non-blank, non-comment line is yielded after
    stripping leading and trailing whitespace.  (Lines whose first non-blank
    character is ``#`` are considered comment lines.)

    If `strs` is not an instance of ``basestring``, it is iterated over, and
    each item is passed recursively to ``yield_lines()``, so that an arbitarily
    nested sequence of strings, or sequences of sequences of strings can be
    flattened out to the lines contained therein.  So for example, passing
    a file object or a list of strings to ``yield_lines`` will both work.
    (Note that between each string in a sequence of strings there is assumed to
    be an implicit line break, so lines cannot bridge two strings in a
    sequence.)

    This routine is used extensively by ``pkg_resources`` to parse metadata
    and file formats of various kinds, and most other ``pkg_resources``
    parsing functions that yield multiple values will use it to break up their
    input.  However, this routine is idempotent, so calling ``yield_lines()``
    on the output of another call to ``yield_lines()`` is completely harmless.

``split_sections(strs)``
    Split a string (or possibly-nested iterable thereof), yielding ``(section,
    content)`` pairs found using an ``.ini``-like syntax.  Each ``section`` is
    a whitespace-stripped version of the section name ("``[section]``")
    and each ``content`` is a list of stripped lines excluding blank lines and
    comment-only lines.  If there are any non-blank, non-comment lines before
    the first section header, they're yielded in a first ``section`` of
    ``None``.

    This routine uses ``yield_lines()`` as its front end, so you can pass in
    anything that ``yield_lines()`` accepts, such as an open text file, string,
    or sequence of strings.  ``ValueError`` is raised if a malformed section
    header is found (i.e. a line starting with ``[`` but not ending with
    ``]``).

    Note that this simplistic parser assumes that any line whose first nonblank
    character is ``[`` is a section heading, so it can't support .ini format
    variations that allow ``[`` as the first nonblank character on other lines.

``safe_name(name)``
    Return a "safe" form of a project's name, suitable for use in a
    ``Requirement`` string, as a distribution name, or a PyPI project name.
    All non-alphanumeric runs are condensed to single "-" characters, such that
    a name like "The $$$ Tree" becomes "The-Tree".  Note that if you are
    generating a filename from this value you should combine it with a call to
    ``to_filename()`` so all dashes ("-") are replaced by underscores ("_").
    See ``to_filename()``.

``safe_version(version)``
    Similar to ``safe_name()`` except that spaces in the input become dots, and
    dots are allowed to exist in the output.  As with ``safe_name()``, if you
    are generating a filename from this you should replace any "-" characters
    in the output with underscores.

``safe_extra(extra)``
    Return a "safe" form of an extra's name, suitable for use in a requirement
    string or a setup script's ``extras_require`` keyword.  This routine is
    similar to ``safe_name()`` except that non-alphanumeric runs are replaced
    by a single underbar (``_``), and the result is lowercased.

``to_filename(name_or_version)``
    Escape a name or version string so it can be used in a dash-separated
    filename (or ``#egg=name-version`` tag) without ambiguity.  You
    should only pass in values that were returned by ``safe_name()`` or
    ``safe_version()``.


Platform Utilities
------------------

``get_build_platform()``
    Return this platform's identifier string.  For Windows, the return value
    is ``"win32"``, and for Mac OS X it is a string of the form
    ``"macosx-10.4-ppc"``.  All other platforms return the same uname-based
    string that the ``distutils.util.get_platform()`` function returns.
    This string is the minimum platform version required by distributions built
    on the local machine.  (Backward compatibility note: setuptools versions
    prior to 0.6b1 called this function ``get_platform()``, and the function is
    still available under that name for backward compatibility reasons.)

``get_supported_platform()`` (New in 0.6b1)
    This is the similar to ``get_build_platform()``, but is the maximum
    platform version that the local machine supports.  You will usually want
    to use this value as the ``provided`` argument to the
    ``compatible_platforms()`` function.

``compatible_platforms(provided, required)``
    Return true if a distribution built on the `provided` platform may be used
    on the `required` platform.  If either platform value is ``None``, it is
    considered a wildcard, and the platforms are therefore compatible.
    Likewise, if the platform strings are equal, they're also considered
    compatible, and ``True`` is returned.  Currently, the only non-equal
    platform strings that are considered compatible are Mac OS X platform
    strings with the same hardware type (e.g. ``ppc``) and major version
    (e.g. ``10``) with the `provided` platform's minor version being less than
    or equal to the `required` platform's minor version.

``get_default_cache()``
    Determine the default cache location for extracting resources from zipped
    eggs.  This routine returns the ``PYTHON_EGG_CACHE`` environment variable,
    if set.  Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of
    the user's "Application Data" directory.  On all other systems, it returns
    ``os.path.expanduser("~/.python-eggs")`` if ``PYTHON_EGG_CACHE`` is not
    set.


PEP 302 Utilities
-----------------

``get_importer(path_item)``
    Retrieve a PEP 302 "importer" for the given path item (which need not
    actually be on ``sys.path``).  This routine simulates the PEP 302 protocol
    for obtaining an "importer" object.  It first checks for an importer for
    the path item in ``sys.path_importer_cache``, and if not found it calls
    each of the ``sys.path_hooks`` and caches the result if a good importer is
    found.  If no importer is found, this routine returns an ``ImpWrapper``
    instance that wraps the builtin import machinery as a PEP 302-compliant
    "importer" object.  This ``ImpWrapper`` is *not* cached; instead a new
    instance is returned each time.

    (Note: When run under Python 2.5, this function is simply an alias for
    ``pkgutil.get_importer()``, and instead of ``pkg_resources.ImpWrapper``
    instances, it may return ``pkgutil.ImpImporter`` instances.)


File/Path Utilities
-------------------

``ensure_directory(path)``
    Ensure that the parent directory (``os.path.dirname``) of `path` actually
    exists, using ``os.makedirs()`` if necessary.

``normalize_path(path)``
    Return a "normalized" version of `path`, such that two paths represent
    the same filesystem location if they have equal ``normalized_path()``
    values.  Specifically, this is a shortcut for calling ``os.path.realpath``
    and ``os.path.normcase`` on `path`.  Unfortunately, on certain platforms
    (notably Cygwin and Mac OS X) the ``normcase`` function does not accurately
    reflect the platform's case-sensitivity, so there is always the possibility
    of two apparently-different paths being equal on such platforms.

History
-------

0.6c9
 * Fix ``resource_listdir('')`` always returning an empty list for zipped eggs.

0.6c7
 * Fix package precedence problem where single-version eggs installed in
   ``site-packages`` would take precedence over ``.egg`` files (or directories)
   installed in ``site-packages``.

0.6c6
 * Fix extracted C extensions not having executable permissions under Cygwin.

 * Allow ``.egg-link`` files to contain relative paths.

 * Fix cache dir defaults on Windows when multiple environment vars are needed
   to construct a path.

0.6c4
 * Fix "dev" versions being considered newer than release candidates.

0.6c3
 * Python 2.5 compatibility fixes.

0.6c2
 * Fix a problem with eggs specified directly on ``PYTHONPATH`` on
   case-insensitive filesystems possibly not showing up in the default
   working set, due to differing normalizations of ``sys.path`` entries.

0.6b3
 * Fixed a duplicate path insertion problem on case-insensitive filesystems.

0.6b1
 * Split ``get_platform()`` into ``get_supported_platform()`` and
   ``get_build_platform()`` to work around a Mac versioning problem that caused
   the behavior of ``compatible_platforms()`` to be platform specific.

 * Fix entry point parsing when a standalone module name has whitespace
   between it and the extras.

0.6a11
 * Added ``ExtractionError`` and ``ResourceManager.extraction_error()`` so that
   cache permission problems get a more user-friendly explanation of the
   problem, and so that programs can catch and handle extraction errors if they
   need to.

0.6a10
 * Added the ``extras`` attribute to ``Distribution``, the ``find_plugins()``
   method to ``WorkingSet``, and the ``__add__()`` and ``__iadd__()`` methods
   to ``Environment``.

 * ``safe_name()`` now allows dots in project names.

 * There is a new ``to_filename()`` function that escapes project names and
   versions for safe use in constructing egg filenames from a Distribution
   object's metadata.

 * Added ``Distribution.clone()`` method, and keyword argument support to other
   ``Distribution`` constructors.

 * Added the ``DEVELOP_DIST`` precedence, and automatically assign it to
   eggs using ``.egg-info`` format.

0.6a9
 * Don't raise an error when an invalid (unfinished) distribution is found
   unless absolutely necessary.  Warn about skipping invalid/unfinished eggs
   when building an Environment.

 * Added support for ``.egg-info`` files or directories with version/platform
   information embedded in the filename, so that system packagers have the
   option of including ``PKG-INFO`` files to indicate the presence of a
   system-installed egg, without needing to use ``.egg`` directories, zipfiles,
   or ``.pth`` manipulation.

 * Changed ``parse_version()`` to remove dashes before pre-release tags, so
   that ``0.2-rc1`` is considered an *older* version than ``0.2``, and is equal
   to ``0.2rc1``.  The idea that a dash *always* meant a post-release version
   was highly non-intuitive to setuptools users and Python developers, who
   seem to want to use ``-rc`` version numbers a lot.

0.6a8
 * Fixed a problem with ``WorkingSet.resolve()`` that prevented version
   conflicts from being detected at runtime.

 * Improved runtime conflict warning message to identify a line in the user's
   program, rather than flagging the ``warn()`` call in ``pkg_resources``.

 * Avoid giving runtime conflict warnings for namespace packages, even if they
   were declared by a different package than the one currently being activated.

 * Fix path insertion algorithm for case-insensitive filesystems.

 * Fixed a problem with nested namespace packages (e.g. ``peak.util``) not
   being set as an attribute of their parent package.

0.6a6
 * Activated distributions are now inserted in ``sys.path`` (and the working
   set) just before the directory that contains them, instead of at the end.
   This allows e.g. eggs in ``site-packages`` to override unmanaged modules in
   the same location, and allows eggs found earlier on ``sys.path`` to override
   ones found later.

 * When a distribution is activated, it now checks whether any contained
   non-namespace modules have already been imported and issues a warning if
   a conflicting module has already been imported.

 * Changed dependency processing so that it's breadth-first, allowing a
   depender's preferences to override those of a dependee, to prevent conflicts
   when a lower version is acceptable to the dependee, but not the depender.

 * Fixed a problem extracting zipped files on Windows, when the egg in question
   has had changed contents but still has the same version number.

0.6a4
 * Fix a bug in ``WorkingSet.resolve()`` that was introduced in 0.6a3.

0.6a3
 * Added ``safe_extra()`` parsing utility routine, and use it for Requirement,
   EntryPoint, and Distribution objects' extras handling.

0.6a1
 * Enhanced performance of ``require()`` and related operations when all
   requirements are already in the working set, and enhanced performance of
   directory scanning for distributions.

 * Fixed some problems using ``pkg_resources`` w/PEP 302 loaders other than
   ``zipimport``, and the previously-broken "eager resource" support.

 * Fixed ``pkg_resources.resource_exists()`` not working correctly, along with
   some other resource API bugs.

 * Many API changes and enhancements:

   * Added ``EntryPoint``, ``get_entry_map``, ``load_entry_point``, and
     ``get_entry_info`` APIs for dynamic plugin discovery.

   * ``list_resources`` is now ``resource_listdir`` (and it actually works)

   * Resource API functions like ``resource_string()`` that accepted a package
     name and resource name, will now also accept a ``Requirement`` object in
     place of the package name (to allow access to non-package data files in
     an egg).

   * ``get_provider()`` will now accept a ``Requirement`` instance or a module
     name.  If it is given a ``Requirement``, it will return a corresponding
     ``Distribution`` (by calling ``require()`` if a suitable distribution
     isn't already in the working set), rather than returning a metadata and
     resource provider for a specific module.  (The difference is in how
     resource paths are interpreted; supplying a module name means resources
     path will be module-relative, rather than relative to the distribution's
     root.)

   * ``Distribution`` objects now implement the ``IResourceProvider`` and
     ``IMetadataProvider`` interfaces, so you don't need to reference the (no
     longer available) ``metadata`` attribute to get at these interfaces.

   * ``Distribution`` and ``Requirement`` both have a ``project_name``
     attribute for the project name they refer to.  (Previously these were
     ``name`` and ``distname`` attributes.)

   * The ``path`` attribute of ``Distribution`` objects is now ``location``,
     because it isn't necessarily a filesystem path (and hasn't been for some
     time now).  The ``location`` of ``Distribution`` objects in the filesystem
     should always be normalized using ``pkg_resources.normalize_path()``; all
     of the setuptools and EasyInstall code that generates distributions from
     the filesystem (including ``Distribution.from_filename()``) ensure this
     invariant, but if you use a more generic API like ``Distribution()`` or
     ``Distribution.from_location()`` you should take care that you don't
     create a distribution with an un-normalized filesystem path.

   * ``Distribution`` objects now have an ``as_requirement()`` method that
     returns a ``Requirement`` for the distribution's project name and version.

   * Distribution objects no longer have an ``installed_on()`` method, and the
     ``install_on()`` method is now ``activate()`` (but may go away altogether
     soon).  The ``depends()`` method has also been renamed to ``requires()``,
     and ``InvalidOption`` is now ``UnknownExtra``.

   * ``find_distributions()`` now takes an additional argument called ``only``,
     that tells it to only yield distributions whose location is the passed-in
     path.  (It defaults to False, so that the default behavior is unchanged.)

   * ``AvailableDistributions`` is now called ``Environment``, and the
     ``get()``, ``__len__()``, and ``__contains__()`` methods were removed,
     because they weren't particularly useful.  ``__getitem__()`` no longer
     raises ``KeyError``; it just returns an empty list if there are no
     distributions for the named project.

   * The ``resolve()`` method of ``Environment`` is now a method of
     ``WorkingSet`` instead, and the ``best_match()`` method now uses a working
     set instead of a path list as its second argument.

   * There is a new ``pkg_resources.add_activation_listener()`` API that lets
     you register a callback for notifications about distributions added to
     ``sys.path`` (including the distributions already on it).  This is
     basically a hook for extensible applications and frameworks to be able to
     search for plugin metadata in distributions added at runtime.

0.5a13
 * Fixed a bug in resource extraction from nested packages in a zipped egg.

0.5a12
 * Updated extraction/cache mechanism for zipped resources to avoid inter-
   process and inter-thread races during extraction.  The default cache
   location can now be set via the ``PYTHON_EGGS_CACHE`` environment variable,
   and the default Windows cache is now a ``Python-Eggs`` subdirectory of the
   current user's "Application Data" directory, if the ``PYTHON_EGGS_CACHE``
   variable isn't set.

0.5a10
 * Fix a problem with ``pkg_resources`` being confused by non-existent eggs on
   ``sys.path`` (e.g. if a user deletes an egg without removing it from the
   ``easy-install.pth`` file).

 * Fix a problem with "basket" support in ``pkg_resources``, where egg-finding
   never actually went inside ``.egg`` files.

 * Made ``pkg_resources`` import the module you request resources from, if it's
   not already imported.

0.5a4
 * ``pkg_resources.AvailableDistributions.resolve()`` and related methods now
   accept an ``installer`` argument: a callable taking one argument, a
   ``Requirement`` instance.  The callable must return a ``Distribution``
   object, or ``None`` if no distribution is found.  This feature is used by
   EasyInstall to resolve dependencies by recursively invoking itself.

0.4a4
 * Fix problems with ``resource_listdir()``, ``resource_isdir()`` and resource
   directory extraction for zipped eggs.

0.4a3
 * Fixed scripts not being able to see a ``__file__`` variable in ``__main__``

 * Fixed a problem with ``resource_isdir()`` implementation that was introduced
   in 0.4a2.

0.4a1
 * Fixed a bug in requirements processing for exact versions (i.e. ``==`` and
   ``!=``) when only one condition was included.

 * Added ``safe_name()`` and ``safe_version()`` APIs to clean up handling of
   arbitrary distribution names and versions found on PyPI.

0.3a4
 * ``pkg_resources`` now supports resource directories, not just the resources
   in them.  In particular, there are ``resource_listdir()`` and
   ``resource_isdir()`` APIs.

 * ``pkg_resources`` now supports "egg baskets" -- .egg zipfiles which contain
   multiple distributions in subdirectories whose names end with ``.egg``.
   Having such a "basket" in a directory on ``sys.path`` is equivalent to
   having the individual eggs in that directory, but the contained eggs can
   be individually added (or not) to ``sys.path``.  Currently, however, there
   is no automated way to create baskets.

 * Namespace package manipulation is now protected by the Python import lock.

0.3a1
 * Initial release.

doc/alt-python34-setuptools/docs/conf.py000064400000014755150404236440014243 0ustar00# -*- coding: utf-8 -*-
#
# Setuptools documentation build configuration file, created by
# sphinx-quickstart on Fri Jul 17 14:22:37 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import setup as setup_script

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.append(os.path.abspath('.'))

# -- General configuration -----------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.txt'

# The encoding of source files.
#source_encoding = 'utf-8'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'Setuptools'
copyright = '2009-2013, The fellowship of the packaging'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = setup_script.setup_params['version']
# The full version, including alpha/beta/rc tags.
release = setup_script.setup_params['version']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
#unused_docs = []

# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = []

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages.  Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'nature'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['_theme']

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
html_title = "Setuptools documentation"

# A shorter title for the navigation bar.  Default is the same as html_title.
html_short_title = "Setuptools"

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
html_sidebars = {'index': 'indexsidebar.html'}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}

# If false, no module index is generated.
html_use_modindex = False

# If false, no index is generated.
html_use_index = False

# If true, the index is split into individual pages for each letter.
#html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it.  The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''

# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''

# Output file base name for HTML help builder.
htmlhelp_basename = 'Setuptoolsdoc'


# -- Options for LaTeX output --------------------------------------------------

# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'

# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
  ('index', 'Setuptools.tex', 'Setuptools Documentation',
   'The fellowship of the packaging', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False

# Additional stuff for the LaTeX preamble.
#latex_preamble = ''

# Documents to append as an appendix to all manuals.
#latex_appendices = []

# If false, no module index is generated.
#latex_use_modindex = True
doc/alt-python34-setuptools/docs/merge.txt000064400000011441150404236440014571 0ustar00Merge with Distribute
~~~~~~~~~~~~~~~~~~~~~

In 2013, the fork of Distribute was merged back into Setuptools. This
document describes some of the details of the merge.

.. toctree::
   :maxdepth: 2

   merge-faq

Process
=======

In order to try to accurately reflect the fork and then re-merge of the
projects, the merge process brought both code trees together into one
repository and grafted the Distribute fork onto the Setuptools development
line (as if it had been created as a branch in the first place).

The rebase to get distribute onto setuptools went something like this::

    hg phase -d -f -r 26b4c29b62db
    hg rebase -s 26b4c29b62db -d 7a5cf59c78d7

The technique required a late version of mercurial (2.5) to work correctly.

The only code that was included was the code that was ancestral to the public
releases of Distribute 0.6. Additionally, because Setuptools was not hosted
on Mercurial at the time of the fork and because the Distribute fork did not
include a complete conversion of the Setuptools history, the Distribute
changesets had to be re-applied to a new, different conversion of the
Setuptools SVN repository. As a result, all of the hashes have changed.

Distribute was grafted in a 'distribute' branch and the 'setuptools-0.6'
branch was targeted for the merge. The 'setuptools' branch remains with
unreleased code and may be incorporated in the future.

Reconciling Differences
=======================

There were both technical and philosophical differences between Setuptools
and Distribute. To reconcile these differences in a manageable way, the
following technique was undertaken:

Create a 'Setuptools-Distribute merge' branch, based on a late release of
Distribute (0.6.35). This was done with a00b441856c4.

In that branch, first remove code that is no longer relevant to
Setuptools (such as the setuptools patching code).

Next, in the the merge branch, create another base from at the point where the
fork occurred (such that the code is still essentially an older but pristine
setuptools). This base can be found as 955792b069d0. This creates two heads
in the merge branch, each with a basis in the fork.

Then, repeatedly copy changes for a
single file or small group of files from a late revision of that file in the
'setuptools-0.6' branch (1aae1efe5733 was used) and commit those changes on
the setuptools-only head. That head is then merged with the head with
Distribute changes. It is in this Mercurial
merge operation that the fundamental differences between Distribute and
Setuptools are reconciled, but since only a single file or small set of files
are used, the scope is limited.

Finally, once all the challenging files have been reconciled and merged, the
remaining changes from the setuptools-0.6 branch are merged, deferring to the
reconciled changes (a1fa855a5a62 and 160ccaa46be0).

Originally, jaraco attempted all of this using anonymous heads in the
Distribute branch, but later realized this technique made for a somewhat
unclear merge process, so the changes were re-committed as described above
for clarity. In this way, the "distribute" and "setuptools" branches can
continue to track the official Distribute changesets.

Concessions
===========

With the merge of Setuptools and Distribute, the following concessions were
made:

Differences from setuptools 0.6c12:

Major Changes
-------------

* Python 3 support.
* Improved support for GAE.
* Support `PEP-370 <http://www.python.org/dev/peps/pep-0370/>`_ per-user site
  packages.
* Sort order of Distributions in pkg_resources now prefers PyPI to external
  links (Distribute issue 163).
* Python 2.4 or greater is required (drop support for Python 2.3).

Minor Changes
-------------

* Wording of some output has changed to replace contractions with their
  canonical form (i.e. prefer "could not" to "couldn't").
* Manifest files are only written for 32-bit .exe launchers.

Differences from Distribute 0.6.36:

Major Changes
-------------

* The _distribute property of the setuptools module has been removed.
* Distributions are once again installed as zipped eggs by default, per the
  rationale given in `the seminal bug report
  <http://bugs.python.org/setuptools/issue33>`_ indicates that the feature
  should remain and no substantial justification was given in the `Distribute
  report <https://bitbucket.org/tarek/distribute/issue/19/>`_.

Minor Changes
-------------

* The patch for `#174 <https://bitbucket.org/tarek/distribute/issue/174>`_
  has been rolled-back, as the comment on the ticket indicates that the patch
  addressed a symptom and not the fundamental issue.
* ``easy_install`` (the command) once again honors setup.cfg if found in the
  current directory. The "mis-behavior" characterized in `#99
  <https://bitbucket.org/tarek/distribute/issue/99>`_ is actually intended
  behavior, and no substantial rationale was given for the deviation.
doc/alt-python34-setuptools/docs/_templates/indexsidebar.html000064400000000467150404236440020423 0ustar00<h3>Download</h3>

<p>Current version: <b>{{ version }}</b></p>
<p>Get Setuptools from the <a href="https://pypi.python.org/pypi/setuptools"> Python Package Index</a>

<h3>Questions? Suggestions? Contributions?</h3>

<p>Visit the <a href="https://bitbucket.org/pypa/setuptools">Setuptools project page</a> </p>
doc/alt-python34-setuptools/docs/using.txt000064400000000517150404236440014621 0ustar00================================
Using Setuptools in your project
================================

To use Setuptools in your project, the recommended way is to ship
`ez_setup.py` alongside your `setup.py` script and call
it at the very beginning of `setup.py` like this::

    from ez_setup import use_setuptools
    use_setuptools()
doc/alt-python34-setuptools/docs/index.txt000064400000001040150404236440014573 0ustar00Welcome to Setuptools' documentation!
=====================================

Setuptools is a fully-featured, actively-maintained, and stable library
designed to facilitate packaging Python projects, where packaging includes:

 - Python package and module definitions
 - Distribution package metadata
 - Test hooks
 - Project installation
 - Platform-specific details
 - Python 3 support

Documentation content:

.. toctree::
   :maxdepth: 2

   roadmap
   python3
   using
   setuptools
   easy_install
   pkg_resources
   development
   merge
doc/alt-python34-setuptools/docs/merge-faq.txt000064400000016133150404236440015341 0ustar00Setuptools/Distribute Merge FAQ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How do I upgrade from Distribute?
=================================

Distribute specifically prohibits installation of Setuptools 0.7 from Distribute 0.6. There are then two options for upgrading.

Note that after upgrading using either technique, the only option to downgrade to either version is to completely uninstall Distribute and Setuptools 0.7 versions before reinstalling an 0.6 release.

Use Distribute 0.7
------------------

The PYPA has put together a compatibility wrapper, a new release of Distribute version 0.7. This package will install over Distribute 0.6.x installations and will replace Distribute with a simple wrapper that requires Setuptools 0.7 or later. This technique is experimental, but initial results indicate this technique is the easiest upgrade path.


Uninstall
---------

First, completely uninstall Distribute. Since Distribute does not have an automated installation routine, this process is manual. Follow the instructions in the README for uninstalling.


How do I upgrade from Setuptools 0.6?
=====================================

There are no special instructions for upgrading over older versions of Setuptools. Simply use `easy_install -U` or run the latest `ez_setup.py`.

Where does the merge occur?
========================================================

The merge is occurring between the heads of the default branch of Distribute and the setuptools-0.6 branch of Setuptools. The Setuptools SVN repo has been converted to a Mercurial repo hosted on Bitbucket. The work is still underway, so the exact changesets included may change, although the anticipated merge targets are Setuptools at 0.6c12 and Distribute at 0.6.35.

What happens to other branches?
========================================================

Distribute 0.7 was abandoned long ago and won't be included in the resulting code tree, but may be retained for posterity in the original repo.

Setuptools default branch (also 0.7 development) may also be abandoned or may be incorporated into the new merged line if desirable (and as resources allow).

What history is lost/changed?
========================================================

As setuptools was not on Mercurial when the fork occurred and as Distribute did not include the full setuptools history (prior to the creation of the setuptools-0.6 branch), the two source trees were not compatible. In order to most effectively communicate the code history, the Distribute code was grafted onto the (originally private) setuptools Mercurial repo. Although this grafting maintained the full code history with names, dates, and changes, it did lose the original hashes of those changes. Therefore, references to changes by hash (including tags) are lost.

Additionally, any heads that were not actively merged into the Distribute 0.6.35 release were also omitted. As a result, the changesets included in the merge repo are those from the original setuptools repo and all changesets ancestral to the Distribute 0.6.35 release.

What features will be in the merged code base?
========================================================

In general, all "features" added in distribute will be included in setuptools. Where there exist conflicts or undesirable features, we will be explicit about what these limitations are. Changes that are  backward-incompatible from setuptools 0.6 to distribute will likely be  removed, and these also will be well documented.

Bootstrapping scripts (ez_setup/distribute_setup) and docs, as with  distribute, will be maintained in the repository and built as part of  the release process. Documentation and bootstrapping scripts will be  hosted at python.org, as they are with distribute now. Documentation at  telecommunity will be updated to refer or redirect to the new, merged  docs.

On  the whole, the merged setuptools should be largely compatible with the  latest releases of both setuptools and distribute and will be an easy  transition for users of either library.

Who is invited to contribute? Who is excluded?
========================================================

While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the  community, especially those most familiar with Python packaging and its challenges to join us in the effort.

We have lots of  ideas for how we'd like to improve the codebase, release process,  everything.  Like distribute, the post-merge setuptools will have its  source hosted on bitbucket.  (So if you're currently a distribute  contributor, about the only thing that's going to change is the URL of  the repository you follow.)  Also like distribute, it'll support Python  3, and hopefully we'll soon merge Vinay Sajip's patches to make it run  on Python 3 without needing 2to3 to be run on the code first.

While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort.

Why Setuptools and not Distribute or another name?
========================================================

We do, however,  understand that this announcement might be unsettling for some.  The  setuptools name has been subjected to a lot of deprecation in recent  years, so the idea that it will now be the preferred name instead of distribute might be somewhat difficult or disorienting for some.   We considered use of another name (Distribute or an entirely new name),  but that would serve to only complicate matters further. Instead, our goal is to simplify the packaging landscape but without losing any hard-won advancements.  We hope  that the people who worked to spread the first message will be equally  enthusiastic about spreading the new one, and we especially look forward to seeing the new posters and slogans celebrating setuptools.

What is the timeframe of release?
========================================================

There are no hard timeframes for any of this effort, although progress is underway and a draft merge is underway and being tested privately.   As an unfunded volunteer effort, our time to put in on it is limited,  and we've both had some recent health and other challenges that have  made working on this difficult, which in part explains why we haven't met our original deadline of a completed merge before PyCon.

The final Setuptools 0.7 was cut on June 1, 2013 and will be released to PyPI shortly thereafter.

What version number can I expect for the new release?
========================================================

The new release will roughly follow the previous trend for setuptools and release the new release as 0.7. This number is somewhat arbitrary, but we wanted something other than 0.6 to distinguish it from its ancestor forks but not 1.0 to avoid putting too much emphasis on the release itself and to focus on merging the functionality. In the future, the project will likely adopt a versioning scheme similar to semver to convey semantic meaning about the release in the version number.
doc/alt-python34-setuptools/docs/setuptools.txt000064400000371551150404236440015726 0ustar00==================================================
Building and Distributing Packages with Setuptools
==================================================

``Setuptools`` is a collection of enhancements to the Python ``distutils``
(for Python 2.6 and up) that allow developers to more easily build and
distribute Python packages, especially ones that have dependencies on other
packages.

Packages built and distributed using ``setuptools`` look to the user like
ordinary Python packages based on the ``distutils``.  Your users don't need to
install or even know about setuptools in order to use them, and you don't
have to include the entire setuptools package in your distributions.  By
including just a single `bootstrap module`_ (a 12K .py file), your package will
automatically download and install ``setuptools`` if the user is building your
package from source and doesn't have a suitable version already installed.

.. _bootstrap module: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

Feature Highlights:

* Automatically find/download/install/upgrade dependencies at build time using
  the `EasyInstall tool <easy_install.html>`_,
  which supports downloading via HTTP, FTP, Subversion, and SourceForge, and
  automatically scans web pages linked from PyPI to find download links.  (It's
  the closest thing to CPAN currently available for Python.)

* Create `Python Eggs <http://peak.telecommunity.com/DevCenter/PythonEggs>`_ -
  a single-file importable distribution format

* Enhanced support for accessing data files hosted in zipped packages.

* Automatically include all packages in your source tree, without listing them
  individually in setup.py

* Automatically include all relevant files in your source distributions,
  without needing to create a ``MANIFEST.in`` file, and without having to force
  regeneration of the ``MANIFEST`` file when your source tree changes.

* Automatically generate wrapper scripts or Windows (console and GUI) .exe
  files for any number of "main" functions in your project.  (Note: this is not
  a py2exe replacement; the .exe files rely on the local Python installation.)

* Transparent Pyrex support, so that your setup.py can list ``.pyx`` files and
  still work even when the end-user doesn't have Pyrex installed (as long as
  you include the Pyrex-generated C in your source distribution)

* Command aliases - create project-specific, per-user, or site-wide shortcut
  names for commonly used commands and options

* PyPI upload support - upload your source distributions and eggs to PyPI

* Deploy your project in "development mode", such that it's available on
  ``sys.path``, yet can still be edited directly from its source checkout.

* Easily extend the distutils with new commands or ``setup()`` arguments, and
  distribute/reuse your extensions for multiple projects, without copying code.

* Create extensible applications and frameworks that automatically discover
  extensions, using simple "entry points" declared in a project's setup script.

In addition to the PyPI downloads, the development version of ``setuptools``
is available from the `Python SVN sandbox`_, and in-development versions of the
`0.6 branch`_ are available as well.

.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06

.. _Python SVN sandbox: http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev

.. contents:: **Table of Contents**

.. _ez_setup.py: `bootstrap module`_


-----------------
Developer's Guide
-----------------


Installing ``setuptools``
=========================

Please follow the `EasyInstall Installation Instructions`_ to install the
current stable version of setuptools.  In particular, be sure to read the
section on `Custom Installation Locations`_ if you are installing anywhere
other than Python's ``site-packages`` directory.

.. _EasyInstall Installation Instructions: easy_install.html#installation-instructions

.. _Custom Installation Locations: easy_install.html#custom-installation-locations

If you want the current in-development version of setuptools, you should first
install a stable version, and then run::

    ez_setup.py setuptools==dev

This will download and install the latest development (i.e. unstable) version
of setuptools from the Python Subversion sandbox.


Basic Use
=========

For basic use of setuptools, just import things from setuptools instead of
the distutils.  Here's a minimal setup script using setuptools::

    from setuptools import setup, find_packages
    setup(
        name = "HelloWorld",
        version = "0.1",
        packages = find_packages(),
    )

As you can see, it doesn't take much to use setuptools in a project.
Just by doing the above, this project will be able to produce eggs, upload to
PyPI, and automatically include all packages in the directory where the
setup.py lives.  See the `Command Reference`_ section below to see what
commands you can give to this setup script.

Of course, before you release your project to PyPI, you'll want to add a bit
more information to your setup script to help people find or learn about your
project.  And maybe your project will have grown by then to include a few
dependencies, and perhaps some data files and scripts::

    from setuptools import setup, find_packages
    setup(
        name = "HelloWorld",
        version = "0.1",
        packages = find_packages(),
        scripts = ['say_hello.py'],

        # Project uses reStructuredText, so ensure that the docutils get
        # installed or upgraded on the target machine
        install_requires = ['docutils>=0.3'],

        package_data = {
            # If any package contains *.txt or *.rst files, include them:
            '': ['*.txt', '*.rst'],
            # And include any *.msg files found in the 'hello' package, too:
            'hello': ['*.msg'],
        },

        # metadata for upload to PyPI
        author = "Me",
        author_email = "me@example.com",
        description = "This is an Example Package",
        license = "PSF",
        keywords = "hello world example examples",
        url = "http://example.com/HelloWorld/",   # project home page, if any

        # could also include long_description, download_url, classifiers, etc.
    )

In the sections that follow, we'll explain what most of these ``setup()``
arguments do (except for the metadata ones), and the various ways you might use
them in your own project(s).


Specifying Your Project's Version
---------------------------------

Setuptools can work well with most versioning schemes; there are, however, a
few special things to watch out for, in order to ensure that setuptools and
EasyInstall can always tell what version of your package is newer than another
version.  Knowing these things will also help you correctly specify what
versions of other projects your project depends on.

A version consists of an alternating series of release numbers and pre-release
or post-release tags.  A release number is a series of digits punctuated by
dots, such as ``2.4`` or ``0.5``.  Each series of digits is treated
numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the
same release number, denoting the first subrelease of release 2.  But  ``2.10``
is the *tenth* subrelease of release 2, and so is a different and newer release
from ``2.1`` or ``2.1.0``.  Leading zeros within a series of digits are also
ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``.

Following a release number, you can have either a pre-release or post-release
tag.  Pre-release tags make a version be considered *older* than the version
they are appended to.  So, revision ``2.4`` is *newer* than revision ``2.4c1``,
which in turn is newer than ``2.4b1`` or ``2.4a1``.  Postrelease tags make
a version be considered *newer* than the version they are appended to.  So,
revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older*
than ``2.4.1`` (which has a higher release number).

A pre-release tag is a series of letters that are alphabetically before
"final".  Some examples of prerelease tags would include ``alpha``, ``beta``,
``a``, ``c``, ``dev``, and so on.  You do not have to place a dot or dash
before the prerelease tag if it's immediately after a number, but it's okay to
do so if you prefer.  Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all
represent release candidate 1 of version ``2.4``, and are treated as identical
by setuptools.

In addition, there are three special prerelease tags that are treated as if
they were the letter ``c``: ``pre``, ``preview``, and ``rc``.  So, version
``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as
``2.4c1``, and are treated as identical by setuptools.

A post-release tag is either a series of letters that are alphabetically
greater than or equal to "final", or a dash (``-``).  Post-release tags are
generally used to separate patch numbers, port numbers, build numbers, revision
numbers, or date stamps from the release number.  For example, the version
``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of
version ``2.4``.  Or you might use ``2.4-20051127`` to denote a date-stamped
post-release.

Notice that after each pre or post-release tag, you are free to place another
release number, followed again by more pre- or post-release tags.  For example,
``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in-
development version of the ninth alpha of release 0.6.  Notice that ``dev`` is
a pre-release tag, so this version is a *lower* version number than ``0.6a9``,
which would be the actual ninth alpha of release 0.6.  But the ``-r41475`` is
a post-release tag, so this version is *newer* than ``0.6a9.dev``.

For the most part, setuptools' interpretation of version numbers is intuitive,
but here are a few tips that will keep you out of trouble in the corner cases:

* Don't stick adjoining pre-release tags together without a dot or number
  between them.  Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``,
  *not* a development pre-release of ``1.9a``.  Use ``.dev`` instead, as in
  ``1.9a.dev``, or separate the prerelease tags with a number, as in
  ``1.9a0dev``.  ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are
  identical versions from setuptools' point of view, so you can use whatever
  scheme you prefer.

* If you want to be certain that your chosen numbering scheme works the way
  you think it will, you can use the ``pkg_resources.parse_version()`` function
  to compare different version numbers::

    >>> from pkg_resources import parse_version
    >>> parse_version('1.9.a.dev') == parse_version('1.9a0dev')
    True
    >>> parse_version('2.1-rc2') < parse_version('2.1')
    True
    >>> parse_version('0.6a9dev-r41475') < parse_version('0.6a9')
    True

Once you've decided on a version numbering scheme for your project, you can
have setuptools automatically tag your in-development releases with various
pre- or post-release tags.  See the following sections for more details:

* `Tagging and "Daily Build" or "Snapshot" Releases`_
* `Managing "Continuous Releases" Using Subversion`_
* The `egg_info`_ command


New and Changed ``setup()`` Keywords
====================================

The following keyword arguments to ``setup()`` are added or changed by
``setuptools``.  All of them are optional; you do not have to supply them
unless you need the associated ``setuptools`` feature.

``include_package_data``
    If set to ``True``, this tells ``setuptools`` to automatically include any
    data files it finds inside your package directories, that are either under
    CVS or Subversion control, or which are specified by your ``MANIFEST.in``
    file.  For more information, see the section below on `Including Data
    Files`_.

``exclude_package_data``
    A dictionary mapping package names to lists of glob patterns that should
    be *excluded* from your package directories.  You can use this to trim back
    any excess files included by ``include_package_data``.  For a complete
    description and examples, see the section below on `Including Data Files`_.

``package_data``
    A dictionary mapping package names to lists of glob patterns.  For a
    complete description and examples, see the section below on `Including
    Data Files`_.  You do not need to use this option if you are using
    ``include_package_data``, unless you need to add e.g. files that are
    generated by your setup script and build process.  (And are therefore not
    in source control or are files that you don't want to include in your
    source distribution.)

``zip_safe``
    A boolean (True or False) flag specifying whether the project can be
    safely installed and run from a zip file.  If this argument is not
    supplied, the ``bdist_egg`` command will have to analyze all of your
    project's contents for possible problems each time it buids an egg.

``install_requires``
    A string or list of strings specifying what other distributions need to
    be installed when this one is.  See the section below on `Declaring
    Dependencies`_ for details and examples of the format of this argument.

``entry_points``
    A dictionary mapping entry point group names to strings or lists of strings
    defining the entry points.  Entry points are used to support dynamic
    discovery of services or plugins provided by a project.  See `Dynamic
    Discovery of Services and Plugins`_ for details and examples of the format
    of this argument.  In addition, this keyword is used to support `Automatic
    Script Creation`_.

``extras_require``
    A dictionary mapping names of "extras" (optional features of your project)
    to strings or lists of strings specifying what other distributions must be
    installed to support those features.  See the section below on `Declaring
    Dependencies`_ for details and examples of the format of this argument.

``setup_requires``
    A string or list of strings specifying what other distributions need to
    be present in order for the *setup script* to run.  ``setuptools`` will
    attempt to obtain these (even going so far as to download them using
    ``EasyInstall``) before processing the rest of the setup script or commands.
    This argument is needed if you are using distutils extensions as part of
    your build process; for example, extensions that process setup() arguments
    and turn them into EGG-INFO metadata files.

    (Note: projects listed in ``setup_requires`` will NOT be automatically
    installed on the system where the setup script is being run.  They are
    simply downloaded to the setup directory if they're not locally available
    already.  If you want them to be installed, as well as being available
    when the setup script is run, you should add them to ``install_requires``
    **and** ``setup_requires``.)

``dependency_links``
    A list of strings naming URLs to be searched when satisfying dependencies.
    These links will be used if needed to install packages specified by
    ``setup_requires`` or ``tests_require``.  They will also be written into
    the egg's metadata for use by tools like EasyInstall to use when installing
    an ``.egg`` file.

``namespace_packages``
    A list of strings naming the project's "namespace packages".  A namespace
    package is a package that may be split across multiple project
    distributions.  For example, Zope 3's ``zope`` package is a namespace
    package, because subpackages like ``zope.interface`` and ``zope.publisher``
    may be distributed separately.  The egg runtime system can automatically
    merge such subpackages into a single parent package at runtime, as long
    as you declare them in each project that contains any subpackages of the
    namespace package, and as long as the namespace package's ``__init__.py``
    does not contain any code other than a namespace declaration.  See the
    section below on `Namespace Packages`_ for more information.

``test_suite``
    A string naming a ``unittest.TestCase`` subclass (or a package or module
    containing one or more of them, or a method of such a subclass), or naming
    a function that can be called with no arguments and returns a
    ``unittest.TestSuite``.  If the named suite is a module, and the module
    has an ``additional_tests()`` function, it is called and the results are
    added to the tests to be run.  If the named suite is a package, any
    submodules and subpackages are recursively added to the overall test suite.

    Specifying this argument enables use of the `test`_ command to run the
    specified test suite, e.g. via ``setup.py test``.  See the section on the
    `test`_ command below for more details.

``tests_require``
    If your project's tests need one or more additional packages besides those
    needed to install it, you can use this option to specify them.  It should
    be a string or list of strings specifying what other distributions need to
    be present for the package's tests to run.  When you run the ``test``
    command, ``setuptools`` will  attempt to obtain these (even going
    so far as to download them using ``EasyInstall``).  Note that these
    required projects will *not* be installed on the system where the tests
    are run, but only downloaded to the project's setup directory if they're
    not already installed locally.

.. _test_loader:

``test_loader``
    If you would like to use a different way of finding tests to run than what
    setuptools normally uses, you can specify a module name and class name in
    this argument.  The named class must be instantiable with no arguments, and
    its instances must support the ``loadTestsFromNames()`` method as defined
    in the Python ``unittest`` module's ``TestLoader`` class.  Setuptools will
    pass only one test "name" in the `names` argument: the value supplied for
    the ``test_suite`` argument.  The loader you specify may interpret this
    string in any way it likes, as there are no restrictions on what may be
    contained in a ``test_suite`` string.

    The module name and class name must be separated by a ``:``.  The default
    value of this argument is ``"setuptools.command.test:ScanningLoader"``.  If
    you want to use the default ``unittest`` behavior, you can specify
    ``"unittest:TestLoader"`` as your ``test_loader`` argument instead.  This
    will prevent automatic scanning of submodules and subpackages.

    The module and class you specify here may be contained in another package,
    as long as you use the ``tests_require`` option to ensure that the package
    containing the loader class is available when the ``test`` command is run.

``eager_resources``
    A list of strings naming resources that should be extracted together, if
    any of them is needed, or if any C extensions included in the project are
    imported.  This argument is only useful if the project will be installed as
    a zipfile, and there is a need to have all of the listed resources be
    extracted to the filesystem *as a unit*.  Resources listed here
    should be '/'-separated paths, relative to the source root, so to list a
    resource ``foo.png`` in package ``bar.baz``, you would include the string
    ``bar/baz/foo.png`` in this argument.

    If you only need to obtain resources one at a time, or you don't have any C
    extensions that access other files in the project (such as data files or
    shared libraries), you probably do NOT need this argument and shouldn't
    mess with it.  For more details on how this argument works, see the section
    below on `Automatic Resource Extraction`_.

``use_2to3``
    Convert the source code from Python 2 to Python 3 with 2to3 during the
    build process. See :doc:`python3` for more details.

``convert_2to3_doctests``
    List of doctest source files that need to be converted with 2to3.
    See :doc:`python3` for more details.

``use_2to3_fixers``
    A list of modules to search for additional fixers to be used during
    the 2to3 conversion. See :doc:`python3` for more details.


Using ``find_packages()``
-------------------------

For simple projects, it's usually easy enough to manually add packages to
the ``packages`` argument of ``setup()``.  However, for very large projects
(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the
package list updated.  That's what ``setuptools.find_packages()`` is for.

``find_packages()`` takes a source directory, and a list of package names or
patterns to exclude.  If omitted, the source directory defaults to the same
directory as the setup script.  Some projects use a ``src`` or ``lib``
directory as the root of their source tree, and those projects would of course
use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``.  (And
such projects also need something like ``package_dir = {'':'src'}`` in their
``setup()`` arguments, but that's just a normal distutils thing.)

Anyway, ``find_packages()`` walks the target directory, and finds Python
packages by looking for ``__init__.py`` files.  It then filters the list of
packages using the exclusion patterns.

Exclusion patterns are package names, optionally including wildcards.  For
example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose
last name part is ``tests``.   Or, ``find_packages(exclude=["*.tests",
"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``,
but it still won't exclude a top-level ``tests`` package or the children
thereof.  In fact, if you really want no ``tests`` packages at all, you'll need
something like this::

    find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])

in order to cover all the bases.  Really, the exclusion patterns are intended
to cover simpler use cases than this, like excluding a single, specified
package and its subpackages.

Regardless of the target directory or exclusions, the ``find_packages()``
function returns a list of package names suitable for use as the ``packages``
argument to ``setup()``, and so is usually the easiest way to set that
argument in your setup script.  Especially since it frees you from having to
remember to modify your setup script whenever your project grows additional
top-level packages or subpackages.


Automatic Script Creation
=========================

Packaging and installing scripts can be a bit awkward with the distutils.  For
one thing, there's no easy way to have a script's filename match local
conventions on both Windows and POSIX platforms.  For another, you often have
to create a separate file just for the "main" script, when your actual "main"
is a function in a module somewhere.  And even in Python 2.4, using the ``-m``
option only works for actual ``.py`` files that aren't installed in a package.

``setuptools`` fixes all of these problems by automatically generating scripts
for you with the correct extension, and on Windows it will even create an
``.exe`` file so that users don't have to change their ``PATHEXT`` settings.
The way to use this feature is to define "entry points" in your setup script
that indicate what function the generated script should import and run.  For
example, to create two console scripts called ``foo`` and ``bar``, and a GUI
script called ``baz``, you might do something like this::

    setup(
        # other arguments here...
        entry_points = {
            'console_scripts': [
                'foo = my_package.some_module:main_func',
                'bar = other_module:some_func',
            ],
            'gui_scripts': [
                'baz = my_package_gui.start_func',
            ]
        }
    )

When this project is installed on non-Windows platforms (using "setup.py
install", "setup.py develop", or by using EasyInstall), a set of ``foo``,
``bar``, and ``baz`` scripts will be installed that import ``main_func`` and
``some_func`` from the specified modules.  The functions you specify are called
with no arguments, and their return value is passed to ``sys.exit()``, so you
can return an errorlevel or message to print to stderr.

On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are
created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files.  The
``.exe`` wrappers find and execute the right version of Python to run the
``.py`` or ``.pyw`` file.

You may define as many "console script" and "gui script" entry points as you
like, and each one can optionally specify "extras" that it depends on, that
will be added to ``sys.path`` when the script is run.  For more information on
"extras", see the section below on `Declaring Extras`_.  For more information
on "entry points" in general, see the section below on `Dynamic Discovery of
Services and Plugins`_.


"Eggsecutable" Scripts
----------------------

Occasionally, there are situations where it's desirable to make an ``.egg``
file directly executable.  You can do this by including an entry point such
as the following::

    setup(
        # other arguments here...
        entry_points = {
            'setuptools.installation': [
                'eggsecutable = my_package.some_module:main_func',
            ]
        }
    )

Any eggs built from the above setup script will include a short excecutable
prelude that imports and calls ``main_func()`` from ``my_package.some_module``.
The prelude can be run on Unix-like platforms (including Mac and Linux) by
invoking the egg with ``/bin/sh``, or by enabling execute permissions on the
``.egg`` file.  For the executable prelude to run, the appropriate version of
Python must be available via the ``PATH`` environment variable, under its
"long" name.  That is, if the egg is built for Python 2.3, there must be a
``python2.3`` executable present in a directory on ``PATH``.

This feature is primarily intended to support ez_setup the installation of
setuptools itself on non-Windows platforms, but may also be useful for other
projects as well.

IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or
invoked via symlinks.  They *must* be invoked using their original filename, in
order to ensure that, once running, ``pkg_resources`` will know what project
and version is in use.  The header script will check this and exit with an
error if the ``.egg`` file has been renamed or is invoked via a symlink that
changes its base name.


Declaring Dependencies
======================

``setuptools`` supports automatically installing dependencies when a package is
installed, and including information about dependencies in Python Eggs (so that
package management tools like EasyInstall can use the information).

``setuptools`` and ``pkg_resources`` use a common syntax for specifying a
project's required dependencies.  This syntax consists of a project's PyPI
name, optionally followed by a comma-separated list of "extras" in square
brackets, optionally followed by a comma-separated list of version
specifiers.  A version specifier is one of the operators ``<``, ``>``, ``<=``,
``>=``, ``==`` or ``!=``, followed by a version identifier.  Tokens may be
separated by whitespace, but any whitespace or nonstandard characters within a
project name or version identifier must be replaced with ``-``.

Version specifiers for a given project are internally sorted into ascending
version order, and used to establish what ranges of versions are acceptable.
Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes
``">1"``, and ``"<2,<3"`` becomes ``"<3"``). ``"!="`` versions are excised from
the ranges they fall within.  A project's version is then checked for
membership in the resulting ranges. (Note that providing conflicting conditions
for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may
therefore produce bizarre results.)

Here are some example requirement specifiers::

    docutils >= 0.3

    # comment lines and \ continuations are allowed in requirement strings
    BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \
        ==1.6, ==1.7  # and so are line-end comments

    PEAK[FastCGI, reST]>=0.5a4

    setuptools==0.5a7

The simplest way to include requirement specifiers is to use the
``install_requires`` argument to ``setup()``.  It takes a string or list of
strings containing requirement specifiers.  If you include more than one
requirement in a string, each requirement must begin on a new line.

This has three effects:

1. When your project is installed, either by using EasyInstall, ``setup.py
   install``, or ``setup.py develop``, all of the dependencies not already
   installed will be located (via PyPI), downloaded, built (if necessary),
   and installed.

2. Any scripts in your project will be installed with wrappers that verify
   the availability of the specified dependencies at runtime, and ensure that
   the correct versions are added to ``sys.path`` (e.g. if multiple versions
   have been installed).

3. Python Egg distributions will include a metadata file listing the
   dependencies.

Note, by the way, that if you declare your dependencies in ``setup.py``, you do
*not* need to use the ``require()`` function in your scripts or modules, as
long as you either install the project or use ``setup.py develop`` to do
development work on it.  (See `"Development Mode"`_ below for more details on
using ``setup.py develop``.)


Dependencies that aren't in PyPI
--------------------------------

If your project depends on packages that aren't registered in PyPI, you may
still be able to depend on them, as long as they are available for download
as:

- an egg, in the standard distutils ``sdist`` format,
- a single ``.py`` file, or
- a VCS repository (Subversion, Mercurial, or Git).

You just need to add some URLs to the ``dependency_links`` argument to
``setup()``.

The URLs must be either:

1. direct download URLs,
2. the URLs of web pages that contain direct download links, or
3. the repository's URL

In general, it's better to link to web pages, because it is usually less
complex to update a web page than to release a new version of your project.
You can also use a SourceForge ``showfiles.php`` link in the case where a
package you depend on is distributed via SourceForge.

If you depend on a package that's distributed as a single ``.py`` file, you
must include an ``"#egg=project-version"`` suffix to the URL, to give a project
name and version number.  (Be sure to escape any dashes in the name or version
by replacing them with underscores.)  EasyInstall will recognize this suffix
and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file
as an egg.

In the case of a VCS checkout, you should also append ``#egg=project-version``
in order to identify for what package that checkout should be used. You can
append ``@REV`` to the URL's path (before the fragment) to specify a revision.
Additionally, you can also force the VCS being used by prepending the URL with
a certain prefix. Currently available are:

-  ``svn+URL`` for Subversion,
-  ``git+URL`` for Git, and
-  ``hg+URL`` for Mercurial

A more complete example would be:

    ``vcs+proto://host/path@revision#egg=project-version``

Be careful with the version. It should match the one inside the project files.
If you want to disregard the version, you have to omit it both in the
``requires`` and in the URL's fragment.

This will do a checkout (or a clone, in Git and Mercurial parlance) to a
temporary folder and run ``setup.py bdist_egg``.

The ``dependency_links`` option takes the form of a list of URL strings.  For
example, the below will cause EasyInstall to search the specified page for
eggs or source distributions, if the package's dependencies aren't already
installed::

    setup(
        ...
        dependency_links = [
            "http://peak.telecommunity.com/snapshots/"
        ],
    )


.. _Declaring Extras:


Declaring "Extras" (optional features with their own dependencies)
------------------------------------------------------------------

Sometimes a project has "recommended" dependencies, that are not required for
all uses of the project.  For example, a project might offer optional PDF
output if ReportLab is installed, and reStructuredText support if docutils is
installed.  These optional features are called "extras", and setuptools allows
you to define their requirements as well.  In this way, other projects that
require these optional features can force the additional requirements to be
installed, by naming the desired extras in their ``install_requires``.

For example, let's say that Project A offers optional PDF and reST support::

    setup(
        name="Project-A",
        ...
        extras_require = {
            'PDF':  ["ReportLab>=1.2", "RXP"],
            'reST': ["docutils>=0.3"],
        }
    )

As you can see, the ``extras_require`` argument takes a dictionary mapping
names of "extra" features, to strings or lists of strings describing those
features' requirements.  These requirements will *not* be automatically
installed unless another package depends on them (directly or indirectly) by
including the desired "extras" in square brackets after the associated project
name.  (Or if the extras were listed in a requirement spec on the EasyInstall
command line.)

Extras can be used by a project's `entry points`_ to specify dynamic
dependencies.  For example, if Project A includes a "rst2pdf" script, it might
declare it like this, so that the "PDF" requirements are only resolved if the
"rst2pdf" script is run::

    setup(
        name="Project-A",
        ...
        entry_points = {
            'console_scripts': [
                'rst2pdf = project_a.tools.pdfgen [PDF]',
                'rst2html = project_a.tools.htmlgen',
                # more script entry points ...
            ],
        }
    )

Projects can also use another project's extras when specifying dependencies.
For example, if project B needs "project A" with PDF support installed, it
might declare the dependency like this::

    setup(
        name="Project-B",
        install_requires = ["Project-A[PDF]"],
        ...
    )

This will cause ReportLab to be installed along with project A, if project B is
installed -- even if project A was already installed.  In this way, a project
can encapsulate groups of optional "downstream dependencies" under a feature
name, so that packages that depend on it don't have to know what the downstream
dependencies are.  If a later version of Project A builds in PDF support and
no longer needs ReportLab, or if it ends up needing other dependencies besides
ReportLab in order to provide PDF support, Project B's setup information does
not need to change, but the right packages will still be installed if needed.

Note, by the way, that if a project ends up not needing any other packages to
support a feature, it should keep an empty requirements list for that feature
in its ``extras_require`` argument, so that packages depending on that feature
don't break (due to an invalid feature name).  For example, if Project A above
builds in PDF support and no longer needs ReportLab, it could change its
setup to this::

    setup(
        name="Project-A",
        ...
        extras_require = {
            'PDF':  [],
            'reST': ["docutils>=0.3"],
        }
    )

so that Package B doesn't have to remove the ``[PDF]`` from its requirement
specifier.


Including Data Files
====================

The distutils have traditionally allowed installation of "data files", which
are placed in a platform-specific location.  However, the most common use case
for data files distributed with a package is for use *by* the package, usually
by including the data files in the package directory.

Setuptools offers three ways to specify data files to be included in your
packages.  First, you can simply use the ``include_package_data`` keyword,
e.g.::

    from setuptools import setup, find_packages
    setup(
        ...
        include_package_data = True
    )

This tells setuptools to install any data files it finds in your packages.
The data files must be under CVS or Subversion control, or else they must be
specified via the distutils' ``MANIFEST.in`` file.  (They can also be tracked
by another revision control system, using an appropriate plugin.  See the
section below on `Adding Support for Other Revision Control Systems`_ for
information on how to write such plugins.)

If the data files are not under version control, or are not in a supported
version control system, or if you want finer-grained control over what files
are included (for example, if you have documentation files in your package
directories and want to exclude them from installation), then you can also use
the ``package_data`` keyword, e.g.::

    from setuptools import setup, find_packages
    setup(
        ...
        package_data = {
            # If any package contains *.txt or *.rst files, include them:
            '': ['*.txt', '*.rst'],
            # And include any *.msg files found in the 'hello' package, too:
            'hello': ['*.msg'],
        }
    )

The ``package_data`` argument is a dictionary that maps from package names to
lists of glob patterns.  The globs may include subdirectory names, if the data
files are contained in a subdirectory of the package.  For example, if the
package tree looks like this::

    setup.py
    src/
        mypkg/
            __init__.py
            mypkg.txt
            data/
                somefile.dat
                otherdata.dat

The setuptools setup file might look like this::

    from setuptools import setup, find_packages
    setup(
        ...
        packages = find_packages('src'),  # include all packages under src
        package_dir = {'':'src'},   # tell distutils packages are under src

        package_data = {
            # If any package contains *.txt files, include them:
            '': ['*.txt'],
            # And include any *.dat files found in the 'data' subdirectory
            # of the 'mypkg' package, also:
            'mypkg': ['data/*.dat'],
        }
    )

Notice that if you list patterns in ``package_data`` under the empty string,
these patterns are used to find files in every package, even ones that also
have their own patterns listed.  Thus, in the above example, the ``mypkg.txt``
file gets included even though it's not listed in the patterns for ``mypkg``.

Also notice that if you use paths, you *must* use a forward slash (``/``) as
the path separator, even if you are on Windows.  Setuptools automatically
converts slashes to appropriate platform-specific separators at build time.

(Note: although the ``package_data`` argument was previously only available in
``setuptools``, it was also added to the Python ``distutils`` package as of
Python 2.4; there is `some documentation for the feature`__ available on the
python.org website.  If using the setuptools-specific ``include_package_data``
argument, files specified by ``package_data`` will *not* be automatically
added to the manifest unless they are tracked by a supported version control
system, or are listed in the MANIFEST.in file.)

__ http://docs.python.org/dist/node11.html

Sometimes, the ``include_package_data`` or ``package_data`` options alone
aren't sufficient to precisely define what files you want included.  For
example, you may want to include package README files in your revision control
system and source distributions, but exclude them from being installed.  So,
setuptools offers an ``exclude_package_data`` option as well, that allows you
to do things like this::

    from setuptools import setup, find_packages
    setup(
        ...
        packages = find_packages('src'),  # include all packages under src
        package_dir = {'':'src'},   # tell distutils packages are under src

        include_package_data = True,    # include everything in source control

        # ...but exclude README.txt from all packages
        exclude_package_data = { '': ['README.txt'] },
    )

The ``exclude_package_data`` option is a dictionary mapping package names to
lists of wildcard patterns, just like the ``package_data`` option.  And, just
as with that option, a key of ``''`` will apply the given pattern(s) to all
packages.  However, any files that match these patterns will be *excluded*
from installation, even if they were listed in ``package_data`` or were
included as a result of using ``include_package_data``.

In summary, the three options allow you to:

``include_package_data``
    Accept all data files and directories matched by ``MANIFEST.in`` or found
    in source control.

``package_data``
    Specify additional patterns to match files and directories that may or may
    not be matched by ``MANIFEST.in`` or found in source control.

``exclude_package_data``
    Specify patterns for data files and directories that should *not* be
    included when a package is installed, even if they would otherwise have
    been included due to the use of the preceding options.

NOTE: Due to the way the distutils build process works, a data file that you
include in your project and then stop including may be "orphaned" in your
project's build directories, requiring you to run ``setup.py clean --all`` to
fully remove them.  This may also be important for your users and contributors
if they track intermediate revisions of your project using Subversion; be sure
to let them know when you make changes that remove files from inclusion so they
can run ``setup.py clean --all``.


Accessing Data Files at Runtime
-------------------------------

Typically, existing programs manipulate a package's ``__file__`` attribute in
order to find the location of data files.  However, this manipulation isn't
compatible with PEP 302-based import hooks, including importing from zip files
and Python Eggs.  It is strongly recommended that, if you are using data files,
you should use the `Resource Management API`_ of ``pkg_resources`` to access
them.  The ``pkg_resources`` module is distributed as part of setuptools, so if
you're using setuptools to distribute your package, there is no reason not to
use its resource management API.  See also `Accessing Package Resources`_ for
a quick example of converting code that uses ``__file__`` to use
``pkg_resources`` instead.

.. _Resource Management API: http://peak.telecommunity.com/DevCenter/PythonEggs#resource-management
.. _Accessing Package Resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources


Non-Package Data Files
----------------------

The ``distutils`` normally install general "data files" to a platform-specific
location (e.g. ``/usr/share``).  This feature intended to be used for things
like documentation, example configuration files, and the like.  ``setuptools``
does not install these data files in a separate location, however.  They are
bundled inside the egg file or directory, alongside the Python modules and
packages.  The data files can also be accessed using the `Resource Management
API`_, by specifying a ``Requirement`` instead of a package name::

    from pkg_resources import Requirement, resource_filename
    filename = resource_filename(Requirement.parse("MyProject"),"sample.conf")

The above code will obtain the filename of the "sample.conf" file in the data
root of the "MyProject" distribution.

Note, by the way, that this encapsulation of data files means that you can't
actually install data files to some arbitrary location on a user's machine;
this is a feature, not a bug.  You can always include a script in your
distribution that extracts and copies your the documentation or data files to
a user-specified location, at their discretion.  If you put related data files
in a single directory, you can use ``resource_filename()`` with the directory
name to get a filesystem directory that then can be copied with the ``shutil``
module.  (Even if your package is installed as a zipfile, calling
``resource_filename()`` on a directory will return an actual filesystem
directory, whose contents will be that entire subtree of your distribution.)

(Of course, if you're writing a new package, you can just as easily place your
data files or directories inside one of your packages, rather than using the
distutils' approach.  However, if you're updating an existing application, it
may be simpler not to change the way it currently specifies these data files.)


Automatic Resource Extraction
-----------------------------

If you are using tools that expect your resources to be "real" files, or your
project includes non-extension native libraries or other files that your C
extensions expect to be able to access, you may need to list those files in
the ``eager_resources`` argument to ``setup()``, so that the files will be
extracted together, whenever a C extension in the project is imported.

This is especially important if your project includes shared libraries *other*
than distutils-built C extensions, and those shared libraries use file
extensions other than ``.dll``, ``.so``, or ``.dylib``, which are the
extensions that setuptools 0.6a8 and higher automatically detects as shared
libraries and adds to the ``native_libs.txt`` file for you.  Any shared
libraries whose names do not end with one of those extensions should be listed
as ``eager_resources``, because they need to be present in the filesystem when
he C extensions that link to them are used.

The ``pkg_resources`` runtime for compressed packages will automatically
extract *all* C extensions and ``eager_resources`` at the same time, whenever
*any* C extension or eager resource is requested via the ``resource_filename()``
API.  (C extensions are imported using ``resource_filename()`` internally.)
This ensures that C extensions will see all of the "real" files that they
expect to see.

Note also that you can list directory resource names in ``eager_resources`` as
well, in which case the directory's contents (including subdirectories) will be
extracted whenever any C extension or eager resource is requested.

Please note that if you're not sure whether you need to use this argument, you
don't!  It's really intended to support projects with lots of non-Python
dependencies and as a last resort for crufty projects that can't otherwise
handle being compressed.  If your package is pure Python, Python plus data
files, or Python plus C, you really don't need this.  You've got to be using
either C or an external program that needs "real" files in your project before
there's any possibility of ``eager_resources`` being relevant to your project.


Extensible Applications and Frameworks
======================================


.. _Entry Points:

Dynamic Discovery of Services and Plugins
-----------------------------------------

``setuptools`` supports creating libraries that "plug in" to extensible
applications and frameworks, by letting you register "entry points" in your
project that can be imported by the application or framework.

For example, suppose that a blogging tool wants to support plugins
that provide translation for various file types to the blog's output format.
The framework might define an "entry point group" called ``blogtool.parsers``,
and then allow plugins to register entry points for the file extensions they
support.

This would allow people to create distributions that contain one or more
parsers for different file types, and then the blogging tool would be able to
find the parsers at runtime by looking up an entry point for the file
extension (or mime type, or however it wants to).

Note that if the blogging tool includes parsers for certain file formats, it
can register these as entry points in its own setup script, which means it
doesn't have to special-case its built-in formats.  They can just be treated
the same as any other plugin's entry points would be.

If you're creating a project that plugs in to an existing application or
framework, you'll need to know what entry points or entry point groups are
defined by that application or framework.  Then, you can register entry points
in your setup script.  Here are a few examples of ways you might register an
``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group,
for our hypothetical blogging tool::

    setup(
        # ...
        entry_points = {'blogtool.parsers': '.rst = some_module:SomeClass'}
    )

    setup(
        # ...
        entry_points = {'blogtool.parsers': ['.rst = some_module:a_func']}
    )

    setup(
        # ...
        entry_points = """
            [blogtool.parsers]
            .rst = some.nested.module:SomeClass.some_classmethod [reST]
        """,
        extras_require = dict(reST = "Docutils>=0.3.5")
    )

The ``entry_points`` argument to ``setup()`` accepts either a string with
``.ini``-style sections, or a dictionary mapping entry point group names to
either strings or lists of strings containing entry point specifiers.  An
entry point specifier consists of a name and value, separated by an ``=``
sign.  The value consists of a dotted module name, optionally followed by a
``:`` and a dotted identifier naming an object within the module.  It can
also include a bracketed list of "extras" that are required for the entry
point to be used.  When the invoking application or framework requests loading
of an entry point, any requirements implied by the associated extras will be
passed to ``pkg_resources.require()``, so that an appropriate error message
can be displayed if the needed package(s) are missing.  (Of course, the
invoking app or framework can ignore such errors if it wants to make an entry
point optional if a requirement isn't installed.)


Defining Additional Metadata
----------------------------

Some extensible applications and frameworks may need to define their own kinds
of metadata to include in eggs, which they can then access using the
``pkg_resources`` metadata APIs.  Ordinarily, this is done by having plugin
developers include additional files in their ``ProjectName.egg-info``
directory.  However, since it can be tedious to create such files by hand, you
may want to create a distutils extension that will create the necessary files
from arguments to ``setup()``, in much the same way that ``setuptools`` does
for many of the ``setup()`` arguments it adds.  See the section below on
`Creating distutils Extensions`_ for more details, especially the subsection on
`Adding new EGG-INFO Files`_.


"Development Mode"
==================

Under normal circumstances, the ``distutils`` assume that you are going to
build a distribution of your project, not use it in its "raw" or "unbuilt"
form.  If you were to use the ``distutils`` that way, you would have to rebuild
and reinstall your project every time you made a change to it during
development.

Another problem that sometimes comes up with the ``distutils`` is that you may
need to do development on two related projects at the same time.  You may need
to put both projects' packages in the same directory to run them, but need to
keep them separate for revision control purposes.  How can you do this?

Setuptools allows you to deploy your projects for use in a common directory or
staging area, but without copying any files.  Thus, you can edit each project's
code in its checkout directory, and only need to run build commands when you
change a project's C extensions or similarly compiled files.  You can even
deploy a project into another project's checkout directory, if that's your
preferred way of working (as opposed to using a common independent staging area
or the site-packages directory).

To do this, use the ``setup.py develop`` command.  It works very similarly to
``setup.py install`` or the EasyInstall tool, except that it doesn't actually
install anything.  Instead, it creates a special ``.egg-link`` file in the
deployment directory, that links to your project's source code.  And, if your
deployment directory is Python's ``site-packages`` directory, it will also
update the ``easy-install.pth`` file to include your project's source code,
thereby making it available on ``sys.path`` for all programs using that Python
installation.

If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link``
will not link directly to your source code when run under Python 3, since
that source code would be made for Python 2 and not work under Python 3.
Instead the ``setup.py develop`` will build Python 3 code under the ``build``
directory, and link there. This means that after doing code changes you will
have to run ``setup.py build`` before these changes are picked up by your
Python 3 installation.

In addition, the ``develop`` command creates wrapper scripts in the target
script directory that will run your in-development scripts after ensuring that
all your ``install_requires`` packages are available on ``sys.path``.

You can deploy the same project to multiple staging areas, e.g. if you have
multiple projects on the same machine that are sharing the same project you're
doing development work.

When you're done with a given development task, you can remove the project
source from a staging area using ``setup.py develop --uninstall``, specifying
the desired staging area if it's not the default.

There are several options to control the precise behavior of the ``develop``
command; see the section on the `develop`_ command below for more details.

Note that you can also apply setuptools commands to non-setuptools projects,
using commands like this::

   python -c "import setuptools; execfile('setup.py')" develop

That is, you can simply list the normal setup commands and options following
the quoted part.


Distributing a ``setuptools``-based project
===========================================

Using ``setuptools``...  Without bundling it!
---------------------------------------------

Your users might not have ``setuptools`` installed on their machines, or even
if they do, it might not be the right version.  Fixing this is easy; just
download `ez_setup.py`_, and put it in the same directory as your ``setup.py``
script.  (Be sure to add it to your revision control system, too.)  Then add
these two lines to the very top of your setup script, before the script imports
anything from setuptools:

.. code-block:: python

    import ez_setup
    ez_setup.use_setuptools()

That's it.  The ``ez_setup`` module will automatically download a matching
version of ``setuptools`` from PyPI, if it isn't present on the target system.
Whenever you install an updated version of setuptools, you should also update
your projects' ``ez_setup.py`` files, so that a matching version gets installed
on the target machine(s).

By the way, setuptools supports the new PyPI "upload" command, so you can use
``setup.py sdist upload`` or ``setup.py bdist_egg upload`` to upload your
source or egg distributions respectively.  Your project's current version must
be registered with PyPI first, of course; you can use ``setup.py register`` to
do that.  Or you can do it all in one step, e.g. ``setup.py register sdist
bdist_egg upload`` will register the package, build source and egg
distributions, and then upload them both to PyPI, where they'll be easily
found by other projects that depend on them.

(By the way, if you need to distribute a specific version of ``setuptools``,
you can specify the exact version and base download URL as parameters to the
``use_setuptools()`` function.  See the function's docstring for details.)


What Your Users Should Know
---------------------------

In general, a setuptools-based project looks just like any distutils-based
project -- as long as your users have an internet connection and are installing
to ``site-packages``, that is.  But for some users, these conditions don't
apply, and they may become frustrated if this is their first encounter with
a setuptools-based project.  To keep these users happy, you should review the
following topics in your project's installation instructions, if they are
relevant to your project and your target audience isn't already familiar with
setuptools and ``easy_install``.

Network Access
    If your project is using ``ez_setup``, you should inform users of the
    need to either have network access, or to preinstall the correct version of
    setuptools using the `EasyInstall installation instructions`_.  Those
    instructions also have tips for dealing with firewalls as well as how to
    manually download and install setuptools.

Custom Installation Locations
    You should inform your users that if they are installing your project to
    somewhere other than the main ``site-packages`` directory, they should
    first install setuptools using the instructions for `Custom Installation
    Locations`_, before installing your project.

Your Project's Dependencies
    If your project depends on other projects that may need to be downloaded
    from PyPI or elsewhere, you should list them in your installation
    instructions, or tell users how to find out what they are.  While most
    users will not need this information, any users who don't have unrestricted
    internet access may have to find, download, and install the other projects
    manually.  (Note, however, that they must still install those projects
    using ``easy_install``, or your project will not know they are installed,
    and your setup script will try to download them again.)

    If you want to be especially friendly to users with limited network access,
    you may wish to build eggs for your project and its dependencies, making
    them all available for download from your site, or at least create a page
    with links to all of the needed eggs.  In this way, users with limited
    network access can manually download all the eggs to a single directory,
    then use the ``-f`` option of ``easy_install`` to specify the directory
    to find eggs in.  Users who have full network access can just use ``-f``
    with the URL of your download page, and ``easy_install`` will find all the
    needed eggs using your links directly.  This is also useful when your
    target audience isn't able to compile packages (e.g. most Windows users)
    and your package or some of its dependencies include C code.

Subversion or CVS Users and Co-Developers
    Users and co-developers who are tracking your in-development code using
    CVS, Subversion, or some other revision control system should probably read
    this manual's sections regarding such development.  Alternately, you may
    wish to create a quick-reference guide containing the tips from this manual
    that apply to your particular situation.  For example, if you recommend
    that people use ``setup.py develop`` when tracking your in-development
    code, you should let them know that this needs to be run after every update
    or commit.

    Similarly, if you remove modules or data files from your project, you
    should remind them to run ``setup.py clean --all`` and delete any obsolete
    ``.pyc`` or ``.pyo``.  (This tip applies to the distutils in general, not
    just setuptools, but not everybody knows about them; be kind to your users
    by spelling out your project's best practices rather than leaving them
    guessing.)

Creating System Packages
    Some users want to manage all Python packages using a single package
    manager, and sometimes that package manager isn't ``easy_install``!
    Setuptools currently supports ``bdist_rpm``, ``bdist_wininst``, and
    ``bdist_dumb`` formats for system packaging.  If a user has a locally-
    installed "bdist" packaging tool that internally uses the distutils
    ``install`` command, it should be able to work with ``setuptools``.  Some
    examples of "bdist" formats that this should work with include the
    ``bdist_nsi`` and ``bdist_msi`` formats for Windows.

    However, packaging tools that build binary distributions by running
    ``setup.py install`` on the command line or as a subprocess will require
    modification to work with setuptools.  They should use the
    ``--single-version-externally-managed`` option to the ``install`` command,
    combined with the standard ``--root`` or ``--record`` options.
    See the `install command`_ documentation below for more details.  The
    ``bdist_deb`` command is an example of a command that currently requires
    this kind of patching to work with setuptools.

    If you or your users have a problem building a usable system package for
    your project, please report the problem via the mailing list so that
    either the "bdist" tool in question or setuptools can be modified to
    resolve the issue.


Setting the ``zip_safe`` flag
-----------------------------

For maximum performance, Python packages are best installed as zip files.
Not all packages, however, are capable of running in compressed form, because
they may expect to be able to access either source code or data files as
normal operating system files.  So, ``setuptools`` can install your project
as a zipfile or a directory, and its default choice is determined by the
project's ``zip_safe`` flag.

You can pass a True or False value for the ``zip_safe`` argument to the
``setup()`` function, or you can omit it.  If you omit it, the ``bdist_egg``
command will analyze your project's contents to see if it can detect any
conditions that would prevent it from working in a zipfile.  It will output
notices to the console about any such conditions that it finds.

Currently, this analysis is extremely conservative: it will consider the
project unsafe if it contains any C extensions or datafiles whatsoever.  This
does *not* mean that the project can't or won't work as a zipfile!  It just
means that the ``bdist_egg`` authors aren't yet comfortable asserting that
the project *will* work.  If the project contains no C or data files, and does
no ``__file__`` or ``__path__`` introspection or source code manipulation, then
there is an extremely solid chance the project will work when installed as a
zipfile.  (And if the project uses ``pkg_resources`` for all its data file
access, then C extensions and other data files shouldn't be a problem at all.
See the `Accessing Data Files at Runtime`_ section above for more information.)

However, if ``bdist_egg`` can't be *sure* that your package will work, but
you've checked over all the warnings it issued, and you are either satisfied it
*will* work (or if you want to try it for yourself), then you should set
``zip_safe`` to ``True`` in your ``setup()`` call.  If it turns out that it
doesn't work, you can always change it to ``False``, which will force
``setuptools`` to install your project as a directory rather than as a zipfile.

Of course, the end-user can still override either decision, if they are using
EasyInstall to install your package.  And, if you want to override for testing
purposes, you can just run ``setup.py easy_install --zip-ok .`` or ``setup.py
easy_install --always-unzip .`` in your project directory. to install the
package as a zipfile or directory, respectively.

In the future, as we gain more experience with different packages and become
more satisfied with the robustness of the ``pkg_resources`` runtime, the
"zip safety" analysis may become less conservative.  However, we strongly
recommend that you determine for yourself whether your project functions
correctly when installed as a zipfile, correct any problems if you can, and
then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe``
flag, so that it will not be necessary for ``bdist_egg`` or ``EasyInstall`` to
try to guess whether your project can work as a zipfile.


Namespace Packages
------------------

Sometimes, a large package is more useful if distributed as a collection of
smaller eggs.  However, Python does not normally allow the contents of a
package to be retrieved from more than one location.  "Namespace packages"
are a solution for this problem.  When you declare a package to be a namespace
package, it means that the package has no meaningful contents in its
``__init__.py``, and that it is merely a container for modules and subpackages.

The ``pkg_resources`` runtime will then automatically ensure that the contents
of namespace packages that are spread over multiple eggs or directories are
combined into a single "virtual" package.

The ``namespace_packages`` argument to ``setup()`` lets you declare your
project's namespace packages, so that they will be included in your project's
metadata.  The argument should list the namespace packages that the egg
participates in.  For example, the ZopeInterface project might do this::

    setup(
        # ...
        namespace_packages = ['zope']
    )

because it contains a ``zope.interface`` package that lives in the ``zope``
namespace package.  Similarly, a project for a standalone ``zope.publisher``
would also declare the ``zope`` namespace package.  When these projects are
installed and used, Python will see them both as part of a "virtual" ``zope``
package, even though they will be installed in different locations.

Namespace packages don't have to be top-level packages.  For example, Zope 3's
``zope.app`` package is a namespace package, and in the future PEAK's
``peak.util`` package will be too.

Note, by the way, that your project's source tree must include the namespace
packages' ``__init__.py`` files (and the ``__init__.py`` of any parent
packages), in a normal Python package layout.  These ``__init__.py`` files
*must* contain the line::

    __import__('pkg_resources').declare_namespace(__name__)

This code ensures that the namespace package machinery is operating and that
the current package is registered as a namespace package.

You must NOT include any other code and data in a namespace package's
``__init__.py``.  Even though it may appear to work during development, or when
projects are installed as ``.egg`` files, it will not work when the projects
are installed using "system" packaging tools -- in such cases the
``__init__.py`` files will not be installed, let alone executed.

You must include the ``declare_namespace()``  line in the ``__init__.py`` of
*every* project that has contents for the namespace package in question, in
order to ensure that the namespace will be declared regardless of which
project's copy of ``__init__.py`` is loaded first.  If the first loaded
``__init__.py`` doesn't declare it, it will never *be* declared, because no
other copies will ever be loaded!)


TRANSITIONAL NOTE
~~~~~~~~~~~~~~~~~

Setuptools automatically calls ``declare_namespace()`` for you at runtime,
but future versions may *not*.  This is because the automatic declaration
feature has some negative side effects, such as needing to import all namespace
packages during the initialization of the ``pkg_resources`` runtime, and also
the need for ``pkg_resources`` to be explicitly imported before any namespace
packages work at all.  In some future releases, you'll be responsible
for including your own declaration lines, and the automatic declaration feature
will be dropped to get rid of the negative side effects.

During the remainder of the current development cycle, therefore, setuptools
will warn you about missing ``declare_namespace()`` calls in your
``__init__.py`` files, and you should correct these as soon as possible
before the compatibility support is removed.
Namespace packages without declaration lines will not work
correctly once a user has upgraded to a later version, so it's important that
you make this change now in order to avoid having your code break in the field.
Our apologies for the inconvenience, and thank you for your patience.



Tagging and "Daily Build" or "Snapshot" Releases
------------------------------------------------

When a set of related projects are under development, it may be important to
track finer-grained version increments than you would normally use for e.g.
"stable" releases.  While stable releases might be measured in dotted numbers
with alpha/beta/etc. status codes, development versions of a project often
need to be tracked by revision or build number or even build date.  This is
especially true when projects in development need to refer to one another, and
therefore may literally need an up-to-the-minute version of something!

To support these scenarios, ``setuptools`` allows you to "tag" your source and
egg distributions by adding one or more of the following to the project's
"official" version identifier:

* A manually-specified pre-release tag, such as "build" or "dev", or a
  manually-specified post-release tag, such as a build or revision number
  (``--tag-build=STRING, -bSTRING``)

* A "last-modified revision number" string generated automatically from
  Subversion's metadata (assuming your project is being built from a Subversion
  "working copy")  (``--tag-svn-revision, -r``)

* An 8-character representation of the build date (``--tag-date, -d``), as
  a postrelease tag

You can add these tags by adding ``egg_info`` and the desired options to
the command line ahead of the ``sdist`` or ``bdist`` commands that you want
to generate a daily build or snapshot for.  See the section below on the
`egg_info`_ command for more details.

(Also, before you release your project, be sure to see the section above on
`Specifying Your Project's Version`_ for more information about how pre- and
post-release tags affect how setuptools and EasyInstall interpret version
numbers.  This is important in order to make sure that dependency processing
tools will know which versions of your project are newer than others.)

Finally, if you are creating builds frequently, and either building them in a
downloadable location or are copying them to a distribution server, you should
probably also check out the `rotate`_ command, which lets you automatically
delete all but the N most-recently-modified distributions matching a glob
pattern.  So, you can use a command line like::

    setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3

to build an egg whose version info includes 'DEV-rNNNN' (where NNNN is the
most recent Subversion revision that affected the source tree), and then
delete any egg files from the distribution directory except for the three
that were built most recently.

If you have to manage automated builds for multiple packages, each with
different tagging and rotation policies, you may also want to check out the
`alias`_ command, which would let each package define an alias like ``daily``
that would perform the necessary tag, build, and rotate commands.  Then, a
simpler script or cron job could just run ``setup.py daily`` in each project
directory.  (And, you could also define sitewide or per-user default versions
of the ``daily`` alias, so that projects that didn't define their own would
use the appropriate defaults.)


Generating Source Distributions
-------------------------------

``setuptools`` enhances the distutils' default algorithm for source file
selection, so that all files managed by CVS or Subversion in your project tree
are included in any source distribution you build.  This is a big improvement
over having to manually write a ``MANIFEST.in`` file and try to keep it in
sync with your project.  So, if you are using CVS or Subversion, and your
source distributions only need to include files that you're tracking in
revision control, don't create a a ``MANIFEST.in`` file for your project.
(And, if you already have one, you might consider deleting it the next time
you would otherwise have to change it.)

(NOTE: other revision control systems besides CVS and Subversion can be
supported using plugins; see the section below on `Adding Support for Other
Revision Control Systems`_ for information on how to write such plugins.)

If you need to include automatically generated files, or files that are kept in
an unsupported revision control system, you'll need to create a ``MANIFEST.in``
file to specify any files that the default file location algorithm doesn't
catch.  See the distutils documentation for more information on the format of
the ``MANIFEST.in`` file.

But, be sure to ignore any part of the distutils documentation that deals with
``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you
from these issues and doesn't work the same way in any case.  Unlike the
distutils, setuptools regenerates the source distribution manifest file
every time you build a source distribution, and it builds it inside the
project's ``.egg-info`` directory, out of the way of your main project
directory.  You therefore need not worry about whether it is up-to-date or not.

Indeed, because setuptools' approach to determining the contents of a source
distribution is so much simpler, its ``sdist`` command omits nearly all of
the options that the distutils' more complex ``sdist`` process requires.  For
all practical purposes, you'll probably use only the ``--formats`` option, if
you use any option at all.

(By the way, if you're using some other revision control system, you might
consider creating and publishing a `revision control plugin for setuptools`_.)


.. _revision control plugin for setuptools: `Adding Support for Other Revision Control Systems`_


Making your package available for EasyInstall
---------------------------------------------

If you use the ``register`` command (``setup.py register``) to register your
package with PyPI, that's most of the battle right there.  (See the
`docs for the register command`_ for more details.)

.. _docs for the register command: http://docs.python.org/dist/package-index.html

If you also use the `upload`_ command to upload actual distributions of your
package, that's even better, because EasyInstall will be able to find and
download them directly from your project's PyPI page.

However, there may be reasons why you don't want to upload distributions to
PyPI, and just want your existing distributions (or perhaps a Subversion
checkout) to be used instead.

So here's what you need to do before running the ``register`` command.  There
are three ``setup()`` arguments that affect EasyInstall:

``url`` and ``download_url``
   These become links on your project's PyPI page.  EasyInstall will examine
   them to see if they link to a package ("primary links"), or whether they are
   HTML pages.  If they're HTML pages, EasyInstall scans all HREF's on the
   page for primary links

``long_description``
   EasyInstall will check any URLs contained in this argument to see if they
   are primary links.

A URL is considered a "primary link" if it is a link to a .tar.gz, .tgz, .zip,
.egg, .egg.zip, .tar.bz2, or .exe file, or if it has an ``#egg=project`` or
``#egg=project-version`` fragment identifier attached to it.  EasyInstall
attempts to determine a project name and optional version number from the text
of a primary link *without* downloading it.  When it has found all the primary
links, EasyInstall will select the best match based on requested version,
platform compatibility, and other criteria.

So, if your ``url`` or ``download_url`` point either directly to a downloadable
source distribution, or to HTML page(s) that have direct links to such, then
EasyInstall will be able to locate downloads automatically.  If you want to
make Subversion checkouts available, then you should create links with either
``#egg=project`` or ``#egg=project-version`` added to the URL.  You should
replace ``project`` and ``version`` with the values they would have in an egg
filename.  (Be sure to actually generate an egg and then use the initial part
of the filename, rather than trying to guess what the escaped form of the
project name and version number will be.)

Note that Subversion checkout links are of lower precedence than other kinds
of distributions, so EasyInstall will not select a Subversion checkout for
downloading unless it has a version included in the ``#egg=`` suffix, and
it's a higher version than EasyInstall has seen in any other links for your
project.

As a result, it's a common practice to use mark checkout URLs with a version of
"dev" (i.e., ``#egg=projectname-dev``), so that users can do something like
this::

    easy_install --editable projectname==dev

in order to check out the in-development version of ``projectname``.


Managing "Continuous Releases" Using Subversion
-----------------------------------------------

If you expect your users to track in-development versions of your project via
Subversion, there are a few additional steps you should take to ensure that
things work smoothly with EasyInstall.  First, you should add the following
to your project's ``setup.cfg`` file:

.. code-block:: ini

    [egg_info]
    tag_build = .dev
    tag_svn_revision = 1

This will tell ``setuptools`` to generate package version numbers like
``1.0a1.dev-r1263``, which will be considered to be an *older* release than
``1.0a1``.  Thus, when you actually release ``1.0a1``, the entire egg
infrastructure (including ``setuptools``, ``pkg_resources`` and EasyInstall)
will know that ``1.0a1`` supersedes any interim snapshots from Subversion, and
handle upgrades accordingly.

(Note: the project version number you specify in ``setup.py`` should always be
the *next* version of your software, not the last released version.
Alternately, you can leave out the ``tag_build=.dev``, and always use the
*last* release as a version number, so that your post-1.0 builds are labelled
``1.0-r1263``, indicating a post-1.0 patchlevel.  Most projects so far,
however, seem to prefer to think of their project as being a future version
still under development, rather than a past version being patched.  It is of
course possible for a single project to have both situations, using
post-release numbering on release branches, and pre-release numbering on the
trunk.  But you don't have to make things this complex if you don't want to.)

Commonly, projects releasing code from Subversion will include a PyPI link to
their checkout URL (as described in the previous section) with an
``#egg=projectname-dev`` suffix.  This allows users to request EasyInstall
to download ``projectname==dev`` in order to get the latest in-development
code.  Note that if your project depends on such in-progress code, you may wish
to specify your ``install_requires`` (or other requirements) to include
``==dev``, e.g.:

.. code-block:: python

    install_requires = ["OtherProject>=0.2a1.dev-r143,==dev"]

The above example says, "I really want at least this particular development
revision number, but feel free to follow and use an ``#egg=OtherProject-dev``
link if you find one".  This avoids the need to have actual source or binary
distribution snapshots of in-development code available, just to be able to
depend on the latest and greatest a project has to offer.

A final note for Subversion development: if you are using SVN revision tags
as described in this section, it's a good idea to run ``setup.py develop``
after each Subversion checkin or update, because your project's version number
will be changing, and your script wrappers need to be updated accordingly.

Also, if the project's requirements have changed, the ``develop`` command will
take care of fetching the updated dependencies, building changed extensions,
etc.  Be sure to also remind any of your users who check out your project
from Subversion that they need to run ``setup.py develop`` after every update
in order to keep their checkout completely in sync.


Making "Official" (Non-Snapshot) Releases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When you make an official release, creating source or binary distributions,
you will need to override the tag settings from ``setup.cfg``, so that you
don't end up registering versions like ``foobar-0.7a1.dev-r34832``.  This is
easy to do if you are developing on the trunk and using tags or branches for
your releases - just make the change to ``setup.cfg`` after branching or
tagging the release, so the trunk will still produce development snapshots.

Alternately, if you are not branching for releases, you can override the
default version options on the command line, using something like::

    python setup.py egg_info -RDb "" sdist bdist_egg register upload

The first part of this command (``egg_info -RDb ""``) will override the
configured tag information, before creating source and binary eggs, registering
the project with PyPI, and uploading the files.  Thus, these commands will use
the plain version from your ``setup.py``, without adding the Subversion
revision number or build designation string.

Of course, if you will be doing this a lot, you may wish to create a personal
alias for this operation, e.g.::

    python setup.py alias -u release egg_info -RDb ""

You can then use it like this::

    python setup.py release sdist bdist_egg register upload

Or of course you can create more elaborate aliases that do all of the above.
See the sections below on the `egg_info`_ and `alias`_ commands for more ideas.



Distributing Extensions compiled with Pyrex
-------------------------------------------

``setuptools`` includes transparent support for building Pyrex extensions, as
long as you define your extensions using ``setuptools.Extension``, *not*
``distutils.Extension``.  You must also not import anything from Pyrex in
your setup script.

If you follow these rules, you can safely list ``.pyx`` files as the source
of your ``Extension`` objects in the setup script.  ``setuptools`` will detect
at build time whether Pyrex is installed or not.  If it is, then ``setuptools``
will use it.  If not, then ``setuptools`` will silently change the
``Extension`` objects to refer to the ``.c`` counterparts of the ``.pyx``
files, so that the normal distutils C compilation process will occur.

Of course, for this to work, your source distributions must include the C
code generated by Pyrex, as well as your original ``.pyx`` files.  This means
that you will probably want to include current ``.c`` files in your revision
control system, rebuilding them whenever you check changes in for the ``.pyx``
source files.  This will ensure that people tracking your project in CVS or
Subversion will be able to build it even if they don't have Pyrex installed,
and that your source releases will be similarly usable with or without Pyrex.


-----------------
Command Reference
-----------------

.. _alias:

``alias`` - Define shortcuts for commonly used commands
=======================================================

Sometimes, you need to use the same commands over and over, but you can't
necessarily set them as defaults.  For example, if you produce both development
snapshot releases and "stable" releases of a project, you may want to put
the distributions in different places, or use different ``egg_info`` tagging
options, etc.  In these cases, it doesn't make sense to set the options in
a distutils configuration file, because the values of the options changed based
on what you're trying to do.

Setuptools therefore allows you to define "aliases" - shortcut names for
an arbitrary string of commands and options, using ``setup.py alias aliasname
expansion``, where aliasname is the name of the new alias, and the remainder of
the command line supplies its expansion.  For example, this command defines
a sitewide alias called "daily", that sets various ``egg_info`` tagging
options::

    setup.py alias --global-config daily egg_info --tag-svn-revision \
        --tag-build=development

Once the alias is defined, it can then be used with other setup commands,
e.g.::

    setup.py daily bdist_egg        # generate a daily-build .egg file
    setup.py daily sdist            # generate a daily-build source distro
    setup.py daily sdist bdist_egg  # generate both

The above commands are interpreted as if the word ``daily`` were replaced with
``egg_info --tag-svn-revision --tag-build=development``.

Note that setuptools will expand each alias *at most once* in a given command
line.  This serves two purposes.  First, if you accidentally create an alias
loop, it will have no effect; you'll instead get an error message about an
unknown command.  Second, it allows you to define an alias for a command, that
uses that command.  For example, this (project-local) alias::

    setup.py alias bdist_egg bdist_egg rotate -k1 -m.egg

redefines the ``bdist_egg`` command so that it always runs the ``rotate``
command afterwards to delete all but the newest egg file.  It doesn't loop
indefinitely on ``bdist_egg`` because the alias is only expanded once when
used.

You can remove a defined alias with the ``--remove`` (or ``-r``) option, e.g.::

    setup.py alias --global-config --remove daily

would delete the "daily" alias we defined above.

Aliases can be defined on a project-specific, per-user, or sitewide basis.  The
default is to define or remove a project-specific alias, but you can use any of
the `configuration file options`_ (listed under the `saveopts`_ command, below)
to determine which distutils configuration file an aliases will be added to
(or removed from).

Note that if you omit the "expansion" argument to the ``alias`` command,
you'll get output showing that alias' current definition (and what
configuration file it's defined in).  If you omit the alias name as well,
you'll get a listing of all current aliases along with their configuration
file locations.


``bdist_egg`` - Create a Python Egg for the project
===================================================

This command generates a Python Egg (``.egg`` file) for the project.  Python
Eggs are the preferred binary distribution format for EasyInstall, because they
are cross-platform (for "pure" packages), directly importable, and contain
project metadata including scripts and information about the project's
dependencies.  They can be simply downloaded and added to ``sys.path``
directly, or they can be placed in a directory on ``sys.path`` and then
automatically discovered by the egg runtime system.

This command runs the `egg_info`_ command (if it hasn't already run) to update
the project's metadata (``.egg-info``) directory.  If you have added any extra
metadata files to the ``.egg-info`` directory, those files will be included in
the new egg file's metadata directory, for use by the egg runtime system or by
any applications or frameworks that use that metadata.

You won't usually need to specify any special options for this command; just
use ``bdist_egg`` and you're done.  But there are a few options that may
be occasionally useful:

``--dist-dir=DIR, -d DIR``
    Set the directory where the ``.egg`` file will be placed.  If you don't
    supply this, then the ``--dist-dir`` setting of the ``bdist`` command
    will be used, which is usually a directory named ``dist`` in the project
    directory.

``--plat-name=PLATFORM, -p PLATFORM``
    Set the platform name string that will be embedded in the egg's filename
    (assuming the egg contains C extensions).  This can be used to override
    the distutils default platform name with something more meaningful.  Keep
    in mind, however, that the egg runtime system expects to see eggs with
    distutils platform names, so it may ignore or reject eggs with non-standard
    platform names.  Similarly, the EasyInstall program may ignore them when
    searching web pages for download links.  However, if you are
    cross-compiling or doing some other unusual things, you might find a use
    for this option.

``--exclude-source-files``
    Don't include any modules' ``.py`` files in the egg, just compiled Python,
    C, and data files.  (Note that this doesn't affect any ``.py`` files in the
    EGG-INFO directory or its subdirectories, since for example there may be
    scripts with a ``.py`` extension which must still be retained.)  We don't
    recommend that you use this option except for packages that are being
    bundled for proprietary end-user applications, or for "embedded" scenarios
    where space is at an absolute premium.  On the other hand, if your package
    is going to be installed and used in compressed form, you might as well
    exclude the source because Python's ``traceback`` module doesn't currently
    understand how to display zipped source code anyway, or how to deal with
    files that are in a different place from where their code was compiled.

There are also some options you will probably never need, but which are there
because they were copied from similar ``bdist`` commands used as an example for
creating this one.  They may be useful for testing and debugging, however,
which is why we kept them:

``--keep-temp, -k``
    Keep the contents of the ``--bdist-dir`` tree around after creating the
    ``.egg`` file.

``--bdist-dir=DIR, -b DIR``
    Set the temporary directory for creating the distribution.  The entire
    contents of this directory are zipped to create the ``.egg`` file, after
    running various installation commands to copy the package's modules, data,
    and extensions here.

``--skip-build``
    Skip doing any "build" commands; just go straight to the
    install-and-compress phases.


.. _develop:

``develop`` - Deploy the project source in "Development Mode"
=============================================================

This command allows you to deploy your project's source for use in one or more
"staging areas" where it will be available for importing.  This deployment is
done in such a way that changes to the project source are immediately available
in the staging area(s), without needing to run a build or install step after
each change.

The ``develop`` command works by creating an ``.egg-link`` file (named for the
project) in the given staging area.  If the staging area is Python's
``site-packages`` directory, it also updates an ``easy-install.pth`` file so
that the project is on ``sys.path`` by default for all programs run using that
Python installation.

The ``develop`` command also installs wrapper scripts in the staging area (or
a separate directory, as specified) that will ensure the project's dependencies
are available on ``sys.path`` before running the project's source scripts.
And, it ensures that any missing project dependencies are available in the
staging area, by downloading and installing them if necessary.

Last, but not least, the ``develop`` command invokes the ``build_ext -i``
command to ensure any C extensions in the project have been built and are
up-to-date, and the ``egg_info`` command to ensure the project's metadata is
updated (so that the runtime and wrappers know what the project's dependencies
are).  If you make any changes to the project's setup script or C extensions,
you should rerun the ``develop`` command against all relevant staging areas to
keep the project's scripts, metadata and extensions up-to-date.  Most other
kinds of changes to your project should not require any build operations or
rerunning ``develop``, but keep in mind that even minor changes to the setup
script (e.g. changing an entry point definition) require you to re-run the
``develop`` or ``test`` commands to keep the distribution updated.

Here are some of the options that the ``develop`` command accepts.  Note that
they affect the project's dependencies as well as the project itself, so if you
have dependencies that need to be installed and you use ``--exclude-scripts``
(for example), the dependencies' scripts will not be installed either!  For
this reason, you may want to use EasyInstall to install the project's
dependencies before using the ``develop`` command, if you need finer control
over the installation options for dependencies.

``--uninstall, -u``
    Un-deploy the current project.  You may use the ``--install-dir`` or ``-d``
    option to designate the staging area.  The created ``.egg-link`` file will
    be removed, if present and it is still pointing to the project directory.
    The project directory will be removed from ``easy-install.pth`` if the
    staging area is Python's ``site-packages`` directory.

    Note that this option currently does *not* uninstall script wrappers!  You
    must uninstall them yourself, or overwrite them by using EasyInstall to
    activate a different version of the package.  You can also avoid installing
    script wrappers in the first place, if you use the ``--exclude-scripts``
    (aka ``-x``) option when you run ``develop`` to deploy the project.

``--multi-version, -m``
    "Multi-version" mode. Specifying this option prevents ``develop`` from
    adding an ``easy-install.pth`` entry for the project(s) being deployed, and
    if an entry for any version of a project already exists, the entry will be
    removed upon successful deployment.  In multi-version mode, no specific
    version of the package is available for importing, unless you use
    ``pkg_resources.require()`` to put it on ``sys.path``, or you are running
    a wrapper script generated by ``setuptools`` or EasyInstall.  (In which
    case the wrapper script calls ``require()`` for you.)

    Note that if you install to a directory other than ``site-packages``,
    this option is automatically in effect, because ``.pth`` files can only be
    used in ``site-packages`` (at least in Python 2.3 and 2.4). So, if you use
    the ``--install-dir`` or ``-d`` option (or they are set via configuration
    file(s)) your project and its dependencies will be deployed in multi-
    version mode.

``--install-dir=DIR, -d DIR``
    Set the installation directory (staging area).  If this option is not
    directly specified on the command line or in a distutils configuration
    file, the distutils default installation location is used.  Normally, this
    will be the ``site-packages`` directory, but if you are using distutils
    configuration files, setting things like ``prefix`` or ``install_lib``,
    then those settings are taken into account when computing the default
    staging area.

``--script-dir=DIR, -s DIR``
    Set the script installation directory.  If you don't supply this option
    (via the command line or a configuration file), but you *have* supplied
    an ``--install-dir`` (via command line or config file), then this option
    defaults to the same directory, so that the scripts will be able to find
    their associated package installation.  Otherwise, this setting defaults
    to the location where the distutils would normally install scripts, taking
    any distutils configuration file settings into account.

``--exclude-scripts, -x``
    Don't deploy script wrappers.  This is useful if you don't want to disturb
    existing versions of the scripts in the staging area.

``--always-copy, -a``
    Copy all needed distributions to the staging area, even if they
    are already present in another directory on ``sys.path``.  By default, if
    a requirement can be met using a distribution that is already available in
    a directory on ``sys.path``, it will not be copied to the staging area.

``--egg-path=DIR``
    Force the generated ``.egg-link`` file to use a specified relative path
    to the source directory.  This can be useful in circumstances where your
    installation directory is being shared by code running under multiple
    platforms (e.g. Mac and Windows) which have different absolute locations
    for the code under development, but the same *relative* locations with
    respect to the installation directory.  If you use this option when
    installing, you must supply the same relative path when uninstalling.

In addition to the above options, the ``develop`` command also accepts all of
the same options accepted by ``easy_install``.  If you've configured any
``easy_install`` settings in your ``setup.cfg`` (or other distutils config
files), the ``develop`` command will use them as defaults, unless you override
them in a ``[develop]`` section or on the command line.


``easy_install`` - Find and install packages
============================================

This command runs the `EasyInstall tool
<easy_install.html>`_ for you.  It is exactly
equivalent to running the ``easy_install`` command.  All command line arguments
following this command are consumed and not processed further by the distutils,
so this must be the last command listed on the command line.  Please see
the EasyInstall documentation for the options reference and usage examples.
Normally, there is no reason to use this command via the command line, as you
can just use ``easy_install`` directly.  It's only listed here so that you know
it's a distutils command, which means that you can:

* create command aliases that use it,
* create distutils extensions that invoke it as a subcommand, and
* configure options for it in your ``setup.cfg`` or other distutils config
  files.


.. _egg_info:

``egg_info`` - Create egg metadata and set build tags
=====================================================

This command performs two operations: it updates a project's ``.egg-info``
metadata directory (used by the ``bdist_egg``, ``develop``, and ``test``
commands), and it allows you to temporarily change a project's version string,
to support "daily builds" or "snapshot" releases.  It is run automatically by
the ``sdist``, ``bdist_egg``, ``develop``, ``register``, and ``test`` commands
in order to update the project's metadata, but you can also specify it
explicitly in order to temporarily change the project's version string while
executing other commands.  (It also generates the``.egg-info/SOURCES.txt``
manifest file, which is used when you are building source distributions.)

In addition to writing the core egg metadata defined by ``setuptools`` and
required by ``pkg_resources``, this command can be extended to write other
metadata files as well, by defining entry points in the ``egg_info.writers``
group.  See the section on `Adding new EGG-INFO Files`_ below for more details.
Note that using additional metadata writers may require you to include a
``setup_requires`` argument to ``setup()`` in order to ensure that the desired
writers are available on ``sys.path``.


Release Tagging Options
-----------------------

The following options can be used to modify the project's version string for
all remaining commands on the setup command line.  The options are processed
in the order shown, so if you use more than one, the requested tags will be
added in the following order:

``--tag-build=NAME, -b NAME``
    Append NAME to the project's version string.  Due to the way setuptools
    processes "pre-release" version suffixes beginning with the letters "a"
    through "e" (like "alpha", "beta", and "candidate"), you will usually want
    to use a tag like ".build" or ".dev", as this will cause the version number
    to be considered *lower* than the project's default version.  (If you
    want to make the version number *higher* than the default version, you can
    always leave off --tag-build and then use one or both of the following
    options.)

    If you have a default build tag set in your ``setup.cfg``, you can suppress
    it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument
    to the ``egg_info`` command.

``--tag-svn-revision, -r``
    If the current directory is a Subversion checkout (i.e. has a ``.svn``
    subdirectory, this appends a string of the form "-rNNNN" to the project's
    version string, where NNNN is the revision number of the most recent
    modification to the current directory, as obtained from the ``svn info``
    command.

    If the current directory is not a Subversion checkout, the command will
    look for a ``PKG-INFO`` file instead, and try to find the revision number
    from that, by looking for a "-rNNNN" string at the end of the version
    number.  (This is so that building a package from a source distribution of
    a Subversion snapshot will produce a binary with the correct version
    number.)

    If there is no ``PKG-INFO`` file, or the version number contained therein
    does not end with ``-r`` and a number, then ``-r0`` is used.

``--no-svn-revision, -R``
    Don't include the Subversion revision in the version number.  This option
    is included so you can override a default setting put in ``setup.cfg``.

``--tag-date, -d``
    Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the
    project's version number.

``--no-date, -D``
    Don't include a date stamp in the version number.  This option is included
    so you can override a default setting in ``setup.cfg``.


(Note: Because these options modify the version number used for source and
binary distributions of your project, you should first make sure that you know
how the resulting version numbers will be interpreted by automated tools
like EasyInstall.  See the section above on `Specifying Your Project's
Version`_ for an explanation of pre- and post-release tags, as well as tips on
how to choose and verify a versioning scheme for your your project.)

For advanced uses, there is one other option that can be set, to change the
location of the project's ``.egg-info`` directory.  Commands that need to find
the project's source directory or metadata should get it from this setting:


Other ``egg_info`` Options
--------------------------

``--egg-base=SOURCEDIR, -e SOURCEDIR``
    Specify the directory that should contain the .egg-info directory.  This
    should normally be the root of your project's source tree (which is not
    necessarily the same as your project directory; some projects use a ``src``
    or ``lib`` subdirectory as the source root).  You should not normally need
    to specify this directory, as it is normally determined from the
    ``package_dir`` argument to the ``setup()`` function, if any.  If there is
    no ``package_dir`` set, this option defaults to the current directory.


``egg_info`` Examples
---------------------

Creating a dated "nightly build" snapshot egg::

    python setup.py egg_info --tag-date --tag-build=DEV bdist_egg

Creating and uploading a release with no version tags, even if some default
tags are specified in ``setup.cfg``::

    python setup.py egg_info -RDb "" sdist bdist_egg register upload

(Notice that ``egg_info`` must always appear on the command line *before* any
commands that you want the version changes to apply to.)


.. _install command:

``install`` - Run ``easy_install`` or old-style installation
============================================================

The setuptools ``install`` command is basically a shortcut to run the
``easy_install`` command on the current project.  However, for convenience
in creating "system packages" of setuptools-based projects, you can also
use this option:

``--single-version-externally-managed``
    This boolean option tells the ``install`` command to perform an "old style"
    installation, with the addition of an ``.egg-info`` directory so that the
    installed project will still have its metadata available and operate
    normally.  If you use this option, you *must* also specify the ``--root``
    or ``--record`` options (or both), because otherwise you will have no way
    to identify and remove the installed files.

This option is automatically in effect when ``install`` is invoked by another
distutils command, so that commands like ``bdist_wininst`` and ``bdist_rpm``
will create system packages of eggs.  It is also automatically in effect if
you specify the ``--root`` option.


``install_egg_info`` - Install an ``.egg-info`` directory in ``site-packages``
==============================================================================

Setuptools runs this command as part of ``install`` operations that use the
``--single-version-externally-managed`` options.  You should not invoke it
directly; it is documented here for completeness and so that distutils
extensions such as system package builders can make use of it.  This command
has only one option:

``--install-dir=DIR, -d DIR``
    The parent directory where the ``.egg-info`` directory will be placed.
    Defaults to the same as the ``--install-dir`` option specified for the
    ``install_lib`` command, which is usually the system ``site-packages``
    directory.

This command assumes that the ``egg_info`` command has been given valid options
via the command line or ``setup.cfg``, as it will invoke the ``egg_info``
command and use its options to locate the project's source ``.egg-info``
directory.


.. _rotate:

``rotate`` - Delete outdated distribution files
===============================================

As you develop new versions of your project, your distribution (``dist``)
directory will gradually fill up with older source and/or binary distribution
files.  The ``rotate`` command lets you automatically clean these up, keeping
only the N most-recently modified files matching a given pattern.

``--match=PATTERNLIST, -m PATTERNLIST``
    Comma-separated list of glob patterns to match.  This option is *required*.
    The project name and ``-*`` is prepended to the supplied patterns, in order
    to match only distributions belonging to the current project (in case you
    have a shared distribution directory for multiple projects).  Typically,
    you will use a glob pattern like ``.zip`` or ``.egg`` to match files of
    the specified type.  Note that each supplied pattern is treated as a
    distinct group of files for purposes of selecting files to delete.

``--keep=COUNT, -k COUNT``
    Number of matching distributions to keep.  For each group of files
    identified by a pattern specified with the ``--match`` option, delete all
    but the COUNT most-recently-modified files in that group.  This option is
    *required*.

``--dist-dir=DIR, -d DIR``
    Directory where the distributions are.  This defaults to the value of the
    ``bdist`` command's ``--dist-dir`` option, which will usually be the
    project's ``dist`` subdirectory.

**Example 1**: Delete all .tar.gz files from the distribution directory, except
for the 3 most recently modified ones::

    setup.py rotate --match=.tar.gz --keep=3

**Example 2**: Delete all Python 2.3 or Python 2.4 eggs from the distribution
directory, except the most recently modified one for each Python version::

    setup.py rotate --match=-py2.3*.egg,-py2.4*.egg --keep=1


.. _saveopts:

``saveopts`` - Save used options to a configuration file
========================================================

Finding and editing ``distutils`` configuration files can be a pain, especially
since you also have to translate the configuration options from command-line
form to the proper configuration file format.  You can avoid these hassles by
using the ``saveopts`` command.  Just add it to the command line to save the
options you used.  For example, this command builds the project using
the ``mingw32`` C compiler, then saves the --compiler setting as the default
for future builds (even those run implicitly by the ``install`` command)::

    setup.py build --compiler=mingw32 saveopts

The ``saveopts`` command saves all options for every commmand specified on the
command line to the project's local ``setup.cfg`` file, unless you use one of
the `configuration file options`_ to change where the options are saved.  For
example, this command does the same as above, but saves the compiler setting
to the site-wide (global) distutils configuration::

    setup.py build --compiler=mingw32 saveopts -g

Note that it doesn't matter where you place the ``saveopts`` command on the
command line; it will still save all the options specified for all commands.
For example, this is another valid way to spell the last example::

    setup.py saveopts -g build --compiler=mingw32

Note, however, that all of the commands specified are always run, regardless of
where ``saveopts`` is placed on the command line.


Configuration File Options
--------------------------

Normally, settings such as options and aliases are saved to the project's
local ``setup.cfg`` file.  But you can override this and save them to the
global or per-user configuration files, or to a manually-specified filename.

``--global-config, -g``
    Save settings to the global ``distutils.cfg`` file inside the ``distutils``
    package directory.  You must have write access to that directory to use
    this option.  You also can't combine this option with ``-u`` or ``-f``.

``--user-config, -u``
    Save settings to the current user's ``~/.pydistutils.cfg`` (POSIX) or
    ``$HOME/pydistutils.cfg`` (Windows) file.  You can't combine this option
    with ``-g`` or ``-f``.

``--filename=FILENAME, -f FILENAME``
    Save settings to the specified configuration file to use.  You can't
    combine this option with ``-g`` or ``-u``.  Note that if you specify a
    non-standard filename, the ``distutils`` and ``setuptools`` will not
    use the file's contents.  This option is mainly included for use in
    testing.

These options are used by other ``setuptools`` commands that modify
configuration files, such as the `alias`_ and `setopt`_ commands.


.. _setopt:

``setopt`` - Set a distutils or setuptools option in a config file
==================================================================

This command is mainly for use by scripts, but it can also be used as a quick
and dirty way to change a distutils configuration option without having to
remember what file the options are in and then open an editor.

**Example 1**.  Set the default C compiler to ``mingw32`` (using long option
names)::

    setup.py setopt --command=build --option=compiler --set-value=mingw32

**Example 2**.  Remove any setting for the distutils default package
installation directory (short option names)::

    setup.py setopt -c install -o install_lib -r


Options for the ``setopt`` command:

``--command=COMMAND, -c COMMAND``
    Command to set the option for.  This option is required.

``--option=OPTION, -o OPTION``
    The name of the option to set.  This option is required.

``--set-value=VALUE, -s VALUE``
    The value to set the option to.  Not needed if ``-r`` or ``--remove`` is
    set.

``--remove, -r``
    Remove (unset) the option, instead of setting it.

In addition to the above options, you may use any of the `configuration file
options`_ (listed under the `saveopts`_ command, above) to determine which
distutils configuration file the option will be added to (or removed from).


.. _test:

``test`` - Build package and run a unittest suite
=================================================

When doing test-driven development, or running automated builds that need
testing before they are deployed for downloading or use, it's often useful
to be able to run a project's unit tests without actually deploying the project
anywhere, even using the ``develop`` command.  The ``test`` command runs a
project's unit tests without actually deploying it, by temporarily putting the
project's source on ``sys.path``, after first running ``build_ext -i`` and
``egg_info`` to ensure that any C extensions and project metadata are
up-to-date.

To use this command, your project's tests must be wrapped in a ``unittest``
test suite by either a function, a ``TestCase`` class or method, or a module
or package containing ``TestCase`` classes.  If the named suite is a module,
and the module has an ``additional_tests()`` function, it is called and the
result (which must be a ``unittest.TestSuite``) is added to the tests to be
run.  If the named suite is a package, any submodules and subpackages are
recursively added to the overall test suite.  (Note: if your project specifies
a ``test_loader``, the rules for processing the chosen ``test_suite`` may
differ; see the `test_loader`_ documentation for more details.)

Note that many test systems including ``doctest`` support wrapping their
non-``unittest`` tests in ``TestSuite`` objects.  So, if you are using a test
package that does not support this, we suggest you encourage its developers to
implement test suite support, as this is a convenient and standard way to
aggregate a collection of tests to be run under a common test harness.

By default, tests will be run in the "verbose" mode of the ``unittest``
package's text test runner, but you can get the "quiet" mode (just dots) if
you supply the ``-q`` or ``--quiet`` option, either as a global option to
the setup script (e.g. ``setup.py -q test``) or as an option for the ``test``
command itself (e.g. ``setup.py test -q``).  There is one other option
available:

``--test-suite=NAME, -s NAME``
    Specify the test suite (or module, class, or method) to be run
    (e.g. ``some_module.test_suite``).  The default for this option can be
    set by giving a ``test_suite`` argument to the ``setup()`` function, e.g.::

        setup(
            # ...
            test_suite = "my_package.tests.test_all"
        )

    If you did not set a ``test_suite`` in your ``setup()`` call, and do not
    provide a ``--test-suite`` option, an error will occur.


.. _upload:

``upload`` - Upload source and/or egg distributions to PyPI
===========================================================

PyPI now supports uploading project files for redistribution; uploaded files
are easily found by EasyInstall, even if you don't have download links on your
project's home page.

Although Python 2.5 will support uploading all types of distributions to PyPI,
setuptools only supports source distributions and eggs.  (This is partly
because PyPI's upload support is currently broken for various other file
types.)  To upload files, you must include the ``upload`` command *after* the
``sdist`` or ``bdist_egg`` commands on the setup command line.  For example::

    setup.py bdist_egg upload         # create an egg and upload it
    setup.py sdist upload             # create a source distro and upload it
    setup.py sdist bdist_egg upload   # create and upload both

Note that to upload files for a project, the corresponding version must already
be registered with PyPI, using the distutils ``register`` command.  It's
usually a good idea to include the ``register`` command at the start of the
command line, so that any registration problems can be found and fixed before
building and uploading the distributions, e.g.::

    setup.py register sdist bdist_egg upload

This will update PyPI's listing for your project's current version.

Note, by the way, that the metadata in your ``setup()`` call determines what
will be listed in PyPI for your package.  Try to fill out as much of it as
possible, as it will save you a lot of trouble manually adding and updating
your PyPI listings.  Just put it in ``setup.py`` and use the ``register``
comamnd to keep PyPI up to date.

The ``upload`` command has a few options worth noting:

``--sign, -s``
    Sign each uploaded file using GPG (GNU Privacy Guard).  The ``gpg`` program
    must be available for execution on the system ``PATH``.

``--identity=NAME, -i NAME``
    Specify the identity or key name for GPG to use when signing.  The value of
    this option will be passed through the ``--local-user`` option of the
    ``gpg`` program.

``--show-response``
    Display the full response text from server; this is useful for debugging
    PyPI problems.

``--repository=URL, -r URL``
    The URL of the repository to upload to.  Defaults to
    https://pypi.python.org/pypi (i.e., the main PyPI installation).

.. _upload_docs:

``upload_docs`` - Upload package documentation to PyPI
======================================================

PyPI now supports uploading project documentation to the dedicated URL
https://pythonhosted.org/<project>/.

The ``upload_docs`` command will create the necessary zip file out of a
documentation directory and will post to the repository.

Note that to upload the documentation of a project, the corresponding version
must already be registered with PyPI, using the distutils ``register``
command -- just like the ``upload`` command.

Assuming there is an ``Example`` project with documentation in the
subdirectory ``docs``, e.g.::

  Example/
  |-- example.py
  |-- setup.cfg
  |-- setup.py
  |-- docs
  |   |-- build
  |   |   `-- html
  |   |   |   |-- index.html
  |   |   |   `-- tips_tricks.html
  |   |-- conf.py
  |   |-- index.txt
  |   `-- tips_tricks.txt

You can simply pass the documentation directory path to the ``upload_docs``
command::

    python setup.py upload_docs --upload-dir=docs/build/html

If no ``--upload-dir`` is given, ``upload_docs`` will attempt to run the
``build_sphinx`` command to generate uploadable documentation.
For the command to become available, `Sphinx <http://sphinx.pocoo.org/>`_
must be installed in the same environment as distribute.

As with other ``setuptools``-based commands, you can define useful
defaults in the ``setup.cfg`` of your Python project, e.g.:

.. code-block:: ini

    [upload_docs]
    upload-dir = docs/build/html

The ``upload_docs`` command has the following options:

``--upload-dir``
    The directory to be uploaded to the repository.

``--show-response``
    Display the full response text from server; this is useful for debugging
    PyPI problems.

``--repository=URL, -r URL``
    The URL of the repository to upload to.  Defaults to
    https://pypi.python.org/pypi (i.e., the main PyPI installation).


--------------------------------
Extending and Reusing Distribute
--------------------------------

Creating ``distutils`` Extensions
=================================

It can be hard to add new commands or setup arguments to the distutils.  But
the ``setuptools`` package makes it a bit easier, by allowing you to distribute
a distutils extension as a separate project, and then have projects that need
the extension just refer to it in their ``setup_requires`` argument.

With ``setuptools``, your distutils extension projects can hook in new
commands and ``setup()`` arguments just by defining "entry points".  These
are mappings from command or argument names to a specification of where to
import a handler from.  (See the section on `Dynamic Discovery of Services and
Plugins`_ above for some more background on entry points.)


Adding Commands
---------------

You can add new ``setup`` commands by defining entry points in the
``distutils.commands`` group.  For example, if you wanted to add a ``foo``
command, you might add something like this to your distutils extension
project's setup script::

    setup(
        # ...
        entry_points = {
            "distutils.commands": [
                "foo = mypackage.some_module:foo",
            ],
        },
    )

(Assuming, of course, that the ``foo`` class in ``mypackage.some_module`` is
a ``setuptools.Command`` subclass.)

Once a project containing such entry points has been activated on ``sys.path``,
(e.g. by running "install" or "develop" with a site-packages installation
directory) the command(s) will be available to any ``setuptools``-based setup
scripts.  It is not necessary to use the ``--command-packages`` option or
to monkeypatch the ``distutils.command`` package to install your commands;
``setuptools`` automatically adds a wrapper to the distutils to search for
entry points in the active distributions on ``sys.path``.  In fact, this is
how setuptools' own commands are installed: the setuptools project's setup
script defines entry points for them!


Adding ``setup()`` Arguments
----------------------------

Sometimes, your commands may need additional arguments to the ``setup()``
call.  You can enable this by defining entry points in the
``distutils.setup_keywords`` group.  For example, if you wanted a ``setup()``
argument called ``bar_baz``, you might add something like this to your
distutils extension project's setup script::

    setup(
        # ...
        entry_points = {
            "distutils.commands": [
                "foo = mypackage.some_module:foo",
            ],
            "distutils.setup_keywords": [
                "bar_baz = mypackage.some_module:validate_bar_baz",
            ],
        },
    )

The idea here is that the entry point defines a function that will be called
to validate the ``setup()`` argument, if it's supplied.  The ``Distribution``
object will have the initial value of the attribute set to ``None``, and the
validation function will only be called if the ``setup()`` call sets it to
a non-None value.  Here's an example validation function::

    def assert_bool(dist, attr, value):
        """Verify that value is True, False, 0, or 1"""
        if bool(value) != value:
            raise DistutilsSetupError(
                "%r must be a boolean value (got %r)" % (attr,value)
            )

Your function should accept three arguments: the ``Distribution`` object,
the attribute name, and the attribute value.  It should raise a
``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument
is invalid.  Remember, your function will only be called with non-None values,
and the default value of arguments defined this way is always None.  So, your
commands should always be prepared for the possibility that the attribute will
be ``None`` when they access it later.

If more than one active distribution defines an entry point for the same
``setup()`` argument, *all* of them will be called.  This allows multiple
distutils extensions to define a common argument, as long as they agree on
what values of that argument are valid.

Also note that as with commands, it is not necessary to subclass or monkeypatch
the distutils ``Distribution`` class in order to add your arguments; it is
sufficient to define the entry points in your extension, as long as any setup
script using your extension lists your project in its ``setup_requires``
argument.


Adding new EGG-INFO Files
-------------------------

Some extensible applications or frameworks may want to allow third parties to
develop plugins with application or framework-specific metadata included in
the plugins' EGG-INFO directory, for easy access via the ``pkg_resources``
metadata API.  The easiest way to allow this is to create a distutils extension
to be used from the plugin projects' setup scripts (via ``setup_requires``)
that defines a new setup keyword, and then uses that data to write an EGG-INFO
file when the ``egg_info`` command is run.

The ``egg_info`` command looks for extension points in an ``egg_info.writers``
group, and calls them to write the files.  Here's a simple example of a
distutils extension defining a setup argument ``foo_bar``, which is a list of
lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any
project that uses the argument::

    setup(
        # ...
        entry_points = {
            "distutils.setup_keywords": [
                "foo_bar = setuptools.dist:assert_string_list",
            ],
            "egg_info.writers": [
                "foo_bar.txt = setuptools.command.egg_info:write_arg",
            ],
        },
    )

This simple example makes use of two utility functions defined by setuptools
for its own use: a routine to validate that a setup keyword is a sequence of
strings, and another one that looks up a setup argument and writes it to
a file.  Here's what the writer utility looks like::

    def write_arg(cmd, basename, filename):
        argname = os.path.splitext(basename)[0]
        value = getattr(cmd.distribution, argname, None)
        if value is not None:
            value = '\n'.join(value)+'\n'
        cmd.write_or_delete_file(argname, filename, value)

As you can see, ``egg_info.writers`` entry points must be a function taking
three arguments: a ``egg_info`` command instance, the basename of the file to
write (e.g. ``foo_bar.txt``), and the actual full filename that should be
written to.

In general, writer functions should honor the command object's ``dry_run``
setting when writing files, and use the ``distutils.log`` object to do any
console output.  The easiest way to conform to this requirement is to use
the ``cmd`` object's ``write_file()``, ``delete_file()``, and
``write_or_delete_file()`` methods exclusively for your file operations.  See
those methods' docstrings for more details.


Adding Support for Other Revision Control Systems
-------------------------------------------------

If you would like to create a plugin for ``setuptools`` to find files in other
source control systems besides CVS and Subversion, you can do so by adding an
entry point to the ``setuptools.file_finders`` group.  The entry point should
be a function accepting a single directory name, and should yield
all the filenames within that directory (and any subdirectories thereof) that
are under revision control.

For example, if you were going to create a plugin for a revision control system
called "foobar", you would write a function something like this:

.. code-block:: python

    def find_files_for_foobar(dirname):
        # loop to yield paths that start with `dirname`

And you would register it in a setup script using something like this::

    entry_points = {
        "setuptools.file_finders": [
            "foobar = my_foobar_module:find_files_for_foobar"
        ]
    }

Then, anyone who wants to use your plugin can simply install it, and their
local setuptools installation will be able to find the necessary files.

It is not necessary to distribute source control plugins with projects that
simply use the other source control system, or to specify the plugins in
``setup_requires``.  When you create a source distribution with the ``sdist``
command, setuptools automatically records what files were found in the
``SOURCES.txt`` file.  That way, recipients of source distributions don't need
to have revision control at all.  However, if someone is working on a package
by checking out with that system, they will need the same plugin(s) that the
original author is using.

A few important points for writing revision control file finders:

* Your finder function MUST return relative paths, created by appending to the
  passed-in directory name.  Absolute paths are NOT allowed, nor are relative
  paths that reference a parent directory of the passed-in directory.

* Your finder function MUST accept an empty string as the directory name,
  meaning the current directory.  You MUST NOT convert this to a dot; just
  yield relative paths.  So, yielding a subdirectory named ``some/dir`` under
  the current directory should NOT be rendered as ``./some/dir`` or
  ``/somewhere/some/dir``, but *always* as simply ``some/dir``

* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully
  with the absence of needed programs (i.e., ones belonging to the revision
  control system itself.  It *may*, however, use ``distutils.log.warn()`` to
  inform the user of the missing program(s).


Subclassing ``Command``
-----------------------

Sorry, this section isn't written yet, and neither is a lot of what's below
this point, except for the change log.  You might want to `subscribe to changes
in this page <setuptools?action=subscribe>`_ to see when new documentation is
added or updated.

XXX


Reusing ``setuptools`` Code
===========================

``ez_setup``
------------

XXX


``setuptools.archive_util``
---------------------------

XXX


``setuptools.sandbox``
----------------------

XXX


``setuptools.package_index``
----------------------------

XXX


Mailing List and Bug Tracker
============================

Please use the `distutils-sig mailing list`_ for questions and discussion about
setuptools, and the `setuptools bug tracker`_ ONLY for issues you have
confirmed via the list are actual bugs, and which you have reduced to a minimal
set of steps to reproduce.

.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/
.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/

doc/alt-python34-setuptools/docs/releases.txt000064400000001241150404236440015272 0ustar00===============
Release Process
===============

In order to allow for rapid, predictable releases, Setuptools uses a
mechanical technique for releases. The release script, ``release.py`` in the
repository, defines the details of the releases, and is executed by the
`jaraco.packaging <https://bitbucket.org/jaraco/jaraco.packaging>`_ release
module. The script does some checks (some interactive) and fully automates
the release process.

A Setuptools release manager must have maintainer access on PyPI to the
project and administrative access to the BitBucket project.

Release Managers
----------------

Currently, the project has one release manager, Jason R. Coombs.
doc/alt-python34-setuptools/README.txt000064400000016551150404236440013506 0ustar00===============================
Installing and Using Setuptools
===============================

.. contents:: **Table of Contents**


-------------------------
Installation Instructions
-------------------------

Upgrading from Distribute
=========================

Currently, Distribute disallows installing Setuptools 0.7+ over Distribute.
You must first uninstall any active version of Distribute first (see
`Uninstalling`_).

Upgrading from Setuptools 0.6
=============================

Upgrading from prior versions of Setuptools is supported. Initial reports
good success in this regard.

Windows
=======

The recommended way to install setuptools on Windows is to download
`ez_setup.py`_ and run it. The script will download the appropriate .egg
file and install it for you.

.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

For best results, uninstall previous versions FIRST (see `Uninstalling`_).

Once installation is complete, you will find an ``easy_install`` program in
your Python ``Scripts`` subdirectory.  For simple invocation and best results,
add this directory to your ``PATH`` environment variable, if it is not already
present.


Unix-based Systems including Mac OS X
=====================================

Download `ez_setup.py`_ and run it using the target Python version. The script
will download the appropriate version and install it for you::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

Note that you will may need to invoke the command with superuser privileges to
install to the system Python::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

Alternatively, on Python 2.6 and later, Setuptools may be installed to a
user-local path::

    > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    > python ez_setup.py --user


Python 2.4 and Python 2.5 support
=================================

Setuptools 2.0 and later requires Python 2.6 or later. To install setuptools
on Python 2.4 or Python 2.5, use the bootstrap script for Setuptools 1.x:
https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py.


Advanced Installation
=====================

For more advanced installation options, such as installing to custom
locations or prefixes, download and extract the source
tarball from `Setuptools on PyPI <https://pypi.python.org/pypi/setuptools>`_
and run setup.py with any supported distutils and Setuptools options.
For example::

    setuptools-x.x$ python setup.py --prefix=/opt/setuptools

Use ``--help`` to get a full options list, but we recommend consulting
the `EasyInstall manual`_ for detailed instructions, especially `the section
on custom installation locations`_.

.. _EasyInstall manual: https://pythonhosted.org/setuptools/EasyInstall
.. _the section on custom installation locations: https://pythonhosted.org/setuptools/EasyInstall#custom-installation-locations


Downloads
=========

All setuptools downloads can be found at `the project's home page in the Python
Package Index`_.  Scroll to the very bottom of the page to find the links.

.. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools

In addition to the PyPI downloads, the development version of ``setuptools``
is available from the `Bitbucket repo`_, and in-development versions of the
`0.6 branch`_ are available as well.

.. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev
.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06

Uninstalling
============

On Windows, if Setuptools was installed using an ``.exe`` or ``.msi``
installer, simply use the uninstall feature of "Add/Remove Programs" in the
Control Panel.

Otherwise, to uninstall Setuptools or Distribute, regardless of the Python
version, delete all ``setuptools*`` and ``distribute*`` files and
directories from your system's ``site-packages`` directory
(and any other ``sys.path`` directories) FIRST.

If you are upgrading or otherwise plan to re-install Setuptools or Distribute,
nothing further needs to be done. If you want to completely remove Setuptools,
you may also want to remove the 'easy_install' and 'easy_install-x.x' scripts
and associated executables installed to the Python scripts directory.

--------------------------------
Using Setuptools and EasyInstall
--------------------------------

Here are some of the available manuals, tutorials, and other resources for
learning about Setuptools, Python Eggs, and EasyInstall:

* `The EasyInstall user's guide and reference manual`_
* `The setuptools Developer's Guide`_
* `The pkg_resources API reference`_
* `Package Compatibility Notes`_ (user-maintained)
* `The Internal Structure of Python Eggs`_

Questions, comments, and bug reports should be directed to the `distutils-sig
mailing list`_.  If you have written (or know of) any tutorials, documentation,
plug-ins, or other resources for setuptools users, please let us know about
them there, so this reference list can be updated.  If you have working,
*tested* patches to correct problems or add features, you may submit them to
the `setuptools bug tracker`_.

.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues
.. _Package Compatibility Notes: https://pythonhosted.org/setuptools/PackageNotes
.. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html
.. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html
.. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html
.. _The EasyInstall user's guide and reference manual: https://pythonhosted.org/setuptools/easy_install.html
.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/


-------
Credits
-------

* The original design for the ``.egg`` format and the ``pkg_resources`` API was
  co-created by Phillip Eby and Bob Ippolito.  Bob also implemented the first
  version of ``pkg_resources``, and supplied the OS X operating system version
  compatibility algorithm.

* Ian Bicking implemented many early "creature comfort" features of
  easy_install, including support for downloading via Sourceforge and
  Subversion repositories.  Ian's comments on the Web-SIG about WSGI
  application deployment also inspired the concept of "entry points" in eggs,
  and he has given talks at PyCon and elsewhere to inform and educate the
  community about eggs and setuptools.

* Jim Fulton contributed time and effort to build automated tests of various
  aspects of ``easy_install``, and supplied the doctests for the command-line
  ``.exe`` wrappers on Windows.

* Phillip J. Eby is the seminal author of setuptools, and
  first proposed the idea of an importable binary distribution format for
  Python application plug-ins.

* Significant parts of the implementation of setuptools were funded by the Open
  Source Applications Foundation, to provide a plug-in infrastructure for the
  Chandler PIM application.  In addition, many OSAF staffers (such as Mike
  "Code Bear" Taylor) contributed their time and stress as guinea pigs for the
  use of eggs and setuptools, even before eggs were "cool".  (Thanks, guys!)

* Since the merge with Distribute, Jason R. Coombs is the
  maintainer of setuptools.  The project is maintained in coordination with
  the Python Packaging Authority (PyPA) and the larger Python community.

.. _files:
doc/alt-python34-setuptools/CHANGES (links).txt000064400000174601150404236440015044 0ustar00=======
CHANGES
=======

---
2.0
---

* `Issue #121 <https://bitbucket.org/pypa/setuptools/issue/121>`_: Exempt lib2to3 pickled grammars from DirectorySandbox.
* `Issue #41 <https://bitbucket.org/pypa/setuptools/issue/41>`_: Dropped support for Python 2.4 and Python 2.5. Clients requiring
  setuptools for those versions of Python should use setuptools 1.x.
* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients
  expecting this boolean variable should use ``site.ENABLE_USER_SITE``
  instead.
* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class
  should use ``pkgutil.ImpImporter`` instead.

-----
1.4.2
-----

* `Issue #116 <https://bitbucket.org/pypa/setuptools/issue/116>`_: Correct TypeError when reading a local package index on Python
  3.

-----
1.4.1
-----

* `Issue #114 <https://bitbucket.org/pypa/setuptools/issue/114>`_: Use ``sys.getfilesystemencoding`` for decoding config in
  ``bdist_wininst`` distributions.

* `Issue #105 <https://bitbucket.org/pypa/setuptools/issue/105>`_ and `Issue #113 <https://bitbucket.org/pypa/setuptools/issue/113>`_: Establish a more robust technique for
  determining the terminal encoding::

    1. Try ``getpreferredencoding``
    2. If that returns US_ASCII or None, try the encoding from
       ``getdefaultlocale``. If that encoding was a "fallback" because Python
       could not figure it out from the environment or OS, encoding remains
       unresolved.
    3. If the encoding is resolved, then make sure Python actually implements
       the encoding.
    4. On the event of an error or unknown codec, revert to fallbacks
       (UTF-8 on Darwin, ASCII on everything else).
    5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was
       a bug on older Python releases.

    On a side note, it would seem that the encoding only matters for when SVN
    does not yet support ``--xml`` and when getting repository and svn version
    numbers. The ``--xml`` technique should yield UTF-8 according to some
    messages on the SVN mailing lists. So if the version numbers are always
    7-bit ASCII clean, it may be best to only support the file parsing methods
    for legacy SVN releases and support for SVN without the subprocess command
    would simple go away as support for the older SVNs does.

---
1.4
---

* `Issue #27 <https://bitbucket.org/pypa/setuptools/issue/27>`_: ``easy_install`` will now use credentials from .pypirc if
  present for connecting to the package index.
* `Pull Request #21 <https://bitbucket.org/pypa/setuptools/pull-request/21>`_: Omit unwanted newlines in ``package_index._encode_auth``
  when the username/password pair length indicates wrapping.

-----
1.3.2
-----

* `Issue #99 <https://bitbucket.org/pypa/setuptools/issue/99>`_: Fix filename encoding issues in SVN support.

-----
1.3.1
-----

* Remove exuberant warning in SVN support when SVN is not used.

---
1.3
---

* Address security vulnerability in SSL match_hostname check as reported in
  `Python #17997 <http://bugs.python.org/issue17997>`_.
* Prefer `backports.ssl_match_hostname
  <https://pypi.python.org/pypi/backports.ssl_match_hostname>`_ for backport
  implementation if present.
* Correct NameError in ``ssl_support`` module (``socket.error``).

---
1.2
---

* `Issue #26 <https://bitbucket.org/pypa/setuptools/issue/26>`_: Add support for SVN 1.7. Special thanks to Philip Thiem for the
  contribution.
* `Issue #93 <https://bitbucket.org/pypa/setuptools/issue/93>`_: Wheels are now distributed with every release. Note that as
  reported in `Issue #108 <https://bitbucket.org/pypa/setuptools/issue/108>`_, as of Pip 1.4, scripts aren't installed properly
  from wheels. Therefore, if using Pip to install setuptools from a wheel,
  the ``easy_install`` command will not be available.
* Setuptools "natural" launcher support, introduced in 1.0, is now officially
  supported.

-----
1.1.7
-----

* Fixed behavior of NameError handling in 'script template (dev).py' (script
  launcher for 'develop' installs).
* ``ez_setup.py`` now ensures partial downloads are cleaned up following
  a failed download.
* `Distribute #363 <https://bitbucket.org/tarek/distribute/issue/363>`_ and `Issue #55 <https://bitbucket.org/pypa/setuptools/issue/55>`_: Skip an sdist test that fails on locales
  other than UTF-8.

-----
1.1.6
-----

* `Distribute #349 <https://bitbucket.org/tarek/distribute/issue/349>`_: ``sandbox.execfile`` now opens the target file in binary
  mode, thus honoring a BOM in the file when compiled.

-----
1.1.5
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Second attempt at fix (logic was reversed).

-----
1.1.4
-----

* `Issue #77 <https://bitbucket.org/pypa/setuptools/issue/77>`_: Fix error in upload command (Python 2.4).

-----
1.1.3
-----

* Fix NameError in previous patch.

-----
1.1.2
-----

* `Issue #69 <https://bitbucket.org/pypa/setuptools/issue/69>`_: Correct issue where 404 errors are returned for URLs with
  fragments in them (such as #egg=).

-----
1.1.1
-----

* `Issue #75 <https://bitbucket.org/pypa/setuptools/issue/75>`_: Add ``--insecure`` option to ez_setup.py to accommodate
  environments where a trusted SSL connection cannot be validated.
* `Issue #76 <https://bitbucket.org/pypa/setuptools/issue/76>`_: Fix AttributeError in upload command with Python 2.4.

---
1.1
---

* `Issue #71 <https://bitbucket.org/pypa/setuptools/issue/71>`_ (`Distribute #333 <https://bitbucket.org/tarek/distribute/issue/333>`_): EasyInstall now puts less emphasis on the
  condition when a host is blocked via ``--allow-hosts``.
* `Issue #72 <https://bitbucket.org/pypa/setuptools/issue/72>`_: Restored Python 2.4 compatibility in ``ez_setup.py``.

---
1.0
---

* `Issue #60 <https://bitbucket.org/pypa/setuptools/issue/60>`_: On Windows, Setuptools supports deferring to another launcher,
  such as Vinay Sajip's `pylauncher <https://bitbucket.org/pypa/pylauncher>`_
  (included with Python 3.3) to launch console and GUI scripts and not install
  its own launcher executables. This experimental functionality is currently
  only enabled if  the ``SETUPTOOLS_LAUNCHER`` environment variable is set to
  "natural". In the future, this behavior may become default, but only after
  it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER``
  also accepts "executable" to force the default behavior of creating launcher
  executables.
* `Issue #63 <https://bitbucket.org/pypa/setuptools/issue/63>`_: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or
  wget for retrieving the Setuptools tarball for improved security of the
  install. The script will still fall back to a simple ``urlopen`` on
  platforms that do not have these tools.
* `Issue #65 <https://bitbucket.org/pypa/setuptools/issue/65>`_: Deprecated the ``Features`` functionality.
* `Issue #52 <https://bitbucket.org/pypa/setuptools/issue/52>`_: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied)
  connection.

Backward-Incompatible Changes
=============================

This release includes a couple of backward-incompatible changes, but most if
not all users will find 1.0 a drop-in replacement for 0.9.

* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: Normalized API of environment marker support. Specifically,
  removed line number and filename from SyntaxErrors when returned from
  `pkg_resources.invalid_marker`. Any clients depending on the specific
  string representation of exceptions returned by that function may need to
  be updated to account for this change.
* `Issue #50 <https://bitbucket.org/pypa/setuptools/issue/50>`_: SyntaxErrors generated by `pkg_resources.invalid_marker` are
  normalized for cross-implementation consistency.
* Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting``
  options to easy_install. These options have been deprecated since 0.6a11.

-----
0.9.8
-----

* `Issue #53 <https://bitbucket.org/pypa/setuptools/issue/53>`_: Fix NameErrors in `_vcs_split_rev_from_url`.

-----
0.9.7
-----

* `Issue #49 <https://bitbucket.org/pypa/setuptools/issue/49>`_: Correct AttributeError on PyPy where a hashlib.HASH object does
  not have a `.name` attribute.
* `Issue #34 <https://bitbucket.org/pypa/setuptools/issue/34>`_: Documentation now refers to bootstrap script in code repository
  referenced by bookmark.
* Add underscore-separated keys to environment markers (markerlib).

-----
0.9.6
-----

* `Issue #44 <https://bitbucket.org/pypa/setuptools/issue/44>`_: Test failure on Python 2.4 when MD5 hash doesn't have a `.name`
  attribute.

-----
0.9.5
-----

* `Python #17980 <http://bugs.python.org/issue17980>`_: Fix security vulnerability in SSL certificate validation.

-----
0.9.4
-----

* `Issue #43 <https://bitbucket.org/pypa/setuptools/issue/43>`_: Fix issue (introduced in 0.9.1) with version resolution when
  upgrading over other releases of Setuptools.

-----
0.9.3
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix new ``AttributeError`` introduced in last fix.

-----
0.9.2
-----

* `Issue #42 <https://bitbucket.org/pypa/setuptools/issue/42>`_: Fix regression where blank checksums would trigger an
  ``AttributeError``.

-----
0.9.1
-----

* `Distribute #386 <https://bitbucket.org/tarek/distribute/issue/386>`_: Allow other positional and keyword arguments to os.open.
* Corrected dependency on certifi mis-referenced in 0.9.

---
0.9
---

* `package_index` now validates hashes other than MD5 in download links.

---
0.8
---

* Code base now runs on Python 2.4 - Python 3.3 without Python 2to3
  conversion.

-----
0.7.8
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Yet another fix for yet another regression.

-----
0.7.7
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release (redo).
* `Issue #30 <https://bitbucket.org/pypa/setuptools/issue/30>`_: Added test for get_cache_path.

-----
0.7.6
-----

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Repair AttributeError created in last release.

-----
0.7.5
-----

* `Issue #21 <https://bitbucket.org/pypa/setuptools/issue/21>`_: Restore Python 2.4 compatibility in ``test_easy_install``.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Merged additional warning from Distribute 0.6.46.
* Now honor the environment variable
  ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now
  deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``.

-----
0.7.4
-----

* `Issue #20 <https://bitbucket.org/pypa/setuptools/issue/20>`_: Fix comparison of parsed SVN version on Python 3.

-----
0.7.3
-----

* `Issue #1 <https://bitbucket.org/pypa/setuptools/issue/1>`_: Disable installation of Windows-specific files on non-Windows systems.
* Use new sysconfig module with Python 2.7 or >=3.2.

-----
0.7.2
-----

* `Issue #14 <https://bitbucket.org/pypa/setuptools/issue/14>`_: Use markerlib when the `parser` module is not available.
* `Issue #10 <https://bitbucket.org/pypa/setuptools/issue/10>`_: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI.

-----
0.7.1
-----

* Fix NameError (`Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_) again - broken in bad merge.

---
0.7
---

* Merged Setuptools and Distribute. See docs/merge.txt for details.

Added several features that were slated for setuptools 0.6c12:

* Index URL now defaults to HTTPS.
* Added experimental environment marker support. Now clients may designate a
  PEP-426 environment marker for "extra" dependencies. Setuptools uses this
  feature in ``setup.py`` for optional SSL and certificate validation support
  on older platforms. Based on Distutils-SIG discussions, the syntax is
  somewhat tentative. There should probably be a PEP with a firmer spec before
  the feature should be considered suitable for use.
* Added support for SSL certificate validation when installing packages from
  an HTTPS service.

-----
0.7b4
-----

* `Issue #3 <https://bitbucket.org/pypa/setuptools/issue/3>`_: Fixed NameError in SSL support.

------
0.6.49
------

* Move warning check in ``get_cache_path`` to follow the directory creation
  to avoid errors when the cache path does not yet exist. Fixes the error
  reported in `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_.

------
0.6.48
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46 (redo).

------
0.6.47
------

* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in
  0.6.46.

------
0.6.46
------

* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Issue a warning if the PYTHON_EGG_CACHE or otherwise
  customized egg cache location specifies a directory that's group- or
  world-writable.

------
0.6.45
------

* `Distribute #379 <https://bitbucket.org/tarek/distribute/issue/379>`_: ``distribute_setup.py`` now traps VersionConflict as well,
  restoring ability to upgrade from an older setuptools version.

------
0.6.44
------

* ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to
  satisfy use_setuptools.

------
0.6.43
------

* `Distribute #378 <https://bitbucket.org/tarek/distribute/issue/378>`_: Restore support for Python 2.4 Syntax (regression in 0.6.42).

------
0.6.42
------

* External links finder no longer yields duplicate links.
* `Distribute #337 <https://bitbucket.org/tarek/distribute/issue/337>`_: Moved site.py to setuptools/site-patch.py (graft of very old
  patch from setuptools trunk which inspired PR `#31 <https://bitbucket.org/pypa/setuptools/issue/31>`_).

------
0.6.41
------

* `Distribute #27 <https://bitbucket.org/tarek/distribute/issue/27>`_: Use public api for loading resources from zip files rather than
  the private method `_zip_directory_cache`.
* Added a new function ``easy_install.get_win_launcher`` which may be used by
  third-party libraries such as buildout to get a suitable script launcher.

------
0.6.40
------

* `Distribute #376 <https://bitbucket.org/tarek/distribute/issue/376>`_: brought back cli.exe and gui.exe that were deleted in the
  previous release.

------
0.6.39
------

* Add support for console launchers on ARM platforms.
* Fix possible issue in GUI launchers where the subsystem was not supplied to
  the linker.
* Launcher build script now refactored for robustness.
* `Distribute #375 <https://bitbucket.org/tarek/distribute/issue/375>`_: Resources extracted from a zip egg to the file system now also
  check the contents of the file against the zip contents during each
  invocation of get_resource_filename.

------
0.6.38
------

* `Distribute #371 <https://bitbucket.org/tarek/distribute/issue/371>`_: The launcher manifest file is now installed properly.

------
0.6.37
------

* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Launcher scripts, including easy_install itself, are now
  accompanied by a manifest on 32-bit Windows environments to avoid the
  Installer Detection Technology and thus undesirable UAC elevation described
  in `this Microsoft article
  <http://technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx>`_.

------
0.6.36
------

* `Pull Request #35 <https://bitbucket.org/pypa/setuptools/pull-request/35>`_: In `Buildout #64 <https://github.com/buildout/buildout/issues/64>`_, it was reported that
  under Python 3, installation of distutils scripts could attempt to copy
  the ``__pycache__`` directory as a file, causing an error, apparently only
  under Windows. Easy_install now skips all directories when processing
  metadata scripts.

------
0.6.35
------


Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in
how it parses version numbers.

* `Distribute #278 <https://bitbucket.org/tarek/distribute/issue/278>`_: Restored compatibility with distribute 0.6.22 and setuptools
  0.6. Updated the documentation to match more closely with the version
  parsing as intended in setuptools 0.6.

------
0.6.34
------

* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: 0.6.33 fails to build under Python 2.4.

------
0.6.33
------

* Fix 2 errors with Jython 2.5.
* Fix 1 failure with Jython 2.5 and 2.7.
* Disable workaround for Jython scripts on Linux systems.
* `Distribute #336 <https://bitbucket.org/tarek/distribute/issue/336>`_: `setup.py` no longer masks failure exit code when tests fail.
* Fix issue in pkg_resources where try/except around a platform-dependent
  import would trigger hook load failures on Mercurial. See pull request 32
  for details.
* `Distribute #341 <https://bitbucket.org/tarek/distribute/issue/341>`_: Fix a ResourceWarning.

------
0.6.32
------

* Fix test suite with Python 2.6.
* Fix some DeprecationWarnings and ResourceWarnings.
* `Distribute #335 <https://bitbucket.org/tarek/distribute/issue/335>`_: Backed out `setup_requires` superceding installed requirements
  until regression can be addressed.

------
0.6.31
------

* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Make sure the manifest only ever contains UTF-8 in Python 3.
* `Distribute #329 <https://bitbucket.org/tarek/distribute/issue/329>`_: Properly close files created by tests for compatibility with
  Jython.
* Work around `Jython #1980 <http://bugs.jython.org/issue1980>`_ and `Jython #1981 <http://bugs.jython.org/issue1981>`_.
* `Distribute #334 <https://bitbucket.org/tarek/distribute/issue/334>`_: Provide workaround for packages that reference `sys.__stdout__`
  such as numpy does. This change should address
  `virtualenv `#359 <https://bitbucket.org/pypa/setuptools/issue/359>`_ <https://github.com/pypa/virtualenv/issues/359>`_ as long
  as the system encoding is UTF-8 or the IO encoding is specified in the
  environment, i.e.::

     PYTHONIOENCODING=utf8 pip install numpy

* Fix for encoding issue when installing from Windows executable on Python 3.
* `Distribute #323 <https://bitbucket.org/tarek/distribute/issue/323>`_: Allow `setup_requires` requirements to supercede installed
  requirements. Added some new keyword arguments to existing pkg_resources
  methods. Also had to updated how __path__ is handled for namespace packages
  to ensure that when a new egg distribution containing a namespace package is
  placed on sys.path, the entries in __path__ are found in the same order they
  would have been in had that egg been on the path when pkg_resources was
  first imported.

------
0.6.30
------

* `Distribute #328 <https://bitbucket.org/tarek/distribute/issue/328>`_: Clean up temporary directories in distribute_setup.py.
* Fix fatal bug in distribute_setup.py.

------
0.6.29
------

* `Pull Request #14 <https://bitbucket.org/pypa/setuptools/pull-request/14>`_: Honor file permissions in zip files.
* `Distribute #327 <https://bitbucket.org/tarek/distribute/issue/327>`_: Merged pull request `#24 <https://bitbucket.org/pypa/setuptools/issue/24>`_ to fix a dependency problem with pip.
* Merged pull request `#23 <https://bitbucket.org/pypa/setuptools/issue/23>`_ to fix https://github.com/pypa/virtualenv/issues/301.
* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx`
  to produce uploadable documentation.
* `Distribute #326 <https://bitbucket.org/tarek/distribute/issue/326>`_: `upload_docs` provided mangled auth credentials under Python 3.
* `Distribute #320 <https://bitbucket.org/tarek/distribute/issue/320>`_: Fix check for "createable" in distribute_setup.py.
* `Distribute #305 <https://bitbucket.org/tarek/distribute/issue/305>`_: Remove a warning that was triggered during normal operations.
* `Distribute #311 <https://bitbucket.org/tarek/distribute/issue/311>`_: Print metadata in UTF-8 independent of platform.
* `Distribute #303 <https://bitbucket.org/tarek/distribute/issue/303>`_: Read manifest file with UTF-8 encoding under Python 3.
* `Distribute #301 <https://bitbucket.org/tarek/distribute/issue/301>`_: Allow to run tests of namespace packages when using 2to3.
* `Distribute #304 <https://bitbucket.org/tarek/distribute/issue/304>`_: Prevent import loop in site.py under Python 3.3.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3.
* `Distribute #299 <https://bitbucket.org/tarek/distribute/issue/299>`_: The develop command didn't work on Python 3, when using 2to3,
  as the egg link would go to the Python 2 source. Linking to the 2to3'd code
  in build/lib makes it work, although you will have to rebuild the module
  before testing it.
* `Distribute #306 <https://bitbucket.org/tarek/distribute/issue/306>`_: Even if 2to3 is used, we build in-place under Python 2.
* `Distribute #307 <https://bitbucket.org/tarek/distribute/issue/307>`_: Prints the full path when .svn/entries is broken.
* `Distribute #313 <https://bitbucket.org/tarek/distribute/issue/313>`_: Support for sdist subcommands (Python 2.7)
* `Distribute #314 <https://bitbucket.org/tarek/distribute/issue/314>`_: test_local_index() would fail an OS X.
* `Distribute #310 <https://bitbucket.org/tarek/distribute/issue/310>`_: Non-ascii characters in a namespace __init__.py causes errors.
* `Distribute #218 <https://bitbucket.org/tarek/distribute/issue/218>`_: Improved documentation on behavior of `package_data` and
  `include_package_data`. Files indicated by `package_data` are now included
  in the manifest.
* `distribute_setup.py` now allows a `--download-base` argument for retrieving
  distribute from a specified location.

------
0.6.28
------

* `Distribute #294 <https://bitbucket.org/tarek/distribute/issue/294>`_: setup.py can now be invoked from any directory.
* Scripts are now installed honoring the umask.
* Added support for .dist-info directories.
* `Distribute #283 <https://bitbucket.org/tarek/distribute/issue/283>`_: Fix and disable scanning of `*.pyc` / `*.pyo` files on
  Python 3.3.

------
0.6.27
------

* Support current snapshots of CPython 3.3.
* Distribute now recognizes README.rst as a standard, default readme file.
* Exclude 'encodings' modules when removing modules from sys.modules.
  Workaround for `#285 <https://bitbucket.org/pypa/setuptools/issue/285>`_.
* `Distribute #231 <https://bitbucket.org/tarek/distribute/issue/231>`_: Don't fiddle with system python when used with buildout
  (bootstrap.py)

------
0.6.26
------

* `Distribute #183 <https://bitbucket.org/tarek/distribute/issue/183>`_: Symlinked files are now extracted from source distributions.
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: Easy_install fetch parameters are now passed during the
  installation of a source distribution; now fulfillment of setup_requires
  dependencies will honor the parameters passed to easy_install.

------
0.6.25
------

* `Distribute #258 <https://bitbucket.org/tarek/distribute/issue/258>`_: Workaround a cache issue
* `Distribute #260 <https://bitbucket.org/tarek/distribute/issue/260>`_: distribute_setup.py now accepts the --user parameter for
  Python 2.6 and later.
* `Distribute #262 <https://bitbucket.org/tarek/distribute/issue/262>`_: package_index.open_with_auth no longer throws LookupError
  on Python 3.
* `Distribute #269 <https://bitbucket.org/tarek/distribute/issue/269>`_: AttributeError when an exception occurs reading Manifest.in
  on late releases of Python.
* `Distribute #272 <https://bitbucket.org/tarek/distribute/issue/272>`_: Prevent TypeError when namespace package names are unicode
  and single-install-externally-managed is used. Also fixes PIP issue
  449.
* `Distribute #273 <https://bitbucket.org/tarek/distribute/issue/273>`_: Legacy script launchers now install with Python2/3 support.

------
0.6.24
------

* `Distribute #249 <https://bitbucket.org/tarek/distribute/issue/249>`_: Added options to exclude 2to3 fixers

------
0.6.23
------

* `Distribute #244 <https://bitbucket.org/tarek/distribute/issue/244>`_: Fixed a test
* `Distribute #243 <https://bitbucket.org/tarek/distribute/issue/243>`_: Fixed a test
* `Distribute #239 <https://bitbucket.org/tarek/distribute/issue/239>`_: Fixed a test
* `Distribute #240 <https://bitbucket.org/tarek/distribute/issue/240>`_: Fixed a test
* `Distribute #241 <https://bitbucket.org/tarek/distribute/issue/241>`_: Fixed a test
* `Distribute #237 <https://bitbucket.org/tarek/distribute/issue/237>`_: Fixed a test
* `Distribute #238 <https://bitbucket.org/tarek/distribute/issue/238>`_: easy_install now uses 64bit executable wrappers on 64bit Python
* `Distribute #208 <https://bitbucket.org/tarek/distribute/issue/208>`_: Fixed parsed_versions, it now honors post-releases as noted in the documentation
* `Distribute #207 <https://bitbucket.org/tarek/distribute/issue/207>`_: Windows cli and gui wrappers pass CTRL-C to child python process
* `Distribute #227 <https://bitbucket.org/tarek/distribute/issue/227>`_: easy_install now passes its arguments to setup.py bdist_egg
* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: Fixed a NameError on Python 2.5, 2.4

------
0.6.21
------

* `Distribute #225 <https://bitbucket.org/tarek/distribute/issue/225>`_: FIxed a regression on py2.4

------
0.6.20
------

* `Distribute #135 <https://bitbucket.org/tarek/distribute/issue/135>`_: Include url in warning when processing URLs in package_index.
* `Distribute #212 <https://bitbucket.org/tarek/distribute/issue/212>`_: Fix issue where easy_instal fails on Python 3 on windows installer.
* `Distribute #213 <https://bitbucket.org/tarek/distribute/issue/213>`_: Fix typo in documentation.

------
0.6.19
------

* `Distribute #206 <https://bitbucket.org/tarek/distribute/issue/206>`_: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

------
0.6.18
------

* `Distribute #210 <https://bitbucket.org/tarek/distribute/issue/210>`_: Fixed a regression introduced by `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_ fix.

------
0.6.17
------

* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment
  variable to allow to disable installation of easy_install-${version} script.
* Support Python >=3.1.4 and >=3.2.1.
* `Distribute #204 <https://bitbucket.org/tarek/distribute/issue/204>`_: Don't try to import the parent of a namespace package in
  declare_namespace
* `Distribute #196 <https://bitbucket.org/tarek/distribute/issue/196>`_: Tolerate responses with multiple Content-Length headers
* `Distribute #205 <https://bitbucket.org/tarek/distribute/issue/205>`_: Sandboxing doesn't preserve working_set. Leads to setup_requires
  problems.

------
0.6.16
------

* Builds sdist gztar even on Windows (avoiding `Distribute #193 <https://bitbucket.org/tarek/distribute/issue/193>`_).
* `Distribute #192 <https://bitbucket.org/tarek/distribute/issue/192>`_: Fixed metadata omitted on Windows when package_dir
  specified with forward-slash.
* `Distribute #195 <https://bitbucket.org/tarek/distribute/issue/195>`_: Cython build support.
* `Distribute #200 <https://bitbucket.org/tarek/distribute/issue/200>`_: Issues with recognizing 64-bit packages on Windows.

------
0.6.15
------

* Fixed typo in bdist_egg
* Several issues under Python 3 has been solved.
* `Distribute #146 <https://bitbucket.org/tarek/distribute/issue/146>`_: Fixed missing DLL files after easy_install of windows exe package.

------
0.6.14
------

* `Distribute #170 <https://bitbucket.org/tarek/distribute/issue/170>`_: Fixed unittest failure. Thanks to Toshio.
* `Distribute #171 <https://bitbucket.org/tarek/distribute/issue/171>`_: Fixed race condition in unittests cause deadlocks in test suite.
* `Distribute #143 <https://bitbucket.org/tarek/distribute/issue/143>`_: Fixed a lookup issue with easy_install.
  Thanks to David and Zooko.
* `Distribute #174 <https://bitbucket.org/tarek/distribute/issue/174>`_: Fixed the edit mode when its used with setuptools itself

------
0.6.13
------

* `Distribute #160 <https://bitbucket.org/tarek/distribute/issue/160>`_: 2.7 gives ValueError("Invalid IPv6 URL")
* `Distribute #150 <https://bitbucket.org/tarek/distribute/issue/150>`_: Fixed using ~/.local even in a --no-site-packages virtualenv
* `Distribute #163 <https://bitbucket.org/tarek/distribute/issue/163>`_: scan index links before external links, and don't use the md5 when
  comparing two distributions

------
0.6.12
------

* `Distribute #149 <https://bitbucket.org/tarek/distribute/issue/149>`_: Fixed various failures on 2.3/2.4

------
0.6.11
------

* Found another case of SandboxViolation - fixed
* `Distribute #15 <https://bitbucket.org/tarek/distribute/issue/15>`_ and `Distribute #48 <https://bitbucket.org/tarek/distribute/issue/48>`_: Introduced a socket timeout of 15 seconds on url openings
* Added indexsidebar.html into MANIFEST.in
* `Distribute #108 <https://bitbucket.org/tarek/distribute/issue/108>`_: Fixed TypeError with Python3.1
* `Distribute #121 <https://bitbucket.org/tarek/distribute/issue/121>`_: Fixed --help install command trying to actually install.
* `Distribute #112 <https://bitbucket.org/tarek/distribute/issue/112>`_: Added an os.makedirs so that Tarek's solution will work.
* `Distribute #133 <https://bitbucket.org/tarek/distribute/issue/133>`_: Added --no-find-links to easy_install
* Added easy_install --user
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: Fixed develop --user not taking '.' in PYTHONPATH into account
* `Distribute #134 <https://bitbucket.org/tarek/distribute/issue/134>`_: removed spurious UserWarnings. Patch by VanLindberg
* `Distribute #138 <https://bitbucket.org/tarek/distribute/issue/138>`_: cant_write_to_target error when setup_requires is used.
* `Distribute #147 <https://bitbucket.org/tarek/distribute/issue/147>`_: respect the sys.dont_write_bytecode flag

------
0.6.10
------

* Reverted change made for the DistributionNotFound exception because
  zc.buildout uses the exception message to get the name of the
  distribution.

-----
0.6.9
-----

* `Distribute #90 <https://bitbucket.org/tarek/distribute/issue/90>`_: unknown setuptools version can be added in the working set
* `Distribute #87 <https://bitbucket.org/tarek/distribute/issue/87>`_: setupt.py doesn't try to convert distribute_setup.py anymore
  Initial Patch by arfrever.
* `Distribute #89 <https://bitbucket.org/tarek/distribute/issue/89>`_: added a side bar with a download link to the doc.
* `Distribute #86 <https://bitbucket.org/tarek/distribute/issue/86>`_: fixed missing sentence in pkg_resources doc.
* Added a nicer error message when a DistributionNotFound is raised.
* `Distribute #80 <https://bitbucket.org/tarek/distribute/issue/80>`_: test_develop now works with Python 3.1
* `Distribute #93 <https://bitbucket.org/tarek/distribute/issue/93>`_: upload_docs now works if there is an empty sub-directory.
* `Distribute #70 <https://bitbucket.org/tarek/distribute/issue/70>`_: exec bit on non-exec files
* `Distribute #99 <https://bitbucket.org/tarek/distribute/issue/99>`_: now the standalone easy_install command doesn't uses a
  "setup.cfg" if any exists in the working directory. It will use it
  only if triggered by ``install_requires`` from a setup.py call
  (install, develop, etc).
* `Distribute #101 <https://bitbucket.org/tarek/distribute/issue/101>`_: Allowing ``os.devnull`` in Sandbox
* `Distribute #92 <https://bitbucket.org/tarek/distribute/issue/92>`_: Fixed the "no eggs" found error with MacPort
  (platform.mac_ver() fails)
* `Distribute #103 <https://bitbucket.org/tarek/distribute/issue/103>`_: test_get_script_header_jython_workaround not run
  anymore under py3 with C or POSIX local. Contributed by Arfrever.
* `Distribute #104 <https://bitbucket.org/tarek/distribute/issue/104>`_: remvoved the assertion when the installation fails,
  with a nicer message for the end user.
* `Distribute #100 <https://bitbucket.org/tarek/distribute/issue/100>`_: making sure there's no SandboxViolation when
  the setup script patches setuptools.

-----
0.6.8
-----

* Added "check_packages" in dist. (added in Setuptools 0.6c11)
* Fixed the DONT_PATCH_SETUPTOOLS state.

-----
0.6.7
-----

* `Distribute #58 <https://bitbucket.org/tarek/distribute/issue/58>`_: Added --user support to the develop command
* `Distribute #11 <https://bitbucket.org/tarek/distribute/issue/11>`_: Generated scripts now wrap their call to the script entry point
  in the standard "if name == 'main'"
* Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv
  can drive an installation that doesn't patch a global setuptools.
* Reviewed unladen-swallow specific change from
  http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719
  and determined that it no longer applies. Distribute should work fine with
  Unladen Swallow 2009Q3.
* `Distribute #21 <https://bitbucket.org/tarek/distribute/issue/21>`_: Allow PackageIndex.open_url to gracefully handle all cases of a
  httplib.HTTPException instead of just InvalidURL and BadStatusLine.
* Removed virtual-python.py from this distribution and updated documentation
  to point to the actively maintained virtualenv instead.
* `Distribute #64 <https://bitbucket.org/tarek/distribute/issue/64>`_: use_setuptools no longer rebuilds the distribute egg every
  time it is run
* use_setuptools now properly respects the requested version
* use_setuptools will no longer try to import a distribute egg for the
  wrong Python version
* `Distribute #74 <https://bitbucket.org/tarek/distribute/issue/74>`_: no_fake should be True by default.
* `Distribute #72 <https://bitbucket.org/tarek/distribute/issue/72>`_: avoid a bootstrapping issue with easy_install -U

-----
0.6.6
-----

* Unified the bootstrap file so it works on both py2.x and py3k without 2to3
  (patch by Holger Krekel)

-----
0.6.5
-----

* `Distribute #65 <https://bitbucket.org/tarek/distribute/issue/65>`_: cli.exe and gui.exe are now generated at build time,
  depending on the platform in use.

* `Distribute #67 <https://bitbucket.org/tarek/distribute/issue/67>`_: Fixed doc typo (PEP 381/382)

* Distribute no longer shadows setuptools if we require a 0.7-series
  setuptools.  And an error is raised when installing a 0.7 setuptools with
  distribute.

* When run from within buildout, no attempt is made to modify an existing
  setuptools egg, whether in a shared egg directory or a system setuptools.

* Fixed a hole in sandboxing allowing builtin file to write outside of
  the sandbox.

-----
0.6.4
-----

* Added the generation of `distribute_setup_3k.py` during the release.
  This closes `Distribute #52 <https://bitbucket.org/tarek/distribute/issue/52>`_.

* Added an upload_docs command to easily upload project documentation to
  PyPI's https://pythonhosted.org. This close issue `Distribute #56 <https://bitbucket.org/tarek/distribute/issue/56>`_.

* Fixed a bootstrap bug on the use_setuptools() API.

-----
0.6.3
-----

setuptools
==========

* Fixed a bunch of calls to file() that caused crashes on Python 3.

bootstrapping
=============

* Fixed a bug in sorting that caused bootstrap to fail on Python 3.

-----
0.6.2
-----

setuptools
==========

* Added Python 3 support; see docs/python3.txt.
  This closes `Old Setuptools #39 <http://bugs.python.org/setuptools/issue39>`_.

* Added option to run 2to3 automatically when installing on Python 3.
  This closes issue `Distribute #31 <https://bitbucket.org/tarek/distribute/issue/31>`_.

* Fixed invalid usage of requirement.parse, that broke develop -d.
  This closes `Old Setuptools #44 <http://bugs.python.org/setuptools/issue44>`_.

* Fixed script launcher for 64-bit Windows.
  This closes `Old Setuptools #2 <http://bugs.python.org/setuptools/issue2>`_.

* KeyError when compiling extensions.
  This closes `Old Setuptools #41 <http://bugs.python.org/setuptools/issue41>`_.

bootstrapping
=============

* Fixed bootstrap not working on Windows. This closes issue `Distribute #49 <https://bitbucket.org/tarek/distribute/issue/49>`_.

* Fixed 2.6 dependencies. This closes issue `Distribute #50 <https://bitbucket.org/tarek/distribute/issue/50>`_.

* Make sure setuptools is patched when running through easy_install
  This closes `Old Setuptools #40 <http://bugs.python.org/setuptools/issue40>`_.

-----
0.6.1
-----

setuptools
==========

* package_index.urlopen now catches BadStatusLine and malformed url errors.
  This closes `Distribute #16 <https://bitbucket.org/tarek/distribute/issue/16>`_ and `Distribute #18 <https://bitbucket.org/tarek/distribute/issue/18>`_.

* zip_ok is now False by default. This closes `Old Setuptools #33 <http://bugs.python.org/setuptools/issue33>`_.

* Fixed invalid URL error catching. `Old Setuptools #20 <http://bugs.python.org/setuptools/issue20>`_.

* Fixed invalid bootstraping with easy_install installation (`Distribute #40 <https://bitbucket.org/tarek/distribute/issue/40>`_).
  Thanks to Florian Schulze for the help.

* Removed buildout/bootstrap.py. A new repository will create a specific
  bootstrap.py script.


bootstrapping
=============

* The boostrap process leave setuptools alone if detected in the system
  and --root or --prefix is provided, but is not in the same location.
  This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

---
0.6
---

setuptools
==========

* Packages required at build time where not fully present at install time.
  This closes `Distribute #12 <https://bitbucket.org/tarek/distribute/issue/12>`_.

* Protected against failures in tarfile extraction. This closes `Distribute #10 <https://bitbucket.org/tarek/distribute/issue/10>`_.

* Made Jython api_tests.txt doctest compatible. This closes `Distribute #7 <https://bitbucket.org/tarek/distribute/issue/7>`_.

* sandbox.py replaced builtin type file with builtin function open. This
  closes `Distribute #6 <https://bitbucket.org/tarek/distribute/issue/6>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

* Added compatibility with Subversion 1.6. This references `Distribute #1 <https://bitbucket.org/tarek/distribute/issue/1>`_.

pkg_resources
=============

* Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API
  instead. Based on a patch from ronaldoussoren. This closes issue `#5 <https://bitbucket.org/pypa/setuptools/issue/5>`_.

* Fixed a SandboxViolation for mkdir that could occur in certain cases.
  This closes `Distribute #13 <https://bitbucket.org/tarek/distribute/issue/13>`_.

* Allow to find_on_path on systems with tight permissions to fail gracefully.
  This closes `Distribute #9 <https://bitbucket.org/tarek/distribute/issue/9>`_.

* Corrected inconsistency between documentation and code of add_entry.
  This closes `Distribute #8 <https://bitbucket.org/tarek/distribute/issue/8>`_.

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

easy_install
============

* Immediately close all file handles. This closes `Distribute #3 <https://bitbucket.org/tarek/distribute/issue/3>`_.

-----
0.6c9
-----

 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.

 * Updated Pyrex support to work with Pyrex 0.9.6 and higher.

 * Minor changes for Jython compatibility, including skipping tests that can't
   work on Jython.

 * Fixed not installing eggs in ``install_requires`` if they were also used for
   ``setup_requires`` or ``tests_require``.

 * Fixed not fetching eggs in ``install_requires`` when running tests.

 * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools
   installations when called from a standalone ``setup.py``.

 * Added a warning if a namespace package is declared, but its parent package
   is not also declared as a namespace.

 * Support Subversion 1.5

 * Removed use of deprecated ``md5`` module if ``hashlib`` is available

 * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice

 * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's
   ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``.

 * Ensure that _full_name is set on all shared libs before extensions are
   checked for shared lib usage.  (Fixes a bug in the experimental shared
   library build support.)

 * Fix to allow unpacked eggs containing native libraries to fail more
   gracefully under Google App Engine (with an ``ImportError`` loading the
   C-based module, instead of getting a ``NameError``).

-----
0.6c7
-----

 * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and
   ``egg_info`` command failing on new, uncommitted SVN directories.

 * Fix import problems with nested namespace packages installed via
   ``--root`` or ``--single-version-externally-managed``, due to the
   parent package not having the child package as an attribute.

-----
0.6c6
-----

 * Added ``--egg-path`` option to ``develop`` command, allowing you to force
   ``.egg-link`` files to use relative paths (allowing them to be shared across
   platforms on a networked drive).

 * Fix not building binary RPMs correctly.

 * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with
   bash-compatible shells.

 * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there
   was whitespace inside a quoted argument or at the end of the ``#!`` line
   (a regression introduced in 0.6c4).

 * Fix ``test`` command possibly failing if an older version of the project
   being tested was installed on ``sys.path`` ahead of the test source
   directory.

 * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in
   their names as packages.

-----
0.6c5
-----

 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg``
   packages under Python versions less than 2.5.

 * Fix uploaded ``bdist_wininst`` packages being described as suitable for
   "any" version by Python 2.5, even if a ``--target-version`` was specified.

-----
0.6c4
-----

 * Overhauled Windows script wrapping to support ``bdist_wininst`` better.
   Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or
   ``#!pythonw.exe`` as the executable name (even when built on non-Windows
   platforms!), and the wrappers will look for the executable in the script's
   parent directory (which should find the right version of Python).

 * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
   ``bdist_wininst`` under Python 2.3 and 2.4.

 * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is
   prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish
   platforms.  (This is mainly so that setuptools itself can have a single-file
   installer on Unix, without doing multiple downloads, dealing with firewalls,
   etc.)

 * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files

 * Use cross-platform relative paths in ``easy-install.pth`` when doing
   ``develop`` and the source directory is a subdirectory of the installation
   target directory.

 * Fix a problem installing eggs with a system packaging tool if the project
   contained an implicit namespace package; for example if the ``setup()``
   listed a namespace package ``foo.bar`` without explicitly listing ``foo``
   as a namespace package.

-----
0.6c3
-----

 * Fixed breakages caused by Subversion 1.4's new "working copy" format

-----
0.6c2
-----

 * The ``ez_setup`` module displays the conflicting version of setuptools (and
   its installation location) when a script requests a version that's not
   available.

 * Running ``setup.py develop`` on a setuptools-using project will now install
   setuptools if needed, instead of only downloading the egg.

-----
0.6c1
-----

 * Fixed ``AttributeError`` when trying to download a ``setup_requires``
   dependency when a distribution lacks a ``dependency_links`` setting.

 * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so
   as to play better with packaging tools that complain about zero-length
   files.

 * Made ``setup.py develop`` respect the ``--no-deps`` option, which it
   previously was ignoring.

 * Support ``extra_path`` option to ``setup()`` when ``install`` is run in
   backward-compatibility mode.

 * Source distributions now always include a ``setup.cfg`` file that explicitly
   sets ``egg_info`` options such that they produce an identical version number
   to the source distribution's version number.  (Previously, the default
   version number could be different due to the use of ``--tag-date``, or if
   the version was overridden on the command line that built the source
   distribution.)

-----
0.6b4
-----

 * Fix ``register`` not obeying name/version set by ``egg_info`` command, if
   ``egg_info`` wasn't explicitly run first on the same command line.

 * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info``
   command, to allow suppressing tags configured in ``setup.cfg``.

 * Fixed redundant warnings about missing ``README`` file(s); it should now
   appear only if you are actually a source distribution.

-----
0.6b3
-----

 * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``.

 * Allow ``.py`` files found by the ``include_package_data`` option to be
   automatically included.  Remove duplicate data file matches if both
   ``include_package_data`` and ``package_data`` are used to refer to the same
   files.

-----
0.6b1
-----

 * Strip ``module`` from the end of compiled extension modules when computing
   the name of a ``.py`` loader/wrapper.  (Python's import machinery ignores
   this suffix when searching for an extension module.)

------
0.6a11
------

 * Added ``test_loader`` keyword to support custom test loaders

 * Added ``setuptools.file_finders`` entry point group to allow implementing
   revision control plugins.

 * Added ``--identity`` option to ``upload`` command.

 * Added ``dependency_links`` to allow specifying URLs for ``--find-links``.

 * Enhanced test loader to scan packages as well as modules, and call
   ``additional_tests()`` if present to get non-unittest tests.

 * Support namespace packages in conjunction with system packagers, by omitting
   the installation of any ``__init__.py`` files for namespace packages, and
   adding a special ``.pth`` file to create a working package in
   ``sys.modules``.

 * Made ``--single-version-externally-managed`` automatic when ``--root`` is
   used, so that most system packagers won't require special support for
   setuptools.

 * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or
   other configuration files for their option defaults when installing, and
   also made the install use ``--multi-version`` mode so that the project
   directory doesn't need to support .pth files.

 * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading
   it.  Previously, the file could be left open and the actual error would be
   masked by problems trying to remove the open file on Windows systems.

------
0.6a10
------

 * Fixed the ``develop`` command ignoring ``--find-links``.

-----
0.6a9
-----

 * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to
   create source distributions.  ``MANIFEST.in`` is still read and processed,
   as are the standard defaults and pruning.  But the manifest is built inside
   the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt
   every time the ``egg_info`` command is run.

 * Added the ``include_package_data`` keyword to ``setup()``, allowing you to
   automatically include any package data listed in revision control or
   ``MANIFEST.in``

 * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to
   trim back files included via the ``package_data`` and
   ``include_package_data`` options.

 * Fixed ``--tag-svn-revision`` not working when run from a source
   distribution.

 * Added warning for namespace packages with missing ``declare_namespace()``

 * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages
   requiring ``nose`` to run unit tests can make this dependency optional
   unless the ``test`` command is run.

 * Made all commands that use ``easy_install`` respect its configuration
   options, as this was causing some problems with ``setup.py install``.

 * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so
   that you can process a directory tree through a processing filter as if it
   were a zipfile or tarfile.

 * Added an internal ``install_egg_info`` command to use as part of old-style
   ``install`` operations, that installs an ``.egg-info`` directory with the
   package.

 * Added a ``--single-version-externally-managed`` option to the ``install``
   command so that you can more easily wrap a "flat" egg in a system package.

 * Enhanced ``bdist_rpm`` so that it installs single-version eggs that
   don't rely on a ``.pth`` file.  The ``--no-egg`` option has been removed,
   since all RPMs are now built in a more backwards-compatible format.

 * Support full roundtrip translation of eggs to and from ``bdist_wininst``
   format.  Running ``bdist_wininst`` on a setuptools-based package wraps the
   egg in an .exe that will safely install it as an egg (i.e., with metadata
   and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
   back into an ``.egg`` file or directory and install it as such.


-----
0.6a8
-----

 * Fixed some problems building extensions when Pyrex was installed, especially
   with Python 2.4 and/or packages using SWIG.

 * Made ``develop`` command accept all the same options as ``easy_install``,
   and use the ``easy_install`` command's configuration settings as defaults.

 * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision
   number from ``PKG-INFO`` in case it is being run on a source distribution of
   a snapshot taken from a Subversion-based project.

 * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being
   installed as data, adding them to ``native_libs.txt`` automatically.

 * Fixed some problems with fresh checkouts of projects that don't include
   ``.egg-info/PKG-INFO`` under revision control and put the project's source
   code directly in the project directory.  If such a package had any
   requirements that get processed before the ``egg_info`` command can be run,
   the setup scripts would fail with a "Missing 'Version:' header and/or
   PKG-INFO file" error, because the egg runtime interpreted the unbuilt
   metadata in a directory on ``sys.path`` (i.e. the current directory) as
   being a corrupted egg.  Setuptools now monkeypatches the distribution
   metadata cache to pretend that the egg has valid version information, until
   it has a chance to make it actually be so (via the ``egg_info`` command).

-----
0.6a5
-----

 * Fixed missing gui/cli .exe files in distribution.  Fixed bugs in tests.

-----
0.6a3
-----

 * Added ``gui_scripts`` entry point group to allow installing GUI scripts
   on Windows and other platforms.  (The special handling is only for Windows;
   other platforms are treated the same as for ``console_scripts``.)

-----
0.6a2
-----

 * Added ``console_scripts`` entry point group to allow installing scripts
   without the need to create separate script files.  On Windows, console
   scripts get an ``.exe`` wrapper so you can just type their name.  On other
   platforms, the scripts are written without a file extension.

-----
0.6a1
-----

 * Added support for building "old-style" RPMs that don't install an egg for
   the target package, using a ``--no-egg`` option.

 * The ``build_ext`` command now works better when using the ``--inplace``
   option and multiple Python versions.  It now makes sure that all extensions
   match the current Python version, even if newer copies were built for a
   different Python version.

 * The ``upload`` command no longer attaches an extra ``.zip`` when uploading
   eggs, as PyPI now supports egg uploads without trickery.

 * The ``ez_setup`` script/module now displays a warning before downloading
   the setuptools egg, and attempts to check the downloaded egg against an
   internal MD5 checksum table.

 * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the
   latest revision number; it was using the revision number of the directory
   containing ``setup.py``, not the highest revision number in the project.

 * Added ``eager_resources`` setup argument

 * The ``sdist`` command now recognizes Subversion "deleted file" entries and
   does not include them in source distributions.

 * ``setuptools`` now embeds itself more thoroughly into the distutils, so that
   other distutils extensions (e.g. py2exe, py2app) will subclass setuptools'
   versions of things, rather than the native distutils ones.

 * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``;
   ``setup_requires`` allows you to automatically find and download packages
   that are needed in order to *build* your project (as opposed to running it).

 * ``setuptools`` now finds its commands, ``setup()`` argument validators, and
   metadata writers using entry points, so that they can be extended by
   third-party packages.  See `Creating distutils Extensions
   <http://pythonhosted.org/setuptools/setuptools.html#creating-distutils-extensions>`_
   for more details.

 * The vestigial ``depends`` command has been removed.  It was never finished
   or documented, and never would have worked without EasyInstall - which it
   pre-dated and was never compatible with.

------
0.5a12
------

 * The zip-safety scanner now checks for modules that might be used with
   ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't
   handle ``-m`` on zipped modules.

------
0.5a11
------

 * Fix breakage of the "develop" command that was caused by the addition of
   ``--always-unzip`` to the ``easy_install`` command.

-----
0.5a9
-----

 * Include ``svn:externals`` directories in source distributions as well as
   normal subversion-controlled files and directories.

 * Added ``exclude=patternlist`` option to ``setuptools.find_packages()``

 * Changed --tag-svn-revision to include an "r" in front of the revision number
   for better readability.

 * Added ability to build eggs without including source files (except for any
   scripts, of course), using the ``--exclude-source-files`` option to
   ``bdist_egg``.

 * ``setup.py install`` now automatically detects when an "unmanaged" package
   or module is going to be on ``sys.path`` ahead of a package being installed,
   thereby preventing the newer version from being imported.  If this occurs,
   a warning message is output to ``sys.stderr``, but installation proceeds
   anyway.  The warning message informs the user what files or directories
   need deleting, and advises them they can also use EasyInstall (with the
   ``--delete-conflicting`` option) to do it automatically.

 * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata
   directory that lists all top-level modules and packages in the distribution.
   This is used by the ``easy_install`` command to find possibly-conflicting
   "unmanaged" packages when installing the distribution.

 * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``.
   Added package analysis to determine zip-safety if the ``zip_safe`` flag
   is not given, and advise the author regarding what code might need changing.

 * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``.

-----
0.5a8
-----

 * The "egg_info" command now always sets the distribution metadata to "safe"
   forms of the distribution name and version, so that distribution files will
   be generated with parseable names (i.e., ones that don't include '-' in the
   name or version).  Also, this means that if you use the various ``--tag``
   options of "egg_info", any distributions generated will use the tags in the
   version, not just egg distributions.

 * Added support for defining command aliases in distutils configuration files,
   under the "[aliases]" section.  To prevent recursion and to allow aliases to
   call the command of the same name, a given alias can be expanded only once
   per command-line invocation.  You can define new aliases with the "alias"
   command, either for the local, global, or per-user configuration.

 * Added "rotate" command to delete old distribution files, given a set of
   patterns to match and the number of files to keep.  (Keeps the most
   recently-modified distribution files matching each pattern.)

 * Added "saveopts" command that saves all command-line options for the current
   invocation to the local, global, or per-user configuration file.  Useful for
   setting defaults without having to hand-edit a configuration file.

 * Added a "setopt" command that sets a single option in a specified distutils
   configuration file.

-----
0.5a7
-----

 * Added "upload" support for egg and source distributions, including a bug
   fix for "upload" and a temporary workaround for lack of .egg support in
   PyPI.

-----
0.5a6
-----

 * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it
   will include all files under revision control (CVS or Subversion) in the
   current directory, and it will regenerate the list every time you create a
   source distribution, not just when you tell it to.  This should make the
   default "do what you mean" more often than the distutils' default behavior
   did, while still retaining the old behavior in the presence of MANIFEST.in.

 * Fixed the "develop" command always updating .pth files, even if you
   specified ``-n`` or ``--dry-run``.

 * Slightly changed the format of the generated version when you use
   ``--tag-build`` on the "egg_info" command, so that you can make tagged
   revisions compare *lower* than the version specified in setup.py (e.g. by
   using ``--tag-build=dev``).

-----
0.5a5
-----

 * Added ``develop`` command to ``setuptools``-based packages.  This command
   installs an ``.egg-link`` pointing to the package's source directory, and
   script wrappers that ``execfile()`` the source versions of the package's
   scripts.  This lets you put your development checkout(s) on sys.path without
   having to actually install them.  (To uninstall the link, use
   use ``setup.py develop --uninstall``.)

 * Added ``egg_info`` command to ``setuptools``-based packages.  This command
   just creates or updates the "projectname.egg-info" directory, without
   building an egg.  (It's used by the ``bdist_egg``, ``test``, and ``develop``
   commands.)

 * Enhanced the ``test`` command so that it doesn't install the package, but
   instead builds any C extensions in-place, updates the ``.egg-info``
   metadata, adds the source directory to ``sys.path``, and runs the tests
   directly on the source.  This avoids an "unmanaged" installation of the
   package to ``site-packages`` or elsewhere.

 * Made ``easy_install`` a standard ``setuptools`` command, moving it from
   the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
   that if you were importing or extending it, you must now change your imports
   accordingly.  ``easy_install.py`` is still installed as a script, but not as
   a module.

-----
0.5a4
-----

 * Setup scripts using setuptools can now list their dependencies directly in
   the setup.py file, without having to manually create a ``depends.txt`` file.
   The ``install_requires`` and ``extras_require`` arguments to ``setup()``
   are used to create a dependencies file automatically.  If you are manually
   creating ``depends.txt`` right now, please switch to using these setup
   arguments as soon as practical, because ``depends.txt`` support will be
   removed in the 0.6 release cycle.  For documentation on the new arguments,
   see the ``setuptools.dist.Distribution`` class.

 * Setup scripts using setuptools now always install using ``easy_install``
   internally, for ease of uninstallation and upgrading.

-----
0.5a1
-----

 * Added support for "self-installation" bootstrapping.  Packages can now
   include ``ez_setup.py`` in their source distribution, and add the following
   to their ``setup.py``, in order to automatically bootstrap installation of
   setuptools as part of their setup process::

    from ez_setup import use_setuptools
    use_setuptools()

    from setuptools import setup
    # etc...

-----
0.4a2
-----

 * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools
   installation easier, and to allow distributions using setuptools to avoid
   having to include setuptools in their source distribution.

 * All downloads are now managed by the ``PackageIndex`` class (which is now
   subclassable and replaceable), so that embedders can more easily override
   download logic, give download progress reports, etc.  The class has also
   been moved to the new ``setuptools.package_index`` module.

 * The ``Installer`` class no longer handles downloading, manages a temporary
   directory, or tracks the ``zip_ok`` option.  Downloading is now handled
   by ``PackageIndex``, and ``Installer`` has become an ``easy_install``
   command class based on ``setuptools.Command``.

 * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup
   script in a directory sandbox, and a new ``setuptools.archive_util`` module
   with an ``unpack_archive()`` API.  These were split out of EasyInstall to
   allow reuse by other tools and applications.

 * ``setuptools.Command`` now supports reinitializing commands using keyword
   arguments to set/reset options.  Also, ``Command`` subclasses can now set
   their ``command_consumes_arguments`` attribute to ``True`` in order to
   receive an ``args`` option containing the rest of the command line.

-----
0.3a2
-----

 * Added new options to ``bdist_egg`` to allow tagging the egg's version number
   with a subversion revision number, the current date, or an explicit tag
   value.  Run ``setup.py bdist_egg --help`` to get more information.

 * Misc. bug fixes

-----
0.3a1
-----

 * Initial release.
doc/alt-python34-devel/README.valgrind000064400000010462150404236440013346 0ustar00This document describes some caveats about the use of Valgrind with
Python.  Valgrind is used periodically by Python developers to try
to ensure there are no memory leaks or invalid memory reads/writes.

If you don't want to read about the details of using Valgrind, there
are still two things you must do to suppress the warnings.  First,
you must use a suppressions file.  One is supplied in
Misc/valgrind-python.supp.  Second, you must do one of the following:

  * Uncomment Py_USING_MEMORY_DEBUGGER in Objects/obmalloc.c,
    then rebuild Python
  * Uncomment the lines in Misc/valgrind-python.supp that
    suppress the warnings for PyObject_Free and PyObject_Realloc

If you want to use Valgrind more effectively and catch even more
memory leaks, you will need to configure python --without-pymalloc.
PyMalloc allocates a few blocks in big chunks and most object
allocations don't call malloc, they use chunks doled about by PyMalloc
from the big blocks.  This means Valgrind can't detect
many allocations (and frees), except for those that are forwarded
to the system malloc.  Note: configuring python --without-pymalloc
makes Python run much slower, especially when running under Valgrind.
You may need to run the tests in batches under Valgrind to keep
the memory usage down to allow the tests to complete.  It seems to take
about 5 times longer to run --without-pymalloc.

Apr 15, 2006:
  test_ctypes causes Valgrind 3.1.1 to fail (crash).
  test_socket_ssl should be skipped when running valgrind.
	The reason is that it purposely uses uninitialized memory.
	This causes many spurious warnings, so it's easier to just skip it.


Details:
--------
Python uses its own small-object allocation scheme on top of malloc,
called PyMalloc.

Valgrind may show some unexpected results when PyMalloc is used.
Starting with Python 2.3, PyMalloc is used by default.  You can disable
PyMalloc when configuring python by adding the --without-pymalloc option.
If you disable PyMalloc, most of the information in this document and
the supplied suppressions file will not be useful.  As discussed above,
disabling PyMalloc can catch more problems.

If you use valgrind on a default build of Python,  you will see
many errors like:

        ==6399== Use of uninitialised value of size 4
        ==6399== at 0x4A9BDE7E: PyObject_Free (obmalloc.c:711)
        ==6399== by 0x4A9B8198: dictresize (dictobject.c:477)

These are expected and not a problem.  Tim Peters explains
the situation:

        PyMalloc needs to know whether an arbitrary address is one
	that's managed by it, or is managed by the system malloc.
	The current scheme allows this to be determined in constant
	time, regardless of how many memory areas are under pymalloc's
	control.

        The memory pymalloc manages itself is in one or more "arenas",
	each a large contiguous memory area obtained from malloc.
	The base address of each arena is saved by pymalloc
	in a vector.  Each arena is carved into "pools", and a field at
	the start of each pool contains the index of that pool's arena's
	base address in that vector.

        Given an arbitrary address, pymalloc computes the pool base
	address corresponding to it, then looks at "the index" stored
	near there.  If the index read up is out of bounds for the
	vector of arena base addresses pymalloc maintains, then
	pymalloc knows for certain that this address is not under
	pymalloc's control.  Otherwise the index is in bounds, and
	pymalloc compares

            the arena base address stored at that index in the vector

        to

            the arbitrary address pymalloc is investigating

        pymalloc controls this arbitrary address if and only if it lies
        in the arena the address's pool's index claims it lies in.

        It doesn't matter whether the memory pymalloc reads up ("the
	index") is initialized.  If it's not initialized, then
	whatever trash gets read up will lead pymalloc to conclude
	(correctly) that the address isn't controlled by it, either
	because the index is out of bounds, or the index is in bounds
	but the arena it represents doesn't contain the address.

        This determination has to be made on every call to one of
	pymalloc's free/realloc entry points, so its speed is critical
	(Python allocates and frees dynamic memory at a ferocious rate
	-- everything in Python, from integers to "stack frames",
	lives in the heap).
doc/alt-python34-devel/valgrind-python.supp000064400000020254150404236440014717 0ustar00#
# This is a valgrind suppression file that should be used when using valgrind.
#
#  Here's an example of running valgrind:
#
#	cd python/dist/src
#	valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \
#		./python -E ./Lib/test/regrtest.py -u gui,network
#
# You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER
# to use the preferred suppressions with Py_ADDRESS_IN_RANGE.
#
# If you do not want to recompile Python, you can uncomment
# suppressions for PyObject_Free and PyObject_Realloc.
#
# See Misc/README.valgrind for more information.

# all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif
{
   ADDRESS_IN_RANGE/Invalid read of size 4
   Memcheck:Addr4
   fun:Py_ADDRESS_IN_RANGE
}

{
   ADDRESS_IN_RANGE/Invalid read of size 4
   Memcheck:Value4
   fun:Py_ADDRESS_IN_RANGE
}

{
   ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64)
   Memcheck:Value8
   fun:Py_ADDRESS_IN_RANGE
}

{
   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
   Memcheck:Cond
   fun:Py_ADDRESS_IN_RANGE
}

#
# Leaks (including possible leaks)
#    Hmmm, I wonder if this masks some real leaks.  I think it does.
#    Will need to fix that.
#

{
   Suppress leaking the GIL.  Happens once per process, see comment in ceval.c.
   Memcheck:Leak
   fun:malloc
   fun:PyThread_allocate_lock
   fun:PyEval_InitThreads
}

{
   Suppress leaking the GIL after a fork.
   Memcheck:Leak
   fun:malloc
   fun:PyThread_allocate_lock
   fun:PyEval_ReInitThreads
}

{
   Suppress leaking the autoTLSkey.  This looks like it shouldn't leak though.
   Memcheck:Leak
   fun:malloc
   fun:PyThread_create_key
   fun:_PyGILState_Init
   fun:Py_InitializeEx
   fun:Py_Main
}

{
   Hmmm, is this a real leak or like the GIL?
   Memcheck:Leak
   fun:malloc
   fun:PyThread_ReInitTLS
}

{
   Handle PyMalloc confusing valgrind (possibly leaked)
   Memcheck:Leak
   fun:realloc
   fun:_PyObject_GC_Resize
   fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
}

{
   Handle PyMalloc confusing valgrind (possibly leaked)
   Memcheck:Leak
   fun:malloc
   fun:_PyObject_GC_New
   fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
}

{
   Handle PyMalloc confusing valgrind (possibly leaked)
   Memcheck:Leak
   fun:malloc
   fun:_PyObject_GC_NewVar
   fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
}

#
# Non-python specific leaks
#

{
   Handle pthread issue (possibly leaked)
   Memcheck:Leak
   fun:calloc
   fun:allocate_dtv
   fun:_dl_allocate_tls_storage
   fun:_dl_allocate_tls
}

{
   Handle pthread issue (possibly leaked)
   Memcheck:Leak
   fun:memalign
   fun:_dl_allocate_tls_storage
   fun:_dl_allocate_tls
}

###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Addr4
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Value4
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Addr8
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Value8
###   fun:PyObject_Free
###}
###
###{
###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
###   Memcheck:Cond
###   fun:PyObject_Free
###}

###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Addr4
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Invalid read of size 4
###   Memcheck:Value4
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Addr8
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
###   Memcheck:Value8
###   fun:PyObject_Realloc
###}
###
###{
###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
###   Memcheck:Cond
###   fun:PyObject_Realloc
###}

###
### All the suppressions below are for errors that occur within libraries
### that Python uses.  The problems to not appear to be related to Python's
### use of the libraries.
###

{
   Generic ubuntu ld problems
   Memcheck:Addr8
   obj:/lib/ld-2.4.so
   obj:/lib/ld-2.4.so
   obj:/lib/ld-2.4.so
   obj:/lib/ld-2.4.so
}

{
   Generic gentoo ld problems
   Memcheck:Cond
   obj:/lib/ld-2.3.4.so
   obj:/lib/ld-2.3.4.so
   obj:/lib/ld-2.3.4.so
   obj:/lib/ld-2.3.4.so
}

{
   DBM problems, see test_dbm
   Memcheck:Param
   write(buf)
   fun:write
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_close
}

{
   DBM problems, see test_dbm
   Memcheck:Value8
   fun:memmove
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_store
   fun:dbm_ass_sub
}

{
   DBM problems, see test_dbm
   Memcheck:Cond
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_store
   fun:dbm_ass_sub
}

{
   DBM problems, see test_dbm
   Memcheck:Cond
   fun:memmove
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   obj:/usr/lib/libdb1.so.2
   fun:dbm_store
   fun:dbm_ass_sub
}

{
   GDBM problems, see test_gdbm
   Memcheck:Param
   write(buf)
   fun:write
   fun:gdbm_open

}

{
   ZLIB problems, see test_gzip
   Memcheck:Cond
   obj:/lib/libz.so.1.2.3
   obj:/lib/libz.so.1.2.3
   fun:deflate
}

{
   Avoid problems w/readline doing a putenv and leaking on exit
   Memcheck:Leak
   fun:malloc
   fun:xmalloc
   fun:sh_set_lines_and_columns
   fun:_rl_get_screen_size
   fun:_rl_init_terminal_io
   obj:/lib/libreadline.so.4.3
   fun:rl_initialize
}

###
### These occur from somewhere within the SSL, when running
###  test_socket_sll.  They are too general to leave on by default.
###
###{
###   somewhere in SSL stuff
###   Memcheck:Cond
###   fun:memset
###}
###{
###   somewhere in SSL stuff
###   Memcheck:Value4
###   fun:memset
###}
###
###{
###   somewhere in SSL stuff
###   Memcheck:Cond
###   fun:MD5_Update
###}
###
###{
###   somewhere in SSL stuff
###   Memcheck:Value4
###   fun:MD5_Update
###}

# Fedora's package "openssl-1.0.1-0.1.beta2.fc17.x86_64" on x86_64
# See http://bugs.python.org/issue14171
{
   openssl 1.0.1 prng 1
   Memcheck:Cond
   fun:bcmp
   fun:fips_get_entropy
   fun:FIPS_drbg_instantiate
   fun:RAND_init_fips
   fun:OPENSSL_init_library
   fun:SSL_library_init
   fun:init_hashlib
}

{
   openssl 1.0.1 prng 2
   Memcheck:Cond
   fun:fips_get_entropy
   fun:FIPS_drbg_instantiate
   fun:RAND_init_fips
   fun:OPENSSL_init_library
   fun:SSL_library_init
   fun:init_hashlib
}

{
   openssl 1.0.1 prng 3
   Memcheck:Value8
   fun:_x86_64_AES_encrypt_compact
   fun:AES_encrypt
}

#
# All of these problems come from using test_socket_ssl
#
{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_bin2bn
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_num_bits_word
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:BN_num_bits_word
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_mod_exp_mont_word
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BN_mod_exp_mont
}

{
   from test_socket_ssl
   Memcheck:Param
   write(buf)
   fun:write
   obj:/usr/lib/libcrypto.so.0.9.7
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:RSA_verify
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:RSA_verify
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:DES_set_key_unchecked
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:DES_encrypt2
}

{
   from test_socket_ssl
   Memcheck:Cond
   obj:/usr/lib/libssl.so.0.9.7
}

{
   from test_socket_ssl
   Memcheck:Value4
   obj:/usr/lib/libssl.so.0.9.7
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:BUF_MEM_grow_clean
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:memcpy
   fun:ssl3_read_bytes
}

{
   from test_socket_ssl
   Memcheck:Cond
   fun:SHA1_Update
}

{
   from test_socket_ssl
   Memcheck:Value4
   fun:SHA1_Update
}

{
   test_buffer_non_debug
   Memcheck:Addr4
   fun:PyUnicodeUCS2_FSConverter
}

{
   test_buffer_non_debug
   Memcheck:Addr4
   fun:PyUnicode_FSConverter
}

{
   wcscmp_false_positive
   Memcheck:Addr8
   fun:wcscmp
   fun:_PyOS_GetOpt
   fun:Py_Main
   fun:main
}

# Additional suppressions for the unified decimal tests:
{
   test_decimal
   Memcheck:Addr4
   fun:PyUnicodeUCS2_FSConverter
}

{
   test_decimal2
   Memcheck:Addr4
   fun:PyUnicode_FSConverter
}

doc/alt-python34-devel/gdbinit000064400000011263150404236440012224 0ustar00# If you use the GNU debugger gdb to debug the Python C runtime, you
# might find some of the following commands useful.  Copy this to your
# ~/.gdbinit file and it'll get loaded into gdb automatically when you
# start it up.  Then, at the gdb prompt you can do things like:
#
#    (gdb) pyo apyobjectptr
#    <module 'foobar' (built-in)>
#    refcounts: 1
#    address    : 84a7a2c
#    $1 = void
#    (gdb)
#
# NOTE: If you have gdb 7 or later, it supports debugging of Python directly
# with embedded macros that you may find superior to what is in here.
# See Tools/gdb/libpython.py and http://bugs.python.org/issue8032.

# Prints a representation of the object to stderr, along with the
# number of reference counts it current has and the hex address the
# object is allocated at.  The argument must be a PyObject*
define pyo
    # side effect of calling _PyObject_Dump is to dump the object's
    # info - assigning just prevents gdb from printing the
    # NULL return value
    set $_unused_void = _PyObject_Dump($arg0)
end

# Prints a representation of the object to stderr, along with the
# number of reference counts it current has and the hex address the
# object is allocated at.  The argument must be a PyGC_Head*
define pyg
    print _PyGC_Dump($arg0)
end

# print the local variables of the current frame
define pylocals
    set $_i = 0
    while $_i < f->f_code->co_nlocals
	if f->f_localsplus + $_i != 0
	    set $_names = co->co_varnames
	    set $_name = _PyUnicode_AsString(PyTuple_GetItem($_names, $_i))
	    printf "%s:\n", $_name
            pyo f->f_localsplus[$_i]
	end
        set $_i = $_i + 1
    end
end

# A rewrite of the Python interpreter's line number calculator in GDB's
# command language
define lineno
    set $__continue = 1
    set $__co = f->f_code
    set $__lasti = f->f_lasti
    set $__sz = ((PyVarObject *)$__co->co_lnotab)->ob_size/2
    set $__p = (unsigned char *)((PyBytesObject *)$__co->co_lnotab)->ob_sval
    set $__li = $__co->co_firstlineno
    set $__ad = 0
    while ($__sz-1 >= 0 && $__continue)
      set $__sz = $__sz - 1
      set $__ad = $__ad + *$__p
      set $__p = $__p + 1
      if ($__ad > $__lasti)
	set $__continue = 0
      else
        set $__li = $__li + *$__p
        set $__p = $__p + 1
      end
    end
    printf "%d", $__li
end

# print the current frame - verbose
define pyframev
    pyframe
    pylocals
end

define pyframe
    set $__fn = _PyUnicode_AsString(co->co_filename)
    set $__n = _PyUnicode_AsString(co->co_name)
    printf "%s (", $__fn
    lineno
    printf "): %s\n", $__n
### Uncomment these lines when using from within Emacs/XEmacs so it will
### automatically track/display the current Python source line
#    printf "%c%c%s:", 032, 032, $__fn
#    lineno
#    printf ":1\n"
end

### Use these at your own risk.  It appears that a bug in gdb causes it
### to crash in certain circumstances.

#define up
#    up-silently 1
#    printframe
#end

#define down
#    down-silently 1
#    printframe
#end

define printframe
    if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
	pyframe
    else
        frame
    end
end

# Here's a somewhat fragile way to print the entire Python stack from gdb.
# It's fragile because the tests for the value of $pc depend on the layout
# of specific functions in the C source code.

# Explanation of while and if tests: We want to pop up the stack until we
# land in Py_Main (this is probably an incorrect assumption in an embedded
# interpreter, but the test can be extended by an interested party).  If
# Py_Main <= $pc <= Py_GetArgcArv is true, $pc is in Py_Main(), so the while
# tests succeeds as long as it's not true.  In a similar fashion the if
# statement tests to see if we are in PyEval_EvalFrameEx().

# Note: The name of the main interpreter function and the function which
# follow it has changed over time.  This version of pystack works with this
# version of Python.  If you try using it with older or newer versions of
# the interpreter you may will have to change the functions you compare with
# $pc.

# print the entire Python call stack
define pystack
    while $pc < Py_Main || $pc > Py_GetArgcArgv
        if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
	    pyframe
        end
        up-silently 1
    end
    select-frame 0
end

# print the entire Python call stack - verbose mode
define pystackv
    while $pc < Py_Main || $pc > Py_GetArgcArgv
        if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
	    pyframev
        end
        up-silently 1
    end
    select-frame 0
end

# generally useful macro to print a Unicode string
def pu
  set $uni = $arg0 
  set $i = 0
  while (*$uni && $i++<100)
    if (*$uni < 0x80) 
      print *(char*)$uni++
    else
      print /x *(short*)$uni++
    end
  end
end
doc/alt-python34/LICENSE000064400000030761150404236440010575 0ustar00A. HISTORY OF THE SOFTWARE
==========================

Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC.  Guido remains Python's
principal author, although it includes many contributions from others.

In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.

In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team.  In October of the same
year, the PythonLabs team moved to Digital Creations (now Zope
Corporation, see http://www.zope.com).  In 2001, the Python Software
Foundation (PSF, see http://www.python.org/psf/) was formed, a
non-profit organization created specifically to own Python-related
Intellectual Property.  Zope Corporation is a sponsoring member of
the PSF.

All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition).  Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.

    Release         Derived     Year        Owner       GPL-
                    from                                compatible? (1)

    0.9.0 thru 1.2              1991-1995   CWI         yes
    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
    1.6             1.5.2       2000        CNRI        no
    2.0             1.6         2000        BeOpen.com  no
    1.6.1           1.6         2001        CNRI        yes (2)
    2.1             2.0+1.6.1   2001        PSF         no
    2.0.1           2.0+1.6.1   2001        PSF         yes
    2.1.1           2.1+2.0.1   2001        PSF         yes
    2.1.2           2.1.1       2002        PSF         yes
    2.1.3           2.1.2       2002        PSF         yes
    2.2 and above   2.1.1       2001-now    PSF         yes

Footnotes:

(1) GPL-compatible doesn't mean that we're distributing Python under
    the GPL.  All Python licenses, unlike the GPL, let you distribute
    a modified version without making your changes open source.  The
    GPL-compatible licenses make it possible to combine Python with
    other software that is released under the GPL; the others don't.

(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
    because its license has a choice of law clause.  According to
    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
    is "not incompatible" with the GPL.

Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.


B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================

PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software
Foundation; All Rights Reserved" are retained in Python alone or in any
derivative version prepared by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee.  This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------

BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1

1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").

2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.

3. BeOpen is making the Software available to Licensee on an "AS IS"
basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions.  Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee.  This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party.  As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.

7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.


CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------

1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.

2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee.  Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement.  This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013.  This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.

4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee.  This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.

8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.

        ACCEPT


CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands.  All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
doc/alt-python34/README000064400000016634150404236440010453 0ustar00This is Python version 3.4.10
=============================

Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software
Foundation.  All rights reserved.

Python 3.4 Is No Longer Supported
---------------------------------

Python 3.4.10 is the final release in the Python 3.4 series.  As of this
release, the 3.4 branch has been retired, no further changes to 3.4 will be
accepted, and no new releases will be made.  This is standard Python policy;
Python releases get five years of support and are then retired.

If you're still using Python 3.4, you should consider upgrading to the
current version--3.7.2 as of this writing.  Newer versions of Python
have many new features, performance improvements, and bug fixes, which
should all serve to enhance your Python programming experience.

We in the Python core development community thank you for your interest
in 3.4, and we wish you all the best!

Python 3.x
----------

Python 3.x is a new version of the language, which is incompatible with the 2.x
line of releases.  The language is mostly the same, but many details, especially
how built-in objects like dictionaries and strings work, have changed
considerably, and a lot of deprecated features have finally been removed.


Build Instructions
------------------

On Unix, Linux, BSD, OSX, and Cygwin:

New text

    ./configure
    make
    make test
    sudo make install

This will install Python as python3.

You can pass many options to the configure script; run "./configure --help" to
find out more.  On OSX and Cygwin, the executable is called python.exe;
elsewhere it's just python.

On Mac OS X, if you have configured Python with --enable-framework, you should
use "make frameworkinstall" to do the installation.  Note that this installs the
Python executable in a place that is not normally on your PATH, you may want to
set up a symlink in /usr/local/bin.

On Windows, see PCbuild/readme.txt.

If you wish, you can create a subdirectory and invoke configure from there.  For
example:

    mkdir debug
    cd debug
    ../configure --with-pydebug
    make
    make test

(This will fail if you *also* built at the top-level directory.  You should do a
"make clean" at the toplevel first.)


What's New
----------

We try to have a comprehensive overview of the changes in the "What's New in
Python 3.4" document, found at

    http://docs.python.org/3.4/whatsnew/3.4.html

For a more detailed change log, read Misc/NEWS (though this file, too, is
incomplete, and also doesn't list anything merged in from the 2.7 release under
development).

If you want to install multiple versions of Python see the section below
entitled "Installing multiple versions".


Documentation
-------------

Documentation for Python 3.4 is online, updated daily:

    http://docs.python.org/3.4/

It can also be downloaded in many formats for faster access.  The documentation
is downloadable in HTML, PDF, and reStructuredText formats; the latter version
is primarily for documentation authors, translators, and people with special
formatting requirements.

If you would like to contribute to the development of Python, relevant
documentation is available at:

    http://docs.python.org/devguide/

For information about building Python's documentation, refer to Doc/README.txt.


Converting From Python 2.x to 3.x
---------------------------------

Python starting with 2.6 contains features to help locating code that needs to
be changed, such as optional warnings when deprecated features are used, and
backported versions of certain key Python 3.x features.

A source-to-source translation tool, "2to3", can take care of the mundane task
of converting large amounts of source code.  It is not a complete solution but
is complemented by the deprecation warnings in 2.6.  See
http://docs.python.org/3.4/library/2to3.html for more information.


Testing
-------

To test the interpreter, type "make test" in the top-level directory.  The test
set produces some output.  You can generally ignore the messages about skipped
tests due to optional features which can't be imported.  If a message is printed
about a failed test or a traceback or core dump is produced, something is wrong.

By default, tests are prevented from overusing resources like disk space and
memory.  To enable these tests, run "make testall".

IMPORTANT: If the tests fail and you decide to mail a bug report, *don't*
include the output of "make test".  It is useless.  Run the failing test
manually, as follows:

        ./python -m test -v test_whatever

(substituting the top of the source tree for '.' if you built in a different
directory).  This runs the test in verbose mode.


Installing multiple versions
----------------------------

On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument to the configure script)
you must take care that your primary python executable is not overwritten by the
installation of a different version.  All files and directories installed using
"make altinstall" contain the major and minor version and can thus live
side-by-side.  "make install" also creates ${prefix}/bin/python3 which refers to
${prefix}/bin/pythonX.Y.  If you intend to install multiple versions using the
same prefix you must decide which version (if any) is your "primary" version.
Install that version using "make install".  Install all other versions using
"make altinstall".

For example, if you want to install Python 2.6, 2.7 and 3.4 with 2.7 being the
primary version, you would execute "make install" in your 2.7 build directory
and "make altinstall" in the others.


Issue Tracker and Mailing List
------------------------------

We're soliciting bug reports about all aspects of the language.  Fixes are also
welcome, preferable in unified diff format.  Please use the issue tracker:

    http://bugs.python.org/

If you're not sure whether you're dealing with a bug or a feature, use the
mailing list:

    python-dev@python.org

To subscribe to the list, use the mailman form:

    http://mail.python.org/mailman/listinfo/python-dev/


Proposals for enhancement
-------------------------

If you have a proposal to change Python, you may want to send an email to the
comp.lang.python or python-ideas mailing lists for inital feedback.  A Python
Enhancement Proposal (PEP) may be submitted if your idea gains ground.  All
current PEPs, as well as guidelines for submitting a new PEP, are listed at
http://www.python.org/dev/peps/.


Release Schedule
----------------

See PEP 429 for release details: http://www.python.org/dev/peps/pep-0429/


Copyright and License Information
---------------------------------

Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software
Foundation.  All rights reserved.

Copyright (c) 2000 BeOpen.com.  All rights reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.  All
rights reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum.  All rights reserved.

See the file "LICENSE" for information on the history of this software, terms &
conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

This Python distribution contains *no* GNU General Public License (GPL) code, so
it may be used in proprietary projects.  There are interfaces to some GNU code
but these are entirely optional.

All trademarks referenced herein are property of their respective holders.
doc/alt-python34-pip/LICENSE.txt000064400000002102150404236440012165 0ustar00Copyright (c) 2008-2014 The pip developers (see AUTHORS.txt file)

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:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

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.
doc/alt-python34-pip/README.rst000064400000000403150404236440012033 0ustar00pip
===

.. image:: https://pypip.in/v/pip/badge.png
        :target: https://pypi.python.org/pypi/pip

.. image:: https://secure.travis-ci.org/pypa/pip.png?branch=develop
   :target: http://travis-ci.org/pypa/pip

For documentation, see https://pip.pypa.io/
doc/alt-python34-pip/docs/user_guide.rst000064400000036077150404236440014201 0ustar00==========
User Guide
==========

.. contents::

Installing Packages
*******************

pip supports installing from `PyPI`_, version control, local projects, and
directly from distribution files.


The most common scenario is to install from `PyPI`_ using :ref:`Requirement
Specifiers`

  ::

  $ pip install SomePackage            # latest version
  $ pip install SomePackage==1.0.4     # specific version
  $ pip install 'SomePackage>=1.0.4'     # minimum version


For more information and examples, see the :ref:`pip install` reference.


.. _`Requirements Files`:

Requirements Files
******************

"Requirements files" are files containing a list of items to be
installed using :ref:`pip install` like so:

 ::

   pip install -r requirements.txt


Details on the format of the files are here: :ref:`Requirements File Format`.

Logically, a Requirements file is just a list of :ref:`pip install` arguments
placed in a file.

In practice, there are 4 common uses of Requirements files:

1. Requirements files are used to hold the result from :ref:`pip freeze` for the
   purpose of achieving :ref:`repeatable installations <Repeatability>`.  In
   this case, your requirement file contains a pinned version of everything that
   was installed when `pip freeze` was run.

   ::

     pip freeze > requirements.txt
     pip install -r requirements.txt

2. Requirements files are used to force pip to properly resolve dependencies.
   As it is now, pip `doesn't have true dependency resolution
   <https://github.com/pypa/pip/issues/988>`_, but instead simply uses the first
   specification it finds for a project. E.g if `pkg1` requires `pkg3>=1.0` and
   `pkg2` requires `pkg3>=1.0,<=2.0`, and if `pkg1` is resolved first, pip will
   only use `pkg3>=1.0`, and could easily end up installing a version of `pkg3`
   that conflicts with the needs of `pkg2`.  To solve this problem, you can
   place `pkg3>=1.0,<=2.0` (i.e. the correct specification) into your
   requirements file directly along with the other top level requirements. Like
   so:

   ::

     pkg1
     pkg2
     pkg3>=1.0,<=2.0


3. Requirements files are used to force pip to install an alternate version of a
   sub-dependency.  For example, suppose `ProjectA` in your requirements file
   requires `ProjectB`, but the latest version (v1.3) has a bug, you can force
   pip to accept earlier versions like so:

   ::

     ProjectA
     ProjectB<1.3

4. Requirements files are used to override a dependency with a local patch that
   lives in version control.  For example, suppose a dependency,
   `SomeDependency` from PyPI has a bug, and you can't wait for an upstream fix.
   You could clone/copy the src, make the fix, and place it in vcs with the tag
   `sometag`.  You'd reference it in your requirements file with a line like so:

   ::

     git+https://myvcs.com/some_dependency@sometag#egg=SomeDependency

   If `SomeDependency` was previously a top-level requirement in your
   requirements file, then **replace** that line with the new line. If
   `SomeDependency` is a sub-dependency, then **add** the new line.


It's important to be clear that pip determines package dependencies using
`install_requires metadata
<http://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies>`_,
not by discovering `requirements.txt` files embedded in projects.

See also:

* :ref:`Requirements File Format`
* :ref:`pip freeze`
* `"setup.py vs requirements.txt" (an article by Donald Stufft)
  <https://caremad.io/blog/setup-vs-requirement/>`_



.. _`Installing from Wheels`:

Installing from Wheels
**********************

"Wheel" is a built, archive format that can greatly speed installation compared
to building and installing from source archives. For more information, see the
`Wheel docs <http://wheel.readthedocs.org>`_ ,
`PEP427 <http://www.python.org/dev/peps/pep-0427>`_, and
`PEP425 <http://www.python.org/dev/peps/pep-0425>`_

Pip prefers Wheels where they are available. To disable this, use the
:ref:`--no-use-wheel <install_--no-use-wheel>` flag for :ref:`pip install`.

If no satisfactory wheels are found, pip will default to finding source archives.


To install directly from a wheel archive:

::

 pip install SomePackage-1.0-py2.py3-none-any.whl


For the cases where wheels are not available, pip offers :ref:`pip wheel` as a
convenience, to build wheels for all your requirements and dependencies.

:ref:`pip wheel` requires the `wheel package
<https://pypi.python.org/pypi/wheel>`_ to be installed, which provides the
"bdist_wheel" setuptools extension that it uses.

To build wheels for your requirements and all their dependencies to a local directory:

::

 pip install wheel
 pip wheel --wheel-dir=/local/wheels -r requirements.txt


And *then* to install those requirements just using your local directory of wheels (and not from PyPI):

::

 pip install --no-index --find-links=/local/wheels -r requirements.txt


Uninstalling Packages
*********************

pip is able to uninstall most packages like so:

::

 $ pip uninstall SomePackage

pip also performs an automatic uninstall of an old version of a package
before upgrading to a newer version.

For more information and examples, see the :ref:`pip uninstall` reference.


Listing Packages
****************

To list installed packages:

::

  $ pip list
  Pygments (1.5)
  docutils (0.9.1)
  Sphinx (1.1.2)
  Jinja2 (2.6)

To list outdated packages, and show the latest version available:

::

  $ pip list --outdated
  docutils (Current: 0.9.1 Latest: 0.10)
  Sphinx (Current: 1.1.2 Latest: 1.1.3)


To show details about an installed package:

::

  $ pip show sphinx
  ---
  Name: Sphinx
  Version: 1.1.3
  Location: /my/env/lib/pythonx.x/site-packages
  Requires: Pygments, Jinja2, docutils


For more information and examples, see the :ref:`pip list` and :ref:`pip show`
reference pages.


Searching for Packages
**********************

pip can search `PyPI`_ for packages using the ``pip search``
command::

    $ pip search "query"

The query will be used to search the names and summaries of all
packages.

For more information and examples, see the :ref:`pip search` reference.

.. _`Configuration`:

Configuration
*************

.. _config-file:

Config file
------------

pip allows you to set all command line option defaults in a standard ini
style config file.

The names and locations of the configuration files vary slightly across
platforms.

* On Unix and Mac OS X the configuration file is: :file:`$HOME/.pip/pip.conf`
* On Windows, the configuration file is: :file:`%HOME%\\pip\\pip.ini`

You can set a custom path location for the config file using the environment variable ``PIP_CONFIG_FILE``.

The names of the settings are derived from the long command line option, e.g.
if you want to use a different package index (``--index-url``) and set the
HTTP timeout (``--default-timeout``) to 60 seconds your config file would
look like this:

.. code-block:: ini

    [global]
    timeout = 60
    index-url = http://download.zope.org/ppix

Each subcommand can be configured optionally in its own section so that every
global setting with the same name will be overridden; e.g. decreasing the
``timeout`` to ``10`` seconds when running the `freeze`
(`Freezing Requirements <./#freezing-requirements>`_) command and using
``60`` seconds for all other commands is possible with:

.. code-block:: ini

    [global]
    timeout = 60

    [freeze]
    timeout = 10


Boolean options like ``--ignore-installed`` or ``--no-dependencies`` can be
set like this:

.. code-block:: ini

    [install]
    ignore-installed = true
    no-dependencies = yes

Appending options like ``--find-links`` can be written on multiple lines:

.. code-block:: ini

    [global]
    find-links =
        http://download.example.com

    [install]
    find-links =
        http://mirror1.example.com
        http://mirror2.example.com


Environment Variables
---------------------

pip's command line options can be set with environment variables using the
format ``PIP_<UPPER_LONG_NAME>`` . Dashes (``-``) have to be replaced with
underscores (``_``).

For example, to set the default timeout::

    export PIP_DEFAULT_TIMEOUT=60

This is the same as passing the option to pip directly::

    pip --default-timeout=60 [...]

To set options that can be set multiple times on the command line, just add
spaces in between values. For example::

    export PIP_FIND_LINKS="http://mirror1.example.com http://mirror2.example.com"

is the same as calling::

    pip install --find-links=http://mirror1.example.com --find-links=http://mirror2.example.com


Config Precedence
-----------------

Command line options have precedence over environment variables, which have precedence over the config file.

Within the config file, command specific sections have precedence over the global section.

Examples:

- ``--host=foo`` overrides ``PIP_HOST=foo``
- ``PIP_HOST=foo`` overrides a config file with ``[global] host = foo``
- A command specific section in the config file ``[<command>] host = bar``
  overrides the option with same name in the ``[global]`` config file section


Command Completion
------------------

pip comes with support for command line completion in bash and zsh.

To setup for bash::

    $ pip completion --bash >> ~/.profile

To setup for zsh::

    $ pip completion --zsh >> ~/.zprofile

Alternatively, you can use the result of the ``completion`` command
directly with the eval function of you shell, e.g. by adding the following to your startup file::

    eval "`pip completion --bash`"



.. _`Fast & Local Installs`:

Fast & Local Installs
*********************

Often, you will want a fast install from local archives, without probing PyPI.

First, download the archives that fulfill your requirements::

$ pip install --download <DIR> -r requirements.txt

Then, install using  :ref:`--find-links <--find-links>` and :ref:`--no-index <--no-index>`::

$ pip install --no-index --find-links=[file://]<DIR> -r requirements.txt


Non-recursive upgrades
************************

``pip install --upgrade`` is currently written to perform a recursive upgrade.

E.g. supposing:

* `SomePackage-1.0` requires `AnotherPackage>=1.0`
* `SomePackage-2.0` requires `AnotherPackage>=1.0` and `OneMorePoject==1.0`
* `SomePackage-1.0` and `AnotherPackage-1.0` are currently installed
* `SomePackage-2.0` and `AnotherPackage-2.0` are the latest versions available on PyPI.

Running ``pip install --upgrade SomePackage`` would upgrade `SomePackage` *and* `AnotherPackage`
despite `AnotherPackage` already being satisifed.

If you would like to perform a non-recursive upgrade perform these 2 steps::

  pip install --upgrade --no-deps SomePackage
  pip install SomePackage

The first line will upgrade `SomePackage`, but not dependencies like `AnotherPackage`.  The 2nd line will fill in new dependencies like `OneMorePackage`.


User Installs
*************

With Python 2.6 came the `"user scheme" for installation
<http://docs.python.org/install/index.html#alternate-installation-the-user-scheme>`_,
which means that all Python distributions support an alternative install
location that is specific to a user.  The default location for each OS is
explained in the python documentation for the `site.USER_BASE
<http://docs.python.org/library/site.html#site.USER_BASE>`_ variable.  This mode
of installation can be turned on by specifying the :ref:`--user
<install_--user>` option to ``pip install``.

Moreover, the "user scheme" can be customized by setting the
``PYTHONUSERBASE`` environment variable, which updates the value of ``site.USER_BASE``.

To install "SomePackage" into an environment with site.USER_BASE customized to '/myappenv', do the following::

    export PYTHONUSERBASE=/myappenv
    pip install --user SomePackage


``pip install --user`` follows four rules:

#. When globally installed packages are on the python path, and they *conflict*
   with the installation requirements, they are ignored, and *not*
   uninstalled.
#. When globally installed packages are on the python path, and they *satisfy*
   the installation requirements, pip does nothing, and reports that
   requirement is satisfied (similar to how global packages can satisfy
   requirements when installing packages in a ``--system-site-packages``
   virtualenv).
#. pip will not perform a ``--user`` install in a ``--no-site-packages``
   virtualenv (i.e. the default kind of virtualenv), due to the user site not
   being on the python path.  The installation would be pointless.
#. In a ``--system-site-packages`` virtualenv, pip will not install a package
   that conflicts with a package in the virtualenv site-packages.  The --user
   installation would lack sys.path precedence and be pointless.


To make the rules clearer, here are some examples:


From within a ``--no-site-packages`` virtualenv (i.e. the default kind)::

  $ pip install --user SomePackage
  Can not perform a '--user' install. User site-packages are not visible in this virtualenv.


From within a ``--system-site-packages`` virtualenv where ``SomePackage==0.3`` is already installed in the virtualenv::

  $ pip install --user SomePackage==0.4
  Will not install to the user site because it will lack sys.path precedence


From within a real python, where ``SomePackage`` is *not* installed globally::

  $ pip install --user SomePackage
  [...]
  Successfully installed SomePackage


From within a real python, where ``SomePackage`` *is* installed globally, but is *not* the latest version::

  $ pip install --user SomePackage
  [...]
  Requirement already satisfied (use --upgrade to upgrade)

  $ pip install --user --upgrade SomePackage
  [...]
  Successfully installed SomePackage


From within a real python, where ``SomePackage`` *is* installed globally, and is the latest version::

  $ pip install --user SomePackage
  [...]
  Requirement already satisfied (use --upgrade to upgrade)

  $ pip install --user --upgrade SomePackage
  [...]
  Requirement already up-to-date: SomePackage

  # force the install
  $ pip install --user --ignore-installed SomePackage
  [...]
  Successfully installed SomePackage


.. _`Repeatability`:

Ensuring Repeatability
**********************

Three things are required to fully guarantee a repeatable installation using requirements files.

1. The requirements file was generated by ``pip freeze`` or you're sure it only
   contains requirements that specify a specific version.

2. The installation is performed using :ref:`--no-deps <install_--no-deps>`.
   This guarantees that only what is explicitly listed in the requirements file is
   installed.

3. The installation is performed against an index or find-links location that is
   guaranteed to *not* allow archives to be changed and updated without a
   version increase.  Unfortunately, this is *not* true on PyPI. It is possible
   for the same pypi distribution to have a different hash over time. Project
   authors are allowed to delete a distribution, and then upload a new one with
   the same name and version, but a different hash. See `Issue #1175
   <https://github.com/pypa/pip/issues/1175>`_ for plans to add hash
   confirmation to pip, or a new "lock file" notion, but for now, know that the `peep
   project <https://pypi.python.org/pypi/peep>`_ offers this feature on top of pip
   using requirements file comments.


.. _PyPI: http://pypi.python.org/pypi/
doc/alt-python34-pip/docs/distribute_setuptools.rst000064400000004753150404236440016521 0ustar00:orphan:

"ImportError: No module named setuptools"
+++++++++++++++++++++++++++++++++++++++++

Although using ``pip install --upgrade setuptools`` to upgrade from distribute
to setuptools works in isolation, it's possible to get "ImportError: No module
named setuptools" when using pip<1.4 to upgrade a package that depends on
setuptools or distribute.

e.g. when running a command like this:  `pip install --upgrade pyramid`

Solution
~~~~~~~~

To prevent the problem in *new* environments (that aren't broken yet):

* Option 1:

 * *First* run `pip install -U setuptools`,
 * *Then* run the command to upgrade your package (e.g. `pip install --upgrade pyramid`)

* Option 2:

 * Upgrade pip using :ref:`get-pip <get-pip>`
 * *Then* run the command to upgrade your package (e.g. `pip install --upgrade pyramid`)

To fix the problem once it's occurred, you'll need to manually install the new
setuptools, then rerun the upgrade that failed.

1. Download `ez_setup.py` (https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py)
2. Run `python ez_setup.py`
3. Then rerun your upgrade (e.g. `pip install --upgrade pyramid`)


Cause
~~~~~

distribute-0.7.3 is just an empty wrapper that only serves to require the new
setuptools (setuptools>=0.7) so that it will be installed. (If you don't know
yet, the "new setuptools" is a merge of distribute and setuptools back into one
project).

distribute-0.7.3 does its job well, when the upgrade is done in isolation.
E.g. if you're currently on distribute-0.6.X, then running `pip install -U
setuptools` works fine to upgrade you to setuptools>=0.7.

The problem occurs when:

1. you are currently using an older distribute (i.e. 0.6.X)
2. and you try to use pip to upgrade a package that *depends* on setuptools or
   distribute.

As part of the upgrade process, pip builds an install list that ends up
including distribute-0.7.3 and setuptools>=0.7 , but they can end up being
separated by other dependencies in the list, so what can happen is this:

1.  pip uninstalls the existing distribute
2.  pip installs distribute-0.7.3 (which has no importable setuptools, that pip
    *needs* internally to function)
3.  pip moves on to install another dependency (before setuptools>=0.7) and is
    unable to proceed without the setuptools package

Note that pip v1.4 has fixes to prevent this.  distribute-0.7.3 (or
setuptools>=0.7) by themselves cannot prevent this kind of problem.


.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _distribute: https://pypi.python.org/pypi/distribute
doc/alt-python34-pip/docs/usage.rst000064400000000173150404236440013136 0ustar00:orphan:

==========
Usage
==========

The "Usage" section is now covered in the :doc:`Reference Guide <reference/index>`

doc/alt-python34-pip/docs/logic.rst000064400000000213150404236440013122 0ustar00:orphan:

================
Internal Details
================

This content is now covered in the :doc:`Reference Guide <reference/index>`

doc/alt-python34-pip/docs/news.rst000064400000000107150404236440013003 0ustar00=============
Release Notes
=============

.. include:: ../CHANGES.txt
doc/alt-python34-pip/docs/cookbook.rst000064400000000161150404236440013635 0ustar00:orphan:

============
Cookbook
============

This content is now covered in the :doc:`User Guide <user_guide>`

doc/alt-python34-pip/docs/installing.rst000064400000003704150404236440014201 0ustar00.. _`Installation`:

Installation
============

Python & OS Support
-------------------

pip works with CPython versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4 and also pypy.

pip works on Unix/Linux, OS X, and Windows.

.. note::

  Python 2.5 was supported through v1.3.1, and Python 2.4 was supported through v1.1.


.. _`get-pip`:

Install pip
-----------

To install or upgrade pip, securely download `get-pip.py
<https://bootstrap.pypa.io/get-pip.py>`_. [1]_

Then run the following (which may require administrator access)::

 python get-pip.py

If `setuptools`_ (or `distribute`_) is not already installed, ``get-pip.py`` will
install `setuptools`_ for you. [2]_

To upgrade an existing `setuptools`_ (or `distribute`_), run ``pip install -U setuptools`` [3]_


Upgrade pip
-----------

On Linux or OS X:

::

 pip install -U pip


On Windows [4]_:

::

 python -m pip install -U pip



Using Package Managers
----------------------

On Linux, pip will generally be available for the system install of python using
the system package manager, although often the latest version will be
unavailable.

On Debian and Ubuntu::

   sudo apt-get install python-pip

On Fedora::

   sudo yum install python-pip


----

.. [1] "Secure" in this context means using a modern browser or a
       tool like `curl` that verifies SSL certificates when downloading from
       https URLs.

.. [2] Beginning with pip v1.5.1, ``get-pip.py`` stopped requiring setuptools to
       be installed first.

.. [3] Although using ``pip install --upgrade setuptools`` to upgrade from
       distribute to setuptools works in isolation, it's possible to get
       "ImportError: No module named setuptools" when using pip<1.4 to upgrade a
       package that depends on setuptools or distribute. See :doc:`here for
       details <distribute_setuptools>`.

.. [4] https://github.com/pypa/pip/issues/1299

.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _distribute: https://pypi.python.org/pypi/distribute
doc/alt-python34-pip/docs/development.rst000064400000010551150404236450014356 0ustar00===========
Development
===========

Pull Requests
=============

Submit Pull Requests against the `develop` branch.

Provide a good description of what you're doing and why.

Provide tests that cover your changes and try to run the tests locally first.

Automated Testing
=================

All pull requests and merges to 'develop' branch are tested in `Travis <https://travis-ci.org/>`_
based on our `.travis.yml file <https://github.com/pypa/pip/blob/develop/.travis.yml>`_.

Usually, a link to your specific travis build appears in pull requests, but if not,
you can find it on our `travis pull requests page <https://travis-ci.org/pypa/pip/pull_requests>`_

The only way to trigger Travis to run again for a pull request, is to submit another change to the pull branch.

We also have Jenkins CI that runs regularly for certain python versions on windows and centos.

Running tests
=============

OS Requirements: subversion, bazaar, git, and mercurial.

Python Requirements: tox or pytest, virtualenv, scripttest, and mock

Ways to run the tests locally:

::

 $ tox -e py33           # The preferred way to run the tests, can use pyNN to
                         # run for a particular version or leave off the -e to
                         # run for all versions.
 $ python setup.py test  # Using the setuptools test plugin
 $ py.test               # Using py.test directly
 $ tox                   # Using tox against pip's tox.ini


Getting Involved
================

The pip project welcomes help in the following ways:

- Making Pull Requests for code, tests, or docs.
- Commenting on open issues and pull requests.
- Helping to answer questions on the mailing list.

If you want to become an official maintainer, start by helping out.

Later, when you think you're ready, get in touch with one of the maintainers,
and they will initiate a vote.

Release Process
===============

This process includes virtualenv, since pip releases necessitate a virtualenv release.

As an example, the instructions assume we're releasing pip-1.4, and virtualenv-1.10.

1. Upgrade setuptools, if needed:

 #. Upgrade setuptools in ``virtualenv/develop`` using the :ref:`Refresh virtualenv` process.
 #. Create a pull request against ``pip/develop`` with a modified ``.travis.yml`` file that installs virtualenv from ``virtualenv/develop``, to confirm the travis builds are still passing.

2. Create Release branches:

 #. Create ``pip/release-1.4`` branch.
 #. In ``pip/develop``, change ``pip.version`` to '1.5.dev1'.
 #. Create ``virtualenv/release-1.10`` branch.
 #. In ``virtualenv/develop``, change ``virtualenv.version`` to '1.11.dev1'.

3. Prepare "rcX":

 #. In ``pip/release-1.4``, change ``pip.version`` to '1.4rcX', and tag with '1.4rcX'.
 #. Build a pip sdist from ``pip/release-1.4``, and build it into ``virtualenv/release-1.10`` using the :ref:`Refresh virtualenv` process.
 #. In ``virtualenv/release-1.10``, change ``virtualenv.version`` to '1.10rcX', and tag with '1.10rcX'.

4. Announce ``pip-1.4rcX`` and ``virtualenv-1.10rcX`` with the :ref:`RC Install Instructions` and elicit feedback.

5. Apply fixes to 'rcX':

 #. Apply fixes to ``pip/release-1.4`` and ``virtualenv/release-1.10``
 #. Periodically merge fixes to ``pip/develop`` and ``virtualenv/develop``

6. Repeat #4 thru #6 if needed.

7. Final Release:

 #. In ``pip/release-1.4``, change ``pip.version`` to '1.4', and tag with '1.4'.
 #. Merge ``pip/release-1.4`` to ``pip/master``.
 #. Build a pip sdist from ``pip/release-1.4``, and load it into ``virtualenv/release-1.10`` using the :ref:`Refresh virtualenv` process.
 #. Merge ``vitualenv/release-1.10`` to ``virtualenv/develop``.
 #. In ``virtualenv/release-1.10``, change ``virtualenv.version`` to '1.10', and tag with '1.10'.
 #. Merge ``virtualenv/release-1.10`` to ``virtualenv/master``
 #. Build and upload pip and virtualenv sdists to PyPI.

.. _`Refresh virtualenv`:

Refresh virtualenv
++++++++++++++++++

#. Update the embedded versions of pip and setuptools in ``virtualenv_support``.
#. Run ``bin/rebuild-script.py`` to rebuild virtualenv based on the latest versions.


.. _`RC Install Instructions`:

RC Install Instructions
+++++++++++++++++++++++

::

 $ curl -L -O https://github.com/pypa/virtualenv/archive/1.10rc1.tar.gz
 $ echo "<md5sum value>  1.10rc1.tar.gz" | md5sum -c
 1.10rc1.tar.gz: OK
 $ tar zxf 1.10rc1.tar.gz
 $ python virtualenv-1.10rc1/virtualenv.py myVE
 $ myVE/bin/pip install SomePackage

doc/alt-python34-pip/docs/configuration.rst000064400000000153150404236450014700 0ustar00:orphan:

Configuration
=============

This content is now covered in the :doc:`User Guide <user_guide>`


doc/alt-python34-pip/docs/reference/pip_freeze.rst000064400000001050150404236450016114 0ustar00
.. _`pip freeze`:

pip freeze
-----------

.. contents::

Usage
*****

.. pip-command-usage:: freeze


Description
***********

.. pip-command-description:: freeze


Options
*******

.. pip-command-options:: freeze


Examples
********

1) Generate output suitable for a requirements file.

 ::

  $ pip freeze
  Jinja2==2.6
  Pygments==1.5
  Sphinx==1.1.3
  docutils==0.9.1


2) Generate a requirements file and then install from it in another environment.

 ::

  $ env1/bin/pip freeze > requirements.txt
  $ env2/bin/pip install -r requirements.txt
doc/alt-python34-pip/docs/reference/pip_uninstall.rst000064400000001037150404236450016652 0ustar00.. _`pip uninstall`:

pip uninstall
-------------

.. contents::

Usage
*****

.. pip-command-usage:: uninstall

Description
***********

.. pip-command-description:: uninstall

Options
*******

.. pip-command-options:: uninstall


Examples
********

1) Uninstall a package.

  ::

    $ pip uninstall simplejson
    Uninstalling simplejson:
      /home/me/env/lib/python2.7/site-packages/simplejson
      /home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
    Proceed (y/n)? y
      Successfully uninstalled simplejson

doc/alt-python34-pip/docs/reference/pip_wheel.rst000064400000000722150404236450015745 0ustar00
.. _`pip wheel`:

pip wheel
---------

.. contents::

Usage
*****

.. pip-command-usage:: wheel


Description
***********

.. pip-command-description:: wheel


Options
*******

.. pip-command-options:: wheel

.. pip-index-options::


Examples
********

1. Build wheels for a requirement (and all its dependencies), and then install

  ::

    $ pip wheel --wheel-dir=/tmp/wheelhouse SomePackage
    $ pip install --no-index --find-links=/tmp/wheelhouse SomePackage
doc/alt-python34-pip/docs/reference/pip_list.rst000064400000001053150404236450015612 0ustar00.. _`pip list`:

pip list
---------

.. contents::

Usage
*****

.. pip-command-usage:: list

Description
***********

.. pip-command-description:: list

Options
*******

.. pip-command-options:: list

.. pip-index-options::


Examples
********

1) List installed packages.

 ::

  $ pip list
  Pygments (1.5)
  docutils (0.9.1)
  Sphinx (1.1.2)
  Jinja2 (2.6)

2) List outdated packages (excluding editables), and the latest version available

 ::

  $ pip list --outdated
  docutils (Current: 0.9.1 Latest: 0.10)
  Sphinx (Current: 1.1.2 Latest: 1.1.3)
doc/alt-python34-pip/docs/reference/pip_show.rst000064400000000647150404236450015627 0ustar00.. _`pip show`:

pip show
--------

.. contents::

Usage
*****

.. pip-command-usage:: show

Description
***********

.. pip-command-description:: show


Options
*******

.. pip-command-options:: show


Examples
********

1. Show information about a package:

  ::

    $ pip show sphinx
    ---
    Name: Sphinx
    Version: 1.1.3
    Location: /my/env/lib/pythonx.x/site-packages
    Requires: Pygments, Jinja2, docutils
doc/alt-python34-pip/docs/reference/pip.rst000064400000003525150404236450014565 0ustar00
pip
---

.. contents::

Usage
*****

::

 pip <command> [options]


Description
***********


.. _`Logging`:

Logging
=======

Console logging
~~~~~~~~~~~~~~~

pip offers :ref:`-v, --verbose <--verbose>` and :ref:`-q, --quiet <--quiet>`
to control the console log level.  Each option can be used multiple times and
used together. One ``-v`` increases the verbosity by one, whereas one ``-q`` decreases it by
one.

The series of log levels, in order, are as follows::

  VERBOSE_DEBUG, DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL

``NOTIFY`` is the default level.

A few examples on how the parameters work to affect the level:

* specifying nothing results in ``NOTIFY``
* ``-v`` results in ``INFO``
* ``-vv`` results in ``DEBUG``
* ``-q`` results in ``WARN``
* ``-vq`` results in ``NOTIFY``

The most practical use case for users is either ``-v`` or ``-vv`` to see
additional logging to help troubleshoot an issue.


.. _`FileLogging`:

File logging
~~~~~~~~~~~~

pip offers the :ref:`--log <--log>` option for specifying a file where a maximum
verbosity log will be kept.  This option is empty by default. This log appends
to previous logging.

Additionally, when commands fail (i.e. return a non-zero exit code), pip writes
a "failure log" for the failed command. This log overwrites previous
logging. The default location is as follows:

* On Unix and Mac OS X: :file:`$HOME/.pip/pip.log`
* On Windows, the configuration file is: :file:`%HOME%\\pip\\pip.log`

The option for the failure log, is :ref:`--log-file <--log-file>`.

Both logs add a line per execution to specify the date and what pip executable wrote the log.

Like all pip options, ``--log`` and ``log-file``, can also be set as an environment
variable, or placed into the pip config file.  See the :ref:`Configuration`
section.

.. _`General Options`:

General Options
***************

.. pip-general-options::

doc/alt-python34-pip/docs/reference/pip_search.rst000064400000000701150404236450016103 0ustar00.. _`pip search`:

pip search
----------

.. contents::

Usage
*****

.. pip-command-usage:: search


Description
***********

.. pip-command-description:: search

Options
*******

.. pip-command-options:: search


Examples
********

1. Search for "peppercorn"

 ::

  $ pip search peppercorn
  pepperedform    - Helpers for using peppercorn with formprocess.
  peppercorn      - A library for converting a token stream into [...]

.. _`pip wheel`:
doc/alt-python34-pip/docs/reference/pip_install.rst000064400000032731150404236450016314 0ustar00
.. _`pip install`:

pip install
-----------

.. contents::

Usage
*****

.. pip-command-usage:: install

Description
***********

.. pip-command-description:: install


.. _`Requirements File Format`:

Requirements File Format
++++++++++++++++++++++++

Each line of the requirements file indicates something to be installed,
and like arguments to :ref:`pip install`, the following forms are supported::

    <requirement specifier>
    <archive url/path>
    [-e] <local project path>
    [-e] <vcs project url>

See the :ref:`pip install Examples<pip install Examples>` for examples of all these forms.

A line beginning with ``#`` is treated as a comment and ignored.

Additionally, the following Package Index Options are supported:

  *  :ref:`-i, --index-url <--index-url>`
  *  :ref:`--extra-index-url <--extra-index-url>`
  *  :ref:`--no-index <--no-index>`
  *  :ref:`-f, --find-links <--find-links>`
  *  :ref:`--allow-external <--allow-external>`
  *  :ref:`--allow-all-external <--allow-external>`
  *  :ref:`--allow-unverified <--allow-unverified>`

For example, to specify :ref:`--no-index <--no-index>` and 2 :ref:`--find-links <--find-links>` locations:

::

--no-index
--find-links /my/local/archives
--find-links http://some.archives.com/archives


Lastly, if you wish, you can refer to other requirements files, like this::

    -r more_requirements.txt

.. _`Requirement Specifiers`:

Requirement Specifiers
++++++++++++++++++++++

pip supports installing from "requirement specifiers" as implemented in
`pkg_resources Requirements <http://packages.python.org/setuptools/pkg_resources.html#requirement-objects>`_

Some Examples:

 ::

  'FooProject >= 1.2'
  Fizzy [foo, bar]
  'PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1'
  SomethingWhoseVersionIDontCareAbout

.. note::

  Use single or double quotes around specifiers to avoid ``>`` and ``<`` being
  interpreted as shell redirects. e.g. ``pip install 'FooProject>=1.2'``.




.. _`Pre Release Versions`:

Pre-release Versions
++++++++++++++++++++

Starting with v1.4, pip will only install stable versions as specified by
`PEP426`_ by default. If a version cannot be parsed as a compliant `PEP426`_
version then it is assumed to be a pre-release.

If a Requirement specifier includes a pre-release or development version
(e.g. ``>=0.0.dev0``) then pip will allow pre-release and development versions
for that requirement. This does not include the != flag.

The ``pip install`` command also supports a :ref:`--pre <install_--pre>` flag
that will enable installing pre-releases and development releases.


.. _PEP426: http://www.python.org/dev/peps/pep-0426

.. _`Externally Hosted Files`:

Externally Hosted Files
+++++++++++++++++++++++

Starting with v1.4, pip will warn about installing any file that does not come
from the primary index. As of version 1.5, pip defaults to ignoring these files
unless asked to consider them.

The ``pip install`` command supports a
:ref:`--allow-external PROJECT <--allow-external>` option that will enable
installing links that are linked directly from the simple index but to an
external host that also have a supported hash fragment. Externally hosted
files for all projects may be enabled using the
:ref:`--allow-all-external <--allow-all-external>` flag to the ``pip install``
command.

The ``pip install`` command also supports a
:ref:`--allow-unverified PROJECT <--allow-unverified>` option that will enable
installing insecurely linked files. These are either directly linked (as above)
files without a hash, or files that are linked from either the home page or the
download url of a package.

These options can be used in a requirements file.  Assuming some fictional
`ExternalPackage` that is hosted external and unverified, then your requirements
file would be like so::

    --allow-external ExternalPackage
    --allow-unverified ExternalPackage
    ExternalPackage


.. _`VCS Support`:

VCS Support
+++++++++++

pip supports installing from Git, Mercurial, Subversion and Bazaar, and detects
the type of VCS using url prefixes: "git+", "hg+", "bzr+", "svn+".

pip requires a working VCS command on your path: git, hg, svn, or bzr.

VCS projects can be installed in :ref:`editable mode <editable-installs>` (using
the :ref:`--editable <install_--editable>` option) or not.

* For editable installs, the clone location by default is "<venv
  path>/src/SomeProject" in virtual environments, and "<cwd>/src/SomeProject"
  for global installs.  The :ref:`--src <install_--src>` option can be used to
  modify this location.
* For non-editable installs, the project is built locally in a temp dir and then
  installed normally.

The url suffix "egg=<project name>" is used by pip in it's dependency logic to
identify the project prior to pip downloading and analyzing the metadata.

Git
~~~

pip currently supports cloning over ``git``, ``git+https`` and ``git+ssh``:

Here are the supported forms::

    [-e] git+git://git.myproject.org/MyProject#egg=MyProject
    [-e] git+https://git.myproject.org/MyProject#egg=MyProject
    [-e] git+ssh://git.myproject.org/MyProject#egg=MyProject
    -e git+git@git.myproject.org:MyProject#egg=MyProject

Passing branch names, a commit hash or a tag name is possible like so::

    [-e] git://git.myproject.org/MyProject.git@master#egg=MyProject
    [-e] git://git.myproject.org/MyProject.git@v1.0#egg=MyProject
    [-e] git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject

Mercurial
~~~~~~~~~

The supported schemes are: ``hg+http``, ``hg+https``,
``hg+static-http`` and ``hg+ssh``.

Here are the supported forms::

    [-e] hg+http://hg.myproject.org/MyProject#egg=MyProject
    [-e] hg+https://hg.myproject.org/MyProject#egg=MyProject
    [-e] hg+ssh://hg.myproject.org/MyProject#egg=MyProject

You can also specify a revision number, a revision hash, a tag name or a local
branch name like so::

    [-e] hg+http://hg.myproject.org/MyProject@da39a3ee5e6b#egg=MyProject
    [-e] hg+http://hg.myproject.org/MyProject@2019#egg=MyProject
    [-e] hg+http://hg.myproject.org/MyProject@v1.0#egg=MyProject
    [-e] hg+http://hg.myproject.org/MyProject@special_feature#egg=MyProject

Subversion
~~~~~~~~~~

pip supports the URL schemes ``svn``, ``svn+svn``, ``svn+http``, ``svn+https``, ``svn+ssh``.

You can also give specific revisions to an SVN URL, like so::

    [-e] svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject
    [-e] svn+http://svn.myproject.org/svn/MyProject/trunk@2019#egg=MyProject

which will check out revision 2019.  ``@{20080101}`` would also check
out the revision from 2008-01-01. You can only check out specific
revisions using ``-e svn+...``.

Bazaar
~~~~~~

pip supports Bazaar using the ``bzr+http``, ``bzr+https``, ``bzr+ssh``,
``bzr+sftp``, ``bzr+ftp`` and ``bzr+lp`` schemes.

Here are the supported forms::

    [-e] bzr+http://bzr.myproject.org/MyProject/trunk#egg=MyProject
    [-e] bzr+sftp://user@myproject.org/MyProject/trunk#egg=MyProject
    [-e] bzr+ssh://user@myproject.org/MyProject/trunk#egg=MyProject
    [-e] bzr+ftp://user@myproject.org/MyProject/trunk#egg=MyProject
    [-e] bzr+lp:MyProject#egg=MyProject

Tags or revisions can be installed like so::

    [-e] bzr+https://bzr.myproject.org/MyProject/trunk@2019#egg=MyProject
    [-e] bzr+http://bzr.myproject.org/MyProject/trunk@v1.0#egg=MyProject


Finding Packages
++++++++++++++++

pip searches for packages on `PyPI`_ using the
`http simple interface <http://pypi.python.org/simple>`_,
which is documented `here <http://packages.python.org/setuptools/easy_install.html#package-index-api>`_
and `there <http://www.python.org/dev/peps/pep-0301/>`_

pip offers a number of Package Index Options for modifying how packages are found.

See the :ref:`pip install Examples<pip install Examples>`.


.. _`SSL Certificate Verification`:

SSL Certificate Verification
++++++++++++++++++++++++++++

Starting with v1.3, pip provides SSL certificate verification over https, for the purpose
of providing secure, certified downloads from PyPI.


Hash Verification
+++++++++++++++++

PyPI provides md5 hashes in the hash fragment of package download urls.

pip supports checking this, as well as any of the
guaranteed hashlib algorithms (sha1, sha224, sha384, sha256, sha512, md5).

The hash fragment is case sensitive (i.e. sha1 not SHA1).

This check is only intended to provide basic download corruption protection.
It is not intended to provide security against tampering. For that,
see :ref:`SSL Certificate Verification`


Download Cache
++++++++++++++

pip offers a :ref:`--download-cache <install_--download-cache>` option for
installs to prevent redundant downloads of archives from PyPI.

The point of this cache is *not* to circumvent the index crawling process, but
to *just* prevent redundant downloads.

Items are stored in this cache based on the url the archive was found at, not
simply the archive name.

If you want a fast/local install solution that circumvents crawling PyPI, see
the :ref:`Fast & Local Installs`.

Like all options, :ref:`--download-cache <install_--download-cache>`, can also
be set as an environment variable, or placed into the pip config file.  See the
:ref:`Configuration` section.


.. _`editable-installs`:

"Editable" Installs
+++++++++++++++++++

"Editable" installs are fundamentally `"setuptools develop mode"
<http://packages.python.org/setuptools/setuptools.html#development-mode>`_
installs.

You can install local projects or VCS projects in "editable" mode::

$ pip install -e path/to/SomeProject
$ pip install -e git+http://repo/my_project.git#egg=SomeProject

For local projects, the "SomeProject.egg-info" directory is created relative to
the project path.  This is one advantage over just using ``setup.py develop``,
which creates the "egg-info" directly relative the current working directory.



Controlling setup_requires
++++++++++++++++++++++++++

Setuptools offers the ``setup_requires`` `setup() keyword
<http://pythonhosted.org/setuptools/setuptools.html#new-and-changed-setup-keywords>`_
for specifying dependencies that need to be present in order for the `setup.py`
script to run.  Internally, Setuptools uses ``easy_install`` to fulfill these
dependencies.

pip has no way to control how these dependencies are located.  None of the
Package Index Options have an effect.

The solution is to configure a "system" or "personal" `Distutils configuration
file
<http://docs.python.org/2/install/index.html#distutils-configuration-files>`_ to
manage the fulfillment.

For example, to have the dependency located at an alternate index, add this:

::

  [easy_install]
  index_url = https://my.index-mirror.com

To have the dependency located from a local directory and not crawl PyPI, add this:

::

  [easy_install]
  allow_hosts = ''
  find_links = file:///path/to/local/archives



Options
*******

.. pip-command-options:: install

.. pip-index-options::


.. _`pip install Examples`:

Examples
********

1) Install `SomePackage` and it's dependencies from `PyPI`_ using :ref:`Requirement Specifiers`

  ::

  $ pip install SomePackage            # latest version
  $ pip install SomePackage==1.0.4     # specific version
  $ pip install 'SomePackage>=1.0.4'     # minimum version


2) Install a list of requirements specified in a file.  See the :ref:`Requirements files <Requirements Files>`.

  ::

  $ pip install -r requirements.txt


3) Upgrade an already installed `SomePackage` to the latest from PyPI.

  ::

  $ pip install --upgrade SomePackage


4) Install a local project in "editable" mode. See the section on :ref:`Editable Installs <editable-installs>`.

  ::

  $ pip install -e .                     # project in current directory
  $ pip install -e path/to/project       # project in another directory


5) Install a project from VCS in "editable" mode. See the sections on :ref:`VCS Support <VCS Support>` and :ref:`Editable Installs <editable-installs>`.

  ::

  $ pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage          # from git
  $ pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage            # from mercurial
  $ pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage         # from svn
  $ pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage  # from 'feature' branch
  $ pip install -e git+https://git.repo/some_repo.git@egg=subdir&subdirectory=subdir_path # install a python package from a repo subdirectory

6) Install a package with `setuptools extras`_.

  ::

  $ pip install SomePackage[PDF]
  $ pip install SomePackage[PDF]==3.0
  $ pip install -e .[PDF]==3.0  # editable project in current directory


7) Install a particular source archive file.

  ::

  $ pip install ./downloads/SomePackage-1.0.4.tar.gz
  $ pip install http://my.package.repo/SomePackage-1.0.4.zip


8) Install from alternative package repositories.

  Install from a different index, and not `PyPI`_ ::

  $ pip install --index-url http://my.package.repo/simple/ SomePackage

  Search an additional index during install, in addition to `PyPI`_ ::

  $ pip install --extra-index-url http://my.package.repo/simple SomePackage

  Install from a local flat directory containing archives (and don't scan indexes)::

  $ pip install --no-index --find-links=file:///local/dir/ SomePackage
  $ pip install --no-index --find-links=/local/dir/ SomePackage
  $ pip install --no-index --find-links=relative/dir/ SomePackage


9) Find pre-release and development versions, in addition to stable versions.  By default, pip only finds stable versions.

 ::

  $ pip install --pre SomePackage



.. _PyPI: http://pypi.python.org/pypi/
.. _setuptools extras: http://packages.python.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
doc/alt-python34-pip/docs/reference/index.rst000064400000000271150404236450015077 0ustar00===============
Reference Guide
===============

.. toctree::
   :maxdepth: 2

   pip
   pip_install
   pip_uninstall
   pip_freeze
   pip_list
   pip_show
   pip_search
   pip_wheel


doc/alt-python34-pip/docs/quickstart.rst000064400000001775150404236450014236 0ustar00Quickstart
==========

First, :doc:`Install pip <installing>`.

Install a package from `PyPI`_:

::

  $ pip install SomePackage
    [...]
    Successfully installed SomePackage

Show what files were installed:

::

  $ pip show --files SomePackage
    Name: SomePackage
    Version: 1.0
    Location: /my/env/lib/pythonx.x/site-packages
    Files:
     ../somepackage/__init__.py
     [...]

List what packages are outdated:

::

  $ pip list --outdated
    SomePackage (Current: 1.0 Latest: 2.0)

Upgrade a package:

::

  $ pip install --upgrade SomePackage
    [...]
    Found existing installation: SomePackage 1.0
    Uninstalling SomePackage:
      Successfully uninstalled SomePackage
    Running setup.py install for SomePackage
    Successfully installed SomePackage

Uninstall a package:

::

  $ pip uninstall SomePackage
    Uninstalling SomePackage:
      /my/env/lib/pythonx.x/site-packages/somepackage
    Proceed (y/n)? y
    Successfully uninstalled SomePackage


.. _PyPI: http://pypi.python.org/pypi/
doc/alt-python34-pip/docs/index.rst000064400000001015150404236450013136 0ustar00pip
===

`User list <http://groups.google.com/group/python-virtualenv>`_ |
`Dev list <http://groups.google.com/group/pypa-dev>`_ |
`Github <https://github.com/pypa/pip>`_ |
`PyPI <https://pypi.python.org/pypi/pip/>`_ |
User IRC: #pypa |
Dev IRC: #pypa-dev

The `PyPA recommended
<https://python-packaging-user-guide.readthedocs.org/en/latest/current.html>`_
tool for installing and managing Python packages.

.. toctree::
   :maxdepth: 2

   quickstart
   installing
   user_guide
   reference/index
   development
   news